@lssm-tech/example.draft-and-send-agentexample.draft-and-send-agent
CommunicationOS-shaped draft-and-send reference agent: draft a message, wait for approval, then send it through an approval-gated ContractSpec operation.
@lssm-tech/example.draft-and-send-agentSource, release and verification context
Source snapshot bcc79fcc · Declared package version 3.0.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.
See where this package fits.
Follow a declared connection, inspect an import, then open the source guide when you need the detail.
Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.
@lssm-tech/example.draft-and-send-agent
CommunicationOS-shaped draft-and-send reference agent for ContractSpec.
It exercises exactly the primitives that already exist: approval-gated external effect (execution.approval) and draft-only-by-default agent tools (automationSafe / requiresApproval). The domain is intentionally trivial — a message body plus a target channel — so no product-specific schema leaks into core packages.
Surfaces
DraftAndSendAgent(src/agent/draft-and-send.agent.ts) — oneAgentSpecwith adraftMessagetool (operationRef, automation-safe) and asendMessagetool (operationRef,requiresApproval: true).DraftAndSendWorkflow(src/workflow/draft-and-send.workflow.ts) — oneWorkflowSpecwiringdraft → approval-wait → send → receipt, executed through the Workflow DevKit runtime adapter (runWorkflowSpecWithWorkflowDevkit).- Operations (
src/contracts/) —draftAndSend.draftMessageand the approval-gateddraftAndSend.sendMessage. createDraftAndSendRegistry()(src/handlers/) — anOperationSpecRegistrywith both commands and trivial handlers bound.
Proof
src/draft-and-send.workflow.test.tsruns the full lifecycle through the Workflow DevKit adapter, issuing a real approval receipt for the send step.src/mcp-smoke.test.tsstarts a real MCP server (registerMcpTools) over an in-memory transport and drives one allowedsendMessagecall plus denied calls (missing / tampered receipt →APPROVAL_REQUIRED).
bun testDeclared capabilities.
This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.
Imports and export paths.
9 entriesThese are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.
9 imports
@lssm-tech/example.draft-and-send-agent/agent/draft-and-send.agent@lssm-tech/example.draft-and-send-agent/contracts@lssm-tech/example.draft-and-send-agent/contracts/draft-message.operation@lssm-tech/example.draft-and-send-agent/contracts/send-message.operation@lssm-tech/example.draft-and-send-agent/example@lssm-tech/example.draft-and-send-agent/handlers@lssm-tech/example.draft-and-send-agent/handlers/draft-and-send.handlers@lssm-tech/example.draft-and-send-agent/workflow/draft-and-send.workflowNo export paths match this search.
Dependencies and related packages.
Runtime dependencies 2
- @lssm-tech/lib.contracts-spec
- workspace:^
- @lssm-tech/lib.schema
- workspace:^
Development dependencies 8
- @lssm-tech/integration.workflow-devkit
- workspace:*
- @lssm-tech/lib.agent-runtime-conformance
- workspace:*
- @lssm-tech/lib.contracts-runtime-core
- workspace:*
- @lssm-tech/lib.contracts-runtime-server-mcp
- workspace:*
- @lssm-tech/tool.bun
- workspace:*
- @lssm-tech/tool.typescript
- workspace:*
- @modelcontextprotocol/sdk
- catalog:ai
- typescript
- catalog:
Package scripts.
Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.
contractspec-bun-build buildcontractspec-bun-build transpilecontractspec-bun-build typescontractspec-bun-build devrimraf dist .turbobun lint:fixnode ../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../scripts/biome.cjs check --write .node ../../scripts/biome.cjs check .bun testbun run build && bun run typecheck && bun run testcontractspec-bun-build prebuildtsgo --noEmit