Skip to content

Studio split + rename: @linuxdevil/lousho SDK, @linuxdevil/studio app, launcher, CI, bridge compat, docs, eject - #1155

Merged
LinuxDevil merged 16 commits into
mainfrom
fb-w13a-studio-package
Nov 14, 2026
Merged

LinuxDevil merged 16 commits into
mainfrom
fb-w13a-studio-package

Conversation

@LinuxDevil

@LinuxDevil LinuxDevil commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Consolidated merge of the full Forge Builder/Studio wave stack (formerly #1155 → #1160). One CI run covers everything:

  • W13a — SDK renamed lousho → @linuxdevil/lousho; Studio published as separate @linuxdevil/studio package (own package.json, bin lousho-studio, tsup server bundle, pin-sdk-range for publish).
  • W13b — SDK tarball stops shipping apps/agent-forge; lousho studio becomes a launcher that finds an installed @linuxdevil/studio (local → SDK-adjacent → global) or prints Studio is a separate install: npx @linuxdevil/studio.
  • W15a — scripts/pack-smoke-studio.ts + dedicated studio CI job (typecheck, lint:imports, client+server tests, build:studio, pack both tarballs, install in a fresh project, verify lousho-studio and lousho studio serve the UI).
  • W15b — bridge compatibility matrix: bridge.compat.test.ts + vitest.compat.config.ts + bridge-compat-min CI job running the same suite against the minimum supported SDK; HostSelection carries protocol/specVersions; SecretRef dedupe; pack-smoke helper sharing.
  • W16 — docs/agent-forge.md retitled Lousho Studio: install/start, workspaces + storage split, three agent kinds, SDK selection banners, collector lifecycle, deployed agents via LOUSHO_OBSERVE_*, updating; cli.md/installation.md/observability.md/upgrading.md/README/CHANGELOG updated; llms.txt regenerated.
  • A08b — POST /agents/:id/eject + Code tab "Eject to project": writes the agent directory (specToAgentDir) into the workspace with overwrite confirmation.

Test plan

  • SDK typecheck + Studio typecheck/typecheck:server
  • Studio client + server suites, lint:imports, bridge-compat (8 tests)
  • pack-smoke (SDK tarball: 1246 entries / 17.9 MiB) + pack-smoke:studio
  • docs gates: verify-snippets (372), llms:check, ratchet
  • CI green on this combined head

Supersedes #1156, #1157, #1158, #1159, #1160 (their commits are included here).

Generated with Devin

@LinuxDevil
LinuxDevil force-pushed the fb-w12-collector-lifecycle branch from bd7b204 to f36cb8a Compare November 14, 2026 10:24
@LinuxDevil
LinuxDevil changed the base branch from fb-w12-collector-lifecycle to main November 14, 2026 11:08
@LinuxDevil
LinuxDevil force-pushed the fb-w13a-studio-package branch from acd8261 to c9b0f01 Compare November 14, 2026 11:35
…udio

W13a: the SDK package moves from the unscoped 'lousho' name to the
scoped @linuxdevil/lousho so npm publishes land under the owner's scope.
Every import specifier, package reference, template, generated registry
item, deploy virtual-specifier matcher, dual-package test layout and
CLI message follows the new name; scripts/publish-github-packages.mjs
drops its now-obsolete alias rewrite since npm and GitHub Packages
names coincide.

Studio becomes independently publishable: apps/agent-forge is
@linuxdevil/studio with a 'lousho-studio' bin, files/engines/license/
repository/publishConfig metadata, and CJS tsup bundles (dist-server).
server/cli.ts parses --workspace/--port/--host/--help/--version,
validates them (exit 2 on bad input) and boots Studio with cwd as the
launch workspace; sdkRoot.ts resolves the SDK in both monorepo and
installed node_modules layouts; scripts/pin-sdk-range.mjs rewrites the
file:../.. dependency to a ^<version> range at prepack and restores it
at postpack. Runtime deps (@ai-sdk/*, ai, yaml, zod@3) move out of
devDependencies so the packed server runs standalone; zod stays v3 to
match Studio's schema style (the SDK peer accepts ^3.25.76 || ^4.0.0).
README/LICENSE added for the package.

Verified: SDK build + typecheck, Studio client/server typecheck,
lint + lint:imports (new no-sdk-source rule uses the registered
plugin id), SDK suite (7421 tests), Studio client suite (1238, one
perf-wall-clock flake that passes in isolation), Studio server suite
(1253), create-lousho unit + template e2e, api:check, docs:ratchet,
registry checks, npm pack (9-file tarball with pinned semver dep,
package.json restored), CLI smoke (--help/--version/port 0/health/
SIGTERM).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@LinuxDevil
LinuxDevil force-pushed the fb-w13a-studio-package branch from c9b0f01 to cdd477f Compare November 14, 2026 11:41
LinuxDevil and others added 13 commits November 14, 2026 15:02
…all budget

Merged main added exports the reports had not picked up, and the SDK
tarball grew past the 26 MiB pack-smoke ceiling (27.86 MB measured).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
# Conflicts:
#	.fallowrc.json
#	apps/agent-forge/package.json
#	apps/agent-forge/server/__tests__/deployRunner.test.ts
#	apps/agent-forge/server/index.ts
#	apps/agent-forge/server/lifecycle/publish.ts
#	apps/agent-forge/server/serve/serveRoutes.ts
…cher

The @linuxdevil/lousho package no longer contains apps/agent-forge:
files drops the Studio entries, prepublishOnly is just the SDK build,
prepack-check loses its Agent-Forge warning, and pack-smoke no longer
builds Studio, requires its paths, or allows anything under apps/.
Re-measured budgets: 1016 entries / 15,289,389 B unpacked / 4,393,121 B
packed (~10% headroom); MAX_ENTRIES stays at 1040 since the count still
fits. size-budget.json regenerated (bundleBytes also dropped ~30% vs
the stale S16b budget - drift, not this change).

src/cli/studio.ts is rewritten around findStudio(): the SDK checkout's
apps/agent-forge (package name @linuxdevil/studio) keeps the dev/prod
contributor modes - prod now spawns dist-server/cli.cjs with
--workspace/--port/--host and lets the Studio CLI mint its own token -
while an installed @linuxdevil/studio is found via createRequire from
cwd, then the SDK package root, then npm's global root, and launched
the same way. --prod/--dev against an installed target is a usage
error (exit 2); no target prints 'Studio is a separate install: npx
@linuxdevil/studio' and exits 1. spawn is injectable for tests.

Verified: tsc, lint, test:coverage (7427), build, pack-smoke (all
checks incl. strict-libs zod3/zod4), size-check, fallow (no new
findings), npm pack --dry-run shows zero apps/ paths, live
'lousho studio --help' and the missing-Studio exit-1 path.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
scripts/pack-smoke-studio.ts packs the SDK and @linuxdevil/studio,
checks the Studio tarball (required/forbidden paths, budgets, pinned
semver SDK dep, package.json restored by prepack/postpack), dry-run
publishes it, installs both tarballs into a fresh project, and proves
`lousho-studio` and the `lousho studio` launcher serve the UI.

smokeKit gains shared dryRunPublish/freePort; pack-smoke.ts uses them.
ci.yml moves all Studio checks out of the check/forge jobs into a
dedicated studio job that ends with pack-smoke:studio --skip-build.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ocumented deep seams

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- host banners and test fixtures now name @linuxdevil/lousho (the
  @lousho/build-ai-agent strings predated the W13a rename; the legacy
  name stays supported in workspaceSdk discovery only).
- specTypes stops re-exporting SecretRef so shared/wireTypes stays the
  single Studio-side export (fallow duplicate-exports); the three canvas
  consumers and types.test.ts import it from wireTypes, the same source
  the other fields already use.
- pack-smoke and pack-smoke-studio share packTarball/smokeDirs/
  smokeSetup/checkTarballContents/cleanSmokeDir/reportSmoke via
  smokeKit (fallow clone groups); mustRun goes private now that
  smokeSetup wraps it.
- drop unused dagre devDependency (elkjs replaced it in C17).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… collector

docs/agent-forge.md is retitled Lousho Studio and reorganized: install and
start (npx @linuxdevil/studio / lousho-studio / lousho studio launcher),
workspaces and the ~/.lousho storage split, the three kinds of agent,
per-workspace SDK selection with each host banner verbatim, the collector
lifecycle, reporting deployed agents via LOUSHO_OBSERVE_*, and independent
updates. installation/cli/observability/upgrading/README/CHANGELOG updated;
llms.txt regenerated.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
POST /agents/:id/eject renders the spec with specToAgentDir and writes the
files under agents/<id>/ in the request's workspace (workspaceOf seam),
atomically and under withAgentLock. 409 LOUSHO_EJECT_EXISTS carries the
existing file list; { overwrite: true } replaces. Generated paths are
re-validated before touching disk (absolute, drive-letter, NUL, '..'
segments all 400) and each resolved target must stay inside the eject
directory.

The Code tab toolbar gains "Eject to project" behind a primary
ConfirmDialog; on 409 it shows the server message plus an "Overwrite
existing files" checkbox that resends with overwrite: true. ConfirmDialog
gains a children slot for that checkbox. The shared readSpecOr404 lookup
is extracted to workspace/specLookup (also used by the portability route)
and the evals harness's collector thunk is adapted to CollectorSource.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@LinuxDevil LinuxDevil changed the title W13a: rename SDK to @linuxdevil/lousho, publish Studio as @linuxdevil/studio Studio split + rename: @linuxdevil/lousho SDK, @linuxdevil/studio app, launcher, CI, bridge compat, docs, eject Nov 14, 2026
LinuxDevil and others added 2 commits November 14, 2026 21:46
- smokeKit: add missing node:os import (smokeDirs uses os.tmpdir)
- .fallowrc.json: restore comma dropped in entry-list merge
- CodeTab.test: partial-mock runtimeClient so RuntimeApiError stays real
  and ejectAgent exists for vi.spyOn

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- pack-smoke-studio: retune tarball budgets to the consolidated build
  (12 entries, 9.3 MB unpacked, 2.6 MB packed + ~15% headroom)
- cli.ts: compare realpaths for the main-module guard - npm's POSIX bin
  is a symlink, so argv[1] (.bin/lousho-studio) never matched
  import.meta.url and `lousho-studio --help` exited 0 silently
- template.e2e: fix codemod-mangled node_modules path
  (@linuxdevil/@linuxdevil/lousho -> @linuxdevil/lousho)
- CodeTab: extract EjectToProject component - the eject flow pushed the
  tab over fallow's cognitive-complexity threshold

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant