@ai-outfitter/outfitter 0.11.0 → 1.0.2
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/.outfitter/skills/outfitter/SKILL.md +67 -37
- package/README.md +63 -35
- package/code/enterprise/cli/privateCatalogSettings.cjs +2 -2
- package/code/enterprise/pi-extension/privateCatalogOnboarding.js +5 -8
- package/code/enterprise/shared/privateCatalogPolicy.cjs +5 -5
- package/code/pi-extension/src/outfitter-extension.js +353 -553
- package/code/pi-extension/src/outfitter-runtime-extension.js +160 -0
- package/dist/agents/AgentLaunch.d.ts +9 -1
- package/dist/agents/AgentLaunch.js +19 -0
- package/dist/agents/AgentLaunch.js.map +1 -1
- package/dist/agents/PiCredentialPersistence.d.ts +6 -0
- package/dist/agents/PiCredentialPersistence.js +33 -0
- package/dist/agents/PiCredentialPersistence.js.map +1 -0
- package/dist/cli/OutfitterCli.js +10 -18
- package/dist/cli/OutfitterCli.js.map +1 -1
- package/dist/cli/commands/CommandObject.d.ts +0 -5
- package/dist/cli/commands/CommandObject.js +1 -4
- package/dist/cli/commands/CommandObject.js.map +1 -1
- package/dist/cli/commands/DumpCommand.d.ts +19 -0
- package/dist/cli/commands/DumpCommand.js +54 -0
- package/dist/cli/commands/DumpCommand.js.map +1 -0
- package/dist/cli/commands/ListCommand.d.ts +17 -0
- package/dist/cli/commands/ListCommand.js +77 -0
- package/dist/cli/commands/ListCommand.js.map +1 -0
- package/dist/cli/commands/PiRuntimeLaunch.d.ts +8 -0
- package/dist/cli/commands/PiRuntimeLaunch.js +47 -0
- package/dist/cli/commands/PiRuntimeLaunch.js.map +1 -0
- package/dist/cli/commands/ProcessDefaults.d.ts +2 -0
- package/dist/cli/commands/ProcessDefaults.js +5 -0
- package/dist/cli/commands/ProcessDefaults.js.map +1 -0
- package/dist/cli/commands/RunAgentCommand.d.ts +46 -0
- package/dist/cli/commands/RunAgentCommand.js +176 -0
- package/dist/cli/commands/RunAgentCommand.js.map +1 -0
- package/dist/cli/commands/SetupCommand.d.ts +38 -6
- package/dist/cli/commands/SetupCommand.js +194 -232
- package/dist/cli/commands/SetupCommand.js.map +1 -1
- package/dist/cli/commands/ValidateCommand.d.ts +20 -0
- package/dist/cli/commands/ValidateCommand.js +54 -0
- package/dist/cli/commands/ValidateCommand.js.map +1 -0
- package/dist/composer/Composer.d.ts +11 -0
- package/dist/composer/Composer.js +72 -0
- package/dist/composer/Composer.js.map +1 -0
- package/dist/composer/Composition.d.ts +33 -0
- package/dist/composer/Composition.js +2 -0
- package/dist/composer/Composition.js.map +1 -0
- package/dist/dump/Containment.d.ts +8 -0
- package/dist/dump/Containment.js +22 -0
- package/dist/dump/Containment.js.map +1 -0
- package/dist/dump/Dump.d.ts +8 -0
- package/dist/dump/Dump.js +182 -0
- package/dist/dump/Dump.js.map +1 -0
- package/dist/extensions/PiExtensionCache.d.ts +30 -0
- package/dist/extensions/PiExtensionCache.js +92 -0
- package/dist/extensions/PiExtensionCache.js.map +1 -0
- package/dist/fs/TypeConflict.d.ts +6 -0
- package/dist/fs/TypeConflict.js +21 -0
- package/dist/fs/TypeConflict.js.map +1 -0
- package/dist/paths/OutfitterCache.d.ts +6 -0
- package/dist/paths/OutfitterCache.js +17 -0
- package/dist/paths/OutfitterCache.js.map +1 -0
- package/dist/projection/Materialize.d.ts +24 -0
- package/dist/projection/Materialize.js +83 -0
- package/dist/projection/Materialize.js.map +1 -0
- package/dist/projection/ProjectHarness.d.ts +5 -0
- package/dist/projection/ProjectHarness.js +77 -0
- package/dist/projection/ProjectHarness.js.map +1 -0
- package/dist/projection/Projection.d.ts +23 -0
- package/dist/projection/Projection.js +2 -0
- package/dist/projection/Projection.js.map +1 -0
- package/dist/resolver/AgentDefinition.d.ts +30 -0
- package/dist/resolver/AgentDefinition.js +123 -0
- package/dist/resolver/AgentDefinition.js.map +1 -0
- package/dist/resolver/Layer.d.ts +12 -0
- package/dist/resolver/Layer.js +30 -0
- package/dist/resolver/Layer.js.map +1 -0
- package/dist/resolver/Resolver.d.ts +3 -0
- package/dist/resolver/Resolver.js +163 -0
- package/dist/resolver/Resolver.js.map +1 -0
- package/dist/resolver/ResolverContext.d.ts +15 -0
- package/dist/resolver/ResolverContext.js +11 -0
- package/dist/resolver/ResolverContext.js.map +1 -0
- package/dist/resolver/ResolverValidation.d.ts +11 -0
- package/dist/resolver/ResolverValidation.js +112 -0
- package/dist/resolver/ResolverValidation.js.map +1 -0
- package/dist/resolver/Resource.d.ts +88 -0
- package/dist/resolver/Resource.js +34 -0
- package/dist/resolver/Resource.js.map +1 -0
- package/dist/schemas/agent.schema.json +48 -0
- package/dist/schemas/settings.schema.json +32 -9
- package/dist/settings/Settings.d.ts +34 -5
- package/dist/settings/Settings.js +3 -1
- package/dist/settings/Settings.js.map +1 -1
- package/dist/settings/SettingsLoader.d.ts +1 -1
- package/dist/settings/SettingsLoader.js +23 -22
- package/dist/settings/SettingsLoader.js.map +1 -1
- package/dist/settings/SettingsMerger.js +12 -10
- package/dist/settings/SettingsMerger.js.map +1 -1
- package/dist/setup/DefaultCatalog.d.ts +20 -0
- package/dist/setup/DefaultCatalog.js +89 -0
- package/dist/setup/DefaultCatalog.js.map +1 -0
- package/dist/setup/Setup.d.ts +43 -0
- package/dist/setup/Setup.js +261 -0
- package/dist/setup/Setup.js.map +1 -0
- package/dist/skills/SkillDocument.d.ts +6 -1
- package/dist/skills/SkillDocument.js.map +1 -1
- package/dist/sources/SourceCache.d.ts +19 -0
- package/dist/{profiles/ProfileCache.js → sources/SourceCache.js} +22 -18
- package/dist/sources/SourceCache.js.map +1 -0
- package/dist/validation/SchemaValidator.d.ts +1 -1
- package/dist/validation/SchemaValidator.js +4 -13
- package/dist/validation/SchemaValidator.js.map +1 -1
- package/docs/architecture/state_writeback_strategy.md +54 -122
- package/docs/documentation/README.md +33 -12
- package/docs/documentation/actions.md +35 -52
- package/docs/documentation/agents.md +109 -0
- package/docs/documentation/best-practices.md +25 -63
- package/docs/documentation/catalogs.md +126 -0
- package/docs/documentation/cli.md +39 -41
- package/docs/documentation/concepts.md +66 -23
- package/docs/documentation/dump-and-bake.md +30 -0
- package/docs/documentation/first-time-cli-agent-users.md +8 -8
- package/docs/documentation/getting-started.md +28 -8
- package/docs/documentation/hooks.md +20 -0
- package/docs/documentation/iterating-on-profiles.md +56 -70
- package/docs/documentation/local-development.md +84 -0
- package/docs/documentation/migration.md +39 -0
- package/docs/documentation/personas.md +41 -0
- package/docs/documentation/porting-claude.md +54 -0
- package/docs/documentation/profiles.md +16 -169
- package/docs/documentation/settings.md +61 -0
- package/docs/documentation/skills.md +93 -334
- package/docs/documentation/state.md +24 -62
- package/docs/documentation/subagents.md +37 -0
- package/docs/documentation/support-matrix.md +40 -35
- package/docs/documentation/switching-to-outfitter.md +75 -81
- package/docs/documentation/tasks.md +13 -0
- package/docs/documentation/usecases/engineering.md +67 -84
- package/docs/documentation/usecases/organization-profile-catalog.md +83 -111
- package/docs/documentation/usecases/persona-reviews.md +133 -139
- package/docs/philosophy.md +2 -2
- package/package.json +3 -3
- package/src/schemas/agent.schema.json +48 -0
- package/src/schemas/settings.schema.json +32 -9
- package/dist/agents/AdapterProfileControls.d.ts +0 -21
- package/dist/agents/AdapterProfileControls.js +0 -76
- package/dist/agents/AdapterProfileControls.js.map +0 -1
- package/dist/agents/AdapterStatePaths.d.ts +0 -12
- package/dist/agents/AdapterStatePaths.js +0 -46
- package/dist/agents/AdapterStatePaths.js.map +0 -1
- package/dist/agents/AgentAdapter.d.ts +0 -44
- package/dist/agents/AgentAdapter.js +0 -2
- package/dist/agents/AgentAdapter.js.map +0 -1
- package/dist/agents/AgentRegistry.d.ts +0 -6
- package/dist/agents/AgentRegistry.js +0 -17
- package/dist/agents/AgentRegistry.js.map +0 -1
- package/dist/agents/LaunchResources.d.ts +0 -17
- package/dist/agents/LaunchResources.js +0 -61
- package/dist/agents/LaunchResources.js.map +0 -1
- package/dist/agents/OutfitterSkill.d.ts +0 -11
- package/dist/agents/OutfitterSkill.js +0 -128
- package/dist/agents/OutfitterSkill.js.map +0 -1
- package/dist/agents/ResourceIdentity.d.ts +0 -2
- package/dist/agents/ResourceIdentity.js +0 -51
- package/dist/agents/ResourceIdentity.js.map +0 -1
- package/dist/agents/claude/ClaudeAdapter.d.ts +0 -2
- package/dist/agents/claude/ClaudeAdapter.js +0 -148
- package/dist/agents/claude/ClaudeAdapter.js.map +0 -1
- package/dist/agents/claude/ClaudeCompositeProfileWriter.d.ts +0 -5
- package/dist/agents/claude/ClaudeCompositeProfileWriter.js +0 -7
- package/dist/agents/claude/ClaudeCompositeProfileWriter.js.map +0 -1
- package/dist/agents/pi/PiAdapter.d.ts +0 -2
- package/dist/agents/pi/PiAdapter.js +0 -363
- package/dist/agents/pi/PiAdapter.js.map +0 -1
- package/dist/agents/pi/PiArgs.d.ts +0 -2
- package/dist/agents/pi/PiArgs.js +0 -15
- package/dist/agents/pi/PiArgs.js.map +0 -1
- package/dist/agents/pi/PiCompositeProfileWriter.d.ts +0 -5
- package/dist/agents/pi/PiCompositeProfileWriter.js +0 -7
- package/dist/agents/pi/PiCompositeProfileWriter.js.map +0 -1
- package/dist/agents/pi/PiExtensionCache.d.ts +0 -12
- package/dist/agents/pi/PiExtensionCache.js +0 -195
- package/dist/agents/pi/PiExtensionCache.js.map +0 -1
- package/dist/agents/pi/PiMcpConfig.d.ts +0 -2
- package/dist/agents/pi/PiMcpConfig.js +0 -114
- package/dist/agents/pi/PiMcpConfig.js.map +0 -1
- package/dist/agents/pi/PiSettingsMergePolicy.d.ts +0 -17
- package/dist/agents/pi/PiSettingsMergePolicy.js +0 -59
- package/dist/agents/pi/PiSettingsMergePolicy.js.map +0 -1
- package/dist/agents/pi/PiSkillSources.d.ts +0 -8
- package/dist/agents/pi/PiSkillSources.js +0 -73
- package/dist/agents/pi/PiSkillSources.js.map +0 -1
- package/dist/cli/commands/FirstRunWelcomeProfile.d.ts +0 -11
- package/dist/cli/commands/FirstRunWelcomeProfile.js +0 -110
- package/dist/cli/commands/FirstRunWelcomeProfile.js.map +0 -1
- package/dist/cli/commands/PiLoginLaunch.d.ts +0 -22
- package/dist/cli/commands/PiLoginLaunch.js +0 -170
- package/dist/cli/commands/PiLoginLaunch.js.map +0 -1
- package/dist/cli/commands/RunCommand.d.ts +0 -36
- package/dist/cli/commands/RunCommand.js +0 -345
- package/dist/cli/commands/RunCommand.js.map +0 -1
- package/dist/cli/commands/SyncCommand.d.ts +0 -46
- package/dist/cli/commands/SyncCommand.js +0 -244
- package/dist/cli/commands/SyncCommand.js.map +0 -1
- package/dist/cli/commands/WelcomeCommand.d.ts +0 -56
- package/dist/cli/commands/WelcomeCommand.js +0 -224
- package/dist/cli/commands/WelcomeCommand.js.map +0 -1
- package/dist/cli/commands/assets/outfitter-ascii.txt +0 -5
- package/dist/cli/commands/profile/Command.d.ts +0 -7
- package/dist/cli/commands/profile/Command.js +0 -24
- package/dist/cli/commands/profile/Command.js.map +0 -1
- package/dist/cli/commands/profile/CreateCommand.d.ts +0 -19
- package/dist/cli/commands/profile/CreateCommand.js +0 -115
- package/dist/cli/commands/profile/CreateCommand.js.map +0 -1
- package/dist/cli/commands/profile/LintCommand.d.ts +0 -19
- package/dist/cli/commands/profile/LintCommand.js +0 -155
- package/dist/cli/commands/profile/LintCommand.js.map +0 -1
- package/dist/cli/commands/profile/ListCommand.d.ts +0 -19
- package/dist/cli/commands/profile/ListCommand.js +0 -91
- package/dist/cli/commands/profile/ListCommand.js.map +0 -1
- package/dist/cli/commands/profile/Shared.d.ts +0 -9
- package/dist/cli/commands/profile/Shared.js +0 -10
- package/dist/cli/commands/profile/Shared.js.map +0 -1
- package/dist/cli/commands/run/RunFirstRunOnboarding.d.ts +0 -7
- package/dist/cli/commands/run/RunFirstRunOnboarding.js +0 -52
- package/dist/cli/commands/run/RunFirstRunOnboarding.js.map +0 -1
- package/dist/cli/commands/run/RunLaunchSummary.d.ts +0 -2
- package/dist/cli/commands/run/RunLaunchSummary.js +0 -35
- package/dist/cli/commands/run/RunLaunchSummary.js.map +0 -1
- package/dist/cli/commands/run/RunProfileResolution.d.ts +0 -39
- package/dist/cli/commands/run/RunProfileResolution.js +0 -128
- package/dist/cli/commands/run/RunProfileResolution.js.map +0 -1
- package/dist/cli/commands/run/RunStateWritePrompt.d.ts +0 -2
- package/dist/cli/commands/run/RunStateWritePrompt.js +0 -29
- package/dist/cli/commands/run/RunStateWritePrompt.js.map +0 -1
- package/dist/cli/commands/setup/SetupPrompts.d.ts +0 -14
- package/dist/cli/commands/setup/SetupPrompts.js +0 -296
- package/dist/cli/commands/setup/SetupPrompts.js.map +0 -1
- package/dist/cli/commands/setup/SetupSourceImport.d.ts +0 -5
- package/dist/cli/commands/setup/SetupSourceImport.js +0 -177
- package/dist/cli/commands/setup/SetupSourceImport.js.map +0 -1
- package/dist/cli/commands/setup/SetupSourceLaunch.d.ts +0 -4
- package/dist/cli/commands/setup/SetupSourceLaunch.js +0 -65
- package/dist/cli/commands/setup/SetupSourceLaunch.js.map +0 -1
- package/dist/cli/commands/setup/SetupStarterSource.d.ts +0 -21
- package/dist/cli/commands/setup/SetupStarterSource.js +0 -133
- package/dist/cli/commands/setup/SetupStarterSource.js.map +0 -1
- package/dist/cli/commands/setup/SetupTypes.d.ts +0 -91
- package/dist/cli/commands/setup/SetupTypes.js +0 -26
- package/dist/cli/commands/setup/SetupTypes.js.map +0 -1
- package/dist/compositeProfile/CompositeProfile.d.ts +0 -8
- package/dist/compositeProfile/CompositeProfile.js +0 -6
- package/dist/compositeProfile/CompositeProfile.js.map +0 -1
- package/dist/compositeProfile/CompositeProfileAssembler.d.ts +0 -12
- package/dist/compositeProfile/CompositeProfileAssembler.js +0 -32
- package/dist/compositeProfile/CompositeProfileAssembler.js.map +0 -1
- package/dist/compositeProfile/CompositeProfileCleanup.d.ts +0 -9
- package/dist/compositeProfile/CompositeProfileCleanup.js +0 -87
- package/dist/compositeProfile/CompositeProfileCleanup.js.map +0 -1
- package/dist/compositeProfile/CompositeProfileFile.d.ts +0 -16
- package/dist/compositeProfile/CompositeProfileFile.js +0 -16
- package/dist/compositeProfile/CompositeProfileFile.js.map +0 -1
- package/dist/compositeProfile/CompositeProfileTemplate.d.ts +0 -15
- package/dist/compositeProfile/CompositeProfileTemplate.js +0 -65
- package/dist/compositeProfile/CompositeProfileTemplate.js.map +0 -1
- package/dist/compositeProfile/CompositeProfileWatcher.d.ts +0 -18
- package/dist/compositeProfile/CompositeProfileWatcher.js +0 -46
- package/dist/compositeProfile/CompositeProfileWatcher.js.map +0 -1
- package/dist/compositeProfile/StatePersistence.d.ts +0 -39
- package/dist/compositeProfile/StatePersistence.js +0 -249
- package/dist/compositeProfile/StatePersistence.js.map +0 -1
- package/dist/fs/SafeSymlink.d.ts +0 -13
- package/dist/fs/SafeSymlink.js +0 -50
- package/dist/fs/SafeSymlink.js.map +0 -1
- package/dist/profiles/Profile.d.ts +0 -60
- package/dist/profiles/Profile.js +0 -7
- package/dist/profiles/Profile.js.map +0 -1
- package/dist/profiles/ProfileCache.d.ts +0 -8
- package/dist/profiles/ProfileCache.js.map +0 -1
- package/dist/profiles/ProfileLoader.d.ts +0 -28
- package/dist/profiles/ProfileLoader.js +0 -299
- package/dist/profiles/ProfileLoader.js.map +0 -1
- package/dist/profiles/ProfileMerger.d.ts +0 -19
- package/dist/profiles/ProfileMerger.js +0 -112
- package/dist/profiles/ProfileMerger.js.map +0 -1
- package/dist/profiles/ProfileSource.d.ts +0 -35
- package/dist/profiles/ProfileSource.js +0 -13
- package/dist/profiles/ProfileSource.js.map +0 -1
- package/dist/profiles/PromptIncludes.d.ts +0 -32
- package/dist/profiles/PromptIncludes.js +0 -147
- package/dist/profiles/PromptIncludes.js.map +0 -1
- package/dist/prompts/SystemPromptExport.d.ts +0 -16
- package/dist/prompts/SystemPromptExport.js +0 -81
- package/dist/prompts/SystemPromptExport.js.map +0 -1
- package/dist/schemas/profile-source.schema.json +0 -29
- package/dist/schemas/profile.schema.json +0 -200
- package/dist/skills/ProfileSkillResolution.d.ts +0 -21
- package/dist/skills/ProfileSkillResolution.js +0 -88
- package/dist/skills/ProfileSkillResolution.js.map +0 -1
- package/dist/skills/SkillCatalog.d.ts +0 -41
- package/dist/skills/SkillCatalog.js +0 -119
- package/dist/skills/SkillCatalog.js.map +0 -1
- package/dist/skills/SkillResolution.d.ts +0 -34
- package/dist/skills/SkillResolution.js +0 -369
- package/dist/skills/SkillResolution.js.map +0 -1
- package/docs/documentation/profile-repository.md +0 -179
- package/src/schemas/SchemaDocument.ts +0 -20
- package/src/schemas/profile-source.schema.json +0 -29
- package/src/schemas/profile.schema.json +0 -200
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Shared entry point that turns a home/project location into one effective resource set.
|
|
2
|
+
import { loadSettingsWithCachedRemoteSettings } from '../settings/SettingsLoader.js';
|
|
3
|
+
import { discoverLayers } from './Layer.js';
|
|
4
|
+
import { resolveResources } from './Resolver.js';
|
|
5
|
+
/** The single shared resolution path used by list, validate, run, and dump. */
|
|
6
|
+
export const resolveEffectiveSet = (input) => {
|
|
7
|
+
const loadedSettings = loadSettingsWithCachedRemoteSettings(input);
|
|
8
|
+
const layers = discoverLayers({ ...input, settings: loadedSettings.settings });
|
|
9
|
+
return { set: resolveResources(layers), settings: loadedSettings.settings, settingsIssues: loadedSettings.issues };
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=ResolverContext.js.map
|
|
@@ -0,0 +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;AAcjD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAmB,EAAiB,EAAE;IACxE,MAAM,cAAc,GAAG,oCAAoC,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE/E,OAAO,EAAE,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE,cAAc,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC;AACrH,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EffectiveResourceSet } from './Resource.js';
|
|
2
|
+
export interface ValidationFinding {
|
|
3
|
+
readonly severity: 'error' | 'warning';
|
|
4
|
+
readonly resource: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Collects validation findings across the effective set. `error` findings always fail validation;
|
|
9
|
+
* `warning` findings (such as shadowed definitions) fail only under `--strict`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const validateEffectiveSet: (set: EffectiveResourceSet) => readonly ValidationFinding[];
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Validates an effective resource set: agent + skill definitions, unresolved loadout slugs, shadowing.
|
|
2
|
+
import { isSkillDocumentIssue, readSkillDocument } from '../skills/SkillDocument.js';
|
|
3
|
+
import { isAgentDefinitionIssue, readAgentDefinition } from './AgentDefinition.js';
|
|
4
|
+
import { agentLocalKinds, findLoadoutResource, findResource, listAgentResources, listResources } from './Resource.js';
|
|
5
|
+
const loadoutSlugReference = (set, agentSlug, kind, field, slugs) => slugs
|
|
6
|
+
.filter((slug) => findLoadoutResource(set, agentSlug, kind, slug) === undefined)
|
|
7
|
+
.map((slug) => ({
|
|
8
|
+
severity: 'error',
|
|
9
|
+
resource: `agent:${agentSlug}`,
|
|
10
|
+
message: `loadout ${field} references unknown ${kind} '${slug}'.`,
|
|
11
|
+
}));
|
|
12
|
+
const validateAgent = (set, agent) => {
|
|
13
|
+
const definition = readAgentDefinition(agent.winner.path, agent.configPaths);
|
|
14
|
+
if (isAgentDefinitionIssue(definition)) {
|
|
15
|
+
return [{ severity: 'error', resource: `agent:${agent.slug}`, message: definition.message }];
|
|
16
|
+
}
|
|
17
|
+
if (definition.name !== agent.slug) {
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
severity: 'error',
|
|
21
|
+
resource: `agent:${agent.slug}`,
|
|
22
|
+
message: `agent.md name '${definition.name}' must match its directory '${agent.slug}'.`,
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
return [
|
|
27
|
+
...loadoutSlugReference(set, agent.slug, 'skill', 'skills', definition.loadout.skills),
|
|
28
|
+
...loadoutSlugReference(set, agent.slug, 'agent', 'subagents', definition.loadout.subagents),
|
|
29
|
+
];
|
|
30
|
+
};
|
|
31
|
+
const resourceLabel = (resource) => resource.winner.ownerAgent === undefined
|
|
32
|
+
? `${resource.kind}:${resource.slug}`
|
|
33
|
+
: `agent:${resource.winner.ownerAgent}/${resource.kind}:${resource.slug}`;
|
|
34
|
+
const validateSkill = (skill) => {
|
|
35
|
+
const document = readSkillDocument(skill.winner.path);
|
|
36
|
+
const label = resourceLabel(skill);
|
|
37
|
+
if (isSkillDocumentIssue(document)) {
|
|
38
|
+
return [{ severity: 'error', resource: label, message: document.message }];
|
|
39
|
+
}
|
|
40
|
+
if (document.name !== skill.slug) {
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
severity: 'error',
|
|
44
|
+
resource: label,
|
|
45
|
+
message: `SKILL.md name '${document.name}' must match its directory '${skill.slug}'.`,
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
return [];
|
|
50
|
+
};
|
|
51
|
+
const shadowFindings = (resource) => resource.shadowed.map((definition) => ({
|
|
52
|
+
severity: 'warning',
|
|
53
|
+
resource: resourceLabel(resource),
|
|
54
|
+
message: `shadowed definition in ${definition.layer.label} is overridden by ${resource.winner.layer.label}.`,
|
|
55
|
+
}));
|
|
56
|
+
// Agent-local resource shapes that resolver discovers but does not yet project into a run. Surfaced
|
|
57
|
+
// as warnings (fatal only under --strict) so a selection placed here is never silently dropped.
|
|
58
|
+
const reservedNamespaceFindings = (agent) => {
|
|
59
|
+
const findings = [];
|
|
60
|
+
if ((agent.mcpPaths ?? []).length > 0) {
|
|
61
|
+
findings.push({
|
|
62
|
+
severity: 'warning',
|
|
63
|
+
resource: `agent:${agent.slug}`,
|
|
64
|
+
message: "agent-local 'mcp.json' is discovered but not yet projected into the run (adapter parity, #183).",
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
if ((agent.hookPaths ?? []).length > 0) {
|
|
68
|
+
findings.push({
|
|
69
|
+
severity: 'warning',
|
|
70
|
+
resource: `agent:${agent.slug}`,
|
|
71
|
+
message: "agent-local 'hooks/' is a reserved namespace and is not yet resolved.",
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return findings;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Collects validation findings across the effective set. `error` findings always fail validation;
|
|
78
|
+
* `warning` findings (such as shadowed definitions) fail only under `--strict`.
|
|
79
|
+
*/
|
|
80
|
+
export const validateEffectiveSet = (set) => {
|
|
81
|
+
const findings = [];
|
|
82
|
+
for (const agent of listResources(set, 'agent')) {
|
|
83
|
+
findings.push(...validateAgent(set, agent), ...reservedNamespaceFindings(agent));
|
|
84
|
+
}
|
|
85
|
+
for (const skill of listResources(set, 'skill')) {
|
|
86
|
+
findings.push(...validateSkill(skill));
|
|
87
|
+
}
|
|
88
|
+
for (const [agentSlug] of set.agentResources) {
|
|
89
|
+
if (findResource(set, 'agent', agentSlug) === undefined) {
|
|
90
|
+
findings.push({
|
|
91
|
+
severity: 'error',
|
|
92
|
+
resource: `agent:${agentSlug}`,
|
|
93
|
+
message: 'agent-local resources require a resolvable owning agent.',
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
for (const kind of agentLocalKinds) {
|
|
97
|
+
for (const resource of listAgentResources(set, agentSlug, kind)) {
|
|
98
|
+
findings.push(...shadowFindings(resource));
|
|
99
|
+
// Only skills have a document reader today; knowledge/commands are opaque file trees.
|
|
100
|
+
if (kind === 'skill')
|
|
101
|
+
findings.push(...validateSkill(resource));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
for (const kind of ['agent', 'skill', 'knowledge', 'command']) {
|
|
106
|
+
for (const resource of listResources(set, kind)) {
|
|
107
|
+
findings.push(...shadowFindings(resource));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return findings;
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=ResolverValidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResolverValidation.js","sourceRoot":"","sources":["../../src/resolver/ResolverValidation.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQtH,MAAM,oBAAoB,GAAG,CAC3B,GAAyB,EACzB,SAAiB,EACjB,IAAuB,EACvB,KAAa,EACb,KAAwB,EACM,EAAE,CAChC,KAAK;KACF,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,SAAS,CAAC;KAC/E,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACd,QAAQ,EAAE,OAAgB;IAC1B,QAAQ,EAAE,SAAS,SAAS,EAAE;IAC9B,OAAO,EAAE,WAAW,KAAK,uBAAuB,IAAI,KAAK,IAAI,IAAI;CAClE,CAAC,C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AAC,CAAC;QACL,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;YACnC,KAAK,MAAM,QAAQ,IAAI,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC;gBAChE,QAAQ,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAC3C,sFAAsF;gBACtF,IAAI,IAAI,KAAK,OAAO;oBAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;IACH,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,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** Kinds of protocol resources Outfitter resolves by slug across `.agents` layers. */
|
|
2
|
+
export type ResourceKind = 'agent' | 'skill' | 'knowledge' | 'command';
|
|
3
|
+
export declare const resourceKinds: readonly ResourceKind[];
|
|
4
|
+
/**
|
|
5
|
+
* Kinds that also resolve **agent-local** — discovered under `agents/<agent>/<container>/` and
|
|
6
|
+
* resolved local-first before catalog fallback. Excludes `agent` (no nested subagents; a delegate is
|
|
7
|
+
* a shared catalog agent). mcp/hooks are handled separately (config file / reserved namespace), not
|
|
8
|
+
* as slug-container kinds.
|
|
9
|
+
*/
|
|
10
|
+
export declare const agentLocalKinds: readonly ResourceKind[];
|
|
11
|
+
/** Where a layer originates, highest precedence first. */
|
|
12
|
+
export type LayerOrigin = 'workspace' | 'global' | 'source';
|
|
13
|
+
export interface Layer {
|
|
14
|
+
/** Absolute path to the `.agents` payload root for this layer. */
|
|
15
|
+
readonly root: string;
|
|
16
|
+
readonly origin: LayerOrigin;
|
|
17
|
+
/** Human-readable label for diagnostics, e.g. `workspace`, `global`, or a source URI. */
|
|
18
|
+
readonly label: string;
|
|
19
|
+
}
|
|
20
|
+
/** An agent's loadout — the resources and runtime options it composes with. */
|
|
21
|
+
export interface Loadout {
|
|
22
|
+
readonly skills: readonly string[];
|
|
23
|
+
readonly subagents: readonly string[];
|
|
24
|
+
readonly mcp: readonly string[];
|
|
25
|
+
readonly extensions: readonly string[];
|
|
26
|
+
readonly plugins: readonly string[];
|
|
27
|
+
readonly model?: string;
|
|
28
|
+
readonly thinking?: string;
|
|
29
|
+
readonly tools?: {
|
|
30
|
+
readonly allow?: readonly string[];
|
|
31
|
+
readonly deny?: readonly string[];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare const emptyLoadout: () => Loadout;
|
|
35
|
+
/** A single resource definition discovered in one layer. */
|
|
36
|
+
export interface ResourceDefinition {
|
|
37
|
+
readonly kind: ResourceKind;
|
|
38
|
+
readonly slug: string;
|
|
39
|
+
readonly layer: Layer;
|
|
40
|
+
/** Absolute path to the resource's defining file or directory. */
|
|
41
|
+
readonly path: string;
|
|
42
|
+
/** Agent that owns this definition when it is nested beneath `agents/<agent>/<kind>/`. */
|
|
43
|
+
readonly ownerAgent?: string;
|
|
44
|
+
}
|
|
45
|
+
/** The winning definition for a slug plus any lower-precedence definitions it shadows. */
|
|
46
|
+
export interface ResolvedResource {
|
|
47
|
+
readonly kind: ResourceKind;
|
|
48
|
+
readonly slug: string;
|
|
49
|
+
readonly winner: ResourceDefinition;
|
|
50
|
+
readonly shadowed: readonly ResourceDefinition[];
|
|
51
|
+
/**
|
|
52
|
+
* For agents: existing `config.json` paths across all layers, highest precedence first. Per-agent
|
|
53
|
+
* JSON merges across layers independently of the markdown merge-by-ID, so a workspace config can
|
|
54
|
+
* override one loadout field of a globally defined agent.
|
|
55
|
+
*/
|
|
56
|
+
readonly configPaths?: readonly string[];
|
|
57
|
+
/**
|
|
58
|
+
* For agents: existing `agents/<slug>/mcp.json` paths across all layers, highest precedence first.
|
|
59
|
+
* Discovered here so a later projection pass (#183) can merge them over the tree-root `mcp.json`.
|
|
60
|
+
* Config merges by server id — it does not shadow whole like slug resources.
|
|
61
|
+
*/
|
|
62
|
+
readonly mcpPaths?: readonly string[];
|
|
63
|
+
/**
|
|
64
|
+
* For agents: existing `agents/<slug>/hooks/` directories across all layers. The hooks namespace is
|
|
65
|
+
* reserved (no protocol hooks entity yet); presence is surfaced as a diagnostic, not resolved.
|
|
66
|
+
*/
|
|
67
|
+
readonly hookPaths?: readonly string[];
|
|
68
|
+
/**
|
|
69
|
+
* For agents: existing `agents/<slug>/pi/` directories across all layers, highest precedence
|
|
70
|
+
* first. The Pi projector overlays these directories into its runtime `PI_CODING_AGENT_DIR`.
|
|
71
|
+
*/
|
|
72
|
+
readonly piConfigDirectories?: readonly string[];
|
|
73
|
+
}
|
|
74
|
+
/** Locale-independent, deterministic slug ordering (code-unit comparison). */
|
|
75
|
+
export declare const compareSlugs: (left: string, right: string) => number;
|
|
76
|
+
/** One immutable effective resource set per invocation, keyed by kind then slug. */
|
|
77
|
+
export interface EffectiveResourceSet {
|
|
78
|
+
readonly layers: readonly Layer[];
|
|
79
|
+
readonly resources: ReadonlyMap<ResourceKind, ReadonlyMap<string, ResolvedResource>>;
|
|
80
|
+
/** Agent-local resources, keyed by owning agent, kind, then slug. */
|
|
81
|
+
readonly agentResources: ReadonlyMap<string, ReadonlyMap<ResourceKind, ReadonlyMap<string, ResolvedResource>>>;
|
|
82
|
+
}
|
|
83
|
+
export declare const listResources: (set: EffectiveResourceSet, kind: ResourceKind) => readonly ResolvedResource[];
|
|
84
|
+
export declare const findResource: (set: EffectiveResourceSet, kind: ResourceKind, slug: string) => ResolvedResource | undefined;
|
|
85
|
+
export declare const listAgentResources: (set: EffectiveResourceSet, agentSlug: string, kind: ResourceKind) => readonly ResolvedResource[];
|
|
86
|
+
export declare const findAgentResource: (set: EffectiveResourceSet, agentSlug: string, kind: ResourceKind, slug: string) => ResolvedResource | undefined;
|
|
87
|
+
/** Resolves a loadout resource in the selected agent's private namespace before catalog fallback. */
|
|
88
|
+
export declare const findLoadoutResource: (set: EffectiveResourceSet, agentSlug: string, kind: ResourceKind, slug: string) => ResolvedResource | undefined;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Core resource-model types shared across the resolver, list, validate, run, and dump paths.
|
|
2
|
+
export const resourceKinds = ['agent', 'skill', 'knowledge', 'command'];
|
|
3
|
+
/**
|
|
4
|
+
* Kinds that also resolve **agent-local** — discovered under `agents/<agent>/<container>/` and
|
|
5
|
+
* resolved local-first before catalog fallback. Excludes `agent` (no nested subagents; a delegate is
|
|
6
|
+
* a shared catalog agent). mcp/hooks are handled separately (config file / reserved namespace), not
|
|
7
|
+
* as slug-container kinds.
|
|
8
|
+
*/
|
|
9
|
+
export const agentLocalKinds = ['skill', 'knowledge', 'command'];
|
|
10
|
+
export const emptyLoadout = () => ({
|
|
11
|
+
skills: [],
|
|
12
|
+
subagents: [],
|
|
13
|
+
mcp: [],
|
|
14
|
+
extensions: [],
|
|
15
|
+
plugins: [],
|
|
16
|
+
});
|
|
17
|
+
/** Locale-independent, deterministic slug ordering (code-unit comparison). */
|
|
18
|
+
export const compareSlugs = (left, right) => (left < right ? -1 : left > right ? 1 : 0);
|
|
19
|
+
export const listResources = (set, kind) => {
|
|
20
|
+
const bySlug = set.resources.get(kind);
|
|
21
|
+
if (bySlug === undefined) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
return [...bySlug.values()].sort((left, right) => compareSlugs(left.slug, right.slug));
|
|
25
|
+
};
|
|
26
|
+
export const findResource = (set, kind, slug) => set.resources.get(kind)?.get(slug);
|
|
27
|
+
export const listAgentResources = (set, agentSlug, kind) => {
|
|
28
|
+
const bySlug = set.agentResources.get(agentSlug)?.get(kind);
|
|
29
|
+
return bySlug === undefined ? [] : [...bySlug.values()].sort((left, right) => compareSlugs(left.slug, right.slug));
|
|
30
|
+
};
|
|
31
|
+
export const findAgentResource = (set, agentSlug, kind, slug) => set.agentResources.get(agentSlug)?.get(kind)?.get(slug);
|
|
32
|
+
/** Resolves a loadout resource in the selected agent's private namespace before catalog fallback. */
|
|
33
|
+
export const findLoadoutResource = (set, agentSlug, kind, slug) => findAgentResource(set, agentSlug, kind, slug) ?? findResource(set, kind, slug);
|
|
34
|
+
//# sourceMappingURL=Resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Resource.js","sourceRoot":"","sources":["../../src/resolver/Resource.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAK7F,MAAM,CAAC,MAAM,aAAa,GAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAEjG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAyB1F,MAAM,CAAC,MAAM,YAAY,GAAG,GAAY,EAAE,CAAC,CAAC;IAC1C,MAAM,EAAE,EAAE;IACV,SAAS,EAAE,EAAE;IACb,GAAG,EAAE,EAAE;IACP,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,EAAE;CACZ,CAAC,CAAC;AA2CH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,KAAa,EAAU,EAAE,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAUhH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAyB,EAAE,IAAkB,EAA+B,EAAE;IAC1G,MAAM,MAAM,GAAG,GAAG,CAA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M,mBAAmB,GAAG,CACjC,GAAyB,EACzB,SAAiB,EACjB,IAAkB,EAClB,IAAY,EACkB,EAAE,CAAC,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://outfitter.dev/schemas/agent.schema.json",
|
|
4
|
+
"title": "Outfitter agent definition frontmatter",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["name"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$", "maxLength": 64 },
|
|
9
|
+
"description": { "type": "string" },
|
|
10
|
+
"skills": {
|
|
11
|
+
"$ref": "#/$defs/slugList",
|
|
12
|
+
"description": "Skill slugs resolved from agents/<name>/skills first, then catalog-wide skills."
|
|
13
|
+
},
|
|
14
|
+
"subagents": {
|
|
15
|
+
"$ref": "#/$defs/slugList",
|
|
16
|
+
"description": "Agent slugs delegated to. Resolved catalog-wide (a delegate is a shared agent, not nested under agents/<name>)."
|
|
17
|
+
},
|
|
18
|
+
"mcp": {
|
|
19
|
+
"$ref": "#/$defs/slugList",
|
|
20
|
+
"description": "MCP server ids. Per-agent agents/<name>/mcp.json is discovered and merges by id over the tree-root mcp.json; projection into the run is deferred (adapter parity, #183)."
|
|
21
|
+
},
|
|
22
|
+
"extensions": {
|
|
23
|
+
"$ref": "#/$defs/slugList",
|
|
24
|
+
"description": "Harness-native extension selections passed through to the launch; no on-disk agent-local namespace."
|
|
25
|
+
},
|
|
26
|
+
"plugins": {
|
|
27
|
+
"$ref": "#/$defs/slugList",
|
|
28
|
+
"description": "Harness-native plugin selections passed through to the launch; no on-disk agent-local namespace."
|
|
29
|
+
},
|
|
30
|
+
"model": { "type": "string", "minLength": 1 },
|
|
31
|
+
"thinking": { "type": "string", "minLength": 1 },
|
|
32
|
+
"tools": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"properties": {
|
|
35
|
+
"allow": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
36
|
+
"deny": { "type": "array", "items": { "type": "string", "minLength": 1 } }
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": true,
|
|
42
|
+
"$defs": {
|
|
43
|
+
"slugList": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string", "minLength": 1 }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
"title": "Outfitter settings",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"default_agent": { "type": "string", "minLength": 1 },
|
|
8
|
+
"default_harness": { "enum": ["pi", "claude"] },
|
|
9
9
|
"cache_directory": { "type": "string", "minLength": 1 },
|
|
10
|
-
"
|
|
10
|
+
"state_persistence": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "Maps adapter-declared state paths to a persistence strategy.",
|
|
13
|
+
"additionalProperties": { "enum": ["symlink", "discard", "warn", "error", "prompt"] }
|
|
14
|
+
},
|
|
11
15
|
"startup": {
|
|
12
16
|
"type": "object",
|
|
13
17
|
"description": "Controls Outfitter startup presentation inside launched agents.",
|
|
@@ -21,18 +25,37 @@
|
|
|
21
25
|
},
|
|
22
26
|
"enterprise": {
|
|
23
27
|
"type": "object",
|
|
24
|
-
"description": "Enterprise governance settings. User-home ~/.
|
|
28
|
+
"description": "Enterprise governance settings. User-home ~/.agents/settings.yml is the source of truth for these controls.",
|
|
25
29
|
"properties": {
|
|
26
|
-
"
|
|
30
|
+
"private_catalogs": {
|
|
27
31
|
"type": "boolean",
|
|
28
|
-
"description": "Enable confirmed-private GitHub
|
|
32
|
+
"description": "Enable confirmed-private GitHub catalogs after reviewing the Outfitter Enterprise license or enterprise agreement."
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
"additionalProperties": false
|
|
32
36
|
},
|
|
33
|
-
"
|
|
37
|
+
"sources": {
|
|
34
38
|
"type": "array",
|
|
35
|
-
"items": {
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"oneOf": [
|
|
42
|
+
{
|
|
43
|
+
"required": ["path"],
|
|
44
|
+
"not": {
|
|
45
|
+
"anyOf": [{ "required": ["uri"] }, { "required": ["github"] }, { "required": ["ref"] }]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{ "required": ["uri"], "not": { "required": ["github"] } },
|
|
49
|
+
{ "required": ["github"], "not": { "required": ["uri"] } }
|
|
50
|
+
],
|
|
51
|
+
"properties": {
|
|
52
|
+
"path": { "type": "string", "minLength": 1 },
|
|
53
|
+
"uri": { "type": "string", "minLength": 1 },
|
|
54
|
+
"github": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" },
|
|
55
|
+
"ref": { "type": "string", "minLength": 1 }
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
}
|
|
36
59
|
},
|
|
37
60
|
"remote_settings": {
|
|
38
61
|
"type": "array",
|
|
@@ -53,7 +76,7 @@
|
|
|
53
76
|
},
|
|
54
77
|
"custom_settings": {
|
|
55
78
|
"type": "object",
|
|
56
|
-
"description": "Arbitrary YAML-compatible values exposed to Outfitter
|
|
79
|
+
"description": "Arbitrary YAML-compatible values exposed to Outfitter composition templates as outfitter.custom_settings."
|
|
57
80
|
}
|
|
58
81
|
},
|
|
59
82
|
"additionalProperties": true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RemoteSourceReference } from '../sources/SourceCache.js';
|
|
2
2
|
export type RemoteSettingsReference = RemoteSourceReference & {
|
|
3
3
|
readonly path: string;
|
|
4
4
|
};
|
|
@@ -6,20 +6,49 @@ export type SettingsValue = string | number | boolean | null | readonly Settings
|
|
|
6
6
|
readonly [key: string]: SettingsValue;
|
|
7
7
|
};
|
|
8
8
|
export type CustomSettings = Readonly<Record<string, SettingsValue>>;
|
|
9
|
+
/** Harnesses Outfitter can launch a composed agent in. */
|
|
10
|
+
export declare const HARNESSES: readonly ["pi", "claude"];
|
|
11
|
+
export type Harness = (typeof HARNESSES)[number];
|
|
12
|
+
/** Functional persistence strategies for adapter-declared state paths. */
|
|
13
|
+
export type StatePersistenceStrategy = 'symlink' | 'discard' | 'warn' | 'error' | 'prompt';
|
|
14
|
+
export type StatePersistence = Readonly<Record<string, StatePersistenceStrategy>>;
|
|
15
|
+
/**
|
|
16
|
+
* An ordered `.agents` payload source: a local path, a remote URI, or a `github` shorthand.
|
|
17
|
+
* Modeled as a discriminated union so exactly one of `path`/`uri`/`github` is present and `ref`
|
|
18
|
+
* is available only for remote sources.
|
|
19
|
+
*/
|
|
20
|
+
export type SourceReference = {
|
|
21
|
+
readonly path: string;
|
|
22
|
+
readonly uri?: never;
|
|
23
|
+
readonly github?: never;
|
|
24
|
+
readonly ref?: never;
|
|
25
|
+
} | {
|
|
26
|
+
readonly uri: string;
|
|
27
|
+
readonly github?: never;
|
|
28
|
+
readonly ref?: string;
|
|
29
|
+
readonly path?: string;
|
|
30
|
+
} | {
|
|
31
|
+
readonly github: string;
|
|
32
|
+
readonly uri?: never;
|
|
33
|
+
readonly ref?: string;
|
|
34
|
+
readonly path?: string;
|
|
35
|
+
};
|
|
9
36
|
export interface StartupSettings {
|
|
10
37
|
readonly asciiArt?: boolean;
|
|
11
38
|
}
|
|
12
39
|
export interface EnterpriseSettings {
|
|
13
|
-
readonly
|
|
40
|
+
readonly privateCatalogs?: boolean;
|
|
14
41
|
}
|
|
15
42
|
export interface Settings {
|
|
16
|
-
|
|
43
|
+
/** Agent slug that plain `outfitter` runs when no agent is selected. */
|
|
17
44
|
readonly defaultAgent?: string;
|
|
18
|
-
|
|
45
|
+
/** Harness that plain `outfitter` launches when `--harness` is omitted. */
|
|
46
|
+
readonly defaultHarness?: Harness;
|
|
47
|
+
readonly sources?: readonly SourceReference[];
|
|
19
48
|
readonly remoteSettings?: readonly RemoteSettingsReference[];
|
|
20
49
|
readonly cacheDirectory?: string;
|
|
50
|
+
readonly statePersistence?: StatePersistence;
|
|
21
51
|
readonly customSettings?: CustomSettings;
|
|
22
|
-
readonly profileExport?: boolean;
|
|
23
52
|
readonly startup?: StartupSettings;
|
|
24
53
|
readonly enterprise?: EnterpriseSettings;
|
|
25
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../src/settings/Settings.ts"],"names":[],"mappings":"
|
|
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;AAuCnD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAa,EAAE,CAAC,CAAC;IAC5C,OAAO,EAAE,EAAE;IACX,cAAc,EAAE,EAAE;CACnB,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ValidationIssue } from '../validation/SchemaValidator.js';
|
|
2
2
|
import type { RemoteSettingsReference, Settings } from './Settings.js';
|
|
3
3
|
export interface SettingsLocation {
|
|
4
|
-
readonly scope: 'user' | 'project' | 'project-local' | 'remote';
|
|
4
|
+
readonly scope: 'user' | 'user-local' | 'project' | 'project-local' | 'remote';
|
|
5
5
|
readonly path: string;
|
|
6
6
|
}
|
|
7
7
|
export interface SettingsLoadPlan {
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
// Discovers, parses, validates, and converts Outfitter settings.yml files.
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
4
|
-
import { createRemoteRepositoryCachePath, resolveRemoteRepositorySubpath } from '../
|
|
4
|
+
import { createRemoteRepositoryCachePath, resolveRemoteRepositorySubpath } from '../sources/SourceCache.js';
|
|
5
5
|
import { validateSchema } from '../validation/SchemaValidator.js';
|
|
6
6
|
import { parseYamlDocument } from '../validation/YamlDocument.js';
|
|
7
7
|
import { mergeSettingsStack } from './SettingsMerger.js';
|
|
8
8
|
export const createSettingsLoadPlan = (locations) => ({
|
|
9
9
|
locations,
|
|
10
10
|
});
|
|
11
|
+
const agentsSettings = (directory, ...rest) => join(directory, '.agents', ...rest);
|
|
12
|
+
// Ordered lowest-to-highest precedence so later files fold over earlier ones during merge.
|
|
11
13
|
export const discoverSettingsLoadPlan = (input) => createSettingsLoadPlan([
|
|
12
|
-
{ scope: 'user', path:
|
|
13
|
-
{ scope: '
|
|
14
|
-
{ scope: 'project
|
|
14
|
+
{ scope: 'user', path: agentsSettings(input.homeDirectory, 'settings.yml') },
|
|
15
|
+
{ scope: 'user-local', path: agentsSettings(input.homeDirectory, 'settings.local.yml') },
|
|
16
|
+
{ scope: 'project', path: agentsSettings(input.projectDirectory, 'settings.yml') },
|
|
17
|
+
{ scope: 'project-local', path: agentsSettings(input.projectDirectory, 'settings.local.yml') },
|
|
15
18
|
]);
|
|
16
19
|
export const discoverRemoteSettingsLoadPlan = (homeDirectory, remoteSettings) => discoverRemoteSettingsLocations(homeDirectory, remoteSettings).plan;
|
|
17
20
|
export const resolveCachedRemoteSettingsPath = (homeDirectory, source) => {
|
|
@@ -20,8 +23,8 @@ export const resolveCachedRemoteSettingsPath = (homeDirectory, source) => {
|
|
|
20
23
|
if (existsSync(configuredPath) || source.path !== 'settings.yml') {
|
|
21
24
|
return configuredPath;
|
|
22
25
|
}
|
|
23
|
-
const
|
|
24
|
-
return existsSync(
|
|
26
|
+
const nestedAgentsSettingsPath = resolveRemoteRepositorySubpath(repositoryPath, '.agents/settings.yml');
|
|
27
|
+
return existsSync(nestedAgentsSettingsPath) ? nestedAgentsSettingsPath : configuredPath;
|
|
25
28
|
};
|
|
26
29
|
export const loadSettingsFiles = (plan) => {
|
|
27
30
|
const files = [];
|
|
@@ -96,44 +99,42 @@ const addSettingsFile = (location, files, issues) => {
|
|
|
96
99
|
}
|
|
97
100
|
files.push({
|
|
98
101
|
location,
|
|
99
|
-
settings: convertSettingsDocument(parsed.document, dirname(location.path)),
|
|
102
|
+
settings: convertSettingsDocument(parsed.document, dirname(location.path), location.scope),
|
|
100
103
|
});
|
|
101
104
|
};
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
// Enterprise governance controls are honored only from the user's own ~/.agents settings so a
|
|
106
|
+
// checked-in project or remote catalog cannot enable private catalogs on the user's behalf.
|
|
107
|
+
const isHomeScope = (scope) => scope === 'user' || scope === 'user-local';
|
|
108
|
+
const convertSettingsDocument = (document, settingsDirectory, scope) => ({
|
|
104
109
|
defaultAgent: document.default_agent,
|
|
105
|
-
|
|
110
|
+
defaultHarness: document.default_harness,
|
|
111
|
+
sources: document.sources?.map((source) => convertSource(source, settingsDirectory)),
|
|
106
112
|
remoteSettings: document.remote_settings?.map(convertRemoteSettingsSource),
|
|
107
113
|
cacheDirectory: document.cache_directory === undefined
|
|
108
114
|
? undefined
|
|
109
115
|
: resolveConfigDirectory(document.cache_directory, settingsDirectory),
|
|
116
|
+
statePersistence: document.state_persistence,
|
|
110
117
|
customSettings: document.custom_settings,
|
|
111
|
-
profileExport: document.profile_export,
|
|
112
118
|
startup: convertStartupSettings(document.startup),
|
|
113
|
-
enterprise: convertEnterpriseSettings(document.enterprise),
|
|
119
|
+
enterprise: isHomeScope(scope) ? convertEnterpriseSettings(document.enterprise) : undefined,
|
|
114
120
|
});
|
|
115
121
|
const convertStartupSettings = (startup) => startup === undefined ? undefined : { asciiArt: startup.ascii_art };
|
|
116
|
-
const convertEnterpriseSettings = (enterprise) => enterprise === undefined ? undefined : {
|
|
122
|
+
const convertEnterpriseSettings = (enterprise) => enterprise === undefined ? undefined : { privateCatalogs: enterprise.private_catalogs };
|
|
117
123
|
const convertRemoteSettingsSource = (source) => {
|
|
118
124
|
if (source.uri !== undefined) {
|
|
119
125
|
return { uri: source.uri, ref: source.ref, path: source.path };
|
|
120
126
|
}
|
|
121
127
|
return { github: source.github, ref: source.ref, path: source.path };
|
|
122
128
|
};
|
|
123
|
-
const
|
|
124
|
-
const filters = {
|
|
125
|
-
only: source.only,
|
|
126
|
-
except: source.except,
|
|
127
|
-
};
|
|
129
|
+
const convertSource = (source, settingsDirectory) => {
|
|
128
130
|
if (source.uri !== undefined) {
|
|
129
|
-
return {
|
|
131
|
+
return { uri: source.uri, ref: source.ref, path: source.path };
|
|
130
132
|
}
|
|
131
133
|
if (source.github !== undefined) {
|
|
132
|
-
return {
|
|
134
|
+
return { github: source.github, ref: source.ref, path: source.path };
|
|
133
135
|
}
|
|
134
|
-
return {
|
|
136
|
+
return { path: resolveConfigDirectory(source.path, settingsDirectory) };
|
|
135
137
|
};
|
|
136
|
-
const resolveProfileSourcePath = (sourcePath, settingsDirectory) => resolveConfigDirectory(sourcePath, settingsDirectory);
|
|
137
138
|
const resolveConfigDirectory = (configuredPath, settingsDirectory) => {
|
|
138
139
|
if (isAbsolute(configuredPath)) {
|
|
139
140
|
return configuredPath;
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"SettingsLoader.js","sourceRoot":"","sources":["../../src/settings/SettingsLoader.ts"],"names":[],"mappings":"AA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