charness 4.0.1 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/DEVELOPMENT.md +3 -2
- package/SETUP.md +34 -8
- package/dist/adapters/claudeCliAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeCliAdapter.js +3 -2
- package/dist/adapters/claudeCliAdapter.js.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.d.ts +61 -5
- package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js +147 -18
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
- package/dist/adapters/openCodeAdapter.d.ts +1 -0
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +11 -0
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +430 -297
- package/dist/bot.js.map +1 -1
- package/dist/connectors/jira/answerSink.d.ts +8 -0
- package/dist/connectors/jira/answerSink.d.ts.map +1 -1
- package/dist/connectors/jira/answerSink.js +15 -0
- package/dist/connectors/jira/answerSink.js.map +1 -1
- package/dist/connectors/jira/config.d.ts +16 -0
- package/dist/connectors/jira/config.d.ts.map +1 -1
- package/dist/connectors/jira/config.js +21 -2
- package/dist/connectors/jira/config.js.map +1 -1
- package/dist/connectors/jira/connector.d.ts +10 -3
- package/dist/connectors/jira/connector.d.ts.map +1 -1
- package/dist/connectors/jira/connector.js +21 -3
- package/dist/connectors/jira/connector.js.map +1 -1
- package/dist/connectors/jira/inbound.d.ts +200 -18
- package/dist/connectors/jira/inbound.d.ts.map +1 -1
- package/dist/connectors/jira/inbound.js +814 -43
- package/dist/connectors/jira/inbound.js.map +1 -1
- package/dist/connectors/jira/prompt.d.ts +46 -0
- package/dist/connectors/jira/prompt.d.ts.map +1 -1
- package/dist/connectors/jira/prompt.js +123 -15
- package/dist/connectors/jira/prompt.js.map +1 -1
- package/dist/connectors/jira/trigger.d.ts +27 -4
- package/dist/connectors/jira/trigger.d.ts.map +1 -1
- package/dist/connectors/jira/trigger.js +35 -1
- package/dist/connectors/jira/trigger.js.map +1 -1
- package/dist/connectors/jira/triggerLog.d.ts +60 -5
- package/dist/connectors/jira/triggerLog.d.ts.map +1 -1
- package/dist/connectors/jira/triggerLog.js +116 -7
- package/dist/connectors/jira/triggerLog.js.map +1 -1
- package/dist/connectors/telegram/answerSink.d.ts +12 -0
- package/dist/connectors/telegram/answerSink.d.ts.map +1 -1
- package/dist/connectors/telegram/answerSink.js +23 -0
- package/dist/connectors/telegram/answerSink.js.map +1 -1
- package/dist/connectors/telegram/botApiConnection.d.ts +2 -1
- package/dist/connectors/telegram/botApiConnection.d.ts.map +1 -1
- package/dist/connectors/telegram/botApiConnection.js +19 -1
- package/dist/connectors/telegram/botApiConnection.js.map +1 -1
- package/dist/connectors/telegram/commands/botCore.d.ts +13 -5
- package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/runners.d.ts +29 -2
- package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/runners.js +84 -45
- package/dist/connectors/telegram/commands/runners.js.map +1 -1
- package/dist/connectors/telegram/outbound.d.ts +1 -1
- package/dist/connectors/telegram/outbound.d.ts.map +1 -1
- package/dist/connectors/telegram/outbound.js +3 -1
- package/dist/connectors/telegram/outbound.js.map +1 -1
- package/dist/connectors/telegram/outputBacklogGlue.d.ts +1 -1
- package/dist/connectors/telegram/outputBacklogGlue.js +1 -1
- package/dist/connectors/telegram/outputFlushPlan.d.ts +23 -8
- package/dist/connectors/telegram/outputFlushPlan.d.ts.map +1 -1
- package/dist/connectors/telegram/outputFlushPlan.js +22 -13
- package/dist/connectors/telegram/outputFlushPlan.js.map +1 -1
- package/dist/connectors/telegram/pinnedNoticeSlot.d.ts +31 -0
- package/dist/connectors/telegram/pinnedNoticeSlot.d.ts.map +1 -0
- package/dist/connectors/telegram/pinnedNoticeSlot.js +43 -0
- package/dist/connectors/telegram/pinnedNoticeSlot.js.map +1 -0
- package/dist/connectors/telegram/sendOutcome.d.ts +50 -0
- package/dist/connectors/telegram/sendOutcome.d.ts.map +1 -0
- package/dist/connectors/telegram/sendOutcome.js +49 -0
- package/dist/connectors/telegram/sendOutcome.js.map +1 -0
- package/dist/connectors/telegram/telegramFailureRetry.d.ts +17 -0
- package/dist/connectors/telegram/telegramFailureRetry.d.ts.map +1 -0
- package/dist/connectors/telegram/telegramFailureRetry.js +29 -0
- package/dist/connectors/telegram/telegramFailureRetry.js.map +1 -0
- package/dist/connectors/telegram/unpinMessages.d.ts +1 -1
- package/dist/connectors/telegram/unpinMessages.d.ts.map +1 -1
- package/dist/connectors/telegram/unpinMessages.js +3 -18
- package/dist/connectors/telegram/unpinMessages.js.map +1 -1
- package/dist/hooks/claudeSkillsRestoreHook.d.ts +105 -0
- package/dist/hooks/claudeSkillsRestoreHook.d.ts.map +1 -0
- package/dist/hooks/claudeSkillsRestoreHook.js +276 -0
- package/dist/hooks/claudeSkillsRestoreHook.js.map +1 -0
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +4 -0
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +4 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +4 -0
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +4 -0
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +4 -0
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +4 -0
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +4 -0
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +4 -0
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +4 -0
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +4 -0
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +4 -0
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +4 -0
- package/dist/i18n/zh.js.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +2 -1
- package/dist/i18n.js.map +1 -1
- package/dist/platform/outbound.d.ts +4 -1
- package/dist/platform/outbound.d.ts.map +1 -1
- package/dist/platform/outbound.js.map +1 -1
- package/dist/rateLimiter.d.ts +33 -1
- package/dist/rateLimiter.d.ts.map +1 -1
- package/dist/rateLimiter.js +91 -5
- package/dist/rateLimiter.js.map +1 -1
- package/dist/requests/requestHeader.d.ts.map +1 -1
- package/dist/requests/requestHeader.js +1 -0
- package/dist/requests/requestHeader.js.map +1 -1
- package/dist/requests/types.d.ts +4 -1
- package/dist/requests/types.d.ts.map +1 -1
- package/dist/requests/wakeUpEngine.d.ts +31 -1
- package/dist/requests/wakeUpEngine.d.ts.map +1 -1
- package/dist/requests/wakeUpEngine.js +94 -2
- package/dist/requests/wakeUpEngine.js.map +1 -1
- package/dist/requests/wakeUpRules.d.ts +7 -0
- package/dist/requests/wakeUpRules.d.ts.map +1 -1
- package/dist/requests/wakeUpRules.js +14 -0
- package/dist/requests/wakeUpRules.js.map +1 -1
- package/dist/runnerUtility/pueueDaemon.d.ts +7 -13
- package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
- package/dist/runnerUtility/pueueDaemon.js +8 -27
- package/dist/runnerUtility/pueueDaemon.js.map +1 -1
- package/dist/scheduler/engine.d.ts +17 -4
- package/dist/scheduler/engine.d.ts.map +1 -1
- package/dist/scheduler/engine.js +55 -10
- package/dist/scheduler/engine.js.map +1 -1
- package/dist/scheduler/mcpBoot.d.ts +6 -2
- package/dist/scheduler/mcpBoot.d.ts.map +1 -1
- package/dist/scheduler/mcpBoot.js +7 -1
- package/dist/scheduler/mcpBoot.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +18 -9
- package/dist/scheduler/mcpSurface.js.map +1 -1
- package/dist/selfUpdate/selfCheck.d.ts.map +1 -1
- package/dist/selfUpdate/selfCheck.js +1 -1
- package/dist/selfUpdate/selfCheck.js.map +1 -1
- package/dist/sendErrorClassifier.d.ts +6 -0
- package/dist/sendErrorClassifier.d.ts.map +1 -1
- package/dist/sendErrorClassifier.js +9 -0
- package/dist/sendErrorClassifier.js.map +1 -1
- package/dist/startupPromptBuffer.d.ts +8 -8
- package/dist/startupPromptBuffer.d.ts.map +1 -1
- package/dist/startupPromptBuffer.js +7 -5
- package/dist/startupPromptBuffer.js.map +1 -1
- package/dist/testTimings.d.ts +6 -3
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +7 -2
- package/dist/testTimings.js.map +1 -1
- package/dist/threadRouting.d.ts +23 -0
- package/dist/threadRouting.d.ts.map +1 -1
- package/dist/threadRouting.js +28 -0
- package/dist/threadRouting.js.map +1 -1
- package/dist/trackers/taskAgentSlots.d.ts +42 -3
- package/dist/trackers/taskAgentSlots.d.ts.map +1 -1
- package/dist/trackers/taskAgentSlots.js +31 -11
- package/dist/trackers/taskAgentSlots.js.map +1 -1
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/agentPlugin.d.ts +7 -0
- package/dist/utils/agentPlugin.d.ts.map +1 -1
- package/dist/utils/agentPlugin.js +12 -0
- package/dist/utils/agentPlugin.js.map +1 -1
- package/dist/utils/claudeCompactHook.d.ts +73 -10
- package/dist/utils/claudeCompactHook.d.ts.map +1 -1
- package/dist/utils/claudeCompactHook.js +96 -17
- package/dist/utils/claudeCompactHook.js.map +1 -1
- package/dist/utils/claudeProfiles.d.ts +8 -0
- package/dist/utils/claudeProfiles.d.ts.map +1 -1
- package/dist/utils/claudeProfiles.js +12 -2
- package/dist/utils/claudeProfiles.js.map +1 -1
- package/dist/utils/claudeTranscriptEpoch.d.ts +15 -0
- package/dist/utils/claudeTranscriptEpoch.d.ts.map +1 -0
- package/dist/utils/claudeTranscriptEpoch.js +120 -0
- package/dist/utils/claudeTranscriptEpoch.js.map +1 -0
- package/dist/utils/clearStatusCoalescer.d.ts +24 -0
- package/dist/utils/clearStatusCoalescer.d.ts.map +1 -0
- package/dist/utils/clearStatusCoalescer.js +25 -0
- package/dist/utils/clearStatusCoalescer.js.map +1 -0
- package/dist/utils/compactOnIdle.d.ts +91 -34
- package/dist/utils/compactOnIdle.d.ts.map +1 -1
- package/dist/utils/compactOnIdle.js +149 -31
- package/dist/utils/compactOnIdle.js.map +1 -1
- package/dist/utils/fileSendPlan.d.ts +30 -8
- package/dist/utils/fileSendPlan.d.ts.map +1 -1
- package/dist/utils/fileSendPlan.js +37 -12
- package/dist/utils/fileSendPlan.js.map +1 -1
- package/dist/utils/fileSendService.d.ts +1 -1
- package/dist/utils/fileSendService.d.ts.map +1 -1
- package/dist/utils/fileSendService.js +9 -1
- package/dist/utils/fileSendService.js.map +1 -1
- package/dist/utils/groupOutputBacklog.d.ts +90 -0
- package/dist/utils/groupOutputBacklog.d.ts.map +1 -0
- package/dist/utils/groupOutputBacklog.js +134 -0
- package/dist/utils/groupOutputBacklog.js.map +1 -0
- package/dist/utils/imageDimensions.d.ts +32 -0
- package/dist/utils/imageDimensions.d.ts.map +1 -0
- package/dist/utils/imageDimensions.js +181 -0
- package/dist/utils/imageDimensions.js.map +1 -0
- package/dist/utils/jsonStreamHost.d.ts +35 -9
- package/dist/utils/jsonStreamHost.d.ts.map +1 -1
- package/dist/utils/jsonStreamHost.js +59 -16
- package/dist/utils/jsonStreamHost.js.map +1 -1
- package/dist/utils/lostWork.d.ts +8 -2
- package/dist/utils/lostWork.d.ts.map +1 -1
- package/dist/utils/lostWork.js +9 -5
- package/dist/utils/lostWork.js.map +1 -1
- package/dist/utils/messageSendService.d.ts +26 -3
- package/dist/utils/messageSendService.d.ts.map +1 -1
- package/dist/utils/messageSendService.js +35 -3
- package/dist/utils/messageSendService.js.map +1 -1
- package/dist/utils/openCodeCompactPlugin.d.ts +33 -0
- package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
- package/dist/utils/openCodeCompactPlugin.js +192 -1
- package/dist/utils/openCodeCompactPlugin.js.map +1 -1
- package/dist/utils/promptDelivery.d.ts +11 -2
- package/dist/utils/promptDelivery.d.ts.map +1 -1
- package/dist/utils/promptDelivery.js +3 -3
- package/dist/utils/promptDelivery.js.map +1 -1
- package/dist/utils/skillsRestore.d.ts +235 -0
- package/dist/utils/skillsRestore.d.ts.map +1 -0
- package/dist/utils/skillsRestore.js +515 -0
- package/dist/utils/skillsRestore.js.map +1 -0
- package/dist/utils/statusFlushDecision.js +1 -1
- package/dist/utils/streamedCompactionSummary.d.ts +4 -4
- package/dist/utils/streamedCompactionSummary.js +5 -5
- package/dist/utils/streamedCompactionSummary.js.map +1 -1
- package/dist/utils/streamedOutputLanding.d.ts +14 -0
- package/dist/utils/streamedOutputLanding.d.ts.map +1 -0
- package/dist/utils/streamedOutputLanding.js +45 -0
- package/dist/utils/streamedOutputLanding.js.map +1 -0
- package/dist/utils/typingLoopBackstop.d.ts +8 -7
- package/dist/utils/typingLoopBackstop.d.ts.map +1 -1
- package/dist/utils/typingLoopBackstop.js +6 -5
- package/dist/utils/typingLoopBackstop.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/utils/clearThreadOutputQueues.d.ts +0 -44
- package/dist/utils/clearThreadOutputQueues.d.ts.map +0 -1
- package/dist/utils/clearThreadOutputQueues.js +0 -39
- package/dist/utils/clearThreadOutputQueues.js.map +0 -1
- package/dist/utils/groupFinalizePlan.d.ts +0 -36
- package/dist/utils/groupFinalizePlan.d.ts.map +0 -1
- package/dist/utils/groupFinalizePlan.js +0 -31
- package/dist/utils/groupFinalizePlan.js.map +0 -1
|
@@ -212,28 +212,54 @@ export declare function getIdleFireDecision(input: {
|
|
|
212
212
|
*/
|
|
213
213
|
export declare const compactionSummaryGuidance = "Make the summary MAXIMALLY COMPLETE: preserve every detail needed to continue the work from a clean session with no memory of this conversation \u2014 never drop load-bearing information (decisions, constraints, file paths, commands, error strings, identifiers, active tasks, delegated-work state) for brevity. Capture only SESSION-SPECIFIC working nuances: the user's in-session directives and any deviations from the standard process. Do NOT restate the standard instructions that auto-load at session start (for example CLAUDE.md / AGENTS.md / rules files) \u2014 they reload automatically on the fresh session, so duplicating them only wastes the summary. Keep the conversational directives, active exceptions, and delegated-work state; drop the static rulebook.";
|
|
214
214
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
|
|
223
|
-
|
|
215
|
+
* FIXED (English, locale-independent) sentinel markers of the loaded-skills block, the one place a summary names its
|
|
216
|
+
* skills for a machine: the OpenCode plugin reads the block ({@link parseCompactionLoadedSkills}) to know which skills to
|
|
217
|
+
* restore after the compaction, beside the skill tool calls it finds in the session's history. Sentinels for the same reason
|
|
218
|
+
* as {@link compactionClosingStartMarker}; the guidance below pins these exact strings.
|
|
219
|
+
*
|
|
220
|
+
* The Claude restore hook cannot read the block of the compaction it follows. Measured on Claude Code 2.1.322 (`-p`, stream-json,
|
|
221
|
+
* a manual `/compact` and three automatic mid-turn compactions): the hooks run `PreCompact` → `SessionStart` (source
|
|
222
|
+
* `compact`) → `PostCompact`, and while the `SessionStart` hooks run the transcript holds neither the new `compact_boundary`
|
|
223
|
+
* nor the new `isCompactSummary` record (only the previous compaction's). So on Claude the transcript's skill records are the
|
|
224
|
+
* whole source; the block still serves OpenCode, whose plugin reads the finished summary.
|
|
225
|
+
*/
|
|
226
|
+
export declare const compactionSkillsBlockStartMarker = "<<<LOADED_SKILLS>>>";
|
|
227
|
+
export declare const compactionSkillsBlockEndMarker = "<<<END_LOADED_SKILLS>>>";
|
|
228
|
+
/** The longest line the block holds as a skill name: longer is no name. */
|
|
229
|
+
export declare const compactionSkillsBlockMaxNameLength = 128;
|
|
230
|
+
/**
|
|
231
|
+
* @description The loaded-skills block guidance: the summary names every skill that was loaded, one exact name per line
|
|
232
|
+
* between {@link compactionSkillsBlockStartMarker} and {@link compactionSkillsBlockEndMarker}. The bot hides the block from the
|
|
233
|
+
* topic ({@link createCompactionSummaryLineFilter}) and the OpenCode plugin reads it. ONE line of printable ASCII with no double
|
|
234
|
+
* quote or backslash, for the `PreCompact` hook's fixed-string match (see {@link compactionChecklistGuidance}).
|
|
235
|
+
*/
|
|
236
|
+
export declare const compactionSkillsBlockGuidance = "Write the exact name of every skill that was loaded (invoked) in this session, never translated or shortened (a namespaced name such as plugin:skill stays whole), one name per line with nothing else on it, in a block of its own wrapped EXACTLY between a line containing only <<<LOADED_SKILLS>>> and a line containing only <<<END_LOADED_SKILLS>>>, placed before the numbered checklist and before any closing section. If no skill was loaded, leave the block out.";
|
|
237
|
+
/**
|
|
238
|
+
* @description The loaded-skills guidance. A skill is loaded on demand mid-session (a tool call whose result carries its
|
|
239
|
+
* instructions), so — unlike CLAUDE.md / AGENTS.md — the summary drops its text. Where the bot can, it puts the text back
|
|
240
|
+
* itself right after the compaction (`utils/skillsRestore.ts`); where it cannot (the frozen tmux backend, a process started
|
|
241
|
+
* before the restore existed, an OpenCode instance that has not loaded the current plugin yet), the continuing session must
|
|
242
|
+
* load the skills again. The bot-issued instruction cannot know which case a compaction is in, so the summary says both, and
|
|
243
|
+
* what the continuing session finds in its own context decides. Worded without the restore's header and without saying
|
|
244
|
+
* WHERE the restore sits: the summary is shown to the person (`/compact_summary`), who must see nothing of the restore, and
|
|
245
|
+
* the restore comes before the summary on OpenCode and after it on Claude. It travels with {@link compactionChecklistGuidance}
|
|
246
|
+
* as {@link compactionResumeGuidance}.
|
|
247
|
+
*/
|
|
248
|
+
export declare const compactionSkillsGuidance = "Then state in plain words that these skills stay in force for the continuing session: it must load each of them again and follow it before resuming the work, unless their full text was restored to it right after the compaction (then it must NOT load them again), since this summary does not carry the instructions of a skill. If no skill was loaded, omit this.";
|
|
224
249
|
/**
|
|
225
250
|
* @description The "what to do next" checklist every compaction summary ends with.
|
|
226
|
-
* Item 1
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* ends the summary. A code constant for the same reason as
|
|
251
|
+
* Item 1 ({@link compactionChecklistSkillsItem}) names the skills of the block (exactly, so the continuing session cannot
|
|
252
|
+
* paraphrase a name into one that does not load) and says when they need no loading; the rest are the next steps the summary already records, in order —
|
|
253
|
+
* never invented ones. With a closing section requested, the list is that section's
|
|
254
|
+
* last part, right before its end marker, so "write nothing after the end marker"
|
|
255
|
+
* still holds; otherwise it ends the summary. A code constant for the same reason as
|
|
232
256
|
* {@link compactionSummaryGuidance}: one text for every path, no locale in it. It is
|
|
233
257
|
* ONE line of printable ASCII with no double quote or backslash, because the
|
|
234
258
|
* `PreCompact` hook matches it as a fixed string in the raw JSON it reads on stdin.
|
|
235
259
|
*/
|
|
236
|
-
|
|
260
|
+
/** What checklist item 1 opens with, before the skills' names: the text the summary shows the person, so a test copies it as is. */
|
|
261
|
+
export declare const compactionChecklistSkillsItem = "skills in force (load them again only if their full text was not restored to you right after the compaction):";
|
|
262
|
+
export declare const compactionChecklistGuidance = "End the summary with a numbered checklist (1., 2., 3., one short item per line) of what the continuing session does next, as the very LAST thing in it. Item 1 is 'skills in force (load them again only if their full text was not restored to you right after the compaction):' followed by the exact name of every skill in that block, never translated or shortened; if none was loaded, leave that item out. The other items are the next steps this summary already records, in order: invent no new steps. If you are also asked to write a closing section between two marker lines, the checklist is the last part of that section, right before its end marker.";
|
|
237
263
|
/**
|
|
238
264
|
* FIXED (English, locale-independent) sentinel markers the self-review section is wrapped in, and the one line
|
|
239
265
|
* the section holds when there were none. Sentinels for the same reason as {@link compactionClosingStartMarker}:
|
|
@@ -257,26 +283,31 @@ export declare const compactionNoGapsLine = "NO_INSTRUCTION_GAPS";
|
|
|
257
283
|
*/
|
|
258
284
|
export declare const compactionGapsGuidance = "List the mistakes the agent made in this session, especially REPEATED ones, that a change to its standing instructions (rules, skills, CLAUDE.md / AGENTS.md) could prevent: for each, the mistake, then the concrete instruction change that would prevent it and where that change would go. Put that list in its own section wrapped EXACTLY between a line containing only <<<INSTRUCTION_GAPS>>> and a line containing only <<<END_INSTRUCTION_GAPS>>>, placed before the numbered checklist and before any closing section, and write it in the language the user used in this conversation. If there were no such mistakes, write only the single line NO_INSTRUCTION_GAPS between those two marker lines. The continuing session must only PROPOSE these changes to the user and wait for approval: it must never write or change instructions on its own.";
|
|
259
285
|
/**
|
|
260
|
-
* @description The resume guidance WITHOUT the self-review section: the loaded skills and the
|
|
261
|
-
* What a compaction asks for while `/compact_self_review` is off, and the part every variant of
|
|
262
|
-
* carries — so the one text the `PreCompact` hook matches to skip a compaction that already
|
|
263
|
-
* variant the bot sent.
|
|
286
|
+
* @description The resume guidance WITHOUT the self-review section: the loaded-skills block, the loaded skills and the
|
|
287
|
+
* next-steps checklist. What a compaction asks for while `/compact_self_review` is off, and the part every variant of
|
|
288
|
+
* {@link compactionResumeGuidance} carries — so the one text the `PreCompact` hook matches to skip a compaction that already
|
|
289
|
+
* holds the guidance, whichever variant the bot sent.
|
|
264
290
|
*/
|
|
265
|
-
export declare const compactionResumeGuidanceWithoutGaps = "
|
|
291
|
+
export declare const compactionResumeGuidanceWithoutGaps = "Write the exact name of every skill that was loaded (invoked) in this session, never translated or shortened (a namespaced name such as plugin:skill stays whole), one name per line with nothing else on it, in a block of its own wrapped EXACTLY between a line containing only <<<LOADED_SKILLS>>> and a line containing only <<<END_LOADED_SKILLS>>>, placed before the numbered checklist and before any closing section. If no skill was loaded, leave the block out. Then state in plain words that these skills stay in force for the continuing session: it must load each of them again and follow it before resuming the work, unless their full text was restored to it right after the compaction (then it must NOT load them again), since this summary does not carry the instructions of a skill. If no skill was loaded, omit this. End the summary with a numbered checklist (1., 2., 3., one short item per line) of what the continuing session does next, as the very LAST thing in it. Item 1 is 'skills in force (load them again only if their full text was not restored to you right after the compaction):' followed by the exact name of every skill in that block, never translated or shortened; if none was loaded, leave that item out. The other items are the next steps this summary already records, in order: invent no new steps. If you are also asked to write a closing section between two marker lines, the checklist is the last part of that section, right before its end marker.";
|
|
266
292
|
/**
|
|
267
293
|
* @description What the continuing session needs from EVERY compaction summary — the
|
|
268
|
-
* self-review section, the loaded skills and the next-steps checklist — as the one text each path
|
|
269
|
-
* a bot-issued compaction in its instruction ({@link buildCompactionInstruction}),
|
|
294
|
+
* self-review section, the loaded-skills block, the loaded skills and the next-steps checklist — as the one text each path
|
|
295
|
+
* carries: a bot-issued compaction in its instruction ({@link buildCompactionInstruction}),
|
|
270
296
|
* and each backend's own overflow compaction through a bot-installed hook — Claude's
|
|
271
297
|
* `PreCompact` hook (`claudeCompactHook.ts`, which also matches on this exact text to
|
|
272
298
|
* skip a compaction that already carries it) and OpenCode's compaction plugin
|
|
273
299
|
* (`openCodeCompactPlugin.ts`). The checklist stays LAST: each sentence says where it goes in the summary, so the order
|
|
274
|
-
* of the sentences is free
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
|
|
279
|
-
|
|
300
|
+
* of the sentences is free.
|
|
301
|
+
*
|
|
302
|
+
* A process started before the current text keeps its own hook (adopted across hot reloads, hooks are read at start), and
|
|
303
|
+
* that hook skips a compaction only by finding the text IT carries. The self-review sentence was added ahead of the older
|
|
304
|
+
* text for that reason; the skills restore had to reword the skills sentence and checklist item 1 (they no longer say
|
|
305
|
+
* "load these skills" unconditionally), so such a process's hook no longer finds its text in a bot-issued instruction and
|
|
306
|
+
* appends its own: until that process stops at its idle mark, a `/compact` there reads both texts. Both then lead to the
|
|
307
|
+
* same thing — such a process has no restore hook, so the summary's conditional wording tells it to load the skills again,
|
|
308
|
+
* as its old text does.
|
|
309
|
+
*/
|
|
310
|
+
export declare const compactionResumeGuidance = "List the mistakes the agent made in this session, especially REPEATED ones, that a change to its standing instructions (rules, skills, CLAUDE.md / AGENTS.md) could prevent: for each, the mistake, then the concrete instruction change that would prevent it and where that change would go. Put that list in its own section wrapped EXACTLY between a line containing only <<<INSTRUCTION_GAPS>>> and a line containing only <<<END_INSTRUCTION_GAPS>>>, placed before the numbered checklist and before any closing section, and write it in the language the user used in this conversation. If there were no such mistakes, write only the single line NO_INSTRUCTION_GAPS between those two marker lines. The continuing session must only PROPOSE these changes to the user and wait for approval: it must never write or change instructions on its own. Write the exact name of every skill that was loaded (invoked) in this session, never translated or shortened (a namespaced name such as plugin:skill stays whole), one name per line with nothing else on it, in a block of its own wrapped EXACTLY between a line containing only <<<LOADED_SKILLS>>> and a line containing only <<<END_LOADED_SKILLS>>>, placed before the numbered checklist and before any closing section. If no skill was loaded, leave the block out. Then state in plain words that these skills stay in force for the continuing session: it must load each of them again and follow it before resuming the work, unless their full text was restored to it right after the compaction (then it must NOT load them again), since this summary does not carry the instructions of a skill. If no skill was loaded, omit this. End the summary with a numbered checklist (1., 2., 3., one short item per line) of what the continuing session does next, as the very LAST thing in it. Item 1 is 'skills in force (load them again only if their full text was not restored to you right after the compaction):' followed by the exact name of every skill in that block, never translated or shortened; if none was loaded, leave that item out. The other items are the next steps this summary already records, in order: invent no new steps. If you are also asked to write a closing section between two marker lines, the checklist is the last part of that section, right before its end marker.";
|
|
280
311
|
/** @description The resume guidance a compaction carries: with the self-review section while `/compact_self_review` is on, without it while off. */
|
|
281
312
|
export declare function getCompactionResumeGuidance(isWithInstructionGaps: boolean): string;
|
|
282
313
|
/**
|
|
@@ -321,8 +352,8 @@ export declare function formatTokenCount(count: number): string;
|
|
|
321
352
|
*/
|
|
322
353
|
export declare const compactionClosingStartMarker = "<<<WHERE_WE_STOPPED>>>";
|
|
323
354
|
export declare const compactionClosingEndMarker = "<<<END_WHERE_WE_STOPPED>>>";
|
|
324
|
-
/** What a summary line can be besides prose: the machine scaffolding of the
|
|
325
|
-
export type CompactionScaffoldingKind = 'closingStart' | 'closingEnd' | 'gapsStart' | 'gapsEnd' | 'noGaps';
|
|
355
|
+
/** What a summary line can be besides prose: the machine scaffolding of the three sections. */
|
|
356
|
+
export type CompactionScaffoldingKind = 'closingStart' | 'closingEnd' | 'gapsStart' | 'gapsEnd' | 'noGaps' | 'skillsStart' | 'skillsEnd';
|
|
326
357
|
/** A summary line read as scaffolding: which kind it opens with and the prose after it on the same line. */
|
|
327
358
|
export interface ParsedCompactionSummaryLine {
|
|
328
359
|
/** `null`: the line is prose (the other field is the line itself). */
|
|
@@ -348,18 +379,44 @@ export declare function checkCouldBecomeCompactionScaffoldingLine(fragment: stri
|
|
|
348
379
|
export interface CompactionSummaryLineFilter {
|
|
349
380
|
/** The lines to show for `line`: none (scaffolding), the line itself (prose), or the header and the line that opens a section. */
|
|
350
381
|
pushLine(line: string): string[];
|
|
382
|
+
/**
|
|
383
|
+
* Whether the filter is inside the loaded-skills block: every line there is hidden, so a streamed line not finished yet
|
|
384
|
+
* must wait for its newline — shown in part, the rest of it would go out unfiltered.
|
|
385
|
+
*/
|
|
386
|
+
checkIsInHiddenBlock(): boolean;
|
|
351
387
|
}
|
|
352
388
|
/**
|
|
353
|
-
* @description The
|
|
389
|
+
* @description The skill name a line of the loaded-skills block holds: the line trimmed, with one leading list bullet
|
|
390
|
+
* (`- `, `* `) and surrounding backticks dropped (models add them despite the guidance); `''` for a blank line; `null` for
|
|
391
|
+
* a line that is no name — one with blanks inside, one over `maxNameLength`, or one of the block's own markers.
|
|
392
|
+
* Self-contained (it reads nothing outside its parameters) because the OpenCode plugin embeds its source.
|
|
393
|
+
*/
|
|
394
|
+
export declare function readSkillsBlockLineName(line: string, startMarker: string, endMarker: string, maxNameLength: number): string | null;
|
|
395
|
+
/**
|
|
396
|
+
* @description The skill names of a summary's loaded-skills block — the LAST complete pair of `startMarker` / `endMarker`
|
|
397
|
+
* lines — in the order written, de-duplicated; `null` when the summary has no complete block. A marker counts only ALONE on
|
|
398
|
+
* its line, as the guidance asks: a summary that quotes the instruction in prose holds no block. A line that is no name
|
|
399
|
+
* ({@link readSkillsBlockLineName}) is skipped. Self-contained (it calls only {@link readSkillsBlockLineName}) because the
|
|
400
|
+
* OpenCode plugin embeds the source of both; {@link parseCompactionLoadedSkills} is the bot's own entry.
|
|
401
|
+
*/
|
|
402
|
+
export declare function parseSkillsBlock(summaryText: string, startMarker: string, endMarker: string, maxNameLength: number): string[] | null;
|
|
403
|
+
/** @description The skills a compaction summary's block names ({@link parseSkillsBlock} with the summary's own markers). */
|
|
404
|
+
export declare function parseCompactionLoadedSkills(summaryText: string): string[] | null;
|
|
405
|
+
/**
|
|
406
|
+
* @description The line filter of a summary shown in the topic. Scaffolding goes: the markers of the three sections and the
|
|
354
407
|
* «none» line. The self-review section gets `gapsHeader` where its first line is — it reads as the proposals it is, not as
|
|
355
408
|
* more next steps beside the numbered checklist right after it — and a section with no first line (the none line, only
|
|
356
409
|
* blanks) leaves no header, no marker and no trace. Prose on a marker's own line is kept.
|
|
410
|
+
*
|
|
411
|
+
* The loaded-skills block goes WHOLE — its names too, which are for the machine (the checklist names the skills for the
|
|
412
|
+
* person) — unlike the other two sections, whose content is genuine prose. A line that is no name ends a block whose end
|
|
413
|
+
* marker never came, so a model that forgets the marker hides nothing but the names.
|
|
357
414
|
*/
|
|
358
415
|
export declare function createCompactionSummaryLineFilter(gapsHeader: string): CompactionSummaryLineFilter;
|
|
359
416
|
/**
|
|
360
417
|
* @description The full compaction summary as the bot posts it to the topic: the scaffolding lines removed ({@link
|
|
361
|
-
* createCompactionSummaryLineFilter}), every line of prose kept — including the sections the markers
|
|
362
|
-
* genuine content — and the self-review section under `gapsHeader`.
|
|
418
|
+
* createCompactionSummaryLineFilter}), every line of prose kept — including the closing and self-review sections the markers
|
|
419
|
+
* wrap, which are genuine content — the loaded-skills block removed whole, and the self-review section under `gapsHeader`.
|
|
363
420
|
*
|
|
364
421
|
* A marker sitting ALONE on its line takes the whole line with it, so the summary is not left with a blank gap where it
|
|
365
422
|
* stood; a marker the model happened to put AHEAD of real prose on one line loses only the marker, never the prose.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compactOnIdle.d.ts","sourceRoot":"","sources":["../../src/utils/compactOnIdle.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,QAAiB,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE1E;AAED;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,QAAS,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAiB,CAAC;AAoBzD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;AAE3E,8FAA8F;AAC9F,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,+FAA+F;IAC/F,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,yBAAyB,CAW5B;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B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e,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAEV;AAED,gFAAgF;AAChF,MAAM,WAAW,yBAAyB;IACxC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,sDAAsD;IACtD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,mHAAmH;IACnH,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE;IACpD,wFAAwF;IACxF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,8EAA8E;IAC9E,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,GAAG,yBAAyB,CAO5B"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* mirroring `getCompactCommandRoute` in `compactCommandRoute.ts`.
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.compactionClosingEndMarker = exports.compactionClosingStartMarker = exports.compactionResumeGuidance = exports.compactionResumeGuidanceWithoutGaps = exports.compactionGapsGuidance = exports.compactionNoGapsLine = exports.compactionGapsEndMarker = exports.compactionGapsStartMarker = exports.compactionChecklistGuidance = exports.compactionSkillsGuidance = exports.compactionSummaryGuidance = exports.pendingWorkRecheckMarginMs = exports.compactIdleOverdueSpreadMs = exports.compactIdleOverdueMinDelayMs = exports.idleCompactMs = void 0;
|
|
12
|
+
exports.compactionClosingEndMarker = exports.compactionClosingStartMarker = exports.compactionResumeGuidance = exports.compactionResumeGuidanceWithoutGaps = exports.compactionGapsGuidance = exports.compactionNoGapsLine = exports.compactionGapsEndMarker = exports.compactionGapsStartMarker = exports.compactionChecklistGuidance = exports.compactionChecklistSkillsItem = exports.compactionSkillsGuidance = exports.compactionSkillsBlockGuidance = exports.compactionSkillsBlockMaxNameLength = exports.compactionSkillsBlockEndMarker = exports.compactionSkillsBlockStartMarker = exports.compactionSummaryGuidance = exports.pendingWorkRecheckMarginMs = exports.compactIdleOverdueSpreadMs = exports.compactIdleOverdueMinDelayMs = exports.idleCompactMs = void 0;
|
|
13
13
|
exports.getAgentIdleMs = getAgentIdleMs;
|
|
14
14
|
exports.getIdleCompactionArmDecision = getIdleCompactionArmDecision;
|
|
15
15
|
exports.resolveCompactOnIdleEnabled = resolveCompactOnIdleEnabled;
|
|
@@ -24,6 +24,9 @@ exports.buildCompactionInstruction = buildCompactionInstruction;
|
|
|
24
24
|
exports.formatTokenCount = formatTokenCount;
|
|
25
25
|
exports.parseCompactionSummaryLine = parseCompactionSummaryLine;
|
|
26
26
|
exports.checkCouldBecomeCompactionScaffoldingLine = checkCouldBecomeCompactionScaffoldingLine;
|
|
27
|
+
exports.readSkillsBlockLineName = readSkillsBlockLineName;
|
|
28
|
+
exports.parseSkillsBlock = parseSkillsBlock;
|
|
29
|
+
exports.parseCompactionLoadedSkills = parseCompactionLoadedSkills;
|
|
27
30
|
exports.createCompactionSummaryLineFilter = createCompactionSummaryLineFilter;
|
|
28
31
|
exports.formatCompactionSummaryForTopic = formatCompactionSummaryForTopic;
|
|
29
32
|
exports.parseCompactionInstructionGaps = parseCompactionInstructionGaps;
|
|
@@ -256,28 +259,54 @@ function getIdleFireDecision(input) {
|
|
|
256
259
|
*/
|
|
257
260
|
exports.compactionSummaryGuidance = 'Make the summary MAXIMALLY COMPLETE: preserve every detail needed to continue the work from a clean session with no memory of this conversation — never drop load-bearing information (decisions, constraints, file paths, commands, error strings, identifiers, active tasks, delegated-work state) for brevity. Capture only SESSION-SPECIFIC working nuances: the user\'s in-session directives and any deviations from the standard process. Do NOT restate the standard instructions that auto-load at session start (for example CLAUDE.md / AGENTS.md / rules files) — they reload automatically on the fresh session, so duplicating them only wastes the summary. Keep the conversational directives, active exceptions, and delegated-work state; drop the static rulebook.';
|
|
258
261
|
/**
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
|
|
267
|
-
|
|
262
|
+
* FIXED (English, locale-independent) sentinel markers of the loaded-skills block, the one place a summary names its
|
|
263
|
+
* skills for a machine: the OpenCode plugin reads the block ({@link parseCompactionLoadedSkills}) to know which skills to
|
|
264
|
+
* restore after the compaction, beside the skill tool calls it finds in the session's history. Sentinels for the same reason
|
|
265
|
+
* as {@link compactionClosingStartMarker}; the guidance below pins these exact strings.
|
|
266
|
+
*
|
|
267
|
+
* The Claude restore hook cannot read the block of the compaction it follows. Measured on Claude Code 2.1.322 (`-p`, stream-json,
|
|
268
|
+
* a manual `/compact` and three automatic mid-turn compactions): the hooks run `PreCompact` → `SessionStart` (source
|
|
269
|
+
* `compact`) → `PostCompact`, and while the `SessionStart` hooks run the transcript holds neither the new `compact_boundary`
|
|
270
|
+
* nor the new `isCompactSummary` record (only the previous compaction's). So on Claude the transcript's skill records are the
|
|
271
|
+
* whole source; the block still serves OpenCode, whose plugin reads the finished summary.
|
|
272
|
+
*/
|
|
273
|
+
exports.compactionSkillsBlockStartMarker = '<<<LOADED_SKILLS>>>';
|
|
274
|
+
exports.compactionSkillsBlockEndMarker = '<<<END_LOADED_SKILLS>>>';
|
|
275
|
+
/** The longest line the block holds as a skill name: longer is no name. */
|
|
276
|
+
exports.compactionSkillsBlockMaxNameLength = 128;
|
|
277
|
+
/**
|
|
278
|
+
* @description The loaded-skills block guidance: the summary names every skill that was loaded, one exact name per line
|
|
279
|
+
* between {@link compactionSkillsBlockStartMarker} and {@link compactionSkillsBlockEndMarker}. The bot hides the block from the
|
|
280
|
+
* topic ({@link createCompactionSummaryLineFilter}) and the OpenCode plugin reads it. ONE line of printable ASCII with no double
|
|
281
|
+
* quote or backslash, for the `PreCompact` hook's fixed-string match (see {@link compactionChecklistGuidance}).
|
|
282
|
+
*/
|
|
283
|
+
exports.compactionSkillsBlockGuidance = `Write the exact name of every skill that was loaded (invoked) in this session, never translated or shortened (a namespaced name such as plugin:skill stays whole), one name per line with nothing else on it, in a block of its own wrapped EXACTLY between a line containing only ${exports.compactionSkillsBlockStartMarker} and a line containing only ${exports.compactionSkillsBlockEndMarker}, placed before the numbered checklist and before any closing section. If no skill was loaded, leave the block out.`;
|
|
284
|
+
/**
|
|
285
|
+
* @description The loaded-skills guidance. A skill is loaded on demand mid-session (a tool call whose result carries its
|
|
286
|
+
* instructions), so — unlike CLAUDE.md / AGENTS.md — the summary drops its text. Where the bot can, it puts the text back
|
|
287
|
+
* itself right after the compaction (`utils/skillsRestore.ts`); where it cannot (the frozen tmux backend, a process started
|
|
288
|
+
* before the restore existed, an OpenCode instance that has not loaded the current plugin yet), the continuing session must
|
|
289
|
+
* load the skills again. The bot-issued instruction cannot know which case a compaction is in, so the summary says both, and
|
|
290
|
+
* what the continuing session finds in its own context decides. Worded without the restore's header and without saying
|
|
291
|
+
* WHERE the restore sits: the summary is shown to the person (`/compact_summary`), who must see nothing of the restore, and
|
|
292
|
+
* the restore comes before the summary on OpenCode and after it on Claude. It travels with {@link compactionChecklistGuidance}
|
|
293
|
+
* as {@link compactionResumeGuidance}.
|
|
294
|
+
*/
|
|
295
|
+
exports.compactionSkillsGuidance = 'Then state in plain words that these skills stay in force for the continuing session: it must load each of them again and follow it before resuming the work, unless their full text was restored to it right after the compaction (then it must NOT load them again), since this summary does not carry the instructions of a skill. If no skill was loaded, omit this.';
|
|
268
296
|
/**
|
|
269
297
|
* @description The "what to do next" checklist every compaction summary ends with.
|
|
270
|
-
* Item 1
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* ends the summary. A code constant for the same reason as
|
|
298
|
+
* Item 1 ({@link compactionChecklistSkillsItem}) names the skills of the block (exactly, so the continuing session cannot
|
|
299
|
+
* paraphrase a name into one that does not load) and says when they need no loading; the rest are the next steps the summary already records, in order —
|
|
300
|
+
* never invented ones. With a closing section requested, the list is that section's
|
|
301
|
+
* last part, right before its end marker, so "write nothing after the end marker"
|
|
302
|
+
* still holds; otherwise it ends the summary. A code constant for the same reason as
|
|
276
303
|
* {@link compactionSummaryGuidance}: one text for every path, no locale in it. It is
|
|
277
304
|
* ONE line of printable ASCII with no double quote or backslash, because the
|
|
278
305
|
* `PreCompact` hook matches it as a fixed string in the raw JSON it reads on stdin.
|
|
279
306
|
*/
|
|
280
|
-
|
|
307
|
+
/** What checklist item 1 opens with, before the skills' names: the text the summary shows the person, so a test copies it as is. */
|
|
308
|
+
exports.compactionChecklistSkillsItem = 'skills in force (load them again only if their full text was not restored to you right after the compaction):';
|
|
309
|
+
exports.compactionChecklistGuidance = `End the summary with a numbered checklist (1., 2., 3., one short item per line) of what the continuing session does next, as the very LAST thing in it. Item 1 is '${exports.compactionChecklistSkillsItem}' followed by the exact name of every skill in that block, never translated or shortened; if none was loaded, leave that item out. The other items are the next steps this summary already records, in order: invent no new steps. If you are also asked to write a closing section between two marker lines, the checklist is the last part of that section, right before its end marker.`;
|
|
281
310
|
/**
|
|
282
311
|
* FIXED (English, locale-independent) sentinel markers the self-review section is wrapped in, and the one line
|
|
283
312
|
* the section holds when there were none. Sentinels for the same reason as {@link compactionClosingStartMarker}:
|
|
@@ -301,24 +330,29 @@ exports.compactionNoGapsLine = 'NO_INSTRUCTION_GAPS';
|
|
|
301
330
|
*/
|
|
302
331
|
exports.compactionGapsGuidance = `List the mistakes the agent made in this session, especially REPEATED ones, that a change to its standing instructions (rules, skills, CLAUDE.md / AGENTS.md) could prevent: for each, the mistake, then the concrete instruction change that would prevent it and where that change would go. Put that list in its own section wrapped EXACTLY between a line containing only ${exports.compactionGapsStartMarker} and a line containing only ${exports.compactionGapsEndMarker}, placed before the numbered checklist and before any closing section, and write it in the language the user used in this conversation. If there were no such mistakes, write only the single line ${exports.compactionNoGapsLine} between those two marker lines. The continuing session must only PROPOSE these changes to the user and wait for approval: it must never write or change instructions on its own.`;
|
|
303
332
|
/**
|
|
304
|
-
* @description The resume guidance WITHOUT the self-review section: the loaded skills and the
|
|
305
|
-
* What a compaction asks for while `/compact_self_review` is off, and the part every variant of
|
|
306
|
-
* carries — so the one text the `PreCompact` hook matches to skip a compaction that already
|
|
307
|
-
* variant the bot sent.
|
|
333
|
+
* @description The resume guidance WITHOUT the self-review section: the loaded-skills block, the loaded skills and the
|
|
334
|
+
* next-steps checklist. What a compaction asks for while `/compact_self_review` is off, and the part every variant of
|
|
335
|
+
* {@link compactionResumeGuidance} carries — so the one text the `PreCompact` hook matches to skip a compaction that already
|
|
336
|
+
* holds the guidance, whichever variant the bot sent.
|
|
308
337
|
*/
|
|
309
|
-
exports.compactionResumeGuidanceWithoutGaps = `${exports.compactionSkillsGuidance} ${exports.compactionChecklistGuidance}`;
|
|
338
|
+
exports.compactionResumeGuidanceWithoutGaps = `${exports.compactionSkillsBlockGuidance} ${exports.compactionSkillsGuidance} ${exports.compactionChecklistGuidance}`;
|
|
310
339
|
/**
|
|
311
340
|
* @description What the continuing session needs from EVERY compaction summary — the
|
|
312
|
-
* self-review section, the loaded skills and the next-steps checklist — as the one text each path
|
|
313
|
-
* a bot-issued compaction in its instruction ({@link buildCompactionInstruction}),
|
|
341
|
+
* self-review section, the loaded-skills block, the loaded skills and the next-steps checklist — as the one text each path
|
|
342
|
+
* carries: a bot-issued compaction in its instruction ({@link buildCompactionInstruction}),
|
|
314
343
|
* and each backend's own overflow compaction through a bot-installed hook — Claude's
|
|
315
344
|
* `PreCompact` hook (`claudeCompactHook.ts`, which also matches on this exact text to
|
|
316
345
|
* skip a compaction that already carries it) and OpenCode's compaction plugin
|
|
317
346
|
* (`openCodeCompactPlugin.ts`). The checklist stays LAST: each sentence says where it goes in the summary, so the order
|
|
318
|
-
* of the sentences is free
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
347
|
+
* of the sentences is free.
|
|
348
|
+
*
|
|
349
|
+
* A process started before the current text keeps its own hook (adopted across hot reloads, hooks are read at start), and
|
|
350
|
+
* that hook skips a compaction only by finding the text IT carries. The self-review sentence was added ahead of the older
|
|
351
|
+
* text for that reason; the skills restore had to reword the skills sentence and checklist item 1 (they no longer say
|
|
352
|
+
* "load these skills" unconditionally), so such a process's hook no longer finds its text in a bot-issued instruction and
|
|
353
|
+
* appends its own: until that process stops at its idle mark, a `/compact` there reads both texts. Both then lead to the
|
|
354
|
+
* same thing — such a process has no restore hook, so the summary's conditional wording tells it to load the skills again,
|
|
355
|
+
* as its old text does.
|
|
322
356
|
*/
|
|
323
357
|
exports.compactionResumeGuidance = `${exports.compactionGapsGuidance} ${exports.compactionResumeGuidanceWithoutGaps}`;
|
|
324
358
|
/** @description The resume guidance a compaction carries: with the self-review section while `/compact_self_review` is on, without it while off. */
|
|
@@ -393,6 +427,8 @@ const compactionScaffoldingTokens = [
|
|
|
393
427
|
{ kind: 'gapsStart', token: exports.compactionGapsStartMarker },
|
|
394
428
|
{ kind: 'gapsEnd', token: exports.compactionGapsEndMarker },
|
|
395
429
|
{ kind: 'noGaps', token: exports.compactionNoGapsLine },
|
|
430
|
+
{ kind: 'skillsStart', token: exports.compactionSkillsBlockStartMarker },
|
|
431
|
+
{ kind: 'skillsEnd', token: exports.compactionSkillsBlockEndMarker },
|
|
396
432
|
];
|
|
397
433
|
/**
|
|
398
434
|
* @description Read ONE summary line: the scaffolding token it opens with (leading blanks allowed) and the prose after it,
|
|
@@ -427,14 +463,79 @@ function checkCouldBecomeCompactionScaffoldingLine(fragment) {
|
|
|
427
463
|
return compactionScaffoldingTokens.some(({ token }) => token.startsWith(body) || body.startsWith(token));
|
|
428
464
|
}
|
|
429
465
|
/**
|
|
430
|
-
* @description The
|
|
466
|
+
* @description The skill name a line of the loaded-skills block holds: the line trimmed, with one leading list bullet
|
|
467
|
+
* (`- `, `* `) and surrounding backticks dropped (models add them despite the guidance); `''` for a blank line; `null` for
|
|
468
|
+
* a line that is no name — one with blanks inside, one over `maxNameLength`, or one of the block's own markers.
|
|
469
|
+
* Self-contained (it reads nothing outside its parameters) because the OpenCode plugin embeds its source.
|
|
470
|
+
*/
|
|
471
|
+
function readSkillsBlockLineName(line, startMarker, endMarker, maxNameLength) {
|
|
472
|
+
const trimmed = line.trim();
|
|
473
|
+
if (trimmed === '')
|
|
474
|
+
return '';
|
|
475
|
+
const unbulleted = trimmed.startsWith('- ') || trimmed.startsWith('* ') ? trimmed.slice(2).trim() : trimmed;
|
|
476
|
+
const name = unbulleted.length > 2 && unbulleted.startsWith('`') && unbulleted.endsWith('`') ? unbulleted.slice(1, -1) : unbulleted;
|
|
477
|
+
if (name === '' || name === startMarker || name === endMarker || name.length > maxNameLength || /\s/.test(name))
|
|
478
|
+
return null;
|
|
479
|
+
return name;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* @description The skill names of a summary's loaded-skills block — the LAST complete pair of `startMarker` / `endMarker`
|
|
483
|
+
* lines — in the order written, de-duplicated; `null` when the summary has no complete block. A marker counts only ALONE on
|
|
484
|
+
* its line, as the guidance asks: a summary that quotes the instruction in prose holds no block. A line that is no name
|
|
485
|
+
* ({@link readSkillsBlockLineName}) is skipped. Self-contained (it calls only {@link readSkillsBlockLineName}) because the
|
|
486
|
+
* OpenCode plugin embeds the source of both; {@link parseCompactionLoadedSkills} is the bot's own entry.
|
|
487
|
+
*/
|
|
488
|
+
function parseSkillsBlock(summaryText, startMarker, endMarker, maxNameLength) {
|
|
489
|
+
const lines = summaryText.split(/\r?\n/);
|
|
490
|
+
let endIndex = -1;
|
|
491
|
+
for (let index = lines.length - 1; index >= 0; index -= 1) {
|
|
492
|
+
if (lines[index].trim() === endMarker) {
|
|
493
|
+
endIndex = index;
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (endIndex < 0)
|
|
498
|
+
return null;
|
|
499
|
+
let startIndex = -1;
|
|
500
|
+
for (let index = endIndex - 1; index >= 0; index -= 1) {
|
|
501
|
+
if (lines[index].trim() === startMarker) {
|
|
502
|
+
startIndex = index;
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
if (startIndex < 0)
|
|
507
|
+
return null;
|
|
508
|
+
const names = [];
|
|
509
|
+
for (let index = startIndex + 1; index < endIndex; index += 1) {
|
|
510
|
+
const name = readSkillsBlockLineName(lines[index], startMarker, endMarker, maxNameLength);
|
|
511
|
+
if (name !== null && name !== '' && !names.includes(name))
|
|
512
|
+
names.push(name);
|
|
513
|
+
}
|
|
514
|
+
return names;
|
|
515
|
+
}
|
|
516
|
+
/** @description The skills a compaction summary's block names ({@link parseSkillsBlock} with the summary's own markers). */
|
|
517
|
+
function parseCompactionLoadedSkills(summaryText) {
|
|
518
|
+
return parseSkillsBlock(summaryText, exports.compactionSkillsBlockStartMarker, exports.compactionSkillsBlockEndMarker, exports.compactionSkillsBlockMaxNameLength);
|
|
519
|
+
}
|
|
520
|
+
/** @description Whether a line can sit inside the loaded-skills block: a name or a blank ({@link readSkillsBlockLineName}). */
|
|
521
|
+
function checkIsSkillsBlockLine(line) {
|
|
522
|
+
return readSkillsBlockLineName(line, exports.compactionSkillsBlockStartMarker, exports.compactionSkillsBlockEndMarker, exports.compactionSkillsBlockMaxNameLength) !== null;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @description The line filter of a summary shown in the topic. Scaffolding goes: the markers of the three sections and the
|
|
431
526
|
* «none» line. The self-review section gets `gapsHeader` where its first line is — it reads as the proposals it is, not as
|
|
432
527
|
* more next steps beside the numbered checklist right after it — and a section with no first line (the none line, only
|
|
433
528
|
* blanks) leaves no header, no marker and no trace. Prose on a marker's own line is kept.
|
|
529
|
+
*
|
|
530
|
+
* The loaded-skills block goes WHOLE — its names too, which are for the machine (the checklist names the skills for the
|
|
531
|
+
* person) — unlike the other two sections, whose content is genuine prose. A line that is no name ends a block whose end
|
|
532
|
+
* marker never came, so a model that forgets the marker hides nothing but the names.
|
|
434
533
|
*/
|
|
435
534
|
function createCompactionSummaryLineFilter(gapsHeader) {
|
|
436
535
|
/** The start marker was read and no line of the section has come yet: the header waits for one. */
|
|
437
536
|
let isSectionOpening = false;
|
|
537
|
+
/** Inside the loaded-skills block: its lines are hidden. */
|
|
538
|
+
let isInSkillsBlock = false;
|
|
438
539
|
const showProse = (line) => {
|
|
439
540
|
if (!isSectionOpening)
|
|
440
541
|
return [line];
|
|
@@ -446,6 +547,20 @@ function createCompactionSummaryLineFilter(gapsHeader) {
|
|
|
446
547
|
return {
|
|
447
548
|
pushLine(line) {
|
|
448
549
|
const { kind, rest } = parseCompactionSummaryLine(line);
|
|
550
|
+
if (isInSkillsBlock) {
|
|
551
|
+
if (kind === 'skillsEnd') {
|
|
552
|
+
isInSkillsBlock = false;
|
|
553
|
+
return rest.trim() === '' ? [] : showProse(rest);
|
|
554
|
+
}
|
|
555
|
+
if (kind === null && checkIsSkillsBlockLine(line))
|
|
556
|
+
return [];
|
|
557
|
+
isInSkillsBlock = false;
|
|
558
|
+
}
|
|
559
|
+
// What follows the start marker on its own line is the block's content too.
|
|
560
|
+
if (kind === 'skillsStart') {
|
|
561
|
+
isInSkillsBlock = true;
|
|
562
|
+
return [];
|
|
563
|
+
}
|
|
449
564
|
if (kind === null)
|
|
450
565
|
return showProse(line);
|
|
451
566
|
if (kind === 'gapsStart')
|
|
@@ -455,12 +570,15 @@ function createCompactionSummaryLineFilter(gapsHeader) {
|
|
|
455
570
|
isSectionOpening = false;
|
|
456
571
|
return rest.trim() === '' ? [] : showProse(rest);
|
|
457
572
|
},
|
|
573
|
+
checkIsInHiddenBlock() {
|
|
574
|
+
return isInSkillsBlock;
|
|
575
|
+
},
|
|
458
576
|
};
|
|
459
577
|
}
|
|
460
578
|
/**
|
|
461
579
|
* @description The full compaction summary as the bot posts it to the topic: the scaffolding lines removed ({@link
|
|
462
|
-
* createCompactionSummaryLineFilter}), every line of prose kept — including the sections the markers
|
|
463
|
-
* genuine content — and the self-review section under `gapsHeader`.
|
|
580
|
+
* createCompactionSummaryLineFilter}), every line of prose kept — including the closing and self-review sections the markers
|
|
581
|
+
* wrap, which are genuine content — the loaded-skills block removed whole, and the self-review section under `gapsHeader`.
|
|
464
582
|
*
|
|
465
583
|
* A marker sitting ALONE on its line takes the whole line with it, so the summary is not left with a blank gap where it
|
|
466
584
|
* stood; a marker the model happened to put AHEAD of real prose on one line loses only the marker, never the prose.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compactOnIdle.js","sourceRoot":"","sources":["../../src/utils/compactOnIdle.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAqBH,wCAEC;AA6FD,oEAiBC;AAOD,kEAKC;AAaD,oEAKC;AASD,0EAKC;AAUD,wDAKC;AAUD,oDAMC;AAWD,oEAGC;AAgCD,kDA4BC;AA2FD,kEAEC;AAgBD,gEAcC;AAmBD,4CAMC;AAyCD,gEAUC;AAQD,8FAIC;AAcD,8EAmBC;AAUD,0EAGC;AAkBD,wEAgBC;AAGD,4EAEC;AAgBD,4EAQC;AAsBD,wEAaC;AAiBD,gFAKC;AA4BD,wEAcC;AA1rBD,iDAAmF;AACnF,uDAAyD;AAEzD;;;;;;;GAOG;AACU,QAAA,aAAa,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE5C;;;;GAIG;AACH,SAAgB,cAAc,CAAC,eAAmC;IAChE,OAAO,IAAA,sCAAoB,EAAC,eAAe,EAAE,qBAAa,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG,MAAM,CAAC;AAEnD;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEzD;;;;;GAKG;AACH,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,cAAc,GAAG,UAAU,CAAC;IAClC,MAAM,QAAQ,GAAG,UAAU,CAAC;IAC5B,IAA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