@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.
Files changed (160) hide show
  1. package/CHANGELOG.md +667 -0
  2. package/dist/{agent-CjMVbhhY.d.ts → agent-Bqzdhkqr.d.ts} +12 -3
  3. package/dist/{agent-DyB_lzrx.d.cts → agent-Dya5SmhY.d.cts} +12 -3
  4. package/dist/{agent-G3T7Q3SQ.js → agent-EQ5HKTWV.js} +15 -14
  5. package/dist/{agent-G3T7Q3SQ.js.map → agent-EQ5HKTWV.js.map} +1 -1
  6. package/dist/{agent-YWSIHHFM.cjs → agent-KA63WDQH.cjs} +16 -15
  7. package/dist/{agent-YWSIHHFM.cjs.map → agent-KA63WDQH.cjs.map} +1 -1
  8. package/dist/agent.d.ts +11 -0
  9. package/dist/{chunk-Z2JFX372.cjs → chunk-33A27NFX.cjs} +15 -15
  10. package/dist/{chunk-Z2JFX372.cjs.map → chunk-33A27NFX.cjs.map} +1 -1
  11. package/dist/{chunk-N6OOOYFZ.js → chunk-3VXQEQE4.js} +13 -4
  12. package/dist/chunk-3VXQEQE4.js.map +1 -0
  13. package/dist/{chunk-DZG77WU7.cjs → chunk-3XSWF5AP.cjs} +3 -3
  14. package/dist/{chunk-DZG77WU7.cjs.map → chunk-3XSWF5AP.cjs.map} +1 -1
  15. package/dist/{chunk-M3ZGRGOG.js → chunk-6JG2RFGK.js} +3 -3
  16. package/dist/{chunk-M3ZGRGOG.js.map → chunk-6JG2RFGK.js.map} +1 -1
  17. package/dist/{chunk-S6B5XYC3.js → chunk-7C3HWGCW.js} +33 -22
  18. package/dist/chunk-7C3HWGCW.js.map +1 -0
  19. package/dist/{chunk-LOHMT36V.cjs → chunk-7KBNBPFK.cjs} +75 -2
  20. package/dist/chunk-7KBNBPFK.cjs.map +1 -0
  21. package/dist/{chunk-UKJJRU7C.cjs → chunk-A575WPBL.cjs} +330 -129
  22. package/dist/chunk-A575WPBL.cjs.map +1 -0
  23. package/dist/{chunk-2XRAWOZZ.js → chunk-A6PDYH55.js} +74 -3
  24. package/dist/chunk-A6PDYH55.js.map +1 -0
  25. package/dist/{chunk-LX7SEXOQ.js → chunk-CA5VUAP3.js} +25 -7
  26. package/dist/chunk-CA5VUAP3.js.map +1 -0
  27. package/dist/{chunk-2QKV4CGK.js → chunk-CZWN4C6A.js} +3 -3
  28. package/dist/{chunk-2QKV4CGK.js.map → chunk-CZWN4C6A.js.map} +1 -1
  29. package/dist/chunk-DQNI52VV.js +20 -0
  30. package/dist/chunk-DQNI52VV.js.map +1 -0
  31. package/dist/{chunk-VPK6PHIE.cjs → chunk-E6QXZZKE.cjs} +8 -8
  32. package/dist/{chunk-VPK6PHIE.cjs.map → chunk-E6QXZZKE.cjs.map} +1 -1
  33. package/dist/{chunk-IU5N5224.cjs → chunk-EFETPSJZ.cjs} +17 -8
  34. package/dist/chunk-EFETPSJZ.cjs.map +1 -0
  35. package/dist/{chunk-2ZLQZHZC.cjs → chunk-ER5BOIYD.cjs} +4 -4
  36. package/dist/{chunk-2ZLQZHZC.cjs.map → chunk-ER5BOIYD.cjs.map} +1 -1
  37. package/dist/{chunk-ODBID5TG.js → chunk-FUUSIT2T.js} +234 -35
  38. package/dist/chunk-FUUSIT2T.js.map +1 -0
  39. package/dist/{chunk-VY6NKMOA.cjs → chunk-GK3UG7YQ.cjs} +34 -25
  40. package/dist/chunk-GK3UG7YQ.cjs.map +1 -0
  41. package/dist/{chunk-NQTNSHSB.cjs → chunk-HNAYCTX4.cjs} +5 -5
  42. package/dist/chunk-HNAYCTX4.cjs.map +1 -0
  43. package/dist/{chunk-QATRS7JD.cjs → chunk-MYJGWS2J.cjs} +26 -8
  44. package/dist/chunk-MYJGWS2J.cjs.map +1 -0
  45. package/dist/{chunk-KZSKIUXZ.js → chunk-N7VAE6DZ.js} +31 -3
  46. package/dist/chunk-N7VAE6DZ.js.map +1 -0
  47. package/dist/{chunk-7SZAV6QG.js → chunk-P5S3WCSZ.js} +3 -3
  48. package/dist/{chunk-7SZAV6QG.js.map → chunk-P5S3WCSZ.js.map} +1 -1
  49. package/dist/{chunk-HW7SEELD.cjs → chunk-QRVS2PRE.cjs} +31 -8
  50. package/dist/chunk-QRVS2PRE.cjs.map +1 -0
  51. package/dist/{chunk-SADXXGWU.js → chunk-R3LBRQAN.js} +3 -3
  52. package/dist/{chunk-NQTNSHSB.cjs.map → chunk-R3LBRQAN.js.map} +1 -1
  53. package/dist/{chunk-AYA65JA5.cjs → chunk-RWPLWMCZ.cjs} +25 -9
  54. package/dist/chunk-RWPLWMCZ.cjs.map +1 -0
  55. package/dist/{chunk-O7L7M42F.js → chunk-T3ZDEYTJ.js} +21 -5
  56. package/dist/chunk-T3ZDEYTJ.js.map +1 -0
  57. package/dist/{chunk-43YXGD3P.cjs → chunk-TY56BKSK.cjs} +8 -4
  58. package/dist/chunk-TY56BKSK.cjs.map +1 -0
  59. package/dist/chunk-UOLBAPDM.js +66 -0
  60. package/dist/chunk-UOLBAPDM.js.map +1 -0
  61. package/dist/{chunk-NSLHPAC7.js → chunk-X7EUUHXU.js} +6 -5
  62. package/dist/chunk-X7EUUHXU.js.map +1 -0
  63. package/dist/{chunk-WS5ULCL4.js → chunk-YRLI5DVC.js} +3 -3
  64. package/dist/{chunk-WS5ULCL4.js.map → chunk-YRLI5DVC.js.map} +1 -1
  65. package/dist/chunk-YYN6BB7R.cjs +24 -0
  66. package/dist/chunk-YYN6BB7R.cjs.map +1 -0
  67. package/dist/{chunk-C4ZQPWXJ.cjs → chunk-ZLMU5EU3.cjs} +33 -4
  68. package/dist/chunk-ZLMU5EU3.cjs.map +1 -0
  69. package/dist/{compact-session-7FMYJXQ7.cjs → compact-session-75KD2FCM.cjs} +15 -11
  70. package/dist/{compact-session-7FMYJXQ7.cjs.map → compact-session-75KD2FCM.cjs.map} +1 -1
  71. package/dist/{compact-session-YSEK7NQF.js → compact-session-QT6RJOKO.js} +3 -3
  72. package/dist/{compact-session-YSEK7NQF.js.map → compact-session-QT6RJOKO.js.map} +1 -1
  73. package/dist/context/index.cjs +11 -7
  74. package/dist/context/index.cjs.map +1 -1
  75. package/dist/context/index.js +7 -3
  76. package/dist/context/index.js.map +1 -1
  77. package/dist/context-7RP5JXGM.cjs +24 -0
  78. package/dist/{context-JTGSBJT6.cjs.map → context-7RP5JXGM.cjs.map} +1 -1
  79. package/dist/context-OJIIXJCV.js +7 -0
  80. package/dist/{context-3HPU754C.js.map → context-OJIIXJCV.js.map} +1 -1
  81. package/dist/{cron-Bgivg88c.d.cts → cron-BwxDUscv.d.cts} +1 -1
  82. package/dist/{cron-CNUa7PDo.d.ts → cron-D8uB1Xh5.d.ts} +1 -1
  83. package/dist/cron.cjs +15 -14
  84. package/dist/cron.d.cts +2 -2
  85. package/dist/cron.d.ts +2 -2
  86. package/dist/cron.js +14 -13
  87. package/dist/eval.cjs +14 -13
  88. package/dist/eval.cjs.map +1 -1
  89. package/dist/eval.js +13 -12
  90. package/dist/eval.js.map +1 -1
  91. package/dist/{index-manager-3UNPYH34.cjs → index-manager-W7RHSL6G.cjs} +6 -6
  92. package/dist/{index-manager-3UNPYH34.cjs.map → index-manager-W7RHSL6G.cjs.map} +1 -1
  93. package/dist/{index-manager-W7FDMGEG.js → index-manager-Z4XMRVWQ.js} +5 -5
  94. package/dist/{index-manager-W7FDMGEG.js.map → index-manager-Z4XMRVWQ.js.map} +1 -1
  95. package/dist/index.cjs +284 -49
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +197 -5
  98. package/dist/index.d.ts +197 -5
  99. package/dist/index.js +249 -25
  100. package/dist/index.js.map +1 -1
  101. package/dist/{inject-session-PC73TMP2.cjs → inject-session-L6MIIELT.cjs} +4 -4
  102. package/dist/{inject-session-PC73TMP2.cjs.map → inject-session-L6MIIELT.cjs.map} +1 -1
  103. package/dist/{inject-session-J4LBWAPH.js → inject-session-XWWN4DAA.js} +3 -3
  104. package/dist/{inject-session-J4LBWAPH.js.map → inject-session-XWWN4DAA.js.map} +1 -1
  105. package/dist/internal/memory/storage/index.cjs +32 -32
  106. package/dist/internal/memory/storage/index.js +3 -3
  107. package/dist/internal/memory/storage/memory-root.d.cts +27 -0
  108. package/dist/internal/memory/storage/memory-root.d.ts +27 -0
  109. package/dist/internal/persistence/index.cjs +4 -4
  110. package/dist/internal/persistence/index.js +1 -1
  111. package/dist/internal/runtime/compat/foreign-config-sources.d.ts +17 -4
  112. package/dist/internal/runtime/compat/managed-settings.d.ts +80 -0
  113. package/dist/internal/runtime/context/context-discovery-runner.d.ts +14 -0
  114. package/dist/internal/runtime/context/context-discovery.d.ts +64 -0
  115. package/dist/internal/runtime/context/context-manager.d.ts +21 -1
  116. package/dist/internal/runtime/context/yaml-frontmatter.d.ts +6 -3
  117. package/dist/internal/runtime/hooks/hooks-executor.d.ts +13 -1
  118. package/dist/internal/runtime/hooks/hooks-source.d.ts +36 -1
  119. package/dist/internal/runtime/skills/discover-skills.d.ts +4 -0
  120. package/dist/internal/session/compact-session.d.ts +36 -0
  121. package/dist/project.cjs +3 -3
  122. package/dist/project.js +1 -1
  123. package/dist/skills.cjs +5 -5
  124. package/dist/skills.js +2 -2
  125. package/dist/subagents-loader-CJFYQQU2.js +7 -0
  126. package/dist/{subagents-loader-AIVDQ2D5.js.map → subagents-loader-CJFYQQU2.js.map} +1 -1
  127. package/dist/subagents-loader-MOO7DC4E.cjs +16 -0
  128. package/dist/{subagents-loader-DN4LETGL.cjs.map → subagents-loader-MOO7DC4E.cjs.map} +1 -1
  129. package/dist/subagents-loader.cjs +4 -4
  130. package/dist/subagents-loader.d.cts +1 -1
  131. package/dist/subagents-loader.d.ts +1 -1
  132. package/dist/subagents-loader.js +3 -3
  133. package/dist/types/agent.d.ts +7 -2
  134. package/docs/error-codes.md +20 -18
  135. package/docs/harness-capability-map.md +9 -1
  136. package/package.json +1 -1
  137. package/dist/chunk-2XRAWOZZ.js.map +0 -1
  138. package/dist/chunk-43YXGD3P.cjs.map +0 -1
  139. package/dist/chunk-AYA65JA5.cjs.map +0 -1
  140. package/dist/chunk-C4ZQPWXJ.cjs.map +0 -1
  141. package/dist/chunk-HW7SEELD.cjs.map +0 -1
  142. package/dist/chunk-IU5N5224.cjs.map +0 -1
  143. package/dist/chunk-JNAA4G4H.js +0 -43
  144. package/dist/chunk-JNAA4G4H.js.map +0 -1
  145. package/dist/chunk-KZSKIUXZ.js.map +0 -1
  146. package/dist/chunk-LOHMT36V.cjs.map +0 -1
  147. package/dist/chunk-LX7SEXOQ.js.map +0 -1
  148. package/dist/chunk-N6OOOYFZ.js.map +0 -1
  149. package/dist/chunk-NSLHPAC7.js.map +0 -1
  150. package/dist/chunk-O7L7M42F.js.map +0 -1
  151. package/dist/chunk-ODBID5TG.js.map +0 -1
  152. package/dist/chunk-QATRS7JD.cjs.map +0 -1
  153. package/dist/chunk-S6B5XYC3.js.map +0 -1
  154. package/dist/chunk-SADXXGWU.js.map +0 -1
  155. package/dist/chunk-UKJJRU7C.cjs.map +0 -1
  156. package/dist/chunk-VY6NKMOA.cjs.map +0 -1
  157. package/dist/context-3HPU754C.js +0 -6
  158. package/dist/context-JTGSBJT6.cjs +0 -23
  159. package/dist/subagents-loader-AIVDQ2D5.js +0 -7
  160. package/dist/subagents-loader-DN4LETGL.cjs +0 -16
