condukt 0.6.21 → 0.8.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 +35 -0
- package/dist/runtimes/copilot/copilot-adapter.d.ts.map +1 -1
- package/dist/runtimes/copilot/copilot-adapter.js +26 -7
- package/dist/runtimes/copilot/copilot-adapter.js.map +1 -1
- package/dist/runtimes/copilot/copilot-backend.d.ts +35 -1
- package/dist/runtimes/copilot/copilot-backend.d.ts.map +1 -1
- package/dist/runtimes/copilot/sdk-backend.d.ts +2 -2
- package/dist/runtimes/copilot/sdk-backend.d.ts.map +1 -1
- package/dist/runtimes/copilot/sdk-backend.js +38 -3
- package/dist/runtimes/copilot/sdk-backend.js.map +1 -1
- package/dist/runtimes/copilot/subprocess-backend.d.ts +2 -2
- package/dist/runtimes/copilot/subprocess-backend.d.ts.map +1 -1
- package/dist/runtimes/copilot/subprocess-backend.js +4 -1
- package/dist/runtimes/copilot/subprocess-backend.js.map +1 -1
- package/dist/runtimes/mock/mock-runtime.d.ts +23 -20
- package/dist/runtimes/mock/mock-runtime.d.ts.map +1 -1
- package/dist/runtimes/mock/mock-runtime.js +79 -24
- package/dist/runtimes/mock/mock-runtime.js.map +1 -1
- package/dist/src/agent-node.d.ts +90 -0
- package/dist/src/agent-node.d.ts.map +1 -0
- package/dist/src/agent-node.js +383 -0
- package/dist/src/agent-node.js.map +1 -0
- package/dist/src/agent.d.ts +4 -1
- package/dist/src/agent.d.ts.map +1 -1
- package/dist/src/agent.js +438 -224
- package/dist/src/agent.js.map +1 -1
- package/dist/src/dry-run.d.ts +16 -0
- package/dist/src/dry-run.d.ts.map +1 -0
- package/dist/src/dry-run.js +44 -0
- package/dist/src/dry-run.js.map +1 -0
- package/dist/src/events.d.ts +1 -0
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/index.d.ts +19 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +18 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/panel-node.d.ts +37 -0
- package/dist/src/panel-node.d.ts.map +1 -0
- package/dist/src/panel-node.js +175 -0
- package/dist/src/panel-node.js.map +1 -0
- package/dist/src/scheduler.d.ts.map +1 -1
- package/dist/src/scheduler.js +311 -5
- package/dist/src/scheduler.js.map +1 -1
- package/dist/src/types.d.ts +115 -3
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +7 -1
- package/dist/src/types.js.map +1 -1
- package/dist/state/reducer.js +2 -2
- package/dist/state/reducer.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.toValidator = toValidator;
|
|
37
|
+
exports.extractJsonCandidates = extractJsonCandidates;
|
|
38
|
+
exports.loadReads = loadReads;
|
|
39
|
+
exports.repairPrompt = repairPrompt;
|
|
40
|
+
exports.validationError = validationError;
|
|
41
|
+
exports.validateCandidate = validateCandidate;
|
|
42
|
+
exports.serialize = serialize;
|
|
43
|
+
exports.writeOutput = writeOutput;
|
|
44
|
+
exports.removeInvalidOutput = removeInvalidOutput;
|
|
45
|
+
exports.retryCount = retryCount;
|
|
46
|
+
exports.rawCandidates = rawCandidates;
|
|
47
|
+
exports.produce = produce;
|
|
48
|
+
exports.agentNode = agentNode;
|
|
49
|
+
const fs = __importStar(require("node:fs"));
|
|
50
|
+
const path = __importStar(require("node:path"));
|
|
51
|
+
const agent_1 = require("./agent");
|
|
52
|
+
function errorMessage(error) {
|
|
53
|
+
return error instanceof Error ? error.message : String(error);
|
|
54
|
+
}
|
|
55
|
+
function standardIssueMessage(issue, index) {
|
|
56
|
+
const pathPrefix = issue.path && issue.path.length > 0
|
|
57
|
+
? `${issue.path.map((part) => String(part)).join('.')}: `
|
|
58
|
+
: '';
|
|
59
|
+
return issue.message.length > 0
|
|
60
|
+
? `${pathPrefix}${issue.message}`
|
|
61
|
+
: `Standard Schema issue ${index + 1}`;
|
|
62
|
+
}
|
|
63
|
+
/** Normalize condukt, function, and Standard Schema validators. */
|
|
64
|
+
function toValidator(schema) {
|
|
65
|
+
if (typeof schema === 'function') {
|
|
66
|
+
return {
|
|
67
|
+
validate: (value) => {
|
|
68
|
+
try {
|
|
69
|
+
const validated = schema(value);
|
|
70
|
+
return validated === undefined
|
|
71
|
+
? { ok: false, issues: ['Validation function returned undefined'] }
|
|
72
|
+
: { ok: true, value: validated };
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
return { ok: false, issues: [errorMessage(error)] };
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if ('~standard' in schema) {
|
|
81
|
+
return {
|
|
82
|
+
validate: async (value) => {
|
|
83
|
+
try {
|
|
84
|
+
const result = await schema['~standard'].validate(value);
|
|
85
|
+
if ('issues' in result && result.issues !== undefined) {
|
|
86
|
+
const issues = result.issues.map(standardIssueMessage);
|
|
87
|
+
return {
|
|
88
|
+
ok: false,
|
|
89
|
+
issues: issues.length > 0 ? issues : ['Standard Schema validation failed'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
return { ok: true, value: result.value };
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
return { ok: false, issues: [errorMessage(error)] };
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
return schema;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Yield every parseable JSON value in `text`, best first: the whole trimmed
|
|
104
|
+
* string, then each balanced object/array span in start order (so a top-level
|
|
105
|
+
* value is tried before a nested one). The caller validates candidates in order
|
|
106
|
+
* and takes the first that satisfies the schema — so an example snippet that
|
|
107
|
+
* precedes the real answer, or a span that parses but fails validation, does not
|
|
108
|
+
* mask a later valid value.
|
|
109
|
+
*/
|
|
110
|
+
function* extractJsonCandidates(text) {
|
|
111
|
+
const trimmed = text.trim();
|
|
112
|
+
if (trimmed.length > 0) {
|
|
113
|
+
try {
|
|
114
|
+
// The whole response is a single JSON value — that IS the value; scanning
|
|
115
|
+
// for embedded spans would only re-yield this same value.
|
|
116
|
+
yield JSON.parse(trimmed);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
// The complete response may contain prose or markdown around the JSON value.
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
for (let start = 0; start < text.length; start += 1) {
|
|
124
|
+
const opening = text[start];
|
|
125
|
+
if (opening !== '{' && opening !== '[')
|
|
126
|
+
continue;
|
|
127
|
+
const expectedClosings = [opening === '{' ? '}' : ']'];
|
|
128
|
+
let inString = false;
|
|
129
|
+
let escaped = false;
|
|
130
|
+
for (let index = start + 1; index < text.length; index += 1) {
|
|
131
|
+
const character = text[index];
|
|
132
|
+
if (inString) {
|
|
133
|
+
if (escaped)
|
|
134
|
+
escaped = false;
|
|
135
|
+
else if (character === '\\')
|
|
136
|
+
escaped = true;
|
|
137
|
+
else if (character === '"')
|
|
138
|
+
inString = false;
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (character === '"') {
|
|
142
|
+
inString = true;
|
|
143
|
+
}
|
|
144
|
+
else if (character === '{') {
|
|
145
|
+
expectedClosings.push('}');
|
|
146
|
+
}
|
|
147
|
+
else if (character === '[') {
|
|
148
|
+
expectedClosings.push(']');
|
|
149
|
+
}
|
|
150
|
+
else if (character === '}' || character === ']') {
|
|
151
|
+
if (expectedClosings.at(-1) !== character)
|
|
152
|
+
break;
|
|
153
|
+
expectedClosings.pop();
|
|
154
|
+
if (expectedClosings.length === 0) {
|
|
155
|
+
try {
|
|
156
|
+
yield JSON.parse(text.slice(start, index + 1));
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// Not valid JSON from this start; continue scanning later positions.
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function parseRead(raw) {
|
|
168
|
+
try {
|
|
169
|
+
return JSON.parse(raw);
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return raw;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function loadReads(input, names) {
|
|
176
|
+
const reads = {};
|
|
177
|
+
for (const name of names ?? []) {
|
|
178
|
+
const artifactPath = input.artifactPaths[name] ?? path.join(input.dir, name);
|
|
179
|
+
try {
|
|
180
|
+
reads[name] = parseRead(fs.readFileSync(artifactPath, 'utf-8'));
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
// A missing optional read remains absent from the record.
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return reads;
|
|
187
|
+
}
|
|
188
|
+
function toolIds(tools) {
|
|
189
|
+
return tools?.map((tool) => typeof tool === 'string' ? tool : tool.id);
|
|
190
|
+
}
|
|
191
|
+
function repairPrompt(prompt, raw, error) {
|
|
192
|
+
return [
|
|
193
|
+
prompt,
|
|
194
|
+
'',
|
|
195
|
+
'Your previous response was not valid structured output. Return only corrected JSON.',
|
|
196
|
+
'Validation issues:',
|
|
197
|
+
error.message,
|
|
198
|
+
'',
|
|
199
|
+
'Previous response:',
|
|
200
|
+
raw,
|
|
201
|
+
].join('\n');
|
|
202
|
+
}
|
|
203
|
+
function validationError(issues) {
|
|
204
|
+
const details = issues.length > 0 ? issues : ['Schema validation failed'];
|
|
205
|
+
return new Error(details.map((issue) => `- ${issue}`).join('\n'));
|
|
206
|
+
}
|
|
207
|
+
async function validateCandidate(validator, value) {
|
|
208
|
+
try {
|
|
209
|
+
return await validator.validate(value);
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
return { ok: false, issues: [errorMessage(error)] };
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function serialize(value) {
|
|
216
|
+
const json = JSON.stringify(value, null, 2);
|
|
217
|
+
if (json === undefined) {
|
|
218
|
+
throw new Error('Structured result is not JSON-serializable');
|
|
219
|
+
}
|
|
220
|
+
return json;
|
|
221
|
+
}
|
|
222
|
+
function writeOutput(input, output, content) {
|
|
223
|
+
if (!output)
|
|
224
|
+
return;
|
|
225
|
+
const outputPath = path.join(input.dir, output);
|
|
226
|
+
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
227
|
+
fs.writeFileSync(outputPath, content, 'utf-8');
|
|
228
|
+
}
|
|
229
|
+
function removeInvalidOutput(input, output) {
|
|
230
|
+
if (!output)
|
|
231
|
+
return;
|
|
232
|
+
try {
|
|
233
|
+
fs.unlinkSync(path.join(input.dir, output));
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// The producer may have returned text without writing an artifact.
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function retryCount(value) {
|
|
240
|
+
if (value === undefined)
|
|
241
|
+
return 1;
|
|
242
|
+
if (!Number.isFinite(value))
|
|
243
|
+
return 1;
|
|
244
|
+
return Math.max(0, Math.trunc(value));
|
|
245
|
+
}
|
|
246
|
+
function rawCandidates(result) {
|
|
247
|
+
const candidates = [];
|
|
248
|
+
if (result.artifact !== undefined) {
|
|
249
|
+
candidates.push({ label: 'Artifact', raw: result.artifact });
|
|
250
|
+
}
|
|
251
|
+
if (result.text.length > 0 && result.text !== result.artifact) {
|
|
252
|
+
candidates.push({ label: 'Model text', raw: result.text });
|
|
253
|
+
}
|
|
254
|
+
return candidates.length > 0
|
|
255
|
+
? candidates
|
|
256
|
+
: [{ label: 'Response', raw: '' }];
|
|
257
|
+
}
|
|
258
|
+
async function produce(config, prompt, input, ctx) {
|
|
259
|
+
const text = [];
|
|
260
|
+
const producer = (0, agent_1.agent)({
|
|
261
|
+
output: config.output,
|
|
262
|
+
model: config.model,
|
|
263
|
+
thinkingBudget: config.thinkingBudget,
|
|
264
|
+
isolation: config.isolation,
|
|
265
|
+
timeout: config.timeout,
|
|
266
|
+
systemMessage: config.system,
|
|
267
|
+
availableTools: toolIds(config.tools),
|
|
268
|
+
retry: config.retry,
|
|
269
|
+
customAgents: config.customAgents,
|
|
270
|
+
defaultAgent: config.defaultAgent,
|
|
271
|
+
excludedBuiltinAgents: config.excludedBuiltinAgents,
|
|
272
|
+
memberId: config.memberId,
|
|
273
|
+
promptBuilder: () => prompt,
|
|
274
|
+
});
|
|
275
|
+
const result = await producer(input, {
|
|
276
|
+
...ctx,
|
|
277
|
+
emitOutput: (event) => {
|
|
278
|
+
if (event.type === 'node:output')
|
|
279
|
+
text.push(event.content);
|
|
280
|
+
ctx.emitOutput(event);
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
return {
|
|
284
|
+
artifact: result.artifact,
|
|
285
|
+
text: text.join(''),
|
|
286
|
+
metadata: result.metadata,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
function successOutput(config, input, value, metadata) {
|
|
290
|
+
const artifact = serialize(value);
|
|
291
|
+
writeOutput(input, config.output, artifact);
|
|
292
|
+
return {
|
|
293
|
+
action: config.route?.(value) ?? 'default',
|
|
294
|
+
artifact,
|
|
295
|
+
metadata: { ...metadata, value },
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Create a batteries-included agent NodeEntry with optional validated structured output.
|
|
300
|
+
*
|
|
301
|
+
* @experimental Experimental — API may change before it stabilizes into condukt core.
|
|
302
|
+
*/
|
|
303
|
+
function agentNode(config) {
|
|
304
|
+
const fn = async (input, ctx) => {
|
|
305
|
+
let retryAttempt = 1;
|
|
306
|
+
const nodeContext = ctx.nextRetryAttempt
|
|
307
|
+
? ctx
|
|
308
|
+
: {
|
|
309
|
+
...ctx,
|
|
310
|
+
nextRetryAttempt: () => {
|
|
311
|
+
retryAttempt += 1;
|
|
312
|
+
return retryAttempt;
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
const reads = loadReads(input, config.reads);
|
|
316
|
+
const prompt = typeof config.prompt === 'string'
|
|
317
|
+
? config.prompt
|
|
318
|
+
: config.prompt(input, reads);
|
|
319
|
+
if (!config.schema) {
|
|
320
|
+
const result = await produce(config, prompt, input, nodeContext);
|
|
321
|
+
const raw = result.artifact ?? result.text;
|
|
322
|
+
return {
|
|
323
|
+
action: config.route?.(raw) ?? 'default',
|
|
324
|
+
artifact: raw,
|
|
325
|
+
metadata: result.metadata,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
const validator = toValidator(config.schema);
|
|
329
|
+
const retryBudgetMs = config.retry?.budgetMs;
|
|
330
|
+
const retryDeadlineMs = nodeContext.retryDeadlineMs
|
|
331
|
+
?? (retryBudgetMs === undefined
|
|
332
|
+
? undefined
|
|
333
|
+
: Date.now() + (Number.isFinite(retryBudgetMs)
|
|
334
|
+
? Math.max(0, retryBudgetMs)
|
|
335
|
+
: 0));
|
|
336
|
+
const producerContext = retryDeadlineMs === undefined
|
|
337
|
+
? nodeContext
|
|
338
|
+
: { ...nodeContext, retryDeadlineMs };
|
|
339
|
+
let raw = '';
|
|
340
|
+
let lastError = new Error('Structured output was not produced');
|
|
341
|
+
let metadata;
|
|
342
|
+
const attempts = retryCount(config.structuredRetry) + 1;
|
|
343
|
+
for (let attempt = 0; attempt < attempts; attempt += 1) {
|
|
344
|
+
const currentPrompt = attempt === 0
|
|
345
|
+
? `${prompt}\n\nReturn exactly one valid JSON value with no prose or markdown fences.`
|
|
346
|
+
: repairPrompt(prompt, raw, lastError);
|
|
347
|
+
const result = await produce(config, currentPrompt, input, producerContext);
|
|
348
|
+
metadata = result.metadata;
|
|
349
|
+
const issues = [];
|
|
350
|
+
for (const source of rawCandidates(result)) {
|
|
351
|
+
raw = source.raw;
|
|
352
|
+
let sawCandidate = false;
|
|
353
|
+
for (const candidate of extractJsonCandidates(source.raw)) {
|
|
354
|
+
sawCandidate = true;
|
|
355
|
+
const validated = await validateCandidate(validator, candidate);
|
|
356
|
+
if (validated.ok) {
|
|
357
|
+
return successOutput(config, input, validated.value, metadata);
|
|
358
|
+
}
|
|
359
|
+
issues.push(...validated.issues.map((issue) => `${source.label}: ${issue}`));
|
|
360
|
+
}
|
|
361
|
+
if (!sawCandidate) {
|
|
362
|
+
issues.push(`${source.label}: no valid JSON value was found`);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
lastError = validationError(issues);
|
|
366
|
+
}
|
|
367
|
+
if (config.fallback) {
|
|
368
|
+
return successOutput(config, input, config.fallback(raw, lastError), metadata);
|
|
369
|
+
}
|
|
370
|
+
removeInvalidOutput(input, config.output);
|
|
371
|
+
return { action: 'fail' };
|
|
372
|
+
};
|
|
373
|
+
return {
|
|
374
|
+
fn,
|
|
375
|
+
displayName: config.displayName ?? '(agent)',
|
|
376
|
+
nodeType: 'agent',
|
|
377
|
+
output: config.output,
|
|
378
|
+
reads: config.reads,
|
|
379
|
+
model: config.model,
|
|
380
|
+
timeout: config.timeout,
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=agent-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-node.js","sourceRoot":"","sources":["../../src/agent-node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FA,kCAqCC;AAUD,sDAkDC;AAUD,8BAcC;AAQD,oCAWC;AAED,0CAGC;AAED,8CASC;AAED,8BAMC;AAED,kCAKC;AAED,kDAOC;AAED,gCAIC;AAaD,sCAWC;AAED,0BAkCC;AAsBD,8BAuFC;AAhcD,4CAA8B;AAC9B,gDAAkC;AAClC,mCAAgC;AA6EhC,SAAS,YAAY,CAAC,KAAc;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,oBAAoB,CAAC,KAA0B,EAAE,KAAa;IACrE,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;QACpD,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI;QACzD,CAAC,CA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KAAK;QACnB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAC;AACJ,CAAC"}
|
package/dist/src/agent.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* both a completion indicator was seen in output AND the artifact file exists
|
|
9
9
|
* on disk with real content, treat the run as successful.
|
|
10
10
|
*/
|
|
11
|
-
import type { AgentConfig, NodeFn } from './types';
|
|
11
|
+
import type { AgentConfig, NodeFn, RetryMeta, RetryPolicy } from './types';
|
|
12
12
|
/**
|
|
13
13
|
* Checks both conditions required to treat a crashed session as successful:
|
|
14
14
|
* 1. At least one completion indicator string appears in the output lines
|
|
@@ -17,6 +17,9 @@ import type { AgentConfig, NodeFn } from './types';
|
|
|
17
17
|
* Both conditions must hold. Either alone produces false positives (GT-3).
|
|
18
18
|
*/
|
|
19
19
|
export declare function wasCompletedBeforeCrash(dir: string, outputFile: string, outputLines: readonly string[], indicators?: readonly string[]): boolean;
|
|
20
|
+
/** Default fail-closed classifier for model/session failures. */
|
|
21
|
+
export declare function isRetriableModelError(error: Error, meta: RetryMeta): boolean;
|
|
22
|
+
export declare function retryDelayMs(policy: RetryPolicy, failedAttempt: number): number;
|
|
20
23
|
/**
|
|
21
24
|
* Creates a NodeFn that manages a full agent session lifecycle.
|
|
22
25
|
*
|
package/dist/src/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,WAAW,EAGX,MAAM,
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EACV,WAAW,EAGX,MAAM,EAIN,SAAS,EACT,WAAW,EAEZ,MAAM,SAAS,CAAC;AAmDjB;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,GAC7B,OAAO,CAsBT;AAoGD,iEAAiE;AACjE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAmB5E;AAYD,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAiB/E;AAqQD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CA8KjD"}
|