@cortexkit/opencode-magic-context 0.42.1 → 0.42.2

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 (28) hide show
  1. package/dist/features/magic-context/dreamer/expire-memories.d.ts +15 -0
  2. package/dist/features/magic-context/dreamer/expire-memories.d.ts.map +1 -0
  3. package/dist/features/magic-context/dreamer/module-apply.d.ts +4 -2
  4. package/dist/features/magic-context/dreamer/module-apply.d.ts.map +1 -1
  5. package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
  6. package/dist/features/magic-context/dreamer/task-gates.d.ts +6 -1
  7. package/dist/features/magic-context/dreamer/task-gates.d.ts.map +1 -1
  8. package/dist/features/magic-context/pi-content-decisions.d.ts.map +1 -1
  9. package/dist/features/magic-context/storage-meta-persisted.d.ts +4 -0
  10. package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
  11. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  12. package/dist/hooks/magic-context/compaction-marker-manager.d.ts +4 -6
  13. package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
  14. package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
  15. package/dist/hooks/magic-context/lkg-slot.d.ts +2 -0
  16. package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
  17. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
  18. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  19. package/dist/{index-1q9kay7n.js → index-953x7a79.js} +31 -24
  20. package/dist/index.js +318 -112
  21. package/dist/plugin/dream-timer-module-client.d.ts +2 -2
  22. package/dist/plugin/dream-timer-module-client.d.ts.map +1 -1
  23. package/dist/{recomp-orchestrator-m33b3rk9.js → recomp-orchestrator-5g8f5rhy.js} +1 -1
  24. package/dist/shared/transcript.d.ts +2 -1
  25. package/dist/shared/transcript.d.ts.map +1 -1
  26. package/package.json +1 -1
  27. package/src/shared/tag-transcript.ts +14 -7
  28. package/src/shared/transcript.ts +2 -1
@@ -1,7 +1,7 @@
1
- import type { AuthorityStatus } from "../features/magic-context/context-authority";
1
+ import type { AuthorityModuleClient, AuthorityStatus } from "../features/magic-context/context-authority";
2
2
  import type { ClassifyModuleClient } from "../features/magic-context/dreamer/classify";
3
3
  import type { RustModeModuleClient } from "../hooks/magic-context/rust-mode-transform";
4
- export type DreamTimerModuleClient = ClassifyModuleClient & {
4
+ export type DreamTimerModuleClient = ClassifyModuleClient & Pick<AuthorityModuleClient, "mirrorPull"> & {
5
5
  authorityStatus?: (args: {
6
6
  context_store_uuid: string;
7
7
  project: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dream-timer-module-client.d.ts","sourceRoot":"","sources":["../../src/plugin/dream-timer-module-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAER,oBAAoB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG;IACxD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE;QACrB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;KAChC,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,eAAe,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACxD,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,oBAAoB,GAAG,SAAS,GAC/C,sBAAsB,GAAG,SAAS,CAcpC"}
1
+ {"version":3,"file":"dream-timer-module-client.d.ts","sourceRoot":"","sources":["../../src/plugin/dream-timer-module-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,qBAAqB,EACrB,eAAe,EAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAER,oBAAoB,EACvB,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GACrD,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,GAAG;IACxC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE;QACrB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;KAChC,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,eAAe,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACxD,CAAC;AAEN;;;GAGG;AACH,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,oBAAoB,GAAG,SAAS,GAC/C,sBAAsB,GAAG,SAAS,CAsBpC"}
@@ -3,7 +3,7 @@ import {
3
3
  setRecompTerminal2,
4
4
  runManagedRecomp2,
5
5
  runManagedUpgrade2
6
- } from "./index-1q9kay7n.js";
6
+ } from "./index-953x7a79.js";
7
7
  import"./index-xdtge3y2.js";
8
8
  import"./index-jmtjh2d3.js";
9
9
  import"./index-sd3egckz.js";
@@ -150,7 +150,8 @@ export interface TranscriptPart {
150
150
  /** Remove one half of a complete tool arc. Callers must remove both halves together. */
151
151
  remove?(): boolean;
152
152
  /** Refuse structural deletion when the adapter cannot match provider-native identity safely. */
153
- canRemove?(): boolean;
153
+ /** A deferred durable decision vetoes the whole drop, including sentinel fallback. */
154
+ canRemove?(): boolean | "defer";
154
155
  /**
155
156
  * Optional: serialized byte size of the part's REAL payload, including
156
157
  * non-text content (images, structured data) that `getText()` can't
@@ -1 +1 @@
1
- {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../src/shared/transcript.ts"],"names":[],"mappings":"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,EAAE,iBAAiB,EAAE,CAAC;IAEvC;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAE5B;;;;;;;;;;;;;OAaG;IACH,MAAM,IAAI,IAAI,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAAiC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/opencode-magic-context",
3
- "version": "0.42.1",
3
+ "version": "0.42.2",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",
@@ -1063,13 +1063,20 @@ function buildAggregateTarget(
1063
1063
  occurrences.some((occ) => occ.kind === "tool_use") &&
1064
1064
  occurrences.some((occ) => occ.kind === "tool_result");
1065
1065
  if (!complete) return "incomplete";
1066
- if (
1067
- !requiresToolArcSkeleton &&
1068
- occurrences.every((occ) => occ.part.remove && occ.part.canRemove?.() !== false)
1069
- ) {
1070
- let removed = false;
1071
- for (const occ of occurrences) removed = occ.part.remove?.() || removed;
1072
- return removed ? "removed" : "absent";
1066
+ if (!requiresToolArcSkeleton) {
1067
+ const authorization = occurrences.map((occ) => occ.part.canRemove?.());
1068
+ // A failed durable marker is not permission to substitute a new
1069
+ // skeleton. Keep both halves unchanged and leave the drop queued.
1070
+ if (authorization.includes("defer")) return "incomplete";
1071
+ if (
1072
+ occurrences.every(
1073
+ (occ, index) => occ.part.remove && authorization[index] !== false,
1074
+ )
1075
+ ) {
1076
+ let removed = false;
1077
+ for (const occ of occurrences) removed = occ.part.remove?.() || removed;
1078
+ return removed ? "removed" : "absent";
1079
+ }
1073
1080
  }
1074
1081
  // Adapters without structural removal retain paired sentinels.
1075
1082
  const sentinel = `[dropped \u00a7${tagId}\u00a7]`;
@@ -170,7 +170,8 @@ export interface TranscriptPart {
170
170
  /** Remove one half of a complete tool arc. Callers must remove both halves together. */
171
171
  remove?(): boolean;
172
172
  /** Refuse structural deletion when the adapter cannot match provider-native identity safely. */
173
- canRemove?(): boolean;
173
+ /** A deferred durable decision vetoes the whole drop, including sentinel fallback. */
174
+ canRemove?(): boolean | "defer";
174
175
 
175
176
  /**
176
177
  * Optional: serialized byte size of the part's REAL payload, including