@aiwg/cli 2026.10.18 → 2026.10.19

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.
Files changed (39) hide show
  1. package/agentic/code/providers/capability-matrix.yaml +51 -0
  2. package/agentic/code/providers/flue/README.md +62 -0
  3. package/agentic/code/providers/flue/templates/aiwg/tools.ts +120 -0
  4. package/agentic/code/providers/model-capabilities.v1.json +23 -0
  5. package/agentic/code/providers/model-catalog.v1.json +9 -0
  6. package/dist/src/artifacts/corpus-tools/resolve.js +7 -2
  7. package/dist/src/cli/handlers/help.js +1 -1
  8. package/dist/src/cli/handlers/init.js +1 -0
  9. package/dist/src/cli/handlers/use.js +11 -5
  10. package/dist/src/cli/services/deployment-verification.js +3 -0
  11. package/dist/src/memory/provider-memory-adapter.js +1 -0
  12. package/dist/src/models/model-capabilities.v1.json +23 -0
  13. package/dist/src/models/model-catalog.v1.json +9 -0
  14. package/dist/src/models/policy-resources.js +1 -1
  15. package/dist/src/providers/capability-matrix.yaml +51 -0
  16. package/dist/src/providers/deployment-ownership.d.mts +2 -1
  17. package/dist/src/providers/deployment-ownership.mjs +13 -3
  18. package/dist/src/providers/deployment-removal.js +22 -0
  19. package/dist/src/providers/provider-context-contracts.js +8 -0
  20. package/dist/src/providers/provider-definition-schema.js +1 -0
  21. package/dist/src/providers/provider-definitions.js +1 -0
  22. package/dist/src/providers/provider-seeds-3.js +18 -0
  23. package/dist/src/providers/skill-ownership.d.mts +1 -0
  24. package/dist/src/research/reference-match.js +29 -6
  25. package/dist/src/skills/deployment-ownership.js +2 -2
  26. package/dist/src/skills/deployment-policy.js +9 -0
  27. package/dist/src/smiths/context-pipeline/flue-context.js +25 -0
  28. package/dist/src/smiths/context-pipeline/generator.js +6 -1
  29. package/dist/src/smiths/context-pipeline/workspace-bootstrap.js +9 -7
  30. package/package.json +2 -1
  31. package/tools/agents/deploy-agents.mjs +5 -3
  32. package/tools/agents/deploy-options.mjs +9 -0
  33. package/tools/agents/providers/flue-project.mjs +79 -0
  34. package/tools/agents/providers/flue-specialists.mjs +64 -0
  35. package/tools/agents/providers/flue.mjs +50 -0
  36. package/tools/agents/providers/rule-delivery-surface.mjs +2 -1
  37. package/tools/agents/providers/rule-deployment-prepare.mjs +2 -1
  38. package/tools/agents/providers/rule-startup.mjs +3 -3
  39. package/tools/agents/use-rule-selection.mjs +17 -0
@@ -934,6 +934,57 @@ providers:
934
934
  deploy_target: project
935
935
  aggregated_output: false
936
936
 
937
+ flue:
938
+ display_name: Flue (experimental)
939
+ status: experimental
940
+ route_feasibility:
941
+ scope: out
942
+ identity: unavailable
943
+ evidence: R
944
+ channel: "none - Flue 2.3.0 app target; no worker dispatch (#3120 D6)"
945
+ coverage:
946
+ profile_issue: null
947
+ source_date: "2026-10-30"
948
+ live_qualified: false
949
+ exclusion_gap: "Flue run accepts prompts in argv and lacks worker model/effort flags; app deployment only."
950
+ recheck: "Rechecked 2026-10-30 against installed Flue 2.3.0 source; #3120 D6 excludes worker dispatch."
951
+ sources:
952
+ - "tools/agents/providers/flue.mjs"
953
+ - "docs/providers/flue.md"
954
+ - "https://flueframework.com/docs/"
955
+ fanout: unknown
956
+ probe_budget: { status: proposed, calls: 0, tokens: 0 }
957
+ daemon_tier: unsupported
958
+ daemon_pty_adapter: false
959
+ artifact_paths:
960
+ agents: ""
961
+ commands: ""
962
+ skills: .agents/skills/
963
+ rules: AGENTS.md
964
+ behaviors: null
965
+ native_features:
966
+ cron: false
967
+ agent_teams: false
968
+ tasks: false
969
+ mcp: false
970
+ behaviors: false
971
+ mission_control: false
972
+ daemon: false
973
+ emulation:
974
+ cron: null
975
+ agent_teams: null
976
+ tasks: null
977
+ mcp: null
978
+ behaviors: null
979
+ mission_control: null
980
+ daemon: null
981
+ hook_wiring:
982
+ at_link_support: false
983
+ fallback: full-inject
984
+ context_file: AGENTS.md
985
+ deploy_target: project
986
+ aggregated_output: false
987
+
937
988
  pi:
938
989
  display_name: Pi Coding Agent
939
990
  route_feasibility:
