@vauban-org/agent-sdk 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRACT.md +6401 -813
- package/dist/adapters/llm/anthropic-direct.d.ts +1 -0
- package/dist/adapters/llm/anthropic-direct.d.ts.map +1 -1
- package/dist/adapters/llm/anthropic-direct.js +43 -0
- package/dist/adapters/llm/anthropic-direct.js.map +1 -1
- package/dist/adapters/llm/cascade.d.ts.map +1 -1
- package/dist/adapters/llm/cascade.js +57 -14
- package/dist/adapters/llm/cascade.js.map +1 -1
- package/dist/adapters/llm/litellm.d.ts +2 -0
- package/dist/adapters/llm/litellm.d.ts.map +1 -1
- package/dist/adapters/llm/litellm.js +44 -0
- package/dist/adapters/llm/litellm.js.map +1 -1
- package/dist/compute/difficulty-estimator.d.ts +53 -0
- package/dist/compute/difficulty-estimator.d.ts.map +1 -0
- package/dist/compute/difficulty-estimator.js +82 -0
- package/dist/compute/difficulty-estimator.js.map +1 -0
- package/dist/compute/strategies/mixture-of-agents.d.ts +40 -0
- package/dist/compute/strategies/mixture-of-agents.d.ts.map +1 -0
- package/dist/compute/strategies/mixture-of-agents.js +110 -0
- package/dist/compute/strategies/mixture-of-agents.js.map +1 -0
- package/dist/compute/strategies/tree-of-thoughts.d.ts +48 -0
- package/dist/compute/strategies/tree-of-thoughts.d.ts.map +1 -0
- package/dist/compute/strategies/tree-of-thoughts.js +242 -0
- package/dist/compute/strategies/tree-of-thoughts.js.map +1 -0
- package/dist/compute/strategies/two-phase-orient.d.ts +72 -0
- package/dist/compute/strategies/two-phase-orient.d.ts.map +1 -0
- package/dist/compute/strategies/two-phase-orient.js +85 -0
- package/dist/compute/strategies/two-phase-orient.js.map +1 -0
- package/dist/constitution/types.d.ts +10 -10
- package/dist/container/protocol.d.ts +134 -0
- package/dist/container/protocol.d.ts.map +1 -0
- package/dist/container/protocol.js +157 -0
- package/dist/container/protocol.js.map +1 -0
- package/dist/container/runtime.d.ts +140 -0
- package/dist/container/runtime.d.ts.map +1 -0
- package/dist/container/runtime.js +256 -0
- package/dist/container/runtime.js.map +1 -0
- package/dist/events/catalogue.d.ts +46 -46
- package/dist/events/schemas/agent.completed.v1.d.ts +4 -4
- package/dist/events/schemas/agent.failed.v1.d.ts +2 -2
- package/dist/events/schemas/agent.hitl_resolved.v1.d.ts +2 -2
- package/dist/events/schemas/agent.started.v1.d.ts +2 -2
- package/dist/events/schemas/brain.skill.extracted.v1.d.ts +4 -4
- package/dist/events/schemas/cc.cost.anomaly_detected.v1.d.ts +2 -2
- package/dist/events/schemas/cc.cost.recorded.v1.d.ts +4 -4
- package/dist/events/schemas/citadel.sprint.analyzed.v1.d.ts +6 -6
- package/dist/events/schemas/citadel.sprint.closed.v1.d.ts +2 -2
- package/dist/events/schemas/forge.inbox.reply_classified.v1.d.ts +6 -6
- package/dist/events/schemas/forge.lead.qualified.v1.d.ts +2 -2
- package/dist/events/schemas/forge.outreach.sent.v1.d.ts +4 -4
- package/dist/events/schemas/incident.detected.v1.d.ts +2 -2
- package/dist/events/schemas/vauban.goal.checked.v1.d.ts +2 -2
- package/dist/events/schemas/vauban.rebalancing.checked.v1.d.ts +2 -2
- package/dist/events/schemas/vauban.tax.checked.v1.d.ts +2 -2
- package/dist/events/schemas/vauban.vault.analyzed.v1.d.ts +6 -6
- package/dist/identity/agent-persona.d.ts +73 -0
- package/dist/identity/agent-persona.d.ts.map +1 -0
- package/dist/identity/agent-persona.js +165 -0
- package/dist/identity/agent-persona.js.map +1 -0
- package/dist/identity/persona-prompt.d.ts +25 -0
- package/dist/identity/persona-prompt.d.ts.map +1 -0
- package/dist/identity/persona-prompt.js +71 -0
- package/dist/identity/persona-prompt.js.map +1 -0
- package/dist/identity/persona-schema.d.ts +120 -0
- package/dist/identity/persona-schema.d.ts.map +1 -0
- package/dist/identity/persona-schema.js +103 -0
- package/dist/identity/persona-schema.js.map +1 -0
- package/dist/index.d.ts +37 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -1
- package/dist/index.js.map +1 -1
- package/dist/loop/minimal-loop.js +293 -287
- package/dist/memory/episodic-rrf.d.ts +114 -0
- package/dist/memory/episodic-rrf.d.ts.map +1 -0
- package/dist/memory/episodic-rrf.js +148 -0
- package/dist/memory/episodic-rrf.js.map +1 -0
- package/dist/mesh/attenuation.d.ts +78 -0
- package/dist/mesh/attenuation.d.ts.map +1 -0
- package/dist/mesh/attenuation.js +141 -0
- package/dist/mesh/attenuation.js.map +1 -0
- package/dist/mesh/delegate.d.ts +96 -0
- package/dist/mesh/delegate.d.ts.map +1 -0
- package/dist/mesh/delegate.js +172 -0
- package/dist/mesh/delegate.js.map +1 -0
- package/dist/mesh/dispatcher.d.ts +119 -0
- package/dist/mesh/dispatcher.d.ts.map +1 -0
- package/dist/mesh/dispatcher.js +207 -0
- package/dist/mesh/dispatcher.js.map +1 -0
- package/dist/mesh/index.d.ts +12 -0
- package/dist/mesh/index.d.ts.map +1 -0
- package/dist/mesh/index.js +11 -0
- package/dist/mesh/index.js.map +1 -0
- package/dist/mesh/types.d.ts +30 -0
- package/dist/mesh/types.d.ts.map +1 -0
- package/dist/mesh/types.js +11 -0
- package/dist/mesh/types.js.map +1 -0
- package/dist/orchestration/ooda/skills.d.ts +104 -0
- package/dist/orchestration/ooda/skills.d.ts.map +1 -1
- package/dist/orchestration/ooda/skills.js +106 -0
- package/dist/orchestration/ooda/skills.js.map +1 -1
- package/dist/ports/bastion-action.contract.test.d.ts +11 -0
- package/dist/ports/bastion-action.contract.test.d.ts.map +1 -0
- package/dist/ports/bastion-action.contract.test.js +238 -0
- package/dist/ports/bastion-action.contract.test.js.map +1 -0
- package/dist/ports/bastion-action.d.ts +133 -0
- package/dist/ports/bastion-action.d.ts.map +1 -0
- package/dist/ports/bastion-action.js +73 -0
- package/dist/ports/bastion-action.js.map +1 -0
- package/dist/ports/brain.d.ts +31 -0
- package/dist/ports/brain.d.ts.map +1 -1
- package/dist/ports/brain.js +115 -1
- package/dist/ports/brain.js.map +1 -1
- package/dist/ports/citadel-action.contract.test.d.ts +11 -0
- package/dist/ports/citadel-action.contract.test.d.ts.map +1 -0
- package/dist/ports/citadel-action.contract.test.js +317 -0
- package/dist/ports/citadel-action.contract.test.js.map +1 -0
- package/dist/ports/citadel-action.d.ts +111 -0
- package/dist/ports/citadel-action.d.ts.map +1 -0
- package/dist/ports/citadel-action.js +62 -0
- package/dist/ports/citadel-action.js.map +1 -0
- package/dist/ports/compliance-contract.d.ts +123 -0
- package/dist/ports/compliance-contract.d.ts.map +1 -0
- package/dist/ports/compliance-contract.js +35 -0
- package/dist/ports/compliance-contract.js.map +1 -0
- package/dist/ports/db.d.ts +38 -0
- package/dist/ports/db.d.ts.map +1 -1
- package/dist/ports/db.js +88 -1
- package/dist/ports/db.js.map +1 -1
- package/dist/ports/delegation.contract.test.d.ts +9 -0
- package/dist/ports/delegation.contract.test.d.ts.map +1 -0
- package/dist/ports/delegation.contract.test.js +337 -0
- package/dist/ports/delegation.contract.test.js.map +1 -0
- package/dist/ports/delegation.d.ts +134 -0
- package/dist/ports/delegation.d.ts.map +1 -0
- package/dist/ports/delegation.js +105 -0
- package/dist/ports/delegation.js.map +1 -0
- package/dist/ports/event-bus.d.ts +29 -0
- package/dist/ports/event-bus.d.ts.map +1 -1
- package/dist/ports/event-bus.js +106 -1
- package/dist/ports/event-bus.js.map +1 -1
- package/dist/ports/federation.contract.test.d.ts +9 -0
- package/dist/ports/federation.contract.test.d.ts.map +1 -0
- package/dist/ports/federation.contract.test.js +279 -0
- package/dist/ports/federation.contract.test.js.map +1 -0
- package/dist/ports/federation.d.ts +140 -0
- package/dist/ports/federation.d.ts.map +1 -0
- package/dist/ports/federation.js +57 -0
- package/dist/ports/federation.js.map +1 -0
- package/dist/ports/index.d.ts +28 -2
- package/dist/ports/index.d.ts.map +1 -1
- package/dist/ports/index.js +17 -2
- package/dist/ports/index.js.map +1 -1
- package/dist/ports/llm-provider.d.ts +37 -0
- package/dist/ports/llm-provider.d.ts.map +1 -1
- package/dist/ports/llm-provider.js +99 -1
- package/dist/ports/llm-provider.js.map +1 -1
- package/dist/ports/logger.d.ts +27 -0
- package/dist/ports/logger.d.ts.map +1 -1
- package/dist/ports/logger.js +87 -0
- package/dist/ports/logger.js.map +1 -1
- package/dist/ports/manifest-registry.contract.test.d.ts +9 -0
- package/dist/ports/manifest-registry.contract.test.d.ts.map +1 -0
- package/dist/ports/manifest-registry.contract.test.js +246 -0
- package/dist/ports/manifest-registry.contract.test.js.map +1 -0
- package/dist/ports/manifest-registry.d.ts +116 -0
- package/dist/ports/manifest-registry.d.ts.map +1 -0
- package/dist/ports/manifest-registry.js +79 -0
- package/dist/ports/manifest-registry.js.map +1 -0
- package/dist/ports/observability.contract.test.d.ts +12 -0
- package/dist/ports/observability.contract.test.d.ts.map +1 -0
- package/dist/ports/observability.contract.test.js +260 -0
- package/dist/ports/observability.contract.test.js.map +1 -0
- package/dist/ports/observability.d.ts +98 -0
- package/dist/ports/observability.d.ts.map +1 -0
- package/dist/ports/observability.js +59 -0
- package/dist/ports/observability.js.map +1 -0
- package/dist/ports/outcome.d.ts +26 -0
- package/dist/ports/outcome.d.ts.map +1 -1
- package/dist/ports/outcome.js +62 -1
- package/dist/ports/outcome.js.map +1 -1
- package/dist/ports/privacy.contract.test.d.ts +12 -0
- package/dist/ports/privacy.contract.test.d.ts.map +1 -0
- package/dist/ports/privacy.contract.test.js +325 -0
- package/dist/ports/privacy.contract.test.js.map +1 -0
- package/dist/ports/privacy.d.ts +132 -0
- package/dist/ports/privacy.d.ts.map +1 -0
- package/dist/ports/privacy.js +83 -0
- package/dist/ports/privacy.js.map +1 -0
- package/dist/ports/tenant-context.contract.test.d.ts +14 -0
- package/dist/ports/tenant-context.contract.test.d.ts.map +1 -0
- package/dist/ports/tenant-context.contract.test.js +352 -0
- package/dist/ports/tenant-context.contract.test.js.map +1 -0
- package/dist/ports/tenant-context.d.ts +103 -0
- package/dist/ports/tenant-context.d.ts.map +1 -0
- package/dist/ports/tenant-context.js +48 -0
- package/dist/ports/tenant-context.js.map +1 -0
- package/dist/ports/vauban-finance-action.contract.test.d.ts +11 -0
- package/dist/ports/vauban-finance-action.contract.test.d.ts.map +1 -0
- package/dist/ports/vauban-finance-action.contract.test.js +260 -0
- package/dist/ports/vauban-finance-action.contract.test.js.map +1 -0
- package/dist/ports/vauban-finance-action.d.ts +106 -0
- package/dist/ports/vauban-finance-action.d.ts.map +1 -0
- package/dist/ports/vauban-finance-action.js +60 -0
- package/dist/ports/vauban-finance-action.js.map +1 -0
- package/dist/ports/workflow-runtime.d.ts +204 -0
- package/dist/ports/workflow-runtime.d.ts.map +1 -0
- package/dist/ports/workflow-runtime.js +72 -0
- package/dist/ports/workflow-runtime.js.map +1 -0
- package/dist/proof/cert-verify.d.ts +80 -0
- package/dist/proof/cert-verify.d.ts.map +1 -0
- package/dist/proof/cert-verify.js +178 -0
- package/dist/proof/cert-verify.js.map +1 -0
- package/dist/replay/replay.d.ts.map +1 -1
- package/dist/replay/replay.js +5 -1
- package/dist/replay/replay.js.map +1 -1
- package/dist/retry/index.d.ts +129 -0
- package/dist/retry/index.d.ts.map +1 -0
- package/dist/retry/index.js +156 -0
- package/dist/retry/index.js.map +1 -0
- package/dist/retry/presets.d.ts +39 -0
- package/dist/retry/presets.d.ts.map +1 -0
- package/dist/retry/presets.js +69 -0
- package/dist/retry/presets.js.map +1 -0
- package/dist/skill-loop/ab-runner.d.ts +67 -0
- package/dist/skill-loop/ab-runner.d.ts.map +1 -0
- package/dist/skill-loop/ab-runner.js +160 -0
- package/dist/skill-loop/ab-runner.js.map +1 -0
- package/dist/skill-loop/adoption.d.ts +67 -0
- package/dist/skill-loop/adoption.d.ts.map +1 -0
- package/dist/skill-loop/adoption.js +126 -0
- package/dist/skill-loop/adoption.js.map +1 -0
- package/dist/skill-loop/candidate.d.ts +45 -0
- package/dist/skill-loop/candidate.d.ts.map +1 -0
- package/dist/skill-loop/candidate.js +43 -0
- package/dist/skill-loop/candidate.js.map +1 -0
- package/dist/skill-loop/evaluator.d.ts +42 -0
- package/dist/skill-loop/evaluator.d.ts.map +1 -0
- package/dist/skill-loop/evaluator.js +184 -0
- package/dist/skill-loop/evaluator.js.map +1 -0
- package/dist/skill-loop/index.d.ts +27 -0
- package/dist/skill-loop/index.d.ts.map +1 -0
- package/dist/skill-loop/index.js +27 -0
- package/dist/skill-loop/index.js.map +1 -0
- package/dist/skill-loop/reflexion-replay.d.ts +87 -0
- package/dist/skill-loop/reflexion-replay.d.ts.map +1 -0
- package/dist/skill-loop/reflexion-replay.js +110 -0
- package/dist/skill-loop/reflexion-replay.js.map +1 -0
- package/dist/skill-loop/sign-off.d.ts +88 -0
- package/dist/skill-loop/sign-off.d.ts.map +1 -0
- package/dist/skill-loop/sign-off.js +146 -0
- package/dist/skill-loop/sign-off.js.map +1 -0
- package/dist/skill-loop/value-metric.d.ts +55 -0
- package/dist/skill-loop/value-metric.d.ts.map +1 -0
- package/dist/skill-loop/value-metric.js +69 -0
- package/dist/skill-loop/value-metric.js.map +1 -0
- package/dist/skill-loop/versioning.d.ts +36 -0
- package/dist/skill-loop/versioning.d.ts.map +1 -0
- package/dist/skill-loop/versioning.js +47 -0
- package/dist/skill-loop/versioning.js.map +1 -0
- package/dist/skill-manifest/anchor.d.ts +91 -0
- package/dist/skill-manifest/anchor.d.ts.map +1 -0
- package/dist/skill-manifest/anchor.js +331 -0
- package/dist/skill-manifest/anchor.js.map +1 -0
- package/dist/skill-manifest/builder.d.ts +47 -0
- package/dist/skill-manifest/builder.d.ts.map +1 -0
- package/dist/skill-manifest/builder.js +93 -0
- package/dist/skill-manifest/builder.js.map +1 -0
- package/dist/skill-manifest/index.d.ts +13 -0
- package/dist/skill-manifest/index.d.ts.map +1 -0
- package/dist/skill-manifest/index.js +9 -0
- package/dist/skill-manifest/index.js.map +1 -0
- package/dist/skill-manifest/types.d.ts +67 -0
- package/dist/skill-manifest/types.d.ts.map +1 -0
- package/dist/skill-manifest/types.js +16 -0
- package/dist/skill-manifest/types.js.map +1 -0
- package/dist/skill-manifest/verifier.d.ts +42 -0
- package/dist/skill-manifest/verifier.d.ts.map +1 -0
- package/dist/skill-manifest/verifier.js +136 -0
- package/dist/skill-manifest/verifier.js.map +1 -0
- package/dist/skills/brain-query.d.ts +4 -4
- package/dist/skills/brain-store.d.ts +6 -6
- package/dist/skills/errors.d.ts +15 -0
- package/dist/skills/errors.d.ts.map +1 -1
- package/dist/skills/errors.js +21 -0
- package/dist/skills/errors.js.map +1 -1
- package/dist/skills/hitl-request.d.ts +2 -2
- package/dist/skills/index.d.ts +3 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +4 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/markdown/loader.d.ts +52 -0
- package/dist/skills/markdown/loader.d.ts.map +1 -0
- package/dist/skills/markdown/loader.js +93 -0
- package/dist/skills/markdown/loader.js.map +1 -0
- package/dist/skills/markdown/schema.d.ts +432 -0
- package/dist/skills/markdown/schema.d.ts.map +1 -0
- package/dist/skills/markdown/schema.js +121 -0
- package/dist/skills/markdown/schema.js.map +1 -0
- package/dist/skills/poc-md-loader/markdown-loader.d.ts +77 -0
- package/dist/skills/poc-md-loader/markdown-loader.d.ts.map +1 -0
- package/dist/skills/poc-md-loader/markdown-loader.js +125 -0
- package/dist/skills/poc-md-loader/markdown-loader.js.map +1 -0
- package/dist/skills/poc-md-loader/runner.d.ts +24 -0
- package/dist/skills/poc-md-loader/runner.d.ts.map +1 -0
- package/dist/skills/poc-md-loader/runner.js +57 -0
- package/dist/skills/poc-md-loader/runner.js.map +1 -0
- package/dist/skills/poc-md-loader/vitest.poc.config.d.ts +3 -0
- package/dist/skills/poc-md-loader/vitest.poc.config.d.ts.map +1 -0
- package/dist/skills/poc-md-loader/vitest.poc.config.js +13 -0
- package/dist/skills/poc-md-loader/vitest.poc.config.js.map +1 -0
- package/dist/skills/poc-md-loader/web-search/script.d.ts +33 -0
- package/dist/skills/poc-md-loader/web-search/script.d.ts.map +1 -0
- package/dist/skills/poc-md-loader/web-search/script.js +75 -0
- package/dist/skills/poc-md-loader/web-search/script.js.map +1 -0
- package/dist/skills/record-outcome.d.ts +4 -4
- package/dist/skills/send-email.d.ts.map +1 -1
- package/dist/skills/send-email.js +15 -3
- package/dist/skills/send-email.js.map +1 -1
- package/dist/skills/slack-notify.d.ts +4 -4
- package/dist/skills/starknet-balance.d.ts +1 -1
- package/dist/skills/telegram-notify.d.ts +4 -4
- package/dist/skills/web-search.d.ts +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/test-brain-port.d.ts +4 -0
- package/dist/testing/test-brain-port.d.ts.map +1 -1
- package/dist/testing/test-brain-port.js +75 -20
- package/dist/testing/test-brain-port.js.map +1 -1
- package/dist/testing/test-event-bus.d.ts.map +1 -1
- package/dist/testing/test-event-bus.js +89 -36
- package/dist/testing/test-event-bus.js.map +1 -1
- package/dist/trace/schema.d.ts +1 -1
- package/dist/trace/schema.d.ts.map +1 -1
- package/dist/trace/schema.js +1 -1
- package/dist/trace/schema.js.map +1 -1
- package/dist/verify/formal/index.d.ts +44 -0
- package/dist/verify/formal/index.d.ts.map +1 -0
- package/dist/verify/formal/index.js +98 -0
- package/dist/verify/formal/index.js.map +1 -0
- package/dist/verify/formal/policy.d.ts +105 -0
- package/dist/verify/formal/policy.d.ts.map +1 -0
- package/dist/verify/formal/policy.js +159 -0
- package/dist/verify/formal/policy.js.map +1 -0
- package/dist/verify/formal/result.d.ts +50 -0
- package/dist/verify/formal/result.d.ts.map +1 -0
- package/dist/verify/formal/result.js +21 -0
- package/dist/verify/formal/result.js.map +1 -0
- package/dist/verify/formal/solver.d.ts +67 -0
- package/dist/verify/formal/solver.d.ts.map +1 -0
- package/dist/verify/formal/solver.js +184 -0
- package/dist/verify/formal/solver.js.map +1 -0
- package/dist/verify/formal/spec-language.d.ts +80 -0
- package/dist/verify/formal/spec-language.d.ts.map +1 -0
- package/dist/verify/formal/spec-language.js +219 -0
- package/dist/verify/formal/spec-language.js.map +1 -0
- package/docs/attestation.md +199 -0
- package/docs/identity.md +193 -0
- package/package.json +34 -17
- package/src/adapters/llm/anthropic-direct.ts +51 -0
- package/src/adapters/llm/cascade.ts +64 -19
- package/src/adapters/llm/litellm.ts +49 -0
- package/src/compute/difficulty-estimator.ts +111 -0
- package/src/compute/strategies/mixture-of-agents.ts +150 -0
- package/src/compute/strategies/tree-of-thoughts.ts +293 -0
- package/src/compute/strategies/two-phase-orient.ts +147 -0
- package/src/container/protocol.ts +243 -0
- package/src/container/runtime.ts +424 -0
- package/src/db/migrations/026_formal_verify_results.sql +30 -0
- package/src/identity/agent-persona.ts +203 -0
- package/src/identity/persona-prompt.ts +84 -0
- package/src/identity/persona-schema.ts +127 -0
- package/src/index.ts +338 -1
- package/src/memory/episodic-rrf.ts +224 -0
- package/src/mesh/attenuation.ts +190 -0
- package/src/mesh/delegate.ts +254 -0
- package/src/mesh/dispatcher.ts +301 -0
- package/src/mesh/index.ts +39 -0
- package/src/mesh/types.ts +31 -0
- package/src/orchestration/ooda/skills.ts +177 -0
- package/src/ports/bastion-action.contract.test.ts +355 -0
- package/src/ports/bastion-action.ts +198 -0
- package/src/ports/brain.ts +177 -15
- package/src/ports/citadel-action.contract.test.ts +430 -0
- package/src/ports/citadel-action.ts +174 -0
- package/src/ports/compliance-contract.ts +191 -0
- package/src/ports/db.ts +98 -0
- package/src/ports/delegation.contract.test.ts +428 -0
- package/src/ports/delegation.ts +211 -0
- package/src/ports/event-bus.ts +133 -0
- package/src/ports/federation.contract.test.ts +355 -0
- package/src/ports/federation.ts +190 -0
- package/src/ports/index.ts +186 -1
- package/src/ports/llm-provider.ts +123 -0
- package/src/ports/logger.ts +104 -0
- package/src/ports/manifest-registry.contract.test.ts +324 -0
- package/src/ports/manifest-registry.ts +188 -0
- package/src/ports/observability.contract.test.ts +315 -0
- package/src/ports/observability.ts +150 -0
- package/src/ports/outcome.ts +69 -0
- package/src/ports/privacy.contract.test.ts +413 -0
- package/src/ports/privacy.ts +207 -0
- package/src/ports/tenant-context.contract.test.ts +454 -0
- package/src/ports/tenant-context.ts +150 -0
- package/src/ports/vauban-finance-action.contract.test.ts +335 -0
- package/src/ports/vauban-finance-action.ts +166 -0
- package/src/ports/workflow-runtime.ts +327 -0
- package/src/proof/cert-verify.ts +249 -0
- package/src/replay/replay.ts +11 -8
- package/src/retry/index.ts +227 -0
- package/src/retry/presets.ts +75 -0
- package/src/skill-loop/ab-runner.ts +196 -0
- package/src/skill-loop/adoption.ts +188 -0
- package/src/skill-loop/candidate.ts +75 -0
- package/src/skill-loop/evaluator.ts +238 -0
- package/src/skill-loop/index.ts +51 -0
- package/src/skill-loop/reflexion-replay.ts +173 -0
- package/src/skill-loop/sign-off.ts +247 -0
- package/src/skill-loop/value-metric.ts +120 -0
- package/src/skill-loop/versioning.ts +75 -0
- package/src/skill-manifest/anchor.ts +401 -0
- package/src/skill-manifest/builder.ts +129 -0
- package/src/skill-manifest/index.ts +18 -0
- package/src/skill-manifest/types.ts +72 -0
- package/src/skill-manifest/verifier.ts +198 -0
- package/src/skills/errors.ts +30 -2
- package/src/skills/index.ts +19 -0
- package/src/skills/markdown/loader.ts +129 -0
- package/src/skills/markdown/schema.ts +144 -0
- package/src/skills/poc-md-loader/e2e-parity.test.ts +237 -0
- package/src/skills/poc-md-loader/markdown-loader.ts +161 -0
- package/src/skills/poc-md-loader/runner.ts +82 -0
- package/src/skills/poc-md-loader/vitest.poc.config.ts +13 -0
- package/src/skills/poc-md-loader/web-search/SKILL.md +42 -0
- package/src/skills/poc-md-loader/web-search/script.ts +109 -0
- package/src/skills/send-email.ts +15 -3
- package/src/testing/test-brain-port.ts +98 -24
- package/src/testing/test-event-bus.ts +104 -43
- package/src/trace/schema.ts +1 -1
- package/src/verify/formal/index.ts +154 -0
- package/src/verify/formal/policy.ts +253 -0
- package/src/verify/formal/result.ts +52 -0
- package/src/verify/formal/solver.ts +235 -0
- package/src/verify/formal/spec-language.ts +274 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* buildPersonaPromptBlock — converts an AgentPersona into a system-prompt block.
|
|
3
|
+
*
|
|
4
|
+
* The output is a compact, model-neutral instruction block that can be prepended
|
|
5
|
+
* to any system prompt. It is intentionally terse — LLMs handle short, directive
|
|
6
|
+
* blocks better than verbose persona descriptions.
|
|
7
|
+
*
|
|
8
|
+
* Format contract:
|
|
9
|
+
* - Starts with a blank line so callers can safely concatenate to an existing
|
|
10
|
+
* system prompt with `${base}\n${buildPersonaPromptBlock(persona)}`.
|
|
11
|
+
* - Empty fields are omitted — the function never emits empty bullet points.
|
|
12
|
+
* - The block is bounded by `--- persona ---` / `--- end persona ---` markers
|
|
13
|
+
* for easy parsing / stripping in tests and audits.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { AgentPersona } from "./persona-schema.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Build a system-prompt instruction block from a resolved `AgentPersona`.
|
|
22
|
+
*
|
|
23
|
+
* Returns an empty string if the persona has no actionable fields, so
|
|
24
|
+
* callers can unconditionally concatenate without emitting noise.
|
|
25
|
+
*/
|
|
26
|
+
export function buildPersonaPromptBlock(persona: AgentPersona): string {
|
|
27
|
+
const lines: string[] = [];
|
|
28
|
+
|
|
29
|
+
const { identity, traits, domain_expertise, communication } = persona;
|
|
30
|
+
|
|
31
|
+
if (identity?.name) {
|
|
32
|
+
lines.push(`You are ${identity.name}.`);
|
|
33
|
+
}
|
|
34
|
+
if (identity?.role) {
|
|
35
|
+
lines.push(`Role: ${identity.role}.`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const styleLines: string[] = [];
|
|
39
|
+
if (identity?.tone) styleLines.push(identity.tone);
|
|
40
|
+
if (identity?.formality) styleLines.push(identity.formality);
|
|
41
|
+
if (styleLines.length) {
|
|
42
|
+
lines.push(`Communication style: ${styleLines.join(", ")}.`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (identity?.language && identity.language !== "en") {
|
|
46
|
+
lines.push(`Respond in ${identity.language}.`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (traits && traits.length > 0) {
|
|
50
|
+
lines.push(`Traits: ${traits.join(", ")}.`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (domain_expertise && domain_expertise.length > 0) {
|
|
54
|
+
lines.push(`Domain expertise: ${domain_expertise.join(", ")}.`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (communication?.max_response_length) {
|
|
58
|
+
lines.push(
|
|
59
|
+
`Keep responses under ${communication.max_response_length} characters.`
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (communication?.explain_reasoning === "always") {
|
|
64
|
+
lines.push("Always explain your reasoning step by step.");
|
|
65
|
+
} else if (communication?.explain_reasoning === "never") {
|
|
66
|
+
lines.push("Do not explain your reasoning. Emit results only.");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (communication?.acknowledgment_style === "none") {
|
|
70
|
+
lines.push(
|
|
71
|
+
'Do not acknowledge the task. Skip preamble like "Sure," or "I will".'
|
|
72
|
+
);
|
|
73
|
+
} else if (communication?.acknowledgment_style === "minimal") {
|
|
74
|
+
lines.push("Skip task acknowledgment preamble. Go directly to output.");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (communication?.use_analogies === false) {
|
|
78
|
+
lines.push("Do not use analogies.");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (lines.length === 0) return "";
|
|
82
|
+
|
|
83
|
+
return `\n--- persona ---\n${lines.join("\n")}\n--- end persona ---`;
|
|
84
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentPersona schema — Sprint CC v3.1 (Livrable E).
|
|
3
|
+
*
|
|
4
|
+
* Persona is a structured description of how an agent should communicate:
|
|
5
|
+
* tone, formality, language, domain expertise, response shape preferences.
|
|
6
|
+
* Stored in Brain Tier 3 (semantic) per agent + override locally via
|
|
7
|
+
* `.cc/persona.yaml`.
|
|
8
|
+
*
|
|
9
|
+
* The schema is intentionally minimal — additive evolution preferred over
|
|
10
|
+
* breaking changes. All fields are optional; the resolved persona is the
|
|
11
|
+
* merge of (1) Brain-stored persona, (2) local overrides, (3) defaults.
|
|
12
|
+
*
|
|
13
|
+
* Spec reference:
|
|
14
|
+
* - Plan canonical v3.1 §Livrable E
|
|
15
|
+
* - ADR-ECO-034 §"AgentPersona via Brain Tier 3 semantic"
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { z } from "zod";
|
|
21
|
+
|
|
22
|
+
export const PersonaTone = z.enum(["concise", "detailed", "pedagogical"]);
|
|
23
|
+
export type PersonaTone = z.infer<typeof PersonaTone>;
|
|
24
|
+
|
|
25
|
+
export const PersonaFormality = z.enum(["casual", "formal", "technical"]);
|
|
26
|
+
export type PersonaFormality = z.infer<typeof PersonaFormality>;
|
|
27
|
+
|
|
28
|
+
export const PersonaExplainReasoning = z.enum(["always", "on_error", "never"]);
|
|
29
|
+
export type PersonaExplainReasoning = z.infer<typeof PersonaExplainReasoning>;
|
|
30
|
+
|
|
31
|
+
export const PersonaAcknowledgmentStyle = z.enum([
|
|
32
|
+
"minimal",
|
|
33
|
+
"detailed",
|
|
34
|
+
"none",
|
|
35
|
+
]);
|
|
36
|
+
export type PersonaAcknowledgmentStyle = z.infer<
|
|
37
|
+
typeof PersonaAcknowledgmentStyle
|
|
38
|
+
>;
|
|
39
|
+
|
|
40
|
+
// ─── Schemas ────────────────────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
const IdentitySchema = z
|
|
43
|
+
.object({
|
|
44
|
+
name: z.string().min(1).max(64).optional(),
|
|
45
|
+
role: z.string().min(1).max(256).optional(),
|
|
46
|
+
tone: PersonaTone.optional(),
|
|
47
|
+
formality: PersonaFormality.optional(),
|
|
48
|
+
/** BCP 47 language tag (e.g. "en", "fr-FR"). Free-form on purpose. */
|
|
49
|
+
language: z.string().min(2).max(16).optional(),
|
|
50
|
+
})
|
|
51
|
+
.strict();
|
|
52
|
+
|
|
53
|
+
const CommunicationSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
max_response_length: z.number().int().positive().max(100_000).optional(),
|
|
56
|
+
use_analogies: z.boolean().optional(),
|
|
57
|
+
explain_reasoning: PersonaExplainReasoning.optional(),
|
|
58
|
+
acknowledgment_style: PersonaAcknowledgmentStyle.optional(),
|
|
59
|
+
})
|
|
60
|
+
.strict();
|
|
61
|
+
|
|
62
|
+
export const PersonaSchema = z
|
|
63
|
+
.object({
|
|
64
|
+
identity: IdentitySchema.optional(),
|
|
65
|
+
traits: z.array(z.string().min(1).max(64)).max(16).optional(),
|
|
66
|
+
domain_expertise: z.array(z.string().min(1).max(128)).max(32).optional(),
|
|
67
|
+
communication: CommunicationSchema.optional(),
|
|
68
|
+
})
|
|
69
|
+
.strict();
|
|
70
|
+
|
|
71
|
+
export type AgentPersona = z.infer<typeof PersonaSchema>;
|
|
72
|
+
|
|
73
|
+
// ─── Defaults ──────────────────────────────────────────────────────────────
|
|
74
|
+
|
|
75
|
+
export const DEFAULT_PERSONA: AgentPersona = {
|
|
76
|
+
identity: {
|
|
77
|
+
tone: "concise",
|
|
78
|
+
formality: "technical",
|
|
79
|
+
language: "en",
|
|
80
|
+
},
|
|
81
|
+
traits: [],
|
|
82
|
+
domain_expertise: [],
|
|
83
|
+
communication: {
|
|
84
|
+
explain_reasoning: "on_error",
|
|
85
|
+
acknowledgment_style: "minimal",
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// ─── Merge ────────────────────────────────────────────────────────────────
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Deep-merge two personas. `local` wins over `base` field-by-field.
|
|
93
|
+
*
|
|
94
|
+
* Arrays (traits, domain_expertise) follow override semantics: a `local` array
|
|
95
|
+
* REPLACES the `base` array entirely. To extend rather than override, the
|
|
96
|
+
* caller must concatenate before calling `mergePersona`.
|
|
97
|
+
*
|
|
98
|
+
* The merge is total (no Zod validation here — callers should validate
|
|
99
|
+
* inputs and the result separately). This makes mergePersona suitable for
|
|
100
|
+
* progressive composition where intermediate values may not yet satisfy
|
|
101
|
+
* the schema.
|
|
102
|
+
*/
|
|
103
|
+
export function mergePersona(
|
|
104
|
+
base: AgentPersona,
|
|
105
|
+
local: AgentPersona
|
|
106
|
+
): AgentPersona {
|
|
107
|
+
return {
|
|
108
|
+
identity: {
|
|
109
|
+
...base.identity,
|
|
110
|
+
...local.identity,
|
|
111
|
+
},
|
|
112
|
+
traits: local.traits ?? base.traits,
|
|
113
|
+
domain_expertise: local.domain_expertise ?? base.domain_expertise,
|
|
114
|
+
communication: {
|
|
115
|
+
...base.communication,
|
|
116
|
+
...local.communication,
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Validate a persona object against the schema. Returns the parsed result
|
|
123
|
+
* (with Zod typing) or throws a typed error.
|
|
124
|
+
*/
|
|
125
|
+
export function validatePersona(input: unknown): AgentPersona {
|
|
126
|
+
return PersonaSchema.parse(input);
|
|
127
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -186,8 +186,156 @@ export type {
|
|
|
186
186
|
// Price feed port (plan v6 §3.4)
|
|
187
187
|
PricePort,
|
|
188
188
|
PriceEntry,
|
|
189
|
+
// WorkflowRuntime port (A-4 DBOS-TS adapter, S3 spec)
|
|
190
|
+
WorkflowRuntimePort,
|
|
191
|
+
WorkflowContext,
|
|
192
|
+
WorkflowRun,
|
|
193
|
+
WorkflowHandler,
|
|
194
|
+
WorkflowStatus,
|
|
195
|
+
JournalEntry,
|
|
196
|
+
StepKind,
|
|
197
|
+
StepStatus,
|
|
198
|
+
StepOpts,
|
|
199
|
+
EventFilter,
|
|
200
|
+
ChildWorkflowOpts,
|
|
201
|
+
StartWorkflowOpts,
|
|
202
|
+
ResumeWorkflowOpts,
|
|
203
|
+
SendSignalOpts,
|
|
204
|
+
JournalMigrator,
|
|
205
|
+
MigrationResult,
|
|
206
|
+
// Compliance Contract port (G-2 Cedar pivot, S5 spec)
|
|
207
|
+
ComplianceContractPort,
|
|
208
|
+
ComplianceContract,
|
|
209
|
+
ComplianceRule,
|
|
210
|
+
ComplianceGate,
|
|
211
|
+
ComplianceAuditResult,
|
|
212
|
+
ComplianceViolation,
|
|
213
|
+
ManifestValidationResult,
|
|
214
|
+
PolicyConflict,
|
|
215
|
+
CapabilityInvocation,
|
|
216
|
+
TenantContext,
|
|
217
|
+
LegalBasisRef,
|
|
218
|
+
LegalBasisDecl,
|
|
219
|
+
LegalBasisDomain,
|
|
220
|
+
Jurisdiction,
|
|
221
|
+
DataClass,
|
|
222
|
+
ComplianceMode,
|
|
223
|
+
EnforcementLevel,
|
|
224
|
+
RuleSource,
|
|
225
|
+
} from "./ports/index.js";
|
|
226
|
+
export {
|
|
227
|
+
noopLogger,
|
|
228
|
+
InvalidTargetError,
|
|
229
|
+
BrainUnavailableError,
|
|
230
|
+
BrainRateLimitError,
|
|
231
|
+
OutcomeWriteError,
|
|
232
|
+
LoggerFlushError,
|
|
233
|
+
DbConnectionLostError,
|
|
234
|
+
DbQueryTimeoutError,
|
|
235
|
+
EventPublishError,
|
|
236
|
+
LLMProviderError,
|
|
237
|
+
LLMRateLimitError,
|
|
238
|
+
// WorkflowRuntime errors
|
|
239
|
+
WorkflowNotFoundError,
|
|
240
|
+
WorkflowNonDeterminismError,
|
|
241
|
+
WorkflowSignalTimeoutError,
|
|
242
|
+
WorkflowLeaseConflictError,
|
|
243
|
+
WorkflowVersionMismatchError,
|
|
244
|
+
// Compliance Contract errors + constants
|
|
245
|
+
CompliancePolicyError,
|
|
246
|
+
ComplianceEvaluationTimeoutError,
|
|
247
|
+
SUPPORTED_JURISDICTIONS_V0,
|
|
248
|
+
} from "./ports/index.js";
|
|
249
|
+
|
|
250
|
+
// 8g. Sprint-636 V2.1 — 9 new ports (manifest, tenant, federation, delegation, products, observability, privacy)
|
|
251
|
+
export type {
|
|
252
|
+
ManifestRegistryPort,
|
|
253
|
+
Manifest,
|
|
254
|
+
RegistrationResult,
|
|
255
|
+
TenantContextPort,
|
|
256
|
+
DegradedMetrics,
|
|
257
|
+
FederationPort,
|
|
258
|
+
FederationMessage,
|
|
259
|
+
ContentClaim,
|
|
260
|
+
FederationMessageHeader,
|
|
261
|
+
AgentRef,
|
|
262
|
+
TransportMeta,
|
|
263
|
+
MessageId as FederationMessageId,
|
|
264
|
+
ReceiveOpts as FederationReceiveOpts,
|
|
265
|
+
FederationVerifyResult,
|
|
266
|
+
DelegationPort,
|
|
267
|
+
DelegationClaim,
|
|
268
|
+
CapabilityScope,
|
|
269
|
+
BastionActionPort,
|
|
270
|
+
BastionActionContext,
|
|
271
|
+
BastionTenantId,
|
|
272
|
+
ClientPolicy,
|
|
273
|
+
SwapParams,
|
|
274
|
+
SwapResult,
|
|
275
|
+
DepositParams,
|
|
276
|
+
DepositResult,
|
|
277
|
+
WithdrawParams,
|
|
278
|
+
WithdrawResult,
|
|
279
|
+
TransferParams,
|
|
280
|
+
TransferResult,
|
|
281
|
+
PolicyValidation,
|
|
282
|
+
VFinanceActionPort,
|
|
283
|
+
VFActionContext,
|
|
284
|
+
MarketSignal,
|
|
285
|
+
SolvencyClaim,
|
|
286
|
+
TradeRecord,
|
|
287
|
+
TradeClaim,
|
|
288
|
+
StrategyRunInput,
|
|
289
|
+
StrategyRunClaim,
|
|
290
|
+
PortfolioId,
|
|
291
|
+
ProofGrade,
|
|
292
|
+
CitadelActionPort,
|
|
293
|
+
CitadelActionContext,
|
|
294
|
+
AgentTier,
|
|
295
|
+
TaskStatus,
|
|
296
|
+
TaskRef,
|
|
297
|
+
SprintInput,
|
|
298
|
+
SprintRef,
|
|
299
|
+
VerificationEvidence,
|
|
300
|
+
SealedSprintClaim,
|
|
301
|
+
DecisionInput,
|
|
302
|
+
DecisionClaim,
|
|
303
|
+
ObservabilityPort,
|
|
304
|
+
PrivacyPort,
|
|
305
|
+
} from "./ports/index.js";
|
|
306
|
+
export {
|
|
307
|
+
ManifestNotFoundError,
|
|
308
|
+
ManifestSignatureInvalidError,
|
|
309
|
+
ManifestVersionConflictError,
|
|
310
|
+
ManifestComplianceConflictError,
|
|
311
|
+
ManifestValidationError,
|
|
312
|
+
TenantNotFoundError,
|
|
313
|
+
DegradedModeExhaustedError,
|
|
314
|
+
InvalidGlacisAttestationError,
|
|
315
|
+
FederationSignatureInvalidError,
|
|
316
|
+
FederationRoutingError,
|
|
317
|
+
FederationDelegationChainError,
|
|
318
|
+
DelegationNotNarrowingError,
|
|
319
|
+
DelegationExpiredError,
|
|
320
|
+
DelegationRevokedError,
|
|
321
|
+
DelegationChainTooDeepError,
|
|
322
|
+
BastionPolicyViolationError,
|
|
323
|
+
BastionInsufficientFundsError,
|
|
324
|
+
BastionSlippageExceededError,
|
|
325
|
+
BastionContractError,
|
|
326
|
+
BastionTransferUnauthorizedError,
|
|
327
|
+
VFOracleQuorumError,
|
|
328
|
+
VFProofGradeMismatchError,
|
|
329
|
+
VFAnchoringForbiddenError,
|
|
330
|
+
VFProofGenerationError,
|
|
331
|
+
CitadelTierViolationError,
|
|
332
|
+
CitadelTaskRefNotFoundError,
|
|
333
|
+
CitadelSprintNotActiveError,
|
|
334
|
+
CitadelInvalidStateTransitionError,
|
|
335
|
+
NoopObservabilityPort,
|
|
336
|
+
NoopPrivacyAdapter,
|
|
337
|
+
PrivacyNoopWarning,
|
|
189
338
|
} from "./ports/index.js";
|
|
190
|
-
export { noopLogger, InvalidTargetError } from "./ports/index.js";
|
|
191
339
|
|
|
192
340
|
// 8f. EventBusPort + CloudEvent (plan v6 §3.3 — sprint-618)
|
|
193
341
|
export type { EventBusPort, CloudEvent } from "./ports/event-bus.js";
|
|
@@ -339,6 +487,58 @@ export type {
|
|
|
339
487
|
BulkheadStats,
|
|
340
488
|
} from "./resilience/index.js";
|
|
341
489
|
|
|
490
|
+
// 12b. Retry primitives — RetryConfig, retry(), RetryContext + 4 presets (SDK v1.2.0 — sprint-680)
|
|
491
|
+
export {
|
|
492
|
+
retry,
|
|
493
|
+
RetryContext,
|
|
494
|
+
RetryExhaustedError,
|
|
495
|
+
calculateDelay,
|
|
496
|
+
shouldRetry,
|
|
497
|
+
RETRY_TRANSIENT,
|
|
498
|
+
RETRY_AGGRESSIVE,
|
|
499
|
+
RETRY_PATIENT,
|
|
500
|
+
NO_RETRY,
|
|
501
|
+
} from "./retry/index.js";
|
|
502
|
+
export type { RetryConfig, RetryOptions, SleepFn } from "./retry/index.js";
|
|
503
|
+
|
|
504
|
+
// 12d. SkillContext extensions — secrets audit, progress, time tracking (SDK v1.2.0 — sprint-685)
|
|
505
|
+
export {
|
|
506
|
+
InMemorySecretsAccessor,
|
|
507
|
+
NOOP_SECRETS,
|
|
508
|
+
SecretNotFoundError,
|
|
509
|
+
createSkillContext,
|
|
510
|
+
} from "./orchestration/ooda/skills.js";
|
|
511
|
+
export type {
|
|
512
|
+
SecretsAccessor,
|
|
513
|
+
ProgressCallback,
|
|
514
|
+
CreateSkillContextOptions,
|
|
515
|
+
} from "./orchestration/ooda/skills.js";
|
|
516
|
+
|
|
517
|
+
// 12c. Container execution protocol — uniform contract for binary/container automations (SDK v1.2.0 — sprint-684)
|
|
518
|
+
export {
|
|
519
|
+
PROTOCOL_ENV,
|
|
520
|
+
DEFAULT_PROTOCOL_MODE,
|
|
521
|
+
ProtocolParseError,
|
|
522
|
+
buildProtocolEnv,
|
|
523
|
+
parseProtocolOutput,
|
|
524
|
+
parseStderrLogs,
|
|
525
|
+
} from "./container/protocol.js";
|
|
526
|
+
export type {
|
|
527
|
+
ProtocolStatus,
|
|
528
|
+
ProtocolResult,
|
|
529
|
+
ExecutionResult,
|
|
530
|
+
} from "./container/protocol.js";
|
|
531
|
+
export { ContainerRuntime } from "./container/runtime.js";
|
|
532
|
+
export type {
|
|
533
|
+
ContainerRuntimeOptions,
|
|
534
|
+
ContainerExecutionOptions,
|
|
535
|
+
BinaryExecutionOptions,
|
|
536
|
+
SandboxExecutor,
|
|
537
|
+
SandboxJob,
|
|
538
|
+
SandboxResult,
|
|
539
|
+
SpawnFn as ContainerSpawnFn,
|
|
540
|
+
} from "./container/runtime.js";
|
|
541
|
+
|
|
342
542
|
// 13. Outcomes module (SDK v0.5.1 — Sprint-522)
|
|
343
543
|
export * from "./outcomes/index.js";
|
|
344
544
|
|
|
@@ -606,8 +806,70 @@ export type {
|
|
|
606
806
|
MAVAggregation,
|
|
607
807
|
BonMavOptions,
|
|
608
808
|
} from "./compute/strategies/bon-mav.js";
|
|
809
|
+
export { treeOfThoughtsStrategy } from "./compute/strategies/tree-of-thoughts.js";
|
|
810
|
+
export type {
|
|
811
|
+
ToTConfig,
|
|
812
|
+
ToTSearchPolicy,
|
|
813
|
+
} from "./compute/strategies/tree-of-thoughts.js";
|
|
814
|
+
export { mixtureOfAgentsStrategy } from "./compute/strategies/mixture-of-agents.js";
|
|
815
|
+
export type { MoAConfig } from "./compute/strategies/mixture-of-agents.js";
|
|
816
|
+
export {
|
|
817
|
+
estimateDifficulty,
|
|
818
|
+
extractFeatures,
|
|
819
|
+
recommendStrategy,
|
|
820
|
+
} from "./compute/difficulty-estimator.js";
|
|
821
|
+
export type {
|
|
822
|
+
DifficultyClass,
|
|
823
|
+
TaskFeatures,
|
|
824
|
+
} from "./compute/difficulty-estimator.js";
|
|
609
825
|
export { assertVerifierResult } from "./compute/verifier.js";
|
|
610
826
|
export type { Verifier, VerifierResult } from "./compute/verifier.js";
|
|
827
|
+
export {
|
|
828
|
+
runTwoPhaseOrient,
|
|
829
|
+
TwoPhaseOrientError,
|
|
830
|
+
} from "./compute/strategies/two-phase-orient.js";
|
|
831
|
+
export type {
|
|
832
|
+
TwoPhaseOrientConfig,
|
|
833
|
+
TwoPhaseOrientResult,
|
|
834
|
+
} from "./compute/strategies/two-phase-orient.js";
|
|
835
|
+
|
|
836
|
+
// 33b. mesh.delegate() — intent-based dispatch + capability attenuation (sprint-585)
|
|
837
|
+
export {
|
|
838
|
+
meshDelegate,
|
|
839
|
+
createMeshDelegate,
|
|
840
|
+
DelegateAttenuationError,
|
|
841
|
+
} from "./mesh/delegate.js";
|
|
842
|
+
export type {
|
|
843
|
+
DelegateOptions,
|
|
844
|
+
DelegateResult,
|
|
845
|
+
DelegateChunk,
|
|
846
|
+
} from "./mesh/delegate.js";
|
|
847
|
+
export {
|
|
848
|
+
DefaultMeshDispatcher,
|
|
849
|
+
MeshDispatchError,
|
|
850
|
+
DeadlineExceededError as MeshDeadlineExceededError,
|
|
851
|
+
defaultClassifier as meshDefaultClassifier,
|
|
852
|
+
} from "./mesh/dispatcher.js";
|
|
853
|
+
export type {
|
|
854
|
+
MeshDispatcher,
|
|
855
|
+
DispatchIntent,
|
|
856
|
+
DispatchResult,
|
|
857
|
+
DispatcherConfig,
|
|
858
|
+
} from "./mesh/dispatcher.js";
|
|
859
|
+
export {
|
|
860
|
+
attenuateScope,
|
|
861
|
+
buildToken as buildAttenuatedToken,
|
|
862
|
+
parseToken as parseAttenuatedToken,
|
|
863
|
+
scopeAllows,
|
|
864
|
+
} from "./mesh/attenuation.js";
|
|
865
|
+
export type {
|
|
866
|
+
AttenuatedToken,
|
|
867
|
+
MeshCapabilityScope,
|
|
868
|
+
} from "./mesh/attenuation.js";
|
|
869
|
+
export type {
|
|
870
|
+
MeshAgentKind,
|
|
871
|
+
DelegationLink as MeshDelegationLink,
|
|
872
|
+
} from "./mesh/types.js";
|
|
611
873
|
|
|
612
874
|
// 34. BrainPort eviction policies (sprint-580 Sprint A)
|
|
613
875
|
export {
|
|
@@ -723,3 +985,78 @@ export type {
|
|
|
723
985
|
} from "./types/agent.js";
|
|
724
986
|
export { toSdkEscalationLevel } from "./types/escalation-mapping.js";
|
|
725
987
|
export type { SdkEscalationLevel } from "./types/escalation-mapping.js";
|
|
988
|
+
|
|
989
|
+
// 41. Formal verification (sprint-587) — Z3 4-state SAFE/UNSAFE/UNKNOWN/SKIPPED
|
|
990
|
+
export {
|
|
991
|
+
formalVerify,
|
|
992
|
+
DEFAULT_POLICIES,
|
|
993
|
+
applyPolicy,
|
|
994
|
+
AXIOM_SPECS,
|
|
995
|
+
compileToSmt,
|
|
996
|
+
} from "./verify/formal/index.js";
|
|
997
|
+
export type {
|
|
998
|
+
ConsumerMode,
|
|
999
|
+
FormalVerifyResult,
|
|
1000
|
+
FormalVerifyState,
|
|
1001
|
+
AxiomPolicy,
|
|
1002
|
+
AxiomSpec,
|
|
1003
|
+
PolicyAction,
|
|
1004
|
+
PolicyDecision,
|
|
1005
|
+
VerifyContext,
|
|
1006
|
+
OnUnknown,
|
|
1007
|
+
OnUnsafe,
|
|
1008
|
+
Condition,
|
|
1009
|
+
FormalSolver,
|
|
1010
|
+
FormalVerifyDecision,
|
|
1011
|
+
} from "./verify/formal/index.js";
|
|
1012
|
+
|
|
1013
|
+
// AgentPersona (CC v3.1 — Livrable E)
|
|
1014
|
+
export {
|
|
1015
|
+
DEFAULT_PERSONA,
|
|
1016
|
+
mergePersona,
|
|
1017
|
+
PersonaSchema,
|
|
1018
|
+
validatePersona,
|
|
1019
|
+
} from "./identity/persona-schema.js";
|
|
1020
|
+
export type {
|
|
1021
|
+
AgentPersona,
|
|
1022
|
+
PersonaTone,
|
|
1023
|
+
PersonaFormality,
|
|
1024
|
+
PersonaExplainReasoning,
|
|
1025
|
+
PersonaAcknowledgmentStyle,
|
|
1026
|
+
} from "./identity/persona-schema.js";
|
|
1027
|
+
export {
|
|
1028
|
+
PERSONA_BRAIN_CATEGORY,
|
|
1029
|
+
personaTags,
|
|
1030
|
+
savePersonaToBrain,
|
|
1031
|
+
loadPersonaFromBrain,
|
|
1032
|
+
loadPersonaFromFile,
|
|
1033
|
+
savePersonaToFile,
|
|
1034
|
+
resolvePersona,
|
|
1035
|
+
} from "./identity/agent-persona.js";
|
|
1036
|
+
export type {
|
|
1037
|
+
ResolvePersonaOptions,
|
|
1038
|
+
ResolvedPersona,
|
|
1039
|
+
} from "./identity/agent-persona.js";
|
|
1040
|
+
|
|
1041
|
+
// Persona prompt builder (CC v3.1 — Livrable E)
|
|
1042
|
+
export { buildPersonaPromptBlock } from "./identity/persona-prompt.js";
|
|
1043
|
+
|
|
1044
|
+
// EpisodicMemory RRF (CC v3.1 — Livrable F)
|
|
1045
|
+
// cosineSimilarity already exported via sprint-564:C3 above
|
|
1046
|
+
export type { EpisodicMemoryEntry } from "./ports/brain.js";
|
|
1047
|
+
export {
|
|
1048
|
+
recencyScore,
|
|
1049
|
+
scoreEntries,
|
|
1050
|
+
recallEpisodicRrf,
|
|
1051
|
+
DEFAULT_RRF_WEIGHTS,
|
|
1052
|
+
DEFAULT_RECENCY_HALFLIFE_MS,
|
|
1053
|
+
} from "./memory/episodic-rrf.js";
|
|
1054
|
+
export type {
|
|
1055
|
+
RrfWeights,
|
|
1056
|
+
RrfOptions,
|
|
1057
|
+
ScoreComponents,
|
|
1058
|
+
ScoredEntry,
|
|
1059
|
+
RrfScorers,
|
|
1060
|
+
EpisodicCosineFn,
|
|
1061
|
+
RecallRrfOptions,
|
|
1062
|
+
} from "./memory/episodic-rrf.js";
|