package/dist/index.d.cts CHANGED
@@ -2,15 +2,15 @@ import { T as TheokitAgentError, E as ErrorMetadata } from './errors-base-B5g01n
2
2
  export { a as ErrorCode } from './errors-base-B5g01neU.cjs';
3
3
  import { F as RunEvent, j as CostBreakdown, at as TokenUsage, R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as RunEventSink$1, S as SDKMessage } from './run-CTAdRU3U.cjs';
4
4
  export { A as AgentConversationTurn, e as AssistantMessage, f as CompletionCheck, g as CompletionCheckResult, h as ConversationStep, i as ConversationTurn, j as CostBreakdown, k as CostSource, l as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, m as GenerateRunResult, I as ImageBlock, n as InputProcessorContext, o as InteractionUpdate, p as McpAuthConfig, q as McpHttpServerConfig, r as McpOAuthConfig, s as McpStdioServerConfig, t as MessageOrigin, u as ModelParameterValue, O as OutputProcessorContext, v as PartialToolCallUpdate, w as ProcessorControls, x as ProcessorTripwire, y as ProcessorViolation, z as RunCompactBoundaryEvent, B as RunCompletionCheckEvent, E as RunErrorDetail, F as RunEvent, H as RunGitInfo, J as RunMemoryDegradedEvent, K as RunOperation, L as RunPermissionDeniedEvent, N as RunRateLimitEvent, Q as RunStatus, U as RunTaskCompletedEvent, V as RunTaskStartedEvent, W as RunTaskUpdatedEvent, X as RunTimelineEvent, Y as RunToCompletionOptions, Z as RunToCompletionResult, _ as RunToolProgressEvent, $ as RunTripwireEvent, a0 as SDKAssistantMessage, a1 as SDKImage, a2 as SDKImageDimension, a3 as SDKObjectDelta, a4 as SDKRequestMessage, a5 as SDKStatusMessage, a6 as SDKSystemMessage, a7 as SDKTaskMessage, a8 as SDKThinkingMessage, a9 as SDKToolUseMessage, aa as SDKUserMessage, ab as SDKUserMessageEvent, ac as SendOptions, ad as ShellCommand, ae as ShellConversationTurn, af as ShellOutput, ag as ShellOutputDeltaUpdate, ah as StepCompletedUpdate, ai as StepStartedUpdate, aj as StreamToCompletionResult, ak as SummaryCompletedUpdate, al as SummaryStartedUpdate, am as SummaryUpdate, an as TextBlock, ao as TextDeltaUpdate, ap as ThinkingCompletedUpdate, aq as ThinkingDeltaUpdate, ar as ThinkingMessage, as as TokenDeltaUpdate, at as TokenUsage, au as ToolCall, av as ToolCallCompletedUpdate, aw as ToolCallStartedUpdate, ax as ToolContextMessage, ay as ToolResult, az as ToolResultGuardOptions, aA as ToolUseBlock, aB as TurnEndedUpdate, aC as UserMessage, aD as UserMessageAppendedUpdate } from './run-CTAdRU3U.cjs';
