@dudko.dev/agent 0.0.37 → 0.0.38
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/README.md +61 -3
- package/dist/cli.js +109 -87
- package/dist/index.cjs +76 -61
- package/dist/index.d.cts +130 -2
- package/dist/index.d.ts +130 -2
- package/dist/index.js +76 -61
- package/dist/subagent-worker.js +66 -56
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -54,6 +54,51 @@ interface RunControl {
|
|
|
54
54
|
}
|
|
55
55
|
declare const createRunControl: () => RunControl;
|
|
56
56
|
|
|
57
|
+
type EgressErrorCode = 'disabled' | 'bad-url' | 'bad-protocol' | 'bad-port' | 'bad-method' | 'credentials-in-url' | 'denied-host' | 'not-allowed-host' | 'denied-address' | 'dns' | 'bad-redirect' | 'too-many-redirects' | 'too-large' | 'timeout';
|
|
58
|
+
declare class EgressError extends Error {
|
|
59
|
+
readonly code: EgressErrorCode;
|
|
60
|
+
constructor(code: EgressErrorCode, message: string);
|
|
61
|
+
toJSON(): string;
|
|
62
|
+
}
|
|
63
|
+
interface IResolvedAddress {
|
|
64
|
+
address: string;
|
|
65
|
+
family: 4 | 6;
|
|
66
|
+
}
|
|
67
|
+
interface IEgressPolicy {
|
|
68
|
+
allow?: string[];
|
|
69
|
+
deny?: string[];
|
|
70
|
+
allowPrivateNetwork?: boolean;
|
|
71
|
+
protocols?: ('https' | 'http')[];
|
|
72
|
+
ports?: number[];
|
|
73
|
+
methods?: string[];
|
|
74
|
+
maxRedirects?: number;
|
|
75
|
+
maxResponseBytes?: number;
|
|
76
|
+
timeoutMs?: number;
|
|
77
|
+
ca?: string | string[];
|
|
78
|
+
lookup?: (hostname: string) => Promise<IResolvedAddress[]>;
|
|
79
|
+
}
|
|
80
|
+
interface IResolvedEgressPolicy {
|
|
81
|
+
allow: string[];
|
|
82
|
+
deny: string[];
|
|
83
|
+
allowPrivateNetwork: boolean;
|
|
84
|
+
protocols: ('https' | 'http')[];
|
|
85
|
+
ports: number[];
|
|
86
|
+
methods: string[];
|
|
87
|
+
maxRedirects: number;
|
|
88
|
+
maxResponseBytes: number;
|
|
89
|
+
timeoutMs: number;
|
|
90
|
+
ca?: string | string[];
|
|
91
|
+
lookup: (hostname: string) => Promise<IResolvedAddress[]>;
|
|
92
|
+
}
|
|
93
|
+
declare const resolveEgressPolicy: (policy?: IEgressPolicy) => IResolvedEgressPolicy;
|
|
94
|
+
type AddressClass = 'public' | 'private' | 'never';
|
|
95
|
+
declare const classifyAddress: (address: string) => AddressClass;
|
|
96
|
+
declare const hostMatches: (host: string, pattern: string) => boolean;
|
|
97
|
+
declare const checkEgressUrl: (url: URL, policy: IResolvedEgressPolicy, method?: string) => void;
|
|
98
|
+
declare const checkRedirect: (from: URL, to: URL) => void;
|
|
99
|
+
type SafeFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
100
|
+
declare const createSafeFetch: (policy?: IEgressPolicy) => SafeFetch;
|
|
101
|
+
|
|
57
102
|
type ProviderType = 'openai' | 'anthropic' | 'openai-compatible' | 'google' | 'xai' | 'azure' | 'amazon-bedrock' | 'google-vertex' | 'deepseek' | 'gateway' | 'cloudflare';
|
|
58
103
|
type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'debug';
|
|
59
104
|
type ToolSelectionStrategy = 'all' | 'plan-narrowed' | 'search' | 'auto';
|
|
@@ -104,6 +149,26 @@ interface ISkill {
|
|
|
104
149
|
path: string;
|
|
105
150
|
content: string;
|
|
106
151
|
}[];
|
|
152
|
+
origin?: ISkillOrigin;
|
|
153
|
+
}
|
|
154
|
+
interface ISkillOrigin {
|
|
155
|
+
kind: 'learned';
|
|
156
|
+
at: number;
|
|
157
|
+
revision: number;
|
|
158
|
+
runId?: string;
|
|
159
|
+
sources?: string[];
|
|
160
|
+
fetched?: string[];
|
|
161
|
+
}
|
|
162
|
+
interface ISkillStore {
|
|
163
|
+
list: () => ISkill[] | Promise<ISkill[]>;
|
|
164
|
+
save: (skill: ISkill) => void | Promise<void>;
|
|
165
|
+
remove: (name: string) => boolean | Promise<boolean>;
|
|
166
|
+
}
|
|
167
|
+
interface ILearningConfig {
|
|
168
|
+
store?: ISkillStore;
|
|
169
|
+
maxSkills?: number;
|
|
170
|
+
maxSkillChars?: number;
|
|
171
|
+
nudge?: boolean;
|
|
107
172
|
}
|
|
108
173
|
type ToolApprovalMode = 'autopilot' | 'ask-writes' | 'ask-all' | 'read-only';
|
|
109
174
|
type ToolPermission = 'allow' | 'ask' | 'deny';
|
|
@@ -173,6 +238,8 @@ interface IAgentConfig {
|
|
|
173
238
|
/** @deprecated use `synthesizer: { model }` */
|
|
174
239
|
synthesizerModel?: string;
|
|
175
240
|
mcpServers: Record<string, IMcpServerConfig>;
|
|
241
|
+
egress?: boolean | IEgressPolicy;
|
|
242
|
+
learning?: boolean | ILearningConfig;
|
|
176
243
|
tools?: ToolSet;
|
|
177
244
|
availableTools?: string[];
|
|
178
245
|
excludedTools?: string[];
|
|
@@ -377,6 +444,22 @@ type AgentEventBody = {
|
|
|
377
444
|
id: string;
|
|
378
445
|
text: string;
|
|
379
446
|
at: 'round' | 'step' | 'final';
|
|
447
|
+
} | {
|
|
448
|
+
type: 'egress.request';
|
|
449
|
+
url: string;
|
|
450
|
+
allowed: boolean;
|
|
451
|
+
status?: number;
|
|
452
|
+
reason?: string;
|
|
453
|
+
} | {
|
|
454
|
+
type: 'skill.learned';
|
|
455
|
+
name: string;
|
|
456
|
+
description: string;
|
|
457
|
+
update: boolean;
|
|
458
|
+
chars: number;
|
|
459
|
+
sources: string[];
|
|
460
|
+
} | {
|
|
461
|
+
type: 'skill.forgotten';
|
|
462
|
+
name: string;
|
|
380
463
|
} | {
|
|
381
464
|
type: 'revisions.exceeded';
|
|
382
465
|
cap: number;
|
|
@@ -465,7 +548,10 @@ interface IAgent {
|
|
|
465
548
|
listSkills: () => {
|
|
466
549
|
name: string;
|
|
467
550
|
description: string;
|
|
551
|
+
learned?: true;
|
|
468
552
|
}[];
|
|
553
|
+
listLearnedSkills: () => ISkill[];
|
|
554
|
+
forgetSkill: (name: string) => Promise<boolean>;
|
|
469
555
|
compact: (options: ICompactOptions) => Promise<ICompactResult>;
|
|
470
556
|
setToolApprovalMode: (mode: ToolApprovalMode) => void;
|
|
471
557
|
getToolApprovalMode: () => ToolApprovalMode;
|
|
@@ -832,6 +918,48 @@ interface IClearedInfo {
|
|
|
832
918
|
}
|
|
833
919
|
declare const createToolResultClearer: (opts: IToolResultClearing, onCleared?: (info: IClearedInfo) => void) => ((messages: ModelMessage[]) => ModelMessage[]);
|
|
834
920
|
|
|
921
|
+
declare const SAVE_SKILL_TOOL = "save_skill";
|
|
922
|
+
declare const FORGET_SKILL_TOOL = "forget_skill";
|
|
923
|
+
declare const findSecret: (text: string) => string | undefined;
|
|
924
|
+
declare const normalizeSkillName: (raw: string) => string | undefined;
|
|
925
|
+
declare class MemorySkillStore implements ISkillStore {
|
|
926
|
+
private readonly skills;
|
|
927
|
+
list(): ISkill[];
|
|
928
|
+
save(skill: ISkill): void;
|
|
929
|
+
remove(name: string): boolean;
|
|
930
|
+
}
|
|
931
|
+
declare class DirSkillStore implements ISkillStore {
|
|
932
|
+
private readonly dir;
|
|
933
|
+
constructor(dir: string);
|
|
934
|
+
list(): Promise<ISkill[]>;
|
|
935
|
+
save(skill: ISkill): Promise<void>;
|
|
936
|
+
remove(name: string): Promise<boolean>;
|
|
937
|
+
}
|
|
938
|
+
interface ILearning {
|
|
939
|
+
tools: ToolSet;
|
|
940
|
+
learned: () => ISkill[];
|
|
941
|
+
forget: (name: string) => Promise<boolean>;
|
|
942
|
+
}
|
|
943
|
+
interface ISaveSkillInput {
|
|
944
|
+
name: string;
|
|
945
|
+
description: string;
|
|
946
|
+
instructions: string;
|
|
947
|
+
sources?: string[];
|
|
948
|
+
}
|
|
949
|
+
declare const createLearning: (cfg: ILearningConfig, skills: ISkill[], emit: EventHandler, warn: (message: string) => void) => Promise<ILearning>;
|
|
950
|
+
|
|
951
|
+
declare const WEB_FETCH_TOOL = "web_fetch";
|
|
952
|
+
declare const htmlToText: (html: string) => {
|
|
953
|
+
title?: string;
|
|
954
|
+
text: string;
|
|
955
|
+
};
|
|
956
|
+
interface IWebFetchOptions {
|
|
957
|
+
policy?: IEgressPolicy;
|
|
958
|
+
fetch?: SafeFetch;
|
|
959
|
+
}
|
|
960
|
+
declare const createWebFetchTool: (options?: IWebFetchOptions) => Tool;
|
|
961
|
+
declare const createEgressTools: (egress: boolean | IEgressPolicy | undefined) => ToolSet | undefined;
|
|
962
|
+
|
|
835
963
|
type SubagentIsolation = 'worker' | 'in-process';
|
|
836
964
|
interface ISubagentProfile {
|
|
837
965
|
description: string;
|
|
@@ -858,5 +986,5 @@ interface ISubagentToolOptions {
|
|
|
858
986
|
*/
|
|
859
987
|
declare const createSubagentTool: (opts: ISubagentToolOptions) => Tool;
|
|
860
988
|
|
|
861
|
-
export { FileOAuthStore, MemoryOAuthStore, NodeOAuthProvider, SUMMARY_PREFIX, ToolBudgetError, ToolDeniedError, addUsage, beginMcpOAuth, buildInstructions, checkLimits, compactHistory, createAgent, createNodeOAuthProvider, createRunControl, createSubagentTool, createToolResultClearer, decideToolPermission, defineSkill, estimateTokens, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, isReadOnlyTool, loadSkillsFromDir, markReadOnly, matchToolRule, mergeProviderOptions, normalizeUsage, parseSkillMarkdown, redactHeaders, resolveLimits, resolvePromptCaching, resolveThinking, searchTools, truncateToolModelOutput, withRollingBreakpoint, withToolOutputLimit };
|
|
862
|
-
export type { AgentEvent, AgentStage, BudgetKind, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, ILimitBreach, IMcpHttpServerConfig, IMcpServerConfig, IMcpStdioServerConfig, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IPersistence, IPlan, IPlanStep, IResolvedThinking, IRunSnapshot, ISearchToolsOptions, ISkill, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, IUsage, LogLevel, PromptCachingSetting, ProviderType, ReplanCause, ReplanTrigger, RunControl, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TokenLimitKind, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolSelectionStrategy, UsagePhase };
|
|
989
|
+
export { DirSkillStore, EgressError, FORGET_SKILL_TOOL, FileOAuthStore, MemoryOAuthStore, MemorySkillStore, NodeOAuthProvider, SAVE_SKILL_TOOL, SUMMARY_PREFIX, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, addUsage, beginMcpOAuth, buildInstructions, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, compactHistory, createAgent, createEgressTools, createLearning, createNodeOAuthProvider, createRunControl, createSafeFetch, createSubagentTool, createToolResultClearer, createWebFetchTool, decideToolPermission, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isReadOnlyTool, loadSkillsFromDir, markReadOnly, matchToolRule, mergeProviderOptions, normalizeSkillName, normalizeUsage, parseSkillMarkdown, redactHeaders, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveThinking, searchTools, truncateToolModelOutput, withRollingBreakpoint, withToolOutputLimit };
|
|
990
|
+
export type { AgentEvent, AgentStage, BudgetKind, EgressErrorCode, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IEgressPolicy, ILearning, ILearningConfig, ILimitBreach, IMcpHttpServerConfig, IMcpServerConfig, IMcpStdioServerConfig, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IPersistence, IPlan, IPlanStep, IResolvedAddress, IResolvedThinking, IRunSnapshot, ISaveSkillInput, ISearchToolsOptions, ISkill, ISkillOrigin, ISkillStore, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, IUsage, LogLevel, PromptCachingSetting, ProviderType, ReplanCause, ReplanTrigger, RunControl, SafeFetch, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TokenLimitKind, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolSelectionStrategy, UsagePhase };
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,51 @@ interface RunControl {
|
|
|
54
54
|
}
|
|
55
55
|
declare const createRunControl: () => RunControl;
|
|
56
56
|
|
|
57
|
+
type EgressErrorCode = 'disabled' | 'bad-url' | 'bad-protocol' | 'bad-port' | 'bad-method' | 'credentials-in-url' | 'denied-host' | 'not-allowed-host' | 'denied-address' | 'dns' | 'bad-redirect' | 'too-many-redirects' | 'too-large' | 'timeout';
|
|
58
|
+
declare class EgressError extends Error {
|
|
59
|
+
readonly code: EgressErrorCode;
|
|
60
|
+
constructor(code: EgressErrorCode, message: string);
|
|
61
|
+
toJSON(): string;
|
|
62
|
+
}
|
|
63
|
+
interface IResolvedAddress {
|
|
64
|
+
address: string;
|
|
65
|
+
family: 4 | 6;
|
|
66
|
+
}
|
|
67
|
+
interface IEgressPolicy {
|
|
68
|
+
allow?: string[];
|
|
69
|
+
deny?: string[];
|
|
70
|
+
allowPrivateNetwork?: boolean;
|
|
71
|
+
protocols?: ('https' | 'http')[];
|
|
72
|
+
ports?: number[];
|
|
73
|
+
methods?: string[];
|
|
74
|
+
maxRedirects?: number;
|
|
75
|
+
maxResponseBytes?: number;
|
|
76
|
+
timeoutMs?: number;
|
|
77
|
+
ca?: string | string[];
|
|
78
|
+
lookup?: (hostname: string) => Promise<IResolvedAddress[]>;
|
|
79
|
+
}
|
|
80
|
+
interface IResolvedEgressPolicy {
|
|
81
|
+
allow: string[];
|
|
82
|
+
deny: string[];
|
|
83
|
+
allowPrivateNetwork: boolean;
|
|
84
|
+
protocols: ('https' | 'http')[];
|
|
85
|
+
ports: number[];
|
|
86
|
+
methods: string[];
|
|
87
|
+
maxRedirects: number;
|
|
88
|
+
maxResponseBytes: number;
|
|
89
|
+
timeoutMs: number;
|
|
90
|
+
ca?: string | string[];
|
|
91
|
+
lookup: (hostname: string) => Promise<IResolvedAddress[]>;
|
|
92
|
+
}
|
|
93
|
+
declare const resolveEgressPolicy: (policy?: IEgressPolicy) => IResolvedEgressPolicy;
|
|
94
|
+
type AddressClass = 'public' | 'private' | 'never';
|
|
95
|
+
declare const classifyAddress: (address: string) => AddressClass;
|
|
96
|
+
declare const hostMatches: (host: string, pattern: string) => boolean;
|
|
97
|
+
declare const checkEgressUrl: (url: URL, policy: IResolvedEgressPolicy, method?: string) => void;
|
|
98
|
+
declare const checkRedirect: (from: URL, to: URL) => void;
|
|
99
|
+
type SafeFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
|
|
100
|
+
declare const createSafeFetch: (policy?: IEgressPolicy) => SafeFetch;
|
|
101
|
+
|
|
57
102
|
type ProviderType = 'openai' | 'anthropic' | 'openai-compatible' | 'google' | 'xai' | 'azure' | 'amazon-bedrock' | 'google-vertex' | 'deepseek' | 'gateway' | 'cloudflare';
|
|
58
103
|
type LogLevel = 'none' | 'error' | 'warn' | 'info' | 'debug';
|
|
59
104
|
type ToolSelectionStrategy = 'all' | 'plan-narrowed' | 'search' | 'auto';
|
|
@@ -104,6 +149,26 @@ interface ISkill {
|
|
|
104
149
|
path: string;
|
|
105
150
|
content: string;
|
|
106
151
|
}[];
|
|
152
|
+
origin?: ISkillOrigin;
|
|
153
|
+
}
|
|
154
|
+
interface ISkillOrigin {
|
|
155
|
+
kind: 'learned';
|
|
156
|
+
at: number;
|
|
157
|
+
revision: number;
|
|
158
|
+
runId?: string;
|
|
159
|
+
sources?: string[];
|
|
160
|
+
fetched?: string[];
|
|
161
|
+
}
|
|
162
|
+
interface ISkillStore {
|
|
163
|
+
list: () => ISkill[] | Promise<ISkill[]>;
|
|
164
|
+
save: (skill: ISkill) => void | Promise<void>;
|
|
165
|
+
remove: (name: string) => boolean | Promise<boolean>;
|
|
166
|
+
}
|
|
167
|
+
interface ILearningConfig {
|
|
168
|
+
store?: ISkillStore;
|
|
169
|
+
maxSkills?: number;
|
|
170
|
+
maxSkillChars?: number;
|
|
171
|
+
nudge?: boolean;
|
|
107
172
|
}
|
|
108
173
|
type ToolApprovalMode = 'autopilot' | 'ask-writes' | 'ask-all' | 'read-only';
|
|
109
174
|
type ToolPermission = 'allow' | 'ask' | 'deny';
|
|
@@ -173,6 +238,8 @@ interface IAgentConfig {
|
|
|
173
238
|
/** @deprecated use `synthesizer: { model }` */
|
|
174
239
|
synthesizerModel?: string;
|
|
175
240
|
mcpServers: Record<string, IMcpServerConfig>;
|
|
241
|
+
egress?: boolean | IEgressPolicy;
|
|
242
|
+
learning?: boolean | ILearningConfig;
|
|
176
243
|
tools?: ToolSet;
|
|
177
244
|
availableTools?: string[];
|
|
178
245
|
excludedTools?: string[];
|
|
@@ -377,6 +444,22 @@ type AgentEventBody = {
|
|
|
377
444
|
id: string;
|
|
378
445
|
text: string;
|
|
379
446
|
at: 'round' | 'step' | 'final';
|
|
447
|
+
} | {
|
|
448
|
+
type: 'egress.request';
|
|
449
|
+
url: string;
|
|
450
|
+
allowed: boolean;
|
|
451
|
+
status?: number;
|
|
452
|
+
reason?: string;
|
|
453
|
+
} | {
|
|
454
|
+
type: 'skill.learned';
|
|
455
|
+
name: string;
|
|
456
|
+
description: string;
|
|
457
|
+
update: boolean;
|
|
458
|
+
chars: number;
|
|
459
|
+
sources: string[];
|
|
460
|
+
} | {
|
|
461
|
+
type: 'skill.forgotten';
|
|
462
|
+
name: string;
|
|
380
463
|
} | {
|
|
381
464
|
type: 'revisions.exceeded';
|
|
382
465
|
cap: number;
|
|
@@ -465,7 +548,10 @@ interface IAgent {
|
|
|
465
548
|
listSkills: () => {
|
|
466
549
|
name: string;
|
|
467
550
|
description: string;
|
|
551
|
+
learned?: true;
|
|
468
552
|
}[];
|
|
553
|
+
listLearnedSkills: () => ISkill[];
|
|
554
|
+
forgetSkill: (name: string) => Promise<boolean>;
|
|
469
555
|
compact: (options: ICompactOptions) => Promise<ICompactResult>;
|
|
470
556
|
setToolApprovalMode: (mode: ToolApprovalMode) => void;
|
|
471
557
|
getToolApprovalMode: () => ToolApprovalMode;
|
|
@@ -832,6 +918,48 @@ interface IClearedInfo {
|
|
|
832
918
|
}
|
|
833
919
|
declare const createToolResultClearer: (opts: IToolResultClearing, onCleared?: (info: IClearedInfo) => void) => ((messages: ModelMessage[]) => ModelMessage[]);
|
|
834
920
|
|
|
921
|
+
declare const SAVE_SKILL_TOOL = "save_skill";
|
|
922
|
+
declare const FORGET_SKILL_TOOL = "forget_skill";
|
|
923
|
+
declare const findSecret: (text: string) => string | undefined;
|
|
924
|
+
declare const normalizeSkillName: (raw: string) => string | undefined;
|
|
925
|
+
declare class MemorySkillStore implements ISkillStore {
|
|
926
|
+
private readonly skills;
|
|
927
|
+
list(): ISkill[];
|
|
928
|
+
save(skill: ISkill): void;
|
|
929
|
+
remove(name: string): boolean;
|
|
930
|
+
}
|
|
931
|
+
declare class DirSkillStore implements ISkillStore {
|
|
932
|
+
private readonly dir;
|
|
933
|
+
constructor(dir: string);
|
|
934
|
+
list(): Promise<ISkill[]>;
|
|
935
|
+
save(skill: ISkill): Promise<void>;
|
|
936
|
+
remove(name: string): Promise<boolean>;
|
|
937
|
+
}
|
|
938
|
+
interface ILearning {
|
|
939
|
+
tools: ToolSet;
|
|
940
|
+
learned: () => ISkill[];
|
|
941
|
+
forget: (name: string) => Promise<boolean>;
|
|
942
|
+
}
|
|
943
|
+
interface ISaveSkillInput {
|
|
944
|
+
name: string;
|
|
945
|
+
description: string;
|
|
946
|
+
instructions: string;
|
|
947
|
+
sources?: string[];
|
|
948
|
+
}
|
|
949
|
+
declare const createLearning: (cfg: ILearningConfig, skills: ISkill[], emit: EventHandler, warn: (message: string) => void) => Promise<ILearning>;
|
|
950
|
+
|
|
951
|
+
declare const WEB_FETCH_TOOL = "web_fetch";
|
|
952
|
+
declare const htmlToText: (html: string) => {
|
|
953
|
+
title?: string;
|
|
954
|
+
text: string;
|
|
955
|
+
};
|
|
956
|
+
interface IWebFetchOptions {
|
|
957
|
+
policy?: IEgressPolicy;
|
|
958
|
+
fetch?: SafeFetch;
|
|
959
|
+
}
|
|
960
|
+
declare const createWebFetchTool: (options?: IWebFetchOptions) => Tool;
|
|
961
|
+
declare const createEgressTools: (egress: boolean | IEgressPolicy | undefined) => ToolSet | undefined;
|
|
962
|
+
|
|
835
963
|
type SubagentIsolation = 'worker' | 'in-process';
|
|
836
964
|
interface ISubagentProfile {
|
|
837
965
|
description: string;
|
|
@@ -858,5 +986,5 @@ interface ISubagentToolOptions {
|
|
|
858
986
|
*/
|
|
859
987
|
declare const createSubagentTool: (opts: ISubagentToolOptions) => Tool;
|
|
860
988
|
|
|
861
|
-
export { FileOAuthStore, MemoryOAuthStore, NodeOAuthProvider, SUMMARY_PREFIX, ToolBudgetError, ToolDeniedError, addUsage, beginMcpOAuth, buildInstructions, checkLimits, compactHistory, createAgent, createNodeOAuthProvider, createRunControl, createSubagentTool, createToolResultClearer, decideToolPermission, defineSkill, estimateTokens, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, isReadOnlyTool, loadSkillsFromDir, markReadOnly, matchToolRule, mergeProviderOptions, normalizeUsage, parseSkillMarkdown, redactHeaders, resolveLimits, resolvePromptCaching, resolveThinking, searchTools, truncateToolModelOutput, withRollingBreakpoint, withToolOutputLimit };
|
|
862
|
-
export type { AgentEvent, AgentStage, BudgetKind, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, ILimitBreach, IMcpHttpServerConfig, IMcpServerConfig, IMcpStdioServerConfig, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IPersistence, IPlan, IPlanStep, IResolvedThinking, IRunSnapshot, ISearchToolsOptions, ISkill, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, IUsage, LogLevel, PromptCachingSetting, ProviderType, ReplanCause, ReplanTrigger, RunControl, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TokenLimitKind, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolSelectionStrategy, UsagePhase };
|
|
989
|
+
export { DirSkillStore, EgressError, FORGET_SKILL_TOOL, FileOAuthStore, MemoryOAuthStore, MemorySkillStore, NodeOAuthProvider, SAVE_SKILL_TOOL, SUMMARY_PREFIX, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, addUsage, beginMcpOAuth, buildInstructions, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, compactHistory, createAgent, createEgressTools, createLearning, createNodeOAuthProvider, createRunControl, createSafeFetch, createSubagentTool, createToolResultClearer, createWebFetchTool, decideToolPermission, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isReadOnlyTool, loadSkillsFromDir, markReadOnly, matchToolRule, mergeProviderOptions, normalizeSkillName, normalizeUsage, parseSkillMarkdown, redactHeaders, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveThinking, searchTools, truncateToolModelOutput, withRollingBreakpoint, withToolOutputLimit };
|
|
990
|
+
export type { AgentEvent, AgentStage, BudgetKind, EgressErrorCode, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IEgressPolicy, ILearning, ILearningConfig, ILimitBreach, IMcpHttpServerConfig, IMcpServerConfig, IMcpStdioServerConfig, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IPersistence, IPlan, IPlanStep, IResolvedAddress, IResolvedThinking, IRunSnapshot, ISaveSkillInput, ISearchToolsOptions, ISkill, ISkillOrigin, ISkillStore, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, IUsage, LogLevel, PromptCachingSetting, ProviderType, ReplanCause, ReplanTrigger, RunControl, SafeFetch, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TokenLimitKind, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolSelectionStrategy, UsagePhase };
|