workspai 0.67.0 → 0.69.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/README.md +38 -18
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +459 -0
- package/contracts/extension-cli-compatibility.v1.json +11 -0
- package/contracts/published-contract-catalog.v1.json +55 -0
- package/contracts/runtime-command-surface.v1.json +282 -0
- package/contracts/workspace-activity-board.v1.json +6 -0
- package/contracts/workspace-activity-event.v1.json +31 -1
- package/contracts/workspace-activity-monitor-snapshot.v1.json +35 -2
- package/contracts/workspace-intelligence/architecture-change-lease.v1.json +50 -0
- package/contracts/workspace-intelligence/architecture-surprise-report.v1.json +46 -0
- package/contracts/workspace-intelligence/change-operation-result.v1.json +43 -0
- package/contracts/workspace-intelligence/decision-checkpoint.v1.json +18 -0
- package/contracts/workspace-intelligence/decision-event.v1.json +134 -0
- package/contracts/workspace-intelligence/decision-transaction.v1.json +29 -0
- package/contracts/workspace-intelligence/goal-index.v1.json +13 -0
- package/contracts/workspace-intelligence/goal-pack.v1.json +2 -1
- package/contracts/workspace-intelligence/predicted-architecture-change.v1.json +34 -0
- package/contracts/workspace-intelligence/proof-carrying-change-capsule-export.v1.json +14 -0
- package/contracts/workspace-intelligence/proof-carrying-change-capsule-validation.v1.json +16 -0
- package/contracts/workspace-intelligence/proof-carrying-change-capsule.v1.json +62 -0
- package/contracts/workspace-intelligence/proof-carrying-change-list.v1.json +80 -0
- package/contracts/workspace-intelligence/workspace-knowledge-graph-change-overlay.v1.json +9 -1
- package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +1 -0
- package/dist/analyze-GPYPXXRT.js +1 -0
- package/dist/{artifact-remediation-plan-GFFHC2ZU.js → artifact-remediation-plan-JHHZ4L24.js} +1 -1
- package/dist/autopilot-release-FL47VMF7.js +1 -0
- package/dist/capabilities-command-MYSLJIYS.js +1 -0
- package/dist/chunk-25AWHAB5.js +2 -0
- package/dist/chunk-2LZWBUJD.js +1 -0
- package/dist/{chunk-KENOAC2Q.js → chunk-37ZLNFV5.js} +2 -2
- package/dist/{chunk-CZVT7T2X.js → chunk-3G5FF2JZ.js} +1 -1
- package/dist/chunk-3HFFKW4Q.js +2 -0
- package/dist/{chunk-BHM6RHTA.js → chunk-3WHE7V4M.js} +1 -1
- package/dist/{chunk-NVND4727.js → chunk-46QH3ZVI.js} +1 -1
- package/dist/{chunk-B4IVVTMQ.js → chunk-64XWHDZ3.js} +1 -1
- package/dist/chunk-A3MYO55A.js +3 -0
- package/dist/chunk-ABMB6MJT.js +1 -0
- package/dist/chunk-AD4ZY3RF.js +12 -0
- package/dist/chunk-BM2F5C4J.js +1 -0
- package/dist/chunk-COICGD62.js +1 -0
- package/dist/{chunk-5OA33JH2.js → chunk-D5LLTUTY.js} +1 -1
- package/dist/{chunk-4WVOAX2V.js → chunk-DWL3PPLA.js} +1 -1
- package/dist/{chunk-H77ZNH5O.js → chunk-EBEAJIBI.js} +1 -1
- package/dist/chunk-EBQS5T7Q.js +7 -0
- package/dist/{chunk-VI4ZRAY6.js → chunk-EG6EZ7HW.js} +1 -1
- package/dist/chunk-ERVWW5HX.js +1 -0
- package/dist/chunk-EZPLMAW2.js +1 -0
- package/dist/chunk-FIK343LI.js +1 -0
- package/dist/chunk-GSSJJS5M.js +6 -0
- package/dist/{chunk-SRLWHOLF.js → chunk-GYN6RPNU.js} +1 -1
- package/dist/{chunk-6E2Y3XGT.js → chunk-HCFOVANQ.js} +1 -1
- package/dist/chunk-I3UCODXU.js +1 -0
- package/dist/{chunk-2RPFCBS4.js → chunk-IGJA6GBQ.js} +1 -1
- package/dist/{chunk-FX5J6JCK.js → chunk-IVYPC36J.js} +1 -1
- package/dist/chunk-K33JJVQZ.js +2 -0
- package/dist/{chunk-L5Q2S5GY.js → chunk-KFTJVVJR.js} +1 -1
- package/dist/chunk-LDBULT2T.js +4 -0
- package/dist/{chunk-THIG2YQP.js → chunk-M37ALD4V.js} +1 -1
- package/dist/{chunk-HQLBO23O.js → chunk-MAWHHHU3.js} +5 -5
- package/dist/chunk-MBICKDYP.js +1 -0
- package/dist/{chunk-QMQBX3RV.js → chunk-MGL6DBOR.js} +1 -1
- package/dist/chunk-MHQHRMKU.js +5 -0
- package/dist/{chunk-KQ2TMI26.js → chunk-N2Q4MSSP.js} +64 -64
- package/dist/chunk-N4B2M44I.js +1 -0
- package/dist/chunk-NSH7TTSV.js +1 -0
- package/dist/chunk-O5XQP5E7.js +1 -0
- package/dist/chunk-ODK4LCEL.js +1 -0
- package/dist/chunk-OU3BBWH5.js +49 -0
- package/dist/chunk-OZXCNVGW.js +2 -0
- package/dist/{chunk-TABXSDTR.js → chunk-PKKSRXUS.js} +1 -1
- package/dist/{chunk-SLFOUSRW.js → chunk-QYEQVNBF.js} +1 -1
- package/dist/chunk-RVOW3BHQ.js +2 -0
- package/dist/chunk-TKXRP2B4.js +1 -0
- package/dist/chunk-UNXG3ZFV.js +1 -0
- package/dist/chunk-UW4SESKD.js +2 -0
- package/dist/{chunk-2MTJWPQ4.js → chunk-V52R2W2Q.js} +1 -1
- package/dist/chunk-V6TIT6M3.js +157 -0
- package/dist/chunk-VNKAISFE.js +8 -0
- package/dist/chunk-W37NOQVG.js +1 -0
- package/dist/chunk-W6WRT77T.js +1 -0
- package/dist/chunk-WHR5SL33.js +4 -0
- package/dist/{chunk-HYE5UHPV.js → chunk-WZ5V5U2K.js} +1 -1
- package/dist/chunk-XPGCFVGC.js +4 -0
- package/dist/chunk-YKY4JFCF.js +1 -0
- package/dist/{chunk-VWBMDGPY.js → chunk-YWZBGSFE.js} +3 -3
- package/dist/chunk-YZL7ZY7J.js +2 -0
- package/dist/{create-72ITVZXV.js → create-GWBQ74ZI.js} +1 -1
- package/dist/{demo-kit-5UQH2OXC.js → demo-kit-RKTHTXHJ.js} +1 -1
- package/dist/doctor-OQAXSMEM.js +1 -0
- package/dist/{dotnet-webapi-clean-YEHYIGOT.js → dotnet-webapi-clean-XL4IBUQV.js} +1 -1
- package/dist/goal-lifecycle-YWBVQ2DF.js +1 -0
- package/dist/goal-pack-KUXPZVNO.js +1 -0
- package/dist/{gofiber-standard-C44IIQYH.js → gofiber-standard-OHHMCNMJ.js} +1 -1
- package/dist/{gogin-standard-X7VKACVR.js → gogin-standard-BAZXPOKL.js} +1 -1
- package/dist/index.d.ts +35 -2
- package/dist/index.js +239 -239
- package/dist/{live-command-5VXPR43F.js → live-command-GNAASZ7U.js} +1 -1
- package/dist/pipeline-PGB5TEV3.js +5 -0
- package/dist/{project-agent-entry-5IUBEREI.js → project-agent-entry-H3JAGNLS.js} +1 -1
- package/dist/{project-intelligence-lens-LQCN65P2.js → project-intelligence-lens-7NMKHV5N.js} +1 -1
- package/dist/{project-test-coverage-KD4LLFGV.js → project-test-coverage-3DKZKLWY.js} +1 -1
- package/dist/proof-carrying-change-QFH7WI2E.js +1 -0
- package/dist/{rust-axum-JKZTZDRZ.js → rust-axum-CCJ6UCBW.js} +1 -1
- package/dist/{springboot-standard-PI4FLTAN.js → springboot-standard-M5JQEJML.js} +1 -1
- package/dist/verified-goal-7XHRWYSE.js +1 -0
- package/dist/{workspace-5W7FYGDQ.js → workspace-TJHCETBV.js} +1 -1
- package/dist/{workspace-agent-sync-OZCDQORK.js → workspace-agent-sync-Z35NTXCB.js} +1 -1
- package/dist/{workspace-archive-NOSGRKRZ.js → workspace-archive-OSMU3CK6.js} +1 -1
- package/dist/{workspace-context-L65BR5L6.js → workspace-context-KNJQUJWC.js} +1 -1
- package/dist/{workspace-contract-JYHNEJPV.js → workspace-contract-VIUQT5SZ.js} +1 -1
- package/dist/workspace-explain-HM6GMK26.js +1 -0
- package/dist/workspace-explain-contract-KV7RTEJU.js +1 -0
- package/dist/{workspace-feedback-MWGCT5R2.js → workspace-feedback-YSPEGCON.js} +1 -1
- package/dist/{workspace-foundation-VIB3PXNH.js → workspace-foundation-PLXFPI3J.js} +1 -1
- package/dist/{workspace-graph-stream-45JHE4MG.js → workspace-graph-stream-FNRQ2FTB.js} +1 -1
- package/dist/workspace-graph-token-efficiency-WNAFAN2F.js +1 -0
- package/dist/{workspace-history-JKW3VJO3.js → workspace-history-HDDFG6LH.js} +1 -1
- package/dist/{workspace-intelligence-3C47PK4L.js → workspace-intelligence-QLSD5EEV.js} +1 -1
- package/dist/{workspace-intelligence-benchmark-SRDIHX3X.js → workspace-intelligence-benchmark-S5OXVNLC.js} +1 -1
- package/dist/{workspace-intelligence-evaluation-OJIQS5SN.js → workspace-intelligence-evaluation-QDSOOUHH.js} +1 -1
- package/dist/{workspace-intelligence-runner-OWN5ZI6W.js → workspace-intelligence-runner-4EW4T2OW.js} +1 -1
- package/dist/workspace-intelligence-runtime-registry-ZLPF7BAY.js +1 -0
- package/dist/{workspace-knowledge-graph-AKG5NUU6.js → workspace-knowledge-graph-EEOW5VAJ.js} +1 -1
- package/dist/workspace-knowledge-graph-change-overlay-FIIAFLO6.js +1 -0
- package/dist/{workspace-knowledge-graph-contract-X52KXBXJ.js → workspace-knowledge-graph-contract-FVX5T7SU.js} +1 -1
- package/dist/{workspace-knowledge-graph-query-DXA4CROE.js → workspace-knowledge-graph-query-WHCGPBGS.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-X347REDB.js +1 -0
- package/dist/workspace-mcp-serve-NQ42PE2I.js +3 -0
- package/dist/{workspace-model-R4ISKDB2.js → workspace-model-NCOOY5LC.js} +1 -1
- package/dist/{workspace-onboarding-Y5RPEFUD.js → workspace-onboarding-JNC7ZFMR.js} +1 -1
- package/dist/{workspace-readme-PL5V3UDH.js → workspace-readme-OV2ADTLW.js} +2 -2
- package/dist/{workspace-registry-summary-STGUGROG.js → workspace-registry-summary-ONT4VOJX.js} +1 -1
- package/dist/{workspace-repair-engine-FNLL5ZDK.js → workspace-repair-engine-WMJCYWO4.js} +2 -2
- package/dist/workspace-run-3S35MDX6.js +1 -0
- package/dist/{workspace-verify-AXVX3PF3.js → workspace-verify-MLABQUWK.js} +1 -1
- package/dist/{workspace-watch-RLBEJKXE.js → workspace-watch-MJOG5AZ3.js} +1 -1
- package/docs/README.md +2 -0
- package/docs/ci-workflows.md +1 -1
- package/docs/commands-reference.md +26 -1
- package/docs/contracts/ARTIFACT_CATALOG.md +37 -18
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +17 -0
- package/docs/contracts/PROOF_CARRYING_CHANGE_CONTRACT_PLAN.md +65 -0
- package/docs/contracts/README.md +1 -1
- package/docs/proof-carrying-change.implementation.v1.json +118 -0
- package/docs/proof-carrying-change.md +202 -0
- package/docs/workspace-knowledge-graph.md +1 -0
- package/docs/workspace-live-activity.md +18 -4
- package/package.json +1 -1
- package/dist/analyze-IC2KRVCG.js +0 -1
- package/dist/autopilot-release-RECEZAZI.js +0 -1
- package/dist/capabilities-command-X4WZIJNR.js +0 -1
- package/dist/chunk-2M62CU3O.js +0 -2
- package/dist/chunk-2MVIRJJR.js +0 -1
- package/dist/chunk-3O7LZPKA.js +0 -4
- package/dist/chunk-3OGPTLI2.js +0 -1
- package/dist/chunk-4RV4JVGR.js +0 -6
- package/dist/chunk-5EVDW7JM.js +0 -1
- package/dist/chunk-5ME4W4LN.js +0 -1
- package/dist/chunk-5TY74LLW.js +0 -2
- package/dist/chunk-6254CWUY.js +0 -49
- package/dist/chunk-ARUFY5W3.js +0 -1
- package/dist/chunk-BHFRP7TV.js +0 -8
- package/dist/chunk-BRYJTW6S.js +0 -2
- package/dist/chunk-BUYLM6QV.js +0 -1
- package/dist/chunk-CPR2CMOY.js +0 -1
- package/dist/chunk-EHCKITR4.js +0 -2
- package/dist/chunk-ENZPM52J.js +0 -1
- package/dist/chunk-FPDH3N3A.js +0 -7
- package/dist/chunk-GIQ4SDRJ.js +0 -1
- package/dist/chunk-IKUFNK46.js +0 -2
- package/dist/chunk-IQQMFRWM.js +0 -3
- package/dist/chunk-JCGSIDMC.js +0 -2
- package/dist/chunk-LPCZHKD5.js +0 -1
- package/dist/chunk-N4QFNOAI.js +0 -1
- package/dist/chunk-OCNPOYMA.js +0 -1
- package/dist/chunk-PSYQ6IJA.js +0 -12
- package/dist/chunk-SVYY55IS.js +0 -157
- package/dist/chunk-SX6A656X.js +0 -1
- package/dist/chunk-TP7VKEUF.js +0 -1
- package/dist/chunk-UTV4DTNM.js +0 -1
- package/dist/chunk-XDPTAV2T.js +0 -2
- package/dist/chunk-Y35VLVF6.js +0 -5
- package/dist/chunk-Y4Z6CEII.js +0 -1
- package/dist/chunk-YYY2WXOH.js +0 -1
- package/dist/chunk-ZEEV5J4I.js +0 -1
- package/dist/chunk-ZGHJIQXL.js +0 -1
- package/dist/chunk-ZI2E7P6O.js +0 -4
- package/dist/doctor-CVYUESRQ.js +0 -1
- package/dist/goal-lifecycle-H55AGFCB.js +0 -1
- package/dist/goal-pack-6OBZOPCD.js +0 -1
- package/dist/pipeline-SKYOXWHW.js +0 -5
- package/dist/verified-goal-HN7G532B.js +0 -1
- package/dist/workspace-explain-SUBK6FLO.js +0 -1
- package/dist/workspace-explain-contract-WMREJWHF.js +0 -1
- package/dist/workspace-graph-token-efficiency-NPECU6Y5.js +0 -1
- package/dist/workspace-intelligence-runtime-registry-UKFB3BI7.js +0 -1
- package/dist/workspace-knowledge-graph-change-overlay-XG6FC4IX.js +0 -1
- package/dist/workspace-knowledge-graph-snapshot-SNI5K2RL.js +0 -1
- package/dist/workspace-mcp-serve-PK226GMV.js +0 -3
- package/dist/workspace-run-GFBFGUFM.js +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workspai.dev/schemas/workspace-intelligence/decision-event.v1.json",
|
|
4
|
+
"title": "Workspai Decision Event",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "transactionId", "sequence", "kind", "occurredAt", "actor", "previousEventDigest", "payload", "digest"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "workspai.decision-event.v1" },
|
|
9
|
+
"transactionId": { "type": "string", "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$" },
|
|
10
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
11
|
+
"kind": { "enum": ["created", "scope-bound", "evidence-attached", "plan-attached", "authorized", "effect-requested", "effect-recorded", "effect-uncertain", "verification-started", "verification-recorded", "human-required", "blocked", "resumed", "committed", "rejected", "aborted", "superseded"] },
|
|
12
|
+
"occurredAt": { "type": "string", "format": "date-time" },
|
|
13
|
+
"actor": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["kind", "id"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"kind": { "enum": ["human", "agent", "cli", "ci", "extension"] },
|
|
18
|
+
"id": { "type": "string", "minLength": 1 }
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
},
|
|
22
|
+
"previousEventDigest": { "oneOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }] },
|
|
23
|
+
"payload": { "$ref": "#/$defs/payload" },
|
|
24
|
+
"digest": { "$ref": "#/$defs/sha256" }
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"$defs": {
|
|
28
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
29
|
+
"digest": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"required": ["algorithm", "semantics", "value"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"algorithm": { "const": "sha256" },
|
|
34
|
+
"semantics": { "enum": ["canonical-json-v1", "raw-bytes-v1", "workspace-model-structural-v1"] },
|
|
35
|
+
"value": { "$ref": "#/$defs/sha256" }
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
},
|
|
39
|
+
"artifactReference": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": ["role", "artifact", "schemaVersion", "digest"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"role": { "type": "string", "minLength": 1 },
|
|
44
|
+
"artifact": { "type": "string", "minLength": 1 },
|
|
45
|
+
"schemaVersion": { "type": "string", "minLength": 1 },
|
|
46
|
+
"digest": { "$ref": "#/$defs/digest" }
|
|
47
|
+
},
|
|
48
|
+
"additionalProperties": false
|
|
49
|
+
},
|
|
50
|
+
"scope": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": ["kind", "projects"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"kind": { "enum": ["workspace", "project", "project-set"] },
|
|
55
|
+
"projects": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
},
|
|
59
|
+
"authorization": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["grantedBy", "grant", "effectClasses"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"grantedBy": { "type": "string", "minLength": 1 },
|
|
64
|
+
"grant": { "enum": ["bounded-effects", "verification-only"] },
|
|
65
|
+
"effectClasses": { "type": "array", "items": { "enum": ["filesystem", "command", "configuration", "dependency", "external"] }, "minItems": 1, "uniqueItems": true }
|
|
66
|
+
},
|
|
67
|
+
"additionalProperties": false
|
|
68
|
+
},
|
|
69
|
+
"effectReceipt": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["id", "effectClass", "status", "summary", "artifacts", "observedAt", "idempotencyKey"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"id": { "type": "string", "minLength": 1 },
|
|
74
|
+
"effectClass": { "enum": ["filesystem", "command", "configuration", "dependency", "external"] },
|
|
75
|
+
"status": { "enum": ["succeeded", "failed", "uncertain"] },
|
|
76
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
77
|
+
"command": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
78
|
+
"artifacts": { "type": "array", "items": { "$ref": "#/$defs/artifactReference" } },
|
|
79
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
80
|
+
"idempotencyKey": { "type": "string", "minLength": 1 }
|
|
81
|
+
},
|
|
82
|
+
"additionalProperties": false
|
|
83
|
+
},
|
|
84
|
+
"verificationReceipt": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": ["id", "criterionId", "status", "summary", "target", "artifacts", "observedAt"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"id": { "type": "string", "minLength": 1 },
|
|
89
|
+
"criterionId": { "type": "string", "minLength": 1 },
|
|
90
|
+
"status": { "enum": ["passed", "failed", "inconclusive"] },
|
|
91
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
92
|
+
"target": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"required": ["modelHash", "graphHash", "effectHeadDigest"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"modelHash": { "$ref": "#/$defs/sha256" },
|
|
97
|
+
"graphHash": { "$ref": "#/$defs/sha256" },
|
|
98
|
+
"effectHeadDigest": { "$ref": "#/$defs/sha256" }
|
|
99
|
+
},
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
},
|
|
102
|
+
"artifacts": { "type": "array", "items": { "$ref": "#/$defs/artifactReference" } },
|
|
103
|
+
"observedAt": { "type": "string", "format": "date-time" }
|
|
104
|
+
},
|
|
105
|
+
"additionalProperties": false
|
|
106
|
+
},
|
|
107
|
+
"blocker": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"required": ["code", "actionable"],
|
|
110
|
+
"properties": {
|
|
111
|
+
"code": { "type": "string", "minLength": 1 },
|
|
112
|
+
"actionable": { "type": "boolean" },
|
|
113
|
+
"details": { "type": "string" }
|
|
114
|
+
},
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
},
|
|
117
|
+
"payload": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"required": ["summary"],
|
|
120
|
+
"properties": {
|
|
121
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
122
|
+
"scope": { "$ref": "#/$defs/scope" },
|
|
123
|
+
"references": { "type": "array", "items": { "$ref": "#/$defs/artifactReference" } },
|
|
124
|
+
"authorization": { "$ref": "#/$defs/authorization" },
|
|
125
|
+
"effect": { "$ref": "#/$defs/effectReceipt" },
|
|
126
|
+
"verification": { "$ref": "#/$defs/verificationReceipt" },
|
|
127
|
+
"blocker": { "$ref": "#/$defs/blocker" },
|
|
128
|
+
"resumeTo": { "enum": ["authorized", "executing", "verifying"] },
|
|
129
|
+
"reason": { "type": "string" }
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workspai.dev/schemas/workspace-intelligence/decision-transaction.v1.json",
|
|
4
|
+
"title": "Workspai Decision Transaction Projection",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "id", "purpose", "createdAt", "updatedAt", "state", "generation", "eventCount", "eventHeadDigest", "intent", "requiredCriteria", "scope", "evidence", "plans", "authorization", "effects", "verifications", "blockers"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "workspai.decision-transaction.v1" },
|
|
9
|
+
"id": { "type": "string", "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$" },
|
|
10
|
+
"purpose": { "const": "proof-carrying-change" },
|
|
11
|
+
"createdAt": { "type": "string", "format": "date-time" },
|
|
12
|
+
"updatedAt": { "type": "string", "format": "date-time" },
|
|
13
|
+
"state": { "enum": ["draft", "scoped", "evidence-ready", "authorized", "executing", "verifying", "awaiting-human", "blocked", "committed", "rejected", "aborted", "superseded"] },
|
|
14
|
+
"generation": { "type": "integer", "minimum": 1 },
|
|
15
|
+
"eventCount": { "type": "integer", "minimum": 1 },
|
|
16
|
+
"eventHeadDigest": { "$ref": "decision-event.v1.json#/$defs/sha256" },
|
|
17
|
+
"intent": { "$ref": "decision-event.v1.json#/$defs/artifactReference" },
|
|
18
|
+
"requiredCriteria": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
19
|
+
"scope": { "oneOf": [{ "$ref": "decision-event.v1.json#/$defs/scope" }, { "type": "null" }] },
|
|
20
|
+
"evidence": { "type": "array", "items": { "$ref": "decision-event.v1.json#/$defs/artifactReference" } },
|
|
21
|
+
"plans": { "type": "array", "items": { "$ref": "decision-event.v1.json#/$defs/artifactReference" } },
|
|
22
|
+
"authorization": { "oneOf": [{ "$ref": "decision-event.v1.json#/$defs/authorization" }, { "type": "null" }] },
|
|
23
|
+
"effects": { "type": "array", "items": { "$ref": "decision-event.v1.json#/$defs/effectReceipt" } },
|
|
24
|
+
"verifications": { "type": "array", "items": { "$ref": "decision-event.v1.json#/$defs/verificationReceipt" } },
|
|
25
|
+
"blockers": { "type": "array", "items": { "$ref": "decision-event.v1.json#/$defs/blocker" } },
|
|
26
|
+
"terminalReason": { "type": "string" }
|
|
27
|
+
},
|
|
28
|
+
"additionalProperties": false
|
|
29
|
+
}
|
|
@@ -111,6 +111,19 @@
|
|
|
111
111
|
"uniqueItems": true,
|
|
112
112
|
"items": { "type": "string", "minLength": 1 }
|
|
113
113
|
},
|
|
114
|
+
"changeTransactionId": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$"
|
|
117
|
+
},
|
|
118
|
+
"changeTransactionIds": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"maxItems": 25,
|
|
121
|
+
"uniqueItems": true,
|
|
122
|
+
"items": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
114
127
|
"verificationReceipt": {
|
|
115
128
|
"type": "object",
|
|
116
129
|
"required": [
|
|
@@ -269,12 +269,13 @@
|
|
|
269
269
|
},
|
|
270
270
|
"commands": {
|
|
271
271
|
"type": "object",
|
|
272
|
-
"required": ["refreshEvidence", "inspectGraph", "proposeRepair"],
|
|
272
|
+
"required": ["refreshEvidence", "inspectGraph", "beginChange", "proposeRepair"],
|
|
273
273
|
"properties": {
|
|
274
274
|
"refreshEvidence": {
|
|
275
275
|
"const": "workspai workspace intelligence run --for-agent generic --strict --json"
|
|
276
276
|
},
|
|
277
277
|
"inspectGraph": { "type": "string", "pattern": "^workspai workspace graph search " },
|
|
278
|
+
"beginChange": { "type": "string", "pattern": "^workspai change begin --goal [^ ]+ --json$" },
|
|
278
279
|
"planVerifiedGoal": { "type": "string", "pattern": "^workspai workspace goal plan " },
|
|
279
280
|
"proposeRepair": {
|
|
280
281
|
"const": "workspai workspace repair propose --file <proposal.json> --json"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workspai.dev/schemas/workspace-intelligence/predicted-architecture-change.v1.json",
|
|
4
|
+
"title": "Workspai Predicted Architecture Change",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "changeId", "goalId", "generatedAt", "baselineGeneration", "nonCanonical", "proofEligible", "operations", "assumptions", "predictedRisk"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "workspai.predicted-architecture-change.v1" },
|
|
9
|
+
"changeId": { "type": "string", "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$" },
|
|
10
|
+
"goalId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
12
|
+
"baselineGeneration": { "$ref": "decision-event.v1.json#/$defs/sha256" },
|
|
13
|
+
"nonCanonical": { "const": true },
|
|
14
|
+
"proofEligible": { "const": false },
|
|
15
|
+
"operations": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["operation", "targetKind", "targetId", "rationale", "confidence"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"operation": { "enum": ["add", "remove", "change"] },
|
|
22
|
+
"targetKind": { "enum": ["entity", "relation", "proof", "artifact"] },
|
|
23
|
+
"targetId": { "type": "string", "minLength": 1 },
|
|
24
|
+
"rationale": { "type": "string", "minLength": 1 },
|
|
25
|
+
"confidence": { "enum": ["high", "medium", "low"] }
|
|
26
|
+
},
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"assumptions": { "type": "array", "items": { "type": "string" } },
|
|
31
|
+
"predictedRisk": { "enum": ["none", "low", "medium", "high"] }
|
|
32
|
+
},
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workspai.dev/schemas/workspace-intelligence/proof-carrying-change-capsule-export.v1.json",
|
|
4
|
+
"title": "Workspai Proof-Carrying Change Capsule Export",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "changeId", "outputPath", "validation"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "workspai.proof-carrying-change-capsule-export.v1" },
|
|
9
|
+
"changeId": { "type": "string", "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$" },
|
|
10
|
+
"outputPath": { "type": "string", "minLength": 1 },
|
|
11
|
+
"validation": { "$ref": "proof-carrying-change-capsule-validation.v1.json" }
|
|
12
|
+
},
|
|
13
|
+
"additionalProperties": false
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workspai.dev/schemas/workspace-intelligence/proof-carrying-change-capsule-validation.v1.json",
|
|
4
|
+
"title": "Workspai Proof-Carrying Change Capsule Validation",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "changeId", "validatedAt", "valid", "errors", "capsule"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "workspai.proof-carrying-change-capsule-validation.v1" },
|
|
9
|
+
"changeId": { "type": "string", "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$" },
|
|
10
|
+
"validatedAt": { "type": "string", "format": "date-time" },
|
|
11
|
+
"valid": { "type": "boolean" },
|
|
12
|
+
"errors": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
13
|
+
"capsule": { "$ref": "proof-carrying-change-capsule.v1.json" }
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workspai.dev/schemas/workspace-intelligence/proof-carrying-change-capsule.v1.json",
|
|
4
|
+
"title": "Workspai Proof-Carrying Change Capsule",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "changeId", "goalId", "generatedAt", "status", "workspace", "scope", "decision", "intent", "baseline", "prediction", "actualOverlay", "surpriseReport", "effects", "verification", "assurances", "remainingUncertainty", "integrity"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "workspai.proof-carrying-change-capsule.v1" },
|
|
9
|
+
"changeId": { "type": "string", "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$" },
|
|
10
|
+
"goalId": { "type": "string", "minLength": 1 },
|
|
11
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
12
|
+
"status": { "enum": ["open", "blocked", "verified", "sealed", "aborted"] },
|
|
13
|
+
"workspace": { "type": "object", "required": ["name"], "properties": { "name": { "type": "string", "minLength": 1 } }, "additionalProperties": false },
|
|
14
|
+
"scope": { "$ref": "decision-event.v1.json#/$defs/scope" },
|
|
15
|
+
"decision": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["transaction", "eventHeadDigest", "effectHeadDigest", "state", "generation"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"transaction": { "$ref": "decision-event.v1.json#/$defs/artifactReference" },
|
|
20
|
+
"eventHeadDigest": { "$ref": "decision-event.v1.json#/$defs/sha256" },
|
|
21
|
+
"effectHeadDigest": { "$ref": "decision-event.v1.json#/$defs/sha256" },
|
|
22
|
+
"state": { "type": "string", "minLength": 1 },
|
|
23
|
+
"generation": { "type": "integer", "minimum": 1 }
|
|
24
|
+
},
|
|
25
|
+
"additionalProperties": false
|
|
26
|
+
},
|
|
27
|
+
"intent": { "$ref": "decision-event.v1.json#/$defs/artifactReference" },
|
|
28
|
+
"baseline": { "$ref": "architecture-change-lease.v1.json#/properties/baseline" },
|
|
29
|
+
"prediction": { "oneOf": [{ "$ref": "decision-event.v1.json#/$defs/artifactReference" }, { "type": "null" }] },
|
|
30
|
+
"actualOverlay": { "oneOf": [{ "$ref": "decision-event.v1.json#/$defs/artifactReference" }, { "type": "null" }] },
|
|
31
|
+
"surpriseReport": { "oneOf": [{ "$ref": "decision-event.v1.json#/$defs/artifactReference" }, { "type": "null" }] },
|
|
32
|
+
"effects": { "type": "array", "items": { "$ref": "decision-event.v1.json#/$defs/artifactReference" } },
|
|
33
|
+
"verification": { "type": "array", "items": { "$ref": "decision-event.v1.json#/$defs/artifactReference" } },
|
|
34
|
+
"assurances": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["id", "status", "summary"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"id": { "enum": ["intent-bound", "baseline-pinned", "effects-receipted", "architecture-reobserved", "independently-verified"] },
|
|
41
|
+
"status": { "enum": ["passed", "failed", "pending"] },
|
|
42
|
+
"summary": { "type": "string", "minLength": 1 }
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
},
|
|
46
|
+
"minItems": 5,
|
|
47
|
+
"maxItems": 5
|
|
48
|
+
},
|
|
49
|
+
"remainingUncertainty": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
|
|
50
|
+
"integrity": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": ["algorithm", "semantics", "capsuleDigest"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"algorithm": { "const": "sha256" },
|
|
55
|
+
"semantics": { "const": "canonical-json-v1" },
|
|
56
|
+
"capsuleDigest": { "$ref": "decision-event.v1.json#/$defs/sha256" }
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://workspai.dev/schemas/workspace-intelligence/proof-carrying-change-list.v1.json",
|
|
4
|
+
"title": "Workspai Proof-Carrying Change List",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schemaVersion", "generatedAt", "workspace", "changes", "summary"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": "workspai.proof-carrying-change-list.v1" },
|
|
9
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
10
|
+
"workspace": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"required": ["name"],
|
|
13
|
+
"properties": { "name": { "type": "string", "minLength": 1 } },
|
|
14
|
+
"additionalProperties": false
|
|
15
|
+
},
|
|
16
|
+
"changes": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": [
|
|
21
|
+
"changeId",
|
|
22
|
+
"goalId",
|
|
23
|
+
"state",
|
|
24
|
+
"status",
|
|
25
|
+
"createdAt",
|
|
26
|
+
"updatedAt",
|
|
27
|
+
"scope",
|
|
28
|
+
"assurance",
|
|
29
|
+
"blockers",
|
|
30
|
+
"capsuleArtifact",
|
|
31
|
+
"valid",
|
|
32
|
+
"errors"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"changeId": { "type": "string", "pattern": "^change-[a-z0-9][a-z0-9-]{7,95}$" },
|
|
36
|
+
"goalId": { "type": ["string", "null"] },
|
|
37
|
+
"state": { "type": ["string", "null"] },
|
|
38
|
+
"status": { "enum": ["open", "blocked", "verified", "sealed", "aborted", "invalid"] },
|
|
39
|
+
"createdAt": {
|
|
40
|
+
"oneOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }]
|
|
41
|
+
},
|
|
42
|
+
"updatedAt": {
|
|
43
|
+
"oneOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }]
|
|
44
|
+
},
|
|
45
|
+
"scope": {
|
|
46
|
+
"oneOf": [{ "$ref": "decision-event.v1.json#/$defs/scope" }, { "type": "null" }]
|
|
47
|
+
},
|
|
48
|
+
"assurance": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": ["passed", "total"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"passed": { "type": "integer", "minimum": 0 },
|
|
53
|
+
"total": { "type": "integer", "minimum": 0 }
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": false
|
|
56
|
+
},
|
|
57
|
+
"blockers": { "type": "array", "items": { "type": "string" } },
|
|
58
|
+
"capsuleArtifact": { "type": "string", "minLength": 1 },
|
|
59
|
+
"valid": { "type": "boolean" },
|
|
60
|
+
"errors": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"summary": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"required": ["total", "open", "blocked", "sealed", "aborted", "invalid"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"total": { "type": "integer", "minimum": 0 },
|
|
70
|
+
"open": { "type": "integer", "minimum": 0 },
|
|
71
|
+
"blocked": { "type": "integer", "minimum": 0 },
|
|
72
|
+
"sealed": { "type": "integer", "minimum": 0 },
|
|
73
|
+
"aborted": { "type": "integer", "minimum": 0 },
|
|
74
|
+
"invalid": { "type": "integer", "minimum": 0 }
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
}
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"allOf": [
|
|
36
36
|
{ "$ref": "#/$defs/changeSet" },
|
|
37
37
|
{
|
|
38
|
+
"type": "object",
|
|
38
39
|
"properties": {
|
|
39
40
|
"added": {
|
|
40
41
|
"type": "array",
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
"allOf": [
|
|
54
55
|
{ "$ref": "#/$defs/changeSet" },
|
|
55
56
|
{
|
|
57
|
+
"type": "object",
|
|
56
58
|
"properties": {
|
|
57
59
|
"added": {
|
|
58
60
|
"type": "array",
|
|
@@ -71,6 +73,7 @@
|
|
|
71
73
|
"allOf": [
|
|
72
74
|
{ "$ref": "#/$defs/changeSet" },
|
|
73
75
|
{
|
|
76
|
+
"type": "object",
|
|
74
77
|
"properties": {
|
|
75
78
|
"added": {
|
|
76
79
|
"type": "array",
|
|
@@ -145,7 +148,12 @@
|
|
|
145
148
|
},
|
|
146
149
|
"changeSet": {
|
|
147
150
|
"type": "object",
|
|
148
|
-
"required": ["added", "removed", "changed"]
|
|
151
|
+
"required": ["added", "removed", "changed"],
|
|
152
|
+
"properties": {
|
|
153
|
+
"added": {},
|
|
154
|
+
"removed": {},
|
|
155
|
+
"changed": {}
|
|
156
|
+
}
|
|
149
157
|
},
|
|
150
158
|
"entityChange": {
|
|
151
159
|
"type": "object",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-YWZBGSFE.js';
|
package/dist/{artifact-remediation-plan-GFFHC2ZU.js → artifact-remediation-plan-JHHZ4L24.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as buildArtifactRemediationPlan,b as writeArtifactRemediationPlan}from'./chunk-
|
|
1
|
+
export{a as buildArtifactRemediationPlan,b as writeArtifactRemediationPlan}from'./chunk-A3MYO55A.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-VNKAISFE.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as runDoctorCapabilities}from'./chunk-GSSJJS5M.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {e,i as i$1,h as h$1,g as g$1,f,a}from'./chunk-W37NOQVG.js';import E from'crypto';import g from'fs';import k from'path';var i=null,h=/(?:authorization|cookie|credential|password|passwd|secret|token|api[-_]?key)/i;function R(e,t){return t.WORKSPAI_ACTIVITY_DISABLE==="1"||(t.VITEST==="true"||t.VITEST==="1"||t.NODE_ENV==="test")&&t.WORKSPAI_ACTIVITY_FORCE!=="1"?true:e[0]==="live"}function m(e,t="",n=0){if(h.test(t))return "[REDACTED]";if(n>4)return "[TRUNCATED]";if(e!==void 0){if(e===null||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return l(e);if(Array.isArray(e))return e.slice(0,100).map(o=>m(o,t,n+1));if(e instanceof Error)return {name:e.name,message:l(e.message)};if(typeof e=="object"){let o={};for(let[s,r]of Object.entries(e).slice(0,100))o[s]=m(r,s,n+1);return o}return String(e)}}function l(e){let t=e;for(let n of i?.sensitiveValues??[])n.length>=3&&(t=t.split(n).join("[REDACTED]"));if(t=t.replace(/((?:authorization|cookie|credential|password|passwd|secret|token|api[-_]?key)\s*[=:]\s*)(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi,"$1[REDACTED]"),t=t.replace(/\bBearer\s+[^\s,;]+/gi,"Bearer [REDACTED]"),i){let n=i.resolvedScope.observationRootPath,o=[n,i.resolvedScope.rootPath].sort((s,r)=>r.length-s.length);for(let s of new Set(o))t=t.split(s).join("."),k.sep==="\\"&&(t=t.split(s.replaceAll("\\","/")).join("."));t=t.replace(/(^|[\s("'=])((?:[A-Za-z]:[\\/]|\/)(?!\/)[^\s"',;)\]}]+)/g,(s,r,a)=>`${r}${g$1(n,a)}`);}return t.length>2e3?`${t.slice(0,2e3)}\u2026`:t}function S(e,t){return e.startsWith("-")?h.test(e)?true:t.some(o=>/^(?:set|add|update|rotate)-(?:api-)?(?:key|token|secret|password)$/i.test(o))&&/^--?key$/i.test(e):false}function w(e){let t=[],n=false;for(let o of e){if(n){o.length>0&&t.push(o),n=false;continue}let s=o.indexOf("="),r=s>=0?o.slice(0,s):o;if(S(r,e))if(s>=0){let a=o.slice(s+1);a.length>0&&t.push(a);}else n=true;}return [...new Set(t)]}function B(e,t){let n=false;return e.map(o=>{if(n)return n=false,"[REDACTED]";let s=o.indexOf("="),r=s>=0?o.slice(0,s):o;return S(r,e)?s>=0?`${r}=[REDACTED]`:(n=true,o):k.isAbsolute(o)?g$1(t,o):o.length>300?`${o.slice(0,300)}\u2026`:o})}function P(e){if(e)return m(e)}function d(e){if(!i||i.finalized)return null;let t;if(e.blockId&&e.kind.startsWith("block.")&&e.kind!=="block.planned"){let r=i.blockAttempts.get(e.blockId)??0,a=i.blockStatuses.get(e.blockId);e.kind==="block.started"?t=a==="running"?Math.max(1,r):r+1:(e.kind!=="block.skipped"||r>0)&&(t=Math.max(1,r));}let n={schemaVersion:a,eventId:E.randomUUID(),sequence:++i.sequence,timestamp:new Date().toISOString(),runId:i.runId,...i.parentRunId?{parentRunId:i.parentRunId}:{},scope:i.resolvedScope.scope,...e,origin:f(i.resolvedScope),...t!==void 0?{attempt:t}:{},component:l(e.component),message:l(e.message),...e.target?{target:{...e.target,...e.target.locator?{locator:l(e.target.locator)}:{},...e.target.operation?{operation:l(e.target.operation)}:{}}}:{},...e.evidenceBindings?{evidenceBindings:e.evidenceBindings.slice(0,100).map(r=>({...r,ref:l(r.ref),...r.graphSourceHash?{graphSourceHash:l(r.graphSourceHash)}:{}}))}:{},...e.attributes?{attributes:P(e.attributes)}:{}},o=`${JSON.stringify(n)}
|
|
2
|
+
`,s=false;for(let r of i.fds)try{g.writeSync(r,o),s=true;}catch{}return s&&n.blockId&&n.kind.startsWith("block.")&&(i.blockStatuses.set(n.blockId,n.status),n.attempt!==void 0&&i.blockAttempts.set(n.blockId,n.attempt)),s?n:null}function O(e$1){let t=e$1.env??process.env;if(!R(e$1.command,t)){T(1,"Previous in-process activity run was superseded.");try{let n=e(e$1.cwd,{env:t}),s=[n.statePath,...n.mirrorStatePaths].map(c=>{let f=k.join(c,"runs");return g.mkdirSync(f,{recursive:true,mode:448}),i$1(f,{maxRuns:h$1-1}),k.join(f,`${e$1.runId}.ndjson`)}),r=[];try{for(let c of s)r.push(g.openSync(c,"a",384));}catch(c){for(let f of r)try{g.closeSync(f);}catch{}throw c}let a=w(e$1.command),u=B(e$1.command,n.observationRootPath);i={runId:e$1.runId,...e$1.parentRunId?{parentRunId:e$1.parentRunId}:{},command:u,sensitiveValues:a,startedAtMs:Date.now(),sequence:0,fds:r,journalPaths:s,resolvedScope:n,...e$1.blueprint?.nodes[0]?.id?{rootBlockId:e$1.blueprint.nodes[0].id}:{},blockStatuses:new Map,blockAttempts:new Map,finalized:false},d({kind:"run.started",status:"running",component:"cli",message:u.length>0?`workspai ${u.join(" ")}`:"workspai",attributes:{command:u,rapidkitVersion:e$1.rapidkitVersion,pid:process.pid,blueprintId:e$1.blueprint?.id,blueprintVersion:e$1.blueprint?.version}});for(let c of e$1.blueprint?.nodes??[])d({kind:"block.planned",status:"planned",component:"cli",blockId:c.id,parentSpanId:c.parentId,message:c.label,attributes:{order:c.order,layoutHint:c.layoutHint,group:c.group},...c.evidenceBindings?{evidenceBindings:c.evidenceBindings}:{}});for(let c of e$1.blueprint?.edges??[])d({kind:"edge.declared",status:"planned",component:"cli",message:`${c.from} -> ${c.to}`,edge:{id:c.id,fromBlockId:c.from,toBlockId:c.to,kind:c.kind},attributes:{order:c.order}});i.rootBlockId&&d({kind:"block.started",status:"running",component:"cli",blockId:i.rootBlockId,message:e$1.blueprint?.nodes[0]?.label??"Workspai command"});}catch{i=null;}}}function j(e){return d(e)}function H(e){let t=e.status==="planned"?"block.planned":e.status==="running"?e.progress?"block.progress":"block.started":e.status==="succeeded"?"block.completed":e.status==="failed"?"block.failed":e.status==="blocked"?"block.blocked":e.status==="skipped"?"block.skipped":"block.progress";return d({kind:t,status:e.status,component:e.component??"cli",blockId:e.blockId,message:e.message,...e.progress?{progress:e.progress}:{},...e.attributes?{attributes:e.attributes}:{},...e.evidenceBindings?{evidenceBindings:e.evidenceBindings}:{}})}function K(e){let t=i?g$1(i.resolvedScope.observationRootPath,k.resolve(e.workspacePath,e.relativePath)):e.relativePath.replaceAll("\\","/"),n=i?[...i.blockStatuses.entries()].filter(([s,r])=>s!==i?.rootBlockId&&r==="running").map(([s])=>s):[],o=e.blockId??(n.length===1?n[0]:void 0);return d({kind:"artifact.published",status:"succeeded",component:"artifact-store",message:`Published ${t}`,...o?{blockId:o}:{},target:{kind:"artifact",locator:t,operation:e.operation??"publish",provenance:"authoritative"},evidenceBindings:[{kind:"artifact",ref:t,role:"output",provenance:"authoritative"}]})}function L(e){if(!i)return null;let t=g$1(i.resolvedScope.observationRootPath,e.targetPath);return d({kind:e.status==="planned"?"touch.planned":"touch.observed",status:e.status??"succeeded",component:"filesystem",message:e.message??`${e.operation} ${t}`,target:{kind:"file",locator:t,operation:e.operation,provenance:e.provenance??"authoritative"}})}function T(e,t){if(!i||i.finalized)return;let n=i,o=Date.now()-n.startedAtMs;for(let[s,r]of [...n.blockStatuses.entries()]){if(s===n.rootBlockId||r!=="planned"&&r!=="running")continue;let a=r==="running",u=e===130||e===143;d({kind:a?e===0?"block.completed":u?"block.blocked":"block.failed":"block.skipped",status:a?e===0?"succeeded":u?"cancelled":"failed":"skipped",component:"cli",blockId:s,message:a?e===0?"Stage completed with command":t??`Stage interrupted by command exit ${e}`:"Stage was not entered",durationMs:o,attributes:{finalizedByRun:true}});}n.rootBlockId&&d({kind:e===0?"block.completed":e===130||e===143?"block.blocked":"block.failed",status:e===0?"succeeded":e===130||e===143?"cancelled":"failed",component:"cli",blockId:n.rootBlockId,message:t??(e===0?"Command completed":`Command exited with code ${e}`),durationMs:o}),d({kind:e===0?"run.completed":e===130||e===143?"run.cancelled":"run.failed",status:e===0?"succeeded":e===130||e===143?"cancelled":"failed",component:"cli",message:t??(e===0?"CLI run completed":`CLI run exited with code ${e}`),durationMs:o,attributes:{exitCode:e}}),n.finalized=true;for(let s of n.fds)try{g.closeSync(s);}catch{}i=null;}export{O as a,j as b,H as c,K as d,L as e,T as f};
|