@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,153 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// -- Sampling Profiles — Semantic Task-Type Classification --
|
|
3
|
+
//
|
|
4
|
+
// Defines semantic task-type profiles that classify WHAT an agent does.
|
|
5
|
+
// These profiles are used for:
|
|
6
|
+
// 1. Documentation — communicate intent to human readers
|
|
7
|
+
// 2. LLM Registry model strategy — the registry can map profile → model tier
|
|
8
|
+
//
|
|
9
|
+
// IMPORTANT: For OpenCode SDK mode, temperature/sampling is handled by
|
|
10
|
+
// OpenCode itself via its ProviderTransform (model-specific defaults) and
|
|
11
|
+
// agent config (temperature field in .md frontmatter / opencode.jsonc).
|
|
12
|
+
//
|
|
13
|
+
// OpenCode's built-in model-specific defaults (from ProviderTransform):
|
|
14
|
+
// - Qwen: temperature=0.55, topP=1
|
|
15
|
+
// - Gemini: temperature=1.0, topP=0.95, topK=64
|
|
16
|
+
// - Claude: undefined (uses agent config if set, else provider default)
|
|
17
|
+
// - Kimi K2 (thinking): temperature=1.0, topP=0.95
|
|
18
|
+
//
|
|
19
|
+
// We only set explicit temperature in agent configs for deterministic agents
|
|
20
|
+
// (temperature=0.0) where we want zero randomness regardless of model.
|
|
21
|
+
// For all other agents, we omit temperature and let OpenCode choose based
|
|
22
|
+
// on the model's ProviderTransform.
|
|
23
|
+
// =============================================================================
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Semantic sampling profiles — describe WHAT the agent does, not HOW the model
|
|
27
|
+
* should behave. Used for documentation and LLM Registry model strategy mapping.
|
|
28
|
+
*
|
|
29
|
+
* All pipeline agents run through the OpenCode SDK. OpenCode's ProviderTransform
|
|
30
|
+
* handles model-specific sampling parameters (temperature, topP, topK) automatically.
|
|
31
|
+
* We only set temperature=0.0 in agent configs for deterministic agents.
|
|
32
|
+
*/
|
|
33
|
+
export enum SamplingProfile {
|
|
34
|
+
/**
|
|
35
|
+
* Classification, routing, merge validation, yes/no decisions.
|
|
36
|
+
* Maximum reproducibility — single correct answer expected.
|
|
37
|
+
* Agent config: temperature=0.0 (explicit override).
|
|
38
|
+
*/
|
|
39
|
+
Deterministic = 'deterministic',
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Code generation, structured JSON output, data transformations, backlog creation.
|
|
43
|
+
* Near-deterministic with a tiny margin to avoid degenerate repetition loops.
|
|
44
|
+
* Agent config: no temperature set — OpenCode's model-specific default applies.
|
|
45
|
+
*/
|
|
46
|
+
Precise = 'precise',
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Analysis, reasoning, planning, requirements elicitation, design decisions.
|
|
50
|
+
* Enough randomness for nuanced reasoning and varied phrasing.
|
|
51
|
+
* Agent config: no temperature set — OpenCode's model-specific default applies.
|
|
52
|
+
*/
|
|
53
|
+
Analytical = 'analytical',
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Design System Builder, document drafting, creative writing, prompt enrichment.
|
|
57
|
+
* High diversity, reduced repetition for longer outputs.
|
|
58
|
+
* Agent config: no temperature set — OpenCode's model-specific default applies.
|
|
59
|
+
*/
|
|
60
|
+
Creative = 'creative',
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sampling parameters that can be sent to an LLM provider.
|
|
65
|
+
* All fields are optional — providers ignore unsupported params.
|
|
66
|
+
*/
|
|
67
|
+
export interface SamplingParams {
|
|
68
|
+
/** Controls randomness. Range depends on provider (0–1 for Anthropic, 0–2 for others). */
|
|
69
|
+
temperature: number;
|
|
70
|
+
|
|
71
|
+
/** Nucleus sampling — cumulative probability threshold. Universal. */
|
|
72
|
+
topP?: number;
|
|
73
|
+
|
|
74
|
+
/** Limits token candidates. Not supported by OpenAI. */
|
|
75
|
+
topK?: number;
|
|
76
|
+
|
|
77
|
+
/** Penalizes tokens already in the output. OpenAI, Google, Qwen only. */
|
|
78
|
+
presencePenalty?: number;
|
|
79
|
+
|
|
80
|
+
/** Penalizes based on token frequency. OpenAI, Google, Qwen only. */
|
|
81
|
+
frequencyPenalty?: number;
|
|
82
|
+
|
|
83
|
+
/** Multiplicative repetition penalty. Qwen and open-source only (mutually exclusive with presence/frequency penalties). */
|
|
84
|
+
repetitionPenalty?: number;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Reference parameters per profile.
|
|
89
|
+
*
|
|
90
|
+
* In OpenCode SDK mode (all current agents), these are NOT used at runtime —
|
|
91
|
+
* OpenCode's ProviderTransform handles model-specific tuning automatically.
|
|
92
|
+
* These serve as documentation and as a reference for the LLM Registry
|
|
93
|
+
* when configuring model strategy entries.
|
|
94
|
+
*/
|
|
95
|
+
export const SAMPLING_PROFILE_DEFAULTS: Record<SamplingProfile, SamplingParams> = {
|
|
96
|
+
[SamplingProfile.Deterministic]: {
|
|
97
|
+
temperature: 0.0,
|
|
98
|
+
topP: 0.95,
|
|
99
|
+
},
|
|
100
|
+
[SamplingProfile.Precise]: {
|
|
101
|
+
temperature: 0.15,
|
|
102
|
+
topP: 0.95,
|
|
103
|
+
},
|
|
104
|
+
[SamplingProfile.Analytical]: {
|
|
105
|
+
temperature: 0.6,
|
|
106
|
+
topP: 0.95,
|
|
107
|
+
},
|
|
108
|
+
[SamplingProfile.Creative]: {
|
|
109
|
+
temperature: 0.85,
|
|
110
|
+
topP: 0.95,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Resolve sampling parameters for a given profile.
|
|
116
|
+
*
|
|
117
|
+
* Priority: registryOverride > profile defaults
|
|
118
|
+
*
|
|
119
|
+
* @param profile - The semantic sampling profile
|
|
120
|
+
* @param registryOverride - Optional per-model override from the LLM Registry
|
|
121
|
+
* @returns Merged sampling parameters
|
|
122
|
+
*/
|
|
123
|
+
export function resolveSamplingParams(
|
|
124
|
+
profile: SamplingProfile,
|
|
125
|
+
registryOverride?: Partial<SamplingParams>,
|
|
126
|
+
): SamplingParams {
|
|
127
|
+
const defaults = SAMPLING_PROFILE_DEFAULTS[profile];
|
|
128
|
+
if (!registryOverride) return { ...defaults };
|
|
129
|
+
|
|
130
|
+
const merged: SamplingParams = {
|
|
131
|
+
temperature: registryOverride.temperature ?? defaults.temperature,
|
|
132
|
+
};
|
|
133
|
+
const topP = registryOverride.topP ?? defaults.topP;
|
|
134
|
+
if (topP !== undefined) merged.topP = topP;
|
|
135
|
+
if (registryOverride.topK !== undefined) merged.topK = registryOverride.topK;
|
|
136
|
+
if (registryOverride.presencePenalty !== undefined) merged.presencePenalty = registryOverride.presencePenalty;
|
|
137
|
+
if (registryOverride.frequencyPenalty !== undefined) merged.frequencyPenalty = registryOverride.frequencyPenalty;
|
|
138
|
+
if (registryOverride.repetitionPenalty !== undefined) merged.repetitionPenalty = registryOverride.repetitionPenalty;
|
|
139
|
+
return merged;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Extract temperature from a profile.
|
|
144
|
+
*
|
|
145
|
+
* Only returns a value for Deterministic (0.0) since that's the only
|
|
146
|
+
* profile where we explicitly override the model default. For all other
|
|
147
|
+
* profiles, returns undefined to let the runtime adapter's
|
|
148
|
+
* provider-specific defaults apply.
|
|
149
|
+
*/
|
|
150
|
+
export function profileTemperature(profile: SamplingProfile): number | undefined {
|
|
151
|
+
if (profile === SamplingProfile.Deterministic) return 0.0;
|
|
152
|
+
return undefined;
|
|
153
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SnapshotStoreKind } from './enums';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A pointer to an immutable blob in a snapshot store. The (store, uri, sha256)
|
|
5
|
+
* triple is content-addressed: given the same workflow+inputs the compiler
|
|
6
|
+
* always produces the same sha256, and readers never need to trust the
|
|
7
|
+
* engine's DB for content integrity.
|
|
8
|
+
*
|
|
9
|
+
* Used as Temporal workflow input in place of the CompiledRun blob itself —
|
|
10
|
+
* Temporal payload limits (2MB) make inline transport unsafe for realistic
|
|
11
|
+
* compiled runs. A custom PayloadCodec on the Temporal Client transparently
|
|
12
|
+
* spills large payloads to the snapshot store and reads them back as needed.
|
|
13
|
+
*/
|
|
14
|
+
export interface SnapshotRef {
|
|
15
|
+
/** Backing store. Enum to keep the set closed. */
|
|
16
|
+
readonly store: SnapshotStoreKind;
|
|
17
|
+
/** Opaque URI the store understands. No parsing by consumers. */
|
|
18
|
+
readonly uri: string;
|
|
19
|
+
/** Lowercase hex sha256 of the blob. Used for integrity + LRU cache keys. */
|
|
20
|
+
readonly sha256: string;
|
|
21
|
+
/** Blob size in bytes. Present for observability; NOT a truncation hint. */
|
|
22
|
+
readonly sizeBytes: number;
|
|
23
|
+
/** Media type of the blob (e.g. `application/json`). */
|
|
24
|
+
readonly contentType: string;
|
|
25
|
+
/** ISO-8601 UTC timestamp the snapshot was written. */
|
|
26
|
+
readonly createdAt: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporal namespace naming + system-vs-org classification.
|
|
3
|
+
*
|
|
4
|
+
* Per-organization Temporal namespaces are the tenant-isolation boundary
|
|
5
|
+
* for workflow execution: each org's workflow state, history, signals,
|
|
6
|
+
* queries, and visibility live inside `xema-org-<orgId>`. System-level
|
|
7
|
+
* workflows (cluster-wide tools like retention sweepers) live in the
|
|
8
|
+
* platform namespace `xema`.
|
|
9
|
+
*
|
|
10
|
+
* The mapping is deterministic so every caller (engine dispatch,
|
|
11
|
+
* worker polling, frontend deep links, schedule reconciler) derives
|
|
12
|
+
* the same name from the same org id without coordination.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Platform namespace — system workflows owned by the cluster, not
|
|
17
|
+
* attributable to any single tenant org. The pre-existing single
|
|
18
|
+
* namespace this codebase was using; it now hosts only platform code.
|
|
19
|
+
*/
|
|
20
|
+
export const PLATFORM_TEMPORAL_NAMESPACE = 'xema';
|
|
21
|
+
|
|
22
|
+
const ORG_NAMESPACE_PREFIX = 'xema-org-';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the Temporal namespace name for a given org id.
|
|
26
|
+
*
|
|
27
|
+
* `orgId === null` is the explicit signal for "system / platform run"
|
|
28
|
+
* (cluster sweepers, etc.). Callers that pass null are declaring the
|
|
29
|
+
* workflow has no tenant.
|
|
30
|
+
*
|
|
31
|
+
* Empty-string orgId is rejected fail-fast — it would silently collapse
|
|
32
|
+
* to the prefix-only namespace `xema-org-`, which Temporal would accept
|
|
33
|
+
* but which would give every caller-with-empty-orgId access to one
|
|
34
|
+
* shared "ghost" namespace.
|
|
35
|
+
*/
|
|
36
|
+
export function temporalNamespaceForOrg(orgId: string | null): string {
|
|
37
|
+
if (orgId === null) {
|
|
38
|
+
return PLATFORM_TEMPORAL_NAMESPACE;
|
|
39
|
+
}
|
|
40
|
+
if (orgId.length === 0) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
'temporalNamespaceForOrg called with empty orgId — pass null for ' +
|
|
43
|
+
'system runs, a non-empty orgId for tenant runs.',
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return `${ORG_NAMESPACE_PREFIX}${orgId}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Inverse of `temporalNamespaceForOrg` — extract the orgId from a
|
|
51
|
+
* Temporal namespace name. Returns null for the platform namespace.
|
|
52
|
+
*
|
|
53
|
+
* Used by reconcile / discovery loops that read the active set of
|
|
54
|
+
* namespaces from Temporal and need to map back to org context.
|
|
55
|
+
*/
|
|
56
|
+
export function orgIdFromTemporalNamespace(namespace: string): string | null {
|
|
57
|
+
if (namespace === PLATFORM_TEMPORAL_NAMESPACE) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
if (!namespace.startsWith(ORG_NAMESPACE_PREFIX)) {
|
|
61
|
+
throw new Error(
|
|
62
|
+
`Namespace '${namespace}' does not match the platform namespace ` +
|
|
63
|
+
`'${PLATFORM_TEMPORAL_NAMESPACE}' or the org-namespace prefix ` +
|
|
64
|
+
`'${ORG_NAMESPACE_PREFIX}<orgId>'. The Temporal cluster contains a ` +
|
|
65
|
+
`namespace that this code does not own.`,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return namespace.slice(ORG_NAMESPACE_PREFIX.length);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Whether `namespace` is the platform namespace (system workflows) or
|
|
73
|
+
* a tenant org namespace. Used by signal/query routing and visibility
|
|
74
|
+
* checks that must distinguish "cluster-wide tool" from "tenant call".
|
|
75
|
+
*/
|
|
76
|
+
export function isPlatformTemporalNamespace(namespace: string): boolean {
|
|
77
|
+
return namespace === PLATFORM_TEMPORAL_NAMESPACE;
|
|
78
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { WorkflowTriggerKind } from './enums';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Canonical trigger payload — the immutable envelope carried through the
|
|
5
|
+
* engine → Temporal → worker → activities. Discriminated by `kind` so
|
|
6
|
+
* every consumer switches exhaustively; unknown `kind` is a compile error.
|
|
7
|
+
*
|
|
8
|
+
* Webhook trigger payloads are the canonical envelopes produced by
|
|
9
|
+
* `integration-adapters-api` (see `docs/API_STANDARDS.md §17`), so the
|
|
10
|
+
* workflow plane never touches provider-specific shapes.
|
|
11
|
+
*/
|
|
12
|
+
export type TriggerPayload =
|
|
13
|
+
| WorkflowDispatchTriggerPayload
|
|
14
|
+
| ScheduleTriggerPayload
|
|
15
|
+
| WebhookTriggerPayload
|
|
16
|
+
| WorkflowCallTriggerPayload;
|
|
17
|
+
|
|
18
|
+
export interface BaseTriggerPayload {
|
|
19
|
+
readonly kind: WorkflowTriggerKind;
|
|
20
|
+
/** Opaque request id for correlation across services. ISO `urn:xema:<uuid>`. */
|
|
21
|
+
readonly correlationId: string;
|
|
22
|
+
/** Org that owns this run. Required for every trigger. */
|
|
23
|
+
readonly orgId: string;
|
|
24
|
+
/** Project that owns this run. Required for every trigger. */
|
|
25
|
+
readonly projectId: string;
|
|
26
|
+
/** Actor subject (user id) that initiated the trigger. Null for scheduled + webhook. */
|
|
27
|
+
readonly actorSubject: string | null;
|
|
28
|
+
/** Wall-clock UTC at trigger dispatch. Set by the engine, never by clients. */
|
|
29
|
+
readonly triggeredAt: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface WorkflowDispatchTriggerPayload extends BaseTriggerPayload {
|
|
33
|
+
readonly kind: WorkflowTriggerKind.WORKFLOW_DISPATCH;
|
|
34
|
+
/** Typed inputs as declared by the workflow's `on.workflow_dispatch.inputs` schema. */
|
|
35
|
+
readonly inputs: Readonly<Record<string, unknown>>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ScheduleTriggerPayload extends BaseTriggerPayload {
|
|
39
|
+
readonly kind: WorkflowTriggerKind.SCHEDULE;
|
|
40
|
+
/** Temporal Schedule id that fired this run. */
|
|
41
|
+
readonly scheduleId: string;
|
|
42
|
+
/** Cron spec that matched (for observability). */
|
|
43
|
+
readonly cronSpec: string;
|
|
44
|
+
/** Pre-bound inputs from the schedule definition. */
|
|
45
|
+
readonly inputs: Readonly<Record<string, unknown>>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface WebhookTriggerPayload extends BaseTriggerPayload {
|
|
49
|
+
readonly kind: WorkflowTriggerKind.WEBHOOK;
|
|
50
|
+
/** Canonical envelope's entity kind (e.g. `scm.push`). Closed set at the adapter. */
|
|
51
|
+
readonly event: string;
|
|
52
|
+
/** Provider + adapter key from the canonical envelope. */
|
|
53
|
+
readonly provider: string;
|
|
54
|
+
readonly adapterKey: string;
|
|
55
|
+
/** Opaque delivery id used for idempotency: `Idempotency-Key = {provider}:{deliveryId}`. */
|
|
56
|
+
readonly deliveryId: string;
|
|
57
|
+
/** Canonical envelope payload, typed upstream by the domain service. */
|
|
58
|
+
readonly payload: Readonly<Record<string, unknown>>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface WorkflowCallTriggerPayload extends BaseTriggerPayload {
|
|
62
|
+
readonly kind: WorkflowTriggerKind.WORKFLOW_CALL;
|
|
63
|
+
/** Parent workflow run id that initiated the call. */
|
|
64
|
+
readonly parentRunId: string;
|
|
65
|
+
/** Parent workflow slug@version. */
|
|
66
|
+
readonly parentWorkflowRef: string;
|
|
67
|
+
/** Inputs forwarded from the parent's `uses:` with block. */
|
|
68
|
+
readonly inputs: Readonly<Record<string, unknown>>;
|
|
69
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variable + secret contract a workflow declares it needs.
|
|
3
|
+
*
|
|
4
|
+
* Authored in YAML under `requires.variables`. Each entry is the name of an
|
|
5
|
+
* org/project Variable (per `biomes/project-registry/api/project-registry-api`) that the workflow
|
|
6
|
+
* expects to be present at dispatch time. Names follow the same
|
|
7
|
+
* `[A-Z][A-Z0-9_]*` convention as `CreateVariableDto.key`.
|
|
8
|
+
*
|
|
9
|
+
* The engine resolves these at dispatch and refuses to start the run if
|
|
10
|
+
* any required entry is missing — surfaced as
|
|
11
|
+
* `WorkflowErrorCode.WORKFLOW_VARIABLES_MISSING` with the list of missing
|
|
12
|
+
* keys so the UI can deep-link to the variables settings page.
|
|
13
|
+
*/
|
|
14
|
+
export interface WorkflowVariableRequirement {
|
|
15
|
+
/** Variable name. Matches `[A-Z][A-Z0-9_]*`. */
|
|
16
|
+
readonly name: string;
|
|
17
|
+
/**
|
|
18
|
+
* When true, the variable's stored value is the encrypted-at-rest secret
|
|
19
|
+
* and is exposed at runtime through the `secrets.*` expression
|
|
20
|
+
* namespace. When false (default), the value is plaintext and merges
|
|
21
|
+
* into the `vars.*` namespace alongside the YAML-static `vars:` block.
|
|
22
|
+
*/
|
|
23
|
+
readonly secret: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* When true, the requirement is documented but missing values do NOT
|
|
26
|
+
* block dispatch — the namespace exposes `undefined` for the key and
|
|
27
|
+
* expressions referencing it must handle that. Defaults to required.
|
|
28
|
+
*/
|
|
29
|
+
readonly optional: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Project variables resolved by the engine at dispatch time and passed
|
|
34
|
+
* into the root workflow's input. Plain JSON; both halves are string-keyed
|
|
35
|
+
* maps to keep the Temporal payload deterministic.
|
|
36
|
+
*
|
|
37
|
+
* The worker overlays `vars` on top of `CompiledRun.vars` (the YAML-static
|
|
38
|
+
* block) — project values win for the same key. `secrets` is exposed
|
|
39
|
+
* through the dedicated `secrets.*` namespace so logs/audit can redact
|
|
40
|
+
* those values without having to interrogate the schema.
|
|
41
|
+
*/
|
|
42
|
+
export interface ResolvedWorkflowVariables {
|
|
43
|
+
readonly vars: Readonly<Record<string, string>>;
|
|
44
|
+
readonly secrets: Readonly<Record<string, string>>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Static shape of a wallet's contents at compile / resolve time. Carries
|
|
49
|
+
* only the keys and their secret-ness — values are looked up separately
|
|
50
|
+
* at dispatch (compile is pure, no decryption / no network).
|
|
51
|
+
*
|
|
52
|
+
* Engines pre-fetch this for every wallet listed in `requires.wallets`
|
|
53
|
+
* (plus any additional wallets passed at dispatch time) and hand the
|
|
54
|
+
* map to the workflow compiler so it can derive
|
|
55
|
+
* `CompiledRun.requiredVariables` and validate `${{ vars.X }}` /
|
|
56
|
+
* `${{ secrets.X }}` references.
|
|
57
|
+
*/
|
|
58
|
+
export interface WalletContents {
|
|
59
|
+
readonly walletName: string;
|
|
60
|
+
readonly entries: readonly WalletEntry[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface WalletEntry {
|
|
64
|
+
readonly key: string;
|
|
65
|
+
readonly isSecret: boolean;
|
|
66
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// ── Work-item payload Zod schemas ──
|
|
3
|
+
//
|
|
4
|
+
// Canonical shapes for the JSON blobs persisted on `WorkItem.payloadJson`.
|
|
5
|
+
// Consumers use these with `toPrismaJson(schema, value)` from
|
|
6
|
+
// `@xemahq/platform-common` to replace `as unknown as
|
|
7
|
+
// Prisma.InputJsonValue` coercions — any drift between writer and reader
|
|
8
|
+
// surfaces as a typed `WorkItemPayloadInvalidError`, not silent data loss.
|
|
9
|
+
//
|
|
10
|
+
// New payload variants are added here (not inlined at the call site) so
|
|
11
|
+
// every work-item writer and reader in the monorepo speaks the same shape.
|
|
12
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
13
|
+
|
|
14
|
+
import { z } from 'zod';
|
|
15
|
+
|
|
16
|
+
// ── Rejection feedback (shared across worker + coordinator re-queue) ─────
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Per-reviewer rejection feedback entry — what one reviewer said on one
|
|
20
|
+
* rejection. Mirrors `VoteFeedbackEntry` in `platform-common/vote-feedback`
|
|
21
|
+
* but kept at the contract-source boundary so re-queue payloads have a
|
|
22
|
+
* canonical Zod-checked shape.
|
|
23
|
+
*/
|
|
24
|
+
export const VoteFeedbackEntrySchema = z.object({
|
|
25
|
+
reviewerGuild: z.string(),
|
|
26
|
+
vote: z.string(),
|
|
27
|
+
reasoning: z.string().optional(),
|
|
28
|
+
findings: z.array(z.unknown()).default([]),
|
|
29
|
+
});
|
|
30
|
+
export type VoteFeedbackEntry = z.infer<typeof VoteFeedbackEntrySchema>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* One entry in the per-work-item `rejectionHistory` array. Each retry
|
|
34
|
+
* pass appends one entry so the downstream reviewer sees the full audit
|
|
35
|
+
* trail.
|
|
36
|
+
*/
|
|
37
|
+
export const RejectionHistoryEntrySchema = z.object({
|
|
38
|
+
attemptNumber: z.number().int().min(1),
|
|
39
|
+
feedback: z.array(VoteFeedbackEntrySchema),
|
|
40
|
+
timestamp: z.string(),
|
|
41
|
+
});
|
|
42
|
+
export type RejectionHistoryEntry = z.infer<typeof RejectionHistoryEntrySchema>;
|
|
43
|
+
|
|
44
|
+
// ── Worker retry payload ──────────────────────────────────────────────────
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Payload shape written by `reQueueForRetryWithFeedback` when a worker
|
|
48
|
+
* work-item is re-queued after a gate rejection. Callers provide the
|
|
49
|
+
* full payload (including any task-specific fields) — this schema
|
|
50
|
+
* enforces the retry-specific fields only and lets additional keys
|
|
51
|
+
* pass through via `.passthrough()` during the incremental rollout.
|
|
52
|
+
*/
|
|
53
|
+
export const WorkerRetryPayloadSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
rejectionFeedback: z.array(VoteFeedbackEntrySchema),
|
|
56
|
+
conciseRejectionFeedback: z.string(),
|
|
57
|
+
rejectionHistory: z.array(RejectionHistoryEntrySchema).default([]),
|
|
58
|
+
priorResults: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
59
|
+
})
|
|
60
|
+
.passthrough();
|
|
61
|
+
export type WorkerRetryPayload = z.infer<typeof WorkerRetryPayloadSchema>;
|
|
62
|
+
|
|
63
|
+
// ── Coordinator retry payload ─────────────────────────────────────────────
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Payload shape for `reQueueCoordinatorWithFeedback`. Mirrors the worker
|
|
67
|
+
* shape so coordinator retries accumulate `priorResults` identically —
|
|
68
|
+
* the prior gap where only `publishedPageRefs` was preserved is the
|
|
69
|
+
* plan's finding #45 and is fixed by making the coordinator path adopt
|
|
70
|
+
* this schema.
|
|
71
|
+
*/
|
|
72
|
+
export const CoordinatorRetryPayloadSchema = z
|
|
73
|
+
.object({
|
|
74
|
+
coordinatorRejectionFeedback: z.unknown(),
|
|
75
|
+
priorResults: z.array(z.record(z.string(), z.unknown())).default([]),
|
|
76
|
+
publishedPageRefs: z.array(z.unknown()).optional(),
|
|
77
|
+
})
|
|
78
|
+
.passthrough();
|
|
79
|
+
export type CoordinatorRetryPayload = z.infer<typeof CoordinatorRetryPayloadSchema>;
|
|
80
|
+
|
|
81
|
+
// ── Review-attempt trace entry (F3a) ──────────────────────────────────────
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* One step recorded by the gate-review correction loop. Persisted on
|
|
85
|
+
* `GateVote.reasonsJson.attempts` so the operator / auditor sees what
|
|
86
|
+
* the reviewer tried on each attempt, without scraping container logs.
|
|
87
|
+
*/
|
|
88
|
+
export const GateReviewAttemptEntrySchema = z.object({
|
|
89
|
+
attempt: z.number().int().min(0),
|
|
90
|
+
step: z.string(),
|
|
91
|
+
outcome: z.string(),
|
|
92
|
+
// detail is not always populated — success entries typically omit it.
|
|
93
|
+
// Keeping it optional matches the handler's actual emission shape
|
|
94
|
+
// (`GateReviewAttemptEntry.detail?: string` in opencode-client types).
|
|
95
|
+
detail: z.string().optional(),
|
|
96
|
+
at: z.string(),
|
|
97
|
+
});
|
|
98
|
+
export type GateReviewAttemptEntry = z.infer<typeof GateReviewAttemptEntrySchema>;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Structured trace attached to every completed (or failed) gate review.
|
|
102
|
+
* The raw reviewer-emitted content is stored alongside this trace so the
|
|
103
|
+
* `MANUAL_REVIEW_MALFORMED_OUTPUT` escalation can surface what the LLM
|
|
104
|
+
* actually said when parsing exhausted.
|
|
105
|
+
*/
|
|
106
|
+
export const GateReviewAttemptTraceSchema = z.object({
|
|
107
|
+
sessionId: z.string().nullable(),
|
|
108
|
+
reviewPath: z.string(),
|
|
109
|
+
durationMs: z.number().int().min(0),
|
|
110
|
+
entries: z.array(GateReviewAttemptEntrySchema),
|
|
111
|
+
exhausted: z.boolean(),
|
|
112
|
+
});
|
|
113
|
+
export type GateReviewAttemptTrace = z.infer<typeof GateReviewAttemptTraceSchema>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Per-reviewer escalation entry persisted on `GateRequest.malformedReviews`
|
|
117
|
+
* when the correction loop can't produce a parseable review. The operator's
|
|
118
|
+
* `ManualReviewMalformedPanel` reads this array to render raw content +
|
|
119
|
+
* attempts trace and collect a structured vote.
|
|
120
|
+
*/
|
|
121
|
+
export const MalformedEscalationKindSchema = z.enum([
|
|
122
|
+
'malformed',
|
|
123
|
+
'infrastructure',
|
|
124
|
+
'structurally_incomplete',
|
|
125
|
+
]);
|
|
126
|
+
export type MalformedEscalationKind = z.infer<typeof MalformedEscalationKindSchema>;
|
|
127
|
+
|
|
128
|
+
export const MalformedEscalationEntrySchema = z.object({
|
|
129
|
+
reviewerGuild: z.string().min(1),
|
|
130
|
+
reviewerAgent: z.string().min(1),
|
|
131
|
+
kind: MalformedEscalationKindSchema,
|
|
132
|
+
message: z.string(),
|
|
133
|
+
rawContent: z.string().nullable(),
|
|
134
|
+
attempts: z.array(GateReviewAttemptEntrySchema),
|
|
135
|
+
occurredAt: z.string().min(1),
|
|
136
|
+
});
|
|
137
|
+
export type MalformedEscalationEntry = z.infer<typeof MalformedEscalationEntrySchema>;
|
|
138
|
+
|
|
139
|
+
export const MalformedEscalationLedgerSchema = z.array(MalformedEscalationEntrySchema);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// ── Workflow Stage — Generic Ordered-Stage Contract ──
|
|
3
|
+
//
|
|
4
|
+
// The kernel knows ONLY that a workflow run can be partitioned into an
|
|
5
|
+
// ordered sequence of named stages. It carries ZERO domain knowledge: the
|
|
6
|
+
// concrete stage list (software-delivery's `clarification → requirements →
|
|
7
|
+
// … → deployment`, a content pipeline's stages, etc.) is owned by the
|
|
8
|
+
// sub-app biome that defines the workflow, never by this kernel package.
|
|
9
|
+
//
|
|
10
|
+
// A stage is identified by a free-form `stageKey` string. The artifact
|
|
11
|
+
// natural key already `_`-encodes this value (`{kind}:{workflowRunId}:
|
|
12
|
+
// {groupKey|_}:{scope|_}:{slug}`), and the workflow engine sequences jobs
|
|
13
|
+
// via explicit `needs:` dependency edges — neither needs a closed enum.
|
|
14
|
+
//
|
|
15
|
+
// Biomes that DO define an ordered stage list (e.g. for a phase rail or a
|
|
16
|
+
// per-stage gate-reviewer map) ship it as biome content and load it at
|
|
17
|
+
// runtime; see `biomes/platform/software-dev/workflow-config/phase-config.json`.
|
|
18
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* How the execution engine treats a stage:
|
|
22
|
+
* - `lifecycle`: a meta-stage that shapes the run but does not produce a
|
|
23
|
+
* gated deliverable (e.g. a clarification/intake stage).
|
|
24
|
+
* - `delivery`: produces artifacts and flows through gate progression.
|
|
25
|
+
*
|
|
26
|
+
* This is the one generic, closed property every ordered-stage model
|
|
27
|
+
* shares. The stage *keys* themselves stay free-form and biome-owned.
|
|
28
|
+
*/
|
|
29
|
+
export enum WorkflowStageCategory {
|
|
30
|
+
Lifecycle = 'lifecycle',
|
|
31
|
+
Delivery = 'delivery',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A single ordered workflow stage. `stageKey` is the value that flows onto
|
|
36
|
+
* a job's `groupKey` and into the artifact natural key — a free-form
|
|
37
|
+
* string the kernel never validates against a closed set.
|
|
38
|
+
*/
|
|
39
|
+
export interface WorkflowStage {
|
|
40
|
+
/** Free-form stage identifier (e.g. `requirements`, `engineering`). */
|
|
41
|
+
readonly stageKey: string;
|
|
42
|
+
/** Whether the engine treats this stage as lifecycle or delivery. */
|
|
43
|
+
readonly category: WorkflowStageCategory;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* An ordered list of workflow stages, as defined by a workflow/sub-app.
|
|
48
|
+
* The kernel offers this shape so a biome-supplied stage list has a
|
|
49
|
+
* typed home; the kernel never instantiates one.
|
|
50
|
+
*/
|
|
51
|
+
export type WorkflowStageSequence = readonly WorkflowStage[];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Compute the next stage after `currentStageKey` within an ordered
|
|
55
|
+
* sequence, optionally restricted to an in-scope subset of delivery
|
|
56
|
+
* stages. Lifecycle stages are always in scope; delivery stages must
|
|
57
|
+
* appear in `deliveryScope` when one is supplied.
|
|
58
|
+
*
|
|
59
|
+
* Returns `undefined` when `currentStageKey` is terminal within the
|
|
60
|
+
* (optionally scoped) sequence.
|
|
61
|
+
*
|
|
62
|
+
* @throws Error if `currentStageKey` is not present in `sequence`.
|
|
63
|
+
*/
|
|
64
|
+
export function nextStageInSequence(
|
|
65
|
+
sequence: WorkflowStageSequence,
|
|
66
|
+
currentStageKey: string,
|
|
67
|
+
deliveryScope?: readonly string[],
|
|
68
|
+
): string | undefined {
|
|
69
|
+
const currentIdx = sequence.findIndex((s) => s.stageKey === currentStageKey);
|
|
70
|
+
if (currentIdx < 0) {
|
|
71
|
+
throw new Error(
|
|
72
|
+
`Stage "${currentStageKey}" is not present in the supplied workflow stage sequence`,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
for (let i = currentIdx + 1; i < sequence.length; i++) {
|
|
76
|
+
const candidate = sequence[i];
|
|
77
|
+
if (candidate === undefined) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (
|
|
81
|
+
!deliveryScope ||
|
|
82
|
+
candidate.category === WorkflowStageCategory.Lifecycle ||
|
|
83
|
+
deliveryScope.includes(candidate.stageKey)
|
|
84
|
+
) {
|
|
85
|
+
return candidate.stageKey;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|