@tarquinen/opencode-dcp 1.3.0-beta.1 → 1.3.1-beta1

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.
Files changed (181) hide show
  1. package/README.md +1 -9
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -17
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/config.d.ts +0 -5
  6. package/dist/lib/config.d.ts.map +1 -1
  7. package/dist/lib/config.js +0 -30
  8. package/dist/lib/config.js.map +1 -1
  9. package/dist/lib/hooks.d.ts.map +1 -1
  10. package/dist/lib/hooks.js +2 -15
  11. package/dist/lib/hooks.js.map +1 -1
  12. package/dist/lib/messages/inject.d.ts.map +1 -1
  13. package/dist/lib/messages/inject.js +40 -74
  14. package/dist/lib/messages/inject.js.map +1 -1
  15. package/dist/lib/messages/prune.d.ts.map +1 -1
  16. package/dist/lib/messages/prune.js +1 -42
  17. package/dist/lib/messages/prune.js.map +1 -1
  18. package/dist/lib/messages/utils.d.ts +21 -3
  19. package/dist/lib/messages/utils.d.ts.map +1 -1
  20. package/dist/lib/messages/utils.js +52 -27
  21. package/dist/lib/messages/utils.js.map +1 -1
  22. package/dist/lib/prompts/discard-tool-spec.d.ts +1 -1
  23. package/dist/lib/prompts/discard-tool-spec.d.ts.map +1 -1
  24. package/dist/lib/prompts/discard-tool-spec.js +40 -17
  25. package/dist/lib/prompts/discard-tool-spec.js.map +1 -1
  26. package/dist/lib/prompts/extract-tool-spec.d.ts +1 -1
  27. package/dist/lib/prompts/extract-tool-spec.d.ts.map +1 -1
  28. package/dist/lib/prompts/extract-tool-spec.js +47 -22
  29. package/dist/lib/prompts/extract-tool-spec.js.map +1 -1
  30. package/dist/lib/prompts/index.d.ts.map +1 -1
  31. package/dist/lib/prompts/index.js +4 -22
  32. package/dist/lib/prompts/index.js.map +1 -1
  33. package/dist/lib/prompts/nudge/both.d.ts +2 -0
  34. package/dist/lib/prompts/nudge/both.d.ts.map +1 -0
  35. package/dist/lib/prompts/nudge/both.js +11 -0
  36. package/dist/lib/prompts/nudge/both.js.map +1 -0
  37. package/dist/lib/prompts/nudge/discard.d.ts +1 -1
  38. package/dist/lib/prompts/nudge/discard.d.ts.map +1 -1
  39. package/dist/lib/prompts/nudge/discard.js +7 -5
  40. package/dist/lib/prompts/nudge/discard.js.map +1 -1
  41. package/dist/lib/prompts/nudge/extract.d.ts +1 -1
  42. package/dist/lib/prompts/nudge/extract.d.ts.map +1 -1
  43. package/dist/lib/prompts/nudge/extract.js +7 -5
  44. package/dist/lib/prompts/nudge/extract.js.map +1 -1
  45. package/dist/lib/prompts/nudge.generated.d.ts +2 -0
  46. package/dist/lib/prompts/nudge.generated.d.ts.map +1 -0
  47. package/dist/lib/prompts/nudge.generated.js +17 -0
  48. package/dist/lib/prompts/nudge.generated.js.map +1 -0
  49. package/dist/lib/prompts/system/both.d.ts +2 -0
  50. package/dist/lib/prompts/system/both.d.ts.map +1 -0
  51. package/dist/lib/prompts/system/both.js +61 -0
  52. package/dist/lib/prompts/system/both.js.map +1 -0
  53. package/dist/lib/prompts/system/discard.d.ts +1 -1
  54. package/dist/lib/prompts/system/discard.d.ts.map +1 -1
  55. package/dist/lib/prompts/system/discard.js +43 -18
  56. package/dist/lib/prompts/system/discard.js.map +1 -1
  57. package/dist/lib/prompts/system/extract.d.ts +1 -1
  58. package/dist/lib/prompts/system/extract.d.ts.map +1 -1
  59. package/dist/lib/prompts/system/extract.js +43 -18
  60. package/dist/lib/prompts/system/extract.js.map +1 -1
  61. package/dist/lib/prompts/system.generated.d.ts +2 -0
  62. package/dist/lib/prompts/system.generated.d.ts.map +1 -0
  63. package/dist/lib/prompts/system.generated.js +90 -0
  64. package/dist/lib/prompts/system.generated.js.map +1 -0
  65. package/dist/lib/shared-utils.d.ts +1 -1
  66. package/dist/lib/shared-utils.d.ts.map +1 -1
  67. package/dist/lib/shared-utils.js +3 -10
  68. package/dist/lib/shared-utils.js.map +1 -1
  69. package/dist/lib/state/persistence.d.ts +1 -2
  70. package/dist/lib/state/persistence.d.ts.map +1 -1
  71. package/dist/lib/state/persistence.js +0 -1
  72. package/dist/lib/state/persistence.js.map +1 -1
  73. package/dist/lib/state/state.d.ts +1 -0
  74. package/dist/lib/state/state.d.ts.map +1 -1
  75. package/dist/lib/state/state.js +29 -10
  76. package/dist/lib/state/state.js.map +1 -1
  77. package/dist/lib/state/tool-cache.d.ts.map +1 -1
  78. package/dist/lib/state/tool-cache.js +2 -4
  79. package/dist/lib/state/tool-cache.js.map +1 -1
  80. package/dist/lib/state/types.d.ts +0 -6
  81. package/dist/lib/state/types.d.ts.map +1 -1
  82. package/dist/lib/state/utils.d.ts +0 -4
  83. package/dist/lib/state/utils.d.ts.map +1 -1
  84. package/dist/lib/state/utils.js +0 -33
  85. package/dist/lib/state/utils.js.map +1 -1
  86. package/dist/lib/strategies/index.d.ts +1 -1
  87. package/dist/lib/strategies/index.d.ts.map +1 -1
  88. package/dist/lib/strategies/index.js +1 -1
  89. package/dist/lib/strategies/index.js.map +1 -1
  90. package/dist/lib/{tools/types.d.ts → strategies/tools.d.ts} +4 -1
  91. package/dist/lib/strategies/tools.d.ts.map +1 -0
  92. package/dist/lib/strategies/tools.js +135 -0
  93. package/dist/lib/strategies/tools.js.map +1 -0
  94. package/dist/lib/strategies/utils.d.ts +0 -1
  95. package/dist/lib/strategies/utils.d.ts.map +1 -1
  96. package/dist/lib/strategies/utils.js +4 -5
  97. package/dist/lib/strategies/utils.js.map +1 -1
  98. package/dist/lib/ui/notification.d.ts +0 -1
  99. package/dist/lib/ui/notification.d.ts.map +1 -1
  100. package/dist/lib/ui/notification.js +1 -29
  101. package/dist/lib/ui/notification.js.map +1 -1
  102. package/dist/lib/ui/utils.d.ts +0 -1
  103. package/dist/lib/ui/utils.d.ts.map +1 -1
  104. package/dist/lib/ui/utils.js +0 -16
  105. package/dist/lib/ui/utils.js.map +1 -1
  106. package/package.json +1 -2
  107. package/dist/lib/auth.d.ts +0 -4
  108. package/dist/lib/auth.d.ts.map +0 -1
  109. package/dist/lib/auth.js +0 -32
  110. package/dist/lib/auth.js.map +0 -1
  111. package/dist/lib/prompts/nudge/all.d.ts +0 -2
  112. package/dist/lib/prompts/nudge/all.d.ts.map +0 -1
  113. package/dist/lib/prompts/nudge/all.js +0 -9
  114. package/dist/lib/prompts/nudge/all.js.map +0 -1
  115. package/dist/lib/prompts/nudge/discard-extract.d.ts +0 -2
  116. package/dist/lib/prompts/nudge/discard-extract.d.ts.map +0 -1
  117. package/dist/lib/prompts/nudge/discard-extract.js +0 -8
  118. package/dist/lib/prompts/nudge/discard-extract.js.map +0 -1
  119. package/dist/lib/prompts/nudge/discard-squash.d.ts +0 -2
  120. package/dist/lib/prompts/nudge/discard-squash.d.ts.map +0 -1
  121. package/dist/lib/prompts/nudge/discard-squash.js +0 -8
  122. package/dist/lib/prompts/nudge/discard-squash.js.map +0 -1
  123. package/dist/lib/prompts/nudge/extract-squash.d.ts +0 -2
  124. package/dist/lib/prompts/nudge/extract-squash.d.ts.map +0 -1
  125. package/dist/lib/prompts/nudge/extract-squash.js +0 -8
  126. package/dist/lib/prompts/nudge/extract-squash.js.map +0 -1
  127. package/dist/lib/prompts/nudge/squash.d.ts +0 -2
  128. package/dist/lib/prompts/nudge/squash.d.ts.map +0 -1
  129. package/dist/lib/prompts/nudge/squash.js +0 -8
  130. package/dist/lib/prompts/nudge/squash.js.map +0 -1
  131. package/dist/lib/prompts/squash-tool-spec.d.ts +0 -2
  132. package/dist/lib/prompts/squash-tool-spec.d.ts.map +0 -1
  133. package/dist/lib/prompts/squash-tool-spec.js +0 -33
  134. package/dist/lib/prompts/squash-tool-spec.js.map +0 -1
  135. package/dist/lib/prompts/system/all.d.ts +0 -2
  136. package/dist/lib/prompts/system/all.d.ts.map +0 -1
  137. package/dist/lib/prompts/system/all.js +0 -26
  138. package/dist/lib/prompts/system/all.js.map +0 -1
  139. package/dist/lib/prompts/system/discard-extract.d.ts +0 -2
  140. package/dist/lib/prompts/system/discard-extract.d.ts.map +0 -1
  141. package/dist/lib/prompts/system/discard-extract.js +0 -26
  142. package/dist/lib/prompts/system/discard-extract.js.map +0 -1
  143. package/dist/lib/prompts/system/discard-squash.d.ts +0 -2
  144. package/dist/lib/prompts/system/discard-squash.d.ts.map +0 -1
  145. package/dist/lib/prompts/system/discard-squash.js +0 -25
  146. package/dist/lib/prompts/system/discard-squash.js.map +0 -1
  147. package/dist/lib/prompts/system/extract-squash.d.ts +0 -2
  148. package/dist/lib/prompts/system/extract-squash.d.ts.map +0 -1
  149. package/dist/lib/prompts/system/extract-squash.js +0 -25
  150. package/dist/lib/prompts/system/extract-squash.js.map +0 -1
  151. package/dist/lib/prompts/system/squash.d.ts +0 -2
  152. package/dist/lib/prompts/system/squash.d.ts.map +0 -1
  153. package/dist/lib/prompts/system/squash.js +0 -27
  154. package/dist/lib/prompts/system/squash.js.map +0 -1
  155. package/dist/lib/tools/discard.d.ts +0 -4
  156. package/dist/lib/tools/discard.d.ts.map +0 -1
  157. package/dist/lib/tools/discard.js +0 -21
  158. package/dist/lib/tools/discard.js.map +0 -1
  159. package/dist/lib/tools/extract.d.ts +0 -4
  160. package/dist/lib/tools/extract.d.ts.map +0 -1
  161. package/dist/lib/tools/extract.js +0 -30
  162. package/dist/lib/tools/extract.js.map +0 -1
  163. package/dist/lib/tools/index.d.ts +0 -5
  164. package/dist/lib/tools/index.d.ts.map +0 -1
  165. package/dist/lib/tools/index.js +0 -4
  166. package/dist/lib/tools/index.js.map +0 -1
  167. package/dist/lib/tools/prune-shared.d.ts +0 -6
  168. package/dist/lib/tools/prune-shared.d.ts.map +0 -1
  169. package/dist/lib/tools/prune-shared.js +0 -107
  170. package/dist/lib/tools/prune-shared.js.map +0 -1
  171. package/dist/lib/tools/squash.d.ts +0 -4
  172. package/dist/lib/tools/squash.d.ts.map +0 -1
  173. package/dist/lib/tools/squash.js +0 -81
  174. package/dist/lib/tools/squash.js.map +0 -1
  175. package/dist/lib/tools/types.d.ts.map +0 -1
  176. package/dist/lib/tools/types.js +0 -2
  177. package/dist/lib/tools/types.js.map +0 -1
  178. package/dist/lib/tools/utils.d.ts +0 -26
  179. package/dist/lib/tools/utils.d.ts.map +0 -1
  180. package/dist/lib/tools/utils.js +0 -121
  181. package/dist/lib/tools/utils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"prune.js","sourceRoot":"","sources":["../../../lib/messages/prune.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAG3E,MAAM,8BAA8B,GAChC,+EAA+E,CAAA;AACnF,MAAM,mCAAmC,GAAG,yCAAyC,CAAA;AACrF,MAAM,iCAAiC,GAAG,qDAAqD,CAAA;AAE/F,MAAM,CAAC,MAAM,KAAK,GAAG,CACjB,KAAmB,EACnB,MAAc,EACd,MAAoB,EACpB,QAAqB,EACjB,EAAE;IACN,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC7C,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IACzC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IACxC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;AAC5C,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,KAAmB,EAAE,MAAc,EAAE,QAAqB,EAAQ,EAAE;IAC1F,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,kBAAkB,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YACjC,SAAQ;QACZ,CAAC;QAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC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;gBACrC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;oBACnC,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;wBACjC,KAAK,CAAC,GAAG,CAAC,GAAG,mCAAmC,CAAA;oBACpD,CAAC;gBACL,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;AACL,CAAC,CAAA"}
