@gaunt-sloth/agent 2.0.0-beta.0 → 2.0.0-beta.2
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/LICENSE +6 -6
- package/dist/modules/a2a/A2AClientWrapper.js +1 -1
- package/dist/modules/a2a/A2AClientWrapper.js.map +1 -1
- package/dist/modules/acp/acpAgentApp.js +45 -2
- package/dist/modules/acp/acpAgentApp.js.map +1 -1
- package/dist/modules/acp/acpAgentAppV1.js +38 -2
- package/dist/modules/acp/acpAgentAppV1.js.map +1 -1
- package/dist/modules/acp/acpPermissions.d.ts +50 -5
- package/dist/modules/acp/acpPermissions.js +74 -8
- package/dist/modules/acp/acpPermissions.js.map +1 -1
- package/dist/modules/acp/acpPermissionsV1.d.ts +9 -0
- package/dist/modules/acp/acpPermissionsV1.js +9 -0
- package/dist/modules/acp/acpPermissionsV1.js.map +1 -1
- package/dist/modules/interactiveSessionModule.js +159 -147
- package/dist/modules/interactiveSessionModule.js.map +1 -1
- package/dist/modules/slashCommands.d.ts +72 -8
- package/dist/modules/slashCommands.js +179 -9
- package/dist/modules/slashCommands.js.map +1 -1
- package/dist/tools/gthGrepTool.js +51 -9
- package/dist/tools/gthGrepTool.js.map +1 -1
- package/package.json +10 -10
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Copyright 2025-present Andrew Kondratev
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
1
|
+
Copyright 2025-present Andrew Kondratev
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
7
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -26,7 +26,7 @@ export class A2AClientWrapper {
|
|
|
26
26
|
// `@a2a-js/sdk` 1.0 removed the `A2AClient` class outright; a client is now built by a
|
|
27
27
|
// `ClientFactory` from the agent card. `legacyCompat` is enabled on the card resolver AND on
|
|
28
28
|
// every transport factory so we keep talking to agents still on protocol v0.3 — which is what
|
|
29
|
-
// Google ADK agents (our only real A2A peer today, see adk
|
|
29
|
+
// Google ADK agents (our only real A2A peer today, see evals/adk/) currently speak. With it
|
|
30
30
|
// on, the resolver detects a v0.3-shaped card, translates it to the v1.0 model and stamps each
|
|
31
31
|
// synthesized interface `protocolVersion: '0.3'`, and the matching factory then instantiates
|
|
32
32
|
// the v0.3 wire transport. A v1.0 agent is served by the native transports unchanged, so this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A2AClientWrapper.js","sourceRoot":"","sources":["../../../src/modules/a2a/A2AClientWrapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,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SAAS;SACpC,CAAC;IACJ,CAAC;IAED;6FACyF;IACjF,MAAM,CAAC,MAAM,CAAC,MAAsB;QAC1C,OAAO,OAAQ,MAAkB,EAAE,SAAS,KAAK,QAAQ,CAAC;IAC5D,CAAC;IAED;yEACqE;IAC7D,MAAM,CAAC,WAAW,CAAC,KAAyB;QAClD,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAC5C,OAAO,KAAK;aACT,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,KAAK,MAAM,CAAC;aACjD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,KAAe,CAAC;aAC5C,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -55,7 +55,7 @@ import { displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
|
55
55
|
import { createResolvers } from '#src/resolvers.js';
|
|
56
56
|
import { resolveAgentFactory } from '#src/core/resolveAgentFactory.js';
|
|
57
57
|
import { AcpUpdateMapper } from '#src/modules/acp/acpUpdates.js';
|
|
58
|
-
import { decisionForOutcome, permissionRequestFor } from '#src/modules/acp/acpPermissions.js';
|
|
58
|
+
import { decisionForOutcome, permissionRequestFor, rememberedAnswerNote, } from '#src/modules/acp/acpPermissions.js';
|
|
59
59
|
import { ACP_AGENT_NAME, ACP_AGENT_TITLE, CLOSE_TURN_DRAIN_MS, acpStatusCallback, agentVersion, announceAcpStart, drainWithDeadline, isSameWorkspace, loadConfigForCwd, promptText, resolveAcpSessionCommand, } from '#src/modules/acp/acpCommon.js';
|
|
60
60
|
export { ACP_AGENT_NAME, ACP_AGENT_TITLE, announceAcpStart, isSameWorkspace };
|
|
61
61
|
/**
|
|
@@ -133,6 +133,13 @@ export function createAcpAgentApp(options = {}) {
|
|
|
133
133
|
session.replayLog.push(userMessage);
|
|
134
134
|
await sendUpdate(session, userMessage);
|
|
135
135
|
await sendState(session, { state: 'running' });
|
|
136
|
+
// [[EXT-154]] — the calls answered with one of the two REMEMBERING options, waiting to hear
|
|
137
|
+
// what that answer landed as. Per turn, like the callbacks either side of it, and keyed by the
|
|
138
|
+
// interrupt object because that is the correlation {@link ApprovalOutcome} defines: this
|
|
139
|
+
// surface can have several gated calls open at once (the runner drains a batch), so pairing an
|
|
140
|
+
// outcome with "the oldest unanswered request" would confirm one command's persistence in a
|
|
141
|
+
// sentence about another's.
|
|
142
|
+
const rememberAsked = new Set();
|
|
136
143
|
// The gate's last hop. Registered per turn so it closes over THIS turn's mapper, which is
|
|
137
144
|
// what knows the id of the tool call a permission request is about.
|
|
138
145
|
session.runner.setToolApprovalCallback(async (pending) => {
|
|
@@ -150,7 +157,14 @@ export function createAcpAgentApp(options = {}) {
|
|
|
150
157
|
// still settles on the peer's eventual answer — which is why `session/close` bounds its
|
|
151
158
|
// wait rather than trusting this to end it.
|
|
152
159
|
{ cancellationSignal: abort.signal });
|
|
153
|
-
|
|
160
|
+
const decision = decisionForOutcome(response.outcome);
|
|
161
|
+
// [[EXT-154]] — noted from the DECISION rather than from the option id, so the set holds
|
|
162
|
+
// exactly the answers that asked the runner to store something. A cancelled request and an
|
|
163
|
+
// option this build does not recognise both fail closed into a plain rejection above and
|
|
164
|
+
// are therefore not noted, which is the direction that cannot invent a promise.
|
|
165
|
+
if (decision.scope === 'always')
|
|
166
|
+
rememberAsked.add(pending);
|
|
167
|
+
return decision;
|
|
154
168
|
}
|
|
155
169
|
finally {
|
|
156
170
|
// Never allowed to become the callback's result. A notification that fails — the usual
|
|
@@ -159,6 +173,32 @@ export function createAcpAgentApp(options = {}) {
|
|
|
159
173
|
await sendState(session, { state: 'running' }).catch(() => undefined);
|
|
160
174
|
}
|
|
161
175
|
});
|
|
176
|
+
// [[EXT-154]] — **and the answer comes back.** The runner records a remembering answer only
|
|
177
|
+
// after the callback that gave it has returned, so the option labels — *Allow and remember*,
|
|
178
|
+
// *Reject and remember* — are an offer that nothing had ever checked was kept. This says what
|
|
179
|
+
// it was.
|
|
180
|
+
//
|
|
181
|
+
// It goes as an `agent_message` of its own, which is this dialect's way for the agent to put a
|
|
182
|
+
// line in the conversation about the session rather than about the model's answer (the same
|
|
183
|
+
// channel a failed turn reports through). NOT as `tool_call_update` content: that field is
|
|
184
|
+
// REPLACED by each later update, so the tool's own output would erase the note — or the note
|
|
185
|
+
// the output.
|
|
186
|
+
//
|
|
187
|
+
// Not awaited, because nothing about the run may wait on a notification: the runner is inside
|
|
188
|
+
// its own continuation here and this callback returns `void`. A send that fails is dropped for
|
|
189
|
+
// the same reason the state updates around it are — the connection going away must not turn a
|
|
190
|
+
// decision a human actually made into a failed gate.
|
|
191
|
+
session.runner.setApprovalOutcomeCallback((outcome) => {
|
|
192
|
+
if (!rememberAsked.delete(outcome.pending))
|
|
193
|
+
return;
|
|
194
|
+
void sendUpdate(session, {
|
|
195
|
+
sessionUpdate: 'agent_message',
|
|
196
|
+
messageId: randomUUID(),
|
|
197
|
+
content: [
|
|
198
|
+
{ type: 'text', text: rememberedAnswerNote(outcome.decision, outcome.lifetime) },
|
|
199
|
+
],
|
|
200
|
+
}).catch(() => undefined);
|
|
201
|
+
});
|
|
162
202
|
for await (const event of session.runner.processMessagesWithEvents([new HumanMessage(text)], abort.signal)) {
|
|
163
203
|
for (const update of mapper.map(event)) {
|
|
164
204
|
if (update.sessionUpdate === 'agent_message_chunk') {
|
|
@@ -200,6 +240,9 @@ export function createAcpAgentApp(options = {}) {
|
|
|
200
240
|
}
|
|
201
241
|
finally {
|
|
202
242
|
session.runner.setToolApprovalCallback(null);
|
|
243
|
+
// [[EXT-154]] — cleared with its partner. Both close over this turn's state, and a stale one
|
|
244
|
+
// left wired would report a later turn's answer into a set that can no longer contain it.
|
|
245
|
+
session.runner.setApprovalOutcomeCallback(null);
|
|
203
246
|
session.abort = null;
|
|
204
247
|
// `turn` is deliberately NOT cleared here: this runs inside the promise it holds, so clearing
|
|
205
248
|
// it would let a `session/close` that reads the field in that instant skip the wait entirely.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acpAgentApp.js","sourceRoot":"","sources":["../../../src/modules/acp/acpAgentApp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,GAAG,MAAM,0CAA0C,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC;AAiC9E;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAO,GAAuB,EAAE;IAChE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,gBAAgB,CAAC;IAC1D,MAAM,eAAe,GAAG,OA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,CAAC,YAAY,CAAC,cAAc,CACnC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,EAC/B,8EAA8E,CAC/E,CAAC;QACJ,CAAC;QACD,yFAAyF;QACzF,6FAA6F;QAC7F,0FAA0F;QAC1F,2FAA2F;QAC3F,mCAAmC;QACnC,YAAY,CAAC,GAAG,EAAE;YAChB,2FAA2F;YAC3F,sFAAsF;YACtF,kBAAkB;YAClB,IAAI,OAAO,CAAC,MAAM;gBAAE,OAAO;YAC3B,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;SACD,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QAC/D,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,4FAA4F;QAC5F,0FAA0F;QAC1F,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;QACzB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -53,7 +53,7 @@ import { displayWarning } from '@gaunt-sloth/core/utils/consoleUtils.js';
|
|
|
53
53
|
import { createResolvers } from '#src/resolvers.js';
|
|
54
54
|
import { resolveAgentFactory } from '#src/core/resolveAgentFactory.js';
|
|
55
55
|
import { AcpV1UpdateMapper } from '#src/modules/acp/acpUpdatesV1.js';
|
|
56
|
-
import { decisionForOutcome } from '#src/modules/acp/acpPermissions.js';
|
|
56
|
+
import { decisionForOutcome, rememberedAnswerNote } from '#src/modules/acp/acpPermissions.js';
|
|
57
57
|
import { permissionRequestForV1 } from '#src/modules/acp/acpPermissionsV1.js';
|
|
58
58
|
import { ACP_AGENT_NAME, ACP_AGENT_TITLE, CLOSE_TURN_DRAIN_MS, acpStatusCallback, agentVersion, drainWithDeadline, isSameWorkspace, loadConfigForCwd, promptText, resolveAcpSessionCommand, } from '#src/modules/acp/acpCommon.js';
|
|
59
59
|
/**
|
|
@@ -127,6 +127,11 @@ export function createAcpV1AgentApp(options = {}) {
|
|
|
127
127
|
// No `user_message` echo. v1 replays a conversation only on `session/load`; during a turn the
|
|
128
128
|
// client already has the message it just sent, and echoing it would draw it twice.
|
|
129
129
|
//
|
|
130
|
+
// [[EXT-154]] — the calls answered with one of the two REMEMBERING options, waiting to hear
|
|
131
|
+
// what that answer landed as. Per turn, and keyed by the interrupt object rather than by
|
|
132
|
+
// arrival, for the reason {@link ApprovalOutcome} gives: the runner drains gated calls as a
|
|
133
|
+
// batch, so several can be open at once and a positional pairing would describe the wrong one.
|
|
134
|
+
const rememberAsked = new Set();
|
|
130
135
|
// The gate's last hop. Registered per turn so it closes over THIS turn's mapper, which is
|
|
131
136
|
// what knows the id of the tool call a permission request is about.
|
|
132
137
|
session.runner.setToolApprovalCallback(async (pending) => {
|
|
@@ -154,7 +159,35 @@ export function createAcpV1AgentApp(options = {}) {
|
|
|
154
159
|
asked.then((response) => response.outcome),
|
|
155
160
|
cancelledWhenAborted(abort.signal),
|
|
156
161
|
]);
|
|
157
|
-
|
|
162
|
+
const decision = decisionForOutcome(outcome);
|
|
163
|
+
// [[EXT-154]] — noted from the DECISION, so the set holds exactly the answers that asked the
|
|
164
|
+
// runner to store something. The cancellation this race synthesises, and an option id this
|
|
165
|
+
// build does not know, both fail closed into a plain rejection and are therefore not noted —
|
|
166
|
+
// the direction that cannot invent a promise.
|
|
167
|
+
if (decision.scope === 'always')
|
|
168
|
+
rememberAsked.add(pending);
|
|
169
|
+
return decision;
|
|
170
|
+
});
|
|
171
|
+
// [[EXT-154]] — **and the answer comes back.** The runner records a remembering answer only
|
|
172
|
+
// after the callback that gave it has returned, so *Allow and remember* / *Reject and remember*
|
|
173
|
+
// were an offer nothing had ever checked was kept. This says what it was.
|
|
174
|
+
//
|
|
175
|
+
// v1 has no whole-message update, so the note is a chunk carrying **its own `messageId`** — a
|
|
176
|
+
// change of id is what starts a new message in this dialect, and reusing the assistant's would
|
|
177
|
+
// splice the line into whatever the model was saying. NOT a `tool_call_update`: on v1 that
|
|
178
|
+
// update's `content` REPLACES rather than appends, so the tool's own output would erase the
|
|
179
|
+
// note, or the note the output.
|
|
180
|
+
//
|
|
181
|
+
// Not awaited: this callback returns `void` and runs inside the runner's own continuation.
|
|
182
|
+
// A send that fails is dropped, exactly as the turn's other notifications are.
|
|
183
|
+
session.runner.setApprovalOutcomeCallback((outcome) => {
|
|
184
|
+
if (!rememberAsked.delete(outcome.pending))
|
|
185
|
+
return;
|
|
186
|
+
void sendUpdate(session, {
|
|
187
|
+
sessionUpdate: 'agent_message_chunk',
|
|
188
|
+
messageId: randomUUID(),
|
|
189
|
+
content: { type: 'text', text: rememberedAnswerNote(outcome.decision, outcome.lifetime) },
|
|
190
|
+
}).catch(() => undefined);
|
|
158
191
|
});
|
|
159
192
|
for await (const event of session.runner.processMessagesWithEvents([new HumanMessage(text)], abort.signal)) {
|
|
160
193
|
for (const update of mapper.map(event))
|
|
@@ -176,6 +209,9 @@ export function createAcpV1AgentApp(options = {}) {
|
|
|
176
209
|
}
|
|
177
210
|
finally {
|
|
178
211
|
session.runner.setToolApprovalCallback(null);
|
|
212
|
+
// [[EXT-154]] — cleared with its partner. Both close over this turn's state, and a stale one
|
|
213
|
+
// left wired would report a later turn's answer into a set that can no longer contain it.
|
|
214
|
+
session.runner.setApprovalOutcomeCallback(null);
|
|
179
215
|
session.abort = null;
|
|
180
216
|
}
|
|
181
217
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acpAgentAppV1.js","sourceRoot":"","sources":["../../../src/modules/acp/acpAgentAppV1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,CAAC;IAC5C,CAAC,CAAC;SACD,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QAC/D,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,4FAA4F;QAC5F,0FAA0F;QAC1F,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;QACzB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -22,10 +22,25 @@
|
|
|
22
22
|
* this surface is that they stay in their own fields rather than being interpolated into the
|
|
23
23
|
* prompt's own prose — so a client can style them as untrusted, and nothing the model writes can
|
|
24
24
|
* impersonate the request's title.
|
|
25
|
+
*
|
|
26
|
+
* ## [[EXT-137]] — what this surface does instead of a fixed block, stated rather than rediscovered
|
|
27
|
+
*
|
|
28
|
+
* The terminal surfaces split the prompt in two: a pinned block carrying only text we wrote, and
|
|
29
|
+
* the scrollable conversation carrying everything else. **That split is an Ink concept and does not
|
|
30
|
+
* transfer here, because this surface owns no layout at all** — the editor decides what is pinned,
|
|
31
|
+
* what truncates and in which direction.
|
|
32
|
+
*
|
|
33
|
+
* What IS ours is the shape of the request, and this dialect already has the property the terminal
|
|
34
|
+
* split had to be built to get: the command travels in `subject`, the gate's explanation in
|
|
35
|
+
* `description`, and the `title` is our own line. So an attacker padding a URL's path lengthens a
|
|
36
|
+
* structured field the client renders as data, and changes nothing about the request's own prose.
|
|
37
|
+
* The residue is named honestly at {@link permissionRequestFor} — the non-shell title interpolates
|
|
38
|
+
* the registered tool name, which for an MCP tool is partly a third-party server's — and that line
|
|
39
|
+
* is [[TUI-C89]]'s to settle, not something to close from here.
|
|
25
40
|
*/
|
|
26
41
|
import type { PermissionOption } from '@agentclientprotocol/sdk';
|
|
27
42
|
import type { RequestPermissionOutcome, RequestPermissionRequest, SessionId } from '@agentclientprotocol/sdk/experimental/v2';
|
|
28
|
-
import type { PendingToolInterrupt, ToolApprovalDecision } from '@gaunt-sloth/core/core/types.js';
|
|
43
|
+
import type { ApprovalLifetime, PendingToolInterrupt, ToolApprovalDecision } from '@gaunt-sloth/core/core/types.js';
|
|
29
44
|
/**
|
|
30
45
|
* The four answers offered on every permission request, one per ACP `PermissionOptionKind`.
|
|
31
46
|
*
|
|
@@ -48,6 +63,34 @@ export declare function permissionRequestFor(options: {
|
|
|
48
63
|
/** The session's working directory — the `cwd` a `command` subject is required to carry. */
|
|
49
64
|
cwd: string;
|
|
50
65
|
}): RequestPermissionRequest;
|
|
66
|
+
/**
|
|
67
|
+
* [[EXT-154]] — **what one of the two remembering answers actually did**, in a sentence for the
|
|
68
|
+
* editor's conversation, sent once the runner has said what the answer landed as.
|
|
69
|
+
*
|
|
70
|
+
* `maintenance/ux-guidelines.md` (DL-4): a confirmation states what LANDED, and waits for it if it
|
|
71
|
+
* has to. *Allow and remember* and *Reject and remember* both promise a project file, and the write
|
|
72
|
+
* is attempted after the {@link ToolApprovalCallback} has returned — so the labels are an offer and
|
|
73
|
+
* this is the only place either promise can be checked. The other two options record nothing, so
|
|
74
|
+
* they earn no sentence and are not sent one.
|
|
75
|
+
*
|
|
76
|
+
* ## The copy is this surface's, not the terminal's
|
|
77
|
+
*
|
|
78
|
+
* Re-earned rather than pasted across, as the guidelines require of every claim ACP renders. The
|
|
79
|
+
* client is an editor: there is no menu key to name, no `/approvals undeny` to point at (an editor
|
|
80
|
+
* has no slash commands — the gap [[EXT-142]] owns), and *allow-list* / *deny-list* are the
|
|
81
|
+
* terminal's vocabulary for something an editor user only ever meets as project settings. What
|
|
82
|
+
* carries over is the answer's own word — *remembered* — because that is what the option said.
|
|
83
|
+
*
|
|
84
|
+
* ## Three cases, where the terminal surfaces have two
|
|
85
|
+
*
|
|
86
|
+
* **This menu is fixed** — all four options on every request, so a user can learn it — which means
|
|
87
|
+
* *Allow and remember* is offered where the gate has nothing to store: a `catastrophic` verdict, a
|
|
88
|
+
* command that does not statically resolve, a call nothing can attribute. There the answer records
|
|
89
|
+
* NOTHING, not even for the session, and `landed` is `once`. The terminal menus hide the control in
|
|
90
|
+
* exactly those cases and so cannot reach it; telling that user *this session only* would be a
|
|
91
|
+
* second false claim in place of the one this removes.
|
|
92
|
+
*/
|
|
93
|
+
export declare function rememberedAnswerNote(decision: 'approve' | 'reject', landed: ApprovalLifetime): string;
|
|
51
94
|
/**
|
|
52
95
|
* The gate decision an ACP permission outcome means.
|
|
53
96
|
*
|
|
@@ -57,9 +100,11 @@ export declare function permissionRequestFor(options: {
|
|
|
57
100
|
* and a future ACP outcome must fail toward refusing rather than toward executing.
|
|
58
101
|
*
|
|
59
102
|
* `allow-always` maps to the `always` scope, which persists to the project allow-list — the same
|
|
60
|
-
* thing the terminal menu's *always approve* does. `reject-always`
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
103
|
+
* thing the terminal menu's *always approve* does. [[EXT-107]] — `reject-always` is now its mirror
|
|
104
|
+
* and maps to `always` too, persisting to the project deny-list. One menu item cannot mean two
|
|
105
|
+
* lifetimes across three surfaces: the same answer given in the TUI, at the readline prompt and in
|
|
106
|
+
* an editor over ACP has to be the same refusal, or a user who learns the control on one surface
|
|
107
|
+
* has learned something untrue about the others. Both labels say "remember" so the user is told
|
|
108
|
+
* which pair of choices is written down.
|
|
64
109
|
*/
|
|
65
110
|
export declare function decisionForOutcome(outcome: RequestPermissionOutcome): ToolApprovalDecision;
|
|
@@ -22,6 +22,21 @@
|
|
|
22
22
|
* this surface is that they stay in their own fields rather than being interpolated into the
|
|
23
23
|
* prompt's own prose — so a client can style them as untrusted, and nothing the model writes can
|
|
24
24
|
* impersonate the request's title.
|
|
25
|
+
*
|
|
26
|
+
* ## [[EXT-137]] — what this surface does instead of a fixed block, stated rather than rediscovered
|
|
27
|
+
*
|
|
28
|
+
* The terminal surfaces split the prompt in two: a pinned block carrying only text we wrote, and
|
|
29
|
+
* the scrollable conversation carrying everything else. **That split is an Ink concept and does not
|
|
30
|
+
* transfer here, because this surface owns no layout at all** — the editor decides what is pinned,
|
|
31
|
+
* what truncates and in which direction.
|
|
32
|
+
*
|
|
33
|
+
* What IS ours is the shape of the request, and this dialect already has the property the terminal
|
|
34
|
+
* split had to be built to get: the command travels in `subject`, the gate's explanation in
|
|
35
|
+
* `description`, and the `title` is our own line. So an attacker padding a URL's path lengthens a
|
|
36
|
+
* structured field the client renders as data, and changes nothing about the request's own prose.
|
|
37
|
+
* The residue is named honestly at {@link permissionRequestFor} — the non-shell title interpolates
|
|
38
|
+
* the registered tool name, which for an MCP tool is partly a third-party server's — and that line
|
|
39
|
+
* is [[TUI-C89]]'s to settle, not something to close from here.
|
|
25
40
|
*/
|
|
26
41
|
import { toolKindFor } from '#src/modules/acp/acpToolCalls.js';
|
|
27
42
|
/** The gated tool whose argument is a shell command, and so has an ACP `command` subject. */
|
|
@@ -42,7 +57,7 @@ export const ACP_PERMISSION_OPTIONS = [
|
|
|
42
57
|
{ optionId: 'allow-once', name: 'Allow once', kind: 'allow_once' },
|
|
43
58
|
{ optionId: 'allow-always', name: 'Allow and remember', kind: 'allow_always' },
|
|
44
59
|
{ optionId: 'reject-once', name: 'Reject once', kind: 'reject_once' },
|
|
45
|
-
{ optionId: 'reject-always', name: 'Reject
|
|
60
|
+
{ optionId: 'reject-always', name: 'Reject and remember', kind: 'reject_always' },
|
|
46
61
|
];
|
|
47
62
|
/** The shell command a pending call would run, when it is one and it is a plain string. */
|
|
48
63
|
function shellCommandOf(pending) {
|
|
@@ -116,14 +131,63 @@ export function permissionRequestFor(options) {
|
|
|
116
131
|
const description = descriptionFor(pending);
|
|
117
132
|
return {
|
|
118
133
|
sessionId,
|
|
119
|
-
// The title is the AGENT's own words and carries no
|
|
120
|
-
// the subject, where a client can style it as the model's.
|
|
134
|
+
// The title is the AGENT's own words and carries **no command-derived text**: what the model
|
|
135
|
+
// wrote is in the subject, where a client can style it as the model's. That is the property
|
|
136
|
+
// [[EXT-137]] pins — on the shell arm this is a constant, so padding a URL's path to any length
|
|
137
|
+
// cannot change a byte of the line a person reads before answering.
|
|
138
|
+
//
|
|
139
|
+
// **The `tool` arm interpolates the registered name, and for an MCP tool that name is partly a
|
|
140
|
+
// third-party server's**, so "no untrusted text at all" would overstate it. It is left as it is
|
|
141
|
+
// deliberately: the name is what makes the prompt about a call the client is already drawing,
|
|
142
|
+
// this surface's title is not a fixed-height row that truncation can empty, and the ACP
|
|
143
|
+
// permission title is [[TUI-C89]]'s to settle rather than something to change from here.
|
|
121
144
|
title: command !== undefined ? 'Run a shell command' : `Run the ${pending.name} tool`,
|
|
122
145
|
...(description === undefined ? {} : { description }),
|
|
123
146
|
subject: subjectFor(pending, toolCallId, cwd),
|
|
124
147
|
options: [...ACP_PERMISSION_OPTIONS],
|
|
125
148
|
};
|
|
126
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* [[EXT-154]] — **what one of the two remembering answers actually did**, in a sentence for the
|
|
152
|
+
* editor's conversation, sent once the runner has said what the answer landed as.
|
|
153
|
+
*
|
|
154
|
+
* `maintenance/ux-guidelines.md` (DL-4): a confirmation states what LANDED, and waits for it if it
|
|
155
|
+
* has to. *Allow and remember* and *Reject and remember* both promise a project file, and the write
|
|
156
|
+
* is attempted after the {@link ToolApprovalCallback} has returned — so the labels are an offer and
|
|
157
|
+
* this is the only place either promise can be checked. The other two options record nothing, so
|
|
158
|
+
* they earn no sentence and are not sent one.
|
|
159
|
+
*
|
|
160
|
+
* ## The copy is this surface's, not the terminal's
|
|
161
|
+
*
|
|
162
|
+
* Re-earned rather than pasted across, as the guidelines require of every claim ACP renders. The
|
|
163
|
+
* client is an editor: there is no menu key to name, no `/approvals undeny` to point at (an editor
|
|
164
|
+
* has no slash commands — the gap [[EXT-142]] owns), and *allow-list* / *deny-list* are the
|
|
165
|
+
* terminal's vocabulary for something an editor user only ever meets as project settings. What
|
|
166
|
+
* carries over is the answer's own word — *remembered* — because that is what the option said.
|
|
167
|
+
*
|
|
168
|
+
* ## Three cases, where the terminal surfaces have two
|
|
169
|
+
*
|
|
170
|
+
* **This menu is fixed** — all four options on every request, so a user can learn it — which means
|
|
171
|
+
* *Allow and remember* is offered where the gate has nothing to store: a `catastrophic` verdict, a
|
|
172
|
+
* command that does not statically resolve, a call nothing can attribute. There the answer records
|
|
173
|
+
* NOTHING, not even for the session, and `landed` is `once`. The terminal menus hide the control in
|
|
174
|
+
* exactly those cases and so cannot reach it; telling that user *this session only* would be a
|
|
175
|
+
* second false claim in place of the one this removes.
|
|
176
|
+
*/
|
|
177
|
+
export function rememberedAnswerNote(decision, landed) {
|
|
178
|
+
if (decision === 'approve') {
|
|
179
|
+
if (landed === 'always')
|
|
180
|
+
return "Allowed and remembered — this exact command is saved to this project's approvals settings and will run without asking in future sessions.";
|
|
181
|
+
if (landed === 'session')
|
|
182
|
+
return "Allowed for this session only — this project's approvals settings could not be written, so the next session will ask about this command again.";
|
|
183
|
+
return 'Allowed for this one call only — nothing was remembered, so the next identical call will ask again.';
|
|
184
|
+
}
|
|
185
|
+
if (landed === 'always')
|
|
186
|
+
return "Rejected and remembered — this exact call is saved to this project's approvals settings and will be refused without asking in future sessions.";
|
|
187
|
+
if (landed === 'session')
|
|
188
|
+
return "Rejected for this session only — this project's approvals settings could not be written, so the next session will ask about this call again.";
|
|
189
|
+
return 'Rejected for this one call only — nothing was remembered, so the next identical call will ask again.';
|
|
190
|
+
}
|
|
127
191
|
/**
|
|
128
192
|
* The gate decision an ACP permission outcome means.
|
|
129
193
|
*
|
|
@@ -133,10 +197,12 @@ export function permissionRequestFor(options) {
|
|
|
133
197
|
* and a future ACP outcome must fail toward refusing rather than toward executing.
|
|
134
198
|
*
|
|
135
199
|
* `allow-always` maps to the `always` scope, which persists to the project allow-list — the same
|
|
136
|
-
* thing the terminal menu's *always approve* does. `reject-always`
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
200
|
+
* thing the terminal menu's *always approve* does. [[EXT-107]] — `reject-always` is now its mirror
|
|
201
|
+
* and maps to `always` too, persisting to the project deny-list. One menu item cannot mean two
|
|
202
|
+
* lifetimes across three surfaces: the same answer given in the TUI, at the readline prompt and in
|
|
203
|
+
* an editor over ACP has to be the same refusal, or a user who learns the control on one surface
|
|
204
|
+
* has learned something untrue about the others. Both labels say "remember" so the user is told
|
|
205
|
+
* which pair of choices is written down.
|
|
140
206
|
*/
|
|
141
207
|
export function decisionForOutcome(outcome) {
|
|
142
208
|
if (outcome.outcome !== 'selected') {
|
|
@@ -149,7 +215,7 @@ export function decisionForOutcome(outcome) {
|
|
|
149
215
|
case 'allow-always':
|
|
150
216
|
return { type: 'approve', scope: 'always' };
|
|
151
217
|
case 'reject-always':
|
|
152
|
-
return { type: 'reject', scope: '
|
|
218
|
+
return { type: 'reject', scope: 'always', message: 'The user rejected this tool call.' };
|
|
153
219
|
case 'reject-once':
|
|
154
220
|
return { type: 'reject', message: 'The user rejected this tool call.' };
|
|
155
221
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acpPermissions.js","sourceRoot":"","sources":["../../../src/modules/acp/acpPermissions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"acpPermissions.js","sourceRoot":"","sources":["../../../src/modules/acp/acpPermissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAeH,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,6FAA6F;AAC7F,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAgC;IACjE,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE;IAClE,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,oBAAoB,EAAE,IA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KAAK,aAAa;YAChB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,mCAAmC,EAAE,CAAC;QAC1E;YACE,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,qDAAqD,MAAM,CAAC,QAAQ,CAAC,IAAI;aACnF,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -33,6 +33,15 @@
|
|
|
33
33
|
* UI, where terminal control codes are inert, and framing them would ship a line-number gutter into
|
|
34
34
|
* a GUI. What matters is that they stay in their own fields rather than being interpolated into the
|
|
35
35
|
* prompt's own prose, so nothing the model writes can impersonate the request itself.
|
|
36
|
+
*
|
|
37
|
+
* ## [[EXT-137]] — the fixed-block split does not transfer here either
|
|
38
|
+
*
|
|
39
|
+
* `acpPermissions.ts` carries the argument: an editor client owns its own layout, so there is no
|
|
40
|
+
* pinned row for a padded path to empty. This dialect's own line is `toolCall.title`, which is the
|
|
41
|
+
* registered tool name and is deliberately the SAME value the creating update sent — a different
|
|
42
|
+
* title here would rename that row mid-flight. The command reaches the client as `rawInput` and as
|
|
43
|
+
* the leading `content` entry, both structured, so its length is the client's layout problem and
|
|
44
|
+
* never a truncation of our prose.
|
|
36
45
|
*/
|
|
37
46
|
import type { RequestPermissionRequest, SessionId } from '@agentclientprotocol/sdk';
|
|
38
47
|
import type { PendingToolInterrupt } from '@gaunt-sloth/core/core/types.js';
|
|
@@ -33,6 +33,15 @@
|
|
|
33
33
|
* UI, where terminal control codes are inert, and framing them would ship a line-number gutter into
|
|
34
34
|
* a GUI. What matters is that they stay in their own fields rather than being interpolated into the
|
|
35
35
|
* prompt's own prose, so nothing the model writes can impersonate the request itself.
|
|
36
|
+
*
|
|
37
|
+
* ## [[EXT-137]] — the fixed-block split does not transfer here either
|
|
38
|
+
*
|
|
39
|
+
* `acpPermissions.ts` carries the argument: an editor client owns its own layout, so there is no
|
|
40
|
+
* pinned row for a padded path to empty. This dialect's own line is `toolCall.title`, which is the
|
|
41
|
+
* registered tool name and is deliberately the SAME value the creating update sent — a different
|
|
42
|
+
* title here would rename that row mid-flight. The command reaches the client as `rawInput` and as
|
|
43
|
+
* the leading `content` entry, both structured, so its length is the client's layout problem and
|
|
44
|
+
* never a truncation of our prose.
|
|
36
45
|
*/
|
|
37
46
|
import { ACP_PERMISSION_OPTIONS } from '#src/modules/acp/acpPermissions.js';
|
|
38
47
|
import { toolKindFor } from '#src/modules/acp/acpToolCalls.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acpPermissionsV1.js","sourceRoot":"","sources":["../../../src/modules/acp/acpPermissionsV1.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"acpPermissionsV1.js","sourceRoot":"","sources":["../../../src/modules/acp/acpPermissionsV1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAQH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAE/D,wDAAwD;AACxD,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAEvC;;;;;;GAMG;AACH,SAAS,cAAc,CAAC,OAA6B;IACnD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CACR,aAAa,OAAO,CAAC,aAAa,CAAC,OAAO,MAAM,OAAO,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,CACzF,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,mDAAmD,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvF,CAAC;IACD,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,oCAAoC,OAAO,CAAC,YAAY,EAAE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