@sema-agent/cli 1.0.35 → 1.0.37
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 +5 -5
- package/package.json +3 -3
- package/sema.js +699 -645
package/sema.js
CHANGED
|
@@ -161217,6 +161217,7 @@ __export(engineTaskNotification_exports, {
|
|
|
161217
161217
|
enqueueBgChildNotification: () => enqueueBgChildNotification,
|
|
161218
161218
|
enqueueEngineWorkflowNotification: () => enqueueEngineWorkflowNotification,
|
|
161219
161219
|
installWorkflowStatusProbe: () => installWorkflowStatusProbe,
|
|
161220
|
+
isWorkflowCompletionCardEnqueued: () => isWorkflowCompletionCardEnqueued,
|
|
161220
161221
|
markEngineWorkflowNotified: () => markEngineWorkflowNotified,
|
|
161221
161222
|
outstandingWorkflowCount: () => outstandingWorkflowCount,
|
|
161222
161223
|
registerOutstandingWorkflowRun: () => registerOutstandingWorkflowRun,
|
|
@@ -161226,6 +161227,9 @@ function markEngineWorkflowNotified(runId) {
|
|
|
161226
161227
|
notifiedRunIds.add(runId);
|
|
161227
161228
|
if (outstandingRuns.delete(runId)) notifyOutstanding();
|
|
161228
161229
|
}
|
|
161230
|
+
function isWorkflowCompletionCardEnqueued(runId) {
|
|
161231
|
+
return cardEnqueuedRunIds.has(runId);
|
|
161232
|
+
}
|
|
161229
161233
|
function notifyOutstanding() {
|
|
161230
161234
|
for (const l3 of [...outstandingListeners]) {
|
|
161231
161235
|
try {
|
|
@@ -161312,6 +161316,7 @@ function enqueueBgChildNotification(n2) {
|
|
|
161312
161316
|
function enqueueEngineWorkflowNotification(c2) {
|
|
161313
161317
|
if (notifiedRunIds.has(c2.runId)) return;
|
|
161314
161318
|
notifiedRunIds.add(c2.runId);
|
|
161319
|
+
cardEnqueuedRunIds.add(c2.runId);
|
|
161315
161320
|
const message = `<${TASK_NOTIFICATION_TAG}>
|
|
161316
161321
|
<${TASK_ID_TAG}>${escapeXml(c2.runId)}</${TASK_ID_TAG}>
|
|
161317
161322
|
<${STATUS_TAG}>${c2.status}</${STATUS_TAG}>
|
|
@@ -161322,13 +161327,14 @@ function enqueueEngineWorkflowNotification(c2) {
|
|
|
161322
161327
|
mode: "task-notification"
|
|
161323
161328
|
});
|
|
161324
161329
|
}
|
|
161325
|
-
var notifiedRunIds, outstandingRuns, outstandingListeners, statusProbe, watchTimer, WATCH_INTERVAL_MS2, WATCH_TTL_MS, bgNotifiedKeys;
|
|
161330
|
+
var notifiedRunIds, cardEnqueuedRunIds, outstandingRuns, outstandingListeners, statusProbe, watchTimer, WATCH_INTERVAL_MS2, WATCH_TTL_MS, bgNotifiedKeys;
|
|
161326
161331
|
var init_engineTaskNotification = __esm({
|
|
161327
161332
|
"build-src/src/sema/engineTaskNotification.ts"() {
|
|
161328
161333
|
init_xml();
|
|
161329
161334
|
init_messageQueueManager();
|
|
161330
161335
|
init_xml2();
|
|
161331
161336
|
notifiedRunIds = /* @__PURE__ */ new Set();
|
|
161337
|
+
cardEnqueuedRunIds = /* @__PURE__ */ new Set();
|
|
161332
161338
|
outstandingRuns = /* @__PURE__ */ new Map();
|
|
161333
161339
|
outstandingListeners = /* @__PURE__ */ new Set();
|
|
161334
161340
|
statusProbe = null;
|
|
@@ -164362,6 +164368,7 @@ async function* sdkMessagesToCcEvents(sdk, meta3) {
|
|
|
164362
164368
|
const dedupKey = engineTaskNotificationDedupKey(n2);
|
|
164363
164369
|
if (renderedEngineTaskNotifications.has(dedupKey)) break;
|
|
164364
164370
|
renderedEngineTaskNotifications.add(dedupKey);
|
|
164371
|
+
if (n2.task_type !== "external" && isWorkflowCompletionCardEnqueued(taskId)) break;
|
|
164365
164372
|
markEngineWorkflowNotified(taskId);
|
|
164366
164373
|
const summary = typeof n2.summary === "string" && n2.summary.length > 0 ? n2.summary : `Background task "${taskId}" ${rawStatus}`;
|
|
164367
164374
|
const toolUseIdLine = typeof n2.toolUseId === "string" && n2.toolUseId.length > 0 ? `
|
|
@@ -331955,9 +331962,9 @@ function streamingTailWrap(unstableSuffix) {
|
|
|
331955
331962
|
var import_compiler_runtime43, import_react43, import_jsx_runtime53, TOKEN_CACHE_MAX, tokenCache, MD_SYNTAX_RE;
|
|
331956
331963
|
var init_Markdown = __esm({
|
|
331957
331964
|
"build-src/src/components/Markdown.tsx"() {
|
|
331958
|
-
import_compiler_runtime43 = __toESM(require_compiler_runtime());
|
|
331965
|
+
import_compiler_runtime43 = __toESM(require_compiler_runtime(), 1);
|
|
331959
331966
|
init_marked_esm();
|
|
331960
|
-
import_react43 = __toESM(require_react());
|
|
331967
|
+
import_react43 = __toESM(require_react(), 1);
|
|
331961
331968
|
init_useSettings();
|
|
331962
331969
|
init_ink2();
|
|
331963
331970
|
init_cliHighlight();
|
|
@@ -331965,7 +331972,7 @@ var init_Markdown = __esm({
|
|
|
331965
331972
|
init_markdown();
|
|
331966
331973
|
init_messages4();
|
|
331967
331974
|
init_MarkdownTable();
|
|
331968
|
-
import_jsx_runtime53 = __toESM(require_jsx_runtime());
|
|
331975
|
+
import_jsx_runtime53 = __toESM(require_jsx_runtime(), 1);
|
|
331969
331976
|
TOKEN_CACHE_MAX = 500;
|
|
331970
331977
|
tokenCache = /* @__PURE__ */ new Map();
|
|
331971
331978
|
MD_SYNTAX_RE = /[#*`|[>\-_~]|\n\n|^\d+\. |\n\d+\. /;
|
|
@@ -353834,7 +353841,7 @@ function useClaudeAiLimits() {
|
|
|
353834
353841
|
var import_react64;
|
|
353835
353842
|
var init_claudeAiLimitsHook = __esm({
|
|
353836
353843
|
"build-src/src/services/claudeAiLimitsHook.ts"() {
|
|
353837
|
-
import_react64 = __toESM(require_react()
|
|
353844
|
+
import_react64 = __toESM(require_react());
|
|
353838
353845
|
init_claudeAiLimits();
|
|
353839
353846
|
}
|
|
353840
353847
|
});
|
|
@@ -360090,7 +360097,13 @@ function UserToolSuccessMessage({
|
|
|
360090
360097
|
}) ?? null;
|
|
360091
360098
|
if (renderedMessage === null) {
|
|
360092
360099
|
const report = parseSubagentReport(message.toolUseResult);
|
|
360093
|
-
|
|
360100
|
+
const notActive = typeof message.toolUseResult === "string" ? /^Tool "([^"]+)" is not active yet/.exec(message.toolUseResult) : null;
|
|
360101
|
+
if (notActive) {
|
|
360102
|
+
renderedMessage = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(ThemedText, { color: "warning", children: [
|
|
360103
|
+
notActive[1],
|
|
360104
|
+
" tool not active yet \u2014 activating via ToolSearch\u2026"
|
|
360105
|
+
] }) });
|
|
360106
|
+
} else if (report) {
|
|
360094
360107
|
renderedMessage = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(SubagentReportSummary, { report, isTranscriptMode });
|
|
360095
360108
|
} else {
|
|
360096
360109
|
const fallbackText = genericResultText(message.toolUseResult, { full: Boolean(isTranscriptMode) || verbose });
|
|
@@ -406260,11 +406273,17 @@ function renderWorkflowToolResultMessage(content, _progress, { verbose }) {
|
|
|
406260
406273
|
const parsed = JSON.parse(text2);
|
|
406261
406274
|
if (typeof parsed.runId === "string") {
|
|
406262
406275
|
const status3 = typeof parsed.status === "string" ? parsed.status : "started";
|
|
406263
|
-
const line = status3 === "started" ? "Running in background \xB7 /workflows to monitor and save" : `${status3} (runId ${parsed.runId})`;
|
|
406264
406276
|
return (
|
|
406265
406277
|
// MessageResponse = ⎿ 缩进 chrome(live 套件对拍逮出:裸 Text 顶格,CC 结果行恒有 ⎿)
|
|
406266
406278
|
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(ThemedText, { children: [
|
|
406267
|
-
|
|
406279
|
+
status3 === "started" ? (
|
|
406280
|
+
// 原版链短形;/workflows 词高亮(clay 对拍 2026-07-19:CC 真身该词带色)
|
|
406281
|
+
/* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(import_jsx_runtime154.Fragment, { children: [
|
|
406282
|
+
"Running in background \xB7 ",
|
|
406283
|
+
/* @__PURE__ */ (0, import_jsx_runtime154.jsx)(ThemedText, { color: "suggestion", children: "/workflows" }),
|
|
406284
|
+
" to monitor and save"
|
|
406285
|
+
] })
|
|
406286
|
+
) : `${status3} (runId ${parsed.runId})`,
|
|
406268
406287
|
verbose && typeof parsed.note === "string" ? /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(ThemedText, { dimColor: true, children: [
|
|
406269
406288
|
" \u2014 ",
|
|
406270
406289
|
parsed.note
|
|
@@ -406274,6 +406293,9 @@ function renderWorkflowToolResultMessage(content, _progress, { verbose }) {
|
|
|
406274
406293
|
}
|
|
406275
406294
|
} catch {
|
|
406276
406295
|
}
|
|
406296
|
+
if (/is not active yet/.test(text2)) {
|
|
406297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(ThemedText, { color: "warning", children: "Workflow tool not active yet \u2014 activating via ToolSearch\u2026" }) });
|
|
406298
|
+
}
|
|
406277
406299
|
const shown = verbose || text2.length <= 400 ? text2 : `${text2.slice(0, 400)}\u2026`;
|
|
406278
406300
|
return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(ThemedText, { children: shown || "(no content)" }) });
|
|
406279
406301
|
}
|
|
@@ -450917,7 +450939,7 @@ function Settings({
|
|
|
450917
450939
|
var import_react113, import_jsx_runtime193;
|
|
450918
450940
|
var init_cmd_config = __esm({
|
|
450919
450941
|
"build-src/src/sema/overrides/cmd-config.tsx"() {
|
|
450920
|
-
import_react113 = __toESM(require_react());
|
|
450942
|
+
import_react113 = __toESM(require_react(), 1);
|
|
450921
450943
|
init_useKeybinding();
|
|
450922
450944
|
init_useExitOnCtrlCDWithKeybindings();
|
|
450923
450945
|
init_useTerminalSize();
|
|
@@ -450928,7 +450950,7 @@ var init_cmd_config = __esm({
|
|
|
450928
450950
|
init_Config();
|
|
450929
450951
|
init_settings_usage();
|
|
450930
450952
|
init_Stats();
|
|
450931
|
-
import_jsx_runtime193 = __toESM(require_jsx_runtime());
|
|
450953
|
+
import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
|
|
450932
450954
|
}
|
|
450933
450955
|
});
|
|
450934
450956
|
|
|
@@ -479795,8 +479817,8 @@ var init_sema_brand = __esm({
|
|
|
479795
479817
|
"Slash-command gating wired to the fleet capability handshake"
|
|
479796
479818
|
]
|
|
479797
479819
|
},
|
|
479798
|
-
productVersion: "1.0.
|
|
479799
|
-
announcement: "sema 1.0.
|
|
479820
|
+
productVersion: "1.0.37",
|
|
479821
|
+
announcement: "sema 1.0.37 \u2014 workflow agent() with a schema now documents its return shape explicitly, so scripts read fields reliably (no more null-by-misreading)."
|
|
479800
479822
|
};
|
|
479801
479823
|
}
|
|
479802
479824
|
});
|
|
@@ -482730,8 +482752,8 @@ var require_sema_brand = __commonJS({
|
|
|
482730
482752
|
"Slash-command gating wired to the fleet capability handshake"
|
|
482731
482753
|
]
|
|
482732
482754
|
},
|
|
482733
|
-
productVersion: "1.0.
|
|
482734
|
-
announcement: "sema 1.0.
|
|
482755
|
+
productVersion: "1.0.37",
|
|
482756
|
+
announcement: "sema 1.0.37 \u2014 workflow agent() with a schema now documents its return shape explicitly, so scripts read fields reliably (no more null-by-misreading)."
|
|
482735
482757
|
};
|
|
482736
482758
|
}
|
|
482737
482759
|
});
|
|
@@ -553467,42 +553489,83 @@ var init_version3 = __esm({
|
|
|
553467
553489
|
}
|
|
553468
553490
|
});
|
|
553469
553491
|
|
|
553470
|
-
// node_modules/@sema-agent/core/dist/
|
|
553471
|
-
var
|
|
553472
|
-
|
|
553473
|
-
"node_modules/@sema-agent/core/dist/prompt-assembly/event-registry.js"() {
|
|
553474
|
-
EVENT_PROMPT_REGISTRY = new Map([
|
|
553475
|
-
{ kind: "todo_reminder", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#TODO_REMINDER_BASE" },
|
|
553476
|
-
{ kind: "task_reminder", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#TASK_REMINDER_BASE" },
|
|
553477
|
-
{ kind: "changed_files", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderChangedFiles" },
|
|
553478
|
-
{ kind: "plan_mode", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#PLAN_MODE_FULL_BODY" },
|
|
553479
|
-
{ kind: "date_change", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "always", rendererRef: "turn-attachments.ts#renderDateChange" },
|
|
553480
|
-
{ kind: "instructions_change", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", maxBytes: 512, defaultPolicy: "always", rendererRef: "turn-attachments.ts#renderInstructionsChange" },
|
|
553481
|
-
{ kind: "budget_usd", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderBudgetUsd" },
|
|
553482
|
-
{ kind: "background_tasks", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderBackgroundTasks" },
|
|
553483
|
-
{ kind: "tools_delta", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderToolsDelta" },
|
|
553484
|
-
{ kind: "agent_listing", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "on", rendererRef: "turn-attachments.ts#renderAgentListingDelta" },
|
|
553485
|
-
{ kind: "skills_listing", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "on", rendererRef: "turn-attachments.ts#renderSkillsListingDelta" },
|
|
553486
|
-
{ kind: "mcp_instructions", carrier: "message.user-prefix", trust: "external", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderMcpInstructionsDelta" },
|
|
553487
|
-
{ kind: "deadline_converge", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#deadline-t1" },
|
|
553488
|
-
{ kind: "deadline_deliver_now", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#deadline-t2" },
|
|
553489
|
-
{ kind: "deadline_finalize", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#buildFinalizeText" },
|
|
553490
|
-
{ kind: "final_verification", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#final-verification" }
|
|
553491
|
-
].map((e) => [e.kind, e]));
|
|
553492
|
+
// node_modules/@sema-agent/core/dist/core/select-model.js
|
|
553493
|
+
var init_select_model = __esm({
|
|
553494
|
+
"node_modules/@sema-agent/core/dist/core/select-model.js"() {
|
|
553492
553495
|
}
|
|
553493
553496
|
});
|
|
553494
553497
|
|
|
553495
|
-
// node_modules/@sema-agent/core/dist/core/
|
|
553496
|
-
var
|
|
553497
|
-
|
|
553498
|
+
// node_modules/@sema-agent/core/dist/core/roles.js
|
|
553499
|
+
var DEFAULT_TIER_ORDER, ROLE_TIER_DEFAULTS;
|
|
553500
|
+
var init_roles = __esm({
|
|
553501
|
+
"node_modules/@sema-agent/core/dist/core/roles.js"() {
|
|
553502
|
+
init_select_model();
|
|
553503
|
+
DEFAULT_TIER_ORDER = ["ultra", "max", "pro", "flash", "lite"];
|
|
553504
|
+
ROLE_TIER_DEFAULTS = {
|
|
553505
|
+
default: "pro",
|
|
553506
|
+
summarize: "flash",
|
|
553507
|
+
advisor: DEFAULT_TIER_ORDER[0],
|
|
553508
|
+
verifier: "pro",
|
|
553509
|
+
classifier: "flash"
|
|
553510
|
+
};
|
|
553498
553511
|
}
|
|
553499
553512
|
});
|
|
553500
553513
|
|
|
553501
|
-
// node_modules/@sema-agent/core/dist/core/
|
|
553502
|
-
var
|
|
553503
|
-
|
|
553504
|
-
|
|
553505
|
-
|
|
553514
|
+
// node_modules/@sema-agent/core/dist/core/runner/synthetic-tools.js
|
|
553515
|
+
var OUTPUT_TOOL_NAME, REPORT_FINDING_SCHEMA, SKILL_CONTENT_MAX_CHARS;
|
|
553516
|
+
var init_synthetic_tools = __esm({
|
|
553517
|
+
"node_modules/@sema-agent/core/dist/core/runner/synthetic-tools.js"() {
|
|
553518
|
+
init_build3();
|
|
553519
|
+
init_tools3();
|
|
553520
|
+
OUTPUT_TOOL_NAME = "StructuredOutput";
|
|
553521
|
+
REPORT_FINDING_SCHEMA = typebox_exports.Object({
|
|
553522
|
+
file: typebox_exports.String({ description: "Repo-relative path of the file the finding is in" }),
|
|
553523
|
+
line: typebox_exports.Optional(typebox_exports.Integer({ description: "1-indexed line the finding anchors to" })),
|
|
553524
|
+
summary: typebox_exports.String({ description: "One-sentence statement of the defect" }),
|
|
553525
|
+
failure_scenario: typebox_exports.String({ description: "Concrete inputs/state \u2192 wrong output/crash" }),
|
|
553526
|
+
category: typebox_exports.Optional(typebox_exports.String({
|
|
553527
|
+
maxLength: 40,
|
|
553528
|
+
description: 'Short kebab-case slug of the finding type, e.g. "correctness", "simplification", "efficiency", "test-coverage"'
|
|
553529
|
+
})),
|
|
553530
|
+
verdict: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("CONFIRMED"), typebox_exports.Literal("PLAUSIBLE")], {
|
|
553531
|
+
description: "Set when a verify pass ran; absent on inline-only reviews"
|
|
553532
|
+
})),
|
|
553533
|
+
outcome: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("fixed"), typebox_exports.Literal("skipped"), typebox_exports.Literal("no_change_needed")], {
|
|
553534
|
+
description: "Set ONLY when re-reporting after applying fixes: what happened to this finding"
|
|
553535
|
+
}))
|
|
553536
|
+
});
|
|
553537
|
+
SKILL_CONTENT_MAX_CHARS = 1024 * 1024;
|
|
553538
|
+
}
|
|
553539
|
+
});
|
|
553540
|
+
|
|
553541
|
+
// node_modules/@sema-agent/core/dist/core/runner/tool-disclosure.js
|
|
553542
|
+
var EMPTY_PARAMS;
|
|
553543
|
+
var init_tool_disclosure = __esm({
|
|
553544
|
+
"node_modules/@sema-agent/core/dist/core/runner/tool-disclosure.js"() {
|
|
553545
|
+
init_build3();
|
|
553546
|
+
init_tools3();
|
|
553547
|
+
EMPTY_PARAMS = typebox_exports.Object({});
|
|
553548
|
+
}
|
|
553549
|
+
});
|
|
553550
|
+
|
|
553551
|
+
// node_modules/@sema-agent/core/dist/core/tool-result-store.js
|
|
553552
|
+
var init_tool_result_store = __esm({
|
|
553553
|
+
"node_modules/@sema-agent/core/dist/core/tool-result-store.js"() {
|
|
553554
|
+
init_build3();
|
|
553555
|
+
init_tools3();
|
|
553556
|
+
}
|
|
553557
|
+
});
|
|
553558
|
+
|
|
553559
|
+
// node_modules/@sema-agent/core/dist/agents/tool-filter.js
|
|
553560
|
+
var init_tool_filter = __esm({
|
|
553561
|
+
"node_modules/@sema-agent/core/dist/agents/tool-filter.js"() {
|
|
553562
|
+
init_tool_name_aliases();
|
|
553563
|
+
}
|
|
553564
|
+
});
|
|
553565
|
+
|
|
553566
|
+
// node_modules/@sema-agent/core/dist/agents/builtin-agents.js
|
|
553567
|
+
var init_builtin_agents = __esm({
|
|
553568
|
+
"node_modules/@sema-agent/core/dist/agents/builtin-agents.js"() {
|
|
553506
553569
|
}
|
|
553507
553570
|
});
|
|
553508
553571
|
|
|
@@ -553864,345 +553927,6 @@ An object or array parameter value must be a single JSON value \u2014 never writ
|
|
|
553864
553927
|
}
|
|
553865
553928
|
});
|
|
553866
553929
|
|
|
553867
|
-
// node_modules/@sema-agent/core/dist/prompts/coordinator.js
|
|
553868
|
-
var TEAMMATE_COMMUNICATION_ADDENDUM;
|
|
553869
|
-
var init_coordinator = __esm({
|
|
553870
|
-
"node_modules/@sema-agent/core/dist/prompts/coordinator.js"() {
|
|
553871
|
-
TEAMMATE_COMMUNICATION_ADDENDUM = `# Agent Teammate Communication
|
|
553872
|
-
|
|
553873
|
-
IMPORTANT: You are running as a named agent in a team. To communicate, use the SendMessage tool \u2014 \`to: "main"\` sends an update to the spawning conversation; \`to: "<name>"\` reaches a teammate: a running teammate receives your message at its next turn, and a completed teammate is continued from its transcript.
|
|
553874
|
-
|
|
553875
|
-
Just writing a response in text is not visible to others on your team - you MUST use the SendMessage tool.
|
|
553876
|
-
|
|
553877
|
-
The user interacts primarily with the spawning conversation. Your work is coordinated through teammate messaging.`;
|
|
553878
|
-
}
|
|
553879
|
-
});
|
|
553880
|
-
|
|
553881
|
-
// node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js
|
|
553882
|
-
function harnessHeadText(inputs) {
|
|
553883
|
-
return harnessHeadLines(inputs.facts);
|
|
553884
|
-
}
|
|
553885
|
-
var CORE, MODE, SEMA_DEFAULT_PACK;
|
|
553886
|
-
var init_sema_default = __esm({
|
|
553887
|
-
"node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js"() {
|
|
553888
|
-
init_default6();
|
|
553889
|
-
init_supervisor();
|
|
553890
|
-
init_coordinator();
|
|
553891
|
-
init_simple_sections();
|
|
553892
|
-
CORE = {
|
|
553893
|
-
owner: "core",
|
|
553894
|
-
trust: "locked",
|
|
553895
|
-
mutability: "locked",
|
|
553896
|
-
cadence: "epoch",
|
|
553897
|
-
cacheClass: "prefix-stable",
|
|
553898
|
-
carrier: "system.block"
|
|
553899
|
-
};
|
|
553900
|
-
MODE = { ...CORE, trust: "operator", mutability: "selectable" };
|
|
553901
|
-
SEMA_DEFAULT_PACK = {
|
|
553902
|
-
packId: "sema-default@1",
|
|
553903
|
-
assemblyApi: 1,
|
|
553904
|
-
sections: [
|
|
553905
|
-
{
|
|
553906
|
-
id: "core/role.base",
|
|
553907
|
-
slot: "identity",
|
|
553908
|
-
rank: 100,
|
|
553909
|
-
owner: "deployment",
|
|
553910
|
-
trust: "operator",
|
|
553911
|
-
mutability: "replaceable",
|
|
553912
|
-
cadence: "epoch",
|
|
553913
|
-
cacheClass: "prefix-stable",
|
|
553914
|
-
carrier: "system.block",
|
|
553915
|
-
content: (i) => i.roleBase,
|
|
553916
|
-
legacyBlockId: "role.base"
|
|
553917
|
-
},
|
|
553918
|
-
{ id: "core/harness.head", slot: "harness", rank: 200, ...CORE, content: harnessHeadText, legacyBlockId: "harness.context" },
|
|
553919
|
-
{ id: "core/security.cyber-risk", slot: "security", rank: 210, ...CORE, content: () => CYBER_RISK, legacyBlockId: "harness.context" },
|
|
553920
|
-
{ id: "core/security.url-safety", slot: "security", rank: 220, ...CORE, content: () => URL_SAFETY, legacyBlockId: "harness.context" },
|
|
553921
|
-
{ id: "core/harness.tool-result-retention", slot: "harness", rank: 230, ...CORE, content: () => SUMMARIZE_TOOL_RESULTS, legacyBlockId: "harness.context" },
|
|
553922
|
-
{
|
|
553923
|
-
id: "core/harness.execution-environment",
|
|
553924
|
-
slot: "harness",
|
|
553925
|
-
rank: 240,
|
|
553926
|
-
...CORE,
|
|
553927
|
-
admit: (i) => i.facts.policyEnabled || i.facts.isolationEnabled,
|
|
553928
|
-
content: () => EXECUTION_ENVIRONMENT,
|
|
553929
|
-
legacyBlockId: "harness.context"
|
|
553930
|
-
},
|
|
553931
|
-
{ id: "core/simple.communicating", slot: "harness", rank: 250, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: (i) => i.facts.fableMitigations === true ? SIMPLE_COMMUNICATING_FABLE : SIMPLE_COMMUNICATING_LEAN, legacyBlockId: "harness.context" },
|
|
553932
|
-
{ id: "core/simple.pronouns", slot: "harness", rank: 252, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_PRONOUNS, legacyBlockId: "harness.context" },
|
|
553933
|
-
{ id: "core/simple.action-caution", slot: "harness", rank: 254, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_ACTION_CAUTION, legacyBlockId: "harness.context" },
|
|
553934
|
-
{ id: "core/simple.task-continuity", slot: "harness", rank: 256, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_TASK_CONTINUITY, legacyBlockId: "harness.context" },
|
|
553935
|
-
{ id: "core/simple.tool-param-json", slot: "harness", rank: 258, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_TOOL_PARAM_JSON, legacyBlockId: "harness.context" },
|
|
553936
|
-
{ id: "core/simple.investigate-first", slot: "harness", rank: 260, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_INVESTIGATE_FIRST, legacyBlockId: "harness.context" },
|
|
553937
|
-
{ id: "core/simple.context-management", slot: "harness", rank: 262, ...CORE, admit: (i) => i.facts.promptProfile !== "classic" && i.facts.withinTaskCompactionEnabled, content: () => SIMPLE_CONTEXT_MANAGEMENT, legacyBlockId: "harness.context" },
|
|
553938
|
-
{ id: "core/simple.act-dont-rederive", slot: "harness", rank: 264, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_ACT_DONT_REDERIVE, legacyBlockId: "harness.context" },
|
|
553939
|
-
{ id: "core/simple.autonomy", slot: "harness", rank: 266, ...CORE, admit: (i) => i.facts.promptProfile !== "classic" && i.facts.fableMitigations === true, content: () => SIMPLE_AUTONOMY_FABLE, legacyBlockId: "harness.context" },
|
|
553940
|
-
{ id: "core/sema.verify-fresh", slot: "harness", rank: 268, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SEMA_VERIFY_FRESH, legacyBlockId: "harness.context" },
|
|
553941
|
-
{ id: "core/sema.evidence-audit", slot: "harness", rank: 270, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SEMA_EVIDENCE_AUDIT, legacyBlockId: "harness.context" },
|
|
553942
|
-
{ id: "core/mode.supervisor", slot: "mode", rank: 300, ...MODE, admit: (i) => i.facts.supervisorEnabled, content: () => SUPERVISOR_PROMPT, legacyBlockId: "mode.supervisor" },
|
|
553943
|
-
{ id: "core/mode.orchestration", slot: "mode", rank: 310, ...MODE, admit: (i) => i.facts.orchestrationEnabled, content: (i) => i.facts.orchestrationDeferred === true ? ORCHESTRATION_GUIDANCE_DEFERRED : ORCHESTRATION_GUIDANCE, legacyBlockId: "mode.orchestration" },
|
|
553944
|
-
{ id: "core/mode.awareness", slot: "mode", rank: 320, ...MODE, admit: (i) => i.facts.awarenessEnabled, content: () => ORCHESTRATION_AWARENESS, legacyBlockId: "mode.awareness" },
|
|
553945
|
-
{ id: "core/mode.worktree", slot: "mode", rank: 330, ...MODE, admit: (i) => i.facts.worktreeIsolated, content: () => WORKTREE_NOTICE, legacyBlockId: "mode.worktree" },
|
|
553946
|
-
{ id: "core/mode.goal", slot: "mode", rank: 340, ...MODE, admit: (i) => i.facts.goalEnabled, content: () => GOAL_COMPLETION_GUIDANCE, legacyBlockId: "mode.goal" },
|
|
553947
|
-
{
|
|
553948
|
-
id: "core/role.append",
|
|
553949
|
-
slot: "scenario",
|
|
553950
|
-
rank: 400,
|
|
553951
|
-
owner: "deployment",
|
|
553952
|
-
trust: "operator",
|
|
553953
|
-
mutability: "append-only",
|
|
553954
|
-
cadence: "epoch",
|
|
553955
|
-
cacheClass: "prefix-stable",
|
|
553956
|
-
carrier: "system.block",
|
|
553957
|
-
content: (i) => i.roleAppend,
|
|
553958
|
-
legacyBlockId: "role.append"
|
|
553959
|
-
},
|
|
553960
|
-
{ id: "core/mode.teammate", slot: "scenario", rank: 405, ...CORE, admit: (i) => i.facts.teammateEnabled, content: () => TEAMMATE_COMMUNICATION_ADDENDUM, legacyBlockId: "mode.teammate" },
|
|
553961
|
-
{
|
|
553962
|
-
id: "core/discovery.mcp-instructions",
|
|
553963
|
-
slot: "discovery",
|
|
553964
|
-
rank: 500,
|
|
553965
|
-
owner: "extension",
|
|
553966
|
-
trust: "external",
|
|
553967
|
-
mutability: "locked",
|
|
553968
|
-
cadence: "epoch",
|
|
553969
|
-
cacheClass: "prefix-stable",
|
|
553970
|
-
carrier: "system.block",
|
|
553971
|
-
content: (i) => i.mcpInstructionsBlock,
|
|
553972
|
-
legacyBlockId: "mcp.instructions"
|
|
553973
|
-
},
|
|
553974
|
-
{
|
|
553975
|
-
id: "core/environment.context",
|
|
553976
|
-
slot: "environment",
|
|
553977
|
-
rank: 600,
|
|
553978
|
-
owner: "core",
|
|
553979
|
-
trust: "locked",
|
|
553980
|
-
mutability: "locked",
|
|
553981
|
-
cadence: "run",
|
|
553982
|
-
cacheClass: "volatile",
|
|
553983
|
-
carrier: "system.block",
|
|
553984
|
-
content: (i) => i.environmentBlock,
|
|
553985
|
-
legacyBlockId: "env.context"
|
|
553986
|
-
},
|
|
553987
|
-
{
|
|
553988
|
-
id: "core/memory.tail",
|
|
553989
|
-
slot: "memory",
|
|
553990
|
-
rank: 700,
|
|
553991
|
-
owner: "session",
|
|
553992
|
-
trust: "user-derived",
|
|
553993
|
-
mutability: "locked",
|
|
553994
|
-
cadence: "run",
|
|
553995
|
-
cacheClass: "volatile",
|
|
553996
|
-
carrier: "system.block",
|
|
553997
|
-
content: (i) => i.memoryBlock,
|
|
553998
|
-
legacyBlockId: "memory.tail"
|
|
553999
|
-
},
|
|
554000
|
-
{
|
|
554001
|
-
id: "core/behavior.model-guidance",
|
|
554002
|
-
slot: "behavior",
|
|
554003
|
-
rank: 450,
|
|
554004
|
-
owner: "core",
|
|
554005
|
-
trust: "operator",
|
|
554006
|
-
mutability: "selectable",
|
|
554007
|
-
cadence: "epoch",
|
|
554008
|
-
cacheClass: "prefix-stable",
|
|
554009
|
-
carrier: "system.block",
|
|
554010
|
-
content: (i) => i.modelGuidance,
|
|
554011
|
-
legacyBlockId: "model.guidance"
|
|
554012
|
-
}
|
|
554013
|
-
]
|
|
554014
|
-
};
|
|
554015
|
-
}
|
|
554016
|
-
});
|
|
554017
|
-
|
|
554018
|
-
// node_modules/@sema-agent/core/dist/core/runtime.js
|
|
554019
|
-
var init_runtime = __esm({
|
|
554020
|
-
"node_modules/@sema-agent/core/dist/core/runtime.js"() {
|
|
554021
|
-
}
|
|
554022
|
-
});
|
|
554023
|
-
|
|
554024
|
-
// node_modules/@sema-agent/core/dist/core/auto-compaction.js
|
|
554025
|
-
var init_auto_compaction = __esm({
|
|
554026
|
-
"node_modules/@sema-agent/core/dist/core/auto-compaction.js"() {
|
|
554027
|
-
init_harness();
|
|
554028
|
-
init_context_edit();
|
|
554029
|
-
init_epoch();
|
|
554030
|
-
init_sema_default();
|
|
554031
|
-
init_runtime();
|
|
554032
|
-
init_untrusted_text();
|
|
554033
|
-
}
|
|
554034
|
-
});
|
|
554035
|
-
|
|
554036
|
-
// node_modules/@sema-agent/core/dist/core/pricing.js
|
|
554037
|
-
var init_pricing = __esm({
|
|
554038
|
-
"node_modules/@sema-agent/core/dist/core/pricing.js"() {
|
|
554039
|
-
}
|
|
554040
|
-
});
|
|
554041
|
-
|
|
554042
|
-
// node_modules/@sema-agent/core/dist/core/trace.js
|
|
554043
|
-
var init_trace = __esm({
|
|
554044
|
-
"node_modules/@sema-agent/core/dist/core/trace.js"() {
|
|
554045
|
-
}
|
|
554046
|
-
});
|
|
554047
|
-
|
|
554048
|
-
// node_modules/@sema-agent/core/dist/core/task-outcome.js
|
|
554049
|
-
var init_task_outcome = __esm({
|
|
554050
|
-
"node_modules/@sema-agent/core/dist/core/task-outcome.js"() {
|
|
554051
|
-
}
|
|
554052
|
-
});
|
|
554053
|
-
|
|
554054
|
-
// node_modules/@sema-agent/core/dist/brain/repetition.js
|
|
554055
|
-
var init_repetition = __esm({
|
|
554056
|
-
"node_modules/@sema-agent/core/dist/brain/repetition.js"() {
|
|
554057
|
-
}
|
|
554058
|
-
});
|
|
554059
|
-
|
|
554060
|
-
// node_modules/@sema-agent/core/dist/brain/walltime.js
|
|
554061
|
-
var init_walltime = __esm({
|
|
554062
|
-
"node_modules/@sema-agent/core/dist/brain/walltime.js"() {
|
|
554063
|
-
}
|
|
554064
|
-
});
|
|
554065
|
-
|
|
554066
|
-
// node_modules/@sema-agent/core/dist/core/arg-summary.js
|
|
554067
|
-
var init_arg_summary = __esm({
|
|
554068
|
-
"node_modules/@sema-agent/core/dist/core/arg-summary.js"() {
|
|
554069
|
-
}
|
|
554070
|
-
});
|
|
554071
|
-
|
|
554072
|
-
// node_modules/@sema-agent/core/dist/brain/reasoning.js
|
|
554073
|
-
var init_reasoning = __esm({
|
|
554074
|
-
"node_modules/@sema-agent/core/dist/brain/reasoning.js"() {
|
|
554075
|
-
}
|
|
554076
|
-
});
|
|
554077
|
-
|
|
554078
|
-
// node_modules/@sema-agent/core/dist/internal/llm.js
|
|
554079
|
-
var init_llm2 = __esm({
|
|
554080
|
-
"node_modules/@sema-agent/core/dist/internal/llm.js"() {
|
|
554081
|
-
init_llm();
|
|
554082
|
-
}
|
|
554083
|
-
});
|
|
554084
|
-
|
|
554085
|
-
// node_modules/@sema-agent/core/dist/brain/errors.js
|
|
554086
|
-
var BRAIN_ERROR_CODES, CODE_ALTERNATION, CODE_RE, CODE_PREFIX_RE;
|
|
554087
|
-
var init_errors12 = __esm({
|
|
554088
|
-
"node_modules/@sema-agent/core/dist/brain/errors.js"() {
|
|
554089
|
-
BRAIN_ERROR_CODES = ["auth", "rate_limit", "invalid_request", "server", "network", "http", "stream_torn", "refusal", "length_empty"];
|
|
554090
|
-
CODE_ALTERNATION = BRAIN_ERROR_CODES.join("|");
|
|
554091
|
-
CODE_RE = new RegExp(`^\\[(${CODE_ALTERNATION})\\]`);
|
|
554092
|
-
CODE_PREFIX_RE = new RegExp(`^\\[(?:${CODE_ALTERNATION})\\]\\s*`);
|
|
554093
|
-
}
|
|
554094
|
-
});
|
|
554095
|
-
|
|
554096
|
-
// node_modules/@sema-agent/core/dist/brain/status-sink.js
|
|
554097
|
-
import { AsyncLocalStorage as AsyncLocalStorage7 } from "node:async_hooks";
|
|
554098
|
-
var statusSinkStore, telemetrySinkStore;
|
|
554099
|
-
var init_status_sink = __esm({
|
|
554100
|
-
"node_modules/@sema-agent/core/dist/brain/status-sink.js"() {
|
|
554101
|
-
statusSinkStore = new AsyncLocalStorage7();
|
|
554102
|
-
telemetrySinkStore = new AsyncLocalStorage7();
|
|
554103
|
-
}
|
|
554104
|
-
});
|
|
554105
|
-
|
|
554106
|
-
// node_modules/@sema-agent/core/dist/brain/circuit-breaker.js
|
|
554107
|
-
var init_circuit_breaker = __esm({
|
|
554108
|
-
"node_modules/@sema-agent/core/dist/brain/circuit-breaker.js"() {
|
|
554109
|
-
init_llm2();
|
|
554110
|
-
init_errors12();
|
|
554111
|
-
init_status_sink();
|
|
554112
|
-
}
|
|
554113
|
-
});
|
|
554114
|
-
|
|
554115
|
-
// node_modules/@sema-agent/core/dist/brain/degrading.js
|
|
554116
|
-
var init_degrading = __esm({
|
|
554117
|
-
"node_modules/@sema-agent/core/dist/brain/degrading.js"() {
|
|
554118
|
-
init_llm2();
|
|
554119
|
-
init_errors12();
|
|
554120
|
-
init_circuit_breaker();
|
|
554121
|
-
}
|
|
554122
|
-
});
|
|
554123
|
-
|
|
554124
|
-
// node_modules/@sema-agent/core/dist/core/select-model.js
|
|
554125
|
-
var init_select_model = __esm({
|
|
554126
|
-
"node_modules/@sema-agent/core/dist/core/select-model.js"() {
|
|
554127
|
-
}
|
|
554128
|
-
});
|
|
554129
|
-
|
|
554130
|
-
// node_modules/@sema-agent/core/dist/core/roles.js
|
|
554131
|
-
var DEFAULT_TIER_ORDER, ROLE_TIER_DEFAULTS;
|
|
554132
|
-
var init_roles = __esm({
|
|
554133
|
-
"node_modules/@sema-agent/core/dist/core/roles.js"() {
|
|
554134
|
-
init_select_model();
|
|
554135
|
-
DEFAULT_TIER_ORDER = ["ultra", "max", "pro", "flash", "lite"];
|
|
554136
|
-
ROLE_TIER_DEFAULTS = {
|
|
554137
|
-
default: "pro",
|
|
554138
|
-
summarize: "flash",
|
|
554139
|
-
advisor: DEFAULT_TIER_ORDER[0],
|
|
554140
|
-
verifier: "pro",
|
|
554141
|
-
classifier: "flash"
|
|
554142
|
-
};
|
|
554143
|
-
}
|
|
554144
|
-
});
|
|
554145
|
-
|
|
554146
|
-
// node_modules/@sema-agent/core/dist/core/runner/usage-accounting.js
|
|
554147
|
-
var init_usage_accounting = __esm({
|
|
554148
|
-
"node_modules/@sema-agent/core/dist/core/runner/usage-accounting.js"() {
|
|
554149
|
-
init_pricing();
|
|
554150
|
-
}
|
|
554151
|
-
});
|
|
554152
|
-
|
|
554153
|
-
// node_modules/@sema-agent/core/dist/core/runner/prompt-suggestions.js
|
|
554154
|
-
var init_prompt_suggestions = __esm({
|
|
554155
|
-
"node_modules/@sema-agent/core/dist/core/runner/prompt-suggestions.js"() {
|
|
554156
|
-
init_runtime();
|
|
554157
|
-
init_usage_accounting();
|
|
554158
|
-
init_untrusted_text();
|
|
554159
|
-
}
|
|
554160
|
-
});
|
|
554161
|
-
|
|
554162
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/scope-contract.js
|
|
554163
|
-
var FATAL_UTF8;
|
|
554164
|
-
var init_scope_contract = __esm({
|
|
554165
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/scope-contract.js"() {
|
|
554166
|
-
FATAL_UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
554167
|
-
}
|
|
554168
|
-
});
|
|
554169
|
-
|
|
554170
|
-
// node_modules/@sema-agent/core/dist/core/memory.js
|
|
554171
|
-
var MAX_MEMORY_BYTES;
|
|
554172
|
-
var init_memory5 = __esm({
|
|
554173
|
-
"node_modules/@sema-agent/core/dist/core/memory.js"() {
|
|
554174
|
-
init_build3();
|
|
554175
|
-
init_harness();
|
|
554176
|
-
init_tools3();
|
|
554177
|
-
init_scope_contract();
|
|
554178
|
-
init_untrusted_text();
|
|
554179
|
-
MAX_MEMORY_BYTES = 100 * 1024;
|
|
554180
|
-
}
|
|
554181
|
-
});
|
|
554182
|
-
|
|
554183
|
-
// node_modules/@sema-agent/core/dist/core/runner/memory-consolidation.js
|
|
554184
|
-
var init_memory_consolidation = __esm({
|
|
554185
|
-
"node_modules/@sema-agent/core/dist/core/runner/memory-consolidation.js"() {
|
|
554186
|
-
init_memory5();
|
|
554187
|
-
init_runtime();
|
|
554188
|
-
init_usage_accounting();
|
|
554189
|
-
}
|
|
554190
|
-
});
|
|
554191
|
-
|
|
554192
|
-
// node_modules/@sema-agent/core/dist/core/consolidate-scope.js
|
|
554193
|
-
var init_consolidate_scope = __esm({
|
|
554194
|
-
"node_modules/@sema-agent/core/dist/core/consolidate-scope.js"() {
|
|
554195
|
-
init_memory5();
|
|
554196
|
-
init_memory_consolidation();
|
|
554197
|
-
}
|
|
554198
|
-
});
|
|
554199
|
-
|
|
554200
|
-
// node_modules/@sema-agent/core/dist/core/push-queue.js
|
|
554201
|
-
var init_push_queue = __esm({
|
|
554202
|
-
"node_modules/@sema-agent/core/dist/core/push-queue.js"() {
|
|
554203
|
-
}
|
|
554204
|
-
});
|
|
554205
|
-
|
|
554206
553930
|
// node_modules/@sema-agent/core/dist/core/session.js
|
|
554207
553931
|
var init_session4 = __esm({
|
|
554208
553932
|
"node_modules/@sema-agent/core/dist/core/session.js"() {
|
|
@@ -554214,263 +553938,6 @@ var init_session4 = __esm({
|
|
|
554214
553938
|
}
|
|
554215
553939
|
});
|
|
554216
553940
|
|
|
554217
|
-
// node_modules/@sema-agent/core/dist/core/session-store.js
|
|
554218
|
-
var DAY_MS2;
|
|
554219
|
-
var init_session_store = __esm({
|
|
554220
|
-
"node_modules/@sema-agent/core/dist/core/session-store.js"() {
|
|
554221
|
-
init_harness();
|
|
554222
|
-
init_session4();
|
|
554223
|
-
DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
554224
|
-
}
|
|
554225
|
-
});
|
|
554226
|
-
|
|
554227
|
-
// node_modules/@sema-agent/core/dist/core/runner/image.js
|
|
554228
|
-
var IMAGE_MAX_BYTES;
|
|
554229
|
-
var init_image = __esm({
|
|
554230
|
-
"node_modules/@sema-agent/core/dist/core/runner/image.js"() {
|
|
554231
|
-
IMAGE_MAX_BYTES = 20 * 1024 * 1024;
|
|
554232
|
-
}
|
|
554233
|
-
});
|
|
554234
|
-
|
|
554235
|
-
// node_modules/@sema-agent/core/dist/core/runner/synthetic-tools.js
|
|
554236
|
-
var OUTPUT_TOOL_NAME, REPORT_FINDING_SCHEMA, SKILL_CONTENT_MAX_CHARS;
|
|
554237
|
-
var init_synthetic_tools = __esm({
|
|
554238
|
-
"node_modules/@sema-agent/core/dist/core/runner/synthetic-tools.js"() {
|
|
554239
|
-
init_build3();
|
|
554240
|
-
init_tools3();
|
|
554241
|
-
OUTPUT_TOOL_NAME = "StructuredOutput";
|
|
554242
|
-
REPORT_FINDING_SCHEMA = typebox_exports.Object({
|
|
554243
|
-
file: typebox_exports.String({ description: "Repo-relative path of the file the finding is in" }),
|
|
554244
|
-
line: typebox_exports.Optional(typebox_exports.Integer({ description: "1-indexed line the finding anchors to" })),
|
|
554245
|
-
summary: typebox_exports.String({ description: "One-sentence statement of the defect" }),
|
|
554246
|
-
failure_scenario: typebox_exports.String({ description: "Concrete inputs/state \u2192 wrong output/crash" }),
|
|
554247
|
-
category: typebox_exports.Optional(typebox_exports.String({
|
|
554248
|
-
maxLength: 40,
|
|
554249
|
-
description: 'Short kebab-case slug of the finding type, e.g. "correctness", "simplification", "efficiency", "test-coverage"'
|
|
554250
|
-
})),
|
|
554251
|
-
verdict: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("CONFIRMED"), typebox_exports.Literal("PLAUSIBLE")], {
|
|
554252
|
-
description: "Set when a verify pass ran; absent on inline-only reviews"
|
|
554253
|
-
})),
|
|
554254
|
-
outcome: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("fixed"), typebox_exports.Literal("skipped"), typebox_exports.Literal("no_change_needed")], {
|
|
554255
|
-
description: "Set ONLY when re-reporting after applying fixes: what happened to this finding"
|
|
554256
|
-
}))
|
|
554257
|
-
});
|
|
554258
|
-
SKILL_CONTENT_MAX_CHARS = 1024 * 1024;
|
|
554259
|
-
}
|
|
554260
|
-
});
|
|
554261
|
-
|
|
554262
|
-
// node_modules/@sema-agent/core/dist/core/runner/assemble-result.js
|
|
554263
|
-
var init_assemble_result = __esm({
|
|
554264
|
-
"node_modules/@sema-agent/core/dist/core/runner/assemble-result.js"() {
|
|
554265
|
-
init_repetition();
|
|
554266
|
-
init_walltime();
|
|
554267
|
-
init_errors12();
|
|
554268
|
-
}
|
|
554269
|
-
});
|
|
554270
|
-
|
|
554271
|
-
// node_modules/@sema-agent/core/dist/core/present-plan-tool.js
|
|
554272
|
-
var PRESENT_PLAN_TOOL_NAME, ENTER_PLAN_MODE_DESCRIPTION, PRESENT_PLAN_DESCRIPTION;
|
|
554273
|
-
var init_present_plan_tool = __esm({
|
|
554274
|
-
"node_modules/@sema-agent/core/dist/core/present-plan-tool.js"() {
|
|
554275
|
-
init_build3();
|
|
554276
|
-
init_untrusted_text();
|
|
554277
|
-
PRESENT_PLAN_TOOL_NAME = "ExitPlanMode";
|
|
554278
|
-
ENTER_PLAN_MODE_DESCRIPTION = `Enter PLAN MODE (read-only): stop making changes and switch to exploration/planning. For the rest of this run, write/edit/mutating tool calls are REJECTED while read-only tools (Read, Grep, Glob, etc.) still work. When your plan is ready, call ${PRESENT_PLAN_TOOL_NAME} with it \u2014 the run PAUSES for a human to approve it, then continues (read-only lifted) so you can execute.
|
|
554279
|
-
|
|
554280
|
-
Use this tool proactively when you're about to start a non-trivial implementation task. If you would use AskUserQuestion to clarify the approach, use EnterPlanMode instead \u2014 getting alignment on the plan itself is the point.
|
|
554281
|
-
|
|
554282
|
-
## When to Use This Tool
|
|
554283
|
-
1. Non-trivial implementation work: the change involves real design decisions worth aligning on before code is written
|
|
554284
|
-
- Example: "Add a delete button to the user profile" \u2014 placement, confirmation UX, what the deletion cascades to
|
|
554285
|
-
- Example: "Update the error handling in the API" \u2014 which layers change, error shapes, retry semantics
|
|
554286
|
-
2. Significant architectural ambiguity: multiple reasonable approaches exist and the choice meaningfully affects the codebase
|
|
554287
|
-
- Example: "Add caching to the API" \u2014 Redis vs in-memory vs file-based
|
|
554288
|
-
- Example: "Add real-time updates" \u2014 WebSockets vs SSE vs polling
|
|
554289
|
-
3. Unclear requirements: you need to explore and clarify before you can make progress
|
|
554290
|
-
- Example: "Make the app faster" \u2014 need to profile and identify bottlenecks first
|
|
554291
|
-
4. High-impact or destructive restructuring: the work significantly restructures, migrates, or deletes existing code, and buy-in first reduces risk
|
|
554292
|
-
- Example: "Redesign the authentication system"
|
|
554293
|
-
|
|
554294
|
-
## When NOT to Use This Tool
|
|
554295
|
-
Skip plan mode only when there is genuinely nothing to align on:
|
|
554296
|
-
- Trivial fixes (e.g. fixing a typo, removing a stray console.log)
|
|
554297
|
-
- Pure research/exploration tasks \u2014 just read; no plan approval is needed
|
|
554298
|
-
|
|
554299
|
-
If unsure whether to use it, err on the side of planning - it's better to get alignment upfront than to redo work.
|
|
554300
|
-
|
|
554301
|
-
## Examples
|
|
554302
|
-
GOOD: "Add user authentication to the app" (genuinely ambiguous: session vs JWT, token storage, middleware). "Add a delete button to the user profile" (small but has real design decisions \u2014 align first). "Update the error handling in the API" (touches multiple layers; agree on the shape before rewriting). "Redesign the data pipeline" (major restructuring where the wrong approach wastes significant effort).
|
|
554303
|
-
BAD: "Fix the typo in the README" (trivial; nothing to align on). "Remove the leftover console.log in utils.js" (trivial cleanup). "How does the caching layer work?" (pure research \u2014 read and answer; no plan needed).`;
|
|
554304
|
-
PRESENT_PLAN_DESCRIPTION = [
|
|
554305
|
-
"Present your proposed PLAN for human approval BEFORE taking any action (CC plan-mode parity).",
|
|
554306
|
-
"Use this when you are in plan mode (read-only research): once you have explored enough and formed a concrete plan,",
|
|
554307
|
-
"provide the full plan here. The run PAUSES for a human to approve, edit, or reject it.",
|
|
554308
|
-
"IMPORTANT: only use this when the task requires planning the implementation steps of work that changes things;",
|
|
554309
|
-
"for research tasks (gathering information, reading files, understanding the codebase) do NOT use this tool.",
|
|
554310
|
-
'This tool inherently requests approval of your plan \u2014 do not separately ask "Is this plan okay?".',
|
|
554311
|
-
"Do NOT attempt edits / writes / mutating commands before the plan is approved \u2014 present the plan first.",
|
|
554312
|
-
"If the plan is approved, the run continues (and any read-only restriction is lifted) so you can execute it;",
|
|
554313
|
-
"if it is rejected or edited, follow the reviewer's feedback instead of the original plan."
|
|
554314
|
-
].join(" ");
|
|
554315
|
-
}
|
|
554316
|
-
});
|
|
554317
|
-
|
|
554318
|
-
// node_modules/@sema-agent/core/dist/core/runner/turn-attachments.js
|
|
554319
|
-
var ATTACHMENT_BYTE_CAP, EMPTY2, PLAN_MODE_FULL_BODY, PLAN_MODE_SPARSE_BODY;
|
|
554320
|
-
var init_turn_attachments = __esm({
|
|
554321
|
-
"node_modules/@sema-agent/core/dist/core/runner/turn-attachments.js"() {
|
|
554322
|
-
init_present_plan_tool();
|
|
554323
|
-
init_untrusted_text();
|
|
554324
|
-
init_synthetic_tools();
|
|
554325
|
-
ATTACHMENT_BYTE_CAP = 8 * 1024;
|
|
554326
|
-
EMPTY2 = Object.freeze([]);
|
|
554327
|
-
PLAN_MODE_FULL_BODY = `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received. Instead, you should: research and analyze with read-only tools, and when you have formed a concrete plan, present it with the ${PRESENT_PLAN_TOOL_NAME} tool for approval. That tool inherently requests plan approval \u2014 never ask for approval via plain text.`;
|
|
554328
|
-
PLAN_MODE_SPARSE_BODY = `Plan mode still active (see full instructions earlier in conversation). Read-only: no edits, commits, or config changes. When your plan is ready, present it with the ${PRESENT_PLAN_TOOL_NAME} tool for approval. Never ask about plan approval via plain text.`;
|
|
554329
|
-
}
|
|
554330
|
-
});
|
|
554331
|
-
|
|
554332
|
-
// node_modules/@sema-agent/core/dist/core/auto-mode.js
|
|
554333
|
-
var init_auto_mode = __esm({
|
|
554334
|
-
"node_modules/@sema-agent/core/dist/core/auto-mode.js"() {
|
|
554335
|
-
}
|
|
554336
|
-
});
|
|
554337
|
-
|
|
554338
|
-
// node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js
|
|
554339
|
-
var init_auto_mode_prompt_assets = __esm({
|
|
554340
|
-
"node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js"() {
|
|
554341
|
-
}
|
|
554342
|
-
});
|
|
554343
|
-
|
|
554344
|
-
// node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js
|
|
554345
|
-
var init_auto_mode_prompt = __esm({
|
|
554346
|
-
"node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js"() {
|
|
554347
|
-
init_auto_mode_prompt_assets();
|
|
554348
|
-
init_untrusted_text();
|
|
554349
|
-
}
|
|
554350
|
-
});
|
|
554351
|
-
|
|
554352
|
-
// node_modules/@sema-agent/core/dist/core/mcp.js
|
|
554353
|
-
import { tmpdir as tmpdir15 } from "node:os";
|
|
554354
|
-
import { join as join167 } from "node:path";
|
|
554355
|
-
var MCP_IMAGE_MAX_BASE64, IMAGE_TARGET_RAW_SIZE3, MCP_BLOB_DIR;
|
|
554356
|
-
var init_mcp5 = __esm({
|
|
554357
|
-
"node_modules/@sema-agent/core/dist/core/mcp.js"() {
|
|
554358
|
-
init_client5();
|
|
554359
|
-
init_stdio3();
|
|
554360
|
-
init_streamableHttp();
|
|
554361
|
-
init_types9();
|
|
554362
|
-
init_tool_errors();
|
|
554363
|
-
init_untrusted_text();
|
|
554364
|
-
MCP_IMAGE_MAX_BASE64 = 5 * 1024 * 1024;
|
|
554365
|
-
IMAGE_TARGET_RAW_SIZE3 = MCP_IMAGE_MAX_BASE64 * 3 / 4;
|
|
554366
|
-
MCP_BLOB_DIR = join167(tmpdir15(), "sema-mcp-blobs");
|
|
554367
|
-
}
|
|
554368
|
-
});
|
|
554369
|
-
|
|
554370
|
-
// node_modules/@sema-agent/core/dist/core/memory-recall.js
|
|
554371
|
-
var ONE_DAY_MS, ONE_WEEK_MS, ONE_MONTH_MS;
|
|
554372
|
-
var init_memory_recall = __esm({
|
|
554373
|
-
"node_modules/@sema-agent/core/dist/core/memory-recall.js"() {
|
|
554374
|
-
init_build3();
|
|
554375
|
-
init_untrusted_text();
|
|
554376
|
-
ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
554377
|
-
ONE_WEEK_MS = 7 * ONE_DAY_MS;
|
|
554378
|
-
ONE_MONTH_MS = 30.44 * ONE_DAY_MS;
|
|
554379
|
-
}
|
|
554380
|
-
});
|
|
554381
|
-
|
|
554382
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/frontmatter.js
|
|
554383
|
-
var init_frontmatter = __esm({
|
|
554384
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/frontmatter.js"() {
|
|
554385
|
-
}
|
|
554386
|
-
});
|
|
554387
|
-
|
|
554388
|
-
// node_modules/@sema-agent/core/dist/core/memory-vector.js
|
|
554389
|
-
var init_memory_vector = __esm({
|
|
554390
|
-
"node_modules/@sema-agent/core/dist/core/memory-vector.js"() {
|
|
554391
|
-
}
|
|
554392
|
-
});
|
|
554393
|
-
|
|
554394
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/layout.js
|
|
554395
|
-
var init_layout = __esm({
|
|
554396
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/layout.js"() {
|
|
554397
|
-
}
|
|
554398
|
-
});
|
|
554399
|
-
|
|
554400
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/scan.js
|
|
554401
|
-
var init_scan = __esm({
|
|
554402
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/scan.js"() {
|
|
554403
|
-
init_memory5();
|
|
554404
|
-
init_untrusted_text();
|
|
554405
|
-
}
|
|
554406
|
-
});
|
|
554407
|
-
|
|
554408
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/file-backend.js
|
|
554409
|
-
var init_file_backend = __esm({
|
|
554410
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/file-backend.js"() {
|
|
554411
|
-
init_memory_vector();
|
|
554412
|
-
init_memory5();
|
|
554413
|
-
init_untrusted_text();
|
|
554414
|
-
init_frontmatter();
|
|
554415
|
-
init_layout();
|
|
554416
|
-
init_scan();
|
|
554417
|
-
}
|
|
554418
|
-
});
|
|
554419
|
-
|
|
554420
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/engine.js
|
|
554421
|
-
var MEMORY_INDEX_MAX_BYTES;
|
|
554422
|
-
var init_engine4 = __esm({
|
|
554423
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/engine.js"() {
|
|
554424
|
-
init_harness();
|
|
554425
|
-
init_memory5();
|
|
554426
|
-
init_untrusted_text();
|
|
554427
|
-
init_memory_recall();
|
|
554428
|
-
init_frontmatter();
|
|
554429
|
-
init_file_backend();
|
|
554430
|
-
init_layout();
|
|
554431
|
-
init_scan();
|
|
554432
|
-
MEMORY_INDEX_MAX_BYTES = 25 * 1024;
|
|
554433
|
-
}
|
|
554434
|
-
});
|
|
554435
|
-
|
|
554436
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js
|
|
554437
|
-
var init_dual_root = __esm({
|
|
554438
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js"() {
|
|
554439
|
-
init_scope_contract();
|
|
554440
|
-
}
|
|
554441
|
-
});
|
|
554442
|
-
|
|
554443
|
-
// node_modules/@sema-agent/core/dist/core/runner/tool-disclosure.js
|
|
554444
|
-
var EMPTY_PARAMS;
|
|
554445
|
-
var init_tool_disclosure = __esm({
|
|
554446
|
-
"node_modules/@sema-agent/core/dist/core/runner/tool-disclosure.js"() {
|
|
554447
|
-
init_build3();
|
|
554448
|
-
init_tools3();
|
|
554449
|
-
EMPTY_PARAMS = typebox_exports.Object({});
|
|
554450
|
-
}
|
|
554451
|
-
});
|
|
554452
|
-
|
|
554453
|
-
// node_modules/@sema-agent/core/dist/core/tool-result-store.js
|
|
554454
|
-
var init_tool_result_store = __esm({
|
|
554455
|
-
"node_modules/@sema-agent/core/dist/core/tool-result-store.js"() {
|
|
554456
|
-
init_build3();
|
|
554457
|
-
init_tools3();
|
|
554458
|
-
}
|
|
554459
|
-
});
|
|
554460
|
-
|
|
554461
|
-
// node_modules/@sema-agent/core/dist/agents/tool-filter.js
|
|
554462
|
-
var init_tool_filter = __esm({
|
|
554463
|
-
"node_modules/@sema-agent/core/dist/agents/tool-filter.js"() {
|
|
554464
|
-
init_tool_name_aliases();
|
|
554465
|
-
}
|
|
554466
|
-
});
|
|
554467
|
-
|
|
554468
|
-
// node_modules/@sema-agent/core/dist/agents/builtin-agents.js
|
|
554469
|
-
var init_builtin_agents = __esm({
|
|
554470
|
-
"node_modules/@sema-agent/core/dist/agents/builtin-agents.js"() {
|
|
554471
|
-
}
|
|
554472
|
-
});
|
|
554473
|
-
|
|
554474
553941
|
// node_modules/@sema-agent/core/dist/agents/suspend-guard.js
|
|
554475
553942
|
var init_suspend_guard = __esm({
|
|
554476
553943
|
"node_modules/@sema-agent/core/dist/agents/suspend-guard.js"() {
|
|
@@ -554509,23 +553976,50 @@ var init_workflow_run_store = __esm({
|
|
|
554509
553976
|
}
|
|
554510
553977
|
});
|
|
554511
553978
|
|
|
553979
|
+
// node_modules/@sema-agent/core/dist/core/arg-summary.js
|
|
553980
|
+
function scrubSecrets(s) {
|
|
553981
|
+
let out6 = s;
|
|
553982
|
+
for (const p of SECRET_PATTERNS)
|
|
553983
|
+
out6 = out6.replace(p, "[redacted]");
|
|
553984
|
+
return out6;
|
|
553985
|
+
}
|
|
553986
|
+
var SECRET_PATTERNS;
|
|
553987
|
+
var init_arg_summary = __esm({
|
|
553988
|
+
"node_modules/@sema-agent/core/dist/core/arg-summary.js"() {
|
|
553989
|
+
SECRET_PATTERNS = [
|
|
553990
|
+
/(?:sk|pk|rk|gh[opsur])[-_][A-Za-z0-9_-]{8,}/gi,
|
|
553991
|
+
/AIza[A-Za-z0-9_-]{20,}/g,
|
|
553992
|
+
/xox[baprs]-[A-Za-z0-9-]{10,}/gi,
|
|
553993
|
+
/AKIA[0-9A-Z]{12,}/g,
|
|
553994
|
+
/eyJ[A-Za-z0-9._-]{20,}/g,
|
|
553995
|
+
/-----BEGIN[ A-Z]*PRIVATE KEY-----/g,
|
|
553996
|
+
/Bearer\s+[A-Za-z0-9._~+/-]{8,}=*/gi,
|
|
553997
|
+
/(?:token|secret|key|password|passwd|credential|authorization)["']?\s*[=:]\s*["']?[^\s"';|&]{4,}/gi
|
|
553998
|
+
];
|
|
553999
|
+
}
|
|
554000
|
+
});
|
|
554001
|
+
|
|
554512
554002
|
// node_modules/@sema-agent/core/dist/core/untrusted-egress.js
|
|
554513
|
-
function
|
|
554514
|
-
return s.replace(
|
|
554003
|
+
function redactSecrets3(s) {
|
|
554004
|
+
return scrubSecrets(s).replace(/(\w+:\/\/)(?:[^/\s"'@]*@)+/gi, "$1[redacted-credentials]@").replace(/([?&#](?:sig|signature|sas|code)=)[^&\s"'#]+/gi, "$1[redacted]");
|
|
554515
554005
|
}
|
|
554516
|
-
function
|
|
554006
|
+
function boundedString(value, max2, redact) {
|
|
554517
554007
|
let s;
|
|
554518
554008
|
try {
|
|
554519
554009
|
s = typeof value === "string" ? value : JSON.stringify(value) ?? String(value);
|
|
554520
554010
|
} catch {
|
|
554521
554011
|
s = "[unserializable result]";
|
|
554522
554012
|
}
|
|
554523
|
-
s =
|
|
554013
|
+
s = redact(s);
|
|
554524
554014
|
return s.length > max2 ? `${s.slice(0, max2)}\u2026[+${s.length - max2} chars]` : s;
|
|
554525
554015
|
}
|
|
554016
|
+
function boundedRedactedSummary(value, max2) {
|
|
554017
|
+
return boundedString(value, max2, redactSecrets3);
|
|
554018
|
+
}
|
|
554526
554019
|
var init_untrusted_egress = __esm({
|
|
554527
554020
|
"node_modules/@sema-agent/core/dist/core/untrusted-egress.js"() {
|
|
554528
554021
|
init_untrusted_text();
|
|
554022
|
+
init_arg_summary();
|
|
554529
554023
|
}
|
|
554530
554024
|
});
|
|
554531
554025
|
|
|
@@ -556319,6 +555813,17 @@ ${clipTaskOutput(handle.result, handle.outputFile)}` : "(no result text)"}`;
|
|
|
556319
555813
|
}
|
|
556320
555814
|
});
|
|
556321
555815
|
|
|
555816
|
+
// node_modules/@sema-agent/core/dist/brain/errors.js
|
|
555817
|
+
var BRAIN_ERROR_CODES, CODE_ALTERNATION, CODE_RE, CODE_PREFIX_RE;
|
|
555818
|
+
var init_errors12 = __esm({
|
|
555819
|
+
"node_modules/@sema-agent/core/dist/brain/errors.js"() {
|
|
555820
|
+
BRAIN_ERROR_CODES = ["auth", "rate_limit", "invalid_request", "server", "network", "http", "stream_torn", "refusal", "length_empty"];
|
|
555821
|
+
CODE_ALTERNATION = BRAIN_ERROR_CODES.join("|");
|
|
555822
|
+
CODE_RE = new RegExp(`^\\[(${CODE_ALTERNATION})\\]`);
|
|
555823
|
+
CODE_PREFIX_RE = new RegExp(`^\\[(?:${CODE_ALTERNATION})\\]\\s*`);
|
|
555824
|
+
}
|
|
555825
|
+
});
|
|
555826
|
+
|
|
556322
555827
|
// node_modules/@sema-agent/core/dist/agents/observer.js
|
|
556323
555828
|
var OBSERVER_EVENT_TAGS, TAG_ESCAPE_RE;
|
|
556324
555829
|
var init_observer = __esm({
|
|
@@ -556368,6 +555873,553 @@ var init_subagent = __esm({
|
|
|
556368
555873
|
}
|
|
556369
555874
|
});
|
|
556370
555875
|
|
|
555876
|
+
// node_modules/@sema-agent/core/dist/core/session-store.js
|
|
555877
|
+
var DAY_MS2;
|
|
555878
|
+
var init_session_store = __esm({
|
|
555879
|
+
"node_modules/@sema-agent/core/dist/core/session-store.js"() {
|
|
555880
|
+
init_harness();
|
|
555881
|
+
init_session4();
|
|
555882
|
+
DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
555883
|
+
}
|
|
555884
|
+
});
|
|
555885
|
+
|
|
555886
|
+
// node_modules/@sema-agent/core/dist/config/catalog.js
|
|
555887
|
+
var init_catalog = __esm({
|
|
555888
|
+
"node_modules/@sema-agent/core/dist/config/catalog.js"() {
|
|
555889
|
+
init_runtask();
|
|
555890
|
+
init_subagent();
|
|
555891
|
+
init_session_store();
|
|
555892
|
+
}
|
|
555893
|
+
});
|
|
555894
|
+
|
|
555895
|
+
// node_modules/@sema-agent/core/dist/prompt-assembly/event-registry.js
|
|
555896
|
+
var EVENT_PROMPT_REGISTRY;
|
|
555897
|
+
var init_event_registry = __esm({
|
|
555898
|
+
"node_modules/@sema-agent/core/dist/prompt-assembly/event-registry.js"() {
|
|
555899
|
+
EVENT_PROMPT_REGISTRY = new Map([
|
|
555900
|
+
{ kind: "todo_reminder", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#TODO_REMINDER_BASE" },
|
|
555901
|
+
{ kind: "task_reminder", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#TASK_REMINDER_BASE" },
|
|
555902
|
+
{ kind: "changed_files", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderChangedFiles" },
|
|
555903
|
+
{ kind: "plan_mode", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#PLAN_MODE_FULL_BODY" },
|
|
555904
|
+
{ kind: "date_change", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "always", rendererRef: "turn-attachments.ts#renderDateChange" },
|
|
555905
|
+
{ kind: "instructions_change", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", maxBytes: 512, defaultPolicy: "always", rendererRef: "turn-attachments.ts#renderInstructionsChange" },
|
|
555906
|
+
{ kind: "budget_usd", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderBudgetUsd" },
|
|
555907
|
+
{ kind: "background_tasks", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderBackgroundTasks" },
|
|
555908
|
+
{ kind: "tools_delta", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderToolsDelta" },
|
|
555909
|
+
{ kind: "agent_listing", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "on", rendererRef: "turn-attachments.ts#renderAgentListingDelta" },
|
|
555910
|
+
{ kind: "skills_listing", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "on", rendererRef: "turn-attachments.ts#renderSkillsListingDelta" },
|
|
555911
|
+
{ kind: "mcp_instructions", carrier: "message.user-prefix", trust: "external", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderMcpInstructionsDelta" },
|
|
555912
|
+
{ kind: "deadline_converge", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#deadline-t1" },
|
|
555913
|
+
{ kind: "deadline_deliver_now", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#deadline-t2" },
|
|
555914
|
+
{ kind: "deadline_finalize", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#buildFinalizeText" },
|
|
555915
|
+
{ kind: "final_verification", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#final-verification" }
|
|
555916
|
+
].map((e) => [e.kind, e]));
|
|
555917
|
+
}
|
|
555918
|
+
});
|
|
555919
|
+
|
|
555920
|
+
// node_modules/@sema-agent/core/dist/core/message-utils.js
|
|
555921
|
+
var init_message_utils = __esm({
|
|
555922
|
+
"node_modules/@sema-agent/core/dist/core/message-utils.js"() {
|
|
555923
|
+
}
|
|
555924
|
+
});
|
|
555925
|
+
|
|
555926
|
+
// node_modules/@sema-agent/core/dist/core/context-edit.js
|
|
555927
|
+
var init_context_edit = __esm({
|
|
555928
|
+
"node_modules/@sema-agent/core/dist/core/context-edit.js"() {
|
|
555929
|
+
init_harness();
|
|
555930
|
+
init_message_utils();
|
|
555931
|
+
}
|
|
555932
|
+
});
|
|
555933
|
+
|
|
555934
|
+
// node_modules/@sema-agent/core/dist/prompts/coordinator.js
|
|
555935
|
+
var TEAMMATE_COMMUNICATION_ADDENDUM;
|
|
555936
|
+
var init_coordinator = __esm({
|
|
555937
|
+
"node_modules/@sema-agent/core/dist/prompts/coordinator.js"() {
|
|
555938
|
+
TEAMMATE_COMMUNICATION_ADDENDUM = `# Agent Teammate Communication
|
|
555939
|
+
|
|
555940
|
+
IMPORTANT: You are running as a named agent in a team. To communicate, use the SendMessage tool \u2014 \`to: "main"\` sends an update to the spawning conversation; \`to: "<name>"\` reaches a teammate: a running teammate receives your message at its next turn, and a completed teammate is continued from its transcript.
|
|
555941
|
+
|
|
555942
|
+
Just writing a response in text is not visible to others on your team - you MUST use the SendMessage tool.
|
|
555943
|
+
|
|
555944
|
+
The user interacts primarily with the spawning conversation. Your work is coordinated through teammate messaging.`;
|
|
555945
|
+
}
|
|
555946
|
+
});
|
|
555947
|
+
|
|
555948
|
+
// node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js
|
|
555949
|
+
function harnessHeadText(inputs) {
|
|
555950
|
+
return harnessHeadLines(inputs.facts);
|
|
555951
|
+
}
|
|
555952
|
+
var CORE, MODE, SEMA_DEFAULT_PACK;
|
|
555953
|
+
var init_sema_default = __esm({
|
|
555954
|
+
"node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js"() {
|
|
555955
|
+
init_default6();
|
|
555956
|
+
init_supervisor();
|
|
555957
|
+
init_coordinator();
|
|
555958
|
+
init_simple_sections();
|
|
555959
|
+
CORE = {
|
|
555960
|
+
owner: "core",
|
|
555961
|
+
trust: "locked",
|
|
555962
|
+
mutability: "locked",
|
|
555963
|
+
cadence: "epoch",
|
|
555964
|
+
cacheClass: "prefix-stable",
|
|
555965
|
+
carrier: "system.block"
|
|
555966
|
+
};
|
|
555967
|
+
MODE = { ...CORE, trust: "operator", mutability: "selectable" };
|
|
555968
|
+
SEMA_DEFAULT_PACK = {
|
|
555969
|
+
packId: "sema-default@1",
|
|
555970
|
+
assemblyApi: 1,
|
|
555971
|
+
sections: [
|
|
555972
|
+
{
|
|
555973
|
+
id: "core/role.base",
|
|
555974
|
+
slot: "identity",
|
|
555975
|
+
rank: 100,
|
|
555976
|
+
owner: "deployment",
|
|
555977
|
+
trust: "operator",
|
|
555978
|
+
mutability: "replaceable",
|
|
555979
|
+
cadence: "epoch",
|
|
555980
|
+
cacheClass: "prefix-stable",
|
|
555981
|
+
carrier: "system.block",
|
|
555982
|
+
content: (i) => i.roleBase,
|
|
555983
|
+
legacyBlockId: "role.base"
|
|
555984
|
+
},
|
|
555985
|
+
{ id: "core/harness.head", slot: "harness", rank: 200, ...CORE, content: harnessHeadText, legacyBlockId: "harness.context" },
|
|
555986
|
+
{ id: "core/security.cyber-risk", slot: "security", rank: 210, ...CORE, content: () => CYBER_RISK, legacyBlockId: "harness.context" },
|
|
555987
|
+
{ id: "core/security.url-safety", slot: "security", rank: 220, ...CORE, content: () => URL_SAFETY, legacyBlockId: "harness.context" },
|
|
555988
|
+
{ id: "core/harness.tool-result-retention", slot: "harness", rank: 230, ...CORE, content: () => SUMMARIZE_TOOL_RESULTS, legacyBlockId: "harness.context" },
|
|
555989
|
+
{
|
|
555990
|
+
id: "core/harness.execution-environment",
|
|
555991
|
+
slot: "harness",
|
|
555992
|
+
rank: 240,
|
|
555993
|
+
...CORE,
|
|
555994
|
+
admit: (i) => i.facts.policyEnabled || i.facts.isolationEnabled,
|
|
555995
|
+
content: () => EXECUTION_ENVIRONMENT,
|
|
555996
|
+
legacyBlockId: "harness.context"
|
|
555997
|
+
},
|
|
555998
|
+
{ id: "core/simple.communicating", slot: "harness", rank: 250, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: (i) => i.facts.fableMitigations === true ? SIMPLE_COMMUNICATING_FABLE : SIMPLE_COMMUNICATING_LEAN, legacyBlockId: "harness.context" },
|
|
555999
|
+
{ id: "core/simple.pronouns", slot: "harness", rank: 252, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_PRONOUNS, legacyBlockId: "harness.context" },
|
|
556000
|
+
{ id: "core/simple.action-caution", slot: "harness", rank: 254, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_ACTION_CAUTION, legacyBlockId: "harness.context" },
|
|
556001
|
+
{ id: "core/simple.task-continuity", slot: "harness", rank: 256, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_TASK_CONTINUITY, legacyBlockId: "harness.context" },
|
|
556002
|
+
{ id: "core/simple.tool-param-json", slot: "harness", rank: 258, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_TOOL_PARAM_JSON, legacyBlockId: "harness.context" },
|
|
556003
|
+
{ id: "core/simple.investigate-first", slot: "harness", rank: 260, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_INVESTIGATE_FIRST, legacyBlockId: "harness.context" },
|
|
556004
|
+
{ id: "core/simple.context-management", slot: "harness", rank: 262, ...CORE, admit: (i) => i.facts.promptProfile !== "classic" && i.facts.withinTaskCompactionEnabled, content: () => SIMPLE_CONTEXT_MANAGEMENT, legacyBlockId: "harness.context" },
|
|
556005
|
+
{ id: "core/simple.act-dont-rederive", slot: "harness", rank: 264, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_ACT_DONT_REDERIVE, legacyBlockId: "harness.context" },
|
|
556006
|
+
{ id: "core/simple.autonomy", slot: "harness", rank: 266, ...CORE, admit: (i) => i.facts.promptProfile !== "classic" && i.facts.fableMitigations === true, content: () => SIMPLE_AUTONOMY_FABLE, legacyBlockId: "harness.context" },
|
|
556007
|
+
{ id: "core/sema.verify-fresh", slot: "harness", rank: 268, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SEMA_VERIFY_FRESH, legacyBlockId: "harness.context" },
|
|
556008
|
+
{ id: "core/sema.evidence-audit", slot: "harness", rank: 270, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SEMA_EVIDENCE_AUDIT, legacyBlockId: "harness.context" },
|
|
556009
|
+
{ id: "core/mode.supervisor", slot: "mode", rank: 300, ...MODE, admit: (i) => i.facts.supervisorEnabled, content: () => SUPERVISOR_PROMPT, legacyBlockId: "mode.supervisor" },
|
|
556010
|
+
{ id: "core/mode.orchestration", slot: "mode", rank: 310, ...MODE, admit: (i) => i.facts.orchestrationEnabled, content: (i) => i.facts.orchestrationDeferred === true ? ORCHESTRATION_GUIDANCE_DEFERRED : ORCHESTRATION_GUIDANCE, legacyBlockId: "mode.orchestration" },
|
|
556011
|
+
{ id: "core/mode.awareness", slot: "mode", rank: 320, ...MODE, admit: (i) => i.facts.awarenessEnabled, content: () => ORCHESTRATION_AWARENESS, legacyBlockId: "mode.awareness" },
|
|
556012
|
+
{ id: "core/mode.worktree", slot: "mode", rank: 330, ...MODE, admit: (i) => i.facts.worktreeIsolated, content: () => WORKTREE_NOTICE, legacyBlockId: "mode.worktree" },
|
|
556013
|
+
{ id: "core/mode.goal", slot: "mode", rank: 340, ...MODE, admit: (i) => i.facts.goalEnabled, content: () => GOAL_COMPLETION_GUIDANCE, legacyBlockId: "mode.goal" },
|
|
556014
|
+
{
|
|
556015
|
+
id: "core/role.append",
|
|
556016
|
+
slot: "scenario",
|
|
556017
|
+
rank: 400,
|
|
556018
|
+
owner: "deployment",
|
|
556019
|
+
trust: "operator",
|
|
556020
|
+
mutability: "append-only",
|
|
556021
|
+
cadence: "epoch",
|
|
556022
|
+
cacheClass: "prefix-stable",
|
|
556023
|
+
carrier: "system.block",
|
|
556024
|
+
content: (i) => i.roleAppend,
|
|
556025
|
+
legacyBlockId: "role.append"
|
|
556026
|
+
},
|
|
556027
|
+
{ id: "core/mode.teammate", slot: "scenario", rank: 405, ...CORE, admit: (i) => i.facts.teammateEnabled, content: () => TEAMMATE_COMMUNICATION_ADDENDUM, legacyBlockId: "mode.teammate" },
|
|
556028
|
+
{
|
|
556029
|
+
id: "core/discovery.mcp-instructions",
|
|
556030
|
+
slot: "discovery",
|
|
556031
|
+
rank: 500,
|
|
556032
|
+
owner: "extension",
|
|
556033
|
+
trust: "external",
|
|
556034
|
+
mutability: "locked",
|
|
556035
|
+
cadence: "epoch",
|
|
556036
|
+
cacheClass: "prefix-stable",
|
|
556037
|
+
carrier: "system.block",
|
|
556038
|
+
content: (i) => i.mcpInstructionsBlock,
|
|
556039
|
+
legacyBlockId: "mcp.instructions"
|
|
556040
|
+
},
|
|
556041
|
+
{
|
|
556042
|
+
id: "core/environment.context",
|
|
556043
|
+
slot: "environment",
|
|
556044
|
+
rank: 600,
|
|
556045
|
+
owner: "core",
|
|
556046
|
+
trust: "locked",
|
|
556047
|
+
mutability: "locked",
|
|
556048
|
+
cadence: "run",
|
|
556049
|
+
cacheClass: "volatile",
|
|
556050
|
+
carrier: "system.block",
|
|
556051
|
+
content: (i) => i.environmentBlock,
|
|
556052
|
+
legacyBlockId: "env.context"
|
|
556053
|
+
},
|
|
556054
|
+
{
|
|
556055
|
+
id: "core/memory.tail",
|
|
556056
|
+
slot: "memory",
|
|
556057
|
+
rank: 700,
|
|
556058
|
+
owner: "session",
|
|
556059
|
+
trust: "user-derived",
|
|
556060
|
+
mutability: "locked",
|
|
556061
|
+
cadence: "run",
|
|
556062
|
+
cacheClass: "volatile",
|
|
556063
|
+
carrier: "system.block",
|
|
556064
|
+
content: (i) => i.memoryBlock,
|
|
556065
|
+
legacyBlockId: "memory.tail"
|
|
556066
|
+
},
|
|
556067
|
+
{
|
|
556068
|
+
id: "core/behavior.model-guidance",
|
|
556069
|
+
slot: "behavior",
|
|
556070
|
+
rank: 450,
|
|
556071
|
+
owner: "core",
|
|
556072
|
+
trust: "operator",
|
|
556073
|
+
mutability: "selectable",
|
|
556074
|
+
cadence: "epoch",
|
|
556075
|
+
cacheClass: "prefix-stable",
|
|
556076
|
+
carrier: "system.block",
|
|
556077
|
+
content: (i) => i.modelGuidance,
|
|
556078
|
+
legacyBlockId: "model.guidance"
|
|
556079
|
+
}
|
|
556080
|
+
]
|
|
556081
|
+
};
|
|
556082
|
+
}
|
|
556083
|
+
});
|
|
556084
|
+
|
|
556085
|
+
// node_modules/@sema-agent/core/dist/core/runtime.js
|
|
556086
|
+
var init_runtime = __esm({
|
|
556087
|
+
"node_modules/@sema-agent/core/dist/core/runtime.js"() {
|
|
556088
|
+
}
|
|
556089
|
+
});
|
|
556090
|
+
|
|
556091
|
+
// node_modules/@sema-agent/core/dist/core/auto-compaction.js
|
|
556092
|
+
var init_auto_compaction = __esm({
|
|
556093
|
+
"node_modules/@sema-agent/core/dist/core/auto-compaction.js"() {
|
|
556094
|
+
init_harness();
|
|
556095
|
+
init_context_edit();
|
|
556096
|
+
init_epoch();
|
|
556097
|
+
init_sema_default();
|
|
556098
|
+
init_runtime();
|
|
556099
|
+
init_untrusted_text();
|
|
556100
|
+
}
|
|
556101
|
+
});
|
|
556102
|
+
|
|
556103
|
+
// node_modules/@sema-agent/core/dist/core/pricing.js
|
|
556104
|
+
var init_pricing = __esm({
|
|
556105
|
+
"node_modules/@sema-agent/core/dist/core/pricing.js"() {
|
|
556106
|
+
}
|
|
556107
|
+
});
|
|
556108
|
+
|
|
556109
|
+
// node_modules/@sema-agent/core/dist/core/trace.js
|
|
556110
|
+
var init_trace = __esm({
|
|
556111
|
+
"node_modules/@sema-agent/core/dist/core/trace.js"() {
|
|
556112
|
+
}
|
|
556113
|
+
});
|
|
556114
|
+
|
|
556115
|
+
// node_modules/@sema-agent/core/dist/core/task-outcome.js
|
|
556116
|
+
var init_task_outcome = __esm({
|
|
556117
|
+
"node_modules/@sema-agent/core/dist/core/task-outcome.js"() {
|
|
556118
|
+
}
|
|
556119
|
+
});
|
|
556120
|
+
|
|
556121
|
+
// node_modules/@sema-agent/core/dist/brain/repetition.js
|
|
556122
|
+
var init_repetition = __esm({
|
|
556123
|
+
"node_modules/@sema-agent/core/dist/brain/repetition.js"() {
|
|
556124
|
+
}
|
|
556125
|
+
});
|
|
556126
|
+
|
|
556127
|
+
// node_modules/@sema-agent/core/dist/brain/walltime.js
|
|
556128
|
+
var init_walltime = __esm({
|
|
556129
|
+
"node_modules/@sema-agent/core/dist/brain/walltime.js"() {
|
|
556130
|
+
}
|
|
556131
|
+
});
|
|
556132
|
+
|
|
556133
|
+
// node_modules/@sema-agent/core/dist/brain/reasoning.js
|
|
556134
|
+
var init_reasoning = __esm({
|
|
556135
|
+
"node_modules/@sema-agent/core/dist/brain/reasoning.js"() {
|
|
556136
|
+
}
|
|
556137
|
+
});
|
|
556138
|
+
|
|
556139
|
+
// node_modules/@sema-agent/core/dist/internal/llm.js
|
|
556140
|
+
var init_llm2 = __esm({
|
|
556141
|
+
"node_modules/@sema-agent/core/dist/internal/llm.js"() {
|
|
556142
|
+
init_llm();
|
|
556143
|
+
}
|
|
556144
|
+
});
|
|
556145
|
+
|
|
556146
|
+
// node_modules/@sema-agent/core/dist/brain/status-sink.js
|
|
556147
|
+
import { AsyncLocalStorage as AsyncLocalStorage7 } from "node:async_hooks";
|
|
556148
|
+
var statusSinkStore, telemetrySinkStore;
|
|
556149
|
+
var init_status_sink = __esm({
|
|
556150
|
+
"node_modules/@sema-agent/core/dist/brain/status-sink.js"() {
|
|
556151
|
+
statusSinkStore = new AsyncLocalStorage7();
|
|
556152
|
+
telemetrySinkStore = new AsyncLocalStorage7();
|
|
556153
|
+
}
|
|
556154
|
+
});
|
|
556155
|
+
|
|
556156
|
+
// node_modules/@sema-agent/core/dist/brain/circuit-breaker.js
|
|
556157
|
+
var init_circuit_breaker = __esm({
|
|
556158
|
+
"node_modules/@sema-agent/core/dist/brain/circuit-breaker.js"() {
|
|
556159
|
+
init_llm2();
|
|
556160
|
+
init_errors12();
|
|
556161
|
+
init_status_sink();
|
|
556162
|
+
}
|
|
556163
|
+
});
|
|
556164
|
+
|
|
556165
|
+
// node_modules/@sema-agent/core/dist/brain/degrading.js
|
|
556166
|
+
var init_degrading = __esm({
|
|
556167
|
+
"node_modules/@sema-agent/core/dist/brain/degrading.js"() {
|
|
556168
|
+
init_llm2();
|
|
556169
|
+
init_errors12();
|
|
556170
|
+
init_circuit_breaker();
|
|
556171
|
+
}
|
|
556172
|
+
});
|
|
556173
|
+
|
|
556174
|
+
// node_modules/@sema-agent/core/dist/core/runner/usage-accounting.js
|
|
556175
|
+
var init_usage_accounting = __esm({
|
|
556176
|
+
"node_modules/@sema-agent/core/dist/core/runner/usage-accounting.js"() {
|
|
556177
|
+
init_pricing();
|
|
556178
|
+
}
|
|
556179
|
+
});
|
|
556180
|
+
|
|
556181
|
+
// node_modules/@sema-agent/core/dist/core/runner/prompt-suggestions.js
|
|
556182
|
+
var init_prompt_suggestions = __esm({
|
|
556183
|
+
"node_modules/@sema-agent/core/dist/core/runner/prompt-suggestions.js"() {
|
|
556184
|
+
init_runtime();
|
|
556185
|
+
init_usage_accounting();
|
|
556186
|
+
init_untrusted_text();
|
|
556187
|
+
}
|
|
556188
|
+
});
|
|
556189
|
+
|
|
556190
|
+
// node_modules/@sema-agent/core/dist/core/memory-engine/scope-contract.js
|
|
556191
|
+
var FATAL_UTF8;
|
|
556192
|
+
var init_scope_contract = __esm({
|
|
556193
|
+
"node_modules/@sema-agent/core/dist/core/memory-engine/scope-contract.js"() {
|
|
556194
|
+
FATAL_UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
556195
|
+
}
|
|
556196
|
+
});
|
|
556197
|
+
|
|
556198
|
+
// node_modules/@sema-agent/core/dist/core/memory.js
|
|
556199
|
+
var MAX_MEMORY_BYTES;
|
|
556200
|
+
var init_memory5 = __esm({
|
|
556201
|
+
"node_modules/@sema-agent/core/dist/core/memory.js"() {
|
|
556202
|
+
init_build3();
|
|
556203
|
+
init_harness();
|
|
556204
|
+
init_tools3();
|
|
556205
|
+
init_scope_contract();
|
|
556206
|
+
init_untrusted_text();
|
|
556207
|
+
MAX_MEMORY_BYTES = 100 * 1024;
|
|
556208
|
+
}
|
|
556209
|
+
});
|
|
556210
|
+
|
|
556211
|
+
// node_modules/@sema-agent/core/dist/core/runner/memory-consolidation.js
|
|
556212
|
+
var init_memory_consolidation = __esm({
|
|
556213
|
+
"node_modules/@sema-agent/core/dist/core/runner/memory-consolidation.js"() {
|
|
556214
|
+
init_memory5();
|
|
556215
|
+
init_runtime();
|
|
556216
|
+
init_usage_accounting();
|
|
556217
|
+
}
|
|
556218
|
+
});
|
|
556219
|
+
|
|
556220
|
+
// node_modules/@sema-agent/core/dist/core/consolidate-scope.js
|
|
556221
|
+
var init_consolidate_scope = __esm({
|
|
556222
|
+
"node_modules/@sema-agent/core/dist/core/consolidate-scope.js"() {
|
|
556223
|
+
init_memory5();
|
|
556224
|
+
init_memory_consolidation();
|
|
556225
|
+
}
|
|
556226
|
+
});
|
|
556227
|
+
|
|
556228
|
+
// node_modules/@sema-agent/core/dist/core/push-queue.js
|
|
556229
|
+
var init_push_queue = __esm({
|
|
556230
|
+
"node_modules/@sema-agent/core/dist/core/push-queue.js"() {
|
|
556231
|
+
}
|
|
556232
|
+
});
|
|
556233
|
+
|
|
556234
|
+
// node_modules/@sema-agent/core/dist/core/runner/image.js
|
|
556235
|
+
var IMAGE_MAX_BYTES;
|
|
556236
|
+
var init_image = __esm({
|
|
556237
|
+
"node_modules/@sema-agent/core/dist/core/runner/image.js"() {
|
|
556238
|
+
IMAGE_MAX_BYTES = 20 * 1024 * 1024;
|
|
556239
|
+
}
|
|
556240
|
+
});
|
|
556241
|
+
|
|
556242
|
+
// node_modules/@sema-agent/core/dist/core/runner/assemble-result.js
|
|
556243
|
+
var init_assemble_result = __esm({
|
|
556244
|
+
"node_modules/@sema-agent/core/dist/core/runner/assemble-result.js"() {
|
|
556245
|
+
init_repetition();
|
|
556246
|
+
init_walltime();
|
|
556247
|
+
init_errors12();
|
|
556248
|
+
}
|
|
556249
|
+
});
|
|
556250
|
+
|
|
556251
|
+
// node_modules/@sema-agent/core/dist/core/present-plan-tool.js
|
|
556252
|
+
var PRESENT_PLAN_TOOL_NAME, ENTER_PLAN_MODE_DESCRIPTION, PRESENT_PLAN_DESCRIPTION;
|
|
556253
|
+
var init_present_plan_tool = __esm({
|
|
556254
|
+
"node_modules/@sema-agent/core/dist/core/present-plan-tool.js"() {
|
|
556255
|
+
init_build3();
|
|
556256
|
+
init_untrusted_text();
|
|
556257
|
+
PRESENT_PLAN_TOOL_NAME = "ExitPlanMode";
|
|
556258
|
+
ENTER_PLAN_MODE_DESCRIPTION = `Enter PLAN MODE (read-only): stop making changes and switch to exploration/planning. For the rest of this run, write/edit/mutating tool calls are REJECTED while read-only tools (Read, Grep, Glob, etc.) still work. When your plan is ready, call ${PRESENT_PLAN_TOOL_NAME} with it \u2014 the run PAUSES for a human to approve it, then continues (read-only lifted) so you can execute.
|
|
556259
|
+
|
|
556260
|
+
Use this tool proactively when you're about to start a non-trivial implementation task. If you would use AskUserQuestion to clarify the approach, use EnterPlanMode instead \u2014 getting alignment on the plan itself is the point.
|
|
556261
|
+
|
|
556262
|
+
## When to Use This Tool
|
|
556263
|
+
1. Non-trivial implementation work: the change involves real design decisions worth aligning on before code is written
|
|
556264
|
+
- Example: "Add a delete button to the user profile" \u2014 placement, confirmation UX, what the deletion cascades to
|
|
556265
|
+
- Example: "Update the error handling in the API" \u2014 which layers change, error shapes, retry semantics
|
|
556266
|
+
2. Significant architectural ambiguity: multiple reasonable approaches exist and the choice meaningfully affects the codebase
|
|
556267
|
+
- Example: "Add caching to the API" \u2014 Redis vs in-memory vs file-based
|
|
556268
|
+
- Example: "Add real-time updates" \u2014 WebSockets vs SSE vs polling
|
|
556269
|
+
3. Unclear requirements: you need to explore and clarify before you can make progress
|
|
556270
|
+
- Example: "Make the app faster" \u2014 need to profile and identify bottlenecks first
|
|
556271
|
+
4. High-impact or destructive restructuring: the work significantly restructures, migrates, or deletes existing code, and buy-in first reduces risk
|
|
556272
|
+
- Example: "Redesign the authentication system"
|
|
556273
|
+
|
|
556274
|
+
## When NOT to Use This Tool
|
|
556275
|
+
Skip plan mode only when there is genuinely nothing to align on:
|
|
556276
|
+
- Trivial fixes (e.g. fixing a typo, removing a stray console.log)
|
|
556277
|
+
- Pure research/exploration tasks \u2014 just read; no plan approval is needed
|
|
556278
|
+
|
|
556279
|
+
If unsure whether to use it, err on the side of planning - it's better to get alignment upfront than to redo work.
|
|
556280
|
+
|
|
556281
|
+
## Examples
|
|
556282
|
+
GOOD: "Add user authentication to the app" (genuinely ambiguous: session vs JWT, token storage, middleware). "Add a delete button to the user profile" (small but has real design decisions \u2014 align first). "Update the error handling in the API" (touches multiple layers; agree on the shape before rewriting). "Redesign the data pipeline" (major restructuring where the wrong approach wastes significant effort).
|
|
556283
|
+
BAD: "Fix the typo in the README" (trivial; nothing to align on). "Remove the leftover console.log in utils.js" (trivial cleanup). "How does the caching layer work?" (pure research \u2014 read and answer; no plan needed).`;
|
|
556284
|
+
PRESENT_PLAN_DESCRIPTION = [
|
|
556285
|
+
"Present your proposed PLAN for human approval BEFORE taking any action (CC plan-mode parity).",
|
|
556286
|
+
"Use this when you are in plan mode (read-only research): once you have explored enough and formed a concrete plan,",
|
|
556287
|
+
"provide the full plan here. The run PAUSES for a human to approve, edit, or reject it.",
|
|
556288
|
+
"IMPORTANT: only use this when the task requires planning the implementation steps of work that changes things;",
|
|
556289
|
+
"for research tasks (gathering information, reading files, understanding the codebase) do NOT use this tool.",
|
|
556290
|
+
'This tool inherently requests approval of your plan \u2014 do not separately ask "Is this plan okay?".',
|
|
556291
|
+
"Do NOT attempt edits / writes / mutating commands before the plan is approved \u2014 present the plan first.",
|
|
556292
|
+
"If the plan is approved, the run continues (and any read-only restriction is lifted) so you can execute it;",
|
|
556293
|
+
"if it is rejected or edited, follow the reviewer's feedback instead of the original plan."
|
|
556294
|
+
].join(" ");
|
|
556295
|
+
}
|
|
556296
|
+
});
|
|
556297
|
+
|
|
556298
|
+
// node_modules/@sema-agent/core/dist/core/runner/turn-attachments.js
|
|
556299
|
+
var ATTACHMENT_BYTE_CAP, EMPTY2, PLAN_MODE_FULL_BODY, PLAN_MODE_SPARSE_BODY;
|
|
556300
|
+
var init_turn_attachments = __esm({
|
|
556301
|
+
"node_modules/@sema-agent/core/dist/core/runner/turn-attachments.js"() {
|
|
556302
|
+
init_present_plan_tool();
|
|
556303
|
+
init_untrusted_text();
|
|
556304
|
+
init_synthetic_tools();
|
|
556305
|
+
ATTACHMENT_BYTE_CAP = 8 * 1024;
|
|
556306
|
+
EMPTY2 = Object.freeze([]);
|
|
556307
|
+
PLAN_MODE_FULL_BODY = `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received. Instead, you should: research and analyze with read-only tools, and when you have formed a concrete plan, present it with the ${PRESENT_PLAN_TOOL_NAME} tool for approval. That tool inherently requests plan approval \u2014 never ask for approval via plain text.`;
|
|
556308
|
+
PLAN_MODE_SPARSE_BODY = `Plan mode still active (see full instructions earlier in conversation). Read-only: no edits, commits, or config changes. When your plan is ready, present it with the ${PRESENT_PLAN_TOOL_NAME} tool for approval. Never ask about plan approval via plain text.`;
|
|
556309
|
+
}
|
|
556310
|
+
});
|
|
556311
|
+
|
|
556312
|
+
// node_modules/@sema-agent/core/dist/core/auto-mode.js
|
|
556313
|
+
var init_auto_mode = __esm({
|
|
556314
|
+
"node_modules/@sema-agent/core/dist/core/auto-mode.js"() {
|
|
556315
|
+
}
|
|
556316
|
+
});
|
|
556317
|
+
|
|
556318
|
+
// node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js
|
|
556319
|
+
var init_auto_mode_prompt_assets = __esm({
|
|
556320
|
+
"node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js"() {
|
|
556321
|
+
}
|
|
556322
|
+
});
|
|
556323
|
+
|
|
556324
|
+
// node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js
|
|
556325
|
+
var init_auto_mode_prompt = __esm({
|
|
556326
|
+
"node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js"() {
|
|
556327
|
+
init_auto_mode_prompt_assets();
|
|
556328
|
+
init_untrusted_text();
|
|
556329
|
+
}
|
|
556330
|
+
});
|
|
556331
|
+
|
|
556332
|
+
// node_modules/@sema-agent/core/dist/core/mcp.js
|
|
556333
|
+
import { tmpdir as tmpdir15 } from "node:os";
|
|
556334
|
+
import { join as join167 } from "node:path";
|
|
556335
|
+
var MCP_IMAGE_MAX_BASE64, IMAGE_TARGET_RAW_SIZE3, MCP_BLOB_DIR;
|
|
556336
|
+
var init_mcp5 = __esm({
|
|
556337
|
+
"node_modules/@sema-agent/core/dist/core/mcp.js"() {
|
|
556338
|
+
init_client5();
|
|
556339
|
+
init_stdio3();
|
|
556340
|
+
init_streamableHttp();
|
|
556341
|
+
init_types9();
|
|
556342
|
+
init_tool_errors();
|
|
556343
|
+
init_untrusted_text();
|
|
556344
|
+
MCP_IMAGE_MAX_BASE64 = 5 * 1024 * 1024;
|
|
556345
|
+
IMAGE_TARGET_RAW_SIZE3 = MCP_IMAGE_MAX_BASE64 * 3 / 4;
|
|
556346
|
+
MCP_BLOB_DIR = join167(tmpdir15(), "sema-mcp-blobs");
|
|
556347
|
+
}
|
|
556348
|
+
});
|
|
556349
|
+
|
|
556350
|
+
// node_modules/@sema-agent/core/dist/core/memory-recall.js
|
|
556351
|
+
var ONE_DAY_MS, ONE_WEEK_MS, ONE_MONTH_MS;
|
|
556352
|
+
var init_memory_recall = __esm({
|
|
556353
|
+
"node_modules/@sema-agent/core/dist/core/memory-recall.js"() {
|
|
556354
|
+
init_build3();
|
|
556355
|
+
init_untrusted_text();
|
|
556356
|
+
ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
556357
|
+
ONE_WEEK_MS = 7 * ONE_DAY_MS;
|
|
556358
|
+
ONE_MONTH_MS = 30.44 * ONE_DAY_MS;
|
|
556359
|
+
}
|
|
556360
|
+
});
|
|
556361
|
+
|
|
556362
|
+
// node_modules/@sema-agent/core/dist/core/memory-engine/frontmatter.js
|
|
556363
|
+
var init_frontmatter = __esm({
|
|
556364
|
+
"node_modules/@sema-agent/core/dist/core/memory-engine/frontmatter.js"() {
|
|
556365
|
+
}
|
|
556366
|
+
});
|
|
556367
|
+
|
|
556368
|
+
// node_modules/@sema-agent/core/dist/core/memory-vector.js
|
|
556369
|
+
var init_memory_vector = __esm({
|
|
556370
|
+
"node_modules/@sema-agent/core/dist/core/memory-vector.js"() {
|
|
556371
|
+
}
|
|
556372
|
+
});
|
|
556373
|
+
|
|
556374
|
+
// node_modules/@sema-agent/core/dist/core/memory-engine/layout.js
|
|
556375
|
+
var init_layout = __esm({
|
|
556376
|
+
"node_modules/@sema-agent/core/dist/core/memory-engine/layout.js"() {
|
|
556377
|
+
}
|
|
556378
|
+
});
|
|
556379
|
+
|
|
556380
|
+
// node_modules/@sema-agent/core/dist/core/memory-engine/scan.js
|
|
556381
|
+
var init_scan = __esm({
|
|
556382
|
+
"node_modules/@sema-agent/core/dist/core/memory-engine/scan.js"() {
|
|
556383
|
+
init_memory5();
|
|
556384
|
+
init_untrusted_text();
|
|
556385
|
+
}
|
|
556386
|
+
});
|
|
556387
|
+
|
|
556388
|
+
// node_modules/@sema-agent/core/dist/core/memory-engine/file-backend.js
|
|
556389
|
+
var init_file_backend = __esm({
|
|
556390
|
+
"node_modules/@sema-agent/core/dist/core/memory-engine/file-backend.js"() {
|
|
556391
|
+
init_memory_vector();
|
|
556392
|
+
init_memory5();
|
|
556393
|
+
init_untrusted_text();
|
|
556394
|
+
init_frontmatter();
|
|
556395
|
+
init_layout();
|
|
556396
|
+
init_scan();
|
|
556397
|
+
}
|
|
556398
|
+
});
|
|
556399
|
+
|
|
556400
|
+
// node_modules/@sema-agent/core/dist/core/memory-engine/engine.js
|
|
556401
|
+
var MEMORY_INDEX_MAX_BYTES;
|
|
556402
|
+
var init_engine4 = __esm({
|
|
556403
|
+
"node_modules/@sema-agent/core/dist/core/memory-engine/engine.js"() {
|
|
556404
|
+
init_harness();
|
|
556405
|
+
init_memory5();
|
|
556406
|
+
init_untrusted_text();
|
|
556407
|
+
init_memory_recall();
|
|
556408
|
+
init_frontmatter();
|
|
556409
|
+
init_file_backend();
|
|
556410
|
+
init_layout();
|
|
556411
|
+
init_scan();
|
|
556412
|
+
MEMORY_INDEX_MAX_BYTES = 25 * 1024;
|
|
556413
|
+
}
|
|
556414
|
+
});
|
|
556415
|
+
|
|
556416
|
+
// node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js
|
|
556417
|
+
var init_dual_root = __esm({
|
|
556418
|
+
"node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js"() {
|
|
556419
|
+
init_scope_contract();
|
|
556420
|
+
}
|
|
556421
|
+
});
|
|
556422
|
+
|
|
556371
556423
|
// node_modules/@sema-agent/core/dist/tools/fs/encoding.js
|
|
556372
556424
|
var init_encoding = __esm({
|
|
556373
556425
|
"node_modules/@sema-agent/core/dist/tools/fs/encoding.js"() {
|
|
@@ -556997,6 +557049,7 @@ var init_runtask = __esm({
|
|
|
556997
557049
|
init_checkpoint_store();
|
|
556998
557050
|
init_call_cap();
|
|
556999
557051
|
init_version3();
|
|
557052
|
+
init_catalog();
|
|
557000
557053
|
init_event_registry();
|
|
557001
557054
|
init_auto_compaction();
|
|
557002
557055
|
init_ask_question();
|
|
@@ -557962,6 +558015,7 @@ var init_dist9 = __esm({
|
|
|
557962
558015
|
init_workflow_journal_store();
|
|
557963
558016
|
init_untrusted_egress();
|
|
557964
558017
|
init_roster_store();
|
|
558018
|
+
init_catalog();
|
|
557965
558019
|
init_task_registry();
|
|
557966
558020
|
init_coordinator();
|
|
557967
558021
|
init_subagent();
|
|
@@ -654436,7 +654490,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
|
|
|
654436
654490
|
pendingHookMessages
|
|
654437
654491
|
}, renderAndRun);
|
|
654438
654492
|
}
|
|
654439
|
-
}).version("sema 1.0.
|
|
654493
|
+
}).version("sema 1.0.37", "-v, --version", "Output the version number");
|
|
654440
654494
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
654441
654495
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
654442
654496
|
if (canUserConfigureAdvisor()) {
|