agent-stage 0.2.1 → 0.2.8

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.
@@ -16,9 +16,11 @@ function getTemplateDir() {
16
16
  const currentFilePath = fileURLToPath(import.meta.url);
17
17
  const currentDir = dirname(currentFilePath);
18
18
  // Production: template is next to dist
19
- const prodPath = join(currentDir, '..', '..', '..', '..', 'template');
19
+ // From dist/commands/dev/init.js -> dist/ -> package root
20
+ const prodPath = join(currentDir, '..', '..', '..', 'template');
20
21
  // Development: template is in the source
21
- const devPath = join(currentDir, '..', '..', '..', '..', '..', 'template');
22
+ // From packages/cli/src/commands/dev/init.ts -> packages/cli/
23
+ const devPath = join(currentDir, '..', '..', '..', '..', 'template');
22
24
  if (existsSync(prodPath)) {
23
25
  return prodPath;
24
26
  }
@@ -195,8 +197,9 @@ async function configurePackageJson(targetDir) {
195
197
  // Replace workspace:* with actual version or local path
196
198
  // In dev mode (monorepo), use file: protocol to reference the local bridge package
197
199
  // Check if we're in the monorepo by looking for packages/bridge from the CLI location
200
+ // From packages/cli/src/commands/dev/init.ts -> packages/cli/src/ -> packages/cli/ -> packages/
198
201
  const currentFilePath = fileURLToPath(import.meta.url);
199
- const localBridgePath = resolve(join(dirname(currentFilePath), '..', '..', '..', '..', '..', 'bridge'));
202
+ const localBridgePath = resolve(join(dirname(currentFilePath), '..', '..', '..', '..', 'bridge'));
200
203
  const isDev = existsSync(localBridgePath);
201
204
  if (isDev) {
202
205
  // In dev mode, use file: protocol to reference the local bridge package
@@ -211,8 +214,9 @@ async function configurePackageJson(targetDir) {
211
214
  }
212
215
  async function installDependencies(targetDir) {
213
216
  // Check if we're in the monorepo by looking for packages/bridge from the CLI location
217
+ // From packages/cli/src/commands/dev/init.ts -> packages/cli/src/ -> packages/cli/ -> packages/
214
218
  const currentFilePath = fileURLToPath(import.meta.url);
215
- const localBridgePath = resolve(join(dirname(currentFilePath), '..', '..', '..', '..', '..', 'bridge'));
219
+ const localBridgePath = resolve(join(dirname(currentFilePath), '..', '..', '..', '..', 'bridge'));
216
220
  const isDev = existsSync(localBridgePath);
217
221
  if (isDev) {
218
222
  // In development mode (monorepo), use pnpm
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
3
  import consola from 'consola';
4
- // New command structure
4
+ // CLI entry point - auto-publish test
5
5
  import { devCommand } from './commands/dev/index.js';
6
6
  import { pageCommand } from './commands/page/index.js';
7
7
  import { runCommand } from './commands/run/index.js';
package/package.json CHANGED
@@ -1,25 +1,23 @@
1
1
  {
2
2
  "name": "agent-stage",
3
- "version": "0.2.1",
4
- "files": ["dist", "template"],
3
+ "version": "0.2.8",
4
+ "files": [
5
+ "dist",
6
+ "template"
7
+ ],
5
8
  "type": "module",
6
9
  "bin": {
7
10
  "agent-stage": "./dist/index.js"
8
11
  },
9
- "scripts": {
10
- "dev": "tsx src/index.ts",
11
- "build": "rimraf dist && tsc -p tsconfig.build.json",
12
- "typecheck": "pnpm -C ../bridge build && tsc -p tsconfig.json --noEmit"
13
- },
14
12
  "dependencies": {
15
- "@agentstage/bridge": "workspace:*",
16
- "@agentstage/render": "workspace:*",
17
13
  "@clack/prompts": "^0.8.2",
18
14
  "commander": "^12.1.0",
19
15
  "consola": "^3.2.3",
20
16
  "execa": "^9.3.1",
21
17
  "pathe": "^1.1.2",
22
- "picocolors": "^1.1.1"
18
+ "picocolors": "^1.1.1",
19
+ "@agentstage/bridge": "0.1.2",
20
+ "@agentstage/render": "0.2.2"
23
21
  },
24
22
  "devDependencies": {
25
23
  "@types/node": "^22.13.5",
@@ -29,5 +27,10 @@
29
27
  },
30
28
  "publishConfig": {
31
29
  "access": "public"
30
+ },
31
+ "scripts": {
32
+ "dev": "tsx src/index.ts",
33
+ "build": "rimraf dist && tsc -p tsconfig.build.json",
34
+ "typecheck": "pnpm -C ../bridge build && tsc -p tsconfig.json --noEmit"
32
35
  }
33
- }
36
+ }