@theokit/sdk 4.59.0 → 4.60.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{agent-VHRX7XGW.cjs → agent-26RMDG4U.cjs} +8 -7
  3. package/dist/{agent-VHRX7XGW.cjs.map → agent-26RMDG4U.cjs.map} +1 -1
  4. package/dist/{agent-ST27RIJE.js → agent-6ABK2DPG.js} +7 -6
  5. package/dist/{agent-ST27RIJE.js.map → agent-6ABK2DPG.js.map} +1 -1
  6. package/dist/{chunk-SMUAG2DY.cjs → chunk-23GPJGRR.cjs} +18 -17
  7. package/dist/chunk-23GPJGRR.cjs.map +1 -0
  8. package/dist/{chunk-7GUIET73.cjs → chunk-3HDTP4ZO.cjs} +4 -4
  9. package/dist/{chunk-7GUIET73.cjs.map → chunk-3HDTP4ZO.cjs.map} +1 -1
  10. package/dist/{chunk-GNT35C5U.cjs → chunk-6SBW4QR2.cjs} +2 -2
  11. package/dist/{chunk-GNT35C5U.cjs.map → chunk-6SBW4QR2.cjs.map} +1 -1
  12. package/dist/{chunk-7LOIUIQZ.js → chunk-76XTUTKY.js} +5 -4
  13. package/dist/chunk-76XTUTKY.js.map +1 -0
  14. package/dist/{chunk-ZA255A62.js → chunk-7OXXYBHD.js} +7 -186
  15. package/dist/chunk-7OXXYBHD.js.map +1 -0
  16. package/dist/{chunk-D5NWEOCO.js → chunk-E5MWNLRX.js} +3 -3
  17. package/dist/{chunk-D5NWEOCO.js.map → chunk-E5MWNLRX.js.map} +1 -1
  18. package/dist/{chunk-XV4IZNV4.js → chunk-FUL2I7G5.js} +2 -2
  19. package/dist/{chunk-XV4IZNV4.js.map → chunk-FUL2I7G5.js.map} +1 -1
  20. package/dist/chunk-JVERBPRD.js +191 -0
  21. package/dist/chunk-JVERBPRD.js.map +1 -0
  22. package/dist/chunk-NY25NBZB.cjs +203 -0
  23. package/dist/chunk-NY25NBZB.cjs.map +1 -0
  24. package/dist/{chunk-554J7UQH.cjs → chunk-Y2KJ7MYO.cjs} +14 -201
  25. package/dist/chunk-Y2KJ7MYO.cjs.map +1 -0
  26. package/dist/cron.cjs +7 -6
  27. package/dist/cron.js +6 -5
  28. package/dist/eval.cjs +6 -5
  29. package/dist/eval.cjs.map +1 -1
  30. package/dist/eval.js +5 -4
  31. package/dist/eval.js.map +1 -1
  32. package/dist/{index-manager-A64I7KYV.js → index-manager-KP2JAXKN.js} +4 -3
  33. package/dist/{index-manager-A64I7KYV.js.map → index-manager-KP2JAXKN.js.map} +1 -1
  34. package/dist/{index-manager-A3XPHAWF.cjs → index-manager-YUORPS4G.cjs} +5 -4
  35. package/dist/{index-manager-A3XPHAWF.cjs.map → index-manager-YUORPS4G.cjs.map} +1 -1
  36. package/dist/index.cjs +35 -34
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.js +12 -11
  39. package/dist/index.js.map +1 -1
  40. package/dist/internal/memory/storage/chunk-markdown.d.cts +2 -0
  41. package/dist/internal/memory/storage/index.cjs +54 -0
  42. package/dist/internal/memory/storage/index.cjs.map +1 -0
  43. package/dist/internal/memory/storage/index.d.cts +18 -0
  44. package/dist/internal/memory/storage/index.d.ts +18 -0
  45. package/dist/internal/memory/storage/index.js +13 -0
  46. package/dist/internal/memory/storage/index.js.map +1 -0
  47. package/dist/internal/memory/storage/markdown-store.d.cts +77 -0
  48. package/dist/internal/memory/storage/markdown-store.d.ts +25 -1
  49. package/dist/internal/memory/storage/memory-file.d.cts +54 -0
  50. package/dist/internal/memory/storage/reader.d.cts +8 -0
  51. package/dist/internal/memory/storage/session-loader.d.cts +1 -0
  52. package/dist/internal/memory/storage/session-summary-writer.d.cts +2 -0
  53. package/dist/internal/memory/storage/transcript-store.d.cts +1 -0
  54. package/dist/internal/memory/storage/wiki-loader.d.cts +2 -0
  55. package/dist/workflow.cjs +9 -9
  56. package/dist/workflow.js +1 -1
  57. package/docs/error-codes.md +1 -1
  58. package/docs/harness-capability-map.md +15 -1
  59. package/package.json +11 -1
  60. package/dist/chunk-554J7UQH.cjs.map +0 -1
  61. package/dist/chunk-7LOIUIQZ.js.map +0 -1
  62. package/dist/chunk-SMUAG2DY.cjs.map +0 -1
  63. package/dist/chunk-ZA255A62.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.60.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8d072cf: The markdown memory store is now importable by `@theokit/sdk-memory` instead of copied into it.
