@cortexkit/opencode-magic-context 0.27.3 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -1
- package/dist/agents/language-directive.d.ts +27 -0
- package/dist/agents/language-directive.d.ts.map +1 -0
- package/dist/agents/magic-context-prompt.d.ts +1 -1
- package/dist/agents/magic-context-prompt.d.ts.map +1 -1
- package/dist/config/project-security.d.ts +1 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +15 -0
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts +1 -0
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-config.d.ts +1 -1
- package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts +1 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts +1 -1
- package/dist/features/magic-context/dreamer/task-prompts.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +1 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify.d.ts +1 -0
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/memory/memory-migration.d.ts +1 -0
- package/dist/features/magic-context/memory/memory-migration.d.ts.map +1 -1
- package/dist/features/magic-context/sidekick/agent.d.ts +1 -0
- package/dist/features/magic-context/sidekick/agent.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/sandbox-runner.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +0 -5
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/types.d.ts +12 -1
- package/dist/features/magic-context/types.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts +1 -0
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +8 -1
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +1 -0
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts +1 -0
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +1 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts +13 -3
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts.map +1 -1
- package/dist/hooks/magic-context/edit-marker.d.ts +11 -0
- package/dist/hooks/magic-context/edit-marker.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +2 -0
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts +1 -0
- package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
- package/dist/hooks/magic-context/supersession-reclaim.d.ts +34 -0
- package/dist/hooks/magic-context/supersession-reclaim.d.ts.map +1 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts +7 -0
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +8 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts +2 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +8 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +4 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +492 -80
- package/dist/plugin/dream-timer.d.ts +1 -0
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/shared/announcement.d.ts +1 -1
- package/dist/shared/announcement.d.ts.map +1 -1
- package/dist/shared/commit-detection.d.ts +29 -0
- package/dist/shared/commit-detection.d.ts.map +1 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/transcript.d.ts +15 -0
- package/dist/shared/transcript.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/announcement.ts +3 -6
- package/src/shared/commit-detection.test.ts +63 -0
- package/src/shared/commit-detection.ts +53 -0
- package/src/shared/tag-transcript.ts +32 -0
- package/src/shared/transcript-opencode.ts +33 -0
- package/src/shared/transcript.ts +17 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dream-timer.d.ts","sourceRoot":"","sources":["../../src/plugin/dream-timer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AASpE,OAAO,EAEH,KAAK,wBAAwB,EAChC,MAAM,8DAA8D,CAAC;AA4BtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAGpF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,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C;0BAAc,CAAC;uBAAiB,CAAC;;;;;;0BAAggnC,CAAC;;;;;;EADh1tC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/plugin/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAiB1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;CAC1C,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/plugin/tool-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAiB1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;CAC1C,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAyFjC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* Bump only when there are user-visible changes worth a startup dialog.
|
|
19
19
|
* Does NOT need to match the published package version.
|
|
20
20
|
*/
|
|
21
|
-
export declare const ANNOUNCEMENT_VERSION = "0.
|
|
21
|
+
export declare const ANNOUNCEMENT_VERSION = "0.29.0";
|
|
22
22
|
/**
|
|
23
23
|
* Short, user-facing bullet strings. Keep each line ~80 chars or shorter so the
|
|
24
24
|
* TUI dialog renders cleanly without horizontal scroll on a typical terminal.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"announcement.d.ts","sourceRoot":"","sources":["../../src/shared/announcement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"announcement.d.ts","sourceRoot":"","sources":["../../src/shared/announcement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAGvD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,qDAAqD,CAAC;AAyBtF;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAGjD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAS1D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CA0BhD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boolean hash test. Non-global (stateless), so this single instance is safe to
|
|
3
|
+
* reuse with `.test()` across call sites — only `/g` regexes carry `lastIndex`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const COMMIT_HASH_TEST_PATTERN: RegExp;
|
|
6
|
+
/**
|
|
7
|
+
* Commit-ACTION verbs, with common inflections, each fully word-boundary-anchored
|
|
8
|
+
* (so they don't match e.g. "commitment"/"merger"). Non-global → safe to share.
|
|
9
|
+
*
|
|
10
|
+
* Scope decision: this is the commit-action set the OpenCode + Pi note-nudge
|
|
11
|
+
* detectors used and pin in tests ("commit/cherry-pick/merge/rebase"). It does
|
|
12
|
+
* NOT include the bare nouns "hash"/"sha" that the historian's old hint regex
|
|
13
|
+
* carried — a parity test asserts "hash <hex>" alone must NOT count as a commit,
|
|
14
|
+
* and those nouns only ever gated a cosmetic hash-strip in historian summaries
|
|
15
|
+
* (never a trigger), so unifying to the action set is behavior-preserving where
|
|
16
|
+
* it matters.
|
|
17
|
+
*/
|
|
18
|
+
export declare const COMMIT_VERB_PATTERN: RegExp;
|
|
19
|
+
/** True when a text part mentions a commit hash in a commit context. Used by the
|
|
20
|
+
* OpenCode + Pi note-nudge detectors. */
|
|
21
|
+
export declare function textMentionsRecentCommit(text: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Fresh `/g` capturing, backtick-aware hash pattern for the historian's
|
|
24
|
+
* extract-and-strip path (matchAll + replace). Returned as a NEW instance per
|
|
25
|
+
* call: a `/g` regex carries `lastIndex`, so handing out a fresh one is
|
|
26
|
+
* bulletproof against accidental `.exec()` reuse across callers.
|
|
27
|
+
*/
|
|
28
|
+
export declare function createCommitHashExtractPattern(): RegExp;
|
|
29
|
+
//# sourceMappingURL=commit-detection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-detection.d.ts","sourceRoot":"","sources":["../../src/shared/commit-detection.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAuC,CAAC;AAE7E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,QACsE,CAAC;AAEvG;0CAC0C;AAC1C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,CAEvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag-transcript.d.ts","sourceRoot":"","sources":["../../src/shared/tag-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"tag-transcript.d.ts","sourceRoot":"","sources":["../../src/shared/tag-transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAQzE,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AASrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAE/D,MAAM,WAAW,oBAAoB;IACjC;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;OAOG;IACH,2BAA2B,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7D;AAED,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnC;AA8DD,wBAAgB,aAAa,CACzB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,eAAe,EACnB,OAAO,GAAE,oBAAyB,GACnC,mBAAmB,CAiPrB"}
|
|
@@ -117,6 +117,21 @@ export interface TranscriptPart {
|
|
|
117
117
|
inputByteSize: number;
|
|
118
118
|
inputTokenCount: number;
|
|
119
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* Non-mutating read of this tool invocation's input object, or null for
|
|
122
|
+
* non-tool parts / parts without an input. Used by smart-drops supersession
|
|
123
|
+
* selection (read `ctx_note`'s action, an edit's `filePath`) without
|
|
124
|
+
* touching the wire. Returns the live object reference; callers must NOT
|
|
125
|
+
* mutate it.
|
|
126
|
+
*/
|
|
127
|
+
getToolInput?(): Record<string, unknown> | null;
|
|
128
|
+
/**
|
|
129
|
+
* Replace this tool invocation's input object with `input`. Used by the
|
|
130
|
+
* smart-drops edit_marker path to write back a filePath-preserving,
|
|
131
|
+
* region-hint-clamped copy of an edit's arguments. Returns true if the part
|
|
132
|
+
* carried a writable tool input. No-op (false) for non-tool parts.
|
|
133
|
+
*/
|
|
134
|
+
setToolInput?(input: Record<string, unknown>): boolean;
|
|
120
135
|
/**
|
|
121
136
|
* Replace this part with a sentinel placeholder. Sentinels look like
|
|
122
137
|
* `[dropped §N§]` or `[truncated §N§]` and survive cache-busting
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../src/shared/transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GACxB,MAAM,GACN,UAAU,GACV,UAAU,GACV,aAAa,GACb,OAAO,GACP,MAAM,GACN,YAAY,GACZ,SAAS,CAAC;AAEhB;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC3B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAElC;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;;;;;OAOG;IACH,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAE9B;;;;;;;;OAQG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAElC;;;;OAIG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAExC;;;;;;;;;;;OAWG;IACH,eAAe,IAAI;QACf,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B,aAAa,EAAE,MAAM,CAAC;QACtB,eA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OAaG;IACH,MAAM,IAAI,IAAI,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -24,18 +24,15 @@ import { getMagicContextStorageDir } from "./data-path";
|
|
|
24
24
|
* Bump only when there are user-visible changes worth a startup dialog.
|
|
25
25
|
* Does NOT need to match the published package version.
|
|
26
26
|
*/
|
|
27
|
-
export const ANNOUNCEMENT_VERSION = "0.
|
|
27
|
+
export const ANNOUNCEMENT_VERSION = "0.29.0";
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Short, user-facing bullet strings. Keep each line ~80 chars or shorter so the
|
|
31
31
|
* TUI dialog renders cleanly without horizontal scroll on a typical terminal.
|
|
32
32
|
*/
|
|
33
33
|
export const ANNOUNCEMENT_FEATURES: ReadonlyArray<string> = [
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"New Primers: durable answers to the questions that keep coming up about your project, kept current by the dreamer investigating the actual code.",
|
|
37
|
-
"Embedding storage no longer wipes your vectors when you change model or endpoint. Different models now coexist, so switching providers keeps your existing vectors.",
|
|
38
|
-
"Config moved to a shared CortexKit location (~/.config/cortexkit/ and <project>/.cortexkit/). This happens automatically on first run; your old file is preserved.",
|
|
34
|
+
"New 'smart_drops' option (opt-in, off by default): on long, edit-heavy sessions it reclaims more context by dropping tool output a later call made obsolete (superseded edits, old todowrite/ctx_reduce, spent status calls) instead of only the oldest. When off, the prompt is byte-identical to before. Enable with \"smart_drops\": true.",
|
|
35
|
+
"When memory is disabled, the ctx_memory tool and its guidance are no longer shown (they had nothing to write to). ctx_search stays, searching conversation history and git commits.",
|
|
39
36
|
];
|
|
40
37
|
|
|
41
38
|
/**
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/// <reference types="bun-types" />
|
|
2
|
+
|
|
3
|
+
import { describe, expect, it } from "bun:test";
|
|
4
|
+
import {
|
|
5
|
+
COMMIT_HASH_TEST_PATTERN,
|
|
6
|
+
COMMIT_VERB_PATTERN,
|
|
7
|
+
createCommitHashExtractPattern,
|
|
8
|
+
textMentionsRecentCommit,
|
|
9
|
+
} from "./commit-detection";
|
|
10
|
+
|
|
11
|
+
describe("textMentionsRecentCommit", () => {
|
|
12
|
+
it("fires on a hash + commit-action verb in the same text", () => {
|
|
13
|
+
expect(textMentionsRecentCommit("Committed abc1234 with the fix")).toBe(true);
|
|
14
|
+
expect(textMentionsRecentCommit("merged a1b2c3d into main")).toBe(true);
|
|
15
|
+
expect(textMentionsRecentCommit("rebased onto feedb4d cleanly")).toBe(true);
|
|
16
|
+
expect(textMentionsRecentCommit("cherry-picked deadbeef")).toBe(true);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("does NOT fire on a hash alone, or the bare word 'hash'/'sha' + hex", () => {
|
|
20
|
+
expect(textMentionsRecentCommit("the value is abc1234")).toBe(false);
|
|
21
|
+
// 'hash'/'sha' are intentionally NOT commit-action verbs (parity contract).
|
|
22
|
+
expect(textMentionsRecentCommit("hash is abc1234567")).toBe(false);
|
|
23
|
+
expect(textMentionsRecentCommit("sha abc1234")).toBe(false);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("does NOT fire on a verb alone (no hash)", () => {
|
|
27
|
+
expect(textMentionsRecentCommit("I will commit later")).toBe(false);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("respects the 7-12 hex length bound", () => {
|
|
31
|
+
expect(textMentionsRecentCommit("committed abc12")).toBe(false); // too short
|
|
32
|
+
expect(textMentionsRecentCommit("committed abc1234567890abcdef")).toBe(false); // too long
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("does not match commit-ish words that are not commit actions", () => {
|
|
36
|
+
expect(COMMIT_VERB_PATTERN.test("commitment to abc1234")).toBe(false);
|
|
37
|
+
expect(COMMIT_VERB_PATTERN.test("a merger of abc1234")).toBe(false);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe("shared regex instances are stateless across calls", () => {
|
|
42
|
+
it("COMMIT_HASH_TEST_PATTERN.test is repeatable (non-global)", () => {
|
|
43
|
+
expect(COMMIT_HASH_TEST_PATTERN.test("abc1234")).toBe(true);
|
|
44
|
+
expect(COMMIT_HASH_TEST_PATTERN.test("abc1234")).toBe(true); // no lastIndex drift
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("createCommitHashExtractPattern returns a fresh global regex each call", () => {
|
|
48
|
+
const a = createCommitHashExtractPattern();
|
|
49
|
+
const b = createCommitHashExtractPattern();
|
|
50
|
+
expect(a).not.toBe(b);
|
|
51
|
+
expect(a.global).toBe(true);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
describe("createCommitHashExtractPattern (historian extraction)", () => {
|
|
56
|
+
it("captures backtick-wrapped and bare hashes, deduped via matchAll", () => {
|
|
57
|
+
const text = "Committed `abc1234` and def5678, also abc1234 again";
|
|
58
|
+
const found = [...text.matchAll(createCommitHashExtractPattern())].map((m) =>
|
|
59
|
+
m[1]?.toLowerCase(),
|
|
60
|
+
);
|
|
61
|
+
expect(found).toEqual(["abc1234", "def5678", "abc1234"]);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Canonical commit-detection patterns — the SINGLE source of truth shared by:
|
|
2
|
+
// - the historian commit-cluster trigger + summary hash extraction
|
|
3
|
+
// (read-session-formatting.ts),
|
|
4
|
+
// - the OpenCode note-nudge `commit_detected` boundary (tag-messages.ts),
|
|
5
|
+
// - the Pi note-nudge detector (detect-recent-commit.ts).
|
|
6
|
+
//
|
|
7
|
+
// These three previously each carried their own hash/verb regexes that had
|
|
8
|
+
// drifted (hash length 6 vs 7; verb sets {hash, sha} vs {merge, rebas}). Keeping
|
|
9
|
+
// them here stops that drift: change the patterns once and every site follows.
|
|
10
|
+
//
|
|
11
|
+
// All three sites look for a short git hash AND a commit-related word in the
|
|
12
|
+
// SAME assistant text part — the pairing is what keeps false positives low.
|
|
13
|
+
|
|
14
|
+
/** A short git hash: 7-12 hex chars (git's default abbreviated hash is 7).
|
|
15
|
+
* 6 was too loose — more random-hex false positives. */
|
|
16
|
+
const HASH_HEX = "[0-9a-f]{7,12}";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Boolean hash test. Non-global (stateless), so this single instance is safe to
|
|
20
|
+
* reuse with `.test()` across call sites — only `/g` regexes carry `lastIndex`.
|
|
21
|
+
*/
|
|
22
|
+
export const COMMIT_HASH_TEST_PATTERN = new RegExp(`\\b${HASH_HEX}\\b`, "i");
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Commit-ACTION verbs, with common inflections, each fully word-boundary-anchored
|
|
26
|
+
* (so they don't match e.g. "commitment"/"merger"). Non-global → safe to share.
|
|
27
|
+
*
|
|
28
|
+
* Scope decision: this is the commit-action set the OpenCode + Pi note-nudge
|
|
29
|
+
* detectors used and pin in tests ("commit/cherry-pick/merge/rebase"). It does
|
|
30
|
+
* NOT include the bare nouns "hash"/"sha" that the historian's old hint regex
|
|
31
|
+
* carried — a parity test asserts "hash <hex>" alone must NOT count as a commit,
|
|
32
|
+
* and those nouns only ever gated a cosmetic hash-strip in historian summaries
|
|
33
|
+
* (never a trigger), so unifying to the action set is behavior-preserving where
|
|
34
|
+
* it matters.
|
|
35
|
+
*/
|
|
36
|
+
export const COMMIT_VERB_PATTERN =
|
|
37
|
+
/\b(?:commit(?:ted|ting|s)?|cherry-?pick(?:ed|ing|s)?|merge[ds]?|merging|rebas(?:e|ed|es|ing))\b/i;
|
|
38
|
+
|
|
39
|
+
/** True when a text part mentions a commit hash in a commit context. Used by the
|
|
40
|
+
* OpenCode + Pi note-nudge detectors. */
|
|
41
|
+
export function textMentionsRecentCommit(text: string): boolean {
|
|
42
|
+
return COMMIT_HASH_TEST_PATTERN.test(text) && COMMIT_VERB_PATTERN.test(text);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Fresh `/g` capturing, backtick-aware hash pattern for the historian's
|
|
47
|
+
* extract-and-strip path (matchAll + replace). Returned as a NEW instance per
|
|
48
|
+
* call: a `/g` regex carries `lastIndex`, so handing out a fresh one is
|
|
49
|
+
* bulletproof against accidental `.exec()` reuse across callers.
|
|
50
|
+
*/
|
|
51
|
+
export function createCommitHashExtractPattern(): RegExp {
|
|
52
|
+
return new RegExp(`\`?\\b(${HASH_HEX})\\b\`?`, "gi");
|
|
53
|
+
}
|
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
updateTagTokenCount,
|
|
55
55
|
} from "../features/magic-context/storage-tags";
|
|
56
56
|
import { makeToolCompositeKey, type Tagger } from "../features/magic-context/tagger";
|
|
57
|
+
import { applyEditMarkerToInput } from "../hooks/magic-context/edit-marker";
|
|
57
58
|
import { estimateImageTokensFromDataUrl } from "../hooks/magic-context/image-token-estimate";
|
|
58
59
|
import { estimateTokens } from "../hooks/magic-context/read-session-formatting";
|
|
59
60
|
import {
|
|
@@ -692,6 +693,28 @@ function buildAggregateTarget(tagId: number, occurrences: ToolOccurrence[]): Tag
|
|
|
692
693
|
}
|
|
693
694
|
return any ? "truncated" : "absent";
|
|
694
695
|
},
|
|
696
|
+
editMarker(): "truncated" | "absent" {
|
|
697
|
+
// Edit-marker: preserve the tool_use input's filePath + a region
|
|
698
|
+
// hint of the diff, sentinelize the result half. Separate from
|
|
699
|
+
// truncate() so the existing skeleton bytes are never touched.
|
|
700
|
+
// Deterministic + idempotent (re-derived from source each pass; the
|
|
701
|
+
// region-hint clamp self-guards via ...[truncated]).
|
|
702
|
+
const sentinel = `[dropped \u00a7${tagId}\u00a7]`;
|
|
703
|
+
let any = false;
|
|
704
|
+
for (const occ of occurrences) {
|
|
705
|
+
if (occ.kind === "tool_use") {
|
|
706
|
+
const input = occ.part.getToolInput?.();
|
|
707
|
+
if (input) {
|
|
708
|
+
const next = { ...input };
|
|
709
|
+
applyEditMarkerToInput(next);
|
|
710
|
+
if (occ.part.setToolInput?.(next)) any = true;
|
|
711
|
+
}
|
|
712
|
+
} else if (setToolContentOrText(occ.part, sentinel)) {
|
|
713
|
+
any = true;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return any ? "truncated" : "absent";
|
|
717
|
+
},
|
|
695
718
|
// Non-mutating reclaim predicate (Pi parity with OpenCode's canDrop).
|
|
696
719
|
// Pi sentinelizes BOTH halves, so unlike OpenCode there's no
|
|
697
720
|
// result-part requirement — a target reclaims as long as it still has
|
|
@@ -699,6 +722,15 @@ function buildAggregateTarget(tagId: number, occurrences: ToolOccurrence[]): Tag
|
|
|
699
722
|
canDrop(): boolean {
|
|
700
723
|
return occurrences.length > 0;
|
|
701
724
|
},
|
|
725
|
+
// Non-mutating read of the invocation input (the tool_use occurrence
|
|
726
|
+
// carries the arguments). Used by smart-drops supersession selection.
|
|
727
|
+
readInput(): Record<string, unknown> | null {
|
|
728
|
+
for (const occ of occurrences) {
|
|
729
|
+
const input = occ.part.getToolInput?.();
|
|
730
|
+
if (input) return input;
|
|
731
|
+
}
|
|
732
|
+
return null;
|
|
733
|
+
},
|
|
702
734
|
message: {
|
|
703
735
|
info: { id: messageId, role },
|
|
704
736
|
parts: [],
|
|
@@ -137,6 +137,12 @@ function createOpenCodePart(
|
|
|
137
137
|
} {
|
|
138
138
|
return readOpenCodeToolMetadata(rawPart);
|
|
139
139
|
},
|
|
140
|
+
getToolInput(): Record<string, unknown> | null {
|
|
141
|
+
return readOpenCodeToolInput(rawPart);
|
|
142
|
+
},
|
|
143
|
+
setToolInput(input: Record<string, unknown>): boolean {
|
|
144
|
+
return writeOpenCodeToolInput(rawPart, input);
|
|
145
|
+
},
|
|
140
146
|
replaceWithSentinel(sentinelText: string): boolean {
|
|
141
147
|
// Build a synthetic text part that carries the sentinel as
|
|
142
148
|
// its content. Subsequent passes see this as a normal text
|
|
@@ -267,3 +273,30 @@ function readOpenCodeToolMetadata(part: unknown): {
|
|
|
267
273
|
|
|
268
274
|
return { toolName, inputByteSize, inputTokenCount };
|
|
269
275
|
}
|
|
276
|
+
|
|
277
|
+
/** Non-mutating read of an OpenCode tool part's input object (or null). */
|
|
278
|
+
function readOpenCodeToolInput(part: unknown): Record<string, unknown> | null {
|
|
279
|
+
if (!isRecord(part)) return null;
|
|
280
|
+
const state = isRecord(part.state) ? part.state : null;
|
|
281
|
+
const input = state?.input ?? part.args ?? part.input;
|
|
282
|
+
return isRecord(input) ? input : null;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** Replace an OpenCode tool part's input object in place. Returns true if a
|
|
286
|
+
* writable input slot was found. */
|
|
287
|
+
function writeOpenCodeToolInput(part: unknown, input: Record<string, unknown>): boolean {
|
|
288
|
+
if (!isRecord(part)) return false;
|
|
289
|
+
if (isRecord(part.state) && isRecord(part.state.input)) {
|
|
290
|
+
part.state.input = input;
|
|
291
|
+
return true;
|
|
292
|
+
}
|
|
293
|
+
if (isRecord(part.args)) {
|
|
294
|
+
part.args = input;
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
if (isRecord(part.input)) {
|
|
298
|
+
part.input = input;
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
return false;
|
|
302
|
+
}
|
package/src/shared/transcript.ts
CHANGED
|
@@ -133,6 +133,23 @@ export interface TranscriptPart {
|
|
|
133
133
|
inputTokenCount: number;
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Non-mutating read of this tool invocation's input object, or null for
|
|
138
|
+
* non-tool parts / parts without an input. Used by smart-drops supersession
|
|
139
|
+
* selection (read `ctx_note`'s action, an edit's `filePath`) without
|
|
140
|
+
* touching the wire. Returns the live object reference; callers must NOT
|
|
141
|
+
* mutate it.
|
|
142
|
+
*/
|
|
143
|
+
getToolInput?(): Record<string, unknown> | null;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Replace this tool invocation's input object with `input`. Used by the
|
|
147
|
+
* smart-drops edit_marker path to write back a filePath-preserving,
|
|
148
|
+
* region-hint-clamped copy of an edit's arguments. Returns true if the part
|
|
149
|
+
* carried a writable tool input. No-op (false) for non-tool parts.
|
|
150
|
+
*/
|
|
151
|
+
setToolInput?(input: Record<string, unknown>): boolean;
|
|
152
|
+
|
|
136
153
|
/**
|
|
137
154
|
* Replace this part with a sentinel placeholder. Sentinels look like
|
|
138
155
|
* `[dropped §N§]` or `[truncated §N§]` and survive cache-busting
|