ghostrail 0.5.0 → 0.6.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/image/build.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAE/D;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAE1F;AAED,yCAAyC;AACzC,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAWnE"}
@@ -0,0 +1,40 @@
1
+ import { fileURLToPath } from "node:url";
2
+ /**
3
+ * The factory toolchain image tag. The cutover runbook and the example configs
4
+ * already name this, so it is effectively part of the public surface.
5
+ */
6
+ export const DEFAULT_FACTORY_IMAGE = "ghostrail-factory:local";
7
+ /**
8
+ * The `docker` directory that ships inside the installed package, holding
9
+ * `factory.Dockerfile`. Resolved from this module's own URL, so it works from a
10
+ * global install, an npx run, or a repo checkout alike.
11
+ */
12
+ export function dockerDir() {
13
+ return fileURLToPath(new URL("../../docker", import.meta.url));
14
+ }
15
+ /**
16
+ * The argv for the image build, after the `docker` executable itself. Each
17
+ * value is its own element, so a path containing a space survives: the command
18
+ * is spawned directly, never through a shell.
19
+ */
20
+ export function dockerBuildArgs(dockerfile, context, tag) {
21
+ return ["build", "-f", dockerfile, "-t", tag, context];
22
+ }
23
+ /**
24
+ * Parse `--tag`/`-t <value>`, defaulting to {@link DEFAULT_FACTORY_IMAGE}. A
25
+ * flag with no value, or an empty value, is ignored rather than producing an
26
+ * unusable `docker build -t ""`. The last valid occurrence wins.
27
+ */
28
+ export function parseImageFlags(argv) {
29
+ let tag = DEFAULT_FACTORY_IMAGE;
30
+ for (let i = 0; i < argv.length; i++) {
31
+ const arg = argv[i];
32
+ const next = argv[i + 1];
33
+ if ((arg === "--tag" || arg === "-t") && next !== undefined && next.length > 0) {
34
+ tag = next;
35
+ i++;
36
+ }
37
+ }
38
+ return { tag };
39
+ }
40
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/image/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,yBAAyB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,aAAa,CAAC,IAAI,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB,EAAE,OAAe,EAAE,GAAW;IAC9E,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAOD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAuB;IACrD,IAAI,GAAG,GAAG,qBAAqB,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,IAAI,CAAC,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/E,GAAG,GAAG,IAAI,CAAC;YACX,CAAC,EAAE,CAAC;QACN,CAAC;IACH,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghostrail",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Open source software factory for coding agents. Config-driven loops, pluggable isolation backends, human merge gate.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -24,7 +24,7 @@
24
24
  "bin": {
25
25
  "ghostrail": "dist/bin.js"
26
26
  },
27
- "files": ["dist", "templates", "skill", "docker", "LICENSE", "NOTICE", "README.md"],
27
+ "files": ["dist", "templates", "skill", "docker", "scripts", "LICENSE", "NOTICE", "README.md"],
28
28
  "engines": {
29
29
  "node": ">=22"
30
30
  },
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # Build the ghostrail factory toolchain image used by the container backend.
3
+ # Usage: scripts/build-factory-image.sh [image-tag] (default: ghostrail-factory:local)
4
+ set -euo pipefail
5
+
6
+ IMAGE="${1:-ghostrail-factory:local}"
7
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
8
+
9
+ docker build -f "$DIR/docker/factory.Dockerfile" -t "$IMAGE" "$DIR/docker"
10
+ echo "built $IMAGE"
@@ -131,7 +131,11 @@ Diagnose a setup without changing anything. Check and report each, with the fix:
131
131
  in a value yourself.
132
132
  - **GitHub** — `gh auth status` succeeds.
133
133
  - **Container backend**, if `[backend].kind = "container"` — the configured
134
- `image` exists locally (`docker images`). If not, it must be built.
134
+ `image` exists locally (`docker images`). If not, the fix is
135
+ `ghostrail image build` (add `--tag` when the config names something other
136
+ than `ghostrail-factory:local`). No repo checkout is needed; the Dockerfile
137
+ ships in the package. A `local-worktree` factory needs no image at all, so do
138
+ not report a missing one as a problem.
135
139
 
136
140
  Finish with a short ordered list of what to fix first.
137
141
 
@@ -15,7 +15,7 @@ against your CI, and opens a pull request. It never merges.
15
15
  ```bash
16
16
  ghostrail run # one tick: claim eligible issues, fix, gate, open PRs
17
17
  ghostrail respond # fold new human PR comments back into their branches
18
- ghostrail board # watch runs at http://127.0.0.1:4369/
18
+ ghostrail board # watch runs at http://127.0.0.1:5050/
19
19
  ```
20
20
 
21
21
  An issue is eligible when it is `Todo`, unassigned, and labeled `factory`
@@ -15,7 +15,7 @@ PR opens as a draft for you to review. This is the `tjwrite`/`research` shape.
15
15
  ## Run
16
16
  ```bash
17
17
  ghostrail run # draft eligible pieces and open draft PRs
18
- ghostrail board # watch runs at http://127.0.0.1:4369/
18
+ ghostrail board # watch runs at http://127.0.0.1:5050/
19
19
  ```
20
20
 
21
21
  The shared artifacts are staged into each run at `.ghostrail/artifacts/` so the