pi-gentic 0.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/README.md +499 -0
- package/dist/commands.d.ts +93 -0
- package/dist/commands.js +422 -0
- package/dist/config.d.ts +27 -0
- package/dist/config.js +407 -0
- package/dist/core.d.ts +19 -0
- package/dist/core.js +125 -0
- package/dist/extension.d.ts +2 -0
- package/dist/extension.js +476 -0
- package/dist/orchestrator.d.ts +277 -0
- package/dist/orchestrator.js +633 -0
- package/dist/policy.d.ts +43 -0
- package/dist/policy.js +136 -0
- package/dist/prompt.d.ts +12 -0
- package/dist/prompt.js +226 -0
- package/dist/runs.d.ts +99 -0
- package/dist/runs.js +540 -0
- package/dist/runtime.d.ts +127 -0
- package/dist/runtime.js +360 -0
- package/dist/sessions.d.ts +56 -0
- package/dist/sessions.js +487 -0
- package/dist/ui.d.ts +108 -0
- package/dist/ui.js +957 -0
- package/dist/worktrees.d.ts +1 -0
- package/dist/worktrees.js +86 -0
- package/docs/assets/error-card.png +0 -0
- package/docs/assets/load-agent.png +0 -0
- package/docs/assets/orchestration-tree.png +0 -0
- package/docs/assets/send-background.png +0 -0
- package/docs/assets/send-foreground.png +0 -0
- package/package.json +58 -0
package/dist/commands.js
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User-facing command language for pi-gentic.
|
|
3
|
+
*
|
|
4
|
+
* This file keeps slash-command parsing and completion together so every
|
|
5
|
+
* surface uses the same flag rules and session id suggestions.
|
|
6
|
+
*/
|
|
7
|
+
import { loadConfiguration } from "./config.js";
|
|
8
|
+
import { isRecord, shortSessionId } from "./core.js";
|
|
9
|
+
const SEND_VALUE_FLAGS = new Set([
|
|
10
|
+
"agent",
|
|
11
|
+
"session",
|
|
12
|
+
"cwd",
|
|
13
|
+
"worktree",
|
|
14
|
+
"repo",
|
|
15
|
+
"model",
|
|
16
|
+
"thinking",
|
|
17
|
+
"theme",
|
|
18
|
+
"tools",
|
|
19
|
+
"agents",
|
|
20
|
+
"skills",
|
|
21
|
+
"system-prompt-files",
|
|
22
|
+
"max-subagent-depth",
|
|
23
|
+
]);
|
|
24
|
+
const SEND_BOOLEAN_FLAGS = ["fork", "bg", "fg", "no-invoke"];
|
|
25
|
+
const SEND_FLAGS = [
|
|
26
|
+
"agent",
|
|
27
|
+
"session",
|
|
28
|
+
"fork",
|
|
29
|
+
"bg",
|
|
30
|
+
"fg",
|
|
31
|
+
"no-invoke",
|
|
32
|
+
"cwd",
|
|
33
|
+
"worktree",
|
|
34
|
+
"repo",
|
|
35
|
+
"model",
|
|
36
|
+
"thinking",
|
|
37
|
+
"theme",
|
|
38
|
+
"tools",
|
|
39
|
+
"agents",
|
|
40
|
+
"skills",
|
|
41
|
+
"system-prompt-files",
|
|
42
|
+
"max-subagent-depth",
|
|
43
|
+
].map((flag) => `--${flag}`);
|
|
44
|
+
const THINKING_LEVELS = ["low", "medium", "high"];
|
|
45
|
+
/** Splits a slash command like a shell, while preserving quoted message text. */
|
|
46
|
+
export function tokenizeCommandLine(input) {
|
|
47
|
+
const tokens = [];
|
|
48
|
+
let current = "";
|
|
49
|
+
let quote = "";
|
|
50
|
+
let escaped = false;
|
|
51
|
+
for (const char of input) {
|
|
52
|
+
if (escaped) {
|
|
53
|
+
current += quote ? unescapeQuotedCharacter(char) : char;
|
|
54
|
+
escaped = false;
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (char === "\\") {
|
|
58
|
+
escaped = true;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (quote) {
|
|
62
|
+
if (char === quote)
|
|
63
|
+
quote = "";
|
|
64
|
+
else
|
|
65
|
+
current += char;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if (char === "'" || char === '"') {
|
|
69
|
+
quote = char;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
if (/\s/.test(char)) {
|
|
73
|
+
if (current) {
|
|
74
|
+
tokens.push(current);
|
|
75
|
+
current = "";
|
|
76
|
+
}
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
current += char;
|
|
80
|
+
}
|
|
81
|
+
if (escaped)
|
|
82
|
+
current += "\\";
|
|
83
|
+
if (current)
|
|
84
|
+
tokens.push(current);
|
|
85
|
+
return tokens;
|
|
86
|
+
}
|
|
87
|
+
function unescapeQuotedCharacter(char) {
|
|
88
|
+
if (char === "n")
|
|
89
|
+
return "\n";
|
|
90
|
+
if (char === "r")
|
|
91
|
+
return "\r";
|
|
92
|
+
if (char === "t")
|
|
93
|
+
return "\t";
|
|
94
|
+
return char;
|
|
95
|
+
}
|
|
96
|
+
function readFlagValue(tokens, index, inlineValue) {
|
|
97
|
+
if (inlineValue !== undefined)
|
|
98
|
+
return { value: inlineValue, nextIndex: index };
|
|
99
|
+
const next = tokens[index + 1];
|
|
100
|
+
if (next === undefined || next === "" || next.startsWith("--"))
|
|
101
|
+
return { value: undefined, nextIndex: index };
|
|
102
|
+
return { value: next, nextIndex: index + 1 };
|
|
103
|
+
}
|
|
104
|
+
export function parseAgentCommand(input) {
|
|
105
|
+
const tokens = tokenizeCommandLine(input.trim());
|
|
106
|
+
let sessionId;
|
|
107
|
+
const words = [];
|
|
108
|
+
for (let index = 0; index < tokens.length; index++) {
|
|
109
|
+
const token = tokens[index];
|
|
110
|
+
const match = token.match(/^--session(?:=(.*))?$/);
|
|
111
|
+
if (match) {
|
|
112
|
+
const result = readFlagValue(tokens, index, match[1]);
|
|
113
|
+
if (result.value)
|
|
114
|
+
sessionId = result.value;
|
|
115
|
+
index = result.nextIndex;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
words.push(token);
|
|
119
|
+
}
|
|
120
|
+
return { agent: words[0], sessionId };
|
|
121
|
+
}
|
|
122
|
+
/** Converts send command text into the same fields accepted by the agents tool. */
|
|
123
|
+
export function parseSendCommand(input) {
|
|
124
|
+
const tokens = tokenizeCommandLine(input.trim());
|
|
125
|
+
const messageTokens = [];
|
|
126
|
+
const result = {
|
|
127
|
+
message: "",
|
|
128
|
+
agent: undefined,
|
|
129
|
+
sessionId: undefined,
|
|
130
|
+
fork: false,
|
|
131
|
+
async: undefined,
|
|
132
|
+
cwd: undefined,
|
|
133
|
+
invokeMeLater: undefined,
|
|
134
|
+
overrides: undefined,
|
|
135
|
+
worktree: undefined,
|
|
136
|
+
repo: undefined,
|
|
137
|
+
};
|
|
138
|
+
for (let index = 0; index < tokens.length; index++) {
|
|
139
|
+
const token = tokens[index];
|
|
140
|
+
const keyValue = token.match(/^--([A-Za-z][\w-]*)(?:=(.*))?$/);
|
|
141
|
+
if (!keyValue) {
|
|
142
|
+
messageTokens.push(token);
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const key = keyValue[1];
|
|
146
|
+
const inlineValue = keyValue[2];
|
|
147
|
+
if (SEND_VALUE_FLAGS.has(key)) {
|
|
148
|
+
const value = readFlagValue(tokens, index, inlineValue);
|
|
149
|
+
applySendFlagValue(result, key, value.value);
|
|
150
|
+
index = value.nextIndex;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
if (key === "fork") {
|
|
154
|
+
result.fork = true;
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (key === "bg") {
|
|
158
|
+
result.async = true;
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
if (key === "fg") {
|
|
162
|
+
result.async = false;
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
if (key === "no-invoke") {
|
|
166
|
+
result.invokeMeLater = false;
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
messageTokens.push(token);
|
|
170
|
+
}
|
|
171
|
+
result.message = messageTokens.join(" ").trim();
|
|
172
|
+
return result;
|
|
173
|
+
}
|
|
174
|
+
function applySendFlagValue(result, key, value) {
|
|
175
|
+
const text = typeof value === "string" ? value : undefined;
|
|
176
|
+
if (key === "agent" && text)
|
|
177
|
+
result.agent = text;
|
|
178
|
+
else if (key === "session" && text)
|
|
179
|
+
result.sessionId = text;
|
|
180
|
+
else if (key === "cwd" && text)
|
|
181
|
+
result.cwd = text;
|
|
182
|
+
else if (key === "worktree")
|
|
183
|
+
result.worktree = text ?? "";
|
|
184
|
+
else if (key === "repo" && text)
|
|
185
|
+
result.repo = text;
|
|
186
|
+
else if (key === "model" && text)
|
|
187
|
+
setOverride(result, "model", text);
|
|
188
|
+
else if (key === "thinking" && text)
|
|
189
|
+
setOverride(result, "thinking", text);
|
|
190
|
+
else if (key === "theme" && text)
|
|
191
|
+
setOverride(result, "theme", text);
|
|
192
|
+
else if (key === "tools" && text)
|
|
193
|
+
setOverride(result, "tools", splitList(text));
|
|
194
|
+
else if (key === "agents" && text)
|
|
195
|
+
setOverride(result, "agents", splitList(text));
|
|
196
|
+
else if (key === "skills" && text)
|
|
197
|
+
setOverride(result, "skills", splitList(text));
|
|
198
|
+
else if (key === "system-prompt-files" && text)
|
|
199
|
+
setOverride(result, "systemPromptFiles", splitList(text));
|
|
200
|
+
else if (key === "max-subagent-depth" && text) {
|
|
201
|
+
const number = Number(text);
|
|
202
|
+
if (Number.isFinite(number))
|
|
203
|
+
setOverride(result, "maxSubagentDepth", Math.floor(number));
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function setOverride(result, key, value) {
|
|
207
|
+
result.overrides = { ...(isRecord(result.overrides) ? result.overrides : {}) };
|
|
208
|
+
result.overrides[key] = value;
|
|
209
|
+
}
|
|
210
|
+
function splitList(value) {
|
|
211
|
+
return value
|
|
212
|
+
.split(",")
|
|
213
|
+
.map((item) => item.trim())
|
|
214
|
+
.filter(Boolean);
|
|
215
|
+
}
|
|
216
|
+
export function normalizeToolInput(input) {
|
|
217
|
+
if (!isRecord(input))
|
|
218
|
+
throw new Error("Tool input must be a JSON object.");
|
|
219
|
+
if (typeof input.action !== "string" || !input.action.trim())
|
|
220
|
+
throw new Error('Missing required field "action".');
|
|
221
|
+
const action = input.action.trim();
|
|
222
|
+
return { ...input, action };
|
|
223
|
+
}
|
|
224
|
+
export function completeAgents(prefix, activeAgentName, cwd = process.cwd()) {
|
|
225
|
+
const config = loadConfiguration({ cwd });
|
|
226
|
+
const query = prefix.trim().toLowerCase();
|
|
227
|
+
return config.agents
|
|
228
|
+
.filter((agent) => agent.name !== activeAgentName)
|
|
229
|
+
.filter((agent) => !query || agent.name.toLowerCase().includes(query))
|
|
230
|
+
.map((agent) => ({
|
|
231
|
+
value: agent.name,
|
|
232
|
+
label: agent.name,
|
|
233
|
+
description: agent.description,
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
export function completeSend(prefix, options = {}) {
|
|
237
|
+
const cwd = typeof options === "string" ? options : (options.cwd ?? process.cwd());
|
|
238
|
+
const sessions = typeof options === "object" && Array.isArray(options.sessions)
|
|
239
|
+
? options.sessions
|
|
240
|
+
: [];
|
|
241
|
+
const currentSessionId = typeof options === "object" ? options.currentSessionId : undefined;
|
|
242
|
+
const suggestionContext = typeof options === "object" ? options : {};
|
|
243
|
+
const token = prefix.split(/\s/).at(-1) ?? "";
|
|
244
|
+
const replaceToken = (value) => `${prefix.slice(0, prefix.length - token.length)}${value}`;
|
|
245
|
+
const agentValue = flagValueCompletion(prefix, "agent");
|
|
246
|
+
if (agentValue) {
|
|
247
|
+
const agents = suggestionContext.agents?.length
|
|
248
|
+
? completeRecords(agentValue.token, suggestionContext.agents, "name")
|
|
249
|
+
: completeAgents(agentValue.token, undefined, cwd);
|
|
250
|
+
return agents.map((agent) => ({
|
|
251
|
+
...agent,
|
|
252
|
+
value: agentValue.replace(agent.value),
|
|
253
|
+
}));
|
|
254
|
+
}
|
|
255
|
+
const valueCompletion = completeSendFlagValue(prefix, suggestionContext);
|
|
256
|
+
if (valueCompletion)
|
|
257
|
+
return valueCompletion;
|
|
258
|
+
const sessionValue = flagValueCompletion(prefix, "session");
|
|
259
|
+
if (sessionValue) {
|
|
260
|
+
return completeSessions(sessionValue.token, sessions, currentSessionId).map((session) => ({ ...session, value: sessionValue.replace(session.value) }));
|
|
261
|
+
}
|
|
262
|
+
if (token.startsWith("--")) {
|
|
263
|
+
return SEND_FLAGS.filter((flag) => flag.startsWith(token)).map((flag) => ({
|
|
264
|
+
value: replaceToken(flag),
|
|
265
|
+
label: flag,
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
export function isCompletingSendSession(prefix) {
|
|
271
|
+
return Boolean(flagValueCompletion(prefix, "session"));
|
|
272
|
+
}
|
|
273
|
+
function completeSendFlagValue(prefix, options) {
|
|
274
|
+
const descriptors = [
|
|
275
|
+
{
|
|
276
|
+
flag: "model",
|
|
277
|
+
values: modelCompletionValues(recordArray(options.models)),
|
|
278
|
+
},
|
|
279
|
+
{ flag: "thinking", values: THINKING_LEVELS.map(simpleValue) },
|
|
280
|
+
{ flag: "theme", values: stringArray(options.themes).map(simpleValue) },
|
|
281
|
+
{ flag: "tools", values: stringArray(options.tools).map(filterValue), list: true },
|
|
282
|
+
{
|
|
283
|
+
flag: "agents",
|
|
284
|
+
values: recordArray(options.agents).map((agent) => filterValue(agent.name)),
|
|
285
|
+
list: true,
|
|
286
|
+
},
|
|
287
|
+
{ flag: "skills", values: stringArray(options.skills).map(filterValue), list: true },
|
|
288
|
+
{
|
|
289
|
+
flag: "system-prompt-files",
|
|
290
|
+
values: stringArray(options.systemPromptFiles).map(filterValue),
|
|
291
|
+
list: true,
|
|
292
|
+
},
|
|
293
|
+
{ flag: "max-subagent-depth", values: ["1", "2", "3", "4", "5", "6"].map(simpleValue) },
|
|
294
|
+
{ flag: "cwd", values: [".agentfiles/worktrees/"].map(simpleValue) },
|
|
295
|
+
{ flag: "worktree", values: [suggestedWorktreeName(prefix)].map(simpleValue) },
|
|
296
|
+
{ flag: "repo", values: ["."].map(simpleValue) },
|
|
297
|
+
];
|
|
298
|
+
for (const descriptor of descriptors) {
|
|
299
|
+
const completion = flagValueCompletion(prefix, descriptor.flag);
|
|
300
|
+
if (!completion)
|
|
301
|
+
continue;
|
|
302
|
+
const list = descriptor.list
|
|
303
|
+
? listValueCompletion(descriptor.values, completion.token)
|
|
304
|
+
: { query: completion.token, values: descriptor.values };
|
|
305
|
+
return list.values
|
|
306
|
+
.filter((item) => !list.query ||
|
|
307
|
+
[item.value, item.label, item.description].some((text) => String(text ?? "")
|
|
308
|
+
.toLowerCase()
|
|
309
|
+
.includes(list.query.toLowerCase())))
|
|
310
|
+
.map((item) => ({ ...item, value: completion.replace(item.value) }));
|
|
311
|
+
}
|
|
312
|
+
return undefined;
|
|
313
|
+
}
|
|
314
|
+
function suggestedWorktreeName(prefix) {
|
|
315
|
+
const message = prefix.split(/\s--worktree(?:=|\s)?/)[0] ?? "agent-worktree";
|
|
316
|
+
const slug = message
|
|
317
|
+
.replace(/^\/send\s+/, "")
|
|
318
|
+
.toLowerCase()
|
|
319
|
+
.replace(/[^a-z0-9._/-]+/g, "-")
|
|
320
|
+
.replace(/^-+|-+$/g, "")
|
|
321
|
+
.slice(0, 60);
|
|
322
|
+
return slug || "agent-worktree";
|
|
323
|
+
}
|
|
324
|
+
function recordArray(value) {
|
|
325
|
+
return Array.isArray(value) ? value.filter(isRecord) : [];
|
|
326
|
+
}
|
|
327
|
+
function stringArray(value) {
|
|
328
|
+
return Array.isArray(value)
|
|
329
|
+
? value.filter((item) => typeof item === "string")
|
|
330
|
+
: [];
|
|
331
|
+
}
|
|
332
|
+
function listValueCompletion(values, token) {
|
|
333
|
+
const comma = token.lastIndexOf(",");
|
|
334
|
+
const prefix = comma === -1 ? "" : token.slice(0, comma + 1);
|
|
335
|
+
const query = comma === -1 ? token : token.slice(comma + 1);
|
|
336
|
+
return {
|
|
337
|
+
query,
|
|
338
|
+
values: values.map((item) => ({ ...item, value: `${prefix}${item.value}` })),
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
function modelCompletionValues(models = []) {
|
|
342
|
+
return models.map((model) => {
|
|
343
|
+
const provider = stringValue(model.provider);
|
|
344
|
+
const id = stringValue(model.id) ?? stringValue(model.value);
|
|
345
|
+
const value = provider && id ? `${provider}/${id}` : id;
|
|
346
|
+
return {
|
|
347
|
+
value,
|
|
348
|
+
label: value,
|
|
349
|
+
description: stringValue(model.label) ?? stringValue(model.name),
|
|
350
|
+
};
|
|
351
|
+
}).filter((item) => item.value);
|
|
352
|
+
}
|
|
353
|
+
function simpleValue(value) {
|
|
354
|
+
return { value, label: value };
|
|
355
|
+
}
|
|
356
|
+
function filterValue(value) {
|
|
357
|
+
const text = String(value ?? "");
|
|
358
|
+
return { value: text, label: text };
|
|
359
|
+
}
|
|
360
|
+
function completeRecords(token, records, key) {
|
|
361
|
+
const query = token.trim().toLowerCase();
|
|
362
|
+
return records
|
|
363
|
+
.map((record) => ({
|
|
364
|
+
value: String(record[key] ?? ""),
|
|
365
|
+
label: String(record[key] ?? ""),
|
|
366
|
+
description: stringValue(record.description),
|
|
367
|
+
}))
|
|
368
|
+
.filter((item) => item.value)
|
|
369
|
+
.filter((item) => !query ||
|
|
370
|
+
[item.value, item.label, item.description].some((text) => String(text ?? "")
|
|
371
|
+
.toLowerCase()
|
|
372
|
+
.includes(query)));
|
|
373
|
+
}
|
|
374
|
+
function flagValueCompletion(prefix, flag) {
|
|
375
|
+
const inline = prefix.match(new RegExp(`(^|\\s)--${flag}=([^\\s]*)$`));
|
|
376
|
+
if (inline) {
|
|
377
|
+
const token = inline[2] ?? "";
|
|
378
|
+
return {
|
|
379
|
+
token,
|
|
380
|
+
replace: (value) => `${prefix.slice(0, prefix.length - token.length)}${value}`,
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
const spaced = prefix.match(new RegExp(`(^|\\s)--${flag}\\s+([^\\s]*)$`));
|
|
384
|
+
if (!spaced)
|
|
385
|
+
return undefined;
|
|
386
|
+
const token = spaced[2] ?? "";
|
|
387
|
+
return {
|
|
388
|
+
token,
|
|
389
|
+
replace: (value) => `${prefix.slice(0, prefix.length - token.length)}${value}`,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
function completeSessions(token, sessions, currentSessionId) {
|
|
393
|
+
const query = token.trim().toLowerCase();
|
|
394
|
+
return sessions
|
|
395
|
+
.filter((session) => sessionIdentifier(session) !== currentSessionId)
|
|
396
|
+
.map((session) => sessionCompletion(session))
|
|
397
|
+
.filter((session) => !query ||
|
|
398
|
+
[session.value, session.label, session.description].some((text) => String(text ?? "")
|
|
399
|
+
.toLowerCase()
|
|
400
|
+
.includes(query)));
|
|
401
|
+
}
|
|
402
|
+
function sessionCompletion(session) {
|
|
403
|
+
const id = sessionIdentifier(session);
|
|
404
|
+
const visibleId = shortSessionId(id);
|
|
405
|
+
const agentName = stringValue(session.agentName);
|
|
406
|
+
const agent = agentName ? `[${agentName}] ` : "";
|
|
407
|
+
const message = stringValue(session.lastMessage) ??
|
|
408
|
+
stringValue(session.firstMessage) ??
|
|
409
|
+
stringValue(session.name) ??
|
|
410
|
+
"Untitled session";
|
|
411
|
+
return {
|
|
412
|
+
value: visibleId,
|
|
413
|
+
label: visibleId,
|
|
414
|
+
description: `${agent}${message}`.trim(),
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
function sessionIdentifier(session) {
|
|
418
|
+
return stringValue(session.sessionId) ?? stringValue(session.id);
|
|
419
|
+
}
|
|
420
|
+
function stringValue(value) {
|
|
421
|
+
return typeof value === "string" ? value : undefined;
|
|
422
|
+
}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare function defaultAgentDir(): string;
|
|
2
|
+
export declare function getConfigRoots(cwd?: string, agentDir?: string): string[];
|
|
3
|
+
/** Loads settings, agents, diagnostics, and config roots for one working directory. */
|
|
4
|
+
export declare function loadPiSettings(agentDir?: string): AnyRecord;
|
|
5
|
+
export declare function enabledModelPatterns(agentDir?: string): string[];
|
|
6
|
+
export declare function loadConfiguration(options?: AnyRecord): {
|
|
7
|
+
settings: {
|
|
8
|
+
agentDefinitions: AnyRecord[];
|
|
9
|
+
agentlessSession: {};
|
|
10
|
+
agentDefaults: {};
|
|
11
|
+
globalMaxSubagentDepth: number;
|
|
12
|
+
};
|
|
13
|
+
agents: AnyRecord[];
|
|
14
|
+
diagnostics: AnyRecord[];
|
|
15
|
+
roots: string[];
|
|
16
|
+
};
|
|
17
|
+
/** Turns user-authored JSON or frontmatter into the canonical agent shape. */
|
|
18
|
+
export declare function normalizeAgentDefinition(value: any, sourcePath?: string, diagnostics?: AnyRecord[]): {
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
/** Parses the small frontmatter subset used by agent and skill markdown files. */
|
|
22
|
+
export declare function parseMarkdownDefinition(content: string): {
|
|
23
|
+
frontmatter: AnyRecord;
|
|
24
|
+
body: string;
|
|
25
|
+
};
|
|
26
|
+
/** Discovers skill metadata without loading the full skill instructions. */
|
|
27
|
+
export declare function loadAvailableSkills(options?: AnyRecord): any;
|