@givolt/i3-composer-agent 3.2.1 → 4.0.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/.agents/plugins/marketplace.json +1 -1
- package/.claude/commands/i3-build.md +1 -0
- package/.claude/commands/i3-code-simplify.md +1 -0
- package/.claude/commands/i3-constraints.md +1 -0
- package/.claude/commands/i3-plan.md +1 -0
- package/.claude/commands/i3-review.md +1 -0
- package/.claude/commands/i3-ship.md +1 -0
- package/.claude/commands/i3-spec.md +1 -0
- package/.claude/commands/i3-test.md +1 -0
- package/.claude/commands/i3-webperf.md +1 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/README.md +31 -25
- package/bin/i3-composer-agent.cjs +4 -59
- package/bin/install.cjs +6 -14
- package/bin/native-layout.cjs +11 -2
- package/bin/native-migration.cjs +68 -28
- package/bin/retired-custom-fingerprints.json +1597 -0
- package/bin/wizard.cjs +2 -13
- package/docs/antigravity-setup.md +3 -1
- package/docs/codebuddy-setup.md +19 -76
- package/docs/codex-setup.md +10 -4
- package/docs/comparison.md +1 -1
- package/docs/copilot-cli-setup.md +4 -4
- package/docs/cursor-setup.md +1 -1
- package/docs/gemini-cli-setup.md +1 -1
- package/docs/other-hosts.md +2 -2
- package/docs/windsurf-setup.md +2 -2
- package/docs/workbuddy-setup.md +9 -16
- package/evals/README.md +10 -0
- package/evals/cases/i3-code-simplification.json +8 -0
- package/evals/cases/i3-documentation-and-adrs.json +4 -0
- package/evals/cases/i3-enterprise-sop.json +1 -1
- package/evals/cases/i3-frontend-ui-engineering.json +1 -1
- package/evals/cases/i3-security-and-hardening.json +4 -0
- package/evals/cases/i3-ui-demo.json +2 -2
- package/evals/cases/i3-using-agent-skills.json +5 -5
- package/evals/plugin/simplify-fires-on-pasted-function/graders/behavior-kept-and-explained.md +7 -0
- package/evals/plugin/simplify-fires-on-pasted-function/graders/skill-fired.md +5 -0
- package/evals/plugin/simplify-fires-on-pasted-function/prompt.md +30 -0
- package/evals/plugin/simplify-stays-quiet-on-make-it-fast/graders/not-fired.md +8 -0
- package/evals/plugin/simplify-stays-quiet-on-make-it-fast/prompt.md +20 -0
- package/evals/zh-CN/cases/i3-code-simplification.json +8 -0
- package/evals/zh-CN/cases/i3-documentation-and-adrs.json +4 -0
- package/evals/zh-CN/cases/i3-enterprise-sop.json +1 -1
- package/evals/zh-CN/cases/i3-frontend-ui-engineering.json +2 -2
- package/evals/zh-CN/cases/i3-security-and-hardening.json +4 -0
- package/evals/zh-CN/cases/i3-ui-demo.json +2 -2
- package/evals/zh-CN/cases/i3-using-agent-skills.json +6 -6
- package/hooks/SDD-CACHE.md +1 -1
- package/package.json +13 -80
- package/plugin.json +15 -2
- package/references/accessibility-checklist.md +4 -4
- package/references/performance-checklist.md +5 -4
- package/references/testing-patterns.md +2 -1
- package/scripts/floor-guard-reference-test.js +32 -0
- package/scripts/lib/execution-status.js +44 -0
- package/scripts/run-evals-test.js +157 -7
- package/scripts/run-evals.js +59 -12
- package/scripts/ui-demo-test.js +2 -2
- package/scripts/validate-artifact-paths-test.js +14 -0
- package/scripts/validate-artifact-paths.js +4 -2
- package/skills/i3-api-and-interface-design/SKILL.md +3 -1
- package/skills/i3-ci-cd-and-automation/SKILL.md +7 -4
- package/skills/i3-code-simplification/SKILL.md +3 -3
- package/skills/i3-constraint-driven-development/SKILL.md +4 -4
- package/skills/i3-constraint-driven-development/references/floor-guard.md +2 -2
- package/skills/i3-context-engineering/SKILL.md +1 -1
- package/skills/i3-debugging-and-error-recovery/SKILL.md +1 -1
- package/skills/i3-deprecation-and-migration/SKILL.md +6 -1
- package/skills/i3-documentation-and-adrs/SKILL.md +3 -2
- package/skills/i3-enterprise-sop/SKILL.md +37 -70
- package/skills/i3-enterprise-sop/references/engineering-skeleton/directory-standard.md +7 -7
- package/skills/i3-enterprise-sop/references/handoff.py +149 -120
- package/skills/i3-enterprise-sop/references/technical-baseline/baselines/enterprise-application-technical-baseline-v0-0-4.md +24 -24
- package/skills/i3-enterprise-sop/references/technical-baseline/templates/technical-baseline.md +8 -8
- package/skills/i3-enterprise-sop/references/templates/ad.md +31 -31
- package/skills/i3-enterprise-sop/references/templates/brd.md +6 -6
- package/skills/i3-enterprise-sop/references/templates/prd.md +37 -37
- package/skills/i3-enterprise-sop/references/templates/testcase.md +25 -25
- package/skills/i3-frontend-ui-engineering/SKILL.md +6 -10
- package/skills/i3-idea-refine/SKILL.md +4 -2
- package/skills/i3-incremental-implementation/SKILL.md +0 -4
- package/skills/i3-performance-optimization/SKILL.md +2 -2
- package/skills/i3-security-and-hardening/references/hardening-patterns.md +5 -0
- package/skills/i3-source-driven-development/SKILL.md +3 -2
- package/skills/i3-spec-driven-development/SKILL.md +1 -1
- package/skills/i3-ui-demo/SKILL.md +3 -1
- package/skills/i3-ui-demo/references/dependencies.md +1 -1
- package/skills/i3-ui-demo/references/resources.md +1 -1
- package/skills/i3-ui-demo/scripts/dependencies.cjs +0 -3
- package/skills/i3-using-agent-skills/SKILL.md +2 -2
- package/.claude/commands/i3-prototype.md +0 -23
- package/.gemini/commands/i3-prototype.toml +0 -23
- package/commands/i3-prototype.toml +0 -23
- package/evals/cases/i3-ui-prototype.json +0 -158
- package/evals/fixtures/i3-ui-prototype/admin-list/assets/reference.css +0 -3
- package/evals/fixtures/i3-ui-prototype/admin-list/assets/reference.js +0 -8
- package/evals/fixtures/i3-ui-prototype/admin-list/capability-definition.json +0 -67
- package/evals/fixtures/i3-ui-prototype/admin-list/index.html +0 -89
- package/evals/fixtures/i3-ui-prototype/admin-list/readme.md +0 -52
- package/evals/fixtures/i3-ui-prototype/admin-list/template.json +0 -8
- package/evals/fixtures/i3-ui-prototype/business-brief.md +0 -7
- package/evals/zh-CN/cases/i3-ui-prototype.json +0 -165
- package/hooks/PROTOTYPE.md +0 -31
- package/hooks/codebuddy-upstream.cjs +0 -93
- package/hooks/i3-prototype.cjs +0 -7
- package/hooks/manage.cjs +0 -169
- package/scripts/design-provider-discovery-test.js +0 -190
- package/scripts/design-provider-test.js +0 -75
- package/scripts/enterprise-template-test.js +0 -205
- package/scripts/lib/prototype-fixture.cjs +0 -17
- package/scripts/prototype-cache-test.js +0 -55
- package/scripts/prototype-generation-entry-test.js +0 -6
- package/scripts/prototype-generation-evidence-test.js +0 -10
- package/scripts/prototype-generation-native-test.js +0 -78
- package/scripts/prototype-generation-test.js +0 -99
- package/scripts/prototype-inventory-test.js +0 -43
- package/scripts/prototype-locations-test.js +0 -79
- package/scripts/prototype-project-test.js +0 -183
- package/scripts/template-adapter-test.js +0 -155
- package/scripts/ui-prototype-binding-recovery-test.js +0 -84
- package/scripts/ui-prototype-buddy-lifecycle-test.js +0 -102
- package/scripts/ui-prototype-codebuddy-hook-test.js +0 -112
- package/scripts/ui-prototype-content-test.js +0 -123
- package/scripts/ui-prototype-dependencies-test.js +0 -226
- package/scripts/ui-prototype-devtools-test.js +0 -53
- package/scripts/ui-prototype-execution-evidence-test.js +0 -62
- package/scripts/ui-prototype-execution-gates-test.js +0 -91
- package/scripts/ui-prototype-execution-policy-test.js +0 -53
- package/scripts/ui-prototype-execution-runtime-test.js +0 -27
- package/scripts/ui-prototype-ide-source-test.js +0 -73
- package/scripts/ui-prototype-native-test.js +0 -526
- package/scripts/ui-prototype-recovery-test.js +0 -81
- package/scripts/ui-prototype-registration-test.js +0 -53
- package/scripts/ui-prototype-template-test.js +0 -261
- package/scripts/ui-prototype-test.js +0 -124
- package/scripts/ui-prototype-transcript-auto-test.js +0 -67
- package/skills/i3-ui-prototype/SKILL.md +0 -256
- package/skills/i3-ui-prototype/assets/capabilities/generation.json +0 -833
- package/skills/i3-ui-prototype/assets/capabilities/management.json +0 -294
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/acceptance.json +0 -51
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/component-map.json +0 -13
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/generation-component-map.json +0 -300
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/index.html +0 -11
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/package-lock.json +0 -2298
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/package.json +0 -22
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/public/prototype-config.json +0 -6
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/App.vue +0 -136
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/components/DeviceEditor.vue +0 -111
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/config.ts +0 -19
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/content.ts +0 -28
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/domain/devices.ts +0 -50
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/domain/theme.ts +0 -25
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/main.ts +0 -18
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/style.css +0 -50
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/src/useDevices.ts +0 -66
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/tests/devices.test.ts +0 -44
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/tests/theme.test.ts +0 -26
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/tsconfig.json +0 -15
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/legacy-starter/vite.config.ts +0 -4
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/profile.json +0 -174
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/readme.md +0 -61
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/index.html +0 -11
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/package-lock.json +0 -2298
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/package.json +0 -22
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/public/prototype-config.json +0 -21
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/App.vue +0 -62
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/PrototypeShell.vue +0 -59
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/config.ts +0 -23
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/domain/presentation.ts +0 -29
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/domain/theme.ts +0 -25
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/main.ts +0 -18
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/src/style.css +0 -26
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/tests/presentation.test.ts +0 -23
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/tests/theme.test.ts +0 -26
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/tsconfig.json +0 -15
- package/skills/i3-ui-prototype/assets/frameworks/vue-antdv-next/starter/vite.config.ts +0 -4
- package/skills/i3-ui-prototype/assets/hosts/codebuddy/profile.json +0 -17
- package/skills/i3-ui-prototype/assets/optional-skills/host-targets.json +0 -739
- package/skills/i3-ui-prototype/assets/optional-skills/sources.json +0 -27
- package/skills/i3-ui-prototype/assets/templates/catalog.js +0 -149
- package/skills/i3-ui-prototype/assets/templates/catalog.json +0 -149
- package/skills/i3-ui-prototype/assets/templates/classic-admin/manifest.json +0 -9
- package/skills/i3-ui-prototype/assets/templates/classic-admin/preset.json +0 -6
- package/skills/i3-ui-prototype/assets/templates/common/app/app.mjs +0 -89
- package/skills/i3-ui-prototype/assets/templates/common/app/config.json +0 -1
- package/skills/i3-ui-prototype/assets/templates/common/app/domain.mjs +0 -20
- package/skills/i3-ui-prototype/assets/templates/common/app/index.html +0 -17
- package/skills/i3-ui-prototype/assets/templates/common/app/serve.cjs +0 -16
- package/skills/i3-ui-prototype/assets/templates/common/app/styles.css +0 -670
- package/skills/i3-ui-prototype/assets/templates/common/app/tokens.css +0 -19
- package/skills/i3-ui-prototype/assets/templates/common/design-system/master.md +0 -20
- package/skills/i3-ui-prototype/assets/templates/common/gallery.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/common/mocks/applications.json +0 -5
- package/skills/i3-ui-prototype/assets/templates/common/requirements-map.json +0 -8
- package/skills/i3-ui-prototype/assets/templates/common/serve-gallery.cjs +0 -16
- package/skills/i3-ui-prototype/assets/templates/credits.md +0 -17
- package/skills/i3-ui-prototype/assets/templates/data-operations/manifest.json +0 -9
- package/skills/i3-ui-prototype/assets/templates/data-operations/preset.json +0 -6
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/capability-definition.json +0 -294
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/component-inventory.json +0 -707
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/design-system.md +0 -32
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/generation.json +0 -49
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/index.html +0 -534
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/manifest.json +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/offline-build.json +0 -265
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/offline.js +0 -8888
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/origin.json +0 -344
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/preset.json +0 -928
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/app.js +0 -22
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/empty.svg +0 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/reference-styles.json +0 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/result-403.svg +0 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets/result-404.svg +0 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/assets-manifest.json +0 -334
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/baseline.json +0 -173
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/conversion.md +0 -30
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/credits.md +0 -17
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/design-tokens.json +0 -881
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/index.html +0 -28
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/licenses/@qin-ui-antdv-next-pro.txt +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/licenses/ant-design-icons.txt +0 -22
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/licenses/antdv-next.txt +0 -21
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/package.json +0 -12
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/browser-routes.json +0 -298
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/coverage.json +0 -180
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/integrity.json +0 -13
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/keyboard.json +0 -11
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/responsive.json +0 -125
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/review.md +0 -51
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/rules.log +0 -150
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/flow-editor-html.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/flow-editor-original.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/intent-create-html.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/intent-create-original.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/models-html.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/models-original.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/workbench-html.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/screenshots/workbench-original.png +0 -0
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/selection.json +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/qa/visual-comparison.json +0 -342
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/readme.md +0 -73
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/reference.md +0 -59
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/routes.json +0 -178
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/controls.js +0 -99
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/dialogs.js +0 -54
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/dom.js +0 -264
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/forms.js +0 -47
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/icons.js +0 -41
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/layout.js +0 -47
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/router.js +0 -63
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/state.js +0 -90
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/table.js +0 -41
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/runtime/widgets.js +0 -8
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentDetail.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentDetail.js +0 -36
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentEditor.js +0 -51
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentsPage.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/AgentsPage.js +0 -48
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/CheckResults.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/CheckResults.js +0 -6
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/ResourcePicker.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/ResourcePicker.js +0 -13
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/data.js +0 -24
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/domain.js +0 -32
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/registry.js +0 -25
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/agents/store.js +0 -85
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentClose.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentClose.js +0 -17
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentCreate.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentCreate.js +0 -66
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDecisions.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDecisions.js +0 -38
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDetail.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDetail.js +0 -66
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDocument.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentDocument.js +0 -5
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHeader.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHeader.js +0 -12
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHistory.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentHistory.js +0 -11
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentList.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentList.js +0 -116
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentReplan.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentReplan.js +0 -32
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentRevision.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentRevision.js +0 -49
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentSummary.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentSummary.js +0 -10
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentWorkspace.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/IntentWorkspace.js +0 -77
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/data.js +0 -60
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/domain.js +0 -105
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/intents/store.js +0 -212
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/AuditPanel.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/AuditPanel.js +0 -18
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelDetail.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelDetail.js +0 -23
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelEditor.js +0 -78
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelGrant.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelGrant.js +0 -55
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelReferences.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelReferences.js +0 -26
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelRelease.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelRelease.js +0 -38
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelStatus.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelStatus.js +0 -7
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTable.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTable.js +0 -72
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTester.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelTester.js +0 -46
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelsPage.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/ModelsPage.js +0 -52
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/RowActions.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/RowActions.js +0 -19
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/UsagePanel.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/UsagePanel.js +0 -30
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/data.js +0 -48
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/domain.js +0 -39
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/models/store.js +0 -129
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IncidentDetail.html +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IncidentDetail.js +0 -21
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IntentSource.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/IntentSource.js +0 -8
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationActionDialog.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationActionDialog.js +0 -37
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationEntry.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationEntry.js +0 -10
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationsPage.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/OperationsPage.js +0 -37
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RepairTrack.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RepairTrack.js +0 -49
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RunDetail.html +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/RunDetail.js +0 -22
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/SourceSummary.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/SourceSummary.js +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/commands.js +0 -82
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/examples.js +0 -47
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/model.js +0 -61
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/repair.js +0 -68
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/store.js +0 -55
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/types.js +0 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/operations/workbench.js +0 -18
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ManagementTable.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ManagementTable.js +0 -28
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcCreateEntry.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcCreateEntry.js +0 -18
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcDetail.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcDetail.js +0 -31
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcEditor.js +0 -27
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcLifecycle.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcLifecycle.js +0 -16
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPage.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPage.js +0 -43
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPicker.html +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcPicker.js +0 -34
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcProgress.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcProgress.js +0 -30
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWizard.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWizard.js +0 -67
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWorkspace.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcWorkspace.js +0 -41
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcsPage.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/PbcsPage.js +0 -31
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceEditor.js +0 -26
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceList.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/ServiceList.js +0 -70
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/data.js +0 -8
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/domain.js +0 -62
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/management.js +0 -36
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/managementStore.js +0 -49
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/pbc/store.js +0 -132
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/AdminList.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/AdminList.js +0 -38
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/EffectiveGrants.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/EffectiveGrants.js +0 -11
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/GrantEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/GrantEditor.js +0 -45
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MemberEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MemberEditor.js +0 -54
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MembersPage.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/MembersPage.js +0 -27
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RecordsPage.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RecordsPage.js +0 -12
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RoleEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RoleEditor.js +0 -45
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RolesPage.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/RolesPage.js +0 -38
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/domain.js +0 -61
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/state.js +0 -51
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/permissions/store.js +0 -116
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseActionDialog.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseActionDialog.js +0 -45
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseDetail.html +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseDetail.js +0 -30
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseEditor.js +0 -67
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseExecution.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleaseExecution.js +0 -5
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleasesPage.html +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/ReleasesPage.js +0 -60
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/commands.js +0 -157
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/model.js +0 -136
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/releases/store.js +0 -76
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewDetail.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewDetail.js +0 -26
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewEvidence.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewEvidence.js +0 -14
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewProcess.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewProcess.js +0 -113
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewsPage.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/ReviewsPage.js +0 -62
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/commands.js +0 -97
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/model.js +0 -147
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/reviews/store.js +0 -13
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ColumnSettings.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ColumnSettings.js +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListBatchBar.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListBatchBar.js +0 -8
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListDeleteDialog.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListDeleteDialog.js +0 -37
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListMore.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/ListMore.js +0 -8
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/RecordMetadata.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/RecordMetadata.js +0 -17
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/columns.js +0 -32
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/deliveryGuide.js +0 -49
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/deliveryView.js +0 -12
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/listBatch.js +0 -15
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/listSelection.js +0 -37
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/policy.js +0 -68
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shared/session.js +0 -44
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConfirmationDialog.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConfirmationDialog.js +0 -25
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConsoleShell.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ConsoleShell.js +0 -53
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/PrototypeGuide.html +0 -10
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/PrototypeGuide.js +0 -30
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ScopePage.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/ScopePage.js +0 -10
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/SessionDialog.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/SessionDialog.js +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/confirmation.js +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/shell/navigation.js +0 -19
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecDocument.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecDocument.js +0 -8
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecEdit.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecEdit.js +0 -32
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHeader.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHeader.js +0 -15
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHistory.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecHistory.js +0 -11
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecReview.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecReview.js +0 -57
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecWorkspace.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/SpecWorkspace.js +0 -37
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/data.js +0 -20
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/domain.js +0 -55
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/specs/store.js +0 -151
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/ArtifactDetail.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/ArtifactDetail.js +0 -18
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskCreate.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskCreate.js +0 -40
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskDetail.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskDetail.js +0 -51
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskLaunch.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TaskLaunch.js +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TasksPage.html +0 -5
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/TasksPage.js +0 -48
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/domain.js +0 -204
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/exampleSource.js +0 -22
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/registry.js +0 -135
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/tasks/store.js +0 -137
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/WorkbenchPage.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/WorkbenchPage.js +0 -36
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/model.js +0 -56
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workbench/store.js +0 -15
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowCanvas.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowCanvas.js +0 -27
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowDetail.html +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowDetail.js +0 -31
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowEditor.html +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/FlowEditor.js +0 -68
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/WorkflowsPage.html +0 -5
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/WorkflowsPage.js +0 -55
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/data.js +0 -16
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/domain.js +0 -83
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/registry.js +0 -18
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/src/workflows/store.js +0 -61
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/admin.css +0 -60
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/agents.css +0 -46
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/antdv.css +0 -295
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/app.css +0 -102
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/delivery.css +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/intents.css +0 -37
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/native.css +0 -22
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/operations.css +0 -2
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/pbc.css +0 -3
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/permissions.css +0 -22
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/pro.css +0 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/releases.css +0 -4
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/reset.css +0 -246
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/reviews.css +0 -8
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/tasks.css +0 -6
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/tokens.css +0 -15
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/workbench.css +0 -61
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/styles/workflows.css +0 -1
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/admin-rules.test.js +0 -96
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/agents.test.js +0 -14
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/intent-state.test.js +0 -37
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/list-batch.test.js +0 -44
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/operation-fixtures.js +0 -19
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/operation-repair.test.js +0 -14
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/operations.test.js +0 -25
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/pbc-management.test.js +0 -17
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/pbc-state.test.js +0 -24
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/permission-config.test.js +0 -23
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/permissions.test.js +0 -24
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/releases.test.js +0 -50
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/reviews.test.js +0 -36
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/runtime-forms-router.test.js +0 -28
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/runtime-state.test.js +0 -42
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/runtime-stores.test.js +0 -16
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/spec-state.test.js +0 -11
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/tasks.test.js +0 -27
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/workbench.test.js +0 -34
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tests/workflows.test.js +0 -16
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/convert.mjs +0 -168
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/serve.mjs +0 -7
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/styles.mjs +0 -11
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/reference/tools/verify.mjs +0 -24
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/serve.cjs +0 -16
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/template-inventory.json +0 -28791
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/template.json +0 -9
- package/skills/i3-ui-prototype/assets/templates/enterprise-admin/usability.css +0 -44
- package/skills/i3-ui-prototype/assets/templates/gallery/index.html +0 -40
- package/skills/i3-ui-prototype/assets/templates/generation-options.js +0 -42
- package/skills/i3-ui-prototype/assets/templates/index.html +0 -3
- package/skills/i3-ui-prototype/assets/templates/modern-workspace/manifest.json +0 -9
- package/skills/i3-ui-prototype/assets/templates/modern-workspace/preset.json +0 -6
- package/skills/i3-ui-prototype/assets/templates/presentation.html +0 -17
- package/skills/i3-ui-prototype/assets/templates/serve-gallery.cjs +0 -23
- package/skills/i3-ui-prototype/references/artifact-contract.md +0 -66
- package/skills/i3-ui-prototype/references/content-template.md +0 -81
- package/skills/i3-ui-prototype/references/enterprise-admin.md +0 -44
- package/skills/i3-ui-prototype/references/entry-contract.md +0 -71
- package/skills/i3-ui-prototype/references/execution-evidence.md +0 -51
- package/skills/i3-ui-prototype/references/expert-adapter.md +0 -76
- package/skills/i3-ui-prototype/references/framework-contract.md +0 -76
- package/skills/i3-ui-prototype/references/generation-contract.md +0 -122
- package/skills/i3-ui-prototype/references/interaction-acceptance.md +0 -169
- package/skills/i3-ui-prototype/references/legacy-native.md +0 -58
- package/skills/i3-ui-prototype/references/optional-skills.md +0 -63
- package/skills/i3-ui-prototype/references/project-layout.md +0 -92
- package/skills/i3-ui-prototype/references/template-adapters.md +0 -63
- package/skills/i3-ui-prototype/references/workflow-contract.md +0 -77
- package/skills/i3-ui-prototype/scripts/adapters/easel-html.cjs +0 -30
- package/skills/i3-ui-prototype/scripts/adapters/legacy-html.cjs +0 -28
- package/skills/i3-ui-prototype/scripts/browser-workspace.cjs +0 -72
- package/skills/i3-ui-prototype/scripts/buddy-host.cjs +0 -40
- package/skills/i3-ui-prototype/scripts/check-design-provider.cjs +0 -9
- package/skills/i3-ui-prototype/scripts/check-prototype.cjs +0 -14
- package/skills/i3-ui-prototype/scripts/codebuddy-context.cjs +0 -92
- package/skills/i3-ui-prototype/scripts/codebuddy-hook.cjs +0 -298
- package/skills/i3-ui-prototype/scripts/codebuddy-ide-source.cjs +0 -69
- package/skills/i3-ui-prototype/scripts/codebuddy-registration.cjs +0 -125
- package/skills/i3-ui-prototype/scripts/content-template.cjs +0 -98
- package/skills/i3-ui-prototype/scripts/design-provider-discovery.cjs +0 -128
- package/skills/i3-ui-prototype/scripts/enterprise-template.cjs +0 -104
- package/skills/i3-ui-prototype/scripts/execution-assertions.cjs +0 -43
- package/skills/i3-ui-prototype/scripts/execution-diagnostics.cjs +0 -91
- package/skills/i3-ui-prototype/scripts/execution-evidence.cjs +0 -177
- package/skills/i3-ui-prototype/scripts/execution-gates.cjs +0 -216
- package/skills/i3-ui-prototype/scripts/execution-policy.cjs +0 -62
- package/skills/i3-ui-prototype/scripts/execution-recovery.cjs +0 -58
- package/skills/i3-ui-prototype/scripts/execution-runtime.cjs +0 -69
- package/skills/i3-ui-prototype/scripts/generation-assets.cjs +0 -18
- package/skills/i3-ui-prototype/scripts/generation-contract.cjs +0 -214
- package/skills/i3-ui-prototype/scripts/generation-evidence.cjs +0 -50
- package/skills/i3-ui-prototype/scripts/generation-replan.cjs +0 -34
- package/skills/i3-ui-prototype/scripts/hosts/codebuddy.cjs +0 -21
- package/skills/i3-ui-prototype/scripts/init-prototype.cjs +0 -8
- package/skills/i3-ui-prototype/scripts/manage-baseline.cjs +0 -11
- package/skills/i3-ui-prototype/scripts/native-browser.cjs +0 -785
- package/skills/i3-ui-prototype/scripts/native-build.cjs +0 -91
- package/skills/i3-ui-prototype/scripts/native-command.cjs +0 -35
- package/skills/i3-ui-prototype/scripts/native-delivery.cjs +0 -104
- package/skills/i3-ui-prototype/scripts/native-devtools.cjs +0 -92
- package/skills/i3-ui-prototype/scripts/native-files.cjs +0 -44
- package/skills/i3-ui-prototype/scripts/native-pilot-lib.cjs +0 -290
- package/skills/i3-ui-prototype/scripts/native-pilot.cjs +0 -59
- package/skills/i3-ui-prototype/scripts/native-tool-name.cjs +0 -5
- package/skills/i3-ui-prototype/scripts/native-tool-result.cjs +0 -14
- package/skills/i3-ui-prototype/scripts/optional-skill-install.cjs +0 -203
- package/skills/i3-ui-prototype/scripts/project-registry.cjs +0 -126
- package/skills/i3-ui-prototype/scripts/prototype-dependencies.cjs +0 -103
- package/skills/i3-ui-prototype/scripts/prototype-hooks.cjs +0 -94
- package/skills/i3-ui-prototype/scripts/prototype-lib.cjs +0 -277
- package/skills/i3-ui-prototype/scripts/prototype-locations.cjs +0 -69
- package/skills/i3-ui-prototype/scripts/ptc-callbacks.cjs +0 -131
- package/skills/i3-ui-prototype/scripts/sync-template.cjs +0 -19
- package/skills/i3-ui-prototype/scripts/template-adapters.cjs +0 -89
- package/skills/i3-ui-prototype/scripts/template-contract.cjs +0 -407
- package/skills/i3-ui-prototype/scripts/template-inventory.cjs +0 -78
- package/skills/i3-ui-prototype/scripts/validate-result.cjs +0 -117
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { fs, path, crypto, hash, assert, json, id, inside, write } = require('./native-files.cjs');
|
|
3
|
-
function paths(project, prototypeId) {
|
|
4
|
-
const root = fs.realpathSync(path.resolve(project || '.'));
|
|
5
|
-
assert.ok(fs.statSync(root).isDirectory(), 'Project must be a directory');
|
|
6
|
-
if (prototypeId !== undefined) id(prototypeId);
|
|
7
|
-
return { project: root, output: inside(root, 'prototypes'), index: inside(root, 'prototypes/index.json'),
|
|
8
|
-
legacyIndex: inside(root, '.i3-ui-prototypes.json'), lock: inside(root, 'prototypes/.index.lock'), legacyLock: inside(root, '.i3-ui-prototypes.lock'),
|
|
9
|
-
...(prototypeId === undefined ? {} : { directory: inside(root, `prototypes/${prototypeId}`), preparation: inside(root, `prototypes/.preparation/${prototypeId}`), scopeFile: inside(root, `prototypes/.preparation/${prototypeId}/scope.json`) }) };
|
|
10
|
-
}
|
|
11
|
-
function moduleIds(scope = {}) {
|
|
12
|
-
if (scope.schemaVersion !== undefined) assert.ok([1, 2, 3].includes(scope.schemaVersion), 'Unsupported scope schemaVersion');
|
|
13
|
-
if (scope.moduleIds === undefined && ![2, 3].includes(scope.schemaVersion)) return [];
|
|
14
|
-
assert.ok(Array.isArray(scope.moduleIds), 'scope.moduleIds must be an array; use [] for unbound scope');
|
|
15
|
-
for (const value of scope.moduleIds) assert.ok(typeof value === 'string' && value.length <= 128 && /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(value), 'Invalid module identifier in scope.moduleIds; use stable PRD module IDs, not paths or requirement text');
|
|
16
|
-
return [...new Set(scope.moduleIds)];
|
|
17
|
-
}
|
|
18
|
-
function validate(registry, project) {
|
|
19
|
-
assert.equal(registry.schemaVersion, 1, 'Invalid project prototype registry version');
|
|
20
|
-
assert.ok(Array.isArray(registry.prototypes), 'Invalid project prototype registry');
|
|
21
|
-
const ids = new Set();
|
|
22
|
-
for (const entry of registry.prototypes) {
|
|
23
|
-
id(entry.id); assert.ok(!ids.has(entry.id), 'Duplicate prototype ID in registry'); ids.add(entry.id);
|
|
24
|
-
inside(project, entry.directory);
|
|
25
|
-
assert.ok(entry.appliesTo === undefined || (Array.isArray(entry.appliesTo) && entry.appliesTo.every(value => typeof value === 'string')), 'Invalid appliesTo array');
|
|
26
|
-
}
|
|
27
|
-
return registry;
|
|
28
|
-
}
|
|
29
|
-
function read(project) {
|
|
30
|
-
const locations = paths(project), modern = fs.existsSync(locations.index), legacy = fs.existsSync(locations.legacyIndex);
|
|
31
|
-
if (modern && legacy) assert.deepEqual(json(locations.index), json(locations.legacyIndex), 'Conflicting prototype indices; resolve or explicitly migrate before writing');
|
|
32
|
-
const file = modern || !legacy ? locations.index : locations.legacyIndex;
|
|
33
|
-
const bytes = fs.existsSync(file) ? fs.readFileSync(file) : null;
|
|
34
|
-
return { ...locations, file, legacy: !modern && legacy, duplicateLegacy: modern && legacy,
|
|
35
|
-
bytes, registry: validate(bytes ? JSON.parse(bytes.toString('utf8')) : { schemaVersion: 1, prototypes: [] }, locations.project) };
|
|
36
|
-
}
|
|
37
|
-
function transaction(project, operation, { allowDuplicate = false } = {}) {
|
|
38
|
-
const initial = read(project);
|
|
39
|
-
assert.ok(allowDuplicate || !initial.duplicateLegacy, 'Duplicate active indices; explicitly resolve before writing');
|
|
40
|
-
assert.ok(!fs.existsSync(initial.legacyLock), 'Legacy prototype writer lock is active');
|
|
41
|
-
const createdOutput = !fs.existsSync(initial.output), locks = [];
|
|
42
|
-
fs.mkdirSync(initial.output, { recursive: true });
|
|
43
|
-
const acquire = file => { const fd = fs.openSync(file, 'wx'); locks.push({ file, fd }); };
|
|
44
|
-
try {
|
|
45
|
-
acquire(initial.lock);
|
|
46
|
-
if (initial.legacy || initial.duplicateLegacy) acquire(initial.legacyLock);
|
|
47
|
-
else assert.ok(!fs.existsSync(initial.legacyLock), 'Legacy prototype writer lock is active');
|
|
48
|
-
const current = read(project);
|
|
49
|
-
assert.equal(current.file, initial.file, 'Prototype index location changed while acquiring lock');
|
|
50
|
-
assert.ok(allowDuplicate || !current.duplicateLegacy, 'Duplicate active indices');
|
|
51
|
-
return operation({ ...current, save() {
|
|
52
|
-
const latest = read(project);
|
|
53
|
-
assert.equal(latest.file, current.file, 'Prototype index location changed');
|
|
54
|
-
assert.deepEqual(latest.bytes, current.bytes, 'Prototype index changed outside the active writer');
|
|
55
|
-
validate(current.registry, current.project);
|
|
56
|
-
write(current.project, path.relative(current.project, current.file).split(path.sep).join('/'), current.registry);
|
|
57
|
-
} });
|
|
58
|
-
} finally {
|
|
59
|
-
for (const { file, fd } of locks.reverse()) { fs.closeSync(fd); fs.unlinkSync(file); }
|
|
60
|
-
if (createdOutput && fs.existsSync(initial.output) && !fs.readdirSync(initial.output).length) fs.rmdirSync(initial.output);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
function query(options = {}) {
|
|
64
|
-
const current = read(options.project), prototypes = current.registry.prototypes;
|
|
65
|
-
if (options.module !== undefined) assert.ok(typeof options.module === 'string' && options.module.trim(), 'Provide a nonempty module identifier or existing legacy label');
|
|
66
|
-
const errors = [], invalid = new Set();
|
|
67
|
-
for (const entry of prototypes) {
|
|
68
|
-
try {
|
|
69
|
-
const scopeFile = inside(current.project, `${entry.directory}/inputs/scope.json`);
|
|
70
|
-
if (fs.existsSync(scopeFile)) {
|
|
71
|
-
const scope = json(scopeFile);
|
|
72
|
-
if (scope.schemaVersion === 2 || scope.moduleIds !== undefined) assert.deepEqual(entry.appliesTo || [], moduleIds(scope), 'appliesTo differs from fixed scope.moduleIds; explicitly revise or synchronize the index');
|
|
73
|
-
}
|
|
74
|
-
} catch (error) { invalid.add(entry.id); errors.push(`${entry.id}: ${error.message}`); }
|
|
75
|
-
}
|
|
76
|
-
const matches = options.module === undefined ? [] : prototypes.filter(entry => !invalid.has(entry.id) && entry.appliesTo?.includes(options.module));
|
|
77
|
-
return { status: errors.length ? 'failed' : 'checked', index: current.file, legacy: current.legacy, prototypes, errors,
|
|
78
|
-
matches, unbound: prototypes.filter(entry => !invalid.has(entry.id) && !entry.appliesTo?.length), selection: matches.length > 1 ? 'ambiguous' : matches.length ? 'matched' : 'none', readOnly: true,
|
|
79
|
-
note: 'Module association does not prove implementation, current verification or human approval.' };
|
|
80
|
-
}
|
|
81
|
-
function withInstanceAssociation(directory, scope, operation) {
|
|
82
|
-
const parent = path.dirname(path.resolve(directory));
|
|
83
|
-
if (path.basename(parent) !== 'prototypes' || (scope.schemaVersion !== 2 && scope.moduleIds === undefined)) return operation();
|
|
84
|
-
const project = path.dirname(parent), current = read(project);
|
|
85
|
-
if (!current.registry.prototypes.some(entry => path.resolve(project, entry.directory) === path.resolve(directory))) return operation();
|
|
86
|
-
const appliesTo = moduleIds(scope), metadataFile = inside(directory, 'prototype.json'), before = fs.readFileSync(metadataFile);
|
|
87
|
-
return transaction(project, store => {
|
|
88
|
-
const entry = store.registry.prototypes.find(item => path.resolve(project, item.directory) === path.resolve(directory));
|
|
89
|
-
assert.ok(entry, 'Prototype entry disappeared during revision');
|
|
90
|
-
try { const result = operation(); entry.appliesTo = appliesTo; store.save(); return result; }
|
|
91
|
-
catch (error) { write(directory, 'prototype.json', before.toString('utf8')); throw error; }
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function migrate(options = {}) {
|
|
95
|
-
assert.ok(options.check === undefined || typeof options.check === 'boolean', '--check must be a boolean flag');
|
|
96
|
-
const initial = read(options.project);
|
|
97
|
-
if (!fs.existsSync(initial.legacyIndex)) return { status: 'current', index: initial.index, sideEffects: [] };
|
|
98
|
-
const original = fs.readFileSync(initial.legacyIndex), digest = hash(original);
|
|
99
|
-
if (options.expectedDigest !== undefined) assert.equal(options.expectedDigest, digest, 'Legacy index changed since preview');
|
|
100
|
-
const plan = { source: initial.legacyIndex, destination: initial.index, sourceDigest: digest, prototypes: initial.registry.prototypes.length };
|
|
101
|
-
if (options.check) return { status: 'migration-preview', ...plan, sideEffects: [] };
|
|
102
|
-
return transaction(options.project, store => {
|
|
103
|
-
assert.deepEqual(fs.readFileSync(store.legacyIndex), original, 'Legacy index changed during migration');
|
|
104
|
-
const folder = inside(store.project, `prototypes/.migration/index-${crypto.randomUUID()}`);
|
|
105
|
-
fs.mkdirSync(folder, { recursive: true });
|
|
106
|
-
const backup = inside(folder, 'legacy-index.json'), temp = inside(store.project, `prototypes/.index-${crypto.randomUUID()}.tmp`);
|
|
107
|
-
fs.writeFileSync(backup, original, { flag: 'wx' });
|
|
108
|
-
write(folder, 'source.json', { ...plan, backup, purpose: 'Source snapshot before explicit index migration' });
|
|
109
|
-
let created = false;
|
|
110
|
-
try {
|
|
111
|
-
if (!fs.existsSync(store.index)) {
|
|
112
|
-
fs.writeFileSync(temp, original, { flag: 'wx' });
|
|
113
|
-
try { fs.linkSync(temp, store.index); created = true; }
|
|
114
|
-
finally { if (fs.existsSync(temp)) fs.unlinkSync(temp); }
|
|
115
|
-
} else assert.deepEqual(fs.readFileSync(store.index), original, 'Destination index already exists with different content');
|
|
116
|
-
assert.deepEqual(fs.readFileSync(backup), original, 'Migration backup mismatch');
|
|
117
|
-
assert.deepEqual(fs.readFileSync(store.legacyIndex), original, 'Legacy index changed before commit');
|
|
118
|
-
fs.unlinkSync(store.legacyIndex);
|
|
119
|
-
return { status: 'migrated', ...plan, backup };
|
|
120
|
-
} catch (error) {
|
|
121
|
-
if (created && fs.existsSync(store.index) && fs.readFileSync(store.index).equals(original)) fs.unlinkSync(store.index);
|
|
122
|
-
throw error;
|
|
123
|
-
}
|
|
124
|
-
}, { allowDuplicate: true });
|
|
125
|
-
}
|
|
126
|
-
module.exports = { paths, moduleIds, read, transaction, query, withInstanceAssociation, migrate };
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
const fs = require('node:fs');
|
|
4
|
-
const path = require('node:path');
|
|
5
|
-
const { spawnSync } = require('node:child_process');
|
|
6
|
-
const { checkDesignProvider } = require('./prototype-lib.cjs');
|
|
7
|
-
const { discoverProviderCandidates } = require('./design-provider-discovery.cjs');
|
|
8
|
-
const { resolveLocations, scopeBases, toolCandidates } = require('./prototype-locations.cjs');
|
|
9
|
-
|
|
10
|
-
function skillAt(project, name, options = {}) {
|
|
11
|
-
const context = resolveLocations({ ...options, project });
|
|
12
|
-
const candidates = scopeBases(context).map(([root, scope]) => [path.join(root, 'skills', name), `${scope}-skill`]);
|
|
13
|
-
const legacyConfig = (options.env || process.env).CODEBUDDY_CONFIG_DIR;
|
|
14
|
-
if (context.host === 'codebuddy' && legacyConfig) candidates.push([path.resolve(legacyConfig, 'skills', name), 'global-skill']);
|
|
15
|
-
const found = candidates.find(([root]) => fs.existsSync(path.join(root, 'SKILL.md')));
|
|
16
|
-
return found ? { availability: 'available', root: found[0], source: found[1], invocationVerified: false }
|
|
17
|
-
: { availability: 'missing', searched: candidates.map(([root]) => root), invocationVerified: false };
|
|
18
|
-
}
|
|
19
|
-
function antdvTool(project, options = {}) {
|
|
20
|
-
const candidates = toolCandidates(resolveLocations({ ...options, project }), options);
|
|
21
|
-
const found = candidates.find(item => fs.existsSync(item.root));
|
|
22
|
-
if (!found) return { availability: 'missing', searched: candidates.map(item => item.root), componentVersion: '1.5.3' };
|
|
23
|
-
const { root, source } = found;
|
|
24
|
-
try {
|
|
25
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
26
|
-
if (pkg.name !== '@antdv-next/cli' || typeof pkg.bin?.antdv !== 'string') throw new Error('Unexpected antDv CLI package');
|
|
27
|
-
const entry = path.resolve(root, pkg.bin.antdv), relative = path.relative(root, entry);
|
|
28
|
-
if (relative.startsWith('..') || path.isAbsolute(relative)) throw new Error('CLI entry escapes its package');
|
|
29
|
-
const args = [entry, 'info', 'Table', '--ver', '1.5.2', '--format', 'json'];
|
|
30
|
-
const result = spawnSync(process.execPath, args, { cwd: project, env: { ...(options.env || process.env), ANTDV_NO_AUTO_REPORT: '1' }, encoding: 'utf8', timeout: 15000, maxBuffer: 5 * 1024 * 1024 });
|
|
31
|
-
if (result.status !== 0) throw new Error(result.error?.message || result.stderr || 'CLI query failed');
|
|
32
|
-
const data = JSON.parse(result.stdout);
|
|
33
|
-
if (!data || data.name !== 'Table' || !Array.isArray(data.props) || data.error) throw new Error('CLI returned no Table knowledge');
|
|
34
|
-
return { availability: 'available', root, source, entry, nodePath:process.execPath, version: pkg.version, command: [process.execPath, ...args], invocationVerified:false, knowledgeProbe:'Table-only', knowledgeVersion: '1.5.2', componentVersion: '1.5.3', exactKnowledgeMatch: false,
|
|
35
|
-
limitation: 'CLI knowledge 1.5.2 is reference only; verify target 1.5.3 package types/source.' };
|
|
36
|
-
} catch (error) { return { availability: 'unusable', root, source, reason: error.message }; }
|
|
37
|
-
}
|
|
38
|
-
function query(options={}) {
|
|
39
|
-
const kinds=['info','demo','token','semantic','doc','list','design.md'];
|
|
40
|
-
assertQuery(kinds.includes(options.kind),'Choose a read-only antDv query: '+kinds.join(', '));
|
|
41
|
-
const locations=resolveLocations(options),tool=antdvTool(locations.project,{...options,host:locations.host,scope:locations.scope});
|
|
42
|
-
assertQuery(tool.availability==='available',`Local antDv CLI ${tool.availability}: ${tool.reason||'use prototype-deps check; installation requires separate authorization'}`);
|
|
43
|
-
const component=options.component,version=options.version||tool.knowledgeVersion;
|
|
44
|
-
assertQuery(/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(version),'Explicit safe knowledge version required');
|
|
45
|
-
const args=[tool.entry,options.kind];
|
|
46
|
-
if(!['list','design.md'].includes(options.kind)){
|
|
47
|
-
assertQuery(typeof component==='string'&&/^[A-Za-z][A-Za-z0-9-]{0,99}$/.test(component),'Component name required');args.push(component);
|
|
48
|
-
}
|
|
49
|
-
if(options.demo!==undefined){assertQuery(options.kind==='demo'&&/^[A-Za-z0-9_-]{1,100}$/.test(options.demo),'Safe demo name required');args.push(options.demo);}
|
|
50
|
-
args.push('--ver',version,'--format','json');
|
|
51
|
-
const result=spawnSync(tool.nodePath,args,{cwd:locations.project,env:{...(options.env||process.env),ANTDV_NO_AUTO_REPORT:'1'},encoding:'utf8',timeout:15000,maxBuffer:5*1024*1024});
|
|
52
|
-
let data=null;try{data=JSON.parse(result.stdout);}catch{/* Some official doc/demo commands return text. */}
|
|
53
|
-
const stdout=result.stdout||'',stderr=result.stderr||'';
|
|
54
|
-
const invalid=result.status!==0||!stdout.trim()||/^\s*(?:Error\b|错误[::])/i.test(stdout)||data?.error||data?.success===false||data?.status==='failed'||options.kind==='info'&&(!data||data.name!==component||!Array.isArray(data.props));
|
|
55
|
-
return {status:invalid?'failed':'queried',host:locations.host,scope:locations.scope,command:[tool.nodePath,...args],source:tool.source,cliVersion:tool.version,knowledgeVersion:version,componentVersion:tool.componentVersion,exactKnowledgeMatch:version===tool.componentVersion,
|
|
56
|
-
component:component||null,kind:options.kind,exitCode:result.status,stdout,stderr,...(data?{data}:{}),...(result.error?{error:result.error.message}:{}),skillInvocationVerified:false,
|
|
57
|
-
note:'This is a CLI query only. Load the official Skill through the host before business queries; native Hooks must correlate the actual request/result. Verify target package types/source when knowledge versions differ.'};
|
|
58
|
-
}
|
|
59
|
-
function assertQuery(condition,message){if(!condition)throw new Error(message);}
|
|
60
|
-
function check(options = {}) {
|
|
61
|
-
const locations = resolveLocations(options), { project, host, scope } = locations;
|
|
62
|
-
const roots = scopeBases(locations).map(([base]) => path.join(base, 'skills/ui-ux-pro-max'));
|
|
63
|
-
const sources = new Map(scopeBases(locations).map(([base, scope]) => [path.join(base, 'skills/ui-ux-pro-max'), `${scope}-skill`]));
|
|
64
|
-
let discovery;
|
|
65
|
-
if (options.provider === undefined) {
|
|
66
|
-
const aliases = { 'gemini-cli': 'gemini', 'claude-code': 'claude' };
|
|
67
|
-
// Resolve global registrations from home so project-scoped plugins from the
|
|
68
|
-
// business workspace are never reused by a global installation.
|
|
69
|
-
discovery = discoverProviderCandidates({ ...options, project: scope === 'global' ? locations.home : project, host: aliases[host] || host });
|
|
70
|
-
for (const item of discovery.candidates) { roots.push(item.root); if (!sources.has(item.root)) sources.set(item.root, item.source); }
|
|
71
|
-
}
|
|
72
|
-
const uiux = checkDesignProvider({ ...options, project, host, ...(options.provider === undefined ? { providerRoots: [...new Set(roots)] } : {}) });
|
|
73
|
-
if (discovery) {
|
|
74
|
-
uiux.diagnostics.push(...discovery.diagnostics);
|
|
75
|
-
if (uiux.root) uiux.source = sources.get(uiux.root) || uiux.source;
|
|
76
|
-
for (const attempt of uiux.attempts) attempt.source = sources.get(attempt.root) || attempt.source;
|
|
77
|
-
const failure = ['ambiguous', 'disabled', 'discovery-error'].map(status => discovery.diagnostics.find(item => item.availability === status)).find(Boolean);
|
|
78
|
-
if (uiux.availability === 'missing' && failure) Object.assign(uiux, { availability: failure.availability, reason: failure.reason });
|
|
79
|
-
}
|
|
80
|
-
const scoped = { ...options, host, scope };
|
|
81
|
-
const antdv = { skill: skillAt(project, 'antdv', scoped), tool: antdvTool(project, scoped) };
|
|
82
|
-
return { status: 'checked', host, scope, project, locations, uiux, antdv, optional: true, professionalReady: uiux.availability === 'available',
|
|
83
|
-
invocationVerified: false, note: 'Read-only availability probe; the selected host must discover and actually invoke Skills. No dependency installation, migration or prototype changes.' };
|
|
84
|
-
}
|
|
85
|
-
function parse(argv) {
|
|
86
|
-
const operation = argv.shift() || 'check', options = {};
|
|
87
|
-
if (!['check', 'install','query'].includes(operation)) throw new Error('Use check or install or query');
|
|
88
|
-
const flags = new Set(['project', 'host', 'scope', 'skills', 'provider', 'python', 'tool',...(operation==='query'?['kind','component','version','demo']:[])]);
|
|
89
|
-
while (argv.length) {
|
|
90
|
-
const key = argv.shift();
|
|
91
|
-
if (key === '--migrate-tools' && operation === 'install') { options.migrateTools = true; continue; }
|
|
92
|
-
if (!key.startsWith('--') || !flags.has(key.slice(2)) || !argv[0] || argv[0].startsWith('--')) throw new Error(`Invalid option: ${key}`);
|
|
93
|
-
options[key.slice(2)] = argv.shift();
|
|
94
|
-
}
|
|
95
|
-
return { operation, options };
|
|
96
|
-
}
|
|
97
|
-
async function main(argv = process.argv.slice(2)) {
|
|
98
|
-
const { operation, options } = parse([...argv]);
|
|
99
|
-
return operation === 'check' ? check(options) : operation==='query'?query(options):require('./optional-skill-install.cjs').install(options);
|
|
100
|
-
}
|
|
101
|
-
module.exports = { check, skillAt, antdvTool, query, parse, main };
|
|
102
|
-
if (require.main === module) main().then(result => {const {options}=parse(process.argv.slice(2));require('./ptc-callbacks.cjs').captureResult({script:__filename,argv:process.argv.slice(2),project:path.resolve(options.project||process.cwd()),result,exitCode:result.status==='failed'?1:0});process.stdout.write(JSON.stringify(result, null, 2) + '\n');if(result.status==='failed')process.exitCode=1;})
|
|
103
|
-
.catch(error => { process.stderr.write(JSON.stringify({ status: 'failed', errors: [error.message] }) + '\n'); process.exitCode = 1; });
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
// Explicit configuration lifecycle. check is read-only and never invokes the installer.
|
|
4
|
-
const fs=require('node:fs'),path=require('node:path'),assert=require('node:assert/strict');
|
|
5
|
-
const R=require('./codebuddy-registration.cjs'),C=require('./codebuddy-context.cjs');
|
|
6
|
-
function context(options) {
|
|
7
|
-
const host=options.host||'codebuddy';assert.ok(['codebuddy','workbuddy'].includes(host),'A+B supports CodeBuddy and WorkBuddy');
|
|
8
|
-
const project=fs.realpathSync(path.resolve(options.project||'.')),scope=options.scope;
|
|
9
|
-
assert.ok(['project','global'].includes(scope),'Specify project or global installation scope');
|
|
10
|
-
const base=scope==='project'?path.join(project,'.codebuddy'):C.globalBase(options);
|
|
11
|
-
const recordText=R.fileIO.read(path.join(base,'state/i3-prototype/installation.json'));
|
|
12
|
-
const record=recordText?JSON.parse(recordText):null;
|
|
13
|
-
const unified=path.join(base,'i3-composer-agent/hooks/i3-prototype.cjs');
|
|
14
|
-
const scriptPath=options.entryPath||(fs.existsSync(unified)?unified:path.join(base,'skills/i3-ui-prototype/scripts/hosts/codebuddy.cjs'));
|
|
15
|
-
return {project,scope,base,record,scriptPath,host};
|
|
16
|
-
}
|
|
17
|
-
function prepare(options,runtime={}) {
|
|
18
|
-
const requested=options.action||'keep';
|
|
19
|
-
assert.ok(['keep','enable','disable'].includes(requested),'Invalid Hook configuration action');
|
|
20
|
-
assert.notEqual(requested,'enable','Prototype audit Hooks are retired and cannot be enabled');
|
|
21
|
-
const current=runtime.current||context(options),readText=runtime.readText||R.fileIO.read;
|
|
22
|
-
const settingsText=readText(path.join(current.base,'settings.json'));
|
|
23
|
-
if(!current.record) {
|
|
24
|
-
const settings=R.config(settingsText);
|
|
25
|
-
assert.ok(!Object.values(settings.hooks||{}).flat().some(g=>g.hooks.some(h=>h.command?.includes(R.OWNER))),'Unknown owned-looking Hook has no ownership record; preserve it for review');
|
|
26
|
-
return {summary:{status:'retired',scope:current.scope,changed:false},unchanged:true};
|
|
27
|
-
}
|
|
28
|
-
return R.plan({action:'disable',...current,product:'auto',hosts:[],nodePath:process.execPath,scriptDigest:current.record.scriptDigest,currentText:settingsText});
|
|
29
|
-
}
|
|
30
|
-
function configure(options) {
|
|
31
|
-
const change=prepare(options);if(change.unchanged||options.preview)return change.summary;
|
|
32
|
-
return R.apply(change);
|
|
33
|
-
}
|
|
34
|
-
// Explicit historical replay only; normal management must never inspect transcripts.
|
|
35
|
-
function legacyCheck(options,runtime={}) {
|
|
36
|
-
const current=runtime.current||context(options),profile=require('../assets/hosts/codebuddy/profile.json');
|
|
37
|
-
const result={scope:current.scope,base:current.base,scriptPath:current.scriptPath,filesPresent:fs.existsSync(current.scriptPath),profile:profile.id,nativeValidation:profile.nativeValidation,readOnly:true,sideEffects:[]};
|
|
38
|
-
if(process.platform==='win32')return {...result,status:'unsupported',reason:'CodeBuddy Hook quoting on Windows has not been validated'};
|
|
39
|
-
if(!current.record){
|
|
40
|
-
const settings=R.config(R.fileIO.read(path.join(current.base,'settings.json')));
|
|
41
|
-
if(Object.values(settings.hooks||{}).flat().some(group=>group.hooks.some(h=>h.command?.includes(R.OWNER))))return {...result,status:'failed',errors:['Unknown prototype Hook registration has no ownership record; preserve it for review']};
|
|
42
|
-
return {...result,status:result.filesPresent?'files-present':'not-enabled'};
|
|
43
|
-
}
|
|
44
|
-
try {
|
|
45
|
-
const record=(runtime.registration||C.registration)(current.base),host=options.host||'codebuddy',products=record.product==='auto'?(host==='workbuddy'?['ide']:['ide','cli']):[record.product];
|
|
46
|
-
const effectiveByProduct=Object.fromEntries(products.map(product=>[product,(runtime.select||C.select)({project:current.project,product,host,home:options.home,env:options.env})?.base===current.base]));
|
|
47
|
-
Object.assign(result,{host,product:record.product,productVersion:record.productVersion,registrationDigest:record.registrationDigest,effective:Object.values(effectiveByProduct).every(Boolean),effectiveByProduct,transcriptRoots:record.transcriptRoots,
|
|
48
|
-
transcript:{mode:record.transcriptMode||(record.transcriptRoots?.length?'manual':'auto'),status:'awaiting-native-event',invocationVerified:false}});
|
|
49
|
-
let observation=null;
|
|
50
|
-
const parent=path.join(current.base,'state/i3-prototype',C.projectKey(current.project));
|
|
51
|
-
const entries=runtime.entries||[];
|
|
52
|
-
if(!runtime.entries&&fs.existsSync(parent))for(const name of fs.readdirSync(parent)) {
|
|
53
|
-
if(!/^[a-f0-9]{24}$/.test(name))continue;
|
|
54
|
-
const raw=R.fileIO.read(path.join(parent,name,'session.json'));
|
|
55
|
-
if(raw)entries.push(...Object.values(JSON.parse(raw).bindings||{}));
|
|
56
|
-
const observed=R.fileIO.read(path.join(parent,name,'observation.json'));if(observed)entries.push(JSON.parse(observed));
|
|
57
|
-
}
|
|
58
|
-
for(const entry of entries)if((entry.host||'codebuddy')===host&&entry.project===current.project&&entry.registrationDigest===record.registrationDigest&&entry.settingsDigest===record.settingsDigest&&(!observation||entry.lastHook.at>observation.lastHook.at))observation=entry;
|
|
59
|
-
if(observation) {
|
|
60
|
-
result.transcript.path=observation.source.path;
|
|
61
|
-
C.prefix(observation.source.path,observation.source.bytes,observation.source.digest);
|
|
62
|
-
C.source({session_id:observation.sessionId,transcript_path:observation.source.path},record,current.project);
|
|
63
|
-
Object.assign(result.transcript,{status:'verified',invocationVerified:true});
|
|
64
|
-
result.observation={sessionId:observation.sessionId,projectKey:observation.projectKey,runId:observation.runId,event:observation.lastHook.event,at:observation.lastHook.at};
|
|
65
|
-
const observedProduct=observation.product||(record.product!=='auto'?record.product:null);
|
|
66
|
-
assert.ok(['ide','cli'].includes(observedProduct),'Observed native product identity missing');
|
|
67
|
-
Object.assign(result,{product:observedProduct,productVersion:observation.productVersion||'unreported',effective:effectiveByProduct[observedProduct]===true,identitySource:observation.identitySource||'legacy-profile',recovery:observation.recovery||null,...(observation.callMode?{callMode:observation.callMode,skills:observation.skills}:{})});
|
|
68
|
-
}
|
|
69
|
-
const recent=observation&&Date.now()-Date.parse(observation.lastHook.at)>=0&&Date.now()-Date.parse(observation.lastHook.at)<30*60*1000;
|
|
70
|
-
const failure=require('./execution-diagnostics.cjs').latest({base:current.base,project:current.project,host,record});
|
|
71
|
-
if(failure&&(!observation||failure.at>=observation.lastHook.at))return {...result,status:'failed',failure,errors:[failure.reason],transcript:{...result.transcript,status:'failed',invocationVerified:false},
|
|
72
|
-
next:failure.status==='blocked'?'修复宿主或适配后,由用户发起新的继续任务;只读诊断不消耗恢复次数。':'按 failure.reason 检查当前宿主协议;最多两次补调,不能将注册状态当作执行成功。'};
|
|
73
|
-
return {...result,status:result.effective&&recent?'active':record.product==='cli'?'pending-host-review':'registered',
|
|
74
|
-
activationScope:'Only the displayed project/session/configuration and adapter bytes; not all projects or business acceptance',
|
|
75
|
-
next:'CLI: review /hooks; desktop: reload. Verify an actual Skill invocation and missing-Skill recovery in the chosen host.'};
|
|
76
|
-
}catch(error){if(result.transcript)Object.assign(result.transcript,{status:'unverified',invocationVerified:false});return {...result,status:'failed',errors:[error.message]};}
|
|
77
|
-
}
|
|
78
|
-
function check(options,runtime={}) {
|
|
79
|
-
const current=runtime.current||context(options),readText=runtime.readText||R.fileIO.read;
|
|
80
|
-
const result={status:'retired',scope:current.scope,base:current.base,readOnly:true,sideEffects:[],invocationVerified:false,registered:!!current.record};
|
|
81
|
-
try {
|
|
82
|
-
prepare({...options,action:'disable'},{current,readText});
|
|
83
|
-
return {...result,cleanupRequired:!!current.record,next:current.record?'Upgrade or explicitly disable to remove the exact owned registration.':'No prototype audit Hooks are enabled.'};
|
|
84
|
-
}catch(error){return {...result,status:'failed',errors:[error.message]};}
|
|
85
|
-
}
|
|
86
|
-
function main(argv=process.argv.slice(2)) {
|
|
87
|
-
const central=[path.resolve(__dirname,'../../../i3-composer-agent/hooks/manage.cjs'),path.resolve(__dirname,'../../../hooks/manage.cjs')].find(file=>fs.existsSync(file));
|
|
88
|
-
if(central)return require(central).main([...argv,'--groups','prototype']);
|
|
89
|
-
const options={action:argv.shift()||'check',host:'codebuddy',project:process.cwd()};
|
|
90
|
-
while(argv.length){const arg=argv.shift();assert.ok(arg.startsWith('--')&&argv[0]&&!argv[0].startsWith('--'),'Hook option needs a value');const key=arg.slice(2).replace(/-([a-z])/g,(_,c)=>c.toUpperCase());assert.ok(['host','scope','project','product','productVersion','transcriptRoot'].includes(key),'Unknown Hook option');options[key]=argv.shift();}
|
|
91
|
-
return options.action==='check'?check(options):configure(options);
|
|
92
|
-
}
|
|
93
|
-
module.exports={context,globalBase:C.globalBase,prepare,configure,check,legacyCheck,main};
|
|
94
|
-
if(require.main===module)try{const result=main();process.stdout.write(JSON.stringify(result,null,2)+'\n');if(result.status==='failed')process.exitCode=1;}catch(error){process.stderr.write(error.message+'\n');process.exitCode=1;}
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const fs = require('node:fs');
|
|
3
|
-
const path = require('node:path');
|
|
4
|
-
const crypto = require('node:crypto');
|
|
5
|
-
const { spawnSync } = require('node:child_process');
|
|
6
|
-
const templateRegistry = require('./template-adapters.cjs').createTemplateRegistry();
|
|
7
|
-
const { discoverProviderCandidates } = require('./design-provider-discovery.cjs');
|
|
8
|
-
const projectRegistry = require('./project-registry.cjs');
|
|
9
|
-
const hash = value => crypto.createHash('sha256').update(value).digest('hex');
|
|
10
|
-
const json = file => JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
11
|
-
function ensure(condition, message) { if (!condition) throw new Error(message); }
|
|
12
|
-
function identifier(value) { ensure(typeof value === 'string' && /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(value), 'Invalid identifier / 无效标识'); return value; }
|
|
13
|
-
function contained(root, relative) {
|
|
14
|
-
ensure(typeof relative === 'string' && relative && !path.isAbsolute(relative) && !relative.split(/[\\/]/).some(p => p === '..'), 'Path must remain inside prototype');
|
|
15
|
-
root = fs.existsSync(root) ? fs.realpathSync(root) : path.resolve(root);
|
|
16
|
-
const file = path.resolve(root, relative);
|
|
17
|
-
ensure(file.startsWith(root + path.sep), 'Path escapes prototype');
|
|
18
|
-
let current = root;
|
|
19
|
-
for (const part of path.relative(root, file).split(path.sep)) {
|
|
20
|
-
current = path.join(current, part);
|
|
21
|
-
ensure(!fs.existsSync(current) || !fs.lstatSync(current).isSymbolicLink(), 'Refusing symlink / 符号链接');
|
|
22
|
-
}
|
|
23
|
-
return file;
|
|
24
|
-
}
|
|
25
|
-
function files(root, prefix = '') {
|
|
26
|
-
return fs.readdirSync(path.join(root, prefix), { withFileTypes: true }).flatMap(entry => {
|
|
27
|
-
const relative = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
28
|
-
ensure(!entry.isSymbolicLink(), `Refusing symlink: ${relative}`);
|
|
29
|
-
return entry.isDirectory() ? files(root, relative) : entry.isFile() ? [relative] : [];
|
|
30
|
-
}).sort();
|
|
31
|
-
}
|
|
32
|
-
function write(root, relative, value) {
|
|
33
|
-
const file = contained(root, relative);
|
|
34
|
-
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
35
|
-
fs.writeFileSync(file, typeof value === 'string' ? value : JSON.stringify(value, null, 2) + '\n');
|
|
36
|
-
}
|
|
37
|
-
function atomicJson(root, relative, value) {
|
|
38
|
-
const file = contained(root, relative);
|
|
39
|
-
const temp = `${file}.${crypto.randomUUID()}.tmp`;
|
|
40
|
-
try { fs.writeFileSync(temp, JSON.stringify(value, null, 2) + '\n', { flag: 'wx' }); fs.renameSync(temp, file); }
|
|
41
|
-
finally { if (fs.existsSync(temp)) fs.unlinkSync(temp); }
|
|
42
|
-
}
|
|
43
|
-
function listTemplates(options = {}, registry = templateRegistry) {
|
|
44
|
-
return registry.list(options);
|
|
45
|
-
}
|
|
46
|
-
function tokensCss(tokens) {
|
|
47
|
-
const entries = Object.entries({ ...tokens.semantic, ...tokens.component });
|
|
48
|
-
ensure(entries.length && entries.every(([key, value]) => /^[a-z][a-z0-9-]*$/.test(key) && typeof value === 'string' && !/[;{}<>\n\r]/.test(value)), 'Invalid design token values');
|
|
49
|
-
return ':root {\n' + entries.map(([key, value]) => ` --${key}: ${value};`).join('\n') + '\n}\n';
|
|
50
|
-
}
|
|
51
|
-
function providerVersion(root) {
|
|
52
|
-
const receipt = path.join(root, 'UPSTREAM-ORIGIN.json');
|
|
53
|
-
if (fs.existsSync(receipt)) {
|
|
54
|
-
try { const source = json(receipt); if (source.packageName === 'ui-ux-pro-max-cli' && typeof source.version === 'string') return source.version; } catch {}
|
|
55
|
-
}
|
|
56
|
-
for (let folder = root, i = 0; i < 5; i++, folder = path.dirname(folder)) {
|
|
57
|
-
for (const name of ['skill.json', '.claude-plugin/plugin.json', '.codebuddy-plugin/plugin.json', 'package.json']) {
|
|
58
|
-
const file = path.join(folder, name);
|
|
59
|
-
if (fs.existsSync(file)) {
|
|
60
|
-
try {
|
|
61
|
-
const metadata = json(file);
|
|
62
|
-
if (name === 'package.json' && !['ui-ux-pro-max', 'ui-ux-pro-max-cli'].includes(metadata.name)) continue;
|
|
63
|
-
if (metadata.version) return metadata.version;
|
|
64
|
-
} catch {}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return 'unversioned';
|
|
69
|
-
}
|
|
70
|
-
function queryProvider(root, query, options = {}) {
|
|
71
|
-
const mode = options.stack ? ['--stack', options.stack] : options.designSystem ? ['--design-system'] : ['--domain', options.domain || 'ux'];
|
|
72
|
-
const run = spawnSync(options.python || (process.platform === 'win32' ? 'python' : 'python3'), ['-B', path.join(root, 'scripts/search.py'), query, ...mode, '--json'], { encoding: 'utf8', timeout: 15000, maxBuffer: 5 * 1024 * 1024 });
|
|
73
|
-
ensure(run.status === 0, `UI/UX Pro Max query unavailable: ${run.error?.code || (run.stderr || '').trim().slice(0, 400)}`);
|
|
74
|
-
return JSON.parse(run.stdout);
|
|
75
|
-
}
|
|
76
|
-
function checkDesignProvider(options = {}) {
|
|
77
|
-
const discovery = discoverProviderCandidates(options);
|
|
78
|
-
const attempts = [];
|
|
79
|
-
const roots = discovery.candidates.map(candidate => path.resolve(candidate.root));
|
|
80
|
-
const diagnostics = discovery.diagnostics;
|
|
81
|
-
if (discovery.contextRequired) return { availability: 'needs-context', searched: roots, attempts, diagnostics, reason: '请指定当前宿主 --host,或传入宿主实际提供的 --provider 技能路径;尚不能判断是否已安装' };
|
|
82
|
-
for (const candidate of discovery.candidates) {
|
|
83
|
-
const root = path.resolve(candidate.root);
|
|
84
|
-
if (!fs.existsSync(root)) { attempts.push({ root, source: candidate.source, availability: 'missing', reason: '技能路径不存在' }); continue; }
|
|
85
|
-
const required = ['SKILL.md', 'scripts/search.py', 'scripts/core.py', 'scripts/design_system.py', ...['ux-guidelines', 'styles', 'colors', 'typography', 'products', 'landing', 'ui-reasoning'].map(name => `data/${name}.csv`)];
|
|
86
|
-
const missing = required.filter(file => !fs.existsSync(path.join(root, file)));
|
|
87
|
-
if (missing.length) { attempts.push({ root, source: candidate.source, availability: 'unusable', missing, reason: '技能资源不完整' }); continue; }
|
|
88
|
-
try {
|
|
89
|
-
const probe = queryProvider(root, 'error summary validation', { python: options.python, domain: 'ux' });
|
|
90
|
-
ensure(probe.domain === 'ux' && probe.results?.length, 'No verified UX probe result');
|
|
91
|
-
attempts.push({ root, source: candidate.source, availability: 'available' });
|
|
92
|
-
return { availability: 'available', root, source: candidate.source, version: providerVersion(root), digest: hash(required.map(file => hash(fs.readFileSync(path.join(root, file)))).join('\n')), searched: roots, attempts, diagnostics };
|
|
93
|
-
} catch (error) { attempts.push({ root, source: candidate.source, availability: 'unusable', reason: error.message }); }
|
|
94
|
-
}
|
|
95
|
-
const failure = attempts.find(attempt => attempt.availability === 'unusable') || ['ambiguous', 'disabled', 'discovery-error'].map(status => diagnostics.find(item => item.availability === status)).find(Boolean);
|
|
96
|
-
return { ...(failure || {}), availability: failure?.availability || 'missing', searched: roots, attempts, diagnostics, reason: failure?.reason || (options.provider ? '指定的 UI/UX Pro Max 技能路径不存在,请核对 --provider' : '当前宿主未发现 UI/UX Pro Max;可安装,或传入宿主实际提供的 --provider 技能路径') };
|
|
97
|
-
}
|
|
98
|
-
function initPrototype(options, registry = templateRegistry) {
|
|
99
|
-
if (options.framework === 'vue-antdv-next' || options.template === 'admin-list') return require('./native-pilot-lib.cjs').createPrototype(options);
|
|
100
|
-
const project = path.resolve(options.project || '.');
|
|
101
|
-
const id = identifier(options.id);
|
|
102
|
-
const selected = registry.resolve(options.template || registry.defaultId());
|
|
103
|
-
const template = selected.entry;
|
|
104
|
-
const expertMode = options.expertMode || 'professional';
|
|
105
|
-
ensure(['professional', 'template'].includes(expertMode), 'Mode must be professional or template');
|
|
106
|
-
const provider = expertMode === 'professional' ? checkDesignProvider({ ...options, project }) : null;
|
|
107
|
-
if (provider && provider.availability !== 'available') {
|
|
108
|
-
let action = { id: 'locate', label: '提供当前宿主或实际技能路径' };
|
|
109
|
-
if (provider.availability === 'missing' && !options.provider) action = { id: 'install', label: '安装并继续' };
|
|
110
|
-
if (provider.availability === 'unusable') action = { id: 'repair', label: '修复已安装技能并重试' };
|
|
111
|
-
if (provider.availability === 'disabled') action = { id: 'enable', label: '启用已安装插件并重试' };
|
|
112
|
-
return { status: 'needs-design-provider', provider, message: `专业增强模式需要可用的 UI/UX Pro Max。${provider.reason}。也可明确选择模板模式继续。`, choices: [action, { id: 'template', label: '模板模式继续' }, { id: 'prepare', label: '先整理需求和模板选择' }] };
|
|
113
|
-
}
|
|
114
|
-
ensure(fs.existsSync(project) && fs.statSync(project).isDirectory(), 'Project directory does not exist');
|
|
115
|
-
const directory = contained(project, `prototypes/${id}`);
|
|
116
|
-
ensure(!fs.existsSync(directory), 'Prototype already exists / 原型已存在,使用 revise 或另选标识');
|
|
117
|
-
return projectRegistry.transaction(project, store => {
|
|
118
|
-
const registry = store.registry;
|
|
119
|
-
ensure(registry.schemaVersion === 1 && Array.isArray(registry.prototypes), 'Invalid project prototype registry');
|
|
120
|
-
ensure(!registry.prototypes.some(entry => entry.id === id), 'Prototype registry already contains identifier');
|
|
121
|
-
const preset = selected.preset;
|
|
122
|
-
const sourceDigest = template.digest;
|
|
123
|
-
fs.mkdirSync(path.dirname(directory), { recursive: true });
|
|
124
|
-
const staging = fs.mkdtempSync(path.join(path.dirname(directory), '.i3-prototype-'));
|
|
125
|
-
let created = false;
|
|
126
|
-
try {
|
|
127
|
-
const metadata = { schemaVersion: 1, id, revision: 'r001', artifactKind: 'html-review', title: options.title || selected.context.manifest.defaultTitle, template: { id: template.id, version: template.version, digest: sourceDigest, adapter: selected.adapterId }, expertMode, expert: { status: provider ? 'pending' : 'skipped', provider }, verification: { status: 'not-run' }, review: { status: 'pending-review' } };
|
|
128
|
-
const initialized = selected.adapter.initialize(staging, { id, title: metadata.title, purpose: options.purpose }, selected.context);
|
|
129
|
-
Object.assign(metadata, initialized.metadata);
|
|
130
|
-
selected.adapter.validateRuntime(metadata);
|
|
131
|
-
write(staging, 'prototype.json', metadata);
|
|
132
|
-
write(staging, 'app/config.json', { id, title: metadata.title, templateName: template.name, layout: preset.layout });
|
|
133
|
-
const tokens = { primitive: preset.primitive, semantic: preset.semantic, component: preset.component };
|
|
134
|
-
write(staging, 'design-system/tokens.json', tokens);
|
|
135
|
-
write(staging, 'app/tokens.css', tokensCss(tokens));
|
|
136
|
-
write(staging, 'qa/design-advice.json', { schemaVersion: 1, mode: expertMode, provider, records: [] });
|
|
137
|
-
write(staging, 'HANDOFF.md', `# ${metadata.title} 原型交接\n\n模板:${template.name} ${template.version}。模式:${expertMode === 'template' ? '模板模式' : '专业增强模式(专业建议待适配)'}。\n\n运行:在本目录执行 \`node app/serve.cjs\`,按终端显示地址打开。业务数据是本地演示。\n\n${initialized.handoff || ''}读取 requirements-map.json、design-system/MASTER.md 与 qa/REPORT.md。当前为 pending-review;用户明确确认同一版本后才可冻结基线。HTML 交互参考进入框架工程时需要组件和接口映射。\n`);
|
|
138
|
-
write(staging, 'qa/REPORT.md', '# 原型检查\n\n尚未执行浏览器验收。验证及用户评审分别记录。\n');
|
|
139
|
-
ensure(!fs.existsSync(directory), 'Prototype already exists');
|
|
140
|
-
fs.renameSync(staging, directory);
|
|
141
|
-
created = true;
|
|
142
|
-
registry.prototypes.push({ id, directory: `prototypes/${id}`, appliesTo: [] });
|
|
143
|
-
store.save();
|
|
144
|
-
} catch (error) { if (created) fs.rmSync(directory, { recursive: true, force: true }); throw error; }
|
|
145
|
-
finally { if (fs.existsSync(staging)) fs.rmSync(staging, { recursive: true, force: true }); }
|
|
146
|
-
return { status: 'created', directory, template: template.id, expertMode };
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
function contentManifest(directory, registry = templateRegistry) {
|
|
150
|
-
const metadata = json(contained(directory, 'prototype.json'));
|
|
151
|
-
if (metadata.schemaVersion === 2) return require('./native-pilot-lib.cjs').manifest(directory);
|
|
152
|
-
const identity = { id: metadata.id, revision: metadata.revision, template: metadata.template, expertMode: metadata.expertMode, artifactKind: metadata.artifactKind };
|
|
153
|
-
for (const field of registry.forInstance(metadata).runtime.identityFields) if (Object.hasOwn(metadata, field)) identity[field] = metadata[field];
|
|
154
|
-
const paths = ['requirements-map.json', 'qa/design-advice.json', ...['app', 'mocks', 'design-system'].flatMap(folder => files(directory, folder))];
|
|
155
|
-
const entries = Object.fromEntries(paths.sort().map(file => [file, hash(fs.readFileSync(contained(directory, file)))]));
|
|
156
|
-
return { schemaVersion: 1, revision: metadata.revision, identity, files: entries, digest: hash(JSON.stringify({ identity, files: entries })) };
|
|
157
|
-
}
|
|
158
|
-
function checkPrototype(directory, options = {}, registry = templateRegistry) {
|
|
159
|
-
if (json(contained(directory, 'prototype.json')).schemaVersion === 2) return require('./native-pilot-lib.cjs').inspect(directory, options);
|
|
160
|
-
const errors = [];
|
|
161
|
-
try {
|
|
162
|
-
const metadata = json(contained(directory, 'prototype.json'));
|
|
163
|
-
ensure(metadata.schemaVersion === 1 && metadata.artifactKind === 'html-review', 'Invalid prototype contract');
|
|
164
|
-
ensure(metadata.template?.id && metadata.template.version && /^[a-f0-9]{64}$/.test(metadata.template.digest), 'A computed template version and SHA-256 digest are required');
|
|
165
|
-
identifier(metadata.id); identifier(metadata.revision);
|
|
166
|
-
ensure(['professional', 'template'].includes(metadata.expertMode), 'Invalid expert mode');
|
|
167
|
-
const selected = registry.forInstance(metadata);
|
|
168
|
-
selected.adapter.validateRuntime(metadata, options);
|
|
169
|
-
const tokens = json(contained(directory, 'design-system/tokens.json'));
|
|
170
|
-
ensure(fs.readFileSync(contained(directory, 'app/tokens.css'), 'utf8') === tokensCss(tokens), 'Design tokens and actual stylesheet are inconsistent');
|
|
171
|
-
const mapping = json(contained(directory, 'requirements-map.json'));
|
|
172
|
-
ensure(mapping.schemaVersion === 1 && mapping.requirements?.length, 'Requirements mapping is required');
|
|
173
|
-
const ids = new Set();
|
|
174
|
-
for (const requirement of mapping.requirements) {
|
|
175
|
-
ensure(requirement.id && !ids.has(requirement.id), 'Requirement identifiers must be unique'); ids.add(requirement.id);
|
|
176
|
-
ensure(requirement.pages?.length && requirement.scenarios?.length && requirement.roles?.length && requirement.actions?.length, `Incomplete business mapping: ${requirement.id}`);
|
|
177
|
-
}
|
|
178
|
-
const runtimeFiles = [...selected.runtime.requiredFiles];
|
|
179
|
-
if (metadata.runtime?.offlineVersion === 1) runtimeFiles.push('app/offline.js');
|
|
180
|
-
for (const file of ['app/index.html', 'app/tokens.css', 'app/config.json', 'design-system/MASTER.md', 'design-system/tokens.json', ...runtimeFiles]) contained(directory, file) && ensure(fs.existsSync(path.join(directory, file)), `Missing resource: ${file}`);
|
|
181
|
-
const browserFiles = files(directory, 'app').filter(file => /\.(?:html|mjs|js|css)$/.test(file) && !selected.runtime.excludedBrowserPrefixes.some(prefix => file.startsWith(prefix)));
|
|
182
|
-
for (const file of browserFiles) {
|
|
183
|
-
const content = fs.readFileSync(path.join(directory, file), 'utf8');
|
|
184
|
-
for (const match of content.matchAll(/(?:\s|<)(?:src|href)=["']([^"'#]+)["']|(?:import[^;]*?from\s*|import\s*)["']([^"']+)["']/g)) {
|
|
185
|
-
const reference = match[1] || match[2];
|
|
186
|
-
if (/^(?:https?:|data:|mailto:|node:)/.test(reference)) continue;
|
|
187
|
-
const relative = path.relative(directory, path.resolve(path.dirname(path.join(directory, file)), reference));
|
|
188
|
-
ensure(fs.existsSync(contained(directory, relative)), `Missing local reference: ${file} → ${reference}`);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
const manifest = contentManifest(directory, registry);
|
|
192
|
-
if (metadata.expertMode === 'professional' && options.acceptance) {
|
|
193
|
-
const advice = json(contained(directory, 'qa/design-advice.json'));
|
|
194
|
-
ensure(advice.provider?.digest && advice.records.length && advice.records.every(record => ['adopted', 'adjusted', 'rejected', 'no-match'].includes(record.decision) && record.query && record.resultIdentity && record.rationale && record.verification), 'Professional advice has not been queried and reviewed');
|
|
195
|
-
}
|
|
196
|
-
if (options.acceptance) {
|
|
197
|
-
const evidence = json(contained(directory, 'qa/browser.json'));
|
|
198
|
-
ensure(evidence.status === 'passed' && evidence.digest === manifest.digest && evidence.revision === manifest.revision, 'Current matching browser evidence / 浏览器证据 required');
|
|
199
|
-
ensure(evidence.source && evidence.journeys?.length && evidence.journeys.every(item => item.status === 'passed') && Array.isArray(evidence.consoleErrors) && !evidence.consoleErrors.length && evidence.screenshots?.length && evidence.viewports?.length >= 2, 'Browser acceptance incomplete');
|
|
200
|
-
for (const file of evidence.screenshots) ensure(fs.statSync(contained(directory, file)).size > 0, 'Missing screenshot evidence');
|
|
201
|
-
const required = new Set(mapping.requirements.flatMap(requirement => requirement.scenarios));
|
|
202
|
-
for (const scenario of required) ensure(evidence.journeys.some(item => item.id === scenario && item.status === 'passed'), `Missing browser scenario: ${scenario}`);
|
|
203
|
-
}
|
|
204
|
-
return { status: 'passed', revision: manifest.revision, digest: manifest.digest, acceptance: Boolean(options.acceptance) };
|
|
205
|
-
} catch (error) { errors.push(error.message); return { status: 'failed', errors }; }
|
|
206
|
-
}
|
|
207
|
-
function freezeBaseline(directory, confirmation, registry = templateRegistry) {
|
|
208
|
-
if (json(contained(directory, 'prototype.json')).schemaVersion === 2) return require('./native-pilot-lib.cjs').confirmBaseline(directory, confirmation);
|
|
209
|
-
const current = contentManifest(directory, registry);
|
|
210
|
-
ensure(confirmation.revision === current.revision && confirmation.digest === current.digest, 'Human confirmation must match current changed content / 确认版本及内容必须一致');
|
|
211
|
-
ensure(confirmation.reviewer?.trim() && confirmation.statement?.trim() && confirmation.source?.trim(), 'Explicit human confirmation / 人类确认 required');
|
|
212
|
-
const target = contained(directory, `baselines/${identifier(current.revision)}`);
|
|
213
|
-
ensure(!fs.existsSync(target), 'Baseline already exists / 基线已存在');
|
|
214
|
-
const result = checkPrototype(directory, { acceptance: true }, registry);
|
|
215
|
-
ensure(result.status === 'passed', result.errors?.join('; '));
|
|
216
|
-
const staging = contained(directory, `baselines/.${current.revision}-${crypto.randomUUID()}`);
|
|
217
|
-
try {
|
|
218
|
-
fs.mkdirSync(staging, { recursive: true });
|
|
219
|
-
for (const file of Object.keys(current.files)) { const destination = contained(staging, file); fs.mkdirSync(path.dirname(destination), { recursive: true }); fs.copyFileSync(contained(directory, file), destination); }
|
|
220
|
-
write(staging, 'manifest.json', current);
|
|
221
|
-
write(staging, 'review.json', { ...confirmation, approvedAt: new Date().toISOString() });
|
|
222
|
-
ensure(Object.entries(current.files).every(([file, digest]) => hash(fs.readFileSync(contained(staging, file))) === digest) && contentManifest(directory, registry).digest === current.digest, 'Candidate changed while freezing snapshot');
|
|
223
|
-
const reviewDigest = hash(fs.readFileSync(contained(staging, 'review.json')));
|
|
224
|
-
fs.renameSync(staging, target);
|
|
225
|
-
atomicJson(directory, 'baseline.json', { schemaVersion: 1, revision: current.revision, digest: current.digest, reviewDigest, directory: `baselines/${current.revision}` });
|
|
226
|
-
const metadata = json(contained(directory, 'prototype.json'));
|
|
227
|
-
metadata.review = { status: 'approved', revision: current.revision, digest: current.digest, source: confirmation.source };
|
|
228
|
-
metadata.verification = { status: 'passed', digest: current.digest };
|
|
229
|
-
if (metadata.expertMode === 'professional') {
|
|
230
|
-
const advice = json(contained(directory, 'qa/design-advice.json'));
|
|
231
|
-
metadata.expert.status = advice.records.some(record => ['adopted', 'adjusted'].includes(record.decision)) ? 'used' : advice.records.every(record => record.decision === 'no-match') ? 'no-match' : 'reviewed';
|
|
232
|
-
}
|
|
233
|
-
atomicJson(directory, 'prototype.json', metadata);
|
|
234
|
-
} finally { if (fs.existsSync(staging)) fs.rmSync(staging, { recursive: true, force: true }); }
|
|
235
|
-
return current;
|
|
236
|
-
}
|
|
237
|
-
function compareBaseline(directory, registry = templateRegistry) {
|
|
238
|
-
if (json(contained(directory, 'prototype.json')).schemaVersion === 2) return require('./native-pilot-lib.cjs').compareBaseline(directory);
|
|
239
|
-
if (!fs.existsSync(contained(directory, 'baseline.json'))) return { status: 'no-baseline', changes: [], protectedChanges: [] };
|
|
240
|
-
const baseline = json(contained(directory, 'baseline.json'));
|
|
241
|
-
const snapshot = contained(directory, baseline.directory);
|
|
242
|
-
const approved = json(contained(snapshot, 'manifest.json'));
|
|
243
|
-
const reviewFile = contained(snapshot, 'review.json');
|
|
244
|
-
if (baseline.revision !== approved.revision || !fs.existsSync(reviewFile) || hash(fs.readFileSync(reviewFile)) !== baseline.reviewDigest) return { status: 'corrupt-baseline', changes: [], protectedChanges: [] };
|
|
245
|
-
if (approved.digest !== baseline.digest || hash(JSON.stringify({ identity: approved.identity, files: approved.files })) !== approved.digest || Object.entries(approved.files).some(([file, digest]) => !fs.existsSync(contained(snapshot, file)) || hash(fs.readFileSync(contained(snapshot, file))) !== digest)) return { status: 'corrupt-baseline', changes: [], protectedChanges: [] };
|
|
246
|
-
const current = contentManifest(directory, registry);
|
|
247
|
-
const changes = [...new Set([...Object.keys(approved.files), ...Object.keys(current.files)])].filter(file => approved.files[file] !== current.files[file]);
|
|
248
|
-
const selectionChanged = JSON.stringify(approved.identity.template) !== JSON.stringify(current.identity.template) || approved.identity.expertMode !== current.identity.expertMode;
|
|
249
|
-
const runtime = registry.forInstance(current.identity).runtime;
|
|
250
|
-
// Shared design contracts remain protected for every runtime; adapters add
|
|
251
|
-
// their own runtime resources and identity fields rather than replacing it.
|
|
252
|
-
const shared = ['app/tokens.css', 'app/index.html', 'requirements-map.json'];
|
|
253
|
-
const protectedChanges = changes.filter(file => file.startsWith('design-system/') || shared.includes(file) || runtime.protectedFiles.includes(file) || runtime.protectedDirectories.some(prefix => file.startsWith(prefix)));
|
|
254
|
-
if (runtime.identityFields.some(field => JSON.stringify(approved.identity[field]) !== JSON.stringify(current.identity[field]))) protectedChanges.push('runtime-contract');
|
|
255
|
-
if (selectionChanged) protectedChanges.push('template-or-expert-mode');
|
|
256
|
-
return { status: changes.length || protectedChanges.length ? 'changed' : 'unchanged', baselineRevision: baseline.revision, currentRevision: current.revision, changes, protectedChanges };
|
|
257
|
-
}
|
|
258
|
-
function revisePrototype(directory, revision, options = {}) {
|
|
259
|
-
if (json(contained(directory, 'prototype.json')).schemaVersion === 2) return require('./native-pilot-lib.cjs').revise(directory, { ...options, revision });
|
|
260
|
-
identifier(revision);
|
|
261
|
-
const metadata = json(contained(directory, 'prototype.json'));
|
|
262
|
-
ensure(revision !== metadata.revision && !fs.existsSync(contained(directory, `baselines/${revision}`)), 'Use a new unused revision identifier');
|
|
263
|
-
metadata.revision = revision; metadata.review = { status: 'pending-review' }; metadata.verification = { status: 'not-run' };
|
|
264
|
-
atomicJson(directory, 'prototype.json', metadata);
|
|
265
|
-
return { status: 'revised', revision };
|
|
266
|
-
}
|
|
267
|
-
function parseArgs(argv) {
|
|
268
|
-
const options = {}, positional = [];
|
|
269
|
-
for (let i = 0; i < argv.length; i++) {
|
|
270
|
-
if (!argv[i].startsWith('--')) { positional.push(argv[i]); continue; }
|
|
271
|
-
const key = argv[i].slice(2).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
|
|
272
|
-
if (['acceptance', 'enforceBaseline', 'designSystem'].includes(key)) options[key] = true;
|
|
273
|
-
else { ensure(argv[i + 1] && !argv[i + 1].startsWith('--'), `Missing option value: ${argv[i]}`); options[key] = argv[++i]; }
|
|
274
|
-
}
|
|
275
|
-
return { options, positional };
|
|
276
|
-
}
|
|
277
|
-
module.exports = { initPrototype, listTemplates, checkDesignProvider, queryProvider, contentManifest, checkPrototype, freezeBaseline, compareBaseline, revisePrototype, parseArgs };
|