@theokit/sdk 5.9.0 → 5.9.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{agent-ZM4FDDL7.cjs → agent-5M7WLUWH.cjs} +7 -7
  3. package/dist/{agent-ZM4FDDL7.cjs.map → agent-5M7WLUWH.cjs.map} +1 -1
  4. package/dist/{agent-6STOEBGQ.js → agent-R5RERYFU.js} +6 -6
  5. package/dist/{agent-6STOEBGQ.js.map → agent-R5RERYFU.js.map} +1 -1
  6. package/dist/{chunk-BM6PDJW3.cjs → chunk-56BCEM26.cjs} +27 -27
  7. package/dist/{chunk-BM6PDJW3.cjs.map → chunk-56BCEM26.cjs.map} +1 -1
  8. package/dist/{chunk-DDRX4LYS.js → chunk-7QJYKVP6.js} +3 -3
  9. package/dist/{chunk-DDRX4LYS.js.map → chunk-7QJYKVP6.js.map} +1 -1
  10. package/dist/{chunk-J4SA2ZEJ.cjs → chunk-KIKKTW5O.cjs} +4 -4
  11. package/dist/{chunk-J4SA2ZEJ.cjs.map → chunk-KIKKTW5O.cjs.map} +1 -1
  12. package/dist/{chunk-5WR33BHA.cjs → chunk-LL4QA3DI.cjs} +4 -4
  13. package/dist/{chunk-5WR33BHA.cjs.map → chunk-LL4QA3DI.cjs.map} +1 -1
  14. package/dist/{chunk-OCEQ6DW2.cjs → chunk-N6OEX5TN.cjs} +2 -2
  15. package/dist/chunk-N6OEX5TN.cjs.map +1 -0
  16. package/dist/{chunk-PYFBS6OQ.js → chunk-OOM236Z4.js} +6 -6
  17. package/dist/{chunk-PYFBS6OQ.js.map → chunk-OOM236Z4.js.map} +1 -1
  18. package/dist/{chunk-7GDHFV2M.js → chunk-OPAKPEPG.js} +2 -2
  19. package/dist/chunk-OPAKPEPG.js.map +1 -0
  20. package/dist/{chunk-UKBBYVNS.js → chunk-QCIARBLS.js} +3 -3
  21. package/dist/{chunk-UKBBYVNS.js.map → chunk-QCIARBLS.js.map} +1 -1
  22. package/dist/{chunk-KTA7YTZQ.cjs → chunk-XKZFIP7Z.cjs} +4 -4
  23. package/dist/{chunk-KTA7YTZQ.cjs.map → chunk-XKZFIP7Z.cjs.map} +1 -1
  24. package/dist/{chunk-PQCTDMUI.js → chunk-ZHWKT2NI.js} +3 -3
  25. package/dist/{chunk-PQCTDMUI.js.map → chunk-ZHWKT2NI.js.map} +1 -1
  26. package/dist/context/index.cjs +6 -6
  27. package/dist/context/index.js +3 -3
  28. package/dist/context-3FZRAO5K.js +7 -0
  29. package/dist/{context-SXR2HLHT.js.map → context-3FZRAO5K.js.map} +1 -1
  30. package/dist/{context-ZOULM2RB.cjs → context-B5J4GX2F.cjs} +7 -7
  31. package/dist/{context-ZOULM2RB.cjs.map → context-B5J4GX2F.cjs.map} +1 -1
  32. package/dist/cron.cjs +6 -6
  33. package/dist/cron.js +5 -5
  34. package/dist/eval.cjs +5 -5
  35. package/dist/eval.js +4 -4
  36. package/dist/index.cjs +23 -23
  37. package/dist/index.js +7 -7
  38. package/dist/internal/runtime/hooks/hooks-source.d.ts +24 -0
  39. package/docs/error-codes.md +3 -3
  40. package/package.json +1 -1
  41. package/dist/chunk-7GDHFV2M.js.map +0 -1
  42. package/dist/chunk-OCEQ6DW2.cjs.map +0 -1
  43. package/dist/context-SXR2HLHT.js +0 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#694](https://github.com/usetheokit/theokit-sdk/pull/694) [`aa2a04a`](https://github.com/usetheokit/theokit-sdk/commit/aa2a04a1c08514b0ea47d779640fc37f119cd21b) Thanks [@usetheodev](https://github.com/usetheodev)! - The README documents the shape of `.theokit/hooks.json`, which it previously told a consumer to
