@gencode/agents 0.5.0 → 0.6.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 +31 -0
- package/dist/builtin-provider-DweGOw8P.js +71 -0
- package/dist/index.d.ts +224 -54
- package/dist/index.js +90 -82
- package/package.json +1 -3
- package/dist/builtin-provider-_CdSlTJE.js +0 -71
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { S as AgentsConfig, _ as saveAgentsConfig, a as listAgents, b as AgentConfig, c as normalizeAgentId, d as resolveAgentDir, f as resolveAgentIdByBinding, g as resolveModelString, h as resolveModelFallbacks, i as getAgentConfig, l as removeAgent, m as resolveDefaultAgentId, n as addBinding, o as listBindings, p as resolveAgentsConfigPath, s as loadAgentsConfig, t as addAgent, u as removeBindings, v as updateAgentIdentity, x as AgentModelConfig, y as AgentBinding } from "./index-pXTy2jgd.js";
|
|
2
2
|
import * as _gencode_shared0 from "@gencode/shared";
|
|
3
3
|
import { AgentCustomProgressEvent, AgentProgressEvent, AgentProgressEvent as AgentProgressEvent$1, AgentProgressEvent as AgentProgressEvent$2, CallbackEventPayload, CallbackEventPayload as CallbackEventPayload$1, Channel, Channel as Channel$1, CollapseSpan, HitlCheckpoint, HitlCheckpoint as HitlCheckpoint$1, HitlHistoryEntry, HitlRequest, HitlRequest as HitlRequest$1, HitlResolution, HitlResolution as HitlResolution$1, HitlStatus, HitlToolContext, HitlToolContext as HitlToolContext$1, ModelUsageCheckpoint, PausedRunState, PausedRunState as PausedRunState$1, ReadStateRecord, RunResultPayload, RunResultPayload as RunResultPayload$1, SessionContextSnapshot, SessionMemorySnapshot, SessionMetadata, SessionMetadata as SessionMetadata$1, SessionSummary, SessionSummary as SessionSummary$1, SnipRecord, ToolResultReference, UiToolExtra, UiToolOutputSchema, UiToolPausedState, UiToolRequest, UiToolResult, UiToolValidationResult } from "@gencode/shared";
|
|
4
|
-
import { AssistantMessage, Message } from "@mariozechner/pi-ai";
|
|
5
4
|
import { AgentMessage, AgentTool } from "@mariozechner/pi-agent-core";
|
|
5
|
+
import { AssistantMessage, Message } from "@mariozechner/pi-ai";
|
|
6
6
|
|
|
7
7
|
//#region src/loop-detection/tool-loop-detection.d.ts
|
|
8
8
|
type ToolLoopDetectionConfig = {
|
|
@@ -168,9 +168,11 @@ declare function buildSkillsPrompt(skills: Skill[]): string;
|
|
|
168
168
|
//#region src/agents/definitions.d.ts
|
|
169
169
|
declare const SYSTEM_AGENTS_DIR = "/aimax/agents";
|
|
170
170
|
type AgentConfigSource = "system" | "user" | "project";
|
|
171
|
+
type AgentVisibility = "public" | "internal";
|
|
171
172
|
type AgentDefinition = {
|
|
172
173
|
name: string;
|
|
173
174
|
description: string;
|
|
175
|
+
visibility?: AgentVisibility;
|
|
174
176
|
tools?: string[];
|
|
175
177
|
disallowedTools?: string[];
|
|
176
178
|
model?: string;
|
|
@@ -190,30 +192,99 @@ type AgentDirectoryCandidate = {
|
|
|
190
192
|
dir: string;
|
|
191
193
|
source: AgentConfigSource;
|
|
192
194
|
};
|
|
193
|
-
type AgentRuntimePolicy = {
|
|
195
|
+
type AgentRuntimePolicy = AgentDefinitionsContext & {
|
|
196
|
+
activeAgent?: AgentDefinition;
|
|
197
|
+
requestedAgentName?: string;
|
|
198
|
+
};
|
|
199
|
+
type AgentRuntimePolicyInput = Partial<AgentDefinitionsContext> & {
|
|
194
200
|
activeAgent?: AgentDefinition;
|
|
195
|
-
availableAgents?: AgentDefinition[];
|
|
196
201
|
requestedAgentName?: string;
|
|
197
202
|
};
|
|
203
|
+
type AgentDefinitionsStats = {
|
|
204
|
+
total: number;
|
|
205
|
+
public: number;
|
|
206
|
+
internal: number;
|
|
207
|
+
};
|
|
208
|
+
type AgentDefinitionsContext = {
|
|
209
|
+
allAgents: AgentDefinition[];
|
|
210
|
+
availableAgents: AgentDefinition[];
|
|
211
|
+
findPublic(name: string | undefined): AgentDefinition | undefined;
|
|
212
|
+
findAny(name: string | undefined): AgentDefinition | undefined;
|
|
213
|
+
stats(): AgentDefinitionsStats;
|
|
214
|
+
};
|
|
198
215
|
declare function agentDirCandidates(options: AgentScanOptions): AgentDirectoryCandidate[];
|
|
199
216
|
declare function scanAgentDefinitions(options: AgentScanOptions): Promise<AgentDefinition[]>;
|
|
217
|
+
declare function createAgentDefinitionsContext(params?: {
|
|
218
|
+
allAgents?: AgentDefinition[];
|
|
219
|
+
availableAgents?: AgentDefinition[];
|
|
220
|
+
}): AgentDefinitionsContext;
|
|
221
|
+
declare function resolveAgentDefinitionsContext(options: AgentScanOptions & {
|
|
222
|
+
agentPolicy?: AgentRuntimePolicyInput;
|
|
223
|
+
}): Promise<AgentDefinitionsContext>;
|
|
200
224
|
declare function loadAgentDefinitionsFromDir(dir: string, source: AgentConfigSource): Promise<AgentDefinition[]>;
|
|
201
225
|
declare function parseAgentDefinition(content: string, options: {
|
|
202
226
|
sourcePath: string;
|
|
203
227
|
source: AgentConfigSource;
|
|
204
228
|
}): AgentDefinition | undefined;
|
|
205
|
-
declare function findAgentDefinition(agents: AgentDefinition[], name: string | undefined
|
|
229
|
+
declare function findAgentDefinition(agents: AgentDefinition[], name: string | undefined, options?: {
|
|
230
|
+
includeInternal?: boolean;
|
|
231
|
+
}): AgentDefinition | undefined;
|
|
232
|
+
declare function agentVisibility(agent: AgentDefinition): AgentVisibility;
|
|
233
|
+
declare function publicAgentDefinitions(agents: AgentDefinition[]): AgentDefinition[];
|
|
206
234
|
declare function filterSkillsForAgent(skills: Skill[], agent?: AgentDefinition): Skill[];
|
|
207
235
|
declare function filterToolsForAgent(tools: AgentTool[], agent?: AgentDefinition): AgentTool[];
|
|
208
236
|
declare function buildAgentDelegationPrompt(agents: AgentDefinition[]): string;
|
|
209
237
|
declare function buildAgentTaskPrompt(agent: AgentDefinition, task: string): string;
|
|
210
238
|
//#endregion
|
|
239
|
+
//#region src/session/session-storage.d.ts
|
|
240
|
+
/**
|
|
241
|
+
* Unified session storage layer.
|
|
242
|
+
*
|
|
243
|
+
* When encryption is enabled, all session file content is encrypted at rest
|
|
244
|
+
* using AES-GCM. The on-disk envelope is designed to be readable from both
|
|
245
|
+
* Node and browser Web Crypto implementations.
|
|
246
|
+
*/
|
|
247
|
+
declare const DEFAULT_SESSION_ENCRYPTION_KEY = "aimax-session-default-key-v1";
|
|
248
|
+
type SessionEncryptionKey = {
|
|
249
|
+
keyId: string;
|
|
250
|
+
secret: string;
|
|
251
|
+
};
|
|
252
|
+
type SessionEncryptionConfig = {
|
|
253
|
+
primaryKeyId: string;
|
|
254
|
+
keys: SessionEncryptionKey[];
|
|
255
|
+
};
|
|
256
|
+
declare function createSessionEncryptionConfig(primarySecret?: string, legacySecrets?: string[]): SessionEncryptionConfig;
|
|
257
|
+
declare function setDefaultSessionEncryptionConfig(config?: SessionEncryptionConfig): void;
|
|
258
|
+
declare function getDefaultSessionEncryptionConfig(): SessionEncryptionConfig;
|
|
259
|
+
declare function encryptContent(plain: string, config?: SessionEncryptionConfig): string;
|
|
260
|
+
declare function decryptContent(raw: string, config?: SessionEncryptionConfig): string;
|
|
261
|
+
declare function isEncryptedContent(raw: string): boolean;
|
|
262
|
+
declare function readSessionFile(filePath: string, encryptionConfig?: SessionEncryptionConfig): Promise<string | null>;
|
|
263
|
+
declare function writeSessionFile(filePath: string, content: string, encrypt?: boolean, encryptionConfig?: SessionEncryptionConfig): Promise<void>;
|
|
264
|
+
declare function appendSessionFile(filePath: string, line: string, encrypt?: boolean, encryptionConfig?: SessionEncryptionConfig): Promise<void>;
|
|
265
|
+
declare function atomicWriteSessionFile(filePath: string, content: string, encrypt?: boolean, encryptionConfig?: SessionEncryptionConfig): Promise<void>;
|
|
266
|
+
declare function readSessionFileContent(filePath: string, encryptionConfig?: SessionEncryptionConfig): Promise<string | null>;
|
|
267
|
+
//#endregion
|
|
211
268
|
//#region src/types.d.ts
|
|
212
269
|
/** Context injected when this run is itself a subagent */
|
|
213
270
|
type SubagentContext = {
|
|
214
271
|
/** Nesting depth of this run (root = 0, first child = 1, …) */depth: number; /** Session ID of the parent that spawned this subagent */
|
|
215
272
|
parentSessionId: string;
|
|
216
273
|
};
|
|
274
|
+
type AutoSkillReviewMode = "off" | "gate" | "dry_run" | "write";
|
|
275
|
+
type AutoSkillReviewReasonCode = "tool_call_volume" | "tool_diversity" | "state_changing_tools" | "tool_errors" | "multi_turn";
|
|
276
|
+
type AutoSkillReviewGateScope = "session" | "currentRun" | "reviewWindow";
|
|
277
|
+
type AutoSkillReviewGateRuleConfig = {
|
|
278
|
+
enabled: false;
|
|
279
|
+
min?: number;
|
|
280
|
+
toolNames?: string[];
|
|
281
|
+
} | {
|
|
282
|
+
enabled?: true;
|
|
283
|
+
min: number;
|
|
284
|
+
toolNames?: string[];
|
|
285
|
+
};
|
|
286
|
+
type AutoSkillReviewGateConfig = Partial<Record<AutoSkillReviewReasonCode, number | AutoSkillReviewGateRuleConfig>>;
|
|
287
|
+
type AutoSkillReviewGatesConfig = Partial<Record<AutoSkillReviewGateScope, AutoSkillReviewGateConfig>>;
|
|
217
288
|
type SessionPathScope = {
|
|
218
289
|
subagent?: {
|
|
219
290
|
parentSessionId: string;
|
|
@@ -227,7 +298,8 @@ type SessionPathScope = {
|
|
|
227
298
|
};
|
|
228
299
|
type AgentRunParamsBase = {
|
|
229
300
|
/** User data directory path (e.g. /data/user1) */dataDir: string; /** Optional current project directory used as the default cwd context for repository/code work. */
|
|
230
|
-
projectDir?: string; /**
|
|
301
|
+
projectDir?: string; /** Optional system-level agent definition directory; defaults to /aimax/agents. */
|
|
302
|
+
systemAgentsDir?: string; /** The .aimax child directory used to persist session state; defaults to "sessions". */
|
|
231
303
|
sessionStoreName?: string; /** Optional nested path scope for session state, used for subagent-owned sessions. */
|
|
232
304
|
sessionPathScope?: SessionPathScope; /** Session ID to resume; if omitted, a new session is created */
|
|
233
305
|
sessionId?: string; /** Message ID for correlating events */
|
|
@@ -267,8 +339,9 @@ type AgentRunParamsBase = {
|
|
|
267
339
|
* Additional skill registry directories supplied by the CLI.
|
|
268
340
|
* Each directory contains skill child directories such as <dir>/<skill-name>/SKILL.md.
|
|
269
341
|
*/
|
|
270
|
-
skillsLoadPaths?: string[]; /** Whether to encrypt session data at rest using
|
|
271
|
-
encryptSessions?: boolean; /**
|
|
342
|
+
skillsLoadPaths?: string[]; /** Whether to encrypt session data at rest using AES-GCM. */
|
|
343
|
+
encryptSessions?: boolean; /** Optional explicit encryption key ring used for session data at rest. */
|
|
344
|
+
sessionEncryption?: SessionEncryptionConfig; /** Memory system options (optional) */
|
|
272
345
|
memory?: {
|
|
273
346
|
/** Explicit memory provider id (overrides plugins.slots.memory) */providerId?: string; /** Explicit plugin id for memory provider (used when providerId not set) */
|
|
274
347
|
pluginId?: string; /** Whether memory replies should include source path/line hints */
|
|
@@ -277,6 +350,16 @@ type AgentRunParamsBase = {
|
|
|
277
350
|
messaging?: {
|
|
278
351
|
enabled?: boolean; /** Human-readable configured channel list */
|
|
279
352
|
channels?: string[];
|
|
353
|
+
}; /** Internal auto-skill controls. CLI wiring is intentionally separate. */
|
|
354
|
+
autoSkills?: {
|
|
355
|
+
load?: {
|
|
356
|
+
/** Defaults to false. When false, the main agent cannot see or load learned auto-skills. */enabled?: boolean;
|
|
357
|
+
};
|
|
358
|
+
review?: {
|
|
359
|
+
/** Defaults to "write": run post-run auto-skill review when gates pass unless explicitly disabled. */mode?: AutoSkillReviewMode; /** Defaults to 1. Hard cap for review attempts that complete per session. */
|
|
360
|
+
maxReviewsPerSession?: number; /** Scope-based all-AND gates for session, current run, and review window statistics. */
|
|
361
|
+
gates?: AutoSkillReviewGatesConfig;
|
|
362
|
+
};
|
|
280
363
|
};
|
|
281
364
|
/**
|
|
282
365
|
* Maximum number of recent user turns to include in context.
|
|
@@ -284,7 +367,7 @@ type AgentRunParamsBase = {
|
|
|
284
367
|
* 0 or undefined means no limit.
|
|
285
368
|
*/
|
|
286
369
|
historyLimit?: number; /** Internal multi-agent prompt/model/tool policy resolved at run time. */
|
|
287
|
-
agentPolicy?:
|
|
370
|
+
agentPolicy?: AgentRuntimePolicyInput;
|
|
288
371
|
};
|
|
289
372
|
/** Parameters for running an agent session */
|
|
290
373
|
type AgentRunParams = AgentRunParamsBase & ({
|
|
@@ -873,7 +956,8 @@ declare function runAgent(params: AgentRunParams, _registryForTesting?: Subagent
|
|
|
873
956
|
declare const DEFAULT_SESSION_STORE_NAME = "sessions";
|
|
874
957
|
type SessionPathOptions = {
|
|
875
958
|
storeName?: string; /** Whether session data should be encrypted at rest. */
|
|
876
|
-
encryptSessions?: boolean;
|
|
959
|
+
encryptSessions?: boolean; /** Optional explicit encryption key ring used for session file reads/writes. */
|
|
960
|
+
sessionEncryption?: SessionEncryptionConfig;
|
|
877
961
|
subagent?: {
|
|
878
962
|
parentSessionId: string;
|
|
879
963
|
/**
|
|
@@ -997,48 +1081,6 @@ declare function loadSessionContextSnapshot(dataDir: string, sessionId: string,
|
|
|
997
1081
|
declare function inspectSession(dataDir: string, sessionId: string, options?: SessionPathOptions): Promise<SessionInspection>;
|
|
998
1082
|
declare function exportSession(dataDir: string, sessionId: string, options?: SessionPathOptions): Promise<SessionExport>;
|
|
999
1083
|
//#endregion
|
|
1000
|
-
//#region src/session/session-storage.d.ts
|
|
1001
|
-
/**
|
|
1002
|
-
* Unified session storage layer.
|
|
1003
|
-
*
|
|
1004
|
-
* When encryption is enabled, all session file content is compressed/encoded
|
|
1005
|
-
* via lz-string before writing and decompressed/decoded on read.
|
|
1006
|
-
* The marker prefix `__LZENC__` lets readers distinguish encrypted content
|
|
1007
|
-
* from plain-text even after a configuration change.
|
|
1008
|
-
*/
|
|
1009
|
-
/** Compress + encode a UTF-8 string into a base64-safe encrypted payload. */
|
|
1010
|
-
declare function encryptContent(plain: string): string;
|
|
1011
|
-
/** Detect whether a payload is encrypted, then decode + decompress. */
|
|
1012
|
-
declare function decryptContent(raw: string): string;
|
|
1013
|
-
/** Returns `true` when the raw string starts with the encryption marker. */
|
|
1014
|
-
declare function isEncryptedContent(raw: string): boolean;
|
|
1015
|
-
/**
|
|
1016
|
-
* Read a session file, transparently decrypting if the content is encrypted.
|
|
1017
|
-
* Returns `null` when the file does not exist (ENOENT).
|
|
1018
|
-
*/
|
|
1019
|
-
declare function readSessionFile(filePath: string): Promise<string | null>;
|
|
1020
|
-
/**
|
|
1021
|
-
* Write content to a session file, optionally encrypting it.
|
|
1022
|
-
*/
|
|
1023
|
-
declare function writeSessionFile(filePath: string, content: string, encrypt?: boolean): Promise<void>;
|
|
1024
|
-
/**
|
|
1025
|
-
* Append content to a session file, optionally encrypting the *entire* file.
|
|
1026
|
-
*
|
|
1027
|
-
* For JSONL files in encrypted mode we must read-decrypt-append-encrypt-write
|
|
1028
|
-
* because lz-string output is not append-friendly.
|
|
1029
|
-
*/
|
|
1030
|
-
declare function appendSessionFile(filePath: string, line: string, encrypt?: boolean): Promise<void>;
|
|
1031
|
-
/**
|
|
1032
|
-
* Atomically write content via a temp file + rename, optionally encrypting.
|
|
1033
|
-
*/
|
|
1034
|
-
declare function atomicWriteSessionFile(filePath: string, content: string, encrypt?: boolean): Promise<void>;
|
|
1035
|
-
/**
|
|
1036
|
-
* Read a session file and return its content as a string, transparently
|
|
1037
|
-
* handling encrypted files. This replaces direct `fs.createReadStream` usage
|
|
1038
|
-
* for session transcript scanning.
|
|
1039
|
-
*/
|
|
1040
|
-
declare function readSessionFileContent(filePath: string): Promise<string | null>;
|
|
1041
|
-
//#endregion
|
|
1042
1084
|
//#region src/context/session-context-store.d.ts
|
|
1043
1085
|
type PersistedToolResult = {
|
|
1044
1086
|
content: string;
|
|
@@ -1344,6 +1386,95 @@ declare function resolveMemoryProvider(params: {
|
|
|
1344
1386
|
} | null;
|
|
1345
1387
|
declare function resetMemoryProviderRegistryForTests(): void;
|
|
1346
1388
|
//#endregion
|
|
1389
|
+
//#region src/auto-skills/paths.d.ts
|
|
1390
|
+
declare function autoSkillsDir(dataDir: string): string;
|
|
1391
|
+
//#endregion
|
|
1392
|
+
//#region src/auto-skills/types.d.ts
|
|
1393
|
+
type AutoSkillSource = "auto";
|
|
1394
|
+
type AutoSkillStatus = "active" | "archived";
|
|
1395
|
+
type AutoSkillCategory = {
|
|
1396
|
+
path: string;
|
|
1397
|
+
name: string;
|
|
1398
|
+
description: string;
|
|
1399
|
+
createdBy?: string;
|
|
1400
|
+
};
|
|
1401
|
+
type AutoSkillIndexEntry = {
|
|
1402
|
+
skillId: string;
|
|
1403
|
+
name: string;
|
|
1404
|
+
description: string;
|
|
1405
|
+
categoryPath: string;
|
|
1406
|
+
source: AutoSkillSource;
|
|
1407
|
+
status: AutoSkillStatus;
|
|
1408
|
+
rootDir: string;
|
|
1409
|
+
skillDir: string;
|
|
1410
|
+
skillFile: string;
|
|
1411
|
+
metadataFile?: string;
|
|
1412
|
+
tags: string[];
|
|
1413
|
+
relatedSkills: string[];
|
|
1414
|
+
confidence?: number;
|
|
1415
|
+
createdAt?: string;
|
|
1416
|
+
updatedAt?: string;
|
|
1417
|
+
};
|
|
1418
|
+
type AutoSkillListItem = {
|
|
1419
|
+
skillId: string;
|
|
1420
|
+
name: string;
|
|
1421
|
+
description: string;
|
|
1422
|
+
categoryPath: string;
|
|
1423
|
+
source: AutoSkillSource;
|
|
1424
|
+
};
|
|
1425
|
+
type AutoSkillSearchResult = AutoSkillListItem & {
|
|
1426
|
+
score: number;
|
|
1427
|
+
};
|
|
1428
|
+
type AutoSkillViewResult = AutoSkillListItem & {
|
|
1429
|
+
status: AutoSkillStatus;
|
|
1430
|
+
content: string;
|
|
1431
|
+
path: string;
|
|
1432
|
+
skillDir: string;
|
|
1433
|
+
filePath?: string;
|
|
1434
|
+
tags?: string[];
|
|
1435
|
+
relatedSkills?: string[];
|
|
1436
|
+
};
|
|
1437
|
+
type AutoSkillsLoaderOptions = {
|
|
1438
|
+
dataDir?: string;
|
|
1439
|
+
rootDir?: string;
|
|
1440
|
+
includeArchived?: boolean;
|
|
1441
|
+
maxSkillBytes?: number;
|
|
1442
|
+
maxResourceBytes?: number;
|
|
1443
|
+
};
|
|
1444
|
+
type AutoSkillListOptions = {
|
|
1445
|
+
categoryPath?: string;
|
|
1446
|
+
recursive?: boolean;
|
|
1447
|
+
};
|
|
1448
|
+
type AutoSkillSearchOptions = {
|
|
1449
|
+
query: string;
|
|
1450
|
+
limit?: number;
|
|
1451
|
+
};
|
|
1452
|
+
type AutoSkillViewOptions = {
|
|
1453
|
+
skillId: string;
|
|
1454
|
+
filePath?: string;
|
|
1455
|
+
};
|
|
1456
|
+
//#endregion
|
|
1457
|
+
//#region src/auto-skills/loader.d.ts
|
|
1458
|
+
declare function createAutoSkillsLoader(options: AutoSkillsLoaderOptions): AutoSkillsLoader;
|
|
1459
|
+
declare class AutoSkillsLoader {
|
|
1460
|
+
readonly rootDir: string;
|
|
1461
|
+
private readonly includeArchived;
|
|
1462
|
+
private readonly maxSkillBytes;
|
|
1463
|
+
private readonly maxResourceBytes;
|
|
1464
|
+
constructor(options: AutoSkillsLoaderOptions);
|
|
1465
|
+
autoSkillCategories(): Promise<AutoSkillCategory[]>;
|
|
1466
|
+
autoSkillList(options?: AutoSkillListOptions): Promise<AutoSkillListItem[]>;
|
|
1467
|
+
autoSkillSearch(options: AutoSkillSearchOptions): Promise<AutoSkillSearchResult[]>;
|
|
1468
|
+
autoSkillView(options: AutoSkillViewOptions): Promise<AutoSkillViewResult>;
|
|
1469
|
+
loadIndex(): Promise<AutoSkillIndexEntry[]>;
|
|
1470
|
+
private loadIndexState;
|
|
1471
|
+
private parseEntriesFromManifest;
|
|
1472
|
+
private visibleEntries;
|
|
1473
|
+
private visibleEntriesFrom;
|
|
1474
|
+
private optionsHash;
|
|
1475
|
+
private loadEntry;
|
|
1476
|
+
}
|
|
1477
|
+
//#endregion
|
|
1347
1478
|
//#region src/commands/types.d.ts
|
|
1348
1479
|
type SlashCommandSpec = {
|
|
1349
1480
|
name: string;
|
|
@@ -1374,6 +1505,7 @@ type SystemPromptParams = {
|
|
|
1374
1505
|
};
|
|
1375
1506
|
toolNames?: string[];
|
|
1376
1507
|
toolSummaries?: Record<string, string>;
|
|
1508
|
+
autoSkillCategories?: AutoSkillCategory[];
|
|
1377
1509
|
promptMode?: PromptMode;
|
|
1378
1510
|
bootstrapWarnings?: string[];
|
|
1379
1511
|
memoryCitationsMode?: MemoryCitationsMode;
|
|
@@ -1907,6 +2039,43 @@ declare function createSkillLoadTool(params: {
|
|
|
1907
2039
|
reportSkillUsed?: SkillUsedReporter;
|
|
1908
2040
|
}): AgentTool<typeof skillLoadSchema, SkillLoadToolResult>;
|
|
1909
2041
|
//#endregion
|
|
2042
|
+
//#region src/tools/auto-skills.d.ts
|
|
2043
|
+
declare const autoSkillCategoriesSchema: TObject<{}>;
|
|
2044
|
+
declare const autoSkillListSchema: TObject<{
|
|
2045
|
+
categoryPath: TOptional<TString>;
|
|
2046
|
+
recursive: TOptional<TBoolean>;
|
|
2047
|
+
}>;
|
|
2048
|
+
declare const autoSkillSearchSchema: TObject<{
|
|
2049
|
+
query: TString;
|
|
2050
|
+
limit: TOptional<TNumber>;
|
|
2051
|
+
}>;
|
|
2052
|
+
declare const autoSkillViewSchema: TObject<{
|
|
2053
|
+
skillId: TString;
|
|
2054
|
+
filePath: TOptional<TString>;
|
|
2055
|
+
}>;
|
|
2056
|
+
type AutoSkillCategoriesToolResult = {
|
|
2057
|
+
categories: AutoSkillCategory[];
|
|
2058
|
+
count: number;
|
|
2059
|
+
error?: string;
|
|
2060
|
+
};
|
|
2061
|
+
type AutoSkillListToolResult = {
|
|
2062
|
+
skills: AutoSkillListItem[];
|
|
2063
|
+
count: number;
|
|
2064
|
+
error?: string;
|
|
2065
|
+
};
|
|
2066
|
+
type AutoSkillSearchToolResult = {
|
|
2067
|
+
skills: AutoSkillSearchResult[];
|
|
2068
|
+
count: number;
|
|
2069
|
+
error?: string;
|
|
2070
|
+
};
|
|
2071
|
+
type AutoSkillViewToolResult = Partial<AutoSkillViewResult> & {
|
|
2072
|
+
error?: string;
|
|
2073
|
+
};
|
|
2074
|
+
declare function createAutoSkillCategoriesTool(dataDir: string): AgentTool<typeof autoSkillCategoriesSchema, AutoSkillCategoriesToolResult>;
|
|
2075
|
+
declare function createAutoSkillListTool(dataDir: string): AgentTool<typeof autoSkillListSchema, AutoSkillListToolResult>;
|
|
2076
|
+
declare function createAutoSkillSearchTool(dataDir: string): AgentTool<typeof autoSkillSearchSchema, AutoSkillSearchToolResult>;
|
|
2077
|
+
declare function createAutoSkillViewTool(dataDir: string): AgentTool<typeof autoSkillViewSchema, AutoSkillViewToolResult>;
|
|
2078
|
+
//#endregion
|
|
1910
2079
|
//#region src/tools/image.d.ts
|
|
1911
2080
|
declare const imageSchema: TObject<{
|
|
1912
2081
|
image: TString;
|
|
@@ -1962,7 +2131,7 @@ type BatchSpawnResult = {
|
|
|
1962
2131
|
status: "done" | "partial_error" | "error";
|
|
1963
2132
|
results: BatchSpawnItemResult[];
|
|
1964
2133
|
};
|
|
1965
|
-
type InheritedRunParams = Pick<AgentRunParams, "plugins" | "skillsLoadPaths" | "memory" | "messaging" | "historyLimit" | "onProgress" | "messageId" | "sessionStoreName" | "agentPolicy">;
|
|
2134
|
+
type InheritedRunParams = Pick<AgentRunParams, "plugins" | "skillsLoadPaths" | "memory" | "messaging" | "historyLimit" | "onProgress" | "messageId" | "sessionStoreName" | "autoSkills" | "agentPolicy" | "sessionEncryption">;
|
|
1966
2135
|
/** Formats the announce message injected into the parent session when a subagent completes. */
|
|
1967
2136
|
declare function buildSubagentAnnounceMessage(params: {
|
|
1968
2137
|
task: string;
|
|
@@ -2109,8 +2278,9 @@ type SubagentToolsContext = {
|
|
|
2109
2278
|
depth: number;
|
|
2110
2279
|
channel: AgentRunParams["channel"];
|
|
2111
2280
|
llm: AgentRunParams["llm"];
|
|
2112
|
-
inheritedRunParams?: Pick<AgentRunParams, "plugins" | "skillsLoadPaths" | "memory" | "messaging" | "historyLimit" | "onProgress" | "messageId" | "sessionStoreName" | "agentPolicy">;
|
|
2281
|
+
inheritedRunParams?: Pick<AgentRunParams, "plugins" | "skillsLoadPaths" | "memory" | "messaging" | "historyLimit" | "onProgress" | "messageId" | "sessionStoreName" | "autoSkills" | "agentPolicy" | "sessionEncryption">;
|
|
2113
2282
|
loopDetection?: ToolLoopDetectionConfig;
|
|
2283
|
+
autoSkillsLoadEnabled?: boolean;
|
|
2114
2284
|
memoryOptions?: MemoryToolOptions;
|
|
2115
2285
|
pluginSkillDirs?: string[];
|
|
2116
2286
|
skillsLoadPaths?: string[];
|
|
@@ -2579,4 +2749,4 @@ declare function formatClarifyResolution(resolution: HitlResolution): string;
|
|
|
2579
2749
|
declare function formatReviewResolution(resolution: HitlResolution): string;
|
|
2580
2750
|
declare function buildResumeNarration(resolution: HitlResolution, kind: string): string;
|
|
2581
2751
|
//#endregion
|
|
2582
|
-
export { AgentBinding, AgentConfig, type AgentConfigSource, type AgentCustomProgressEvent, type AgentDefinition, type AgentDirectoryCandidate, AgentModelConfig, type AgentProgressEvent, type AgentRunParams, type AgentRunResult, type AgentRuntimePolicy, type AgentScanOptions, AgentsConfig, type ArtifactOpInput, type ArtifactOperation, type ArtifactOperationInput, type ArtifactOperationName, type ArtifactOperationType, BOOTSTRAP_FILE_NAMES, BOOTSTRAP_MAX_CHARS, BOOTSTRAP_TOTAL_MAX_CHARS, type BootstrapContextFile, type BootstrapEnsureResult, type BootstrapFile, type BootstrapMountResult, type BootstrapMountStatus, type CallbackEventPayload, type CallbackPayload, type Channel, type ContextManager, type CronExecutionRecord, DEFAULT_SESSION_STORE_NAME, type EmbeddingProvider, type EmbeddingProviderContext, type EmbeddingProviderFactory, type EmbeddingProviderRegistration, HITL_MESSAGES, type HitlPauseContext, HitlPauseSignal, type HitlToolContext, MAX_ARTIFACT_CONTENT_CHARS, MAX_CHILDREN_PER_SESSION, MAX_SUBAGENT_DEPTH, type MemoryCallOptions, type MemoryChangeSource, type MemoryChangedEvent, type MemoryChangedHandler, MemoryIndexManager, type MemoryProvider, type MemoryProviderContext, type MemoryProviderFactory, type MemoryProviderRegistration, type MemoryProviderStatus, type MemoryRebuildSummary, type MemorySearchOptions, type MemorySearchResult, type NormalizedPluginsConfig, PLUGIN_MANIFEST_FILENAME, PLUGIN_MANIFEST_FILENAMES, type PersistedSubagentRunRecord, type PersistedToolResult, type PluginApi, type PluginCandidate, type PluginConfigUiHint, type PluginCustomProgressInput, type PluginDiagnostic, type PluginDiscoveryOptions, type PluginDiscoveryResult, type PluginEntryConfig, type PluginExecutionRuntime, type PluginHookAfterCompactionEvent, type PluginHookAfterPromptBuildEvent, type PluginHookAfterToolCallEvent, type PluginHookAgentContext, type PluginHookAgentEndEvent, type PluginHookAssistantMessageEndEvent, type PluginHookBeforeCompactionEvent, type PluginHookBeforeCompactionResult, type PluginHookBeforeModelResolveEvent, type PluginHookBeforeModelResolveResult, type PluginHookBeforePromptBuildEvent, type PluginHookBeforePromptBuildResult, type PluginHookBeforeToolCallEvent, type PluginHookBeforeToolCallResult, type PluginHookDreamGateEvent, type PluginHookDreamGateResult, type PluginHookHandlerMap, type PluginHookLlmInputEvent, type PluginHookLlmOutputEvent, type PluginHookMemoryChangedEvent, type PluginHookName, PluginHookRegistry, type PluginHookSessionEndEvent, type PluginHookSessionResetEvent, type PluginHookSessionStartEvent, type PluginKind, type PluginManifest, type PluginManifestLoadResult, type PluginManifestRegistry, type PluginOrigin, type PluginProgressEmitter, type PluginRecord, type PluginRegistry, type PluginRuntime, type PluginRuntimeContext, type PluginSystem, type PluginSystemOptions, type PluginToolOptions, PluginToolRegistry, type PluginUiToolDescriptor, type PluginUiToolOptions, type PluginsConfig, type PluginsConfigValidationResult, type RegisteredPluginTool, type ResumeOptions, type ResumeValidationResult, type RunResultPayload, SYSTEM_AGENTS_DIR, type SessionContextStore, type SessionExport, type SessionInspection, type SessionMetadata, type SessionMetadataUpdate, type SessionSummary, type Skill, type SkillDirectory, type SkillViewResult, type SlashCommandList, type SubagentContext, SubagentRegistry, type SubagentRunRecord, type SubagentStatus, type SubagentToolsContext, type SystemPromptParams, type ToolLoopDetectionConfig, type TranscriptEntry, type UiToolInputSchema, type UiToolOptions, UiToolPauseSignal, addAgent, addBinding, agentDirCandidates, aimaxDir, appendArtifactOperation, appendCronExecutionRecord, appendRecentToMemory, appendSessionFile, appendToMemory, appendTranscriptEntry, approvalSummaryFromResolution, artifactsPath, atomicWriteSessionFile, bootstrapMountLayout, buildAgentDelegationPrompt, buildAgentTaskPrompt, buildBootstrapContextFiles, buildResumeNarration, buildSkillsPrompt, buildSubagentAnnounceMessage, buildSystemPrompt, cleanupOldSubagentRecords, clearPendingHitl, clearPendingUiTool, collapseLogPath, contextSnapshotPath, createAgentTools, createApplyPatchTool, createBashTool, createBatchSubagentSpawnTool, createBuiltinMemoryProvider, createContextManager, createEditFileTool, createExecTool, createImageTool, createListDirTool, createMemoryAppendTool, createMemoryForgetTool, createMemoryGetTool, createMemoryListTool, createMemoryLogTool, createMemorySearchTool, createMemoryUpdateTool, createMemoryWriteTool, createPendingHitl, createPendingUiTool, createPluginProgressEmitter, createPluginRuntime, createProcessTool, createReadFileTool, createSession, createSessionContextStore, createSessionSearchTool, createSkillListTool, createSkillLoadTool, createSubagentSpawnTool, createSubagentsTool, createUiTool, createWriteFileTool, cronExecutionsPath, decryptContent, defaultUiToolInputSchema, deleteMemoryFile, discoverAIMaxPlugins, encryptContent, ensureBootstrapMountLayout, ensureSession, exportSession, filterSkillsForAgent, filterToolsForAgent, findAgentDefinition, findSkillByName, formatApprovalResolution, formatClarifyResolution, formatReviewResolution, generateSessionTitle, getAgentConfig, getMemoryLines, hasBootstrapSentinel, hitlHistoryPath, initializePluginSystem, inspectBootstrapMountLayout, inspectSession, isBootstrapMountLayoutReady, isEncryptedContent, isHitlPauseSignal, isUiToolPauseSignal, listAgents, listAvailableSlashCommands, listBindings, listMemoryFiles, listSessionSummaries, listSessions, listSubagentRunsFromDisk, loadAgentDefinitionsFromDir, loadAgentsConfig, loadArtifactOperations, loadBootstrapFiles, loadCronExecutionRecords, readPendingHitl as loadPendingHitl, readPendingHitl, readPendingUiTool as loadPendingUiTool, readPendingUiTool, loadPluginManifest, loadPluginManifestRegistry, loadPlugins, loadSessionContextSnapshot, loadSessionMetadata, loadSkillView, loadSkills, loadSkillsFromDirs, loadSkillsWithPluginDirs, loadSubagentRegistryFromDisk, loadTranscript, memoryDir, metadataPath, normalizeAgentId, normalizePluginsConfig, normalizeSessionStoreName, parseAgentDefinition, pendingHitlPath, pendingUiToolPath, primaryMemoryPath, readHitlHistory, readMemoryFile, readPrimaryMemory, readSessionFile, readSessionFileContent, registerEmbeddingProvider, registerMemoryProvider, removeAgent, removeBindings, replaceMemoryFile, resetEmbeddingProviderRegistryForTests, resetMemoryProviderRegistryForTests, resolveAgentDir, resolveAgentIdByBinding, resolveAgentsConfigPath, resolveDefaultAgentId, resolveEmbeddingProvider, resolveHitlRequest, resolveHitlRequest as resolvePendingHitl, resolveMemoryProvider, resolveModelFallbacks, resolveModelString, resolvePendingUiTool, resolvePluginManifestPath, rewriteTranscript, runAgent, saveAgentsConfig, saveSessionMetadata, saveSubagentRegistryToDisk, scanAgentDefinitions, searchMemory, sessionDir, sessionMemoryPath, sessionsDir, skillsDir, toolResultsDir, transcriptPath, transitionHitlStatus, updateAgentIdentity, updateSessionMetadata, validatePluginsConfig, validateResume, wrapToolsWithHooks, writeSessionFile };
|
|
2752
|
+
export { AgentBinding, AgentConfig, type AgentConfigSource, type AgentCustomProgressEvent, type AgentDefinition, type AgentDefinitionsContext, type AgentDefinitionsStats, type AgentDirectoryCandidate, AgentModelConfig, type AgentProgressEvent, type AgentRunParams, type AgentRunResult, type AgentRuntimePolicy, type AgentRuntimePolicyInput, type AgentScanOptions, type AgentVisibility, AgentsConfig, type ArtifactOpInput, type ArtifactOperation, type ArtifactOperationInput, type ArtifactOperationName, type ArtifactOperationType, type AutoSkillCategory, type AutoSkillIndexEntry, type AutoSkillListItem, type AutoSkillListOptions, type AutoSkillSearchOptions, type AutoSkillSearchResult, type AutoSkillStatus, type AutoSkillViewOptions, type AutoSkillViewResult, AutoSkillsLoader, type AutoSkillsLoaderOptions, BOOTSTRAP_FILE_NAMES, BOOTSTRAP_MAX_CHARS, BOOTSTRAP_TOTAL_MAX_CHARS, type BootstrapContextFile, type BootstrapEnsureResult, type BootstrapFile, type BootstrapMountResult, type BootstrapMountStatus, type CallbackEventPayload, type CallbackPayload, type Channel, type ContextManager, type CronExecutionRecord, DEFAULT_SESSION_ENCRYPTION_KEY, DEFAULT_SESSION_STORE_NAME, type EmbeddingProvider, type EmbeddingProviderContext, type EmbeddingProviderFactory, type EmbeddingProviderRegistration, HITL_MESSAGES, type HitlPauseContext, HitlPauseSignal, type HitlToolContext, MAX_ARTIFACT_CONTENT_CHARS, MAX_CHILDREN_PER_SESSION, MAX_SUBAGENT_DEPTH, type MemoryCallOptions, type MemoryChangeSource, type MemoryChangedEvent, type MemoryChangedHandler, MemoryIndexManager, type MemoryProvider, type MemoryProviderContext, type MemoryProviderFactory, type MemoryProviderRegistration, type MemoryProviderStatus, type MemoryRebuildSummary, type MemorySearchOptions, type MemorySearchResult, type NormalizedPluginsConfig, PLUGIN_MANIFEST_FILENAME, PLUGIN_MANIFEST_FILENAMES, type PersistedSubagentRunRecord, type PersistedToolResult, type PluginApi, type PluginCandidate, type PluginConfigUiHint, type PluginCustomProgressInput, type PluginDiagnostic, type PluginDiscoveryOptions, type PluginDiscoveryResult, type PluginEntryConfig, type PluginExecutionRuntime, type PluginHookAfterCompactionEvent, type PluginHookAfterPromptBuildEvent, type PluginHookAfterToolCallEvent, type PluginHookAgentContext, type PluginHookAgentEndEvent, type PluginHookAssistantMessageEndEvent, type PluginHookBeforeCompactionEvent, type PluginHookBeforeCompactionResult, type PluginHookBeforeModelResolveEvent, type PluginHookBeforeModelResolveResult, type PluginHookBeforePromptBuildEvent, type PluginHookBeforePromptBuildResult, type PluginHookBeforeToolCallEvent, type PluginHookBeforeToolCallResult, type PluginHookDreamGateEvent, type PluginHookDreamGateResult, type PluginHookHandlerMap, type PluginHookLlmInputEvent, type PluginHookLlmOutputEvent, type PluginHookMemoryChangedEvent, type PluginHookName, PluginHookRegistry, type PluginHookSessionEndEvent, type PluginHookSessionResetEvent, type PluginHookSessionStartEvent, type PluginKind, type PluginManifest, type PluginManifestLoadResult, type PluginManifestRegistry, type PluginOrigin, type PluginProgressEmitter, type PluginRecord, type PluginRegistry, type PluginRuntime, type PluginRuntimeContext, type PluginSystem, type PluginSystemOptions, type PluginToolOptions, PluginToolRegistry, type PluginUiToolDescriptor, type PluginUiToolOptions, type PluginsConfig, type PluginsConfigValidationResult, type RegisteredPluginTool, type ResumeOptions, type ResumeValidationResult, type RunResultPayload, SYSTEM_AGENTS_DIR, type SessionContextStore, type SessionEncryptionConfig, type SessionEncryptionKey, type SessionExport, type SessionInspection, type SessionMetadata, type SessionMetadataUpdate, type SessionSummary, type Skill, type SkillDirectory, type SkillViewResult, type SlashCommandList, type SubagentContext, SubagentRegistry, type SubagentRunRecord, type SubagentStatus, type SubagentToolsContext, type SystemPromptParams, type ToolLoopDetectionConfig, type TranscriptEntry, type UiToolInputSchema, type UiToolOptions, UiToolPauseSignal, addAgent, addBinding, agentDirCandidates, agentVisibility, aimaxDir, appendArtifactOperation, appendCronExecutionRecord, appendRecentToMemory, appendSessionFile, appendToMemory, appendTranscriptEntry, approvalSummaryFromResolution, artifactsPath, atomicWriteSessionFile, autoSkillsDir, bootstrapMountLayout, buildAgentDelegationPrompt, buildAgentTaskPrompt, buildBootstrapContextFiles, buildResumeNarration, buildSkillsPrompt, buildSubagentAnnounceMessage, buildSystemPrompt, cleanupOldSubagentRecords, clearPendingHitl, clearPendingUiTool, collapseLogPath, contextSnapshotPath, createAgentDefinitionsContext, createAgentTools, createApplyPatchTool, createAutoSkillCategoriesTool, createAutoSkillListTool, createAutoSkillSearchTool, createAutoSkillViewTool, createAutoSkillsLoader, createBashTool, createBatchSubagentSpawnTool, createBuiltinMemoryProvider, createContextManager, createEditFileTool, createExecTool, createImageTool, createListDirTool, createMemoryAppendTool, createMemoryForgetTool, createMemoryGetTool, createMemoryListTool, createMemoryLogTool, createMemorySearchTool, createMemoryUpdateTool, createMemoryWriteTool, createPendingHitl, createPendingUiTool, createPluginProgressEmitter, createPluginRuntime, createProcessTool, createReadFileTool, createSession, createSessionContextStore, createSessionEncryptionConfig, createSessionSearchTool, createSkillListTool, createSkillLoadTool, createSubagentSpawnTool, createSubagentsTool, createUiTool, createWriteFileTool, cronExecutionsPath, decryptContent, defaultUiToolInputSchema, deleteMemoryFile, discoverAIMaxPlugins, encryptContent, ensureBootstrapMountLayout, ensureSession, exportSession, filterSkillsForAgent, filterToolsForAgent, findAgentDefinition, findSkillByName, formatApprovalResolution, formatClarifyResolution, formatReviewResolution, generateSessionTitle, getAgentConfig, getDefaultSessionEncryptionConfig, getMemoryLines, hasBootstrapSentinel, hitlHistoryPath, initializePluginSystem, inspectBootstrapMountLayout, inspectSession, isBootstrapMountLayoutReady, isEncryptedContent, isHitlPauseSignal, isUiToolPauseSignal, listAgents, listAvailableSlashCommands, listBindings, listMemoryFiles, listSessionSummaries, listSessions, listSubagentRunsFromDisk, loadAgentDefinitionsFromDir, loadAgentsConfig, loadArtifactOperations, loadBootstrapFiles, loadCronExecutionRecords, readPendingHitl as loadPendingHitl, readPendingHitl, readPendingUiTool as loadPendingUiTool, readPendingUiTool, loadPluginManifest, loadPluginManifestRegistry, loadPlugins, loadSessionContextSnapshot, loadSessionMetadata, loadSkillView, loadSkills, loadSkillsFromDirs, loadSkillsWithPluginDirs, loadSubagentRegistryFromDisk, loadTranscript, memoryDir, metadataPath, normalizeAgentId, normalizePluginsConfig, normalizeSessionStoreName, parseAgentDefinition, pendingHitlPath, pendingUiToolPath, primaryMemoryPath, publicAgentDefinitions, readHitlHistory, readMemoryFile, readPrimaryMemory, readSessionFile, readSessionFileContent, registerEmbeddingProvider, registerMemoryProvider, removeAgent, removeBindings, replaceMemoryFile, resetEmbeddingProviderRegistryForTests, resetMemoryProviderRegistryForTests, resolveAgentDefinitionsContext, resolveAgentDir, resolveAgentIdByBinding, resolveAgentsConfigPath, resolveDefaultAgentId, resolveEmbeddingProvider, resolveHitlRequest, resolveHitlRequest as resolvePendingHitl, resolveMemoryProvider, resolveModelFallbacks, resolveModelString, resolvePendingUiTool, resolvePluginManifestPath, rewriteTranscript, runAgent, saveAgentsConfig, saveSessionMetadata, saveSubagentRegistryToDisk, scanAgentDefinitions, searchMemory, sessionDir, sessionMemoryPath, sessionsDir, setDefaultSessionEncryptionConfig, skillsDir, toolResultsDir, transcriptPath, transitionHitlStatus, updateAgentIdentity, updateSessionMetadata, validatePluginsConfig, validateResume, wrapToolsWithHooks, writeSessionFile };
|