8
+
9
+ `@theokit/sdk-memory` carries its own copy of the store, and `Memory.runDreamingSweep` replaces this
10
+ implementation with the peer's whenever the peer is installed — so the copy that runs is not the copy
11
+ anyone maintains. It stayed on the layout that predates the file-per-memory format, which means
12
+ installing `@theokit/sdk-memory` today makes every memory this SDK has written unreadable. Nothing
13
+ throws: the sweep reports `factsBefore: 0`, a number indistinguishable from an empty store (#430).
14
+
15
+ This release ships the half that has to exist first — the `@theokit/sdk/internal/memory-store`
16
+ sub-path, semver-exempt like `internal/persistence` and `internal/memory-adapters`. The satellite
17
+ cannot declare a floor on a version that is not published yet, so its delegation follows in the next
18
+ release rather than riding along with a floor nobody can install.
19
+
20
+ theokit#160 fixed this exact shape for the embedding runtime, in this same package pair. Re-syncing a
21
+ copy fixes today's divergence and leaves tomorrow's free to happen.
22
+
3
23
  ## 4.59.0
4
24
 
5
25
  ### Minor Changes
@@ -1,14 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var chunkSMUAG2DY_cjs = require('./chunk-SMUAG2DY.cjs');
3
+ var chunk23GPJGRR_cjs = require('./chunk-23GPJGRR.cjs');
4
+ require('./chunk-NGESVVJN.cjs');
4
5
  require('./chunk-KKK3FZ4A.cjs');
5
- require('./chunk-554J7UQH.cjs');
6
+ require('./chunk-BUUUWQMB.cjs');
7
+ require('./chunk-Y2KJ7MYO.cjs');
6
8
  require('./chunk-P6H23T43.cjs');
7
9
  require('./chunk-BV2MWEMV.cjs');
8
- require('./chunk-NGESVVJN.cjs');
9
- require('./chunk-BUUUWQMB.cjs');
10
10
  require('./chunk-EI2Q7SJ5.cjs');
11
11
  require('./chunk-GHX4P3V2.cjs');
12
+ require('./chunk-NY25NBZB.cjs');
12
13
  require('./chunk-QI7WE46I.cjs');
13
14
  require('./chunk-43GFJ5SD.cjs');
14
15
  require('./chunk-F3YZMOAU.cjs');
@@ -57,7 +58,7 @@ require('./chunk-NUKRL3I6.cjs');
57
58
 
58
59
  Object.defineProperty(exports, "Agent", {
59
60
  enumerable: true,
60
- get: function () { return chunkSMUAG2DY_cjs.Agent; }
61
+ get: function () { return chunk23GPJGRR_cjs.Agent; }
61
62
  });
62
- //# sourceMappingURL=agent-VHRX7XGW.cjs.map
63
- //# sourceMappingURL=agent-VHRX7XGW.cjs.map
63
+ //# sourceMappingURL=agent-26RMDG4U.cjs.map
64
+ //# sourceMappingURL=agent-26RMDG4U.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-VHRX7XGW.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-26RMDG4U.cjs"}
@@ -1,12 +1,13 @@
1
- export { Agent } from './chunk-7LOIUIQZ.js';
1
+ export { Agent } from './chunk-76XTUTKY.js';
2
+ import './chunk-SUKXXLWD.js';
2
3
  import './chunk-WG7R5W6R.js';
3
- import './chunk-ZA255A62.js';
4
+ import './chunk-K2BQQ445.js';
5
+ import './chunk-7OXXYBHD.js';
4
6
  import './chunk-MZ2FGBLZ.js';
5
7
  import './chunk-2SFBB54R.js';
6
- import './chunk-SUKXXLWD.js';
7
- import './chunk-K2BQQ445.js';
8
8
  import './chunk-XN7NOENA.js';
9
9
  import './chunk-H73MEMQB.js';
10
+ import './chunk-JVERBPRD.js';
10
11
  import './chunk-YJDH3CKG.js';
11
12
  import './chunk-IACR5LEM.js';
12
13
  import './chunk-3E77SX4H.js';
@@ -50,5 +51,5 @@ import './chunk-3OR54XG4.js';
50
51
  import './chunk-IDCKSLYH.js';
51
52
  import './chunk-T7XEKOVW.js';
52
53
  import './chunk-T7O6K6PX.js';
53
- //# sourceMappingURL=agent-ST27RIJE.js.map
54
- //# sourceMappingURL=agent-ST27RIJE.js.map
54
+ //# sourceMappingURL=agent-6ABK2DPG.js.map
55
+ //# sourceMappingURL=agent-6ABK2DPG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-ST27RIJE.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-6ABK2DPG.js"}
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ var chunkNGESVVJN_cjs = require('./chunk-NGESVVJN.cjs');
3
4
  var chunkKKK3FZ4A_cjs = require('./chunk-KKK3FZ4A.cjs');
4
- var chunk554J7UQH_cjs = require('./chunk-554J7UQH.cjs');
5
+ var chunkY2KJ7MYO_cjs = require('./chunk-Y2KJ7MYO.cjs');
5
6
  var chunkP6H23T43_cjs = require('./chunk-P6H23T43.cjs');
6
7
  var chunkBV2MWEMV_cjs = require('./chunk-BV2MWEMV.cjs');
7
- var chunkNGESVVJN_cjs = require('./chunk-NGESVVJN.cjs');
8
8
  var chunkEI2Q7SJ5_cjs = require('./chunk-EI2Q7SJ5.cjs');
9
+ var chunkNY25NBZB_cjs = require('./chunk-NY25NBZB.cjs');
9
10
  var chunkQI7WE46I_cjs = require('./chunk-QI7WE46I.cjs');
10
11
  var chunk43GFJ5SD_cjs = require('./chunk-43GFJ5SD.cjs');
11
12
  var chunk2ZPEDVLM_cjs = require('./chunk-2ZPEDVLM.cjs');
@@ -885,7 +886,7 @@ async function readLegacyFacts(jsonPath) {
885
886
  }
886
887
  async function writeMigratedFacts(cwd, jsonPath, facts) {
887
888
  try {
888
- for (const fact of facts) await chunk554J7UQH_cjs.appendFactToMarkdown(cwd, fact);
889
+ for (const fact of facts) await chunkNY25NBZB_cjs.appendFactToMarkdown(cwd, fact);
889
890
  await promises.unlink(jsonPath).catch(() => void 0);
890
891
  chunkNUKRL3I6_cjs.diag(`[theokit-sdk] migrated ${facts.length} fact(s) from ${jsonPath} to MEMORY.md
891
892
  `);
@@ -902,11 +903,11 @@ async function migrateLegacyJson(cwd, config) {
902
903
  const key = `${cwd}::${config.namespace ?? "default"}::${config.scope ?? "agent"}::${config.userId ?? "default"}`;
903
904
  if (migrationRun.has(key)) return { migrated: false, factCount: 0, reason: "already-migrated" };
904
905
  migrationRun.add(key);
905
- const jsonPath = chunk554J7UQH_cjs.legacyMemoryJsonPath(cwd, config);
906
+ const jsonPath = chunkNY25NBZB_cjs.legacyMemoryJsonPath(cwd, config);
906
907
  if (!await fileExists(jsonPath)) {
907
908
  return { migrated: false, factCount: 0, reason: "no-legacy-json" };
908
909
  }
909
- if (await fileExists(chunk554J7UQH_cjs.memoryMdPath(cwd))) {
910
+ if (await fileExists(chunkNY25NBZB_cjs.memoryMdPath(cwd))) {
910
911
  chunkNUKRL3I6_cjs.diag(
911
912
  `[theokit-sdk] memory migration skipped: both MEMORY.md and legacy JSON exist at ${jsonPath}; leaving both intact
912
913
  `
@@ -933,12 +934,12 @@ function extractMemoryKind(message) {
933
934
  const declared = match?.[1];
934
935
  if (declared === void 0) return void 0;
935
936
  const lowered = declared.toLowerCase();
936
- return chunk554J7UQH_cjs.MEMORY_KINDS.includes(lowered) ? lowered : void 0;
937
+ return chunkNY25NBZB_cjs.MEMORY_KINDS.includes(lowered) ? lowered : void 0;
937
938
  }
938
939
  async function readMemoryFacts(cwd, config, memoryHome) {
939
940
  if (!config.enabled) return [];
940
941
  await migrateLegacyJson(cwd, config);
941
- return chunk554J7UQH_cjs.readFacts(cwd, config, memoryHome);
942
+ return chunkNY25NBZB_cjs.readFacts(cwd, config, memoryHome);
942
943
  }
943
944
  async function appendMemoryFact(cwd, config, fact, memoryHome) {
944
945
  if (!config.enabled) return;
@@ -947,7 +948,7 @@ async function appendMemoryFact(cwd, config, fact, memoryHome) {
947
948
  text: chunkJTB5Q42C_cjs.redactSecrets(fact.text),
948
949
  ...fact.kind === void 0 ? {} : { kind: fact.kind }
949
950
  };
950
- await chunk554J7UQH_cjs.appendFact(cwd, config, sanitized, memoryHome);
951
+ await chunkNY25NBZB_cjs.appendFact(cwd, config, sanitized, memoryHome);
951
952
  }
952
953
 
953
954
  // src/internal/runtime/fixtures/fixture-scripts.ts
@@ -2804,7 +2805,7 @@ async function runPostRunLifecycle(inputs) {
2804
2805
  if (memoryProvider?.recordSessionSummary !== void 0) {
2805
2806
  await memoryProvider.recordSessionSummary(summaryArgs);
2806
2807
  } else {
2807
- await chunk554J7UQH_cjs.writeSessionSummary(summaryArgs);
2808
+ await chunkY2KJ7MYO_cjs.writeSessionSummary(summaryArgs);
2808
2809
  }
2809
2810
  if (!shouldUsePortMemoryPath()) {
2810
2811
  void memoryGlue.syncIfReady();
@@ -3428,7 +3429,7 @@ var HISTOGRAM_NAMES = {
3428
3429
  };
3429
3430
  function safeRequire(moduleName) {
3430
3431
  try {
3431
- const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-SMUAG2DY.cjs', document.baseURI).href)));
3432
+ const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-23GPJGRR.cjs', document.baseURI).href)));
3432
3433
  return r(moduleName);
3433
3434
  } catch {
3434
3435
  return void 0;
@@ -3656,7 +3657,7 @@ var cachedOtel;
3656
3657
  function loadOtel() {
3657
3658
  if (cachedOtel === void 0) {
3658
3659
  try {
3659
- const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-SMUAG2DY.cjs', document.baseURI).href)));
3660
+ const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-23GPJGRR.cjs', document.baseURI).href)));
3660
3661
  const mod = r("@opentelemetry/api");
3661
3662
  cachedOtel = mod;
3662
3663
  } catch {
@@ -7775,7 +7776,7 @@ async function reloadLocalAgent(agent) {
7775
7776
  }
7776
7777
  async function persistActiveMemoryTranscript(cwd, transcript) {
7777
7778
  try {
7778
- const dir = path.join(chunk554J7UQH_cjs.memoryDir(cwd), "transcripts", "active-memory");
7779
+ const dir = path.join(chunkNY25NBZB_cjs.memoryDir(cwd), "transcripts", "active-memory");
7779
7780
  const file = path.join(dir, `${transcript.runId}.json`);
7780
7781
  await chunkI6TGFUCO_cjs.atomicWriteJson(file, transcript);
7781
7782
  } catch (cause) {
@@ -8405,7 +8406,7 @@ function createMemorySearchTool(opts) {
8405
8406
  };
8406
8407
  }
8407
8408
  function createMemoryGetTool(opts) {
8408
- const memoryRoot = path.resolve(chunk554J7UQH_cjs.memoryDir(opts.cwd));
8409
+ const memoryRoot = path.resolve(chunkNY25NBZB_cjs.memoryDir(opts.cwd));
8409
8410
  return {
8410
8411
  name: "memory_get",
8411
8412
  description: GET_DESCRIPTION,
@@ -8511,7 +8512,7 @@ var LocalAgentMemory = class {
8511
8512
  const openOpts = { cwd: this.workspaceCwd };
8512
8513
  if (embedding !== void 0) openOpts.embedding = embedding;
8513
8514
  if (cfg?.backend !== void 0) openOpts.backend = cfg.backend;
8514
- this.index = await chunk554J7UQH_cjs.IndexManager.open(openOpts);
8515
+ this.index = await chunkY2KJ7MYO_cjs.IndexManager.open(openOpts);
8515
8516
  await this.index.sync();
8516
8517
  this.toolsCache = [
8517
8518
  createMemorySearchTool({ index: this.index }),
@@ -8769,7 +8770,7 @@ function createLocalAgentMemoryProvider(opts) {
8769
8770
  return { facts: [], systemPromptAdditions: summary };
8770
8771
  },
8771
8772
  async recordSessionSummary(args) {
8772
- await chunk554J7UQH_cjs.writeSessionSummary(args);
8773
+ await chunkY2KJ7MYO_cjs.writeSessionSummary(args);
8773
8774
  },
8774
8775
  async sync(handle) {
8775
8776
  const state = handle[INTERNAL_LAM_KEY];
@@ -10600,5 +10601,5 @@ exports.computeCost = computeCost;
10600
10601
  exports.generateCronId = generateCronId;
10601
10602
  exports.getPricingEntry = getPricingEntry;
10602
10603
  exports.openRouterMemoryEmbeddingProviderAdapter = openRouterMemoryEmbeddingProviderAdapter;
10603
- //# sourceMappingURL=chunk-SMUAG2DY.cjs.map
10604
- //# sourceMappingURL=chunk-SMUAG2DY.cjs.map
10604
+ //# sourceMappingURL=chunk-23GPJGRR.cjs.map
10605
+ //# sourceMappingURL=chunk-23GPJGRR.cjs.map