@sixb/cli 0.1.10 → 0.1.12
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/worker-group.d.ts.map +1 -1
- package/dist/commands/worker.d.ts.map +1 -1
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/worker-registry.d.ts +6 -1
- package/dist/lib/worker-registry.d.ts.map +1 -1
- package/dist/ui/index.d.ts +19 -19
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/commands/worker-group.tsx +2 -0
- package/src/commands/worker.tsx +8 -3
- package/src/lib/runtime.ts +5 -8
- package/src/lib/worker-registry.ts +32 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-group.d.ts","sourceRoot":"","sources":["../../src/commands/worker-group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-group.d.ts","sourceRoot":"","sources":["../../src/commands/worker-group.tsx"],"names":[],"mappings":"AAsBA,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAChC;AAED,wBAAsB,cAAc,CAAC,OAAO,GAAE,kBAAuB,iBAsGpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/commands/worker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/commands/worker.tsx"],"names":[],"mappings":"AAsBA,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,wBAAsB,SAAS,CAAC,OAAO,GAAE,aAAkB,iBAoF1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/lib/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAShD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,EAGL,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/lib/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAShD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,EAGL,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,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AAc,EACpB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,kBAAkB,CAAC,CAqH7B;AAmBD,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBnF"}
|
|
@@ -46,8 +46,9 @@ export declare function resolveWorkerTypeToStart(requestedWorker?: string): Work
|
|
|
46
46
|
* Why this worker cannot be constructed with these options, or `null` when it can. Exported
|
|
47
47
|
* for `sixb worker`, which has to answer this before it migrates storage.
|
|
48
48
|
*/
|
|
49
|
-
export declare function unmetWorkerRequirement(workerType: string, options: WorkerCreationOptions): string | null;
|
|
49
|
+
export declare function unmetWorkerRequirement(workerType: string, options: WorkerCreationOptions, agentApiRequired: boolean): string | null;
|
|
50
50
|
export interface WorkerGroupInputs {
|
|
51
|
+
readonly agentApiRequired: boolean;
|
|
51
52
|
readonly workerTypes: readonly string[];
|
|
52
53
|
readonly options: WorkerCreationOptions;
|
|
53
54
|
/**
|
|
@@ -64,4 +65,8 @@ export interface WorkerGroupInputs {
|
|
|
64
65
|
*/
|
|
65
66
|
export declare function assertWorkerInputs(input: WorkerGroupInputs): void;
|
|
66
67
|
export declare function resolveRegisteredWorkerTypes(sixb: LoadedSixbHost): readonly WorkerType[];
|
|
68
|
+
/** Explicit model calls can enqueue accounting recovery without a model catalog. */
|
|
69
|
+
export declare function agentWorkerRequired(sixb: LoadedSixbHost): boolean;
|
|
70
|
+
/** Only agent execution needs a sandbox and an API origin; accounting recovery does not. */
|
|
71
|
+
export declare function agentRuntimeRequired(definitions: LoadedSixbHost["definitions"]): boolean;
|
|
67
72
|
//# sourceMappingURL=worker-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-registry.d.ts","sourceRoot":"","sources":["../../src/lib/worker-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAMzD,OAAO,KA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B,4BAA4B,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,UAAU,EAAE,CA4BxF;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
|
@@ -20,14 +20,14 @@ export declare function KeyValueResultView({ title, subtitle, items, titleColor,
|
|
|
20
20
|
items: readonly KeyValueItem[];
|
|
21
21
|
titleColor?: string;
|
|
22
22
|
message?: string;
|
|
23
|
-
}):
|
|
23
|
+
}): React.JSX.Element;
|
|
24
24
|
export declare function TableResultView({ title, subtitle, headers, rows, emptyMessage, }: {
|
|
25
25
|
title: string;
|
|
26
26
|
subtitle?: string;
|
|
27
27
|
headers: readonly string[];
|
|
28
28
|
rows: readonly (readonly string[])[];
|
|
29
29
|
emptyMessage: string;
|
|
30
|
-
}):
|
|
30
|
+
}): React.JSX.Element;
|
|
31
31
|
export declare function SecretResultView({ title, subtitle, items, secretLabel, secret, message, }: {
|
|
32
32
|
title: string;
|
|
33
33
|
subtitle?: string;
|
|
@@ -35,29 +35,29 @@ export declare function SecretResultView({ title, subtitle, items, secretLabel,
|
|
|
35
35
|
secretLabel?: string;
|
|
36
36
|
secret: string;
|
|
37
37
|
message?: string;
|
|
38
|
-
}):
|
|
38
|
+
}): React.JSX.Element;
|
|
39
39
|
export declare function LoadingView({ title, subtitle, status, }: {
|
|
40
40
|
title: string;
|
|
41
41
|
subtitle?: string;
|
|
42
42
|
status: string;
|
|
43
|
-
}):
|
|
43
|
+
}): React.JSX.Element;
|
|
44
44
|
export declare function HelpView({ errorMessage }: {
|
|
45
45
|
errorMessage?: string;
|
|
46
|
-
}):
|
|
46
|
+
}): React.JSX.Element;
|
|
47
47
|
export declare function CommandHelpView({ help, errorMessage }: {
|
|
48
48
|
help: CliHelp;
|
|
49
49
|
errorMessage?: string;
|
|
50
|
-
}):
|
|
50
|
+
}): React.JSX.Element;
|
|
51
51
|
export declare function VersionView({ version }: {
|
|
52
52
|
version: string;
|
|
53
|
-
}):
|
|
53
|
+
}): React.JSX.Element;
|
|
54
54
|
export declare function ErrorView({ title, message, remediation, details, }: {
|
|
55
55
|
title?: string;
|
|
56
56
|
message: string;
|
|
57
57
|
/** What to do next. Rendered apart from the diagnosis, not appended to it. */
|
|
58
58
|
remediation?: string;
|
|
59
59
|
details?: readonly string[];
|
|
60
|
-
}):
|
|
60
|
+
}): React.JSX.Element;
|
|
61
61
|
export declare function DevView({ name, apiUrl, apiDocsUrl, wsUrl, uiUrl, appUrl, workers, warnings, }: {
|
|
62
62
|
name: string;
|
|
63
63
|
apiUrl: string;
|
|
@@ -70,14 +70,14 @@ export declare function DevView({ name, apiUrl, apiDocsUrl, wsUrl, uiUrl, appUrl
|
|
|
70
70
|
readonly concurrency: number;
|
|
71
71
|
}[];
|
|
72
72
|
warnings?: readonly string[];
|
|
73
|
-
}):
|
|
73
|
+
}): React.JSX.Element;
|
|
74
74
|
export declare function WorkerView({ name, workerId, concurrency, storage, warnings, }: {
|
|
75
75
|
name: string;
|
|
76
76
|
workerId: string;
|
|
77
77
|
concurrency: number;
|
|
78
78
|
storage?: string | null;
|
|
79
79
|
warnings?: readonly string[];
|
|
80
|
-
}):
|
|
80
|
+
}): React.JSX.Element;
|
|
81
81
|
export declare function WorkerGroupView({ name, workers, storage, warnings, }: {
|
|
82
82
|
name: string;
|
|
83
83
|
workers: readonly {
|
|
@@ -86,7 +86,7 @@ export declare function WorkerGroupView({ name, workers, storage, warnings, }: {
|
|
|
86
86
|
}[];
|
|
87
87
|
storage?: string | null;
|
|
88
88
|
warnings?: readonly string[];
|
|
89
|
-
}):
|
|
89
|
+
}): React.JSX.Element;
|
|
90
90
|
export declare function RoleView({ title, name, serviceName, items, storage, warnings, }: {
|
|
91
91
|
title: string;
|
|
92
92
|
name: string;
|
|
@@ -94,7 +94,7 @@ export declare function RoleView({ title, name, serviceName, items, storage, war
|
|
|
94
94
|
items: KeyValueItem[];
|
|
95
95
|
storage?: string | null;
|
|
96
96
|
warnings?: readonly string[];
|
|
97
|
-
}):
|
|
97
|
+
}): React.JSX.Element;
|
|
98
98
|
export declare function CheckView({ projectId, storage, timeseries, broker, queues, projectValidation, ontology, warnings, }: {
|
|
99
99
|
projectId: string;
|
|
100
100
|
storage: {
|
|
@@ -124,27 +124,27 @@ export declare function CheckView({ projectId, storage, timeseries, broker, queu
|
|
|
124
124
|
warnings: number;
|
|
125
125
|
};
|
|
126
126
|
warnings: readonly string[];
|
|
127
|
-
}):
|
|
127
|
+
}): React.JSX.Element;
|
|
128
128
|
export declare function BuildView({ entry, outdir }: {
|
|
129
129
|
entry: string;
|
|
130
130
|
outdir: string;
|
|
131
|
-
}):
|
|
131
|
+
}): React.JSX.Element;
|
|
132
132
|
export declare function TypegenView({ path, objectTypes, skipped, written, }: {
|
|
133
133
|
path: string;
|
|
134
134
|
objectTypes: number;
|
|
135
135
|
skipped: boolean;
|
|
136
136
|
written: boolean;
|
|
137
|
-
}):
|
|
137
|
+
}): React.JSX.Element;
|
|
138
138
|
export declare function DbMigrateView({ projectId, status, applied, }: {
|
|
139
139
|
projectId: string;
|
|
140
140
|
status: "migrated" | "current" | "skipped";
|
|
141
141
|
/** Migration step ids this run applied, named so the output can be checked. */
|
|
142
142
|
applied?: readonly string[];
|
|
143
|
-
}):
|
|
143
|
+
}): React.JSX.Element;
|
|
144
144
|
export declare function LakeCheckView({ projectId, status }: {
|
|
145
145
|
projectId: string;
|
|
146
146
|
status: "ok";
|
|
147
|
-
}):
|
|
147
|
+
}): React.JSX.Element;
|
|
148
148
|
export interface LakeCleanupReport {
|
|
149
149
|
readonly dryRun: boolean;
|
|
150
150
|
readonly expireOlderThan: string;
|
|
@@ -156,11 +156,11 @@ export interface LakeCleanupReport {
|
|
|
156
156
|
export declare function LakeCleanupView({ projectId, report, }: {
|
|
157
157
|
projectId: string;
|
|
158
158
|
report: LakeCleanupReport;
|
|
159
|
-
}):
|
|
159
|
+
}): React.JSX.Element;
|
|
160
160
|
export declare function InitView({ name, targetDir, files, commands, }: {
|
|
161
161
|
name: string;
|
|
162
162
|
targetDir: string;
|
|
163
163
|
files: string[];
|
|
164
164
|
commands: readonly string[];
|
|
165
|
-
}):
|
|
165
|
+
}): React.JSX.Element;
|
|
166
166
|
//# sourceMappingURL=index.d.ts.map
|
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":"AACA,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,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAO,GAC9E,OAAO,CAAC,IAAI,CAAC,CASf;AAmBD,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAsF3D,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,KAAK,EACL,UAAoB,EACpB,OAAO,GACR,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,O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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.12",
|
|
4
4
|
"description": "Command-line interface for Sixb projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sixb",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"prepack": "bun run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@sixb/action-worker": "0.1.
|
|
33
|
-
"@sixb/agent-worker": "0.1.
|
|
34
|
-
"@sixb/app": "^0.1.
|
|
35
|
-
"@sixb/atlas": "^0.1.
|
|
36
|
-
"@sixb/client": "^0.1.
|
|
37
|
-
"@sixb/core": "0.1.
|
|
32
|
+
"@sixb/action-worker": "0.1.12",
|
|
33
|
+
"@sixb/agent-worker": "0.1.12",
|
|
34
|
+
"@sixb/app": "^0.1.9",
|
|
35
|
+
"@sixb/atlas": "^0.1.10",
|
|
36
|
+
"@sixb/client": "^0.1.12",
|
|
37
|
+
"@sixb/core": "0.1.12",
|
|
38
38
|
"@sixb/cli-core": "^0.1.5",
|
|
39
|
-
"@sixb/orchestrator": "0.1.
|
|
40
|
-
"@sixb/pipeline-worker": "0.1.
|
|
41
|
-
"@sixb/projection-worker": "0.1.
|
|
42
|
-
"@sixb/rules-worker": "0.1.
|
|
43
|
-
"@sixb/server": "0.1.
|
|
44
|
-
"@sixb/sync-worker": "0.1.
|
|
45
|
-
"@sixb/workflow-worker": "0.1.
|
|
39
|
+
"@sixb/orchestrator": "0.1.12",
|
|
40
|
+
"@sixb/pipeline-worker": "0.1.12",
|
|
41
|
+
"@sixb/projection-worker": "0.1.12",
|
|
42
|
+
"@sixb/rules-worker": "0.1.12",
|
|
43
|
+
"@sixb/server": "0.1.12",
|
|
44
|
+
"@sixb/sync-worker": "0.1.12",
|
|
45
|
+
"@sixb/workflow-worker": "0.1.12",
|
|
46
46
|
"create-sixb": "^0.1.3",
|
|
47
47
|
"ink": "^6.0.0",
|
|
48
48
|
"react": "^19.0.0",
|
|
@@ -11,6 +11,7 @@ import { assertShareableProviders } from "../lib/shareable-providers"
|
|
|
11
11
|
import { migrateStorageForRole } from "../lib/storage-migration"
|
|
12
12
|
import { resolveWorkerConcurrency } from "../lib/worker-concurrency"
|
|
13
13
|
import {
|
|
14
|
+
agentRuntimeRequired,
|
|
14
15
|
assertWorkerInputs,
|
|
15
16
|
createWorkerForType,
|
|
16
17
|
type QueueWorkerProcess,
|
|
@@ -65,6 +66,7 @@ export async function runWorkerGroup(options: WorkerGroupOptions = {}) {
|
|
|
65
66
|
// had taken every other worker down. And before the migration, which used to run first and
|
|
66
67
|
// leave a schema behind on a command that then refused.
|
|
67
68
|
assertWorkerInputs({
|
|
69
|
+
agentApiRequired: agentRuntimeRequired(sixb.definitions),
|
|
68
70
|
workerTypes,
|
|
69
71
|
options: { agentApiBaseUrl: options.apiPublicOrigin },
|
|
70
72
|
autoSelected: requestedTypes.length === 0,
|
package/src/commands/worker.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import { assertShareableProviders } from "../lib/shareable-providers"
|
|
|
12
12
|
import { migrateStorageForRole } from "../lib/storage-migration"
|
|
13
13
|
import { resolveSingleWorkerConcurrency } from "../lib/worker-concurrency"
|
|
14
14
|
import {
|
|
15
|
+
agentRuntimeRequired,
|
|
15
16
|
createWorkerForType,
|
|
16
17
|
type QueueWorkerProcess,
|
|
17
18
|
resolveWorkerTypeToStart,
|
|
@@ -50,9 +51,13 @@ export async function runWorker(options: WorkerOptions = {}) {
|
|
|
50
51
|
|
|
51
52
|
// Before the migration, which is the first thing here that changes something: this used to
|
|
52
53
|
// bring the schema up to date and then refuse to run.
|
|
53
|
-
const unmet = unmetWorkerRequirement(
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
const unmet = unmetWorkerRequirement(
|
|
55
|
+
workerType,
|
|
56
|
+
{
|
|
57
|
+
agentApiBaseUrl: options.apiPublicOrigin,
|
|
58
|
+
},
|
|
59
|
+
agentRuntimeRequired(sixb.definitions)
|
|
60
|
+
)
|
|
56
61
|
if (unmet) {
|
|
57
62
|
throw new SixbCliError(`[SixbCLI] \`sixb worker ${workerType}\` cannot start: it ${unmet}.`)
|
|
58
63
|
}
|
package/src/lib/runtime.ts
CHANGED
|
@@ -24,6 +24,7 @@ import { SyncWorker } from "@sixb/sync-worker"
|
|
|
24
24
|
import { WorkflowWorker } from "@sixb/workflow-worker"
|
|
25
25
|
import type { LoadedSixbHost } from "./loadSixb"
|
|
26
26
|
import type { WorkerConcurrency } from "./worker-registry"
|
|
27
|
+
import { agentRuntimeRequired, agentWorkerRequired } from "./worker-registry"
|
|
27
28
|
|
|
28
29
|
export function waitForWorkerFailure(worker: Worker | null | undefined): Promise<never> {
|
|
29
30
|
return new Promise<never>((_resolve, reject) => {
|
|
@@ -243,15 +244,11 @@ export async function startSixbRuntime(
|
|
|
243
244
|
await actionWorker.start()
|
|
244
245
|
}
|
|
245
246
|
|
|
246
|
-
if (
|
|
247
|
-
(sixb.definitions.models !== undefined ||
|
|
248
|
-
sixb.definitions.workflows
|
|
249
|
-
.list()
|
|
250
|
-
.some((workflow) => workflow.nodes.some((node) => node.type === "agent"))) &&
|
|
251
|
-
sixb.storage.agents
|
|
252
|
-
) {
|
|
247
|
+
if (agentWorkerRequired(sixb)) {
|
|
253
248
|
agentWorker = new AgentWorker(sixb, {
|
|
254
|
-
apiBaseUrl:
|
|
249
|
+
apiBaseUrl: agentRuntimeRequired(sixb.definitions)
|
|
250
|
+
? requireAgentApiBaseUrl(options.agentApiBaseUrl)
|
|
251
|
+
: undefined,
|
|
255
252
|
concurrency: options.workerConcurrency?.agent,
|
|
256
253
|
turnTimeoutMs: options.agentTurnTimeoutMs,
|
|
257
254
|
})
|
|
@@ -56,7 +56,10 @@ interface WorkerFactory {
|
|
|
56
56
|
* A malformed input throws instead of answering: it is one bad value rather than one
|
|
57
57
|
* unsatisfied worker, and the list of workers it took down would say nothing about it.
|
|
58
58
|
*/
|
|
59
|
-
readonly unmetRequirement?: (
|
|
59
|
+
readonly unmetRequirement?: (
|
|
60
|
+
options: WorkerCreationOptions,
|
|
61
|
+
agentApiRequired: boolean
|
|
62
|
+
) => string | null
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
const AGENT_ORIGIN_REQUIRED =
|
|
@@ -73,12 +76,14 @@ const workerFactories: Record<WorkerType, WorkerFactory> = {
|
|
|
73
76
|
agent: {
|
|
74
77
|
create: (sixb, options) =>
|
|
75
78
|
new AgentWorker(sixb, {
|
|
76
|
-
apiBaseUrl:
|
|
79
|
+
apiBaseUrl: agentRuntimeRequired(sixb.definitions)
|
|
80
|
+
? resolveAgentApiBaseUrl(options.agentApiBaseUrl)
|
|
81
|
+
: undefined,
|
|
77
82
|
concurrency: options.workerConcurrency?.agent,
|
|
78
83
|
turnTimeoutMs: options.agentTurnTimeoutMs,
|
|
79
84
|
}),
|
|
80
|
-
unmetRequirement: (options) =>
|
|
81
|
-
agentApiBaseUrl(options.agentApiBaseUrl) ? null : AGENT_ORIGIN_REQUIRED,
|
|
85
|
+
unmetRequirement: (options, agentApiRequired) =>
|
|
86
|
+
!agentApiRequired || agentApiBaseUrl(options.agentApiBaseUrl) ? null : AGENT_ORIGIN_REQUIRED,
|
|
82
87
|
},
|
|
83
88
|
pipeline: {
|
|
84
89
|
create: (sixb, options) =>
|
|
@@ -127,14 +132,16 @@ export function resolveWorkerTypeToStart(requestedWorker?: string): WorkerType {
|
|
|
127
132
|
*/
|
|
128
133
|
export function unmetWorkerRequirement(
|
|
129
134
|
workerType: string,
|
|
130
|
-
options: WorkerCreationOptions
|
|
135
|
+
options: WorkerCreationOptions,
|
|
136
|
+
agentApiRequired: boolean
|
|
131
137
|
): string | null {
|
|
132
138
|
return isWorkerType(workerType)
|
|
133
|
-
? (workerFactories[workerType].unmetRequirement?.(options) ?? null)
|
|
139
|
+
? (workerFactories[workerType].unmetRequirement?.(options, agentApiRequired) ?? null)
|
|
134
140
|
: null
|
|
135
141
|
}
|
|
136
142
|
|
|
137
143
|
export interface WorkerGroupInputs {
|
|
144
|
+
readonly agentApiRequired: boolean
|
|
138
145
|
readonly workerTypes: readonly string[]
|
|
139
146
|
readonly options: WorkerCreationOptions
|
|
140
147
|
/**
|
|
@@ -154,7 +161,7 @@ export function assertWorkerInputs(input: WorkerGroupInputs): void {
|
|
|
154
161
|
const unmet = input.workerTypes
|
|
155
162
|
.map((workerType) => ({
|
|
156
163
|
workerType,
|
|
157
|
-
reason: unmetWorkerRequirement(workerType, input.options),
|
|
164
|
+
reason: unmetWorkerRequirement(workerType, input.options, input.agentApiRequired),
|
|
158
165
|
}))
|
|
159
166
|
.filter((entry): entry is { workerType: string; reason: string } => entry.reason !== null)
|
|
160
167
|
|
|
@@ -200,13 +207,7 @@ export function resolveRegisteredWorkerTypes(sixb: LoadedSixbHost): readonly Wor
|
|
|
200
207
|
workerTypes.push("action")
|
|
201
208
|
}
|
|
202
209
|
|
|
203
|
-
if (
|
|
204
|
-
(sixb.definitions.models !== undefined ||
|
|
205
|
-
sixb.definitions.workflows
|
|
206
|
-
.list()
|
|
207
|
-
.some((workflow) => workflow.nodes.some((node) => node.type === "agent"))) &&
|
|
208
|
-
sixb.storage.agents
|
|
209
|
-
) {
|
|
210
|
+
if (agentWorkerRequired(sixb)) {
|
|
210
211
|
workerTypes.push("agent")
|
|
211
212
|
}
|
|
212
213
|
|
|
@@ -236,3 +237,20 @@ function resolveAgentApiBaseUrl(value: string | undefined): string {
|
|
|
236
237
|
}
|
|
237
238
|
return apiBaseUrl
|
|
238
239
|
}
|
|
240
|
+
|
|
241
|
+
/** Explicit model calls can enqueue accounting recovery without a model catalog. */
|
|
242
|
+
export function agentWorkerRequired(sixb: LoadedSixbHost): boolean {
|
|
243
|
+
const { storage } = sixb
|
|
244
|
+
const canRecoverAccounting = Boolean(storage.aiUsage && storage.aiCosts && storage.aiLimits)
|
|
245
|
+
return canRecoverAccounting || (agentRuntimeRequired(sixb.definitions) && Boolean(storage.agents))
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** Only agent execution needs a sandbox and an API origin; accounting recovery does not. */
|
|
249
|
+
export function agentRuntimeRequired(definitions: LoadedSixbHost["definitions"]): boolean {
|
|
250
|
+
return (
|
|
251
|
+
definitions.models?.language !== undefined ||
|
|
252
|
+
definitions.workflows
|
|
253
|
+
.list()
|
|
254
|
+
.some((workflow) => workflow.nodes.some((node) => node.type === "agent"))
|
|
255
|
+
)
|
|
256
|
+
}
|