lastlight 0.5.1 → 0.6.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.
Files changed (43) hide show
  1. package/.claude-plugin/marketplace.json +14 -0
  2. package/README.md +39 -0
  3. package/agent-context/rules.md +0 -38
  4. package/agent-context/soul.md +0 -11
  5. package/dist/cli.js +24 -0
  6. package/dist/cli.js.map +1 -1
  7. package/dist/config.d.ts +1 -1
  8. package/dist/config.js +3 -3
  9. package/dist/config.js.map +1 -1
  10. package/dist/engine/agent-executor.d.ts +2 -139
  11. package/dist/engine/agent-executor.js +76 -996
  12. package/dist/engine/agent-executor.js.map +1 -1
  13. package/dist/engine/executors/backends.d.ts +41 -0
  14. package/dist/engine/executors/backends.js +541 -0
  15. package/dist/engine/executors/backends.js.map +1 -0
  16. package/dist/engine/executors/shared.d.ts +189 -0
  17. package/dist/engine/executors/shared.js +612 -0
  18. package/dist/engine/executors/shared.js.map +1 -0
  19. package/dist/sandbox/index.d.ts +1 -1
  20. package/dist/sandbox/index.js +1 -1
  21. package/dist/sandbox/index.js.map +1 -1
  22. package/dist/sandbox/smol.d.ts +162 -0
  23. package/dist/sandbox/smol.integration.test.d.ts +1 -0
  24. package/dist/sandbox/smol.integration.test.js +130 -0
  25. package/dist/sandbox/smol.integration.test.js.map +1 -0
  26. package/dist/sandbox/smol.js +485 -0
  27. package/dist/sandbox/smol.js.map +1 -0
  28. package/dist/skills-install.d.ts +12 -0
  29. package/dist/skills-install.js +179 -0
  30. package/dist/skills-install.js.map +1 -0
  31. package/package.json +4 -2
  32. package/plugins/lastlight/.claude-plugin/plugin.json +12 -0
  33. package/plugins/lastlight/README.md +44 -0
  34. package/plugins/lastlight/skills/lastlight-client/SKILL.md +82 -0
  35. package/plugins/lastlight/skills/lastlight-evals/SKILL.md +130 -0
  36. package/plugins/lastlight/skills/lastlight-evals/references/instance-schema.md +84 -0
  37. package/plugins/lastlight/skills/lastlight-evals/references/models-json.md +42 -0
  38. package/plugins/lastlight/skills/lastlight-overlay/SKILL.md +72 -0
  39. package/plugins/lastlight/skills/lastlight-overlay/references/forking.md +55 -0
  40. package/plugins/lastlight/skills/lastlight-overlay/references/overlay-layout.md +52 -0
  41. package/plugins/lastlight/skills/lastlight-server/SKILL.md +124 -0
  42. package/plugins/lastlight/skills/lastlight-server/references/env-schema.md +103 -0
  43. package/plugins/lastlight/skills/lastlight-server/references/operations.md +60 -0
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: lastlight-overlay
3
+ description: Create or customize a Last Light deployment OVERLAY (the private instance/ repo) — scaffold it, then fork built-in workflows, prompts, skills, or the agent persona (agent-context) so a deployment can override them. Use when the user wants to "create a Last Light overlay / instance repo", "customize / fork a workflow", "override a prompt or skill", "change the agent's persona/soul/rules", or tune a deployment's config without forking the whole codebase. For first-time server install use lastlight-server.
4
+ version: 1.0.0
5
+ tags: [lastlight, overlay, instance, fork, workflows, customization]
6
+ ---
7
+
8
+ # Create & customize a Last Light overlay
9
+
10
+ Last Light keeps per-deployment customization in a private **overlay** at
11
+ `instance/`, layered over the packaged defaults at startup. The overlay can hold
12
+ `config.yaml`, `secrets/`, and overrides of any asset — `workflows/`,
13
+ `workflows/prompts/`, `skills/`, `agent-context/`. An overlay copy **shadows the
14
+ built-in by logical name**, so you only fork what you want to change.
15
+
16
+ These are host-local file operations on the working directory (resolved from
17
+ `--home` → `LASTLIGHT_HOME` → saved `serverHome` → `~/lastlight`).
18
+
19
+ ## 1. Scaffold or adopt the overlay
20
+
21
+ ```bash
22
+ lastlight server setup
23
+ ```
24
+
25
+ This scaffolds/adopts the working directory: clones the core repo if needed, then
26
+ **creates a fresh overlay** (scaffold + optional private `gh repo create`) or
27
+ **clones an existing** overlay repo — your choice at the prompt. It also symlinks
28
+ `instance/docker-compose.override.yml` and saves the working dir for later
29
+ `lastlight server …` commands.
30
+
31
+ Read **`references/overlay-layout.md`** for the full directory shape and how the
32
+ layering/merge rules work (arrays replace, maps deep-merge, overlay wins by
33
+ name).
34
+
35
+ ## 2. Tune non-secret config
36
+
37
+ Edit `instance/config.yaml` to set `managedRepos`, and optionally override
38
+ `models`, `variants`, `routes`, `approvals`, `disabled.*`. Secrets stay in
39
+ `instance/secrets/.env` (never in config.yaml).
40
+
41
+ ## 3. Fork built-in assets to customize them
42
+
43
+ Use `lastlight fork` — it copies a built-in into `instance/` so your edited copy
44
+ shadows the default. Read **`references/forking.md`** for exactly what each fork
45
+ copies and the editing workflow.
46
+
47
+ ```bash
48
+ lastlight fork # list forkable workflows + agent-context (marks what's already forked)
49
+ lastlight fork <workflow> # copy a workflow YAML + every prompt & skill its phases reference
50
+ lastlight fork agent-context # copy soul.md / rules.md / security.md (the persona)
51
+ lastlight fork agent-context soul.md # just one persona file
52
+ # add --force to overwrite an existing overlay copy; --home <dir> to target a specific working dir
53
+ ```
54
+
55
+ Then edit the copied files under `instance/…`.
56
+
57
+ ## 4. Apply
58
+
59
+ - **Config-only or overlay-asset edits** (committed to the overlay): take effect
60
+ with `lastlight server restart agent` — no image rebuild.
61
+ - If the overlay is a separate git repo, commit + push there first, then restart.
62
+
63
+ ```bash
64
+ lastlight server status # shows forked/overridden assets + version drift
65
+ lastlight server restart agent
66
+ ```
67
+
68
+ ## Done when
69
+
70
+ The overlay exists with the intended `config.yaml` and any forked assets under
71
+ `instance/`, `lastlight server status` lists the overrides, and the agent has
72
+ been restarted to apply them. Report which assets were forked and where they live.
@@ -0,0 +1,55 @@
1
+ # Forking built-in assets with `lastlight fork`
2
+
3
+ `lastlight fork` copies a built-in asset into the overlay (`instance/`) so your
4
+ edited copy shadows the default by logical name. It's host-local — it operates on
5
+ the working directory's files, not over HTTP.
6
+
7
+ Path resolution: an explicit `--home <dir>` wins; otherwise if you're standing in
8
+ an overlay it writes there (reading built-ins from the parent checkout); if
9
+ you're in a core checkout it writes to `<checkout>/instance`; else it falls back
10
+ to `LASTLIGHT_HOME` / the saved server home / `~/lastlight`.
11
+
12
+ ## Commands
13
+
14
+ ```bash
15
+ lastlight fork # list forkable workflows + agent-context files; marks what's already forked
16
+ lastlight fork <workflow> # e.g. `lastlight fork build`
17
+ lastlight fork agent-context # all of soul.md / rules.md / security.md
18
+ lastlight fork agent-context <file> # a single persona file, e.g. soul.md
19
+ ```
20
+
21
+ Flags: `--force` overwrites an existing overlay copy (otherwise existing files
22
+ are skipped); `--home <dir>` targets a specific working directory.
23
+
24
+ ## What each fork copies
25
+
26
+ - **`lastlight fork <workflow>`** copies the workflow YAML
27
+ (`workflows/<name>.yaml`) **plus every prompt and skill its phases reference**
28
+ (`workflows/prompts/*.md`, `skills/<name>/`). So the forked workflow is
29
+ self-contained and editable in the overlay. Existing destinations are skipped
30
+ unless `--force`.
31
+ - **`lastlight fork agent-context [file]`** copies the agent "personality" files
32
+ (`agent-context/*.md` — typically `soul.md`, `rules.md`, `security.md`) into
33
+ `instance/agent-context/`. With no file argument it forks all of them; pass a
34
+ filename for just one.
35
+
36
+ `agent-context` is forked only via the literal `agent-context` target — a bare
37
+ name is always treated as a workflow.
38
+
39
+ ## Editing workflow
40
+
41
+ 1. Fork the asset.
42
+ 2. Edit the copy under `instance/…`.
43
+ 3. If the overlay is its own git repo, commit + push there.
44
+ 4. Apply: `lastlight server restart agent` (config/asset overlay change — no
45
+ image rebuild).
46
+ 5. Confirm with `lastlight server status` (lists forked/overridden assets) and
47
+ the dashboard `/config` view.
48
+
49
+ ## Common targets
50
+
51
+ - Workflows: `build`, `pr-fix`, `pr-review`, `issue-triage`, `issue-comment`,
52
+ `repo-health`, and the `cron-*` workflows. Run `lastlight fork` to see the live
53
+ list.
54
+ - Persona: `soul.md` (voice/identity), `rules.md` (hard rules), `security.md`
55
+ (security posture).
@@ -0,0 +1,52 @@
1
+ # Overlay layout & layering rules
2
+
3
+ The overlay is a private directory (often its own git repo) mounted read-only at
4
+ `/app/instance` and pointed to by `LASTLIGHT_OVERLAY_DIR`. It is layered over the
5
+ packaged defaults at startup.
6
+
7
+ ```
8
+ instance/
9
+ config.yaml # merged over config/default.yaml
10
+ .gitignore # ignores secrets/ + *.pem
11
+ docker-compose.override.yml # optional (e.g. Caddy disabled); symlinked into the project root
12
+ secrets/ # host-only, gitignored
13
+ .env # all env vars (mode 0600)
14
+ app.pem # GitHub App private key (mode 0600)
15
+ agent-context/ # optional persona overrides
16
+ soul.md
17
+ rules.md
18
+ security.md
19
+ workflows/ # optional workflow overrides
20
+ <name>.yaml
21
+ prompts/
22
+ <name>.md
23
+ skills/ # optional skill overrides
24
+ <name>/
25
+ SKILL.md
26
+ ```
27
+
28
+ ## Layering / merge rules
29
+
30
+ - **config.yaml** is deep-merged over the packaged `config/default.yaml`:
31
+ - **maps** deep-merge,
32
+ - **arrays** replace wholesale (e.g. `managedRepos`, `disabled.*`),
33
+ - environment variables override both.
34
+ - Secrets are env-only — never put them in config.yaml.
35
+ - **Assets** (`workflows/`, `workflows/prompts/`, `skills/`, `agent-context/`)
36
+ resolve **layer-aware by logical name**: an overlay file with the same logical
37
+ name as a built-in *wins*; built-ins are the fallback. So you fork only what
38
+ you want to change.
39
+
40
+ ## What `config.yaml` can override
41
+
42
+ `managedRepos`, `models` / per-task model overrides, `variants` (reasoning
43
+ effort), `routes`, `approvals`, and `disabled.*`. See the repo's
44
+ `config/default.yaml` for the authoritative shape and keys.
45
+
46
+ ## Applying changes
47
+
48
+ - config.yaml change, or an added/changed `.env` value → `lastlight server
49
+ restart agent`.
50
+ - **Removing** an `.env` value → `lastlight server start agent` (recreate).
51
+ - The dashboard's `/config` view shows Default / Overlay / Merged (non-secret) so
52
+ you can confirm what took effect.
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: lastlight-server
3
+ description: Install and configure a Last Light SERVER — the GitHub maintenance agent plus its docker-compose stack — on a host. Use when the user wants to "set up / install / deploy / stand up a Last Light server or instance", configure its GitHub App, models, managed repos, or domain, or get the agent running for the first time. Drives the `lastlight` CLI; for connecting an existing CLI to a server use lastlight-client instead, and for editing a running deployment's config use lastlight-overlay.
4
+ version: 1.0.0
5
+ tags: [lastlight, server, deploy, docker, setup]
6
+ ---
7
+
8
+ # Install & configure a Last Light server
9
+
10
+ A Last Light **server** runs the agent and a docker-compose stack on a host. It
11
+ needs: Docker, a GitHub App (so it can act on repos), a model provider API key,
12
+ and a list of repos it's allowed to manage. Configuration lives in a private
13
+ **overlay** at `instance/` (a `config.yaml` plus `secrets/.env` + `secrets/app.pem`).
14
+
15
+ Your job: gather the inputs, get the working directory in place, write the
16
+ config, then build and launch. Prefer the deterministic file-writing path below
17
+ (fully automatable) over the interactive wizard.
18
+
19
+ ## 1. Check prerequisites
20
+
21
+ Run these and report anything missing before continuing:
22
+
23
+ ```bash
24
+ docker info >/dev/null 2>&1 && echo "docker: ok" || echo "docker: NOT running"
25
+ git --version; node --version
26
+ command -v lastlight >/dev/null && lastlight --help >/dev/null 2>&1 && echo "lastlight: installed" || echo "lastlight: missing"
27
+ ```
28
+
29
+ - Docker must be running.
30
+ - If `lastlight` is missing: `npm i -g lastlight`.
31
+
32
+ ## 2. Gather inputs from the user
33
+
34
+ Ask for each of these (don't guess). Group the questions; explain what each is for.
35
+
36
+ **Required**
37
+ - **GitHub App** — App ID, Installation ID, and the path to the App's private
38
+ key `.pem` file. (If they don't have a GitHub App yet, point them at GitHub →
39
+ Settings → Developer settings → GitHub Apps; it needs webhook + repo
40
+ contents/issues/pull-requests permissions. They install it on their repos to
41
+ get the Installation ID.)
42
+ - **Domain** — the public hostname for webhooks/dashboard, e.g.
43
+ `lastlight.example.com`. Ask whether to use the bundled **Caddy** for
44
+ automatic TLS (default yes). The GitHub App webhook URL will be
45
+ `https://<domain>/webhook`.
46
+ - **Managed repos** — one or more `owner/repo` the bot is allowed to act on. The
47
+ bot ignores any repo not listed.
48
+ - **Model** — a `provider/model` string (default `anthropic/claude-sonnet-4-6`),
49
+ plus the **matching** provider API key. Key→provider mapping:
50
+ `sk-ant-…` → `ANTHROPIC_API_KEY`, `sk-or-…` → `OPENROUTER_API_KEY`, other
51
+ `sk-…` → `OPENAI_API_KEY`.
52
+
53
+ **Optional**
54
+ - Admin dashboard password (≥8 chars) to protect `/admin`.
55
+ - Slack: bot token (`xoxb-…`), app token (`xapp-…`), delivery channel id,
56
+ allowed user ids.
57
+
58
+ ## 3. Working directory + overlay
59
+
60
+ The server runs out of a working directory: a checkout of the lastlight repo
61
+ plus an `instance/` overlay. Scaffold it (this clones the core repo if needed
62
+ and creates/clones the overlay):
63
+
64
+ ```bash
65
+ lastlight server setup # interactive: confirms working dir + overlay
66
+ ```
67
+
68
+ If you need to do this non-interactively / the user already has a checkout, work
69
+ in that directory directly (it has `docker-compose.yml`, `workflows/`, `skills/`,
70
+ `config/`). The overlay you write to is `<workdir>/instance/`.
71
+
72
+ ## 4. Write the configuration
73
+
74
+ Create the overlay files directly (this is the automatable path — it avoids the
75
+ TTY wizard). From the working directory:
76
+
77
+ 1. `mkdir -p instance/secrets && chmod 700 instance/secrets`
78
+ 2. Copy the user's PEM to `instance/secrets/app.pem` and `chmod 600` it.
79
+ 3. Generate two random secrets: `openssl rand -hex 32` for `WEBHOOK_SECRET` and
80
+ again for `ADMIN_SECRET`.
81
+ 4. Write `instance/secrets/.env` (`chmod 600`) and `instance/config.yaml`
82
+ following **`references/env-schema.md`** — it has the exact keys, value
83
+ formats, and ready-to-fill templates for both files.
84
+ 5. If the user declined Caddy, write `instance/docker-compose.override.yml` to
85
+ disable it (template in `references/env-schema.md`).
86
+
87
+ Read `references/env-schema.md` now before writing the files — it has the precise
88
+ key list and value formats.
89
+
90
+ > Alternative (let the user drive): if they'd rather answer prompts themselves,
91
+ > have them run `lastlight setup --server` in the working directory — the same
92
+ > wizard, interactive. It is a TTY wizard, so you can't fill it in from a script.
93
+
94
+ ## 5. Build and launch
95
+
96
+ ```bash
97
+ lastlight server update # build images, bring stack up, restart sidecars, health-check
98
+ ```
99
+
100
+ Then verify:
101
+
102
+ ```bash
103
+ curl -fsS http://127.0.0.1:8644/health && echo " ← healthy"
104
+ lastlight server status # compose state + version drift
105
+ ```
106
+
107
+ ## 6. Hand-off checklist
108
+
109
+ Tell the user to:
110
+ - Paste the generated `WEBHOOK_SECRET` and the webhook URL
111
+ (`https://<domain>/webhook`) into their **GitHub App** settings, and confirm a
112
+ test delivery succeeds.
113
+ - Visit `https://<domain>/admin` (password is `ADMIN_PASSWORD` if they set one).
114
+ - Make later config edits in the overlay, then `lastlight server restart agent`
115
+ (no rebuild). See the **lastlight-overlay** skill for forking workflows/assets.
116
+
117
+ For day-2 operations (start/stop/restart/update, logs, redeploy after a code
118
+ change), read **`references/operations.md`**.
119
+
120
+ ## Done when
121
+
122
+ The stack is up, `GET /health` returns ok, `lastlight server status` shows the
123
+ agent running, and the user has the webhook secret + URL to finish GitHub App
124
+ setup. Report the webhook URL, dashboard URL, and which config you wrote.
@@ -0,0 +1,103 @@
1
+ # Overlay config reference — `instance/secrets/.env` + `instance/config.yaml`
2
+
3
+ The server reads config in layers: packaged `config/default.yaml` → overlay
4
+ `instance/config.yaml` → `instance/secrets/.env` env vars → `LASTLIGHT_*` env.
5
+ Secrets stay env-only and out of git. The container entrypoint copies
6
+ `instance/secrets/.env` → `/app/.env` and `instance/secrets/*.pem` → `/app/*.pem`
7
+ (mode 600) at boot, and the overlay is mounted read-only at `/app/instance`.
8
+
9
+ ## `instance/secrets/.env` (mode 0600)
10
+
11
+ Write exactly these keys. `WEBHOOK_SECRET` and `ADMIN_SECRET` are random 32-byte
12
+ hex (`openssl rand -hex 32`). Include only the ONE provider key that matches the
13
+ model.
14
+
15
+ ```dotenv
16
+ # ── Last Light — Environment Variables ─────────────────────
17
+
18
+ # Overlay (this deployment's private config + assets)
19
+ LASTLIGHT_OVERLAY_DIR=/app/instance
20
+
21
+ # ── GitHub App (required) ────────────────────────────────
22
+ GITHUB_APP_ID=123456
23
+ # PEM lives at instance/secrets/app.pem; the entrypoint symlinks it to /app/app.pem.
24
+ GITHUB_APP_PRIVATE_KEY_PATH=./app.pem
25
+ GITHUB_APP_INSTALLATION_ID=789012
26
+
27
+ # ── Webhook (required) — must match the GitHub App's webhook secret ──
28
+ WEBHOOK_SECRET=<openssl rand -hex 32>
29
+
30
+ # ── Domain (used by Caddy for TLS) ───────────────────────
31
+ DOMAIN=lastlight.example.com
32
+
33
+ # ── Model + provider API key ─────────────────────────────
34
+ LASTLIGHT_MODEL=anthropic/claude-sonnet-4-6
35
+ # Set whichever ONE matches LASTLIGHT_MODEL:
36
+ ANTHROPIC_API_KEY=sk-ant-...
37
+ # OPENAI_API_KEY=sk-...
38
+ # OPENROUTER_API_KEY=sk-or-...
39
+
40
+ # ── Admin dashboard ──────────────────────────────────────
41
+ ADMIN_SECRET=<openssl rand -hex 32>
42
+ # Optional — protects /admin with a password (>=8 chars):
43
+ # ADMIN_PASSWORD=...
44
+
45
+ # ── Slack (optional) ─────────────────────────────────────
46
+ # SLACK_BOT_TOKEN=xoxb-...
47
+ # SLACK_APP_TOKEN=xapp-...
48
+ # SLACK_DELIVERY_CHANNEL=C0123456
49
+ # SLACK_ALLOWED_USERS=U0123,U0456
50
+ ```
51
+
52
+ Notes:
53
+ - `GITHUB_APP_PRIVATE_KEY_PATH=./app.pem` is correct as-is — it's resolved
54
+ inside the container, not on the host. Just place the file at
55
+ `instance/secrets/app.pem`.
56
+ - Provider-key detection: `sk-ant-…` is Anthropic; `sk-or-…` is OpenRouter; any
57
+ other `sk-…` is OpenAI.
58
+ - **Removing** an env var later requires a container *recreate*
59
+ (`lastlight server start agent`), not just a restart — compose injects
60
+ `env_file` vars at creation time. Adding/changing one only needs
61
+ `lastlight server restart agent`.
62
+
63
+ ## `instance/config.yaml`
64
+
65
+ Non-secret overlay config, merged over `config/default.yaml`. Arrays replace;
66
+ maps deep-merge. Minimum useful content is the managed-repos list:
67
+
68
+ ```yaml
69
+ # Last Light — private deployment overlay config
70
+ # Merged over config/default.yaml at startup. Restart to apply:
71
+ # lastlight server restart agent
72
+ managedRepos:
73
+ - owner/repo
74
+ - owner/another-repo
75
+ ```
76
+
77
+ If there are no repos yet, write `managedRepos: []` and tell the user to add
78
+ entries before the bot will act. You can also override `models`, `variants`,
79
+ `routes`, and `disabled.*` here — see the repo's `config/default.yaml` for the
80
+ full shape.
81
+
82
+ ## `instance/.gitignore`
83
+
84
+ So the overlay can become a private git repo without leaking secrets:
85
+
86
+ ```gitignore
87
+ secrets/
88
+ *.pem
89
+ ```
90
+
91
+ ## `instance/docker-compose.override.yml` (only if Caddy is disabled)
92
+
93
+ Write this ONLY when the user opts out of Caddy TLS (they terminate TLS
94
+ elsewhere). Then symlink it into the working dir as `./docker-compose.override.yml`
95
+ (or run `lastlight server setup` / `update`, which ensures the symlink).
96
+
97
+ ```yaml
98
+ # Deployment compose override — this deployment opted out of Caddy TLS.
99
+ services:
100
+ caddy:
101
+ profiles:
102
+ - disabled
103
+ ```
@@ -0,0 +1,60 @@
1
+ # Last Light server — day-2 operations
2
+
3
+ All commands are **host-local** (run on the server, not over HTTP) and operate
4
+ on the working directory. That directory resolves from `--home` →
5
+ `LASTLIGHT_HOME` → the saved `serverHome` (from `lastlight server setup`) →
6
+ `~/lastlight`.
7
+
8
+ ## Lifecycle
9
+
10
+ ```bash
11
+ lastlight server status # docker compose ps + core/overlay version drift
12
+ lastlight server start [service] # docker compose up -d (whole stack, or one service)
13
+ lastlight server stop [service] # stop one service, or `down` the whole stack
14
+ lastlight server restart [service] # restart (default service: agent)
15
+ ```
16
+
17
+ ## Apply config changes
18
+
19
+ - **Overlay config.yaml or an added/changed `.env` value:**
20
+ `lastlight server restart agent` — no image rebuild.
21
+ - **Removing an `.env` value:** `lastlight server start agent` (recreate) — a
22
+ restart can't unset env_file vars injected at container creation.
23
+ - **Code/asset changes** (anything under `src/`, `workflows/`, `skills/`,
24
+ `agent-context/`, `config/default.yaml`): a full rebuild — `lastlight server
25
+ update`.
26
+
27
+ ## Redeploy after a code change (the canonical deploy)
28
+
29
+ ```bash
30
+ lastlight server update # pull core + overlay, build images, recreate, restart sidecars, health-check
31
+ # flags: --no-core --no-overlay --no-build --yes
32
+ ```
33
+
34
+ This: git-pulls the core repo and the `instance/` overlay, builds the `agent` +
35
+ `sandbox` (+ best-effort `sandbox-qa`) images, `docker compose up -d
36
+ --remove-orphans`, force-restarts the egress sidecars (coredns + nginx + otel),
37
+ and health-checks `http://127.0.0.1:8644/health`.
38
+
39
+ ## Logs & health
40
+
41
+ ```bash
42
+ curl -fsS http://127.0.0.1:8644/health
43
+ lastlight server logs agent --follow # live harness logs
44
+ lastlight server logs [service] --tail 200 --since 10m
45
+ lastlight server list # the lastlight-* containers
46
+ ```
47
+
48
+ ## Debug a running instance (over the admin API)
49
+
50
+ These talk to the instance over HTTP (need `lastlight login` first — see the
51
+ lastlight-client skill):
52
+
53
+ ```bash
54
+ lastlight workflow list [--status s] [--workflow name]
55
+ lastlight workflow log <id> [--follow]
56
+ lastlight session list ; lastlight session log <id> --follow
57
+ lastlight logs search "<text>" [--scope errors|messages|all]
58
+ lastlight approvals list|approve <id>|reject <id>
59
+ lastlight stats [--daily n | --hourly n]
60
+ ```