5
- import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, B as BudgetTracker, k as MemoryProvider, l as PreToolCallDecision } from './agent-DyB_lzrx.cjs';
6
- export { m as ActiveMemoryPassArgs, n as ActiveMemoryPassResult, o as AgentSubagentDescription, p as AgentToolDescription, q as BudgetCheck, r as BudgetTotal, s as BudgetUsageEvent, t as BuiltinToolName, u as CloudEnv, v as CloudRepo, w as CompatSource, x as CompatSourceAdapter, y as CompatSurface, z as CreateSkillSpec, H as HookName, D as MemoryProviderAgentRef, E as MemoryProviderFactory, F as MemoryProviderHandle, J as MemoryProviderInitOptions, K as PluginContext, N as PluginHookDisposer, O as PostAssistantReplyContext, Q as PostToolCallContext, R as PreToolCallContext, T as PreUserSendContext, U as PreUserSendResult, V as ProviderTransform, W as ProviderTransformContext, X as RecordSessionSummaryArgs, Y as SessionLifecycleContext, Z as SessionRecord, _ as SessionStore, $ as SettingSource, a0 as Skill, a1 as SkillsResolver, a2 as SkillsResolverContext, a3 as SystemPromptContext, a4 as SystemPromptMemoryFact, a5 as TelemetrySettings, a6 as ToolCallSummary, a7 as ToolResultTransformContext, a8 as TransformContext } from './agent-DyB_lzrx.cjs';
5
+ import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, k as Skill, B as BudgetTracker, l as MemoryProvider, m as PreToolCallDecision } from './agent-Dya5SmhY.cjs';
6
+ export { n as ActiveMemoryPassArgs, o as ActiveMemoryPassResult, p as AgentSubagentDescription, q as AgentToolDescription, r as BudgetCheck, s as BudgetTotal, t as BudgetUsageEvent, u as BuiltinToolName, v as CloudEnv, w as CloudRepo, x as CompatSource, y as CompatSourceAdapter, z as CompatSurface, D as CreateSkillSpec, H as HookName, E as MemoryProviderAgentRef, F as MemoryProviderFactory, J as MemoryProviderHandle, K as MemoryProviderInitOptions, N as PluginContext, O as PluginHookDisposer, Q as PostAssistantReplyContext, R as PostToolCallContext, T as PreToolCallContext, U as PreUserSendContext, V as PreUserSendResult, W as ProviderTransform, X as ProviderTransformContext, Y as RecordSessionSummaryArgs, Z as SessionLifecycleContext, _ as SessionRecord, $ as SessionStore, a0 as SettingSource, a1 as Skill, a2 as SkillsResolver, a3 as SkillsResolverContext, a4 as SystemPromptContext, a5 as SystemPromptMemoryFact, a6 as TelemetrySettings, a7 as ToolCallSummary, a8 as ToolResultTransformContext, a9 as TransformContext } from './agent-Dya5SmhY.cjs';
7
7
  import * as zod from 'zod';
8
8
  import { ZodType, z } from 'zod';
9
9
  import { S as StructuredOutputError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot } from './errors-DrDEgyz1.cjs';
10
10
  export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, I as IntegrationNotConnectedError, m as InvalidTaskIdError, M as MemoryAdapterError, n as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, T as TaskNotFoundError, U as UnknownAgentError, o as UnsupportedBudgetOperationError, p as UnsupportedRunOperationError, q as UnsupportedTaskOperationError, r as isTransientError } from './errors-DrDEgyz1.cjs';
11
11
  import { P as ProviderRoutingSettings, S as SDKAgent, C as ContextSettings, a as PluginsSettings, J as JudgeResult, G as GoalOptions, b as GoalEvent, c as GoalResult, M as MemoryId, d as SDKProvider } from './sdk-agent-BOiKqOgL.cjs';
12
12
  export { A as AgentMemory, e as AgentOperation, f as ContextBudget, g as ContextManagerKind, h as ContextSnapshot, i as ContextSource, j as ContextSourceStatus, I as InvalidateCacheOptions, k as MemoryAdapter, l as MemoryAdapterCapabilities, m as MemoryContext, n as MemoryFact, o as MemoryRevision, p as MemoryToolSchema, q as MemoryTurnMessage, r as PersonalityPreset, s as ProviderCapability, t as ProviderRoute, R as ResolvedProviderRoute, u as RunUntilIterator, v as SDKAgentPlugins, w as SDKAgentSkillDetail, x as SDKAgentSkills, y as SDKArtifact, z as SDKContextManager, B as SDKPluginMetadata, D as SDKProvidersManager, E as SystemPromptSkillRef, V as Verdict } from './sdk-agent-BOiKqOgL.cjs';
13
- export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-Bgivg88c.cjs';
13
+ export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-BwxDUscv.cjs';
14
14
  import { StepResult } from './workflow.cjs';
15
15
  export { Workflow, agentStep, fn } from './workflow.cjs';
16
16
 
@@ -79,6 +79,24 @@ interface CompactResult {
79
79
  preTokens: number;
80
80
  postTokens: number;
81
81
  }
82
+ /**
83
+ * What a pre-compaction handler is told, and what it is given to bail out with.
84
+ *
85
+ * `trigger` is READ from the compaction that is happening, never inferred from the call site: the
86
+ * inference would be right today and silently wrong the first time a third caller appears.
87
+ *
88
+ * @public
89
+ */
90
+ interface PreCompactContext {
91
+ /** The messages about to be summarised — what the handler gets a last look at. */
92
+ readonly messages: readonly CompressibleMessage[];
93
+ /** `manual` when a person asked, `auto` when a usage threshold did. */
94
+ readonly trigger: "manual" | "auto";
95
+ /** Aborted when the bound fires, so a long handler can stop rather than be merely ignored. */
96
+ readonly signal: AbortSignal;
97
+ }
98
+ /** @public */
99
+ type PreCompactHandler = (ctx: PreCompactContext) => void | Promise<void>;
82
100
 