8
+ validate against and did not show. The sentence *"read and validated here, against the shape above"*
9
+ had no shape above it — the section stated where the file is read from and never what goes in it, so
10
+ the one thing a consumer needs in order to exercise the gate that guards it was missing
11
+ (usetheokit/theokit-sdk#638).
12
+
13
+ What is documented is read from the loader rather than restated beside it: the JSON shape, the three
14
+ fields a hook entry may carry (`type`, `command`, `timeout`), the seven Claude Code fields refused
15
+ with a named error rather than dropped, the four events that actually fire, and the nested
16
+ `hookSpecificOutput.permissionDecision` deny shape with `ask` projecting to deny.
17
+
18
+ `tests/the-readme-hooks-shape-matches-the-loader.test.ts` holds it there, reading
19
+ `CLAUDE_CODE_EVENT_MAP`, `ACCEPTED_HOOK_FIELDS` and `UNIMPLEMENTED_CLAUDE_CODE_HOOK_FIELDS` from the
20
+ loader — the last two newly exported for that purpose, from a module that is already `@internal`, on
21
+ the precedent `CLAUDE_CODE_EVENT_MAP` set when it was exported so the supported set would be derived
22
+ rather than asserted.
23
+
24
+ Each list is read from its own sentence rather than from the section. The first version of the test
25
+ asserted the section contained `` `if` `` and passed after `if` was deleted from the refused list,
26
+ because the next sentence happens to mention it — a green assertion for a reason unrelated to its
27
+ claim, which is the same defect one level up.
28
+
3
29
  ## 5.9.0
4
30
 
5
31
  ### Minor Changes
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkBM6PDJW3_cjs = require('./chunk-BM6PDJW3.cjs');
3
+ var chunk56BCEM26_cjs = require('./chunk-56BCEM26.cjs');
4
4
  require('./chunk-J6GXS5A2.cjs');
5
5
  require('./chunk-PSLCVSCS.cjs');
6
6
  require('./chunk-BUUUWQMB.cjs');
7
7
  require('./chunk-TTBIQTO5.cjs');
8
- require('./chunk-J4SA2ZEJ.cjs');
8
+ require('./chunk-KIKKTW5O.cjs');
9
9
  require('./chunk-BV2MWEMV.cjs');
10
10
  require('./chunk-MEUBLCM4.cjs');
11
11
  require('./chunk-GHX4P3V2.cjs');
@@ -19,8 +19,8 @@ require('./chunk-WPO3VCY4.cjs');
19
19
  require('./chunk-QOGNZMHD.cjs');
20
20
  require('./chunk-YIFFF23U.cjs');
21
21
  require('./chunk-2ZPEDVLM.cjs');
22
- require('./chunk-KTA7YTZQ.cjs');
23
- require('./chunk-OCEQ6DW2.cjs');
22
+ require('./chunk-XKZFIP7Z.cjs');
23
+ require('./chunk-N6OEX5TN.cjs');
24
24
  require('./chunk-KRD3GQAA.cjs');
25
25
  require('./chunk-RQMCOFAI.cjs');
26
26
  require('./chunk-MUUQ2WFJ.cjs');
@@ -62,7 +62,7 @@ require('./chunk-6LHQPOMI.cjs');
62
62
 
63
63
  Object.defineProperty(exports, "Agent", {
64
64
  enumerable: true,
65
- get: function () { return chunkBM6PDJW3_cjs.Agent; }
65
+ get: function () { return chunk56BCEM26_cjs.Agent; }
66
66
  });
67
- //# sourceMappingURL=agent-ZM4FDDL7.cjs.map
68
- //# sourceMappingURL=agent-ZM4FDDL7.cjs.map
67
+ //# sourceMappingURL=agent-5M7WLUWH.cjs.map
68
+ //# sourceMappingURL=agent-5M7WLUWH.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-ZM4FDDL7.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-5M7WLUWH.cjs"}
@@ -1,9 +1,9 @@
1
- export { Agent } from './chunk-PYFBS6OQ.js';
1
+ export { Agent } from './chunk-OOM236Z4.js';
2
2
  import './chunk-XKMVJ443.js';
3
3
  import './chunk-5522X223.js';
4
4
  import './chunk-K2BQQ445.js';
5
5
  import './chunk-R2C3HXR3.js';
6
- import './chunk-PQCTDMUI.js';
6
+ import './chunk-ZHWKT2NI.js';
7
7
  import './chunk-2SFBB54R.js';
8
8
  import './chunk-HOHR75KF.js';
9
9
  import './chunk-H73MEMQB.js';
@@ -17,8 +17,8 @@ import './chunk-TE6XVTOA.js';
17
17
  import './chunk-24MGQDK3.js';
18
18
  import './chunk-2WXHA33T.js';
19
19
  import './chunk-HKCKOAIO.js';
20
- import './chunk-DDRX4LYS.js';
21
- import './chunk-7GDHFV2M.js';
20
+ import './chunk-7QJYKVP6.js';
21
+ import './chunk-OPAKPEPG.js';
22
22
  import './chunk-KVNWIAO4.js';
23
23
  import './chunk-SVQIW5RJ.js';
24
24
  import './chunk-FD2UT76F.js';
@@ -55,5 +55,5 @@ import './chunk-5Q4RTLMP.js';
55
55
  import './chunk-H3CVJSFC.js';
56
56
  import './chunk-B5MHRQJZ.js';
57
57
  import './chunk-CZJ6Q7CW.js';
58
- //# sourceMappingURL=agent-6STOEBGQ.js.map
59
- //# sourceMappingURL=agent-6STOEBGQ.js.map
58
+ //# sourceMappingURL=agent-R5RERYFU.js.map
59
+ //# sourceMappingURL=agent-R5RERYFU.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-6STOEBGQ.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-R5RERYFU.js"}
@@ -3,7 +3,7 @@
3
3
  var chunkJ6GXS5A2_cjs = require('./chunk-J6GXS5A2.cjs');
4
4
  var chunkPSLCVSCS_cjs = require('./chunk-PSLCVSCS.cjs');
5
5
  var chunkTTBIQTO5_cjs = require('./chunk-TTBIQTO5.cjs');
6
- var chunkJ4SA2ZEJ_cjs = require('./chunk-J4SA2ZEJ.cjs');
6
+ var chunkKIKKTW5O_cjs = require('./chunk-KIKKTW5O.cjs');
7
7
  var chunkBV2MWEMV_cjs = require('./chunk-BV2MWEMV.cjs');
8
8
  var chunkMEUBLCM4_cjs = require('./chunk-MEUBLCM4.cjs');
9
9
  var chunkTMKTSYDS_cjs = require('./chunk-TMKTSYDS.cjs');
@@ -11,8 +11,8 @@ var chunk76PIKR4P_cjs = require('./chunk-76PIKR4P.cjs');
11
11
  var chunkB3XXQX6L_cjs = require('./chunk-B3XXQX6L.cjs');
12
12
  var chunkARMFXTY6_cjs = require('./chunk-ARMFXTY6.cjs');
13
13
  var chunk2ZPEDVLM_cjs = require('./chunk-2ZPEDVLM.cjs');
14
- var chunkKTA7YTZQ_cjs = require('./chunk-KTA7YTZQ.cjs');
15
- var chunkOCEQ6DW2_cjs = require('./chunk-OCEQ6DW2.cjs');
14
+ var chunkXKZFIP7Z_cjs = require('./chunk-XKZFIP7Z.cjs');
15
+ var chunkN6OEX5TN_cjs = require('./chunk-N6OEX5TN.cjs');
16
16
  var chunkRQMCOFAI_cjs = require('./chunk-RQMCOFAI.cjs');
17
17
  var chunkAA27GEYS_cjs = require('./chunk-AA27GEYS.cjs');
18
18
  var chunkYSTXFWQE_cjs = require('./chunk-YSTXFWQE.cjs');
@@ -2124,14 +2124,14 @@ async function readState(filePath) {
2124
2124
  try {
2125
2125
  parsed = JSON.parse(raw);
2126
2126
  } catch {
2127
- chunkOCEQ6DW2_cjs.warnOnce(
2127
+ chunkN6OEX5TN_cjs.warnOnce(
2128
2128
  "personality-store-json-parse",
2129
2129
  "[theokit-sdk] personality.json is malformed; treating as empty"
2130
2130
  );
2131
2131
  return emptyState();
2132
2132
  }
2133
2133
  if (!isStateV1(parsed)) {
2134
- chunkOCEQ6DW2_cjs.warnOnce(
2134
+ chunkN6OEX5TN_cjs.warnOnce(
2135
2135
  "personality-store-bad-version",
2136
2136
  `[theokit-sdk] personality.json has unknown version; treating as empty (file kept untouched)`
2137
2137
  );
@@ -2162,7 +2162,7 @@ var PersonalityStore = class {
2162
2162
  try {
2163
2163
  await this.#persist(agentId, slug);
2164
2164
  } catch (err) {
2165
- chunkOCEQ6DW2_cjs.warnOnce(
2165
+ chunkN6OEX5TN_cjs.warnOnce(
2166
2166
  `personality-store-persist-failure-${agentId}`,
2167
2167
  `[theokit-sdk] personality persist failed for ${chunk6LHQPOMI_cjs.redactSecrets(agentId)}: ${chunk6LHQPOMI_cjs.redactSecrets(
2168
2168
  err.message
@@ -2179,7 +2179,7 @@ var PersonalityStore = class {
2179
2179
  try {
2180
2180
  state = await readState(filePath);
2181
2181
  } catch (err) {
2182
- chunkOCEQ6DW2_cjs.warnOnce(
2182
+ chunkN6OEX5TN_cjs.warnOnce(
2183
2183
  `personality-store-hydrate-failure-${agentId}`,
2184
2184
  `[theokit-sdk] personality hydrate failed for ${chunk6LHQPOMI_cjs.redactSecrets(agentId)}: ${chunk6LHQPOMI_cjs.redactSecrets(
2185
2185
  err.message
@@ -2728,7 +2728,7 @@ var HooksExecutor = class {
2728
2728
  config = {};
2729
2729
  async initialize(settingSourcesIncludeProject) {
2730
2730
  if (readManagedSettings(this.policy.managedSettingsRoot).disableAllHooks === true) {
2731
- chunkOCEQ6DW2_cjs.warnFailureOnce(
2731
+ chunkN6OEX5TN_cjs.warnFailureOnce(
2732
2732
  "hooks-disabled-by-policy",
2733
2733
  "[theokit-sdk] hooks: an operator policy (managed-settings.json) declares disableAllHooks \u2014 NO hook will run, including any this project declared."
2734
2734
  );
@@ -2739,7 +2739,7 @@ var HooksExecutor = class {
2739
2739
  this.config = {};
2740
2740
  return;
2741
2741
  }
2742
- this.config = await chunkOCEQ6DW2_cjs.loadHookConfig(this.cwd, this.compatSources);
2742
+ this.config = await chunkN6OEX5TN_cjs.loadHookConfig(this.cwd, this.compatSources);
2743
2743
  }
2744
2744
  /** Fire every hook registered for `event` and aggregate the decisions. */
2745
2745
  async run(payload) {
@@ -3638,7 +3638,7 @@ var HISTOGRAM_NAMES = {
3638
3638
  };
3639
3639
  function safeRequire(moduleName) {
3640
3640
  try {
3641
- const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-BM6PDJW3.cjs', document.baseURI).href)));
3641
+ const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-56BCEM26.cjs', document.baseURI).href)));
3642
3642
  return r(moduleName);
3643
3643
  } catch {
3644
3644
  return void 0;
@@ -3881,7 +3881,7 @@ var cachedOtel;
3881
3881
  function loadOtel() {
3882
3882
  if (cachedOtel === void 0) {
3883
3883
  try {
3884
- const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-BM6PDJW3.cjs', document.baseURI).href)));
3884
+ const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-56BCEM26.cjs', document.baseURI).href)));
3885
3885
  const mod = r("@opentelemetry/api");
3886
3886
  cachedOtel = mod;
3887
3887
  } catch {
@@ -4200,7 +4200,7 @@ function applyAggregateCap(sources, maxTotal) {
4200
4200
  }
4201
4201
  const remaining = maxTotal - totalBytes;
4202
4202
  if (remaining > 0) {
4203
- const { finalContent } = chunkKTA7YTZQ_cjs.truncateWithMarker(s.content, remaining);
4203
+ const { finalContent } = chunkXKZFIP7Z_cjs.truncateWithMarker(s.content, remaining);
4204
4204
  kept.push({ ...s, content: finalContent, truncated: true });
4205
4205
  totalBytes = maxTotal;
4206
4206
  } else {
@@ -4297,10 +4297,10 @@ var FileContextManager = class {
4297
4297
  this.lastScope = [...touchedFiles];
4298
4298
  const config = await loadContextConfig(this.cwd);
4299
4299
  const legacy = await loadSources(config, this.cwd);
4300
- const maxBytesPerFile = this.settings.maxBytesPerFile ?? chunkKTA7YTZQ_cjs.DEFAULT_MAX_BYTES_PER_FILE;
4300
+ const maxBytesPerFile = this.settings.maxBytesPerFile ?? chunkXKZFIP7Z_cjs.DEFAULT_MAX_BYTES_PER_FILE;
4301
4301
  const maxBytesTotal = this.settings.maxBytesTotal ?? DEFAULT_MAX_BYTES_TOTAL;
4302
4302
  const granted = this.grantedContextDialects();
4303
- const discovered = await chunkKTA7YTZQ_cjs.runDiscovery({
4303
+ const discovered = await chunkXKZFIP7Z_cjs.runDiscovery({
4304
4304
  cwd: this.cwd,
4305
4305
  maxBytesPerFile,
4306
4306
  skipLegacyTheokitContext: true,
@@ -4373,7 +4373,7 @@ async function loadContextConfig(cwd) {
4373
4373
  });
4374
4374
  if (mdEntities.length > 0) {
4375
4375
  if (fs.existsSync(jsonPath)) {
4376
- chunkOCEQ6DW2_cjs.warnOnce(
4376
+ chunkN6OEX5TN_cjs.warnOnce(
4377
4377
  "context-both-present",
4378
4378
  "[theokit-sdk] both .theokit/context/ and .theokit/context.json detected \u2014 using markdown; remove context.json"
4379
4379
  );
@@ -4383,7 +4383,7 @@ async function loadContextConfig(cwd) {
4383
4383
  };
4384
4384
  }
4385
4385
  if (!fs.existsSync(jsonPath)) return { sources: [] };
4386
- chunkOCEQ6DW2_cjs.warnOnce(
4386
+ chunkN6OEX5TN_cjs.warnOnce(
4387
4387
  "context-json-deprecated",
4388
4388
  // Names no command: `theokit-migrate-config` was unpublished with the `bin` entry, and a warning
4389
4389
  // that tells you to run something the package does not ship is worse than one that tells you
@@ -4546,13 +4546,13 @@ var PluginsManager = class {
4546
4546
  const jsonPath = path.join(pluginsRoot, folderName, "plugin.json");
4547
4547
  const metadata = fs.existsSync(mdPath) ? await loadPluginManifestFromMarkdown(this.cwd, pluginsRoot, folderName) : await loadPluginManifestFromJson(this.cwd, jsonPath, folderName);
4548
4548
  if (fs.existsSync(mdPath) && fs.existsSync(jsonPath)) {
4549
- chunkOCEQ6DW2_cjs.warnOnce(
4549
+ chunkN6OEX5TN_cjs.warnOnce(
4550
4550
  `plugin-${folderName}-both`,
4551
4551
  `[theokit-sdk] both ${folderName}/PLUGIN.md and ${folderName}/plugin.json detected \u2014 using markdown; remove plugin.json`
4552
4552
  );
4553
4553
  }
4554
4554
  if (!fs.existsSync(mdPath) && fs.existsSync(jsonPath)) {
4555
- chunkOCEQ6DW2_cjs.warnOnce(
4555
+ chunkN6OEX5TN_cjs.warnOnce(
4556
4556
  "plugin-json-deprecated",
4557
4557
  // Same reason as the context.json warning: the CLI it used to name is no longer published.
4558
4558
  "[theokit-sdk] plugin.json manifests are deprecated; replace each with a PLUGIN.md"
@@ -7447,7 +7447,7 @@ function applyPersonalityFilter(exposedTools, whitelist, opts) {
7447
7447
  if (exposedSet.has(name)) continue;
7448
7448
  const hint = suggestClosest(name, exposedSet);
7449
7449
  const message = hint !== void 0 ? `[theokit-sdk] personality "${opts?.personalityName ?? "?"}" references unknown tool "${name}"; did you mean "${hint}"?` : `[theokit-sdk] personality "${opts?.personalityName ?? "?"}" references unknown tool "${name}" (not exposed)`;
7450
- chunkOCEQ6DW2_cjs.warnOnce(
7450
+ chunkN6OEX5TN_cjs.warnOnce(
7451
7451
  `personality-tool-missing|${opts?.agentId ?? "?"}|${opts?.personalityName ?? "?"}|${name}`,
7452
7452
  message
7453
7453
  );
@@ -9224,7 +9224,7 @@ function addEntity(byName, entity, origin, collisionMap) {
9224
9224
  );
9225
9225
  }
9226
9226
  if (origin === "project" && collisionMap?.has(fm.name)) {
9227
- chunkOCEQ6DW2_cjs.warnOnce(
9227
+ chunkN6OEX5TN_cjs.warnOnce(
9228
9228
  `personality-collision-${fm.name}`,
9229
9229
  `[theokit-sdk] personality "${fm.name}" overridden by project preset`
9230
9230
  );
@@ -9274,14 +9274,14 @@ async function performPersonalitySwitch(args) {
9274
9274
 
9275
9275
  // src/internal/local-agent/local-agent-personality-extensions.ts
9276
9276
  function resolveActivePersonalityPreset(args) {
9277
- const forkCtx = chunkJ4SA2ZEJ_cjs.currentPersonalityContext();
9277
+ const forkCtx = chunkKIKKTW5O_cjs.currentPersonalityContext();
9278
9278
  const slug = forkCtx !== void 0 ? forkCtx.slug : args.personalityStore.active(args.agentId);
9279
9279
  if (slug === void 0) return void 0;
9280
9280
  return args.personalityRegistry?.get(slug);
9281
9281
  }
9282
9282
  async function ensurePersonalityRegistryIfNeeded(args) {
9283
9283
  if (args.personalityRegistry !== void 0) return args.personalityRegistry;
9284
- const forkSlug = chunkJ4SA2ZEJ_cjs.currentPersonalityContext()?.slug;
9284
+ const forkSlug = chunkKIKKTW5O_cjs.currentPersonalityContext()?.slug;
9285
9285
  const ownSlug = args.personalityStore.active(args.agentId);
9286
9286
  if (forkSlug === void 0 && ownSlug === void 0) return void 0;
9287
9287
  return await PersonalityRegistry.load(args.workspaceCwd);
@@ -9294,8 +9294,8 @@ function applyPersonalityOverlay(preset, base) {
9294
9294
  ${preset.systemPrompt}`;
9295
9295
  }
9296
9296
  async function localAgentUsePersonality(agent, name, opts) {
9297
- if (chunkJ4SA2ZEJ_cjs.currentPersonalityContext() !== void 0) {
9298
- chunkJ4SA2ZEJ_cjs.warnPersonalitySwitchInsideFork(agent.agentId);
9297
+ if (chunkKIKKTW5O_cjs.currentPersonalityContext() !== void 0) {
9298
+ chunkKIKKTW5O_cjs.warnPersonalitySwitchInsideFork(agent.agentId);
9299
9299
  return null;
9300
9300
  }
9301
9301
  if (agent.personalityRegistry === void 0) {
@@ -9356,7 +9356,7 @@ async function* localAgentStreamToCompletion(agent, message, options) {
9356
9356
  async function localAgentFork(parent, options) {
9357
9357
  const { forkAgentImpl } = await import('./fork-agent-WAEQI2DL.cjs');
9358
9358
  const { getAgentFacade } = await import('./agent-factory-registry-UU46BUMU.cjs');
9359
- const { withPersonalityContext } = await import('./context-ZOULM2RB.cjs');
9359
+ const { withPersonalityContext } = await import('./context-B5J4GX2F.cjs');
9360
9360
  const create = getAgentFacade().create;
9361
9361
  return withPersonalityContext(
9362
9362
  { slug: parent.personalitySlugSnapshot, isFork: true },
@@ -11256,5 +11256,5 @@ exports.managedSettingsPathFor = managedSettingsPathFor;
11256
11256
  exports.openRouterMemoryEmbeddingProviderAdapter = openRouterMemoryEmbeddingProviderAdapter;
11257
11257
  exports.readManagedSettings = readManagedSettings;
11258
11258
  exports.resolveSessionDir = resolveSessionDir;
11259
- //# sourceMappingURL=chunk-BM6PDJW3.cjs.map
11260
- //# sourceMappingURL=chunk-BM6PDJW3.cjs.map
11259
+ //# sourceMappingURL=chunk-56BCEM26.cjs.map
11260
+ //# sourceMappingURL=chunk-56BCEM26.cjs.map