workspai 0.50.0 → 0.51.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 +126 -497
- package/contracts/create-planner-capabilities.v1.json +10 -1
- package/contracts/extension-cli-compatibility.v1.json +1 -1
- package/dist/analyze-4H33PAUB.js +1 -0
- package/dist/{artifact-remediation-plan-ICN3KOFG.js → artifact-remediation-plan-TQ6KTTXD.js} +1 -1
- package/dist/autopilot-release-BHZYM5KX.js +1 -0
- package/dist/chunk-3D2PAIRH.js +3 -0
- package/dist/{chunk-C35UXTDM.js → chunk-4WJC5QCD.js} +1 -1
- package/dist/{chunk-MV7KF75Q.js → chunk-6HLPTJZ3.js} +1 -1
- package/dist/{chunk-CV5HKU4P.js → chunk-7T4TSV5C.js} +1 -1
- package/dist/chunk-BBGNDMRU.js +2 -0
- package/dist/{chunk-VKTUWUS6.js → chunk-BG4FWJJ3.js} +1 -1
- package/dist/chunk-BYTFXQ6G.js +1 -0
- package/dist/chunk-DLM6C7FU.js +8 -0
- package/dist/chunk-E3CT7TYT.js +1 -0
- package/dist/chunk-EPVFKJF4.js +1 -0
- package/dist/{chunk-5EXZBCAZ.js → chunk-FKWB66NQ.js} +1 -1
- package/dist/{chunk-RTVRZFIJ.js → chunk-FZ76CF2W.js} +1 -1
- package/dist/{chunk-C3FLCDRN.js → chunk-GBAO4GSW.js} +1 -1
- package/dist/{chunk-AL2A7Q4X.js → chunk-GQRWRHSR.js} +31 -31
- package/dist/{chunk-BQGBU2Y3.js → chunk-HE4PUMU4.js} +1 -1
- package/dist/{chunk-KXG6E5VK.js → chunk-HMGPELXS.js} +1 -1
- package/dist/chunk-HSZCINFX.js +2 -0
- package/dist/chunk-L2E2Z4OE.js +5 -0
- package/dist/chunk-MAF3LLGK.js +691 -0
- package/dist/chunk-PS5F4DCT.js +1 -0
- package/dist/{chunk-LZQUZGXB.js → chunk-Q6TKQVKQ.js} +1 -1
- package/dist/chunk-TROHVI2V.js +2 -0
- package/dist/{chunk-IPJ5URDF.js → chunk-U2LR73E2.js} +1 -1
- package/dist/chunk-U2QL5733.js +36 -0
- package/dist/{chunk-DDQ3XK3H.js → chunk-VCW5HSPC.js} +2 -2
- package/dist/{chunk-6UTM5AJI.js → chunk-VU2BKKMB.js} +1 -1
- package/dist/chunk-WJVB6SSD.js +16 -0
- package/dist/{chunk-SS2VV3D5.js → chunk-XBM2P45G.js} +2 -2
- package/dist/{create-I23DC7SN.js → create-SBFBFXKN.js} +1 -1
- package/dist/{doctor-DOOMYLIH.js → doctor-OPCMTBJB.js} +1 -1
- package/dist/index.js +229 -229
- package/dist/{pipeline-U77HSINC.js → pipeline-7BUXAFS2.js} +1 -1
- package/dist/{project-test-coverage-4TEHZJFC.js → project-test-coverage-BALEHHTT.js} +1 -1
- package/dist/{workspace-ZEYUVR26.js → workspace-U6ZQLELX.js} +1 -1
- package/dist/{workspace-agent-sync-DKYJLUDP.js → workspace-agent-sync-L4SY7B4Q.js} +1 -1
- package/dist/workspace-context-KOBSLZTI.js +1 -0
- package/dist/{workspace-contract-PVLGPBBV.js → workspace-contract-SOD3OOVF.js} +1 -1
- package/dist/{workspace-explain-64HNKAHO.js → workspace-explain-2CTMW2YW.js} +1 -1
- package/dist/{workspace-feedback-RATRXFUC.js → workspace-feedback-ZZ4HPW2T.js} +1 -1
- package/dist/{workspace-foundation-D33LJLGT.js → workspace-foundation-PUIYBQUF.js} +1 -1
- package/dist/{workspace-graph-stream-THNG2T7R.js → workspace-graph-stream-BLKIC7VN.js} +1 -1
- package/dist/workspace-graph-token-efficiency-5FNH4JZ5.js +1 -0
- package/dist/{workspace-history-EWFPT74O.js → workspace-history-SPKNRHIX.js} +1 -1
- package/dist/{workspace-intelligence-MCNSWWDV.js → workspace-intelligence-I3ABOH2F.js} +1 -1
- package/dist/workspace-intelligence-runner-Q2XSR3ZL.js +1 -0
- package/dist/{workspace-knowledge-graph-2EYR7N56.js → workspace-knowledge-graph-5MKEI4Z5.js} +1 -1
- package/dist/{workspace-knowledge-graph-query-VOSPPH4W.js → workspace-knowledge-graph-query-EKHIE3E2.js} +1 -1
- package/dist/{workspace-mcp-serve-FLAVKWYW.js → workspace-mcp-serve-ETNUA72W.js} +1 -1
- package/dist/{workspace-model-FMFYLHE4.js → workspace-model-HHA37SNH.js} +1 -1
- package/dist/{workspace-onboarding-MYROZDI2.js → workspace-onboarding-ELHZABJE.js} +1 -1
- package/dist/workspace-readme-HGGZ4AZB.js +77 -0
- package/dist/{workspace-registry-summary-6VXIAQLX.js → workspace-registry-summary-D2QM5JF6.js} +1 -1
- package/dist/workspace-run-DAAZBCN7.js +1 -0
- package/dist/{workspace-verify-FKYI65UQ.js → workspace-verify-4WJTLXRA.js} +1 -1
- package/dist/{workspace-watch-RP5KMVP2.js → workspace-watch-2PIFTQ6B.js} +1 -1
- package/docs/README_CONTENT_CONTRACT.md +98 -124
- package/docs/ci-workflows.md +13 -4
- package/docs/commands-reference.md +4 -2
- package/docs/workspace-knowledge-graph.md +39 -0
- package/docs/workspace-operations.md +9 -6
- package/package.json +6 -3
- package/scripts/enterprise-package-smoke.mjs +11 -0
- package/templates/kits/fastapi-ddd/README.md.j2 +1 -1
- package/templates/kits/fastapi-standard/README.md.j2 +1 -1
- package/templates/kits/nestjs-standard/Dockerfile.j2 +1 -1
- package/templates/kits/nestjs-standard/README.md.j2 +1 -1
- package/templates/kits/nestjs-standard/package.json.j2 +11 -2
- package/dist/analyze-ZFQWTCJQ.js +0 -1
- package/dist/autopilot-release-VKXQ7BS7.js +0 -1
- package/dist/chunk-2AXEGYPL.js +0 -1
- package/dist/chunk-GNQRYISX.js +0 -5
- package/dist/chunk-I42F552T.js +0 -2
- package/dist/chunk-IDQKVJUF.js +0 -2
- package/dist/chunk-JFUD73OZ.js +0 -933
- package/dist/chunk-KKAOTTYO.js +0 -8
- package/dist/chunk-KMLPHFLD.js +0 -2
- package/dist/chunk-L2YK5RV2.js +0 -1
- package/dist/chunk-LAJM2SBP.js +0 -15
- package/dist/chunk-UETZ7USY.js +0 -36
- package/dist/chunk-WDKNMTJQ.js +0 -1
- package/dist/chunk-YPKNQCLK.js +0 -2
- package/dist/workspace-context-IHUFMZT3.js +0 -1
- package/dist/workspace-graph-token-efficiency-CFGFCJ5V.js +0 -1
- package/dist/workspace-intelligence-runner-TG2VLHNZ.js +0 -1
- package/dist/workspace-run-2ZI5UMJ2.js +0 -1
|
@@ -1,139 +1,114 @@
|
|
|
1
1
|
# README Content Contract
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Advanced command inventories must be grouped by user goal instead of appearing
|
|
56
|
-
as one undifferentiated command wall.
|
|
3
|
+
The root and npm package READMEs are product entry points, not release logs,
|
|
4
|
+
command references, or architecture specifications.
|
|
5
|
+
|
|
6
|
+
Their job is to help a new reader answer four questions quickly:
|
|
7
|
+
|
|
8
|
+
1. What is Workspai?
|
|
9
|
+
2. What problem does it solve?
|
|
10
|
+
3. How can I try it safely?
|
|
11
|
+
4. Where do I go for more detail?
|
|
12
|
+
|
|
13
|
+
The root README presents the product. The CLI README adds a practical first-run
|
|
14
|
+
path and a small set of everyday commands. Detailed behavior belongs in the
|
|
15
|
+
versioned contracts and focused guides.
|
|
16
|
+
|
|
17
|
+
## Stable reader journey
|
|
18
|
+
|
|
19
|
+
The root README keeps this order:
|
|
20
|
+
|
|
21
|
+
1. product category, slogan, and three outcomes;
|
|
22
|
+
2. one copyable path for existing software and one guided path for new software;
|
|
23
|
+
3. a short outcome-oriented view of what Workspai provides;
|
|
24
|
+
4. the canonical Model → derived Graph boundary and intelligence chain;
|
|
25
|
+
5. consumer surfaces and goal-based documentation links;
|
|
26
|
+
6. package, contributor, community, and license routes.
|
|
27
|
+
|
|
28
|
+
The CLI README keeps this order:
|
|
29
|
+
|
|
30
|
+
1. product category, slogan, and value;
|
|
31
|
+
2. a two-minute existing-project path and the guided create path;
|
|
32
|
+
3. the small set of durable outputs a user should recognize;
|
|
33
|
+
4. the canonical Model → derived Graph boundary and intelligence chain;
|
|
34
|
+
5. everyday workflows grouped by goal;
|
|
35
|
+
6. outputs, requirements, documentation, troubleshooting, and contribution.
|
|
36
|
+
|
|
37
|
+
## What does not belong in a main README
|
|
38
|
+
|
|
39
|
+
Keep these in their focused documents:
|
|
40
|
+
|
|
41
|
+
- release-specific changes and version numbers;
|
|
42
|
+
- exhaustive commands, flags, and artifact inventories;
|
|
43
|
+
- exact runner exit-code and failure-propagation semantics;
|
|
44
|
+
- benchmark tables, fixture metadata, and formulas;
|
|
45
|
+
- CI workflow inventories;
|
|
46
|
+
- provider implementation details;
|
|
47
|
+
- schema property documentation;
|
|
48
|
+
- long troubleshooting catalogs;
|
|
49
|
+
- internal package extraction plans.
|
|
50
|
+
|
|
51
|
+
A README changes only when the product promise, primary onboarding path,
|
|
52
|
+
canonical architecture, supported consumer boundary, or documentation routes
|
|
53
|
+
change. A small implementation feature normally changes the Changelog, Release
|
|
54
|
+
Notes, or a focused guide—not the README.
|
|
57
55
|
|
|
58
56
|
## Architectural statements that must remain true
|
|
59
57
|
|
|
60
58
|
- The **Workspace Model is the canonical source of truth**.
|
|
61
|
-
- The Knowledge Graph is a **derived,
|
|
62
|
-
governed
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
- The canonical project inventory must reconcile discovered, imported,
|
|
68
|
-
adopted, and contract-declared projects. A missing contract-declared path is
|
|
69
|
-
a validation warning, not a silently deleted project.
|
|
70
|
-
- Persisted current-state consumers must reject a graph whose structural model
|
|
71
|
-
hash, workspace identity, or project topology no longer matches the current
|
|
72
|
-
model.
|
|
59
|
+
- The Knowledge Graph is a **derived, revision-bound representation** of the
|
|
60
|
+
governed Workspace Model.
|
|
61
|
+
- Providers enrich the graph with facts and proofs; they do not mutate the
|
|
62
|
+
authorizing model during the same run.
|
|
63
|
+
- Persisted current-state consumers reject a graph that no longer matches the
|
|
64
|
+
current model revision and workspace identity.
|
|
73
65
|
- Missing relationships mean **not proven**, not independent.
|
|
74
|
-
- The graph is broader than a code graph, but it is not the entire
|
|
66
|
+
- The graph is broader than a repository code graph, but it is not the entire
|
|
67
|
+
product.
|
|
75
68
|
- The canonical runner is
|
|
76
69
|
`npx workspai workspace intelligence run --for-agent generic --strict --json`.
|
|
77
|
-
- `pipeline` is
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
packages are extraction boundaries, not promises to add currently missing CLI
|
|
81
|
-
features.
|
|
70
|
+
- `pipeline` is the broader release/governance workflow and does not replace the
|
|
71
|
+
canonical intelligence chain.
|
|
72
|
+
- Current integrated capabilities are not described as future missing packages.
|
|
82
73
|
|
|
83
74
|
Normative machine sources:
|
|
84
75
|
|
|
85
|
-
| Statement
|
|
86
|
-
|
|
|
87
|
-
| Ordered intelligence chain
|
|
88
|
-
| Runtime commands and flags
|
|
89
|
-
| Published schemas and paths
|
|
90
|
-
| Architecture boundaries
|
|
91
|
-
| Model → Graph
|
|
92
|
-
| Artifact writers and consumers | `docs/contracts/ARTIFACT_CATALOG.md`
|
|
76
|
+
| Statement | Source of truth |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| Ordered intelligence chain | `contracts/workspace-intelligence-chain.v1.json` |
|
|
79
|
+
| Runtime commands and flags | `contracts/runtime-command-surface.v1.json` |
|
|
80
|
+
| Published schemas and paths | `contracts/published-contract-catalog.v1.json` |
|
|
81
|
+
| Architecture boundaries | `contracts/workspace-intelligence-architecture.v1.json` |
|
|
82
|
+
| Model → Graph binding | `contracts/workspace-intelligence/workspace-knowledge-graph.v1.json` |
|
|
83
|
+
| Artifact writers and consumers | `docs/contracts/ARTIFACT_CATALOG.md` |
|
|
93
84
|
|
|
94
|
-
Markdown
|
|
85
|
+
Markdown explains these contracts; it does not redefine them.
|
|
95
86
|
|
|
96
87
|
## Claim policy
|
|
97
88
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
- the query and result limit;
|
|
102
|
-
- whether token counts are estimated, tokenizer-counted, or provider-reported;
|
|
103
|
-
- the baseline;
|
|
104
|
-
- the date or revision;
|
|
105
|
-
- what the measurement does not prove.
|
|
89
|
+
Performance and token claims belong in the benchmark and evaluation guides.
|
|
90
|
+
They must identify the fixture, query, limit, tokenizer or estimate, baseline,
|
|
91
|
+
revision, and limitations. Results vary by workspace and query.
|
|
106
92
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
> On the current 16-project development fixture, one bounded query reduced the
|
|
110
|
-
> estimated retrieval payload by 97.9%; results vary by workspace and query.
|
|
111
|
-
|
|
112
|
-
Never turn a retrieval-payload result into a universal model-cost, answer-quality,
|
|
113
|
-
or task-success claim. Use `workspace eval` and a verified outcome before making
|
|
114
|
-
execution-efficiency comparisons.
|
|
93
|
+
Do not turn a retrieval-payload result into a universal cost, quality, or
|
|
94
|
+
task-success claim.
|
|
115
95
|
|
|
116
96
|
## Command policy
|
|
117
97
|
|
|
118
98
|
- Quickstarts must be copyable and use the canonical `workspai` package.
|
|
119
|
-
- `wspai` is
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
ordinary shell command such as `cd` or `npm install`.
|
|
124
|
-
- Durable filenames must come from published contracts or the Artifact Catalog.
|
|
125
|
-
|
|
126
|
-
## Information hierarchy
|
|
127
|
-
|
|
128
|
-
Write for three reading depths:
|
|
99
|
+
- `wspai` is only an optional short alias.
|
|
100
|
+
- The main path uses the complete contract-backed intelligence runner.
|
|
101
|
+
- A partial command sequence must not be presented as a replacement loop.
|
|
102
|
+
- Exhaustive syntax belongs in `docs/commands-reference.md`.
|
|
129
103
|
|
|
130
|
-
|
|
131
|
-
2. **Two minutes:** quickstart, concrete artifacts, architecture, proof example.
|
|
132
|
-
3. **Deep evaluation:** measurements, contracts, guides, boundaries, contributor
|
|
133
|
-
material.
|
|
104
|
+
## Writing policy
|
|
134
105
|
|
|
135
|
-
Prefer
|
|
136
|
-
|
|
106
|
+
- Prefer plain language and short sentences.
|
|
107
|
+
- Explain user outcomes before internal terms.
|
|
108
|
+
- Introduce only the architecture needed to trust the product.
|
|
109
|
+
- Prefer one representative command over a wall of variants.
|
|
110
|
+
- Link to deeper guidance instead of duplicating it.
|
|
111
|
+
- Do not add a README section for every feature or release.
|
|
137
112
|
|
|
138
113
|
## Validation
|
|
139
114
|
|
|
@@ -145,19 +120,18 @@ npm run check:generated-contracts
|
|
|
145
120
|
npm run check:contracts
|
|
146
121
|
```
|
|
147
122
|
|
|
148
|
-
`docs-drift-guard.mjs`
|
|
149
|
-
|
|
150
|
-
documentation routes, and package-status semantics. `smoke-readme-commands.mjs`
|
|
151
|
-
executes representative documented CLI help surfaces.
|
|
123
|
+
`docs-drift-guard.mjs` verifies the stable reader journey, canonical runner,
|
|
124
|
+
Model/Graph truth boundary, claim boundaries, and documentation routes.
|
|
152
125
|
|
|
153
126
|
## Review checklist
|
|
154
127
|
|
|
155
128
|
Before merging a README change, confirm:
|
|
156
129
|
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
130
|
+
- the first screen states the product value and slogan;
|
|
131
|
+
- a new user can run one safe path without learning internal architecture;
|
|
132
|
+
- the root README remains comfortably under 250 lines;
|
|
133
|
+
- the CLI README remains comfortably under 350 lines;
|
|
134
|
+
- details already explained elsewhere are linked, not repeated;
|
|
135
|
+
- every architecture statement matches generated contracts;
|
|
136
|
+
- no release-specific prose was added to a main README;
|
|
137
|
+
- the package section cannot be read as a list of missing capabilities.
|
package/docs/ci-workflows.md
CHANGED
|
@@ -10,15 +10,24 @@ Map of GitHub Actions workflows in this repository. Use this when editing CI to
|
|
|
10
10
|
| Workspace E2E matrix | `.github/workflows/workspace-e2e-matrix.yml` | Cross-OS workspace lifecycle smoke; setup `--warm-deps`; cache/mirror ops |
|
|
11
11
|
| Windows bridge E2E | `.github/workflows/windows-bridge-e2e.yml` | Native Windows bridge and lifecycle checks |
|
|
12
12
|
| E2E smoke | `.github/workflows/e2e-smoke.yml` | Focused bridge regression smoke |
|
|
13
|
-
|
|
|
13
|
+
| Official generator smoke | `.github/workflows/frontend-generator-smoke.yml` | Contract-driven official-generator drift gate |
|
|
14
14
|
| Security | `.github/workflows/security.yml` | Security scanning and policy checks |
|
|
15
15
|
| Manual npm release | `.github/workflows/release-npm-manual.yml` | Maintainer-only release gate and publish workflow |
|
|
16
16
|
| Contributor onboarding | `.github/workflows/contributor-onboarding.yml` | Accepted-contributor onboarding automation |
|
|
17
17
|
| Welcome | `.github/workflows/welcome.yml` | First-issue and first-contribution messages |
|
|
18
18
|
|
|
19
|
-
The release workflow requires
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
The release workflow requires the cost-bounded
|
|
20
|
+
`Official Generator Smoke · primary` Linux run for the exact release SHA. A
|
|
21
|
+
normal push that touches the contracted generator surface produces this gate;
|
|
22
|
+
maintainers do not need to run the full cross-platform matrix before publishing.
|
|
23
|
+
|
|
24
|
+
Pushes and pull requests run every contracted generator on the primary Linux
|
|
25
|
+
lane. The weekly schedule and manual dispatch can run the complete Linux,
|
|
26
|
+
macOS, and Windows matrix as a non-blocking compatibility and upstream-drift
|
|
27
|
+
signal. npm and Composer download caches reduce repeated network work without
|
|
28
|
+
caching generated projects; every smoke run still exercises the current
|
|
29
|
+
upstream generator, generated artifacts, build surface, registry, and Doctor
|
|
30
|
+
evidence.
|
|
22
31
|
|
|
23
32
|
## Consumer workspace: agent grounding CI
|
|
24
33
|
|
|
@@ -5,7 +5,7 @@ Complete CLI syntax for the Workspai CLI. For behavior and workflows, see [works
|
|
|
5
5
|
## Workspace lifecycle
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx workspai create #
|
|
8
|
+
npx workspai create # Guided create or existing-software ingestion
|
|
9
9
|
npx workspai create workspace <name> [--profile <profile>] [--yes] [--here|--output <parent-dir>] [--skip-python-engine] [--skip-git] [--dry-run] [--install-method <poetry|venv|pipx>]
|
|
10
10
|
npx workspai bootstrap [--profile <profile>] [--ci] [--json] [--compliance-only]
|
|
11
11
|
npx workspai setup <python|node|go|java|dotnet|rust|php> [--warm-deps]
|
|
@@ -161,7 +161,9 @@ they never write facts back into the authorizing model during the same run.
|
|
|
161
161
|
|
|
162
162
|
`workspace graph search <query> --limit <n> --json` returns bounded entities,
|
|
163
163
|
one-hop relations, related entity summaries, and portable proofs instead of the
|
|
164
|
-
complete graph.
|
|
164
|
+
complete graph. Ranking is deterministic and offline: it removes natural-language
|
|
165
|
+
stopwords, weights rarer graph terms more strongly, and prefers exact labels and
|
|
166
|
+
identities. `workspace graph benchmark <query> --limit <n> --json` compares
|
|
165
167
|
that retrieval payload with the readable proof-indexed corpus using a labelled
|
|
166
168
|
`characters / 4` estimate. It measures payload reduction only; it does not
|
|
167
169
|
assert equivalent answer quality or model-specific billing savings.
|
|
@@ -91,6 +91,12 @@ The response is intentionally bounded. `totalMatches` tells the consumer more
|
|
|
91
91
|
results exist, `truncated` prevents silent omission, and every returned claim can
|
|
92
92
|
be traced through `proofIds`.
|
|
93
93
|
|
|
94
|
+
Search remains deterministic, local, and offline. Natural-language filler words
|
|
95
|
+
are removed before ranking, and the remaining terms are weighted by how rare
|
|
96
|
+
they are in the current graph. Exact labels and identities still win. This keeps
|
|
97
|
+
a common word such as `check` from outranking a rarer term such as `user` merely
|
|
98
|
+
because it appears in more files. No embedding service or model call is involved.
|
|
99
|
+
|
|
94
100
|
## Pick the command by question
|
|
95
101
|
|
|
96
102
|
| You want to know… | Use |
|
|
@@ -123,6 +129,31 @@ provider, source artifact, optional pointer/line, content hash, freshness,
|
|
|
123
129
|
derivation, trust, and confidence. Secret values and machine-local absolute
|
|
124
130
|
paths are excluded from the portable graph contract.
|
|
125
131
|
|
|
132
|
+
## Read graph quality correctly
|
|
133
|
+
|
|
134
|
+
Provider execution and graph completeness are separate signals:
|
|
135
|
+
|
|
136
|
+
| Provider status | Meaning |
|
|
137
|
+
| --------------- | --------------------------------------------------------------------------- |
|
|
138
|
+
| `passed` | A matching source surface was found and graph evidence was produced. |
|
|
139
|
+
| `partial` | The provider found applicable input but produced incomplete or no evidence. |
|
|
140
|
+
| `skipped` | No applicable source surface was present in this workspace. |
|
|
141
|
+
| `failed` | The provider could not complete its bounded scan. |
|
|
142
|
+
|
|
143
|
+
`quality.providerSuccessRatio` is an execution-health ratio, not a completeness
|
|
144
|
+
claim. A skipped provider is healthy but not applicable. Applicable providers
|
|
145
|
+
that emit no evidence become `partial` and add an explicit unknown diagnostic,
|
|
146
|
+
which contributes to `quality.unknownCount`. Bounded-scan limits and unresolved
|
|
147
|
+
source relationships also contribute unknowns instead of being presented as
|
|
148
|
+
complete coverage. Binding coverage remains the dimension-specific source for
|
|
149
|
+
API implementation, tests, deployment, and ownership gaps; its unknowns are
|
|
150
|
+
included in the aggregate count.
|
|
151
|
+
|
|
152
|
+
Profiles govern workspace policy and verification expectations; they do not hide
|
|
153
|
+
source providers. Running the same unchanged workspace with `minimal` and
|
|
154
|
+
`polyglot` can therefore produce identical graph content. Changing a profile
|
|
155
|
+
does update the canonical workspace manifest and contract identity.
|
|
156
|
+
|
|
126
157
|
## Model first, graph second
|
|
127
158
|
|
|
128
159
|
The canonical direction is one-way:
|
|
@@ -178,6 +209,14 @@ model and reported as `project.path.missing`; it is never silently removed from
|
|
|
178
209
|
the graph boundary. A persisted Knowledge Graph is accepted only when its
|
|
179
210
|
workspace identity and project topology also match that model.
|
|
180
211
|
|
|
212
|
+
An adopted monorepo remains one canonical project unless its internal projects
|
|
213
|
+
are separately registered, discovered inside the workspace boundary, or
|
|
214
|
+
declared by contract. The model still records bounded nested runtime manifests
|
|
215
|
+
in `project.runtimeCandidates` and aggregates them into
|
|
216
|
+
`workspace.identity.runtimeFamilies`. Graph providers can then discover the
|
|
217
|
+
monorepo's internal services, contracts, delivery surfaces, and proofs without
|
|
218
|
+
pretending that the primary runtime describes the whole repository.
|
|
219
|
+
|
|
181
220
|
The two artifacts are published under one workspace lock using a
|
|
182
221
|
rollback-capable artifact transaction. Each file replacement is atomic; if any
|
|
183
222
|
write fails, Workspai restores both preimages. `graph.source.kind` is fixed to
|
|
@@ -81,12 +81,15 @@ versioned archive operation result instead.
|
|
|
81
81
|
### Automatic consumer sync
|
|
82
82
|
|
|
83
83
|
Workspace creation publishes the initial contract, canonical model, Knowledge
|
|
84
|
-
Graph, structural baseline, context, report index, `
|
|
85
|
-
skills, and supported IDE/agent surfaces—even before
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
Graph, structural baseline, context, report index, profile-aware `README.md`,
|
|
85
|
+
`AGENTS.md`, operational skills, and supported IDE/agent surfaces—even before
|
|
86
|
+
the first project exists. The README's Workspai-managed section shows the
|
|
87
|
+
current profile, project count, canonical intelligence loop, and consumer entry
|
|
88
|
+
points while preserving user-authored content. Successful project creation,
|
|
89
|
+
adoption, import, workspace connection, and workspace import refresh those same
|
|
90
|
+
projections in the background. The structural baseline is created once and
|
|
91
|
+
preserved; current model, graph, diff, impact, context, README, and project
|
|
92
|
+
grounding move forward with workspace membership.
|
|
90
93
|
|
|
91
94
|
Doctor, Analyze, Readiness, and Verify remain explicit checks because they may
|
|
92
95
|
run project tools or enforce release policy. Use `workspace intelligence run`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workspai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Open-source workspace intelligence CLI for software systems: create, adopt, govern, verify, and align polyglot workspaces for humans, CI, IDEs, and AI agents.",
|
|
6
6
|
"keywords": [
|
|
@@ -128,13 +128,16 @@
|
|
|
128
128
|
"validate:docs": "corepack npm run check:markdown-links && corepack npm run check:docs-drift && corepack npm run validate:docs-examples && corepack npm run check:github-release-notes && corepack npm run smoke:readme",
|
|
129
129
|
"smoke:frontend-generators": "tsup && node scripts/smoke-frontend-generators.mjs",
|
|
130
130
|
"smoke:frontend-generators:network": "tsup && node scripts/smoke-frontend-generators.mjs --execute",
|
|
131
|
+
"smoke:official-generators": "tsup && node scripts/smoke-official-generators.mjs",
|
|
132
|
+
"smoke:official-generators:network": "tsup && node scripts/smoke-official-generators.mjs --execute",
|
|
133
|
+
"check:generator-smoke-coverage": "node scripts/check-generator-smoke-coverage.mjs",
|
|
131
134
|
"sync:contracts": "node scripts/sync-contracts.mjs",
|
|
132
135
|
"check:contracts": "node scripts/sync-contracts.mjs --check",
|
|
133
136
|
"bundle-size": "corepack npm run build && node scripts/report-dist-size.mjs",
|
|
134
137
|
"analyze": "corepack npm run build && node scripts/analyze-dist.mjs",
|
|
135
138
|
"size-check": "corepack npm run build && size-limit",
|
|
136
139
|
"bench": "npx tsx scripts/benchmarks.ts",
|
|
137
|
-
"quality": "corepack npm run check:package-manager && corepack npm run typecheck && corepack npm run lint && corepack npm run format:check && corepack npm test && corepack npm run size-check && corepack npm run check:workspace-intelligence-runtime && corepack npm run check:workspace-intelligence-adversarial && corepack npm run security && corepack npm run validate:docs && corepack npm run smoke:
|
|
140
|
+
"quality": "corepack npm run check:package-manager && corepack npm run typecheck && corepack npm run lint && corepack npm run format:check && corepack npm test && corepack npm run size-check && corepack npm run check:workspace-intelligence-runtime && corepack npm run check:workspace-intelligence-adversarial && corepack npm run security && corepack npm run validate:docs && corepack npm run check:generator-smoke-coverage && corepack npm run smoke:official-generators && corepack npm run check:contracts && corepack npm run check:shared-contracts && corepack npm run check:parity-snapshot && corepack npm run check:agent-customization-drift",
|
|
138
141
|
"act-matrix": "act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-22.04 -P macos-latest=ghcr.io/catthehacker/ubuntu:act-22.04 -P windows-latest=ghcr.io/catthehacker/ubuntu:act-22.04 --pull=false -j build-test-matrix",
|
|
139
142
|
"release:dry": "bash scripts/release.sh --no-publish --yes --allow-dirty",
|
|
140
143
|
"release:patch": "bash scripts/release.sh patch",
|
|
@@ -146,7 +149,7 @@
|
|
|
146
149
|
"contracts:check": "corepack npm run check:contracts && corepack npm run check:shared-contracts && corepack npm run check:parity-snapshot && corepack npm run check:generated-contracts && corepack npm run check:agent-customization-drift",
|
|
147
150
|
"contracts:validate": "corepack npm run contracts:check && corepack npm run validate:contracts && corepack npm run build && corepack npm run check:workspace-intelligence-runtime && corepack npm run check:workspace-intelligence-adversarial",
|
|
148
151
|
"docs:validate": "corepack npm run validate:docs",
|
|
149
|
-
"smoke": "corepack npm run smoke:enterprise-package && corepack npm run smoke:readme && corepack npm run smoke:
|
|
152
|
+
"smoke": "corepack npm run smoke:enterprise-package && corepack npm run smoke:readme && corepack npm run check:generator-smoke-coverage && corepack npm run smoke:official-generators",
|
|
150
153
|
"fix": "corepack npm run lint:fix && corepack npm run format && corepack npm run sync:contracts && corepack npm run sync:shared-contracts && corepack npm run sync-kits"
|
|
151
154
|
},
|
|
152
155
|
"dependencies": {
|
|
@@ -376,6 +376,17 @@ function smokeCreateNpmBackedKits() {
|
|
|
376
376
|
'rapidkit',
|
|
377
377
|
],
|
|
378
378
|
},
|
|
379
|
+
{
|
|
380
|
+
kit: 'rust.axum',
|
|
381
|
+
name: 'enterprise-rust-axum',
|
|
382
|
+
extraArgs: [],
|
|
383
|
+
expectedFiles: [
|
|
384
|
+
'Cargo.toml',
|
|
385
|
+
'src/main.rs',
|
|
386
|
+
'.workspai/project.json',
|
|
387
|
+
'rapidkit',
|
|
388
|
+
],
|
|
389
|
+
},
|
|
379
390
|
];
|
|
380
391
|
|
|
381
392
|
try {
|
|
@@ -35,7 +35,7 @@ make audit
|
|
|
35
35
|
|
|
36
36
|
> Re-run `rapidkit init` (or `make init`) when dependencies change. If you only need to refresh tooling/hooks, run `SKIP_INIT=1 make install` or rely on `./bootstrap.sh`.
|
|
37
37
|
|
|
38
|
-
> Lockfiles are generated automatically during scaffolding. Set `RAPIDKIT_SKIP_LOCKS=1` (or `RAPIDKIT_GENERATE_LOCKS=0`)
|
|
38
|
+
> Lockfiles are generated automatically during scaffolding. Set `RAPIDKIT_SKIP_LOCKS=1` (or `RAPIDKIT_GENERATE_LOCKS=0`) in the environment before scaffolding if you want to skip the lockfile attempt.
|
|
39
39
|
|
|
40
40
|
> Need to see every project-local RapidKit Core command? Run `rapidkit --help`. If this project is part of a Workspai workspace, run `npx workspai --help` from the workspace root for workspace intelligence commands.
|
|
41
41
|
|
|
@@ -34,7 +34,7 @@ rapidkit start
|
|
|
34
34
|
|
|
35
35
|
> Re-run `rapidkit init` (or `make init`) whenever dependencies change, or use `SKIP_INIT=1 make install` if you only need to refresh tooling/hooks without reinstalling packages.
|
|
36
36
|
|
|
37
|
-
> Lockfiles are generated automatically during scaffolding. Set `RAPIDKIT_SKIP_LOCKS=1` (or `RAPIDKIT_GENERATE_LOCKS=0`)
|
|
37
|
+
> Lockfiles are generated automatically during scaffolding. Set `RAPIDKIT_SKIP_LOCKS=1` (or `RAPIDKIT_GENERATE_LOCKS=0`) in the environment before scaffolding if you need to opt out.
|
|
38
38
|
|
|
39
39
|
> Want the project-local RapidKit Core catalog? Run `rapidkit --help`. If this project is part of a Workspai workspace, run `npx workspai --help` from the workspace root for workspace intelligence commands.
|
|
40
40
|
|
|
@@ -34,7 +34,7 @@ rapidkit test
|
|
|
34
34
|
|
|
35
35
|
> Use `rapidkit init` (or `make init`) whenever dependencies change. Pass `SKIP_INIT=1` (for example `SKIP_INIT=1 make install`) if you only need to refresh tooling/hooks.
|
|
36
36
|
|
|
37
|
-
> Lockfiles are generated automatically during scaffolding. Set `RAPIDKIT_SKIP_LOCKS=1` (or `RAPIDKIT_GENERATE_LOCKS=0`)
|
|
37
|
+
> Lockfiles are generated automatically during scaffolding. Set `RAPIDKIT_SKIP_LOCKS=1` (or `RAPIDKIT_GENERATE_LOCKS=0`) in the environment before scaffolding if you need to skip this step.
|
|
38
38
|
|
|
39
39
|
> Need the project-local RapidKit Core command list? Run `rapidkit --help`. If this project is part of a Workspai workspace, run `npx workspai --help` from the workspace root for workspace intelligence commands.
|
|
40
40
|
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/compression": "^1.8.1",
|
|
77
77
|
"@types/express": "^5.0.6",
|
|
78
78
|
"@types/jest": "^30.0.0",
|
|
79
|
-
"@types/node": "^
|
|
79
|
+
"@types/node": "^24.13.3",
|
|
80
80
|
"@types/supertest": "^6.0.3",
|
|
81
81
|
"@typescript-eslint/eslint-plugin": "^8.50.1",
|
|
82
82
|
"@typescript-eslint/parser": "^8.50.1",
|
|
@@ -96,6 +96,15 @@
|
|
|
96
96
|
},
|
|
97
97
|
"overrides": {
|
|
98
98
|
"cross-spawn": "7.0.5",
|
|
99
|
-
"glob": "10.5.0"
|
|
99
|
+
"glob": "10.5.0",
|
|
100
|
+
"js-yaml": "5.2.2"
|
|
101
|
+
},
|
|
102
|
+
"resolutions": {
|
|
103
|
+
"js-yaml": "5.2.2"
|
|
104
|
+
},
|
|
105
|
+
"pnpm": {
|
|
106
|
+
"overrides": {
|
|
107
|
+
"js-yaml": "5.2.2"
|
|
108
|
+
}
|
|
100
109
|
}
|
|
101
110
|
}
|
package/dist/analyze-ZFQWTCJQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-KKAOTTYO.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-LZQUZGXB.js';
|
package/dist/chunk-2AXEGYPL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from'path';import M from'fs-extra';import _ from'chalk';async function G(i,r={}){let t=e.resolve(i),{WORKSPACE_CONTRACT_PATH:n,syncWorkspaceContract:c,verifyWorkspaceContract:m,writeWorkspaceContractVerifyEvidence:f}=await import('./workspace-contract-PVLGPBBV.js');await c({workspacePath:t,strict:true});let{buildWorkspaceModel:d,writeWorkspaceModel:k}=await import('./workspace-model-FMFYLHE4.js'),a=await d({workspacePath:t,includeEvidence:true}),h=await k(a,t),{buildWorkspaceImpact:u,buildWorkspaceModelSnapshot:g,diffWorkspaceModel:P,writeWorkspaceImpact:W,writeWorkspaceModelDiff:C,writeWorkspaceModelSnapshot:y}=await import('./workspace-intelligence-MCNSWWDV.js'),{WORKSPACE_INTELLIGENCE_ARTIFACTS:s}=await import('./workspace-intelligence-runtime-registry-ZZ3GRAL2.js'),A=e.join(t,s.snapshot),p=false;if(!await M.pathExists(A)){let o=await g({workspacePath:t,model:a});await y(o,t),p=true;}let b=await P({workspacePath:t,fromPath:s.snapshot,model:a}),j=await C(b,t),v=await u({workspacePath:t,fromPath:s.diff}),E=await W(v,t),S=await m({workspacePath:t,strict:true}),R=await f({workspacePath:t,result:S}),{syncWorkspaceAgentGrounding:O}=await import('./workspace-agent-sync-DKYJLUDP.js'),l=await O({workspacePath:t,model:a,write:true,refreshContext:true,strict:false,preset:"enterprise",targets:["all"],projectGrounding:r.projectGrounding??"managed"}),w=[n,(await import('./workspace-registry-summary-6VXIAQLX.js')).WORKSPACE_REGISTRY_SUMMARY_RELATIVE_PATH,e.relative(t,h).split(e.sep).join("/"),s.knowledgeGraph,...p?[s.snapshot]:[],e.relative(t,j).split(e.sep).join("/"),e.relative(t,E).split(e.sep).join("/"),e.relative(t,R).split(e.sep).join("/"),...l.writtenFiles].filter((o,x,T)=>T.indexOf(o)===x);return r.silent||console.log(_.gray(`\u2139\uFE0F Workspace consumers synced (model + graph + agent context, ${a.summary.projectCount} project(s), ${w.length} artifact(s)).`)),{workspacePath:t,projectCount:a.summary.projectCount,baselineCreated:p,writtenFiles:w,warnings:l.projectLenses?.skipped.map(o=>`${o.name}: ${o.reason}`)??[]}}async function z(i,r={}){let t=e.resolve(i),n=r.workspaceName??e.basename(t),{registerWorkspaceStrict:c}=await import('./workspace-ZEYUVR26.js');await c(t,n),await G(t,{silent:r.silent});}export{G as a,z as b};
|
package/dist/chunk-GNQRYISX.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import a from'fs';import s from'path';var p={nextjs:{key:"nextjs",runtime:"node",displayName:"Next.js",supportTier:"extended",importStack:"nextjs",aliases:["next","nextjs","next.js"],dependencyHints:["next"],scriptHints:["next dev","next build","next start"],fileHints:["next.config.js","next.config.mjs","next.config.ts"]},remix:{key:"remix",runtime:"node",displayName:"Remix",supportTier:"extended",importStack:"remix",aliases:["remix"],dependencyHints:["@remix-run/react","@remix-run/node","@remix-run/dev"],scriptHints:["remix dev","remix vite:dev"],fileHints:["remix.config.js","remix.config.mjs"]},nuxt:{key:"nuxt",runtime:"node",displayName:"Nuxt",supportTier:"extended",importStack:"nuxt",aliases:["nuxt","nuxtjs","nuxt.js"],dependencyHints:["nuxt","nuxt3"],scriptHints:["nuxt dev","nuxt build","nuxi dev","nuxi build"],fileHints:["nuxt.config.js","nuxt.config.ts","nuxt.config.mjs"]},react:{key:"react",runtime:"node",displayName:"React",supportTier:"extended",importStack:"react",aliases:["react"],dependencyHints:["react","react-dom"],scriptHints:["react-scripts start","react-scripts build"],fileHints:[]},vite:{key:"vite",runtime:"node",displayName:"Vite",supportTier:"extended",importStack:"vite",aliases:["vite"],dependencyHints:["vite"],scriptHints:["vite","vite dev","vite build"],fileHints:["vite.config.js","vite.config.ts","vite.config.mjs"]},vue:{key:"vue",runtime:"node",displayName:"Vue",supportTier:"extended",importStack:"vue",aliases:["vue","vuejs","vue.js"],dependencyHints:["vue","@vue/cli-service"],scriptHints:["vue-cli-service serve","vue-cli-service build"],fileHints:["vue.config.js"]},sveltekit:{key:"sveltekit",runtime:"node",displayName:"SvelteKit",supportTier:"extended",importStack:"sveltekit",aliases:["sveltekit","svelte-kit"],dependencyHints:["@sveltejs/kit"],scriptHints:["svelte-kit dev","svelte-kit build"],fileHints:["svelte.config.js"]},svelte:{key:"svelte",runtime:"node",displayName:"Svelte",supportTier:"extended",importStack:"svelte",aliases:["svelte"],dependencyHints:["svelte"],scriptHints:["svelte"],fileHints:[]},angular:{key:"angular",runtime:"node",displayName:"Angular",supportTier:"extended",importStack:"angular",aliases:["angular","@angular/core"],dependencyHints:["@angular/core","@angular/cli"],scriptHints:["ng serve","ng build"],fileHints:["angular.json"]},astro:{key:"astro",runtime:"node",displayName:"Astro",supportTier:"extended",importStack:"astro",aliases:["astro"],dependencyHints:["astro"],scriptHints:["astro dev","astro build"],fileHints:["astro.config.js","astro.config.ts","astro.config.mjs"]},solid:{key:"solid",runtime:"node",displayName:"Solid",supportTier:"extended",importStack:"solid",aliases:["solid","solidjs","solid-js"],dependencyHints:["solid-js"],scriptHints:[],fileHints:[]},unknown:{key:"unknown",runtime:"unknown",displayName:"Unknown frontend",supportTier:"observed",importStack:"unknown",aliases:["unknown"],dependencyHints:[],scriptHints:[],fileHints:[]}},R={nextjs:{dev:["dev"],start:["start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},remix:{dev:["dev"],start:["start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},nuxt:{dev:["dev"],start:["start","preview"],build:["build"],test:["test"],lint:["lint"],format:["format"]},react:{dev:["dev","start"],start:["serve"],build:["build"],test:["test"],lint:["lint"],format:["format"]},vite:{dev:["dev"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},vue:{dev:["dev","serve"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},sveltekit:{dev:["dev"],start:["start","preview"],build:["build"],test:["test"],lint:["lint"],format:["format"]},svelte:{dev:["dev"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]},angular:{dev:["start","serve"],start:["serve"],build:["build"],test:["test"],lint:["lint"],format:["format"]},astro:{dev:["dev"],start:["start","preview"],build:["build"],test:["test"],lint:["lint"],format:["format"]},solid:{dev:["dev"],start:["preview","start"],build:["build"],test:["test"],lint:["lint"],format:["format"]}};function Y(e,n){let t=typeof e=="string"?S(e):e;return t==="unknown"?[]:R[t]?.[n]??[]}function C(e){try{return a.existsSync(e)?JSON.parse(a.readFileSync(e,"utf8")):null}catch{return null}}function H(e){let n=C(s.join(e,"package.json"));if(!n)return {dependencies:{},scriptText:""};let t={...n.dependencies??{},...n.devDependencies??{},...n.peerDependencies??{}},i=n.scripts??{},o=Object.values(i).filter(u=>typeof u=="string").join(" ").toLowerCase();return {dependencies:t,scriptText:o}}function K(e,n){return n.some(t=>a.existsSync(s.join(e,t)))}function w(e){return e.vite?e.react||e["react-dom"]||e["@vitejs/plugin-react"]?"react":e.vue||e["@vitejs/plugin-vue"]?"vue":e.svelte||e["@sveltejs/vite-plugin-svelte"]?"svelte":e["solid-js"]||e["vite-plugin-solid"]?"solid":null:null}function k(e,n,t){let i=p[e]??p.unknown;return {key:i.key,runtime:i.runtime,displayName:i.displayName,supportTier:i.supportTier,importStack:i.importStack,confidence:n,source:t}}function Q(e){return p[e]??p.unknown}function S(e){let n=(e??"").trim().toLowerCase().replace(/[_\s]+/g,"-");if(!n)return "unknown";for(let t of Object.values(p))if(t.aliases.includes(n))return t.key;return "unknown"}function b(e,n){let t=S(typeof n?.framework=="string"?n.framework:typeof n?.kit_name=="string"?n.kit_name:typeof n?.kit=="string"?n.kit:void 0);if(t!=="unknown")return k(t,"high","framework");let{dependencies:i,scriptText:o}=H(e);for(let u of ["nextjs","remix","nuxt","sveltekit","angular","astro","vue","solid","vite","react","svelte"]){let l=p[u];if(l.dependencyHints.some(m=>i[m])){if(u==="vite"){let m=w(i);if(m)return k(m,"high","manifest")}return k(u,"high","manifest")}if(l.fileHints.length>0&&K(e,l.fileHints)){if(u==="vite"){let m=w(i);if(m)return k(m,"high","manifest")}return k(u,"high","manifest")}if(l.scriptHints.some(m=>o.includes(m)))return k(u,"medium","manifest")}return k("unknown","low","unknown")}var f={fastapi:{key:"fastapi",runtime:"python",displayName:"FastAPI",supportTier:"first-class",importStack:"fastapi",aliases:["fastapi"],kitPrefixes:["fastapi"]},django:{key:"django",runtime:"python",displayName:"Django",supportTier:"extended",importStack:"django",aliases:["django"]},flask:{key:"flask",runtime:"python",displayName:"Flask",supportTier:"extended",importStack:"flask",aliases:["flask"]},python:{key:"python",runtime:"python",displayName:"Python",supportTier:"observed",importStack:"unknown",aliases:["python"]},nestjs:{key:"nestjs",runtime:"node",displayName:"NestJS",supportTier:"first-class",importStack:"nestjs",aliases:["nestjs","nest"],kitPrefixes:["nestjs"]},nextjs:{key:"nextjs",runtime:"node",displayName:"Next.js",supportTier:"extended",importStack:"nextjs",aliases:["nextjs","next.js","next"]},remix:{key:"remix",runtime:"node",displayName:"Remix",supportTier:"extended",importStack:"remix",aliases:["remix"]},nuxt:{key:"nuxt",runtime:"node",displayName:"Nuxt",supportTier:"extended",importStack:"nuxt",aliases:["nuxt","nuxtjs","nuxt.js"]},react:{key:"react",runtime:"node",displayName:"React",supportTier:"extended",importStack:"react",aliases:["react"]},vite:{key:"vite",runtime:"node",displayName:"Vite",supportTier:"extended",importStack:"vite",aliases:["vite"]},vue:{key:"vue",runtime:"node",displayName:"Vue",supportTier:"extended",importStack:"vue",aliases:["vue","vuejs","vue.js"]},sveltekit:{key:"sveltekit",runtime:"node",displayName:"SvelteKit",supportTier:"extended",importStack:"sveltekit",aliases:["sveltekit","svelte-kit"]},svelte:{key:"svelte",runtime:"node",displayName:"Svelte",supportTier:"extended",importStack:"svelte",aliases:["svelte"]},angular:{key:"angular",runtime:"node",displayName:"Angular",supportTier:"extended",importStack:"angular",aliases:["angular","@angular/core"]},astro:{key:"astro",runtime:"node",displayName:"Astro",supportTier:"extended",importStack:"astro",aliases:["astro"]},solid:{key:"solid",runtime:"node",displayName:"Solid",supportTier:"extended",importStack:"solid",aliases:["solid","solidjs","solid-js"]},express:{key:"express",runtime:"node",displayName:"Express",supportTier:"extended",importStack:"express",aliases:["express"]},fastify:{key:"fastify",runtime:"node",displayName:"Fastify",supportTier:"extended",importStack:"unknown",aliases:["fastify"]},koa:{key:"koa",runtime:"node",displayName:"Koa",supportTier:"extended",importStack:"koa",aliases:["koa"]},node:{key:"node",runtime:"node",displayName:"Node.js",supportTier:"observed",importStack:"unknown",aliases:["node","nodejs","typescript","javascript"]},gofiber:{key:"gofiber",runtime:"go",displayName:"Go/Fiber",supportTier:"extended",importStack:"go",aliases:["gofiber","fiber","go-fiber","go/fiber"],kitPrefixes:["gofiber"]},gogin:{key:"gogin",runtime:"go",displayName:"Go/Gin",supportTier:"extended",importStack:"go",aliases:["gogin","gin","go-gin","go/gin"],kitPrefixes:["gogin"]},echo:{key:"echo",runtime:"go",displayName:"Echo",supportTier:"extended",importStack:"go",aliases:["echo"]},go:{key:"go",runtime:"go",displayName:"Go",supportTier:"observed",importStack:"go",aliases:["go","golang"],kitPrefixes:["go"]},springboot:{key:"springboot",runtime:"java",displayName:"Spring Boot",supportTier:"extended",importStack:"springboot",aliases:["springboot","spring","spring-boot"],kitPrefixes:["springboot"]},java:{key:"java",runtime:"java",displayName:"Java",supportTier:"observed",importStack:"unknown",aliases:["java"]},laravel:{key:"laravel",runtime:"php",displayName:"Laravel",supportTier:"extended",importStack:"unknown",aliases:["laravel"]},symfony:{key:"symfony",runtime:"php",displayName:"Symfony",supportTier:"extended",importStack:"unknown",aliases:["symfony"]},php:{key:"php",runtime:"php",displayName:"PHP",supportTier:"observed",importStack:"unknown",aliases:["php"]},rails:{key:"rails",runtime:"ruby",displayName:"Ruby on Rails",supportTier:"extended",importStack:"rails",aliases:["rails","ruby-on-rails","ruby on rails"]},sinatra:{key:"sinatra",runtime:"ruby",displayName:"Sinatra",supportTier:"extended",importStack:"unknown",aliases:["sinatra"]},ruby:{key:"ruby",runtime:"ruby",displayName:"Ruby",supportTier:"observed",importStack:"unknown",aliases:["ruby"]},dotnet:{key:"dotnet",runtime:"dotnet",displayName:"ASP.NET Core",supportTier:"extended",importStack:"dotnet",aliases:["dotnet","asp.net","aspnet","asp.net core","csharp","c#"],kitPrefixes:["dotnet","aspnet","aspnetcore"]},actix:{key:"actix",runtime:"rust",displayName:"Actix-web",supportTier:"extended",importStack:"unknown",aliases:["actix","actix-web"]},axum:{key:"axum",runtime:"rust",displayName:"Axum",supportTier:"extended",importStack:"unknown",aliases:["axum"]},rocket:{key:"rocket",runtime:"rust",displayName:"Rocket",supportTier:"extended",importStack:"unknown",aliases:["rocket"]},rust:{key:"rust",runtime:"rust",displayName:"Rust",supportTier:"observed",importStack:"unknown",aliases:["rust"]},phoenix:{key:"phoenix",runtime:"elixir",displayName:"Phoenix",supportTier:"extended",importStack:"unknown",aliases:["phoenix"]},elixir:{key:"elixir",runtime:"elixir",displayName:"Elixir",supportTier:"observed",importStack:"unknown",aliases:["elixir"]},clojure:{key:"clojure",runtime:"clojure",displayName:"Clojure",supportTier:"extended",importStack:"unknown",aliases:["clojure"]},scala:{key:"scala",runtime:"scala",displayName:"Scala",supportTier:"extended",importStack:"unknown",aliases:["scala"]},kotlin:{key:"kotlin",runtime:"kotlin",displayName:"Kotlin",supportTier:"extended",importStack:"unknown",aliases:["kotlin"]},deno:{key:"deno",runtime:"deno",displayName:"Deno",supportTier:"extended",importStack:"unknown",aliases:["deno"]},bun:{key:"bun",runtime:"bun",displayName:"Bun",supportTier:"extended",importStack:"unknown",aliases:["bun"]},tauri:{key:"tauri",runtime:"node",displayName:"Tauri",supportTier:"extended",importStack:"unknown",aliases:["tauri","tauri-app"],kitPrefixes:["desktop.tauri"]},electron:{key:"electron",runtime:"node",displayName:"Electron",supportTier:"extended",importStack:"unknown",aliases:["electron","electron-forge"],kitPrefixes:["desktop.electron"]},"vscode-extension":{key:"vscode-extension",runtime:"node",displayName:"VS Code Extension",supportTier:"extended",importStack:"unknown",aliases:["vscode-extension","visual-studio-code-extension"],kitPrefixes:["extension.vscode"]},c:{key:"c",runtime:"c",displayName:"C",supportTier:"observed",importStack:"unknown",aliases:["c","clang","gcc"]},cpp:{key:"cpp",runtime:"cpp",displayName:"C++",supportTier:"observed",importStack:"unknown",aliases:["cpp","c++","cplusplus","cc","clang++","g++"]},unknown:{key:"unknown",runtime:"unknown",displayName:"Unknown",supportTier:"observed",importStack:"unknown",aliases:["unknown"]}},F=new Map;for(let e of Object.values(f))for(let n of e.aliases)F.set(n,e.key);function r(e,n,t){let i=f[e]??f.unknown;return {key:i.key,runtime:i.runtime,displayName:i.displayName,supportTier:i.supportTier,importStack:i.importStack,confidence:n,source:t}}function T(e){return e.trim().toLowerCase().replace(/[_\s]+/g,"-")}function d(e){try{return a.existsSync(e)?a.readFileSync(e,"utf8").toLowerCase():""}catch{return ""}}function N(e){try{return a.existsSync(e)?JSON.parse(a.readFileSync(e,"utf8")):null}catch{return null}}function x(e,n){if(n<0||!a.existsSync(e))return [];let t=[],i=[];try{i=a.readdirSync(e,{withFileTypes:true});}catch{return []}for(let o of i){let u=s.join(e,o.name);o.isDirectory()?t.push(...x(u,n-1)):t.push(u);}return t}function c(e,n,t=2){return x(e,t).some(i=>i.toLowerCase().endsWith(n.toLowerCase()))}function j(e,n,t=2){return x(e,t).filter(i=>i.toLowerCase().endsWith(n.toLowerCase()))}function D(e){let n=T(e??"");if(!n)return "unknown";for(let t of Object.values(f))if(t.kitPrefixes?.some(i=>n.startsWith(i)))return t.key;return "unknown"}function y(e){return e?F.get(T(e))??"unknown":"unknown"}function ne(e){return y(e)}function te(e){let n=y(e);return n!=="unknown"?f[n].runtime:"unknown"}function L(e){let n=D(e.kitName);if(n!=="unknown")return r(n,"high","kit");let t=y(e.framework);if(t!=="unknown")return r(t,"high","framework");let i=y(e.runtime);return i!=="unknown"?r(i,"medium","runtime"):r("unknown","low","unknown")}function E(e){let n=N(s.join(e,"package.json"));if(!n)return r("unknown","low","unknown");let t={...n.dependencies??{},...n.devDependencies??{}},i=n.scripts??{},o=Object.values(i).filter(u=>typeof u=="string").join(" ").toLowerCase();return t["@nestjs/core"]||o.includes("nest start")?r("nestjs","high","manifest"):t.express?r("express","high","manifest"):t.fastify?r("fastify","high","manifest"):t.koa?r("koa","high","manifest"):r("node","medium","marker")}function A(e){let n=N(s.join(e,"package.json"));if(!n)return r("unknown","low","unknown");let t={...n.dependencies??{},...n.devDependencies??{}},i=n.engines??{},o=n.scripts??{},u=Object.values(o).filter(l=>typeof l=="string").join(" ").toLowerCase();return t["@tauri-apps/api"]||t["@tauri-apps/cli"]||a.existsSync(s.join(e,"src-tauri","Cargo.toml"))?r("tauri","high","manifest"):t.electron||t["@electron-forge/cli"]||u.includes("electron-forge")||u.includes("electron ")?r("electron","high","manifest"):typeof i.vscode=="string"&&(n.activationEvents!==void 0||n.contributes!==void 0)?r("vscode-extension","high","manifest"):r("unknown","low","unknown")}function O(e){let n=[d(s.join(e,"pyproject.toml")),d(s.join(e,"requirements.txt")),d(s.join(e,"requirements.in"))].join(`
|
|
2
|
-
`);return n.includes("fastapi")?r("fastapi","high","manifest"):n.includes("django")?r("django","high","manifest"):n.includes("flask")?r("flask","high","manifest"):n.trim()?r("python","medium","marker"):r("unknown","low","unknown")}function _(e){let n=[d(s.join(e,"go.mod")),d(s.join(e,"main.go"))].join(`
|
|
3
|
-
`);return n.includes("github.com/gofiber/fiber")?r("gofiber","high","manifest"):n.includes("github.com/gin-gonic/gin")?r("gogin","high","manifest"):n.includes("github.com/labstack/echo")?r("echo","high","manifest"):n.trim()?r("go","medium","marker"):r("unknown","low","unknown")}function I(e){let n=[d(s.join(e,"pom.xml")),d(s.join(e,"build.gradle")),d(s.join(e,"build.gradle.kts"))].join(`
|
|
4
|
-
`);return n.includes("spring-boot")||n.includes("org.springframework")?r("springboot","high","manifest"):n.trim()?r("java","medium","marker"):r("unknown","low","unknown")}function z(e){let n=d(s.join(e,"composer.json"));return n.includes("laravel/framework")?r("laravel","high","manifest"):n.includes("symfony/")?r("symfony","high","manifest"):n.trim()?r("php","medium","marker"):r("unknown","low","unknown")}function G(e){let n=d(s.join(e,"Gemfile"));return n.includes("gem 'rails'")||n.includes('gem "rails"')?r("rails","high","manifest"):n.includes("gem 'sinatra'")||n.includes('gem "sinatra"')?r("sinatra","high","manifest"):n.trim()?r("ruby","medium","marker"):r("unknown","low","unknown")}function V(e){let t=[...j(e,".csproj",3),...j(e,".sln",2)].map(i=>d(i)).join(`
|
|
5
|
-
`);return t.includes("microsoft.net.sdk.web")||t.includes("microsoft.aspnetcore")||t.includes("swashbuckle.aspnetcore")?r("dotnet","high","manifest"):t.trim()?r("dotnet","medium","marker"):r("unknown","low","unknown")}function W(e){let n=d(s.join(e,"Cargo.toml"));return n.includes("actix-web")?r("actix","high","manifest"):n.includes("axum")?r("axum","high","manifest"):n.includes("rocket")?r("rocket","high","manifest"):n.trim()?r("rust","medium","marker"):r("unknown","low","unknown")}function q(e){let n=d(s.join(e,"mix.exs"));return n.includes("phoenix")?r("phoenix","high","manifest"):n.trim()?r("elixir","medium","marker"):r("unknown","low","unknown")}function M(e){let n=[],t=i=>{n.includes(i)||n.push(i);};return a.existsSync(s.join(e,"go.mod"))&&t("go"),(a.existsSync(s.join(e,"Cargo.toml"))||a.existsSync(s.join(e,"src-tauri","Cargo.toml")))&&t("rust"),(a.existsSync(s.join(e,"pom.xml"))||a.existsSync(s.join(e,"build.gradle"))||a.existsSync(s.join(e,"build.gradle.kts")))&&t("java"),a.existsSync(s.join(e,"mix.exs"))&&t("elixir"),a.existsSync(s.join(e,"composer.json"))&&t("php"),(c(e,".csproj")||c(e,".sln"))&&t("dotnet"),a.existsSync(s.join(e,"package.json"))&&t("node"),a.existsSync(s.join(e,"Gemfile"))&&t("ruby"),(a.existsSync(s.join(e,"pyproject.toml"))||a.existsSync(s.join(e,"setup.py"))||a.existsSync(s.join(e,"requirements.txt"))||a.existsSync(s.join(e,"requirements.in")))&&t("python"),(a.existsSync(s.join(e,"deps.edn"))||a.existsSync(s.join(e,"project.clj")))&&t("clojure"),a.existsSync(s.join(e,"build.sbt"))&&t("scala"),(a.existsSync(s.join(e,"deno.json"))||a.existsSync(s.join(e,"deno.jsonc")))&&t("deno"),(a.existsSync(s.join(e,"bun.lockb"))||a.existsSync(s.join(e,"bun.lock")))&&t("bun"),(a.existsSync(s.join(e,"CMakeLists.txt"))||a.existsSync(s.join(e,"meson.build"))||c(e,".cpp",3)||c(e,".cc",3)||c(e,".cxx",3)||c(e,".hpp",3)||c(e,".hh",3)||c(e,".hxx",3))&&t("cpp"),(c(e,".c",3)||c(e,".h",3))&&t("c"),(a.existsSync(s.join(e,"settings.gradle.kts"))||c(s.join(e,"src"),".kt",3))&&t("kotlin"),n}function ie(e,n){let t=L({framework:typeof n?.framework=="string"?n.framework:void 0,runtime:typeof n?.runtime=="string"?n.runtime:void 0,kitName:typeof n?.kit_name=="string"?n.kit_name:typeof n?.kit=="string"?n.kit:void 0});if(t.key!=="unknown")return t;let i=M(e);if(i.includes("node")){let o=A(e);if(o.key!=="unknown")return o;let u=b(e,n);if(u.key!=="unknown")return u;let l=E(e);if(l.key!=="unknown")return l}if(i.includes("python")){let o=O(e);if(o.key!=="unknown")return o}if(i.includes("go")){let o=_(e);if(o.key!=="unknown")return o}if(i.includes("java")){let o=I(e);if(o.key!=="unknown")return o}if(i.includes("php")){let o=z(e);if(o.key!=="unknown")return o}if(i.includes("ruby")){let o=G(e);if(o.key!=="unknown")return o}if(i.includes("rust")){let o=W(e);if(o.key!=="unknown")return o}if(i.includes("elixir")){let o=q(e);if(o.key!=="unknown")return o}if(i.includes("dotnet")){let o=V(e);if(o.key!=="unknown")return o}return i.includes("clojure")?r("clojure","medium","marker"):i.includes("scala")?r("scala","medium","marker"):i.includes("kotlin")?r("kotlin","medium","marker"):i.includes("deno")?r("deno","high","marker"):i.includes("bun")?r("bun","high","marker"):i.includes("cpp")?r("cpp","medium","marker"):i.includes("c")?r("c","medium","marker"):i.length>0?r(y(i[0]),"medium","runtime"):r("unknown","low","unknown")}export{Y as a,Q as b,S as c,b as d,ne as e,te as f,L as g,M as h,ie as i};
|