@super-one/cli 0.77.0-alpha → 0.77.0-alpha.1
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 +68 -21
- package/package.json +1 -1
package/MANIFEST.json
CHANGED
package/lib/cli.mjs
CHANGED
|
@@ -142,8 +142,8 @@ import { fileURLToPath } from "node:url";
|
|
|
142
142
|
function resolveCliReleaseVersion() {
|
|
143
143
|
const fromEnv = process.env.SUPERONE_CLI_VERSION?.trim();
|
|
144
144
|
if (fromEnv) return fromEnv;
|
|
145
|
-
if ("0.77.0-alpha".trim()) {
|
|
146
|
-
return "0.77.0-alpha".trim();
|
|
145
|
+
if ("0.77.0-alpha.1".trim()) {
|
|
146
|
+
return "0.77.0-alpha.1".trim();
|
|
147
147
|
}
|
|
148
148
|
const fromDist = readDistManifestVersion();
|
|
149
149
|
if (fromDist) return fromDist;
|
|
@@ -10032,9 +10032,14 @@ function isCursorGlobResult(obj) {
|
|
|
10032
10032
|
function formatCursorGlobResult(obj) {
|
|
10033
10033
|
return obj.files.join("\n");
|
|
10034
10034
|
}
|
|
10035
|
+
function isStandardMcpResult(obj) {
|
|
10036
|
+
return Array.isArray(obj.content) && obj.content.length > 0 && obj.content.some(
|
|
10037
|
+
(c) => c && typeof c === "object" && !Array.isArray(c) && (c.type === "text" || typeof c.text === "string")
|
|
10038
|
+
);
|
|
10039
|
+
}
|
|
10035
10040
|
function isAgentOutputEnvelope(obj) {
|
|
10036
10041
|
const t = obj.type;
|
|
10037
|
-
return t === "MCP" || t === "ListDir" || t === "list_dir" || t === "LS" || t === "Todo" || t === "SearchTool" || t === "GrepSearch" || t === "grep" || obj.TodosUpdated != null || obj.Content != null && typeof obj.Content === "object" || Array.isArray(obj.results) || obj.action != null && typeof obj.action === "object" || isShellCommandResult(obj) || isCursorGrepResult(obj) || isCursorGlobResult(obj);
|
|
10042
|
+
return t === "MCP" || t === "ListDir" || t === "list_dir" || t === "LS" || t === "Todo" || t === "SearchTool" || t === "GrepSearch" || t === "grep" || obj.TodosUpdated != null || obj.Content != null && typeof obj.Content === "object" || Array.isArray(obj.results) || obj.action != null && typeof obj.action === "object" || isShellCommandResult(obj) || isCursorGrepResult(obj) || isCursorGlobResult(obj) || isStandardMcpResult(obj);
|
|
10038
10043
|
}
|
|
10039
10044
|
function formatAgentToolOutput(raw2) {
|
|
10040
10045
|
if (raw2 == null) return "";
|
|
@@ -10062,6 +10067,12 @@ function formatAgentToolOutput(raw2) {
|
|
|
10062
10067
|
if (values.length === 1 && typeof values[0] === "string") return values[0];
|
|
10063
10068
|
}
|
|
10064
10069
|
}
|
|
10070
|
+
if (obj.type !== "ListDir" && obj.type !== "list_dir" && obj.type !== "LS" && isStandardMcpResult(obj)) {
|
|
10071
|
+
const textParts = obj.content.filter((c) => c && typeof c === "object" && !Array.isArray(c) && (c.type === "text" || typeof c.text === "string")).map((c) => typeof c.text === "string" ? c.text : "").filter((t) => t.length > 0);
|
|
10072
|
+
if (textParts.length > 0) {
|
|
10073
|
+
return textParts.join("\n");
|
|
10074
|
+
}
|
|
10075
|
+
}
|
|
10065
10076
|
const listContent = obj.Content ?? obj.content;
|
|
10066
10077
|
if ((obj.type === "ListDir" || obj.type === "list_dir" || obj.type === "LS") && listContent && typeof listContent === "object") {
|
|
10067
10078
|
const body3 = listContent;
|
|
@@ -11191,6 +11202,13 @@ function mergeToolUseInputJson(existing, incoming) {
|
|
|
11191
11202
|
merged[key3] = prev[key3];
|
|
11192
11203
|
}
|
|
11193
11204
|
}
|
|
11205
|
+
for (const key3 of ["answers", "annotations", "previewFormat"]) {
|
|
11206
|
+
const n = merged[key3];
|
|
11207
|
+
const empty2 = n == null || n === "" || typeof n === "object" && !Array.isArray(n) && Object.keys(n).length === 0;
|
|
11208
|
+
if (empty2 && prev[key3] != null && prev[key3] !== "") {
|
|
11209
|
+
merged[key3] = prev[key3];
|
|
11210
|
+
}
|
|
11211
|
+
}
|
|
11194
11212
|
if (!asString7) return merged;
|
|
11195
11213
|
try {
|
|
11196
11214
|
return JSON.stringify(merged);
|
|
@@ -11310,6 +11328,24 @@ function applyContentDelta(content, delta, now = Date.now, options = {}) {
|
|
|
11310
11328
|
const { liveOutput: _final, ...call2 } = b5;
|
|
11311
11329
|
return { ...call2, status: "complete" };
|
|
11312
11330
|
});
|
|
11331
|
+
const existingResultIdx = updated.findIndex(
|
|
11332
|
+
(b5) => isToolResultBlock(b5) && b5.toolUseId === delta.toolUseId
|
|
11333
|
+
);
|
|
11334
|
+
if (existingResultIdx !== -1) {
|
|
11335
|
+
const existingResult = updated[existingResultIdx];
|
|
11336
|
+
if (existingResult.type === "tool_result" && result3.type === "tool_result") {
|
|
11337
|
+
const prevSummary = existingResult.summary?.trim() || "";
|
|
11338
|
+
const nextSummary = result3.summary?.trim() || "";
|
|
11339
|
+
const keepPrevSummary = Boolean(prevSummary) && (nextSummary === "" || nextSummary === "done" || prevSummary.includes('"="') && !nextSummary.includes('"="') || prevSummary === "User dismissed the question without answering.");
|
|
11340
|
+
const mergedResult = {
|
|
11341
|
+
...existingResult,
|
|
11342
|
+
...result3,
|
|
11343
|
+
summary: keepPrevSummary ? existingResult.summary : result3.summary
|
|
11344
|
+
};
|
|
11345
|
+
return updated.map((b5, i2) => i2 === existingResultIdx ? mergedResult : b5);
|
|
11346
|
+
}
|
|
11347
|
+
return updated.map((b5, i2) => i2 === existingResultIdx ? result3 : b5);
|
|
11348
|
+
}
|
|
11313
11349
|
return [...updated, result3];
|
|
11314
11350
|
}
|
|
11315
11351
|
return [...content, delta];
|
|
@@ -92603,7 +92639,9 @@ var init_monitor_session_hold = __esm({
|
|
|
92603
92639
|
suppressFollowUp = false;
|
|
92604
92640
|
note(event) {
|
|
92605
92641
|
if (event.type === "task_started") {
|
|
92606
|
-
if (event.taskType === "monitor"
|
|
92642
|
+
if (event.taskId && (event.taskType === "monitor" || event.taskType === "bash")) {
|
|
92643
|
+
this.ids.add(event.taskId);
|
|
92644
|
+
}
|
|
92607
92645
|
return;
|
|
92608
92646
|
}
|
|
92609
92647
|
if (event.type !== "task_notification") return;
|
|
@@ -92612,7 +92650,7 @@ var init_monitor_session_hold = __esm({
|
|
|
92612
92650
|
this.ids.delete(event.taskId);
|
|
92613
92651
|
}
|
|
92614
92652
|
}
|
|
92615
|
-
/** Rewrite a terminal idle while a monitor is still running. */
|
|
92653
|
+
/** Rewrite a terminal idle while a monitor or background bash is still running. */
|
|
92616
92654
|
adjust(event) {
|
|
92617
92655
|
this.suppressFollowUp = false;
|
|
92618
92656
|
if (event.type !== "status_change") return event;
|
|
@@ -93357,6 +93395,13 @@ var init_computer_use_result_shape = __esm({
|
|
|
93357
93395
|
function formatAcpRawOutput(raw2) {
|
|
93358
93396
|
return formatAgentToolOutput(raw2);
|
|
93359
93397
|
}
|
|
93398
|
+
function backgroundTaskOutputPath(raw2) {
|
|
93399
|
+
if (!raw2 || typeof raw2 !== "object" || Array.isArray(raw2)) return void 0;
|
|
93400
|
+
const record13 = raw2;
|
|
93401
|
+
if (record13.type !== "BackgroundTaskStarted") return void 0;
|
|
93402
|
+
const file2 = record13.output_file ?? record13.outputFile;
|
|
93403
|
+
return typeof file2 === "string" && file2.length > 0 ? file2 : void 0;
|
|
93404
|
+
}
|
|
93360
93405
|
function mediaGenGallerySummary(raw2) {
|
|
93361
93406
|
if (!raw2 || typeof raw2 !== "object" || Array.isArray(raw2)) return null;
|
|
93362
93407
|
const obj = raw2;
|
|
@@ -93438,10 +93483,12 @@ function toolResultFromUpdate(update, terminalOutput) {
|
|
|
93438
93483
|
const capped = shouldKeepFullToolResult(summary2, toolName) ? summary2 : summary2.slice(0, 4e3);
|
|
93439
93484
|
const failed2 = update.status === "failed";
|
|
93440
93485
|
const text4 = withGrokAutoDenyPrefix(capped || (failed2 ? "failed" : "done"), failed2);
|
|
93486
|
+
const outputPath = backgroundTaskOutputPath(update.rawOutput);
|
|
93441
93487
|
return {
|
|
93442
93488
|
type: "tool_result",
|
|
93443
93489
|
toolUseId: update.toolCallId,
|
|
93444
93490
|
summary: text4,
|
|
93491
|
+
...outputPath ? { outputPath } : {},
|
|
93445
93492
|
isError: failed2
|
|
93446
93493
|
};
|
|
93447
93494
|
}
|
|
@@ -136798,14 +136845,6 @@ var en2 = {
|
|
|
136798
136845
|
description: "Skip ordinary prompts; deny rules still apply"
|
|
136799
136846
|
},
|
|
136800
136847
|
autoFailClosedToast: "Grok Auto under SuperOne will deny classifier blocks without asking. Stay on Ask if you want a prompt.",
|
|
136801
|
-
folderTrustTitle: "Trust this folder?",
|
|
136802
|
-
folderTrustBody: "Grok loads project rules, MCP servers, hooks, and skills only after you trust the folder.",
|
|
136803
|
-
folderTrustWorkspace: "Workspace",
|
|
136804
|
-
folderTrustCwd: "Directory",
|
|
136805
|
-
folderTrustKinds: "Config",
|
|
136806
|
-
folderTrustEmptyKinds: "No project config kinds were listed.",
|
|
136807
|
-
folderTrustAllow: "Trust",
|
|
136808
|
-
folderTrustReject: "Don't trust",
|
|
136809
136848
|
contextWindowLabel: "Context window",
|
|
136810
136849
|
contextWindowPreserve: "Keep current"
|
|
136811
136850
|
},
|
|
@@ -139443,6 +139482,8 @@ var en2 = {
|
|
|
139443
139482
|
copyCode: "Copy Code",
|
|
139444
139483
|
copyImage: "Copy Image",
|
|
139445
139484
|
copyTable: "Copy Table",
|
|
139485
|
+
transposeTable: "Transpose Table",
|
|
139486
|
+
restoreTable: "Original Layout",
|
|
139446
139487
|
expand: "Expand",
|
|
139447
139488
|
fastMode: "Fast mode: {{state}}",
|
|
139448
139489
|
ultracode: "Ultracode: dynamic workflows on every task",
|
|
@@ -139468,6 +139509,12 @@ var en2 = {
|
|
|
139468
139509
|
refreshUsage: "Refresh Usage",
|
|
139469
139510
|
codexTitle: "Codex Usage",
|
|
139470
139511
|
windowFallback: "Usage",
|
|
139512
|
+
noUsageInfo: "No usage information available",
|
|
139513
|
+
switchAccount: "Switch Subscription Account",
|
|
139514
|
+
allAccounts: "Subscriptions",
|
|
139515
|
+
accountCount: "{{n}} accounts",
|
|
139516
|
+
currentSession: "Current",
|
|
139517
|
+
otherAccount: "Viewing",
|
|
139471
139518
|
fiveHours: "5 Hours",
|
|
139472
139519
|
weekly: "Weekly",
|
|
139473
139520
|
percentLeft: "{{percent}}% left",
|
|
@@ -141564,14 +141611,6 @@ var zh = {
|
|
|
141564
141611
|
description: "\u8DF3\u8FC7\u5E38\u89C4\u63D0\u793A\uFF0C\u62D2\u7EDD\u89C4\u5219\u4ECD\u751F\u6548"
|
|
141565
141612
|
},
|
|
141566
141613
|
autoFailClosedToast: "SuperOne \u4E0B\u7684 Grok \u81EA\u52A8\u6A21\u5F0F\u4F1A\u76F4\u63A5\u62D2\u7EDD\u5206\u7C7B\u5668\u62E6\u622A\u7684\u64CD\u4F5C\uFF0C\u4E0D\u4F1A\u518D\u8BE2\u95EE\u3002\u82E5\u8981\u5F39\u7A97\u786E\u8BA4\uFF0C\u8BF7\u7559\u5728\u300C\u8BE2\u95EE\u300D\u3002",
|
|
141567
|
-
folderTrustTitle: "\u4FE1\u4EFB\u6B64\u6587\u4EF6\u5939\uFF1F",
|
|
141568
|
-
folderTrustBody: "\u53EA\u6709\u5728\u4F60\u4FE1\u4EFB\u8BE5\u6587\u4EF6\u5939\u4E4B\u540E\uFF0CGrok \u624D\u4F1A\u52A0\u8F7D\u9879\u76EE\u89C4\u5219\u3001MCP\u3001hooks \u548C skills\u3002",
|
|
141569
|
-
folderTrustWorkspace: "\u5DE5\u4F5C\u533A",
|
|
141570
|
-
folderTrustCwd: "\u76EE\u5F55",
|
|
141571
|
-
folderTrustKinds: "\u914D\u7F6E",
|
|
141572
|
-
folderTrustEmptyKinds: "\u6CA1\u6709\u5217\u51FA\u9879\u76EE\u914D\u7F6E\u7C7B\u578B\u3002",
|
|
141573
|
-
folderTrustAllow: "\u4FE1\u4EFB",
|
|
141574
|
-
folderTrustReject: "\u4E0D\u4FE1\u4EFB",
|
|
141575
141614
|
contextWindowLabel: "\u4E0A\u4E0B\u6587\u7A97\u53E3",
|
|
141576
141615
|
contextWindowPreserve: "\u4FDD\u6301\u5F53\u524D"
|
|
141577
141616
|
},
|
|
@@ -144206,6 +144245,8 @@ var zh = {
|
|
|
144206
144245
|
copyCode: "\u590D\u5236\u4EE3\u7801",
|
|
144207
144246
|
copyImage: "\u590D\u5236\u56FE\u7247",
|
|
144208
144247
|
copyTable: "\u590D\u5236\u8868\u683C",
|
|
144248
|
+
transposeTable: "\u884C\u5217\u4E92\u6362",
|
|
144249
|
+
restoreTable: "\u6062\u590D\u539F\u8868",
|
|
144209
144250
|
expand: "\u5C55\u5F00",
|
|
144210
144251
|
fastMode: "\u5FEB\u901F\u6A21\u5F0F\uFF1A{{state}}",
|
|
144211
144252
|
ultracode: "Ultracode\uFF1A\u6BCF\u4E2A\u4EFB\u52A1\u90FD\u4F7F\u7528\u52A8\u6001 workflow",
|
|
@@ -144231,6 +144272,12 @@ var zh = {
|
|
|
144231
144272
|
refreshUsage: "\u5237\u65B0\u7528\u91CF",
|
|
144232
144273
|
codexTitle: "Codex \u7528\u91CF",
|
|
144233
144274
|
windowFallback: "\u7528\u91CF",
|
|
144275
|
+
noUsageInfo: "\u6682\u65E0\u7528\u91CF\u4FE1\u606F",
|
|
144276
|
+
switchAccount: "\u5207\u6362\u8BA2\u9605\u8D26\u53F7",
|
|
144277
|
+
allAccounts: "\u8BA2\u9605",
|
|
144278
|
+
accountCount: "{{n}} \u4E2A\u8D26\u53F7",
|
|
144279
|
+
currentSession: "\u5F53\u524D",
|
|
144280
|
+
otherAccount: "\u9884\u89C8\u4E2D",
|
|
144234
144281
|
fiveHours: "5 \u5C0F\u65F6",
|
|
144235
144282
|
weekly: "\u6BCF\u5468",
|
|
144236
144283
|
percentLeft: "\u5269\u4F59 {{percent}}%",
|
package/package.json
CHANGED