@super-one/cli 0.50.7-alpha → 0.51.0-alpha
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/MANIFEST.json +2 -2
- package/lib/cli.mjs +218 -92
- package/package.json +10 -10
package/MANIFEST.json
CHANGED
package/lib/cli.mjs
CHANGED
|
@@ -179,7 +179,7 @@ var init_host_action_superone_descriptors = __esm({
|
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
"name": "session_collab_request",
|
|
182
|
-
"description": 'Request user approval for one or more child sessions. Call session_collab_list_agents first; repeat an agentId to reuse a profile. Invent a human-friendly name and
|
|
182
|
+
"description": 'Request user approval for one or more child sessions. Call session_collab_list_agents first; repeat an agentId to reuse a profile. Invent a human-friendly name and role for every launch. Pass a short 2\u20133 sentence summary (confirm UI) and a full Markdown task (delivered on start; expandable in the UI). Omitted config fields inherit profile defaults. Before setting config.cwd or config.worktree, call read_manual({ domain: "product", topic: "collaboration" }); same-repo isolation belongs in config.worktree. The user may edit model, effort, provider, permission, and sandbox. Each approved launch returns a one-shot credential for session_collab_start.',
|
|
183
183
|
"inputSchema": {
|
|
184
184
|
"type": "object",
|
|
185
185
|
"properties": {
|
|
@@ -198,10 +198,15 @@ var init_host_action_superone_descriptors = __esm({
|
|
|
198
198
|
"type": "string",
|
|
199
199
|
"description": "Agent profile id from session_collab_list_agents."
|
|
200
200
|
},
|
|
201
|
+
"summary": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"minLength": 1,
|
|
204
|
+
"description": "Short 2\u20133 sentence task summary shown collapsed in the confirm dialog. Not the full brief \u2014 put detail in task."
|
|
205
|
+
},
|
|
201
206
|
"task": {
|
|
202
207
|
"type": "string",
|
|
203
|
-
"
|
|
204
|
-
"description": "
|
|
208
|
+
"minLength": 1,
|
|
209
|
+
"description": "Full task brief in Markdown. Delivered to the child session on session_collab_start. The user can expand the summary in the confirm UI to preview it."
|
|
205
210
|
},
|
|
206
211
|
"name": {
|
|
207
212
|
"type": "string",
|
|
@@ -296,6 +301,7 @@ var init_host_action_superone_descriptors = __esm({
|
|
|
296
301
|
},
|
|
297
302
|
"required": [
|
|
298
303
|
"agentId",
|
|
304
|
+
"summary",
|
|
299
305
|
"task",
|
|
300
306
|
"name",
|
|
301
307
|
"role"
|
|
@@ -9331,6 +9337,7 @@ function buildClaudeResultMetadata(result, startedAt, pausedMs, lastAssistantUsa
|
|
|
9331
9337
|
terminalReason: result.terminal_reason,
|
|
9332
9338
|
resultText: result.result,
|
|
9333
9339
|
fastModeState: result.fast_mode_state,
|
|
9340
|
+
fastModeDisabledReason: result.fast_mode_disabled_reason,
|
|
9334
9341
|
errorSubtype: result.subtype !== "success" ? result.subtype : void 0,
|
|
9335
9342
|
structuredOutput: result.structured_output,
|
|
9336
9343
|
isError: result.is_error || void 0,
|
|
@@ -9364,7 +9371,9 @@ function buildClaudeResultMetadata(result, startedAt, pausedMs, lastAssistantUsa
|
|
|
9364
9371
|
costUSD: modelUsage.costUSD ?? 0,
|
|
9365
9372
|
webSearchRequests: modelUsage.webSearchRequests || void 0,
|
|
9366
9373
|
contextWindow: modelUsage.contextWindow || void 0,
|
|
9367
|
-
maxOutputTokens: modelUsage.maxOutputTokens || void 0
|
|
9374
|
+
maxOutputTokens: modelUsage.maxOutputTokens || void 0,
|
|
9375
|
+
canonicalModel: typeof modelUsage.canonicalModel === "string" ? modelUsage.canonicalModel : void 0,
|
|
9376
|
+
provider: typeof modelUsage.provider === "string" ? modelUsage.provider : void 0
|
|
9368
9377
|
};
|
|
9369
9378
|
}
|
|
9370
9379
|
}
|
|
@@ -9454,7 +9463,8 @@ function createClaudeAgentEventMapper(options) {
|
|
|
9454
9463
|
outputStyle: system.output_style,
|
|
9455
9464
|
availableOutputStyles: system.available_output_styles,
|
|
9456
9465
|
plugins: system.plugins,
|
|
9457
|
-
fastModeState: system.fast_mode_state
|
|
9466
|
+
fastModeState: system.fast_mode_state,
|
|
9467
|
+
fastModeDisabledReason: system.fast_mode_disabled_reason
|
|
9458
9468
|
}
|
|
9459
9469
|
});
|
|
9460
9470
|
break;
|
|
@@ -10177,6 +10187,8 @@ function buildLiveOptions(opts, onPermission, onQuestion, onPlan, signal, timing
|
|
|
10177
10187
|
append: [SUPERONE_SYSTEM_PROMPT_APPEND, opts.systemPromptAppend].filter(Boolean).join("\n\n")
|
|
10178
10188
|
},
|
|
10179
10189
|
...opts.sessionId ? { resume: opts.sessionId } : {},
|
|
10190
|
+
...opts.resumeSessionAt ? { resumeSessionAt: opts.resumeSessionAt } : {},
|
|
10191
|
+
...opts.resumeDropsTurn ? { resumeDropsTurn: opts.resumeDropsTurn } : {},
|
|
10180
10192
|
...env ? { env } : {}
|
|
10181
10193
|
};
|
|
10182
10194
|
return {
|
|
@@ -14270,6 +14282,12 @@ function familyBaseUrl(family, baseUrl) {
|
|
|
14270
14282
|
if (family === "openai" || family === "newapi") return `${trimmed}/v1`;
|
|
14271
14283
|
return trimmed;
|
|
14272
14284
|
}
|
|
14285
|
+
function harnessChatProtocols(harness, options) {
|
|
14286
|
+
if (harness === "claude" && options?.experimentalClaudeOpenAiChatEnabled) {
|
|
14287
|
+
return [...HARNESS_CHAT_PROTOCOLS.claude, "openai-chat"];
|
|
14288
|
+
}
|
|
14289
|
+
return HARNESS_CHAT_PROTOCOLS[harness];
|
|
14290
|
+
}
|
|
14273
14291
|
var PROTOCOL_TASKS, PROTOCOL_FAMILIES, PROTOCOL_FAMILY, FAMILY_PROTOCOLS, PROTOCOL_ORDER, CAPABILITY_ORDER, FAMILY_TASK_PROTOCOL, FAMILY_TASKS, HARNESS_CHAT_PROTOCOLS, PROXY_TRANSFORMERS_ENV;
|
|
14274
14292
|
var init_protocols = __esm({
|
|
14275
14293
|
"../../packages/shared/src/platform-registry/protocols.ts"() {
|
|
@@ -14342,7 +14360,7 @@ var init_protocols = __esm({
|
|
|
14342
14360
|
google: CAPABILITY_ORDER.filter((task) => FAMILY_TASK_PROTOCOL.google[task])
|
|
14343
14361
|
};
|
|
14344
14362
|
HARNESS_CHAT_PROTOCOLS = {
|
|
14345
|
-
claude: ["anthropic-messages"
|
|
14363
|
+
claude: ["anthropic-messages"],
|
|
14346
14364
|
codex: ["openai-responses", "openai-chat"]
|
|
14347
14365
|
};
|
|
14348
14366
|
PROXY_TRANSFORMERS_ENV = "SUPERONE_PROXY_TRANSFORMERS";
|
|
@@ -14374,11 +14392,17 @@ var init_capabilities2 = __esm({
|
|
|
14374
14392
|
});
|
|
14375
14393
|
|
|
14376
14394
|
// ../../packages/shared/src/agent-types.ts
|
|
14377
|
-
|
|
14395
|
+
function resolveLaunchSummary(task, summary) {
|
|
14396
|
+
const explicit = typeof summary === "string" ? summary.trim() : "";
|
|
14397
|
+
if (explicit) return explicit;
|
|
14398
|
+
return task.split(/\n/, 1)[0]?.trim() || task.trim();
|
|
14399
|
+
}
|
|
14400
|
+
var SESSION_AGENT_LAUNCHES_FIELD, SESSION_AGENT_TASK_MAX, CODEX_PERMISSION_PRESETS, DEFAULT_CODEX_PERMISSION_PRESET, DEFAULT_CODEX_PERMISSION_PROFILE, MODEL_BUCKETS;
|
|
14378
14401
|
var init_agent_types = __esm({
|
|
14379
14402
|
"../../packages/shared/src/agent-types.ts"() {
|
|
14380
14403
|
"use strict";
|
|
14381
14404
|
SESSION_AGENT_LAUNCHES_FIELD = "sessionAgentLaunchesJson";
|
|
14405
|
+
SESSION_AGENT_TASK_MAX = 1e5;
|
|
14382
14406
|
CODEX_PERMISSION_PRESETS = {
|
|
14383
14407
|
"read-only": {
|
|
14384
14408
|
approvalPolicy: "on-request",
|
|
@@ -14445,11 +14469,31 @@ var init_model_tasks = __esm({
|
|
|
14445
14469
|
});
|
|
14446
14470
|
|
|
14447
14471
|
// ../../packages/shared/src/platform-registry/relay-discovery.ts
|
|
14472
|
+
var CANONICAL_CATALOG_PROVIDERS, FIRST_PARTY_CATALOG_PROVIDERS;
|
|
14448
14473
|
var init_relay_discovery = __esm({
|
|
14449
14474
|
"../../packages/shared/src/platform-registry/relay-discovery.ts"() {
|
|
14450
14475
|
"use strict";
|
|
14451
14476
|
init_model_tasks();
|
|
14452
14477
|
init_protocols();
|
|
14478
|
+
CANONICAL_CATALOG_PROVIDERS = ["openai", "anthropic", "google"];
|
|
14479
|
+
FIRST_PARTY_CATALOG_PROVIDERS = /* @__PURE__ */ new Set([
|
|
14480
|
+
...CANONICAL_CATALOG_PROVIDERS,
|
|
14481
|
+
"xai",
|
|
14482
|
+
"deepseek",
|
|
14483
|
+
"mistral",
|
|
14484
|
+
"cohere",
|
|
14485
|
+
"meta",
|
|
14486
|
+
"moonshotai",
|
|
14487
|
+
"moonshotai-cn",
|
|
14488
|
+
"zhipuai",
|
|
14489
|
+
"zhipuai-coding-plan",
|
|
14490
|
+
"alibaba",
|
|
14491
|
+
"alibaba-cn",
|
|
14492
|
+
"minimax",
|
|
14493
|
+
"minimax-cn",
|
|
14494
|
+
"bytedance",
|
|
14495
|
+
"perplexity"
|
|
14496
|
+
]);
|
|
14453
14497
|
}
|
|
14454
14498
|
});
|
|
14455
14499
|
|
|
@@ -15413,16 +15457,16 @@ function findPlatform(platforms, platformId) {
|
|
|
15413
15457
|
function findPlan(platform2, planId) {
|
|
15414
15458
|
return platform2?.plans.find((p2) => p2.id === planId);
|
|
15415
15459
|
}
|
|
15416
|
-
function selectProtocol(endpoint, task, harness) {
|
|
15460
|
+
function selectProtocol(endpoint, task, harness, options) {
|
|
15417
15461
|
const serving = endpoint.protocols.filter((p2) => protocolServes(p2, task));
|
|
15418
|
-
if (harness) return
|
|
15462
|
+
if (harness) return harnessChatProtocols(harness, options).find((p2) => serving.includes(p2));
|
|
15419
15463
|
return [...serving].sort((a, b2) => PROTOCOL_ORDER.indexOf(a) - PROTOCOL_ORDER.indexOf(b2))[0];
|
|
15420
15464
|
}
|
|
15421
|
-
function selectEndpoint(plan, consumer, endpointId, credential, endpoints = plan.endpoints) {
|
|
15465
|
+
function selectEndpoint(plan, consumer, endpointId, credential, endpoints = plan.endpoints, options) {
|
|
15422
15466
|
const task = CONSUMER_TASK[consumer];
|
|
15423
15467
|
const harness = consumer === "chat:claude" ? "claude" : consumer === "chat:codex" ? "codex" : void 0;
|
|
15424
15468
|
const pick3 = (e) => {
|
|
15425
|
-
const protocol = selectProtocol(e, task, harness);
|
|
15469
|
+
const protocol = selectProtocol(e, task, harness, options);
|
|
15426
15470
|
if (!protocol) return void 0;
|
|
15427
15471
|
if (harness) return protocol;
|
|
15428
15472
|
if (!credential) return protocol;
|
|
@@ -15444,7 +15488,7 @@ function selectEndpoint(plan, consumer, endpointId, credential, endpoints = plan
|
|
|
15444
15488
|
}
|
|
15445
15489
|
}
|
|
15446
15490
|
if (harness) {
|
|
15447
|
-
for (const proto of
|
|
15491
|
+
for (const proto of harnessChatProtocols(harness, options)) {
|
|
15448
15492
|
const endpoint = endpoints.find((e) => e.protocols.includes(proto) && protocolServes(proto, task));
|
|
15449
15493
|
if (endpoint) return { endpoint, protocol: proto };
|
|
15450
15494
|
}
|
|
@@ -18241,7 +18285,7 @@ function platformsForNode(store) {
|
|
|
18241
18285
|
for (const p2 of custom2) byId2.set(p2.id, p2);
|
|
18242
18286
|
return [...byId2.values()];
|
|
18243
18287
|
}
|
|
18244
|
-
function resolveServiceFromCredential(consumer, cred, platforms, binding) {
|
|
18288
|
+
function resolveServiceFromCredential(consumer, cred, platforms, binding, options) {
|
|
18245
18289
|
const platform2 = findPlatform(platforms, cred.platformId);
|
|
18246
18290
|
const plan = findPlan(platform2, cred.planId);
|
|
18247
18291
|
if (!platform2 || !plan) return null;
|
|
@@ -18251,7 +18295,8 @@ function resolveServiceFromCredential(consumer, cred, platforms, binding) {
|
|
|
18251
18295
|
consumer,
|
|
18252
18296
|
binding?.endpointId,
|
|
18253
18297
|
cred,
|
|
18254
|
-
endpoints
|
|
18298
|
+
endpoints,
|
|
18299
|
+
options
|
|
18255
18300
|
);
|
|
18256
18301
|
if (!selected) return null;
|
|
18257
18302
|
const { endpoint, protocol } = selected;
|
|
@@ -18284,7 +18329,7 @@ function consumerForHarness(harness) {
|
|
|
18284
18329
|
if (harness === "codex") return "chat:codex";
|
|
18285
18330
|
return null;
|
|
18286
18331
|
}
|
|
18287
|
-
function listHarnessApiProviders(store, harness) {
|
|
18332
|
+
function listHarnessApiProviders(store, harness, options) {
|
|
18288
18333
|
const consumer = consumerForHarness(harness);
|
|
18289
18334
|
if (!consumer) return [];
|
|
18290
18335
|
const platforms = platformsForNode(store);
|
|
@@ -18294,7 +18339,7 @@ function listHarnessApiProviders(store, harness) {
|
|
|
18294
18339
|
const plan = findPlan(platform2, cred.planId);
|
|
18295
18340
|
if (!platform2 || !plan) continue;
|
|
18296
18341
|
const endpoints = effectiveEndpoints(platform2, plan, cred);
|
|
18297
|
-
if (!selectEndpoint(plan, consumer, void 0, cred, endpoints)) continue;
|
|
18342
|
+
if (!selectEndpoint(plan, consumer, void 0, cred, endpoints, options)) continue;
|
|
18298
18343
|
out.push({
|
|
18299
18344
|
id: cred.id,
|
|
18300
18345
|
name: platform2.name ?? cred.name,
|
|
@@ -18343,7 +18388,7 @@ async function buildHarnessEnvWithProxy(harness, resolved) {
|
|
|
18343
18388
|
}
|
|
18344
18389
|
return env;
|
|
18345
18390
|
}
|
|
18346
|
-
function resolveHarnessService(store, harness, apiProviderId) {
|
|
18391
|
+
function resolveHarnessService(store, harness, apiProviderId, options) {
|
|
18347
18392
|
const consumer = consumerForHarness(harness);
|
|
18348
18393
|
if (!consumer) return null;
|
|
18349
18394
|
const platforms = platformsForNode(store);
|
|
@@ -18357,11 +18402,12 @@ function resolveHarnessService(store, harness, apiProviderId) {
|
|
|
18357
18402
|
consumer,
|
|
18358
18403
|
cred,
|
|
18359
18404
|
platforms,
|
|
18360
|
-
binding && binding.credentialId === cred.id ? { endpointId: binding.endpointId, config: binding.config } : null
|
|
18405
|
+
binding && binding.credentialId === cred.id ? { endpointId: binding.endpointId, config: binding.config } : null,
|
|
18406
|
+
options
|
|
18361
18407
|
);
|
|
18362
18408
|
}
|
|
18363
|
-
function listHarnessProviderModels(store, harness, apiProviderId) {
|
|
18364
|
-
const resolved = resolveHarnessService(store, harness, apiProviderId);
|
|
18409
|
+
function listHarnessProviderModels(store, harness, apiProviderId, options) {
|
|
18410
|
+
const resolved = resolveHarnessService(store, harness, apiProviderId, options);
|
|
18365
18411
|
if (resolved) {
|
|
18366
18412
|
const mapped = /* @__PURE__ */ new Map();
|
|
18367
18413
|
for (const m2 of resolved.models ?? []) {
|
|
@@ -18392,8 +18438,8 @@ function listHarnessProviderModels(store, harness, apiProviderId) {
|
|
|
18392
18438
|
}
|
|
18393
18439
|
return [];
|
|
18394
18440
|
}
|
|
18395
|
-
function listHarnessModels(store, harness, apiProviderId) {
|
|
18396
|
-
const fromProvider = listHarnessProviderModels(store, harness, apiProviderId);
|
|
18441
|
+
function listHarnessModels(store, harness, apiProviderId, options) {
|
|
18442
|
+
const fromProvider = listHarnessProviderModels(store, harness, apiProviderId, options);
|
|
18397
18443
|
if (fromProvider.length > 0) return fromProvider;
|
|
18398
18444
|
if (harness === "claude") return DEFAULT_CLAUDE_MODELS;
|
|
18399
18445
|
if (harness === "codex") return DEFAULT_CODEX_MODELS;
|
|
@@ -21319,7 +21365,9 @@ function createNodeClaudeTurnRunner(opts) {
|
|
|
21319
21365
|
const cwd = input.session.cwd && input.session.cwd.trim() ? input.session.cwd.trim() : projectRoot2;
|
|
21320
21366
|
const providerEnv = opts.providers ? await buildHarnessEnvWithProxy(
|
|
21321
21367
|
"claude",
|
|
21322
|
-
resolveHarnessService(opts.providers, "claude", input.apiProviderId
|
|
21368
|
+
resolveHarnessService(opts.providers, "claude", input.apiProviderId, {
|
|
21369
|
+
experimentalClaudeOpenAiChatEnabled: opts.experimentalClaudeOpenAiChatEnabled?.() ?? false
|
|
21370
|
+
})
|
|
21323
21371
|
) : {};
|
|
21324
21372
|
const authEnv = {
|
|
21325
21373
|
...process.env,
|
|
@@ -41076,9 +41124,14 @@ function createXaiCorrelationState(opts) {
|
|
|
41076
41124
|
goalStarted: /* @__PURE__ */ new Set(),
|
|
41077
41125
|
lastEventSeq: null,
|
|
41078
41126
|
lastUsage: null,
|
|
41079
|
-
lastMessageId: null
|
|
41127
|
+
lastMessageId: null,
|
|
41128
|
+
turnTokens: { input: 0, output: 0, cacheRead: 0 },
|
|
41129
|
+
rateLimited: false
|
|
41080
41130
|
};
|
|
41081
41131
|
}
|
|
41132
|
+
function resetTurnTokens(state) {
|
|
41133
|
+
state.turnTokens = { input: 0, output: 0, cacheRead: 0 };
|
|
41134
|
+
}
|
|
41082
41135
|
function resolveGrokChildChatHistoryPath(cwd, childSessionId) {
|
|
41083
41136
|
if (!cwd || !childSessionId) return void 0;
|
|
41084
41137
|
return join16(homedir4(), ".grok", "sessions", encodeURIComponent(cwd), childSessionId, "chat_history.jsonl");
|
|
@@ -41334,6 +41387,10 @@ function mapXaiSessionUpdate(update, state, ctx = {}) {
|
|
|
41334
41387
|
return mapScheduledTaskDeleted(update, state);
|
|
41335
41388
|
case "turn_completed":
|
|
41336
41389
|
return mapTurnCompleted(update, state, ctx);
|
|
41390
|
+
case "response_started":
|
|
41391
|
+
return mapResponseStarted(update, state, ctx);
|
|
41392
|
+
case "response_completed":
|
|
41393
|
+
return mapResponseCompleted(update, state, ctx);
|
|
41337
41394
|
case "auto_compact_started":
|
|
41338
41395
|
return mapAutoCompactStarted(update);
|
|
41339
41396
|
case "auto_compact_completed":
|
|
@@ -41874,9 +41931,55 @@ function noteContextWindow(state, maxTokens) {
|
|
|
41874
41931
|
function uncachedPromptInputTokens(fullInput, cachedRead) {
|
|
41875
41932
|
return Math.max(0, fullInput - cachedRead);
|
|
41876
41933
|
}
|
|
41934
|
+
function messageUsageFromTurnTokens(state, ctx, tokens) {
|
|
41935
|
+
const messageId = ctx.messageId ?? state.lastMessageId;
|
|
41936
|
+
if (!messageId) return null;
|
|
41937
|
+
if (tokens.input <= 0 && tokens.output <= 0 && tokens.cacheRead <= 0) return null;
|
|
41938
|
+
const prev = state.lastUsage;
|
|
41939
|
+
const contextTokens = prev?.totalTokens && prev.totalTokens > 0 ? prev.totalTokens : 0;
|
|
41940
|
+
const maxTokens = prev?.maxTokens && prev.maxTokens > 0 ? prev.maxTokens : 0;
|
|
41941
|
+
return {
|
|
41942
|
+
type: "message_usage",
|
|
41943
|
+
messageId,
|
|
41944
|
+
inputTokens: tokens.input,
|
|
41945
|
+
outputTokens: tokens.output,
|
|
41946
|
+
...tokens.cacheRead > 0 ? { cacheReadTokens: tokens.cacheRead } : {},
|
|
41947
|
+
...contextTokens > 0 ? { contextTokens } : {},
|
|
41948
|
+
...maxTokens > 0 ? { contextWindow: maxTokens } : {}
|
|
41949
|
+
};
|
|
41950
|
+
}
|
|
41951
|
+
function mapResponseStarted(u, state, ctx) {
|
|
41952
|
+
const input = numField(u, "inputTokens", "input_tokens") ?? 0;
|
|
41953
|
+
const cacheRead = numField(u, "cacheReadInputTokens", "cache_read_input_tokens") ?? 0;
|
|
41954
|
+
const provisional = {
|
|
41955
|
+
input: state.turnTokens.input + input,
|
|
41956
|
+
output: state.turnTokens.output,
|
|
41957
|
+
cacheRead: state.turnTokens.cacheRead + cacheRead
|
|
41958
|
+
};
|
|
41959
|
+
const event = messageUsageFromTurnTokens(state, ctx, provisional);
|
|
41960
|
+
return event ? [event] : [];
|
|
41961
|
+
}
|
|
41962
|
+
function mapResponseCompleted(u, state, ctx) {
|
|
41963
|
+
const usageRaw = asRecord7(u.usage) ?? u;
|
|
41964
|
+
const input = numField(usageRaw, "inputTokens", "input_tokens") ?? 0;
|
|
41965
|
+
const output = numField(usageRaw, "outputTokens", "output_tokens") ?? 0;
|
|
41966
|
+
const cacheRead = numField(usageRaw, "cacheReadInputTokens", "cache_read_input_tokens") ?? 0;
|
|
41967
|
+
if (input <= 0 && output <= 0 && cacheRead <= 0) return [];
|
|
41968
|
+
state.turnTokens = {
|
|
41969
|
+
input: state.turnTokens.input + input,
|
|
41970
|
+
output: state.turnTokens.output + output,
|
|
41971
|
+
cacheRead: state.turnTokens.cacheRead + cacheRead
|
|
41972
|
+
};
|
|
41973
|
+
const event = messageUsageFromTurnTokens(state, ctx, state.turnTokens);
|
|
41974
|
+
return event ? [event] : [];
|
|
41975
|
+
}
|
|
41877
41976
|
function mapTurnCompleted(u, state, ctx) {
|
|
41977
|
+
const events = mapTurnStopReason(u, state);
|
|
41878
41978
|
const usageRaw = asRecord7(u.usage);
|
|
41879
|
-
if (!usageRaw)
|
|
41979
|
+
if (!usageRaw) {
|
|
41980
|
+
resetTurnTokens(state);
|
|
41981
|
+
return events;
|
|
41982
|
+
}
|
|
41880
41983
|
const fullInput = numField(usageRaw, "inputTokens", "input_tokens") ?? 0;
|
|
41881
41984
|
const cachedRead = numField(usageRaw, "cachedReadTokens", "cached_read_tokens") ?? 0;
|
|
41882
41985
|
const uncachedInput = uncachedPromptInputTokens(fullInput, cachedRead);
|
|
@@ -41899,18 +42002,39 @@ function mapTurnCompleted(u, state, ctx) {
|
|
|
41899
42002
|
model: prev?.model ?? ""
|
|
41900
42003
|
};
|
|
41901
42004
|
}
|
|
42005
|
+
state.turnTokens = {
|
|
42006
|
+
input: uncachedInput,
|
|
42007
|
+
output: outputTokens,
|
|
42008
|
+
cacheRead: cachedRead
|
|
42009
|
+
};
|
|
41902
42010
|
const messageId = ctx.messageId ?? state.lastMessageId;
|
|
41903
|
-
if (
|
|
41904
|
-
|
|
41905
|
-
|
|
41906
|
-
|
|
41907
|
-
|
|
41908
|
-
|
|
41909
|
-
|
|
41910
|
-
|
|
41911
|
-
|
|
41912
|
-
|
|
41913
|
-
|
|
42011
|
+
if (messageId) {
|
|
42012
|
+
events.push({
|
|
42013
|
+
type: "message_usage",
|
|
42014
|
+
messageId,
|
|
42015
|
+
// Footer: this-turn new spend (exclude cache hits).
|
|
42016
|
+
inputTokens: uncachedInput,
|
|
42017
|
+
outputTokens,
|
|
42018
|
+
...cachedRead > 0 ? { cacheReadTokens: cachedRead } : {},
|
|
42019
|
+
...contextTokens > 0 ? { contextTokens } : {},
|
|
42020
|
+
...maxTokens > 0 ? { contextWindow: maxTokens } : {},
|
|
42021
|
+
...costUsd != null ? { costUsd } : {}
|
|
42022
|
+
});
|
|
42023
|
+
}
|
|
42024
|
+
resetTurnTokens(state);
|
|
42025
|
+
return events;
|
|
42026
|
+
}
|
|
42027
|
+
function mapTurnStopReason(u, state) {
|
|
42028
|
+
const stopReason = strField(u, "stopReason", "stop_reason");
|
|
42029
|
+
if (stopReason === "rate_limit") {
|
|
42030
|
+
state.rateLimited = true;
|
|
42031
|
+
return [{ type: "rate_limit", status: "rejected", rateLimitType: "api" }];
|
|
42032
|
+
}
|
|
42033
|
+
if (stopReason === "end_turn" && state.rateLimited) {
|
|
42034
|
+
state.rateLimited = false;
|
|
42035
|
+
return [{ type: "rate_limit", status: "allowed" }];
|
|
42036
|
+
}
|
|
42037
|
+
return [];
|
|
41914
42038
|
}
|
|
41915
42039
|
function mapAutoCompactStarted(u) {
|
|
41916
42040
|
void u;
|
|
@@ -50006,6 +50130,7 @@ function createProductionTurnRunner(opts) {
|
|
|
50006
50130
|
queryFn: opts.claudeQueryFn,
|
|
50007
50131
|
allowSimulatedFallback: opts.allowSimulatedFallback,
|
|
50008
50132
|
providers: opts.providers,
|
|
50133
|
+
experimentalClaudeOpenAiChatEnabled: opts.experimentalClaudeOpenAiChatEnabled,
|
|
50009
50134
|
createHostActionClaudeMcp: opts.createHostActionClaudeMcp,
|
|
50010
50135
|
mcpMergeMode: opts.mcpMergeMode,
|
|
50011
50136
|
homeDir: opts.homeDir
|
|
@@ -50240,7 +50365,7 @@ var OFFICIAL_CLAUDE_SDK_VERSION, OFFICIAL_CODEX_NPM_VERSION, OFFICIAL_CLAUDE_SDK
|
|
|
50240
50365
|
var init_managed_harness_official = __esm({
|
|
50241
50366
|
"src/session/managed-harness-official.ts"() {
|
|
50242
50367
|
"use strict";
|
|
50243
|
-
OFFICIAL_CLAUDE_SDK_VERSION = "0.3.
|
|
50368
|
+
OFFICIAL_CLAUDE_SDK_VERSION = "0.3.226";
|
|
50244
50369
|
OFFICIAL_CODEX_NPM_VERSION = "0.146.1";
|
|
50245
50370
|
OFFICIAL_CLAUDE_SDK_PACKAGE = "@anthropic-ai/claude-agent-sdk";
|
|
50246
50371
|
OFFICIAL_CODEX_PACKAGE = "@openai/codex";
|
|
@@ -57426,8 +57551,8 @@ import { fileURLToPath } from "node:url";
|
|
|
57426
57551
|
function resolveCliReleaseVersion() {
|
|
57427
57552
|
const fromEnv = process.env.SUPERONE_CLI_VERSION?.trim();
|
|
57428
57553
|
if (fromEnv) return fromEnv;
|
|
57429
|
-
if ("0.
|
|
57430
|
-
return "0.
|
|
57554
|
+
if ("0.51.0-alpha".trim()) {
|
|
57555
|
+
return "0.51.0-alpha".trim();
|
|
57431
57556
|
}
|
|
57432
57557
|
const fromDist = readDistManifestVersion();
|
|
57433
57558
|
if (fromDist) return fromDist;
|
|
@@ -58588,7 +58713,7 @@ var DEFAULT_NODE_AGENT_SETTINGS = {
|
|
|
58588
58713
|
defaultEffort: "",
|
|
58589
58714
|
permissionPreset: ""
|
|
58590
58715
|
},
|
|
58591
|
-
|
|
58716
|
+
experimentalClaudeOpenAiChatEnabled: false
|
|
58592
58717
|
};
|
|
58593
58718
|
function asString(value, fallback) {
|
|
58594
58719
|
return typeof value === "string" ? value : fallback;
|
|
@@ -58630,8 +58755,8 @@ function normalizeNodeAgentSettings(raw) {
|
|
|
58630
58755
|
return {
|
|
58631
58756
|
claude: normalizeClaude(agent.claude),
|
|
58632
58757
|
codex: normalizeCodex(agent.codex),
|
|
58633
|
-
|
|
58634
|
-
agent.
|
|
58758
|
+
experimentalClaudeOpenAiChatEnabled: asBoolean(
|
|
58759
|
+
agent.experimentalClaudeOpenAiChatEnabled,
|
|
58635
58760
|
false
|
|
58636
58761
|
)
|
|
58637
58762
|
};
|
|
@@ -58640,7 +58765,7 @@ function mergeNodeAgentSettings(current, patch) {
|
|
|
58640
58765
|
const next = {
|
|
58641
58766
|
claude: { ...current.claude },
|
|
58642
58767
|
codex: { ...current.codex },
|
|
58643
|
-
|
|
58768
|
+
experimentalClaudeOpenAiChatEnabled: current.experimentalClaudeOpenAiChatEnabled
|
|
58644
58769
|
};
|
|
58645
58770
|
if (patch.claude) {
|
|
58646
58771
|
if (typeof patch.claude.defaultModel === "string") {
|
|
@@ -58674,8 +58799,8 @@ function mergeNodeAgentSettings(current, patch) {
|
|
|
58674
58799
|
}
|
|
58675
58800
|
}
|
|
58676
58801
|
}
|
|
58677
|
-
if (typeof patch.
|
|
58678
|
-
next.
|
|
58802
|
+
if (typeof patch.experimentalClaudeOpenAiChatEnabled === "boolean") {
|
|
58803
|
+
next.experimentalClaudeOpenAiChatEnabled = patch.experimentalClaudeOpenAiChatEnabled;
|
|
58679
58804
|
}
|
|
58680
58805
|
return normalizeNodeAgentSettings(next);
|
|
58681
58806
|
}
|
|
@@ -58694,7 +58819,7 @@ function readConfigFile(path) {
|
|
|
58694
58819
|
function loadNodeAgentSettings(configPath) {
|
|
58695
58820
|
const file2 = readConfigFile(configPath);
|
|
58696
58821
|
if (file2.agent) return normalizeNodeAgentSettings(file2.agent);
|
|
58697
|
-
if (file2.claude || file2.codex || typeof file2.
|
|
58822
|
+
if (file2.claude || file2.codex || typeof file2.experimentalClaudeOpenAiChatEnabled === "boolean") {
|
|
58698
58823
|
return normalizeNodeAgentSettings(file2);
|
|
58699
58824
|
}
|
|
58700
58825
|
return { ...DEFAULT_NODE_AGENT_SETTINGS, claude: { ...DEFAULT_NODE_AGENT_SETTINGS.claude, disabledSkills: [] }, codex: { ...DEFAULT_NODE_AGENT_SETTINGS.codex } };
|
|
@@ -61505,8 +61630,16 @@ async function handleHarnessResources(payload, ctx) {
|
|
|
61505
61630
|
ctx.projects.touch(projectId);
|
|
61506
61631
|
const harnessId = typeof p2.harnessId === "string" && p2.harnessId.trim() ? p2.harnessId.trim() : null;
|
|
61507
61632
|
const apiProviderId = typeof p2.apiProviderId === "string" && p2.apiProviderId.trim() ? p2.apiProviderId.trim() : p2.apiProviderId === null ? null : void 0;
|
|
61633
|
+
const providerOptions = {
|
|
61634
|
+
experimentalClaudeOpenAiChatEnabled: ctx.experimentalClaudeOpenAiChatEnabled ?? false
|
|
61635
|
+
};
|
|
61508
61636
|
const listModels = (hid, apiId) => {
|
|
61509
|
-
return listHarnessProviderModels(
|
|
61637
|
+
return listHarnessProviderModels(
|
|
61638
|
+
ctx.providers,
|
|
61639
|
+
hid,
|
|
61640
|
+
apiId ?? null,
|
|
61641
|
+
providerOptions
|
|
61642
|
+
);
|
|
61510
61643
|
};
|
|
61511
61644
|
const probeModels = async (hid) => {
|
|
61512
61645
|
const probe = ctx.probeModels ?? defaultProbeModels(ctx);
|
|
@@ -61515,7 +61648,12 @@ async function handleHarnessResources(payload, ctx) {
|
|
|
61515
61648
|
console.warn(
|
|
61516
61649
|
`[harness.resources] ${hid} probe returned no models; serving the built-in fallback table`
|
|
61517
61650
|
);
|
|
61518
|
-
return listHarnessModels(
|
|
61651
|
+
return listHarnessModels(
|
|
61652
|
+
ctx.providers,
|
|
61653
|
+
hid,
|
|
61654
|
+
apiProviderId ?? null,
|
|
61655
|
+
providerOptions
|
|
61656
|
+
);
|
|
61519
61657
|
};
|
|
61520
61658
|
const bundle = await collectHarnessResources({
|
|
61521
61659
|
projectPath: project.path,
|
|
@@ -61698,7 +61836,8 @@ async function dispatchRpcInner(method, payload, ctx) {
|
|
|
61698
61836
|
client: ctx.client,
|
|
61699
61837
|
projects: ctx.projects,
|
|
61700
61838
|
providers: ctx.providers,
|
|
61701
|
-
harnesses: ctx.harnesses
|
|
61839
|
+
harnesses: ctx.harnesses,
|
|
61840
|
+
experimentalClaudeOpenAiChatEnabled: loadNodeAgentSettings(ctx.settingsConfigPath).experimentalClaudeOpenAiChatEnabled
|
|
61702
61841
|
});
|
|
61703
61842
|
if (harnessResources) return harnessResources;
|
|
61704
61843
|
const codex = await dispatchCodexRpc(method, payload, {
|
|
@@ -62019,7 +62158,11 @@ function handleProviderListModels(payload, ctx) {
|
|
|
62019
62158
|
const p2 = asRecord14(payload);
|
|
62020
62159
|
const harness = String(p2.harness ?? p2.harnessId ?? "claude");
|
|
62021
62160
|
const apiProviderId = typeof p2.apiProviderId === "string" && p2.apiProviderId.trim() ? p2.apiProviderId.trim() : null;
|
|
62022
|
-
return {
|
|
62161
|
+
return {
|
|
62162
|
+
result: listHarnessModels(ctx.providers, harness, apiProviderId, {
|
|
62163
|
+
experimentalClaudeOpenAiChatEnabled: loadNodeAgentSettings(ctx.settingsConfigPath).experimentalClaudeOpenAiChatEnabled
|
|
62164
|
+
})
|
|
62165
|
+
};
|
|
62023
62166
|
}
|
|
62024
62167
|
function handleProviderImportBundle(payload, ctx) {
|
|
62025
62168
|
const denied = requireScopes6(ctx.client, OPERATION_SCOPES.adminNode);
|
|
@@ -65924,39 +66067,28 @@ var CollaborationService = class {
|
|
|
65924
66067
|
constructor(deps) {
|
|
65925
66068
|
this.deps = deps;
|
|
65926
66069
|
}
|
|
65927
|
-
isEnabled() {
|
|
65928
|
-
return this.deps.isEnabled?.() ?? true;
|
|
65929
|
-
}
|
|
65930
|
-
assertEnabled() {
|
|
65931
|
-
if (!this.isEnabled()) {
|
|
65932
|
-
throw Object.assign(
|
|
65933
|
-
new Error(
|
|
65934
|
-
"Agent session collaboration is disabled. Enable experimentalAgentCollaborationEnabled in node settings."
|
|
65935
|
-
),
|
|
65936
|
-
{ code: "failed_precondition" }
|
|
65937
|
-
);
|
|
65938
|
-
}
|
|
65939
|
-
}
|
|
65940
66070
|
/** Agent profiles from session_providers (+ ready-harness fallback). */
|
|
65941
66071
|
listProfiles() {
|
|
65942
|
-
this.assertEnabled();
|
|
65943
66072
|
const { harnesses, providers, sessions, sessionProviders } = this.deps;
|
|
65944
66073
|
const profiles = [];
|
|
65945
66074
|
const seen = /* @__PURE__ */ new Set();
|
|
66075
|
+
const providerOptions = {
|
|
66076
|
+
experimentalClaudeOpenAiChatEnabled: this.deps.experimentalClaudeOpenAiChatEnabled?.() ?? false
|
|
66077
|
+
};
|
|
65946
66078
|
const pushProfile = (profileId, harnessId, name, description, profileConfig) => {
|
|
65947
66079
|
if (seen.has(profileId)) return;
|
|
65948
66080
|
if (harnessId !== "claude" && harnessId !== "codex" && harnessId !== "acp" && harnessId !== "opencode") {
|
|
65949
66081
|
return;
|
|
65950
66082
|
}
|
|
65951
66083
|
seen.add(profileId);
|
|
65952
|
-
const models = listHarnessModels(providers, harnessId, null).map((m2) => ({
|
|
66084
|
+
const models = listHarnessModels(providers, harnessId, null, providerOptions).map((m2) => ({
|
|
65953
66085
|
id: m2.id,
|
|
65954
66086
|
name: m2.name || m2.id,
|
|
65955
66087
|
...m2.description ? { description: m2.description } : {}
|
|
65956
66088
|
}));
|
|
65957
66089
|
const defaultModel = models.find((m2) => m2.isDefault) ?? models[0];
|
|
65958
66090
|
const efforts = /* @__PURE__ */ new Set();
|
|
65959
|
-
for (const m2 of listHarnessModels(providers, harnessId, null)) {
|
|
66091
|
+
for (const m2 of listHarnessModels(providers, harnessId, null, providerOptions)) {
|
|
65960
66092
|
for (const e of m2.supportedEffortLevels ?? []) efforts.add(e);
|
|
65961
66093
|
}
|
|
65962
66094
|
const cfg = profileConfig && typeof profileConfig === "object" && !Array.isArray(profileConfig) ? profileConfig : {};
|
|
@@ -65976,7 +66108,7 @@ var CollaborationService = class {
|
|
|
65976
66108
|
},
|
|
65977
66109
|
models: models.length > 0 ? models : [{ id: "default", name: "Default" }],
|
|
65978
66110
|
efforts: [...efforts],
|
|
65979
|
-
apiProviders: listHarnessApiProviders(providers, harnessId)
|
|
66111
|
+
apiProviders: listHarnessApiProviders(providers, harnessId, providerOptions)
|
|
65980
66112
|
});
|
|
65981
66113
|
};
|
|
65982
66114
|
if (sessionProviders) {
|
|
@@ -66022,7 +66154,6 @@ var CollaborationService = class {
|
|
|
66022
66154
|
* RPC path defaults to auto-approve (already-trusted controller).
|
|
66023
66155
|
*/
|
|
66024
66156
|
async request(input) {
|
|
66025
|
-
this.assertEnabled();
|
|
66026
66157
|
const parent = this.deps.sessions.get(input.parentSessionId);
|
|
66027
66158
|
if (!parent) {
|
|
66028
66159
|
throw Object.assign(new Error("Parent session is not available"), { code: "not_found" });
|
|
@@ -66062,8 +66193,15 @@ var CollaborationService = class {
|
|
|
66062
66193
|
code: "invalid_argument"
|
|
66063
66194
|
});
|
|
66064
66195
|
}
|
|
66065
|
-
if (task.length >
|
|
66066
|
-
throw Object.assign(
|
|
66196
|
+
if (task.length > SESSION_AGENT_TASK_MAX) {
|
|
66197
|
+
throw Object.assign(
|
|
66198
|
+
new Error(`A launch task may contain at most ${SESSION_AGENT_TASK_MAX.toLocaleString()} characters`),
|
|
66199
|
+
{ code: "invalid_argument" }
|
|
66200
|
+
);
|
|
66201
|
+
}
|
|
66202
|
+
const summary = resolveLaunchSummary(task, launch2.summary);
|
|
66203
|
+
if (!summary) {
|
|
66204
|
+
throw Object.assign(new Error("Every launch must include a non-empty summary"), {
|
|
66067
66205
|
code: "invalid_argument"
|
|
66068
66206
|
});
|
|
66069
66207
|
}
|
|
@@ -66096,6 +66234,7 @@ var CollaborationService = class {
|
|
|
66096
66234
|
return {
|
|
66097
66235
|
launchId,
|
|
66098
66236
|
agentId: launch2.agentId,
|
|
66237
|
+
summary,
|
|
66099
66238
|
task,
|
|
66100
66239
|
name,
|
|
66101
66240
|
role,
|
|
@@ -66141,7 +66280,12 @@ var CollaborationService = class {
|
|
|
66141
66280
|
() => confirmed.map((launch2) => {
|
|
66142
66281
|
const credential = `s1sc_${randomBytes4(32).toString("base64url")}`;
|
|
66143
66282
|
const credentialHash = hashCredential(credential);
|
|
66144
|
-
const config2 = {
|
|
66283
|
+
const config2 = {
|
|
66284
|
+
...launch2.config,
|
|
66285
|
+
name: launch2.name,
|
|
66286
|
+
role: launch2.role,
|
|
66287
|
+
summary: launch2.summary
|
|
66288
|
+
};
|
|
66145
66289
|
insert.run(
|
|
66146
66290
|
credentialHash,
|
|
66147
66291
|
this.deps.secrets.encrypt(credential),
|
|
@@ -66165,6 +66309,7 @@ var CollaborationService = class {
|
|
|
66165
66309
|
return {
|
|
66166
66310
|
launchId: launch2.launchId,
|
|
66167
66311
|
agentId: launch2.agentId,
|
|
66312
|
+
summary: launch2.summary,
|
|
66168
66313
|
task: launch2.task,
|
|
66169
66314
|
name: launch2.name,
|
|
66170
66315
|
role: launch2.role,
|
|
@@ -66178,7 +66323,6 @@ var CollaborationService = class {
|
|
|
66178
66323
|
return { status: "approved", launches: results };
|
|
66179
66324
|
}
|
|
66180
66325
|
async start(input) {
|
|
66181
|
-
this.assertEnabled();
|
|
66182
66326
|
let grant = this.resolveGrant(input.credential, input.grantId);
|
|
66183
66327
|
if (!grant) {
|
|
66184
66328
|
throw Object.assign(new Error("Invalid collaboration credential"), { code: "not_found" });
|
|
@@ -66317,7 +66461,6 @@ var CollaborationService = class {
|
|
|
66317
66461
|
};
|
|
66318
66462
|
}
|
|
66319
66463
|
send(input) {
|
|
66320
|
-
this.assertEnabled();
|
|
66321
66464
|
const grant = this.grantForCredential(input.credential);
|
|
66322
66465
|
if (!grant) {
|
|
66323
66466
|
throw Object.assign(new Error("Invalid collaboration credential"), { code: "not_found" });
|
|
@@ -66397,7 +66540,6 @@ var CollaborationService = class {
|
|
|
66397
66540
|
};
|
|
66398
66541
|
}
|
|
66399
66542
|
retrieve(input) {
|
|
66400
|
-
this.assertEnabled();
|
|
66401
66543
|
const credentials = [
|
|
66402
66544
|
...typeof input.credential === "string" && input.credential.trim() ? [input.credential.trim()] : [],
|
|
66403
66545
|
...Array.isArray(input.credentials) ? input.credentials.filter((c) => typeof c === "string" && c.trim().length > 0) : []
|
|
@@ -78301,16 +78443,6 @@ function collabDescriptor(name) {
|
|
|
78301
78443
|
};
|
|
78302
78444
|
}
|
|
78303
78445
|
function registerNodeCollabTools(server, superoneSessionId, collab) {
|
|
78304
|
-
const requireEnabled = () => {
|
|
78305
|
-
if (!collab.isEnabled()) {
|
|
78306
|
-
throw Object.assign(
|
|
78307
|
-
new Error(
|
|
78308
|
-
"Agent session collaboration is disabled. Enable experimentalAgentCollaborationEnabled in node settings."
|
|
78309
|
-
),
|
|
78310
|
-
{ code: "failed_precondition" }
|
|
78311
|
-
);
|
|
78312
|
-
}
|
|
78313
|
-
};
|
|
78314
78446
|
const listDesc = collabDescriptor("session_collab_list_agents");
|
|
78315
78447
|
server.registerTool(
|
|
78316
78448
|
"session_collab_list_agents",
|
|
@@ -78320,7 +78452,6 @@ function registerNodeCollabTools(server, superoneSessionId, collab) {
|
|
|
78320
78452
|
},
|
|
78321
78453
|
async () => {
|
|
78322
78454
|
try {
|
|
78323
|
-
requireEnabled();
|
|
78324
78455
|
const agents = await collab.listAgents(superoneSessionId);
|
|
78325
78456
|
return toolResultJson({ agents });
|
|
78326
78457
|
} catch (err) {
|
|
@@ -78337,7 +78468,6 @@ function registerNodeCollabTools(server, superoneSessionId, collab) {
|
|
|
78337
78468
|
},
|
|
78338
78469
|
async (args, extra) => {
|
|
78339
78470
|
try {
|
|
78340
|
-
requireEnabled();
|
|
78341
78471
|
const result = await collab.request(superoneSessionId, args ?? {}, extra?.signal);
|
|
78342
78472
|
const status = result && typeof result === "object" && "status" in result ? String(result.status) : "ok";
|
|
78343
78473
|
return toolResultJson(result, status === "error");
|
|
@@ -78357,7 +78487,6 @@ function registerNodeCollabTools(server, superoneSessionId, collab) {
|
|
|
78357
78487
|
},
|
|
78358
78488
|
async (args) => {
|
|
78359
78489
|
try {
|
|
78360
|
-
requireEnabled();
|
|
78361
78490
|
const result = await collab.start(superoneSessionId, args ?? {});
|
|
78362
78491
|
return toolResultJson(result);
|
|
78363
78492
|
} catch (err) {
|
|
@@ -78374,7 +78503,6 @@ function registerNodeCollabTools(server, superoneSessionId, collab) {
|
|
|
78374
78503
|
},
|
|
78375
78504
|
async (args) => {
|
|
78376
78505
|
try {
|
|
78377
|
-
requireEnabled();
|
|
78378
78506
|
const result = await collab.send(superoneSessionId, args ?? {});
|
|
78379
78507
|
return toolResultJson(result);
|
|
78380
78508
|
} catch (err) {
|
|
@@ -78391,7 +78519,6 @@ function registerNodeCollabTools(server, superoneSessionId, collab) {
|
|
|
78391
78519
|
},
|
|
78392
78520
|
async (args) => {
|
|
78393
78521
|
try {
|
|
78394
|
-
requireEnabled();
|
|
78395
78522
|
const result = await collab.retrieve(superoneSessionId, args ?? {});
|
|
78396
78523
|
return toolResultJson(result);
|
|
78397
78524
|
} catch (err) {
|
|
@@ -79681,7 +79808,6 @@ async function startNodeRuntime(partial2 = {}) {
|
|
|
79681
79808
|
const collabSecrets = createNodeSecretCrypto(paths.providerSecretsKey);
|
|
79682
79809
|
let sessionsRef = null;
|
|
79683
79810
|
let collaborationRef = null;
|
|
79684
|
-
const isCollabEnabled = () => loadNodeAgentSettings(paths.configJson).experimentalAgentCollaborationEnabled;
|
|
79685
79811
|
const hostActionMcp = await startHostActionMcpServer({
|
|
79686
79812
|
requestHostAction: (input) => {
|
|
79687
79813
|
if (!sessionsRef) {
|
|
@@ -79692,7 +79818,6 @@ async function startNodeRuntime(partial2 = {}) {
|
|
|
79692
79818
|
return sessionsRef.requestHostAction(input);
|
|
79693
79819
|
},
|
|
79694
79820
|
collab: {
|
|
79695
|
-
isEnabled: isCollabEnabled,
|
|
79696
79821
|
listAgents: () => {
|
|
79697
79822
|
if (!collaborationRef) throw Object.assign(new Error("collab not ready"), { code: "failed_precondition" });
|
|
79698
79823
|
return collaborationRef.listProfiles();
|
|
@@ -79741,6 +79866,7 @@ async function startNodeRuntime(partial2 = {}) {
|
|
|
79741
79866
|
resolveProjectPath: (projectId) => projects.get(projectId)?.path ?? null,
|
|
79742
79867
|
allowSimulatedFallback: allowSimulatedTurnFallback,
|
|
79743
79868
|
providers,
|
|
79869
|
+
experimentalClaudeOpenAiChatEnabled: () => loadNodeAgentSettings(paths.configJson).experimentalClaudeOpenAiChatEnabled,
|
|
79744
79870
|
// Claude: in-process SDK MCP (same core tools as HTTP).
|
|
79745
79871
|
createHostActionClaudeMcp: (sessionId) => hostActionMcp.createClaudeSdkMcp(sessionId),
|
|
79746
79872
|
// Codex / ACP / OpenCode: loopback HTTP with per-session HMAC.
|
|
@@ -79773,7 +79899,7 @@ async function startNodeRuntime(partial2 = {}) {
|
|
|
79773
79899
|
workspaceGit,
|
|
79774
79900
|
secrets: collabSecrets,
|
|
79775
79901
|
sessionProviders,
|
|
79776
|
-
|
|
79902
|
+
experimentalClaudeOpenAiChatEnabled: () => loadNodeAgentSettings(paths.configJson).experimentalClaudeOpenAiChatEnabled
|
|
79777
79903
|
});
|
|
79778
79904
|
collaborationRef = collaboration;
|
|
79779
79905
|
collaboration.rehydrateSystemPrompts();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@super-one/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0-alpha",
|
|
4
4
|
"description": "SuperOne headless node CLI — remote execution environment (RPC, workspaces, sessions).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"directory": "apps/cli"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
28
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.226",
|
|
29
29
|
"better-sqlite3": "^13.0.1",
|
|
30
30
|
"node-pty": "^1.0.0"
|
|
31
31
|
},
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.
|
|
34
|
-
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.
|
|
35
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.
|
|
36
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.
|
|
37
|
-
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.
|
|
38
|
-
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.
|
|
39
|
-
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.
|
|
40
|
-
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.
|
|
33
|
+
"@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.3.226",
|
|
34
|
+
"@anthropic-ai/claude-agent-sdk-darwin-x64": "0.3.226",
|
|
35
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64": "0.3.226",
|
|
36
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64": "0.3.226",
|
|
37
|
+
"@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.3.226",
|
|
38
|
+
"@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.3.226",
|
|
39
|
+
"@anthropic-ai/claude-agent-sdk-win32-x64": "0.3.226",
|
|
40
|
+
"@anthropic-ai/claude-agent-sdk-win32-arm64": "0.3.226"
|
|
41
41
|
}
|
|
42
42
|
}
|