@bastani/atomic 0.9.25-alpha.1 → 0.9.25-alpha.3

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 (133) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/builtin/intercom/package.json +2 -2
  3. package/dist/builtin/mcp/CHANGELOG.md +13 -0
  4. package/dist/builtin/mcp/index.bundle.mjs +489 -208
  5. package/dist/builtin/mcp/package.json +2 -2
  6. package/dist/builtin/subagents/package.json +3 -3
  7. package/dist/builtin/web-access/package.json +2 -2
  8. package/dist/builtin/workflows/CHANGELOG.md +12 -0
  9. package/dist/builtin/workflows/builtin/{chunk-e1254zvd.js → chunk-kfsnh3w7.js} +40 -12
  10. package/dist/builtin/workflows/builtin/{chunk-cpw5gtzg.js → chunk-rqmasd3d.js} +1 -1
  11. package/dist/builtin/workflows/builtin/{chunk-qy6g0baf.js → chunk-wz783pvd.js} +1 -1
  12. package/dist/builtin/workflows/builtin/goal.js +2 -2
  13. package/dist/builtin/workflows/builtin/index.js +3 -3
  14. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  15. package/dist/builtin/workflows/package.json +2 -2
  16. package/dist/builtin/workflows/src/extension/index.bundle.mjs +472 -88
  17. package/dist/builtin/workflows/src/index.js +65 -28
  18. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  19. package/dist/core/agent-session-accessors.js +7 -0
  20. package/dist/core/agent-session-accessors.js.map +1 -1
  21. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  22. package/dist/core/agent-session-extension-bindings.js +16 -2
  23. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  24. package/dist/core/agent-session-methods.d.ts +7 -1
  25. package/dist/core/agent-session-methods.d.ts.map +1 -1
  26. package/dist/core/agent-session-methods.js.map +1 -1
  27. package/dist/core/agent-session-state.d.ts.map +1 -1
  28. package/dist/core/agent-session-state.js +3 -2
  29. package/dist/core/agent-session-state.js.map +1 -1
  30. package/dist/core/agent-session-types.d.ts +1 -0
  31. package/dist/core/agent-session-types.d.ts.map +1 -1
  32. package/dist/core/agent-session-types.js.map +1 -1
  33. package/dist/core/agent-session.d.ts +3 -0
  34. package/dist/core/agent-session.d.ts.map +1 -1
  35. package/dist/core/agent-session.js +6 -0
  36. package/dist/core/agent-session.js.map +1 -1
  37. package/dist/core/builtin-resource-loader.d.ts.map +1 -1
  38. package/dist/core/builtin-resource-loader.js +13 -1
  39. package/dist/core/builtin-resource-loader.js.map +1 -1
  40. package/dist/core/extensions/api-types.d.ts +3 -0
  41. package/dist/core/extensions/api-types.d.ts.map +1 -1
  42. package/dist/core/extensions/api-types.js.map +1 -1
  43. package/dist/core/extensions/index.d.ts +2 -0
  44. package/dist/core/extensions/index.d.ts.map +1 -1
  45. package/dist/core/extensions/index.js +1 -0
  46. package/dist/core/extensions/index.js.map +1 -1
  47. package/dist/core/extensions/loader-api.d.ts.map +1 -1
  48. package/dist/core/extensions/loader-api.js +11 -0
  49. package/dist/core/extensions/loader-api.js.map +1 -1
  50. package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
  51. package/dist/core/extensions/loader-runtime.js +3 -0
  52. package/dist/core/extensions/loader-runtime.js.map +1 -1
  53. package/dist/core/extensions/mcp-server-registry.d.ts.map +1 -1
  54. package/dist/core/extensions/mcp-server-registry.js +4 -0
  55. package/dist/core/extensions/mcp-server-registry.js.map +1 -1
  56. package/dist/core/extensions/runner.d.ts +3 -0
  57. package/dist/core/extensions/runner.d.ts.map +1 -1
  58. package/dist/core/extensions/runner.js +4 -0
  59. package/dist/core/extensions/runner.js.map +1 -1
  60. package/dist/core/extensions/runtime-types.d.ts +3 -0
  61. package/dist/core/extensions/runtime-types.d.ts.map +1 -1
  62. package/dist/core/extensions/runtime-types.js.map +1 -1
  63. package/dist/core/extensions/tool-types.d.ts +1 -0
  64. package/dist/core/extensions/tool-types.d.ts.map +1 -1
  65. package/dist/core/extensions/tool-types.js.map +1 -1
  66. package/dist/core/extensions/workflow-run-control-hub.d.ts +23 -0
  67. package/dist/core/extensions/workflow-run-control-hub.d.ts.map +1 -0
  68. package/dist/core/extensions/workflow-run-control-hub.js +57 -0
  69. package/dist/core/extensions/workflow-run-control-hub.js.map +1 -0
  70. package/dist/core/extensions/workflow-run-control.d.ts +163 -0
  71. package/dist/core/extensions/workflow-run-control.d.ts.map +1 -0
  72. package/dist/core/extensions/workflow-run-control.js +73 -0
  73. package/dist/core/extensions/workflow-run-control.js.map +1 -0
  74. package/dist/core/mandatory-resource-loader.d.ts.map +1 -1
  75. package/dist/core/mandatory-resource-loader.js +9 -0
  76. package/dist/core/mandatory-resource-loader.js.map +1 -1
  77. package/dist/core/mcp-servers.d.ts +4 -1
  78. package/dist/core/mcp-servers.d.ts.map +1 -1
  79. package/dist/core/mcp-servers.js.map +1 -1
  80. package/dist/core/oauth-provider-metadata.js +1 -1
  81. package/dist/core/oauth-provider-metadata.js.map +1 -1
  82. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  83. package/dist/core/remote-catalog-provider.js +4 -9
  84. package/dist/core/remote-catalog-provider.js.map +1 -1
  85. package/dist/core/resource-loader-types.d.ts +4 -0
  86. package/dist/core/resource-loader-types.d.ts.map +1 -1
  87. package/dist/core/resource-loader-types.js.map +1 -1
  88. package/dist/core/sdk.js +1 -0
  89. package/dist/core/sdk.js.map +1 -1
  90. package/dist/core/structured-output/index.d.ts.map +1 -1
  91. package/dist/core/structured-output/index.js +3 -1
  92. package/dist/core/structured-output/index.js.map +1 -1
  93. package/dist/core/tool-loadout.d.ts +1 -0
  94. package/dist/core/tool-loadout.d.ts.map +1 -1
  95. package/dist/core/tool-loadout.js +3 -0
  96. package/dist/core/tool-loadout.js.map +1 -1
  97. package/dist/core/tools/bash.d.ts.map +1 -1
  98. package/dist/core/tools/bash.js +11 -30
  99. package/dist/core/tools/bash.js.map +1 -1
  100. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  101. package/dist/extensions/codemode/execute.js +26 -0
  102. package/dist/extensions/codemode/execute.js.map +1 -1
  103. package/dist/extensions/codemode/renderer.d.ts.map +1 -1
  104. package/dist/extensions/codemode/renderer.js +38 -23
  105. package/dist/extensions/codemode/renderer.js.map +1 -1
  106. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  107. package/dist/extensions/codemode/tool.js +22 -10
  108. package/dist/extensions/codemode/tool.js.map +1 -1
  109. package/dist/extensions/tool-search/tool.d.ts +1 -1
  110. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  111. package/dist/extensions/tool-search/tool.js +3 -13
  112. package/dist/extensions/tool-search/tool.js.map +1 -1
  113. package/dist/index-extensions.d.ts +2 -1
  114. package/dist/index-extensions.d.ts.map +1 -1
  115. package/dist/index-extensions.js +1 -1
  116. package/dist/index-extensions.js.map +1 -1
  117. package/dist/modes/interactive/components/visual-truncate.d.ts +27 -3
  118. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  119. package/dist/modes/interactive/components/visual-truncate.js +39 -6
  120. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  121. package/docs/extensions/events.md +2 -0
  122. package/docs/mcp-servers.md +47 -0
  123. package/docs/providers.md +9 -1
  124. package/docs/sdk/reference.md +22 -0
  125. package/docs/sdk/structured-decisions.md +2 -0
  126. package/docs/sdk.md +67 -1
  127. package/docs/settings.md +2 -0
  128. package/docs/tools.md +6 -0
  129. package/docs/workflows/operations.md +3 -1
  130. package/examples/extensions/built-in-tool-renderer.ts +16 -40
  131. package/examples/extensions/minimal-mode.ts +28 -108
  132. package/npm-shrinkwrap.json +69 -69
  133. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-types.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/runtime-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACnF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B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-types.js","sourceRoot":"","sources":["../../../src/core/extensions/runtime-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Provider } from \"@bastani/pi-ai\";\nimport type { Api, ImageContent, Model, TextContent } from \"@bastani/pi-ai/compat\";\nimport type { ThinkingLevel } from \"@earendil-works/pi-agent-core\";\nimport type { KeyId } from \"@earendil-works/pi-tui\";\nimport type { ResourceOverlap } from \"../diagnostics.ts\";\nimport type { CustomMessage } from \"../messages.ts\";\nimport type { ScopedModel } from \"../model-resolver.ts\";\nimport type { SessionManager } from \"../session-manager.ts\";\nimport type { SkillCatalog } from \"../skill-catalog.ts\";\nimport type { SlashCommandInfo } from \"../slash-commands.js\";\nimport type { SourceInfo } from \"../source-info.ts\";\nimport type { BuildSystemPromptOptions } from \"../system-prompt.ts\";\nimport type { RegisteredCommand } from \"./command-types.ts\";\nimport type { CompactOptions, ContextUsage, ExtensionContext, ReplacedSessionContext } from \"./context-types.ts\";\nimport type { McpServerRegistry } from \"./mcp-server-registry.ts\";\nimport type {\n\tEntryRenderer,\n\tMarkdownTransformer,\n\tMessageRenderer,\n\tSendMessageOptions,\n\tSendMessagesOptions,\n} from \"./message-types.ts\";\nimport type { ProviderConfig } from \"./provider-types.ts\";\nimport type { ToolDefinition, ToolInfo } from \"./tool-types.ts\";\nimport type { WorkflowActivityHub } from \"./workflow-activity-hub.js\";\n\nexport interface RegisteredTool {\n\tdefinition: ToolDefinition;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface ExtensionFlag {\n\tname: string;\n\tdescription?: string;\n\ttype: \"boolean\" | \"string\";\n\tdefault?: boolean | string;\n\textensionPath: string;\n}\n\nexport interface ExtensionShortcut {\n\tshortcut: KeyId;\n\tdescription?: string;\n\tkeybinding?: import(\"../keybindings.ts\").Keybinding;\n\tpreferEditor?: boolean;\n\t/** Resolved editor-owned keys; dispatch must yield only for input these keys accept. */\n\teditorKeys?: KeyId[];\n\thandler: (ctx: ExtensionContext) => Promise<void> | void;\n\textensionPath: string;\n}\n\ntype HandlerFn = (...args: unknown[]) => Promise<unknown>;\n\nexport type SendMessageHandler = <T = unknown>(\n\tmessage: Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">,\n\toptions?: SendMessageOptions,\n) => void | Promise<void>;\n\nexport type SendMessagesHandler = <T = unknown>(\n\tmessages: Array<Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">>,\n\toptions?: SendMessagesOptions,\n) => void | Promise<void>;\n\nexport type SendUserMessageHandler = (\n\tcontent: string | (TextContent | ImageContent)[],\n\toptions?: { deliverAs?: \"steer\" | \"followUp\"; expandPromptTemplates?: boolean },\n) => void;\n\nexport type AppendEntryHandler = <T = unknown>(customType: string, data?: T) => void;\n\nexport type SetSessionNameHandler = (name: string) => void;\n\nexport type GetSessionNameHandler = () => string | undefined;\n\nexport type GetActiveToolsHandler = () => string[];\n\nexport type GetAllToolsHandler = () => ToolInfo[];\n\nexport type GetCommandsHandler = () => SlashCommandInfo[];\n\nexport type SetActiveToolsHandler = (toolNames: string[]) => void;\n\nexport type RefreshToolsHandler = () => void;\n\nexport type SetModelHandler = (model: Model<Api>) => Promise<boolean>;\n\nexport type GetThinkingLevelHandler = () => ThinkingLevel;\n\nexport type SetThinkingLevelHandler = (level: ThinkingLevel) => void;\n\nexport type SetLabelHandler = (entryId: string, label: string | undefined) => void;\n\n/**\n * Shared state created by loader, used during registration and runtime.\n * Contains flag values (defaults set during registration, CLI values set after).\n */\nexport interface ExtensionRuntimeState {\n\tgetSettings?: () => import(\"../settings-types.ts\").Settings;\n\tgetChildSessionOptions?: import(\"../child-session-options.ts\").ChildSessionOptionsResolver;\n\t/** Shared by extension loading and its runner generation. */\n\tworkflowActivityHub: WorkflowActivityHub;\n\t/** Package-manifest and `registerMcpServer()` MCP servers visible to every extension of this generation. */\n\tmcpServerRegistry: McpServerRegistry;\n\tflagValues: Map<string, boolean | string>;\n\texplicitFlagNames?: Set<string>;\n\t/** Extension path that owns each active flag registration. */\n\tflagOwners?: Map<string, string>;\n\t/** Configuration origin of each active flag owner. */\n\tflagOwnerOrigins?: Map<string, Extension[\"sourceInfo\"][\"configurationOrigin\"]>;\n\t/** Provider registrations queued during extension loading, processed when runner binds */\n\tpendingProviderRegistrations: Array<\n\t\t{ provider: Provider; extensionPath: string } | { name: string; config: ProviderConfig; extensionPath: string }\n\t>;\n\t/** Provider IDs already published on behalf of this extension generation. */\n\textensionProviderIds: Set<string>;\n\t/** Resource-level compatibility gate installed after extension provenance is resolved. */\n\tcanRegisterResource?: (extension: Extension, resourceType: ResourceOverlap[\"resourceType\"], name: string) => boolean;\n\tbeginResourceRegistrationBatch?: () => void;\n\tendResourceRegistrationBatch?: () => void;\n\trefreshToolsAfterRegistration?: () => void;\n\tapplyFlagDefaultAfterRegistration?: (\n\t\tname: string,\n\t\townerPath: string,\n\t\tvalue: boolean | string,\n\t\tconfigurationOrigin?: Extension[\"sourceInfo\"][\"configurationOrigin\"],\n\t) => void;\n\tstageToolRegistration?: (extension: Extension, name: string, registration: RegisteredTool) => boolean;\n\tstageCommandRegistration?: (extension: Extension, name: string, registration: RegisteredCommand) => boolean;\n\tstageFlagRegistration?: (\n\t\textension: Extension,\n\t\tname: string,\n\t\tregistration: ExtensionFlag,\n\t\tdefaultValue?: boolean | string,\n\t) => boolean;\n\tstageShortcutRegistration?: (extension: Extension, name: KeyId, registration: ExtensionShortcut) => boolean;\n\thasPendingResourceRegistration?: (\n\t\textension: Extension,\n\t\tresourceType: ResourceOverlap[\"resourceType\"],\n\t\tname: string,\n\t) => boolean;\n\tdeletePendingResourceRegistration?: (\n\t\textension: Extension,\n\t\tresourceType: ResourceOverlap[\"resourceType\"],\n\t\tname: string,\n\t) => void;\n\tgetPendingFlagDefault?: (ownerPath: string, name: string) => boolean | string | undefined;\n\tgetAllToolsAfterRegistration?: (extension: Extension) => ToolInfo[];\n\tgetCommandsAfterRegistration?: (extension: Extension) => SlashCommandInfo[];\n\t/** Throws when this extension instance is stale after runtime replacement. */\n\tgetActiveToolsAfterRegistration?: (extension: Extension) => string[];\n\tsetActiveToolsAfterRegistration?: (extension: Extension, toolNames: string[]) => boolean;\n\tassertActive: () => void;\n\t/** Marks this extension instance as stale after runtime replacement or reload. */\n\tinvalidate: (message?: string) => void;\n\t/** Retain an event-bus subscription until this runtime is invalidated. */\n\ttrackEventBusSubscription: (unsubscribe: () => void) => () => void;\n\t/**\n\t * Register or unregister a provider.\n\t *\n\t * Before bindCore(): queues registrations / removes from queue.\n\t * After bindCore(): calls ModelRegistry directly for immediate effect.\n\t */\n\tregisterProvider: ((name: string, config: ProviderConfig, extensionPath?: string) => void) &\n\t\t((provider: Provider, extensionPath?: string) => void);\n\tunregisterProvider: (name: string, extensionPath?: string) => void;\n}\n\n/**\n * Action implementations for pi.* API methods.\n * Provided to runner.initialize(), copied into the shared runtime.\n */\nexport interface ExtensionActions {\n\tsendMessage: SendMessageHandler;\n\tsendMessages: SendMessagesHandler;\n\tsendUserMessage: SendUserMessageHandler;\n\tappendEntry: AppendEntryHandler;\n\tsetSessionName: SetSessionNameHandler;\n\tgetSessionName: GetSessionNameHandler;\n\tsetLabel: SetLabelHandler;\n\tgetActiveTools: GetActiveToolsHandler;\n\tgetAllTools: GetAllToolsHandler;\n\tsetActiveTools: SetActiveToolsHandler;\n\trefreshTools: RefreshToolsHandler;\n\tgetCommands: GetCommandsHandler;\n\tsetModel: SetModelHandler;\n\tgetThinkingLevel: GetThinkingLevelHandler;\n\tsetThinkingLevel: SetThinkingLevelHandler;\n}\n\n/**\n * Actions for ExtensionContext (ctx.* in event handlers).\n * Required by all modes.\n */\nexport interface ExtensionContextActions {\n\tgetModel: () => Model<Api> | undefined;\n\tgetScopedModels: () => readonly ScopedModel[];\n\tgetThinkingLevel: () => ThinkingLevel | undefined;\n\tisIdle: () => boolean;\n\tisProjectTrusted: () => boolean;\n\tgetSignal: () => AbortSignal | undefined;\n\tabort: () => void;\n\thasPendingMessages: () => boolean;\n\tshutdown: () => void;\n\tgetContextUsage: () => ContextUsage | undefined;\n\tcompact: (options?: CompactOptions) => void;\n\tgetSystemPrompt: () => string;\n\tgetSkillCatalog?: () => SkillCatalog;\n\tgetSystemPromptOptions?: () => BuildSystemPromptOptions;\n\tgetRouterModel?: () => string;\n\tgetModelRouting?: () => import(\"../settings-types.ts\").ModelRoutingSettings;\n\texecuteTool?: (\n\t\tcallerId: string,\n\t\tname: string,\n\t\targs: unknown,\n\t\toptions: import(\"./context-types.ts\").ExecuteToolOptions,\n\t) => Promise<import(\"@earendil-works/pi-agent-core\").AgentToolCallOutcome>;\n\tgetCallableTools?: () => readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\tgetSettings?: () => import(\"../settings-types.ts\").Settings;\n}\n\n/**\n * Actions for ExtensionCommandContext (ctx.* in command handlers).\n * Only needed for interactive mode where extension commands are invokable.\n */\nexport interface ExtensionCommandContextActions {\n\twaitForIdle: () => Promise<void>;\n\tnewSession: (options?: {\n\t\tparentSession?: string;\n\t\tsetup?: (sessionManager: SessionManager) => Promise<void>;\n\t\twithSession?: (ctx: ReplacedSessionContext) => Promise<void>;\n\t}) => Promise<{ cancelled: boolean }>;\n\tfork: (\n\t\tentryId: string,\n\t\toptions?: { position?: \"before\" | \"at\"; withSession?: (ctx: ReplacedSessionContext) => Promise<void> },\n\t) => Promise<{ cancelled: boolean }>;\n\tnavigateTree: (\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t) => Promise<{ cancelled: boolean }>;\n\tswitchSession: (\n\t\tsessionPath: string,\n\t\toptions?: { withSession?: (ctx: ReplacedSessionContext) => Promise<void> },\n\t) => Promise<{ cancelled: boolean }>;\n\treload: () => Promise<void>;\n}\n\n/**\n * Full runtime = state + actions.\n * Created by loader with throwing action stubs, completed by runner.initialize().\n */\nexport interface ExtensionRuntime extends ExtensionRuntimeState, ExtensionActions {}\n\n/** Loaded extension with all registered items. */\nexport interface Extension {\n\tpath: string;\n\thidden?: boolean;\n\treplaceable?: boolean;\n\tresolvedPath: string;\n\tsourceInfo: SourceInfo;\n\thandlers: Map<string, HandlerFn[]>;\n\ttools: Map<string, RegisteredTool>;\n\tmessageRenderers: Map<string, MessageRenderer>;\n\tmarkdownTransformer?: MarkdownTransformer;\n\tentryRenderers: Map<string, EntryRenderer>;\n\tcommands: Map<string, RegisteredCommand>;\n\tflags: Map<string, ExtensionFlag>;\n\tshortcuts: Map<KeyId, ExtensionShortcut>;\n}\n\n/** Result of loading extensions. */\nexport interface LoadExtensionsResult {\n\textensions: Extension[];\n\terrors: Array<{ path: string; error: string }>;\n\twarnings?: Array<{ path: string; warning: string }>;\n\toverlaps?: ResourceOverlap[];\n\n\t/** Shared runtime - actions are throwing stubs until runner.initialize() */\n\truntime: ExtensionRuntime;\n}\n\nexport interface ExtensionError {\n\textensionPath: string;\n\tevent: string;\n\terror: string;\n\tstack?: string;\n}\n"]}
