@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,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import {
|
|
3
|
+
ExecutionContextSchema,
|
|
4
|
+
type ExecutionContext,
|
|
5
|
+
} from '../../execution-context';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* CloudEvent type emitted on the dispatch fan-out channel (Phase F.3
|
|
9
|
+
* Push transport). Pull-mode runners receive the same envelope as the
|
|
10
|
+
* body of `POST /runners/<id>/pull-work`.
|
|
11
|
+
*
|
|
12
|
+
* Constant, not enum — there is exactly one dispatch type today.
|
|
13
|
+
* If the wire format ever forks (e.g. a streaming variant), bump the
|
|
14
|
+
* `.v1` suffix and add the new constant alongside.
|
|
15
|
+
*/
|
|
16
|
+
export const RUNNER_DISPATCH_CLOUDEVENT_TYPE = 'xema.runner.dispatch.v1' as const;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* `RunnerDispatch` (Phase F.3) — superset of the legacy
|
|
20
|
+
* `RunnerJobDispatch` shape. This v1 envelope carries the full
|
|
21
|
+
* `ExecutionContext` so the runner can re-validate the policy decision
|
|
22
|
+
* locally before invoking the capability.
|
|
23
|
+
*
|
|
24
|
+
* `tokenJwt` is the compact-JWS form of the RS256 `JobToken` minted by
|
|
25
|
+
* the kernel-server (Phase F.5), aligned with `RunnerJobDispatch.tokenJwt`.
|
|
26
|
+
* The runner MUST verify the signature + claims against the kernel-server
|
|
27
|
+
* JWKS before touching the dispatch.
|
|
28
|
+
*/
|
|
29
|
+
export interface RunnerDispatch {
|
|
30
|
+
jobId: string;
|
|
31
|
+
runnerInstanceId: string;
|
|
32
|
+
capabilityRef: string;
|
|
33
|
+
executionContext: ExecutionContext;
|
|
34
|
+
/**
|
|
35
|
+
* The capability invocation input, carried by value so the runner has the
|
|
36
|
+
* actual arguments to execute with (Phase F.7). The `ExecutionContext`
|
|
37
|
+
* carries only an `inputHash` fingerprint — not the payload — so without
|
|
38
|
+
* this field the runner could verify identity but had nothing to run.
|
|
39
|
+
*
|
|
40
|
+
* Integrity: the kernel-server binds `canonicalCapabilityInputHash(input)`
|
|
41
|
+
* into the `JobToken` as the `ih` claim; the runner recomputes the hash
|
|
42
|
+
* from THIS field and refuses the dispatch if it does not match the signed
|
|
43
|
+
* claim. The input therefore travels unsigned but tamper-evident.
|
|
44
|
+
*/
|
|
45
|
+
input: unknown;
|
|
46
|
+
/**
|
|
47
|
+
* Compact-JWS encoding of the signed `JobToken` minted by the
|
|
48
|
+
* kernel-server. The runner decodes + verifies this against the
|
|
49
|
+
* published JWKS before invoking the capability.
|
|
50
|
+
*/
|
|
51
|
+
tokenJwt: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const RunnerDispatchSchema = z.object({
|
|
55
|
+
jobId: z.string().min(1),
|
|
56
|
+
runnerInstanceId: z.string().min(1),
|
|
57
|
+
capabilityRef: z.string().min(1),
|
|
58
|
+
executionContext: ExecutionContextSchema,
|
|
59
|
+
input: z.unknown(),
|
|
60
|
+
tokenJwt: z.string(),
|
|
61
|
+
}) as z.ZodType<RunnerDispatch>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Deterministic canonical hash of a capability invocation input (plan §6
|
|
5
|
+
* Phase F.7, input-integrity binding).
|
|
6
|
+
*
|
|
7
|
+
* The runner plane separates execution authority: the kernel-server mints
|
|
8
|
+
* the RS256 `JobToken` and the router dispatches the `RunnerDispatch`. Under
|
|
9
|
+
* PUSH at-least-once fan-out the dispatch envelope is broadcast, so the
|
|
10
|
+
* `input` payload travels OUTSIDE the signed token. To keep the input
|
|
11
|
+
* tamper-evident, the kernel-server binds `sha256(canonical(input))` into the
|
|
12
|
+
* token as the `ih` claim and the runner recomputes + compares it against the
|
|
13
|
+
* `input` it received before invoking. A mismatch means the input was altered
|
|
14
|
+
* in transit (or a token was paired with a different input) — the runner
|
|
15
|
+
* refuses the dispatch fail-fast.
|
|
16
|
+
*
|
|
17
|
+
* The hash MUST be computed identically by the producer (router gateway) and
|
|
18
|
+
* the verifier (runner), so the canonicalisation is fully deterministic:
|
|
19
|
+
* - object keys are sorted lexicographically, recursively;
|
|
20
|
+
* - `undefined`-valued object properties are dropped (they are absent on
|
|
21
|
+
* the wire after JSON serialisation anyway);
|
|
22
|
+
* - a top-level `undefined` input is normalised to the empty object `{}`
|
|
23
|
+
* so a no-input capability and an explicit `{}` hash identically;
|
|
24
|
+
* - arrays preserve order;
|
|
25
|
+
* - non-JSON values (`bigint`, `function`, `symbol`, non-finite numbers)
|
|
26
|
+
* are rejected — capability input is JSON, never a host object.
|
|
27
|
+
*/
|
|
28
|
+
export function canonicalCapabilityInputHash(input: unknown): string {
|
|
29
|
+
const canonical = canonicalize(input === undefined ? {} : input);
|
|
30
|
+
return createHash('sha256').update(canonical, 'utf8').digest('hex');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function canonicalize(value: unknown): string {
|
|
34
|
+
if (value === null || value === undefined) {
|
|
35
|
+
// A nested `undefined` only reaches here via an array hole; treat it as
|
|
36
|
+
// `null` to match JSON.stringify's array behaviour.
|
|
37
|
+
return 'null';
|
|
38
|
+
}
|
|
39
|
+
if (Array.isArray(value)) {
|
|
40
|
+
return `[${value.map(canonicalize).join(',')}]`;
|
|
41
|
+
}
|
|
42
|
+
const valueType = typeof value;
|
|
43
|
+
if (valueType === 'number') {
|
|
44
|
+
if (!Number.isFinite(value)) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
'canonicalCapabilityInputHash: non-finite number is not valid JSON capability input.',
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return JSON.stringify(value);
|
|
50
|
+
}
|
|
51
|
+
if (valueType === 'boolean' || valueType === 'string') {
|
|
52
|
+
return JSON.stringify(value);
|
|
53
|
+
}
|
|
54
|
+
if (valueType === 'object') {
|
|
55
|
+
const obj = value as Record<string, unknown>;
|
|
56
|
+
const keys = Object.keys(obj)
|
|
57
|
+
.filter((key) => obj[key] !== undefined)
|
|
58
|
+
.sort();
|
|
59
|
+
return `{${keys
|
|
60
|
+
.map((key) => `${JSON.stringify(key)}:${canonicalize(obj[key])}`)
|
|
61
|
+
.join(',')}}`;
|
|
62
|
+
}
|
|
63
|
+
throw new Error(
|
|
64
|
+
`canonicalCapabilityInputHash: unsupported value type "${valueType}" in capability input.`,
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { RunnerId } from './runner';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Signed job token (plan §6 Phase F.5).
|
|
5
|
+
*
|
|
6
|
+
* Kernel-server mints an RS256 token with a hard ceiling of 60 seconds
|
|
7
|
+
* per invocation. The runner MUST verify signature + scope before
|
|
8
|
+
* executing the dispatch and MUST refuse a token whose claims do not
|
|
9
|
+
* match the accompanying `RunnerJobDispatch`. Replay (same `jti`) MUST
|
|
10
|
+
* be rejected by the runner's local de-dup ring.
|
|
11
|
+
*
|
|
12
|
+
* The token is carried in `RunnerJobDispatch.tokenJwt` as the on-wire
|
|
13
|
+
* JWS form; this interface is its decoded shape.
|
|
14
|
+
*/
|
|
15
|
+
export interface JobToken {
|
|
16
|
+
/**
|
|
17
|
+
* Unique token identifier. Runner de-dup is keyed on this value.
|
|
18
|
+
*/
|
|
19
|
+
jti: string;
|
|
20
|
+
runnerId: RunnerId;
|
|
21
|
+
/**
|
|
22
|
+
* Capability ref this token authorizes (must match
|
|
23
|
+
* `RunnerJobDispatch.capabilityRef` exactly).
|
|
24
|
+
*/
|
|
25
|
+
capabilityRef: string;
|
|
26
|
+
/**
|
|
27
|
+
* Space the invocation runs in (org / project / app SpaceRef
|
|
28
|
+
* canonical form). Carried as a string so this leaf does not depend
|
|
29
|
+
* on `@xemahq/execution-environment-contracts`.
|
|
30
|
+
*/
|
|
31
|
+
spaceRef: string;
|
|
32
|
+
environmentId: string;
|
|
33
|
+
/**
|
|
34
|
+
* Authenticated subject (user / agent / app / service / runner /
|
|
35
|
+
* external-subject) under which the capability is invoked.
|
|
36
|
+
*/
|
|
37
|
+
subjectId: string;
|
|
38
|
+
/**
|
|
39
|
+
* `canonicalCapabilityInputHash` of the dispatched invocation input
|
|
40
|
+
* (Phase F.7). Binds the unsigned `RunnerDispatch.input` to this signed
|
|
41
|
+
* token so the runner can detect input tampering before executing.
|
|
42
|
+
*/
|
|
43
|
+
inputHash: string;
|
|
44
|
+
/**
|
|
45
|
+
* Absolute UTC ISO-8601 timestamps. The kernel-server caps
|
|
46
|
+
* `expiresAt - issuedAt <= 60s`.
|
|
47
|
+
*/
|
|
48
|
+
issuedAt: string;
|
|
49
|
+
expiresAt: string;
|
|
50
|
+
/**
|
|
51
|
+
* Detached RS256 signature in compact-JWS form. Implementations MUST
|
|
52
|
+
* NOT trust the payload until the signature verifies against the
|
|
53
|
+
* kernel-server's published JWKS.
|
|
54
|
+
*/
|
|
55
|
+
signature: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Envelope handed to the runner. Pull-mode runners receive this as the
|
|
60
|
+
* response body of `POST /runners/<id>/pull-work`; Push-mode runners
|
|
61
|
+
* receive this as the payload of the `xema.runner.dispatch.v1`
|
|
62
|
+
* CloudEvent.
|
|
63
|
+
*/
|
|
64
|
+
export interface RunnerJobDispatch {
|
|
65
|
+
jobId: string;
|
|
66
|
+
runnerId: RunnerId;
|
|
67
|
+
capabilityRef: string;
|
|
68
|
+
/**
|
|
69
|
+
* Opaque execution-context handle the runner echoes back on every
|
|
70
|
+
* progress / completion event. Carried as a string for the same
|
|
71
|
+
* reason as `JobToken.spaceRef`.
|
|
72
|
+
*/
|
|
73
|
+
contextId: string;
|
|
74
|
+
input: unknown;
|
|
75
|
+
/**
|
|
76
|
+
* Compact-JWS encoding of the corresponding `JobToken`. The runner
|
|
77
|
+
* decodes + verifies this before touching `input`.
|
|
78
|
+
*/
|
|
79
|
+
tokenJwt: string;
|
|
80
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { RunnerId } from './runner';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CloudEvent type the kernel-server emits when it REJECTS a runner
|
|
5
|
+
* attestation (bad SA-JWT, stale `signedAt`, un-countersigned
|
|
6
|
+
* `allowedEnvironments`, …). Fail-fast — the runner is refused.
|
|
7
|
+
*
|
|
8
|
+
* Constant, not enum — exactly one rejected type today (same convention
|
|
9
|
+
* as `RUNNER_DISPATCH_CLOUDEVENT_TYPE`).
|
|
10
|
+
*/
|
|
11
|
+
export const RUNNER_ATTESTATION_REJECTED_CLOUDEVENT_TYPE =
|
|
12
|
+
'xema.runner.attestation.rejected.v1' as const;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Runner attestation (plan §6 Phase F.4).
|
|
16
|
+
*
|
|
17
|
+
* Carried by a runner on every `register` against the kernel-server.
|
|
18
|
+
* The kernel-server validates:
|
|
19
|
+
* - `identityJwt` is signed by the trusted Keycloak realm and the
|
|
20
|
+
* subject is a service-account claim of kind `runner`.
|
|
21
|
+
* - `allowedEnvironments` is countersigned by an org-admin role
|
|
22
|
+
* (validated via OpenFGA / OPA — see Phase D).
|
|
23
|
+
* - `signedAt` is within the configured attestation freshness window.
|
|
24
|
+
*
|
|
25
|
+
* Any validation failure is fail-fast — the runner is rejected and the
|
|
26
|
+
* kernel-server emits a `runner.attestation.rejected.v1` CloudEvent.
|
|
27
|
+
*/
|
|
28
|
+
export interface RunnerAttestation {
|
|
29
|
+
runnerId: RunnerId;
|
|
30
|
+
/**
|
|
31
|
+
* UTC ISO-8601 timestamp at which the attestation envelope was
|
|
32
|
+
* signed. The kernel-server REJECTS attestations older than the
|
|
33
|
+
* configured freshness window (default 5 minutes).
|
|
34
|
+
*/
|
|
35
|
+
signedAt: string;
|
|
36
|
+
/**
|
|
37
|
+
* Keycloak service-account JWT proving the runner's identity. The
|
|
38
|
+
* kernel-server verifies the signature against the realm's JWKS and
|
|
39
|
+
* extracts the subject claim.
|
|
40
|
+
*/
|
|
41
|
+
identityJwt: string;
|
|
42
|
+
/**
|
|
43
|
+
* IDs of `ExecutionEnvironment`s this runner is permitted to serve.
|
|
44
|
+
* Countersigned by an org-admin role; the kernel-server refuses a
|
|
45
|
+
* runner that claims an environment outside its admin's authority.
|
|
46
|
+
*/
|
|
47
|
+
allowedEnvironments: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Optional data-residency labels (e.g. `eu-west`, `customer-private`)
|
|
50
|
+
* consumed by `Policy.routeHints` for region-aware dispatch.
|
|
51
|
+
*/
|
|
52
|
+
dataResidencyLabels?: string[];
|
|
53
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `RunnerJob` lifecycle state machine (plan §6 Phase F.7).
|
|
5
|
+
*
|
|
6
|
+
* Pending → Dispatched → Accepted → Running → Succeeded (terminal)
|
|
7
|
+
* ↘ Failed (terminal)
|
|
8
|
+
* (any non-terminal state) ──────────────→ Expired (terminal)
|
|
9
|
+
*
|
|
10
|
+
* Owned by `workload-runtime-api`, which mirrors the `WorkloadState`
|
|
11
|
+
* shape: a closed enum plus an `isTerminalRunnerJobState()` helper.
|
|
12
|
+
* Terminal states never transition again — the state machine refuses any
|
|
13
|
+
* outbound edge from them (fail-fast).
|
|
14
|
+
*
|
|
15
|
+
* Closed set; adding a state is a coordinated kernel change.
|
|
16
|
+
*/
|
|
17
|
+
export enum RunnerJobState {
|
|
18
|
+
Pending = 'pending',
|
|
19
|
+
Dispatched = 'dispatched',
|
|
20
|
+
Accepted = 'accepted',
|
|
21
|
+
Running = 'running',
|
|
22
|
+
Succeeded = 'succeeded',
|
|
23
|
+
Failed = 'failed',
|
|
24
|
+
Expired = 'expired',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const RunnerJobStateSchema = z.nativeEnum(RunnerJobState);
|
|
28
|
+
|
|
29
|
+
export const TERMINAL_RUNNER_JOB_STATES: ReadonlySet<RunnerJobState> = new Set([
|
|
30
|
+
RunnerJobState.Succeeded,
|
|
31
|
+
RunnerJobState.Failed,
|
|
32
|
+
RunnerJobState.Expired,
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
export function isTerminalRunnerJobState(state: RunnerJobState): boolean {
|
|
36
|
+
return TERMINAL_RUNNER_JOB_STATES.has(state);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* CloudEvent type emitted by a runner when it ACCEPTS a dispatched job
|
|
41
|
+
* (transition `Dispatched → Accepted`). `workload-runtime` consumes it to
|
|
42
|
+
* advance the `RunnerJob` row.
|
|
43
|
+
*
|
|
44
|
+
* Constant, not enum — exactly one accepted type today. If the wire
|
|
45
|
+
* format forks, bump the `.v1` suffix and add the new constant alongside
|
|
46
|
+
* (same convention as `RUNNER_DISPATCH_CLOUDEVENT_TYPE`).
|
|
47
|
+
*/
|
|
48
|
+
export const RUNNER_JOB_ACCEPTED_CLOUDEVENT_TYPE =
|
|
49
|
+
'xema.runner.job.accepted.v1' as const;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* CloudEvent type emitted by a runner for incremental progress on a
|
|
53
|
+
* running job (`Accepted → Running`, and subsequent heartbeats).
|
|
54
|
+
*/
|
|
55
|
+
export const RUNNER_JOB_PROGRESS_CLOUDEVENT_TYPE =
|
|
56
|
+
'xema.runner.job.progress.v1' as const;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* CloudEvent type emitted by a runner when a job reaches a terminal
|
|
60
|
+
* outcome (`Running → Succeeded | Failed`). Carries the `RunnerJobReport`.
|
|
61
|
+
*/
|
|
62
|
+
export const RUNNER_JOB_COMPLETED_CLOUDEVENT_TYPE =
|
|
63
|
+
'xema.runner.job.completed.v1' as const;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Report-back envelope a runner emits on accept / progress / completion
|
|
67
|
+
* (Phase F.7). `workload-runtime` keys idempotent state transitions on
|
|
68
|
+
* `(jobId, state)`; `output` is present only on a `Succeeded` report and
|
|
69
|
+
* `error` only on a `Failed` report.
|
|
70
|
+
*/
|
|
71
|
+
export interface RunnerJobReport {
|
|
72
|
+
jobId: string;
|
|
73
|
+
runnerId: string;
|
|
74
|
+
state: RunnerJobState;
|
|
75
|
+
/** Capability output, present on a `Succeeded` report. */
|
|
76
|
+
output?: unknown;
|
|
77
|
+
/** Failure detail, present on a `Failed` report. */
|
|
78
|
+
error?: string;
|
|
79
|
+
/** UTC ISO-8601 timestamp at which the runner emitted the report. */
|
|
80
|
+
reportedAt: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const RunnerJobReportSchema = z.object({
|
|
84
|
+
jobId: z.string().min(1),
|
|
85
|
+
runnerId: z.string().min(1),
|
|
86
|
+
state: RunnerJobStateSchema,
|
|
87
|
+
output: z.unknown().optional(),
|
|
88
|
+
error: z.string().optional(),
|
|
89
|
+
reportedAt: z.string().min(1),
|
|
90
|
+
}) as z.ZodType<RunnerJobReport>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export `RunnerKind` + its Zod schema from `@xemahq/policy-contracts`.
|
|
3
|
+
*
|
|
4
|
+
* The closed enum lives in `policy-contracts` because the policy
|
|
5
|
+
* decision layer is its primary author (`PolicyObligation.RequireRunnerKind`
|
|
6
|
+
* and `RouteHint.preferredRunnerKind` both reference it). Runner-side
|
|
7
|
+
* code imports it from here so consumers don't have to remember which
|
|
8
|
+
* leaf owns the canonical declaration.
|
|
9
|
+
*/
|
|
10
|
+
export { RunnerKind, RunnerKindSchema } from '../../policy';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runner transport mode (plan §6 Phase F.3).
|
|
3
|
+
*
|
|
4
|
+
* - `Push` (cluster default) — kernel-server emits
|
|
5
|
+
* `xema.runner.dispatch.v1` CloudEvent; runner consumes via
|
|
6
|
+
* event-hub subscription.
|
|
7
|
+
* - `Pull` (customer-edge default) — runner long-polls
|
|
8
|
+
* `POST /runners/<id>/pull-work`; works through NAT.
|
|
9
|
+
*
|
|
10
|
+
* Closed set. Adding a third transport (e.g. WebSocket) is a kernel
|
|
11
|
+
* change, not a runner config change.
|
|
12
|
+
*/
|
|
13
|
+
export enum RunnerTransportMode {
|
|
14
|
+
Push = 'push',
|
|
15
|
+
Pull = 'pull',
|
|
16
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runner-plane registry conventions (plan §6 Phase F.6).
|
|
3
|
+
*
|
|
4
|
+
* Runners do not have a bespoke registry; they publish ordinary
|
|
5
|
+
* `ServiceDescriptor`s to the Service Registry under ONE well-known
|
|
6
|
+
* name (`RUNNER_PLANE_SERVICE_NAME`) and carry their runner-classifying
|
|
7
|
+
* fields (kind, mode, transport, data-locality, region) as descriptor
|
|
8
|
+
* `labels`. The capability router resolves every instance registered
|
|
9
|
+
* under that name and maps each descriptor to a `RunnerRegistration`
|
|
10
|
+
* via `runnerRegistrationFromDescriptor` (defined in the router, where
|
|
11
|
+
* the `ServiceDescriptor` type is in scope).
|
|
12
|
+
*
|
|
13
|
+
* Keeping the name + label keys here — in the kernel leaf both the
|
|
14
|
+
* runner producers (Phase F.3/F.5) and the router selector consume —
|
|
15
|
+
* guarantees producer/consumer agreement without a second contracts
|
|
16
|
+
* package. Adding/renaming a key is a coordinated kernel change.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Canonical Service Registry `name` every runner registers under. The
|
|
21
|
+
* router resolves this name to enumerate the runner pool.
|
|
22
|
+
*/
|
|
23
|
+
export const RUNNER_PLANE_SERVICE_NAME = 'xema-runner-plane' as const;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Descriptor-`labels` keys a runner MUST advertise so the router can
|
|
27
|
+
* reconstruct its `RunnerRegistration`. Closed set; the mapping in the
|
|
28
|
+
* router fails-fast when a required key is missing or carries a value
|
|
29
|
+
* outside the corresponding closed enum.
|
|
30
|
+
*/
|
|
31
|
+
export enum RunnerPlaneLabelKey {
|
|
32
|
+
/** `RunnerKind` wire value (e.g. `cloud`, `customer-edge`). */
|
|
33
|
+
Kind = 'xema.runner/kind',
|
|
34
|
+
/** `RunnerMode` wire value (`embedded` | `local-module` | `remote`). */
|
|
35
|
+
Mode = 'xema.runner/mode',
|
|
36
|
+
/** `RunnerTransportMode` wire value (`push` | `pull`). */
|
|
37
|
+
Transport = 'xema.runner/transport',
|
|
38
|
+
/** Optional `DataLocality` wire value (`cloud` | `customer-private` | `gpu`). */
|
|
39
|
+
DataLocality = 'xema.runner/data-locality',
|
|
40
|
+
/** Optional `RunnerTrustTier` wire value (`untrusted` | `verified` | `trusted` | `system`). */
|
|
41
|
+
TrustTier = 'xema.runner/trust-tier',
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The reserved `RunnerPlaneLabelKey` values, frozen for membership tests.
|
|
46
|
+
* Free-form runner labels (the {@link WellKnownRunnerLabel} tags and any
|
|
47
|
+
* operator-declared `key=value` pairs) MUST NOT collide with these —
|
|
48
|
+
* they are derived deterministically from typed registration fields, so a
|
|
49
|
+
* free-form label overriding one would let a runner mislabel its own
|
|
50
|
+
* kind/mode/transport. Producers fail-fast on collision.
|
|
51
|
+
*/
|
|
52
|
+
export const RESERVED_RUNNER_PLANE_LABEL_KEYS: ReadonlySet<string> = new Set(
|
|
53
|
+
Object.values(RunnerPlaneLabelKey),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Well-known capability/tag labels a runner advertises in its
|
|
58
|
+
* `RunnerRegistration.labels` (round-tripped onto its descriptor `labels`)
|
|
59
|
+
* so the router can match work by capability tag. These are DISTINCT from
|
|
60
|
+
* {@link RunnerPlaneLabelKey}: those reserved keys carry the runner's typed
|
|
61
|
+
* classifying dimensions (kind/mode/transport/locality/trust); these tags
|
|
62
|
+
* advertise discrete capabilities a runner does or does not have.
|
|
63
|
+
*
|
|
64
|
+
* Tag semantics are presence-style: a tag is "advertised" when the label
|
|
65
|
+
* map carries `key === RUNNER_LABEL_PRESENT`. The overall label space is
|
|
66
|
+
* OPEN — operators may add arbitrary `key=value` labels (e.g.
|
|
67
|
+
* `region=eu-west`) via config — but these are the kernel-known tags the
|
|
68
|
+
* default local runner and the scheduler agree on by name.
|
|
69
|
+
*/
|
|
70
|
+
export enum WellKnownRunnerLabel {
|
|
71
|
+
/** General-purpose default runner; eligible for unpinned work. */
|
|
72
|
+
Default = 'xema.runner/default',
|
|
73
|
+
/** Executes in-process / on the local host (dev + edge default). */
|
|
74
|
+
Local = 'xema.runner/local',
|
|
75
|
+
/** A Node.js runtime is available on the runner. */
|
|
76
|
+
Node = 'xema.runner/node',
|
|
77
|
+
/** A reachable Docker daemon is available on the runner. */
|
|
78
|
+
Docker = 'xema.runner/docker',
|
|
79
|
+
/** A GPU is available on the runner. */
|
|
80
|
+
Gpu = 'xema.runner/gpu',
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Canonical value marking a presence-style runner tag as advertised. */
|
|
84
|
+
export const RUNNER_LABEL_PRESENT = 'true' as const;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The intrinsic tag set an in-process local-module runner (biome-host's
|
|
88
|
+
* supervisor) ALWAYS advertises. Each is deterministically true for a
|
|
89
|
+
* Node.js process running locally, so advertising them is never a false
|
|
90
|
+
* claim. Capability tags that depend on host provisioning the process
|
|
91
|
+
* cannot verify in-band — `docker`, `gpu` — are deliberately EXCLUDED;
|
|
92
|
+
* those are opt-in via operator-declared labels so the runner never
|
|
93
|
+
* advertises a capability it cannot honour (no silent over-claim).
|
|
94
|
+
*/
|
|
95
|
+
export function localModuleRunnerBaseLabels(): Record<string, string> {
|
|
96
|
+
return {
|
|
97
|
+
[WellKnownRunnerLabel.Default]: RUNNER_LABEL_PRESENT,
|
|
98
|
+
[WellKnownRunnerLabel.Local]: RUNNER_LABEL_PRESENT,
|
|
99
|
+
[WellKnownRunnerLabel.Node]: RUNNER_LABEL_PRESENT,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RunnerKind, RunnerKindSchema } from '../../policy';
|
|
3
|
+
|
|
4
|
+
import { RunnerTransportMode } from './runner-mode';
|
|
5
|
+
import { RunnerTrustTier } from './runner';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* High-level execution mode a runner declares at registration time
|
|
9
|
+
* (plan §6 Phase F, north-star §3 "three biome execution modes").
|
|
10
|
+
*
|
|
11
|
+
* This is the *biome execution mode* (where the biome physically runs)
|
|
12
|
+
* — DISTINCT from `RunnerTransportMode` (push vs pull, how the runner
|
|
13
|
+
* receives work) and from `RunnerKind` (the closed runner-classifier
|
|
14
|
+
* set that policy `routeHints.preferredRunnerKind` consults).
|
|
15
|
+
*
|
|
16
|
+
* Closed set; adding a fourth mode is a kernel change.
|
|
17
|
+
*/
|
|
18
|
+
export enum RunnerMode {
|
|
19
|
+
/**
|
|
20
|
+
* Runs inside `xema-kernel-server` itself — Phase F.1. The kernel
|
|
21
|
+
* registers a synthetic runner descriptor under this mode so the
|
|
22
|
+
* dispatcher sees embedded biomes as ordinary registry entries.
|
|
23
|
+
*/
|
|
24
|
+
Embedded = 'embedded',
|
|
25
|
+
/**
|
|
26
|
+
* Sidecar process supervised by `biome-host-api`'s local-module
|
|
27
|
+
* supervisor — Phase F.2. The default for dev + first-party.
|
|
28
|
+
*/
|
|
29
|
+
LocalModule = 'local-module',
|
|
30
|
+
/**
|
|
31
|
+
* Out-of-cluster runner reachable via event-hub Push or long-poll
|
|
32
|
+
* Pull — Phase F.3.
|
|
33
|
+
*/
|
|
34
|
+
Remote = 'remote',
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const RunnerModeSchema = z.nativeEnum(RunnerMode);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Coarse data-locality classifier carried on a runner registration so
|
|
41
|
+
* `Policy.routeHints` + the runner selector can refuse cloud fallback
|
|
42
|
+
* when an environment hard-pins customer-private execution.
|
|
43
|
+
*
|
|
44
|
+
* Closed set on purpose — anything finer-grained belongs on
|
|
45
|
+
* `RunnerRegistration.labels` (e.g. `region=eu-west`,
|
|
46
|
+
* `tenant=acme-finance`).
|
|
47
|
+
*/
|
|
48
|
+
export enum DataLocality {
|
|
49
|
+
Cloud = 'cloud',
|
|
50
|
+
CustomerPrivate = 'customer-private',
|
|
51
|
+
Gpu = 'gpu',
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const DataLocalitySchema = z.nativeEnum(DataLocality);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Embedded biome registration — Phase F.1.
|
|
58
|
+
*
|
|
59
|
+
* Lives on a `RunnerRegistration` whose `mode === RunnerMode.Embedded`.
|
|
60
|
+
* The `xema-kernel-server` enumerates its built-in biomes (concept
|
|
61
|
+
* registry, shell built-ins, XVFS resolver) as a closed list at boot
|
|
62
|
+
* and surfaces them through this shape so downstream services can
|
|
63
|
+
* resolve `capabilityRef -> embedded biome`.
|
|
64
|
+
*/
|
|
65
|
+
export interface EmbeddedBiomeRegistration {
|
|
66
|
+
/**
|
|
67
|
+
* Stable biome identifier (`concept-registry`, `xema-shell-builtins`,
|
|
68
|
+
* `xvfs-resolver`, ...). Treated opaque by the kernel; the embedded
|
|
69
|
+
* biome owner picks the slug.
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
72
|
+
version: string;
|
|
73
|
+
/**
|
|
74
|
+
* Capabilities this embedded biome exposes — same `<resource>:<verb>@<n>`
|
|
75
|
+
* grammar consumed by `xema-capability-router`.
|
|
76
|
+
*/
|
|
77
|
+
capabilityRefs: string[];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const EmbeddedBiomeRegistrationSchema = z.object({
|
|
81
|
+
id: z.string().min(1),
|
|
82
|
+
version: z.string().min(1),
|
|
83
|
+
capabilityRefs: z.array(z.string().min(1)),
|
|
84
|
+
}) as z.ZodType<EmbeddedBiomeRegistration>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Provisioning entry for a single biome served by a runner. Discriminated
|
|
88
|
+
* by `mode` so consumers narrow once and read the only fields valid for
|
|
89
|
+
* that mode. The three variants align 1:1 with `RunnerMode`.
|
|
90
|
+
*/
|
|
91
|
+
export type BiomeProvisioning =
|
|
92
|
+
| EmbeddedBiomeProvisioning
|
|
93
|
+
| LocalModuleBiomeProvisioning
|
|
94
|
+
| RemoteBiomeProvisioning;
|
|
95
|
+
|
|
96
|
+
export interface EmbeddedBiomeProvisioning {
|
|
97
|
+
mode: RunnerMode.Embedded;
|
|
98
|
+
embedded: EmbeddedBiomeRegistration;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface LocalModuleBiomeProvisioning {
|
|
102
|
+
mode: RunnerMode.LocalModule;
|
|
103
|
+
/** Slug of the local-module supervisor entry that owns the sidecar. */
|
|
104
|
+
moduleId: string;
|
|
105
|
+
version: string;
|
|
106
|
+
capabilityRefs: string[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface RemoteBiomeProvisioning {
|
|
110
|
+
mode: RunnerMode.Remote;
|
|
111
|
+
/** Remote biome image + version (opaque to the kernel). */
|
|
112
|
+
imageRef: string;
|
|
113
|
+
version: string;
|
|
114
|
+
capabilityRefs: string[];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export const BiomeProvisioningSchema = z.discriminatedUnion('mode', [
|
|
118
|
+
z.object({
|
|
119
|
+
mode: z.literal(RunnerMode.Embedded),
|
|
120
|
+
embedded: EmbeddedBiomeRegistrationSchema,
|
|
121
|
+
}),
|
|
122
|
+
z.object({
|
|
123
|
+
mode: z.literal(RunnerMode.LocalModule),
|
|
124
|
+
moduleId: z.string().min(1),
|
|
125
|
+
version: z.string().min(1),
|
|
126
|
+
capabilityRefs: z.array(z.string().min(1)),
|
|
127
|
+
}),
|
|
128
|
+
z.object({
|
|
129
|
+
mode: z.literal(RunnerMode.Remote),
|
|
130
|
+
imageRef: z.string().min(1),
|
|
131
|
+
version: z.string().min(1),
|
|
132
|
+
capabilityRefs: z.array(z.string().min(1)),
|
|
133
|
+
}),
|
|
134
|
+
]) as z.ZodType<BiomeProvisioning>;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Healthcheck declaration a runner publishes alongside its registration.
|
|
138
|
+
* Carried as data (not a callable) so it survives the wire trip and so
|
|
139
|
+
* the kernel-server can decide policy (e.g. how often to probe).
|
|
140
|
+
*/
|
|
141
|
+
export interface RunnerHealthcheck {
|
|
142
|
+
/** HTTP path probed by the kernel-server (e.g. `/health/ready`). */
|
|
143
|
+
path: string;
|
|
144
|
+
/** Probe interval in seconds. */
|
|
145
|
+
intervalSeconds: number;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export const RunnerHealthcheckSchema = z.object({
|
|
149
|
+
path: z.string().min(1),
|
|
150
|
+
intervalSeconds: z.number().int().positive(),
|
|
151
|
+
}) as z.ZodType<RunnerHealthcheck>;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Top-level registration a runner publishes to the Service Registry at
|
|
155
|
+
* boot (Phase F.3). One row per runner instance; biomes hang underneath.
|
|
156
|
+
*
|
|
157
|
+
* Carry-forwards (Phase F.4/F.5):
|
|
158
|
+
* - Keycloak service-account JWT validation
|
|
159
|
+
* - Org-admin-countersigned `allowedEnvironments`
|
|
160
|
+
* - RS256 signed job tokens with ≤60s TTL
|
|
161
|
+
*/
|
|
162
|
+
export interface RunnerRegistration {
|
|
163
|
+
instanceId: string;
|
|
164
|
+
mode: RunnerMode;
|
|
165
|
+
kind: RunnerKind;
|
|
166
|
+
labels: Record<string, string>;
|
|
167
|
+
region?: string;
|
|
168
|
+
/**
|
|
169
|
+
* IDs of `ExecutionEnvironment`s this runner is permitted to serve.
|
|
170
|
+
* Phase F.4 will countersign this list via the Keycloak service
|
|
171
|
+
* account; until then the runner is trusted to declare its own set.
|
|
172
|
+
*/
|
|
173
|
+
allowedEnvironments?: string[];
|
|
174
|
+
/**
|
|
175
|
+
* Coarse data-locality classifier consumed by the runner selector
|
|
176
|
+
* + policy. Free-form labels go in `labels`.
|
|
177
|
+
*/
|
|
178
|
+
dataLocality?: DataLocality;
|
|
179
|
+
/**
|
|
180
|
+
* Trust tier assigned at attestation time (Phase F.4). Absent until
|
|
181
|
+
* the kernel-server attests the runner; the policy bundle MAY gate
|
|
182
|
+
* sensitive capabilities to `Trusted`/`System` tiers only.
|
|
183
|
+
*/
|
|
184
|
+
trustTier?: RunnerTrustTier;
|
|
185
|
+
/** Biomes served by this runner. */
|
|
186
|
+
biomes: BiomeProvisioning[];
|
|
187
|
+
healthcheck: RunnerHealthcheck;
|
|
188
|
+
/** Transport mode this runner uses to receive dispatched work. */
|
|
189
|
+
transport: RunnerTransportMode;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export const RunnerRegistrationSchema = z.object({
|
|
193
|
+
instanceId: z.string().min(1),
|
|
194
|
+
mode: RunnerModeSchema,
|
|
195
|
+
kind: RunnerKindSchema,
|
|
196
|
+
labels: z.record(z.string().min(1), z.string()),
|
|
197
|
+
region: z.string().min(1).optional(),
|
|
198
|
+
allowedEnvironments: z.array(z.string().min(1)).optional(),
|
|
199
|
+
dataLocality: DataLocalitySchema.optional(),
|
|
200
|
+
trustTier: z.nativeEnum(RunnerTrustTier).optional(),
|
|
201
|
+
biomes: z.array(BiomeProvisioningSchema),
|
|
202
|
+
healthcheck: RunnerHealthcheckSchema,
|
|
203
|
+
transport: z.nativeEnum(RunnerTransportMode),
|
|
204
|
+
}) as z.ZodType<RunnerRegistration>;
|