@ai-outfitter/outfitter 1.5.0 → 1.6.0
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 +11 -2
- package/code/pi-extension/src/outfitter-extension.js +9 -1
- package/dist/agents/AgentLaunch.d.ts +2 -2
- package/dist/agents/AgentLaunch.js +4 -3
- package/dist/agents/AgentLaunch.js.map +1 -1
- package/dist/agents/ClaudeStatePersistence.d.ts +18 -0
- package/dist/agents/ClaudeStatePersistence.js +225 -0
- package/dist/agents/ClaudeStatePersistence.js.map +1 -0
- package/dist/cli/OutfitterCli.js +1 -1
- package/dist/cli/OutfitterCli.js.map +1 -1
- package/dist/cli/commands/RunAgentCommand.js +76 -15
- package/dist/cli/commands/RunAgentCommand.js.map +1 -1
- package/dist/cli/commands/SyncCommand.d.ts +7 -3
- package/dist/cli/commands/SyncCommand.js +110 -20
- package/dist/cli/commands/SyncCommand.js.map +1 -1
- package/dist/projection/CodexMcp.d.ts +11 -0
- package/dist/projection/CodexMcp.js +143 -0
- package/dist/projection/CodexMcp.js.map +1 -0
- package/dist/projection/Materialize.d.ts +3 -1
- package/dist/projection/Materialize.js +7 -3
- package/dist/projection/Materialize.js.map +1 -1
- package/dist/projection/ProjectHarness.js +66 -29
- package/dist/projection/ProjectHarness.js.map +1 -1
- package/dist/projection/Projection.d.ts +2 -0
- package/dist/resolver/Layer.d.ts +5 -2
- package/dist/resolver/Layer.js +47 -8
- package/dist/resolver/Layer.js.map +1 -1
- package/dist/resolver/ResolverContext.d.ts +1 -1
- package/dist/resolver/ResolverContext.js +1 -1
- package/dist/resolver/ResolverContext.js.map +1 -1
- package/dist/resolver/ResolverValidation.d.ts +12 -1
- package/dist/resolver/ResolverValidation.js +30 -20
- package/dist/resolver/ResolverValidation.js.map +1 -1
- package/dist/schemas/settings.schema.json +1 -1
- package/dist/schemas/system-extension-hook.schema.json +38 -0
- package/dist/settings/Settings.d.ts +1 -1
- package/dist/settings/Settings.js +1 -1
- package/dist/settings/Settings.js.map +1 -1
- package/dist/settings/SettingsLoader.js.map +1 -1
- package/dist/setup/DefaultCatalog.d.ts +18 -0
- package/dist/setup/DefaultCatalog.js +74 -13
- package/dist/setup/DefaultCatalog.js.map +1 -1
- package/dist/sources/SourceCache.d.ts +20 -0
- package/dist/sources/SourceCache.js +31 -1
- package/dist/sources/SourceCache.js.map +1 -1
- package/dist/sources/TransitiveSources.d.ts +43 -0
- package/dist/sources/TransitiveSources.js +177 -0
- package/dist/sources/TransitiveSources.js.map +1 -0
- package/dist/system/SystemExtensionHook.d.ts +34 -0
- package/dist/system/SystemExtensionHook.js +190 -0
- package/dist/system/SystemExtensionHook.js.map +1 -0
- package/dist/validation/SchemaValidator.d.ts +1 -1
- package/dist/validation/SchemaValidator.js +2 -0
- package/dist/validation/SchemaValidator.js.map +1 -1
- package/docs/architecture/state_writeback_strategy.md +15 -3
- package/docs/documentation/README.md +14 -1
- package/docs/documentation/catalogs.md +61 -2
- package/docs/documentation/cli.md +2 -1
- package/docs/documentation/concepts.md +2 -2
- package/docs/documentation/hooks.md +33 -0
- package/docs/documentation/in-cluster.md +2 -0
- package/docs/documentation/migration.md +1 -1
- package/docs/documentation/personas.md +1 -1
- package/docs/documentation/settings.md +1 -1
- package/docs/documentation/state.md +27 -0
- package/docs/documentation/support-matrix.md +34 -23
- package/docs/documentation/usecases/org-onboarding-sdlc-report.md +143 -0
- package/docs/documentation/usecases/persona-reviews.md +1 -1
- package/docs/philosophy.md +20 -0
- package/package.json +1 -1
- package/src/schemas/settings.schema.json +1 -1
- package/src/schemas/system-extension-hook.schema.json +38 -0
|
@@ -1,26 +1,36 @@
|
|
|
1
|
-
// Projects a harness-neutral CompositionPlan to a native pi
|
|
1
|
+
// Projects a harness-neutral CompositionPlan to a native pi, Claude Code, or Codex CLI launch.
|
|
2
2
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { PI_SESSION_DIRECTORY_ENV } from '../agents/PiSessionDirectory.js';
|
|
5
|
+
import { projectCodexMcpServers } from './CodexMcp.js';
|
|
5
6
|
import { materializeComposition, materializeConfigurationOverlays } from './Materialize.js';
|
|
6
7
|
import { toolArgs } from './Tools.js';
|
|
7
8
|
// Loadout elements a projection actually maps to native config. Anything else is reported
|
|
8
|
-
// unsupported so `--strict` catches silently-dropped selections. Baseline for
|
|
9
|
+
// unsupported so `--strict` catches silently-dropped selections. Baseline for pi and Claude is
|
|
9
10
|
// identity + skills + model + thinking + tools. Both harnesses express an allowlist and a denylist
|
|
10
11
|
// natively, so `tools` is unconditionally supported; a name projection cannot carry is a hard error
|
|
11
12
|
// from `toolArgs`, not an unsupported element. Pi also projects selected subagents and MCP servers
|
|
12
13
|
// into its runtime config directory, and projects `extensions` once the run path has resolved their
|
|
13
|
-
// install dirs (`extensionLoadDirs`).
|
|
14
|
+
// install dirs (`extensionLoadDirs`). Claude projects selected MCP servers through an explicit,
|
|
15
|
+
// isolated `--mcp-config`; plugins remain unsupported pending incremental parity (#183).
|
|
16
|
+
// Switched rather than chained so a harness added to `Harness` fails to compile here instead of
|
|
17
|
+
// silently inheriting another harness's element set — the exact silent drop this function prevents.
|
|
14
18
|
const supportedElements = (input) => {
|
|
15
|
-
const baseline = ['skills', 'model', 'thinking', 'tools'];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
const baseline = ['identity', 'skills', 'model', 'thinking', 'tools'];
|
|
20
|
+
switch (input.harness) {
|
|
21
|
+
case 'claude':
|
|
22
|
+
return [...baseline, 'mcp'];
|
|
23
|
+
case 'codex':
|
|
24
|
+
return ['model', 'mcp'];
|
|
25
|
+
case 'pi': {
|
|
26
|
+
const pi = [...baseline, 'subagents', 'mcp', 'prompt_template'];
|
|
27
|
+
return input.extensionLoadDirs === undefined ? pi : [...pi, 'extensions'];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
20
30
|
};
|
|
21
31
|
const loadoutElementsInUse = (composition) => {
|
|
22
32
|
const { loadout } = composition;
|
|
23
|
-
const present = [];
|
|
33
|
+
const present = ['identity'];
|
|
24
34
|
if (loadout.skills.length > 0)
|
|
25
35
|
present.push('skills');
|
|
26
36
|
if (loadout.subagents.length > 0)
|
|
@@ -81,17 +91,28 @@ const promptArgs = (composition, input, systemPromptPath, appendPromptPaths) =>
|
|
|
81
91
|
? ['--prompt-template', `${input.rootDirectory}/prompt-template.md`]
|
|
82
92
|
: []),
|
|
83
93
|
];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
// Split from the thinking flag so each builder states positively what it emits: codex reports
|
|
95
|
+
// `thinking` unsupported, and reporting an element unsupported does not by itself suppress it.
|
|
96
|
+
const modelArg = (composition, flag) => composition.loadout.model === undefined ? [] : [flag, composition.loadout.model];
|
|
97
|
+
const thinkingArg = (composition, harness) => composition.loadout.thinking === undefined
|
|
98
|
+
? []
|
|
99
|
+
: [harness === 'pi' ? '--thinking' : '--effort', composition.loadout.thinking];
|
|
100
|
+
// MCP overrides lead and pass-through args trail so a pass-through positional (`exec "<prompt>"`)
|
|
101
|
+
// stays last, where codex expects its subcommand and prompt.
|
|
102
|
+
const buildCodexLaunchPlan = (composition, input, codexMcpArgs) => ({
|
|
103
|
+
command: 'codex',
|
|
104
|
+
// Root `-m` propagation through `exec` was verified empirically on codex-cli 0.145.0.
|
|
105
|
+
args: [...codexMcpArgs, ...modelArg(composition, '-m'), ...(input.passThroughArgs ?? [])],
|
|
106
|
+
env: {},
|
|
107
|
+
});
|
|
108
|
+
// Claude's user, project, and plugin MCP sources would otherwise merge into the composition, so the
|
|
109
|
+
// generated config is named explicitly and `--strict-mcp-config` suppresses every other layer.
|
|
110
|
+
const claudeMcpArgs = (mcpConfigPath) => [
|
|
111
|
+
'--mcp-config',
|
|
112
|
+
mcpConfigPath,
|
|
113
|
+
'--strict-mcp-config',
|
|
114
|
+
];
|
|
115
|
+
const buildPiOrClaudeLaunchPlan = (composition, input, materialized, appendPromptPaths) => {
|
|
95
116
|
const isPi = input.harness === 'pi';
|
|
96
117
|
const skillArgs = isPi ? composition.loadout.skills.flatMap((skill) => ['--skill', skill.slug]) : [];
|
|
97
118
|
const extensionArgs = isPi ? (input.extensionLoadDirs ?? []).flatMap((dir) => ['--extension', dir]) : [];
|
|
@@ -102,10 +123,12 @@ const buildLaunchPlan = (composition, input, systemPromptPath, appendPromptPaths
|
|
|
102
123
|
// variadic and stop only at the next `--flag`, and the prompt args that follow always start
|
|
103
124
|
// with one. Placed later they could swallow a pass-through positional. See Tools.ts.
|
|
104
125
|
...(composition.loadout.tools === undefined ? [] : toolArgs(input.harness, composition.loadout.tools)),
|
|
105
|
-
...promptArgs(composition, input, systemPromptPath, appendPromptPaths),
|
|
126
|
+
...promptArgs(composition, input, materialized.systemPromptPath, appendPromptPaths),
|
|
106
127
|
...skillArgs,
|
|
107
128
|
...extensionArgs,
|
|
108
|
-
...
|
|
129
|
+
...modelArg(composition, '--model'),
|
|
130
|
+
...thinkingArg(composition, input.harness),
|
|
131
|
+
...(isPi ? [] : claudeMcpArgs(join(input.rootDirectory, 'mcp.json'))),
|
|
109
132
|
...(input.passThroughArgs ?? []),
|
|
110
133
|
],
|
|
111
134
|
// The projection root is deleted after the run, so pi's default session store (a subdirectory
|
|
@@ -124,17 +147,31 @@ export const projectComposition = (composition, input) => {
|
|
|
124
147
|
if (input.harness === 'pi') {
|
|
125
148
|
materializeConfigurationOverlays(input.configurationOverlayDirectories ?? [], input.rootDirectory);
|
|
126
149
|
}
|
|
127
|
-
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
...(input.appendPromptPaths ?? []),
|
|
132
|
-
]);
|
|
150
|
+
// Materialization runs for every harness so containment and definition diagnostics are reported
|
|
151
|
+
// uniformly. Codex reads none of the generated files — it takes its MCP config in argv and has no
|
|
152
|
+
// config-directory projection yet — but the root is temporary, so the unused writes do not persist.
|
|
153
|
+
const materialized = materializeComposition(composition, input.rootDirectory, input.harness);
|
|
133
154
|
const unsupported = [
|
|
134
155
|
...unsupportedElements(composition, input),
|
|
135
156
|
...materialized.skippedSkills.map((slug) => `skill:${slug} (escaping symlink)`),
|
|
136
157
|
...materialized.skippedSubagents.map((slug) => `subagent:${slug} (invalid definition)`),
|
|
137
158
|
];
|
|
138
|
-
|
|
159
|
+
if (input.harness === 'codex') {
|
|
160
|
+
const codexMcp = projectCodexMcpServers(composition.loadout.mcp, composition.loadout.mcpServers);
|
|
161
|
+
const launch = buildCodexLaunchPlan(composition, input, codexMcp.args);
|
|
162
|
+
const warnings = [
|
|
163
|
+
...(input.appendPromptPaths?.length
|
|
164
|
+
? ['codex adapter does not project supplied append-prompt documents; they will be dropped.']
|
|
165
|
+
: []),
|
|
166
|
+
...codexMcp.warnings,
|
|
167
|
+
];
|
|
168
|
+
return { rootDirectory: input.rootDirectory, launch, unsupported, warnings };
|
|
169
|
+
}
|
|
170
|
+
// Caller documents follow the composition's own, so a persona is read against the agent it adopts.
|
|
171
|
+
const launch = buildPiOrClaudeLaunchPlan(composition, input, materialized, [
|
|
172
|
+
...materialized.appendPromptPaths,
|
|
173
|
+
...(input.appendPromptPaths ?? []),
|
|
174
|
+
]);
|
|
175
|
+
return { rootDirectory: input.rootDirectory, launch, unsupported, warnings: [] };
|
|
139
176
|
};
|
|
140
177
|
//# sourceMappingURL=ProjectHarness.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectHarness.js","sourceRoot":"","sources":["../../src/projection/ProjectHarness.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ProjectHarness.js","sourceRoot":"","sources":["../../src/projection/ProjectHarness.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAA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G,oBAAoB,CAAC,WAAW,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,QAAQ,GAAG;YACf,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,MAAM;gBACjC,CAAC,CAAC,CAAC,wFAAwF,CAAC;gBAC5F,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,QAAQ,CAAC,QAAQ;SACrB,CAAC;QACF,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;IAC/E,CAAC;IAED,mGAAmG;IACnG,MAAM,MAAM,GAAG,yBAAyB,CAAC,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE;QACzE,GAAG,YAAY,CAAC,iBAAiB;QACjC,GAAG,CAAC,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC;KACnC,CAAC,CAAC;IAEH,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;AACnF,CAAC,CAAC"}
|
|
@@ -10,6 +10,8 @@ export interface AgentProjectionPlan {
|
|
|
10
10
|
readonly launch: AgentLaunchPlan;
|
|
11
11
|
/** Composition elements the selected harness cannot project. */
|
|
12
12
|
readonly unsupported: readonly string[];
|
|
13
|
+
/** Adapter limitations or malformed native configuration discovered during projection. */
|
|
14
|
+
readonly warnings: readonly string[];
|
|
13
15
|
}
|
|
14
16
|
export interface ProjectionInput {
|
|
15
17
|
readonly harness: Harness;
|
package/dist/resolver/Layer.d.ts
CHANGED
|
@@ -20,9 +20,12 @@ export interface LayerDiscoveryResult {
|
|
|
20
20
|
* would deadlock every other command behind advice the user cannot act on (OFTR-004.2.15).
|
|
21
21
|
*/
|
|
22
22
|
readonly unsynchronized: readonly string[];
|
|
23
|
+
/** Non-fatal transitive-source skip warnings (unpinned refs, path sources, invalid settings). */
|
|
24
|
+
readonly warnings: readonly string[];
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
|
-
* Orders layers highest precedence first: workspace `.agents`, then global `~/.agents`,
|
|
26
|
-
*
|
|
27
|
+
* Orders layers highest precedence first: workspace `.agents`, then global `~/.agents`, then
|
|
28
|
+
* configured sources in order, then transitive sources those catalogs declare, breadth-first
|
|
29
|
+
* (OFTR-004.6.1, OFTR-004.6.3). Only layers whose root exists on disk are included.
|
|
27
30
|
*/
|
|
28
31
|
export declare const discoverLayers: (input: LayerDiscoveryInput) => LayerDiscoveryResult;
|
package/dist/resolver/Layer.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// Builds the ordered `.agents` layer stack (workspace over global over remote sources) from settings.
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { createRemoteRepositoryCachePath, formatRemoteSourceDisplay, isRemoteSource,
|
|
4
|
+
import { createRemoteRepositoryCachePath, encodeRemoteSourceSelection, formatRemoteSourceDisplay, isRemoteSource, resolveSourcePayloadRoot, } from '../sources/SourceCache.js';
|
|
5
|
+
import { expandTransitiveSources } from '../sources/TransitiveSources.js';
|
|
5
6
|
const agentsRoot = (directory) => join(directory, '.agents');
|
|
6
7
|
/**
|
|
7
8
|
* Maps an already-materialized repository checkout to the layer `outfitter run` would resolve from
|
|
8
9
|
* it. `outfitter sync` reuses this against its temporary checkout so both agree on the payload root.
|
|
9
10
|
*/
|
|
10
11
|
export const remoteSourceLayer = (repositoryPath, source) => ({
|
|
11
|
-
root:
|
|
12
|
+
root: resolveSourcePayloadRoot(repositoryPath, source),
|
|
12
13
|
origin: 'source',
|
|
13
14
|
label: formatRemoteSourceDisplay(source),
|
|
14
15
|
});
|
|
@@ -16,8 +17,9 @@ const sourceLayer = (input, source) => isRemoteSource(source)
|
|
|
16
17
|
? remoteSourceLayer(createRemoteRepositoryCachePath(input.homeDirectory, source, input.settings.cacheDirectory), source)
|
|
17
18
|
: { root: source.path, origin: 'source', label: source.path };
|
|
18
19
|
/**
|
|
19
|
-
* Orders layers highest precedence first: workspace `.agents`, then global `~/.agents`,
|
|
20
|
-
*
|
|
20
|
+
* Orders layers highest precedence first: workspace `.agents`, then global `~/.agents`, then
|
|
21
|
+
* configured sources in order, then transitive sources those catalogs declare, breadth-first
|
|
22
|
+
* (OFTR-004.6.1, OFTR-004.6.3). Only layers whose root exists on disk are included.
|
|
21
23
|
*/
|
|
22
24
|
export const discoverLayers = (input) => {
|
|
23
25
|
const candidates = [
|
|
@@ -25,14 +27,51 @@ export const discoverLayers = (input) => {
|
|
|
25
27
|
{ root: agentsRoot(input.homeDirectory), origin: 'global', label: 'global' },
|
|
26
28
|
];
|
|
27
29
|
const unsynchronized = [];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
const invalid = [];
|
|
31
|
+
const appendSourceLayer = (source) => {
|
|
32
|
+
// An absolute or escaping `path:` makes payload-root resolution throw; skip the source with a
|
|
33
|
+
// warning rather than crash every resolve command (list/validate/run/dump).
|
|
34
|
+
let layer;
|
|
35
|
+
try {
|
|
36
|
+
layer = sourceLayer(input, source);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
invalid.push(`Configured source '${isRemoteSource(source) ? formatRemoteSourceDisplay(source) : source.path}' has an invalid path and was skipped.`);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
30
42
|
if (isRemoteSource(source) && !existsSync(layer.root)) {
|
|
31
43
|
unsynchronized.push(`Configured remote source '${layer.label}' is not synchronized at '${layer.root}'. Run 'outfitter sync' to fetch it.`);
|
|
32
|
-
|
|
44
|
+
return;
|
|
33
45
|
}
|
|
34
46
|
candidates.push(layer);
|
|
47
|
+
};
|
|
48
|
+
// Deduplicate exact-duplicate configured sources so an identical entry listed twice yields one
|
|
49
|
+
// layer, not a self-shadowing pair (OFTR-004.6.6). Distinct subpaths stay distinct (path-aware).
|
|
50
|
+
const seenSources = new Set();
|
|
51
|
+
const directSources = (input.settings.sources ?? []).filter((source) => {
|
|
52
|
+
const key = isRemoteSource(source) ? encodeRemoteSourceSelection(source) : `path\0${source.path}`;
|
|
53
|
+
if (seenSources.has(key))
|
|
54
|
+
return false;
|
|
55
|
+
seenSources.add(key);
|
|
56
|
+
return true;
|
|
57
|
+
});
|
|
58
|
+
for (const source of directSources) {
|
|
59
|
+
appendSourceLayer(source);
|
|
60
|
+
}
|
|
61
|
+
const expansion = expandTransitiveSources({
|
|
62
|
+
directSources,
|
|
63
|
+
resolveCachedCheckoutRoot: (source) => {
|
|
64
|
+
const checkoutRoot = createRemoteRepositoryCachePath(input.homeDirectory, source, input.settings.cacheDirectory);
|
|
65
|
+
return existsSync(checkoutRoot) ? checkoutRoot : undefined;
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
for (const transitive of expansion.sources) {
|
|
69
|
+
appendSourceLayer(transitive.source);
|
|
35
70
|
}
|
|
36
|
-
return {
|
|
71
|
+
return {
|
|
72
|
+
layers: candidates.filter((layer) => existsSync(layer.root)),
|
|
73
|
+
unsynchronized,
|
|
74
|
+
warnings: [...invalid, ...expansion.warnings],
|
|
75
|
+
};
|
|
37
76
|
};
|
|
38
77
|
//# sourceMappingURL=Layer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layer.js","sourceRoot":"","sources":["../../src/resolver/Layer.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"Layer.js","sourceRoot":"","sources":["../../src/resolver/Layer.ts"],"names":[],"mappings":"AAAA,sGAAsG;AACtG,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,+BAA+B,EAC/B,2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AM,MAAM,IAAI,aAAa,EAAE,CAAC;QACnC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM,SAAS,GAAG,uBAAuB,CAAC;QACxC,aAAa;QACb,yBAAyB,EAAE,CAAC,MAAM,EAAE,EAAE;YACpC,MAAM,YAAY,GAAG,+BAA+B,CAAC,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YACjH,OAAO,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7D,CAAC;KACF,CAAC,CAAC;IACH,KAAK,MAAM,UAAU,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;QAC3C,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED,OAAO;QACL,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5D,cAAc;QACd,QAAQ,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,CAAC,QAAQ,CAAC;KAC9C,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -10,7 +10,7 @@ export interface ResolveResult {
|
|
|
10
10
|
/** The merged settings loaded during resolution, so callers need not reload them. */
|
|
11
11
|
readonly settings: Settings;
|
|
12
12
|
readonly settingsIssues: readonly SettingsLoadIssue[];
|
|
13
|
-
/** Non-fatal
|
|
13
|
+
/** Non-fatal guidance: uncached remote sources plus transitive-source skip warnings. */
|
|
14
14
|
readonly warnings: readonly string[];
|
|
15
15
|
}
|
|
16
16
|
/** The single shared resolution path used by list, validate, run, and dump. */
|
|
@@ -10,7 +10,7 @@ export const resolveEffectiveSet = (input) => {
|
|
|
10
10
|
set: resolveResources(discovered.layers),
|
|
11
11
|
settings: loadedSettings.settings,
|
|
12
12
|
settingsIssues: loadedSettings.issues,
|
|
13
|
-
warnings: discovered.unsynchronized,
|
|
13
|
+
warnings: [...discovered.unsynchronized, ...discovered.warnings],
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=ResolverContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolverContext.js","sourceRoot":"","sources":["../../src/resolver/ResolverContext.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAgBjD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAmB,EAAiB,EAAE;IACxE,MAAM,cAAc,GAAG,oCAAoC,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEnF,OAAO;QACL,GAAG,EAAE,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC;QACxC,QAAQ,EAAE,cAAc,CAAC,QAAQ;QACjC,cAAc,EAAE,cAAc,CAAC,MAAM;QACrC,QAAQ,EAAE,UAAU,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"ResolverContext.js","sourceRoot":"","sources":["../../src/resolver/ResolverContext.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAgBjD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAmB,EAAiB,EAAE;IACxE,MAAM,cAAc,GAAG,oCAAoC,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEnF,OAAO;QACL,GAAG,EAAE,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC;QACxC,QAAQ,EAAE,cAAc,CAAC,QAAQ;QACjC,cAAc,EAAE,cAAc,CAAC,MAAM;QACrC,QAAQ,EAAE,CAAC,GAAG,UAAU,CAAC,cAAc,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC;KACjE,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -4,8 +4,19 @@ export interface ValidationFinding {
|
|
|
4
4
|
readonly resource: string;
|
|
5
5
|
readonly message: string;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Options for {@link validateEffectiveSet}. `deferLoadoutResolution` downgrades an unresolved
|
|
9
|
+
* loadout slug reference from an error to a warning — used when validating a single remote source
|
|
10
|
+
* in isolation during `outfitter sync`, where a catalog may legitimately reference a skill supplied
|
|
11
|
+
* by a catalog it declares as a dependency (OFTR-004.6). Loadout wholeness is then authoritatively
|
|
12
|
+
* enforced against the merged effective set by `outfitter validate`; the run-time composer surfaces
|
|
13
|
+
* an unresolved reference as a non-fatal warning (OFTR-005.3.4), fatal only under `run --strict`.
|
|
14
|
+
*/
|
|
15
|
+
export interface ValidationOptions {
|
|
16
|
+
readonly deferLoadoutResolution?: boolean;
|
|
17
|
+
}
|
|
7
18
|
/**
|
|
8
19
|
* Collects validation findings across the effective set. `error` findings always fail validation;
|
|
9
20
|
* `warning` findings (such as shadowed definitions) fail only under `--strict`.
|
|
10
21
|
*/
|
|
11
|
-
export declare const validateEffectiveSet: (set: EffectiveResourceSet, projectDirectory?: string) => readonly ValidationFinding[];
|
|
22
|
+
export declare const validateEffectiveSet: (set: EffectiveResourceSet, projectDirectory?: string, options?: ValidationOptions) => readonly ValidationFinding[];
|
|
@@ -3,8 +3,12 @@ import { compose } from '../composer/Composer.js';
|
|
|
3
3
|
import { isSkillDocumentIssue, readSkillDocument } from '../skills/SkillDocument.js';
|
|
4
4
|
import { isAgentDefinitionIssue, readAgentDefinition } from './AgentDefinition.js';
|
|
5
5
|
import { agentLocalKinds, findResource, listAgentResources, listResources } from './Resource.js';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
// Matches the composer's top-level unresolved-loadout warning wording (see `compose` in Composer.ts).
|
|
7
|
+
// It is deliberately coupled to that message; `resolver-validation.test.ts` drives the real composer,
|
|
8
|
+
// so a wording drift fails that test rather than silently disabling deferral.
|
|
9
|
+
const isUnresolvedLoadoutReference = (message) => /^loadout (?:skills|subagents) references unknown (?:skill|agent) '/.test(message);
|
|
10
|
+
const compositionWarningSeverity = (message, options) => isUnresolvedLoadoutReference(message) && !options.deferLoadoutResolution ? 'error' : 'warning';
|
|
11
|
+
const validateAgent = (set, agent, options, projectDirectory) => {
|
|
8
12
|
const definition = readAgentDefinition(agent.winner.path, agent.configPaths);
|
|
9
13
|
if (isAgentDefinitionIssue(definition)) {
|
|
10
14
|
return [{ severity: 'error', resource: `agent:${agent.slug}`, message: definition.message }];
|
|
@@ -22,7 +26,7 @@ const validateAgent = (set, agent, projectDirectory) => {
|
|
|
22
26
|
const compositionFindings = [
|
|
23
27
|
...composed.errors.map((message) => ({ severity: 'error', resource: `agent:${agent.slug}`, message })),
|
|
24
28
|
...composed.warnings.map((message) => ({
|
|
25
|
-
severity: compositionWarningSeverity(message),
|
|
29
|
+
severity: compositionWarningSeverity(message, options),
|
|
26
30
|
resource: `agent:${agent.slug}`,
|
|
27
31
|
message,
|
|
28
32
|
})),
|
|
@@ -76,34 +80,40 @@ const deduplicateFindings = (findings) => {
|
|
|
76
80
|
}
|
|
77
81
|
return [...deduplicated.values()];
|
|
78
82
|
};
|
|
83
|
+
// Validates one agent's local resources: the owning agent must resolve, and each local skill is
|
|
84
|
+
// document-checked; knowledge/commands are opaque file trees today, so only shadowing is surfaced.
|
|
85
|
+
const validateAgentLocalResources = (set, agentSlug) => {
|
|
86
|
+
const findings = [];
|
|
87
|
+
if (findResource(set, 'agent', agentSlug) === undefined) {
|
|
88
|
+
findings.push({
|
|
89
|
+
severity: 'error',
|
|
90
|
+
resource: `agent:${agentSlug}`,
|
|
91
|
+
message: 'agent-local resources require a resolvable owning agent.',
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
for (const kind of agentLocalKinds) {
|
|
95
|
+
for (const resource of listAgentResources(set, agentSlug, kind)) {
|
|
96
|
+
findings.push(...shadowFindings(resource));
|
|
97
|
+
if (kind === 'skill')
|
|
98
|
+
findings.push(...validateSkill(resource));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return findings;
|
|
102
|
+
};
|
|
79
103
|
/**
|
|
80
104
|
* Collects validation findings across the effective set. `error` findings always fail validation;
|
|
81
105
|
* `warning` findings (such as shadowed definitions) fail only under `--strict`.
|
|
82
106
|
*/
|
|
83
|
-
export const validateEffectiveSet = (set, projectDirectory) => {
|
|
107
|
+
export const validateEffectiveSet = (set, projectDirectory, options = {}) => {
|
|
84
108
|
const findings = [];
|
|
85
109
|
for (const agent of listResources(set, 'agent')) {
|
|
86
|
-
findings.push(...validateAgent(set, agent, projectDirectory), ...reservedNamespaceFindings(agent));
|
|
110
|
+
findings.push(...validateAgent(set, agent, options, projectDirectory), ...reservedNamespaceFindings(agent));
|
|
87
111
|
}
|
|
88
112
|
for (const skill of listResources(set, 'skill')) {
|
|
89
113
|
findings.push(...validateSkill(skill));
|
|
90
114
|
}
|
|
91
115
|
for (const [agentSlug] of set.agentResources) {
|
|
92
|
-
|
|
93
|
-
findings.push({
|
|
94
|
-
severity: 'error',
|
|
95
|
-
resource: `agent:${agentSlug}`,
|
|
96
|
-
message: 'agent-local resources require a resolvable owning agent.',
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
for (const kind of agentLocalKinds) {
|
|
100
|
-
for (const resource of listAgentResources(set, agentSlug, kind)) {
|
|
101
|
-
findings.push(...shadowFindings(resource));
|
|
102
|
-
// Only skills have a document reader today; knowledge/commands are opaque file trees.
|
|
103
|
-
if (kind === 'skill')
|
|
104
|
-
findings.push(...validateSkill(resource));
|
|
105
|
-
}
|
|
106
|
-
}
|
|
116
|
+
findings.push(...validateAgentLocalResources(set, agentSlug));
|
|
107
117
|
}
|
|
108
118
|
for (const kind of ['agent', 'skill', 'knowledge', 'command']) {
|
|
109
119
|
for (const resource of listResources(set, kind)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolverValidation.js","sourceRoot":"","sources":["../../src/resolver/ResolverValidation.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ResolverValidation.js","sourceRoot":"","sources":["../../src/resolver/ResolverValidation.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAoBjG,sGAAsG;AACtG,sGAAsG;AACtG,8EAA8E;AAC9E,MAAM,4BAA4B,GAAG,CAAC,OAAe,EAAW,EAAE,CAChE,oEAAoE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;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,CAAC;IAED,KAAK,MAAM,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;QAC7C,QAAQ,CAAC,IAAI,CAAC,GAAG,2BAA2B,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,CAAU,EAAE,CAAC;QACvE,KAAK,MAAM,QAAQ,IAAI,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;YAChD,QAAQ,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;IAED,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
7
|
"default_agent": { "type": "string", "minLength": 1 },
|
|
8
|
-
"default_harness": { "enum": ["pi", "claude"] },
|
|
8
|
+
"default_harness": { "enum": ["pi", "claude", "codex"] },
|
|
9
9
|
"cache_directory": { "type": "string", "minLength": 1 },
|
|
10
10
|
"state_persistence": {
|
|
11
11
|
"type": "object",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://outfitter.dev/schemas/system-extension-hook.schema.json",
|
|
4
|
+
"title": "Outfitter system extension hook",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["name", "harnesses"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": { "type": "string", "minLength": 1 },
|
|
9
|
+
"harnesses": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"minProperties": 1,
|
|
12
|
+
"properties": {
|
|
13
|
+
"pi": { "$ref": "#/$defs/harnessHook" },
|
|
14
|
+
"claude": { "$ref": "#/$defs/harnessHook" },
|
|
15
|
+
"codex": { "$ref": "#/$defs/harnessHook" }
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"$defs": {
|
|
22
|
+
"harnessHook": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"extensions": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": { "type": "string", "pattern": "^/" }
|
|
28
|
+
},
|
|
29
|
+
"env": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
|
|
32
|
+
"additionalProperties": { "type": "string" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -7,7 +7,7 @@ export type SettingsValue = string | number | boolean | null | readonly Settings
|
|
|
7
7
|
};
|
|
8
8
|
export type CustomSettings = Readonly<Record<string, SettingsValue>>;
|
|
9
9
|
/** Harnesses Outfitter can launch a composed agent in. */
|
|
10
|
-
export declare const HARNESSES: readonly ["pi", "claude"];
|
|
10
|
+
export declare const HARNESSES: readonly ["pi", "claude", "codex"];
|
|
11
11
|
export type Harness = (typeof HARNESSES)[number];
|
|
12
12
|
/** Functional persistence strategies for adapter-declared state paths. */
|
|
13
13
|
export type StatePersistenceStrategy = 'symlink' | 'discard' | 'warn' | 'error' | 'prompt';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../src/settings/Settings.ts"],"names":[],"mappings":"AAQA,0DAA0D;AAC1D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../src/settings/Settings.ts"],"names":[],"mappings":"AAQA,0DAA0D;AAC1D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAuC5D,MAAM,CAAC,MAAM,aAAa,GAAG,GAAa,EAAE,CAAC,CAAC;IAC5C,OAAO,EAAE,EAAE;IACX,cAAc,EAAE,EAAE;CACnB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsLoader.js","sourceRoot":"","sources":["../../src/settings/SettingsLoader.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAE5G,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsLoader.js","sourceRoot":"","sources":["../../src/settings/SettingsLoader.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAE5G,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AASlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAoEzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAsC,EAAoB,EAAE,CAAC,CAAC;IACnG,SAAS;CACV,CAAC,CAAC;AA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AAG,CAAC,MAAsB,EAAE,iBAAyB,EAAmB,EAAE;IAC3F,IAAI,MAAM,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,IAAK,EAAE,iBAAiB,CAAC,EAAE,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,cAAsB,EAAE,iBAAyB,EAAU,EAAE;IAC3F,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QAC/B,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,OAAO,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;AACpD,CAAC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { syncRemoteRepositoryAtomically } from '../sources/GitRepository.js';
|
|
1
2
|
import type { RemoteSourceReference } from '../sources/SourceCache.js';
|
|
3
|
+
/** Fetches one repository into the cache. Injectable so tests exercise bootstrap hermetically. */
|
|
4
|
+
export type RepositorySync = typeof syncRemoteRepositoryAtomically;
|
|
2
5
|
export declare const defaultCatalogSource: {
|
|
3
6
|
readonly github: "ai-outfitter/default-profiles";
|
|
4
7
|
readonly ref: "v1.1.0";
|
|
@@ -9,6 +12,13 @@ export interface PinnedCatalogBootstrapInput {
|
|
|
9
12
|
readonly source: RemoteSourceReference & {
|
|
10
13
|
readonly ref: string;
|
|
11
14
|
};
|
|
15
|
+
readonly syncRepository?: RepositorySync;
|
|
16
|
+
/**
|
|
17
|
+
* Proves a fetched checkout is a usable catalog. Defaults to requiring `agents/` — the picker root
|
|
18
|
+
* must offer agents — but a dependency may legitimately ship only skills, so the closure relaxes
|
|
19
|
+
* this to any recognized `.agents` payload directory.
|
|
20
|
+
*/
|
|
21
|
+
readonly requirePayload?: (root: string) => boolean;
|
|
12
22
|
}
|
|
13
23
|
export interface PinnedCatalogBootstrapResult {
|
|
14
24
|
readonly root: string;
|
|
@@ -18,4 +28,12 @@ export interface PinnedCatalogBootstrapResult {
|
|
|
18
28
|
}
|
|
19
29
|
/** Fetches one immutable catalog revision into the same cache path used by normal source resolution. */
|
|
20
30
|
export declare const bootstrapPinnedCatalog: (input: PinnedCatalogBootstrapInput) => PinnedCatalogBootstrapResult;
|
|
31
|
+
/**
|
|
32
|
+
* Bootstraps a pinned catalog and the pinned `github:` closure it declares, so a fresh install can
|
|
33
|
+
* resolve a default profile whose skills live in a depended-on catalog (the founder profile's
|
|
34
|
+
* persona skills, shipped by community-profiles) without a manual `outfitter sync`. The root failing
|
|
35
|
+
* to fetch is fatal (existing behavior); a declared dependency failing to fetch is best-effort —
|
|
36
|
+
* resolution reports it as unsynchronized rather than blocking setup on it.
|
|
37
|
+
*/
|
|
38
|
+
export declare const bootstrapPinnedClosure: (input: PinnedCatalogBootstrapInput) => PinnedCatalogBootstrapResult;
|
|
21
39
|
export declare const bootstrapDefaultCatalog: (homeDirectory: string, cacheDirectory?: string) => PinnedCatalogBootstrapResult;
|