workspai 0.52.3 → 0.54.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.
Files changed (136) hide show
  1. package/README.md +2 -0
  2. package/contracts/artifact-remediation-plan.v1.json +23 -3
  3. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +36 -0
  4. package/contracts/doctor-project-evidence.v1.json +21 -2
  5. package/contracts/doctor-remediation-plan.v1.json +22 -3
  6. package/contracts/doctor-workspace-evidence.v1.json +21 -2
  7. package/contracts/extension-cli-compatibility.v1.json +24 -2
  8. package/contracts/published-contract-catalog.v1.json +113 -2
  9. package/contracts/runtime-command-surface.v1.json +216 -5
  10. package/contracts/studio-card-repair-capabilities.v1.json +378 -0
  11. package/contracts/workspace-intelligence/doctor-dependency-repair-transaction.v1.json +52 -13
  12. package/contracts/workspace-intelligence/workspace-repair-proposal.v1.json +78 -0
  13. package/contracts/workspace-intelligence/workspace-repair-transaction.v1.json +299 -0
  14. package/contracts/workspace-intelligence-chain.v1.json +6 -0
  15. package/contracts/workspace-repair-capabilities.v1.json +364 -0
  16. package/dist/analyze-AAZEJ4FC.js +1 -0
  17. package/dist/artifact-remediation-plan-A2PRCUNA.js +1 -0
  18. package/dist/autopilot-release-63XHNGR6.js +1 -0
  19. package/dist/{chunk-OTDGTAZJ.js → chunk-2FJW6GSW.js} +1 -1
  20. package/dist/chunk-3DONU3DU.js +1 -0
  21. package/dist/chunk-3LVJBH7V.js +5 -0
  22. package/dist/chunk-44VJHNZB.js +1 -0
  23. package/dist/chunk-4HTSZGEU.js +88 -0
  24. package/dist/chunk-5XDPQ3CB.js +1 -0
  25. package/dist/chunk-7AR5PDLD.js +1 -0
  26. package/dist/chunk-7KKP7RNB.js +3 -0
  27. package/dist/chunk-AMB42V2F.js +1 -0
  28. package/dist/chunk-BPACED27.js +8 -0
  29. package/dist/chunk-BYVTHIC3.js +2 -0
  30. package/dist/{chunk-6PBSAAS5.js → chunk-EBKYSDCX.js} +1 -1
  31. package/dist/chunk-FQLB4BIC.js +7 -0
  32. package/dist/{chunk-ICLYL3N5.js → chunk-FZCYTRBQ.js} +1 -1
  33. package/dist/{chunk-ZVOEPWQM.js → chunk-GDU7VP6G.js} +1 -1
  34. package/dist/chunk-H7P7SSUW.js +75 -0
  35. package/dist/{chunk-MZFSINY7.js → chunk-HRN5J6PW.js} +12 -12
  36. package/dist/chunk-HY3RMPW5.js +10 -0
  37. package/dist/chunk-I5CGTCP5.js +1 -0
  38. package/dist/chunk-IQQWQ3II.js +3 -0
  39. package/dist/chunk-KFKZOPZC.js +1 -0
  40. package/dist/{chunk-HPWLSLMC.js → chunk-KVUYAYTY.js} +1 -1
  41. package/dist/chunk-MQ73VS4E.js +2 -0
  42. package/dist/{chunk-2OIBHUVH.js → chunk-MRFN5ZQP.js} +1 -1
  43. package/dist/{chunk-4UVGTFOX.js → chunk-NYHVCFBT.js} +1 -1
  44. package/dist/{chunk-IO54DFWR.js → chunk-OLX6LX77.js} +1 -1
  45. package/dist/chunk-OUBBBC7T.js +36 -0
  46. package/dist/{chunk-WJY7ZXVJ.js → chunk-P7K5RHJC.js} +1 -1
  47. package/dist/chunk-QZ7PNMVP.js +1 -0
  48. package/dist/chunk-RA24WQLF.js +1 -0
  49. package/dist/{chunk-3PTIIBRY.js → chunk-RMXXK64P.js} +1 -1
  50. package/dist/{chunk-PTTZPDLX.js → chunk-S7Z4DP3P.js} +1 -1
  51. package/dist/chunk-SJLUE6AY.js +1 -0
  52. package/dist/chunk-UFOCUHG3.js +1 -0
  53. package/dist/chunk-WD2XDMGB.js +1 -0
  54. package/dist/chunk-WIO6L24E.js +2 -0
  55. package/dist/{chunk-QURMI7ID.js → chunk-WZA5ISAQ.js} +1 -1
  56. package/dist/chunk-XVRJVKOX.js +1 -0
  57. package/dist/chunk-ZLYEYHMH.js +1 -0
  58. package/dist/{create-ESK3CQPK.js → create-R6A7EHQZ.js} +1 -1
  59. package/dist/{doctor-MYRJ5BFF.js → doctor-HJ3O7SAO.js} +1 -1
  60. package/dist/index.d.ts +92 -23
  61. package/dist/index.js +246 -244
  62. package/dist/pipeline-TDQK5QYQ.js +5 -0
  63. package/dist/{project-intelligence-lens-Q4SZDI2N.js → project-intelligence-lens-ZOAWXYC5.js} +1 -1
  64. package/dist/project-test-coverage-44ZPCOPV.js +1 -0
  65. package/dist/{verified-goal-PSQF2TF2.js → verified-goal-S2PEBJUV.js} +1 -1
  66. package/dist/{workspace-LSOZM2CG.js → workspace-B53XH35L.js} +1 -1
  67. package/dist/{workspace-agent-sync-RZBQXCNJ.js → workspace-agent-sync-446AXPHJ.js} +1 -1
  68. package/dist/{workspace-archive-ZOWQXWJ6.js → workspace-archive-VHUPOBAV.js} +1 -1
  69. package/dist/{workspace-context-IYJKO5BN.js → workspace-context-XSECHC7O.js} +1 -1
  70. package/dist/{workspace-contract-AZFISDLS.js → workspace-contract-AYFTZIKM.js} +1 -1
  71. package/dist/workspace-explain-SZI2WAAD.js +1 -0
  72. package/dist/workspace-explain-contract-N2XQHAPM.js +1 -0
  73. package/dist/{workspace-feedback-LIHEWTNV.js → workspace-feedback-WXE7NVMV.js} +1 -1
  74. package/dist/{workspace-foundation-H5UTAUXQ.js → workspace-foundation-FFNCK5ZD.js} +1 -1
  75. package/dist/{workspace-graph-stream-KUDOZE73.js → workspace-graph-stream-AJPS45FD.js} +1 -1
  76. package/dist/{workspace-history-HULG5EFN.js → workspace-history-YY7YRDOH.js} +1 -1
  77. package/dist/{workspace-intelligence-A4UE4DZK.js → workspace-intelligence-FWRB47EJ.js} +1 -1
  78. package/dist/{workspace-intelligence-evaluation-AOLGHYHC.js → workspace-intelligence-evaluation-UP2K3L35.js} +1 -1
  79. package/dist/{workspace-intelligence-runner-5VAAMKMK.js → workspace-intelligence-runner-EQFLRVRL.js} +1 -1
  80. package/dist/workspace-intelligence-runtime-registry-MRSF7RTT.js +1 -0
  81. package/dist/{workspace-knowledge-graph-LEM6X5CM.js → workspace-knowledge-graph-BMMM2FUE.js} +1 -1
  82. package/dist/{workspace-mcp-serve-N2QPR7VJ.js → workspace-mcp-serve-COA4FMCA.js} +1 -1
  83. package/dist/{workspace-model-FJXX3NET.js → workspace-model-MNJOGBPP.js} +1 -1
  84. package/dist/{workspace-onboarding-IKFISWWY.js → workspace-onboarding-2B7CYZ5H.js} +1 -1
  85. package/dist/{workspace-readme-E2M35RJH.js → workspace-readme-4S6PJ74A.js} +1 -1
  86. package/dist/{workspace-registry-summary-HOQ3OBNT.js → workspace-registry-summary-GPJEL7K7.js} +1 -1
  87. package/dist/workspace-repair-engine-OZXOXVVV.js +3 -0
  88. package/dist/workspace-run-VPXRRHDK.js +1 -0
  89. package/dist/{workspace-verify-32AWCJQG.js → workspace-verify-C6HWHRLJ.js} +1 -1
  90. package/dist/{workspace-watch-4WVNB26E.js → workspace-watch-DLPHLF5R.js} +1 -1
  91. package/docs/README.md +2 -0
  92. package/docs/commands-reference.md +10 -8
  93. package/docs/contracts/ARTIFACT_CATALOG.md +27 -22
  94. package/docs/contracts/README.md +3 -0
  95. package/docs/contracts/RUNTIME_ACCEPTANCE_MATRIX.md +20 -11
  96. package/docs/doctor-command.md +16 -4
  97. package/docs/workspace-intelligence-runner.md +2 -1
  98. package/docs/workspace-knowledge-graph.md +6 -1
  99. package/docs/workspace-operations.md +3 -1
  100. package/docs/workspace-repair-engine.md +122 -0
  101. package/docs/workspace-run.md +17 -14
  102. package/package.json +3 -2
  103. package/scripts/enterprise-package-smoke.mjs +9 -6
  104. package/dist/analyze-J7VNZMDH.js +0 -1
  105. package/dist/artifact-remediation-plan-IDCJGULX.js +0 -3
  106. package/dist/autopilot-release-XRNPBYC6.js +0 -1
  107. package/dist/chunk-23JDMHSD.js +0 -86
  108. package/dist/chunk-2E6WGUN6.js +0 -1
  109. package/dist/chunk-2ZRMYFJG.js +0 -1
  110. package/dist/chunk-3D3PFPP5.js +0 -1
  111. package/dist/chunk-4D7DIGAB.js +0 -1
  112. package/dist/chunk-5XJRCP3D.js +0 -36
  113. package/dist/chunk-62K2H72S.js +0 -1
  114. package/dist/chunk-7MQZQ4UU.js +0 -1
  115. package/dist/chunk-AL237TSJ.js +0 -7
  116. package/dist/chunk-B4CPDK6J.js +0 -2
  117. package/dist/chunk-CZC5P2MF.js +0 -1
  118. package/dist/chunk-DZ4VKAXB.js +0 -75
  119. package/dist/chunk-FUPHQOJB.js +0 -1
  120. package/dist/chunk-GHB6QMQH.js +0 -1
  121. package/dist/chunk-LOCPNNSK.js +0 -1
  122. package/dist/chunk-LPCL4U4L.js +0 -1
  123. package/dist/chunk-MBRU3VWJ.js +0 -2
  124. package/dist/chunk-NHVHRBBV.js +0 -4
  125. package/dist/chunk-OXNV7OJM.js +0 -8
  126. package/dist/chunk-P4OSLAVD.js +0 -3
  127. package/dist/chunk-Q6CUJ3WF.js +0 -10
  128. package/dist/chunk-ULR66OJR.js +0 -2
  129. package/dist/chunk-XHRHNVCZ.js +0 -1
  130. package/dist/chunk-ZTKIBREF.js +0 -1
  131. package/dist/pipeline-P6DFMDL4.js +0 -5
  132. package/dist/project-test-coverage-A677ZLW3.js +0 -1
  133. package/dist/workspace-explain-26UGV7L4.js +0 -1
  134. package/dist/workspace-explain-contract-GIWPCCEF.js +0 -1
  135. package/dist/workspace-intelligence-runtime-registry-YOQ5GFFJ.js +0 -1
  136. package/dist/workspace-run-HRKCACGR.js +0 -1
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://workspai.dev/contracts/workspace-intelligence/doctor-dependency-repair-transaction.v1.json",
4
4
  "title": "Workspai Doctor Dependency Repair Transaction v1",
