feat(web): add workspace-aware session flow

This commit is contained in:
imccyu
2026-07-25 17:45:26 +08:00
parent 755e2a8c51
commit 9eb9c70a8a
170 files changed
+7573 -3006

No files matched your search

+3
View File
@@ -77,6 +77,8 @@ export interface AppCLIEntryOptions {
* browser).
*/
port?: number
/** Parent directory for name-created Workspaces; undefined uses the gateway's cwd fallback. */
workspaceRoot?: string
}
/**
@@ -141,6 +143,7 @@ export class AppCLIEntry {
// Source 2: CLI flags (field set disjoint from the json mappings).
if (this.options.host !== undefined) put('webserver', 'host', this.options.host)
if (this.options.port !== undefined) put('webserver', 'port', this.options.port)
if (this.options.workspaceRoot !== undefined) put('api-gateway', 'workspaceRoot', this.options.workspaceRoot)
// Source 3: the frontend dist — an assembly fact of this app, never yml
// user config. Workspace knowledge stays here.
+2
View File
@@ -21,6 +21,7 @@ export async function runWeb(argv: string[]): Promise<void> {
host: { type: 'string' },
port: { type: 'string' },
dev: { type: 'boolean', default: false },
'workspace-root': { type: 'string' },
},
allowPositionals: false,
})
@@ -44,6 +45,7 @@ export async function runWeb(argv: string[]): Promise<void> {
dev: values.dev,
...values.host !== undefined ? { host: values.host } : {},
...port !== undefined ? { port } : {},
...values['workspace-root'] !== undefined ? { workspaceRoot: values['workspace-root'] } : {},
})
const { ctx, port: boundPort } = await entry.run()