@givolt/i3-composer-agent 3.2.1 → 4.0.1
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 +38 -71
- 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,81 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const test=require('node:test'),assert=require('node:assert/strict'),path=require('node:path'),fs=require('node:fs');
|
|
3
|
-
const installation=path.join(__dirname,'lib/installation.js');
|
|
4
|
-
const scripts=path.join(fs.existsSync(installation)?require(installation).loadInstallation().skillsDirectory:path.resolve(__dirname,'../skills'),'i3-ui-prototype/scripts');
|
|
5
|
-
const E=require(path.join(scripts,'execution-evidence.cjs')),P=require(path.join(scripts,'execution-policy.cjs'));
|
|
6
|
-
const R=()=>require(path.join(scripts,'execution-recovery.cjs'));
|
|
7
|
-
const source=()=>({prompts:[{line:1,digest:'actual-user-task',text:'实现原型'}],calls:[],contextLine:0});
|
|
8
|
-
test('missing frontend returns the actual Skill and concrete retry instruction',()=>{
|
|
9
|
-
const missing=R().missing({source:source(),binding:{sessionId:'s1',entryLine:1,contextLine:0},policy:P.create({id:P.AUTO_ID,mode:'template'})});
|
|
10
|
-
assert.ok(missing.includes('frontend'));assert.ok(missing.includes('antdv'));
|
|
11
|
-
const message=R().instruction(missing);assert.match(message,/i3-frontend-ui-engineering/);assert.match(message,/成功|success/);assert.match(message,/重试|retry/);
|
|
12
|
-
});
|
|
13
|
-
test('recovery correlates a later successful native Skill and a successful retry',()=>{
|
|
14
|
-
const index={bindings:{}},s=source(),context={source:s,sessionId:'s1',directory:'/p/prototypes/a',event:'PreToolUse',eventKey:'denied-write-1'};
|
|
15
|
-
const denied={deny:true,missing:['frontend'],reason:'missing frontend'};
|
|
16
|
-
const first=R().record(index,context,denied);assert.equal(first.recovery.status,'required');
|
|
17
|
-
R().record(index,context,denied);assert.equal(Object.values(index.recoveries)[0].total,1,'Duplicate callbacks do not spend another attempt');
|
|
18
|
-
const rows=[{type:'user',sessionId:'s1',message:{content:'实现原型'}},{type:'assistant',sessionId:'s1',message:{content:[{type:'tool_use',id:'real-front',name:'Skill',input:{skill:'i3-frontend-ui-engineering'}}]}},{type:'user',sessionId:'s1',message:{content:[{type:'tool_result',tool_use_id:'real-front',content:'Skill loaded successfully'}]}}];
|
|
19
|
-
s.calls=E.parse(rows.map(row=>JSON.stringify(row)).join('\n'));
|
|
20
|
-
const ready=R().record(index,{...context,eventKey:'retry-2'},{continue:true});assert.equal(ready.recovery.status,'ready-to-retry');
|
|
21
|
-
const recovered=R().record(index,{...context,event:'PostToolUse',eventKey:'retry-2-result',retrySucceeded:true,retry:{toolCallId:'retry-write',requestLine:4,resultLine:5}},{continue:true});
|
|
22
|
-
assert.equal(recovered.recovery.status,'recovered');assert.equal(recovered.recovery.invocations[0].toolCallId,'real-front');
|
|
23
|
-
});
|
|
24
|
-
test('duplicate callback counts stay idempotent without replaying a stale denial after a successful Skill',()=>{
|
|
25
|
-
const index={bindings:{}},s=source(),context={source:s,sessionId:'s1',directory:'/p/prototypes/a',event:'PreToolUse',eventKey:'same-callback'};
|
|
26
|
-
R().record(index,context,{deny:true,missing:['frontend'],reason:'missing frontend'});
|
|
27
|
-
s.calls=[{skill:'frontend',sessionId:'s1',toolCallId:'front',requestLine:2,resultLine:3,success:true}];
|
|
28
|
-
const current=R().record(index,context,{continue:true});
|
|
29
|
-
assert.notEqual(current.deny,true,'Return the current gate decision, not its cached historical denial');
|
|
30
|
-
assert.equal(current.recovery.total,1);assert.equal(current.recovery.status,'ready-to-retry');
|
|
31
|
-
});
|
|
32
|
-
test('failed and stale Skill results do not recover and Stop correction is bounded across begin calls',()=>{
|
|
33
|
-
const index={bindings:{}},s=source(),context={source:s,sessionId:'s1',directory:'/p/prototypes/a',event:'Stop'};
|
|
34
|
-
s.calls=[{skill:'frontend',sessionId:'s1',requestLine:2,resultLine:3,success:false}];
|
|
35
|
-
const feedback={feedback:true,missing:['frontend'],reason:'load frontend'};
|
|
36
|
-
for(let n=1;n<=2;n++)assert.equal(R().record(index,{...context,eventKey:'stop-'+n},feedback).feedback,true);
|
|
37
|
-
index.bindings={};
|
|
38
|
-
const exhausted=R().record(index,{...context,eventKey:'stop-3'},feedback);assert.equal(exhausted.feedback,undefined);assert.equal(exhausted.recovery.status,'blocked');assert.match(exhausted.context,/停止重复催调/);
|
|
39
|
-
const denied=R().record(index,{...context,event:'PreToolUse',eventKey:'write-3'},{deny:true,missing:['frontend'],reason:'load frontend'});assert.equal(denied.deny,true);
|
|
40
|
-
s.contextLine=10;s.calls=[{skill:'frontend',sessionId:'s1',requestLine:2,resultLine:3,success:true}];
|
|
41
|
-
assert.notEqual(R().record(index,{...context,eventKey:'old-load'},{continue:true}).recovery?.status,'recovered');
|
|
42
|
-
assert.ok(R().missing({source:s,binding:{sessionId:'s1',association:'automatic'},policy:P.create({id:P.AUTO_ID,mode:'template'})}).includes('frontend'),'Pre-compaction Skill success remains invalid in the new context');
|
|
43
|
-
});
|
|
44
|
-
test('flat native Hook feedback remains metadata and cannot reset the human task or recovery budget',()=>{
|
|
45
|
-
const rows=[{type:'message',role:'user',sessionId:'s1',content:[{type:'input_text',text:'实现原型'}]},{type:'message',role:'user',sessionId:'s1',providerData:{isMeta:true},content:[{type:'input_text',text:'补调 frontend 后继续'}]}];
|
|
46
|
-
const text=rows.map(row=>JSON.stringify(row)).join('\n');
|
|
47
|
-
assert.equal(E.describe(text).prompts.length,1);assert.equal(E.describe(text).prompts[0].text,'实现原型');
|
|
48
|
-
});
|
|
49
|
-
test('a missing Skill has one budget even when the set of other missing Skills changes',()=>{
|
|
50
|
-
const index={},context={source:source(),sessionId:'s1',directory:'/p/prototypes/a',event:'Stop'};
|
|
51
|
-
for(const [n,missing] of [['1',['frontend','antdv']],['2',['frontend']]])assert.equal(R().record(index,{...context,eventKey:n},{feedback:true,missing}).feedback,true);
|
|
52
|
-
const third=R().record(index,{...context,eventKey:'3'},{feedback:true,missing:['frontend','uiux']});
|
|
53
|
-
assert.equal(third.recovery.status,'blocked');assert.equal(third.feedback,undefined);assert.equal(third.recovery.counts.frontend,2);
|
|
54
|
-
});
|
|
55
|
-
test('native output resumes Stop for recovery and shows the user an exhausted-budget warning',()=>{
|
|
56
|
-
const format=require(path.join(scripts,'hosts/codebuddy.cjs')).format;
|
|
57
|
-
assert.deepEqual(format({feedback:true,reason:'补调'},'Stop').output,{continue:false,reason:'补调'});
|
|
58
|
-
const blocked=format({context:'当前仍被阻塞',recovery:{status:'blocked'}},'Stop').output;
|
|
59
|
-
assert.equal(blocked.continue,true);assert.equal(blocked.systemMessage,'当前仍被阻塞');
|
|
60
|
-
assert.equal(format({deny:true,reason:'缺 Skill'},'PreToolUse').output.hookSpecificOutput.permissionDecision,'deny');
|
|
61
|
-
assert.equal(format({continue:true,context:'实施前加载'},'UserPromptSubmit').output.hookSpecificOutput.additionalContext,'实施前加载');
|
|
62
|
-
});
|
|
63
|
-
test('a stage evidence recovery requires the same verified stage and its successful native retry',()=>{
|
|
64
|
-
const index={},context={source:source(),sessionId:'s1',directory:'/p/prototypes/a',event:'PreToolUse',eventKey:'denied-build',stage:'implementation'};
|
|
65
|
-
R().record(index,context,{deny:true,missing:['execution-evidence']});
|
|
66
|
-
const other=R().record(index,{...context,eventKey:'another-stage',stage:'browser-entry',resolved:['execution-evidence'],retrySucceeded:true,event:'PostToolUse'},{continue:true});
|
|
67
|
-
assert.equal(other.recovery.status,'required');
|
|
68
|
-
const ready=R().record(index,{...context,eventKey:'verified-build',resolved:['execution-evidence']},{continue:true});
|
|
69
|
-
assert.equal(ready.recovery.status,'ready-to-retry');
|
|
70
|
-
const retry=R().record(index,{...context,eventKey:'successful-build',resolved:['execution-evidence'],retrySucceeded:true,event:'PostToolUse',retry:{toolCallId:'actual-build-result',requestLine:4,resultLine:5}},{continue:true});
|
|
71
|
-
assert.equal(retry.recovery.status,'recovered');assert.equal(retry.recovery.retry.toolCallId,'actual-build-result');
|
|
72
|
-
});
|
|
73
|
-
test('an old successful callback cannot recover a later stage denial',()=>{
|
|
74
|
-
const s=source();s.calls=[{toolCallId:'old',requestLine:2,resultLine:3,success:true}];
|
|
75
|
-
const index={},context={source:s,sessionId:'s1',directory:'/p/prototypes/a',stage:'implementation'};
|
|
76
|
-
R().record(index,{...context,event:'PreToolUse',eventKey:'deny'},{deny:true,missing:['execution-evidence']});
|
|
77
|
-
const stale=R().record(index,{...context,event:'PostToolUse',eventKey:'old-result',resolved:['execution-evidence'],retrySucceeded:true,retry:s.calls[0]},{continue:true});
|
|
78
|
-
assert.equal(stale.recovery.status,'ready-to-retry');
|
|
79
|
-
const current=R().record(index,{...context,event:'PostToolUse',eventKey:'new-result',resolved:['execution-evidence'],retrySucceeded:true,retry:{toolCallId:'new',requestLine:4,resultLine:5}},{continue:true});
|
|
80
|
-
assert.equal(current.recovery.status,'recovered');assert.equal(current.recovery.retry.feedbackLine,3);
|
|
81
|
-
});
|
|
@@ -1,53 +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');
|
|
4
|
-
const assert = require('node:assert/strict');
|
|
5
|
-
const R = require(prototypeScripts+'/codebuddy-registration.cjs');
|
|
6
|
-
const options = { action: 'enable', scope: 'project', product: 'ide', base: '/work/project/.codebuddy',
|
|
7
|
-
project: '/work/project', nodePath: '/runtime with spaces/node', scriptPath: '/work/project/.codebuddy/skills/i3-ui-prototype/scripts/hosts/codebuddy.cjs', scriptDigest: 'a'.repeat(64) };
|
|
8
|
-
test('registration planning preserves unrelated hooks and never grants permissions', () => {
|
|
9
|
-
const before = { theme: 'dark', hooks: { PreToolUse: [{ matcher: 'Write', hooks: [{ type: 'command', command: 'original-check' }] }] } };
|
|
10
|
-
const result = R.plan({ ...options, currentText: JSON.stringify(before) });
|
|
11
|
-
const after = JSON.parse(result.afterText);
|
|
12
|
-
assert.equal(after.theme, 'dark'); assert.deepEqual(after.hooks.PreToolUse[0], before.hooks.PreToolUse[0]);
|
|
13
|
-
assert.ok(result.summary.events.includes('PostToolUse'));
|
|
14
|
-
assert.match(after.hooks.PreToolUse[1].hooks[0].command, /'\/runtime with spaces\/node'/);
|
|
15
|
-
assert.equal(result.recordAfter.active, undefined);
|
|
16
|
-
assert.equal(result.summary.status, 'registered');
|
|
17
|
-
});
|
|
18
|
-
test('repeated enable is idempotent, disable removes only owned groups', () => {
|
|
19
|
-
const first = R.plan({ ...options, currentText: '{"userOption":42}' });
|
|
20
|
-
const again = R.plan({ ...options, currentText: first.afterText, record: first.recordAfter });
|
|
21
|
-
assert.equal(again.afterText, first.afterText);
|
|
22
|
-
const removed = R.plan({ ...options, action: 'disable', currentText: again.afterText, record: again.recordAfter });
|
|
23
|
-
assert.equal(JSON.parse(removed.afterText).userOption, 42);
|
|
24
|
-
assert.equal(Object.values(JSON.parse(removed.afterText).hooks).flat().length, 0);
|
|
25
|
-
});
|
|
26
|
-
test('missing ownership and modified owned hooks cannot be force adopted', () => {
|
|
27
|
-
const first = R.plan({ ...options, currentText: '{}' });
|
|
28
|
-
assert.throws(() => R.plan({ ...options, currentText: first.afterText }), /ownership|Ownership/);
|
|
29
|
-
const edited = JSON.parse(first.afterText); edited.hooks.Stop[0].hooks[0].timeout = 9;
|
|
30
|
-
assert.throws(() => R.plan({ ...options, currentText: JSON.stringify(edited), record: first.recordAfter }), /modified|changed/);
|
|
31
|
-
assert.throws(() => R.plan({ ...options, currentText: '{broken' }), /JSON/);
|
|
32
|
-
});
|
|
33
|
-
test('global CLI registration and defaults remain separate from actual activation', () => {
|
|
34
|
-
const keep = R.plan({ ...options, action: 'keep', currentText: null });
|
|
35
|
-
assert.equal(keep.afterText, null); assert.equal(keep.summary.status, 'not-enabled');
|
|
36
|
-
const global = R.plan({ ...options, scope: 'global', base: '/user/.codebuddy', product: 'cli', currentText: '{}' });
|
|
37
|
-
assert.equal(global.summary.status, 'pending-host-review');
|
|
38
|
-
assert.match(global.recordAfter.groups.Stop.hooks[0].command, /--scope' 'global/);
|
|
39
|
-
assert.throws(() => R.plan({ ...options, product: 'workbuddy' }), /product/);
|
|
40
|
-
});
|
|
41
|
-
test('configuration transaction refuses stale previews and restores only its own failed write in memory', () => {
|
|
42
|
-
const change = R.plan({ ...options, currentText: '{}' });
|
|
43
|
-
const files = new Map([[change.settingsPath, '{}']]); let fail = true;
|
|
44
|
-
const io = { read: file => files.get(file) ?? null, write(file, text) {
|
|
45
|
-
if (file === change.recordPath && fail) { fail = false; throw new Error('record write failed'); }
|
|
46
|
-
if (text === null) files.delete(file); else files.set(file, text);
|
|
47
|
-
} };
|
|
48
|
-
assert.throws(() => R.apply(change, io), /record write failed/);
|
|
49
|
-
assert.equal(files.get(change.settingsPath), '{}');
|
|
50
|
-
files.set(change.settingsPath, '{"userEdit":true}');
|
|
51
|
-
assert.throws(() => R.apply(change, io), /changed after preview/);
|
|
52
|
-
assert.equal(files.get(change.settingsPath), '{"userEdit":true}');
|
|
53
|
-
});
|
|
@@ -1,261 +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 legacyFixture = require('./lib/prototype-fixture.cjs');
|
|
8
|
-
const installationFile = path.join(__dirname, 'lib/installation.js');
|
|
9
|
-
const skillsDirectory = fs.existsSync(installationFile) ? require(installationFile).loadInstallation().skillsDirectory : path.resolve(__dirname, '../skills');
|
|
10
|
-
const contract = require(path.join(skillsDirectory, 'i3-ui-prototype/scripts/template-contract.cjs'));
|
|
11
|
-
|
|
12
|
-
function fixture(t) {
|
|
13
|
-
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-ui-template-'));
|
|
14
|
-
t.after(() => fs.rmSync(project, { recursive: true, force: true }));
|
|
15
|
-
return legacyFixture.prepareTemplate(contract, { project });
|
|
16
|
-
}
|
|
17
|
-
function edit(directory, change) {
|
|
18
|
-
const file = path.join(directory, 'index.html');
|
|
19
|
-
fs.writeFileSync(file, change(fs.readFileSync(file, 'utf8')));
|
|
20
|
-
}
|
|
21
|
-
function parameters(index) {
|
|
22
|
-
return { definition: index.definition, bindings: index.bindings, regions: index.regions, scope: { requirements: [], exemptions: [] }, decisions: [] };
|
|
23
|
-
}
|
|
24
|
-
test('theme remains optional and its explicit preset binding rejects invalid defaults and identifiers', t => {
|
|
25
|
-
const { directory, index }=fixture(t);
|
|
26
|
-
assert.equal(index.bindings.some(binding=>binding.capabilityId==='theme'),false);
|
|
27
|
-
edit(directory,html=>html.replace(/<!-- OPTIONAL_FOUR_THEMES:[\s\S]*?(<aside[\s\S]*?<\/aside>)\s*-->/,'$1'));
|
|
28
|
-
const themed=contract.syncTemplate(directory);
|
|
29
|
-
assert.equal(themed.bindings.filter(binding=>binding.capabilityId==='theme').length,1,'Uncommenting the shipped opt-in snippet must create exactly one binding');
|
|
30
|
-
assert.equal(contract.projectAdminListContent(contract.loadTemplate(directory)).pageTitle,'设备管理','The opt-in preserves normal HTML content projection');
|
|
31
|
-
const source={type:'user',reference:'theme-request',statement:'明亮、暗黑、清新、科技,默认明亮'};
|
|
32
|
-
const inputs=parameters(themed);inputs.scope.requirements=[{id:'THEME-1',text:source.statement,source,capabilities:[{pageId:'devices',regionId:'device-list',capabilityId:'theme'}]}];
|
|
33
|
-
assert.equal(contract.checkCapabilities(inputs).status,'passed');
|
|
34
|
-
assert.equal(contract.checkCapabilities(inputs).requiredScenarios.filter(s=>s.id.includes('/theme/')).length,3);
|
|
35
|
-
for(const values of [{},{defaultTheme:'dark',presets:['light','dark','fresh','tech']},{defaultTheme:'light',presets:['light','dark','fresh',4]},{defaultTheme:'light',presets:['light','dark','fresh','fresh']}]){
|
|
36
|
-
const broken=structuredClone(inputs);broken.bindings.find(binding=>binding.capabilityId==='theme').parameters=values;
|
|
37
|
-
assert.equal(contract.checkCapabilities(broken).status,'failed',JSON.stringify(values));
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
test('an enabled theme cannot exempt its required acceptance while retaining the binding', t => {
|
|
41
|
-
const {directory}=fixture(t);
|
|
42
|
-
edit(directory,html=>html.replace('<nav class="pagination"',`<aside data-capability-id="theme" data-capability-parameters='{"defaultTheme":"light","presets":["light","dark","fresh","tech"]}'>可选主题</aside><nav class="pagination"`));
|
|
43
|
-
const index=contract.syncTemplate(directory),fixed=parameters(index),binding=fixed.bindings.find(item=>item.capabilityId==='theme');
|
|
44
|
-
const scope={requirements:[{id:'THEME-1',text:'四主题',source:{type:'user',reference:'theme-request',statement:'明亮、暗黑、清新、科技'},capabilities:[binding]}],exemptions:[]};
|
|
45
|
-
const inputRoot=path.join(directory,'fixed-inputs');fs.mkdirSync(inputRoot);
|
|
46
|
-
const save=()=>{fs.writeFileSync(path.join(inputRoot,'capabilities.json'),JSON.stringify(fixed));fs.writeFileSync(path.join(inputRoot,'scope.json'),JSON.stringify(scope));};
|
|
47
|
-
save();assert.equal(contract.checkInstanceCapabilities(inputRoot).status,'passed');
|
|
48
|
-
fixed.decisions=[{bindingId:binding.id,status:'not-applicable',requirementId:'THEME-1'}];
|
|
49
|
-
scope.exemptions=[{...binding,requirementId:'THEME-1',reason:'Trying to waive acceptance without removing the enabled theme'}];
|
|
50
|
-
save();const checked=contract.checkInstanceCapabilities(inputRoot);
|
|
51
|
-
assert.equal(checked.status,'failed');assert.match(checked.errors.join(';'),/enabled theme.*acceptance|主题.*验收/i);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
test('pagination supports an explicit adjustable contract without reinterpreting fixedPageSize', t => {
|
|
55
|
-
const { directory, index } = fixture(t);
|
|
56
|
-
const legacy = parameters(index);
|
|
57
|
-
assert.equal(contract.checkCapabilities(legacy).status, 'passed');
|
|
58
|
-
edit(directory, html => html.replace('"fixedPageSize":10,"minimumTestPages":3', '"mode":"adjustable","defaultPageSize":10,"pageSizeOptions":[10,20,50],"minimumTestPages":3'));
|
|
59
|
-
const synced = contract.syncTemplate(directory);
|
|
60
|
-
const binding = synced.bindings.find(entry => entry.capabilityId === 'pagination');
|
|
61
|
-
assert.deepEqual(binding.parameters, { mode: 'adjustable', defaultPageSize: 10, pageSizeOptions: [10,20,50], minimumTestPages: 3 });
|
|
62
|
-
assert.equal(contract.checkCapabilities(parameters(synced)).status, 'passed');
|
|
63
|
-
assert.equal(contract.checkCapabilities(legacy).status, 'passed', 'an existing fixed snapshot remains valid');
|
|
64
|
-
const oldSnapshot = structuredClone(legacy);
|
|
65
|
-
const oldPagination = oldSnapshot.definition.capabilities.find(item => item.id === 'pagination');
|
|
66
|
-
oldSnapshot.definition.version = '1.0.0';
|
|
67
|
-
oldPagination.parameters = { fixedPageSize: { type: 'integer', required: true, minimum: 1 }, minimumTestPages: { type: 'integer', required: true, minimum: 3 } };
|
|
68
|
-
assert.equal(contract.checkCapabilities(oldSnapshot).status, 'passed', 'the old fixed-only definition remains independently valid');
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
test('pagination rejects ambiguous modes and malformed adjustable defaults or options', t => {
|
|
72
|
-
const { index } = fixture(t);
|
|
73
|
-
const cases = [
|
|
74
|
-
{ mode: 'automatic', fixedPageSize: 10 },
|
|
75
|
-
{ mode: 10, fixedPageSize: 10 },
|
|
76
|
-
{ mode: 'fixed' },
|
|
77
|
-
{ mode: 'fixed', fixedPageSize: 10, pageSizeOptions: [10,20,50] },
|
|
78
|
-
{ mode: 'fixed', fixedPageSize: 10, defaultPageSize: 10 },
|
|
79
|
-
{ mode: 'adjustable', fixedPageSize: 10, defaultPageSize: 10, pageSizeOptions: [10,20,50] },
|
|
80
|
-
{ mode: 'adjustable', pageSizeOptions: [10,20,50] },
|
|
81
|
-
{ mode: 'adjustable', defaultPageSize: 10 },
|
|
82
|
-
{ mode: 'adjustable', defaultPageSize: 10, pageSizeOptions: [20,50] },
|
|
83
|
-
{ mode: 'adjustable', defaultPageSize: 10, pageSizeOptions: [10,10,50] },
|
|
84
|
-
{ mode: 'adjustable', defaultPageSize: 10, pageSizeOptions: [10,'20',50] },
|
|
85
|
-
{ mode: 'adjustable', defaultPageSize: 10, pageSizeOptions: [10,0,50] },
|
|
86
|
-
{ mode: 'adjustable', defaultPageSize: 10, pageSizeOptions: [10,20.5,50] },
|
|
87
|
-
{ mode: 'adjustable', defaultPageSize: 0, pageSizeOptions: [0,20,50] },
|
|
88
|
-
{ mode: 'adjustable', defaultPageSize: '10', pageSizeOptions: [10,20,50] },
|
|
89
|
-
{ mode: 'adjustable', defaultPageSize: 10, pageSizeOptions: [10] },
|
|
90
|
-
];
|
|
91
|
-
for (const value of cases) {
|
|
92
|
-
const inputs = parameters(structuredClone(index));
|
|
93
|
-
inputs.bindings.find(binding => binding.capabilityId === 'pagination').parameters = { ...value, minimumTestPages: 3 };
|
|
94
|
-
const checked = contract.checkCapabilities(inputs);
|
|
95
|
-
assert.equal(checked.status, 'failed', JSON.stringify(value));
|
|
96
|
-
assert.ok(checked.errors.some(error => /pagination/.test(error)));
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
test('user owns an offline editable copy and preparing again never overwrites it', t => {
|
|
101
|
-
const { directory, index, created } = fixture(t);
|
|
102
|
-
assert.equal(created, true);
|
|
103
|
-
assert.equal(index.templateId, 'admin-list');
|
|
104
|
-
assert.equal(contract.loadTemplate(directory).index.digest, index.digest);
|
|
105
|
-
edit(directory, html => html.replace('设备管理', '客户设备管理'));
|
|
106
|
-
contract.syncTemplate(directory);
|
|
107
|
-
const again = legacyFixture.prepareTemplate(contract, { project: path.resolve(directory, '../..') });
|
|
108
|
-
assert.equal(again.created, false);
|
|
109
|
-
assert.match(fs.readFileSync(path.join(directory, 'index.html'), 'utf8'), /客户设备管理/);
|
|
110
|
-
const html = fs.readFileSync(path.join(directory, 'index.html'), 'utf8');
|
|
111
|
-
assert.doesNotMatch(html, /<script[^>]+type=["']module|(?:src|href)=["'](?:https?:|\/\/)/i);
|
|
112
|
-
assert.doesNotMatch(fs.readFileSync(path.join(directory, 'assets/reference.js'), 'utf8'), /\bfetch\s*\(|\bimport\s/);
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
test('template or asset edits invalidate index, and synchronization is deterministic', t => {
|
|
116
|
-
const { directory, index } = fixture(t);
|
|
117
|
-
edit(directory, html => html.replace('设备管理', '新设备清单'));
|
|
118
|
-
assert.throws(() => contract.loadTemplate(directory), /stale|不同步/);
|
|
119
|
-
const readonly = contract.syncTemplate(directory, { write: false });
|
|
120
|
-
assert.notEqual(readonly.digest, index.digest);
|
|
121
|
-
assert.throws(() => contract.loadTemplate(directory), /stale|不同步/);
|
|
122
|
-
const updated = contract.syncTemplate(directory);
|
|
123
|
-
assert.equal(updated.digest, contract.syncTemplate(directory, { write: false }).digest);
|
|
124
|
-
fs.appendFileSync(path.join(directory, 'assets/reference.css'), '\n/* user style */');
|
|
125
|
-
assert.throws(() => contract.loadTemplate(directory), /stale|不同步/);
|
|
126
|
-
contract.syncTemplate(directory);
|
|
127
|
-
assert.ok(contract.loadTemplate(directory).files.every(file => file.encoding === 'base64'));
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
test('deleted pagination is detected from region mode even when its binding is deleted', t => {
|
|
131
|
-
const { index } = fixture(t);
|
|
132
|
-
const inputs = parameters(index);
|
|
133
|
-
inputs.bindings = inputs.bindings.filter(binding => binding.capabilityId !== 'pagination');
|
|
134
|
-
const result = contract.checkCapabilities(inputs);
|
|
135
|
-
assert.equal(result.status, 'failed');
|
|
136
|
-
assert.ok(result.errors.some(error => error.includes('pagination')));
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
test('required capability cannot be waived by an unsupported N/A or pending decision', t => {
|
|
140
|
-
const { index } = fixture(t);
|
|
141
|
-
const inputs = parameters(index);
|
|
142
|
-
const binding = index.bindings.find(entry => entry.capabilityId === 'pagination');
|
|
143
|
-
inputs.decisions = [{ bindingId: binding.id, status: 'not-applicable', reason: 'Prototype only' }];
|
|
144
|
-
assert.equal(contract.checkCapabilities(inputs).status, 'failed');
|
|
145
|
-
inputs.decisions[0].status = 'pending';
|
|
146
|
-
assert.equal(contract.checkCapabilities(inputs).status, 'failed');
|
|
147
|
-
inputs.decisions[0].status = 'not-applicable';
|
|
148
|
-
inputs.scope = {
|
|
149
|
-
requirements: [{ id: 'SCOPE-1', text: 'The user explicitly excluded pagination for this area', source: { type: 'scope-change', reference: 'user-message-12', statement: 'This area contains exactly one fixed record; omit paging.' } }],
|
|
150
|
-
exemptions: [{ pageId: binding.pageId, regionId: binding.regionId, capabilityId: 'pagination', requirementId: 'SCOPE-1', reason: 'Explicit scope change' }],
|
|
151
|
-
};
|
|
152
|
-
inputs.decisions[0].requirementId = 'SCOPE-1';
|
|
153
|
-
const result = contract.checkCapabilities(inputs);
|
|
154
|
-
assert.equal(result.status, 'passed', result.errors.join('\n'));
|
|
155
|
-
assert.ok(!result.requiredBindings.includes(binding.id));
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
test('each region needs its own capabilities and scenarios', t => {
|
|
159
|
-
const { index } = fixture(t);
|
|
160
|
-
const inputs = parameters(index);
|
|
161
|
-
const original = inputs.regions.find(region => region.mode === 'management-list');
|
|
162
|
-
inputs.regions.push({ ...original, id: 'second-list' });
|
|
163
|
-
const result = contract.checkCapabilities(inputs);
|
|
164
|
-
assert.equal(result.status, 'failed');
|
|
165
|
-
assert.ok(result.errors.some(error => error.includes('second-list/pagination')));
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
test('duplicate identity, unknown capability and unbound controls block sync without changing old index', t => {
|
|
169
|
-
const { directory } = fixture(t);
|
|
170
|
-
const initial = fs.readFileSync(path.join(directory, 'index.html'), 'utf8');
|
|
171
|
-
const indexBefore = fs.readFileSync(path.join(directory, 'capabilities.generated.json'), 'utf8');
|
|
172
|
-
for (const invalid of [
|
|
173
|
-
initial.replace('</main>', '<section data-page-id="devices"></section></main>'),
|
|
174
|
-
initial.replace('data-capability-id="pagination"', 'data-capability-id="unknown-widget"'),
|
|
175
|
-
initial.replace('</main>', '<button>Unmapped action</button></main>'),
|
|
176
|
-
]) {
|
|
177
|
-
fs.writeFileSync(path.join(directory, 'index.html'), invalid);
|
|
178
|
-
assert.throws(() => contract.syncTemplate(directory), /identity|capability|interaction|身份|能力|交互/);
|
|
179
|
-
assert.equal(fs.readFileSync(path.join(directory, 'capabilities.generated.json'), 'utf8'), indexBefore);
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
test('missing behavior parameters and manually edited index are rejected', t => {
|
|
184
|
-
const { directory } = fixture(t);
|
|
185
|
-
const inputs = parameters(contract.loadTemplate(directory).index);
|
|
186
|
-
inputs.bindings.find(binding => binding.capabilityId === 'selection').parameters = {};
|
|
187
|
-
assert.equal(contract.checkCapabilities(inputs).status, 'failed');
|
|
188
|
-
const file = path.join(directory, 'capabilities.generated.json');
|
|
189
|
-
const edited = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
190
|
-
edited.bindings = edited.bindings.filter(binding => binding.capabilityId !== 'pagination');
|
|
191
|
-
fs.writeFileSync(file, JSON.stringify(edited));
|
|
192
|
-
assert.throws(() => contract.loadTemplate(directory), /stale|不同步/);
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
test('a frozen input snapshot is checked independently of current built-ins', t => {
|
|
196
|
-
const { directory, index } = fixture(t);
|
|
197
|
-
const inputRoot = path.join(directory, 'fixed-inputs');
|
|
198
|
-
fs.mkdirSync(inputRoot);
|
|
199
|
-
fs.writeFileSync(path.join(inputRoot, 'capabilities.json'), JSON.stringify(parameters(index)));
|
|
200
|
-
fs.writeFileSync(path.join(inputRoot, 'scope.json'), JSON.stringify({ requirements: [], exemptions: [] }));
|
|
201
|
-
assert.equal(contract.checkInstanceCapabilities(inputRoot).status, 'passed');
|
|
202
|
-
const frozen = JSON.parse(fs.readFileSync(path.join(inputRoot, 'capabilities.json'), 'utf8'));
|
|
203
|
-
frozen.bindings = frozen.bindings.filter(binding => binding.capabilityId !== 'pagination');
|
|
204
|
-
fs.writeFileSync(path.join(inputRoot, 'capabilities.json'), JSON.stringify(frozen));
|
|
205
|
-
assert.equal(contract.checkInstanceCapabilities(inputRoot).status, 'failed');
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
test('frozen template regions cannot disappear or change mode in the instance contract', t => {
|
|
209
|
-
const { directory } = fixture(t);
|
|
210
|
-
const snapshot = contract.loadTemplate(directory);
|
|
211
|
-
const inputRoot = path.join(directory, 'fixed-inputs');
|
|
212
|
-
fs.mkdirSync(inputRoot);
|
|
213
|
-
fs.writeFileSync(path.join(inputRoot, 'template-snapshot.json'), JSON.stringify(snapshot));
|
|
214
|
-
const fixed = parameters(snapshot.index);
|
|
215
|
-
fixed.regions = fixed.regions.filter(region => region.mode !== 'management-list');
|
|
216
|
-
fixed.bindings = fixed.bindings.filter(binding => binding.regionId !== 'device-list');
|
|
217
|
-
fs.writeFileSync(path.join(inputRoot, 'capabilities.json'), JSON.stringify(fixed));
|
|
218
|
-
assert.equal(contract.checkInstanceCapabilities(inputRoot).status, 'failed');
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
test('remote resources, module scripts and async loads cannot become offline templates', t => {
|
|
222
|
-
const { directory } = fixture(t);
|
|
223
|
-
const html = fs.readFileSync(path.join(directory, 'index.html'), 'utf8');
|
|
224
|
-
for (const invalid of [html.replace('src="assets/reference.js"', 'src="https://example.test/reference.js"'), html.replace('<script src=', '<script type="module" src=')]) {
|
|
225
|
-
fs.writeFileSync(path.join(directory, 'index.html'), invalid);
|
|
226
|
-
assert.throws(() => contract.syncTemplate(directory), /offline|离线/);
|
|
227
|
-
}
|
|
228
|
-
fs.writeFileSync(path.join(directory, 'index.html'), html);
|
|
229
|
-
fs.appendFileSync(path.join(directory, 'assets/reference.js'), '\nfetch("parts/table.html")');
|
|
230
|
-
assert.throws(() => contract.syncTemplate(directory), /offline|离线/);
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
test('unsafe identifiers and symlinked user template directories never write outside project', t => {
|
|
234
|
-
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-ui-template-path-'));
|
|
235
|
-
const other = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-ui-template-other-'));
|
|
236
|
-
t.after(() => { fs.rmSync(project, { recursive: true, force: true }); fs.rmSync(other, { recursive: true, force: true }); });
|
|
237
|
-
assert.throws(() => legacyFixture.prepareTemplate(contract, { project, id: '../escape' }), /identifier|标识/);
|
|
238
|
-
fs.symlinkSync(other, path.join(project, 'ui-templates'), 'dir');
|
|
239
|
-
assert.throws(() => legacyFixture.prepareTemplate(contract, { project }), /symlink|符号链接/);
|
|
240
|
-
assert.deepEqual(fs.readdirSync(other), []);
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
test('content extraction reads visible headings, labels and button text with stable identities', t => {
|
|
244
|
-
const { directory }=fixture(t);
|
|
245
|
-
edit(directory,html=>html
|
|
246
|
-
.replace('<h1>设备管理</h1>','<h1>资产 & 设备</h1>')
|
|
247
|
-
.replace('data-field-id="device-name">设备名称','data-field-id="device-name">设备显示名称')
|
|
248
|
-
.replace('设备名称 <span aria-label="必填">*','资产名称 <span aria-label="必填">*')
|
|
249
|
-
.replace('data-action-id="query" type="button">查询','data-action-id="query" type="button"><strong>检索设备</strong>'));
|
|
250
|
-
const index=contract.syncTemplate(directory);
|
|
251
|
-
assert.equal(index.pages[0].title,'资产 & 设备');
|
|
252
|
-
assert.equal(index.fields.find(item=>item.localId==='device-name').label,'设备显示名称');
|
|
253
|
-
assert.equal(index.fields.find(item=>item.localId==='edit-name').label,'资产名称');
|
|
254
|
-
assert.equal(index.fields.find(item=>item.localId==='query-status').label,'设备状态');
|
|
255
|
-
assert.equal(index.actions.find(item=>item.localId==='query').label,'检索设备');
|
|
256
|
-
const projected=contract.projectAdminListContent(contract.loadTemplate(directory));
|
|
257
|
-
assert.equal(projected.pageTitle,'资产 & 设备');
|
|
258
|
-
assert.equal(projected.fields.name.label,'设备显示名称');
|
|
259
|
-
assert.equal(projected.fields.editName.label,'资产名称');
|
|
260
|
-
assert.equal(projected.actions.query,'检索设备');
|
|
261
|
-
});
|
|
@@ -1,124 +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 installationFile = path.join(__dirname, 'lib/installation.js');
|
|
8
|
-
const skillsDirectory = fs.existsSync(installationFile) ? require(installationFile).loadInstallation().skillsDirectory : path.resolve(__dirname, '../skills');
|
|
9
|
-
const lib = require(path.join(skillsDirectory, 'i3-ui-prototype/scripts/prototype-lib.cjs'));
|
|
10
|
-
|
|
11
|
-
function fixture(t, template = 'classic-admin') {
|
|
12
|
-
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-ui-prototype-'));
|
|
13
|
-
t.after(() => fs.rmSync(project, { recursive: true, force: true }));
|
|
14
|
-
return lib.initPrototype({ project, id: 'approval-demo', template, expertMode: 'template' }).directory;
|
|
15
|
-
}
|
|
16
|
-
function json(dir, file) { return JSON.parse(fs.readFileSync(path.join(dir, file), 'utf8')); }
|
|
17
|
-
function write(dir, file, value) { fs.mkdirSync(path.dirname(path.join(dir, file)), { recursive: true }); fs.writeFileSync(path.join(dir, file), JSON.stringify(value, null, 2)); }
|
|
18
|
-
function browserEvidence(dir) {
|
|
19
|
-
const revision = lib.contentManifest(dir);
|
|
20
|
-
fs.mkdirSync(path.join(dir, 'qa/screenshots'), { recursive: true });
|
|
21
|
-
fs.writeFileSync(path.join(dir, 'qa/screenshots/test.png'), Buffer.from('test evidence; not a real browser image'));
|
|
22
|
-
write(dir, 'qa/browser.json', { schemaVersion: 1, revision: revision.revision, digest: revision.digest, status: 'passed', source: 'isolated-test-fixture', screenshots: ['qa/screenshots/test.png'], journeys: [{ id: 'approval-flow', status: 'passed' }], consoleErrors: [], viewports: [1440, 768] });
|
|
23
|
-
}
|
|
24
|
-
test('default professional mode stops on missing dependency without writing a prototype', t => {
|
|
25
|
-
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-ui-missing-'));
|
|
26
|
-
t.after(() => fs.rmSync(project, { recursive: true, force: true }));
|
|
27
|
-
const result = lib.initPrototype({ project, id: 'example', providerRoots: [], discover: false });
|
|
28
|
-
assert.equal(result.status, 'needs-design-provider');
|
|
29
|
-
assert.deepEqual(result.choices.map(x => x.id), ['install', 'template', 'prepare']);
|
|
30
|
-
assert.equal(fs.existsSync(path.join(project, 'prototypes')), false);
|
|
31
|
-
});
|
|
32
|
-
test('template mode has an interactive runnable app and no expert usage claim', t => {
|
|
33
|
-
const dir = fixture(t);
|
|
34
|
-
const metadata = json(dir, 'prototype.json');
|
|
35
|
-
assert.equal(metadata.expertMode, 'template');
|
|
36
|
-
assert.equal(metadata.expert.status, 'skipped');
|
|
37
|
-
assert.equal(metadata.review.status, 'pending-review');
|
|
38
|
-
assert.equal(lib.checkPrototype(dir).status, 'passed');
|
|
39
|
-
assert.ok(fs.existsSync(path.join(dir, 'app/index.html')));
|
|
40
|
-
assert.throws(() => lib.initPrototype({ project: path.resolve(dir, '../..'), id: 'approval-demo', expertMode: 'template' }), /exists|已存在/);
|
|
41
|
-
});
|
|
42
|
-
test('all three legacy templates retain their distinct tokens and layouts', t => {
|
|
43
|
-
const values = lib.listTemplates({ legacy: true }).map(entry => {
|
|
44
|
-
const dir = fixture(t, entry.id);
|
|
45
|
-
assert.equal(lib.checkPrototype(dir).status, 'passed');
|
|
46
|
-
return { layout: json(dir, 'app/config.json').layout, primary: json(dir, 'design-system/tokens.json').semantic['color-primary'] };
|
|
47
|
-
});
|
|
48
|
-
assert.equal(values.length, 3);
|
|
49
|
-
assert.equal(new Set(values.map(v => v.layout)).size, 3);
|
|
50
|
-
assert.equal(new Set(values.map(v => v.primary)).size, 3);
|
|
51
|
-
});
|
|
52
|
-
test('baseline requires matching browser evidence and human confirmation, and is immutable', t => {
|
|
53
|
-
const dir = fixture(t);
|
|
54
|
-
const candidate = lib.contentManifest(dir);
|
|
55
|
-
assert.throws(() => lib.freezeBaseline(dir, { revision: candidate.revision, digest: candidate.digest, reviewer: 'Test reviewer', statement: 'Approved fixture', source: 'isolated-test' }), /browser|浏览器/);
|
|
56
|
-
browserEvidence(dir);
|
|
57
|
-
assert.throws(() => lib.freezeBaseline(dir, {}), /confirm|确认/);
|
|
58
|
-
const baseline = lib.freezeBaseline(dir, { revision: candidate.revision, digest: candidate.digest, reviewer: 'Test reviewer', statement: 'Approved fixture', source: 'isolated-test' });
|
|
59
|
-
assert.equal(baseline.digest, candidate.digest);
|
|
60
|
-
assert.throws(() => lib.freezeBaseline(dir, { revision: candidate.revision, digest: candidate.digest, reviewer: 'Test reviewer', statement: 'Approved fixture', source: 'isolated-test' }), /exists|已存在/);
|
|
61
|
-
const reviewFile = path.join(dir, 'baselines', candidate.revision, 'review.json');
|
|
62
|
-
const originalReview = fs.readFileSync(reviewFile);
|
|
63
|
-
const alteredReview = JSON.parse(originalReview); alteredReview.reviewer = 'Different reviewer';
|
|
64
|
-
fs.writeFileSync(reviewFile, JSON.stringify(alteredReview));
|
|
65
|
-
assert.equal(lib.compareBaseline(dir).status, 'corrupt-baseline');
|
|
66
|
-
fs.writeFileSync(reviewFile, originalReview);
|
|
67
|
-
fs.appendFileSync(path.join(dir, 'baselines', candidate.revision, 'app/styles.css'), '\n/* altered snapshot */');
|
|
68
|
-
assert.equal(lib.compareBaseline(dir).status, 'corrupt-baseline');
|
|
69
|
-
});
|
|
70
|
-
test('changed content invalidates old verification and cannot reuse old confirmation', t => {
|
|
71
|
-
const dir = fixture(t);
|
|
72
|
-
browserEvidence(dir);
|
|
73
|
-
const old = lib.contentManifest(dir);
|
|
74
|
-
fs.appendFileSync(path.join(dir, 'app/styles.css'), '\n/* modified */');
|
|
75
|
-
assert.throws(() => lib.freezeBaseline(dir, { revision: old.revision, digest: old.digest, reviewer: 'Test', statement: 'Approved', source: 'isolated-test' }), /matching|一致|changed|变化/);
|
|
76
|
-
});
|
|
77
|
-
test('iteration preserves baseline and identifies changes to design constraints', t => {
|
|
78
|
-
const dir = fixture(t);
|
|
79
|
-
browserEvidence(dir);
|
|
80
|
-
const current = lib.contentManifest(dir);
|
|
81
|
-
lib.freezeBaseline(dir, { revision: current.revision, digest: current.digest, reviewer: 'Test', statement: 'Approved fixture', source: 'isolated-test' });
|
|
82
|
-
lib.revisePrototype(dir, 'r002');
|
|
83
|
-
const tokens = json(dir, 'design-system/tokens.json');
|
|
84
|
-
tokens.semantic['color-primary'] = '#222222';
|
|
85
|
-
write(dir, 'design-system/tokens.json', tokens);
|
|
86
|
-
const result = lib.compareBaseline(dir);
|
|
87
|
-
assert.equal(result.status, 'changed');
|
|
88
|
-
assert.ok(result.protectedChanges.includes('design-system/tokens.json'));
|
|
89
|
-
assert.equal(json(dir, 'baseline.json').revision, 'r001');
|
|
90
|
-
assert.equal(json(dir, 'prototype.json').review.status, 'pending-review');
|
|
91
|
-
});
|
|
92
|
-
test('design token changes must be reflected in the actual runtime stylesheet', t => {
|
|
93
|
-
const dir = fixture(t);
|
|
94
|
-
const tokens = json(dir, 'design-system/tokens.json');
|
|
95
|
-
tokens.semantic['color-primary'] = '#222222';
|
|
96
|
-
write(dir, 'design-system/tokens.json', tokens);
|
|
97
|
-
assert.equal(lib.checkPrototype(dir).status, 'failed');
|
|
98
|
-
});
|
|
99
|
-
test('a manually created candidate cannot pass with an uncomputed template digest', t => {
|
|
100
|
-
const dir = fixture(t);
|
|
101
|
-
const metadata = json(dir, 'prototype.json');
|
|
102
|
-
metadata.template.digest = 'manual-init-uncomputed';
|
|
103
|
-
write(dir, 'prototype.json', metadata);
|
|
104
|
-
assert.equal(lib.checkPrototype(dir).status, 'failed');
|
|
105
|
-
});
|
|
106
|
-
test('unsafe identifiers and symlinked output parents are rejected before writes', t => {
|
|
107
|
-
const project = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-ui-path-'));
|
|
108
|
-
const elsewhere = fs.mkdtempSync(path.join(os.tmpdir(), 'i3-ui-elsewhere-'));
|
|
109
|
-
t.after(() => { fs.rmSync(project, { recursive: true, force: true }); fs.rmSync(elsewhere, { recursive: true, force: true }); });
|
|
110
|
-
assert.throws(() => lib.initPrototype({ project, id: '../escape', expertMode: 'template' }), /identifier|标识/);
|
|
111
|
-
fs.symlinkSync(elsewhere, path.join(project, 'prototypes'), 'dir');
|
|
112
|
-
assert.throws(() => lib.initPrototype({ project, id: 'safe', expertMode: 'template' }), /symlink|符号链接/);
|
|
113
|
-
assert.deepEqual(fs.readdirSync(elsewhere), []);
|
|
114
|
-
});
|
|
115
|
-
test('a real review can reject every recommendation without inventing adoption at freeze', t => {
|
|
116
|
-
const dir=fixture(t); const metadata=json(dir,'prototype.json');
|
|
117
|
-
metadata.expertMode='professional'; metadata.expert={status:'reviewed'}; write(dir,'prototype.json',metadata);
|
|
118
|
-
write(dir,'qa/design-advice.json',{schemaVersion:1,mode:'professional',provider:{digest:'a'.repeat(64)},records:[{decision:'rejected',query:'targeted UX review',resultIdentity:'unit-fixture-result',rationale:'Fixture is intentionally incompatible with locked design',verification:'Reviewed against fixture contract'}]});
|
|
119
|
-
browserEvidence(dir);
|
|
120
|
-
const current=lib.contentManifest(dir);
|
|
121
|
-
assert.equal(lib.checkPrototype(dir,{acceptance:true}).status,'passed');
|
|
122
|
-
lib.freezeBaseline(dir,{revision:current.revision,digest:current.digest,reviewer:'Fixture reviewer',statement:'Isolated guard test only',source:'unit-test-fixture'});
|
|
123
|
-
assert.equal(json(dir,'prototype.json').expert.status,'reviewed');
|
|
124
|
-
});
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
// Synthetic files and in-memory configuration only; never installs or launches a host.
|
|
3
|
-
const fs=require('node:fs'),path=require('node:path'),os=require('node:os'),test=require('node:test'),assert=require('node:assert/strict');
|
|
4
|
-
const prototypeScripts=(()=>{const 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');})();
|
|
5
|
-
const E=require(prototypeScripts+'/execution-evidence.cjs'),C=require(prototypeScripts+'/codebuddy-context.cjs'),R=require(prototypeScripts+'/codebuddy-registration.cjs');
|
|
6
|
-
function fixture(t) {
|
|
7
|
-
const root=fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(),'i3-transcript-contract-'))),project=path.join(root,'business'),native=path.join(root,'native');
|
|
8
|
-
fs.mkdirSync(project);fs.mkdirSync(native);t.after(()=>fs.rmSync(root,{recursive:true,force:true}));
|
|
9
|
-
const rows=[{type:'user',sessionId:'session-a',message:{content:'生成当前原型'}},{type:'assistant',sessionId:'session-a',message:{content:[{type:'tool_use',id:'front-1',name:'Skill',input:{skill:'i3-frontend-ui-engineering'}}]}},{type:'user',sessionId:'session-a',message:{content:[{type:'tool_result',tool_use_id:'front-1',content:'Native fixture instructions'}]}}];
|
|
10
|
-
const file=path.join(native,'session.txt');fs.writeFileSync(file,rows.map(JSON.stringify).join('\n')+'\n');return {root,project,native,file,rows};
|
|
11
|
-
}
|
|
12
|
-
test('new IDE and CLI registrations default to automatic transcripts in both scopes',()=>{
|
|
13
|
-
for(const product of ['ide','cli'])for(const scope of ['project','global']) {
|
|
14
|
-
const base=scope==='project'?'/work/p/.codebuddy':'/users/u/.codebuddy';
|
|
15
|
-
const change=R.plan({action:'enable',product,scope,base,project:'/work/p',nodePath:'/node',scriptPath:base+'/hooks/i3-prototype.cjs',scriptDigest:'a'.repeat(64)});
|
|
16
|
-
assert.equal(change.recordAfter.transcriptMode,'auto');assert.deepEqual(change.recordAfter.transcriptRoots,[]);
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
test('manual and legacy root restrictions are retained; empty manual policy is rejected',()=>{
|
|
20
|
-
const options={action:'enable',product:'ide',scope:'project',base:'/work/p/.codebuddy',project:'/work/p',nodePath:'/node',scriptPath:'/fixed/hook.cjs',scriptDigest:'a'.repeat(64),transcriptRoots:['/native/logs']};
|
|
21
|
-
const first=R.plan(options);assert.equal(first.recordAfter.transcriptMode,'manual');
|
|
22
|
-
const legacy=structuredClone(first.recordAfter);delete legacy.transcriptMode;
|
|
23
|
-
const kept=R.plan({...options,action:'keep',transcriptRoots:undefined,currentText:first.afterText,record:legacy});
|
|
24
|
-
assert.equal(kept.recordAfter.transcriptMode,'manual');assert.deepEqual(kept.recordAfter.transcriptRoots,['/native/logs']);
|
|
25
|
-
assert.throws(()=>R.plan({...options,transcriptMode:'manual',transcriptRoots:[]}),/manual|roots/i);
|
|
26
|
-
});
|
|
27
|
-
test('automatic source uses the exact callback file regardless of filename suffix',t=>{
|
|
28
|
-
const f=fixture(t),payload={transcript_path:f.file,session_id:'session-a'};
|
|
29
|
-
const source=C.source(payload,{transcriptMode:'auto',transcriptRoots:[]},f.project);
|
|
30
|
-
assert.equal(source.path,f.file);assert.equal(E.loaded(source.calls,'frontend').length,1);assert.equal(source.tamperProof,false);
|
|
31
|
-
assert.equal(source.sourceVerification,'native-hook-transcript');
|
|
32
|
-
});
|
|
33
|
-
test('automatic discovery never admits business files, leaf symlinks or missing files',t=>{
|
|
34
|
-
const f=fixture(t),record={transcriptMode:'auto',transcriptRoots:[]},load=file=>C.source({transcript_path:file,session_id:'session-a'},record,f.project);
|
|
35
|
-
const fake=path.join(f.project,'qa.jsonl');fs.copyFileSync(f.file,fake);assert.throws(()=>load(fake),/business project/i);
|
|
36
|
-
const alias=path.join(f.native,'alias.jsonl');fs.symlinkSync(f.file,alias);assert.throws(()=>load(alias),/symlink|native transcript/i);
|
|
37
|
-
assert.throws(()=>load(path.join(f.native,'missing.jsonl')),/not.*available|ENOENT/i);
|
|
38
|
-
assert.throws(()=>load('relative.jsonl'),/absolute|native transcript/i);
|
|
39
|
-
});
|
|
40
|
-
test('automatic source still rejects malformed streams, forged declarations and mismatched sessions',t=>{
|
|
41
|
-
const f=fixture(t),record={transcriptMode:'auto',transcriptRoots:[]},payload={transcript_path:f.file,session_id:'different'};
|
|
42
|
-
assert.throws(()=>C.source(payload,record,f.project),/session/i);
|
|
43
|
-
payload.session_id='session-a';
|
|
44
|
-
for(const content of ['plain transcript text','{"skill":"frontend","passed":true}\n','{"type":"assistant","message":{"content":[]}}\n']) {
|
|
45
|
-
fs.writeFileSync(f.file,content);assert.throws(()=>C.source(payload,record,f.project),/JSONL|native|Native|user task/);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
test('manual roots remain enforced even when a valid callback points elsewhere',t=>{
|
|
49
|
-
const f=fixture(t),record={transcriptMode:'manual',transcriptRoots:[path.join(f.root,'other')]};
|
|
50
|
-
assert.throws(()=>C.source({transcript_path:f.file,session_id:'session-a'},record,f.project),/outside.*roots/);
|
|
51
|
-
record.transcriptRoots=[f.native];assert.equal(C.source({transcript_path:f.file,session_id:'session-a'},record,f.project).path,f.file);
|
|
52
|
-
});
|
|
53
|
-
test('automatic reading refuses oversized native files without parsing their contents',t=>{
|
|
54
|
-
const f=fixture(t);fs.truncateSync(f.file,64*1024*1024+1);
|
|
55
|
-
assert.throws(()=>C.source({transcript_path:f.file,session_id:'session-a'},{transcriptMode:'auto',transcriptRoots:[]},f.project),/oversized|native transcript/i);
|
|
56
|
-
});
|
|
57
|
-
test('unreadable native transcripts cannot become valid evidence',t=>{
|
|
58
|
-
const f=fixture(t);fs.chmodSync(f.file,0);
|
|
59
|
-
try{assert.throws(()=>C.source({transcript_path:f.file,session_id:'session-a'},{transcriptMode:'auto',transcriptRoots:[]},f.project),/EACCES|EPERM/);}
|
|
60
|
-
finally{fs.chmodSync(f.file,0o600);}
|
|
61
|
-
});
|
|
62
|
-
test('missing callback identity and contradictory policy cannot fall back to another log',t=>{
|
|
63
|
-
const f=fixture(t),record={transcriptMode:'auto',transcriptRoots:[]};
|
|
64
|
-
assert.throws(()=>C.source({session_id:'session-a'},record,f.project),/fields required/);
|
|
65
|
-
assert.throws(()=>C.source({transcript_path:f.file},record,f.project),/fields required/);
|
|
66
|
-
assert.throws(()=>C.source({transcript_path:f.file,session_id:'session-a'},{...record,transcriptRoots:[f.native]},f.project),/manual roots/);
|
|
67
|
-
});
|