cc-agentic-framework 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +686 -0
- package/bin/agentic-framework +2 -0
- package/bin/mcp-server +14 -0
- package/dist/__mocks__/chalk.d.ts +11 -0
- package/dist/__mocks__/chalk.d.ts.map +1 -0
- package/dist/__mocks__/chalk.js +20 -0
- package/dist/__mocks__/chalk.js.map +1 -0
- package/dist/__mocks__/ora.d.ts +20 -0
- package/dist/__mocks__/ora.d.ts.map +1 -0
- package/dist/__mocks__/ora.js +52 -0
- package/dist/__mocks__/ora.js.map +1 -0
- package/dist/commands/add.d.ts +6 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +105 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/agent/index.d.ts +11 -0
- package/dist/commands/agent/index.d.ts.map +1 -0
- package/dist/commands/agent/index.js +22 -0
- package/dist/commands/agent/index.js.map +1 -0
- package/dist/commands/agent/list.d.ts +8 -0
- package/dist/commands/agent/list.d.ts.map +1 -0
- package/dist/commands/agent/list.js +53 -0
- package/dist/commands/agent/list.js.map +1 -0
- package/dist/commands/agent/run.d.ts +9 -0
- package/dist/commands/agent/run.d.ts.map +1 -0
- package/dist/commands/agent/run.js +180 -0
- package/dist/commands/agent/run.js.map +1 -0
- package/dist/commands/agent/show.d.ts +8 -0
- package/dist/commands/agent/show.d.ts.map +1 -0
- package/dist/commands/agent/show.js +109 -0
- package/dist/commands/agent/show.js.map +1 -0
- package/dist/commands/backlog/create-ticket.d.ts +19 -0
- package/dist/commands/backlog/create-ticket.d.ts.map +1 -0
- package/dist/commands/backlog/create-ticket.js +168 -0
- package/dist/commands/backlog/create-ticket.js.map +1 -0
- package/dist/commands/backlog/import-jira.d.ts +32 -0
- package/dist/commands/backlog/import-jira.d.ts.map +1 -0
- package/dist/commands/backlog/import-jira.js +126 -0
- package/dist/commands/backlog/import-jira.js.map +1 -0
- package/dist/commands/backlog/migrate-milestones.d.ts +21 -0
- package/dist/commands/backlog/migrate-milestones.d.ts.map +1 -0
- package/dist/commands/backlog/migrate-milestones.js +155 -0
- package/dist/commands/backlog/migrate-milestones.js.map +1 -0
- package/dist/commands/backlog/update-fields.d.ts +36 -0
- package/dist/commands/backlog/update-fields.d.ts.map +1 -0
- package/dist/commands/backlog/update-fields.js +251 -0
- package/dist/commands/backlog/update-fields.js.map +1 -0
- package/dist/commands/backlog/validate-enhanced.d.ts +19 -0
- package/dist/commands/backlog/validate-enhanced.d.ts.map +1 -0
- package/dist/commands/backlog/validate-enhanced.js +282 -0
- package/dist/commands/backlog/validate-enhanced.js.map +1 -0
- package/dist/commands/backlog/validate.d.ts +19 -0
- package/dist/commands/backlog/validate.d.ts.map +1 -0
- package/dist/commands/backlog/validate.js +283 -0
- package/dist/commands/backlog/validate.js.map +1 -0
- package/dist/commands/build.d.ts +20 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +116 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/bump-version.d.ts +61 -0
- package/dist/commands/bump-version.d.ts.map +1 -0
- package/dist/commands/bump-version.js +618 -0
- package/dist/commands/bump-version.js.map +1 -0
- package/dist/commands/confluence/create-page.d.ts +11 -0
- package/dist/commands/confluence/create-page.d.ts.map +1 -0
- package/dist/commands/confluence/create-page.js +72 -0
- package/dist/commands/confluence/create-page.js.map +1 -0
- package/dist/commands/confluence/fetch-page.d.ts +11 -0
- package/dist/commands/confluence/fetch-page.d.ts.map +1 -0
- package/dist/commands/confluence/fetch-page.js +64 -0
- package/dist/commands/confluence/fetch-page.js.map +1 -0
- package/dist/commands/confluence/import-reports.d.ts +12 -0
- package/dist/commands/confluence/import-reports.d.ts.map +1 -0
- package/dist/commands/confluence/import-reports.js +68 -0
- package/dist/commands/confluence/import-reports.js.map +1 -0
- package/dist/commands/confluence/validate.d.ts +23 -0
- package/dist/commands/confluence/validate.d.ts.map +1 -0
- package/dist/commands/confluence/validate.js +272 -0
- package/dist/commands/confluence/validate.js.map +1 -0
- package/dist/commands/create-agent.d.ts +8 -0
- package/dist/commands/create-agent.d.ts.map +1 -0
- package/dist/commands/create-agent.js +104 -0
- package/dist/commands/create-agent.js.map +1 -0
- package/dist/commands/create-module.d.ts +8 -0
- package/dist/commands/create-module.d.ts.map +1 -0
- package/dist/commands/create-module.js +123 -0
- package/dist/commands/create-module.js.map +1 -0
- package/dist/commands/create-skill.d.ts +8 -0
- package/dist/commands/create-skill.d.ts.map +1 -0
- package/dist/commands/create-skill.js +108 -0
- package/dist/commands/create-skill.js.map +1 -0
- package/dist/commands/dev.d.ts +21 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +304 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/generate-agents.d.ts +19 -0
- package/dist/commands/generate-agents.d.ts.map +1 -0
- package/dist/commands/generate-agents.js +146 -0
- package/dist/commands/generate-agents.js.map +1 -0
- package/dist/commands/generate-commands.d.ts +13 -0
- package/dist/commands/generate-commands.d.ts.map +1 -0
- package/dist/commands/generate-commands.js +229 -0
- package/dist/commands/generate-commands.js.map +1 -0
- package/dist/commands/info.d.ts +2 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +83 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +27 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +740 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/jira/export.d.ts +19 -0
- package/dist/commands/jira/export.d.ts.map +1 -0
- package/dist/commands/jira/export.js +212 -0
- package/dist/commands/jira/export.js.map +1 -0
- package/dist/commands/jira/sync.d.ts +20 -0
- package/dist/commands/jira/sync.d.ts.map +1 -0
- package/dist/commands/jira/sync.js +242 -0
- package/dist/commands/jira/sync.js.map +1 -0
- package/dist/commands/list.d.ts +6 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +51 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/mcp/check.d.ts +11 -0
- package/dist/commands/mcp/check.d.ts.map +1 -0
- package/dist/commands/mcp/check.js +71 -0
- package/dist/commands/mcp/check.js.map +1 -0
- package/dist/commands/mcp/index.d.ts +15 -0
- package/dist/commands/mcp/index.d.ts.map +1 -0
- package/dist/commands/mcp/index.js +28 -0
- package/dist/commands/mcp/index.js.map +1 -0
- package/dist/commands/mcp/seed.d.ts +11 -0
- package/dist/commands/mcp/seed.d.ts.map +1 -0
- package/dist/commands/mcp/seed.js +222 -0
- package/dist/commands/mcp/seed.js.map +1 -0
- package/dist/commands/mcp/setup.d.ts +13 -0
- package/dist/commands/mcp/setup.d.ts.map +1 -0
- package/dist/commands/mcp/setup.js +387 -0
- package/dist/commands/mcp/setup.js.map +1 -0
- package/dist/commands/mcp/status.d.ts +11 -0
- package/dist/commands/mcp/status.d.ts.map +1 -0
- package/dist/commands/mcp/status.js +126 -0
- package/dist/commands/mcp/status.js.map +1 -0
- package/dist/commands/openclaw/export.d.ts +9 -0
- package/dist/commands/openclaw/export.d.ts.map +1 -0
- package/dist/commands/openclaw/export.js +72 -0
- package/dist/commands/openclaw/export.js.map +1 -0
- package/dist/commands/openclaw/index.d.ts +6 -0
- package/dist/commands/openclaw/index.d.ts.map +1 -0
- package/dist/commands/openclaw/index.js +11 -0
- package/dist/commands/openclaw/index.js.map +1 -0
- package/dist/commands/planning/create-plan.d.ts +21 -0
- package/dist/commands/planning/create-plan.d.ts.map +1 -0
- package/dist/commands/planning/create-plan.js +74 -0
- package/dist/commands/planning/create-plan.js.map +1 -0
- package/dist/commands/planning/validate-plan.d.ts +19 -0
- package/dist/commands/planning/validate-plan.d.ts.map +1 -0
- package/dist/commands/planning/validate-plan.js +276 -0
- package/dist/commands/planning/validate-plan.js.map +1 -0
- package/dist/commands/remove.d.ts +8 -0
- package/dist/commands/remove.d.ts.map +1 -0
- package/dist/commands/remove.js +157 -0
- package/dist/commands/remove.js.map +1 -0
- package/dist/commands/routes.d.ts +16 -0
- package/dist/commands/routes.d.ts.map +1 -0
- package/dist/commands/routes.js +153 -0
- package/dist/commands/routes.js.map +1 -0
- package/dist/commands/skill/deploy.d.ts +12 -0
- package/dist/commands/skill/deploy.d.ts.map +1 -0
- package/dist/commands/skill/deploy.js +327 -0
- package/dist/commands/skill/deploy.js.map +1 -0
- package/dist/commands/skill/index.d.ts +6 -0
- package/dist/commands/skill/index.d.ts.map +1 -0
- package/dist/commands/skill/index.js +20 -0
- package/dist/commands/skill/index.js.map +1 -0
- package/dist/commands/skill/info.d.ts +11 -0
- package/dist/commands/skill/info.d.ts.map +1 -0
- package/dist/commands/skill/info.js +260 -0
- package/dist/commands/skill/info.js.map +1 -0
- package/dist/commands/skill/list.d.ts +11 -0
- package/dist/commands/skill/list.d.ts.map +1 -0
- package/dist/commands/skill/list.js +242 -0
- package/dist/commands/skill/list.js.map +1 -0
- package/dist/commands/skill/pull.d.ts +12 -0
- package/dist/commands/skill/pull.d.ts.map +1 -0
- package/dist/commands/skill/pull.js +133 -0
- package/dist/commands/skill/pull.js.map +1 -0
- package/dist/commands/skill/remove.d.ts +12 -0
- package/dist/commands/skill/remove.d.ts.map +1 -0
- package/dist/commands/skill/remove.js +99 -0
- package/dist/commands/skill/remove.js.map +1 -0
- package/dist/commands/status.d.ts +11 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +195 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +20 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +517 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/template/index.d.ts +12 -0
- package/dist/commands/template/index.d.ts.map +1 -0
- package/dist/commands/template/index.js +24 -0
- package/dist/commands/template/index.js.map +1 -0
- package/dist/commands/template/info.d.ts +8 -0
- package/dist/commands/template/info.d.ts.map +1 -0
- package/dist/commands/template/info.js +125 -0
- package/dist/commands/template/info.js.map +1 -0
- package/dist/commands/template/list.d.ts +8 -0
- package/dist/commands/template/list.d.ts.map +1 -0
- package/dist/commands/template/list.js +77 -0
- package/dist/commands/template/list.js.map +1 -0
- package/dist/commands/template/render.d.ts +8 -0
- package/dist/commands/template/render.d.ts.map +1 -0
- package/dist/commands/template/render.js +115 -0
- package/dist/commands/template/render.js.map +1 -0
- package/dist/commands/template/validate.d.ts +8 -0
- package/dist/commands/template/validate.d.ts.map +1 -0
- package/dist/commands/template/validate.js +137 -0
- package/dist/commands/template/validate.js.map +1 -0
- package/dist/commands/test.d.ts +40 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +240 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/update.d.ts +12 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +248 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.d.ts +12 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +355 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/commands/writer/analyze.d.ts +19 -0
- package/dist/commands/writer/analyze.d.ts.map +1 -0
- package/dist/commands/writer/analyze.js +210 -0
- package/dist/commands/writer/analyze.js.map +1 -0
- package/dist/commands/writer/build.d.ts +21 -0
- package/dist/commands/writer/build.d.ts.map +1 -0
- package/dist/commands/writer/build.js +241 -0
- package/dist/commands/writer/build.js.map +1 -0
- package/dist/commands/writer/create-chapter.d.ts +19 -0
- package/dist/commands/writer/create-chapter.d.ts.map +1 -0
- package/dist/commands/writer/create-chapter.js +260 -0
- package/dist/commands/writer/create-chapter.js.map +1 -0
- package/dist/commands/writer/create-character.d.ts +19 -0
- package/dist/commands/writer/create-character.d.ts.map +1 -0
- package/dist/commands/writer/create-character.js +263 -0
- package/dist/commands/writer/create-character.js.map +1 -0
- package/dist/commands/writer/create-part.d.ts +19 -0
- package/dist/commands/writer/create-part.d.ts.map +1 -0
- package/dist/commands/writer/create-part.js +239 -0
- package/dist/commands/writer/create-part.js.map +1 -0
- package/dist/commands/writer/create-scene.d.ts +19 -0
- package/dist/commands/writer/create-scene.d.ts.map +1 -0
- package/dist/commands/writer/create-scene.js +286 -0
- package/dist/commands/writer/create-scene.js.map +1 -0
- package/dist/commands/writer/export.d.ts +21 -0
- package/dist/commands/writer/export.d.ts.map +1 -0
- package/dist/commands/writer/export.js +230 -0
- package/dist/commands/writer/export.js.map +1 -0
- package/dist/commands/writer/init.d.ts +19 -0
- package/dist/commands/writer/init.d.ts.map +1 -0
- package/dist/commands/writer/init.js +227 -0
- package/dist/commands/writer/init.js.map +1 -0
- package/dist/commands/writer/lib/immutability-utils.d.ts +82 -0
- package/dist/commands/writer/lib/immutability-utils.d.ts.map +1 -0
- package/dist/commands/writer/lib/immutability-utils.js +253 -0
- package/dist/commands/writer/lib/immutability-utils.js.map +1 -0
- package/dist/commands/writer/lib/lock-utils.d.ts +48 -0
- package/dist/commands/writer/lib/lock-utils.d.ts.map +1 -0
- package/dist/commands/writer/lib/lock-utils.js +122 -0
- package/dist/commands/writer/lib/lock-utils.js.map +1 -0
- package/dist/commands/writer/lock-fact.d.ts +20 -0
- package/dist/commands/writer/lock-fact.d.ts.map +1 -0
- package/dist/commands/writer/lock-fact.js +174 -0
- package/dist/commands/writer/lock-fact.js.map +1 -0
- package/dist/commands/writer/unlock-fact.d.ts +20 -0
- package/dist/commands/writer/unlock-fact.d.ts.map +1 -0
- package/dist/commands/writer/unlock-fact.js +160 -0
- package/dist/commands/writer/unlock-fact.js.map +1 -0
- package/dist/commands/writer/validate-immutability.d.ts +19 -0
- package/dist/commands/writer/validate-immutability.d.ts.map +1 -0
- package/dist/commands/writer/validate-immutability.js +148 -0
- package/dist/commands/writer/validate-immutability.js.map +1 -0
- package/dist/commands/writer/validate.d.ts +20 -0
- package/dist/commands/writer/validate.d.ts.map +1 -0
- package/dist/commands/writer/validate.js +370 -0
- package/dist/commands/writer/validate.js.map +1 -0
- package/dist/hooks/claude-folder-protection.d.ts +23 -0
- package/dist/hooks/claude-folder-protection.d.ts.map +1 -0
- package/dist/hooks/claude-folder-protection.js +98 -0
- package/dist/hooks/claude-folder-protection.js.map +1 -0
- package/dist/hooks/index.d.ts +24 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +24 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/post-write-validate.d.ts +14 -0
- package/dist/hooks/post-write-validate.d.ts.map +1 -0
- package/dist/hooks/post-write-validate.js +142 -0
- package/dist/hooks/post-write-validate.js.map +1 -0
- package/dist/hooks/pre-commit-skill-reminder.d.ts +21 -0
- package/dist/hooks/pre-commit-skill-reminder.d.ts.map +1 -0
- package/dist/hooks/pre-commit-skill-reminder.js +142 -0
- package/dist/hooks/pre-commit-skill-reminder.js.map +1 -0
- package/dist/hooks/pre-write-quality.d.ts +14 -0
- package/dist/hooks/pre-write-quality.d.ts.map +1 -0
- package/dist/hooks/pre-write-quality.js +114 -0
- package/dist/hooks/pre-write-quality.js.map +1 -0
- package/dist/hooks/skill-reminder.d.ts +22 -0
- package/dist/hooks/skill-reminder.d.ts.map +1 -0
- package/dist/hooks/skill-reminder.js +285 -0
- package/dist/hooks/skill-reminder.js.map +1 -0
- package/dist/hooks/stop-quality-check.d.ts +14 -0
- package/dist/hooks/stop-quality-check.d.ts.map +1 -0
- package/dist/hooks/stop-quality-check.js +122 -0
- package/dist/hooks/stop-quality-check.js.map +1 -0
- package/dist/hooks/subagent-context-loader.d.ts +12 -0
- package/dist/hooks/subagent-context-loader.d.ts.map +1 -0
- package/dist/hooks/subagent-context-loader.js +124 -0
- package/dist/hooks/subagent-context-loader.js.map +1 -0
- package/dist/hooks/types.d.ts +89 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks/types.js +57 -0
- package/dist/hooks/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +256 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/affected-modules.d.ts +104 -0
- package/dist/lib/affected-modules.d.ts.map +1 -0
- package/dist/lib/affected-modules.js +283 -0
- package/dist/lib/affected-modules.js.map +1 -0
- package/dist/lib/agent-generator.d.ts +137 -0
- package/dist/lib/agent-generator.d.ts.map +1 -0
- package/dist/lib/agent-generator.js +274 -0
- package/dist/lib/agent-generator.js.map +1 -0
- package/dist/lib/backlog/__mocks__/prompt-utils.d.ts +5 -0
- package/dist/lib/backlog/__mocks__/prompt-utils.d.ts.map +1 -0
- package/dist/lib/backlog/__mocks__/prompt-utils.js +5 -0
- package/dist/lib/backlog/__mocks__/prompt-utils.js.map +1 -0
- package/dist/lib/backlog/content-parser.d.ts +83 -0
- package/dist/lib/backlog/content-parser.d.ts.map +1 -0
- package/dist/lib/backlog/content-parser.js +284 -0
- package/dist/lib/backlog/content-parser.js.map +1 -0
- package/dist/lib/backlog/csv-extractor.d.ts +87 -0
- package/dist/lib/backlog/csv-extractor.d.ts.map +1 -0
- package/dist/lib/backlog/csv-extractor.js +338 -0
- package/dist/lib/backlog/csv-extractor.js.map +1 -0
- package/dist/lib/backlog/epic-handler.d.ts +55 -0
- package/dist/lib/backlog/epic-handler.d.ts.map +1 -0
- package/dist/lib/backlog/epic-handler.js +222 -0
- package/dist/lib/backlog/epic-handler.js.map +1 -0
- package/dist/lib/backlog/field-updater.d.ts +195 -0
- package/dist/lib/backlog/field-updater.d.ts.map +1 -0
- package/dist/lib/backlog/field-updater.js +287 -0
- package/dist/lib/backlog/field-updater.js.map +1 -0
- package/dist/lib/backlog/import-engine.d.ts +110 -0
- package/dist/lib/backlog/import-engine.d.ts.map +1 -0
- package/dist/lib/backlog/import-engine.js +241 -0
- package/dist/lib/backlog/import-engine.js.map +1 -0
- package/dist/lib/backlog/import-strategies.d.ts +110 -0
- package/dist/lib/backlog/import-strategies.d.ts.map +1 -0
- package/dist/lib/backlog/import-strategies.js +398 -0
- package/dist/lib/backlog/import-strategies.js.map +1 -0
- package/dist/lib/backlog/jira-file-generators.d.ts +154 -0
- package/dist/lib/backlog/jira-file-generators.d.ts.map +1 -0
- package/dist/lib/backlog/jira-file-generators.js +265 -0
- package/dist/lib/backlog/jira-file-generators.js.map +1 -0
- package/dist/lib/backlog/jira-import-workflows.d.ts +112 -0
- package/dist/lib/backlog/jira-import-workflows.d.ts.map +1 -0
- package/dist/lib/backlog/jira-import-workflows.js +339 -0
- package/dist/lib/backlog/jira-import-workflows.js.map +1 -0
- package/dist/lib/backlog/jira-lookup.d.ts +121 -0
- package/dist/lib/backlog/jira-lookup.d.ts.map +1 -0
- package/dist/lib/backlog/jira-lookup.js +232 -0
- package/dist/lib/backlog/jira-lookup.js.map +1 -0
- package/dist/lib/backlog/jira-prompts.d.ts +66 -0
- package/dist/lib/backlog/jira-prompts.d.ts.map +1 -0
- package/dist/lib/backlog/jira-prompts.js +232 -0
- package/dist/lib/backlog/jira-prompts.js.map +1 -0
- package/dist/lib/backlog/jira-validators.d.ts +123 -0
- package/dist/lib/backlog/jira-validators.d.ts.map +1 -0
- package/dist/lib/backlog/jira-validators.js +394 -0
- package/dist/lib/backlog/jira-validators.js.map +1 -0
- package/dist/lib/backlog/milestone-generator.d.ts +172 -0
- package/dist/lib/backlog/milestone-generator.d.ts.map +1 -0
- package/dist/lib/backlog/milestone-generator.js +378 -0
- package/dist/lib/backlog/milestone-generator.js.map +1 -0
- package/dist/lib/backlog/milestone-migrator.d.ts +174 -0
- package/dist/lib/backlog/milestone-migrator.d.ts.map +1 -0
- package/dist/lib/backlog/milestone-migrator.js +401 -0
- package/dist/lib/backlog/milestone-migrator.js.map +1 -0
- package/dist/lib/backlog/milestone-sanitizer.d.ts +72 -0
- package/dist/lib/backlog/milestone-sanitizer.d.ts.map +1 -0
- package/dist/lib/backlog/milestone-sanitizer.js +139 -0
- package/dist/lib/backlog/milestone-sanitizer.js.map +1 -0
- package/dist/lib/backlog/prompt-utils.d.ts +9 -0
- package/dist/lib/backlog/prompt-utils.d.ts.map +1 -0
- package/dist/lib/backlog/prompt-utils.js +11 -0
- package/dist/lib/backlog/prompt-utils.js.map +1 -0
- package/dist/lib/backlog/sprint-creator.d.ts +145 -0
- package/dist/lib/backlog/sprint-creator.d.ts.map +1 -0
- package/dist/lib/backlog/sprint-creator.js +295 -0
- package/dist/lib/backlog/sprint-creator.js.map +1 -0
- package/dist/lib/backlog/ticket-generator.d.ts +79 -0
- package/dist/lib/backlog/ticket-generator.d.ts.map +1 -0
- package/dist/lib/backlog/ticket-generator.js +281 -0
- package/dist/lib/backlog/ticket-generator.js.map +1 -0
- package/dist/lib/backlog/ticket-processor.d.ts +205 -0
- package/dist/lib/backlog/ticket-processor.d.ts.map +1 -0
- package/dist/lib/backlog/ticket-processor.js +422 -0
- package/dist/lib/backlog/ticket-processor.js.map +1 -0
- package/dist/lib/backlog/types.d.ts +37 -0
- package/dist/lib/backlog/types.d.ts.map +1 -0
- package/dist/lib/backlog/types.js +7 -0
- package/dist/lib/backlog/types.js.map +1 -0
- package/dist/lib/backlog/validator.d.ts +61 -0
- package/dist/lib/backlog/validator.d.ts.map +1 -0
- package/dist/lib/backlog/validator.js +285 -0
- package/dist/lib/backlog/validator.js.map +1 -0
- package/dist/lib/boundary-validator.d.ts +88 -0
- package/dist/lib/boundary-validator.d.ts.map +1 -0
- package/dist/lib/boundary-validator.js +494 -0
- package/dist/lib/boundary-validator.js.map +1 -0
- package/dist/lib/build/build-engine.d.ts +142 -0
- package/dist/lib/build/build-engine.d.ts.map +1 -0
- package/dist/lib/build/build-engine.js +487 -0
- package/dist/lib/build/build-engine.js.map +1 -0
- package/dist/lib/build/index.d.ts +7 -0
- package/dist/lib/build/index.d.ts.map +1 -0
- package/dist/lib/build/index.js +7 -0
- package/dist/lib/build/index.js.map +1 -0
- package/dist/lib/cleanup-engine.d.ts +121 -0
- package/dist/lib/cleanup-engine.d.ts.map +1 -0
- package/dist/lib/cleanup-engine.js +252 -0
- package/dist/lib/cleanup-engine.js.map +1 -0
- package/dist/lib/cli-context.d.ts +283 -0
- package/dist/lib/cli-context.d.ts.map +1 -0
- package/dist/lib/cli-context.js +403 -0
- package/dist/lib/cli-context.js.map +1 -0
- package/dist/lib/cli-version.d.ts +7 -0
- package/dist/lib/cli-version.d.ts.map +1 -0
- package/dist/lib/cli-version.js +30 -0
- package/dist/lib/cli-version.js.map +1 -0
- package/dist/lib/command-factory.d.ts +76 -0
- package/dist/lib/command-factory.d.ts.map +1 -0
- package/dist/lib/command-factory.js +166 -0
- package/dist/lib/command-factory.js.map +1 -0
- package/dist/lib/common/api-client.d.ts +92 -0
- package/dist/lib/common/api-client.d.ts.map +1 -0
- package/dist/lib/common/api-client.js +206 -0
- package/dist/lib/common/api-client.js.map +1 -0
- package/dist/lib/common/file-utils.d.ts +92 -0
- package/dist/lib/common/file-utils.d.ts.map +1 -0
- package/dist/lib/common/file-utils.js +143 -0
- package/dist/lib/common/file-utils.js.map +1 -0
- package/dist/lib/common/validation.d.ts +91 -0
- package/dist/lib/common/validation.d.ts.map +1 -0
- package/dist/lib/common/validation.js +213 -0
- package/dist/lib/common/validation.js.map +1 -0
- package/dist/lib/common/yaml-frontmatter.d.ts +76 -0
- package/dist/lib/common/yaml-frontmatter.d.ts.map +1 -0
- package/dist/lib/common/yaml-frontmatter.js +89 -0
- package/dist/lib/common/yaml-frontmatter.js.map +1 -0
- package/dist/lib/confluence/adf-converter.d.ts +30 -0
- package/dist/lib/confluence/adf-converter.d.ts.map +1 -0
- package/dist/lib/confluence/adf-converter.js +649 -0
- package/dist/lib/confluence/adf-converter.js.map +1 -0
- package/dist/lib/confluence/confluence-client.d.ts +121 -0
- package/dist/lib/confluence/confluence-client.d.ts.map +1 -0
- package/dist/lib/confluence/confluence-client.js +249 -0
- package/dist/lib/confluence/confluence-client.js.map +1 -0
- package/dist/lib/confluence/confluence-commands.d.ts +58 -0
- package/dist/lib/confluence/confluence-commands.d.ts.map +1 -0
- package/dist/lib/confluence/confluence-commands.js +231 -0
- package/dist/lib/confluence/confluence-commands.js.map +1 -0
- package/dist/lib/discovery-engine.d.ts +159 -0
- package/dist/lib/discovery-engine.d.ts.map +1 -0
- package/dist/lib/discovery-engine.js +538 -0
- package/dist/lib/discovery-engine.js.map +1 -0
- package/dist/lib/framework-validator.d.ts +81 -0
- package/dist/lib/framework-validator.d.ts.map +1 -0
- package/dist/lib/framework-validator.js +546 -0
- package/dist/lib/framework-validator.js.map +1 -0
- package/dist/lib/global-skills-manager.d.ts +90 -0
- package/dist/lib/global-skills-manager.d.ts.map +1 -0
- package/dist/lib/global-skills-manager.js +180 -0
- package/dist/lib/global-skills-manager.js.map +1 -0
- package/dist/lib/jira/acceptance-criteria.d.ts +76 -0
- package/dist/lib/jira/acceptance-criteria.d.ts.map +1 -0
- package/dist/lib/jira/acceptance-criteria.js +163 -0
- package/dist/lib/jira/acceptance-criteria.js.map +1 -0
- package/dist/lib/jira/export-engine.d.ts +132 -0
- package/dist/lib/jira/export-engine.d.ts.map +1 -0
- package/dist/lib/jira/export-engine.js +332 -0
- package/dist/lib/jira/export-engine.js.map +1 -0
- package/dist/lib/jira/field-mapper.d.ts +101 -0
- package/dist/lib/jira/field-mapper.d.ts.map +1 -0
- package/dist/lib/jira/field-mapper.js +346 -0
- package/dist/lib/jira/field-mapper.js.map +1 -0
- package/dist/lib/jira/jira-client.d.ts +117 -0
- package/dist/lib/jira/jira-client.d.ts.map +1 -0
- package/dist/lib/jira/jira-client.js +255 -0
- package/dist/lib/jira/jira-client.js.map +1 -0
- package/dist/lib/jira/sync-engine.d.ts +154 -0
- package/dist/lib/jira/sync-engine.d.ts.map +1 -0
- package/dist/lib/jira/sync-engine.js +420 -0
- package/dist/lib/jira/sync-engine.js.map +1 -0
- package/dist/lib/jira/wiki-converter.d.ts +133 -0
- package/dist/lib/jira/wiki-converter.d.ts.map +1 -0
- package/dist/lib/jira/wiki-converter.js +245 -0
- package/dist/lib/jira/wiki-converter.js.map +1 -0
- package/dist/lib/link-transformer.d.ts +176 -0
- package/dist/lib/link-transformer.d.ts.map +1 -0
- package/dist/lib/link-transformer.js +349 -0
- package/dist/lib/link-transformer.js.map +1 -0
- package/dist/lib/link-validator.d.ts +232 -0
- package/dist/lib/link-validator.d.ts.map +1 -0
- package/dist/lib/link-validator.js +504 -0
- package/dist/lib/link-validator.js.map +1 -0
- package/dist/lib/manifest-manager.d.ts +112 -0
- package/dist/lib/manifest-manager.d.ts.map +1 -0
- package/dist/lib/manifest-manager.js +153 -0
- package/dist/lib/manifest-manager.js.map +1 -0
- package/dist/lib/mcp/extractors/framework-project.d.ts +29 -0
- package/dist/lib/mcp/extractors/framework-project.d.ts.map +1 -0
- package/dist/lib/mcp/extractors/framework-project.js +402 -0
- package/dist/lib/mcp/extractors/framework-project.js.map +1 -0
- package/dist/lib/mcp/extractors/generic-project.d.ts +25 -0
- package/dist/lib/mcp/extractors/generic-project.d.ts.map +1 -0
- package/dist/lib/mcp/extractors/generic-project.js +344 -0
- package/dist/lib/mcp/extractors/generic-project.js.map +1 -0
- package/dist/lib/mcp/extractors/index.d.ts +48 -0
- package/dist/lib/mcp/extractors/index.d.ts.map +1 -0
- package/dist/lib/mcp/extractors/index.js +28 -0
- package/dist/lib/mcp/extractors/index.js.map +1 -0
- package/dist/lib/mcp/index.d.ts +11 -0
- package/dist/lib/mcp/index.d.ts.map +1 -0
- package/dist/lib/mcp/index.js +11 -0
- package/dist/lib/mcp/index.js.map +1 -0
- package/dist/lib/mcp/install-instructions.d.ts +39 -0
- package/dist/lib/mcp/install-instructions.d.ts.map +1 -0
- package/dist/lib/mcp/install-instructions.js +317 -0
- package/dist/lib/mcp/install-instructions.js.map +1 -0
- package/dist/lib/mcp/prerequisite-checker.d.ts +79 -0
- package/dist/lib/mcp/prerequisite-checker.d.ts.map +1 -0
- package/dist/lib/mcp/prerequisite-checker.js +213 -0
- package/dist/lib/mcp/prerequisite-checker.js.map +1 -0
- package/dist/lib/module-loader.d.ts +77 -0
- package/dist/lib/module-loader.d.ts.map +1 -0
- package/dist/lib/module-loader.js +135 -0
- package/dist/lib/module-loader.js.map +1 -0
- package/dist/lib/path-resolver.d.ts +160 -0
- package/dist/lib/path-resolver.d.ts.map +1 -0
- package/dist/lib/path-resolver.js +205 -0
- package/dist/lib/path-resolver.js.map +1 -0
- package/dist/lib/planning/plan-creator.d.ts +132 -0
- package/dist/lib/planning/plan-creator.d.ts.map +1 -0
- package/dist/lib/planning/plan-creator.js +361 -0
- package/dist/lib/planning/plan-creator.js.map +1 -0
- package/dist/lib/project-resolver.d.ts +124 -0
- package/dist/lib/project-resolver.d.ts.map +1 -0
- package/dist/lib/project-resolver.js +362 -0
- package/dist/lib/project-resolver.js.map +1 -0
- package/dist/lib/registry-generator.d.ts +11 -0
- package/dist/lib/registry-generator.d.ts.map +1 -0
- package/dist/lib/registry-generator.js +288 -0
- package/dist/lib/registry-generator.js.map +1 -0
- package/dist/lib/routes-validator.d.ts +50 -0
- package/dist/lib/routes-validator.d.ts.map +1 -0
- package/dist/lib/routes-validator.js +260 -0
- package/dist/lib/routes-validator.js.map +1 -0
- package/dist/lib/schemas/agent.schema.d.ts +175 -0
- package/dist/lib/schemas/agent.schema.d.ts.map +1 -0
- package/dist/lib/schemas/agent.schema.js +86 -0
- package/dist/lib/schemas/agent.schema.js.map +1 -0
- package/dist/lib/schemas/index.d.ts +13 -0
- package/dist/lib/schemas/index.d.ts.map +1 -0
- package/dist/lib/schemas/index.js +13 -0
- package/dist/lib/schemas/index.js.map +1 -0
- package/dist/lib/schemas/skill.schema.d.ts +92 -0
- package/dist/lib/schemas/skill.schema.d.ts.map +1 -0
- package/dist/lib/schemas/skill.schema.js +98 -0
- package/dist/lib/schemas/skill.schema.js.map +1 -0
- package/dist/lib/sdk/executor.d.ts +37 -0
- package/dist/lib/sdk/executor.d.ts.map +1 -0
- package/dist/lib/sdk/executor.js +137 -0
- package/dist/lib/sdk/executor.js.map +1 -0
- package/dist/lib/sdk/generator.d.ts +79 -0
- package/dist/lib/sdk/generator.d.ts.map +1 -0
- package/dist/lib/sdk/generator.js +316 -0
- package/dist/lib/sdk/generator.js.map +1 -0
- package/dist/lib/sdk/index.d.ts +12 -0
- package/dist/lib/sdk/index.d.ts.map +1 -0
- package/dist/lib/sdk/index.js +15 -0
- package/dist/lib/sdk/index.js.map +1 -0
- package/dist/lib/sdk/message-handler.d.ts +40 -0
- package/dist/lib/sdk/message-handler.d.ts.map +1 -0
- package/dist/lib/sdk/message-handler.js +215 -0
- package/dist/lib/sdk/message-handler.js.map +1 -0
- package/dist/lib/sdk/sub-agents.d.ts +51 -0
- package/dist/lib/sdk/sub-agents.d.ts.map +1 -0
- package/dist/lib/sdk/sub-agents.js +234 -0
- package/dist/lib/sdk/sub-agents.js.map +1 -0
- package/dist/lib/sdk/types.d.ts +169 -0
- package/dist/lib/sdk/types.d.ts.map +1 -0
- package/dist/lib/sdk/types.js +7 -0
- package/dist/lib/sdk/types.js.map +1 -0
- package/dist/lib/skill-cli-parser.d.ts +79 -0
- package/dist/lib/skill-cli-parser.d.ts.map +1 -0
- package/dist/lib/skill-cli-parser.js +172 -0
- package/dist/lib/skill-cli-parser.js.map +1 -0
- package/dist/lib/skill-template-engine.d.ts +116 -0
- package/dist/lib/skill-template-engine.d.ts.map +1 -0
- package/dist/lib/skill-template-engine.js +220 -0
- package/dist/lib/skill-template-engine.js.map +1 -0
- package/dist/lib/sync-engine.d.ts +344 -0
- package/dist/lib/sync-engine.d.ts.map +1 -0
- package/dist/lib/sync-engine.js +1255 -0
- package/dist/lib/sync-engine.js.map +1 -0
- package/dist/lib/telemetry/config.d.ts +22 -0
- package/dist/lib/telemetry/config.d.ts.map +1 -0
- package/dist/lib/telemetry/config.js +210 -0
- package/dist/lib/telemetry/config.js.map +1 -0
- package/dist/lib/telemetry/exporters/console-exporter.d.ts +72 -0
- package/dist/lib/telemetry/exporters/console-exporter.d.ts.map +1 -0
- package/dist/lib/telemetry/exporters/console-exporter.js +228 -0
- package/dist/lib/telemetry/exporters/console-exporter.js.map +1 -0
- package/dist/lib/telemetry/exporters/json-file-exporter.d.ts +48 -0
- package/dist/lib/telemetry/exporters/json-file-exporter.d.ts.map +1 -0
- package/dist/lib/telemetry/exporters/json-file-exporter.js +202 -0
- package/dist/lib/telemetry/exporters/json-file-exporter.js.map +1 -0
- package/dist/lib/telemetry/exporters/otel-exporter.d.ts +48 -0
- package/dist/lib/telemetry/exporters/otel-exporter.d.ts.map +1 -0
- package/dist/lib/telemetry/exporters/otel-exporter.js +299 -0
- package/dist/lib/telemetry/exporters/otel-exporter.js.map +1 -0
- package/dist/lib/telemetry/exporters/session-file-exporter.d.ts +66 -0
- package/dist/lib/telemetry/exporters/session-file-exporter.d.ts.map +1 -0
- package/dist/lib/telemetry/exporters/session-file-exporter.js +223 -0
- package/dist/lib/telemetry/exporters/session-file-exporter.js.map +1 -0
- package/dist/lib/telemetry/index.d.ts +44 -0
- package/dist/lib/telemetry/index.d.ts.map +1 -0
- package/dist/lib/telemetry/index.js +69 -0
- package/dist/lib/telemetry/index.js.map +1 -0
- package/dist/lib/telemetry/instrumentation/cli-instrumentation.d.ts +25 -0
- package/dist/lib/telemetry/instrumentation/cli-instrumentation.d.ts.map +1 -0
- package/dist/lib/telemetry/instrumentation/cli-instrumentation.js +83 -0
- package/dist/lib/telemetry/instrumentation/cli-instrumentation.js.map +1 -0
- package/dist/lib/telemetry/instrumentation/discovery-instrumentation.d.ts +21 -0
- package/dist/lib/telemetry/instrumentation/discovery-instrumentation.d.ts.map +1 -0
- package/dist/lib/telemetry/instrumentation/discovery-instrumentation.js +78 -0
- package/dist/lib/telemetry/instrumentation/discovery-instrumentation.js.map +1 -0
- package/dist/lib/telemetry/instrumentation/mcp-instrumentation.d.ts +76 -0
- package/dist/lib/telemetry/instrumentation/mcp-instrumentation.d.ts.map +1 -0
- package/dist/lib/telemetry/instrumentation/mcp-instrumentation.js +168 -0
- package/dist/lib/telemetry/instrumentation/mcp-instrumentation.js.map +1 -0
- package/dist/lib/telemetry/instrumentation/sync-instrumentation.d.ts +25 -0
- package/dist/lib/telemetry/instrumentation/sync-instrumentation.d.ts.map +1 -0
- package/dist/lib/telemetry/instrumentation/sync-instrumentation.js +51 -0
- package/dist/lib/telemetry/instrumentation/sync-instrumentation.js.map +1 -0
- package/dist/lib/telemetry/session-context.d.ts +109 -0
- package/dist/lib/telemetry/session-context.d.ts.map +1 -0
- package/dist/lib/telemetry/session-context.js +170 -0
- package/dist/lib/telemetry/session-context.js.map +1 -0
- package/dist/lib/telemetry/telemetry-manager.d.ts +88 -0
- package/dist/lib/telemetry/telemetry-manager.d.ts.map +1 -0
- package/dist/lib/telemetry/telemetry-manager.js +347 -0
- package/dist/lib/telemetry/telemetry-manager.js.map +1 -0
- package/dist/lib/telemetry/types.d.ts +302 -0
- package/dist/lib/telemetry/types.d.ts.map +1 -0
- package/dist/lib/telemetry/types.js +6 -0
- package/dist/lib/telemetry/types.js.map +1 -0
- package/dist/lib/template-engine.d.ts +5 -0
- package/dist/lib/template-engine.d.ts.map +1 -0
- package/dist/lib/template-engine.js +294 -0
- package/dist/lib/template-engine.js.map +1 -0
- package/dist/lib/unified-template-engine/computed-variables.d.ts +38 -0
- package/dist/lib/unified-template-engine/computed-variables.d.ts.map +1 -0
- package/dist/lib/unified-template-engine/computed-variables.js +85 -0
- package/dist/lib/unified-template-engine/computed-variables.js.map +1 -0
- package/dist/lib/unified-template-engine/index.d.ts +67 -0
- package/dist/lib/unified-template-engine/index.d.ts.map +1 -0
- package/dist/lib/unified-template-engine/index.js +200 -0
- package/dist/lib/unified-template-engine/index.js.map +1 -0
- package/dist/lib/unified-template-engine/resolver.d.ts +63 -0
- package/dist/lib/unified-template-engine/resolver.d.ts.map +1 -0
- package/dist/lib/unified-template-engine/resolver.js +312 -0
- package/dist/lib/unified-template-engine/resolver.js.map +1 -0
- package/dist/lib/unified-template-engine/types.d.ts +177 -0
- package/dist/lib/unified-template-engine/types.d.ts.map +1 -0
- package/dist/lib/unified-template-engine/types.js +7 -0
- package/dist/lib/unified-template-engine/types.js.map +1 -0
- package/dist/lib/unified-template-engine/validator.d.ts +23 -0
- package/dist/lib/unified-template-engine/validator.d.ts.map +1 -0
- package/dist/lib/unified-template-engine/validator.js +217 -0
- package/dist/lib/unified-template-engine/validator.js.map +1 -0
- package/dist/lib/validation/rules/plan-rules.d.ts +48 -0
- package/dist/lib/validation/rules/plan-rules.d.ts.map +1 -0
- package/dist/lib/validation/rules/plan-rules.js +152 -0
- package/dist/lib/validation/rules/plan-rules.js.map +1 -0
- package/dist/lib/validation/rules/ticket-rules.d.ts +54 -0
- package/dist/lib/validation/rules/ticket-rules.d.ts.map +1 -0
- package/dist/lib/validation/rules/ticket-rules.js +136 -0
- package/dist/lib/validation/rules/ticket-rules.js.map +1 -0
- package/dist/lib/validation/schema-validator.d.ts +26 -0
- package/dist/lib/validation/schema-validator.d.ts.map +1 -0
- package/dist/lib/validation/schema-validator.js +183 -0
- package/dist/lib/validation/schema-validator.js.map +1 -0
- package/dist/lib/validation/validation-report.d.ts +68 -0
- package/dist/lib/validation/validation-report.d.ts.map +1 -0
- package/dist/lib/validation/validation-report.js +141 -0
- package/dist/lib/validation/validation-report.js.map +1 -0
- package/dist/lib/version-validator.d.ts +89 -0
- package/dist/lib/version-validator.d.ts.map +1 -0
- package/dist/lib/version-validator.js +178 -0
- package/dist/lib/version-validator.js.map +1 -0
- package/dist/lib/wizard/detection.d.ts +48 -0
- package/dist/lib/wizard/detection.d.ts.map +1 -0
- package/dist/lib/wizard/detection.js +116 -0
- package/dist/lib/wizard/detection.js.map +1 -0
- package/dist/lib/wizard/file-handlers.d.ts +40 -0
- package/dist/lib/wizard/file-handlers.d.ts.map +1 -0
- package/dist/lib/wizard/file-handlers.js +204 -0
- package/dist/lib/wizard/file-handlers.js.map +1 -0
- package/dist/lib/wizard/index.d.ts +9 -0
- package/dist/lib/wizard/index.d.ts.map +1 -0
- package/dist/lib/wizard/index.js +9 -0
- package/dist/lib/wizard/index.js.map +1 -0
- package/dist/lib/wizard/init-wizard.d.ts +35 -0
- package/dist/lib/wizard/init-wizard.d.ts.map +1 -0
- package/dist/lib/wizard/init-wizard.js +86 -0
- package/dist/lib/wizard/init-wizard.js.map +1 -0
- package/dist/lib/wizard/module-groups.d.ts +55 -0
- package/dist/lib/wizard/module-groups.d.ts.map +1 -0
- package/dist/lib/wizard/module-groups.js +128 -0
- package/dist/lib/wizard/module-groups.js.map +1 -0
- package/dist/lib/wizard/prompts.d.ts +36 -0
- package/dist/lib/wizard/prompts.d.ts.map +1 -0
- package/dist/lib/wizard/prompts.js +253 -0
- package/dist/lib/wizard/prompts.js.map +1 -0
- package/dist/lib/wizard/summary.d.ts +45 -0
- package/dist/lib/wizard/summary.d.ts.map +1 -0
- package/dist/lib/wizard/summary.js +162 -0
- package/dist/lib/wizard/summary.js.map +1 -0
- package/dist/mcp/index.d.ts +15 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +75 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/result-formatter.d.ts +68 -0
- package/dist/mcp/result-formatter.d.ts.map +1 -0
- package/dist/mcp/result-formatter.js +191 -0
- package/dist/mcp/result-formatter.js.map +1 -0
- package/dist/mcp/tool-registry.d.ts +70 -0
- package/dist/mcp/tool-registry.d.ts.map +1 -0
- package/dist/mcp/tool-registry.js +183 -0
- package/dist/mcp/tool-registry.js.map +1 -0
- package/dist/mcp/tools/agent.d.ts +22 -0
- package/dist/mcp/tools/agent.d.ts.map +1 -0
- package/dist/mcp/tools/agent.js +267 -0
- package/dist/mcp/tools/agent.js.map +1 -0
- package/dist/mcp/tools/backlog.d.ts +15 -0
- package/dist/mcp/tools/backlog.d.ts.map +1 -0
- package/dist/mcp/tools/backlog.js +355 -0
- package/dist/mcp/tools/backlog.js.map +1 -0
- package/dist/mcp/tools/confluence.d.ts +32 -0
- package/dist/mcp/tools/confluence.d.ts.map +1 -0
- package/dist/mcp/tools/confluence.js +367 -0
- package/dist/mcp/tools/confluence.js.map +1 -0
- package/dist/mcp/tools/create.d.ts +22 -0
- package/dist/mcp/tools/create.d.ts.map +1 -0
- package/dist/mcp/tools/create.js +311 -0
- package/dist/mcp/tools/create.js.map +1 -0
- package/dist/mcp/tools/framework.d.ts +24 -0
- package/dist/mcp/tools/framework.d.ts.map +1 -0
- package/dist/mcp/tools/framework.js +430 -0
- package/dist/mcp/tools/framework.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +32 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +58 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/jira.d.ts +12 -0
- package/dist/mcp/tools/jira.d.ts.map +1 -0
- package/dist/mcp/tools/jira.js +206 -0
- package/dist/mcp/tools/jira.js.map +1 -0
- package/dist/mcp/tools/planning.d.ts +22 -0
- package/dist/mcp/tools/planning.d.ts.map +1 -0
- package/dist/mcp/tools/planning.js +264 -0
- package/dist/mcp/tools/planning.js.map +1 -0
- package/dist/mcp/tools/skill.d.ts +42 -0
- package/dist/mcp/tools/skill.d.ts.map +1 -0
- package/dist/mcp/tools/skill.js +561 -0
- package/dist/mcp/tools/skill.js.map +1 -0
- package/dist/mcp/tools/template.d.ts +36 -0
- package/dist/mcp/tools/template.d.ts.map +1 -0
- package/dist/mcp/tools/template.js +354 -0
- package/dist/mcp/tools/template.js.map +1 -0
- package/dist/mcp/tools/writer.d.ts +23 -0
- package/dist/mcp/tools/writer.d.ts.map +1 -0
- package/dist/mcp/tools/writer.js +394 -0
- package/dist/mcp/tools/writer.js.map +1 -0
- package/dist/mcp/types.d.ts +102 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/mcp/types.js +37 -0
- package/dist/mcp/types.js.map +1 -0
- package/dist/templates/index.d.ts +11 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +11 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/mcp-hooks.d.ts +37 -0
- package/dist/templates/mcp-hooks.d.ts.map +1 -0
- package/dist/templates/mcp-hooks.js +224 -0
- package/dist/templates/mcp-hooks.js.map +1 -0
- package/dist/templates/serena-project.d.ts +14 -0
- package/dist/templates/serena-project.d.ts.map +1 -0
- package/dist/templates/serena-project.js +105 -0
- package/dist/templates/serena-project.js.map +1 -0
- package/dist/templates/settings-json.d.ts +28 -0
- package/dist/templates/settings-json.d.ts.map +1 -0
- package/dist/templates/settings-json.js +190 -0
- package/dist/templates/settings-json.js.map +1 -0
- package/dist/templates/settings-local.d.ts +69 -0
- package/dist/templates/settings-local.d.ts.map +1 -0
- package/dist/templates/settings-local.js +56 -0
- package/dist/templates/settings-local.js.map +1 -0
- package/dist/templates/statusline.d.ts +7 -0
- package/dist/templates/statusline.d.ts.map +1 -0
- package/dist/templates/statusline.js +260 -0
- package/dist/templates/statusline.js.map +1 -0
- package/dist/types/command-options.d.ts +392 -0
- package/dist/types/command-options.d.ts.map +1 -0
- package/dist/types/command-options.js +15 -0
- package/dist/types/command-options.js.map +1 -0
- package/framework/modules/backlog/agents/ai-backlog-manager.md +430 -0
- package/framework/modules/backlog/commands/cmd-backlog-create-ticket.md +42 -0
- package/framework/modules/backlog/commands/cmd-backlog-import.md +42 -0
- package/framework/modules/backlog/commands/cmd-backlog-migrate-milestones.md +42 -0
- package/framework/modules/backlog/commands/cmd-backlog-update-fields.md +42 -0
- package/framework/modules/backlog/commands/cmd-backlog-validate.md +42 -0
- package/framework/modules/backlog/module.json +82 -0
- package/framework/modules/backlog/schemas/ticket.schema.json +143 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/BODY-STRUCTURE.md +470 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/EXAMPLES.md +561 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/SKILL.md +293 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/VALIDATION-RULES.md +748 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/YAML-STRUCTURE.md +439 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/templates/bug.template.md +83 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/templates/epic.template.md +96 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/templates/story.template.md +68 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/templates/task.template.md +66 -0
- package/framework/modules/backlog/skills/backlog/building-tickets/templates/template.config.json +50 -0
- package/framework/modules/backlog/skills/backlog/organizing-backlog/DIRECTORY-STRUCTURE.md +195 -0
- package/framework/modules/backlog/skills/backlog/organizing-backlog/EXAMPLES.md +374 -0
- package/framework/modules/backlog/skills/backlog/organizing-backlog/JIRA-SOURCE-OF-TRUTH.md +384 -0
- package/framework/modules/backlog/skills/backlog/organizing-backlog/NAMING-CONVENTIONS.md +230 -0
- package/framework/modules/backlog/skills/backlog/organizing-backlog/SKILL.md +332 -0
- package/framework/modules/backlog/skills/backlog/organizing-backlog/WORKFLOW-PIPELINE.md +298 -0
- package/framework/modules/backlog/templates/ticket.md.template +111 -0
- package/framework/modules/coding/agents/ai-app-developer.md +275 -0
- package/framework/modules/coding/agents/ai-architect.md +454 -0
- package/framework/modules/coding/agents/ai-hig-reviewer.md +69 -0
- package/framework/modules/coding/agents/ai-ios-developer.md +303 -0
- package/framework/modules/coding/module.json +56 -0
- package/framework/modules/coding/skills/coding/designing-architecture/SKILL.md +475 -0
- package/framework/modules/coding/skills/coding/designing-ios-ui/SKILL.md +405 -0
- package/framework/modules/coding/skills/coding/implementing-code/EXAMPLES.md +565 -0
- package/framework/modules/coding/skills/coding/implementing-code/SKILL.md +490 -0
- package/framework/modules/coding/skills/coding/implementing-ios/ANTI-PATTERNS.md +564 -0
- package/framework/modules/coding/skills/coding/implementing-ios/ARCHITECTURE-PATTERNS.md +539 -0
- package/framework/modules/coding/skills/coding/implementing-ios/HIG-COMPLIANCE.md +492 -0
- package/framework/modules/coding/skills/coding/implementing-ios/SKILL.md +506 -0
- package/framework/modules/coding/skills/coding/implementing-ios/SWIFTUI-PATTERNS.md +625 -0
- package/framework/modules/coding/skills/coding/implementing-ios/TESTING-PATTERNS.md +625 -0
- package/framework/modules/coding/skills/coding/implementing-ios/UIKIT-PATTERNS.md +470 -0
- package/framework/modules/coding/skills/coding/structuring-code/CHECKLISTS.md +151 -0
- package/framework/modules/coding/skills/coding/structuring-code/DRY-PRINCIPLES.md +285 -0
- package/framework/modules/coding/skills/coding/structuring-code/FILE-ORGANIZATION.md +278 -0
- package/framework/modules/coding/skills/coding/structuring-code/READABILITY.md +291 -0
- package/framework/modules/coding/skills/coding/structuring-code/SKILL.md +289 -0
- package/framework/modules/confluence/agents/ai-confluence-manager.md +369 -0
- package/framework/modules/confluence/commands/cmd-confluence-create-page.md +42 -0
- package/framework/modules/confluence/commands/cmd-confluence-fetch-page.md +42 -0
- package/framework/modules/confluence/commands/cmd-confluence-import-reports.md +42 -0
- package/framework/modules/confluence/commands/cmd-confluence-validate.md +42 -0
- package/framework/modules/confluence/module.json +69 -0
- package/framework/modules/confluence/schemas/adf.schema.json +128 -0
- package/framework/modules/confluence/skills/confluence/converting-adf/SKILL.md +455 -0
- package/framework/modules/confluence/skills/confluence/publishing-confluence/ADF-EXAMPLES.md +433 -0
- package/framework/modules/confluence/skills/confluence/publishing-confluence/EXAMPLES.md +513 -0
- package/framework/modules/confluence/skills/confluence/publishing-confluence/SKILL.md +651 -0
- package/framework/modules/core/agents/ai-framework-developer.md +184 -0
- package/framework/modules/core/agents/ai-framework-manager.md +222 -0
- package/framework/modules/core/agents/ai-scout-backlog.md +65 -0
- package/framework/modules/core/agents/ai-scout-codebase.md +66 -0
- package/framework/modules/core/agents/ai-scout-knowledge.md +63 -0
- package/framework/modules/core/commands/cmd-agent-list.md +37 -0
- package/framework/modules/core/commands/cmd-agent-run.md +37 -0
- package/framework/modules/core/commands/cmd-agent-show.md +37 -0
- package/framework/modules/core/commands/cmd-bump-version.md +42 -0
- package/framework/modules/core/commands/cmd-mcp-check.md +59 -0
- package/framework/modules/core/commands/cmd-mcp-seed.md +69 -0
- package/framework/modules/core/commands/cmd-mcp-setup.md +61 -0
- package/framework/modules/core/commands/cmd-mcp-status.md +70 -0
- package/framework/modules/core/commands/cmd-validate-links.md +42 -0
- package/framework/modules/core/commands/cmd-validate-versions.md +42 -0
- package/framework/modules/core/hooks/_lib/notify-helper.sh +27 -0
- package/framework/modules/core/hooks/block-main-commit.sh +35 -0
- package/framework/modules/core/hooks/notify.sh +43 -0
- package/framework/modules/core/hooks/post-write-format.sh +52 -0
- package/framework/modules/core/hooks/post-write-validate.sh +24 -0
- package/framework/modules/core/hooks/pre-bash-safety.sh +44 -0
- package/framework/modules/core/hooks/pre-commit-skill-reminder.sh +24 -0
- package/framework/modules/core/hooks/pre-write-quality.sh +24 -0
- package/framework/modules/core/hooks/session-compact-context.sh +37 -0
- package/framework/modules/core/hooks/session-end-reminder.sh +36 -0
- package/framework/modules/core/hooks/session-start-context.sh +33 -0
- package/framework/modules/core/hooks/session-start-worktree.sh +30 -0
- package/framework/modules/core/hooks/skill-reminder.sh +24 -0
- package/framework/modules/core/hooks/stop-commit-check.sh +24 -0
- package/framework/modules/core/hooks/stop-pr-suggest.sh +42 -0
- package/framework/modules/core/hooks/stop-quality-check.sh +24 -0
- package/framework/modules/core/hooks/subagent-context-loader.sh +24 -0
- package/framework/modules/core/module.json +205 -0
- package/framework/modules/core/registries/schemas/agents.schema.json +209 -0
- package/framework/modules/core/registries/schemas/command.schema.json +98 -0
- package/framework/modules/core/registries/schemas/custom-agent.schema.json +108 -0
- package/framework/modules/core/registries/schemas/module.schema.json +233 -0
- package/framework/modules/core/registries/schemas/template.schema.json +164 -0
- package/framework/modules/core/registries/skill-triggers.json +196 -0
- package/framework/modules/core/skills/building-agents/AGENT-TEMPLATE.md +289 -0
- package/framework/modules/core/skills/building-agents/CONTENT-ROUTING.md +302 -0
- package/framework/modules/core/skills/building-agents/EXAMPLES.md +448 -0
- package/framework/modules/core/skills/building-agents/SKILL.md +289 -0
- package/framework/modules/core/skills/building-agents/VALIDATION-CHECKLIST.md +304 -0
- package/framework/modules/core/skills/building-context/CONTENT-GUIDELINES.md +471 -0
- package/framework/modules/core/skills/building-context/EXAMPLES.md +1606 -0
- package/framework/modules/core/skills/building-context/LEVEL-DECISION-TREE.md +262 -0
- package/framework/modules/core/skills/building-context/SKILL.md +479 -0
- package/framework/modules/core/skills/building-context/VALIDATION-CHECKLIST.md +358 -0
- package/framework/modules/core/skills/building-framework/AGENT-CREATION-WORKFLOW.md +268 -0
- package/framework/modules/core/skills/building-framework/DECISION-TREES.md +183 -0
- package/framework/modules/core/skills/building-framework/EXAMPLES.md +387 -0
- package/framework/modules/core/skills/building-framework/GOVERNANCE-RULES.md +446 -0
- package/framework/modules/core/skills/building-framework/GOVERNANCE-UPDATE-WORKFLOW.md +172 -0
- package/framework/modules/core/skills/building-framework/REGISTRY-GUIDE.md +551 -0
- package/framework/modules/core/skills/building-framework/SCOPE-DECISION-TREE.md +284 -0
- package/framework/modules/core/skills/building-framework/SKILL.md +210 -0
- package/framework/modules/core/skills/building-skills/ANTI-PATTERNS-CONTENT.md +219 -0
- package/framework/modules/core/skills/building-skills/ANTI-PATTERNS-MCP.md +119 -0
- package/framework/modules/core/skills/building-skills/ANTI-PATTERNS-NAMING.md +129 -0
- package/framework/modules/core/skills/building-skills/ANTI-PATTERNS-STRUCTURE.md +139 -0
- package/framework/modules/core/skills/building-skills/EXAMPLES.md +330 -0
- package/framework/modules/core/skills/building-skills/PATTERNS.md +523 -0
- package/framework/modules/core/skills/building-skills/SKILL-CREATION-WORKFLOW-FRAMEWORK.md +253 -0
- package/framework/modules/core/skills/building-skills/SKILL.md +543 -0
- package/framework/modules/core/skills/committing-code/EXAMPLES.md +567 -0
- package/framework/modules/core/skills/committing-code/SKILL.md +285 -0
- package/framework/modules/core/skills/committing-code/STANDARDS-BRANCHES.md +95 -0
- package/framework/modules/core/skills/committing-code/STANDARDS-COMMITS.md +140 -0
- package/framework/modules/core/skills/committing-code/STANDARDS-FRAMEWORK.md +234 -0
- package/framework/modules/core/skills/committing-code/STANDARDS-TICKETS.md +102 -0
- package/framework/modules/core/skills/gathering-intelligence/SKILL.md +136 -0
- package/framework/modules/core/skills/managing-versions/EXAMPLES.md +277 -0
- package/framework/modules/core/skills/managing-versions/SCRIPTS-REFERENCE.md +295 -0
- package/framework/modules/core/skills/managing-versions/SKILL.md +260 -0
- package/framework/modules/core/skills/managing-versions/STANDARDS.md +231 -0
- package/framework/modules/core/skills/using-context/EXAMPLES.md +257 -0
- package/framework/modules/core/skills/using-context/SKILL.md +238 -0
- package/framework/modules/core/skills/using-context/STANDARDS.md +241 -0
- package/framework/modules/core/skills/using-framework/BEST-PRACTICES.md +421 -0
- package/framework/modules/core/skills/using-framework/DISCOVERY-ENGINE-ARCHITECTURE.md +331 -0
- package/framework/modules/core/skills/using-framework/EXAMPLES.md +535 -0
- package/framework/modules/core/skills/using-framework/ROUTES-REGISTRY-DESIGN.md +455 -0
- package/framework/modules/core/skills/using-framework/SKILL.md +176 -0
- package/framework/modules/core/skills/using-mcp/ANTI-PATTERNS.md +566 -0
- package/framework/modules/core/skills/using-mcp/DECISION-MATRICES.md +385 -0
- package/framework/modules/core/skills/using-mcp/EXAMPLES.md +466 -0
- package/framework/modules/core/skills/using-mcp/FRAMEWORK-MCP-PATTERNS.md +395 -0
- package/framework/modules/core/skills/using-mcp/QUICK-REFERENCE.md +98 -0
- package/framework/modules/core/skills/using-mcp/SKILL.md +624 -0
- package/framework/modules/core/skills/using-mcp/TOOLS-REFERENCE.md +532 -0
- package/framework/modules/core/skills/validating-links/EXAMPLES.md +326 -0
- package/framework/modules/core/skills/validating-links/SKILL.md +307 -0
- package/framework/modules/core/skills/validating-links/STANDARDS.md +353 -0
- package/framework/modules/core/skills/validating-markdown/EXAMPLES.md +516 -0
- package/framework/modules/core/skills/validating-markdown/SKILL.md +503 -0
- package/framework/modules/core/skills/validating-markdown/VALIDATION-RULES.md +360 -0
- package/framework/modules/core/skills/validating-markdown/YAML-SCHEMA.md +424 -0
- package/framework/modules/core/skills/verifying-quality/ANTI-PATTERNS.md +302 -0
- package/framework/modules/core/skills/verifying-quality/CLI-TESTING.md +389 -0
- package/framework/modules/core/skills/verifying-quality/DEFENSIVE-CODING.md +433 -0
- package/framework/modules/core/skills/verifying-quality/EVALUATION-PROTOCOL.md +106 -0
- package/framework/modules/core/skills/verifying-quality/EXAMPLES.md +588 -0
- package/framework/modules/core/skills/verifying-quality/QUALITY-CHECKLIST.md +181 -0
- package/framework/modules/core/skills/verifying-quality/SKILL.md +275 -0
- package/framework/modules/core/templates/agent/agent.template.md +97 -0
- package/framework/modules/core/templates/agent/template.config.json +47 -0
- package/framework/modules/core/templates/config/agentic-framework.json.template +17 -0
- package/framework/modules/core/templates/config/hooks/pre-commit-sync.sh.template +190 -0
- package/framework/modules/core/templates/config/hooks/pre-push.sh.template +330 -0
- package/framework/modules/core/templates/config/settings.local.json.template +39 -0
- package/framework/modules/core/templates/config/statusline.sh.template +253 -0
- package/framework/modules/core/templates/context/business-advanced.template.md +71 -0
- package/framework/modules/core/templates/context/business-basic.template.md +39 -0
- package/framework/modules/core/templates/context/business-expert.template.md +95 -0
- package/framework/modules/core/templates/context/process-advanced.template.md +141 -0
- package/framework/modules/core/templates/context/process-basic.template.md +87 -0
- package/framework/modules/core/templates/context/process-expert.template.md +213 -0
- package/framework/modules/core/templates/context/technical-advanced.template.md +111 -0
- package/framework/modules/core/templates/context/technical-basic.template.md +66 -0
- package/framework/modules/core/templates/context/technical-expert.template.md +157 -0
- package/framework/modules/core/templates/module/module.json.template +20 -0
- package/framework/modules/core/templates/module/template.config.json +41 -0
- package/framework/modules/core/templates/skill/SKILL.md.template +96 -0
- package/framework/modules/core/templates/skill/template.config.json +39 -0
- package/framework/modules/jira/agents/ai-jira-manager.md +320 -0
- package/framework/modules/jira/commands/cmd-jira-export.md +42 -0
- package/framework/modules/jira/commands/cmd-jira-sync.md +42 -0
- package/framework/modules/jira/module.json +55 -0
- package/framework/modules/jira/schemas/jira-sync.config.json +75 -0
- package/framework/modules/jira/skills/jira/integrating-jira/CONFLUENCE-PATTERNS.md +284 -0
- package/framework/modules/jira/skills/jira/integrating-jira/CONVERSION-RULES.md +188 -0
- package/framework/modules/jira/skills/jira/integrating-jira/EXAMPLES.md +406 -0
- package/framework/modules/jira/skills/jira/integrating-jira/JIRA-PATTERNS.md +284 -0
- package/framework/modules/jira/skills/jira/integrating-jira/SKILL.md +412 -0
- package/framework/modules/reporting/agents/ai-report-manager.md +410 -0
- package/framework/modules/reporting/module.json +35 -0
- package/framework/modules/reporting/skills/reporting/building-reports/EXAMPLES.md +613 -0
- package/framework/modules/reporting/skills/reporting/building-reports/SKILL.md +509 -0
- package/framework/modules/writer/BUILD_SYSTEM.md +325 -0
- package/framework/modules/writer/MIGRATION.md +326 -0
- package/framework/modules/writer/agents/ai-book-writer.md +196 -0
- package/framework/modules/writer/agents/ai-prose-writer.md +58 -0
- package/framework/modules/writer/agents/ai-world-builder.md +46 -0
- package/framework/modules/writer/commands/cmd-writer-add-fact.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-analyze.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-build.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-chapter.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-character.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-history-event.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-magic-system.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-nation.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-part.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-region.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-scene.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-create-world-rule.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-export.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-generate-context.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-init-baseline.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-init.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-lock-fact.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-validate-immutability.md +42 -0
- package/framework/modules/writer/commands/cmd-writer-validate.md +42 -0
- package/framework/modules/writer/module.json +181 -0
- package/framework/modules/writer/schemas/baseline.schema.json +60 -0
- package/framework/modules/writer/schemas/manifest.schema.json +155 -0
- package/framework/modules/writer/schemas/prerequisites.schema.json +171 -0
- package/framework/modules/writer/schemas/token-budgets.json +129 -0
- package/framework/modules/writer/schemas/token-budgets.schema.json +92 -0
- package/framework/modules/writer/schemas/world-fact.schema.json +172 -0
- package/framework/modules/writer/schemas/world-lock.schema.json +244 -0
- package/framework/modules/writer/skills/writer/building-worlds/CONSISTENCY-PILLARS.md +412 -0
- package/framework/modules/writer/skills/writer/building-worlds/CULTURE-BUILDING.md +354 -0
- package/framework/modules/writer/skills/writer/building-worlds/GEOGRAPHY-HISTORY.md +293 -0
- package/framework/modules/writer/skills/writer/building-worlds/MAGIC-SYSTEMS.md +311 -0
- package/framework/modules/writer/skills/writer/building-worlds/REVELATION-CHECKLIST.md +282 -0
- package/framework/modules/writer/skills/writer/building-worlds/SKILL.md +313 -0
- package/framework/modules/writer/skills/writer/organizing-books/DOMAINS.md +212 -0
- package/framework/modules/writer/skills/writer/organizing-books/FOLDER-STRUCTURE.md +593 -0
- package/framework/modules/writer/skills/writer/organizing-books/IMMUTABILITY-GUIDE.md +350 -0
- package/framework/modules/writer/skills/writer/organizing-books/METADATA-GUIDE.md +780 -0
- package/framework/modules/writer/skills/writer/organizing-books/SKILL.md +257 -0
- package/framework/modules/writer/skills/writer/organizing-books/SSOT-RULES.md +214 -0
- package/framework/modules/writer/skills/writer/organizing-books/WORLD-STRUCTURE.md +222 -0
- package/framework/modules/writer/skills/writer/organizing-books/templates/chapter.template.md +57 -0
- package/framework/modules/writer/skills/writer/organizing-books/templates/character.template.md +121 -0
- package/framework/modules/writer/skills/writer/organizing-books/templates/part.template.md +67 -0
- package/framework/modules/writer/skills/writer/organizing-books/templates/scene.template.md +62 -0
- package/framework/modules/writer/skills/writer/organizing-books/templates/template.config.json +114 -0
- package/framework/modules/writer/skills/writer/writing-prose/CHARACTER-VOICE.md +654 -0
- package/framework/modules/writer/skills/writer/writing-prose/DESCRIPTION-TECHNIQUES.md +688 -0
- package/framework/modules/writer/skills/writer/writing-prose/DIALOGUE-GUIDE.md +663 -0
- package/framework/modules/writer/skills/writer/writing-prose/PACING-STRUCTURE.md +613 -0
- package/framework/modules/writer/skills/writer/writing-prose/PROSE-PATTERNS.md +569 -0
- package/framework/modules/writer/skills/writer/writing-prose/SKILL.md +583 -0
- package/framework/modules/writer/skills/writer/writing-prose/WORLD-BUILDING-RULES.md +692 -0
- package/framework/modules/writer/skills/writer/writing-prose/examples/blended-accessible.md +651 -0
- package/framework/modules/writer/skills/writer/writing-prose/examples/tolkien-style.md +534 -0
- package/framework/modules/writer/skills/writer/writing-prose/examples/zelazny-style.md +415 -0
- package/framework/modules/writer/src/package.json +3 -0
- package/framework/modules/writer/templates/package.json +28 -0
- package/framework/modules/writer/templates/world/baseline.template.md +183 -0
- package/framework/modules/writer/templates/world/history-event.template.md +89 -0
- package/framework/modules/writer/templates/world/magic-system.template.md +138 -0
- package/framework/modules/writer/templates/world/manifest.template.json +9 -0
- package/framework/modules/writer/templates/world/nation.template.md +123 -0
- package/framework/modules/writer/templates/world/region.template.md +65 -0
- package/framework/modules/writer/templates/world/world-rule.template.md +50 -0
- package/package.json +110 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Instrumentation
|
|
3
|
+
* Helpers for tracking MCP operations across all layers
|
|
4
|
+
*/
|
|
5
|
+
import { MCPEvent } from '../types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Token usage extractor function
|
|
8
|
+
*/
|
|
9
|
+
export type TokenExtractor<T> = (result: T) => {
|
|
10
|
+
input_tokens: number;
|
|
11
|
+
output_tokens: number;
|
|
12
|
+
total_tokens: number;
|
|
13
|
+
} | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Cost extractor function
|
|
16
|
+
*/
|
|
17
|
+
export type CostExtractor<T> = (result: T) => number | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Record an MCP operation
|
|
20
|
+
*/
|
|
21
|
+
export declare function recordMCPOperation(params: {
|
|
22
|
+
layer: '1' | '2' | '3' | '3b';
|
|
23
|
+
operation_type: MCPEvent['operation_type'];
|
|
24
|
+
server_name?: string;
|
|
25
|
+
tool_name?: string;
|
|
26
|
+
arguments?: Record<string, unknown>;
|
|
27
|
+
duration_ms?: number;
|
|
28
|
+
success: boolean;
|
|
29
|
+
error?: Error;
|
|
30
|
+
token_usage?: {
|
|
31
|
+
input_tokens: number;
|
|
32
|
+
output_tokens: number;
|
|
33
|
+
total_tokens: number;
|
|
34
|
+
};
|
|
35
|
+
cost_usd?: number;
|
|
36
|
+
result?: {
|
|
37
|
+
success: boolean;
|
|
38
|
+
items_returned?: number;
|
|
39
|
+
error_code?: string;
|
|
40
|
+
};
|
|
41
|
+
}): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Wrap an async function with MCP telemetry
|
|
44
|
+
*/
|
|
45
|
+
export declare function withMCPTelemetry<T>(layer: '1' | '2' | '3' | '3b', operation_type: MCPEvent['operation_type'], server_name: string | undefined, tool_name: string | undefined, args: unknown, fn: () => Promise<T>, options?: {
|
|
46
|
+
tokenExtractor?: TokenExtractor<T>;
|
|
47
|
+
costExtractor?: CostExtractor<T>;
|
|
48
|
+
}): Promise<T>;
|
|
49
|
+
/**
|
|
50
|
+
* Record an MCP tool call (convenience wrapper)
|
|
51
|
+
*/
|
|
52
|
+
export declare function recordMCPToolCall(params: {
|
|
53
|
+
layer: '1' | '2' | '3' | '3b';
|
|
54
|
+
server_name: string;
|
|
55
|
+
tool_name: string;
|
|
56
|
+
arguments?: Record<string, unknown>;
|
|
57
|
+
duration_ms: number;
|
|
58
|
+
success: boolean;
|
|
59
|
+
error?: Error;
|
|
60
|
+
items_returned?: number;
|
|
61
|
+
error_code?: string;
|
|
62
|
+
}): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Record an MCP gateway operation (mcp-find, mcp-add, mcp-exec, etc.)
|
|
65
|
+
*/
|
|
66
|
+
export declare function recordMCPGatewayOperation(params: {
|
|
67
|
+
operation_type: 'mcp-find' | 'mcp-add' | 'mcp-exec' | 'mcp-remove' | 'mcp-config-set';
|
|
68
|
+
server_name?: string;
|
|
69
|
+
tool_name?: string;
|
|
70
|
+
arguments?: Record<string, unknown>;
|
|
71
|
+
duration_ms: number;
|
|
72
|
+
success: boolean;
|
|
73
|
+
error?: Error;
|
|
74
|
+
items_returned?: number;
|
|
75
|
+
}): Promise<void>;
|
|
76
|
+
//# sourceMappingURL=mcp-instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-instrumentation.d.ts","sourceRoot":"","sources":["../../../../src/lib/telemetry/instrumentation/mcp-instrumentation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA8CvC;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC;AAEjE;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE;IAC/C,KAAK,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;IAC9B,cAAc,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EA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MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBhB;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE;IACtD,cAAc,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,gBAAgB,CAAC;IACtF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,IAAI,CAAC,CAehB"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Instrumentation
|
|
3
|
+
* Helpers for tracking MCP operations across all layers
|
|
4
|
+
*/
|
|
5
|
+
import { getTelemetry } from '../telemetry-manager.js';
|
|
6
|
+
/**
|
|
7
|
+
* Sensitive argument keys to sanitize
|
|
8
|
+
*/
|
|
9
|
+
const SENSITIVE_KEYS = [
|
|
10
|
+
'password',
|
|
11
|
+
'token',
|
|
12
|
+
'apikey',
|
|
13
|
+
'api_key',
|
|
14
|
+
'secret',
|
|
15
|
+
'auth',
|
|
16
|
+
'authorization',
|
|
17
|
+
'credentials',
|
|
18
|
+
'bearer',
|
|
19
|
+
'jwt',
|
|
20
|
+
'session',
|
|
21
|
+
'cookie'
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* Sanitize arguments by redacting sensitive values
|
|
25
|
+
*/
|
|
26
|
+
function sanitizeArguments(args) {
|
|
27
|
+
const sanitized = {};
|
|
28
|
+
for (const [key, value] of Object.entries(args)) {
|
|
29
|
+
const lowerKey = key.toLowerCase();
|
|
30
|
+
const isSensitive = SENSITIVE_KEYS.some(sensitiveKey => lowerKey.includes(sensitiveKey));
|
|
31
|
+
if (isSensitive) {
|
|
32
|
+
sanitized[key] = '[REDACTED]';
|
|
33
|
+
}
|
|
34
|
+
else if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
35
|
+
// Recursively sanitize nested objects
|
|
36
|
+
sanitized[key] = sanitizeArguments(value);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
sanitized[key] = value;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return sanitized;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Record an MCP operation
|
|
46
|
+
*/
|
|
47
|
+
export async function recordMCPOperation(params) {
|
|
48
|
+
try {
|
|
49
|
+
const telemetry = getTelemetry();
|
|
50
|
+
// Check if MCP instrumentation is enabled
|
|
51
|
+
if (!telemetry.isInstrumentationEnabled('mcp')) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const event = {
|
|
55
|
+
timestamp: new Date().toISOString(),
|
|
56
|
+
event_type: 'mcp',
|
|
57
|
+
operation: `${params.layer}.${params.operation_type}`,
|
|
58
|
+
layer: params.layer,
|
|
59
|
+
operation_type: params.operation_type,
|
|
60
|
+
server_name: params.server_name,
|
|
61
|
+
tool_name: params.tool_name,
|
|
62
|
+
arguments: params.arguments ? sanitizeArguments(params.arguments) : undefined,
|
|
63
|
+
token_usage: params.token_usage,
|
|
64
|
+
cost_usd: params.cost_usd,
|
|
65
|
+
result: params.result,
|
|
66
|
+
success: params.success,
|
|
67
|
+
duration_ms: params.duration_ms,
|
|
68
|
+
error: params.error ? {
|
|
69
|
+
message: params.error.message,
|
|
70
|
+
stack: params.error.stack
|
|
71
|
+
} : undefined
|
|
72
|
+
};
|
|
73
|
+
await telemetry.recordEvent(event);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
// Never throw - telemetry failures should not crash the app
|
|
77
|
+
console.error('Failed to record MCP telemetry:', error);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Wrap an async function with MCP telemetry
|
|
82
|
+
*/
|
|
83
|
+
export async function withMCPTelemetry(layer, operation_type, server_name, tool_name, args, fn, options) {
|
|
84
|
+
const startTime = Date.now();
|
|
85
|
+
let result;
|
|
86
|
+
let error;
|
|
87
|
+
let success = false;
|
|
88
|
+
try {
|
|
89
|
+
result = await fn();
|
|
90
|
+
success = true;
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
error = err instanceof Error ? err : new Error(String(err));
|
|
95
|
+
throw err;
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
const duration_ms = Date.now() - startTime;
|
|
99
|
+
// Extract token usage and cost if extractors provided
|
|
100
|
+
// Note: result is guaranteed to be defined when success is true
|
|
101
|
+
const token_usage = options?.tokenExtractor && success && result !== undefined
|
|
102
|
+
? options.tokenExtractor(result)
|
|
103
|
+
: undefined;
|
|
104
|
+
const cost_usd = options?.costExtractor && success && result !== undefined
|
|
105
|
+
? options.costExtractor(result)
|
|
106
|
+
: undefined;
|
|
107
|
+
// Sanitize arguments
|
|
108
|
+
const sanitizedArgs = args && typeof args === 'object' && !Array.isArray(args)
|
|
109
|
+
? args
|
|
110
|
+
: undefined;
|
|
111
|
+
// Record telemetry (fire and forget)
|
|
112
|
+
recordMCPOperation({
|
|
113
|
+
layer,
|
|
114
|
+
operation_type,
|
|
115
|
+
server_name,
|
|
116
|
+
tool_name,
|
|
117
|
+
arguments: sanitizedArgs,
|
|
118
|
+
duration_ms,
|
|
119
|
+
success,
|
|
120
|
+
error,
|
|
121
|
+
token_usage,
|
|
122
|
+
cost_usd,
|
|
123
|
+
result: success ? { success: true } : undefined
|
|
124
|
+
}).catch(() => {
|
|
125
|
+
// Silently ignore telemetry errors
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Record an MCP tool call (convenience wrapper)
|
|
131
|
+
*/
|
|
132
|
+
export async function recordMCPToolCall(params) {
|
|
133
|
+
return recordMCPOperation({
|
|
134
|
+
layer: params.layer,
|
|
135
|
+
operation_type: 'tool-call',
|
|
136
|
+
server_name: params.server_name,
|
|
137
|
+
tool_name: params.tool_name,
|
|
138
|
+
arguments: params.arguments,
|
|
139
|
+
duration_ms: params.duration_ms,
|
|
140
|
+
success: params.success,
|
|
141
|
+
error: params.error,
|
|
142
|
+
result: {
|
|
143
|
+
success: params.success,
|
|
144
|
+
items_returned: params.items_returned,
|
|
145
|
+
error_code: params.error_code
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Record an MCP gateway operation (mcp-find, mcp-add, mcp-exec, etc.)
|
|
151
|
+
*/
|
|
152
|
+
export async function recordMCPGatewayOperation(params) {
|
|
153
|
+
return recordMCPOperation({
|
|
154
|
+
layer: '3',
|
|
155
|
+
operation_type: params.operation_type,
|
|
156
|
+
server_name: params.server_name,
|
|
157
|
+
tool_name: params.tool_name,
|
|
158
|
+
arguments: params.arguments,
|
|
159
|
+
duration_ms: params.duration_ms,
|
|
160
|
+
success: params.success,
|
|
161
|
+
error: params.error,
|
|
162
|
+
result: {
|
|
163
|
+
success: params.success,
|
|
164
|
+
items_returned: params.items_returned
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=mcp-instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-instrumentation.js","sourceRoot":"","sources":["../../../../src/lib/telemetry/instrumentation/mcp-instrumentation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;GAEG;AACH,MAAM,cAAc,GAAG;IACrB,UAAU;IACV,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,eAAe;IACf,aAAa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MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAUvC;IACC,OAAO,kBAAkB,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,cAAc,EAAE,WAAW;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE;YACN,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B;KACF,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,MAS/C;IACC,OAAO,kBAAkB,CAAC;QACxB,KAAK,EAAE,GAAG;QACV,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM,EAAE;YACN,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,cAAc,EAAE,MAAM,CAAC,cAAc;SACtC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync Engine Instrumentation Helpers
|
|
3
|
+
* Helper functions for instrumenting sync engine operations
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Record a sync operation
|
|
7
|
+
*/
|
|
8
|
+
export declare function recordSyncOperation(operation: 'sync_skills' | 'sync_agents' | 'sync_all' | 'check_sync', filesProcessed: number, changesDetected: number, filesWritten: number, durationMs: number, errors?: number, success?: boolean): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Record a skills sync operation
|
|
11
|
+
*/
|
|
12
|
+
export declare function recordSkillsSync(skillsProcessed: number, changesDetected: number, filesWritten: number, durationMs: number, errors?: number): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Record an agents sync operation
|
|
15
|
+
*/
|
|
16
|
+
export declare function recordAgentsSync(agentsProcessed: number, changesDetected: number, filesWritten: number, durationMs: number, errors?: number): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Record a complete sync operation
|
|
19
|
+
*/
|
|
20
|
+
export declare function recordSyncAll(totalFiles: number, changesDetected: number, filesWritten: number, durationMs: number, errors?: number): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Record a sync check operation
|
|
23
|
+
*/
|
|
24
|
+
export declare function recordSyncCheck(filesChecked: number, changesDetected: number, durationMs: number): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=sync-instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-instrumentation.d.ts","sourceRoot":"","sources":["../../../../src/lib/telemetry/instrumentation/sync-instrumentation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,aAAa,GAAG,aAAa,GAAG,UAAU,GAAG,YAAY,EACpE,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAU,EAClB,OAAO,GAAE,OAAc,GACtB,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAU,GACjB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAU,GACjB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,MAAM,GAAE,MAAU,GACjB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAUf"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sync Engine Instrumentation Helpers
|
|
3
|
+
* Helper functions for instrumenting sync engine operations
|
|
4
|
+
*/
|
|
5
|
+
import { getTelemetry } from '../telemetry-manager.js';
|
|
6
|
+
/**
|
|
7
|
+
* Record a sync operation
|
|
8
|
+
*/
|
|
9
|
+
export async function recordSyncOperation(operation, filesProcessed, changesDetected, filesWritten, durationMs, errors = 0, success = true) {
|
|
10
|
+
const telemetry = getTelemetry();
|
|
11
|
+
if (!telemetry.isInstrumentationEnabled('sync')) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const event = {
|
|
15
|
+
event_type: 'sync',
|
|
16
|
+
operation,
|
|
17
|
+
files_processed: filesProcessed,
|
|
18
|
+
changes_detected: changesDetected,
|
|
19
|
+
files_written: filesWritten,
|
|
20
|
+
errors,
|
|
21
|
+
success,
|
|
22
|
+
duration_ms: durationMs
|
|
23
|
+
};
|
|
24
|
+
await telemetry.recordEvent(event);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Record a skills sync operation
|
|
28
|
+
*/
|
|
29
|
+
export async function recordSkillsSync(skillsProcessed, changesDetected, filesWritten, durationMs, errors = 0) {
|
|
30
|
+
await recordSyncOperation('sync_skills', skillsProcessed, changesDetected, filesWritten, durationMs, errors, errors === 0);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Record an agents sync operation
|
|
34
|
+
*/
|
|
35
|
+
export async function recordAgentsSync(agentsProcessed, changesDetected, filesWritten, durationMs, errors = 0) {
|
|
36
|
+
await recordSyncOperation('sync_agents', agentsProcessed, changesDetected, filesWritten, durationMs, errors, errors === 0);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Record a complete sync operation
|
|
40
|
+
*/
|
|
41
|
+
export async function recordSyncAll(totalFiles, changesDetected, filesWritten, durationMs, errors = 0) {
|
|
42
|
+
await recordSyncOperation('sync_all', totalFiles, changesDetected, filesWritten, durationMs, errors, errors === 0);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Record a sync check operation
|
|
46
|
+
*/
|
|
47
|
+
export async function recordSyncCheck(filesChecked, changesDetected, durationMs) {
|
|
48
|
+
await recordSyncOperation('check_sync', filesChecked, changesDetected, 0, // No files written in check mode
|
|
49
|
+
durationMs, 0, true);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=sync-instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-instrumentation.js","sourceRoot":"","sources":["../../../../src/lib/telemetry/instrumentation/sync-instrumentation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,SAAoE,EACpE,cAAsB,EACtB,eAAuB,EACvB,YAAoB,EACpB,UAAkB,EAClB,SAAiB,CAAC,EAClB,UAAmB,IAAI;IAEvB,MAAM,SA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ElB,MAAM,mBAAmB,CACvB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,CAAC,EAAE,iCAAiC;IACpC,UAAU,EACV,CAAC,EACD,IAAI,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Context Management
|
|
3
|
+
* Provides session tracking for telemetry correlation using AsyncLocalStorage
|
|
4
|
+
*
|
|
5
|
+
* Sessions allow correlating all telemetry events from a single CLI invocation,
|
|
6
|
+
* making it easy to distinguish parallel agent runs and trace operations.
|
|
7
|
+
*/
|
|
8
|
+
import { SessionContext } from './types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Generate a unique session ID
|
|
11
|
+
* Format: sess_<12-char-uuid> (e.g., sess_abc123def456)
|
|
12
|
+
*/
|
|
13
|
+
export declare function generateSessionId(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Generate a correlation ID for tracing related operations
|
|
16
|
+
* Format: corr_<8-char-uuid> (e.g., corr_abc12345)
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateCorrelationId(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Generate a machine ID based on hostname
|
|
21
|
+
* This is a hash to avoid exposing the actual hostname
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateMachineId(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Initialize a new session
|
|
26
|
+
*
|
|
27
|
+
* @param options - Session initialization options
|
|
28
|
+
* @returns The created session context
|
|
29
|
+
*/
|
|
30
|
+
export declare function initSession(options?: {
|
|
31
|
+
parentSessionId?: string;
|
|
32
|
+
includeMachineId?: boolean;
|
|
33
|
+
}): SessionContext;
|
|
34
|
+
/**
|
|
35
|
+
* Initialize session and run a function within the session context
|
|
36
|
+
* Uses AsyncLocalStorage for automatic context propagation
|
|
37
|
+
*
|
|
38
|
+
* @param options - Session initialization options
|
|
39
|
+
* @param fn - Function to run within the session context
|
|
40
|
+
* @returns The result of the function
|
|
41
|
+
*/
|
|
42
|
+
export declare function runWithSession<T>(options: {
|
|
43
|
+
parentSessionId?: string;
|
|
44
|
+
includeMachineId?: boolean;
|
|
45
|
+
}, fn: () => T): T;
|
|
46
|
+
/**
|
|
47
|
+
* Run a function within the session context (async version)
|
|
48
|
+
*
|
|
49
|
+
* @param options - Session initialization options
|
|
50
|
+
* @param fn - Async function to run within the session context
|
|
51
|
+
* @returns Promise resolving to the function result
|
|
52
|
+
*/
|
|
53
|
+
export declare function runWithSessionAsync<T>(options: {
|
|
54
|
+
parentSessionId?: string;
|
|
55
|
+
includeMachineId?: boolean;
|
|
56
|
+
}, fn: () => Promise<T>): Promise<T>;
|
|
57
|
+
/**
|
|
58
|
+
* Get the current session context
|
|
59
|
+
* First checks AsyncLocalStorage, then falls back to global context
|
|
60
|
+
*
|
|
61
|
+
* @returns Current session context or undefined if no session is active
|
|
62
|
+
*/
|
|
63
|
+
export declare function getSessionContext(): SessionContext | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Get the current session ID
|
|
66
|
+
* Convenience method for getting just the session ID
|
|
67
|
+
*
|
|
68
|
+
* @returns Current session ID or undefined
|
|
69
|
+
*/
|
|
70
|
+
export declare function getSessionId(): string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Create a child session context (for delegated agents)
|
|
73
|
+
* The child inherits the parent session ID for correlation
|
|
74
|
+
*
|
|
75
|
+
* @param parentContext - Parent session context
|
|
76
|
+
* @param includeMachineId - Whether to include machine ID
|
|
77
|
+
* @returns New child session context
|
|
78
|
+
*/
|
|
79
|
+
export declare function createChildSession(parentContext: SessionContext, includeMachineId?: boolean): SessionContext;
|
|
80
|
+
/**
|
|
81
|
+
* Set a correlation ID for the current operation
|
|
82
|
+
* Useful for tracing a specific operation across multiple events
|
|
83
|
+
*
|
|
84
|
+
* @param correlationId - Correlation ID to set (or generate if not provided)
|
|
85
|
+
* @returns The correlation ID that was set
|
|
86
|
+
*/
|
|
87
|
+
export declare function setCorrelationId(correlationId?: string): string;
|
|
88
|
+
/**
|
|
89
|
+
* Clear the correlation ID after an operation completes
|
|
90
|
+
*/
|
|
91
|
+
export declare function clearCorrelationId(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Run a function with a correlation ID
|
|
94
|
+
* Automatically sets and clears the correlation ID
|
|
95
|
+
*
|
|
96
|
+
* @param fn - Function to run
|
|
97
|
+
* @param correlationId - Optional correlation ID (generates one if not provided)
|
|
98
|
+
* @returns The result of the function
|
|
99
|
+
*/
|
|
100
|
+
export declare function withCorrelation<T>(fn: () => Promise<T>, correlationId?: string): Promise<T>;
|
|
101
|
+
/**
|
|
102
|
+
* Reset session context (mainly for testing)
|
|
103
|
+
*/
|
|
104
|
+
export declare function resetSessionContext(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Check if a session is currently active
|
|
107
|
+
*/
|
|
108
|
+
export declare function hasActiveSession(): boolean;
|
|
109
|
+
//# sourceMappingURL=session-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-context.d.ts","sourceRoot":"","sources":["../../../src/lib/telemetry/session-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAa5C;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAE;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACvB,GAAG,cAAc,CAYtB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,OAAO,EAAE;IACP,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,EACD,EAAE,EAAE,MAAM,CAAC,GACV,CAAC,CAGH;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,OAAO,EAAE;IACP,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,EACD,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAGZ;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,SAAS,CAE9D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,MAAM,GAAG,SAAS,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,cAAc,EAC7B,gBAAgB,UAAQ,GACvB,cAAc,CAOhB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAKzC;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,CAAC,EACrC,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,CAAC,CAAC,CAOZ;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Context Management
|
|
3
|
+
* Provides session tracking for telemetry correlation using AsyncLocalStorage
|
|
4
|
+
*
|
|
5
|
+
* Sessions allow correlating all telemetry events from a single CLI invocation,
|
|
6
|
+
* making it easy to distinguish parallel agent runs and trace operations.
|
|
7
|
+
*/
|
|
8
|
+
import { AsyncLocalStorage } from 'async_hooks';
|
|
9
|
+
import { randomUUID } from 'crypto';
|
|
10
|
+
import { createHash } from 'crypto';
|
|
11
|
+
import { hostname } from 'os';
|
|
12
|
+
/**
|
|
13
|
+
* AsyncLocalStorage for session context propagation
|
|
14
|
+
* This allows session context to be automatically propagated through async operations
|
|
15
|
+
*/
|
|
16
|
+
const sessionStorage = new AsyncLocalStorage();
|
|
17
|
+
/**
|
|
18
|
+
* Global session context (fallback when not using AsyncLocalStorage)
|
|
19
|
+
*/
|
|
20
|
+
let globalSessionContext;
|
|
21
|
+
/**
|
|
22
|
+
* Generate a unique session ID
|
|
23
|
+
* Format: sess_<12-char-uuid> (e.g., sess_abc123def456)
|
|
24
|
+
*/
|
|
25
|
+
export function generateSessionId() {
|
|
26
|
+
return `sess_${randomUUID().replace(/-/g, '').slice(0, 12)}`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Generate a correlation ID for tracing related operations
|
|
30
|
+
* Format: corr_<8-char-uuid> (e.g., corr_abc12345)
|
|
31
|
+
*/
|
|
32
|
+
export function generateCorrelationId() {
|
|
33
|
+
return `corr_${randomUUID().replace(/-/g, '').slice(0, 8)}`;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generate a machine ID based on hostname
|
|
37
|
+
* This is a hash to avoid exposing the actual hostname
|
|
38
|
+
*/
|
|
39
|
+
export function generateMachineId() {
|
|
40
|
+
const hash = createHash('sha256').update(hostname()).digest('hex');
|
|
41
|
+
return `machine_${hash.slice(0, 8)}`;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Initialize a new session
|
|
45
|
+
*
|
|
46
|
+
* @param options - Session initialization options
|
|
47
|
+
* @returns The created session context
|
|
48
|
+
*/
|
|
49
|
+
export function initSession(options = {}) {
|
|
50
|
+
const context = {
|
|
51
|
+
session_id: generateSessionId(),
|
|
52
|
+
session_start: new Date().toISOString(),
|
|
53
|
+
parent_session_id: options.parentSessionId,
|
|
54
|
+
machine_id: options.includeMachineId ? generateMachineId() : undefined,
|
|
55
|
+
};
|
|
56
|
+
// Store in global context
|
|
57
|
+
globalSessionContext = context;
|
|
58
|
+
return context;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Initialize session and run a function within the session context
|
|
62
|
+
* Uses AsyncLocalStorage for automatic context propagation
|
|
63
|
+
*
|
|
64
|
+
* @param options - Session initialization options
|
|
65
|
+
* @param fn - Function to run within the session context
|
|
66
|
+
* @returns The result of the function
|
|
67
|
+
*/
|
|
68
|
+
export function runWithSession(options, fn) {
|
|
69
|
+
const context = initSession(options);
|
|
70
|
+
return sessionStorage.run(context, fn);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Run a function within the session context (async version)
|
|
74
|
+
*
|
|
75
|
+
* @param options - Session initialization options
|
|
76
|
+
* @param fn - Async function to run within the session context
|
|
77
|
+
* @returns Promise resolving to the function result
|
|
78
|
+
*/
|
|
79
|
+
export async function runWithSessionAsync(options, fn) {
|
|
80
|
+
const context = initSession(options);
|
|
81
|
+
return sessionStorage.run(context, fn);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get the current session context
|
|
85
|
+
* First checks AsyncLocalStorage, then falls back to global context
|
|
86
|
+
*
|
|
87
|
+
* @returns Current session context or undefined if no session is active
|
|
88
|
+
*/
|
|
89
|
+
export function getSessionContext() {
|
|
90
|
+
return sessionStorage.getStore() ?? globalSessionContext;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get the current session ID
|
|
94
|
+
* Convenience method for getting just the session ID
|
|
95
|
+
*
|
|
96
|
+
* @returns Current session ID or undefined
|
|
97
|
+
*/
|
|
98
|
+
export function getSessionId() {
|
|
99
|
+
return getSessionContext()?.session_id;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create a child session context (for delegated agents)
|
|
103
|
+
* The child inherits the parent session ID for correlation
|
|
104
|
+
*
|
|
105
|
+
* @param parentContext - Parent session context
|
|
106
|
+
* @param includeMachineId - Whether to include machine ID
|
|
107
|
+
* @returns New child session context
|
|
108
|
+
*/
|
|
109
|
+
export function createChildSession(parentContext, includeMachineId = false) {
|
|
110
|
+
return {
|
|
111
|
+
session_id: generateSessionId(),
|
|
112
|
+
parent_session_id: parentContext.session_id,
|
|
113
|
+
session_start: new Date().toISOString(),
|
|
114
|
+
machine_id: includeMachineId ? generateMachineId() : parentContext.machine_id,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Set a correlation ID for the current operation
|
|
119
|
+
* Useful for tracing a specific operation across multiple events
|
|
120
|
+
*
|
|
121
|
+
* @param correlationId - Correlation ID to set (or generate if not provided)
|
|
122
|
+
* @returns The correlation ID that was set
|
|
123
|
+
*/
|
|
124
|
+
export function setCorrelationId(correlationId) {
|
|
125
|
+
const corrId = correlationId ?? generateCorrelationId();
|
|
126
|
+
const context = getSessionContext();
|
|
127
|
+
if (context) {
|
|
128
|
+
context.correlation_id = corrId;
|
|
129
|
+
}
|
|
130
|
+
return corrId;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Clear the correlation ID after an operation completes
|
|
134
|
+
*/
|
|
135
|
+
export function clearCorrelationId() {
|
|
136
|
+
const context = getSessionContext();
|
|
137
|
+
if (context) {
|
|
138
|
+
context.correlation_id = undefined;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Run a function with a correlation ID
|
|
143
|
+
* Automatically sets and clears the correlation ID
|
|
144
|
+
*
|
|
145
|
+
* @param fn - Function to run
|
|
146
|
+
* @param correlationId - Optional correlation ID (generates one if not provided)
|
|
147
|
+
* @returns The result of the function
|
|
148
|
+
*/
|
|
149
|
+
export async function withCorrelation(fn, correlationId) {
|
|
150
|
+
const _corrId = setCorrelationId(correlationId);
|
|
151
|
+
try {
|
|
152
|
+
return await fn();
|
|
153
|
+
}
|
|
154
|
+
finally {
|
|
155
|
+
clearCorrelationId();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Reset session context (mainly for testing)
|
|
160
|
+
*/
|
|
161
|
+
export function resetSessionContext() {
|
|
162
|
+
globalSessionContext = undefined;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Check if a session is currently active
|
|
166
|
+
*/
|
|
167
|
+
export function hasActiveSession() {
|
|
168
|
+
return getSessionContext() !== undefined;
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=session-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-context.js","sourceRoot":"","sources":["../../../src/lib/telemetry/session-context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAG9B;;;GAGG;AACH,MAAM,cAAc,GAAG,IAAI,iBAAiB,EAAkB,CAAC;AAE/D;;GAEG;AACH,IAAI,oBAAgD,CAAC;AAErD;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,QAAQ,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,QAAQ,UAAU,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnE,OAAO,WAAW,IAAI,CAAC,KAAK,CAAC,C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