linkshell-cli 0.3.9 → 0.3.11
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/src/runtime/acp/agent-workspace.js +22 -12
- package/dist/cli/src/runtime/acp/agent-workspace.js.map +1 -1
- package/dist/cli/src/runtime/acp/claude-sdk-client.d.ts +2 -1
- package/dist/cli/src/runtime/acp/claude-sdk-client.js +28 -0
- package/dist/cli/src/runtime/acp/claude-sdk-client.js.map +1 -1
- package/dist/cli/src/runtime/acp/claude-sessions.d.ts +32 -4
- package/dist/cli/src/runtime/acp/claude-sessions.js +175 -7
- package/dist/cli/src/runtime/acp/claude-sessions.js.map +1 -1
- package/dist/cli/src/runtime/acp/claude-stream-json-client.d.ts +2 -1
- package/dist/cli/src/runtime/acp/claude-stream-json-client.js +27 -1
- package/dist/cli/src/runtime/acp/claude-stream-json-client.js.map +1 -1
- package/dist/cli/src/runtime/acp/codex-sessions.d.ts +32 -4
- package/dist/cli/src/runtime/acp/codex-sessions.js +293 -14
- package/dist/cli/src/runtime/acp/codex-sessions.js.map +1 -1
- package/dist/cli/tsconfig.tsbuildinfo +1 -1
- package/dist/shared-protocol/src/index.d.ts +716 -716
- package/dist/shared-protocol/src/index.js +4 -4
- package/dist/shared-protocol/src/index.js.map +1 -1
- package/package.json +2 -2
- package/src/runtime/acp/agent-workspace.ts +26 -16
- package/src/runtime/acp/claude-sdk-client.ts +27 -1
- package/src/runtime/acp/claude-sessions.ts +218 -10
- package/src/runtime/acp/claude-stream-json-client.ts +28 -2
- package/src/runtime/acp/codex-sessions.ts +336 -17
|
@@ -556,6 +556,8 @@ function providerLabel(provider) {
|
|
|
556
556
|
return "Custom";
|
|
557
557
|
}
|
|
558
558
|
const ALL_REASONING_EFFORTS = ["none", "minimal", "low", "medium", "high", "xhigh"];
|
|
559
|
+
const CLAUDE_REASONING_EFFORTS = ["low", "medium", "high", "xhigh"];
|
|
560
|
+
const AGENT_PERMISSION_MODES = ["read_only", "workspace_write", "full_access"];
|
|
559
561
|
const CLAUDE_REMOTE_HIDDEN_COMMANDS = new Set([
|
|
560
562
|
"add-dir",
|
|
561
563
|
"agents",
|
|
@@ -1236,7 +1238,7 @@ export class AgentWorkspaceProxy {
|
|
|
1236
1238
|
const supportsImages = enabled && protocolSupportsImages(protocol);
|
|
1237
1239
|
const isClaudeFallback = protocol === "claude-stream-json";
|
|
1238
1240
|
const supportsPermission = enabled && !isClaudeFallback;
|
|
1239
|
-
const supportsReasoningEffort = enabled
|
|
1241
|
+
const supportsReasoningEffort = enabled;
|
|
1240
1242
|
const commands = mergeCommands(defaultProviderCommands(provider, this.input.cwd, enabled), runtimeCapabilities?.commands);
|
|
1241
1243
|
const currentMode = [...this.conversations.values()].find((conversation) => conversation.provider === provider)?.collaborationMode;
|
|
1242
1244
|
return {
|
|
@@ -1248,12 +1250,12 @@ export class AgentWorkspaceProxy {
|
|
|
1248
1250
|
supportsPermission,
|
|
1249
1251
|
supportsPlan: enabled,
|
|
1250
1252
|
supportsCancel: enabled,
|
|
1251
|
-
models: runtimeCapabilities?.models,
|
|
1253
|
+
models: runtimeCapabilities?.models ?? [{ id: "default", label: "默认模型" }],
|
|
1252
1254
|
defaultModel: runtimeCapabilities?.defaultModel,
|
|
1253
1255
|
reasoningEfforts: supportsReasoningEffort
|
|
1254
|
-
? runtimeCapabilities?.reasoningEfforts ?? []
|
|
1256
|
+
? runtimeCapabilities?.reasoningEfforts ?? (provider === "claude" ? [...CLAUDE_REASONING_EFFORTS] : [...ALL_REASONING_EFFORTS])
|
|
1255
1257
|
: [],
|
|
1256
|
-
permissionModes: [],
|
|
1258
|
+
permissionModes: supportsPermission ? AGENT_PERMISSION_MODES : [],
|
|
1257
1259
|
commands,
|
|
1258
1260
|
modes: runtimeCapabilities?.modes ?? [],
|
|
1259
1261
|
currentMode,
|
|
@@ -1436,10 +1438,18 @@ export class AgentWorkspaceProxy {
|
|
|
1436
1438
|
});
|
|
1437
1439
|
return;
|
|
1438
1440
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1441
|
+
if (Object.prototype.hasOwnProperty.call(payload, "model")) {
|
|
1442
|
+
conversation.model = payload.model ?? undefined;
|
|
1443
|
+
}
|
|
1444
|
+
if (Object.prototype.hasOwnProperty.call(payload, "reasoningEffort")) {
|
|
1445
|
+
conversation.reasoningEffort = payload.reasoningEffort ?? undefined;
|
|
1446
|
+
}
|
|
1447
|
+
if (Object.prototype.hasOwnProperty.call(payload, "permissionMode")) {
|
|
1448
|
+
conversation.permissionMode = payload.permissionMode ?? undefined;
|
|
1449
|
+
}
|
|
1450
|
+
if (Object.prototype.hasOwnProperty.call(payload, "collaborationMode")) {
|
|
1451
|
+
conversation.collaborationMode = payload.collaborationMode ?? "default";
|
|
1452
|
+
}
|
|
1443
1453
|
conversation.status = "running";
|
|
1444
1454
|
conversation.lastActivityAt = Date.now();
|
|
1445
1455
|
this.activeConversationId = conversation.id;
|
|
@@ -1459,10 +1469,10 @@ export class AgentWorkspaceProxy {
|
|
|
1459
1469
|
sessionId: conversation.agentSessionId,
|
|
1460
1470
|
content: payload.contentBlocks,
|
|
1461
1471
|
clientMessageId: payload.clientMessageId,
|
|
1462
|
-
model:
|
|
1463
|
-
reasoningEffort:
|
|
1464
|
-
permissionMode:
|
|
1465
|
-
collaborationMode:
|
|
1472
|
+
model: conversation.model,
|
|
1473
|
+
reasoningEffort: conversation.reasoningEffort,
|
|
1474
|
+
permissionMode: conversation.permissionMode,
|
|
1475
|
+
collaborationMode: conversation.collaborationMode,
|
|
1466
1476
|
cwd: conversation.cwd,
|
|
1467
1477
|
});
|
|
1468
1478
|
const nextAgentSessionId = this.extractSessionId(result);
|