@theokit/sdk 5.1.0 → 5.2.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 +88 -0
- package/dist/{agent-ARLOD4JX.cjs → agent-GACKKINM.cjs} +7 -7
- package/dist/{agent-ARLOD4JX.cjs.map → agent-GACKKINM.cjs.map} +1 -1
- package/dist/{agent-N6WJ54ML.js → agent-VUNM33WJ.js} +6 -6
- package/dist/{agent-N6WJ54ML.js.map → agent-VUNM33WJ.js.map} +1 -1
- package/dist/{chunk-OYD3U3LY.js → chunk-43H4EBS2.js} +7 -7
- package/dist/{chunk-OYD3U3LY.js.map → chunk-43H4EBS2.js.map} +1 -1
- package/dist/{chunk-AW6F6HZR.js → chunk-AI4MXACC.js} +3 -3
- package/dist/{chunk-AW6F6HZR.js.map → chunk-AI4MXACC.js.map} +1 -1
- package/dist/{chunk-D3CCY3A2.cjs → chunk-DEJCKB65.cjs} +39 -39
- package/dist/{chunk-D3CCY3A2.cjs.map → chunk-DEJCKB65.cjs.map} +1 -1
- package/dist/{chunk-OQRGVTQF.js → chunk-DLFWMJE3.js} +3 -3
- package/dist/{chunk-OQRGVTQF.js.map → chunk-DLFWMJE3.js.map} +1 -1
- package/dist/{chunk-NYQ3IS7K.cjs → chunk-DWB3CN46.cjs} +8 -3
- package/dist/chunk-DWB3CN46.cjs.map +1 -0
- package/dist/{chunk-QYLZQ43D.cjs → chunk-IQBDR5YZ.cjs} +5 -5
- package/dist/{chunk-QYLZQ43D.cjs.map → chunk-IQBDR5YZ.cjs.map} +1 -1
- package/dist/{chunk-67SBTGMA.cjs → chunk-PEAOQMWE.cjs} +4 -4
- package/dist/{chunk-67SBTGMA.cjs.map → chunk-PEAOQMWE.cjs.map} +1 -1
- package/dist/{chunk-WMWEI3NS.js → chunk-RP3VXJMA.js} +8 -3
- package/dist/chunk-RP3VXJMA.js.map +1 -0
- package/dist/{chunk-KGANQYP7.cjs → chunk-SSIRPWWD.cjs} +5 -5
- package/dist/{chunk-KGANQYP7.cjs.map → chunk-SSIRPWWD.cjs.map} +1 -1
- package/dist/{chunk-XU6MLSC6.js → chunk-WHTMFN4Q.js} +3 -3
- package/dist/{chunk-XU6MLSC6.js.map → chunk-WHTMFN4Q.js.map} +1 -1
- package/dist/{context-4QOEWRDF.cjs → context-3YMZDEX5.cjs} +7 -7
- package/dist/{context-4QOEWRDF.cjs.map → context-3YMZDEX5.cjs.map} +1 -1
- package/dist/context-XNREEC7M.js +6 -0
- package/dist/{context-Z3CFTT3H.js.map → context-XNREEC7M.js.map} +1 -1
- package/dist/cron.cjs +6 -6
- package/dist/cron.js +5 -5
- package/dist/eval.cjs +5 -5
- package/dist/eval.js +4 -4
- package/dist/index.cjs +55 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -1
- package/dist/index.d.ts +66 -1
- package/dist/index.js +41 -8
- package/dist/index.js.map +1 -1
- 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 +16 -6
- package/dist/subagents-loader-7G76XOZU.cjs +16 -0
- package/dist/{subagents-loader-GEHYCMEX.cjs.map → subagents-loader-7G76XOZU.cjs.map} +1 -1
- package/dist/subagents-loader-PAZVOZHI.js +7 -0
- package/dist/{subagents-loader-DOBTTICM.js.map → subagents-loader-PAZVOZHI.js.map} +1 -1
- package/dist/subagents-loader.cjs +3 -3
- package/dist/subagents-loader.js +2 -2
- package/docs/harness-capability-map.md +4 -1
- package/package.json +1 -1
- package/dist/chunk-NYQ3IS7K.cjs.map +0 -1
- package/dist/chunk-WMWEI3NS.js.map +0 -1
- package/dist/context-Z3CFTT3H.js +0 -6
- package/dist/subagents-loader-DOBTTICM.js +0 -7
- package/dist/subagents-loader-GEHYCMEX.cjs +0 -16
package/dist/index.d.cts
CHANGED
|
@@ -2125,6 +2125,71 @@ declare class NoopMemoryProvider {
|
|
|
2125
2125
|
static create(): MemoryProvider;
|
|
2126
2126
|
}
|
|
2127
2127
|
|
|
2128
|
+
/**
|
|
2129
|
+
* #583 — what tool names an agent built from these options will actually offer the model.
|
|
2130
|
+
*
|
|
2131
|
+
* ## The gap this closes
|
|
2132
|
+
*
|
|
2133
|
+
* `Agent.describe()` was the only reflection surface, and it builds its catalog as
|
|
2134
|
+
* `(agent.options.tools ?? [])` — literally the array the caller passed. The SDK's own builtins were
|
|
2135
|
+
* never in it. So the two states that matter most were indistinguishable:
|
|
2136
|
+
*
|
|
2137
|
+
* Agent.create({ tools: [] }) describe().tools = [] (holds a shell)
|
|
2138
|
+
* the same, withheldBuiltinTools: ["shell"] describe().tools = [] (holds nothing)
|
|
2139
|
+
*
|
|
2140
|
+
* A consumer trying to confirm that a role declared read-only really is one had no instrument. What
|
|
2141
|
+
* they had to do instead — measured, in a real session — was ask the agent to enumerate its own
|
|
2142
|
+
* catalog: needs a credential, needs the network, and returns the list the MODEL decided to write
|
|
2143
|
+
* rather than the one the runtime holds. The same session recorded a subagent answering *"I can't
|
|
2144
|
+
* run shell commands in this environment"* while its catalog listed `shell`. An attempt measures the
|
|
2145
|
+
* model's disposition; the catalog measures its authority.
|
|
2146
|
+
*
|
|
2147
|
+
* ## Why it takes options rather than an agent id
|
|
2148
|
+
*
|
|
2149
|
+
* The asked-for shape, and it is the right one: synchronous, credential-free, and answerable BEFORE
|
|
2150
|
+
* the agent runs — so a test can compare what it declared against what the runtime will declare.
|
|
2151
|
+
* `describe()` needs a registered agent and answers too late for that.
|
|
2152
|
+
*
|
|
2153
|
+
* ## Why it does not return a bare array
|
|
2154
|
+
*
|
|
2155
|
+
* Because a bare array reads as complete, and completeness is exactly what this cannot promise: MCP
|
|
2156
|
+
* tools need a live connection, plugin tools and the reasoning `think` tool are assembled per run.
|
|
2157
|
+
* Returning `string[]` would rebuild the defect one function over. `unresolved` names the sources
|
|
2158
|
+
* that were configured and could not be enumerated — and is EMPTY when none were, which is when the
|
|
2159
|
+
* list is genuinely the whole catalog.
|
|
2160
|
+
*
|
|
2161
|
+
* @public
|
|
2162
|
+
*/
|
|
2163
|
+
|
|
2164
|
+
/** A tool source that is configured but cannot be enumerated without running the agent. */
|
|
2165
|
+
type UnresolvedToolSource = "mcp" | "plugins" | "reasoning";
|
|
2166
|
+
/** The result of {@link effectiveToolNames}. */
|
|
2167
|
+
interface EffectiveToolCatalog {
|
|
2168
|
+
/**
|
|
2169
|
+
* Every tool name resolvable from the options alone: the builtins still registered after
|
|
2170
|
+
* withholding, plus the names of the custom tools declared.
|
|
2171
|
+
*/
|
|
2172
|
+
readonly names: readonly string[];
|
|
2173
|
+
/**
|
|
2174
|
+
* Sources that ARE configured and could not be enumerated here. Empty means `names` is the
|
|
2175
|
+
* complete catalog — which is the only condition under which it may be read as one.
|
|
2176
|
+
*/
|
|
2177
|
+
readonly unresolved: readonly UnresolvedToolSource[];
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* The tool names an agent created with `options` will offer the model, as far as the options can say.
|
|
2181
|
+
*
|
|
2182
|
+
* Pure and synchronous: no credential, no network, no registration. Intended for a test that asserts
|
|
2183
|
+
* a role is as narrow as it claims.
|
|
2184
|
+
*
|
|
2185
|
+
* ```ts
|
|
2186
|
+
* const { names, unresolved } = effectiveToolNames({ tools: [], withheldBuiltinTools: ["shell"] });
|
|
2187
|
+
* expect(names).toEqual([]); // and `shell` is genuinely gone
|
|
2188
|
+
* expect(unresolved).toEqual([]); // nothing else could contribute, so [] is the whole catalog
|
|
2189
|
+
* ```
|
|
2190
|
+
*/
|
|
2191
|
+
declare function effectiveToolNames(options: AgentOptions): EffectiveToolCatalog;
|
|
2192
|
+
|
|
2128
2193
|
/**
|
|
2129
2194
|
* Task-id grammar (D368) — runtime, deliberately NOT in `types/`.
|
|
2130
2195
|
*
|
|
@@ -4163,4 +4228,4 @@ interface WiringRecordInput<K extends string> {
|
|
|
4163
4228
|
*/
|
|
4164
4229
|
declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
|
|
4165
4230
|
|
|
4166
|
-
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 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, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, 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 };
|
|
4231
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -2125,6 +2125,71 @@ declare class NoopMemoryProvider {
|
|
|
2125
2125
|
static create(): MemoryProvider;
|
|
2126
2126
|
}
|
|
2127
2127
|
|
|
2128
|
+
/**
|
|
2129
|
+
* #583 — what tool names an agent built from these options will actually offer the model.
|
|
2130
|
+
*
|
|
2131
|
+
* ## The gap this closes
|
|
2132
|
+
*
|
|
2133
|
+
* `Agent.describe()` was the only reflection surface, and it builds its catalog as
|
|
2134
|
+
* `(agent.options.tools ?? [])` — literally the array the caller passed. The SDK's own builtins were
|
|
2135
|
+
* never in it. So the two states that matter most were indistinguishable:
|
|
2136
|
+
*
|
|
2137
|
+
* Agent.create({ tools: [] }) describe().tools = [] (holds a shell)
|
|
2138
|
+
* the same, withheldBuiltinTools: ["shell"] describe().tools = [] (holds nothing)
|
|
2139
|
+
*
|
|
2140
|
+
* A consumer trying to confirm that a role declared read-only really is one had no instrument. What
|
|
2141
|
+
* they had to do instead — measured, in a real session — was ask the agent to enumerate its own
|
|
2142
|
+
* catalog: needs a credential, needs the network, and returns the list the MODEL decided to write
|
|
2143
|
+
* rather than the one the runtime holds. The same session recorded a subagent answering *"I can't
|
|
2144
|
+
* run shell commands in this environment"* while its catalog listed `shell`. An attempt measures the
|
|
2145
|
+
* model's disposition; the catalog measures its authority.
|
|
2146
|
+
*
|
|
2147
|
+
* ## Why it takes options rather than an agent id
|
|
2148
|
+
*
|
|
2149
|
+
* The asked-for shape, and it is the right one: synchronous, credential-free, and answerable BEFORE
|
|
2150
|
+
* the agent runs — so a test can compare what it declared against what the runtime will declare.
|
|
2151
|
+
* `describe()` needs a registered agent and answers too late for that.
|
|
2152
|
+
*
|
|
2153
|
+
* ## Why it does not return a bare array
|
|
2154
|
+
*
|
|
2155
|
+
* Because a bare array reads as complete, and completeness is exactly what this cannot promise: MCP
|
|
2156
|
+
* tools need a live connection, plugin tools and the reasoning `think` tool are assembled per run.
|
|
2157
|
+
* Returning `string[]` would rebuild the defect one function over. `unresolved` names the sources
|
|
2158
|
+
* that were configured and could not be enumerated — and is EMPTY when none were, which is when the
|
|
2159
|
+
* list is genuinely the whole catalog.
|
|
2160
|
+
*
|
|
2161
|
+
* @public
|
|
2162
|
+
*/
|
|
2163
|
+
|
|
2164
|
+
/** A tool source that is configured but cannot be enumerated without running the agent. */
|
|
2165
|
+
type UnresolvedToolSource = "mcp" | "plugins" | "reasoning";
|
|
2166
|
+
/** The result of {@link effectiveToolNames}. */
|
|
2167
|
+
interface EffectiveToolCatalog {
|
|
2168
|
+
/**
|
|
2169
|
+
* Every tool name resolvable from the options alone: the builtins still registered after
|
|
2170
|
+
* withholding, plus the names of the custom tools declared.
|
|
2171
|
+
*/
|
|
2172
|
+
readonly names: readonly string[];
|
|
2173
|
+
/**
|
|
2174
|
+
* Sources that ARE configured and could not be enumerated here. Empty means `names` is the
|
|
2175
|
+
* complete catalog — which is the only condition under which it may be read as one.
|
|
2176
|
+
*/
|
|
2177
|
+
readonly unresolved: readonly UnresolvedToolSource[];
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* The tool names an agent created with `options` will offer the model, as far as the options can say.
|
|
2181
|
+
*
|
|
2182
|
+
* Pure and synchronous: no credential, no network, no registration. Intended for a test that asserts
|
|
2183
|
+
* a role is as narrow as it claims.
|
|
2184
|
+
*
|
|
2185
|
+
* ```ts
|
|
2186
|
+
* const { names, unresolved } = effectiveToolNames({ tools: [], withheldBuiltinTools: ["shell"] });
|
|
2187
|
+
* expect(names).toEqual([]); // and `shell` is genuinely gone
|
|
2188
|
+
* expect(unresolved).toEqual([]); // nothing else could contribute, so [] is the whole catalog
|
|
2189
|
+
* ```
|
|
2190
|
+
*/
|
|
2191
|
+
declare function effectiveToolNames(options: AgentOptions): EffectiveToolCatalog;
|
|
2192
|
+
|
|
2128
2193
|
/**
|
|
2129
2194
|
* Task-id grammar (D368) — runtime, deliberately NOT in `types/`.
|
|
2130
2195
|
*
|
|
@@ -4163,4 +4228,4 @@ interface WiringRecordInput<K extends string> {
|
|
|
4163
4228
|
*/
|
|
4164
4229
|
declare function recordWiring<K extends string>(input: WiringRecordInput<K>): Readonly<Record<K, WiredEntity>>;
|
|
4165
4230
|
|
|
4166
|
-
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 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, UsageAccumulator, type WiredEntity, type WiringRecordInput, type WithBlastRadius, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, 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 };
|
|
4231
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -8,15 +8,15 @@ import { Workflow, agentStep } from './chunk-HFEJE7AC.js';
|
|
|
8
8
|
export { Workflow, agentStep, fn } from './chunk-HFEJE7AC.js';
|
|
9
9
|
import './chunk-GBCVPKHE.js';
|
|
10
10
|
import './chunk-HY66GLM6.js';
|
|
11
|
-
export { Cron } from './chunk-
|
|
12
|
-
import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-
|
|
13
|
-
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-
|
|
11
|
+
export { Cron } from './chunk-WHTMFN4Q.js';
|
|
12
|
+
import { MEMORY_EMBEDDING_ADAPTERS, resolveSessionDir, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-43H4EBS2.js';
|
|
13
|
+
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-43H4EBS2.js';
|
|
14
14
|
import { configure, submit, list, get, cancel, subscribe } from './chunk-K2VMFZQ5.js';
|
|
15
15
|
export { emitRunEvent } from './chunk-K2VMFZQ5.js';
|
|
16
16
|
import './chunk-AWINL3ZC.js';
|
|
17
17
|
import './chunk-K2BQQ445.js';
|
|
18
18
|
import './chunk-7SZAV6QG.js';
|
|
19
|
-
import './chunk-
|
|
19
|
+
import './chunk-AI4MXACC.js';
|
|
20
20
|
import './chunk-2SFBB54R.js';
|
|
21
21
|
import './chunk-55GB6JYQ.js';
|
|
22
22
|
import './chunk-H73MEMQB.js';
|
|
@@ -55,8 +55,8 @@ import { withCwdMutex } from './chunk-Q5EWJPRY.js';
|
|
|
55
55
|
export { withCwdMutex } from './chunk-Q5EWJPRY.js';
|
|
56
56
|
export { TASK_RESERVED_PREFIXES, isValidTaskId } from './chunk-EIQFAOFD.js';
|
|
57
57
|
import { replaceFileAtomic } from './chunk-3JHIFQ4I.js';
|
|
58
|
-
import './chunk-
|
|
59
|
-
import './chunk-
|
|
58
|
+
import './chunk-DLFWMJE3.js';
|
|
59
|
+
import './chunk-RP3VXJMA.js';
|
|
60
60
|
import './chunk-JNAA4G4H.js';
|
|
61
61
|
import { estimateTokens, CHARS_PER_TOKEN } from './chunk-6M2OIS4Y.js';
|
|
62
62
|
export { estimateTokens } from './chunk-6M2OIS4Y.js';
|
|
@@ -919,6 +919,39 @@ var NoopMemoryProvider = class {
|
|
|
919
919
|
return createNoopMemoryProvider();
|
|
920
920
|
}
|
|
921
921
|
};
|
|
922
|
+
|
|
923
|
+
// src/internal/runtime/validation/effective-tools.ts
|
|
924
|
+
var ALWAYS_REGISTERED = ["shell"];
|
|
925
|
+
var MEMORY_BUILTINS = ["memory_search", "memory_get"];
|
|
926
|
+
function effectiveToolNames(options) {
|
|
927
|
+
return { names: resolvableNames(options), unresolved: unresolvableSources(options) };
|
|
928
|
+
}
|
|
929
|
+
function resolvableNames(options) {
|
|
930
|
+
const withheld = new Set(options.withheldBuiltinTools ?? []);
|
|
931
|
+
const builtins = [
|
|
932
|
+
...ALWAYS_REGISTERED,
|
|
933
|
+
...options.memory?.enabled === true ? MEMORY_BUILTINS : []
|
|
934
|
+
];
|
|
935
|
+
return [
|
|
936
|
+
...builtins.filter((builtin) => !withheld.has(builtin)),
|
|
937
|
+
...(options.tools ?? []).map((tool) => tool.name)
|
|
938
|
+
];
|
|
939
|
+
}
|
|
940
|
+
function unresolvableSources(options) {
|
|
941
|
+
const unresolved = [];
|
|
942
|
+
if (options.mcpServers !== void 0 && Object.keys(options.mcpServers).length > 0) {
|
|
943
|
+
unresolved.push("mcp");
|
|
944
|
+
}
|
|
945
|
+
if (hasPlugins(options.plugins)) unresolved.push("plugins");
|
|
946
|
+
if (options.reasoning === true) unresolved.push("reasoning");
|
|
947
|
+
return unresolved;
|
|
948
|
+
}
|
|
949
|
+
function hasPlugins(plugins) {
|
|
950
|
+
if (plugins === void 0) return false;
|
|
951
|
+
if (Array.isArray(plugins)) return plugins.length > 0;
|
|
952
|
+
const enabled = plugins.enabled;
|
|
953
|
+
return enabled === void 0 || enabled.length > 0;
|
|
954
|
+
}
|
|
922
955
|
var JobQueue = class {
|
|
923
956
|
jobs = /* @__PURE__ */ new Map();
|
|
924
957
|
controllers = /* @__PURE__ */ new Map();
|
|
@@ -1750,7 +1783,7 @@ function isBuiltAgent(m) {
|
|
|
1750
1783
|
return typeof m.send === "function";
|
|
1751
1784
|
}
|
|
1752
1785
|
async function materialize(def, index) {
|
|
1753
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1786
|
+
const { Agent: Agent2 } = await import('./agent-VUNM33WJ.js');
|
|
1754
1787
|
return Agent2.create({
|
|
1755
1788
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1756
1789
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|
|
@@ -2284,6 +2317,6 @@ function recordWiring(input) {
|
|
|
2284
2317
|
return record;
|
|
2285
2318
|
}
|
|
2286
2319
|
|
|
2287
|
-
export { AgentFactory, Budget, EventBus, JobQueue, LayerOrderError, LiveSessionError, Memory, NoopMemoryProvider, PermissionEngine, PermissionPlugin, Plugin, Provider, RetentionPolicyError, SOVEREIGN_ENV_KEYS, Security, Skill, SkillReadTool, Squad, Task, Theokit, TokenLimiter, UngatedCapabilityError, UnicodeNormalizer, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, evaluateBlastRadius, extractRawId, foldLayers, guardSessionDestruction, inferApiMode, loadProjectEnv, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, readSessionMessages2 as readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius };
|
|
2320
|
+
export { AgentFactory, Budget, EventBus, JobQueue, LayerOrderError, LiveSessionError, Memory, NoopMemoryProvider, PermissionEngine, PermissionPlugin, Plugin, Provider, RetentionPolicyError, SOVEREIGN_ENV_KEYS, Security, Skill, SkillReadTool, Squad, Task, Theokit, TokenLimiter, UngatedCapabilityError, UnicodeNormalizer, applyMode, applySecurityFloor, auditEnvReachability, chargeAndCheckThresholds, createCounterBudgetTracker, decideApproval, describeAction, describeCredential, effectiveToolNames, evaluateBlastRadius, extractRawId, foldLayers, guardSessionDestruction, inferApiMode, loadProjectEnv, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, planReaping, preflightCheck, readSessionMessages2 as readSessionMessages, recordWiring, resolveTrustPosture, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, verifyLayerOrdering, withBlastRadius };
|
|
2288
2321
|
//# sourceMappingURL=index.js.map
|
|
2289
2322
|
//# sourceMappingURL=index.js.map
|