@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,102 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
// Real filesystem/Hook handlers with explicitly synthetic native events, not host acceptance.
|
|
3
|
-
const test=require('node:test'),assert=require('node:assert/strict'),fs=require('node:fs'),os=require('node:os'),path=require('node:path');
|
|
4
|
-
const installed=path.join(__dirname,'lib/installation.js');
|
|
5
|
-
const scripts=path.join(fs.existsSync(installed)?require(installed).loadInstallation().skillsDirectory:path.resolve(__dirname,'../skills'),'i3-ui-prototype/scripts');
|
|
6
|
-
const H=require(path.join(scripts,'codebuddy-hook.cjs')),R=require(path.join(scripts,'codebuddy-registration.cjs')),C=require(path.join(scripts,'codebuddy-context.cjs'));
|
|
7
|
-
const P=require(path.join(scripts,'execution-policy.cjs')),A=require(path.join(scripts,'execution-assertions.cjs')),lib=require(path.join(scripts,'native-pilot-lib.cjs')),X=require(path.join(scripts,'execution-runtime.cjs'));
|
|
8
|
-
function fixture(t,host,scope,client){
|
|
9
|
-
const root=fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(),'i3-buddy-lifecycle-fixture-')));t.after(()=>fs.rmSync(root,{recursive:true,force:true}));
|
|
10
|
-
const project=path.join(root,'business'),home=path.join(root,'isolated-home');fs.mkdirSync(project);fs.mkdirSync(home);
|
|
11
|
-
const scopeFile=path.join(root,'scope.json');fs.writeFileSync(scopeFile,JSON.stringify({schemaVersion:1,title:'Synthetic fixture',pages:[{id:'orders',title:'Orders',referencePage:'models-page',regions:[{id:'list',mode:'management-list'}]}],requirements:[{id:'R1',text:'Synthetic contract only',pages:['orders'],source:{type:'prd',reference:'fixture',statement:'Not native host or business acceptance'}}],exemptions:[]}));
|
|
12
|
-
const opts={project,scope:scopeFile,expertMode:'template'};
|
|
13
|
-
const facts=A.template(opts);for(const item of facts.scenarios)item.checks=[{method:'evaluate_script',pointer:'/fixture',operator:'equals',expected:true}];
|
|
14
|
-
const assertions=path.join(root,'facts.json');fs.writeFileSync(assertions,JSON.stringify(facts));
|
|
15
|
-
const created=lib.createPrototype({...opts,id:'orders',host,executionPolicy:P.AUTO_ID,executionAssertions:assertions});
|
|
16
|
-
const base=scope==='project'?path.join(project,'.codebuddy'):path.join(home,`.${host}`),entry=path.join(scripts,'hosts/codebuddy.cjs');
|
|
17
|
-
const registered=R.plan({action:'enable',scope,host,base,project,nodePath:process.execPath,scriptPath:entry,scriptDigest:C.bundle(entry)});R.apply(registered);
|
|
18
|
-
const file=client?path.join(root,'native.jsonl'):path.join(home,`.${host}`,'projects','business','fixture-native-session.jsonl'),sessionId='fixture-native-session',rows=[];let number=0;
|
|
19
|
-
fs.mkdirSync(path.dirname(file),{recursive:true});
|
|
20
|
-
function append(row){
|
|
21
|
-
if(!client){
|
|
22
|
-
const block=Array.isArray(row.message?.content)?row.message.content[0]:null;
|
|
23
|
-
if(block?.type==='tool_use')row={type:'function_call',callId:block.id,name:block.name,arguments:JSON.stringify(block.input)};
|
|
24
|
-
else if(block?.type==='tool_result')row={type:'function_call_result',callId:block.tool_use_id,output:block.content,status:block.is_error?'failed':'completed'};
|
|
25
|
-
else row={type:'message',role:row.type,content:[{type:row.type==='user'?'input_text':'output_text',text:row.message?.content||''}]};
|
|
26
|
-
}
|
|
27
|
-
rows.push({...row,sessionId,cwd:project});fs.writeFileSync(file,rows.map(value=>JSON.stringify(value)).join('\n')+'\n');
|
|
28
|
-
}
|
|
29
|
-
function hook(event,name,input,id){return H.handle({client,hook_event_name:event,session_id:sessionId,transcript_path:file,cwd:project,tool_name:name,tool_input:input,tool_use_id:id},{event,base,scope,product:'auto',home,env:{}});}
|
|
30
|
-
function request(name,input){const id='fixture-call-'+(++number);append({type:'assistant',message:{content:[{type:'tool_use',id,name,input}]}});return id;}
|
|
31
|
-
function result(id,content,failed=false){append({type:'user',message:{content:[{type:'tool_result',tool_use_id:id,content,is_error:failed}]}});}
|
|
32
|
-
function tool(name,input,content='success',action=()=>{}){
|
|
33
|
-
const id=request(name,input),decision=hook('PreToolUse',name,input,id);
|
|
34
|
-
if(decision.deny){result(id,decision.reason,true);return {id,decision};}
|
|
35
|
-
action();result(id,typeof content==='function'?content():content);return {id,decision,post:hook('PostToolUse',name,input,id)};
|
|
36
|
-
}
|
|
37
|
-
append({type:'user',message:{content:'实现原型,使用模板模式。Synthetic fixture only.'}});
|
|
38
|
-
tool('Skill',{skill:'i3-ui-prototype'},'Prototype Skill loaded');
|
|
39
|
-
const begin=()=>tool('Bash',{command:`node '${path.join(scripts,'native-pilot.cjs')}' execution-begin '${created.directory}'`},()=>{const pointer=JSON.parse(fs.readFileSync(path.join(created.directory,'qa/execution-context.json')));return JSON.stringify({status:'bound',runId:pointer.runId,sessionId,directory:created.directory});});begin();
|
|
40
|
-
return {root,project,base,directory:created.directory,append,hook,tool,begin,result,request,read(){const pointer=JSON.parse(fs.readFileSync(path.join(created.directory,'qa/execution-context.json')));const selected=C.select({project,product:client==='CodeBuddyCLI'||!client&&host==='codebuddy'?'cli':'ide',host,home,env:{}});return JSON.parse(fs.readFileSync(path.join(C.sessionDirectory(selected,project,pointer.sessionId),'session.json')));}};
|
|
41
|
-
}
|
|
42
|
-
for(const [host,client] of [['codebuddy','CodeBuddyCLI'],['codebuddy','CodeBuddyIDE'],['workbuddy','WorkBuddy'],['codebuddy',null],['workbuddy',null]])for(const scope of ['project','global'])test(`${host} ${client||'native-flat-log'} ${scope}: deny, correlate successful Skills, retry and retain budget`,t=>{
|
|
43
|
-
const f=fixture(t,host,scope,client),file=path.join(f.directory,'app/src/RecoveryFixture.vue');
|
|
44
|
-
const denied=f.tool('Write',{file_path:file,content:'fixture'});assert.equal(denied.decision.deny,true);assert.equal(fs.existsSync(file),false);
|
|
45
|
-
assert.match(denied.decision.reason,/i3-frontend-ui-engineering/);
|
|
46
|
-
const before=Object.values(f.read().recoveries)[0].total;f.begin();assert.equal(Object.values(f.read().recoveries)[0].total,before);
|
|
47
|
-
const frontend=f.tool('Skill',{skill:'i3-frontend-ui-engineering'},'Frontend Skill successfully loaded');
|
|
48
|
-
const official=f.tool('Skill',{skill:'antdv'},'Official Skill successfully loaded');
|
|
49
|
-
const retry=f.tool('Write',{file_path:file,content:'fixture'},'written',()=>fs.writeFileSync(file,'fixture'));
|
|
50
|
-
assert.equal(retry.decision.continue,true);assert.equal(fs.readFileSync(file,'utf8'),'fixture');
|
|
51
|
-
const recovery=f.read().bindings[f.directory].recovery;assert.equal(recovery.status,'recovered');assert.equal(recovery.retry.toolCallId,retry.id);
|
|
52
|
-
assert.deepEqual(recovery.invocations.map(item=>item.toolCallId).sort(),[frontend.id,official.id].sort());
|
|
53
|
-
assert.equal(X.check(f.directory,'delivery',lib).status,'failed','Recovery is not business acceptance or a delivery receipt');
|
|
54
|
-
});
|
|
55
|
-
test('Stop asks for missing Skills twice, then reports blocked without an endless loop',t=>{
|
|
56
|
-
const f=fixture(t,'codebuddy','project','CodeBuddyCLI');
|
|
57
|
-
const input={file_path:path.join(f.directory,'app/src/Stopped.vue'),content:'fixture'};
|
|
58
|
-
const attempted=f.request('Write',input);f.result(attempted,'Synthetic operation was not completed',true);
|
|
59
|
-
for(let n=0;n<3;n++){
|
|
60
|
-
f.append({type:'assistant',message:{content:'已完成,可以交付 '+n}});
|
|
61
|
-
const answer=f.hook('Stop');
|
|
62
|
-
if(n<2)assert.equal(answer.feedback,true);else {assert.equal(answer.continue,true);assert.equal(answer.recovery.status,'blocked');}
|
|
63
|
-
}
|
|
64
|
-
f.append({type:'user',message:{content:'先分析,不改代码'}});
|
|
65
|
-
const answer=f.tool('Write',{file_path:path.join(f.directory,'app/src/NoWrite.vue'),content:'no'});assert.equal(answer.decision.deny,true);assert.match(answer.decision.reason,/read-only/);
|
|
66
|
-
});
|
|
67
|
-
test('late successful Skills release writes after the reminder limit without granting delivery',t=>{
|
|
68
|
-
const f=fixture(t,'codebuddy','project','CodeBuddyCLI');
|
|
69
|
-
const file=path.join(f.directory,'app/src/AfterBudget.vue');
|
|
70
|
-
for(let n=0;n<3;n++)assert.equal(f.tool('Write',{file_path:file,content:'fixture'}).decision.deny,true);
|
|
71
|
-
assert.equal(fs.existsSync(file),false);assert.equal(f.read().bindings[f.directory].recovery.status,'blocked');
|
|
72
|
-
f.tool('Skill',{skill:'i3-frontend-ui-engineering'});f.tool('Skill',{skill:'antdv'});
|
|
73
|
-
const answer=f.tool('Write',{file_path:file,content:'fixture'},'written',()=>fs.writeFileSync(file,'fixture'));
|
|
74
|
-
assert.notEqual(answer.decision.deny,true);assert.equal(fs.readFileSync(file,'utf8'),'fixture');assert.equal(f.read().bindings[f.directory].recovery.status,'recovered');
|
|
75
|
-
assert.equal(f.read().bindings[f.directory].recovery.total,2,'Keep reminder counts as audit history');
|
|
76
|
-
assert.equal(X.check(f.directory,'delivery',lib).status,'failed','Successful loading and writing do not replace browser acceptance');
|
|
77
|
-
});
|
|
78
|
-
test('a duplicated native callback does not spend recovery budget when the transcript grows',t=>{
|
|
79
|
-
const f=fixture(t,'workbuddy','project',null),input={file_path:path.join(f.directory,'app/src/Duplicate.vue'),content:'fixture'};
|
|
80
|
-
const id=f.request('Write',input);assert.equal(f.hook('PreToolUse','Write',input,id).deny,true);
|
|
81
|
-
f.append({type:'assistant',message:{content:'native transcript metadata was persisted'}});
|
|
82
|
-
assert.equal(f.hook('PreToolUse','Write',input,id).deny,true);
|
|
83
|
-
assert.equal(Object.values(f.read().recoveries)[0].total,1);
|
|
84
|
-
});
|
|
85
|
-
test('stage recovery waits for its shared gate and the matching successful command result',t=>{
|
|
86
|
-
const f=fixture(t,'codebuddy','project','CodeBuddyCLI');
|
|
87
|
-
f.tool('Skill',{skill:'i3-frontend-ui-engineering'});f.tool('Skill',{skill:'antdv'});
|
|
88
|
-
// This test covers the Hook/recovery boundary; execution-runtime tests exercise
|
|
89
|
-
// the real shared predicate with genuine source/evidence fixtures separately.
|
|
90
|
-
const original=X.check;t.after(()=>{X.check=original;});
|
|
91
|
-
X.check=()=>({status:'failed',errors:['Synthetic implementation evidence missing']});
|
|
92
|
-
const command=`node '${path.join(scripts,'native-pilot.cjs')}' build '${f.directory}'`;
|
|
93
|
-
assert.equal(f.tool('Bash',{command}).decision.deny,true);
|
|
94
|
-
X.check=()=>({status:'passed'});
|
|
95
|
-
const file=path.join(f.directory,'app/src/Unrelated.vue');
|
|
96
|
-
f.tool('Write',{file_path:file,content:'unrelated'},'written',()=>fs.writeFileSync(file,'unrelated'));
|
|
97
|
-
assert.equal(f.read().bindings[f.directory].recovery.status,'required','An unrelated successful UI edit cannot resolve a stage failure');
|
|
98
|
-
const retry=f.tool('Bash',{command},'successful native build command');
|
|
99
|
-
const recovery=f.read().bindings[f.directory].recovery;
|
|
100
|
-
assert.equal(recovery.status,'recovered');assert.equal(recovery.retry.toolCallId,retry.id);
|
|
101
|
-
assert.equal(recovery.retry.kind,'stage');assert.equal(recovery.retry.stage,'implementation');assert.equal(recovery.retry.operation,'build');
|
|
102
|
-
});
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const prototypeScripts=(()=>{const fs=require('node:fs'),path=require('node:path'),file=path.join(__dirname,'lib/installation.js');return path.join(fs.existsSync(file)?require(file).loadInstallation().skillsDirectory:path.resolve(__dirname,'../skills'),'i3-ui-prototype/scripts');})();
|
|
3
|
-
const test=require('node:test'),assert=require('node:assert/strict');
|
|
4
|
-
const H=require(prototypeScripts+'/codebuddy-hook.cjs'),E=require(prototypeScripts+'/execution-evidence.cjs');
|
|
5
|
-
test('only explicit implementation instructions release a user restriction in Chinese and English',()=>{
|
|
6
|
-
const C=require(prototypeScripts+'/codebuddy-context.cjs');
|
|
7
|
-
for(const prompt of ['继续实施当前原型','继续吧','那就按这版方案实施吧,先保存任务清单','请帮我生成原型','continue','Please resume implementation'])assert.equal(C.userRestriction(prompt),false,prompt);
|
|
8
|
-
for(const prompt of ['你调用了哪三个skill','继续实施需要哪些技能?','继续解释错误','继续原型方案讨论','continue the prototype discussion','resume the prototype analysis','What skills did you use?'])assert.equal(C.userRestriction(prompt),null,prompt);
|
|
9
|
-
for(const prompt of ['先分析,不改代码','暂停当前原型实施','cancel current implementation'])assert.equal(C.userRestriction(prompt),true,prompt);
|
|
10
|
-
});
|
|
11
|
-
test('native command parsing handles quoted paths without evaluating shell substitutions or chains',()=>{
|
|
12
|
-
const c=H.nativeCommand('Bash',{command:"'/node path/node' '/skills path/native-pilot.cjs' execution-begin '/work/prototypes/a b'"},'/work');
|
|
13
|
-
assert.equal(c.root,'/work/prototypes/a b');assert.equal(c.operation,'execution-begin');
|
|
14
|
-
for(const command of ['node x; node native-pilot.cjs finalize /x','$(steal) native-pilot.cjs build /x','node x | node native-pilot.cjs finalize /x'])assert.equal(H.nativeCommand('Bash',{command},'/work'),null);
|
|
15
|
-
});
|
|
16
|
-
test('before UI write requires a successful frontend Skill in the same live context and task',()=>{
|
|
17
|
-
const source={prompts:[{line:1,text:'create prototype'}],calls:[],contextLine:0},binding={entryLine:1,contextLine:0,sessionId:'s1',runId:'r1',directory:'/work/prototypes/p',project:'/work'};
|
|
18
|
-
const input={event:'PreToolUse',source,binding,tool:'Write',input:{file_path:'/work/prototypes/p/app/src/A.vue'},directory:'/work/prototypes/p'};
|
|
19
|
-
assert.equal(H.decision(input).deny,true);
|
|
20
|
-
source.calls=[{skill:'frontend',sessionId:'s1',requestLine:2,resultLine:3,success:true},{name:'Bash',input:{command:'node /skills/native-pilot.cjs execution-begin /work/prototypes/p'},sessionId:'s1',result:{status:'bound',runId:'r1',sessionId:'s1',directory:binding.directory},requestLine:4,resultLine:5,success:true}];assert.equal(H.decision(input).continue,true);
|
|
21
|
-
source.contextLine=4;assert.equal(H.decision(input).deny,true);
|
|
22
|
-
});
|
|
23
|
-
test('analysis overrides old tasks and Stop feedback is bounded without granting tool permissions',()=>{
|
|
24
|
-
const source={prompts:[{line:1,text:'先分析,不改代码'}],calls:[],contextLine:0};
|
|
25
|
-
assert.equal(H.decision({event:'Stop',source,binding:{},deliveryCurrent:false}).feedback,undefined);
|
|
26
|
-
source.prompts[0].text='implement prototype';
|
|
27
|
-
source.latestAssistant='已完成,可以交付';
|
|
28
|
-
assert.equal(H.decision({event:'Stop',source,binding:{},deliveryCurrent:false}).feedback,true);
|
|
29
|
-
assert.equal(H.decision({event:'Stop',source,binding:{},deliveryCurrent:false,stopHookActive:true}).continue,true);
|
|
30
|
-
assert.equal(H.decision({event:'Stop',source,binding:{},deliveryCurrent:true}).continue,true);
|
|
31
|
-
assert.equal(JSON.stringify(H.decision({event:'PreToolUse',source,tool:'Read',directory:'/p'})).includes('permissionDecision'),false);
|
|
32
|
-
});
|
|
33
|
-
test('native compact boundaries invalidate loads and mixed-session results are rejected',()=>{
|
|
34
|
-
const rows=[{type:'user',sessionId:'s1',message:{content:'create prototype'}},{type:'assistant',sessionId:'s1',message:{content:[{type:'tool_use',id:'f',name:'Skill',input:{skill:'i3-frontend-ui-engineering'}}]}},{type:'user',sessionId:'s2',message:{content:[{type:'tool_result',tool_use_id:'f',content:'loaded'}]}}];
|
|
35
|
-
assert.throws(()=>E.parse(rows.map(r=>JSON.stringify(r)).join('\n')),/session/);
|
|
36
|
-
rows[2].sessionId='s1';rows.push({type:'system',subtype:'compact_boundary'});
|
|
37
|
-
assert.equal(E.describe(rows.map(r=>JSON.stringify(r)).join('\n')).contextLine,4);
|
|
38
|
-
});
|
|
39
|
-
test('effective binding differs by IDE override and CLI merge without writing any settings',()=>{
|
|
40
|
-
const C=require(prototypeScripts+'/codebuddy-context.cjs'),path=require('node:path');
|
|
41
|
-
const texts=new Map(),records=new Map(),project='/work/p',home='/home/user',projectBase=path.join(project,'.codebuddy'),globalBase=path.join(home,'.codebuddy');
|
|
42
|
-
const args={project,home,env:{},readText:file=>texts.get(file)||null,loadRegistration:base=>records.get(base)||null};
|
|
43
|
-
records.set(globalBase,{base:globalBase,product:'ide'});texts.set(path.join(projectBase,'settings.json'),'{}');
|
|
44
|
-
assert.equal(C.select({...args,product:'ide'}),null,'IDE cannot fall back through shadowing project settings');
|
|
45
|
-
records.set(globalBase,{base:globalBase,product:'cli'});assert.equal(C.select({...args,product:'cli'}).base,globalBase);
|
|
46
|
-
records.set(projectBase,{base:projectBase,product:'cli'});assert.equal(C.select({...args,product:'cli'}).base,projectBase);
|
|
47
|
-
texts.set(path.join(projectBase,'settings.local.json'),'{"hooks":{}}');assert.throws(()=>C.select({...args,product:'cli'}),/overrides/);
|
|
48
|
-
assert.notEqual(C.projectKey('/work/p'),C.projectKey('/other/p'));
|
|
49
|
-
});
|
|
50
|
-
test('read-only intent does not confuse business pause buttons with cancelling implementation',()=>{
|
|
51
|
-
const C=require(prototypeScripts+'/codebuddy-context.cjs');
|
|
52
|
-
assert.equal(C.readOnly('先分析,不改代码'),true);assert.equal(C.readOnly('先检查再实现原型'),false);
|
|
53
|
-
assert.equal(C.readOnly('增加暂停按钮,不改业务逻辑'),false);assert.equal(C.readOnly('暂停当前修改'),true);
|
|
54
|
-
});
|
|
55
|
-
test('a Hook payload must resolve to the actual current native request rather than a model-written begin',()=>{
|
|
56
|
-
const source={prompts:[{line:1,text:'create prototype'}],calls:[{name:'Bash',toolCallId:'native-begin',input:{command:'node native-pilot.cjs execution-begin /p'},requestLine:3}]};
|
|
57
|
-
const payload={hook_event_name:'PreToolUse',tool_name:'Bash',tool_input:{command:'node native-pilot.cjs execution-begin /p'}};
|
|
58
|
-
assert.equal(H.eventCall(payload,source).toolCallId,'native-begin');
|
|
59
|
-
assert.throws(()=>H.eventCall({...payload,tool_input:{command:'fabricated begin'}},source),/uniquely/);
|
|
60
|
-
source.calls[0].resultLine=4;assert.throws(()=>H.eventCall(payload,source),/uniquely/);
|
|
61
|
-
});
|
|
62
|
-
test('project-scope callbacks use their registered root when tools run in a subdirectory',()=>{
|
|
63
|
-
const payload={cwd:'/business/p/src'},real=p=>p;
|
|
64
|
-
assert.equal(H.safeProject(payload,{scope:'project',base:'/business/p/.codebuddy'},{},real),'/business/p');
|
|
65
|
-
assert.equal(H.safeProject(payload,{scope:'global',base:'/custom/codebuddy'},{CODEBUDDY_PROJECT_DIR:'/business/p'},real),'/business/p');
|
|
66
|
-
assert.equal(H.safeProject({hook_event_name:'SessionStart'},{scope:'global',base:'/custom/codebuddy'},{},real,'/business/p'),'/business/p');
|
|
67
|
-
assert.throws(()=>H.safeProject({cwd:'/other'},{scope:'project',base:'/business/p/.codebuddy'},{},real),/outside/);
|
|
68
|
-
});
|
|
69
|
-
test('the frontend gate blocks project-relative native Write calls before any run binding',()=>{
|
|
70
|
-
const result=H.decision({event:'PreToolUse',source:{prompts:[{line:1,text:'实现原型'}],calls:[],contextLine:0},tool:'Write',input:{file_path:'prototypes/p/app/src/Probe.vue'},directory:'/work/prototypes/p',cwd:'/work'});
|
|
71
|
-
assert.equal(result.deny,true);assert.match(result.reason,/frontend/);
|
|
72
|
-
const ide=H.decision({event:'PreToolUse',source:{prompts:[{line:1,text:'实现原型'}],calls:[],contextLine:0},tool:'Write',input:{filePath:'/work/prototypes/p/app/src/Probe.vue'},directory:'/work/prototypes/p',cwd:'/work'});
|
|
73
|
-
assert.equal(ide.deny,true);
|
|
74
|
-
});
|
|
75
|
-
test('IDE streaming requests correlate only within the exact native generation and unique call',()=>{
|
|
76
|
-
const source={format:'codebuddy-ide-index-v1',prompts:[{line:1}],calls:[{name:'Write',toolCallId:'actual-ide-call',nativeRequestId:'generation-1',input:{content:'<template>'},requestLine:2}]};
|
|
77
|
-
const payload={hook_event_name:'PreToolUse',client:'CodeBuddyIDE',generation_id:'generation-1',tool_name:'Write',tool_input:{filePath:'/work/p/app/src/A.vue',content:'<template><p>A</p></template>'}};
|
|
78
|
-
assert.equal(H.eventCall(payload,source).toolCallId,'actual-ide-call');
|
|
79
|
-
assert.throws(()=>H.eventCall({...payload,generation_id:'other'},source),/uniquely/);
|
|
80
|
-
assert.throws(()=>H.eventCall({...payload,client:'other'},source),/uniquely/);
|
|
81
|
-
assert.throws(()=>H.eventCall({...payload,tool_input:{content:'unrelated'}},source),/uniquely/);
|
|
82
|
-
source.calls.push({...source.calls[0],toolCallId:'second-call'});assert.throws(()=>H.eventCall(payload,source),/uniquely/);
|
|
83
|
-
});
|
|
84
|
-
test('IDE and CLI transient reads retry within a fixed limit; wrong generations and requests remain rejected',()=>{
|
|
85
|
-
const payload={hook_event_name:'PreToolUse',client:'CodeBuddyIDE',generation_id:'g1',tool_name:'Write',tool_input:{content:'ui'}};
|
|
86
|
-
const pending={format:'codebuddy-ide-index-v1',prompts:[{line:1,nativeRequestId:'g1'}],calls:[{name:'Write',toolCallId:'w1',nativeRequestId:'g1',input:{content:'ui'},requestLine:2}]};
|
|
87
|
-
let reads=0,waits=0;
|
|
88
|
-
const readSource=()=>{if(++reads<3)throw new Error('native index write in progress');return pending;};
|
|
89
|
-
const result=H.eventSource(payload,{product:'ide'},'/work',{readSource,pause:ms=>{assert.equal(ms,100);waits++;}});
|
|
90
|
-
assert.equal(result.calls[0].toolCallId,'w1');assert.equal(result.nativeReadAttempts,3);assert.equal(waits,2);
|
|
91
|
-
reads=0;assert.throws(()=>H.eventSource({...payload,generation_id:'g2'},{product:'ide'},'/work',{readSource:()=>{reads++;return pending;},pause:()=>{}}),/generation/);assert.equal(reads,8);
|
|
92
|
-
assert.throws(()=>H.eventSource({...payload,tool_input:{content:'different'}},{product:'ide'},'/work',{readSource:()=>pending,pause:()=>{}}),/uniquely/);
|
|
93
|
-
reads=0;assert.throws(()=>H.eventSource({...payload,client:'cli'},{product:'cli'},'/work',{readSource:()=>{reads++;return {...pending,calls:[]};},pause:()=>{}}),/uniquely/);assert.equal(reads,8);
|
|
94
|
-
});
|
|
95
|
-
test('IDE defers current callback evidence until the host persists it and never invents Skill success',()=>{
|
|
96
|
-
const source={format:'codebuddy-ide-index-v1',prompts:[{line:1,nativeRequestId:'g1',text:'implement prototype'}],calls:[],contextLine:0};
|
|
97
|
-
const payload={hook_event_name:'PreToolUse',client:'CodeBuddyIDE',generation_id:'g1',tool_name:'Write',tool_input:{filePath:'/work/prototypes/p/app/src/A.vue'}};
|
|
98
|
-
const result=H.eventSource(payload,{product:'ide'},'/work',{readSource:()=>source});
|
|
99
|
-
assert.equal(result.nativeRequestStatus,'deferred-until-native-persistence');assert.deepEqual(result.calls,[]);
|
|
100
|
-
assert.equal(H.decision({event:'PreToolUse',source:result,binding:{entryLine:1,contextLine:0,sessionId:'s1'},tool:'Write',input:payload.tool_input,directory:'/work/prototypes/p'}).deny,true);
|
|
101
|
-
assert.throws(()=>E.reference(result.calls,{toolCallId:'made-up'}),/Successful native/);
|
|
102
|
-
assert.throws(()=>H.eventSource(payload,{product:'ide'},'/work',{readSource:()=>({...source,prompts:[{line:1,nativeRequestId:'old'}]}),pause:()=>{}}),/generation/);
|
|
103
|
-
});
|
|
104
|
-
test('only the observed project IDE root-cwd sentinel is mapped to the registered project',()=>{
|
|
105
|
-
const options={scope:'project',base:'/business/p/.codebuddy',product:'ide'},payload={cwd:'/',client:'CodeBuddyIDE'};
|
|
106
|
-
assert.equal(H.safeProject(payload,options,{},p=>p),'/business/p');
|
|
107
|
-
assert.throws(()=>H.safeProject({...payload,cwd:'/other'},options,{},p=>p),/outside/);
|
|
108
|
-
assert.throws(()=>H.safeProject(payload,{...options,product:'cli'},{},p=>p),/outside/);
|
|
109
|
-
assert.equal(H.safeProject({...payload,transcript_path:'/native/index.json',session_id:'s1'},{scope:'global',product:'ide'},{},p=>p,'/ignored',(file,session)=>{assert.equal(file,'/native/index.json');assert.equal(session,'s1');return '/business/p';}),'/business/p');
|
|
110
|
-
const cwd=H.toolCwd(payload,{product:'ide'},'/business/p');assert.equal(cwd,'/business/p');
|
|
111
|
-
assert.equal(H.nativeCommand('Bash',{command:'node /skills/native-pilot.cjs execution-begin prototypes/p'},cwd).root,'/business/p/prototypes/p');
|
|
112
|
-
});
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
const assert = require('node:assert/strict');
|
|
4
|
-
const fs = require('node:fs');
|
|
5
|
-
const os = require('node:os');
|
|
6
|
-
const path = require('node:path');
|
|
7
|
-
const crypto = require('node:crypto');
|
|
8
|
-
const installation = path.join(__dirname, 'lib/installation.js');
|
|
9
|
-
const skills = fs.existsSync(installation) ? require(installation).loadInstallation().skillsDirectory : path.resolve(__dirname, '../skills');
|
|
10
|
-
const root = path.join(skills, 'i3-ui-prototype');
|
|
11
|
-
const contract = require(path.join(root, 'scripts/template-contract.cjs'));
|
|
12
|
-
const native = require(path.join(root, 'scripts/native-pilot-lib.cjs'));
|
|
13
|
-
const read = (directory, file) => JSON.parse(fs.readFileSync(path.join(directory, file), 'utf8'));
|
|
14
|
-
const write = (directory, file, data) => fs.writeFileSync(path.join(directory, file), JSON.stringify(data, null, 2));
|
|
15
|
-
const files = directory => Object.fromEntries(fs.readdirSync(directory, { recursive: true }).filter(file => fs.statSync(path.join(directory, file)).isFile()).sort().map(file => [file, crypto.createHash('sha256').update(fs.readFileSync(path.join(directory, file))).digest('hex')]));
|
|
16
|
-
function fixture(t, { prepare = true } = {}) {
|
|
17
|
-
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-full-content-'));
|
|
18
|
-
t.after(() => fs.rmSync(project, { recursive: true, force: true }));
|
|
19
|
-
const template = prepare ? contract.prepareTemplate({ project }) : null;
|
|
20
|
-
const scope = { schemaVersion: 1, title: '资产审核', pages: [{ id: 'assets', title: '资产台账', referencePage: 'models-page',
|
|
21
|
-
regions: [{ id: 'list', mode: 'management-list' }, { id: 'editor', mode: 'edit-form' }] }],
|
|
22
|
-
requirements: [{ id: 'ASSET-01', text: '查询、选择和修改资产', pages: ['assets'], source: { type: 'prd', reference: 'PRD.md#ASSET-01', statement: '按资产字段实现清单与编辑;使用模板通用能力约定。' } }], exemptions: [] };
|
|
23
|
-
write(project, 'scope.json', scope);
|
|
24
|
-
const create = options => native.createPrototype({ project, id: 'assets', expertMode: 'template', scope: path.join(project, 'scope.json'), ...(template ? { templateRoot: template.directory } : {}), ...options });
|
|
25
|
-
return { project, template, scope, create };
|
|
26
|
-
}
|
|
27
|
-
test('explicit legacy preparation uses the complete offline reference and never overwrites a working copy', t => {
|
|
28
|
-
const { project, template } = fixture(t);
|
|
29
|
-
const snapshot = contract.loadTemplate(template.directory);
|
|
30
|
-
assert.equal(snapshot.kind, 'content-reference'); assert.equal(snapshot.id, 'enterprise-admin');
|
|
31
|
-
assert.equal(snapshot.index.pages.length, 35); assert.equal(snapshot.index.routes.length, 44); assert.equal(snapshot.index.htmlFragments.length, 93);
|
|
32
|
-
assert.deepEqual(Object.keys(snapshot.index.extractor.files).sort(), ['content-template.cjs', 'template-contract.cjs']);
|
|
33
|
-
const file = path.join(template.directory, 'index.html');
|
|
34
|
-
fs.writeFileSync(file, fs.readFileSync(file, 'utf8').replace('<h1>模型管理</h1>', '<h1>资产参考内容</h1>'));
|
|
35
|
-
assert.throws(() => contract.loadTemplate(template.directory), /stale|不同步/);
|
|
36
|
-
const index = contract.syncTemplate(template.directory);
|
|
37
|
-
assert.equal(index.pages.find(page => page.id === 'models-page').title, '资产参考内容');
|
|
38
|
-
const content = require(path.join(root, 'scripts/content-template.cjs')).pageContent(contract.loadTemplate(template.directory), 'models-page');
|
|
39
|
-
assert.ok(content.html.includes('<h1>资产参考内容</h1>')); assert.equal(content.readOnly, true);
|
|
40
|
-
assert.equal(contract.prepareTemplate({ project }).created, false);
|
|
41
|
-
assert.ok(fs.readFileSync(file, 'utf8').includes('资产参考内容'));
|
|
42
|
-
});
|
|
43
|
-
test('default creation reads the released template without preparing a business template directory or modifying Skill assets', t => {
|
|
44
|
-
const { project, create } = fixture(t, { prepare: false });
|
|
45
|
-
const builtin = path.join(root, 'assets/templates/enterprise-admin');
|
|
46
|
-
const before = files(builtin);
|
|
47
|
-
const created = create();
|
|
48
|
-
assert.equal(fs.existsSync(path.join(project, 'ui-templates')), false);
|
|
49
|
-
assert.equal(fs.existsSync(path.join(project, '.prototype-preparation')), false);
|
|
50
|
-
assert.deepEqual(files(builtin), before);
|
|
51
|
-
assert.equal(native.inspect(created.directory).status, 'passed');
|
|
52
|
-
const snapshot = read(created.directory, 'inputs/template-snapshot.json');
|
|
53
|
-
assert.equal(snapshot.id, 'enterprise-admin'); assert.equal(snapshot.index.pages.length, 35);
|
|
54
|
-
assert.deepEqual(snapshot, contract.loadBundledTemplate());
|
|
55
|
-
assert.deepEqual(read(created.directory, 'inputs/scope.json'), read(project, 'scope.json'));
|
|
56
|
-
});
|
|
57
|
-
test('an existing edited template copy is preserved and used only when explicitly selected', t => {
|
|
58
|
-
const { project, template, create } = fixture(t);
|
|
59
|
-
const entry = path.join(template.directory, 'index.html');
|
|
60
|
-
fs.writeFileSync(entry, fs.readFileSync(entry, 'utf8').replace('<h1>模型管理</h1>', '<h1>用户维护的旧模板</h1>'));
|
|
61
|
-
contract.syncTemplate(template.directory);
|
|
62
|
-
const before = files(template.directory);
|
|
63
|
-
const current = create({ id: 'current', templateRoot: undefined });
|
|
64
|
-
const legacy = create({ id: 'legacy' });
|
|
65
|
-
assert.notEqual(read(current.directory, 'inputs/template-snapshot.json').digest, read(legacy.directory, 'inputs/template-snapshot.json').digest);
|
|
66
|
-
assert.equal(read(legacy.directory, 'inputs/template-snapshot.json').index.pages.find(page => page.id === 'models-page').title, '用户维护的旧模板');
|
|
67
|
-
assert.deepEqual(files(template.directory), before);
|
|
68
|
-
});
|
|
69
|
-
test('new business generation requires a sourced scope and does not silently generate a device list', t => {
|
|
70
|
-
const { project, create } = fixture(t);
|
|
71
|
-
assert.throws(() => create({ scope: undefined }), /scope|需求/i);
|
|
72
|
-
assert.equal(fs.existsSync(path.join(project, 'prototypes')), false);
|
|
73
|
-
const created = create(), meta = read(created.directory, 'prototype.json');
|
|
74
|
-
assert.equal(meta.runtime.contentReference, true); assert.equal(meta.business.status, 'needs-adaptation');
|
|
75
|
-
assert.equal(native.inspect(created.directory).status, 'passed');
|
|
76
|
-
assert.match(native.inspect(created.directory, { acceptance: true }).errors.join('; '), /implementation pending|scaffold/);
|
|
77
|
-
const config = read(created.directory, 'app/public/prototype-config.json');
|
|
78
|
-
assert.deepEqual(config.pages, [{ id: 'assets', title: '资产台账' }]);
|
|
79
|
-
assert.deepEqual(config.theme, { defaultTheme: 'light', presets: ['light', 'dark', 'fresh', 'tech'] });
|
|
80
|
-
assert.equal(config.content, undefined); assert.equal(read(created.directory, 'mocks/contract.json').count, undefined);
|
|
81
|
-
assert.equal(fs.existsSync(path.join(created.directory, 'app/src/domain/devices.ts')), false);
|
|
82
|
-
const state = native.state(created.directory, {});
|
|
83
|
-
assert.equal(state.nextAction, 'implement-business'); assert.equal(state.commands.browser, undefined); assert.ok(state.commands.recordRun);
|
|
84
|
-
});
|
|
85
|
-
test('the complete content reference yields fixed common capabilities for the selected business regions', t => {
|
|
86
|
-
const { create } = fixture(t), directory = create().directory;
|
|
87
|
-
const fixed = read(directory, 'inputs/capabilities.json'), acceptance = read(directory, 'inputs/acceptance.json');
|
|
88
|
-
for (const id of ['filter', 'selection', 'pagination', 'bulk', 'feedback']) assert.ok(fixed.bindings.some(binding => binding.id === `assets/list/${id}`));
|
|
89
|
-
assert.ok(fixed.bindings.some(binding => binding.id === 'assets/editor/edit'));
|
|
90
|
-
assert.ok(fixed.bindings.some(binding => binding.id === 'app-shell/appearance/theme'));
|
|
91
|
-
assert.ok(acceptance.requiredScenarios.includes('assets/list/pagination/pages'));
|
|
92
|
-
assert.ok(acceptance.requiredScenarios.includes('app-shell/appearance/theme/persistence'));
|
|
93
|
-
assert.equal(acceptance.requiredScenarios.some(id => id.startsWith('devices/')), false);
|
|
94
|
-
fixed.bindings = fixed.bindings.filter(binding => binding.capabilityId !== 'selection'); write(directory, 'inputs/capabilities.json', fixed);
|
|
95
|
-
const candidate = native.manifest(directory);
|
|
96
|
-
assert.throws(() => native.revise(directory, { revision: 'r002', expectedRevision: candidate.revision, expectedDigest: candidate.digest, acceptInputs: true }), /binding|capabilit|合同/i);
|
|
97
|
-
});
|
|
98
|
-
test('business page and requirement references must remain explicit and unambiguous', t => {
|
|
99
|
-
const { project, scope, create } = fixture(t);
|
|
100
|
-
for (const modify of [
|
|
101
|
-
value => { value.pages[0].referencePage = 'missing-page'; },
|
|
102
|
-
value => { value.pages.push(structuredClone(value.pages[0])); },
|
|
103
|
-
value => { value.requirements.push(structuredClone(value.requirements[0])); },
|
|
104
|
-
value => { value.requirements[0].source = {}; },
|
|
105
|
-
value => { value.requirements[0].pages = ['other-business']; },
|
|
106
|
-
value => { value.pages[0].regions[0].mode = 'unknown-mode'; },
|
|
107
|
-
]) {
|
|
108
|
-
const broken = structuredClone(scope); modify(broken); write(project, 'scope.json', broken);
|
|
109
|
-
assert.throws(() => create()); assert.equal(fs.existsSync(path.join(project, 'prototypes')), false);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
test('offline reference synchronization rejects missing runtime resources and module loading', t => {
|
|
113
|
-
const { template } = fixture(t), file = path.join(template.directory, 'index.html'), html = fs.readFileSync(file, 'utf8');
|
|
114
|
-
fs.writeFileSync(file, html.replace('src="offline.js"', 'src="missing.js"')); assert.throws(() => contract.syncTemplate(template.directory), /resource missing/);
|
|
115
|
-
fs.writeFileSync(file, html.replace('<script src="offline.js"', '<script type="module" src="offline.js"')); assert.throws(() => contract.syncTemplate(template.directory), /modules/);
|
|
116
|
-
fs.writeFileSync(file, html); fs.appendFileSync(path.join(template.directory, 'offline.js'), '\nfetch("parts.html")'); assert.throws(() => contract.syncTemplate(template.directory), /Offline runtime/);
|
|
117
|
-
});
|
|
118
|
-
test('the historical device regression runner refuses a business contract before writing evidence', async t => {
|
|
119
|
-
const { create } = fixture(t), directory = create().directory;
|
|
120
|
-
const before = fs.readdirSync(path.join(directory, 'qa'));
|
|
121
|
-
await assert.rejects(require(path.join(root, 'scripts/native-browser.cjs')).main(directory), /historical device-list/);
|
|
122
|
-
assert.deepEqual(fs.readdirSync(path.join(directory, 'qa')), before);
|
|
123
|
-
});
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const test = require('node:test');
|
|
3
|
-
const assert = require('node:assert/strict');
|
|
4
|
-
const fs = require('node:fs');
|
|
5
|
-
const os = require('node:os');
|
|
6
|
-
const path = require('node:path');
|
|
7
|
-
const installation = path.join(__dirname, 'lib/installation.js');
|
|
8
|
-
const skills = fs.existsSync(installation) ? require(installation).loadInstallation().skillsDirectory : path.resolve(__dirname, '../skills');
|
|
9
|
-
const deps = require(path.join(skills, 'i3-ui-prototype/scripts/prototype-dependencies.cjs'));
|
|
10
|
-
const installer = require(path.join(skills, 'i3-ui-prototype/scripts/optional-skill-install.cjs'));
|
|
11
|
-
function workspace(t) {
|
|
12
|
-
const root = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), 'i3-optional-deps-')));
|
|
13
|
-
t.after(() => fs.rmSync(root, { recursive: true, force: true }));
|
|
14
|
-
const project = path.join(root, 'business'), home = path.join(root, 'home');
|
|
15
|
-
fs.mkdirSync(project); fs.mkdirSync(home);
|
|
16
|
-
return { project, home, env: {
|
|
17
|
-
...process.env,
|
|
18
|
-
HOME: home, USERPROFILE: home,
|
|
19
|
-
XDG_CONFIG_HOME: path.join(home, '.config'),
|
|
20
|
-
CODEBUDDY_CONFIG_DIR: path.join(home, '.codebuddy'),
|
|
21
|
-
WORKBUDDY_CONFIG_DIR: path.join(home, '.workbuddy'),
|
|
22
|
-
CLAUDE_CONFIG_DIR: path.join(home, '.claude'),
|
|
23
|
-
CODEX_HOME: path.join(home, '.codex'),
|
|
24
|
-
} };
|
|
25
|
-
}
|
|
26
|
-
test('missing optional Skills do not fail read-only inspection or write files', t => {
|
|
27
|
-
const options = workspace(t), before = fs.readdirSync(options.project);
|
|
28
|
-
const result = deps.check(options);
|
|
29
|
-
assert.equal(result.status, 'checked');
|
|
30
|
-
assert.equal(result.professionalReady, false);
|
|
31
|
-
assert.equal(result.antdv.skill.availability, 'missing');
|
|
32
|
-
assert.equal(result.antdv.tool.availability, 'missing');
|
|
33
|
-
assert.deepEqual(fs.readdirSync(options.project), before);
|
|
34
|
-
});
|
|
35
|
-
test('later installed antDv Skill is detected without reinstalling i3 or claiming the CLI ready', t => {
|
|
36
|
-
const options = workspace(t);
|
|
37
|
-
assert.equal(deps.check(options).antdv.skill.availability, 'missing');
|
|
38
|
-
const root = path.join(options.project, '.codebuddy/skills/antdv');
|
|
39
|
-
fs.mkdirSync(root, { recursive: true }); fs.writeFileSync(path.join(root, 'SKILL.md'), 'official Skill fixture');
|
|
40
|
-
const result = deps.check(options);
|
|
41
|
-
assert.equal(result.antdv.skill.root, root);
|
|
42
|
-
assert.equal(result.antdv.skill.availability, 'available');
|
|
43
|
-
assert.equal(result.antdv.skill.invocationVerified, false);
|
|
44
|
-
assert.equal(result.antdv.tool.availability, 'missing');
|
|
45
|
-
});
|
|
46
|
-
test('CodeBuddy global antDv is reusable and current project entry has precedence', t => {
|
|
47
|
-
const options = workspace(t);
|
|
48
|
-
options.env.CODEBUDDY_CONFIG_DIR = path.join(options.home, 'legacy CodeBuddy config');
|
|
49
|
-
const global = path.join(options.env.CODEBUDDY_CONFIG_DIR, 'skills/antdv');
|
|
50
|
-
fs.mkdirSync(global, { recursive: true }); fs.writeFileSync(path.join(global, 'SKILL.md'), 'global');
|
|
51
|
-
assert.equal(deps.skillAt(options.project, 'antdv', options).source, 'global-skill');
|
|
52
|
-
const local = path.join(options.project, '.codebuddy/skills/antdv');
|
|
53
|
-
fs.mkdirSync(local, { recursive: true }); fs.writeFileSync(path.join(local, 'SKILL.md'), 'local');
|
|
54
|
-
assert.equal(deps.skillAt(options.project, 'antdv', options).root, local);
|
|
55
|
-
});
|
|
56
|
-
test('global UIUX detection reuses enabled user plugins, preserves disabled status and excludes business plugins', t => {
|
|
57
|
-
const options = { ...workspace(t), host: 'codebuddy', scope: 'global' }, config = path.join(options.home, '.codebuddy');
|
|
58
|
-
const plugin = path.join(options.home, 'uiux-plugin'), root = path.join(plugin, 'skills/ui-ux-pro-max'), id = 'ui-ux-pro-max@fixture';
|
|
59
|
-
const write = (file, content) => { fs.mkdirSync(path.dirname(file), { recursive: true }); fs.writeFileSync(file, typeof content === 'string' ? content : JSON.stringify(content)); };
|
|
60
|
-
write(path.join(plugin, '.codebuddy-plugin/plugin.json'), { name: 'ui-ux-pro-max', version: '2.15.0' });
|
|
61
|
-
for (const file of ['SKILL.md', 'scripts/core.py', 'scripts/design_system.py', ...['ux-guidelines','styles','colors','typography','products','landing','ui-reasoning'].map(name => `data/${name}.csv`)]) write(path.join(root, file), 'synthetic fixture');
|
|
62
|
-
write(path.join(root, 'scripts/search.py'), 'import json\nprint(json.dumps({"domain":"ux","results":[{"id":"synthetic-probe-only"}]}))\n');
|
|
63
|
-
write(path.join(config, 'settings.json'), { enabledPlugins: { [id]: true } });
|
|
64
|
-
const record = { scope: 'user', installPath: plugin, version: '2.15.0' };
|
|
65
|
-
write(path.join(config, 'plugins/installed_plugins.json'), { version: 2, plugins: { [id]: [record] } });
|
|
66
|
-
const result = deps.check(options);
|
|
67
|
-
assert.equal(result.uiux.root, root);
|
|
68
|
-
assert.equal(result.uiux.availability, 'available');
|
|
69
|
-
assert.equal(result.uiux.source, 'codebuddy-plugin');
|
|
70
|
-
write(path.join(config, 'settings.json'), { enabledPlugins: { [id]: false } });
|
|
71
|
-
assert.equal(deps.check(options).uiux.availability, 'disabled');
|
|
72
|
-
write(path.join(config, 'settings.json'), { enabledPlugins: { [id]: true } });
|
|
73
|
-
write(path.join(config, 'plugins/installed_plugins.json'), { version: 2, plugins: { [id]: [{ ...record, scope: 'project', projectPath: options.project }] } });
|
|
74
|
-
assert.equal(deps.check(options).uiux.availability, 'missing');
|
|
75
|
-
});
|
|
76
|
-
test('dependency CLI rejects unintended writes and unrelated hosts', () => {
|
|
77
|
-
assert.throws(() => deps.parse(['check', '--force']), /Invalid option/);
|
|
78
|
-
assert.throws(() => deps.check({ host: 'not-a-host' }), /Unknown host/);
|
|
79
|
-
assert.throws(() => deps.parse(['update']), /check or install/);
|
|
80
|
-
});
|
|
81
|
-
function officialFixture(name, folder) {
|
|
82
|
-
const skill = path.join(folder, 'skill'), tool = path.join(folder, 'tool');
|
|
83
|
-
fs.mkdirSync(skill); fs.mkdirSync(tool);
|
|
84
|
-
fs.writeFileSync(path.join(skill, 'SKILL.md'), `---\nname: ${name === 'uiux' ? 'ui-ux-pro-max' : 'antdv'}\n---\nOfficial fixture; not host invocation evidence.\n`);
|
|
85
|
-
if (name === 'uiux') {
|
|
86
|
-
for (const file of ['scripts/search.py', 'scripts/core.py', 'scripts/design_system.py', 'data/ux-guidelines.csv']) {
|
|
87
|
-
fs.mkdirSync(path.dirname(path.join(skill, file)), { recursive: true }); fs.writeFileSync(path.join(skill, file), 'fixture');
|
|
88
|
-
}
|
|
89
|
-
} else {
|
|
90
|
-
const pkg = path.join(tool, 'node_modules/@antdv-next/cli'); fs.mkdirSync(pkg, { recursive: true });
|
|
91
|
-
fs.writeFileSync(path.join(pkg, 'package.json'), JSON.stringify({ name: '@antdv-next/cli', version: '0.0.0-beta.1', bin: { antdv: 'cli.cjs' } }));
|
|
92
|
-
fs.writeFileSync(path.join(pkg, 'cli.cjs'), 'process.stdout.write(JSON.stringify({name:"Table",props:[]}));');
|
|
93
|
-
}
|
|
94
|
-
return { skill, tool };
|
|
95
|
-
}
|
|
96
|
-
test('explicit skip never downloads, writes or permanently disables dependencies', async t => {
|
|
97
|
-
const options = workspace(t), before = fs.readdirSync(options.project);
|
|
98
|
-
const result = await installer.install({ ...options, skills: 'none' }, { prepare() { throw new Error('Unexpected download'); } });
|
|
99
|
-
assert.equal(result.status, 'skipped');
|
|
100
|
-
assert.deepEqual(fs.readdirSync(options.project), before);
|
|
101
|
-
assert.deepEqual(installer.selection('uiux,antdv'), ['uiux', 'antdv']);
|
|
102
|
-
assert.throws(() => installer.selection('none,uiux'), /Choose/);
|
|
103
|
-
});
|
|
104
|
-
test('optional antDv installation preserves user files and a later invocation reuses the Skill', async t => {
|
|
105
|
-
const options = workspace(t);
|
|
106
|
-
fs.writeFileSync(path.join(options.project, 'PRD.md'), 'human requirements');
|
|
107
|
-
const services = { prepare: officialFixture, progress() {} };
|
|
108
|
-
const result = await installer.install({ ...options, skills: 'antdv' }, services);
|
|
109
|
-
assert.equal(result.status, 'installed');
|
|
110
|
-
assert.equal(result.detection.antdv.skill.availability, 'available');
|
|
111
|
-
assert.equal(fs.readFileSync(path.join(options.project, 'PRD.md'), 'utf8'), 'human requirements');
|
|
112
|
-
const skillFile = path.join(options.project, '.codebuddy/skills/antdv/SKILL.md');
|
|
113
|
-
fs.appendFileSync(skillFile, 'user edit'); const before = fs.readFileSync(skillFile);
|
|
114
|
-
const again = await installer.install({ ...options, skills: 'antdv' }, { prepare() { throw new Error('Existing tool must not be replaced'); } });
|
|
115
|
-
assert.equal(again.status, 'reused');
|
|
116
|
-
assert.deepEqual(fs.readFileSync(skillFile), before);
|
|
117
|
-
});
|
|
118
|
-
test('a failed second preparation publishes neither selected Skill and removes temporary files', async t => {
|
|
119
|
-
const options = workspace(t);
|
|
120
|
-
await assert.rejects(installer.install({ ...options, skills: 'uiux,antdv' }, {
|
|
121
|
-
progress() {}, prepare(name, folder) { if (name === 'antdv') throw new Error('simulated network failure'); return officialFixture(name, folder); },
|
|
122
|
-
}), /simulated network failure/);
|
|
123
|
-
assert.deepEqual(fs.readdirSync(options.project), []);
|
|
124
|
-
});
|
|
125
|
-
test('antDv error text or error JSON with exit zero is not successful knowledge', async t => {
|
|
126
|
-
const options = workspace(t);
|
|
127
|
-
await installer.install({ ...options, skills: 'antdv' }, { prepare: officialFixture, progress() {} });
|
|
128
|
-
const file = path.join(resultTool(options), 'node_modules/@antdv-next/cli/cli.cjs');
|
|
129
|
-
for (const output of ['Error: Table knowledge missing', JSON.stringify({ error: 'Table knowledge missing' })]) {
|
|
130
|
-
fs.writeFileSync(file, `process.stdout.write(${JSON.stringify(output)});`);
|
|
131
|
-
assert.equal(deps.check(options).antdv.tool.availability, 'unusable');
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
test('local CLI handoff uses the real Node entry with no PATH command and rejects failed business queries',async t=>{
|
|
135
|
-
const options={...workspace(t),host:'workbuddy'};options.env.PATH='';
|
|
136
|
-
await installer.install({...options,skills:'antdv'},{prepare:officialFixture,progress(){}});
|
|
137
|
-
const detected=deps.check(options).antdv.tool;
|
|
138
|
-
assert.equal(detected.nodePath,process.execPath);assert.equal(detected.invocationVerified,false);
|
|
139
|
-
const result=deps.query({...options,kind:'info',component:'Table'});
|
|
140
|
-
assert.equal(result.status,'queried');assert.equal(result.command[0],process.execPath);assert.equal(result.command[1],detected.entry);
|
|
141
|
-
assert.equal(result.data.name,'Table');assert.equal(result.skillInvocationVerified,false);
|
|
142
|
-
const file=path.join(resultTool(options),'node_modules/@antdv-next/cli/cli.cjs');
|
|
143
|
-
fs.writeFileSync(file,'const v=process.argv[process.argv.indexOf("--ver")+1];process.stdout.write(v==="1.5.3"?"Error: missing target knowledge":JSON.stringify({name:"Table",props:[]}));');
|
|
144
|
-
assert.equal(deps.query({...options,kind:'info',component:'Table',version:'1.5.3'}).status,'failed');
|
|
145
|
-
assert.throws(()=>deps.query({...options,kind:'upgrade'}),/read-only/);
|
|
146
|
-
});
|
|
147
|
-
function resultTool(options) { return path.join(deps.check(options).locations.toolsDirectory, 'antdv-cli'); }
|
|
148
|
-
for (const host of ['codebuddy', 'workbuddy', 'codex', 'claude-code']) for (const scope of ['project', 'global']) {
|
|
149
|
-
test(`${host} ${scope} optional installation keeps all tools inside the selected host root`, async t => {
|
|
150
|
-
const options = { ...workspace(t), host, scope };
|
|
151
|
-
const result = await installer.install({ ...options, skills: 'antdv' }, { prepare: officialFixture, progress() {} });
|
|
152
|
-
assert.equal(result.detection.antdv.tool.source, `${scope}-tool`);
|
|
153
|
-
assert.ok(fs.existsSync(path.join(resultTool(options), 'node_modules/@antdv-next/cli/package.json')));
|
|
154
|
-
assert.equal(fs.existsSync(path.join(options.project, '.prototype-tools')), false);
|
|
155
|
-
assert.equal(fs.existsSync(path.join(options.project, 'package.json')), false);
|
|
156
|
-
if (scope === 'global') assert.deepEqual(fs.readdirSync(options.project), []);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
test('an available global tool is reused by a later project without project writes', async t => {
|
|
160
|
-
const options = workspace(t);
|
|
161
|
-
await installer.install({ ...options, host: 'codex', scope: 'global', skills: 'antdv' }, { prepare: officialFixture, progress() {} });
|
|
162
|
-
const result = await installer.install({ ...options, host: 'codex', skills: 'antdv' }, { prepare() { throw new Error('No download expected'); } });
|
|
163
|
-
assert.equal(result.status, 'reused');
|
|
164
|
-
assert.equal(result.detection.antdv.tool.source, 'global-tool');
|
|
165
|
-
assert.deepEqual(fs.readdirSync(options.project), []);
|
|
166
|
-
});
|
|
167
|
-
test('legacy independent tools stay readable until an explicit owned migration', async t => {
|
|
168
|
-
const options = workspace(t), legacy = path.join(options.project, '.prototype-tools/antdv-cli');
|
|
169
|
-
const stage = path.join(options.project, 'fixture'); fs.mkdirSync(stage);
|
|
170
|
-
const prepared = officialFixture('antdv', stage);
|
|
171
|
-
fs.mkdirSync(path.dirname(legacy)); fs.renameSync(prepared.tool, legacy); fs.rmSync(stage, { recursive: true });
|
|
172
|
-
fs.writeFileSync(path.join(legacy, 'UPSTREAM-ORIGIN.json'), JSON.stringify({ ...require(path.join(skills, 'i3-ui-prototype/assets/optional-skills/sources.json')).antdv, installer: 'i3 optional dependency preparation; official Skill body unchanged' }));
|
|
173
|
-
assert.equal(deps.check(options).antdv.tool.source, 'legacy-project-tool');
|
|
174
|
-
await installer.install({ ...options, skills: 'antdv' }, { prepare: officialFixture, progress() {} });
|
|
175
|
-
assert.equal(fs.existsSync(legacy), true);
|
|
176
|
-
fs.writeFileSync(path.join(options.project, '.prototype-tools/user-note.txt'), 'keep this location');
|
|
177
|
-
await installer.install({ ...options, scope: 'global', skills: 'antdv' }, { prepare: officialFixture, progress() {} });
|
|
178
|
-
assert.equal(deps.check(options).antdv.tool.source, 'global-tool', 'normal lookup prefers a current global tool over legacy');
|
|
179
|
-
const result = await installer.install({ ...options, skills: 'antdv', migrateTools: true }, { prepare() { throw new Error('No download expected'); } });
|
|
180
|
-
assert.equal(result.status, 'migrated');
|
|
181
|
-
assert.equal(result.detection.antdv.tool.source, 'project-tool');
|
|
182
|
-
assert.equal(fs.existsSync(legacy), false);
|
|
183
|
-
assert.equal(fs.readFileSync(path.join(options.project, '.prototype-tools/user-note.txt'), 'utf8'), 'keep this location');
|
|
184
|
-
});
|
|
185
|
-
test('legacy mixed tools without i3 ownership remain untouched by migration', async t => {
|
|
186
|
-
const options = workspace(t), stage = path.join(options.project, 'fixture'); fs.mkdirSync(stage);
|
|
187
|
-
const prepared = officialFixture('antdv', stage), legacy = path.join(options.project, '.prototype-tools/antdv-cli');
|
|
188
|
-
fs.mkdirSync(path.dirname(legacy)); fs.renameSync(prepared.tool, legacy); fs.rmSync(stage, { recursive: true });
|
|
189
|
-
await assert.rejects(installer.install({ ...options, skills: 'antdv', migrateTools: true }, { prepare() { throw new Error('No download expected'); } }), /ownership|来源|归属/);
|
|
190
|
-
assert.equal(deps.check(options).antdv.tool.source, 'legacy-project-tool');
|
|
191
|
-
});
|
|
192
|
-
test('a broken project tool is reported instead of silently borrowing a healthy global tool', async t => {
|
|
193
|
-
const options = workspace(t);
|
|
194
|
-
await installer.install({ ...options, scope: 'global', skills: 'antdv' }, { prepare: officialFixture, progress() {} });
|
|
195
|
-
const local = path.join(options.project, '.codebuddy/tools/i3-prototype/antdv-cli/node_modules/@antdv-next/cli');
|
|
196
|
-
fs.mkdirSync(local, { recursive: true }); fs.writeFileSync(path.join(local, 'package.json'), '{broken');
|
|
197
|
-
assert.equal(deps.check(options).antdv.tool.availability, 'unusable');
|
|
198
|
-
assert.equal(deps.check({ ...options, scope: 'global' }).antdv.tool.availability, 'available');
|
|
199
|
-
await assert.rejects(installer.install({ ...options, skills: 'antdv' }), /Existing tool unusable/);
|
|
200
|
-
assert.equal(fs.readFileSync(path.join(local, 'package.json'), 'utf8'), '{broken');
|
|
201
|
-
});
|
|
202
|
-
test('failed post-migration execution restores the old location and removes newly created destinations', async t => {
|
|
203
|
-
const options = workspace(t), stage = path.join(options.project, 'fixture'); fs.mkdirSync(stage);
|
|
204
|
-
const prepared = officialFixture('antdv', stage), legacy = path.join(options.project, '.prototype-tools/antdv-cli');
|
|
205
|
-
fs.mkdirSync(path.dirname(legacy)); fs.renameSync(prepared.tool, legacy); fs.rmSync(stage, { recursive: true });
|
|
206
|
-
const file = path.join(legacy, 'node_modules/@antdv-next/cli/cli.cjs');
|
|
207
|
-
fs.writeFileSync(file, 'if(__dirname.includes("tools/i3-prototype"))process.exit(1);process.stdout.write(JSON.stringify({name:"Table",props:[]}));');
|
|
208
|
-
fs.writeFileSync(path.join(legacy, 'UPSTREAM-ORIGIN.json'), JSON.stringify({ ...require(path.join(skills, 'i3-ui-prototype/assets/optional-skills/sources.json')).antdv, installer: 'i3 optional dependency preparation; official Skill body unchanged' }));
|
|
209
|
-
await assert.rejects(installer.install({ ...options, skills: 'antdv', migrateTools: true }, { prepare: officialFixture, progress() {} }), /tool query failed/);
|
|
210
|
-
assert.equal(deps.check(options).antdv.tool.source, 'legacy-project-tool');
|
|
211
|
-
assert.equal(fs.existsSync(path.join(options.project, '.codebuddy')), false);
|
|
212
|
-
assert.ok(fs.existsSync(file));
|
|
213
|
-
});
|
|
214
|
-
test('unusable existing UIUX resources are preserved without attempting a download', async t => {
|
|
215
|
-
const options = workspace(t), target = path.join(options.project, '.codebuddy/skills/ui-ux-pro-max');
|
|
216
|
-
fs.mkdirSync(target, { recursive: true }); fs.writeFileSync(path.join(target, 'SKILL.md'), 'human-owned incomplete skill');
|
|
217
|
-
await assert.rejects(installer.install({ ...options, skills: 'uiux' }, { prepare() { throw new Error('must not download'); } }), /Existing Skill preserved/);
|
|
218
|
-
assert.equal(fs.readFileSync(path.join(target, 'SKILL.md'), 'utf8'), 'human-owned incomplete skill');
|
|
219
|
-
});
|
|
220
|
-
test('optional installer rejects symlink escapes, including dangling targets, and bad download bytes', async t => {
|
|
221
|
-
const options = workspace(t), outside = path.join(options.project, 'outside');
|
|
222
|
-
fs.symlinkSync(outside, path.join(options.project, '.codebuddy'), 'dir');
|
|
223
|
-
await assert.rejects(installer.install({ ...options, skills: 'antdv' }, { prepare: officialFixture }), /symlink/);
|
|
224
|
-
assert.equal(fs.existsSync(outside), false);
|
|
225
|
-
assert.throws(() => installer.verify(Buffer.from('altered'), '0'.repeat(64)), /integrity mismatch/);
|
|
226
|
-
});
|