@cortexkit/opencode-magic-context 0.49.82 → 0.49.83

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 (23) hide show
  1. package/dist/{context-00f1hdz2.js → context-xmyke353.js} +8 -3
  2. package/dist/features/magic-context/dreamer/map-memories-retry.d.ts +18 -0
  3. package/dist/features/magic-context/dreamer/map-memories-retry.d.ts.map +1 -0
  4. package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
  5. package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts +2 -0
  6. package/dist/features/magic-context/dreamer/retrospective-raw-provider.d.ts.map +1 -1
  7. package/dist/features/magic-context/dreamer/task-gates.d.ts +1 -1
  8. package/dist/features/magic-context/dreamer/task-gates.d.ts.map +1 -1
  9. package/dist/features/magic-context/dreamer/task-registry.d.ts +7 -0
  10. package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
  11. package/dist/features/magic-context/dreamer/task-scheduler.d.ts +9 -0
  12. package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
  13. package/dist/{index-jvr9ba9y.js → index-eyk7msgw.js} +193 -122
  14. package/dist/{index-nda0zgna.js → index-kknjvmpx.js} +2 -1
  15. package/dist/index.js +4 -4
  16. package/dist/{task-config-t6bpyka7.js → task-config-qt6n4bxm.js} +1 -1
  17. package/dist/v2/{context-gwkgh0wd.js → context-zn18k0yk.js} +280 -202
  18. package/dist/v2/retrospective-raw-provider.d.ts.map +1 -1
  19. package/dist/v2/{server-92g7d776.js → server-2kswss3d.js} +2 -1
  20. package/dist/v2/server.js +2 -2
  21. package/dist/v2/{task-config-7md27rx8.js → task-config-ex2vajr2.js} +1 -1
  22. package/package.json +1 -1
  23. package/src/features/magic-context/dreamer/task-registry.ts +8 -0
@@ -1 +1 @@
1
- {"version":3,"file":"retrospective-raw-provider.d.ts","sourceRoot":"","sources":["../../src/v2/retrospective-raw-provider.ts"],"names":[],"mappings":"AAAA,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gB,CAAC;AAE/D;;;+EAG+E;AAC/E,qBAAa,0BAA2B,YAAW,wBAAwB;IAGnE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAH/B,OAAO,CAAC,MAAM,CAAC,CAAgB;gBAEV,SAAS,EAAE,QAAQ,EACnB,UAAU,sBAGtB;IAGT,OAAO,CAAC,KAAK;IAIb,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,2BAA2B,EAAE;IAe3E,2BAA2B,CACvB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,EAAE,MAAM,GAChB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAItB,OAAO,CAAC,IAAI;IAwBZ,qBAAqB,CACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACtB,sBAAsB;IAazB,sBAAsB,CAClB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACd,uBAAuB,EAAE;IAM5B,OAAO,IAAI,IAAI;CAIlB"}
@@ -20,6 +20,7 @@ var CANONICAL_DREAM_TASKS = [
20
20
  "promote-primers",
21
21
  "refresh-primers"
22
22
  ];
23
+ var MIN_POOL_TO_CLASSIFY = 10;
23
24
  function availableDreamTasks(smartNotesEnabled = true) {
24
25
  return CANONICAL_DREAM_TASKS.filter((task) => smartNotesEnabled || task !== "evaluate-smart-notes");
25
26
  }
@@ -209,4 +210,4 @@ function summarizeDreamSchedule2(dreamer, smartNotesEnabled = true) {
209
210
  return enabled.map((t) => `${t} ${dreamer?.tasks[t]?.schedule}`).join(", ");
210
211
  }
211
212
 
212
- export { CANONICAL_DREAM_TASKS, DREAM_TASK_CAPABILITIES, toolLoopDreamTasks, formatUnsupportedDreamTasks, formatDreamTaskBacklogs, processedDreamTaskItems, PROJECT_MEMORY_DREAM_TASKS, dreamTaskAllowedBySettings, leaseKindFor, leaseKeyFor, isCanonicalDreamTask, compareTaskOrder, buildDreamTaskRuntimeConfigs2, userMemoryCollectionEnabled2, userObservationCollectionEnabled2, userObservationsRequested2, userMemoryPromotionThreshold2, dreamTaskScheduled2, enabledDreamTasks2, summarizeDreamSchedule2 };
213
+ export { CANONICAL_DREAM_TASKS, MIN_POOL_TO_CLASSIFY, DREAM_TASK_CAPABILITIES, toolLoopDreamTasks, formatUnsupportedDreamTasks, formatDreamTaskBacklogs, processedDreamTaskItems, PROJECT_MEMORY_DREAM_TASKS, dreamTaskAllowedBySettings, leaseKindFor, leaseKeyFor, isCanonicalDreamTask, compareTaskOrder, buildDreamTaskRuntimeConfigs2, userMemoryCollectionEnabled2, userObservationCollectionEnabled2, userObservationsRequested2, userMemoryPromotionThreshold2, dreamTaskScheduled2, enabledDreamTasks2, summarizeDreamSchedule2 };
package/dist/v2/server.js CHANGED
@@ -7875,7 +7875,7 @@ var require_src2 = __commonJS(function(exports, module) {
7875
7875
  // package.json
7876
7876
  var package_default = {
7877
7877
  name: "@cortexkit/opencode-magic-context",
7878
- version: "0.49.82",
7878
+ version: "0.49.83",
7879
7879
  type: "module",
7880
7880
  description: "OpenCode plugin for Magic Context — cross-session memory and context management",
7881
7881
  main: "dist/index.js",
@@ -8196,7 +8196,7 @@ async function setup(context) {
8196
8196
  if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
8197
8197
  log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
8198
8198
  }
8199
- const { registerContext } = await import("./context-gwkgh0wd.js");
8199
+ const { registerContext } = await import("./context-zn18k0yk.js");
8200
8200
  setHarness2("opencode2");
8201
8201
  bindStaleBuildNotice({}, import.meta.url, "opencode2");
8202
8202
  const duties = await registerContext(context);
@@ -7,7 +7,7 @@ import {
7
7
  dreamTaskScheduled2,
8
8
  enabledDreamTasks2,
9
9
  summarizeDreamSchedule2
10
- } from "./server-92g7d776.js";
10
+ } from "./server-2kswss3d.js";
11
11
  import"./server-5kym00ag.js";
12
12
  export {
13
13
  buildDreamTaskRuntimeConfigs2 as buildDreamTaskRuntimeConfigs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/opencode-magic-context",
3
- "version": "0.49.82",
3
+ "version": "0.49.83",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",
@@ -29,6 +29,14 @@ export const CANONICAL_DREAM_TASKS = [
29
29
 
30
30
  export type DreamTaskName = (typeof CANONICAL_DREAM_TASKS)[number];
31
31
 
32
+ /**
33
+ * Importance scoring ranks a project's memories against one another, so it
34
+ * needs at least this many memories that are active (not archived) to say
35
+ * anything. Below it the task does nothing, and its schedule check and backlog
36
+ * count treat the project as having no work.
37
+ */
38
+ export const MIN_POOL_TO_CLASSIFY = 10;
39
+
32
40
  export function availableDreamTasks(smartNotesEnabled = true): DreamTaskName[] {
33
41
  return CANONICAL_DREAM_TASKS.filter(
34
42
  (task) => smartNotesEnabled || task !== "evaluate-smart-notes",