@@ -0,0 +1,62 @@
1
+ # Flue tools (2.3.0)
2
+
3
+ The provider deploy can copy `templates/aiwg/tools.ts` to the app's `src/aiwg/tools.ts`; `AIWG_TOOL_NAMES` lists its three tools for deployment consumers (#3121).
4
+
5
+ ```ts
6
+ import { useTool } from '@flue/runtime';
7
+ import { aiwg_discover, aiwg_show, aiwg_artifact_write } from './aiwg/tools';
8
+
9
+ // Inside the app's agent or specialist function:
10
+ useTool(aiwg_discover);
11
+ useTool(aiwg_show);
12
+ useTool(aiwg_artifact_write);
13
+ ```
14
+
15
+ The default tools run the installed `aiwg mcp serve` in the app's launch directory.
16
+ For another trusted project or executable, call `createAiwgTools({ cwd, command, args, env })`
17
+ at app setup and mount the returned tools. Configuration belongs to the app,
18
+ never to model tool inputs. The app needs AIWG installed on PATH, Node 24+, and
19
+ the tested Flue 2.3.0 graph: Valibot, `@modelcontextprotocol/client` 2.0.0 and
20
+ its `/stdio` export. These are already present in the pinned lab graph; AIWG
21
+ does not install dependencies or provide model credentials.
22
+
23
+ Each call owns a stdio child and closes it on success or failure. Initialization
24
+ has a 10-second deadline and observes cancellation; transport cleanup can take
25
+ up to 4 more seconds to terminate a silent child. The child
26
+ inherits the SDK's safe process settings plus AIWG root/path settings; optional
27
+ subsystem toolsets are disabled. No HTTP listener, gateway, `local()` sandbox,
28
+ approval bridge or model invocation is involved. Artifact writes go through
29
+ AIWG's `artifact-write`; the server resolves the project's configured artifact
30
+ root, pins it and enforces containment. The caller cannot set `project_dir`.
31
+ This scope applies to these tools; other app code retains its own host access.
32
+
33
+ `aiwg_show` supports the four MCP card tools: skill, agent, command and rule.
34
+ It always fetches governing rule summaries and bodies, and maps an optional
35
+ single heading to MCP's section array. Discovery retains all eight MCP asset
36
+ types. Its `query` maps to `discover.phrase`; the MCP default limit remains in
37
+ effect. Schema parity compares those public projections with live `tools/list`
38
+ schemas; fixed arguments and the omitted project selector remain server-owned.
39
+
40
+ Transport decision (#3123/#3124): the SDK stdio client works. Flue's documented
41
+ trusted-code route (`@flue/runtime/dist/mcp-CYraeuuF.mjs:45-48,114-125`,
42
+ re-exported by `index.mjs:10`) calls `new URL` and constructs its own HTTP/SSE transport.
43
+ The spike supplies both stdio and a custom transport with a throwing fetch;
44
+ both reach the HTTP fetch instead of a custom transport. The SDK connects to
45
+ the existing `src/mcp/server.mjs` over stdio and directly calls all three tools.
46
+ SDK evidence: `@modelcontextprotocol/client/package.json` exports `./stdio`;
47
+ `dist/stdio.mjs:48-81` spawns the child with stdin/stdout pipes. No gateway is
48
+ needed. Sources are the installed Flue 2.3.0 lab, checked in a temporary copy.
49
+
50
+ Run the reproducible smoke without reading lab environment files or state:
51
+
52
+ ```sh
53
+ TMPDIR=/var/tmp node tools/testing/flue-lab-smoke.mjs --lab /path/to/flue-lab
54
+ ```
55
+
56
+ It copies only the lab's package manifests and installed dependencies into
57
+ `os.tmpdir()` and deletes the copy afterward. It loads the actual TypeScript
58
+ template in Node, checks actual Valibot/MCP parity, and calls the tool functions
59
+ against a synthetic discovery CLI and the real AIWG MCP artifact server.
60
+ The default unit lane uses small Flue/Valibot builder doubles and the repository's
61
+ SDK 1.x client shim, keeping optional app dependencies out of AIWG itself;
62
+ the lab smoke verifies the full real Flue/Valibot/SDK 2.x boundary.
@@ -0,0 +1,120 @@
1
+ // App-owned Flue tools backed by AIWG's contained MCP operations.
2
+ import { defineTool } from '@flue/runtime';
3
+ import * as v from 'valibot';
4
+ import { Client } from '@modelcontextprotocol/client';
5
+ import { StdioClientTransport, getDefaultEnvironment } from '@modelcontextprotocol/client/stdio';
6
+
7
+ /* Transport spike: Flue 2.3.0's documented trusted-code escape hatch
8
+ * (@flue/runtime/dist/mcp-CYraeuuF.mjs:45-48,114-125, re-exported by
9
+ * index.mjs:10) calls new URL(definition.url) and constructs HTTP/SSE internally.
10
+ * It accepts neither a custom transport nor stdio. SDK 2.0.0 Client plus
11
+ * StdioClientTransport works against src/mcp/server.mjs (SDK dist/stdio.mjs,
12
+ * package.json exports["./stdio"]). No listener, gateway, or model is needed.
13
+ * Each call owns and closes its child, including failures/cancellation.
14
+ * Verified with tools/testing/flue-lab-smoke.mjs against a read-only lab copy.
15
+ *
16
+ * MCP schemas remain authoritative: discovery.mjs discover.phrase -> query,
17
+ * discover.type -> type; *-show.name -> name, section.items -> section.
18
+ * Show fixes rules/with_rule_bodies=true. Artifact-write projects path/content,
19
+ * deliberately omitting project_dir so tool data cannot change project scope.
20
+ * test/unit/providers/flue-tools.test.ts compares these schema projections;
21
+ * the lab smoke also compares actual Valibot JSON Schema against tools/list.
22
+ */
23
+ export const AIWG_TOOL_NAMES = Object.freeze([
24
+ 'aiwg_discover', 'aiwg_show', 'aiwg_artifact_write',
25
+ ] as const);
26
+
27
+ export interface AiwgToolOptions {
28
+ /** Trusted app configuration only; never populate these from tool inputs. */
29
+ command?: string;
30
+ args?: string[];
31
+ cwd?: string;
32
+ env?: Record<string, string>;
33
+ }
34
+
35
+ /** Create an isolated set for an app/project; defaults use the installed aiwg. */
36
+ export function createAiwgTools(options: AiwgToolOptions = {}) {
37
+ const cwd = options.cwd ?? process.cwd();
38
+ // Inherit only SDK-safe process settings and AIWG path settings, not model keys.
39
+ const env = getDefaultEnvironment();
40
+ for (const key of ['AIWG_ROOT', 'AIWG_ARTIFACTS_PATH', 'AIWG_PROJECT_ARTIFACTS_PATH', 'AIWG_PROJECT_AIWG_DIR']) {
41
+ if (process.env[key]) env[key] = process.env[key];
42
+ }
43
+ Object.assign(env, options.env, { AIWG_MCP_TOOLSETS: '' });
44
+
45
+ async function call(name: string, args: Record<string, unknown>, signal?: AbortSignal) {
46
+ signal?.throwIfAborted();
47
+ // AIWG serves MCP 2025-11-25; avoid SDK 2's disposable newer-era probe child.
48
+ const client = new Client({ name: 'aiwg-flue', version: '1.0.0' }, {
49
+ versionNegotiation: { mode: 'legacy' },
50
+ });
51
+ const transport = new StdioClientTransport({
52
+ command: options.command ?? 'aiwg', args: options.args ?? ['mcp', 'serve'],
53
+ cwd, env, stderr: 'inherit',
54
+ });
55
+ try {
56
+ // Bound initialize to 10 seconds; transport.close also reaps a silent child
57
+ // on timeout/abort (SDK cleanup may take another 4 seconds to escalate).
58
+ let timer: ReturnType<typeof setTimeout> | undefined;
59
+ let abortConnect = () => {};
60
+ try {
61
+ const interrupted = new Promise<never>((_, reject) => {
62
+ abortConnect = () => reject(signal?.reason ?? new Error('AIWG MCP connect aborted'));
63
+ signal?.addEventListener('abort', abortConnect, { once: true });
64
+ if (signal?.aborted) abortConnect();
65
+ timer = setTimeout(() => reject(new Error('AIWG MCP connect timed out after 10000 ms')), 10_000);
66
+ });
67
+ await Promise.race([client.connect(transport), interrupted]);
68
+ } finally {
69
+ clearTimeout(timer);
70
+ signal?.removeEventListener('abort', abortConnect);
71
+ }
72
+ signal?.throwIfAborted();
73
+ const result = await client.callTool({ name, arguments: args }, { signal, timeout: 180_000 });
74
+ const text = result.content.filter(item => item.type === 'text').map(item => item.text).join('\n');
75
+ const output = result.structuredContent === undefined ? text
76
+ : [text, JSON.stringify(result.structuredContent)].filter(Boolean).join('\n');
77
+ if (result.isError) throw new Error(output || `AIWG MCP tool ${name} failed`);
78
+ return { output };
79
+ } finally {
80
+ await transport.close();
81
+ await client.close();
82
+ }
83
+ }
84
+
85
+ const aiwg_discover = defineTool({
86
+ name: AIWG_TOOL_NAMES[0],
87
+ description: 'Find AIWG capabilities and their governing checks. Follow with aiwg_show.',
88
+ input: v.strictObject({
89
+ query: v.string(),
90
+ type: v.optional(v.picklist(['skill', 'agent', 'command', 'rule', 'flow', 'runbook', 'template', 'behavior'])),
91
+ }),
92
+ annotations: { readOnlyHint: true, openWorldHint: false },
93
+ run: ({ data, signal }) => call('discover', {
94
+ phrase: data.query, ...(data.type === undefined ? {} : { type: data.type }),
95
+ }, signal),
96
+ });
97
+ const aiwg_show = defineTool({
98
+ name: AIWG_TOOL_NAMES[1],
99
+ description: 'Fetch an AIWG card plus governing rule bodies; optionally drill into one heading. Types: skill, agent, command, rule.',
100
+ input: v.strictObject({
101
+ type: v.picklist(['skill', 'agent', 'command', 'rule']),
102
+ name: v.string(), section: v.optional(v.string()),
103
+ }),
104
+ annotations: { readOnlyHint: true, openWorldHint: false },
105
+ run: ({ data, signal }) => call(`${data.type}-show`, {
106
+ name: data.name, rules: true, with_rule_bodies: true,
107
+ ...(data.section === undefined ? {} : { section: [data.section] }),
108
+ }, signal),
109
+ });
110
+ const aiwg_artifact_write = defineTool({
111
+ name: AIWG_TOOL_NAMES[2],
112
+ description: 'Write an artifact relative to this project’s configured artifact root. AIWG enforces containment.',
113
+ input: v.strictObject({ path: v.string(), content: v.string() }),
114
+ annotations: { readOnlyHint: false, openWorldHint: false },
115
+ run: ({ data, signal }) => call('artifact-write', { path: data.path, content: data.content }, signal),
116
+ });
117
+ return { aiwg_discover, aiwg_show, aiwg_artifact_write };
118
+ }
119
+
120
+ export const { aiwg_discover, aiwg_show, aiwg_artifact_write } = createAiwgTools();
@@ -2533,6 +2533,29 @@
2533
2533
  }
