@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,244 +0,0 @@
|
|
|
1
|
-
// Provides the command object for synchronizing URI-backed profile and settings sources.
|
|
2
|
-
import { existsSync, mkdirSync, rmSync } from 'node:fs';
|
|
3
|
-
import { createRequire } from 'node:module';
|
|
4
|
-
import { homedir } from 'node:os';
|
|
5
|
-
import { dirname, join } from 'node:path';
|
|
6
|
-
import { fileURLToPath } from 'node:url';
|
|
7
|
-
import spawn from 'cross-spawn';
|
|
8
|
-
import { createProfileSourceCachePath, createRemoteRepositoryCachePath, normalizeGitUri, redactProfileSourceUriCredentials, resolveRemoteRepositorySubpath, } from '../../profiles/ProfileCache.js';
|
|
9
|
-
import { loadLocalProfileSource } from '../../profiles/ProfileLoader.js';
|
|
10
|
-
import { normalizeRemoteSourceUri, } from '../../profiles/ProfileSource.js';
|
|
11
|
-
import { refreshPiExtensionCaches } from '../../agents/pi/PiExtensionCache.js';
|
|
12
|
-
import { discoverSettingsLoadPlan, loadSettings, loadSettingsWithCachedRemoteSettings, resolveCachedRemoteSettingsPath, } from '../../settings/SettingsLoader.js';
|
|
13
|
-
export const executeSyncCommand = (input, dependencies = {}) => {
|
|
14
|
-
const localSettings = loadSettings(discoverSettingsLoadPlan(input));
|
|
15
|
-
if (localSettings.issues.length > 0) {
|
|
16
|
-
throw new Error(`Cannot sync with invalid settings: ${localSettings.issues.map(formatSettingsIssue).join('; ')}`);
|
|
17
|
-
}
|
|
18
|
-
const synchronizer = dependencies.synchronizer ?? createGitSynchronizer(dependencies.writeLine);
|
|
19
|
-
const repositoryVisibilityClassifier = dependencies.repositoryVisibilityClassifier ?? createGitHubRepositoryVisibilityClassifier();
|
|
20
|
-
const privateCatalogGate = createPrivateCatalogGate(input.homeDirectory, repositoryVisibilityClassifier, dependencies);
|
|
21
|
-
const remoteSettingsSources = localSettings.settings.remoteSettings;
|
|
22
|
-
const remoteSettingsGateResults = gatePrivateCatalogSources(remoteSettingsSources, privateCatalogGate);
|
|
23
|
-
const remoteSettingsResults = remoteSettingsGateResults.allowedSources.map((source) => syncRemoteSettingsSource(input.homeDirectory, source, synchronizer));
|
|
24
|
-
const syncedRemoteSettingsSources = remoteSettingsGateResults.allowedSources.filter((_source, index) => remoteSettingsResults[index]?.status !== 'failed');
|
|
25
|
-
const loadedSettings = loadSettingsWithCachedRemoteSettings(input, syncedRemoteSettingsSources);
|
|
26
|
-
if (loadedSettings.issues.length > 0) {
|
|
27
|
-
throw new Error(`Cannot sync with invalid settings: ${loadedSettings.issues.map(formatSettingsIssue).join('; ')}`);
|
|
28
|
-
}
|
|
29
|
-
const uriSources = loadedSettings.settings.profileSources.filter(isRemoteProfileSource);
|
|
30
|
-
const profileSourceGateResults = gatePrivateCatalogSources(uriSources, privateCatalogGate);
|
|
31
|
-
const profileSourceResults = profileSourceGateResults.allowedSources.map((source) => syncUriSource(input.homeDirectory, source, synchronizer));
|
|
32
|
-
const sourceResults = [
|
|
33
|
-
...remoteSettingsResults,
|
|
34
|
-
...remoteSettingsGateResults.skippedResults,
|
|
35
|
-
...profileSourceResults,
|
|
36
|
-
...profileSourceGateResults.skippedResults,
|
|
37
|
-
];
|
|
38
|
-
const infoMessages = [...remoteSettingsGateResults.messages, ...profileSourceGateResults.messages];
|
|
39
|
-
const extensionRefreshMessages = refreshPiExtensionCaches(loadedSettings.settings.cacheDirectory ?? join(input.homeDirectory, '.outfitter', 'cache'), { onProgress: dependencies.writeLine }).map((result) => `${result.status}: pi extension ${result.source} (${result.message})`);
|
|
40
|
-
return {
|
|
41
|
-
sources: sourceResults,
|
|
42
|
-
messages: sourceResults.length === 0 && extensionRefreshMessages.length === 0
|
|
43
|
-
? ['No URI profile or remote settings sources configured; nothing to sync.']
|
|
44
|
-
: [
|
|
45
|
-
...infoMessages,
|
|
46
|
-
...sourceResults.map((result) => `${result.status}: ${result.uri} -> ${result.cachePath} (${result.message})`),
|
|
47
|
-
...extensionRefreshMessages,
|
|
48
|
-
],
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export const createSyncCommand = (dependencies = {}) => {
|
|
52
|
-
const command = {
|
|
53
|
-
name: 'sync',
|
|
54
|
-
description: 'Synchronize URI-backed Outfitter profile and remote settings sources into the local cache.',
|
|
55
|
-
register(program) {
|
|
56
|
-
program
|
|
57
|
-
.command(command.name)
|
|
58
|
-
.description(command.description)
|
|
59
|
-
.action(() => {
|
|
60
|
-
/* v8 ignore next -- console fallback is direct CLI behavior; tests inject a writer. */
|
|
61
|
-
const writeLine = dependencies.writeLine ?? console.log;
|
|
62
|
-
const result = executeSyncCommand({
|
|
63
|
-
/* v8 ignore next -- default process home is exercised by the direct CLI entrypoint, not unit tests. */
|
|
64
|
-
homeDirectory: dependencies.homeDirectory ?? homedir(),
|
|
65
|
-
/* v8 ignore next -- default process cwd is exercised by the direct CLI entrypoint, not unit tests. */
|
|
66
|
-
projectDirectory: dependencies.projectDirectory ?? process.cwd(),
|
|
67
|
-
}, { ...dependencies, writeLine });
|
|
68
|
-
for (const message of result.messages) {
|
|
69
|
-
writeLine(message);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
return command;
|
|
75
|
-
};
|
|
76
|
-
const syncRemoteSettingsSource = (homeDirectory, source, synchronizer) => {
|
|
77
|
-
const cachePath = createRemoteRepositoryCachePath(homeDirectory, source);
|
|
78
|
-
const displayUri = formatDisplayUri(source);
|
|
79
|
-
try {
|
|
80
|
-
// Resolving the configured subpath before syncing rejects unsafe (absolute or
|
|
81
|
-
// cache-escaping) paths without invoking the synchronizer.
|
|
82
|
-
resolveRemoteRepositorySubpath(cachePath, source.path);
|
|
83
|
-
const status = synchronizer.sync(source, cachePath);
|
|
84
|
-
const settingsPath = resolveCachedRemoteSettingsPath(homeDirectory, source);
|
|
85
|
-
if (!existsSync(settingsPath)) {
|
|
86
|
-
return {
|
|
87
|
-
uri: displayUri,
|
|
88
|
-
cachePath,
|
|
89
|
-
status: 'failed',
|
|
90
|
-
message: `Remote settings file not found: ${settingsPath}`,
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
return { uri: displayUri, cachePath, status, message: `Remote settings file available at ${settingsPath}.` };
|
|
94
|
-
}
|
|
95
|
-
catch (error) {
|
|
96
|
-
return formatSyncFailure(displayUri, cachePath, source, error);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
const syncUriSource = (homeDirectory, source, synchronizer) => {
|
|
100
|
-
const cachePath = remoteCachePathForProfileSource(homeDirectory, source);
|
|
101
|
-
const displayUri = formatDisplayUri(source);
|
|
102
|
-
try {
|
|
103
|
-
const profileSourcePath = resolveRemoteRepositorySubpath(cachePath, source.path);
|
|
104
|
-
const status = synchronizer.sync(source, cachePath);
|
|
105
|
-
const validation = loadLocalProfileSource({
|
|
106
|
-
path: profileSourcePath,
|
|
107
|
-
only: source.only,
|
|
108
|
-
except: source.except,
|
|
109
|
-
});
|
|
110
|
-
if (validation.issues.length > 0) {
|
|
111
|
-
return {
|
|
112
|
-
uri: displayUri,
|
|
113
|
-
cachePath,
|
|
114
|
-
status: 'failed',
|
|
115
|
-
message: `Synced source failed profile validation: ${validation.issues.map(formatProfileIssue).join('; ')}`,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
uri: displayUri,
|
|
120
|
-
cachePath,
|
|
121
|
-
status,
|
|
122
|
-
message: validation.profiles.length === 1 ? '1 profile validated.' : `${validation.profiles.length} profiles validated.`,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
return formatSyncFailure(displayUri, cachePath, source, error);
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
export const createGitSynchronizer = (progress) => ({
|
|
130
|
-
sync(source, cachePath) {
|
|
131
|
-
mkdirSync(dirname(cachePath), { recursive: true });
|
|
132
|
-
if (existsSync(cachePath)) {
|
|
133
|
-
progress?.(`outfitter: updating catalog ${formatDisplayUri(source)}…`);
|
|
134
|
-
runGit(['-C', cachePath, 'fetch', '--all', '--tags']);
|
|
135
|
-
if (source.ref === undefined) {
|
|
136
|
-
runGit(['-C', cachePath, 'pull', '--ff-only']);
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
checkoutRefIfPresent(cachePath, source.ref);
|
|
140
|
-
}
|
|
141
|
-
return 'updated';
|
|
142
|
-
}
|
|
143
|
-
progress?.(`outfitter: cloning catalog ${formatDisplayUri(source)}…`);
|
|
144
|
-
cloneCatalogSource(source, cachePath);
|
|
145
|
-
return 'updated';
|
|
146
|
-
},
|
|
147
|
-
});
|
|
148
|
-
// Catalog caches are shallow single-branch clones to keep first boot fast on large org catalogs.
|
|
149
|
-
// A ref names the branch or tag to shallow-clone directly; refs that are not remote branch/tag
|
|
150
|
-
// names (for example commit SHAs) fall back to a full clone plus checkout.
|
|
151
|
-
const cloneCatalogSource = (source, cachePath) => {
|
|
152
|
-
const cloneUri = normalizeGitUri(normalizeRemoteSourceUri(source));
|
|
153
|
-
if (source.ref === undefined) {
|
|
154
|
-
runGit(['clone', '--depth', '1', '--single-branch', '--', cloneUri, cachePath]);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
assertSafeGitRef(source.ref);
|
|
158
|
-
if (gitSucceeds(['clone', '--depth', '1', '--single-branch', '--branch', source.ref, '--', cloneUri, cachePath])) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
rmSync(cachePath, { recursive: true, force: true });
|
|
162
|
-
runGit(['clone', '--', cloneUri, cachePath]);
|
|
163
|
-
checkoutRefIfPresent(cachePath, source.ref);
|
|
164
|
-
};
|
|
165
|
-
const checkoutRefIfPresent = (cachePath, ref) => {
|
|
166
|
-
if (ref === undefined) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
assertSafeGitRef(ref);
|
|
170
|
-
if (gitSucceeds(['-C', cachePath, 'rev-parse', '--verify', '--quiet', `refs/remotes/origin/${ref}`])) {
|
|
171
|
-
runGit(['-C', cachePath, 'checkout', '-B', ref, `refs/remotes/origin/${ref}`]);
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
runGit(['-C', cachePath, 'checkout', ref]);
|
|
175
|
-
};
|
|
176
|
-
const assertSafeGitRef = (ref) => {
|
|
177
|
-
if (ref.startsWith('-')) {
|
|
178
|
-
throw new Error(`Git ref '${ref}' must not start with '-'.`);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
const gitSucceeds = (args) => spawn.sync('git', args, { stdio: 'pipe', encoding: 'utf8' }).status === 0;
|
|
182
|
-
const runGit = (args) => {
|
|
183
|
-
const result = spawn.sync('git', args, { stdio: 'pipe', encoding: 'utf8' });
|
|
184
|
-
if (result.status !== 0) {
|
|
185
|
-
/* v8 ignore next -- the final fallback only applies if git emits no stdout or stderr. */
|
|
186
|
-
throw new Error((result.stderr || result.stdout || `git ${args.join(' ')} failed`).trim());
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
export const syncProfileSource = (homeDirectory, source, synchronizer = createGitSynchronizer()) => syncUriSource(homeDirectory, source, synchronizer);
|
|
190
|
-
const isRemoteProfileSource = (source) => source.uri !== undefined || source.github !== undefined;
|
|
191
|
-
const enterprisePrivateCatalogs = loadEnterprisePrivateCatalogs();
|
|
192
|
-
const createPrivateCatalogGate = (homeDirectory, classifier, dependencies) => enterprisePrivateCatalogs.createPrivateCatalogGate({
|
|
193
|
-
homeDirectory,
|
|
194
|
-
classifier,
|
|
195
|
-
prompt: dependencies.privateCatalogPrompt,
|
|
196
|
-
});
|
|
197
|
-
const gatePrivateCatalogSources = (sources, gate) => enterprisePrivateCatalogs.gatePrivateCatalogSources(sources, gate, {
|
|
198
|
-
formatDisplayUri,
|
|
199
|
-
createRemoteRepositoryCachePath,
|
|
200
|
-
});
|
|
201
|
-
export const createGitHubRepositoryVisibilityClassifier = () => enterprisePrivateCatalogs.createGitHubRepositoryVisibilityClassifier();
|
|
202
|
-
function loadEnterprisePrivateCatalogs() {
|
|
203
|
-
const enterpriseRequire = createRequire(import.meta.url);
|
|
204
|
-
const sourceModule = new URL('../../../../enterprise/cli/privateCatalogGate.cjs', import.meta.url);
|
|
205
|
-
const packageModule = new URL('../../../code/enterprise/cli/privateCatalogGate.cjs', import.meta.url);
|
|
206
|
-
for (const moduleUrl of [sourceModule, packageModule]) {
|
|
207
|
-
const modulePath = fileURLToPath(moduleUrl);
|
|
208
|
-
/* v8 ignore next -- packaged npm layout is exercised after build, not unit tests. */
|
|
209
|
-
if (existsSync(modulePath)) {
|
|
210
|
-
return enterpriseRequire(modulePath);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
/* v8 ignore next -- defensive packaging assertion for missing enterprise gate module. */
|
|
214
|
-
throw new Error('Outfitter enterprise private catalog gate module was not found.');
|
|
215
|
-
}
|
|
216
|
-
const remoteCachePathForProfileSource = (homeDirectory, source) => {
|
|
217
|
-
if (source.ref === undefined && source.path === undefined && source.uri !== undefined) {
|
|
218
|
-
return createProfileSourceCachePath(homeDirectory, source.uri);
|
|
219
|
-
}
|
|
220
|
-
return createRemoteRepositoryCachePath(homeDirectory, source);
|
|
221
|
-
};
|
|
222
|
-
const formatDisplayUri = (source) => {
|
|
223
|
-
const uri = redactProfileSourceUriCredentials(normalizeRemoteSourceUri(source));
|
|
224
|
-
const ref = source.ref === undefined ? '' : `#${source.ref}`;
|
|
225
|
-
const path = source.path === undefined ? '' : `:${source.path}`;
|
|
226
|
-
return `${uri}${ref}${path}`;
|
|
227
|
-
};
|
|
228
|
-
const formatSyncFailure = (displayUri, cachePath, source, error) => {
|
|
229
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
230
|
-
return {
|
|
231
|
-
uri: displayUri,
|
|
232
|
-
cachePath,
|
|
233
|
-
status: 'failed',
|
|
234
|
-
message: redactSensitiveText(message, normalizeRemoteSourceUri(source)),
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
const redactSensitiveText = (message, uri) => message
|
|
238
|
-
.split(uri)
|
|
239
|
-
.join(redactProfileSourceUriCredentials(uri))
|
|
240
|
-
.split(normalizeGitUri(uri))
|
|
241
|
-
.join(redactProfileSourceUriCredentials(normalizeGitUri(uri)));
|
|
242
|
-
const formatSettingsIssue = (issue) => `${issue.filePath}#${issue.path} ${issue.message}`;
|
|
243
|
-
const formatProfileIssue = (issue) => `${issue.path} ${issue.message}`;
|
|
244
|
-
//# sourceMappingURL=SyncCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SyncCommand.js","sourceRoot":"","sources":["../../../src/cli/commands/SyncCommand.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,KAAK,MAAM,aAAa,CAAC;AAEhC,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,EAC/B,eAAe,EACf,iCAAiC,EACjC,8BAA8B,GAC/B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EACL,wBAAwB,GAGzB,MAAM,iCAAiC,CAA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
|
|
2
|
-
export type WelcomeDefaultProfileRoleId = 'founder' | 'engineer' | 'data_analyst';
|
|
3
|
-
export type WelcomeLoadoutItemKind = 'extension' | 'package';
|
|
4
|
-
export interface WelcomeCommandInput {
|
|
5
|
-
readonly homeDirectory: string;
|
|
6
|
-
readonly projectDirectory: string;
|
|
7
|
-
}
|
|
8
|
-
export interface WelcomeRoleChoice {
|
|
9
|
-
readonly id: WelcomeDefaultProfileRoleId;
|
|
10
|
-
readonly label: string;
|
|
11
|
-
readonly description: string;
|
|
12
|
-
}
|
|
13
|
-
export interface WelcomeLoadoutItem {
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly label: string;
|
|
16
|
-
readonly kind: WelcomeLoadoutItemKind;
|
|
17
|
-
readonly source: string;
|
|
18
|
-
}
|
|
19
|
-
export interface WelcomeLoadout {
|
|
20
|
-
readonly id: string;
|
|
21
|
-
readonly label: string;
|
|
22
|
-
readonly items: readonly WelcomeLoadoutItem[];
|
|
23
|
-
}
|
|
24
|
-
export interface WelcomeLoadoutSelection {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly label: string;
|
|
27
|
-
readonly selectedItems: readonly WelcomeLoadoutItem[];
|
|
28
|
-
}
|
|
29
|
-
export interface WelcomePlan {
|
|
30
|
-
readonly answerQuestions: boolean;
|
|
31
|
-
readonly selectedRoleId?: string;
|
|
32
|
-
readonly loadoutItemIds?: readonly string[];
|
|
33
|
-
}
|
|
34
|
-
export interface WelcomeCommandResult {
|
|
35
|
-
readonly answered: boolean;
|
|
36
|
-
readonly selectedRole?: WelcomeRoleChoice;
|
|
37
|
-
readonly selectedLoadout?: WelcomeLoadoutSelection;
|
|
38
|
-
readonly warnings: readonly string[];
|
|
39
|
-
readonly messages: readonly string[];
|
|
40
|
-
}
|
|
41
|
-
export interface WelcomeCommandDependencies {
|
|
42
|
-
readonly homeDirectory?: string;
|
|
43
|
-
readonly projectDirectory?: string;
|
|
44
|
-
readonly input?: {
|
|
45
|
-
readonly isTTY?: boolean;
|
|
46
|
-
} & NodeJS.ReadableStream;
|
|
47
|
-
readonly output?: {
|
|
48
|
-
readonly isTTY?: boolean;
|
|
49
|
-
} & NodeJS.WritableStream;
|
|
50
|
-
readonly interactive?: boolean;
|
|
51
|
-
readonly writeLine?: (message: string) => void;
|
|
52
|
-
readonly selectWelcomePlan?: (input: WelcomeCommandInput) => Promise<WelcomePlan>;
|
|
53
|
-
}
|
|
54
|
-
export declare const writeWelcomeIntro: (output: Pick<NodeJS.WritableStream, "write">) => void;
|
|
55
|
-
export declare const executeWelcomeCommand: (input: WelcomeCommandInput, dependencies?: WelcomeCommandDependencies) => Promise<WelcomeCommandResult>;
|
|
56
|
-
export declare const createWelcomeCommand: (dependencies?: WelcomeCommandDependencies) => CommandObject;
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
// Provides the command object for first-run Outfitter welcome onboarding.
|
|
2
|
-
import { createInterface } from 'node:readline/promises';
|
|
3
|
-
import { homedir } from 'node:os';
|
|
4
|
-
const welcomeIntroLines = [
|
|
5
|
-
String.raw ` ____ _ __ _ _ _ `,
|
|
6
|
-
String.raw ` / __ \ | | / _(_) | | | `,
|
|
7
|
-
String.raw `| | | |_ _| |_| |_ _| |_| |_ ___ _ __ `,
|
|
8
|
-
String.raw `| | | | | | | __| _| | __| __/ _ \ '__|`,
|
|
9
|
-
String.raw `| |__| | |_| | |_| | | | |_| || __/ | `,
|
|
10
|
-
String.raw ` \____/ \__,_|\__|_| |_|\__|\__\___|_| `,
|
|
11
|
-
'',
|
|
12
|
-
'Welcome to Outfitter.',
|
|
13
|
-
'Pi is a fully extensible agentic coding harness.',
|
|
14
|
-
'Outfitter configures Pi with profiles and extensions — turning it into a complete agentic development environment.',
|
|
15
|
-
'',
|
|
16
|
-
'The founder profile brings Pi to feature parity with dedicated agentic coding tools:',
|
|
17
|
-
'task tracking, multi-step reviews, browser automation, subagents, interactive shell, and MCP support.',
|
|
18
|
-
];
|
|
19
|
-
export const writeWelcomeIntro = (output) => {
|
|
20
|
-
output.write(`\n${welcomeIntroLines.join('\n')}\n`);
|
|
21
|
-
};
|
|
22
|
-
const defaultProfileRoleChoices = [
|
|
23
|
-
{
|
|
24
|
-
id: 'founder',
|
|
25
|
-
label: 'Founder',
|
|
26
|
-
description: 'Founder-operator setup for building, product thinking, research checks, dense prose, and careful delivery.',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: 'engineer',
|
|
30
|
-
label: 'Engineer',
|
|
31
|
-
description: 'Engineering setup for repository navigation, maintainable code changes, tests, and reviews.',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'data_analyst',
|
|
35
|
-
label: 'Data Analyst',
|
|
36
|
-
description: 'Data analysis setup for careful inspection, reproducible methods, assumptions, and summaries.',
|
|
37
|
-
},
|
|
38
|
-
];
|
|
39
|
-
const fallbackRoleId = 'founder';
|
|
40
|
-
const recommendedPiLoadout = {
|
|
41
|
-
id: 'recommended-pi',
|
|
42
|
-
label: 'Recommended Pi productivity loadout',
|
|
43
|
-
items: [
|
|
44
|
-
{
|
|
45
|
-
id: 'deepwork',
|
|
46
|
-
label: 'DeepWork',
|
|
47
|
-
kind: 'extension',
|
|
48
|
-
source: 'git:github.com/ai-outfitter/deepwork',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 'rpiv-ask-user-question',
|
|
52
|
-
label: 'Ask User Question',
|
|
53
|
-
kind: 'package',
|
|
54
|
-
source: 'npm:@juicesharp/rpiv-ask-user-question',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 'ulta-tasklist',
|
|
58
|
-
label: 'Ulta Tasklist',
|
|
59
|
-
kind: 'extension',
|
|
60
|
-
source: 'git:github.com/applepi-ai/ulta-tasklist',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
id: 'pi-nolo',
|
|
64
|
-
label: 'Pi NOLO',
|
|
65
|
-
kind: 'package',
|
|
66
|
-
source: 'npm:pi-nolo',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
id: 'pi-browser-harness',
|
|
70
|
-
label: 'Browser Harness',
|
|
71
|
-
kind: 'package',
|
|
72
|
-
source: 'npm:pi-browser-harness',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 'pi-subagent',
|
|
76
|
-
label: 'Pi Subagent',
|
|
77
|
-
kind: 'package',
|
|
78
|
-
source: 'npm:@mjakl/pi-subagent',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: 'pi-btw',
|
|
82
|
-
label: 'Pi BTW',
|
|
83
|
-
kind: 'package',
|
|
84
|
-
source: 'npm:@narumitw/pi-btw',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: 'pi-must-have-extension',
|
|
88
|
-
label: 'Must-Have Extension',
|
|
89
|
-
kind: 'package',
|
|
90
|
-
source: 'npm:pi-must-have-extension',
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: 'pi-interactive-shell',
|
|
94
|
-
label: 'Interactive Shell',
|
|
95
|
-
kind: 'package',
|
|
96
|
-
source: 'npm:pi-interactive-shell',
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
id: 'pi-mcp-adapter',
|
|
100
|
-
label: 'MCP Adapter',
|
|
101
|
-
kind: 'package',
|
|
102
|
-
source: 'npm:pi-mcp-adapter',
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
};
|
|
106
|
-
export const executeWelcomeCommand = async (input, dependencies = {}) => {
|
|
107
|
-
requireInteractiveTerminalIfNeeded(dependencies);
|
|
108
|
-
const plan = await selectWelcomePlan(input, dependencies);
|
|
109
|
-
if (!plan.answerQuestions) {
|
|
110
|
-
return {
|
|
111
|
-
answered: false,
|
|
112
|
-
warnings: [],
|
|
113
|
-
messages: [
|
|
114
|
-
'Skipped default profile setup. Use /outfitter inside Pi or run `outfitter profile list` to manage profiles.',
|
|
115
|
-
],
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
const roleResolution = resolveSelectedRole(plan.selectedRoleId);
|
|
119
|
-
const loadoutResolution = resolveSelectedLoadout(plan.loadoutItemIds);
|
|
120
|
-
const warnings = [...roleResolution.warnings, ...loadoutResolution.warnings];
|
|
121
|
-
return {
|
|
122
|
-
answered: true,
|
|
123
|
-
selectedRole: roleResolution.role,
|
|
124
|
-
selectedLoadout: loadoutResolution.loadout,
|
|
125
|
-
warnings,
|
|
126
|
-
messages: buildWelcomeMessages(warnings),
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
export const createWelcomeCommand = (dependencies = {}) => {
|
|
130
|
-
const command = {
|
|
131
|
-
name: 'welcome',
|
|
132
|
-
description: 'Run Outfitter welcome onboarding prompts.',
|
|
133
|
-
register(program) {
|
|
134
|
-
program
|
|
135
|
-
.command(command.name)
|
|
136
|
-
.description(command.description)
|
|
137
|
-
.action(async () => {
|
|
138
|
-
const result = await executeWelcomeCommand({
|
|
139
|
-
/* v8 ignore next -- default process home is exercised by the direct CLI entrypoint, not unit tests. */
|
|
140
|
-
homeDirectory: dependencies.homeDirectory ?? homedir(),
|
|
141
|
-
/* v8 ignore next -- default process cwd is exercised by the direct CLI entrypoint, not unit tests. */
|
|
142
|
-
projectDirectory: dependencies.projectDirectory ?? process.cwd(),
|
|
143
|
-
}, { ...dependencies, interactive: true });
|
|
144
|
-
for (const message of result.messages) {
|
|
145
|
-
/* v8 ignore next -- console fallback is direct CLI behavior; tests inject a writer. */
|
|
146
|
-
(dependencies.writeLine ?? console.log)(message);
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
return command;
|
|
152
|
-
};
|
|
153
|
-
const selectWelcomePlan = async (input, dependencies) => {
|
|
154
|
-
if (dependencies.selectWelcomePlan !== undefined) {
|
|
155
|
-
return dependencies.selectWelcomePlan(input);
|
|
156
|
-
}
|
|
157
|
-
return promptForWelcomePlan(dependencies);
|
|
158
|
-
};
|
|
159
|
-
const promptForWelcomePlan = async (dependencies) => {
|
|
160
|
-
/* v8 ignore next -- default process streams are direct terminal behavior; tests inject streams. */
|
|
161
|
-
const output = dependencies.output ?? process.stdout;
|
|
162
|
-
/* v8 ignore next -- default process streams are direct terminal behavior; tests inject streams. */
|
|
163
|
-
const readline = createInterface({ input: dependencies.input ?? process.stdin, output });
|
|
164
|
-
try {
|
|
165
|
-
writeWelcomeIntro(output);
|
|
166
|
-
const answer = (await readline.question('Install the founder profile? [Y/n]: ')).trim().toLowerCase();
|
|
167
|
-
const answerQuestions = answer === '' || ['y', 'yes'].includes(answer);
|
|
168
|
-
if (!answerQuestions) {
|
|
169
|
-
return { answerQuestions: false };
|
|
170
|
-
}
|
|
171
|
-
return { answerQuestions: true, selectedRoleId: 'founder' };
|
|
172
|
-
}
|
|
173
|
-
finally {
|
|
174
|
-
readline.close();
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
const resolveSelectedRole = (selectedRoleId) => {
|
|
178
|
-
const roleId = selectedRoleId ?? fallbackRoleId;
|
|
179
|
-
const selectedRole = defaultProfileRoleChoices.find((role) => role.id === roleId);
|
|
180
|
-
if (selectedRole !== undefined) {
|
|
181
|
-
return { role: selectedRole, warnings: [] };
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
role: defaultProfileRoleChoices.find((role) => role.id === fallbackRoleId),
|
|
185
|
-
warnings: [`Welcome role '${roleId}' is not available; using fallback role '${fallbackRoleId}'.`],
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
const resolveSelectedLoadout = (loadoutItemIds) => {
|
|
189
|
-
const selectedItemIds = loadoutItemIds ?? recommendedPiLoadout.items.map((item) => item.id);
|
|
190
|
-
const availableItems = new Map(recommendedPiLoadout.items.map((item) => [item.id, item]));
|
|
191
|
-
const selectedItems = [];
|
|
192
|
-
const warnings = [];
|
|
193
|
-
for (const itemId of selectedItemIds) {
|
|
194
|
-
const item = availableItems.get(itemId);
|
|
195
|
-
if (item === undefined) {
|
|
196
|
-
warnings.push(`Loadout item '${itemId}' is not available for ${recommendedPiLoadout.id}; skipping it.`);
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
if (selectedItems.every((selectedItem) => selectedItem.id !== item.id)) {
|
|
200
|
-
selectedItems.push(item);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return {
|
|
204
|
-
loadout: { id: recommendedPiLoadout.id, label: recommendedPiLoadout.label, selectedItems },
|
|
205
|
-
warnings,
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
const buildWelcomeMessages = (warnings) => [
|
|
209
|
-
'Installed the founder profile. Use /outfitter inside Pi or run `outfitter profile list` to manage profiles.',
|
|
210
|
-
...warnings.map((warning) => `Warning: ${warning}`),
|
|
211
|
-
];
|
|
212
|
-
const requireInteractiveTerminalIfNeeded = (dependencies) => {
|
|
213
|
-
if (dependencies.interactive !== true) {
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
/* v8 ignore next -- default process streams are direct terminal behavior; tests inject streams. */
|
|
217
|
-
const inputIsTty = (dependencies.input ?? process.stdin).isTTY === true;
|
|
218
|
-
/* v8 ignore next -- default process streams are direct terminal behavior; tests inject streams. */
|
|
219
|
-
const outputIsTty = (dependencies.output ?? process.stdout).isTTY === true;
|
|
220
|
-
if (!inputIsTty || !outputIsTty) {
|
|
221
|
-
throw new Error('`outfitter welcome` requires an interactive TTY on both stdin and stdout.');
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
//# sourceMappingURL=WelcomeCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WelcomeCommand.js","sourceRoot":"","sources":["../../../src/cli/commands/WelcomeCommand.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA+DlC,MAAM,iBAAiB,GAAG;IACxB,MAAM,CAAC,GAAG,CAAA,2CAA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CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YACvE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,EAAE,EAAE,EAAE,oBAAoB,CAAC,EAAE,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,aAAa,EAAE;QAC1F,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,QAA2B,EAAqB,EAAE,CAAC;IAC/E,6GAA6G;IAC7G,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,OAAO,EAAE,CAAC;CACpD,CAAC;AAEF,MAAM,kCAAkC,GAAG,CAAC,YAAwC,EAAQ,EAAE;IAC5F,IAAI,YAAY,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;QACtC,OAAO;IACT,CAAC;IAED,mGAAmG;IACnG,MAAM,UAAU,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC;IACxE,mGAAmG;IACnG,MAAM,WAAW,GAAG,CAAC,YAAY,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC;IAE3E,IAAI,CAAC,UAAU,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC,CAAC;IAC/F,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄
|
|
2
|
-
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▀▀▀ ███ ███
|
|
3
|
-
███ ███ ███ ███ ███ ███▄▄ ███ ███ ███ ███▀ ███▄██▀
|
|
4
|
-
███▄███ ███▄███ ███ ███ ▄▄███▄▄ ███ ███ ███▄███ ███ ███
|
|
5
|
-
▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀▀▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀▀▀▀▀ ▀▀▀ ▀▀▀
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CommandObject } from '../CommandObject.js';
|
|
2
|
-
import type { ProfileCommandDependencies } from './Shared.js';
|
|
3
|
-
export declare const createProfileCommands: (dependencies?: ProfileCommandDependencies) => CommandObject[];
|
|
4
|
-
export declare const createProfileCommand: () => CommandObject;
|
|
5
|
-
export { executeCreateProfileCommand } from './CreateCommand.js';
|
|
6
|
-
export { executeListProfilesCommand } from './ListCommand.js';
|
|
7
|
-
export { executeProfileLintCommand } from './LintCommand.js';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createProfileCreateCommand } from './CreateCommand.js';
|
|
2
|
-
import { createProfileListCommand } from './ListCommand.js';
|
|
3
|
-
import { createProfileLintCommand } from './LintCommand.js';
|
|
4
|
-
import { getOrCreateProfileCommander, profileCommandDescription, profileCommandName } from './Shared.js';
|
|
5
|
-
export const createProfileCommands = (dependencies = {}) => [
|
|
6
|
-
createProfileCommand(),
|
|
7
|
-
createProfileListCommand(dependencies),
|
|
8
|
-
createProfileCreateCommand(dependencies),
|
|
9
|
-
createProfileLintCommand(dependencies),
|
|
10
|
-
];
|
|
11
|
-
export const createProfileCommand = () => {
|
|
12
|
-
const command = {
|
|
13
|
-
name: profileCommandName,
|
|
14
|
-
description: profileCommandDescription,
|
|
15
|
-
register(program) {
|
|
16
|
-
getOrCreateProfileCommander(program);
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
return command;
|
|
20
|
-
};
|
|
21
|
-
export { executeCreateProfileCommand } from './CreateCommand.js';
|
|
22
|
-
export { executeListProfilesCommand } from './ListCommand.js';
|
|
23
|
-
export { executeProfileLintCommand } from './LintCommand.js';
|
|
24
|
-
//# sourceMappingURL=Command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Command.js","sourceRoot":"","sources":["../../../../src/cli/commands/profile/Command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEzG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,eAA2C,EAAE,EAAmB,EAAE,CAAC;IACvG,oBAAoB,EAAE;IACtB,wBAAwB,CAAC,YAAY,CAAC;IACtC,0BAA0B,CAAC,YAAY,CAAC;IACxC,wBAAwB,CAAC,YAAY,CAAC;CACvC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAkB,EAAE;IACtD,MAAM,OAAO,GAAkB;QAC7B,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,yBAAyB;QACtC,QAAQ,CAAC,OAAgB;YACvB,2BAA2B,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC;KACF,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { CommandObject } from '../CommandObject.js';
|
|
2
|
-
import type { ProfileCommandDependencies } from './Shared.js';
|
|
3
|
-
export type CreateProfileScope = 'user' | 'project' | 'project-local';
|
|
4
|
-
export interface CreateProfileInput {
|
|
5
|
-
readonly name: string;
|
|
6
|
-
readonly scope?: CreateProfileScope;
|
|
7
|
-
readonly path?: string;
|
|
8
|
-
readonly homeDirectory: string;
|
|
9
|
-
readonly projectDirectory: string;
|
|
10
|
-
}
|
|
11
|
-
export interface CreateProfileResult {
|
|
12
|
-
readonly profileDirectory: string;
|
|
13
|
-
readonly profilePath: string;
|
|
14
|
-
readonly createdDirectories: readonly string[];
|
|
15
|
-
readonly createdProfile: boolean;
|
|
16
|
-
readonly messages: readonly string[];
|
|
17
|
-
}
|
|
18
|
-
export declare const createProfileCreateCommand: (dependencies: ProfileCommandDependencies) => CommandObject;
|
|
19
|
-
export declare const executeCreateProfileCommand: (input: CreateProfileInput) => CreateProfileResult;
|