83
101
  /**
84
102
  * Owner: `src/` (2 of 5 importers). Derived from the import graph, not declared —
@@ -822,6 +840,17 @@ declare class Agent {
822
840
  static compact(agentId: string, options?: {
823
841
  trigger?: "manual" | "auto";
824
842
  summarize?: (messages: readonly CompressibleMessage[]) => Promise<string>;
843
+ /**
844
+ * B-082 — work to run before the transcript is rewritten, on THIS path.
845
+ *
846
+ * `/compact` reaches here, and before this option the seam existed only on the agents-layer
847
+ * strategy, which this path never touches. The handler is awaited, bounded, and its failure is
848
+ * reported without stopping compaction — the same contract `withPreCompaction` carries, not a
849
+ * second one.
850
+ */
851
+ onPreCompact?: PreCompactHandler;
852
+ onPreCompactError?: (error: unknown) => void;
853
+ preCompactTimeoutMs?: number;
825
854
  }): Promise<CompactResult>;
826
855
  /**
827
856
  * M51 — inject a SYNTHETIC user+assistant pair into a LOCAL session's persisted transcript WITHOUT
@@ -1596,13 +1625,22 @@ declare class Provider {
1596
1625
  * @public
1597
1626
  */
1598
1627
 
1628
+ /**
1629
+ * What `skill_read` can read: a skill that carries its body, or one that knows where its body is.
1630
+ *
1631
+ * The tool used to take `InlineSkill` alone. A skill discovered on disk is a `Skill`, whose own
1632
+ * declaration says "the skill BODY is never included" — so it did not fit through the door at all,
1633
+ * and the entire on-disk surface was advertised to the model and unreadable by it: a `SKILL.md`
1634
+ * listed by name and description, with the instructions under the frontmatter unable to arrive.
1635
+ */
1636
+ type ReadableSkill = InlineSkill | Skill;
1599
1637
  /** SE36 — `SkillReadTool.create` replaces `defineSkillReadTool` (ADR 0015). @public *
1600
1638
  * `SkillReadTool.create` returns a **`CustomTool`** — a skill-reading tool, not a
1601
1639
  * `SkillReadTool` instance.
1602
1640
  */
1603
1641
  declare class SkillReadTool {
1604
1642
  private constructor();
1605
- static create(skills: ReadonlyArray<InlineSkill>): CustomTool;
1643
+ static create(skills: ReadonlyArray<ReadableSkill>): CustomTool;
1606
1644
  }
1607
1645
 
1608
1646
  /**
@@ -2114,6 +2152,87 @@ declare function emitRunEvent(sink: RunEventSink$1 | undefined, event: RunEvent)
2114
2152
  */
2115
2153
  declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
2116
2154
 