2534
2534
  }
2535
2535
  },
2536
+ "flue": {
2537
+ "sessionEnvAllowlist": [],
2538
+ "agent": "unsupported",
2539
+ "skill": "unsupported",
2540
+ "globalChild": "unsupported",
2541
+ "identifierSyntax": "App-owned Flue model configuration; no AIWG worker selector",
2542
+ "inheritance": "Application-owned; no worker dispatch",
2543
+ "invalidPinFallback": "Report unsupported",
2544
+ "configTarget": "Application-owned",
2545
+ "artifactFormat": "Kernel SKILL.md and composed AGENTS.md",
2546
+ "verification": "Flue 2.3.0 installed source; app deployment only (#3120 D6)",
2547
+ "sourceUrl": "https://flueframework.com/docs/",
2548
+ "verifiedAt": "2026-10-30",
2549
+ "workerHealthCoverage": {
2550
+ "scope": "out",
2551
+ "coverage": "unobserved",
2552
+ "handshake": "unobserved",
2553
+ "evidenceGrades": ["R"],
2554
+ "qualificationOwner": "B-OG-47",
2555
+ "provenance": ["tools/agents/providers/flue.mjs", "docs/providers/flue.md"],
2556
+ "reason": "Flue is an app target, with no worker invocation profile or adapter (#3120 D6)."
2557
+ }
2558
+ },
2536
2559
  "grokbot": {
2537
2560
  "sessionEnvAllowlist": [],
2538
2561
  "agent": "unsupported",
@@ -327,6 +327,15 @@
327
327
  "sourceUrl": "https://docs.openclaw.ai/tools/subagents",
328
328
  "verifiedAt": "2026-07-20"
329
329
  },
