@sema-agent/cli 1.0.25 → 1.0.27
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/npm-shrinkwrap.json +10 -10
- package/package.json +4 -4
- package/sema.js +137 -32
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sema-agent/cli",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.27",
|
|
10
10
|
"license": "BUSL-1.1",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@sema-agent/sdk": "0.0.57",
|
|
13
|
-
"@sema-agent/server": "1.
|
|
13
|
+
"@sema-agent/server": "1.229.0"
|
|
14
14
|
},
|
|
15
15
|
"bin": {
|
|
16
16
|
"sema": "sema.js"
|
|
@@ -629,9 +629,9 @@
|
|
|
629
629
|
}
|
|
630
630
|
},
|
|
631
631
|
"node_modules/@sema-agent/core": {
|
|
632
|
-
"version": "1.
|
|
633
|
-
"resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.
|
|
634
|
-
"integrity": "sha512-
|
|
632
|
+
"version": "1.332.0",
|
|
633
|
+
"resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.332.0.tgz",
|
|
634
|
+
"integrity": "sha512-qVwRaPmKXnhlechgcLfD7QM/qrO0DYjn3nE/zQfNiT6sobsH4aOthlvtvJaPQN7efkQsw2Yi7lijneiu9k//Gw==",
|
|
635
635
|
"license": "BUSL-1.1",
|
|
636
636
|
"dependencies": {
|
|
637
637
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
@@ -678,12 +678,12 @@
|
|
|
678
678
|
}
|
|
679
679
|
},
|
|
680
680
|
"node_modules/@sema-agent/server": {
|
|
681
|
-
"version": "1.
|
|
682
|
-
"resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.
|
|
683
|
-
"integrity": "sha512-
|
|
681
|
+
"version": "1.229.0",
|
|
682
|
+
"resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.229.0.tgz",
|
|
683
|
+
"integrity": "sha512-IXBD3PIHyCkcerzEI0cajyD80dll8itTzZ6UMED09Vu+r5L/FSywYNvlI66abut8s0sQKi0QHz4kJGOJ0lwobQ==",
|
|
684
684
|
"license": "BUSL-1.1",
|
|
685
685
|
"dependencies": {
|
|
686
|
-
"@sema-agent/core": "^1.
|
|
686
|
+
"@sema-agent/core": "^1.329.0",
|
|
687
687
|
"@sema-agent/registry-core": "^0.10.16",
|
|
688
688
|
"e2b": "^2.28.0",
|
|
689
689
|
"libsodium-wrappers": "^0.8.4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.27",
|
|
4
4
|
"description": "Sema — your own Claude Code-grade coding agent, in the terminal.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"bin": {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@sema-agent/sdk": "0.0.57",
|
|
25
|
-
"@sema-agent/server": "1.
|
|
25
|
+
"@sema-agent/server": "1.229.0"
|
|
26
26
|
},
|
|
27
27
|
"overrides": {
|
|
28
|
-
"@sema-agent/core": "1.
|
|
28
|
+
"@sema-agent/core": "1.332.0",
|
|
29
29
|
"@sema-agent/registry-core": "0.10.19"
|
|
30
30
|
},
|
|
31
|
-
"semaEngineVersion": "server 1.
|
|
31
|
+
"semaEngineVersion": "server 1.229.0 / core 1.332.0 / registry-core 0.10.19",
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=18"
|
|
34
34
|
}
|
package/sema.js
CHANGED
|
@@ -223604,7 +223604,7 @@ function getImageTooLargeErrorMessage() {
|
|
|
223604
223604
|
}
|
|
223605
223605
|
function getRequestTooLargeErrorMessage() {
|
|
223606
223606
|
const limits = `max ${formatFileSize(PDF_TARGET_RAW_SIZE)}`;
|
|
223607
|
-
return getIsNonInteractiveSession() ? `Request too large (${limits}).
|
|
223607
|
+
return getIsNonInteractiveSession() ? `Request too large (${limits}). Accumulated images and attachments in the conversation pushed the request over the limit. Remove older images or compact the conversation.` : `Request too large (${limits}). Accumulated images and attachments in the conversation pushed the request over the limit. Run /compact, or double press esc to go back and remove attachments.`;
|
|
223608
223608
|
}
|
|
223609
223609
|
function getTokenRevokedErrorMessage() {
|
|
223610
223610
|
return getIsNonInteractiveSession() ? "Your account does not have access to Claude. Please login again or contact your administrator." : TOKEN_REVOKED_ERROR_MESSAGE;
|
|
@@ -331916,9 +331916,9 @@ function streamingTailWrap(unstableSuffix) {
|
|
|
331916
331916
|
var import_compiler_runtime43, import_react43, import_jsx_runtime53, TOKEN_CACHE_MAX, tokenCache, MD_SYNTAX_RE;
|
|
331917
331917
|
var init_Markdown = __esm({
|
|
331918
331918
|
"build-src/src/components/Markdown.tsx"() {
|
|
331919
|
-
import_compiler_runtime43 = __toESM(require_compiler_runtime());
|
|
331919
|
+
import_compiler_runtime43 = __toESM(require_compiler_runtime(), 1);
|
|
331920
331920
|
init_marked_esm();
|
|
331921
|
-
import_react43 = __toESM(require_react());
|
|
331921
|
+
import_react43 = __toESM(require_react(), 1);
|
|
331922
331922
|
init_useSettings();
|
|
331923
331923
|
init_ink2();
|
|
331924
331924
|
init_cliHighlight();
|
|
@@ -331926,7 +331926,7 @@ var init_Markdown = __esm({
|
|
|
331926
331926
|
init_markdown();
|
|
331927
331927
|
init_messages4();
|
|
331928
331928
|
init_MarkdownTable();
|
|
331929
|
-
import_jsx_runtime53 = __toESM(require_jsx_runtime());
|
|
331929
|
+
import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
|
|
331930
331930
|
TOKEN_CACHE_MAX = 500;
|
|
331931
331931
|
tokenCache = /* @__PURE__ */ new Map();
|
|
331932
331932
|
MD_SYNTAX_RE = /[#*`|[>\-_~]|\n\n|^\d+\. |\n\d+\. /;
|
|
@@ -353795,7 +353795,7 @@ function useClaudeAiLimits() {
|
|
|
353795
353795
|
var import_react64;
|
|
353796
353796
|
var init_claudeAiLimitsHook = __esm({
|
|
353797
353797
|
"build-src/src/services/claudeAiLimitsHook.ts"() {
|
|
353798
|
-
import_react64 = __toESM(require_react()
|
|
353798
|
+
import_react64 = __toESM(require_react());
|
|
353799
353799
|
init_claudeAiLimits();
|
|
353800
353800
|
}
|
|
353801
353801
|
});
|
|
@@ -479612,8 +479612,8 @@ var init_sema_brand = __esm({
|
|
|
479612
479612
|
"Slash-command gating wired to the fleet capability handshake"
|
|
479613
479613
|
]
|
|
479614
479614
|
},
|
|
479615
|
-
productVersion: "1.0.
|
|
479616
|
-
announcement: "sema 1.0.
|
|
479615
|
+
productVersion: "1.0.27",
|
|
479616
|
+
announcement: "sema 1.0.27 \u2014 named sub-agents grow a full lifecycle: messages to a resumed agent now deliver for real (honest queued/parked receipts), stopping one kills the right incarnation, and no stale output leaks across resume cycles."
|
|
479617
479617
|
};
|
|
479618
479618
|
}
|
|
479619
479619
|
});
|
|
@@ -482547,8 +482547,8 @@ var require_sema_brand = __commonJS({
|
|
|
482547
482547
|
"Slash-command gating wired to the fleet capability handshake"
|
|
482548
482548
|
]
|
|
482549
482549
|
},
|
|
482550
|
-
productVersion: "1.0.
|
|
482551
|
-
announcement: "sema 1.0.
|
|
482550
|
+
productVersion: "1.0.27",
|
|
482551
|
+
announcement: "sema 1.0.27 \u2014 named sub-agents grow a full lifecycle: messages to a resumed agent now deliver for real (honest queued/parked receipts), stopping one kills the right incarnation, and no stale output leaks across resume cycles."
|
|
482552
482552
|
};
|
|
482553
482553
|
}
|
|
482554
482554
|
});
|
|
@@ -554628,6 +554628,7 @@ var init_task_registry = __esm({
|
|
|
554628
554628
|
...input.description !== void 0 ? { description: input.description } : {},
|
|
554629
554629
|
...input.name !== void 0 ? { name: input.name } : {},
|
|
554630
554630
|
...input.deliveryChannel !== void 0 ? { channelState: input.deliveryChannel } : {},
|
|
554631
|
+
...input.retainedContinuation !== void 0 ? { retainedContinuation: input.retainedContinuation } : {},
|
|
554631
554632
|
...input.owner !== void 0 ? { owner: input.owner } : {},
|
|
554632
554633
|
...input.scope !== void 0 ? { scope: input.scope } : {},
|
|
554633
554634
|
...input.toolUseId !== void 0 ? { toolUseId: input.toolUseId } : {},
|
|
@@ -554726,7 +554727,12 @@ var init_task_registry = __esm({
|
|
|
554726
554727
|
}
|
|
554727
554728
|
handle.status = outcome.status;
|
|
554728
554729
|
handle.notify = void 0;
|
|
554730
|
+
for (const [, , qResolve] of handle.preAttachQueue ?? [])
|
|
554731
|
+
qResolve?.({ ok: false, reason: "not_running" });
|
|
554729
554732
|
handle.preAttachQueue = void 0;
|
|
554733
|
+
for (const r of [...handle.inFlightDirect ?? []])
|
|
554734
|
+
r({ ok: false, reason: "not_running" });
|
|
554735
|
+
handle.inFlightDirect = void 0;
|
|
554730
554736
|
if (outcome.status === "killed" && handle.stoppedBy === void 0) {
|
|
554731
554737
|
handle.stoppedBy = outcome.stoppedBy ?? handle.stopSource ?? "system";
|
|
554732
554738
|
}
|
|
@@ -555502,44 +555508,137 @@ var init_task_registry = __esm({
|
|
|
555502
555508
|
const closest = closestName(key, byKey.keys());
|
|
555503
555509
|
return { status: "not_found", ...closest !== void 0 ? { suggestion: byKey.get(closest) } : {} };
|
|
555504
555510
|
}
|
|
555505
|
-
|
|
555511
|
+
markRetainedContinuation(id) {
|
|
555512
|
+
const handle = this.handles.get(id);
|
|
555513
|
+
if (handle && handle.type === "background_agent")
|
|
555514
|
+
handle.retainedContinuation = true;
|
|
555515
|
+
}
|
|
555516
|
+
reviveBackgroundAgent(id, access7, abort) {
|
|
555517
|
+
const handle = this.handles.get(id);
|
|
555518
|
+
if (!handle || handle.type !== "background_agent" || !canAccess(handle, access7))
|
|
555519
|
+
return { ok: false, reason: "not_found" };
|
|
555520
|
+
if (handle.status === "running" || handle.status === "pending")
|
|
555521
|
+
return { ok: false, reason: "still_running" };
|
|
555522
|
+
handle.status = "running";
|
|
555523
|
+
handle.channelState = "attaching";
|
|
555524
|
+
handle.notify = void 0;
|
|
555525
|
+
if (abort !== void 0)
|
|
555526
|
+
handle.abort = abort;
|
|
555527
|
+
handle.result = void 0;
|
|
555528
|
+
handle.error = void 0;
|
|
555529
|
+
handle.resultIsPartial = void 0;
|
|
555530
|
+
handle.stopSource = void 0;
|
|
555531
|
+
handle.reviveCycle = (handle.reviveCycle ?? 0) + 1;
|
|
555532
|
+
handle.updatedAt = Date.now();
|
|
555533
|
+
return { ok: true, cycle: handle.reviveCycle };
|
|
555534
|
+
}
|
|
555535
|
+
settleRevivedAgent(id, cycle, outcome) {
|
|
555536
|
+
const handle = this.handles.get(id);
|
|
555537
|
+
if (!handle || handle.type !== "background_agent")
|
|
555538
|
+
return void 0;
|
|
555539
|
+
if ((handle.reviveCycle ?? 0) !== cycle)
|
|
555540
|
+
return void 0;
|
|
555541
|
+
return this.settleBackgroundAgent(id, outcome);
|
|
555542
|
+
}
|
|
555543
|
+
unmarkRetainedContinuation(id) {
|
|
555544
|
+
const handle = this.handles.get(id);
|
|
555545
|
+
if (handle && handle.type === "background_agent")
|
|
555546
|
+
handle.retainedContinuation = false;
|
|
555547
|
+
}
|
|
555548
|
+
attachAgentNotify(id, notify4, cycle) {
|
|
555506
555549
|
const handle = this.handles.get(id);
|
|
555507
555550
|
if (!handle || handle.type !== "background_agent" || handle.status !== "running")
|
|
555508
555551
|
return;
|
|
555552
|
+
if (cycle !== void 0 && (handle.reviveCycle ?? 0) !== cycle)
|
|
555553
|
+
return;
|
|
555509
555554
|
handle.notify = notify4;
|
|
555510
|
-
handle.channelState = "
|
|
555511
|
-
const
|
|
555512
|
-
|
|
555513
|
-
|
|
555514
|
-
|
|
555515
|
-
|
|
555516
|
-
|
|
555517
|
-
|
|
555555
|
+
handle.channelState = "attaching";
|
|
555556
|
+
const live = handle.preAttachQueue;
|
|
555557
|
+
if (live !== void 0 && live.length > 0) {
|
|
555558
|
+
void (async () => {
|
|
555559
|
+
while (handle.preAttachQueue === live && live.length > 0) {
|
|
555560
|
+
const [qPayload, qOpts, qResolve] = live[0];
|
|
555561
|
+
let result;
|
|
555562
|
+
try {
|
|
555563
|
+
const d4 = await notify4(qPayload, qOpts);
|
|
555564
|
+
result = d4 === "parked" && handle.retainedContinuation !== true ? { ok: false, reason: "not_running" } : d4 === "parked" ? { ok: true, disposition: "parked" } : { ok: true, disposition: "queued" };
|
|
555565
|
+
} catch {
|
|
555566
|
+
result = { ok: false, reason: "not_running" };
|
|
555567
|
+
}
|
|
555568
|
+
if (handle.preAttachQueue !== live)
|
|
555569
|
+
return;
|
|
555570
|
+
live.shift();
|
|
555571
|
+
qResolve?.(result);
|
|
555518
555572
|
}
|
|
555519
|
-
|
|
555573
|
+
if (handle.preAttachQueue === live) {
|
|
555574
|
+
handle.preAttachQueue = void 0;
|
|
555575
|
+
handle.channelState = "attached";
|
|
555576
|
+
}
|
|
555577
|
+
})();
|
|
555578
|
+
} else {
|
|
555579
|
+
handle.preAttachQueue = void 0;
|
|
555580
|
+
handle.channelState = "attached";
|
|
555520
555581
|
}
|
|
555521
555582
|
}
|
|
555522
|
-
deliverToRunningAgent(id, access7, notification, opts) {
|
|
555583
|
+
async deliverToRunningAgent(id, access7, notification, opts) {
|
|
555523
555584
|
const handle = this.handles.get(id);
|
|
555524
555585
|
if (!handle || handle.type !== "background_agent" || !canAccess(handle, access7))
|
|
555525
555586
|
return { ok: false, reason: "not_found" };
|
|
555526
555587
|
if (handle.status !== "running")
|
|
555527
555588
|
return { ok: false, reason: "not_running" };
|
|
555528
|
-
|
|
555589
|
+
const bounded = (p, fallback, onTimeout) => new Promise((resolve53) => {
|
|
555590
|
+
const t2 = setTimeout(() => {
|
|
555591
|
+
try {
|
|
555592
|
+
onTimeout?.();
|
|
555593
|
+
} catch {
|
|
555594
|
+
}
|
|
555595
|
+
resolve53(fallback);
|
|
555596
|
+
}, this.deliverConfirmTimeoutMs);
|
|
555597
|
+
t2.unref?.();
|
|
555598
|
+
void p.then((v2) => {
|
|
555599
|
+
clearTimeout(t2);
|
|
555600
|
+
resolve53(v2);
|
|
555601
|
+
}, () => {
|
|
555602
|
+
clearTimeout(t2);
|
|
555603
|
+
resolve53(fallback);
|
|
555604
|
+
});
|
|
555605
|
+
});
|
|
555606
|
+
if (handle.notify === void 0 || handle.channelState === "attaching") {
|
|
555529
555607
|
if (handle.channelState !== "attaching")
|
|
555530
555608
|
return { ok: false, reason: "no_channel" };
|
|
555531
555609
|
const q2 = handle.preAttachQueue ??= [];
|
|
555532
555610
|
if (q2.length >= 8)
|
|
555533
555611
|
return { ok: false, reason: "no_channel" };
|
|
555534
|
-
|
|
555535
|
-
|
|
555536
|
-
|
|
555537
|
-
|
|
555538
|
-
|
|
555539
|
-
|
|
555540
|
-
|
|
555541
|
-
|
|
555542
|
-
|
|
555612
|
+
return bounded(new Promise((resolve53) => {
|
|
555613
|
+
q2.push([notification, opts, resolve53]);
|
|
555614
|
+
}), { ok: true, disposition: "pending" });
|
|
555615
|
+
}
|
|
555616
|
+
let detachOnTimeout;
|
|
555617
|
+
return await bounded(new Promise((resolve53) => {
|
|
555618
|
+
const inflight4 = handle.inFlightDirect ??= /* @__PURE__ */ new Set();
|
|
555619
|
+
const settleOnce = (r) => {
|
|
555620
|
+
if (!inflight4.has(settleOnce))
|
|
555621
|
+
return;
|
|
555622
|
+
inflight4.delete(settleOnce);
|
|
555623
|
+
resolve53(r);
|
|
555624
|
+
};
|
|
555625
|
+
inflight4.add(settleOnce);
|
|
555626
|
+
detachOnTimeout = () => inflight4.delete(settleOnce);
|
|
555627
|
+
void (async () => {
|
|
555628
|
+
let result;
|
|
555629
|
+
try {
|
|
555630
|
+
const d4 = await handle.notify?.(notification, opts);
|
|
555631
|
+
if (d4 === "parked") {
|
|
555632
|
+
result = handle.retainedContinuation === true ? { ok: true, disposition: "parked" } : { ok: false, reason: "not_running" };
|
|
555633
|
+
} else {
|
|
555634
|
+
result = { ok: true, disposition: "queued" };
|
|
555635
|
+
}
|
|
555636
|
+
} catch {
|
|
555637
|
+
result = { ok: false, reason: "not_running" };
|
|
555638
|
+
}
|
|
555639
|
+
settleOnce(result);
|
|
555640
|
+
})();
|
|
555641
|
+
}), { ok: true, disposition: "pending" }, () => detachOnTimeout?.());
|
|
555543
555642
|
}
|
|
555544
555643
|
runningBackgroundAgentLabels(access7) {
|
|
555545
555644
|
const out6 = [];
|
|
@@ -555551,6 +555650,7 @@ var init_task_registry = __esm({
|
|
|
555551
555650
|
}
|
|
555552
555651
|
return out6;
|
|
555553
555652
|
}
|
|
555653
|
+
deliverConfirmTimeoutMs = 1e4;
|
|
555554
555654
|
lastGcAt = 0;
|
|
555555
555655
|
list(access7, opts = {}) {
|
|
555556
555656
|
const limit2 = Math.min(500, Math.max(1, Math.floor(opts.limit ?? 50)));
|
|
@@ -555977,7 +556077,12 @@ ${clipTaskOutput(handle.result, handle.outputFile)}` : "(no result text)"}`;
|
|
|
555977
556077
|
handle.stoppedBy = handle.stopSource ?? "parent";
|
|
555978
556078
|
handle.updatedAt = Date.now();
|
|
555979
556079
|
handle.notify = void 0;
|
|
556080
|
+
for (const [, , qResolve] of handle.preAttachQueue ?? [])
|
|
556081
|
+
qResolve?.({ ok: false, reason: "not_running" });
|
|
555980
556082
|
handle.preAttachQueue = void 0;
|
|
556083
|
+
for (const r of [...handle.inFlightDirect ?? []])
|
|
556084
|
+
r({ ok: false, reason: "not_running" });
|
|
556085
|
+
handle.inFlightDirect = void 0;
|
|
555981
556086
|
this.pokeBgQuiescence(handle.owner);
|
|
555982
556087
|
}
|
|
555983
556088
|
return {
|
|
@@ -651944,7 +652049,7 @@ async function run() {
|
|
|
651944
652049
|
});
|
|
651945
652050
|
program2.name("sema").description(`Sema - starts an interactive session by default, use -p/--print for non-interactive output`).argument("[prompt]", "Your prompt", String).helpOption("-h, --help", "Display help for command").option("-d, --debug [filter]", 'Enable debug mode with optional category filtering (e.g., "api,hooks" or "!1p,!file")', (_value) => {
|
|
651946
652051
|
return true;
|
|
651947
|
-
}).addOption(new Option("-d2e, --debug-to-stderr", "Enable debug mode (to stderr)").argParser(Boolean).hideHelp()).option("--debug-file <path>", "Write debug logs to a specific file path (implicitly enables debug mode)"
|
|
652052
|
+
}).addOption(new Option("-d2e, --debug-to-stderr", "Enable debug mode (to stderr)").argParser(Boolean).hideHelp()).option("--debug-file <path>", "Write debug logs to a specific file path (implicitly enables debug mode)").option("--verbose", "Override verbose mode setting from config", () => true).option("-p, --print", "Print response and exit (useful for pipes). Note: The workspace trust dialog is skipped when Claude is run with the -p mode. Only use this flag in directories you trust.", () => true).option("--bare", "Minimal mode: skip hooks, LSP, plugin sync, attribution, auto-memory, background prefetches, keychain reads, and CLAUDE.md auto-discovery. Sets SEMA_CODE_SIMPLE=1. Anthropic auth is strictly ANTHROPIC_API_KEY or apiKeyHelper via --settings (OAuth and keychain are never read). 3P providers (Bedrock/Vertex/Foundry) use their own credentials. Skills still resolve via /skill-name. Explicitly provide context via: --system-prompt[-file], --append-system-prompt[-file], --add-dir (CLAUDE.md dirs), --mcp-config, --settings, --agents, --plugin-dir.", () => true).option("--safe-mode", "Start with all customizations (CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, keybindings, and more) disabled \u2014 useful for troubleshooting a broken configuration. Admin-managed (policy) settings still apply. Auth, model selection, built-in tools, and permissions work normally. Sets SEMA_CODE_SAFE_MODE=1.", () => true).addOption(new Option("--init", "Run Setup hooks with init trigger, then continue").hideHelp()).addOption(new Option("--init-only", "Run Setup and SessionStart:startup hooks, then exit").hideHelp()).addOption(new Option("--maintenance", "Run Setup hooks with maintenance trigger, then continue").hideHelp()).addOption(new Option("--output-format <format>", 'Output format (only works with --print): "text" (default), "json" (single result), or "stream-json" (realtime streaming)').choices(["text", "json", "stream-json"])).addOption(new Option("--json-schema <schema>", 'JSON Schema for structured output validation. Example: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}').argParser(String)).option("--include-hook-events", "Include all hook lifecycle events in the output stream (only works with --output-format=stream-json)", () => true).option("--include-partial-messages", "Include partial message chunks as they arrive (only works with --print and --output-format=stream-json)", () => true).addOption(new Option("--input-format <format>", 'Input format (only works with --print): "text" (default), or "stream-json" (realtime streaming input)').choices(["text", "stream-json"])).option("--mcp-debug", "[DEPRECATED. Use --debug instead] Enable MCP debug mode (shows MCP server errors)", () => true).option("--dangerously-skip-permissions", "Bypass all permission checks. Recommended only for sandboxes with no internet access.", () => true).option("--allow-dangerously-skip-permissions", "Enable bypassing all permission checks as an option, without it being enabled by default. Recommended only for sandboxes with no internet access.", () => true).addOption(new Option("--thinking <mode>", "Thinking mode: enabled (equivalent to adaptive), disabled").choices(["enabled", "adaptive", "disabled"]).hideHelp()).addOption(new Option("--thinking-display <display>", "How thinking content appears in the response").choices(["summarized", "omitted"]).hideHelp()).addOption(new Option("--max-thinking-tokens <tokens>", "[DEPRECATED. Use --thinking instead for newer models] Maximum number of thinking tokens (only works with --print)").argParser(Number).hideHelp()).addOption(new Option("--max-turns <turns>", "Maximum number of agentic turns in non-interactive mode. This will early exit the conversation after the specified number of turns. (only works with --print)").argParser(Number).hideHelp()).addOption(new Option("--max-budget-usd <amount>", "Maximum dollar amount to spend on API calls (only works with --print)").argParser((value) => {
|
|
651948
652053
|
const amount = Number(value);
|
|
651949
652054
|
if (isNaN(amount) || amount <= 0) {
|
|
651950
652055
|
throw new Error("--max-budget-usd must be a positive number greater than 0");
|
|
@@ -654084,7 +654189,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
|
|
|
654084
654189
|
pendingHookMessages
|
|
654085
654190
|
}, renderAndRun);
|
|
654086
654191
|
}
|
|
654087
|
-
}).version("sema 1.0.
|
|
654192
|
+
}).version("sema 1.0.27", "-v, --version", "Output the version number");
|
|
654088
654193
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
654089
654194
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
654090
654195
|
if (canUserConfigureAdvisor()) {
|