2155
+ /**
2156
+ * What an operator may impose. One key today, and the shape is the point: each addition is a control
2157
+ * that already exists somewhere below and is being lifted into a tier the project cannot reach.
2158
+ *
2159
+ * Deliberately NOT a passthrough of arbitrary keys. A policy file whose unknown keys were carried
2160
+ * along would let an organisation believe it had imposed something this runtime never reads — the
2161
+ * exact belief-in-an-absent-protection this tier exists to remove.
2162
+ */
2163
+ interface ManagedSettings {
2164
+ /**
2165
+ * Refuse to execute the `` !`command` `` form in a skill or command body.
2166
+ *
2167
+ * A skill is a markdown file a repository can carry, and its body can run shell at expansion time.
2168
+ * Without this the only way to decline was to stop reading skills entirely.
2169
+ */
2170
+ disableSkillShellExecution?: boolean;
2171
+ /**
2172
+ * The permission posture the operator imposes on every run.
2173
+ *
2174
+ * `plan` is the one this exists for: an explore-only posture where edits are structurally refused.
2175
+ * A `createPlanModeTool` already existed and it is a tool the MODEL may call — the difference is
2176
+ * who decides. A never-prompt posture (`bypass`) is the other end, for a locked-down CI run where
2177
+ * there is nobody to ask.
2178
+ *
2179
+ * It does NOT reach the standing-grant gate. `bypass` allows what the RULES would have asked
2180
+ * about; a grant an operator recorded is not the run's to clear.
2181
+ */
2182
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypass";
2183
+ /**
2184
+ * The permission policy, as rule strings an operator writes and reviews.
2185
+ *
2186
+ * `{ "permissions": { "deny": ["Read(path:./.env)"] } }` — the spec's own paste-ready
2187
+ * secret-exclusion example, which could not be expressed at all while every policy was a compiled
2188
+ * predicate. Parsed by `parsePermissionRules` into the rules `PermissionEngine` already evaluates;
2189
+ * the engine is unchanged and keeps its fail-closed default and its immune-to-un-deny explicit
2190
+ * deny.
2191
+ */
2192
+ permissions?: {
2193
+ readonly deny?: readonly string[];
2194
+ readonly ask?: readonly string[];
2195
+ readonly allow?: readonly string[];
2196
+ };
2197
+ /**
2198
+ * Refuse to run ANY hook, whatever the project declared.
2199
+ *
2200
+ * The first control lifted, because it is the one whose absence is hardest to notice: a hook that
2201
+ * does not run looks identical to a hook that ran and approved.
2202
+ */
2203
+ disableAllHooks?: boolean;
2204
+ }
2205
+ /**
2206
+ * Where the platform keeps its managed settings.
2207
+ *
2208
+ * `root` exists so the precedence rule is testable: the real directories are platform-owned and a
2209
+ * test must not write to `/etc`. Hard-coding the path inside the reader would make the thing that
2210
+ * actually matters — that a project cannot override this file — unreachable by any test not running
2211
+ * as root.
2212
+ *
2213
+ * The paths are Claude Code's own, because the file is Claude Code's format: an organisation that
2214
+ * already deployed one should not have to deploy a second copy under a different name to get the
2215
+ * same policy honoured here.
2216
+ */
2217
+ declare function managedSettingsPathFor(root?: string): string;
2218
+ /**
2219
+ * Read the deployed policy, or `{}` when none is.
2220
+ *
2221
+ * Absent is the ordinary case and not an error — most machines have no operator tier, and a reader
2222
+ * that failed without one would make the feature a prerequisite for running at all.
2223
+ *
2224
+ * A file that EXISTS and cannot be read is different, and says so — through `diagFailure`, not
2225
+ * `diag`. `diag` returns immediately when no sink is installed, and most consumers never install
2226
+ * one: an organisation that deployed a policy with a typo in it would get complete silence, which is
2227
+ * the same defect this repository just fixed for dropped hook events. A policy channel that is
2228
+ * silent by default reports nothing about the one thing the tier exists to make certain. An organisation that deployed a
2229
+ * policy and got silence would believe it applied; that belief is what this tier removes.
2230
+ *
2231
+ * SYNC for the same reason `readCompatConfigFile` is: the caller resolves this before any submanager
2232
+ * exists to await a promise, and a once-per-agent read of one small file is the same class of work.
2233
+ */
2234
+ declare function readManagedSettings(root?: string): ManagedSettings;
2235
+
2117
2236
  /**
2118
2237
  * Reference `MemoryProvider` impl — no-op fallback (SDK 2.0 Phase 1 /
2119
2238
  * T1.2 reference implementation, mirrors `createCounterBudgetTracker`).
@@ -2780,6 +2899,22 @@ declare class PermissionEngine {
2780
2899
  evaluate(toolName: string, args?: Record<string, unknown>, mode?: PermissionMode): PermissionAction;
2781
2900
  }
2782
2901
 
2902
+ /** Where the floor is anchored. Defaults to the real environment; overridable so it is testable. */
2903
+ interface PermissionFloorContext {
2904
+ readonly cwd?: string;
2905
+ readonly home?: string;
2906
+ }
2907
+ /**
2908
+ * Why this call may not be approved, or `undefined` when the floor has no objection.
2909
+ *
2910
+ * The reason NAMES the path or the target and says which tier refused, so it is not mistaken for a
2911
+ * permissions misconfiguration — an operator who reads "denied" goes looking at their rules, and
2912
+ * would not find anything wrong with them.
2913
+ */
2914
+ declare function permissionFloorReason(toolName: string, args: Record<string, unknown> | undefined, context?: PermissionFloorContext): string | undefined;
2915
+ /** Whether `child` is inside `parent`. Kept for callers that need the containment question. */
2916
+ declare function isInside(parent: string, child: string): boolean;
2917
+
2783
2918
  /**
2784
2919
  * M7-5 — `createPermissionPlugin`: wire a {@link PermissionEngine} into the
2785
2920
  * `definePlugin` `pre_tool_call` veto seam. This is the canonical exemplar that
@@ -2850,6 +2985,63 @@ declare class PermissionPlugin {
2850
2985
  static create(engine: PermissionEngine, opts?: PermissionPluginOptions): Plugin;
2851
2986
  }
2852
2987
 
2988
+ /**
2989
+ * The permission rule LANGUAGE — a policy an operator can ship, review and diff.
2990
+ *
2991
+ * A policy could previously only be a compiled-in function. Measured: `allowedTools` and
2992
+ * `disallowedTools` returned 0 files in the agents layer, and the closest facility was
2993
+ * `CommandPolicy = (command: string) => string | null` — a code predicate. So no policy could be
2994
+ * audited, diffed, reviewed in a pull request, or varied per environment, and `Read(./.env)` — the
2995
+ * spec's own paste-ready secret-exclusion example — could not be expressed at all.
2996
+ *
2997
+ * This turns the spec's rule strings into {@link PermissionRule}s the existing engine already
2998
+ * evaluates. The engine is unchanged: first-match, fail-closed by default, explicit deny immune to
2999
+ * every auto-approve mode.
3000
+ *
3001
+ * ## The grammar, decided as a whole rather than one specifier at a time
3002
+ *
3003
+ * | Written | Matches |
3004
+ * |---|---|
3005
+ * | `Bash` | every call to `Bash` |
3006
+ * | `Bash(npm run test:*)` | the primary argument STARTS WITH `npm run test:` |
3007
+ * | `Read(path:./.env)` | the primary argument, read as a path, matches the glob |
3008
+ * | `WebFetch(domain:example.com)` | the primary argument's HOST equals `example.com` |
3009
+ * | `Bash(npm audit)` | the primary argument EQUALS `npm audit` |
3010
+ *
3011
+ * The specifier says how to read ITSELF. The alternative — knowing that `Read` means a path and
3012
+ * `WebFetch` means a URL — cannot work in a runtime where the consumer brings their own tools: a
3013
+ * rule naming a tool this SDK has never heard of must still be readable, and under a prefixed
3014
+ * grammar it is.
3015
+ *
3016
+ * WHICH argument a specifier reads is the one part that cannot be derived, so the set is DECLARED:
3017
+ * `command`, `file_path`, `path`, `url`, `query`. A tool whose argument is named something else
3018
+ * cannot be narrowed by specifier, and that limit is stated rather than guessed around. "Read
3019
+ * whichever argument is the only string" was the alternative, and it is worse: a rule would match an
3020
+ * argument the operator never named, widening an allow rule exactly as often as it narrows a deny
3021
+ * one. The escape that always works is a BARE tool name, which matches every call whatever its
3022
+ * shape.
3023
+ *
3024
+ * @public
3025
+ */
3026
+
3027
+ /** A policy as an operator writes it: three lists of rule strings. */
3028
+ interface PermissionRuleSet {
3029
+ readonly deny?: readonly string[];
3030
+ readonly ask?: readonly string[];
3031
+ readonly allow?: readonly string[];
3032
+ }
3033
+ /**
3034
+ * Parse a rule set into engine rules, DENY first.
3035
+ *
3036
+ * The engine is first-match, so the order emitted here IS the precedence — and a narrow deny must
3037
+ * survive a broad allow, or `Read` + `Read(path:./.env)` would read the secret the second line
3038
+ * exists to protect. `ask` sits between them: it is a restriction on something otherwise allowed.
3039
+ *
3040
+ * @throws ConfigurationError on a rule this grammar cannot read. A policy line an operator wrote and
3041
+ * this runtime silently ignored is the belief-in-an-absent-protection the whole tier removes.
3042
+ */
3043
+ declare function parsePermissionRules(set: PermissionRuleSet): PermissionRule[];
3044
+
2853
3045
  /**
2854
3046
  * Load a project's `.env` without letting it move the credential store or switch off a trust
2855
3047
  * decision.
@@ -4246,4 +4438,4 @@ interface WiringRecordInput<K extends string> {
4246
4438
  */
4247
4439
  declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
4248
4440
 
4249
- export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EffectiveToolCatalog, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReadSessionMessagesOptions, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, type UnresolvedToolSource, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, effectiveToolNames, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
4441
+ export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EffectiveToolCatalog, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, type ManagedSettings, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionFloorContext, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, type PermissionRuleSet, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReadSessionMessagesOptions, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, type UnresolvedToolSource, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, effectiveToolNames, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isInside, isValidTaskId, loadProjectEnv, managedSettingsPathFor, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, parsePermissionRules, permissionFloorReason, planReaping, preflightCheck, readManagedSettings, readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
package/dist/index.d.ts CHANGED
@@ -2,15 +2,15 @@ import { T as TheokitAgentError, E as ErrorMetadata } from './errors-base-B5g01n
2
2
  export { a as ErrorCode } from './errors-base-B5g01neU.js';
3
3
  import { F as RunEvent, j as CostBreakdown, at as TokenUsage, R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as RunEventSink$1, S as SDKMessage } from './run-CTAdRU3U.js';
