@xemahq/kernel-contracts 0.1.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/dist/agent-composition/index.d.ts +7 -0
- package/dist/agent-composition/index.d.ts.map +1 -0
- package/dist/agent-composition/index.js +23 -0
- package/dist/agent-composition/index.js.map +1 -0
- package/dist/agent-composition/lib/capability-layer.d.ts +11 -0
- package/dist/agent-composition/lib/capability-layer.d.ts.map +1 -0
- package/dist/agent-composition/lib/capability-layer.js +10 -0
- package/dist/agent-composition/lib/capability-layer.js.map +1 -0
- package/dist/agent-composition/lib/composition-limits-schema.d.ts +4 -0
- package/dist/agent-composition/lib/composition-limits-schema.d.ts.map +1 -0
- package/dist/agent-composition/lib/composition-limits-schema.js +13 -0
- package/dist/agent-composition/lib/composition-limits-schema.js.map +1 -0
- package/dist/agent-composition/lib/composition-workspace.d.ts +35 -0
- package/dist/agent-composition/lib/composition-workspace.d.ts.map +1 -0
- package/dist/agent-composition/lib/composition-workspace.js +9 -0
- package/dist/agent-composition/lib/composition-workspace.js.map +1 -0
- package/dist/agent-composition/lib/composition.d.ts +66 -0
- package/dist/agent-composition/lib/composition.d.ts.map +1 -0
- package/dist/agent-composition/lib/composition.js +18 -0
- package/dist/agent-composition/lib/composition.js.map +1 -0
- package/dist/agent-composition/lib/intrinsic-floor.d.ts +15 -0
- package/dist/agent-composition/lib/intrinsic-floor.d.ts.map +1 -0
- package/dist/agent-composition/lib/intrinsic-floor.js +22 -0
- package/dist/agent-composition/lib/intrinsic-floor.js.map +1 -0
- package/dist/agent-composition/lib/model-resolution-matrix.d.ts +38 -0
- package/dist/agent-composition/lib/model-resolution-matrix.d.ts.map +1 -0
- package/dist/agent-composition/lib/model-resolution-matrix.js +12 -0
- package/dist/agent-composition/lib/model-resolution-matrix.js.map +1 -0
- package/dist/agent-workspace/awp-spec.json +225 -0
- package/dist/agent-workspace/index.d.ts +12 -0
- package/dist/agent-workspace/index.d.ts.map +1 -0
- package/dist/agent-workspace/index.js +28 -0
- package/dist/agent-workspace/index.js.map +1 -0
- package/dist/agent-workspace/lib/agent-run-context.d.ts +12 -0
- package/dist/agent-workspace/lib/agent-run-context.d.ts.map +1 -0
- package/dist/agent-workspace/lib/agent-run-context.js +3 -0
- package/dist/agent-workspace/lib/agent-run-context.js.map +1 -0
- package/dist/agent-workspace/lib/agent-tool-defaults.d.ts +21 -0
- package/dist/agent-workspace/lib/agent-tool-defaults.d.ts.map +1 -0
- package/dist/agent-workspace/lib/agent-tool-defaults.js +111 -0
- package/dist/agent-workspace/lib/agent-tool-defaults.js.map +1 -0
- package/dist/agent-workspace/lib/awp-v1.d.ts +15 -0
- package/dist/agent-workspace/lib/awp-v1.d.ts.map +1 -0
- package/dist/agent-workspace/lib/awp-v1.js +197 -0
- package/dist/agent-workspace/lib/awp-v1.js.map +1 -0
- package/dist/agent-workspace/lib/context-json.d.ts +35 -0
- package/dist/agent-workspace/lib/context-json.d.ts.map +1 -0
- package/dist/agent-workspace/lib/context-json.js +3 -0
- package/dist/agent-workspace/lib/context-json.js.map +1 -0
- package/dist/agent-workspace/lib/deliverable-spec-ref.d.ts +10 -0
- package/dist/agent-workspace/lib/deliverable-spec-ref.d.ts.map +1 -0
- package/dist/agent-workspace/lib/deliverable-spec-ref.js +33 -0
- package/dist/agent-workspace/lib/deliverable-spec-ref.js.map +1 -0
- package/dist/agent-workspace/lib/endpoint-fetch-spec.d.ts +31 -0
- package/dist/agent-workspace/lib/endpoint-fetch-spec.d.ts.map +1 -0
- package/dist/agent-workspace/lib/endpoint-fetch-spec.js +20 -0
- package/dist/agent-workspace/lib/endpoint-fetch-spec.js.map +1 -0
- package/dist/agent-workspace/lib/manifest.d.ts +28 -0
- package/dist/agent-workspace/lib/manifest.d.ts.map +1 -0
- package/dist/agent-workspace/lib/manifest.js +16 -0
- package/dist/agent-workspace/lib/manifest.js.map +1 -0
- package/dist/agent-workspace/lib/mount-apply.d.ts +42 -0
- package/dist/agent-workspace/lib/mount-apply.d.ts.map +1 -0
- package/dist/agent-workspace/lib/mount-apply.js +15 -0
- package/dist/agent-workspace/lib/mount-apply.js.map +1 -0
- package/dist/agent-workspace/lib/working-file.d.ts +20 -0
- package/dist/agent-workspace/lib/working-file.d.ts.map +1 -0
- package/dist/agent-workspace/lib/working-file.js +42 -0
- package/dist/agent-workspace/lib/working-file.js.map +1 -0
- package/dist/agent-workspace/lib/workspace-layout.d.ts +34 -0
- package/dist/agent-workspace/lib/workspace-layout.d.ts.map +1 -0
- package/dist/agent-workspace/lib/workspace-layout.js +31 -0
- package/dist/agent-workspace/lib/workspace-layout.js.map +1 -0
- package/dist/agent-workspace/lib/workspace-spec.d.ts +61 -0
- package/dist/agent-workspace/lib/workspace-spec.d.ts.map +1 -0
- package/dist/agent-workspace/lib/workspace-spec.js +19 -0
- package/dist/agent-workspace/lib/workspace-spec.js.map +1 -0
- package/dist/biome/index.d.ts +11 -0
- package/dist/biome/index.d.ts.map +1 -0
- package/dist/biome/index.js +27 -0
- package/dist/biome/index.js.map +1 -0
- package/dist/biome/lib/biome-api.d.ts +12 -0
- package/dist/biome/lib/biome-api.d.ts.map +1 -0
- package/dist/biome/lib/biome-api.js +14 -0
- package/dist/biome/lib/biome-api.js.map +1 -0
- package/dist/biome/lib/biome-capability-refs.d.ts +11 -0
- package/dist/biome/lib/biome-capability-refs.d.ts.map +1 -0
- package/dist/biome/lib/biome-capability-refs.js +12 -0
- package/dist/biome/lib/biome-capability-refs.js.map +1 -0
- package/dist/biome/lib/biome-engines.d.ts +6 -0
- package/dist/biome/lib/biome-engines.d.ts.map +1 -0
- package/dist/biome/lib/biome-engines.js +8 -0
- package/dist/biome/lib/biome-engines.js.map +1 -0
- package/dist/biome/lib/biome-lifecycle-hooks.d.ts +10 -0
- package/dist/biome/lib/biome-lifecycle-hooks.d.ts.map +1 -0
- package/dist/biome/lib/biome-lifecycle-hooks.js +12 -0
- package/dist/biome/lib/biome-lifecycle-hooks.js.map +1 -0
- package/dist/biome/lib/biome-lifecycle.d.ts +12 -0
- package/dist/biome/lib/biome-lifecycle.d.ts.map +1 -0
- package/dist/biome/lib/biome-lifecycle.js +16 -0
- package/dist/biome/lib/biome-lifecycle.js.map +1 -0
- package/dist/biome/lib/biome-manifest.d.ts +36 -0
- package/dist/biome/lib/biome-manifest.d.ts.map +1 -0
- package/dist/biome/lib/biome-manifest.js +38 -0
- package/dist/biome/lib/biome-manifest.js.map +1 -0
- package/dist/biome/lib/biome-permissions.d.ts +9 -0
- package/dist/biome/lib/biome-permissions.d.ts.map +1 -0
- package/dist/biome/lib/biome-permissions.js +11 -0
- package/dist/biome/lib/biome-permissions.js.map +1 -0
- package/dist/biome/lib/biome-scope.d.ts +9 -0
- package/dist/biome/lib/biome-scope.d.ts.map +1 -0
- package/dist/biome/lib/biome-scope.js +13 -0
- package/dist/biome/lib/biome-scope.js.map +1 -0
- package/dist/biome/lib/biome-trust-tier.d.ts +11 -0
- package/dist/biome/lib/biome-trust-tier.d.ts.map +1 -0
- package/dist/biome/lib/biome-trust-tier.js +15 -0
- package/dist/biome/lib/biome-trust-tier.js.map +1 -0
- package/dist/biome/lib/trust-tier-policies.d.ts +8 -0
- package/dist/biome/lib/trust-tier-policies.d.ts.map +1 -0
- package/dist/biome/lib/trust-tier-policies.js +66 -0
- package/dist/biome/lib/trust-tier-policies.js.map +1 -0
- package/dist/capability/index.d.ts +9 -0
- package/dist/capability/index.d.ts.map +1 -0
- package/dist/capability/index.js +25 -0
- package/dist/capability/index.js.map +1 -0
- package/dist/capability/lib/capability-contribution.d.ts +18 -0
- package/dist/capability/lib/capability-contribution.d.ts.map +1 -0
- package/dist/capability/lib/capability-contribution.js +23 -0
- package/dist/capability/lib/capability-contribution.js.map +1 -0
- package/dist/capability/lib/capability-grant.d.ts +22 -0
- package/dist/capability/lib/capability-grant.d.ts.map +1 -0
- package/dist/capability/lib/capability-grant.js +27 -0
- package/dist/capability/lib/capability-grant.js.map +1 -0
- package/dist/capability/lib/capability-policy.d.ts +12 -0
- package/dist/capability/lib/capability-policy.d.ts.map +1 -0
- package/dist/capability/lib/capability-policy.js +14 -0
- package/dist/capability/lib/capability-policy.js.map +1 -0
- package/dist/capability/lib/capability-ref.d.ts +19 -0
- package/dist/capability/lib/capability-ref.d.ts.map +1 -0
- package/dist/capability/lib/capability-ref.js +63 -0
- package/dist/capability/lib/capability-ref.js.map +1 -0
- package/dist/capability/lib/errors.d.ts +60 -0
- package/dist/capability/lib/errors.d.ts.map +1 -0
- package/dist/capability/lib/errors.js +73 -0
- package/dist/capability/lib/errors.js.map +1 -0
- package/dist/capability/lib/meta-tool.d.ts +77 -0
- package/dist/capability/lib/meta-tool.d.ts.map +1 -0
- package/dist/capability/lib/meta-tool.js +76 -0
- package/dist/capability/lib/meta-tool.js.map +1 -0
- package/dist/capability/lib/permission-profile.d.ts +35 -0
- package/dist/capability/lib/permission-profile.d.ts.map +1 -0
- package/dist/capability/lib/permission-profile.js +38 -0
- package/dist/capability/lib/permission-profile.js.map +1 -0
- package/dist/capability/lib/shell-command-descriptor.d.ts +19 -0
- package/dist/capability/lib/shell-command-descriptor.d.ts.map +1 -0
- package/dist/capability/lib/shell-command-descriptor.js +20 -0
- package/dist/capability/lib/shell-command-descriptor.js.map +1 -0
- package/dist/contribution/index.d.ts +5 -0
- package/dist/contribution/index.d.ts.map +1 -0
- package/dist/contribution/index.js +21 -0
- package/dist/contribution/index.js.map +1 -0
- package/dist/contribution/lib/contribution-kind.d.ts +44 -0
- package/dist/contribution/lib/contribution-kind.d.ts.map +1 -0
- package/dist/contribution/lib/contribution-kind.js +47 -0
- package/dist/contribution/lib/contribution-kind.js.map +1 -0
- package/dist/contribution/lib/contribution-source.d.ts +11 -0
- package/dist/contribution/lib/contribution-source.d.ts.map +1 -0
- package/dist/contribution/lib/contribution-source.js +14 -0
- package/dist/contribution/lib/contribution-source.js.map +1 -0
- package/dist/contribution/lib/contribution.d.ts +36 -0
- package/dist/contribution/lib/contribution.d.ts.map +1 -0
- package/dist/contribution/lib/contribution.js +56 -0
- package/dist/contribution/lib/contribution.js.map +1 -0
- package/dist/contribution/lib/registry.d.ts +25 -0
- package/dist/contribution/lib/registry.d.ts.map +1 -0
- package/dist/contribution/lib/registry.js +54 -0
- package/dist/contribution/lib/registry.js.map +1 -0
- package/dist/document-templates/index.d.ts +3 -0
- package/dist/document-templates/index.d.ts.map +1 -0
- package/dist/document-templates/index.js +19 -0
- package/dist/document-templates/index.js.map +1 -0
- package/dist/document-templates/lib/document-template.d.ts +24 -0
- package/dist/document-templates/lib/document-template.d.ts.map +1 -0
- package/dist/document-templates/lib/document-template.js +10 -0
- package/dist/document-templates/lib/document-template.js.map +1 -0
- package/dist/document-templates/lib/index.d.ts +3 -0
- package/dist/document-templates/lib/index.d.ts.map +1 -0
- package/dist/document-templates/lib/index.js +19 -0
- package/dist/document-templates/lib/index.js.map +1 -0
- package/dist/document-templates/lib/rendering-shape.d.ts +7 -0
- package/dist/document-templates/lib/rendering-shape.d.ts.map +1 -0
- package/dist/document-templates/lib/rendering-shape.js +20 -0
- package/dist/document-templates/lib/rendering-shape.js.map +1 -0
- package/dist/document-themes/index.d.ts +3 -0
- package/dist/document-themes/index.d.ts.map +1 -0
- package/dist/document-themes/index.js +19 -0
- package/dist/document-themes/index.js.map +1 -0
- package/dist/document-themes/lib/component-vocabulary.d.ts +16 -0
- package/dist/document-themes/lib/component-vocabulary.d.ts.map +1 -0
- package/dist/document-themes/lib/component-vocabulary.js +55 -0
- package/dist/document-themes/lib/component-vocabulary.js.map +1 -0
- package/dist/document-themes/lib/document-theme.d.ts +57 -0
- package/dist/document-themes/lib/document-theme.d.ts.map +1 -0
- package/dist/document-themes/lib/document-theme.js +10 -0
- package/dist/document-themes/lib/document-theme.js.map +1 -0
- package/dist/document-themes/lib/index.d.ts +3 -0
- package/dist/document-themes/lib/index.d.ts.map +1 -0
- package/dist/document-themes/lib/index.js +19 -0
- package/dist/document-themes/lib/index.js.map +1 -0
- package/dist/entitlement/index.d.ts +2 -0
- package/dist/entitlement/index.d.ts.map +1 -0
- package/dist/entitlement/index.js +18 -0
- package/dist/entitlement/index.js.map +1 -0
- package/dist/entitlement/lib/entitlement.d.ts +25 -0
- package/dist/entitlement/lib/entitlement.d.ts.map +1 -0
- package/dist/entitlement/lib/entitlement.js +54 -0
- package/dist/entitlement/lib/entitlement.js.map +1 -0
- package/dist/execution-context/index.d.ts +4 -0
- package/dist/execution-context/index.d.ts.map +1 -0
- package/dist/execution-context/index.js +20 -0
- package/dist/execution-context/index.js.map +1 -0
- package/dist/execution-context/lib/caller.d.ts +19 -0
- package/dist/execution-context/lib/caller.d.ts.map +1 -0
- package/dist/execution-context/lib/caller.js +22 -0
- package/dist/execution-context/lib/caller.js.map +1 -0
- package/dist/execution-context/lib/execution-context.d.ts +60 -0
- package/dist/execution-context/lib/execution-context.d.ts.map +1 -0
- package/dist/execution-context/lib/execution-context.js +58 -0
- package/dist/execution-context/lib/execution-context.js.map +1 -0
- package/dist/execution-context/lib/subject.d.ts +3 -0
- package/dist/execution-context/lib/subject.d.ts.map +1 -0
- package/dist/execution-context/lib/subject.js +11 -0
- package/dist/execution-context/lib/subject.js.map +1 -0
- package/dist/execution-environment/index.d.ts +4 -0
- package/dist/execution-environment/index.d.ts.map +1 -0
- package/dist/execution-environment/index.js +20 -0
- package/dist/execution-environment/index.js.map +1 -0
- package/dist/execution-environment/lib/approval-rule.d.ts +10 -0
- package/dist/execution-environment/lib/approval-rule.d.ts.map +1 -0
- package/dist/execution-environment/lib/approval-rule.js +12 -0
- package/dist/execution-environment/lib/approval-rule.js.map +1 -0
- package/dist/execution-environment/lib/built-in-environments.d.ts +16 -0
- package/dist/execution-environment/lib/built-in-environments.d.ts.map +1 -0
- package/dist/execution-environment/lib/built-in-environments.js +33 -0
- package/dist/execution-environment/lib/built-in-environments.js.map +1 -0
- package/dist/execution-environment/lib/execution-environment.d.ts +58 -0
- package/dist/execution-environment/lib/execution-environment.d.ts.map +1 -0
- package/dist/execution-environment/lib/execution-environment.js +89 -0
- package/dist/execution-environment/lib/execution-environment.js.map +1 -0
- package/dist/kernel-state/index.d.ts +4 -0
- package/dist/kernel-state/index.d.ts.map +1 -0
- package/dist/kernel-state/index.js +20 -0
- package/dist/kernel-state/index.js.map +1 -0
- package/dist/kernel-state/lib/adapter-kind.d.ts +5 -0
- package/dist/kernel-state/lib/adapter-kind.d.ts.map +1 -0
- package/dist/kernel-state/lib/adapter-kind.js +9 -0
- package/dist/kernel-state/lib/adapter-kind.js.map +1 -0
- package/dist/kernel-state/lib/kernel-state.d.ts +37 -0
- package/dist/kernel-state/lib/kernel-state.d.ts.map +1 -0
- package/dist/kernel-state/lib/kernel-state.js +9 -0
- package/dist/kernel-state/lib/kernel-state.js.map +1 -0
- package/dist/kernel-state/lib/key-grammar.d.ts +16 -0
- package/dist/kernel-state/lib/key-grammar.d.ts.map +1 -0
- package/dist/kernel-state/lib/key-grammar.js +56 -0
- package/dist/kernel-state/lib/key-grammar.js.map +1 -0
- package/dist/llm-gateway/index.d.ts +3 -0
- package/dist/llm-gateway/index.d.ts.map +1 -0
- package/dist/llm-gateway/index.js +19 -0
- package/dist/llm-gateway/index.js.map +1 -0
- package/dist/llm-gateway/lib/caller.d.ts +14 -0
- package/dist/llm-gateway/lib/caller.d.ts.map +1 -0
- package/dist/llm-gateway/lib/caller.js +11 -0
- package/dist/llm-gateway/lib/caller.js.map +1 -0
- package/dist/llm-gateway/lib/errors.d.ts +27 -0
- package/dist/llm-gateway/lib/errors.d.ts.map +1 -0
- package/dist/llm-gateway/lib/errors.js +36 -0
- package/dist/llm-gateway/lib/errors.js.map +1 -0
- package/dist/mcp-tool/index.d.ts +7 -0
- package/dist/mcp-tool/index.d.ts.map +1 -0
- package/dist/mcp-tool/index.js +23 -0
- package/dist/mcp-tool/index.js.map +1 -0
- package/dist/mcp-tool/lib/mcp-protocol.d.ts +75 -0
- package/dist/mcp-tool/lib/mcp-protocol.d.ts.map +1 -0
- package/dist/mcp-tool/lib/mcp-protocol.js +19 -0
- package/dist/mcp-tool/lib/mcp-protocol.js.map +1 -0
- package/dist/mcp-tool/lib/mcp-server-config.d.ts +8 -0
- package/dist/mcp-tool/lib/mcp-server-config.d.ts.map +1 -0
- package/dist/mcp-tool/lib/mcp-server-config.js +3 -0
- package/dist/mcp-tool/lib/mcp-server-config.js.map +1 -0
- package/dist/mcp-tool/lib/provider-kind.d.ts +10 -0
- package/dist/mcp-tool/lib/provider-kind.d.ts.map +1 -0
- package/dist/mcp-tool/lib/provider-kind.js +14 -0
- package/dist/mcp-tool/lib/provider-kind.js.map +1 -0
- package/dist/mcp-tool/lib/resolver-scope.d.ts +16 -0
- package/dist/mcp-tool/lib/resolver-scope.d.ts.map +1 -0
- package/dist/mcp-tool/lib/resolver-scope.js +12 -0
- package/dist/mcp-tool/lib/resolver-scope.js.map +1 -0
- package/dist/mcp-tool/lib/tool-provider.d.ts +21 -0
- package/dist/mcp-tool/lib/tool-provider.d.ts.map +1 -0
- package/dist/mcp-tool/lib/tool-provider.js +3 -0
- package/dist/mcp-tool/lib/tool-provider.js.map +1 -0
- package/dist/mcp-tool/lib/tool-selection.d.ts +34 -0
- package/dist/mcp-tool/lib/tool-selection.d.ts.map +1 -0
- package/dist/mcp-tool/lib/tool-selection.js +18 -0
- package/dist/mcp-tool/lib/tool-selection.js.map +1 -0
- package/dist/object/index.d.ts +5 -0
- package/dist/object/index.d.ts.map +1 -0
- package/dist/object/index.js +21 -0
- package/dist/object/index.js.map +1 -0
- package/dist/object/lib/object-lifecycle.d.ts +8 -0
- package/dist/object/lib/object-lifecycle.d.ts.map +1 -0
- package/dist/object/lib/object-lifecycle.js +12 -0
- package/dist/object/lib/object-lifecycle.js.map +1 -0
- package/dist/object/lib/xema-object-kind.d.ts +43 -0
- package/dist/object/lib/xema-object-kind.d.ts.map +1 -0
- package/dist/object/lib/xema-object-kind.js +47 -0
- package/dist/object/lib/xema-object-kind.js.map +1 -0
- package/dist/object/lib/xema-object-ref.d.ts +20 -0
- package/dist/object/lib/xema-object-ref.d.ts.map +1 -0
- package/dist/object/lib/xema-object-ref.js +133 -0
- package/dist/object/lib/xema-object-ref.js.map +1 -0
- package/dist/object/lib/xema-object.d.ts +24 -0
- package/dist/object/lib/xema-object.d.ts.map +1 -0
- package/dist/object/lib/xema-object.js +24 -0
- package/dist/object/lib/xema-object.js.map +1 -0
- package/dist/policy/index.d.ts +4 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +20 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/lib/obligations.d.ts +91 -0
- package/dist/policy/lib/obligations.d.ts.map +1 -0
- package/dist/policy/lib/obligations.js +76 -0
- package/dist/policy/lib/obligations.js.map +1 -0
- package/dist/policy/lib/policy.d.ts +29 -0
- package/dist/policy/lib/policy.d.ts.map +1 -0
- package/dist/policy/lib/policy.js +32 -0
- package/dist/policy/lib/policy.js.map +1 -0
- package/dist/policy/lib/route-hints.d.ts +11 -0
- package/dist/policy/lib/route-hints.d.ts.map +1 -0
- package/dist/policy/lib/route-hints.js +15 -0
- package/dist/policy/lib/route-hints.js.map +1 -0
- package/dist/runner/index.d.ts +12 -0
- package/dist/runner/index.d.ts.map +1 -0
- package/dist/runner/index.js +28 -0
- package/dist/runner/index.js.map +1 -0
- package/dist/runner/lib/dispatch.d.ts +13 -0
- package/dist/runner/lib/dispatch.d.ts.map +1 -0
- package/dist/runner/lib/dispatch.js +15 -0
- package/dist/runner/lib/dispatch.js.map +1 -0
- package/dist/runner/lib/input-hash.d.ts +2 -0
- package/dist/runner/lib/input-hash.d.ts.map +1 -0
- package/dist/runner/lib/input-hash.js +37 -0
- package/dist/runner/lib/input-hash.js.map +1 -0
- package/dist/runner/lib/job-token.d.ts +22 -0
- package/dist/runner/lib/job-token.d.ts.map +1 -0
- package/dist/runner/lib/job-token.js +3 -0
- package/dist/runner/lib/job-token.js.map +1 -0
- package/dist/runner/lib/runner-attestation.d.ts +10 -0
- package/dist/runner/lib/runner-attestation.d.ts.map +1 -0
- package/dist/runner/lib/runner-attestation.js +5 -0
- package/dist/runner/lib/runner-attestation.js.map +1 -0
- package/dist/runner/lib/runner-job.d.ts +26 -0
- package/dist/runner/lib/runner-job.d.ts.map +1 -0
- package/dist/runner/lib/runner-job.js +36 -0
- package/dist/runner/lib/runner-job.js.map +1 -0
- package/dist/runner/lib/runner-kind.d.ts +2 -0
- package/dist/runner/lib/runner-kind.d.ts.map +1 -0
- package/dist/runner/lib/runner-kind.js +7 -0
- package/dist/runner/lib/runner-kind.js.map +1 -0
- package/dist/runner/lib/runner-mode.d.ts +5 -0
- package/dist/runner/lib/runner-mode.d.ts.map +1 -0
- package/dist/runner/lib/runner-mode.js +9 -0
- package/dist/runner/lib/runner-mode.js.map +1 -0
- package/dist/runner/lib/runner-plane.d.ts +19 -0
- package/dist/runner/lib/runner-plane.d.ts.map +1 -0
- package/dist/runner/lib/runner-plane.js +31 -0
- package/dist/runner/lib/runner-plane.js.map +1 -0
- package/dist/runner/lib/runner-registration.d.ts +60 -0
- package/dist/runner/lib/runner-registration.d.ts.map +1 -0
- package/dist/runner/lib/runner-registration.js +62 -0
- package/dist/runner/lib/runner-registration.js.map +1 -0
- package/dist/runner/lib/runner.d.ts +24 -0
- package/dist/runner/lib/runner.d.ts.map +1 -0
- package/dist/runner/lib/runner.js +26 -0
- package/dist/runner/lib/runner.js.map +1 -0
- package/dist/runner/lib/runtime-isolation.d.ts +10 -0
- package/dist/runner/lib/runtime-isolation.d.ts.map +1 -0
- package/dist/runner/lib/runtime-isolation.js +23 -0
- package/dist/runner/lib/runtime-isolation.js.map +1 -0
- package/dist/search-source/index.d.ts +5 -0
- package/dist/search-source/index.d.ts.map +1 -0
- package/dist/search-source/index.js +21 -0
- package/dist/search-source/index.js.map +1 -0
- package/dist/search-source/lib/indexable-document.d.ts +40 -0
- package/dist/search-source/lib/indexable-document.d.ts.map +1 -0
- package/dist/search-source/lib/indexable-document.js +26 -0
- package/dist/search-source/lib/indexable-document.js.map +1 -0
- package/dist/search-source/lib/search-index-event.d.ts +52 -0
- package/dist/search-source/lib/search-index-event.d.ts.map +1 -0
- package/dist/search-source/lib/search-index-event.js +29 -0
- package/dist/search-source/lib/search-index-event.js.map +1 -0
- package/dist/search-source/lib/search-replay.d.ts +46 -0
- package/dist/search-source/lib/search-replay.d.ts.map +1 -0
- package/dist/search-source/lib/search-replay.js +36 -0
- package/dist/search-source/lib/search-replay.js.map +1 -0
- package/dist/search-source/lib/search-source-descriptor.d.ts +15 -0
- package/dist/search-source/lib/search-source-descriptor.d.ts.map +1 -0
- package/dist/search-source/lib/search-source-descriptor.js +3 -0
- package/dist/search-source/lib/search-source-descriptor.js.map +1 -0
- package/dist/service-registry/index.d.ts +4 -0
- package/dist/service-registry/index.d.ts.map +1 -0
- package/dist/service-registry/index.js +20 -0
- package/dist/service-registry/index.js.map +1 -0
- package/dist/service-registry/lib/inject-service.d.ts +6 -0
- package/dist/service-registry/lib/inject-service.d.ts.map +1 -0
- package/dist/service-registry/lib/inject-service.js +5 -0
- package/dist/service-registry/lib/inject-service.js.map +1 -0
- package/dist/service-registry/lib/service-descriptor.d.ts +28 -0
- package/dist/service-registry/lib/service-descriptor.d.ts.map +1 -0
- package/dist/service-registry/lib/service-descriptor.js +17 -0
- package/dist/service-registry/lib/service-descriptor.js.map +1 -0
- package/dist/service-registry/lib/service-registry-client.d.ts +30 -0
- package/dist/service-registry/lib/service-registry-client.d.ts.map +1 -0
- package/dist/service-registry/lib/service-registry-client.js +3 -0
- package/dist/service-registry/lib/service-registry-client.js.map +1 -0
- package/dist/skill/index.d.ts +5 -0
- package/dist/skill/index.d.ts.map +1 -0
- package/dist/skill/index.js +21 -0
- package/dist/skill/index.js.map +1 -0
- package/dist/skill/lib/skill-enums.d.ts +41 -0
- package/dist/skill/lib/skill-enums.d.ts.map +1 -0
- package/dist/skill/lib/skill-enums.js +54 -0
- package/dist/skill/lib/skill-enums.js.map +1 -0
- package/dist/skill/lib/skill-governance.d.ts +106 -0
- package/dist/skill/lib/skill-governance.d.ts.map +1 -0
- package/dist/skill/lib/skill-governance.js +61 -0
- package/dist/skill/lib/skill-governance.js.map +1 -0
- package/dist/skill/lib/skill-source.d.ts +14 -0
- package/dist/skill/lib/skill-source.d.ts.map +1 -0
- package/dist/skill/lib/skill-source.js +3 -0
- package/dist/skill/lib/skill-source.js.map +1 -0
- package/dist/skill/lib/skill.d.ts +52 -0
- package/dist/skill/lib/skill.d.ts.map +1 -0
- package/dist/skill/lib/skill.js +3 -0
- package/dist/skill/lib/skill.js.map +1 -0
- package/dist/space/index.d.ts +4 -0
- package/dist/space/index.d.ts.map +1 -0
- package/dist/space/index.js +20 -0
- package/dist/space/index.js.map +1 -0
- package/dist/space/lib/space-ref-parser.d.ts +8 -0
- package/dist/space/lib/space-ref-parser.d.ts.map +1 -0
- package/dist/space/lib/space-ref-parser.js +149 -0
- package/dist/space/lib/space-ref-parser.js.map +1 -0
- package/dist/space/lib/space-traversal.d.ts +3 -0
- package/dist/space/lib/space-traversal.d.ts.map +1 -0
- package/dist/space/lib/space-traversal.js +56 -0
- package/dist/space/lib/space-traversal.js.map +1 -0
- package/dist/space/lib/space.d.ts +53 -0
- package/dist/space/lib/space.d.ts.map +1 -0
- package/dist/space/lib/space.js +98 -0
- package/dist/space/lib/space.js.map +1 -0
- package/dist/subject/index.d.ts +3 -0
- package/dist/subject/index.d.ts.map +1 -0
- package/dist/subject/index.js +19 -0
- package/dist/subject/index.js.map +1 -0
- package/dist/subject/lib/subject.d.ts +29 -0
- package/dist/subject/lib/subject.d.ts.map +1 -0
- package/dist/subject/lib/subject.js +47 -0
- package/dist/subject/lib/subject.js.map +1 -0
- package/dist/subject/lib/token-class.d.ts +11 -0
- package/dist/subject/lib/token-class.d.ts.map +1 -0
- package/dist/subject/lib/token-class.js +15 -0
- package/dist/subject/lib/token-class.js.map +1 -0
- package/dist/workflow/index.d.ts +31 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +47 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/lib/action-ref.d.ts +12 -0
- package/dist/workflow/lib/action-ref.d.ts.map +1 -0
- package/dist/workflow/lib/action-ref.js +3 -0
- package/dist/workflow/lib/action-ref.js.map +1 -0
- package/dist/workflow/lib/activity-outputs.d.ts +14 -0
- package/dist/workflow/lib/activity-outputs.d.ts.map +1 -0
- package/dist/workflow/lib/activity-outputs.js +3 -0
- package/dist/workflow/lib/activity-outputs.js.map +1 -0
- package/dist/workflow/lib/agent-role.d.ts +6 -0
- package/dist/workflow/lib/agent-role.d.ts.map +1 -0
- package/dist/workflow/lib/agent-role.js +41 -0
- package/dist/workflow/lib/agent-role.js.map +1 -0
- package/dist/workflow/lib/artifact-ref.d.ts +21 -0
- package/dist/workflow/lib/artifact-ref.d.ts.map +1 -0
- package/dist/workflow/lib/artifact-ref.js +38 -0
- package/dist/workflow/lib/artifact-ref.js.map +1 -0
- package/dist/workflow/lib/briefcase.d.ts +107 -0
- package/dist/workflow/lib/briefcase.d.ts.map +1 -0
- package/dist/workflow/lib/briefcase.js +62 -0
- package/dist/workflow/lib/briefcase.js.map +1 -0
- package/dist/workflow/lib/canonical-concepts/canonical-concept-registry.d.ts +18 -0
- package/dist/workflow/lib/canonical-concepts/canonical-concept-registry.d.ts.map +1 -0
- package/dist/workflow/lib/canonical-concepts/canonical-concept-registry.js +45 -0
- package/dist/workflow/lib/canonical-concepts/canonical-concept-registry.js.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/change-intent.concepts.d.ts +3 -0
- package/dist/workflow/lib/canonical-concepts/concepts/change-intent.concepts.d.ts.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/change-intent.concepts.js +79 -0
- package/dist/workflow/lib/canonical-concepts/concepts/change-intent.concepts.js.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/concern.concepts.d.ts +3 -0
- package/dist/workflow/lib/canonical-concepts/concepts/concern.concepts.d.ts.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/concern.concepts.js +133 -0
- package/dist/workflow/lib/canonical-concepts/concepts/concern.concepts.js.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/domain.concepts.d.ts +3 -0
- package/dist/workflow/lib/canonical-concepts/concepts/domain.concepts.d.ts.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/domain.concepts.js +116 -0
- package/dist/workflow/lib/canonical-concepts/concepts/domain.concepts.js.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/index.d.ts +8 -0
- package/dist/workflow/lib/canonical-concepts/concepts/index.d.ts.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/index.js +18 -0
- package/dist/workflow/lib/canonical-concepts/concepts/index.js.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/technology.concepts.d.ts +3 -0
- package/dist/workflow/lib/canonical-concepts/concepts/technology.concepts.d.ts.map +1 -0
- package/dist/workflow/lib/canonical-concepts/concepts/technology.concepts.js +462 -0
- package/dist/workflow/lib/canonical-concepts/concepts/technology.concepts.js.map +1 -0
- package/dist/workflow/lib/canonical-concepts/index.d.ts +3 -0
- package/dist/workflow/lib/canonical-concepts/index.d.ts.map +1 -0
- package/dist/workflow/lib/canonical-concepts/index.js +16 -0
- package/dist/workflow/lib/canonical-concepts/index.js.map +1 -0
- package/dist/workflow/lib/catalog-taxonomies.d.ts +41 -0
- package/dist/workflow/lib/catalog-taxonomies.d.ts.map +1 -0
- package/dist/workflow/lib/catalog-taxonomies.js +3475 -0
- package/dist/workflow/lib/catalog-taxonomies.js.map +1 -0
- package/dist/workflow/lib/compiled-run.d.ts +118 -0
- package/dist/workflow/lib/compiled-run.d.ts.map +1 -0
- package/dist/workflow/lib/compiled-run.js +3 -0
- package/dist/workflow/lib/compiled-run.js.map +1 -0
- package/dist/workflow/lib/compiled-working-file.d.ts +11 -0
- package/dist/workflow/lib/compiled-working-file.d.ts.map +1 -0
- package/dist/workflow/lib/compiled-working-file.js +3 -0
- package/dist/workflow/lib/compiled-working-file.js.map +1 -0
- package/dist/workflow/lib/compiled-workspace-manifest.d.ts +101 -0
- package/dist/workflow/lib/compiled-workspace-manifest.d.ts.map +1 -0
- package/dist/workflow/lib/compiled-workspace-manifest.js +3 -0
- package/dist/workflow/lib/compiled-workspace-manifest.js.map +1 -0
- package/dist/workflow/lib/concurrency-group.d.ts +6 -0
- package/dist/workflow/lib/concurrency-group.d.ts.map +1 -0
- package/dist/workflow/lib/concurrency-group.js +3 -0
- package/dist/workflow/lib/concurrency-group.js.map +1 -0
- package/dist/workflow/lib/deliverable-result.d.ts +124 -0
- package/dist/workflow/lib/deliverable-result.d.ts.map +1 -0
- package/dist/workflow/lib/deliverable-result.js +27 -0
- package/dist/workflow/lib/deliverable-result.js.map +1 -0
- package/dist/workflow/lib/domain-tag.d.ts +2 -0
- package/dist/workflow/lib/domain-tag.d.ts.map +1 -0
- package/dist/workflow/lib/domain-tag.js +3 -0
- package/dist/workflow/lib/domain-tag.js.map +1 -0
- package/dist/workflow/lib/enums.d.ts +138 -0
- package/dist/workflow/lib/enums.d.ts.map +1 -0
- package/dist/workflow/lib/enums.js +166 -0
- package/dist/workflow/lib/enums.js.map +1 -0
- package/dist/workflow/lib/errors.d.ts +35 -0
- package/dist/workflow/lib/errors.d.ts.map +1 -0
- package/dist/workflow/lib/errors.js +62 -0
- package/dist/workflow/lib/errors.js.map +1 -0
- package/dist/workflow/lib/job-run.d.ts +32 -0
- package/dist/workflow/lib/job-run.d.ts.map +1 -0
- package/dist/workflow/lib/job-run.js +3 -0
- package/dist/workflow/lib/job-run.js.map +1 -0
- package/dist/workflow/lib/model-ref.d.ts +40 -0
- package/dist/workflow/lib/model-ref.d.ts.map +1 -0
- package/dist/workflow/lib/model-ref.js +34 -0
- package/dist/workflow/lib/model-ref.js.map +1 -0
- package/dist/workflow/lib/mount-plan.d.ts +105 -0
- package/dist/workflow/lib/mount-plan.d.ts.map +1 -0
- package/dist/workflow/lib/mount-plan.js +3 -0
- package/dist/workflow/lib/mount-plan.js.map +1 -0
- package/dist/workflow/lib/phase-report.d.ts +9 -0
- package/dist/workflow/lib/phase-report.d.ts.map +1 -0
- package/dist/workflow/lib/phase-report.js +30 -0
- package/dist/workflow/lib/phase-report.js.map +1 -0
- package/dist/workflow/lib/platform-task-queue.d.ts +17 -0
- package/dist/workflow/lib/platform-task-queue.d.ts.map +1 -0
- package/dist/workflow/lib/platform-task-queue.js +33 -0
- package/dist/workflow/lib/platform-task-queue.js.map +1 -0
- package/dist/workflow/lib/review-subject/index.d.ts +5 -0
- package/dist/workflow/lib/review-subject/index.d.ts.map +1 -0
- package/dist/workflow/lib/review-subject/index.js +8 -0
- package/dist/workflow/lib/review-subject/index.js.map +1 -0
- package/dist/workflow/lib/review-subject/kinds.d.ts +5 -0
- package/dist/workflow/lib/review-subject/kinds.d.ts.map +1 -0
- package/dist/workflow/lib/review-subject/kinds.js +9 -0
- package/dist/workflow/lib/review-subject/kinds.js.map +1 -0
- package/dist/workflow/lib/review-subject/narrow.d.ts +5 -0
- package/dist/workflow/lib/review-subject/narrow.d.ts.map +1 -0
- package/dist/workflow/lib/review-subject/narrow.js +79 -0
- package/dist/workflow/lib/review-subject/narrow.js.map +1 -0
- package/dist/workflow/lib/review-subject/producers/artifact-ref.d.ts +9 -0
- package/dist/workflow/lib/review-subject/producers/artifact-ref.d.ts.map +1 -0
- package/dist/workflow/lib/review-subject/producers/artifact-ref.js +16 -0
- package/dist/workflow/lib/review-subject/producers/artifact-ref.js.map +1 -0
- package/dist/workflow/lib/review-subject/producers/string.d.ts +7 -0
- package/dist/workflow/lib/review-subject/producers/string.d.ts.map +1 -0
- package/dist/workflow/lib/review-subject/producers/string.js +11 -0
- package/dist/workflow/lib/review-subject/producers/string.js.map +1 -0
- package/dist/workflow/lib/role-capability.d.ts +16 -0
- package/dist/workflow/lib/role-capability.d.ts.map +1 -0
- package/dist/workflow/lib/role-capability.js +19 -0
- package/dist/workflow/lib/role-capability.js.map +1 -0
- package/dist/workflow/lib/run-progress.d.ts +100 -0
- package/dist/workflow/lib/run-progress.d.ts.map +1 -0
- package/dist/workflow/lib/run-progress.js +96 -0
- package/dist/workflow/lib/run-progress.js.map +1 -0
- package/dist/workflow/lib/sampling-profiles.d.ts +18 -0
- package/dist/workflow/lib/sampling-profiles.d.ts.map +1 -0
- package/dist/workflow/lib/sampling-profiles.js +56 -0
- package/dist/workflow/lib/sampling-profiles.js.map +1 -0
- package/dist/workflow/lib/snapshot-ref.d.ts +10 -0
- package/dist/workflow/lib/snapshot-ref.d.ts.map +1 -0
- package/dist/workflow/lib/snapshot-ref.js +3 -0
- package/dist/workflow/lib/snapshot-ref.js.map +1 -0
- package/dist/workflow/lib/temporal-namespace.d.ts +5 -0
- package/dist/workflow/lib/temporal-namespace.d.ts.map +1 -0
- package/dist/workflow/lib/temporal-namespace.js +34 -0
- package/dist/workflow/lib/temporal-namespace.js.map +1 -0
- package/dist/workflow/lib/trigger-payload.d.ts +35 -0
- package/dist/workflow/lib/trigger-payload.d.ts.map +1 -0
- package/dist/workflow/lib/trigger-payload.js +3 -0
- package/dist/workflow/lib/trigger-payload.js.map +1 -0
- package/dist/workflow/lib/variable-requirement.d.ts +18 -0
- package/dist/workflow/lib/variable-requirement.d.ts.map +1 -0
- package/dist/workflow/lib/variable-requirement.js +3 -0
- package/dist/workflow/lib/variable-requirement.js.map +1 -0
- package/dist/workflow/lib/work-item-payloads.d.ts +114 -0
- package/dist/workflow/lib/work-item-payloads.d.ts.map +1 -0
- package/dist/workflow/lib/work-item-payloads.js +60 -0
- package/dist/workflow/lib/work-item-payloads.js.map +1 -0
- package/dist/workflow/lib/workflow-stage.d.ts +11 -0
- package/dist/workflow/lib/workflow-stage.d.ts.map +1 -0
- package/dist/workflow/lib/workflow-stage.js +28 -0
- package/dist/workflow/lib/workflow-stage.js.map +1 -0
- package/dist/workflow/lib/workspace-manifest-enums.d.ts +42 -0
- package/dist/workflow/lib/workspace-manifest-enums.d.ts.map +1 -0
- package/dist/workflow/lib/workspace-manifest-enums.js +80 -0
- package/dist/workflow/lib/workspace-manifest-enums.js.map +1 -0
- package/package.json +173 -0
- package/src/agent-composition/index.ts +17 -0
- package/src/agent-composition/lib/capability-layer.ts +46 -0
- package/src/agent-composition/lib/composition-limits-schema.ts +38 -0
- package/src/agent-composition/lib/composition-workspace.ts +210 -0
- package/src/agent-composition/lib/composition.ts +205 -0
- package/src/agent-composition/lib/intrinsic-floor.ts +50 -0
- package/src/agent-composition/lib/model-resolution-matrix.ts +112 -0
- package/src/agent-workspace/index.ts +27 -0
- package/src/agent-workspace/lib/agent-run-context.ts +44 -0
- package/src/agent-workspace/lib/agent-tool-defaults.ts +252 -0
- package/src/agent-workspace/lib/awp-v1.ts +289 -0
- package/src/agent-workspace/lib/context-json.ts +92 -0
- package/src/agent-workspace/lib/deliverable-spec-ref.ts +60 -0
- package/src/agent-workspace/lib/endpoint-fetch-spec.ts +66 -0
- package/src/agent-workspace/lib/manifest.ts +53 -0
- package/src/agent-workspace/lib/mount-apply.ts +79 -0
- package/src/agent-workspace/lib/working-file.ts +173 -0
- package/src/agent-workspace/lib/workspace-layout.ts +106 -0
- package/src/agent-workspace/lib/workspace-spec.ts +212 -0
- package/src/biome/index.ts +10 -0
- package/src/biome/lib/biome-api.ts +33 -0
- package/src/biome/lib/biome-capability-refs.ts +29 -0
- package/src/biome/lib/biome-engines.ts +18 -0
- package/src/biome/lib/biome-lifecycle-hooks.ts +28 -0
- package/src/biome/lib/biome-lifecycle.ts +29 -0
- package/src/biome/lib/biome-manifest.ts +102 -0
- package/src/biome/lib/biome-permissions.ts +35 -0
- package/src/biome/lib/biome-scope.ts +19 -0
- package/src/biome/lib/biome-trust-tier.ts +21 -0
- package/src/biome/lib/trust-tier-policies.ts +99 -0
- package/src/capability/index.ts +8 -0
- package/src/capability/lib/capability-contribution.ts +99 -0
- package/src/capability/lib/capability-grant.ts +90 -0
- package/src/capability/lib/capability-policy.ts +37 -0
- package/src/capability/lib/capability-ref.ts +138 -0
- package/src/capability/lib/errors.ts +180 -0
- package/src/capability/lib/meta-tool.ts +213 -0
- package/src/capability/lib/permission-profile.ts +91 -0
- package/src/capability/lib/shell-command-descriptor.ts +66 -0
- package/src/contribution/index.ts +4 -0
- package/src/contribution/lib/contribution-kind.ts +132 -0
- package/src/contribution/lib/contribution-source.ts +29 -0
- package/src/contribution/lib/contribution.ts +209 -0
- package/src/contribution/lib/registry.ts +100 -0
- package/src/document-templates/index.ts +24 -0
- package/src/document-templates/lib/document-template.ts +88 -0
- package/src/document-templates/lib/index.ts +2 -0
- package/src/document-templates/lib/rendering-shape.ts +48 -0
- package/src/document-themes/index.ts +21 -0
- package/src/document-themes/lib/component-vocabulary.ts +100 -0
- package/src/document-themes/lib/document-theme.ts +110 -0
- package/src/document-themes/lib/index.ts +2 -0
- package/src/entitlement/index.ts +1 -0
- package/src/entitlement/lib/entitlement.ts +142 -0
- package/src/execution-context/index.ts +3 -0
- package/src/execution-context/lib/caller.ts +46 -0
- package/src/execution-context/lib/execution-context.ts +205 -0
- package/src/execution-context/lib/subject.ts +17 -0
- package/src/execution-environment/index.ts +3 -0
- package/src/execution-environment/lib/approval-rule.ts +32 -0
- package/src/execution-environment/lib/built-in-environments.ts +89 -0
- package/src/execution-environment/lib/execution-environment.ts +266 -0
- package/src/kernel-state/index.ts +3 -0
- package/src/kernel-state/lib/adapter-kind.ts +18 -0
- package/src/kernel-state/lib/kernel-state.ts +139 -0
- package/src/kernel-state/lib/key-grammar.ts +105 -0
- package/src/llm-gateway/index.ts +2 -0
- package/src/llm-gateway/lib/caller.ts +48 -0
- package/src/llm-gateway/lib/errors.ts +111 -0
- package/src/mcp-tool/index.ts +6 -0
- package/src/mcp-tool/lib/mcp-protocol.ts +94 -0
- package/src/mcp-tool/lib/mcp-server-config.ts +17 -0
- package/src/mcp-tool/lib/provider-kind.ts +35 -0
- package/src/mcp-tool/lib/resolver-scope.ts +32 -0
- package/src/mcp-tool/lib/tool-provider.ts +62 -0
- package/src/mcp-tool/lib/tool-selection.ts +48 -0
- package/src/object/index.ts +4 -0
- package/src/object/lib/object-lifecycle.ts +22 -0
- package/src/object/lib/xema-object-kind.ts +73 -0
- package/src/object/lib/xema-object-ref.ts +233 -0
- package/src/object/lib/xema-object.ts +81 -0
- package/src/policy/index.ts +3 -0
- package/src/policy/lib/obligations.ts +155 -0
- package/src/policy/lib/policy.ts +104 -0
- package/src/policy/lib/route-hints.ts +51 -0
- package/src/runner/index.ts +11 -0
- package/src/runner/lib/dispatch.ts +61 -0
- package/src/runner/lib/input-hash.ts +66 -0
- package/src/runner/lib/job-token.ts +80 -0
- package/src/runner/lib/runner-attestation.ts +53 -0
- package/src/runner/lib/runner-job.ts +90 -0
- package/src/runner/lib/runner-kind.ts +10 -0
- package/src/runner/lib/runner-mode.ts +16 -0
- package/src/runner/lib/runner-plane.ts +101 -0
- package/src/runner/lib/runner-registration.ts +204 -0
- package/src/runner/lib/runner.ts +103 -0
- package/src/runner/lib/runtime-isolation.ts +53 -0
- package/src/search-source/index.ts +4 -0
- package/src/search-source/lib/indexable-document.ts +70 -0
- package/src/search-source/lib/search-index-event.ts +56 -0
- package/src/search-source/lib/search-replay.ts +96 -0
- package/src/search-source/lib/search-source-descriptor.ts +50 -0
- package/src/service-registry/index.ts +3 -0
- package/src/service-registry/lib/inject-service.ts +25 -0
- package/src/service-registry/lib/service-descriptor.ts +75 -0
- package/src/service-registry/lib/service-registry-client.ts +107 -0
- package/src/skill/index.ts +15 -0
- package/src/skill/lib/skill-enums.ts +124 -0
- package/src/skill/lib/skill-governance.ts +281 -0
- package/src/skill/lib/skill-source.ts +41 -0
- package/src/skill/lib/skill.ts +150 -0
- package/src/space/index.ts +3 -0
- package/src/space/lib/space-ref-parser.ts +198 -0
- package/src/space/lib/space-traversal.ts +55 -0
- package/src/space/lib/space.ts +173 -0
- package/src/subject/index.ts +2 -0
- package/src/subject/lib/subject.ts +111 -0
- package/src/subject/lib/token-class.ts +27 -0
- package/src/workflow/index.ts +45 -0
- package/src/workflow/lib/action-ref.ts +48 -0
- package/src/workflow/lib/activity-outputs.ts +105 -0
- package/src/workflow/lib/agent-role.ts +136 -0
- package/src/workflow/lib/artifact-ref.ts +93 -0
- package/src/workflow/lib/briefcase.ts +194 -0
- package/src/workflow/lib/canonical-concepts/canonical-concept-registry.ts +99 -0
- package/src/workflow/lib/canonical-concepts/concepts/change-intent.concepts.ts +124 -0
- package/src/workflow/lib/canonical-concepts/concepts/concern.concepts.ts +194 -0
- package/src/workflow/lib/canonical-concepts/concepts/domain.concepts.ts +205 -0
- package/src/workflow/lib/canonical-concepts/concepts/index.ts +15 -0
- package/src/workflow/lib/canonical-concepts/concepts/technology.concepts.ts +667 -0
- package/src/workflow/lib/canonical-concepts/index.ts +2 -0
- package/src/workflow/lib/catalog-taxonomies.ts +3695 -0
- package/src/workflow/lib/compiled-run.ts +376 -0
- package/src/workflow/lib/compiled-working-file.ts +35 -0
- package/src/workflow/lib/compiled-workspace-manifest.ts +185 -0
- package/src/workflow/lib/concurrency-group.ts +17 -0
- package/src/workflow/lib/deliverable-result.ts +238 -0
- package/src/workflow/lib/domain-tag.ts +48 -0
- package/src/workflow/lib/enums.ts +288 -0
- package/src/workflow/lib/errors.ts +171 -0
- package/src/workflow/lib/job-run.ts +65 -0
- package/src/workflow/lib/model-ref.ts +118 -0
- package/src/workflow/lib/mount-plan.ts +230 -0
- package/src/workflow/lib/phase-report.ts +67 -0
- package/src/workflow/lib/platform-task-queue.ts +83 -0
- package/src/workflow/lib/review-subject/index.ts +15 -0
- package/src/workflow/lib/review-subject/kinds.ts +31 -0
- package/src/workflow/lib/review-subject/narrow.ts +123 -0
- package/src/workflow/lib/review-subject/producers/artifact-ref.ts +33 -0
- package/src/workflow/lib/review-subject/producers/string.ts +24 -0
- package/src/workflow/lib/role-capability.ts +80 -0
- package/src/workflow/lib/run-progress.ts +254 -0
- package/src/workflow/lib/sampling-profiles.ts +153 -0
- package/src/workflow/lib/snapshot-ref.ts +27 -0
- package/src/workflow/lib/temporal-namespace.ts +78 -0
- package/src/workflow/lib/trigger-payload.ts +69 -0
- package/src/workflow/lib/variable-requirement.ts +66 -0
- package/src/workflow/lib/work-item-payloads.ts +139 -0
- package/src/workflow/lib/workflow-stage.ts +89 -0
- package/src/workflow/lib/workspace-manifest-enums.ts +143 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// ── Agent permission defaults — single source of truth ──
|
|
3
|
+
//
|
|
4
|
+
// OpenCode unified the legacy `tools: { name: boolean }` and `permission:
|
|
5
|
+
// { name: 'allow' | 'ask' | 'deny' }` surfaces into a single `permission`
|
|
6
|
+
// surface (see opencode `packages/opencode/src/config/permission.ts` and
|
|
7
|
+
// the deprecation notice in `packages/opencode/src/config/agent.ts`).
|
|
8
|
+
//
|
|
9
|
+
// Every agent's effective permission map is the union of:
|
|
10
|
+
//
|
|
11
|
+
// 1. SYSTEM_REQUIRED_PERMISSIONS — pinned to `allow`; the manifest
|
|
12
|
+
// cannot deny them. The bare minimum any agent needs to read the
|
|
13
|
+
// workspace, plan its work, and grep through context.
|
|
14
|
+
// 2. SYSTEM_DEFAULT_PERMISSIONS — `allow` unless the manifest
|
|
15
|
+
// explicitly downgrades. Cover edit (which subsumes write/patch in
|
|
16
|
+
// OpenCode), bash, task delegation, and skill invocation.
|
|
17
|
+
// 3. SYSTEM_OPT_IN_PERMISSIONS — `deny` unless the manifest explicitly
|
|
18
|
+
// opts in. Surfaces with cost / network / interactive blast radius
|
|
19
|
+
// (webfetch, websearch, doom_loop) plus the `question` tool (which
|
|
20
|
+
// only works when there's a UI surface to answer).
|
|
21
|
+
//
|
|
22
|
+
// `resolveAgentPermissions` merges a manifest's permission declaration
|
|
23
|
+
// with the three tiers, returning the closed map the agent runtime
|
|
24
|
+
// should expose. `assertNoRequiredPermissionsDenied` is the validator
|
|
25
|
+
// the registry layer runs at write time so a malformed manifest fails
|
|
26
|
+
// fast.
|
|
27
|
+
//
|
|
28
|
+
// This module is the single source of truth — bundle services, render
|
|
29
|
+
// pipelines, and authoring previews all merge through this function.
|
|
30
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Permission keys that take a `Rule` shape — either a scalar action or
|
|
34
|
+
* a per-target map (e.g. `bash: { '*': 'allow', 'rm -rf *': 'deny' }`,
|
|
35
|
+
* `task: { 'html-builder': 'allow' }`, `external_directory: { '/**':
|
|
36
|
+
* 'allow' }`). Mirrors OpenCode's `permission.ts` `InputObject`.
|
|
37
|
+
*/
|
|
38
|
+
const KNOWN_RULE_PERMISSION_KEYS = [
|
|
39
|
+
'read',
|
|
40
|
+
'edit',
|
|
41
|
+
'glob',
|
|
42
|
+
'grep',
|
|
43
|
+
'list',
|
|
44
|
+
'bash',
|
|
45
|
+
'task',
|
|
46
|
+
'external_directory',
|
|
47
|
+
'lsp',
|
|
48
|
+
'skill',
|
|
49
|
+
] as const;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Permission keys that take a scalar `Action` only (no per-target map).
|
|
53
|
+
* Mirrors OpenCode's `permission.ts` `InputObject`.
|
|
54
|
+
*/
|
|
55
|
+
const KNOWN_ACTION_PERMISSION_KEYS = [
|
|
56
|
+
'todowrite',
|
|
57
|
+
'question',
|
|
58
|
+
'webfetch',
|
|
59
|
+
'websearch',
|
|
60
|
+
'doom_loop',
|
|
61
|
+
] as const;
|
|
62
|
+
|
|
63
|
+
export const KNOWN_PERMISSION_KEYS = [
|
|
64
|
+
...KNOWN_RULE_PERMISSION_KEYS,
|
|
65
|
+
...KNOWN_ACTION_PERMISSION_KEYS,
|
|
66
|
+
] as const;
|
|
67
|
+
|
|
68
|
+
export type PermissionKey = (typeof KNOWN_PERMISSION_KEYS)[number];
|
|
69
|
+
|
|
70
|
+
export type PermissionAction = 'allow' | 'ask' | 'deny';
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A permission entry is either a scalar action or a per-target map. The
|
|
74
|
+
* map form is supported only for the keys in `KNOWN_RULE_PERMISSION_KEYS`
|
|
75
|
+
* — the action-only keys reject map shapes at the OpenCode schema layer.
|
|
76
|
+
* Catch-all entries (MCP tool names, biome-emitted globs) live alongside
|
|
77
|
+
* the closed set; their shape is validated by OpenCode at config load.
|
|
78
|
+
*/
|
|
79
|
+
export type PermissionRule = PermissionAction | Readonly<Record<string, PermissionAction>>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Full permission map. Closed-set keys carry typed rules; the index
|
|
83
|
+
* signature accommodates MCP tool names and biome-emitted glob patterns
|
|
84
|
+
* (e.g. `xema_*`, `emit*`) that OpenCode resolves via its catch-all
|
|
85
|
+
* `Schema.Record(Schema.String, Rule)` in `permission.ts`.
|
|
86
|
+
*/
|
|
87
|
+
export type PermissionMap = Readonly<Record<string, PermissionRule>>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Permissions every agent gets — manifests cannot deny them. Removing
|
|
91
|
+
* one here makes the agent unable to perform a fundamental observation
|
|
92
|
+
* / planning operation, so the validator rejects manifests that try.
|
|
93
|
+
*/
|
|
94
|
+
export const SYSTEM_REQUIRED_PERMISSIONS: Readonly<Partial<Record<PermissionKey, PermissionAction>>> = {
|
|
95
|
+
read: 'allow',
|
|
96
|
+
list: 'allow',
|
|
97
|
+
glob: 'allow',
|
|
98
|
+
grep: 'allow',
|
|
99
|
+
todowrite: 'allow',
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Permissions enabled by default. A manifest can downgrade any of these
|
|
104
|
+
* to `ask` or `deny` by setting the matching key. They're "system-
|
|
105
|
+
* suggested defaults", not invariants.
|
|
106
|
+
*/
|
|
107
|
+
export const SYSTEM_DEFAULT_PERMISSIONS: Readonly<Partial<Record<PermissionKey, PermissionAction>>> = {
|
|
108
|
+
edit: 'allow',
|
|
109
|
+
bash: 'allow',
|
|
110
|
+
task: 'allow',
|
|
111
|
+
skill: 'allow',
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Permissions denied by default. A manifest must explicitly set the key
|
|
116
|
+
* to `allow` (or a per-target map) to enable them. These are surfaces
|
|
117
|
+
* with non-trivial blast radius — billing (network calls), interactivity
|
|
118
|
+
* (questions to a UI that may not exist in pipeline runs), filesystem
|
|
119
|
+
* escape (external_directory), unbounded execution (doom_loop), and
|
|
120
|
+
* editor protocol I/O (lsp).
|
|
121
|
+
*/
|
|
122
|
+
export const SYSTEM_OPT_IN_PERMISSIONS: Readonly<Partial<Record<PermissionKey, PermissionAction>>> = {
|
|
123
|
+
question: 'deny',
|
|
124
|
+
webfetch: 'deny',
|
|
125
|
+
websearch: 'deny',
|
|
126
|
+
doom_loop: 'deny',
|
|
127
|
+
external_directory: 'deny',
|
|
128
|
+
lsp: 'deny',
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Manifest-supplied permission declaration. Optional — a manifest with
|
|
133
|
+
* no `permission:` block at all is valid (it just inherits defaults).
|
|
134
|
+
*/
|
|
135
|
+
export interface AgentPermissionDeclaration {
|
|
136
|
+
readonly permission?: PermissionMap;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Resolved permission map the runtime should expose to the agent. Every
|
|
141
|
+
* known closed-set key has an explicit entry; additional catch-all keys
|
|
142
|
+
* (MCP tool names, biome globs) the manifest declared are preserved
|
|
143
|
+
* verbatim.
|
|
144
|
+
*/
|
|
145
|
+
export interface ResolvedAgentPermissions {
|
|
146
|
+
readonly permission: Readonly<Record<string, PermissionRule>>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Merge a manifest's permission declaration with the system tiers.
|
|
151
|
+
*
|
|
152
|
+
* Precedence (highest to lowest):
|
|
153
|
+
* 1. SYSTEM_REQUIRED_PERMISSIONS — always `allow`, override anything below.
|
|
154
|
+
* 2. Manifest declaration — when the manifest names a key, that wins.
|
|
155
|
+
* 3. SYSTEM_DEFAULT_PERMISSIONS / SYSTEM_OPT_IN_PERMISSIONS — fill gaps.
|
|
156
|
+
*
|
|
157
|
+
* `assertNoRequiredPermissionsDenied` should be called separately at
|
|
158
|
+
* registration time — `resolveAgentPermissions` *silently* upgrades
|
|
159
|
+
* denied required keys back to `allow` so a misconfigured manifest still
|
|
160
|
+
* produces a runnable workspace.
|
|
161
|
+
*
|
|
162
|
+
* Catch-all keys the manifest authored (e.g. `xema_*`, MCP tool names)
|
|
163
|
+
* are preserved verbatim — they live alongside the closed set in the
|
|
164
|
+
* resolved map.
|
|
165
|
+
*/
|
|
166
|
+
export function resolveAgentPermissions(
|
|
167
|
+
manifest: AgentPermissionDeclaration | undefined,
|
|
168
|
+
): ResolvedAgentPermissions {
|
|
169
|
+
const out: Record<string, PermissionRule> = {};
|
|
170
|
+
for (const key of KNOWN_PERMISSION_KEYS) {
|
|
171
|
+
out[key] = resolveClosedSetPermission(key, manifest?.permission?.[key]);
|
|
172
|
+
}
|
|
173
|
+
// Layer catch-all entries the manifest declared (MCP tool names,
|
|
174
|
+
// biome glob patterns). Closed-set keys were merged above; required
|
|
175
|
+
// keys are pinned and can't be overridden by a catch-all entry of the
|
|
176
|
+
// same name.
|
|
177
|
+
if (manifest?.permission) {
|
|
178
|
+
for (const [key, value] of Object.entries(manifest.permission)) {
|
|
179
|
+
if (key in SYSTEM_REQUIRED_PERMISSIONS) {continue;}
|
|
180
|
+
if ((KNOWN_PERMISSION_KEYS as readonly string[]).includes(key)) {continue;}
|
|
181
|
+
out[key] = value;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return { permission: out };
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Resolve a single closed-set permission key by walking the three tiers
|
|
189
|
+
* — required → manifest → default → opt-in. Extracted so
|
|
190
|
+
* `resolveAgentPermissions` stays under the cognitive-complexity ceiling.
|
|
191
|
+
*/
|
|
192
|
+
function resolveClosedSetPermission(
|
|
193
|
+
key: PermissionKey,
|
|
194
|
+
fromManifest: PermissionRule | undefined,
|
|
195
|
+
): PermissionRule {
|
|
196
|
+
if (key in SYSTEM_REQUIRED_PERMISSIONS) {
|
|
197
|
+
return SYSTEM_REQUIRED_PERMISSIONS[key]!;
|
|
198
|
+
}
|
|
199
|
+
if (fromManifest !== undefined) {
|
|
200
|
+
return fromManifest;
|
|
201
|
+
}
|
|
202
|
+
if (key in SYSTEM_DEFAULT_PERMISSIONS) {
|
|
203
|
+
return SYSTEM_DEFAULT_PERMISSIONS[key]!;
|
|
204
|
+
}
|
|
205
|
+
return SYSTEM_OPT_IN_PERMISSIONS[key] ?? 'deny';
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Validation guard for the registry layer. Throws when a manifest tries
|
|
210
|
+
* to deny a `SYSTEM_REQUIRED_PERMISSIONS` entry — fail-fast at
|
|
211
|
+
* registration so a misconfigured manifest never reaches the renderer.
|
|
212
|
+
*
|
|
213
|
+
* A Rule-shaped value (per-target map) for a required key counts as
|
|
214
|
+
* denied only when every entry is `deny` — partial denials (e.g.
|
|
215
|
+
* `read: { '/etc/**': 'deny', '*': 'allow' }`) are allowed because the
|
|
216
|
+
* agent retains at least one allow path.
|
|
217
|
+
*/
|
|
218
|
+
export function assertNoRequiredPermissionsDenied(
|
|
219
|
+
declaration: AgentPermissionDeclaration | undefined,
|
|
220
|
+
): void {
|
|
221
|
+
if (!declaration?.permission) {return;}
|
|
222
|
+
const denied: PermissionKey[] = [];
|
|
223
|
+
for (const key of Object.keys(SYSTEM_REQUIRED_PERMISSIONS) as PermissionKey[]) {
|
|
224
|
+
const v = declaration.permission[key];
|
|
225
|
+
if (v === 'deny') {
|
|
226
|
+
denied.push(key);
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
if (v !== undefined && typeof v === 'object') {
|
|
230
|
+
const entries = Object.values(v);
|
|
231
|
+
if (entries.length > 0 && entries.every((a) => a === 'deny')) {
|
|
232
|
+
denied.push(key);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
if (denied.length > 0) {
|
|
237
|
+
throw new AgentPermissionsValidationError(
|
|
238
|
+
`agent manifest denies system-required permission(s) [${denied.join(', ')}]; these must remain 'allow'`,
|
|
239
|
+
denied,
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export class AgentPermissionsValidationError extends Error {
|
|
245
|
+
constructor(
|
|
246
|
+
message: string,
|
|
247
|
+
readonly deniedRequiredPermissions: ReadonlyArray<PermissionKey>,
|
|
248
|
+
) {
|
|
249
|
+
super(message);
|
|
250
|
+
this.name = 'AgentPermissionsValidationError';
|
|
251
|
+
}
|
|
252
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GitPushBranchSuffix,
|
|
3
|
+
GitPushConcurrencyMode,
|
|
4
|
+
SlotMode,
|
|
5
|
+
type WorkspaceSpec,
|
|
6
|
+
} from './workspace-spec';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Canonical AWP v1 spec — the seed every Xema workspace starts from.
|
|
10
|
+
* Biomes may overlay additive slots/sub-slots at platform boot through
|
|
11
|
+
* `WorkspaceSpecRegistry` (Epoch 3+); the base set declared here cannot
|
|
12
|
+
* be dropped or modified.
|
|
13
|
+
*
|
|
14
|
+
* Platform-owned slots — `agents-md`, `context-json`, `agent-bundles`,
|
|
15
|
+
* `skill-bundles`, `instructions` — are populated from platform-rendered
|
|
16
|
+
* sources (llm-registry-api). They land in the same mount-apply pipeline
|
|
17
|
+
* as user-data slots, so every byte under `/workspace/` flows through one
|
|
18
|
+
* typed substrate. `.opencode/opencode.jsonc` and `.opencode/biomes/`
|
|
19
|
+
* remain adapter-generated by `@xemahq/agent-workspace-opencode` and
|
|
20
|
+
* are NOT slots.
|
|
21
|
+
*/
|
|
22
|
+
export const AWP_V1_SPEC: WorkspaceSpec = {
|
|
23
|
+
id: 'awp/v1',
|
|
24
|
+
version: '1.2.0',
|
|
25
|
+
slots: [
|
|
26
|
+
{
|
|
27
|
+
key: 'inputs',
|
|
28
|
+
path: '/workspace/inputs',
|
|
29
|
+
presence: 'always',
|
|
30
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
31
|
+
defaultMode: SlotMode.ReadOnly,
|
|
32
|
+
ownership: 'user',
|
|
33
|
+
humanDescription:
|
|
34
|
+
"Read-only inputs supplied at session/run start (the workflow's `with:` block or the session's customConfig). The DSL input bag lands at `inputs.json`.",
|
|
35
|
+
persistencePolicy: { kind: 'none' },
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
// Scratch / working memory area for the agent. Persisted via tarball
|
|
39
|
+
// so retries can read prior drafts. Never harvested as deliverable
|
|
40
|
+
// output. Never written by the platform.
|
|
41
|
+
key: 'tmp',
|
|
42
|
+
path: '/workspace/tmp',
|
|
43
|
+
presence: 'always',
|
|
44
|
+
allowedModes: [SlotMode.ReadWrite],
|
|
45
|
+
defaultMode: SlotMode.ReadWrite,
|
|
46
|
+
ownership: 'user',
|
|
47
|
+
humanDescription:
|
|
48
|
+
'Your scratch space — drafts, intermediate computation, working notes. Snapshot-persisted so retries see prior state. Never harvested.',
|
|
49
|
+
persistencePolicy: { kind: 'tarball' },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'uploads',
|
|
53
|
+
path: '/workspace/uploads',
|
|
54
|
+
presence: 'optional',
|
|
55
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
56
|
+
defaultMode: SlotMode.ReadOnly,
|
|
57
|
+
ownership: 'user',
|
|
58
|
+
humanDescription:
|
|
59
|
+
'User-uploaded files (briefs, screenshots, sketches). Read-only — never write here.',
|
|
60
|
+
persistencePolicy: { kind: 'tarball' },
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
key: 'references',
|
|
64
|
+
path: '/workspace/references',
|
|
65
|
+
presence: 'optional',
|
|
66
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
67
|
+
defaultMode: SlotMode.ReadOnly,
|
|
68
|
+
ownership: 'user',
|
|
69
|
+
humanDescription:
|
|
70
|
+
'Curated evidence library (knowledge-base spaces, prior artifacts, external project mounts). Read-only.',
|
|
71
|
+
persistencePolicy: { kind: 'none' },
|
|
72
|
+
subSlots: [
|
|
73
|
+
{
|
|
74
|
+
key: 'kb',
|
|
75
|
+
path: '/workspace/references/kb',
|
|
76
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
77
|
+
defaultMode: SlotMode.ReadOnly,
|
|
78
|
+
ownership: 'user',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'external-projects',
|
|
82
|
+
path: '/workspace/references/external-projects',
|
|
83
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
84
|
+
defaultMode: SlotMode.ReadOnly,
|
|
85
|
+
ownership: 'user',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
key: 'deliverable-specs',
|
|
91
|
+
path: '/workspace/deliverable-specs',
|
|
92
|
+
presence: 'optional',
|
|
93
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
94
|
+
defaultMode: SlotMode.ReadOnly,
|
|
95
|
+
ownership: 'user',
|
|
96
|
+
humanDescription:
|
|
97
|
+
'Schemas + metadata for the deliverable spec(s) this run targets. Read-only — consult before writing under deliverables/.',
|
|
98
|
+
persistencePolicy: { kind: 'none' },
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: 'deliverables',
|
|
102
|
+
path: '/workspace/deliverables',
|
|
103
|
+
presence: 'optional',
|
|
104
|
+
allowedModes: [SlotMode.ReadOnly, SlotMode.ReadWrite],
|
|
105
|
+
defaultMode: SlotMode.ReadWrite,
|
|
106
|
+
ownership: 'user',
|
|
107
|
+
humanDescription:
|
|
108
|
+
"Your writable output area. Files written here are harvested by the runtime per the deliverable spec's contract.",
|
|
109
|
+
persistencePolicy: { kind: 'tarball' },
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
// Top-level read-write SCM checkout(s). Defaults to ReadOnly so
|
|
113
|
+
// non-engineering roles get the codebase as reference; the workflow
|
|
114
|
+
// grants ReadWrite explicitly when an engineer-style action needs
|
|
115
|
+
// to author commits.
|
|
116
|
+
key: 'repos',
|
|
117
|
+
path: '/workspace/repos',
|
|
118
|
+
presence: 'optional',
|
|
119
|
+
allowedModes: [SlotMode.ReadOnly, SlotMode.ReadWrite],
|
|
120
|
+
defaultMode: SlotMode.ReadOnly,
|
|
121
|
+
ownership: 'user',
|
|
122
|
+
humanDescription:
|
|
123
|
+
'Project repositories. Read-only unless the workflow explicitly granted write authority (engineer roles only).',
|
|
124
|
+
persistencePolicy: { kind: 'git-push', branchPrefix: 'xema/session/' },
|
|
125
|
+
},
|
|
126
|
+
// ── Platform-rendered slots (composer auto-emits from agent slug) ──
|
|
127
|
+
{
|
|
128
|
+
// `/workspace/AGENTS.md` — root agent definition + rules. Single
|
|
129
|
+
// file, OpenCode-discovered at session start. Renderer in
|
|
130
|
+
// llm-registry-api `agent-run-context/render`.
|
|
131
|
+
key: 'agents-md',
|
|
132
|
+
path: '/workspace/AGENTS.md',
|
|
133
|
+
presence: 'always',
|
|
134
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
135
|
+
defaultMode: SlotMode.ReadOnly,
|
|
136
|
+
singleFile: true,
|
|
137
|
+
ownership: 'platform',
|
|
138
|
+
persistencePolicy: { kind: 'none' },
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
// `/workspace/context.json` — invocation identity + pointers
|
|
142
|
+
// (orgId, projectId, runId/sessionId, role, deliverable spec).
|
|
143
|
+
// Single file, consumed by xema biome tools at runtime.
|
|
144
|
+
key: 'context-json',
|
|
145
|
+
path: '/workspace/context.json',
|
|
146
|
+
presence: 'always',
|
|
147
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
148
|
+
defaultMode: SlotMode.ReadOnly,
|
|
149
|
+
singleFile: true,
|
|
150
|
+
ownership: 'platform',
|
|
151
|
+
persistencePolicy: { kind: 'none' },
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
// `/workspace/.xema/system-overlay.md` — the LLM-readable Xema
|
|
155
|
+
// platform contract for this run (AWP base + deliverable contract +
|
|
156
|
+
// authority + retry). Consumed by the xema biome's
|
|
157
|
+
// `experimental.chat.system.transform` hook, appended to the
|
|
158
|
+
// OpenCode system layer. Hidden from agent tools by the authority
|
|
159
|
+
// guard; agents see its content via the system prompt, not the
|
|
160
|
+
// filesystem.
|
|
161
|
+
key: 'system-overlay',
|
|
162
|
+
path: '/workspace/.xema/system-overlay.md',
|
|
163
|
+
presence: 'always',
|
|
164
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
165
|
+
defaultMode: SlotMode.ReadOnly,
|
|
166
|
+
singleFile: true,
|
|
167
|
+
ownership: 'platform',
|
|
168
|
+
persistencePolicy: { kind: 'none' },
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
// `/workspace/.opencode/agents/` — primary agent + delegated
|
|
172
|
+
// sub-agents. OpenCode discovers <slug>.md files here. Sub-agents
|
|
173
|
+
// share this directory; frontmatter `mode: subagent` differentiates
|
|
174
|
+
// them. https://opencode.ai/docs/agents/
|
|
175
|
+
key: 'agent-bundles',
|
|
176
|
+
path: '/workspace/.opencode/agents',
|
|
177
|
+
presence: 'always',
|
|
178
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
179
|
+
defaultMode: SlotMode.ReadOnly,
|
|
180
|
+
ownership: 'platform',
|
|
181
|
+
persistencePolicy: { kind: 'none' },
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
// `/workspace/.opencode/skills/<key>/SKILL.md` — folder-per-skill
|
|
185
|
+
// layout per OpenCode convention. https://opencode.ai/docs/skills/
|
|
186
|
+
key: 'skill-bundles',
|
|
187
|
+
path: '/workspace/.opencode/skills',
|
|
188
|
+
presence: 'optional',
|
|
189
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
190
|
+
defaultMode: SlotMode.ReadOnly,
|
|
191
|
+
ownership: 'platform',
|
|
192
|
+
persistencePolicy: { kind: 'none' },
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
// `/workspace/.opencode/command/<skill>.md` — one slash-command
|
|
196
|
+
// file per scoped skill, so `/<skill>` works natively in OpenCode.
|
|
197
|
+
// The composer emits these as static-literal entries from the
|
|
198
|
+
// agent's resolved skill set. https://opencode.ai/docs/commands/
|
|
199
|
+
key: 'commands',
|
|
200
|
+
path: '/workspace/.opencode/command',
|
|
201
|
+
presence: 'optional',
|
|
202
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
203
|
+
defaultMode: SlotMode.ReadOnly,
|
|
204
|
+
ownership: 'platform',
|
|
205
|
+
persistencePolicy: { kind: 'none' },
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
// `/workspace/.xema/instructions/` — instruction sections. Auto-
|
|
209
|
+
// discovered by OpenCode via the static `instructions` glob in
|
|
210
|
+
// base `opencode.jsonc`. Lives outside `.opencode/` since
|
|
211
|
+
// OpenCode's `instructions` field accepts arbitrary globs and
|
|
212
|
+
// `.opencode/` is its own namespace.
|
|
213
|
+
key: 'instructions',
|
|
214
|
+
path: '/workspace/.xema/instructions',
|
|
215
|
+
presence: 'optional',
|
|
216
|
+
allowedModes: [SlotMode.ReadOnly],
|
|
217
|
+
defaultMode: SlotMode.ReadOnly,
|
|
218
|
+
ownership: 'platform',
|
|
219
|
+
persistencePolicy: { kind: 'none' },
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Lookup helpers — kept on the spec module so consumers don't reinvent
|
|
226
|
+
* them per-package.
|
|
227
|
+
*/
|
|
228
|
+
export function findSlot(spec: WorkspaceSpec, key: string) {
|
|
229
|
+
return spec.slots.find((s) => s.key === key);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function isKnownSlotKey(spec: WorkspaceSpec, key: string): boolean {
|
|
233
|
+
return spec.slots.some((s) => s.key === key);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function listAlwaysOnSlotKeys(spec: WorkspaceSpec): readonly string[] {
|
|
237
|
+
return spec.slots.filter((s) => s.presence === 'always').map((s) => s.key);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Slots that the snapshot pipeline captures as per-path tarballs in MinIO.
|
|
242
|
+
* Returned as the relPath segment under `/workspace/` (e.g. `'deliverables'`)
|
|
243
|
+
* so callers can pass the list directly as `workspaceInclude=` query
|
|
244
|
+
* params on `GET /session/snapshot`.
|
|
245
|
+
*/
|
|
246
|
+
export function listTarballPersistedRelPaths(spec: WorkspaceSpec): readonly string[] {
|
|
247
|
+
return spec.slots
|
|
248
|
+
.filter((s) => s.persistencePolicy?.kind === 'tarball')
|
|
249
|
+
.map((s) => s.path.replace(/^\/workspace\//, ''));
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Resolved view of a `git-push` slot policy. `branchSuffix` and
|
|
254
|
+
* `concurrencyMode` are always present here (resolved to enum defaults
|
|
255
|
+
* when the policy left them implicit) so downstream callers never have
|
|
256
|
+
* to repeat the default-resolution logic.
|
|
257
|
+
*/
|
|
258
|
+
export interface ResolvedGitPushSlot {
|
|
259
|
+
readonly key: string;
|
|
260
|
+
readonly path: string;
|
|
261
|
+
readonly branchPrefix: string;
|
|
262
|
+
readonly branchSuffix: GitPushBranchSuffix;
|
|
263
|
+
readonly concurrencyMode: GitPushConcurrencyMode;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Slots persisted via `git push` to a branch on the SCM remote. Used by
|
|
268
|
+
* the workspace-proxy `/workspace/repos/*-session-branch` endpoints to
|
|
269
|
+
* know which slots to walk and how to shape the branch name.
|
|
270
|
+
*/
|
|
271
|
+
export function listGitPushPersistedSlots(
|
|
272
|
+
spec: WorkspaceSpec,
|
|
273
|
+
): readonly ResolvedGitPushSlot[] {
|
|
274
|
+
const out: ResolvedGitPushSlot[] = [];
|
|
275
|
+
for (const slot of spec.slots) {
|
|
276
|
+
if (slot.persistencePolicy?.kind === 'git-push') {
|
|
277
|
+
out.push({
|
|
278
|
+
key: slot.key,
|
|
279
|
+
path: slot.path,
|
|
280
|
+
branchPrefix: slot.persistencePolicy.branchPrefix,
|
|
281
|
+
branchSuffix:
|
|
282
|
+
slot.persistencePolicy.branchSuffix ?? GitPushBranchSuffix.SessionId,
|
|
283
|
+
concurrencyMode:
|
|
284
|
+
slot.persistencePolicy.concurrencyMode ?? GitPushConcurrencyMode.Force,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return out;
|
|
289
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// ── /workspace/context.json ──
|
|
3
|
+
//
|
|
4
|
+
// Authored once per session by llm-registry-api's agent-run-context
|
|
5
|
+
// renderer. Read by the opencode-xema-plugin at hook time and by the
|
|
6
|
+
// agent at session start. Its shape is normative: the biome validates
|
|
7
|
+
// it with a Zod schema; validation failure causes the hook to skip.
|
|
8
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
9
|
+
|
|
10
|
+
import type { AgentRunRole, InvocationSurface, WritePolicy } from '../../workflow';
|
|
11
|
+
|
|
12
|
+
import type { WorkingFileBinding } from './working-file';
|
|
13
|
+
|
|
14
|
+
// Re-export so consumers reading `context.json` need only this module.
|
|
15
|
+
export type { WorkingFileBinding };
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Re-exports for downstream consumers — `InvocationRole` is the
|
|
19
|
+
* runtime/agent-side alias for `AgentRunRole`.
|
|
20
|
+
*/
|
|
21
|
+
export type InvocationRole = AgentRunRole;
|
|
22
|
+
export type { InvocationSurface, WritePolicy };
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Per-invocation identity carried inside the `invocation` top-level key.
|
|
26
|
+
*/
|
|
27
|
+
export interface ContextInvocation {
|
|
28
|
+
readonly role: InvocationRole;
|
|
29
|
+
readonly surface: InvocationSurface;
|
|
30
|
+
readonly attempt: number;
|
|
31
|
+
readonly runId: string | null;
|
|
32
|
+
readonly groupKey: string | null;
|
|
33
|
+
readonly sessionId: string | null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* `authority` carries the biome-enforced write capabilities. The xema
|
|
38
|
+
* biome reads these at tool invocation time and rejects any write
|
|
39
|
+
* outside the declared paths / slugs.
|
|
40
|
+
*/
|
|
41
|
+
export interface ContextAuthority {
|
|
42
|
+
/** Absolute paths inside `/workspace/` the agent may write to. */
|
|
43
|
+
readonly mayWriteWorkspace: readonly string[];
|
|
44
|
+
/** Deliverable slugs the agent may create pages under. */
|
|
45
|
+
readonly mayWriteSlugs: readonly string[];
|
|
46
|
+
/** Whether the agent may publish pages into the project KB space. */
|
|
47
|
+
readonly mayWriteKnowledgeBase: boolean;
|
|
48
|
+
/** Whether the agent may edit files under `/workspace/repos/`. */
|
|
49
|
+
readonly mayEditRepos: boolean;
|
|
50
|
+
/** Closed-enum write-policy from the role's capability profile. */
|
|
51
|
+
readonly writePolicy: WritePolicy;
|
|
52
|
+
/**
|
|
53
|
+
* Xema-namespaced tool names this invocation may call. Sourced from
|
|
54
|
+
* the role's `RoleCapabilityProfile` (resolved by llm-registry-api
|
|
55
|
+
* from `biomes/kernel/runtime/role-capabilities/<role>.role-capability.yaml`).
|
|
56
|
+
* The opencode-xema-plugin's `ensureRoleAllowed` check rejects any
|
|
57
|
+
* Xema tool call whose name is not in this list.
|
|
58
|
+
*/
|
|
59
|
+
readonly allowedXemaTools: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ContextProjectIdentity {
|
|
63
|
+
readonly orgId: string;
|
|
64
|
+
readonly projectId: string;
|
|
65
|
+
readonly pipelineBranch: string | null;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Working-file declaration projected onto `context.json` for agent
|
|
70
|
+
* introspection. The opencode-xema biome reads this list at hook time
|
|
71
|
+
* so the agent's tool-call layer can resolve `$XEMA_WORKING_FILE_PATH`
|
|
72
|
+
* back to the declarative source (which `slug`, which `sourceKind`)
|
|
73
|
+
* without re-reading the env. Empty array when the composition declared
|
|
74
|
+
* no working files.
|
|
75
|
+
*/
|
|
76
|
+
export type ContextWorkingFile = WorkingFileBinding;
|
|
77
|
+
|
|
78
|
+
export interface ContextJson {
|
|
79
|
+
readonly invocation: ContextInvocation;
|
|
80
|
+
readonly project: ContextProjectIdentity;
|
|
81
|
+
readonly authority: ContextAuthority;
|
|
82
|
+
readonly resolvedAgentSnapshotHash: string;
|
|
83
|
+
/**
|
|
84
|
+
* Working files materialised by the platform for this session.
|
|
85
|
+
* `authority.mayWriteWorkspace` already narrows write authority to
|
|
86
|
+
* each binding's `path`; this list lets the agent + biome layer see
|
|
87
|
+
* the structured metadata (slug, format, sourceKind) the platform
|
|
88
|
+
* resolved from the composition's declarative `workspace.workingFiles`
|
|
89
|
+
* block.
|
|
90
|
+
*/
|
|
91
|
+
readonly workingFiles: readonly ContextWorkingFile[];
|
|
92
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// ── Deliverable-spec ref parsing ──
|
|
3
|
+
//
|
|
4
|
+
// Workflow YAMLs reference specs by `<slug>[@<version>]` strings
|
|
5
|
+
// (examples: `requirements-standard`, `architecture-standard@1.2.0`).
|
|
6
|
+
// The parser is strict: invalid refs fail at compile time, never at
|
|
7
|
+
// runtime. This is a shared utility so every consumer (compiler,
|
|
8
|
+
// activities, llm-registry-api's renderer) parses refs the same way.
|
|
9
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
10
|
+
|
|
11
|
+
export interface ParsedDeliverableSpecRef {
|
|
12
|
+
readonly slug: string;
|
|
13
|
+
/** `null` means "latest active version"; the spec service resolves it. */
|
|
14
|
+
readonly version: string | null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const SLUG_PATTERN = /^[a-z][a-z0-9-]*(?:\/[a-z][a-z0-9-]*)*$/;
|
|
18
|
+
const SEMVER_PATTERN = /^\d+\.\d+\.\d+$/;
|
|
19
|
+
|
|
20
|
+
export class DeliverableSpecRefError extends Error {
|
|
21
|
+
constructor(message: string) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = 'DeliverableSpecRefError';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Parses a `slug` or `slug@version` string. Throws
|
|
29
|
+
* `DeliverableSpecRefError` when either side fails the format check. The
|
|
30
|
+
* slug allows `category/name` shapes (e.g. `microservice-design/standard`)
|
|
31
|
+
* so we can group specs without a separate Prisma column.
|
|
32
|
+
*/
|
|
33
|
+
export function parseDeliverableSpecRef(raw: string): ParsedDeliverableSpecRef {
|
|
34
|
+
if (typeof raw !== 'string' || raw.length === 0) {
|
|
35
|
+
throw new DeliverableSpecRefError(
|
|
36
|
+
`Deliverable-spec ref must be a non-empty string; got ${JSON.stringify(raw)}.`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
const atIndex = raw.indexOf('@');
|
|
40
|
+
const slug = atIndex === -1 ? raw : raw.slice(0, atIndex);
|
|
41
|
+
const version = atIndex === -1 ? null : raw.slice(atIndex + 1);
|
|
42
|
+
|
|
43
|
+
if (!SLUG_PATTERN.test(slug)) {
|
|
44
|
+
throw new DeliverableSpecRefError(
|
|
45
|
+
`Deliverable-spec slug '${slug}' is not a valid kebab/path slug.`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
if (version !== null && !SEMVER_PATTERN.test(version)) {
|
|
49
|
+
throw new DeliverableSpecRefError(
|
|
50
|
+
`Deliverable-spec version '${version}' must be semver (MAJOR.MINOR.PATCH).`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return { slug, version };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function formatDeliverableSpecRef(
|
|
57
|
+
parsed: ParsedDeliverableSpecRef,
|
|
58
|
+
): string {
|
|
59
|
+
return parsed.version === null ? parsed.slug : `${parsed.slug}@${parsed.version}`;
|
|
60
|
+
}
|