create-stitchkit 0.6.5 → 0.6.6

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
@@ -12,6 +12,28 @@ step is overwritten by the next release.
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [0.6.6] — 2026-09-24
16
+
17
+ ### Fixed
18
+
19
+ - **A project from `--template agent` or `--template telegram-bot` installs.**
20
+ The scaffolder rewrote their Stitchkit dependency to `catalog:` and wrote a
21
+ root `catalog`, which Bun reads only in a workspace root, so `bun install`
22
+ refused the generated project ("stitchkit@catalog: is not in the catalog").
23
+ A project without `workspaces` now gets the range itself —
24
+ `"stitchkit": "^0.96.0"` — and no catalog; the application template, a
25
+ workspace, is unchanged. A project already generated from either template
26
+ replaces each `"catalog:"` in its dependencies with the range from its
27
+ `catalog` field and deletes that field.
28
+ - **A project from `--template agent` passes its own tests.** It mounts its
29
+ agent with `stitchkit/tools`, whose optional peer
30
+ `@modelcontextprotocol/server` the template did not declare; inside this
31
+ repository the workspace supplied it. The template now depends on
32
+ `@modelcontextprotocol/server` `^2.0.0`.
33
+ - A new lane generates both single-package templates the way a user does,
34
+ installs them from the registry, and runs their check and tests — neither
35
+ defect above could be seen by a lane that installs the template directory.
36
+
15
37
  ## [0.6.5] — 2026-09-24
16
38
 
17
39
  ### Added
package/dist/cli.js CHANGED
@@ -299,6 +299,7 @@ var TEMPLATE_RENAMES = new Map([
299
299
  var RootManifestSchema = z2.looseObject({
300
300
  name: z2.string().min(1),
301
301
  catalog: z2.record(z2.string(), z2.string()).optional(),
302
+ workspaces: z2.unknown().optional(),
302
303
  dependencies: z2.record(z2.string(), z2.string()).optional(),
303
304
  devDependencies: z2.record(z2.string(), z2.string()).optional()
304
305
  });
@@ -435,21 +436,33 @@ async function scaffoldProject(templateDirectory, destination, options = {}) {
435
436
  const manifestPath = join(resolvedDestination, "package.json");
436
437
  const manifest = RootManifestSchema.parse(JSON.parse(await readFile(manifestPath, "utf8")));
437
438
  const catalog = options.stitchkitCatalogTarget ? { ...manifest.catalog ?? {}, stitchkit: options.stitchkitCatalogTarget } : manifest.catalog;
439
+ const isWorkspace = manifest.workspaces !== undefined;
440
+ const localReference = (name) => {
441
+ if (isWorkspace)
442
+ return "catalog:";
443
+ const range = catalog?.[name];
444
+ if (!range)
445
+ throw new Error(`Template catalog has no range for ${name}`);
446
+ return range;
447
+ };
438
448
  const replaceLocalPackages = (dependencies) => {
439
449
  if (!dependencies)
440
450
  return dependencies;
441
451
  return {
442
452
  ...dependencies,
443
- ...dependencies.stitchkit?.startsWith("file:") && { stitchkit: "catalog:" },
453
+ ...dependencies.stitchkit?.startsWith("file:") && {
454
+ stitchkit: localReference("stitchkit")
455
+ },
444
456
  ...dependencies["stitchkit-tui"]?.startsWith("file:") && {
445
- "stitchkit-tui": "catalog:"
457
+ "stitchkit-tui": localReference("stitchkit-tui")
446
458
  }
447
459
  };
448
460
  };
461
+ const { catalog: _templateCatalog, ...withoutCatalog } = manifest;
449
462
  await writeFile(manifestPath, `${JSON.stringify({
450
- ...manifest,
463
+ ...isWorkspace ? manifest : withoutCatalog,
451
464
  name: identity.slug,
452
- ...catalog && { catalog },
465
+ ...isWorkspace && catalog && { catalog },
453
466
  ...manifest.dependencies && {
454
467
  dependencies: replaceLocalPackages(manifest.dependencies)
455
468
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-stitchkit",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "Create a production-shaped Stitchkit application",
5
5
  "license": "MIT",
6
6
  "author": "Max Listov <maxlistov@gmail.com>",
@@ -16,6 +16,7 @@
16
16
  "build": "bun build src/index.ts --outdir dist --target bun --packages external"
17
17
  },
18
18
  "dependencies": {
19
+ "@modelcontextprotocol/server": "^2.0.0",
19
20
  "@openrouter/ai-sdk-provider": "^3.1.0",
20
21
  "ai": "^7.0.111",
21
22
  "stitchkit": "file:../../../core",