@theokit/sdk 5.5.0 → 5.7.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/CHANGELOG.md +667 -0
- package/dist/{agent-CjMVbhhY.d.ts → agent-Bqzdhkqr.d.ts} +12 -3
- package/dist/{agent-DyB_lzrx.d.cts → agent-Dya5SmhY.d.cts} +12 -3
- package/dist/{agent-G3T7Q3SQ.js → agent-EQ5HKTWV.js} +15 -14
- package/dist/{agent-G3T7Q3SQ.js.map → agent-EQ5HKTWV.js.map} +1 -1
- package/dist/{agent-YWSIHHFM.cjs → agent-KA63WDQH.cjs} +16 -15
- package/dist/{agent-YWSIHHFM.cjs.map → agent-KA63WDQH.cjs.map} +1 -1
- package/dist/agent.d.ts +11 -0
- package/dist/{chunk-Z2JFX372.cjs → chunk-33A27NFX.cjs} +15 -15
- package/dist/{chunk-Z2JFX372.cjs.map → chunk-33A27NFX.cjs.map} +1 -1
- package/dist/{chunk-N6OOOYFZ.js → chunk-3VXQEQE4.js} +13 -4
- package/dist/chunk-3VXQEQE4.js.map +1 -0
- package/dist/{chunk-DZG77WU7.cjs → chunk-3XSWF5AP.cjs} +3 -3
- package/dist/{chunk-DZG77WU7.cjs.map → chunk-3XSWF5AP.cjs.map} +1 -1
- package/dist/{chunk-M3ZGRGOG.js → chunk-6JG2RFGK.js} +3 -3
- package/dist/{chunk-M3ZGRGOG.js.map → chunk-6JG2RFGK.js.map} +1 -1
- package/dist/{chunk-S6B5XYC3.js → chunk-7C3HWGCW.js} +33 -22
- package/dist/chunk-7C3HWGCW.js.map +1 -0
- package/dist/{chunk-LOHMT36V.cjs → chunk-7KBNBPFK.cjs} +75 -2
- package/dist/chunk-7KBNBPFK.cjs.map +1 -0
- package/dist/{chunk-UKJJRU7C.cjs → chunk-A575WPBL.cjs} +330 -129
- package/dist/chunk-A575WPBL.cjs.map +1 -0
- package/dist/{chunk-2XRAWOZZ.js → chunk-A6PDYH55.js} +74 -3
- package/dist/chunk-A6PDYH55.js.map +1 -0
- package/dist/{chunk-LX7SEXOQ.js → chunk-CA5VUAP3.js} +25 -7
- package/dist/chunk-CA5VUAP3.js.map +1 -0
- package/dist/{chunk-2QKV4CGK.js → chunk-CZWN4C6A.js} +3 -3
- package/dist/{chunk-2QKV4CGK.js.map → chunk-CZWN4C6A.js.map} +1 -1
- package/dist/chunk-DQNI52VV.js +20 -0
- package/dist/chunk-DQNI52VV.js.map +1 -0
- package/dist/{chunk-VPK6PHIE.cjs → chunk-E6QXZZKE.cjs} +8 -8
- package/dist/{chunk-VPK6PHIE.cjs.map → chunk-E6QXZZKE.cjs.map} +1 -1
- package/dist/{chunk-IU5N5224.cjs → chunk-EFETPSJZ.cjs} +17 -8
- package/dist/chunk-EFETPSJZ.cjs.map +1 -0
- package/dist/{chunk-2ZLQZHZC.cjs → chunk-ER5BOIYD.cjs} +4 -4
- package/dist/{chunk-2ZLQZHZC.cjs.map → chunk-ER5BOIYD.cjs.map} +1 -1
- package/dist/{chunk-ODBID5TG.js → chunk-FUUSIT2T.js} +234 -35
- package/dist/chunk-FUUSIT2T.js.map +1 -0
- package/dist/{chunk-VY6NKMOA.cjs → chunk-GK3UG7YQ.cjs} +34 -25
- package/dist/chunk-GK3UG7YQ.cjs.map +1 -0
- package/dist/{chunk-NQTNSHSB.cjs → chunk-HNAYCTX4.cjs} +5 -5
- package/dist/chunk-HNAYCTX4.cjs.map +1 -0
- package/dist/{chunk-QATRS7JD.cjs → chunk-MYJGWS2J.cjs} +26 -8
- package/dist/chunk-MYJGWS2J.cjs.map +1 -0
- package/dist/{chunk-KZSKIUXZ.js → chunk-N7VAE6DZ.js} +31 -3
- package/dist/chunk-N7VAE6DZ.js.map +1 -0
- package/dist/{chunk-7SZAV6QG.js → chunk-P5S3WCSZ.js} +3 -3
- package/dist/{chunk-7SZAV6QG.js.map → chunk-P5S3WCSZ.js.map} +1 -1
- package/dist/{chunk-HW7SEELD.cjs → chunk-QRVS2PRE.cjs} +31 -8
- package/dist/chunk-QRVS2PRE.cjs.map +1 -0
- package/dist/{chunk-SADXXGWU.js → chunk-R3LBRQAN.js} +3 -3
- package/dist/{chunk-NQTNSHSB.cjs.map → chunk-R3LBRQAN.js.map} +1 -1
- package/dist/{chunk-AYA65JA5.cjs → chunk-RWPLWMCZ.cjs} +25 -9
- package/dist/chunk-RWPLWMCZ.cjs.map +1 -0
- package/dist/{chunk-O7L7M42F.js → chunk-T3ZDEYTJ.js} +21 -5
- package/dist/chunk-T3ZDEYTJ.js.map +1 -0
- package/dist/{chunk-43YXGD3P.cjs → chunk-TY56BKSK.cjs} +8 -4
- package/dist/chunk-TY56BKSK.cjs.map +1 -0
- package/dist/chunk-UOLBAPDM.js +66 -0
- package/dist/chunk-UOLBAPDM.js.map +1 -0
- package/dist/{chunk-NSLHPAC7.js → chunk-X7EUUHXU.js} +6 -5
- package/dist/chunk-X7EUUHXU.js.map +1 -0
- package/dist/{chunk-WS5ULCL4.js → chunk-YRLI5DVC.js} +3 -3
- package/dist/{chunk-WS5ULCL4.js.map → chunk-YRLI5DVC.js.map} +1 -1
- package/dist/chunk-YYN6BB7R.cjs +24 -0
- package/dist/chunk-YYN6BB7R.cjs.map +1 -0
- package/dist/{chunk-C4ZQPWXJ.cjs → chunk-ZLMU5EU3.cjs} +33 -4
- package/dist/chunk-ZLMU5EU3.cjs.map +1 -0
- package/dist/{compact-session-7FMYJXQ7.cjs → compact-session-75KD2FCM.cjs} +15 -11
- package/dist/{compact-session-7FMYJXQ7.cjs.map → compact-session-75KD2FCM.cjs.map} +1 -1
- package/dist/{compact-session-YSEK7NQF.js → compact-session-QT6RJOKO.js} +3 -3
- package/dist/{compact-session-YSEK7NQF.js.map → compact-session-QT6RJOKO.js.map} +1 -1
- package/dist/context/index.cjs +11 -7
- package/dist/context/index.cjs.map +1 -1
- package/dist/context/index.js +7 -3
- package/dist/context/index.js.map +1 -1
- package/dist/context-7RP5JXGM.cjs +24 -0
- package/dist/{context-JTGSBJT6.cjs.map → context-7RP5JXGM.cjs.map} +1 -1
- package/dist/context-OJIIXJCV.js +7 -0
- package/dist/{context-3HPU754C.js.map → context-OJIIXJCV.js.map} +1 -1
- package/dist/{cron-Bgivg88c.d.cts → cron-BwxDUscv.d.cts} +1 -1
- package/dist/{cron-CNUa7PDo.d.ts → cron-D8uB1Xh5.d.ts} +1 -1
- package/dist/cron.cjs +15 -14
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +14 -13
- package/dist/eval.cjs +14 -13
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +13 -12
- package/dist/eval.js.map +1 -1
- package/dist/{index-manager-3UNPYH34.cjs → index-manager-W7RHSL6G.cjs} +6 -6
- package/dist/{index-manager-3UNPYH34.cjs.map → index-manager-W7RHSL6G.cjs.map} +1 -1
- package/dist/{index-manager-W7FDMGEG.js → index-manager-Z4XMRVWQ.js} +5 -5
- package/dist/{index-manager-W7FDMGEG.js.map → index-manager-Z4XMRVWQ.js.map} +1 -1
- package/dist/index.cjs +284 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +197 -5
- package/dist/index.d.ts +197 -5
- package/dist/index.js +249 -25
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-PC73TMP2.cjs → inject-session-L6MIIELT.cjs} +4 -4
- package/dist/{inject-session-PC73TMP2.cjs.map → inject-session-L6MIIELT.cjs.map} +1 -1
- package/dist/{inject-session-J4LBWAPH.js → inject-session-XWWN4DAA.js} +3 -3
- package/dist/{inject-session-J4LBWAPH.js.map → inject-session-XWWN4DAA.js.map} +1 -1
- package/dist/internal/memory/storage/index.cjs +32 -32
- package/dist/internal/memory/storage/index.js +3 -3
- package/dist/internal/memory/storage/memory-root.d.cts +27 -0
- package/dist/internal/memory/storage/memory-root.d.ts +27 -0
- package/dist/internal/persistence/index.cjs +4 -4
- package/dist/internal/persistence/index.js +1 -1
- package/dist/internal/runtime/compat/foreign-config-sources.d.ts +17 -4
- package/dist/internal/runtime/compat/managed-settings.d.ts +80 -0
- package/dist/internal/runtime/context/context-discovery-runner.d.ts +14 -0
- package/dist/internal/runtime/context/context-discovery.d.ts +64 -0
- package/dist/internal/runtime/context/context-manager.d.ts +21 -1
- package/dist/internal/runtime/context/yaml-frontmatter.d.ts +6 -3
- package/dist/internal/runtime/hooks/hooks-executor.d.ts +13 -1
- package/dist/internal/runtime/hooks/hooks-source.d.ts +36 -1
- package/dist/internal/runtime/skills/discover-skills.d.ts +4 -0
- package/dist/internal/session/compact-session.d.ts +36 -0
- package/dist/project.cjs +3 -3
- package/dist/project.js +1 -1
- package/dist/skills.cjs +5 -5
- package/dist/skills.js +2 -2
- package/dist/subagents-loader-CJFYQQU2.js +7 -0
- package/dist/{subagents-loader-AIVDQ2D5.js.map → subagents-loader-CJFYQQU2.js.map} +1 -1
- package/dist/subagents-loader-MOO7DC4E.cjs +16 -0
- package/dist/{subagents-loader-DN4LETGL.cjs.map → subagents-loader-MOO7DC4E.cjs.map} +1 -1
- package/dist/subagents-loader.cjs +4 -4
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/subagents-loader.js +3 -3
- package/dist/types/agent.d.ts +7 -2
- package/docs/error-codes.md +20 -18
- package/docs/harness-capability-map.md +9 -1
- package/package.json +1 -1
- package/dist/chunk-2XRAWOZZ.js.map +0 -1
- package/dist/chunk-43YXGD3P.cjs.map +0 -1
- package/dist/chunk-AYA65JA5.cjs.map +0 -1
- package/dist/chunk-C4ZQPWXJ.cjs.map +0 -1
- package/dist/chunk-HW7SEELD.cjs.map +0 -1
- package/dist/chunk-IU5N5224.cjs.map +0 -1
- package/dist/chunk-JNAA4G4H.js +0 -43
- package/dist/chunk-JNAA4G4H.js.map +0 -1
- package/dist/chunk-KZSKIUXZ.js.map +0 -1
- package/dist/chunk-LOHMT36V.cjs.map +0 -1
- package/dist/chunk-LX7SEXOQ.js.map +0 -1
- package/dist/chunk-N6OOOYFZ.js.map +0 -1
- package/dist/chunk-NSLHPAC7.js.map +0 -1
- package/dist/chunk-O7L7M42F.js.map +0 -1
- package/dist/chunk-ODBID5TG.js.map +0 -1
- package/dist/chunk-QATRS7JD.cjs.map +0 -1
- package/dist/chunk-S6B5XYC3.js.map +0 -1
- package/dist/chunk-SADXXGWU.js.map +0 -1
- package/dist/chunk-UKJJRU7C.cjs.map +0 -1
- package/dist/chunk-VY6NKMOA.cjs.map +0 -1
- package/dist/context-3HPU754C.js +0 -6
- package/dist/context-JTGSBJT6.cjs +0 -23
- package/dist/subagents-loader-AIVDQ2D5.js +0 -7
- package/dist/subagents-loader-DN4LETGL.cjs +0 -16
|
@@ -224,6 +224,10 @@ interface Skill$1 {
|
|
|
224
224
|
source: string;
|
|
225
225
|
category?: string;
|
|
226
226
|
dependencies?: string[];
|
|
227
|
+
/** `disable-model-invocation: true` — the model is never told this skill exists. */
|
|
228
|
+
disableModelInvocation?: boolean;
|
|
229
|
+
/** `user-invocable: false` — carried for a host that has a picker; this SDK has no such surface. */
|
|
230
|
+
userInvocable?: boolean;
|
|
227
231
|
}
|
|
228
232
|
|
|
229
233
|
/**
|
|
@@ -1042,7 +1046,7 @@ type SettingSource = "project" | "user" | "team" | "mdm" | "plugins" | "all";
|
|
|
1042
1046
|
*
|
|
1043
1047
|
* @public
|
|
1044
1048
|
*/
|
|
1045
|
-
type CompatSource = "claude-code" | "theokit" | CompatSourceAdapter;
|
|
1049
|
+
type CompatSource = "claude-code" | "theokit" | "agents" | "gemini" | "cursor" | CompatSourceAdapter;
|
|
1046
1050
|
/**
|
|
1047
1051
|
* A surface a foreign configuration source may be admitted to.
|
|
1048
1052
|
*
|
|
@@ -1051,9 +1055,14 @@ type CompatSource = "claude-code" | "theokit" | CompatSourceAdapter;
|
|
|
1051
1055
|
* Reusing the skills you already wrote for another product is a reasonable thing to want, and it is
|
|
1052
1056
|
* not a reason to hand that product's directory the right to run commands.
|
|
1053
1057
|
*
|
|
1058
|
+
* `context` is the foreign root's INSTRUCTIONS — `.claude/rules/*.md`. Same risk class as `skills`:
|
|
1059
|
+
* text a cloned repository wrote, entering the system prompt as if the consumer had written it. It
|
|
1060
|
+
* was missing until usetheokit/theokit-sdk#652, so the four surfaces above failed closed while this
|
|
1061
|
+
* one was admitted by a path that consulted no grant at all.
|
|
1062
|
+
*
|
|
1054
1063
|
* @public
|
|
1055
1064
|
*/
|
|
1056
|
-
type CompatSurface = "hooks" | "plugins" | "skills" | "subagents";
|
|
1065
|
+
type CompatSurface = "context" | "hooks" | "plugins" | "skills" | "subagents";
|
|
1057
1066
|
/**
|
|
1058
1067
|
* A foreign source admitted to named surfaces only.
|
|
1059
1068
|
*
|
|
@@ -1980,4 +1989,4 @@ interface ListResult<T> {
|
|
|
1980
1989
|
nextCursor?: string;
|
|
1981
1990
|
}
|
|
1982
1991
|
|
|
1983
|
-
export { type
|
|
1992
|
+
export { type SessionStore as $, type AgentOptions as A, type BudgetTracker as B, type CloudOptions as C, type CreateSkillSpec as D, type MemoryProviderAgentRef as E, type MemoryProviderFactory as F, type GetAgentOptions as G, type HookName as H, type InlineSkill as I, type MemoryProviderHandle as J, type MemoryProviderInitOptions as K, type LocalOptions as L, type MemorySettings as M, type PluginContext as N, type PluginHookDisposer as O, type Plugin as P, type PostAssistantReplyContext as Q, type PostToolCallContext as R, type SystemPromptResolver as S, type PreToolCallContext as T, type PreUserSendContext as U, type PreUserSendResult as V, type ProviderTransform as W, type ProviderTransformContext as X, type RecordSessionSummaryArgs as Y, type SessionLifecycleContext as Z, type SessionRecord as _, type AgentDefinition as a, type SettingSource as a0, Skill as a1, type SkillsResolver as a2, type SkillsResolverContext as a3, type SystemPromptContext as a4, type SystemPromptMemoryFact as a5, type TelemetrySettings as a6, type ToolCallSummary as a7, type ToolResultTransformContext as a8, type TransformContext as a9, type SkillsSettings as b, type ListAgentsOptions as c, type ListResult as d, type SDKAgentInfo as e, type ListRunsOptions as f, type GetRunOptions as g, type AgentOperationOptions as h, type AgentDescription as i, type ProviderProfile as j, type Skill$1 as k, type MemoryProvider as l, type PreToolCallDecision as m, type ActiveMemoryPassArgs as n, type ActiveMemoryPassResult as o, type AgentSubagentDescription as p, type AgentToolDescription as q, type BudgetCheck as r, type BudgetTotal as s, type BudgetUsageEvent as t, type BuiltinToolName as u, type CloudEnv as v, type CloudRepo as w, type CompatSource as x, type CompatSourceAdapter as y, type CompatSurface as z };
|
|
@@ -224,6 +224,10 @@ interface Skill$1 {
|
|
|
224
224
|
source: string;
|
|
225
225
|
category?: string;
|
|
226
226
|
dependencies?: string[];
|
|
227
|
+
/** `disable-model-invocation: true` — the model is never told this skill exists. */
|
|
228
|
+
disableModelInvocation?: boolean;
|
|
229
|
+
/** `user-invocable: false` — carried for a host that has a picker; this SDK has no such surface. */
|
|
230
|
+
userInvocable?: boolean;
|
|
227
231
|
}
|
|
228
232
|
|
|
229
233
|
/**
|
|
@@ -1042,7 +1046,7 @@ type SettingSource = "project" | "user" | "team" | "mdm" | "plugins" | "all";
|
|
|
1042
1046
|
*
|
|
1043
1047
|
* @public
|
|
1044
1048
|
*/
|
|
1045
|
-
type CompatSource = "claude-code" | "theokit" | CompatSourceAdapter;
|
|
1049
|
+
type CompatSource = "claude-code" | "theokit" | "agents" | "gemini" | "cursor" | CompatSourceAdapter;
|
|
1046
1050
|
/**
|
|
1047
1051
|
* A surface a foreign configuration source may be admitted to.
|
|
1048
1052
|
*
|
|
@@ -1051,9 +1055,14 @@ type CompatSource = "claude-code" | "theokit" | CompatSourceAdapter;
|
|
|
1051
1055
|
* Reusing the skills you already wrote for another product is a reasonable thing to want, and it is
|
|
1052
1056
|
* not a reason to hand that product's directory the right to run commands.
|
|
1053
1057
|
*
|
|
1058
|
+
* `context` is the foreign root's INSTRUCTIONS — `.claude/rules/*.md`. Same risk class as `skills`:
|
|
1059
|
+
* text a cloned repository wrote, entering the system prompt as if the consumer had written it. It
|
|
1060
|
+
* was missing until usetheokit/theokit-sdk#652, so the four surfaces above failed closed while this
|
|
1061
|
+
* one was admitted by a path that consulted no grant at all.
|
|
1062
|
+
*
|
|
1054
1063
|
* @public
|
|
1055
1064
|
*/
|
|
1056
|
-
type CompatSurface = "hooks" | "plugins" | "skills" | "subagents";
|
|
1065
|
+
type CompatSurface = "context" | "hooks" | "plugins" | "skills" | "subagents";
|
|
1057
1066
|
/**
|
|
1058
1067
|
* A foreign source admitted to named surfaces only.
|
|
1059
1068
|
*
|
|
@@ -1980,4 +1989,4 @@ interface ListResult<T> {
|
|
|
1980
1989
|
nextCursor?: string;
|
|
1981
1990
|
}
|
|
1982
1991
|
|
|
1983
|
-
export { type
|
|
1992
|
+
export { type SessionStore as $, type AgentOptions as A, type BudgetTracker as B, type CloudOptions as C, type CreateSkillSpec as D, type MemoryProviderAgentRef as E, type MemoryProviderFactory as F, type GetAgentOptions as G, type HookName as H, type InlineSkill as I, type MemoryProviderHandle as J, type MemoryProviderInitOptions as K, type LocalOptions as L, type MemorySettings as M, type PluginContext as N, type PluginHookDisposer as O, type Plugin as P, type PostAssistantReplyContext as Q, type PostToolCallContext as R, type SystemPromptResolver as S, type PreToolCallContext as T, type PreUserSendContext as U, type PreUserSendResult as V, type ProviderTransform as W, type ProviderTransformContext as X, type RecordSessionSummaryArgs as Y, type SessionLifecycleContext as Z, type SessionRecord as _, type AgentDefinition as a, type SettingSource as a0, Skill as a1, type SkillsResolver as a2, type SkillsResolverContext as a3, type SystemPromptContext as a4, type SystemPromptMemoryFact as a5, type TelemetrySettings as a6, type ToolCallSummary as a7, type ToolResultTransformContext as a8, type TransformContext as a9, type SkillsSettings as b, type ListAgentsOptions as c, type ListResult as d, type SDKAgentInfo as e, type ListRunsOptions as f, type GetRunOptions as g, type AgentOperationOptions as h, type AgentDescription as i, type ProviderProfile as j, type Skill$1 as k, type MemoryProvider as l, type PreToolCallDecision as m, type ActiveMemoryPassArgs as n, type ActiveMemoryPassResult as o, type AgentSubagentDescription as p, type AgentToolDescription as q, type BudgetCheck as r, type BudgetTotal as s, type BudgetUsageEvent as t, type BuiltinToolName as u, type CloudEnv as v, type CloudRepo as w, type CompatSource as x, type CompatSourceAdapter as y, type CompatSurface as z };
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
export { Agent } from './chunk-
|
|
1
|
+
export { Agent } from './chunk-FUUSIT2T.js';
|
|
2
2
|
import './chunk-K2VMFZQ5.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-CZWN4C6A.js';
|
|
4
4
|
import './chunk-K2BQQ445.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-P5S3WCSZ.js';
|
|
6
|
+
import './chunk-DQNI52VV.js';
|
|
7
7
|
import './chunk-2SFBB54R.js';
|
|
8
8
|
import './chunk-55GB6JYQ.js';
|
|
9
9
|
import './chunk-H73MEMQB.js';
|
|
10
10
|
import './chunk-OR6XIWLB.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-R3LBRQAN.js';
|
|
12
12
|
import './chunk-AAEZSPTC.js';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-N7VAE6DZ.js';
|
|
14
14
|
import './chunk-UBR5PWD7.js';
|
|
15
15
|
import './chunk-2XC6KDJM.js';
|
|
16
16
|
import './chunk-XB4GI5RZ.js';
|
|
17
17
|
import './chunk-24MGQDK3.js';
|
|
18
18
|
import './chunk-2WXHA33T.js';
|
|
19
19
|
import './chunk-HKCKOAIO.js';
|
|
20
|
-
import './chunk-
|
|
20
|
+
import './chunk-3VXQEQE4.js';
|
|
21
|
+
import './chunk-7C3HWGCW.js';
|
|
21
22
|
import './chunk-KVNWIAO4.js';
|
|
22
23
|
import './chunk-SVQIW5RJ.js';
|
|
23
24
|
import './chunk-FD2UT76F.js';
|
|
@@ -26,8 +27,8 @@ import './chunk-FJWQP6EE.js';
|
|
|
26
27
|
import './chunk-NAF4L3T6.js';
|
|
27
28
|
import './chunk-CFE6QF2Q.js';
|
|
28
29
|
import './chunk-6X6ID4MO.js';
|
|
29
|
-
import './chunk-
|
|
30
|
-
import './chunk-
|
|
30
|
+
import './chunk-CA5VUAP3.js';
|
|
31
|
+
import './chunk-A6PDYH55.js';
|
|
31
32
|
import './chunk-SAGRF4IB.js';
|
|
32
33
|
import './chunk-EH6XD3FY.js';
|
|
33
34
|
import './chunk-UKMBRMGT.js';
|
|
@@ -41,9 +42,9 @@ import './chunk-TA3K7SBK.js';
|
|
|
41
42
|
import './chunk-Q5EWJPRY.js';
|
|
42
43
|
import './chunk-EIQFAOFD.js';
|
|
43
44
|
import './chunk-3JHIFQ4I.js';
|
|
44
|
-
import './chunk-
|
|
45
|
-
import './chunk-
|
|
46
|
-
import './chunk-
|
|
45
|
+
import './chunk-T3ZDEYTJ.js';
|
|
46
|
+
import './chunk-X7EUUHXU.js';
|
|
47
|
+
import './chunk-UOLBAPDM.js';
|
|
47
48
|
import './chunk-6M2OIS4Y.js';
|
|
48
49
|
import './chunk-R7WIIPUR.js';
|
|
49
50
|
import './chunk-XYFGKVZ7.js';
|
|
@@ -54,5 +55,5 @@ import './chunk-V22DZIXO.js';
|
|
|
54
55
|
import './chunk-NJWYQWDL.js';
|
|
55
56
|
import './chunk-ALUN2B4W.js';
|
|
56
57
|
import './chunk-CZJ6Q7CW.js';
|
|
57
|
-
//# sourceMappingURL=agent-
|
|
58
|
-
//# sourceMappingURL=agent-
|
|
58
|
+
//# sourceMappingURL=agent-EQ5HKTWV.js.map
|
|
59
|
+
//# sourceMappingURL=agent-EQ5HKTWV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-EQ5HKTWV.js"}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkA575WPBL_cjs = require('./chunk-A575WPBL.cjs');
|
|
4
4
|
require('./chunk-KVSAY6NZ.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-3XSWF5AP.cjs');
|
|
6
6
|
require('./chunk-BUUUWQMB.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-33A27NFX.cjs');
|
|
8
|
+
require('./chunk-YYN6BB7R.cjs');
|
|
9
9
|
require('./chunk-BV2MWEMV.cjs');
|
|
10
10
|
require('./chunk-D6POWE7E.cjs');
|
|
11
11
|
require('./chunk-GHX4P3V2.cjs');
|
|
12
12
|
require('./chunk-TMKTSYDS.cjs');
|
|
13
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-HNAYCTX4.cjs');
|
|
14
14
|
require('./chunk-7FDKWDA2.cjs');
|
|
15
|
-
require('./chunk-
|
|
15
|
+
require('./chunk-ZLMU5EU3.cjs');
|
|
16
16
|
require('./chunk-FUSDYC2B.cjs');
|
|
17
17
|
require('./chunk-YJNYDJ2T.cjs');
|
|
18
18
|
require('./chunk-24SYBZPL.cjs');
|
|
19
19
|
require('./chunk-QOGNZMHD.cjs');
|
|
20
20
|
require('./chunk-YIFFF23U.cjs');
|
|
21
21
|
require('./chunk-2ZPEDVLM.cjs');
|
|
22
|
-
require('./chunk-
|
|
22
|
+
require('./chunk-EFETPSJZ.cjs');
|
|
23
|
+
require('./chunk-GK3UG7YQ.cjs');
|
|
23
24
|
require('./chunk-KRD3GQAA.cjs');
|
|
24
25
|
require('./chunk-RQMCOFAI.cjs');
|
|
25
26
|
require('./chunk-MUUQ2WFJ.cjs');
|
|
@@ -28,8 +29,8 @@ require('./chunk-YSTXFWQE.cjs');
|
|
|
28
29
|
require('./chunk-FRITRLZQ.cjs');
|
|
29
30
|
require('./chunk-NQTD6QOW.cjs');
|
|
30
31
|
require('./chunk-NINIJCHU.cjs');
|
|
31
|
-
require('./chunk-
|
|
32
|
-
require('./chunk-
|
|
32
|
+
require('./chunk-MYJGWS2J.cjs');
|
|
33
|
+
require('./chunk-7KBNBPFK.cjs');
|
|
33
34
|
require('./chunk-IJ7M6GOG.cjs');
|
|
34
35
|
require('./chunk-7A6535RA.cjs');
|
|
35
36
|
require('./chunk-SA6K24NB.cjs');
|
|
@@ -43,9 +44,9 @@ require('./chunk-BJUJT5ED.cjs');
|
|
|
43
44
|
require('./chunk-ZF2LDKQQ.cjs');
|
|
44
45
|
require('./chunk-HCT4HPCL.cjs');
|
|
45
46
|
require('./chunk-JLRLCBJ4.cjs');
|
|
46
|
-
require('./chunk-
|
|
47
|
-
require('./chunk-
|
|
48
|
-
require('./chunk-
|
|
47
|
+
require('./chunk-RWPLWMCZ.cjs');
|
|
48
|
+
require('./chunk-TY56BKSK.cjs');
|
|
49
|
+
require('./chunk-QRVS2PRE.cjs');
|
|
49
50
|
require('./chunk-ATT276RD.cjs');
|
|
50
51
|
require('./chunk-3EE6LVWT.cjs');
|
|
51
52
|
require('./chunk-ANMJJD6D.cjs');
|
|
@@ -61,7 +62,7 @@ require('./chunk-6LHQPOMI.cjs');
|
|
|
61
62
|
|
|
62
63
|
Object.defineProperty(exports, "Agent", {
|
|
63
64
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkA575WPBL_cjs.Agent; }
|
|
65
66
|
});
|
|
66
|
-
//# sourceMappingURL=agent-
|
|
67
|
-
//# sourceMappingURL=agent-
|
|
67
|
+
//# sourceMappingURL=agent-KA63WDQH.cjs.map
|
|
68
|
+
//# sourceMappingURL=agent-KA63WDQH.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"agent-KA63WDQH.cjs"}
|
package/dist/agent.d.ts
CHANGED
|
@@ -219,6 +219,17 @@ export declare class Agent {
|
|
|
219
219
|
static compact(agentId: string, options?: {
|
|
220
220
|
trigger?: "manual" | "auto";
|
|
221
221
|
summarize?: (messages: readonly import("./compaction.js").CompressibleMessage[]) => Promise<string>;
|
|
222
|
+
/**
|
|
223
|
+
* B-082 — work to run before the transcript is rewritten, on THIS path.
|
|
224
|
+
*
|
|
225
|
+
* `/compact` reaches here, and before this option the seam existed only on the agents-layer
|
|
226
|
+
* strategy, which this path never touches. The handler is awaited, bounded, and its failure is
|
|
227
|
+
* reported without stopping compaction — the same contract `withPreCompaction` carries, not a
|
|
228
|
+
* second one.
|
|
229
|
+
*/
|
|
230
|
+
onPreCompact?: import("./internal/session/compact-session.js").PreCompactHandler;
|
|
231
|
+
onPreCompactError?: (error: unknown) => void;
|
|
232
|
+
preCompactTimeoutMs?: number;
|
|
222
233
|
}): Promise<import("./internal/session/compact-session.js").CompactResult>;
|
|
223
234
|
/**
|
|
224
235
|
* M51 — inject a SYNTHETIC user+assistant pair into a LOCAL session's persisted transcript WITHOUT
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkGHX4P3V2_cjs = require('./chunk-GHX4P3V2.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkHNAYCTX4_cjs = require('./chunk-HNAYCTX4.cjs');
|
|
5
5
|
var chunkA4RAL2ER_cjs = require('./chunk-A4RAL2ER.cjs');
|
|
6
6
|
var chunkJ7J7J2GN_cjs = require('./chunk-J7J7J2GN.cjs');
|
|
7
7
|
var chunk6LHQPOMI_cjs = require('./chunk-6LHQPOMI.cjs');
|
|
@@ -86,13 +86,13 @@ function findWordBoundarySplit(text, maxChars) {
|
|
|
86
86
|
|
|
87
87
|
// src/internal/memory/corpus-sync.ts
|
|
88
88
|
async function syncCorpus(repo, memoryRoot) {
|
|
89
|
-
const files = await
|
|
89
|
+
const files = await chunkHNAYCTX4_cjs.collectMarkdownFiles(memoryRoot);
|
|
90
90
|
const existingByPath = repo.filesByPath();
|
|
91
91
|
let filesUpdated = 0;
|
|
92
92
|
let chunksWritten = 0;
|
|
93
93
|
for (const entry of files) {
|
|
94
94
|
const raw = await promises.readFile(entry.absolutePath, "utf8");
|
|
95
|
-
const hash =
|
|
95
|
+
const hash = chunkHNAYCTX4_cjs.sha256(raw);
|
|
96
96
|
if (existingByPath.get(entry.absolutePath)?.hash === hash) continue;
|
|
97
97
|
const stats = await promises.stat(entry.absolutePath);
|
|
98
98
|
const fileId = repo.upsertFile({
|
|
@@ -156,7 +156,7 @@ var LanceMemoryAdapter = class {
|
|
|
156
156
|
limit: maxResults * 2,
|
|
157
157
|
...options.sources !== void 0 ? { sources: options.sources } : {}
|
|
158
158
|
});
|
|
159
|
-
return lanceHits.filter((h) => h.score >= minScore).slice(0, maxResults).map((h) => translateLanceHit(h, query,
|
|
159
|
+
return lanceHits.filter((h) => h.score >= minScore).slice(0, maxResults).map((h) => translateLanceHit(h, query, chunkHNAYCTX4_cjs.resolveWeights(options)));
|
|
160
160
|
}
|
|
161
161
|
status() {
|
|
162
162
|
return {
|
|
@@ -211,7 +211,7 @@ async function openLanceIndex(opts) {
|
|
|
211
211
|
{ code: "lance_requires_embedding" }
|
|
212
212
|
);
|
|
213
213
|
}
|
|
214
|
-
const lance = await
|
|
214
|
+
const lance = await chunkHNAYCTX4_cjs.LanceIndex.open({
|
|
215
215
|
cwd: opts.cwd,
|
|
216
216
|
embedding: opts.embedding,
|
|
217
217
|
...opts.filePath !== void 0 ? { storagePath: opts.filePath } : {}
|
|
@@ -414,9 +414,9 @@ var IndexManager = class _IndexManager {
|
|
|
414
414
|
}
|
|
415
415
|
/** Internal SQLite-path open. Renamed from previous public `open`. */
|
|
416
416
|
static async openSqliteInternal(opts) {
|
|
417
|
-
const memoryRoot = opts.memoryRoot ??
|
|
418
|
-
const filePath = opts.filePath ??
|
|
419
|
-
const db = await
|
|
417
|
+
const memoryRoot = opts.memoryRoot ?? chunkHNAYCTX4_cjs.resolveMemoryRoot(opts.cwd);
|
|
418
|
+
const filePath = opts.filePath ?? chunkHNAYCTX4_cjs.defaultIndexPath(chunkHNAYCTX4_cjs.memoryIndexRoot(opts.cwd, memoryRoot));
|
|
419
|
+
const db = await chunkHNAYCTX4_cjs.openMemoryDb({ filePath });
|
|
420
420
|
const manager = new _IndexManager(memoryRoot, db, opts.embedding);
|
|
421
421
|
if (opts.embedding !== void 0) await manager.initVectorBackend(opts.embedding);
|
|
422
422
|
return manager;
|
|
@@ -497,7 +497,7 @@ var IndexManager = class _IndexManager {
|
|
|
497
497
|
endLine,
|
|
498
498
|
score: textScore,
|
|
499
499
|
textScore,
|
|
500
|
-
snippet:
|
|
500
|
+
snippet: chunkHNAYCTX4_cjs.truncateSnippet(String(row.text ?? "")),
|
|
501
501
|
source: String(row.source),
|
|
502
502
|
citation: `${path}:${startLine}-${endLine}`,
|
|
503
503
|
// sneak the chunk id through for the hybrid join below
|
|
@@ -525,7 +525,7 @@ var IndexManager = class _IndexManager {
|
|
|
525
525
|
score: 0.5,
|
|
526
526
|
// LIKE has no relevance score — use a neutral midpoint
|
|
527
527
|
textScore: 0.5,
|
|
528
|
-
snippet:
|
|
528
|
+
snippet: chunkHNAYCTX4_cjs.truncateSnippet(String(row.text ?? "")),
|
|
529
529
|
source: String(row.source),
|
|
530
530
|
citation: `${path}:${startLine}-${endLine}`,
|
|
531
531
|
chunkId: Number(row.id)
|
|
@@ -548,10 +548,10 @@ var IndexManager = class _IndexManager {
|
|
|
548
548
|
return out;
|
|
549
549
|
}
|
|
550
550
|
combineHybridScores(textHits, vectorHitsById, options) {
|
|
551
|
-
const weights =
|
|
551
|
+
const weights = chunkHNAYCTX4_cjs.resolveWeights(options);
|
|
552
552
|
const merged = this.mergeHits(textHits, vectorHitsById);
|
|
553
553
|
const combined = [...merged.values()].map(
|
|
554
|
-
(hit) =>
|
|
554
|
+
(hit) => chunkHNAYCTX4_cjs.blendScores(hit, vectorHitsById.get(hit.chunkId)?.vectorScore ?? 0, weights)
|
|
555
555
|
);
|
|
556
556
|
return combined.sort((a, b) => b.score - a.score);
|
|
557
557
|
}
|
|
@@ -579,7 +579,7 @@ var IndexManager = class _IndexManager {
|
|
|
579
579
|
endLine,
|
|
580
580
|
score: 0,
|
|
581
581
|
textScore: 0,
|
|
582
|
-
snippet:
|
|
582
|
+
snippet: chunkHNAYCTX4_cjs.truncateSnippet(String(row.text ?? "")),
|
|
583
583
|
source: String(row.source),
|
|
584
584
|
citation: `${path}:${startLine}-${endLine}`
|
|
585
585
|
};
|
|
@@ -591,5 +591,5 @@ var IndexManager = class _IndexManager {
|
|
|
591
591
|
};
|
|
592
592
|
|
|
593
593
|
exports.IndexManager = IndexManager;
|
|
594
|
-
//# sourceMappingURL=chunk-
|
|
595
|
-
//# sourceMappingURL=chunk-
|
|
594
|
+
//# sourceMappingURL=chunk-33A27NFX.cjs.map
|
|
595
|
+
//# sourceMappingURL=chunk-33A27NFX.cjs.map
|