@sixb/cli 0.1.18 → 0.1.20
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 +23 -27
- package/dist/commands/api.d.ts +0 -1
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/app.d.ts.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/dev-runner.d.ts +12 -1
- package/dist/commands/dev-runner.d.ts.map +1 -1
- package/dist/commands/worker-group.d.ts +1 -0
- package/dist/commands/worker-group.d.ts.map +1 -1
- package/dist/commands/worker.d.ts +1 -0
- package/dist/commands/worker.d.ts.map +1 -1
- package/dist/lib/browser-topology.d.ts +9 -33
- package/dist/lib/browser-topology.d.ts.map +1 -1
- package/dist/lib/command-line.d.ts +8 -8
- package/dist/lib/command-line.d.ts.map +1 -1
- package/dist/lib/deploy-release.d.ts.map +1 -1
- package/dist/lib/dev-supervisor.d.ts.map +1 -1
- package/dist/lib/dev-watch.d.ts +1 -1
- package/dist/lib/dev-watch.d.ts.map +1 -1
- package/dist/lib/production-roles.d.ts +5 -10
- package/dist/lib/production-roles.d.ts.map +1 -1
- package/dist/lib/production.d.ts +1 -2
- package/dist/lib/production.d.ts.map +1 -1
- package/dist/lib/role-view.d.ts +2 -3
- package/dist/lib/role-view.d.ts.map +1 -1
- package/dist/lib/runtime.d.ts +11 -14
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/worker-concurrency.d.ts +5 -0
- package/dist/lib/worker-concurrency.d.ts.map +1 -1
- package/dist/lib/worker-registry.d.ts +3 -31
- package/dist/lib/worker-registry.d.ts.map +1 -1
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +15 -17
- package/src/commands/api.tsx +1 -5
- package/src/commands/app.tsx +5 -7
- package/src/commands/build.tsx +14 -31
- package/src/commands/dev-runner.tsx +43 -48
- package/src/commands/worker-group.tsx +4 -1
- package/src/commands/worker.tsx +4 -1
- package/src/index.tsx +3 -14
- package/src/lib/browser-topology.ts +28 -135
- package/src/lib/command-line.ts +32 -28
- package/src/lib/deploy-release.ts +21 -7
- package/src/lib/dev-supervisor.ts +7 -6
- package/src/lib/dev-watch.ts +8 -8
- package/src/lib/production-roles.ts +5 -7
- package/src/lib/production.ts +3 -8
- package/src/lib/profiles.ts +1 -1
- package/src/lib/role-lifecycle.ts +2 -2
- package/src/lib/role-view.ts +2 -3
- package/src/lib/runtime.ts +18 -23
- package/src/lib/worker-concurrency.ts +26 -38
- package/src/lib/worker-registry.ts +16 -36
- package/src/ui/index.tsx +7 -15
- package/dist/commands/atlas.d.ts +0 -9
- package/dist/commands/atlas.d.ts.map +0 -1
- package/src/commands/atlas.tsx +0 -71
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
import type { Worker } from "@sixb/core/internal/workers";
|
|
2
2
|
import type { LoadedSixbHost } from "./loadSixb";
|
|
3
|
-
export declare const WORKER_TYPES: readonly ["sync", "
|
|
3
|
+
export declare const WORKER_TYPES: readonly ["sync", "agent", "pipeline", "projection", "workflow"];
|
|
4
4
|
export type WorkerType = (typeof WORKER_TYPES)[number];
|
|
5
|
-
export
|
|
6
|
-
readonly sync: {
|
|
7
|
-
readonly configurable: true;
|
|
8
|
-
readonly environmentVariable: "SIXB_SYNC_WORKER_CONCURRENCY";
|
|
9
|
-
};
|
|
10
|
-
readonly action: {
|
|
11
|
-
readonly configurable: false;
|
|
12
|
-
readonly environmentVariable: "SIXB_ACTION_WORKER_CONCURRENCY";
|
|
13
|
-
};
|
|
14
|
-
readonly agent: {
|
|
15
|
-
readonly configurable: true;
|
|
16
|
-
readonly environmentVariable: "SIXB_AGENT_WORKER_CONCURRENCY";
|
|
17
|
-
};
|
|
18
|
-
readonly pipeline: {
|
|
19
|
-
readonly configurable: true;
|
|
20
|
-
readonly environmentVariable: "SIXB_PIPELINE_WORKER_CONCURRENCY";
|
|
21
|
-
};
|
|
22
|
-
readonly projection: {
|
|
23
|
-
readonly configurable: true;
|
|
24
|
-
readonly environmentVariable: "SIXB_PROJECTION_WORKER_CONCURRENCY";
|
|
25
|
-
};
|
|
26
|
-
readonly workflow: {
|
|
27
|
-
readonly configurable: true;
|
|
28
|
-
readonly environmentVariable: "SIXB_WORKFLOW_WORKER_CONCURRENCY";
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export type ConfigurableWorkerType = {
|
|
32
|
-
[Type in WorkerType]: (typeof WORKER_CONCURRENCY_CONFIG)[Type]["configurable"] extends true ? Type : never;
|
|
33
|
-
}[WorkerType];
|
|
34
|
-
export type WorkerConcurrency = Readonly<Partial<Record<ConfigurableWorkerType, number>>>;
|
|
5
|
+
export type WorkerConcurrency = Readonly<Partial<Record<WorkerType, number>>>;
|
|
35
6
|
export type QueueWorkerProcess = Worker & {
|
|
36
7
|
readonly concurrency: number;
|
|
37
8
|
};
|
|
@@ -39,6 +10,7 @@ export interface WorkerCreationOptions {
|
|
|
39
10
|
readonly agentApiBaseUrl?: string;
|
|
40
11
|
readonly agentTurnTimeoutMs?: number;
|
|
41
12
|
readonly workerConcurrency?: WorkerConcurrency;
|
|
13
|
+
readonly vectorConcurrency?: number;
|
|
42
14
|
}
|
|
43
15
|
export declare function createWorkerForType(sixb: LoadedSixbHost, workerType: string, options?: WorkerCreationOptions): QueueWorkerProcess;
|
|
44
16
|
export declare function resolveWorkerTypeToStart(requestedWorker?: string): WorkerType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-registry.d.ts","sourceRoot":"","sources":["../../src/lib/worker-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-registry.d.ts","sourceRoot":"","sources":["../../src/lib/worker-registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAMzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAGhD,eAAO,MAAM,YAAY,kEAAmE,CAAA;AAE5F,MA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,SAAS,UAAU,EAAE,CAwBxF;AAsBD,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAIjE;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,GAAG,OAAO,CAOxF"}
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -77,13 +77,13 @@ export declare function ErrorView({ title, message, remediation, details, }: {
|
|
|
77
77
|
remediation?: string;
|
|
78
78
|
details?: readonly string[];
|
|
79
79
|
}): React.JSX.Element;
|
|
80
|
-
export declare function DevView({ name, apiUrl, apiDocsUrl, wsUrl,
|
|
80
|
+
export declare function DevView({ name, apiUrl, apiDocsUrl, wsUrl, appUrl, workers, warnings, }: {
|
|
81
81
|
name: string;
|
|
82
82
|
apiUrl: string;
|
|
83
83
|
apiDocsUrl: string;
|
|
84
84
|
wsUrl: string;
|
|
85
|
-
|
|
86
|
-
appUrl
|
|
85
|
+
/** `null` when the app could not start; a warning says why. */
|
|
86
|
+
appUrl: string | null;
|
|
87
87
|
workers?: readonly {
|
|
88
88
|
readonly type: string;
|
|
89
89
|
readonly concurrency: number;
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EAEX,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAgB,KAAK,OAAO,EAAa,MAAM,qBAAqB,CAAA;AAK3E,wBAAsB,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,iBAOvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,0BAErD;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,KAAK,EA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;YACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;SAC7B,EAAE,CAAA;KACJ,GAAG,IAAI,CAAA;CACT,qBAiEA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,eAAe,EAAE,CAAA;CACjC,qBAuBA;AAoCD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAED,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,MAAM,GACP,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,iBAAiB,CAAA;CAC1B,qBAoBA;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,KAAK,EACL,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAC5B,qBAgBA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sixb/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "Command-line interface for Sixb projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sixb",
|
|
@@ -29,27 +29,25 @@
|
|
|
29
29
|
"prepack": "bun run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@sixb/
|
|
33
|
-
"@sixb/
|
|
34
|
-
"@sixb/
|
|
35
|
-
"@sixb/
|
|
36
|
-
"@sixb/
|
|
37
|
-
"@sixb/
|
|
38
|
-
"@sixb/
|
|
39
|
-
"@sixb/
|
|
40
|
-
"@sixb/
|
|
41
|
-
"@sixb/
|
|
42
|
-
"@sixb/
|
|
43
|
-
"@sixb/
|
|
44
|
-
"
|
|
45
|
-
"@sixb/workflow-worker": "0.1.18",
|
|
46
|
-
"create-sixb": "^0.1.4",
|
|
32
|
+
"@sixb/agent-worker": "0.1.20",
|
|
33
|
+
"@sixb/app": "^0.1.12",
|
|
34
|
+
"@sixb/client": "^0.1.20",
|
|
35
|
+
"@sixb/core": "0.1.20",
|
|
36
|
+
"@sixb/cli-core": "^0.1.8",
|
|
37
|
+
"@sixb/orchestrator": "0.1.20",
|
|
38
|
+
"@sixb/pipeline-worker": "0.1.20",
|
|
39
|
+
"@sixb/projection-worker": "0.1.20",
|
|
40
|
+
"@sixb/rules-worker": "0.1.20",
|
|
41
|
+
"@sixb/server": "0.1.20",
|
|
42
|
+
"@sixb/sync-worker": "0.1.20",
|
|
43
|
+
"@sixb/workflow-worker": "0.1.20",
|
|
44
|
+
"create-sixb": "^0.1.5",
|
|
47
45
|
"ink": "^6.0.0",
|
|
48
46
|
"react": "^19.0.0",
|
|
49
47
|
"react-devtools-core": "^4.19.1"
|
|
50
48
|
},
|
|
51
49
|
"devDependencies": {
|
|
52
|
-
"@sixb/deploy-ssh": "0.1.
|
|
50
|
+
"@sixb/deploy-ssh": "0.1.2",
|
|
53
51
|
"@types/bun": "latest",
|
|
54
52
|
"@types/react": "^19.0.0",
|
|
55
53
|
"typescript": "^5.7.0"
|
package/src/commands/api.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { resolve } from "node:path"
|
|
|
3
3
|
import { createSixbServer, type SixbServer } from "@sixb/server"
|
|
4
4
|
import { apiDocsUrl, apiEventsUrl, apiUrl, resolveBrowserTopology } from "../lib/browser-topology"
|
|
5
5
|
import type { LoadedSixbHost } from "../lib/loadSixb"
|
|
6
|
-
import { builtAppOutdir,
|
|
6
|
+
import { builtAppOutdir, loadProductionSixb } from "../lib/production"
|
|
7
7
|
import { runUntilSignal, stopQuietly } from "../lib/role-lifecycle"
|
|
8
8
|
import { stopSixbProviders } from "../lib/runtime"
|
|
9
9
|
import { migrateStorageForRole } from "../lib/storage-migration"
|
|
@@ -17,7 +17,6 @@ export interface ApiOptions {
|
|
|
17
17
|
apiPort?: string
|
|
18
18
|
apiHost?: string
|
|
19
19
|
apiPublicOrigin?: string
|
|
20
|
-
atlasPublicOrigin?: string
|
|
21
20
|
appPublicOrigin?: string
|
|
22
21
|
trustedProxies?: string
|
|
23
22
|
}
|
|
@@ -51,7 +50,6 @@ export async function runApi(options: ApiOptions = {}) {
|
|
|
51
50
|
})
|
|
52
51
|
|
|
53
52
|
const appOutdir = builtAppOutdir(loaded.buildOutdir)
|
|
54
|
-
const hasCustomApp = await hasBuiltCustomApp(appOutdir)
|
|
55
53
|
const authExperienceOutdir = resolve(appOutdir, "auth")
|
|
56
54
|
const hasAuthExperience = await stat(resolve(authExperienceOutdir, "index.html"))
|
|
57
55
|
.then(() => true)
|
|
@@ -63,9 +61,7 @@ export async function runApi(options: ApiOptions = {}) {
|
|
|
63
61
|
port: options.port,
|
|
64
62
|
apiPort: options.apiPort,
|
|
65
63
|
apiPublicOrigin: options.apiPublicOrigin,
|
|
66
|
-
atlasPublicOrigin: options.atlasPublicOrigin,
|
|
67
64
|
appPublicOrigin: options.appPublicOrigin,
|
|
68
|
-
hasCustomApp,
|
|
69
65
|
})
|
|
70
66
|
|
|
71
67
|
const trustedProxies = (options.trustedProxies ?? process.env.SIXB_TRUSTED_PROXIES ?? "")
|
package/src/commands/app.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { basename } from "node:path"
|
|
2
|
-
import { type
|
|
2
|
+
import { type CustomAppServer, createCustomApp } from "@sixb/app/server"
|
|
3
3
|
import { resolveBrowserTopology, servedUrl } from "../lib/browser-topology"
|
|
4
4
|
import {
|
|
5
5
|
builtAppOutdir,
|
|
6
|
-
|
|
6
|
+
hasBuiltApp,
|
|
7
7
|
resolveProductionPaths,
|
|
8
8
|
resolveRuntimeEntry,
|
|
9
9
|
} from "../lib/production"
|
|
@@ -31,11 +31,11 @@ export async function runApp(options: AppOptions = {}) {
|
|
|
31
31
|
status: "Starting app",
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
-
let customAppServer:
|
|
34
|
+
let customAppServer: CustomAppServer | null = null
|
|
35
35
|
|
|
36
36
|
try {
|
|
37
37
|
const appOutdir = builtAppOutdir(buildOutdir)
|
|
38
|
-
if (!(await
|
|
38
|
+
if (!(await hasBuiltApp(appOutdir))) {
|
|
39
39
|
throw new Error(
|
|
40
40
|
`[SixbCustomApp] No built app found in ${appOutdir}. Run \`sixb build\` before \`sixb app\`.`
|
|
41
41
|
)
|
|
@@ -52,7 +52,6 @@ export async function runApp(options: AppOptions = {}) {
|
|
|
52
52
|
const customApp = await createCustomApp({
|
|
53
53
|
rootDir: projectRoot,
|
|
54
54
|
apiBaseUrl: topology.apiPublicOrigin,
|
|
55
|
-
audience: "app",
|
|
56
55
|
// No authEnabled: the page asks the API whether the project uses auth, so serving the
|
|
57
56
|
// bundle never loads the project.
|
|
58
57
|
})
|
|
@@ -61,13 +60,12 @@ export async function runApp(options: AppOptions = {}) {
|
|
|
61
60
|
port: topology.appPort,
|
|
62
61
|
outdir: appOutdir,
|
|
63
62
|
apiBaseUrl: topology.apiPublicOrigin,
|
|
64
|
-
audience: "app",
|
|
65
63
|
})
|
|
66
64
|
|
|
67
65
|
app.started({
|
|
68
66
|
title: "Sixb app started",
|
|
69
67
|
name: basename(projectRoot),
|
|
70
|
-
serviceName: "
|
|
68
|
+
serviceName: "App",
|
|
71
69
|
items: [{ label: "URL", value: servedUrl(topology) }],
|
|
72
70
|
})
|
|
73
71
|
|
package/src/commands/build.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { mkdir } from "node:fs/promises"
|
|
2
2
|
import { dirname, join, resolve } from "node:path"
|
|
3
|
-
import { createCustomApp } from "@sixb/app"
|
|
4
|
-
import { buildAtlasAssets } from "@sixb/atlas"
|
|
3
|
+
import { createCustomApp } from "@sixb/app/server"
|
|
5
4
|
import { buildRuntime } from "../lib/build-runtime"
|
|
6
5
|
import { generateProjectTypes } from "../lib/typegen"
|
|
7
6
|
import { BuildView, ErrorView, renderStatic } from "../ui"
|
|
@@ -37,43 +36,27 @@ export async function runBuild(options: BuildOptions = {}) {
|
|
|
37
36
|
generatedDir: join(".sixb", "build", "app"),
|
|
38
37
|
})
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
39
|
+
try {
|
|
40
|
+
const appResult = await customApp.build({
|
|
41
|
+
outdir: resolve(outdir, "app"),
|
|
42
|
+
})
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
await renderStatic(
|
|
48
|
-
<ErrorView
|
|
49
|
-
title="App build failed"
|
|
50
|
-
message="Failed to build the app"
|
|
51
|
-
details={appResult.logs ?? []}
|
|
52
|
-
/>
|
|
53
|
-
)
|
|
54
|
-
process.exit(1)
|
|
55
|
-
}
|
|
56
|
-
} catch (error) {
|
|
57
|
-
// e.g. the app/globals.css Tailwind compile failed — surface the labeled
|
|
58
|
-
// message instead of an unhandled stack trace.
|
|
59
|
-
const message = error instanceof Error ? error.message : String(error)
|
|
44
|
+
if (!appResult.success) {
|
|
60
45
|
await renderStatic(
|
|
61
|
-
<ErrorView
|
|
46
|
+
<ErrorView
|
|
47
|
+
title="App build failed"
|
|
48
|
+
message="Failed to build the app"
|
|
49
|
+
details={appResult.logs ?? []}
|
|
50
|
+
/>
|
|
62
51
|
)
|
|
63
52
|
process.exit(1)
|
|
64
53
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
try {
|
|
68
|
-
await buildAtlasAssets({ outdir: resolve(outdir, "atlas") })
|
|
69
54
|
} catch (error) {
|
|
55
|
+
// e.g. the app/globals.css Tailwind compile failed — surface the labeled
|
|
56
|
+
// message instead of an unhandled stack trace.
|
|
70
57
|
const message = error instanceof Error ? error.message : String(error)
|
|
71
58
|
await renderStatic(
|
|
72
|
-
<ErrorView
|
|
73
|
-
title="Built-in UI build failed"
|
|
74
|
-
message="Failed to build production UI assets"
|
|
75
|
-
details={[message]}
|
|
76
|
-
/>
|
|
59
|
+
<ErrorView title="App build failed" message="Failed to build the app" details={[message]} />
|
|
77
60
|
)
|
|
78
61
|
process.exit(1)
|
|
79
62
|
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { dirname, resolve } from "node:path"
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
AppPackagesMissingError,
|
|
4
|
+
type CustomAppDevOptions,
|
|
5
|
+
type CustomAppDevServer,
|
|
6
|
+
createCustomApp,
|
|
7
|
+
} from "@sixb/app/server"
|
|
4
8
|
import { createSixbServer } from "@sixb/server"
|
|
5
9
|
import { resolveAgentTurnTimeoutMs } from "../lib/agent-turn-timeout"
|
|
6
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
apiDocsUrl,
|
|
12
|
+
apiEventsUrl,
|
|
13
|
+
apiUrl,
|
|
14
|
+
resolveBrowserTopology,
|
|
15
|
+
servedUrl,
|
|
16
|
+
} from "../lib/browser-topology"
|
|
7
17
|
import { type LoadedSixbHost, loadSixbFromEntry } from "../lib/loadSixb"
|
|
8
18
|
import { stopQuietly } from "../lib/role-lifecycle"
|
|
9
19
|
import { startSixbRuntime, stopSixbProviders } from "../lib/runtime"
|
|
10
20
|
import { generateProjectTypes } from "../lib/typegen"
|
|
11
|
-
import { resolveWorkerConcurrency } from "../lib/worker-concurrency"
|
|
21
|
+
import { resolveVectorConcurrency, resolveWorkerConcurrency } from "../lib/worker-concurrency"
|
|
12
22
|
import { DevView, LoadingView, renderCliError, renderPersistent } from "../ui"
|
|
13
23
|
|
|
14
24
|
export interface DevOptions {
|
|
@@ -18,10 +28,10 @@ export interface DevOptions {
|
|
|
18
28
|
apiPort?: string
|
|
19
29
|
apiHost?: string
|
|
20
30
|
apiPublicOrigin?: string
|
|
21
|
-
atlasPublicOrigin?: string
|
|
22
31
|
appPublicOrigin?: string
|
|
23
32
|
agentTurnTimeout?: string
|
|
24
33
|
concurrency?: readonly string[]
|
|
34
|
+
vectorConcurrency?: string
|
|
25
35
|
}
|
|
26
36
|
|
|
27
37
|
export async function runDevRuntime(options: DevOptions = {}) {
|
|
@@ -29,13 +39,13 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
29
39
|
|
|
30
40
|
const agentTurnTimeoutMs = resolveAgentTurnTimeoutMs(options.agentTurnTimeout)
|
|
31
41
|
const workerConcurrency = resolveWorkerConcurrency(options.concurrency)
|
|
42
|
+
const vectorConcurrency = resolveVectorConcurrency(options.vectorConcurrency)
|
|
32
43
|
const entry = resolve(options.entry ?? "sixb.config.ts")
|
|
33
44
|
|
|
34
45
|
const app = renderPersistent(
|
|
35
46
|
<LoadingView title="Starting sixb" subtitle={entry} status="Loading runtime" />
|
|
36
47
|
)
|
|
37
48
|
|
|
38
|
-
let atlasServer: AtlasAppServer | null = null
|
|
39
49
|
let customAppServer: CustomAppDevServer | null = null
|
|
40
50
|
let sixb: LoadedSixbHost | null = null
|
|
41
51
|
let runtime: Awaited<ReturnType<typeof startSixbRuntime>> | null = null
|
|
@@ -56,8 +66,6 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
56
66
|
abort.signal.throwIfAborted()
|
|
57
67
|
const projectRoot = dirname(resolve(entry))
|
|
58
68
|
|
|
59
|
-
const customAppProbe = await createCustomApp({ rootDir: projectRoot })
|
|
60
|
-
const hasCustomApp = await customAppProbe.hasRoutes()
|
|
61
69
|
const topology = resolveBrowserTopology({
|
|
62
70
|
role: "dev",
|
|
63
71
|
host: options.host,
|
|
@@ -65,21 +73,16 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
65
73
|
port: options.port,
|
|
66
74
|
apiPort: options.apiPort,
|
|
67
75
|
apiPublicOrigin: options.apiPublicOrigin,
|
|
68
|
-
atlasPublicOrigin: options.atlasPublicOrigin,
|
|
69
76
|
appPublicOrigin: options.appPublicOrigin,
|
|
70
|
-
hasCustomApp,
|
|
71
77
|
})
|
|
72
78
|
const customApp = await createCustomApp({
|
|
73
79
|
rootDir: projectRoot,
|
|
74
80
|
apiBaseUrl: topology.apiPublicOrigin,
|
|
75
|
-
audience: "app",
|
|
76
81
|
authEnabled: host.auth.isEnabled(),
|
|
77
82
|
})
|
|
78
|
-
const authExperience =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
})
|
|
82
|
-
: null
|
|
83
|
+
const authExperience = (await customApp.prepareAuthExperience()) ?? {
|
|
84
|
+
outdir: resolve(projectRoot, ".sixb", "generated", "auth"),
|
|
85
|
+
}
|
|
83
86
|
|
|
84
87
|
abort.signal.throwIfAborted()
|
|
85
88
|
const server = createSixbServer({
|
|
@@ -91,7 +94,7 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
91
94
|
publicOrigin: topology.apiPublicOrigin,
|
|
92
95
|
allowedOrigins: topology.allowedBrowserOrigins,
|
|
93
96
|
},
|
|
94
|
-
|
|
97
|
+
authExperience,
|
|
95
98
|
})
|
|
96
99
|
runtimeOwnsProviders = true
|
|
97
100
|
// The runtime owns the server's lifecycle so agent turns run only while it listens.
|
|
@@ -109,34 +112,13 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
109
112
|
agentApiBaseUrl: topology.apiPublicOrigin,
|
|
110
113
|
agentTurnTimeoutMs,
|
|
111
114
|
workerConcurrency,
|
|
115
|
+
vectorConcurrency,
|
|
112
116
|
})
|
|
113
117
|
abort.signal.throwIfAborted()
|
|
114
|
-
const authEnabled = host.auth.isEnabled()
|
|
115
118
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
authEnabled,
|
|
120
|
-
})
|
|
121
|
-
atlasServer = await atlas.start({
|
|
122
|
-
host: topology.host,
|
|
123
|
-
port: topology.atlasPort,
|
|
124
|
-
development: true,
|
|
125
|
-
})
|
|
126
|
-
abort.signal.throwIfAborted()
|
|
127
|
-
|
|
128
|
-
let appUrl: string | null = null
|
|
129
|
-
if (hasCustomApp) {
|
|
130
|
-
app.rerender(
|
|
131
|
-
<LoadingView title="Starting sixb" subtitle={entry} status="Starting custom app" />
|
|
132
|
-
)
|
|
133
|
-
|
|
134
|
-
customAppServer = await customApp.dev({
|
|
135
|
-
host: topology.host,
|
|
136
|
-
port: topology.appPort,
|
|
137
|
-
})
|
|
138
|
-
appUrl = topology.appPublicOrigin
|
|
139
|
-
}
|
|
119
|
+
app.rerender(<LoadingView title="Starting sixb" subtitle={entry} status="Starting app" />)
|
|
120
|
+
const devApp = await startDevApp(customApp, { host: topology.host, port: topology.appPort })
|
|
121
|
+
customAppServer = devApp.server
|
|
140
122
|
abort.signal.throwIfAborted()
|
|
141
123
|
|
|
142
124
|
app.rerender(
|
|
@@ -145,10 +127,8 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
145
127
|
apiUrl={apiUrl(topology)}
|
|
146
128
|
apiDocsUrl={apiDocsUrl(topology)}
|
|
147
129
|
wsUrl={apiEventsUrl(topology)}
|
|
148
|
-
|
|
149
|
-
appUrl={appUrl}
|
|
130
|
+
appUrl={customAppServer ? servedUrl(topology) : null}
|
|
150
131
|
workers={[
|
|
151
|
-
{ type: "action", worker: runtime.actionWorker },
|
|
152
132
|
{ type: "agent", worker: runtime.agentWorker },
|
|
153
133
|
{ type: "projection", worker: runtime.projectionWorker },
|
|
154
134
|
{ type: "pipeline", worker: runtime.pipelineWorker },
|
|
@@ -157,12 +137,12 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
157
137
|
].flatMap(({ type, worker }) =>
|
|
158
138
|
worker ? [{ type, concurrency: worker.concurrency }] : []
|
|
159
139
|
)}
|
|
160
|
-
warnings={runtime.warnings}
|
|
140
|
+
warnings={devApp.warning ? [devApp.warning, ...runtime.warnings] : runtime.warnings}
|
|
161
141
|
/>
|
|
162
142
|
)
|
|
163
143
|
|
|
164
144
|
process.env.SIXB_DEV_READY = "1"
|
|
165
|
-
process.send?.({ type: "ready",
|
|
145
|
+
process.send?.({ type: "ready", watchesApp: customAppServer?.watchesSources ?? false })
|
|
166
146
|
|
|
167
147
|
await Promise.race([stopped, runtime.waitForWorkerFailure()])
|
|
168
148
|
} catch (error) {
|
|
@@ -176,10 +156,25 @@ export async function runDevRuntime(options: DevOptions = {}) {
|
|
|
176
156
|
process.env.SIXB_DEV_READY = ""
|
|
177
157
|
app.unmount()
|
|
178
158
|
await stopQuietly(() => customAppServer?.stop() ?? Promise.resolve())
|
|
179
|
-
await stopQuietly(() => atlasServer?.stop() ?? Promise.resolve())
|
|
180
159
|
await stopQuietly(() => runtime?.stop() ?? Promise.resolve())
|
|
181
160
|
if (sixb && !runtimeOwnsProviders) await stopSixbProviders(sixb)
|
|
182
161
|
process.off("SIGINT", requestShutdown)
|
|
183
162
|
process.off("SIGTERM", requestShutdown)
|
|
184
163
|
}
|
|
185
164
|
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Starts the app's dev server. A project missing the packages the app is bundled from still gets
|
|
168
|
+
* its API, with the install command as a warning; `sixb build` refuses instead.
|
|
169
|
+
*/
|
|
170
|
+
export async function startDevApp(
|
|
171
|
+
customApp: { dev(options: CustomAppDevOptions): Promise<CustomAppDevServer> },
|
|
172
|
+
options: CustomAppDevOptions
|
|
173
|
+
): Promise<{ readonly server: CustomAppDevServer | null; readonly warning?: string }> {
|
|
174
|
+
try {
|
|
175
|
+
return { server: await customApp.dev(options) }
|
|
176
|
+
} catch (error) {
|
|
177
|
+
if (!(error instanceof AppPackagesMissingError)) throw error
|
|
178
|
+
return { server: null, warning: error.message.replace("[SixbCustomApp] ", "") }
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -5,7 +5,7 @@ import { runUntilSignal, stopQuietly } from "../lib/role-lifecycle"
|
|
|
5
5
|
import { recordApiPublicOrigin, stopSixbProviders, waitForWorkerFailure } from "../lib/runtime"
|
|
6
6
|
import { assertShareableProviders } from "../lib/shareable-providers"
|
|
7
7
|
import { migrateStorageForRole } from "../lib/storage-migration"
|
|
8
|
-
import { resolveWorkerConcurrency } from "../lib/worker-concurrency"
|
|
8
|
+
import { resolveVectorConcurrency, resolveWorkerConcurrency } from "../lib/worker-concurrency"
|
|
9
9
|
import {
|
|
10
10
|
agentRuntimeRequired,
|
|
11
11
|
assertWorkerInputs,
|
|
@@ -23,6 +23,7 @@ export interface WorkerGroupOptions {
|
|
|
23
23
|
apiPublicOrigin?: string
|
|
24
24
|
agentTurnTimeout?: string
|
|
25
25
|
concurrency?: readonly string[]
|
|
26
|
+
vectorConcurrency?: string
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export async function runWorkerGroup(options: WorkerGroupOptions = {}) {
|
|
@@ -33,6 +34,7 @@ export async function runWorkerGroup(options: WorkerGroupOptions = {}) {
|
|
|
33
34
|
const requestedTypes = (options.workerTypes ?? []).map(resolveWorkerTypeToStart)
|
|
34
35
|
const agentTurnTimeoutMs = resolveAgentTurnTimeoutMs(options.agentTurnTimeout)
|
|
35
36
|
const workerConcurrency = resolveWorkerConcurrency(options.concurrency)
|
|
37
|
+
const vectorConcurrency = resolveVectorConcurrency(options.vectorConcurrency)
|
|
36
38
|
const entry = await resolveRuntimeEntry({ entry: options.entry })
|
|
37
39
|
|
|
38
40
|
const app = renderPersistent(
|
|
@@ -92,6 +94,7 @@ export async function runWorkerGroup(options: WorkerGroupOptions = {}) {
|
|
|
92
94
|
agentApiBaseUrl: options.apiPublicOrigin,
|
|
93
95
|
agentTurnTimeoutMs,
|
|
94
96
|
workerConcurrency,
|
|
97
|
+
vectorConcurrency,
|
|
95
98
|
})
|
|
96
99
|
)
|
|
97
100
|
await Promise.all(workers.map((worker) => worker.start()))
|
package/src/commands/worker.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { runUntilSignal, stopQuietly } from "../lib/role-lifecycle"
|
|
|
6
6
|
import { recordApiPublicOrigin, stopSixbProviders, waitForWorkerFailure } from "../lib/runtime"
|
|
7
7
|
import { assertShareableProviders } from "../lib/shareable-providers"
|
|
8
8
|
import { migrateStorageForRole } from "../lib/storage-migration"
|
|
9
|
-
import { resolveSingleWorkerConcurrency } from "../lib/worker-concurrency"
|
|
9
|
+
import { resolveSingleWorkerConcurrency, resolveVectorConcurrency } from "../lib/worker-concurrency"
|
|
10
10
|
import {
|
|
11
11
|
agentRuntimeRequired,
|
|
12
12
|
createWorkerForType,
|
|
@@ -23,6 +23,7 @@ export interface WorkerOptions {
|
|
|
23
23
|
apiPublicOrigin?: string
|
|
24
24
|
agentTurnTimeout?: string
|
|
25
25
|
concurrency?: string
|
|
26
|
+
vectorConcurrency?: string
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export async function runWorker(options: WorkerOptions = {}) {
|
|
@@ -31,6 +32,7 @@ export async function runWorker(options: WorkerOptions = {}) {
|
|
|
31
32
|
const workerType = resolveWorkerTypeToStart(options.workerType)
|
|
32
33
|
const agentTurnTimeoutMs = resolveAgentTurnTimeoutMs(options.agentTurnTimeout)
|
|
33
34
|
const workerConcurrency = resolveSingleWorkerConcurrency(workerType, options.concurrency)
|
|
35
|
+
const vectorConcurrency = resolveVectorConcurrency(options.vectorConcurrency)
|
|
34
36
|
const entry = await resolveRuntimeEntry({ entry: options.entry })
|
|
35
37
|
|
|
36
38
|
const app = renderPersistent(
|
|
@@ -76,6 +78,7 @@ export async function runWorker(options: WorkerOptions = {}) {
|
|
|
76
78
|
agentApiBaseUrl: options.apiPublicOrigin,
|
|
77
79
|
agentTurnTimeoutMs,
|
|
78
80
|
workerConcurrency,
|
|
81
|
+
vectorConcurrency,
|
|
79
82
|
})
|
|
80
83
|
await worker.start()
|
|
81
84
|
|
package/src/index.tsx
CHANGED
|
@@ -102,10 +102,10 @@ async function main(): Promise<void> {
|
|
|
102
102
|
apiPort: getFlag("api-port"),
|
|
103
103
|
apiHost: getFlag("api-host"),
|
|
104
104
|
apiPublicOrigin: getFlag("api-public-origin"),
|
|
105
|
-
atlasPublicOrigin: getFlag("atlas-public-origin"),
|
|
106
105
|
appPublicOrigin: getFlag("app-public-origin"),
|
|
107
106
|
agentTurnTimeout: getFlag("agent-turn-timeout"),
|
|
108
107
|
concurrency: getFlags("concurrency"),
|
|
108
|
+
vectorConcurrency: getFlag("vector-concurrency"),
|
|
109
109
|
})
|
|
110
110
|
break
|
|
111
111
|
}
|
|
@@ -119,6 +119,7 @@ async function main(): Promise<void> {
|
|
|
119
119
|
apiPublicOrigin: getFlag("api-public-origin"),
|
|
120
120
|
agentTurnTimeout: getFlag("agent-turn-timeout"),
|
|
121
121
|
concurrency: getFlag("concurrency"),
|
|
122
|
+
vectorConcurrency: getFlag("vector-concurrency"),
|
|
122
123
|
})
|
|
123
124
|
break
|
|
124
125
|
}
|
|
@@ -132,6 +133,7 @@ async function main(): Promise<void> {
|
|
|
132
133
|
apiPublicOrigin: getFlag("api-public-origin"),
|
|
133
134
|
agentTurnTimeout: getFlag("agent-turn-timeout"),
|
|
134
135
|
concurrency: getFlags("concurrency"),
|
|
136
|
+
vectorConcurrency: getFlag("vector-concurrency"),
|
|
135
137
|
})
|
|
136
138
|
break
|
|
137
139
|
}
|
|
@@ -146,25 +148,12 @@ async function main(): Promise<void> {
|
|
|
146
148
|
apiPort: getFlag("api-port"),
|
|
147
149
|
apiHost: getFlag("api-host"),
|
|
148
150
|
apiPublicOrigin: getFlag("api-public-origin"),
|
|
149
|
-
atlasPublicOrigin: getFlag("atlas-public-origin"),
|
|
150
151
|
appPublicOrigin: getFlag("app-public-origin"),
|
|
151
152
|
trustedProxies: getFlag("trusted-proxies"),
|
|
152
153
|
})
|
|
153
154
|
break
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
case "atlas": {
|
|
157
|
-
const { runAtlas } = await import("./commands/atlas")
|
|
158
|
-
await runAtlas({
|
|
159
|
-
entry: getFlag("entry"),
|
|
160
|
-
port: getFlag("port"),
|
|
161
|
-
host: getFlag("host"),
|
|
162
|
-
apiPublicOrigin: getFlag("api-public-origin"),
|
|
163
|
-
atlasPublicOrigin: getFlag("atlas-public-origin"),
|
|
164
|
-
})
|
|
165
|
-
break
|
|
166
|
-
}
|
|
167
|
-
|
|
168
157
|
case "app": {
|
|
169
158
|
const { runApp } = await import("./commands/app")
|
|
170
159
|
await runApp({
|