stratagem-x7 0.3.1 → 0.3.2
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/dist/cli.mjs +382 -256
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -52397,6 +52397,8 @@ function truncateToWidthNoEllipsis(text, maxWidth) {
|
|
|
52397
52397
|
return result;
|
|
52398
52398
|
}
|
|
52399
52399
|
function truncate(str, maxWidth, singleLine = false) {
|
|
52400
|
+
if (!str)
|
|
52401
|
+
return str ?? "";
|
|
52400
52402
|
let result = str;
|
|
52401
52403
|
if (singleLine) {
|
|
52402
52404
|
const firstNewline = str.indexOf(`
|
|
@@ -347219,7 +347221,7 @@ var init_utils9 = __esm(() => {
|
|
|
347219
347221
|
init_preapproved();
|
|
347220
347222
|
DomainBlockedError = class DomainBlockedError extends Error {
|
|
347221
347223
|
constructor(domain2) {
|
|
347222
|
-
super(`
|
|
347224
|
+
super(`Stratagem is unable to fetch from ${domain2}`);
|
|
347223
347225
|
this.name = "DomainBlockedError";
|
|
347224
347226
|
}
|
|
347225
347227
|
};
|
|
@@ -353604,9 +353606,9 @@ var init_WebFetchTool = __esm(() => {
|
|
|
353604
353606
|
const { url: url4 } = input;
|
|
353605
353607
|
try {
|
|
353606
353608
|
const hostname3 = new URL(url4).hostname;
|
|
353607
|
-
return `
|
|
353609
|
+
return `Stratagem wants to fetch content from ${hostname3}`;
|
|
353608
353610
|
} catch {
|
|
353609
|
-
return `
|
|
353611
|
+
return `Stratagem wants to fetch content from this URL`;
|
|
353610
353612
|
}
|
|
353611
353613
|
},
|
|
353612
353614
|
userFacingName() {
|
|
@@ -353662,7 +353664,7 @@ var init_WebFetchTool = __esm(() => {
|
|
|
353662
353664
|
if (askRule) {
|
|
353663
353665
|
return {
|
|
353664
353666
|
behavior: "ask",
|
|
353665
|
-
message: `
|
|
353667
|
+
message: `Stratagem requested permissions to use ${WebFetchTool.name}, but you haven't granted it yet.`,
|
|
353666
353668
|
decisionReason: {
|
|
353667
353669
|
type: "rule",
|
|
353668
353670
|
rule: askRule
|
|
@@ -353683,7 +353685,7 @@ var init_WebFetchTool = __esm(() => {
|
|
|
353683
353685
|
}
|
|
353684
353686
|
return {
|
|
353685
353687
|
behavior: "ask",
|
|
353686
|
-
message: `
|
|
353688
|
+
message: `Stratagem requested permissions to use ${WebFetchTool.name}, but you haven't granted it yet.`,
|
|
353687
353689
|
suggestions: buildSuggestions(ruleContent)
|
|
353688
353690
|
};
|
|
353689
353691
|
},
|
|
@@ -354553,6 +354555,186 @@ var init_BriefTool = __esm(() => {
|
|
|
354553
354555
|
});
|
|
354554
354556
|
});
|
|
354555
354557
|
|
|
354558
|
+
// src/utils/autonomy.ts
|
|
354559
|
+
function normalizeAutonomyMode(value) {
|
|
354560
|
+
return typeof value === "string" && AUTONOMY_MODES.includes(value) ? value : "off";
|
|
354561
|
+
}
|
|
354562
|
+
function getAutonomyModeFromSettings(settings) {
|
|
354563
|
+
return normalizeAutonomyMode(settings?.autonomyMode);
|
|
354564
|
+
}
|
|
354565
|
+
function autonomyModeTitle(mode) {
|
|
354566
|
+
switch (mode) {
|
|
354567
|
+
case "smart":
|
|
354568
|
+
return "SMART";
|
|
354569
|
+
case "aggressive":
|
|
354570
|
+
return "AGGRESSIVE";
|
|
354571
|
+
default:
|
|
354572
|
+
return "OFF";
|
|
354573
|
+
}
|
|
354574
|
+
}
|
|
354575
|
+
function autonomyModeDescription(mode) {
|
|
354576
|
+
switch (mode) {
|
|
354577
|
+
case "smart":
|
|
354578
|
+
return "Classifier-driven autonomy with minimal prompts for routine work.";
|
|
354579
|
+
case "aggressive":
|
|
354580
|
+
return "Maximum autonomy with bypass-style execution and no permission prompts.";
|
|
354581
|
+
default:
|
|
354582
|
+
return "Manual approval flow stays in control.";
|
|
354583
|
+
}
|
|
354584
|
+
}
|
|
354585
|
+
function autonomyModeColor(mode) {
|
|
354586
|
+
switch (mode) {
|
|
354587
|
+
case "smart":
|
|
354588
|
+
return "promptBorder";
|
|
354589
|
+
case "aggressive":
|
|
354590
|
+
return "claude";
|
|
354591
|
+
default:
|
|
354592
|
+
return "inactive";
|
|
354593
|
+
}
|
|
354594
|
+
}
|
|
354595
|
+
function getNextAutonomyMode(mode) {
|
|
354596
|
+
switch (mode) {
|
|
354597
|
+
case "off":
|
|
354598
|
+
return "smart";
|
|
354599
|
+
case "smart":
|
|
354600
|
+
return "aggressive";
|
|
354601
|
+
default:
|
|
354602
|
+
return "off";
|
|
354603
|
+
}
|
|
354604
|
+
}
|
|
354605
|
+
function autonomyModeToPermissionMode(mode, context5) {
|
|
354606
|
+
switch (mode) {
|
|
354607
|
+
case "aggressive":
|
|
354608
|
+
return "bypassPermissions";
|
|
354609
|
+
case "smart":
|
|
354610
|
+
if (false) {}
|
|
354611
|
+
return "acceptEdits";
|
|
354612
|
+
default:
|
|
354613
|
+
return "default";
|
|
354614
|
+
}
|
|
354615
|
+
}
|
|
354616
|
+
function applyAutonomyModeToPermissionContext(context5, autonomyMode) {
|
|
354617
|
+
const targetMode = autonomyModeToPermissionMode(autonomyMode, context5);
|
|
354618
|
+
const contextWithAvailability = autonomyMode === "aggressive" ? { ...context5, isBypassPermissionsModeAvailable: true } : context5;
|
|
354619
|
+
const transitioned = transitionPermissionMode(context5.mode, targetMode, contextWithAvailability);
|
|
354620
|
+
return {
|
|
354621
|
+
...transitioned,
|
|
354622
|
+
mode: targetMode,
|
|
354623
|
+
...autonomyMode === "aggressive" ? { isBypassPermissionsModeAvailable: true } : {}
|
|
354624
|
+
};
|
|
354625
|
+
}
|
|
354626
|
+
var AUTONOMY_MODES;
|
|
354627
|
+
var init_autonomy = __esm(() => {
|
|
354628
|
+
init_permissionSetup();
|
|
354629
|
+
AUTONOMY_MODES = ["off", "smart", "aggressive"];
|
|
354630
|
+
});
|
|
354631
|
+
|
|
354632
|
+
// src/tools/UserInputTool/UserInputTool.ts
|
|
354633
|
+
var USER_INPUT_TOOL_NAME = "user_input", DESCRIPTION12 = "Inject user-level input into the REPL command queue. Execute any slash command or inject text as if the user typed it. Only available in BUFFER:AGGRESSIVE mode.", inputSchema20, outputSchema17, UserInputTool;
|
|
354634
|
+
var init_UserInputTool = __esm(() => {
|
|
354635
|
+
init_v4();
|
|
354636
|
+
init_Tool();
|
|
354637
|
+
init_messageQueueManager();
|
|
354638
|
+
init_autonomy();
|
|
354639
|
+
init_settings2();
|
|
354640
|
+
inputSchema20 = lazySchema(() => exports_external.strictObject({
|
|
354641
|
+
command: exports_external.string().describe('The input to inject, exactly as the user would type it. For slash commands, include the leading slash (e.g. "/compact", "/new", "/clear", "/help"). For plain text, it will be processed as a user message.'),
|
|
354642
|
+
reason: exports_external.string().describe('Brief explanation of why this input injection is needed (e.g. "context window is 80% full, compacting to free space").')
|
|
354643
|
+
}));
|
|
354644
|
+
outputSchema17 = lazySchema(() => exports_external.object({
|
|
354645
|
+
status: exports_external.enum(["injected", "rejected"]),
|
|
354646
|
+
command: exports_external.string(),
|
|
354647
|
+
message: exports_external.string()
|
|
354648
|
+
}));
|
|
354649
|
+
UserInputTool = buildTool({
|
|
354650
|
+
name: USER_INPUT_TOOL_NAME,
|
|
354651
|
+
searchHint: "inject user input, run slash commands autonomously, self-execute commands",
|
|
354652
|
+
maxResultSizeChars: 1000,
|
|
354653
|
+
userFacingName() {
|
|
354654
|
+
return "";
|
|
354655
|
+
},
|
|
354656
|
+
get inputSchema() {
|
|
354657
|
+
return inputSchema20();
|
|
354658
|
+
},
|
|
354659
|
+
get outputSchema() {
|
|
354660
|
+
return outputSchema17();
|
|
354661
|
+
},
|
|
354662
|
+
isEnabled() {
|
|
354663
|
+
const settings = getSettings_DEPRECATED();
|
|
354664
|
+
const mode = getAutonomyModeFromSettings(settings ?? undefined);
|
|
354665
|
+
return mode === "aggressive";
|
|
354666
|
+
},
|
|
354667
|
+
isConcurrencySafe() {
|
|
354668
|
+
return false;
|
|
354669
|
+
},
|
|
354670
|
+
isReadOnly() {
|
|
354671
|
+
return false;
|
|
354672
|
+
},
|
|
354673
|
+
async description() {
|
|
354674
|
+
return DESCRIPTION12;
|
|
354675
|
+
},
|
|
354676
|
+
mapToolResultToToolResultBlockParam(output, toolUseID) {
|
|
354677
|
+
return {
|
|
354678
|
+
tool_use_id: toolUseID,
|
|
354679
|
+
type: "tool_result",
|
|
354680
|
+
content: `${output.status}: ${output.message}`
|
|
354681
|
+
};
|
|
354682
|
+
},
|
|
354683
|
+
async prompt() {
|
|
354684
|
+
return `Use this tool to inject user-level input into the REPL. This allows you to autonomously execute ANY slash command or send text as if the user typed it. You have full access to everything the user can do.
|
|
354685
|
+
|
|
354686
|
+
## You can invoke ANY slash command, including but not limited to:
|
|
354687
|
+
- \`/compact\` — Compress conversation context to free up space
|
|
354688
|
+
- \`/new\` — Start a fresh session (preserves old session on disk)
|
|
354689
|
+
- \`/clear\` — Same as /new, clears and starts fresh
|
|
354690
|
+
- \`/model <name>\` — Switch the active model
|
|
354691
|
+
- \`/provider\` — Open the provider manager
|
|
354692
|
+
- \`/help\` — Show help information
|
|
354693
|
+
- \`/config\` — Open configuration
|
|
354694
|
+
- \`/resume\` — Resume a previous session
|
|
354695
|
+
- Any other slash command the user has access to
|
|
354696
|
+
|
|
354697
|
+
## When to use:
|
|
354698
|
+
- Context is getting full → inject "/compact" to free space
|
|
354699
|
+
- Task is complete and user wants a fresh start → inject "/new"
|
|
354700
|
+
- Need to switch models mid-task → inject "/model <model-name>"
|
|
354701
|
+
- User asks you to run any slash command → inject it directly
|
|
354702
|
+
|
|
354703
|
+
## Rules:
|
|
354704
|
+
- ALWAYS provide a reason for the injection
|
|
354705
|
+
- Do NOT use this for normal conversation — use your regular response instead
|
|
354706
|
+
- This tool is ONLY available in BUFFER:AGGRESSIVE mode
|
|
354707
|
+
- You can inject ANY valid slash command — there are no restrictions`;
|
|
354708
|
+
},
|
|
354709
|
+
async call({ command, reason }) {
|
|
354710
|
+
const settings = getSettings_DEPRECATED();
|
|
354711
|
+
const mode = getAutonomyModeFromSettings(settings ?? undefined);
|
|
354712
|
+
if (mode !== "aggressive") {
|
|
354713
|
+
return {
|
|
354714
|
+
data: {
|
|
354715
|
+
status: "rejected",
|
|
354716
|
+
command,
|
|
354717
|
+
message: `UserInput rejected: BUFFER mode is "${mode}", not "aggressive". This tool is only available in BUFFER:AGGRESSIVE mode.`
|
|
354718
|
+
}
|
|
354719
|
+
};
|
|
354720
|
+
}
|
|
354721
|
+
enqueuePendingNotification({
|
|
354722
|
+
value: command,
|
|
354723
|
+
mode: "prompt",
|
|
354724
|
+
priority: "next",
|
|
354725
|
+
isMeta: true
|
|
354726
|
+
});
|
|
354727
|
+
return {
|
|
354728
|
+
data: {
|
|
354729
|
+
status: "injected",
|
|
354730
|
+
command,
|
|
354731
|
+
message: `Injected "${command}" into REPL queue. Reason: ${reason}. It will execute after the current turn completes.`
|
|
354732
|
+
}
|
|
354733
|
+
};
|
|
354734
|
+
}
|
|
354735
|
+
});
|
|
354736
|
+
});
|
|
354737
|
+
|
|
354556
354738
|
// src/utils/task/outputFormatting.ts
|
|
354557
354739
|
function getMaxTaskOutputLength() {
|
|
354558
354740
|
const result = validateBoundedIntEnvVar("TASK_MAX_OUTPUT_LENGTH", process.env.TASK_MAX_OUTPUT_LENGTH, TASK_MAX_OUTPUT_DEFAULT, TASK_MAX_OUTPUT_UPPER_LIMIT);
|
|
@@ -355008,7 +355190,7 @@ function TaskOutputResultDisplay(t0) {
|
|
|
355008
355190
|
}
|
|
355009
355191
|
return t5;
|
|
355010
355192
|
}
|
|
355011
|
-
var import_react_compiler_runtime117, jsx_dev_runtime143,
|
|
355193
|
+
var import_react_compiler_runtime117, jsx_dev_runtime143, inputSchema21, TaskOutputTool;
|
|
355012
355194
|
var init_TaskOutputTool = __esm(() => {
|
|
355013
355195
|
init_v4();
|
|
355014
355196
|
init_FallbackToolUseErrorMessage();
|
|
@@ -355029,7 +355211,7 @@ var init_TaskOutputTool = __esm(() => {
|
|
|
355029
355211
|
init_BashToolResultMessage();
|
|
355030
355212
|
import_react_compiler_runtime117 = __toESM(require_dist3(), 1);
|
|
355031
355213
|
jsx_dev_runtime143 = __toESM(require_jsx_dev_runtime(), 1);
|
|
355032
|
-
|
|
355214
|
+
inputSchema21 = lazySchema(() => exports_external.strictObject({
|
|
355033
355215
|
task_id: exports_external.string().describe("The task ID to get output from"),
|
|
355034
355216
|
block: semanticBoolean(exports_external.boolean().default(true)).describe("Whether to wait for completion"),
|
|
355035
355217
|
timeout: exports_external.number().min(0).max(600000).default(30000).describe("Max wait time in ms")
|
|
@@ -355044,7 +355226,7 @@ var init_TaskOutputTool = __esm(() => {
|
|
|
355044
355226
|
return "Task Output";
|
|
355045
355227
|
},
|
|
355046
355228
|
get inputSchema() {
|
|
355047
|
-
return
|
|
355229
|
+
return inputSchema21();
|
|
355048
355230
|
},
|
|
355049
355231
|
async description() {
|
|
355050
355232
|
return "[Deprecated] — prefer Read on the task output file path";
|
|
@@ -363958,7 +364140,7 @@ function shouldUseAdapterProvider() {
|
|
|
363958
364140
|
}
|
|
363959
364141
|
return getAvailableProviders().length > 0;
|
|
363960
364142
|
}
|
|
363961
|
-
var
|
|
364143
|
+
var inputSchema22, searchResultSchema, outputSchema18, WebSearchTool;
|
|
363962
364144
|
var init_WebSearchTool = __esm(() => {
|
|
363963
364145
|
init_providers();
|
|
363964
364146
|
init_v4();
|
|
@@ -363975,7 +364157,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
363975
364157
|
init_prompt5();
|
|
363976
364158
|
init_UI16();
|
|
363977
364159
|
init_providers2();
|
|
363978
|
-
|
|
364160
|
+
inputSchema22 = lazySchema(() => exports_external.strictObject({
|
|
363979
364161
|
query: exports_external.string().min(2).describe("The search query to use"),
|
|
363980
364162
|
allowed_domains: exports_external.array(exports_external.string()).optional().describe("Only include search results from these domains"),
|
|
363981
364163
|
blocked_domains: exports_external.array(exports_external.string()).optional().describe("Never include search results from these domains")
|
|
@@ -363990,7 +364172,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
363990
364172
|
content: exports_external.array(searchHitSchema).describe("Array of search hits")
|
|
363991
364173
|
});
|
|
363992
364174
|
});
|
|
363993
|
-
|
|
364175
|
+
outputSchema18 = lazySchema(() => exports_external.object({
|
|
363994
364176
|
query: exports_external.string().describe("The search query that was executed"),
|
|
363995
364177
|
results: exports_external.array(exports_external.union([searchResultSchema(), exports_external.string()])).describe("Search results and/or text commentary from the model"),
|
|
363996
364178
|
durationSeconds: exports_external.number().describe("Time taken to complete the search operation")
|
|
@@ -364001,7 +364183,7 @@ var init_WebSearchTool = __esm(() => {
|
|
|
364001
364183
|
maxResultSizeChars: 1e5,
|
|
364002
364184
|
shouldDefer: true,
|
|
364003
364185
|
async description(input) {
|
|
364004
|
-
return `
|
|
364186
|
+
return `Stratagem wants to search the web for: ${input.query}`;
|
|
364005
364187
|
},
|
|
364006
364188
|
userFacingName() {
|
|
364007
364189
|
return "Web Search";
|
|
@@ -364035,10 +364217,10 @@ var init_WebSearchTool = __esm(() => {
|
|
|
364035
364217
|
return false;
|
|
364036
364218
|
},
|
|
364037
364219
|
get inputSchema() {
|
|
364038
|
-
return
|
|
364220
|
+
return inputSchema22();
|
|
364039
364221
|
},
|
|
364040
364222
|
get outputSchema() {
|
|
364041
|
-
return
|
|
364223
|
+
return outputSchema18();
|
|
364042
364224
|
},
|
|
364043
364225
|
isConcurrencySafe() {
|
|
364044
364226
|
return true;
|
|
@@ -364440,7 +364622,7 @@ var init_UI17 = __esm(() => {
|
|
|
364440
364622
|
|
|
364441
364623
|
// src/tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts
|
|
364442
364624
|
import { writeFile as writeFile19 } from "fs/promises";
|
|
364443
|
-
var permissionSetupModule = null, allowedPromptSchema,
|
|
364625
|
+
var permissionSetupModule = null, allowedPromptSchema, inputSchema23, _sdkInputSchema, outputSchema19, ExitPlanModeV2Tool;
|
|
364444
364626
|
var init_ExitPlanModeV2Tool = __esm(() => {
|
|
364445
364627
|
init_v4();
|
|
364446
364628
|
init_state();
|
|
@@ -364460,14 +364642,14 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
364460
364642
|
tool: exports_external.enum(["Bash"]).describe("The tool this prompt applies to"),
|
|
364461
364643
|
prompt: exports_external.string().describe('Semantic description of the action, e.g. "run tests", "install dependencies"')
|
|
364462
364644
|
}));
|
|
364463
|
-
|
|
364645
|
+
inputSchema23 = lazySchema(() => exports_external.strictObject({
|
|
364464
364646
|
allowedPrompts: exports_external.array(allowedPromptSchema()).optional().describe("Prompt-based permissions needed to implement the plan. These describe categories of actions rather than specific commands.")
|
|
364465
364647
|
}).passthrough());
|
|
364466
|
-
_sdkInputSchema = lazySchema(() =>
|
|
364648
|
+
_sdkInputSchema = lazySchema(() => inputSchema23().extend({
|
|
364467
364649
|
plan: exports_external.string().optional().describe("The plan content (injected by normalizeToolInput from disk)"),
|
|
364468
364650
|
planFilePath: exports_external.string().optional().describe("The plan file path (injected by normalizeToolInput)")
|
|
364469
364651
|
}));
|
|
364470
|
-
|
|
364652
|
+
outputSchema19 = lazySchema(() => exports_external.object({
|
|
364471
364653
|
plan: exports_external.string().nullable().describe("The plan that was presented to the user"),
|
|
364472
364654
|
isAgent: exports_external.boolean(),
|
|
364473
364655
|
filePath: exports_external.string().optional().describe("The file path where the plan was saved"),
|
|
@@ -364487,10 +364669,10 @@ var init_ExitPlanModeV2Tool = __esm(() => {
|
|
|
364487
364669
|
return EXIT_PLAN_MODE_V2_TOOL_PROMPT;
|
|
364488
364670
|
},
|
|
364489
364671
|
get inputSchema() {
|
|
364490
|
-
return
|
|
364672
|
+
return inputSchema23();
|
|
364491
364673
|
},
|
|
364492
364674
|
get outputSchema() {
|
|
364493
|
-
return
|
|
364675
|
+
return outputSchema19();
|
|
364494
364676
|
},
|
|
364495
364677
|
userFacingName() {
|
|
364496
364678
|
return "";
|
|
@@ -364699,11 +364881,11 @@ ${plan}`,
|
|
|
364699
364881
|
});
|
|
364700
364882
|
|
|
364701
364883
|
// src/tools/testing/TestingPermissionTool.tsx
|
|
364702
|
-
var NAME = "TestingPermission",
|
|
364884
|
+
var NAME = "TestingPermission", inputSchema24, TestingPermissionTool;
|
|
364703
364885
|
var init_TestingPermissionTool = __esm(() => {
|
|
364704
364886
|
init_v4();
|
|
364705
364887
|
init_Tool();
|
|
364706
|
-
|
|
364888
|
+
inputSchema24 = lazySchema(() => exports_external.strictObject({}));
|
|
364707
364889
|
TestingPermissionTool = buildTool({
|
|
364708
364890
|
name: NAME,
|
|
364709
364891
|
maxResultSizeChars: 1e5,
|
|
@@ -364714,7 +364896,7 @@ var init_TestingPermissionTool = __esm(() => {
|
|
|
364714
364896
|
return "Test tool that always asks for permission before executing. Used for end-to-end testing.";
|
|
364715
364897
|
},
|
|
364716
364898
|
get inputSchema() {
|
|
364717
|
-
return
|
|
364899
|
+
return inputSchema24();
|
|
364718
364900
|
},
|
|
364719
364901
|
userFacingName() {
|
|
364720
364902
|
return "TestingPermission";
|
|
@@ -364842,7 +365024,7 @@ function validateHtmlPreview(preview) {
|
|
|
364842
365024
|
}
|
|
364843
365025
|
return null;
|
|
364844
365026
|
}
|
|
364845
|
-
var import_react_compiler_runtime118, jsx_dev_runtime146, questionOptionSchema, questionSchema, annotationsSchema, UNIQUENESS_REFINE, commonFields,
|
|
365027
|
+
var import_react_compiler_runtime118, jsx_dev_runtime146, questionOptionSchema, questionSchema, annotationsSchema, UNIQUENESS_REFINE, commonFields, inputSchema25, outputSchema20, AskUserQuestionTool;
|
|
364846
365028
|
var init_AskUserQuestionTool = __esm(() => {
|
|
364847
365029
|
init_state();
|
|
364848
365030
|
init_MessageResponse();
|
|
@@ -364895,13 +365077,13 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
364895
365077
|
source: exports_external.string().optional().describe('Optional identifier for the source of this question (e.g., "remember" for /remember command). Used for analytics tracking.')
|
|
364896
365078
|
}).optional().describe("Optional metadata for tracking and analytics purposes. Not displayed to user.")
|
|
364897
365079
|
}));
|
|
364898
|
-
|
|
365080
|
+
inputSchema25 = lazySchema(() => exports_external.strictObject({
|
|
364899
365081
|
questions: exports_external.array(questionSchema()).min(1).max(4).describe("Questions to ask the user (1-4 questions)"),
|
|
364900
365082
|
...commonFields()
|
|
364901
365083
|
}).refine(UNIQUENESS_REFINE.check, {
|
|
364902
365084
|
message: UNIQUENESS_REFINE.message
|
|
364903
365085
|
}));
|
|
364904
|
-
|
|
365086
|
+
outputSchema20 = lazySchema(() => exports_external.object({
|
|
364905
365087
|
questions: exports_external.array(questionSchema()).describe("The questions that were asked"),
|
|
364906
365088
|
answers: exports_external.record(exports_external.string(), exports_external.string()).describe("The answers provided by the user (question text -> answer string; multi-select answers are comma-separated)"),
|
|
364907
365089
|
annotations: annotationsSchema()
|
|
@@ -364922,10 +365104,10 @@ var init_AskUserQuestionTool = __esm(() => {
|
|
|
364922
365104
|
return ASK_USER_QUESTION_TOOL_PROMPT + PREVIEW_FEATURE_PROMPT[format4];
|
|
364923
365105
|
},
|
|
364924
365106
|
get inputSchema() {
|
|
364925
|
-
return
|
|
365107
|
+
return inputSchema25();
|
|
364926
365108
|
},
|
|
364927
365109
|
get outputSchema() {
|
|
364928
|
-
return
|
|
365110
|
+
return outputSchema20();
|
|
364929
365111
|
},
|
|
364930
365112
|
userFacingName() {
|
|
364931
365113
|
return "";
|
|
@@ -365409,7 +365591,7 @@ var init_formatters = __esm(() => {
|
|
|
365409
365591
|
});
|
|
365410
365592
|
|
|
365411
365593
|
// src/tools/LSPTool/prompt.ts
|
|
365412
|
-
var LSP_TOOL_NAME = "LSP",
|
|
365594
|
+
var LSP_TOOL_NAME = "LSP", DESCRIPTION13 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.
|
|
365413
365595
|
|
|
365414
365596
|
Supported operations:
|
|
365415
365597
|
- goToDefinition: Find where a symbol is defined
|
|
@@ -366101,7 +366283,7 @@ function countUniqueFilesFromOutgoingCalls(calls) {
|
|
|
366101
366283
|
const validUris = calls.map((call5) => call5.to?.uri).filter((uri) => uri);
|
|
366102
366284
|
return new Set(validUris).size;
|
|
366103
366285
|
}
|
|
366104
|
-
var MAX_LSP_FILE_SIZE_BYTES = 1e7,
|
|
366286
|
+
var MAX_LSP_FILE_SIZE_BYTES = 1e7, inputSchema26, outputSchema21, LSPTool;
|
|
366105
366287
|
var init_LSPTool = __esm(() => {
|
|
366106
366288
|
init_v4();
|
|
366107
366289
|
init_manager();
|
|
@@ -366117,7 +366299,7 @@ var init_LSPTool = __esm(() => {
|
|
|
366117
366299
|
init_formatters();
|
|
366118
366300
|
init_schemas5();
|
|
366119
366301
|
init_UI18();
|
|
366120
|
-
|
|
366302
|
+
inputSchema26 = lazySchema(() => exports_external.strictObject({
|
|
366121
366303
|
operation: exports_external.enum([
|
|
366122
366304
|
"goToDefinition",
|
|
366123
366305
|
"findReferences",
|
|
@@ -366133,7 +366315,7 @@ var init_LSPTool = __esm(() => {
|
|
|
366133
366315
|
line: exports_external.number().int().positive().describe("The line number (1-based, as shown in editors)"),
|
|
366134
366316
|
character: exports_external.number().int().positive().describe("The character offset (1-based, as shown in editors)")
|
|
366135
366317
|
}));
|
|
366136
|
-
|
|
366318
|
+
outputSchema21 = lazySchema(() => exports_external.object({
|
|
366137
366319
|
operation: exports_external.enum([
|
|
366138
366320
|
"goToDefinition",
|
|
366139
366321
|
"findReferences",
|
|
@@ -366156,7 +366338,7 @@ var init_LSPTool = __esm(() => {
|
|
|
366156
366338
|
maxResultSizeChars: 1e5,
|
|
366157
366339
|
isLsp: true,
|
|
366158
366340
|
async description() {
|
|
366159
|
-
return
|
|
366341
|
+
return DESCRIPTION13;
|
|
366160
366342
|
},
|
|
366161
366343
|
userFacingName: userFacingName6,
|
|
366162
366344
|
shouldDefer: true,
|
|
@@ -366164,10 +366346,10 @@ var init_LSPTool = __esm(() => {
|
|
|
366164
366346
|
return isLspConnected();
|
|
366165
366347
|
},
|
|
366166
366348
|
get inputSchema() {
|
|
366167
|
-
return
|
|
366349
|
+
return inputSchema26();
|
|
366168
366350
|
},
|
|
366169
366351
|
get outputSchema() {
|
|
366170
|
-
return
|
|
366352
|
+
return outputSchema21();
|
|
366171
366353
|
},
|
|
366172
366354
|
isConcurrencySafe() {
|
|
366173
366355
|
return true;
|
|
@@ -366225,7 +366407,7 @@ var init_LSPTool = __esm(() => {
|
|
|
366225
366407
|
return checkReadPermissionForTool(LSPTool, input, appState.toolPermissionContext);
|
|
366226
366408
|
},
|
|
366227
366409
|
async prompt() {
|
|
366228
|
-
return
|
|
366410
|
+
return DESCRIPTION13;
|
|
366229
366411
|
},
|
|
366230
366412
|
renderToolUseMessage: renderToolUseMessage19,
|
|
366231
366413
|
renderToolUseErrorMessage: renderToolUseErrorMessage10,
|
|
@@ -366525,7 +366707,7 @@ function renderToolResultMessage19(_output, _progressMessagesForMessage, _option
|
|
|
366525
366707
|
paddingLeft: 2,
|
|
366526
366708
|
children: /* @__PURE__ */ jsx_dev_runtime148.jsxDEV(ThemedText, {
|
|
366527
366709
|
dimColor: true,
|
|
366528
|
-
children: "
|
|
366710
|
+
children: "Stratagem is now exploring and designing an implementation approach."
|
|
366529
366711
|
}, undefined, false, undefined, this)
|
|
366530
366712
|
}, undefined, false, undefined, this)
|
|
366531
366713
|
]
|
|
@@ -366555,7 +366737,7 @@ var init_UI19 = __esm(() => {
|
|
|
366555
366737
|
});
|
|
366556
366738
|
|
|
366557
366739
|
// src/tools/EnterPlanModeTool/EnterPlanModeTool.ts
|
|
366558
|
-
var
|
|
366740
|
+
var inputSchema27, outputSchema22, EnterPlanModeTool;
|
|
366559
366741
|
var init_EnterPlanModeTool = __esm(() => {
|
|
366560
366742
|
init_v4();
|
|
366561
366743
|
init_state();
|
|
@@ -366565,8 +366747,8 @@ var init_EnterPlanModeTool = __esm(() => {
|
|
|
366565
366747
|
init_planModeV2();
|
|
366566
366748
|
init_prompt16();
|
|
366567
366749
|
init_UI19();
|
|
366568
|
-
|
|
366569
|
-
|
|
366750
|
+
inputSchema27 = lazySchema(() => exports_external.strictObject({}));
|
|
366751
|
+
outputSchema22 = lazySchema(() => exports_external.object({
|
|
366570
366752
|
message: exports_external.string().describe("Confirmation that plan mode was entered")
|
|
366571
366753
|
}));
|
|
366572
366754
|
EnterPlanModeTool = buildTool({
|
|
@@ -366580,10 +366762,10 @@ var init_EnterPlanModeTool = __esm(() => {
|
|
|
366580
366762
|
return getEnterPlanModeToolPrompt();
|
|
366581
366763
|
},
|
|
366582
366764
|
get inputSchema() {
|
|
366583
|
-
return
|
|
366765
|
+
return inputSchema27();
|
|
366584
366766
|
},
|
|
366585
366767
|
get outputSchema() {
|
|
366586
|
-
return
|
|
366768
|
+
return outputSchema22();
|
|
366587
366769
|
},
|
|
366588
366770
|
userFacingName() {
|
|
366589
366771
|
return "";
|
|
@@ -366730,7 +366912,7 @@ var init_UI20 = __esm(() => {
|
|
|
366730
366912
|
});
|
|
366731
366913
|
|
|
366732
366914
|
// src/tools/EnterWorktreeTool/EnterWorktreeTool.ts
|
|
366733
|
-
var
|
|
366915
|
+
var inputSchema28, outputSchema23, EnterWorktreeTool;
|
|
366734
366916
|
var init_EnterWorktreeTool = __esm(() => {
|
|
366735
366917
|
init_v4();
|
|
366736
366918
|
init_state();
|
|
@@ -366744,7 +366926,7 @@ var init_EnterWorktreeTool = __esm(() => {
|
|
|
366744
366926
|
init_sessionStorage();
|
|
366745
366927
|
init_worktree();
|
|
366746
366928
|
init_UI20();
|
|
366747
|
-
|
|
366929
|
+
inputSchema28 = lazySchema(() => exports_external.strictObject({
|
|
366748
366930
|
name: exports_external.string().superRefine((s, ctx) => {
|
|
366749
366931
|
try {
|
|
366750
366932
|
validateWorktreeSlug(s);
|
|
@@ -366753,7 +366935,7 @@ var init_EnterWorktreeTool = __esm(() => {
|
|
|
366753
366935
|
}
|
|
366754
366936
|
}).optional().describe('Optional name for the worktree. Each "/"-separated segment may contain only letters, digits, dots, underscores, and dashes; max 64 chars total. A random name is generated if not provided.')
|
|
366755
366937
|
}));
|
|
366756
|
-
|
|
366938
|
+
outputSchema23 = lazySchema(() => exports_external.object({
|
|
366757
366939
|
worktreePath: exports_external.string(),
|
|
366758
366940
|
worktreeBranch: exports_external.string().optional(),
|
|
366759
366941
|
message: exports_external.string()
|
|
@@ -366769,10 +366951,10 @@ var init_EnterWorktreeTool = __esm(() => {
|
|
|
366769
366951
|
return getEnterWorktreeToolPrompt();
|
|
366770
366952
|
},
|
|
366771
366953
|
get inputSchema() {
|
|
366772
|
-
return
|
|
366954
|
+
return inputSchema28();
|
|
366773
366955
|
},
|
|
366774
366956
|
get outputSchema() {
|
|
366775
|
-
return
|
|
366957
|
+
return outputSchema23();
|
|
366776
366958
|
},
|
|
366777
366959
|
userFacingName() {
|
|
366778
366960
|
return "Creating worktree";
|
|
@@ -366939,7 +367121,7 @@ function restoreSessionToOriginalCwd(originalCwd, projectRootIsWorktree) {
|
|
|
366939
367121
|
clearMemoryFileCaches();
|
|
366940
367122
|
getPlansDirectory.cache.clear?.();
|
|
366941
367123
|
}
|
|
366942
|
-
var
|
|
367124
|
+
var inputSchema29, outputSchema24, ExitWorktreeTool;
|
|
366943
367125
|
var init_ExitWorktreeTool = __esm(() => {
|
|
366944
367126
|
init_v4();
|
|
366945
367127
|
init_state();
|
|
@@ -366953,11 +367135,11 @@ var init_ExitWorktreeTool = __esm(() => {
|
|
|
366953
367135
|
init_sessionStorage();
|
|
366954
367136
|
init_worktree();
|
|
366955
367137
|
init_UI21();
|
|
366956
|
-
|
|
367138
|
+
inputSchema29 = lazySchema(() => exports_external.strictObject({
|
|
366957
367139
|
action: exports_external.enum(["keep", "remove"]).describe('"keep" leaves the worktree and branch on disk; "remove" deletes both.'),
|
|
366958
367140
|
discard_changes: exports_external.boolean().optional().describe('Required true when action is "remove" and the worktree has uncommitted files or unmerged commits. The tool will refuse and list them otherwise.')
|
|
366959
367141
|
}));
|
|
366960
|
-
|
|
367142
|
+
outputSchema24 = lazySchema(() => exports_external.object({
|
|
366961
367143
|
action: exports_external.enum(["keep", "remove"]),
|
|
366962
367144
|
originalCwd: exports_external.string(),
|
|
366963
367145
|
worktreePath: exports_external.string(),
|
|
@@ -366978,10 +367160,10 @@ var init_ExitWorktreeTool = __esm(() => {
|
|
|
366978
367160
|
return getExitWorktreeToolPrompt();
|
|
366979
367161
|
},
|
|
366980
367162
|
get inputSchema() {
|
|
366981
|
-
return
|
|
367163
|
+
return inputSchema29();
|
|
366982
367164
|
},
|
|
366983
367165
|
get outputSchema() {
|
|
366984
|
-
return
|
|
367166
|
+
return outputSchema24();
|
|
366985
367167
|
},
|
|
366986
367168
|
userFacingName() {
|
|
366987
367169
|
return "Exiting worktree";
|
|
@@ -367152,13 +367334,13 @@ All tasks are created with status \`pending\`.
|
|
|
367152
367334
|
${teammateTips}- Check TaskList first to avoid creating duplicate tasks
|
|
367153
367335
|
`;
|
|
367154
367336
|
}
|
|
367155
|
-
var
|
|
367337
|
+
var DESCRIPTION14 = "Create a new task in the task list";
|
|
367156
367338
|
var init_prompt17 = __esm(() => {
|
|
367157
367339
|
init_agentSwarmsEnabled();
|
|
367158
367340
|
});
|
|
367159
367341
|
|
|
367160
367342
|
// src/tools/TaskCreateTool/TaskCreateTool.ts
|
|
367161
|
-
var
|
|
367343
|
+
var inputSchema30, outputSchema25, TaskCreateTool;
|
|
367162
367344
|
var init_TaskCreateTool = __esm(() => {
|
|
367163
367345
|
init_v4();
|
|
367164
367346
|
init_Tool();
|
|
@@ -367166,13 +367348,13 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
367166
367348
|
init_tasks();
|
|
367167
367349
|
init_teammate();
|
|
367168
367350
|
init_prompt17();
|
|
367169
|
-
|
|
367351
|
+
inputSchema30 = lazySchema(() => exports_external.strictObject({
|
|
367170
367352
|
subject: exports_external.string().describe("A brief title for the task"),
|
|
367171
367353
|
description: exports_external.string().describe("What needs to be done"),
|
|
367172
367354
|
activeForm: exports_external.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
|
|
367173
367355
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Arbitrary metadata to attach to the task")
|
|
367174
367356
|
}));
|
|
367175
|
-
|
|
367357
|
+
outputSchema25 = lazySchema(() => exports_external.object({
|
|
367176
367358
|
task: exports_external.object({
|
|
367177
367359
|
id: exports_external.string(),
|
|
367178
367360
|
subject: exports_external.string()
|
|
@@ -367183,16 +367365,16 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
367183
367365
|
searchHint: "create a task in the task list",
|
|
367184
367366
|
maxResultSizeChars: 1e5,
|
|
367185
367367
|
async description() {
|
|
367186
|
-
return
|
|
367368
|
+
return DESCRIPTION14;
|
|
367187
367369
|
},
|
|
367188
367370
|
async prompt() {
|
|
367189
367371
|
return getPrompt4();
|
|
367190
367372
|
},
|
|
367191
367373
|
get inputSchema() {
|
|
367192
|
-
return
|
|
367374
|
+
return inputSchema30();
|
|
367193
367375
|
},
|
|
367194
367376
|
get outputSchema() {
|
|
367195
|
-
return
|
|
367377
|
+
return outputSchema25();
|
|
367196
367378
|
},
|
|
367197
367379
|
userFacingName() {
|
|
367198
367380
|
return "TaskCreate";
|
|
@@ -367259,7 +367441,7 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
367259
367441
|
});
|
|
367260
367442
|
|
|
367261
367443
|
// src/tools/TaskGetTool/prompt.ts
|
|
367262
|
-
var
|
|
367444
|
+
var DESCRIPTION15 = "Get a task by ID from the task list", PROMPT6 = `Use this tool to retrieve a task by its ID from the task list.
|
|
367263
367445
|
|
|
367264
367446
|
## When to Use This Tool
|
|
367265
367447
|
|
|
@@ -367283,15 +367465,15 @@ Returns full task details:
|
|
|
367283
367465
|
`;
|
|
367284
367466
|
|
|
367285
367467
|
// src/tools/TaskGetTool/TaskGetTool.ts
|
|
367286
|
-
var
|
|
367468
|
+
var inputSchema31, outputSchema26, TaskGetTool;
|
|
367287
367469
|
var init_TaskGetTool = __esm(() => {
|
|
367288
367470
|
init_v4();
|
|
367289
367471
|
init_Tool();
|
|
367290
367472
|
init_tasks();
|
|
367291
|
-
|
|
367473
|
+
inputSchema31 = lazySchema(() => exports_external.strictObject({
|
|
367292
367474
|
taskId: exports_external.string().describe("The ID of the task to retrieve")
|
|
367293
367475
|
}));
|
|
367294
|
-
|
|
367476
|
+
outputSchema26 = lazySchema(() => exports_external.object({
|
|
367295
367477
|
task: exports_external.object({
|
|
367296
367478
|
id: exports_external.string(),
|
|
367297
367479
|
subject: exports_external.string(),
|
|
@@ -367306,16 +367488,16 @@ var init_TaskGetTool = __esm(() => {
|
|
|
367306
367488
|
searchHint: "retrieve a task by ID",
|
|
367307
367489
|
maxResultSizeChars: 1e5,
|
|
367308
367490
|
async description() {
|
|
367309
|
-
return
|
|
367491
|
+
return DESCRIPTION15;
|
|
367310
367492
|
},
|
|
367311
367493
|
async prompt() {
|
|
367312
367494
|
return PROMPT6;
|
|
367313
367495
|
},
|
|
367314
367496
|
get inputSchema() {
|
|
367315
|
-
return
|
|
367497
|
+
return inputSchema31();
|
|
367316
367498
|
},
|
|
367317
367499
|
get outputSchema() {
|
|
367318
|
-
return
|
|
367500
|
+
return outputSchema26();
|
|
367319
367501
|
},
|
|
367320
367502
|
userFacingName() {
|
|
367321
367503
|
return "TaskGet";
|
|
@@ -367390,7 +367572,7 @@ var init_TaskGetTool = __esm(() => {
|
|
|
367390
367572
|
});
|
|
367391
367573
|
|
|
367392
367574
|
// src/tools/TaskUpdateTool/prompt.ts
|
|
367393
|
-
var
|
|
367575
|
+
var DESCRIPTION16 = "Update a task in the task list", PROMPT7 = `Use this tool to update a task in the task list.
|
|
367394
367576
|
|
|
367395
367577
|
## When to Use This Tool
|
|
367396
367578
|
|
|
@@ -367467,7 +367649,7 @@ Set up task dependencies:
|
|
|
367467
367649
|
`;
|
|
367468
367650
|
|
|
367469
367651
|
// src/tools/TaskUpdateTool/TaskUpdateTool.ts
|
|
367470
|
-
var
|
|
367652
|
+
var inputSchema32, outputSchema27, TaskUpdateTool;
|
|
367471
367653
|
var init_TaskUpdateTool = __esm(() => {
|
|
367472
367654
|
init_v4();
|
|
367473
367655
|
init_growthbook();
|
|
@@ -367478,7 +367660,7 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
367478
367660
|
init_teammate();
|
|
367479
367661
|
init_teammateMailbox();
|
|
367480
367662
|
init_constants3();
|
|
367481
|
-
|
|
367663
|
+
inputSchema32 = lazySchema(() => {
|
|
367482
367664
|
const TaskUpdateStatusSchema = TaskStatusSchema2().or(exports_external.literal("deleted"));
|
|
367483
367665
|
return exports_external.strictObject({
|
|
367484
367666
|
taskId: exports_external.string().describe("The ID of the task to update"),
|
|
@@ -367492,7 +367674,7 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
367492
367674
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Metadata keys to merge into the task. Set a key to null to delete it.")
|
|
367493
367675
|
});
|
|
367494
367676
|
});
|
|
367495
|
-
|
|
367677
|
+
outputSchema27 = lazySchema(() => exports_external.object({
|
|
367496
367678
|
success: exports_external.boolean(),
|
|
367497
367679
|
taskId: exports_external.string(),
|
|
367498
367680
|
updatedFields: exports_external.array(exports_external.string()),
|
|
@@ -367508,16 +367690,16 @@ var init_TaskUpdateTool = __esm(() => {
|
|
|
367508
367690
|
searchHint: "update a task",
|
|
367509
367691
|
maxResultSizeChars: 1e5,
|
|
367510
367692
|
async description() {
|
|
367511
|
-
return
|
|
367693
|
+
return DESCRIPTION16;
|
|
367512
367694
|
},
|
|
367513
367695
|
async prompt() {
|
|
367514
367696
|
return PROMPT7;
|
|
367515
367697
|
},
|
|
367516
367698
|
get inputSchema() {
|
|
367517
|
-
return
|
|
367699
|
+
return inputSchema32();
|
|
367518
367700
|
},
|
|
367519
367701
|
get outputSchema() {
|
|
367520
|
-
return
|
|
367702
|
+
return outputSchema27();
|
|
367521
367703
|
},
|
|
367522
367704
|
userFacingName() {
|
|
367523
367705
|
return "TaskUpdate";
|
|
@@ -367767,20 +367949,20 @@ ${idDescription}
|
|
|
367767
367949
|
Use TaskGet with a specific task ID to view full details including description and comments.
|
|
367768
367950
|
${teammateWorkflow}`;
|
|
367769
367951
|
}
|
|
367770
|
-
var
|
|
367952
|
+
var DESCRIPTION17 = "List all tasks in the task list";
|
|
367771
367953
|
var init_prompt18 = __esm(() => {
|
|
367772
367954
|
init_agentSwarmsEnabled();
|
|
367773
367955
|
});
|
|
367774
367956
|
|
|
367775
367957
|
// src/tools/TaskListTool/TaskListTool.ts
|
|
367776
|
-
var
|
|
367958
|
+
var inputSchema33, outputSchema28, TaskListTool;
|
|
367777
367959
|
var init_TaskListTool = __esm(() => {
|
|
367778
367960
|
init_v4();
|
|
367779
367961
|
init_Tool();
|
|
367780
367962
|
init_tasks();
|
|
367781
367963
|
init_prompt18();
|
|
367782
|
-
|
|
367783
|
-
|
|
367964
|
+
inputSchema33 = lazySchema(() => exports_external.strictObject({}));
|
|
367965
|
+
outputSchema28 = lazySchema(() => exports_external.object({
|
|
367784
367966
|
tasks: exports_external.array(exports_external.object({
|
|
367785
367967
|
id: exports_external.string(),
|
|
367786
367968
|
subject: exports_external.string(),
|
|
@@ -367794,16 +367976,16 @@ var init_TaskListTool = __esm(() => {
|
|
|
367794
367976
|
searchHint: "list all tasks",
|
|
367795
367977
|
maxResultSizeChars: 1e5,
|
|
367796
367978
|
async description() {
|
|
367797
|
-
return
|
|
367979
|
+
return DESCRIPTION17;
|
|
367798
367980
|
},
|
|
367799
367981
|
async prompt() {
|
|
367800
367982
|
return getPrompt5();
|
|
367801
367983
|
},
|
|
367802
367984
|
get inputSchema() {
|
|
367803
|
-
return
|
|
367985
|
+
return inputSchema33();
|
|
367804
367986
|
},
|
|
367805
367987
|
get outputSchema() {
|
|
367806
|
-
return
|
|
367988
|
+
return outputSchema28();
|
|
367807
367989
|
},
|
|
367808
367990
|
userFacingName() {
|
|
367809
367991
|
return "TaskList";
|
|
@@ -367954,7 +368136,7 @@ var exports_CronCreateTool = {};
|
|
|
367954
368136
|
__export(exports_CronCreateTool, {
|
|
367955
368137
|
CronCreateTool: () => CronCreateTool
|
|
367956
368138
|
});
|
|
367957
|
-
var MAX_JOBS = 50,
|
|
368139
|
+
var MAX_JOBS = 50, inputSchema34, outputSchema29, CronCreateTool;
|
|
367958
368140
|
var init_CronCreateTool = __esm(() => {
|
|
367959
368141
|
init_v4();
|
|
367960
368142
|
init_state();
|
|
@@ -367965,13 +368147,13 @@ var init_CronCreateTool = __esm(() => {
|
|
|
367965
368147
|
init_teammateContext();
|
|
367966
368148
|
init_prompt10();
|
|
367967
368149
|
init_UI22();
|
|
367968
|
-
|
|
368150
|
+
inputSchema34 = lazySchema(() => exports_external.strictObject({
|
|
367969
368151
|
cron: exports_external.string().describe('Standard 5-field cron expression in local time: "M H DoM Mon DoW" (e.g. "*/5 * * * *" = every 5 minutes, "30 14 28 2 *" = Feb 28 at 2:30pm local once).'),
|
|
367970
368152
|
prompt: exports_external.string().describe("The prompt to enqueue at each fire time."),
|
|
367971
368153
|
recurring: semanticBoolean(exports_external.boolean().optional()).describe(`true (default) = fire on every cron match until deleted or auto-expired after ${DEFAULT_MAX_AGE_DAYS} days. false = fire once at the next match, then auto-delete. Use false for "remind me at X" one-shot requests with pinned minute/hour/dom/month.`),
|
|
367972
368154
|
durable: semanticBoolean(exports_external.boolean().optional()).describe("true = persist to .claude/scheduled_tasks.json and survive restarts. false (default) = in-memory only, dies when this Claude session ends. Use true only when the user asks the task to survive across sessions.")
|
|
367973
368155
|
}));
|
|
367974
|
-
|
|
368156
|
+
outputSchema29 = lazySchema(() => exports_external.object({
|
|
367975
368157
|
id: exports_external.string(),
|
|
367976
368158
|
humanSchedule: exports_external.string(),
|
|
367977
368159
|
recurring: exports_external.boolean(),
|
|
@@ -367983,10 +368165,10 @@ var init_CronCreateTool = __esm(() => {
|
|
|
367983
368165
|
maxResultSizeChars: 1e5,
|
|
367984
368166
|
shouldDefer: true,
|
|
367985
368167
|
get inputSchema() {
|
|
367986
|
-
return
|
|
368168
|
+
return inputSchema34();
|
|
367987
368169
|
},
|
|
367988
368170
|
get outputSchema() {
|
|
367989
|
-
return
|
|
368171
|
+
return outputSchema29();
|
|
367990
368172
|
},
|
|
367991
368173
|
isEnabled() {
|
|
367992
368174
|
return isKairosCronEnabled();
|
|
@@ -368066,7 +368248,7 @@ var exports_CronDeleteTool = {};
|
|
|
368066
368248
|
__export(exports_CronDeleteTool, {
|
|
368067
368249
|
CronDeleteTool: () => CronDeleteTool
|
|
368068
368250
|
});
|
|
368069
|
-
var
|
|
368251
|
+
var inputSchema35, outputSchema30, CronDeleteTool;
|
|
368070
368252
|
var init_CronDeleteTool = __esm(() => {
|
|
368071
368253
|
init_v4();
|
|
368072
368254
|
init_Tool();
|
|
@@ -368074,10 +368256,10 @@ var init_CronDeleteTool = __esm(() => {
|
|
|
368074
368256
|
init_teammateContext();
|
|
368075
368257
|
init_prompt10();
|
|
368076
368258
|
init_UI22();
|
|
368077
|
-
|
|
368259
|
+
inputSchema35 = lazySchema(() => exports_external.strictObject({
|
|
368078
368260
|
id: exports_external.string().describe("Job ID returned by CronCreate.")
|
|
368079
368261
|
}));
|
|
368080
|
-
|
|
368262
|
+
outputSchema30 = lazySchema(() => exports_external.object({
|
|
368081
368263
|
id: exports_external.string()
|
|
368082
368264
|
}));
|
|
368083
368265
|
CronDeleteTool = buildTool({
|
|
@@ -368086,10 +368268,10 @@ var init_CronDeleteTool = __esm(() => {
|
|
|
368086
368268
|
maxResultSizeChars: 1e5,
|
|
368087
368269
|
shouldDefer: true,
|
|
368088
368270
|
get inputSchema() {
|
|
368089
|
-
return
|
|
368271
|
+
return inputSchema35();
|
|
368090
368272
|
},
|
|
368091
368273
|
get outputSchema() {
|
|
368092
|
-
return
|
|
368274
|
+
return outputSchema30();
|
|
368093
368275
|
},
|
|
368094
368276
|
isEnabled() {
|
|
368095
368277
|
return isKairosCronEnabled();
|
|
@@ -368147,7 +368329,7 @@ var exports_CronListTool = {};
|
|
|
368147
368329
|
__export(exports_CronListTool, {
|
|
368148
368330
|
CronListTool: () => CronListTool
|
|
368149
368331
|
});
|
|
368150
|
-
var
|
|
368332
|
+
var inputSchema36, outputSchema31, CronListTool;
|
|
368151
368333
|
var init_CronListTool = __esm(() => {
|
|
368152
368334
|
init_v4();
|
|
368153
368335
|
init_Tool();
|
|
@@ -368157,8 +368339,8 @@ var init_CronListTool = __esm(() => {
|
|
|
368157
368339
|
init_teammateContext();
|
|
368158
368340
|
init_prompt10();
|
|
368159
368341
|
init_UI22();
|
|
368160
|
-
|
|
368161
|
-
|
|
368342
|
+
inputSchema36 = lazySchema(() => exports_external.strictObject({}));
|
|
368343
|
+
outputSchema31 = lazySchema(() => exports_external.object({
|
|
368162
368344
|
jobs: exports_external.array(exports_external.object({
|
|
368163
368345
|
id: exports_external.string(),
|
|
368164
368346
|
cron: exports_external.string(),
|
|
@@ -368174,10 +368356,10 @@ var init_CronListTool = __esm(() => {
|
|
|
368174
368356
|
maxResultSizeChars: 1e5,
|
|
368175
368357
|
shouldDefer: true,
|
|
368176
368358
|
get inputSchema() {
|
|
368177
|
-
return
|
|
368359
|
+
return inputSchema36();
|
|
368178
368360
|
},
|
|
368179
368361
|
get outputSchema() {
|
|
368180
|
-
return
|
|
368362
|
+
return outputSchema31();
|
|
368181
368363
|
},
|
|
368182
368364
|
isEnabled() {
|
|
368183
368365
|
return isKairosCronEnabled();
|
|
@@ -368227,7 +368409,7 @@ __export(exports_MonitorTool, {
|
|
|
368227
368409
|
MonitorTool: () => MonitorTool,
|
|
368228
368410
|
MONITOR_TOOL_NAME: () => MONITOR_TOOL_NAME
|
|
368229
368411
|
});
|
|
368230
|
-
var MONITOR_TOOL_NAME = "Monitor", MONITOR_TIMEOUT_MS,
|
|
368412
|
+
var MONITOR_TOOL_NAME = "Monitor", MONITOR_TIMEOUT_MS, inputSchema37, outputSchema32, MonitorTool;
|
|
368231
368413
|
var init_MonitorTool = __esm(() => {
|
|
368232
368414
|
init_v4();
|
|
368233
368415
|
init_Tool();
|
|
@@ -368237,11 +368419,11 @@ var init_MonitorTool = __esm(() => {
|
|
|
368237
368419
|
init_bashPermissions();
|
|
368238
368420
|
init_ast();
|
|
368239
368421
|
MONITOR_TIMEOUT_MS = 30 * 60 * 1000;
|
|
368240
|
-
|
|
368422
|
+
inputSchema37 = lazySchema(() => exports_external.strictObject({
|
|
368241
368423
|
command: exports_external.string().describe("The shell command to run and monitor"),
|
|
368242
368424
|
description: exports_external.string().describe("Clear, concise description of what this command does in active voice.")
|
|
368243
368425
|
}));
|
|
368244
|
-
|
|
368426
|
+
outputSchema32 = lazySchema(() => exports_external.object({
|
|
368245
368427
|
taskId: exports_external.string().describe("The ID of the background monitor task"),
|
|
368246
368428
|
outputFile: exports_external.string().describe("Path to the file where output is being written")
|
|
368247
368429
|
}));
|
|
@@ -368282,10 +368464,10 @@ var init_MonitorTool = __esm(() => {
|
|
|
368282
368464
|
return `Execute a shell command in the background and stream its stdout line-by-line as notifications. Each polling interval (~1s), new output lines are delivered to you. Use this for monitoring logs, watching build output, or observing long-running processes. For one-shot "wait until done" commands, prefer Bash with run_in_background instead.`;
|
|
368283
368465
|
},
|
|
368284
368466
|
get inputSchema() {
|
|
368285
|
-
return
|
|
368467
|
+
return inputSchema37();
|
|
368286
368468
|
},
|
|
368287
368469
|
get outputSchema() {
|
|
368288
|
-
return
|
|
368470
|
+
return outputSchema32();
|
|
368289
368471
|
},
|
|
368290
368472
|
userFacingName() {
|
|
368291
368473
|
return "Monitor";
|
|
@@ -368482,7 +368664,7 @@ function generateUniqueTeamName(providedName) {
|
|
|
368482
368664
|
}
|
|
368483
368665
|
return generateWordSlug();
|
|
368484
368666
|
}
|
|
368485
|
-
var
|
|
368667
|
+
var inputSchema38, TeamCreateTool;
|
|
368486
368668
|
var init_TeamCreateTool = __esm(() => {
|
|
368487
368669
|
init_v4();
|
|
368488
368670
|
init_state();
|
|
@@ -368496,7 +368678,7 @@ var init_TeamCreateTool = __esm(() => {
|
|
|
368496
368678
|
init_teammateLayoutManager();
|
|
368497
368679
|
init_tasks();
|
|
368498
368680
|
init_words();
|
|
368499
|
-
|
|
368681
|
+
inputSchema38 = lazySchema(() => exports_external.strictObject({
|
|
368500
368682
|
team_name: exports_external.string().describe("Name for the new team to create."),
|
|
368501
368683
|
description: exports_external.string().optional().describe("Team description/purpose."),
|
|
368502
368684
|
agent_type: exports_external.string().optional().describe('Type/role of the team lead (e.g., "researcher", "test-runner"). ' + "Used for team file and inter-agent coordination.")
|
|
@@ -368510,7 +368692,7 @@ var init_TeamCreateTool = __esm(() => {
|
|
|
368510
368692
|
return "";
|
|
368511
368693
|
},
|
|
368512
368694
|
get inputSchema() {
|
|
368513
|
-
return
|
|
368695
|
+
return inputSchema38();
|
|
368514
368696
|
},
|
|
368515
368697
|
isEnabled() {
|
|
368516
368698
|
return isAgentSwarmsEnabled();
|
|
@@ -368661,7 +368843,7 @@ var exports_TeamDeleteTool = {};
|
|
|
368661
368843
|
__export(exports_TeamDeleteTool, {
|
|
368662
368844
|
TeamDeleteTool: () => TeamDeleteTool
|
|
368663
368845
|
});
|
|
368664
|
-
var
|
|
368846
|
+
var inputSchema39, TeamDeleteTool;
|
|
368665
368847
|
var init_TeamDeleteTool = __esm(() => {
|
|
368666
368848
|
init_v4();
|
|
368667
368849
|
init_Tool();
|
|
@@ -368671,7 +368853,7 @@ var init_TeamDeleteTool = __esm(() => {
|
|
|
368671
368853
|
init_teammateLayoutManager();
|
|
368672
368854
|
init_tasks();
|
|
368673
368855
|
init_UI23();
|
|
368674
|
-
|
|
368856
|
+
inputSchema39 = lazySchema(() => exports_external.strictObject({}));
|
|
368675
368857
|
TeamDeleteTool = buildTool({
|
|
368676
368858
|
name: TEAM_DELETE_TOOL_NAME,
|
|
368677
368859
|
searchHint: "disband a swarm team and clean up",
|
|
@@ -368681,7 +368863,7 @@ var init_TeamDeleteTool = __esm(() => {
|
|
|
368681
368863
|
return "";
|
|
368682
368864
|
},
|
|
368683
368865
|
get inputSchema() {
|
|
368684
|
-
return
|
|
368866
|
+
return inputSchema39();
|
|
368685
368867
|
},
|
|
368686
368868
|
isEnabled() {
|
|
368687
368869
|
return isAgentSwarmsEnabled();
|
|
@@ -369440,7 +369622,7 @@ If you receive a JSON message with \`type: "shutdown_request"\` or \`type: "plan
|
|
|
369440
369622
|
Approving shutdown terminates your process. Rejecting plan sends the teammate back to revise. Don't originate \`shutdown_request\` unless asked. Don't send structured JSON status messages — use TaskUpdate.
|
|
369441
369623
|
`.trim();
|
|
369442
369624
|
}
|
|
369443
|
-
var
|
|
369625
|
+
var DESCRIPTION18 = "Send a message to another agent";
|
|
369444
369626
|
|
|
369445
369627
|
// src/tools/SendMessageTool/UI.tsx
|
|
369446
369628
|
function renderToolUseMessage25(input) {
|
|
@@ -369746,7 +369928,7 @@ async function handlePlanRejection(recipientName, requestId, feedback, context5)
|
|
|
369746
369928
|
}
|
|
369747
369929
|
};
|
|
369748
369930
|
}
|
|
369749
|
-
var StructuredMessage,
|
|
369931
|
+
var StructuredMessage, inputSchema40, SendMessageTool;
|
|
369750
369932
|
var init_SendMessageTool = __esm(() => {
|
|
369751
369933
|
init_v4();
|
|
369752
369934
|
init_state();
|
|
@@ -369786,7 +369968,7 @@ var init_SendMessageTool = __esm(() => {
|
|
|
369786
369968
|
feedback: exports_external.string().optional()
|
|
369787
369969
|
})
|
|
369788
369970
|
]));
|
|
369789
|
-
|
|
369971
|
+
inputSchema40 = lazySchema(() => exports_external.object({
|
|
369790
369972
|
to: exports_external.string().describe('Recipient: teammate name, or "*" for broadcast to all teammates'),
|
|
369791
369973
|
summary: exports_external.string().optional().describe("A 5-10 word summary shown as a preview in the UI (required when message is a string)"),
|
|
369792
369974
|
message: exports_external.union([
|
|
@@ -369802,7 +369984,7 @@ var init_SendMessageTool = __esm(() => {
|
|
|
369802
369984
|
return "SendMessage";
|
|
369803
369985
|
},
|
|
369804
369986
|
get inputSchema() {
|
|
369805
|
-
return
|
|
369987
|
+
return inputSchema40();
|
|
369806
369988
|
},
|
|
369807
369989
|
shouldDefer: true,
|
|
369808
369990
|
isEnabled() {
|
|
@@ -369914,7 +370096,7 @@ var init_SendMessageTool = __esm(() => {
|
|
|
369914
370096
|
return { result: true };
|
|
369915
370097
|
},
|
|
369916
370098
|
async description() {
|
|
369917
|
-
return
|
|
370099
|
+
return DESCRIPTION18;
|
|
369918
370100
|
},
|
|
369919
370101
|
async prompt() {
|
|
369920
370102
|
return getPrompt8();
|
|
@@ -370099,6 +370281,7 @@ function getAllBaseTools() {
|
|
|
370099
370281
|
...SubscribePRTool ? [SubscribePRTool] : [],
|
|
370100
370282
|
...getPowerShellTool2() ? [getPowerShellTool2()] : [],
|
|
370101
370283
|
...SnipTool ? [SnipTool] : [],
|
|
370284
|
+
UserInputTool,
|
|
370102
370285
|
...[],
|
|
370103
370286
|
ListMcpResourcesTool,
|
|
370104
370287
|
ReadMcpResourceTool,
|
|
@@ -370162,6 +370345,7 @@ var init_tools2 = __esm(() => {
|
|
|
370162
370345
|
init_WebFetchTool();
|
|
370163
370346
|
init_TaskStopTool();
|
|
370164
370347
|
init_BriefTool();
|
|
370348
|
+
init_UserInputTool();
|
|
370165
370349
|
init_TaskOutputTool();
|
|
370166
370350
|
init_WebSearchTool();
|
|
370167
370351
|
init_TodoWriteTool();
|
|
@@ -371591,7 +371775,7 @@ function resolveTeamName(input, appState) {
|
|
|
371591
371775
|
return;
|
|
371592
371776
|
return input.team_name || appState.teamContext?.teamName;
|
|
371593
371777
|
}
|
|
371594
|
-
var jsx_dev_runtime154, proactiveModule = null, PROGRESS_THRESHOLD_MS2 = 2000, isBackgroundTasksDisabled2, baseInputSchema, fullInputSchema2, inputSchema8,
|
|
371778
|
+
var jsx_dev_runtime154, proactiveModule = null, PROGRESS_THRESHOLD_MS2 = 2000, isBackgroundTasksDisabled2, baseInputSchema, fullInputSchema2, inputSchema8, outputSchema33, AgentTool;
|
|
371595
371779
|
var init_AgentTool = __esm(() => {
|
|
371596
371780
|
init_Tool();
|
|
371597
371781
|
init_promptCategory();
|
|
@@ -371665,7 +371849,7 @@ var init_AgentTool = __esm(() => {
|
|
|
371665
371849
|
run_in_background: true
|
|
371666
371850
|
}) : schema;
|
|
371667
371851
|
});
|
|
371668
|
-
|
|
371852
|
+
outputSchema33 = lazySchema(() => {
|
|
371669
371853
|
const syncOutputSchema = agentToolResultSchema().extend({
|
|
371670
371854
|
status: exports_external.literal("completed"),
|
|
371671
371855
|
prompt: exports_external.string()
|
|
@@ -371714,7 +371898,7 @@ var init_AgentTool = __esm(() => {
|
|
|
371714
371898
|
return inputSchema8();
|
|
371715
371899
|
},
|
|
371716
371900
|
get outputSchema() {
|
|
371717
|
-
return
|
|
371901
|
+
return outputSchema33();
|
|
371718
371902
|
},
|
|
371719
371903
|
async call({
|
|
371720
371904
|
prompt,
|
|
@@ -376243,7 +376427,7 @@ async function* runShellCommand({
|
|
|
376243
376427
|
}
|
|
376244
376428
|
}
|
|
376245
376429
|
var jsx_dev_runtime155, EOL4 = `
|
|
376246
|
-
`, PROGRESS_THRESHOLD_MS3 = 2000, ASSISTANT_BLOCKING_BUDGET_MS2 = 15000, BASH_SEARCH_COMMANDS, BASH_READ_COMMANDS, BASH_LIST_COMMANDS, BASH_SEMANTIC_NEUTRAL_COMMANDS, BASH_SILENT_COMMANDS, DISALLOWED_AUTO_BACKGROUND_COMMANDS2, isBackgroundTasksDisabled3, fullInputSchema3,
|
|
376430
|
+
`, PROGRESS_THRESHOLD_MS3 = 2000, ASSISTANT_BLOCKING_BUDGET_MS2 = 15000, BASH_SEARCH_COMMANDS, BASH_READ_COMMANDS, BASH_LIST_COMMANDS, BASH_SEMANTIC_NEUTRAL_COMMANDS, BASH_SILENT_COMMANDS, DISALLOWED_AUTO_BACKGROUND_COMMANDS2, isBackgroundTasksDisabled3, fullInputSchema3, inputSchema41, COMMON_BACKGROUND_COMMANDS2, outputSchema34, BashTool;
|
|
376247
376431
|
var init_BashTool = __esm(() => {
|
|
376248
376432
|
init_v4();
|
|
376249
376433
|
init_state();
|
|
@@ -376335,14 +376519,14 @@ For commands that are harder to parse at a glance (piped commands, obscure flags
|
|
|
376335
376519
|
newContent: exports_external.string()
|
|
376336
376520
|
}).optional().describe("Internal: pre-computed sed edit result from preview")
|
|
376337
376521
|
}));
|
|
376338
|
-
|
|
376522
|
+
inputSchema41 = lazySchema(() => isBackgroundTasksDisabled3 ? fullInputSchema3().omit({
|
|
376339
376523
|
run_in_background: true,
|
|
376340
376524
|
_simulatedSedEdit: true
|
|
376341
376525
|
}) : fullInputSchema3().omit({
|
|
376342
376526
|
_simulatedSedEdit: true
|
|
376343
376527
|
}));
|
|
376344
376528
|
COMMON_BACKGROUND_COMMANDS2 = ["npm", "yarn", "pnpm", "node", "python", "python3", "go", "cargo", "make", "docker", "terraform", "webpack", "vite", "jest", "pytest", "curl", "wget", "build", "test", "serve", "watch", "dev"];
|
|
376345
|
-
|
|
376529
|
+
outputSchema34 = lazySchema(() => exports_external.object({
|
|
376346
376530
|
stdout: exports_external.string().describe("The standard output of the command"),
|
|
376347
376531
|
stderr: exports_external.string().describe("The standard error output of the command"),
|
|
376348
376532
|
rawOutputPath: exports_external.string().optional().describe("Path to raw output file for large MCP tool outputs"),
|
|
@@ -376401,7 +376585,7 @@ For commands that are harder to parse at a glance (piped commands, obscure flags
|
|
|
376401
376585
|
};
|
|
376402
376586
|
},
|
|
376403
376587
|
isSearchOrReadCommand(input) {
|
|
376404
|
-
const parsed =
|
|
376588
|
+
const parsed = inputSchema41().safeParse(input);
|
|
376405
376589
|
if (!parsed.success)
|
|
376406
376590
|
return {
|
|
376407
376591
|
isSearch: false,
|
|
@@ -376411,10 +376595,10 @@ For commands that are harder to parse at a glance (piped commands, obscure flags
|
|
|
376411
376595
|
return isSearchOrReadBashCommand(parsed.data.command);
|
|
376412
376596
|
},
|
|
376413
376597
|
get inputSchema() {
|
|
376414
|
-
return
|
|
376598
|
+
return inputSchema41();
|
|
376415
376599
|
},
|
|
376416
376600
|
get outputSchema() {
|
|
376417
|
-
return
|
|
376601
|
+
return outputSchema34();
|
|
376418
376602
|
},
|
|
376419
376603
|
userFacingName(input) {
|
|
376420
376604
|
if (!input) {
|
|
@@ -382376,7 +382560,7 @@ function getAnthropicEnvMetadata() {
|
|
|
382376
382560
|
function getBuildAgeMinutes() {
|
|
382377
382561
|
if (false)
|
|
382378
382562
|
;
|
|
382379
|
-
const buildTime = new Date("2026-04-
|
|
382563
|
+
const buildTime = new Date("2026-04-22T12:04:15.161Z").getTime();
|
|
382380
382564
|
if (isNaN(buildTime))
|
|
382381
382565
|
return;
|
|
382382
382566
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -385787,8 +385971,8 @@ async function calculateDeferredToolDescriptionChars(tools, getToolPermissionCon
|
|
|
385787
385971
|
tools,
|
|
385788
385972
|
agents
|
|
385789
385973
|
});
|
|
385790
|
-
const
|
|
385791
|
-
return tool.name.length + description.length +
|
|
385974
|
+
const inputSchema42 = tool.inputJSONSchema ? jsonStringify(tool.inputJSONSchema) : tool.inputSchema ? jsonStringify(zodToJsonSchema3(tool.inputSchema)) : "";
|
|
385975
|
+
return tool.name.length + description.length + inputSchema42.length;
|
|
385792
385976
|
}));
|
|
385793
385977
|
return sizes.reduce((total, size) => total + size, 0);
|
|
385794
385978
|
}
|
|
@@ -387287,7 +387471,7 @@ async function readImageWithTokenBudget(filePath, maxTokens = getDefaultFileRead
|
|
|
387287
387471
|
}
|
|
387288
387472
|
return result;
|
|
387289
387473
|
}
|
|
387290
|
-
var BLOCKED_DEVICE_PATHS, THIN_SPACE, fileReadListeners, MaxFileReadTokenExceededError, IMAGE_EXTENSIONS,
|
|
387474
|
+
var BLOCKED_DEVICE_PATHS, THIN_SPACE, fileReadListeners, MaxFileReadTokenExceededError, IMAGE_EXTENSIONS, inputSchema42, outputSchema35, FileReadTool, CYBER_RISK_MITIGATION_REMINDER = `
|
|
387291
387475
|
|
|
387292
387476
|
<system-reminder>
|
|
387293
387477
|
Whenever you read a file, you should consider whether it would be considered malware. You CAN and SHOULD provide analysis of malware, what it is doing. But you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer questions about the code behavior.
|
|
@@ -387352,13 +387536,13 @@ var init_FileReadTool = __esm(() => {
|
|
|
387352
387536
|
}
|
|
387353
387537
|
};
|
|
387354
387538
|
IMAGE_EXTENSIONS = new Set(["png", "jpg", "jpeg", "gif", "webp"]);
|
|
387355
|
-
|
|
387539
|
+
inputSchema42 = lazySchema(() => exports_external.strictObject({
|
|
387356
387540
|
file_path: exports_external.string().describe("The absolute path to the file to read"),
|
|
387357
387541
|
offset: semanticNumber(exports_external.number().int().nonnegative().optional()).describe("The line number to start reading from. Only provide if the file is too large to read at once"),
|
|
387358
387542
|
limit: semanticNumber(exports_external.number().int().positive().optional()).describe("The number of lines to read. Only provide if the file is too large to read at once."),
|
|
387359
387543
|
pages: exports_external.string().optional().describe(`Page range for PDF files (e.g., "1-5", "3", "10-20"). Only applicable to PDF files. Maximum ${PDF_MAX_PAGES_PER_READ} pages per request.`)
|
|
387360
387544
|
}));
|
|
387361
|
-
|
|
387545
|
+
outputSchema35 = lazySchema(() => {
|
|
387362
387546
|
const imageMediaTypes = exports_external.enum([
|
|
387363
387547
|
"image/jpeg",
|
|
387364
387548
|
"image/png",
|
|
@@ -387437,10 +387621,10 @@ var init_FileReadTool = __esm(() => {
|
|
|
387437
387621
|
return renderPromptTemplate(pickLineFormatInstruction(), maxSizeInstruction, offsetInstruction);
|
|
387438
387622
|
},
|
|
387439
387623
|
get inputSchema() {
|
|
387440
|
-
return
|
|
387624
|
+
return inputSchema42();
|
|
387441
387625
|
},
|
|
387442
387626
|
get outputSchema() {
|
|
387443
|
-
return
|
|
387627
|
+
return outputSchema35();
|
|
387444
387628
|
},
|
|
387445
387629
|
userFacingName: userFacingName7,
|
|
387446
387630
|
getToolUseSummary: getToolUseSummary8,
|
|
@@ -400968,80 +401152,6 @@ var init_permissionSetup = __esm(() => {
|
|
|
400968
401152
|
NO_CACHED_AUTO_MODE_CONFIG = Symbol("no-cached-auto-mode-config");
|
|
400969
401153
|
});
|
|
400970
401154
|
|
|
400971
|
-
// src/utils/autonomy.ts
|
|
400972
|
-
function normalizeAutonomyMode(value) {
|
|
400973
|
-
return typeof value === "string" && AUTONOMY_MODES.includes(value) ? value : "off";
|
|
400974
|
-
}
|
|
400975
|
-
function getAutonomyModeFromSettings(settings) {
|
|
400976
|
-
return normalizeAutonomyMode(settings?.autonomyMode);
|
|
400977
|
-
}
|
|
400978
|
-
function autonomyModeTitle(mode) {
|
|
400979
|
-
switch (mode) {
|
|
400980
|
-
case "smart":
|
|
400981
|
-
return "SMART";
|
|
400982
|
-
case "aggressive":
|
|
400983
|
-
return "AGGRESSIVE";
|
|
400984
|
-
default:
|
|
400985
|
-
return "OFF";
|
|
400986
|
-
}
|
|
400987
|
-
}
|
|
400988
|
-
function autonomyModeDescription(mode) {
|
|
400989
|
-
switch (mode) {
|
|
400990
|
-
case "smart":
|
|
400991
|
-
return "Classifier-driven autonomy with minimal prompts for routine work.";
|
|
400992
|
-
case "aggressive":
|
|
400993
|
-
return "Maximum autonomy with bypass-style execution and no permission prompts.";
|
|
400994
|
-
default:
|
|
400995
|
-
return "Manual approval flow stays in control.";
|
|
400996
|
-
}
|
|
400997
|
-
}
|
|
400998
|
-
function autonomyModeColor(mode) {
|
|
400999
|
-
switch (mode) {
|
|
401000
|
-
case "smart":
|
|
401001
|
-
return "promptBorder";
|
|
401002
|
-
case "aggressive":
|
|
401003
|
-
return "claude";
|
|
401004
|
-
default:
|
|
401005
|
-
return "inactive";
|
|
401006
|
-
}
|
|
401007
|
-
}
|
|
401008
|
-
function getNextAutonomyMode(mode) {
|
|
401009
|
-
switch (mode) {
|
|
401010
|
-
case "off":
|
|
401011
|
-
return "smart";
|
|
401012
|
-
case "smart":
|
|
401013
|
-
return "aggressive";
|
|
401014
|
-
default:
|
|
401015
|
-
return "off";
|
|
401016
|
-
}
|
|
401017
|
-
}
|
|
401018
|
-
function autonomyModeToPermissionMode(mode, context5) {
|
|
401019
|
-
switch (mode) {
|
|
401020
|
-
case "aggressive":
|
|
401021
|
-
return "bypassPermissions";
|
|
401022
|
-
case "smart":
|
|
401023
|
-
if (false) {}
|
|
401024
|
-
return "acceptEdits";
|
|
401025
|
-
default:
|
|
401026
|
-
return "default";
|
|
401027
|
-
}
|
|
401028
|
-
}
|
|
401029
|
-
function applyAutonomyModeToPermissionContext(context5, autonomyMode) {
|
|
401030
|
-
const targetMode = autonomyModeToPermissionMode(autonomyMode, context5);
|
|
401031
|
-
const contextWithAvailability = autonomyMode === "aggressive" ? { ...context5, isBypassPermissionsModeAvailable: true } : context5;
|
|
401032
|
-
const transitioned = transitionPermissionMode(context5.mode, targetMode, contextWithAvailability);
|
|
401033
|
-
return {
|
|
401034
|
-
...transitioned,
|
|
401035
|
-
mode: targetMode,
|
|
401036
|
-
...autonomyMode === "aggressive" ? { isBypassPermissionsModeAvailable: true } : {}
|
|
401037
|
-
};
|
|
401038
|
-
}
|
|
401039
|
-
var AUTONOMY_MODES;
|
|
401040
|
-
var init_autonomy = __esm(() => {
|
|
401041
|
-
init_permissionSetup();
|
|
401042
|
-
AUTONOMY_MODES = ["off", "smart", "aggressive"];
|
|
401043
|
-
});
|
|
401044
|
-
|
|
401045
401155
|
// src/utils/settings/applySettingsChange.ts
|
|
401046
401156
|
function applySettingsChange(source, setAppState) {
|
|
401047
401157
|
const newSettings = getInitialSettings();
|
|
@@ -404852,7 +404962,7 @@ function PermissionDescription() {
|
|
|
404852
404962
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
404853
404963
|
t0 = /* @__PURE__ */ jsx_dev_runtime162.jsxDEV(ThemedText, {
|
|
404854
404964
|
dimColor: true,
|
|
404855
|
-
children: "
|
|
404965
|
+
children: "Stratagem will be able to read files in this directory and make edits when auto-accept edits is on."
|
|
404856
404966
|
}, undefined, false, undefined, this);
|
|
404857
404967
|
$2[0] = t0;
|
|
404858
404968
|
} else {
|
|
@@ -409632,7 +409742,7 @@ function buildPrimarySection() {
|
|
|
409632
409742
|
}, undefined, false, undefined, this);
|
|
409633
409743
|
return [{
|
|
409634
409744
|
label: "Version",
|
|
409635
|
-
value: "0.3.
|
|
409745
|
+
value: "0.3.2"
|
|
409636
409746
|
}, {
|
|
409637
409747
|
label: "Session name",
|
|
409638
409748
|
value: nameValue
|
|
@@ -412297,7 +412407,7 @@ function OutputStylePicker(t0) {
|
|
|
412297
412407
|
marginTop: 1,
|
|
412298
412408
|
children: /* @__PURE__ */ jsx_dev_runtime179.jsxDEV(ThemedText, {
|
|
412299
412409
|
dimColor: true,
|
|
412300
|
-
children: "This changes how
|
|
412410
|
+
children: "This changes how Stratagem communicates with you"
|
|
412301
412411
|
}, undefined, false, undefined, this)
|
|
412302
412412
|
}, undefined, false, undefined, this);
|
|
412303
412413
|
$2[5] = t7;
|
|
@@ -423074,7 +423184,7 @@ function General() {
|
|
|
423074
423184
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
423075
423185
|
t0 = /* @__PURE__ */ jsx_dev_runtime210.jsxDEV(ThemedBox_default, {
|
|
423076
423186
|
children: /* @__PURE__ */ jsx_dev_runtime210.jsxDEV(ThemedText, {
|
|
423077
|
-
children: "
|
|
423187
|
+
children: "Stratagem understands your codebase, makes edits with your permission, and executes commands — right from your terminal."
|
|
423078
423188
|
}, undefined, false, undefined, this)
|
|
423079
423189
|
}, undefined, false, undefined, this);
|
|
423080
423190
|
$2[0] = t0;
|
|
@@ -423252,7 +423362,7 @@ function HelpV2(t0) {
|
|
|
423252
423362
|
let t6;
|
|
423253
423363
|
if ($2[31] !== tabs) {
|
|
423254
423364
|
t6 = /* @__PURE__ */ jsx_dev_runtime211.jsxDEV(Tabs, {
|
|
423255
|
-
title: `
|
|
423365
|
+
title: `STRATAGEM X7 v${"99.0.0"}`,
|
|
423256
423366
|
color: "professionalBlue",
|
|
423257
423367
|
defaultTab: "general",
|
|
423258
423368
|
children: tabs
|
|
@@ -449248,7 +449358,7 @@ function getStartupLines(termWidth) {
|
|
|
449248
449358
|
const provC = p.isLocal ? [160, 255, 214] : CYAN;
|
|
449249
449359
|
let [r, l] = lbl("Provider", p.name, provC);
|
|
449250
449360
|
out.push(centerAnsiLine(boxRow(r, W2, l), tw));
|
|
449251
|
-
[r, l] = lbl("
|
|
449361
|
+
[r, l] = lbl("Model", p.model);
|
|
449252
449362
|
out.push(centerAnsiLine(boxRow(r, W2, l), tw));
|
|
449253
449363
|
const ep = p.baseUrl.length > 46 ? p.baseUrl.slice(0, 43) + "..." : p.baseUrl;
|
|
449254
449364
|
[r, l] = lbl("Uplink", ep);
|
|
@@ -449260,7 +449370,7 @@ function getStartupLines(termWidth) {
|
|
|
449260
449370
|
const sLen = ` ● ${sL} buffer ready — /help for breach controls`.length;
|
|
449261
449371
|
out.push(centerAnsiLine(boxRow(sRow, W2, sLen), tw));
|
|
449262
449372
|
out.push(centerAnsiLine(`${rgb3(...BORDER)}└${"─".repeat(W2 - 2)}┘${RESET2}`, tw));
|
|
449263
|
-
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.
|
|
449373
|
+
out.push(centerAnsiLine(`${rgb3(...DIMCOL)}STRATAGEM X7${RESET2} ${rgb3(...ACCENT)}v${"0.3.2"}${RESET2} ${rgb3(...CYAN)}// breach link stable${RESET2}`, tw));
|
|
449264
449374
|
out.push("");
|
|
449265
449375
|
return out;
|
|
449266
449376
|
}
|
|
@@ -464036,7 +464146,7 @@ function RemoveWorkspaceDirectory(t0) {
|
|
|
464036
464146
|
let t4;
|
|
464037
464147
|
if ($2[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
464038
464148
|
t4 = /* @__PURE__ */ jsx_dev_runtime291.jsxDEV(ThemedText, {
|
|
464039
|
-
children: "
|
|
464149
|
+
children: "Stratagem will no longer have access to files in this directory."
|
|
464040
464150
|
}, undefined, false, undefined, this);
|
|
464041
464151
|
$2[10] = t4;
|
|
464042
464152
|
} else {
|
|
@@ -465482,7 +465592,7 @@ function PermissionRuleList(t0) {
|
|
|
465482
465592
|
let t28;
|
|
465483
465593
|
if ($2[89] === Symbol.for("react.memo_cache_sentinel")) {
|
|
465484
465594
|
t28 = /* @__PURE__ */ jsx_dev_runtime293.jsxDEV(ThemedText, {
|
|
465485
|
-
children: "
|
|
465595
|
+
children: "Stratagem can read files in the workspace, and make edits when auto-accept edits is on."
|
|
465486
465596
|
}, undefined, false, undefined, this);
|
|
465487
465597
|
$2[89] = t28;
|
|
465488
465598
|
} else {
|
|
@@ -477800,7 +477910,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
477800
477910
|
var call60 = async () => {
|
|
477801
477911
|
return {
|
|
477802
477912
|
type: "text",
|
|
477803
|
-
value: `${"99.0.0"} (built ${"2026-04-
|
|
477913
|
+
value: `${"99.0.0"} (built ${"2026-04-22T12:04:15.161Z"})`
|
|
477804
477914
|
};
|
|
477805
477915
|
}, version2, version_default;
|
|
477806
477916
|
var init_version = __esm(() => {
|
|
@@ -478995,7 +479105,7 @@ function OverridesSelect(t0) {
|
|
|
478995
479105
|
children: "Allow unsandboxed fallback:"
|
|
478996
479106
|
}, undefined, false, undefined, this),
|
|
478997
479107
|
" ",
|
|
478998
|
-
"When a command fails due to sandbox restrictions,
|
|
479108
|
+
"When a command fails due to sandbox restrictions, Stratagem can retry with dangerouslyDisableSandbox to run outside the sandbox (falling back to default permissions)."
|
|
478999
479109
|
]
|
|
479000
479110
|
}, undefined, true, undefined, this);
|
|
479001
479111
|
$2[20] = t11;
|
|
@@ -483033,7 +483143,7 @@ function EffortPicker({ onSelect, onCancel }) {
|
|
|
483033
483143
|
}, undefined, false, undefined, this),
|
|
483034
483144
|
/* @__PURE__ */ jsx_dev_runtime353.jsxDEV(ThemedText, {
|
|
483035
483145
|
dimColor: true,
|
|
483036
|
-
children: supportsEffort && usesOpenAIEffort ? `OpenAI/Codex provider (${provider2})` : supportsEffort ? `
|
|
483146
|
+
children: supportsEffort && usesOpenAIEffort ? `OpenAI/Codex provider (${provider2})` : supportsEffort ? `Stratagem model · ${provider2} provider` : `Effort not supported for this model`
|
|
483037
483147
|
}, undefined, false, undefined, this)
|
|
483038
483148
|
]
|
|
483039
483149
|
}, undefined, true, undefined, this),
|
|
@@ -484765,7 +484875,7 @@ function Stats(t0) {
|
|
|
484765
484875
|
children: [
|
|
484766
484876
|
/* @__PURE__ */ jsx_dev_runtime355.jsxDEV(Spinner, {}, undefined, false, undefined, this),
|
|
484767
484877
|
/* @__PURE__ */ jsx_dev_runtime355.jsxDEV(ThemedText, {
|
|
484768
|
-
children: " Loading your
|
|
484878
|
+
children: " Loading your Stratagem stats…"
|
|
484769
484879
|
}, undefined, false, undefined, this)
|
|
484770
484880
|
]
|
|
484771
484881
|
}, undefined, true, undefined, this);
|
|
@@ -484926,7 +485036,7 @@ function StatsContent(t0) {
|
|
|
484926
485036
|
marginTop: 1,
|
|
484927
485037
|
children: /* @__PURE__ */ jsx_dev_runtime355.jsxDEV(ThemedText, {
|
|
484928
485038
|
color: "warning",
|
|
484929
|
-
children: "No stats available yet. Start using
|
|
485039
|
+
children: "No stats available yet. Start using Stratagem!"
|
|
484930
485040
|
}, undefined, false, undefined, this)
|
|
484931
485041
|
}, undefined, false, undefined, this);
|
|
484932
485042
|
$2[15] = t72;
|
|
@@ -513858,7 +513968,7 @@ function EnterPlanModePermissionRequest(t0) {
|
|
|
513858
513968
|
let t2;
|
|
513859
513969
|
if ($2[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
513860
513970
|
t2 = /* @__PURE__ */ jsx_dev_runtime383.jsxDEV(ThemedText, {
|
|
513861
|
-
children: "
|
|
513971
|
+
children: "Stratagem wants to enter plan mode to explore and design an implementation approach."
|
|
513862
513972
|
}, undefined, false, undefined, this);
|
|
513863
513973
|
$2[5] = t2;
|
|
513864
513974
|
} else {
|
|
@@ -513872,7 +513982,7 @@ function EnterPlanModePermissionRequest(t0) {
|
|
|
513872
513982
|
children: [
|
|
513873
513983
|
/* @__PURE__ */ jsx_dev_runtime383.jsxDEV(ThemedText, {
|
|
513874
513984
|
dimColor: true,
|
|
513875
|
-
children: "In plan mode,
|
|
513985
|
+
children: "In plan mode, Stratagem will:"
|
|
513876
513986
|
}, undefined, false, undefined, this),
|
|
513877
513987
|
/* @__PURE__ */ jsx_dev_runtime383.jsxDEV(ThemedText, {
|
|
513878
513988
|
dimColor: true,
|
|
@@ -514449,7 +514559,7 @@ ${currentPlan}${verificationInstruction}${transcriptHint}${teamHint}${feedbackSu
|
|
|
514449
514559
|
marginTop: 1,
|
|
514450
514560
|
children: [
|
|
514451
514561
|
/* @__PURE__ */ jsx_dev_runtime384.jsxDEV(ThemedText, {
|
|
514452
|
-
children: "
|
|
514562
|
+
children: "Stratagem wants to exit plan mode"
|
|
514453
514563
|
}, undefined, false, undefined, this),
|
|
514454
514564
|
/* @__PURE__ */ jsx_dev_runtime384.jsxDEV(ThemedBox_default, {
|
|
514455
514565
|
marginTop: 1,
|
|
@@ -514498,7 +514608,7 @@ ${currentPlan}${verificationInstruction}${transcriptHint}${teamHint}${feedbackSu
|
|
|
514498
514608
|
paddingX: 1,
|
|
514499
514609
|
flexDirection: "column",
|
|
514500
514610
|
children: /* @__PURE__ */ jsx_dev_runtime384.jsxDEV(ThemedText, {
|
|
514501
|
-
children: "Here is
|
|
514611
|
+
children: "Here is Stratagem's plan:"
|
|
514502
514612
|
}, undefined, false, undefined, this)
|
|
514503
514613
|
}, undefined, false, undefined, this),
|
|
514504
514614
|
/* @__PURE__ */ jsx_dev_runtime384.jsxDEV(ThemedBox_default, {
|
|
@@ -514549,7 +514659,7 @@ ${currentPlan}${verificationInstruction}${transcriptHint}${teamHint}${feedbackSu
|
|
|
514549
514659
|
children: [
|
|
514550
514660
|
/* @__PURE__ */ jsx_dev_runtime384.jsxDEV(ThemedText, {
|
|
514551
514661
|
dimColor: true,
|
|
514552
|
-
children: "
|
|
514662
|
+
children: "Stratagem has written up a plan and is ready to execute. Would you like to proceed?"
|
|
514553
514663
|
}, undefined, false, undefined, this),
|
|
514554
514664
|
/* @__PURE__ */ jsx_dev_runtime384.jsxDEV(ThemedBox_default, {
|
|
514555
514665
|
marginTop: 1,
|
|
@@ -514655,7 +514765,7 @@ function buildPlanApprovalOptions({
|
|
|
514655
514765
|
});
|
|
514656
514766
|
if (showUltraplan) {
|
|
514657
514767
|
options2.push({
|
|
514658
|
-
label: "No, refine with Ultraplan on
|
|
514768
|
+
label: "No, refine with Ultraplan on the web",
|
|
514659
514769
|
value: "ultraplan"
|
|
514660
514770
|
});
|
|
514661
514771
|
}
|
|
@@ -517463,7 +517573,7 @@ function SkillPermissionRequest(props) {
|
|
|
517463
517573
|
let t13;
|
|
517464
517574
|
if ($2[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
517465
517575
|
t13 = /* @__PURE__ */ jsx_dev_runtime394.jsxDEV(ThemedText, {
|
|
517466
|
-
children: "
|
|
517576
|
+
children: "Stratagem may use instructions, code, or files from this Skill."
|
|
517467
517577
|
}, undefined, false, undefined, this);
|
|
517468
517578
|
$2[33] = t13;
|
|
517469
517579
|
} else {
|
|
@@ -517673,7 +517783,7 @@ function WebFetchPermissionRequest(t0) {
|
|
|
517673
517783
|
t52 = {
|
|
517674
517784
|
label: /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
|
|
517675
517785
|
children: [
|
|
517676
|
-
"No, and tell
|
|
517786
|
+
"No, and tell Stratagem what to do differently ",
|
|
517677
517787
|
/* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
|
|
517678
517788
|
bold: true,
|
|
517679
517789
|
children: "(esc)"
|
|
@@ -517801,7 +517911,7 @@ function WebFetchPermissionRequest(t0) {
|
|
|
517801
517911
|
let t11;
|
|
517802
517912
|
if ($2[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
517803
517913
|
t11 = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
|
|
517804
|
-
children: "Do you want to allow
|
|
517914
|
+
children: "Do you want to allow Stratagem to fetch this content?"
|
|
517805
517915
|
}, undefined, false, undefined, this);
|
|
517806
517916
|
$2[27] = t11;
|
|
517807
517917
|
} else {
|
|
@@ -518674,7 +518784,7 @@ function ElicitationFormDialog({
|
|
|
518674
518784
|
const currentFieldIsText = currentField !== undefined && isTextField(currentField.schema) && !isEnumSchema(currentField.schema);
|
|
518675
518785
|
const isEditingTextField = currentFieldIsText && !focusedButton;
|
|
518676
518786
|
useRegisterOverlay("elicitation");
|
|
518677
|
-
useNotifyAfterTimeout("
|
|
518787
|
+
useNotifyAfterTimeout("Stratagem needs your input", "elicitation_dialog");
|
|
518678
518788
|
const syncTextInput = import_react217.useCallback((fieldIndex) => {
|
|
518679
518789
|
if (fieldIndex === undefined) {
|
|
518680
518790
|
setTextInputValue("");
|
|
@@ -519525,7 +519635,7 @@ function ElicitationURLDialog({
|
|
|
519525
519635
|
const phaseRef = import_react217.useRef("prompt");
|
|
519526
519636
|
const [focusedButton, setFocusedButton] = import_react217.useState("accept");
|
|
519527
519637
|
const showCancel = waitingState?.showCancel ?? false;
|
|
519528
|
-
useNotifyAfterTimeout("
|
|
519638
|
+
useNotifyAfterTimeout("Stratagem needs your input", "elicitation_url_dialog");
|
|
519529
519639
|
useRegisterOverlay("elicitation-url");
|
|
519530
519640
|
phaseRef.current = phase;
|
|
519531
519641
|
const onWaitingDismissRef = import_react217.useRef(onWaitingDismiss);
|
|
@@ -530305,11 +530415,13 @@ function ModeIndicator({
|
|
|
530305
530415
|
const shouldShowModeHint = primaryItemCount < 2;
|
|
530306
530416
|
const hasInProcessTeammates = !showSpinnerTree && hasBackgroundTasks && Object.values(tasks2).some((t_1) => t_1.type === "in_process_teammate");
|
|
530307
530417
|
const hasTeammatePills = hasInProcessTeammates || !showSpinnerTree && isViewingTeammate;
|
|
530308
|
-
const modePart = currentMode &&
|
|
530309
|
-
color:
|
|
530418
|
+
const modePart = currentMode && !getIsRemoteMode() ? hasActiveMode && currentMode === "plan" ? /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
|
|
530419
|
+
color: getModeColor(currentMode),
|
|
530310
530420
|
children: [
|
|
530311
530421
|
"[",
|
|
530312
|
-
|
|
530422
|
+
permissionModeSymbol(currentMode),
|
|
530423
|
+
" ",
|
|
530424
|
+
permissionModeTitle(currentMode).toUpperCase(),
|
|
530313
530425
|
"]",
|
|
530314
530426
|
shouldShowModeHint && /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
|
|
530315
530427
|
dimColor: true,
|
|
@@ -530324,12 +530436,10 @@ function ModeIndicator({
|
|
|
530324
530436
|
}, undefined, true, undefined, this)
|
|
530325
530437
|
]
|
|
530326
530438
|
}, "mode", true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
|
|
530327
|
-
color:
|
|
530439
|
+
color: autonomyModeColor(autonomyMode),
|
|
530328
530440
|
children: [
|
|
530329
530441
|
"[",
|
|
530330
|
-
|
|
530331
|
-
" ",
|
|
530332
|
-
permissionModeTitle(currentMode).toUpperCase(),
|
|
530442
|
+
`BUFFER:${autonomyModeTitle(autonomyMode)}`,
|
|
530333
530443
|
"]",
|
|
530334
530444
|
shouldShowModeHint && /* @__PURE__ */ jsx_dev_runtime429.jsxDEV(ThemedText, {
|
|
530335
530445
|
dimColor: true,
|
|
@@ -530711,6 +530821,7 @@ function PromptInputFooter({
|
|
|
530711
530821
|
isNarrow
|
|
530712
530822
|
}, undefined, false, undefined, this),
|
|
530713
530823
|
false,
|
|
530824
|
+
/* @__PURE__ */ jsx_dev_runtime430.jsxDEV(ModelIndicator, {}, undefined, false, undefined, this),
|
|
530714
530825
|
/* @__PURE__ */ jsx_dev_runtime430.jsxDEV(CockpitStatusIndicator, {}, undefined, false, undefined, this),
|
|
530715
530826
|
/* @__PURE__ */ jsx_dev_runtime430.jsxDEV(BridgeStatusIndicator, {
|
|
530716
530827
|
bridgeSelected
|
|
@@ -530758,7 +530869,22 @@ function BridgeStatusIndicator({
|
|
|
530758
530869
|
]
|
|
530759
530870
|
}, undefined, true, undefined, this);
|
|
530760
530871
|
}
|
|
530872
|
+
function ModelIndicator() {
|
|
530873
|
+
const model = process.env.OPENAI_MODEL ?? process.env.ANTHROPIC_MODEL ?? process.env.CLAUDE_MODEL ?? "";
|
|
530874
|
+
if (!model)
|
|
530875
|
+
return null;
|
|
530876
|
+
const short = model.includes("/") ? model.split("/").pop() : model;
|
|
530877
|
+
return /* @__PURE__ */ jsx_dev_runtime430.jsxDEV(ThemedText, {
|
|
530878
|
+
dimColor: true,
|
|
530879
|
+
wrap: "truncate",
|
|
530880
|
+
children: `◆ ${short}`
|
|
530881
|
+
}, undefined, false, undefined, this);
|
|
530882
|
+
}
|
|
530761
530883
|
function CockpitStatusIndicator() {
|
|
530884
|
+
const baseUrl = process.env.OPENAI_BASE_URL ?? "";
|
|
530885
|
+
const isCockpitProvider = baseUrl.includes("ollama.com");
|
|
530886
|
+
if (!isCockpitProvider)
|
|
530887
|
+
return null;
|
|
530762
530888
|
const status2 = getPoolStatus("ollama-cloud");
|
|
530763
530889
|
if (!status2)
|
|
530764
530890
|
return null;
|
|
@@ -543293,13 +543419,13 @@ function permissionPromptToolResultToPermissionDecision(result, tool, input, too
|
|
|
543293
543419
|
decisionReason
|
|
543294
543420
|
};
|
|
543295
543421
|
}
|
|
543296
|
-
var
|
|
543422
|
+
var inputSchema43, decisionClassificationField, PermissionAllowResultSchema, PermissionDenyResultSchema, outputSchema36;
|
|
543297
543423
|
var init_PermissionPromptToolResultSchema = __esm(() => {
|
|
543298
543424
|
init_v4();
|
|
543299
543425
|
init_debug();
|
|
543300
543426
|
init_PermissionUpdate();
|
|
543301
543427
|
init_PermissionUpdateSchema();
|
|
543302
|
-
|
|
543428
|
+
inputSchema43 = lazySchema(() => v4_default.object({
|
|
543303
543429
|
tool_name: v4_default.string().describe("The name of the tool requesting permission"),
|
|
543304
543430
|
input: v4_default.record(v4_default.string(), v4_default.unknown()).describe("The input for the tool"),
|
|
543305
543431
|
tool_use_id: v4_default.string().optional().describe("The unique tool use request ID")
|
|
@@ -543322,7 +543448,7 @@ var init_PermissionPromptToolResultSchema = __esm(() => {
|
|
|
543322
543448
|
toolUseID: v4_default.string().optional(),
|
|
543323
543449
|
decisionClassification: decisionClassificationField()
|
|
543324
543450
|
}));
|
|
543325
|
-
|
|
543451
|
+
outputSchema36 = lazySchema(() => v4_default.union([PermissionAllowResultSchema(), PermissionDenyResultSchema()]));
|
|
543326
543452
|
});
|
|
543327
543453
|
|
|
543328
543454
|
// src/cli/ndjsonSafeStringify.ts
|
|
@@ -543664,7 +543790,7 @@ class StructuredIO {
|
|
|
543664
543790
|
decision_reason: serializeDecisionReason(mainPermissionResult.decisionReason),
|
|
543665
543791
|
tool_use_id: toolUseID,
|
|
543666
543792
|
agent_id: toolUseContext.agentId
|
|
543667
|
-
},
|
|
543793
|
+
}, outputSchema36(), hookAbortController.signal, requestId).then((result) => ({ source: "sdk", result }));
|
|
543668
543794
|
const winner = await Promise.race([hookPromise, sdkPromise]);
|
|
543669
543795
|
if (winner.source === "hook") {
|
|
543670
543796
|
if (winner.decision) {
|
|
@@ -543735,7 +543861,7 @@ class StructuredIO {
|
|
|
543735
543861
|
input: { host: hostPattern.host },
|
|
543736
543862
|
tool_use_id: randomUUID44(),
|
|
543737
543863
|
description: `Allow network connection to ${hostPattern.host}?`
|
|
543738
|
-
},
|
|
543864
|
+
}, outputSchema36());
|
|
543739
543865
|
return result.behavior === "allow";
|
|
543740
543866
|
} catch {
|
|
543741
543867
|
return false;
|
|
@@ -543923,7 +544049,7 @@ function SandboxPermissionRequest(t0) {
|
|
|
543923
544049
|
t6 = {
|
|
543924
544050
|
label: /* @__PURE__ */ jsx_dev_runtime449.jsxDEV(ThemedText, {
|
|
543925
544051
|
children: [
|
|
543926
|
-
"No, and tell
|
|
544052
|
+
"No, and tell Stratagem what to do differently ",
|
|
543927
544053
|
/* @__PURE__ */ jsx_dev_runtime449.jsxDEV(ThemedText, {
|
|
543928
544054
|
bold: true,
|
|
543929
544055
|
children: "(esc)"
|
|
@@ -550711,7 +550837,7 @@ ${fileList}`);
|
|
|
550711
550837
|
const idleTimeSinceResponse = Date.now() - lastQueryCompletionTime2;
|
|
550712
550838
|
if (!isLoading2 && !toolJSX2 && focusedInputDialogRef2.current === undefined && idleTimeSinceResponse >= getGlobalConfig().messageIdleNotifThresholdMs) {
|
|
550713
550839
|
sendNotification({
|
|
550714
|
-
message: "
|
|
550840
|
+
message: "Stratagem is waiting for your input",
|
|
550715
550841
|
notificationType: "idle_prompt"
|
|
550716
550842
|
}, terminal2);
|
|
550717
550843
|
}
|
|
@@ -553146,7 +553272,7 @@ function WelcomeV2() {
|
|
|
553146
553272
|
dimColor: true,
|
|
553147
553273
|
children: [
|
|
553148
553274
|
"v",
|
|
553149
|
-
"0.3.
|
|
553275
|
+
"0.3.2",
|
|
553150
553276
|
" "
|
|
553151
553277
|
]
|
|
553152
553278
|
}, undefined, true, undefined, this)
|
|
@@ -553976,7 +554102,7 @@ function TrustDialog(t0) {
|
|
|
553976
554102
|
}, undefined, true, undefined, this);
|
|
553977
554103
|
t18 = /* @__PURE__ */ jsx_dev_runtime477.jsxDEV(ThemedText, {
|
|
553978
554104
|
children: [
|
|
553979
|
-
"
|
|
554105
|
+
"Stratagem",
|
|
553980
554106
|
"'",
|
|
553981
554107
|
"ll be able to read, edit, and execute files here."
|
|
553982
554108
|
]
|
|
@@ -554932,13 +555058,13 @@ function ResumeTask({
|
|
|
554932
555058
|
/* @__PURE__ */ jsx_dev_runtime482.jsxDEV(Spinner, {}, undefined, false, undefined, this),
|
|
554933
555059
|
/* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
554934
555060
|
bold: true,
|
|
554935
|
-
children: "Loading
|
|
555061
|
+
children: "Loading Stratagem sessions…"
|
|
554936
555062
|
}, undefined, false, undefined, this)
|
|
554937
555063
|
]
|
|
554938
555064
|
}, undefined, true, undefined, this),
|
|
554939
555065
|
/* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
554940
555066
|
dimColor: true,
|
|
554941
|
-
children: retrying ? "Retrying…" : "Fetching your
|
|
555067
|
+
children: retrying ? "Retrying…" : "Fetching your Stratagem sessions…"
|
|
554942
555068
|
}, undefined, false, undefined, this)
|
|
554943
555069
|
]
|
|
554944
555070
|
}, undefined, true, undefined, this);
|
|
@@ -554951,7 +555077,7 @@ function ResumeTask({
|
|
|
554951
555077
|
/* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
554952
555078
|
bold: true,
|
|
554953
555079
|
color: "error",
|
|
554954
|
-
children: "Error loading
|
|
555080
|
+
children: "Error loading Stratagem sessions"
|
|
554955
555081
|
}, undefined, false, undefined, this),
|
|
554956
555082
|
renderErrorSpecificGuidance(loadErrorType),
|
|
554957
555083
|
/* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
@@ -554982,7 +555108,7 @@ function ResumeTask({
|
|
|
554982
555108
|
/* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
554983
555109
|
bold: true,
|
|
554984
555110
|
children: [
|
|
554985
|
-
"No
|
|
555111
|
+
"No Stratagem sessions found",
|
|
554986
555112
|
currentRepo && /* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
554987
555113
|
children: [
|
|
554988
555114
|
" for ",
|
|
@@ -555172,7 +555298,7 @@ function renderErrorSpecificGuidance(errorType) {
|
|
|
555172
555298
|
flexDirection: "column",
|
|
555173
555299
|
children: /* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
555174
555300
|
dimColor: true,
|
|
555175
|
-
children: "Sorry,
|
|
555301
|
+
children: "Sorry, Stratagem encountered an error"
|
|
555176
555302
|
}, undefined, false, undefined, this)
|
|
555177
555303
|
}, undefined, false, undefined, this);
|
|
555178
555304
|
case "other":
|
|
@@ -555181,7 +555307,7 @@ function renderErrorSpecificGuidance(errorType) {
|
|
|
555181
555307
|
flexDirection: "row",
|
|
555182
555308
|
children: /* @__PURE__ */ jsx_dev_runtime482.jsxDEV(ThemedText, {
|
|
555183
555309
|
dimColor: true,
|
|
555184
|
-
children: "Sorry,
|
|
555310
|
+
children: "Sorry, Stratagem encountered an error"
|
|
555185
555311
|
}, undefined, false, undefined, this)
|
|
555186
555312
|
}, undefined, false, undefined, this);
|
|
555187
555313
|
}
|
|
@@ -559699,11 +559825,11 @@ async function startMCPServer(cwd2, debug, verbose) {
|
|
|
559699
559825
|
const tools = getCombinedTools(getTools(toolPermissionContext), mcpTools);
|
|
559700
559826
|
return {
|
|
559701
559827
|
tools: await Promise.all(tools.map(async (tool) => {
|
|
559702
|
-
let
|
|
559828
|
+
let outputSchema37;
|
|
559703
559829
|
if (tool.outputSchema) {
|
|
559704
559830
|
const convertedSchema = zodToJsonSchema3(tool.outputSchema);
|
|
559705
559831
|
if (typeof convertedSchema === "object" && convertedSchema !== null && "type" in convertedSchema && convertedSchema.type === "object") {
|
|
559706
|
-
|
|
559832
|
+
outputSchema37 = convertedSchema;
|
|
559707
559833
|
}
|
|
559708
559834
|
}
|
|
559709
559835
|
return {
|
|
@@ -559714,7 +559840,7 @@ async function startMCPServer(cwd2, debug, verbose) {
|
|
|
559714
559840
|
agents: []
|
|
559715
559841
|
}),
|
|
559716
559842
|
inputSchema: tool.inputJSONSchema ?? zodToJsonSchema3(tool.inputSchema),
|
|
559717
|
-
outputSchema:
|
|
559843
|
+
outputSchema: outputSchema37
|
|
559718
559844
|
};
|
|
559719
559845
|
}))
|
|
559720
559846
|
};
|
|
@@ -568679,7 +568805,7 @@ function createCanUseToolWithPermissionPrompt(permissionPromptTool) {
|
|
|
568679
568805
|
if (!permissionToolResultBlockParam.content || !Array.isArray(permissionToolResultBlockParam.content) || !permissionToolResultBlockParam.content[0] || permissionToolResultBlockParam.content[0].type !== "text" || typeof permissionToolResultBlockParam.content[0].text !== "string") {
|
|
568680
568806
|
throw new Error('Permission prompt tool returned an invalid result. Expected a single text block param with type="text" and a string text value.');
|
|
568681
568807
|
}
|
|
568682
|
-
return permissionPromptToolResultToPermissionDecision(
|
|
568808
|
+
return permissionPromptToolResultToPermissionDecision(outputSchema36().parse(safeParseJSON(permissionToolResultBlockParam.content[0].text)), permissionPromptTool, input, toolUseContext);
|
|
568683
568809
|
};
|
|
568684
568810
|
return canUseTool;
|
|
568685
568811
|
}
|
|
@@ -573163,7 +573289,7 @@ Usage: stx7 --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
573163
573289
|
pendingHookMessages
|
|
573164
573290
|
}, renderAndRun);
|
|
573165
573291
|
}
|
|
573166
|
-
}).version("0.3.
|
|
573292
|
+
}).version("0.3.2 (STRATAGEM X7)", "-v, --version", "Output the version number");
|
|
573167
573293
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
573168
573294
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
573169
573295
|
if (canUserConfigureAdvisor()) {
|
|
@@ -573692,7 +573818,7 @@ if (false) {}
|
|
|
573692
573818
|
async function main2() {
|
|
573693
573819
|
const args = process.argv.slice(2);
|
|
573694
573820
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
573695
|
-
console.log(`${"0.3.
|
|
573821
|
+
console.log(`${"0.3.2"} (STRATAGEM X7)`);
|
|
573696
573822
|
return;
|
|
573697
573823
|
}
|
|
573698
573824
|
if (args.includes("--provider")) {
|
|
@@ -573814,4 +573940,4 @@ async function main2() {
|
|
|
573814
573940
|
}
|
|
573815
573941
|
main2();
|
|
573816
573942
|
|
|
573817
|
-
//# debugId=
|
|
573943
|
+
//# debugId=4A46F36A69A9624964756E2164756E21
|