4
4
  export { A as AgentConversationTurn, e as AssistantMessage, f as CompletionCheck, g as CompletionCheckResult, h as ConversationStep, i as ConversationTurn, j as CostBreakdown, k as CostSource, l as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, m as GenerateRunResult, I as ImageBlock, n as InputProcessorContext, o as InteractionUpdate, p as McpAuthConfig, q as McpHttpServerConfig, r as McpOAuthConfig, s as McpStdioServerConfig, t as MessageOrigin, u as ModelParameterValue, O as OutputProcessorContext, v as PartialToolCallUpdate, w as ProcessorControls, x as ProcessorTripwire, y as ProcessorViolation, z as RunCompactBoundaryEvent, B as RunCompletionCheckEvent, E as RunErrorDetail, F as RunEvent, H as RunGitInfo, J as RunMemoryDegradedEvent, K as RunOperation, L as RunPermissionDeniedEvent, N as RunRateLimitEvent, Q as RunStatus, U as RunTaskCompletedEvent, V as RunTaskStartedEvent, W as RunTaskUpdatedEvent, X as RunTimelineEvent, Y as RunToCompletionOptions, Z as RunToCompletionResult, _ as RunToolProgressEvent, $ as RunTripwireEvent, a0 as SDKAssistantMessage, a1 as SDKImage, a2 as SDKImageDimension, a3 as SDKObjectDelta, a4 as SDKRequestMessage, a5 as SDKStatusMessage, a6 as SDKSystemMessage, a7 as SDKTaskMessage, a8 as SDKThinkingMessage, a9 as SDKToolUseMessage, aa as SDKUserMessage, ab as SDKUserMessageEvent, ac as SendOptions, ad as ShellCommand, ae as ShellConversationTurn, af as ShellOutput, ag as ShellOutputDeltaUpdate, ah as StepCompletedUpdate, ai as StepStartedUpdate, aj as StreamToCompletionResult, ak as SummaryCompletedUpdate, al as SummaryStartedUpdate, am as SummaryUpdate, an as TextBlock, ao as TextDeltaUpdate, ap as ThinkingCompletedUpdate, aq as ThinkingDeltaUpdate, ar as ThinkingMessage, as as TokenDeltaUpdate, at as TokenUsage, au as ToolCall, av as ToolCallCompletedUpdate, aw as ToolCallStartedUpdate, ax as ToolContextMessage, ay as ToolResult, az as ToolResultGuardOptions, aA as ToolUseBlock, aB as TurnEndedUpdate, aC as UserMessage, aD as UserMessageAppendedUpdate } from './run-CTAdRU3U.js';
5
- import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, B as BudgetTracker, k as MemoryProvider, l as PreToolCallDecision } from './agent-CjMVbhhY.js';
6
- export { m as ActiveMemoryPassArgs, n as ActiveMemoryPassResult, o as AgentSubagentDescription, p as AgentToolDescription, q as BudgetCheck, r as BudgetTotal, s as BudgetUsageEvent, t as BuiltinToolName, u as CloudEnv, v as CloudRepo, w as CompatSource, x as CompatSourceAdapter, y as CompatSurface, z as CreateSkillSpec, H as HookName, D as MemoryProviderAgentRef, E as MemoryProviderFactory, F as MemoryProviderHandle, J as MemoryProviderInitOptions, K as PluginContext, N as PluginHookDisposer, O as PostAssistantReplyContext, Q as PostToolCallContext, R as PreToolCallContext, T as PreUserSendContext, U as PreUserSendResult, V as ProviderTransform, W as ProviderTransformContext, X as RecordSessionSummaryArgs, Y as SessionLifecycleContext, Z as SessionRecord, _ as SessionStore, $ as SettingSource, a0 as Skill, a1 as SkillsResolver, a2 as SkillsResolverContext, a3 as SystemPromptContext, a4 as SystemPromptMemoryFact, a5 as TelemetrySettings, a6 as ToolCallSummary, a7 as ToolResultTransformContext, a8 as TransformContext } from './agent-CjMVbhhY.js';
5
+ import { A as AgentOptions, L as LocalOptions, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as SkillsSettings, c as ListAgentsOptions, d as ListResult, e as SDKAgentInfo, G as GetAgentOptions, f as ListRunsOptions, g as GetRunOptions, h as AgentOperationOptions, i as AgentDescription, P as Plugin$1, j as ProviderProfile, I as InlineSkill, k as Skill, B as BudgetTracker, l as MemoryProvider, m as PreToolCallDecision } from './agent-Bqzdhkqr.js';
6
+ export { n as ActiveMemoryPassArgs, o as ActiveMemoryPassResult, p as AgentSubagentDescription, q as AgentToolDescription, r as BudgetCheck, s as BudgetTotal, t as BudgetUsageEvent, u as BuiltinToolName, v as CloudEnv, w as CloudRepo, x as CompatSource, y as CompatSourceAdapter, z as CompatSurface, D as CreateSkillSpec, H as HookName, E as MemoryProviderAgentRef, F as MemoryProviderFactory, J as MemoryProviderHandle, K as MemoryProviderInitOptions, N as PluginContext, O as PluginHookDisposer, Q as PostAssistantReplyContext, R as PostToolCallContext, T as PreToolCallContext, U as PreUserSendContext, V as PreUserSendResult, W as ProviderTransform, X as ProviderTransformContext, Y as RecordSessionSummaryArgs, Z as SessionLifecycleContext, _ as SessionRecord, $ as SessionStore, a0 as SettingSource, a1 as Skill, a2 as SkillsResolver, a3 as SkillsResolverContext, a4 as SystemPromptContext, a5 as SystemPromptMemoryFact, a6 as TelemetrySettings, a7 as ToolCallSummary, a8 as ToolResultTransformContext, a9 as TransformContext } from './agent-Bqzdhkqr.js';
7
7
  import * as zod from 'zod';
8
8
  import { ZodType, z } from 'zod';
9
9
  import { S as StructuredOutputError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot } from './errors-CLOAyuiv.js';
10
10
  export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, I as IntegrationNotConnectedError, m as InvalidTaskIdError, M as MemoryAdapterError, n as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, T as TaskNotFoundError, U as UnknownAgentError, o as UnsupportedBudgetOperationError, p as UnsupportedRunOperationError, q as UnsupportedTaskOperationError, r as isTransientError } from './errors-CLOAyuiv.js';
11
11
  import { P as ProviderRoutingSettings, S as SDKAgent, C as ContextSettings, a as PluginsSettings, J as JudgeResult, G as GoalOptions, b as GoalEvent, c as GoalResult, M as MemoryId, d as SDKProvider } from './sdk-agent-D4a_BR_6.js';
12
12
  export { A as AgentMemory, e as AgentOperation, f as ContextBudget, g as ContextManagerKind, h as ContextSnapshot, i as ContextSource, j as ContextSourceStatus, I as InvalidateCacheOptions, k as MemoryAdapter, l as MemoryAdapterCapabilities, m as MemoryContext, n as MemoryFact, o as MemoryRevision, p as MemoryToolSchema, q as MemoryTurnMessage, r as PersonalityPreset, s as ProviderCapability, t as ProviderRoute, R as ResolvedProviderRoute, u as RunUntilIterator, v as SDKAgentPlugins, w as SDKAgentSkillDetail, x as SDKAgentSkills, y as SDKArtifact, z as SDKContextManager, B as SDKPluginMetadata, D as SDKProvidersManager, E as SystemPromptSkillRef, V as Verdict } from './sdk-agent-D4a_BR_6.js';
13
- export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-CNUa7PDo.js';
13
+ export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-D8uB1Xh5.js';
14
14
  import { StepResult } from './workflow.js';
15
15
  export { Workflow, agentStep, fn } from './workflow.js';
16
16
 
@@ -79,6 +79,24 @@ interface CompactResult {
79
79
  preTokens: number;
80
80
  postTokens: number;
81
81
  }
82
+ /**
83
+ * What a pre-compaction handler is told, and what it is given to bail out with.
84
+ *
85
+ * `trigger` is READ from the compaction that is happening, never inferred from the call site: the
86
+ * inference would be right today and silently wrong the first time a third caller appears.
87
+ *
88
+ * @public
89
+ */
90
+ interface PreCompactContext {
91
+ /** The messages about to be summarised — what the handler gets a last look at. */
92
+ readonly messages: readonly CompressibleMessage[];
93
+ /** `manual` when a person asked, `auto` when a usage threshold did. */
94
+ readonly trigger: "manual" | "auto";
95
+ /** Aborted when the bound fires, so a long handler can stop rather than be merely ignored. */
96
+ readonly signal: AbortSignal;
97
+ }
98
+ /** @public */
99
+ type PreCompactHandler = (ctx: PreCompactContext) => void | Promise<void>;
82
100
 