5
- "description": "The portable closure contract a consumer must satisfy after changing a dependency manifest or lockfile.",
5
+ "description": "The portable closure contract for dependency security changes and runtime dependency materialization.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": [
@@ -19,7 +19,7 @@
19
19
  "const": "workspai.doctor-dependency-repair-transaction.v1"
20
20
  },
21
21
  "kind": {
22
- "const": "dependency-security"
22
+ "enum": ["dependency-security", "dependency-materialization"]
23
23
  },
24
24
  "state": {
25
25
  "const": "planned"
@@ -32,24 +32,20 @@
32
32
  "type": "string",
33
33
  "minLength": 1
34
34
  },
35
+ "sourceMutationRequired": { "type": "boolean" },
36
+ "observableState": {
37
+ "enum": ["runtime-dependency-tree"]
38
+ },
35
39
  "requiredStages": {
36
40
  "type": "array",
37
- "prefixItems": [
38
- { "const": "reconcile" },
39
- { "const": "audit" },
40
- { "const": "test" },
41
- { "const": "build" }
42
- ],
43
- "items": false,
44
- "minItems": 4,
45
- "maxItems": 4
41
+ "items": { "enum": ["reconcile", "audit", "test", "build"] },
42
+ "uniqueItems": true
46
43
  },
47
44
  "completion": {
48
45
  "type": "object",
49
46
  "additionalProperties": false,
50
47
  "required": [
51
48
  "manifestLockConsistent",
52
- "auditClean",
53
49
  "declaredTestsPass",
54
50
  "declaredBuildPass",
55
51
  "canonicalVerificationRequired"
@@ -57,10 +53,53 @@
57
53
  "properties": {
58
54
  "manifestLockConsistent": { "const": true },
59
55
  "auditClean": { "const": true },
56
+ "installedTreePresent": { "const": true },
60
57
  "declaredTestsPass": { "const": true },
61
58
  "declaredBuildPass": { "const": true },
62
59
  "canonicalVerificationRequired": { "const": true }
63
60
  }
64
61
  }
65
- }
62
+ },
63
+ "allOf": [
64
+ {
65
+ "if": { "properties": { "kind": { "const": "dependency-security" } } },
66
+ "then": {
67
+ "properties": {
68
+ "requiredStages": {
69
+ "prefixItems": [
70
+ { "const": "reconcile" },
71
+ { "const": "audit" },
72
+ { "const": "test" },
73
+ { "const": "build" }
74
+ ],
75
+ "items": false,
76
+ "minItems": 4,
77
+ "maxItems": 4
78
+ },
79
+ "completion": { "type": "object", "properties": { "auditClean": { "const": true } }, "required": ["auditClean"] }
80
+ }
81
+ }
82
+ },
83
+ {
84
+ "if": { "properties": { "kind": { "const": "dependency-materialization" } } },
85
+ "then": {
86
+ "required": ["sourceMutationRequired", "observableState"],
87
+ "properties": {
88
+ "sourceMutationRequired": { "const": false },
89
+ "observableState": { "const": "runtime-dependency-tree" },
90
+ "requiredStages": {
91
+ "prefixItems": [
92
+ { "const": "reconcile" },
93
+ { "const": "test" },
94
+ { "const": "build" }
95
+ ],
96
+ "items": false,
97
+ "minItems": 3,
98
+ "maxItems": 3
99
+ },
100
+ "completion": { "type": "object", "properties": { "installedTreePresent": { "const": true } }, "required": ["installedTreePresent"] }
101
+ }
102
+ }
103
+ }
104
+ ]
66
105
  }
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workspai.dev/contracts/workspace-intelligence/workspace-repair-proposal.v1.json",
4
+ "title": "Workspai Workspace Repair Proposal v1",
5
+ "description": "A bounded, hash-pinned source change proposed by an IDE model for execution by the CLI Repair Engine.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "cardId", "rationale", "changes"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "workspai.workspace-repair-proposal.v1" },
11
+ "cardId": { "type": "string", "minLength": 1, "maxLength": 160 },
12
+ "projectName": { "type": "string", "minLength": 1, "maxLength": 200 },
13
+ "projectPath": { "type": "string", "minLength": 1, "maxLength": 1000 },
14
+ "rationale": { "type": "string", "minLength": 1, "maxLength": 4000 },
15
+ "changes": {
16
+ "type": "array",
17
+ "minItems": 1,
18
+ "maxItems": 100,
19
+ "items": { "$ref": "#/$defs/change" }
20
+ },
21
+ "validation": {
22
+ "type": "array",
23
+ "maxItems": 20,
24
+ "items": { "$ref": "#/$defs/validation" }
25
+ }
26
+ },
27
+ "$defs": {
28
+ "change": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["id", "path", "operation", "expectedBeforeHash", "risk", "summary"],
32
+ "properties": {
33
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9._-]{1,160}$" },
34
+ "path": { "type": "string", "minLength": 1, "maxLength": 1000 },
35
+ "operation": { "enum": ["write", "delete"] },
36
+ "expectedBeforeHash": {
37
+ "oneOf": [
38
+ { "type": "string", "pattern": "^[a-f0-9]{64}$" },
39
+ { "type": "null" }
40
+ ]
41
+ },
42
+ "content": { "type": "string", "maxLength": 5242880 },
43
+ "risk": { "enum": ["safe", "guarded", "invasive"] },
44
+ "summary": { "type": "string", "minLength": 1, "maxLength": 1000 }
45
+ },
46
+ "allOf": [
47
+ {
48
+ "if": { "properties": { "operation": { "const": "write" } } },
49
+ "then": {
50
+ "properties": { "content": { "type": "string", "maxLength": 5242880 } },
51
+ "required": ["content"]
52
+ },
53
+ "else": { "not": { "required": ["content"] } }
54
+ }
55
+ ]
56
+ },
57
+ "validation": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": ["id", "kind", "cwd", "executable", "args", "required", "risk", "summary"],
61
+ "properties": {
62
+ "id": { "type": "string", "pattern": "^[A-Za-z0-9._-]{1,160}$" },
63
+ "kind": { "enum": ["audit", "test", "build"] },
64
+ "cwd": { "type": "string", "minLength": 1, "maxLength": 1000 },
65
+ "executable": { "type": "string", "minLength": 1, "maxLength": 1000 },
66
+ "args": {
67
+ "type": "array",
68
+ "maxItems": 100,
69
+ "items": { "type": "string", "maxLength": 4000 }
70
+ },
71
+ "required": { "type": "boolean" },
72
+ "risk": { "enum": ["safe", "guarded", "invasive"] },
73
+ "summary": { "type": "string", "minLength": 1, "maxLength": 1000 },
74
+ "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 900000 }
75
+ }
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,299 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workspai.dev/contracts/workspace-intelligence/workspace-repair-transaction.v1.json",
4
+ "title": "Workspai Workspace Repair Transaction v1",
5
+ "description": "Durable CLI-owned state for one governed workspace repair from plan through verification or rollback.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schemaVersion",
10
+ "transactionId",
11
+ "revision",
12
+ "createdAt",
13
+ "updatedAt",
14
+ "workspace",
15
+ "target",
16
+ "state",
17
+ "policy",
18
+ "approval",
19
+ "preconditions",
20
+ "checkpoint",
21
+ "stages",
22
+ "events",
23
+ "integrity"
24
+ ],
25
+ "properties": {
26
+ "schemaVersion": { "const": "workspai.workspace-repair-transaction.v1" },
27
+ "transactionId": { "type": "string", "pattern": "^[A-Za-z0-9_-]{12,128}$" },
28
+ "revision": { "type": "integer", "minimum": 1 },
29
+ "createdAt": { "type": "string", "format": "date-time" },
30
+ "updatedAt": { "type": "string", "format": "date-time" },
31
+ "workspace": {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["name", "rootRef"],
35
+ "properties": {
36
+ "name": { "type": "string", "minLength": 1 },
37
+ "rootRef": { "const": "." }
38
+ }
39
+ },
40
+ "target": {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["cardId", "scope", "actionIds"],
44
+ "properties": {
45
+ "cardId": { "type": "string", "minLength": 1 },
46
+ "scope": { "enum": ["workspace", "project"] },
47
+ "projectName": { "type": "string", "minLength": 1 },
48
+ "projectPath": { "type": "string", "minLength": 1 },
49
+ "actionIds": {
50
+ "type": "array",
51
+ "minItems": 1,
52
+ "uniqueItems": true,
53
+ "items": { "type": "string", "minLength": 1 }
54
+ }
55
+ }
56
+ },
57
+ "state": {
58
+ "enum": [
59
+ "planned",
60
+ "awaiting-approval",
61
+ "approved",
62
+ "checkpointed",
63
+ "executing",
64
+ "verifying",
65
+ "closed",
66
+ "decision-required",
67
+ "rollback-required",
68
+ "rolling-back",
69
+ "rolled-back",
70
+ "failed",
71
+ "cancelled"
72
+ ]
73
+ },
74
+ "policy": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "required": ["maxRisk", "allowForce", "allowBreaking", "autoRollback", "strictVerify"],
78
+ "properties": {
79
+ "maxRisk": { "enum": ["safe", "guarded", "invasive"] },
80
+ "allowForce": { "type": "boolean" },
81
+ "allowBreaking": { "type": "boolean" },
82
+ "autoRollback": { "type": "boolean" },
83
+ "strictVerify": { "const": true }
84
+ }
85
+ },
86
+ "approval": {
87
+ "type": "object",
88
+ "additionalProperties": false,
89
+ "required": ["required", "status"],
90
+ "properties": {
91
+ "required": { "const": true },
92
+ "status": { "enum": ["pending", "approved", "rejected", "expired"] },
93
+ "approvedAt": { "type": "string", "format": "date-time" },
94
+ "approvedBy": { "type": "string", "minLength": 1 },
95
+ "approvedPlanHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
96
+ }
97
+ },
98
+ "preconditions": {
99
+ "type": "array",
100
+ "items": { "$ref": "#/$defs/precondition" }
101
+ },
102
+ "adapterEvaluations": {
103
+ "type": "array",
104
+ "items": { "$ref": "#/$defs/adapterEvaluation" }
105
+ },
106
+ "checkpoint": { "$ref": "#/$defs/checkpoint" },
107
+ "stages": {
108
+ "type": "array",
109
+ "minItems": 1,
110
+ "items": { "$ref": "#/$defs/stage" }
111
+ },
112
+ "verification": { "$ref": "#/$defs/verification" },
113
+ "decision": { "$ref": "#/$defs/decision" },
114
+ "events": {
115
+ "type": "array",
116
+ "items": { "$ref": "#/$defs/event" }
117
+ },
118
+ "integrity": {
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": ["planHash", "sourceEvidenceHash"],
122
+ "properties": {
123
+ "planHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
124
+ "sourceEvidenceHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
125
+ }
126
+ }
127
+ },
128
+ "$defs": {
129
+ "adapterEvaluation": {
130
+ "type": "object",
131
+ "additionalProperties": false,
132
+ "required": [
133
+ "adapterId",
134
+ "ecosystem",
135
+ "projectPath",
136
+ "manifests",
137
+ "support",
138
+ "status",
139
+ "requiredExecutables",
140
+ "missingExecutables",
141
+ "message"
142
+ ],
143
+ "properties": {
144
+ "adapterId": { "type": "string", "minLength": 1 },
145
+ "ecosystem": { "type": "string", "minLength": 1 },
146
+ "projectPath": { "type": "string", "minLength": 1 },
147
+ "manifests": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
148
+ "support": { "enum": ["full", "conditional", "unsupported"] },
149
+ "status": { "enum": ["ready", "partial", "unsupported"] },
150
+ "requiredExecutables": {
151
+ "type": "array",
152
+ "items": { "type": "string" },
153
+ "uniqueItems": true
154
+ },
155
+ "missingExecutables": {
156
+ "type": "array",
157
+ "items": { "type": "string" },
158
+ "uniqueItems": true
159
+ },
160
+ "message": { "type": "string" }
161
+ }
162
+ },
163
+ "invocation": {
164
+ "type": "object",
165
+ "additionalProperties": false,
166
+ "required": ["cwd", "executable", "args", "purpose", "timeoutMs"],
167
+ "properties": {
168
+ "cwd": { "type": "string", "minLength": 1 },
169
+ "executable": { "type": "string", "minLength": 1 },
170
+ "args": { "type": "array", "items": { "type": "string" } },
171
+ "purpose": { "enum": ["repair", "reconcile", "audit", "test", "build", "verify"] },
172
+ "timeoutMs": { "type": "integer", "minimum": 1000, "maximum": 900000 }
173
+ }
174
+ },
175
+ "precondition": {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "required": ["id", "status", "message"],
179
+ "properties": {
180
+ "id": { "type": "string", "minLength": 1 },
181
+ "status": { "enum": ["passed", "failed", "unknown"] },
182
+ "message": { "type": "string" }
183
+ }
184
+ },
185
+ "checkpointFile": {
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "required": ["path", "existed", "beforeHash"],
189
+ "properties": {
190
+ "path": { "type": "string", "minLength": 1 },
191
+ "existed": { "type": "boolean" },
192
+ "beforeHash": { "type": ["string", "null"] },
193
+ "mode": { "type": "integer", "minimum": 0, "maximum": 65535 },
194
+ "afterHash": { "type": ["string", "null"] },
195
+ "backupRef": { "type": "string", "minLength": 1 }
196
+ }
197
+ },
198
+ "checkpoint": {
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "required": ["status", "files"],
202
+ "properties": {
203
+ "status": { "enum": ["pending", "captured", "restored", "conflicted", "unavailable"] },
204
+ "capturedAt": { "type": "string", "format": "date-time" },
205
+ "restoredAt": { "type": "string", "format": "date-time" },
206
+ "files": { "type": "array", "items": { "$ref": "#/$defs/checkpointFile" } }
207
+ }
208
+ },
209
+ "stage": {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": ["id", "kind", "status", "required", "risk", "summary"],
213
+ "properties": {
214
+ "id": { "type": "string", "minLength": 1 },
215
+ "kind": { "enum": ["repair", "reconcile", "audit", "test", "build", "verify", "rollback"] },
216
+ "status": {
217
+ "enum": ["pending", "running", "passed", "failed", "blocked", "skipped", "cancelled"]
218
+ },
219
+ "required": { "type": "boolean" },
220
+ "risk": { "enum": ["safe", "guarded", "invasive"] },
221
+ "summary": { "type": "string" },
222
+ "invocation": { "$ref": "#/$defs/invocation" },
223
+ "startedAt": { "type": "string", "format": "date-time" },
224
+ "completedAt": { "type": "string", "format": "date-time" },
225
+ "exitCode": { "type": ["integer", "null"] },
226
+ "stdoutTail": { "type": "string" },
227
+ "stderrTail": { "type": "string" },
228
+ "changedPaths": { "type": "array", "items": { "type": "string" } }
229
+ }
230
+ },
231
+ "verification": {
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": ["status", "artifact", "exitCode", "summary"],
235
+ "properties": {
236
+ "status": { "enum": ["passed", "failed", "not-run"] },
237
+ "targetStatus": { "enum": ["passed", "failed", "unknown"] },
238
+ "workspaceStatus": { "enum": ["passed", "blocked", "failed"] },
239
+ "remainingActionIds": {
240
+ "type": "array",
241
+ "uniqueItems": true,
242
+ "items": { "type": "string", "minLength": 1 }
243
+ },
244
+ "artifact": { "const": ".workspai/reports/workspace-intelligence-run-last-run.json" },
245
+ "exitCode": { "type": ["integer", "null"] },
246
+ "summary": { "type": "string" }
247
+ }
248
+ },
249
+ "decision": {
250
+ "type": "object",
251
+ "additionalProperties": false,
252
+ "required": ["reason", "options"],
253
+ "properties": {
254
+ "reason": { "type": "string", "minLength": 1 },
255
+ "options": {
256
+ "type": "array",
257
+ "minItems": 1,
258
+ "items": {
259
+ "enum": [
260
+ "approve-guarded",
261
+ "approve-invasive",
262
+ "allow-breaking",
263
+ "allow-force",
264
+ "manual-repair",
265
+ "rollback",
266
+ "cancel"
267
+ ]
268
+ }
269
+ }
270
+ }
271
+ },
272
+ "event": {
273
+ "type": "object",
274
+ "additionalProperties": false,
275
+ "required": ["sequence", "at", "type", "message"],
276
+ "properties": {
277
+ "sequence": { "type": "integer", "minimum": 1 },
278
+ "at": { "type": "string", "format": "date-time" },
279
+ "type": {
280
+ "enum": [
281
+ "planned",
282
+ "approval",
283
+ "checkpoint",
284
+ "stage",
285
+ "verification",
286
+ "decision",
287
+ "rollback",
288
+ "closed",
289
+ "failed",
290
+ "cancelled"
291
+ ]
292
+ },
293
+ "stageId": { "type": "string" },
294
+ "status": { "type": "string" },
295
+ "message": { "type": "string" }
296
+ }
297
+ }
298
+ }
299
+ }
@@ -221,6 +221,12 @@
221
221
  "path": ".workspai/reports/verified-goal-last-run.json",
222
222
  "schemaVersion": "workspai.verified-goal-status.v1",
223
223
  "schemaContract": "contracts/workspace-intelligence/verified-goal-status.v1.json"
224
+ },
225
+ {
226
+ "id": "repairTransaction",
227
+ "path": ".workspai/reports/workspace-repair-last-run.json",
228
+ "schemaVersion": "workspai.workspace-repair-transaction.v1",
229
+ "schemaContract": "contracts/workspace-intelligence/workspace-repair-transaction.v1.json"
224
230
  }
225
231
  ]
226
232
  },