@codemieai/code 0.0.28 → 0.0.29
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 +8 -10
- package/bin/agent-executor.js +1 -1
- package/dist/agents/codemie-code/config.d.ts.map +1 -1
- package/dist/agents/codemie-code/config.js +0 -1
- package/dist/agents/codemie-code/config.js.map +1 -1
- package/dist/agents/core/AgentCLI.d.ts.map +1 -1
- package/dist/agents/core/AgentCLI.js +4 -8
- package/dist/agents/core/AgentCLI.js.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts +17 -9
- package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.js +75 -67
- package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
- package/dist/agents/core/extension/BaseExtensionInstaller.d.ts +258 -0
- package/dist/agents/core/extension/BaseExtensionInstaller.d.ts.map +1 -0
- package/dist/agents/core/extension/BaseExtensionInstaller.js +522 -0
- package/dist/agents/core/extension/BaseExtensionInstaller.js.map +1 -0
- package/dist/agents/core/lifecycle-helpers.d.ts.map +1 -1
- package/dist/agents/core/lifecycle-helpers.js +16 -2
- package/dist/agents/core/lifecycle-helpers.js.map +1 -1
- package/dist/agents/core/metrics/index.d.ts +0 -2
- package/dist/agents/core/metrics/index.d.ts.map +1 -1
- package/dist/agents/core/metrics/index.js +0 -3
- package/dist/agents/core/metrics/index.js.map +1 -1
- package/dist/agents/core/metrics/types.d.ts +4 -232
- package/dist/agents/core/metrics/types.d.ts.map +1 -1
- package/dist/agents/core/metrics/types.js +2 -2
- package/dist/agents/core/session/BaseProcessor.d.ts +72 -0
- package/dist/agents/core/session/BaseProcessor.d.ts.map +1 -0
- package/dist/agents/core/session/BaseProcessor.js +9 -0
- package/dist/agents/core/session/BaseProcessor.js.map +1 -0
- package/dist/agents/core/session/BaseSessionAdapter.d.ts +99 -0
- package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -0
- package/dist/agents/core/session/BaseSessionAdapter.js +9 -0
- package/dist/agents/core/session/BaseSessionAdapter.js.map +1 -0
- package/dist/agents/core/session/SessionStore.d.ts +23 -0
- package/dist/agents/core/session/SessionStore.d.ts.map +1 -0
- package/dist/agents/core/session/SessionStore.js +75 -0
- package/dist/agents/core/session/SessionStore.js.map +1 -0
- package/dist/agents/core/session/session-config.d.ts +27 -0
- package/dist/agents/core/session/session-config.d.ts.map +1 -0
- package/dist/agents/core/session/session-config.js +61 -0
- package/dist/agents/core/session/session-config.js.map +1 -0
- package/dist/agents/core/session/types.d.ts +87 -0
- package/dist/agents/core/session/types.d.ts.map +1 -0
- package/dist/agents/core/session/types.js +8 -0
- package/dist/agents/core/session/types.js.map +1 -0
- package/dist/agents/core/session/utils/jsonl-reader.d.ts +15 -0
- package/dist/agents/core/session/utils/jsonl-reader.d.ts.map +1 -0
- package/dist/agents/core/session/utils/jsonl-reader.js +33 -0
- package/dist/agents/core/session/utils/jsonl-reader.js.map +1 -0
- package/dist/agents/core/session/utils/jsonl-writer.d.ts +26 -0
- package/dist/agents/core/session/utils/jsonl-writer.d.ts.map +1 -0
- package/dist/agents/core/session/utils/jsonl-writer.js +56 -0
- package/dist/agents/core/session/utils/jsonl-writer.js.map +1 -0
- package/dist/agents/core/types.d.ts +78 -11
- package/dist/agents/core/types.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude-message-types.d.ts +74 -0
- package/dist/agents/plugins/claude/claude-message-types.d.ts.map +1 -0
- package/dist/agents/plugins/claude/claude-message-types.js +8 -0
- package/dist/agents/plugins/claude/claude-message-types.js.map +1 -0
- package/dist/agents/plugins/claude/claude.plugin-installer.d.ts +53 -0
- package/dist/agents/plugins/claude/claude.plugin-installer.d.ts.map +1 -0
- package/dist/agents/plugins/claude/claude.plugin-installer.js +63 -0
- package/dist/agents/plugins/claude/claude.plugin-installer.js.map +1 -0
- package/dist/agents/plugins/claude/claude.plugin.d.ts +26 -0
- package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -0
- package/dist/agents/plugins/{claude.plugin.js → claude/claude.plugin.js} +20 -11
- package/dist/agents/plugins/claude/claude.plugin.js.map +1 -0
- package/dist/agents/plugins/claude/claude.session.d.ts +60 -0
- package/dist/agents/plugins/claude/claude.session.d.ts.map +1 -0
- package/dist/agents/plugins/claude/claude.session.js +339 -0
- package/dist/agents/plugins/claude/claude.session.js.map +1 -0
- package/dist/agents/plugins/claude/plugin/.claude-plugin/local-install.json +15 -0
- package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +9 -0
- package/dist/agents/plugins/claude/plugin/README.md +299 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/README.md +539 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/CLAUDE.md.template +511 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/INDEX.md +205 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/TEMPLATE_SIZES.md +74 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/api/api-patterns.md.template +207 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/architecture/layered-architecture.md.template +143 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/architecture/project-structure.md.template +127 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/data/database-patterns.md.template +168 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/development/development-practices.md.template +210 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/integration/external-integrations.md.template +160 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/security/security-practices.md.template +170 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/standards/code-quality.md.template +150 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/standards/git-workflow.md.template +177 -0
- package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/testing/testing-patterns.md.template +143 -0
- package/dist/agents/plugins/claude/plugin/commands/README.md +0 -0
- package/dist/agents/plugins/claude/plugin/commands/codemie-catchup.md +10 -0
- package/dist/agents/plugins/claude/plugin/commands/codemie-init.md +731 -0
- package/dist/agents/plugins/claude/plugin/commands/memory-add.md +44 -0
- package/dist/agents/plugins/claude/plugin/commands/memory-init.md +18 -0
- package/dist/agents/plugins/claude/plugin/commands/memory-refresh.md +54 -0
- package/dist/agents/plugins/claude/plugin/hooks/hooks.json +71 -0
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts +51 -0
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -0
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +840 -0
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -0
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.d.ts +37 -0
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.d.ts.map +1 -0
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js +275 -0
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js.map +1 -0
- package/dist/agents/plugins/gemini/extension/README.md +88 -0
- package/dist/agents/plugins/gemini/extension/gemini-extension.json +11 -0
- package/dist/agents/plugins/gemini/extension/hooks/hooks.json +65 -0
- package/dist/agents/plugins/gemini/gemini.extension-installer.d.ts +49 -0
- package/dist/agents/plugins/gemini/gemini.extension-installer.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/gemini.extension-installer.js +63 -0
- package/dist/agents/plugins/gemini/gemini.extension-installer.js.map +1 -0
- package/dist/agents/plugins/gemini/gemini.hook-transformer.d.ts +43 -0
- package/dist/agents/plugins/gemini/gemini.hook-transformer.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/gemini.hook-transformer.js +57 -0
- package/dist/agents/plugins/gemini/gemini.hook-transformer.js.map +1 -0
- package/dist/agents/plugins/gemini/gemini.plugin.d.ts +32 -0
- package/dist/agents/plugins/gemini/gemini.plugin.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/gemini.plugin.js +136 -0
- package/dist/agents/plugins/gemini/gemini.plugin.js.map +1 -0
- package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts +68 -0
- package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/gemini.session-adapter.js +268 -0
- package/dist/agents/plugins/gemini/gemini.session-adapter.js.map +1 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.d.ts +36 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js +186 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js.map +1 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.d.ts +32 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js +193 -0
- package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js.map +1 -0
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts +26 -0
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.js +38 -0
- package/dist/agents/plugins/gemini/session/utils/token-aggregator.js.map +1 -0
- package/dist/agents/plugins/gemini/session/utils/tool-aggregator.d.ts +33 -0
- package/dist/agents/plugins/gemini/session/utils/tool-aggregator.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/session/utils/tool-aggregator.js +58 -0
- package/dist/agents/plugins/gemini/session/utils/tool-aggregator.js.map +1 -0
- package/dist/agents/plugins/gemini/session/utils/turn-detector.d.ts +70 -0
- package/dist/agents/plugins/gemini/session/utils/turn-detector.d.ts.map +1 -0
- package/dist/agents/plugins/gemini/session/utils/turn-detector.js +86 -0
- package/dist/agents/plugins/gemini/session/utils/turn-detector.js.map +1 -0
- package/dist/agents/registry.d.ts +7 -2
- package/dist/agents/registry.d.ts.map +1 -1
- package/dist/agents/registry.js +17 -8
- package/dist/agents/registry.js.map +1 -1
- package/dist/cli/commands/analytics/data-loader.d.ts +1 -1
- package/dist/cli/commands/analytics/data-loader.js +1 -1
- package/dist/cli/commands/analytics/index.js +1 -1
- package/dist/cli/commands/analytics/index.js.map +1 -1
- package/dist/cli/commands/doctor/checks/PythonCheck.d.ts +13 -0
- package/dist/cli/commands/doctor/checks/PythonCheck.d.ts.map +1 -1
- package/dist/cli/commands/doctor/checks/PythonCheck.js +90 -31
- package/dist/cli/commands/doctor/checks/PythonCheck.js.map +1 -1
- package/dist/cli/commands/hook.d.ts +7 -0
- package/dist/cli/commands/hook.d.ts.map +1 -0
- package/dist/cli/commands/hook.js +788 -0
- package/dist/cli/commands/hook.js.map +1 -0
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +3 -4
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +2 -1
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/first-time.d.ts +4 -0
- package/dist/cli/first-time.d.ts.map +1 -1
- package/dist/cli/first-time.js +26 -13
- package/dist/cli/first-time.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/frameworks/core/types.d.ts +1 -1
- package/dist/frameworks/plugins/speckit.plugin.d.ts.map +1 -1
- package/dist/frameworks/plugins/speckit.plugin.js +1 -2
- package/dist/frameworks/plugins/speckit.plugin.js.map +1 -1
- package/dist/migrations/002-consolidate-sessions.migration.d.ts +50 -0
- package/dist/migrations/002-consolidate-sessions.migration.d.ts.map +1 -0
- package/dist/migrations/002-consolidate-sessions.migration.js +220 -0
- package/dist/migrations/002-consolidate-sessions.migration.js.map +1 -0
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +3 -2
- package/dist/migrations/index.js.map +1 -1
- package/dist/providers/core/types.d.ts +1 -1
- package/dist/providers/plugins/ollama/ollama.template.d.ts.map +1 -1
- package/dist/providers/plugins/ollama/ollama.template.js +2 -10
- package/dist/providers/plugins/ollama/ollama.template.js.map +1 -1
- package/dist/providers/plugins/sso/index.d.ts +1 -1
- package/dist/providers/plugins/sso/index.d.ts.map +1 -1
- package/dist/providers/plugins/sso/index.js +1 -1
- package/dist/providers/plugins/sso/index.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js +3 -3
- package/dist/providers/plugins/sso/proxy/plugins/index.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.d.ts +40 -0
- package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.d.ts.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.js +194 -0
- package/dist/providers/plugins/sso/proxy/plugins/sso.session-sync.plugin.js.map +1 -0
- package/dist/providers/plugins/sso/proxy/proxy-http-client.d.ts +1 -0
- package/dist/providers/plugins/sso/proxy/proxy-http-client.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/proxy-http-client.js +40 -6
- package/dist/providers/plugins/sso/proxy/proxy-http-client.js.map +1 -1
- package/dist/providers/plugins/sso/session/BaseProcessor.d.ts +72 -0
- package/dist/providers/plugins/sso/session/BaseProcessor.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/BaseProcessor.js +9 -0
- package/dist/providers/plugins/sso/session/BaseProcessor.js.map +1 -0
- package/dist/providers/plugins/sso/session/BaseSessionAdapter.d.ts +99 -0
- package/dist/providers/plugins/sso/session/BaseSessionAdapter.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/BaseSessionAdapter.js +9 -0
- package/dist/providers/plugins/sso/session/BaseSessionAdapter.js.map +1 -0
- package/dist/providers/plugins/sso/session/SessionSyncer.d.ts +36 -0
- package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/SessionSyncer.js +140 -0
- package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts +26 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js +146 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts +23 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.js +171 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.d.ts +69 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js +7 -0
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/metrics/MetricsWriter.d.ts +30 -0
- package/dist/providers/plugins/sso/session/processors/metrics/MetricsWriter.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/metrics/MetricsWriter.js +79 -0
- package/dist/providers/plugins/sso/session/processors/metrics/MetricsWriter.js.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-aggregator.d.ts → session/processors/metrics/metrics-aggregator.d.ts} +6 -5
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-aggregator.js → session/processors/metrics/metrics-aggregator.js} +20 -12
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-sender.d.ts → session/processors/metrics/metrics-api-client.d.ts} +18 -11
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-sender.js → session/processors/metrics/metrics-api-client.js} +143 -15
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-post-processor.d.ts → session/processors/metrics/metrics-post-processor.d.ts} +3 -3
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-post-processor.js → session/processors/metrics/metrics-post-processor.js} +3 -3
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts +24 -0
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-sync.plugin.js → session/processors/metrics/metrics-sync-processor.js} +94 -165
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-types.d.ts → session/processors/metrics/metrics-types.d.ts} +2 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.metrics-types.js → session/processors/metrics/metrics-types.js} +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.js.map +1 -0
- package/dist/providers/plugins/sso/session/utils/jsonl-reader.d.ts +15 -0
- package/dist/providers/plugins/sso/session/utils/jsonl-reader.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/utils/jsonl-reader.js +33 -0
- package/dist/providers/plugins/sso/session/utils/jsonl-reader.js.map +1 -0
- package/dist/providers/plugins/sso/session/utils/jsonl-writer.d.ts +26 -0
- package/dist/providers/plugins/sso/session/utils/jsonl-writer.d.ts.map +1 -0
- package/dist/providers/plugins/sso/{metrics/sync/sso.jsonl-writer.js → session/utils/jsonl-writer.js} +11 -27
- package/dist/providers/plugins/sso/session/utils/jsonl-writer.js.map +1 -0
- package/dist/providers/plugins/sso/sso.template.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.template.js +71 -44
- package/dist/providers/plugins/sso/sso.template.js.map +1 -1
- package/dist/utils/file-operations.d.ts +20 -0
- package/dist/utils/file-operations.d.ts.map +1 -0
- package/dist/utils/file-operations.js +48 -0
- package/dist/utils/file-operations.js.map +1 -0
- package/dist/utils/logger.d.ts +2 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +12 -4
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/paths.d.ts +20 -5
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +23 -5
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/processes.d.ts +2 -0
- package/dist/utils/processes.d.ts.map +1 -1
- package/dist/utils/processes.js +6 -1
- package/dist/utils/processes.js.map +1 -1
- package/package.json +9 -9
- package/scripts/copy-plugins.js +57 -0
- package/scripts/license-check.js +23 -0
- package/bin/codemie-codex.js +0 -18
- package/bin/codemie-deepagents.js +0 -18
- package/dist/agents/core/BaseMetricsAdapter.d.ts +0 -165
- package/dist/agents/core/BaseMetricsAdapter.d.ts.map +0 -1
- package/dist/agents/core/BaseMetricsAdapter.js +0 -308
- package/dist/agents/core/BaseMetricsAdapter.js.map +0 -1
- package/dist/agents/core/metrics/MetricsOrchestrator.d.ts +0 -81
- package/dist/agents/core/metrics/MetricsOrchestrator.d.ts.map +0 -1
- package/dist/agents/core/metrics/MetricsOrchestrator.js +0 -417
- package/dist/agents/core/metrics/MetricsOrchestrator.js.map +0 -1
- package/dist/agents/core/metrics/core/DeltaWriter.d.ts +0 -49
- package/dist/agents/core/metrics/core/DeltaWriter.d.ts.map +0 -1
- package/dist/agents/core/metrics/core/DeltaWriter.js +0 -152
- package/dist/agents/core/metrics/core/DeltaWriter.js.map +0 -1
- package/dist/agents/core/metrics/core/FileSnapshotter.d.ts +0 -22
- package/dist/agents/core/metrics/core/FileSnapshotter.d.ts.map +0 -1
- package/dist/agents/core/metrics/core/FileSnapshotter.js +0 -74
- package/dist/agents/core/metrics/core/FileSnapshotter.js.map +0 -1
- package/dist/agents/core/metrics/core/SessionCorrelator.d.ts +0 -34
- package/dist/agents/core/metrics/core/SessionCorrelator.d.ts.map +0 -1
- package/dist/agents/core/metrics/core/SessionCorrelator.js +0 -157
- package/dist/agents/core/metrics/core/SessionCorrelator.js.map +0 -1
- package/dist/agents/core/metrics/core/SyncStateManager.d.ts +0 -69
- package/dist/agents/core/metrics/core/SyncStateManager.d.ts.map +0 -1
- package/dist/agents/core/metrics/core/SyncStateManager.js +0 -283
- package/dist/agents/core/metrics/core/SyncStateManager.js.map +0 -1
- package/dist/agents/core/metrics/session/SessionStore.d.ts +0 -43
- package/dist/agents/core/metrics/session/SessionStore.d.ts.map +0 -1
- package/dist/agents/core/metrics/session/SessionStore.js +0 -146
- package/dist/agents/core/metrics/session/SessionStore.js.map +0 -1
- package/dist/agents/core/metrics-config.d.ts +0 -38
- package/dist/agents/core/metrics-config.d.ts.map +0 -1
- package/dist/agents/core/metrics-config.js +0 -96
- package/dist/agents/core/metrics-config.js.map +0 -1
- package/dist/agents/plugins/claude.metrics.d.ts +0 -102
- package/dist/agents/plugins/claude.metrics.d.ts.map +0 -1
- package/dist/agents/plugins/claude.metrics.js +0 -656
- package/dist/agents/plugins/claude.metrics.js.map +0 -1
- package/dist/agents/plugins/claude.plugin.d.ts +0 -19
- package/dist/agents/plugins/claude.plugin.d.ts.map +0 -1
- package/dist/agents/plugins/claude.plugin.js.map +0 -1
- package/dist/agents/plugins/codex.metrics.d.ts +0 -69
- package/dist/agents/plugins/codex.metrics.d.ts.map +0 -1
- package/dist/agents/plugins/codex.metrics.js +0 -483
- package/dist/agents/plugins/codex.metrics.js.map +0 -1
- package/dist/agents/plugins/codex.plugin.d.ts +0 -21
- package/dist/agents/plugins/codex.plugin.d.ts.map +0 -1
- package/dist/agents/plugins/codex.plugin.js +0 -222
- package/dist/agents/plugins/codex.plugin.js.map +0 -1
- package/dist/agents/plugins/deepagents.plugin.d.ts +0 -21
- package/dist/agents/plugins/deepagents.plugin.d.ts.map +0 -1
- package/dist/agents/plugins/deepagents.plugin.js +0 -104
- package/dist/agents/plugins/deepagents.plugin.js.map +0 -1
- package/dist/agents/plugins/gemini.metrics.d.ts +0 -99
- package/dist/agents/plugins/gemini.metrics.d.ts.map +0 -1
- package/dist/agents/plugins/gemini.metrics.js +0 -475
- package/dist/agents/plugins/gemini.metrics.js.map +0 -1
- package/dist/agents/plugins/gemini.plugin.d.ts +0 -16
- package/dist/agents/plugins/gemini.plugin.d.ts.map +0 -1
- package/dist/agents/plugins/gemini.plugin.js +0 -80
- package/dist/agents/plugins/gemini.plugin.js.map +0 -1
- package/dist/agents/plugins/history-parser.d.ts +0 -52
- package/dist/agents/plugins/history-parser.d.ts.map +0 -1
- package/dist/agents/plugins/history-parser.js +0 -155
- package/dist/agents/plugins/history-parser.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.jsonl-writer.d.ts +0 -28
- package/dist/providers/plugins/sso/metrics/sync/sso.jsonl-writer.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.jsonl-writer.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.lifecycle-handler.d.ts +0 -62
- package/dist/providers/plugins/sso/metrics/sync/sso.lifecycle-handler.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.lifecycle-handler.js +0 -157
- package/dist/providers/plugins/sso/metrics/sync/sso.lifecycle-handler.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-aggregator.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-aggregator.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-api-client.d.ts +0 -32
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-api-client.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-api-client.js +0 -159
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-api-client.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-post-processor.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-post-processor.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-sender.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-sender.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-sync.plugin.d.ts +0 -36
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-sync.plugin.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-sync.plugin.js.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-types.d.ts.map +0 -1
- package/dist/providers/plugins/sso/metrics/sync/sso.metrics-types.js.map +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Project Structure
|
|
2
|
+
|
|
3
|
+
## Quick Summary
|
|
4
|
+
|
|
5
|
+
[PROJECT_NAME] directory layout and organization guide.
|
|
6
|
+
|
|
7
|
+
**Category**: Architecture
|
|
8
|
+
**Complexity**: Simple
|
|
9
|
+
**Prerequisites**: File system basics
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🚨 SIZE LIMIT WARNING
|
|
14
|
+
|
|
15
|
+
**This generated guide MUST be 200-400 lines maximum.**
|
|
16
|
+
|
|
17
|
+
**When filling this template**:
|
|
18
|
+
- ✅ Code examples: 5-15 lines (NEVER > 20)
|
|
19
|
+
- ✅ ONE example per pattern
|
|
20
|
+
- ✅ Use file:line references, not full code
|
|
21
|
+
- ✅ Use tables for multiple patterns
|
|
22
|
+
- ❌ NO multiple examples for same pattern
|
|
23
|
+
- ❌ NO verbose explanations
|
|
24
|
+
- ❌ NO copying entire functions
|
|
25
|
+
|
|
26
|
+
**Validate line count after generation**: `wc -l [this-file]`
|
|
27
|
+
**If > 400 lines**: Condense immediately before continuing!
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Directory Structure
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
[project-root]/
|
|
35
|
+
├── [src]/ Source code
|
|
36
|
+
├── [tests]/ Tests
|
|
37
|
+
├── [config]/ Configuration
|
|
38
|
+
├── [docs]/ Documentation
|
|
39
|
+
├── .gitignore
|
|
40
|
+
├── [build-config] Build/dependency file
|
|
41
|
+
└── README.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Source Organization
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
[src]/
|
|
50
|
+
├── [layer1]/ [Layer 1 description]
|
|
51
|
+
│ └── [module]/
|
|
52
|
+
├── [layer2]/ [Layer 2 description]
|
|
53
|
+
│ └── [module]/
|
|
54
|
+
├── [layer3]/ [Layer 3 description]
|
|
55
|
+
│ └── [module]/
|
|
56
|
+
├── [shared]/ Common utilities
|
|
57
|
+
│ ├── exceptions
|
|
58
|
+
│ ├── constants
|
|
59
|
+
│ └── utils
|
|
60
|
+
└── [main] Entry point
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Test Organization
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
[tests]/
|
|
69
|
+
├── unit/ Mirrors source structure
|
|
70
|
+
│ └── [module]/
|
|
71
|
+
│ └── test_[file]
|
|
72
|
+
├── integration/
|
|
73
|
+
│ └── test_[feature]
|
|
74
|
+
└── fixtures/
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## File Naming
|
|
80
|
+
|
|
81
|
+
| Type | Convention | Example |
|
|
82
|
+
|------|------------|---------|
|
|
83
|
+
| Modules | [convention] | `[example]` |
|
|
84
|
+
| Tests | [convention] | `test_[name]` |
|
|
85
|
+
| Config | [convention] | `[example]` |
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Module Boundaries
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
[Layer1] (Top)
|
|
93
|
+
↓
|
|
94
|
+
[Layer2] (Middle)
|
|
95
|
+
↓
|
|
96
|
+
[Layer3] (Bottom)
|
|
97
|
+
↓
|
|
98
|
+
[Shared/Core]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Rules**:
|
|
102
|
+
- ✅ Upper → Lower
|
|
103
|
+
- ✅ All → Shared
|
|
104
|
+
- ❌ Lower → Upper
|
|
105
|
+
- ❌ Circular dependencies
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Finding Code
|
|
110
|
+
|
|
111
|
+
| Need | Location |
|
|
112
|
+
|------|----------|
|
|
113
|
+
| API endpoints | `[path]` |
|
|
114
|
+
| Business logic | `[path]` |
|
|
115
|
+
| Data models | `[path]` |
|
|
116
|
+
| Database | `[path]` |
|
|
117
|
+
| Exceptions | `[path]` |
|
|
118
|
+
| Config | `[path]` |
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## References
|
|
123
|
+
|
|
124
|
+
- **Source**: `[src-directory]/`
|
|
125
|
+
- **Tests**: `[test-directory]/`
|
|
126
|
+
|
|
127
|
+
---
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Database Patterns
|
|
2
|
+
|
|
3
|
+
## Quick Summary
|
|
4
|
+
|
|
5
|
+
Database patterns for [PROJECT_NAME]: models, queries, transactions, and migrations using [ORM] with [DATABASE].
|
|
6
|
+
|
|
7
|
+
**Category**: Data
|
|
8
|
+
**Complexity**: Medium-High
|
|
9
|
+
**Prerequisites**: SQL, [ORM], [DATABASE]
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🚨 SIZE LIMIT WARNING
|
|
14
|
+
|
|
15
|
+
**This generated guide MUST be 200-400 lines maximum.**
|
|
16
|
+
|
|
17
|
+
**When filling this template**:
|
|
18
|
+
- ✅ Code examples: 5-15 lines (NEVER > 20)
|
|
19
|
+
- ✅ ONE example per pattern
|
|
20
|
+
- ✅ Use file:line references, not full code
|
|
21
|
+
- ✅ Use tables for multiple patterns
|
|
22
|
+
- ❌ NO multiple examples for same pattern
|
|
23
|
+
- ❌ NO verbose explanations
|
|
24
|
+
- ❌ NO copying entire functions
|
|
25
|
+
|
|
26
|
+
**Validate line count after generation**: `wc -l [this-file]`
|
|
27
|
+
**If > 400 lines**: Condense immediately before continuing!
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Connection Configuration
|
|
32
|
+
|
|
33
|
+
```[language]
|
|
34
|
+
# Source: [file:lines]
|
|
35
|
+
[connection_config]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Connection String**: `[database]://[user]:[pass]@[host]:[port]/[db]`
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Model Definition
|
|
43
|
+
|
|
44
|
+
```[language]
|
|
45
|
+
# Source: [file:lines]
|
|
46
|
+
[model_example]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Relationships**: [Describe key relationships]
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## CRUD Operations
|
|
54
|
+
|
|
55
|
+
### Create
|
|
56
|
+
|
|
57
|
+
```[language]
|
|
58
|
+
# Source: [file:lines]
|
|
59
|
+
[create_example]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Read
|
|
63
|
+
|
|
64
|
+
```[language]
|
|
65
|
+
# Source: [file:lines]
|
|
66
|
+
[read_example]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Update
|
|
70
|
+
|
|
71
|
+
```[language]
|
|
72
|
+
# Source: [file:lines]
|
|
73
|
+
[update_example]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Delete
|
|
77
|
+
|
|
78
|
+
```[language]
|
|
79
|
+
# Source: [file:lines]
|
|
80
|
+
[delete_example]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Transactions
|
|
86
|
+
|
|
87
|
+
```[language]
|
|
88
|
+
# Source: [file:lines]
|
|
89
|
+
[transaction_example]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**When to Use**:
|
|
93
|
+
- Multiple related writes
|
|
94
|
+
- Data consistency requirements
|
|
95
|
+
|
|
96
|
+
**Rules**:
|
|
97
|
+
- Keep short
|
|
98
|
+
- Avoid external API calls in transactions
|
|
99
|
+
- Handle rollback
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Pagination
|
|
104
|
+
|
|
105
|
+
```[language]
|
|
106
|
+
# Source: [file:lines]
|
|
107
|
+
[pagination_example]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Pattern**: Offset-based | Cursor-based
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## N+1 Prevention
|
|
115
|
+
|
|
116
|
+
```[language]
|
|
117
|
+
# Problem: N+1
|
|
118
|
+
[n_plus_1_problem]
|
|
119
|
+
|
|
120
|
+
# Solution: Eager loading
|
|
121
|
+
[n_plus_1_solution]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Migrations
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Create migration
|
|
130
|
+
[create_migration]
|
|
131
|
+
|
|
132
|
+
# Run migrations
|
|
133
|
+
[run_migrations]
|
|
134
|
+
|
|
135
|
+
# Rollback
|
|
136
|
+
[rollback_migration]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Rules**:
|
|
140
|
+
- Always include rollback
|
|
141
|
+
- Test on copy of prod data
|
|
142
|
+
- Never modify existing migrations
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Raw Queries
|
|
147
|
+
|
|
148
|
+
```[language]
|
|
149
|
+
# ALWAYS parameterized - Source: [file:lines]
|
|
150
|
+
[parameterized_query]
|
|
151
|
+
|
|
152
|
+
# NEVER string interpolation (SQL injection!)
|
|
153
|
+
[bad_query_example]
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Best Practices
|
|
159
|
+
|
|
160
|
+
| ✅ DO | ❌ DON'T |
|
|
161
|
+
|-------|----------|
|
|
162
|
+
| Use parameterized queries | String interpolation in SQL |
|
|
163
|
+
| Close connections | Leave connections open |
|
|
164
|
+
| Use transactions for multi-step writes | Individual commits |
|
|
165
|
+
| Add indexes to queried columns | Index everything |
|
|
166
|
+
| Eager load when needed | Lazy load always (N+1) |
|
|
167
|
+
|
|
168
|
+
---
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Development Practices
|
|
2
|
+
|
|
3
|
+
## Quick Summary
|
|
4
|
+
|
|
5
|
+
Core development practices for [PROJECT_NAME]: error handling, logging, and configuration patterns.
|
|
6
|
+
|
|
7
|
+
**Category**: Development
|
|
8
|
+
**Complexity**: Medium
|
|
9
|
+
**Prerequisites**: [LANGUAGE] fundamentals, [FRAMEWORK]
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🚨 SIZE LIMIT WARNING
|
|
14
|
+
|
|
15
|
+
**This generated guide MUST be 200-400 lines maximum.**
|
|
16
|
+
|
|
17
|
+
**When filling this template**:
|
|
18
|
+
- ✅ Code examples: 5-15 lines (NEVER > 20)
|
|
19
|
+
- ✅ ONE example per pattern
|
|
20
|
+
- ✅ Use file:line references, not full code
|
|
21
|
+
- ✅ Use tables for multiple patterns
|
|
22
|
+
- ❌ NO multiple examples for same pattern
|
|
23
|
+
- ❌ NO verbose explanations
|
|
24
|
+
- ❌ NO copying entire functions
|
|
25
|
+
|
|
26
|
+
**Validate line count after generation**: `wc -l [this-file]`
|
|
27
|
+
**If > 400 lines**: Condense immediately before continuing!
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Error Handling
|
|
32
|
+
|
|
33
|
+
### Exception Hierarchy
|
|
34
|
+
|
|
35
|
+
| Exception | When to Use | HTTP Status | Source |
|
|
36
|
+
|-----------|-------------|-------------|--------|
|
|
37
|
+
| `[ValidationError]` | Invalid input | 400 | [file:lines] |
|
|
38
|
+
| `[NotFoundError]` | Resource missing | 404 | [file:lines] |
|
|
39
|
+
| `[AuthError]` | Auth failed | 401/403 | [file:lines] |
|
|
40
|
+
| `[ServerError]` | Internal error | 500 | [file:lines] |
|
|
41
|
+
|
|
42
|
+
### Pattern: Raise & Handle
|
|
43
|
+
|
|
44
|
+
```[language]
|
|
45
|
+
# Raise - Source: [file:lines]
|
|
46
|
+
[raise_example]
|
|
47
|
+
|
|
48
|
+
# Handle - Source: [file:lines]
|
|
49
|
+
[handler_example]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Error Response Format
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"error": {
|
|
57
|
+
"code": "[ERROR_CODE]",
|
|
58
|
+
"message": "[human-readable]",
|
|
59
|
+
"details": "[context]"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Rules**:
|
|
65
|
+
- ✅ Specific exceptions (not bare `except:`)
|
|
66
|
+
- ✅ Log with context
|
|
67
|
+
- ✅ Return consistent format
|
|
68
|
+
- ❌ Expose internal details
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Logging
|
|
73
|
+
|
|
74
|
+
### Configuration
|
|
75
|
+
|
|
76
|
+
```[language]
|
|
77
|
+
# Source: [file:lines]
|
|
78
|
+
[logging_config]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Log Levels
|
|
82
|
+
|
|
83
|
+
| Level | When | Example |
|
|
84
|
+
|-------|------|---------|
|
|
85
|
+
| DEBUG | Development details | `[example]` |
|
|
86
|
+
| INFO | Normal operations | `[example]` |
|
|
87
|
+
| WARNING | Recoverable issues | `[example]` |
|
|
88
|
+
| ERROR | Failures | `[example]` |
|
|
89
|
+
|
|
90
|
+
### Pattern: Structured Logging
|
|
91
|
+
|
|
92
|
+
```[language]
|
|
93
|
+
# Good - Source: [file:lines]
|
|
94
|
+
[good_logging]
|
|
95
|
+
|
|
96
|
+
# Bad
|
|
97
|
+
[bad_logging]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Rules**:
|
|
101
|
+
- ✅ Include context (user_id, request_id, etc.)
|
|
102
|
+
- ✅ Use appropriate levels
|
|
103
|
+
- ❌ Log secrets/PII
|
|
104
|
+
- ❌ Log in hot paths
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Configuration
|
|
109
|
+
|
|
110
|
+
### Environment Variables
|
|
111
|
+
|
|
112
|
+
**Required**:
|
|
113
|
+
```bash
|
|
114
|
+
[VAR1]=[description]
|
|
115
|
+
[VAR2]=[description]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Optional** (with defaults):
|
|
119
|
+
```bash
|
|
120
|
+
[VAR3]=[description] # default: [value]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Pattern: Load Config
|
|
124
|
+
|
|
125
|
+
```[language]
|
|
126
|
+
# Source: [file:lines]
|
|
127
|
+
[config_loading]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Multi-Environment
|
|
131
|
+
|
|
132
|
+
```[language]
|
|
133
|
+
# Source: [file:lines]
|
|
134
|
+
[env_detection]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Environments**: development | staging | production
|
|
138
|
+
|
|
139
|
+
**Rules**:
|
|
140
|
+
- ✅ Use env vars for deployment-specific config
|
|
141
|
+
- ✅ Validate at startup
|
|
142
|
+
- ✅ Never commit `.env` files
|
|
143
|
+
- ❌ Hardcode secrets
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Setup Guide
|
|
148
|
+
|
|
149
|
+
### Quick Start
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Install
|
|
153
|
+
[install_command]
|
|
154
|
+
|
|
155
|
+
# Configure
|
|
156
|
+
[config_command]
|
|
157
|
+
|
|
158
|
+
# Run
|
|
159
|
+
[run_command]
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Environment Setup
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# 1. Activate environment
|
|
166
|
+
[activate_command]
|
|
167
|
+
|
|
168
|
+
# 2. Install dependencies
|
|
169
|
+
[dependency_command]
|
|
170
|
+
|
|
171
|
+
# 3. Setup database (if needed)
|
|
172
|
+
[db_setup_command]
|
|
173
|
+
|
|
174
|
+
# 4. Run
|
|
175
|
+
[dev_server_command]
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Verify**: [URL or command to verify setup]
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Common Commands
|
|
183
|
+
|
|
184
|
+
| Task | Command | Notes |
|
|
185
|
+
|------|---------|-------|
|
|
186
|
+
| Run dev | `[command]` | [Notes] |
|
|
187
|
+
| Lint | `[command]` | Auto-fix with `[fix_flag]` |
|
|
188
|
+
| Format | `[command]` | [Notes] |
|
|
189
|
+
| Test | `[command]` | ONLY if user requests |
|
|
190
|
+
| Build | `[command]` | [Notes] |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Troubleshooting
|
|
195
|
+
|
|
196
|
+
| Symptom | Likely Cause | Fix |
|
|
197
|
+
|---------|--------------|-----|
|
|
198
|
+
| [error_pattern] | [cause] | [solution] |
|
|
199
|
+
| [error_pattern] | [cause] | [solution] |
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## References
|
|
204
|
+
|
|
205
|
+
- **Error Handling**: `[path/to/exceptions]`
|
|
206
|
+
- **Logging Config**: `[path/to/logging/config]`
|
|
207
|
+
- **Configuration**: `[path/to/config]`
|
|
208
|
+
- **Setup Docs**: `README.md`
|
|
209
|
+
|
|
210
|
+
---
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# External Integrations
|
|
2
|
+
|
|
3
|
+
## Quick Summary
|
|
4
|
+
|
|
5
|
+
External service integration patterns for [PROJECT_NAME]: API clients, authentication, retries, and error handling.
|
|
6
|
+
|
|
7
|
+
**Category**: Integration
|
|
8
|
+
**Complexity**: Medium-High
|
|
9
|
+
**Prerequisites**: HTTP clients, async/await, API fundamentals
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 🚨 SIZE LIMIT WARNING
|
|
14
|
+
|
|
15
|
+
**This generated guide MUST be 200-400 lines maximum.**
|
|
16
|
+
|
|
17
|
+
**When filling this template**:
|
|
18
|
+
- ✅ Code examples: 5-15 lines (NEVER > 20)
|
|
19
|
+
- ✅ ONE example per pattern
|
|
20
|
+
- ✅ Use file:line references, not full code
|
|
21
|
+
- ✅ Use tables for multiple patterns
|
|
22
|
+
- ❌ NO multiple examples for same pattern
|
|
23
|
+
- ❌ NO verbose explanations
|
|
24
|
+
- ❌ NO copying entire functions
|
|
25
|
+
|
|
26
|
+
**Validate line count after generation**: `wc -l [this-file]`
|
|
27
|
+
**If > 400 lines**: Condense immediately before continuing!
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Integrated Services
|
|
32
|
+
|
|
33
|
+
| Service | Purpose | Auth | Source |
|
|
34
|
+
|---------|---------|------|--------|
|
|
35
|
+
| [Service1] | [Purpose] | [Method] | [file:lines] |
|
|
36
|
+
| [Service2] | [Purpose] | [Method] | [file:lines] |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Client Pattern
|
|
41
|
+
|
|
42
|
+
```[language]
|
|
43
|
+
# Source: [file:lines]
|
|
44
|
+
[client_class]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Components**: Base URL, auth, retries, timeouts
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Authentication
|
|
52
|
+
|
|
53
|
+
### API Key
|
|
54
|
+
|
|
55
|
+
```[language]
|
|
56
|
+
# Source: [file:lines]
|
|
57
|
+
[api_key_auth]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### OAuth2
|
|
61
|
+
|
|
62
|
+
```[language]
|
|
63
|
+
# Source: [file:lines]
|
|
64
|
+
[oauth2_auth]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Token Management**: Store securely, refresh before expiry
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Error Handling
|
|
72
|
+
|
|
73
|
+
```[language]
|
|
74
|
+
# Source: [file:lines]
|
|
75
|
+
[error_handling]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
| Status | Action |
|
|
79
|
+
|--------|--------|
|
|
80
|
+
| 4xx | Log, don't retry (usually) |
|
|
81
|
+
| 5xx | Log, retry with backoff |
|
|
82
|
+
| Timeout | Retry with backoff |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Retry Logic
|
|
87
|
+
|
|
88
|
+
```[language]
|
|
89
|
+
# Source: [file:lines]
|
|
90
|
+
[retry_pattern]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Strategy**: Exponential backoff
|
|
94
|
+
**Max Retries**: [N]
|
|
95
|
+
**When**: 5xx, timeouts, connection errors
|
|
96
|
+
**When Not**: 4xx (usually), auth failures
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Rate Limiting
|
|
101
|
+
|
|
102
|
+
```[language]
|
|
103
|
+
# Source: [file:lines]
|
|
104
|
+
[rate_limit]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Headers**: `X-RateLimit-*`, `Retry-After`
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Timeouts
|
|
112
|
+
|
|
113
|
+
```[language]
|
|
114
|
+
# Source: [file:lines]
|
|
115
|
+
[timeout_config]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Types**: Connection | Read | Total
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Best Practices
|
|
123
|
+
|
|
124
|
+
| ✅ DO | ❌ DON'T |
|
|
125
|
+
|-------|----------|
|
|
126
|
+
| Retry with backoff | Infinite retries |
|
|
127
|
+
| Set timeouts | Wait forever |
|
|
128
|
+
| Log external calls | Silent failures |
|
|
129
|
+
| Cache when possible | Call repeatedly |
|
|
130
|
+
| Store secrets securely | Hardcode API keys |
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Security
|
|
135
|
+
|
|
136
|
+
- ✅ Env vars / secrets manager
|
|
137
|
+
- ✅ HTTPS only
|
|
138
|
+
- ✅ Validate TLS certs
|
|
139
|
+
- ❌ Log API keys
|
|
140
|
+
- ❌ Ignore cert errors
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Testing
|
|
145
|
+
|
|
146
|
+
```[language]
|
|
147
|
+
# Source: [test_file:lines]
|
|
148
|
+
[mock_example]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Strategy**: Mock in unit tests, use test APIs in integration tests
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## References
|
|
156
|
+
|
|
157
|
+
- **Clients**: `[path/to/clients]`
|
|
158
|
+
- **Service Docs**: [Links]
|
|
159
|
+
|
|
160
|
+
---
|