1
+ {"version":3,"file":"runtime-types.js","sourceRoot":"","sources":["../../../src/core/extensions/runtime-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Provider } from \"@bastani/pi-ai\";\nimport type { Api, ImageContent, Model, TextContent } from \"@bastani/pi-ai/compat\";\nimport type { ThinkingLevel } from \"@earendil-works/pi-agent-core\";\nimport type { KeyId } from \"@earendil-works/pi-tui\";\nimport type { ResourceOverlap } from \"../diagnostics.ts\";\nimport type { CustomMessage } from \"../messages.ts\";\nimport type { ScopedModel } from \"../model-resolver.ts\";\nimport type { SessionManager } from \"../session-manager.ts\";\nimport type { SkillCatalog } from \"../skill-catalog.ts\";\nimport type { SlashCommandInfo } from \"../slash-commands.js\";\nimport type { SourceInfo } from \"../source-info.ts\";\nimport type { BuildSystemPromptOptions } from \"../system-prompt.ts\";\nimport type { RegisteredCommand } from \"./command-types.ts\";\nimport type { CompactOptions, ContextUsage, ExtensionContext, ReplacedSessionContext } from \"./context-types.ts\";\nimport type { McpServerRegistry } from \"./mcp-server-registry.ts\";\nimport type {\n\tEntryRenderer,\n\tMarkdownTransformer,\n\tMessageRenderer,\n\tSendMessageOptions,\n\tSendMessagesOptions,\n} from \"./message-types.ts\";\nimport type { ProviderConfig } from \"./provider-types.ts\";\nimport type { ToolDefinition, ToolInfo } from \"./tool-types.ts\";\nimport type { WorkflowActivityHub } from \"./workflow-activity-hub.js\";\nimport type { WorkflowRunControlHub } from \"./workflow-run-control-hub.js\";\n\nexport interface RegisteredTool {\n\tdefinition: ToolDefinition;\n\tsourceInfo: SourceInfo;\n}\n\nexport interface ExtensionFlag {\n\tname: string;\n\tdescription?: string;\n\ttype: \"boolean\" | \"string\";\n\tdefault?: boolean | string;\n\textensionPath: string;\n}\n\nexport interface ExtensionShortcut {\n\tshortcut: KeyId;\n\tdescription?: string;\n\tkeybinding?: import(\"../keybindings.ts\").Keybinding;\n\tpreferEditor?: boolean;\n\t/** Resolved editor-owned keys; dispatch must yield only for input these keys accept. */\n\teditorKeys?: KeyId[];\n\thandler: (ctx: ExtensionContext) => Promise<void> | void;\n\textensionPath: string;\n}\n\ntype HandlerFn = (...args: unknown[]) => Promise<unknown>;\n\nexport type SendMessageHandler = <T = unknown>(\n\tmessage: Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">,\n\toptions?: SendMessageOptions,\n) => void | Promise<void>;\n\nexport type SendMessagesHandler = <T = unknown>(\n\tmessages: Array<Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">>,\n\toptions?: SendMessagesOptions,\n) => void | Promise<void>;\n\nexport type SendUserMessageHandler = (\n\tcontent: string | (TextContent | ImageContent)[],\n\toptions?: { deliverAs?: \"steer\" | \"followUp\"; expandPromptTemplates?: boolean },\n) => void;\n\nexport type AppendEntryHandler = <T = unknown>(customType: string, data?: T) => void;\n\nexport type SetSessionNameHandler = (name: string) => void;\n\nexport type GetSessionNameHandler = () => string | undefined;\n\nexport type GetActiveToolsHandler = () => string[];\n\nexport type GetAllToolsHandler = () => ToolInfo[];\n\nexport type GetCommandsHandler = () => SlashCommandInfo[];\n\nexport type SetActiveToolsHandler = (toolNames: string[]) => void;\n\nexport type RefreshToolsHandler = () => void;\n\nexport type SetModelHandler = (model: Model<Api>) => Promise<boolean>;\n\nexport type GetThinkingLevelHandler = () => ThinkingLevel;\n\nexport type SetThinkingLevelHandler = (level: ThinkingLevel) => void;\n\nexport type SetLabelHandler = (entryId: string, label: string | undefined) => void;\n\n/**\n * Shared state created by loader, used during registration and runtime.\n * Contains flag values (defaults set during registration, CLI values set after).\n */\nexport interface ExtensionRuntimeState {\n\tgetSettings?: () => import(\"../settings-types.ts\").Settings;\n\tgetChildSessionOptions?: import(\"../child-session-options.ts\").ChildSessionOptionsResolver;\n\t/** Shared by extension loading and its runner generation. */\n\tworkflowActivityHub: WorkflowActivityHub;\n\t/** Holds the session-scoped run-control implementation registered by the workflows extension. */\n\tworkflowRunControlHub: WorkflowRunControlHub;\n\t/** Package-manifest and `registerMcpServer()` MCP servers visible to every extension of this generation. */\n\tmcpServerRegistry: McpServerRegistry;\n\tflagValues: Map<string, boolean | string>;\n\texplicitFlagNames?: Set<string>;\n\t/** Extension path that owns each active flag registration. */\n\tflagOwners?: Map<string, string>;\n\t/** Configuration origin of each active flag owner. */\n\tflagOwnerOrigins?: Map<string, Extension[\"sourceInfo\"][\"configurationOrigin\"]>;\n\t/** Provider registrations queued during extension loading, processed when runner binds */\n\tpendingProviderRegistrations: Array<\n\t\t{ provider: Provider; extensionPath: string } | { name: string; config: ProviderConfig; extensionPath: string }\n\t>;\n\t/** Provider IDs already published on behalf of this extension generation. */\n\textensionProviderIds: Set<string>;\n\t/** Resource-level compatibility gate installed after extension provenance is resolved. */\n\tcanRegisterResource?: (extension: Extension, resourceType: ResourceOverlap[\"resourceType\"], name: string) => boolean;\n\tbeginResourceRegistrationBatch?: () => void;\n\tendResourceRegistrationBatch?: () => void;\n\trefreshToolsAfterRegistration?: () => void;\n\tapplyFlagDefaultAfterRegistration?: (\n\t\tname: string,\n\t\townerPath: string,\n\t\tvalue: boolean | string,\n\t\tconfigurationOrigin?: Extension[\"sourceInfo\"][\"configurationOrigin\"],\n\t) => void;\n\tstageToolRegistration?: (extension: Extension, name: string, registration: RegisteredTool) => boolean;\n\tstageCommandRegistration?: (extension: Extension, name: string, registration: RegisteredCommand) => boolean;\n\tstageFlagRegistration?: (\n\t\textension: Extension,\n\t\tname: string,\n\t\tregistration: ExtensionFlag,\n\t\tdefaultValue?: boolean | string,\n\t) => boolean;\n\tstageShortcutRegistration?: (extension: Extension, name: KeyId, registration: ExtensionShortcut) => boolean;\n\thasPendingResourceRegistration?: (\n\t\textension: Extension,\n\t\tresourceType: ResourceOverlap[\"resourceType\"],\n\t\tname: string,\n\t) => boolean;\n\tdeletePendingResourceRegistration?: (\n\t\textension: Extension,\n\t\tresourceType: ResourceOverlap[\"resourceType\"],\n\t\tname: string,\n\t) => void;\n\tgetPendingFlagDefault?: (ownerPath: string, name: string) => boolean | string | undefined;\n\tgetAllToolsAfterRegistration?: (extension: Extension) => ToolInfo[];\n\tgetCommandsAfterRegistration?: (extension: Extension) => SlashCommandInfo[];\n\t/** Throws when this extension instance is stale after runtime replacement. */\n\tgetActiveToolsAfterRegistration?: (extension: Extension) => string[];\n\tsetActiveToolsAfterRegistration?: (extension: Extension, toolNames: string[]) => boolean;\n\tassertActive: () => void;\n\t/** Marks this extension instance as stale after runtime replacement or reload. */\n\tinvalidate: (message?: string) => void;\n\t/** Retain an event-bus subscription until this runtime is invalidated. */\n\ttrackEventBusSubscription: (unsubscribe: () => void) => () => void;\n\t/**\n\t * Register or unregister a provider.\n\t *\n\t * Before bindCore(): queues registrations / removes from queue.\n\t * After bindCore(): calls ModelRegistry directly for immediate effect.\n\t */\n\tregisterProvider: ((name: string, config: ProviderConfig, extensionPath?: string) => void) &\n\t\t((provider: Provider, extensionPath?: string) => void);\n\tunregisterProvider: (name: string, extensionPath?: string) => void;\n}\n\n/**\n * Action implementations for pi.* API methods.\n * Provided to runner.initialize(), copied into the shared runtime.\n */\nexport interface ExtensionActions {\n\tsendMessage: SendMessageHandler;\n\tsendMessages: SendMessagesHandler;\n\tsendUserMessage: SendUserMessageHandler;\n\tappendEntry: AppendEntryHandler;\n\tsetSessionName: SetSessionNameHandler;\n\tgetSessionName: GetSessionNameHandler;\n\tsetLabel: SetLabelHandler;\n\tgetActiveTools: GetActiveToolsHandler;\n\tgetAllTools: GetAllToolsHandler;\n\tsetActiveTools: SetActiveToolsHandler;\n\trefreshTools: RefreshToolsHandler;\n\tgetCommands: GetCommandsHandler;\n\tsetModel: SetModelHandler;\n\tgetThinkingLevel: GetThinkingLevelHandler;\n\tsetThinkingLevel: SetThinkingLevelHandler;\n}\n\n/**\n * Actions for ExtensionContext (ctx.* in event handlers).\n * Required by all modes.\n */\nexport interface ExtensionContextActions {\n\tgetModel: () => Model<Api> | undefined;\n\tgetScopedModels: () => readonly ScopedModel[];\n\tgetThinkingLevel: () => ThinkingLevel | undefined;\n\tisIdle: () => boolean;\n\tisProjectTrusted: () => boolean;\n\tgetSignal: () => AbortSignal | undefined;\n\tabort: () => void;\n\thasPendingMessages: () => boolean;\n\tshutdown: () => void;\n\tgetContextUsage: () => ContextUsage | undefined;\n\tcompact: (options?: CompactOptions) => void;\n\tgetSystemPrompt: () => string;\n\tgetSkillCatalog?: () => SkillCatalog;\n\tgetSystemPromptOptions?: () => BuildSystemPromptOptions;\n\tgetRouterModel?: () => string;\n\tgetModelRouting?: () => import(\"../settings-types.ts\").ModelRoutingSettings;\n\texecuteTool?: (\n\t\tcallerId: string,\n\t\tname: string,\n\t\targs: unknown,\n\t\toptions: import(\"./context-types.ts\").ExecuteToolOptions,\n\t) => Promise<import(\"@earendil-works/pi-agent-core\").AgentToolCallOutcome>;\n\tgetCallableTools?: () => readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\tgetSettings?: () => import(\"../settings-types.ts\").Settings;\n}\n\n/**\n * Actions for ExtensionCommandContext (ctx.* in command handlers).\n * Only needed for interactive mode where extension commands are invokable.\n */\nexport interface ExtensionCommandContextActions {\n\twaitForIdle: () => Promise<void>;\n\tnewSession: (options?: {\n\t\tparentSession?: string;\n\t\tsetup?: (sessionManager: SessionManager) => Promise<void>;\n\t\twithSession?: (ctx: ReplacedSessionContext) => Promise<void>;\n\t}) => Promise<{ cancelled: boolean }>;\n\tfork: (\n\t\tentryId: string,\n\t\toptions?: { position?: \"before\" | \"at\"; withSession?: (ctx: ReplacedSessionContext) => Promise<void> },\n\t) => Promise<{ cancelled: boolean }>;\n\tnavigateTree: (\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t) => Promise<{ cancelled: boolean }>;\n\tswitchSession: (\n\t\tsessionPath: string,\n\t\toptions?: { withSession?: (ctx: ReplacedSessionContext) => Promise<void> },\n\t) => Promise<{ cancelled: boolean }>;\n\treload: () => Promise<void>;\n}\n\n/**\n * Full runtime = state + actions.\n * Created by loader with throwing action stubs, completed by runner.initialize().\n */\nexport interface ExtensionRuntime extends ExtensionRuntimeState, ExtensionActions {}\n\n/** Loaded extension with all registered items. */\nexport interface Extension {\n\tpath: string;\n\thidden?: boolean;\n\treplaceable?: boolean;\n\tresolvedPath: string;\n\tsourceInfo: SourceInfo;\n\thandlers: Map<string, HandlerFn[]>;\n\ttools: Map<string, RegisteredTool>;\n\tmessageRenderers: Map<string, MessageRenderer>;\n\tmarkdownTransformer?: MarkdownTransformer;\n\tentryRenderers: Map<string, EntryRenderer>;\n\tcommands: Map<string, RegisteredCommand>;\n\tflags: Map<string, ExtensionFlag>;\n\tshortcuts: Map<KeyId, ExtensionShortcut>;\n}\n\n/** Result of loading extensions. */\nexport interface LoadExtensionsResult {\n\textensions: Extension[];\n\terrors: Array<{ path: string; error: string }>;\n\twarnings?: Array<{ path: string; warning: string }>;\n\toverlaps?: ResourceOverlap[];\n\n\t/** Shared runtime - actions are throwing stubs until runner.initialize() */\n\truntime: ExtensionRuntime;\n}\n\nexport interface ExtensionError {\n\textensionPath: string;\n\tevent: string;\n\terror: string;\n\tstack?: string;\n}\n"]}
@@ -58,6 +58,7 @@ export interface ToolAnnotations {
58
58
  export interface ToolNamespace {
59
59
  name: string;
60
60
  description?: string;
61
+ instructions?: string;
61
62
  }
62
63
  export interface ToolLoadout {
63
64
  readonly declared: readonly import("@earendil-works/pi-agent-core").AgentTool[];
@@ -1 +1 @@
1
- {"version":3,"file":"tool-types.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/tool-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACjH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEzF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,yCAAyC;AACzC,MAAM,WAAW,uBAAuB;IACvC,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAClB,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;CACnB;AAED,wCAAwC;AACxC,MAAM,WAAW,iBAAiB,CAAC,MAAM,GAAG,OAAO,EAAE,KAAK,GAAG,OAAO;IACnE,6FAA6F;IAC7F,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EAAE,uBAAuB,CAAC,QAAQ,CAAC,GAAG,SAAS,EACvD,GAAG,EAAE,oBAAoB,GACvB,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEtC,6CAA6C;IAC7C,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAE7C,+CAA+C;IAC/C,YAAY,CAAC,EAAE,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;CAC3D;AAED,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAEnE;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAS,OAAO,EAAE,QAAQ,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,EACvF,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAC7C,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,iBAAiB,CAE/D;AAED,8DAA8D;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAEvE,0FAA0F;AAC1F,MAAM,MAAM,QAAQ,GAAG,IAAI,CAC1B,cAAc,EACZ,MAAM,GACN,aAAa,GACb,YAAY,GACZ,qBAAqB,GACrB,kBAAkB,GAClB,UAAU,GACV,WAAW,GACX,aAAa,CACf,GAAG;IACH,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-types.js","sourceRoot":"","sources":["../../../src/core/extensions/tool-types.ts"],"names":[],"mappings":"AAgKA;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACzB,IAA+C;IAE/C,OAAO,IAAqE,CAAC;AAC9E,CAAC","sourcesContent":["import type { ConstrainedSamplingConfig } from \"@bastani/pi-ai/compat\";\nimport type { AgentToolResult, AgentToolUpdateCallback, ToolExecutionMode } from \"@earendil-works/pi-agent-core\";\nimport type { Component } from \"@earendil-works/pi-tui\";\nimport type { Static, TSchema } from \"typebox\";\nimport type { Theme } from \"../../modes/interactive/theme/theme.js\";\nimport type { SourceInfo } from \"../source-info.ts\";\nimport type { ToolConcurrency } from \"../tools/tool-concurrency.ts\";\n\nexport type { ToolConcurrency, ToolConcurrencyMode } from \"../tools/tool-concurrency.ts\";\n\nimport type { ExtensionToolContext } from \"./context-types.ts\";\n\n/** Rendering options for tool results */\nexport interface ToolRenderResultOptions {\n\t/** Whether the result view is expanded */\n\texpanded: boolean;\n\t/** Whether this is a partial/streaming result */\n\tisPartial: boolean;\n}\n\n/** Context passed to tool renderers. */\nexport interface ToolRenderContext<TState = unknown, TArgs = unknown> {\n\t/** Current tool call arguments. Shared across call/result renders for the same tool call. */\n\targs: TArgs;\n\t/** Unique id for this tool execution. Stable across call/result renders for the same tool call. */\n\ttoolCallId: string;\n\t/** Invalidate just this tool execution component for redraw. */\n\tinvalidate: () => void;\n\t/** Previously returned component for this render slot, if any. */\n\tlastComponent: Component | undefined;\n\t/** Shared renderer state for this tool row. Initialized by tool-execution.ts. */\n\tstate: TState;\n\t/** Working directory for this tool execution. */\n\tcwd: string;\n\t/** Whether the tool execution has started. */\n\texecutionStarted: boolean;\n\t/** Whether the tool call arguments are complete. */\n\targsComplete: boolean;\n\t/** Whether the tool result is partial/streaming. */\n\tisPartial: boolean;\n\t/** Whether the result view is expanded. */\n\texpanded: boolean;\n\t/** Whether inline images are currently shown in the TUI. */\n\tshowImages: boolean;\n\t/** Whether the current result is an error. */\n\tisError: boolean;\n}\n\ntype ToolRenderCall<TParams extends TSchema, TState> = {\n\tbivarianceHack(args: Static<TParams>, theme: Theme, context: ToolRenderContext<TState, Static<TParams>>): Component;\n}[\"bivarianceHack\"];\n\ntype ToolRenderResult<TParams extends TSchema, TDetails, TState> = {\n\tbivarianceHack(\n\t\tresult: AgentToolResult<TDetails>,\n\t\toptions: ToolRenderResultOptions,\n\t\ttheme: Theme,\n\t\tcontext: ToolRenderContext<TState, Static<TParams>>,\n\t): Component;\n}[\"bivarianceHack\"];\n\n/** How the model reaches a registered tool. */\nexport type ToolExposure = \"direct\" | \"model-only\" | \"codemode\" | \"deferred\" | \"hidden\";\n\nexport interface ToolAnnotations {\n\treadOnlyHint?: boolean;\n\tdestructiveHint?: boolean;\n\tidempotentHint?: boolean;\n\topenWorldHint?: boolean;\n}\n\nexport interface ToolNamespace {\n\tname: string;\n\tdescription?: string;\n}\n\nexport interface ToolLoadout {\n\treadonly declared: readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\treadonly callable: readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\treadonly registered: readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\tgetExposure(name: string): ToolExposure;\n\tgetNamespace(name: string): ToolNamespace | undefined;\n}\n\nexport interface ToolLoadoutChanges {\n\tdescriptions?: Readonly<Record<string, string>>;\n\thiddenDeclarations?: readonly string[];\n}\n\n/**\n * Tool definition for registerTool().\n */\nexport interface ToolDefinition<TParams extends TSchema = TSchema, TDetails = unknown, TState = unknown> {\n\t/** Tool name (used in LLM tool calls) */\n\tname: string;\n\t/** Human-readable label for UI */\n\tlabel: string;\n\t/** Description for LLM */\n\tdescription: string;\n\t/** Optional one-line snippet for the Available tools section in the default system prompt. Custom tools are omitted from that section when this is not provided. */\n\tpromptSnippet?: string;\n\t/** Optional guideline bullets appended to the default system prompt Guidelines section when this tool is active. */\n\tpromptGuidelines?: string[];\n\t/** Parameter schema (TypeBox) */\n\tparameters: TParams;\n\t/** Optional provider-side constrained sampling request. `false` explicitly disables it. */\n\tconstrainedSampling?: false | ConstrainedSamplingConfig;\n\t/** Optional per-tool character cap for model-visible result persistence. Use Infinity to opt out for self-bounded tools. */\n\tmaxResultSizeChars?: number;\n\t/** Marks a terminating tool created by createStructuredOutputTool() so print mode can emit custom-named final JSON without treating every terminating tool as printable. */\n\tstructuredOutput?: true;\n\t/** Controls whether ToolExecutionComponent renders the standard colored shell or the tool renders its own framing. */\n\trenderShell?: \"default\" | \"self\";\n\n\t/** Optional compatibility shim to prepare raw tool call arguments before schema validation. Must return an object conforming to TParams. */\n\tprepareArguments?: (args: unknown) => Static<TParams>;\n\t/** Schema of successful machine-readable results. */\n\toutputSchema?: TSchema;\n\t/** Direct and model-only tools activate by default; other exposures do not. */\n\texposure?: ToolExposure;\n\tnamespace?: ToolNamespace;\n\tannotations?: ToolAnnotations;\n\tdefaultActive?: boolean;\n\tprepareLoadout?: (loadout: ToolLoadout) => ToolLoadoutChanges | undefined;\n\n\t/**\n\t * Per-tool execution mode override.\n\t * - \"sequential\": this tool must execute one at a time with other tool calls.\n\t * - \"parallel\": this tool can execute concurrently with other tool calls.\n\t *\n\t * If omitted, the default execution mode applies.\n\t */\n\texecutionMode?: ToolExecutionMode;\n\n\t/**\n\t * Ordering against the other calls of the same assistant message.\n\t * - \"shared\": may overlap other shared calls, but starts after the latest earlier exclusive call (default)\n\t * - \"exclusive\": starts after every earlier call finishes; later calls start after it finishes\n\t * - function: resolved per call from its arguments; a throwing resolver means \"exclusive\"\n\t */\n\tconcurrency?: ToolConcurrency<Static<TParams>>;\n\n\t/** Execute the tool. */\n\texecute(\n\t\ttoolCallId: string,\n\t\tparams: Static<TParams>,\n\t\tsignal: AbortSignal | undefined,\n\t\tonUpdate: AgentToolUpdateCallback<TDetails> | undefined,\n\t\tctx: ExtensionToolContext,\n\t): Promise<AgentToolResult<TDetails>>;\n\n\t/** Custom rendering for tool call display */\n\trenderCall?: ToolRenderCall<TParams, TState>;\n\n\t/** Custom rendering for tool result display */\n\trenderResult?: ToolRenderResult<TParams, TDetails, TState>;\n}\n\ntype AnyToolDefinition = ToolDefinition<TSchema, unknown, unknown>;\n\n/**\n * Preserve parameter inference for standalone tool definitions.\n *\n * Use this when assigning a tool to a variable or passing it through arrays such\n * as `customTools`, where contextual typing would otherwise widen params to\n * `unknown`.\n */\nexport function defineTool<TParams extends TSchema, TDetails = unknown, TState = unknown>(\n\ttool: ToolDefinition<TParams, TDetails, TState>,\n): ToolDefinition<TParams, TDetails, TState> & AnyToolDefinition {\n\treturn tool as ToolDefinition<TParams, TDetails, TState> & AnyToolDefinition;\n}\n\n/** Public constrained-sampling shape inherited from pi-ai. */\nexport type { ConstrainedSamplingConfig } from \"@bastani/pi-ai/compat\";\n\n/** Tool info with name, description, parameter schema, constraint, and source metadata */\nexport type ToolInfo = Pick<\n\tToolDefinition,\n\t| \"name\"\n\t| \"description\"\n\t| \"parameters\"\n\t| \"constrainedSampling\"\n\t| \"promptGuidelines\"\n\t| \"exposure\"\n\t| \"namespace\"\n\t| \"annotations\"\n> & {\n\tsourceInfo: SourceInfo;\n};\n"]}
1
+ {"version":3,"file":"tool-types.js","sourceRoot":"","sources":["../../../src/core/extensions/tool-types.ts"],"names":[],"mappings":"AAiKA;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACzB,IAA+C;IAE/C,OAAO,IAAqE,CAAC;AAC9E,CAAC","sourcesContent":["import type { ConstrainedSamplingConfig } from \"@bastani/pi-ai/compat\";\nimport type { AgentToolResult, AgentToolUpdateCallback, ToolExecutionMode } from \"@earendil-works/pi-agent-core\";\nimport type { Component } from \"@earendil-works/pi-tui\";\nimport type { Static, TSchema } from \"typebox\";\nimport type { Theme } from \"../../modes/interactive/theme/theme.js\";\nimport type { SourceInfo } from \"../source-info.ts\";\nimport type { ToolConcurrency } from \"../tools/tool-concurrency.ts\";\n\nexport type { ToolConcurrency, ToolConcurrencyMode } from \"../tools/tool-concurrency.ts\";\n\nimport type { ExtensionToolContext } from \"./context-types.ts\";\n\n/** Rendering options for tool results */\nexport interface ToolRenderResultOptions {\n\t/** Whether the result view is expanded */\n\texpanded: boolean;\n\t/** Whether this is a partial/streaming result */\n\tisPartial: boolean;\n}\n\n/** Context passed to tool renderers. */\nexport interface ToolRenderContext<TState = unknown, TArgs = unknown> {\n\t/** Current tool call arguments. Shared across call/result renders for the same tool call. */\n\targs: TArgs;\n\t/** Unique id for this tool execution. Stable across call/result renders for the same tool call. */\n\ttoolCallId: string;\n\t/** Invalidate just this tool execution component for redraw. */\n\tinvalidate: () => void;\n\t/** Previously returned component for this render slot, if any. */\n\tlastComponent: Component | undefined;\n\t/** Shared renderer state for this tool row. Initialized by tool-execution.ts. */\n\tstate: TState;\n\t/** Working directory for this tool execution. */\n\tcwd: string;\n\t/** Whether the tool execution has started. */\n\texecutionStarted: boolean;\n\t/** Whether the tool call arguments are complete. */\n\targsComplete: boolean;\n\t/** Whether the tool result is partial/streaming. */\n\tisPartial: boolean;\n\t/** Whether the result view is expanded. */\n\texpanded: boolean;\n\t/** Whether inline images are currently shown in the TUI. */\n\tshowImages: boolean;\n\t/** Whether the current result is an error. */\n\tisError: boolean;\n}\n\ntype ToolRenderCall<TParams extends TSchema, TState> = {\n\tbivarianceHack(args: Static<TParams>, theme: Theme, context: ToolRenderContext<TState, Static<TParams>>): Component;\n}[\"bivarianceHack\"];\n\ntype ToolRenderResult<TParams extends TSchema, TDetails, TState> = {\n\tbivarianceHack(\n\t\tresult: AgentToolResult<TDetails>,\n\t\toptions: ToolRenderResultOptions,\n\t\ttheme: Theme,\n\t\tcontext: ToolRenderContext<TState, Static<TParams>>,\n\t): Component;\n}[\"bivarianceHack\"];\n\n/** How the model reaches a registered tool. */\nexport type ToolExposure = \"direct\" | \"model-only\" | \"codemode\" | \"deferred\" | \"hidden\";\n\nexport interface ToolAnnotations {\n\treadOnlyHint?: boolean;\n\tdestructiveHint?: boolean;\n\tidempotentHint?: boolean;\n\topenWorldHint?: boolean;\n}\n\nexport interface ToolNamespace {\n\tname: string;\n\tdescription?: string;\n\tinstructions?: string;\n}\n\nexport interface ToolLoadout {\n\treadonly declared: readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\treadonly callable: readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\treadonly registered: readonly import(\"@earendil-works/pi-agent-core\").AgentTool[];\n\tgetExposure(name: string): ToolExposure;\n\tgetNamespace(name: string): ToolNamespace | undefined;\n}\n\nexport interface ToolLoadoutChanges {\n\tdescriptions?: Readonly<Record<string, string>>;\n\thiddenDeclarations?: readonly string[];\n}\n\n/**\n * Tool definition for registerTool().\n */\nexport interface ToolDefinition<TParams extends TSchema = TSchema, TDetails = unknown, TState = unknown> {\n\t/** Tool name (used in LLM tool calls) */\n\tname: string;\n\t/** Human-readable label for UI */\n\tlabel: string;\n\t/** Description for LLM */\n\tdescription: string;\n\t/** Optional one-line snippet for the Available tools section in the default system prompt. Custom tools are omitted from that section when this is not provided. */\n\tpromptSnippet?: string;\n\t/** Optional guideline bullets appended to the default system prompt Guidelines section when this tool is active. */\n\tpromptGuidelines?: string[];\n\t/** Parameter schema (TypeBox) */\n\tparameters: TParams;\n\t/** Optional provider-side constrained sampling request. `false` explicitly disables it. */\n\tconstrainedSampling?: false | ConstrainedSamplingConfig;\n\t/** Optional per-tool character cap for model-visible result persistence. Use Infinity to opt out for self-bounded tools. */\n\tmaxResultSizeChars?: number;\n\t/** Marks a terminating tool created by createStructuredOutputTool() so print mode can emit custom-named final JSON without treating every terminating tool as printable. */\n\tstructuredOutput?: true;\n\t/** Controls whether ToolExecutionComponent renders the standard colored shell or the tool renders its own framing. */\n\trenderShell?: \"default\" | \"self\";\n\n\t/** Optional compatibility shim to prepare raw tool call arguments before schema validation. Must return an object conforming to TParams. */\n\tprepareArguments?: (args: unknown) => Static<TParams>;\n\t/** Schema of successful machine-readable results. */\n\toutputSchema?: TSchema;\n\t/** Direct and model-only tools activate by default; other exposures do not. */\n\texposure?: ToolExposure;\n\tnamespace?: ToolNamespace;\n\tannotations?: ToolAnnotations;\n\tdefaultActive?: boolean;\n\tprepareLoadout?: (loadout: ToolLoadout) => ToolLoadoutChanges | undefined;\n\n\t/**\n\t * Per-tool execution mode override.\n\t * - \"sequential\": this tool must execute one at a time with other tool calls.\n\t * - \"parallel\": this tool can execute concurrently with other tool calls.\n\t *\n\t * If omitted, the default execution mode applies.\n\t */\n\texecutionMode?: ToolExecutionMode;\n\n\t/**\n\t * Ordering against the other calls of the same assistant message.\n\t * - \"shared\": may overlap other shared calls, but starts after the latest earlier exclusive call (default)\n\t * - \"exclusive\": starts after every earlier call finishes; later calls start after it finishes\n\t * - function: resolved per call from its arguments; a throwing resolver means \"exclusive\"\n\t */\n\tconcurrency?: ToolConcurrency<Static<TParams>>;\n\n\t/** Execute the tool. */\n\texecute(\n\t\ttoolCallId: string,\n\t\tparams: Static<TParams>,\n\t\tsignal: AbortSignal | undefined,\n\t\tonUpdate: AgentToolUpdateCallback<TDetails> | undefined,\n\t\tctx: ExtensionToolContext,\n\t): Promise<AgentToolResult<TDetails>>;\n\n\t/** Custom rendering for tool call display */\n\trenderCall?: ToolRenderCall<TParams, TState>;\n\n\t/** Custom rendering for tool result display */\n\trenderResult?: ToolRenderResult<TParams, TDetails, TState>;\n}\n\ntype AnyToolDefinition = ToolDefinition<TSchema, unknown, unknown>;\n\n/**\n * Preserve parameter inference for standalone tool definitions.\n *\n * Use this when assigning a tool to a variable or passing it through arrays such\n * as `customTools`, where contextual typing would otherwise widen params to\n * `unknown`.\n */\nexport function defineTool<TParams extends TSchema, TDetails = unknown, TState = unknown>(\n\ttool: ToolDefinition<TParams, TDetails, TState>,\n): ToolDefinition<TParams, TDetails, TState> & AnyToolDefinition {\n\treturn tool as ToolDefinition<TParams, TDetails, TState> & AnyToolDefinition;\n}\n\n/** Public constrained-sampling shape inherited from pi-ai. */\nexport type { ConstrainedSamplingConfig } from \"@bastani/pi-ai/compat\";\n\n/** Tool info with name, description, parameter schema, constraint, and source metadata */\nexport type ToolInfo = Pick<\n\tToolDefinition,\n\t| \"name\"\n\t| \"description\"\n\t| \"parameters\"\n\t| \"constrainedSampling\"\n\t| \"promptGuidelines\"\n\t| \"exposure\"\n\t| \"namespace\"\n\t| \"annotations\"\n> & {\n\tsourceInfo: SourceInfo;\n};\n"]}
@@ -0,0 +1,23 @@
1
+ import { type SessionWorkflows, type WorkflowRunAllTarget, type WorkflowRunControlOutcome, type WorkflowRunControlRegistration, type WorkflowRunDetail, type WorkflowRunListFilter, type WorkflowRunPauseOptions, type WorkflowRunResumeOptions, type WorkflowRunStageSummary, type WorkflowRunSummary, type WorkflowStageListFilter } from "./workflow-run-control.js";
2
+ /** Holds the run-control implementation that the workflows extension registers for one extension generation. */
3
+ export declare class WorkflowRunControlHub {
4
+ private control;
5
+ private disposed;
6
+ register(control: SessionWorkflows): WorkflowRunControlRegistration;
7
+ current(): SessionWorkflows | undefined;
8
+ dispose(): void;
9
+ }
10
+ /** Stable per-session handle that follows the current extension generation across reloads. */
11
+ export declare class SessionWorkflowsHandle implements SessionWorkflows {
12
+ private readonly resolve;
13
+ constructor(resolve: () => SessionWorkflows | undefined);
14
+ private control;
15
+ listRuns(filter?: WorkflowRunListFilter): Promise<readonly WorkflowRunSummary[]>;
16
+ getRun(runId: string): Promise<WorkflowRunDetail>;
17
+ getStages(runId: string, filter?: WorkflowStageListFilter): Promise<readonly WorkflowRunStageSummary[]>;
18
+ pause(runId: string, options?: WorkflowRunPauseOptions): Promise<WorkflowRunControlOutcome>;
19
+ pause(target: WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome>;
20
+ quit(target: string | WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome>;
21
+ resume(runId: string, options?: WorkflowRunResumeOptions): Promise<WorkflowRunControlOutcome>;
22
+ }
23
+ //# sourceMappingURL=workflow-run-control-hub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-control-hub.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/workflow-run-control-hub.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EAEnC,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,MAAM,2BAA2B,CAAC;AAEnC,gHAAgH;AAChH,qBAAa,qBAAqB;IACjC,OAAO,CAAC,OAAO,CAA+B;IAC9C,OAAO,CAAC,QAAQ,CAAS;IAEzB,QAAQ,CAAC,OAAO,EAAE,gBAAgB,GAAG,8BAA8B,CAQlE;IAED,OAAO,IAAI,gBAAgB,GAAG,SAAS,CAEtC;IAED,OAAO,IAAI,IAAI,CAGd;CACD;AAED,8FAA8F;AAC9F,qBAAa,sBAAuB,YAAW,gBAAgB;IAC9D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqC;IAE7D,YAAY,OAAO,EAAE,MAAM,gBAAgB,GAAG,SAAS,EAEtD;IAED,OAAO,CAAC,OAAO;IAMT,QAAQ,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,SAAS,kBAAkB,EAAE,CAAC,CAErF;IAEK,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAEtD;IAEK,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAAC,CAE5G;IAED,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC5F,KAAK,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IASlE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAEpF;IAEK,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAElG;CACD"}
@@ -0,0 +1,57 @@
1
+ import { WorkflowRunControlUnavailableError, } from "./workflow-run-control.js";
2
+ /** Holds the run-control implementation that the workflows extension registers for one extension generation. */
3
+ export class WorkflowRunControlHub {
4
+ control;
5
+ disposed = false;
6
+ register(control) {
7
+ if (this.disposed)
8
+ return { dispose: () => { } };
9
+ this.control = control;
10
+ return {
11
+ dispose: () => {
12
+ if (this.control === control)
13
+ this.control = undefined;
14
+ },
15
+ };
16
+ }
17
+ current() {
18
+ return this.control;
19
+ }
20
+ dispose() {
21
+ this.disposed = true;
22
+ this.control = undefined;
23
+ }
24
+ }
25
+ /** Stable per-session handle that follows the current extension generation across reloads. */
26
+ export class SessionWorkflowsHandle {
27
+ resolve;
28
+ constructor(resolve) {
29
+ this.resolve = resolve;
30
+ }
31
+ control() {
32
+ const control = this.resolve();
33
+ if (control === undefined)
34
+ throw new WorkflowRunControlUnavailableError();
35
+ return control;
36
+ }
37
+ async listRuns(filter) {
38
+ return this.control().listRuns(filter);
39
+ }
40
+ async getRun(runId) {
41
+ return this.control().getRun(runId);
42
+ }
43
+ async getStages(runId, filter) {
44
+ return this.control().getStages(runId, filter);
45
+ }
46
+ async pause(target, options) {
47
+ const control = this.control();
48
+ return typeof target === "string" ? control.pause(target, options) : control.pause(target);
49
+ }
50
+ async quit(target) {
51
+ return this.control().quit(target);
52
+ }
53
+ async resume(runId, options) {
54
+ return this.control().resume(runId, options);
55
+ }
56
+ }
57
+ //# sourceMappingURL=workflow-run-control-hub.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-control-hub.js","sourceRoot":"","sources":["../../../src/core/extensions/workflow-run-control-hub.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,kCAAkC,GAQlC,MAAM,2BAA2B,CAAC;AAEnC,gHAAgH;AAChH,MAAM,OAAO,qBAAqB;IACzB,OAAO,CAA+B;IACtC,QAAQ,GAAG,KAAK,CAAC;IAEzB,QAAQ,CAAC,OAAyB;QACjC,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG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AE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5F,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAqC;QAC/C,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,OAAkC;QAC7D,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACD","sourcesContent":["import {\n\ttype SessionWorkflows,\n\ttype WorkflowRunAllTarget,\n\ttype WorkflowRunControlOutcome,\n\ttype WorkflowRunControlRegistration,\n\tWorkflowRunControlUnavailableError,\n\ttype WorkflowRunDetail,\n\ttype WorkflowRunListFilter,\n\ttype WorkflowRunPauseOptions,\n\ttype WorkflowRunResumeOptions,\n\ttype WorkflowRunStageSummary,\n\ttype WorkflowRunSummary,\n\ttype WorkflowStageListFilter,\n} from \"./workflow-run-control.js\";\n\n/** Holds the run-control implementation that the workflows extension registers for one extension generation. */\nexport class WorkflowRunControlHub {\n\tprivate control: SessionWorkflows | undefined;\n\tprivate disposed = false;\n\n\tregister(control: SessionWorkflows): WorkflowRunControlRegistration {\n\t\tif (this.disposed) return { dispose: () => {} };\n\t\tthis.control = control;\n\t\treturn {\n\t\t\tdispose: () => {\n\t\t\t\tif (this.control === control) this.control = undefined;\n\t\t\t},\n\t\t};\n\t}\n\n\tcurrent(): SessionWorkflows | undefined {\n\t\treturn this.control;\n\t}\n\n\tdispose(): void {\n\t\tthis.disposed = true;\n\t\tthis.control = undefined;\n\t}\n}\n\n/** Stable per-session handle that follows the current extension generation across reloads. */\nexport class SessionWorkflowsHandle implements SessionWorkflows {\n\tprivate readonly resolve: () => SessionWorkflows | undefined;\n\n\tconstructor(resolve: () => SessionWorkflows | undefined) {\n\t\tthis.resolve = resolve;\n\t}\n\n\tprivate control(): SessionWorkflows {\n\t\tconst control = this.resolve();\n\t\tif (control === undefined) throw new WorkflowRunControlUnavailableError();\n\t\treturn control;\n\t}\n\n\tasync listRuns(filter?: WorkflowRunListFilter): Promise<readonly WorkflowRunSummary[]> {\n\t\treturn this.control().listRuns(filter);\n\t}\n\n\tasync getRun(runId: string): Promise<WorkflowRunDetail> {\n\t\treturn this.control().getRun(runId);\n\t}\n\n\tasync getStages(runId: string, filter?: WorkflowStageListFilter): Promise<readonly WorkflowRunStageSummary[]> {\n\t\treturn this.control().getStages(runId, filter);\n\t}\n\n\tpause(runId: string, options?: WorkflowRunPauseOptions): Promise<WorkflowRunControlOutcome>;\n\tpause(target: WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome>;\n\tasync pause(\n\t\ttarget: string | WorkflowRunAllTarget,\n\t\toptions?: WorkflowRunPauseOptions,\n\t): Promise<WorkflowRunControlOutcome> {\n\t\tconst control = this.control();\n\t\treturn typeof target === \"string\" ? control.pause(target, options) : control.pause(target);\n\t}\n\n\tasync quit(target: string | WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome> {\n\t\treturn this.control().quit(target);\n\t}\n\n\tasync resume(runId: string, options?: WorkflowRunResumeOptions): Promise<WorkflowRunControlOutcome> {\n\t\treturn this.control().resume(runId, options);\n\t}\n}\n"]}
@@ -0,0 +1,163 @@
1
+ import type { WorkflowRunStatus, WorkflowStageStatus } from "./workflow-events.js";
2
+ export type WorkflowRunJsonValue = string | number | boolean | null | readonly WorkflowRunJsonValue[] | WorkflowRunJsonObject;
3
+ export interface WorkflowRunJsonObject {
4
+ readonly [key: string]: WorkflowRunJsonValue | undefined;
5
+ }
6
+ export type WorkflowRunFilterStatus = WorkflowRunStatus | WorkflowStageStatus | "awaiting_input";
7
+ export interface WorkflowRunListFilter {
8
+ /** Run statuses match directly; `awaiting_input` selects runs with an unanswered prompt. */
9
+ readonly status?: WorkflowRunFilterStatus;
10
+ }
11
+ export interface WorkflowStageListFilter {
12
+ readonly status?: WorkflowStageStatus;
13
+ }
14
+ export interface WorkflowRunActiveStage {
15
+ readonly stageId: string;
16
+ readonly name: string;
17
+ readonly status: WorkflowStageStatus;
18
+ }
19
+ export interface WorkflowRunAwaitingInput {
20
+ readonly stageId?: string;
21
+ readonly stageName?: string;
22
+ readonly promptId?: string;
23
+ readonly promptKind?: string;
24
+ readonly message?: string;
25
+ }
26
+ /** The concise per-run data that the `workflow` tool's `status` action lists. */
27
+ export interface WorkflowRunSummary {
28
+ readonly runId: string;
29
+ readonly name: string;
30
+ readonly status: WorkflowRunStatus;
31
+ readonly startedAt: number;
32
+ readonly endedAt?: number;
33
+ readonly elapsedMs: number;
34
+ readonly activeStages: readonly WorkflowRunActiveStage[];
35
+ readonly awaitingInputCount: number;
36
+ readonly awaitingInput: readonly WorkflowRunAwaitingInput[];
37
+ readonly exitReason?: string;
38
+ readonly error?: string;
39
+ }
40
+ export interface WorkflowRunStageSummary {
41
+ readonly id: string;
42
+ readonly name: string;
43
+ readonly status: WorkflowStageStatus;
44
+ readonly sessionId?: string;
45
+ readonly error?: string;
46
+ readonly skippedReason?: string;
47
+ readonly awaitingInputSince?: number;
48
+ }
49
+ /** The per-run detail that the `workflow` tool's `status` action returns for one run id. */
50
+ export interface WorkflowRunDetail {
51
+ readonly runId: string;
52
+ readonly rootRunId?: string;
53
+ readonly name: string;
54
+ readonly status: WorkflowRunStatus | "crashed";
55
+ readonly startedAt: number;
56
+ readonly endedAt?: number;
57
+ readonly durationMs?: number;
58
+ readonly inputs: WorkflowRunJsonObject;
59
+ readonly stages: readonly WorkflowRunStageSummary[];
60
+ readonly result?: WorkflowRunJsonObject;
61
+ readonly error?: string;
62
+ readonly exitReason?: string;
63
+ readonly resumable?: boolean;
64
+ readonly resumeGuidance?: string;
65
+ readonly ownerActiveElsewhere?: boolean;
66
+ }
67
+ export interface WorkflowRunAllTarget {
68
+ readonly all: true;
69
+ }
70
+ export interface WorkflowRunPauseOptions {
71
+ /** Pause one stage instead of the whole run. */
72
+ readonly stageId?: string;
73
+ }
74
+ export interface WorkflowRunResumeOptions {
75
+ /** Resume one paused stage instead of the whole run. */
76
+ readonly stageId?: string;
77
+ /** Message delivered to each resumed stage. */
78
+ readonly message?: string;
79
+ }
80
+ export type WorkflowRunControlStatus = "ok" | "running" | "paused" | "partial" | "noop" | "cancelled";
81
+ /** A run that a batch pause or quit could not stop; it may still be active. */
82
+ export interface WorkflowRunControlFailedRun {
83
+ readonly runId: string;
84
+ /** Machine-readable refusal, such as `not_found`, `no_active_stages` or `pause_failed`. */
85
+ readonly reason: string;
86
+ readonly message?: string;
87
+ }
88
+ /**
89
+ * The acknowledged result of a pause, quit or resume request, as the `workflow`
90
+ * tool reports it. `runId` is `--all` for a batch request. `noop` means the request was
91
+ * understood and found nothing to change; `partial` means only part of the
92
+ * request took effect. For a batch pause or quit, `failedRuns` names every run that
93
+ * could not be stopped, so a `partial` outcome is never a complete stop.
94
+ */
95
+ export interface WorkflowRunControlOutcome {
96
+ readonly action: "pause" | "quit" | "resume";
97
+ readonly runId: string;
98
+ readonly status: WorkflowRunControlStatus;
99
+ readonly message: string;
100
+ readonly stageId?: string;
101
+ readonly workflowStatus?: WorkflowRunStatus;
102
+ readonly abandoned?: boolean;
103
+ readonly failedRuns?: readonly WorkflowRunControlFailedRun[];
104
+ }
105
+ /** Typed run management for the workflow runs owned by one session. */
106
+ export interface SessionWorkflows {
107
+ listRuns(filter?: WorkflowRunListFilter): Promise<readonly WorkflowRunSummary[]>;
108
+ getRun(runId: string): Promise<WorkflowRunDetail>;
109
+ getStages(runId: string, filter?: WorkflowStageListFilter): Promise<readonly WorkflowRunStageSummary[]>;
110
+ pause(runId: string, options?: WorkflowRunPauseOptions): Promise<WorkflowRunControlOutcome>;
111
+ pause(target: WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome>;
112
+ quit(target: string | WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome>;
113
+ resume(runId: string, options?: WorkflowRunResumeOptions): Promise<WorkflowRunControlOutcome>;
114
+ }
115
+ export interface WorkflowRunControlRegistration {
116
+ dispose(): void;
117
+ }
118
+ export type WorkflowRunControlErrorCode = "WORKFLOW_RUN_NOT_FOUND" | "WORKFLOW_RUN_OWNED_ELSEWHERE" | "WORKFLOW_RUN_NOT_RESUMABLE" | "WORKFLOW_STAGE_NOT_FOUND" | "WORKFLOW_STAGE_AMBIGUOUS" | "WORKFLOW_STAGE_RESUME_UNSUPPORTED" | "WORKFLOW_RUN_DATABASE" | "WORKFLOW_RUN_CONTROL_FAILED" | "WORKFLOW_RUN_CONTROL_UNAVAILABLE";
119
+ export interface WorkflowRunControlErrorOptions extends ErrorOptions {
120
+ readonly runId?: string;
121
+ readonly failedRuns?: readonly WorkflowRunControlFailedRun[];
122
+ }
123
+ /** Base class for every failure reported by {@link SessionWorkflows}; branch on `code`. */
124
+ export declare class WorkflowRunControlError extends Error {
125
+ readonly code: WorkflowRunControlErrorCode;
126
+ readonly runId?: string;
127
+ /** Runs a batch pause or quit could not stop, when the whole batch was refused. */
128
+ readonly failedRuns?: readonly WorkflowRunControlFailedRun[];
129
+ constructor(code: WorkflowRunControlErrorCode, message: string, options?: WorkflowRunControlErrorOptions);
130
+ }
131
+ /** The run id is unknown, malformed, or an ambiguous prefix. */
132
+ export declare class WorkflowRunNotFoundError extends WorkflowRunControlError {
133
+ constructor(message: string, options?: WorkflowRunControlErrorOptions);
134
+ }
135
+ /** The run belongs to another session or is executing in another live Atomic process. */
136
+ export declare class WorkflowRunOwnershipError extends WorkflowRunControlError {
137
+ constructor(message: string, options?: WorkflowRunControlErrorOptions);
138
+ }
139
+ /** The run has no continuation to resume: it completed, was killed, or has no durable progress. */
140
+ export declare class WorkflowRunNotResumableError extends WorkflowRunControlError {
141
+ constructor(message: string, options?: WorkflowRunControlErrorOptions);
142
+ }
143
+ /** The stage identifier matches no stage or tool node of the run. */
144
+ export declare class WorkflowStageNotFoundError extends WorkflowRunControlError {
145
+ constructor(message: string, options?: WorkflowRunControlErrorOptions);
146
+ }
147
+ /** The stage identifier matches more than one stage or tool node; pass a more specific identifier. */
148
+ export declare class WorkflowStageAmbiguousError extends WorkflowRunControlError {
149
+ constructor(message: string, options?: WorkflowRunControlErrorOptions);
150
+ }
151
+ /** A durable run can only be resumed whole; resume it without a stage identifier. */
152
+ export declare class WorkflowStageResumeUnsupportedError extends WorkflowRunControlError {
153
+ constructor(message: string, options?: WorkflowRunControlErrorOptions);
154
+ }
155
+ /** Workflow durability (the run database) is unavailable, shut down, or failed. */
156
+ export declare class WorkflowRunDatabaseError extends WorkflowRunControlError {
157
+ constructor(message: string, options?: WorkflowRunControlErrorOptions);
158
+ }
159
+ /** The workflows extension is not loaded for this session, or the session was disposed. */
160
+ export declare class WorkflowRunControlUnavailableError extends WorkflowRunControlError {
161
+ constructor(message?: string, options?: WorkflowRunControlErrorOptions);
162
+ }
163
+ //# sourceMappingURL=workflow-run-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-control.d.ts","sourceRoot":"","sources":["../../../src/core/extensions/workflow-run-control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,MAAM,oBAAoB,GAC7B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,oBAAoB,EAAE,GAC/B,qBAAqB,CAAC;AAEzB,MAAM,WAAW,qBAAqB;IACrC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAAC;CACzD;AAED,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC;AAEjG,MAAM,WAAW,qBAAqB;IACrC,4FAA4F;IAC5F,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB;IACvC,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAED,MAAM,WAA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AAO,CAAC,EAAE,8BAA8B,EAGpE;CACD;AAED,mGAAmG;AACnG,qBAAa,4BAA6B,SAAQ,uBAAuB;IACxE,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B,EAGpE;CACD;AAED,qEAAqE;AACrE,qBAAa,0BAA2B,SAAQ,uBAAuB;IACtE,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B,EAGpE;CACD;AAED,sGAAsG;AACtG,qBAAa,2BAA4B,SAAQ,uBAAuB;IACvE,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B,EAGpE;CACD;AAED,qFAAqF;AACrF,qBAAa,mCAAoC,SAAQ,uBAAuB;IAC/E,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B,EAGpE;CACD;AAED,mFAAmF;AACnF,qBAAa,wBAAyB,SAAQ,uBAAuB;IACpE,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B,EAGpE;CACD;AAED,2FAA2F;AAC3F,qBAAa,kCAAmC,SAAQ,uBAAuB;IAC9E,YACC,OAAO,SAA0D,EACjE,OAAO,CAAC,EAAE,8BAA8B,EAIxC;CACD"}
@@ -0,0 +1,73 @@
1
+ /** Base class for every failure reported by {@link SessionWorkflows}; branch on `code`. */
2
+ export class WorkflowRunControlError extends Error {
3
+ code;
4
+ runId;
5
+ /** Runs a batch pause or quit could not stop, when the whole batch was refused. */
6
+ failedRuns;
7
+ constructor(code, message, options = {}) {
8
+ super(message, options);
9
+ this.name = "WorkflowRunControlError";
10
+ this.code = code;
11
+ if (options.runId !== undefined)
12
+ this.runId = options.runId;
13
+ if (options.failedRuns !== undefined)
14
+ this.failedRuns = options.failedRuns;
15
+ }
16
+ }
17
+ /** The run id is unknown, malformed, or an ambiguous prefix. */
18
+ export class WorkflowRunNotFoundError extends WorkflowRunControlError {
19
+ constructor(message, options) {
20
+ super("WORKFLOW_RUN_NOT_FOUND", message, options);
21
+ this.name = "WorkflowRunNotFoundError";
22
+ }
23
+ }
24
+ /** The run belongs to another session or is executing in another live Atomic process. */
25
+ export class WorkflowRunOwnershipError extends WorkflowRunControlError {
26
+ constructor(message, options) {
27
+ super("WORKFLOW_RUN_OWNED_ELSEWHERE", message, options);
28
+ this.name = "WorkflowRunOwnershipError";
29
+ }
30
+ }
31
+ /** The run has no continuation to resume: it completed, was killed, or has no durable progress. */
32
+ export class WorkflowRunNotResumableError extends WorkflowRunControlError {
33
+ constructor(message, options) {
34
+ super("WORKFLOW_RUN_NOT_RESUMABLE", message, options);
35
+ this.name = "WorkflowRunNotResumableError";
36
+ }
37
+ }
38
+ /** The stage identifier matches no stage or tool node of the run. */
39
+ export class WorkflowStageNotFoundError extends WorkflowRunControlError {
40
+ constructor(message, options) {
41
+ super("WORKFLOW_STAGE_NOT_FOUND", message, options);
42
+ this.name = "WorkflowStageNotFoundError";
43
+ }
44
+ }
45
+ /** The stage identifier matches more than one stage or tool node; pass a more specific identifier. */
46
+ export class WorkflowStageAmbiguousError extends WorkflowRunControlError {
47
+ constructor(message, options) {
48
+ super("WORKFLOW_STAGE_AMBIGUOUS", message, options);
49
+ this.name = "WorkflowStageAmbiguousError";
50
+ }
51
+ }
52
+ /** A durable run can only be resumed whole; resume it without a stage identifier. */
53
+ export class WorkflowStageResumeUnsupportedError extends WorkflowRunControlError {
54
+ constructor(message, options) {
55
+ super("WORKFLOW_STAGE_RESUME_UNSUPPORTED", message, options);
56
+ this.name = "WorkflowStageResumeUnsupportedError";
57
+ }
58
+ }
59
+ /** Workflow durability (the run database) is unavailable, shut down, or failed. */
60
+ export class WorkflowRunDatabaseError extends WorkflowRunControlError {
61
+ constructor(message, options) {
62
+ super("WORKFLOW_RUN_DATABASE", message, options);
63
+ this.name = "WorkflowRunDatabaseError";
64
+ }
65
+ }
66
+ /** The workflows extension is not loaded for this session, or the session was disposed. */
67
+ export class WorkflowRunControlUnavailableError extends WorkflowRunControlError {
68
+ constructor(message = "Workflow run control is unavailable for this session.", options) {
69
+ super("WORKFLOW_RUN_CONTROL_UNAVAILABLE", message, options);
70
+ this.name = "WorkflowRunControlUnavailableError";
71
+ }
72
+ }
73
+ //# sourceMappingURL=workflow-run-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-control.js","sourceRoot":"","sources":["../../../src/core/extensions/workflow-run-control.ts"],"names":[],"mappings":"AA8JA,2FAA2F;AAC3F,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACxC,IAAI,CAA8B;IAClC,KAAK,CAAU;IACxB,mFAAmF;IAC1E,UAAU,CAA0C;IAE7D,YAAY,IAAiC,EAAE,OAAe,EAAE,OAAO,GAAmC,EAAE;QAC3G,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS;YAAE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5D,IAAI,OAAO,CAAC,UAAU,KAAK,SAAS;YAAE,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAC5E,CAAC;CACD;AAED,gEAAgE;AAChE,MAAM,OAAO,wBAAyB,SAAQ,uBAAuB;IACpE,YAAY,OAAe,EAAE,OAAwC;QACpE,KAAK,CAAC,wBAAwB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACxC,CAAC;CACD;AAED,yFAAyF;AACzF,MAAM,OAAO,yBAA0B,SAAQ,uBAAuB;IACrE,YAAY,OAAe,EAAE,OAAwC;QACpE,KAAK,CAAC,8BAA8B,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IACzC,CAAC;CACD;A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AI,CAAC,IAAI,GAAG,oCAAoC,CAAC;IAClD,CAAC;CACD","sourcesContent":["import type { WorkflowRunStatus, WorkflowStageStatus } from \"./workflow-events.js\";\n\nexport type WorkflowRunJsonValue =\n\t| string\n\t| number\n\t| boolean\n\t| null\n\t| readonly WorkflowRunJsonValue[]\n\t| WorkflowRunJsonObject;\n\nexport interface WorkflowRunJsonObject {\n\treadonly [key: string]: WorkflowRunJsonValue | undefined;\n}\n\nexport type WorkflowRunFilterStatus = WorkflowRunStatus | WorkflowStageStatus | \"awaiting_input\";\n\nexport interface WorkflowRunListFilter {\n\t/** Run statuses match directly; `awaiting_input` selects runs with an unanswered prompt. */\n\treadonly status?: WorkflowRunFilterStatus;\n}\n\nexport interface WorkflowStageListFilter {\n\treadonly status?: WorkflowStageStatus;\n}\n\nexport interface WorkflowRunActiveStage {\n\treadonly stageId: string;\n\treadonly name: string;\n\treadonly status: WorkflowStageStatus;\n}\n\nexport interface WorkflowRunAwaitingInput {\n\treadonly stageId?: string;\n\treadonly stageName?: string;\n\treadonly promptId?: string;\n\treadonly promptKind?: string;\n\treadonly message?: string;\n}\n\n/** The concise per-run data that the `workflow` tool's `status` action lists. */\nexport interface WorkflowRunSummary {\n\treadonly runId: string;\n\treadonly name: string;\n\treadonly status: WorkflowRunStatus;\n\treadonly startedAt: number;\n\treadonly endedAt?: number;\n\treadonly elapsedMs: number;\n\treadonly activeStages: readonly WorkflowRunActiveStage[];\n\treadonly awaitingInputCount: number;\n\treadonly awaitingInput: readonly WorkflowRunAwaitingInput[];\n\treadonly exitReason?: string;\n\treadonly error?: string;\n}\n\nexport interface WorkflowRunStageSummary {\n\treadonly id: string;\n\treadonly name: string;\n\treadonly status: WorkflowStageStatus;\n\treadonly sessionId?: string;\n\treadonly error?: string;\n\treadonly skippedReason?: string;\n\treadonly awaitingInputSince?: number;\n}\n\n/** The per-run detail that the `workflow` tool's `status` action returns for one run id. */\nexport interface WorkflowRunDetail {\n\treadonly runId: string;\n\treadonly rootRunId?: string;\n\treadonly name: string;\n\treadonly status: WorkflowRunStatus | \"crashed\";\n\treadonly startedAt: number;\n\treadonly endedAt?: number;\n\treadonly durationMs?: number;\n\treadonly inputs: WorkflowRunJsonObject;\n\treadonly stages: readonly WorkflowRunStageSummary[];\n\treadonly result?: WorkflowRunJsonObject;\n\treadonly error?: string;\n\treadonly exitReason?: string;\n\treadonly resumable?: boolean;\n\treadonly resumeGuidance?: string;\n\treadonly ownerActiveElsewhere?: boolean;\n}\n\nexport interface WorkflowRunAllTarget {\n\treadonly all: true;\n}\n\nexport interface WorkflowRunPauseOptions {\n\t/** Pause one stage instead of the whole run. */\n\treadonly stageId?: string;\n}\n\nexport interface WorkflowRunResumeOptions {\n\t/** Resume one paused stage instead of the whole run. */\n\treadonly stageId?: string;\n\t/** Message delivered to each resumed stage. */\n\treadonly message?: string;\n}\n\nexport type WorkflowRunControlStatus = \"ok\" | \"running\" | \"paused\" | \"partial\" | \"noop\" | \"cancelled\";\n\n/** A run that a batch pause or quit could not stop; it may still be active. */\nexport interface WorkflowRunControlFailedRun {\n\treadonly runId: string;\n\t/** Machine-readable refusal, such as `not_found`, `no_active_stages` or `pause_failed`. */\n\treadonly reason: string;\n\treadonly message?: string;\n}\n\n/**\n * The acknowledged result of a pause, quit or resume request, as the `workflow`\n * tool reports it. `runId` is `--all` for a batch request. `noop` means the request was\n * understood and found nothing to change; `partial` means only part of the\n * request took effect. For a batch pause or quit, `failedRuns` names every run that\n * could not be stopped, so a `partial` outcome is never a complete stop.\n */\nexport interface WorkflowRunControlOutcome {\n\treadonly action: \"pause\" | \"quit\" | \"resume\";\n\treadonly runId: string;\n\treadonly status: WorkflowRunControlStatus;\n\treadonly message: string;\n\treadonly stageId?: string;\n\treadonly workflowStatus?: WorkflowRunStatus;\n\treadonly abandoned?: boolean;\n\treadonly failedRuns?: readonly WorkflowRunControlFailedRun[];\n}\n\n/** Typed run management for the workflow runs owned by one session. */\nexport interface SessionWorkflows {\n\tlistRuns(filter?: WorkflowRunListFilter): Promise<readonly WorkflowRunSummary[]>;\n\tgetRun(runId: string): Promise<WorkflowRunDetail>;\n\tgetStages(runId: string, filter?: WorkflowStageListFilter): Promise<readonly WorkflowRunStageSummary[]>;\n\tpause(runId: string, options?: WorkflowRunPauseOptions): Promise<WorkflowRunControlOutcome>;\n\tpause(target: WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome>;\n\tquit(target: string | WorkflowRunAllTarget): Promise<WorkflowRunControlOutcome>;\n\tresume(runId: string, options?: WorkflowRunResumeOptions): Promise<WorkflowRunControlOutcome>;\n}\n\nexport interface WorkflowRunControlRegistration {\n\tdispose(): void;\n}\n\nexport type WorkflowRunControlErrorCode =\n\t| \"WORKFLOW_RUN_NOT_FOUND\"\n\t| \"WORKFLOW_RUN_OWNED_ELSEWHERE\"\n\t| \"WORKFLOW_RUN_NOT_RESUMABLE\"\n\t| \"WORKFLOW_STAGE_NOT_FOUND\"\n\t| \"WORKFLOW_STAGE_AMBIGUOUS\"\n\t| \"WORKFLOW_STAGE_RESUME_UNSUPPORTED\"\n\t| \"WORKFLOW_RUN_DATABASE\"\n\t| \"WORKFLOW_RUN_CONTROL_FAILED\"\n\t| \"WORKFLOW_RUN_CONTROL_UNAVAILABLE\";\n\nexport interface WorkflowRunControlErrorOptions extends ErrorOptions {\n\treadonly runId?: string;\n\treadonly failedRuns?: readonly WorkflowRunControlFailedRun[];\n}\n\n/** Base class for every failure reported by {@link SessionWorkflows}; branch on `code`. */\nexport class WorkflowRunControlError extends Error {\n\treadonly code: WorkflowRunControlErrorCode;\n\treadonly runId?: string;\n\t/** Runs a batch pause or quit could not stop, when the whole batch was refused. */\n\treadonly failedRuns?: readonly WorkflowRunControlFailedRun[];\n\n\tconstructor(code: WorkflowRunControlErrorCode, message: string, options: WorkflowRunControlErrorOptions = {}) {\n\t\tsuper(message, options);\n\t\tthis.name = \"WorkflowRunControlError\";\n\t\tthis.code = code;\n\t\tif (options.runId !== undefined) this.runId = options.runId;\n\t\tif (options.failedRuns !== undefined) this.failedRuns = options.failedRuns;\n\t}\n}\n\n/** The run id is unknown, malformed, or an ambiguous prefix. */\nexport class WorkflowRunNotFoundError extends WorkflowRunControlError {\n\tconstructor(message: string, options?: WorkflowRunControlErrorOptions) {\n\t\tsuper(\"WORKFLOW_RUN_NOT_FOUND\", message, options);\n\t\tthis.name = \"WorkflowRunNotFoundError\";\n\t}\n}\n\n/** The run belongs to another session or is executing in another live Atomic process. */\nexport class WorkflowRunOwnershipError extends WorkflowRunControlError {\n\tconstructor(message: string, options?: WorkflowRunControlErrorOptions) {\n\t\tsuper(\"WORKFLOW_RUN_OWNED_ELSEWHERE\", message, options);\n\t\tthis.name = \"WorkflowRunOwnershipError\";\n\t}\n}\n\n/** The run has no continuation to resume: it completed, was killed, or has no durable progress. */\nexport class WorkflowRunNotResumableError extends WorkflowRunControlError {\n\tconstructor(message: string, options?: WorkflowRunControlErrorOptions) {\n\t\tsuper(\"WORKFLOW_RUN_NOT_RESUMABLE\", message, options);\n\t\tthis.name = \"WorkflowRunNotResumableError\";\n\t}\n}\n\n/** The stage identifier matches no stage or tool node of the run. */\nexport class WorkflowStageNotFoundError extends WorkflowRunControlError {\n\tconstructor(message: string, options?: WorkflowRunControlErrorOptions) {\n\t\tsuper(\"WORKFLOW_STAGE_NOT_FOUND\", message, options);\n\t\tthis.name = \"WorkflowStageNotFoundError\";\n\t}\n}\n\n/** The stage identifier matches more than one stage or tool node; pass a more specific identifier. */\nexport class WorkflowStageAmbiguousError extends WorkflowRunControlError {\n\tconstructor(message: string, options?: WorkflowRunControlErrorOptions) {\n\t\tsuper(\"WORKFLOW_STAGE_AMBIGUOUS\", message, options);\n\t\tthis.name = \"WorkflowStageAmbiguousError\";\n\t}\n}\n\n/** A durable run can only be resumed whole; resume it without a stage identifier. */\nexport class WorkflowStageResumeUnsupportedError extends WorkflowRunControlError {\n\tconstructor(message: string, options?: WorkflowRunControlErrorOptions) {\n\t\tsuper(\"WORKFLOW_STAGE_RESUME_UNSUPPORTED\", message, options);\n\t\tthis.name = \"WorkflowStageResumeUnsupportedError\";\n\t}\n}\n\n/** Workflow durability (the run database) is unavailable, shut down, or failed. */\nexport class WorkflowRunDatabaseError extends WorkflowRunControlError {\n\tconstructor(message: string, options?: WorkflowRunControlErrorOptions) {\n\t\tsuper(\"WORKFLOW_RUN_DATABASE\", message, options);\n\t\tthis.name = \"WorkflowRunDatabaseError\";\n\t}\n}\n\n/** The workflows extension is not loaded for this session, or the session was disposed. */\nexport class WorkflowRunControlUnavailableError extends WorkflowRunControlError {\n\tconstructor(\n\t\tmessage = \"Workflow run control is unavailable for this session.\",\n\t\toptions?: WorkflowRunControlErrorOptions,\n\t) {\n\t\tsuper(\"WORKFLOW_RUN_CONTROL_UNAVAILABLE\", message, options);\n\t\tthis.name = \"WorkflowRunControlUnavailableError\";\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mandatory-resource-loader.d.ts","sourceRoot":"","sources":["../../src/core/mandatory-resource-loader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEX,cAAc,EAGd,MAAM,4BAA4B,CAAC;AA2KpC,4FAA4F;AAC5F,wBAAsB,2BAA2B,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAI9G;AAED,kGAAkG;AAClG,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAEzE;AAED,sFAAsF;AACtF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAEzE;AAED,6EAA6E;AAC7E,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAE9F"}
1
+ {"version":3,"file":"mandatory-resource-loader.d.ts","sourceRoot":"","sources":["../../src/core/mandatory-resource-loader.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEX,cAAc,EAGd,MAAM,4BAA4B,CAAC;AAuLpC,4FAA4F;AAC5F,wBAAsB,2BAA2B,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAI9G;AAED,kGAAkG;AAClG,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAEzE;AAED,sFAAsF;AACtF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAEzE;AAED,6EAA6E;AAC7E,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAE9F"}
@@ -47,6 +47,15 @@ class MandatoryResourceLoader {
47
47
  getExtensions() {
48
48
  return this.extensionsResult;
49
49
  }
50
+ getWorkflowResources() {
51
+ return this.delegate.getWorkflowResources?.() ?? [];
52
+ }
53
+ async refreshWorkflowResources() {
54
+ return (await this.delegate.refreshWorkflowResources?.()) ?? this.getWorkflowResources();
55
+ }
56
+ getMcpServerContributions() {
57
+ return this.delegate.getMcpServerContributions?.() ?? [];
58
+ }
50
59
  async createSessionLoader() {
51
60
  const scope = sessionLifecycleCreation.getStore().scope;
52
61
  if (sessionLifecycleScopes.get(this.extensionsResult.runtime) === scope)