@swmansion/argent 0.35.1-next.100 → 0.35.1-next.102
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-cmds.mjs +276 -229
- package/dist/client.js +45 -20
- package/dist/flow-script-runner.mjs +11 -2
- package/dist/installer.mjs +55 -30
- package/dist/mcp-server.mjs +253 -205
- package/dist/tool-server.cjs +140 -216
- package/package.json +2 -2
package/dist/client.js
CHANGED
|
@@ -9068,6 +9068,7 @@ import * as path14 from "node:path";
|
|
|
9068
9068
|
|
|
9069
9069
|
// ../registry/src/types.ts
|
|
9070
9070
|
var LINKED_CALL_HEADER = "x-argent-linked";
|
|
9071
|
+
var CALLER_DEADLINE_HEADER = "x-argent-deadline-ms";
|
|
9071
9072
|
var E2E_DIR_CLIENT_HEADER = "x-argent-e2e-dir";
|
|
9072
9073
|
var CLIENT_SECRETS_HEADER = "x-argent-client-secrets";
|
|
9073
9074
|
var SESSION_HEADER = "x-argent-session";
|
|
@@ -9350,6 +9351,8 @@ var FAILURE_CODES = {
|
|
|
9350
9351
|
REGISTRY_TOOL_EXECUTION_FAILED: "REGISTRY_TOOL_EXECUTION_FAILED",
|
|
9351
9352
|
REGISTRY_TOOL_FAILURE_UNCLASSIFIED: "REGISTRY_TOOL_FAILURE_UNCLASSIFIED",
|
|
9352
9353
|
REGISTRY_SERVICE_TERMINATING: "REGISTRY_SERVICE_TERMINATING",
|
|
9354
|
+
REGISTRY_TOOL_CALL_CANCELLED: "REGISTRY_TOOL_CALL_CANCELLED",
|
|
9355
|
+
REGISTRY_TOOL_CALL_TIMED_OUT: "REGISTRY_TOOL_CALL_TIMED_OUT",
|
|
9353
9356
|
HTTP_TOOL_NOT_FOUND: "HTTP_TOOL_NOT_FOUND",
|
|
9354
9357
|
HTTP_ZOD_VALIDATION_FAILED: "HTTP_ZOD_VALIDATION_FAILED",
|
|
9355
9358
|
HTTP_CAPABILITY_UNSUPPORTED_OPERATION: "HTTP_CAPABILITY_UNSUPPORTED_OPERATION",
|
|
@@ -9556,7 +9559,6 @@ var FAILURE_CODES = {
|
|
|
9556
9559
|
DEBUGGER_RELOAD_FAILED: "DEBUGGER_RELOAD_FAILED",
|
|
9557
9560
|
// e2e-add-step refused a debugger-* call that answered `not_connected`.
|
|
9558
9561
|
DEBUGGER_NOT_CONNECTED: "DEBUGGER_NOT_CONNECTED",
|
|
9559
|
-
JS_RUNTIME_CONSOLE_SERVER_BIND_FAILED: "JS_RUNTIME_CONSOLE_SERVER_BIND_FAILED",
|
|
9560
9562
|
JS_RUNTIME_PAYLOAD_INVALID: "JS_RUNTIME_PAYLOAD_INVALID",
|
|
9561
9563
|
JS_RUNTIME_PAYLOAD_DEVICE_MISSING: "JS_RUNTIME_PAYLOAD_DEVICE_MISSING",
|
|
9562
9564
|
JS_RUNTIME_PAYLOAD_PORT_INVALID: "JS_RUNTIME_PAYLOAD_PORT_INVALID",
|
|
@@ -9821,6 +9823,18 @@ var FAILURE_SPAWN_CODE_SET = new Set(FAILURE_SPAWN_CODES);
|
|
|
9821
9823
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
9822
9824
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
9823
9825
|
var resolvedDuringInvocation = new AsyncLocalStorage();
|
|
9826
|
+
var CANCELLED_SIGNAL = {
|
|
9827
|
+
error_code: FAILURE_CODES.REGISTRY_TOOL_CALL_CANCELLED,
|
|
9828
|
+
failure_stage: "registry_tool_cancelled",
|
|
9829
|
+
failure_area: "registry",
|
|
9830
|
+
error_kind: "cancelled"
|
|
9831
|
+
};
|
|
9832
|
+
var TIMED_OUT_SIGNAL = {
|
|
9833
|
+
error_code: FAILURE_CODES.REGISTRY_TOOL_CALL_TIMED_OUT,
|
|
9834
|
+
failure_stage: "registry_tool_timed_out",
|
|
9835
|
+
failure_area: "registry",
|
|
9836
|
+
error_kind: "timeout"
|
|
9837
|
+
};
|
|
9824
9838
|
function valueAtPath(root, path16) {
|
|
9825
9839
|
let current = root;
|
|
9826
9840
|
for (const key of path16) {
|
|
@@ -10364,34 +10378,33 @@ function uploadFailure(url, res, text, bytes) {
|
|
|
10364
10378
|
}
|
|
10365
10379
|
async function uploadTar(tarPath, format, endpoint, signal) {
|
|
10366
10380
|
const { size } = await stat3(tarPath);
|
|
10367
|
-
const
|
|
10381
|
+
const body = createReadStream2(tarPath).on("error", () => {
|
|
10382
|
+
});
|
|
10368
10383
|
const init = {
|
|
10369
10384
|
method: "POST",
|
|
10370
10385
|
headers: {
|
|
10371
10386
|
"content-type": ARCHIVE_CONTENT_TYPES[format],
|
|
10372
10387
|
...endpoint.token ? { Authorization: `Bearer ${endpoint.token}` } : {}
|
|
10373
10388
|
},
|
|
10374
|
-
body
|
|
10389
|
+
body,
|
|
10375
10390
|
duplex: "half",
|
|
10376
10391
|
signal
|
|
10377
10392
|
};
|
|
10378
|
-
let res;
|
|
10379
10393
|
try {
|
|
10380
|
-
res = await fetch(`${endpoint.url}/upload`, init);
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
text = await res.text();
|
|
10389
|
-
} catch {
|
|
10394
|
+
const res = await fetch(`${endpoint.url}/upload`, init);
|
|
10395
|
+
if (!res.ok) {
|
|
10396
|
+
let text = "";
|
|
10397
|
+
try {
|
|
10398
|
+
text = await res.text();
|
|
10399
|
+
} catch {
|
|
10400
|
+
}
|
|
10401
|
+
throw uploadFailure(endpoint.url, res, text, size);
|
|
10390
10402
|
}
|
|
10391
|
-
|
|
10403
|
+
const json = await res.json();
|
|
10404
|
+
return json.uploadId;
|
|
10405
|
+
} finally {
|
|
10406
|
+
body.destroy();
|
|
10392
10407
|
}
|
|
10393
|
-
const json = await res.json();
|
|
10394
|
-
return json.uploadId;
|
|
10395
10408
|
}
|
|
10396
10409
|
async function uploadFile(sourcePath, endpoint, signal) {
|
|
10397
10410
|
const format = pickArchiveFormat(endpoint.formats);
|
|
@@ -11054,6 +11067,13 @@ async function e2eShadowWarningFor(tool, args) {
|
|
|
11054
11067
|
return picked.shadowed === void 0 ? void 0 : e2eShadowWarning(picked.path, picked.shadowed);
|
|
11055
11068
|
}
|
|
11056
11069
|
|
|
11070
|
+
// ../argent-tools-client/src/auto-capture.ts
|
|
11071
|
+
import { setTimeout as sleep } from "node:timers/promises";
|
|
11072
|
+
var deadlines = /* @__PURE__ */ new WeakMap();
|
|
11073
|
+
function signalDeadline(signal) {
|
|
11074
|
+
return deadlines.get(signal);
|
|
11075
|
+
}
|
|
11076
|
+
|
|
11057
11077
|
// ../argent-tools-client/src/tools-client.ts
|
|
11058
11078
|
function authHeaders2(token) {
|
|
11059
11079
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -11312,6 +11332,12 @@ function secretsTransportRefusal(url) {
|
|
|
11312
11332
|
return void 0;
|
|
11313
11333
|
}
|
|
11314
11334
|
var FETCH_HEAD_BYTES = 256;
|
|
11335
|
+
var FETCH_IDLE_TIMEOUT_MS = 3e5;
|
|
11336
|
+
function callerDeadlineMs(signal) {
|
|
11337
|
+
const deadline = signal ? signalDeadline(signal) : void 0;
|
|
11338
|
+
if (deadline === void 0) return FETCH_IDLE_TIMEOUT_MS;
|
|
11339
|
+
return Math.max(1, Math.min(FETCH_IDLE_TIMEOUT_MS, Math.ceil(deadline - performance.now())));
|
|
11340
|
+
}
|
|
11315
11341
|
function isRecord2(value) {
|
|
11316
11342
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11317
11343
|
}
|
|
@@ -11495,6 +11521,8 @@ function createToolsClient(options = {}) {
|
|
|
11495
11521
|
// Tells the tool-server this client writes recordings under
|
|
11496
11522
|
// `.argent/e2e/`; an older client writes only `.argent/flows/`.
|
|
11497
11523
|
[E2E_DIR_CLIENT_HEADER]: "1",
|
|
11524
|
+
// So the tool-server reads a hang-up at this time as a timeout, not a cancel.
|
|
11525
|
+
[CALLER_DEADLINE_HEADER]: String(callerDeadlineMs(opts?.signal)),
|
|
11498
11526
|
...encodedSecrets ? { [CLIENT_SECRETS_HEADER]: encodedSecrets } : {},
|
|
11499
11527
|
// A proxy that compresses the stream holds each line until its buffer
|
|
11500
11528
|
// fills. `identity` keeps the stream uncompressed end to end.
|
|
@@ -11889,9 +11917,6 @@ function getDeviceIdFromArgs(args) {
|
|
|
11889
11917
|
return void 0;
|
|
11890
11918
|
}
|
|
11891
11919
|
|
|
11892
|
-
// ../argent-tools-client/src/auto-capture.ts
|
|
11893
|
-
import { setTimeout as sleep } from "node:timers/promises";
|
|
11894
|
-
|
|
11895
11920
|
// src/bundled-paths.ts
|
|
11896
11921
|
import * as fs11 from "node:fs";
|
|
11897
11922
|
import * as path15 from "node:path";
|
|
@@ -708,8 +708,17 @@ function describeValue(value) {
|
|
|
708
708
|
if (type === "string") return "a string";
|
|
709
709
|
if (type === "boolean") return "a boolean";
|
|
710
710
|
if (Array.isArray(value)) return "an array";
|
|
711
|
-
|
|
712
|
-
|
|
711
|
+
// `constructor` is inherited: on `Object.create({})` it is Object, the one
|
|
712
|
+
// class such a value is not.
|
|
713
|
+
const ctor = value.constructor;
|
|
714
|
+
const name =
|
|
715
|
+
typeof ctor === "function" &&
|
|
716
|
+
(ctor !== Object || Object.getPrototypeOf(value) === Object.prototype)
|
|
717
|
+
? ctor.name
|
|
718
|
+
: "";
|
|
719
|
+
if (!name) return "an object with an unusual prototype";
|
|
720
|
+
// `U` takes "a": Uint8Array, URL, User.
|
|
721
|
+
return `${/^[aeio]/i.test(name) ? "an" : "a"} ${name}`;
|
|
713
722
|
}
|
|
714
723
|
|
|
715
724
|
function describeBytes(bytes) {
|
package/dist/installer.mjs
CHANGED
|
@@ -15889,6 +15889,8 @@ var FAILURE_CODES = {
|
|
|
15889
15889
|
REGISTRY_TOOL_EXECUTION_FAILED: "REGISTRY_TOOL_EXECUTION_FAILED",
|
|
15890
15890
|
REGISTRY_TOOL_FAILURE_UNCLASSIFIED: "REGISTRY_TOOL_FAILURE_UNCLASSIFIED",
|
|
15891
15891
|
REGISTRY_SERVICE_TERMINATING: "REGISTRY_SERVICE_TERMINATING",
|
|
15892
|
+
REGISTRY_TOOL_CALL_CANCELLED: "REGISTRY_TOOL_CALL_CANCELLED",
|
|
15893
|
+
REGISTRY_TOOL_CALL_TIMED_OUT: "REGISTRY_TOOL_CALL_TIMED_OUT",
|
|
15892
15894
|
HTTP_TOOL_NOT_FOUND: "HTTP_TOOL_NOT_FOUND",
|
|
15893
15895
|
HTTP_ZOD_VALIDATION_FAILED: "HTTP_ZOD_VALIDATION_FAILED",
|
|
15894
15896
|
HTTP_CAPABILITY_UNSUPPORTED_OPERATION: "HTTP_CAPABILITY_UNSUPPORTED_OPERATION",
|
|
@@ -16095,7 +16097,6 @@ var FAILURE_CODES = {
|
|
|
16095
16097
|
DEBUGGER_RELOAD_FAILED: "DEBUGGER_RELOAD_FAILED",
|
|
16096
16098
|
// e2e-add-step refused a debugger-* call that answered `not_connected`.
|
|
16097
16099
|
DEBUGGER_NOT_CONNECTED: "DEBUGGER_NOT_CONNECTED",
|
|
16098
|
-
JS_RUNTIME_CONSOLE_SERVER_BIND_FAILED: "JS_RUNTIME_CONSOLE_SERVER_BIND_FAILED",
|
|
16099
16100
|
JS_RUNTIME_PAYLOAD_INVALID: "JS_RUNTIME_PAYLOAD_INVALID",
|
|
16100
16101
|
JS_RUNTIME_PAYLOAD_DEVICE_MISSING: "JS_RUNTIME_PAYLOAD_DEVICE_MISSING",
|
|
16101
16102
|
JS_RUNTIME_PAYLOAD_PORT_INVALID: "JS_RUNTIME_PAYLOAD_PORT_INVALID",
|
|
@@ -16349,6 +16350,7 @@ var FAILURE_KINDS = [
|
|
|
16349
16350
|
"network",
|
|
16350
16351
|
"subprocess",
|
|
16351
16352
|
"crash",
|
|
16353
|
+
"cancelled",
|
|
16352
16354
|
"unknown"
|
|
16353
16355
|
];
|
|
16354
16356
|
var FAILURE_COMMANDS = [
|
|
@@ -16410,6 +16412,18 @@ var FAILURE_SPAWN_CODE_SET = new Set(FAILURE_SPAWN_CODES);
|
|
|
16410
16412
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
16411
16413
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
16412
16414
|
var resolvedDuringInvocation = new AsyncLocalStorage();
|
|
16415
|
+
var CANCELLED_SIGNAL = {
|
|
16416
|
+
error_code: FAILURE_CODES.REGISTRY_TOOL_CALL_CANCELLED,
|
|
16417
|
+
failure_stage: "registry_tool_cancelled",
|
|
16418
|
+
failure_area: "registry",
|
|
16419
|
+
error_kind: "cancelled"
|
|
16420
|
+
};
|
|
16421
|
+
var TIMED_OUT_SIGNAL = {
|
|
16422
|
+
error_code: FAILURE_CODES.REGISTRY_TOOL_CALL_TIMED_OUT,
|
|
16423
|
+
failure_stage: "registry_tool_timed_out",
|
|
16424
|
+
failure_area: "registry",
|
|
16425
|
+
error_kind: "timeout"
|
|
16426
|
+
};
|
|
16413
16427
|
|
|
16414
16428
|
// ../telemetry/src/events.ts
|
|
16415
16429
|
var PLATFORMS = [
|
|
@@ -17177,7 +17191,7 @@ function isCi(env = process.env) {
|
|
|
17177
17191
|
var SESSION_ID = randomUUID4();
|
|
17178
17192
|
function readCliVersion() {
|
|
17179
17193
|
if (true) {
|
|
17180
|
-
return "0.35.1-next.
|
|
17194
|
+
return "0.35.1-next.101";
|
|
17181
17195
|
}
|
|
17182
17196
|
return "0.0.0";
|
|
17183
17197
|
}
|
|
@@ -21651,14 +21665,15 @@ var cursorAdapter = {
|
|
|
21651
21665
|
editJsoncFile(cursorPermissionsPath(), ["mcpAllowlist"], [...list, CURSOR_ALLOWLIST_PATTERN]);
|
|
21652
21666
|
},
|
|
21653
21667
|
removeAllowlist(_root, scope) {
|
|
21654
|
-
if (scope !== "global") return;
|
|
21668
|
+
if (scope !== "global") return false;
|
|
21655
21669
|
const permPath = cursorPermissionsPath();
|
|
21656
|
-
if (!fs21.existsSync(permPath)) return;
|
|
21670
|
+
if (!fs21.existsSync(permPath)) return false;
|
|
21657
21671
|
const config = readJsonc(permPath);
|
|
21658
21672
|
const list = Array.isArray(config.mcpAllowlist) ? config.mcpAllowlist : void 0;
|
|
21659
|
-
if (!list || !list.includes(CURSOR_ALLOWLIST_PATTERN)) return;
|
|
21673
|
+
if (!list || !list.includes(CURSOR_ALLOWLIST_PATTERN)) return false;
|
|
21660
21674
|
const next = list.filter((rule) => rule !== CURSOR_ALLOWLIST_PATTERN);
|
|
21661
21675
|
editJsoncFile(permPath, ["mcpAllowlist"], next.length > 0 ? next : void 0);
|
|
21676
|
+
return true;
|
|
21662
21677
|
}
|
|
21663
21678
|
};
|
|
21664
21679
|
function claudeProjectKeysForRoot(projects, root) {
|
|
@@ -21792,7 +21807,7 @@ var claudeAdapter = {
|
|
|
21792
21807
|
addClaudePermission(root, scope);
|
|
21793
21808
|
},
|
|
21794
21809
|
removeAllowlist(root, scope) {
|
|
21795
|
-
removeClaudePermission(root, scope);
|
|
21810
|
+
return removeClaudePermission(root, scope);
|
|
21796
21811
|
}
|
|
21797
21812
|
};
|
|
21798
21813
|
var vscodeAdapter = {
|
|
@@ -21931,15 +21946,16 @@ var windsurfAdapter = {
|
|
|
21931
21946
|
addAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
|
|
21932
21947
|
},
|
|
21933
21948
|
removeAllowlist(_root, scope) {
|
|
21934
|
-
if (scope !== "global") return;
|
|
21935
|
-
removeAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
|
|
21949
|
+
if (scope !== "global") return false;
|
|
21950
|
+
const removedRule = removeAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
|
|
21936
21951
|
const configPath = path21.join(homedir5(), ".codeium", "windsurf", "mcp_config.json");
|
|
21937
|
-
if (!fs21.existsSync(configPath)) return;
|
|
21952
|
+
if (!fs21.existsSync(configPath)) return removedRule;
|
|
21938
21953
|
const config = readJsonc(configPath);
|
|
21939
21954
|
const servers = config.mcpServers;
|
|
21940
21955
|
const entry = servers?.[MCP_SERVER_KEY];
|
|
21941
|
-
if (!entry?.alwaysAllow) return;
|
|
21956
|
+
if (!entry?.alwaysAllow) return removedRule;
|
|
21942
21957
|
editJsoncFile(configPath, ["mcpServers", MCP_SERVER_KEY, "alwaysAllow"], void 0);
|
|
21958
|
+
return true;
|
|
21943
21959
|
}
|
|
21944
21960
|
};
|
|
21945
21961
|
var zedAdapter = {
|
|
@@ -21988,11 +22004,12 @@ var zedAdapter = {
|
|
|
21988
22004
|
},
|
|
21989
22005
|
removeAllowlist(root, scope) {
|
|
21990
22006
|
const settingsPath = scope === "global" ? path21.join(homedir5(), ".config", "zed", "settings.json") : path21.join(root, ".zed", "settings.json");
|
|
21991
|
-
if (!fs21.existsSync(settingsPath)) return;
|
|
22007
|
+
if (!fs21.existsSync(settingsPath)) return false;
|
|
21992
22008
|
const config = readJsonc(settingsPath);
|
|
21993
22009
|
const perms = config.agent?.tool_permissions;
|
|
21994
|
-
if (!perms || perms.default !== "allow") return;
|
|
22010
|
+
if (!perms || perms.default !== "allow") return false;
|
|
21995
22011
|
editJsoncFile(settingsPath, ["agent", "tool_permissions", "default"], "confirm");
|
|
22012
|
+
return true;
|
|
21996
22013
|
}
|
|
21997
22014
|
};
|
|
21998
22015
|
var geminiAdapter = {
|
|
@@ -22047,13 +22064,14 @@ var geminiAdapter = {
|
|
|
22047
22064
|
removeAllowlist(root, scope) {
|
|
22048
22065
|
const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
|
|
22049
22066
|
if (!configPath || !fs21.existsSync(configPath)) {
|
|
22050
|
-
return;
|
|
22067
|
+
return false;
|
|
22051
22068
|
}
|
|
22052
22069
|
const config = readJsonc(configPath);
|
|
22053
22070
|
const servers = config.mcpServers;
|
|
22054
22071
|
const entry = servers?.[MCP_SERVER_KEY];
|
|
22055
|
-
if (!entry?.trust) return;
|
|
22072
|
+
if (!entry?.trust) return false;
|
|
22056
22073
|
editJsoncFile(configPath, ["mcpServers", MCP_SERVER_KEY, "trust"], void 0);
|
|
22074
|
+
return true;
|
|
22057
22075
|
}
|
|
22058
22076
|
};
|
|
22059
22077
|
var CODEX_FILENAME = ".codex";
|
|
@@ -22142,20 +22160,23 @@ var codexAdapter = {
|
|
|
22142
22160
|
removeAllowlist(root, scope) {
|
|
22143
22161
|
const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
|
|
22144
22162
|
if (!configPath) {
|
|
22145
|
-
return;
|
|
22163
|
+
return false;
|
|
22146
22164
|
}
|
|
22147
22165
|
const tools = getAvailableToolIds();
|
|
22148
22166
|
const config = readToml(configPath);
|
|
22149
22167
|
const toolsConfig = config?.mcp_servers?.argent?.tools;
|
|
22150
22168
|
if (toolsConfig === void 0) {
|
|
22151
|
-
return;
|
|
22169
|
+
return false;
|
|
22152
22170
|
}
|
|
22171
|
+
let removed = false;
|
|
22153
22172
|
for (const tool of tools) {
|
|
22154
22173
|
if (tool in toolsConfig) {
|
|
22155
22174
|
delete toolsConfig[tool];
|
|
22175
|
+
removed = true;
|
|
22156
22176
|
}
|
|
22157
22177
|
}
|
|
22158
|
-
writeToml(configPath, config);
|
|
22178
|
+
if (removed) writeToml(configPath, config);
|
|
22179
|
+
return removed;
|
|
22159
22180
|
}
|
|
22160
22181
|
};
|
|
22161
22182
|
var hermesAdapter = {
|
|
@@ -22274,11 +22295,12 @@ var openCodeAdapter = {
|
|
|
22274
22295
|
},
|
|
22275
22296
|
removeAllowlist(root, scope) {
|
|
22276
22297
|
const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
|
|
22277
|
-
if (!configPath || !fs21.existsSync(configPath)) return;
|
|
22298
|
+
if (!configPath || !fs21.existsSync(configPath)) return false;
|
|
22278
22299
|
const config = readJsonc(configPath);
|
|
22279
22300
|
const tools = config.tools;
|
|
22280
|
-
if (!tools || !(OPENCODE_ALLOWLIST_PATTERN in tools)) return;
|
|
22301
|
+
if (!tools || !(OPENCODE_ALLOWLIST_PATTERN in tools)) return false;
|
|
22281
22302
|
editJsoncFile(configPath, ["tools", OPENCODE_ALLOWLIST_PATTERN], void 0);
|
|
22303
|
+
return true;
|
|
22282
22304
|
}
|
|
22283
22305
|
};
|
|
22284
22306
|
var KIRO_AUTO_APPROVE_ALL = ["*"];
|
|
@@ -22336,12 +22358,13 @@ var kiroAdapter = {
|
|
|
22336
22358
|
},
|
|
22337
22359
|
removeAllowlist(root, scope) {
|
|
22338
22360
|
const configPath = scope === "global" ? this.globalPath() : this.projectPath(root);
|
|
22339
|
-
if (!configPath || !fs21.existsSync(configPath)) return;
|
|
22361
|
+
if (!configPath || !fs21.existsSync(configPath)) return false;
|
|
22340
22362
|
const config = readJsonc(configPath);
|
|
22341
22363
|
const servers = config.mcpServers;
|
|
22342
22364
|
const entry = servers?.[MCP_SERVER_KEY];
|
|
22343
|
-
if (!entry?.autoApprove) return;
|
|
22365
|
+
if (!entry?.autoApprove) return false;
|
|
22344
22366
|
editJsoncFile(configPath, ["mcpServers", MCP_SERVER_KEY, "autoApprove"], void 0);
|
|
22367
|
+
return true;
|
|
22345
22368
|
}
|
|
22346
22369
|
};
|
|
22347
22370
|
var ALL_ADAPTERS = [
|
|
@@ -22388,14 +22411,15 @@ function addAllowRule(settingsPath, rule) {
|
|
|
22388
22411
|
editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, rule]);
|
|
22389
22412
|
}
|
|
22390
22413
|
function removeAllowRule(settingsPath, rule) {
|
|
22391
|
-
if (!fs21.existsSync(settingsPath)) return;
|
|
22414
|
+
if (!fs21.existsSync(settingsPath)) return false;
|
|
22392
22415
|
const config = readJsonc(settingsPath);
|
|
22393
22416
|
const permissions = config?.permissions;
|
|
22394
22417
|
const allow = permissions?.allow;
|
|
22395
|
-
if (!permissions || !Array.isArray(allow)) return;
|
|
22396
|
-
if (!allow.includes(rule)) return;
|
|
22418
|
+
if (!permissions || !Array.isArray(allow)) return false;
|
|
22419
|
+
if (!allow.includes(rule)) return false;
|
|
22397
22420
|
const next = allow.filter((r2) => r2 !== rule);
|
|
22398
22421
|
editJsoncFile(settingsPath, ["permissions", "allow"], next.length > 0 ? next : void 0);
|
|
22422
|
+
return true;
|
|
22399
22423
|
}
|
|
22400
22424
|
function claudeSettingsPath(root, scope) {
|
|
22401
22425
|
return scope === "global" ? path21.join(homedir5(), ".claude", "settings.json") : path21.join(root, ".claude", "settings.json");
|
|
@@ -22404,7 +22428,7 @@ function addClaudePermission(root, scope) {
|
|
|
22404
22428
|
addAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
|
|
22405
22429
|
}
|
|
22406
22430
|
function removeClaudePermission(root, scope) {
|
|
22407
|
-
removeAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
|
|
22431
|
+
return removeAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
|
|
22408
22432
|
}
|
|
22409
22433
|
function formatCopyDestination(target, writtenPath, root) {
|
|
22410
22434
|
if (writtenPath === target.targetPath) return target.label;
|
|
@@ -24933,6 +24957,9 @@ import { readdir as readdir4, readFile as readFile4, realpath as realpath3, stat
|
|
|
24933
24957
|
import * as path31 from "node:path";
|
|
24934
24958
|
var INLINE_MEMBERS_BYTES = 256 * 1024;
|
|
24935
24959
|
|
|
24960
|
+
// ../argent-tools-client/src/auto-capture.ts
|
|
24961
|
+
import { setTimeout as sleep } from "node:timers/promises";
|
|
24962
|
+
|
|
24936
24963
|
// ../argent-tools-client/src/tools-client.ts
|
|
24937
24964
|
var RECORDING_FILE_INPUT = {
|
|
24938
24965
|
target: "__recording",
|
|
@@ -24962,9 +24989,6 @@ var ALLOWED_SAVE_DIRS = /* @__PURE__ */ new Set([normalize2(".argent/recordings"
|
|
|
24962
24989
|
var RECORDINGS_SAVE_DIR = normalize2(".argent/recordings");
|
|
24963
24990
|
var MAX_ARTIFACT_BYTES = 2 * 1024 * 1024 * 1024;
|
|
24964
24991
|
|
|
24965
|
-
// ../argent-tools-client/src/auto-capture.ts
|
|
24966
|
-
import { setTimeout as sleep } from "node:timers/promises";
|
|
24967
|
-
|
|
24968
24992
|
// ../argent-installer/src/update.ts
|
|
24969
24993
|
function getRequestedVersion(args) {
|
|
24970
24994
|
for (let i2 = 0; i2 < args.length; i2 += 1) {
|
|
@@ -25874,8 +25898,9 @@ async function uninstall(args) {
|
|
|
25874
25898
|
for (const s of ["local", "global"]) {
|
|
25875
25899
|
if (!scopesToClean.has(s)) continue;
|
|
25876
25900
|
try {
|
|
25877
|
-
adapter.removeAllowlist(projectRoot, s)
|
|
25878
|
-
|
|
25901
|
+
if (adapter.removeAllowlist(projectRoot, s)) {
|
|
25902
|
+
results.push(`${import_picocolors13.default.green("+")} Removed ${adapter.name} allowlist ${import_picocolors13.default.dim(`(${s})`)}`);
|
|
25903
|
+
}
|
|
25879
25904
|
} catch {
|
|
25880
25905
|
}
|
|
25881
25906
|
}
|