@inneranimalmedia/agentsam-sdk 1.5.0 → 1.6.0
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/README.md +2 -0
- package/package.json +2 -1
- package/src/cli.js +20 -3
- package/src/commands/http-server.js +97 -0
- package/src/commands/tunnel.js +232 -0
- package/src/lib/gorilla-template.js +54 -0
- package/src/lib/local-scaffold.js +32 -8
- package/src/ui/splash-xterm.js +290 -0
- package/src/ui/splash.js +426 -0
- package/src/ui/terminal-lanes.css +162 -0
- package/src/ui/theme.js +315 -0
- package/templates/gorilla-shell/App.tsx +639 -0
- package/templates/gorilla-shell/README.md +22 -0
- package/templates/gorilla-shell/index.html +15 -0
- package/templates/gorilla-shell/main.jsx +9 -0
- package/templates/gorilla-shell/package.json +19 -0
- package/templates/gorilla-shell/vite.config.js +21 -0
- package/test/smoke.mjs +16 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@inneranimalmedia/agentsam-shell-example",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Phase 0 Gorilla Shell — game-feel CLI UX prototype for Agent Sam SDK",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"react": "^19.1.0",
|
|
13
|
+
"react-dom": "^19.1.0"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@vitejs/plugin-react": "^4.5.2",
|
|
17
|
+
"vite": "^6.3.5"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
root: 'gorilla',
|
|
6
|
+
plugins: [react()],
|
|
7
|
+
server: {
|
|
8
|
+
port: 5173,
|
|
9
|
+
strictPort: true,
|
|
10
|
+
proxy: {
|
|
11
|
+
'/api': {
|
|
12
|
+
target: 'http://127.0.0.1:8787',
|
|
13
|
+
changeOrigin: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
build: {
|
|
18
|
+
outDir: '../dist/gorilla',
|
|
19
|
+
emptyOutDir: true,
|
|
20
|
+
},
|
|
21
|
+
});
|
package/test/smoke.mjs
CHANGED
|
@@ -2,9 +2,11 @@ import assert from 'node:assert/strict';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
5
6
|
import { AgentSam, routeIntent, getToolCatalog } from '../src/index.js';
|
|
6
7
|
import { buildLocalScaffoldMeta } from '../src/lib/local-scaffold.js';
|
|
7
8
|
import { writeScaffoldFiles } from '../src/lib/write-files.js';
|
|
9
|
+
import { copyGorillaTemplate } from '../src/lib/gorilla-template.js';
|
|
8
10
|
import { printContextSummary, missingForInit } from '../src/lib/detect-context.js';
|
|
9
11
|
|
|
10
12
|
const app = new AgentSam({ project: 'smoke', lane: 'cms', agent: 'cms' });
|
|
@@ -56,6 +58,20 @@ const localMeta = buildLocalScaffoldMeta({ projectName: 'demo', lane: 'cms', run
|
|
|
56
58
|
assert.equal(localMeta.laneKey, 'cms');
|
|
57
59
|
assert.ok(localMeta.files.some((f) => f.path === '.agentsam/start-local.md'));
|
|
58
60
|
assert.ok(localMeta.files.some((f) => f.path === 'wrangler.toml'));
|
|
61
|
+
assert.ok(localMeta.files.some((f) => f.path === '.env'));
|
|
59
62
|
assert.ok(!localMeta.files.some((f) => f.path.includes('execos')));
|
|
60
63
|
|
|
64
|
+
const gorillaDir = path.join(tmp, 'gorilla-project');
|
|
65
|
+
writeScaffoldFiles(gorillaDir, localMeta.files);
|
|
66
|
+
copyGorillaTemplate(gorillaDir, localMeta);
|
|
67
|
+
assert.ok(fs.existsSync(path.join(gorillaDir, 'gorilla', 'App.tsx')));
|
|
68
|
+
assert.ok(fs.existsSync(path.join(gorillaDir, 'vite.config.js')));
|
|
69
|
+
assert.ok(fs.readFileSync(path.join(gorillaDir, 'gorilla', 'App.tsx'), 'utf8').includes('demo'));
|
|
70
|
+
|
|
71
|
+
const tunnelPath = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'src', 'commands', 'tunnel.js');
|
|
72
|
+
const tunnelSrc = fs.readFileSync(tunnelPath, 'utf8');
|
|
73
|
+
assert.ok(tunnelSrc.includes('register-local'));
|
|
74
|
+
assert.ok(tunnelSrc.includes('cloudflared'));
|
|
75
|
+
assert.ok(fs.existsSync(tunnelPath));
|
|
76
|
+
|
|
61
77
|
console.log('SDK smoke tests passed');
|