@sema-agent/cli 1.0.34 → 1.0.36
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 +17 -17
- package/package.json +5 -5
- package/sema.js +708 -639
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 ? `
|
|
@@ -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 the background (runId ${parsed.runId}) \u2014 result arrives via notification / TaskOutput("${parsed.runId}")` : `${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
|
}
|
|
@@ -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:
|
|
479820
|
+
productVersion: "1.0.36",
|
|
479821
|
+
announcement: "sema 1.0.36 \u2014 workflow completion notices arrive exactly once, deferred-tool activation reads as one plain line, agent results keep real file paths for assertions, and schema docs cover union types."
|
|
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:
|
|
482755
|
+
productVersion: "1.0.36",
|
|
482756
|
+
announcement: "sema 1.0.36 \u2014 workflow completion notices arrive exactly once, deferred-tool activation reads as one plain line, agent results keep real file paths for assertions, and schema docs cover union types."
|
|
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
|
|
|
@@ -553630,7 +553693,7 @@ tool here.)`;
|
|
|
553630
553693
|
});
|
|
553631
553694
|
|
|
553632
553695
|
// node_modules/@sema-agent/core/dist/prompts/simple-sections.js
|
|
553633
|
-
var SIMPLE_COMMUNICATING_FABLE, SIMPLE_COMMUNICATING_LEAN, SIMPLE_ACTION_CAUTION, SIMPLE_TASK_CONTINUITY, SIMPLE_INVESTIGATE_FIRST, SIMPLE_CONTEXT_MANAGEMENT, SIMPLE_ACT_DONT_REDERIVE, SIMPLE_PRONOUNS, SIMPLE_TOOL_PARAM_JSON, SIMPLE_AUTONOMY_FABLE;
|
|
553696
|
+
var SIMPLE_COMMUNICATING_FABLE, SIMPLE_COMMUNICATING_LEAN, SIMPLE_ACTION_CAUTION, SIMPLE_TASK_CONTINUITY, SIMPLE_INVESTIGATE_FIRST, SIMPLE_CONTEXT_MANAGEMENT, SIMPLE_ACT_DONT_REDERIVE, SIMPLE_PRONOUNS, SIMPLE_TOOL_PARAM_JSON, SIMPLE_AUTONOMY_FABLE, SEMA_VERIFY_FRESH, SEMA_EVIDENCE_AUDIT;
|
|
553634
553697
|
var init_simple_sections = __esm({
|
|
553635
553698
|
"node_modules/@sema-agent/core/dist/prompts/simple-sections.js"() {
|
|
553636
553699
|
SIMPLE_COMMUNICATING_FABLE = `# Communicating with the user
|
|
@@ -553663,6 +553726,10 @@ Exception: when the user is describing a problem, asking a question, or thinking
|
|
|
553663
553726
|
Before ending your turn, check your last paragraph. If it is a plan, an analysis, a question, a list of next steps, or a promise about work you have not done ('I'll\u2026', 'let me know when\u2026'), do that work now with tool calls. That includes retrying after errors and gathering missing information yourself. Do not stop because the context or session is long. End your turn only when the task is complete or you are blocked on input only the user can provide.
|
|
553664
553727
|
|
|
553665
553728
|
Before running a command that changes system state \u2014 restarts, deletes, config edits \u2014 check that the evidence actually supports that specific action. A signal that pattern-matches to a known failure may have a different cause.`;
|
|
553729
|
+
SEMA_VERIFY_FRESH = `# Delivering work that outlives the session
|
|
553730
|
+
When a deliverable must work outside this session \u2014 an installed tool, a built artifact, a configured service \u2014 verify it the way a grader would: from a hermetic process that inherits none of your session state (e.g. \`env -i bash -c '...'\`), never only inside the shell where you exported variables or edited profile files. A login shell is NOT a clean check \u2014 it sources the same profiles you may have just written; use one only when a login shell is the deliverable's actual entry point, and never as the sole verification. Success that depends on your session state is not success. Prefer standard install locations over session-local paths, and leave the delivered state verified in the form it will actually be used.`;
|
|
553731
|
+
SEMA_EVIDENCE_AUDIT = `# Search hits are evidence
|
|
553732
|
+
In an audit or search task, treat every match as evidence until you have seen WHY it matched: when a hit's cause is not visible (a truncated line, a minified file), open the file at that location instead of dismissing the hit as a false positive. After you recover a concrete NON-SENSITIVE identifier (a hostname, an id, a config key), run one final literal search for that exact value across the whole target \u2014 the copies you did not predict are the ones that matter. For a SENSITIVE value (a credential, a token, a private key), never place it in a command argument or echo it in output: search by reading it from its source (e.g. a pattern file the shell never expands, or an in-process scan) and report locations and counts only.`;
|
|
553666
553733
|
}
|
|
553667
553734
|
});
|
|
553668
553735
|
|
|
@@ -553860,343 +553927,6 @@ An object or array parameter value must be a single JSON value \u2014 never writ
|
|
|
553860
553927
|
}
|
|
553861
553928
|
});
|
|
553862
553929
|
|
|
553863
|
-
// node_modules/@sema-agent/core/dist/prompts/coordinator.js
|
|
553864
|
-
var TEAMMATE_COMMUNICATION_ADDENDUM;
|
|
553865
|
-
var init_coordinator = __esm({
|
|
553866
|
-
"node_modules/@sema-agent/core/dist/prompts/coordinator.js"() {
|
|
553867
|
-
TEAMMATE_COMMUNICATION_ADDENDUM = `# Agent Teammate Communication
|
|
553868
|
-
|
|
553869
|
-
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.
|
|
553870
|
-
|
|
553871
|
-
Just writing a response in text is not visible to others on your team - you MUST use the SendMessage tool.
|
|
553872
|
-
|
|
553873
|
-
The user interacts primarily with the spawning conversation. Your work is coordinated through teammate messaging.`;
|
|
553874
|
-
}
|
|
553875
|
-
});
|
|
553876
|
-
|
|
553877
|
-
// node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js
|
|
553878
|
-
function harnessHeadText(inputs) {
|
|
553879
|
-
return harnessHeadLines(inputs.facts);
|
|
553880
|
-
}
|
|
553881
|
-
var CORE, MODE, SEMA_DEFAULT_PACK;
|
|
553882
|
-
var init_sema_default = __esm({
|
|
553883
|
-
"node_modules/@sema-agent/core/dist/prompt-assembly/packs/sema-default.js"() {
|
|
553884
|
-
init_default6();
|
|
553885
|
-
init_supervisor();
|
|
553886
|
-
init_coordinator();
|
|
553887
|
-
init_simple_sections();
|
|
553888
|
-
CORE = {
|
|
553889
|
-
owner: "core",
|
|
553890
|
-
trust: "locked",
|
|
553891
|
-
mutability: "locked",
|
|
553892
|
-
cadence: "epoch",
|
|
553893
|
-
cacheClass: "prefix-stable",
|
|
553894
|
-
carrier: "system.block"
|
|
553895
|
-
};
|
|
553896
|
-
MODE = { ...CORE, trust: "operator", mutability: "selectable" };
|
|
553897
|
-
SEMA_DEFAULT_PACK = {
|
|
553898
|
-
packId: "sema-default@1",
|
|
553899
|
-
assemblyApi: 1,
|
|
553900
|
-
sections: [
|
|
553901
|
-
{
|
|
553902
|
-
id: "core/role.base",
|
|
553903
|
-
slot: "identity",
|
|
553904
|
-
rank: 100,
|
|
553905
|
-
owner: "deployment",
|
|
553906
|
-
trust: "operator",
|
|
553907
|
-
mutability: "replaceable",
|
|
553908
|
-
cadence: "epoch",
|
|
553909
|
-
cacheClass: "prefix-stable",
|
|
553910
|
-
carrier: "system.block",
|
|
553911
|
-
content: (i) => i.roleBase,
|
|
553912
|
-
legacyBlockId: "role.base"
|
|
553913
|
-
},
|
|
553914
|
-
{ id: "core/harness.head", slot: "harness", rank: 200, ...CORE, content: harnessHeadText, legacyBlockId: "harness.context" },
|
|
553915
|
-
{ id: "core/security.cyber-risk", slot: "security", rank: 210, ...CORE, content: () => CYBER_RISK, legacyBlockId: "harness.context" },
|
|
553916
|
-
{ id: "core/security.url-safety", slot: "security", rank: 220, ...CORE, content: () => URL_SAFETY, legacyBlockId: "harness.context" },
|
|
553917
|
-
{ id: "core/harness.tool-result-retention", slot: "harness", rank: 230, ...CORE, content: () => SUMMARIZE_TOOL_RESULTS, legacyBlockId: "harness.context" },
|
|
553918
|
-
{
|
|
553919
|
-
id: "core/harness.execution-environment",
|
|
553920
|
-
slot: "harness",
|
|
553921
|
-
rank: 240,
|
|
553922
|
-
...CORE,
|
|
553923
|
-
admit: (i) => i.facts.policyEnabled || i.facts.isolationEnabled,
|
|
553924
|
-
content: () => EXECUTION_ENVIRONMENT,
|
|
553925
|
-
legacyBlockId: "harness.context"
|
|
553926
|
-
},
|
|
553927
|
-
{ 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" },
|
|
553928
|
-
{ id: "core/simple.pronouns", slot: "harness", rank: 252, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_PRONOUNS, legacyBlockId: "harness.context" },
|
|
553929
|
-
{ id: "core/simple.action-caution", slot: "harness", rank: 254, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_ACTION_CAUTION, legacyBlockId: "harness.context" },
|
|
553930
|
-
{ id: "core/simple.task-continuity", slot: "harness", rank: 256, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_TASK_CONTINUITY, legacyBlockId: "harness.context" },
|
|
553931
|
-
{ 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" },
|
|
553932
|
-
{ id: "core/simple.investigate-first", slot: "harness", rank: 260, ...CORE, admit: (i) => i.facts.promptProfile !== "classic", content: () => SIMPLE_INVESTIGATE_FIRST, legacyBlockId: "harness.context" },
|
|
553933
|
-
{ 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" },
|
|
553934
|
-
{ 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" },
|
|
553935
|
-
{ 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" },
|
|
553936
|
-
{ id: "core/mode.supervisor", slot: "mode", rank: 300, ...MODE, admit: (i) => i.facts.supervisorEnabled, content: () => SUPERVISOR_PROMPT, legacyBlockId: "mode.supervisor" },
|
|
553937
|
-
{ 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" },
|
|
553938
|
-
{ id: "core/mode.awareness", slot: "mode", rank: 320, ...MODE, admit: (i) => i.facts.awarenessEnabled, content: () => ORCHESTRATION_AWARENESS, legacyBlockId: "mode.awareness" },
|
|
553939
|
-
{ id: "core/mode.worktree", slot: "mode", rank: 330, ...MODE, admit: (i) => i.facts.worktreeIsolated, content: () => WORKTREE_NOTICE, legacyBlockId: "mode.worktree" },
|
|
553940
|
-
{ id: "core/mode.goal", slot: "mode", rank: 340, ...MODE, admit: (i) => i.facts.goalEnabled, content: () => GOAL_COMPLETION_GUIDANCE, legacyBlockId: "mode.goal" },
|
|
553941
|
-
{
|
|
553942
|
-
id: "core/role.append",
|
|
553943
|
-
slot: "scenario",
|
|
553944
|
-
rank: 400,
|
|
553945
|
-
owner: "deployment",
|
|
553946
|
-
trust: "operator",
|
|
553947
|
-
mutability: "append-only",
|
|
553948
|
-
cadence: "epoch",
|
|
553949
|
-
cacheClass: "prefix-stable",
|
|
553950
|
-
carrier: "system.block",
|
|
553951
|
-
content: (i) => i.roleAppend,
|
|
553952
|
-
legacyBlockId: "role.append"
|
|
553953
|
-
},
|
|
553954
|
-
{ id: "core/mode.teammate", slot: "scenario", rank: 405, ...CORE, admit: (i) => i.facts.teammateEnabled, content: () => TEAMMATE_COMMUNICATION_ADDENDUM, legacyBlockId: "mode.teammate" },
|
|
553955
|
-
{
|
|
553956
|
-
id: "core/discovery.mcp-instructions",
|
|
553957
|
-
slot: "discovery",
|
|
553958
|
-
rank: 500,
|
|
553959
|
-
owner: "extension",
|
|
553960
|
-
trust: "external",
|
|
553961
|
-
mutability: "locked",
|
|
553962
|
-
cadence: "epoch",
|
|
553963
|
-
cacheClass: "prefix-stable",
|
|
553964
|
-
carrier: "system.block",
|
|
553965
|
-
content: (i) => i.mcpInstructionsBlock,
|
|
553966
|
-
legacyBlockId: "mcp.instructions"
|
|
553967
|
-
},
|
|
553968
|
-
{
|
|
553969
|
-
id: "core/environment.context",
|
|
553970
|
-
slot: "environment",
|
|
553971
|
-
rank: 600,
|
|
553972
|
-
owner: "core",
|
|
553973
|
-
trust: "locked",
|
|
553974
|
-
mutability: "locked",
|
|
553975
|
-
cadence: "run",
|
|
553976
|
-
cacheClass: "volatile",
|
|
553977
|
-
carrier: "system.block",
|
|
553978
|
-
content: (i) => i.environmentBlock,
|
|
553979
|
-
legacyBlockId: "env.context"
|
|
553980
|
-
},
|
|
553981
|
-
{
|
|
553982
|
-
id: "core/memory.tail",
|
|
553983
|
-
slot: "memory",
|
|
553984
|
-
rank: 700,
|
|
553985
|
-
owner: "session",
|
|
553986
|
-
trust: "user-derived",
|
|
553987
|
-
mutability: "locked",
|
|
553988
|
-
cadence: "run",
|
|
553989
|
-
cacheClass: "volatile",
|
|
553990
|
-
carrier: "system.block",
|
|
553991
|
-
content: (i) => i.memoryBlock,
|
|
553992
|
-
legacyBlockId: "memory.tail"
|
|
553993
|
-
},
|
|
553994
|
-
{
|
|
553995
|
-
id: "core/behavior.model-guidance",
|
|
553996
|
-
slot: "behavior",
|
|
553997
|
-
rank: 450,
|
|
553998
|
-
owner: "core",
|
|
553999
|
-
trust: "operator",
|
|
554000
|
-
mutability: "selectable",
|
|
554001
|
-
cadence: "epoch",
|
|
554002
|
-
cacheClass: "prefix-stable",
|
|
554003
|
-
carrier: "system.block",
|
|
554004
|
-
content: (i) => i.modelGuidance,
|
|
554005
|
-
legacyBlockId: "model.guidance"
|
|
554006
|
-
}
|
|
554007
|
-
]
|
|
554008
|
-
};
|
|
554009
|
-
}
|
|
554010
|
-
});
|
|
554011
|
-
|
|
554012
|
-
// node_modules/@sema-agent/core/dist/core/runtime.js
|
|
554013
|
-
var init_runtime = __esm({
|
|
554014
|
-
"node_modules/@sema-agent/core/dist/core/runtime.js"() {
|
|
554015
|
-
}
|
|
554016
|
-
});
|
|
554017
|
-
|
|
554018
|
-
// node_modules/@sema-agent/core/dist/core/auto-compaction.js
|
|
554019
|
-
var init_auto_compaction = __esm({
|
|
554020
|
-
"node_modules/@sema-agent/core/dist/core/auto-compaction.js"() {
|
|
554021
|
-
init_harness();
|
|
554022
|
-
init_context_edit();
|
|
554023
|
-
init_epoch();
|
|
554024
|
-
init_sema_default();
|
|
554025
|
-
init_runtime();
|
|
554026
|
-
init_untrusted_text();
|
|
554027
|
-
}
|
|
554028
|
-
});
|
|
554029
|
-
|
|
554030
|
-
// node_modules/@sema-agent/core/dist/core/pricing.js
|
|
554031
|
-
var init_pricing = __esm({
|
|
554032
|
-
"node_modules/@sema-agent/core/dist/core/pricing.js"() {
|
|
554033
|
-
}
|
|
554034
|
-
});
|
|
554035
|
-
|
|
554036
|
-
// node_modules/@sema-agent/core/dist/core/trace.js
|
|
554037
|
-
var init_trace = __esm({
|
|
554038
|
-
"node_modules/@sema-agent/core/dist/core/trace.js"() {
|
|
554039
|
-
}
|
|
554040
|
-
});
|
|
554041
|
-
|
|
554042
|
-
// node_modules/@sema-agent/core/dist/core/task-outcome.js
|
|
554043
|
-
var init_task_outcome = __esm({
|
|
554044
|
-
"node_modules/@sema-agent/core/dist/core/task-outcome.js"() {
|
|
554045
|
-
}
|
|
554046
|
-
});
|
|
554047
|
-
|
|
554048
|
-
// node_modules/@sema-agent/core/dist/brain/repetition.js
|
|
554049
|
-
var init_repetition = __esm({
|
|
554050
|
-
"node_modules/@sema-agent/core/dist/brain/repetition.js"() {
|
|
554051
|
-
}
|
|
554052
|
-
});
|
|
554053
|
-
|
|
554054
|
-
// node_modules/@sema-agent/core/dist/brain/walltime.js
|
|
554055
|
-
var init_walltime = __esm({
|
|
554056
|
-
"node_modules/@sema-agent/core/dist/brain/walltime.js"() {
|
|
554057
|
-
}
|
|
554058
|
-
});
|
|
554059
|
-
|
|
554060
|
-
// node_modules/@sema-agent/core/dist/core/arg-summary.js
|
|
554061
|
-
var init_arg_summary = __esm({
|
|
554062
|
-
"node_modules/@sema-agent/core/dist/core/arg-summary.js"() {
|
|
554063
|
-
}
|
|
554064
|
-
});
|
|
554065
|
-
|
|
554066
|
-
// node_modules/@sema-agent/core/dist/brain/reasoning.js
|
|
554067
|
-
var init_reasoning = __esm({
|
|
554068
|
-
"node_modules/@sema-agent/core/dist/brain/reasoning.js"() {
|
|
554069
|
-
}
|
|
554070
|
-
});
|
|
554071
|
-
|
|
554072
|
-
// node_modules/@sema-agent/core/dist/internal/llm.js
|
|
554073
|
-
var init_llm2 = __esm({
|
|
554074
|
-
"node_modules/@sema-agent/core/dist/internal/llm.js"() {
|
|
554075
|
-
init_llm();
|
|
554076
|
-
}
|
|
554077
|
-
});
|
|
554078
|
-
|
|
554079
|
-
// node_modules/@sema-agent/core/dist/brain/errors.js
|
|
554080
|
-
var BRAIN_ERROR_CODES, CODE_ALTERNATION, CODE_RE, CODE_PREFIX_RE;
|
|
554081
|
-
var init_errors12 = __esm({
|
|
554082
|
-
"node_modules/@sema-agent/core/dist/brain/errors.js"() {
|
|
554083
|
-
BRAIN_ERROR_CODES = ["auth", "rate_limit", "invalid_request", "server", "network", "http", "stream_torn", "refusal", "length_empty"];
|
|
554084
|
-
CODE_ALTERNATION = BRAIN_ERROR_CODES.join("|");
|
|
554085
|
-
CODE_RE = new RegExp(`^\\[(${CODE_ALTERNATION})\\]`);
|
|
554086
|
-
CODE_PREFIX_RE = new RegExp(`^\\[(?:${CODE_ALTERNATION})\\]\\s*`);
|
|
554087
|
-
}
|
|
554088
|
-
});
|
|
554089
|
-
|
|
554090
|
-
// node_modules/@sema-agent/core/dist/brain/status-sink.js
|
|
554091
|
-
import { AsyncLocalStorage as AsyncLocalStorage7 } from "node:async_hooks";
|
|
554092
|
-
var statusSinkStore, telemetrySinkStore;
|
|
554093
|
-
var init_status_sink = __esm({
|
|
554094
|
-
"node_modules/@sema-agent/core/dist/brain/status-sink.js"() {
|
|
554095
|
-
statusSinkStore = new AsyncLocalStorage7();
|
|
554096
|
-
telemetrySinkStore = new AsyncLocalStorage7();
|
|
554097
|
-
}
|
|
554098
|
-
});
|
|
554099
|
-
|
|
554100
|
-
// node_modules/@sema-agent/core/dist/brain/circuit-breaker.js
|
|
554101
|
-
var init_circuit_breaker = __esm({
|
|
554102
|
-
"node_modules/@sema-agent/core/dist/brain/circuit-breaker.js"() {
|
|
554103
|
-
init_llm2();
|
|
554104
|
-
init_errors12();
|
|
554105
|
-
init_status_sink();
|
|
554106
|
-
}
|
|
554107
|
-
});
|
|
554108
|
-
|
|
554109
|
-
// node_modules/@sema-agent/core/dist/brain/degrading.js
|
|
554110
|
-
var init_degrading = __esm({
|
|
554111
|
-
"node_modules/@sema-agent/core/dist/brain/degrading.js"() {
|
|
554112
|
-
init_llm2();
|
|
554113
|
-
init_errors12();
|
|
554114
|
-
init_circuit_breaker();
|
|
554115
|
-
}
|
|
554116
|
-
});
|
|
554117
|
-
|
|
554118
|
-
// node_modules/@sema-agent/core/dist/core/select-model.js
|
|
554119
|
-
var init_select_model = __esm({
|
|
554120
|
-
"node_modules/@sema-agent/core/dist/core/select-model.js"() {
|
|
554121
|
-
}
|
|
554122
|
-
});
|
|
554123
|
-
|
|
554124
|
-
// node_modules/@sema-agent/core/dist/core/roles.js
|
|
554125
|
-
var DEFAULT_TIER_ORDER, ROLE_TIER_DEFAULTS;
|
|
554126
|
-
var init_roles = __esm({
|
|
554127
|
-
"node_modules/@sema-agent/core/dist/core/roles.js"() {
|
|
554128
|
-
init_select_model();
|
|
554129
|
-
DEFAULT_TIER_ORDER = ["ultra", "max", "pro", "flash", "lite"];
|
|
554130
|
-
ROLE_TIER_DEFAULTS = {
|
|
554131
|
-
default: "pro",
|
|
554132
|
-
summarize: "flash",
|
|
554133
|
-
advisor: DEFAULT_TIER_ORDER[0],
|
|
554134
|
-
verifier: "pro",
|
|
554135
|
-
classifier: "flash"
|
|
554136
|
-
};
|
|
554137
|
-
}
|
|
554138
|
-
});
|
|
554139
|
-
|
|
554140
|
-
// node_modules/@sema-agent/core/dist/core/runner/usage-accounting.js
|
|
554141
|
-
var init_usage_accounting = __esm({
|
|
554142
|
-
"node_modules/@sema-agent/core/dist/core/runner/usage-accounting.js"() {
|
|
554143
|
-
init_pricing();
|
|
554144
|
-
}
|
|
554145
|
-
});
|
|
554146
|
-
|
|
554147
|
-
// node_modules/@sema-agent/core/dist/core/runner/prompt-suggestions.js
|
|
554148
|
-
var init_prompt_suggestions = __esm({
|
|
554149
|
-
"node_modules/@sema-agent/core/dist/core/runner/prompt-suggestions.js"() {
|
|
554150
|
-
init_runtime();
|
|
554151
|
-
init_usage_accounting();
|
|
554152
|
-
init_untrusted_text();
|
|
554153
|
-
}
|
|
554154
|
-
});
|
|
554155
|
-
|
|
554156
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/scope-contract.js
|
|
554157
|
-
var FATAL_UTF8;
|
|
554158
|
-
var init_scope_contract = __esm({
|
|
554159
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/scope-contract.js"() {
|
|
554160
|
-
FATAL_UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
554161
|
-
}
|
|
554162
|
-
});
|
|
554163
|
-
|
|
554164
|
-
// node_modules/@sema-agent/core/dist/core/memory.js
|
|
554165
|
-
var MAX_MEMORY_BYTES;
|
|
554166
|
-
var init_memory5 = __esm({
|
|
554167
|
-
"node_modules/@sema-agent/core/dist/core/memory.js"() {
|
|
554168
|
-
init_build3();
|
|
554169
|
-
init_harness();
|
|
554170
|
-
init_tools3();
|
|
554171
|
-
init_scope_contract();
|
|
554172
|
-
init_untrusted_text();
|
|
554173
|
-
MAX_MEMORY_BYTES = 100 * 1024;
|
|
554174
|
-
}
|
|
554175
|
-
});
|
|
554176
|
-
|
|
554177
|
-
// node_modules/@sema-agent/core/dist/core/runner/memory-consolidation.js
|
|
554178
|
-
var init_memory_consolidation = __esm({
|
|
554179
|
-
"node_modules/@sema-agent/core/dist/core/runner/memory-consolidation.js"() {
|
|
554180
|
-
init_memory5();
|
|
554181
|
-
init_runtime();
|
|
554182
|
-
init_usage_accounting();
|
|
554183
|
-
}
|
|
554184
|
-
});
|
|
554185
|
-
|
|
554186
|
-
// node_modules/@sema-agent/core/dist/core/consolidate-scope.js
|
|
554187
|
-
var init_consolidate_scope = __esm({
|
|
554188
|
-
"node_modules/@sema-agent/core/dist/core/consolidate-scope.js"() {
|
|
554189
|
-
init_memory5();
|
|
554190
|
-
init_memory_consolidation();
|
|
554191
|
-
}
|
|
554192
|
-
});
|
|
554193
|
-
|
|
554194
|
-
// node_modules/@sema-agent/core/dist/core/push-queue.js
|
|
554195
|
-
var init_push_queue = __esm({
|
|
554196
|
-
"node_modules/@sema-agent/core/dist/core/push-queue.js"() {
|
|
554197
|
-
}
|
|
554198
|
-
});
|
|
554199
|
-
|
|
554200
553930
|
// node_modules/@sema-agent/core/dist/core/session.js
|
|
554201
553931
|
var init_session4 = __esm({
|
|
554202
553932
|
"node_modules/@sema-agent/core/dist/core/session.js"() {
|
|
@@ -554208,263 +553938,6 @@ var init_session4 = __esm({
|
|
|
554208
553938
|
}
|
|
554209
553939
|
});
|
|
554210
553940
|
|
|
554211
|
-
// node_modules/@sema-agent/core/dist/core/session-store.js
|
|
554212
|
-
var DAY_MS2;
|
|
554213
|
-
var init_session_store = __esm({
|
|
554214
|
-
"node_modules/@sema-agent/core/dist/core/session-store.js"() {
|
|
554215
|
-
init_harness();
|
|
554216
|
-
init_session4();
|
|
554217
|
-
DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
554218
|
-
}
|
|
554219
|
-
});
|
|
554220
|
-
|
|
554221
|
-
// node_modules/@sema-agent/core/dist/core/runner/image.js
|
|
554222
|
-
var IMAGE_MAX_BYTES;
|
|
554223
|
-
var init_image = __esm({
|
|
554224
|
-
"node_modules/@sema-agent/core/dist/core/runner/image.js"() {
|
|
554225
|
-
IMAGE_MAX_BYTES = 20 * 1024 * 1024;
|
|
554226
|
-
}
|
|
554227
|
-
});
|
|
554228
|
-
|
|
554229
|
-
// node_modules/@sema-agent/core/dist/core/runner/synthetic-tools.js
|
|
554230
|
-
var OUTPUT_TOOL_NAME, REPORT_FINDING_SCHEMA, SKILL_CONTENT_MAX_CHARS;
|
|
554231
|
-
var init_synthetic_tools = __esm({
|
|
554232
|
-
"node_modules/@sema-agent/core/dist/core/runner/synthetic-tools.js"() {
|
|
554233
|
-
init_build3();
|
|
554234
|
-
init_tools3();
|
|
554235
|
-
OUTPUT_TOOL_NAME = "StructuredOutput";
|
|
554236
|
-
REPORT_FINDING_SCHEMA = typebox_exports.Object({
|
|
554237
|
-
file: typebox_exports.String({ description: "Repo-relative path of the file the finding is in" }),
|
|
554238
|
-
line: typebox_exports.Optional(typebox_exports.Integer({ description: "1-indexed line the finding anchors to" })),
|
|
554239
|
-
summary: typebox_exports.String({ description: "One-sentence statement of the defect" }),
|
|
554240
|
-
failure_scenario: typebox_exports.String({ description: "Concrete inputs/state \u2192 wrong output/crash" }),
|
|
554241
|
-
category: typebox_exports.Optional(typebox_exports.String({
|
|
554242
|
-
maxLength: 40,
|
|
554243
|
-
description: 'Short kebab-case slug of the finding type, e.g. "correctness", "simplification", "efficiency", "test-coverage"'
|
|
554244
|
-
})),
|
|
554245
|
-
verdict: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("CONFIRMED"), typebox_exports.Literal("PLAUSIBLE")], {
|
|
554246
|
-
description: "Set when a verify pass ran; absent on inline-only reviews"
|
|
554247
|
-
})),
|
|
554248
|
-
outcome: typebox_exports.Optional(typebox_exports.Union([typebox_exports.Literal("fixed"), typebox_exports.Literal("skipped"), typebox_exports.Literal("no_change_needed")], {
|
|
554249
|
-
description: "Set ONLY when re-reporting after applying fixes: what happened to this finding"
|
|
554250
|
-
}))
|
|
554251
|
-
});
|
|
554252
|
-
SKILL_CONTENT_MAX_CHARS = 1024 * 1024;
|
|
554253
|
-
}
|
|
554254
|
-
});
|
|
554255
|
-
|
|
554256
|
-
// node_modules/@sema-agent/core/dist/core/runner/assemble-result.js
|
|
554257
|
-
var init_assemble_result = __esm({
|
|
554258
|
-
"node_modules/@sema-agent/core/dist/core/runner/assemble-result.js"() {
|
|
554259
|
-
init_repetition();
|
|
554260
|
-
init_walltime();
|
|
554261
|
-
init_errors12();
|
|
554262
|
-
}
|
|
554263
|
-
});
|
|
554264
|
-
|
|
554265
|
-
// node_modules/@sema-agent/core/dist/core/present-plan-tool.js
|
|
554266
|
-
var PRESENT_PLAN_TOOL_NAME, ENTER_PLAN_MODE_DESCRIPTION, PRESENT_PLAN_DESCRIPTION;
|
|
554267
|
-
var init_present_plan_tool = __esm({
|
|
554268
|
-
"node_modules/@sema-agent/core/dist/core/present-plan-tool.js"() {
|
|
554269
|
-
init_build3();
|
|
554270
|
-
init_untrusted_text();
|
|
554271
|
-
PRESENT_PLAN_TOOL_NAME = "ExitPlanMode";
|
|
554272
|
-
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.
|
|
554273
|
-
|
|
554274
|
-
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.
|
|
554275
|
-
|
|
554276
|
-
## When to Use This Tool
|
|
554277
|
-
1. Non-trivial implementation work: the change involves real design decisions worth aligning on before code is written
|
|
554278
|
-
- Example: "Add a delete button to the user profile" \u2014 placement, confirmation UX, what the deletion cascades to
|
|
554279
|
-
- Example: "Update the error handling in the API" \u2014 which layers change, error shapes, retry semantics
|
|
554280
|
-
2. Significant architectural ambiguity: multiple reasonable approaches exist and the choice meaningfully affects the codebase
|
|
554281
|
-
- Example: "Add caching to the API" \u2014 Redis vs in-memory vs file-based
|
|
554282
|
-
- Example: "Add real-time updates" \u2014 WebSockets vs SSE vs polling
|
|
554283
|
-
3. Unclear requirements: you need to explore and clarify before you can make progress
|
|
554284
|
-
- Example: "Make the app faster" \u2014 need to profile and identify bottlenecks first
|
|
554285
|
-
4. High-impact or destructive restructuring: the work significantly restructures, migrates, or deletes existing code, and buy-in first reduces risk
|
|
554286
|
-
- Example: "Redesign the authentication system"
|
|
554287
|
-
|
|
554288
|
-
## When NOT to Use This Tool
|
|
554289
|
-
Skip plan mode only when there is genuinely nothing to align on:
|
|
554290
|
-
- Trivial fixes (e.g. fixing a typo, removing a stray console.log)
|
|
554291
|
-
- Pure research/exploration tasks \u2014 just read; no plan approval is needed
|
|
554292
|
-
|
|
554293
|
-
If unsure whether to use it, err on the side of planning - it's better to get alignment upfront than to redo work.
|
|
554294
|
-
|
|
554295
|
-
## Examples
|
|
554296
|
-
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).
|
|
554297
|
-
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).`;
|
|
554298
|
-
PRESENT_PLAN_DESCRIPTION = [
|
|
554299
|
-
"Present your proposed PLAN for human approval BEFORE taking any action (CC plan-mode parity).",
|
|
554300
|
-
"Use this when you are in plan mode (read-only research): once you have explored enough and formed a concrete plan,",
|
|
554301
|
-
"provide the full plan here. The run PAUSES for a human to approve, edit, or reject it.",
|
|
554302
|
-
"IMPORTANT: only use this when the task requires planning the implementation steps of work that changes things;",
|
|
554303
|
-
"for research tasks (gathering information, reading files, understanding the codebase) do NOT use this tool.",
|
|
554304
|
-
'This tool inherently requests approval of your plan \u2014 do not separately ask "Is this plan okay?".',
|
|
554305
|
-
"Do NOT attempt edits / writes / mutating commands before the plan is approved \u2014 present the plan first.",
|
|
554306
|
-
"If the plan is approved, the run continues (and any read-only restriction is lifted) so you can execute it;",
|
|
554307
|
-
"if it is rejected or edited, follow the reviewer's feedback instead of the original plan."
|
|
554308
|
-
].join(" ");
|
|
554309
|
-
}
|
|
554310
|
-
});
|
|
554311
|
-
|
|
554312
|
-
// node_modules/@sema-agent/core/dist/core/runner/turn-attachments.js
|
|
554313
|
-
var ATTACHMENT_BYTE_CAP, EMPTY2, PLAN_MODE_FULL_BODY, PLAN_MODE_SPARSE_BODY;
|
|
554314
|
-
var init_turn_attachments = __esm({
|
|
554315
|
-
"node_modules/@sema-agent/core/dist/core/runner/turn-attachments.js"() {
|
|
554316
|
-
init_present_plan_tool();
|
|
554317
|
-
init_untrusted_text();
|
|
554318
|
-
init_synthetic_tools();
|
|
554319
|
-
ATTACHMENT_BYTE_CAP = 8 * 1024;
|
|
554320
|
-
EMPTY2 = Object.freeze([]);
|
|
554321
|
-
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.`;
|
|
554322
|
-
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.`;
|
|
554323
|
-
}
|
|
554324
|
-
});
|
|
554325
|
-
|
|
554326
|
-
// node_modules/@sema-agent/core/dist/core/auto-mode.js
|
|
554327
|
-
var init_auto_mode = __esm({
|
|
554328
|
-
"node_modules/@sema-agent/core/dist/core/auto-mode.js"() {
|
|
554329
|
-
}
|
|
554330
|
-
});
|
|
554331
|
-
|
|
554332
|
-
// node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js
|
|
554333
|
-
var init_auto_mode_prompt_assets = __esm({
|
|
554334
|
-
"node_modules/@sema-agent/core/dist/core/auto-mode-prompt-assets.js"() {
|
|
554335
|
-
}
|
|
554336
|
-
});
|
|
554337
|
-
|
|
554338
|
-
// node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js
|
|
554339
|
-
var init_auto_mode_prompt = __esm({
|
|
554340
|
-
"node_modules/@sema-agent/core/dist/core/auto-mode-prompt.js"() {
|
|
554341
|
-
init_auto_mode_prompt_assets();
|
|
554342
|
-
init_untrusted_text();
|
|
554343
|
-
}
|
|
554344
|
-
});
|
|
554345
|
-
|
|
554346
|
-
// node_modules/@sema-agent/core/dist/core/mcp.js
|
|
554347
|
-
import { tmpdir as tmpdir15 } from "node:os";
|
|
554348
|
-
import { join as join167 } from "node:path";
|
|
554349
|
-
var MCP_IMAGE_MAX_BASE64, IMAGE_TARGET_RAW_SIZE3, MCP_BLOB_DIR;
|
|
554350
|
-
var init_mcp5 = __esm({
|
|
554351
|
-
"node_modules/@sema-agent/core/dist/core/mcp.js"() {
|
|
554352
|
-
init_client5();
|
|
554353
|
-
init_stdio3();
|
|
554354
|
-
init_streamableHttp();
|
|
554355
|
-
init_types9();
|
|
554356
|
-
init_tool_errors();
|
|
554357
|
-
init_untrusted_text();
|
|
554358
|
-
MCP_IMAGE_MAX_BASE64 = 5 * 1024 * 1024;
|
|
554359
|
-
IMAGE_TARGET_RAW_SIZE3 = MCP_IMAGE_MAX_BASE64 * 3 / 4;
|
|
554360
|
-
MCP_BLOB_DIR = join167(tmpdir15(), "sema-mcp-blobs");
|
|
554361
|
-
}
|
|
554362
|
-
});
|
|
554363
|
-
|
|
554364
|
-
// node_modules/@sema-agent/core/dist/core/memory-recall.js
|
|
554365
|
-
var ONE_DAY_MS, ONE_WEEK_MS, ONE_MONTH_MS;
|
|
554366
|
-
var init_memory_recall = __esm({
|
|
554367
|
-
"node_modules/@sema-agent/core/dist/core/memory-recall.js"() {
|
|
554368
|
-
init_build3();
|
|
554369
|
-
init_untrusted_text();
|
|
554370
|
-
ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
554371
|
-
ONE_WEEK_MS = 7 * ONE_DAY_MS;
|
|
554372
|
-
ONE_MONTH_MS = 30.44 * ONE_DAY_MS;
|
|
554373
|
-
}
|
|
554374
|
-
});
|
|
554375
|
-
|
|
554376
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/frontmatter.js
|
|
554377
|
-
var init_frontmatter = __esm({
|
|
554378
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/frontmatter.js"() {
|
|
554379
|
-
}
|
|
554380
|
-
});
|
|
554381
|
-
|
|
554382
|
-
// node_modules/@sema-agent/core/dist/core/memory-vector.js
|
|
554383
|
-
var init_memory_vector = __esm({
|
|
554384
|
-
"node_modules/@sema-agent/core/dist/core/memory-vector.js"() {
|
|
554385
|
-
}
|
|
554386
|
-
});
|
|
554387
|
-
|
|
554388
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/layout.js
|
|
554389
|
-
var init_layout = __esm({
|
|
554390
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/layout.js"() {
|
|
554391
|
-
}
|
|
554392
|
-
});
|
|
554393
|
-
|
|
554394
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/scan.js
|
|
554395
|
-
var init_scan = __esm({
|
|
554396
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/scan.js"() {
|
|
554397
|
-
init_memory5();
|
|
554398
|
-
init_untrusted_text();
|
|
554399
|
-
}
|
|
554400
|
-
});
|
|
554401
|
-
|
|
554402
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/file-backend.js
|
|
554403
|
-
var init_file_backend = __esm({
|
|
554404
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/file-backend.js"() {
|
|
554405
|
-
init_memory_vector();
|
|
554406
|
-
init_memory5();
|
|
554407
|
-
init_untrusted_text();
|
|
554408
|
-
init_frontmatter();
|
|
554409
|
-
init_layout();
|
|
554410
|
-
init_scan();
|
|
554411
|
-
}
|
|
554412
|
-
});
|
|
554413
|
-
|
|
554414
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/engine.js
|
|
554415
|
-
var MEMORY_INDEX_MAX_BYTES;
|
|
554416
|
-
var init_engine4 = __esm({
|
|
554417
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/engine.js"() {
|
|
554418
|
-
init_harness();
|
|
554419
|
-
init_memory5();
|
|
554420
|
-
init_untrusted_text();
|
|
554421
|
-
init_memory_recall();
|
|
554422
|
-
init_frontmatter();
|
|
554423
|
-
init_file_backend();
|
|
554424
|
-
init_layout();
|
|
554425
|
-
init_scan();
|
|
554426
|
-
MEMORY_INDEX_MAX_BYTES = 25 * 1024;
|
|
554427
|
-
}
|
|
554428
|
-
});
|
|
554429
|
-
|
|
554430
|
-
// node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js
|
|
554431
|
-
var init_dual_root = __esm({
|
|
554432
|
-
"node_modules/@sema-agent/core/dist/core/memory-engine/dual-root.js"() {
|
|
554433
|
-
init_scope_contract();
|
|
554434
|
-
}
|
|
554435
|
-
});
|
|
554436
|
-
|
|
554437
|
-
// node_modules/@sema-agent/core/dist/core/runner/tool-disclosure.js
|
|
554438
|
-
var EMPTY_PARAMS;
|
|
554439
|
-
var init_tool_disclosure = __esm({
|
|
554440
|
-
"node_modules/@sema-agent/core/dist/core/runner/tool-disclosure.js"() {
|
|
554441
|
-
init_build3();
|
|
554442
|
-
init_tools3();
|
|
554443
|
-
EMPTY_PARAMS = typebox_exports.Object({});
|
|
554444
|
-
}
|
|
554445
|
-
});
|
|
554446
|
-
|
|
554447
|
-
// node_modules/@sema-agent/core/dist/core/tool-result-store.js
|
|
554448
|
-
var init_tool_result_store = __esm({
|
|
554449
|
-
"node_modules/@sema-agent/core/dist/core/tool-result-store.js"() {
|
|
554450
|
-
init_build3();
|
|
554451
|
-
init_tools3();
|
|
554452
|
-
}
|
|
554453
|
-
});
|
|
554454
|
-
|
|
554455
|
-
// node_modules/@sema-agent/core/dist/agents/tool-filter.js
|
|
554456
|
-
var init_tool_filter = __esm({
|
|
554457
|
-
"node_modules/@sema-agent/core/dist/agents/tool-filter.js"() {
|
|
554458
|
-
init_tool_name_aliases();
|
|
554459
|
-
}
|
|
554460
|
-
});
|
|
554461
|
-
|
|
554462
|
-
// node_modules/@sema-agent/core/dist/agents/builtin-agents.js
|
|
554463
|
-
var init_builtin_agents = __esm({
|
|
554464
|
-
"node_modules/@sema-agent/core/dist/agents/builtin-agents.js"() {
|
|
554465
|
-
}
|
|
554466
|
-
});
|
|
554467
|
-
|
|
554468
553941
|
// node_modules/@sema-agent/core/dist/agents/suspend-guard.js
|
|
554469
553942
|
var init_suspend_guard = __esm({
|
|
554470
553943
|
"node_modules/@sema-agent/core/dist/agents/suspend-guard.js"() {
|
|
@@ -554503,23 +553976,50 @@ var init_workflow_run_store = __esm({
|
|
|
554503
553976
|
}
|
|
554504
553977
|
});
|
|
554505
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
|
+
|
|
554506
554002
|
// node_modules/@sema-agent/core/dist/core/untrusted-egress.js
|
|
554507
|
-
function
|
|
554508
|
-
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]");
|
|
554509
554005
|
}
|
|
554510
|
-
function
|
|
554006
|
+
function boundedString(value, max2, redact) {
|
|
554511
554007
|
let s;
|
|
554512
554008
|
try {
|
|
554513
554009
|
s = typeof value === "string" ? value : JSON.stringify(value) ?? String(value);
|
|
554514
554010
|
} catch {
|
|
554515
554011
|
s = "[unserializable result]";
|
|
554516
554012
|
}
|
|
554517
|
-
s =
|
|
554013
|
+
s = redact(s);
|
|
554518
554014
|
return s.length > max2 ? `${s.slice(0, max2)}\u2026[+${s.length - max2} chars]` : s;
|
|
554519
554015
|
}
|
|
554016
|
+
function boundedRedactedSummary(value, max2) {
|
|
554017
|
+
return boundedString(value, max2, redactSecrets3);
|
|
554018
|
+
}
|
|
554520
554019
|
var init_untrusted_egress = __esm({
|
|
554521
554020
|
"node_modules/@sema-agent/core/dist/core/untrusted-egress.js"() {
|
|
554522
554021
|
init_untrusted_text();
|
|
554022
|
+
init_arg_summary();
|
|
554523
554023
|
}
|
|
554524
554024
|
});
|
|
554525
554025
|
|
|
@@ -556313,6 +555813,17 @@ ${clipTaskOutput(handle.result, handle.outputFile)}` : "(no result text)"}`;
|
|
|
556313
555813
|
}
|
|
556314
555814
|
});
|
|
556315
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
|
+
|
|
556316
555827
|
// node_modules/@sema-agent/core/dist/agents/observer.js
|
|
556317
555828
|
var OBSERVER_EVENT_TAGS, TAG_ESCAPE_RE;
|
|
556318
555829
|
var init_observer = __esm({
|
|
@@ -556362,6 +555873,553 @@ var init_subagent = __esm({
|
|
|
556362
555873
|
}
|
|
556363
555874
|
});
|
|
556364
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
|
+
|
|
556365
556423
|
// node_modules/@sema-agent/core/dist/tools/fs/encoding.js
|
|
556366
556424
|
var init_encoding = __esm({
|
|
556367
556425
|
"node_modules/@sema-agent/core/dist/tools/fs/encoding.js"() {
|
|
@@ -556585,6 +556643,13 @@ var init_artifact = __esm({
|
|
|
556585
556643
|
}
|
|
556586
556644
|
});
|
|
556587
556645
|
|
|
556646
|
+
// node_modules/@sema-agent/core/dist/prompt-assembly/turn-snapshot.js
|
|
556647
|
+
var init_turn_snapshot = __esm({
|
|
556648
|
+
"node_modules/@sema-agent/core/dist/prompt-assembly/turn-snapshot.js"() {
|
|
556649
|
+
init_epoch();
|
|
556650
|
+
}
|
|
556651
|
+
});
|
|
556652
|
+
|
|
556588
556653
|
// node_modules/@sema-agent/core/dist/core/tool-result-budget.js
|
|
556589
556654
|
var init_tool_result_budget = __esm({
|
|
556590
556655
|
"node_modules/@sema-agent/core/dist/core/tool-result-budget.js"() {
|
|
@@ -556891,6 +556956,7 @@ var init_prepare_task = __esm({
|
|
|
556891
556956
|
init_tool_catalog();
|
|
556892
556957
|
init_epoch();
|
|
556893
556958
|
init_artifact();
|
|
556959
|
+
init_turn_snapshot();
|
|
556894
556960
|
init_sema_default();
|
|
556895
556961
|
init_context_edit();
|
|
556896
556962
|
init_tool_result_budget();
|
|
@@ -556983,6 +557049,7 @@ var init_runtask = __esm({
|
|
|
556983
557049
|
init_checkpoint_store();
|
|
556984
557050
|
init_call_cap();
|
|
556985
557051
|
init_version3();
|
|
557052
|
+
init_catalog();
|
|
556986
557053
|
init_event_registry();
|
|
556987
557054
|
init_auto_compaction();
|
|
556988
557055
|
init_ask_question();
|
|
@@ -557917,6 +557984,7 @@ var init_dist9 = __esm({
|
|
|
557917
557984
|
init_tool_catalog();
|
|
557918
557985
|
init_epoch();
|
|
557919
557986
|
init_artifact();
|
|
557987
|
+
init_turn_snapshot();
|
|
557920
557988
|
init_artifact_store();
|
|
557921
557989
|
init_llm2();
|
|
557922
557990
|
init_event_registry();
|
|
@@ -557947,6 +558015,7 @@ var init_dist9 = __esm({
|
|
|
557947
558015
|
init_workflow_journal_store();
|
|
557948
558016
|
init_untrusted_egress();
|
|
557949
558017
|
init_roster_store();
|
|
558018
|
+
init_catalog();
|
|
557950
558019
|
init_task_registry();
|
|
557951
558020
|
init_coordinator();
|
|
557952
558021
|
init_subagent();
|
|
@@ -654421,7 +654490,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
|
|
|
654421
654490
|
pendingHookMessages
|
|
654422
654491
|
}, renderAndRun);
|
|
654423
654492
|
}
|
|
654424
|
-
}).version("sema 1.0.
|
|
654493
|
+
}).version("sema 1.0.36", "-v, --version", "Output the version number");
|
|
654425
654494
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
654426
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.");
|
|
654427
654496
|
if (canUserConfigureAdvisor()) {
|