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

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