eai-cli 0.0.0-bootstrap.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +183 -0
- package/NOTICE +4 -0
- package/README.md +14 -0
- package/dist/commands/agent.d.ts +3 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +69 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/blocks.d.ts +3 -0
- package/dist/commands/blocks.d.ts.map +1 -0
- package/dist/commands/blocks.js +249 -0
- package/dist/commands/blocks.js.map +1 -0
- package/dist/commands/chat.d.ts +6 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/chat.js +105 -0
- package/dist/commands/chat.js.map +1 -0
- package/dist/commands/deploy.d.ts +36 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +712 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/dev.d.ts +15 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +133 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/docs.d.ts +6 -0
- package/dist/commands/docs.d.ts.map +1 -0
- package/dist/commands/docs.js +118 -0
- package/dist/commands/docs.js.map +1 -0
- package/dist/commands/env.d.ts +10 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +200 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/errors.d.ts +3 -0
- package/dist/commands/errors.d.ts.map +1 -0
- package/dist/commands/errors.js +72 -0
- package/dist/commands/errors.js.map +1 -0
- package/dist/commands/gofer.d.ts +3 -0
- package/dist/commands/gofer.d.ts.map +1 -0
- package/dist/commands/gofer.js +134 -0
- package/dist/commands/gofer.js.map +1 -0
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1437 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/login.d.ts +7 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +117 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/provision.d.ts +6 -0
- package/dist/commands/provision.d.ts.map +1 -0
- package/dist/commands/provision.js +855 -0
- package/dist/commands/provision.js.map +1 -0
- package/dist/commands/publicapi.d.ts +6 -0
- package/dist/commands/publicapi.d.ts.map +1 -0
- package/dist/commands/publicapi.js +184 -0
- package/dist/commands/publicapi.js.map +1 -0
- package/dist/commands/resources.d.ts +38 -0
- package/dist/commands/resources.d.ts.map +1 -0
- package/dist/commands/resources.js +1010 -0
- package/dist/commands/resources.js.map +1 -0
- package/dist/commands/runtime.d.ts +3 -0
- package/dist/commands/runtime.d.ts.map +1 -0
- package/dist/commands/runtime.js +78 -0
- package/dist/commands/runtime.js.map +1 -0
- package/dist/commands/template.d.ts +3 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/template.js +365 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/tenant.d.ts +45 -0
- package/dist/commands/tenant.d.ts.map +1 -0
- package/dist/commands/tenant.js +1036 -0
- package/dist/commands/tenant.js.map +1 -0
- package/dist/commands/types.d.ts +130 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +1636 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/update.d.ts +13 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +163 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/user.d.ts +6 -0
- package/dist/commands/user.d.ts.map +1 -0
- package/dist/commands/user.js +359 -0
- package/dist/commands/user.js.map +1 -0
- package/dist/commands/verify.d.ts +40 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +1442 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/vertical.d.ts +24 -0
- package/dist/commands/vertical.d.ts.map +1 -0
- package/dist/commands/vertical.js +301 -0
- package/dist/commands/vertical.js.map +1 -0
- package/dist/commands/whoami.d.ts +6 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +73 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/commands/workflow.d.ts +6 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +400 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +272 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/agent-guide.d.ts +24 -0
- package/dist/lib/agent-guide.d.ts.map +1 -0
- package/dist/lib/agent-guide.js +155 -0
- package/dist/lib/agent-guide.js.map +1 -0
- package/dist/lib/api.d.ts +338 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +991 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/auth.d.ts +65 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +592 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/azure-cli.d.ts +6 -0
- package/dist/lib/azure-cli.d.ts.map +1 -0
- package/dist/lib/azure-cli.js +13 -0
- package/dist/lib/azure-cli.js.map +1 -0
- package/dist/lib/block-catalog-normalize.d.ts +47 -0
- package/dist/lib/block-catalog-normalize.d.ts.map +1 -0
- package/dist/lib/block-catalog-normalize.js +355 -0
- package/dist/lib/block-catalog-normalize.js.map +1 -0
- package/dist/lib/block-catalog-types.d.ts +111 -0
- package/dist/lib/block-catalog-types.d.ts.map +1 -0
- package/dist/lib/block-catalog-types.js +41 -0
- package/dist/lib/block-catalog-types.js.map +1 -0
- package/dist/lib/block-catalog-utils.d.ts +7 -0
- package/dist/lib/block-catalog-utils.d.ts.map +1 -0
- package/dist/lib/block-catalog-utils.js +47 -0
- package/dist/lib/block-catalog-utils.js.map +1 -0
- package/dist/lib/block-catalog-validation.d.ts +5 -0
- package/dist/lib/block-catalog-validation.d.ts.map +1 -0
- package/dist/lib/block-catalog-validation.js +112 -0
- package/dist/lib/block-catalog-validation.js.map +1 -0
- package/dist/lib/block-catalog.d.ts +3 -0
- package/dist/lib/block-catalog.d.ts.map +1 -0
- package/dist/lib/block-catalog.js +284 -0
- package/dist/lib/block-catalog.js.map +1 -0
- package/dist/lib/cloud-env.d.ts +25 -0
- package/dist/lib/cloud-env.d.ts.map +1 -0
- package/dist/lib/cloud-env.js +79 -0
- package/dist/lib/cloud-env.js.map +1 -0
- package/dist/lib/config.d.ts +116 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +195 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/context.d.ts +43 -0
- package/dist/lib/context.d.ts.map +1 -0
- package/dist/lib/context.js +68 -0
- package/dist/lib/context.js.map +1 -0
- package/dist/lib/error-codes.d.ts +56 -0
- package/dist/lib/error-codes.d.ts.map +1 -0
- package/dist/lib/error-codes.js +211 -0
- package/dist/lib/error-codes.js.map +1 -0
- package/dist/lib/error-guidance/catalog.d.ts +648 -0
- package/dist/lib/error-guidance/catalog.d.ts.map +1 -0
- package/dist/lib/error-guidance/catalog.js +940 -0
- package/dist/lib/error-guidance/catalog.js.map +1 -0
- package/dist/lib/error-guidance/match.d.ts +3 -0
- package/dist/lib/error-guidance/match.d.ts.map +1 -0
- package/dist/lib/error-guidance/match.js +46 -0
- package/dist/lib/error-guidance/match.js.map +1 -0
- package/dist/lib/error-guidance/render.d.ts +5 -0
- package/dist/lib/error-guidance/render.d.ts.map +1 -0
- package/dist/lib/error-guidance/render.js +92 -0
- package/dist/lib/error-guidance/render.js.map +1 -0
- package/dist/lib/error-guidance/types.d.ts +76 -0
- package/dist/lib/error-guidance/types.d.ts.map +1 -0
- package/dist/lib/error-guidance/types.js +2 -0
- package/dist/lib/error-guidance/types.js.map +1 -0
- package/dist/lib/error-guidance/validate.d.ts +3 -0
- package/dist/lib/error-guidance/validate.d.ts.map +1 -0
- package/dist/lib/error-guidance/validate.js +59 -0
- package/dist/lib/error-guidance/validate.js.map +1 -0
- package/dist/lib/gofer-installer.d.ts +32 -0
- package/dist/lib/gofer-installer.d.ts.map +1 -0
- package/dist/lib/gofer-installer.js +589 -0
- package/dist/lib/gofer-installer.js.map +1 -0
- package/dist/lib/gofer-refresh.d.ts +46 -0
- package/dist/lib/gofer-refresh.d.ts.map +1 -0
- package/dist/lib/gofer-refresh.js +536 -0
- package/dist/lib/gofer-refresh.js.map +1 -0
- package/dist/lib/next-route-exports.d.ts +6 -0
- package/dist/lib/next-route-exports.d.ts.map +1 -0
- package/dist/lib/next-route-exports.js +127 -0
- package/dist/lib/next-route-exports.js.map +1 -0
- package/dist/lib/npm.d.ts +2 -0
- package/dist/lib/npm.d.ts.map +1 -0
- package/dist/lib/npm.js +4 -0
- package/dist/lib/npm.js.map +1 -0
- package/dist/lib/object-type-defaults.d.ts +4 -0
- package/dist/lib/object-type-defaults.d.ts.map +1 -0
- package/dist/lib/object-type-defaults.js +72 -0
- package/dist/lib/object-type-defaults.js.map +1 -0
- package/dist/lib/output.d.ts +35 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +166 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/profile.d.ts +52 -0
- package/dist/lib/profile.d.ts.map +1 -0
- package/dist/lib/profile.js +116 -0
- package/dist/lib/profile.js.map +1 -0
- package/dist/lib/project-manifest.d.ts +42 -0
- package/dist/lib/project-manifest.d.ts.map +1 -0
- package/dist/lib/project-manifest.js +191 -0
- package/dist/lib/project-manifest.js.map +1 -0
- package/dist/lib/resourceapi-bundle.d.ts +33 -0
- package/dist/lib/resourceapi-bundle.d.ts.map +1 -0
- package/dist/lib/resourceapi-bundle.js +79 -0
- package/dist/lib/resourceapi-bundle.js.map +1 -0
- package/dist/lib/runtime-contract.d.ts +84 -0
- package/dist/lib/runtime-contract.d.ts.map +1 -0
- package/dist/lib/runtime-contract.js +318 -0
- package/dist/lib/runtime-contract.js.map +1 -0
- package/dist/lib/schema-builder.d.ts +28 -0
- package/dist/lib/schema-builder.d.ts.map +1 -0
- package/dist/lib/schema-builder.js +69 -0
- package/dist/lib/schema-builder.js.map +1 -0
- package/dist/lib/tenant-context.d.ts +127 -0
- package/dist/lib/tenant-context.d.ts.map +1 -0
- package/dist/lib/tenant-context.js +573 -0
- package/dist/lib/tenant-context.js.map +1 -0
- package/dist/lib/update-check.d.ts +52 -0
- package/dist/lib/update-check.d.ts.map +1 -0
- package/dist/lib/update-check.js +271 -0
- package/dist/lib/update-check.js.map +1 -0
- package/dist/lib/update-maintenance.d.ts +15 -0
- package/dist/lib/update-maintenance.d.ts.map +1 -0
- package/dist/lib/update-maintenance.js +187 -0
- package/dist/lib/update-maintenance.js.map +1 -0
- package/dist/lib/utils.d.ts +23 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +48 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/workflow-provisioning.d.ts +54 -0
- package/dist/lib/workflow-provisioning.d.ts.map +1 -0
- package/dist/lib/workflow-provisioning.js +281 -0
- package/dist/lib/workflow-provisioning.js.map +1 -0
- package/package.json +51 -0
- package/resources/gofer/.gofer-version +7 -0
- package/resources/gofer/agents-skills/0_gofer_start/SKILL.md +1287 -0
- package/resources/gofer/agents-skills/0a_problem_validation/SKILL.md +429 -0
- package/resources/gofer/agents-skills/10_gofer_cloud/SKILL.md +635 -0
- package/resources/gofer/agents-skills/1_gofer_research/SKILL.md +1159 -0
- package/resources/gofer/agents-skills/2_gofer_specify/SKILL.md +860 -0
- package/resources/gofer/agents-skills/3_gofer_plan/SKILL.md +886 -0
- package/resources/gofer/agents-skills/4_gofer_tasks/SKILL.md +748 -0
- package/resources/gofer/agents-skills/5_gofer_implement/SKILL.md +924 -0
- package/resources/gofer/agents-skills/6_gofer_validate/SKILL.md +2269 -0
- package/resources/gofer/agents-skills/7_gofer_save/SKILL.md +423 -0
- package/resources/gofer/agents-skills/7a_stakeholder_comms/SKILL.md +508 -0
- package/resources/gofer/agents-skills/8_gofer_branding/SKILL.md +315 -0
- package/resources/gofer/agents-skills/9_gofer_tests/SKILL.md +558 -0
- package/resources/gofer/agents-skills/gofer_bootstrap_workspace/SKILL.md +148 -0
- package/resources/gofer/agents-skills/gofer_check_workspace/SKILL.md +119 -0
- package/resources/gofer/agents-skills/gofer_constitution/SKILL.md +612 -0
- package/resources/gofer/agents-skills/gofer_diagnose/SKILL.md +114 -0
- package/resources/gofer/agents-skills/gofer_eai_first_run/SKILL.md +397 -0
- package/resources/gofer/agents-skills/gofer_hydrate/SKILL.md +561 -0
- package/resources/gofer/agents-skills/gofer_personality/SKILL.md +44 -0
- package/resources/gofer/agents-skills/gofer_plan/SKILL.md +40 -0
- package/resources/gofer/agents-skills/gofer_side/SKILL.md +45 -0
- package/resources/gofer/agents-skills/gofer_spec_summary/SKILL.md +112 -0
- package/resources/gofer/agents-skills/gofer_tdd/SKILL.md +112 -0
- package/resources/gofer/agents-skills/gofer_vocabulary/SKILL.md +112 -0
- package/resources/gofer/agents-skills/gofer_zoom_out/SKILL.md +112 -0
- package/resources/gofer/bash-scripts/check-context-health.sh +365 -0
- package/resources/gofer/bash-scripts/check-persona-pack.sh +81 -0
- package/resources/gofer/bash-scripts/check-prerequisites.sh +168 -0
- package/resources/gofer/bash-scripts/common.sh +192 -0
- package/resources/gofer/bash-scripts/create-new-feature.sh +260 -0
- package/resources/gofer/bash-scripts/install-optional-tools.sh +270 -0
- package/resources/gofer/bash-scripts/log-stage.sh +224 -0
- package/resources/gofer/bash-scripts/mark-task-complete.sh +74 -0
- package/resources/gofer/bash-scripts/pipeline-state.sh +306 -0
- package/resources/gofer/bash-scripts/read-failed-approaches.sh +114 -0
- package/resources/gofer/bash-scripts/read-session-memories.sh +96 -0
- package/resources/gofer/bash-scripts/save-checkpoint.sh +407 -0
- package/resources/gofer/bash-scripts/setup-plan.sh +62 -0
- package/resources/gofer/bash-scripts/sync-implementation-status.sh +47 -0
- package/resources/gofer/bash-scripts/update-agent-context.sh +772 -0
- package/resources/gofer/bash-scripts/validate-artifact.sh +335 -0
- package/resources/gofer/bash-scripts/verify-task.sh +384 -0
- package/resources/gofer/bash-scripts/write-failed-approach.sh +110 -0
- package/resources/gofer/bash-scripts/write-periodic-checkpoint.sh +128 -0
- package/resources/gofer/bash-scripts/write-session-memory.sh +118 -0
- package/resources/gofer/claude-agents/assumption-tracker.md +168 -0
- package/resources/gofer/claude-agents/business-metrics-analyzer.md +169 -0
- package/resources/gofer/claude-agents/business-problem-validator.md +168 -0
- package/resources/gofer/claude-agents/codebase-analyzer.md +124 -0
- package/resources/gofer/claude-agents/codebase-locator.md +95 -0
- package/resources/gofer/claude-agents/codebase-pattern-finder.md +180 -0
- package/resources/gofer/claude-agents/comms-writer.md +158 -0
- package/resources/gofer/claude-agents/engineer-review.md +169 -0
- package/resources/gofer/claude-agents/implement-bug-triangulator.md +94 -0
- package/resources/gofer/claude-agents/implement-code-review-council.md +89 -0
- package/resources/gofer/claude-agents/implement-doc-writer.md +89 -0
- package/resources/gofer/claude-agents/implement-error-hardener.md +84 -0
- package/resources/gofer/claude-agents/implement-performance-explorer.md +95 -0
- package/resources/gofer/claude-agents/implement-test-diversifier.md +82 -0
- package/resources/gofer/claude-agents/implement-variant-generator.md +80 -0
- package/resources/gofer/claude-agents/multi-perspective-judge.md +114 -0
- package/resources/gofer/claude-agents/plan-api-comparator.md +90 -0
- package/resources/gofer/claude-agents/plan-architecture-diverger.md +100 -0
- package/resources/gofer/claude-agents/plan-data-model-stress-tester.md +95 -0
- package/resources/gofer/claude-agents/plan-migration-path-finder.md +95 -0
- package/resources/gofer/claude-agents/plan-refactor-rewrite-advisor.md +97 -0
- package/resources/gofer/claude-agents/research-dependency-evaluator.md +106 -0
- package/resources/gofer/claude-agents/research-horizon-scanner.md +100 -0
- package/resources/gofer/claude-agents/research-market-scanner.md +137 -0
- package/resources/gofer/claude-agents/research-perspective-multiplier.md +102 -0
- package/resources/gofer/claude-agents/scope-creep-detector.md +152 -0
- package/resources/gofer/claude-agents/specify-ambiguity-detector.md +95 -0
- package/resources/gofer/claude-agents/specify-journey-stress-tester.md +92 -0
- package/resources/gofer/claude-agents/tasks-cross-cutting-scanner.md +91 -0
- package/resources/gofer/claude-agents/tasks-rollback-planner.md +89 -0
- package/resources/gofer/claude-agents/validate-security-red-team.md +102 -0
- package/resources/gofer/claude-agents/validation-correctness.md +103 -0
- package/resources/gofer/claude-agents/validation-integration.md +129 -0
- package/resources/gofer/claude-agents/validation-performance.md +120 -0
- package/resources/gofer/claude-agents/validation-security.md +115 -0
- package/resources/gofer/claude-agents/validation-standards.md +151 -0
- package/resources/gofer/claude-agents/validation-test-quality.md +146 -0
- package/resources/gofer/claude-agents/visual-bounded-context-writer.md +40 -0
- package/resources/gofer/claude-agents/visual-c4-writer.md +45 -0
- package/resources/gofer/claude-agents/visual-erd-writer.md +34 -0
- package/resources/gofer/claude-agents/visual-heatmap-writer.md +63 -0
- package/resources/gofer/claude-agents/visual-risk-writer.md +64 -0
- package/resources/gofer/claude-commands/0_gofer_start.md +1282 -0
- package/resources/gofer/claude-commands/0a_problem_validation.md +424 -0
- package/resources/gofer/claude-commands/10_gofer_cloud.md +630 -0
- package/resources/gofer/claude-commands/1_gofer_research.md +1154 -0
- package/resources/gofer/claude-commands/2_gofer_specify.md +855 -0
- package/resources/gofer/claude-commands/3_gofer_plan.md +881 -0
- package/resources/gofer/claude-commands/4_gofer_tasks.md +743 -0
- package/resources/gofer/claude-commands/5_gofer_implement.md +919 -0
- package/resources/gofer/claude-commands/6_gofer_validate.md +2264 -0
- package/resources/gofer/claude-commands/7_gofer_save.md +418 -0
- package/resources/gofer/claude-commands/7a_stakeholder_comms.md +503 -0
- package/resources/gofer/claude-commands/8_gofer_branding.md +310 -0
- package/resources/gofer/claude-commands/9_gofer_tests.md +553 -0
- package/resources/gofer/claude-commands/gofer_bootstrap_workspace.md +143 -0
- package/resources/gofer/claude-commands/gofer_check_workspace.md +114 -0
- package/resources/gofer/claude-commands/gofer_constitution.md +607 -0
- package/resources/gofer/claude-commands/gofer_diagnose.md +109 -0
- package/resources/gofer/claude-commands/gofer_eai_first_run.md +392 -0
- package/resources/gofer/claude-commands/gofer_hydrate.md +556 -0
- package/resources/gofer/claude-commands/gofer_personality.md +39 -0
- package/resources/gofer/claude-commands/gofer_plan.md +35 -0
- package/resources/gofer/claude-commands/gofer_side.md +40 -0
- package/resources/gofer/claude-commands/gofer_spec_summary.md +107 -0
- package/resources/gofer/claude-commands/gofer_tdd.md +107 -0
- package/resources/gofer/claude-commands/gofer_vocabulary.md +107 -0
- package/resources/gofer/claude-commands/gofer_zoom_out.md +107 -0
- package/resources/gofer/claude-skills/eai-gofer/SKILL.md +56 -0
- package/resources/gofer/commands/.gitkeep +0 -0
- package/resources/gofer/commands/0_gofer_start.md +1299 -0
- package/resources/gofer/commands/0a_problem_validation.md +405 -0
- package/resources/gofer/commands/10_gofer_cloud.md +611 -0
- package/resources/gofer/commands/1_gofer_research.md +1135 -0
- package/resources/gofer/commands/2_gofer_specify.md +836 -0
- package/resources/gofer/commands/3_gofer_plan.md +862 -0
- package/resources/gofer/commands/4_gofer_tasks.md +724 -0
- package/resources/gofer/commands/5_gofer_implement.md +900 -0
- package/resources/gofer/commands/6_gofer_validate.md +2245 -0
- package/resources/gofer/commands/7_gofer_save.md +399 -0
- package/resources/gofer/commands/7a_stakeholder_comms.md +484 -0
- package/resources/gofer/commands/8_gofer_branding.md +291 -0
- package/resources/gofer/commands/9_gofer_tests.md +534 -0
- package/resources/gofer/commands/gofer_bootstrap_workspace.md +159 -0
- package/resources/gofer/commands/gofer_check_workspace.md +130 -0
- package/resources/gofer/commands/gofer_constitution.md +588 -0
- package/resources/gofer/commands/gofer_diagnose.md +89 -0
- package/resources/gofer/commands/gofer_eai_first_run.md +392 -0
- package/resources/gofer/commands/gofer_hydrate.md +537 -0
- package/resources/gofer/commands/gofer_personality.md +61 -0
- package/resources/gofer/commands/gofer_plan.md +51 -0
- package/resources/gofer/commands/gofer_side.md +56 -0
- package/resources/gofer/commands/gofer_spec_summary.md +87 -0
- package/resources/gofer/commands/gofer_tdd.md +87 -0
- package/resources/gofer/commands/gofer_vocabulary.md +87 -0
- package/resources/gofer/commands/gofer_zoom_out.md +87 -0
- package/resources/gofer/copilot-instructions/gofer-cost.instructions.md +13 -0
- package/resources/gofer/copilot-instructions/language-server.instructions.md +49 -0
- package/resources/gofer/copilot-instructions/typescript.instructions.md +47 -0
- package/resources/gofer/copilot-instructions/vscode-extension.instructions.md +46 -0
- package/resources/gofer/copilot-prompts/0_gofer_start.prompt.md +1308 -0
- package/resources/gofer/copilot-prompts/0a_problem_validation.prompt.md +429 -0
- package/resources/gofer/copilot-prompts/10_gofer_cloud.prompt.md +644 -0
- package/resources/gofer/copilot-prompts/1_gofer_research.prompt.md +1177 -0
- package/resources/gofer/copilot-prompts/2_gofer_specify.prompt.md +878 -0
- package/resources/gofer/copilot-prompts/3_gofer_plan.prompt.md +904 -0
- package/resources/gofer/copilot-prompts/4_gofer_tasks.prompt.md +766 -0
- package/resources/gofer/copilot-prompts/5_gofer_implement.prompt.md +942 -0
- package/resources/gofer/copilot-prompts/6_gofer_validate.prompt.md +2277 -0
- package/resources/gofer/copilot-prompts/7_gofer_save.prompt.md +433 -0
- package/resources/gofer/copilot-prompts/7a_stakeholder_comms.prompt.md +516 -0
- package/resources/gofer/copilot-prompts/8_gofer_branding.prompt.md +323 -0
- package/resources/gofer/copilot-prompts/9_gofer_tests.prompt.md +566 -0
- package/resources/gofer/copilot-prompts/gofer_bootstrap_workspace.prompt.md +161 -0
- package/resources/gofer/copilot-prompts/gofer_check_workspace.prompt.md +132 -0
- package/resources/gofer/copilot-prompts/gofer_constitution.prompt.md +621 -0
- package/resources/gofer/copilot-prompts/gofer_diagnose.prompt.md +127 -0
- package/resources/gofer/copilot-prompts/gofer_eai_first_run.prompt.md +410 -0
- package/resources/gofer/copilot-prompts/gofer_hydrate.prompt.md +571 -0
- package/resources/gofer/copilot-prompts/gofer_personality.prompt.md +57 -0
- package/resources/gofer/copilot-prompts/gofer_plan.prompt.md +53 -0
- package/resources/gofer/copilot-prompts/gofer_side.prompt.md +58 -0
- package/resources/gofer/copilot-prompts/gofer_spec_summary.prompt.md +125 -0
- package/resources/gofer/copilot-prompts/gofer_tdd.prompt.md +125 -0
- package/resources/gofer/copilot-prompts/gofer_vocabulary.prompt.md +125 -0
- package/resources/gofer/copilot-prompts/gofer_zoom_out.prompt.md +125 -0
- package/resources/gofer/gemini/agents/assumption-tracker.md +171 -0
- package/resources/gofer/gemini/agents/business-metrics-analyzer.md +172 -0
- package/resources/gofer/gemini/agents/business-problem-validator.md +171 -0
- package/resources/gofer/gemini/agents/codebase-analyzer.md +127 -0
- package/resources/gofer/gemini/agents/codebase-locator.md +98 -0
- package/resources/gofer/gemini/agents/codebase-pattern-finder.md +183 -0
- package/resources/gofer/gemini/agents/comms-writer.md +161 -0
- package/resources/gofer/gemini/agents/engineer-review.md +172 -0
- package/resources/gofer/gemini/agents/implement-bug-triangulator.md +97 -0
- package/resources/gofer/gemini/agents/implement-code-review-council.md +92 -0
- package/resources/gofer/gemini/agents/implement-doc-writer.md +92 -0
- package/resources/gofer/gemini/agents/implement-error-hardener.md +87 -0
- package/resources/gofer/gemini/agents/implement-performance-explorer.md +98 -0
- package/resources/gofer/gemini/agents/implement-test-diversifier.md +85 -0
- package/resources/gofer/gemini/agents/implement-variant-generator.md +83 -0
- package/resources/gofer/gemini/agents/multi-perspective-judge.md +117 -0
- package/resources/gofer/gemini/agents/plan-api-comparator.md +93 -0
- package/resources/gofer/gemini/agents/plan-architecture-diverger.md +103 -0
- package/resources/gofer/gemini/agents/plan-data-model-stress-tester.md +98 -0
- package/resources/gofer/gemini/agents/plan-migration-path-finder.md +98 -0
- package/resources/gofer/gemini/agents/plan-refactor-rewrite-advisor.md +100 -0
- package/resources/gofer/gemini/agents/research-dependency-evaluator.md +109 -0
- package/resources/gofer/gemini/agents/research-horizon-scanner.md +103 -0
- package/resources/gofer/gemini/agents/research-market-scanner.md +140 -0
- package/resources/gofer/gemini/agents/research-perspective-multiplier.md +105 -0
- package/resources/gofer/gemini/agents/scope-creep-detector.md +155 -0
- package/resources/gofer/gemini/agents/specify-ambiguity-detector.md +98 -0
- package/resources/gofer/gemini/agents/specify-journey-stress-tester.md +95 -0
- package/resources/gofer/gemini/agents/tasks-cross-cutting-scanner.md +94 -0
- package/resources/gofer/gemini/agents/tasks-rollback-planner.md +92 -0
- package/resources/gofer/gemini/agents/validate-security-red-team.md +105 -0
- package/resources/gofer/gemini/agents/validation-correctness.md +106 -0
- package/resources/gofer/gemini/agents/validation-integration.md +132 -0
- package/resources/gofer/gemini/agents/validation-performance.md +123 -0
- package/resources/gofer/gemini/agents/validation-security.md +118 -0
- package/resources/gofer/gemini/agents/validation-standards.md +154 -0
- package/resources/gofer/gemini/agents/validation-test-quality.md +149 -0
- package/resources/gofer/gemini/agents/visual-bounded-context-writer.md +40 -0
- package/resources/gofer/gemini/agents/visual-c4-writer.md +44 -0
- package/resources/gofer/gemini/agents/visual-erd-writer.md +36 -0
- package/resources/gofer/gemini/agents/visual-heatmap-writer.md +63 -0
- package/resources/gofer/gemini/agents/visual-risk-writer.md +64 -0
- package/resources/gofer/gemini/commands/gofer/.gitkeep +0 -0
- package/resources/gofer/gemini/commands/gofer/0_gofer_start.md +1282 -0
- package/resources/gofer/gemini/commands/gofer/0_gofer_start.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/0a_problem_validation.md +424 -0
- package/resources/gofer/gemini/commands/gofer/0a_problem_validation.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.md +630 -0
- package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/1_gofer_research.md +1154 -0
- package/resources/gofer/gemini/commands/gofer/1_gofer_research.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/2_gofer_specify.md +855 -0
- package/resources/gofer/gemini/commands/gofer/2_gofer_specify.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/3_gofer_plan.md +881 -0
- package/resources/gofer/gemini/commands/gofer/3_gofer_plan.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.md +743 -0
- package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/5_gofer_implement.md +919 -0
- package/resources/gofer/gemini/commands/gofer/5_gofer_implement.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/6_gofer_validate.md +2264 -0
- package/resources/gofer/gemini/commands/gofer/6_gofer_validate.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/7_gofer_save.md +418 -0
- package/resources/gofer/gemini/commands/gofer/7_gofer_save.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.md +503 -0
- package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/8_gofer_branding.md +310 -0
- package/resources/gofer/gemini/commands/gofer/8_gofer_branding.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/9_gofer_tests.md +553 -0
- package/resources/gofer/gemini/commands/gofer/9_gofer_tests.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.md +143 -0
- package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.md +114 -0
- package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_constitution.md +607 -0
- package/resources/gofer/gemini/commands/gofer/gofer_constitution.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_diagnose.md +109 -0
- package/resources/gofer/gemini/commands/gofer/gofer_diagnose.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.md +392 -0
- package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_hydrate.md +556 -0
- package/resources/gofer/gemini/commands/gofer/gofer_hydrate.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_personality.md +39 -0
- package/resources/gofer/gemini/commands/gofer/gofer_personality.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_plan.md +35 -0
- package/resources/gofer/gemini/commands/gofer/gofer_plan.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_side.md +40 -0
- package/resources/gofer/gemini/commands/gofer/gofer_side.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_tdd.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_tdd.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.md +107 -0
- package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.toml +2 -0
- package/resources/gofer/gemini/commands/gofer/manifest.json +32 -0
- package/resources/gofer/gemini/extension.json +16 -0
- package/resources/gofer/github-agents/gofer-business.agent.md +20 -0
- package/resources/gofer/github-agents/gofer-implement.agent.md +15 -0
- package/resources/gofer/github-agents/gofer-plan.agent.md +15 -0
- package/resources/gofer/github-agents/gofer-research.agent.md +15 -0
- package/resources/gofer/github-agents/gofer-validate.agent.md +10 -0
- package/resources/gofer/github-skills/eai-gofer/SKILL.md +56 -0
- package/resources/gofer/hook-scripts/agent-stop.mjs +655 -0
- package/resources/gofer/hook-scripts/log-stage-launch-time.mjs +77 -0
- package/resources/gofer/hook-scripts/post-tool-use.mjs +333 -0
- package/resources/gofer/hook-scripts/queued-input.mjs +188 -0
- package/resources/gofer/hook-scripts/session-lifecycle.mjs +93 -0
- package/resources/gofer/hook-scripts/user-prompt-submit.mjs +228 -0
- package/resources/gofer/instruction-templates/base/agents-base.md +37 -0
- package/resources/gofer/instruction-templates/base/claude-base.md +7 -0
- package/resources/gofer/instruction-templates/base/copilot-base.md +26 -0
- package/resources/gofer/instruction-templates/gofer/gofer-claude.md +5 -0
- package/resources/gofer/instruction-templates/gofer/gofer-copilot.md +9 -0
- package/resources/gofer/instruction-templates/languages/generic.md +7 -0
- package/resources/gofer/instruction-templates/languages/go.md +8 -0
- package/resources/gofer/instruction-templates/languages/java.md +8 -0
- package/resources/gofer/instruction-templates/languages/python.md +9 -0
- package/resources/gofer/instruction-templates/languages/rust.md +9 -0
- package/resources/gofer/instruction-templates/languages/typescript.md +19 -0
- package/resources/gofer/instruction-templates/workflow/principles.md +52 -0
- package/resources/gofer/memory/constitution.md +391 -0
- package/resources/gofer/memory/context-profiles.yaml +74 -0
- package/resources/gofer/memory/decisions/000-use-adr-for-decisions.md +67 -0
- package/resources/gofer/memory/decisions/001-di-framework.md +190 -0
- package/resources/gofer/memory/decisions/002-module-extraction.md +305 -0
- package/resources/gofer/memory/decisions/003-error-handling.md +368 -0
- package/resources/gofer/memory/decisions/004-cache-eviction.md +436 -0
- package/resources/gofer/memory/decisions/005-constants-management.md +520 -0
- package/resources/gofer/memory/decisions/README.md +129 -0
- package/resources/gofer/memory/diagrams/di-container.mmd +321 -0
- package/resources/gofer/memory/diagrams/extension-activation.mmd +184 -0
- package/resources/gofer/memory/diagrams/module-dependencies.mmd +264 -0
- package/resources/gofer/memory/gofer-model-policy.yaml +97 -0
- package/resources/gofer/memory/lessons.md +46 -0
- package/resources/gofer/node-scripts/canonical-descriptions.mjs +86 -0
- package/resources/gofer/node-scripts/check-version-alignment.mjs +131 -0
- package/resources/gofer/node-scripts/codex-doctor.mjs +425 -0
- package/resources/gofer/node-scripts/generate-commands.mjs +1366 -0
- package/resources/gofer/node-scripts/generate-issues.js +563 -0
- package/resources/gofer/node-scripts/gofer-closed-loop-audit.mjs +893 -0
- package/resources/gofer/node-scripts/gofer-loop-audit.mjs +541 -0
- package/resources/gofer/node-scripts/gofer-performance-report.mjs +306 -0
- package/resources/gofer/node-scripts/gofer-workspace-bootstrap.mjs +56 -0
- package/resources/gofer/node-scripts/gofer-workspace-check.mjs +56 -0
- package/resources/gofer/node-scripts/lib/ai-leverage-tagger.mjs +103 -0
- package/resources/gofer/node-scripts/lib/assemble-stakeholder-pack.mjs +114 -0
- package/resources/gofer/node-scripts/lib/marp-deck.mjs +87 -0
- package/resources/gofer/node-scripts/lib/mermaid-tabular-fallback.mjs +264 -0
- package/resources/gofer/node-scripts/lib/render-visual.mjs +54 -0
- package/resources/gofer/node-scripts/lib/validate-aliases.mjs +85 -0
- package/resources/gofer/node-scripts/lib/visual-counts.mjs +44 -0
- package/resources/gofer/node-scripts/lib/visual-pass-pipeline.mjs +134 -0
- package/resources/gofer/node-scripts/mermaid-export.mjs +72 -0
- package/resources/gofer/node-scripts/package-agent-plugin.mjs +940 -0
- package/resources/gofer/node-scripts/parse-stage-command.mjs +211 -0
- package/resources/gofer/node-scripts/schemas/.gitkeep +0 -0
- package/resources/gofer/node-scripts/schemas/stage-command.schema.json +72 -0
- package/resources/gofer/node-scripts/sync-extension-resources.mjs +110 -0
- package/resources/gofer/node-scripts/workspace-bootstrap-lib.mjs +1166 -0
- package/resources/gofer/powershell-scripts/install-optional-tools.ps1 +214 -0
- package/resources/gofer/references/platform/README.md +17 -0
- package/resources/gofer/references/platform/deployment-repo.md +9 -0
- package/resources/gofer/references/platform/eai-app-template.md +45 -0
- package/resources/gofer/references/platform/eai-config-driven-ui.md +156 -0
- package/resources/gofer/references/platform/eai-error-catalog.yaml +197 -0
- package/resources/gofer/references/platform/eai-repo-contract.md +134 -0
- package/resources/gofer/references/platform/eai-service-patterns.md +56 -0
- package/resources/gofer/references/platform/eai.md +85 -0
- package/resources/gofer/references/platform/vertical-template.md +49 -0
- package/resources/gofer/specify-commands/.gitkeep +0 -0
- package/resources/gofer/specify-commands/0_gofer_start.md +1299 -0
- package/resources/gofer/specify-commands/0a_problem_validation.md +405 -0
- package/resources/gofer/specify-commands/10_gofer_cloud.md +611 -0
- package/resources/gofer/specify-commands/1_gofer_research.md +1135 -0
- package/resources/gofer/specify-commands/2_gofer_specify.md +836 -0
- package/resources/gofer/specify-commands/3_gofer_plan.md +862 -0
- package/resources/gofer/specify-commands/4_gofer_tasks.md +724 -0
- package/resources/gofer/specify-commands/5_gofer_implement.md +900 -0
- package/resources/gofer/specify-commands/6_gofer_validate.md +2245 -0
- package/resources/gofer/specify-commands/7_gofer_save.md +399 -0
- package/resources/gofer/specify-commands/7a_stakeholder_comms.md +484 -0
- package/resources/gofer/specify-commands/8_gofer_branding.md +291 -0
- package/resources/gofer/specify-commands/9_gofer_tests.md +534 -0
- package/resources/gofer/specify-commands/gofer_bootstrap_workspace.md +159 -0
- package/resources/gofer/specify-commands/gofer_check_workspace.md +130 -0
- package/resources/gofer/specify-commands/gofer_constitution.md +588 -0
- package/resources/gofer/specify-commands/gofer_diagnose.md +89 -0
- package/resources/gofer/specify-commands/gofer_eai_first_run.md +392 -0
- package/resources/gofer/specify-commands/gofer_hydrate.md +537 -0
- package/resources/gofer/specify-commands/gofer_personality.md +61 -0
- package/resources/gofer/specify-commands/gofer_plan.md +51 -0
- package/resources/gofer/specify-commands/gofer_side.md +56 -0
- package/resources/gofer/specify-commands/gofer_spec_summary.md +87 -0
- package/resources/gofer/specify-commands/gofer_tdd.md +87 -0
- package/resources/gofer/specify-commands/gofer_vocabulary.md +87 -0
- package/resources/gofer/specify-commands/gofer_zoom_out.md +87 -0
- package/resources/gofer/system-skills/0_gofer_start/SKILL.md +1287 -0
- package/resources/gofer/system-skills/0a_problem_validation/SKILL.md +429 -0
- package/resources/gofer/system-skills/10_gofer_cloud/SKILL.md +635 -0
- package/resources/gofer/system-skills/1_gofer_research/SKILL.md +1159 -0
- package/resources/gofer/system-skills/2_gofer_specify/SKILL.md +860 -0
- package/resources/gofer/system-skills/3_gofer_plan/SKILL.md +886 -0
- package/resources/gofer/system-skills/4_gofer_tasks/SKILL.md +748 -0
- package/resources/gofer/system-skills/5_gofer_implement/SKILL.md +924 -0
- package/resources/gofer/system-skills/6_gofer_validate/SKILL.md +2269 -0
- package/resources/gofer/system-skills/7_gofer_save/SKILL.md +423 -0
- package/resources/gofer/system-skills/7a_stakeholder_comms/SKILL.md +508 -0
- package/resources/gofer/system-skills/8_gofer_branding/SKILL.md +315 -0
- package/resources/gofer/system-skills/9_gofer_tests/SKILL.md +558 -0
- package/resources/gofer/system-skills/gofer_bootstrap_workspace/SKILL.md +148 -0
- package/resources/gofer/system-skills/gofer_check_workspace/SKILL.md +119 -0
- package/resources/gofer/system-skills/gofer_constitution/SKILL.md +612 -0
- package/resources/gofer/system-skills/gofer_diagnose/SKILL.md +114 -0
- package/resources/gofer/system-skills/gofer_eai_first_run/SKILL.md +397 -0
- package/resources/gofer/system-skills/gofer_hydrate/SKILL.md +561 -0
- package/resources/gofer/system-skills/gofer_personality/SKILL.md +44 -0
- package/resources/gofer/system-skills/gofer_plan/SKILL.md +40 -0
- package/resources/gofer/system-skills/gofer_side/SKILL.md +45 -0
- package/resources/gofer/system-skills/gofer_spec_summary/SKILL.md +112 -0
- package/resources/gofer/system-skills/gofer_tdd/SKILL.md +112 -0
- package/resources/gofer/system-skills/gofer_vocabulary/SKILL.md +112 -0
- package/resources/gofer/system-skills/gofer_zoom_out/SKILL.md +112 -0
- package/resources/gofer/templates/agent-file-template.md +28 -0
- package/resources/gofer/templates/assumptions-template.md +94 -0
- package/resources/gofer/templates/audit-history-template.md +35 -0
- package/resources/gofer/templates/brand/brand-profile-template.json +45 -0
- package/resources/gofer/templates/brand/document-style-template.md +50 -0
- package/resources/gofer/templates/brand/marp-theme-template.css +58 -0
- package/resources/gofer/templates/brownfield-analysis.md +44 -0
- package/resources/gofer/templates/business-metrics-template.md +120 -0
- package/resources/gofer/templates/business-owner-summary-template.md +83 -0
- package/resources/gofer/templates/checklist-template.md +40 -0
- package/resources/gofer/templates/ciso-security-summary-template.md +70 -0
- package/resources/gofer/templates/context-bundle-template.md +76 -0
- package/resources/gofer/templates/contract-pack-template.md +109 -0
- package/resources/gofer/templates/cto-architecture-summary-template.md +83 -0
- package/resources/gofer/templates/discovery-template.md +92 -0
- package/resources/gofer/templates/eai-preflight-template.md +144 -0
- package/resources/gofer/templates/goal-ledger-template.json +69 -0
- package/resources/gofer/templates/gofer-model-policy.yaml +97 -0
- package/resources/gofer/templates/issues-template.md +106 -0
- package/resources/gofer/templates/journey/base-journey.md +95 -0
- package/resources/gofer/templates/journey/industry-variants.yaml +277 -0
- package/resources/gofer/templates/loop-contract-template.json +68 -0
- package/resources/gofer/templates/plan-template.md +215 -0
- package/resources/gofer/templates/problem-brief-template.md +85 -0
- package/resources/gofer/templates/proposal-review-template.md +79 -0
- package/resources/gofer/templates/research-template.md +222 -0
- package/resources/gofer/templates/reuse-scan-template.md +43 -0
- package/resources/gofer/templates/sequence-diagrams/option-spectrum.yaml +178 -0
- package/resources/gofer/templates/service-fit-matrix-template.md +29 -0
- package/resources/gofer/templates/session-handoff-template.md +172 -0
- package/resources/gofer/templates/spec-summary-template.md +118 -0
- package/resources/gofer/templates/spec-template.md +196 -0
- package/resources/gofer/templates/stakeholder-comms-template.md +330 -0
- package/resources/gofer/templates/stakeholder-review-index-template.md +54 -0
- package/resources/gofer/templates/tasks-template.md +323 -0
- package/resources/gofer/templates/ui-approval-template.md +32 -0
- package/resources/gofer/templates/ui-preview-brief-template.md +65 -0
- package/resources/gofer/templates/ui-review-log-template.md +11 -0
- package/resources/gofer/templates/visuals/.gitkeep +0 -0
- package/resources/gofer/templates/visuals/bounded-context-map.md +19 -0
- package/resources/gofer/templates/visuals/bounded-context-template.md +47 -0
- package/resources/gofer/templates/visuals/c4-container-template.md +38 -0
- package/resources/gofer/templates/visuals/c4-container.md +20 -0
- package/resources/gofer/templates/visuals/c4-context-template.md +46 -0
- package/resources/gofer/templates/visuals/capability-heatmap-template.md +54 -0
- package/resources/gofer/templates/visuals/data-model-erd-template.md +41 -0
- package/resources/gofer/templates/visuals/erd.md +19 -0
- package/resources/gofer/templates/visuals/impact-canvas.md +40 -0
- package/resources/gofer/templates/visuals/risk-heatmap-template.md +51 -0
- package/resources/gofer/templates/visuals/roi-projection.md +17 -0
- package/resources/gofer/templates/visuals/value-stream-asis.md +16 -0
- package/resources/gofer/templates/visuals/value-stream-tobe.md +18 -0
- package/resources/gofer/templates/working-backwards-prfaq-template.md +165 -0
- package/resources/linked-sources.json +25 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update check — non-blocking background version check with 24h cache.
|
|
3
|
+
*
|
|
4
|
+
* Skipped entirely in CI, when NO_UPDATE_NOTIFIER=1, or non-TTY output.
|
|
5
|
+
*/
|
|
6
|
+
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
7
|
+
import { spawn } from 'node:child_process';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import process from 'node:process';
|
|
11
|
+
import chalk from 'chalk';
|
|
12
|
+
const EAI_DIR = join(homedir(), '.eai');
|
|
13
|
+
const CACHE_FILE = join(EAI_DIR, 'update-check.json');
|
|
14
|
+
export const STATIC_REGISTRY_URL = 'https://eai-tools.github.io/eai/registry/';
|
|
15
|
+
export const STATIC_PACKUMENT_URL = `${STATIC_REGISTRY_URL}@enterpriseai/cli`;
|
|
16
|
+
export const NPMJS_REGISTRY_URL = 'https://registry.npmjs.org/';
|
|
17
|
+
export const NPMJS_PACKUMENT_URL = `${NPMJS_REGISTRY_URL}@enterpriseai%2fcli`;
|
|
18
|
+
const CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24 hours
|
|
19
|
+
const DEFAULT_FETCH_TIMEOUT_MS = 5000;
|
|
20
|
+
const DISCOVERY_FETCH_TIMEOUT_MS = 1200;
|
|
21
|
+
function shouldSkip() {
|
|
22
|
+
if (process.env['NO_UPDATE_NOTIFIER'] === '1') {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
if (process.env['EAI_UPDATE_NOTIFIER_FORCE'] === '1') {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return (!!process.env['CI'] ||
|
|
29
|
+
!process.stderr.isTTY);
|
|
30
|
+
}
|
|
31
|
+
function getStaticPackumentUrl() {
|
|
32
|
+
return process.env['EAI_UPDATE_PACKUMENT_URL'] || STATIC_PACKUMENT_URL;
|
|
33
|
+
}
|
|
34
|
+
function getNpmjsPackumentUrl() {
|
|
35
|
+
return process.env['EAI_UPDATE_NPMJS_PACKUMENT_URL'] || NPMJS_PACKUMENT_URL;
|
|
36
|
+
}
|
|
37
|
+
export function isMachineReadableInvocation(args) {
|
|
38
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
39
|
+
const arg = args[index];
|
|
40
|
+
if (!arg) {
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (arg === '--describe' || arg === '--json') {
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
if (arg === '--format' && args[index + 1] === 'json') {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
if (arg === '--format=json') {
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
export function shouldOfferInteractiveUpdatePrompt(args, env = process.env, stdin = process.stdin, stderr = process.stderr) {
|
|
56
|
+
if (env['NO_UPDATE_NOTIFIER'] === '1' || env['EAI_UPDATE_PROMPT_SUPPRESS'] === '1') {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
if (env['CI'] || isMachineReadableInvocation(args)) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
return Boolean(stdin.isTTY && stderr.isTTY);
|
|
63
|
+
}
|
|
64
|
+
/** Compare two semver strings (major.minor.patch). */
|
|
65
|
+
export function isNewerVersion(current, latest) {
|
|
66
|
+
const cur = current.split('.').map(Number);
|
|
67
|
+
const lat = latest.split('.').map(Number);
|
|
68
|
+
for (let i = 0; i < 3; i++) {
|
|
69
|
+
if ((lat[i] ?? 0) > (cur[i] ?? 0))
|
|
70
|
+
return true;
|
|
71
|
+
if ((lat[i] ?? 0) < (cur[i] ?? 0))
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
export function compareVersions(left, right) {
|
|
77
|
+
const lhs = left.split('.').map(Number);
|
|
78
|
+
const rhs = right.split('.').map(Number);
|
|
79
|
+
for (let i = 0; i < 3; i++) {
|
|
80
|
+
const delta = (lhs[i] ?? 0) - (rhs[i] ?? 0);
|
|
81
|
+
if (delta !== 0) {
|
|
82
|
+
return delta;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return 0;
|
|
86
|
+
}
|
|
87
|
+
export function selectNewestRelease(candidates) {
|
|
88
|
+
if (candidates.length === 0) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
const channelPriority = {
|
|
92
|
+
npmjs: 0,
|
|
93
|
+
'static-registry': 1,
|
|
94
|
+
};
|
|
95
|
+
return [...candidates].sort((left, right) => {
|
|
96
|
+
const versionDelta = compareVersions(right.version, left.version);
|
|
97
|
+
if (versionDelta !== 0) {
|
|
98
|
+
return versionDelta;
|
|
99
|
+
}
|
|
100
|
+
return channelPriority[left.channel] - channelPriority[right.channel];
|
|
101
|
+
})[0] ?? null;
|
|
102
|
+
}
|
|
103
|
+
async function fetchChannelLatest(url, channel, timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
|
|
104
|
+
let timeout;
|
|
105
|
+
try {
|
|
106
|
+
const controller = new AbortController();
|
|
107
|
+
timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
108
|
+
const res = await fetch(url, { signal: controller.signal });
|
|
109
|
+
if (!res.ok)
|
|
110
|
+
return null;
|
|
111
|
+
const data = (await res.json());
|
|
112
|
+
const version = data['dist-tags']?.latest ?? null;
|
|
113
|
+
if (!version) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
return { channel, version };
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
if (timeout) {
|
|
123
|
+
clearTimeout(timeout);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/** Fetch the newest release from the public npm registry, falling back to the static EAI registry. */
|
|
128
|
+
export async function fetchLatestRelease(timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
|
|
129
|
+
const [npmjsRelease, staticRelease] = await Promise.all([
|
|
130
|
+
fetchChannelLatest(getNpmjsPackumentUrl(), 'npmjs', timeoutMs),
|
|
131
|
+
fetchChannelLatest(getStaticPackumentUrl(), 'static-registry', timeoutMs),
|
|
132
|
+
]);
|
|
133
|
+
return selectNewestRelease([
|
|
134
|
+
...(npmjsRelease ? [npmjsRelease] : []),
|
|
135
|
+
...(staticRelease ? [staticRelease] : []),
|
|
136
|
+
]);
|
|
137
|
+
}
|
|
138
|
+
/** Fetch the latest version from the available release channels. */
|
|
139
|
+
export async function fetchLatestVersion(timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
|
|
140
|
+
return (await fetchLatestRelease(timeoutMs))?.version ?? null;
|
|
141
|
+
}
|
|
142
|
+
async function readCache() {
|
|
143
|
+
try {
|
|
144
|
+
const raw = await readFile(CACHE_FILE, 'utf-8');
|
|
145
|
+
return JSON.parse(raw);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
async function writeCache(cache) {
|
|
152
|
+
try {
|
|
153
|
+
await mkdir(EAI_DIR, { recursive: true });
|
|
154
|
+
await writeFile(CACHE_FILE, JSON.stringify(cache), 'utf-8');
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
// Best-effort — don't fail the CLI
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
async function refreshCache(currentVersion, timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
|
|
161
|
+
const latest = await fetchLatestVersion(timeoutMs);
|
|
162
|
+
if (!latest) {
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
const cache = {
|
|
166
|
+
lastCheck: Date.now(),
|
|
167
|
+
latestVersion: latest,
|
|
168
|
+
currentVersion,
|
|
169
|
+
};
|
|
170
|
+
await writeCache(cache);
|
|
171
|
+
return cache;
|
|
172
|
+
}
|
|
173
|
+
async function readFreshOrRefreshCache(currentVersion, timeoutMs = DEFAULT_FETCH_TIMEOUT_MS) {
|
|
174
|
+
const cache = await readCache();
|
|
175
|
+
if (cache && Date.now() - cache.lastCheck < CHECK_INTERVAL_MS) {
|
|
176
|
+
return cache;
|
|
177
|
+
}
|
|
178
|
+
return await refreshCache(currentVersion, timeoutMs) ?? cache;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Fire-and-forget background update check.
|
|
182
|
+
* Reads cache; skips if checked within 24h; otherwise fetches and caches.
|
|
183
|
+
*/
|
|
184
|
+
export function checkForUpdate(currentVersion) {
|
|
185
|
+
if (shouldSkip())
|
|
186
|
+
return;
|
|
187
|
+
// Fire-and-forget — errors are swallowed
|
|
188
|
+
void (async () => {
|
|
189
|
+
await readFreshOrRefreshCache(currentVersion);
|
|
190
|
+
})();
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Print update banner to stderr if a newer version is cached.
|
|
194
|
+
* Called after command execution so the banner appears last.
|
|
195
|
+
*/
|
|
196
|
+
export async function notifyIfUpdateAvailable(currentVersion, options = {}) {
|
|
197
|
+
if (shouldSkip())
|
|
198
|
+
return;
|
|
199
|
+
const cache = await readCache();
|
|
200
|
+
await printUpdateNotice(currentVersion, cache, options);
|
|
201
|
+
}
|
|
202
|
+
export async function runCurrentCliUpdate() {
|
|
203
|
+
return new Promise((resolve) => {
|
|
204
|
+
const entry = process.argv[1];
|
|
205
|
+
if (!entry) {
|
|
206
|
+
resolve(false);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const child = spawn(process.execPath, [entry, 'update'], {
|
|
210
|
+
stdio: 'inherit',
|
|
211
|
+
env: {
|
|
212
|
+
...process.env,
|
|
213
|
+
EAI_UPDATE_PROMPT_SUPPRESS: '1',
|
|
214
|
+
NO_UPDATE_NOTIFIER: '1',
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
child.on('error', () => resolve(false));
|
|
218
|
+
child.on('close', (code) => resolve(code === 0));
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
async function promptForUpdate() {
|
|
222
|
+
const { default: inquirer } = await import('inquirer');
|
|
223
|
+
const { updateNow } = await inquirer.prompt([
|
|
224
|
+
{
|
|
225
|
+
type: 'confirm',
|
|
226
|
+
name: 'updateNow',
|
|
227
|
+
message: 'Update eai now?',
|
|
228
|
+
default: true,
|
|
229
|
+
},
|
|
230
|
+
]);
|
|
231
|
+
return Boolean(updateNow);
|
|
232
|
+
}
|
|
233
|
+
export async function printUpdateNotice(currentVersion, cache, options = {}) {
|
|
234
|
+
if (!cache)
|
|
235
|
+
return;
|
|
236
|
+
if (!isNewerVersion(currentVersion, cache.latestVersion))
|
|
237
|
+
return;
|
|
238
|
+
const current = chalk.dim(currentVersion);
|
|
239
|
+
const latest = chalk.green(cache.latestVersion);
|
|
240
|
+
const cmd = chalk.cyan('eai update');
|
|
241
|
+
console.error('');
|
|
242
|
+
console.error(` Update available: ${current} → ${latest}`);
|
|
243
|
+
if (shouldOfferInteractiveUpdatePrompt(options.args ?? [])) {
|
|
244
|
+
const accepted = await promptForUpdate();
|
|
245
|
+
if (accepted) {
|
|
246
|
+
const ran = await (options.runUpdate ?? runCurrentCliUpdate)();
|
|
247
|
+
if (!ran) {
|
|
248
|
+
console.error(` Run ${cmd} to update`);
|
|
249
|
+
}
|
|
250
|
+
console.error('');
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
console.error(` Run ${cmd} when you are ready`);
|
|
254
|
+
console.error('');
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
console.error(` Run ${cmd} to update`);
|
|
258
|
+
console.error('');
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Discovery commands are where stale CLIs hurt most: a user or agent asks
|
|
262
|
+
* "what can this do?" and old binaries cannot list new commands. Do a bounded
|
|
263
|
+
* foreground refresh so root help and unknown commands can point at eai update.
|
|
264
|
+
*/
|
|
265
|
+
export async function notifyIfUpdateAvailableForDiscovery(currentVersion) {
|
|
266
|
+
if (shouldSkip())
|
|
267
|
+
return;
|
|
268
|
+
const cache = await readFreshOrRefreshCache(currentVersion, DISCOVERY_FETCH_TIMEOUT_MS);
|
|
269
|
+
await printUpdateNotice(currentVersion, cache);
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=update-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check.js","sourceRoot":"","sources":["../../src/lib/update-check.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;AACxC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,2CAA2C,CAAC;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,mBAAmB,mBAAmB,CAAC;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,6BAA6B,CAAC;AAChE,MAAM,CAAC,MAAM,mBA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,CAAC;IAErC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,OAAO,CAAC,KAAK,CAAC,uBAAuB,OAAO,MAAM,MAAM,EAAE,CAAC,CAAC;IAC5D,IAAI,kCAAkC,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;QAC3D,MAAM,QAAQ,GAAG,MAAM,eAAe,EAAE,CAAC;QACzC,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,IAAI,mBAAmB,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,GAAG,EAAE,CAAC;gBACT,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC;YAC1C,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClB,OAAO;QACT,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,qBAAqB,CAAC,CAAC;QACjD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO;IACT,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,CAAC;IACxC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,mCAAmC,CAAC,cAAsB;IAC9E,IAAI,UAAU,EAAE;QAAE,OAAO;IAEzB,MAAM,KAAK,GAAG,MAAM,uBAAuB,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;IACxF,MAAM,iBAAiB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ProjectMaintenanceMode = "check" | "apply";
|
|
2
|
+
export interface ProjectUpdateMaintenanceOptions {
|
|
3
|
+
readonly mode: ProjectMaintenanceMode;
|
|
4
|
+
readonly offerTemplateCheck?: boolean;
|
|
5
|
+
readonly runTemplateCheck?: () => Promise<boolean>;
|
|
6
|
+
}
|
|
7
|
+
export interface ProjectUpdateMaintenanceResult {
|
|
8
|
+
readonly projectRoot: string | null;
|
|
9
|
+
readonly gofer: "skipped" | "current" | "checked" | "refreshed";
|
|
10
|
+
readonly template: "skipped" | "current" | "review-recommended" | "custom-source" | "untracked";
|
|
11
|
+
}
|
|
12
|
+
export declare function runProjectUpdateMaintenance(options: ProjectUpdateMaintenanceOptions): Promise<ProjectUpdateMaintenanceResult>;
|
|
13
|
+
export declare function runCurrentCliCommand(args: readonly string[]): Promise<boolean>;
|
|
14
|
+
export declare function runInstalledEaiCommand(args: readonly string[]): Promise<boolean>;
|
|
15
|
+
//# sourceMappingURL=update-maintenance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-maintenance.d.ts","sourceRoot":"","sources":["../../src/lib/update-maintenance.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvD,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;IAChE,QAAQ,CAAC,QAAQ,EACb,SAAS,GACT,SAAS,GACT,oBAAoB,GACpB,eAAe,GACf,WAAW,CAAC;CACjB;AAkJD,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,8BAA8B,CAAC,CA4DzC;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAmB9E;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAchF"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
import chalk from "chalk";
|
|
4
|
+
import inquirer from "inquirer";
|
|
5
|
+
import { findProjectRoot } from "./config.js";
|
|
6
|
+
import { applyGoferRefresh, planGoferRefresh } from "./gofer-refresh.js";
|
|
7
|
+
import { resolveProjectManifest } from "./project-manifest.js";
|
|
8
|
+
import * as out from "./output.js";
|
|
9
|
+
import { isDefaultTemplateSource, resolveTemplateClonePlan } from "../commands/init.js";
|
|
10
|
+
const DEFAULT_TEMPLATE_SOURCE = "https://github.com/eai-tools/eai-app-template.git";
|
|
11
|
+
function isInteractiveTerminal() {
|
|
12
|
+
return Boolean(process.stdin.isTTY &&
|
|
13
|
+
process.stdout.isTTY &&
|
|
14
|
+
!process.env["CI"]);
|
|
15
|
+
}
|
|
16
|
+
function hasGoferWork(summary) {
|
|
17
|
+
return (summary.added > 0 ||
|
|
18
|
+
summary.updated > 0 ||
|
|
19
|
+
summary.deleted > 0 ||
|
|
20
|
+
summary.conflicted > 0);
|
|
21
|
+
}
|
|
22
|
+
function renderGoferSummary(rows) {
|
|
23
|
+
out.table([
|
|
24
|
+
["Added", String(rows.added)],
|
|
25
|
+
["Updated", String(rows.updated)],
|
|
26
|
+
["Deleted", String(rows.deleted)],
|
|
27
|
+
["Conflicted", String(rows.conflicted)],
|
|
28
|
+
...(typeof rows.unchanged === "number"
|
|
29
|
+
? [["Unchanged", String(rows.unchanged)]]
|
|
30
|
+
: []),
|
|
31
|
+
...(typeof rows.backedUp === "number"
|
|
32
|
+
? [["Backed up", String(rows.backedUp)]]
|
|
33
|
+
: []),
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
function describeTemplateSnapshot(template) {
|
|
37
|
+
if (template.displaySource) {
|
|
38
|
+
return template.displaySource;
|
|
39
|
+
}
|
|
40
|
+
if (template.commit && template.repo) {
|
|
41
|
+
return `${template.repo}@${template.commit.slice(0, 7)}`;
|
|
42
|
+
}
|
|
43
|
+
return template.repo || "unknown";
|
|
44
|
+
}
|
|
45
|
+
async function maybeOfferTemplateCheck(options) {
|
|
46
|
+
if (!options.offerTemplateCheck || !options.runTemplateCheck || !isInteractiveTerminal()) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const { runTemplateCheck } = await inquirer.prompt([
|
|
50
|
+
{
|
|
51
|
+
type: "confirm",
|
|
52
|
+
name: "runTemplateCheck",
|
|
53
|
+
message: "Run `eai template check` now to review app-template drift?",
|
|
54
|
+
default: true,
|
|
55
|
+
},
|
|
56
|
+
]);
|
|
57
|
+
if (runTemplateCheck) {
|
|
58
|
+
await options.runTemplateCheck();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async function renderTemplateStatus(projectRoot, options) {
|
|
62
|
+
const resolvedManifest = await resolveProjectManifest(projectRoot);
|
|
63
|
+
const manifest = resolvedManifest.manifest;
|
|
64
|
+
if (!manifest?.template) {
|
|
65
|
+
out.info("Template provenance is not recorded for this project. Run `eai template check` after recording template provenance if you need app-template drift detail.");
|
|
66
|
+
return "untracked";
|
|
67
|
+
}
|
|
68
|
+
const bundledTemplate = resolveTemplateClonePlan(DEFAULT_TEMPLATE_SOURCE);
|
|
69
|
+
const projectTemplateLabel = describeTemplateSnapshot(manifest.template);
|
|
70
|
+
const bundledTemplateLabel = describeTemplateSnapshot({
|
|
71
|
+
repo: bundledTemplate.cloneSource,
|
|
72
|
+
commit: bundledTemplate.pinnedCommit,
|
|
73
|
+
displaySource: bundledTemplate.displaySource,
|
|
74
|
+
});
|
|
75
|
+
if (manifest.template.repo &&
|
|
76
|
+
!isDefaultTemplateSource(manifest.template.repo) &&
|
|
77
|
+
manifest.template.repo !== bundledTemplate.cloneSource) {
|
|
78
|
+
out.info(`Project template source: ${projectTemplateLabel}`);
|
|
79
|
+
out.info(`Current bundled default template: ${bundledTemplateLabel}`);
|
|
80
|
+
out.info("This project uses a custom template source, so app-template updates require manual review.");
|
|
81
|
+
out.dim(` Review: ${chalk.cyan("eai template check")}`);
|
|
82
|
+
return "custom-source";
|
|
83
|
+
}
|
|
84
|
+
if (manifest.template.commit &&
|
|
85
|
+
bundledTemplate.pinnedCommit &&
|
|
86
|
+
manifest.template.commit !== bundledTemplate.pinnedCommit) {
|
|
87
|
+
out.warn(`App-template snapshot has changed since this project was initialized: ${projectTemplateLabel} -> ${bundledTemplateLabel}`);
|
|
88
|
+
out.info("Template and UI files are not auto-merged into existing apps. Review the diff before copying anything.");
|
|
89
|
+
out.dim(` Review: ${chalk.cyan("eai template check")}`);
|
|
90
|
+
await maybeOfferTemplateCheck(options);
|
|
91
|
+
return "review-recommended";
|
|
92
|
+
}
|
|
93
|
+
if (!manifest.template.commit || !bundledTemplate.pinnedCommit) {
|
|
94
|
+
out.info(`Template snapshot: ${projectTemplateLabel}. Run ${chalk.cyan("eai template check")} for file-level review when needed.`);
|
|
95
|
+
return "review-recommended";
|
|
96
|
+
}
|
|
97
|
+
out.success(`Template snapshot is current: ${projectTemplateLabel}`);
|
|
98
|
+
return "current";
|
|
99
|
+
}
|
|
100
|
+
export async function runProjectUpdateMaintenance(options) {
|
|
101
|
+
const projectRoot = await findProjectRoot();
|
|
102
|
+
if (!projectRoot) {
|
|
103
|
+
out.info("No EAI project detected here; skipping Gofer and app-template maintenance.");
|
|
104
|
+
return {
|
|
105
|
+
projectRoot: null,
|
|
106
|
+
gofer: "skipped",
|
|
107
|
+
template: "skipped",
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
out.blank();
|
|
111
|
+
out.heading("Project Maintenance");
|
|
112
|
+
out.blank();
|
|
113
|
+
out.success(`Project root: ${chalk.dim(projectRoot)}`);
|
|
114
|
+
const resolvedManifest = await resolveProjectManifest(projectRoot);
|
|
115
|
+
const plan = await planGoferRefresh(projectRoot, resolvedManifest.manifest, {
|
|
116
|
+
workflowProfile: "enterpriseai",
|
|
117
|
+
});
|
|
118
|
+
if (options.mode === "check") {
|
|
119
|
+
if (hasGoferWork(plan.summary) || plan.firstRefresh) {
|
|
120
|
+
out.info("Gofer-managed asset refresh is available.");
|
|
121
|
+
renderGoferSummary(plan.summary);
|
|
122
|
+
out.dim(` Apply: ${chalk.cyan("eai gofer refresh")}`);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
out.success("Gofer-managed assets are already up to date.");
|
|
126
|
+
}
|
|
127
|
+
const template = await renderTemplateStatus(projectRoot, options);
|
|
128
|
+
return {
|
|
129
|
+
projectRoot,
|
|
130
|
+
gofer: hasGoferWork(plan.summary) || plan.firstRefresh ? "checked" : "current",
|
|
131
|
+
template,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const applyResult = await applyGoferRefresh(plan, { force: false });
|
|
135
|
+
if (hasGoferWork(applyResult.summary) || plan.firstRefresh) {
|
|
136
|
+
out.success("Gofer-managed assets refreshed.");
|
|
137
|
+
renderGoferSummary(applyResult.summary);
|
|
138
|
+
if (applyResult.backupDirectory) {
|
|
139
|
+
out.info(`Backup directory: ${applyResult.backupDirectory}`);
|
|
140
|
+
}
|
|
141
|
+
if (applyResult.summary.conflicted > 0) {
|
|
142
|
+
out.warn("Some managed files were left untouched because they have local edits. Re-run `eai gofer refresh --force` only after reviewing the backups.");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
out.success("Gofer-managed assets are already up to date.");
|
|
147
|
+
}
|
|
148
|
+
const template = await renderTemplateStatus(projectRoot, options);
|
|
149
|
+
return {
|
|
150
|
+
projectRoot,
|
|
151
|
+
gofer: "refreshed",
|
|
152
|
+
template,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export function runCurrentCliCommand(args) {
|
|
156
|
+
return new Promise((resolve) => {
|
|
157
|
+
const entry = process.argv[1];
|
|
158
|
+
if (!entry) {
|
|
159
|
+
resolve(false);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const child = spawn(process.execPath, [entry, ...args], {
|
|
163
|
+
stdio: "inherit",
|
|
164
|
+
env: {
|
|
165
|
+
...process.env,
|
|
166
|
+
NO_UPDATE_NOTIFIER: "1",
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
child.on("error", () => resolve(false));
|
|
170
|
+
child.on("close", (code) => resolve(code === 0));
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
export function runInstalledEaiCommand(args) {
|
|
174
|
+
return new Promise((resolve) => {
|
|
175
|
+
const executable = process.platform === "win32" ? "eai.cmd" : "eai";
|
|
176
|
+
const child = spawn(executable, args, {
|
|
177
|
+
stdio: "inherit",
|
|
178
|
+
env: {
|
|
179
|
+
...process.env,
|
|
180
|
+
NO_UPDATE_NOTIFIER: "1",
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
child.on("error", () => resolve(false));
|
|
184
|
+
child.on("close", (code) => resolve(code === 0));
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=update-maintenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-maintenance.js","sourceRoot":"","sources":["../../src/lib/update-maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK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AAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities — consolidated from duplicate definitions across commands.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert an object type name (camelCase or snake_case) to a kebab-case slug.
|
|
6
|
+
* Previously duplicated in: api.ts, types.ts, resources.ts
|
|
7
|
+
*/
|
|
8
|
+
export declare function toObjectTypeSlug(objectType: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Type guard for plain objects.
|
|
11
|
+
* Previously duplicated in: types.ts, resources.ts, verify.ts
|
|
12
|
+
*/
|
|
13
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Extract a message string from an unknown error.
|
|
16
|
+
* Replaces inline `err instanceof Error ? err.message : String(err)` ternaries.
|
|
17
|
+
*/
|
|
18
|
+
export declare function errMsg(err: unknown): string;
|
|
19
|
+
export declare const CHILD_TENANT_NAME_REQUIRED_MESSAGE = "A child company tenant name is required. Pass `--child-tenant <name>`.";
|
|
20
|
+
export declare const CHILD_TENANT_SLUG_REQUIRED_MESSAGE = "A child company tenant slug is required. Pass `--child-tenant-slug <slug>`.";
|
|
21
|
+
export declare function normalizeChildTenantDisplayNameOption(value: string | undefined): string | undefined;
|
|
22
|
+
export declare function normalizeChildTenantSlugOption(value: string | undefined): string | undefined;
|
|
23
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAE3C;AAED,eAAO,MAAM,kCAAkC,2EAC2B,CAAC;AAC3E,eAAO,MAAM,kCAAkC,gFACgC,CAAC;AAWhF,wBAAgB,qCAAqC,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEnG;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAE5F"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities — consolidated from duplicate definitions across commands.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert an object type name (camelCase or snake_case) to a kebab-case slug.
|
|
6
|
+
* Previously duplicated in: api.ts, types.ts, resources.ts
|
|
7
|
+
*/
|
|
8
|
+
export function toObjectTypeSlug(objectType) {
|
|
9
|
+
return objectType
|
|
10
|
+
.trim()
|
|
11
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
12
|
+
.replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')
|
|
13
|
+
.replace(/[_\s]+/g, '-')
|
|
14
|
+
.replace(/-+/g, '-')
|
|
15
|
+
.toLowerCase();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type guard for plain objects.
|
|
19
|
+
* Previously duplicated in: types.ts, resources.ts, verify.ts
|
|
20
|
+
*/
|
|
21
|
+
export function isRecord(value) {
|
|
22
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Extract a message string from an unknown error.
|
|
26
|
+
* Replaces inline `err instanceof Error ? err.message : String(err)` ternaries.
|
|
27
|
+
*/
|
|
28
|
+
export function errMsg(err) {
|
|
29
|
+
return err instanceof Error ? err.message : String(err);
|
|
30
|
+
}
|
|
31
|
+
export const CHILD_TENANT_NAME_REQUIRED_MESSAGE = "A child company tenant name is required. Pass `--child-tenant <name>`.";
|
|
32
|
+
export const CHILD_TENANT_SLUG_REQUIRED_MESSAGE = "A child company tenant slug is required. Pass `--child-tenant-slug <slug>`.";
|
|
33
|
+
function normalizeRequiredCliOptionValue(value, message) {
|
|
34
|
+
if (value === undefined)
|
|
35
|
+
return undefined;
|
|
36
|
+
const trimmed = value.trim();
|
|
37
|
+
if (!trimmed) {
|
|
38
|
+
throw new Error(message);
|
|
39
|
+
}
|
|
40
|
+
return trimmed;
|
|
41
|
+
}
|
|
42
|
+
export function normalizeChildTenantDisplayNameOption(value) {
|
|
43
|
+
return normalizeRequiredCliOptionValue(value, CHILD_TENANT_NAME_REQUIRED_MESSAGE);
|
|
44
|
+
}
|
|
45
|
+
export function normalizeChildTenantSlugOption(value) {
|
|
46
|
+
return normalizeRequiredCliOptionValue(value, CHILD_TENANT_SLUG_REQUIRED_MESSAGE);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB;IACjD,OAAO,UAAU;SACd,IAAI,EAAE;SACN,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;SACtC,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC;SACxC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,WAAW,EAAE,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,GAAY;IACjC,OAAO,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,MAAM,kCAAkC,GAC7C,wEAAwE,CAAC;AAC3E,MAAM,CAAC,MAAM,kCAAkC,GAC7C,6EAA6E,CAAC;AAEhF,SAAS,+BAA+B,CAAC,KAAyB,EAAE,OAAe;IACjF,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,qCAAqC,CAAC,KAAyB;IAC7E,OAAO,+BAA+B,CAAC,KAAK,EAAE,kCAAkC,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,KAAyB;IACtE,OAAO,+BAA+B,CAAC,KAAK,EAAE,kCAAkC,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare const SHARED_WORKFLOW_CONFIG_OBJECT_TYPE = "shared-workflow-config";
|
|
2
|
+
export declare const VERTICAL_PRODUCT_CONFIG_OBJECT_TYPE = "vertical-product-config";
|
|
3
|
+
export declare const SHARED_AI_PROFILE_OBJECT_TYPE = "shared-ai-profile";
|
|
4
|
+
export declare const SHARED_CHATBOT_CONFIG_OBJECT_TYPE = "shared-chatbot-config";
|
|
5
|
+
export declare const SHARED_ASSET_ADOPTION_OBJECT_TYPE = "shared-asset-adoption";
|
|
6
|
+
export declare const SHARED_ASSET_DISPOSITION_OBJECT_TYPE = "shared-asset-disposition";
|
|
7
|
+
export declare const WORKFLOW_VERTICAL_CONFIG_PREFIX = "workflow:";
|
|
8
|
+
export type WorkflowProvisionStatus = "active" | "draft";
|
|
9
|
+
export interface WorkflowProvisionStage {
|
|
10
|
+
id: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
order?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface WorkflowProvisionDefinitionInput {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
verticalKey: string;
|
|
17
|
+
workflowKey: string;
|
|
18
|
+
displayName: string;
|
|
19
|
+
stages: WorkflowProvisionStage[];
|
|
20
|
+
usecase?: string;
|
|
21
|
+
scopeKey?: string;
|
|
22
|
+
status?: WorkflowProvisionStatus;
|
|
23
|
+
source?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WorkflowProvisionPayloads {
|
|
26
|
+
workflowConfig: Record<string, unknown>;
|
|
27
|
+
verticalConfig: Record<string, unknown>;
|
|
28
|
+
workflowEnvKey: string;
|
|
29
|
+
envValues: Record<string, string>;
|
|
30
|
+
}
|
|
31
|
+
export interface WorkflowAiRuntimeBindingInput extends WorkflowProvisionDefinitionInput {
|
|
32
|
+
providerIntegrationKey: string;
|
|
33
|
+
model: string;
|
|
34
|
+
profileKey?: string;
|
|
35
|
+
stagePrompts?: Record<string, string>;
|
|
36
|
+
}
|
|
37
|
+
export interface WorkflowAiRuntimeBindingPayloads {
|
|
38
|
+
aiProfile: Record<string, unknown>;
|
|
39
|
+
chatbotConfigs: Array<Record<string, unknown>>;
|
|
40
|
+
}
|
|
41
|
+
export declare function workflowVerticalConfigKey(workflowKey: string): string;
|
|
42
|
+
export declare function toEnvToken(value: string): string;
|
|
43
|
+
export declare function humanizeSlug(value: string): string;
|
|
44
|
+
export declare function parseStageSpec(value: string, index: number): WorkflowProvisionStage;
|
|
45
|
+
export declare function parseEnvMapping(value: string): [string, string];
|
|
46
|
+
export declare function validateStageEnvMappings(stages: WorkflowProvisionStage[], stageEnv: Record<string, string>): void;
|
|
47
|
+
export declare function validateStagePromptMappings(stages: WorkflowProvisionStage[], stagePrompts: Record<string, string>): void;
|
|
48
|
+
export declare function buildWorkflowProvisionPayloads(input: WorkflowProvisionDefinitionInput, options?: {
|
|
49
|
+
workflowEnvKey?: string;
|
|
50
|
+
stageEnv?: Record<string, string>;
|
|
51
|
+
}): WorkflowProvisionPayloads;
|
|
52
|
+
export declare function parseStagePrompt(value: string): [string, string];
|
|
53
|
+
export declare function buildWorkflowAiRuntimeBindingPayloads(input: WorkflowAiRuntimeBindingInput): WorkflowAiRuntimeBindingPayloads;
|
|
54
|
+
//# sourceMappingURL=workflow-provisioning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-provisioning.d.ts","sourceRoot":"","sources":["../../src/lib/workflow-provisioning.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kCAAkC,2BAA2B,CAAC;AAC3E,eAAO,MAAM,mCAAmC,4BAA4B,CAAC;AAC7E,eAAO,MAAM,6BAA6B,sBAAsB,CAAC;AACjE,eAAO,MAAM,iCAAiC,0BAA0B,CAAC;AACzE,eAAO,MAAM,iCAAiC,0BAA0B,CAAC;AACzE,eAAO,MAAM,oCAAoC,6BAA6B,CAAC;AAC/E,eAAO,MAAM,+BAA+B,cAAc,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,O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