@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PiExtensionCache.js","sourceRoot":"","sources":["../../../src/agents/pi/PiExtensionCache.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,0FAA0F;AAC1F,+EAA+E;AAC/E,8FAA8F;AAC9F,qFAAqF;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,KAAK,MAAM,aAAa,CAAC;AAYhC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,OAAsC,EACtC,UAAmC,EAAE,EACN,EAAE;IACjC,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QAClE,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;AAC3G,CAAC,CAAC;AAEF,MAA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E,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// Merges profile-provided Pi MCP configuration fragments into a composite profile file.
|
|
2
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { createCompositeProfileFile } from '../../compositeProfile/CompositeProfileFile.js';
|
|
5
|
-
import { mergeArrayByPolicy } from '../../merge/ArrayMergePolicy.js';
|
|
6
|
-
const piMcpConfigPath = '.mcp.json';
|
|
7
|
-
export const createPiMcpConfigFile = (rootDirectory, profileFolders = []) => {
|
|
8
|
-
const sourceInputs = findPiMcpConfigSources(profileFolders);
|
|
9
|
-
if (sourceInputs.length === 0) {
|
|
10
|
-
return undefined;
|
|
11
|
-
}
|
|
12
|
-
const mergedConfig = sourceInputs
|
|
13
|
-
.map(readPiMcpConfigSource)
|
|
14
|
-
.reduce((mergedConfig, config) => mergePiMcpConfigObjects(mergedConfig, config), {});
|
|
15
|
-
return createCompositeProfileFile({
|
|
16
|
-
rootDirectory,
|
|
17
|
-
relativePath: piMcpConfigPath,
|
|
18
|
-
content: `${JSON.stringify(mergedConfig, null, 2)}\n`,
|
|
19
|
-
sourceInputs,
|
|
20
|
-
strategy: 'merge',
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
const findPiMcpConfigSources = (profileFolders) => profileFolders
|
|
24
|
-
.map((profileFolder) => join(profileFolder, 'cli_specific', 'pi', piMcpConfigPath))
|
|
25
|
-
.filter((candidate) => existsSync(candidate));
|
|
26
|
-
const readPiMcpConfigSource = (sourcePath) => {
|
|
27
|
-
const parsed = parsePiMcpConfigJson(sourcePath);
|
|
28
|
-
if (!isJsonObject(parsed)) {
|
|
29
|
-
throw new Error(`Pi MCP config '${sourcePath}' must contain a JSON object.`);
|
|
30
|
-
}
|
|
31
|
-
return parsed;
|
|
32
|
-
};
|
|
33
|
-
const parsePiMcpConfigJson = (sourcePath) => {
|
|
34
|
-
const content = readPiMcpConfigContent(sourcePath);
|
|
35
|
-
try {
|
|
36
|
-
return JSON.parse(content);
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
throw new Error(`Pi MCP config '${sourcePath}' must contain valid JSON.`, { cause: error });
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const readPiMcpConfigContent = (sourcePath) => {
|
|
43
|
-
try {
|
|
44
|
-
return readFileSync(sourcePath, 'utf8');
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
throw new Error(`Could not read Pi MCP config '${sourcePath}': ${String(error)}`, { cause: error });
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
const mergePiMcpConfigObjects = (lowerPrecedence, higherPrecedence, path = []) => ({
|
|
51
|
-
...lowerPrecedence,
|
|
52
|
-
...Object.fromEntries(Object.entries(higherPrecedence)
|
|
53
|
-
.filter((entry) => entry[1] !== undefined)
|
|
54
|
-
.map(([key, value]) => [
|
|
55
|
-
key,
|
|
56
|
-
key in lowerPrecedence
|
|
57
|
-
? mergePiMcpConfigValue(lowerPrecedence[key], value, [...path, key])
|
|
58
|
-
: clonePiMcpConfigValue(value),
|
|
59
|
-
])),
|
|
60
|
-
});
|
|
61
|
-
const mergePiMcpConfigValue = (lowerPrecedence, higherPrecedence, path) => {
|
|
62
|
-
if (Array.isArray(higherPrecedence)) {
|
|
63
|
-
return mergeArrayByPolicy(isMergeableArray(lowerPrecedence) ? lowerPrecedence : undefined, higherPrecedence, {
|
|
64
|
-
mode: 'uniqueBy',
|
|
65
|
-
order: 'append',
|
|
66
|
-
winner: 'last',
|
|
67
|
-
key: piMcpArrayItemIdentity,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
if (isJsonObject(lowerPrecedence) && isJsonObject(higherPrecedence) && !isMcpServerDefinitionPath(path)) {
|
|
71
|
-
return mergePiMcpConfigObjects(lowerPrecedence, higherPrecedence, path);
|
|
72
|
-
}
|
|
73
|
-
return clonePiMcpConfigValue(higherPrecedence);
|
|
74
|
-
};
|
|
75
|
-
const isMcpServerDefinitionPath = (path) => path.length === 2 && path[0] === 'mcpServers';
|
|
76
|
-
const piMcpArrayItemIdentity = (item) => {
|
|
77
|
-
if (isJsonObject(item)) {
|
|
78
|
-
const explicitIdentity = item.identity ?? item.name ?? item.id;
|
|
79
|
-
return explicitIdentity === undefined
|
|
80
|
-
? `anonymous:${stableJsonStringify(item)}`
|
|
81
|
-
: `explicit:${stringifyExplicitIdentity(explicitIdentity)}`;
|
|
82
|
-
}
|
|
83
|
-
return `anonymous:${stableJsonStringify(item)}`;
|
|
84
|
-
};
|
|
85
|
-
const stringifyExplicitIdentity = (value) => {
|
|
86
|
-
if (typeof value === 'string') {
|
|
87
|
-
return value;
|
|
88
|
-
}
|
|
89
|
-
return stableJsonStringify(value);
|
|
90
|
-
};
|
|
91
|
-
const stableJsonStringify = (value) => JSON.stringify(sortJsonObjectKeys(value));
|
|
92
|
-
const sortJsonObjectKeys = (value) => {
|
|
93
|
-
if (isMergeableArray(value)) {
|
|
94
|
-
return value.map(sortJsonObjectKeys);
|
|
95
|
-
}
|
|
96
|
-
if (isJsonObject(value)) {
|
|
97
|
-
return Object.fromEntries(Object.keys(value)
|
|
98
|
-
.sort()
|
|
99
|
-
.map((key) => [key, sortJsonObjectKeys(value[key])]));
|
|
100
|
-
}
|
|
101
|
-
return value;
|
|
102
|
-
};
|
|
103
|
-
const clonePiMcpConfigValue = (value) => {
|
|
104
|
-
if (isMergeableArray(value)) {
|
|
105
|
-
return value.map(clonePiMcpConfigValue);
|
|
106
|
-
}
|
|
107
|
-
if (isJsonObject(value)) {
|
|
108
|
-
return mergePiMcpConfigObjects({}, value);
|
|
109
|
-
}
|
|
110
|
-
return value;
|
|
111
|
-
};
|
|
112
|
-
const isJsonObject = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
113
|
-
const isMergeableArray = (value) => Array.isArray(value);
|
|
114
|
-
//# sourceMappingURL=PiMcpConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PiMcpConfig.js","sourceRoot":"","sources":["../../../src/agents/pi/PiMcpConfig.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAA6B,MAAM,gDAAgD,CAAC;AAEvH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,eAAe,GAAG,WAAW,CAAC;AAIpC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,aAAqB,EACrB,iBAAoC,EAAE,EACJ,EAAE;IACpC,MAAM,YAAY,GAAG,sBAAsB,CAAC,cAAc,CAAC,CAAC;IAE5D,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,YAAY,GAAG,YAAY;SAC9B,GAAG,CAAC,qBAAqB,CAAC;SAC1B,MAAM,CAAa,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC,uBAAuB,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IAEnG,OAAO,0BAA0B,CAAC;QAChC,aAAa;QACb,YAAY,EAAE,eAAe;QAC7B,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI;QACrD,YAAY;QACZ,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,sBAAsB,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,EAAE,CAAC,CAAC,GAAG,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAmB,CAAC,CAAC,CAAC,CACzE,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,KAAqB,EAAkB,EAAE;IACtE,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,uBAAuB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,KAAc,EAAuB,EAAE,CAC3D,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvE,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ArrayMergePolicy } from '../../merge/ArrayMergePolicy.js';
|
|
2
|
-
export type PiSettingsArrayName = 'packages' | 'extensions' | 'skills' | 'prompts' | 'themes';
|
|
3
|
-
export declare const piSettingsArrayPolicies: {
|
|
4
|
-
readonly packages: {
|
|
5
|
-
readonly mode: "uniqueBy";
|
|
6
|
-
readonly order: "append";
|
|
7
|
-
readonly winner: "last";
|
|
8
|
-
readonly key: (entry: unknown) => string;
|
|
9
|
-
};
|
|
10
|
-
readonly extensions: ArrayMergePolicy<unknown>;
|
|
11
|
-
readonly skills: ArrayMergePolicy<unknown>;
|
|
12
|
-
readonly prompts: ArrayMergePolicy<unknown>;
|
|
13
|
-
readonly themes: ArrayMergePolicy<unknown>;
|
|
14
|
-
};
|
|
15
|
-
export declare const filterPiSettingsPackagesDuplicatingExtensions: (packages: readonly unknown[], extensionSources: readonly string[]) => readonly unknown[];
|
|
16
|
-
export declare const normalizePiSettingsPackageResourceIdentity: (entry: unknown) => string | undefined;
|
|
17
|
-
export declare const readPiSettingsPackageSource: (entry: unknown) => string | undefined;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { normalizeExtensionResourceIdentity, normalizeLaunchResourceIdentity } from '../ResourceIdentity.js';
|
|
2
|
-
export const piSettingsArrayPolicies = {
|
|
3
|
-
packages: {
|
|
4
|
-
mode: 'uniqueBy',
|
|
5
|
-
order: 'append',
|
|
6
|
-
winner: 'last',
|
|
7
|
-
key: (entry) => normalizePiSettingsPackageResourceIdentity(entry) ?? createUnknownPiSettingsArrayKey(entry),
|
|
8
|
-
},
|
|
9
|
-
extensions: createStringResourceArrayPolicy(normalizeExtensionResourceIdentity),
|
|
10
|
-
skills: createStringResourceArrayPolicy(normalizeLaunchResourceIdentity),
|
|
11
|
-
prompts: createStringResourceArrayPolicy(normalizeLaunchResourceIdentity),
|
|
12
|
-
themes: createStringResourceArrayPolicy(normalizeLaunchResourceIdentity),
|
|
13
|
-
};
|
|
14
|
-
export const filterPiSettingsPackagesDuplicatingExtensions = (packages, extensionSources) => {
|
|
15
|
-
const extensionIdentities = new Set(extensionSources.map(normalizeExtensionResourceIdentity));
|
|
16
|
-
if (extensionIdentities.size === 0) {
|
|
17
|
-
return packages;
|
|
18
|
-
}
|
|
19
|
-
return packages.filter((entry) => {
|
|
20
|
-
const identity = normalizePiSettingsPackageResourceIdentity(entry);
|
|
21
|
-
return identity === undefined || !extensionIdentities.has(identity);
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
export const normalizePiSettingsPackageResourceIdentity = (entry) => {
|
|
25
|
-
const source = readPiSettingsPackageSource(entry);
|
|
26
|
-
return source === undefined ? undefined : normalizeExtensionResourceIdentity(source);
|
|
27
|
-
};
|
|
28
|
-
export const readPiSettingsPackageSource = (entry) => {
|
|
29
|
-
if (typeof entry === 'string') {
|
|
30
|
-
return entry;
|
|
31
|
-
}
|
|
32
|
-
if (entry === null || typeof entry !== 'object' || Array.isArray(entry)) {
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
const record = entry;
|
|
36
|
-
return typeof record.source === 'string' ? record.source : undefined;
|
|
37
|
-
};
|
|
38
|
-
function createStringResourceArrayPolicy(normalize) {
|
|
39
|
-
return {
|
|
40
|
-
mode: 'uniqueBy',
|
|
41
|
-
order: 'append',
|
|
42
|
-
winner: 'last',
|
|
43
|
-
key: (entry) => (typeof entry === 'string' ? normalize(entry) : createUnknownPiSettingsArrayKey(entry)),
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const createUnknownPiSettingsArrayKey = (entry) => `literal:${stableStringify(entry)}`;
|
|
47
|
-
const stableStringify = (value) => {
|
|
48
|
-
if (value === null || typeof value !== 'object') {
|
|
49
|
-
return JSON.stringify(value);
|
|
50
|
-
}
|
|
51
|
-
if (Array.isArray(value)) {
|
|
52
|
-
return `[${value.map(stableStringify).join(',')}]`;
|
|
53
|
-
}
|
|
54
|
-
return `{${Object.entries(value)
|
|
55
|
-
.sort(([left], [right]) => left.localeCompare(right))
|
|
56
|
-
.map(([key, item]) => `${JSON.stringify(key)}:${stableStringify(item)}`)
|
|
57
|
-
.join(',')}}`;
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=PiSettingsMergePolicy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PiSettingsMergePolicy.js","sourceRoot":"","sources":["../../../src/agents/pi/PiSettingsMergePolicy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAI7G,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,QAAQ;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EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;SACvE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AgentLaunchProfileLayer } from '../AgentAdapter.js';
|
|
2
|
-
import type { PiProfileControls } from '../../profiles/Profile.js';
|
|
3
|
-
export declare const createPiSkillSources: (input: {
|
|
4
|
-
readonly builtInOutfitterSkill: string;
|
|
5
|
-
readonly controls: PiProfileControls;
|
|
6
|
-
readonly profileFolders: readonly string[];
|
|
7
|
-
readonly profileLayers: readonly AgentLaunchProfileLayer[];
|
|
8
|
-
}) => readonly string[];
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// Resolves Pi skill sources declared by profiles and discovered in profile folders.
|
|
2
|
-
import { readdirSync, statSync } from 'node:fs';
|
|
3
|
-
import { dirname, isAbsolute, join } from 'node:path';
|
|
4
|
-
export const createPiSkillSources = (input) => [
|
|
5
|
-
...new Set([
|
|
6
|
-
input.builtInOutfitterSkill,
|
|
7
|
-
// Catalog-ID entries are resolved to generated skill paths before the adapter runs;
|
|
8
|
-
// any remaining object entries carry no path source and are skipped here.
|
|
9
|
-
...(input.controls.skills ?? [])
|
|
10
|
-
.filter((source) => typeof source === 'string')
|
|
11
|
-
.map((source) => resolveProfileSkillSource(source, input.profileLayers)),
|
|
12
|
-
...input.profileFolders.flatMap(skillSourcesForProfile),
|
|
13
|
-
]),
|
|
14
|
-
];
|
|
15
|
-
const resolveProfileSkillSource = (source, profileLayers) => {
|
|
16
|
-
if (isAbsolute(source)) {
|
|
17
|
-
return source;
|
|
18
|
-
}
|
|
19
|
-
for (const root of sharedSkillRootsForLayers(profileLayers)) {
|
|
20
|
-
const resolvedSource = join(root, source);
|
|
21
|
-
if (isPiSkillSource(resolvedSource)) {
|
|
22
|
-
return resolvedSource;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return source;
|
|
26
|
-
};
|
|
27
|
-
const sharedSkillRootsForLayers = (profileLayers) => [
|
|
28
|
-
...new Set(profileLayers.flatMap(sharedSkillRootsForLayer)),
|
|
29
|
-
];
|
|
30
|
-
const sharedSkillRootsForLayer = (profileLayer) => {
|
|
31
|
-
const roots = [];
|
|
32
|
-
if (profileLayer.sourceRootPath !== undefined) {
|
|
33
|
-
roots.push(dirname(profileLayer.sourceRootPath), profileLayer.sourceRootPath);
|
|
34
|
-
}
|
|
35
|
-
if (profileLayer.resourceRootPath !== undefined) {
|
|
36
|
-
roots.push(profileLayer.resourceRootPath);
|
|
37
|
-
}
|
|
38
|
-
return roots;
|
|
39
|
-
};
|
|
40
|
-
const isPiSkillSource = (sourcePath) => isFile(sourcePath) || isFile(join(sourcePath, 'SKILL.md'));
|
|
41
|
-
const skillSourcesForProfile = (profileFolder) => [
|
|
42
|
-
...skillSourcesForFolder(join(profileFolder, 'skills'), 'profile skills folder'),
|
|
43
|
-
...skillSourcesForFolder(join(profileFolder, 'cli_specific', 'pi', 'skills'), 'profile Pi skills folder'),
|
|
44
|
-
];
|
|
45
|
-
const skillSourcesForFolder = (skillsFolder, description) => readOptionalDirectoryEntries(skillsFolder, description)
|
|
46
|
-
.filter(isPiSkillEntry(skillsFolder))
|
|
47
|
-
.map((entry) => join(skillsFolder, entry.name))
|
|
48
|
-
.sort();
|
|
49
|
-
const isPiSkillEntry = (folderPath) => (entry) => entry.isDirectory() && isFile(join(folderPath, entry.name, 'SKILL.md'));
|
|
50
|
-
const readOptionalDirectoryEntries = (folderPath, description) => {
|
|
51
|
-
try {
|
|
52
|
-
return readdirSync(folderPath, { withFileTypes: true });
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
if (isMissingPathError(error)) {
|
|
56
|
-
return [];
|
|
57
|
-
}
|
|
58
|
-
throw new Error(`Could not read ${description} '${folderPath}': ${String(error)}`, { cause: error });
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
const isFile = (path) => {
|
|
62
|
-
try {
|
|
63
|
-
return statSync(path).isFile();
|
|
64
|
-
}
|
|
65
|
-
catch (error) {
|
|
66
|
-
if (isMissingPathError(error)) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
throw new Error(`Could not inspect file '${path}': ${String(error)}`, { cause: error });
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const isMissingPathError = (error) => error !== null && typeof error === 'object' && 'code' in error && error.code === 'ENOENT';
|
|
73
|
-
//# sourceMappingURL=PiSkillSources.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PiSkillSources.js","sourceRoot":"","sources":["../../../src/agents/pi/PiSkillSources.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAe,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAKtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAKpC,EAAqB,EAAE,CAAC;IACvB,GAAG,IAAI,GAAG,CAAC;QACT,KAAK,CAAC,qBAAqB;QAC3B,oFAAoF;QACpF,0EAA0E;QAC1E,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,IAAI,EAAE,CAAC;aAC7B,MAAM,CAAC,CAAC,MAAM,EAAoB,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC;aAChE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,yBAAyB,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;QAC1E,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,sBAAsB,CAAC;KACxD,CAAC;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IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1F,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAW,EAAE,CACrD,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { WelcomeCommandResult } from './WelcomeCommand.js';
|
|
2
|
-
export interface PersistedFirstRunWelcomeProfile {
|
|
3
|
-
readonly profileId: string;
|
|
4
|
-
readonly createdProfile: boolean;
|
|
5
|
-
readonly messages?: readonly string[];
|
|
6
|
-
}
|
|
7
|
-
export interface FirstRunWelcomeProfileOptions {
|
|
8
|
-
readonly sourceProfileDirectory?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const persistFirstRunWelcomeProfile: (homeDirectory: string, settingsPath: string, welcomeResult: WelcomeCommandResult | undefined, options?: FirstRunWelcomeProfileOptions) => PersistedFirstRunWelcomeProfile | undefined;
|
|
11
|
-
export declare const updateSettingsDefaultProfile: (settingsPath: string, profileId: string) => void;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
// Persists first-run welcome choices as a local profile used before launching Pi.
|
|
2
|
-
import { cpSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { dirname, join } from 'node:path';
|
|
4
|
-
import { parse, stringify } from 'yaml';
|
|
5
|
-
export const persistFirstRunWelcomeProfile = (homeDirectory, settingsPath, welcomeResult, options = {}) => {
|
|
6
|
-
if (welcomeResult === undefined || !welcomeResult.answered || welcomeResult.selectedRole === undefined) {
|
|
7
|
-
return undefined;
|
|
8
|
-
}
|
|
9
|
-
const welcomeProfile = createFirstRunWelcomeProfile(welcomeResult, welcomeResult.selectedRole);
|
|
10
|
-
const profileDirectory = join(homeDirectory, '.outfitter', 'profiles', welcomeProfile.id);
|
|
11
|
-
const profilePath = join(profileDirectory, 'profile.yml');
|
|
12
|
-
const createdProfile = !existsSync(profilePath);
|
|
13
|
-
const messages = [];
|
|
14
|
-
if (createdProfile) {
|
|
15
|
-
if (options.sourceProfileDirectory !== undefined && existsSync(options.sourceProfileDirectory)) {
|
|
16
|
-
cpSync(options.sourceProfileDirectory, profileDirectory, { recursive: true, force: false });
|
|
17
|
-
updateCopiedProfile(profilePath, welcomeProfile.description, welcomeProfile.extensions);
|
|
18
|
-
excludeDefaultProfileSources(settingsPath, welcomeProfile.id);
|
|
19
|
-
messages.push(`Copied the ${welcomeProfile.label} profile locally so your extension choices can be edited at ${profilePath}.`);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
mkdirSync(profileDirectory, { recursive: true });
|
|
23
|
-
writeFileSync(profilePath, welcomeProfile.content);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
updateSettingsDefaultProfile(settingsPath, welcomeProfile.id);
|
|
27
|
-
return {
|
|
28
|
-
profileId: welcomeProfile.id,
|
|
29
|
-
createdProfile,
|
|
30
|
-
...(messages.length === 0 ? {} : { messages }),
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
const createFirstRunWelcomeProfile = (welcomeResult, selectedRole) => {
|
|
34
|
-
const profileId = selectedRole.id;
|
|
35
|
-
const extensions = welcomeResult.selectedLoadout?.selectedItems.map((item) => item.source) ?? [];
|
|
36
|
-
const rolePrompt = firstRunWelcomeRolePrompts[selectedRole.id];
|
|
37
|
-
return {
|
|
38
|
-
id: profileId,
|
|
39
|
-
label: selectedRole.label,
|
|
40
|
-
description: selectedRole.description,
|
|
41
|
-
content: createFirstRunWelcomeProfileContent(profileId, selectedRole.label, selectedRole.description, rolePrompt, extensions),
|
|
42
|
-
extensions,
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
const firstRunWelcomeRolePrompts = {
|
|
46
|
-
founder: "You are operating as a founder-operator agent: builder, product thinker, research auditor, dense-prose editor, and careful operator. Do not behave like a generic senior engineer or a pure project manager.\n\nThe repo is the brain. Chat history is transient. Durable facts, decisions, requirements, plans, review outcomes, and lessons belong in project files when the work is substantive.\n\nIf the user's intent and acceptance criteria are clear, proceed without needless confirmation. Ask briefly when missing information would materially change the artifact, risk profile, or implementation path.\n\nFor nontrivial work, keep a visible task list with one in-progress item and checkable completion conditions. Requirements and milestone specs should use RFC 2119 keywords and acceptance criteria that can be checked from repo state or named external evidence.\n\nUse DeepWork, reviews, tests, browser evidence, source checks, or human-meaningful validation before calling substantive work done.\n\nOptimize substantive prose for density. Remove filler, keep every sentence load-bearing, preserve nuance, and avoid summaries that erase interesting claims.\n\nNumbers, market claims, schedules, legal or regulatory claims, current facts, prices, and recommendations require source checks when there is a meaningful chance of drift or high-stakes error.\n\nNever push, tag, merge, publish, deploy, send external messages, type credentials, make payments, perform legal filings, mutate production, or make irreversible data changes without explicit user approval.",
|
|
47
|
-
engineer: 'You are operating as an engineering-focused coding agent.\nPrioritize maintainable implementation, clear tests, concise diffs, and verification evidence.\nBefore changing code, inspect the existing project conventions and reuse established patterns.',
|
|
48
|
-
data_analyst: 'You are operating as a data-analysis-focused agent.\nPrioritize careful data inspection, reproducible analysis steps, clear assumptions, and actionable summaries.\nWhen data or methodology is uncertain, call out limitations and validation checks explicitly.',
|
|
49
|
-
};
|
|
50
|
-
const createFirstRunWelcomeProfileContent = (profileId, roleLabel, roleDescription, rolePrompt, extensions) => {
|
|
51
|
-
const lines = [`id: ${profileId}`, `label: ${roleLabel}`, `description: ${roleDescription}`, 'controls:'];
|
|
52
|
-
if (extensions.length > 0) {
|
|
53
|
-
lines.push(' pi:', ' extensions:', ...extensions.map((extension) => ` - ${extension}`));
|
|
54
|
-
}
|
|
55
|
-
lines.push(' append_system_prompt: |', ...rolePrompt.split('\n').map((line) => ` ${line}`), '');
|
|
56
|
-
return lines.join('\n');
|
|
57
|
-
};
|
|
58
|
-
const updateCopiedProfile = (profilePath, description, extensions) => {
|
|
59
|
-
const profile = readRecord(parse(readFileSync(profilePath, 'utf8')));
|
|
60
|
-
const controls = readRecord(profile.controls);
|
|
61
|
-
const piControls = readRecord(controls.pi);
|
|
62
|
-
profile.description ??= description;
|
|
63
|
-
controls.extensions = [];
|
|
64
|
-
piControls.extensions = [...extensions];
|
|
65
|
-
controls.pi = piControls;
|
|
66
|
-
profile.controls = controls;
|
|
67
|
-
mkdirSync(dirname(profilePath), { recursive: true });
|
|
68
|
-
writeFileSync(profilePath, stringify(profile));
|
|
69
|
-
};
|
|
70
|
-
const readRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value) ? { ...value } : {};
|
|
71
|
-
const defaultProfilesSourceGithub = 'ai-outfitter/default-profiles';
|
|
72
|
-
const defaultProfilesSourcePath = 'profiles';
|
|
73
|
-
const defaultProfilesSourceUri = 'https://github.com/ai-outfitter/default-profiles';
|
|
74
|
-
const excludeDefaultProfileSources = (settingsPath, profileId) => {
|
|
75
|
-
const document = readRecord(parse(readFileSync(settingsPath, 'utf8')));
|
|
76
|
-
const rawProfileSources = document.profile_sources;
|
|
77
|
-
const profileSources = Array.isArray(rawProfileSources) ? rawProfileSources : [];
|
|
78
|
-
const nextProfileSources = profileSources.map((source) => {
|
|
79
|
-
const record = readRecord(source);
|
|
80
|
-
if (!isDefaultProfilesSource(record)) {
|
|
81
|
-
return source;
|
|
82
|
-
}
|
|
83
|
-
const except = Array.isArray(record.except)
|
|
84
|
-
? record.except.filter((item) => typeof item === 'string')
|
|
85
|
-
: [];
|
|
86
|
-
return { ...record, except: [...new Set([...except, profileId])] };
|
|
87
|
-
});
|
|
88
|
-
writeFileSync(settingsPath, stringify({ ...document, profile_sources: nextProfileSources }));
|
|
89
|
-
};
|
|
90
|
-
const isDefaultProfilesSource = (source) => {
|
|
91
|
-
if (source.path !== defaultProfilesSourcePath) {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
if (source.github === defaultProfilesSourceGithub) {
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
return typeof source.uri === 'string' && normalizeDefaultProfilesSourceUri(source.uri) === defaultProfilesSourceUri;
|
|
98
|
-
};
|
|
99
|
-
const normalizeDefaultProfilesSourceUri = (uri) => uri
|
|
100
|
-
.replace(/^git\+/u, '')
|
|
101
|
-
.replace(/\/$/u, '')
|
|
102
|
-
.replace(/\.git$/u, '');
|
|
103
|
-
export const updateSettingsDefaultProfile = (settingsPath, profileId) => {
|
|
104
|
-
const content = readFileSync(settingsPath, 'utf8');
|
|
105
|
-
const nextContent = /^default_profile:.*$/mu.test(content)
|
|
106
|
-
? content.replace(/^default_profile:.*$/gmu, `default_profile: ${profileId}`)
|
|
107
|
-
: `${content.replace(/\s*$/u, '\n')}default_profile: ${profileId}\n`;
|
|
108
|
-
writeFileSync(settingsPath, nextContent);
|
|
109
|
-
};
|
|
110
|
-
//# sourceMappingURL=FirstRunWelcomeProfile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FirstRunWelcomeProfile.js","sourceRoot":"","sources":["../../../src/cli/commands/FirstRunWelcomeProfile.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAcxC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,aAAqB,EACrB,YAAoB,EACpB,aAA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|
-
export interface PiRuntimeOnboardingLaunchInput {
|
|
3
|
-
readonly autoOpenOutfitter?: boolean;
|
|
4
|
-
readonly defaultProfilesPath?: string;
|
|
5
|
-
readonly projectDirectory?: string;
|
|
6
|
-
readonly setupSourceUri?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface PiLaunchProfileIdentity {
|
|
9
|
-
readonly id: string;
|
|
10
|
-
readonly label?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PiLoginLaunchPlanInput {
|
|
13
|
-
readonly adapterId: string;
|
|
14
|
-
readonly homeDirectory: string;
|
|
15
|
-
readonly launchPlan: AgentLaunchPlan;
|
|
16
|
-
readonly profile?: PiLaunchProfileIdentity;
|
|
17
|
-
readonly runtimeOnboarding?: PiRuntimeOnboardingLaunchInput;
|
|
18
|
-
readonly startupAsciiArt?: boolean;
|
|
19
|
-
readonly writeLine?: (message: string) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare const preparePiLoginLaunchPlan: (input: PiLoginLaunchPlanInput) => AgentLaunchPlan;
|
|
22
|
-
export declare const isNonInteractivePiLaunch: (args: readonly string[]) => boolean;
|