@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.
Files changed (308) hide show
  1. package/.outfitter/skills/outfitter/SKILL.md +67 -37
  2. package/README.md +63 -35
  3. package/code/enterprise/cli/privateCatalogSettings.cjs +2 -2
  4. package/code/enterprise/pi-extension/privateCatalogOnboarding.js +5 -8
  5. package/code/enterprise/shared/privateCatalogPolicy.cjs +5 -5
  6. package/code/pi-extension/src/outfitter-extension.js +353 -553
  7. package/code/pi-extension/src/outfitter-runtime-extension.js +160 -0
  8. package/dist/agents/AgentLaunch.d.ts +9 -1
  9. package/dist/agents/AgentLaunch.js +19 -0
  10. package/dist/agents/AgentLaunch.js.map +1 -1
  11. package/dist/agents/PiCredentialPersistence.d.ts +6 -0
  12. package/dist/agents/PiCredentialPersistence.js +33 -0
  13. package/dist/agents/PiCredentialPersistence.js.map +1 -0
  14. package/dist/cli/OutfitterCli.js +10 -18
  15. package/dist/cli/OutfitterCli.js.map +1 -1
  16. package/dist/cli/commands/CommandObject.d.ts +0 -5
  17. package/dist/cli/commands/CommandObject.js +1 -4
  18. package/dist/cli/commands/CommandObject.js.map +1 -1
  19. package/dist/cli/commands/DumpCommand.d.ts +19 -0
  20. package/dist/cli/commands/DumpCommand.js +54 -0
  21. package/dist/cli/commands/DumpCommand.js.map +1 -0
  22. package/dist/cli/commands/ListCommand.d.ts +17 -0
  23. package/dist/cli/commands/ListCommand.js +77 -0
  24. package/dist/cli/commands/ListCommand.js.map +1 -0
  25. package/dist/cli/commands/PiRuntimeLaunch.d.ts +8 -0
  26. package/dist/cli/commands/PiRuntimeLaunch.js +47 -0
  27. package/dist/cli/commands/PiRuntimeLaunch.js.map +1 -0
  28. package/dist/cli/commands/ProcessDefaults.d.ts +2 -0
  29. package/dist/cli/commands/ProcessDefaults.js +5 -0
  30. package/dist/cli/commands/ProcessDefaults.js.map +1 -0
  31. package/dist/cli/commands/RunAgentCommand.d.ts +46 -0
  32. package/dist/cli/commands/RunAgentCommand.js +176 -0
  33. package/dist/cli/commands/RunAgentCommand.js.map +1 -0
  34. package/dist/cli/commands/SetupCommand.d.ts +38 -6
  35. package/dist/cli/commands/SetupCommand.js +194 -232
  36. package/dist/cli/commands/SetupCommand.js.map +1 -1
  37. package/dist/cli/commands/ValidateCommand.d.ts +20 -0
  38. package/dist/cli/commands/ValidateCommand.js +54 -0
  39. package/dist/cli/commands/ValidateCommand.js.map +1 -0
  40. package/dist/composer/Composer.d.ts +11 -0
  41. package/dist/composer/Composer.js +72 -0
  42. package/dist/composer/Composer.js.map +1 -0
  43. package/dist/composer/Composition.d.ts +33 -0
  44. package/dist/composer/Composition.js +2 -0
  45. package/dist/composer/Composition.js.map +1 -0
  46. package/dist/dump/Containment.d.ts +8 -0
  47. package/dist/dump/Containment.js +22 -0
  48. package/dist/dump/Containment.js.map +1 -0
  49. package/dist/dump/Dump.d.ts +8 -0
  50. package/dist/dump/Dump.js +182 -0
  51. package/dist/dump/Dump.js.map +1 -0
  52. package/dist/extensions/PiExtensionCache.d.ts +30 -0
  53. package/dist/extensions/PiExtensionCache.js +92 -0
  54. package/dist/extensions/PiExtensionCache.js.map +1 -0
  55. package/dist/fs/TypeConflict.d.ts +6 -0
  56. package/dist/fs/TypeConflict.js +21 -0
  57. package/dist/fs/TypeConflict.js.map +1 -0
  58. package/dist/paths/OutfitterCache.d.ts +6 -0
  59. package/dist/paths/OutfitterCache.js +17 -0
  60. package/dist/paths/OutfitterCache.js.map +1 -0
  61. package/dist/projection/Materialize.d.ts +24 -0
  62. package/dist/projection/Materialize.js +83 -0
  63. package/dist/projection/Materialize.js.map +1 -0
  64. package/dist/projection/ProjectHarness.d.ts +5 -0
  65. package/dist/projection/ProjectHarness.js +77 -0
  66. package/dist/projection/ProjectHarness.js.map +1 -0
  67. package/dist/projection/Projection.d.ts +23 -0
  68. package/dist/projection/Projection.js +2 -0
  69. package/dist/projection/Projection.js.map +1 -0
  70. package/dist/resolver/AgentDefinition.d.ts +30 -0
  71. package/dist/resolver/AgentDefinition.js +123 -0
  72. package/dist/resolver/AgentDefinition.js.map +1 -0
  73. package/dist/resolver/Layer.d.ts +12 -0
  74. package/dist/resolver/Layer.js +30 -0
  75. package/dist/resolver/Layer.js.map +1 -0
  76. package/dist/resolver/Resolver.d.ts +3 -0
  77. package/dist/resolver/Resolver.js +163 -0
  78. package/dist/resolver/Resolver.js.map +1 -0
  79. package/dist/resolver/ResolverContext.d.ts +15 -0
  80. package/dist/resolver/ResolverContext.js +11 -0
  81. package/dist/resolver/ResolverContext.js.map +1 -0
  82. package/dist/resolver/ResolverValidation.d.ts +11 -0
  83. package/dist/resolver/ResolverValidation.js +112 -0
  84. package/dist/resolver/ResolverValidation.js.map +1 -0
  85. package/dist/resolver/Resource.d.ts +88 -0
  86. package/dist/resolver/Resource.js +34 -0
  87. package/dist/resolver/Resource.js.map +1 -0
  88. package/dist/schemas/agent.schema.json +48 -0
  89. package/dist/schemas/settings.schema.json +32 -9
  90. package/dist/settings/Settings.d.ts +34 -5
  91. package/dist/settings/Settings.js +3 -1
  92. package/dist/settings/Settings.js.map +1 -1
  93. package/dist/settings/SettingsLoader.d.ts +1 -1
  94. package/dist/settings/SettingsLoader.js +23 -22
  95. package/dist/settings/SettingsLoader.js.map +1 -1
  96. package/dist/settings/SettingsMerger.js +12 -10
  97. package/dist/settings/SettingsMerger.js.map +1 -1
  98. package/dist/setup/DefaultCatalog.d.ts +20 -0
  99. package/dist/setup/DefaultCatalog.js +89 -0
  100. package/dist/setup/DefaultCatalog.js.map +1 -0
  101. package/dist/setup/Setup.d.ts +43 -0
  102. package/dist/setup/Setup.js +261 -0
  103. package/dist/setup/Setup.js.map +1 -0
  104. package/dist/skills/SkillDocument.d.ts +6 -1
  105. package/dist/skills/SkillDocument.js.map +1 -1
  106. package/dist/sources/SourceCache.d.ts +19 -0
  107. package/dist/{profiles/ProfileCache.js → sources/SourceCache.js} +22 -18
  108. package/dist/sources/SourceCache.js.map +1 -0
  109. package/dist/validation/SchemaValidator.d.ts +1 -1
  110. package/dist/validation/SchemaValidator.js +4 -13
  111. package/dist/validation/SchemaValidator.js.map +1 -1
  112. package/docs/architecture/state_writeback_strategy.md +54 -122
  113. package/docs/documentation/README.md +33 -12
  114. package/docs/documentation/actions.md +35 -52
  115. package/docs/documentation/agents.md +109 -0
  116. package/docs/documentation/best-practices.md +25 -63
  117. package/docs/documentation/catalogs.md +126 -0
  118. package/docs/documentation/cli.md +39 -41
  119. package/docs/documentation/concepts.md +66 -23
  120. package/docs/documentation/dump-and-bake.md +30 -0
  121. package/docs/documentation/first-time-cli-agent-users.md +8 -8
  122. package/docs/documentation/getting-started.md +28 -8
  123. package/docs/documentation/hooks.md +20 -0
  124. package/docs/documentation/iterating-on-profiles.md +56 -70
  125. package/docs/documentation/local-development.md +84 -0
  126. package/docs/documentation/migration.md +39 -0
  127. package/docs/documentation/personas.md +41 -0
  128. package/docs/documentation/porting-claude.md +54 -0
  129. package/docs/documentation/profiles.md +16 -169
  130. package/docs/documentation/settings.md +61 -0
  131. package/docs/documentation/skills.md +93 -334
  132. package/docs/documentation/state.md +24 -62
  133. package/docs/documentation/subagents.md +37 -0
  134. package/docs/documentation/support-matrix.md +40 -35
  135. package/docs/documentation/switching-to-outfitter.md +75 -81
  136. package/docs/documentation/tasks.md +13 -0
  137. package/docs/documentation/usecases/engineering.md +67 -84
  138. package/docs/documentation/usecases/organization-profile-catalog.md +83 -111
  139. package/docs/documentation/usecases/persona-reviews.md +133 -139
  140. package/docs/philosophy.md +2 -2
  141. package/package.json +3 -3
  142. package/src/schemas/agent.schema.json +48 -0
  143. package/src/schemas/settings.schema.json +32 -9
  144. package/dist/agents/AdapterProfileControls.d.ts +0 -21
  145. package/dist/agents/AdapterProfileControls.js +0 -76
  146. package/dist/agents/AdapterProfileControls.js.map +0 -1
  147. package/dist/agents/AdapterStatePaths.d.ts +0 -12
  148. package/dist/agents/AdapterStatePaths.js +0 -46
  149. package/dist/agents/AdapterStatePaths.js.map +0 -1
  150. package/dist/agents/AgentAdapter.d.ts +0 -44
  151. package/dist/agents/AgentAdapter.js +0 -2
  152. package/dist/agents/AgentAdapter.js.map +0 -1
  153. package/dist/agents/AgentRegistry.d.ts +0 -6
  154. package/dist/agents/AgentRegistry.js +0 -17
  155. package/dist/agents/AgentRegistry.js.map +0 -1
  156. package/dist/agents/LaunchResources.d.ts +0 -17
  157. package/dist/agents/LaunchResources.js +0 -61
  158. package/dist/agents/LaunchResources.js.map +0 -1
  159. package/dist/agents/OutfitterSkill.d.ts +0 -11
  160. package/dist/agents/OutfitterSkill.js +0 -128
  161. package/dist/agents/OutfitterSkill.js.map +0 -1
  162. package/dist/agents/ResourceIdentity.d.ts +0 -2
  163. package/dist/agents/ResourceIdentity.js +0 -51
  164. package/dist/agents/ResourceIdentity.js.map +0 -1
  165. package/dist/agents/claude/ClaudeAdapter.d.ts +0 -2
  166. package/dist/agents/claude/ClaudeAdapter.js +0 -148
  167. package/dist/agents/claude/ClaudeAdapter.js.map +0 -1
  168. package/dist/agents/claude/ClaudeCompositeProfileWriter.d.ts +0 -5
  169. package/dist/agents/claude/ClaudeCompositeProfileWriter.js +0 -7
  170. package/dist/agents/claude/ClaudeCompositeProfileWriter.js.map +0 -1
  171. package/dist/agents/pi/PiAdapter.d.ts +0 -2
  172. package/dist/agents/pi/PiAdapter.js +0 -363
  173. package/dist/agents/pi/PiAdapter.js.map +0 -1
  174. package/dist/agents/pi/PiArgs.d.ts +0 -2
  175. package/dist/agents/pi/PiArgs.js +0 -15
  176. package/dist/agents/pi/PiArgs.js.map +0 -1
  177. package/dist/agents/pi/PiCompositeProfileWriter.d.ts +0 -5
  178. package/dist/agents/pi/PiCompositeProfileWriter.js +0 -7
  179. package/dist/agents/pi/PiCompositeProfileWriter.js.map +0 -1
  180. package/dist/agents/pi/PiExtensionCache.d.ts +0 -12
  181. package/dist/agents/pi/PiExtensionCache.js +0 -195
  182. package/dist/agents/pi/PiExtensionCache.js.map +0 -1
  183. package/dist/agents/pi/PiMcpConfig.d.ts +0 -2
  184. package/dist/agents/pi/PiMcpConfig.js +0 -114
  185. package/dist/agents/pi/PiMcpConfig.js.map +0 -1
  186. package/dist/agents/pi/PiSettingsMergePolicy.d.ts +0 -17
  187. package/dist/agents/pi/PiSettingsMergePolicy.js +0 -59
  188. package/dist/agents/pi/PiSettingsMergePolicy.js.map +0 -1
  189. package/dist/agents/pi/PiSkillSources.d.ts +0 -8
  190. package/dist/agents/pi/PiSkillSources.js +0 -73
  191. package/dist/agents/pi/PiSkillSources.js.map +0 -1
  192. package/dist/cli/commands/FirstRunWelcomeProfile.d.ts +0 -11
  193. package/dist/cli/commands/FirstRunWelcomeProfile.js +0 -110
  194. package/dist/cli/commands/FirstRunWelcomeProfile.js.map +0 -1
  195. package/dist/cli/commands/PiLoginLaunch.d.ts +0 -22
  196. package/dist/cli/commands/PiLoginLaunch.js +0 -170
  197. package/dist/cli/commands/PiLoginLaunch.js.map +0 -1
  198. package/dist/cli/commands/RunCommand.d.ts +0 -36
  199. package/dist/cli/commands/RunCommand.js +0 -345
  200. package/dist/cli/commands/RunCommand.js.map +0 -1
  201. package/dist/cli/commands/SyncCommand.d.ts +0 -46
  202. package/dist/cli/commands/SyncCommand.js +0 -244
  203. package/dist/cli/commands/SyncCommand.js.map +0 -1
  204. package/dist/cli/commands/WelcomeCommand.d.ts +0 -56
  205. package/dist/cli/commands/WelcomeCommand.js +0 -224
  206. package/dist/cli/commands/WelcomeCommand.js.map +0 -1
  207. package/dist/cli/commands/assets/outfitter-ascii.txt +0 -5
  208. package/dist/cli/commands/profile/Command.d.ts +0 -7
  209. package/dist/cli/commands/profile/Command.js +0 -24
  210. package/dist/cli/commands/profile/Command.js.map +0 -1
  211. package/dist/cli/commands/profile/CreateCommand.d.ts +0 -19
  212. package/dist/cli/commands/profile/CreateCommand.js +0 -115
  213. package/dist/cli/commands/profile/CreateCommand.js.map +0 -1
  214. package/dist/cli/commands/profile/LintCommand.d.ts +0 -19
  215. package/dist/cli/commands/profile/LintCommand.js +0 -155
  216. package/dist/cli/commands/profile/LintCommand.js.map +0 -1
  217. package/dist/cli/commands/profile/ListCommand.d.ts +0 -19
  218. package/dist/cli/commands/profile/ListCommand.js +0 -91
  219. package/dist/cli/commands/profile/ListCommand.js.map +0 -1
  220. package/dist/cli/commands/profile/Shared.d.ts +0 -9
  221. package/dist/cli/commands/profile/Shared.js +0 -10
  222. package/dist/cli/commands/profile/Shared.js.map +0 -1
  223. package/dist/cli/commands/run/RunFirstRunOnboarding.d.ts +0 -7
  224. package/dist/cli/commands/run/RunFirstRunOnboarding.js +0 -52
  225. package/dist/cli/commands/run/RunFirstRunOnboarding.js.map +0 -1
  226. package/dist/cli/commands/run/RunLaunchSummary.d.ts +0 -2
  227. package/dist/cli/commands/run/RunLaunchSummary.js +0 -35
  228. package/dist/cli/commands/run/RunLaunchSummary.js.map +0 -1
  229. package/dist/cli/commands/run/RunProfileResolution.d.ts +0 -39
  230. package/dist/cli/commands/run/RunProfileResolution.js +0 -128
  231. package/dist/cli/commands/run/RunProfileResolution.js.map +0 -1
  232. package/dist/cli/commands/run/RunStateWritePrompt.d.ts +0 -2
  233. package/dist/cli/commands/run/RunStateWritePrompt.js +0 -29
  234. package/dist/cli/commands/run/RunStateWritePrompt.js.map +0 -1
  235. package/dist/cli/commands/setup/SetupPrompts.d.ts +0 -14
  236. package/dist/cli/commands/setup/SetupPrompts.js +0 -296
  237. package/dist/cli/commands/setup/SetupPrompts.js.map +0 -1
  238. package/dist/cli/commands/setup/SetupSourceImport.d.ts +0 -5
  239. package/dist/cli/commands/setup/SetupSourceImport.js +0 -177
  240. package/dist/cli/commands/setup/SetupSourceImport.js.map +0 -1
  241. package/dist/cli/commands/setup/SetupSourceLaunch.d.ts +0 -4
  242. package/dist/cli/commands/setup/SetupSourceLaunch.js +0 -65
  243. package/dist/cli/commands/setup/SetupSourceLaunch.js.map +0 -1
  244. package/dist/cli/commands/setup/SetupStarterSource.d.ts +0 -21
  245. package/dist/cli/commands/setup/SetupStarterSource.js +0 -133
  246. package/dist/cli/commands/setup/SetupStarterSource.js.map +0 -1
  247. package/dist/cli/commands/setup/SetupTypes.d.ts +0 -91
  248. package/dist/cli/commands/setup/SetupTypes.js +0 -26
  249. package/dist/cli/commands/setup/SetupTypes.js.map +0 -1
  250. package/dist/compositeProfile/CompositeProfile.d.ts +0 -8
  251. package/dist/compositeProfile/CompositeProfile.js +0 -6
  252. package/dist/compositeProfile/CompositeProfile.js.map +0 -1
  253. package/dist/compositeProfile/CompositeProfileAssembler.d.ts +0 -12
  254. package/dist/compositeProfile/CompositeProfileAssembler.js +0 -32
  255. package/dist/compositeProfile/CompositeProfileAssembler.js.map +0 -1
  256. package/dist/compositeProfile/CompositeProfileCleanup.d.ts +0 -9
  257. package/dist/compositeProfile/CompositeProfileCleanup.js +0 -87
  258. package/dist/compositeProfile/CompositeProfileCleanup.js.map +0 -1
  259. package/dist/compositeProfile/CompositeProfileFile.d.ts +0 -16
  260. package/dist/compositeProfile/CompositeProfileFile.js +0 -16
  261. package/dist/compositeProfile/CompositeProfileFile.js.map +0 -1
  262. package/dist/compositeProfile/CompositeProfileTemplate.d.ts +0 -15
  263. package/dist/compositeProfile/CompositeProfileTemplate.js +0 -65
  264. package/dist/compositeProfile/CompositeProfileTemplate.js.map +0 -1
  265. package/dist/compositeProfile/CompositeProfileWatcher.d.ts +0 -18
  266. package/dist/compositeProfile/CompositeProfileWatcher.js +0 -46
  267. package/dist/compositeProfile/CompositeProfileWatcher.js.map +0 -1
  268. package/dist/compositeProfile/StatePersistence.d.ts +0 -39
  269. package/dist/compositeProfile/StatePersistence.js +0 -249
  270. package/dist/compositeProfile/StatePersistence.js.map +0 -1
  271. package/dist/fs/SafeSymlink.d.ts +0 -13
  272. package/dist/fs/SafeSymlink.js +0 -50
  273. package/dist/fs/SafeSymlink.js.map +0 -1
  274. package/dist/profiles/Profile.d.ts +0 -60
  275. package/dist/profiles/Profile.js +0 -7
  276. package/dist/profiles/Profile.js.map +0 -1
  277. package/dist/profiles/ProfileCache.d.ts +0 -8
  278. package/dist/profiles/ProfileCache.js.map +0 -1
  279. package/dist/profiles/ProfileLoader.d.ts +0 -28
  280. package/dist/profiles/ProfileLoader.js +0 -299
  281. package/dist/profiles/ProfileLoader.js.map +0 -1
  282. package/dist/profiles/ProfileMerger.d.ts +0 -19
  283. package/dist/profiles/ProfileMerger.js +0 -112
  284. package/dist/profiles/ProfileMerger.js.map +0 -1
  285. package/dist/profiles/ProfileSource.d.ts +0 -35
  286. package/dist/profiles/ProfileSource.js +0 -13
  287. package/dist/profiles/ProfileSource.js.map +0 -1
  288. package/dist/profiles/PromptIncludes.d.ts +0 -32
  289. package/dist/profiles/PromptIncludes.js +0 -147
  290. package/dist/profiles/PromptIncludes.js.map +0 -1
  291. package/dist/prompts/SystemPromptExport.d.ts +0 -16
  292. package/dist/prompts/SystemPromptExport.js +0 -81
  293. package/dist/prompts/SystemPromptExport.js.map +0 -1
  294. package/dist/schemas/profile-source.schema.json +0 -29
  295. package/dist/schemas/profile.schema.json +0 -200
  296. package/dist/skills/ProfileSkillResolution.d.ts +0 -21
  297. package/dist/skills/ProfileSkillResolution.js +0 -88
  298. package/dist/skills/ProfileSkillResolution.js.map +0 -1
  299. package/dist/skills/SkillCatalog.d.ts +0 -41
  300. package/dist/skills/SkillCatalog.js +0 -119
  301. package/dist/skills/SkillCatalog.js.map +0 -1
  302. package/dist/skills/SkillResolution.d.ts +0 -34
  303. package/dist/skills/SkillResolution.js +0 -369
  304. package/dist/skills/SkillResolution.js.map +0 -1
  305. package/docs/documentation/profile-repository.md +0 -179
  306. package/src/schemas/SchemaDocument.ts +0 -20
  307. package/src/schemas/profile-source.schema.json +0 -29
  308. package/src/schemas/profile.schema.json +0 -200
