@topogram/cli 0.3.50 → 0.3.52
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/ARCHITECTURE.md +4 -4
- package/CHANGELOG.md +11 -11
- package/package.json +1 -1
- package/src/adoption/plan.js +2 -2
- package/src/agent-ops/query-builders.js +42 -33
- package/src/cli.js +174 -129
- package/src/generator/adapters.d.ts +1 -0
- package/src/generator/adapters.js +64 -39
- package/src/generator/check.js +19 -12
- package/src/generator/context/diff.js +9 -9
- package/src/generator/context/domain-coverage.js +11 -10
- package/src/generator/context/domain-page.js +6 -6
- package/src/generator/context/shared.js +37 -21
- package/src/generator/context/slice.js +70 -65
- package/src/generator/index.js +12 -12
- package/src/generator/output.js +21 -20
- package/src/generator/registry.js +61 -49
- package/src/generator/runtime/app-bundle.js +15 -15
- package/src/generator/runtime/compile-check.js +7 -7
- package/src/generator/runtime/deployment.js +9 -9
- package/src/generator/runtime/environment.js +39 -39
- package/src/generator/runtime/runtime-check.js +5 -5
- package/src/generator/runtime/shared.js +40 -38
- package/src/generator/runtime/smoke.js +5 -5
- package/src/generator/surfaces/databases/contract.js +1 -1
- package/src/generator/surfaces/databases/lifecycle-shared.js +6 -5
- package/src/generator/surfaces/databases/postgres/drizzle.js +3 -2
- package/src/generator/surfaces/databases/postgres/prisma.js +3 -2
- package/src/generator/surfaces/databases/shared.js +3 -2
- package/src/generator/surfaces/databases/snapshot.js +1 -1
- package/src/generator/surfaces/databases/sqlite/prisma.js +3 -2
- package/src/generator/surfaces/native/swiftui-app.js +3 -3
- package/src/generator/surfaces/native/swiftui-templates/Package.swift.txt +1 -1
- package/src/generator/surfaces/native/swiftui-templates/README.generated.md +3 -3
- package/src/generator/surfaces/native/swiftui-templates/runtime/DynamicScreens.swift +3 -3
- package/src/generator/surfaces/services/persistence-wiring.js +3 -2
- package/src/generator/surfaces/services/server-contract.js +4 -4
- package/src/generator/surfaces/shared.js +2 -2
- package/src/generator/surfaces/web/design-intent.js +1 -1
- package/src/generator/surfaces/web/index.js +7 -7
- package/src/generator/surfaces/web/{react-components.js → react-widgets.js} +53 -53
- package/src/generator/surfaces/web/react.js +36 -36
- package/src/generator/surfaces/web/{sveltekit-components.js → sveltekit-widgets.js} +53 -53
- package/src/generator/surfaces/web/sveltekit.js +34 -34
- package/src/generator/surfaces/web/{ui-web-contract.js → ui-surface-contract.js} +8 -8
- package/src/generator/surfaces/web/vanilla.js +6 -6
- package/src/generator/{component-conformance.js → widget-conformance.js} +129 -128
- package/src/generator/widgets.js +40 -0
- package/src/generator-policy.js +10 -12
- package/src/import/core/runner.js +34 -34
- package/src/import/core/shared.js +1 -1
- package/src/import/extractors/ui/android-compose.js +1 -1
- package/src/import/extractors/ui/blazor.js +1 -1
- package/src/import/extractors/ui/razor-pages.js +1 -1
- package/src/import/extractors/ui/react-router.js +4 -4
- package/src/import/extractors/ui/sveltekit.js +4 -4
- package/src/import/extractors/ui/swiftui.js +1 -1
- package/src/import/extractors/ui/uikit.js +1 -1
- package/src/new-project.js +19 -18
- package/src/project-config.js +92 -42
- package/src/proofs/contract-audit.js +1 -1
- package/src/proofs/ios-parity.js +1 -1
- package/src/proofs/issues-parity.js +1 -1
- package/src/realization/backend/build-backend-runtime-realization.js +2 -2
- package/src/realization/ui/build-ui-shared-realization.js +33 -33
- package/src/realization/ui/build-web-realization.js +23 -20
- package/src/reconcile/journeys.js +1 -1
- package/src/resolver/index.js +148 -65
- package/src/validator/index.js +501 -409
- package/src/validator/kinds.js +36 -36
- package/src/validator/per-kind/{component.js → widget.js} +47 -47
- package/src/{component-behavior.js → widget-behavior.js} +3 -3
- package/src/workflows.js +39 -38
- package/template-helpers/react.js +4 -4
- package/template-helpers/sveltekit.js +4 -4
- package/src/generator/components.js +0 -39
- /package/src/resolver/enrich/{component.js → widget.js} +0 -0
package/src/cli.js
CHANGED
|
@@ -194,8 +194,8 @@ function printUsage(options = {}) {
|
|
|
194
194
|
console.log("Usage: topogram release status [--json] [--strict] [--markdown|--write-report <path>]");
|
|
195
195
|
console.log(" or: topogram release roll-consumers <version|--latest> [--json] [--no-push] [--watch]");
|
|
196
196
|
console.log("Usage: topogram check [path] [--json]");
|
|
197
|
-
console.log(" or: topogram
|
|
198
|
-
console.log(" or: topogram
|
|
197
|
+
console.log(" or: topogram widget check [path] [--projection <id>] [--widget <id>] [--json]");
|
|
198
|
+
console.log(" or: topogram widget behavior [path] [--projection <id>] [--widget <id>] [--json]");
|
|
199
199
|
console.log(" or: topogram generate [path] [--out <path>]");
|
|
200
200
|
console.log(" or: topogram generate [path] --generate <target> [--json|--write --out-dir <path>]");
|
|
201
201
|
console.log(" or: topogram query list [--json]");
|
|
@@ -252,11 +252,11 @@ function printUsage(options = {}) {
|
|
|
252
252
|
console.log(" topogram new ./my-app --template todo");
|
|
253
253
|
console.log(" topogram check");
|
|
254
254
|
console.log(" topogram check --json");
|
|
255
|
-
console.log(" topogram
|
|
256
|
-
console.log(" topogram
|
|
255
|
+
console.log(" topogram widget check --projection proj_web_surface");
|
|
256
|
+
console.log(" topogram widget behavior --projection proj_web_surface");
|
|
257
257
|
console.log(" topogram query list");
|
|
258
|
-
console.log(" topogram query show
|
|
259
|
-
console.log(" topogram query
|
|
258
|
+
console.log(" topogram query show widget-behavior");
|
|
259
|
+
console.log(" topogram query widget-behavior ./topogram --projection proj_web_surface --json");
|
|
260
260
|
console.log(" topogram generator list");
|
|
261
261
|
console.log(" topogram generator show @topogram/generator-react-web");
|
|
262
262
|
console.log(" topogram generator check ./generator-package");
|
|
@@ -325,35 +325,35 @@ function printUsage(options = {}) {
|
|
|
325
325
|
console.log(" or: topogram template show <id> [--json] [--catalog <path-or-source>]");
|
|
326
326
|
console.log(" or: topogram import app <path> [--from <track[,track]>] [--write]");
|
|
327
327
|
console.log(" or: topogram validate <path>");
|
|
328
|
-
console.log(" or: node ./src/cli.js <path> [--json] [--validate] [--resolve] [--generate <target>] [--workflow <name>] [--mode <id>] [--from <track[,track]>] [--adopt <selector>] [--refresh-adopted] [--shape <id>] [--capability <id>] [--
|
|
328
|
+
console.log(" or: node ./src/cli.js <path> [--json] [--validate] [--resolve] [--generate <target>] [--workflow <name>] [--mode <id>] [--from <track[,track]>] [--adopt <selector>] [--refresh-adopted] [--shape <id>] [--capability <id>] [--widget <id>] [--projection <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--task <id>] [--profile <id>] [--from-snapshot <path>] [--from-topogram <path>] [--write] [--out-dir <path>]");
|
|
329
329
|
console.log(" or: node ./src/cli.js import app <path> [--from <track[,track]>] [--write]");
|
|
330
330
|
console.log(" or: node ./src/cli.js import docs <path> [--write]");
|
|
331
331
|
console.log(" or: node ./src/cli.js generate journeys <path> [--write]");
|
|
332
332
|
console.log(" or: node ./src/cli.js report gaps <path> [--write]");
|
|
333
|
-
console.log(" or: node ./src/cli.js query task-mode <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
333
|
+
console.log(" or: node ./src/cli.js query task-mode <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--from-topogram <path>]");
|
|
334
334
|
console.log(" or: node ./src/cli.js query adoption-plan <path>");
|
|
335
335
|
console.log(" or: node ./src/cli.js query maintained-boundary <path>");
|
|
336
336
|
console.log(" or: node ./src/cli.js query maintained-conformance <path> [--from-topogram <path>]");
|
|
337
337
|
console.log(" or: node ./src/cli.js query maintained-drift <path> --from-topogram <path>");
|
|
338
338
|
console.log(" or: node ./src/cli.js query seam-check <path> [--seam <id>] [--from-topogram <path>]");
|
|
339
339
|
console.log(" or: node ./src/cli.js query diff <path> --from-topogram <path>");
|
|
340
|
-
console.log(" or: node ./src/cli.js query slice <path> [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
340
|
+
console.log(" or: node ./src/cli.js query slice <path> [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--domain <id>]");
|
|
341
341
|
console.log(" or: node ./src/cli.js query domain-list <path>");
|
|
342
342
|
console.log(" or: node ./src/cli.js query domain-coverage <path> --domain <id>");
|
|
343
|
-
console.log(" or: node ./src/cli.js query review-boundary <path> [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
344
|
-
console.log(" or: node ./src/cli.js query write-scope <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
345
|
-
console.log(" or: node ./src/cli.js query verification-targets <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
346
|
-
console.log(" or: node ./src/cli.js query
|
|
347
|
-
console.log(" or: node ./src/cli.js query change-plan <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
343
|
+
console.log(" or: node ./src/cli.js query review-boundary <path> [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>]");
|
|
344
|
+
console.log(" or: node ./src/cli.js query write-scope <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--from-topogram <path>]");
|
|
345
|
+
console.log(" or: node ./src/cli.js query verification-targets <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--from-topogram <path>]");
|
|
346
|
+
console.log(" or: node ./src/cli.js query widget-behavior <path> [--projection <id>] [--widget <id>] [--json]");
|
|
347
|
+
console.log(" or: node ./src/cli.js query change-plan <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--from-topogram <path>]");
|
|
348
348
|
console.log(" or: node ./src/cli.js query import-plan <path>");
|
|
349
|
-
console.log(" or: node ./src/cli.js query risk-summary <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
350
|
-
console.log(" or: node ./src/cli.js query canonical-writes <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
351
|
-
console.log(" or: node ./src/cli.js query proceed-decision <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
352
|
-
console.log(" or: node ./src/cli.js query review-packet <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
353
|
-
console.log(" or: node ./src/cli.js query next-action <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
354
|
-
console.log(" or: node ./src/cli.js query single-agent-plan <path> --mode <id> [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
349
|
+
console.log(" or: node ./src/cli.js query risk-summary <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--from-topogram <path>]");
|
|
350
|
+
console.log(" or: node ./src/cli.js query canonical-writes <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--from-topogram <path>]");
|
|
351
|
+
console.log(" or: node ./src/cli.js query proceed-decision <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--from-topogram <path>]");
|
|
352
|
+
console.log(" or: node ./src/cli.js query review-packet <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--from-topogram <path>]");
|
|
353
|
+
console.log(" or: node ./src/cli.js query next-action <path> [--mode <id>] [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--from-topogram <path>]");
|
|
354
|
+
console.log(" or: node ./src/cli.js query single-agent-plan <path> --mode <id> [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--from-topogram <path>]");
|
|
355
355
|
console.log(" or: node ./src/cli.js query multi-agent-plan <path> --mode import-adopt");
|
|
356
|
-
console.log(" or: node ./src/cli.js query resolved-workflow-context <path> --mode <id> [--capability <id>] [--workflow <id>] [--projection <id>] [--
|
|
356
|
+
console.log(" or: node ./src/cli.js query resolved-workflow-context <path> --mode <id> [--capability <id>] [--workflow <id>] [--projection <id>] [--widget <id>] [--entity <id>] [--journey <id>] [--surface <id>] [--provider <id>] [--preset <id>] [--from-topogram <path>]");
|
|
357
357
|
console.log(" or: node ./src/cli.js query workflow-preset-activation <path> --mode <id> [--provider <id>] [--preset <id>] [--from-topogram <path>]");
|
|
358
358
|
console.log(" or: node ./src/cli.js query workflow-preset-diff <path> --provider <id> [--preset <id>]");
|
|
359
359
|
console.log(" or: node ./src/cli.js query workflow-preset-customization <path> --provider <id> --preset <id>");
|
|
@@ -366,10 +366,10 @@ function printUsage(options = {}) {
|
|
|
366
366
|
console.log(" or: node ./src/cli.js reconcile <path> [--write]");
|
|
367
367
|
console.log(" or: node ./src/cli.js reconcile adopt <selector> <path> [--refresh-adopted] [--write]");
|
|
368
368
|
console.log(" or: node ./src/cli.js adoption status <path> [--write]");
|
|
369
|
-
console.log("Targets: json-schema, docs, docs-index, verification-plan, verification-checklist, shape-transform-graph, shape-transform-debug, api-contract-graph, api-contract-debug, ui-contract-graph, ui-contract-debug, ui-
|
|
369
|
+
console.log("Targets: json-schema, docs, docs-index, verification-plan, verification-checklist, shape-transform-graph, shape-transform-debug, api-contract-graph, api-contract-debug, ui-contract-graph, ui-contract-debug, ui-widget-contract, widget-conformance-report, widget-behavior-report, ui-surface-contract, ui-surface-debug, sveltekit-app, swiftui-app, db-contract-graph, db-contract-debug, db-schema-snapshot, db-migration-plan, db-lifecycle-plan, db-lifecycle-bundle, environment-plan, environment-bundle, deployment-plan, deployment-bundle, runtime-smoke-plan, runtime-smoke-bundle, runtime-check-plan, runtime-check-bundle, compile-check-plan, compile-check-bundle, app-bundle-plan, app-bundle, native-parity-plan, native-parity-bundle, sql-migration, sql-schema, prisma-schema, drizzle-schema, persistence-scaffold, server-contract, hono-server, openapi, context-digest, context-diff, context-slice, context-bundle, context-report, context-task-mode");
|
|
370
370
|
console.log("Workflows: import-app, scan-docs, reconcile, adoption-status, generate-docs, generate-journeys, refresh-docs, report-gaps");
|
|
371
371
|
console.log("Import tracks: db, api, ui, workflows, verification");
|
|
372
|
-
console.log("Reconcile adopt selectors: from-plan, actors, roles, enums, shapes, entities, capabilities,
|
|
372
|
+
console.log("Reconcile adopt selectors: from-plan, actors, roles, enums, shapes, entities, capabilities, widgets, docs, journeys, workflows, ui, bundle:<slug>, projection-review:<id>, ui-review:<id>, workflow-review:<id>, bundle-review:<slug>");
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
function printNewHelp() {
|
|
@@ -405,15 +405,15 @@ function printGenerateHelp() {
|
|
|
405
405
|
console.log("Explicit --generate targets print JSON by default and write files only with --write.");
|
|
406
406
|
console.log("");
|
|
407
407
|
console.log("Common artifact targets:");
|
|
408
|
-
console.log(" ui-
|
|
409
|
-
console.log("
|
|
410
|
-
console.log("
|
|
408
|
+
console.log(" ui-widget-contract");
|
|
409
|
+
console.log(" widget-conformance-report");
|
|
410
|
+
console.log(" widget-behavior-report");
|
|
411
411
|
console.log(" context-slice");
|
|
412
412
|
console.log(" context-diff");
|
|
413
413
|
console.log(" verification-targets");
|
|
414
414
|
console.log("");
|
|
415
415
|
console.log("Selectors:");
|
|
416
|
-
console.log(" --
|
|
416
|
+
console.log(" --widget <id>");
|
|
417
417
|
console.log(" --capability <id>");
|
|
418
418
|
console.log(" --projection <id>");
|
|
419
419
|
console.log(" --entity <id>");
|
|
@@ -423,27 +423,27 @@ function printGenerateHelp() {
|
|
|
423
423
|
console.log(" topogram generate");
|
|
424
424
|
console.log(" topogram generate ./topogram --out ./app");
|
|
425
425
|
console.log(" topogram generate app ./topogram --out ./app");
|
|
426
|
-
console.log(" topogram generate ./topogram --generate ui-
|
|
427
|
-
console.log(" topogram generate ./topogram --generate
|
|
428
|
-
console.log(" topogram generate ./topogram --generate
|
|
429
|
-
console.log(" topogram generate ./topogram --generate ui-
|
|
426
|
+
console.log(" topogram generate ./topogram --generate ui-widget-contract --widget widget_data_grid --json");
|
|
427
|
+
console.log(" topogram generate ./topogram --generate widget-conformance-report --projection proj_web_surface --json");
|
|
428
|
+
console.log(" topogram generate ./topogram --generate widget-behavior-report --projection proj_web_surface --json");
|
|
429
|
+
console.log(" topogram generate ./topogram --generate ui-widget-contract --write --out-dir ./contracts");
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
function
|
|
433
|
-
console.log("Usage: topogram
|
|
434
|
-
console.log(" or: topogram
|
|
432
|
+
function printWidgetHelp() {
|
|
433
|
+
console.log("Usage: topogram widget check [path] [--projection <id>] [--widget <id>] [--json]");
|
|
434
|
+
console.log(" or: topogram widget behavior [path] [--projection <id>] [--widget <id>] [--json]");
|
|
435
435
|
console.log("");
|
|
436
|
-
console.log("Checks projection
|
|
436
|
+
console.log("Checks projection widget_bindings usage against reusable widget contracts and behavior realizations.");
|
|
437
437
|
console.log("");
|
|
438
438
|
console.log("Defaults: path is ./topogram.");
|
|
439
439
|
console.log("");
|
|
440
440
|
console.log("Examples:");
|
|
441
|
-
console.log(" topogram
|
|
442
|
-
console.log(" topogram
|
|
443
|
-
console.log(" topogram
|
|
444
|
-
console.log(" topogram
|
|
445
|
-
console.log(" topogram
|
|
446
|
-
console.log(" topogram
|
|
441
|
+
console.log(" topogram widget check");
|
|
442
|
+
console.log(" topogram widget check --projection proj_web_surface");
|
|
443
|
+
console.log(" topogram widget check ./topogram --widget widget_data_grid --json");
|
|
444
|
+
console.log(" topogram widget behavior");
|
|
445
|
+
console.log(" topogram widget behavior --projection proj_web_surface");
|
|
446
|
+
console.log(" topogram widget behavior ./topogram --widget widget_data_grid --json");
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
function queryDefinitions() {
|
|
@@ -452,79 +452,79 @@ function queryDefinitions() {
|
|
|
452
452
|
name: "slice",
|
|
453
453
|
purpose: "Give an agent the smallest graph slice needed to reason about one selected semantic surface.",
|
|
454
454
|
description: "Return a focused semantic context slice for one selected surface.",
|
|
455
|
-
selectors: ["capability", "workflow", "projection", "
|
|
455
|
+
selectors: ["capability", "workflow", "projection", "widget", "entity", "journey", "domain"],
|
|
456
456
|
args: ["[path]", "[selectors]", "[--json]"],
|
|
457
457
|
output: "context_slice",
|
|
458
|
-
example: "topogram query slice ./topogram --
|
|
458
|
+
example: "topogram query slice ./topogram --widget widget_data_grid"
|
|
459
459
|
},
|
|
460
460
|
{
|
|
461
461
|
name: "verification-targets",
|
|
462
462
|
purpose: "Map a selected change or mode to the smallest verification set worth running.",
|
|
463
463
|
description: "Return the smallest verification target set for a mode, selector, or diff.",
|
|
464
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
464
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "from-topogram"],
|
|
465
465
|
args: ["[path]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
466
466
|
output: "verification_targets",
|
|
467
|
-
example: "topogram query verification-targets ./topogram --
|
|
467
|
+
example: "topogram query verification-targets ./topogram --widget widget_data_grid"
|
|
468
468
|
},
|
|
469
469
|
{
|
|
470
|
-
name: "
|
|
471
|
-
purpose: "Show how reusable
|
|
472
|
-
description: "Return
|
|
473
|
-
selectors: ["projection", "
|
|
474
|
-
args: ["[path]", "[--projection <id>]", "[--
|
|
475
|
-
output: "
|
|
476
|
-
example: "topogram query
|
|
470
|
+
name: "widget-behavior",
|
|
471
|
+
purpose: "Show how reusable widget behavior is realized by projection usage.",
|
|
472
|
+
description: "Return widget behavior realization data grouped by widget, screen, capability, and effect.",
|
|
473
|
+
selectors: ["projection", "widget"],
|
|
474
|
+
args: ["[path]", "[--projection <id>]", "[--widget <id>]", "[--json]"],
|
|
475
|
+
output: "widget_behavior_report",
|
|
476
|
+
example: "topogram query widget-behavior ./topogram --projection proj_web_surface --widget widget_data_grid --json"
|
|
477
477
|
},
|
|
478
478
|
{
|
|
479
479
|
name: "change-plan",
|
|
480
480
|
purpose: "Summarize what a selected change affects before code or Topogram edits start.",
|
|
481
481
|
description: "Return the semantic change plan, generator targets, risk, and alignment recommendations.",
|
|
482
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
482
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "surface", "from-topogram"],
|
|
483
483
|
args: ["[path]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
484
484
|
output: "change_plan_query",
|
|
485
|
-
example: "topogram query change-plan ./topogram --
|
|
485
|
+
example: "topogram query change-plan ./topogram --widget widget_data_grid"
|
|
486
486
|
},
|
|
487
487
|
{
|
|
488
488
|
name: "review-packet",
|
|
489
489
|
purpose: "Bundle the context a human or agent needs to review a selected semantic change.",
|
|
490
490
|
description: "Return the review packet for a selected change or diff.",
|
|
491
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
491
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "surface", "from-topogram"],
|
|
492
492
|
args: ["[path]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
493
493
|
output: "review_packet_query",
|
|
494
|
-
example: "topogram query review-packet ./topogram --
|
|
494
|
+
example: "topogram query review-packet ./topogram --widget widget_data_grid"
|
|
495
495
|
},
|
|
496
496
|
{
|
|
497
497
|
name: "resolved-workflow-context",
|
|
498
498
|
purpose: "Resolve workflow guidance and artifact load order for a selected mode or change.",
|
|
499
499
|
description: "Return resolved workflow guidance, artifact load order, preset policy, and recommended artifact queries.",
|
|
500
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
500
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "surface", "provider", "preset", "from-topogram"],
|
|
501
501
|
args: ["[path]", "[--mode <id>]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
502
502
|
output: "resolved_workflow_context_query",
|
|
503
|
-
example: "topogram query resolved-workflow-context ./topogram --mode modeling --
|
|
503
|
+
example: "topogram query resolved-workflow-context ./topogram --mode modeling --widget widget_data_grid --json"
|
|
504
504
|
},
|
|
505
505
|
{
|
|
506
506
|
name: "single-agent-plan",
|
|
507
507
|
purpose: "Give one coding agent a bounded plan, artifact set, and write guidance.",
|
|
508
508
|
description: "Return a single-agent operating plan for a mode and optional selector.",
|
|
509
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
509
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "surface", "from-topogram"],
|
|
510
510
|
args: ["[path]", "[--mode <id>]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
511
511
|
output: "single_agent_plan_query",
|
|
512
|
-
example: "topogram query single-agent-plan ./topogram --mode modeling --
|
|
512
|
+
example: "topogram query single-agent-plan ./topogram --mode modeling --widget widget_data_grid --json"
|
|
513
513
|
},
|
|
514
514
|
{
|
|
515
515
|
name: "risk-summary",
|
|
516
516
|
purpose: "Surface behavioral, ownership, and verification risks for a selected change.",
|
|
517
517
|
description: "Return the risk summary for a selected change, mode, or diff.",
|
|
518
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
518
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "surface", "from-topogram"],
|
|
519
519
|
args: ["[path]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
520
520
|
output: "risk_summary_query",
|
|
521
|
-
example: "topogram query risk-summary ./topogram --
|
|
521
|
+
example: "topogram query risk-summary ./topogram --widget widget_data_grid"
|
|
522
522
|
},
|
|
523
523
|
{
|
|
524
524
|
name: "proceed-decision",
|
|
525
525
|
purpose: "Tell a human or agent whether enough context and proof exist to proceed.",
|
|
526
526
|
description: "Return a proceed/no-go decision for the current selected work.",
|
|
527
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
527
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "surface", "from-topogram"],
|
|
528
528
|
args: ["[path]", "[--mode <id>]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
529
529
|
output: "proceed_decision_query",
|
|
530
530
|
example: "topogram query proceed-decision ./topogram --mode verification"
|
|
@@ -533,10 +533,10 @@ function queryDefinitions() {
|
|
|
533
533
|
name: "write-scope",
|
|
534
534
|
purpose: "Define where an agent may edit for a selected semantic surface.",
|
|
535
535
|
description: "Return safe edit boundaries for a selected mode or semantic surface.",
|
|
536
|
-
selectors: ["mode", "capability", "workflow", "projection", "
|
|
536
|
+
selectors: ["mode", "capability", "workflow", "projection", "widget", "entity", "journey", "from-topogram"],
|
|
537
537
|
args: ["[path]", "[selectors]", "[--from-topogram <path>]", "[--json]"],
|
|
538
538
|
output: "write_scope_query",
|
|
539
|
-
example: "topogram query write-scope ./topogram --
|
|
539
|
+
example: "topogram query write-scope ./topogram --widget widget_data_grid"
|
|
540
540
|
}
|
|
541
541
|
];
|
|
542
542
|
}
|
|
@@ -565,7 +565,7 @@ function buildQueryShowPayload(name) {
|
|
|
565
565
|
function printQueryHelp() {
|
|
566
566
|
console.log("Usage: topogram query list [--json]");
|
|
567
567
|
console.log(" or: topogram query show <name> [--json]");
|
|
568
|
-
console.log(" or: topogram query
|
|
568
|
+
console.log(" or: topogram query widget-behavior [path] [--projection <id>] [--widget <id>] [--json]");
|
|
569
569
|
console.log(" or: topogram query <name> [path] [selectors] [--json]");
|
|
570
570
|
console.log("");
|
|
571
571
|
console.log("Agent-facing queries return focused JSON packets for context, review, verification, and generation follow-up.");
|
|
@@ -856,8 +856,8 @@ function printCommandHelp(command) {
|
|
|
856
856
|
printGenerateHelp();
|
|
857
857
|
return true;
|
|
858
858
|
}
|
|
859
|
-
if (command === "
|
|
860
|
-
|
|
859
|
+
if (command === "widget") {
|
|
860
|
+
printWidgetHelp();
|
|
861
861
|
return true;
|
|
862
862
|
}
|
|
863
863
|
if (command === "query") {
|
|
@@ -1035,8 +1035,8 @@ function targetRequiresImplementationProvider(target) {
|
|
|
1035
1035
|
|
|
1036
1036
|
function topologyComponentReferences(component) {
|
|
1037
1037
|
return {
|
|
1038
|
-
|
|
1039
|
-
|
|
1038
|
+
uses_api: component.uses_api || component.api || null,
|
|
1039
|
+
uses_database: component.uses_database || component.database || null
|
|
1040
1040
|
};
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
@@ -1052,10 +1052,10 @@ function summarizeProjectTopology(config) {
|
|
|
1052
1052
|
ownership: output?.ownership || null
|
|
1053
1053
|
}))
|
|
1054
1054
|
.sort((left, right) => left.name.localeCompare(right.name));
|
|
1055
|
-
const
|
|
1055
|
+
const runtimes = (config?.topology?.runtimes || config?.topology?.components || [])
|
|
1056
1056
|
.map((component) => ({
|
|
1057
1057
|
id: component.id,
|
|
1058
|
-
|
|
1058
|
+
kind: component.kind || component.type,
|
|
1059
1059
|
projection: component.projection,
|
|
1060
1060
|
generator: {
|
|
1061
1061
|
id: component.generator?.id || null,
|
|
@@ -1065,19 +1065,19 @@ function summarizeProjectTopology(config) {
|
|
|
1065
1065
|
references: topologyComponentReferences(component)
|
|
1066
1066
|
}))
|
|
1067
1067
|
.sort((left, right) => left.id.localeCompare(right.id));
|
|
1068
|
-
const edges =
|
|
1068
|
+
const edges = runtimes.flatMap((component) => {
|
|
1069
1069
|
const references = [];
|
|
1070
|
-
if (component.references.
|
|
1070
|
+
if (component.references.uses_api) {
|
|
1071
1071
|
references.push({
|
|
1072
1072
|
from: component.id,
|
|
1073
|
-
to: component.references.
|
|
1073
|
+
to: component.references.uses_api,
|
|
1074
1074
|
type: "calls_api"
|
|
1075
1075
|
});
|
|
1076
1076
|
}
|
|
1077
|
-
if (component.references.
|
|
1077
|
+
if (component.references.uses_database) {
|
|
1078
1078
|
references.push({
|
|
1079
1079
|
from: component.id,
|
|
1080
|
-
to: component.references.
|
|
1080
|
+
to: component.references.uses_database,
|
|
1081
1081
|
type: "uses_database"
|
|
1082
1082
|
});
|
|
1083
1083
|
}
|
|
@@ -1085,11 +1085,21 @@ function summarizeProjectTopology(config) {
|
|
|
1085
1085
|
}).sort((left, right) => `${left.from}:${left.type}:${left.to}`.localeCompare(`${right.from}:${right.type}:${right.to}`));
|
|
1086
1086
|
return {
|
|
1087
1087
|
outputs,
|
|
1088
|
-
|
|
1088
|
+
runtimes,
|
|
1089
1089
|
edges
|
|
1090
1090
|
};
|
|
1091
1091
|
}
|
|
1092
1092
|
|
|
1093
|
+
function publicProjectTopology(topology) {
|
|
1094
|
+
if (!topology || typeof topology !== "object") {
|
|
1095
|
+
return topology || null;
|
|
1096
|
+
}
|
|
1097
|
+
return {
|
|
1098
|
+
...Object.fromEntries(Object.entries(topology).filter(([key]) => !["components", "__normalizedRuntimeAliases"].includes(key))),
|
|
1099
|
+
runtimes: topology.runtimes || []
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1093
1103
|
function formatTopologyComponent(component) {
|
|
1094
1104
|
const generator = component.generator.id
|
|
1095
1105
|
? `${component.generator.id}${component.generator.version ? `@${component.generator.version}` : ""}`
|
|
@@ -1099,7 +1109,7 @@ function formatTopologyComponent(component) {
|
|
|
1099
1109
|
.filter(([, value]) => Boolean(value))
|
|
1100
1110
|
.map(([key, value]) => `${key} ${value}`);
|
|
1101
1111
|
const suffix = refs.length ? ` -> ${refs.join(", ")}` : "";
|
|
1102
|
-
return ` - ${component.id}: ${component.
|
|
1112
|
+
return ` - ${component.id}: ${component.kind} ${component.projection} via ${generator} (${port})${suffix}`;
|
|
1103
1113
|
}
|
|
1104
1114
|
|
|
1105
1115
|
function printTopologySummary(topology) {
|
|
@@ -1110,9 +1120,9 @@ function printTopologySummary(topology) {
|
|
|
1110
1120
|
console.log(` - ${output.name}: ${output.path || "unset"} (${output.ownership || "unknown"})`);
|
|
1111
1121
|
}
|
|
1112
1122
|
}
|
|
1113
|
-
if (topology.
|
|
1114
|
-
console.log("
|
|
1115
|
-
for (const component of topology.
|
|
1123
|
+
if (topology.runtimes.length > 0) {
|
|
1124
|
+
console.log(" Runtimes:");
|
|
1125
|
+
for (const component of topology.runtimes) {
|
|
1116
1126
|
console.log(formatTopologyComponent(component));
|
|
1117
1127
|
}
|
|
1118
1128
|
}
|
|
@@ -1144,7 +1154,7 @@ function checkSummaryPayload({ inputPath, ast, resolved, projectConfigInfo, proj
|
|
|
1144
1154
|
configPath: projectInfo.configPath,
|
|
1145
1155
|
compatibility: Boolean(projectInfo.compatibility),
|
|
1146
1156
|
valid: projectValidation.ok,
|
|
1147
|
-
topology: projectInfo.config.topology,
|
|
1157
|
+
topology: publicProjectTopology(projectInfo.config.topology),
|
|
1148
1158
|
resolvedTopology
|
|
1149
1159
|
},
|
|
1150
1160
|
errors: [
|
|
@@ -1162,23 +1172,23 @@ function checkSummaryPayload({ inputPath, ast, resolved, projectConfigInfo, proj
|
|
|
1162
1172
|
};
|
|
1163
1173
|
}
|
|
1164
1174
|
|
|
1165
|
-
function
|
|
1175
|
+
function printWidgetConformanceReport(report) {
|
|
1166
1176
|
const summary = report.summary || {};
|
|
1167
1177
|
const ok = (summary.errors || 0) === 0;
|
|
1168
|
-
console.log(ok ? "
|
|
1178
|
+
console.log(ok ? "Widget conformance passed." : "Widget conformance found issues.");
|
|
1169
1179
|
console.log(`Usages: ${summary.total_usages || 0} total, ${summary.passed_usages || 0} passed, ${summary.warning_usages || 0} warning, ${summary.error_usages || 0} error`);
|
|
1170
1180
|
console.log(`Checks: ${summary.errors || 0} error(s), ${summary.warnings || 0} warning(s)`);
|
|
1171
1181
|
if (report.filters?.projection) {
|
|
1172
1182
|
console.log(`Projection filter: ${report.filters.projection}`);
|
|
1173
1183
|
}
|
|
1174
|
-
if (report.filters?.
|
|
1175
|
-
console.log(`
|
|
1184
|
+
if (report.filters?.widget) {
|
|
1185
|
+
console.log(`Widget filter: ${report.filters.widget}`);
|
|
1176
1186
|
}
|
|
1177
1187
|
if ((summary.affected_projections || []).length > 0) {
|
|
1178
1188
|
console.log(`Affected projections: ${summary.affected_projections.join(", ")}`);
|
|
1179
1189
|
}
|
|
1180
|
-
if ((summary.
|
|
1181
|
-
console.log(`Affected
|
|
1190
|
+
if ((summary.affected_widgets || []).length > 0) {
|
|
1191
|
+
console.log(`Affected widgets: ${summary.affected_widgets.join(", ")}`);
|
|
1182
1192
|
}
|
|
1183
1193
|
if ((report.checks || []).length > 0) {
|
|
1184
1194
|
console.log("");
|
|
@@ -1186,7 +1196,7 @@ function printComponentConformanceReport(report) {
|
|
|
1186
1196
|
for (const check of report.checks) {
|
|
1187
1197
|
const context = [
|
|
1188
1198
|
check.projection ? `projection ${check.projection}` : null,
|
|
1189
|
-
check.
|
|
1199
|
+
check.widget ? `widget ${check.widget}` : null,
|
|
1190
1200
|
check.screen ? `screen ${check.screen}` : null,
|
|
1191
1201
|
check.region ? `region ${check.region}` : null,
|
|
1192
1202
|
check.prop ? `prop ${check.prop}` : null,
|
|
@@ -1209,23 +1219,23 @@ function printComponentConformanceReport(report) {
|
|
|
1209
1219
|
}
|
|
1210
1220
|
}
|
|
1211
1221
|
|
|
1212
|
-
function
|
|
1222
|
+
function printWidgetBehaviorReport(report) {
|
|
1213
1223
|
const summary = report.summary || {};
|
|
1214
1224
|
const ok = (summary.errors || 0) === 0;
|
|
1215
|
-
console.log(ok ? "
|
|
1225
|
+
console.log(ok ? "Widget behavior report passed." : "Widget behavior report found issues.");
|
|
1216
1226
|
console.log(`Behaviors: ${summary.total_behaviors || 0} total, ${summary.realized || 0} realized, ${summary.partial || 0} partial, ${summary.declared || 0} declared`);
|
|
1217
1227
|
console.log(`Checks: ${summary.errors || 0} error(s), ${summary.warnings || 0} warning(s)`);
|
|
1218
1228
|
if (report.filters?.projection) {
|
|
1219
1229
|
console.log(`Projection filter: ${report.filters.projection}`);
|
|
1220
1230
|
}
|
|
1221
|
-
if (report.filters?.
|
|
1222
|
-
console.log(`
|
|
1231
|
+
if (report.filters?.widget) {
|
|
1232
|
+
console.log(`Widget filter: ${report.filters.widget}`);
|
|
1223
1233
|
}
|
|
1224
1234
|
if ((summary.affected_projections || []).length > 0) {
|
|
1225
1235
|
console.log(`Affected projections: ${summary.affected_projections.join(", ")}`);
|
|
1226
1236
|
}
|
|
1227
|
-
if ((summary.
|
|
1228
|
-
console.log(`Affected
|
|
1237
|
+
if ((summary.affected_widgets || []).length > 0) {
|
|
1238
|
+
console.log(`Affected widgets: ${summary.affected_widgets.join(", ")}`);
|
|
1229
1239
|
}
|
|
1230
1240
|
if ((summary.affected_capabilities || []).length > 0) {
|
|
1231
1241
|
console.log(`Affected capabilities: ${summary.affected_capabilities.join(", ")}`);
|
|
@@ -1237,7 +1247,7 @@ function printComponentBehaviorReport(report) {
|
|
|
1237
1247
|
for (const highlight of highlights) {
|
|
1238
1248
|
const context = [
|
|
1239
1249
|
highlight.projection ? `projection ${highlight.projection}` : null,
|
|
1240
|
-
highlight.
|
|
1250
|
+
highlight.widget ? `widget ${highlight.widget}` : null,
|
|
1241
1251
|
highlight.screen ? `screen ${highlight.screen}` : null,
|
|
1242
1252
|
highlight.region ? `region ${highlight.region}` : null,
|
|
1243
1253
|
highlight.event ? `event ${highlight.event}` : null,
|
|
@@ -1252,7 +1262,7 @@ function printComponentBehaviorReport(report) {
|
|
|
1252
1262
|
}
|
|
1253
1263
|
const groupSummary = report.groups || {};
|
|
1254
1264
|
console.log("");
|
|
1255
|
-
console.log(`Groups: ${(groupSummary.
|
|
1265
|
+
console.log(`Groups: ${(groupSummary.widgets || []).length} widget(s), ${(groupSummary.screens || []).length} screen(s), ${(groupSummary.capabilities || []).length} capability group(s), ${(groupSummary.effects || []).length} effect group(s)`);
|
|
1256
1266
|
}
|
|
1257
1267
|
|
|
1258
1268
|
function printGeneratorCheck(payload) {
|
|
@@ -1268,7 +1278,7 @@ function printGeneratorCheck(payload) {
|
|
|
1268
1278
|
if (payload.manifest) {
|
|
1269
1279
|
console.log(`Generator: ${payload.manifest.id}@${payload.manifest.version}`);
|
|
1270
1280
|
console.log(`Surface: ${payload.manifest.surface}`);
|
|
1271
|
-
console.log(`Projection
|
|
1281
|
+
console.log(`Projection types: ${payload.manifest.projectionTypes.join(", ")}`);
|
|
1272
1282
|
console.log(`Source mode: ${payload.manifest.source}`);
|
|
1273
1283
|
}
|
|
1274
1284
|
console.log("Executes package code: yes (loads adapter and runs smoke generate)");
|
|
@@ -1301,7 +1311,7 @@ function generatorManifestSummary(manifest, metadata = {}) {
|
|
|
1301
1311
|
id: manifest.id,
|
|
1302
1312
|
version: manifest.version,
|
|
1303
1313
|
surface: manifest.surface,
|
|
1304
|
-
|
|
1314
|
+
projectionTypes: manifest.projectionTypes || [],
|
|
1305
1315
|
inputs: manifest.inputs || [],
|
|
1306
1316
|
outputs: manifest.outputs || [],
|
|
1307
1317
|
stack: manifest.stack || {},
|
|
@@ -1325,12 +1335,12 @@ function generatorManifestSummary(manifest, metadata = {}) {
|
|
|
1325
1335
|
* @param {string[]} platforms
|
|
1326
1336
|
* @returns {string}
|
|
1327
1337
|
*/
|
|
1328
|
-
function exampleProjectionId(surface,
|
|
1329
|
-
const
|
|
1338
|
+
function exampleProjectionId(surface, projectionTypes = []) {
|
|
1339
|
+
const projectionType = projectionTypes[0] || "";
|
|
1330
1340
|
if (surface === "api") return "proj_api";
|
|
1331
|
-
if (surface === "database") return
|
|
1332
|
-
if (surface === "native") return
|
|
1333
|
-
return "
|
|
1341
|
+
if (surface === "database") return projectionType === "db_contract" ? "proj_db" : "proj_db";
|
|
1342
|
+
if (surface === "native") return projectionType === "android_surface" ? "proj_android_surface" : "proj_ios_surface";
|
|
1343
|
+
return "proj_web_surface";
|
|
1334
1344
|
}
|
|
1335
1345
|
|
|
1336
1346
|
/**
|
|
@@ -1338,7 +1348,7 @@ function exampleProjectionId(surface, platforms = []) {
|
|
|
1338
1348
|
* @returns {Record<string, any>}
|
|
1339
1349
|
*/
|
|
1340
1350
|
function exampleTopologyBinding(manifest) {
|
|
1341
|
-
const
|
|
1351
|
+
const runtimeId = manifest.surface === "api"
|
|
1342
1352
|
? "app_api"
|
|
1343
1353
|
: manifest.surface === "database"
|
|
1344
1354
|
? "app_db"
|
|
@@ -1346,9 +1356,9 @@ function exampleTopologyBinding(manifest) {
|
|
|
1346
1356
|
? "app_ios"
|
|
1347
1357
|
: "app_web";
|
|
1348
1358
|
return {
|
|
1349
|
-
id:
|
|
1350
|
-
|
|
1351
|
-
projection: exampleProjectionId(manifest.surface, manifest.
|
|
1359
|
+
id: runtimeId,
|
|
1360
|
+
kind: manifest.runtimeKinds?.[0] || manifest.surface,
|
|
1361
|
+
projection: exampleProjectionId(manifest.surface, manifest.projectionTypes),
|
|
1352
1362
|
generator: {
|
|
1353
1363
|
id: manifest.id,
|
|
1354
1364
|
version: manifest.version,
|
|
@@ -1410,7 +1420,7 @@ function buildGeneratorListPayload(cwd) {
|
|
|
1410
1420
|
id: null,
|
|
1411
1421
|
version: null,
|
|
1412
1422
|
surface: null,
|
|
1413
|
-
|
|
1423
|
+
projectionTypes: [],
|
|
1414
1424
|
inputs: [],
|
|
1415
1425
|
outputs: [],
|
|
1416
1426
|
stack: {},
|
|
@@ -1516,7 +1526,7 @@ function printGeneratorList(payload) {
|
|
|
1516
1526
|
: generator.source === "package"
|
|
1517
1527
|
? (generator.installed ? "package installed" : "package missing")
|
|
1518
1528
|
: "bundled";
|
|
1519
|
-
const platforms = generator.
|
|
1529
|
+
const platforms = generator.projectionTypes.join(", ") || "none";
|
|
1520
1530
|
const stack = Object.values(generator.stack || {}).join(" + ") || "not declared";
|
|
1521
1531
|
console.log(`- ${id}${generator.version ? `@${generator.version}` : ""} (${generator.surface || "unknown"}, ${status})`);
|
|
1522
1532
|
console.log(` Source: ${generator.source}`);
|
|
@@ -1569,7 +1579,7 @@ function printGeneratorShow(payload) {
|
|
|
1569
1579
|
if (generator.manifestPath) {
|
|
1570
1580
|
console.log(`Manifest: ${generator.manifestPath}`);
|
|
1571
1581
|
}
|
|
1572
|
-
console.log(`Projection
|
|
1582
|
+
console.log(`Projection types: ${generator.projectionTypes.join(", ") || "none"}`);
|
|
1573
1583
|
console.log(`Inputs: ${generator.inputs.join(", ") || "none"}`);
|
|
1574
1584
|
console.log(`Outputs: ${generator.outputs.join(", ") || "none"}`);
|
|
1575
1585
|
console.log(`Stack: ${Object.entries(generator.stack || {}).map(([key, value]) => `${key}=${value}`).join(", ") || "not declared"}`);
|
|
@@ -5473,7 +5483,7 @@ function importedProjectConfig() {
|
|
|
5473
5483
|
}
|
|
5474
5484
|
},
|
|
5475
5485
|
topology: {
|
|
5476
|
-
|
|
5486
|
+
runtimes: []
|
|
5477
5487
|
}
|
|
5478
5488
|
};
|
|
5479
5489
|
}
|
|
@@ -6231,7 +6241,7 @@ const BROWNFIELD_BROAD_ADOPT_SELECTORS = [
|
|
|
6231
6241
|
{ selector: "shapes", kind: "kind", label: "shapes", matches: (item) => item.kind === "shape" },
|
|
6232
6242
|
{ selector: "entities", kind: "kind", label: "entities", matches: (item) => item.kind === "entity" },
|
|
6233
6243
|
{ selector: "capabilities", kind: "kind", label: "capabilities", matches: (item) => item.kind === "capability" },
|
|
6234
|
-
{ selector: "
|
|
6244
|
+
{ selector: "widgets", kind: "kind", label: "widgets", matches: (item) => item.kind === "widget" },
|
|
6235
6245
|
{ selector: "docs", kind: "track", label: "docs", matches: (item) => item.track === "docs" },
|
|
6236
6246
|
{
|
|
6237
6247
|
selector: "journeys",
|
|
@@ -6241,7 +6251,7 @@ const BROWNFIELD_BROAD_ADOPT_SELECTORS = [
|
|
|
6241
6251
|
},
|
|
6242
6252
|
{ selector: "workflows", kind: "track", label: "workflows", matches: (item) => item.track === "workflows" || item.kind === "decision" },
|
|
6243
6253
|
{ selector: "verification", kind: "kind", label: "verification", matches: (item) => item.kind === "verification" },
|
|
6244
|
-
{ selector: "ui", kind: "track", label: "UI reports and
|
|
6254
|
+
{ selector: "ui", kind: "track", label: "UI reports and widgets", matches: (item) => item.track === "ui" }
|
|
6245
6255
|
];
|
|
6246
6256
|
|
|
6247
6257
|
function readImportAdoptionArtifacts(inputPath) {
|
|
@@ -7362,7 +7372,7 @@ function diagnosticForTemplateCreateFailure(message, templateSpec, step) {
|
|
|
7362
7372
|
code: "template_project_config_missing",
|
|
7363
7373
|
message,
|
|
7364
7374
|
path: localTemplatePath(templateSpec, "topogram.project.json"),
|
|
7365
|
-
suggestedFix: "Add topogram.project.json beside topogram/ with outputs and topology.
|
|
7375
|
+
suggestedFix: "Add topogram.project.json beside topogram/ with outputs and topology.runtimes.",
|
|
7366
7376
|
step
|
|
7367
7377
|
});
|
|
7368
7378
|
}
|
|
@@ -8220,6 +8230,29 @@ if (args[0] === "setup") {
|
|
|
8220
8230
|
process.exit(args[1] ? 1 : 0);
|
|
8221
8231
|
}
|
|
8222
8232
|
|
|
8233
|
+
const RENAMED_CLI_ARGS = new Map([
|
|
8234
|
+
["--component", "--widget"]
|
|
8235
|
+
]);
|
|
8236
|
+
const RENAMED_GENERATE_TARGETS = new Map([
|
|
8237
|
+
["ui-component-contract", "ui-widget-contract"],
|
|
8238
|
+
["component-conformance-report", "widget-conformance-report"],
|
|
8239
|
+
["component-behavior-report", "widget-behavior-report"],
|
|
8240
|
+
["ui-web-contract", "ui-surface-contract"],
|
|
8241
|
+
["ui-web-debug", "ui-surface-debug"]
|
|
8242
|
+
]);
|
|
8243
|
+
|
|
8244
|
+
if (args[0] === "component") {
|
|
8245
|
+
console.error("Command 'topogram component' was renamed to 'topogram widget'.");
|
|
8246
|
+
process.exit(1);
|
|
8247
|
+
}
|
|
8248
|
+
|
|
8249
|
+
for (const [oldArg, newArg] of RENAMED_CLI_ARGS) {
|
|
8250
|
+
if (args.includes(oldArg)) {
|
|
8251
|
+
console.error(`CLI flag '${oldArg}' was renamed to '${newArg}'.`);
|
|
8252
|
+
process.exit(1);
|
|
8253
|
+
}
|
|
8254
|
+
}
|
|
8255
|
+
|
|
8223
8256
|
function commandPath(index, fallback = "./topogram") {
|
|
8224
8257
|
const value = args[index];
|
|
8225
8258
|
return value && !value.startsWith("-") ? value : fallback;
|
|
@@ -8268,12 +8301,12 @@ if (args[0] === "version" || args[0] === "--version") {
|
|
|
8268
8301
|
: { newProject: true, inputPath: args[1] };
|
|
8269
8302
|
} else if (args[0] === "check") {
|
|
8270
8303
|
commandArgs = { check: true, inputPath: commandPath(1) };
|
|
8271
|
-
} else if (args[0] === "
|
|
8304
|
+
} else if (args[0] === "widget" && args[1] === "check") {
|
|
8272
8305
|
commandArgs = { componentCheck: true, inputPath: commandPath(2) };
|
|
8273
|
-
} else if (args[0] === "
|
|
8306
|
+
} else if (args[0] === "widget" && args[1] === "behavior") {
|
|
8274
8307
|
commandArgs = { componentBehavior: true, inputPath: commandPath(2) };
|
|
8275
|
-
} else if (args[0] === "
|
|
8276
|
-
|
|
8308
|
+
} else if (args[0] === "widget") {
|
|
8309
|
+
printWidgetHelp();
|
|
8277
8310
|
process.exit(args[1] ? 1 : 0);
|
|
8278
8311
|
} else if (args[0] === "generator" && args[1] === "list") {
|
|
8279
8312
|
commandArgs = { generatorList: true, inputPath: null };
|
|
@@ -8409,8 +8442,8 @@ if (args[0] === "version" || args[0] === "--version") {
|
|
|
8409
8442
|
commandArgs = { queryName: "write-scope", inputPath: args[2] };
|
|
8410
8443
|
} else if (args[0] === "query" && args[1] === "verification-targets") {
|
|
8411
8444
|
commandArgs = { queryName: "verification-targets", inputPath: args[2] };
|
|
8412
|
-
} else if (args[0] === "query" && args[1] === "
|
|
8413
|
-
commandArgs = { queryName: "
|
|
8445
|
+
} else if (args[0] === "query" && args[1] === "widget-behavior") {
|
|
8446
|
+
commandArgs = { queryName: "widget-behavior", inputPath: commandPath(2) };
|
|
8414
8447
|
} else if (args[0] === "query" && args[1] === "change-plan") {
|
|
8415
8448
|
commandArgs = { queryName: "change-plan", inputPath: args[2] };
|
|
8416
8449
|
} else if (args[0] === "query" && args[1] === "import-plan") {
|
|
@@ -8539,6 +8572,10 @@ const shouldValidate = Boolean(commandArgs?.validate) || args.includes("--valida
|
|
|
8539
8572
|
const shouldResolve = args.includes("--resolve");
|
|
8540
8573
|
const generateIndex = args.indexOf("--generate");
|
|
8541
8574
|
const generateTarget = commandArgs?.generateTarget || (generateIndex >= 0 ? args[generateIndex + 1] : null);
|
|
8575
|
+
if (RENAMED_GENERATE_TARGETS.has(generateTarget)) {
|
|
8576
|
+
console.error(`Generator target '${generateTarget}' was renamed to '${RENAMED_GENERATE_TARGETS.get(generateTarget)}'.`);
|
|
8577
|
+
process.exit(1);
|
|
8578
|
+
}
|
|
8542
8579
|
const workflowIndex = args.indexOf("--workflow");
|
|
8543
8580
|
const workflowFlagValue = workflowIndex >= 0 ? args[workflowIndex + 1] : null;
|
|
8544
8581
|
const modeIndex = args.indexOf("--mode");
|
|
@@ -8553,7 +8590,7 @@ const shapeIndex = args.indexOf("--shape");
|
|
|
8553
8590
|
const shapeId = shapeIndex >= 0 ? args[shapeIndex + 1] : null;
|
|
8554
8591
|
const capabilityIndex = args.indexOf("--capability");
|
|
8555
8592
|
const capabilityId = capabilityIndex >= 0 ? args[capabilityIndex + 1] : null;
|
|
8556
|
-
const componentIndex = args.indexOf("--
|
|
8593
|
+
const componentIndex = args.indexOf("--widget");
|
|
8557
8594
|
const componentId = componentIndex >= 0 ? args[componentIndex + 1] : null;
|
|
8558
8595
|
const projectionIndex = args.indexOf("--projection");
|
|
8559
8596
|
const projectionId = projectionIndex >= 0 ? args[projectionIndex + 1] : null;
|
|
@@ -8782,8 +8819,9 @@ try {
|
|
|
8782
8819
|
if (shouldComponentCheck) {
|
|
8783
8820
|
const ast = parsePath(inputPath);
|
|
8784
8821
|
const result = generateWorkspace(ast, {
|
|
8785
|
-
target: "
|
|
8822
|
+
target: "widget-conformance-report",
|
|
8786
8823
|
projectionId,
|
|
8824
|
+
widgetId: componentId,
|
|
8787
8825
|
componentId
|
|
8788
8826
|
});
|
|
8789
8827
|
if (!result.ok) {
|
|
@@ -8795,7 +8833,7 @@ try {
|
|
|
8795
8833
|
if (emitJson) {
|
|
8796
8834
|
console.log(stableStringify(report));
|
|
8797
8835
|
} else {
|
|
8798
|
-
|
|
8836
|
+
printWidgetConformanceReport(report);
|
|
8799
8837
|
}
|
|
8800
8838
|
process.exit(ok ? 0 : 1);
|
|
8801
8839
|
}
|
|
@@ -8803,8 +8841,9 @@ try {
|
|
|
8803
8841
|
if (shouldComponentBehavior) {
|
|
8804
8842
|
const ast = parsePath(inputPath);
|
|
8805
8843
|
const result = generateWorkspace(ast, {
|
|
8806
|
-
target: "
|
|
8844
|
+
target: "widget-behavior-report",
|
|
8807
8845
|
projectionId,
|
|
8846
|
+
widgetId: componentId,
|
|
8808
8847
|
componentId
|
|
8809
8848
|
});
|
|
8810
8849
|
if (!result.ok) {
|
|
@@ -8816,7 +8855,7 @@ try {
|
|
|
8816
8855
|
if (emitJson) {
|
|
8817
8856
|
console.log(stableStringify(report));
|
|
8818
8857
|
} else {
|
|
8819
|
-
|
|
8858
|
+
printWidgetBehaviorReport(report);
|
|
8820
8859
|
}
|
|
8821
8860
|
process.exit(ok ? 0 : 1);
|
|
8822
8861
|
}
|
|
@@ -9706,6 +9745,7 @@ try {
|
|
|
9706
9745
|
capabilityId,
|
|
9707
9746
|
workflowId,
|
|
9708
9747
|
projectionId,
|
|
9748
|
+
widgetId: componentId,
|
|
9709
9749
|
componentId,
|
|
9710
9750
|
entityId,
|
|
9711
9751
|
journeyId,
|
|
@@ -9739,6 +9779,7 @@ try {
|
|
|
9739
9779
|
capabilityId,
|
|
9740
9780
|
workflowId,
|
|
9741
9781
|
projectionId,
|
|
9782
|
+
widgetId: componentId,
|
|
9742
9783
|
componentId,
|
|
9743
9784
|
entityId,
|
|
9744
9785
|
journeyId,
|
|
@@ -9787,6 +9828,7 @@ try {
|
|
|
9787
9828
|
capabilityId,
|
|
9788
9829
|
workflowId,
|
|
9789
9830
|
projectionId,
|
|
9831
|
+
widgetId: componentId,
|
|
9790
9832
|
componentId,
|
|
9791
9833
|
entityId,
|
|
9792
9834
|
journeyId,
|
|
@@ -9820,6 +9862,7 @@ try {
|
|
|
9820
9862
|
capabilityId,
|
|
9821
9863
|
workflowId,
|
|
9822
9864
|
projectionId,
|
|
9865
|
+
widgetId: componentId,
|
|
9823
9866
|
componentId,
|
|
9824
9867
|
entityId,
|
|
9825
9868
|
journeyId,
|
|
@@ -9879,6 +9922,7 @@ try {
|
|
|
9879
9922
|
capabilityId,
|
|
9880
9923
|
workflowId,
|
|
9881
9924
|
projectionId,
|
|
9925
|
+
widgetId: componentId,
|
|
9882
9926
|
componentId,
|
|
9883
9927
|
entityId,
|
|
9884
9928
|
journeyId,
|
|
@@ -9899,10 +9943,10 @@ try {
|
|
|
9899
9943
|
process.exit(0);
|
|
9900
9944
|
}
|
|
9901
9945
|
|
|
9902
|
-
if (commandArgs?.queryName === "
|
|
9946
|
+
if (commandArgs?.queryName === "widget-behavior") {
|
|
9903
9947
|
const ast = parsePath(normalizeTopogramPath(inputPath));
|
|
9904
9948
|
const result = generateWorkspace(ast, {
|
|
9905
|
-
target: "
|
|
9949
|
+
target: "widget-behavior-report",
|
|
9906
9950
|
projectionId,
|
|
9907
9951
|
componentId
|
|
9908
9952
|
});
|
|
@@ -11293,6 +11337,7 @@ try {
|
|
|
11293
11337
|
capabilityId,
|
|
11294
11338
|
workflowId,
|
|
11295
11339
|
projectionId,
|
|
11340
|
+
widgetId: componentId,
|
|
11296
11341
|
componentId,
|
|
11297
11342
|
entityId,
|
|
11298
11343
|
journeyId,
|