83
101
  /**
84
102
  * Owner: `src/` (2 of 5 importers). Derived from the import graph, not declared —
@@ -822,6 +840,17 @@ declare class Agent {
822
840
  static compact(agentId: string, options?: {
823
841
  trigger?: "manual" | "auto";
824
842
  summarize?: (messages: readonly CompressibleMessage[]) => Promise<string>;
843
+ /**
844
+ * B-082 — work to run before the transcript is rewritten, on THIS path.
845
+ *
846
+ * `/compact` reaches here, and before this option the seam existed only on the agents-layer
847
+ * strategy, which this path never touches. The handler is awaited, bounded, and its failure is
848
+ * reported without stopping compaction — the same contract `withPreCompaction` carries, not a
849
+ * second one.
850
+ */
851
+ onPreCompact?: PreCompactHandler;
852
+ onPreCompactError?: (error: unknown) => void;
853
+ preCompactTimeoutMs?: number;
825
854
  }): Promise<CompactResult>;
826
855
  /**
827
856
  * M51 — inject a SYNTHETIC user+assistant pair into a LOCAL session's persisted transcript WITHOUT
@@ -1596,13 +1625,22 @@ declare class Provider {
1596
1625
  * @public
1597
1626
  */
1598
1627
 
1628
+ /**
1629
+ * What `skill_read` can read: a skill that carries its body, or one that knows where its body is.
1630
+ *
1631
+ * The tool used to take `InlineSkill` alone. A skill discovered on disk is a `Skill`, whose own
1632
+ * declaration says "the skill BODY is never included" — so it did not fit through the door at all,
1633
+ * and the entire on-disk surface was advertised to the model and unreadable by it: a `SKILL.md`
1634
+ * listed by name and description, with the instructions under the frontmatter unable to arrive.
1635
+ */
1636
+ type ReadableSkill = InlineSkill | Skill;
1599
1637
  /** SE36 — `SkillReadTool.create` replaces `defineSkillReadTool` (ADR 0015). @public *
1600
1638
  * `SkillReadTool.create` returns a **`CustomTool`** — a skill-reading tool, not a
1601
1639
  * `SkillReadTool` instance.
1602
1640
  */
1603
1641
  declare class SkillReadTool {
1604
1642
  private constructor();
1605
- static create(skills: ReadonlyArray<InlineSkill>): CustomTool;
1643
+ static create(skills: ReadonlyArray<ReadableSkill>): CustomTool;
1606
1644
  }
1607
1645
 
1608
1646
  /**
@@ -2114,6 +2152,87 @@ declare function emitRunEvent(sink: RunEventSink$1 | undefined, event: RunEvent)
2114
2152
  */
2115
2153
  declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
2116
2154
 
