@aiwg/cli 2026.11.7 → 2026.11.9
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 +1 -1
- package/agentic/code/addons/aiwg-hooks/hooks/aiwg-prompt-discovery.cjs +3 -2
- package/agentic/code/providers/capability-matrix.yaml +4 -4
- package/agentic/code/providers/model-capabilities.v1.json +169 -46
- package/agentic/code/providers/model-catalog.v1.json +17 -15
- package/bin/aiwg.mjs +3 -1
- package/dist/src/agents/agent-packager.js +3 -3
- package/dist/src/artifacts/cli.js +6 -2
- package/dist/src/artifacts/fortemi-core-sync.js +2 -0
- package/dist/src/artifacts/index-query-help.js +27 -0
- package/dist/src/artifacts/query-engine-installation.js +17 -4
- package/dist/src/artifacts/query-engine-name-intent.js +56 -0
- package/dist/src/artifacts/query-engine-scoring.js +14 -8
- package/dist/src/artifacts/query-engine-show-card.js +3 -3
- package/dist/src/cli/agent-spawn.js +4 -4
- package/dist/src/cli/handlers/best-practices-audit.js +1 -1
- package/dist/src/cli/handlers/bundle-deployment-mode.js +26 -13
- package/dist/src/cli/handlers/bundle-reconciliation.js +2 -2
- package/dist/src/cli/handlers/init.js +1 -1
- package/dist/src/cli/handlers/issues.js +5 -0
- package/dist/src/cli/handlers/marketplace-plugin-search.js +6 -5
- package/dist/src/cli/handlers/marketplace.js +1 -1
- package/dist/src/cli/handlers/models-muse-wrapper.js +32 -0
- package/dist/src/cli/handlers/models.js +5 -4
- package/dist/src/cli/handlers/refresh-artifact-freshness.js +51 -0
- package/dist/src/cli/handlers/refresh-bundles.js +3 -0
- package/dist/src/cli/handlers/refresh-managed-deployment.js +19 -7
- package/dist/src/cli/handlers/refresh-user-hooks.js +102 -0
- package/dist/src/cli/handlers/refresh.js +9 -3
- package/dist/src/cli/handlers/repo-access.js +15 -2
- package/dist/src/cli/handlers/sdlc-accelerate.js +1 -1
- package/dist/src/cli/handlers/steward.js +1 -1
- package/dist/src/cli/handlers/subcommands-bundles.js +1 -1
- package/dist/src/cli/handlers/subcommands-discovery.js +5 -0
- package/dist/src/cli/handlers/subcommands-list.js +1 -1
- package/dist/src/cli/handlers/subcommands-plugins.js +1 -1
- package/dist/src/cli/handlers/subcommands-storage.js +11 -0
- package/dist/src/cli/handlers/team.js +1 -1
- package/dist/src/cli/handlers/use-additive-bundles.js +9 -2
- package/dist/src/cli/handlers/use-bundle-counts.js +1 -1
- package/dist/src/cli/handlers/use-copy-selection.js +42 -0
- package/dist/src/cli/handlers/use.js +33 -38
- package/dist/src/cli/handlers/workspace-context.js +4 -0
- package/dist/src/cli/help-generator.js +1 -1
- package/dist/src/cli/new-project-options.js +46 -0
- package/dist/src/cli/router.js +15 -4
- package/dist/src/cli/scope-resolver.js +6 -6
- package/dist/src/cli/services/deployment-probe-scope.js +11 -0
- package/dist/src/cli/services/deployment-staleness.js +83 -0
- package/dist/src/cli/services/deployment-verification.js +20 -11
- package/dist/src/config/aiwg-config.js +1 -1
- package/dist/src/config/authorization-cli.js +36 -1
- package/dist/src/config/config-normalization.js +3 -1
- package/dist/src/config/worker-guidance-warning.js +8 -0
- package/dist/src/data/community.yaml +3 -3
- package/dist/src/extensions/commands/definitions.js +2 -2
- package/dist/src/extensions/manifest.js +27 -1
- package/dist/src/extensions/user-hook-diagnostics.js +18 -1
- package/dist/src/extensions/verified-hook-command.js +9 -0
- package/dist/src/features/catalog.js +2 -2
- package/dist/src/issues/cli.js +10 -2
- package/dist/src/marketplace/cache.js +31 -0
- package/dist/src/marketplace/plugin-search.js +39 -20
- package/dist/src/marketplace/public-search.js +122 -0
- package/dist/src/marketplace/registry.js +2 -0
- package/dist/src/marketplace/search-contract.js +19 -0
- package/dist/src/marketplace/sources/public-search.js +81 -0
- package/dist/src/mcp/cli.mjs +8 -7
- package/dist/src/mcp/credentials.mjs +1 -1
- package/dist/src/mcp/registry.js +6 -2
- package/dist/src/mcp/tool-filters.mjs +1 -1
- package/dist/src/memory/provider-memory-adapter.js +1 -1
- package/dist/src/models/catalog-policy.js +2 -1
- package/dist/src/models/config-loader.js +2 -1
- package/dist/src/models/cursor-models.js +92 -0
- package/dist/src/models/cursor-worker-version.d.mts +2 -0
- package/dist/src/models/cursor-worker-version.mjs +27 -0
- package/dist/src/models/model-capabilities.v1.json +169 -46
- package/dist/src/models/model-catalog.v1.json +17 -15
- package/dist/src/models/model-discovery.js +7 -6
- package/dist/src/models/policy-resources.js +1 -1
- package/dist/src/models/provider-policy.js +1 -1
- package/dist/src/models/worker-direct-readiness.js +8 -5
- package/dist/src/models/worker-health-readiness.js +4 -0
- package/dist/src/models/worker-installation.d.mts +5 -2
- package/dist/src/models/worker-installation.mjs +20 -12
- package/dist/src/models/worker-invocation-policy.js +22 -2
- package/dist/src/models/worker-plan.js +3 -1
- package/dist/src/models/worker-wiring-diagnostics.js +25 -0
- package/dist/src/models/wrapper-deployment.js +1 -1
- package/dist/src/models/wrapper-enforcement.js +6 -2
- package/dist/src/plugin/skill-command-frontmatter.js +1 -1
- package/dist/src/plugin/skill-command-translator.js +1 -1
- package/dist/src/policy/repo-access-workspace-spec.js +63 -0
- package/dist/src/policy/repo-access.js +22 -0
- package/dist/src/providers/capability-matrix.yaml +4 -4
- package/dist/src/providers/deployment-ownership.mjs +1 -1
- package/dist/src/providers/deployment-preservation.mjs +10 -5
- package/dist/src/providers/deployment-removal.js +1 -1
- package/dist/src/providers/devin-compat.d.mts +4 -0
- package/dist/src/providers/devin-compat.mjs +29 -0
- package/dist/src/providers/grok-build-acp.js +39 -9
- package/dist/src/providers/grok-build-paths.js +8 -7
- package/dist/src/providers/provider-context-contracts.js +7 -3
- package/dist/src/providers/provider-definition-schema.js +1 -1
- package/dist/src/providers/provider-definitions.js +1 -1
- package/dist/src/providers/provider-definitions.mjs +3 -3
- package/dist/src/providers/provider-inventory.js +13 -1
- package/dist/src/providers/provider-seeds-1.js +1 -1
- package/dist/src/providers/provider-seeds-3.js +10 -9
- package/dist/src/providers/transformation-receipt-integration.js +1 -1
- package/dist/src/sessions/adapters/windsurf.js +7 -7
- package/dist/src/sessions/grok-build-cli-output.js +1 -1
- package/dist/src/sessions/grok-build-cli.js +7 -1
- package/dist/src/skills/bundle-import-cli.js +61 -0
- package/dist/src/skills/bundle-import-plan.js +108 -0
- package/dist/src/skills/bundle-import.js +192 -0
- package/dist/src/skills/cli.js +5 -0
- package/dist/src/skills/deployment-policy.js +1 -1
- package/dist/src/skills/importer.js +4 -4
- package/dist/src/smiths/agentsmith/demo.js +1 -1
- package/dist/src/smiths/agentsmith/examples.js +6 -6
- package/dist/src/smiths/commandsmith/generator.js +1 -1
- package/dist/src/smiths/context-pipeline/allowlist.js +1 -1
- package/dist/src/smiths/context-pipeline/muse-bridge.js +7 -4
- package/dist/src/smiths/context-pipeline/parallelism-section.js +2 -2
- package/dist/src/smiths/context-pipeline/workspace-audit.js +37 -6
- package/dist/src/smiths/context-pipeline/workspace-bootstrap.js +3 -1
- package/dist/src/smiths/context-pipeline/workspace-doctor.js +16 -4
- package/dist/src/smiths/context-pipeline/workspace-document.js +4 -2
- package/dist/src/smiths/hook-bridge/codex-trust.js +56 -7
- package/dist/src/smiths/hook-bridge/cursor-translator.js +89 -0
- package/dist/src/smiths/hook-bridge/index.js +4 -1
- package/dist/src/smiths/skillsmith/collision-detector.js +1 -1
- package/dist/src/smiths/skillsmith/namespace-adapter.js +1 -1
- package/dist/src/smiths/skillsmith/platform-resolver.js +2 -2
- package/dist/src/writing/campaign-report.js +4 -3
- package/dist/src/writing/contextual-diagnostics.js +29 -3
- package/dist/src/writing/current-patterns.catalogue.json +4 -4
- package/dist/src/writing/current-patterns.js +3 -2
- package/dist/src/writing/structural-judgment.catalogue.json +17 -0
- package/dist/src/writing/structural-judgment.js +33 -0
- package/dist/src/writing/structural-patterns.js +78 -6
- package/dist/src/writing/validation-campaign.js +3 -0
- package/dist/src/writing/validation-engine.js +7 -4
- package/package.json +4 -2
- package/schemas/models/model-config-compatibility.v1.schema.json +1 -1
- package/tools/agents/deploy-agents.mjs +12 -10
- package/tools/agents/deploy-options.mjs +1 -0
- package/tools/agents/providers/base-behaviors.mjs +1 -1
- package/tools/agents/providers/base-contract.mjs +1 -1
- package/tools/agents/providers/base-kernel-skills.mjs +1 -1
- package/tools/agents/providers/base-models-platforms.mjs +9 -7
- package/tools/agents/providers/base-rule-index.mjs +1 -1
- package/tools/agents/providers/codex.mjs +1 -0
- package/tools/agents/providers/cursor-prompt-discovery.mjs +13 -0
- package/tools/agents/providers/cursor.mjs +2 -0
- package/tools/agents/providers/devin.mjs +3 -0
- package/tools/agents/providers/grok-build.mjs +14 -19
- package/tools/agents/providers/hook-capabilities.mjs +1 -1
- package/tools/agents/providers/model-wrapper.mjs +1 -1
- package/tools/agents/providers/openclaw-context.mjs +6 -0
- package/tools/agents/providers/openclaw.mjs +14 -12
- package/tools/agents/providers/rule-delivery-surface.mjs +15 -11
- package/tools/agents/providers/rule-deployment-prepare.mjs +9 -8
- package/tools/agents/providers/rule-presentation.mjs +1 -1
- package/tools/agents/providers/rule-projection.mjs +5 -5
- package/tools/agents/providers/rule-startup.mjs +4 -2
- package/tools/agents/providers/skill-copy-prune.mjs +5 -1
- package/tools/agents/providers/windsurf.mjs +26 -26
- package/tools/agents/use-rule-selection.mjs +1 -1
- package/tools/cli/workspace-deployment-health.mjs +38 -0
- package/tools/cli/workspace-status.mjs +5 -2
- package/tools/daemon/provider-watcher.mjs +3 -3
- package/tools/plugin/package-plugins.mjs +16 -2
- package/tools/ralph-external/lib/deepseek-harness-adapter.mjs +36 -22
- package/tools/ralph-external/lib/factory-adapter.mjs +13 -28
- package/tools/ralph-external/lib/factory-stream-final.mjs +31 -0
- package/tools/skills/deploy-skills-codex.mjs +2 -1
- package/vscode-extension/schemas/aiwg.config.v1.json +15 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { withModelWrapper } from './model-wrapper.mjs';
|
|
2
2
|
import { importImpl } from '../../_resolve-impl.mjs';
|
|
3
3
|
/**
|
|
4
|
-
* Devin Desktop Provider (
|
|
4
|
+
* Devin Desktop Provider (legacy path compatibility adapter)
|
|
5
5
|
*
|
|
6
|
-
* Deploys agents to the Devin Desktop
|
|
7
|
-
* minimal AGENTS.md hooks and trigger-frontmatter rules. The
|
|
6
|
+
* Deploys agents to the Devin Desktop compatibility surface with
|
|
7
|
+
* minimal AGENTS.md hooks and trigger-frontmatter rules. The deprecated selector and
|
|
8
8
|
* generated `.windsurf/` paths remain stable for backward compatibility.
|
|
9
9
|
*
|
|
10
10
|
* Deployment paths:
|
|
@@ -22,7 +22,7 @@ import { importImpl } from '../../_resolve-impl.mjs';
|
|
|
22
22
|
* - Capabilities tags for tools
|
|
23
23
|
* - Workflow format for commands
|
|
24
24
|
* - Conventional skills and rules deployment
|
|
25
|
-
* - Devin Desktop selectors resolve to the
|
|
25
|
+
* - Devin Desktop selectors resolve to the canonical `devin` provider id
|
|
26
26
|
*/
|
|
27
27
|
import realFs from 'fs';
|
|
28
28
|
import { createRequire } from 'module';
|
|
@@ -59,8 +59,8 @@ import { writeContextFileSync } from './context-write.mjs';
|
|
|
59
59
|
// ============================================================================
|
|
60
60
|
// Provider Configuration
|
|
61
61
|
// ============================================================================
|
|
62
|
-
export const name = '
|
|
63
|
-
export const aliases = ['
|
|
62
|
+
export const name = 'devin';
|
|
63
|
+
export const aliases = ['windsurf', 'devin-desktop', 'devin-local', 'cascade'];
|
|
64
64
|
|
|
65
65
|
export const paths = {
|
|
66
66
|
agents: '.windsurf/agents/', // Discrete mirrors alongside AGENTS.md
|
|
@@ -93,9 +93,9 @@ export const capabilities = {
|
|
|
93
93
|
// ============================================================================
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* Transform agent content to
|
|
96
|
+
* Transform agent content to Devin Desktop format (plain markdown, no YAML frontmatter)
|
|
97
97
|
*/
|
|
98
|
-
export const transformAgent = withModelWrapper('
|
|
98
|
+
export const transformAgent = withModelWrapper('devin', translateAgent);
|
|
99
99
|
function translateAgent(srcPath, content, opts) {
|
|
100
100
|
const fmMatch = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
101
101
|
if (!fmMatch) return content;
|
|
@@ -108,7 +108,7 @@ function translateAgent(srcPath, content, opts) {
|
|
|
108
108
|
const toolsMatch = frontmatter.match(/tools:\s*(.+)/)?.[1]?.trim();
|
|
109
109
|
const modelMatch = frontmatter.match(/model:\s*(.+)/)?.[1]?.trim();
|
|
110
110
|
|
|
111
|
-
// Build
|
|
111
|
+
// Build Devin Desktop-compatible format (plain markdown, no YAML)
|
|
112
112
|
const lines = [];
|
|
113
113
|
lines.push(`### ${name}`);
|
|
114
114
|
lines.push('');
|
|
@@ -146,7 +146,7 @@ function translateAgent(srcPath, content, opts) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* Transform command content to
|
|
149
|
+
* Transform command content to Devin Desktop workflow format
|
|
150
150
|
*/
|
|
151
151
|
export function transformCommand(srcPath, content, opts) {
|
|
152
152
|
const fmMatch = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
@@ -177,15 +177,15 @@ export function transformCommand(srcPath, content, opts) {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
* Transform rule content for
|
|
180
|
+
* Transform rule content for Devin Desktop — injects trigger frontmatter per ADR-2.
|
|
181
181
|
*
|
|
182
182
|
* Defaults to `trigger: always_on` (the ADR-2 §2 default-preservation choice
|
|
183
183
|
* for the existing AIWG rule corpus). When the source frontmatter declares
|
|
184
184
|
* a `globs:` or `applyTo:` field, the trigger is upgraded to `glob` and the
|
|
185
|
-
* glob pattern is passed through as the
|
|
185
|
+
* glob pattern is passed through as the Devin Desktop-native `glob:` field
|
|
186
186
|
* (PUW-020 / #1121, glob-mode part of ADR-2 §1 mapping).
|
|
187
187
|
*
|
|
188
|
-
* Per ADR-2 §5: non-always_on modes require a live-
|
|
188
|
+
* Per ADR-2 §5: non-always_on modes require a live-Devin Desktop smoke test
|
|
189
189
|
* gate before shipping to operators with the live loader. Until that gate
|
|
190
190
|
* lands, the safe default is preserved for rules without explicit globs.
|
|
191
191
|
*/
|
|
@@ -205,7 +205,7 @@ export function transformRule(srcPath, content, opts) {
|
|
|
205
205
|
if (globsMatch || applyToMatch) {
|
|
206
206
|
const globValue = (globsMatch?.[1] || applyToMatch?.[1] || '').trim().replace(/^['"]|['"]$/g, '');
|
|
207
207
|
const triggerLines = [`trigger: glob`];
|
|
208
|
-
// Add
|
|
208
|
+
// Add Devin Desktop-native `glob:` field if not already present.
|
|
209
209
|
if (!/^\s*glob\s*:/m.test(frontmatter)) {
|
|
210
210
|
triggerLines.push(`glob: '${globValue}'`);
|
|
211
211
|
}
|
|
@@ -221,7 +221,7 @@ export function transformRule(srcPath, content, opts) {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
// ============================================================================
|
|
224
|
-
// Model Mapping (not applicable for
|
|
224
|
+
// Model Mapping (not applicable for Devin Desktop)
|
|
225
225
|
// ============================================================================
|
|
226
226
|
|
|
227
227
|
export function mapModel(shorthand, modelCfg, modelsConfig) {
|
|
@@ -233,7 +233,7 @@ export function mapModel(shorthand, modelCfg, modelsConfig) {
|
|
|
233
233
|
// ============================================================================
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
* Generate AGENTS.md for
|
|
236
|
+
* Generate AGENTS.md for Devin Desktop with all agents aggregated
|
|
237
237
|
*/
|
|
238
238
|
export function generateAgentsMd(files, destPath, opts) {
|
|
239
239
|
if (opts.contextFiles === false) return;
|
|
@@ -254,7 +254,7 @@ export function generateAgentsMd(files, destPath, opts) {
|
|
|
254
254
|
/**
|
|
255
255
|
* Generate .windsurf/rules/aiwg-orchestration.md with trigger: always_on frontmatter.
|
|
256
256
|
* Also writes a deprecated .windsurfrules stub for backward compatibility — that file
|
|
257
|
-
* may be silently ignored by
|
|
257
|
+
* may be silently ignored by Devin Desktop (not documented in official docs).
|
|
258
258
|
*/
|
|
259
259
|
export function generateWindsurfRules(srcRoot, target, opts) {
|
|
260
260
|
const { dryRun } = opts;
|
|
@@ -267,7 +267,7 @@ export function generateWindsurfRules(srcRoot, target, opts) {
|
|
|
267
267
|
lines.push('# AIWG Orchestration for Devin Desktop');
|
|
268
268
|
lines.push('');
|
|
269
269
|
lines.push('<!--');
|
|
270
|
-
lines.push(' Generated by AIWG for Devin Desktop using the
|
|
270
|
+
lines.push(' Generated by AIWG for Devin Desktop using the legacy path compatibility adapter.');
|
|
271
271
|
lines.push(' This file provides orchestration context for AIWG SDLC workflows.');
|
|
272
272
|
lines.push(' trigger: always_on — included in system prompt on every message.');
|
|
273
273
|
lines.push('-->');
|
|
@@ -370,14 +370,14 @@ export function generateWindsurfRules(srcRoot, target, opts) {
|
|
|
370
370
|
|
|
371
371
|
// Deprecated stub: .windsurfrules — retained for backward compat only
|
|
372
372
|
const stubLines = [
|
|
373
|
-
'# AIWG Rules for
|
|
373
|
+
'# AIWG Rules for Devin Desktop — Deprecated',
|
|
374
374
|
'',
|
|
375
375
|
'> **This file is deprecated.**',
|
|
376
|
-
'>
|
|
376
|
+
'> Devin Desktop reads `.windsurf/rules/*.md` natively (see official docs).',
|
|
377
377
|
'> AIWG orchestration context is now deployed to:',
|
|
378
378
|
'> `.windsurf/rules/aiwg-orchestration.md` (trigger: always_on)',
|
|
379
379
|
'>',
|
|
380
|
-
'> This root-level file may be silently ignored by
|
|
380
|
+
'> This root-level file may be silently ignored by Devin Desktop.',
|
|
381
381
|
'> It is retained only for backward compatibility and will be removed in a future release.',
|
|
382
382
|
];
|
|
383
383
|
const stubPath = path.join(target, '.windsurfrules');
|
|
@@ -395,7 +395,7 @@ export function generateWindsurfRules(srcRoot, target, opts) {
|
|
|
395
395
|
// ============================================================================
|
|
396
396
|
|
|
397
397
|
/**
|
|
398
|
-
* Deploy commands as
|
|
398
|
+
* Deploy commands as Devin Desktop workflows
|
|
399
399
|
*/
|
|
400
400
|
export function deployWorkflows(commandFiles, targetDir, opts) {
|
|
401
401
|
const { dryRun } = opts;
|
|
@@ -405,7 +405,7 @@ export function deployWorkflows(commandFiles, targetDir, opts) {
|
|
|
405
405
|
ensureDir(workflowsDir);
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
-
console.log(`\nDeploying ${commandFiles.length} commands as
|
|
408
|
+
console.log(`\nDeploying ${commandFiles.length} commands as Devin Desktop workflows to ${workflowsDir}...`);
|
|
409
409
|
|
|
410
410
|
for (const cmdFile of commandFiles) {
|
|
411
411
|
const content = fs.readFileSync(cmdFile, 'utf8');
|
|
@@ -581,7 +581,7 @@ async function deploySelected(opts) {
|
|
|
581
581
|
skillDirs.push(...frameworkSkills.skills);
|
|
582
582
|
}
|
|
583
583
|
|
|
584
|
-
// Deploy commands as
|
|
584
|
+
// Deploy commands as Devin Desktop workflows
|
|
585
585
|
if (deployCommands || commandsOnly) {
|
|
586
586
|
// Collect command files based on mode
|
|
587
587
|
const commandFiles = [];
|
|
@@ -656,10 +656,10 @@ async function deploySelected(opts) {
|
|
|
656
656
|
await postDeploy(target, opts);
|
|
657
657
|
|
|
658
658
|
console.log('\n' + '='.repeat(70));
|
|
659
|
-
console.log('
|
|
659
|
+
console.log('Devin Desktop deployment complete. Generated files:');
|
|
660
660
|
console.log(' - AGENTS.md (agent catalog)');
|
|
661
661
|
console.log(' - .windsurf/rules/aiwg-orchestration.md (orchestration context, trigger: always_on)');
|
|
662
|
-
console.log(' - .windsurfrules (deprecated stub —
|
|
662
|
+
console.log(' - .windsurfrules (deprecated stub — Devin Desktop may ignore this file)');
|
|
663
663
|
if (deployCommands || commandsOnly) {
|
|
664
664
|
console.log(' - .windsurf/workflows/ (commands as workflows)');
|
|
665
665
|
}
|
|
@@ -5,7 +5,7 @@ import { importImpl } from '../_resolve-impl.mjs';
|
|
|
5
5
|
const { loadRulePinConfigs } = await importImpl(import.meta.url, 'rules/pins.mjs');
|
|
6
6
|
|
|
7
7
|
export function useRuleSelectionConfig(cfg, srcRoot) {
|
|
8
|
-
if (!cfg.ruleSelectionMode || cfg.kernelOnly) return undefined;
|
|
8
|
+
if (!cfg.ruleSelectionMode || cfg.kernelOnly && !(cfg.discoveryOnly && cfg.ruleSelectionMode !== 'all')) return undefined;
|
|
9
9
|
const root = resolveAiwgRoot(srcRoot) || srcRoot;
|
|
10
10
|
const frameworks = getFrameworksForMode(root, cfg.ruleSelectionMode);
|
|
11
11
|
if (!frameworks.length) return undefined;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Add Muse's shared skill inventory and use the deployment probe as dashboard health authority.
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { importImpl } from '../_resolve-impl.mjs';
|
|
5
|
+
|
|
6
|
+
export async function appendMuseDeployment(projectRoot, deployments, config) {
|
|
7
|
+
const configured = config?.providers?.includes('muse')
|
|
8
|
+
|| Object.values(config?.installed ?? {}).some(entry => entry.deployedTo?.muse);
|
|
9
|
+
if (!configured) return deployments;
|
|
10
|
+
const { getProviderDefinition } = await importImpl(import.meta.url, 'providers/provider-definitions.js');
|
|
11
|
+
const definition = getProviderDefinition('muse');
|
|
12
|
+
const counts = {};
|
|
13
|
+
for (const [kind, directory] of Object.entries({
|
|
14
|
+
skills: definition.paths.kernelSkills, rules: definition.paths.artifacts.rules, hooks: '.muse/hooks',
|
|
15
|
+
})) {
|
|
16
|
+
try {
|
|
17
|
+
const entries = await fs.readdir(path.join(projectRoot, directory), { withFileTypes: true });
|
|
18
|
+
const count = entries.filter(entry => !entry.name.startsWith('.')).length;
|
|
19
|
+
if (count) counts[kind] = count;
|
|
20
|
+
} catch (error) { if (error.code !== 'ENOENT') throw error; }
|
|
21
|
+
}
|
|
22
|
+
return [...deployments, { name: 'muse', path: '.muse', counts, lastRefresh: null }];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function applyDeploymentHealth(result, projectRoot, frameworkRoot) {
|
|
26
|
+
const { buildDeploymentStatusProbe } = await importImpl(import.meta.url, 'cli/services/deployment-verification.js');
|
|
27
|
+
const probe = await buildDeploymentStatusProbe(projectRoot, frameworkRoot);
|
|
28
|
+
if (probe.status === 'not-configured') return;
|
|
29
|
+
const rank = { unknown: 0, healthy: 1, warning: 2, error: 3 };
|
|
30
|
+
if (rank[probe.checks.health] > rank[result.health.overall]) result.health.overall = probe.checks.health;
|
|
31
|
+
for (const item of probe.deployment_verification.findings) {
|
|
32
|
+
if (item.severity === 'info') continue;
|
|
33
|
+
result.health.issues.push({
|
|
34
|
+
severity: item.severity === 'blocking' ? 'error' : 'warning',
|
|
35
|
+
message: `${item.provider}: ${item.message}`, action: item.remediation,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
import fs from 'fs/promises';
|
|
23
|
+
import { appendMuseDeployment, applyDeploymentHealth } from './workspace-deployment-health.mjs';
|
|
23
24
|
import { readAuthorizationHealth } from './authorization-health.mjs';
|
|
24
25
|
import { importImpl } from '../_resolve-impl.mjs';
|
|
25
26
|
import { collectDecisionOffloadReport, formatDecisionOffloadReport } from './decision-offload-report.mjs';
|
|
@@ -220,7 +221,7 @@ function normalizeRegistryFrameworks(registry) {
|
|
|
220
221
|
async function countDirEntries(dirPath) {
|
|
221
222
|
try {
|
|
222
223
|
const entries = await fs.readdir(dirPath, { withFileTypes: true });
|
|
223
|
-
return entries.length;
|
|
224
|
+
return entries.filter(entry => !entry.name.startsWith('.')).length;
|
|
224
225
|
} catch {
|
|
225
226
|
return 0;
|
|
226
227
|
}
|
|
@@ -234,6 +235,7 @@ async function collectProviderDeployments(projectRoot) {
|
|
|
234
235
|
{ name: 'cursor', path: '.cursor', artifactDirs: ['agents', 'commands', 'skills', 'rules'] },
|
|
235
236
|
{ name: 'opencode', path: '.opencode', artifactDirs: ['agent', 'command', 'skill', 'rule'] },
|
|
236
237
|
{ name: 'warp', path: '.warp', artifactDirs: ['agents', 'commands', 'skills', 'rules'] },
|
|
238
|
+
{ name: 'devin', path: '.windsurf', artifactDirs: ['agents', 'workflows', 'skills', 'rules'] },
|
|
237
239
|
{ name: 'universal', path: '.agents', artifactDirs: ['agents', 'commands', 'skills', 'rules'] }
|
|
238
240
|
];
|
|
239
241
|
|
|
@@ -489,7 +491,7 @@ async function buildWorkspaceStatus(projectRoot) {
|
|
|
489
491
|
});
|
|
490
492
|
}
|
|
491
493
|
|
|
492
|
-
result.providerDeployments = await collectProviderDeployments(projectRoot);
|
|
494
|
+
result.providerDeployments = await appendMuseDeployment(projectRoot, await collectProviderDeployments(projectRoot), configRead.data);
|
|
493
495
|
result.projectLocalBundles = await collectProjectLocalBundles(
|
|
494
496
|
aiwgPath,
|
|
495
497
|
new Set(result.frameworks.map(framework => framework.id))
|
|
@@ -522,6 +524,7 @@ async function buildWorkspaceStatus(projectRoot) {
|
|
|
522
524
|
});
|
|
523
525
|
}
|
|
524
526
|
|
|
527
|
+
await applyDeploymentHealth(result, projectRoot, packageRoot);
|
|
525
528
|
return result;
|
|
526
529
|
}
|
|
527
530
|
|
|
@@ -80,8 +80,8 @@ const PROVIDER_SOURCES = [
|
|
|
80
80
|
integrationDocs: [],
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
|
-
id: '
|
|
84
|
-
displayName: '
|
|
83
|
+
id: 'devin',
|
|
84
|
+
displayName: 'Devin Desktop',
|
|
85
85
|
sources: [
|
|
86
86
|
{ type: 'changelog-url', url: 'https://windsurf.com/changelog' },
|
|
87
87
|
{ type: 'docs-url', url: 'https://docs.windsurf.com' },
|
|
@@ -139,7 +139,7 @@ export class ProviderWatcher extends EventEmitter {
|
|
|
139
139
|
constructor(options = {}) {
|
|
140
140
|
super();
|
|
141
141
|
this.stateDir = options.stateDir || '.aiwg/daemon/provider-watch';
|
|
142
|
-
this.providers = options.providers || PROVIDER_SOURCES.map((p) => p.id);
|
|
142
|
+
this.providers = (options.providers || PROVIDER_SOURCES.map((p) => p.id)).map(id => id === 'windsurf' ? 'devin' : id);
|
|
143
143
|
this.intervalHours = options.intervalHours || 6;
|
|
144
144
|
// npm keeps its own config/registry variables; only daemon secrets are removed.
|
|
145
145
|
this.environment = options.environment;
|
|
@@ -145,16 +145,24 @@ Marketing automation framework with 37 specialized agents.
|
|
|
145
145
|
},
|
|
146
146
|
extraCopy: [
|
|
147
147
|
{ from: 'agentic/code/addons/voice-framework/voices', to: 'voices' },
|
|
148
|
+
{ from: 'agentic/code/addons/writing-quality/patterns/common-ai-tells.md', to: 'docs/structural-editing.md' },
|
|
149
|
+
{ from: 'agentic/code/addons/writing-quality/skills/ai-pattern-detection/references/current-patterns.json', to: 'docs/current-patterns.json' },
|
|
148
150
|
{ from: 'agentic/code/addons/voice-framework/docs/writing-workflows.md', to: 'docs/writing-workflows.md' },
|
|
149
151
|
{ from: 'agentic/code/addons/voice-framework/docs/voice-output-impact.md', to: 'docs/voice-output-impact.md' },
|
|
150
152
|
{ from: 'agentic/code/addons/voice-framework/docs/natural-voice/ADR-001-evidence-and-ownership.md', to: 'docs/natural-voice/ADR-001-evidence-and-ownership.md' },
|
|
151
153
|
{ from: 'agentic/code/addons/voice-framework/docs/natural-voice/evidence-ledger.v1.json', to: 'docs/natural-voice/evidence-ledger.v1.json' },
|
|
152
154
|
{ from: 'agentic/code/addons/voice-framework/flows/voice-critique-correction.flow.yaml', to: 'flows/voice-critique-correction.flow.yaml' }
|
|
153
155
|
],
|
|
156
|
+
rewrites: [
|
|
157
|
+
...['voice-apply', 'voice-create'].map(name => ({ file: `skills/${name}/SKILL.md`, from: '../../../writing-quality/patterns/common-ai-tells.md', to: '../../docs/structural-editing.md' })),
|
|
158
|
+
{ file: 'docs/structural-editing.md', from: '../skills/ai-pattern-detection/references/current-patterns.json', to: 'current-patterns.json' }
|
|
159
|
+
],
|
|
154
160
|
readme: `# AIWG Voice Framework
|
|
155
161
|
|
|
156
162
|
Voice profile system for consistent, authentic writing.
|
|
157
163
|
|
|
164
|
+
Use the [shared structural editing rules](docs/structural-editing.md) for tiered examples, campaign review and substance checks. These are editing guidelines, not authorship detection.
|
|
165
|
+
|
|
158
166
|
## Built-in Profiles
|
|
159
167
|
|
|
160
168
|
- **technical-authority**: Direct, precise, confident
|
|
@@ -198,13 +206,19 @@ Voice profile system for consistent, authentic writing.
|
|
|
198
206
|
agents: 'agentic/code/addons/writing-quality/agents',
|
|
199
207
|
skills: 'agentic/code/addons/writing-quality/skills'
|
|
200
208
|
},
|
|
209
|
+
extraCopy: [
|
|
210
|
+
{ from: 'agentic/code/addons/writing-quality/patterns', to: 'patterns' },
|
|
211
|
+
{ from: 'agentic/code/addons/writing-quality/validation', to: 'validation' }
|
|
212
|
+
],
|
|
201
213
|
readme: `# AIWG Writing Quality
|
|
202
214
|
|
|
203
|
-
Writing quality validation and
|
|
215
|
+
Writing quality validation and contextual editing guidance.
|
|
216
|
+
|
|
217
|
+
Use the [shared structural editing rules](patterns/common-ai-tells.md) and [review checklist](validation/banned-patterns.md) for tiered examples, campaign review and substance checks. These are editing guidelines, not authorship detection.
|
|
204
218
|
|
|
205
219
|
## Features
|
|
206
220
|
|
|
207
|
-
- **
|
|
221
|
+
- **Structural Review**: Review formulaic writing patterns in context
|
|
208
222
|
- **Authenticity Enhancement**: Suggestions for more authentic voice
|
|
209
223
|
- **Writing Validation**: Check against AIWG principles
|
|
210
224
|
|
|
@@ -73,21 +73,9 @@ registerProvider('dsh', () => new DeepSeekHarnessAdapter());
|
|
|
73
73
|
* proves neither that `sandbox-policy.mode` actually confines file/exec
|
|
74
74
|
* access, nor what `approval.policy: "never"` actually permits, because
|
|
75
75
|
* no probe can exercise a tool call without a real model response.
|
|
76
|
-
* - The
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* sandbox and approval defaults match no preset; configure
|
|
80
|
-
* defaultPreset explicitly`, confirmed live on the no-model probe).
|
|
81
|
-
* That means the stock preset-switch plugin is NOT mounted for this
|
|
82
|
-
* combination — it says nothing about whether `sandbox-policy`/
|
|
83
|
-
* `approval` themselves still enforce anything; it is evidence of an
|
|
84
|
-
* unmatched preset table entry, not evidence of functioning
|
|
85
|
-
* confinement.
|
|
86
|
-
* - `danger-full-access` (the only shipped preset pairing `approval:
|
|
87
|
-
* never`) is a full bypass and is never emitted by this profile. No
|
|
88
|
-
* analogy to another CLI's `-s workspace-write -c
|
|
89
|
-
* approval_policy="never"` semantics is drawn here: dsh's own
|
|
90
|
-
* behavior for this combination is simply unverified.
|
|
76
|
+
* - The patch declares a matching named permission preset and explicit
|
|
77
|
+
* defaultPreset for every accepted sandbox/approval pairing (#4313).
|
|
78
|
+
* Plugin activation does not establish sandbox enforcement.
|
|
91
79
|
*
|
|
92
80
|
* Because of this, `model`/`effort`/`sandbox`/`approval` stay `unqualified`
|
|
93
81
|
* in the registry below, matching grok-build/cursor/opencode's convention
|
|
@@ -101,7 +89,8 @@ registerProvider('dsh', () => new DeepSeekHarnessAdapter());
|
|
|
101
89
|
* `DEEPSEEK_API_KEY` is the credential env var the no-model probe's
|
|
102
90
|
* `MISSING_CREDENTIAL` error names (`llm-deepseek: no API key for
|
|
103
91
|
* provider route "deepseek-official"; ... export DEEPSEEK_API_KEY`); it is
|
|
104
|
-
* the
|
|
92
|
+
* the default route credential. The opt-in direct-shell-openrouter profile
|
|
93
|
+
* instead allowlists OPENROUTER_API_KEY (names only, values never rendered).
|
|
105
94
|
*
|
|
106
95
|
* KNOWN GAP (isolation): `getEnvOverrides()` is called with no invocation
|
|
107
96
|
* context (`session-launcher.mjs` ~847: `providerAdapter.getEnvOverrides()`),
|
|
@@ -133,7 +122,7 @@ registerProvider('dsh', () => new DeepSeekHarnessAdapter());
|
|
|
133
122
|
* `{"type":"error",...}` line and no `tool_result` with `status:"error"`
|
|
134
123
|
* anywhere.
|
|
135
124
|
*/
|
|
136
|
-
export const DEEPSEEK_HARNESS_SUPPORTED_VERSIONS = Object.freeze(['0.2.0-rc.2']);
|
|
125
|
+
export const DEEPSEEK_HARNESS_SUPPORTED_VERSIONS = Object.freeze(['0.2.0-rc.2', '0.2.2-rc.1']);
|
|
137
126
|
export const DEEPSEEK_HARNESS_DIRECT_EFFORT_VALUES = Object.freeze(['off', 'low', 'high', 'max']);
|
|
138
127
|
export const DEEPSEEK_HARNESS_DIRECT_SANDBOX_MODES = Object.freeze(['read-only', 'workspace-write']);
|
|
139
128
|
/** Non-prompting execution only: `ask` (the only alternative the CLI's own
|
|
@@ -190,6 +179,14 @@ function normalizeDeepSeekHarnessApproval(approval) {
|
|
|
190
179
|
return approval;
|
|
191
180
|
}
|
|
192
181
|
|
|
182
|
+
function normalizeDeepSeekHarnessProvider(provider = 'deepseek-official') {
|
|
183
|
+
if (provider === 'deepseek') return 'deepseek-official';
|
|
184
|
+
if (!['deepseek-official', 'openrouter'].includes(provider)) {
|
|
185
|
+
throw new Error('DeepSeek Harness worker requires a supported inference provider');
|
|
186
|
+
}
|
|
187
|
+
return provider;
|
|
188
|
+
}
|
|
189
|
+
|
|
193
190
|
/** Pure: the `--patch` overlay YAML text for one invocation's model,
|
|
194
191
|
* effort, sandbox and approval. Performs no I/O — see the module-level
|
|
195
192
|
* execution-time artifact contract. Exported so tests and the docs' manual smoke
|
|
@@ -197,16 +194,21 @@ function normalizeDeepSeekHarnessApproval(approval) {
|
|
|
197
194
|
* a conservative charset/enum AND `JSON.stringify`-quoted in the emitted
|
|
198
195
|
* YAML (defense in depth): neither alone is trusted. The patch never
|
|
199
196
|
* carries the brief or a credential.
|
|
200
|
-
* @param {{ model: unknown, effort: unknown, sandbox: unknown, approval: unknown }} selection
|
|
197
|
+
* @param {{ model: unknown, effort: unknown, sandbox: unknown, approval: unknown, inferenceProvider?: unknown }} selection
|
|
201
198
|
* @returns {string}
|
|
202
199
|
*/
|
|
203
|
-
export function buildDeepSeekHarnessPatch({ model, effort, sandbox, approval }) {
|
|
200
|
+
export function buildDeepSeekHarnessPatch({ model, effort, sandbox, approval, inferenceProvider }) {
|
|
204
201
|
const safeModel = normalizeDeepSeekHarnessModel(model);
|
|
205
202
|
const safeEffort = normalizeDeepSeekHarnessEffort(effort);
|
|
206
203
|
const safeSandbox = normalizeDeepSeekHarnessSandbox(sandbox);
|
|
207
204
|
const safeApproval = normalizeDeepSeekHarnessApproval(approval);
|
|
208
|
-
const provider =
|
|
205
|
+
const provider = normalizeDeepSeekHarnessProvider(inferenceProvider);
|
|
206
|
+
const preset = `headless-${safeSandbox}`;
|
|
209
207
|
return [
|
|
208
|
+
...(provider === 'openrouter' ? [
|
|
209
|
+
'- id: llm-pi-ai', ' config:', ' providers:', ' openrouter:',
|
|
210
|
+
' apiKeyEnv: OPENROUTER_API_KEY',
|
|
211
|
+
] : []),
|
|
210
212
|
'- id: agent-default-model',
|
|
211
213
|
' config:',
|
|
212
214
|
` provider: ${JSON.stringify(provider)}`,
|
|
@@ -218,6 +220,13 @@ export function buildDeepSeekHarnessPatch({ model, effort, sandbox, approval })
|
|
|
218
220
|
'- id: approval',
|
|
219
221
|
' config:',
|
|
220
222
|
` policy: ${JSON.stringify(safeApproval)}`,
|
|
223
|
+
'- id: permission',
|
|
224
|
+
' config:',
|
|
225
|
+
` defaultPreset: ${JSON.stringify(preset)}`,
|
|
226
|
+
' presets:',
|
|
227
|
+
` ${preset}:`,
|
|
228
|
+
` sandbox: ${JSON.stringify(safeSandbox)}`,
|
|
229
|
+
` approval: ${JSON.stringify(safeApproval)}`,
|
|
221
230
|
'',
|
|
222
231
|
].join('\n');
|
|
223
232
|
}
|
|
@@ -338,7 +347,12 @@ export class DeepSeekHarnessDirectAdapter extends DeepSeekHarnessAdapter {
|
|
|
338
347
|
const effort = invocation?.selected?.effort?.value;
|
|
339
348
|
const sandbox = permissions.sandbox ?? 'workspace-write';
|
|
340
349
|
const approval = permissions.approval ?? 'never';
|
|
341
|
-
|
|
350
|
+
const inferenceProvider = normalizeDeepSeekHarnessProvider(invocation?.selected?.inferenceProvider);
|
|
351
|
+
const key = inferenceProvider === 'openrouter' ? 'OPENROUTER_API_KEY' : 'DEEPSEEK_API_KEY';
|
|
352
|
+
if (_profile && !_profile.envAllowlist?.includes(key)) {
|
|
353
|
+
throw new Error('DeepSeek Harness worker inference provider does not match the selected profile');
|
|
354
|
+
}
|
|
355
|
+
buildDeepSeekHarnessPatch({ model, effort, sandbox, approval, inferenceProvider });
|
|
342
356
|
const cwd = invocation?.cwd;
|
|
343
357
|
if (typeof cwd !== 'string' || !cwd.startsWith('/') || cwd.includes('\0')) throw new Error('DeepSeek Harness worker requires an absolute workspace');
|
|
344
358
|
const brief = invocation?.brief;
|
|
@@ -357,7 +371,7 @@ export class DeepSeekHarnessDirectAdapter extends DeepSeekHarnessAdapter {
|
|
|
357
371
|
buildWorkerArtifacts(invocation) {
|
|
358
372
|
const permissions = invocation.permissions ?? {};
|
|
359
373
|
return [{ name: 'dsh-patch', location: 'run-directory', content: buildDeepSeekHarnessPatch({
|
|
360
|
-
model: invocation.selected.model, effort: invocation.selected.effort.value,
|
|
374
|
+
model: invocation.selected.model, inferenceProvider: invocation.selected.inferenceProvider, effort: invocation.selected.effort.value,
|
|
361
375
|
sandbox: permissions.sandbox ?? 'workspace-write', approval: permissions.approval ?? 'never',
|
|
362
376
|
}) }];
|
|
363
377
|
}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
import { ProviderAdapter, registerProvider } from './provider-adapter.mjs';
|
|
26
26
|
import { classifyWorkerHealthFailure, healthEventMatchesBinding } from './worker-health.mjs';
|
|
27
|
+
import { factoryTerminalResult, parseFactoryDirectFinal } from './factory-stream-final.mjs';
|
|
27
28
|
|
|
28
29
|
/** Model mapping from generic names to Factory/Droid model IDs */
|
|
29
30
|
const MODEL_MAP = {
|
|
@@ -46,7 +47,10 @@ const MODEL_MAP = {
|
|
|
46
47
|
* `--cwd` and `-o/--output-format` are all `exec`-level flags on 1.0.0
|
|
47
48
|
* `exec --help`. There is no file-output flag (`-o` selects the *format*,
|
|
48
49
|
* not a destination path): the final is read from the captured stdout
|
|
49
|
-
* stream instead, never a separate file.
|
|
50
|
+
* stream instead, never a separate file. Droid 1.0.0's observed terminal
|
|
51
|
+
* is `completion` with non-empty `finalText` (#4362, 2026-11-21); the
|
|
52
|
+
* documented legacy `result` success shape remains accepted. The catalog
|
|
53
|
+
* bounds this direct profile to 1.0.x. There is no positional `prompt`
|
|
50
54
|
* requirement either — `exec --help`'s own Examples show
|
|
51
55
|
* `echo "analyze code" | droid exec` and `cat prompt.txt | droid exec --auto
|
|
52
56
|
* medium` with no `prompt` argument at all, so omitting the positional and
|
|
@@ -96,7 +100,7 @@ const MODEL_MAP = {
|
|
|
96
100
|
* Ralph-loop registry only; the direct worker profile loads through the
|
|
97
101
|
* installed loader.
|
|
98
102
|
*/
|
|
99
|
-
export const FACTORY_SUPPORTED_VERSIONS = Object.freeze(['1.0.
|
|
103
|
+
export const FACTORY_SUPPORTED_VERSIONS = Object.freeze(['1.0.x']);
|
|
100
104
|
/** Union of every reasoning-effort label observed across models in
|
|
101
105
|
* `exec --help`'s "Model details" section (including `none`, the sole
|
|
102
106
|
* level for "Auto Model" and one of the levels for GPT-6 Sol/Luna and
|
|
@@ -137,8 +141,8 @@ const FACTORY_RESERVED_MODEL_VALUES = Object.freeze(['auto']);
|
|
|
137
141
|
export class FactoryAdapter extends ProviderAdapter {
|
|
138
142
|
/**
|
|
139
143
|
* Doc-sourced `assistant`/`user`/`tool_call`/`tool_result`/`hook`/`error`/
|
|
140
|
-
* `result` vocabulary (module doc above).
|
|
141
|
-
*
|
|
144
|
+
* `result` plus observed `completion` vocabulary (module doc above).
|
|
145
|
+
* The handshake stays `process-only`; a standalone `error`
|
|
142
146
|
* event is fatal exactly like a `result` with `is_error: true`, so a later
|
|
143
147
|
* clean terminal can never paper over it. Session exports and another
|
|
144
148
|
* provider's event names cannot qualify this grammar.
|
|
@@ -158,10 +162,8 @@ export class FactoryAdapter extends ProviderAdapter {
|
|
|
158
162
|
observeHealthEvent(event, source, binding) {
|
|
159
163
|
if (source?.kind !== 'stdout' || !event || typeof event !== 'object' || typeof event.type !== 'string') return null;
|
|
160
164
|
if (!healthEventMatchesBinding({ sessionId: event.session_id }, binding)) return null;
|
|
161
|
-
if (event.type === 'result') {
|
|
162
|
-
|
|
163
|
-
const success = event.subtype === 'success' && event.is_error === false && hasResultContent;
|
|
164
|
-
return { kind: 'terminal', success, key: event.subtype ?? 'result' };
|
|
165
|
+
if (event.type === 'result' || event.type === 'completion') {
|
|
166
|
+
return { kind: 'terminal', success: factoryTerminalResult(event) !== null, key: event.subtype ?? event.type };
|
|
165
167
|
}
|
|
166
168
|
if (event.type === 'error') {
|
|
167
169
|
return { ...classifyWorkerHealthFailure({ type: 'error', message: event.message ?? event.error?.message }, { source, provider: 'factory' }),
|
|
@@ -251,30 +253,13 @@ export class FactoryAdapter extends ProviderAdapter {
|
|
|
251
253
|
* `result` line that is not the documented success shape (`subtype ===
|
|
252
254
|
* 'success'`, `is_error === false`, non-empty `result`) rejects the whole
|
|
253
255
|
* stream. A later success never replaces an earlier failure, and an error
|
|
254
|
-
* after a success is never ignored.
|
|
256
|
+
* after a success is never ignored. Also accepts the observed 1.0.0
|
|
257
|
+
* `completion.finalText`, normalized to `result` for claims extraction.
|
|
255
258
|
* @param {string} stdout
|
|
256
259
|
* @returns {Object|null}
|
|
257
260
|
*/
|
|
258
261
|
parseDirectFinal(stdout) {
|
|
259
|
-
|
|
260
|
-
let final = null;
|
|
261
|
-
for (const line of stdout.split('\n')) {
|
|
262
|
-
const trimmed = line.trim();
|
|
263
|
-
if (!trimmed) continue;
|
|
264
|
-
let event;
|
|
265
|
-
try {
|
|
266
|
-
event = JSON.parse(trimmed);
|
|
267
|
-
} catch {
|
|
268
|
-
return null;
|
|
269
|
-
}
|
|
270
|
-
if (!event || typeof event !== 'object' || Array.isArray(event)) return null;
|
|
271
|
-
if (event.type === 'error') return null;
|
|
272
|
-
if (event.type !== 'result') continue;
|
|
273
|
-
const hasResultContent = typeof event.result === 'string' && event.result.trim().length > 0;
|
|
274
|
-
if (!(event.subtype === 'success' && event.is_error === false && hasResultContent)) return null;
|
|
275
|
-
final = event;
|
|
276
|
-
}
|
|
277
|
-
return final;
|
|
262
|
+
return parseFactoryDirectFinal(stdout);
|
|
278
263
|
}
|
|
279
264
|
|
|
280
265
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Normalize Droid completion and legacy result terminals for direct workers.
|
|
2
|
+
export function factoryTerminalResult(event) {
|
|
3
|
+
if (event.type === 'completion') {
|
|
4
|
+
return typeof event.finalText === 'string' && event.finalText.trim().length > 0
|
|
5
|
+
? { ...event, result: event.finalText } : null;
|
|
6
|
+
}
|
|
7
|
+
return event.subtype === 'success' && event.is_error === false
|
|
8
|
+
&& typeof event.result === 'string' && event.result.trim().length > 0 ? event : null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Any malformed line, error event or unsuccessful terminal rejects the stream. */
|
|
12
|
+
export function parseFactoryDirectFinal(stdout) {
|
|
13
|
+
if (typeof stdout !== 'string' || !stdout.trim()) return null;
|
|
14
|
+
let final = null;
|
|
15
|
+
for (const line of stdout.split('\n')) {
|
|
16
|
+
const trimmed = line.trim();
|
|
17
|
+
if (!trimmed) continue;
|
|
18
|
+
let event;
|
|
19
|
+
try {
|
|
20
|
+
event = JSON.parse(trimmed);
|
|
21
|
+
} catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
if (!event || typeof event !== 'object' || Array.isArray(event)) return null;
|
|
25
|
+
if (event.type === 'error') return null;
|
|
26
|
+
if (event.type !== 'result' && event.type !== 'completion') continue;
|
|
27
|
+
final = factoryTerminalResult(event);
|
|
28
|
+
if (!final) return null;
|
|
29
|
+
}
|
|
30
|
+
return final;
|
|
31
|
+
}
|
|
@@ -134,6 +134,7 @@ function parseArgs(args, homeDir) {
|
|
|
134
134
|
else if (a === '--dry-run') cfg.dryRun = true;
|
|
135
135
|
else if (a === '--force') cfg.force = true;
|
|
136
136
|
else if (a === '--index-mode') cfg.indexMode = true;
|
|
137
|
+
else if (a === '--preserve-copies') cfg.preserveCopies = true;
|
|
137
138
|
else if (a === '--copy-all' || a === '--copy-standard-skills') cfg.copyStandardSkills = true;
|
|
138
139
|
else if (a === '--listing-cap' && args[i + 1]) { cfg.listingCap = Math.max(0, Number(args[++i]) || 0); cfg.listingCapExplicit = true; }
|
|
139
140
|
else if (a === '--standard-target' && args[i + 1]) cfg.standardTarget = path.resolve(args[++i]);
|
|
@@ -407,7 +408,7 @@ export async function main(args = process.argv.slice(2), internal = {}) {
|
|
|
407
408
|
// skills can delete the kernel skills installed by the preceding full-root
|
|
408
409
|
// Codex pass, leaving `.agents/skills/` empty while `aiwg use` still exits 0.
|
|
409
410
|
let totalPruned = 0;
|
|
410
|
-
if ((!copyStandardSkills || cfg.indexMode) && fs.existsSync(target)) {
|
|
411
|
+
if (!cfg.preserveCopies && (!copyStandardSkills || cfg.indexMode) && fs.existsSync(target)) {
|
|
411
412
|
const targetEntries = fs.readdirSync(target, { withFileTypes: true });
|
|
412
413
|
for (const entry of targetEntries) {
|
|
413
414
|
if (!entry.isDirectory()) continue;
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
},
|
|
162
162
|
"providers": {
|
|
163
163
|
"type": "array",
|
|
164
|
-
"description": "Active AI provider targets",
|
|
164
|
+
"description": "Active AI provider targets; devin is canonical, windsurf is a deprecated alias",
|
|
165
165
|
"items": {
|
|
166
166
|
"type": "string",
|
|
167
167
|
"enum": [
|
|
@@ -169,6 +169,7 @@
|
|
|
169
169
|
"copilot",
|
|
170
170
|
"cursor",
|
|
171
171
|
"warp",
|
|
172
|
+
"devin",
|
|
172
173
|
"windsurf",
|
|
173
174
|
"openclaw",
|
|
174
175
|
"codex",
|
|
@@ -1398,6 +1399,19 @@
|
|
|
1398
1399
|
"minLength": 1,
|
|
1399
1400
|
"format": "uri"
|
|
1400
1401
|
},
|
|
1402
|
+
"modelLimits": {
|
|
1403
|
+
"type": "object",
|
|
1404
|
+
"propertyNames": { "type": "string", "minLength": 1 },
|
|
1405
|
+
"description": "Operator-declared per-selector limits for CLI model discovery; overrides provider display-name limits.",
|
|
1406
|
+
"additionalProperties": {
|
|
1407
|
+
"type": "object", "additionalProperties": false,
|
|
1408
|
+
"required": ["contextTokens"],
|
|
1409
|
+
"properties": {
|
|
1410
|
+
"contextTokens": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
|
|
1411
|
+
"maxOutputTokens": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1401
1415
|
"localModels": {
|
|
1402
1416
|
"type": "object",
|
|
1403
1417
|
"additionalProperties": false,
|