@dougbots/avenor-core 0.5.2 → 0.7.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/dist/index.d.ts +4 -0
- package/dist/index.js +14 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ interface SpawnParams {
|
|
|
32
32
|
label?: string;
|
|
33
33
|
timeout?: number;
|
|
34
34
|
model?: string;
|
|
35
|
+
agent_profile?: string;
|
|
35
36
|
backend?: string;
|
|
36
37
|
server_url?: string;
|
|
37
38
|
session_id?: string;
|
|
@@ -68,6 +69,7 @@ declare class Client {
|
|
|
68
69
|
shutdown(mode: string): Promise<void>;
|
|
69
70
|
answerPermission(runtimeId: string, requestId: string, optionId: string): Promise<void>;
|
|
70
71
|
prompt(runtimeId: string, text: string): Promise<void>;
|
|
72
|
+
interruptAndPrompt(runtimeId: string, text: string, keepQueue?: boolean): Promise<void>;
|
|
71
73
|
cancel(runtimeId?: string): Promise<void>;
|
|
72
74
|
close(): void;
|
|
73
75
|
}
|
|
@@ -234,6 +236,7 @@ interface RunInfo {
|
|
|
234
236
|
runtimeId?: string;
|
|
235
237
|
sessionId?: string;
|
|
236
238
|
agent?: string;
|
|
239
|
+
agentProfile?: string;
|
|
237
240
|
backend?: string;
|
|
238
241
|
dir?: string;
|
|
239
242
|
brokerUrl?: string;
|
|
@@ -278,6 +281,7 @@ declare function spawnTool(args: {
|
|
|
278
281
|
dir?: string;
|
|
279
282
|
timeout?: string;
|
|
280
283
|
model?: string;
|
|
284
|
+
agentProfile?: string;
|
|
281
285
|
backend?: string;
|
|
282
286
|
serverUrl?: string;
|
|
283
287
|
sessionId?: string;
|
package/dist/index.js
CHANGED
|
@@ -259,6 +259,13 @@ var Client = class {
|
|
|
259
259
|
text
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
|
+
async interruptAndPrompt(runtimeId, text, keepQueue = false) {
|
|
263
|
+
await this.call("interrupt_and_prompt", {
|
|
264
|
+
runtime_id: runtimeId,
|
|
265
|
+
text,
|
|
266
|
+
keep_queue: keepQueue
|
|
267
|
+
});
|
|
268
|
+
}
|
|
262
269
|
async cancel(runtimeId) {
|
|
263
270
|
const params = runtimeId ? { runtime_id: runtimeId } : void 0;
|
|
264
271
|
await this.call("cancel", params);
|
|
@@ -1262,6 +1269,7 @@ var Supervisor = class Supervisor {
|
|
|
1262
1269
|
runtimeId: result.runtime_id,
|
|
1263
1270
|
sessionId: result.session_id,
|
|
1264
1271
|
agent: spawnParams.agent ?? params.agent,
|
|
1272
|
+
agentProfile: spawnParams.agent_profile,
|
|
1265
1273
|
backend: spawnParams.backend,
|
|
1266
1274
|
dir: spawnParams.dir,
|
|
1267
1275
|
brokerUrl: result.broker_url,
|
|
@@ -1352,6 +1360,7 @@ async function spawnTool(args) {
|
|
|
1352
1360
|
dir: args.dir,
|
|
1353
1361
|
timeout: args.timeout !== void 0 ? validateTimeout(args.timeout) : void 0,
|
|
1354
1362
|
model: args.model,
|
|
1363
|
+
agent_profile: args.agentProfile,
|
|
1355
1364
|
backend: args.backend,
|
|
1356
1365
|
server_url: args.serverUrl,
|
|
1357
1366
|
session_id: args.sessionId,
|
|
@@ -1380,6 +1389,7 @@ async function spawnTool(args) {
|
|
|
1380
1389
|
dir: args.dir,
|
|
1381
1390
|
timeout: args.timeout !== void 0 ? validateTimeout(args.timeout) : void 0,
|
|
1382
1391
|
model: args.model,
|
|
1392
|
+
agent_profile: args.agentProfile,
|
|
1383
1393
|
backend: args.backend,
|
|
1384
1394
|
server_url: args.serverUrl,
|
|
1385
1395
|
session_id: args.sessionId,
|
|
@@ -2043,6 +2053,7 @@ async function followUpTool(args) {
|
|
|
2043
2053
|
const agent = requireResumableAgent(liveStatus?.agent ?? runInfo?.agent);
|
|
2044
2054
|
const backend = liveStatus?.backend ?? runInfo?.backend;
|
|
2045
2055
|
const dir = liveStatus?.dir ?? runInfo?.dir;
|
|
2056
|
+
const agentProfile = liveStatus?.agent_profile ?? runInfo?.agentProfile;
|
|
2046
2057
|
const followUpRunId = crypto.randomUUID();
|
|
2047
2058
|
const followUpLabel = args.label ?? `${args.runId}-followup`;
|
|
2048
2059
|
const { sentinelPath: followUpSentinelPath, eventLogPath } = ensureRunPaths(followUpRunId);
|
|
@@ -2056,6 +2067,7 @@ async function followUpTool(args) {
|
|
|
2056
2067
|
};
|
|
2057
2068
|
if (backend) spawnParams.backend = backend;
|
|
2058
2069
|
if (dir) spawnParams.dir = dir;
|
|
2070
|
+
if (agentProfile) spawnParams.agent_profile = agentProfile;
|
|
2059
2071
|
return {
|
|
2060
2072
|
run_id: (await client.spawn(spawnParams)).runtime_id ?? followUpRunId,
|
|
2061
2073
|
label: followUpLabel
|
|
@@ -2077,11 +2089,13 @@ async function followUpTool(args) {
|
|
|
2077
2089
|
const agent = requireResumableAgent(liveStatus?.agent ?? runInfo.agent);
|
|
2078
2090
|
const backend = liveStatus?.backend ?? runInfo.backend;
|
|
2079
2091
|
const dir = liveStatus?.dir ?? runInfo.dir;
|
|
2092
|
+
const agentProfile = liveStatus?.agent_profile ?? runInfo.agentProfile;
|
|
2080
2093
|
const followUpLabel = args.label ?? `${runInfo.label}-followup`;
|
|
2081
2094
|
const followUpRun = await sup.spawn({
|
|
2082
2095
|
agent,
|
|
2083
2096
|
backend,
|
|
2084
2097
|
dir,
|
|
2098
|
+
agent_profile: agentProfile,
|
|
2085
2099
|
prompt: args.message,
|
|
2086
2100
|
session_id: sessionId,
|
|
2087
2101
|
label: followUpLabel
|