workspai 0.64.0 → 0.65.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 +37 -44
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +4 -0
- package/contracts/runtime-command-surface.v1.json +12 -1
- package/contracts/workspace-contract.v1.json +51 -6
- package/contracts/workspace-intelligence/project-context-agent.v1.json +29 -0
- package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +11 -1
- package/contracts/workspace-intelligence/workspace-model.v1.json +28 -1
- package/contracts/workspace-model-cache.v1.json +4 -0
- package/contracts/workspace-repair-capabilities.v1.json +66 -0
- package/dist/analyze-5PDVWECJ.js +1 -0
- package/dist/autopilot-release-JVIJCTKX.js +1 -0
- package/dist/chunk-2C5ZBVBI.js +2 -0
- package/dist/{chunk-VB6I52ZT.js → chunk-2RL6RRT2.js} +2 -2
- package/dist/{chunk-FQSBOLM7.js → chunk-6JWNDWOA.js} +1 -1
- package/dist/chunk-D5YJOQYK.js +1 -0
- package/dist/{chunk-2VJUAKMS.js → chunk-DFG33SBR.js} +2 -2
- package/dist/chunk-FY4IIAIF.js +1 -0
- package/dist/{chunk-KJXMLBSY.js → chunk-HDNATYW7.js} +1 -1
- package/dist/chunk-HEZZ72V4.js +94 -0
- package/dist/{chunk-KANAJH65.js → chunk-HN7P4T3B.js} +1 -1
- package/dist/chunk-J7QYANXK.js +8 -0
- package/dist/{chunk-DK6JNE6K.js → chunk-JD3A5QM6.js} +1 -1
- package/dist/chunk-KLSSPJTV.js +1 -0
- package/dist/{chunk-DOXNVBX6.js → chunk-MDTI3UEB.js} +1 -1
- package/dist/chunk-MYJQGGIU.js +5 -0
- package/dist/chunk-NOV6723U.js +1 -0
- package/dist/chunk-NYEAMMUL.js +1 -0
- package/dist/chunk-O5B2L3R2.js +1 -0
- package/dist/chunk-OWB5KWSS.js +13 -0
- package/dist/chunk-P5PSZQPB.js +2 -0
- package/dist/chunk-QI3HG6IG.js +144 -0
- package/dist/chunk-SWGSFLTC.js +1 -0
- package/dist/chunk-U5FCQTVL.js +4 -0
- package/dist/chunk-VVJK5NFY.js +2 -0
- package/dist/chunk-VXKWWX7S.js +8 -0
- package/dist/chunk-W322YDHS.js +49 -0
- package/dist/chunk-WCJU3CFG.js +1 -0
- package/dist/chunk-WPRLXKWC.js +8 -0
- package/dist/{chunk-ZGS5NKEO.js → chunk-XGE2FDI4.js} +1 -1
- package/dist/{chunk-5SFCBZOH.js → chunk-YN5X2FTP.js} +1 -1
- package/dist/chunk-YOCN7GF4.js +1 -0
- package/dist/chunk-YYQEWAES.js +1 -0
- package/dist/chunk-ZEEV5J4I.js +1 -0
- package/dist/{create-PWJDTKDN.js → create-ALT2ME6H.js} +1 -1
- package/dist/{doctor-CGXY4IDE.js → doctor-RW4R3O5C.js} +1 -1
- package/dist/{goal-lifecycle-BRFFTIU2.js → goal-lifecycle-VYOKS6E6.js} +1 -1
- package/dist/goal-pack-YWPI43QL.js +1 -0
- package/dist/index.js +144 -144
- package/dist/{pipeline-DF4UIHAD.js → pipeline-U4N2DVD7.js} +1 -1
- package/dist/{project-agent-entry-IWUCV72J.js → project-agent-entry-YAQCHIMP.js} +1 -1
- package/dist/project-intelligence-lens-MRQR2LQW.js +1 -0
- package/dist/verified-goal-WM34TTGE.js +1 -0
- package/dist/{workspace-35Q2IXAR.js → workspace-HGUZWNAB.js} +1 -1
- package/dist/{workspace-agent-sync-FFNSW2PD.js → workspace-agent-sync-GEN3KBAX.js} +1 -1
- package/dist/{workspace-context-IJ36ZP6G.js → workspace-context-4WIWFW26.js} +1 -1
- package/dist/workspace-contract-7DXK4GF5.js +1 -0
- package/dist/{workspace-explain-TITIT5XN.js → workspace-explain-TE2LGOAV.js} +1 -1
- package/dist/{workspace-foundation-GMGDUMPR.js → workspace-foundation-J3NNRMI3.js} +1 -1
- package/dist/workspace-graph-stream-PQI7OGCE.js +1 -0
- package/dist/workspace-graph-token-efficiency-2I4X374C.js +1 -0
- package/dist/{workspace-intelligence-5NO4K5SC.js → workspace-intelligence-6FS26JOQ.js} +1 -1
- package/dist/{workspace-intelligence-runner-FGEBFVVM.js → workspace-intelligence-runner-XYUPCSLN.js} +1 -1
- package/dist/workspace-knowledge-graph-SWCKDTPF.js +1 -0
- package/dist/workspace-knowledge-graph-contract-L3CLAM2M.js +1 -0
- package/dist/{workspace-knowledge-graph-query-ON45H6Y7.js → workspace-knowledge-graph-query-FZXSPWGK.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-M572JRB4.js +1 -0
- package/dist/workspace-mcp-serve-IBMTFQDY.js +3 -0
- package/dist/workspace-model-ZL6WCICX.js +1 -0
- package/dist/{workspace-onboarding-VS3YYNGK.js → workspace-onboarding-X3PWRIIS.js} +1 -1
- package/dist/{workspace-registry-summary-MIDFG6EC.js → workspace-registry-summary-LJN4WHIZ.js} +1 -1
- package/dist/workspace-repair-engine-NX7I632M.js +3 -0
- package/dist/workspace-run-6GT5OBQ5.js +1 -0
- package/dist/{workspace-verify-4R7QHUPO.js → workspace-verify-USRRIM2F.js} +1 -1
- package/dist/workspace-watch-43YZPLF7.js +1 -0
- package/docs/ci-workflows.md +1 -1
- package/docs/commands-reference.md +3 -1
- package/docs/workspace-knowledge-graph.md +36 -0
- package/docs/workspace-operations.md +22 -0
- package/docs/workspace-repair-engine.md +17 -0
- package/package.json +1 -1
- package/dist/analyze-NUGNB256.js +0 -1
- package/dist/autopilot-release-TWJWSVVF.js +0 -1
- package/dist/chunk-3A23KJAQ.js +0 -1
- package/dist/chunk-4PUJVYRM.js +0 -1
- package/dist/chunk-5B2GAZAC.js +0 -5
- package/dist/chunk-6DAQ7PYT.js +0 -13
- package/dist/chunk-CCAXADKP.js +0 -49
- package/dist/chunk-CJHWKXDN.js +0 -1
- package/dist/chunk-CT4IODPG.js +0 -2
- package/dist/chunk-DWB2RRF4.js +0 -1
- package/dist/chunk-ISOOENLW.js +0 -8
- package/dist/chunk-J7RU5WR5.js +0 -2
- package/dist/chunk-KV6PS54A.js +0 -8
- package/dist/chunk-NHTDPXTW.js +0 -4
- package/dist/chunk-Q2WF7D5U.js +0 -2
- package/dist/chunk-RSG2GJXT.js +0 -2
- package/dist/chunk-SFO5GVRT.js +0 -1
- package/dist/chunk-T5YRFRJV.js +0 -1
- package/dist/chunk-TOYN76K4.js +0 -144
- package/dist/chunk-U5WVR74V.js +0 -1
- package/dist/chunk-WY4DOMEA.js +0 -1
- package/dist/chunk-XKDR5BGS.js +0 -6
- package/dist/chunk-ZH7CXQH3.js +0 -94
- package/dist/goal-pack-FG3QDNQH.js +0 -1
- package/dist/project-intelligence-lens-PZPPSCUW.js +0 -1
- package/dist/verified-goal-BBHZRYYH.js +0 -1
- package/dist/workspace-contract-JS4LZZQZ.js +0 -1
- package/dist/workspace-graph-stream-7UU2YVHC.js +0 -1
- package/dist/workspace-graph-token-efficiency-D7CUT6NX.js +0 -1
- package/dist/workspace-knowledge-graph-RSDP2E36.js +0 -1
- package/dist/workspace-knowledge-graph-snapshot-3FJHH5IK.js +0 -1
- package/dist/workspace-mcp-serve-WUIQ2AE6.js +0 -3
- package/dist/workspace-model-OKY4CQ3X.js +0 -1
- package/dist/workspace-repair-engine-VUBT77Y7.js +0 -3
- package/dist/workspace-run-SSF6Z26G.js +0 -1
- package/dist/workspace-watch-IOPSHQS5.js +0 -1
package/README.md
CHANGED
|
@@ -18,28 +18,28 @@ npx workspai adopt .
|
|
|
18
18
|
npx workspai workspace intelligence run --for-agent generic
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Two commands. Your project
|
|
21
|
+
Two commands. Your project gains a bounded, evidence-backed system view:
|
|
22
22
|
|
|
23
23
|
### Before vs After
|
|
24
24
|
|
|
25
25
|
| Before Workspai | After Workspai |
|
|
26
26
|
| --- | --- |
|
|
27
|
-
| Agent scans thousands of files for context | Agent
|
|
27
|
+
| Agent scans thousands of files for context | Agent starts from bounded entry and context artifacts |
|
|
28
28
|
| No dependency map between services | Searchable graph with source-level proof |
|
|
29
|
-
| Broken test blocks release, no one knows why | Doctor
|
|
29
|
+
| Broken test blocks release, no one knows why | Doctor localizes the blocker and next target |
|
|
30
30
|
| Every AI session starts from scratch | Sessions resume from durable evidence |
|
|
31
31
|
|
|
32
32
|
Here is what you get:
|
|
33
33
|
|
|
34
34
|
| What it produces | Why it matters |
|
|
35
35
|
| --- | --- |
|
|
36
|
-
| **Workspace Model** | A canonical inventory of
|
|
36
|
+
| **Workspace Model** | A canonical inventory of registered projects, detected runtimes, frameworks, and proven dependencies |
|
|
37
37
|
| **Knowledge Graph** | Searchable relationships between projects, backed by source-level proof |
|
|
38
38
|
| **Health & Readiness** | Doctor checks, verification gates, and release posture based on evidence, not guesses |
|
|
39
39
|
| **Agent Context** | Bounded, focused instructions so AI tools read what they need, not the entire repo |
|
|
40
40
|
| **Agent Rules** | Ready-to-use grounding for Cursor, Copilot, Claude, Codex, Gemini, and more |
|
|
41
41
|
| **Agent Skills** | Runtime-, polyglot-, test-, and delivery-aware operational playbooks, with portable `SKILL.md` projections where the host supports Agent Skills |
|
|
42
|
-
| **MCP Server** |
|
|
42
|
+
| **MCP Server** | Versioned read-oriented tools for querying evidence, graph, blockers, and context live |
|
|
43
43
|
|
|
44
44
|
`generic` is the safe default when you do not yet know which agent will use the
|
|
45
45
|
project: Workspai builds one portable context and prepares discovery adapters
|
|
@@ -47,46 +47,28 @@ for every supported host, without duplicating the Model or Graph.
|
|
|
47
47
|
|
|
48
48
|
### What the output looks like
|
|
49
49
|
|
|
50
|
-
After a single run,
|
|
50
|
+
After a single run, the canonical workspace stores governed artifacts under
|
|
51
|
+
`.workspai/`. Each linked project keeps only its local entry contract, scoped
|
|
52
|
+
lens, and workspace binding under its own `.workspai/` directory:
|
|
51
53
|
|
|
52
54
|
```text
|
|
53
|
-
your-workspace/
|
|
55
|
+
your-workspace/ # canonical system boundary
|
|
54
56
|
├── .workspai/
|
|
55
|
-
│ ├── workspace.json
|
|
56
|
-
│ ├──
|
|
57
|
-
│ ├──
|
|
58
|
-
│ │ ├── workspace-
|
|
59
|
-
│ │ ├── workspace-
|
|
60
|
-
│ │
|
|
61
|
-
│
|
|
62
|
-
│ │ ├── workspace-verify-last-run.json # pass/fail with evidence
|
|
63
|
-
│ │ ├── INDEX.json # evidence inventory & read order
|
|
64
|
-
│ │ └── ... # impact, doctor, analyze, explain, etc.
|
|
65
|
-
│ └── skills/ # generated operational skills
|
|
66
|
-
│ ├── workspai-release-readiness.md # always available
|
|
67
|
-
│ ├── workspai-node-runtime-validation.md # only when Node is detected
|
|
68
|
-
│ └── workspai-polyglot-change-validation.md # only for multi-runtime workspaces
|
|
69
|
-
│
|
|
70
|
-
│ # Workspace-level agent grounding (per host):
|
|
57
|
+
│ ├── workspace.contract.json # registered projects and declarations
|
|
58
|
+
│ ├── reports/
|
|
59
|
+
│ │ ├── workspace-model.json # canonical system model
|
|
60
|
+
│ │ ├── workspace-knowledge-graph.json # derived proof-backed graph
|
|
61
|
+
│ │ ├── workspace-context-agent.json # bounded consumer context
|
|
62
|
+
│ │ └── INDEX.json # evidence inventory and read order
|
|
63
|
+
│ └── skills/ # detected operational playbooks
|
|
71
64
|
├── AGENTS.md · CLAUDE.md · GEMINI.md · QWEN.md
|
|
72
|
-
├── .cursor/
|
|
73
|
-
├── .claude/rules/workspai-*.md # workspace + evidence
|
|
74
|
-
├── .grok/rules/ · .windsurf/rules/ # grounding + evidence
|
|
75
|
-
├── .amazonq/rules/ · .github/ # Copilot, prompts, agents, skills
|
|
76
|
-
│
|
|
77
|
-
│ # ── Project level (repeated per project) ──
|
|
65
|
+
├── .cursor/ · .claude/ · .github/ · .agents/ # host-native projections
|
|
78
66
|
├── nova-api/
|
|
79
|
-
│
|
|
80
|
-
│
|
|
81
|
-
│
|
|
82
|
-
│
|
|
83
|
-
|
|
84
|
-
│ │ └── reports/
|
|
85
|
-
│ │ └── project-context-agent.json # scoped project context
|
|
86
|
-
│ ├── AGENTS.md · CLAUDE.md · GEMINI.md · QWEN.md
|
|
87
|
-
│ └── .amazonq/rules/workspai-agent-entry.md
|
|
88
|
-
│
|
|
89
|
-
└── summit-web/ # (same structure per project)
|
|
67
|
+
│ └── .workspai/
|
|
68
|
+
│ ├── agent-entry.v1.json # canonical project entry
|
|
69
|
+
│ ├── workspace-link.local.json # machine-local binding
|
|
70
|
+
│ └── reports/project-context-agent.json
|
|
71
|
+
└── summit-web/ # same project-level boundary
|
|
90
72
|
```
|
|
91
73
|
|
|
92
74
|
Your agent starts with `agent-entry.v1.json`, compact workspace context, and the Skills
|
|
@@ -105,8 +87,8 @@ scan or complete Graph load is needed for ordinary work.
|
|
|
105
87
|
Workspai is an open-source CLI that brings related software projects together,
|
|
106
88
|
so people and AI tools can understand and work with the same system.
|
|
107
89
|
|
|
108
|
-
- **See the whole system:**
|
|
109
|
-
- **Ask with proof:** trace
|
|
90
|
+
- **See the whole system:** registered projects and proven relationships in one model.
|
|
91
|
+
- **Ask with proof:** trace answers back to their evidence record and source location.
|
|
110
92
|
- **Change safely:** know impact before you commit, verify after, and give AI agents
|
|
111
93
|
only the context they need.
|
|
112
94
|
|
|
@@ -202,7 +184,7 @@ generated in one run. The key files for each audience:
|
|
|
202
184
|
| **AI agent** | `agent-entry.v1.json` (project) → `workspace-context-agent.json` (workspace) |
|
|
203
185
|
| **Developer** | Terminal summary, or `workspace-explain-last-run.json` for diagnosis |
|
|
204
186
|
| **CI / automation** | `workspace-verify-last-run.json` (exit code 0 = pass, 2 = blocked) |
|
|
205
|
-
| **MCP client** | `workspace mcp serve` (
|
|
187
|
+
| **MCP client** | `workspace mcp serve` (versioned read-oriented tools over JSON-RPC) |
|
|
206
188
|
| **IDE extension** | Same artifacts + watch events |
|
|
207
189
|
|
|
208
190
|
An agent can prove that it entered through governed evidence before scanning
|
|
@@ -264,6 +246,17 @@ complements this chain; it does not replace it.
|
|
|
264
246
|
|
|
265
247
|
The deterministic model, graph, and checks do not require an AI API key.
|
|
266
248
|
|
|
249
|
+
### See the evidence-backed graph
|
|
250
|
+
|
|
251
|
+
The graph connects projects, APIs, packages, tests, infrastructure, ownership,
|
|
252
|
+
and runtime topology only when current evidence supports the relationship.
|
|
253
|
+
Every visible relationship can retain proof, while missing relationships stay
|
|
254
|
+
explicitly unproven.
|
|
255
|
+
|
|
256
|
+

|
|
257
|
+
|
|
258
|
+
[Query, explain, and export the graph](docs/workspace-knowledge-graph.md)
|
|
259
|
+
|
|
267
260
|
## Everyday workflows
|
|
268
261
|
|
|
269
262
|
| Goal | Command |
|
|
@@ -294,7 +287,7 @@ Workspai exposes the same governed data through several stable surfaces:
|
|
|
294
287
|
- JSON output for scripts and CI;
|
|
295
288
|
- versioned artifacts under `.workspai/reports/`;
|
|
296
289
|
- focused context and instructions for AI agents;
|
|
297
|
-
- MCP server with
|
|
290
|
+
- MCP server with versioned read-oriented workspace tools (`workspace mcp serve`);
|
|
298
291
|
- watch events and reports for IDEs and dashboards;
|
|
299
292
|
- JSON, JSON-LD, Mermaid, DOT, GraphML, and GEXF graph exports.
|
|
300
293
|
|
|
@@ -2694,6 +2694,10 @@
|
|
|
2694
2694
|
"flag": "--limit",
|
|
2695
2695
|
"description": "Bound graph query results (1–100)."
|
|
2696
2696
|
},
|
|
2697
|
+
{
|
|
2698
|
+
"flag": "--kind",
|
|
2699
|
+
"description": "Limit graph entity search to one canonical entity kind."
|
|
2700
|
+
},
|
|
2697
2701
|
{
|
|
2698
2702
|
"flag": "--refresh-graph",
|
|
2699
2703
|
"description": "Bypass the compatible persisted graph and rebuild from live sources."
|
|
@@ -2732,7 +2736,7 @@
|
|
|
2732
2736
|
],
|
|
2733
2737
|
"artifact": null,
|
|
2734
2738
|
"examples": [
|
|
2735
|
-
"workspai workspace graph search \"authentication endpoint\" --limit 12 --json",
|
|
2739
|
+
"workspai workspace graph search \"authentication endpoint\" --kind endpoint --limit 12 --json",
|
|
2736
2740
|
"workspai workspace graph evidence \"GET /users\" --json",
|
|
2737
2741
|
"workspai workspace graph mermaid"
|
|
2738
2742
|
]
|
|
@@ -4133,6 +4137,13 @@
|
|
|
4133
4137
|
"moduleCommands": false,
|
|
4134
4138
|
"doctor": "observed",
|
|
4135
4139
|
"lifecycleCommands": [
|
|
4140
|
+
"init",
|
|
4141
|
+
"dev",
|
|
4142
|
+
"start",
|
|
4143
|
+
"build",
|
|
4144
|
+
"test",
|
|
4145
|
+
"lint",
|
|
4146
|
+
"format",
|
|
4136
4147
|
"help"
|
|
4137
4148
|
]
|
|
4138
4149
|
},
|
|
@@ -31,7 +31,20 @@
|
|
|
31
31
|
"runtime": { "type": "string", "minLength": 1 },
|
|
32
32
|
"framework": { "type": "string", "minLength": 1 },
|
|
33
33
|
"kit": { "type": "string", "minLength": 1 },
|
|
34
|
-
"
|
|
34
|
+
"governance": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"ci": { "$ref": "#/$defs/governanceControl" },
|
|
38
|
+
"release": { "$ref": "#/$defs/governanceControl" },
|
|
39
|
+
"ownership": { "$ref": "#/$defs/governanceControl" }
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
},
|
|
43
|
+
"modules": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string", "minLength": 1 },
|
|
46
|
+
"uniqueItems": true
|
|
47
|
+
},
|
|
35
48
|
"ports": {
|
|
36
49
|
"type": "array",
|
|
37
50
|
"items": {
|
|
@@ -49,7 +62,11 @@
|
|
|
49
62
|
"type": "object",
|
|
50
63
|
"required": ["owns", "apis", "publishes", "consumes", "dependsOn", "env"],
|
|
51
64
|
"properties": {
|
|
52
|
-
"owns": {
|
|
65
|
+
"owns": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": { "type": "string", "minLength": 1 },
|
|
68
|
+
"uniqueItems": true
|
|
69
|
+
},
|
|
53
70
|
"apis": {
|
|
54
71
|
"type": "array",
|
|
55
72
|
"items": {
|
|
@@ -62,10 +79,26 @@
|
|
|
62
79
|
"additionalProperties": false
|
|
63
80
|
}
|
|
64
81
|
},
|
|
65
|
-
"publishes": {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
82
|
+
"publishes": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": { "type": "string", "minLength": 1 },
|
|
85
|
+
"uniqueItems": true
|
|
86
|
+
},
|
|
87
|
+
"consumes": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": { "type": "string", "minLength": 1 },
|
|
90
|
+
"uniqueItems": true
|
|
91
|
+
},
|
|
92
|
+
"dependsOn": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": { "type": "string", "minLength": 1 },
|
|
95
|
+
"uniqueItems": true
|
|
96
|
+
},
|
|
97
|
+
"env": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "type": "string", "pattern": "^[A-Z_][A-Z0-9_]*$" },
|
|
100
|
+
"uniqueItems": true
|
|
101
|
+
}
|
|
69
102
|
},
|
|
70
103
|
"additionalProperties": false
|
|
71
104
|
}
|
|
@@ -74,5 +107,17 @@
|
|
|
74
107
|
}
|
|
75
108
|
}
|
|
76
109
|
},
|
|
110
|
+
"$defs": {
|
|
111
|
+
"governanceControl": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"required": ["mode"],
|
|
114
|
+
"properties": {
|
|
115
|
+
"mode": { "enum": ["repository", "external"] },
|
|
116
|
+
"provider": { "type": "string", "minLength": 1 },
|
|
117
|
+
"reference": { "type": "string", "minLength": 1 }
|
|
118
|
+
},
|
|
119
|
+
"additionalProperties": false
|
|
120
|
+
}
|
|
121
|
+
},
|
|
77
122
|
"additionalProperties": false
|
|
78
123
|
}
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"framework": { "type": "string" },
|
|
109
109
|
"kit": { "type": "string" },
|
|
110
110
|
"supportTier": { "type": "string" },
|
|
111
|
+
"governance": { "$ref": "#/$defs/projectGovernance" },
|
|
111
112
|
"commands": {
|
|
112
113
|
"type": "object",
|
|
113
114
|
"required": ["supported", "unsupported", "fleetStages"],
|
|
@@ -424,6 +425,34 @@
|
|
|
424
425
|
}
|
|
425
426
|
},
|
|
426
427
|
"$defs": {
|
|
428
|
+
"governanceControl": {
|
|
429
|
+
"type": "object",
|
|
430
|
+
"required": ["status", "provider", "evidence", "reference"],
|
|
431
|
+
"properties": {
|
|
432
|
+
"status": {
|
|
433
|
+
"enum": ["repository", "external-declared", "external-observed", "unknown"]
|
|
434
|
+
},
|
|
435
|
+
"provider": { "type": ["string", "null"] },
|
|
436
|
+
"evidence": {
|
|
437
|
+
"type": "array",
|
|
438
|
+
"items": { "type": "string", "minLength": 1 },
|
|
439
|
+
"uniqueItems": true
|
|
440
|
+
},
|
|
441
|
+
"reference": { "type": ["string", "null"] }
|
|
442
|
+
},
|
|
443
|
+
"additionalProperties": false
|
|
444
|
+
},
|
|
445
|
+
"projectGovernance": {
|
|
446
|
+
"type": "object",
|
|
447
|
+
"required": ["schemaVersion", "ci", "release", "ownership"],
|
|
448
|
+
"properties": {
|
|
449
|
+
"schemaVersion": { "const": "workspai.project-governance.v1" },
|
|
450
|
+
"ci": { "$ref": "#/$defs/governanceControl" },
|
|
451
|
+
"release": { "$ref": "#/$defs/governanceControl" },
|
|
452
|
+
"ownership": { "$ref": "#/$defs/governanceControl" }
|
|
453
|
+
},
|
|
454
|
+
"additionalProperties": false
|
|
455
|
+
},
|
|
427
456
|
"portableString": {
|
|
428
457
|
"type": "string",
|
|
429
458
|
"not": { "pattern": "^(?:/|[A-Za-z]:[\\\\/])" }
|
|
@@ -50,7 +50,15 @@
|
|
|
50
50
|
"type": "array",
|
|
51
51
|
"items": {
|
|
52
52
|
"type": "object",
|
|
53
|
-
"required": [
|
|
53
|
+
"required": [
|
|
54
|
+
"kind",
|
|
55
|
+
"id",
|
|
56
|
+
"strategy",
|
|
57
|
+
"hash",
|
|
58
|
+
"fileCount",
|
|
59
|
+
"fileLimit",
|
|
60
|
+
"truncated"
|
|
61
|
+
],
|
|
54
62
|
"properties": {
|
|
55
63
|
"kind": { "enum": ["workspace", "project"] },
|
|
56
64
|
"id": { "type": "string", "minLength": 1 },
|
|
@@ -284,12 +292,14 @@
|
|
|
284
292
|
"type": "object",
|
|
285
293
|
"required": [
|
|
286
294
|
"apiImplementation",
|
|
295
|
+
"apiRuntimeRegistration",
|
|
287
296
|
"projectTests",
|
|
288
297
|
"projectDeployment",
|
|
289
298
|
"projectOwnership"
|
|
290
299
|
],
|
|
291
300
|
"properties": {
|
|
292
301
|
"apiImplementation": { "$ref": "#/$defs/bindingCoverage" },
|
|
302
|
+
"apiRuntimeRegistration": { "$ref": "#/$defs/bindingCoverage" },
|
|
293
303
|
"projectTests": { "$ref": "#/$defs/bindingCoverage" },
|
|
294
304
|
"projectDeployment": { "$ref": "#/$defs/bindingCoverage" },
|
|
295
305
|
"projectOwnership": { "$ref": "#/$defs/bindingCoverage" }
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"extension",
|
|
48
48
|
"service",
|
|
49
49
|
"worker",
|
|
50
|
+
"platform",
|
|
50
51
|
"library",
|
|
51
52
|
"infra",
|
|
52
53
|
"docs",
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
"frontend",
|
|
64
65
|
"desktop",
|
|
65
66
|
"extension",
|
|
67
|
+
"platform",
|
|
66
68
|
"library",
|
|
67
69
|
"infrastructure",
|
|
68
70
|
"documentation",
|
|
@@ -92,6 +94,7 @@
|
|
|
92
94
|
"desktop",
|
|
93
95
|
"extension",
|
|
94
96
|
"worker",
|
|
97
|
+
"platform",
|
|
95
98
|
"library",
|
|
96
99
|
"infra",
|
|
97
100
|
"docs",
|
|
@@ -105,13 +108,15 @@
|
|
|
105
108
|
"frontend",
|
|
106
109
|
"desktop",
|
|
107
110
|
"extension",
|
|
111
|
+
"platform",
|
|
108
112
|
"library",
|
|
109
113
|
"infrastructure",
|
|
110
114
|
"documentation",
|
|
111
115
|
"quality",
|
|
112
116
|
"unknown"
|
|
113
117
|
]
|
|
114
|
-
}
|
|
118
|
+
},
|
|
119
|
+
"governance": { "$ref": "#/$defs/projectGovernance" }
|
|
115
120
|
},
|
|
116
121
|
"additionalProperties": true
|
|
117
122
|
}
|
|
@@ -135,6 +140,28 @@
|
|
|
135
140
|
"build": { "$ref": "#/$defs/buildProvenance" }
|
|
136
141
|
},
|
|
137
142
|
"$defs": {
|
|
143
|
+
"projectGovernance": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": ["schemaVersion", "ci", "release", "ownership"],
|
|
146
|
+
"properties": {
|
|
147
|
+
"schemaVersion": { "const": "workspai.project-governance.v1" },
|
|
148
|
+
"ci": { "$ref": "#/$defs/governanceControl" },
|
|
149
|
+
"release": { "$ref": "#/$defs/governanceControl" },
|
|
150
|
+
"ownership": { "$ref": "#/$defs/governanceControl" }
|
|
151
|
+
},
|
|
152
|
+
"additionalProperties": false
|
|
153
|
+
},
|
|
154
|
+
"governanceControl": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"required": ["status", "provider", "evidence", "reference"],
|
|
157
|
+
"properties": {
|
|
158
|
+
"status": { "enum": ["repository", "external-declared", "external-observed", "unknown"] },
|
|
159
|
+
"provider": { "type": ["string", "null"] },
|
|
160
|
+
"evidence": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
161
|
+
"reference": { "type": ["string", "null"] }
|
|
162
|
+
},
|
|
163
|
+
"additionalProperties": false
|
|
164
|
+
},
|
|
138
165
|
"buildProvenance": {
|
|
139
166
|
"type": "object",
|
|
140
167
|
"description": "Non-structural provenance for the model command execution. It is excluded from the canonical workspace-model hash.",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": [
|
|
7
7
|
"schemaVersion",
|
|
8
|
+
"producerRevision",
|
|
8
9
|
"cliVersion",
|
|
9
10
|
"inputsHash",
|
|
10
11
|
"generatedAt",
|
|
@@ -14,6 +15,9 @@
|
|
|
14
15
|
"schemaVersion": {
|
|
15
16
|
"const": "workspace-model-cache.v1"
|
|
16
17
|
},
|
|
18
|
+
"producerRevision": {
|
|
19
|
+
"const": "workspace-model-producer.v3"
|
|
20
|
+
},
|
|
17
21
|
"cliVersion": {
|
|
18
22
|
"type": "string",
|
|
19
23
|
"minLength": 1
|
|
@@ -85,6 +85,72 @@
|
|
|
85
85
|
".workspai/repair/engine.lock"
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
|
+
"qualificationMatrix": {
|
|
89
|
+
"schemaVersion": "workspai.workspace-repair-qualification-matrix.v1",
|
|
90
|
+
"status": "contract-enforced",
|
|
91
|
+
"dimensions": {
|
|
92
|
+
"adapters": [
|
|
93
|
+
"node",
|
|
94
|
+
"python",
|
|
95
|
+
"go",
|
|
96
|
+
"rust",
|
|
97
|
+
"php-composer",
|
|
98
|
+
"ruby-bundler",
|
|
99
|
+
"elixir-mix",
|
|
100
|
+
"deno",
|
|
101
|
+
"dotnet",
|
|
102
|
+
"jvm-maven",
|
|
103
|
+
"jvm-gradle",
|
|
104
|
+
"clojure",
|
|
105
|
+
"scala-sbt"
|
|
106
|
+
],
|
|
107
|
+
"scopes": [
|
|
108
|
+
"project",
|
|
109
|
+
"workspace",
|
|
110
|
+
"linked-project",
|
|
111
|
+
"polyglot-project"
|
|
112
|
+
],
|
|
113
|
+
"failureFamilies": [
|
|
114
|
+
"missing-tool",
|
|
115
|
+
"stale-evidence",
|
|
116
|
+
"missing-artifact",
|
|
117
|
+
"no-op-proposal",
|
|
118
|
+
"source-drift",
|
|
119
|
+
"validation-failure",
|
|
120
|
+
"producer-failure",
|
|
121
|
+
"provider-outage",
|
|
122
|
+
"interrupted-rollback",
|
|
123
|
+
"unsupported-runtime"
|
|
124
|
+
],
|
|
125
|
+
"recoveryPaths": [
|
|
126
|
+
"automatic-refresh",
|
|
127
|
+
"bounded-replan",
|
|
128
|
+
"decision-required",
|
|
129
|
+
"checkpoint-rollback",
|
|
130
|
+
"durable-resume",
|
|
131
|
+
"manual-repair"
|
|
132
|
+
],
|
|
133
|
+
"failureRecoveryPolicy": {
|
|
134
|
+
"missing-tool": "decision-required",
|
|
135
|
+
"stale-evidence": "automatic-refresh",
|
|
136
|
+
"missing-artifact": "automatic-refresh",
|
|
137
|
+
"no-op-proposal": "bounded-replan",
|
|
138
|
+
"source-drift": "bounded-replan",
|
|
139
|
+
"validation-failure": "checkpoint-rollback",
|
|
140
|
+
"producer-failure": "bounded-replan",
|
|
141
|
+
"provider-outage": "durable-resume",
|
|
142
|
+
"interrupted-rollback": "durable-resume",
|
|
143
|
+
"unsupported-runtime": "manual-repair"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"invariants": {
|
|
147
|
+
"everyAdapterDeclaresClosureStages": true,
|
|
148
|
+
"everyFailureTerminates": true,
|
|
149
|
+
"everyMutationIsCheckpointed": true,
|
|
150
|
+
"workspaceAndProjectScopesUseTheSameEngine": true,
|
|
151
|
+
"linkedProjectsRemainBoundaryChecked": true
|
|
152
|
+
}
|
|
153
|
+
},
|
|
88
154
|
"adapters": [
|
|
89
155
|
{
|
|
90
156
|
"id": "node",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-WPRLXKWC.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-HDNATYW7.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-LNXIMF3O.js';import {b}from'./chunk-VXKWWX7S.js';import {n,f as f$1,g}from'./chunk-FY4IIAIF.js';import {d}from'./chunk-P5PSZQPB.js';import {e as e$1,d as d$1}from'./chunk-CCDGHPEJ.js';import {f,e}from'./chunk-NZ3WZYD5.js';import E from'path';import S from'fs-extra';var te=f.agentContext,se=e.agentContext;function ae(e){if(typeof e!="string"||!e.trim()||e==="true")return "generic";let r=e.trim().toLowerCase();return r==="codex"||r==="claude"||r==="cursor"||r==="gemini"||r==="qwen"||r==="kimi"||r==="grok"||r==="copilot"||r==="windsurf"||r==="amazon-q"||r==="orca"?r:"generic"}function L(e){return `npx --yes --package workspai workspai ${e}`.trim()}function j(e){return `npx workspai ${e}`.trim()}async function v(e,r,i){let s=E.join(e,r);if(!await S.pathExists(s))return null;try{let a=await S.readJson(s);return !a||a.schemaVersion!==i?null:a}catch{return null}}function p(e$1){return {id:e$1.id,scope:e$1.scope,display:j(e$1.args),execute:L(e$1.args),description:e$1.description,...e$1.project?{project:e$1.project}:{},freshness:f$1({id:`command.${e$1.id}`,label:`${e$1.id} command`,scope:"command",value:{display:j(e$1.args),execute:L(e$1.args)},...e$1.project?{project:e$1.project}:{},freshness:{kind:"derived",category:"structure",generatedAt:e$1.generatedAt,now:e$1.now,sourceArtifact:e.model,sourcePath:`safeCommands.${e$1.id}`,reason:"Safe command surfaces are derived from workspace model command capabilities."}}).freshness}}function D(e,r){return `workspace run ${r} --scope project:${e.name}`}function ne(e){return (e.startsWith("project:")?e.slice(8):e).trim().toLowerCase()}function oe(e){return [e.name,e.path,E.basename(e.path),e.absolutePath].filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim().toLowerCase())}function ie(e,r,i){let s={generatedAt:e.generatedAt,now:i},a=[p({id:"workspace.model",scope:"workspace",args:"workspace model --json",description:"Read the canonical workspace intelligence model.",...s}),p({id:"workspace.graph.entities",scope:"workspace",args:"workspace graph entities --json",description:"Query proof-backed workspace entities without loading the full graph.",...s}),p({id:"workspace.graph.evidence",scope:"workspace",args:"workspace graph evidence <entity-or-relation> --json",description:"Resolve portable evidence for a graph entity or relation.",...s}),p({id:"workspace.graph.path",scope:"workspace",args:"workspace graph path <from> <to> --json",description:"Find a shortest proof-carrying path between workspace entities.",...s}),p({id:"workspace.doctor",scope:"workspace",args:"doctor workspace --json",description:"Check workspace health before claiming verification.",...s}),p({id:"workspace.pipeline",scope:"workspace",args:"pipeline --json",description:"Run the governed sync, doctor, analyze, readiness, and autopilot loop.",...s}),p({id:"workspace.contract.verify",scope:"workspace",args:"workspace contract verify --json",description:"Verify workspace contract and dependency edges.",...s}),p({id:"workspace.verify",scope:"workspace",args:"workspace verify --json",description:"Evaluate evidence freshness and verification gates before release decisions.",...s})],c=r?[r]:e.projects;for(let n of c)n.commands.fleetStages.includes("test")&&a.push(p({id:`project.${n.name}.test`,scope:"project",project:n.name,args:D(n,"test"),description:`Run tests for ${n.name} through workspace orchestration.`,...s})),n.commands.fleetStages.includes("build")&&a.push(p({id:`project.${n.name}.build`,scope:"project",project:n.name,args:D(n,"build"),description:`Build ${n.name} through workspace orchestration.`,...s}));return a}function ce(e){return e.commands.fleetStages.filter(r=>r==="test"||r==="build").map(r=>`workspace run ${r}`)}function de(e,r){if(!r?.startsWith("project:"))return;let i=ne(r);if(i)return e.projects.find(s=>oe(s).includes(i))}function me(e,r,i){let s=[...e.validation?.issues??[]];r?.startsWith("project:")&&!i&&s.push({severity:"error",code:"context.scope.project.missing",message:`Requested project scope was not found: ${r}`,target:r});let a=s.filter(n=>n.severity==="error").length,c=s.filter(n=>n.severity==="warning").length;return {status:a>0?"failed":c>0?"warning":"passed",errors:a,warnings:c,issues:s}}async function pe(e,r){let i=[],s=[];for(let[a,c]of Object.entries(e.evidence))c&&await d$1(r,c.path)!==null?i.push(`${a}: ${c.path}`):s.push(a);return {available:i.sort(),missing:s.sort()}}function le(e){let r=e.summary.projectCount,i=e.summary.runtimes.length?`${e.summary.runtimes.join(", ")} runtime coverage`:"no runtime coverage",s=e.identity.surfaces.length?e.identity.surfaces.join(", "):"no detected surfaces";return `${e.workspace.name} is a ${e.identity.workspaceType} with ${r} project${r===1?"":"s"}, ${i}, and ${s}.`}function ge(e){let r=["Do not claim a command passed unless a report or command output proves it.","Do not infer secrets or environment values from file names.","Do not change project scope without checking the selected project."];return e.contracts.exists||r.push("Workspace contract is missing; dependency and API edges may be incomplete."),e.summary.observedProjects>0&&r.push("Some projects are observed rather than first-class; command support may be partial."),r}async function xe(e$1){let r=e$1.model??await n({workspacePath:e$1.workspacePath,includeEvidence:e$1.includeEvidence===true,observableScanDepth:e$1.observableScanDepth,now:e$1.now}),i=ae(e$1.agent),s=de(r,e$1.scope),a=me(r,e$1.scope,s);if(e$1.strict===true&&a.status!=="passed"){let t=a.issues.map(g=>`${g.severity}:${g.code}:${g.target}`).join(", ");throw new Error(`Workspace context strict validation failed: ${t}`)}let c=e$1.now??new Date,n$1=r.facts??[],K=new Set((s?[s]:r.projects).map(t=>t.name)),F=n$1.filter(t=>t.project?K.has(t.project):true),H=(s?[s]:r.projects).map(t=>{let g=F.filter(d=>d.project===t.name);return {name:t.name,path:t.path,kind:t.kind,category:t.category,runtime:t.runtime,framework:t.frameworkDisplayName,...t.generator?{generator:t.generator}:{},createCapability:t.createCapability,supportTier:t.supportTier,...t.governance?{governance:t.governance}:{},safeCommands:ce(t),importantFiles:t.importantFiles,facts:g}}),A=await pe(r,e$1.workspacePath),R=E.join(e$1.workspacePath,e.knowledgeGraph),u=await S.pathExists(R)?await S.readJson(R).catch(()=>null):null,$=false;if(u?.schemaVersion===f.knowledgeGraph)try{b(u,r),$=true;}catch{}let M=le(r),I=ie(r,s,c),C=await v(e$1.workspacePath,e.impact,f.impact),l=await v(e$1.workspacePath,e.doctor,f.doctor),b$2=await v(e$1.workspacePath,e.analyze,f.analyze),k=await v(e$1.workspacePath,e.readiness,f.readiness),h=await v(e$1.workspacePath,e.verify,f.verify),w=await v(e$1.workspacePath,e.explain,f.explain),f$2=await v(e$1.workspacePath,e.diff,f.diff),B=C?.summary?{changed:C.summary.changed,risk:C.summary.risk,affectedProjects:C.summary.affectedProjects,blastRadius:C.summary.blastRadius,recommendedCommands:C.summary.recommendedCommands}:void 0,U=l?.summary?{verdict:l.summary.verdict,totalIssues:l.summary.totalIssues,advisoryFindings:l.summary.advisoryFindings,blockingFindings:l.summary.blockingFindings,unknownFindings:l.summary.unknownFindings,hasSystemErrors:l.summary.hasSystemErrors,topSignals:(()=>{let t=Array.isArray(l.projects)?l.projects:[],g=[];for(let d of t.slice(0,6)){let re=Array.isArray(d?.probes)?d.probes:[];for(let y of re.slice(0,10))(y?.status==="fail"||y?.severity==="error")&&g.push({label:y.label,scope:y.scope,issueClass:y.issueClass,status:y.status,severity:y.severity,recommendation:y.recommendation});}return g.slice(0,8)})()}:void 0,J=b$2?.summary?{score:b$2.summary.score,verdict:b$2.summary.verdict,findingCounts:b$2.summary.findings,topFindings:(Array.isArray(b$2.findings)?b$2.findings:[]).filter(d=>d?.severity==="fail"||d?.severity==="warn").slice(0,8).map(d=>({severity:d.severity,title:d.title,target:d.target,remediation:d.remediation}))}:void 0,X=k?{overallStatus:k.overallStatus,blocking:k.blocking,blockingReasons:k.blockingReasons,evidencePath:k.evidencePath,gates:Array.isArray(k.gates)?k.gates.slice(0,6).map(t=>({gate:t.gate,status:t.status,summary:t.summary})):void 0}:void 0,Q=h?.summary?{verdict:h.summary.verdict,exitCode:h.summary.exitCode,stepsFailed:h.summary.stepsFailed,stepsMissing:h.summary.stepsMissing,blockingReasons:h.blockingReasons,missingEvidence:h.missingEvidence}:void 0,Y=w?{summary:w.summary,blockingReasons:w.blockingReasons,releaseVerdict:w.releaseVerdict,evidenceFreshness:w.evidenceFreshness,sections:Array.isArray(w.sections)?w.sections.slice(0,4).map(t=>({id:t.id,title:t.title,body:t.body})):void 0}:void 0,Z=f$2?.summary?{changed:f$2.summary.changed,addedProjects:f$2.summary.addedProjects,removedProjects:f$2.summary.removedProjects,changedProjects:f$2.summary.changedProjects,workspaceChanges:f$2.summary.workspaceChanges,validationChanges:f$2.summary.validationChanges,gitChangedFiles:f$2.summary.gitChangedFiles}:void 0,ee=I.map(t=>f$1({id:`context.command.${t.id}`,label:`${t.id} safe command`,scope:"command",value:{display:t.display,execute:t.execute,scope:t.scope},...t.project?{project:t.project}:{},freshness:{kind:"derived",category:"structure",generatedAt:r.generatedAt,now:c,sourceArtifact:e.agentContext,sourcePath:`safeCommands.${t.id}`,reason:"Context safe commands are derived from workspace model command capabilities."}})),T=[...F,...ee],x=g({facts:T,generatedAt:c.toISOString(),now:c}),W=b$1();return {schemaVersion:te,generatedAt:c.toISOString(),agent:i,workspaceSummary:M,modelRef:e.model,knowledgeGraph:{artifact:e.knowledgeGraph,schemaVersion:f.knowledgeGraph,available:$,...typeof u?.quality?.entityCount=="number"?{entityCount:u.quality.entityCount}:{},...typeof u?.quality?.relationCount=="number"?{relationCount:u.quality.relationCount}:{},...typeof u?.quality?.proofCount=="number"?{proofCount:u.quality.proofCount}:{},queryCommands:[j("workspace graph search <query> --limit 12 --json"),j("workspace graph entities [kind] --json"),j("workspace graph evidence <entity-or-relation> --json"),j("workspace graph path <from> <to> --json")]},intelligenceChain:{schemaVersion:W.schemaVersion,contractPath:W.contractPath,currentStep:"context",canonicalReadOrder:[...W.consumers.agents.canonicalReadOrder]},workspace:{name:r.workspace.name,root:`workspace:${r.workspace.name}`,type:r.identity.workspaceType,...r.workspace.profile?{profile:r.workspace.profile}:{}},scope:{requested:e$1.scope??"workspace",...s?{activeProject:s.name}:{}},projects:H,safeCommands:I,facts:T,factFreshness:x,evidence:A,policies:{mode:r.policies.mode,source:r.policies.source},contracts:{exists:r.contracts.exists,path:r.contracts.workspaceContractPath},validation:a,agentInstructions:[`Read \`${e.agentIndex}\` first, then this context pack and linked evidence reports.`,"Use `workspace graph search <query> --limit 12 --json` for bounded, proof-backed retrieval before loading the full graph.",`Load \`${e.knowledgeGraph}\` only when a complete graph export is explicitly required.`,"Use this context as the workspace source of truth before inspecting random files.","Prefer workspace-level evidence over generic framework assumptions.","Use `display` commands when explaining steps to a human.","Use `execute` commands when launching commands from automation or tooling.","Treat `facts[].freshness.verifyBeforeUse` as a hard refresh requirement before using that fact in advice, fixes, or release decisions.","Do not carry extracted facts beyond their freshness contract; re-read or regenerate evidence when the contract says stale, unknown, live, or verify-before-use.","Keep project-scoped advice tied to the active project scope.","Regenerate stale grounding with `npx workspai workspace agent-sync --write --refresh-context`."],unsafeAssumptions:[...ge(r),...x.verifyBeforeUseFacts>0?[`${x.verifyBeforeUseFacts} fact(s) require verification before use; do not treat them as durable workspace structure.`]:[]],humanSummary:[M,`Evidence available: ${A.available.length}. Missing evidence groups: ${A.missing.join(", ")||"none"}.`,s?`Active project scope: ${s.name} (${s.frameworkDisplayName}).`:"Scope: whole workspace."].join(`
|
|
2
|
+
`),impactSummary:B,doctorSummary:U,analyzeSummary:J,readinessSummary:X,verifySummary:Q,explainSummary:Y,diffSummary:Z}}async function We(e,r){return e$1(r,se,d(e))}export{te as a,se as b,xe as c,We as d};
|
|
@@ -2,7 +2,7 @@ import {c as c$1}from'./chunk-HCFWT42C.js';import {a}from'./chunk-A5FBGRJA.js';i
|
|
|
2
2
|
`);}async function re(e,r){let t=p.dirname(e);await promises.mkdir(t,{recursive:true});let o=`${e}.${process.pid}.${randomUUID()}.tmp`;try{await promises.writeFile(o,r);let a=await promises.open(o,"r");try{await te(a);}finally{await a.close();}try{await promises.rename(o,e);}catch(s){let i=s.code;if(i!=="EEXIST"&&i!=="EPERM")throw s;await ne.move(o,e,{overwrite:true});}}finally{await promises.rm(o,{force:true}).catch(()=>{});}}async function q(e){try{return {exists:true,content:await promises.readFile(e)}}catch(r){if(r.code==="ENOENT")return {exists:false};throw r}}async function Q(e,r){if(!r.exists){await promises.rm(e,{force:true});return}await re(e,r.content);}async function ue(e,r){let t=p.join(e,"workspaces.json.lock"),o=randomUUID();await promises.mkdir(e,{recursive:true});let a=Date.now(),s;for(;!s;)try{s=await promises.open(t,"wx"),await s.writeFile(`${JSON.stringify({pid:process.pid,lockId:o,createdAt:new Date().toISOString()})}
|
|
3
3
|
`),await te(s);}catch(i){if(i.code!=="EEXIST")throw i;let n=await promises.stat(t).catch(()=>null);if(n&&Date.now()-n.mtimeMs>ce){let d=await promises.readFile(t,"utf8").then(m=>JSON.parse(m)).catch(()=>null),u=Number(d?.pid),w=false;if(Number.isInteger(u)&&u>0)try{process.kill(u,0),w=true;}catch(m){w=m.code==="EPERM";}if(!w){await promises.rm(t,{force:true}).catch(()=>{});continue}}if(Date.now()-a>pe)throw new Error(`Timed out waiting for workspace registry lock: ${t}`);await new Promise(d=>setTimeout(d,25));}try{return await r()}finally{await s.close().catch(()=>{}),await promises.readFile(t,"utf8").then(n=>JSON.parse(n).lockId===o).catch(()=>false)&&await promises.rm(t,{force:true}).catch(()=>{});}}async function _(e){let r$1=q$1(),t=p.join(r$1,"workspaces.json"),o=p.join(r(),"workspaces.json"),a=[...new Set(s$1())];return ue(r$1,async()=>{let[s,i]=await Promise.all([q(t),q(o)]),n=await ee(a);await e(n);let d=b(n);try{await K(t,d),await K(o,d);}catch(u){let m=(await Promise.allSettled([Q(t,s),Q(o,i)])).filter(g=>g.status==="rejected").map(g=>g.reason);throw m.length>0?new AggregateError([u,...m],"Workspace registry transaction failed and could not be fully restored"):u}return d})}async function oe(e,r){let t=a(e);await _(o=>{let a=o.workspaces.find(s=>s.path===t);if(a){a.name=r,a.mode=a.mode||"full",a.projects=Array.isArray(a.projects)?a.projects:[];return}o.workspaces.push({name:r,path:t,mode:"full",projects:[]});});}async function ze(e){let r=a(e),o=(await ee()).workspaces.find(a=>a.path===r);return o?{...o,projects:o.projects.map(a=>({...a}))}:null}async function Ge(e,r){let t=a(e);await _(o=>{let a=o.workspaces.findIndex(i=>i.path===t);if(!r){a>=0&&o.workspaces.splice(a,1);return}let s=B(r);a>=0?o.workspaces[a]=s:o.workspaces.push(s);});}async function Me(e){let r=a(e);await _(t=>{t.workspaces=t.workspaces.filter(o=>o.path!==r);});}async function ke(e,r){try{await oe(e,r);}catch{console.warn(c.gray("Note: Could not register workspace in shared registry"));}}async function Ve(e,r=false){let t$1=a(e),o={workspacePath:t$1,workspaceFound:false,added:[],skipped:0};try{let a$1=await F(),s=a$1.workspaces.find(g=>g.path===t$1);if(!s){if(await ke(t$1,p.basename(p.resolve(e))),a$1=await F(),s=a$1.workspaces.find(g=>g.path===t$1),!s)return r||console.log("\u26A0\uFE0F Workspace could not be registered in registry"),o;r||console.log("\u2714 Registered workspace in shared registry");}Array.isArray(s.projects)||(s.projects=[]);let i=0,n=0,d=[],u=[],w=[e],m=new Set;for(;w.length>0;){let g=w.shift();if(!g||m.has(g))continue;m.add(g);let y=await promises.readdir(g,{withFileTypes:true});for(let h of y){if(!h.isDirectory()||h.name.startsWith(".")||["node_modules","dist","build","target","coverage","htmlcov"].includes(h.name))continue;let j=p.join(g,h.name),f=a(j);try{let k=false;for(let $ of [...t(f,"context.json"),...t(f,"project.json")])try{await promises.access($),k=true;break}catch{}if(k){let $=p.basename(f),R=s.projects.some(C=>C.path===f);u.push({name:$,path:f}),R?n++:(s.projects.push({name:$,path:f}),i++,d.push(f),r||console.log(`\u2714 Added: ${p.relative(e,f)}`));continue}}catch{}w.push(j);}}return await _(g=>{let y=g.workspaces.find(f=>f.path===t$1);if(!y)return;let h=`${t$1}${p.sep}`,j=(y.projects||[]).filter(f=>f.path!==t$1&&!f.path.startsWith(h));y.projects=B({...y,projects:[...j,...u]}).projects;}),i>0?r||console.log(`
|
|
4
4
|
\u2705 Synced ${i} project(s) to registry`):r||console.log(`
|
|
5
|
-
\u2705 All projects already registered (${n} found)`),{workspacePath:t$1,workspaceFound:true,added:d,skipped:n}}catch(a){return r||console.error("\u274C Failed to sync projects:",a.message),o}}async function we(e,r,t){let o=a(e),a$1=a(t);await _(s=>{let i=s.workspaces.find(u=>u.path===o);if(!i)throw new Error(`Workspace is not registered: ${o}`);i.projects=Array.isArray(i.projects)?i.projects:[];let n=i.projects.findIndex(u=>u.path===a$1||u.name===r),d={name:r,path:a$1};n>=0?i.projects[n]=d:i.projects.push(d);});}async function Ye(e,r,t){try{await we(e,r,t);}catch{}}async function He(e,r){let t=P("Creating Workspai workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(p.join(e,".workspai"),{recursive:true});let o={workspace_name:r.name,author:r.author,rapidkit_version:h(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(p.join(e,".workspai","config.json"),JSON.stringify(o,null,2));let{syncWorkspaceFoundationFiles:a}=await import('./create-
|
|
5
|
+
\u2705 All projects already registered (${n} found)`),{workspacePath:t$1,workspaceFound:true,added:d,skipped:n}}catch(a){return r||console.error("\u274C Failed to sync projects:",a.message),o}}async function we(e,r,t){let o=a(e),a$1=a(t);await _(s=>{let i=s.workspaces.find(u=>u.path===o);if(!i)throw new Error(`Workspace is not registered: ${o}`);i.projects=Array.isArray(i.projects)?i.projects:[];let n=i.projects.findIndex(u=>u.path===a$1||u.name===r),d={name:r,path:a$1};n>=0?i.projects[n]=d:i.projects.push(d);});}async function Ye(e,r,t){try{await we(e,r,t);}catch{}}async function He(e,r){let t=P("Creating Workspai workspace...").start();try{await promises.mkdir(e,{recursive:true}),await promises.mkdir(p.join(e,".workspai"),{recursive:true});let o={workspace_name:r.name,author:r.author,rapidkit_version:h(),created_at:new Date().toISOString(),type:"workspace"};await promises.writeFile(p.join(e,".workspai","config.json"),JSON.stringify(o,null,2));let{syncWorkspaceFoundationFiles:a}=await import('./create-ALT2ME6H.js');await a(e,{workspaceName:r.name,installMethod:"venv",writeMarker:true,writeGitignore:false,onlyIfMissing:true});let s=fe();await promises.writeFile(p.join(e,"rapidkit"),s),await promises.chmod(p.join(e,"rapidkit"),493);let i=he();await promises.writeFile(p.join(e,"rapidkit.cmd"),i);let n=ye(r.name);await promises.writeFile(p.join(e,"README.md"),n),await promises.writeFile(p.join(e,".gitignore"),`# Workspai workspace
|
|
6
6
|
.env
|
|
7
7
|
.env.*
|
|
8
8
|
!.env.example
|
|
@@ -17,7 +17,7 @@ Thumbs.db
|
|
|
17
17
|
|
|
18
18
|
# Logs
|
|
19
19
|
*.log
|
|
20
|
-
`),await $e(e),t.succeed("Workspace created!"),r.skipGit||await Z(e,P(),"Initial commit: Workspai workspace"),await oe(e,r.name);let{publishWorkspaceRegistrySummary:u}=await import('./workspace-registry-summary-
|
|
20
|
+
`),await $e(e),t.succeed("Workspace created!"),r.skipGit||await Z(e,P(),"Initial commit: Workspai workspace"),await oe(e,r.name);let{publishWorkspaceRegistrySummary:u}=await import('./workspace-registry-summary-LJN4WHIZ.js');await u(e),console.log(`
|
|
21
21
|
${c.green("\u2728 Workspai workspace created successfully!")}
|
|
22
22
|
|
|
23
23
|
${c.bold("\u{1F4C2} Workspace structure:")}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'path';import N from'fs-extra';import F from'chalk';async function K(n,o={}){let t=e.resolve(n),{WORKSPACE_CONTRACT_PATH:i,syncWorkspaceContract:c,verifyWorkspaceContract:m,writeWorkspaceContractVerifyEvidence:k}=await import('./workspace-contract-
|
|
1
|
+
import e from'path';import N from'fs-extra';import F from'chalk';async function K(n,o={}){let t=e.resolve(n),{WORKSPACE_CONTRACT_PATH:i,syncWorkspaceContract:c,verifyWorkspaceContract:m,writeWorkspaceContractVerifyEvidence:k}=await import('./workspace-contract-7DXK4GF5.js'),p=await c({workspacePath:t,strict:true}),{syncWorkspaceReadme:f,WORKSPACE_README_PATH:d}=await import('./workspace-readme-G7TZ3V5T.js'),h=await f({workspacePath:t,workspaceName:p.contract.workspace.name,profile:p.contract.workspace.profile??"minimal",projectCount:p.contract.projects.length}),{buildWorkspaceModel:u,writeWorkspaceModel:g}=await import('./workspace-model-ZL6WCICX.js'),a=await u({workspacePath:t,includeEvidence:true}),P=await g(a,t),{buildWorkspaceImpact:W,buildWorkspaceModelSnapshot:C,diffWorkspaceModel:y,writeWorkspaceImpact:A,writeWorkspaceModelDiff:j,writeWorkspaceModelSnapshot:E}=await import('./workspace-intelligence-6FS26JOQ.js'),{WORKSPACE_INTELLIGENCE_ARTIFACTS:s}=await import('./workspace-intelligence-runtime-registry-IW6J53LO.js'),R=e.join(t,s.snapshot),l=false;if(!await N.pathExists(R)){let r=await C({workspacePath:t,model:a});await E(r,t),l=true;}let S=await y({workspacePath:t,fromPath:s.snapshot,model:a}),b=await j(S,t),v=await W({workspacePath:t,fromPath:s.diff}),O=await A(v,t),T=await m({workspacePath:t,strict:true}),_=await k({workspacePath:t,result:T}),{syncWorkspaceAgentGrounding:M}=await import('./workspace-agent-sync-GEN3KBAX.js'),w=await M({workspacePath:t,model:a,write:true,refreshContext:true,strict:false,preset:"enterprise",targets:["all"],projectGrounding:o.projectGrounding??"managed"}),x=[i,(await import('./workspace-registry-summary-LJN4WHIZ.js')).WORKSPACE_REGISTRY_SUMMARY_RELATIVE_PATH,e.relative(t,h).split(e.sep).join("/")||d,e.relative(t,P).split(e.sep).join("/"),s.knowledgeGraph,...l?[s.snapshot]:[],e.relative(t,b).split(e.sep).join("/"),e.relative(t,O).split(e.sep).join("/"),e.relative(t,_).split(e.sep).join("/"),...w.writtenFiles].filter((r,I,G)=>G.indexOf(r)===I);return o.silent||console.log(F.gray(`\u2713 Workspace Intelligence synced \xB7 ${a.summary.projectCount} project(s) \xB7 model + graph + agent grounding`)),{workspacePath:t,projectCount:a.summary.projectCount,baselineCreated:l,writtenFiles:x,warnings:w.projectLenses?.skipped.map(r=>`${r.name}: ${r.reason}`)??[]}}async function D(n,o={}){let t=e.resolve(n),i=o.workspaceName??e.basename(t),{registerWorkspaceStrict:c}=await import('./workspace-HGUZWNAB.js');return await c(t,i),K(t,{silent:o.silent})}export{K as a,D as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {f}from'./chunk-NZ3WZYD5.js';var s=f.knowledgeGraph,i=["workspace","project","service","api","endpoint","schema","protocol","language","package","runtime-unit","lifecycle-stage","module","file","symbol","database","queue","container","deployment","pipeline","environment","document","decision","test-suite","owner"],a=["contains","defines","imports","depends-on","exposes","implements","implements-protocol","uses-language","equivalent-to","calls","reads-from","writes-to","publishes","consumes","deploys","runs-on","routes-to","documents","decided-by","tests","owns","generated-by","generated-from","configured-by","references"],p=["extracted","inferred","authored"],c=["authoritative","corroborated","observed","ambiguous"],d=["high","medium","low"],g=["fresh","stale","unknown"];export{s as a,i as b,a as c,p as d,c as e,d as f,g};
|