@sorenllm/opencode-forge 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/README.md +3 -0
- package/dist/index.js +4 -1
- package/package.json +61 -61
package/README.md
CHANGED
|
@@ -229,6 +229,9 @@ the stdio-EOF bug):
|
|
|
229
229
|
`run_in_background: true` skips all waiting and returns
|
|
230
230
|
`{jobId, logPath}` immediately. Every run pops one permission dialog
|
|
231
231
|
(`permission.forge_shell = "ask"`; an explicit `deny` in your config wins).
|
|
232
|
+
Every result form carries `cwd:` — the absolute directory the command
|
|
233
|
+
actually ran in. When the agent's narrative about the working directory
|
|
234
|
+
disagrees with that line, the line wins.
|
|
232
235
|
|
|
233
236
|
**`forge_jobs`** manages the registry: `list` / `poll {jobId, waitMs≤30s}`
|
|
234
237
|
(bounded wait for new output or exit, drains it) / `log {jobId, offset?,
|
package/dist/index.js
CHANGED
|
@@ -15441,7 +15441,7 @@ var forgeShellTool = tool({
|
|
|
15441
15441
|
if (args.run_in_background === true) {
|
|
15442
15442
|
return {
|
|
15443
15443
|
title: `job started: ${started.job.id}`,
|
|
15444
|
-
output: [`[forge:job] Started in background.`, `jobId: ${started.job.id}`, `logPath: ${started.job.logPath}`, "Track with forge_jobs poll; a [forge:job-complete] message arrives on exit."].join(`
|
|
15444
|
+
output: [`[forge:job] Started in background.`, `cwd: ${cwd}`, `jobId: ${started.job.id}`, `logPath: ${started.job.logPath}`, "Track with forge_jobs poll; a [forge:job-complete] message arrives on exit."].join(`
|
|
15445
15445
|
`)
|
|
15446
15446
|
};
|
|
15447
15447
|
}
|
|
@@ -15451,6 +15451,7 @@ var forgeShellTool = tool({
|
|
|
15451
15451
|
title: `exit ${r.exitCode ?? "?"}`,
|
|
15452
15452
|
output: [
|
|
15453
15453
|
`[forge:job] Command finished (exit=${r.exitCode ?? "none"}).`,
|
|
15454
|
+
`cwd: ${cwd}`,
|
|
15454
15455
|
...r.spawnError ? [`spawn error: ${r.spawnError}`] : [],
|
|
15455
15456
|
`output:
|
|
15456
15457
|
${r.outputTail || "(none)"}`
|
|
@@ -15463,6 +15464,7 @@ ${r.outputTail || "(none)"}`
|
|
|
15463
15464
|
title: `success: ${r.matched}`,
|
|
15464
15465
|
output: [
|
|
15465
15466
|
`[forge:job] Success pattern matched: "${r.matched}".`,
|
|
15467
|
+
`cwd: ${cwd}`,
|
|
15466
15468
|
r.keptAlive ? `The process was kept alive as job ${started.job.id} (stop it with forge_jobs kill when done).` : "The process tree was terminated (keep_alive=false).",
|
|
15467
15469
|
`output:
|
|
15468
15470
|
${r.outputTail}`
|
|
@@ -15474,6 +15476,7 @@ ${r.outputTail}`
|
|
|
15474
15476
|
title: `still running (${Math.round(r.idleForMs / 1000)}s idle)`,
|
|
15475
15477
|
output: [
|
|
15476
15478
|
`[forge:job] Still running — ${Math.round(r.idleForMs / 1000)}s without new output (or the wait budget ran out). The process is alive as job ${started.job.id}.`,
|
|
15479
|
+
`cwd: ${cwd}`,
|
|
15477
15480
|
`logPath: ${started.job.logPath}`,
|
|
15478
15481
|
`recent output:
|
|
15479
15482
|
${r.outputTail || "(none yet)"}`,
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sorenllm/opencode-forge",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Single general-purpose forge agent for opencode with two orthogonal harnesses and two hang backstops: a plan harness (file-backed plans in .opencode/plan/, approve/close confirmation gates, tick discipline, hard write-ban while planning), a goal harness (autonomous, host-verified objectives in .opencode/goal/), a job supervisor (forge_shell with exit-bound completion — immune to stdio-EOF hangs — idle/success early return, background jobs with poll/log/kill/handoff, exit wakes on session idle), and a builtin-shell hang watchdog (marked timing across all sessions, graded tree-kill with dry-run/off modes, auditable ledger).",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"import": "./dist/index.js"
|
|
10
|
-
},
|
|
11
|
-
"./server": {
|
|
12
|
-
"import": "./dist/index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist",
|
|
17
|
-
"README.md"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"bundle": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && bun build ./plugin.ts --outfile ./dist/index.js --target node --format esm",
|
|
21
|
-
"test": "node --test tests/*.test.mjs",
|
|
22
|
-
"typecheck": "tsc --noEmit"
|
|
23
|
-
},
|
|
24
|
-
"keywords": [
|
|
25
|
-
"opencode",
|
|
26
|
-
"opencode-plugin",
|
|
27
|
-
"plan",
|
|
28
|
-
"planning",
|
|
29
|
-
"workflow",
|
|
30
|
-
"single-agent",
|
|
31
|
-
"goal",
|
|
32
|
-
"background-jobs",
|
|
33
|
-
"shell",
|
|
34
|
-
"watchdog"
|
|
35
|
-
],
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"author": "chengsongren",
|
|
38
|
-
"homepage": "https://github.com/ChengZiiii/opencode-forge#readme",
|
|
39
|
-
"repository": {
|
|
40
|
-
"type": "git",
|
|
41
|
-
"url": "git+https://github.com/ChengZiiii/opencode-forge.git"
|
|
42
|
-
},
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://github.com/ChengZiiii/opencode-forge/issues"
|
|
45
|
-
},
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"@opencode-ai/plugin": "^1.18.0"
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@opencode-ai/plugin": "^1.18.0",
|
|
51
|
-
"@types/node": "^22.13.9",
|
|
52
|
-
"typescript": "^5.8.2"
|
|
53
|
-
},
|
|
54
|
-
"engines": {
|
|
55
|
-
"opencode": "^1.18.0"
|
|
56
|
-
},
|
|
57
|
-
"publishConfig": {
|
|
58
|
-
"access": "public",
|
|
59
|
-
"registry": "https://registry.npmjs.org/"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@sorenllm/opencode-forge",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "Single general-purpose forge agent for opencode with two orthogonal harnesses and two hang backstops: a plan harness (file-backed plans in .opencode/plan/, approve/close confirmation gates, tick discipline, hard write-ban while planning), a goal harness (autonomous, host-verified objectives in .opencode/goal/), a job supervisor (forge_shell with exit-bound completion — immune to stdio-EOF hangs — idle/success early return, background jobs with poll/log/kill/handoff, exit wakes on session idle), and a builtin-shell hang watchdog (marked timing across all sessions, graded tree-kill with dry-run/off modes, auditable ledger).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./server": {
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"bundle": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && bun build ./plugin.ts --outfile ./dist/index.js --target node --format esm",
|
|
21
|
+
"test": "node --test tests/*.test.mjs",
|
|
22
|
+
"typecheck": "tsc --noEmit"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"opencode",
|
|
26
|
+
"opencode-plugin",
|
|
27
|
+
"plan",
|
|
28
|
+
"planning",
|
|
29
|
+
"workflow",
|
|
30
|
+
"single-agent",
|
|
31
|
+
"goal",
|
|
32
|
+
"background-jobs",
|
|
33
|
+
"shell",
|
|
34
|
+
"watchdog"
|
|
35
|
+
],
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"author": "chengsongren",
|
|
38
|
+
"homepage": "https://github.com/ChengZiiii/opencode-forge#readme",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/ChengZiiii/opencode-forge.git"
|
|
42
|
+
},
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/ChengZiiii/opencode-forge/issues"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"@opencode-ai/plugin": "^1.18.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@opencode-ai/plugin": "^1.18.0",
|
|
51
|
+
"@types/node": "^22.13.9",
|
|
52
|
+
"typescript": "^5.8.2"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"opencode": "^1.18.0"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public",
|
|
59
|
+
"registry": "https://registry.npmjs.org/"
|
|
60
|
+
}
|
|
61
|
+
}
|