@theokit/agents 5.0.0 → 6.1.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/dist/{bridge-entry-DD_j60GX.d.ts → bridge-entry-BlKfMDWb.d.ts} +45 -2
- package/dist/bridge.d.ts +2 -1
- package/dist/bridge.js +7 -1
- package/dist/{chunk-JXR45RAW.js → chunk-MDFEPVAN.js} +98 -2
- package/dist/chunk-MDFEPVAN.js.map +1 -0
- package/dist/index.d.ts +14 -5
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
- package/LICENSE +0 -201
- package/dist/chunk-JXR45RAW.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { PluginsSettings, Plugin, ProviderRoutingSettings, AgentDefinition, BudgetTracker, CustomTool, GoalLoopAgent, GoalOptions, runGoalLoop, GoalEvent, GoalResult, InlineSkill, Agent as Agent$1, ListAgentsOptions, ListResult, SDKAgentInfo } from '@theokit/sdk';
|
|
2
|
+
export { CustomTool, GoalEvent, GoalLoopAgent, GoalOptions, GoalResult, JudgeCredentialError, JudgeResult, Provider, SDKAgent, SessionRecord, Squad, Tool, Verdict } from '@theokit/sdk';
|
|
3
|
+
import { G as Guardrail, L as LoopStrategy, R as ReflectionStrategy, C as CompiledAgentOptions, M as MainLoopMeta, a as CompiledTool, b as ReasoningEffort, c as RoundStreamFactory, S as StreamEvent, D as DelegationResult, d as ContextWindowOptions, e as SkillsOptions, T as ToolOptions, A as ApprovalOptions, H as HumanInTheLoopOptions, f as AgentManifestEntry, g as HitlDecision, s as streamAgentUIMessages, h as ApprovalPosture } from './bridge-entry-BlKfMDWb.js';
|
|
4
|
+
export { i as AGENT_BRAND, j as AfterToolCallContext, k as AgentBuilder, l as AgentDefinition, m as AgentDefinitionError, n as AgentExecutionContext, o as AgentManifest, p as AgentManifestSource, q as AgentManifestTool, r as AgentOptions, t as AgentRoute, u as AgentRouteContext, v as AgentRunInfo, w as AgentStreamEvent, x as AgentTurnMetadata, y as AgentsPluginOptions, z as ApiErrorContext, B as ApiErrorDecision, E as ApiErrorPolicy, F as ApprovalRequiredEvent, I as ArtifactChunkEvent, J as ArtifactStartEvent, K as BackgroundDelegation, N as BeforeToolCallContext, O as BudgetExceededError, P as BudgetOptions, Q as CheckpointSavedEvent, U as CompiledContextWindow, V as ContextualTool, W as CostBudgetExceededError, X as DEFAULT_MAX_ITERATIONS, Y as DefineAgentConfig, Z as DefinicaoOuThunk, _ as DelegateFn, $ as DelegateOptions, a0 as DelegationBudgetExceededError, a1 as DelegationError, a2 as DoneEvent, a3 as ErrorEvent, a4 as FileEditEvent, a5 as GuardrailAction, a6 as GuardrailPhase, a7 as GuardrailResult, a8 as GuardrailViolationError, a9 as HookHandlers, aa as InferAgentInput, ab as InferAgentToolNames, ac as IterationEvent, ad as LLMCallContext, ae as LoopFinishReason, af as LoopOutcome, ag as LoopStrategyConfig, ah as MainLoopOptions, ai as McpApprovalSpec, aj as McpFileError, ak as McpRegistryConfig, al as McpRequestContext, am as McpSelection, an as PartialToolCallEvent, ao as PolicyHandler, ap as ProcessInputContext, aq as ReflectionContext, ar as ReflectionResult, as as ReflectionStrategyConfig, at as RunStartedEvent, au as ScoreVerdict, av as ScoredDelegation, aw as Scorer, ax as SdkAgentHandle, ay as SdkMessage, az as SdkSendOptions, aA as SdkTurnHandle, aB as Segment, aC as SkillsRequestContext, aD as SkillsSelection, aE as StateUpdateEvent, aF as TextDeltaEvent, aG as ThinkingEvent, aH as TimeoutAction, aI as ToolCallEvent, aJ as ToolCallVeto, aK as ToolHooks, aL as ToolHooksPlugin, aM as ToolResultEvent, aN as ToolWalkResult, aO as ToolboxOptions, aP as ToolboxWalkResult, aQ as agentsPlugin, aR as buildModelSelection, aS as compileAgentDefinition, aT as compileAgentModule, aU as compileContextWindow, aV as compileProjectContext, aW as compileSkills, aX as compileTools, aY as createAgentExecutionContext, aZ as createApiErrorHandler, a_ as createSdkAgentStream, a$ as createThinkTagExtractor, b0 as createToolHooksPlugin, b1 as delegate, b2 as delegateBackground, b3 as delegateWithScoring, b4 as extractThinkTagStream, b5 as generateAgentManifest, b6 as generateAgentRoutes, b7 as isAgentContext, b8 as isAgentDefinition, b9 as isApprovalRequired, ba as isDone, bb as isError, bc as isPartialToolCall, bd as isTextDelta, be as isToolCall, bf as isToolResult, bg as ladderReflectionStrategy, bh as loadMcpJson, bi as loopStrategyConfigSchema, bj as mcpRegistry, bk as mcpToolApprovals, bl as noopReflectionStrategy, bm as presentUIMessageStream, bn as projectContextMetadataOnlyKnobs, bo as reasoningEffortOf, bp as reflectionStrategyConfigSchema, bq as resolveEnabledSkills, br as resolveLoopStrategy, bs as resolveMcpServers, bt as runWithApiErrorHandling, bu as streamAgentResponse, bv as toAgentFactory, bw as translateSdkEvent } from './bridge-entry-BlKfMDWb.js';
|
|
3
5
|
export * from '@theokit/sdk/errors';
|
|
4
6
|
export { ConfigurationError, BudgetExceededError as WindowBudgetExceededError } from '@theokit/sdk/errors';
|
|
5
|
-
import { PluginsSettings, Plugin, ProviderRoutingSettings, AgentDefinition, BudgetTracker, CustomTool, GoalLoopAgent, GoalOptions, runGoalLoop, GoalEvent, GoalResult, InlineSkill } from '@theokit/sdk';
|
|
6
|
-
export { Agent, CustomTool, GoalEvent, GoalLoopAgent, GoalOptions, GoalResult, JudgeCredentialError, JudgeResult, Provider, SDKAgent, SessionRecord, Squad, Tool, Verdict } from '@theokit/sdk';
|
|
7
7
|
import { RetryOptions } from '@theokit/sdk/retry';
|
|
8
8
|
export * from '@theokit/sdk/retry';
|
|
9
9
|
import { CompressibleMessage } from '@theokit/sdk/compaction';
|
|
@@ -1118,4 +1118,13 @@ declare class InProcessApprovalRequiredError extends Error {
|
|
|
1118
1118
|
*/
|
|
1119
1119
|
declare function streamAgentTurnInProcess(mod: unknown, apiKey: string, input: StreamAgentTurnInProcessInput, deps?: StreamAgentTurnDeps): AsyncGenerator<UIMessageChunk>;
|
|
1120
1120
|
|
|
1121
|
-
|
|
1121
|
+
type ListOptionsSemPaginacao = ListAgentsOptions & {
|
|
1122
|
+
limit?: never;
|
|
1123
|
+
cursor?: never;
|
|
1124
|
+
};
|
|
1125
|
+
type AgentComListaEstreitada = Omit<typeof Agent$1, 'list'> & {
|
|
1126
|
+
list(options?: ListOptionsSemPaginacao): Promise<Omit<ListResult<SDKAgentInfo>, 'nextCursor'>>;
|
|
1127
|
+
};
|
|
1128
|
+
declare const Agent: AgentComListaEstreitada;
|
|
1129
|
+
|
|
1130
|
+
export { type A2AAuth, type A2ACapabilities, type A2ASkill, type A2AToolConfig, AcpClient, AcpMessageDecoder, type AcpTransport, Agent, type AgentCard, type AgentConfig, AgentConfigCapability, AgentManifestEntry, AgentRunner, AgentRunnerBuilder, type AgentRunnerRunOptions, ApprovalOptions, ApprovalPosture, type BuildAgentCardOptions, type Capability, CapabilityConflictError, CapabilityPreset, CapabilityRegistry, CheckpointCapability, type CompactionCallOptions, type CompactionStrategyConfig, CompiledAgentOptions, type CompiledAgentOptionsDraft, CompiledTool, ContextWindowCapability, type CostGuardOptions, DEFAULT_KEEP_TOKENS, DelegationResult, FieldCapability, type FinalizedDraft, GoalRunner, type GoalRunnerDeps, Guardrail, GuardrailsCapability, HitlDecision, HumanInTheLoopCapability, HumanInTheLoopOptions, type InProcessApprovalRequest, InProcessApprovalRequiredError, type InProcessAwaitApproval, LoopStrategy, MCP_PROTOCOL_VERSION, MainLoopCapability, MainLoopMeta, type McpJsonSchema, type McpServerInfo, McpServersCapability, type McpToolDescriptor, MemoryCapability, ModelCapability, type OutputModerationOptions, type PiiOptions, PluginsCapability, ProjectContextCapability, type PromptInjectionOptions, type ProvenanceEntry, ReasoningEffort, ReflectionStrategy, RoundStreamFactory, RunContextCapability, SettingSourcesCapability, SkillsCapability, SkillsOptionsCapability, SkillsResolverCapability, type StreamAgentTurnDeps, type StreamAgentTurnInProcessInput, StreamEvent, SubAgentsCapability, type Summarize, type ToolComNome, type ToolDeclaration, ToolOptions, ToolboxCapability, type ToolboxSource, ToolsCapability, Toolset, ToolsetError, type TranscriptCompactionStrategy, UnknownCapabilityError, applyCapabilities, buildAgentCard, buildMcpToolDescriptors, compactionStrategyConfigSchema, costGuard, createA2ATool, createDraft, deriveConversationId, encodeAcpMessage, estimateTokens, mcpServerInfo, moderateOutputStream, outputModeration, parseConversationId, piiDetector, promptInjectionDetector, resolveCompactionStrategy, runInputGuards, runOutputGuards, setOnce, streamAgentTurnInProcess, streamAgentUIMessages, tokenBudgetCompactionStrategy, unicodeNormalizer, wellKnownCardPath };
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
GoalRunner,
|
|
16
16
|
GuardrailViolationError,
|
|
17
17
|
JudgeCredentialError,
|
|
18
|
+
McpFileError,
|
|
18
19
|
agentsPlugin,
|
|
19
20
|
buildModelSelection,
|
|
20
21
|
compactionStrategyConfigSchema,
|
|
@@ -49,6 +50,7 @@ import {
|
|
|
49
50
|
isToolCall,
|
|
50
51
|
isToolResult,
|
|
51
52
|
ladderReflectionStrategy,
|
|
53
|
+
loadMcpJson,
|
|
52
54
|
loopStrategyConfigSchema,
|
|
53
55
|
mcpRegistry,
|
|
54
56
|
mcpToolApprovals,
|
|
@@ -59,6 +61,7 @@ import {
|
|
|
59
61
|
presentUIMessageStream,
|
|
60
62
|
projectContextMetadataOnlyKnobs,
|
|
61
63
|
promptInjectionDetector,
|
|
64
|
+
reasoningEffortOf,
|
|
62
65
|
reflectionStrategyConfigSchema,
|
|
63
66
|
resolveCompactionStrategy,
|
|
64
67
|
resolveLoopStrategy,
|
|
@@ -73,11 +76,14 @@ import {
|
|
|
73
76
|
toolRuntimeName,
|
|
74
77
|
translateSdkEvent,
|
|
75
78
|
unicodeNormalizer
|
|
76
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-MDFEPVAN.js";
|
|
77
80
|
import {
|
|
78
81
|
__name
|
|
79
82
|
} from "./chunk-7QVYU63E.js";
|
|
80
83
|
|
|
84
|
+
// src/index.ts
|
|
85
|
+
import { Agent as AgentDoSdk } from "@theokit/sdk";
|
|
86
|
+
|
|
81
87
|
// src/capability/capability.ts
|
|
82
88
|
import { isDeepStrictEqual } from "util";
|
|
83
89
|
var CapabilityConflictError = class extends Error {
|
|
@@ -936,7 +942,7 @@ var AcpClient = class {
|
|
|
936
942
|
};
|
|
937
943
|
|
|
938
944
|
// src/index.ts
|
|
939
|
-
import {
|
|
945
|
+
import { Squad, Tool, Provider } from "@theokit/sdk";
|
|
940
946
|
import { SubAgent } from "@theokit/sdk/a2a";
|
|
941
947
|
import { assertNoSymlinkEscape, isForbiddenPath, safePathJoin } from "@theokit/sdk/path-safety";
|
|
942
948
|
import { CONTEXT_WINDOW_FLOOR, CONTEXT_WINDOW_MARGIN, ContextWindowMarginError, resolveEffectiveContextWindow } from "@theokit/sdk/compaction";
|
|
@@ -1020,6 +1026,9 @@ function streamAgentTurnInProcess(mod, apiKey, input, deps = {
|
|
|
1020
1026
|
})();
|
|
1021
1027
|
}
|
|
1022
1028
|
__name(streamAgentTurnInProcess, "streamAgentTurnInProcess");
|
|
1029
|
+
|
|
1030
|
+
// src/index.ts
|
|
1031
|
+
var Agent = AgentDoSdk;
|
|
1023
1032
|
export {
|
|
1024
1033
|
AGENT_BRAND,
|
|
1025
1034
|
AcpClient,
|
|
@@ -1055,6 +1064,7 @@ export {
|
|
|
1055
1064
|
JudgeCredentialError,
|
|
1056
1065
|
MCP_PROTOCOL_VERSION,
|
|
1057
1066
|
MainLoopCapability,
|
|
1067
|
+
McpFileError,
|
|
1058
1068
|
McpServersCapability,
|
|
1059
1069
|
MemoryCapability,
|
|
1060
1070
|
ModelCapability,
|
|
@@ -1118,6 +1128,7 @@ export {
|
|
|
1118
1128
|
isToolCall,
|
|
1119
1129
|
isToolResult,
|
|
1120
1130
|
ladderReflectionStrategy,
|
|
1131
|
+
loadMcpJson,
|
|
1121
1132
|
loadSubagentDefinition,
|
|
1122
1133
|
loopStrategyConfigSchema,
|
|
1123
1134
|
mcpRegistry,
|
|
@@ -1131,6 +1142,7 @@ export {
|
|
|
1131
1142
|
presentUIMessageStream,
|
|
1132
1143
|
projectContextMetadataOnlyKnobs,
|
|
1133
1144
|
promptInjectionDetector,
|
|
1145
|
+
reasoningEffortOf,
|
|
1134
1146
|
reflectionStrategyConfigSchema,
|
|
1135
1147
|
resolveCompactionStrategy,
|
|
1136
1148
|
resolveEffectiveContextWindow,
|