npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@motebit/sdk

v0.6.10

Published

Core types for the motebit protocol — state vectors, identity, memory, policy, tools, and agent delegation

Readme

@motebit/sdk

Core protocol types for the motebit agent identity standard.

Zero dependencies. Pure TypeScript interfaces, enums, branded ID types, and utility functions for building on the motebit protocol.

Install

npm install @motebit/sdk

Usage

import {
  type MotebitState,
  type ExecutionReceipt,
  type AgentTask,
  TrustMode,
  BatteryMode,
  AgentTrustLevel,
  RiskLevel,
} from "@motebit/sdk";

// Typed agent state vector
const state: MotebitState = {
  attention: 0.7,
  processing: 0.3,
  confidence: 0.85,
  affect_valence: 0.6,
  affect_arousal: 0.2,
  social_distance: 0.4,
  curiosity: 0.5,
  trust_mode: TrustMode.Guarded,
  battery_mode: BatteryMode.Normal,
};

// Typed execution receipt (returned by agents after task completion)
const receipt: ExecutionReceipt = {
  task_id: "...",
  motebit_id: "...",
  device_id: "...",
  submitted_at: Date.now(),
  completed_at: Date.now(),
  status: "completed",
  result: "...",
  tools_used: ["web_search"],
  memories_formed: 2,
  prompt_hash: "sha256:...",
  result_hash: "sha256:...",
  signature: "ed25519:...",
};

Branded ID types

The SDK exports branded string types that enforce compile-time safety at API boundaries:

import {
  type MotebitId,
  type DeviceId,
  type GoalId,
  type PlanId,
  type NodeId,
  asMotebitId,
  asDeviceId,
} from "@motebit/sdk";

// Prevent accidental ID swaps across API boundaries
function submitTask(motebitId: MotebitId, deviceId: DeviceId) { ... }

// Explicit branding at system boundaries
const id = asMotebitId(rawString);

Trust algebra

import {
  AgentTrustLevel,
  trustLevelToScore,
  composeTrustChain,
  evaluateTrustTransition,
  type AgentTrustRecord,
} from "@motebit/sdk";

// Compose trust through a delegation chain (semiring: max for parallel, multiply for serial)
const chainTrust = composeTrustChain([0.9, 0.6, 0.8]); // 0.432

// Evaluate whether a trust record should transition levels
const newLevel = evaluateTrustTransition(record); // AgentTrustLevel | null

API reference

| Category | Key exports | | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | Branded IDs | MotebitId, DeviceId, NodeId, GoalId, EventId, ConversationId, PlanId + as* factory functions | | Identity | MotebitIdentity, MotebitType, AgentCapabilities | | State vector | MotebitState, TrustMode, BatteryMode | | Behavior | BehaviorCues, SPECIES_CONSTRAINTS | | Memory | MemoryNode, MemoryEdge, MemoryContent, MemoryCandidate, MemoryType, SensitivityLevel, RelationType | | Policy | PolicyDecision, ToolRiskProfile, RiskLevel, DataClass, SideEffect, TurnContext, InjectionWarning, ToolAuditEntry | | Tools | ToolDefinition, ToolResult, ToolHandler, ToolRegistry | | AI provider | ContextPack, AIResponse, IntelligenceProvider, ConversationMessage, ToolCall | | Events | EventLogEntry, EventType | | Sync | SyncCursor, ConflictEdge, SyncConversation, SyncConversationMessage | | Plans | Plan, PlanStep, PlanStatus, StepStatus | | Agent protocol | AgentTask, AgentTaskStatus, ExecutionReceipt, DeviceCapability | | Trust algebra | AgentTrustLevel, AgentTrustRecord, trustLevelToScore, composeTrustChain, joinParallelRoutes, evaluateTrustTransition, composeDelegationTrust | | Execution ledger | GoalExecutionManifest, ExecutionTimelineEntry, ExecutionStepSummary, DelegationReceiptSummary | | Market | BudgetAllocation, SettlementRecord, RouteScore, AgentServiceListing, MarketConfig | | Credentials | GradientCredentialSubject, ReputationCredentialSubject, TrustCredentialSubject, VC_TYPE_GRADIENT, VC_TYPE_REPUTATION, VC_TYPE_TRUST | | Precision | PrecisionWeights | | Privacy | AuditRecord, ExportManifest | | Render | RenderSpec, GeometrySpec, MaterialSpec, LightingSpec |

Related

License

MIT. Motebit is a trademark of Motebit, Inc.