oh-my-claude-sisyphus 3.8.9 → 3.8.10
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/agents/architect.md +78 -0
- package/agents/explore.md +15 -0
- package/agents/qa-tester.md +159 -1
- package/agents/writer.md +20 -0
- package/commands/help.md +1 -1
- package/commands/omc-setup.md +1 -1
- package/dist/__tests__/agent-registry.test.d.ts +2 -0
- package/dist/__tests__/agent-registry.test.d.ts.map +1 -0
- package/dist/__tests__/agent-registry.test.js +39 -0
- package/dist/__tests__/agent-registry.test.js.map +1 -0
- package/dist/__tests__/load-agent-prompt.test.d.ts +2 -0
- package/dist/__tests__/load-agent-prompt.test.d.ts.map +1 -0
- package/dist/__tests__/load-agent-prompt.test.js +68 -0
- package/dist/__tests__/load-agent-prompt.test.js.map +1 -0
- package/dist/__tests__/model-routing.test.js +5 -34
- package/dist/__tests__/model-routing.test.js.map +1 -1
- package/dist/agents/analyst.d.ts.map +1 -1
- package/dist/agents/analyst.js +2 -77
- package/dist/agents/analyst.js.map +1 -1
- package/dist/agents/architect.d.ts.map +1 -1
- package/dist/agents/architect.js +3 -148
- package/dist/agents/architect.js.map +1 -1
- package/dist/agents/coordinator-deprecated.d.ts +18 -0
- package/dist/agents/coordinator-deprecated.d.ts.map +1 -0
- package/dist/agents/coordinator-deprecated.js +34 -0
- package/dist/agents/coordinator-deprecated.js.map +1 -0
- package/dist/agents/critic.d.ts.map +1 -1
- package/dist/agents/critic.js +2 -90
- package/dist/agents/critic.js.map +1 -1
- package/dist/agents/definitions.d.ts +2 -0
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +3 -32
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/designer.d.ts.map +1 -1
- package/dist/agents/designer.js +2 -73
- package/dist/agents/designer.js.map +1 -1
- package/dist/agents/executor.d.ts +1 -0
- package/dist/agents/executor.d.ts.map +1 -1
- package/dist/agents/executor.js +3 -56
- package/dist/agents/executor.js.map +1 -1
- package/dist/agents/explore.d.ts.map +1 -1
- package/dist/agents/explore.js +2 -64
- package/dist/agents/explore.js.map +1 -1
- package/dist/agents/index.d.ts +4 -3
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +6 -3
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/planner.d.ts.map +1 -1
- package/dist/agents/planner.js +2 -157
- package/dist/agents/planner.js.map +1 -1
- package/dist/agents/qa-tester.d.ts.map +1 -1
- package/dist/agents/qa-tester.js +2 -324
- package/dist/agents/qa-tester.js.map +1 -1
- package/dist/agents/researcher.d.ts.map +1 -1
- package/dist/agents/researcher.js +2 -65
- package/dist/agents/researcher.js.map +1 -1
- package/dist/agents/scientist.d.ts.map +1 -1
- package/dist/agents/scientist.js +2 -293
- package/dist/agents/scientist.js.map +1 -1
- package/dist/agents/utils.d.ts +7 -0
- package/dist/agents/utils.d.ts.map +1 -1
- package/dist/agents/utils.js +50 -0
- package/dist/agents/utils.js.map +1 -1
- package/dist/agents/vision.d.ts.map +1 -1
- package/dist/agents/vision.js +2 -32
- package/dist/agents/vision.js.map +1 -1
- package/dist/agents/writer.d.ts.map +1 -1
- package/dist/agents/writer.js +2 -171
- package/dist/agents/writer.js.map +1 -1
- package/dist/cli/analytics.js +0 -0
- package/dist/cli/index.js +0 -0
- package/dist/features/model-routing/index.d.ts +1 -1
- package/dist/features/model-routing/index.d.ts.map +1 -1
- package/dist/features/model-routing/index.js +1 -1
- package/dist/features/model-routing/index.js.map +1 -1
- package/dist/features/model-routing/router.d.ts +1 -15
- package/dist/features/model-routing/router.d.ts.map +1 -1
- package/dist/features/model-routing/router.js +2 -33
- package/dist/features/model-routing/router.js.map +1 -1
- package/dist/features/model-routing/rules.d.ts.map +1 -1
- package/dist/features/model-routing/rules.js +0 -8
- package/dist/features/model-routing/rules.js.map +1 -1
- package/dist/features/model-routing/types.d.ts +1 -2
- package/dist/features/model-routing/types.d.ts.map +1 -1
- package/dist/features/model-routing/types.js +2 -6
- package/dist/features/model-routing/types.js.map +1 -1
- package/dist/features/task-decomposer/index.d.ts +1 -1
- package/dist/features/task-decomposer/index.d.ts.map +1 -1
- package/dist/features/task-decomposer/index.js +5 -8
- package/dist/features/task-decomposer/index.js.map +1 -1
- package/dist/features/task-decomposer/types.d.ts +4 -4
- package/dist/features/task-decomposer/types.d.ts.map +1 -1
- package/dist/hooks/ultrapilot/decomposer.d.ts +1 -1
- package/dist/hooks/ultrapilot/decomposer.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/docs/CLAUDE.md +44 -4
- package/docs/FEATURES.md +1 -1
- package/docs/MIGRATION.md +5 -5
- package/docs/REFERENCE.md +6 -2
- package/package.json +1 -1
- package/skills/help/SKILL.md +1 -1
- package/skills/omc-setup/SKILL.md +1 -1
- package/dist/__tests__/analytics/analytics-summary.test.d.ts +0 -2
- package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/analytics-summary.test.js +0 -267
- package/dist/__tests__/analytics/analytics-summary.test.js.map +0 -1
- package/dist/__tests__/analytics/cost-estimator.test.d.ts +0 -2
- package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +0 -1
- package/dist/__tests__/analytics/cost-estimator.test.js +0 -212
- package/dist/__tests__/analytics/cost-estimator.test.js.map +0 -1
- package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts +0 -7
- package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts.map +0 -1
- package/dist/__tests__/hooks/auto-slash-command/executor.test.js +0 -374
- package/dist/__tests__/hooks/auto-slash-command/executor.test.js.map +0 -1
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +0 -2
- package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +0 -1
- package/dist/__tests__/hud/auto-tracking.integration.test.js +0 -12
- package/dist/__tests__/hud/auto-tracking.integration.test.js.map +0 -1
- package/dist/__tests__/learned-skills/config.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/config.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/config.test.js +0 -37
- package/dist/__tests__/learned-skills/config.test.js.map +0 -1
- package/dist/__tests__/learned-skills/detector.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/detector.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/detector.test.js +0 -99
- package/dist/__tests__/learned-skills/detector.test.js.map +0 -1
- package/dist/__tests__/learned-skills/finder.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/finder.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/finder.test.js +0 -59
- package/dist/__tests__/learned-skills/finder.test.js.map +0 -1
- package/dist/__tests__/learned-skills/loader.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/loader.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/loader.test.js +0 -69
- package/dist/__tests__/learned-skills/loader.test.js.map +0 -1
- package/dist/__tests__/learned-skills/parser.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/parser.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/parser.test.js +0 -81
- package/dist/__tests__/learned-skills/parser.test.js.map +0 -1
- package/dist/__tests__/learned-skills/validator.test.d.ts +0 -2
- package/dist/__tests__/learned-skills/validator.test.d.ts.map +0 -1
- package/dist/__tests__/learned-skills/validator.test.js +0 -85
- package/dist/__tests__/learned-skills/validator.test.js.map +0 -1
- package/dist/agents/codex-agents.d.ts +0 -20
- package/dist/agents/codex-agents.d.ts.map +0 -1
- package/dist/agents/codex-agents.js +0 -36
- package/dist/agents/codex-agents.js.map +0 -1
- package/dist/agents/coordinator.d.ts +0 -11
- package/dist/agents/coordinator.d.ts.map +0 -1
- package/dist/agents/coordinator.js +0 -115
- package/dist/agents/coordinator.js.map +0 -1
- package/dist/agents/document-writer.d.ts +0 -11
- package/dist/agents/document-writer.d.ts.map +0 -1
- package/dist/agents/document-writer.js +0 -209
- package/dist/agents/document-writer.js.map +0 -1
- package/dist/agents/frontend-engineer.d.ts +0 -11
- package/dist/agents/frontend-engineer.d.ts.map +0 -1
- package/dist/agents/frontend-engineer.js +0 -115
- package/dist/agents/frontend-engineer.js.map +0 -1
- package/dist/agents/librarian.d.ts +0 -12
- package/dist/agents/librarian.d.ts.map +0 -1
- package/dist/agents/librarian.js +0 -103
- package/dist/agents/librarian.js.map +0 -1
- package/dist/agents/metis.d.ts +0 -12
- package/dist/agents/metis.d.ts.map +0 -1
- package/dist/agents/metis.js +0 -117
- package/dist/agents/metis.js.map +0 -1
- package/dist/agents/momus.d.ts +0 -12
- package/dist/agents/momus.d.ts.map +0 -1
- package/dist/agents/momus.js +0 -128
- package/dist/agents/momus.js.map +0 -1
- package/dist/agents/multimodal-looker.d.ts +0 -11
- package/dist/agents/multimodal-looker.d.ts.map +0 -1
- package/dist/agents/multimodal-looker.js +0 -70
- package/dist/agents/multimodal-looker.js.map +0 -1
- package/dist/agents/oracle.d.ts +0 -13
- package/dist/agents/oracle.d.ts.map +0 -1
- package/dist/agents/oracle.js +0 -191
- package/dist/agents/oracle.js.map +0 -1
- package/dist/agents/orchestrator-sisyphus.d.ts +0 -11
- package/dist/agents/orchestrator-sisyphus.d.ts.map +0 -1
- package/dist/agents/orchestrator-sisyphus.js +0 -115
- package/dist/agents/orchestrator-sisyphus.js.map +0 -1
- package/dist/agents/prometheus.d.ts +0 -12
- package/dist/agents/prometheus.d.ts.map +0 -1
- package/dist/agents/prometheus.js +0 -195
- package/dist/agents/prometheus.js.map +0 -1
- package/dist/agents/sisyphus-junior.d.ts +0 -12
- package/dist/agents/sisyphus-junior.d.ts.map +0 -1
- package/dist/agents/sisyphus-junior.js +0 -93
- package/dist/agents/sisyphus-junior.js.map +0 -1
- package/dist/cli/components/CostDashboard.d.ts +0 -15
- package/dist/cli/components/CostDashboard.d.ts.map +0 -1
- package/dist/cli/components/CostDashboard.js +0 -15
- package/dist/cli/components/CostDashboard.js.map +0 -1
- package/dist/cli/components/LiveStats.d.ts +0 -16
- package/dist/cli/components/LiveStats.d.ts.map +0 -1
- package/dist/cli/components/LiveStats.js +0 -16
- package/dist/cli/components/LiveStats.js.map +0 -1
- package/dist/cli/components/SessionBrowser.d.ts +0 -14
- package/dist/cli/components/SessionBrowser.d.ts.map +0 -1
- package/dist/cli/components/SessionBrowser.js +0 -14
- package/dist/cli/components/SessionBrowser.js.map +0 -1
- package/dist/cli/tui.d.ts +0 -21
- package/dist/cli/tui.d.ts.map +0 -1
- package/dist/cli/tui.js +0 -21
- package/dist/cli/tui.js.map +0 -1
- package/dist/hooks/autopilot/signals.d.ts +0 -20
- package/dist/hooks/autopilot/signals.d.ts.map +0 -1
- package/dist/hooks/autopilot/signals.js +0 -75
- package/dist/hooks/autopilot/signals.js.map +0 -1
- package/dist/hooks/autopilot/summary.d.ts +0 -27
- package/dist/hooks/autopilot/summary.d.ts.map +0 -1
- package/dist/hooks/autopilot/summary.js +0 -160
- package/dist/hooks/autopilot/summary.js.map +0 -1
- package/dist/hooks/autopilot/transition.d.ts +0 -39
- package/dist/hooks/autopilot/transition.d.ts.map +0 -1
- package/dist/hooks/autopilot/transition.js +0 -216
- package/dist/hooks/autopilot/transition.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/constants.d.ts +0 -28
- package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/constants.js +0 -85
- package/dist/hooks/context-window-limit-recovery/constants.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/index.d.ts +0 -62
- package/dist/hooks/context-window-limit-recovery/index.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/index.js +0 -201
- package/dist/hooks/context-window-limit-recovery/index.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/parser.d.ts +0 -31
- package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/parser.js +0 -241
- package/dist/hooks/context-window-limit-recovery/parser.js.map +0 -1
- package/dist/hooks/context-window-limit-recovery/types.d.ts +0 -84
- package/dist/hooks/context-window-limit-recovery/types.d.ts.map +0 -1
- package/dist/hooks/context-window-limit-recovery/types.js +0 -34
- package/dist/hooks/context-window-limit-recovery/types.js.map +0 -1
- package/dist/hooks/edit-error-recovery/index.d.ts +0 -62
- package/dist/hooks/edit-error-recovery/index.d.ts.map +0 -1
- package/dist/hooks/edit-error-recovery/index.js +0 -89
- package/dist/hooks/edit-error-recovery/index.js.map +0 -1
- package/dist/hooks/github-auto-responder/classifier.d.ts +0 -43
- package/dist/hooks/github-auto-responder/classifier.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/classifier.js +0 -150
- package/dist/hooks/github-auto-responder/classifier.js.map +0 -1
- package/dist/hooks/github-auto-responder/config.d.ts +0 -109
- package/dist/hooks/github-auto-responder/config.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/config.js +0 -69
- package/dist/hooks/github-auto-responder/config.js.map +0 -1
- package/dist/hooks/github-auto-responder/constants.d.ts +0 -45
- package/dist/hooks/github-auto-responder/constants.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/constants.js +0 -60
- package/dist/hooks/github-auto-responder/constants.js.map +0 -1
- package/dist/hooks/github-auto-responder/filters.d.ts +0 -95
- package/dist/hooks/github-auto-responder/filters.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/filters.js +0 -174
- package/dist/hooks/github-auto-responder/filters.js.map +0 -1
- package/dist/hooks/github-auto-responder/github-client.d.ts +0 -65
- package/dist/hooks/github-auto-responder/github-client.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/github-client.js +0 -128
- package/dist/hooks/github-auto-responder/github-client.js.map +0 -1
- package/dist/hooks/github-auto-responder/idempotency.d.ts +0 -68
- package/dist/hooks/github-auto-responder/idempotency.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/idempotency.js +0 -147
- package/dist/hooks/github-auto-responder/idempotency.js.map +0 -1
- package/dist/hooks/github-auto-responder/index.d.ts +0 -140
- package/dist/hooks/github-auto-responder/index.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/index.js +0 -145
- package/dist/hooks/github-auto-responder/index.js.map +0 -1
- package/dist/hooks/github-auto-responder/persona.d.ts +0 -40
- package/dist/hooks/github-auto-responder/persona.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/persona.js +0 -99
- package/dist/hooks/github-auto-responder/persona.js.map +0 -1
- package/dist/hooks/github-auto-responder/responder.d.ts +0 -122
- package/dist/hooks/github-auto-responder/responder.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/responder.js +0 -264
- package/dist/hooks/github-auto-responder/responder.js.map +0 -1
- package/dist/hooks/github-auto-responder/server.d.ts +0 -140
- package/dist/hooks/github-auto-responder/server.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/server.js +0 -301
- package/dist/hooks/github-auto-responder/server.js.map +0 -1
- package/dist/hooks/github-auto-responder/signature.d.ts +0 -34
- package/dist/hooks/github-auto-responder/signature.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/signature.js +0 -79
- package/dist/hooks/github-auto-responder/signature.js.map +0 -1
- package/dist/hooks/github-auto-responder/templates.d.ts +0 -16
- package/dist/hooks/github-auto-responder/templates.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/templates.js +0 -93
- package/dist/hooks/github-auto-responder/templates.js.map +0 -1
- package/dist/hooks/github-auto-responder/types.d.ts +0 -246
- package/dist/hooks/github-auto-responder/types.d.ts.map +0 -1
- package/dist/hooks/github-auto-responder/types.js +0 -7
- package/dist/hooks/github-auto-responder/types.js.map +0 -1
- package/dist/hooks/learned-skills/config.d.ts +0 -53
- package/dist/hooks/learned-skills/config.d.ts.map +0 -1
- package/dist/hooks/learned-skills/config.js +0 -103
- package/dist/hooks/learned-skills/config.js.map +0 -1
- package/dist/hooks/learned-skills/constants.d.ts +0 -24
- package/dist/hooks/learned-skills/constants.d.ts.map +0 -1
- package/dist/hooks/learned-skills/constants.js +0 -26
- package/dist/hooks/learned-skills/constants.js.map +0 -1
- package/dist/hooks/learned-skills/detection-hook.d.ts +0 -39
- package/dist/hooks/learned-skills/detection-hook.d.ts.map +0 -1
- package/dist/hooks/learned-skills/detection-hook.js +0 -83
- package/dist/hooks/learned-skills/detection-hook.js.map +0 -1
- package/dist/hooks/learned-skills/detector.d.ts +0 -30
- package/dist/hooks/learned-skills/detector.d.ts.map +0 -1
- package/dist/hooks/learned-skills/detector.js +0 -150
- package/dist/hooks/learned-skills/detector.js.map +0 -1
- package/dist/hooks/learned-skills/finder.d.ts +0 -21
- package/dist/hooks/learned-skills/finder.d.ts.map +0 -1
- package/dist/hooks/learned-skills/finder.js +0 -117
- package/dist/hooks/learned-skills/finder.js.map +0 -1
- package/dist/hooks/learned-skills/index.d.ts +0 -62
- package/dist/hooks/learned-skills/index.d.ts.map +0 -1
- package/dist/hooks/learned-skills/index.js +0 -137
- package/dist/hooks/learned-skills/index.js.map +0 -1
- package/dist/hooks/learned-skills/loader.d.ts +0 -20
- package/dist/hooks/learned-skills/loader.d.ts.map +0 -1
- package/dist/hooks/learned-skills/loader.js +0 -107
- package/dist/hooks/learned-skills/loader.js.map +0 -1
- package/dist/hooks/learned-skills/parser.d.ts +0 -21
- package/dist/hooks/learned-skills/parser.d.ts.map +0 -1
- package/dist/hooks/learned-skills/parser.js +0 -190
- package/dist/hooks/learned-skills/parser.js.map +0 -1
- package/dist/hooks/learned-skills/promotion.d.ts +0 -29
- package/dist/hooks/learned-skills/promotion.d.ts.map +0 -1
- package/dist/hooks/learned-skills/promotion.js +0 -87
- package/dist/hooks/learned-skills/promotion.js.map +0 -1
- package/dist/hooks/learned-skills/types.d.ts +0 -109
- package/dist/hooks/learned-skills/types.d.ts.map +0 -1
- package/dist/hooks/learned-skills/types.js +0 -8
- package/dist/hooks/learned-skills/types.js.map +0 -1
- package/dist/hooks/learned-skills/validator.d.ts +0 -15
- package/dist/hooks/learned-skills/validator.d.ts.map +0 -1
- package/dist/hooks/learned-skills/validator.js +0 -87
- package/dist/hooks/learned-skills/validator.js.map +0 -1
- package/dist/hooks/learned-skills/writer.d.ts +0 -27
- package/dist/hooks/learned-skills/writer.d.ts.map +0 -1
- package/dist/hooks/learned-skills/writer.js +0 -126
- package/dist/hooks/learned-skills/writer.js.map +0 -1
- package/dist/hooks/mnemosyne/config.d.ts +0 -53
- package/dist/hooks/mnemosyne/config.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/config.js +0 -103
- package/dist/hooks/mnemosyne/config.js.map +0 -1
- package/dist/hooks/mnemosyne/constants.d.ts +0 -24
- package/dist/hooks/mnemosyne/constants.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/constants.js +0 -26
- package/dist/hooks/mnemosyne/constants.js.map +0 -1
- package/dist/hooks/mnemosyne/detection-hook.d.ts +0 -39
- package/dist/hooks/mnemosyne/detection-hook.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/detection-hook.js +0 -83
- package/dist/hooks/mnemosyne/detection-hook.js.map +0 -1
- package/dist/hooks/mnemosyne/detector.d.ts +0 -30
- package/dist/hooks/mnemosyne/detector.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/detector.js +0 -150
- package/dist/hooks/mnemosyne/detector.js.map +0 -1
- package/dist/hooks/mnemosyne/finder.d.ts +0 -21
- package/dist/hooks/mnemosyne/finder.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/finder.js +0 -117
- package/dist/hooks/mnemosyne/finder.js.map +0 -1
- package/dist/hooks/mnemosyne/index.d.ts +0 -62
- package/dist/hooks/mnemosyne/index.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/index.js +0 -137
- package/dist/hooks/mnemosyne/index.js.map +0 -1
- package/dist/hooks/mnemosyne/loader.d.ts +0 -20
- package/dist/hooks/mnemosyne/loader.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/loader.js +0 -113
- package/dist/hooks/mnemosyne/loader.js.map +0 -1
- package/dist/hooks/mnemosyne/parser.d.ts +0 -21
- package/dist/hooks/mnemosyne/parser.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/parser.js +0 -190
- package/dist/hooks/mnemosyne/parser.js.map +0 -1
- package/dist/hooks/mnemosyne/promotion.d.ts +0 -29
- package/dist/hooks/mnemosyne/promotion.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/promotion.js +0 -87
- package/dist/hooks/mnemosyne/promotion.js.map +0 -1
- package/dist/hooks/mnemosyne/types.d.ts +0 -109
- package/dist/hooks/mnemosyne/types.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/types.js +0 -8
- package/dist/hooks/mnemosyne/types.js.map +0 -1
- package/dist/hooks/mnemosyne/validator.d.ts +0 -15
- package/dist/hooks/mnemosyne/validator.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/validator.js +0 -87
- package/dist/hooks/mnemosyne/validator.js.map +0 -1
- package/dist/hooks/mnemosyne/writer.d.ts +0 -27
- package/dist/hooks/mnemosyne/writer.d.ts.map +0 -1
- package/dist/hooks/mnemosyne/writer.js +0 -126
- package/dist/hooks/mnemosyne/writer.js.map +0 -1
- package/dist/hooks/ralph-loop/index.d.ts +0 -116
- package/dist/hooks/ralph-loop/index.d.ts.map +0 -1
- package/dist/hooks/ralph-loop/index.js +0 -322
- package/dist/hooks/ralph-loop/index.js.map +0 -1
- package/dist/hooks/ralph-prd/index.d.ts +0 -130
- package/dist/hooks/ralph-prd/index.d.ts.map +0 -1
- package/dist/hooks/ralph-prd/index.js +0 -310
- package/dist/hooks/ralph-prd/index.js.map +0 -1
- package/dist/hooks/ralph-progress/index.d.ts +0 -102
- package/dist/hooks/ralph-progress/index.d.ts.map +0 -1
- package/dist/hooks/ralph-progress/index.js +0 -408
- package/dist/hooks/ralph-progress/index.js.map +0 -1
- package/dist/hooks/ralph-verifier/index.d.ts +0 -72
- package/dist/hooks/ralph-verifier/index.d.ts.map +0 -1
- package/dist/hooks/ralph-verifier/index.js +0 -223
- package/dist/hooks/ralph-verifier/index.js.map +0 -1
- package/dist/hooks/session-recovery/constants.d.ts +0 -56
- package/dist/hooks/session-recovery/constants.d.ts.map +0 -1
- package/dist/hooks/session-recovery/constants.js +0 -78
- package/dist/hooks/session-recovery/constants.js.map +0 -1
- package/dist/hooks/session-recovery/index.d.ts +0 -53
- package/dist/hooks/session-recovery/index.d.ts.map +0 -1
- package/dist/hooks/session-recovery/index.js +0 -321
- package/dist/hooks/session-recovery/index.js.map +0 -1
- package/dist/hooks/session-recovery/storage.d.ts +0 -76
- package/dist/hooks/session-recovery/storage.d.ts.map +0 -1
- package/dist/hooks/session-recovery/storage.js +0 -383
- package/dist/hooks/session-recovery/storage.js.map +0 -1
- package/dist/hooks/session-recovery/types.d.ts +0 -145
- package/dist/hooks/session-recovery/types.d.ts.map +0 -1
- package/dist/hooks/session-recovery/types.js +0 -8
- package/dist/hooks/session-recovery/types.js.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts +0 -23
- package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/constants.js +0 -142
- package/dist/hooks/sisyphus-orchestrator/constants.js.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/index.d.ts +0 -113
- package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +0 -1
- package/dist/hooks/sisyphus-orchestrator/index.js +0 -309
- package/dist/hooks/sisyphus-orchestrator/index.js.map +0 -1
- package/dist/hooks/ultraqa-loop/index.d.ts +0 -94
- package/dist/hooks/ultraqa-loop/index.d.ts.map +0 -1
- package/dist/hooks/ultraqa-loop/index.js +0 -216
- package/dist/hooks/ultraqa-loop/index.js.map +0 -1
- package/dist/hooks/ultrawork-state/index.d.ts +0 -62
- package/dist/hooks/ultrawork-state/index.d.ts.map +0 -1
- package/dist/hooks/ultrawork-state/index.js +0 -208
- package/dist/hooks/ultrawork-state/index.js.map +0 -1
- package/dist/hud/sisyphus-state.d.ts +0 -31
- package/dist/hud/sisyphus-state.d.ts.map +0 -1
- package/dist/hud/sisyphus-state.js +0 -163
- package/dist/hud/sisyphus-state.js.map +0 -1
- package/dist/mcp/standalone-server.cjs +0 -19135
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context Window Limit Recovery Types
|
|
3
|
-
*
|
|
4
|
-
* Type definitions for detecting and recovering from context window limit errors.
|
|
5
|
-
*
|
|
6
|
-
* Adapted from oh-my-opencode's anthropic-context-window-limit-recovery hook.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Parsed token limit error information
|
|
10
|
-
*/
|
|
11
|
-
export interface ParsedTokenLimitError {
|
|
12
|
-
/** Current number of tokens in the conversation */
|
|
13
|
-
currentTokens: number;
|
|
14
|
-
/** Maximum allowed tokens */
|
|
15
|
-
maxTokens: number;
|
|
16
|
-
/** Request ID from the API response */
|
|
17
|
-
requestId?: string;
|
|
18
|
-
/** Type of error detected */
|
|
19
|
-
errorType: string;
|
|
20
|
-
/** Provider ID (e.g., 'anthropic') */
|
|
21
|
-
providerID?: string;
|
|
22
|
-
/** Model ID (e.g., 'claude-3-opus-20240229') */
|
|
23
|
-
modelID?: string;
|
|
24
|
-
/** Index of the problematic message */
|
|
25
|
-
messageIndex?: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Retry state for recovery attempts
|
|
29
|
-
*/
|
|
30
|
-
export interface RetryState {
|
|
31
|
-
/** Number of retry attempts made */
|
|
32
|
-
attempt: number;
|
|
33
|
-
/** Timestamp of last retry attempt */
|
|
34
|
-
lastAttemptTime: number;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Truncation state for progressive truncation
|
|
38
|
-
*/
|
|
39
|
-
export interface TruncateState {
|
|
40
|
-
/** Number of truncation attempts made */
|
|
41
|
-
truncateAttempt: number;
|
|
42
|
-
/** ID of the last truncated part */
|
|
43
|
-
lastTruncatedPartId?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Recovery result
|
|
47
|
-
*/
|
|
48
|
-
export interface RecoveryResult {
|
|
49
|
-
/** Whether recovery was attempted */
|
|
50
|
-
attempted: boolean;
|
|
51
|
-
/** Whether recovery was successful */
|
|
52
|
-
success: boolean;
|
|
53
|
-
/** Recovery message to inject */
|
|
54
|
-
message?: string;
|
|
55
|
-
/** Error type detected */
|
|
56
|
-
errorType?: string;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Configuration for retry behavior
|
|
60
|
-
*/
|
|
61
|
-
export declare const RETRY_CONFIG: {
|
|
62
|
-
/** Maximum retry attempts */
|
|
63
|
-
readonly maxAttempts: 2;
|
|
64
|
-
/** Initial delay between retries in ms */
|
|
65
|
-
readonly initialDelayMs: 2000;
|
|
66
|
-
/** Backoff factor for exponential backoff */
|
|
67
|
-
readonly backoffFactor: 2;
|
|
68
|
-
/** Maximum delay between retries in ms */
|
|
69
|
-
readonly maxDelayMs: 30000;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Configuration for truncation behavior
|
|
73
|
-
*/
|
|
74
|
-
export declare const TRUNCATE_CONFIG: {
|
|
75
|
-
/** Maximum truncation attempts */
|
|
76
|
-
readonly maxTruncateAttempts: 20;
|
|
77
|
-
/** Minimum output size (chars) to attempt truncation */
|
|
78
|
-
readonly minOutputSizeToTruncate: 500;
|
|
79
|
-
/** Target token ratio after truncation */
|
|
80
|
-
readonly targetTokenRatio: 0.5;
|
|
81
|
-
/** Average characters per token estimate */
|
|
82
|
-
readonly charsPerToken: 4;
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hooks/context-window-limit-recovery/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,oCAAoC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,yCAAyC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB,6BAA6B;;IAE7B,0CAA0C;;IAE1C,6CAA6C;;IAE7C,0CAA0C;;CAElC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B,kCAAkC;;IAElC,wDAAwD;;IAExD,0CAA0C;;IAE1C,4CAA4C;;CAEpC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context Window Limit Recovery Types
|
|
3
|
-
*
|
|
4
|
-
* Type definitions for detecting and recovering from context window limit errors.
|
|
5
|
-
*
|
|
6
|
-
* Adapted from oh-my-opencode's anthropic-context-window-limit-recovery hook.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Configuration for retry behavior
|
|
10
|
-
*/
|
|
11
|
-
export const RETRY_CONFIG = {
|
|
12
|
-
/** Maximum retry attempts */
|
|
13
|
-
maxAttempts: 2,
|
|
14
|
-
/** Initial delay between retries in ms */
|
|
15
|
-
initialDelayMs: 2000,
|
|
16
|
-
/** Backoff factor for exponential backoff */
|
|
17
|
-
backoffFactor: 2,
|
|
18
|
-
/** Maximum delay between retries in ms */
|
|
19
|
-
maxDelayMs: 30000,
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Configuration for truncation behavior
|
|
23
|
-
*/
|
|
24
|
-
export const TRUNCATE_CONFIG = {
|
|
25
|
-
/** Maximum truncation attempts */
|
|
26
|
-
maxTruncateAttempts: 20,
|
|
27
|
-
/** Minimum output size (chars) to attempt truncation */
|
|
28
|
-
minOutputSizeToTruncate: 500,
|
|
29
|
-
/** Target token ratio after truncation */
|
|
30
|
-
targetTokenRatio: 0.5,
|
|
31
|
-
/** Average characters per token estimate */
|
|
32
|
-
charsPerToken: 4,
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/context-window-limit-recovery/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAwDH;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,6BAA6B;IAC7B,WAAW,EAAE,CAAC;IACd,0CAA0C;IAC1C,cAAc,EAAE,IAAI;IACpB,6CAA6C;IAC7C,aAAa,EAAE,CAAC;IAChB,0CAA0C;IAC1C,UAAU,EAAE,KAAK;CACT,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,kCAAkC;IAClC,mBAAmB,EAAE,EAAE;IACvB,wDAAwD;IACxD,uBAAuB,EAAE,GAAG;IAC5B,0CAA0C;IAC1C,gBAAgB,EAAE,GAAG;IACrB,4CAA4C;IAC5C,aAAa,EAAE,CAAC;CACR,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edit Error Recovery Hook
|
|
3
|
-
*
|
|
4
|
-
* Detects Edit tool errors caused by AI mistakes and injects
|
|
5
|
-
* a recovery reminder to guide corrective action.
|
|
6
|
-
*
|
|
7
|
-
* Common Edit tool failures:
|
|
8
|
-
* - oldString and newString must be different (trying to "edit" to same content)
|
|
9
|
-
* - oldString not found (wrong assumption about file content)
|
|
10
|
-
* - oldString found multiple times (ambiguous match, need more context)
|
|
11
|
-
*
|
|
12
|
-
* Ported from oh-my-opencode's edit-error-recovery hook.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Known Edit tool error patterns that indicate the AI made a mistake
|
|
16
|
-
*/
|
|
17
|
-
export declare const EDIT_ERROR_PATTERNS: readonly ["oldString and newString must be different", "oldString not found", "oldString found multiple times", "old_string not found", "old_string and new_string must be different"];
|
|
18
|
-
/**
|
|
19
|
-
* System reminder injected when Edit tool fails due to AI mistake
|
|
20
|
-
* Short, direct, and commanding - forces immediate corrective action
|
|
21
|
-
*/
|
|
22
|
-
export declare const EDIT_ERROR_REMINDER = "\n[EDIT ERROR - IMMEDIATE ACTION REQUIRED]\n\nYou made an Edit mistake. STOP and do this NOW:\n\n1. READ the file immediately to see its ACTUAL current state\n2. VERIFY what the content really looks like (your assumption was wrong)\n3. APOLOGIZE briefly to the user for the error\n4. CONTINUE with corrected action based on the real file content\n\nDO NOT attempt another edit until you've read and verified the file state.\n";
|
|
23
|
-
/**
|
|
24
|
-
* Check if an output contains an edit error pattern
|
|
25
|
-
*/
|
|
26
|
-
export declare function detectEditError(output: string): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Inject the edit error recovery reminder into the output
|
|
29
|
-
*/
|
|
30
|
-
export declare function injectEditErrorRecovery(output: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Hook input interface for tool execution
|
|
33
|
-
*/
|
|
34
|
-
export interface ToolExecuteInput {
|
|
35
|
-
tool: string;
|
|
36
|
-
sessionId: string;
|
|
37
|
-
callId: string;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Hook output interface for tool execution
|
|
41
|
-
*/
|
|
42
|
-
export interface ToolExecuteOutput {
|
|
43
|
-
title: string;
|
|
44
|
-
output: string;
|
|
45
|
-
metadata?: unknown;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Creates the edit error recovery hook for Claude Code.
|
|
49
|
-
* This is the main export for hook registration.
|
|
50
|
-
*/
|
|
51
|
-
export declare function createEditErrorRecoveryHook(): {
|
|
52
|
-
/**
|
|
53
|
-
* After tool execution, check for Edit errors and inject recovery reminder.
|
|
54
|
-
*/
|
|
55
|
-
afterToolExecute: (input: ToolExecuteInput, output: ToolExecuteOutput) => ToolExecuteOutput;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Process edit tool output and inject recovery if needed.
|
|
59
|
-
* Simplified function for direct use without hook context.
|
|
60
|
-
*/
|
|
61
|
-
export declare function processEditOutput(toolName: string, output: string): string;
|
|
62
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/edit-error-recovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,wLAMtB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB,8aAW/B,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAKvD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAK9D;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,2BAA2B;IAEvC;;OAEG;8BAEM,gBAAgB,UACf,iBAAiB,KACxB,iBAAiB;EAevB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1E"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edit Error Recovery Hook
|
|
3
|
-
*
|
|
4
|
-
* Detects Edit tool errors caused by AI mistakes and injects
|
|
5
|
-
* a recovery reminder to guide corrective action.
|
|
6
|
-
*
|
|
7
|
-
* Common Edit tool failures:
|
|
8
|
-
* - oldString and newString must be different (trying to "edit" to same content)
|
|
9
|
-
* - oldString not found (wrong assumption about file content)
|
|
10
|
-
* - oldString found multiple times (ambiguous match, need more context)
|
|
11
|
-
*
|
|
12
|
-
* Ported from oh-my-opencode's edit-error-recovery hook.
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Known Edit tool error patterns that indicate the AI made a mistake
|
|
16
|
-
*/
|
|
17
|
-
export const EDIT_ERROR_PATTERNS = [
|
|
18
|
-
'oldString and newString must be different',
|
|
19
|
-
'oldString not found',
|
|
20
|
-
'oldString found multiple times',
|
|
21
|
-
'old_string not found',
|
|
22
|
-
'old_string and new_string must be different',
|
|
23
|
-
];
|
|
24
|
-
/**
|
|
25
|
-
* System reminder injected when Edit tool fails due to AI mistake
|
|
26
|
-
* Short, direct, and commanding - forces immediate corrective action
|
|
27
|
-
*/
|
|
28
|
-
export const EDIT_ERROR_REMINDER = `
|
|
29
|
-
[EDIT ERROR - IMMEDIATE ACTION REQUIRED]
|
|
30
|
-
|
|
31
|
-
You made an Edit mistake. STOP and do this NOW:
|
|
32
|
-
|
|
33
|
-
1. READ the file immediately to see its ACTUAL current state
|
|
34
|
-
2. VERIFY what the content really looks like (your assumption was wrong)
|
|
35
|
-
3. APOLOGIZE briefly to the user for the error
|
|
36
|
-
4. CONTINUE with corrected action based on the real file content
|
|
37
|
-
|
|
38
|
-
DO NOT attempt another edit until you've read and verified the file state.
|
|
39
|
-
`;
|
|
40
|
-
/**
|
|
41
|
-
* Check if an output contains an edit error pattern
|
|
42
|
-
*/
|
|
43
|
-
export function detectEditError(output) {
|
|
44
|
-
const outputLower = output.toLowerCase();
|
|
45
|
-
return EDIT_ERROR_PATTERNS.some((pattern) => outputLower.includes(pattern.toLowerCase()));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Inject the edit error recovery reminder into the output
|
|
49
|
-
*/
|
|
50
|
-
export function injectEditErrorRecovery(output) {
|
|
51
|
-
if (detectEditError(output)) {
|
|
52
|
-
return output + EDIT_ERROR_REMINDER;
|
|
53
|
-
}
|
|
54
|
-
return output;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Creates the edit error recovery hook for Claude Code.
|
|
58
|
-
* This is the main export for hook registration.
|
|
59
|
-
*/
|
|
60
|
-
export function createEditErrorRecoveryHook() {
|
|
61
|
-
return {
|
|
62
|
-
/**
|
|
63
|
-
* After tool execution, check for Edit errors and inject recovery reminder.
|
|
64
|
-
*/
|
|
65
|
-
afterToolExecute: (input, output) => {
|
|
66
|
-
if (input.tool.toLowerCase() !== 'edit') {
|
|
67
|
-
return output;
|
|
68
|
-
}
|
|
69
|
-
if (detectEditError(output.output)) {
|
|
70
|
-
return {
|
|
71
|
-
...output,
|
|
72
|
-
output: output.output + EDIT_ERROR_REMINDER,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
return output;
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Process edit tool output and inject recovery if needed.
|
|
81
|
-
* Simplified function for direct use without hook context.
|
|
82
|
-
*/
|
|
83
|
-
export function processEditOutput(toolName, output) {
|
|
84
|
-
if (toolName.toLowerCase() !== 'edit') {
|
|
85
|
-
return output;
|
|
86
|
-
}
|
|
87
|
-
return injectEditErrorRecovery(output);
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/edit-error-recovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,2CAA2C;IAC3C,qBAAqB;IACrB,gCAAgC;IAChC,sBAAsB;IACtB,6CAA6C;CACrC,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;CAWlC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACzC,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAC1C,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAC5C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAc;IACpD,IAAI,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,OAAO,MAAM,GAAG,mBAAmB,CAAC;IACtC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAoBD;;;GAGG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL;;WAEG;QACH,gBAAgB,EAAE,CAChB,KAAuB,EACvB,MAAyB,EACN,EAAE;YACrB,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;gBACxC,OAAO,MAAM,CAAC;YAChB,CAAC;YAED,IAAI,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnC,OAAO;oBACL,GAAG,MAAM;oBACT,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,mBAAmB;iBAC5C,CAAC;YACJ,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB,EAAE,MAAc;IAChE,IAAI,QAAQ,CAAC,WAAW,EAAE,KAAK,MAAM,EAAE,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Event Classifier
|
|
3
|
-
*
|
|
4
|
-
* Classifies GitHub issues and PRs into response categories based on labels and keywords.
|
|
5
|
-
*/
|
|
6
|
-
import type { ResponseCategory, WebhookPayload, GitHubLabel } from './types.js';
|
|
7
|
-
/**
|
|
8
|
-
* Classification result with category, confidence, and reasoning
|
|
9
|
-
*/
|
|
10
|
-
export interface ClassificationResult {
|
|
11
|
-
/** Classified response category */
|
|
12
|
-
category: ResponseCategory;
|
|
13
|
-
/** Confidence score (0-1) */
|
|
14
|
-
confidence: number;
|
|
15
|
-
/** Reasoning for classification */
|
|
16
|
-
reason: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Classifies based on GitHub labels
|
|
20
|
-
*
|
|
21
|
-
* @param labels - Array of GitHub labels
|
|
22
|
-
* @returns Classification result with high confidence (0.9) if label found, null otherwise
|
|
23
|
-
*/
|
|
24
|
-
export declare function classifyByLabel(labels: GitHubLabel[]): ClassificationResult | null;
|
|
25
|
-
/**
|
|
26
|
-
* Classifies based on keyword matching in title and body
|
|
27
|
-
*
|
|
28
|
-
* @param title - Issue/PR title
|
|
29
|
-
* @param body - Issue/PR body (may be null)
|
|
30
|
-
* @returns Classification result with confidence based on keyword matches
|
|
31
|
-
*/
|
|
32
|
-
export declare function classifyByKeywords(title: string, body: string | null): ClassificationResult;
|
|
33
|
-
/**
|
|
34
|
-
* Classifies a GitHub webhook payload into a response category
|
|
35
|
-
*
|
|
36
|
-
* Uses label-based classification first (high confidence), then falls back
|
|
37
|
-
* to keyword-based classification. Pull requests are always classified as 'pr'.
|
|
38
|
-
*
|
|
39
|
-
* @param payload - GitHub webhook payload
|
|
40
|
-
* @returns Classification result with category, confidence, and reasoning
|
|
41
|
-
*/
|
|
42
|
-
export declare function classify(payload: WebhookPayload): ClassificationResult;
|
|
43
|
-
//# sourceMappingURL=classifier.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../../src/hooks/github-auto-responder/classifier.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EAGd,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB;AA8CD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,WAAW,EAAE,GACpB,oBAAoB,GAAG,IAAI,CA+B7B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GAAG,IAAI,GAClB,oBAAoB,CAgDtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,oBAAoB,CAoBtE"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Event Classifier
|
|
3
|
-
*
|
|
4
|
-
* Classifies GitHub issues and PRs into response categories based on labels and keywords.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Keywords that indicate a bug report
|
|
8
|
-
*/
|
|
9
|
-
const BUG_KEYWORDS = [
|
|
10
|
-
'bug',
|
|
11
|
-
'error',
|
|
12
|
-
'crash',
|
|
13
|
-
'broken',
|
|
14
|
-
'fail',
|
|
15
|
-
'issue',
|
|
16
|
-
'problem',
|
|
17
|
-
'wrong',
|
|
18
|
-
'fix',
|
|
19
|
-
'not working',
|
|
20
|
-
];
|
|
21
|
-
/**
|
|
22
|
-
* Keywords that indicate a feature request
|
|
23
|
-
*/
|
|
24
|
-
const FEATURE_KEYWORDS = [
|
|
25
|
-
'feature',
|
|
26
|
-
'enhancement',
|
|
27
|
-
'request',
|
|
28
|
-
'add',
|
|
29
|
-
'implement',
|
|
30
|
-
'suggest',
|
|
31
|
-
'would be nice',
|
|
32
|
-
'wish',
|
|
33
|
-
];
|
|
34
|
-
/**
|
|
35
|
-
* Keywords that indicate a question
|
|
36
|
-
*/
|
|
37
|
-
const QUESTION_KEYWORDS = [
|
|
38
|
-
'how',
|
|
39
|
-
'why',
|
|
40
|
-
'what',
|
|
41
|
-
'when',
|
|
42
|
-
'where',
|
|
43
|
-
'help',
|
|
44
|
-
'question',
|
|
45
|
-
'?',
|
|
46
|
-
];
|
|
47
|
-
/**
|
|
48
|
-
* Classifies based on GitHub labels
|
|
49
|
-
*
|
|
50
|
-
* @param labels - Array of GitHub labels
|
|
51
|
-
* @returns Classification result with high confidence (0.9) if label found, null otherwise
|
|
52
|
-
*/
|
|
53
|
-
export function classifyByLabel(labels) {
|
|
54
|
-
const labelNames = labels.map((l) => l.name.toLowerCase());
|
|
55
|
-
if (labelNames.includes('bug')) {
|
|
56
|
-
return {
|
|
57
|
-
category: 'bug',
|
|
58
|
-
confidence: 0.9,
|
|
59
|
-
reason: 'Labeled as "bug"',
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
if (labelNames.includes('feature') ||
|
|
63
|
-
labelNames.includes('enhancement')) {
|
|
64
|
-
return {
|
|
65
|
-
category: 'feature',
|
|
66
|
-
confidence: 0.9,
|
|
67
|
-
reason: `Labeled as "${labelNames.includes('feature') ? 'feature' : 'enhancement'}"`,
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
if (labelNames.includes('question')) {
|
|
71
|
-
return {
|
|
72
|
-
category: 'question',
|
|
73
|
-
confidence: 0.9,
|
|
74
|
-
reason: 'Labeled as "question"',
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Classifies based on keyword matching in title and body
|
|
81
|
-
*
|
|
82
|
-
* @param title - Issue/PR title
|
|
83
|
-
* @param body - Issue/PR body (may be null)
|
|
84
|
-
* @returns Classification result with confidence based on keyword matches
|
|
85
|
-
*/
|
|
86
|
-
export function classifyByKeywords(title, body) {
|
|
87
|
-
const text = `${title} ${body || ''}`.toLowerCase();
|
|
88
|
-
// Count matches for each category
|
|
89
|
-
const bugMatches = BUG_KEYWORDS.filter((kw) => text.includes(kw)).length;
|
|
90
|
-
const featureMatches = FEATURE_KEYWORDS.filter((kw) => text.includes(kw)).length;
|
|
91
|
-
const questionMatches = QUESTION_KEYWORDS.filter((kw) => text.includes(kw)).length;
|
|
92
|
-
// Determine category with most matches
|
|
93
|
-
const maxMatches = Math.max(bugMatches, featureMatches, questionMatches);
|
|
94
|
-
// Calculate total unique keywords for confidence
|
|
95
|
-
const totalKeywords = BUG_KEYWORDS.length + FEATURE_KEYWORDS.length + QUESTION_KEYWORDS.length;
|
|
96
|
-
if (maxMatches === 0) {
|
|
97
|
-
return {
|
|
98
|
-
category: 'question',
|
|
99
|
-
confidence: 0.3,
|
|
100
|
-
reason: 'No keywords matched, defaulting to question',
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
if (bugMatches === maxMatches) {
|
|
104
|
-
return {
|
|
105
|
-
category: 'bug',
|
|
106
|
-
confidence: bugMatches / totalKeywords,
|
|
107
|
-
reason: `Matched ${bugMatches} bug keyword(s)`,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
if (featureMatches === maxMatches) {
|
|
111
|
-
return {
|
|
112
|
-
category: 'feature',
|
|
113
|
-
confidence: featureMatches / totalKeywords,
|
|
114
|
-
reason: `Matched ${featureMatches} feature keyword(s)`,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
return {
|
|
118
|
-
category: 'question',
|
|
119
|
-
confidence: questionMatches / totalKeywords,
|
|
120
|
-
reason: `Matched ${questionMatches} question keyword(s)`,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Classifies a GitHub webhook payload into a response category
|
|
125
|
-
*
|
|
126
|
-
* Uses label-based classification first (high confidence), then falls back
|
|
127
|
-
* to keyword-based classification. Pull requests are always classified as 'pr'.
|
|
128
|
-
*
|
|
129
|
-
* @param payload - GitHub webhook payload
|
|
130
|
-
* @returns Classification result with category, confidence, and reasoning
|
|
131
|
-
*/
|
|
132
|
-
export function classify(payload) {
|
|
133
|
-
// Check if it's a PR payload
|
|
134
|
-
if ('pull_request' in payload) {
|
|
135
|
-
return {
|
|
136
|
-
category: 'pr',
|
|
137
|
-
confidence: 1.0,
|
|
138
|
-
reason: 'Pull request detected',
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
// Issue payload - try label-based classification first
|
|
142
|
-
const issue = payload.issue;
|
|
143
|
-
const labelResult = classifyByLabel(issue.labels);
|
|
144
|
-
if (labelResult) {
|
|
145
|
-
return labelResult;
|
|
146
|
-
}
|
|
147
|
-
// Fall back to keyword-based classification
|
|
148
|
-
return classifyByKeywords(issue.title, issue.body);
|
|
149
|
-
}
|
|
150
|
-
//# sourceMappingURL=classifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classifier.js","sourceRoot":"","sources":["../../../src/hooks/github-auto-responder/classifier.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration loading and validation for GitHub Auto-Responder
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
import type { AutoResponderConfig } from './types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Zod schema for PersonaConfig validation
|
|
8
|
-
*/
|
|
9
|
-
export declare const PersonaConfigSchema: z.ZodObject<{
|
|
10
|
-
tone: z.ZodEnum<["formal", "friendly", "technical", "casual", "direct"]>;
|
|
11
|
-
technicalDepth: z.ZodEnum<["beginner", "intermediate", "expert", "high"]>;
|
|
12
|
-
language: z.ZodEnum<["en", "ko-mix"]>;
|
|
13
|
-
signatureEmoji: z.ZodString;
|
|
14
|
-
maintainerName: z.ZodString;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
language: "en" | "ko-mix";
|
|
17
|
-
tone: "formal" | "friendly" | "technical" | "casual" | "direct";
|
|
18
|
-
technicalDepth: "high" | "beginner" | "intermediate" | "expert";
|
|
19
|
-
signatureEmoji: string;
|
|
20
|
-
maintainerName: string;
|
|
21
|
-
}, {
|
|
22
|
-
language: "en" | "ko-mix";
|
|
23
|
-
tone: "formal" | "friendly" | "technical" | "casual" | "direct";
|
|
24
|
-
technicalDepth: "high" | "beginner" | "intermediate" | "expert";
|
|
25
|
-
signatureEmoji: string;
|
|
26
|
-
maintainerName: string;
|
|
27
|
-
}>;
|
|
28
|
-
/**
|
|
29
|
-
* Zod schema for AutoResponderConfig validation
|
|
30
|
-
*/
|
|
31
|
-
export declare const AutoResponderConfigSchema: z.ZodObject<{
|
|
32
|
-
webhookSecret: z.ZodString;
|
|
33
|
-
githubToken: z.ZodString;
|
|
34
|
-
anthropicApiKey: z.ZodString;
|
|
35
|
-
selfLogin: z.ZodString;
|
|
36
|
-
mode: z.ZodDefault<z.ZodEnum<["draft", "auto"]>>;
|
|
37
|
-
persona: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
38
|
-
tone: z.ZodEnum<["formal", "friendly", "technical", "casual", "direct"]>;
|
|
39
|
-
technicalDepth: z.ZodEnum<["beginner", "intermediate", "expert", "high"]>;
|
|
40
|
-
language: z.ZodEnum<["en", "ko-mix"]>;
|
|
41
|
-
signatureEmoji: z.ZodString;
|
|
42
|
-
maintainerName: z.ZodString;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
language: "en" | "ko-mix";
|
|
45
|
-
tone: "formal" | "friendly" | "technical" | "casual" | "direct";
|
|
46
|
-
technicalDepth: "high" | "beginner" | "intermediate" | "expert";
|
|
47
|
-
signatureEmoji: string;
|
|
48
|
-
maintainerName: string;
|
|
49
|
-
}, {
|
|
50
|
-
language: "en" | "ko-mix";
|
|
51
|
-
tone: "formal" | "friendly" | "technical" | "casual" | "direct";
|
|
52
|
-
technicalDepth: "high" | "beginner" | "intermediate" | "expert";
|
|
53
|
-
signatureEmoji: string;
|
|
54
|
-
maintainerName: string;
|
|
55
|
-
}>>>;
|
|
56
|
-
port: z.ZodDefault<z.ZodNumber>;
|
|
57
|
-
skipLabels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
58
|
-
spamPatterns: z.ZodOptional<z.ZodArray<z.ZodType<RegExp, z.ZodTypeDef, RegExp>, "many">>;
|
|
59
|
-
idempotencyDbPath: z.ZodDefault<z.ZodString>;
|
|
60
|
-
maxResponseTokens: z.ZodDefault<z.ZodNumber>;
|
|
61
|
-
llmModel: z.ZodDefault<z.ZodString>;
|
|
62
|
-
}, "strip", z.ZodTypeAny, {
|
|
63
|
-
port: number;
|
|
64
|
-
mode: "auto" | "draft";
|
|
65
|
-
webhookSecret: string;
|
|
66
|
-
githubToken: string;
|
|
67
|
-
anthropicApiKey: string;
|
|
68
|
-
selfLogin: string;
|
|
69
|
-
persona: {
|
|
70
|
-
language: "en" | "ko-mix";
|
|
71
|
-
tone: "formal" | "friendly" | "technical" | "casual" | "direct";
|
|
72
|
-
technicalDepth: "high" | "beginner" | "intermediate" | "expert";
|
|
73
|
-
signatureEmoji: string;
|
|
74
|
-
maintainerName: string;
|
|
75
|
-
};
|
|
76
|
-
skipLabels: string[];
|
|
77
|
-
idempotencyDbPath: string;
|
|
78
|
-
maxResponseTokens: number;
|
|
79
|
-
llmModel: string;
|
|
80
|
-
spamPatterns?: RegExp[] | undefined;
|
|
81
|
-
}, {
|
|
82
|
-
webhookSecret: string;
|
|
83
|
-
githubToken: string;
|
|
84
|
-
anthropicApiKey: string;
|
|
85
|
-
selfLogin: string;
|
|
86
|
-
port?: number | undefined;
|
|
87
|
-
mode?: "auto" | "draft" | undefined;
|
|
88
|
-
persona?: {
|
|
89
|
-
language: "en" | "ko-mix";
|
|
90
|
-
tone: "formal" | "friendly" | "technical" | "casual" | "direct";
|
|
91
|
-
technicalDepth: "high" | "beginner" | "intermediate" | "expert";
|
|
92
|
-
signatureEmoji: string;
|
|
93
|
-
maintainerName: string;
|
|
94
|
-
} | undefined;
|
|
95
|
-
skipLabels?: string[] | undefined;
|
|
96
|
-
spamPatterns?: RegExp[] | undefined;
|
|
97
|
-
idempotencyDbPath?: string | undefined;
|
|
98
|
-
maxResponseTokens?: number | undefined;
|
|
99
|
-
llmModel?: string | undefined;
|
|
100
|
-
}>;
|
|
101
|
-
/**
|
|
102
|
-
* Load configuration from environment variables
|
|
103
|
-
*/
|
|
104
|
-
export declare function loadConfigFromEnv(): Partial<AutoResponderConfig>;
|
|
105
|
-
/**
|
|
106
|
-
* Load and validate configuration from environment and optional overrides
|
|
107
|
-
*/
|
|
108
|
-
export declare function loadConfig(overrides?: Partial<AutoResponderConfig>): AutoResponderConfig;
|
|
109
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/hooks/github-auto-responder/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,YAAY,CAAC;AASrE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAapC,CAAC;AAEH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CA+BhE;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACvC,mBAAmB,CAKrB"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration loading and validation for GitHub Auto-Responder
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
import { DEFAULT_PERSONA, DEFAULT_PORT, DEFAULT_SKIP_LABELS, DEFAULT_MAX_RESPONSE_TOKENS, DEFAULT_LLM_MODEL, } from './constants.js';
|
|
6
|
-
/**
|
|
7
|
-
* Zod schema for PersonaConfig validation
|
|
8
|
-
*/
|
|
9
|
-
export const PersonaConfigSchema = z.object({
|
|
10
|
-
tone: z.enum(['formal', 'friendly', 'technical', 'casual', 'direct']),
|
|
11
|
-
technicalDepth: z.enum(['beginner', 'intermediate', 'expert', 'high']),
|
|
12
|
-
language: z.enum(['en', 'ko-mix']),
|
|
13
|
-
signatureEmoji: z.string(),
|
|
14
|
-
maintainerName: z.string().min(1),
|
|
15
|
-
});
|
|
16
|
-
/**
|
|
17
|
-
* Zod schema for AutoResponderConfig validation
|
|
18
|
-
*/
|
|
19
|
-
export const AutoResponderConfigSchema = z.object({
|
|
20
|
-
webhookSecret: z.string().min(1),
|
|
21
|
-
githubToken: z.string().min(1),
|
|
22
|
-
anthropicApiKey: z.string().min(1),
|
|
23
|
-
selfLogin: z.string().min(1),
|
|
24
|
-
mode: z.enum(['draft', 'auto']).default('draft'),
|
|
25
|
-
persona: PersonaConfigSchema.optional().default(DEFAULT_PERSONA),
|
|
26
|
-
port: z.number().default(DEFAULT_PORT),
|
|
27
|
-
skipLabels: z.array(z.string()).default(DEFAULT_SKIP_LABELS),
|
|
28
|
-
spamPatterns: z.array(z.instanceof(RegExp)).optional(),
|
|
29
|
-
idempotencyDbPath: z.string().default('.omc/state/github-auto-responder.db'),
|
|
30
|
-
maxResponseTokens: z.number().default(DEFAULT_MAX_RESPONSE_TOKENS),
|
|
31
|
-
llmModel: z.string().default(DEFAULT_LLM_MODEL),
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* Load configuration from environment variables
|
|
35
|
-
*/
|
|
36
|
-
export function loadConfigFromEnv() {
|
|
37
|
-
const config = {};
|
|
38
|
-
if (process.env.GITHUB_WEBHOOK_SECRET) {
|
|
39
|
-
config.webhookSecret = process.env.GITHUB_WEBHOOK_SECRET;
|
|
40
|
-
}
|
|
41
|
-
if (process.env.GITHUB_TOKEN) {
|
|
42
|
-
config.githubToken = process.env.GITHUB_TOKEN;
|
|
43
|
-
}
|
|
44
|
-
if (process.env.ANTHROPIC_API_KEY) {
|
|
45
|
-
config.anthropicApiKey = process.env.ANTHROPIC_API_KEY;
|
|
46
|
-
}
|
|
47
|
-
if (process.env.GITHUB_SELF_LOGIN) {
|
|
48
|
-
config.selfLogin = process.env.GITHUB_SELF_LOGIN;
|
|
49
|
-
}
|
|
50
|
-
if (process.env.AUTO_RESPONDER_MODE) {
|
|
51
|
-
config.mode = process.env.AUTO_RESPONDER_MODE;
|
|
52
|
-
}
|
|
53
|
-
if (process.env.AUTO_RESPONDER_PORT) {
|
|
54
|
-
const port = parseInt(process.env.AUTO_RESPONDER_PORT, 10);
|
|
55
|
-
if (!isNaN(port)) {
|
|
56
|
-
config.port = port;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return config;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Load and validate configuration from environment and optional overrides
|
|
63
|
-
*/
|
|
64
|
-
export function loadConfig(overrides) {
|
|
65
|
-
const envConfig = loadConfigFromEnv();
|
|
66
|
-
const mergedConfig = { ...envConfig, ...overrides };
|
|
67
|
-
return AutoResponderConfigSchema.parse(mergedConfig);
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=config.js.map
|