@@ -1,13 +1,31 @@
1
1
  import { Logger } from "../logger";
2
2
  import type { SessionState, WithParts } from "../state";
3
- export declare const SQUASH_SUMMARY_PREFIX = "[Squashed conversation block]\n\n";
3
+ export declare const isDeepSeekOrKimi: (providerID: string, modelID: string) => boolean;
4
4
  export declare const createSyntheticUserMessage: (baseMessage: WithParts, content: string, variant?: string) => WithParts;
5
- export declare const createSyntheticToolPart: (assistantMessage: WithParts, content: string) => any;
5
+ export declare const createSyntheticAssistantMessage: (baseMessage: WithParts, content: string, variant?: string) => WithParts;
6
+ export declare const createSyntheticToolPart: (baseMessage: WithParts, content: string) => {
7
+ id: string;
8
+ sessionID: string;
9
+ messageID: string;
10
+ type: "tool";
11
+ callID: string;
12
+ tool: string;
13
+ state: {
14
+ status: "completed";
15
+ input: {};
16
+ output: string;
17
+ title: string;
18
+ metadata: {};
19
+ time: {
20
+ start: number;
21
+ end: number;
22
+ };
23
+ };
24
+ };
6
25
  /**
7
26
  * Extracts a human-readable key from tool metadata for display purposes.
8
27
  */