2155
+ /**
2156
+ * What an operator may impose. One key today, and the shape is the point: each addition is a control
2157
+ * that already exists somewhere below and is being lifted into a tier the project cannot reach.
2158
+ *
2159
+ * Deliberately NOT a passthrough of arbitrary keys. A policy file whose unknown keys were carried
2160
+ * along would let an organisation believe it had imposed something this runtime never reads — the
2161
+ * exact belief-in-an-absent-protection this tier exists to remove.
2162
+ */
2163
+ interface ManagedSettings {
2164
+ /**
2165
+ * Refuse to execute the `` !`command` `` form in a skill or command body.
2166
+ *
2167
+ * A skill is a markdown file a repository can carry, and its body can run shell at expansion time.
2168
+ * Without this the only way to decline was to stop reading skills entirely.
2169
+ */
2170
+ disableSkillShellExecution?: boolean;
2171
+ /**
2172
+ * The permission posture the operator imposes on every run.
2173
+ *
2174
+ * `plan` is the one this exists for: an explore-only posture where edits are structurally refused.
2175
+ * A `createPlanModeTool` already existed and it is a tool the MODEL may call — the difference is
2176
+ * who decides. A never-prompt posture (`bypass`) is the other end, for a locked-down CI run where
2177
+ * there is nobody to ask.
2178
+ *
2179
+ * It does NOT reach the standing-grant gate. `bypass` allows what the RULES would have asked
2180
+ * about; a grant an operator recorded is not the run's to clear.
2181
+ */
2182
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypass";
2183
+ /**
2184
+ * The permission policy, as rule strings an operator writes and reviews.
2185
+ *
2186
+ * `{ "permissions": { "deny": ["Read(path:./.env)"] } }` — the spec's own paste-ready
2187
+ * secret-exclusion example, which could not be expressed at all while every policy was a compiled
2188
+ * predicate. Parsed by `parsePermissionRules` into the rules `PermissionEngine` already evaluates;
2189
+ * the engine is unchanged and keeps its fail-closed default and its immune-to-un-deny explicit
2190
+ * deny.
2191
+ */
2192
+ permissions?: {
2193
+ readonly deny?: readonly string[];
2194
+ readonly ask?: readonly string[];
2195
+ readonly allow?: readonly string[];
2196
+ };
2197
+ /**
2198
+ * Refuse to run ANY hook, whatever the project declared.
2199
+ *
2200
+ * The first control lifted, because it is the one whose absence is hardest to notice: a hook that
2201
+ * does not run looks identical to a hook that ran and approved.
2202
+ */
2203
+ disableAllHooks?: boolean;
2204
+ }
2205
+ /**
2206
+ * Where the platform keeps its managed settings.
2207
+ *
2208
+ * `root` exists so the precedence rule is testable: the real directories are platform-owned and a
2209
+ * test must not write to `/etc`. Hard-coding the path inside the reader would make the thing that
2210
+ * actually matters — that a project cannot override this file — unreachable by any test not running
2211
+ * as root.
2212
+ *
2213
+ * The paths are Claude Code's own, because the file is Claude Code's format: an organisation that
2214
+ * already deployed one should not have to deploy a second copy under a different name to get the
2215
+ * same policy honoured here.
2216
+ */
2217
+ declare function managedSettingsPathFor(root?: string): string;
2218
+ /**
2219
+ * Read the deployed policy, or `{}` when none is.
2220
+ *
2221
+ * Absent is the ordinary case and not an error — most machines have no operator tier, and a reader
2222
+ * that failed without one would make the feature a prerequisite for running at all.
2223
+ *
2224
+ * A file that EXISTS and cannot be read is different, and says so — through `diagFailure`, not
2225
+ * `diag`. `diag` returns immediately when no sink is installed, and most consumers never install
2226
+ * one: an organisation that deployed a policy with a typo in it would get complete silence, which is
2227
+ * the same defect this repository just fixed for dropped hook events. A policy channel that is
2228
+ * silent by default reports nothing about the one thing the tier exists to make certain. An organisation that deployed a
2229
+ * policy and got silence would believe it applied; that belief is what this tier removes.
2230
+ *
2231
+ * SYNC for the same reason `readCompatConfigFile` is: the caller resolves this before any submanager
2232
+ * exists to await a promise, and a once-per-agent read of one small file is the same class of work.
2233
+ */
2234
+ declare function readManagedSettings(root?: string): ManagedSettings;
2235
+
2117
2236
  /**
2118
2237
  * Reference `MemoryProvider` impl — no-op fallback (SDK 2.0 Phase 1 /
2119
2238
  * T1.2 reference implementation, mirrors `createCounterBudgetTracker`).
@@ -2780,6 +2899,22 @@ declare class PermissionEngine {
2780
2899
  evaluate(toolName: string, args?: Record<string, unknown>, mode?: PermissionMode): PermissionAction;
2781
2900
  }
2782
2901
 
2902
+ /** Where the floor is anchored. Defaults to the real environment; overridable so it is testable. */
2903
+ interface PermissionFloorContext {
2904
+ readonly cwd?: string;
2905
+ readonly home?: string;
2906
+ }
2907
+ /**
2908
+ * Why this call may not be approved, or `undefined` when the floor has no objection.
2909
+ *
2910
+ * The reason NAMES the path or the target and says which tier refused, so it is not mistaken for a
2911
+ * permissions misconfiguration — an operator who reads "denied" goes looking at their rules, and
2912
+ * would not find anything wrong with them.
2913
+ */
2914
+ declare function permissionFloorReason(toolName: string, args: Record<string, unknown> | undefined, context?: PermissionFloorContext): string | undefined;
2915
+ /** Whether `child` is inside `parent`. Kept for callers that need the containment question. */
2916
+ declare function isInside(parent: string, child: string): boolean;
2917
+
2783
2918
  /**
2784
2919
  * M7-5 — `createPermissionPlugin`: wire a {@link PermissionEngine} into the
2785
2920
  * `definePlugin` `pre_tool_call` veto seam. This is the canonical exemplar that
@@ -2850,6 +2985,63 @@ declare class PermissionPlugin {
2850
2985
  static create(engine: PermissionEngine, opts?: PermissionPluginOptions): Plugin;
2851
2986
  }
2852
2987
 
2988
+ /**
2989
+ * The permission rule LANGUAGE — a policy an operator can ship, review and diff.
2990
+ *
2991
+ * A policy could previously only be a compiled-in function. Measured: `allowedTools` and
2992
+ * `disallowedTools` returned 0 files in the agents layer, and the closest facility was
2993
+ * `CommandPolicy = (command: string) => string | null` — a code predicate. So no policy could be
2994
+ * audited, diffed, reviewed in a pull request, or varied per environment, and `Read(./.env)` — the
2995
+ * spec's own paste-ready secret-exclusion example — could not be expressed at all.
2996
+ *
2997
+ * This turns the spec's rule strings into {@link PermissionRule}s the existing engine already
2998
+ * evaluates. The engine is unchanged: first-match, fail-closed by default, explicit deny immune to
2999
+ * every auto-approve mode.
3000
+ *
3001
+ * ## The grammar, decided as a whole rather than one specifier at a time
3002
+ *
3003
+ * | Written | Matches |
3004
+ * |---|---|
3005
+ * | `Bash` | every call to `Bash` |
3006
+ * | `Bash(npm run test:*)` | the primary argument STARTS WITH `npm run test:` |
3007
+ * | `Read(path:./.env)` | the primary argument, read as a path, matches the glob |
3008
+ * | `WebFetch(domain:example.com)` | the primary argument's HOST equals `example.com` |
3009
+ * | `Bash(npm audit)` | the primary argument EQUALS `npm audit` |
3010
+ *
3011
+ * The specifier says how to read ITSELF. The alternative — knowing that `Read` means a path and
3012
+ * `WebFetch` means a URL — cannot work in a runtime where the consumer brings their own tools: a
3013
+ * rule naming a tool this SDK has never heard of must still be readable, and under a prefixed
3014
+ * grammar it is.
3015
+ *
3016
+ * WHICH argument a specifier reads is the one part that cannot be derived, so the set is DECLARED:
3017
+ * `command`, `file_path`, `path`, `url`, `query`. A tool whose argument is named something else
3018
+ * cannot be narrowed by specifier, and that limit is stated rather than guessed around. "Read
3019
+ * whichever argument is the only string" was the alternative, and it is worse: a rule would match an
3020
+ * argument the operator never named, widening an allow rule exactly as often as it narrows a deny
3021
+ * one. The escape that always works is a BARE tool name, which matches every call whatever its
3022
+ * shape.
3023
+ *
3024
+ * @public
3025
+ */
3026
+
3027
+ /** A policy as an operator writes it: three lists of rule strings. */
3028
+ interface PermissionRuleSet {
3029
+ readonly deny?: readonly string[];
3030
+ readonly ask?: readonly string[];
3031
+ readonly allow?: readonly string[];
3032
+ }
3033
+ /**
3034
+ * Parse a rule set into engine rules, DENY first.
3035
+ *
3036
+ * The engine is first-match, so the order emitted here IS the precedence — and a narrow deny must
3037
+ * survive a broad allow, or `Read` + `Read(path:./.env)` would read the secret the second line
3038
+ * exists to protect. `ask` sits between them: it is a restriction on something otherwise allowed.
3039
+ *
3040
+ * @throws ConfigurationError on a rule this grammar cannot read. A policy line an operator wrote and
3041
+ * this runtime silently ignored is the belief-in-an-absent-protection the whole tier removes.
3042
+ */
3043
+ declare function parsePermissionRules(set: PermissionRuleSet): PermissionRule[];
3044
+
2853
3045
  /**
2854
3046
  * Load a project's `.env` without letting it move the credential store or switch off a trust
2855
3047
  * decision.
@@ -4246,4 +4438,4 @@ interface WiringRecordInput<K extends string> {
4246
4438
  */
4247
4439
  declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
4248
4440
 
4249
- export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EffectiveToolCatalog, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReadSessionMessagesOptions, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, type UnresolvedToolSource, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, effectiveToolNames, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isValidTaskId, loadProjectEnv, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };
4441
+ export { Agent, AgentBuilder, AgentDefinition, type AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type ApprovalDecision, type ApprovalInput, type ApprovalMode, type ApprovalOutcome, type ApprovalReason, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, type BlastRadiusDecision, type BlastRadiusInput, type BlastRadiusOutcome, type BlastRadiusReason, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, type BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, type CredentialInput, type CredentialReport, type CustomTool, type DeclaredAction, type DeclaredLayer, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, type EffectiveToolCatalog, type EnvOptOut, type EnvReachabilityAudit, type EnvReachabilityInput, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, type JudgeResult, type KeepReason, type KeptArtifact, LayerOrderError, type LayerValues, ListAgentsOptions, ListResult, ListRunsOptions, type LiveAgentRegistry, LiveSessionError, type LiveSessionReason, LocalOptions, type ManagedSettings, McpServerConfig, Memory, MemoryId, type MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, type OTelSpan, type PermissionAction, PermissionEngine, type PermissionEngineOptions, type PermissionFloorContext, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, type PermissionRule, type PermissionRuleSet, Plugin, PluginsSettings, PreToolCallDecision, type Processor, Provider, type ProviderProfile, ProviderRoutingSettings, type ReadSessionMessagesOptions, type ReapPlan, type ReapPlanInput, type ReapableArtifact, type RetentionPolicy, RetentionPolicyError, Run, RunEventSink$1 as RunEventSink, RunResult, type SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, SOVEREIGN_ENV_KEYS, Security, type SecurityFloorInput, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, type SovereignEnvKey, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, type TelemetryHandle, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, type ToolResultContentBlock, type TrustLevel, type TrustPosture, type TrustPostureInput, type TrustSource, UngatedCapabilityError, UnicodeNormalizer, type UnicodeNormalizerOptions, type UnresolvedToolSource, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, effectiveToolNames, emitRunEvent, estimateTokens, evaluateBlastRadius, extractRawId, foldLayers, getPricingEntry, guardSessionDestruction, inferApiMode, isInside, isValidTaskId, loadProjectEnv, managedSettingsPathFor, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, parsePermissionRules, permissionFloorReason, planReaping, preflightCheck, readManagedSettings, readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius, withCwdMutex };