@rodyssey/cli 0.1.9 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +6 -0
  2. package/dist/cli.js +14 -8
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -12,6 +12,12 @@ To run:
12
12
  bun run index.ts
13
13
  ```
14
14
 
15
+ ## Template Upgrade
16
+
17
+ `app upgrade-template` backfills additive template files that are missing from
18
+ older projects. This includes the Dynamic Worker MCP sample endpoint and the
19
+ shared `mcp/` helper folder; existing local MCP files are left untouched.
20
+
15
21
  ## Release
16
22
 
17
23
  Release automation lives in `.github/workflows/release.yml` and uses Changesets.
package/dist/cli.js CHANGED
@@ -2071,7 +2071,7 @@ var {
2071
2071
  // package.json
2072
2072
  var package_default = {
2073
2073
  name: "@rodyssey/cli",
2074
- version: "0.1.9",
2074
+ version: "0.1.10",
2075
2075
  description: "Scaffold new projects from airconcepts templates",
2076
2076
  repository: {
2077
2077
  type: "git",
@@ -4295,6 +4295,7 @@ ${JSON.stringify(payload, null, 2)}`);
4295
4295
  // src/upgrade-template.ts
4296
4296
  import { execSync as execSync3 } from "node:child_process";
4297
4297
  import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync2, copyFileSync, rmSync as rmSync2 } from "node:fs";
4298
+ import path3 from "node:path";
4298
4299
  var TEMPLATES = {
4299
4300
  webapp: {
4300
4301
  name: "webapp (SPA)",
@@ -4320,9 +4321,11 @@ var TEMPLATES = {
4320
4321
  "vite-plugins/widgets-manifest.ts"
4321
4322
  ],
4322
4323
  newFiles: [
4324
+ "src/api/mcp.ts",
4323
4325
  "src/exp-engine/cli.ts",
4324
4326
  "src/exp-engine/evaluate.ts",
4325
4327
  "src/exp-engine/README.md",
4328
+ "src/mcp/server.ts",
4326
4329
  "src/types/exp-engine.d.ts",
4327
4330
  "src/widgets/examples.tsx",
4328
4331
  "src/routes/widget.$id.tsx",
@@ -4335,10 +4338,12 @@ var TEMPLATES = {
4335
4338
  remoteName: "template",
4336
4339
  checkoutFiles: ["AGENTS.md", ".agent/", "app/types/webapp.d.ts", "app/types/game-sdk.d.ts"],
4337
4340
  newFiles: [
4341
+ "api/mcp.ts",
4338
4342
  "app/exp-engine/cli.ts",
4339
4343
  "app/exp-engine/evaluate.ts",
4340
4344
  "app/exp-engine/README.md",
4341
- "app/types/exp-engine.d.ts"
4345
+ "app/types/exp-engine.d.ts",
4346
+ "mcp/server.ts"
4342
4347
  ]
4343
4348
  }
4344
4349
  };
@@ -4444,6 +4449,7 @@ async function upgradeTemplate() {
4444
4449
  if (!existsSync7(file)) {
4445
4450
  console.log(`\uD83D\uDCC2 Checking out ${file}...`);
4446
4451
  try {
4452
+ mkdirSync2(path3.dirname(file), { recursive: true });
4447
4453
  execSync3(`git checkout ${template.remoteName}/main -- ${file}`, { stdio: "inherit" });
4448
4454
  } catch {
4449
4455
  console.log(`⚠️ Failed to checkout ${file}`);
@@ -4485,20 +4491,20 @@ var FILES = [
4485
4491
  description: "GameSDK TypeScript definitions"
4486
4492
  }
4487
4493
  ];
4488
- async function downloadFile(url, path3, description) {
4494
+ async function downloadFile(url, path4, description) {
4489
4495
  try {
4490
4496
  console.log(`
4491
4497
  \uD83D\uDCE5 Downloading ${description}...`);
4492
4498
  console.log(` URL: ${url}`);
4493
- console.log(` Path: ${path3}`);
4499
+ console.log(` Path: ${path4}`);
4494
4500
  const response = await fetch(url);
4495
4501
  if (!response.ok) {
4496
4502
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
4497
4503
  }
4498
4504
  const content = await response.text();
4499
- const dir = dirname2(path3);
4505
+ const dir = dirname2(path4);
4500
4506
  await mkdir(dir, { recursive: true });
4501
- await writeFile(path3, content, "utf-8");
4507
+ await writeFile(path4, content, "utf-8");
4502
4508
  console.log(`✅ Downloaded ${description} (${content.length} bytes)
4503
4509
  `);
4504
4510
  return true;
@@ -4540,9 +4546,9 @@ async function downloadDocumentation(manifest) {
4540
4546
  let failCount = 0;
4541
4547
  for (const doc of manifest.documentation) {
4542
4548
  const url = `${BASE_URL}/skills/${doc.file}`;
4543
- const path3 = join3(".agent", "skills", "game-sdk", doc.file);
4549
+ const path4 = join3(".agent", "skills", "game-sdk", doc.file);
4544
4550
  const description = `${doc.title} (${doc.category})`;
4545
- const success = await downloadFile(url, path3, description);
4551
+ const success = await downloadFile(url, path4, description);
4546
4552
  if (success) {
4547
4553
  successCount++;
4548
4554
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rodyssey/cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Scaffold new projects from airconcepts templates",
5
5
  "repository": {
6
6
  "type": "git",