agent-stage 0.2.8 → 0.2.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.
- package/dist/commands/dev/init.js +11 -15
- package/dist/index.js +7 -2
- package/package.json +3 -2
|
@@ -194,21 +194,17 @@ async function copyTemplateFiles(templateDir, targetDir) {
|
|
|
194
194
|
async function configurePackageJson(targetDir) {
|
|
195
195
|
const packageJsonPath = join(targetDir, 'package.json');
|
|
196
196
|
const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf-8'));
|
|
197
|
-
// Replace workspace:* with actual
|
|
198
|
-
//
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
210
|
-
// Use npm version for production
|
|
211
|
-
packageJson.dependencies['@agentstage/bridge'] = '^0.1.0';
|
|
197
|
+
// Replace all workspace:* dependencies with actual npm versions
|
|
198
|
+
// This fixes the EUNSUPPORTEDPROTOCOL error when users run npm install
|
|
199
|
+
const npmVersions = {
|
|
200
|
+
'@agentstage/render': '^0.2.2',
|
|
201
|
+
'@agentstage/bridge': '^0.1.0',
|
|
202
|
+
'agent-stage-bridge': '^0.1.0'
|
|
203
|
+
};
|
|
204
|
+
for (const [dep, version] of Object.entries(npmVersions)) {
|
|
205
|
+
if (packageJson.dependencies?.[dep] === 'workspace:*') {
|
|
206
|
+
packageJson.dependencies[dep] = version;
|
|
207
|
+
}
|
|
212
208
|
}
|
|
213
209
|
await writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
214
210
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
3
|
import consola from 'consola';
|
|
4
|
-
|
|
4
|
+
import { readFileSync } from 'fs';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { dirname, join } from 'pathe';
|
|
7
|
+
// Read version from package.json
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8'));
|
|
5
10
|
import { devCommand } from './commands/dev/index.js';
|
|
6
11
|
import { pageCommand } from './commands/page/index.js';
|
|
7
12
|
import { runCommand } from './commands/run/index.js';
|
|
@@ -10,7 +15,7 @@ const program = new Command();
|
|
|
10
15
|
program
|
|
11
16
|
.name('agentstage')
|
|
12
17
|
.description('Agent UI Stage CLI - Create interactive UI for AI agents')
|
|
13
|
-
.version(
|
|
18
|
+
.version(pkg.version);
|
|
14
19
|
// New command structure
|
|
15
20
|
program.addCommand(devCommand);
|
|
16
21
|
program.addCommand(pageCommand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-stage",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"template"
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"dev": "tsx src/index.ts",
|
|
33
33
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
34
|
-
"typecheck": "pnpm -C ../bridge build && tsc -p tsconfig.json --noEmit"
|
|
34
|
+
"typecheck": "pnpm -C ../bridge build && tsc -p tsconfig.json --noEmit",
|
|
35
|
+
"test:e2e": "bash e2e/run-e2e.sh"
|
|
35
36
|
}
|
|
36
37
|
}
|