@stackbone/cli 0.1.0-alpha.1 → 0.1.0-alpha.10

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/CHANGELOG.md CHANGED
@@ -7,6 +7,234 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.0-alpha.10] - 2026-06-12
11
+
12
+ ### Fixed
13
+
14
+ - `stackbone dev` no longer crashes on boot with
15
+ `ERR_MODULE_NOT_FOUND: @stackbone/agent-server` in a real creator project
16
+ outside this monorepo. The dev agent runs as a separate `node` process that
17
+ imports `@stackbone/agent-server` — a private package a creator never installs
18
+ — and the published CLI had no way to provide it (it could only bundle it from
19
+ workspace source, which isn't present in an installed CLI). The CLI build now
20
+ ships its own pre-bundled copy under `runtime-deps/`, and `stackbone dev`
21
+ copies it into the project's `node_modules` at boot whenever no workspace
22
+ source is found. In-monorepo development is unchanged.
23
+
24
+ ### Added
25
+
26
+ - `stackbone connectors` — lists the connectors in the catalog and the
27
+ workspace connections (ids + names) configured for the current account, so
28
+ you can see what an installed agent can reach before invoking it.
29
+ - `stackbone trigger` — fires a fake automation trigger against the local dev
30
+ agent, so connector-driven flows can be exercised end to end without the
31
+ real external event.
32
+
33
+ ### Changed
34
+
35
+ - The dev agent entry file is now generated under `.stackbone/dev/` instead of
36
+ at the project root, keeping the working tree clean during `stackbone dev`.
37
+ - The dev emulator now serves mock/passthrough connections and generates the
38
+ connection TypeScript types on the fly, so agent code that calls
39
+ `client.connections` type-checks locally.
40
+
41
+ ## [0.1.0-alpha.7] - 2026-05-26
42
+
43
+ ### Added
44
+
45
+ - The Claude Code skill bundle that `stackbone init` / `stackbone link`
46
+ writes is now maintained as a standalone file at
47
+ `apps/wiki/public/content/skills/claude-code/SKILL.md` — the same file
48
+ the CLI installs at `.claude/skills/stackbone/SKILL.md`, modulo the
49
+ `{{cliVersion}}`, `{{controlPlaneUrl}}` and `{{organizationSlug}}`
50
+ placeholders. The wiki page at `/docs/coding-agents/claude-code`
51
+ auto-embeds it between `<!-- skill-embed-start: ... -->` markers.
52
+ A new `cli:sync-skills` Nx target (chained from `cli:build`, and a
53
+ dependency of `wiki:manifest`) regenerates both
54
+ `apps/cli/src/skills/templates.generated.ts` and the wiki embed from
55
+ the source SKILL.md. `pnpm cli:sync-skills --check` fails CI if a
56
+ placeholder is missing or if either output drifts from the source, so
57
+ the SKILL.md a human reviews in the wiki is byte-equal to the one the
58
+ CLI bundle ships.
59
+
60
+ ### Fixed
61
+
62
+ - `renderClaudeSkill` no longer interprets `$` in interpolated values as
63
+ a `String.replace` substitution pattern (`$&`, `$'`, `$$`, …). Slugs or
64
+ URLs containing a literal `$` were previously silently corrupted in the
65
+ installed `SKILL.md`. Covered by a new unit test in
66
+ `assembler.spec.ts`.
67
+
68
+ ## [0.1.0-alpha.6] - 2026-05-18
69
+
70
+ ### Fixed
71
+
72
+ - Git Bash / MSYS / MinGW on Windows are no longer caught by the native
73
+ Windows guard. `isWindowsNative` now also inspects
74
+ `process.env.MSYSTEM` (`MINGW64`, `MINGW32`, `MSYS`), which Git for
75
+ Windows sets in every Git Bash session — including the one VS Code's
76
+ integrated terminal spawns. The banner and `unsupported_platform`
77
+ envelope still steer PowerShell / CMD users to WSL2, with Git Bash now
78
+ listed alongside as a supported alternative.
79
+
80
+ ## [0.1.0-alpha.5] - 2026-05-18
81
+
82
+ ### Added
83
+
84
+ - `stackbone docs <section>` content is now generated from the wiki
85
+ (`apps/wiki/public/content/docs/<section>/*.md`). A new
86
+ `cli:sync-docs` Nx target reads every markdown page, strips the
87
+ frontmatter, prepends the title as an H1 and emits
88
+ `apps/cli/src/docs/topics.generated.ts`; `cli:build` depends on it so
89
+ the bundled CLI can never drift from the wiki again. `docs <section>`
90
+ prints an auto-generated table of contents; `docs <section>/<slug>`
91
+ prints the page body. The inline `starters` / `connections`
92
+ placeholders are gone — once the corresponding wiki pages land they
93
+ surface automatically.
94
+ - Branded interactive surface. Clack's prompt glyphs (`◆`, `│`, `┌`,
95
+ `└`, spinner) are repainted to brand orange via a pnpm patch on
96
+ `@clack/prompts`, the boot banner picks up the same truecolor
97
+ accent, and every interactive command (`init`, `link`, `dev`,
98
+ `login`) now opens with a `◆◆◆ stackbone v<version> · <command>`
99
+ header. The `login` flow uses `note()` for the device code + URL,
100
+ `log.step()` for the browser hint and a `spinner()` for the polling
101
+ wait — replacing the raw `process.stdout` writes that read flat
102
+ against the rest of the clack session.
103
+
104
+ ### Changed
105
+
106
+ - **Breaking — `--api-url` flag removed.** Control-plane URL resolution
107
+ collapses to `STACKBONE_API_URL` → project config → global config.
108
+ The env var keeps working internally so the team can still point at
109
+ staging/prod, but it is no longer advertised in the wiki, the
110
+ embedded skill template or the README — external developers should
111
+ not need to think about it. HTTP, device-flow and dev-tunnel error
112
+ suggestions are updated to match.
113
+ - Native Windows shells (PowerShell, CMD, Git Bash) are now blocked at
114
+ startup. `process.platform === 'win32'` triggers a branded `◆◆◆`
115
+ banner pointing at issue #70 for the long-term Windows-support work,
116
+ routed through the canonical `StackboneCliError` envelope so
117
+ `--json` consumers see the same `{schema_version, error, exit_code}`
118
+ shape they get from every other failure. WSL is unaffected because
119
+ Node there reports `linux`.
120
+ - The truecolor ANSI palette is centralised in `core/ansi.ts` and
121
+ reused from the boot-banner, brand-header and platform-guard
122
+ formatters instead of three hand-copied `{ reset, bold, dim, accent }`
123
+ objects drifting in parallel.
124
+ - Internal cleanup: `parseResponse(schema, raw, context)` extracted to
125
+ `infra/http.ts` so every control-plane service shares one error
126
+ envelope for unexpected response shapes; `resolveDrizzleKitBin`
127
+ consolidated in `dev/drizzle-bin.ts`; UUID validation centralised in
128
+ `dev/uuid.ts`. `stackbone dev` only fetches the active organization
129
+ when the project is missing `localDevInstallationId` /
130
+ `organizationSlug`, and SIGINT teardown runs the tunnel-PATCH and
131
+ `session.stop()` via `Promise.allSettled` so a hung control-plane
132
+ call cannot block docker teardown. Independent filesystem writes in
133
+ `project.service` and `dev/compose.ts` now run in parallel.
134
+
135
+ ### Fixed
136
+
137
+ - `stackbone init` on a clean directory no longer errors with "Refusing
138
+ to overwrite agent.yaml". Every starter ships a placeholder manifest
139
+ that `writeStarterFiles` would write first, then
140
+ `writeAgentManifest` would refuse to overwrite. The new
141
+ `writeStarterProject` helper drops the placeholder, writes the rest
142
+ of the starter, and regenerates the manifest with the user-chosen
143
+ name; a flow-level test pins the contract so the two helpers cannot
144
+ re-diverge.
145
+
146
+ ## [0.1.0-alpha.4] - 2026-05-18
147
+
148
+ ### Changed
149
+
150
+ - **Breaking — `--template` renamed to `--starter`.** The `stackbone init`
151
+ command now reads `--starter <slug>` and scaffolds from `starters/<slug>/`,
152
+ a directory subtreed from one of the public
153
+ `github.com/stackbone/starter-<slug>` repos (10 slugs: `hello-world`, `ai`,
154
+ `rag`, `db`, `storage`, `queues`, `hitl`, `secrets`, `prompts`, `config`).
155
+ The legacy `--template` flag is recognised solely to emit the migration
156
+ message `--template was renamed to --starter; rerun with --starter <slug>`
157
+ and exit non-zero. The interactive picker now groups starters by
158
+ `stackbone.category` (`Core` first, then `Capabilities`) and lists ten
159
+ entries (the three bundled `hello-world` / `workflow` / `autonomous`
160
+ templates are gone — `workflow` and `autonomous` were mocks).
161
+ `.stackbone/project.json` writes `starter: <slug>`; the field is read-compat
162
+ with the legacy `template:` key (one release) and rewritten on next
163
+ `init`/`link`. The bundled `apps/cli/src/templates/` directory is deleted
164
+ in favour of the subtreed `starters/` layout. Public exports of
165
+ `services/scaffolding.ts` were renamed: `TEMPLATES` → `STARTERS`,
166
+ `TemplateChoice` → `StarterChoice`, `parseTemplateId` → `parseStarterId`,
167
+ `renderTemplate` → `renderStarter`.
168
+
169
+ ## [0.1.0-alpha.3] - 2026-05-15
170
+
171
+ ### Added
172
+
173
+ - `stackbone dev` sessions are now first-class `installation` rows
174
+ (`kind='local'`). The CLI registers the row via
175
+ `POST /api/v1/installations/local-dev` during `init`/`link`, `PATCH`es
176
+ `local_tunnel_url` on dev start, and nulls it on Ctrl-C. The dev
177
+ boot banner emits a path-aware deeplink
178
+ (`app.stackbone.ai/app/<orgSlug>/installations/<id>?stackbone-dev=<tunnel>`)
179
+ consumed in one shot by the `stackboneDevBootstrapGuard` so Studio
180
+ opens straight on the local installation. Local-dev rows skip the
181
+ provisioning saga and the tier-quota gate by construction and are
182
+ garbage-collected after 7 days of inactivity.
183
+
184
+ ### Changed
185
+
186
+ - Unified agent runtime env contract under `STACKBONE_*`. The dev
187
+ emulator now injects `STACKBONE_AGENT_ID` (the agent slug) plus
188
+ `STACKBONE_S3_ACCESS_KEY` / `STACKBONE_S3_SECRET_KEY` /
189
+ `STACKBONE_S3_ENDPOINT` / `STACKBONE_S3_BUCKET` /
190
+ `STACKBONE_S3_REGION` / `STACKBONE_POSTGRES_URL` into the agent
191
+ process, replacing the previous mix of `AWS_*` / `S3_*` /
192
+ `DATABASE_URL` names. Agents that still read the legacy names must
193
+ migrate.
194
+ - Emulator `/api/schema` now returns `{ input: null, output: null }`
195
+ (200) when the manifest declares neither schema or the agent is
196
+ unreachable — was 502 before. Mirrors the cloud `/studio/schema`
197
+ shape so the Studio Playground UI can boot before the agent is
198
+ healthy.
199
+ - `dev/fixtures-store.ts` persists JSONL records using the canonical
200
+ `Fixture` wire schema (camelCase `createdAt`, typed as `Fixture`) so
201
+ list/create return the wire type directly.
202
+
203
+ ### Fixed
204
+
205
+ - `protectedCommand` no longer triggers the device-code flow on the
206
+ user's behalf. When no valid session exists it fails fast with
207
+ `code: 'auth'` and the standard "Run stackbone login" hint, and it
208
+ no longer retries on a mid-flight 401. Reason: the HTTP adapter
209
+ caches `tokenStore.activeSession()` once per process, so the
210
+ pre-login `POST /api/auth/device/code` poisoned the cache with
211
+ `null` and every subsequent request from the same process went out
212
+ without an Authorization header.
213
+
214
+ ## [0.1.0-alpha.2] - 2026-05-12
215
+
216
+ ### Added
217
+
218
+ - Per-stage spinners during `stackbone dev` (docker, platform/creator/rag
219
+ migrations, agent, emulator, tunnel) and a redesigned rounded-box Studio
220
+ banner that surfaces the actionable deeplink first. New global flag
221
+ `--verbose` (also `STACKBONE_VERBOSE=1`) restores the raw firehose of
222
+ docker compose stdout and pino logs for debugging.
223
+
224
+ ### Changed
225
+
226
+ - `stackbone dev` Studio banner now prints
227
+ `app.stackbone.ai/app?stackbone-dev=<tunnel>` instead of the retired
228
+ `/studio?baseUrl=…` deeplink. The new URL is consumed in one shot by the
229
+ `stackboneDevBootstrapGuard` mounted on `/app`, which flips Studio to
230
+ local mode against the tunnel and opens the panel on Runs.
231
+
232
+ ### Fixed
233
+
234
+ - `stackbone dev` boot banner no longer emits a leading newline or
235
+ duplicate `│` rail rows around the inlined Studio banner when running
236
+ under clack's left rail in human mode.
237
+
10
238
  ## [0.1.0-alpha.1] - 2026-05-12
