Skip to content
ContractSpec
Start here

Package manual · examples

·Examples and implementation patterns

example.agent-application-foundation

Reference applications showing how to compose durable ContractSpec agents.

examplesexamplev2.0.4experimentalservernode
@lssm-tech/example.agent-application-foundation
bun add @lssm-tech/example.agent-application-foundation
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Filesystem-authored reference app for the agent application foundation lane.

What it demonstrates

  • Compiling agent/{instructions.md,agent.ts,tools,skills,connections,sandbox,channels,subagents,schedules} plus evals/ with @lssm-tech/agentpacks/application.
  • Running a credential-free orchestrator-plus-verifier eval against a single-agent baseline with @lssm-tech/lib.agent-evals/runner.
  • Executing the CommunicationOS-shaped draft → approval wait → send → receipt lifecycle, including an exactly-once replay proof for the side effect.
  • Exercising the local development sandbox honestly: network allowlist claims are rejected and durable artifacts are extracted and reloaded without making an isolation claim.
  • Composing the EVE adapter with the independently conformance-tested production DockerAgentSandbox, while keeping the native EVE sandbox's narrower losses explicit.
  • Exercising both public adapter targets: Workflow DevKit plus EVE, with replay, cost, latency, and redaction evidence without serializing secrets.
  • Composing credential-free enterprise topology choices for Vercel + Supabase, Railway + Supabase, Vercel + Railway + Supabase, and Docker isolation while preserving provider roles, unresolved operator requirements, and candidate-only qualification truth.

Enterprise topology example

Import composeReferenceAgentPlatform from @lssm-tech/example.agent-application-foundation/enterprise-platform. The returned plan includes explicit enterprise controls and a qualification report; it remains a candidate until the consumer supplies and passes live suites for the exact environment.

All-in-one agents

The package includes two credential-free product scenarios in addition to the low-level reference fixture.

Autonomous Release Steward

Mission: keep a consumer codebase compatible with external APIs and dependencies by producing safe, verified, human-approved migration pull requests.

bash
bun run example:release-steward

Import runReleaseStewardExample and RELEASE_STEWARD_STAGE_IDS from @lssm-tech/example.agent-application-foundation/release-steward. The result includes the immutable source digest, affected usages, isolated subagent evidence, digest-bound approval, exactly-once patch receipt, CI and draft-PR evidence, durable worker and governed-improvement evidence, deployment composition, and candidateReadiness. It never auto-merges.

The filesystem source is also a Protocol V1 application with the stable installation ID release-steward. signReleaseStewardApplicationV1 accepts an injected signer so private key material stays in the caller's KMS/HSM or signing service. Local examples remain unsigned unless the caller explicitly composes that port; a test key never qualifies a production installation.

Company Intelligence Scout

Mission: continuously build source-cited company, offering, mission, goal, location, job, professional-person, and eligible public-contact intelligence.

bash
bun run example:company-intelligence-scout

Import runCompanyIntelligenceScoutExample from @lssm-tech/example.agent-application-foundation/company-intelligence-scout. Fixture mode reads only committed content and performs no network request or outreach. The default autonomy mode is draft-only; retained person/contact records expire after at most 30 days. Live discovery, fetching, rendering, suppression, and outreach require explicit policy and consumer-supplied ports:

bash
bun run example:company-intelligence-scout:live -- \
  --policy ./company-scout.policy.json \
  --ports-module ./company-scout.ports.ts \
  --seed-url https://allowed-company.example

Publicly visible personal data is not unrestricted data. Consumers own purpose, lawful basis, transparency, rights, suppression, deletion, jurisdictional requirements, and live provider qualification. Automated hiring decisions, candidate rejection, job applications, protected-trait inference, and sensitive-data enrichment stay outside the example.

Start with the public Agent Ecosystem guide, then use the repository enterprise agent platform guide for the complete copy-ready source. Both cover multiplayer, governed improvement, continuous loops, self-maintaining APIs, provider composition, and production qualification.

Local commands

  • bun run build
  • bun run typecheck
  • bun run test
  • bun run preflight
  • bun run example:release-steward
  • bun run example:company-intelligence-scout

Relationships

THIS PACKAGEexample.agent-application-foundation35 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

12 declarations

Declared capabilities

This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.

Scripts

  • example:company-intelligence-scoutbun run scripts/company-intelligence-scout.ts
  • example:company-intelligence-scout:livebun run scripts/company-intelligence-scout.ts --live
  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • cleanrimraf dist .turbo
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit
  • example:release-stewardbun scripts/release-steward.ts
  • testbun test
  • preflightbun run build && bun run typecheck && bun run test