olympus-ai 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/hooks/bundle.test.d.ts +2 -0
- package/dist/__tests__/hooks/bundle.test.d.ts.map +1 -0
- package/dist/__tests__/hooks/bundle.test.js +120 -0
- package/dist/__tests__/hooks/bundle.test.js.map +1 -0
- package/dist/__tests__/hooks/integration.test.d.ts +2 -0
- package/dist/__tests__/hooks/integration.test.d.ts.map +1 -0
- package/dist/__tests__/hooks/integration.test.js +132 -0
- package/dist/__tests__/hooks/integration.test.js.map +1 -0
- package/dist/__tests__/hooks/performance.test.d.ts +2 -0
- package/dist/__tests__/hooks/performance.test.d.ts.map +1 -0
- package/dist/__tests__/hooks/performance.test.js +266 -0
- package/dist/__tests__/hooks/performance.test.js.map +1 -0
- package/dist/__tests__/hooks/router.test.d.ts +2 -0
- package/dist/__tests__/hooks/router.test.d.ts.map +1 -0
- package/dist/__tests__/hooks/router.test.js +793 -0
- package/dist/__tests__/hooks/router.test.js.map +1 -0
- package/dist/hooks/config.d.ts +47 -0
- package/dist/hooks/config.d.ts.map +1 -0
- package/dist/hooks/config.js +120 -0
- package/dist/hooks/config.js.map +1 -0
- package/dist/hooks/entry.d.ts +17 -0
- package/dist/hooks/entry.d.ts.map +1 -0
- package/dist/hooks/entry.js +66 -0
- package/dist/hooks/entry.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/olympus-hooks.cjs +653 -0
- package/dist/hooks/registrations/index.d.ts +25 -0
- package/dist/hooks/registrations/index.d.ts.map +1 -0
- package/dist/hooks/registrations/index.js +43 -0
- package/dist/hooks/registrations/index.js.map +1 -0
- package/dist/hooks/registrations/messages-transform.d.ts +8 -0
- package/dist/hooks/registrations/messages-transform.d.ts.map +1 -0
- package/dist/hooks/registrations/messages-transform.js +63 -0
- package/dist/hooks/registrations/messages-transform.js.map +1 -0
- package/dist/hooks/registrations/notification.d.ts +7 -0
- package/dist/hooks/registrations/notification.d.ts.map +1 -0
- package/dist/hooks/registrations/notification.js +34 -0
- package/dist/hooks/registrations/notification.js.map +1 -0
- package/dist/hooks/registrations/post-tool-use.d.ts +18 -0
- package/dist/hooks/registrations/post-tool-use.d.ts.map +1 -0
- package/dist/hooks/registrations/post-tool-use.js +198 -0
- package/dist/hooks/registrations/post-tool-use.js.map +1 -0
- package/dist/hooks/registrations/pre-tool-use.d.ts +11 -0
- package/dist/hooks/registrations/pre-tool-use.d.ts.map +1 -0
- package/dist/hooks/registrations/pre-tool-use.js +102 -0
- package/dist/hooks/registrations/pre-tool-use.js.map +1 -0
- package/dist/hooks/registrations/session-start.d.ts +7 -0
- package/dist/hooks/registrations/session-start.d.ts.map +1 -0
- package/dist/hooks/registrations/session-start.js +60 -0
- package/dist/hooks/registrations/session-start.js.map +1 -0
- package/dist/hooks/registrations/stop.d.ts +8 -0
- package/dist/hooks/registrations/stop.d.ts.map +1 -0
- package/dist/hooks/registrations/stop.js +28 -0
- package/dist/hooks/registrations/stop.js.map +1 -0
- package/dist/hooks/registrations/user-prompt-submit.d.ts +7 -0
- package/dist/hooks/registrations/user-prompt-submit.d.ts.map +1 -0
- package/dist/hooks/registrations/user-prompt-submit.js +114 -0
- package/dist/hooks/registrations/user-prompt-submit.js.map +1 -0
- package/dist/hooks/registry.d.ts +39 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/registry.js +58 -0
- package/dist/hooks/registry.js.map +1 -0
- package/dist/hooks/router.d.ts +31 -0
- package/dist/hooks/router.d.ts.map +1 -0
- package/dist/hooks/router.js +155 -0
- package/dist/hooks/router.js.map +1 -0
- package/dist/hooks/types.d.ts +102 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks/types.js +8 -0
- package/dist/hooks/types.js.map +1 -0
- package/dist/installer/default-config.d.ts +112 -0
- package/dist/installer/default-config.d.ts.map +1 -0
- package/dist/installer/default-config.js +153 -0
- package/dist/installer/default-config.js.map +1 -0
- package/dist/installer/hooks.d.ts +104 -0
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +80 -0
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +5 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +2108 -2064
- package/dist/installer/index.js.map +1 -1
- package/dist/installer/migrate.d.ts +28 -0
- package/dist/installer/migrate.d.ts.map +1 -0
- package/dist/installer/migrate.js +99 -0
- package/dist/installer/migrate.js.map +1 -0
- package/dist/shared/types.d.ts +60 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/package.json +3 -1
- package/.claude/agents/document-writer.md +0 -152
- package/.claude/agents/explore-medium.md +0 -25
- package/.claude/agents/explore.md +0 -86
- package/.claude/agents/frontend-engineer-high.md +0 -24
- package/.claude/agents/frontend-engineer-low.md +0 -23
- package/.claude/agents/frontend-engineer.md +0 -89
- package/.claude/agents/librarian-low.md +0 -22
- package/.claude/agents/librarian.md +0 -70
- package/.claude/agents/metis.md +0 -85
- package/.claude/agents/momus.md +0 -97
- package/.claude/agents/multimodal-looker.md +0 -39
- package/.claude/agents/olympian-high.md +0 -39
- package/.claude/agents/olympian-low.md +0 -29
- package/.claude/agents/olympian.md +0 -71
- package/.claude/agents/oracle-low.md +0 -23
- package/.claude/agents/oracle-medium.md +0 -28
- package/.claude/agents/oracle.md +0 -77
- package/.claude/agents/prometheus.md +0 -126
- package/.claude/agents/qa-tester.md +0 -220
- package/.claude/commands/analyze/skill.md +0 -14
- package/.claude/commands/analyze.md +0 -14
- package/.claude/commands/ascent/skill.md +0 -152
- package/.claude/commands/ascent.md +0 -152
- package/.claude/commands/cancel-ascent.md +0 -9
- package/.claude/commands/complete-plan.md +0 -101
- package/.claude/commands/deepinit.md +0 -114
- package/.claude/commands/deepsearch/skill.md +0 -15
- package/.claude/commands/deepsearch.md +0 -15
- package/.claude/commands/doctor.md +0 -190
- package/.claude/commands/olympus/skill.md +0 -82
- package/.claude/commands/olympus-default.md +0 -26
- package/.claude/commands/plan.md +0 -37
- package/.claude/commands/prometheus/skill.md +0 -41
- package/.claude/commands/prometheus.md +0 -41
- package/.claude/commands/review/skill.md +0 -40
- package/.claude/commands/review.md +0 -40
- package/.claude/commands/ultrawork/skill.md +0 -90
- package/.claude/commands/ultrawork.md +0 -90
- package/.claude/commands/update.md +0 -38
- package/dist/features/boulder-state/constants.d.ts +0 -20
- package/dist/features/boulder-state/constants.d.ts.map +0 -1
- package/dist/features/boulder-state/constants.js +0 -20
- package/dist/features/boulder-state/constants.js.map +0 -1
- package/dist/features/boulder-state/index.d.ts +0 -12
- package/dist/features/boulder-state/index.d.ts.map +0 -1
- package/dist/features/boulder-state/index.js +0 -13
- package/dist/features/boulder-state/index.js.map +0 -1
- package/dist/features/boulder-state/storage.d.ts +0 -58
- package/dist/features/boulder-state/storage.d.ts.map +0 -1
- package/dist/features/boulder-state/storage.js +0 -174
- package/dist/features/boulder-state/storage.js.map +0 -1
- package/dist/features/boulder-state/types.d.ts +0 -48
- package/dist/features/boulder-state/types.d.ts.map +0 -1
- package/dist/features/boulder-state/types.js +0 -10
- package/dist/features/boulder-state/types.js.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Registrations - Master Index
|
|
3
|
+
*
|
|
4
|
+
* Imports all hook registration modules and provides a single
|
|
5
|
+
* function to register all hooks with the router.
|
|
6
|
+
*/
|
|
7
|
+
import { registerUserPromptSubmitHooks } from './user-prompt-submit.js';
|
|
8
|
+
import { registerSessionStartHooks } from './session-start.js';
|
|
9
|
+
import { registerStopHooks } from './stop.js';
|
|
10
|
+
import { registerPreToolUseHooks } from './pre-tool-use.js';
|
|
11
|
+
import { registerPostToolUseHooks } from './post-tool-use.js';
|
|
12
|
+
import { registerNotificationHooks } from './notification.js';
|
|
13
|
+
import { registerMessagesTransformHooks } from './messages-transform.js';
|
|
14
|
+
/**
|
|
15
|
+
* Register all hooks with the router.
|
|
16
|
+
* Safe to call multiple times (idempotent).
|
|
17
|
+
*/
|
|
18
|
+
export declare function registerAllHooks(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Reset registration flag.
|
|
21
|
+
* Primarily used for testing.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resetRegistration(): void;
|
|
24
|
+
export { registerUserPromptSubmitHooks, registerSessionStartHooks, registerStopHooks, registerPreToolUseHooks, registerPostToolUseHooks, registerNotificationHooks, registerMessagesTransformHooks, };
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAKzE;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAevC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAExC;AAGD,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,GAC/B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook Registrations - Master Index
|
|
3
|
+
*
|
|
4
|
+
* Imports all hook registration modules and provides a single
|
|
5
|
+
* function to register all hooks with the router.
|
|
6
|
+
*/
|
|
7
|
+
import { registerUserPromptSubmitHooks } from './user-prompt-submit.js';
|
|
8
|
+
import { registerSessionStartHooks } from './session-start.js';
|
|
9
|
+
import { registerStopHooks } from './stop.js';
|
|
10
|
+
import { registerPreToolUseHooks } from './pre-tool-use.js';
|
|
11
|
+
import { registerPostToolUseHooks } from './post-tool-use.js';
|
|
12
|
+
import { registerNotificationHooks } from './notification.js';
|
|
13
|
+
import { registerMessagesTransformHooks } from './messages-transform.js';
|
|
14
|
+
/** Flag to prevent double registration */
|
|
15
|
+
let registered = false;
|
|
16
|
+
/**
|
|
17
|
+
* Register all hooks with the router.
|
|
18
|
+
* Safe to call multiple times (idempotent).
|
|
19
|
+
*/
|
|
20
|
+
export function registerAllHooks() {
|
|
21
|
+
if (registered) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
// Register hooks by event type
|
|
25
|
+
registerUserPromptSubmitHooks();
|
|
26
|
+
registerSessionStartHooks();
|
|
27
|
+
registerStopHooks();
|
|
28
|
+
registerPreToolUseHooks();
|
|
29
|
+
registerPostToolUseHooks();
|
|
30
|
+
registerNotificationHooks();
|
|
31
|
+
registerMessagesTransformHooks();
|
|
32
|
+
registered = true;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Reset registration flag.
|
|
36
|
+
* Primarily used for testing.
|
|
37
|
+
*/
|
|
38
|
+
export function resetRegistration() {
|
|
39
|
+
registered = false;
|
|
40
|
+
}
|
|
41
|
+
// Re-export individual registration functions for selective use
|
|
42
|
+
export { registerUserPromptSubmitHooks, registerSessionStartHooks, registerStopHooks, registerPreToolUseHooks, registerPostToolUseHooks, registerNotificationHooks, registerMessagesTransformHooks, };
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/registrations/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAEzE,0CAA0C;AAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;AAEvB;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI,UAAU,EAAE,CAAC;QACf,OAAO;IACT,CAAC;IAED,+BAA+B;IAC/B,6BAA6B,EAAE,CAAC;IAChC,yBAAyB,EAAE,CAAC;IAC5B,iBAAiB,EAAE,CAAC;IACpB,uBAAuB,EAAE,CAAC;IAC1B,wBAAwB,EAAE,CAAC;IAC3B,yBAAyB,EAAE,CAAC;IAC5B,8BAA8B,EAAE,CAAC;IAEjC,UAAU,GAAG,IAAI,CAAC;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,UAAU,GAAG,KAAK,CAAC;AACrB,CAAC;AAED,gEAAgE;AAChE,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,GAC/B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MessagesTransform Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that transform messages before they are sent to the model.
|
|
5
|
+
* Used for fixing empty messages and validating thinking blocks.
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerMessagesTransformHooks(): void;
|
|
8
|
+
//# sourceMappingURL=messages-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages-transform.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/messages-transform.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,wBAAgB,8BAA8B,IAAI,IAAI,CAiErD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MessagesTransform Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that transform messages before they are sent to the model.
|
|
5
|
+
* Used for fixing empty messages and validating thinking blocks.
|
|
6
|
+
*/
|
|
7
|
+
import { registerHook } from '../registry.js';
|
|
8
|
+
import { createEmptyMessageSanitizerHook } from '../empty-message-sanitizer/index.js';
|
|
9
|
+
import { createThinkingBlockValidatorHook } from '../thinking-block-validator/index.js';
|
|
10
|
+
export function registerMessagesTransformHooks() {
|
|
11
|
+
// Thinking Block Validator (runs first to fix structure)
|
|
12
|
+
registerHook({
|
|
13
|
+
name: 'thinkingBlockValidator',
|
|
14
|
+
event: 'MessagesTransform',
|
|
15
|
+
priority: 10,
|
|
16
|
+
handler: async (ctx) => {
|
|
17
|
+
if (!ctx.messages || ctx.messages.length === 0) {
|
|
18
|
+
return { continue: true };
|
|
19
|
+
}
|
|
20
|
+
const hook = createThinkingBlockValidatorHook();
|
|
21
|
+
// Create a copy of messages for transformation
|
|
22
|
+
const messages = [...ctx.messages];
|
|
23
|
+
// The hook transforms messages in-place
|
|
24
|
+
const transformContext = { messages };
|
|
25
|
+
const transformFn = hook['experimental.chat.messages.transform'];
|
|
26
|
+
if (transformFn) {
|
|
27
|
+
await transformFn({}, transformContext);
|
|
28
|
+
}
|
|
29
|
+
// Check if any messages were fixed by comparing counts
|
|
30
|
+
const fixedCount = transformContext.messages.filter((msg) => msg.parts.some(part => part.synthetic && part.type === 'thinking')).length;
|
|
31
|
+
if (fixedCount > 0) {
|
|
32
|
+
return {
|
|
33
|
+
continue: true,
|
|
34
|
+
modifiedMessages: transformContext.messages,
|
|
35
|
+
message: `[Thinking Block Validator] Fixed ${fixedCount} message(s) by adding thinking blocks`
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
return { continue: true };
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
// Empty Message Sanitizer (runs second to fix empty content)
|
|
42
|
+
registerHook({
|
|
43
|
+
name: 'emptyMessageSanitizer',
|
|
44
|
+
event: 'MessagesTransform',
|
|
45
|
+
priority: 20,
|
|
46
|
+
handler: (ctx) => {
|
|
47
|
+
if (!ctx.messages || ctx.messages.length === 0) {
|
|
48
|
+
return { continue: true };
|
|
49
|
+
}
|
|
50
|
+
const hook = createEmptyMessageSanitizerHook();
|
|
51
|
+
const result = hook.sanitize({ messages: ctx.messages });
|
|
52
|
+
if (result.modified) {
|
|
53
|
+
return {
|
|
54
|
+
continue: true,
|
|
55
|
+
modifiedMessages: result.messages,
|
|
56
|
+
message: `[Empty Message Sanitizer] Fixed ${result.sanitizedCount} message(s) with empty content`
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return { continue: true };
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=messages-transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages-transform.js","sourceRoot":"","sources":["../../../src/hooks/registrations/messages-transform.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAIxF,MAAM,UAAU,8BAA8B;IAC5C,yDAAyD;IACzD,YAAY,CAAC;QACX,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,EAAE;QACZ,OAAO,EA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AE;YACxC,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC/C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC5B,CAAC;YAED,MAAM,IAAI,GAAG,+BAA+B,EAAE,CAAC;YAC/C,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,QAA8B,EAAE,CAAC,CAAC;YAE/E,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACpB,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,gBAAgB,EAAE,MAAM,CAAC,QAAQ;oBACjC,OAAO,EAAE,mCAAmC,MAAM,CAAC,cAAc,gCAAgC;iBAClG,CAAC;YACJ,CAAC;YAED,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/notification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,wBAAgB,yBAAyB,IAAI,IAAI,CA2BhD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that fire when notifications are received (e.g., background task completion).
|
|
5
|
+
*/
|
|
6
|
+
import { registerHook } from '../registry.js';
|
|
7
|
+
import { processBackgroundNotification } from '../background-notification/index.js';
|
|
8
|
+
export function registerNotificationHooks() {
|
|
9
|
+
// Background Notification (surface background task results)
|
|
10
|
+
registerHook({
|
|
11
|
+
name: 'backgroundNotification',
|
|
12
|
+
event: 'Notification',
|
|
13
|
+
priority: 10,
|
|
14
|
+
handler: async (ctx) => {
|
|
15
|
+
// Map HookContext to BackgroundNotificationHookInput
|
|
16
|
+
const input = {
|
|
17
|
+
sessionId: ctx.sessionId,
|
|
18
|
+
directory: ctx.directory,
|
|
19
|
+
event: ctx.event ? {
|
|
20
|
+
type: ctx.event.type,
|
|
21
|
+
properties: ctx.event.properties
|
|
22
|
+
} : undefined,
|
|
23
|
+
};
|
|
24
|
+
// Process the notification
|
|
25
|
+
const result = await processBackgroundNotification(input);
|
|
26
|
+
// Map BackgroundNotificationHookOutput to HookResult
|
|
27
|
+
return {
|
|
28
|
+
continue: result.continue,
|
|
29
|
+
message: result.message,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../src/hooks/registrations/notification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAIpF,MAAM,UAAU,yBAAyB;IACvC,4DAA4D;IAC5D,YAAY,CAAC;QACX,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,KAAK,EAAE,GAAgB,EAAuB,EAAE;YACvD,qDAAqD;YACrD,MAAM,KAAK,GAAoC;gBAC7C,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,SAAS,EAAE,GAAG,CAAC,SAAS;gBACxB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;oBACjB,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI;oBACpB,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,UAAiD;iBACxE,CAAC,CAAC,CAAC,SAAS;aACd,CAAC;YAEF,2BAA2B;YAC3B,MAAM,MAAM,GAAG,MAAM,6BAA6B,CAAC,KAAK,CAAC,CAAC;YAE1D,qDAAqD;YACrD,OAAO;gBACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostToolUse Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that fire after a tool is executed.
|
|
5
|
+
* Can provide feedback, recovery guidance, or reminders.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Register all PostToolUse hooks.
|
|
9
|
+
* Hooks are processed in priority order:
|
|
10
|
+
* - 10: editErrorRecovery (edit tool errors)
|
|
11
|
+
* - 20: commentChecker (write/edit/multiedit comment detection)
|
|
12
|
+
* - 30: contextWindowLimitRecovery (all tools, context limit errors)
|
|
13
|
+
* - 40: preemptiveCompaction (large output tools)
|
|
14
|
+
* - 50: agentUsageReminder (search/fetch tools)
|
|
15
|
+
* - 60: olympusOrchestratorPost (write/edit/bash/task tools)
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerPostToolUseHooks(): void;
|
|
18
|
+
//# sourceMappingURL=post-tool-use.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-tool-use.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/post-tool-use.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAkN/C"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PostToolUse Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that fire after a tool is executed.
|
|
5
|
+
* Can provide feedback, recovery guidance, or reminders.
|
|
6
|
+
*/
|
|
7
|
+
import { registerHook } from '../registry.js';
|
|
8
|
+
import { createEditErrorRecoveryHook } from '../edit-error-recovery/index.js';
|
|
9
|
+
import { createCommentCheckerHook } from '../comment-checker/index.js';
|
|
10
|
+
import { createContextLimitRecoveryHook } from '../context-window-limit-recovery/index.js';
|
|
11
|
+
import { createPreemptiveCompactionHook } from '../preemptive-compaction/index.js';
|
|
12
|
+
import { createAgentUsageReminderHook } from '../agent-usage-reminder/index.js';
|
|
13
|
+
import { createOlympusOrchestratorHook } from '../olympus-orchestrator/index.js';
|
|
14
|
+
/**
|
|
15
|
+
* Register all PostToolUse hooks.
|
|
16
|
+
* Hooks are processed in priority order:
|
|
17
|
+
* - 10: editErrorRecovery (edit tool errors)
|
|
18
|
+
* - 20: commentChecker (write/edit/multiedit comment detection)
|
|
19
|
+
* - 30: contextWindowLimitRecovery (all tools, context limit errors)
|
|
20
|
+
* - 40: preemptiveCompaction (large output tools)
|
|
21
|
+
* - 50: agentUsageReminder (search/fetch tools)
|
|
22
|
+
* - 60: olympusOrchestratorPost (write/edit/bash/task tools)
|
|
23
|
+
*/
|
|
24
|
+
export function registerPostToolUseHooks() {
|
|
25
|
+
const workDir = process.cwd();
|
|
26
|
+
// 1. Edit Error Recovery - priority 10, matcher: edit
|
|
27
|
+
const editErrorRecovery = createEditErrorRecoveryHook();
|
|
28
|
+
registerHook({
|
|
29
|
+
name: 'editErrorRecovery',
|
|
30
|
+
event: 'PostToolUse',
|
|
31
|
+
matcher: /^edit$/i,
|
|
32
|
+
priority: 10,
|
|
33
|
+
handler: async (ctx) => {
|
|
34
|
+
if (!ctx.toolName || !ctx.toolOutput) {
|
|
35
|
+
return { continue: true };
|
|
36
|
+
}
|
|
37
|
+
const output = editErrorRecovery.afterToolExecute({
|
|
38
|
+
tool: ctx.toolName,
|
|
39
|
+
sessionId: ctx.sessionId || '',
|
|
40
|
+
callId: '',
|
|
41
|
+
}, {
|
|
42
|
+
title: '',
|
|
43
|
+
output: String(ctx.toolOutput),
|
|
44
|
+
metadata: undefined,
|
|
45
|
+
});
|
|
46
|
+
if (output.output !== String(ctx.toolOutput)) {
|
|
47
|
+
return {
|
|
48
|
+
continue: true,
|
|
49
|
+
message: output.output.substring(String(ctx.toolOutput).length),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return { continue: true };
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
// 2. Comment Checker - priority 20, matcher: write/edit/multiedit
|
|
56
|
+
const commentChecker = createCommentCheckerHook();
|
|
57
|
+
registerHook({
|
|
58
|
+
name: 'commentChecker',
|
|
59
|
+
event: 'PostToolUse',
|
|
60
|
+
matcher: /^(write|edit|multiedit)$/i,
|
|
61
|
+
priority: 20,
|
|
62
|
+
handler: async (ctx) => {
|
|
63
|
+
if (!ctx.toolName) {
|
|
64
|
+
return { continue: true };
|
|
65
|
+
}
|
|
66
|
+
const message = commentChecker.postToolUse({
|
|
67
|
+
tool_name: ctx.toolName,
|
|
68
|
+
session_id: ctx.sessionId || '',
|
|
69
|
+
tool_input: ctx.toolInput || {},
|
|
70
|
+
tool_response: ctx.toolOutput ? String(ctx.toolOutput) : undefined,
|
|
71
|
+
});
|
|
72
|
+
if (message) {
|
|
73
|
+
return {
|
|
74
|
+
continue: true,
|
|
75
|
+
message,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
return { continue: true };
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
// 3. Context Window Limit Recovery - priority 30, all tools
|
|
82
|
+
const contextLimitRecovery = createContextLimitRecoveryHook();
|
|
83
|
+
registerHook({
|
|
84
|
+
name: 'contextWindowLimitRecovery',
|
|
85
|
+
event: 'PostToolUse',
|
|
86
|
+
priority: 30,
|
|
87
|
+
handler: async (ctx) => {
|
|
88
|
+
if (!ctx.toolName) {
|
|
89
|
+
return { continue: true };
|
|
90
|
+
}
|
|
91
|
+
const message = contextLimitRecovery.postToolUse({
|
|
92
|
+
tool_name: ctx.toolName,
|
|
93
|
+
session_id: ctx.sessionId || '',
|
|
94
|
+
tool_input: ctx.toolInput || {},
|
|
95
|
+
tool_response: ctx.toolOutput ? String(ctx.toolOutput) : undefined,
|
|
96
|
+
});
|
|
97
|
+
if (message) {
|
|
98
|
+
return {
|
|
99
|
+
continue: true,
|
|
100
|
+
message,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
return { continue: true };
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
// 4. Preemptive Compaction - priority 40, matcher: read/grep/glob/bash/webfetch
|
|
107
|
+
const preemptiveCompaction = createPreemptiveCompactionHook();
|
|
108
|
+
registerHook({
|
|
109
|
+
name: 'preemptiveCompaction',
|
|
110
|
+
event: 'PostToolUse',
|
|
111
|
+
matcher: /^(read|grep|glob|bash|webfetch)$/i,
|
|
112
|
+
priority: 40,
|
|
113
|
+
handler: async (ctx) => {
|
|
114
|
+
if (!ctx.toolName) {
|
|
115
|
+
return { continue: true };
|
|
116
|
+
}
|
|
117
|
+
const message = preemptiveCompaction.postToolUse({
|
|
118
|
+
tool_name: ctx.toolName,
|
|
119
|
+
session_id: ctx.sessionId || '',
|
|
120
|
+
tool_input: ctx.toolInput || {},
|
|
121
|
+
tool_response: ctx.toolOutput ? String(ctx.toolOutput) : undefined,
|
|
122
|
+
});
|
|
123
|
+
if (message) {
|
|
124
|
+
return {
|
|
125
|
+
continue: true,
|
|
126
|
+
message,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return { continue: true };
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
// 5. Agent Usage Reminder - priority 50, matcher: read/grep/glob/edit/write
|
|
133
|
+
const agentUsageReminder = createAgentUsageReminderHook();
|
|
134
|
+
registerHook({
|
|
135
|
+
name: 'agentUsageReminder',
|
|
136
|
+
event: 'PostToolUse',
|
|
137
|
+
matcher: /^(read|grep|glob|edit|write)$/i,
|
|
138
|
+
priority: 50,
|
|
139
|
+
handler: async (ctx) => {
|
|
140
|
+
if (!ctx.toolName) {
|
|
141
|
+
return { continue: true };
|
|
142
|
+
}
|
|
143
|
+
const output = {
|
|
144
|
+
title: '',
|
|
145
|
+
output: ctx.toolOutput ? String(ctx.toolOutput) : '',
|
|
146
|
+
metadata: undefined,
|
|
147
|
+
};
|
|
148
|
+
await agentUsageReminder['tool.execute.after']({
|
|
149
|
+
tool: ctx.toolName,
|
|
150
|
+
sessionID: ctx.sessionId || '',
|
|
151
|
+
callID: '',
|
|
152
|
+
}, output);
|
|
153
|
+
// Check if output was modified (message appended)
|
|
154
|
+
const originalOutput = ctx.toolOutput ? String(ctx.toolOutput) : '';
|
|
155
|
+
if (output.output !== originalOutput) {
|
|
156
|
+
return {
|
|
157
|
+
continue: true,
|
|
158
|
+
message: output.output.substring(originalOutput.length),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
return { continue: true };
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
// 6. Olympus Orchestrator Post - priority 60, matcher: write/edit/bash/task
|
|
165
|
+
const olympusOrchestrator = createOlympusOrchestratorHook(workDir);
|
|
166
|
+
registerHook({
|
|
167
|
+
name: 'olympusOrchestratorPost',
|
|
168
|
+
event: 'PostToolUse',
|
|
169
|
+
matcher: /^(write|edit|bash|task)$/i,
|
|
170
|
+
priority: 60,
|
|
171
|
+
handler: async (ctx) => {
|
|
172
|
+
if (!ctx.toolName) {
|
|
173
|
+
return { continue: true };
|
|
174
|
+
}
|
|
175
|
+
const result = olympusOrchestrator.postTool(ctx.toolName, ctx.toolInput || {}, ctx.toolOutput ? String(ctx.toolOutput) : '');
|
|
176
|
+
if (!result.continue) {
|
|
177
|
+
return {
|
|
178
|
+
continue: false,
|
|
179
|
+
reason: result.message,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
if (result.modifiedOutput) {
|
|
183
|
+
return {
|
|
184
|
+
continue: true,
|
|
185
|
+
message: result.modifiedOutput,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
if (result.message) {
|
|
189
|
+
return {
|
|
190
|
+
continue: true,
|
|
191
|
+
message: result.message,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return { continue: true };
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=post-tool-use.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-tool-use.js","sourceRoot":"","sources":["../../../src/hooks/registrations/post-tool-use.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAGjF;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB;IACtC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAE9B,sDAAsD;IACtD,MAAM,iBAAiB,GAAG,2BAA2B,EAAE,CAAC;IACxD,YAAY,CAAC;QACX,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,aAAa;QACpB,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,KAAK,EAAE,GAAgB,EAAuB,EAAE;YACvD,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;gBACrC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC5B,CAAC;YAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,gBAAgB,CAC/C;gBACE,IAAI,EAAE,GAAG,CAAC,QAAQ;gBAClB,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,EAAE;gBAC9B,MAAM,EAAE,EAAE;aACX,EACD;gBACE,KAAK,EAAE,EAAE;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,OAAO,EAAE,MAAM,CAAC,cAAc;iBAC/B,CAAC;YACJ,CAAC;YAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACnB,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,MAAM,CAAC,OAAO;iBACxB,CAAC;YACJ,CAAC;YAED,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PreToolUse Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that fire before a tool is executed.
|
|
5
|
+
* Can inject context or modify tool input.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Register all PreToolUse hooks
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerPreToolUseHooks(): void;
|
|
11
|
+
//# sourceMappingURL=pre-tool-use.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre-tool-use.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/pre-tool-use.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAyF9C"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PreToolUse Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that fire before a tool is executed.
|
|
5
|
+
* Can inject context or modify tool input.
|
|
6
|
+
*/
|
|
7
|
+
import { registerHook } from '../registry.js';
|
|
8
|
+
import { createRulesInjectorHook } from '../rules-injector/index.js';
|
|
9
|
+
import { createDirectoryReadmeInjectorHook } from '../directory-readme-injector/index.js';
|
|
10
|
+
import { nonInteractiveEnvHook } from '../non-interactive-env/index.js';
|
|
11
|
+
import { createOlympusOrchestratorHook } from '../olympus-orchestrator/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* Extract file path from tool input
|
|
14
|
+
*/
|
|
15
|
+
function extractFilePath(input) {
|
|
16
|
+
if (!input || typeof input !== 'object')
|
|
17
|
+
return null;
|
|
18
|
+
const obj = input;
|
|
19
|
+
return (obj.file_path || obj.filePath || obj.path || obj.file);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Register all PreToolUse hooks
|
|
23
|
+
*/
|
|
24
|
+
export function registerPreToolUseHooks() {
|
|
25
|
+
// Rules Injector (inject project/user rules for file operations)
|
|
26
|
+
registerHook({
|
|
27
|
+
name: 'rulesInjector',
|
|
28
|
+
event: 'PreToolUse',
|
|
29
|
+
priority: 10,
|
|
30
|
+
matcher: /^(read|edit|write|glob|grep)$/i,
|
|
31
|
+
handler: (ctx) => {
|
|
32
|
+
const hook = createRulesInjectorHook(ctx.directory || process.cwd());
|
|
33
|
+
const filePath = extractFilePath(ctx.toolInput);
|
|
34
|
+
if (!filePath)
|
|
35
|
+
return { continue: true };
|
|
36
|
+
const message = hook.processToolExecution(ctx.toolName, filePath, ctx.sessionId || 'default');
|
|
37
|
+
return {
|
|
38
|
+
continue: true,
|
|
39
|
+
message: message || undefined
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
// Directory README Injector (inject README context for directories)
|
|
44
|
+
registerHook({
|
|
45
|
+
name: 'directoryReadmeInjector',
|
|
46
|
+
event: 'PreToolUse',
|
|
47
|
+
priority: 20,
|
|
48
|
+
matcher: /^(read|edit|write|glob|grep|bash)$/i,
|
|
49
|
+
handler: (ctx) => {
|
|
50
|
+
const hook = createDirectoryReadmeInjectorHook(ctx.directory || process.cwd());
|
|
51
|
+
const filePath = extractFilePath(ctx.toolInput);
|
|
52
|
+
if (!filePath)
|
|
53
|
+
return { continue: true };
|
|
54
|
+
const message = hook.processToolExecution(ctx.toolName, filePath, ctx.sessionId || 'default');
|
|
55
|
+
return {
|
|
56
|
+
continue: true,
|
|
57
|
+
message: message || undefined
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
// Non-Interactive Environment (add -y flags to commands)
|
|
62
|
+
registerHook({
|
|
63
|
+
name: 'nonInteractiveEnv',
|
|
64
|
+
event: 'PreToolUse',
|
|
65
|
+
priority: 30,
|
|
66
|
+
matcher: /^bash$/i,
|
|
67
|
+
handler: async (ctx) => {
|
|
68
|
+
const commandInput = ctx.toolInput;
|
|
69
|
+
if (!commandInput?.command)
|
|
70
|
+
return { continue: true };
|
|
71
|
+
try {
|
|
72
|
+
if (!nonInteractiveEnvHook.beforeCommand)
|
|
73
|
+
return { continue: true };
|
|
74
|
+
const result = await nonInteractiveEnvHook.beforeCommand(commandInput.command);
|
|
75
|
+
return {
|
|
76
|
+
continue: true,
|
|
77
|
+
message: result.warning,
|
|
78
|
+
modifiedInput: result.command !== commandInput.command
|
|
79
|
+
? { ...commandInput, command: result.command }
|
|
80
|
+
: undefined
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
console.error('[nonInteractiveEnv] Error:', error);
|
|
85
|
+
return { continue: true };
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// Olympus Orchestrator (pre-tool checks for delegation reminders)
|
|
90
|
+
registerHook({
|
|
91
|
+
name: 'olympusOrchestratorPre',
|
|
92
|
+
event: 'PreToolUse',
|
|
93
|
+
priority: 40,
|
|
94
|
+
matcher: /^(write|edit|bash|task)$/i,
|
|
95
|
+
handler: (ctx) => {
|
|
96
|
+
const hook = createOlympusOrchestratorHook(ctx.directory || process.cwd());
|
|
97
|
+
const result = hook.preTool(ctx.toolName, ctx.toolInput);
|
|
98
|
+
return result;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=pre-tool-use.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre-tool-use.js","sourceRoot":"","sources":["../../../src/hooks/registrations/pre-tool-use.ts"],"names":[],"mappings":"AAAA;;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O;oBACL,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,aAAa,EAAE,MAAM,CAAC,OAAO,KAAK,YAAY,CAAC,OAAO;wBACpD,CAAC,CAAC,EAAE,GAAG,YAAY,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE;wBAC9C,CAAC,CAAC,SAAS;iBACd,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;gBACnD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC;KACF,CAAC,CAAC;IAEH,kEAAkE;IAClE,YAAY,CAAC;QACX,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,2BAA2B;QACpC,OAAO,EAAE,CAAC,GAAgB,EAAc,EAAE;YACxC,MAAM,IAAI,GAAG,6BAA6B,CAAC,GAAG,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YAC3E,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAS,EAAE,GAAG,CAAC,SAAoC,CAAC,CAAC;YACrF,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-start.d.ts","sourceRoot":"","sources":["../../../src/hooks/registrations/session-start.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,wBAAgB,yBAAyB,IAAI,IAAI,CAsDhD"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SessionStart Hook Registrations
|
|
3
|
+
*
|
|
4
|
+
* Hooks that fire when a new Claude Code session starts.
|
|
5
|
+
*/
|
|
6
|
+
import { registerHook } from '../registry.js';
|
|
7
|
+
import { readUltraworkState } from '../ultrawork-state/index.js';
|
|
8
|
+
import { checkIncompleteTodos } from '../todo-continuation/index.js';
|
|
9
|
+
export function registerSessionStartHooks() {
|
|
10
|
+
// Session Start (restore persistent modes and pending tasks)
|
|
11
|
+
registerHook({
|
|
12
|
+
name: 'sessionStart',
|
|
13
|
+
event: 'SessionStart',
|
|
14
|
+
priority: 10,
|
|
15
|
+
handler: async (ctx) => {
|
|
16
|
+
const sessionId = ctx.sessionId;
|
|
17
|
+
const directory = ctx.directory || process.cwd();
|
|
18
|
+
const messages = [];
|
|
19
|
+
// Check for active ultrawork state
|
|
20
|
+
const ultraworkState = readUltraworkState(directory);
|
|
21
|
+
if (ultraworkState?.active) {
|
|
22
|
+
messages.push(`<session-restore>
|
|
23
|
+
|
|
24
|
+
[ULTRAWORK MODE RESTORED]
|
|
25
|
+
|
|
26
|
+
You have an active ultrawork session from ${ultraworkState.started_at}.
|
|
27
|
+
Original task: ${ultraworkState.original_prompt}
|
|
28
|
+
|
|
29
|
+
Continue working in ultrawork mode until all tasks are complete.
|
|
30
|
+
|
|
31
|
+
</session-restore>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
`);
|
|
36
|
+
}
|
|
37
|
+
// Check for incomplete todos
|
|
38
|
+
const todoResult = await checkIncompleteTodos(sessionId, directory);
|
|
39
|
+
if (todoResult.count > 0) {
|
|
40
|
+
messages.push(`<session-restore>
|
|
41
|
+
|
|
42
|
+
[PENDING TASKS DETECTED]
|
|
43
|
+
|
|
44
|
+
You have ${todoResult.count} incomplete tasks from a previous session.
|
|
45
|
+
Please continue working on these tasks.
|
|
46
|
+
|
|
47
|
+
</session-restore>
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
`);
|
|
52
|
+
}
|
|
53
|
+
if (messages.length > 0) {
|
|
54
|
+
return { continue: true, message: messages.join('\n') };
|
|
55
|
+
}
|
|
56
|
+
return { continue: true };
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=session-start.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-start.js","sourceRoot":"","sources":["../../../src/hooks/registrations/session-start.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,MAAM,UAAU,yBAAyB;IACvC,6DAA6D;IAC7D,YAAY,CAAC;QACX,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,EAAE;QACZ,OAAO,EAAE,KAAK,EAAE,GAAgB,EAAuB,EAAE;YACvD,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;YAChC,MAAM,SAAS,GAAG,GAAG,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;YACjD,MAAM,QAAQ,GAAa,EAAE,CAAC;YAE9B,mCAAmC;YACnC,MAAM,cAAc,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;YACrD,IAAI,cAAc,EAAE,MAAM,EAAE,CAAC;gBAC3B,QAAQ,CAAC,IAAI,CAAC;;;;4CAIsB,cAAc,CAAC,UAAU;iBACpD,cAAc,CAAC,eAAe;;;;;;;;CAQ9C,CAAC,CAAC;YACG,CAAC;YAED,6BAA6B;YAC7B,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;YACpE,IAAI,UAAU,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;gBACzB,QAAQ,CAAC,IAAI,CAAC;;;;WAIX,UAAU,CAAC,KAAK;;;;;;;CAO1B,CAAC,CAAC;YACG,CAAC;YAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gB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