@aiwg/cli 2026.10.0 → 2026.10.3
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/providers/capability-matrix.yaml +270 -0
- package/agentic/code/providers/model-capabilities.v1.json +3091 -24
- package/bin/aiwg.mjs +86 -21
- package/dist/src/a2a/codecs.js +9 -0
- package/dist/src/artifacts/corpus-tools/vision-extract.js +105 -15
- package/dist/src/artifacts/repair.js +9 -4
- package/dist/src/channel/manager.mjs +59 -10
- package/dist/src/cli/child-process-result.js +40 -0
- package/dist/src/cli/env.js +38 -16
- package/dist/src/cli/flag-parsing.js +236 -0
- package/dist/src/cli/handlers/decision.js +297 -2
- package/dist/src/cli/handlers/diagnose.js +9 -2
- package/dist/src/cli/handlers/feedback.js +14 -5
- package/dist/src/cli/handlers/init.js +245 -30
- package/dist/src/cli/handlers/mc.js +23 -0
- package/dist/src/cli/handlers/models.js +69 -6
- package/dist/src/cli/handlers/ralph.js +3 -0
- package/dist/src/cli/handlers/refresh.js +16 -0
- package/dist/src/cli/handlers/regenerate.js +14 -0
- package/dist/src/cli/handlers/runtime-info.js +24 -9
- package/dist/src/cli/handlers/script-runner.js +16 -6
- package/dist/src/cli/handlers/session.js +396 -62
- package/dist/src/cli/handlers/sessions.js +146 -40
- package/dist/src/cli/handlers/setup-manifest.js +439 -39
- package/dist/src/cli/handlers/setup.js +139 -39
- package/dist/src/cli/handlers/subcommands.js +3 -1
- package/dist/src/cli/handlers/team.js +18 -8
- package/dist/src/cli/handlers/use.js +13 -0
- package/dist/src/cli/handlers/utilities.js +106 -23
- package/dist/src/cli/prompt-utils.js +72 -0
- package/dist/src/cli/provider-resolution.js +11 -0
- package/dist/src/config/aiwg-config.js +268 -4
- package/dist/src/config/cli.js +146 -19
- package/dist/src/config/dispatch-thresholds-runtime.mjs +38 -0
- package/dist/src/config/project-artifacts-health.mjs +14 -3
- package/dist/src/config/user-config.js +36 -10
- package/dist/src/decision/adapters/jev.js +80 -28
- package/dist/src/decision/ask.js +352 -0
- package/dist/src/decision/driver.js +4 -0
- package/dist/src/decision/entry.js +38 -6
- package/dist/src/decision/heldout/collector.js +10 -1
- package/dist/src/decision/index.js +3 -0
- package/dist/src/decision/interop.js +60 -8
- package/dist/src/decision/jev-credentials.js +121 -0
- package/dist/src/decision/ledger.js +839 -0
- package/dist/src/decision/validate.js +6 -3
- package/dist/src/effects/dispatch-verifier.js +252 -0
- package/dist/src/effects/index.js +1 -0
- package/dist/src/features/installer.js +2 -2
- package/dist/src/flow/graph-metadata.js +5 -0
- package/dist/src/gates/providers/loader.js +3 -1
- package/dist/src/installation/manager-command.mjs +1 -1
- package/dist/src/installation/manager.mjs +17 -2
- package/dist/src/lint/runner.js +2 -2
- package/dist/src/mcp/adapters/codex-runtime.js +360 -56
- package/dist/src/mcp/cli.mjs +587 -77
- package/dist/src/mcp/config-file.mjs +279 -0
- package/dist/src/mcp/config-layers.mjs +348 -0
- package/dist/src/mcp/credentials.mjs +484 -0
- package/dist/src/mcp/grok-build-config.mjs +16 -26
- package/dist/src/mcp/helpers.mjs +106 -2
- package/dist/src/mcp/omp-config.mjs +50 -29
- package/dist/src/mcp/profiles.js +97 -23
- package/dist/src/mcp/profiles.mjs +99 -27
- package/dist/src/mcp/registry.js +264 -57
- package/dist/src/mcp/registry.mjs +198 -45
- package/dist/src/mcp/server.mjs +403 -20
- package/dist/src/mcp/toml-string.mjs +9 -0
- package/dist/src/mcp/toml-strip-mcp.mjs +135 -0
- package/dist/src/mcp/tool-filters.mjs +357 -0
- package/dist/src/mcp/tools/agentic-sandbox.mjs +3 -1
- package/dist/src/mcp/tools/decision.mjs +58 -0
- package/dist/src/mcp/tools/orchestration.mjs +38 -0
- package/dist/src/mcp/tools/subsystems.mjs +39 -8
- package/dist/src/mcp/tools/worker-invoke.mjs +1539 -0
- package/dist/src/mcp/tools/worker-shell-control.mjs +258 -0
- package/dist/src/mcp/tools/worker-stdin-runtime.mjs +79 -0
- package/dist/src/memory/project-registry.js +2 -2
- package/dist/src/mission-protocol/codecs.js +639 -1
- package/dist/src/mission-protocol/types.js +110 -0
- package/dist/src/mission-protocol/worker-status.js +2 -0
- package/dist/src/models/config-loader.js +70 -13
- package/dist/src/models/grok-build-models.js +93 -41
- package/dist/src/models/model-capabilities.v1.json +3091 -24
- package/dist/src/models/model-discovery.js +862 -63
- package/dist/src/models/provider-policy.js +625 -11
- package/dist/src/models/qualification-digest.mjs +17 -0
- package/dist/src/models/resolver.js +259 -0
- package/dist/src/models/worker-direct-readiness.js +529 -0
- package/dist/src/models/worker-dispatch-offer.js +169 -0
- package/dist/src/models/worker-health-readiness.js +131 -0
- package/dist/src/models/worker-installation.mjs +879 -0
- package/dist/src/models/wrapper-route.js +18 -0
- package/dist/src/ops/registry.js +9 -14
- package/dist/src/plugins/standalone-packager.js +4 -3
- package/dist/src/process/bounded-child-process.mjs +387 -0
- package/dist/src/process/cli-command.mjs +75 -0
- package/dist/src/providers/capability-matrix.js +8 -0
- package/dist/src/providers/capability-matrix.yaml +270 -0
- package/dist/src/providers/grok-build-headless.js +43 -21
- package/dist/src/providers/provider-definitions.js +9 -1
- package/dist/src/providers/provider-definitions.mjs +9 -2
- package/dist/src/serve/executor-registry.js +16 -24
- package/dist/src/serve/fleet-mission-conductor.js +9 -0
- package/dist/src/serve/mission-conductor.js +9 -0
- package/dist/src/serve/shared-host-scheduler.js +2 -0
- package/dist/src/serve/worker-invocation.js +538 -0
- package/dist/src/serve/worker-stdin-frame.mjs +107 -0
- package/dist/src/sessions/adapter-registry.js +45 -0
- package/dist/src/sessions/adapters/generic.js +37 -3
- package/dist/src/sessions/adapters/grokbot-locator.js +111 -0
- package/dist/src/sessions/adapters/grokbot.js +423 -24
- package/dist/src/sessions/adapters/muse-workspace-scan.js +108 -0
- package/dist/src/sessions/adapters/muse.js +68 -29
- package/dist/src/sessions/adapters/pi.js +1 -0
- package/dist/src/sessions/batch-contracts.js +13 -1
- package/dist/src/sessions/batch-import.js +23 -42
- package/dist/src/sessions/candidates.js +47 -11
- package/dist/src/sessions/contracts.js +35 -0
- package/dist/src/sessions/coverage-preflight.js +134 -0
- package/dist/src/sessions/discovery.js +3 -0
- package/dist/src/sessions/grok-build-cli.js +67 -5
- package/dist/src/sessions/importer.js +24 -8
- package/dist/src/sessions/index.js +2 -0
- package/dist/src/sessions/repository.js +54 -13
- package/dist/src/sessions/workspace-discovery.js +99 -37
- package/dist/src/skills/adapters/clawhub.js +10 -8
- package/dist/src/skills/adapters/openclaw.js +10 -7
- package/dist/src/smiths/context-pipeline/parallelism-section.js +192 -3
- package/dist/src/smiths/context-pipeline/workspace-context.js +116 -9
- package/dist/src/smiths/hook-bridge/codex-translator.js +6 -5
- package/dist/src/smiths/mcpsmith/example.js +1 -1
- package/dist/src/smiths/toolsmith/runtime-discovery.mjs +10 -14
- package/dist/src/storage/backends/logseq.js +68 -7
- package/dist/src/storage/fortemi-qualification-receipt.js +2 -2
- package/dist/src/testing/generators/test-code-generator.js +57 -30
- package/dist/src/uhp/client.js +11 -1
- package/dist/src/uhp/mission.js +5 -0
- package/dist/src/update/checker.mjs +5 -5
- package/dist/src/update/notifier.mjs +54 -2
- package/dist/src/writing/fidelity.js +18 -1
- package/package.json +18 -1
- package/schemas/mission-v1.schema.json +2429 -0
- package/schemas/models/model-catalog.v1.schema.json +301 -0
- package/schemas/models/model-config-compatibility.v1.schema.json +281 -0
- package/schemas/models/model-policy.v1.schema.json +14 -0
- package/schemas/models/provider-model-capabilities.v1.schema.json +1066 -0
- package/tools/_resolve-impl.mjs +39 -0
- package/tools/agents/deploy-agents.mjs +15 -2
- package/tools/agents/providers/base.mjs +63 -43
- package/tools/agents/providers/grokbot.mjs +11 -12
- package/tools/agents/providers/hermes.mjs +6 -3
- package/tools/agents/providers/omp.mjs +5 -2
- package/tools/agents/providers/openclaw-translator.mjs +19 -5
- package/tools/providers/deepseek-harness-transport.mjs +358 -0
- package/tools/providers/omp-transport.mjs +192 -0
- package/tools/ralph-external/lib/claude-adapter.mjs +389 -0
- package/tools/ralph-external/lib/codex-adapter.mjs +432 -0
- package/tools/ralph-external/lib/deepseek-harness-adapter.mjs +397 -0
- package/tools/ralph-external/lib/factory-adapter.mjs +503 -0
- package/tools/ralph-external/lib/muse-adapter.mjs +364 -0
- package/tools/ralph-external/lib/omp-adapter.mjs +315 -0
- package/tools/ralph-external/lib/opencode-adapter.mjs +575 -0
- package/tools/ralph-external/lib/openhuman-adapter.mjs +75 -0
- package/tools/ralph-external/lib/pi-adapter.mjs +333 -0
- package/tools/ralph-external/lib/provider-adapter.mjs +690 -0
- package/tools/ralph-external/lib/worker-health.mjs +439 -0
- package/vscode-extension/schemas/aiwg.config.v1.json +1953 -0
|
@@ -12,6 +12,7 @@ import path from 'path';
|
|
|
12
12
|
import { AiwgError, EXIT_CODES, handlerResultFromError } from '../errors.js';
|
|
13
13
|
import { getPackageRoot } from '../../channel/manager.mjs';
|
|
14
14
|
import { inspectInstallation } from '../../installation/manager.mjs';
|
|
15
|
+
import { isSessionProviderResolution, resolveActiveProvider } from '../provider-resolution.js';
|
|
15
16
|
function isMissingRuntimeCatalogError(error) {
|
|
16
17
|
return error instanceof Error && error.message.includes('No catalog found');
|
|
17
18
|
}
|
|
@@ -304,21 +305,35 @@ async function handleRuntimeInfo(args, cwd = process.cwd()) {
|
|
|
304
305
|
console.log(` Run mode: ${installation.identity?.runMode ?? '(unrecorded)'}`);
|
|
305
306
|
console.log(` State: ${installation.state}`);
|
|
306
307
|
// Scheduler backend detection
|
|
307
|
-
const {
|
|
308
|
+
const { boundedExecFileSync } = await import('../../process/bounded-child-process.mjs');
|
|
308
309
|
let schedulerBackend = 'external trigger required (system cron/systemd/CI)';
|
|
309
310
|
let chronyInstalled = false;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
311
|
+
for (const tool of ['chronyc', 'chronyd']) {
|
|
312
|
+
try {
|
|
313
|
+
boundedExecFileSync('which', [tool], 'quick', { stdio: ['pipe', 'pipe', 'ignore'] });
|
|
314
|
+
chronyInstalled = true;
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
catch {
|
|
318
|
+
// Try the next chrony binary.
|
|
319
|
+
}
|
|
316
320
|
}
|
|
317
321
|
// Native CronCreate is only available when running inside a Claude Code agent context.
|
|
318
322
|
// The CLI itself cannot call agent tools, so we report based on platform heuristics.
|
|
319
323
|
// When invoked from within an agent, the schedule skill performs live detection.
|
|
320
|
-
|
|
321
|
-
|
|
324
|
+
//
|
|
325
|
+
// Resolved through the same shared provider-resolution path `steward
|
|
326
|
+
// capabilities` uses (`resolveActiveProvider` -> the `claude` provider's
|
|
327
|
+
// `detection.env` markers in provider-definitions.ts) so the two never
|
|
328
|
+
// disagree about which provider the current session is running under
|
|
329
|
+
// (#2623, #2627). The ad-hoc `CLAUDE_CODE_VERSION`/`ANTHROPIC_API_KEY`
|
|
330
|
+
// check this replaced was stale (neither is set by current Claude Code)
|
|
331
|
+
// and `ANTHROPIC_API_KEY` was a false positive for any non-Claude
|
|
332
|
+
// session with that key set.
|
|
333
|
+
const activeProviderResolution = await resolveActiveProvider({ cwd });
|
|
334
|
+
// Only a session signal counts: a project merely configured or deployed
|
|
335
|
+
// for Claude is not a Claude Code agent context.
|
|
336
|
+
const isClaudeCodeContext = activeProviderResolution.provider === 'claude' && isSessionProviderResolution(activeProviderResolution);
|
|
322
337
|
if (isClaudeCodeContext) {
|
|
323
338
|
schedulerBackend = 'native-cron (CronCreate); external trigger outside agent sessions';
|
|
324
339
|
}
|
|
@@ -30,8 +30,8 @@ export class DefaultScriptRunner {
|
|
|
30
30
|
async run(scriptPath, args = [], options = {}) {
|
|
31
31
|
const fullPath = path.join(this.frameworkRoot, scriptPath);
|
|
32
32
|
return new Promise((resolve) => {
|
|
33
|
-
// When capture mode is enabled, stdout/stderr are piped
|
|
34
|
-
//
|
|
33
|
+
// When capture mode is enabled, stdout/stderr are piped so that
|
|
34
|
+
// quiet-mode callers can suppress output. When not
|
|
35
35
|
// capturing, stdio: 'inherit' lets subprocess output flow directly to
|
|
36
36
|
// the terminal (verbose mode).
|
|
37
37
|
const stdio = options.capture ? 'pipe' : 'inherit';
|
|
@@ -40,10 +40,20 @@ export class DefaultScriptRunner {
|
|
|
40
40
|
cwd: options.cwd || process.cwd(),
|
|
41
41
|
env: { ...process.env, ...options.env },
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
// Always drain captured pipes, even after the diagnostic cap is reached.
|
|
44
|
+
// stdout is not part of HandlerResult; discard it. Retain only the first
|
|
45
|
+
// 1 MiB of stderr for failure messages, discarding any excess.
|
|
46
|
+
child.stdout?.resume();
|
|
47
|
+
const stderrLimit = 1024 * 1024;
|
|
48
|
+
const capturedStderr = [];
|
|
49
|
+
let capturedStderrBytes = 0;
|
|
44
50
|
if (options.capture && child.stderr) {
|
|
45
51
|
child.stderr.on('data', (data) => {
|
|
46
|
-
|
|
52
|
+
const retained = data.subarray(0, stderrLimit - capturedStderrBytes);
|
|
53
|
+
if (retained.length > 0) {
|
|
54
|
+
capturedStderr.push(Buffer.from(retained));
|
|
55
|
+
capturedStderrBytes += retained.length;
|
|
56
|
+
}
|
|
47
57
|
});
|
|
48
58
|
}
|
|
49
59
|
const timeout = options.timeout;
|
|
@@ -86,10 +96,10 @@ export class DefaultScriptRunner {
|
|
|
86
96
|
if (killEscalationId)
|
|
87
97
|
clearTimeout(killEscalationId);
|
|
88
98
|
// On failure in capture mode, surface the captured stderr
|
|
89
|
-
if (options.capture && code !== 0 &&
|
|
99
|
+
if (options.capture && code !== 0 && capturedStderrBytes > 0) {
|
|
90
100
|
resolve({
|
|
91
101
|
exitCode: code ?? 1,
|
|
92
|
-
message: capturedStderr.trim(),
|
|
102
|
+
message: Buffer.concat(capturedStderr).toString().trim(),
|
|
93
103
|
});
|
|
94
104
|
}
|
|
95
105
|
else {
|