ws-spec-kit 0.1.0-beta.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/LICENSE +201 -0
- package/README.md +79 -0
- package/dist/adapters/cli/output.d.ts +15 -0
- package/dist/adapters/cli/output.js +21 -0
- package/dist/adapters/cli/output.js.map +1 -0
- package/dist/adapters/cli/workflow.d.ts +25 -0
- package/dist/adapters/cli/workflow.js +131 -0
- package/dist/adapters/cli/workflow.js.map +1 -0
- package/dist/adapters/connectors/git-native.d.ts +23 -0
- package/dist/adapters/connectors/git-native.js +521 -0
- package/dist/adapters/connectors/git-native.js.map +1 -0
- package/dist/adapters/connectors/github-cli.d.ts +23 -0
- package/dist/adapters/connectors/github-cli.js +213 -0
- package/dist/adapters/connectors/github-cli.js.map +1 -0
- package/dist/adapters/connectors/gitlab-cli.d.ts +23 -0
- package/dist/adapters/connectors/gitlab-cli.js +199 -0
- package/dist/adapters/connectors/gitlab-cli.js.map +1 -0
- package/dist/adapters/connectors/lark-cli.d.ts +24 -0
- package/dist/adapters/connectors/lark-cli.js +296 -0
- package/dist/adapters/connectors/lark-cli.js.map +1 -0
- package/dist/adapters/process/redaction.d.ts +2 -0
- package/dist/adapters/process/redaction.js +51 -0
- package/dist/adapters/process/redaction.js.map +1 -0
- package/dist/adapters/process/spawn-json.d.ts +37 -0
- package/dist/adapters/process/spawn-json.js +312 -0
- package/dist/adapters/process/spawn-json.js.map +1 -0
- package/dist/adapters/skills/claude.d.ts +1 -0
- package/dist/adapters/skills/claude.js +3 -0
- package/dist/adapters/skills/claude.js.map +1 -0
- package/dist/adapters/skills/codex.d.ts +1 -0
- package/dist/adapters/skills/codex.js +3 -0
- package/dist/adapters/skills/codex.js.map +1 -0
- package/dist/adapters/skills/cursor.d.ts +1 -0
- package/dist/adapters/skills/cursor.js +3 -0
- package/dist/adapters/skills/cursor.js.map +1 -0
- package/dist/adapters/skills/generic.d.ts +1 -0
- package/dist/adapters/skills/generic.js +2 -0
- package/dist/adapters/skills/generic.js.map +1 -0
- package/dist/adapters/skills/install.d.ts +28 -0
- package/dist/adapters/skills/install.js +571 -0
- package/dist/adapters/skills/install.js.map +1 -0
- package/dist/application/acquire.d.ts +60 -0
- package/dist/application/acquire.js +964 -0
- package/dist/application/acquire.js.map +1 -0
- package/dist/application/application.d.ts +21 -0
- package/dist/application/application.js +31 -0
- package/dist/application/application.js.map +1 -0
- package/dist/application/artifact-reader.d.ts +1 -0
- package/dist/application/artifact-reader.js +150 -0
- package/dist/application/artifact-reader.js.map +1 -0
- package/dist/application/artifact-writer.d.ts +1 -0
- package/dist/application/artifact-writer.js +268 -0
- package/dist/application/artifact-writer.js.map +1 -0
- package/dist/application/artifact.d.ts +28 -0
- package/dist/application/artifact.js +523 -0
- package/dist/application/artifact.js.map +1 -0
- package/dist/application/decide.d.ts +12 -0
- package/dist/application/decide.js +168 -0
- package/dist/application/decide.js.map +1 -0
- package/dist/application/doctor-connectors.d.ts +34 -0
- package/dist/application/doctor-connectors.js +99 -0
- package/dist/application/doctor-connectors.js.map +1 -0
- package/dist/application/external-action.d.ts +164 -0
- package/dist/application/external-action.js +670 -0
- package/dist/application/external-action.js.map +1 -0
- package/dist/application/initial-stages.d.ts +3 -0
- package/dist/application/initial-stages.js +7 -0
- package/dist/application/initial-stages.js.map +1 -0
- package/dist/application/inspect.d.ts +2 -0
- package/dist/application/inspect.js +31 -0
- package/dist/application/inspect.js.map +1 -0
- package/dist/application/profile.d.ts +32 -0
- package/dist/application/profile.js +70 -0
- package/dist/application/profile.js.map +1 -0
- package/dist/application/snapshot.d.ts +75 -0
- package/dist/application/snapshot.js +338 -0
- package/dist/application/snapshot.js.map +1 -0
- package/dist/application/start.d.ts +43 -0
- package/dist/application/start.js +360 -0
- package/dist/application/start.js.map +1 -0
- package/dist/application/state.d.ts +17 -0
- package/dist/application/state.js +94 -0
- package/dist/application/state.js.map +1 -0
- package/dist/application/submit.d.ts +18 -0
- package/dist/application/submit.js +1090 -0
- package/dist/application/submit.js.map +1 -0
- package/dist/cli/commands/core.d.ts +2 -0
- package/dist/cli/commands/core.js +205 -0
- package/dist/cli/commands/core.js.map +1 -0
- package/dist/cli/commands/public-contract.d.ts +12 -0
- package/dist/cli/commands/public-contract.js +47 -0
- package/dist/cli/commands/public-contract.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +23 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/domain/artifacts.d.ts +52 -0
- package/dist/domain/artifacts.js +241 -0
- package/dist/domain/artifacts.js.map +1 -0
- package/dist/domain/digests.d.ts +11 -0
- package/dist/domain/digests.js +106 -0
- package/dist/domain/digests.js.map +1 -0
- package/dist/domain/external-receipt.d.ts +48 -0
- package/dist/domain/external-receipt.js +138 -0
- package/dist/domain/external-receipt.js.map +1 -0
- package/dist/domain/ids.d.ts +7 -0
- package/dist/domain/ids.js +5 -0
- package/dist/domain/ids.js.map +1 -0
- package/dist/domain/repository-path.d.ts +3 -0
- package/dist/domain/repository-path.js +87 -0
- package/dist/domain/repository-path.js.map +1 -0
- package/dist/domain/states.d.ts +38 -0
- package/dist/domain/states.js +69 -0
- package/dist/domain/states.js.map +1 -0
- package/dist/domain/work-package-identity.d.ts +2 -0
- package/dist/domain/work-package-identity.js +10 -0
- package/dist/domain/work-package-identity.js.map +1 -0
- package/dist/domain/workflow.d.ts +58 -0
- package/dist/domain/workflow.js +2 -0
- package/dist/domain/workflow.js.map +1 -0
- package/dist/engine/actor-roles.d.ts +15 -0
- package/dist/engine/actor-roles.js +53 -0
- package/dist/engine/actor-roles.js.map +1 -0
- package/dist/engine/approvals.d.ts +44 -0
- package/dist/engine/approvals.js +239 -0
- package/dist/engine/approvals.js.map +1 -0
- package/dist/engine/archive.d.ts +24 -0
- package/dist/engine/archive.js +442 -0
- package/dist/engine/archive.js.map +1 -0
- package/dist/engine/compiler.d.ts +25 -0
- package/dist/engine/compiler.js +828 -0
- package/dist/engine/compiler.js.map +1 -0
- package/dist/engine/control/condition.d.ts +10 -0
- package/dist/engine/control/condition.js +49 -0
- package/dist/engine/control/condition.js.map +1 -0
- package/dist/engine/control/loop.d.ts +23 -0
- package/dist/engine/control/loop.js +96 -0
- package/dist/engine/control/loop.js.map +1 -0
- package/dist/engine/control/retry.d.ts +15 -0
- package/dist/engine/control/retry.js +54 -0
- package/dist/engine/control/retry.js.map +1 -0
- package/dist/engine/docs-integrity.d.ts +13 -0
- package/dist/engine/docs-integrity.js +34 -0
- package/dist/engine/docs-integrity.js.map +1 -0
- package/dist/engine/expressions/ast.d.ts +18 -0
- package/dist/engine/expressions/ast.js +9 -0
- package/dist/engine/expressions/ast.js.map +1 -0
- package/dist/engine/expressions/evaluate.d.ts +7 -0
- package/dist/engine/expressions/evaluate.js +47 -0
- package/dist/engine/expressions/evaluate.js.map +1 -0
- package/dist/engine/expressions/parser.d.ts +2 -0
- package/dist/engine/expressions/parser.js +173 -0
- package/dist/engine/expressions/parser.js.map +1 -0
- package/dist/engine/external-effects/authorization.d.ts +146 -0
- package/dist/engine/external-effects/authorization.js +222 -0
- package/dist/engine/external-effects/authorization.js.map +1 -0
- package/dist/engine/external-effects/idempotency.d.ts +14 -0
- package/dist/engine/external-effects/idempotency.js +26 -0
- package/dist/engine/external-effects/idempotency.js.map +1 -0
- package/dist/engine/external-effects/reconciliation.d.ts +11 -0
- package/dist/engine/external-effects/reconciliation.js +18 -0
- package/dist/engine/external-effects/reconciliation.js.map +1 -0
- package/dist/engine/results.d.ts +14 -0
- package/dist/engine/results.js +88 -0
- package/dist/engine/results.js.map +1 -0
- package/dist/engine/scheduler.d.ts +60 -0
- package/dist/engine/scheduler.js +225 -0
- package/dist/engine/scheduler.js.map +1 -0
- package/dist/engine/tdd/green-gate.d.ts +6 -0
- package/dist/engine/tdd/green-gate.js +72 -0
- package/dist/engine/tdd/green-gate.js.map +1 -0
- package/dist/engine/tdd/red-gate.d.ts +30 -0
- package/dist/engine/tdd/red-gate.js +531 -0
- package/dist/engine/tdd/red-gate.js.map +1 -0
- package/dist/engine/tdd/types.d.ts +89 -0
- package/dist/engine/tdd/types.js +38 -0
- package/dist/engine/tdd/types.js.map +1 -0
- package/dist/engine/verification.d.ts +56 -0
- package/dist/engine/verification.js +196 -0
- package/dist/engine/verification.js.map +1 -0
- package/dist/policy/profile.d.ts +24 -0
- package/dist/policy/profile.js +23 -0
- package/dist/policy/profile.js.map +1 -0
- package/dist/policy/risk.d.ts +33 -0
- package/dist/policy/risk.js +138 -0
- package/dist/policy/risk.js.map +1 -0
- package/dist/protocol/application.d.ts +196 -0
- package/dist/protocol/application.js +2 -0
- package/dist/protocol/application.js.map +1 -0
- package/dist/protocol/public-contract.d.ts +81 -0
- package/dist/protocol/public-contract.js +231 -0
- package/dist/protocol/public-contract.js.map +1 -0
- package/dist/protocol/work-package.d.ts +55 -0
- package/dist/protocol/work-package.js +2 -0
- package/dist/protocol/work-package.js.map +1 -0
- package/dist/registry/connectors/external-executor.d.ts +4 -0
- package/dist/registry/connectors/external-executor.js +249 -0
- package/dist/registry/connectors/external-executor.js.map +1 -0
- package/dist/registry/connectors/feishu-document.d.ts +21 -0
- package/dist/registry/connectors/feishu-document.js +197 -0
- package/dist/registry/connectors/feishu-document.js.map +1 -0
- package/dist/registry/connectors/git-commit.d.ts +32 -0
- package/dist/registry/connectors/git-commit.js +122 -0
- package/dist/registry/connectors/git-commit.js.map +1 -0
- package/dist/registry/connectors/issue.d.ts +68 -0
- package/dist/registry/connectors/issue.js +301 -0
- package/dist/registry/connectors/issue.js.map +1 -0
- package/dist/registry/connectors/knowledge-publish.d.ts +30 -0
- package/dist/registry/connectors/knowledge-publish.js +157 -0
- package/dist/registry/connectors/knowledge-publish.js.map +1 -0
- package/dist/registry/connectors/local-requirement.d.ts +19 -0
- package/dist/registry/connectors/local-requirement.js +177 -0
- package/dist/registry/connectors/local-requirement.js.map +1 -0
- package/dist/registry/connectors/manifest.d.ts +6 -0
- package/dist/registry/connectors/manifest.js +164 -0
- package/dist/registry/connectors/manifest.js.map +1 -0
- package/dist/registry/connectors/registry.d.ts +11 -0
- package/dist/registry/connectors/registry.js +34 -0
- package/dist/registry/connectors/registry.js.map +1 -0
- package/dist/registry/connectors/requirement-source.d.ts +46 -0
- package/dist/registry/connectors/requirement-source.js +513 -0
- package/dist/registry/connectors/requirement-source.js.map +1 -0
- package/dist/registry/connectors/runtime.d.ts +38 -0
- package/dist/registry/connectors/runtime.js +127 -0
- package/dist/registry/connectors/runtime.js.map +1 -0
- package/dist/registry/connectors/secret-detector.d.ts +19 -0
- package/dist/registry/connectors/secret-detector.js +85 -0
- package/dist/registry/connectors/secret-detector.js.map +1 -0
- package/dist/registry/connectors/semver.d.ts +8 -0
- package/dist/registry/connectors/semver.js +57 -0
- package/dist/registry/connectors/semver.js.map +1 -0
- package/dist/registry/connectors/types.d.ts +45 -0
- package/dist/registry/connectors/types.js +2 -0
- package/dist/registry/connectors/types.js.map +1 -0
- package/dist/registry/executors/registry.d.ts +15 -0
- package/dist/registry/executors/registry.js +68 -0
- package/dist/registry/executors/registry.js.map +1 -0
- package/dist/registry/executors/types.d.ts +19 -0
- package/dist/registry/executors/types.js +2 -0
- package/dist/registry/executors/types.js.map +1 -0
- package/dist/registry/skills/lock.d.ts +3 -0
- package/dist/registry/skills/lock.js +278 -0
- package/dist/registry/skills/lock.js.map +1 -0
- package/dist/registry/skills/resolver.d.ts +16 -0
- package/dist/registry/skills/resolver.js +353 -0
- package/dist/registry/skills/resolver.js.map +1 -0
- package/dist/registry/skills/types.d.ts +75 -0
- package/dist/registry/skills/types.js +9 -0
- package/dist/registry/skills/types.js.map +1 -0
- package/dist/resources/catalog.d.ts +20 -0
- package/dist/resources/catalog.js +111 -0
- package/dist/resources/catalog.js.map +1 -0
- package/dist/schemas/definitions.d.ts +5 -0
- package/dist/schemas/definitions.js +958 -0
- package/dist/schemas/definitions.js.map +1 -0
- package/dist/schemas/generate.d.ts +1 -0
- package/dist/schemas/generate.js +26 -0
- package/dist/schemas/generate.js.map +1 -0
- package/dist/schemas/index.d.ts +11 -0
- package/dist/schemas/index.js +54 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/storage/control-plane.d.ts +136 -0
- package/dist/storage/control-plane.js +688 -0
- package/dist/storage/control-plane.js.map +1 -0
- package/dist/storage/events.d.ts +36 -0
- package/dist/storage/events.js +185 -0
- package/dist/storage/events.js.map +1 -0
- package/dist/storage/external-action-payload.d.ts +33 -0
- package/dist/storage/external-action-payload.js +190 -0
- package/dist/storage/external-action-payload.js.map +1 -0
- package/dist/storage/files.d.ts +13 -0
- package/dist/storage/files.js +45 -0
- package/dist/storage/files.js.map +1 -0
- package/dist/storage/git.d.ts +4 -0
- package/dist/storage/git.js +21 -0
- package/dist/storage/git.js.map +1 -0
- package/dist/storage/project-config.d.ts +11 -0
- package/dist/storage/project-config.js +60 -0
- package/dist/storage/project-config.js.map +1 -0
- package/dist/storage/repository.d.ts +14 -0
- package/dist/storage/repository.js +151 -0
- package/dist/storage/repository.js.map +1 -0
- package/dist/storage/work-items.d.ts +77 -0
- package/dist/storage/work-items.js +373 -0
- package/dist/storage/work-items.js.map +1 -0
- package/dist/storage/workflow-trust.d.ts +38 -0
- package/dist/storage/workflow-trust.js +310 -0
- package/dist/storage/workflow-trust.js.map +1 -0
- package/dist/workflow-package/loader.d.ts +12 -0
- package/dist/workflow-package/loader.js +249 -0
- package/dist/workflow-package/loader.js.map +1 -0
- package/dist/workflow-package/lock.d.ts +6 -0
- package/dist/workflow-package/lock.js +12 -0
- package/dist/workflow-package/lock.js.map +1 -0
- package/dist/workflow-package/path-boundary.d.ts +5 -0
- package/dist/workflow-package/path-boundary.js +38 -0
- package/dist/workflow-package/path-boundary.js.map +1 -0
- package/dist/workflow-package/trust.d.ts +27 -0
- package/dist/workflow-package/trust.js +61 -0
- package/dist/workflow-package/trust.js.map +1 -0
- package/dist/workflow-package/types.d.ts +176 -0
- package/dist/workflow-package/types.js +9 -0
- package/dist/workflow-package/types.js.map +1 -0
- package/dist/workflow-package/workflow-v1.d.ts +3 -0
- package/dist/workflow-package/workflow-v1.js +274 -0
- package/dist/workflow-package/workflow-v1.js.map +1 -0
- package/package.json +40 -0
- package/resources/catalog.yaml +37 -0
- package/resources/connectors/github-cli.yaml +24 -0
- package/resources/connectors/gitlab-cli.yaml +24 -0
- package/resources/connectors/lark-cli.yaml +28 -0
- package/resources/skills/bug-fixing/SKILL.md +16 -0
- package/resources/skills/code-review/SKILL.md +16 -0
- package/resources/skills/documentation-editing/SKILL.md +16 -0
- package/resources/skills/documentation-exploration/SKILL.md +16 -0
- package/resources/skills/documentation-review/SKILL.md +16 -0
- package/resources/skills/requirement-exploration/SKILL.md +16 -0
- package/resources/skills/solution-design/SKILL.md +16 -0
- package/resources/skills/task-planning/SKILL.md +16 -0
- package/resources/skills/tdd-implementation/SKILL.md +16 -0
- package/resources/workflows/documentation-delivery/manifest.yaml +8 -0
- package/resources/workflows/documentation-delivery/profiles/governed.yaml +23 -0
- package/resources/workflows/documentation-delivery/profiles/quick.yaml +23 -0
- package/resources/workflows/documentation-delivery/profiles/standard.yaml +21 -0
- package/resources/workflows/documentation-delivery/workflow.yaml +109 -0
- package/resources/workflows/feature-delivery/manifest.yaml +8 -0
- package/resources/workflows/feature-delivery/profiles/governed.yaml +27 -0
- package/resources/workflows/feature-delivery/profiles/quick.yaml +25 -0
- package/resources/workflows/feature-delivery/profiles/standard.yaml +26 -0
- package/resources/workflows/feature-delivery/workflow.yaml +150 -0
- package/schemas/builtin-agent-action-v1.schema.json +509 -0
- package/schemas/builtin-application-acquire-input-v1.schema.json +25 -0
- package/schemas/builtin-application-artifact-create-input-v1.schema.json +49 -0
- package/schemas/builtin-application-decision-input-v1.schema.json +284 -0
- package/schemas/builtin-application-inspect-input-v1.schema.json +20 -0
- package/schemas/builtin-application-project-config-snapshot-v1.schema.json +289 -0
- package/schemas/builtin-application-project-config-v1.schema.json +293 -0
- package/schemas/builtin-application-start-input-v1.schema.json +92 -0
- package/schemas/builtin-application-submit-input-v1.schema.json +145 -0
- package/schemas/builtin-artifact-v1.schema.json +48 -0
- package/schemas/builtin-evidence-v1.schema.json +65 -0
- package/schemas/builtin-external-action-grant-v1.schema.json +298 -0
- package/schemas/builtin-external-action-request-v1.schema.json +288 -0
- package/schemas/builtin-external-binding-v1.schema.json +59 -0
- package/schemas/builtin-external-receipt-v1.schema.json +109 -0
- package/schemas/builtin-external-write-receipt-v1.schema.json +253 -0
- package/schemas/builtin-source-artifact-v1.schema.json +293 -0
- package/schemas/builtin-submit-result-v1.schema.json +111 -0
- package/schemas/builtin-tdd-cycle-evidence-v1.schema.json +119 -0
- package/schemas/builtin-tdd-node-test-report-v1.schema.json +103 -0
- package/schemas/builtin-tdd-trusted-evidence-v1.schema.json +184 -0
- package/schemas/builtin-work-item-v1.schema.json +201 -0
- package/schemas/builtin-work-package-v1.schema.json +254 -0
- package/schemas/builtin-workflow-selection-v1.schema.json +40 -0
|
@@ -0,0 +1,958 @@
|
|
|
1
|
+
export const schemaIds = [
|
|
2
|
+
"builtin.workflow-selection.v1",
|
|
3
|
+
"builtin.application-project-config.v1",
|
|
4
|
+
"builtin.application-project-config-snapshot.v1",
|
|
5
|
+
"builtin.source-artifact.v1",
|
|
6
|
+
"builtin.work-item.v1",
|
|
7
|
+
"builtin.application-start-input.v1",
|
|
8
|
+
"builtin.application-acquire-input.v1",
|
|
9
|
+
"builtin.application-artifact-create-input.v1",
|
|
10
|
+
"builtin.application-submit-input.v1",
|
|
11
|
+
"builtin.application-decision-input.v1",
|
|
12
|
+
"builtin.application-inspect-input.v1",
|
|
13
|
+
"builtin.agent-action.v1",
|
|
14
|
+
"builtin.work-package.v1",
|
|
15
|
+
"builtin.submit-result.v1",
|
|
16
|
+
"builtin.evidence.v1",
|
|
17
|
+
"builtin.tdd-trusted-evidence.v1",
|
|
18
|
+
"builtin.tdd-cycle-evidence.v1",
|
|
19
|
+
"builtin.tdd-node-test-report.v1",
|
|
20
|
+
"builtin.external-binding.v1",
|
|
21
|
+
"builtin.external-receipt.v1",
|
|
22
|
+
"builtin.external-action-request.v1",
|
|
23
|
+
"builtin.external-action-grant.v1",
|
|
24
|
+
"builtin.external-write-receipt.v1",
|
|
25
|
+
"builtin.artifact.v1",
|
|
26
|
+
];
|
|
27
|
+
const idPattern = "^[a-z][a-z0-9-]{0,62}$";
|
|
28
|
+
const gateIdPattern = "^[a-z][a-z0-9.-]{0,62}$";
|
|
29
|
+
const stepInstanceIdPattern = "^[a-z][a-z0-9-]{0,62}(?::[1-9][0-9]*:[a-z][a-z0-9-]{0,62})?$";
|
|
30
|
+
const digestPattern = "^sha256:.+$";
|
|
31
|
+
const repositoryIdPattern = "^repo-[0-9A-HJKMNP-TV-Z]{26}$";
|
|
32
|
+
const workItemIdPattern = "^WSS-[A-Za-z0-9-]+$";
|
|
33
|
+
const attemptIdPattern = "^attempt-.+$";
|
|
34
|
+
const errorCodePattern = "^WSSPEC_[A-Z0-9_]+$";
|
|
35
|
+
const stringArray = { type: "array", items: { type: "string" }, uniqueItems: true };
|
|
36
|
+
const testPathRuleSchema = { enum: ["node", "java", "ruby", "dotnet"] };
|
|
37
|
+
const approvalSchema = {
|
|
38
|
+
type: "object",
|
|
39
|
+
additionalProperties: false,
|
|
40
|
+
required: ["required"],
|
|
41
|
+
properties: {
|
|
42
|
+
required: { type: "boolean" },
|
|
43
|
+
provider: { enum: ["interactive"] },
|
|
44
|
+
},
|
|
45
|
+
allOf: [
|
|
46
|
+
{
|
|
47
|
+
if: { properties: { required: { const: true } }, required: ["required"] },
|
|
48
|
+
then: { properties: { provider: { enum: ["interactive"] } }, required: ["provider"] },
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
};
|
|
52
|
+
const stageSchema = {
|
|
53
|
+
type: "object",
|
|
54
|
+
additionalProperties: false,
|
|
55
|
+
required: ["id", "kind", "owner", "uses"],
|
|
56
|
+
properties: {
|
|
57
|
+
id: { type: "string", pattern: idPattern },
|
|
58
|
+
kind: { enum: ["define", "design", "plan", "implement", "review", "verify", "publish", "close"] },
|
|
59
|
+
owner: { enum: ["agent", "engine"] },
|
|
60
|
+
uses: { type: "string", pattern: "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" },
|
|
61
|
+
needs: stringArray,
|
|
62
|
+
input: stringArray,
|
|
63
|
+
output: stringArray,
|
|
64
|
+
approval: approvalSchema,
|
|
65
|
+
gates: stringArray,
|
|
66
|
+
publish: stringArray,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
const gateSchema = {
|
|
70
|
+
type: "object",
|
|
71
|
+
additionalProperties: false,
|
|
72
|
+
required: ["command", "cwd", "timeoutSeconds", "required", "evidence"],
|
|
73
|
+
properties: {
|
|
74
|
+
command: { type: "array", minItems: 1, items: { type: "string" } },
|
|
75
|
+
cwd: { const: "worktree" },
|
|
76
|
+
timeoutSeconds: { type: "integer", minimum: 1, maximum: 86400 },
|
|
77
|
+
required: { type: "boolean" },
|
|
78
|
+
evidence: { enum: ["trusted", "attested"] },
|
|
79
|
+
inheritEnv: {
|
|
80
|
+
type: "array",
|
|
81
|
+
items: { type: "string", pattern: "^[A-Z_][A-Z0-9_]*$" },
|
|
82
|
+
uniqueItems: true,
|
|
83
|
+
},
|
|
84
|
+
env: {
|
|
85
|
+
type: "object",
|
|
86
|
+
propertyNames: { pattern: "^[A-Z_][A-Z0-9_]*$" },
|
|
87
|
+
additionalProperties: { type: "string" },
|
|
88
|
+
},
|
|
89
|
+
reporter: {
|
|
90
|
+
type: "object",
|
|
91
|
+
additionalProperties: false,
|
|
92
|
+
required: ["type", "version"],
|
|
93
|
+
properties: { type: { const: "node-test" }, version: { const: 1 } },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
const artifactReferenceSchema = {
|
|
98
|
+
type: "object",
|
|
99
|
+
additionalProperties: false,
|
|
100
|
+
required: ["artifactType", "schemaVersion"],
|
|
101
|
+
properties: {
|
|
102
|
+
artifactType: { type: "string", pattern: idPattern },
|
|
103
|
+
outputId: { type: "string", pattern: idPattern },
|
|
104
|
+
artifactId: { type: "string", minLength: 1, maxLength: 128 },
|
|
105
|
+
schemaVersion: { type: "integer", minimum: 1 },
|
|
106
|
+
path: { type: "string" },
|
|
107
|
+
revision: { type: "integer", minimum: 1 },
|
|
108
|
+
contentHash: { type: "string", pattern: digestPattern },
|
|
109
|
+
mediaType: { type: "string" },
|
|
110
|
+
contentLevel: { type: "string", minLength: 1 },
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
const artifactExpectationSchema = {
|
|
114
|
+
type: "object",
|
|
115
|
+
additionalProperties: false,
|
|
116
|
+
required: ["artifactType", "schemaVersion"],
|
|
117
|
+
properties: {
|
|
118
|
+
artifactType: { type: "string", pattern: idPattern },
|
|
119
|
+
outputId: { type: "string", pattern: idPattern },
|
|
120
|
+
schemaVersion: { type: "integer", minimum: 1 },
|
|
121
|
+
contentLevel: { type: "string", minLength: 1 },
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
const sourceMetadataSchema = (keys) => ({
|
|
125
|
+
type: "object",
|
|
126
|
+
additionalProperties: false,
|
|
127
|
+
maxProperties: 16,
|
|
128
|
+
properties: Object.fromEntries(keys.map((key) => [key, {
|
|
129
|
+
oneOf: [
|
|
130
|
+
{ type: "string", minLength: 1, maxLength: 256 },
|
|
131
|
+
{ type: "array", maxItems: 32, items: { type: "string", minLength: 1, maxLength: 256 } },
|
|
132
|
+
],
|
|
133
|
+
}])),
|
|
134
|
+
});
|
|
135
|
+
const sourceArtifactSchema = {
|
|
136
|
+
type: "object",
|
|
137
|
+
additionalProperties: false,
|
|
138
|
+
required: ["version", "artifactType", "schemaVersion", "artifactId", "type", "stableId", "title", "body", "metadata", "contentDigest"],
|
|
139
|
+
properties: {
|
|
140
|
+
version: { const: 1 },
|
|
141
|
+
artifactType: { const: "requirement-source" },
|
|
142
|
+
schemaVersion: { const: 1 },
|
|
143
|
+
artifactId: { type: "string", pattern: "^source-[a-f0-9]{64}$" },
|
|
144
|
+
type: { enum: ["user.prompt", "local.file", "github.issue", "gitlab.issue", "feishu.document"] },
|
|
145
|
+
stableId: { type: "string", minLength: 1, maxLength: 512 },
|
|
146
|
+
canonicalUrl: { type: "string", format: "uri", maxLength: 2048 },
|
|
147
|
+
title: { type: "string", minLength: 1, maxLength: 512 },
|
|
148
|
+
body: { type: "string", minLength: 1, maxLength: 524288 },
|
|
149
|
+
updatedAt: { type: "string", format: "date-time" },
|
|
150
|
+
metadata: { type: "object" },
|
|
151
|
+
contentDigest: { type: "string", pattern: "^sha256:[a-f0-9]{64}$" },
|
|
152
|
+
},
|
|
153
|
+
allOf: [
|
|
154
|
+
{ if: { properties: { type: { enum: ["user.prompt", "local.file"] } }, required: ["type"] }, then: { properties: { metadata: sourceMetadataSchema([]) } } },
|
|
155
|
+
{ if: { properties: { type: { enum: ["github.issue", "gitlab.issue"] } }, required: ["type"] }, then: { properties: { metadata: sourceMetadataSchema(["assignees", "author", "labels", "repository", "state"]) } } },
|
|
156
|
+
{ if: { properties: { type: { const: "feishu.document" } }, required: ["type"] }, then: { properties: { metadata: sourceMetadataSchema(["owner", "revision", "space"]) } } },
|
|
157
|
+
],
|
|
158
|
+
};
|
|
159
|
+
const requirementSourceSchema = {
|
|
160
|
+
oneOf: [
|
|
161
|
+
{
|
|
162
|
+
type: "object", additionalProperties: false, required: ["type", "text"],
|
|
163
|
+
properties: { type: { const: "prompt" }, text: { type: "string", minLength: 1 } },
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: "object", additionalProperties: false, required: ["type", "path"],
|
|
167
|
+
properties: { type: { const: "file" }, path: { type: "string", minLength: 1 } },
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: "object", additionalProperties: false, required: ["type", "provider", "id"],
|
|
171
|
+
properties: {
|
|
172
|
+
type: { const: "issue" }, provider: { type: "string", minLength: 1 },
|
|
173
|
+
id: { type: "string", minLength: 1 }, url: { type: "string", format: "uri" },
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
};
|
|
178
|
+
const submitResultSchema = {
|
|
179
|
+
type: "object",
|
|
180
|
+
additionalProperties: false,
|
|
181
|
+
required: ["version", "status", "summary", "modifiedFiles", "artifacts", "commands", "evidence", "externalWrites", "remainingRisks"],
|
|
182
|
+
properties: {
|
|
183
|
+
version: { const: 1 },
|
|
184
|
+
status: { enum: ["completed", "failed"] },
|
|
185
|
+
summary: { type: "string", minLength: 1 },
|
|
186
|
+
modifiedFiles: stringArray,
|
|
187
|
+
artifacts: { type: "array", items: artifactReferenceSchema },
|
|
188
|
+
commands: { type: "array", items: { type: "object" } },
|
|
189
|
+
evidence: { type: "array", items: { type: "object" } },
|
|
190
|
+
externalWrites: { type: "array", items: { type: "object" } },
|
|
191
|
+
remainingRisks: { type: "array", items: { type: "object" } },
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
const strictDigestSchema = { type: "string", pattern: "^sha256:[a-f0-9]{64}$" };
|
|
195
|
+
const externalTargetSchema = {
|
|
196
|
+
type: "object",
|
|
197
|
+
additionalProperties: false,
|
|
198
|
+
required: ["kind", "stableId"],
|
|
199
|
+
properties: {
|
|
200
|
+
kind: { enum: ["repository", "issue", "knowledge"] },
|
|
201
|
+
stableId: { type: "string", minLength: 1, maxLength: 4096 },
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
const externalActionIdentityProperties = {
|
|
205
|
+
requestId: { type: "string", pattern: "^external-request-[a-f0-9]{64}$" },
|
|
206
|
+
requestDigest: strictDigestSchema,
|
|
207
|
+
workItemId: { type: "string", pattern: workItemIdPattern },
|
|
208
|
+
stepId: { type: "string", pattern: stepInstanceIdPattern },
|
|
209
|
+
attemptId: { type: "string", pattern: attemptIdPattern },
|
|
210
|
+
provider: { type: "string", pattern: "^[a-z][a-z0-9-]{0,62}$" },
|
|
211
|
+
action: { enum: ["git.commit", "issue.update", "knowledge.publish", "issue.close"] },
|
|
212
|
+
securityClass: { enum: ["local-write", "external-write"] },
|
|
213
|
+
target: externalTargetSchema,
|
|
214
|
+
externalEffectKind: { const: "issue.comment" },
|
|
215
|
+
payloadDigest: strictDigestSchema,
|
|
216
|
+
expectedContentDigest: strictDigestSchema,
|
|
217
|
+
payloadArtifactDigest: strictDigestSchema,
|
|
218
|
+
bindingDigest: strictDigestSchema,
|
|
219
|
+
inputDigest: strictDigestSchema,
|
|
220
|
+
artifactDigests: { type: "array", uniqueItems: true, items: strictDigestSchema },
|
|
221
|
+
idempotencyKey: { type: "string", pattern: "^external:[a-f0-9]{64}$" },
|
|
222
|
+
profile: { enum: ["quick", "standard", "governed"] },
|
|
223
|
+
profileDigest: strictDigestSchema,
|
|
224
|
+
workspaceDigest: strictDigestSchema,
|
|
225
|
+
configDigest: strictDigestSchema,
|
|
226
|
+
};
|
|
227
|
+
const governedActionConditions = [
|
|
228
|
+
{
|
|
229
|
+
if: { properties: { externalEffectKind: { const: "issue.comment" } }, required: ["externalEffectKind"] },
|
|
230
|
+
then: { properties: {
|
|
231
|
+
action: { const: "issue.update" },
|
|
232
|
+
securityClass: { const: "external-write" },
|
|
233
|
+
target: { type: "object", properties: { kind: { const: "issue" } } },
|
|
234
|
+
} },
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
if: { properties: { action: { const: "knowledge.publish" } }, required: ["action"] },
|
|
238
|
+
then: { properties: {
|
|
239
|
+
securityClass: { const: "external-write" },
|
|
240
|
+
target: { type: "object", properties: { kind: { const: "knowledge" } } },
|
|
241
|
+
} },
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
if: { properties: { action: { enum: ["issue.update", "issue.close"] } }, required: ["action"] },
|
|
245
|
+
then: { properties: {
|
|
246
|
+
securityClass: { const: "external-write" },
|
|
247
|
+
target: { type: "object", properties: { kind: { const: "issue" } } },
|
|
248
|
+
} },
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
if: { properties: { action: { const: "git.commit" } }, required: ["action"] },
|
|
252
|
+
then: { properties: {
|
|
253
|
+
provider: { const: "git-native" },
|
|
254
|
+
securityClass: { const: "local-write" },
|
|
255
|
+
target: { type: "object", properties: { kind: { const: "repository" } } },
|
|
256
|
+
} },
|
|
257
|
+
},
|
|
258
|
+
];
|
|
259
|
+
const governedReceiptConditions = [
|
|
260
|
+
{
|
|
261
|
+
if: { properties: { externalEffectKind: { const: "issue.comment" } }, required: ["externalEffectKind"] },
|
|
262
|
+
then: {
|
|
263
|
+
properties: { externalEffectId: { type: "string", pattern: "^(?:github-comment|gitlab-note):[1-9][0-9]{0,15}$" } },
|
|
264
|
+
required: ["externalEffectId"],
|
|
265
|
+
},
|
|
266
|
+
else: { properties: { externalEffectId: false } },
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
if: { properties: { action: { const: "knowledge.publish" } }, required: ["action"] },
|
|
270
|
+
then: { properties: { target: { type: "object", properties: { kind: { const: "knowledge" } } } } },
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
if: { properties: { action: { enum: ["issue.update", "issue.close"] } }, required: ["action"] },
|
|
274
|
+
then: { properties: { target: { type: "object", properties: { kind: { const: "issue" } } } } },
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
if: { properties: { action: { const: "git.commit" } }, required: ["action"] },
|
|
278
|
+
then: { properties: {
|
|
279
|
+
provider: { const: "git-native" },
|
|
280
|
+
target: { type: "object", properties: { kind: { const: "repository" } } },
|
|
281
|
+
} },
|
|
282
|
+
},
|
|
283
|
+
];
|
|
284
|
+
const workPackageSchema = {
|
|
285
|
+
type: "object",
|
|
286
|
+
additionalProperties: false,
|
|
287
|
+
required: ["version", "workItemId", "stepId", "attemptId", "lease", "objective", "skills", "artifacts", "constraints", "requiredOutputs", "gates", "resultSchema"],
|
|
288
|
+
properties: {
|
|
289
|
+
version: { const: 1 },
|
|
290
|
+
workItemId: { type: "string", pattern: workItemIdPattern },
|
|
291
|
+
stepId: { type: "string", pattern: stepInstanceIdPattern },
|
|
292
|
+
attemptId: { type: "string", pattern: attemptIdPattern },
|
|
293
|
+
lease: {
|
|
294
|
+
type: "object", additionalProperties: false, required: ["token", "expiresAt"],
|
|
295
|
+
properties: { token: { type: "string", minLength: 1 }, expiresAt: { type: "string", format: "date-time" } },
|
|
296
|
+
},
|
|
297
|
+
objective: { type: "string", minLength: 1 },
|
|
298
|
+
artifactLevel: { type: "string", minLength: 1 },
|
|
299
|
+
skills: {
|
|
300
|
+
type: "array",
|
|
301
|
+
items: {
|
|
302
|
+
type: "object", additionalProperties: false, required: ["ref", "version", "digest", "description"],
|
|
303
|
+
properties: {
|
|
304
|
+
ref: { type: "string", minLength: 1 }, version: { type: "string", minLength: 1 },
|
|
305
|
+
digest: { type: "string", pattern: digestPattern }, description: { type: "string", minLength: 1 },
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
artifacts: { type: "array", items: artifactReferenceSchema },
|
|
310
|
+
constraints: {
|
|
311
|
+
type: "object", additionalProperties: false, required: ["allowedPaths", "forbiddenActions"],
|
|
312
|
+
properties: { allowedPaths: stringArray, forbiddenActions: stringArray },
|
|
313
|
+
},
|
|
314
|
+
requiredOutputs: { type: "array", items: artifactExpectationSchema },
|
|
315
|
+
artifactAuthoring: {
|
|
316
|
+
type: "object", additionalProperties: false, required: ["version", "maxContentBytes", "draftRoots"],
|
|
317
|
+
properties: {
|
|
318
|
+
version: { const: 1 },
|
|
319
|
+
maxContentBytes: { type: "integer", minimum: 1, maximum: 1_048_576 },
|
|
320
|
+
draftRoots: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1 } },
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
gates: {
|
|
324
|
+
type: "array",
|
|
325
|
+
items: {
|
|
326
|
+
type: "object", additionalProperties: false, required: ["id", "evidence", "required"],
|
|
327
|
+
properties: {
|
|
328
|
+
id: { type: "string", pattern: gateIdPattern },
|
|
329
|
+
evidence: { enum: ["trusted", "attested", "reported"] }, required: { type: "boolean" },
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
resultSchema: { const: "builtin.submit-result.v1" },
|
|
334
|
+
},
|
|
335
|
+
};
|
|
336
|
+
const publishBinding = (properties) => ({
|
|
337
|
+
anyOf: [
|
|
338
|
+
{ type: "null" },
|
|
339
|
+
{
|
|
340
|
+
type: "object",
|
|
341
|
+
additionalProperties: false,
|
|
342
|
+
required: Object.keys(properties).slice(0, 3),
|
|
343
|
+
properties,
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
});
|
|
347
|
+
function applicationProjectConfigSchema(id, portable) {
|
|
348
|
+
return {
|
|
349
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
350
|
+
$id: id,
|
|
351
|
+
type: "object",
|
|
352
|
+
additionalProperties: false,
|
|
353
|
+
required: ["version"],
|
|
354
|
+
properties: {
|
|
355
|
+
version: { const: 1 },
|
|
356
|
+
trigger: {
|
|
357
|
+
type: "object",
|
|
358
|
+
additionalProperties: false,
|
|
359
|
+
required: ["mode"],
|
|
360
|
+
properties: { mode: { enum: ["off", "suggest", "active-only"] } },
|
|
361
|
+
},
|
|
362
|
+
git: {
|
|
363
|
+
type: "object",
|
|
364
|
+
additionalProperties: false,
|
|
365
|
+
required: ["worktrees"],
|
|
366
|
+
properties: {
|
|
367
|
+
worktrees: {
|
|
368
|
+
type: "object",
|
|
369
|
+
additionalProperties: false,
|
|
370
|
+
required: ["enabled", "root", "branchPrefix"],
|
|
371
|
+
properties: {
|
|
372
|
+
enabled: { const: true },
|
|
373
|
+
root: { type: "string", minLength: 1 },
|
|
374
|
+
branchPrefix: { type: "string", minLength: 1 },
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
runtime: {
|
|
380
|
+
type: "object",
|
|
381
|
+
additionalProperties: false,
|
|
382
|
+
required: ["claimTtlSeconds", "maxStageRetries"],
|
|
383
|
+
properties: {
|
|
384
|
+
claimTtlSeconds: { type: "integer", minimum: 60, maximum: 86400 },
|
|
385
|
+
maxStageRetries: { type: "integer", minimum: 0, maximum: 10 },
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
quality: {
|
|
389
|
+
type: "object",
|
|
390
|
+
additionalProperties: false,
|
|
391
|
+
required: ["gates"],
|
|
392
|
+
properties: {
|
|
393
|
+
gates: {
|
|
394
|
+
type: "object",
|
|
395
|
+
minProperties: 1,
|
|
396
|
+
propertyNames: { pattern: idPattern },
|
|
397
|
+
additionalProperties: gateSchema,
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
testing: {
|
|
402
|
+
type: "object",
|
|
403
|
+
additionalProperties: false,
|
|
404
|
+
required: ["pathRules", "testAssetPaths", "productPaths"],
|
|
405
|
+
properties: {
|
|
406
|
+
pathRules: { type: "array", minItems: 1, uniqueItems: true, items: testPathRuleSchema },
|
|
407
|
+
testAssetPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
408
|
+
productPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
publishing: {
|
|
412
|
+
type: "object",
|
|
413
|
+
additionalProperties: false,
|
|
414
|
+
required: ["targets"],
|
|
415
|
+
properties: {
|
|
416
|
+
targets: {
|
|
417
|
+
type: "object",
|
|
418
|
+
additionalProperties: false,
|
|
419
|
+
properties: {
|
|
420
|
+
knowledge: {
|
|
421
|
+
type: "object",
|
|
422
|
+
additionalProperties: false,
|
|
423
|
+
required: ["provider", "document"],
|
|
424
|
+
properties: {
|
|
425
|
+
provider: { const: "feishu" },
|
|
426
|
+
document: { type: "string", minLength: 1, maxLength: 2048 },
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
documentation: {
|
|
434
|
+
type: "object",
|
|
435
|
+
additionalProperties: false,
|
|
436
|
+
required: ["allowedPaths"],
|
|
437
|
+
properties: {
|
|
438
|
+
allowedPaths: {
|
|
439
|
+
type: "array",
|
|
440
|
+
minItems: 1,
|
|
441
|
+
uniqueItems: true,
|
|
442
|
+
items: { type: "string", minLength: 1 },
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
skills: {
|
|
447
|
+
type: "object",
|
|
448
|
+
additionalProperties: false,
|
|
449
|
+
required: ["additionalGlobalRoots"],
|
|
450
|
+
properties: {
|
|
451
|
+
additionalGlobalRoots: {
|
|
452
|
+
type: "array",
|
|
453
|
+
minItems: 1,
|
|
454
|
+
...(portable ? { uniqueItems: true } : {}),
|
|
455
|
+
items: {
|
|
456
|
+
type: "object",
|
|
457
|
+
additionalProperties: false,
|
|
458
|
+
required: portable ? ["id"] : ["id", "path"],
|
|
459
|
+
properties: {
|
|
460
|
+
id: { type: "string", pattern: idPattern },
|
|
461
|
+
...(portable ? {} : { path: { type: "string", minLength: 1 } }),
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
export const schemas = {
|
|
471
|
+
"builtin.workflow-selection.v1": {
|
|
472
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
473
|
+
$id: "builtin.workflow-selection.v1",
|
|
474
|
+
type: "object",
|
|
475
|
+
additionalProperties: false,
|
|
476
|
+
required: ["version", "activeWorkflow"],
|
|
477
|
+
properties: {
|
|
478
|
+
version: { const: 1 },
|
|
479
|
+
activeWorkflow: {
|
|
480
|
+
type: "object",
|
|
481
|
+
additionalProperties: false,
|
|
482
|
+
required: ["ref", "version"],
|
|
483
|
+
properties: {
|
|
484
|
+
ref: { type: "string", pattern: "^(builtin|project)://workflows/[a-z0-9][a-z0-9-]*$" },
|
|
485
|
+
version: { const: 1 },
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
profile: { enum: ["auto", "quick", "standard", "governed"] },
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
"builtin.application-project-config.v1": applicationProjectConfigSchema("builtin.application-project-config.v1", false),
|
|
492
|
+
"builtin.application-project-config-snapshot.v1": applicationProjectConfigSchema("builtin.application-project-config-snapshot.v1", true),
|
|
493
|
+
"builtin.source-artifact.v1": {
|
|
494
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
495
|
+
$id: "builtin.source-artifact.v1",
|
|
496
|
+
...sourceArtifactSchema,
|
|
497
|
+
},
|
|
498
|
+
"builtin.work-item.v1": {
|
|
499
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
500
|
+
$id: "builtin.work-item.v1",
|
|
501
|
+
type: "object",
|
|
502
|
+
additionalProperties: false,
|
|
503
|
+
required: ["version", "workItemId", "repositoryId", "title", "createdAt", "status", "execution", "source", "bindings"],
|
|
504
|
+
properties: {
|
|
505
|
+
version: { const: 1 },
|
|
506
|
+
workItemId: { type: "string", pattern: workItemIdPattern },
|
|
507
|
+
repositoryId: { type: "string", pattern: repositoryIdPattern },
|
|
508
|
+
title: { type: "string", minLength: 1 },
|
|
509
|
+
createdAt: { type: "string", format: "date-time" },
|
|
510
|
+
status: { enum: ["draft", "active", "awaiting_approval", "verifying", "verified", "blocked", "pending_publish", "reconciliation_required", "paused", "closed", "cancelled"] },
|
|
511
|
+
execution: {
|
|
512
|
+
type: "object",
|
|
513
|
+
additionalProperties: false,
|
|
514
|
+
required: ["worktree", "branch", "baselineRevision", "baselineTreeDigest", "workflowDigest", "configDigest", "schemaDigest"],
|
|
515
|
+
properties: {
|
|
516
|
+
worktree: { type: "string", minLength: 1 },
|
|
517
|
+
branch: { type: "string", minLength: 1 },
|
|
518
|
+
baselineRevision: { type: "string", minLength: 1 },
|
|
519
|
+
baselineTreeDigest: { type: "string", pattern: digestPattern },
|
|
520
|
+
workflowDigest: { type: "string", pattern: digestPattern },
|
|
521
|
+
configDigest: { type: "string", pattern: digestPattern },
|
|
522
|
+
schemaDigest: { type: "string", pattern: digestPattern },
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
source: {
|
|
526
|
+
type: "object",
|
|
527
|
+
additionalProperties: false,
|
|
528
|
+
required: ["type", "artifactId", "snapshot", "contentDigest", "artifactDigest"],
|
|
529
|
+
properties: {
|
|
530
|
+
type: { enum: ["user.prompt", "local.file", "github.issue", "gitlab.issue", "feishu.document"] },
|
|
531
|
+
artifactId: { type: "string", pattern: "^source-[a-f0-9]{64}$" },
|
|
532
|
+
snapshot: { type: "string", minLength: 1 },
|
|
533
|
+
contentDigest: { type: "string", pattern: digestPattern },
|
|
534
|
+
artifactDigest: { type: "string", pattern: "^sha256:[a-f0-9]{64}$" },
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
bindings: {
|
|
538
|
+
type: "object",
|
|
539
|
+
additionalProperties: false,
|
|
540
|
+
required: ["issue", "knowledge"],
|
|
541
|
+
properties: {
|
|
542
|
+
issue: publishBinding({ provider: { type: "string" }, stableId: { type: "string" }, url: { type: "string" } }),
|
|
543
|
+
knowledge: publishBinding({ adapter: { type: "string" }, space: { type: "string" }, stableId: { type: "string" }, url: { type: "string" } }),
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
"builtin.application-start-input.v1": {
|
|
549
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.application-start-input.v1",
|
|
550
|
+
type: "object", additionalProperties: false, required: ["root", "source"],
|
|
551
|
+
properties: {
|
|
552
|
+
root: { type: "string", minLength: 1 }, source: requirementSourceSchema,
|
|
553
|
+
workflowRef: { type: "string", minLength: 1 },
|
|
554
|
+
profile: { enum: ["auto", "quick", "standard", "governed"] },
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
"builtin.application-acquire-input.v1": {
|
|
558
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.application-acquire-input.v1",
|
|
559
|
+
type: "object", additionalProperties: false, required: ["root", "workItemId", "actor"],
|
|
560
|
+
properties: {
|
|
561
|
+
root: { type: "string", minLength: 1 }, workItemId: { type: "string", pattern: workItemIdPattern },
|
|
562
|
+
actor: { type: "string", minLength: 1 },
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
|
+
"builtin.application-artifact-create-input.v1": {
|
|
566
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.application-artifact-create-input.v1",
|
|
567
|
+
type: "object", additionalProperties: false,
|
|
568
|
+
required: ["root", "workItemId", "stepId", "attemptId", "leaseToken", "artifactType", "contentFile"],
|
|
569
|
+
properties: {
|
|
570
|
+
root: { type: "string", minLength: 1 }, workItemId: { type: "string", pattern: workItemIdPattern },
|
|
571
|
+
stepId: { type: "string", pattern: stepInstanceIdPattern }, attemptId: { type: "string", pattern: attemptIdPattern },
|
|
572
|
+
leaseToken: { type: "string", minLength: 1 }, artifactType: { type: "string", pattern: idPattern },
|
|
573
|
+
outputId: { type: "string", pattern: idPattern }, contentFile: { type: "string", minLength: 1 },
|
|
574
|
+
},
|
|
575
|
+
},
|
|
576
|
+
"builtin.application-submit-input.v1": {
|
|
577
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.application-submit-input.v1",
|
|
578
|
+
type: "object", additionalProperties: false,
|
|
579
|
+
required: ["root", "workItemId", "stepId", "attemptId", "leaseToken", "result"],
|
|
580
|
+
properties: {
|
|
581
|
+
root: { type: "string", minLength: 1 }, workItemId: { type: "string", pattern: workItemIdPattern },
|
|
582
|
+
stepId: { type: "string", pattern: stepInstanceIdPattern }, attemptId: { type: "string", pattern: attemptIdPattern },
|
|
583
|
+
leaseToken: { type: "string", minLength: 1 }, result: submitResultSchema,
|
|
584
|
+
},
|
|
585
|
+
},
|
|
586
|
+
"builtin.application-decision-input.v1": {
|
|
587
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.application-decision-input.v1",
|
|
588
|
+
oneOf: [
|
|
589
|
+
{
|
|
590
|
+
type: "object", additionalProperties: false,
|
|
591
|
+
required: ["kind", "root", "workItemId", "requestId", "decision", "expectedDigest", "actor"],
|
|
592
|
+
properties: {
|
|
593
|
+
kind: { const: "approval" }, root: { type: "string", minLength: 1 },
|
|
594
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, requestId: { type: "string", minLength: 1 },
|
|
595
|
+
decision: { enum: ["approved", "rejected"] }, expectedDigest: { type: "string", pattern: digestPattern },
|
|
596
|
+
actor: { type: "string", minLength: 1 },
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
type: "object", additionalProperties: false,
|
|
601
|
+
required: ["kind", "root", "requestId", "decision", "expectedPackageDigest", "expectedCapabilityDigest", "actor"],
|
|
602
|
+
properties: {
|
|
603
|
+
kind: { const: "workflow_trust" }, root: { type: "string", minLength: 1 },
|
|
604
|
+
requestId: { type: "string", minLength: 1 }, decision: { enum: ["trusted", "rejected"] },
|
|
605
|
+
expectedPackageDigest: { type: "string", pattern: digestPattern },
|
|
606
|
+
expectedCapabilityDigest: { type: "string", pattern: digestPattern }, actor: { type: "string", minLength: 1 },
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
type: "object", additionalProperties: false,
|
|
611
|
+
required: ["kind", "root", "workItemId", "requestId", "decision", "expectedDigest", "actor"],
|
|
612
|
+
properties: {
|
|
613
|
+
kind: { const: "external_action" }, root: { type: "string", minLength: 1 },
|
|
614
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, requestId: { type: "string", minLength: 1 },
|
|
615
|
+
decision: { enum: ["approved", "rejected"] }, expectedDigest: { type: "string", pattern: digestPattern },
|
|
616
|
+
actor: { type: "string", minLength: 1 },
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
type: "object", additionalProperties: false,
|
|
621
|
+
required: ["kind", "root", "workItemId", "requestId", "decision", "expectedDigest", "actor"],
|
|
622
|
+
properties: {
|
|
623
|
+
kind: { const: "external_reconciliation" }, root: { type: "string", minLength: 1 },
|
|
624
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, requestId: { type: "string", minLength: 1 },
|
|
625
|
+
decision: { const: "reconcile" }, expectedDigest: strictDigestSchema,
|
|
626
|
+
actor: { type: "string", minLength: 1 },
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
type: "object", additionalProperties: false,
|
|
631
|
+
required: ["kind", "root", "workItemId", "requestId", "decision", "expectedDigest", "evidence", "actor"],
|
|
632
|
+
properties: {
|
|
633
|
+
kind: { const: "external_reconciliation" }, root: { type: "string", minLength: 1 },
|
|
634
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, requestId: { type: "string", minLength: 1 },
|
|
635
|
+
decision: { const: "mark_failed" }, expectedDigest: strictDigestSchema,
|
|
636
|
+
evidence: { type: "string", minLength: 1, maxLength: 2048 },
|
|
637
|
+
actor: { type: "string", minLength: 1 },
|
|
638
|
+
},
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
type: "object", additionalProperties: false,
|
|
642
|
+
required: ["kind", "root", "workItemId", "requestId", "decision", "expectedDigest", "externalStableId", "contentDigest", "evidence", "actor"],
|
|
643
|
+
properties: {
|
|
644
|
+
kind: { const: "external_reconciliation" }, root: { type: "string", minLength: 1 },
|
|
645
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, requestId: { type: "string", minLength: 1 },
|
|
646
|
+
decision: { const: "adopt_verified" }, expectedDigest: strictDigestSchema,
|
|
647
|
+
externalStableId: { type: "string", minLength: 1, maxLength: 2048 },
|
|
648
|
+
contentDigest: strictDigestSchema,
|
|
649
|
+
evidence: { type: "string", minLength: 1, maxLength: 2048 },
|
|
650
|
+
actor: { type: "string", minLength: 1 },
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
],
|
|
654
|
+
},
|
|
655
|
+
"builtin.application-inspect-input.v1": {
|
|
656
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.application-inspect-input.v1",
|
|
657
|
+
type: "object", additionalProperties: false, required: ["root", "workItemId"],
|
|
658
|
+
properties: { root: { type: "string", minLength: 1 }, workItemId: { type: "string", pattern: workItemIdPattern } },
|
|
659
|
+
},
|
|
660
|
+
"builtin.agent-action.v1": {
|
|
661
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.agent-action.v1",
|
|
662
|
+
oneOf: [
|
|
663
|
+
{
|
|
664
|
+
type: "object", additionalProperties: false, required: ["action", "workPackage"],
|
|
665
|
+
properties: { action: { const: "execute" }, workPackage: workPackageSchema },
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
type: "object", additionalProperties: false, required: ["action", "approval"],
|
|
669
|
+
properties: {
|
|
670
|
+
action: { const: "await_approval" },
|
|
671
|
+
approval: {
|
|
672
|
+
oneOf: [
|
|
673
|
+
...["step", "workflow_trust"].map((kind) => ({
|
|
674
|
+
type: "object", additionalProperties: false,
|
|
675
|
+
required: ["kind", "requestId", "workItemId", "title", "digest"],
|
|
676
|
+
properties: {
|
|
677
|
+
kind: { const: kind }, requestId: { type: "string", minLength: 1 },
|
|
678
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, title: { type: "string", minLength: 1 },
|
|
679
|
+
digest: { type: "string", pattern: digestPattern },
|
|
680
|
+
},
|
|
681
|
+
})),
|
|
682
|
+
{
|
|
683
|
+
type: "object", additionalProperties: false,
|
|
684
|
+
required: ["kind", "requestId", "workItemId", "title", "digest", "provider", "action", "target", "sideEffects"],
|
|
685
|
+
properties: {
|
|
686
|
+
kind: { const: "external_action" }, requestId: { type: "string", minLength: 1 },
|
|
687
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, title: { type: "string", minLength: 1 },
|
|
688
|
+
digest: { type: "string", pattern: digestPattern },
|
|
689
|
+
provider: { type: "string", pattern: "^[a-z][a-z0-9-]{0,62}$" },
|
|
690
|
+
action: externalActionIdentityProperties.action,
|
|
691
|
+
target: externalTargetSchema,
|
|
692
|
+
sideEffects: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 256 } },
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
],
|
|
696
|
+
},
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
type: "object", additionalProperties: false, required: ["action", "problems"],
|
|
701
|
+
properties: {
|
|
702
|
+
action: { const: "blocked" }, problems: {
|
|
703
|
+
type: "array", minItems: 1, items: {
|
|
704
|
+
type: "object", additionalProperties: false, required: ["code", "message", "retryable"],
|
|
705
|
+
properties: {
|
|
706
|
+
code: { type: "string", pattern: errorCodePattern }, message: { type: "string", minLength: 1 },
|
|
707
|
+
retryable: { type: "boolean" },
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
},
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
type: "object", additionalProperties: false, required: ["action", "summary"],
|
|
715
|
+
properties: {
|
|
716
|
+
action: { const: "completed" }, summary: {
|
|
717
|
+
type: "object", additionalProperties: false, required: ["workItemId", "status", "message"],
|
|
718
|
+
properties: {
|
|
719
|
+
workItemId: { type: "string", pattern: workItemIdPattern }, status: { enum: ["closed", "cancelled"] },
|
|
720
|
+
message: { type: "string", minLength: 1 },
|
|
721
|
+
},
|
|
722
|
+
},
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
],
|
|
726
|
+
},
|
|
727
|
+
"builtin.work-package.v1": {
|
|
728
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.work-package.v1", ...workPackageSchema,
|
|
729
|
+
},
|
|
730
|
+
"builtin.submit-result.v1": {
|
|
731
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.submit-result.v1", ...submitResultSchema,
|
|
732
|
+
},
|
|
733
|
+
"builtin.evidence.v1": {
|
|
734
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
735
|
+
$id: "builtin.evidence.v1",
|
|
736
|
+
type: "object",
|
|
737
|
+
additionalProperties: false,
|
|
738
|
+
required: ["evidenceId", "level", "gateId", "codeRevision", "baselineTreeDigest", "workspaceTreeDigest", "configDigest", "attemptId", "result", "recordHash"],
|
|
739
|
+
properties: {
|
|
740
|
+
evidenceId: { type: "string", minLength: 1 },
|
|
741
|
+
level: { enum: ["trusted", "attested", "reported"] },
|
|
742
|
+
gateId: { type: "string", pattern: gateIdPattern },
|
|
743
|
+
codeRevision: { type: "string", minLength: 1 },
|
|
744
|
+
baselineTreeDigest: { type: "string", pattern: digestPattern },
|
|
745
|
+
workspaceTreeDigest: { type: "string", pattern: digestPattern },
|
|
746
|
+
configDigest: { type: "string", pattern: digestPattern },
|
|
747
|
+
attemptId: { type: "string", pattern: "^attempt-.+$" },
|
|
748
|
+
result: { enum: ["passed", "failed"] },
|
|
749
|
+
recordHash: { type: "string", pattern: digestPattern },
|
|
750
|
+
},
|
|
751
|
+
},
|
|
752
|
+
"builtin.tdd-trusted-evidence.v1": {
|
|
753
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
754
|
+
$id: "builtin.tdd-trusted-evidence.v1",
|
|
755
|
+
type: "object",
|
|
756
|
+
additionalProperties: false,
|
|
757
|
+
required: ["evidenceId", "level", "phase", "taskId", "stepId", "commandId", "commandDigest", "exitCode", "failedTests", "testPaths", "testFiles", "testPathsDigest", "testPathRules", "testAssets", "testAssetsDigest", "testAssetPaths", "testAssetRoots", "productPaths", "workspaceDigest", "summary"],
|
|
758
|
+
properties: {
|
|
759
|
+
evidenceId: { type: "string", pattern: "^evidence-[a-f0-9]{64}$" },
|
|
760
|
+
level: { const: "trusted" },
|
|
761
|
+
phase: { enum: ["red", "green"] },
|
|
762
|
+
taskId: { type: "string", pattern: workItemIdPattern },
|
|
763
|
+
stepId: { type: "string", pattern: stepInstanceIdPattern },
|
|
764
|
+
commandId: { type: "string", pattern: idPattern },
|
|
765
|
+
commandDigest: { type: "string", pattern: digestPattern },
|
|
766
|
+
exitCode: { type: "integer" },
|
|
767
|
+
failedTests: { type: "array", maxItems: 100, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 512 } },
|
|
768
|
+
testPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1 } },
|
|
769
|
+
testFiles: {
|
|
770
|
+
type: "array", minItems: 1, items: {
|
|
771
|
+
type: "object", additionalProperties: false, required: ["path", "digest"],
|
|
772
|
+
properties: { path: { type: "string", minLength: 1 }, digest: { type: "string", pattern: digestPattern } },
|
|
773
|
+
},
|
|
774
|
+
},
|
|
775
|
+
testPathsDigest: { type: "string", pattern: digestPattern },
|
|
776
|
+
testPathRules: { type: "array", minItems: 1, uniqueItems: true, items: testPathRuleSchema },
|
|
777
|
+
testAssets: {
|
|
778
|
+
type: "array", minItems: 1, items: {
|
|
779
|
+
type: "object", additionalProperties: false, required: ["path", "digest"],
|
|
780
|
+
properties: { path: { type: "string", minLength: 1 }, digest: { type: "string", pattern: digestPattern } },
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
testAssetsDigest: { type: "string", pattern: digestPattern },
|
|
784
|
+
testAssetPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
785
|
+
testAssetRoots: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
786
|
+
productPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
787
|
+
workspaceDigest: { type: "string", pattern: digestPattern },
|
|
788
|
+
summary: { type: "string", maxLength: 8192 },
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
"builtin.tdd-cycle-evidence.v1": {
|
|
792
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
793
|
+
$id: "builtin.tdd-cycle-evidence.v1",
|
|
794
|
+
type: "object",
|
|
795
|
+
additionalProperties: false,
|
|
796
|
+
required: ["taskId", "testPaths", "testPathRules", "testAssets", "testAssetsDigest", "testAssetPaths", "testAssetRoots", "productPaths", "commandId", "redEvidenceId", "greenEvidenceId"],
|
|
797
|
+
properties: {
|
|
798
|
+
taskId: { type: "string", pattern: workItemIdPattern },
|
|
799
|
+
testPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1 } },
|
|
800
|
+
testPathRules: { type: "array", minItems: 1, uniqueItems: true, items: testPathRuleSchema },
|
|
801
|
+
testAssets: {
|
|
802
|
+
type: "array", minItems: 1, items: {
|
|
803
|
+
type: "object", additionalProperties: false, required: ["path", "digest"],
|
|
804
|
+
properties: { path: { type: "string", minLength: 1 }, digest: { type: "string", pattern: digestPattern } },
|
|
805
|
+
},
|
|
806
|
+
},
|
|
807
|
+
testAssetsDigest: { type: "string", pattern: digestPattern },
|
|
808
|
+
testAssetPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
809
|
+
testAssetRoots: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
810
|
+
productPaths: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 1024 } },
|
|
811
|
+
commandId: { type: "string", pattern: idPattern },
|
|
812
|
+
redEvidenceId: { type: "string", pattern: "^evidence-[a-f0-9]{64}$" },
|
|
813
|
+
greenEvidenceId: { type: "string", pattern: "^evidence-[a-f0-9]{64}$" },
|
|
814
|
+
refactorEvidenceId: { type: "string", pattern: "^evidence-[a-f0-9]{64}$" },
|
|
815
|
+
},
|
|
816
|
+
},
|
|
817
|
+
"builtin.external-receipt.v1": {
|
|
818
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
819
|
+
$id: "builtin.external-receipt.v1",
|
|
820
|
+
type: "object",
|
|
821
|
+
additionalProperties: false,
|
|
822
|
+
required: ["version", "kind", "target", "stableId", "externalWorkItemId", "publishStepId", "publishAttemptId", "publishInputDigest", "publishedContentDigest", "readBackContentDigest", "status", "readBackStatus"],
|
|
823
|
+
properties: {
|
|
824
|
+
version: { const: 1 },
|
|
825
|
+
kind: { const: "external-receipt" },
|
|
826
|
+
target: { enum: ["issue", "knowledge"] },
|
|
827
|
+
stableId: { type: "string", minLength: 1 },
|
|
828
|
+
externalEffectKind: { const: "issue.comment" },
|
|
829
|
+
externalEffectId: { type: "string", pattern: "^(?:github-comment|gitlab-note):[1-9][0-9]{0,15}$" },
|
|
830
|
+
externalWorkItemId: { type: "string", minLength: 1 },
|
|
831
|
+
publishStepId: { type: "string", pattern: stepInstanceIdPattern },
|
|
832
|
+
publishAttemptId: { type: "string", pattern: attemptIdPattern },
|
|
833
|
+
publishInputDigest: { type: "string", pattern: digestPattern },
|
|
834
|
+
publishedContentDigest: { type: "string", pattern: digestPattern },
|
|
835
|
+
readBackContentDigest: { type: "string", pattern: digestPattern },
|
|
836
|
+
status: { const: "confirmed" },
|
|
837
|
+
readBackStatus: { enum: ["confirmed", "stale", "failed"] },
|
|
838
|
+
},
|
|
839
|
+
allOf: [{
|
|
840
|
+
if: { properties: { externalEffectKind: { const: "issue.comment" } }, required: ["externalEffectKind"] },
|
|
841
|
+
then: {
|
|
842
|
+
properties: { externalEffectId: { type: "string", pattern: "^(?:github-comment|gitlab-note):[1-9][0-9]{0,15}$" } },
|
|
843
|
+
required: ["externalEffectId"],
|
|
844
|
+
},
|
|
845
|
+
else: { properties: { externalEffectId: false } },
|
|
846
|
+
}],
|
|
847
|
+
},
|
|
848
|
+
"builtin.external-binding.v1": {
|
|
849
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
850
|
+
$id: "builtin.external-binding.v1",
|
|
851
|
+
type: "object",
|
|
852
|
+
additionalProperties: false,
|
|
853
|
+
required: ["version", "kind", "target", "exists", "stableId", "externalWorkItemId", "publishStepId", "publishAttemptId", "publishInputDigest", "expectedPublishedContentDigest"],
|
|
854
|
+
properties: {
|
|
855
|
+
version: { const: 1 },
|
|
856
|
+
kind: { const: "external-binding" },
|
|
857
|
+
target: { enum: ["issue", "knowledge"] },
|
|
858
|
+
exists: { const: true },
|
|
859
|
+
stableId: { type: "string", minLength: 1 },
|
|
860
|
+
externalWorkItemId: { type: "string", minLength: 1 },
|
|
861
|
+
publishStepId: { type: "string", pattern: stepInstanceIdPattern },
|
|
862
|
+
publishAttemptId: { type: "string", pattern: attemptIdPattern },
|
|
863
|
+
publishInputDigest: { type: "string", pattern: digestPattern },
|
|
864
|
+
expectedPublishedContentDigest: { type: "string", pattern: digestPattern },
|
|
865
|
+
},
|
|
866
|
+
},
|
|
867
|
+
"builtin.external-action-request.v1": {
|
|
868
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.external-action-request.v1",
|
|
869
|
+
type: "object", additionalProperties: false,
|
|
870
|
+
required: ["version", "requestId", "workItemId", "stepId", "attemptId", "provider", "action", "securityClass", "target", "payloadDigest", "expectedContentDigest", "payloadArtifactDigest", "bindingDigest", "inputDigest", "artifactDigests", "idempotencyKey", "profile", "profileDigest", "workspaceDigest", "configDigest", "sideEffects", "createdAt", "expiresAt", "requestDigest"],
|
|
871
|
+
properties: {
|
|
872
|
+
version: { const: 1 }, ...externalActionIdentityProperties,
|
|
873
|
+
sideEffects: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", minLength: 1, maxLength: 256 } },
|
|
874
|
+
createdAt: { type: "string", format: "date-time" }, expiresAt: { type: "string", format: "date-time" },
|
|
875
|
+
},
|
|
876
|
+
allOf: governedActionConditions,
|
|
877
|
+
},
|
|
878
|
+
"builtin.external-action-grant.v1": {
|
|
879
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.external-action-grant.v1",
|
|
880
|
+
type: "object", additionalProperties: false,
|
|
881
|
+
required: ["version", "grantId", "requestId", "requestDigest", "workItemId", "stepId", "attemptId", "provider", "action", "securityClass", "target", "payloadDigest", "expectedContentDigest", "payloadArtifactDigest", "bindingDigest", "inputDigest", "artifactDigests", "idempotencyKey", "actor", "approvalDigest", "profile", "profileDigest", "workspaceDigest", "configDigest", "decidedAt", "expiresAt", "grantDigest"],
|
|
882
|
+
properties: {
|
|
883
|
+
version: { const: 1 }, grantId: { type: "string", pattern: "^external-grant-[a-f0-9]{64}$" }, ...externalActionIdentityProperties,
|
|
884
|
+
actor: { type: "string", minLength: 1, maxLength: 256 }, approvalDigest: strictDigestSchema,
|
|
885
|
+
decidedAt: { type: "string", format: "date-time" }, expiresAt: { type: "string", format: "date-time" }, grantDigest: strictDigestSchema,
|
|
886
|
+
},
|
|
887
|
+
allOf: governedActionConditions,
|
|
888
|
+
},
|
|
889
|
+
"builtin.external-write-receipt.v1": {
|
|
890
|
+
$schema: "https://json-schema.org/draft/2020-12/schema", $id: "builtin.external-write-receipt.v1",
|
|
891
|
+
type: "object", additionalProperties: false,
|
|
892
|
+
required: ["version", "kind", "requestId", "requestDigest", "grantDigest", "workItemId", "stepId", "attemptId", "provider", "action", "target", "payloadDigest", "expectedContentDigest", "bindingDigest", "inputDigest", "artifactDigests", "idempotencyKey", "publishedContentDigest", "readBackContentDigest", "status", "verifiedAt"],
|
|
893
|
+
properties: {
|
|
894
|
+
version: { const: 1 }, kind: { const: "external-write-receipt" },
|
|
895
|
+
requestId: externalActionIdentityProperties.requestId, requestDigest: strictDigestSchema, grantDigest: strictDigestSchema,
|
|
896
|
+
workItemId: externalActionIdentityProperties.workItemId, stepId: externalActionIdentityProperties.stepId,
|
|
897
|
+
attemptId: externalActionIdentityProperties.attemptId, provider: externalActionIdentityProperties.provider,
|
|
898
|
+
action: externalActionIdentityProperties.action, target: externalTargetSchema, payloadDigest: strictDigestSchema,
|
|
899
|
+
externalEffectKind: externalActionIdentityProperties.externalEffectKind,
|
|
900
|
+
externalEffectId: { type: "string", pattern: "^(?:github-comment|gitlab-note):[1-9][0-9]{0,15}$" },
|
|
901
|
+
expectedContentDigest: strictDigestSchema,
|
|
902
|
+
bindingDigest: strictDigestSchema, inputDigest: strictDigestSchema, artifactDigests: externalActionIdentityProperties.artifactDigests,
|
|
903
|
+
idempotencyKey: externalActionIdentityProperties.idempotencyKey,
|
|
904
|
+
publishedContentDigest: strictDigestSchema, readBackContentDigest: strictDigestSchema,
|
|
905
|
+
status: { const: "verified" }, verifiedAt: { type: "string", format: "date-time" },
|
|
906
|
+
},
|
|
907
|
+
allOf: governedReceiptConditions,
|
|
908
|
+
},
|
|
909
|
+
"builtin.tdd-node-test-report.v1": {
|
|
910
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
911
|
+
$id: "builtin.tdd-node-test-report.v1",
|
|
912
|
+
type: "object",
|
|
913
|
+
additionalProperties: false,
|
|
914
|
+
required: ["version", "adapter", "summary", "failureTotal", "truncated", "failures"],
|
|
915
|
+
properties: {
|
|
916
|
+
version: { const: 1 },
|
|
917
|
+
adapter: { const: "node-test" },
|
|
918
|
+
summary: {
|
|
919
|
+
type: "object", additionalProperties: false,
|
|
920
|
+
required: ["success", "tests", "passed", "failed", "cancelled", "skipped", "todo"],
|
|
921
|
+
properties: {
|
|
922
|
+
success: { type: "boolean" }, tests: { type: "integer", minimum: 0 }, passed: { type: "integer", minimum: 0 },
|
|
923
|
+
failed: { type: "integer", minimum: 0 }, cancelled: { type: "integer", minimum: 0 }, skipped: { type: "integer", minimum: 0 },
|
|
924
|
+
todo: { type: "integer", minimum: 0 },
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
failureTotal: { type: "integer", minimum: 0 },
|
|
928
|
+
truncated: { type: "boolean" },
|
|
929
|
+
failures: {
|
|
930
|
+
type: "array", maxItems: 100, items: {
|
|
931
|
+
type: "object", additionalProperties: false, required: ["name", "file", "kind"],
|
|
932
|
+
properties: {
|
|
933
|
+
name: { type: "string", minLength: 1, maxLength: 512 }, file: { type: "string", minLength: 1 },
|
|
934
|
+
kind: { enum: ["assertion", "syntax", "dependency", "other"] },
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
},
|
|
938
|
+
},
|
|
939
|
+
},
|
|
940
|
+
"builtin.artifact.v1": {
|
|
941
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
942
|
+
$id: "builtin.artifact.v1",
|
|
943
|
+
type: "object",
|
|
944
|
+
additionalProperties: false,
|
|
945
|
+
required: ["artifactType", "schemaVersion", "workItemId", "stageId", "attemptId", "revision", "contentHash"],
|
|
946
|
+
properties: {
|
|
947
|
+
artifactType: { type: "string", pattern: idPattern },
|
|
948
|
+
outputId: { type: "string", pattern: idPattern },
|
|
949
|
+
schemaVersion: { const: 1 },
|
|
950
|
+
workItemId: { type: "string", pattern: workItemIdPattern },
|
|
951
|
+
stageId: { type: "string", pattern: stepInstanceIdPattern },
|
|
952
|
+
attemptId: { type: "string", pattern: "^attempt-.+$" },
|
|
953
|
+
revision: { type: "integer", minimum: 1 },
|
|
954
|
+
contentHash: { type: "string", pattern: digestPattern },
|
|
955
|
+
},
|
|
956
|
+
},
|
|
957
|
+
};
|
|
958
|
+
//# sourceMappingURL=definitions.js.map
|