@@ -1 +0,0 @@
1
- {"version":3,"file":"CompositeProfileAssembler.js","sourceRoot":"","sources":["../../src/compositeProfile/CompositeProfileAssembler.ts"],"names":[],"mappings":"AAAA,oF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AE,CAAC;QAC5C,OAAO;IACT,CAAC;IAED,KAAK,MAAM,SAAS,IAAI,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,YAAY,KAAK,SAAS,CAAC,EAAE,CAAC;QAChH,oCAAoC,CAAC,gBAAgB,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IAClF,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,qCAAqC,GAAG,CAAC,aAAqB,EAAE,UAAkB,EAAU,EAAE;IAClG,MAAM,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACrD,MAAM,kBAAkB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;IAC7G,MAAM,kBAAkB,GAAG,QAAQ,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAC;IAE/E,IAAI,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC1E,MAAM,IAAI,KAAK,CACb,sCAAsC,UAAU,4CAA4C,aAAa,IAAI,CAC9G,CAAC;IACJ,CAAC;IAED,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- export declare const registerCompositeProfileDirectoryCleanup: (directory: string, processObject?: NodeJS.Process) => void;
2
- export declare const executeCompositeProfileDirectoryCleanup: () => readonly string[];
3
- export declare const defaultCompositeProfileSweepMaxAgeMs: number;
4
- export interface SweepStaleCompositeProfileDirectoriesInput {
5
- readonly directory?: string;
6
- readonly maxAgeMs?: number;
7
- readonly now?: number;
8
- }
9
- export declare const sweepStaleCompositeProfileDirectories: (input?: SweepStaleCompositeProfileDirectoriesInput) => readonly string[];
@@ -1,87 +0,0 @@
1
- // Removes temporary composite profile directories on process exit and handled signals, and
2
- // sweeps stale leftovers from earlier crashed runs. Composite directories contain symlinks
3
- // into real auth/settings state, so removal must delete the links without ever following
4
- // them to their targets; rmSync satisfies that because it unlinks symlink entries instead of
5
- // traversing into their targets.
6
- import { lstatSync, readdirSync, rmSync } from 'node:fs';
7
- import { tmpdir } from 'node:os';
8
- import { join } from 'node:path';
9
- const pendingDirectories = new Set();
10
- const installedProcesses = new WeakSet();
11
- const cleanupSignals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
12
- // Cleanup is deferred to process exit (rather than performed inline when a run finishes) so
13
- // the composite directory stays inspectable for the rest of the process lifetime, and so a
14
- // single set of handlers covers every registered run.
15
- export const registerCompositeProfileDirectoryCleanup = (directory, processObject = process) => {
16
- pendingDirectories.add(directory);
17
- installCompositeProfileCleanupHandlers(processObject);
18
- };
19
- export const executeCompositeProfileDirectoryCleanup = () => {
20
- const removed = [];
21
- for (const directory of pendingDirectories) {
22
- try {
23
- rmSync(directory, { recursive: true, force: true });
24
- removed.push(directory);
25
- }
26
- catch {
27
- // Best-effort teardown: a failed removal must not mask the process's own exit path.
28
- }
29
- }
30
- pendingDirectories.clear();
31
- return removed;
32
- };
33
- const installCompositeProfileCleanupHandlers = (processObject) => {
34
- if (installedProcesses.has(processObject)) {
35
- return;
36
- }
37
- installedProcesses.add(processObject);
38
- processObject.once('exit', () => void executeCompositeProfileDirectoryCleanup());
39
- for (const signal of cleanupSignals) {
40
- processObject.once(signal, () => handleCompositeProfileCleanupSignal(processObject, signal));
41
- }
42
- };
43
- // Session journals are stored under ~/.outfitter/state rather than the composite directory,
44
- // so signal-time cleanup removes the temporary directory while leaving any crash journal in
45
- // place to be reported by the next invocation.
46
- const handleCompositeProfileCleanupSignal = (processObject, signal) => {
47
- executeCompositeProfileDirectoryCleanup();
48
- // The once-registered handler has already been removed, so re-raising terminates the
49
- // process with conventional signal semantics unless another handler intervenes.
50
- processObject.kill(processObject.pid, signal);
51
- };
52
- export const defaultCompositeProfileSweepMaxAgeMs = 7 * 24 * 60 * 60 * 1000;
53
- // Best-effort startup sweep of outfitter-* composite directories that crashed runs left in
54
- // the temporary root. Entries are inspected with lstat and symlink entries are skipped, so
55
- // the sweep never follows a symlink; stale directories are removed with rmSync, which
56
- // deletes contained symlinks without touching their targets.
57
- export const sweepStaleCompositeProfileDirectories = (input = {}) => {
58
- const rootDirectory = input.directory ?? tmpdir();
59
- const maxAgeMs = input.maxAgeMs ?? defaultCompositeProfileSweepMaxAgeMs;
60
- const now = input.now ?? Date.now();
61
- const removed = [];
62
- for (const entryName of listSweepCandidates(rootDirectory)) {
63
- const entryPath = join(rootDirectory, entryName);
64
- try {
65
- const entryStat = lstatSync(entryPath);
66
- if (!entryStat.isDirectory() || now - entryStat.mtimeMs <= maxAgeMs) {
67
- continue;
68
- }
69
- rmSync(entryPath, { recursive: true, force: true });
70
- removed.push(entryPath);
71
- /* v8 ignore next 3 -- entries can vanish between readdir and lstat; the sweep stays best-effort. */
72
- }
73
- catch {
74
- // Best-effort sweep: unreadable or vanished entries are skipped.
75
- }
76
- }
77
- return removed;
78
- };
79
- const listSweepCandidates = (rootDirectory) => {
80
- try {
81
- return readdirSync(rootDirectory).filter((entryName) => entryName.startsWith('outfitter-'));
82
- }
83
- catch {
84
- return [];
85
- }
86
- };
87
- //# sourceMappingURL=CompositeProfileCleanup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CompositeProfileCleanup.js","sourceRoot":"","sources":["../../src/compositeProfile/CompositeProfileCleanup.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,2FAA2F;AAC3F,yFAAyF;AACzF,6FAA6F;AAC7F,iCAAiC;AACjC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;AAC7C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,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACxB,oGAAoG;QACtG,CAAC;QAAC,MAAM,CAAC;YACP,iEAAiE;QACnE,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,aAAqB,EAAqB,EAAE;IACvE,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9F,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC,CAAC"}
@@ -1,16 +0,0 @@
1
- export type CompositeProfileFileStrategy = 'copy' | 'merge' | 'transform' | 'generate';
2
- export interface CompositeProfileFile {
3
- readonly relativePath: string;
4
- readonly content: string;
5
- readonly sourceInputs: readonly string[];
6
- readonly outputPath: string;
7
- readonly strategy: CompositeProfileFileStrategy;
8
- }
9
- export interface CompositeProfileFileInput {
10
- readonly relativePath: string;
11
- readonly content: string;
12
- readonly rootDirectory?: string;
13
- readonly sourceInputs?: readonly string[];
14
- readonly strategy?: CompositeProfileFileStrategy;
15
- }
16
- export declare const createCompositeProfileFile: (input: CompositeProfileFileInput | string, content?: string) => CompositeProfileFile;
@@ -1,16 +0,0 @@
1
- // Defines a logical file generated into a temporary Outfitter compositeProfile directory.
2
- import { join } from 'node:path';
3
- export const createCompositeProfileFile = (input, content) => {
4
- if (typeof input === 'string') {
5
- return createCompositeProfileFileFromInput({ relativePath: input, content: content ?? '' });
6
- }
7
- return createCompositeProfileFileFromInput(input);
8
- };
9
- const createCompositeProfileFileFromInput = (input) => ({
10
- relativePath: input.relativePath,
11
- content: input.content,
12
- sourceInputs: input.sourceInputs ?? [],
13
- outputPath: input.rootDirectory === undefined ? input.relativePath : join(input.rootDirectory, input.relativePath),
14
- strategy: input.strategy ?? 'generate',
15
- });
16
- //# sourceMappingURL=CompositeProfileFile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CompositeProfileFile.js","sourceRoot":"","sources":["../../src/compositeProfile/CompositeProfileFile.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAoBjC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,KAAyC,EACzC,OAAgB,EACM,EAAE;IACxB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,mCAAmC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO,mCAAmC,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,mCAAmC,GAAG,CAAC,KAAgC,EAAwB,EAAE,CAAC,CAAC;IACvG,YAAY,EAAE,KAAK,CAAC,YAAY;IAChC,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,EAAE;IACtC,UAAU,EAAE,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC;IAClH,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,UAAU;CACvC,CAAC,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { Profile } from '../profiles/Profile.js';
2
- import type { Settings } from '../settings/Settings.js';
3
- import type { CompositeProfile } from './CompositeProfile.js';
4
- export interface CompositeProfileTemplateContextInput {
5
- readonly settings: Settings;
6
- readonly profile: Profile;
7
- readonly agentId: string;
8
- readonly projectDirectory: string;
9
- }
10
- export interface CompositeProfileTemplateRenderInput extends CompositeProfileTemplateContextInput {
11
- readonly compositeProfile: CompositeProfile;
12
- readonly settingsPaths: readonly string[];
13
- }
14
- export declare const createCompositeProfileTemplateContext: (input: CompositeProfileTemplateContextInput) => Readonly<Record<string, unknown>>;
15
- export declare const renderCompositeProfileTemplates: (input: CompositeProfileTemplateRenderInput) => CompositeProfile;
@@ -1,65 +0,0 @@
1
- // Renders Outfitter-time templates in generated compositeProfile files.
2
- import { Liquid } from 'liquidjs';
3
- import { createCompositeProfile } from './CompositeProfile.js';
4
- const outfitterTemplateEngine = new Liquid({
5
- outputDelimiterLeft: '[[=',
6
- outputDelimiterRight: ']]',
7
- tagDelimiterLeft: '[[%',
8
- tagDelimiterRight: '%]]',
9
- strictFilters: true,
10
- strictVariables: true,
11
- lenientIf: true,
12
- ownPropertyOnly: true,
13
- jekyllInclude: false,
14
- dynamicPartials: false,
15
- });
16
- export const createCompositeProfileTemplateContext = (input) => ({
17
- outfitter: {
18
- custom_settings: input.settings.customSettings ?? {},
19
- settings: createTemplateSettings(input.settings),
20
- profile: input.profile,
21
- agent: input.agentId,
22
- project: {
23
- root: input.projectDirectory,
24
- },
25
- },
26
- });
27
- export const renderCompositeProfileTemplates = (input) => {
28
- const context = createCompositeProfileTemplateContext(input);
29
- return createCompositeProfile(input.compositeProfile.rootDirectory, input.compositeProfile.files.map((file) => renderCompositeProfileFile(file, context, input.settingsPaths)), input.compositeProfile.statePaths);
30
- };
31
- const renderCompositeProfileFile = (file, context, settingsPaths) => {
32
- if (!containsOutfitterTemplate(file.content)) {
33
- return file;
34
- }
35
- try {
36
- return {
37
- ...file,
38
- content: renderTemplateContent(file.content, context),
39
- sourceInputs: [...file.sourceInputs, ...settingsPaths.filter((path) => !file.sourceInputs.includes(path))],
40
- };
41
- }
42
- catch (error) {
43
- throw new Error(`Cannot render Outfitter template in compositeProfile file '${file.relativePath}': ${formatTemplateError(error)}`, {
44
- cause: error,
45
- });
46
- }
47
- };
48
- const renderTemplateContent = (content, context) => {
49
- const renderedContent = outfitterTemplateEngine.parseAndRenderSync(content, context);
50
- /* v8 ignore next -- LiquidJS renders string content to strings; this guards future API regressions. */
51
- if (typeof renderedContent !== 'string') {
52
- throw new Error('LiquidJS returned non-string template output.');
53
- }
54
- return renderedContent;
55
- };
56
- const containsOutfitterTemplate = (content) => content.includes('[[=') || content.includes('[[%');
57
- const createTemplateSettings = (settings) => ({
58
- default_profile: settings.defaultProfile,
59
- profile_sources: settings.profileSources,
60
- remote_settings: settings.remoteSettings,
61
- cache_directory: settings.cacheDirectory,
62
- custom_settings: settings.customSettings ?? {},
63
- });
64
- const formatTemplateError = (error) => String(error);
65
- //# sourceMappingURL=CompositeProfileTemplate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CompositeProfileTemplate.js","sourceRoot":"","sources":["../../src/compositeProfile/CompositeProfileTemplate.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKlC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAe/D,MAAM,uBAAuB,GAAG,IAAI,MAAM,CAAC;IACzC,mBAAmB,EAAE,KAAK;IAC1B,oBAAoB,EAAE,IAAI;IAC1B,gBAAgB,EAAE,KAAK;IACvB,iBAAiB,EAAE,KAAK;IACxB,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,IAAI;IACf,eAAe,EAAE,IAAI;IACrB,aAAa,EAAE,KAAK;IACpB,eAAe,EAAE,KAAK;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACnD,KAA2C,EACR,EAAE,CAAC,CAAC;IACvC,SAAS,EAAE;QACT,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,cAAc,IAAI,EAAE;QACpD,QAAQ,EAAE,sBAAsB,CAAC,KAAK,CAAC,QAAQ,CAAC;QAChD,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK,EAAE,KAAK,CAAC,OAAO;QACpB,OAAO,EAAE;YACP,IAAI,EAAE,KAAK,CA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AAY,uBAAuB,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE9F,uGAAuG;IACvG,IAAI,OAAO,eAAe,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,OAAe,EAAW,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEnH,MAAM,sBAAsB,GAAG,CAAC,QAAkB,EAAqC,EAAE,CAAC,CAAC;IACzF,eAAe,EAAE,QAAQ,CAAC,cAAc;IACxC,eAAe,EAAE,QAAQ,CAAC,cAAc;IACxC,eAAe,EAAE,QAAQ,CAAC,cAAc;IACxC,eAAe,EAAE,QAAQ,CAAC,cAAc;IACxC,eAAe,EAAE,QAAQ,CAAC,cAAc,IAAI,EAAE;CAC/C,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { CompositeProfile } from './CompositeProfile.js';
2
- export interface CompositeProfileWatchPlan {
3
- readonly paths: readonly string[];
4
- }
5
- export interface CompositeProfileWatcherHandle {
6
- close(): void;
7
- }
8
- export interface WatchCompositeProfileInput {
9
- readonly compositeProfile: CompositeProfile;
10
- readonly warn: (message: string) => void;
11
- readonly refreshCompositeProfile?: () => CompositeProfile;
12
- readonly onCompositeProfileWritten?: (compositeProfile: CompositeProfile) => void;
13
- }
14
- export declare const createCompositeProfileWatchPlan: (paths: readonly string[]) => CompositeProfileWatchPlan;
15
- export declare const createCompositeProfileWatchPlanForCompositeProfile: (compositeProfile: CompositeProfile) => CompositeProfileWatchPlan;
16
- export declare const watchCompositeProfileInputs: (input: WatchCompositeProfileInput) => CompositeProfileWatcherHandle;
17
- export declare const createProfileWatchPaths: (profilePaths: readonly string[]) => readonly string[];
18
- export declare const compositeProfileFileOutputPath: (compositeProfile: CompositeProfile, relativePath: string) => string;
@@ -1,46 +0,0 @@
1
- // Watches composite profile inputs while an agent process runs and rewrites generated compositeProfile files.
2
- import { watch } from 'node:fs';
3
- import { dirname, join } from 'node:path';
4
- import { writeCompositeProfile } from './CompositeProfileAssembler.js';
5
- export const createCompositeProfileWatchPlan = (paths) => ({
6
- paths,
7
- });
8
- export const createCompositeProfileWatchPlanForCompositeProfile = (compositeProfile) => createCompositeProfileWatchPlan([...new Set(compositeProfile.files.flatMap((file) => file.sourceInputs))]);
9
- export const watchCompositeProfileInputs = (input) => {
10
- const watchPaths = createCompositeProfileWatchPlanForCompositeProfile(input.compositeProfile).paths;
11
- const watchers = [];
12
- for (const watchPath of watchPaths) {
13
- try {
14
- watchers.push(watch(watchPath,
15
- /* v8 ignore next -- fs.watch delivery is platform-timed; the static watch plan is covered deterministically. */
16
- () => updateCompositeProfileFromWatchedInput(input, watchPath)));
17
- }
18
- catch (error) {
19
- input.warn(`Could not watch composite profile input ${watchPath}: ${formatError(error)}`);
20
- }
21
- }
22
- return {
23
- close() {
24
- for (const watcher of watchers) {
25
- watcher.close();
26
- }
27
- },
28
- };
29
- };
30
- export const createProfileWatchPaths = (profilePaths) => [
31
- ...new Set(profilePaths.map((profilePath) => dirname(profilePath))),
32
- ];
33
- export const compositeProfileFileOutputPath = (compositeProfile, relativePath) => join(compositeProfile.rootDirectory, relativePath);
34
- const updateCompositeProfileFromWatchedInput = (input, watchPath) => {
35
- try {
36
- const compositeProfile = input.refreshCompositeProfile?.() ?? input.compositeProfile;
37
- writeCompositeProfile(compositeProfile, { materializeStatePaths: false });
38
- input.onCompositeProfileWritten?.(compositeProfile);
39
- }
40
- catch (error) {
41
- /* v8 ignore next -- unsafe live-update failures are reported defensively; normal refresh behavior is covered. */
42
- input.warn(`Could not safely update compositeProfile from ${watchPath}: ${formatError(error)}`);
43
- }
44
- };
45
- const formatError = (error) => String(error);
46
- //# sourceMappingURL=CompositeProfileWatcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CompositeProfileWatcher.js","sourceRoot":"","sources":["../../src/compositeProfile/CompositeProfileWatcher.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAiBvE,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,KAAwB,EAA6B,EAAE,CAAC,CAAC;IACvG,KAAK;CACN,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kDAAkD,GAAG,CAChE,gBAAkC,EACP,EAAE,CAC7B,+BAA+B,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7G,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAiC,EAAiC,EAAE;IAC9G,MAAM,UAAU,GAAG,kDAAkD,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC;IACpG,MAAM,QAAQ,GAAgB,EAAE,CAAC;IAEjC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,QAAQ,CAAC,IAAI,CACX,KAAK,CACH,SAAS;YACT,gHAAgH;YAChH,GAAG,EAAE,CAAC,sCAAsC,CAAC,KAAK,EAAE,SAAS,CAAC,CAC/D,CACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,2CAA2C,SAAS,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5F,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK;YACH,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,YAA+B,EAAqB,EAAE,CAAC;IAC7F,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;CACpE,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,gBAAkC,EAAE,YAAoB,EAAU,EAAE,CACjH,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;AAErD,MAAM,sCAAsC,GAAG,CAAC,KAAiC,EAAE,SAAiB,EAAQ,EAAE;IAC5G,IAAI,CAAC;QACH,MAAM,gBAAgB,GAAG,KAAK,CAAC,uBAAuB,EAAE,EAAE,IAAI,KAAK,CAAC,gBAAgB,CAAC;QACrF,qBAAqB,CAAC,gBAAgB,EAAE,EAAE,qBAAqB,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1E,KAAK,CAAC,yBAAyB,EAAE,CAAC,gBAAgB,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,iHAAiH;QACjH,KAAK,CAAC,IAAI,CAAC,iDAAiD,SAAS,KAAK,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClG,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC"}
@@ -1,39 +0,0 @@
1
- import { symlinkSync } from 'node:fs';
2
- export type StatePersistenceStrategy = 'symlink' | 'discard' | 'warn' | 'error' | 'prompt';
3
- export interface StatePathDeclaration {
4
- readonly defaultStrategy?: StatePersistenceStrategy;
5
- readonly allowedStrategies: readonly StatePersistenceStrategy[];
6
- }
7
- export interface CompositeProfileStatePath {
8
- readonly relativePath: string;
9
- readonly strategy: StatePersistenceStrategy;
10
- readonly sourcePath?: string;
11
- readonly directory: boolean;
12
- }
13
- export interface CompositeProfileStateBaseline {
14
- readonly fingerprints: ReadonlyMap<string, string>;
15
- }
16
- export interface CompositeProfileStateWriteIssue {
17
- readonly relativePath: string;
18
- readonly strategy: StatePersistenceStrategy;
19
- readonly unknown: boolean;
20
- }
21
- export interface StateMaterializationDependencies {
22
- readonly symlink?: typeof symlinkSync;
23
- readonly warn?: (message: string) => void;
24
- readonly platform?: NodeJS.Platform;
25
- }
26
- export declare const materializeCompositeProfileStatePath: (rootDirectory: string, statePath: CompositeProfileStatePath, dependencies?: StateMaterializationDependencies) => void;
27
- export declare const createCompositeProfileStateBaseline: (rootDirectory: string, statePaths?: readonly CompositeProfileStatePath[]) => CompositeProfileStateBaseline;
28
- export declare const updateCompositeProfileStateBaselinePaths: (rootDirectory: string, baseline: CompositeProfileStateBaseline, outputPaths: readonly string[]) => CompositeProfileStateBaseline;
29
- export declare const detectCompositeProfileStateWrites: (rootDirectory: string, statePaths: readonly CompositeProfileStatePath[], baseline: CompositeProfileStateBaseline) => readonly CompositeProfileStateWriteIssue[];
30
- export type CompositeProfileStateWritePromptChoice = 'persist' | 'discard' | 'always';
31
- export interface CompositeProfileStateWritePromptRequest {
32
- readonly agentId: string;
33
- readonly relativePath: string;
34
- readonly sourcePath?: string;
35
- }
36
- export type CompositeProfileStateWritePrompt = (request: CompositeProfileStateWritePromptRequest) => Promise<CompositeProfileStateWritePromptChoice>;
37
- export declare const persistCompositeProfileStateWrite: (rootDirectory: string, statePath: CompositeProfileStatePath) => void;
38
- export declare const recordProfileStatePersistenceOverride: (profilePath: string, relativePath: string, strategy: StatePersistenceStrategy) => void;
39
- export declare const ensureStateSourcePath: (sourcePath: string, directory: boolean) => string;
@@ -1,249 +0,0 @@
1
- // Defines composite profile state persistence declarations, strategies, and write detection helpers.
2
- import { cpSync, existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, readlinkSync, statSync, unlinkSync, writeFileSync, } from 'node:fs';
3
- import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
4
- import { sep as posixSeparator } from 'node:path/posix';
5
- import { parseDocument } from 'yaml';
6
- import { createSafeSymlink } from '../fs/SafeSymlink.js';
7
- export const materializeCompositeProfileStatePath = (rootDirectory, statePath, dependencies = {}) => {
8
- if (statePath.strategy === 'symlink') {
9
- if (statePath.sourcePath === undefined) {
10
- throw new Error(`State path '${statePath.relativePath}' uses symlink without a source path.`);
11
- }
12
- materializeSymlink(rootDirectory, statePath.relativePath, statePath.sourcePath, statePath.directory, dependencies);
13
- return;
14
- }
15
- const outputPath = resolveCompositeProfileStateOutputPath(rootDirectory, statePath.relativePath);
16
- if (statePath.directory) {
17
- mkdirSync(outputPath, { recursive: true });
18
- }
19
- else {
20
- mkdirSync(dirname(outputPath), { recursive: true });
21
- }
22
- };
23
- export const createCompositeProfileStateBaseline = (rootDirectory, statePaths = []) => ({
24
- fingerprints: fingerprintTree(rootDirectory, createDiscardStatePathSet(statePaths)),
25
- });
26
- export const updateCompositeProfileStateBaselinePaths = (rootDirectory, baseline, outputPaths) => {
27
- const fingerprints = new Map(baseline.fingerprints);
28
- for (const outputPath of outputPaths) {
29
- const relativePath = normalizeCompositeProfileRelativePath(rootDirectory, outputPath);
30
- deleteFingerprintSubtree(fingerprints, relativePath);
31
- addPathFingerprints(rootDirectory, relativePath, fingerprints, new Set());
32
- }
33
- return { fingerprints };
34
- };
35
- export const detectCompositeProfileStateWrites = (rootDirectory, statePaths, baseline) => {
36
- const current = fingerprintTree(rootDirectory, createDiscardStatePathSet(statePaths));
37
- const changedPaths = [...new Set([...current.keys(), ...baseline.fingerprints.keys()])].filter((path) => current.get(path) !== baseline.fingerprints.get(path));
38
- const issues = new Map();
39
- const declaredPaths = statePaths.filter((statePath) => statePath.relativePath !== 'unknown');
40
- const unknownStatePath = statePaths.find((statePath) => statePath.relativePath === 'unknown');
41
- for (const changedPath of changedPaths) {
42
- const statePath = declaredPaths.find((candidate) => isWithinStatePath(changedPath, candidate));
43
- if (statePath !== undefined) {
44
- if (shouldReportStatePathChange(changedPath, statePath)) {
45
- issues.set(statePath.relativePath, {
46
- relativePath: statePath.relativePath,
47
- strategy: statePath.strategy,
48
- unknown: false,
49
- });
50
- }
51
- }
52
- else if (unknownStatePath !== undefined &&
53
- unknownStatePath.strategy !== 'discard' &&
54
- isUserWritePath(changedPath)) {
55
- issues.set(changedPath, { relativePath: changedPath, strategy: unknownStatePath.strategy, unknown: true });
56
- }
57
- }
58
- return [...issues.values()].sort((left, right) => left.relativePath.localeCompare(right.relativePath));
59
- };
60
- // Copies an agent's change to a prompt-strategy state path from the composite profile back
61
- // to the durable source path, so an interactive "persist" choice survives the run.
62
- export const persistCompositeProfileStateWrite = (rootDirectory, statePath) => {
63
- if (statePath.sourcePath === undefined) {
64
- throw new Error(`State path '${statePath.relativePath}' cannot be persisted without a durable source path.`);
65
- }
66
- const outputPath = resolveCompositeProfileStateOutputPath(rootDirectory, statePath.relativePath);
67
- if (!pathLexicallyExists(outputPath)) {
68
- throw new Error(`State path '${statePath.relativePath}' no longer exists in the composite profile, so it cannot be persisted.`);
69
- }
70
- ensureStateSourcePath(statePath.sourcePath, statePath.directory);
71
- cpSync(outputPath, statePath.sourcePath, { recursive: true, force: true });
72
- };
73
- // Records a durable state_persistence override in a profile YAML file, preserving the
74
- // existing document structure and comments.
75
- export const recordProfileStatePersistenceOverride = (profilePath, relativePath, strategy) => {
76
- const profileDocument = parseDocument(readFileSync(profilePath, 'utf8'));
77
- profileDocument.setIn(['state_persistence', relativePath], strategy);
78
- writeFileSync(profilePath, profileDocument.toString());
79
- };
80
- export const ensureStateSourcePath = (sourcePath, directory) => {
81
- const sourceType = getExistingSourceType(sourcePath);
82
- if (sourceType === undefined) {
83
- if (directory) {
84
- mkdirSync(sourcePath, { recursive: true });
85
- }
86
- else {
87
- mkdirSync(dirname(sourcePath), { recursive: true });
88
- writeFileSync(sourcePath, createInitialStateSourceFileContent(sourcePath));
89
- }
90
- return sourcePath;
91
- }
92
- initializeEmptyJsonStateSourceFile(sourcePath, directory, sourceType);
93
- if (directory && sourceType !== 'directory') {
94
- throw new Error(`State source path '${sourcePath}' must be a directory.`);
95
- }
96
- if (!directory && sourceType !== 'file') {
97
- throw new Error(`State source path '${sourcePath}' must be a file.`);
98
- }
99
- return sourcePath;
100
- };
101
- const initializeEmptyJsonStateSourceFile = (sourcePath, directory, sourceType) => {
102
- const defaultFileContent = getJsonStateFileDefault(sourcePath);
103
- if (!directory && sourceType === 'file' && defaultFileContent !== undefined && isEmptyTextFile(sourcePath)) {
104
- writeFileSync(sourcePath, defaultFileContent);
105
- }
106
- };
107
- const createInitialStateSourceFileContent = (sourcePath) => getJsonStateFileDefault(sourcePath) ?? '';
108
- const isEmptyTextFile = (sourcePath) => readFileSync(sourcePath, 'utf8').trim() === '';
109
- const getJsonStateFileDefault = (sourcePath) => {
110
- if (isStateSourceFileName(sourcePath, 'mcp.json')) {
111
- return '{}\n';
112
- }
113
- if (isStateSourceFileName(sourcePath, 'models.json')) {
114
- return '{"providers":{}}\n';
115
- }
116
- if (isStateSourceFileName(sourcePath, 'trust.json')) {
117
- return '{}\n';
118
- }
119
- return undefined;
120
- };
121
- const isStateSourceFileName = (sourcePath, fileName) => sourcePath.endsWith(`${sep}${fileName}`) || sourcePath === fileName;
122
- const getExistingSourceType = (sourcePath) => {
123
- try {
124
- const stat = statSync(sourcePath);
125
- return stat.isDirectory() ? 'directory' : 'file';
126
- }
127
- catch (error) {
128
- /* v8 ignore next -- non-ENOENT stat failures should surface as actionable filesystem errors. */
129
- if (isNodeError(error) && error.code === 'ENOENT') {
130
- return undefined;
131
- }
132
- /* v8 ignore next -- non-ENOENT stat failures should surface as actionable filesystem errors. */
133
- throw error;
134
- }
135
- };
136
- const materializeSymlink = (rootDirectory, relativePath, sourcePath, directory, dependencies) => {
137
- const outputPath = resolveCompositeProfileStateOutputPath(rootDirectory, relativePath);
138
- mkdirSync(dirname(outputPath), { recursive: true });
139
- if (pathLexicallyExists(outputPath)) {
140
- unlinkSync(outputPath);
141
- }
142
- ensureStateSourcePath(sourcePath, directory);
143
- createSafeSymlink({ sourcePath, outputPath, directory, label: `State path '${relativePath}'` }, dependencies);
144
- };
145
- const pathLexicallyExists = (path) => {
146
- try {
147
- lstatSync(path);
148
- return true;
149
- }
150
- catch (error) {
151
- /* v8 ignore next -- non-ENOENT lstat failures should surface as actionable filesystem errors. */
152
- if (isNodeError(error) && error.code === 'ENOENT') {
153
- return false;
154
- }
155
- /* v8 ignore next -- non-ENOENT lstat failures should surface as actionable filesystem errors. */
156
- throw error;
157
- }
158
- };
159
- const fingerprintTree = (rootDirectory, skippedRelativePaths = new Set()) => {
160
- const fingerprints = new Map();
161
- addPathFingerprints(rootDirectory, '', fingerprints, skippedRelativePaths);
162
- return fingerprints;
163
- };
164
- const addPathFingerprints = (rootDirectory, relativePath, fingerprints, skippedRelativePaths) => {
165
- const absolutePath = relativePath === ''
166
- ? rootDirectory
167
- : resolveCompositeProfileRelativePath(rootDirectory, relativePath, 'CompositeProfile path');
168
- if (existsSync(absolutePath)) {
169
- addFingerprint(absolutePath, relativePath, fingerprints, skippedRelativePaths);
170
- }
171
- };
172
- const addFingerprint = (absolutePath, relativePath, fingerprints, skippedRelativePaths) => {
173
- if (shouldSkipFingerprint(relativePath, skippedRelativePaths)) {
174
- return;
175
- }
176
- const stat = lstatSync(absolutePath);
177
- if (stat.isSymbolicLink()) {
178
- fingerprints.set(relativePath, `symlink:${readlinkSync(absolutePath)}`);
179
- return;
180
- }
181
- if (relativePath !== '') {
182
- fingerprints.set(relativePath, createEntryFingerprint(absolutePath, stat));
183
- }
184
- if (stat.isDirectory()) {
185
- for (const entryName of readdirSync(absolutePath).sort()) {
186
- addFingerprint(join(absolutePath, entryName), relativePath === '' ? entryName : `${relativePath}${posixSeparator}${entryName}`, fingerprints, skippedRelativePaths);
187
- }
188
- }
189
- };
190
- const createEntryFingerprint = (absolutePath, stat) => {
191
- if (stat.isDirectory()) {
192
- return 'dir';
193
- }
194
- if (stat.isFile()) {
195
- return `file:${readFileSync(absolutePath).toString('base64')}`;
196
- }
197
- return `special:${stat.mode}:${stat.rdev}`;
198
- };
199
- const shouldSkipFingerprint = (relativePath, skippedRelativePaths) => relativePath !== '' &&
200
- [...skippedRelativePaths].some((skippedRelativePath) => relativePath === skippedRelativePath || relativePath.startsWith(`${skippedRelativePath}${posixSeparator}`));
201
- const createDiscardStatePathSet = (statePaths) => new Set(statePaths
202
- .filter((statePath) => statePath.strategy === 'discard' && statePath.relativePath !== 'unknown')
203
- .map((statePath) => normalizeStateRelativePath(statePath.relativePath)));
204
- const deleteFingerprintSubtree = (fingerprints, relativePath) => {
205
- for (const fingerprintPath of [...fingerprints.keys()]) {
206
- if (fingerprintPath === relativePath || fingerprintPath.startsWith(`${relativePath}${posixSeparator}`)) {
207
- fingerprints.delete(fingerprintPath);
208
- }
209
- }
210
- };
211
- const resolveCompositeProfileStateOutputPath = (rootDirectory, relativePath) => {
212
- const normalizedRelativePath = relativePath.endsWith('/') ? relativePath.slice(0, -1) : relativePath;
213
- return resolveCompositeProfileRelativePath(rootDirectory, normalizedRelativePath, `State path '${relativePath}'`);
214
- };
215
- const normalizeCompositeProfileRelativePath = (rootDirectory, outputPath) => {
216
- const resolvedOutputPath = isAbsolute(outputPath) ? resolve(outputPath) : resolve(rootDirectory, outputPath);
217
- const relativeOutputPath = relative(resolve(rootDirectory), resolvedOutputPath);
218
- assertCompositeProfileRelativePath(rootDirectory, relativeOutputPath, `CompositeProfile file output path '${outputPath}'`);
219
- return relativeOutputPath.split(sep).join(posixSeparator);
220
- };
221
- const resolveCompositeProfileRelativePath = (rootDirectory, relativePath, label) => {
222
- const resolvedRootDirectory = resolve(rootDirectory);
223
- const resolvedOutputPath = resolve(rootDirectory, relativePath);
224
- const relativeOutputPath = relative(resolvedRootDirectory, resolvedOutputPath);
225
- assertCompositeProfileRelativePath(rootDirectory, relativeOutputPath, label);
226
- return resolvedOutputPath;
227
- };
228
- const assertCompositeProfileRelativePath = (rootDirectory, relativePath, label) => {
229
- if (relativePath === '..' || relativePath.startsWith(`..${sep}`) || isAbsolute(relativePath)) {
230
- throw new Error(`${label} must stay under compositeProfile root '${rootDirectory}'.`);
231
- }
232
- };
233
- const shouldReportStatePathChange = (changedPath, statePath) => {
234
- if (statePath.strategy === 'discard') {
235
- return false;
236
- }
237
- if (statePath.strategy === 'symlink') {
238
- return changedPath === normalizeStateRelativePath(statePath.relativePath);
239
- }
240
- return true;
241
- };
242
- const isWithinStatePath = (changedPath, statePath) => {
243
- const stateRelativePath = normalizeStateRelativePath(statePath.relativePath);
244
- return changedPath === stateRelativePath || changedPath.startsWith(`${stateRelativePath}${posixSeparator}`);
245
- };
246
- const normalizeStateRelativePath = (relativePath) => relativePath.endsWith('/') ? relativePath.slice(0, -1) : relativePath;
247
- const isUserWritePath = (relativePath) => relativePath !== 'outfitter' && !relativePath.startsWith(`outfitter${posixSeparator}`);
248
- const isNodeError = (error) => error instanceof Error && 'code' in error;
249
- //# sourceMappingURL=StatePersistence.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StatePersistence.js","sourceRoot":"","sources":["../../src/compositeProfile/StatePersistence.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,OAAO,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,QAAQ,EAER,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC9E,OAAO,EAAE,GAAG,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAC;A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