@aiwg/cli 2026.11.1 → 2026.11.2
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/agentic/code/addons/aiwg-hooks/canonical/aiwg-prompt-discovery.yaml +9 -0
- package/agentic/code/addons/aiwg-hooks/hooks/aiwg-prompt-discovery.cjs +136 -0
- package/agentic/code/providers/model-capabilities.v1.json +27 -23
- package/agentic/code/providers/model-catalog.v1.json +3 -3
- package/dist/src/artifacts/cli.js +10 -11
- package/dist/src/artifacts/discover-cli-help.js +25 -0
- package/dist/src/artifacts/discover-session-facets.js +2 -1
- package/dist/src/artifacts/fortemi-core-prebuilt-freshness.js +28 -0
- package/dist/src/artifacts/fortemi-core-sync.js +3 -0
- package/dist/src/artifacts/framework-capabilities.js +4 -0
- package/dist/src/artifacts/framework-source-digest.js +1 -1
- package/dist/src/artifacts/index-builder.js +10 -10
- package/dist/src/artifacts/index-dependencies.js +72 -0
- package/dist/src/artifacts/query-engine-discover-output.js +13 -5
- package/dist/src/artifacts/query-engine-discover.js +49 -21
- package/dist/src/artifacts/query-engine-entries.js +56 -2
- package/dist/src/artifacts/query-engine-options.js +14 -1
- package/dist/src/artifacts/query-engine-scoring.js +8 -4
- package/dist/src/artifacts/query-engine-show-card.js +2 -0
- package/dist/src/artifacts/query-engine-show-load.js +1 -1
- package/dist/src/artifacts/query-engine-show.js +3 -1
- package/dist/src/artifacts/query-engine-templates.js +33 -0
- package/dist/src/artifacts/query-engine-verbose.js +25 -0
- package/dist/src/artifacts/relations-builder.js +49 -4
- package/dist/src/artifacts/relations.js +9 -0
- package/dist/src/artifacts/template-references.js +42 -0
- package/dist/src/artifacts/types.js +1 -1
- package/dist/src/cli/handlers/bundle-reconciliation.js +7 -3
- package/dist/src/cli/handlers/checkpoint-handoff.js +48 -0
- package/dist/src/cli/handlers/checkpoint-record.js +20 -0
- package/dist/src/cli/handlers/checkpoint.js +50 -17
- package/dist/src/cli/handlers/decision.js +1 -1
- package/dist/src/cli/handlers/doctor-args.js +3 -1
- package/dist/src/cli/handlers/doctor-help.js +2 -1
- package/dist/src/cli/handlers/help.js +1 -1
- package/dist/src/cli/handlers/refresh-bundles.js +2 -1
- package/dist/src/cli/handlers/refresh-managed-deployment.js +196 -0
- package/dist/src/cli/handlers/refresh.js +10 -2
- package/dist/src/cli/handlers/subcommands-discovery.js +8 -1
- package/dist/src/cli/handlers/use.js +10 -3
- package/dist/src/cli/services/deployment-verification.js +11 -7
- package/dist/src/config/worker-write.js +4 -10
- package/dist/src/decision/ledger.js +15 -15
- package/dist/src/decision/offload.js +6 -7
- package/dist/src/delivery/pr.js +2 -0
- package/dist/src/delivery/template-sections.js +56 -0
- package/dist/src/extensions/claude-hooks-installer.js +61 -53
- package/dist/src/extensions/managed-hook-script-state.js +48 -0
- package/dist/src/extensions/muse-managed-hooks.js +49 -0
- package/dist/src/issues/cli.js +3 -0
- package/dist/src/issues/external-cli.js +4 -1
- package/dist/src/issues/live.js +9 -2
- package/dist/src/issues/local.js +5 -1
- package/dist/src/issues/tracker-policy.js +11 -1
- package/dist/src/mcp/json-document.d.mts +2 -0
- package/dist/src/models/model-capabilities.v1.json +27 -23
- package/dist/src/models/model-catalog.v1.json +3 -3
- package/dist/src/models/provider-policy.js +8 -0
- package/dist/src/models/worker-health-readiness.js +20 -4
- package/dist/src/models/worker-health-snapshot.js +29 -0
- package/dist/src/models/worker-installation.d.mts +5 -1
- package/dist/src/models/worker-installation.mjs +11 -5
- package/dist/src/models/worker-qualification-policy.js +54 -0
- package/dist/src/providers/skill-ownership.d.mts +1 -0
- package/dist/src/providers/transformation-receipt-integration.js +4 -2
- package/dist/src/providers/transformation-receipt.js +4 -2
- package/dist/src/serve/worker-invocation.js +4 -2
- package/dist/src/smiths/context-pipeline/workspace-audit.js +34 -17
- package/dist/src/smiths/context-pipeline/workspace-context-shared.js +12 -6
- package/dist/src/smiths/context-pipeline/workspace-doctor.js +44 -4
- package/dist/src/smiths/context-pipeline/workspace-document.js +5 -2
- package/dist/src/smiths/context-pipeline/workspace-migration.js +2 -1
- package/dist/src/smiths/hook-bridge/codex-translator.js +150 -94
- package/dist/src/smiths/hook-bridge/codex-trust.js +50 -0
- package/dist/src/smiths/hook-bridge/factory-hook-config.js +132 -0
- package/dist/src/smiths/hook-bridge/factory-translator.js +88 -33
- package/dist/src/smiths/hook-bridge/index.js +3 -3
- package/dist/src/smiths/hook-bridge/loader.js +10 -2
- package/dist/src/smiths/hook-bridge/prompt-discovery-gaps.js +0 -1
- package/dist/src/storage/workspace-permissions-health.js +64 -0
- package/dist/src/storage/workspace-permissions.js +51 -0
- package/package.json +6 -1
- package/tools/agents/providers/base-files.mjs +2 -1
- package/tools/agents/providers/base-flat-artifacts.mjs +6 -3
- package/tools/agents/providers/base-models-platforms.mjs +3 -3
- package/tools/agents/providers/base-skill-copy.mjs +2 -0
- package/tools/agents/providers/bound-rules-pointer.mjs +21 -0
- package/tools/agents/providers/claude-post-deploy.mjs +9 -5
- package/tools/agents/providers/codex-post-deploy.mjs +10 -0
- package/tools/agents/providers/factory-hooks.mjs +43 -0
- package/tools/agents/providers/factory.mjs +4 -91
- package/tools/agents/providers/muse-hooks.mjs +4 -43
- package/tools/agents/providers/muse-prompt-discovery.mjs +3 -7
- package/tools/agents/providers/packaged-codex-agents.mjs +48 -0
- package/tools/agents/providers/rule-delivery-surface.mjs +4 -4
- package/tools/agents/providers/rule-presentation.mjs +6 -5
- package/tools/agents/providers/rule-projection.mjs +10 -2
- package/tools/agents/providers/rule-startup.mjs +8 -1
- package/tools/cli/decision-offload-report.mjs +7 -2
- package/tools/plugin/issue-template-copies.mjs +24 -0
- package/tools/plugin/package-plugins.mjs +11 -3
- package/tools/ralph-external/lib/factory-adapter.mjs +7 -8
- package/tools/ralph-external/lib/worker-artifacts.mjs +4 -2
- package/tools/ralph-external/lib/worker-final.mjs +43 -8
- package/tools/ralph-external/lib/worker-launch-cli.mjs +10 -1
- package/tools/ralph-external/lib/worker-prompt.mjs +35 -0
- package/tools/ralph-external/lib/worker-run-directory-refusal.mjs +8 -0
- package/tools/ralph-external/session-launcher.mjs +10 -7
|
@@ -5,13 +5,16 @@ import { sensitiveInputOptions } from '../auth/sensitive-input.js';
|
|
|
5
5
|
import { deliveryTracker } from '../delivery/tracker.js';
|
|
6
6
|
export async function externalIssues(args, cwd, composition) {
|
|
7
7
|
const [operation, number] = args.positional;
|
|
8
|
-
if (!['create', 'new', 'comment', 'close'].includes(operation) || args.flags.get('provider') === 'local')
|
|
8
|
+
if (!['create', 'new', 'comment', 'close', 'list', 'ls'].includes(operation) || args.flags.get('provider') === 'local')
|
|
9
9
|
return false;
|
|
10
10
|
const config = await readAiwgConfig(cwd);
|
|
11
11
|
if (!config || config.remotes?.issue_provider === 'local' || config.remotes?.issue_tracker === 'local')
|
|
12
12
|
return false;
|
|
13
13
|
if (!config.remotes?.issue_tracker && !['gitea', 'github'].includes(String(config.remotes?.issue_provider)))
|
|
14
14
|
return false;
|
|
15
|
+
if (operation === 'list' || operation === 'ls') {
|
|
16
|
+
throw new Error('Cannot query the configured external tracker with aiwg issues list. Use its tracker tools for duplicate searches. For local storage, run aiwg issues init, then aiwg issues list --provider local.');
|
|
17
|
+
}
|
|
15
18
|
const value = (key) => typeof args.flags.get(key) === 'string' ? args.flags.get(key) : undefined;
|
|
16
19
|
if (value('provider') && value('provider') !== config.remotes?.issue_provider)
|
|
17
20
|
throw new Error('--provider must match the configured tracker');
|
package/dist/src/issues/live.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveSensitiveInput } from '../auth/sensitive-input.js';
|
|
2
|
-
import { checkTrackerActor } from './tracker-policy.js';
|
|
2
|
+
import { checkTrackerActor, trackerAuthenticationHint } from './tracker-policy.js';
|
|
3
3
|
import { isInteractive } from '../cli/env.js';
|
|
4
4
|
export class LiveIssueClient {
|
|
5
5
|
options;
|
|
@@ -78,6 +78,7 @@ export class LiveIssueClient {
|
|
|
78
78
|
headers['Content-Type'] = 'application/json';
|
|
79
79
|
if (this.options.token)
|
|
80
80
|
headers.Authorization = `Bearer ${this.options.token}`;
|
|
81
|
+
let authenticationFailed = false;
|
|
81
82
|
try {
|
|
82
83
|
const response = await this.fetchFn(`${this.baseUrl}${path}`, {
|
|
83
84
|
method,
|
|
@@ -87,6 +88,7 @@ export class LiveIssueClient {
|
|
|
87
88
|
});
|
|
88
89
|
if (!response.ok) {
|
|
89
90
|
const text = await response.text().catch(() => '');
|
|
91
|
+
authenticationFailed = response.status === 401;
|
|
90
92
|
throw new Error(`${this.options.provider} issue API ${method} ${path} failed: ${response.status}${text ? ` ${redactSecrets(text, this.options.token)}` : ''}`);
|
|
91
93
|
}
|
|
92
94
|
// Native HTTP responses may be empty (for example Gitea merge success).
|
|
@@ -101,7 +103,12 @@ export class LiveIssueClient {
|
|
|
101
103
|
return JSON.parse(JSON.stringify(result).split(encodedToken).join('[REDACTED]'));
|
|
102
104
|
}
|
|
103
105
|
catch (error) {
|
|
104
|
-
|
|
106
|
+
// Append trusted setup instructions after scrubbing server text: the
|
|
107
|
+
// generic redactor also treats the command words "secret set" as data.
|
|
108
|
+
const hint = authenticationFailed && this.options.actor?.login
|
|
109
|
+
? ` ${trackerAuthenticationHint(this.options.provider, this.options.actor)}` : '';
|
|
110
|
+
const safeHint = this.options.token ? hint.split(this.options.token).join('[REDACTED]') : hint;
|
|
111
|
+
throw new Error(redactSecrets(error instanceof Error ? error.message : 'Live issue request failed', this.options.token) + safeHint);
|
|
105
112
|
}
|
|
106
113
|
}
|
|
107
114
|
}
|
package/dist/src/issues/local.js
CHANGED
|
@@ -89,6 +89,9 @@ export class LocalIssueProviderCore {
|
|
|
89
89
|
this.root = resolve(root);
|
|
90
90
|
this.lockManager = new LocalIssueLockManager(this.root);
|
|
91
91
|
}
|
|
92
|
+
async requireInitialized() {
|
|
93
|
+
await this.readConfig();
|
|
94
|
+
}
|
|
92
95
|
async init(options = {}) {
|
|
93
96
|
await this.ensureLayout();
|
|
94
97
|
const existing = await this.readConfigIfExists();
|
|
@@ -233,6 +236,7 @@ export class LocalIssueProviderCore {
|
|
|
233
236
|
};
|
|
234
237
|
}
|
|
235
238
|
async listIssues(options = {}) {
|
|
239
|
+
await this.requireInitialized();
|
|
236
240
|
const index = await this.readIndexOrRebuild();
|
|
237
241
|
const offset = options.cursor ? Number.parseInt(options.cursor, 10) : 0;
|
|
238
242
|
const limit = options.limit ?? 50;
|
|
@@ -418,7 +422,7 @@ export class LocalIssueProviderCore {
|
|
|
418
422
|
async readConfig() {
|
|
419
423
|
const config = await this.readConfigIfExists();
|
|
420
424
|
if (!config)
|
|
421
|
-
throw new LocalIssueProviderError('
|
|
425
|
+
throw new LocalIssueProviderError('Local issue system is not initialized. Run aiwg issues init --prefix <PROJECT> to initialize local storage; use the target tracker tools for external issues.');
|
|
422
426
|
return config;
|
|
423
427
|
}
|
|
424
428
|
async readIndexOrRebuild() {
|
|
@@ -3,7 +3,17 @@ export async function trackerToken(provider, actor, source = {}, dependencies =
|
|
|
3
3
|
if (actor?.credential && Object.keys(source).some(key => key !== 'prefix')) {
|
|
4
4
|
throw new Error('Configured tracker_actor.credential cannot be overridden by token flags');
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
try {
|
|
7
|
+
return await resolveLiveIssueToken(provider, actor?.credential ?? source, dependencies);
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
if (!actor?.login)
|
|
11
|
+
throw error;
|
|
12
|
+
throw new Error(`Cannot load tracker token. ${trackerAuthenticationHint(provider, actor)}`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export function trackerAuthenticationHint(provider, actor) {
|
|
16
|
+
return `Authentication required for configured tracker_actor.login ${JSON.stringify(actor.login)}. Set up a ${provider} token belonging to this actor with aiwg auth secret set <name> --value-stdin, then set remotes.tracker_actor.credential to {"store":"<name>"} (or {"env":"TOKEN_ENV"} with that variable supplied). If a credential reference is already configured, refresh that source.`;
|
|
7
17
|
}
|
|
8
18
|
export function checkTrackerActor(actor, login) {
|
|
9
19
|
if (typeof login !== 'string' || !login)
|
|
@@ -1079,7 +1079,7 @@
|
|
|
1079
1079
|
"agent": "native",
|
|
1080
1080
|
"skill": "informational",
|
|
1081
1081
|
"globalChild": "native",
|
|
1082
|
-
"identifierSyntax": "Factory model ID or
|
|
1082
|
+
"identifierSyntax": "Factory built-in model ID or custom BYOK model selector",
|
|
1083
1083
|
"effortValues": [
|
|
1084
1084
|
"low",
|
|
1085
1085
|
"medium",
|
|
@@ -1097,7 +1097,7 @@
|
|
|
1097
1097
|
"id": "factory-direct",
|
|
1098
1098
|
"provider": "factory",
|
|
1099
1099
|
"adapterVersion": "1",
|
|
1100
|
-
"supportedVersions": "0.
|
|
1100
|
+
"supportedVersions": "1.0.0",
|
|
1101
1101
|
"runtimeDriver": "installed:factory",
|
|
1102
1102
|
"catalogAdapter": {
|
|
1103
1103
|
"kind": "file",
|
|
@@ -1122,7 +1122,7 @@
|
|
|
1122
1122
|
],
|
|
1123
1123
|
"stdin": "brief-text",
|
|
1124
1124
|
"cwd": "${workspace}",
|
|
1125
|
-
"envAllowlist": ["FACTORY_API_KEY", "HOME", "PATH"],
|
|
1125
|
+
"envAllowlist": ["FACTORY_API_KEY", "HOME", "OPENROUTER_API_KEY", "PATH"],
|
|
1126
1126
|
"versionArgv": [
|
|
1127
1127
|
"--version"
|
|
1128
1128
|
],
|
|
@@ -1147,78 +1147,82 @@
|
|
|
1147
1147
|
"invocationProfiles": {
|
|
1148
1148
|
"direct-shell": {
|
|
1149
1149
|
"transport": "shell",
|
|
1150
|
-
"supportedVersions": "0.
|
|
1150
|
+
"supportedVersions": "1.0.0",
|
|
1151
1151
|
"controls": {
|
|
1152
1152
|
"model": {
|
|
1153
1153
|
"support": "unqualified",
|
|
1154
|
-
"mapping": "[-m/--model MODEL]; exact catalog model ID, never the CLI default
|
|
1155
|
-
"evidence": "H: droid-cli 0.
|
|
1154
|
+
"mapping": "[-m/--model MODEL]; exact catalog model ID, never the CLI default or a generic alias",
|
|
1155
|
+
"evidence": "H: droid-cli 1.0.0 exec --help documents -m/--model <id>; unqualified until live model-pin evidence"
|
|
1156
1156
|
},
|
|
1157
1157
|
"effort": {
|
|
1158
1158
|
"support": "unqualified",
|
|
1159
1159
|
"mapping": "[-r/--reasoning-effort LEVEL]; valid levels are model-dependent (exec --help 'Model details'); never the per-model default",
|
|
1160
|
-
"evidence": "H: droid-cli 0.
|
|
1160
|
+
"evidence": "H: droid-cli 1.0.0 exec --help documents -r/--reasoning-effort <level> (defaults per model); unqualified until live evidence"
|
|
1161
1161
|
},
|
|
1162
1162
|
"sandbox": {
|
|
1163
1163
|
"support": "unqualified",
|
|
1164
1164
|
"mapping": "workspace-write -> [--auto low]; read-only -> no --auto flag (the CLI's own documented read-only default); --skip-permissions-unsafe and the medium/high --auto tiers are out of this contract's scope and are never emitted",
|
|
1165
|
-
"evidence": "H: droid-cli 0.
|
|
1165
|
+
"evidence": "H: droid-cli 1.0.0 exec --help documents --auto <level> (low|medium|high), its 'Autonomy Levels' default read-only mode, and --skip-permissions-unsafe ('Bypass all checks - DANGEROUS!'); unqualified until live evidence"
|
|
1166
1166
|
},
|
|
1167
1167
|
"approval": {
|
|
1168
1168
|
"support": "unqualified",
|
|
1169
1169
|
"mapping": "unavailable as a separate flag: exec is non-interactive by construction and --auto (the sandbox control) is the only permission gate",
|
|
1170
|
-
"evidence": "H: droid-cli 0.238.0 exec --help documents exec as 'Run non-interactively (for scripts/automation)' with no approval-prompt flag; unqualified until live evidence"
|
|
1170
|
+
"evidence": "H: prior droid-cli 0.238.0 exec --help documents exec as 'Run non-interactively (for scripts/automation)' with no approval-prompt flag; not reverified on 1.0.0, unqualified until live evidence"
|
|
1171
1171
|
},
|
|
1172
1172
|
"workdir": {
|
|
1173
1173
|
"support": "unqualified",
|
|
1174
1174
|
"mapping": "[--cwd W] conductor working root, plus the conductor process cwd",
|
|
1175
|
-
"evidence": "H: droid-cli 0.
|
|
1175
|
+
"evidence": "H: droid-cli 1.0.0 exec --help documents --cwd <path>; unqualified until live evidence"
|
|
1176
1176
|
},
|
|
1177
1177
|
"finalOutput": {
|
|
1178
1178
|
"support": "unqualified",
|
|
1179
1179
|
"mapping": "unavailable as a file target: no -o/output-file flag is documented for exec (-o/--output-format selects stream shape, not a destination); the final is the last type:\"result\" line of the captured --output-format stream-json stdout stream",
|
|
1180
|
-
"evidence": "H: droid-cli 0.
|
|
1180
|
+
"evidence": "H: droid-cli 1.0.0 exec --help documents -o/--output-format <text|json|stream-json|stream-jsonrpc|acp> with no file-path argument; D: https://docs.factory.com/droid-exec/overview documents the terminal result object shape; unqualified until live evidence"
|
|
1181
1181
|
},
|
|
1182
1182
|
"stdin": {
|
|
1183
1183
|
"support": "unqualified",
|
|
1184
1184
|
"mapping": "brief-text: omitting the prompt argument makes exec read the prompt from stdin to EOF; brief text never enters argv, rendered commands or serialized plans",
|
|
1185
|
-
"evidence": "H: droid-cli 0.
|
|
1185
|
+
"evidence": "H: titan eval on droid-cli 1.0.0 verified stdin ingestion: the brief was echoed as the first stream-json message. Live result pending: blocked by 402 No active subscription; no successful inference recorded"
|
|
1186
1186
|
},
|
|
1187
1187
|
"structuredOutput": {
|
|
1188
1188
|
"support": "unqualified",
|
|
1189
1189
|
"mapping": "unavailable: no --output-schema-equivalent flag is documented for exec",
|
|
1190
|
-
"evidence": "H: droid-cli 0.238.0 exec --help advertises no output-schema flag; unqualified until live evidence"
|
|
1190
|
+
"evidence": "H: prior droid-cli 0.238.0 exec --help advertises no output-schema flag; not reverified on 1.0.0, unqualified until live evidence"
|
|
1191
1191
|
},
|
|
1192
1192
|
"stepCap": {
|
|
1193
1193
|
"support": "unqualified",
|
|
1194
|
-
"mapping": "unavailable: no step or turn cap flag is evidenced on 0.
|
|
1195
|
-
"evidence": "H: droid-cli 0.238.0 exec --help advertises no step-cap flag; unknown controls block tasks requiring them"
|
|
1194
|
+
"mapping": "unavailable: no step or turn cap flag is evidenced on 1.0.0; deadline and output-byte bounds come from the invoking shell",
|
|
1195
|
+
"evidence": "H: prior droid-cli 0.238.0 exec --help advertises no step-cap flag; unknown controls block tasks requiring them"
|
|
1196
1196
|
},
|
|
1197
1197
|
"trust": {
|
|
1198
1198
|
"support": "unqualified",
|
|
1199
|
-
"mapping": "unknown: workspace-trust behaviour is not evidenced for non-interactive exec on 0.
|
|
1200
|
-
"evidence": "H: droid-cli 0.238.0 exec --help documents no trust-prompt flag for exec; unqualified until live evidence"
|
|
1199
|
+
"mapping": "unknown: workspace-trust behaviour is not evidenced for non-interactive exec on 1.0.0",
|
|
1200
|
+
"evidence": "H: prior droid-cli 0.238.0 exec --help documents no trust-prompt flag for exec; not reverified on 1.0.0, unqualified until live evidence"
|
|
1201
1201
|
},
|
|
1202
1202
|
"children": {
|
|
1203
1203
|
"support": "unqualified",
|
|
1204
1204
|
"mapping": "controllable: --mission spawns worker sessions via factoryd (never emitted by this profile, which keeps every run single-agent)",
|
|
1205
|
-
"evidence": "H: droid-cli 0.238.0 exec --help documents --mission/--worker-model/--validator-model as mission-mode only; the direct profile never emits them; unqualified until live evidence"
|
|
1205
|
+
"evidence": "H: prior droid-cli 0.238.0 exec --help documents --mission/--worker-model/--validator-model as mission-mode only; the direct profile never emits them; not reverified on 1.0.0, unqualified until live evidence"
|
|
1206
1206
|
},
|
|
1207
1207
|
"fallback": {
|
|
1208
1208
|
"support": "unqualified",
|
|
1209
1209
|
"mapping": "unavailable: no non-mission fallback-model flag is documented for exec (--spec-model/--worker-model/--validator-model are mission-mode only)",
|
|
1210
|
-
"evidence": "H: droid-cli 0.238.0 exec --help scopes --spec-model/--worker-model/--validator-model to --mission/--use-spec; unknown controls block tasks requiring them"
|
|
1210
|
+
"evidence": "H: prior droid-cli 0.238.0 exec --help scopes --spec-model/--worker-model/--validator-model to --mission/--use-spec; unknown controls block tasks requiring them"
|
|
1211
1211
|
}
|
|
1212
1212
|
},
|
|
1213
|
-
"envAllowlist": ["FACTORY_API_KEY", "HOME", "PATH"],
|
|
1213
|
+
"envAllowlist": ["FACTORY_API_KEY", "HOME", "OPENROUTER_API_KEY", "PATH"],
|
|
1214
1214
|
"pitfalls": [
|
|
1215
1215
|
"Documentation/help and synthetic observations are not authenticated live qualification.",
|
|
1216
|
+
"Titan 1.0.0 eval (2026-11-06, BYOK custom model via OpenRouter): the brief on stdin returns the exact smoke reply in read-only mode and with --auto low; -m selects the custom model and the stream-json system event reports it. Catalog evidence stays H; live qualification is recorded only by aiwg doctor --probe-workers --qualify.",
|
|
1217
|
+
"-r/--reasoning-effort is accepted but ignored for BYOK custom models: the system event reports reasoning_effort none, so effort is not enforceable on them.",
|
|
1218
|
+
"droid relabels custom model IDs by display name: custom:<name>-2 is reported back as custom:<name>-0. Match the model by name, not by the numeric suffix.",
|
|
1219
|
+
"Under --auto low a command above the tier ends the run with exit 1 and the error Exec ended early: insufficient permission to proceed; nothing runs.",
|
|
1216
1220
|
"Unknown model, effort, permission or required step mappings block dispatch.",
|
|
1217
1221
|
"Native MCP/client, MSP/ACP, gateway and conversation capabilities do not establish worker authority.",
|
|
1218
1222
|
"--skip-permissions-unsafe is Ralph-loop legacy and never part of the direct profile.",
|
|
1219
1223
|
"The stream-json/json event vocabulary (assistant/user/tool_call/tool_result/hook/error/result) is doc-sourced (docs.factory.com), not help-verified; it never promotes qualification status beyond unqualified.",
|
|
1220
1224
|
"There is no -o/output-file flag on exec: the final is read from the captured stdout stream, never a separate file.",
|
|
1221
|
-
"FACTORY_API_KEY
|
|
1225
|
+
"Auth is the Factory account (FACTORY_API_KEY or keyring) or a BYOK customModels entry in ~/.factory/settings.json whose apiKey is an env reference; the launch env must carry that variable (OPENROUTER_API_KEY is allowlisted; a BYOK key under another name blocks with Custom model apiKey references the environment variable ... which is not set). HOME locates ~/.factory/settings.json."
|
|
1222
1226
|
],
|
|
1223
1227
|
"health": {
|
|
1224
1228
|
"version": 1,
|
|
@@ -1244,8 +1248,8 @@
|
|
|
1244
1248
|
{
|
|
1245
1249
|
"kind": "help",
|
|
1246
1250
|
"ref": "tools/ralph-external/lib/factory-adapter.mjs",
|
|
1247
|
-
"observedAt": "2026-
|
|
1248
|
-
"cliVersion": "0.
|
|
1251
|
+
"observedAt": "2026-11-06T00:00:00Z",
|
|
1252
|
+
"cliVersion": "1.0.0"
|
|
1249
1253
|
},
|
|
1250
1254
|
{
|
|
1251
1255
|
"kind": "documentation",
|
|
@@ -162,17 +162,17 @@
|
|
|
162
162
|
"factory": {
|
|
163
163
|
"roles": {
|
|
164
164
|
"reasoning": {
|
|
165
|
-
"id": "
|
|
165
|
+
"id": "claude-opus-5",
|
|
166
166
|
"status": "active",
|
|
167
167
|
"observed": false
|
|
168
168
|
},
|
|
169
169
|
"coding": {
|
|
170
|
-
"id": "
|
|
170
|
+
"id": "claude-sonnet-5",
|
|
171
171
|
"status": "active",
|
|
172
172
|
"observed": false
|
|
173
173
|
},
|
|
174
174
|
"efficiency": {
|
|
175
|
-
"id": "
|
|
175
|
+
"id": "claude-haiku-4-5-20251001",
|
|
176
176
|
"status": "active",
|
|
177
177
|
"observed": false
|
|
178
178
|
}
|
|
@@ -146,6 +146,14 @@ export class WorkerPolicyError extends Error {
|
|
|
146
146
|
this.name = 'WorkerPolicyError';
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
+
/** Only the trusted installation loader supplies this public policy-drift summary. */
|
|
150
|
+
export class WorkerQualificationPolicyError extends WorkerPolicyError {
|
|
151
|
+
pointer;
|
|
152
|
+
constructor(diagnostic, rejections) {
|
|
153
|
+
super('OG_ADAPTER_UNQUALIFIED', diagnostic.message, { rejections });
|
|
154
|
+
this.pointer = diagnostic.pointer;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
149
157
|
export class WorkerRoleEffortError extends WorkerPolicyError {
|
|
150
158
|
pointer;
|
|
151
159
|
constructor(role) {
|
|
@@ -138,7 +138,20 @@ export function diagnoseWorkerHealthReadiness(snapshot, request, paths = {}) {
|
|
|
138
138
|
}
|
|
139
139
|
const sharedDiagnostics = new Map();
|
|
140
140
|
for (const role of roles) {
|
|
141
|
-
const
|
|
141
|
+
const roleRequest = { now: request.now, context: request.context, role,
|
|
142
|
+
taskClass: Object.entries(snapshot.models.defaults.workerSelection?.taskClasses ?? {})
|
|
143
|
+
.find(([, taskRole]) => taskRole === role)?.[0] };
|
|
144
|
+
let plan = resolveWorkerPlan(snapshot, roleRequest);
|
|
145
|
+
let pendingAuthorization = false;
|
|
146
|
+
if (!plan.selected && plan.exclusions.some(item => item.diagnostics.some(diagnostic => diagnostic.code === 'OG_MODEL_UNAPPROVED' && diagnostic.pointer === '/request/authority'))) {
|
|
147
|
+
// Counterfactual offline check only: never return a launch plan or grant authority.
|
|
148
|
+
const authorized = resolveWorkerPlan(snapshot, { ...roleRequest,
|
|
149
|
+
authority: { premiumAuthorized: true, maxAutoTier: 3 } });
|
|
150
|
+
if (authorized.selected) {
|
|
151
|
+
plan = authorized;
|
|
152
|
+
pendingAuthorization = true;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
142
155
|
const isRequired = required.has(role);
|
|
143
156
|
const diagnostics = [
|
|
144
157
|
...plan.diagnostics.map(diagnostic => ({ diagnostic, members: membersFor(diagnostic.pointer, role) })),
|
|
@@ -204,10 +217,13 @@ export function diagnoseWorkerHealthReadiness(snapshot, request, paths = {}) {
|
|
|
204
217
|
message: 'Profile has degraded or unobserved health coverage; progress and stop evidence may be unavailable.',
|
|
205
218
|
nextAction: 'qualify-health-signals' }, [`${tuple.group}/${tuple.member}`]);
|
|
206
219
|
}
|
|
207
|
-
add({ code: '
|
|
220
|
+
add({ code: pendingAuthorization ? 'WORKER_ROLE_PENDING_AUTHORIZATION' : 'WORKER_ROLE_ELIGIBLE',
|
|
221
|
+
status: pendingAuthorization ? 'warn' : 'ok', role,
|
|
208
222
|
pointer: `/defaults/workerSelection/roleGuidance/${role}`,
|
|
209
|
-
message:
|
|
210
|
-
|
|
223
|
+
message: pendingAuthorization
|
|
224
|
+
? 'Role is ready pending authorization; --authorize-premium requires explicit operator confirmation before resolving a launch.'
|
|
225
|
+
: 'Policy route is eligible; launch still requires current installation and task qualification.',
|
|
226
|
+
nextAction: pendingAuthorization ? 'confirm-premium-with-operator' : 'resolve-current-task' }, [`${tuple.group}/${tuple.member}`]);
|
|
211
227
|
}
|
|
212
228
|
catch {
|
|
213
229
|
if (isRequired)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Project signed historical approval inputs for offline health checks without granting launch authority.
|
|
2
|
+
import { inspectRecordedWorkerQualifications } from './worker-installation.mjs';
|
|
3
|
+
export async function recordedWorkerHealthSnapshot(snapshot, cwd) {
|
|
4
|
+
const parallelism = snapshot.config.parallelism;
|
|
5
|
+
const policy = snapshot.models.defaults.workerSelection;
|
|
6
|
+
if (!parallelism || !policy)
|
|
7
|
+
return snapshot;
|
|
8
|
+
const records = await inspectRecordedWorkerQualifications({ cwd, policy, parallelism, includeInputs: true })
|
|
9
|
+
.catch(() => []);
|
|
10
|
+
const result = structuredClone(snapshot);
|
|
11
|
+
for (const { cli, provider, binding, adapter, observations } of records) {
|
|
12
|
+
if (!binding || !adapter || !observations)
|
|
13
|
+
continue;
|
|
14
|
+
const providerEntry = Object.entries(result.registry.providers).find(([id]) => id === provider)?.[1];
|
|
15
|
+
if (providerEntry)
|
|
16
|
+
providerEntry.workerAdapter = adapter;
|
|
17
|
+
else {
|
|
18
|
+
result.registry.workerAdapters ??= {};
|
|
19
|
+
result.registry.workerAdapters[adapter.id] = adapter;
|
|
20
|
+
}
|
|
21
|
+
result.installations[cli] = binding;
|
|
22
|
+
result.catalog.discovery ??= { source: 'static', fetchedAt: observations.observedAt, providers: {} };
|
|
23
|
+
result.catalog.discovery.instances ??= {};
|
|
24
|
+
// These are recorded facts only; current discovery and installation are rechecked at launch.
|
|
25
|
+
result.catalog.discovery.instances[cli] = observations;
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=worker-health-snapshot.js.map
|
|
@@ -43,4 +43,8 @@ export function prepareWorkerInstallationStore(input: { workerWritableRoots: str
|
|
|
43
43
|
/** Historical approvals only; no driver import, probe, auth read, or launch authority. */
|
|
44
44
|
export function inspectRecordedWorkerQualifications(input: {
|
|
45
45
|
cwd: string; policy: WorkerSelectionPolicy; parallelism: import('../config/aiwg-config.js').ParallelismConfig;
|
|
46
|
-
|
|
46
|
+
/** Include signed historical inputs for offline health projection, never launch authority. */
|
|
47
|
+
includeInputs?: boolean;
|
|
48
|
+
}): Promise<Array<{ cli: string; provider: string; binding?: WorkerResolutionBinding;
|
|
49
|
+
adapter?: import('./provider-policy.js').WorkerAdapterMetadata;
|
|
50
|
+
observations?: import('./model-discovery.js').ProviderModelDiscovery }>>;
|
|
@@ -754,7 +754,7 @@ async function qualificationSignatureFailure(record, trust) {
|
|
|
754
754
|
* This is historical evidence, not current launch authority; loadRecordedWorkerInstallations
|
|
755
755
|
* performs binary/version/scope checks when dispatch actually requests a binding.
|
|
756
756
|
*/
|
|
757
|
-
export async function inspectRecordedWorkerQualifications({ cwd, policy, parallelism }) {
|
|
757
|
+
export async function inspectRecordedWorkerQualifications({ cwd, policy, parallelism, includeInputs = false }) {
|
|
758
758
|
const filename = installationStorePath();
|
|
759
759
|
await assertTrustedStore(filename, [cwd]);
|
|
760
760
|
const { stored } = await readInstallationStore(filename);
|
|
@@ -776,7 +776,8 @@ export async function inspectRecordedWorkerQualifications({ cwd, policy, paralle
|
|
|
776
776
|
if (!proof || ['scopeDigest', 'fixtureDigest', 'verifiedAt', 'evidenceRef'].some(key => proof[key] !== installation.evidence?.[key])) continue;
|
|
777
777
|
if (await qualificationSignatureFailure(record, () => qualificationTrust(cwd))) continue;
|
|
778
778
|
await assertWorkerInstallationEvidence({ ...installation, adapter, now: Date.now(), policy }, proof.scopeDigest);
|
|
779
|
-
results.push({ cli, provider: adapter.provider
|
|
779
|
+
results.push({ cli, provider: adapter.provider, ...(includeInputs
|
|
780
|
+
? { binding: structuredClone(binding), adapter: structuredClone(adapter), observations: structuredClone(record.modelObservations) } : {}) });
|
|
780
781
|
} catch { /* Malformed, expired or unbound evidence is not qualification. */ }
|
|
781
782
|
}
|
|
782
783
|
return results.filter(row => results.filter(other => row.cli === other.cli).length === 1);
|
|
@@ -836,15 +837,20 @@ export async function recordWorkerInstallation(instance, options) {
|
|
|
836
837
|
/** Read recorded host authority, validate installation bytes and the current CLI
|
|
837
838
|
* version, then load the same approved factory used by Ralph. */
|
|
838
839
|
export async function loadRecordedWorkerInstallations({ registry, cwd, policy, parallelism, storePath, storeDigest, precheckPolicy }) {
|
|
839
|
-
const { WorkerPolicyError, parseProviderModelCapabilities } = await import('./provider-policy.js');
|
|
840
|
+
const { WorkerPolicyError, WorkerQualificationPolicyError, parseProviderModelCapabilities } = await import('./provider-policy.js');
|
|
841
|
+
// Compiled TS modules load lazily so the managed launcher's ESM-only import chain stays minimal (#3851).
|
|
842
|
+
const { workerQualificationPolicyDiagnostic } = await import('./worker-qualification-policy.js');
|
|
840
843
|
const { qualificationDigest } = await import('./qualification-digest.mjs');
|
|
841
|
-
// Only fixed stage codes and
|
|
844
|
+
// Only fixed stage codes, bounded indexes and signed policy-drift summaries leave this boundary.
|
|
842
845
|
// Underlying errors can contain probe output, environment values or paths.
|
|
843
846
|
const rejections = [];
|
|
844
|
-
const fail = () =>
|
|
847
|
+
const fail = () => {
|
|
848
|
+
const mismatch = workerQualificationPolicyDiagnostic(rejections, stored?.registrations, policy);
|
|
849
|
+
return mismatch ? new WorkerQualificationPolicyError(mismatch, rejections) : new WorkerPolicyError('OG_ADAPTER_UNQUALIFIED',
|
|
845
850
|
`Trusted installation qualification is required (${[...new Set(rejections.map(row => row.reason))].join(', ')})${rejections.some(row => row.reason.startsWith('signature-'))
|
|
846
851
|
? `. ${rejections.some(row => row.reason === 'signature-trust-unavailable') ? keyRecoveryMessage : requalifyMessage}` : ''}`,
|
|
847
852
|
{ rejections });
|
|
853
|
+
};
|
|
848
854
|
let reason = 'store-binding';
|
|
849
855
|
let filename;
|
|
850
856
|
let stored, digest;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Explain recorded worker-policy drift without disclosing policy values or dynamic keys. */
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { WorkerSelectionPolicySchema } from './worker-selection-policy.js';
|
|
4
|
+
import { qualificationDigest } from './qualification-digest.mjs';
|
|
5
|
+
const policyPointer = '/defaults/workerSelection';
|
|
6
|
+
// Schema-owned names are public; model IDs, role aliases, paths and values are not.
|
|
7
|
+
const fieldNames = {
|
|
8
|
+
guards: Object.keys(WorkerSelectionPolicySchema.shape.guards.unwrap().shape),
|
|
9
|
+
dataPolicy: Object.keys(WorkerSelectionPolicySchema.shape.dataPolicy.unwrap().shape),
|
|
10
|
+
freshness: Object.keys(WorkerSelectionPolicySchema.shape.freshness.unwrap().shape),
|
|
11
|
+
};
|
|
12
|
+
function changedPointers(before, after) {
|
|
13
|
+
const pointers = [];
|
|
14
|
+
const oldPolicy = before;
|
|
15
|
+
const newPolicy = (after ?? {});
|
|
16
|
+
for (const key of Object.keys(WorkerSelectionPolicySchema.shape)) {
|
|
17
|
+
if (qualificationDigest([oldPolicy[key]]) === qualificationDigest([newPolicy[key]]))
|
|
18
|
+
continue;
|
|
19
|
+
const fields = fieldNames[key];
|
|
20
|
+
if (!fields) {
|
|
21
|
+
pointers.push(`${policyPointer}/${key}`);
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const oldFields = (oldPolicy[key] ?? {});
|
|
25
|
+
const newFields = (newPolicy[key] ?? {});
|
|
26
|
+
for (const field of fields) {
|
|
27
|
+
if (qualificationDigest([oldFields[field]]) !== qualificationDigest([newFields[field]])) {
|
|
28
|
+
pointers.push(`${policyPointer}/${key}/${field}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return pointers.length ? pointers : [policyPointer];
|
|
33
|
+
}
|
|
34
|
+
/** Called only for the loader's fixed rejection stages, after signature verification. */
|
|
35
|
+
export function workerQualificationPolicyDiagnostic(rejections, records, policy) {
|
|
36
|
+
const diagnostics = rejections.filter(row => row.reason === 'effective-config-digest' && row.registration !== null)
|
|
37
|
+
.map(row => {
|
|
38
|
+
const installed = records?.[row.registration]?.installation;
|
|
39
|
+
// Older or inconsistent records cannot establish which individual fields changed.
|
|
40
|
+
const pointers = installed?.policy && qualificationDigest(installed.policy) === installed.effectiveConfigDigest
|
|
41
|
+
? changedPointers(installed.policy, policy) : [policyPointer];
|
|
42
|
+
const workspace = typeof installed?.cwd === 'string' && path.isAbsolute(installed.cwd)
|
|
43
|
+
? ` ${JSON.stringify(installed.cwd)}` : '';
|
|
44
|
+
return { code: 'OG_ADAPTER_UNQUALIFIED',
|
|
45
|
+
pointer: pointers.length === 1 ? pointers[0] : policyPointer,
|
|
46
|
+
message: `Worker policy changed since qualification (effective-config-digest; pointers: ${pointers.join(', ')}); `
|
|
47
|
+
+ `align the shared project policy in the conductor and worker trees, then requalify the worker tree${workspace} `
|
|
48
|
+
+ 'by running aiwg doctor --probe-workers --qualify there.' };
|
|
49
|
+
});
|
|
50
|
+
return diagnostics.length ? { code: 'OG_ADAPTER_UNQUALIFIED',
|
|
51
|
+
pointer: diagnostics.length === 1 ? diagnostics[0].pointer : policyPointer,
|
|
52
|
+
message: diagnostics.map(row => row.message).join(' ') } : null;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=worker-qualification-policy.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { workspaceFileMode, workspaceDirectoryMode, preserveReplacementMode } from '../storage/workspace-permissions.js';
|
|
1
2
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
3
|
import { access, mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises';
|
|
3
4
|
import { homedir } from 'node:os';
|
|
@@ -37,7 +38,7 @@ function validateEvidenceState(value) {
|
|
|
37
38
|
async function writeEvidenceState(options, disposition) {
|
|
38
39
|
const provider = normalizeProviderDefinitionId(options.provider) ?? options.provider;
|
|
39
40
|
const target = providerTransformationEvidenceStatePath(options.projectRoot, provider, options.scope);
|
|
40
|
-
await mkdir(path.dirname(target), { recursive: true, mode:
|
|
41
|
+
await mkdir(path.dirname(target), { recursive: true, mode: workspaceDirectoryMode(path.dirname(target)) });
|
|
41
42
|
const temporary = path.join(path.dirname(target), `.${path.basename(target)}.${randomUUID()}.tmp`);
|
|
42
43
|
const state = {
|
|
43
44
|
schemaVersion: PROVIDER_TRANSFORMATION_EVIDENCE_STATE_SCHEMA,
|
|
@@ -47,7 +48,8 @@ async function writeEvidenceState(options, disposition) {
|
|
|
47
48
|
disposition,
|
|
48
49
|
};
|
|
49
50
|
try {
|
|
50
|
-
await writeFile(temporary, `${JSON.stringify(state, null, 2)}\n`, { encoding: 'utf8', mode:
|
|
51
|
+
await writeFile(temporary, `${JSON.stringify(state, null, 2)}\n`, { encoding: 'utf8', mode: workspaceFileMode(target), flag: 'wx' });
|
|
52
|
+
await preserveReplacementMode(temporary, target);
|
|
51
53
|
await rename(temporary, target);
|
|
52
54
|
}
|
|
53
55
|
catch (error) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { workspaceFileMode, workspaceDirectoryMode, preserveReplacementMode } from '../storage/workspace-permissions.js';
|
|
1
2
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
3
|
import { lstat, mkdir, readFile, realpath, rename, rm, writeFile } from 'node:fs/promises';
|
|
3
4
|
import path from 'node:path';
|
|
@@ -110,7 +111,7 @@ export async function createProviderTransformationReceipt(options) {
|
|
|
110
111
|
export async function writeProviderTransformationReceipt(projectRoot, receipt) {
|
|
111
112
|
validateProviderTransformationReceipt(receipt);
|
|
112
113
|
const destination = projectAiwgWritePath(projectRoot, 'receipts', 'providers', `${receipt.provider}.${receipt.scope}.json`);
|
|
113
|
-
await mkdir(path.dirname(destination), { recursive: true });
|
|
114
|
+
await mkdir(path.dirname(destination), { recursive: true, mode: workspaceDirectoryMode(path.dirname(destination)) });
|
|
114
115
|
try {
|
|
115
116
|
const existing = validateProviderTransformationReceipt(JSON.parse(await readFile(destination, 'utf8')));
|
|
116
117
|
const semantic = (value) => JSON.stringify({ ...value, generatedAt: undefined });
|
|
@@ -123,8 +124,9 @@ export async function writeProviderTransformationReceipt(projectRoot, receipt) {
|
|
|
123
124
|
const temporary = `${destination}.${randomUUID()}.tmp`;
|
|
124
125
|
try {
|
|
125
126
|
await writeFile(temporary, `${JSON.stringify(receipt, null, 2)}\n`, {
|
|
126
|
-
encoding: 'utf8', mode:
|
|
127
|
+
encoding: 'utf8', mode: workspaceFileMode(destination), flag: 'wx',
|
|
127
128
|
});
|
|
129
|
+
await preserveReplacementMode(temporary, destination);
|
|
128
130
|
await rename(temporary, destination);
|
|
129
131
|
}
|
|
130
132
|
catch (error) {
|
|
@@ -12,7 +12,7 @@ import { assertValidWorkerPayload } from '../mission-protocol/codecs.js';
|
|
|
12
12
|
import { qualificationDigest } from '../models/qualification-digest.mjs';
|
|
13
13
|
import { prepareWorkerInvocation } from './worker-invocation-preparation.js';
|
|
14
14
|
export { prepareWorkerInvocation, mcpToolSchemaDigest } from './worker-invocation-preparation.js';
|
|
15
|
-
import { isOperatorQualifiedWorkerAdapter, assertOperatorWorkerNativeArgv, assertWorkerLaunchMode, WorkerRoleEffortError, requiredWorkerControls, isCanonicalWorkerModelKey, WorkerPolicyError, DEFAULT_WORKER_SELECTION } from '../models/provider-policy.js';
|
|
15
|
+
import { isOperatorQualifiedWorkerAdapter, assertOperatorWorkerNativeArgv, assertWorkerLaunchMode, WorkerRoleEffortError, WorkerQualificationPolicyError, requiredWorkerControls, isCanonicalWorkerModelKey, WorkerPolicyError, DEFAULT_WORKER_SELECTION } from '../models/provider-policy.js';
|
|
16
16
|
/** Frozen per-attempt windows; parent/transport ceilings include time already spent. */
|
|
17
17
|
export function resolveWorkerEffectiveHealth(config, input) {
|
|
18
18
|
const roleDefaults = { efficiency: 1, coding: 1, reasoning: 2 };
|
|
@@ -374,8 +374,10 @@ export async function resolveWorkerInvocation(snapshot, request, drivers, now =
|
|
|
374
374
|
return plan;
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
|
-
/** Public diagnostics contain fixed summaries or explicit typed
|
|
377
|
+
/** Public diagnostics contain fixed summaries or explicit typed policy and path details. */
|
|
378
378
|
export function workerInvocationDiagnostic(error, pointer, fallback = 'OG_CONFIG_REFERENCE') {
|
|
379
|
+
if (error instanceof WorkerQualificationPolicyError)
|
|
380
|
+
return { code: error.code, pointer: error.pointer, message: error.message };
|
|
379
381
|
if (error instanceof WorkerRoleEffortError)
|
|
380
382
|
return { code: error.code, pointer: error.pointer, message: error.message };
|
|
381
383
|
if (error instanceof WorkerPathScopeError || error instanceof WorkerRequestArgumentError) {
|