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,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config loader — reads eai.config.ts from project root.
|
|
3
|
+
*
|
|
4
|
+
* Uses a lightweight approach: transpile TypeScript to JS using Node's
|
|
5
|
+
* native import() with a temporary .mjs file. This avoids requiring
|
|
6
|
+
* ts-node or tsx as dependencies.
|
|
7
|
+
*/
|
|
8
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
9
|
+
[key: string]: JsonValue;
|
|
10
|
+
};
|
|
11
|
+
export interface ObjectTypeProperty {
|
|
12
|
+
name: string;
|
|
13
|
+
type: "text" | "number" | "boolean" | "date" | "select" | "json" | "file" | "relationship";
|
|
14
|
+
required: boolean;
|
|
15
|
+
indexed?: boolean;
|
|
16
|
+
defaultValue?: JsonValue;
|
|
17
|
+
options?: Array<{
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}>;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ObjectTypeLinkType {
|
|
24
|
+
name: string;
|
|
25
|
+
targetObjectType: string;
|
|
26
|
+
cardinality: "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many";
|
|
27
|
+
cascadeDelete?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface ObjectTypeAction {
|
|
30
|
+
name: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
requiredRole: "tenant-viewer" | "tenant-builder" | "tenant-admin";
|
|
33
|
+
validationRules: {
|
|
34
|
+
requiredFields?: string[];
|
|
35
|
+
requiredStatus?: string;
|
|
36
|
+
};
|
|
37
|
+
sideEffects: Array<{
|
|
38
|
+
type: "set_field" | "set_timestamp" | "set_user";
|
|
39
|
+
field: string;
|
|
40
|
+
value?: string | number | boolean;
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
export interface StorageIndexDefinition {
|
|
44
|
+
name?: string;
|
|
45
|
+
fields: string[] | Array<Record<string, unknown>> | Record<string, unknown>;
|
|
46
|
+
unique?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface SqlStorageBinding {
|
|
49
|
+
databaseAlias: string;
|
|
50
|
+
tenantSchemaStrategy: "per-tenant-schema" | "shared-schema" | "per-tenant-database";
|
|
51
|
+
schemaName?: string;
|
|
52
|
+
tableName: string;
|
|
53
|
+
indexes?: StorageIndexDefinition[];
|
|
54
|
+
}
|
|
55
|
+
export interface DocumentDbStorageBinding {
|
|
56
|
+
databaseAlias: string;
|
|
57
|
+
databaseName: string;
|
|
58
|
+
collectionName: string;
|
|
59
|
+
partitionKey: string;
|
|
60
|
+
indexes?: StorageIndexDefinition[];
|
|
61
|
+
}
|
|
62
|
+
export interface BlobStorageBinding {
|
|
63
|
+
storageAccountAlias: string;
|
|
64
|
+
containerName: string;
|
|
65
|
+
blobPrefix?: string;
|
|
66
|
+
metadataSchema?: Record<string, unknown>;
|
|
67
|
+
}
|
|
68
|
+
export interface SearchStorageBinding {
|
|
69
|
+
searchServiceAlias: string;
|
|
70
|
+
indexName: string;
|
|
71
|
+
sourceObjectTypes?: string[];
|
|
72
|
+
fieldMappings?: Record<string, unknown> | Array<Record<string, unknown>>;
|
|
73
|
+
}
|
|
74
|
+
export interface StorageBindingDefinition {
|
|
75
|
+
sql?: SqlStorageBinding;
|
|
76
|
+
documentdb?: DocumentDbStorageBinding;
|
|
77
|
+
blob?: BlobStorageBinding;
|
|
78
|
+
search?: SearchStorageBinding;
|
|
79
|
+
}
|
|
80
|
+
export interface ObjectTypeDefinition {
|
|
81
|
+
name: string;
|
|
82
|
+
displayName: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
properties: ObjectTypeProperty[];
|
|
85
|
+
linkTypes: ObjectTypeLinkType[];
|
|
86
|
+
actions: ObjectTypeAction[];
|
|
87
|
+
storageBackend?: string;
|
|
88
|
+
schemaVersion?: number;
|
|
89
|
+
storageMetadataStatus?: "draft" | "ready";
|
|
90
|
+
storageBinding?: StorageBindingDefinition;
|
|
91
|
+
provisioningHints?: Record<string, unknown>;
|
|
92
|
+
status: "draft" | "published" | "deprecated";
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Find the project root by walking up from cwd looking for eai.config.ts
|
|
96
|
+
* or src/eai.config/object-types.ts (eai-app-template convention).
|
|
97
|
+
*/
|
|
98
|
+
export declare function findProjectRoot(from?: string): Promise<string | null>;
|
|
99
|
+
/**
|
|
100
|
+
* Load object types from the project's object-types.ts file.
|
|
101
|
+
*
|
|
102
|
+
* Strips TypeScript-specific syntax (type annotations, interfaces, enums,
|
|
103
|
+
* import/export type statements) and evaluates the resulting JS.
|
|
104
|
+
*/
|
|
105
|
+
export declare function loadObjectTypes(projectRoot: string): Promise<Record<string, ObjectTypeDefinition[]>>;
|
|
106
|
+
/**
|
|
107
|
+
* Load environment variables from the project's .env.local file.
|
|
108
|
+
*/
|
|
109
|
+
export declare function loadEnvFile(projectRoot: string): Promise<Record<string, string>>;
|
|
110
|
+
/**
|
|
111
|
+
* Merge key=value pairs into an existing .env.local, updating existing keys
|
|
112
|
+
* in-place and appending new ones. All other lines (comments, blanks) are
|
|
113
|
+
* preserved unchanged.
|
|
114
|
+
*/
|
|
115
|
+
export declare function patchEnvFile(projectRoot: string, patches: Record<string, string>): Promise<void>;
|
|
116
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE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AAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1C,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,YAAY,CAAC;CAC9C;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkD3E;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC,CA0CjD;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAyBjC;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC,CAkCf"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config loader — reads eai.config.ts from project root.
|
|
3
|
+
*
|
|
4
|
+
* Uses a lightweight approach: transpile TypeScript to JS using Node's
|
|
5
|
+
* native import() with a temporary .mjs file. This avoids requiring
|
|
6
|
+
* ts-node or tsx as dependencies.
|
|
7
|
+
*/
|
|
8
|
+
import { readFile, writeFile, unlink, access } from "node:fs/promises";
|
|
9
|
+
import { resolve, join } from "node:path";
|
|
10
|
+
import { tmpdir } from "node:os";
|
|
11
|
+
import { randomUUID } from "node:crypto";
|
|
12
|
+
import { pathToFileURL } from "node:url";
|
|
13
|
+
/**
|
|
14
|
+
* Find the project root by walking up from cwd looking for eai.config.ts
|
|
15
|
+
* or src/eai.config/object-types.ts (eai-app-template convention).
|
|
16
|
+
*/
|
|
17
|
+
export async function findProjectRoot(from) {
|
|
18
|
+
let dir = from || process.cwd();
|
|
19
|
+
const root = resolve("/");
|
|
20
|
+
while (dir !== root) {
|
|
21
|
+
// Check for eai.config.ts at project root (CLI convention)
|
|
22
|
+
try {
|
|
23
|
+
await access(join(dir, "eai.config.ts"));
|
|
24
|
+
return dir;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
/* not here */
|
|
28
|
+
}
|
|
29
|
+
// Check for src/eai.config/ directory (eai-app-template convention)
|
|
30
|
+
try {
|
|
31
|
+
await access(join(dir, "src", "eai.config", "object-types.ts"));
|
|
32
|
+
return dir;
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
/* not here */
|
|
36
|
+
}
|
|
37
|
+
// Provider-neutral EAI app runtime contract.
|
|
38
|
+
try {
|
|
39
|
+
await access(join(dir, "eai.runtime.json"));
|
|
40
|
+
return dir;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
/* not here */
|
|
44
|
+
}
|
|
45
|
+
// Check for package.json with eai-related deps (fallback)
|
|
46
|
+
try {
|
|
47
|
+
await access(join(dir, "package.json"));
|
|
48
|
+
const pkg = JSON.parse(await readFile(join(dir, "package.json"), "utf-8"));
|
|
49
|
+
if (pkg.dependencies?.["@enterpriseaigroup/platform-sdk"] ||
|
|
50
|
+
pkg.dependencies?.["@eai-tools/platform-sdk"] ||
|
|
51
|
+
pkg.dependencies?.["@eai-tools/core"]) {
|
|
52
|
+
return dir;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
/* not here */
|
|
57
|
+
}
|
|
58
|
+
dir = resolve(dir, "..");
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Load object types from the project's object-types.ts file.
|
|
64
|
+
*
|
|
65
|
+
* Strips TypeScript-specific syntax (type annotations, interfaces, enums,
|
|
66
|
+
* import/export type statements) and evaluates the resulting JS.
|
|
67
|
+
*/
|
|
68
|
+
export async function loadObjectTypes(projectRoot) {
|
|
69
|
+
// Try src/eai.config/object-types.ts (eai-app-template convention)
|
|
70
|
+
let objectTypesPath = join(projectRoot, "src", "eai.config", "object-types.ts");
|
|
71
|
+
try {
|
|
72
|
+
await access(objectTypesPath);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
// Try eai.config/object-types.ts
|
|
76
|
+
objectTypesPath = join(projectRoot, "eai.config", "object-types.ts");
|
|
77
|
+
try {
|
|
78
|
+
await access(objectTypesPath);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
throw new Error(`No object-types.ts found. Expected at:\n` +
|
|
82
|
+
` ${join(projectRoot, "src", "eai.config", "object-types.ts")}\n` +
|
|
83
|
+
` ${join(projectRoot, "eai.config", "object-types.ts")}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const source = await readFile(objectTypesPath, "utf-8");
|
|
87
|
+
// Strip TypeScript constructs to produce evaluable JS
|
|
88
|
+
const jsSource = stripTypeScript(source);
|
|
89
|
+
// Write to a temp .mjs file and import it
|
|
90
|
+
const tempFile = join(tmpdir(), `eai-object-types-${randomUUID()}.mjs`);
|
|
91
|
+
try {
|
|
92
|
+
await writeFile(tempFile, jsSource, "utf-8");
|
|
93
|
+
const module = await import(pathToFileURL(tempFile).href);
|
|
94
|
+
return module.objectTypes || module.default?.objectTypes || {};
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
try {
|
|
98
|
+
await unlink(tempFile);
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
/* cleanup best-effort */
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Load environment variables from the project's .env.local file.
|
|
107
|
+
*/
|
|
108
|
+
export async function loadEnvFile(projectRoot) {
|
|
109
|
+
const envPath = join(projectRoot, ".env.local");
|
|
110
|
+
try {
|
|
111
|
+
const content = await readFile(envPath, "utf-8");
|
|
112
|
+
const vars = {};
|
|
113
|
+
for (const line of content.split("\n")) {
|
|
114
|
+
const trimmed = line.trim();
|
|
115
|
+
if (!trimmed || trimmed.startsWith("#"))
|
|
116
|
+
continue;
|
|
117
|
+
const eqIndex = trimmed.indexOf("=");
|
|
118
|
+
if (eqIndex === -1)
|
|
119
|
+
continue;
|
|
120
|
+
const key = trimmed.slice(0, eqIndex).trim();
|
|
121
|
+
let value = trimmed.slice(eqIndex + 1).trim();
|
|
122
|
+
// Strip surrounding quotes
|
|
123
|
+
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
124
|
+
(value.startsWith("'") && value.endsWith("'"))) {
|
|
125
|
+
value = value.slice(1, -1);
|
|
126
|
+
}
|
|
127
|
+
vars[key] = value;
|
|
128
|
+
}
|
|
129
|
+
return vars;
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
return {};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Merge key=value pairs into an existing .env.local, updating existing keys
|
|
137
|
+
* in-place and appending new ones. All other lines (comments, blanks) are
|
|
138
|
+
* preserved unchanged.
|
|
139
|
+
*/
|
|
140
|
+
export async function patchEnvFile(projectRoot, patches) {
|
|
141
|
+
const envPath = join(projectRoot, ".env.local");
|
|
142
|
+
let content;
|
|
143
|
+
try {
|
|
144
|
+
content = await readFile(envPath, "utf-8");
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
// File doesn't exist — create it from the patches alone
|
|
148
|
+
const lines = Object.entries(patches).map(([k, v]) => `${k}=${v}`);
|
|
149
|
+
await writeFile(envPath, lines.join("\n") + "\n", "utf-8");
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const patchKeys = Object.keys(patches);
|
|
153
|
+
const patched = new Set();
|
|
154
|
+
const updatedLines = content.split("\n").map((line) => {
|
|
155
|
+
for (const key of patchKeys) {
|
|
156
|
+
if (line.startsWith(`${key}=`)) {
|
|
157
|
+
patched.add(key);
|
|
158
|
+
return `${key}=${patches[key]}`;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return line;
|
|
162
|
+
});
|
|
163
|
+
for (const key of patchKeys) {
|
|
164
|
+
if (!patched.has(key)) {
|
|
165
|
+
updatedLines.push(`${key}=${patches[key]}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const trailingNewline = content.endsWith("\n") ? "\n" : "";
|
|
169
|
+
await writeFile(envPath, updatedLines.join("\n") + trailingNewline, "utf-8");
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Strip TypeScript-specific syntax to produce evaluable JS.
|
|
173
|
+
* Based on eai-app-template's generate-object-types-json.mjs approach.
|
|
174
|
+
*/
|
|
175
|
+
function stripTypeScript(source) {
|
|
176
|
+
let js = source;
|
|
177
|
+
// Remove import statements
|
|
178
|
+
js = js.replace(/^import\s+.*$/gm, "");
|
|
179
|
+
// Remove export type / export interface blocks
|
|
180
|
+
js = js.replace(/^export\s+type\s+\w+\s*=\s*[^;]+;/gm, "");
|
|
181
|
+
js = js.replace(/^export\s+interface\s+\w+\s*\{[\s\S]*?\n\}/gm, "");
|
|
182
|
+
js = js.replace(/^interface\s+\w+\s*\{[\s\S]*?\n\}/gm, "");
|
|
183
|
+
js = js.replace(/^type\s+\w+\s*=\s*[^;]+;/gm, "");
|
|
184
|
+
// Remove type annotations from variable declarations: `: TypeName` after identifiers
|
|
185
|
+
// e.g., `const x: Record<string, Foo[]> = {` → `const x = {`
|
|
186
|
+
js = js.replace(/:\s*(?:Record|Array|Map|Set)<[^>]+>(?:\[\])?(?:\s*=)/g, " =");
|
|
187
|
+
js = js.replace(/:\s*\w+(?:\[\])?\s*(?==)/g, " =");
|
|
188
|
+
// Remove `as const` assertions
|
|
189
|
+
js = js.replace(/\s+as\s+const/g, "");
|
|
190
|
+
// Change `export const` to just `export const` (keep for module)
|
|
191
|
+
// Actually, wrap in an export for ESM
|
|
192
|
+
js = js.replace(/^export\s+const\s+/gm, "export const ");
|
|
193
|
+
return js;
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA+GzC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAa;IACjD,IAAI,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAE1B,OAAO,GAAG,KAAK,IAAI,EAAE,CAAC;QACpB,2DAA2D;QAC3D,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC;YACzC,OAAO,GAAG,CAAC;QACb,CAAC;QAAC,MAAM,CAAC;YACP,cAAc;QAChB,CAAC;Q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
|
|
3
|
+
* copy-pasted across every authenticated command.
|
|
4
|
+
*/
|
|
5
|
+
import type { Ora } from 'ora';
|
|
6
|
+
import { PlatformAPIClient } from './api.js';
|
|
7
|
+
import { type TenantMembership } from './tenant-context.js';
|
|
8
|
+
import type { StoredTokens } from './auth.js';
|
|
9
|
+
export interface CommandContext {
|
|
10
|
+
root: string;
|
|
11
|
+
publicApiUrl: string;
|
|
12
|
+
client: PlatformAPIClient;
|
|
13
|
+
tenantId: string;
|
|
14
|
+
tenantSlug: string;
|
|
15
|
+
activeTenant: TenantMembership;
|
|
16
|
+
memberships: TenantMembership[];
|
|
17
|
+
tokens: StoredTokens;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the full command context needed by every authenticated command.
|
|
21
|
+
*
|
|
22
|
+
* Before: 4 lines of boilerplate copy-pasted 9 times.
|
|
23
|
+
* After: one call.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveCommandContext(options?: {
|
|
26
|
+
tenantId?: string;
|
|
27
|
+
interactive?: boolean;
|
|
28
|
+
forceRefresh?: boolean;
|
|
29
|
+
}): Promise<CommandContext>;
|
|
30
|
+
/**
|
|
31
|
+
* Normalise the output format — collapses the `--json` shorthand flag into `--format`.
|
|
32
|
+
* Replaces 11× inline ternary: `options.json ? 'json' : options.format`
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeFormat(options: {
|
|
35
|
+
format?: string;
|
|
36
|
+
json?: boolean;
|
|
37
|
+
}): string;
|
|
38
|
+
/**
|
|
39
|
+
* Start a spinner for non-JSON output, or return null for JSON/non-TTY contexts.
|
|
40
|
+
* Replaces 15× inline `ora(message).start()` calls.
|
|
41
|
+
*/
|
|
42
|
+
export declare function makeSpinner(format: string, message: string): Ora | null;
|
|
43
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/lib/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAIL,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,gBAAgB,CAAC;IAC/B,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,CAAC,EAAE;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,OAAO,CAAC,cAAc,CAAC,CAmC1B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAGpF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAGvE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared command context resolution — eliminates the 4-step boilerplate that was
|
|
3
|
+
* copy-pasted across every authenticated command.
|
|
4
|
+
*/
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
import { findProjectRoot } from './config.js';
|
|
7
|
+
import { PlatformAPIClient } from './api.js';
|
|
8
|
+
import { resolvePublicApiUrl, resolveActiveTenantContext, TenantMembershipAuthError, } from './tenant-context.js';
|
|
9
|
+
import { ErrorCode, exitWithError } from './error-codes.js';
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the full command context needed by every authenticated command.
|
|
12
|
+
*
|
|
13
|
+
* Before: 4 lines of boilerplate copy-pasted 9 times.
|
|
14
|
+
* After: one call.
|
|
15
|
+
*/
|
|
16
|
+
export async function resolveCommandContext(options) {
|
|
17
|
+
const root = await findProjectRoot();
|
|
18
|
+
if (!root) {
|
|
19
|
+
exitWithError(ErrorCode.E001);
|
|
20
|
+
}
|
|
21
|
+
const publicApiUrl = await resolvePublicApiUrl(root);
|
|
22
|
+
let context;
|
|
23
|
+
try {
|
|
24
|
+
context = await resolveActiveTenantContext({
|
|
25
|
+
projectRoot: root,
|
|
26
|
+
publicApiUrl,
|
|
27
|
+
interactive: options?.interactive ?? true,
|
|
28
|
+
tenantId: options?.tenantId,
|
|
29
|
+
forceRefresh: options?.forceRefresh,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
if (error instanceof TenantMembershipAuthError) {
|
|
34
|
+
exitWithError(ErrorCode.E102);
|
|
35
|
+
}
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
const client = new PlatformAPIClient(context.publicApiUrl, context.activeTenant.id);
|
|
39
|
+
return {
|
|
40
|
+
root,
|
|
41
|
+
publicApiUrl: context.publicApiUrl,
|
|
42
|
+
client,
|
|
43
|
+
tenantId: context.activeTenant.id,
|
|
44
|
+
tenantSlug: context.activeTenant.slug,
|
|
45
|
+
activeTenant: context.activeTenant,
|
|
46
|
+
memberships: context.memberships,
|
|
47
|
+
tokens: context.tokens,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Normalise the output format — collapses the `--json` shorthand flag into `--format`.
|
|
52
|
+
* Replaces 11× inline ternary: `options.json ? 'json' : options.format`
|
|
53
|
+
*/
|
|
54
|
+
export function normalizeFormat(options) {
|
|
55
|
+
if (options.json)
|
|
56
|
+
return 'json';
|
|
57
|
+
return options.format || 'text';
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Start a spinner for non-JSON output, or return null for JSON/non-TTY contexts.
|
|
61
|
+
* Replaces 15× inline `ora(message).start()` calls.
|
|
62
|
+
*/
|
|
63
|
+
export function makeSpinner(format, message) {
|
|
64
|
+
if (format === 'json' || !process.stdout.isTTY)
|
|
65
|
+
return null;
|
|
66
|
+
return ora(message).start();
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/lib/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,GAG1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAa5D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAI3C;IACC,MAAM,IAAI,GAAG,MAAM,eAAe,EAAE,CAAC;IACrC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACrD,IAAI,OAA4B,CAAC;IACjC,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,0BAA0B,CAAC;YACzC,WAAW,EAAE,IAAI;YACjB,YAAY;YACZ,WAAW,EAAE,OAAO,EAAE,WAAW,IAAI,IAAI;YACzC,QAAQ,EAAE,OAAO,EAAE,QAAQ;YAC3B,YAAY,EAAE,OAAO,EAAE,YAAY;SACpC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,yBAAyB,EAAE,CAAC;YAC/C,aAAa,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,iBAAiB,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAEpF,OAAO;QACL,IAAI;QACJ,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,MAAM;QACN,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE;QACjC,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI;QACrC,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAA4C;IAC1E,IAAI,OAAO,CAAC,IAAI;QAAE,OAAO,MAAM,CAAC;IAChC,OAAO,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,OAAe;IACzD,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAC5D,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured error codes for consistent error handling across the CLI.
|
|
3
|
+
*
|
|
4
|
+
* Error code categories:
|
|
5
|
+
* - E001-E099: Project errors (not in EAI project, config missing)
|
|
6
|
+
* - E100-E199: Auth errors (not logged in, token expired)
|
|
7
|
+
* - E200-E299: Platform errors (API unreachable, resource not found)
|
|
8
|
+
* - E300-E399: Validation errors (invalid schema, missing field)
|
|
9
|
+
*/
|
|
10
|
+
export declare enum ErrorCode {
|
|
11
|
+
E001 = "E001",
|
|
12
|
+
E002 = "E002",
|
|
13
|
+
E003 = "E003",
|
|
14
|
+
E004 = "E004",
|
|
15
|
+
E005 = "E005",
|
|
16
|
+
E006 = "E006",
|
|
17
|
+
E101 = "E101",
|
|
18
|
+
E102 = "E102",
|
|
19
|
+
E103 = "E103",
|
|
20
|
+
E104 = "E104",
|
|
21
|
+
E201 = "E201",
|
|
22
|
+
E202 = "E202",
|
|
23
|
+
E203 = "E203",
|
|
24
|
+
E204 = "E204",
|
|
25
|
+
E205 = "E205",
|
|
26
|
+
E242 = "E242",
|
|
27
|
+
E243 = "E243",
|
|
28
|
+
E250 = "E250",
|
|
29
|
+
E260 = "E260",
|
|
30
|
+
E270 = "E270",
|
|
31
|
+
E280 = "E280",
|
|
32
|
+
E301 = "E301",
|
|
33
|
+
E302 = "E302",
|
|
34
|
+
E303 = "E303",
|
|
35
|
+
E304 = "E304",
|
|
36
|
+
E305 = "E305"
|
|
37
|
+
}
|
|
38
|
+
export interface ErrorDefinition {
|
|
39
|
+
code: ErrorCode;
|
|
40
|
+
message: string;
|
|
41
|
+
suggestion: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const errorCatalog: Record<ErrorCode, Omit<ErrorDefinition, 'code'>>;
|
|
44
|
+
/**
|
|
45
|
+
* Format error for text output
|
|
46
|
+
*/
|
|
47
|
+
export declare function formatError(code: ErrorCode, context?: Record<string, string>): string;
|
|
48
|
+
/**
|
|
49
|
+
* Format error for JSON output
|
|
50
|
+
*/
|
|
51
|
+
export declare function formatErrorJSON(code: ErrorCode, context?: Record<string, string>): object;
|
|
52
|
+
/**
|
|
53
|
+
* Exit with error (text or JSON format)
|
|
54
|
+
*/
|
|
55
|
+
export declare function exitWithError(code: ErrorCode, context?: Record<string, string>, format?: 'text' | 'json'): never;
|
|
56
|
+
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/lib/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,oBAAY,SAAS;IAEnB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IAGb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IAGb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IAGb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAgHzE,CAAC;AAaF;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,SAAS,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,CAWR;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,SAAS,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,MAAM,CAeR;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS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