@rallycry/conveyor-agent 7.2.10 → 7.2.11
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.
|
@@ -398,14 +398,6 @@ ${q.question}${q.options.length ? "\n" + q.options.map((o) => `- ${o.label}: ${o
|
|
|
398
398
|
triggerIdentification() {
|
|
399
399
|
return this.call("triggerIdentification", { sessionId: this.config.sessionId });
|
|
400
400
|
}
|
|
401
|
-
async requestScaleUp(tier, reason) {
|
|
402
|
-
const r = await this.call("scaleUpResources", {
|
|
403
|
-
sessionId: this.config.sessionId,
|
|
404
|
-
tier,
|
|
405
|
-
reason
|
|
406
|
-
});
|
|
407
|
-
return { scaled: r.success };
|
|
408
|
-
}
|
|
409
401
|
async refreshAuthToken() {
|
|
410
402
|
const codespaceName = process.env.CODESPACE_NAME || process.env.CLAUDESPACE_NAME;
|
|
411
403
|
const apiUrl = this.config.apiUrl;
|
|
@@ -1481,18 +1473,6 @@ function buildModePrompt(agentMode, context, runnerMode) {
|
|
|
1481
1473
|
`- Goal: implement the plan, run tests, open a PR when done`
|
|
1482
1474
|
]
|
|
1483
1475
|
];
|
|
1484
|
-
if (process.env.CLAUDESPACE_NAME) {
|
|
1485
|
-
parts.push(
|
|
1486
|
-
``,
|
|
1487
|
-
`### Resource Management`,
|
|
1488
|
-
`Your pod starts with minimal resources. You MUST call \`scale_up_resources\``,
|
|
1489
|
-
`BEFORE running any resource-intensive operations \u2014 they WILL fail or OOM at baseline resources:`,
|
|
1490
|
-
`- **setup** \u2014 package installs, basic dev servers, light builds`,
|
|
1491
|
-
`- **build** \u2014 full dev servers, test suites, typecheck, lint, E2E tests`,
|
|
1492
|
-
`Actual CPU/memory values are configured per-project. Scaling is one-way (up only).`,
|
|
1493
|
-
`CRITICAL: Always scale to at least "setup" before running any package install command.`
|
|
1494
|
-
);
|
|
1495
|
-
}
|
|
1496
1476
|
return parts.join("\n");
|
|
1497
1477
|
}
|
|
1498
1478
|
case "review":
|
|
@@ -1573,18 +1553,6 @@ function buildReviewPrompt(context) {
|
|
|
1573
1553
|
`- Max 5-7 issues per review. Prioritize the most important ones.`
|
|
1574
1554
|
);
|
|
1575
1555
|
}
|
|
1576
|
-
if (process.env.CLAUDESPACE_NAME) {
|
|
1577
|
-
parts.push(
|
|
1578
|
-
``,
|
|
1579
|
-
`### Resource Management`,
|
|
1580
|
-
`Your pod starts with minimal resources. You MUST call \`scale_up_resources\``,
|
|
1581
|
-
`BEFORE running any resource-intensive operations \u2014 they WILL fail or OOM at baseline resources:`,
|
|
1582
|
-
`- **setup** \u2014 package installs, basic dev servers, light builds`,
|
|
1583
|
-
`- **build** \u2014 full dev servers, test suites, typecheck, lint, E2E tests`,
|
|
1584
|
-
`Scaling is one-way (up only) and capped by project limits.`,
|
|
1585
|
-
`CRITICAL: Always scale to at least "setup" before running any package install command.`
|
|
1586
|
-
);
|
|
1587
|
-
}
|
|
1588
1556
|
return parts.join("\n");
|
|
1589
1557
|
}
|
|
1590
1558
|
|
|
@@ -2825,37 +2793,6 @@ function buildVoteSuggestionTool(connection) {
|
|
|
2825
2793
|
}
|
|
2826
2794
|
);
|
|
2827
2795
|
}
|
|
2828
|
-
function buildScaleUpResourcesTool(connection) {
|
|
2829
|
-
return defineTool(
|
|
2830
|
-
"scale_up_resources",
|
|
2831
|
-
"Scale up the pod's CPU and memory resources to the 'build' tier. Use before running heavy operations like full test suites, integration tests, typechecks, or production builds. Pods start at the 'setup' tier by default \u2014 only call this when you actually need more. Scaling is one-way (up only).",
|
|
2832
|
-
{
|
|
2833
|
-
tier: z.literal("build").describe("The resource phase to scale up to"),
|
|
2834
|
-
reason: z.string().optional().describe("Brief reason for scaling (e.g., 'running test suite')")
|
|
2835
|
-
},
|
|
2836
|
-
async ({ tier, reason }) => {
|
|
2837
|
-
try {
|
|
2838
|
-
const result = await connection.call("scaleUpResources", {
|
|
2839
|
-
sessionId: connection.sessionId,
|
|
2840
|
-
tier,
|
|
2841
|
-
reason
|
|
2842
|
-
});
|
|
2843
|
-
if (result.success) {
|
|
2844
|
-
return textResult(
|
|
2845
|
-
`Scaled to ${result.currentTier} phase (${result.cpu}). Was ${result.previousTier}.`
|
|
2846
|
-
);
|
|
2847
|
-
}
|
|
2848
|
-
return textResult(
|
|
2849
|
-
`Scale-up not available: ${result.error ?? "unknown error"}. Continuing at current resources.`
|
|
2850
|
-
);
|
|
2851
|
-
} catch (error) {
|
|
2852
|
-
return textResult(
|
|
2853
|
-
`Scale-up failed: ${error instanceof Error ? error.message : "unknown error"}. Continuing at current resources.`
|
|
2854
|
-
);
|
|
2855
|
-
}
|
|
2856
|
-
}
|
|
2857
|
-
);
|
|
2858
|
-
}
|
|
2859
2796
|
function buildCommonTools(connection, config) {
|
|
2860
2797
|
const tools = [
|
|
2861
2798
|
buildReadTaskChatTool(connection),
|
|
@@ -2877,9 +2814,6 @@ function buildCommonTools(connection, config) {
|
|
|
2877
2814
|
buildVoteSuggestionTool(connection),
|
|
2878
2815
|
buildGetSuggestionsTool(connection)
|
|
2879
2816
|
];
|
|
2880
|
-
if (process.env.CLAUDESPACE_NAME) {
|
|
2881
|
-
tools.push(buildScaleUpResourcesTool(connection));
|
|
2882
|
-
}
|
|
2883
2817
|
return tools;
|
|
2884
2818
|
}
|
|
2885
2819
|
|
|
@@ -4903,14 +4837,6 @@ function collectMissingProps(taskProps) {
|
|
|
4903
4837
|
// src/execution/tool-access.ts
|
|
4904
4838
|
var PM_PLAN_FILE_TOOLS = /* @__PURE__ */ new Set(["Write", "Edit", "MultiEdit"]);
|
|
4905
4839
|
var DESTRUCTIVE_CMD_PATTERN = /git\s+push\s+--force(?!\s*-with-lease)|git\s+reset\s+--hard|rm\s+-rf\s+\//;
|
|
4906
|
-
var RESOURCE_HEAVY_PATTERNS = [
|
|
4907
|
-
/\bbun\s+(install|i|add)\b/,
|
|
4908
|
-
/\bnpm\s+(install|ci|i)\b/,
|
|
4909
|
-
/\byarn(\s+install)?\s/,
|
|
4910
|
-
/\bpnpm\s+(install|i|add)\b/,
|
|
4911
|
-
/\bpip\s+install\b/,
|
|
4912
|
-
/\bcargo\s+build\b/
|
|
4913
|
-
];
|
|
4914
4840
|
function isPlanFile(input) {
|
|
4915
4841
|
const filePath = String(input.file_path ?? input.path ?? "");
|
|
4916
4842
|
return filePath.includes(".claude/plans/");
|
|
@@ -5044,20 +4970,6 @@ async function handleAskUserQuestion(host, input) {
|
|
|
5044
4970
|
}
|
|
5045
4971
|
var DENIAL_WARNING_THRESHOLD = 3;
|
|
5046
4972
|
var DENIAL_FORCE_STOP_THRESHOLD = 8;
|
|
5047
|
-
function isResourceHeavyCommand(command) {
|
|
5048
|
-
return RESOURCE_HEAVY_PATTERNS.some((p) => p.test(command));
|
|
5049
|
-
}
|
|
5050
|
-
var autoScaled = false;
|
|
5051
|
-
async function maybeAutoScale(host, toolName, input) {
|
|
5052
|
-
if (autoScaled || !process.env.CLAUDESPACE_NAME || toolName !== "Bash" || typeof input.command !== "string" || !isResourceHeavyCommand(input.command)) {
|
|
5053
|
-
return;
|
|
5054
|
-
}
|
|
5055
|
-
autoScaled = true;
|
|
5056
|
-
try {
|
|
5057
|
-
await host.connection.requestScaleUp("light", `auto-scale: ${input.command.slice(0, 60)}`);
|
|
5058
|
-
} catch {
|
|
5059
|
-
}
|
|
5060
|
-
}
|
|
5061
4973
|
function resolveToolAccess(host, toolName, input) {
|
|
5062
4974
|
switch (host.agentMode) {
|
|
5063
4975
|
case "discovery":
|
|
@@ -5075,7 +4987,6 @@ function resolveToolAccess(host, toolName, input) {
|
|
|
5075
4987
|
function buildCanUseTool(host) {
|
|
5076
4988
|
let consecutiveDenials = 0;
|
|
5077
4989
|
return async (toolName, input) => {
|
|
5078
|
-
await maybeAutoScale(host, toolName, input);
|
|
5079
4990
|
if (toolName === "ExitPlanMode" && (host.agentMode === "auto" || host.agentMode === "discovery") && !host.hasExitedPlanMode) {
|
|
5080
4991
|
return await handleExitPlanMode(host, input);
|
|
5081
4992
|
}
|
|
@@ -7768,4 +7679,4 @@ export {
|
|
|
7768
7679
|
loadForwardPorts,
|
|
7769
7680
|
loadConveyorConfig
|
|
7770
7681
|
};
|
|
7771
|
-
//# sourceMappingURL=chunk-
|
|
7682
|
+
//# sourceMappingURL=chunk-JYSWXYG6.js.map
|