@ginkoai/cli 1.0.0 → 1.4.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 +19 -0
- package/dist/analysis/project-analyzer.d.ts.map +1 -1
- package/dist/analysis/project-analyzer.js +68 -4
- package/dist/analysis/project-analyzer.js.map +1 -1
- package/dist/commands/architecture/architecture-pipeline-enhanced.d.ts.map +1 -1
- package/dist/commands/architecture/architecture-pipeline-enhanced.js +10 -6
- package/dist/commands/architecture/architecture-pipeline-enhanced.js.map +1 -1
- package/dist/commands/backlog/base.d.ts.map +1 -1
- package/dist/commands/backlog/base.js +3 -0
- package/dist/commands/backlog/base.js.map +1 -1
- package/dist/commands/backlog/create.js +20 -20
- package/dist/commands/backlog/create.js.map +1 -1
- package/dist/commands/backlog/index.d.ts.map +1 -1
- package/dist/commands/backlog/index.js +6 -1
- package/dist/commands/backlog/index.js.map +1 -1
- package/dist/commands/changelog/changelog-reflection.d.ts.map +1 -1
- package/dist/commands/changelog/changelog-reflection.js +7 -3
- package/dist/commands/changelog/changelog-reflection.js.map +1 -1
- package/dist/commands/charter.d.ts +28 -0
- package/dist/commands/charter.d.ts.map +1 -0
- package/dist/commands/charter.js +434 -0
- package/dist/commands/charter.js.map +1 -0
- package/dist/commands/documentation/documentation-pipeline.d.ts.map +1 -1
- package/dist/commands/documentation/documentation-pipeline.js +15 -7
- package/dist/commands/documentation/documentation-pipeline.js.map +1 -1
- package/dist/commands/git/git-pipeline.d.ts.map +1 -1
- package/dist/commands/git/git-pipeline.js +3 -2
- package/dist/commands/git/git-pipeline.js.map +1 -1
- package/dist/commands/graph/api-client.d.ts +212 -0
- package/dist/commands/graph/api-client.d.ts.map +1 -0
- package/dist/commands/graph/api-client.js +143 -0
- package/dist/commands/graph/api-client.js.map +1 -0
- package/dist/commands/graph/config.d.ts +82 -0
- package/dist/commands/graph/config.d.ts.map +1 -0
- package/dist/commands/graph/config.js +113 -0
- package/dist/commands/graph/config.js.map +1 -0
- package/dist/commands/graph/explore.d.ts +19 -0
- package/dist/commands/graph/explore.d.ts.map +1 -0
- package/dist/commands/graph/explore.js +117 -0
- package/dist/commands/graph/explore.js.map +1 -0
- package/dist/commands/graph/index.d.ts +17 -0
- package/dist/commands/graph/index.d.ts.map +1 -0
- package/dist/commands/graph/index.js +104 -0
- package/dist/commands/graph/index.js.map +1 -0
- package/dist/commands/graph/init.d.ts +21 -0
- package/dist/commands/graph/init.d.ts.map +1 -0
- package/dist/commands/graph/init.js +173 -0
- package/dist/commands/graph/init.js.map +1 -0
- package/dist/commands/graph/load.d.ts +21 -0
- package/dist/commands/graph/load.d.ts.map +1 -0
- package/dist/commands/graph/load.js +224 -0
- package/dist/commands/graph/load.js.map +1 -0
- package/dist/commands/graph/query.d.ts +23 -0
- package/dist/commands/graph/query.d.ts.map +1 -0
- package/dist/commands/graph/query.js +145 -0
- package/dist/commands/graph/query.js.map +1 -0
- package/dist/commands/graph/status.d.ts +15 -0
- package/dist/commands/graph/status.d.ts.map +1 -0
- package/dist/commands/graph/status.js +88 -0
- package/dist/commands/graph/status.js.map +1 -0
- package/dist/commands/handoff.d.ts +14 -5
- package/dist/commands/handoff.d.ts.map +1 -1
- package/dist/commands/handoff.js +84 -142
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +88 -41
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/knowledge/create.d.ts +24 -0
- package/dist/commands/knowledge/create.d.ts.map +1 -0
- package/dist/commands/knowledge/create.js +180 -0
- package/dist/commands/knowledge/create.js.map +1 -0
- package/dist/commands/knowledge/graph.d.ts +21 -0
- package/dist/commands/knowledge/graph.d.ts.map +1 -0
- package/dist/commands/knowledge/graph.js +199 -0
- package/dist/commands/knowledge/graph.js.map +1 -0
- package/dist/commands/knowledge/index.d.ts +25 -0
- package/dist/commands/knowledge/index.d.ts.map +1 -0
- package/dist/commands/knowledge/index.js +121 -0
- package/dist/commands/knowledge/index.js.map +1 -0
- package/dist/commands/knowledge/search.d.ts +23 -0
- package/dist/commands/knowledge/search.d.ts.map +1 -0
- package/dist/commands/knowledge/search.js +157 -0
- package/dist/commands/knowledge/search.js.map +1 -0
- package/dist/commands/knowledge/sync.d.ts +28 -0
- package/dist/commands/knowledge/sync.d.ts.map +1 -0
- package/dist/commands/knowledge/sync.js +251 -0
- package/dist/commands/knowledge/sync.js.map +1 -0
- package/dist/commands/log.d.ts +32 -0
- package/dist/commands/log.d.ts.map +1 -0
- package/dist/commands/log.js +632 -0
- package/dist/commands/log.js.map +1 -0
- package/dist/commands/login.d.ts +27 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +177 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +15 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +31 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/project/create.d.ts +22 -0
- package/dist/commands/project/create.d.ts.map +1 -0
- package/dist/commands/project/create.js +69 -0
- package/dist/commands/project/create.js.map +1 -0
- package/dist/commands/project/delete.d.ts +19 -0
- package/dist/commands/project/delete.d.ts.map +1 -0
- package/dist/commands/project/delete.js +73 -0
- package/dist/commands/project/delete.js.map +1 -0
- package/dist/commands/project/index.d.ts +22 -0
- package/dist/commands/project/index.d.ts.map +1 -0
- package/dist/commands/project/index.js +134 -0
- package/dist/commands/project/index.js.map +1 -0
- package/dist/commands/project/info.d.ts +15 -0
- package/dist/commands/project/info.d.ts.map +1 -0
- package/dist/commands/project/info.js +92 -0
- package/dist/commands/project/info.js.map +1 -0
- package/dist/commands/project/list.d.ts +20 -0
- package/dist/commands/project/list.d.ts.map +1 -0
- package/dist/commands/project/list.js +82 -0
- package/dist/commands/project/list.js.map +1 -0
- package/dist/commands/project/members.d.ts +27 -0
- package/dist/commands/project/members.d.ts.map +1 -0
- package/dist/commands/project/members.js +140 -0
- package/dist/commands/project/members.js.map +1 -0
- package/dist/commands/project/update.d.ts +24 -0
- package/dist/commands/project/update.d.ts.map +1 -0
- package/dist/commands/project/update.js +83 -0
- package/dist/commands/project/update.js.map +1 -0
- package/dist/commands/reflect.js +0 -3
- package/dist/commands/reflect.js.map +1 -1
- package/dist/commands/ship.d.ts +3 -1
- package/dist/commands/ship.d.ts.map +1 -1
- package/dist/commands/ship.js +100 -9
- package/dist/commands/ship.js.map +1 -1
- package/dist/commands/start/index.d.ts.map +1 -1
- package/dist/commands/start/index.js +5 -3
- package/dist/commands/start/index.js.map +1 -1
- package/dist/commands/start/start-reflection.d.ts +2 -1
- package/dist/commands/start/start-reflection.d.ts.map +1 -1
- package/dist/commands/start/start-reflection.js +265 -43
- package/dist/commands/start/start-reflection.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +41 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/team/create.d.ts +15 -0
- package/dist/commands/team/create.d.ts.map +1 -0
- package/dist/commands/team/create.js +48 -0
- package/dist/commands/team/create.js.map +1 -0
- package/dist/commands/team/index.d.ts +22 -0
- package/dist/commands/team/index.d.ts.map +1 -0
- package/dist/commands/team/index.js +109 -0
- package/dist/commands/team/index.js.map +1 -0
- package/dist/commands/team/list.d.ts +15 -0
- package/dist/commands/team/list.d.ts.map +1 -0
- package/dist/commands/team/list.js +67 -0
- package/dist/commands/team/list.js.map +1 -0
- package/dist/commands/team/members.d.ts +27 -0
- package/dist/commands/team/members.d.ts.map +1 -0
- package/dist/commands/team/members.js +135 -0
- package/dist/commands/team/members.js.map +1 -0
- package/dist/commands/team/projects.d.ts +19 -0
- package/dist/commands/team/projects.d.ts.map +1 -0
- package/dist/commands/team/projects.js +107 -0
- package/dist/commands/team/projects.js.map +1 -0
- package/dist/commands/team.d.ts +22 -0
- package/dist/commands/team.d.ts.map +1 -0
- package/dist/commands/team.js +238 -0
- package/dist/commands/team.js.map +1 -0
- package/dist/commands/testing/testing-pipeline-enhanced.d.ts.map +1 -1
- package/dist/commands/testing/testing-pipeline-enhanced.js +5 -3
- package/dist/commands/testing/testing-pipeline-enhanced.js.map +1 -1
- package/dist/commands/testing/testing-pipeline.d.ts.map +1 -1
- package/dist/commands/testing/testing-pipeline.js +5 -3
- package/dist/commands/testing/testing-pipeline.js.map +1 -1
- package/dist/commands/whoami.d.ts +15 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +38 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/core/reflection-pattern.d.ts +1 -1
- package/dist/core/reflection-pattern.d.ts.map +1 -1
- package/dist/core/reflection-pattern.js +2 -12
- package/dist/core/reflection-pattern.js.map +1 -1
- package/dist/core/session-log-manager.d.ts +44 -4
- package/dist/core/session-log-manager.d.ts.map +1 -1
- package/dist/core/session-log-manager.js +132 -31
- package/dist/core/session-log-manager.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +116 -17
- package/dist/index.js.map +1 -1
- package/dist/lib/api/projects-client.d.ts +119 -0
- package/dist/lib/api/projects-client.d.ts.map +1 -0
- package/dist/lib/api/projects-client.js +125 -0
- package/dist/lib/api/projects-client.js.map +1 -0
- package/dist/lib/api/teams-client.d.ts +73 -0
- package/dist/lib/api/teams-client.d.ts.map +1 -0
- package/dist/lib/api/teams-client.js +68 -0
- package/dist/lib/api/teams-client.js.map +1 -0
- package/dist/lib/charter/charter-editor.d.ts +60 -0
- package/dist/lib/charter/charter-editor.d.ts.map +1 -0
- package/dist/lib/charter/charter-editor.js +559 -0
- package/dist/lib/charter/charter-editor.js.map +1 -0
- package/dist/lib/charter/charter-storage.d.ts +92 -0
- package/dist/lib/charter/charter-storage.d.ts.map +1 -0
- package/dist/lib/charter/charter-storage.js +501 -0
- package/dist/lib/charter/charter-storage.js.map +1 -0
- package/dist/lib/charter/charter-synthesizer.d.ts +94 -0
- package/dist/lib/charter/charter-synthesizer.d.ts.map +1 -0
- package/dist/lib/charter/charter-synthesizer.js +521 -0
- package/dist/lib/charter/charter-synthesizer.js.map +1 -0
- package/dist/lib/charter/charter-versioning.d.ts +57 -0
- package/dist/lib/charter/charter-versioning.d.ts.map +1 -0
- package/dist/lib/charter/charter-versioning.js +283 -0
- package/dist/lib/charter/charter-versioning.js.map +1 -0
- package/dist/lib/charter/confidence-scorer.d.ts +263 -0
- package/dist/lib/charter/confidence-scorer.d.ts.map +1 -0
- package/dist/lib/charter/confidence-scorer.js +737 -0
- package/dist/lib/charter/confidence-scorer.js.map +1 -0
- package/dist/lib/charter/conversation-context.d.ts +99 -0
- package/dist/lib/charter/conversation-context.d.ts.map +1 -0
- package/dist/lib/charter/conversation-context.js +297 -0
- package/dist/lib/charter/conversation-context.js.map +1 -0
- package/dist/lib/charter/conversation-facilitator.d.ts +117 -0
- package/dist/lib/charter/conversation-facilitator.d.ts.map +1 -0
- package/dist/lib/charter/conversation-facilitator.js +360 -0
- package/dist/lib/charter/conversation-facilitator.js.map +1 -0
- package/dist/lib/charter/question-templates.d.ts +82 -0
- package/dist/lib/charter/question-templates.d.ts.map +1 -0
- package/dist/lib/charter/question-templates.js +355 -0
- package/dist/lib/charter/question-templates.js.map +1 -0
- package/dist/lib/charter/signal-detection.d.ts +49 -0
- package/dist/lib/charter/signal-detection.d.ts.map +1 -0
- package/dist/lib/charter/signal-detection.js +338 -0
- package/dist/lib/charter/signal-detection.js.map +1 -0
- package/dist/lib/context-loader-events.d.ts +111 -0
- package/dist/lib/context-loader-events.d.ts.map +1 -0
- package/dist/lib/context-loader-events.js +475 -0
- package/dist/lib/context-loader-events.js.map +1 -0
- package/dist/lib/event-logger.d.ts +64 -0
- package/dist/lib/event-logger.d.ts.map +1 -0
- package/dist/lib/event-logger.js +197 -0
- package/dist/lib/event-logger.js.map +1 -0
- package/dist/lib/event-queue.d.ts +104 -0
- package/dist/lib/event-queue.d.ts.map +1 -0
- package/dist/lib/event-queue.js +274 -0
- package/dist/lib/event-queue.js.map +1 -0
- package/dist/lib/session-cursor.d.ts +80 -0
- package/dist/lib/session-cursor.d.ts.map +1 -0
- package/dist/lib/session-cursor.js +250 -0
- package/dist/lib/session-cursor.js.map +1 -0
- package/dist/lib/sync/conflict-detector.d.ts +41 -0
- package/dist/lib/sync/conflict-detector.d.ts.map +1 -0
- package/dist/lib/sync/conflict-detector.js +124 -0
- package/dist/lib/sync/conflict-detector.js.map +1 -0
- package/dist/lib/sync/logger.d.ts +89 -0
- package/dist/lib/sync/logger.d.ts.map +1 -0
- package/dist/lib/sync/logger.js +202 -0
- package/dist/lib/sync/logger.js.map +1 -0
- package/dist/lib/sync/parser.d.ts +32 -0
- package/dist/lib/sync/parser.d.ts.map +1 -0
- package/dist/lib/sync/parser.js +180 -0
- package/dist/lib/sync/parser.js.map +1 -0
- package/dist/lib/sync/scanner.d.ts +34 -0
- package/dist/lib/sync/scanner.d.ts.map +1 -0
- package/dist/lib/sync/scanner.js +97 -0
- package/dist/lib/sync/scanner.js.map +1 -0
- package/dist/lib/sync/uploader.d.ts +33 -0
- package/dist/lib/sync/uploader.d.ts.map +1 -0
- package/dist/lib/sync/uploader.js +188 -0
- package/dist/lib/sync/uploader.js.map +1 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.d.ts +77 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.d.ts.map +1 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.js +178 -0
- package/dist/lib/write-dispatcher/adapters/graph-adapter.js.map +1 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.d.ts +133 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.d.ts.map +1 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.js +324 -0
- package/dist/lib/write-dispatcher/adapters/local-adapter.js.map +1 -0
- package/dist/lib/write-dispatcher/write-dispatcher.d.ts +151 -0
- package/dist/lib/write-dispatcher/write-dispatcher.d.ts.map +1 -0
- package/dist/lib/write-dispatcher/write-dispatcher.js +197 -0
- package/dist/lib/write-dispatcher/write-dispatcher.js.map +1 -0
- package/dist/types/charter.d.ts +330 -0
- package/dist/types/charter.d.ts.map +1 -0
- package/dist/types/charter.js +76 -0
- package/dist/types/charter.js.map +1 -0
- package/dist/types/config.d.ts +65 -17
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +50 -21
- package/dist/types/config.js.map +1 -1
- package/dist/utils/api-client.d.ts +36 -0
- package/dist/utils/api-client.d.ts.map +1 -0
- package/dist/utils/api-client.js +97 -0
- package/dist/utils/api-client.js.map +1 -0
- package/dist/utils/auth-storage.d.ts +56 -0
- package/dist/utils/auth-storage.d.ts.map +1 -0
- package/dist/utils/auth-storage.js +133 -0
- package/dist/utils/auth-storage.js.map +1 -0
- package/dist/utils/cleanup.d.ts +21 -0
- package/dist/utils/cleanup.d.ts.map +1 -0
- package/dist/utils/cleanup.js +122 -0
- package/dist/utils/cleanup.js.map +1 -0
- package/dist/utils/config-loader.d.ts +76 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-loader.js +269 -0
- package/dist/utils/config-loader.js.map +1 -0
- package/dist/utils/context-loader.d.ts +154 -0
- package/dist/utils/context-loader.d.ts.map +1 -0
- package/dist/utils/context-loader.js +411 -0
- package/dist/utils/context-loader.js.map +1 -0
- package/dist/utils/dispatcher-logger.d.ts +30 -0
- package/dist/utils/dispatcher-logger.d.ts.map +1 -0
- package/dist/utils/dispatcher-logger.js +128 -0
- package/dist/utils/dispatcher-logger.js.map +1 -0
- package/dist/utils/ginko-root.d.ts +3 -2
- package/dist/utils/ginko-root.d.ts.map +1 -1
- package/dist/utils/ginko-root.js +35 -2
- package/dist/utils/ginko-root.js.map +1 -1
- package/dist/utils/helpers.d.ts +1 -0
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +3 -0
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/log-quality.d.ts +55 -0
- package/dist/utils/log-quality.d.ts.map +1 -0
- package/dist/utils/log-quality.js +297 -0
- package/dist/utils/log-quality.js.map +1 -0
- package/dist/utils/reference-parser.d.ts +164 -0
- package/dist/utils/reference-parser.d.ts.map +1 -0
- package/dist/utils/reference-parser.js +363 -0
- package/dist/utils/reference-parser.js.map +1 -0
- package/dist/utils/synthesis.d.ts +180 -0
- package/dist/utils/synthesis.d.ts.map +1 -0
- package/dist/utils/synthesis.js +724 -0
- package/dist/utils/synthesis.js.map +1 -0
- package/dist/utils/team-awareness.d.ts +127 -0
- package/dist/utils/team-awareness.d.ts.map +1 -0
- package/dist/utils/team-awareness.js +385 -0
- package/dist/utils/team-awareness.js.map +1 -0
- package/package.json +6 -4
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts +0 -106
- package/dist/commands/handoff/handoff-reflection-pipeline.d.ts.map +0 -1
- package/dist/commands/handoff/handoff-reflection-pipeline.js +0 -534
- package/dist/commands/handoff/handoff-reflection-pipeline.js.map +0 -1
- package/dist/commands/handoff/handoff-save.d.ts +0 -16
- package/dist/commands/handoff/handoff-save.d.ts.map +0 -1
- package/dist/commands/handoff/handoff-save.js +0 -72
- package/dist/commands/handoff/handoff-save.js.map +0 -1
- package/dist/commands/handoff/index.d.ts +0 -19
- package/dist/commands/handoff/index.d.ts.map +0 -1
- package/dist/commands/handoff/index.js +0 -55
- package/dist/commands/handoff/index.js.map +0 -1
- package/dist/commands/handoff-ai-orig.d.ts +0 -27
- package/dist/commands/handoff-ai-orig.d.ts.map +0 -1
- package/dist/commands/handoff-ai-orig.js +0 -405
- package/dist/commands/handoff-ai-orig.js.map +0 -1
- package/dist/commands/handoff-ai.d.ts +0 -27
- package/dist/commands/handoff-ai.d.ts.map +0 -1
- package/dist/commands/handoff-ai.js +0 -405
- package/dist/commands/handoff-ai.js.map +0 -1
- package/dist/commands/handoff-enhanced-orig.d.ts +0 -25
- package/dist/commands/handoff-enhanced-orig.d.ts.map +0 -1
- package/dist/commands/handoff-enhanced-orig.js +0 -349
- package/dist/commands/handoff-enhanced-orig.js.map +0 -1
- package/dist/commands/handoff-enhanced.d.ts +0 -25
- package/dist/commands/handoff-enhanced.d.ts.map +0 -1
- package/dist/commands/handoff-enhanced.js +0 -349
- package/dist/commands/handoff-enhanced.js.map +0 -1
- package/dist/commands/handoff-orig.d.ts +0 -10
- package/dist/commands/handoff-orig.d.ts.map +0 -1
- package/dist/commands/handoff-orig.js +0 -167
- package/dist/commands/handoff-orig.js.map +0 -1
- package/dist/commands/init-enhanced.d.ts +0 -20
- package/dist/commands/init-enhanced.d.ts.map +0 -1
- package/dist/commands/init-enhanced.js +0 -430
- package/dist/commands/init-enhanced.js.map +0 -1
- package/dist/commands/prd/prd-reflection-enhanced.d.ts +0 -63
- package/dist/commands/prd/prd-reflection-enhanced.d.ts.map +0 -1
- package/dist/commands/prd/prd-reflection-enhanced.js +0 -310
- package/dist/commands/prd/prd-reflection-enhanced.js.map +0 -1
- package/dist/commands/start-enhanced.d.ts +0 -19
- package/dist/commands/start-enhanced.d.ts.map +0 -1
- package/dist/commands/start-enhanced.js +0 -434
- package/dist/commands/start-enhanced.js.map +0 -1
- package/dist/commands/start.d.ts +0 -10
- package/dist/commands/start.d.ts.map +0 -1
- package/dist/commands/start.js +0 -119
- package/dist/commands/start.js.map +0 -1
- package/dist/core/config/config-aware-reflection.d.ts +0 -37
- package/dist/core/config/config-aware-reflection.d.ts.map +0 -1
- package/dist/core/config/config-aware-reflection.js +0 -97
- package/dist/core/config/config-aware-reflection.js.map +0 -1
- package/dist/core/config/config-loader.d.ts +0 -154
- package/dist/core/config/config-loader.d.ts.map +0 -1
- package/dist/core/config/config-loader.js +0 -424
- package/dist/core/config/config-loader.js.map +0 -1
- package/dist/core/config/config-migrator.d.ts +0 -150
- package/dist/core/config/config-migrator.d.ts.map +0 -1
- package/dist/core/config/config-migrator.js +0 -423
- package/dist/core/config/config-migrator.js.map +0 -1
- package/dist/core/config/config-schema.d.ts +0 -276
- package/dist/core/config/config-schema.d.ts.map +0 -1
- package/dist/core/config/config-schema.js +0 -277
- package/dist/core/config/config-schema.js.map +0 -1
- package/dist/core/config/index.d.ts +0 -260
- package/dist/core/config/index.d.ts.map +0 -1
- package/dist/core/config/index.js +0 -283
- package/dist/core/config/index.js.map +0 -1
- package/dist/core/config/interactive-config.d.ts +0 -76
- package/dist/core/config/interactive-config.d.ts.map +0 -1
- package/dist/core/config/interactive-config.js +0 -315
- package/dist/core/config/interactive-config.js.map +0 -1
- package/dist/core/config/path-config.d.ts +0 -121
- package/dist/core/config/path-config.d.ts.map +0 -1
- package/dist/core/config/path-config.js +0 -210
- package/dist/core/config/path-config.js.map +0 -1
- package/dist/core/config/path-resolver.d.ts +0 -151
- package/dist/core/config/path-resolver.d.ts.map +0 -1
- package/dist/core/config/path-resolver.js +0 -343
- package/dist/core/config/path-resolver.js.map +0 -1
- package/dist/core/config/project-detector.d.ts +0 -58
- package/dist/core/config/project-detector.d.ts.map +0 -1
- package/dist/core/config/project-detector.js +0 -310
- package/dist/core/config/project-detector.js.map +0 -1
- package/dist/core/config-backup/config-aware-reflection.d.ts +0 -37
- package/dist/core/config-backup/config-aware-reflection.d.ts.map +0 -1
- package/dist/core/config-backup/config-aware-reflection.js +0 -97
- package/dist/core/config-backup/config-aware-reflection.js.map +0 -1
- package/dist/core/config-backup/config-loader.d.ts +0 -71
- package/dist/core/config-backup/config-loader.d.ts.map +0 -1
- package/dist/core/config-backup/config-loader.js +0 -288
- package/dist/core/config-backup/config-loader.js.map +0 -1
- package/dist/core/config-backup/interactive-config.d.ts +0 -76
- package/dist/core/config-backup/interactive-config.d.ts.map +0 -1
- package/dist/core/config-backup/interactive-config.js +0 -315
- package/dist/core/config-backup/interactive-config.js.map +0 -1
- package/dist/core/config-backup/path-config.d.ts +0 -121
- package/dist/core/config-backup/path-config.d.ts.map +0 -1
- package/dist/core/config-backup/path-config.js +0 -210
- package/dist/core/config-backup/path-config.js.map +0 -1
- package/dist/core/config-backup/project-detector.d.ts +0 -58
- package/dist/core/config-backup/project-detector.d.ts.map +0 -1
- package/dist/core/config-backup/project-detector.js +0 -310
- package/dist/core/config-backup/project-detector.js.map +0 -1
- package/dist/core/documents/document-manager.d.ts +0 -97
- package/dist/core/documents/document-manager.d.ts.map +0 -1
- package/dist/core/documents/document-manager.js +0 -441
- package/dist/core/documents/document-manager.js.map +0 -1
- package/dist/core/documents/document-migrator.d.ts +0 -138
- package/dist/core/documents/document-migrator.d.ts.map +0 -1
- package/dist/core/documents/document-migrator.js +0 -349
- package/dist/core/documents/document-migrator.js.map +0 -1
- package/dist/core/documents/document-namer.d.ts +0 -111
- package/dist/core/documents/document-namer.d.ts.map +0 -1
- package/dist/core/documents/document-namer.js +0 -225
- package/dist/core/documents/document-namer.js.map +0 -1
- package/dist/core/documents/examples.d.ts +0 -74
- package/dist/core/documents/examples.d.ts.map +0 -1
- package/dist/core/documents/examples.js +0 -273
- package/dist/core/documents/examples.js.map +0 -1
- package/dist/core/documents/file-system.d.ts +0 -93
- package/dist/core/documents/file-system.d.ts.map +0 -1
- package/dist/core/documents/file-system.js +0 -432
- package/dist/core/documents/file-system.js.map +0 -1
- package/dist/core/documents/index.d.ts +0 -97
- package/dist/core/documents/index.d.ts.map +0 -1
- package/dist/core/documents/index.js +0 -119
- package/dist/core/documents/index.js.map +0 -1
- package/dist/core/documents/markdown-processor.d.ts +0 -84
- package/dist/core/documents/markdown-processor.d.ts.map +0 -1
- package/dist/core/documents/markdown-processor.js +0 -302
- package/dist/core/documents/markdown-processor.js.map +0 -1
- package/dist/core/documents/sequence-manager.d.ts +0 -107
- package/dist/core/documents/sequence-manager.d.ts.map +0 -1
- package/dist/core/documents/sequence-manager.js +0 -246
- package/dist/core/documents/sequence-manager.js.map +0 -1
- package/dist/core/documents/template-engine.d.ts +0 -101
- package/dist/core/documents/template-engine.d.ts.map +0 -1
- package/dist/core/documents/template-engine.js +0 -440
- package/dist/core/documents/template-engine.js.map +0 -1
- package/dist/core/platform/hook-migration.d.ts +0 -73
- package/dist/core/platform/hook-migration.d.ts.map +0 -1
- package/dist/core/platform/hook-migration.js +0 -339
- package/dist/core/platform/hook-migration.js.map +0 -1
- package/dist/core/platform/hook-migrator.d.ts +0 -49
- package/dist/core/platform/hook-migrator.d.ts.map +0 -1
- package/dist/core/platform/hook-migrator.js +0 -305
- package/dist/core/platform/hook-migrator.js.map +0 -1
- package/dist/core/platform/path-resolver.d.ts +0 -120
- package/dist/core/platform/path-resolver.d.ts.map +0 -1
- package/dist/core/platform/path-resolver.js +0 -339
- package/dist/core/platform/path-resolver.js.map +0 -1
- package/dist/core/platform/platform-templates.d.ts +0 -62
- package/dist/core/platform/platform-templates.d.ts.map +0 -1
- package/dist/core/platform/platform-templates.js +0 -364
- package/dist/core/platform/platform-templates.js.map +0 -1
- package/dist/core/pressure-monitor.d.ts +0 -76
- package/dist/core/pressure-monitor.d.ts.map +0 -1
- package/dist/core/pressure-monitor.js +0 -156
- package/dist/core/pressure-monitor.js.map +0 -1
- package/dist/core/validators/git-validator.test.d.ts +0 -12
- package/dist/core/validators/git-validator.test.d.ts.map +0 -1
- package/dist/core/validators/git-validator.test.js +0 -40
- package/dist/core/validators/git-validator.test.js.map +0 -1
- package/dist/core/validators/temp_index.d.ts +0 -56
- package/dist/core/validators/temp_index.d.ts.map +0 -1
- package/dist/core/validators/temp_index.js +0 -94
- package/dist/core/validators/temp_index.js.map +0 -1
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileType: utility
|
|
3
|
-
* @status: current
|
|
4
|
-
* @updated: 2025-09-20
|
|
5
|
-
* @tags: [templates, hooks, platform, cross-platform, generation]
|
|
6
|
-
* @related: [platform-adapter.ts, hook-migrator.ts, types.ts]
|
|
7
|
-
* @priority: high
|
|
8
|
-
* @complexity: low
|
|
9
|
-
* @dependencies: []
|
|
10
|
-
*/
|
|
11
|
-
export class PlatformTemplates {
|
|
12
|
-
/**
|
|
13
|
-
* Get all available hook templates for a platform
|
|
14
|
-
*/
|
|
15
|
-
getHookTemplates(platform) {
|
|
16
|
-
switch (platform) {
|
|
17
|
-
case 'windows':
|
|
18
|
-
return this.getWindowsTemplates();
|
|
19
|
-
case 'macos':
|
|
20
|
-
case 'linux':
|
|
21
|
-
return this.getUnixTemplates();
|
|
22
|
-
default:
|
|
23
|
-
return this.getUnixTemplates();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Get specific hook template by name and platform
|
|
28
|
-
*/
|
|
29
|
-
getHookTemplate(name, platform) {
|
|
30
|
-
const templates = this.getHookTemplates(platform);
|
|
31
|
-
return templates.find(template => template.name === name) || null;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Generate hook content for specific platform
|
|
35
|
-
*/
|
|
36
|
-
generateHookContent(hookName, platform, customContent) {
|
|
37
|
-
const template = this.getHookTemplate(hookName, platform);
|
|
38
|
-
if (template) {
|
|
39
|
-
return customContent ? this.insertCustomContent(template.content, customContent) : template.content;
|
|
40
|
-
}
|
|
41
|
-
// Return basic template if specific hook not found
|
|
42
|
-
return this.getBasicTemplate(hookName, platform, customContent);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Windows batch templates
|
|
46
|
-
*/
|
|
47
|
-
getWindowsTemplates() {
|
|
48
|
-
return [
|
|
49
|
-
{
|
|
50
|
-
name: 'post_tool_use',
|
|
51
|
-
platform: 'windows',
|
|
52
|
-
executable: true,
|
|
53
|
-
description: 'Windows post-tool-use hook for ginko integration',
|
|
54
|
-
content: `@echo off
|
|
55
|
-
REM Windows post-tool-use hook for ginko CLI
|
|
56
|
-
REM This hook is called after Claude uses a tool via MCP
|
|
57
|
-
|
|
58
|
-
REM Set error handling
|
|
59
|
-
setlocal enableextensions
|
|
60
|
-
|
|
61
|
-
REM Check if ginko is installed
|
|
62
|
-
where ginko >nul 2>&1
|
|
63
|
-
if %errorlevel% neq 0 (
|
|
64
|
-
echo Ginko CLI not found in PATH
|
|
65
|
-
exit /b 0
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
REM Check if we're in a git repository with ginko initialized
|
|
69
|
-
if not exist ".git" (
|
|
70
|
-
echo Not in a git repository
|
|
71
|
-
exit /b 0
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
if not exist ".ginko" (
|
|
75
|
-
echo Ginko not initialized in this project
|
|
76
|
-
exit /b 0
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
REM Custom logic goes here
|
|
80
|
-
REM Add your Windows-specific ginko integration
|
|
81
|
-
|
|
82
|
-
REM Example: Auto-capture context after tool use
|
|
83
|
-
echo Capturing context after tool use...
|
|
84
|
-
ginko capture-context --auto --quiet
|
|
85
|
-
|
|
86
|
-
REM Example: Update session state
|
|
87
|
-
ginko update-session --tool-used --quiet
|
|
88
|
-
|
|
89
|
-
echo Post-tool-use hook completed successfully
|
|
90
|
-
exit /b 0`
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
name: 'pre_conversation',
|
|
94
|
-
platform: 'windows',
|
|
95
|
-
executable: true,
|
|
96
|
-
description: 'Windows pre-conversation hook for ginko setup',
|
|
97
|
-
content: `@echo off
|
|
98
|
-
REM Windows pre-conversation hook for ginko CLI
|
|
99
|
-
REM This hook is called before starting a conversation with Claude
|
|
100
|
-
|
|
101
|
-
setlocal enableextensions
|
|
102
|
-
|
|
103
|
-
REM Check ginko installation
|
|
104
|
-
where ginko >nul 2>&1
|
|
105
|
-
if %errorlevel% neq 0 (
|
|
106
|
-
echo Warning: Ginko CLI not found in PATH
|
|
107
|
-
exit /b 0
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
REM Initialize ginko if in git repo but not initialized
|
|
111
|
-
if exist ".git" (
|
|
112
|
-
if not exist ".ginko" (
|
|
113
|
-
echo Initializing ginko for this project...
|
|
114
|
-
ginko init --quiet
|
|
115
|
-
)
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
REM Load project context
|
|
119
|
-
if exist ".ginko" (
|
|
120
|
-
echo Loading project context...
|
|
121
|
-
ginko start --quiet
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
echo Pre-conversation hook completed
|
|
125
|
-
exit /b 0`
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: 'post_conversation',
|
|
129
|
-
platform: 'windows',
|
|
130
|
-
executable: true,
|
|
131
|
-
description: 'Windows post-conversation hook for ginko cleanup',
|
|
132
|
-
content: `@echo off
|
|
133
|
-
REM Windows post-conversation hook for ginko CLI
|
|
134
|
-
REM This hook is called after ending a conversation with Claude
|
|
135
|
-
|
|
136
|
-
setlocal enableextensions
|
|
137
|
-
|
|
138
|
-
REM Check if ginko is available
|
|
139
|
-
where ginko >nul 2>&1
|
|
140
|
-
if %errorlevel% neq 0 (
|
|
141
|
-
exit /b 0
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
REM Save session if in ginko project
|
|
145
|
-
if exist ".ginko" (
|
|
146
|
-
echo Saving conversation context...
|
|
147
|
-
ginko handoff "Conversation completed" --quiet
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
echo Post-conversation hook completed
|
|
151
|
-
exit /b 0`
|
|
152
|
-
}
|
|
153
|
-
];
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Unix shell templates (macOS and Linux)
|
|
157
|
-
*/
|
|
158
|
-
getUnixTemplates() {
|
|
159
|
-
return [
|
|
160
|
-
{
|
|
161
|
-
name: 'post_tool_use',
|
|
162
|
-
platform: 'linux', // Also used for macOS
|
|
163
|
-
executable: true,
|
|
164
|
-
description: 'Unix post-tool-use hook for ginko integration',
|
|
165
|
-
content: `#!/bin/bash
|
|
166
|
-
# Unix/macOS post-tool-use hook for ginko CLI
|
|
167
|
-
# This hook is called after Claude uses a tool via MCP
|
|
168
|
-
|
|
169
|
-
set -e # Exit on error
|
|
170
|
-
|
|
171
|
-
# Check if ginko is installed
|
|
172
|
-
if ! command -v ginko >/dev/null 2>&1; then
|
|
173
|
-
echo "Ginko CLI not found in PATH"
|
|
174
|
-
exit 0
|
|
175
|
-
fi
|
|
176
|
-
|
|
177
|
-
# Check if we're in a git repository with ginko initialized
|
|
178
|
-
if [ ! -d ".git" ]; then
|
|
179
|
-
echo "Not in a git repository"
|
|
180
|
-
exit 0
|
|
181
|
-
fi
|
|
182
|
-
|
|
183
|
-
if [ ! -d ".ginko" ]; then
|
|
184
|
-
echo "Ginko not initialized in this project"
|
|
185
|
-
exit 0
|
|
186
|
-
fi
|
|
187
|
-
|
|
188
|
-
# Custom logic goes here
|
|
189
|
-
# Add your Unix-specific ginko integration
|
|
190
|
-
|
|
191
|
-
# Example: Auto-capture context after tool use
|
|
192
|
-
echo "Capturing context after tool use..."
|
|
193
|
-
ginko capture-context --auto --quiet
|
|
194
|
-
|
|
195
|
-
# Example: Update session state
|
|
196
|
-
ginko update-session --tool-used --quiet
|
|
197
|
-
|
|
198
|
-
echo "Post-tool-use hook completed successfully"
|
|
199
|
-
exit 0`
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
name: 'pre_conversation',
|
|
203
|
-
platform: 'linux', // Also used for macOS
|
|
204
|
-
executable: true,
|
|
205
|
-
description: 'Unix pre-conversation hook for ginko setup',
|
|
206
|
-
content: `#!/bin/bash
|
|
207
|
-
# Unix/macOS pre-conversation hook for ginko CLI
|
|
208
|
-
# This hook is called before starting a conversation with Claude
|
|
209
|
-
|
|
210
|
-
set -e # Exit on error
|
|
211
|
-
|
|
212
|
-
# Check ginko installation
|
|
213
|
-
if ! command -v ginko >/dev/null 2>&1; then
|
|
214
|
-
echo "Warning: Ginko CLI not found in PATH"
|
|
215
|
-
exit 0
|
|
216
|
-
fi
|
|
217
|
-
|
|
218
|
-
# Initialize ginko if in git repo but not initialized
|
|
219
|
-
if [ -d ".git" ] && [ ! -d ".ginko" ]; then
|
|
220
|
-
echo "Initializing ginko for this project..."
|
|
221
|
-
ginko init --quiet
|
|
222
|
-
fi
|
|
223
|
-
|
|
224
|
-
# Load project context
|
|
225
|
-
if [ -d ".ginko" ]; then
|
|
226
|
-
echo "Loading project context..."
|
|
227
|
-
ginko start --quiet
|
|
228
|
-
fi
|
|
229
|
-
|
|
230
|
-
echo "Pre-conversation hook completed"
|
|
231
|
-
exit 0`
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
name: 'post_conversation',
|
|
235
|
-
platform: 'linux', // Also used for macOS
|
|
236
|
-
executable: true,
|
|
237
|
-
description: 'Unix post-conversation hook for ginko cleanup',
|
|
238
|
-
content: `#!/bin/bash
|
|
239
|
-
# Unix/macOS post-conversation hook for ginko CLI
|
|
240
|
-
# This hook is called after ending a conversation with Claude
|
|
241
|
-
|
|
242
|
-
set -e # Exit on error
|
|
243
|
-
|
|
244
|
-
# Check if ginko is available
|
|
245
|
-
if ! command -v ginko >/dev/null 2>&1; then
|
|
246
|
-
exit 0
|
|
247
|
-
fi
|
|
248
|
-
|
|
249
|
-
# Save session if in ginko project
|
|
250
|
-
if [ -d ".ginko" ]; then
|
|
251
|
-
echo "Saving conversation context..."
|
|
252
|
-
ginko handoff "Conversation completed" --quiet
|
|
253
|
-
fi
|
|
254
|
-
|
|
255
|
-
echo "Post-conversation hook completed"
|
|
256
|
-
exit 0`
|
|
257
|
-
}
|
|
258
|
-
];
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Insert custom content into template
|
|
262
|
-
*/
|
|
263
|
-
insertCustomContent(template, customContent) {
|
|
264
|
-
const marker = platform === 'windows'
|
|
265
|
-
? 'REM Custom logic goes here'
|
|
266
|
-
: '# Custom logic goes here';
|
|
267
|
-
return template.replace(marker, customContent);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Generate basic template for unknown hooks
|
|
271
|
-
*/
|
|
272
|
-
getBasicTemplate(hookName, platform, customContent) {
|
|
273
|
-
if (platform === 'windows') {
|
|
274
|
-
return `@echo off
|
|
275
|
-
REM Windows ${hookName} hook for ginko CLI
|
|
276
|
-
REM Generated automatically
|
|
277
|
-
|
|
278
|
-
setlocal enableextensions
|
|
279
|
-
|
|
280
|
-
REM Check if ginko is available
|
|
281
|
-
where ginko >nul 2>&1
|
|
282
|
-
if %errorlevel% neq 0 (
|
|
283
|
-
echo Ginko CLI not found
|
|
284
|
-
exit /b 0
|
|
285
|
-
)
|
|
286
|
-
|
|
287
|
-
${customContent || 'REM Add your custom logic here'}
|
|
288
|
-
|
|
289
|
-
echo ${hookName} hook completed
|
|
290
|
-
exit /b 0`;
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
return `#!/bin/bash
|
|
294
|
-
# Unix/macOS ${hookName} hook for ginko CLI
|
|
295
|
-
# Generated automatically
|
|
296
|
-
|
|
297
|
-
set -e
|
|
298
|
-
|
|
299
|
-
# Check if ginko is available
|
|
300
|
-
if ! command -v ginko >/dev/null 2>&1; then
|
|
301
|
-
echo "Ginko CLI not found"
|
|
302
|
-
exit 0
|
|
303
|
-
fi
|
|
304
|
-
|
|
305
|
-
${customContent || '# Add your custom logic here'}
|
|
306
|
-
|
|
307
|
-
echo "${hookName} hook completed"
|
|
308
|
-
exit 0`;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Get list of standard hook names
|
|
313
|
-
*/
|
|
314
|
-
getStandardHookNames() {
|
|
315
|
-
return [
|
|
316
|
-
'post_tool_use',
|
|
317
|
-
'pre_conversation',
|
|
318
|
-
'post_conversation',
|
|
319
|
-
'on_error',
|
|
320
|
-
'on_success'
|
|
321
|
-
];
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Validate hook name
|
|
325
|
-
*/
|
|
326
|
-
isValidHookName(name) {
|
|
327
|
-
// Allow alphanumeric, underscore, and hyphen
|
|
328
|
-
return /^[a-zA-Z0-9_-]+$/.test(name);
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* Generate installation instructions for hooks
|
|
332
|
-
*/
|
|
333
|
-
getInstallationInstructions(platform) {
|
|
334
|
-
const config = platform === 'windows'
|
|
335
|
-
? {
|
|
336
|
-
dir: '%USERPROFILE%\\.claude\\hooks',
|
|
337
|
-
ext: '.bat',
|
|
338
|
-
cmd: 'mkdir "%USERPROFILE%\\.claude\\hooks"'
|
|
339
|
-
}
|
|
340
|
-
: {
|
|
341
|
-
dir: '~/.claude/hooks',
|
|
342
|
-
ext: '.sh',
|
|
343
|
-
cmd: 'mkdir -p ~/.claude/hooks'
|
|
344
|
-
};
|
|
345
|
-
return `Installation Instructions for ${platform.charAt(0).toUpperCase() + platform.slice(1)}:
|
|
346
|
-
|
|
347
|
-
1. Create the hooks directory:
|
|
348
|
-
${config.cmd}
|
|
349
|
-
|
|
350
|
-
2. Create your hook file:
|
|
351
|
-
${config.dir}/your_hook_name${config.ext}
|
|
352
|
-
|
|
353
|
-
3. ${platform === 'windows' ? 'Ensure the file is executable (Windows batch files are executable by default)' : 'Make the file executable:'}
|
|
354
|
-
${platform === 'windows' ? '' : `chmod +x ${config.dir}/your_hook_name${config.ext}`}
|
|
355
|
-
|
|
356
|
-
4. Test your hook:
|
|
357
|
-
${platform === 'windows' ? `${config.dir}\\your_hook_name${config.ext}` : `${config.dir}/your_hook_name${config.ext}`}
|
|
358
|
-
|
|
359
|
-
Standard hook names: ${this.getStandardHookNames().join(', ')}`;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
// Export singleton instance
|
|
363
|
-
export const platformTemplates = new PlatformTemplates();
|
|
364
|
-
//# sourceMappingURL=platform-templates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform-templates.js","sourceRoot":"","sources":["../../../src/core/platform/platform-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH,MAAM,OAAO,iBAAiB;IAC5B;;OAEG;IACI,gBAAgB,CAAC,QAAkB;QACxC,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,SAAS;gBACZ,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACpC,KAAK,OAAO,CAAC;YACb,KAAK,OAAO;gBACV,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACjC;gBACE,OAAO,IAAI,CAAC,gBAAg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9D,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileType: utility
|
|
3
|
-
* @status: current
|
|
4
|
-
* @updated: 2025-10-01
|
|
5
|
-
* @tags: [context-pressure, monitoring, quality-estimation, session-management]
|
|
6
|
-
* @related: [session-log-manager.ts, status.ts, start/index.ts]
|
|
7
|
-
* @priority: high
|
|
8
|
-
* @complexity: medium
|
|
9
|
-
* @dependencies: []
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Context Pressure Monitor
|
|
13
|
-
*
|
|
14
|
-
* Tracks context window utilization and provides quality estimates.
|
|
15
|
-
* Based on ADR-033: Context Pressure Mitigation Strategy.
|
|
16
|
-
*/
|
|
17
|
-
export type PressureZone = 'optimal' | 'degradation' | 'critical';
|
|
18
|
-
export interface PressureReading {
|
|
19
|
-
pressure: number;
|
|
20
|
-
zone: PressureZone;
|
|
21
|
-
qualityEstimate: number;
|
|
22
|
-
recommendation: string;
|
|
23
|
-
tokensUsed?: number;
|
|
24
|
-
maxTokens?: number;
|
|
25
|
-
}
|
|
26
|
-
export declare class PressureMonitor {
|
|
27
|
-
private static estimatedTokens;
|
|
28
|
-
private static maxTokens;
|
|
29
|
-
/**
|
|
30
|
-
* Calculate current context pressure
|
|
31
|
-
* @param tokensUsed Optional override for token count
|
|
32
|
-
* @returns Pressure value between 0 and 1
|
|
33
|
-
*/
|
|
34
|
-
static getCurrentPressure(tokensUsed?: number): number;
|
|
35
|
-
/**
|
|
36
|
-
* Get pressure zone classification
|
|
37
|
-
* @param pressure Optional pressure value (calculated if not provided)
|
|
38
|
-
*/
|
|
39
|
-
static getPressureZone(pressure?: number): PressureZone;
|
|
40
|
-
/**
|
|
41
|
-
* Estimate AI quality percentage based on pressure
|
|
42
|
-
* Uses interpolation on the quality curve
|
|
43
|
-
*/
|
|
44
|
-
static calculateQualityEstimate(pressure?: number): number;
|
|
45
|
-
/**
|
|
46
|
-
* Get actionable recommendation based on pressure and zone
|
|
47
|
-
*/
|
|
48
|
-
static getRecommendation(pressure?: number, zone?: PressureZone): string;
|
|
49
|
-
/**
|
|
50
|
-
* Get complete pressure reading
|
|
51
|
-
*/
|
|
52
|
-
static getPressureReading(): PressureReading;
|
|
53
|
-
/**
|
|
54
|
-
* Determine if event should be logged based on pressure
|
|
55
|
-
* Logging is optimal when pressure < 85%
|
|
56
|
-
*/
|
|
57
|
-
static shouldLogEvent(pressure?: number): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Update token count estimates
|
|
60
|
-
* This is a rough estimate - actual tokens would come from Claude API
|
|
61
|
-
*/
|
|
62
|
-
static updateEstimatedTokens(tokens: number): void;
|
|
63
|
-
/**
|
|
64
|
-
* Set maximum token limit
|
|
65
|
-
*/
|
|
66
|
-
static setMaxTokens(max: number): void;
|
|
67
|
-
/**
|
|
68
|
-
* Reset monitor state
|
|
69
|
-
*/
|
|
70
|
-
static reset(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Estimate tokens added (rough heuristic: ~4 chars per token)
|
|
73
|
-
*/
|
|
74
|
-
static addEstimatedTokens(text: string): void;
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=pressure-monitor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pressure-monitor.d.ts","sourceRoot":"","sources":["../../src/core/pressure-monitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAElE,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyBD,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,eAAe,CAAa;IAC3C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAkB;IAE1C;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM;IAKtD;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,YAAY;IAQvD;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM;IAuB1D;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,GAAG,MAAM;IAqBxE;;OAEG;IACH,MAAM,CAAC,kBAAkB,IAAI,eAAe;IAgB5C;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO;IAKjD;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIlD;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAItC;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,IAAI;IAIpB;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAI9C"}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileType: utility
|
|
3
|
-
* @status: current
|
|
4
|
-
* @updated: 2025-10-01
|
|
5
|
-
* @tags: [context-pressure, monitoring, quality-estimation, session-management]
|
|
6
|
-
* @related: [session-log-manager.ts, status.ts, start/index.ts]
|
|
7
|
-
* @priority: high
|
|
8
|
-
* @complexity: medium
|
|
9
|
-
* @dependencies: []
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Context Pressure Thresholds
|
|
13
|
-
* Based on empirical observations from ADR-033
|
|
14
|
-
*/
|
|
15
|
-
const PRESSURE_THRESHOLDS = {
|
|
16
|
-
OPTIMAL_MAX: 0.50, // 0-50%: Full reasoning capacity
|
|
17
|
-
DEGRADATION_MAX: 0.85, // 50-85%: Noticeable compression
|
|
18
|
-
CRITICAL_MAX: 1.0 // 85-100%: Severe degradation
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Quality Estimation Curve
|
|
22
|
-
* Maps pressure percentage to expected AI quality
|
|
23
|
-
*/
|
|
24
|
-
const QUALITY_CURVE = [
|
|
25
|
-
{ pressure: 0.00, quality: 100 },
|
|
26
|
-
{ pressure: 0.50, quality: 100 },
|
|
27
|
-
{ pressure: 0.70, quality: 95 },
|
|
28
|
-
{ pressure: 0.85, quality: 85 },
|
|
29
|
-
{ pressure: 0.95, quality: 65 },
|
|
30
|
-
{ pressure: 1.00, quality: 40 }
|
|
31
|
-
];
|
|
32
|
-
export class PressureMonitor {
|
|
33
|
-
static estimatedTokens = 0;
|
|
34
|
-
static maxTokens = 200000; // Claude Sonnet 4.5 default
|
|
35
|
-
/**
|
|
36
|
-
* Calculate current context pressure
|
|
37
|
-
* @param tokensUsed Optional override for token count
|
|
38
|
-
* @returns Pressure value between 0 and 1
|
|
39
|
-
*/
|
|
40
|
-
static getCurrentPressure(tokensUsed) {
|
|
41
|
-
const used = tokensUsed ?? this.estimatedTokens;
|
|
42
|
-
return Math.min(used / this.maxTokens, 1.0);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Get pressure zone classification
|
|
46
|
-
* @param pressure Optional pressure value (calculated if not provided)
|
|
47
|
-
*/
|
|
48
|
-
static getPressureZone(pressure) {
|
|
49
|
-
const p = pressure ?? this.getCurrentPressure();
|
|
50
|
-
if (p <= PRESSURE_THRESHOLDS.OPTIMAL_MAX)
|
|
51
|
-
return 'optimal';
|
|
52
|
-
if (p <= PRESSURE_THRESHOLDS.DEGRADATION_MAX)
|
|
53
|
-
return 'degradation';
|
|
54
|
-
return 'critical';
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Estimate AI quality percentage based on pressure
|
|
58
|
-
* Uses interpolation on the quality curve
|
|
59
|
-
*/
|
|
60
|
-
static calculateQualityEstimate(pressure) {
|
|
61
|
-
const p = pressure ?? this.getCurrentPressure();
|
|
62
|
-
// Find bounding points on quality curve
|
|
63
|
-
let lower = QUALITY_CURVE[0];
|
|
64
|
-
let upper = QUALITY_CURVE[QUALITY_CURVE.length - 1];
|
|
65
|
-
for (let i = 0; i < QUALITY_CURVE.length - 1; i++) {
|
|
66
|
-
if (p >= QUALITY_CURVE[i].pressure && p <= QUALITY_CURVE[i + 1].pressure) {
|
|
67
|
-
lower = QUALITY_CURVE[i];
|
|
68
|
-
upper = QUALITY_CURVE[i + 1];
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
// Linear interpolation
|
|
73
|
-
const range = upper.pressure - lower.pressure;
|
|
74
|
-
const ratio = range > 0 ? (p - lower.pressure) / range : 0;
|
|
75
|
-
const quality = lower.quality + (upper.quality - lower.quality) * ratio;
|
|
76
|
-
return Math.round(quality);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Get actionable recommendation based on pressure and zone
|
|
80
|
-
*/
|
|
81
|
-
static getRecommendation(pressure, zone) {
|
|
82
|
-
const p = pressure ?? this.getCurrentPressure();
|
|
83
|
-
const z = zone ?? this.getPressureZone(p);
|
|
84
|
-
if (z === 'optimal') {
|
|
85
|
-
return 'Continue working (optimal quality)';
|
|
86
|
-
}
|
|
87
|
-
else if (z === 'degradation') {
|
|
88
|
-
if (p < 0.75) {
|
|
89
|
-
return 'Quality still good - continue working';
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
return 'Consider handoff soon to preserve quality';
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else { // critical
|
|
96
|
-
if (p < 0.95) {
|
|
97
|
-
return 'Quality degrading - recommend handoff now';
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
return 'Critical pressure - handoff strongly recommended';
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Get complete pressure reading
|
|
106
|
-
*/
|
|
107
|
-
static getPressureReading() {
|
|
108
|
-
const pressure = this.getCurrentPressure();
|
|
109
|
-
const zone = this.getPressureZone(pressure);
|
|
110
|
-
const qualityEstimate = this.calculateQualityEstimate(pressure);
|
|
111
|
-
const recommendation = this.getRecommendation(pressure, zone);
|
|
112
|
-
return {
|
|
113
|
-
pressure,
|
|
114
|
-
zone,
|
|
115
|
-
qualityEstimate,
|
|
116
|
-
recommendation,
|
|
117
|
-
tokensUsed: this.estimatedTokens,
|
|
118
|
-
maxTokens: this.maxTokens
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Determine if event should be logged based on pressure
|
|
123
|
-
* Logging is optimal when pressure < 85%
|
|
124
|
-
*/
|
|
125
|
-
static shouldLogEvent(pressure) {
|
|
126
|
-
const p = pressure ?? this.getCurrentPressure();
|
|
127
|
-
return p < PRESSURE_THRESHOLDS.DEGRADATION_MAX;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Update token count estimates
|
|
131
|
-
* This is a rough estimate - actual tokens would come from Claude API
|
|
132
|
-
*/
|
|
133
|
-
static updateEstimatedTokens(tokens) {
|
|
134
|
-
this.estimatedTokens = tokens;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Set maximum token limit
|
|
138
|
-
*/
|
|
139
|
-
static setMaxTokens(max) {
|
|
140
|
-
this.maxTokens = max;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Reset monitor state
|
|
144
|
-
*/
|
|
145
|
-
static reset() {
|
|
146
|
-
this.estimatedTokens = 0;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Estimate tokens added (rough heuristic: ~4 chars per token)
|
|
150
|
-
*/
|
|
151
|
-
static addEstimatedTokens(text) {
|
|
152
|
-
const estimatedTokens = Math.ceil(text.length / 4);
|
|
153
|
-
this.estimatedTokens += estimatedTokens;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
//# sourceMappingURL=pressure-monitor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pressure-monitor.js","sourceRoot":"","sources":["../../src/core/pressure-monitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAoBH;;;GAGG;AACH,MAAM,mBAAmB,GAAG;IAC1B,WAAW,EAAE,IAAI,EAAO,iCAAiC;IACzD,eAAe,EAAE,IAAI,EAAG,iCAAiC;IACzD,YAAY,EAAE,GAAG,CAAO,8BAA8B;CACvD,CAAC;AAEF;;;GAGG;AACH,MAAM,aAAa,GAAG;IACpB,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;IAChC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;IAChC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;CAChC,CAAC;AAEF,MAAM,OAAO,eAAe;IAClB,MAAM,CAAC,eAAe,GAAW,CAAC,CAAC;IACnC,MAAM,CAAC,SAAS,GAAW,MAAM,CAAC,CAAC,4BAA4B;IAEvE;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAmB;QAC3C,MAAM,IAAI,GAAG,UAAU,IAAI,IAAI,CAAC,eAAe,CAAC;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,IAA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,IAAI;YACJ,eAAe;YACf,cAAc;YACd,UAAU,EAAE,IAAI,CAAC,eAAe;YAChC,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,QAAiB;QACrC,MAAM,CAAC,GAAG,QAAQ,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAChD,OAAO,CAAC,GAAG,mBAAmB,CAAC,eAAe,CAAC;IACjD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,qBAAqB,CAAC,MAAc;QACzC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,GAAW;QAC7B,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK;QACV,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAY;QACpC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC;IAC1C,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileType: test
|
|
3
|
-
* @status: current
|
|
4
|
-
* @updated: 2025-09-20
|
|
5
|
-
* @tags: [test, validation, git, safety]
|
|
6
|
-
* @related: [git-validator.ts]
|
|
7
|
-
* @priority: high
|
|
8
|
-
* @complexity: low
|
|
9
|
-
* @dependencies: [jest]
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=git-validator.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git-validator.test.d.ts","sourceRoot":"","sources":["../../../src/core/validators/git-validator.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileType: test
|
|
3
|
-
* @status: current
|
|
4
|
-
* @updated: 2025-09-20
|
|
5
|
-
* @tags: [test, validation, git, safety]
|
|
6
|
-
* @related: [git-validator.ts]
|
|
7
|
-
* @priority: high
|
|
8
|
-
* @complexity: low
|
|
9
|
-
* @dependencies: [jest]
|
|
10
|
-
*/
|
|
11
|
-
import { GitValidator } from './git-validator';
|
|
12
|
-
describe('GitValidator', () => {
|
|
13
|
-
let validator;
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
validator = new GitValidator();
|
|
16
|
-
});
|
|
17
|
-
test('should have validate method', () => {
|
|
18
|
-
expect(typeof validator.validate).toBe('function');
|
|
19
|
-
});
|
|
20
|
-
test('should return validation result structure', async () => {
|
|
21
|
-
const result = await validator.validate();
|
|
22
|
-
expect(result).toHaveProperty('status');
|
|
23
|
-
expect(result).toHaveProperty('message');
|
|
24
|
-
expect(['pass', 'warning', 'error']).toContain(result.status);
|
|
25
|
-
});
|
|
26
|
-
test('should detect git availability', async () => {
|
|
27
|
-
const result = await validator.validate();
|
|
28
|
-
// In our environment, git should be available
|
|
29
|
-
expect(result.status).not.toBe('error');
|
|
30
|
-
expect(result.message).toBeTruthy();
|
|
31
|
-
});
|
|
32
|
-
test('should handle timeout gracefully', async () => {
|
|
33
|
-
// Test that validation completes within reasonable time
|
|
34
|
-
const startTime = Date.now();
|
|
35
|
-
await validator.validate();
|
|
36
|
-
const endTime = Date.now();
|
|
37
|
-
expect(endTime - startTime).toBeLessThan(10000); // Should complete within 10 seconds
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=git-validator.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git-validator.test.js","sourceRoot":"","sources":["../../../src/core/validators/git-validator.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,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