@seed-app-studio/cli 0.1.1-canary.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.
@@ -0,0 +1,139 @@
1
+ import { SeedAppValidationIssue } from "@seed-app-studio/protocol";
2
+ //#region src/types.d.ts
3
+ type SeedAppCliCommand = "init" | "validate" | "package" | "example" | "inspect-archive";
4
+ type SeedAppInitOptions = {
5
+ rootDir: string;
6
+ appId: string;
7
+ appName: string;
8
+ devUrl: string;
9
+ sdkDependency?: string;
10
+ force?: boolean;
11
+ };
12
+ type SeedAppValidationOptions = {
13
+ rootDir: string;
14
+ manifestPath?: string;
15
+ bundlePath?: string;
16
+ gatewayChecksum?: string;
17
+ };
18
+ type SeedAppPackageOptions = SeedAppValidationOptions & {
19
+ outFile?: string;
20
+ };
21
+ type SeedAppPackageArchiveSummary = {
22
+ outFile: string;
23
+ files: string[];
24
+ };
25
+ type SeedAppPackageArchiveInspection = {
26
+ ok: boolean;
27
+ archiveFile: string;
28
+ files: string[];
29
+ manifestPath?: string;
30
+ bundlePath?: string;
31
+ reportPath?: string;
32
+ appId?: string;
33
+ version?: string;
34
+ assetCount: number;
35
+ expectedText?: string;
36
+ expectedTextFound?: boolean;
37
+ issues: SeedAppValidationIssue[];
38
+ };
39
+ type SeedAppPackageCliReport = SeedAppIntegrityReport & {
40
+ packageArchive?: SeedAppPackageArchiveSummary;
41
+ };
42
+ type SeedAppExampleOptions = {
43
+ outFile?: string;
44
+ sdkDependency?: string;
45
+ cliDependency?: string;
46
+ };
47
+ type SeedAppAssetReport = {
48
+ path: string;
49
+ expectedSha256: string;
50
+ actualSha256?: string;
51
+ expectedSize: number;
52
+ actualSize?: number;
53
+ ok: boolean;
54
+ };
55
+ type SeedAppIntegrityReport = {
56
+ ok: boolean;
57
+ appId?: string;
58
+ version?: string;
59
+ entryHtml?: string;
60
+ entryIntegrity?: string;
61
+ computedBundleChecksum?: string;
62
+ manifestPath: string;
63
+ bundlePath: string;
64
+ assets: SeedAppAssetReport[];
65
+ issues: SeedAppValidationIssue[];
66
+ };
67
+ type SeedAppCliResult = {
68
+ exitCode: number;
69
+ stdout: string;
70
+ stderr: string;
71
+ };
72
+ //#endregion
73
+ //#region src/commands.d.ts
74
+ type SeedAppCliInvocation = {
75
+ command: SeedAppCliCommand | "help";
76
+ rootDir: string;
77
+ appId?: string;
78
+ appName?: string;
79
+ devUrl?: string;
80
+ manifestPath?: string;
81
+ bundlePath?: string;
82
+ gatewayChecksum?: string;
83
+ outFile?: string;
84
+ zipFile?: string;
85
+ expectedText?: string;
86
+ sdkDependency?: string;
87
+ cliDependency?: string;
88
+ force: boolean;
89
+ json: boolean;
90
+ };
91
+ declare function parseSeedAppCliArgs(args: string[], cwd?: string): SeedAppCliInvocation;
92
+ declare function runSeedAppCli(invocation: SeedAppCliInvocation): Promise<SeedAppCliResult>;
93
+ //#endregion
94
+ //#region src/scaffold.d.ts
95
+ type SeedAppInitResult = {
96
+ rootDir: string;
97
+ files: string[];
98
+ };
99
+ declare function initSeedAppProject(options: SeedAppInitOptions): Promise<SeedAppInitResult>;
100
+ //#endregion
101
+ //#region src/exampleArchive.d.ts
102
+ type SeedAppExampleArchiveOptions = {
103
+ outFile?: string;
104
+ sdkDependency?: string;
105
+ cliDependency?: string;
106
+ };
107
+ type SeedAppExampleArchiveResult = {
108
+ exampleId: "react-spa-stories";
109
+ outFile: string;
110
+ files: string[];
111
+ };
112
+ declare function writeSeedAppExampleArchive(options?: SeedAppExampleArchiveOptions): Promise<SeedAppExampleArchiveResult>;
113
+ //#endregion
114
+ //#region src/packageArchive.d.ts
115
+ type SeedAppPackageArchiveOptions = {
116
+ rootDir: string;
117
+ zipFile: string;
118
+ manifestPath?: string;
119
+ bundlePath?: string;
120
+ reportPath?: string;
121
+ report: SeedAppIntegrityReport;
122
+ };
123
+ type SeedAppPackageArchiveResult = {
124
+ outFile: string;
125
+ files: string[];
126
+ };
127
+ type SeedAppPackageArchiveInspectOptions = {
128
+ rootDir: string;
129
+ zipFile: string;
130
+ expectedText?: string;
131
+ };
132
+ declare function writeSeedAppPackageArchive(options: SeedAppPackageArchiveOptions): Promise<SeedAppPackageArchiveResult>;
133
+ declare function inspectSeedAppPackageArchive(options: SeedAppPackageArchiveInspectOptions): Promise<SeedAppPackageArchiveInspection>;
134
+ //#endregion
135
+ //#region src/validator.d.ts
136
+ declare function validateSeedAppPackage(options: SeedAppValidationOptions): Promise<SeedAppIntegrityReport>;
137
+ declare function writeSeedAppPackageReport(options: SeedAppPackageOptions): Promise<SeedAppIntegrityReport>;
138
+ //#endregion
139
+ export { type SeedAppAssetReport, type SeedAppCliCommand, type SeedAppCliInvocation, type SeedAppCliResult, type SeedAppExampleArchiveResult, type SeedAppExampleOptions, type SeedAppInitOptions, type SeedAppInitResult, type SeedAppIntegrityReport, type SeedAppPackageArchiveInspectOptions, type SeedAppPackageArchiveInspection, type SeedAppPackageArchiveResult, type SeedAppPackageArchiveSummary, type SeedAppPackageCliReport, type SeedAppPackageOptions, type SeedAppValidationOptions, initSeedAppProject, inspectSeedAppPackageArchive, parseSeedAppCliArgs, runSeedAppCli, validateSeedAppPackage, writeSeedAppExampleArchive, writeSeedAppPackageArchive, writeSeedAppPackageReport };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { a as inspectSeedAppPackageArchive, c as initSeedAppProject, i as writeSeedAppPackageReport, n as runSeedAppCli, o as writeSeedAppPackageArchive, r as validateSeedAppPackage, s as writeSeedAppExampleArchive, t as parseSeedAppCliArgs } from "./commands-TM-KX_MV.mjs";
2
+ export { initSeedAppProject, inspectSeedAppPackageArchive, parseSeedAppCliArgs, runSeedAppCli, validateSeedAppPackage, writeSeedAppExampleArchive, writeSeedAppPackageArchive, writeSeedAppPackageReport };
@@ -0,0 +1,44 @@
1
+ # SEED React SPA Stories
2
+
3
+ This example is the acceptance app for SEED App Host development. It is a plain React + Vite SPA that can be loaded by App Studio through `http://localhost:5173`.
4
+
5
+ ## Run
6
+
7
+ ```bash
8
+ pnpm install
9
+ pnpm dev
10
+ ```
11
+
12
+ Then open SEED App Studio and register:
13
+
14
+ - App ID: `seed.react-spa-stories`
15
+ - Root directory: this folder
16
+ - Dev URL: `http://localhost:5173`
17
+ - Manifest path: `seed-app.json`
18
+
19
+ ## Before npm publish
20
+
21
+ If `@seed-app-studio/sdk` or `@seed-app-studio/cli` is not published yet, pack local tarballs first and generate the example with explicit dependency sources:
22
+
23
+ ```bash
24
+ pnpm --dir packages/seed-runtime-state/app-sdk pack --pack-destination /tmp/seed-app-deps
25
+ pnpm --dir packages/seed-runtime-state/app-cli pack --pack-destination /tmp/seed-app-deps
26
+ seed-app example \
27
+ --sdk-dependency file:/tmp/seed-app-deps/seed-app-sdk-0.1.0.tgz \
28
+ --cli-dependency file:/tmp/seed-app-deps/seed-app-cli-0.1.0.tgz
29
+ ```
30
+
31
+ ## Stories
32
+
33
+ - Handshake with the host.
34
+ - Query granted, approval-required, and denied capabilities.
35
+ - Run an agent task.
36
+ - Replay the Bridge-projected agent stream lifecycle: message, thought, tool, permission, elicitation, subagent, backup event, and turn barrier.
37
+ - Download the same Bridge-projected replay stream as JSON.
38
+ - Search memory.
39
+ - List and call MCP tools.
40
+ - Trigger an approval flow.
41
+ - Trigger a denied capability flow.
42
+ - Subscribe to host events.
43
+
44
+ The app intentionally includes both allowed and blocked stories so developers can verify UX behavior before submitting a production app.
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>SEED React SPA Stories</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "seed-react-spa-stories",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite --host 127.0.0.1 --port 5173",
8
+ "build": "vite build",
9
+ "typecheck": "tsc --noEmit",
10
+ "seed:validate": "seed-app validate",
11
+ "seed:package": "bun run build && seed-app package",
12
+ "topo": "node -e \"\"",
13
+ "check-types": "tsc --noEmit",
14
+ "test:coverage": "node -e \"\""
15
+ },
16
+ "dependencies": {
17
+ "@seed-app-studio/sdk": "workspace:*",
18
+ "@vitejs/plugin-react": "^5.0.0",
19
+ "react": "^19.0.0",
20
+ "react-dom": "^19.0.0",
21
+ "typescript": "^5.8.3",
22
+ "vite": "^6.4.1"
23
+ },
24
+ "devDependencies": {
25
+ "@seed-app-studio/cli": "workspace:*",
26
+ "@types/react": "^19.0.0",
27
+ "@types/react-dom": "^19.0.0"
28
+ }
29
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "seed.react-spa-stories",
4
+ "version": "0.1.0",
5
+ "name": "SEED React SPA Stories",
6
+ "kind": "vertical-app",
7
+ "entry": {
8
+ "type": "iframe",
9
+ "url": "http://localhost:5173"
10
+ },
11
+ "contributes": {
12
+ "launcher": {
13
+ "label": "React SPA Stories",
14
+ "icon": "experiment",
15
+ "order": 10
16
+ },
17
+ "routes": [
18
+ {
19
+ "path": "/stories",
20
+ "title": "Capability Stories"
21
+ }
22
+ ],
23
+ "conversationPanels": [
24
+ {
25
+ "id": "story-assistant",
26
+ "title": "Story Assistant"
27
+ }
28
+ ]
29
+ },
30
+ "runtime": {
31
+ "sdkVersion": "^0.1.0",
32
+ "framework": "react"
33
+ },
34
+ "capabilities": {
35
+ "agent": ["run", "approval.respond", "elicitation.respond"],
36
+ "brain-bundle": ["preview-summaries"],
37
+ "bridge": ["diagnostics"],
38
+ "memory": ["search"],
39
+ "mcp": ["listTools", "callTool"],
40
+ "workspace": ["write"]
41
+ },
42
+ "permissions": {
43
+ "network": {
44
+ "allowedDomains": ["localhost", "127.0.0.1"]
45
+ },
46
+ "memoryScopes": ["demo.customer", "demo.ticket"],
47
+ "mcpServers": ["seed.knowledgebase"],
48
+ "sensitiveActionsRequireApproval": true
49
+ },
50
+ "grantDefaults": {
51
+ "agent.run": "enabled",
52
+ "agent.approval.respond": "enabled",
53
+ "agent.elicitation.respond": "enabled",
54
+ "brain-bundle.preview-summaries": "enabled",
55
+ "bridge.diagnostics": "enabled",
56
+ "memory.search": "enabled",
57
+ "mcp.listTools": "enabled",
58
+ "mcp.callTool": "ask",
59
+ "workspace.write": "disabled"
60
+ },
61
+ "userConfigurable": {
62
+ "agent.run": true,
63
+ "brain-bundle.preview-summaries": true,
64
+ "bridge.diagnostics": true,
65
+ "memory.search": true,
66
+ "mcp.listTools": true,
67
+ "mcp.callTool": true,
68
+ "workspace.write": true
69
+ },
70
+ "tenantPolicy": {
71
+ "installScope": "user",
72
+ "dataResidency": "inherit"
73
+ }
74
+ }