@rallycry/conveyor-agent 11.0.33 → 11.0.35
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/{chunk-XZDTLVWA.js → chunk-6WVCWKDN.js} +1 -1
- package/dist/{chunk-A73WZJ4Y.js → chunk-MYJQXN6E.js} +44 -22
- package/dist/{chunk-IHNXVFIB.js → chunk-VDK54VLS.js} +13 -8
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{serve-boot-VDR3RXRA.js → serve-boot-QOXREHJK.js} +2 -2
- package/package.json +10 -10
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
statWorkspacePath,
|
|
98
98
|
updateRemoteToken,
|
|
99
99
|
verifyGitCredential
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-VDK54VLS.js";
|
|
101
101
|
import {
|
|
102
102
|
registerBootMilestoneSocketFallback,
|
|
103
103
|
reportBootMilestone
|
|
@@ -947,6 +947,8 @@ function mapAssistant(record) {
|
|
|
947
947
|
type: "assistant",
|
|
948
948
|
message: { role: "assistant", content }
|
|
949
949
|
};
|
|
950
|
+
const id = stringField(message, "id");
|
|
951
|
+
if (id !== void 0) result.message.id = id;
|
|
950
952
|
const usage = mapUsage(message);
|
|
951
953
|
if (usage !== void 0) result.message.usage = usage;
|
|
952
954
|
if (record.isApiErrorMessage === true) result.isApiError = true;
|
|
@@ -6879,7 +6881,7 @@ function buildTaskAgentPreamble(context, workspaceDir, runtimeTui, agentMode) {
|
|
|
6879
6881
|
Environment \u2014 already built${managedStack ? " and running" : ""}. These are the facts you would otherwise spend calls discovering:`,
|
|
6880
6882
|
`- The repo is cloned at your working directory with \`${context.githubBranch}\` checked out, dependencies installed, database migrated, git configured${managedStack ? ", and the dev stack up" : ""}. Commit and push directly to this branch.`,
|
|
6881
6883
|
...stackLines,
|
|
6882
|
-
`- Browser automation is the Playwright CLI (\`playwright\`, pinned 1.
|
|
6884
|
+
`- Browser automation is the Playwright CLI (\`playwright\`, pinned 1.63.0), NOT an MCP server \u2014 there are no \`mcp__playwright__*\` tools here. Only the headless shell is baked, so a launch must name it AND disable the sandbox: \`chromium.launch({ channel: "chromium-headless-shell", args: ["--no-sandbox"] })\`. A bare \`chromium.launch()\` FAILS: since playwright 1.49 that resolves to the full browser, which is deliberately not installed (pods have no display and cannot run Chromium's sandbox). Screenshots land wherever you write them \u2014 move or delete them before committing.`,
|
|
6883
6885
|
`- The clone is \`--single-branch\`, so a bare \`git fetch origin <branch>\` does NOT create \`origin/<branch>\`. To reference any other branch, use the explicit refspec: \`git fetch origin <branch>:refs/remotes/origin/<branch>\`.`,
|
|
6884
6886
|
`- The shell cwd resets between Bash calls, and so does every shell variable. A var you export in one call is EMPTY in the next, which silently redirects output to \`/\` and loses it. Write literal absolute paths (\`git -C\`, \`bun run --cwd\`), and \`mkdir -p\` a directory in the SAME call as the redirect that writes to it.`,
|
|
6885
6887
|
`- The \`gh\` CLI is available for READ-ONLY PR and CI state (\`gh pr view\`, \`gh pr checks\`, \`gh pr diff\`), one read at a time. ${ciWaitRule(agentMode)} Use the mcp__conveyor__* tools for anything that mutates a PR or card.`,
|
|
@@ -12044,26 +12046,46 @@ function safeVoid(promise, context) {
|
|
|
12044
12046
|
});
|
|
12045
12047
|
}
|
|
12046
12048
|
}
|
|
12047
|
-
function
|
|
12048
|
-
const next = {
|
|
12049
|
-
inputTokens: total.inputTokens + (usage.input_tokens ?? 0),
|
|
12050
|
-
outputTokens: total.outputTokens + (usage.output_tokens ?? 0),
|
|
12051
|
-
cacheReadInputTokens: total.cacheReadInputTokens + (usage.cache_read_input_tokens ?? 0),
|
|
12052
|
-
cacheCreationInputTokens: total.cacheCreationInputTokens + (usage.cache_creation_input_tokens ?? 0),
|
|
12053
|
-
totalTokens: 0
|
|
12054
|
-
};
|
|
12055
|
-
next.totalTokens = next.inputTokens + next.outputTokens + next.cacheReadInputTokens + next.cacheCreationInputTokens;
|
|
12056
|
-
return next;
|
|
12057
|
-
}
|
|
12058
|
-
function emptyTurnUsage() {
|
|
12049
|
+
function maxUsage2(a, b) {
|
|
12059
12050
|
return {
|
|
12060
|
-
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
|
|
12051
|
+
input_tokens: Math.max(a.input_tokens ?? 0, b.input_tokens ?? 0),
|
|
12052
|
+
output_tokens: Math.max(a.output_tokens ?? 0, b.output_tokens ?? 0),
|
|
12053
|
+
cache_read_input_tokens: Math.max(
|
|
12054
|
+
a.cache_read_input_tokens ?? 0,
|
|
12055
|
+
b.cache_read_input_tokens ?? 0
|
|
12056
|
+
),
|
|
12057
|
+
cache_creation_input_tokens: Math.max(
|
|
12058
|
+
a.cache_creation_input_tokens ?? 0,
|
|
12059
|
+
b.cache_creation_input_tokens ?? 0
|
|
12060
|
+
)
|
|
12065
12061
|
};
|
|
12066
12062
|
}
|
|
12063
|
+
var TurnUsageLedger = class {
|
|
12064
|
+
byMessage = /* @__PURE__ */ new Map();
|
|
12065
|
+
anonymous = 0;
|
|
12066
|
+
add(usage, messageId) {
|
|
12067
|
+
const id = messageId ?? `anon-${this.anonymous++}`;
|
|
12068
|
+
const previous = this.byMessage.get(id);
|
|
12069
|
+
this.byMessage.set(id, previous ? maxUsage2(previous, usage) : usage);
|
|
12070
|
+
}
|
|
12071
|
+
total() {
|
|
12072
|
+
const sum = {
|
|
12073
|
+
inputTokens: 0,
|
|
12074
|
+
outputTokens: 0,
|
|
12075
|
+
cacheReadInputTokens: 0,
|
|
12076
|
+
cacheCreationInputTokens: 0,
|
|
12077
|
+
totalTokens: 0
|
|
12078
|
+
};
|
|
12079
|
+
for (const usage of this.byMessage.values()) {
|
|
12080
|
+
sum.inputTokens += usage.input_tokens ?? 0;
|
|
12081
|
+
sum.outputTokens += usage.output_tokens ?? 0;
|
|
12082
|
+
sum.cacheReadInputTokens += usage.cache_read_input_tokens ?? 0;
|
|
12083
|
+
sum.cacheCreationInputTokens += usage.cache_creation_input_tokens ?? 0;
|
|
12084
|
+
}
|
|
12085
|
+
sum.totalTokens = sum.inputTokens + sum.outputTokens + sum.cacheReadInputTokens + sum.cacheCreationInputTokens;
|
|
12086
|
+
return sum;
|
|
12087
|
+
}
|
|
12088
|
+
};
|
|
12067
12089
|
function epochSecondsToISO(value) {
|
|
12068
12090
|
if (typeof value === "string") return value;
|
|
12069
12091
|
if (typeof value !== "number" || value <= 0) return void 0;
|
|
@@ -12426,7 +12448,7 @@ async function processAssistantCase(event, host, state) {
|
|
|
12426
12448
|
const usage = await handleAssistantCase(event, host, state.turnToolCalls);
|
|
12427
12449
|
if (usage) {
|
|
12428
12450
|
state.lastAssistantUsage = usage;
|
|
12429
|
-
state.turnUsage
|
|
12451
|
+
state.turnUsage.add(usage, event.message.id);
|
|
12430
12452
|
}
|
|
12431
12453
|
if (!state.sawApiError || event.isApiError && !state.terminalApiError) {
|
|
12432
12454
|
const fullText = event.message.content.filter((b) => b.type === "text").map((b) => b.text).join(" ");
|
|
@@ -12447,7 +12469,7 @@ async function processResultCase(event, host, context, startTime, state) {
|
|
|
12447
12469
|
startTime,
|
|
12448
12470
|
state.isTyping,
|
|
12449
12471
|
state.lastAssistantUsage,
|
|
12450
|
-
state.turnUsage
|
|
12472
|
+
state.turnUsage.total()
|
|
12451
12473
|
);
|
|
12452
12474
|
if (info.stoppedTyping) state.isTyping = false;
|
|
12453
12475
|
state.retriable = info.retriable;
|
|
@@ -12480,7 +12502,7 @@ async function processEvents(events, context, host) {
|
|
|
12480
12502
|
staleSession: void 0,
|
|
12481
12503
|
authError: void 0,
|
|
12482
12504
|
lastAssistantUsage: void 0,
|
|
12483
|
-
turnUsage:
|
|
12505
|
+
turnUsage: new TurnUsageLedger(),
|
|
12484
12506
|
turnToolCalls: [],
|
|
12485
12507
|
questionPending: false
|
|
12486
12508
|
};
|
|
@@ -4085,14 +4085,19 @@ var CATALOG = {
|
|
|
4085
4085
|
lgtm: {
|
|
4086
4086
|
name: "lgtm",
|
|
4087
4087
|
image: "grafana/otel-lgtm:0.11.6",
|
|
4088
|
-
//
|
|
4089
|
-
//
|
|
4090
|
-
//
|
|
4091
|
-
//
|
|
4092
|
-
// a
|
|
4093
|
-
//
|
|
4094
|
-
//
|
|
4095
|
-
command
|
|
4088
|
+
// Runs the image's own launcher (/otel-lgtm/run-all.sh) after capping
|
|
4089
|
+
// Tempo's retention. The image ships Tempo with the 14-day default, and its
|
|
4090
|
+
// blocks live on the container's writable layer, which counts against the
|
|
4091
|
+
// 1Gi ephemeral-storage limit below; overrunning it evicts the whole pod.
|
|
4092
|
+
// At 100% sampling a busy dev stack writes up to ~2 GB of traces a day, so
|
|
4093
|
+
// keep 3h (plus 10m before a retired block leaves disk). The grep keeps it
|
|
4094
|
+
// idempotent, and a failed append still starts the stack. lgtm has no bake,
|
|
4095
|
+
// so no baked image ever strips this command.
|
|
4096
|
+
command: [
|
|
4097
|
+
"sh",
|
|
4098
|
+
"-c",
|
|
4099
|
+
"grep -q '^compactor:' /otel-lgtm/tempo-config.yaml || printf '\\ncompactor:\\n compaction:\\n block_retention: 3h\\n compacted_block_retention: 10m\\n' >> /otel-lgtm/tempo-config.yaml; exec /otel-lgtm/run-all.sh"
|
|
4100
|
+
],
|
|
4096
4101
|
ports: [
|
|
4097
4102
|
// OTLP gRPC + HTTP — agents and user code emit telemetry here.
|
|
4098
4103
|
4317,
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
WorkspaceCommandSupervisor,
|
|
8
8
|
startWorkspaceCommandsAfterConnect,
|
|
9
9
|
stopWorkspaceCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6WVCWKDN.js";
|
|
11
11
|
import {
|
|
12
12
|
PtyHarness,
|
|
13
13
|
SessionRunner,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
runUsageProbe,
|
|
28
28
|
sampleKeyUsage,
|
|
29
29
|
usesNativeUsageReporting
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MYJQXN6E.js";
|
|
31
31
|
import "./chunk-37J5MMQT.js";
|
|
32
32
|
import {
|
|
33
33
|
inheritedEnv,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
createServiceLogger,
|
|
47
47
|
fetchBootstrap,
|
|
48
48
|
loadConveyorConfig
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-VDK54VLS.js";
|
|
50
50
|
import "./chunk-Q4FQOJ7D.js";
|
|
51
51
|
import "./chunk-W4LZ7R6Z.js";
|
|
52
52
|
import "./chunk-372R6E4C.js";
|
|
@@ -1468,7 +1468,7 @@ if (!RUNNER_MODES.includes(CONVEYOR_MODE)) {
|
|
|
1468
1468
|
process.exit(1);
|
|
1469
1469
|
}
|
|
1470
1470
|
if (CONVEYOR_MODE === "serving") {
|
|
1471
|
-
const { runServingSession } = await import("./serve-boot-
|
|
1471
|
+
const { runServingSession } = await import("./serve-boot-QOXREHJK.js");
|
|
1472
1472
|
exitContext.runnerMode = "serving";
|
|
1473
1473
|
exitContext.sessionId = process.env.CONVEYOR_SESSION_ID ?? exitContext.sessionId;
|
|
1474
1474
|
const outcome = await runServingSession({
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SessionRunner,
|
|
3
3
|
unshallowRepo
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MYJQXN6E.js";
|
|
5
5
|
import "./chunk-37J5MMQT.js";
|
|
6
6
|
import "./chunk-EKTPDG3G.js";
|
|
7
7
|
import {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
stageAndCommit,
|
|
18
18
|
updateRemoteToken,
|
|
19
19
|
workspacePathExists
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VDK54VLS.js";
|
|
21
21
|
import "./chunk-Q4FQOJ7D.js";
|
|
22
22
|
import {
|
|
23
23
|
runAuthTokenCommand,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WorkspaceCommandSupervisor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6WVCWKDN.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentConnection,
|
|
6
6
|
CodespacePortVisibility,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
createServiceLogger,
|
|
12
12
|
ensureOnTaskBranch,
|
|
13
13
|
loadConveyorConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VDK54VLS.js";
|
|
15
15
|
import "./chunk-Q4FQOJ7D.js";
|
|
16
16
|
import "./chunk-W4LZ7R6Z.js";
|
|
17
17
|
import "./chunk-IA45XHOA.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rallycry/conveyor-agent",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.35",
|
|
4
4
|
"description": "Conveyor Agent Runner v10 - PTY harness for the task chat (SDK harness for audit/project-chat). Agent-as-User architecture with BaseService patterns. Works locally too.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"typecheck": "tsgo --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@anthropic-ai/claude-agent-sdk": "^0.3.
|
|
42
|
-
"@modelcontextprotocol/sdk": "^1.30.
|
|
43
|
-
"node-pty": "^1.
|
|
44
|
-
"socket.io-client": "^4.8.
|
|
45
|
-
"tar": "^7.5.
|
|
46
|
-
"zod": "^4.
|
|
41
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.283",
|
|
42
|
+
"@modelcontextprotocol/sdk": "^1.30.1",
|
|
43
|
+
"node-pty": "^1.1.0",
|
|
44
|
+
"socket.io-client": "^4.8.4",
|
|
45
|
+
"tar": "^7.5.22",
|
|
46
|
+
"zod": "^4.6.5"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@project/shared": "workspace:*",
|
|
50
|
-
"tsup": "^8.
|
|
51
|
-
"typescript": "
|
|
52
|
-
"vitest": "^5.0.
|
|
50
|
+
"tsup": "^8.5.1",
|
|
51
|
+
"typescript": "~6.0.3",
|
|
52
|
+
"vitest": "^5.0.2"
|
|
53
53
|
}
|
|
54
54
|
}
|