@xyne/workflow-sdk 3.2.33 → 3.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/agent-step.d.ts +8 -8
- package/dist/agents/agent-step.d.ts.map +1 -1
- package/dist/agents/agent-step.js +11 -127
- package/dist/agents/agent-step.js.map +1 -1
- package/dist/agents/contract.d.ts +225 -0
- package/dist/agents/contract.d.ts.map +1 -0
- package/dist/agents/contract.js +196 -0
- package/dist/agents/contract.js.map +1 -0
- package/dist/agents/host-agent-step.d.ts +222 -0
- package/dist/agents/host-agent-step.d.ts.map +1 -0
- package/dist/agents/host-agent-step.js +352 -0
- package/dist/agents/host-agent-step.js.map +1 -0
- package/dist/agents/host.d.ts +9 -0
- package/dist/agents/host.d.ts.map +1 -0
- package/dist/agents/host.js +20 -0
- package/dist/agents/host.js.map +1 -0
- package/dist/agents/index.d.ts +6 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +9 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/provider.d.ts +227 -0
- package/dist/agents/provider.d.ts.map +1 -0
- package/dist/agents/provider.js +72 -0
- package/dist/agents/provider.js.map +1 -0
- package/dist/agents/types.d.ts +2 -21
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/engine/workflow-executor.d.ts.map +1 -1
- package/dist/engine/workflow-executor.js +25 -7
- package/dist/engine/workflow-executor.js.map +1 -1
- package/dist/persistence/in-memory-adapter.d.ts +6 -1
- package/dist/persistence/in-memory-adapter.d.ts.map +1 -1
- package/dist/persistence/in-memory-adapter.js +3 -1
- package/dist/persistence/in-memory-adapter.js.map +1 -1
- package/dist/persistence/types.d.ts +16 -1
- package/dist/persistence/types.d.ts.map +1 -1
- package/dist/runtime/workflow-runtime.d.ts.map +1 -1
- package/dist/runtime/workflow-runtime.js +6 -0
- package/dist/runtime/workflow-runtime.js.map +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HostAgentStep — runs an agent the *host* owns, rather than one the SDK
|
|
3
|
+
* drives.
|
|
4
|
+
*
|
|
5
|
+
* Where {@link AgentStep} asks an author to construct an agent (system prompt,
|
|
6
|
+
* tools, model, turn budget), this asks them to choose one and give it a task.
|
|
7
|
+
* Everything about how that agent behaves — its prompt, its tools, its MCP
|
|
8
|
+
* connections — is resolved by the host's own agent platform behind a
|
|
9
|
+
* {@link BaseAgentProvider}.
|
|
10
|
+
*
|
|
11
|
+
* What stays here is the workflow's contract with the step, and it is identical
|
|
12
|
+
* to the LLM step's: the declared output shape, JSON repair, citation
|
|
13
|
+
* splitting, and artifact persistence. Both steps emit the same
|
|
14
|
+
* {@link AgentResult}, so downstream `{{steps.x.output.response}}` refs bind
|
|
15
|
+
* the same way against either.
|
|
16
|
+
*
|
|
17
|
+
* Registered by the host with its own naming, so a deployment shows the step
|
|
18
|
+
* in the author's vocabulary:
|
|
19
|
+
*
|
|
20
|
+
* new HostAgentStep(new ClawAgentProvider(deps), {
|
|
21
|
+
* type: 'RUN_XYNE_AGENT',
|
|
22
|
+
* name: 'Run Xyne Agent',
|
|
23
|
+
* description: 'Run an agent from your workspace',
|
|
24
|
+
* })
|
|
25
|
+
*
|
|
26
|
+
* Free of pi-mono imports — a host registering only this step does not pull the
|
|
27
|
+
* LLM runtime into its bundle.
|
|
28
|
+
*/
|
|
29
|
+
import { z } from 'zod';
|
|
30
|
+
import { BaseActionStep } from '../steps/base-step.js';
|
|
31
|
+
import { markAttachmentFields } from '../common/attachment.js';
|
|
32
|
+
import { AgentResultSchema, agentContractFields, attachmentsField, classifyResponse, isRecord, jsonRepairRetriesField, resolveAgentOutputJsonSchema, shapeAgentResponse, } from './contract.js';
|
|
33
|
+
import { resolveAgentMode, supportsAsync, supportsSync } from './provider.js';
|
|
34
|
+
// ─── Config Schema ───
|
|
35
|
+
/**
|
|
36
|
+
* The fields this step adds on top of the provider's own.
|
|
37
|
+
*
|
|
38
|
+
* `task` is deliberately not called `userMessage`: there is no system prompt to
|
|
39
|
+
* contrast it with here, because the host owns that.
|
|
40
|
+
*/
|
|
41
|
+
const taskField = z.string()
|
|
42
|
+
.describe('What the agent should do. Supports refs, e.g. {{trigger.body.question}}');
|
|
43
|
+
/**
|
|
44
|
+
* Only rendered when the provider implements both transports. Labelled by
|
|
45
|
+
* outcome rather than transport: the author is choosing whether the run holds a
|
|
46
|
+
* worker slot, not which protocol it speaks.
|
|
47
|
+
*/
|
|
48
|
+
const modeField = z.enum(['sync', 'async']).default('sync')
|
|
49
|
+
.describe('Wait for the result, or continue in the background and resume when the agent reports back');
|
|
50
|
+
const hostAgentContractFields = {
|
|
51
|
+
attachments: attachmentsField('Input documents made available to the agent. Bind to a ref, e.g. {{trigger.attachments}}'),
|
|
52
|
+
outputType: agentContractFields.outputType,
|
|
53
|
+
outputSchema: agentContractFields.outputSchema,
|
|
54
|
+
cite: agentContractFields.cite,
|
|
55
|
+
jsonRepairRetries: jsonRepairRetriesField('When the response is empty (any outputType), or — for outputType "json" — not valid JSON, '
|
|
56
|
+
+ 're-run the agent with the reason/parse error up to this many times before returning the '
|
|
57
|
+
+ 'last response as-is.'),
|
|
58
|
+
timeoutMs: agentContractFields.timeoutMs,
|
|
59
|
+
};
|
|
60
|
+
const HostAgentBaseSchema = z.object({
|
|
61
|
+
task: taskField,
|
|
62
|
+
mode: modeField,
|
|
63
|
+
...hostAgentContractFields,
|
|
64
|
+
});
|
|
65
|
+
// ─── Step Row Readers ───
|
|
66
|
+
/**
|
|
67
|
+
* Recover the dispatch record the step wrote when it parked. Absent means this
|
|
68
|
+
* step never dispatched — a row from an older shape, or a resume aimed at the
|
|
69
|
+
* wrong gate — and the caller refuses to collect rather than guessing.
|
|
70
|
+
*/
|
|
71
|
+
function readDispatchRecord(rowData) {
|
|
72
|
+
const raw = rowData['agent'];
|
|
73
|
+
if (!isRecord(raw))
|
|
74
|
+
return undefined;
|
|
75
|
+
const { provider, attempt, externalRef } = raw;
|
|
76
|
+
if (typeof provider !== 'string' || typeof externalRef !== 'string')
|
|
77
|
+
return undefined;
|
|
78
|
+
return { provider, externalRef, attempt: typeof attempt === 'number' ? attempt : 0 };
|
|
79
|
+
}
|
|
80
|
+
/** The payload the host passed to `runtime.resume()`, as the executor stored it. */
|
|
81
|
+
function readResumePayload(rowData) {
|
|
82
|
+
const raw = rowData['resumePayload'];
|
|
83
|
+
if (!isRecord(raw) || typeof raw['action'] !== 'string')
|
|
84
|
+
return undefined;
|
|
85
|
+
return raw;
|
|
86
|
+
}
|
|
87
|
+
// ─── Step ───
|
|
88
|
+
export class HostAgentStep extends BaseActionStep {
|
|
89
|
+
provider;
|
|
90
|
+
type;
|
|
91
|
+
name;
|
|
92
|
+
description;
|
|
93
|
+
category;
|
|
94
|
+
configSchema;
|
|
95
|
+
outputSchema = AgentResultSchema;
|
|
96
|
+
constructor(provider, options = {}) {
|
|
97
|
+
super();
|
|
98
|
+
this.provider = provider;
|
|
99
|
+
this.type = options.type ?? 'RUN_HOST_AGENT';
|
|
100
|
+
this.name = options.name ?? 'Run Agent';
|
|
101
|
+
this.description = options.description ?? 'Run an agent from your workspace';
|
|
102
|
+
this.category = options.category ?? 'ai';
|
|
103
|
+
if (options.icon !== undefined)
|
|
104
|
+
this.icon = options.icon;
|
|
105
|
+
// Provider fields first, so the form reads: pick an agent, then say what it
|
|
106
|
+
// should do, then shape the output. `mode` only appears when the provider
|
|
107
|
+
// can actually do both — otherwise it would be a control with one setting.
|
|
108
|
+
const bothTransports = supportsSync(provider) && supportsAsync(provider);
|
|
109
|
+
this.configSchema = provider.configSchema.extend({
|
|
110
|
+
task: taskField,
|
|
111
|
+
...(bothTransports ? { mode: modeField } : {}),
|
|
112
|
+
...hostAgentContractFields,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
decorateConfigSchema(jsonSchema) {
|
|
116
|
+
const props = jsonSchema['properties'];
|
|
117
|
+
if (props?.['outputSchema']) {
|
|
118
|
+
props['outputSchema'] = { ...props['outputSchema'], format: 'json-schema' };
|
|
119
|
+
}
|
|
120
|
+
markAttachmentFields(jsonSchema, ['attachments']);
|
|
121
|
+
// The provider decorates its own fields — the agent picker's `format` hint
|
|
122
|
+
// is declared there, since only the provider knows how its agents are named.
|
|
123
|
+
return this.provider.decorateConfigSchema?.(jsonSchema) ?? jsonSchema;
|
|
124
|
+
}
|
|
125
|
+
resolveOutputJsonSchema(config) {
|
|
126
|
+
return resolveAgentOutputJsonSchema(config);
|
|
127
|
+
}
|
|
128
|
+
async execute(rawConfig, ctx) {
|
|
129
|
+
const config = rawConfig;
|
|
130
|
+
return resolveAgentMode(this.provider, config.mode) === 'async'
|
|
131
|
+
? this.dispatch(config, ctx, 0)
|
|
132
|
+
: this.runStreaming(config, ctx);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Resume after a dispatched run reported back.
|
|
136
|
+
*
|
|
137
|
+
* This is where the repair loop lives for background runs. It cannot be a
|
|
138
|
+
* loop the way the streaming path is — each attempt crosses a pause boundary,
|
|
139
|
+
* so the budget is carried on the step record and the loop is re-entry.
|
|
140
|
+
*/
|
|
141
|
+
async onResume(rowData, rawConfig, ctx) {
|
|
142
|
+
const provider = this.provider;
|
|
143
|
+
if (!supportsAsync(provider)) {
|
|
144
|
+
throw new Error(`Agent provider "${provider.name}" has no collect(); it cannot resume a dispatched run.`);
|
|
145
|
+
}
|
|
146
|
+
const config = rawConfig;
|
|
147
|
+
const record = readDispatchRecord(rowData);
|
|
148
|
+
if (!record) {
|
|
149
|
+
throw new Error('Step resumed with no agent dispatch record — it was not parked by this step, '
|
|
150
|
+
+ 'so there is no run to collect.');
|
|
151
|
+
}
|
|
152
|
+
// A provider swap between dispatch and callback would otherwise hand this
|
|
153
|
+
// provider a correlation reference minted by a different system.
|
|
154
|
+
if (record.provider !== provider.name) {
|
|
155
|
+
throw new Error(`Step was dispatched to agent provider "${record.provider}" but "${provider.name}" is registered now; `
|
|
156
|
+
+ 'the parked run cannot be collected.');
|
|
157
|
+
}
|
|
158
|
+
const payload = readResumePayload(rowData);
|
|
159
|
+
if (!payload) {
|
|
160
|
+
throw new Error(`Step resumed with no payload — ${provider.name} reported back without a result.`);
|
|
161
|
+
}
|
|
162
|
+
const result = await provider.collect(payload, record, config, ctx);
|
|
163
|
+
const expectJson = config.outputType === 'json';
|
|
164
|
+
const verdict = classifyResponse(result.text, expectJson);
|
|
165
|
+
if (verdict.ok)
|
|
166
|
+
return this.finalize(result, config, ctx, result.attachments ?? []);
|
|
167
|
+
const attempt = record.attempt;
|
|
168
|
+
const defect = {
|
|
169
|
+
reason: verdict.reason,
|
|
170
|
+
...(verdict.error ? { error: verdict.error } : {}),
|
|
171
|
+
};
|
|
172
|
+
if (attempt >= config.jsonRepairRetries) {
|
|
173
|
+
// Unlike the streaming path, a background run cannot hand back a partial
|
|
174
|
+
// result and let the author see it — nothing is watching. Fail loudly.
|
|
175
|
+
throw new Error(`Agent response unusable after ${String(attempt)} repair attempt(s) (${verdict.reason}`
|
|
176
|
+
+ `${verdict.error ? `: ${verdict.error}` : ''})`);
|
|
177
|
+
}
|
|
178
|
+
ctx.log.warn(`Agent response unusable (${verdict.reason}); re-dispatching `
|
|
179
|
+
+ `(${String(attempt + 1)}/${String(config.jsonRepairRetries)})`);
|
|
180
|
+
ctx.emit({
|
|
181
|
+
type: 'substep',
|
|
182
|
+
data: {
|
|
183
|
+
type: 'retry',
|
|
184
|
+
attempt: attempt + 1,
|
|
185
|
+
maxAttempts: config.jsonRepairRetries,
|
|
186
|
+
reason: verdict.reason,
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
return this.dispatch(config, ctx, attempt + 1, defect);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Hand the run to the provider and park the step. Never returns — `ctx.pause`
|
|
193
|
+
* throws, releasing the worker slot until the host calls back.
|
|
194
|
+
*/
|
|
195
|
+
async dispatch(config, ctx, attempt, defect) {
|
|
196
|
+
const provider = this.provider;
|
|
197
|
+
if (!supportsAsync(provider)) {
|
|
198
|
+
throw new Error(`Agent provider "${provider.name}" does not implement dispatch()/collect(); `
|
|
199
|
+
+ 'background runs are not available.');
|
|
200
|
+
}
|
|
201
|
+
const signal = ctx.runtime.metadata['signal']
|
|
202
|
+
?? new AbortController().signal;
|
|
203
|
+
const { externalRef } = await provider.dispatch(config, this.buildInput(config, signal, attempt, defect), ctx);
|
|
204
|
+
const record = { provider: provider.name, attempt, externalRef };
|
|
205
|
+
ctx.pause(`waiting on ${provider.name} agent run`, { externalRef, statePatch: { agent: record } });
|
|
206
|
+
}
|
|
207
|
+
/** Run the agent inline, streaming progress, repairing in a loop. */
|
|
208
|
+
async runStreaming(config, ctx) {
|
|
209
|
+
const provider = this.provider;
|
|
210
|
+
if (!supportsSync(provider)) {
|
|
211
|
+
throw new Error(`Agent provider "${provider.name}" does not implement a streaming run(). `
|
|
212
|
+
+ 'Set mode to "async" to dispatch it instead.');
|
|
213
|
+
}
|
|
214
|
+
const expectJson = config.outputType === 'json';
|
|
215
|
+
const collected = [];
|
|
216
|
+
// Link the execution's own abort signal to this step's wall-clock budget,
|
|
217
|
+
// so a provider holding a connection is told to let go either way.
|
|
218
|
+
const controller = new AbortController();
|
|
219
|
+
const executionSignal = ctx.runtime.metadata['signal'];
|
|
220
|
+
const onExecutionAbort = () => { controller.abort(); };
|
|
221
|
+
executionSignal?.addEventListener('abort', onExecutionAbort, { once: true });
|
|
222
|
+
const timer = setTimeout(() => { controller.abort(); }, config.timeoutMs);
|
|
223
|
+
if (typeof timer === 'object' && 'unref' in timer) {
|
|
224
|
+
timer.unref();
|
|
225
|
+
}
|
|
226
|
+
try {
|
|
227
|
+
let last;
|
|
228
|
+
let defect;
|
|
229
|
+
// `jsonRepairRetries` counts retries, so attempt 0 is the initial run.
|
|
230
|
+
for (let attempt = 0; attempt <= config.jsonRepairRetries; attempt++) {
|
|
231
|
+
last = await this.consume(provider.run(config, this.buildInput(config, controller.signal, attempt, defect), ctx), ctx, collected);
|
|
232
|
+
const verdict = classifyResponse(last.text, expectJson);
|
|
233
|
+
if (verdict.ok)
|
|
234
|
+
break;
|
|
235
|
+
defect = { reason: verdict.reason, ...(verdict.error ? { error: verdict.error } : {}) };
|
|
236
|
+
if (attempt < config.jsonRepairRetries) {
|
|
237
|
+
ctx.log.warn(`Agent response unusable (${verdict.reason}); re-prompting `
|
|
238
|
+
+ `(${String(attempt + 1)}/${String(config.jsonRepairRetries)})`);
|
|
239
|
+
ctx.emit({
|
|
240
|
+
type: 'substep',
|
|
241
|
+
data: {
|
|
242
|
+
type: 'retry',
|
|
243
|
+
attempt: attempt + 1,
|
|
244
|
+
maxAttempts: config.jsonRepairRetries,
|
|
245
|
+
reason: verdict.reason,
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
if (!last) {
|
|
251
|
+
// Unreachable: the loop always runs at least once and `consume` either
|
|
252
|
+
// returns a result or throws. Guarded so a future edit can't silently
|
|
253
|
+
// return an empty agent result.
|
|
254
|
+
throw new Error('Agent run produced no result');
|
|
255
|
+
}
|
|
256
|
+
// The last response is returned as-is even when still unusable — someone
|
|
257
|
+
// is watching this run and can see the failure in the output.
|
|
258
|
+
return this.finalize(last, config, ctx, collected);
|
|
259
|
+
}
|
|
260
|
+
finally {
|
|
261
|
+
clearTimeout(timer);
|
|
262
|
+
executionSignal?.removeEventListener('abort', onExecutionAbort);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
buildInput(config, signal, attempt, defect) {
|
|
266
|
+
const expectJson = config.outputType === 'json';
|
|
267
|
+
const outputSchema = isRecord(config.outputSchema) ? config.outputSchema : undefined;
|
|
268
|
+
return {
|
|
269
|
+
task: config.task,
|
|
270
|
+
// The resolver has replaced any ref with the concrete array by now, so a
|
|
271
|
+
// non-array here means "nothing bound".
|
|
272
|
+
attachments: Array.isArray(config.attachments) ? config.attachments : [],
|
|
273
|
+
expectJson,
|
|
274
|
+
cite: config.cite,
|
|
275
|
+
signal,
|
|
276
|
+
...(expectJson && outputSchema ? { outputSchema } : {}),
|
|
277
|
+
...(defect ? { repair: { attempt, ...defect } } : {}),
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
finalize(result, config, ctx, attachments) {
|
|
281
|
+
return {
|
|
282
|
+
response: shapeAgentResponse(result.text, { outputType: config.outputType, cite: config.cite }, ctx.log),
|
|
283
|
+
toolCalls: result.toolCalls,
|
|
284
|
+
turnCount: result.turnCount,
|
|
285
|
+
usage: result.usage,
|
|
286
|
+
attachments,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Drive one streamed run to completion: forward progress to the execution
|
|
291
|
+
* viewer, persist artifacts, and return the result the provider reported.
|
|
292
|
+
*/
|
|
293
|
+
async consume(events, ctx, collected) {
|
|
294
|
+
let result;
|
|
295
|
+
for await (const event of events) {
|
|
296
|
+
switch (event.type) {
|
|
297
|
+
case 'text':
|
|
298
|
+
if (event.text.length > 0) {
|
|
299
|
+
ctx.emit({ type: 'substep', data: { type: 'message', content: event.text } });
|
|
300
|
+
}
|
|
301
|
+
break;
|
|
302
|
+
case 'thinking':
|
|
303
|
+
ctx.emit({ type: 'thinking', data: { phase: 'start' } });
|
|
304
|
+
break;
|
|
305
|
+
case 'tool_start':
|
|
306
|
+
ctx.emit({
|
|
307
|
+
type: 'tool_call',
|
|
308
|
+
data: {
|
|
309
|
+
tool: event.tool,
|
|
310
|
+
args: event.args,
|
|
311
|
+
phase: 'start',
|
|
312
|
+
toolCallId: event.toolCallId,
|
|
313
|
+
},
|
|
314
|
+
});
|
|
315
|
+
break;
|
|
316
|
+
case 'tool_end':
|
|
317
|
+
ctx.emit({
|
|
318
|
+
type: 'tool_call',
|
|
319
|
+
data: {
|
|
320
|
+
tool: event.tool,
|
|
321
|
+
result: event.result,
|
|
322
|
+
phase: 'end',
|
|
323
|
+
toolCallId: event.toolCallId,
|
|
324
|
+
},
|
|
325
|
+
});
|
|
326
|
+
break;
|
|
327
|
+
case 'artifact': {
|
|
328
|
+
// Storage policy stays in the SDK: the provider yields bytes, the
|
|
329
|
+
// step decides where they land and under whose scope.
|
|
330
|
+
if (!ctx.storage) {
|
|
331
|
+
ctx.log.warn(`Agent produced artifact "${event.name}" but no storage adapter is configured; dropping it`);
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
collected.push(await ctx.storage.store(ctx.runtime.attributes, {
|
|
335
|
+
name: event.name,
|
|
336
|
+
mimeType: event.mimeType,
|
|
337
|
+
bytes: event.bytes,
|
|
338
|
+
}));
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
case 'done':
|
|
342
|
+
result = event.result;
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
if (!result) {
|
|
347
|
+
throw new Error(`Agent provider "${this.provider.name}" ended the run without reporting a result`);
|
|
348
|
+
}
|
|
349
|
+
return result;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
//# sourceMappingURL=host-agent-step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-agent-step.js","sourceRoot":"","sources":["../../src/agents/host-agent-step.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAIvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,sBAAsB,EACtB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAS9E,wBAAwB;AAExB;;;;;GAKG;AACH,MAAM,SAAS,GAAG,CAAC,CAA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CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { BaseAgentProvider, supportsSync, supportsAsync, resolveAgentMode } from './provider.js';
|
|
2
|
+
export type { AgentDescriptor, AgentDispatchRecord, AgentProvider, AgentRunEvent, AgentRunInput, AgentRunResult, AsyncAgentCapability, SyncAgentCapability, } from './provider.js';
|
|
3
|
+
export { HostAgentStep } from './host-agent-step.js';
|
|
4
|
+
export type { HostAgentBaseConfig, HostAgentStepOptions } from './host-agent-step.js';
|
|
5
|
+
export { AgentResultSchema, agentContractFields, attachmentsField, jsonRepairRetriesField, classifyResponse, parseJsonResponse, resolveAgentOutputJsonSchema, shapeAgentResponse, } from './contract.js';
|
|
6
|
+
export type { AgentResult, ResponseDefect, ToolCallRecord } from './contract.js';
|
|
7
|
+
export type { CitationRef, CitationMap } from '../common/citation-ref.js';
|
|
8
|
+
export { CitationRefSchema, isCitationRef } from '../common/citation-ref.js';
|
|
9
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/agents/host.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjG,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAOtF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGjF,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @xyne/workflow-sdk/agents/host — host-owned agent steps.
|
|
2
|
+
//
|
|
3
|
+
// A separate entry point from ./agents on purpose: everything reachable from
|
|
4
|
+
// here is free of pi-mono, so a host that runs its own agent platform (claw, an
|
|
5
|
+
// `agents` table, anything else behind a provider) does not pull
|
|
6
|
+
// @earendil-works/pi-agent-core, pi-ai and typebox into its bundle to get an
|
|
7
|
+
// agent step.
|
|
8
|
+
//
|
|
9
|
+
// Import from ./agents instead when you want the SDK to drive the LLM itself.
|
|
10
|
+
// ─── Provider Port ───
|
|
11
|
+
export { BaseAgentProvider, supportsSync, supportsAsync, resolveAgentMode } from './provider.js';
|
|
12
|
+
// ─── Step ───
|
|
13
|
+
export { HostAgentStep } from './host-agent-step.js';
|
|
14
|
+
// ─── Shared Agent Contract ───
|
|
15
|
+
//
|
|
16
|
+
// Exported so a provider can compose the same output shape and repair
|
|
17
|
+
// semantics the built-in steps use.
|
|
18
|
+
export { AgentResultSchema, agentContractFields, attachmentsField, jsonRepairRetriesField, classifyResponse, parseJsonResponse, resolveAgentOutputJsonSchema, shapeAgentResponse, } from './contract.js';
|
|
19
|
+
export { CitationRefSchema, isCitationRef } from '../common/citation-ref.js';
|
|
20
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/agents/host.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,iEAAiE;AACjE,6EAA6E;AAC7E,cAAc;AACd,EAAE;AACF,8EAA8E;AAE9E,wBAAwB;AAExB,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAYjG,eAAe;AAEf,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,gCAAgC;AAChC,EAAE;AACF,sEAAsE;AACtE,oCAAoC;AAEpC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAKvB,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ export { ToolLoggingInterceptor } from './interceptors/tool-logger.js';
|
|
|
12
12
|
export { AgentStep, AgentStepConfigSchema, type AgentStepConfig, } from './agent-step.js';
|
|
13
13
|
export type { CitationRef, CitationMap } from '../common/citation-ref.js';
|
|
14
14
|
export { CitationRefSchema, isCitationRef } from '../common/citation-ref.js';
|
|
15
|
+
export { BaseAgentProvider, supportsSync, supportsAsync, resolveAgentMode } from './provider.js';
|
|
16
|
+
export type { AgentDescriptor, AgentDispatchRecord, AgentProvider, AgentRunEvent, AgentRunInput, AgentRunResult, AsyncAgentCapability, SyncAgentCapability, } from './provider.js';
|
|
17
|
+
export { HostAgentStep } from './host-agent-step.js';
|
|
18
|
+
export type { HostAgentBaseConfig, HostAgentStepOptions } from './host-agent-step.js';
|
|
19
|
+
export { AgentResultSchema, agentContractFields, attachmentsField, jsonRepairRetriesField, classifyResponse, parseJsonResponse, resolveAgentOutputJsonSchema, shapeAgentResponse, } from './contract.js';
|
|
20
|
+
export type { ResponseDefect } from './contract.js';
|
|
15
21
|
export { PiMonoRuntime, PiMonoConfigSchema, type PiMonoConfig, type PiMonoRuntimeOptions, } from './pi-mono-runtime.js';
|
|
16
22
|
export { PiSessionRuntime, PiSessionConfigSchema, type PiSessionConfig, type PiSessionRuntimeOptions, } from './pi-session-runtime.js';
|
|
17
23
|
export type { AuthCredential } from '@earendil-works/pi-coding-agent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAQA,YAAY,EAEV,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,UAAU,EACV,OAAO,EACP,MAAM,EAEN,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIvF,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,sBA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from './interceptors/tool-logger.js';
|
|
|
15
15
|
// ─── Agent Step ───
|
|
16
16
|
export { AgentStep, AgentStepConfigSchema, } from './agent-step.js';
|
|
17
17
|
export { CitationRefSchema, isCitationRef } from '../common/citation-ref.js';
|
|
18
|
+
// ─── Host-Owned Agents ───
|
|
19
|
+
//
|
|
20
|
+
// For hosts that run their own agent platform rather than letting the SDK drive
|
|
21
|
+
// the LLM. Also available from the pi-free entry point `@xyne/workflow-sdk/agents/host`
|
|
22
|
+
// — import from there to keep pi-mono out of the bundle.
|
|
23
|
+
export { BaseAgentProvider, supportsSync, supportsAsync, resolveAgentMode } from './provider.js';
|
|
24
|
+
export { HostAgentStep } from './host-agent-step.js';
|
|
25
|
+
// ─── Shared Agent Contract ───
|
|
26
|
+
export { AgentResultSchema, agentContractFields, attachmentsField, jsonRepairRetriesField, classifyResponse, parseJsonResponse, resolveAgentOutputJsonSchema, shapeAgentResponse, } from './contract.js';
|
|
18
27
|
// ─── Pi-Mono Runtime ───
|
|
19
28
|
export { PiMonoRuntime, PiMonoConfigSchema, } from './pi-mono-runtime.js';
|
|
20
29
|
// ─── Pi-Session Runtime (AgentSession-based) ───
|
package/dist/agents/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,EAAE;AACF,0EAA0E;AAC1E,kCAAkC;AAClC,0BAA0B;AAgD1B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,uBAAuB;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAKrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAKvF,OAAO,EAAE,mBAAmB,EAAE,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