wunderland 0.91.0 → 0.92.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/cli/commands/start/agent-turn.d.ts +2 -1
- package/dist/cli/commands/start/agent-turn.d.ts.map +1 -1
- package/dist/cli/commands/start/agent-turn.js +16 -7
- package/dist/cli/commands/start/agent-turn.js.map +1 -1
- package/dist/cli/commands/start/channel-handler.d.ts +3 -0
- package/dist/cli/commands/start/channel-handler.d.ts.map +1 -1
- package/dist/cli/commands/start/channel-handler.js +11 -1
- package/dist/cli/commands/start/channel-handler.js.map +1 -1
- package/dist/cli/commands/start/hosted-events.d.ts +2 -0
- package/dist/cli/commands/start/hosted-events.d.ts.map +1 -1
- package/dist/cli/commands/start/hosted-events.js +1 -0
- package/dist/cli/commands/start/hosted-events.js.map +1 -1
- package/dist/cli/commands/start/http-server.d.ts.map +1 -1
- package/dist/cli/commands/start/http-server.js +1 -0
- package/dist/cli/commands/start/http-server.js.map +1 -1
- package/dist/cli/commands/start/llm-provider-setup.d.ts.map +1 -1
- package/dist/cli/commands/start/llm-provider-setup.js +6 -0
- package/dist/cli/commands/start/llm-provider-setup.js.map +1 -1
- package/dist/cli/commands/start/remote-approvals.d.ts +163 -0
- package/dist/cli/commands/start/remote-approvals.d.ts.map +1 -0
- package/dist/cli/commands/start/remote-approvals.js +439 -0
- package/dist/cli/commands/start/remote-approvals.js.map +1 -0
- package/dist/cli/commands/start/routes/chat.d.ts.map +1 -1
- package/dist/cli/commands/start/routes/chat.js +8 -1
- package/dist/cli/commands/start/routes/chat.js.map +1 -1
- package/dist/cli/commands/start/routes/types.d.ts +3 -0
- package/dist/cli/commands/start/routes/types.d.ts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/tui/views/status-view.d.ts.map +1 -1
- package/dist/cli/tui/views/status-view.js +3 -1
- package/dist/cli/tui/views/status-view.js.map +1 -1
- package/dist/runtime/tools/tool-calling.d.ts +14 -0
- package/dist/runtime/tools/tool-calling.d.ts.map +1 -1
- package/dist/runtime/tools/tool-calling.js +65 -13
- package/dist/runtime/tools/tool-calling.js.map +1 -1
- package/dist/runtime/tools/tool-helpers.d.ts +2 -0
- package/dist/runtime/tools/tool-helpers.d.ts.map +1 -1
- package/dist/runtime/tools/tool-helpers.js +2 -0
- package/dist/runtime/tools/tool-helpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { APPROVAL_UNAVAILABLE } from '../../../runtime/tools/tool-helpers.js';
|
|
2
|
+
import { type ReportedTurn } from './hosted-events.js';
|
|
3
|
+
export { APPROVAL_UNAVAILABLE };
|
|
4
|
+
/** The `hitl.mode` that chooses this handler. */
|
|
5
|
+
export declare const HITL_MODE_REMOTE = "remote";
|
|
6
|
+
/** How long an outward tool waits for its answer. */
|
|
7
|
+
export declare const REMOTE_APPROVAL_WAIT_MS: number;
|
|
8
|
+
/** How long the handler waits between one poll's answer and the next poll. */
|
|
9
|
+
export declare const REMOTE_APPROVAL_POLL_MS = 5000;
|
|
10
|
+
/** The most characters of a tool's arguments a request carries. */
|
|
11
|
+
export declare const REMOTE_APPROVAL_TEXT_LIMIT = 1800;
|
|
12
|
+
/** Why a tool did not run: the server's word, or {@link APPROVAL_UNAVAILABLE}. */
|
|
13
|
+
export type RemoteApprovalWord = 'declined' | 'expired' | 'withdrawn' | typeof APPROVAL_UNAVAILABLE;
|
|
14
|
+
/** What a person is asked to approve. */
|
|
15
|
+
export interface RemoteApprovalAction {
|
|
16
|
+
/** One line: the tool and, when it names one, its target. */
|
|
17
|
+
summary: string;
|
|
18
|
+
/** The tool's arguments, with secrets masked, up to {@link REMOTE_APPROVAL_TEXT_LIMIT} characters. */
|
|
19
|
+
text: string;
|
|
20
|
+
}
|
|
21
|
+
/** The body of `POST <url>/approvals`. */
|
|
22
|
+
export interface RemoteApprovalRequest {
|
|
23
|
+
toolName: string;
|
|
24
|
+
action: RemoteApprovalAction;
|
|
25
|
+
/** The turn's operation id; it also goes in the header `AGENTOS_OPERATION_ID_HEADER` names. */
|
|
26
|
+
operationId: string;
|
|
27
|
+
}
|
|
28
|
+
/** The handler's answer: `approve` runs the tool, `abort` ends the turn with the word. */
|
|
29
|
+
export type RemoteApprovalDecision = {
|
|
30
|
+
decision: 'approve';
|
|
31
|
+
approved: true;
|
|
32
|
+
} | {
|
|
33
|
+
decision: 'abort';
|
|
34
|
+
approved: false;
|
|
35
|
+
reason: RemoteApprovalWord;
|
|
36
|
+
};
|
|
37
|
+
/** Asks the server and waits for its answer. Never rejects. */
|
|
38
|
+
export type RemoteApprovalHandler = (request: RemoteApprovalRequest, hooks?: {
|
|
39
|
+
/** Called once the server holds the request, before the first poll. */
|
|
40
|
+
onWaiting?: () => void;
|
|
41
|
+
}) => Promise<RemoteApprovalDecision>;
|
|
42
|
+
/** Options for {@link createRemoteApprovalHandler}. */
|
|
43
|
+
export interface RemoteApprovalHandlerOptions {
|
|
44
|
+
/** The API root, without `/approvals`. */
|
|
45
|
+
url: string;
|
|
46
|
+
/** The bearer token. */
|
|
47
|
+
token: string;
|
|
48
|
+
/** How long to wait for the answer; {@link REMOTE_APPROVAL_WAIT_MS} by default. */
|
|
49
|
+
waitMs?: number;
|
|
50
|
+
/** The pause between polls; {@link REMOTE_APPROVAL_POLL_MS} by default. */
|
|
51
|
+
pollMs?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Creates the handler for one server.
|
|
55
|
+
*
|
|
56
|
+
* It posts `{ toolName, action, operationId }` to `<url>/approvals` with
|
|
57
|
+
* `Authorization: Bearer <token>`, then reads `{ state }` from `GET
|
|
58
|
+
* <url>/approvals/:id` until the state is `approved`, `declined`, `expired` or
|
|
59
|
+
* `withdrawn`, or `waitMs` has passed since the server took the request. A last
|
|
60
|
+
* poll at the deadline reads a yes that came just before it.
|
|
61
|
+
*
|
|
62
|
+
* A request the server does not take answers {@link APPROVAL_UNAVAILABLE}, and
|
|
63
|
+
* so does a poll answered with any 4xx but 408, 425 or 429: the token or the row
|
|
64
|
+
* is gone. A poll with no answer, a 408, 425, 429 or 5xx, or a state this module
|
|
65
|
+
* does not know keeps waiting.
|
|
66
|
+
*
|
|
67
|
+
* Warnings go to `console.warn`, one line a minute at most, and hold a status or
|
|
68
|
+
* an error's name, never the token and never the action.
|
|
69
|
+
*
|
|
70
|
+
* @param options - The server, the token and the timings.
|
|
71
|
+
* @returns The handler.
|
|
72
|
+
*/
|
|
73
|
+
export declare function createRemoteApprovalHandler(options: RemoteApprovalHandlerOptions): RemoteApprovalHandler;
|
|
74
|
+
/**
|
|
75
|
+
* The handler an agent's `hitl.mode` asks for. Any mode but `remote` gets none.
|
|
76
|
+
* `remote` gets a handler on `WUNDERLAND_EVENTS_URL` and
|
|
77
|
+
* `WUNDERLAND_EVENTS_TOKEN`; with either unset, blank or not a URL it gets one
|
|
78
|
+
* that refuses every request, with one warning line.
|
|
79
|
+
*
|
|
80
|
+
* @param mode - `hitl.mode` from the agent config.
|
|
81
|
+
* @param env - The environment to read; `process.env` by default.
|
|
82
|
+
* @returns The handler, or `undefined` when the mode is not `remote`.
|
|
83
|
+
*/
|
|
84
|
+
export declare function remoteApprovalHandlerForMode(mode: unknown, env?: Record<string, string | undefined>): RemoteApprovalHandler | undefined;
|
|
85
|
+
/** A tool as the marking reads it. */
|
|
86
|
+
export interface MarkedTool {
|
|
87
|
+
name?: string;
|
|
88
|
+
category?: string;
|
|
89
|
+
hasSideEffects?: boolean;
|
|
90
|
+
}
|
|
91
|
+
/** The conversation a turn answers. A turn with none (`POST /chat`, a webhook) has no channel of its own. */
|
|
92
|
+
export interface TurnConversation {
|
|
93
|
+
platform: string;
|
|
94
|
+
conversationId: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Whether a tool call is an outward action that asks first.
|
|
98
|
+
*
|
|
99
|
+
* It is when the tool's name has a write verb and the tool either sits in an
|
|
100
|
+
* outward category or does not declare itself free of side effects; and when a
|
|
101
|
+
* tool that declares side effects aims at a channel other than the
|
|
102
|
+
* conversation's own. A send to the conversation's own channel through a
|
|
103
|
+
* channel tool still asks, by its category and verb: the plain reply of a turn
|
|
104
|
+
* reaches the channel without a tool.
|
|
105
|
+
*
|
|
106
|
+
* @param tool - The tool's name, category and side-effect flag.
|
|
107
|
+
* @param args - The call's arguments.
|
|
108
|
+
* @param conversation - The conversation the turn answers, if it answers one.
|
|
109
|
+
* @returns Whether the call asks.
|
|
110
|
+
*/
|
|
111
|
+
export declare function isOutwardAction(tool: MarkedTool, args: Record<string, unknown>, conversation?: TurnConversation): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* What a person reads before answering: the tool and its target in one line, and
|
|
114
|
+
* its arguments, with any field named like a secret masked.
|
|
115
|
+
*
|
|
116
|
+
* @param tool - The tool.
|
|
117
|
+
* @param args - The call's arguments.
|
|
118
|
+
* @returns The action a request carries.
|
|
119
|
+
*/
|
|
120
|
+
export declare function describeAction(tool: MarkedTool, args: Record<string, unknown>): RemoteApprovalAction;
|
|
121
|
+
/**
|
|
122
|
+
* The line a turn ends with when a tool's approval came back anything but yes.
|
|
123
|
+
*
|
|
124
|
+
* @param word - Why the tool did not run.
|
|
125
|
+
* @param toolName - The tool.
|
|
126
|
+
* @returns The line, which holds the word.
|
|
127
|
+
*/
|
|
128
|
+
export declare function remoteApprovalLine(word: RemoteApprovalWord, toolName: string): string;
|
|
129
|
+
/** What a turn hands the asking functions. */
|
|
130
|
+
export interface ApprovingTurn {
|
|
131
|
+
/** The conversation the turn answers, if it answers one. */
|
|
132
|
+
conversation?: TurnConversation;
|
|
133
|
+
/** The turn's reporting: its operation id, and the `approval_requested` event. */
|
|
134
|
+
reportedTurn?: ReportedTurn;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Asks the handler about one tool call and waits for the answer.
|
|
138
|
+
*
|
|
139
|
+
* @param handler - The handler.
|
|
140
|
+
* @param tool - The tool.
|
|
141
|
+
* @param args - The call's arguments.
|
|
142
|
+
* @param turn - The turn asking.
|
|
143
|
+
* @returns The decision. A handler that throws counts as {@link APPROVAL_UNAVAILABLE}.
|
|
144
|
+
*/
|
|
145
|
+
export declare function askRemoteApproval(handler: RemoteApprovalHandler, tool: MarkedTool, args: Record<string, unknown>, turn?: ApprovingTurn): Promise<RemoteApprovalDecision>;
|
|
146
|
+
/** The answer of the hook {@link outwardApprovalFor} builds, as `runToolCallingTurn` reads it. */
|
|
147
|
+
export type OutwardApprovalVerdict = {
|
|
148
|
+
approved: true;
|
|
149
|
+
} | {
|
|
150
|
+
approved: false;
|
|
151
|
+
reason: RemoteApprovalWord;
|
|
152
|
+
line: string;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* The `outwardApproval` hook of `runToolCallingTurn` for one turn: outward calls
|
|
156
|
+
* ask the handler, every other call passes through it unasked.
|
|
157
|
+
*
|
|
158
|
+
* @param handler - The agent's handler, if it has one.
|
|
159
|
+
* @param turn - The turn.
|
|
160
|
+
* @returns The hook, or `undefined` when the agent has no handler.
|
|
161
|
+
*/
|
|
162
|
+
export declare function outwardApprovalFor(handler: RemoteApprovalHandler | undefined, turn: ApprovingTurn): ((tool: MarkedTool, args: Record<string, unknown>) => Promise<OutwardApprovalVerdict | undefined>) | undefined;
|
|
163
|
+
//# sourceMappingURL=remote-approvals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-approvals.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/start/remote-approvals.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,oBAAoB,EAAqB,MAAM,wCAAwC,CAAC;AACjG,OAAO,EAAoC,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEzF,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAEzC,qDAAqD;AACrD,eAAO,MAAM,u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7B,IAAI,GAAE,aAAkB,GACvB,OAAO,CAAC,sBAAsB,CAAC,CAajC;AAED,kGAAkG;AAClG,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,EAAE,IAAI,CAAA;CAAE,GAClB;IAAE,QAAQ,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAElE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,qBAAqB,GAAG,SAAS,EAC1C,IAAI,EAAE,aAAa,GAEjB,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC,GAClG,SAAS,CAYZ"}
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The remote approval handler of `wunderland start`.
|
|
3
|
+
*
|
|
4
|
+
* With `hitl.mode: "remote"` in the agent config, an outward tool asks a server
|
|
5
|
+
* before it runs: `POST <url>/approvals` makes the request, `GET
|
|
6
|
+
* <url>/approvals/:id` reads the answer, on the URL and the token of
|
|
7
|
+
* `WUNDERLAND_EVENTS_URL` and `WUNDERLAND_EVENTS_TOKEN`. A person's yes on that
|
|
8
|
+
* server runs the tool. A no, an expiry or a lost server ends the turn with the
|
|
9
|
+
* word, and the tool never runs.
|
|
10
|
+
*
|
|
11
|
+
* It fails closed. With either variable missing, every outward tool is refused
|
|
12
|
+
* {@link APPROVAL_UNAVAILABLE}, so an agent that lost its token never acts
|
|
13
|
+
* unasked. Only the literal state `approved` ever counts as a yes.
|
|
14
|
+
*
|
|
15
|
+
* Without `hitl.mode: "remote"` no handler exists and nothing here applies.
|
|
16
|
+
*
|
|
17
|
+
* The action's text reaches the approvals route alone: never a log line, and
|
|
18
|
+
* never the events of `hosted-events.ts`.
|
|
19
|
+
*
|
|
20
|
+
* @module wunderland/cli/commands/start/remote-approvals
|
|
21
|
+
*/
|
|
22
|
+
import { randomUUID } from 'node:crypto';
|
|
23
|
+
import { resolveOperationIdHeader } from '../../../platform/config/operation-id.js';
|
|
24
|
+
import { APPROVAL_UNAVAILABLE, safeJsonStringify } from '../../../runtime/tools/tool-helpers.js';
|
|
25
|
+
import { EVENTS_TOKEN_ENV, EVENTS_URL_ENV } from './hosted-events.js';
|
|
26
|
+
export { APPROVAL_UNAVAILABLE };
|
|
27
|
+
/** The `hitl.mode` that chooses this handler. */
|
|
28
|
+
export const HITL_MODE_REMOTE = 'remote';
|
|
29
|
+
/** How long an outward tool waits for its answer. */
|
|
30
|
+
export const REMOTE_APPROVAL_WAIT_MS = 10 * 60_000;
|
|
31
|
+
/** How long the handler waits between one poll's answer and the next poll. */
|
|
32
|
+
export const REMOTE_APPROVAL_POLL_MS = 5_000;
|
|
33
|
+
/** The most characters of a tool's arguments a request carries. */
|
|
34
|
+
export const REMOTE_APPROVAL_TEXT_LIMIT = 1_800;
|
|
35
|
+
/** How long the request may take before the tool is refused. */
|
|
36
|
+
const REQUEST_TIMEOUT_MS = 10_000;
|
|
37
|
+
/** How long one poll may take: a server may hold it open until the answer comes. */
|
|
38
|
+
const POLL_TIMEOUT_MS = 35_000;
|
|
39
|
+
/** At most one warning line per this many milliseconds. */
|
|
40
|
+
const WARN_INTERVAL_MS = 60_000;
|
|
41
|
+
const SUMMARY_MAX_LENGTH = 200;
|
|
42
|
+
const MASK_MAX_DEPTH = 8;
|
|
43
|
+
const MASKED = '[REDACTED]';
|
|
44
|
+
const SECRET_ARG = /api[-_]?key|token|secret|password|passwd|authorization|credential|cookie/i;
|
|
45
|
+
const APPROVE = Object.freeze({ decision: 'approve', approved: true });
|
|
46
|
+
function abort(reason) {
|
|
47
|
+
return { decision: 'abort', approved: false, reason };
|
|
48
|
+
}
|
|
49
|
+
/** The server's words that end the wait with no. */
|
|
50
|
+
const ABORT_STATES = new Set(['declined', 'expired', 'withdrawn']);
|
|
51
|
+
/** What a poll may tell: a state word, or that the token or the request is gone. */
|
|
52
|
+
const GONE = Symbol('gone');
|
|
53
|
+
function sleep(ms) {
|
|
54
|
+
return new Promise((resolve) => {
|
|
55
|
+
const timer = setTimeout(resolve, ms);
|
|
56
|
+
timer.unref?.();
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async function readJson(res) {
|
|
60
|
+
try {
|
|
61
|
+
return JSON.parse(await res.text());
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function fieldOf(body, name) {
|
|
68
|
+
return body && typeof body === 'object' ? body[name] : undefined;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates the handler for one server.
|
|
72
|
+
*
|
|
73
|
+
* It posts `{ toolName, action, operationId }` to `<url>/approvals` with
|
|
74
|
+
* `Authorization: Bearer <token>`, then reads `{ state }` from `GET
|
|
75
|
+
* <url>/approvals/:id` until the state is `approved`, `declined`, `expired` or
|
|
76
|
+
* `withdrawn`, or `waitMs` has passed since the server took the request. A last
|
|
77
|
+
* poll at the deadline reads a yes that came just before it.
|
|
78
|
+
*
|
|
79
|
+
* A request the server does not take answers {@link APPROVAL_UNAVAILABLE}, and
|
|
80
|
+
* so does a poll answered with any 4xx but 408, 425 or 429: the token or the row
|
|
81
|
+
* is gone. A poll with no answer, a 408, 425, 429 or 5xx, or a state this module
|
|
82
|
+
* does not know keeps waiting.
|
|
83
|
+
*
|
|
84
|
+
* Warnings go to `console.warn`, one line a minute at most, and hold a status or
|
|
85
|
+
* an error's name, never the token and never the action.
|
|
86
|
+
*
|
|
87
|
+
* @param options - The server, the token and the timings.
|
|
88
|
+
* @returns The handler.
|
|
89
|
+
*/
|
|
90
|
+
export function createRemoteApprovalHandler(options) {
|
|
91
|
+
const endpoint = `${options.url.trim().replace(/\/+$/, '')}/approvals`;
|
|
92
|
+
const token = options.token.trim();
|
|
93
|
+
const waitMs = options.waitMs ?? REMOTE_APPROVAL_WAIT_MS;
|
|
94
|
+
const pollMs = options.pollMs ?? REMOTE_APPROVAL_POLL_MS;
|
|
95
|
+
let lastWarnAt;
|
|
96
|
+
const warn = (line) => {
|
|
97
|
+
const now = Date.now();
|
|
98
|
+
if (lastWarnAt !== undefined && now - lastWarnAt < WARN_INTERVAL_MS)
|
|
99
|
+
return;
|
|
100
|
+
lastWarnAt = now;
|
|
101
|
+
console.warn(`[remote-approvals] ${line}`);
|
|
102
|
+
};
|
|
103
|
+
let operationHeader;
|
|
104
|
+
try {
|
|
105
|
+
operationHeader = resolveOperationIdHeader();
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
warn(`${err instanceof Error ? err.message : String(err)} Asking without an operation id header.`);
|
|
109
|
+
}
|
|
110
|
+
const headersFor = (operationId) => ({
|
|
111
|
+
Authorization: `Bearer ${token}`,
|
|
112
|
+
...(operationHeader ? { [operationHeader]: operationId } : {}),
|
|
113
|
+
});
|
|
114
|
+
/** Makes the request. Returns the server's id for it, or nothing when it did not take it. */
|
|
115
|
+
const open = async (request) => {
|
|
116
|
+
let res;
|
|
117
|
+
try {
|
|
118
|
+
res = await fetch(endpoint, {
|
|
119
|
+
method: 'POST',
|
|
120
|
+
headers: { 'Content-Type': 'application/json', ...headersFor(request.operationId) },
|
|
121
|
+
body: JSON.stringify({
|
|
122
|
+
toolName: request.toolName,
|
|
123
|
+
action: request.action,
|
|
124
|
+
operationId: request.operationId,
|
|
125
|
+
}),
|
|
126
|
+
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
warn(`The approvals server did not answer (${err instanceof Error ? err.name : 'error'}); refusing the tool.`);
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
const body = await readJson(res);
|
|
134
|
+
if (!res.ok) {
|
|
135
|
+
warn(`The approvals server refused the request (${res.status}); refusing the tool.`);
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
const id = fieldOf(body, 'id');
|
|
139
|
+
if (typeof id !== 'string' || id === '') {
|
|
140
|
+
warn('The approvals server took the request and gave no id; refusing the tool.');
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
return id;
|
|
144
|
+
};
|
|
145
|
+
/** Reads the request's state once: its word, {@link GONE}, or nothing to go on. */
|
|
146
|
+
const poll = async (id, operationId, timeoutMs) => {
|
|
147
|
+
let res;
|
|
148
|
+
try {
|
|
149
|
+
res = await fetch(`${endpoint}/${encodeURIComponent(id)}`, {
|
|
150
|
+
method: 'GET',
|
|
151
|
+
headers: headersFor(operationId),
|
|
152
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
catch (err) {
|
|
156
|
+
warn(`The approvals server did not answer a poll (${err instanceof Error ? err.name : 'error'}); still waiting.`);
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
const body = await readJson(res);
|
|
160
|
+
if (res.ok)
|
|
161
|
+
return fieldOf(body, 'state');
|
|
162
|
+
if (res.status === 408 || res.status === 425 || res.status === 429 || res.status >= 500) {
|
|
163
|
+
warn(`The approvals server answered a poll with ${res.status}; still waiting.`);
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
warn(`The approvals server answered a poll with ${res.status}; refusing the tool.`);
|
|
167
|
+
return GONE;
|
|
168
|
+
};
|
|
169
|
+
return async (request, hooks) => {
|
|
170
|
+
const id = await open(request);
|
|
171
|
+
if (id === undefined)
|
|
172
|
+
return abort(APPROVAL_UNAVAILABLE);
|
|
173
|
+
hooks?.onWaiting?.();
|
|
174
|
+
// Counted from the server's answer, so its own deadline, which starts when
|
|
175
|
+
// it takes the request, comes first and its word is the one that is read.
|
|
176
|
+
const deadline = Date.now() + waitMs;
|
|
177
|
+
for (;;) {
|
|
178
|
+
const timeoutMs = Math.min(POLL_TIMEOUT_MS, Math.max(deadline - Date.now(), pollMs));
|
|
179
|
+
const state = await poll(id, request.operationId, timeoutMs);
|
|
180
|
+
if (state === GONE)
|
|
181
|
+
return abort(APPROVAL_UNAVAILABLE);
|
|
182
|
+
if (state === 'approved')
|
|
183
|
+
return APPROVE;
|
|
184
|
+
if (typeof state === 'string' && ABORT_STATES.has(state))
|
|
185
|
+
return abort(state);
|
|
186
|
+
const left = deadline - Date.now();
|
|
187
|
+
if (left <= 0)
|
|
188
|
+
return abort('expired');
|
|
189
|
+
await sleep(Math.min(pollMs, left));
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/** Refuses every request without asking anyone: the handler of an agent with no server to ask. */
|
|
194
|
+
const refuseEveryRequest = async () => abort(APPROVAL_UNAVAILABLE);
|
|
195
|
+
/**
|
|
196
|
+
* The handler an agent's `hitl.mode` asks for. Any mode but `remote` gets none.
|
|
197
|
+
* `remote` gets a handler on `WUNDERLAND_EVENTS_URL` and
|
|
198
|
+
* `WUNDERLAND_EVENTS_TOKEN`; with either unset, blank or not a URL it gets one
|
|
199
|
+
* that refuses every request, with one warning line.
|
|
200
|
+
*
|
|
201
|
+
* @param mode - `hitl.mode` from the agent config.
|
|
202
|
+
* @param env - The environment to read; `process.env` by default.
|
|
203
|
+
* @returns The handler, or `undefined` when the mode is not `remote`.
|
|
204
|
+
*/
|
|
205
|
+
export function remoteApprovalHandlerForMode(mode, env = process.env) {
|
|
206
|
+
if (typeof mode !== 'string' || mode.trim().toLowerCase() !== HITL_MODE_REMOTE)
|
|
207
|
+
return undefined;
|
|
208
|
+
const url = env[EVENTS_URL_ENV]?.trim();
|
|
209
|
+
const token = env[EVENTS_TOKEN_ENV]?.trim();
|
|
210
|
+
if (!url || !token) {
|
|
211
|
+
console.warn(`[remote-approvals] hitl.mode is "remote" and ${EVENTS_URL_ENV} or ${EVENTS_TOKEN_ENV} is not set; every outward tool is refused ${APPROVAL_UNAVAILABLE}.`);
|
|
212
|
+
return refuseEveryRequest;
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
new URL(url);
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
console.warn(`[remote-approvals] hitl.mode is "remote" and ${EVENTS_URL_ENV} is not a URL; every outward tool is refused ${APPROVAL_UNAVAILABLE}.`);
|
|
219
|
+
return refuseEveryRequest;
|
|
220
|
+
}
|
|
221
|
+
return createRemoteApprovalHandler({ url, token });
|
|
222
|
+
}
|
|
223
|
+
/** The categories whose tools with a write verb ask even if they declare no side effects. */
|
|
224
|
+
const OUTWARD_CATEGORIES = new Set([
|
|
225
|
+
'channel',
|
|
226
|
+
'channels',
|
|
227
|
+
'communication',
|
|
228
|
+
'communications',
|
|
229
|
+
'social',
|
|
230
|
+
'tools',
|
|
231
|
+
]);
|
|
232
|
+
/** The words in a tool's name that make it an outward action: a send, a post, a publish, a purchase, a bulk send, a webhook. */
|
|
233
|
+
const WRITE_VERBS = new Set([
|
|
234
|
+
'send',
|
|
235
|
+
'post',
|
|
236
|
+
'publish',
|
|
237
|
+
'purchase',
|
|
238
|
+
'buy',
|
|
239
|
+
'pay',
|
|
240
|
+
'broadcast',
|
|
241
|
+
'bulk',
|
|
242
|
+
'webhook',
|
|
243
|
+
]);
|
|
244
|
+
/** A word in a tool's name that, coming first, makes the rest of the name its object: `getPost`. */
|
|
245
|
+
const READ_VERBS = new Set([
|
|
246
|
+
'get',
|
|
247
|
+
'list',
|
|
248
|
+
'read',
|
|
249
|
+
'search',
|
|
250
|
+
'find',
|
|
251
|
+
'fetch',
|
|
252
|
+
'lookup',
|
|
253
|
+
'query',
|
|
254
|
+
'check',
|
|
255
|
+
'view',
|
|
256
|
+
'show',
|
|
257
|
+
'describe',
|
|
258
|
+
'count',
|
|
259
|
+
]);
|
|
260
|
+
/** The arguments that name where a tool's action goes, across the channel packs. */
|
|
261
|
+
const TARGET_ARGS = [
|
|
262
|
+
'channelId',
|
|
263
|
+
'channel_id',
|
|
264
|
+
'channel',
|
|
265
|
+
'chatId',
|
|
266
|
+
'chat_id',
|
|
267
|
+
'conversationId',
|
|
268
|
+
'conversation_id',
|
|
269
|
+
'roomId',
|
|
270
|
+
'room_id',
|
|
271
|
+
'jid',
|
|
272
|
+
'recipient',
|
|
273
|
+
'recipientId',
|
|
274
|
+
'recipient_id',
|
|
275
|
+
'to',
|
|
276
|
+
'target',
|
|
277
|
+
'targetChannel',
|
|
278
|
+
'target_channel',
|
|
279
|
+
];
|
|
280
|
+
/** The first read or write verb in a tool's name decides: `sendMessage` writes, `getSendStatus` reads. */
|
|
281
|
+
function hasWriteVerb(name) {
|
|
282
|
+
if (typeof name !== 'string')
|
|
283
|
+
return false;
|
|
284
|
+
const words = name
|
|
285
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
286
|
+
.toLowerCase()
|
|
287
|
+
.split(/[^a-z0-9]+/);
|
|
288
|
+
for (const word of words) {
|
|
289
|
+
if (WRITE_VERBS.has(word))
|
|
290
|
+
return true;
|
|
291
|
+
if (READ_VERBS.has(word))
|
|
292
|
+
return false;
|
|
293
|
+
}
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
/** The targets a tool's arguments name, as trimmed strings. */
|
|
297
|
+
function targetsOf(args) {
|
|
298
|
+
const targets = [];
|
|
299
|
+
for (const key of TARGET_ARGS) {
|
|
300
|
+
const value = args?.[key];
|
|
301
|
+
for (const item of Array.isArray(value) ? value : [value]) {
|
|
302
|
+
if (typeof item === 'number')
|
|
303
|
+
targets.push(String(item));
|
|
304
|
+
else if (typeof item === 'string' && item.trim())
|
|
305
|
+
targets.push(item.trim());
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return targets;
|
|
309
|
+
}
|
|
310
|
+
/** Whether a tool's arguments aim at a channel other than the turn's own. */
|
|
311
|
+
function aimsElsewhere(args, conversation) {
|
|
312
|
+
const platform = args?.['platform'];
|
|
313
|
+
const namesPlatform = typeof platform === 'string' && platform.trim() !== '';
|
|
314
|
+
const targets = targetsOf(args);
|
|
315
|
+
if (!conversation)
|
|
316
|
+
return namesPlatform || targets.length > 0;
|
|
317
|
+
if (namesPlatform && platform.trim().toLowerCase() !== conversation.platform.toLowerCase())
|
|
318
|
+
return true;
|
|
319
|
+
return targets.some((target) => target !== conversation.conversationId);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Whether a tool call is an outward action that asks first.
|
|
323
|
+
*
|
|
324
|
+
* It is when the tool's name has a write verb and the tool either sits in an
|
|
325
|
+
* outward category or does not declare itself free of side effects; and when a
|
|
326
|
+
* tool that declares side effects aims at a channel other than the
|
|
327
|
+
* conversation's own. A send to the conversation's own channel through a
|
|
328
|
+
* channel tool still asks, by its category and verb: the plain reply of a turn
|
|
329
|
+
* reaches the channel without a tool.
|
|
330
|
+
*
|
|
331
|
+
* @param tool - The tool's name, category and side-effect flag.
|
|
332
|
+
* @param args - The call's arguments.
|
|
333
|
+
* @param conversation - The conversation the turn answers, if it answers one.
|
|
334
|
+
* @returns Whether the call asks.
|
|
335
|
+
*/
|
|
336
|
+
export function isOutwardAction(tool, args, conversation) {
|
|
337
|
+
if (hasWriteVerb(tool?.name)) {
|
|
338
|
+
const category = typeof tool?.category === 'string' ? tool.category.trim().toLowerCase() : '';
|
|
339
|
+
if (OUTWARD_CATEGORIES.has(category) || tool?.hasSideEffects !== false)
|
|
340
|
+
return true;
|
|
341
|
+
}
|
|
342
|
+
return tool?.hasSideEffects === true && aimsElsewhere(args, conversation);
|
|
343
|
+
}
|
|
344
|
+
/** A copy of `value` with the fields named like a secret masked. */
|
|
345
|
+
function maskSecrets(value, depth) {
|
|
346
|
+
if (value === null || typeof value !== 'object')
|
|
347
|
+
return value;
|
|
348
|
+
if (depth <= 0)
|
|
349
|
+
return '[truncated]';
|
|
350
|
+
if (Array.isArray(value))
|
|
351
|
+
return value.map((item) => maskSecrets(item, depth - 1));
|
|
352
|
+
const masked = {};
|
|
353
|
+
for (const [key, item] of Object.entries(value)) {
|
|
354
|
+
masked[key] = SECRET_ARG.test(key) ? MASKED : maskSecrets(item, depth - 1);
|
|
355
|
+
}
|
|
356
|
+
return masked;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* What a person reads before answering: the tool and its target in one line, and
|
|
360
|
+
* its arguments, with any field named like a secret masked.
|
|
361
|
+
*
|
|
362
|
+
* @param tool - The tool.
|
|
363
|
+
* @param args - The call's arguments.
|
|
364
|
+
* @returns The action a request carries.
|
|
365
|
+
*/
|
|
366
|
+
export function describeAction(tool, args) {
|
|
367
|
+
const name = String(tool?.name ?? 'unknown');
|
|
368
|
+
const [target] = targetsOf(args);
|
|
369
|
+
const summary = target ? `${name} to ${target}` : name;
|
|
370
|
+
return {
|
|
371
|
+
summary: summary.slice(0, SUMMARY_MAX_LENGTH),
|
|
372
|
+
text: safeJsonStringify(maskSecrets(args, MASK_MAX_DEPTH), REMOTE_APPROVAL_TEXT_LIMIT),
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* The line a turn ends with when a tool's approval came back anything but yes.
|
|
377
|
+
*
|
|
378
|
+
* @param word - Why the tool did not run.
|
|
379
|
+
* @param toolName - The tool.
|
|
380
|
+
* @returns The line, which holds the word.
|
|
381
|
+
*/
|
|
382
|
+
export function remoteApprovalLine(word, toolName) {
|
|
383
|
+
switch (word) {
|
|
384
|
+
case 'declined':
|
|
385
|
+
return `The request to run ${toolName} was declined, so it did not run.`;
|
|
386
|
+
case 'expired':
|
|
387
|
+
return `The request to run ${toolName} expired with no answer, so it did not run. Ask again to try it again.`;
|
|
388
|
+
case 'withdrawn':
|
|
389
|
+
return `The request to run ${toolName} was withdrawn, so it did not run.`;
|
|
390
|
+
default:
|
|
391
|
+
return `Approvals are not available (${APPROVAL_UNAVAILABLE}), so ${toolName} did not run.`;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Asks the handler about one tool call and waits for the answer.
|
|
396
|
+
*
|
|
397
|
+
* @param handler - The handler.
|
|
398
|
+
* @param tool - The tool.
|
|
399
|
+
* @param args - The call's arguments.
|
|
400
|
+
* @param turn - The turn asking.
|
|
401
|
+
* @returns The decision. A handler that throws counts as {@link APPROVAL_UNAVAILABLE}.
|
|
402
|
+
*/
|
|
403
|
+
export async function askRemoteApproval(handler, tool, args, turn = {}) {
|
|
404
|
+
try {
|
|
405
|
+
return await handler({
|
|
406
|
+
toolName: String(tool?.name ?? 'unknown'),
|
|
407
|
+
action: describeAction(tool, args),
|
|
408
|
+
operationId: turn.reportedTurn?.operationId ?? randomUUID(),
|
|
409
|
+
}, { onWaiting: () => turn.reportedTurn?.approvalRequested() });
|
|
410
|
+
}
|
|
411
|
+
catch {
|
|
412
|
+
return abort(APPROVAL_UNAVAILABLE);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* The `outwardApproval` hook of `runToolCallingTurn` for one turn: outward calls
|
|
417
|
+
* ask the handler, every other call passes through it unasked.
|
|
418
|
+
*
|
|
419
|
+
* @param handler - The agent's handler, if it has one.
|
|
420
|
+
* @param turn - The turn.
|
|
421
|
+
* @returns The hook, or `undefined` when the agent has no handler.
|
|
422
|
+
*/
|
|
423
|
+
export function outwardApprovalFor(handler, turn) {
|
|
424
|
+
if (!handler)
|
|
425
|
+
return undefined;
|
|
426
|
+
return async (tool, args) => {
|
|
427
|
+
if (!isOutwardAction(tool, args, turn.conversation))
|
|
428
|
+
return undefined;
|
|
429
|
+
const decision = await askRemoteApproval(handler, tool, args, turn);
|
|
430
|
+
if (decision.approved)
|
|
431
|
+
return { approved: true };
|
|
432
|
+
return {
|
|
433
|
+
approved: false,
|
|
434
|
+
reason: decision.reason,
|
|
435
|
+
line: remoteApprovalLine(decision.reason, String(tool?.name ?? 'unknown')),
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
//# sourceMappingURL=remote-approvals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rem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ot":"","sources":["../../../../../src/cli/commands/start/routes/chat.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/start/routes/chat.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAkCjE,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAkBpE;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,kBAAkB,CAAC,CA0e7B"}
|