9
28
  export declare const extractParameterKey: (tool: string, parameters: any) => string;
10
29
  export declare function buildToolIdList(state: SessionState, messages: WithParts[], logger: Logger): string[];
11
30
  export declare const isIgnoredUserMessage: (message: WithParts) => boolean;
12
- export declare const findMessageIndex: (messages: WithParts[], messageId: string) => number;
13
31
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/messages/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,E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oB9E,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,YAAY,GAAG,KAAG,MAkHnE,CAAA;AAED,wBAAgB,eAAe,CAC3B,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,SAAS,EAAE,EACrB,MAAM,EAAE,MAAM,GACf,MAAM,EAAE,CAgBV;AAED,eAAO,MAAM,oBAAoB,GAAI,SAAS,SAAS,KAAG,OAazD,CAAA"}
@@ -1,52 +1,81 @@
1
- import { ulid } from "ulid";
2
1
  import { isMessageCompacted } from "../shared-utils";
3
- export const SQUASH_SUMMARY_PREFIX = "[Squashed conversation block]\n\n";
4
- const generateUniqueId = (prefix) => `${prefix}_${ulid()}`;
5
- const isGeminiModel = (modelID) => {
2
+ const SYNTHETIC_MESSAGE_ID = "msg_01234567890123456789012345";
3
+ const SYNTHETIC_PART_ID = "prt_01234567890123456789012345";
4
+ const SYNTHETIC_CALL_ID = "call_01234567890123456789012345";
5
+ export const isDeepSeekOrKimi = (providerID, modelID) => {
6
+ const lowerProviderID = providerID.toLowerCase();
6
7
  const lowerModelID = modelID.toLowerCase();
7
- return lowerModelID.includes("gemini");
8
+ return (lowerProviderID.includes("deepseek") ||
9
+ lowerProviderID.includes("kimi") ||
10
+ lowerModelID.includes("deepseek") ||
11
+ lowerModelID.includes("kimi"));
8
12
  };
9
13
  export const createSyntheticUserMessage = (baseMessage, content, variant) => {
10
14
  const userInfo = baseMessage.info;
11
15
  const now = Date.now();
12
- const messageId = generateUniqueId("msg");
13
- const partId = generateUniqueId("prt");
14
16
  return {
15
17
  info: {
16
- id: messageId,
18
+ id: SYNTHETIC_MESSAGE_ID,
17
19
  sessionID: userInfo.sessionID,
18
20
  role: "user",
19
- agent: userInfo.agent,
21
+ agent: userInfo.agent || "code",
20
22
  model: userInfo.model,
21
23
  time: { created: now },
22
24
  ...(variant !== undefined && { variant }),
23
25
  },
24
26
  parts: [
25
27
  {
26
- id: partId,
28
+ id: SYNTHETIC_PART_ID,
27
29
  sessionID: userInfo.sessionID,
28
- messageID: messageId,
30
+ messageID: SYNTHETIC_MESSAGE_ID,
29
31
  type: "text",
30
32
  text: content,
31
33
  },
32
34
  ],
33
35
  };
34
36
  };
35
- export const createSyntheticToolPart = (assistantMessage, content) => {
37
+ export const createSyntheticAssistantMessage = (baseMessage, content, variant) => {
38
+ const userInfo = baseMessage.info;
36
39
  const now = Date.now();
37
- const partId = generateUniqueId("prt");
38
- const callId = generateUniqueId("call");
39
- const modelID = assistantMessage.info.modelID || "";
40
- // For Gemini models, add thoughtSignature bypass to avoid validation errors
41
- const toolPartMetadata = isGeminiModel(modelID)
42
- ? { google: { thoughtSignature: "skip_thought_signature_validator" } }
43
- : undefined;
44
40
  return {
45
- id: partId,
46
- sessionID: assistantMessage.info.sessionID,
47
- messageID: assistantMessage.info.id,
41
+ info: {
42
+ id: SYNTHETIC_MESSAGE_ID,
43
+ sessionID: userInfo.sessionID,
44
+ role: "assistant",
45
+ agent: userInfo.agent || "code",
46
+ parentID: userInfo.id,
47
+ modelID: userInfo.model.modelID,
48
+ providerID: userInfo.model.providerID,
49
+ mode: "default",
50
+ path: {
51
+ cwd: "/",
52
+ root: "/",
53
+ },
54
+ time: { created: now, completed: now },
55
+ cost: 0,
56
+ tokens: { input: 0, output: 0, reasoning: 0, cache: { read: 0, write: 0 } },
57
+ ...(variant !== undefined && { variant }),
58
+ },
59
+ parts: [
60
+ {
61
+ id: SYNTHETIC_PART_ID,
62
+ sessionID: userInfo.sessionID,
63
+ messageID: SYNTHETIC_MESSAGE_ID,
64
+ type: "text",
65
+ text: content,
66
+ },
67
+ ],
68
+ };
69
+ };
70
+ export const createSyntheticToolPart = (baseMessage, content) => {
71
+ const userInfo = baseMessage.info;
72
+ const now = Date.now();
73
+ return {
74
+ id: SYNTHETIC_PART_ID,
75
+ sessionID: userInfo.sessionID,
76
+ messageID: baseMessage.info.id,
48
77
  type: "tool",
49
- callID: callId,
78
+ callID: SYNTHETIC_CALL_ID,
50
79
  tool: "context_info",
51
80
  state: {
52
81
  status: "completed",
@@ -56,7 +85,6 @@ export const createSyntheticToolPart = (assistantMessage, content) => {
56
85
  metadata: {},
57
86
  time: { start: now, end: now },
58
87
  },
59
- ...(toolPartMetadata && { metadata: toolPartMetadata }),
60
88
  };
61
89
  };
62
90
  /**
@@ -197,7 +225,4 @@ export const isIgnoredUserMessage = (message) => {
197
225
  }
198
226
  return true;
199
227
  };
200
- export const findMessageIndex = (messages, messageId) => {
201
- return messages.findIndex((msg) => msg.info.id === messageId);
202
- };
203
228
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../lib/messages/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAIpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,mCAAmC,CAAA;AAExE,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,GAAG,MAAM,IAAI,IAAI,EAAE,EAAE,CAAA;AAE1E,MAAM,aAAa,GAAG,CAAC,OAAe,EAAW,EAAE;IAC/C,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;IAC1C,OAAO,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC1C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACtC,WAAsB,EACtB,OAAe,EACf,OAAgB,EACP,EAAE;IACX,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAmB,CAAA;IAChD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAEtB,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAA;IACzC,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAA;IAEtC,OAAO;QACH,IAAI,EAAE;YACF,EA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,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAkB,EAAW,EAAE;IAChE,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC/D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAA;IACf,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,IAAI,CAAE,IAAY,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO,KAAK,CAAA;QAChB,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAA;AACf,CAAC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const DISCARD_TOOL_SPEC = "**Purpose:** Discard tool outputs from context to manage size and reduce noise.\n**IDs:** Use numeric IDs from `<prunable-tools>` (format: `ID: tool, parameter`).\n**Use When:**\n- Noise \u2192 irrelevant, unhelpful, or superseded outputs\n**Do NOT Use When:**\n- Output contains useful information\n- Output needed later (files to edit, implementation context)\n**Best Practices:**\n- Batch multiple items; avoid single small outputs (unless pure noise)\n- Criterion: \"Needed for upcoming task?\" \u2192 keep it\n**Format:**\n- `ids`: string[] \u2014 numeric IDs from prunable list\n**Example:**\nNoise removal:\n ids: [\"5\"]\n Context: Read wrong_file.ts \u2014 not relevant to auth system\n";
1
+ export declare const DISCARD_TOOL_SPEC = "Discards tool outputs from context to manage conversation size and reduce noise.\n\n## IMPORTANT: The Prunable List\nA `<prunable-tools>` list is provided to you showing available tool outputs you can discard when there are tools available for pruning. Each line has the format `ID: tool, parameter` (e.g., `20: read, /path/to/file.ts`). You MUST only use numeric IDs that appear in this list to select which tools to discard.\n\n## When to Use This Tool\n\nUse `discard` for removing tool content that is no longer needed\n\n- **Noise:** Irrelevant, unhelpful, or superseded outputs that provide no value.\n- **Task Completion:** Work is complete and there's no valuable information worth preserving.\n\n## When NOT to Use This Tool\n\n- **If the output contains useful information:** Keep it in context rather than discarding.\n- **If you'll need the output later:** Don't discard files you plan to edit or context you'll need for implementation.\n\n## Best Practices\n- **Strategic Batching:** Don't discard single small tool outputs (like short bash commands) unless they are pure noise. Wait until you have several items to perform high-impact discards.\n- **Think ahead:** Before discarding, ask: \"Will I need this output for an upcoming task?\" If yes, keep it.\n\n## Format\n\n- `ids`: Array where the first element is the reason, followed by numeric IDs from the `<prunable-tools>` list\n\nReasons: `noise` | `completion`\n\n## Example\n\n<example_noise>\nAssistant: [Reads 'wrong_file.ts']\nThis file isn't relevant to the auth system. I'll remove it to clear the context.\n[Uses discard with ids: [\"noise\", \"5\"]]\n</example_noise>\n\n<example_completion>\nAssistant: [Runs tests, they pass]\nThe tests passed and I don't need to preserve any details. I'll clean up now.\n[Uses discard with ids: [\"completion\", \"20\", \"21\"]]\n</example_completion>";
2
2
  //# sourceMappingURL=discard-tool-spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discard-tool-spec.d.ts","sourceRoot":"","sources":["../../../lib/prompts/discard-tool-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,ksBAgB7B,CAAA"}
1
+ {"version":3,"file":"discard-tool-spec.d.ts","sourceRoot":"","sources":["../../../lib/prompts/discard-tool-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,g1DAuCR,CAAA"}
@@ -1,18 +1,41 @@
1
- export const DISCARD_TOOL_SPEC = `**Purpose:** Discard tool outputs from context to manage size and reduce noise.
2
- **IDs:** Use numeric IDs from \`<prunable-tools>\` (format: \`ID: tool, parameter\`).
3
- **Use When:**
4
- - Noise irrelevant, unhelpful, or superseded outputs
5
- **Do NOT Use When:**
6
- - Output contains useful information
7
- - Output needed later (files to edit, implementation context)
8
- **Best Practices:**
9
- - Batch multiple items; avoid single small outputs (unless pure noise)
10
- - Criterion: "Needed for upcoming task?" keep it
11
- **Format:**
12
- - \`ids\`: string[] — numeric IDs from prunable list
13
- **Example:**
14
- Noise removal:
15
- ids: ["5"]
16
- Context: Read wrong_file.ts not relevant to auth system
17
- `;
1
+ export const DISCARD_TOOL_SPEC = `Discards tool outputs from context to manage conversation size and reduce noise.
2
+
3
+ ## IMPORTANT: The Prunable List
4
+ A \`<prunable-tools>\` list is provided to you showing available tool outputs you can discard when there are tools available for pruning. Each line has the format \`ID: tool, parameter\` (e.g., \`20: read, /path/to/file.ts\`). You MUST only use numeric IDs that appear in this list to select which tools to discard.
5
+
6
+ ## When to Use This Tool
7
+
8
+ Use \`discard\` for removing tool content that is no longer needed
9
+
10
+ - **Noise:** Irrelevant, unhelpful, or superseded outputs that provide no value.
11
+ - **Task Completion:** Work is complete and there's no valuable information worth preserving.
12
+
13
+ ## When NOT to Use This Tool
14
+
15
+ - **If the output contains useful information:** Keep it in context rather than discarding.
16
+ - **If you'll need the output later:** Don't discard files you plan to edit or context you'll need for implementation.
17
+
18
+ ## Best Practices
19
+ - **Strategic Batching:** Don't discard single small tool outputs (like short bash commands) unless they are pure noise. Wait until you have several items to perform high-impact discards.
20
+ - **Think ahead:** Before discarding, ask: "Will I need this output for an upcoming task?" If yes, keep it.
21
+
22
+ ## Format
23
+
24
+ - \`ids\`: Array where the first element is the reason, followed by numeric IDs from the \`<prunable-tools>\` list
25
+
26
+ Reasons: \`noise\` | \`completion\`
27
+
28
+ ## Example
29
+
30
+ <example_noise>
31
+ Assistant: [Reads 'wrong_file.ts']
32
+ This file isn't relevant to the auth system. I'll remove it to clear the context.
33
+ [Uses discard with ids: ["noise", "5"]]
34
+ </example_noise>
35
+
36
+ <example_completion>
37
+ Assistant: [Runs tests, they pass]
38
+ The tests passed and I don't need to preserve any details. I'll clean up now.
39
+ [Uses discard with ids: ["completion", "20", "21"]]
40
+ </example_completion>`;
18
41
  //# sourceMappingURL=discard-tool-spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"discard-tool-spec.js","sourceRoot":"","sources":["../../../lib/prompts/discard-tool-spec.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;CAgBhC,CAAA"}
1
+ {"version":3,"file":"discard-tool-spec.js","sourceRoot":"","sources":["../../../lib/prompts/discard-tool-spec.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAuCX,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const EXTRACT_TOOL_SPEC = "**Purpose:** Extract key findings from tool outputs into distilled knowledge; remove raw outputs from context.\n**IDs:** Use numeric IDs from `<prunable-tools>` (format: `ID: tool, parameter`).\n**Use When:**\n- Task complete \u2192 preserve findings\n- Distill context \u2192 keep specifics, drop noise\n**Do NOT Use When:**\n- Need exact syntax (edits/grep) \u2192 keep raw output\n- Planning modifications \u2192 keep read output\n**Best Practices:**\n- Batch multiple items; avoid frequent small extractions\n- Preserve raw output if editing/modifying later\n**Format:**\n- `ids`: string[] \u2014 numeric IDs from prunable list\n- `distillation`: string[] \u2014 positional mapping (distillation[i] for ids[i])\n- Detail level: signatures, logic, constraints, values\n**Example:**\n `ids`: [\"10\", \"11\"]\n `distillation`: [\n \"auth.ts: validateToken(token: string)\u2192User|null. Cache 5min TTL then OIDC. bcrypt 12 rounds. Tokens \u2265128 chars.\",\n \"user.ts: interface User {id: string; email: string; permissions: ('read'|'write'|'admin')[]; status: 'active'|'suspended'}\"\n ]\n";
1
+ export declare const EXTRACT_TOOL_SPEC = "Extracts key findings from tool outputs into distilled knowledge, then removes the raw outputs from context.\n\n## IMPORTANT: The Prunable List\nA `<prunable-tools>` list is provided to you showing available tool outputs you can extract from when there are tools available for pruning. Each line has the format `ID: tool, parameter` (e.g., `20: read, /path/to/file.ts`). You MUST only use numeric IDs that appear in this list to select which tools to extract.\n\n## When to Use This Tool\n\nUse `extract` when you have gathered useful information that you want to **preserve in distilled form** before removing the raw outputs:\n\n- **Task Completion:** You completed a unit of work and want to preserve key findings.\n- **Knowledge Preservation:** You have context that contains valuable information, but also a lot of unnecessary detail - you only need to preserve some specifics.\n\n## When NOT to Use This Tool\n\n- **If you need precise syntax:** If you'll edit a file or grep for exact strings, keep the raw output.\n- **If uncertain:** Prefer keeping over re-fetching.\n\n\n## Best Practices\n- **Strategic Batching:** Wait until you have several items or a few large outputs to extract, rather than doing tiny, frequent extractions. Aim for high-impact extractions that significantly reduce context size.\n- **Think ahead:** Before extracting, ask: \"Will I need the raw output for an upcoming task?\" If you researched a file you'll later edit, do NOT extract it.\n\n## Format\n\n- `ids`: Array of numeric IDs as strings from the `<prunable-tools>` list\n- `distillation`: Array of strings, one per ID (positional: distillation[0] is for ids[0], etc.)\n\nEach distillation string should capture the essential information you need to preserve - function signatures, logic, constraints, values, etc. Be as detailed as needed for your task.\n\n## Example\n\n<example_extraction>\nAssistant: [Reads auth service and user types]\nI'll preserve the key details before extracting.\n[Uses extract with:\n ids: [\"10\", \"11\"],\n distillation: [\n \"auth.ts: validateToken(token: string) -> User|null checks cache first (5min TTL) then OIDC. hashPassword uses bcrypt 12 rounds. Tokens must be 128+ chars.\",\n \"user.ts: interface User { id: string; email: string; permissions: ('read'|'write'|'admin')[]; status: 'active'|'suspended' }\"\n ]\n]\n</example_extraction>\n\n<example_keep>\nAssistant: [Reads 'auth.ts' to understand the login flow]\nI've understood the auth flow. I'll need to modify this file to add the new validation, so I'm keeping this read in context rather than extracting.\n</example_keep>";
2
2
  //# sourceMappingURL=extract-tool-spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract-tool-spec.d.ts","sourceRoot":"","sources":["../../../lib/prompts/extract-tool-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,8lCAqB7B,CAAA"}
1
+ {"version":3,"file":"extract-tool-spec.d.ts","sourceRoot":"","sources":["../../../lib/prompts/extract-tool-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,kkFA8Cd,CAAA"}
@@ -1,23 +1,48 @@
1
- export const EXTRACT_TOOL_SPEC = `**Purpose:** Extract key findings from tool outputs into distilled knowledge; remove raw outputs from context.
2
- **IDs:** Use numeric IDs from \`<prunable-tools>\` (format: \`ID: tool, parameter\`).
3
- **Use When:**
4
- - Task complete preserve findings
5
- - Distill context → keep specifics, drop noise
6
- **Do NOT Use When:**
7
- - Need exact syntax (edits/grep) → keep raw output
8
- - Planning modifications keep read output
9
- **Best Practices:**
10
- - Batch multiple items; avoid frequent small extractions
11
- - Preserve raw output if editing/modifying later
12
- **Format:**
13
- - \`ids\`: string[] numeric IDs from prunable list
14
- - \`distillation\`: string[] — positional mapping (distillation[i] for ids[i])
15
- - Detail level: signatures, logic, constraints, values
16
- **Example:**
17
- \`ids\`: ["10", "11"]
18
- \`distillation\`: [
19
- "auth.ts: validateToken(token: string)→User|null. Cache 5min TTL then OIDC. bcrypt 12 rounds. Tokens ≥128 chars.",
20
- "user.ts: interface User {id: string; email: string; permissions: ('read'|'write'|'admin')[]; status: 'active'|'suspended'}"
21
- ]
22
- `;
1
+ export const EXTRACT_TOOL_SPEC = `Extracts key findings from tool outputs into distilled knowledge, then removes the raw outputs from context.
2
+
3
+ ## IMPORTANT: The Prunable List
4
+ A \`<prunable-tools>\` list is provided to you showing available tool outputs you can extract from when there are tools available for pruning. Each line has the format \`ID: tool, parameter\` (e.g., \`20: read, /path/to/file.ts\`). You MUST only use numeric IDs that appear in this list to select which tools to extract.
5
+
6
+ ## When to Use This Tool
7
+
8
+ Use \`extract\` when you have gathered useful information that you want to **preserve in distilled form** before removing the raw outputs:
9
+
10
+ - **Task Completion:** You completed a unit of work and want to preserve key findings.
11
+ - **Knowledge Preservation:** You have context that contains valuable information, but also a lot of unnecessary detail - you only need to preserve some specifics.
12
+
13
+ ## When NOT to Use This Tool
14
+
15
+ - **If you need precise syntax:** If you'll edit a file or grep for exact strings, keep the raw output.
16
+ - **If uncertain:** Prefer keeping over re-fetching.
17
+
18
+
19
+ ## Best Practices
20
+ - **Strategic Batching:** Wait until you have several items or a few large outputs to extract, rather than doing tiny, frequent extractions. Aim for high-impact extractions that significantly reduce context size.
21
+ - **Think ahead:** Before extracting, ask: "Will I need the raw output for an upcoming task?" If you researched a file you'll later edit, do NOT extract it.
22
+
23
+ ## Format
24
+
25
+ - \`ids\`: Array of numeric IDs as strings from the \`<prunable-tools>\` list
26
+ - \`distillation\`: Array of strings, one per ID (positional: distillation[0] is for ids[0], etc.)
27
+
28
+ Each distillation string should capture the essential information you need to preserve - function signatures, logic, constraints, values, etc. Be as detailed as needed for your task.
29
+
30
+ ## Example
31
+
32
+ <example_extraction>
33
+ Assistant: [Reads auth service and user types]
34
+ I'll preserve the key details before extracting.
35
+ [Uses extract with:
36
+ ids: ["10", "11"],
37
+ distillation: [
38
+ "auth.ts: validateToken(token: string) -> User|null checks cache first (5min TTL) then OIDC. hashPassword uses bcrypt 12 rounds. Tokens must be 128+ chars.",
39
+ "user.ts: interface User { id: string; email: string; permissions: ('read'|'write'|'admin')[]; status: 'active'|'suspended' }"
40
+ ]
41
+ ]
42
+ </example_extraction>
43
+
44
+ <example_keep>
45
+ Assistant: [Reads 'auth.ts' to understand the login flow]
46
+ I've understood the auth flow. I'll need to modify this file to add the new validation, so I'm keeping this read in context rather than extracting.
47
+ </example_keep>`;
23
48
  //# sourceMappingURL=extract-tool-spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract-tool-spec.js","sourceRoot":"","sources":["../../../lib/prompts/extract-tool-spec.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBhC,CAAA"}
1
+ {"version":3,"file":"extract-tool-spec.js","sourceRoot":"","sources":["../../../lib/prompts/extract-tool-spec.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA8CjB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/prompts/index.ts"],"names":[],"mappings":"AA2CA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAW9E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/prompts/index.ts"],"names":[],"mappings":"AAyBA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAW9E"}
@@ -1,41 +1,23 @@
1
1
  // Tool specs
2
2
  import { DISCARD_TOOL_SPEC } from "./discard-tool-spec";
3
3
  import { EXTRACT_TOOL_SPEC } from "./extract-tool-spec";
4
- import { SQUASH_TOOL_SPEC } from "./squash-tool-spec";
5
4
  // System prompts
5
+ import { SYSTEM_PROMPT_BOTH } from "./system/both";
6
6
  import { SYSTEM_PROMPT_DISCARD } from "./system/discard";
7
7
  import { SYSTEM_PROMPT_EXTRACT } from "./system/extract";
8
- import { SYSTEM_PROMPT_SQUASH } from "./system/squash";
9
- import { SYSTEM_PROMPT_DISCARD_EXTRACT } from "./system/discard-extract";
10
- import { SYSTEM_PROMPT_DISCARD_SQUASH } from "./system/discard-squash";
11
- import { SYSTEM_PROMPT_EXTRACT_SQUASH } from "./system/extract-squash";
12
- import { SYSTEM_PROMPT_ALL } from "./system/all";
13
8
  // Nudge prompts
9
+ import { NUDGE_BOTH } from "./nudge/both";
14
10
  import { NUDGE_DISCARD } from "./nudge/discard";
15
11
  import { NUDGE_EXTRACT } from "./nudge/extract";
16
- import { NUDGE_SQUASH } from "./nudge/squash";
17
- import { NUDGE_DISCARD_EXTRACT } from "./nudge/discard-extract";
18
- import { NUDGE_DISCARD_SQUASH } from "./nudge/discard-squash";
19
- import { NUDGE_EXTRACT_SQUASH } from "./nudge/extract-squash";
20
- import { NUDGE_ALL } from "./nudge/all";
21
12
  const PROMPTS = {
22
13
  "discard-tool-spec": DISCARD_TOOL_SPEC,
23
14
  "extract-tool-spec": EXTRACT_TOOL_SPEC,
24
- "squash-tool-spec": SQUASH_TOOL_SPEC,
15
+ "system/system-prompt-both": SYSTEM_PROMPT_BOTH,
25
16
  "system/system-prompt-discard": SYSTEM_PROMPT_DISCARD,
26
17
  "system/system-prompt-extract": SYSTEM_PROMPT_EXTRACT,
27
- "system/system-prompt-squash": SYSTEM_PROMPT_SQUASH,
28
- "system/system-prompt-discard-extract": SYSTEM_PROMPT_DISCARD_EXTRACT,
29
- "system/system-prompt-discard-squash": SYSTEM_PROMPT_DISCARD_SQUASH,
30
- "system/system-prompt-extract-squash": SYSTEM_PROMPT_EXTRACT_SQUASH,
31
- "system/system-prompt-all": SYSTEM_PROMPT_ALL,
18
+ "nudge/nudge-both": NUDGE_BOTH,
32
19
  "nudge/nudge-discard": NUDGE_DISCARD,
33
20
  "nudge/nudge-extract": NUDGE_EXTRACT,
34
- "nudge/nudge-squash": NUDGE_SQUASH,
35
- "nudge/nudge-discard-extract": NUDGE_DISCARD_EXTRACT,
36
- "nudge/nudge-discard-squash": NUDGE_DISCARD_SQUASH,
37
- "nudge/nudge-extract-squash": NUDGE_EXTRACT_SQUASH,
38
- "nudge/nudge-all": NUDGE_ALL,
39
21
  };
40
22
  export function loadPrompt(name, vars) {
41
23
  let content = PROMPTS[name];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/prompts/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,iBAAiB;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM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qBAAqB,EAAE,aAAa;CACvC,CAAA;AAED,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAA6B;IAClE,IAAI,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAA;IAChD,CAAC;IACD,IAAI,IAAI,EAAE,CAAC;QACP,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9C,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,CAAA;QAC3E,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAA;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const NUDGE_BOTH = "<instruction name=context_management_required>\n**CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.\n\n**Immediate Actions Required:**\n1. **Task Completion:** If a sub-task is complete, decide: use `discard` if no valuable context to preserve (default), or use `extract` if insights are worth keeping.\n2. **Noise Removal:** If you read files or ran commands that yielded no value, use `discard` to remove them.\n3. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use `extract` to distill the insights and remove the raw entry.\n\n**Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must perform context management.\n</instruction>";
2
+ //# sourceMappingURL=both.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"both.d.ts","sourceRoot":"","sources":["../../../../lib/prompts/nudge/both.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,s2BASR,CAAA"}
@@ -0,0 +1,11 @@
1
+ export const NUDGE_BOTH = `<instruction name=context_management_required>
2
+ **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
+
4
+ **Immediate Actions Required:**
5
+ 1. **Task Completion:** If a sub-task is complete, decide: use \`discard\` if no valuable context to preserve (default), or use \`extract\` if insights are worth keeping.
6
+ 2. **Noise Removal:** If you read files or ran commands that yielded no value, use \`discard\` to remove them.
7
+ 3. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use \`extract\` to distill the insights and remove the raw entry.
8
+
9
+ **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must perform context management.
10
+ </instruction>`;
11
+ //# sourceMappingURL=both.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"both.js","sourceRoot":"","sources":["../../../../lib/prompts/nudge/both.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;eASX,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const NUDGE_DISCARD = "<instruction name=context_management_required>\n**CONTEXT WARNING:** Context filling with tool outputs. Context hygiene required.\n**Actions:**\n1. Noise \u2192 files/commands with no value, use `discard`\n2. Outdated \u2192 outputs no longer relevant, discard\n**Protocol:** Prioritize cleanup. Don't interrupt atomic ops. After immediate step, discard unneeded outputs.\n</instruction>";
1
+ export declare const NUDGE_DISCARD = "<instruction name=context_management_required>\n**CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.\n\n**Immediate Actions Required:**\n1. **Task Completion:** If a sub-task is complete, use the `discard` tool to remove the tools used.\n2. **Noise Removal:** If you read files or ran commands that yielded no value, use the `discard` tool to remove them.\n\n**Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must discard unneeded tool outputs.\n</instruction>";
2
2
  //# sourceMappingURL=discard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discard.d.ts","sourceRoot":"","sources":["../../../../lib/prompts/nudge/discard.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,wYAMX,CAAA"}
1
+ {"version":3,"file":"discard.d.ts","sourceRoot":"","sources":["../../../../lib/prompts/nudge/discard.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,0oBAQX,CAAA"}
@@ -1,8 +1,10 @@
1
1
  export const NUDGE_DISCARD = `<instruction name=context_management_required>
2
- **CONTEXT WARNING:** Context filling with tool outputs. Context hygiene required.
3
- **Actions:**
4
- 1. Noise → files/commands with no value, use \`discard\`
5
- 2. Outdated outputs no longer relevant, discard
6
- **Protocol:** Prioritize cleanup. Don't interrupt atomic ops. After immediate step, discard unneeded outputs.
2
+ **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
+
4
+ **Immediate Actions Required:**
5
+ 1. **Task Completion:** If a sub-task is complete, use the \`discard\` tool to remove the tools used.
6
+ 2. **Noise Removal:** If you read files or ran commands that yielded no value, use the \`discard\` tool to remove them.
7
+
8
+ **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must discard unneeded tool outputs.
7
9
  </instruction>`;
8
10
  //# sourceMappingURL=discard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"discard.js","sourceRoot":"","sources":["../../../../lib/prompts/nudge/discard.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;eAMd,CAAA"}
1
+ {"version":3,"file":"discard.js","sourceRoot":"","sources":["../../../../lib/prompts/nudge/discard.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;eAQd,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const NUDGE_EXTRACT = "<instruction name=context_management_required>\n**CONTEXT WARNING:** Context filling with tool outputs. Context hygiene required.\n**Actions:**\n1. Knowledge \u2192 valuable raw data to reference later, use `extract` with high-fidelity distillation\n2. Phase done \u2192 extract key findings to keep context focused\n**Protocol:** Prioritize cleanup. Don't interrupt atomic ops. After immediate step, extract valuable findings.\n</instruction>";
1
+ export declare const NUDGE_EXTRACT = "<instruction name=context_management_required>\n**CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.\n\n**Immediate Actions Required:**\n1. **Task Completion:** If you have completed work, extract key findings from the tools used. Scale distillation depth to the value of the content.\n2. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use the `extract` tool with high-fidelity distillation to preserve the insights and remove the raw entry.\n\n**Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must extract valuable findings from tool outputs.\n</instruction>";
2
2
  //# sourceMappingURL=extract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../lib/prompts/nudge/extract.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,gcAMX,CAAA"}
1
+ {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../lib/prompts/nudge/extract.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,gyBAQX,CAAA"}
@@ -1,8 +1,10 @@
1
1
  export const NUDGE_EXTRACT = `<instruction name=context_management_required>
2
- **CONTEXT WARNING:** Context filling with tool outputs. Context hygiene required.
3
- **Actions:**
4
- 1. Knowledge → valuable raw data to reference later, use \`extract\` with high-fidelity distillation
5
- 2. Phase done extract key findings to keep context focused
6
- **Protocol:** Prioritize cleanup. Don't interrupt atomic ops. After immediate step, extract valuable findings.
2
+ **CRITICAL CONTEXT WARNING:** Your context window is filling with tool outputs. Strict adherence to context hygiene is required.
3
+
4
+ **Immediate Actions Required:**
5
+ 1. **Task Completion:** If you have completed work, extract key findings from the tools used. Scale distillation depth to the value of the content.
6
+ 2. **Knowledge Preservation:** If you are holding valuable raw data you'll need to reference later, use the \`extract\` tool with high-fidelity distillation to preserve the insights and remove the raw entry.
7
+
8
+ **Protocol:** You should prioritize this cleanup, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must extract valuable findings from tool outputs.
7
9
  </instruction>`;
8
10
  //# sourceMappingURL=extract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/prompts/nudge/extract.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;eAMd,CAAA"}
1
+ {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../../lib/prompts/nudge/extract.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;eAQd,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const NUDGE = "<instruction name=context_management_required>\nCRITICAL CONTEXT WARNING\nYour context window is filling with tool. Strict adherence to context hygiene is required.\n\nPROTOCOL\nYou should prioritize context management, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must perform context management.\n\nIMMEDIATE ACTION REQUIRED\n<distill>KNOWLEDGE PRESERVATION: If holding valuable raw data you POTENTIALLY will need in your task, use the `distill` tool. Produce a high-fidelity distillation to preserve insights - be thorough</distill>\n<prune>NOISE REMOVAL: If you read files or ran commands that yielded no value, use the `prune` tool to remove them. If newer tools supersedes older ones, prune the old</prune>\n<compress>PHASE COMPLETION: If a phase is complete, use the `compress` tool to condense the entire sequence into a detailed summary</compress>\n</instruction>\n";
2
+ //# sourceMappingURL=nudge.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nudge.generated.d.ts","sourceRoot":"","sources":["../../../lib/prompts/nudge.generated.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,+6BAYjB,CAAA"}
@@ -0,0 +1,17 @@
1
+ // AUTO-GENERATED FILE - DO NOT EDIT
2
+ // Generated from nudge.md by scripts/generate-prompts.ts
3
+ // To modify, edit nudge.md and run `npm run generate:prompts`
4
+ export const NUDGE = `<instruction name=context_management_required>
5
+ CRITICAL CONTEXT WARNING
6
+ Your context window is filling with tool. Strict adherence to context hygiene is required.
7
+
8
+ PROTOCOL
9
+ You should prioritize context management, but do not interrupt a critical atomic operation if one is in progress. Once the immediate step is done, you must perform context management.
10
+
11
+ IMMEDIATE ACTION REQUIRED
12
+ <distill>KNOWLEDGE PRESERVATION: If holding valuable raw data you POTENTIALLY will need in your task, use the \`distill\` tool. Produce a high-fidelity distillation to preserve insights - be thorough</distill>
13
+ <prune>NOISE REMOVAL: If you read files or ran commands that yielded no value, use the \`prune\` tool to remove them. If newer tools supersedes older ones, prune the old</prune>
14
+ <compress>PHASE COMPLETION: If a phase is complete, use the \`compress\` tool to condense the entire sequence into a detailed summary</compress>
15
+ </instruction>
16
+ `;
17
+ //# sourceMappingURL=nudge.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nudge.generated.js","sourceRoot":"","sources":["../../../lib/prompts/nudge.generated.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,yDAAyD;AACzD,8DAA8D;AAE9D,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;CAYpB,CAAA"}