@hearsay-tools/squawk 0.18.0-pr3934.7442 → 0.18.0-pr3943.7448
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-config/catalog.d.ts +6 -60
- package/dist/agent-config/catalog.js +12 -337
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/files.d.ts +1 -1
- package/dist/agent-config/files.js.map +1 -1
- package/dist/agent-config/model-settings/claude.d.ts +1 -1
- package/dist/agent-config/model-settings/codex.d.ts +1 -1
- package/dist/agent-config/model-settings/opencode.d.ts +1 -1
- package/dist/agent-config/model-settings/pi.d.ts +1 -1
- package/dist/agent-config/model-settings/shared.d.ts +1 -1
- package/dist/agent-config/model-settings/shared.js +2 -2
- package/dist/agent-config/model-settings/shared.js.map +1 -1
- package/dist/agent-config/models.d.ts +5 -1
- package/dist/agent-config/models.js +5 -19
- package/dist/agent-config/models.js.map +1 -1
- package/dist/agent-config/seed.js +2 -2
- package/dist/agent-config/seed.js.map +1 -1
- package/dist/agent-config/service.d.ts +1 -1
- package/dist/agent-config/service.js +2 -2
- package/dist/agent-config/service.js.map +1 -1
- package/dist/agent-config/validate.d.ts +1 -1
- package/dist/contract/automations.d.ts +2 -1
- package/dist/contract/index.js +2 -2
- package/dist/core/host-model-catalog.d.ts +2 -1
- package/dist/core/host-model-catalog.js +7 -13
- package/dist/core/host-model-catalog.js.map +1 -1
- package/dist/core/host-skill-catalog.d.ts +5 -2
- package/dist/core/host-skill-catalog.js +9 -12
- package/dist/core/host-skill-catalog.js.map +1 -1
- package/dist/core/model-identity.d.ts +9 -11
- package/dist/core/model-identity.js +12 -28
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.d.ts +0 -5
- package/dist/core/model-presets.js +11 -30
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/opencode-minimal.js +1 -2
- package/dist/core/opencode-minimal.js.map +1 -1
- package/dist/core/opencode-runtime-config.d.ts +3 -0
- package/dist/core/opencode-runtime-config.js +11 -0
- package/dist/core/opencode-runtime-config.js.map +1 -1
- package/dist/core/pi-runner.js +1 -1
- package/dist/core/pi-runner.js.map +1 -1
- package/dist/core/runner-config-files.d.ts +60 -0
- package/dist/core/runner-config-files.js +2 -0
- package/dist/core/runner-config-files.js.map +1 -0
- package/dist/core/runner-definition.d.ts +33 -0
- package/dist/core/runner-definition.js.map +1 -1
- package/dist/{agent-config/model-settings/types.d.ts → core/runner-model-settings.d.ts} +3 -1
- package/dist/core/runner-model-settings.js +2 -0
- package/dist/core/runner-model-settings.js.map +1 -0
- package/dist/delegation/routes.d.ts +16 -16
- package/dist/delegation/transport.d.ts +74 -74
- package/dist/paths.d.ts +1 -1
- package/dist/runners/claude/config-files.d.ts +7 -0
- package/dist/runners/claude/config-files.js +112 -0
- package/dist/runners/claude/config-files.js.map +1 -0
- package/dist/runners/claude/definition.js +11 -0
- package/dist/runners/claude/definition.js.map +1 -1
- package/dist/runners/claude/extra-tools.d.ts +3 -0
- package/dist/runners/claude/extra-tools.js +4 -0
- package/dist/runners/claude/extra-tools.js.map +1 -0
- package/dist/runners/claude/models.d.ts +3 -0
- package/dist/runners/claude/models.js +16 -0
- package/dist/runners/claude/models.js.map +1 -0
- package/dist/runners/codex/config-files.d.ts +7 -0
- package/dist/runners/codex/config-files.js +58 -0
- package/dist/runners/codex/config-files.js.map +1 -0
- package/dist/runners/codex/definition.js +11 -0
- package/dist/runners/codex/definition.js.map +1 -1
- package/dist/runners/codex/extra-tools.d.ts +3 -0
- package/dist/runners/codex/extra-tools.js +4 -0
- package/dist/runners/codex/extra-tools.js.map +1 -0
- package/dist/runners/codex/models.d.ts +3 -0
- package/dist/runners/codex/models.js +9 -0
- package/dist/runners/codex/models.js.map +1 -0
- package/dist/runners/omp/config-files.d.ts +7 -0
- package/dist/runners/omp/config-files.js +87 -0
- package/dist/runners/omp/config-files.js.map +1 -0
- package/dist/runners/omp/definition.js +14 -0
- package/dist/runners/omp/definition.js.map +1 -1
- package/dist/runners/omp/extra-tools.d.ts +3 -0
- package/dist/runners/omp/extra-tools.js +6 -0
- package/dist/runners/omp/extra-tools.js.map +1 -0
- package/dist/runners/omp/models.d.ts +3 -0
- package/dist/runners/omp/models.js +9 -0
- package/dist/runners/omp/models.js.map +1 -0
- package/dist/runners/opencode/config-files.d.ts +7 -0
- package/dist/runners/opencode/config-files.js +57 -0
- package/dist/runners/opencode/config-files.js.map +1 -0
- package/dist/runners/opencode/definition.js +11 -0
- package/dist/runners/opencode/definition.js.map +1 -1
- package/dist/runners/opencode/extra-tools.d.ts +3 -0
- package/dist/runners/opencode/extra-tools.js +4 -0
- package/dist/runners/opencode/extra-tools.js.map +1 -0
- package/dist/runners/opencode/models.d.ts +3 -0
- package/dist/runners/opencode/models.js +8 -0
- package/dist/runners/opencode/models.js.map +1 -0
- package/dist/runners/pi/config-files.d.ts +7 -0
- package/dist/runners/pi/config-files.js +59 -0
- package/dist/runners/pi/config-files.js.map +1 -0
- package/dist/runners/pi/definition.js +11 -0
- package/dist/runners/pi/definition.js.map +1 -1
- package/dist/runners/pi/extra-tools.d.ts +3 -0
- package/dist/runners/pi/extra-tools.js +7 -0
- package/dist/runners/pi/extra-tools.js.map +1 -0
- package/dist/runners/pi/models.d.ts +3 -0
- package/dist/runners/pi/models.js +15 -0
- package/dist/runners/pi/models.js.map +1 -0
- package/dist/runners/project-agents-file.d.ts +6 -0
- package/dist/runners/project-agents-file.js +19 -0
- package/dist/runners/project-agents-file.js.map +1 -0
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/server.d.ts +1829 -1829
- package/dist/workflows/types.d.ts +1 -5
- package/dist/workflows/types.js +4 -15
- package/dist/workflows/types.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-dNVCOgIS.js → activity-motion-o9t7R6w0.js} +1 -1
- package/web/dist/assets/{activity-route-DMnwyl9c.js → activity-route-DFIP-vbS.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-0YMWMSS5.js → commit-diff-panel-DLHbzd-I.js} +1 -1
- package/web/dist/assets/{diff-uoV05LOo.js → diff-DW6zX5VO.js} +2 -2
- package/web/dist/assets/{diff-view-DsgNtCun.js → diff-view-B_vAaIni.js} +1 -1
- package/web/dist/assets/{file-preview-lbIox3_r.js → file-preview-xNYoqHe9.js} +1 -1
- package/web/dist/assets/{git-toolbar-BKPdSdFU.js → git-toolbar-BoSRYjTp.js} +1 -1
- package/web/dist/assets/{github-CKFgh3_h.js → github-zOTpV02k.js} +1 -1
- package/web/dist/assets/{global-activity-route-Dn7DpFx9.js → global-activity-route-BhcZDouq.js} +1 -1
- package/web/dist/assets/{index-Du3iOaSl.js → index-CWNdWkBE.js} +3 -3
- package/web/dist/assets/{markdown-4X0eZfcY.js → markdown-Ck8p1gVn.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-Bglr5RzA.js → preview-pane-connected-BvY7mK_c.js} +1 -1
- package/web/dist/assets/{repo-git-PioGdOOQ.js → repo-git-CEEZ_nZX.js} +1 -1
- package/web/dist/assets/{report-reader-CoWKOnD5.js → report-reader-Dmgy-hhv.js} +1 -1
- package/web/dist/assets/{reports-CDR_xSv6.js → reports-COAotabm.js} +1 -1
- package/web/dist/assets/{run-header--v3zgN-D.js → run-header-B8xmhI15.js} +1 -1
- package/web/dist/assets/{skills-CMCb5oGu.js → skills-BwM713T1.js} +1 -1
- package/web/dist/assets/{task-changes-gdJm6bLV.js → task-changes-0j1ulBxe.js} +1 -1
- package/web/dist/assets/{task-commits-Ddrh4yVp.js → task-commits-Dvx1tSjo.js} +1 -1
- package/web/dist/assets/{task-files-B3GsdzeL.js → task-files-DJgWkj06.js} +1 -1
- package/web/dist/assets/{task-github-item-DT3qM81J.js → task-github-item-B7GdPdvU.js} +1 -1
- package/web/dist/assets/{task-thread-Co28WXQc.js → task-thread-_qloB2zP.js} +1 -1
- package/web/dist/assets/{thread-state-Rg1AjAMm.js → thread-state-Dduv2dZP.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-BuuvdaEy.js → use-hand-to-agent-state-B29K-wGw.js} +1 -1
- package/web/dist/assets/{workflows-BROu_Zz4.js → workflows-u2-nGsg9.js} +1 -1
- package/web/dist/index.html +1 -1
- package/dist/agent-config/model-settings/types.js +0 -2
- package/dist/agent-config/model-settings/types.js.map +0 -1
- package/dist/ci-wait/injection.d.ts +0 -3
- package/dist/ci-wait/injection.js +0 -13
- package/dist/ci-wait/injection.js.map +0 -1
|
@@ -1,68 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ConfigFileDef } from '../core/runner-config-files.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Maintained catalog of native config-file paths, formats, precedence descriptions and
|
|
4
|
-
* documentation URLs
|
|
5
|
-
* their separate native-file knowledge.
|
|
4
|
+
* documentation URLs: each registered runner's `configFiles`. Unknown files are not guessed.
|
|
5
|
+
* Account relocation and identity readers own their separate native-file knowledge.
|
|
6
6
|
*/
|
|
7
|
-
export type ConfigFormat = 'json' | 'jsonc' | 'toml' | 'yaml' | 'markdown';
|
|
8
|
-
export type ConfigScope = 'user' | 'project' | 'local';
|
|
9
|
-
/** `settings` = behavior knobs; `memory` = instruction/markdown; `mcp` = a dedicated MCP file. */
|
|
10
|
-
export type ConfigKind = 'settings' | 'memory' | 'mcp';
|
|
11
7
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
8
|
+
* The whole catalog, in presentation order: per runner, in registration order. A file that
|
|
9
|
+
* several runners list (`<repo>/AGENTS.md`) appears once, at its last listing, so it follows
|
|
10
|
+
* every runner's own files.
|
|
14
11
|
*/
|
|
15
|
-
export type ConfigTracked = 'tracked' | 'gitignored' | 'outside-repo';
|
|
16
|
-
/** Resolved home directories per agent, injected so the catalog stays pure and testable. */
|
|
17
|
-
export interface AgentHomePaths {
|
|
18
|
-
/** `~/.claude` */
|
|
19
|
-
claude: string;
|
|
20
|
-
/** `$CODEX_HOME` or `~/.codex` */
|
|
21
|
-
codex: string;
|
|
22
|
-
/** `$XDG_CONFIG_HOME/opencode` or `~/.config/opencode` */
|
|
23
|
-
opencodeConfig: string;
|
|
24
|
-
/** `$PI_CODING_AGENT_DIR` or `~/.pi/agent` */
|
|
25
|
-
pi: string;
|
|
26
|
-
/** `$PI_CODING_AGENT_DIR` or `~/${PI_CONFIG_DIR || '.omp'}/agent` — OMP's default profile. */
|
|
27
|
-
omp: string;
|
|
28
|
-
}
|
|
29
|
-
export interface ConfigFileDef {
|
|
30
|
-
/** Stable, opaque, URL-safe. The ONLY thing a client may name (traversal-proof). */
|
|
31
|
-
id: string;
|
|
32
|
-
/** Every runner that reads this file. `<repo>/AGENTS.md` is one file, two readers. */
|
|
33
|
-
runners: RunnerId[];
|
|
34
|
-
kind: ConfigKind;
|
|
35
|
-
scope: ConfigScope;
|
|
36
|
-
/** Absolute path, resolved per request so `$CODEX_HOME`/`$XDG_CONFIG_HOME` are honoured. */
|
|
37
|
-
resolve: (repoRoot: string, home: AgentHomePaths) => string;
|
|
38
|
-
/** What the user sees, e.g. `~/.claude/settings.json`, `.claude/settings.local.json`. */
|
|
39
|
-
label: string;
|
|
40
|
-
format: ConfigFormat;
|
|
41
|
-
tracked: ConfigTracked;
|
|
42
|
-
/** True only for Claude's gitignored personal layer — the files seeded into a run's worktree. */
|
|
43
|
-
seeded?: boolean;
|
|
44
|
-
/** True when this file holds MCP server definitions (drives the MCP section's filter). */
|
|
45
|
-
holdsMcp?: boolean;
|
|
46
|
-
/** Top-level native setting that supplies the agent's new-session model, when present. */
|
|
47
|
-
modelKey?: string;
|
|
48
|
-
/** Native model keys checked in precedence order, including nested `env.*` settings. */
|
|
49
|
-
modelKeys?: readonly string[];
|
|
50
|
-
/** Native provider key paired with the model, when the vendor separates the two. */
|
|
51
|
-
modelProviderKey?: string;
|
|
52
|
-
/** Higher values win when resolving a native default model across config scopes. */
|
|
53
|
-
modelPriority?: number;
|
|
54
|
-
/** VERBATIM from the vendor docs. Never computed, never generic. */
|
|
55
|
-
precedence: string;
|
|
56
|
-
/** Documented mid-run reload behaviour, or undefined when the vendor is silent. */
|
|
57
|
-
hotReload?: string;
|
|
58
|
-
docsUrl: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* The table. Order is presentation order: per runner, then user → project →
|
|
62
|
-
* local so each scope ladder reads top (broad) to bottom (specific).
|
|
63
|
-
*/
|
|
64
|
-
export declare const CONFIG_FILES: ConfigFileDef[];
|
|
65
|
-
/** The whole catalog. */
|
|
66
12
|
export declare function listConfigFiles(): ConfigFileDef[];
|
|
67
13
|
/** Look up one entry by its stable id, or undefined when the id is unknown. */
|
|
68
14
|
export declare function findConfigFile(id: string): ConfigFileDef | undefined;
|
|
@@ -1,345 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const CLAUDE_SETTINGS_DOCS = 'https://code.claude.com/docs/en/settings';
|
|
3
|
-
const CLAUDE_MEMORY_DOCS = 'https://code.claude.com/docs/en/memory';
|
|
4
|
-
const CLAUDE_MCP_DOCS = 'https://code.claude.com/docs/en/mcp';
|
|
5
|
-
const CODEX_CONFIG_DOCS = 'https://developers.openai.com/codex/config-reference';
|
|
6
|
-
const CODEX_AGENTS_DOCS = 'https://developers.openai.com/codex/guides/agents-md';
|
|
7
|
-
const OPENCODE_CONFIG_DOCS = 'https://opencode.ai/docs/config/';
|
|
8
|
-
const OPENCODE_RULES_DOCS = 'https://opencode.ai/docs/rules/';
|
|
9
|
-
const PI_SETTINGS_DOCS = 'https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/settings.md';
|
|
10
|
-
const PI_CONTEXT_FILES_DOCS = 'https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/README.md#context-files';
|
|
11
|
-
const OMP_CONFIG_DOCS = 'https://github.com/can1357/oh-my-pi/blob/main/docs/config-usage.md';
|
|
12
|
-
const OMP_MCP_DOCS = 'https://github.com/can1357/oh-my-pi/blob/main/docs/mcp-config.md';
|
|
1
|
+
import { registeredRunners } from '../core/runner-registry.js';
|
|
13
2
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
3
|
+
* Maintained catalog of native config-file paths, formats, precedence descriptions and
|
|
4
|
+
* documentation URLs: each registered runner's `configFiles`. Unknown files are not guessed.
|
|
5
|
+
* Account relocation and identity readers own their separate native-file knowledge.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The whole catalog, in presentation order: per runner, in registration order. A file that
|
|
9
|
+
* several runners list (`<repo>/AGENTS.md`) appears once, at its last listing, so it follows
|
|
10
|
+
* every runner's own files.
|
|
16
11
|
*/
|
|
17
|
-
export const CONFIG_FILES = [
|
|
18
|
-
// ---- Claude Code ----
|
|
19
|
-
{
|
|
20
|
-
id: 'claude.user.settings',
|
|
21
|
-
runners: ['claude'],
|
|
22
|
-
kind: 'settings',
|
|
23
|
-
scope: 'user',
|
|
24
|
-
resolve: (_repo, home) => join(home.claude, 'settings.json'),
|
|
25
|
-
label: '~/.claude/settings.json',
|
|
26
|
-
format: 'json',
|
|
27
|
-
tracked: 'outside-repo',
|
|
28
|
-
modelKey: 'model',
|
|
29
|
-
modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
|
|
30
|
-
modelPriority: 1,
|
|
31
|
-
precedence: 'Lowest priority. Project and local settings override it key by key — except permission rules, which merge across all scopes.',
|
|
32
|
-
hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
|
|
33
|
-
docsUrl: CLAUDE_SETTINGS_DOCS,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: 'claude.project.settings',
|
|
37
|
-
runners: ['claude'],
|
|
38
|
-
kind: 'settings',
|
|
39
|
-
scope: 'project',
|
|
40
|
-
resolve: (repo) => join(repo, '.claude', 'settings.json'),
|
|
41
|
-
label: '.claude/settings.json',
|
|
42
|
-
format: 'json',
|
|
43
|
-
tracked: 'tracked',
|
|
44
|
-
modelKey: 'model',
|
|
45
|
-
modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
|
|
46
|
-
modelPriority: 2,
|
|
47
|
-
precedence: 'Overrides user settings key by key (permission rules merge). Local settings override this.',
|
|
48
|
-
hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
|
|
49
|
-
docsUrl: CLAUDE_SETTINGS_DOCS,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: 'claude.local.settings',
|
|
53
|
-
runners: ['claude'],
|
|
54
|
-
kind: 'settings',
|
|
55
|
-
scope: 'local',
|
|
56
|
-
resolve: (repo) => join(repo, '.claude', 'settings.local.json'),
|
|
57
|
-
label: '.claude/settings.local.json',
|
|
58
|
-
format: 'json',
|
|
59
|
-
tracked: 'gitignored',
|
|
60
|
-
seeded: true,
|
|
61
|
-
modelKey: 'model',
|
|
62
|
-
modelKeys: ['env.ANTHROPIC_MODEL', 'model'],
|
|
63
|
-
modelPriority: 3,
|
|
64
|
-
precedence: 'Highest of the file scopes — overrides project and user (permission rules merge). Git-ignored; copied into each run’s worktree so it takes effect immediately.',
|
|
65
|
-
hotReload: 'Edits to most keys — including permissions and hooks — apply to a running session without a restart.',
|
|
66
|
-
docsUrl: CLAUDE_SETTINGS_DOCS,
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
id: 'claude.project.mcp',
|
|
70
|
-
runners: ['claude'],
|
|
71
|
-
kind: 'mcp',
|
|
72
|
-
scope: 'project',
|
|
73
|
-
resolve: (repo) => join(repo, '.mcp.json'),
|
|
74
|
-
label: '.mcp.json',
|
|
75
|
-
format: 'json',
|
|
76
|
-
tracked: 'tracked',
|
|
77
|
-
holdsMcp: true,
|
|
78
|
-
precedence: `Project-scoped MCP servers (key: mcpServers), shared via version control. Each requires approval before use; user- and local-scoped servers live in ~/.claude.json, which Squawk does not edit.`,
|
|
79
|
-
docsUrl: CLAUDE_MCP_DOCS,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 'claude.user.memory',
|
|
83
|
-
runners: ['claude'],
|
|
84
|
-
kind: 'memory',
|
|
85
|
-
scope: 'user',
|
|
86
|
-
resolve: (_repo, home) => join(home.claude, 'CLAUDE.md'),
|
|
87
|
-
label: '~/.claude/CLAUDE.md',
|
|
88
|
-
format: 'markdown',
|
|
89
|
-
tracked: 'outside-repo',
|
|
90
|
-
precedence: 'Not overridden — every CLAUDE.md that loads is concatenated, this user file first.',
|
|
91
|
-
docsUrl: CLAUDE_MEMORY_DOCS,
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
id: 'claude.project.memory',
|
|
95
|
-
runners: ['claude'],
|
|
96
|
-
kind: 'memory',
|
|
97
|
-
scope: 'project',
|
|
98
|
-
resolve: (repo) => join(repo, 'CLAUDE.md'),
|
|
99
|
-
label: 'CLAUDE.md',
|
|
100
|
-
format: 'markdown',
|
|
101
|
-
tracked: 'tracked',
|
|
102
|
-
precedence: 'Concatenated after the user file, not replacing it. Claude does not read AGENTS.md — import it here with @AGENTS.md. Runs read the committed copy.',
|
|
103
|
-
docsUrl: CLAUDE_MEMORY_DOCS,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: 'claude.local.memory',
|
|
107
|
-
runners: ['claude'],
|
|
108
|
-
kind: 'memory',
|
|
109
|
-
scope: 'local',
|
|
110
|
-
resolve: (repo) => join(repo, 'CLAUDE.local.md'),
|
|
111
|
-
label: 'CLAUDE.local.md',
|
|
112
|
-
format: 'markdown',
|
|
113
|
-
tracked: 'gitignored',
|
|
114
|
-
seeded: true,
|
|
115
|
-
precedence: 'Loads alongside CLAUDE.md, concatenated last. Git-ignored; copied into each run’s worktree so it takes effect immediately.',
|
|
116
|
-
docsUrl: CLAUDE_MEMORY_DOCS,
|
|
117
|
-
},
|
|
118
|
-
// ---- Codex ----
|
|
119
|
-
{
|
|
120
|
-
id: 'codex.user.config',
|
|
121
|
-
runners: ['codex'],
|
|
122
|
-
kind: 'settings',
|
|
123
|
-
scope: 'user',
|
|
124
|
-
resolve: (_repo, home) => join(home.codex, 'config.toml'),
|
|
125
|
-
label: '~/.codex/config.toml',
|
|
126
|
-
format: 'toml',
|
|
127
|
-
tracked: 'outside-repo',
|
|
128
|
-
holdsMcp: true,
|
|
129
|
-
modelKey: 'model',
|
|
130
|
-
modelProviderKey: 'model_provider',
|
|
131
|
-
modelPriority: 1,
|
|
132
|
-
precedence: 'User-level defaults. A trusted project’s .codex/config.toml overrides these; some keys (provider, auth, telemetry) cannot be overridden at project scope. MCP servers live here under [mcp_servers.<id>].',
|
|
133
|
-
docsUrl: CODEX_CONFIG_DOCS,
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: 'codex.project.config',
|
|
137
|
-
runners: ['codex'],
|
|
138
|
-
kind: 'settings',
|
|
139
|
-
scope: 'project',
|
|
140
|
-
resolve: (repo) => join(repo, '.codex', 'config.toml'),
|
|
141
|
-
label: '.codex/config.toml',
|
|
142
|
-
format: 'toml',
|
|
143
|
-
tracked: 'tracked',
|
|
144
|
-
modelKey: 'model',
|
|
145
|
-
modelPriority: 2,
|
|
146
|
-
holdsMcp: true,
|
|
147
|
-
precedence: 'Applies only in projects you have trusted. Some keys (provider, auth, telemetry) cannot be overridden here. MCP servers go under [mcp_servers.<id>]. Runs read the committed copy.',
|
|
148
|
-
docsUrl: CODEX_CONFIG_DOCS,
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
id: 'codex.user.memory',
|
|
152
|
-
runners: ['codex'],
|
|
153
|
-
kind: 'memory',
|
|
154
|
-
scope: 'user',
|
|
155
|
-
resolve: (_repo, home) => join(home.codex, 'AGENTS.md'),
|
|
156
|
-
label: '~/.codex/AGENTS.md',
|
|
157
|
-
format: 'markdown',
|
|
158
|
-
tracked: 'outside-repo',
|
|
159
|
-
precedence: 'Global instructions, read first (an AGENTS.override.md beside it wins if present). Project AGENTS.md files are concatenated after and override it.',
|
|
160
|
-
docsUrl: CODEX_AGENTS_DOCS,
|
|
161
|
-
},
|
|
162
|
-
// ---- OpenCode ----
|
|
163
|
-
{
|
|
164
|
-
id: 'opencode.user.config',
|
|
165
|
-
runners: ['opencode'],
|
|
166
|
-
kind: 'settings',
|
|
167
|
-
scope: 'user',
|
|
168
|
-
resolve: (_repo, home) => join(home.opencodeConfig, 'opencode.json'),
|
|
169
|
-
label: '~/.config/opencode/opencode.json',
|
|
170
|
-
format: 'jsonc',
|
|
171
|
-
tracked: 'outside-repo',
|
|
172
|
-
holdsMcp: true,
|
|
173
|
-
modelKey: 'model',
|
|
174
|
-
modelPriority: 1,
|
|
175
|
-
precedence: 'Global config. Merged with the project config, not replaced — later configs override earlier ones only for conflicting keys. MCP servers live under the "mcp" key.',
|
|
176
|
-
docsUrl: OPENCODE_CONFIG_DOCS,
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
id: 'opencode.project.config',
|
|
180
|
-
runners: ['opencode'],
|
|
181
|
-
kind: 'settings',
|
|
182
|
-
scope: 'project',
|
|
183
|
-
resolve: (repo) => join(repo, 'opencode.json'),
|
|
184
|
-
label: 'opencode.json',
|
|
185
|
-
format: 'jsonc',
|
|
186
|
-
tracked: 'tracked',
|
|
187
|
-
holdsMcp: true,
|
|
188
|
-
modelKey: 'model',
|
|
189
|
-
modelPriority: 2,
|
|
190
|
-
precedence: 'Merged over the global config per conflicting key (not a wholesale replace). MCP servers live under the "mcp" key. Runs read the committed copy.',
|
|
191
|
-
docsUrl: OPENCODE_CONFIG_DOCS,
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
id: 'opencode.user.memory',
|
|
195
|
-
runners: ['opencode'],
|
|
196
|
-
kind: 'memory',
|
|
197
|
-
scope: 'user',
|
|
198
|
-
resolve: (_repo, home) => join(home.opencodeConfig, 'AGENTS.md'),
|
|
199
|
-
label: '~/.config/opencode/AGENTS.md',
|
|
200
|
-
format: 'markdown',
|
|
201
|
-
tracked: 'outside-repo',
|
|
202
|
-
precedence: 'Global rules. First match wins across scopes: if a project AGENTS.md exists, this global file is not read at all.',
|
|
203
|
-
docsUrl: OPENCODE_RULES_DOCS,
|
|
204
|
-
},
|
|
205
|
-
// ---- Pi ----
|
|
206
|
-
// Pi has no MCP file of its own: its README says "No MCP." — servers arrive only through a Pi
|
|
207
|
-
// extension, so nothing here carries `holdsMcp` and the cockpit's MCP group states that instead.
|
|
208
|
-
{
|
|
209
|
-
id: 'pi.user.settings',
|
|
210
|
-
runners: ['pi'],
|
|
211
|
-
kind: 'settings',
|
|
212
|
-
scope: 'user',
|
|
213
|
-
resolve: (_repo, home) => join(home.pi, 'settings.json'),
|
|
214
|
-
label: '~/.pi/agent/settings.json',
|
|
215
|
-
format: 'json',
|
|
216
|
-
tracked: 'outside-repo',
|
|
217
|
-
modelKey: 'defaultModel',
|
|
218
|
-
modelProviderKey: 'defaultProvider',
|
|
219
|
-
modelPriority: 1,
|
|
220
|
-
precedence: 'Global (all projects). Project settings override global settings — the two merge recursively, so nested objects combine rather than replace. Startup model: defaultProvider + defaultModel.',
|
|
221
|
-
docsUrl: PI_SETTINGS_DOCS,
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
id: 'pi.project.settings',
|
|
225
|
-
runners: ['pi'],
|
|
226
|
-
kind: 'settings',
|
|
227
|
-
scope: 'project',
|
|
228
|
-
resolve: (repo) => join(repo, '.pi', 'settings.json'),
|
|
229
|
-
label: '.pi/settings.json',
|
|
230
|
-
format: 'json',
|
|
231
|
-
tracked: 'tracked',
|
|
232
|
-
modelKey: 'defaultModel',
|
|
233
|
-
modelProviderKey: 'defaultProvider',
|
|
234
|
-
modelPriority: 2,
|
|
235
|
-
precedence: `Overrides global settings (merged recursively). Loaded only once the project folder is trusted; non-interactive modes such as --mode rpc fall back to defaultProjectTrust in the global settings and ignore it under "ask" or "never" — Squawk reads a native default model from it only when that value is "always". Runs read the committed copy.`,
|
|
236
|
-
docsUrl: PI_SETTINGS_DOCS,
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
id: 'pi.user.memory',
|
|
240
|
-
runners: ['pi'],
|
|
241
|
-
kind: 'memory',
|
|
242
|
-
scope: 'user',
|
|
243
|
-
resolve: (_repo, home) => join(home.pi, 'AGENTS.md'),
|
|
244
|
-
label: '~/.pi/agent/AGENTS.md',
|
|
245
|
-
format: 'markdown',
|
|
246
|
-
tracked: 'outside-repo',
|
|
247
|
-
precedence: 'Global context file, loaded first. Every AGENTS.md (or CLAUDE.md) from the parent directories down to the current one is concatenated after it; an AGENTS.override.md replaces that directory’s file only.',
|
|
248
|
-
docsUrl: PI_CONTEXT_FILES_DOCS,
|
|
249
|
-
},
|
|
250
|
-
// ---- OMP: verified 2026-10-02 against v18.4.11 ----
|
|
251
|
-
// Oh My Pi (`can1357/oh-my-pi`, docs at main @ 7318a70cf4ed). The user layer lives in
|
|
252
|
-
// `AgentHomePaths.omp` (`$PI_CODING_AGENT_DIR` or `~/${PI_CONFIG_DIR || '.omp'}/agent`, the default
|
|
253
|
-
// profile; a named profile relocates it and is not modelled). Project files always live in
|
|
254
|
-
// `<repo>/.omp/`. Settings are YAML (`config.yml`); no `modelKey`, because OMP has no native-default
|
|
255
|
-
// strategy Squawk reads (spec § Model selection). Precedence strings quote the docs in doc order;
|
|
256
|
-
// a numbered doc list is joined with "; ", its wording untouched. Not listed, by the spec's
|
|
257
|
-
// scope: `.omp/AGENTS.md` (OMP's native project context file; project memory is the shared root
|
|
258
|
-
// `AGENTS.md` row) and the `.omp/.mcp.json` / user `.mcp.json` compatibility spellings.
|
|
259
|
-
{
|
|
260
|
-
id: 'omp.user.settings',
|
|
261
|
-
runners: ['omp'],
|
|
262
|
-
kind: 'settings',
|
|
263
|
-
scope: 'user',
|
|
264
|
-
resolve: (_repo, home) => join(home.omp, 'config.yml'),
|
|
265
|
-
label: '~/.omp/agent/config.yml',
|
|
266
|
-
format: 'yaml',
|
|
267
|
-
tracked: 'outside-repo',
|
|
268
|
-
precedence:
|
|
269
|
-
// config-usage.md § Layers, the six-tier list.
|
|
270
|
-
'Effective precedence, highest first: 1. Environment variable declared on the definition (`env: "NAME"`), parsed by the setting\'s type; unparseable text counts as unset. Booleans follow `parseFlag`: empty is unset, `1`/`y`/`true`/`yes`/`on` (lower or upper case) is true, any other text is false; 2. Runtime overrides: in-memory, non-persistent; 3. Config overlays: `PI_CONFIG_FILES` (platform path-list), followed by repeated `omp --config <path>` files; all are loaded as `config.yml`-style YAML for this process only; 4. Project settings: discovered via the settings capability (`settings.json` and `config.yml` from providers); 5. Global settings: the first present file among `~/.omp/agent/config.yml` and `config.yaml`; 6. Definition default',
|
|
271
|
-
docsUrl: OMP_CONFIG_DOCS,
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
id: 'omp.project.settings',
|
|
275
|
-
runners: ['omp'],
|
|
276
|
-
kind: 'settings',
|
|
277
|
-
scope: 'project',
|
|
278
|
-
resolve: (repo) => join(repo, '.omp', 'config.yml'),
|
|
279
|
-
label: '.omp/config.yml',
|
|
280
|
-
format: 'yaml',
|
|
281
|
-
tracked: 'tracked',
|
|
282
|
-
precedence: 'Project settings: discovered via the settings capability (`settings.json` and `config.yml` from providers). Within the native provider, project `config.yml` follows and overrides `settings.json`. Runs read the committed copy.',
|
|
283
|
-
docsUrl: OMP_CONFIG_DOCS,
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
id: 'omp.user.mcp',
|
|
287
|
-
runners: ['omp'],
|
|
288
|
-
kind: 'mcp',
|
|
289
|
-
scope: 'user',
|
|
290
|
-
resolve: (_repo, home) => join(home.omp, 'mcp.json'),
|
|
291
|
-
label: '~/.omp/agent/mcp.json',
|
|
292
|
-
format: 'json',
|
|
293
|
-
tracked: 'outside-repo',
|
|
294
|
-
holdsMcp: true,
|
|
295
|
-
precedence: 'Across providers, the first definition wins. Duplicate names are not merged; OpenCode\'s internal config layers are the exception described above. Within OMP native config, project `.omp/mcp.json` precedes `.omp/.mcp.json`, then the active profile\'s user `mcp.json` and `.mcp.json`.',
|
|
296
|
-
docsUrl: OMP_MCP_DOCS,
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
id: 'omp.project.mcp',
|
|
300
|
-
runners: ['omp'],
|
|
301
|
-
kind: 'mcp',
|
|
302
|
-
scope: 'project',
|
|
303
|
-
resolve: (repo) => join(repo, '.omp', 'mcp.json'),
|
|
304
|
-
label: '.omp/mcp.json',
|
|
305
|
-
format: 'json',
|
|
306
|
-
tracked: 'tracked',
|
|
307
|
-
holdsMcp: true,
|
|
308
|
-
precedence: 'Across providers, the first definition wins. Duplicate names are not merged; OpenCode\'s internal config layers are the exception described above. Within OMP native config, project `.omp/mcp.json` precedes `.omp/.mcp.json`, then the active profile\'s user `mcp.json` and `.mcp.json`. Runs read the committed copy.',
|
|
309
|
-
docsUrl: OMP_MCP_DOCS,
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
id: 'omp.user.memory',
|
|
313
|
-
runners: ['omp'],
|
|
314
|
-
kind: 'memory',
|
|
315
|
-
scope: 'user',
|
|
316
|
-
resolve: (_repo, home) => join(home.omp, 'AGENTS.md'),
|
|
317
|
-
label: '~/.omp/agent/AGENTS.md',
|
|
318
|
-
format: 'markdown',
|
|
319
|
-
tracked: 'outside-repo',
|
|
320
|
-
precedence: '`SYSTEM.md`, `SYSTEM_TEMPLATE.md`, `RULES.md`, and `.omp/AGENTS.md` read user-level files directly and use the nearest non-empty ancestor `.omp` directory for project files. Context files: `.omp/AGENTS.md`; standalone ancestor `AGENTS.md` files are loaded separately by the low-priority `agents-md` provider',
|
|
321
|
-
docsUrl: OMP_CONFIG_DOCS,
|
|
322
|
-
},
|
|
323
|
-
// ---- Shared: <repo>/AGENTS.md is read by Codex, OpenCode, Pi AND OMP ----
|
|
324
|
-
{
|
|
325
|
-
id: 'project.agents',
|
|
326
|
-
runners: ['codex', 'opencode', 'pi', 'omp'],
|
|
327
|
-
kind: 'memory',
|
|
328
|
-
scope: 'project',
|
|
329
|
-
resolve: (repo) => join(repo, 'AGENTS.md'),
|
|
330
|
-
label: 'AGENTS.md',
|
|
331
|
-
format: 'markdown',
|
|
332
|
-
tracked: 'tracked',
|
|
333
|
-
precedence: 'Read by Codex, OpenCode, Pi and OMP (Claude ignores it). Codex concatenates it root-down; OpenCode uses the first match and prefers it over CLAUDE.md; Pi concatenates every AGENTS.md (or CLAUDE.md) from the parent directories down, after its global file; OMP loads standalone ancestor AGENTS.md files through its low-priority `agents-md` provider. Runs read the committed copy.',
|
|
334
|
-
docsUrl: OPENCODE_RULES_DOCS,
|
|
335
|
-
},
|
|
336
|
-
];
|
|
337
|
-
/** The whole catalog. */
|
|
338
12
|
export function listConfigFiles() {
|
|
339
|
-
|
|
13
|
+
const files = registeredRunners().flatMap((definition) => definition.configFiles);
|
|
14
|
+
return files.filter((file, index) => files.lastIndexOf(file) === index);
|
|
340
15
|
}
|
|
341
16
|
/** Look up one entry by its stable id, or undefined when the id is unknown. */
|
|
342
17
|
export function findConfigFile(id) {
|
|
343
|
-
return
|
|
18
|
+
return listConfigFiles().find((f) => f.id === id);
|
|
344
19
|
}
|
|
345
20
|
//# sourceMappingURL=catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/agent-config/catalog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/agent-config/catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAClF,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,OAAO,eAAe,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ConfigFileDef } from '../core/runner-config-files.ts';
|
|
2
2
|
/**
|
|
3
3
|
* Read and write native config by catalog id. Validate syntax and content version; write exact
|
|
4
4
|
* bytes atomically through symlinks. Missing files are absent; other failures return errors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/agent-config/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/agent-config/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;GAGG;AAEH,mFAAmF;AACnF,SAAS,SAAS,CAAC,OAAe;IAChC,OAAO,UAAU,CAAC,QAA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,cAAc,CAAC,IAAY;IAC/C,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACpC,CAAC;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AgentModelSettingsStrategy } from '
|
|
1
|
+
import type { AgentModelSettingsStrategy } from '../../core/runner-model-settings.ts';
|
|
2
2
|
export declare const claudeModelSettingsStrategy: AgentModelSettingsStrategy;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AgentModelSettingsStrategy } from '
|
|
1
|
+
import type { AgentModelSettingsStrategy } from '../../core/runner-model-settings.ts';
|
|
2
2
|
export declare const codexModelSettingsStrategy: AgentModelSettingsStrategy;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AgentModelSettingsStrategy } from '
|
|
1
|
+
import type { AgentModelSettingsStrategy } from '../../core/runner-model-settings.ts';
|
|
2
2
|
export declare const opencodeModelSettingsStrategy: AgentModelSettingsStrategy;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AgentModelSettingsStrategy } from '
|
|
1
|
+
import type { AgentModelSettingsStrategy } from '../../core/runner-model-settings.ts';
|
|
2
2
|
export declare const piModelSettingsStrategy: AgentModelSettingsStrategy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RunnerId } from '../../core/agent-runner.ts';
|
|
2
|
-
import {
|
|
2
|
+
import type { ConfigFileDef, ConfigFormat } from '../../core/runner-config-files.ts';
|
|
3
3
|
export interface NativeSettingsFile {
|
|
4
4
|
def: ConfigFileDef;
|
|
5
5
|
content: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parse as parseToml } from 'smol-toml';
|
|
2
2
|
import { parse as parseYaml } from 'yaml';
|
|
3
|
-
import {
|
|
3
|
+
import { listConfigFiles } from '../catalog.js';
|
|
4
4
|
import { readConfigFile } from '../files.js';
|
|
5
5
|
import { stripJsonComments } from '../validate.js';
|
|
6
6
|
/** Remove JSONC trailing commas without touching commas inside string values. */
|
|
@@ -60,7 +60,7 @@ function stringAtPath(content, format, path) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
export async function readNativeSettingsFiles(runner, repoRoot, env) {
|
|
63
|
-
const definitions =
|
|
63
|
+
const definitions = listConfigFiles().filter((definition) => definition.kind === 'settings' &&
|
|
64
64
|
definition.runners.includes(runner) &&
|
|
65
65
|
definition.modelKey !== undefined &&
|
|
66
66
|
definition.modelPriority !== undefined).sort((left, right) => (right.modelPriority ?? 0) - (left.modelPriority ?? 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/agent-config/model-settings/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAOnD,iFAAiF;AACjF,SAAS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,KAAoC;IAC1E,KAAK,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,KAAK,EAAE,CAAC;QACrC,IAAI,CAAC,GAAG,CAAC,gBAAgB;YAAE,SAAS;QACpC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACzE,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;IAChC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { type RunnerId } from '../core/agent-runner.ts';
|
|
2
|
-
import type { AgentModelSettings } from '
|
|
2
|
+
import type { AgentModelSettings } from '../core/runner-model-settings.ts';
|
|
3
3
|
/** The model defaults exposed by the coding agents' own settings files. */
|
|
4
4
|
export type AgentModelDefaults = Partial<Record<RunnerId, string>>;
|
|
5
|
+
/**
|
|
6
|
+
* Each runner owns its native-settings policy: its definition's `models.loadSettings`. Vendor
|
|
7
|
+
* precedence, environment variables, and provider composition stay inside that runner's module.
|
|
8
|
+
*/
|
|
5
9
|
export declare function readAgentModelSettings(runner: RunnerId, repoRoot: string, env?: NodeJS.ProcessEnv): Promise<AgentModelSettings>;
|
|
6
10
|
/** Read the current default model for each installed/configured coding agent. */
|
|
7
11
|
export declare function readAgentModelDefaults(repoRoot: string, env?: NodeJS.ProcessEnv): Promise<AgentModelDefaults>;
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import { RUNNER_IDS } from '../core/agent-runner.js';
|
|
2
|
-
import {
|
|
3
|
-
import { codexModelSettingsStrategy } from './model-settings/codex.js';
|
|
4
|
-
import { opencodeModelSettingsStrategy } from './model-settings/opencode.js';
|
|
5
|
-
import { piModelSettingsStrategy } from './model-settings/pi.js';
|
|
2
|
+
import { runnerDefinition } from '../core/runner-registry.js';
|
|
6
3
|
/**
|
|
7
|
-
* Each runner owns its native-settings policy
|
|
8
|
-
*
|
|
9
|
-
* and provider composition stay inside that runner's module.
|
|
4
|
+
* Each runner owns its native-settings policy: its definition's `models.loadSettings`. Vendor
|
|
5
|
+
* precedence, environment variables, and provider composition stay inside that runner's module.
|
|
10
6
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
codex: codexModelSettingsStrategy,
|
|
14
|
-
opencode: opencodeModelSettingsStrategy,
|
|
15
|
-
pi: piModelSettingsStrategy,
|
|
16
|
-
// OMP's native default model (its model roles) is not read: no native-default strategy, by the
|
|
17
|
-
// spec's scope (§ Model selection). Returning nothing leaves the prompt unpinned, so OMP's own
|
|
18
|
-
// model roles apply.
|
|
19
|
-
omp: { runner: 'omp', async read() { return {}; } },
|
|
20
|
-
};
|
|
21
|
-
export function readAgentModelSettings(runner, repoRoot, env = process.env) {
|
|
22
|
-
return MODEL_SETTINGS_STRATEGIES[runner].read(repoRoot, env);
|
|
7
|
+
export async function readAgentModelSettings(runner, repoRoot, env = process.env) {
|
|
8
|
+
return (await runnerDefinition(runner).models.loadSettings()).read(repoRoot, env);
|
|
23
9
|
}
|
|
24
10
|
/** Read the current default model for each installed/configured coding agent. */
|
|
25
11
|
export async function readAgentModelDefaults(repoRoot, env = process.env) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/agent-config/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/agent-config/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAM9D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAgB,EAChB,QAAgB,EAChB,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,OAAO,CAAC,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AACpF,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,QAAgB,EAChB,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;QAC/B,MAAM;QACN,CAAC,MAAM,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK;KACnD,CAAC,CACZ,CAAC;IACF,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAwC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC;AACrH,CAAC;AAED,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,MAAgB,EAChB,QAAgB,EAChB,GAAG,GAAsB,OAAO,CAAC,GAAG;IAEpC,OAAO,CAAC,MAAM,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AACxE,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { git } from '../git-command.js';
|
|
|
4
4
|
import { agentHomePaths } from '../paths.js';
|
|
5
5
|
import { excludeFromGit } from '../worktree-paths.js';
|
|
6
6
|
import { copyIdentity, withWorktreeFiles } from '../worktree-manifest.js';
|
|
7
|
-
import {
|
|
7
|
+
import { listConfigFiles } from './catalog.js';
|
|
8
8
|
/**
|
|
9
9
|
* Seed only supported gitignored personal config into task worktrees and exclude it from Git.
|
|
10
10
|
* Tracked files apply through commits and are never copied here.
|
|
@@ -38,7 +38,7 @@ export async function seedAgentConfigLocalLayer(repoRoot, worktreeCwd, env = pro
|
|
|
38
38
|
return [];
|
|
39
39
|
const home = agentHomePaths(env);
|
|
40
40
|
const sources = [];
|
|
41
|
-
for (const def of
|
|
41
|
+
for (const def of listConfigFiles()) {
|
|
42
42
|
if (!def.seeded)
|
|
43
43
|
continue;
|
|
44
44
|
const src = def.resolve(repoRoot, home);
|