@agento-nexus/core
v0.2.0
Published
Agento Nexus meta-system core — venture spec, coord runtime, cost-class router, verifier. Shared by platform/ and sdk/.
Readme
@agento-nexus/core
Meta-system primitives shared by platform/ and sdk/. The core of the Agento Nexus governed venture OS — venture spec contract, coord runtime, cost-class router, verifier, audit projection.
This package is not a customer-facing SDK. It is the internal core that both the platform's web app and the public @agento-nexus/sdk consume. Customer integrations should depend on @agento-nexus/sdk, not on this package directly.
Status
v0.0.1 — scaffold only. Constructs land per the implementation map:
- S3 →
src/spec/— venture-spec contract (TOML loader, Zod schemas, round-trip property tests). Construct #1. NEXT. - S5 →
src/verifier/—DirectiveArtifactContract+ Verifier runtime. Construct #4. - S6 →
src/router/— cost-class router (io-only / repo-write / network-call / sandbox-required). Construct #3. - S7 →
src/runtime/cheap-path/— gh / git / file / http executors. Construct #3 implementation. - S8 →
src/runtime/runDirective.ts— façade composing deliberation → governance → verifier → execution. Construct #2. - S9 →
src/audit/— JSONL projection ofAuditLog+DecisionOutcome.
See scopecraft/designs/meta-system-implementation-map.md (r3) and scopecraft/designs/orchestration-audit.md for the full design.
Dependency injection contract
Every primitive accepts dependencies at construction. No module imports @/lib/db, @/lib/auth, or other Next.js-aliased paths — those couplings live in the platform/ consumer.
import { PrismaClient } from "@prisma/client";
import { createRuntime } from "@agento-nexus/core/runtime";
const runtime = createRuntime({
db, // PrismaClient instance
audit, // (event: AuditEvent) => Promise<void>
resolveKey, // (ref: KeyRef) => Promise<ResolvedKey>
// ...other capabilities as constructs land
});This is the discipline that makes the same code run inside the platform's Next.js app and as a standalone runtime invoked by the SDK CLI for venture #0 (Agento Nexus running itself).
Install (from a sibling repo)
Until this package is published, consumers link locally:
// platform/package.json or sdk/package.json
{
"dependencies": {
"@agento-nexus/core": "file:../core"
}
}Then in the sibling repo: npm install (or pnpm install / bun install). The file: link pulls the build output from core/dist/ — run npm run build in core/ first.
Build & test
npm install
npm run build # tsup → dist/
npm run typecheck # tsc --noEmit
npm test # vitestESM-only. Node ≥ 20. TypeScript 5+.
Related
scopecraft/designs/meta-system-implementation-map.md— the architecturescopecraft/designs/orchestration-audit.md— what already exists inplatform/src/lib/sdk/issues/5— pluggable runtime/toolset abstraction (adjacent, not blocking)
