@rallycry/conveyor-agent 9.1.0 → 10.0.1
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-P3QCTUHC.js → chunk-QKRPJ7DB.js} +1065 -197
- package/dist/chunk-QKRPJ7DB.js.map +1 -0
- package/dist/cli.js +174 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +113 -28
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
- package/runtime/entrypoint.sh +627 -0
- package/dist/chunk-P3QCTUHC.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -2,6 +2,8 @@ import {
|
|
|
2
2
|
AgentConnection,
|
|
3
3
|
PlanSync,
|
|
4
4
|
SessionRunner,
|
|
5
|
+
captureSnapshot,
|
|
6
|
+
finalizeForSleep,
|
|
5
7
|
flushPendingChanges,
|
|
6
8
|
getCurrentBranch,
|
|
7
9
|
hasUncommittedChanges,
|
|
@@ -9,13 +11,17 @@ import {
|
|
|
9
11
|
loadConveyorConfig,
|
|
10
12
|
loadForwardPorts,
|
|
11
13
|
pushToOrigin,
|
|
14
|
+
restoreOnBoot,
|
|
12
15
|
runAuthTokenCommand,
|
|
13
16
|
runSetupCommand,
|
|
14
17
|
runStartCommand,
|
|
15
18
|
stageAndCommit,
|
|
19
|
+
startPeriodic,
|
|
20
|
+
stop,
|
|
16
21
|
unshallowRepo,
|
|
17
|
-
updateRemoteToken
|
|
18
|
-
|
|
22
|
+
updateRemoteToken,
|
|
23
|
+
uploadSnapshotToGcs
|
|
24
|
+
} from "./chunk-QKRPJ7DB.js";
|
|
19
25
|
|
|
20
26
|
// src/runner/worktree.ts
|
|
21
27
|
import { execSync } from "child_process";
|
|
@@ -86,8 +92,10 @@ export {
|
|
|
86
92
|
AgentConnection,
|
|
87
93
|
PlanSync,
|
|
88
94
|
SessionRunner,
|
|
95
|
+
captureSnapshot,
|
|
89
96
|
detachWorktreeBranch,
|
|
90
97
|
ensureWorktree,
|
|
98
|
+
finalizeForSleep,
|
|
91
99
|
flushPendingChanges,
|
|
92
100
|
getCurrentBranch,
|
|
93
101
|
hasUncommittedChanges,
|
|
@@ -96,11 +104,15 @@ export {
|
|
|
96
104
|
loadForwardPorts,
|
|
97
105
|
pushToOrigin,
|
|
98
106
|
removeWorktree,
|
|
107
|
+
restoreOnBoot,
|
|
99
108
|
runAuthTokenCommand,
|
|
100
109
|
runSetupCommand,
|
|
101
110
|
runStartCommand,
|
|
102
111
|
stageAndCommit,
|
|
112
|
+
startPeriodic as startWorkPreservation,
|
|
113
|
+
stop as stopWorkPreservation,
|
|
103
114
|
unshallowRepo,
|
|
104
|
-
updateRemoteToken
|
|
115
|
+
updateRemoteToken,
|
|
116
|
+
uploadSnapshotToGcs
|
|
105
117
|
};
|
|
106
118
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/runner/worktree.ts"],"sourcesContent":["import { execSync } from \"node:child_process\";\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { hasUncommittedChanges } from \"./git-utils.js\";\n\nconst WORKTREE_DIR = \".worktrees\";\n\nexport function ensureWorktree(projectDir: string, taskId: string, branch?: string): string {\n if (projectDir.includes(`/${WORKTREE_DIR}/`)) {\n return projectDir;\n }\n\n const worktreePath = join(projectDir, WORKTREE_DIR, taskId);\n\n if (existsSync(worktreePath)) {\n if (branch) {\n if (hasUncommittedChanges(worktreePath)) {\n return worktreePath;\n }\n try {\n execSync(`git checkout --detach origin/${branch}`, {\n cwd: worktreePath,\n stdio: \"ignore\",\n });\n } catch {\n /* branch doesn't exist on remote yet */\n }\n }\n return worktreePath;\n }\n\n const ref = branch ? `origin/${branch}` : \"HEAD\";\n execSync(`git worktree add --detach \"${worktreePath}\" ${ref}`, {\n cwd: projectDir,\n stdio: \"ignore\",\n });\n\n return worktreePath;\n}\n\n/**\n * Detach any task worktree that has `branch` checked out, releasing the branch lock\n * so the main project directory can check it out. Only touches worktrees inside\n * `.worktrees/` — never the main project directory.\n */\nexport function detachWorktreeBranch(projectDir: string, branch: string): void {\n try {\n const output = execSync(\"git worktree list --porcelain\", {\n cwd: projectDir,\n encoding: \"utf-8\",\n });\n const entries = output.split(\"\\n\\n\");\n for (const entry of entries) {\n const lines = entry.trim().split(\"\\n\");\n const worktreeLine = lines.find((l) => l.startsWith(\"worktree \"));\n const branchLine = lines.find((l) => l.startsWith(\"branch \"));\n if (!worktreeLine || branchLine !== `branch refs/heads/${branch}`) continue;\n\n const worktreePath = worktreeLine.replace(\"worktree \", \"\");\n if (!worktreePath.includes(`/${WORKTREE_DIR}/`)) continue;\n\n try {\n execSync(\"git checkout --detach\", { cwd: worktreePath, stdio: \"ignore\" });\n } catch {\n /* best effort */\n }\n }\n } catch {\n /* best effort */\n }\n}\n\n/**\n * Force-remove is intentional: this runs after task completion or explicit stop.\n * Any uncommitted changes at this point are scratch artifacts, not valuable work.\n */\nexport function removeWorktree(projectDir: string, taskId: string): void {\n const worktreePath = join(projectDir, WORKTREE_DIR, taskId);\n if (!existsSync(worktreePath)) return;\n try {\n execSync(`git worktree remove \"${worktreePath}\" --force`, {\n cwd: projectDir,\n stdio: \"ignore\",\n });\n } catch {\n /* best effort */\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/runner/worktree.ts"],"sourcesContent":["import { execSync } from \"node:child_process\";\nimport { existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { hasUncommittedChanges } from \"./git-utils.js\";\n\nconst WORKTREE_DIR = \".worktrees\";\n\nexport function ensureWorktree(projectDir: string, taskId: string, branch?: string): string {\n if (projectDir.includes(`/${WORKTREE_DIR}/`)) {\n return projectDir;\n }\n\n const worktreePath = join(projectDir, WORKTREE_DIR, taskId);\n\n if (existsSync(worktreePath)) {\n if (branch) {\n if (hasUncommittedChanges(worktreePath)) {\n return worktreePath;\n }\n try {\n execSync(`git checkout --detach origin/${branch}`, {\n cwd: worktreePath,\n stdio: \"ignore\",\n });\n } catch {\n /* branch doesn't exist on remote yet */\n }\n }\n return worktreePath;\n }\n\n const ref = branch ? `origin/${branch}` : \"HEAD\";\n execSync(`git worktree add --detach \"${worktreePath}\" ${ref}`, {\n cwd: projectDir,\n stdio: \"ignore\",\n });\n\n return worktreePath;\n}\n\n/**\n * Detach any task worktree that has `branch` checked out, releasing the branch lock\n * so the main project directory can check it out. Only touches worktrees inside\n * `.worktrees/` — never the main project directory.\n */\nexport function detachWorktreeBranch(projectDir: string, branch: string): void {\n try {\n const output = execSync(\"git worktree list --porcelain\", {\n cwd: projectDir,\n encoding: \"utf-8\",\n });\n const entries = output.split(\"\\n\\n\");\n for (const entry of entries) {\n const lines = entry.trim().split(\"\\n\");\n const worktreeLine = lines.find((l) => l.startsWith(\"worktree \"));\n const branchLine = lines.find((l) => l.startsWith(\"branch \"));\n if (!worktreeLine || branchLine !== `branch refs/heads/${branch}`) continue;\n\n const worktreePath = worktreeLine.replace(\"worktree \", \"\");\n if (!worktreePath.includes(`/${WORKTREE_DIR}/`)) continue;\n\n try {\n execSync(\"git checkout --detach\", { cwd: worktreePath, stdio: \"ignore\" });\n } catch {\n /* best effort */\n }\n }\n } catch {\n /* best effort */\n }\n}\n\n/**\n * Force-remove is intentional: this runs after task completion or explicit stop.\n * Any uncommitted changes at this point are scratch artifacts, not valuable work.\n */\nexport function removeWorktree(projectDir: string, taskId: string): void {\n const worktreePath = join(projectDir, WORKTREE_DIR, taskId);\n if (!existsSync(worktreePath)) return;\n try {\n execSync(`git worktree remove \"${worktreePath}\" --force`, {\n cwd: projectDir,\n stdio: \"ignore\",\n });\n } catch {\n /* best effort */\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAGrB,IAAM,eAAe;AAEd,SAAS,eAAe,YAAoB,QAAgB,QAAyB;AAC1F,MA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vE,QAAM,eAAe,KAAK,YAAY,cAAc,MAAM;AAC1D,MAAI,CAAC,WAAW,YAAY,EAAG;AAC/B,MAAI;AACF,aAAS,wBAAwB,YAAY,aAAa;AAAA,MACxD,KAAK;AAAA,MACL,OAAO;AAAA,IACT,CAAC;AAAA,EACH,QAAQ;AAAA,EAER;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rallycry/conveyor-agent",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Conveyor Agent Runner
|
|
3
|
+
"version": "10.0.1",
|
|
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",
|
|
7
7
|
"claude",
|
|
8
8
|
"codespace",
|
|
9
9
|
"conveyor",
|
|
10
|
-
"
|
|
10
|
+
"v10"
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"bin": {
|
|
14
14
|
"conveyor-agent": "dist/cli.js"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"runtime"
|
|
18
19
|
],
|
|
19
20
|
"type": "module",
|
|
20
21
|
"main": "./dist/index.js",
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
40
41
|
"node-pty": "^1.0.0",
|
|
41
42
|
"socket.io-client": "^4.7.4",
|
|
43
|
+
"tar": "^7.5.19",
|
|
42
44
|
"winston": "^3.11.0",
|
|
43
45
|
"zod": "^3.25.76"
|
|
44
46
|
},
|