330
+ "flue": {
331
+ "roles": {
332
+ "reasoning": { "id": "app-owned", "status": "unverified", "observed": false },
333
+ "coding": { "id": "app-owned", "status": "unverified", "observed": false },
334
+ "efficiency": { "id": "app-owned", "status": "unverified", "observed": false }
335
+ },
336
+ "sourceUrl": "https://flueframework.com/docs/",
337
+ "verifiedAt": "2026-10-30"
338
+ },
330
339
  "grokbot": {
331
340
  "roles": {
332
341
  "reasoning": {
@@ -3,7 +3,7 @@ import { ArxivClient } from '../../research/clients/arxiv.js';
3
3
  import { CrossRefClient } from '../../research/clients/crossref.js';
4
4
  import { SemanticScholarClient } from '../../research/clients/semantic-scholar.js';
5
5
  import { identityKeys, normalizeIdentity, normalizeTitle } from '../../research/identity.js';
6
- import { classifyCandidates, mergePapers, needsTitleDisambiguation, parsePartialReference, scorePaper } from '../../research/reference-match.js';
6
+ import { classifyCandidates, mergePapers, needsTitleDisambiguation, needsYearReview, parsePartialReference, scorePaper } from '../../research/reference-match.js';
7
7
  import { ResearchError, ResearchErrorCode } from '../../research/types.js';
8
8
  import { findInCorpus } from './resolve-corpus.js';
9
9
  export function createResolverClients() {
@@ -121,8 +121,13 @@ export async function resolveReference(input, root, year, clients = createResolv
121
121
  const classified = classifyCandidates(candidates);
122
122
  const incomplete = paths.some(path => path.retryable);
123
123
  const titleAmbiguous = needsTitleDisambiguation(reference, candidates, incomplete);
124
+ const yearConflict = needsYearReview(reference, candidates[0]);
125
+ if (classified !== 'unresolved' && candidates[0]?.score_parts.year === 0) {
126
+ findings.push({ type: yearConflict ? 'year_conflict' : 'year_mismatch',
127
+ supplied: String(reference.year), returned: String(candidates[0].paper.year), candidate: candidates[0].paper.id });
128
+ }
124
129
  const status = classified === 'unresolved' && incomplete ? 'deferred'
125
- : classified === 'resolved' && (identifierUnresolved || titleAmbiguous) ? 'ambiguous' : classified;
130
+ : classified === 'resolved' && (identifierUnresolved || titleAmbiguous || yearConflict) ? 'ambiguous' : classified;
126
131
  if (titleAmbiguous && classified !== 'unresolved')
127
132
  findings.push({ type: 'title_ambiguous',
128
133
  supplied: reference.title, returned: reference.year === undefined
@@ -159,7 +159,7 @@ function displayHelp() {
159
159
  ui.rule();
160
160
  ui.blank();
161
161
  const providers = listProviderDefinitions().filter(({ id }) => id !== 'generic');
162
- console.log(` ${ui.dimText('Providers:')} ${providers.length} — ${providers.map(({ id }) => id).join(', ')} (default: claude; aliases: agy → antigravity, devin → windsurf, oh-my-pi → omp)`);
162
+ console.log(` ${ui.dimText('Providers:')} ${providers.length} — ${providers.map(({ id, status }) => status === 'experimental' ? `${id} (experimental)` : id).join(', ')} (default: claude; aliases: agy → antigravity, devin → windsurf, oh-my-pi → omp)`);
163
163
  ui.blank();
164
164
  console.log(` ${ui.dimText('Examples:')}`);
165
165
  console.log(` aiwg use sdlc ${ui.dimText('Install SDLC framework')}`);
@@ -52,6 +52,7 @@ const PROVIDER_LABELS = {
52
52
  openclaw: 'OpenClaw ~/.openclaw/',
53
53
  hermes: 'Hermes (MCP) aiwg mcp',
54
54
  omp: 'Oh My Pi .omp/ + .agents/skills/',
55
+ flue: 'Flue (experimental) .agents/skills/ + AGENTS.md + db.ts',
55
56
  pi: 'Pi Coding Agent .pi/ + .agents/skills/',
56
57
  };
57
58
  // Local aliases for the shared prompt utilities. These preserve existing
@@ -512,8 +512,8 @@ export function gitignorePatternsForDeploy(provider) {
512
512
  return [...AIWG_RUNTIME_PATTERNS, ...(PROVIDER_GENERATED_GITIGNORE_PATTERNS[provider] ?? [])];
513
513
  }
514
514
  export async function ensureProviderGeneratedDirsIgnored(projectRoot, provider, opts) {
515
- if (opts.dryRun)
516
- return;
515
+ if (opts.dryRun || provider === 'flue')
516
+ return; // Flue records its ignore edit inside the provider transaction.
517
517
  const patterns = gitignorePatternsForDeploy(provider);
518
518
  if (patterns.length === 0)
519
519
  return;
@@ -1512,6 +1512,11 @@ async function generateDeploymentContextFiles(options) {
1512
1512
  let useDeployment;
1513
1513
  function useDeploymentArgs(args) {
1514
1514
  const forwarded = [...args];
1515
+ const modeIndex = args.indexOf('--mode');
1516
+ if (useDeployment && modeIndex >= 0)
1517
+ useDeployment.ruleSelectionMode ??= args[modeIndex + 1];
1518
+ if (useDeployment?.ruleSelectionMode && !forwarded.includes('--rule-selection-mode'))
1519
+ forwarded.push('--rule-selection-mode', useDeployment.ruleSelectionMode);
1515
1520
  if (useDeployment && !forwarded.includes('--deploy-version'))
1516
1521
  forwarded.push('--deploy-version', useDeployment.version);
1517
1522
  if (useDeployment?.skipContextFiles && !forwarded.includes('--no-context-files'))
@@ -2396,6 +2401,7 @@ export class UseHandler {
2396
2401
  const previousDeployment = useDeployment;
2397
2402
  useDeployment = {
2398
2403
  resourceCredentials,
2404
+ ruleSelectionMode: previousDeployment?.ruleSelectionMode,
2399
2405
  version: previousDeployment?.version ?? resolveDeployVersion(ctx.frameworkRoot || await getFrameworkRoot()),
2400
2406
  skipAttribution: previousDeployment?.skipAttribution || ctx.args.includes('--no-attribution'),
2401
2407
  skipContextFiles: previousDeployment?.skipContextFiles || ctx.args.includes('--no-context-files'),
@@ -3568,8 +3574,8 @@ export class UseHandler {
3568
3574
  && !remainingArgs.includes('--copy-standard-skills');
3569
3575
  if (bulkKernelOnly)
3570
3576
  providerDeployArgs.push('--kernel-only');
3571
- const allAddons = skipUtils ? [] : await getAllAddons(frameworkRoot);
3572
- const allExtensions = skipUtils || bulkKernelOnly ? [] : await getAllExtensions(frameworkRoot);
3577
+ const allAddons = skipUtils || provider === 'flue' ? [] : await getAllAddons(frameworkRoot);
3578
+ const allExtensions = skipUtils || bulkKernelOnly || provider === 'flue' ? [] : await getAllExtensions(frameworkRoot);
3573
3579
  const mainIncludesAddons = mainDeploymentIncludesAddons(provider, mode, providerDeployArgs);
3574
3580
  // OMP's extension sources share the root transaction and binding scan.
3575
3581
  // Their CLI contributions are still registered below in source order.
@@ -3830,7 +3836,7 @@ export class UseHandler {
3830
3836
  // Pi model selection/headless routing is delivered by #2151. Until that
3831
3837
  // adapter exists, do not require model-wrapper artifacts that Pi cannot
3832
3838
  // load; resource deployment remains independently valid.
3833
- if (!dryRun && !skipUtils && !bulkKernelOnly && !['pi', 'omp'].includes(provider)) {
3839
+ if (!dryRun && !skipUtils && !bulkKernelOnly && !['pi', 'omp', 'flue'].includes(provider)) {
3834
3840
  const wrapperValidation = await validateDeployedModelWrappers({
3835
3841
  provider,
3836
3842
  target,
@@ -14,6 +14,9 @@ import { diagnoseIntegratedProviderTransformationReceipt } from '../../providers
14
14
  import { diagnoseWorkspaceContext, providerContextContract, } from '../../smiths/context-pipeline/workspace-context.js';
15
15
  import { USER_SCOPE_PATHS } from '../scope-resolver.js';
16
16
  const RESTART_NOTICES = {
17
+ flue: { policy: 'restart-required',
18
+ action: 'Restart the Flue app before checking deployed context and skills.',
19
+ reason: 'Flue is experimental; app hot reload of deployed context and skills has not been verified.' },
17
20
  claude: {
18
21
  policy: 'restart-required',
19
22
  action: 'Restart Claude Code so the running session reloads deployed agents and skills.',
@@ -19,6 +19,7 @@ const POLICIES = {
19
19
  copilot: { limits: ['no-general-precedence', 'surface-and-enabled-state-required', 'scope-limited-imports', 'runtime-load-unobserved'], sessionEffect: 'next-session' },
20
20
  cursor: { limits: ['always-apply-except-globs', 'runtime-load-unobserved'], sessionEffect: 'next-session' },
21
21
  'deepseek-harness': { limits: ['runtime-load-unobserved'], sessionEffect: 'next-session' },
22
+ flue: { limits: ['runtime-load-unobserved'], sessionEffect: 'next-session' },
22
23
  factory: { limits: ['runtime-load-unobserved'], sessionEffect: 'next-session' },
23
24
  grokbot: { limits: ['runtime-load-unobserved'], sessionEffect: 'unknown' },
24
25
  'grok-build': { limits: ['runtime-load-unobserved'], sessionEffect: 'next-session' },
@@ -2533,6 +2533,29 @@
2533
2533
  }
2534
2534
  }
2535
2535
  },
2536
+ "flue": {
2537
+ "sessionEnvAllowlist": [],
2538
+ "agent": "unsupported",
2539
+ "skill": "unsupported",
2540
+ "globalChild": "unsupported",
2541
+ "identifierSyntax": "App-owned Flue model configuration; no AIWG worker selector",
2542
+ "inheritance": "Application-owned; no worker dispatch",
2543
+ "invalidPinFallback": "Report unsupported",
2544
+ "configTarget": "Application-owned",
2545
+ "artifactFormat": "Kernel SKILL.md and composed AGENTS.md",
2546
+ "verification": "Flue 2.3.0 installed source; app deployment only (#3120 D6)",
2547
+ "sourceUrl": "https://flueframework.com/docs/",
2548
+ "verifiedAt": "2026-10-30",
2549
+ "workerHealthCoverage": {
2550
+ "scope": "out",
2551
+ "coverage": "unobserved",
2552
+ "handshake": "unobserved",
2553
+ "evidenceGrades": ["R"],
2554
+ "qualificationOwner": "B-OG-47",
2555
+ "provenance": ["tools/agents/providers/flue.mjs", "docs/providers/flue.md"],
2556
+ "reason": "Flue is an app target, with no worker invocation profile or adapter (#3120 D6)."
2557
+ }
2558
+ },
2536
2559
  "grokbot": {
2537
2560
  "sessionEnvAllowlist": [],
2538
2561
  "agent": "unsupported",
@@ -327,6 +327,15 @@
327
327
  "sourceUrl": "https://docs.openclaw.ai/tools/subagents",
328
328
  "verifiedAt": "2026-07-20"
329
329
  },
330
+ "flue": {
331
+ "roles": {
332
+ "reasoning": { "id": "app-owned", "status": "unverified", "observed": false },
333
+ "coding": { "id": "app-owned", "status": "unverified", "observed": false },
334
+ "efficiency": { "id": "app-owned", "status": "unverified", "observed": false }
335
+ },
336
+ "sourceUrl": "https://flueframework.com/docs/",
337
+ "verifiedAt": "2026-10-30"
338
+ },
330
339
  "grokbot": {
331
340
  "roles": {
332
341
  "reasoning": {
@@ -22,7 +22,7 @@ export function requireModelResource(filename) {
22
22
  throw new Error(`Model policy resource is missing: ${filename}`);
23
23
  }
24
24
  export const ProviderSchema = z.enum([
25
- 'antigravity', 'claude', 'codex', 'copilot', 'cursor', 'deepseek-harness', 'factory', 'grokbot', 'grok-build', 'hermes',
25
+ 'antigravity', 'claude', 'codex', 'copilot', 'cursor', 'deepseek-harness', 'factory', 'flue', 'grokbot', 'grok-build', 'hermes',
26
26
  'muse', 'opencode', 'openclaw', 'openhuman', 'omp', 'pi', 'warp', 'windsurf',
27
27
  ]);
28
28
  //# sourceMappingURL=policy-resources.js.map
@@ -934,6 +934,57 @@ providers:
934
934
  deploy_target: project
935
935
  aggregated_output: false
936
936
 
937
+ flue:
938
+ display_name: Flue (experimental)
939
+ status: experimental
940
+ route_feasibility:
941
+ scope: out
942
+ identity: unavailable
943
+ evidence: R
944
+ channel: "none - Flue 2.3.0 app target; no worker dispatch (#3120 D6)"
945
+ coverage:
946
+ profile_issue: null
947
+ source_date: "2026-10-30"
948
+ live_qualified: false
949
+ exclusion_gap: "Flue run accepts prompts in argv and lacks worker model/effort flags; app deployment only."
950
+ recheck: "Rechecked 2026-10-30 against installed Flue 2.3.0 source; #3120 D6 excludes worker dispatch."
951
+ sources:
952
+ - "tools/agents/providers/flue.mjs"
953
+ - "docs/providers/flue.md"
954
+ - "https://flueframework.com/docs/"
955
+ fanout: unknown
956
+ probe_budget: { status: proposed, calls: 0, tokens: 0 }
957
+ daemon_tier: unsupported
958
+ daemon_pty_adapter: false
959
+ artifact_paths:
960
+ agents: ""
961
+ commands: ""
962
+ skills: .agents/skills/
963
+ rules: AGENTS.md
964
+ behaviors: null
965
+ native_features:
966
+ cron: false
967
+ agent_teams: false
968
+ tasks: false
969
+ mcp: false
970
+ behaviors: false
971
+ mission_control: false
972
+ daemon: false
973
+ emulation:
974
+ cron: null
975
+ agent_teams: null
976
+ tasks: null
977
+ mcp: null
978
+ behaviors: null
979
+ mission_control: null
980
+ daemon: null
981
+ hook_wiring:
982
+ at_link_support: false
983
+ fallback: full-inject
984
+ context_file: AGENTS.md
985
+ deploy_target: project
986
+ aggregated_output: false
987
+
937
988
  pi:
938
989
  display_name: Pi Coding Agent
939
990
  route_feasibility:
@@ -1,5 +1,6 @@
1
1
  import type { PathLike } from 'node:fs';
2
2
  export interface DeploymentOwnershipOptions {
3
+ provider?: string;
3
4
  dryRun?: boolean;
4
5
  claimUnchangedSettings?: boolean;
5
6
  onlyDeclared?: boolean;
@@ -11,7 +12,7 @@ export interface DeploymentOwnershipOptions {
11
12
  writtenFiles?: string[];
12
13
  logicalInputPath?: (file: string) => string;
13
14
  }
14
- export function deploymentOutputRoots(provider: { name: string; paths?: Record<string, string>; kernelSkillsPath?: string }, target: string): string[];
15
+ export function deploymentOutputRoots(provider: { name: string; paths?: Record<string, string>; kernelSkillsPath?: string; deploymentFiles?: (target: string) => string[] }, target: string): string[];
15
16
  export function captureDeploymentOutputs(roots: PathLike[]): Map<string, Buffer>;
16
17
  export function recordDeploymentOutputs(before: Map<string, Buffer>, roots: PathLike[], opts?: DeploymentOwnershipOptions): void;
17
18
  export function refreshSettingsDigests(record: { settings?: Record<string, unknown> }): void;
@@ -26,6 +26,7 @@ export function deploymentOutputRoots(provider, target) {
26
26
  ? dir : path.join(target, dir.split(/[\\/]/)[0]));
27
27
  if (provider.kernelSkillsPath) roots.push(path.resolve(target, provider.kernelSkillsPath));
28
28
  return [...new Set([...roots, path.join(target, `.${provider.name}`), path.join(target, '.agents'),
29
+ ...(provider.deploymentFiles?.(target) || []).map(name => path.join(target, name)),
29
30
  ...['AGENTS.md', 'AIWG.md', 'WORKSPACE.md', 'CLAUDE.md', 'WARP.md', '.hermes.md', 'opencode.json',
30
31
  '.windsurfrules', 'models.json', '.aiwg/frameworks', '.aiwg/.aiwg-manifest.json'].map(name => path.join(target, name))])];
31
32
  }
@@ -174,26 +175,35 @@ export function recordDeploymentOutputs(before, roots, opts = {}) {
174
175
  skillRoot = path.dirname(skillRoot);
175
176
  }
176
177
  const skillReceipt = parse(after.get(path.join(skillRoot, SIDECAR)));
177
- const projectScoped = projectRoot && path.dirname(file) === projectRoot;
178
+ const projectScoped = projectRoot && (path.dirname(file) === projectRoot || opts.provider === 'flue' && /[/\\](?:db\.ts|aiwg[/\\](?:tools|specialists)\.ts)$/.test(file));
178
179
  const dir = projectScoped ? path.join(projectRoot, '.aiwg') : declaration ? path.dirname(declaration.file) : skillReceipt.managed?.['SKILL.md'] ? skillRoot : path.dirname(file);
179
180
  const name = declaration?.name || portable(path.relative(projectScoped ? projectRoot : dir, file));
180
181
  const existing = manifests.get(path.join(dir, SIDECAR)) || parse(after.get(path.join(dir, SIDECAR)));
181
182
  const previous = parse(before.get(path.join(dir, SIDECAR))).managed?.[name];
182
183
  const current = existing.managed?.[name] || {};
184
+ // A redeploy may preserve operator additions around generated context.
185
+ // Keep the old digest so removal cannot restore a stale preimage over them.
186
+ if (previous?.filePreimage && before.has(file) && previous.hash !== hash(before.get(file))) continue;
183
187
  const identity = current.sourcePath || `${declaration?.receipt.skillSource}/SKILL.md`;
184
188
  const logicalSource = opts.logicalInputPath?.(identity) || identity;
185
189
  const sourceOwner = (declaration || current.hash === hash(bytes)) && (current.frameworkSlug || bundleOwner(logicalSource))
186
190
  || skillReceipt.managed?.['SKILL.md']?.frameworkSlug;
187
191
  const generatedIndex = /^RULES-(?:INDEX|ONDEMAND)\.(?:md|mdc)$/.test(path.basename(file));
188
192
  const kind = generatedIndex ? 'rule-index' : current.kind || artifactKind(file);
189
- const selectedOwner = sourceOwner || (opts.onlyDeclared ? current.owners?.[0] : owner);
193
+ const selectedOwner = opts.provider === 'flue' ? owner : sourceOwner || (opts.onlyDeclared ? current.owners?.[0] : owner);
190
194
  if (!selectedOwner) {
191
195
  console.warn(`Ownership not recorded for ${file}: no framework owner resolved.`);
192
196
  continue;
193
197
  }
194
198
  const receipt = manifest(dir);
195
199
  if (projectScoped) receipt.scope = 'project';
196
- const record = mergeArtifactOwnership(previous, { ...current, hash: hash(bytes), owners: current.hash === hash(bytes) ? current.owners : [], kind }, selectedOwner);
200
+ const record = mergeArtifactOwnership(previous, { ...current, hash: hash(bytes), owners: opts.provider === 'flue' ? [] : current.hash === hash(bytes) ? current.owners : [], kind }, selectedOwner);
201
+ // Flue's composed context and generated database/ignore outputs support
202
+ // exact restoration. Never infer a preimage for another provider's files.
203
+ if (opts.provider === 'flue' && (projectScoped || /[/\\]db\.ts$/.test(file))) {
204
+ record.filePreimage = previous?.filePreimage || { present: before.has(file),
205
+ ...(before.has(file) ? { bytes: before.get(file).toString('base64'), hash: hash(before.get(file)) } : {}) };
206
+ }
197
207
  // Structural rule indexes are generated outputs; their assembly scratch
198
208
  // directory is not a durable source identity.
199
209
  if (generatedIndex) {
@@ -128,6 +128,28 @@ export function planDeploymentRemoval(project, provider, owner, includeProject =
128
128
  }
129
129
  else if (record.kind === 'settings')
130
130
  reason = 'settings contributions missing or conflicting; unverifiable';
131
+ else if (record.filePreimage && (claims.get(target) || []).length === 1) {
132
+ const snapshot = record.filePreimage;
133
+ const prior = snapshot.present && typeof snapshot.bytes === 'string' ? Buffer.from(snapshot.bytes, 'base64') : null;
134
+ const valid = snapshot.present === false || prior !== null && hash(prior) === snapshot.hash;
135
+ const current = fs.existsSync(target) && fs.lstatSync(target).isFile() ? fs.readFileSync(target) : null;
136
+ if (valid && current && hash(current) === record.hash) {
137
+ const others = owners.filter(candidate => candidate !== owner);
138
+ if (others.length) {
139
+ record.owners = others;
140
+ remaining.push(record);
141
+ }
142
+ else {
143
+ writes.push({ path: target, before: current, after: prior });
144
+ delete receipt.managed[name];
145
+ }
146
+ decisions.push({ path: target, action: others.length || prior ? 'release' : 'remove',
147
+ reason: others.length ? 'shared generated output; release this owner only' : 'verified file preimage restored', kind: record.kind, owned: true });
148
+ changed = true;
149
+ continue;
150
+ }
151
+ reason = 'edited generated file; preserved';
152
+ }
131
153
  else if (CONTEXT_BRIDGES.has(path.basename(target)))
132
154
  reason = 'context bridge preserved; pre-deploy operator content unverifiable';
133
155
  else if ((claims.get(target) || []).some(claim => claim.hash !== record.hash))
@@ -1,5 +1,13 @@
1
1
  const VERIFIED_ON = '2026-07-21';
2
2
  export const CONTEXT_CONTRACTS = {
3
+ flue: {
4
+ startupFiles: ['AGENTS.md'], precedence: ['provider/system', 'cwd AGENTS.md bytes'],
5
+ loadMode: 'prose-directive', includeSyntax: null, configRegistration: null,
6
+ bootstrapTargets: ['AGENTS.md'], maxContextBytes: null, recommendedMaxLines: null,
7
+ nestedContext: false, support: 'supported',
8
+ verification: { method: 'Installed Flue 2.3.0 source; context must be inlined',
9
+ source: '@flue/runtime/dist/conversation-stream-store-CXrgv-b0.mjs:339-349,463-482', lastVerified: '2026-10-30' },
10
+ },
3
11
  antigravity: {
4
12
  startupFiles: ['AGENTS.md', 'GEMINI.md'],
5
13
  precedence: ['provider/system', 'project AGENTS.md or GEMINI.md', 'nested project context when selected by the CLI'],
@@ -17,6 +17,7 @@ export const ProviderDefinitionSchema = z.object({
17
17
  'cursor',
18
18
  'deepseek-harness',
19
19
  'factory',
20
+ 'flue',
20
21
  'grokbot',
21
22
  'grok-build',
22
23
  'hermes',