@aiwg/cli 2026.9.3 → 2026.9.4
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 +21 -0
- package/dist/src/cli/handlers/use.js +37 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -961,6 +961,27 @@ If both `aiwg` and `@aiwg/cli` were installed into the same prefix, the most
|
|
|
961
961
|
recent install owns the shared executable link. Remove both, then install the
|
|
962
962
|
distribution you intend to use.
|
|
963
963
|
|
|
964
|
+
### Bundled setup requires the full package
|
|
965
|
+
|
|
966
|
+
`aiwg use all` and named framework setup such as `aiwg use sdlc` need the
|
|
967
|
+
framework and addon sources included in `aiwg`. The lightweight `@aiwg/cli`
|
|
968
|
+
package supports signed web lookup and external project-local bundle deployment;
|
|
969
|
+
web lookup does not download a complete source tree for bundled setup.
|
|
970
|
+
|
|
971
|
+
If setup reports that the full package is required, replace the lightweight
|
|
972
|
+
global installation and rerun setup with your provider:
|
|
973
|
+
|
|
974
|
+
```bash
|
|
975
|
+
npm uninstall -g @aiwg/cli
|
|
976
|
+
npm install -g aiwg
|
|
977
|
+
aiwg use all --provider pi
|
|
978
|
+
```
|
|
979
|
+
|
|
980
|
+
Older CLI versions can instead report `ENOENT` while scanning
|
|
981
|
+
`@aiwg/cli/agentic/code/addons`. The same recovery applies. Existing project
|
|
982
|
+
files are retained; the prerequisite check now stops before deployment or
|
|
983
|
+
project initialization, including in dry-run mode.
|
|
984
|
+
|
|
964
985
|
## Migrating Between Distributions
|
|
965
986
|
|
|
966
987
|
From full AIWG to the lightweight package:
|
|
@@ -249,6 +249,36 @@ function resolveFrameworkDir(framework) {
|
|
|
249
249
|
* aiwg-dev is contributor-only tooling — not for end users.
|
|
250
250
|
*/
|
|
251
251
|
export const USE_ALL_DISALLOW = new Set(['aiwg-dev']);
|
|
252
|
+
/** Full-framework setup requires the corpus omitted by the lightweight CLI. */
|
|
253
|
+
async function bundledSetupPrerequisiteMessage(frameworkRoot) {
|
|
254
|
+
let packageName;
|
|
255
|
+
try {
|
|
256
|
+
packageName = JSON.parse(await fs.readFile(path.join(frameworkRoot, 'package.json'), 'utf8')).name;
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
// Embedded callers and source fixtures need not have package metadata.
|
|
260
|
+
return undefined;
|
|
261
|
+
}
|
|
262
|
+
if (packageName !== '@aiwg/cli')
|
|
263
|
+
return undefined;
|
|
264
|
+
const hasCorpus = (await Promise.all(['frameworks', 'addons'].map(async (kind) => {
|
|
265
|
+
try {
|
|
266
|
+
return (await fs.stat(path.join(frameworkRoot, 'agentic/code', kind))).isDirectory();
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}))).every(Boolean);
|
|
272
|
+
if (hasCorpus)
|
|
273
|
+
return undefined;
|
|
274
|
+
return [
|
|
275
|
+
'Bundled framework setup requires the full aiwg package. This @aiwg/cli installation does not include framework and addon sources.',
|
|
276
|
+
'Replace the lightweight global package, then rerun your setup command:',
|
|
277
|
+
' npm uninstall -g @aiwg/cli',
|
|
278
|
+
' npm install -g aiwg',
|
|
279
|
+
'@aiwg/cli can still query signed web resources and deploy external project-local bundles.',
|
|
280
|
+
].join('\n');
|
|
281
|
+
}
|
|
252
282
|
/**
|
|
253
283
|
* Discover all addon names from the filesystem, minus the disallow list.
|
|
254
284
|
*/
|
|
@@ -2306,6 +2336,13 @@ export class UseHandler {
|
|
|
2306
2336
|
if (framework === 'cockpit') {
|
|
2307
2337
|
return installCockpit(ctx, remainingArgs);
|
|
2308
2338
|
}
|
|
2339
|
+
// Check before auto-init, global staging, or deployment can alter a project.
|
|
2340
|
+
// Web lookup does not materialize the corpus required by bundled setup.
|
|
2341
|
+
if (VALID_FRAMEWORKS.includes(framework)) {
|
|
2342
|
+
const prerequisite = await bundledSetupPrerequisiteMessage(ctx.frameworkRoot || await getFrameworkRoot());
|
|
2343
|
+
if (prerequisite)
|
|
2344
|
+
return { exitCode: 1, message: prerequisite };
|
|
2345
|
+
}
|
|
2309
2346
|
// Structured logger for this invocation. Records go to both stderr (if
|
|
2310
2347
|
// verbose level) and ~/.aiwg/logs/aiwg-YYYY-MM-DD.jsonl with full
|
|
2311
2348
|
// provenance (invocation_id, aiwg_version, git_sha, etc.). #925.
|