11
239
 
12
240
  ### Changed
package/README.md CHANGED
@@ -14,7 +14,7 @@ cd my-agent
14
14
  npx @stackbone/cli@alpha dev
15
15
  ```
16
16
 
17
- That's it. `init` scaffolds a new agent project (templates + Claude skill); `dev` runs a local control-plane emulator with Stackbone Studio at `http://localhost:4242` so you can iterate without deploying.
17
+ That's it. `init` scaffolds a new agent project (templates + Claude skill); `dev` runs a local control-plane emulator with Stackbone Studio at `http://localhost:4242` so you can iterate without publishing.
18
18
 
19
19
  ## Commands
20
20
 
@@ -22,7 +22,7 @@ That's it. `init` scaffolds a new agent project (templates + Claude skill); `dev
22
22
  | ---------------------------- | ---------------------------------------------------------------------- |
23
23
  | `stackbone init [name]` | Scaffold a new Stackbone project from a template. |
24
24
  | `stackbone dev` | Run the local control-plane emulator + Stackbone Studio. |
25
- | `stackbone deploy` | Build, push, and deploy the current agent to Stackbone runtime. |
25
+ | `stackbone publish` | Build, push, and publish the current agent to Stackbone runtime. |
26
26
  | `stackbone login` / `logout` | Authenticate the CLI via the device-code flow (RFC 8628). |
27
27
  | `stackbone whoami` | Show the active user and organization. |
28
28
  | `stackbone current` | Print the organization currently linked to this session. |