zidane 6.1.3 → 6.1.5

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 (76) hide show
  1. package/dist/{acp-BMmqUG_U.js → acp-D-k-L0DX.js} +2 -2
  2. package/dist/{acp-BMmqUG_U.js.map → acp-D-k-L0DX.js.map} +1 -1
  3. package/dist/acp-cli.js +2 -2
  4. package/dist/acp.d.ts +1 -1
  5. package/dist/acp.js +1 -1
  6. package/dist/{agent-Dm-ihe-r.js → agent-BJ1NC1pA.js} +48 -9
  7. package/dist/agent-BJ1NC1pA.js.map +1 -0
  8. package/dist/agent.d.ts +1 -1
  9. package/dist/agent.js +1 -1
  10. package/dist/chat/pure.d.ts +3 -3
  11. package/dist/chat.d.ts +11 -5
  12. package/dist/chat.d.ts.map +1 -1
  13. package/dist/chat.js +2 -2
  14. package/dist/contexts/daytona.d.ts +1 -1
  15. package/dist/contexts/e2b.d.ts +1 -1
  16. package/dist/eval.d.ts +1 -1
  17. package/dist/extensions.d.ts +2 -2
  18. package/dist/extensions.js +1 -1
  19. package/dist/generate-data-WL_yGVL6.js.map +1 -1
  20. package/dist/headless.d.ts +1 -1
  21. package/dist/headless.js +1 -1
  22. package/dist/{index-C6Il4kBD.d.ts → index-DFjn8nA3.d.ts} +199 -8
  23. package/dist/index-DFjn8nA3.d.ts.map +1 -0
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.js +3 -3
  26. package/dist/{login-DZLG__2f.js → login-DhnmYiia.js} +16 -8
  27. package/dist/{login-DZLG__2f.js.map → login-DhnmYiia.js.map} +1 -1
  28. package/dist/{mcp-CcvuVXB9.js → mcp-CkHUripi.js} +61 -4
  29. package/dist/mcp-CkHUripi.js.map +1 -0
  30. package/dist/mcp.d.ts +1 -1
  31. package/dist/mcp.js +1 -1
  32. package/dist/output/stream-json.d.ts +1 -1
  33. package/dist/output/terminal.d.ts +1 -1
  34. package/dist/presets.d.ts +1 -1
  35. package/dist/presets.js +1 -1
  36. package/dist/providers/anthropic.d.ts +1 -1
  37. package/dist/providers/arcee.d.ts +1 -1
  38. package/dist/providers/baseten.d.ts +1 -1
  39. package/dist/providers/cerebras.d.ts +1 -1
  40. package/dist/providers/local.d.ts +1 -1
  41. package/dist/providers/openai-compat.d.ts +1 -1
  42. package/dist/providers/openai.d.ts +1 -1
  43. package/dist/providers/openrouter.d.ts +1 -1
  44. package/dist/providers/xai.d.ts +1 -1
  45. package/dist/providers.d.ts +1 -1
  46. package/dist/restate.d.ts +1 -1
  47. package/dist/session/sqlite.d.ts +1 -1
  48. package/dist/session.d.ts +1 -1
  49. package/dist/skills.d.ts +1 -1
  50. package/dist/{tool-formatters-ETbcC9DM.d.ts → tool-formatters-D4BjDBC2.d.ts} +60 -3
  51. package/dist/tool-formatters-D4BjDBC2.d.ts.map +1 -0
  52. package/dist/tools/fetch-url.d.ts +1 -1
  53. package/dist/tools/web-search.d.ts +1 -1
  54. package/dist/tools.d.ts +2 -2
  55. package/dist/tools.js +1 -1
  56. package/dist/{transcript-anchors-CVQ4AOWj.js → transcript-anchors-CYhIMDgQ.js} +16 -5
  57. package/dist/transcript-anchors-CYhIMDgQ.js.map +1 -0
  58. package/dist/{transcript-anchors-e_30Kvk0.d.ts → transcript-anchors-Cg6zkNiA.d.ts} +2 -2
  59. package/dist/{transcript-anchors-e_30Kvk0.d.ts.map → transcript-anchors-Cg6zkNiA.d.ts.map} +1 -1
  60. package/dist/tui.d.ts +26 -5
  61. package/dist/tui.d.ts.map +1 -1
  62. package/dist/tui.js +661 -66
  63. package/dist/tui.js.map +1 -1
  64. package/dist/{turn-operations-D-aaiUOo.d.ts → turn-operations-l1mife2u.d.ts} +4 -61
  65. package/dist/turn-operations-l1mife2u.d.ts.map +1 -0
  66. package/dist/types.d.ts +1 -1
  67. package/docs/EXTENSIONS.md +5 -2
  68. package/docs/INTERACTIONS.md +5 -1
  69. package/docs/TUI.md +2 -1
  70. package/package.json +1 -1
  71. package/dist/agent-Dm-ihe-r.js.map +0 -1
  72. package/dist/index-C6Il4kBD.d.ts.map +0 -1
  73. package/dist/mcp-CcvuVXB9.js.map +0 -1
  74. package/dist/tool-formatters-ETbcC9DM.d.ts.map +0 -1
  75. package/dist/transcript-anchors-CVQ4AOWj.js.map +0 -1
  76. package/dist/turn-operations-D-aaiUOo.d.ts.map +0 -1
package/dist/agent.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { Af as ReadStateMap, Ar as RunSummaryCollectorOptions, Bi as McpToolWrap, Ci as CacheDimensionName, Di as installCacheBreakLogger, Dr as RunSummaryBudget, Ei as fnv1a32, Er as RunSummaryBlock, Ff as readStateKey, Fi as AgentHookMap, Fr as createRunSummaryCollector, If as resolveReadStateMap, Ii as AgentHooks, Li as AgentOptions, Mr as RunSummaryRepeatGuard, Nf as hydrateReadStateFromSession, Nr as RunSummaryTokens, Of as HydrateReadStateOptions, Oi as snapshotCacheDimensions, Or as RunSummaryByModel, Pf as hydrateReadStateFromSessionAsync, Pi as Agent, Pr as RunSummaryValidation, Ri as McpConnector, Si as CacheDimensionDiff, Ti as diffCacheDimensions, Tr as RunSummary, Vi as createAgent, jf as getReadState, jr as RunSummaryError, kf as ReadStateEntry, kr as RunSummaryCollector, wi as CacheDimensionSnapshot, xi as CacheBreakLoggerOptions, zi as McpToolMeta } from "./index-C6Il4kBD.js";
1
+ import { Ar as RunSummaryCollectorOptions, Bi as McpToolWrap, Ci as CacheDimensionName, Di as installCacheBreakLogger, Dr as RunSummaryBudget, Ei as fnv1a32, Er as RunSummaryBlock, Fi as AgentHookMap, Fr as createRunSummaryCollector, Hf as hydrateReadStateFromSessionAsync, If as HydrateReadStateOptions, Ii as AgentHooks, Lf as ReadStateEntry, Li as AgentOptions, Mr as RunSummaryRepeatGuard, Nr as RunSummaryTokens, Oi as snapshotCacheDimensions, Or as RunSummaryByModel, Pi as Agent, Pr as RunSummaryValidation, Rf as ReadStateMap, Ri as McpConnector, Si as CacheDimensionDiff, Ti as diffCacheDimensions, Tr as RunSummary, Uf as readStateKey, Vf as hydrateReadStateFromSession, Vi as createAgent, Wf as resolveReadStateMap, jr as RunSummaryError, kr as RunSummaryCollector, wi as CacheDimensionSnapshot, xi as CacheBreakLoggerOptions, zf as getReadState, zi as McpToolMeta } from "./index-DFjn8nA3.js";
2
2
  export { type Agent, type AgentHookMap, type AgentHooks, type AgentOptions, type CacheBreakLoggerOptions, type CacheDimensionDiff, type CacheDimensionName, type CacheDimensionSnapshot, type HydrateReadStateOptions, type McpConnector, type McpToolMeta, type McpToolWrap, type ReadStateEntry, type ReadStateMap, type RunSummary, type RunSummaryBlock, type RunSummaryBudget, type RunSummaryByModel, type RunSummaryCollector, type RunSummaryCollectorOptions, type RunSummaryError, type RunSummaryRepeatGuard, type RunSummaryTokens, type RunSummaryValidation, createAgent, createRunSummaryCollector, diffCacheDimensions, fnv1a32, getReadState, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, installCacheBreakLogger, readStateKey, resolveReadStateMap, snapshotCacheDimensions };
package/dist/agent.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as hydrateReadStateFromSessionAsync, c as resolveReadStateMap, i as hydrateReadStateFromSession, s as readStateKey, t as getReadState } from "./read-state-Dq_TXUX1.js";
2
- import { t as createAgent } from "./agent-Dm-ihe-r.js";
2
+ import { t as createAgent } from "./agent-BJ1NC1pA.js";
3
3
  import { i as snapshotCacheDimensions, n as fnv1a32, r as installCacheBreakLogger, t as diffCacheDimensions } from "./cache-telemetry-BKAwsNxm.js";
4
4
  import { t as createRunSummaryCollector } from "./run-summary-nD3IQ4ZQ.js";
5
5
  export { createAgent, createRunSummaryCollector, diffCacheDimensions, fnv1a32, getReadState, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, installCacheBreakLogger, readStateKey, resolveReadStateMap, snapshotCacheDimensions };
@@ -1,4 +1,4 @@
1
- import { Bc as collectReferences, Fc as CompletionItem, Hc as mergeReferences, Ic as CompletionProvider, Lc as CompletionReference, Nc as ActiveTrigger, Pc as CompletionContext, Vc as findActiveTrigger, _d as ContextUsageSplit, ad as ContextBreakdown, cd as ContextBreakdownOptions, dd as ContextExactCounts, fd as ContextExtensionRow, gd as ContextSnapshot, hd as ContextMcpGroup, ld as ContextCategory, md as ContextItem, od as ContextBreakdownContributionContext, pd as ContextExtensionSection, sd as ContextBreakdownContributor, ud as ContextCategoryId, vd as buildContextBreakdown, zc as applyInsert } from "../index-C6Il4kBD.js";
2
- import { $ as createSkillsCompletionProvider, A as InlineSegment, B as splitLines, C as shortId, D as EditSummary, E as EditHunkSummary, F as computeInlineDiff, H as tokenize, I as computeLineDiff, L as extractEditPayload, M as applyEditPayload, N as buildContextualDiff, O as HunkResolution, P as buildUnifiedDiff, Q as SKILLS_TRIGGER, R as filetypeFromPath, S as previewLine, T as DiffOp, V as summarizeEditPayload, Z as summarizeOutcomes, _ as fmtCost, a as MAX_TRANSCRIPT_EVENTS, b as formatTaskStatus, c as finalizeStreamingMarkdown, ct as ChatReferenceData, d as CatalogEntry, dt as chatReferenceTokensFromText, et as uniqueSkillNamesFromReferences, f as buildModelCatalog, ft as createChatsCompletionProvider, g as compactPath, h as ageString, ht as buildLinearRamp, i as turnAsText, j as PreviewResult, k as InlineDiff, l as finalizeStreamingMarkdownForOwner, lt as ChatReferenceEntry, m as indexOfEntry, mt as blendHsl, n as deleteTurnSafely, nt as createFilesCompletionProvider, o as TRANSCRIPT_TRIM_TO_EVENTS, p as filterModelCatalog, pt as uniqueChatIdsFromReferences, r as truncateTurnsAt, rt as uniqueFilesFromReferences, s as capTranscriptEvents, st as CHATS_TRIGGER, t as countNeighbors, tt as FILES_TRIGGER, u as turnContextSize, ut as ChatReferenceScope, v as fmtTokens, w as DiffLine, x as formatTaskSummary, y as formatDuration, z as previewEditPayload } from "../turn-operations-D-aaiUOo.js";
3
- import { C as isTurnHighlighted, E as turnSelectionOwnership, S as isEditErrorResult, T as selectableTurnIds, a as formatToolCall, c as splitPromptSegments, d as chunkMarkdownForRender, f as normalizeMarkdownCodeFences, i as displayNameFor, l as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, n as ToolDisplayMeta, o as PromptSegment, p as splitMarkdownCodeBlocks, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as MarkdownSegment, w as isVisible, x as EDIT_TOOL_NAMES } from "../tool-formatters-ETbcC9DM.js";
1
+ import { Bc as CompletionProvider, Cd as ContextMcpGroup, Ed as buildContextBreakdown, Gc as findActiveTrigger, Kc as mergeReferences, Lc as ActiveTrigger, Rc as CompletionContext, Sd as ContextItem, Td as ContextUsageSplit, Uc as applyInsert, Vc as CompletionReference, Wc as collectReferences, _d as ContextCategory, bd as ContextExtensionRow, gd as ContextBreakdownOptions, hd as ContextBreakdownContributor, md as ContextBreakdownContributionContext, pd as ContextBreakdown, vd as ContextCategoryId, wd as ContextSnapshot, xd as ContextExtensionSection, yd as ContextExactCounts, zc as CompletionItem } from "../index-DFjn8nA3.js";
2
+ import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, I as splitLines, J as SKILLS_TRIGGER, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as ChatReferenceEntry, b as DiffLine, c as finalizeStreamingMarkdown, ct as createChatsCompletionProvider, d as ageString, dt as buildLinearRamp, f as compactPath, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as ChatReferenceData, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as uniqueChatIdsFromReferences, m as fmtTokens, n as deleteTurnSafely, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceScope, p as fmtCost, q as summarizeOutcomes, r as truncateTurnsAt, rt as CHATS_TRIGGER, s as capTranscriptEvents, st as chatReferenceTokensFromText, t as countNeighbors, u as turnContextSize, ut as blendHsl, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId } from "../turn-operations-l1mife2u.js";
3
+ import { A as turnSelectionOwnership, D as isTurnHighlighted, E as isEditErrorResult, O as isVisible, T as EDIT_TOOL_NAMES, _ as splitMarkdownCodeBlocks, a as formatToolCall, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, k as selectableTurnIds, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as buildModelCatalog } from "../tool-formatters-D4BjDBC2.js";
4
4
  export { type ActiveTrigger, CHATS_TRIGGER, type CatalogEntry, type ChatReferenceData, type ChatReferenceEntry, type ChatReferenceScope, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextItem, type ContextMcpGroup, type ContextSnapshot, type ContextUsageSplit, type DiffLine, type DiffOp, EDIT_TOOL_NAMES, type EditHunkSummary, type EditSummary, FILES_TRIGGER, type HunkResolution, type InlineDiff, type InlineSegment, MARKDOWN_RENDER_CHUNK_TARGET_BYTES, MAX_TRANSCRIPT_EVENTS, type MarkdownSegment, type PreviewResult, type PromptSegment, type PromptSegmentRef, SKILLS_TRIGGER, TOOL_DISPLAY, TRANSCRIPT_TRIM_TO_EVENTS, type ToolDisplayMeta, type ToolFormatLine, ageString, applyEditPayload, applyInsert, blendHsl, buildContextBreakdown, buildContextualDiff, buildLinearRamp, buildModelCatalog, buildUnifiedDiff, capTranscriptEvents, chatReferenceTokensFromText, chunkMarkdownForRender, collectReferences, compactPath, computeInlineDiff, computeLineDiff, countNeighbors, createChatsCompletionProvider, createFilesCompletionProvider, createSkillsCompletionProvider, deleteTurnSafely, displayNameFor, extractEditPayload, filetypeFromPath, filterModelCatalog, finalizeStreamingMarkdown, finalizeStreamingMarkdownForOwner, findActiveTrigger, fmtCost, fmtTokens, formatDuration, formatTaskStatus, formatTaskSummary, formatToolCall, indexOfEntry, isEditErrorResult, isTurnHighlighted, isVisible, mergeReferences, normalizeMarkdownCodeFences, previewEditPayload, previewLine, selectableTurnIds, shortId, splitLines, splitMarkdownCodeBlocks, splitPromptSegments, summarizeEditPayload, summarizeOutcomes, tokenize, truncateTurnsAt, turnAsText, turnContextSize, turnSelectionOwnership, uniqueChatIdsFromReferences, uniqueFilesFromReferences, uniqueSkillNamesFromReferences };
package/dist/chat.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { $a as ExtensionBehaviorTransform, $c as commandSteps, $l as AgentRegistry, $u as AUTO_COMPACT_MIN_GROWTH_FRACTION, Ac as resolveTheme, Al as serializeInteractionResponse, Au as AuthMethod, Bc as collectReferences, Bo as GuiContributions, Bu as cerebrasDescriptor, Ca as scanExtensionDirectories, Cc as SyntaxStyles, Cd as AutoCompact, Cl as SelectQuestion, Co as ExtensionRuntimeEnv, Cu as chainPositionOf, Dc as ThemeSelect, Dl as isInteractionTool, Do as ExtensionStorageScope, Du as restoreChainFallbacks, Ec as ThemeColors, Ef as ToolDef, El as createInteractionTools, Eo as ExtensionSource, Eu as providerKeySetChanged, Fc as CompletionItem, Fi as AgentHookMap, Fo as ExtensionToolResultMetadataRegistration, Fu as CustomField, Gc as CommandAgentResult, Gi as buildExtensionRegistry, Gu as localDescriptor, H as McpCredentialStore, Hc as mergeReferences, Hf as SkillsConfig, Hi as BuildExtensionRegistryOptions, Ho as TuiContributions, Hu as enabledModelOptions, Ic as CompletionProvider, Id as McpToolSchema, Ii as AgentHooks, Iu as ModelInfo, Jc as CommandInvocation, Jf as SessionStore, Ji as filterExtensionRegistry, Ju as modelsForDescriptor, Kc as CommandExecution, Ki as composeExtensionPreset, Ku as modelOptionsFor, Lc as CompletionReference, Lu as ModelOption, Mc as useCompletion, Ml as useInteractionsQueue, Mu as ProviderKey, Nc as ActiveTrigger, Nu as detectAuth, Oc as ThemeSurfaces, Ol as makeRequestInteraction, Oo as ExtensionStorageSurface, Ou as sanitizeModelChain, Pc as CompletionContext, Pd as McpServerConfig, Pu as BUILTIN_PROVIDERS, Qa as ExtensionApiVersion, Qc as CommandStepFn, Ql as AgentProfile, Qu as restoreModelOptions, Rf as SkillConfig, Ru as ProviderDescriptor, Sc as DEFAULT_THEME, Sl as QuestionType, So as ExtensionRunTransform, Su as buildRunModel, Tc as Theme, Tl as buildResumedToolResultsTurn, To as ExtensionSkillPolicy, Tu as filterChainFallbacks, Uu as getContextWindow, V as McpCredentialEntry, Vc as findActiveTrigger, Vo as LoadedExtension, Vu as credKeyOf, Wc as Command, Wf as Session, Wi as buildExtensionPreset, Wu as getModelInfo, Xc as CommandStep, Xi as partitionExtensionCatalog, Xu as openrouterDescriptor, Yc as CommandOutputBlock, Yi as mergeContributions, Ys as SourcedScanPath, Yu as openaiDescriptor, Za as EMPTY_EXTENSION_REGISTRY, Zc as CommandStepContext, Zl as AgentAccent, Zu as piIdOf, _d as ContextUsageSplit, _l as Question, _o as ExtensionPaths, _u as SessionMeta, ad as ContextBreakdown, al as CreateInteractionToolsOptions, au as PLAN_AGENT, ba as inlineLoadedExtension, bc as ChipColor, bi as generateStructuredData, bl as QuestionRequest, bo as ExtensionProviderMiddleware, bu as ToolCallDisplay, cd as ContextBreakdownOptions, cl as InteractionsActions, co as ExtensionGuiPanel, cu as singleAgentRegistry, dd as ContextExactCounts, dl as PendingInteractionEntry, do as ExtensionKeybindingDispatchContext, du as EditOutcome, ed as AutoCompactDecision, el as executeCommand, eo as ExtensionCapability, eu as BUILD_AGENT, fd as ContextExtensionRow, fl as PlanDecision, fo as ExtensionManifest, fu as EditOutcomeKind, gd as ContextSnapshot, gl as PlanStep, go as ExtensionOrderedContribution, gu as Screen, hd as ContextMcpGroup, hl as PlanResponse, hu as Picked, id as shouldAutoCompact, if as SessionTurn, il as ConfirmQuestion, iu as DEFAULT_PERSIST_EXCLUDE_TOOLS, jc as CompletionState, jl as useInteractionsActions, ju as ProviderAuth, ka as defineExtension, kc as resolveChipColor, kl as pendingInteractionsFromTurns, ko as ExtensionToolCatalogTransform, kp as Provider, ku as toggleChainEntry, ld as ContextCategory, ll as InteractionsProvider, lu as EditDiffDisplay, md as ContextItem, ml as PlanRequest, mo as ExtensionModal, mu as Owner, nd as OUTPUT_RESERVE_TOKENS, nl as ASK_USER_TOOL, nu as DEFAULT_AGENT_ID, od as ContextBreakdownContributionContext, ol as InteractionRequest, oo as ExtensionDefinition, ou as accentColor, pd as ContextExtensionSection, pl as PlanPayload, po as ExtensionMcpConfigTransform, pu as EditPayload, qi as disposeExtensionRegistry, qu as modelSupportsReasoning, rd as effectiveContextWindow, rl as AnswerValue, ro as ExtensionContributions, ru as DEFAULT_BUDGET_EXCLUDE_TOOLS, sd as ContextBreakdownContributor, sl as InteractionResponse, so as ExtensionFooterHint, su as resolveAgentId, t as Preset, td as AutoCompactInput, tl as parseCommandInvocation, to as ExtensionContext, tu as BUILTIN_AGENTS, ud as ContextCategoryId, ul as PRESENT_PLAN_TOOL, uo as ExtensionKeybinding, uu as EditHunk, va as defaultExtensionScanPaths, vd as buildContextBreakdown, vl as QuestionChoice, vo as ExtensionPermission, vu as Settings, wc as SyntaxTokenStyle, wl as TextQuestion, wo as ExtensionSessionStateSurface, wu as chainsEqual, xc as ChipColorMap, xl as QuestionResponse, xo as ExtensionRegistry, xu as ModelChainEntry, ya as discoverExtensions, yc as BUILTIN_THEMES, yi as GenerateStructuredDataOptions, yl as QuestionPayload, yu as StreamEvent, zc as applyInsert, zu as anthropicDescriptor } from "./index-C6Il4kBD.js";
2
- import { $ as KEYBINDING_KEY_COL_WIDTH, A as resolveStorageDirs, B as loadState, C as ResolvedPaths, D as StorageDirs, E as ResolveStorageDirsOptions, F as createStateStore, G as titleFromTurns, H as saveState, I as deriveSessionTitle, J as updateToolEventOutcomes, K as toolCallPreview, L as eventsFromTurns, M as StateStoreApi, N as TuiState, O as StorageMode, P as compactSummaryEvent, Q as KEYBINDING_DEF_BY_ACTION, R as lastContextSizeFromTurns, S as ResolvedConfig, T as resolveStoragePaths, U as stripSpawnTokensLine, V as marginTopFor, W as sumRunCosts, X as DEFAULT_KEYBINDINGS, Y as usageByModel, Z as KEYBINDING_DEFS, _ as discoverProjectMcps, _t as EMPTY_HINTS, a as SessionExportTarget, at as ResolvedExtensionKeybinding, b as ChatOptions, bt as hintsLength, c as writeSessionExport, ct as groupBindings, d as useEnabledToggleSet, dt as mergeKeybindings, et as KeyAction, f as DiscoveredMcp, ft as parseBindingSpec, g as defaultMcpsConfigPaths, gt as stripJsonComments, h as buildMcpServers, ht as resolveExtensionKeybindings, i as SessionExportFormat, it as ParsedBinding, j as ModelUsageSummary, k as StorageSlot, l as EnabledAllowlistKey, lt as keybindingsPath, m as DiscoveryResult, mt as readKeybindingsRaw, n as computeTurnAnchors, nt as KeyBindingSection, o as renderSession, ot as ensureKeybindingsFile, p as DiscoveryError, pt as readKeybindings, q as toolResultText, r as SessionExportAnchor, rt as KeyBindings, s as resolveSessionExportTarget, st as formatBindingForDisplay, t as TranscriptItem, tt as KeyBindingDef, u as EnabledToggleSet, ut as matchesBinding, v as parseMcpsFile, vt as Hint, w as resolveConfig, x as ProviderRegistry, xt as truncateTrailing, y as AutoUpdateConfig, yt as clipHintsToWidth, z as listSessionMeta } from "./transcript-anchors-e_30Kvk0.js";
3
- import { $ as createSkillsCompletionProvider, A as InlineSegment, B as splitLines, C as shortId, D as EditSummary, E as EditHunkSummary, F as computeInlineDiff, G as maskToOutcomeKinds, H as tokenize, I as computeLineDiff, J as resolveApprovalForPayload, K as mergeApprovalAndBodyOutcomes, L as extractEditPayload, M as applyEditPayload, N as buildContextualDiff, O as HunkResolution, P as buildUnifiedDiff, Q as SKILLS_TRIGGER, R as filetypeFromPath, S as previewLine, T as DiffOp, U as ResolvedApproval, V as summarizeEditPayload, W as buildEditOutcomesAnnotation, X as stripEditOutcomesAnnotation, Y as rewriteMultiEditHeader, Z as summarizeOutcomes, _ as fmtCost, a as MAX_TRANSCRIPT_EVENTS, at as ListProjectFilesOptions, b as formatTaskStatus, c as finalizeStreamingMarkdown, ct as ChatReferenceData, d as CatalogEntry, dt as chatReferenceTokensFromText, et as uniqueSkillNamesFromReferences, f as buildModelCatalog, ft as createChatsCompletionProvider, g as compactPath, h as ageString, ht as buildLinearRamp, i as turnAsText, it as FileEntry, j as PreviewResult, k as InlineDiff, l as finalizeStreamingMarkdownForOwner, lt as ChatReferenceEntry, m as indexOfEntry, mt as blendHsl, n as deleteTurnSafely, nt as createFilesCompletionProvider, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as listProjectFiles, p as filterModelCatalog, pt as uniqueChatIdsFromReferences, q as parseEditOutcomesFromResult, r as truncateTurnsAt, rt as uniqueFilesFromReferences, s as capTranscriptEvents, st as CHATS_TRIGGER, t as countNeighbors, tt as FILES_TRIGGER, u as turnContextSize, ut as ChatReferenceScope, v as fmtTokens, w as DiffLine, x as formatTaskSummary, y as formatDuration, z as previewEditPayload } from "./turn-operations-D-aaiUOo.js";
4
- import { C as isTurnHighlighted, E as turnSelectionOwnership, S as isEditErrorResult, T as selectableTurnIds, _ as SafeModeActions, a as formatToolCall, b as useSafeModeQueue, c as splitPromptSegments, d as chunkMarkdownForRender, f as normalizeMarkdownCodeFences, g as RequestApproval, h as ApprovalRequest, i as displayNameFor, l as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, m as ApprovalDecision, n as ToolDisplayMeta, o as PromptSegment, p as splitMarkdownCodeBlocks, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as MarkdownSegment, v as SafeModeProvider, w as isVisible, y as useSafeModeActions } from "./tool-formatters-ETbcC9DM.js";
1
+ import { $a as ExtensionApiVersion, $s as SourcedScanPath, $u as localDescriptor, Ac as ThemeColors, Al as QuestionType, Ao as ExtensionToolCatalogTransform, Au as buildRunModel, Bc as CompletionProvider, Bl as useInteractionsQueue, Bu as ProviderKey, Ca as scanExtensionDirectories, Cc as BUILTIN_THEMES, Cd as ContextMcpGroup, Cl as PlanResponse, Co as ExtensionRunTransform, Cu as Picked, Dc as SyntaxStyles, Dl as QuestionPayload, Do as ExtensionSource, Du as StreamEvent, Ec as DEFAULT_THEME, Ed as buildContextBreakdown, El as QuestionChoice, Eo as ExtensionSkillPolicy, Eu as Settings, Fc as CompletionState, Fi as AgentHookMap, Fl as isInteractionTool, Fu as restoreChainFallbacks, Gc as findActiveTrigger, Gi as buildExtensionRegistry, Gu as ModelOption, H as McpCredentialStore, Hd as McpServerConfig, Hi as BuildExtensionRegistryOptions, Ho as LoadedExtension, Hu as BUILTIN_PROVIDERS, Ic as useCompletion, Ii as AgentHooks, Il as makeRequestInteraction, Io as ExtensionToolResultMetadataRegistration, Iu as sanitizeModelChain, Jc as Command, Ji as filterExtensionRegistry, Ju as cerebrasDescriptor, Kc as mergeReferences, Kf as SkillConfig, Ki as composeExtensionPreset, Ku as ProviderDescriptor, Lc as ActiveTrigger, Ll as pendingInteractionsFromTurns, Lp as Provider, Lu as toggleChainEntry, Mc as ThemeSurfaces, Ml as TextQuestion, Mu as chainsEqual, Nc as resolveChipColor, Nl as buildResumedToolResultsTurn, Nu as filterChainFallbacks, Oc as SyntaxTokenStyle, Ol as QuestionRequest, Oo as ExtensionStorageScope, Ou as ToolCallDisplay, Pc as resolveTheme, Pf as ToolDef, Pl as createInteractionTools, Pu as providerKeySetChanged, Qa as EMPTY_EXTENSION_REGISTRY, Qf as Session, Qu as getModelInfo, Rc as CompletionContext, Rl as serializeInteractionResponse, Ru as AuthMethod, Sd as ContextItem, Sl as PlanRequest, So as ExtensionRegistry, Su as Owner, Tc as ChipColorMap, Td as ContextUsageSplit, Tl as Question, To as ExtensionSessionStateSurface, Tu as SessionMeta, Uc as applyInsert, Uo as TuiContributions, Uu as CustomField, V as McpCredentialEntry, Vc as CompletionReference, Vo as GuiContributions, Vu as detectAuth, Wc as collectReferences, Wd as McpToolSchema, Wi as buildExtensionPreset, Wu as ModelInfo, Xf as SkillsConfig, Xi as partitionExtensionCatalog, Xu as enabledModelOptions, Yc as CommandAgentResult, Yi as mergeContributions, Yu as credKeyOf, Zc as CommandExecution, Zu as getContextWindow, _d as ContextCategory, _l as InteractionsProvider, _o as ExtensionOrderedContribution, _u as EditDiffDisplay, ad as piIdOf, al as CommandStepContext, au as AgentAccent, ba as inlineLoadedExtension, bd as ContextExtensionRow, bi as generateStructuredData, bl as PlanDecision, bu as EditOutcomeKind, cd as AutoCompactDecision, cl as executeCommand, co as ExtensionFooterHint, cu as BUILD_AGENT, dd as effectiveContextWindow, dl as AnswerValue, do as ExtensionKeybinding, du as DEFAULT_BUDGET_EXCLUDE_TOOLS, ed as modelOptionsFor, el as CommandInvocation, eo as ExtensionBehaviorTransform, fd as shouldAutoCompact, ff as SessionTurn, fl as ConfirmQuestion, fo as ExtensionKeybindingDispatchContext, fu as DEFAULT_PERSIST_EXCLUDE_TOOLS, gd as ContextBreakdownOptions, gl as InteractionsActions, gu as singleAgentRegistry, hd as ContextBreakdownContributor, hl as InteractionResponse, ho as ExtensionModal, hu as resolveAgentId, id as openrouterDescriptor, il as CommandStep, io as ExtensionContributions, jc as ThemeSelect, jd as AutoCompact, jl as SelectQuestion, ju as chainPositionOf, ka as defineExtension, kc as Theme, kl as QuestionResponse, ko as ExtensionStorageSurface, ku as ModelChainEntry, ld as AutoCompactInput, ll as parseCommandInvocation, lo as ExtensionGuiPanel, lu as BUILTIN_AGENTS, md as ContextBreakdownContributionContext, ml as InteractionRequest, mo as ExtensionMcpConfigTransform, mu as accentColor, nd as modelsForDescriptor, no as ExtensionContext, np as SessionStore, od as restoreModelOptions, ol as CommandStepFn, ou as AgentProfile, pd as ContextBreakdown, pl as CreateInteractionToolsOptions, po as ExtensionManifest, pu as PLAN_AGENT, qi as disposeExtensionRegistry, qu as anthropicDescriptor, rd as openaiDescriptor, sd as AUTO_COMPACT_MIN_GROWTH_FRACTION, sl as commandSteps, so as ExtensionDefinition, su as AgentRegistry, t as Preset, td as modelSupportsReasoning, tl as CommandOutputBlock, to as ExtensionCapability, ud as OUTPUT_RESERVE_TOKENS, ul as ASK_USER_TOOL, uu as DEFAULT_AGENT_ID, va as defaultExtensionScanPaths, vd as ContextCategoryId, vl as PRESENT_PLAN_TOOL, vo as ExtensionPaths, vu as EditHunk, wc as ChipColor, wd as ContextSnapshot, wl as PlanStep, wo as ExtensionRuntimeEnv, wu as Screen, xd as ContextExtensionSection, xl as PlanPayload, xo as ExtensionProviderMiddleware, xu as EditPayload, ya as discoverExtensions, yd as ContextExactCounts, yi as GenerateStructuredDataOptions, yl as PendingInteractionEntry, yo as ExtensionPermission, yu as EditOutcome, zc as CompletionItem, zl as useInteractionsActions, zu as ProviderAuth } from "./index-DFjn8nA3.js";
2
+ import { $ as KEYBINDING_KEY_COL_WIDTH, A as resolveStorageDirs, B as loadState, C as ResolvedPaths, D as StorageDirs, E as ResolveStorageDirsOptions, F as createStateStore, G as titleFromTurns, H as saveState, I as deriveSessionTitle, J as updateToolEventOutcomes, K as toolCallPreview, L as eventsFromTurns, M as StateStoreApi, N as TuiState, O as StorageMode, P as compactSummaryEvent, Q as KEYBINDING_DEF_BY_ACTION, R as lastContextSizeFromTurns, S as ResolvedConfig, T as resolveStoragePaths, U as stripSpawnTokensLine, V as marginTopFor, W as sumRunCosts, X as DEFAULT_KEYBINDINGS, Y as usageByModel, Z as KEYBINDING_DEFS, _ as discoverProjectMcps, _t as EMPTY_HINTS, a as SessionExportTarget, at as ResolvedExtensionKeybinding, b as ChatOptions, bt as hintsLength, c as writeSessionExport, ct as groupBindings, d as useEnabledToggleSet, dt as mergeKeybindings, et as KeyAction, f as DiscoveredMcp, ft as parseBindingSpec, g as defaultMcpsConfigPaths, gt as stripJsonComments, h as buildMcpServers, ht as resolveExtensionKeybindings, i as SessionExportFormat, it as ParsedBinding, j as ModelUsageSummary, k as StorageSlot, l as EnabledAllowlistKey, lt as keybindingsPath, m as DiscoveryResult, mt as readKeybindingsRaw, n as computeTurnAnchors, nt as KeyBindingSection, o as renderSession, ot as ensureKeybindingsFile, p as DiscoveryError, pt as readKeybindings, q as toolResultText, r as SessionExportAnchor, rt as KeyBindings, s as resolveSessionExportTarget, st as formatBindingForDisplay, t as TranscriptItem, tt as KeyBindingDef, u as EnabledToggleSet, ut as matchesBinding, v as parseMcpsFile, vt as Hint, w as resolveConfig, x as ProviderRegistry, xt as truncateTrailing, y as AutoUpdateConfig, yt as clipHintsToWidth, z as listSessionMeta } from "./transcript-anchors-Cg6zkNiA.js";
3
+ import { $ as uniqueFilesFromReferences, A as buildUnifiedDiff, B as buildEditOutcomesAnnotation, C as EditSummary, D as PreviewResult, E as InlineSegment, F as previewEditPayload, G as rewriteMultiEditHeader, H as mergeApprovalAndBodyOutcomes, I as splitLines, J as SKILLS_TRIGGER, K as stripEditOutcomesAnnotation, L as summarizeEditPayload, M as computeLineDiff, N as extractEditPayload, O as applyEditPayload, P as filetypeFromPath, Q as createFilesCompletionProvider, R as tokenize, S as EditHunkSummary, T as InlineDiff, U as parseEditOutcomesFromResult, V as maskToOutcomeKinds, W as resolveApprovalForPayload, X as uniqueSkillNamesFromReferences, Y as createSkillsCompletionProvider, Z as FILES_TRIGGER, _ as formatTaskSummary, a as MAX_TRANSCRIPT_EVENTS, at as ChatReferenceEntry, b as DiffLine, c as finalizeStreamingMarkdown, ct as createChatsCompletionProvider, d as ageString, dt as buildLinearRamp, et as FileEntry, f as compactPath, g as formatTaskStatus, h as formatDuration, i as turnAsText, it as ChatReferenceData, j as computeInlineDiff, k as buildContextualDiff, l as finalizeStreamingMarkdownForOwner, lt as uniqueChatIdsFromReferences, m as fmtTokens, n as deleteTurnSafely, nt as listProjectFiles, o as TRANSCRIPT_TRIM_TO_EVENTS, ot as ChatReferenceScope, p as fmtCost, q as summarizeOutcomes, r as truncateTurnsAt, rt as CHATS_TRIGGER, s as capTranscriptEvents, st as chatReferenceTokensFromText, t as countNeighbors, tt as ListProjectFilesOptions, u as turnContextSize, ut as blendHsl, v as previewLine, w as HunkResolution, x as DiffOp, y as shortId, z as ResolvedApproval } from "./turn-operations-l1mife2u.js";
4
+ import { A as turnSelectionOwnership, C as useSafeModeActions, D as isTurnHighlighted, E as isEditErrorResult, O as isVisible, S as SafeModeProvider, _ as splitMarkdownCodeBlocks, a as formatToolCall, b as RequestApproval, c as splitPromptSegments, d as filterModelCatalog, f as indexOfEntry, g as normalizeMarkdownCodeFences, h as chunkMarkdownForRender, i as displayNameFor, k as selectableTurnIds, l as CatalogEntry, m as MarkdownSegment, n as ToolDisplayMeta, o as PromptSegment, p as MARKDOWN_RENDER_CHUNK_TARGET_BYTES, r as ToolFormatLine, s as PromptSegmentRef, t as TOOL_DISPLAY, u as buildModelCatalog, v as ApprovalDecision, w as useSafeModeQueue, x as SafeModeActions, y as ApprovalRequest } from "./tool-formatters-D4BjDBC2.js";
5
5
  import { Hookable } from "hookable";
6
6
  import { spawn } from "node:child_process";
7
7
  import { OAuthCredentials, OAuthDeviceCodeInfo, OAuthPrompt, OAuthPrompt as OAuthPrompt$1, OAuthSelectPrompt } from "@earendil-works/pi-ai/oauth";
@@ -104,7 +104,7 @@ declare const DOING_TASKS_DOCTRINE = "# Doing tasks\n- Do exactly what was asked
104
104
  * heavy lifting at the wire level; this prompt nudges the model away from
105
105
  * the access patterns that defeat them.
106
106
  */
107
- declare const TOKEN_DISCIPLINE_DOCTRINE = "# Working efficiently\n- Search first (`grep` / `glob`), then `read_file` the specific file \u2014 don't open a 2000-line file for one function.\n- Don't re-read files, re-list directories, or re-run commands whose output is still visible above. When earlier output shows an `[\u2026elided\u2026]` stub, just read it again \u2014 you'll get the full content back.\n- Prefer `edit` / `multi_edit` over `write_file` for changes to existing files.\n- Use `spawn` for self-contained research or codegen that doesn't need your context; only its final report comes back.\n- Large outputs may be replaced inline by a `<persisted-output \u2026 path=\"\u2026\">` block with a short preview \u2014 `read_file` that path when the preview isn't enough. Copy load-bearing data into your response text before it can scroll away.";
107
+ declare const TOKEN_DISCIPLINE_DOCTRINE = "# Working efficiently\n- Search first (`grep` / `glob`), then `read_file` the specific file \u2014 don't open a 2000-line file for one function.\n- Reach for `shell` only when the task needs real shell semantics \u2014 pipes, command chains, builds, git. For plain searches and reads, the dedicated tools beat shell `grep`/`find`/`cat`: they honor .gitignore, clip runaway lines instead of flooding your context, and have no quoting pitfalls.\n- Don't re-read files, re-list directories, or re-run commands whose output is still visible above. When earlier output shows an `[\u2026elided\u2026]` stub, just read it again \u2014 you'll get the full content back.\n- Prefer `edit` / `multi_edit` over `write_file` for changes to existing files.\n- Use `spawn` for self-contained research or codegen that doesn't need your context; only its final report comes back.\n- Large outputs may be replaced inline by a `<persisted-output \u2026 path=\"\u2026\">` block with a short preview \u2014 `read_file` that path when the preview isn't enough. Copy load-bearing data into your response text before it can scroll away.";
108
108
  /**
109
109
  * User-facing communication style. Lifted from claude-code's
110
110
  * `# Communicating with the user` + `# Tone and style` sections (~404-442).
@@ -998,6 +998,12 @@ interface BuildHintsOptions {
998
998
  * row so it's the first to drop when the terminal narrows.
999
999
  */
1000
1000
  updateHint: Hint | null;
1001
+ /**
1002
+ * Sessions-screen list scope — `true` when the list spans all
1003
+ * projects. Drives the `tab` hint's label, which advertises the scope
1004
+ * the toggle switches TO. Optional so non-sessions callers can omit it.
1005
+ */
1006
+ sessionsScopeAll?: boolean;
1001
1007
  }
1002
1008
  /**
1003
1009
  * Build the footer's shortcut hints for the current screen. On the chat
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","names":[],"sources":["../src/tools/read-chat-turns.ts","../src/chat/agent-prompt.ts","../src/chat/agents-md.ts","../src/chat/auto-compact.ts","../src/chat/auto-update.ts","../src/chat/auto-update-cli.ts","../src/chat/auto-update-hook.ts","../src/chat/boot-profiler.ts","../src/chat/browser.ts","../src/chat/config-context.tsx","../src/chat/credentials.ts","../src/chat/discovery-context.tsx","../src/chat/discovery-slot.ts","../src/chat/footer-hints.ts","../src/chat/generate-title.ts","../src/chat/mcp-auth-state.ts","../src/chat/mcp-auth-context.tsx","../src/chat/mcp-credentials.ts","../src/chat/mcp-rows.ts","../src/chat/mcp-tool-toggle.ts","../src/chat/mcp-tools-cache.ts","../src/chat/oauth.ts","../src/chat/oauth-redirect.ts","../src/chat/path-display.ts","../src/chat/project-root.ts","../src/chat/project-user-paths.ts","../src/chat/safe-mode.ts","../src/chat/settings-context.tsx","../src/chat/skills-discovery.ts","../src/chat/streaming.ts","../src/chat/theme-context.tsx","../src/chat/themes/catppuccin.ts","../src/chat/themes/gruvbox.ts","../src/chat/themes/vaporwave.ts","../src/chat/todos.ts","../src/chat/todo-anchor.ts"],"mappings":";;;;;;;;;;UAWiB,wBAAA;EACf,KAAA,EAAO,YAAY;EACnB,gBAAA;AAAA;AAAA,iBAGc,uBAAA,CAAwB,OAAA,EAAS,wBAAA,GAA2B,OAAO;AAAA,iBA2EnE,4BAAA,CAA6B,MAAc;;;;;;;;;;;;;;;AAhF3D;;;;;;;;AAEkB;AAGlB;;;;;;;;AAAmF;AA2EnF;;cCpDa,eAAA;AAAA,UAOI,iBAAA;ED6C0C;;;;ACpD3D;;EAcE,GAAA;EAd0B;AAAA;AAO5B;;;;;;;;EAkBE,WAAA;EAIQ;EAFR,IAAA;EAmBwB;EAjBxB,QAAA;AAAA;AAiBgD;AAoClD;;;;AAAiC;AAsCjC;;;;AAAsC;AA4BtC;;;AAtGkD,iBAAlC,UAAA,CAAW,IAAuB,EAAjB,iBAAiB;AAsGf;AAYnC;;;;AAAuC;AAYvC;;AAxBmC,cAlEtB,oBAAA;;AAgI+B;AAS5C;;;;AAA0C;cAnG7B,yBAAA;AAoJK;AA+BlB;;;;AAA8D;AA2B9D;AA1DkB,cAxHL,sBAAA;;;AAkLgD;;;;ACjU7D;cD2Ja,0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AA6B,gBAAgB;;;UCrmCpE,uBAAA;EACf,OAAA;EACA,QAAA;EACA,OAAA;AAAA;AAAA,iBAGc,sBAAA,CACd,KAAA,WAAgB,QAAA,IAChB,OAAA,GAAS,uBAA4B;;;;;AnCFvC;iBmCuBgB,2BAAA,CAA4B,OAAA,GAAS,uBAAA,GAA+B,YAAY"}
1
+ {"version":3,"file":"chat.d.ts","names":[],"sources":["../src/tools/read-chat-turns.ts","../src/chat/agent-prompt.ts","../src/chat/agents-md.ts","../src/chat/auto-compact.ts","../src/chat/auto-update.ts","../src/chat/auto-update-cli.ts","../src/chat/auto-update-hook.ts","../src/chat/boot-profiler.ts","../src/chat/browser.ts","../src/chat/config-context.tsx","../src/chat/credentials.ts","../src/chat/discovery-context.tsx","../src/chat/discovery-slot.ts","../src/chat/footer-hints.ts","../src/chat/generate-title.ts","../src/chat/mcp-auth-state.ts","../src/chat/mcp-auth-context.tsx","../src/chat/mcp-credentials.ts","../src/chat/mcp-rows.ts","../src/chat/mcp-tool-toggle.ts","../src/chat/mcp-tools-cache.ts","../src/chat/oauth.ts","../src/chat/oauth-redirect.ts","../src/chat/path-display.ts","../src/chat/project-root.ts","../src/chat/project-user-paths.ts","../src/chat/safe-mode.ts","../src/chat/settings-context.tsx","../src/chat/skills-discovery.ts","../src/chat/streaming.ts","../src/chat/theme-context.tsx","../src/chat/themes/catppuccin.ts","../src/chat/themes/gruvbox.ts","../src/chat/themes/vaporwave.ts","../src/chat/todos.ts","../src/chat/todo-anchor.ts"],"mappings":";;;;;;;;;;UAWiB,wBAAA;EACf,KAAA,EAAO,YAAY;EACnB,gBAAA;AAAA;AAAA,iBAGc,uBAAA,CAAwB,OAAA,EAAS,wBAAA,GAA2B,OAAO;AAAA,iBA2EnE,4BAAA,CAA6B,MAAc;;;;;;;;;;;;;;;AAhF3D;;;;;;;;AAEkB;AAGlB;;;;;;;;AAAmF;AA2EnF;;cCpDa,eAAA;AAAA,UAOI,iBAAA;ED6C0C;;;;ACpD3D;;E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N;E8BsXT,KAAA;E9BrXA;;;;;E8B2XA,KAAA,WAAgB,QAAA;E9BvXV;;;;;;;AAI8B;AAGtC;E8B0XE,OAAA,WAAkB,QAAA;;;;;;;EAOlB,UAAA,EAAY,QAAA;E9B5XF;AASZ;;;;E8ByXE,KAAA,EAAO,SAAA;AAAA;;;;;;;;A9BzX2F;AAqEpG;;;;;;;iB8B+UgB,eAAA,CAAgB,OAAmC,EAA1B,OAAO;;;;;;;;;;iBA+BhC,iBAAA,CAAkB,OAAA,EAAS,OAAA,sBAA6B,gBAAgB;A9B3VxF;;;;;;;;;AAQY;AASZ;;;;;;AAjBA,iB8BuYgB,cAAA,CAAe,OAAA,EAAS,OAAA,sBAA6B,gBAAgB;;;UCrmCpE,uBAAA;EACf,OAAA;EACA,QAAA;EACA,OAAA;AAAA;AAAA,iBAGc,sBAAA,CACd,KAAA,WAAgB,QAAA,IAChB,OAAA,GAAS,uBAA4B;;;;;AnCFvC;iBmCuBgB,2BAAA,CAA4B,OAAA,GAAS,uBAAA,GAA+B,YAAY"}
package/dist/chat.js CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as useMcpAuthState, $n as buildPlanSystem, $t as restoreChainFallbacks, A as runOAuthLogin, An as TODOWRITE_TOOL, At as DEFAULT_THEME, B as saveMcpToolsCache, Bn as setTodosForRun, Bt as createDiscoverySlot, C as projectsFilePath, Cn as DEFAULT_PERSIST_EXCLUDE_TOOLS, Ct as SETTINGS_CHOICES, D as formatPathForCwd, Dn as singleAgentRegistry, E as writeProjects, En as resolveAgentId, Et as SettingsProvider, F as parseMcpsFile, Fn as getTodosForRun, Ft as GRUVBOX_LIGHT, G as buildVisibleMcpRows, Gn as IDENTITY_PREFIX, Gt as useConfig, H as buildToolToggle, Hn as ACTIONS_WITH_CARE_DOCTRINE, Ht as useDiscovery, I as clearMcpToolsCache, In as isTodoTool, It as CATPPUCCIN_FRAPPE, J as createFileMcpCredentialStore, Jn as PLAN_MODE_DOCTRINE, Jt as buildRunModel, K as indexOfServerRow, Kn as INTERACTION_GUIDANCE, Kt as resolveConfig, L as loadMcpToolsCache, Ln as pickActiveRunId, Lt as CATPPUCCIN_LATTE, M as buildMcpServers, Mn as TODO_WRITE_COUNTS_METADATA_KEY, Mt as resolveTheme, N as defaultMcpsConfigPaths, Nn as createTodoTools, Nt as VAPORWAVE_THEME, O as fetchOAuthRedirect, On as TODOREAD_TOOL, Ot as useSettings, P as discoverProjectMcps, Pn as getArchivedTodosForRun, Pt as GRUVBOX_DARK, Q as useMcpAuthDispatch, Qn as buildBuildSystem, Qt as providerKeySetChanged, R as mcpToolsCachePath, Rn as pruneTodosByRun, Rt as CATPPUCCIN_MACCHIATO, S as matchesSafelistEntry, Sn as DEFAULT_BUDGET_EXCLUDE_TOOLS, St as SETTINGS_CATEGORIES, T as suggestSafelistEntries, Tn as accentColor, Tt as SETTINGS_TOGGLES, U as useMcpToolToggleMap, Un as COMMUNICATION_DOCTRINE, Ut as useDiscoveryOptional, V as subscribeMcpToolsCache, Vn as useActiveTodos, Vt as DiscoveryProvider, W as useMcpToolToggleSet, Wn as DOING_TASKS_DOCTRINE, Wt as ConfigProvider, X as patchMcpCredential, Xn as SUBAGENT_GUIDANCE, Xt as chainsEqual, Y as mcpCredentialsPath, Yn as PLAN_MODE_DOCTRINE_NO_PROMPTS, Yt as chainPositionOf, Z as McpAuthProvider, Zn as TOKEN_DISCIPLINE_DOCTRINE, Zt as filterChainFallbacks, _ as useSafeModeQueue, _n as discoverAgentsMd, _r as toolCallPreview, _t as buildHints, a as useSurfaces, an as bootTick, ar as createStateStore, at as buildResumedToolResultsTurn, b as getSafelist, bn as BUILTIN_AGENTS, br as usageByModel, bt as useEnabledToggleSet, c as useStreamBuffer, cn as checkForUpdate, cr as lastContextSizeFromTurns, ct as makeRequestInteraction, d as discoverProjectSkills, dn as detectPackageManager, dr as marginTopFor, dt as useInteractionsActions, en as sanitizeModelChain, er as envSection, et as getMcpAuthStatus, f as renderSession, fn as parseSemver, fr as saveState, ft as useInteractionsQueue, g as useSafeModeActions, gn as chatAutoCompactBehavior, gr as titleFromTurns, gt as truncateTrailing, h as SafeModeProvider, hn as resolvePlatformPackage, hr as sumRunCosts, ht as hintsLength, i as useSelectStyle, in as bootProfileEnabled, ir as compactSummaryEvent, it as PRESENT_PLAN_TOOL, j as supportsOAuth, jn as TODO_STATUS_GLYPHS, jt as resolveChipColor, k as oauthUsesManualCodePaste, kn as TODOS_METADATA_KEY, kt as BUILTIN_THEMES, l as buildSkillsConfig, ln as compareSemver, lr as listSessionMeta, lt as pendingInteractionsFromTurns, m as writeSessionExport, mn as performSelfUpdate, mr as stripSpawnTokensLine, mt as clipHintsToWidth, n as ThemeProvider, nn as useCompletion, nr as createChatTurnsReadTool, nt as ASK_USER_TOOL, o as useSyntaxStyles, on as buildUpdateHint, or as deriveSessionTitle, ot as createInteractionTools, p as resolveSessionExportTarget, pn as performInPlaceSelfUpdate, pt as EMPTY_HINTS, q as parentServerName, qn as INTERACTION_GUIDANCE_NO_PROMPTS, qt as resolveStoragePaths, r as useColors, rn as tryOpenBrowser, rt as InteractionsProvider, s as useTheme, sn as useUpdateCheck, sr as eventsFromTurns, st as isInteractionTool, t as computeTurnAnchors, tn as toggleChainEntry, tr as chatReferenceTokensForPrompt, tt as reduceMcpAuth, u as defaultSkillScanPaths, un as detectLibc, ur as loadState, ut as serializeInteractionResponse, v as IMPLICITLY_SAFE_TOOLS, vn as renderAgentsMdBlock, vr as toolResultText, vt as shortChord, w as readProjects, wn as PLAN_AGENT, wt as SETTINGS_INPUTS, x as isOnSafelist, xn as DEFAULT_AGENT_ID, xt as DEFAULT_SETTINGS, y as addToSafelist, yn as BUILD_AGENT, yr as updateToolEventOutcomes, yt as listProjectFiles, z as refreshMcpToolsCatalog, zn as selectActiveTodos, zt as CATPPUCCIN_MOCHA } from "./transcript-anchors-CVQ4AOWj.js";
2
- import { $ as composeExtensionPreset, $t as discoverExtensions, Bt as ensureKeybindingsFile, Ft as resolveStorageDirs, Gt as mergeKeybindings, Ht as groupBindings, It as DEFAULT_KEYBINDINGS, Jt as readKeybindingsRaw, Kt as parseBindingSpec, Lt as KEYBINDING_DEFS, Q as buildExtensionRegistry, Qt as defaultExtensionScanPaths, R as EMPTY_EXTENSION_REGISTRY, Rt as KEYBINDING_DEF_BY_ACTION, Ut as keybindingsPath, Vt as formatBindingForDisplay, Wt as matchesBinding, Xt as stripJsonComments, Yt as resolveExtensionKeybindings, Z as buildExtensionPreset, en as inlineLoadedExtension, et as disposeExtensionRegistry, fn as AUTO_COMPACT_MIN_GROWTH_FRACTION, hn as shouldAutoCompact, in as defineExtension, mn as effectiveContextWindow, nt as mergeContributions, pn as OUTPUT_RESERVE_TOKENS, qt as readKeybindings, rn as scanExtensionDirectories, rt as partitionExtensionCatalog, tt as filterExtensionRegistry, zt as KEYBINDING_KEY_COL_WIDTH } from "./agent-Dm-ihe-r.js";
1
+ import { $ as useMcpAuthState, $n as buildPlanSystem, $t as restoreChainFallbacks, A as runOAuthLogin, An as TODOWRITE_TOOL, At as DEFAULT_THEME, B as saveMcpToolsCache, Bn as setTodosForRun, Bt as createDiscoverySlot, C as projectsFilePath, Cn as DEFAULT_PERSIST_EXCLUDE_TOOLS, Ct as SETTINGS_CHOICES, D as formatPathForCwd, Dn as singleAgentRegistry, E as writeProjects, En as resolveAgentId, Et as SettingsProvider, F as parseMcpsFile, Fn as getTodosForRun, Ft as GRUVBOX_LIGHT, G as buildVisibleMcpRows, Gn as IDENTITY_PREFIX, Gt as useConfig, H as buildToolToggle, Hn as ACTIONS_WITH_CARE_DOCTRINE, Ht as useDiscovery, I as clearMcpToolsCache, In as isTodoTool, It as CATPPUCCIN_FRAPPE, J as createFileMcpCredentialStore, Jn as PLAN_MODE_DOCTRINE, Jt as buildRunModel, K as indexOfServerRow, Kn as INTERACTION_GUIDANCE, Kt as resolveConfig, L as loadMcpToolsCache, Ln as pickActiveRunId, Lt as CATPPUCCIN_LATTE, M as buildMcpServers, Mn as TODO_WRITE_COUNTS_METADATA_KEY, Mt as resolveTheme, N as defaultMcpsConfigPaths, Nn as createTodoTools, Nt as VAPORWAVE_THEME, O as fetchOAuthRedirect, On as TODOREAD_TOOL, Ot as useSettings, P as discoverProjectMcps, Pn as getArchivedTodosForRun, Pt as GRUVBOX_DARK, Q as useMcpAuthDispatch, Qn as buildBuildSystem, Qt as providerKeySetChanged, R as mcpToolsCachePath, Rn as pruneTodosByRun, Rt as CATPPUCCIN_MACCHIATO, S as matchesSafelistEntry, Sn as DEFAULT_BUDGET_EXCLUDE_TOOLS, St as SETTINGS_CATEGORIES, T as suggestSafelistEntries, Tn as accentColor, Tt as SETTINGS_TOGGLES, U as useMcpToolToggleMap, Un as COMMUNICATION_DOCTRINE, Ut as useDiscoveryOptional, V as subscribeMcpToolsCache, Vn as useActiveTodos, Vt as DiscoveryProvider, W as useMcpToolToggleSet, Wn as DOING_TASKS_DOCTRINE, Wt as ConfigProvider, X as patchMcpCredential, Xn as SUBAGENT_GUIDANCE, Xt as chainsEqual, Y as mcpCredentialsPath, Yn as PLAN_MODE_DOCTRINE_NO_PROMPTS, Yt as chainPositionOf, Z as McpAuthProvider, Zn as TOKEN_DISCIPLINE_DOCTRINE, Zt as filterChainFallbacks, _ as useSafeModeQueue, _n as discoverAgentsMd, _r as toolCallPreview, _t as buildHints, a as useSurfaces, an as bootTick, ar as createStateStore, at as buildResumedToolResultsTurn, b as getSafelist, bn as BUILTIN_AGENTS, br as usageByModel, bt as useEnabledToggleSet, c as useStreamBuffer, cn as checkForUpdate, cr as lastContextSizeFromTurns, ct as makeRequestInteraction, d as discoverProjectSkills, dn as detectPackageManager, dr as marginTopFor, dt as useInteractionsActions, en as sanitizeModelChain, er as envSection, et as getMcpAuthStatus, f as renderSession, fn as parseSemver, fr as saveState, ft as useInteractionsQueue, g as useSafeModeActions, gn as chatAutoCompactBehavior, gr as titleFromTurns, gt as truncateTrailing, h as SafeModeProvider, hn as resolvePlatformPackage, hr as sumRunCosts, ht as hintsLength, i as useSelectStyle, in as bootProfileEnabled, ir as compactSummaryEvent, it as PRESENT_PLAN_TOOL, j as supportsOAuth, jn as TODO_STATUS_GLYPHS, jt as resolveChipColor, k as oauthUsesManualCodePaste, kn as TODOS_METADATA_KEY, kt as BUILTIN_THEMES, l as buildSkillsConfig, ln as compareSemver, lr as listSessionMeta, lt as pendingInteractionsFromTurns, m as writeSessionExport, mn as performSelfUpdate, mr as stripSpawnTokensLine, mt as clipHintsToWidth, n as ThemeProvider, nn as useCompletion, nr as createChatTurnsReadTool, nt as ASK_USER_TOOL, o as useSyntaxStyles, on as buildUpdateHint, or as deriveSessionTitle, ot as createInteractionTools, p as resolveSessionExportTarget, pn as performInPlaceSelfUpdate, pt as EMPTY_HINTS, q as parentServerName, qn as INTERACTION_GUIDANCE_NO_PROMPTS, qt as resolveStoragePaths, r as useColors, rn as tryOpenBrowser, rt as InteractionsProvider, s as useTheme, sn as useUpdateCheck, sr as eventsFromTurns, st as isInteractionTool, t as computeTurnAnchors, tn as toggleChainEntry, tr as chatReferenceTokensForPrompt, tt as reduceMcpAuth, u as defaultSkillScanPaths, un as detectLibc, ur as loadState, ut as serializeInteractionResponse, v as IMPLICITLY_SAFE_TOOLS, vn as renderAgentsMdBlock, vr as toolResultText, vt as shortChord, w as readProjects, wn as PLAN_AGENT, wt as SETTINGS_INPUTS, x as isOnSafelist, xn as DEFAULT_AGENT_ID, xt as DEFAULT_SETTINGS, y as addToSafelist, yn as BUILD_AGENT, yr as updateToolEventOutcomes, yt as listProjectFiles, z as refreshMcpToolsCatalog, zn as selectActiveTodos, zt as CATPPUCCIN_MOCHA } from "./transcript-anchors-CYhIMDgQ.js";
2
+ import { $ as composeExtensionPreset, $t as discoverExtensions, Bt as ensureKeybindingsFile, Ft as resolveStorageDirs, Gt as mergeKeybindings, Ht as groupBindings, It as DEFAULT_KEYBINDINGS, Jt as readKeybindingsRaw, Kt as parseBindingSpec, Lt as KEYBINDING_DEFS, Q as buildExtensionRegistry, Qt as defaultExtensionScanPaths, R as EMPTY_EXTENSION_REGISTRY, Rt as KEYBINDING_DEF_BY_ACTION, Ut as keybindingsPath, Vt as formatBindingForDisplay, Wt as matchesBinding, Xt as stripJsonComments, Yt as resolveExtensionKeybindings, Z as buildExtensionPreset, en as inlineLoadedExtension, et as disposeExtensionRegistry, fn as AUTO_COMPACT_MIN_GROWTH_FRACTION, hn as shouldAutoCompact, in as defineExtension, mn as effectiveContextWindow, nt as mergeContributions, pn as OUTPUT_RESERVE_TOKENS, qt as readKeybindings, rn as scanExtensionDirectories, rt as partitionExtensionCatalog, tt as filterExtensionRegistry, zt as KEYBINDING_KEY_COL_WIDTH } from "./agent-BJ1NC1pA.js";
3
3
  import { t as buildContextBreakdown } from "./context-breakdown-Dzo25N45.js";
4
4
  import { a as formatDuration, c as previewLine, i as fmtTokens, l as shortId, n as compactPath, o as formatTaskStatus, r as fmtCost, s as formatTaskSummary, t as ageString } from "./format-BF745pLL.js";
5
5
  import { M as findGitRoot, j as projectUserPaths } from "./resolve-CC8Lmwcj.js";
@@ -1,4 +1,4 @@
1
- import { Ul as Logger } from "../index-C6Il4kBD.js";
1
+ import { Zl as Logger } from "../index-DFjn8nA3.js";
2
2
  import { s as ExecResult } from "../types-BDccavwj.js";
3
3
  import { t as SandboxProvider } from "../sandbox-CgjG2VvQ.js";
4
4
  import { Buffer } from "node:buffer";
@@ -1,4 +1,4 @@
1
- import { Ul as Logger } from "../index-C6Il4kBD.js";
1
+ import { Zl as Logger } from "../index-DFjn8nA3.js";
2
2
  import { t as SandboxProvider } from "../sandbox-CgjG2VvQ.js";
3
3
 
4
4
  //#region src/contexts/e2b.d.ts
package/dist/eval.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $t as TrajectoryStep, At as EvalRunMetricAggregate, Bt as EvalVariantSummary, Cn as llmJudge, Ct as EvalArtifacts, Dn as runEvalCase, Dt as EvalDefinitionContext, En as relativeArtifactPath, Et as EvalDefinition, Ft as EvalRunUsage, Gt as MetricDirection, Ht as EvalWorkspaceOptions, It as EvalScore, Jt as MetricSpecMap, Kt as MetricEmitter, Lt as EvalScorer, Mt as EvalRunReporterOptions, Nt as EvalRunSummary, On as statusCompleted, Ot as EvalMetric, Pt as EvalRunSummaryCase, Qt as Trajectory, Rt as EvalScorerContext, Sn as functionalityMetric, St as EvalAgentStats, Tn as registerEvalTests, Tt as EvalCaseResult, Ut as EvalWorkspaceSnapshot, Vt as EvalWorkspaceFile, Wt as LlmJudgeOptions, Xt as RegisterEvalTestsOptions, Yt as MetricStats, Zt as ReusableExecutionContext, _n as fileExistsOneOf, _t as EvalAgent, an as clearRegisteredEvals, bn as formatEvalRunSummary, bt as EvalAgentRunResult, cn as createEvalRunReporter, dn as defineMetrics, en as TrajectoryStepKind, fn as efficiencyMetricValues, gn as fileExists, gt as EFFICIENCY_METRICS, hn as fileContentQuality, ht as CreateEvalAgentOptions, in as buildTrajectory, jt as EvalRunReporter, kt as EvalMetricError, ln as createReusableExecutionContext, mn as fileContains, nn as buildEvalRunSummary, on as computeEvalTagScores, pn as emitEfficiencyMetrics, qt as MetricSpec, rn as buildRegisteredEvals, sn as createEvalAgent, tn as artifactPath, un as defineEval, vn as finalizeEvalMetrics, vt as EvalAgentMcpServers, wn as normalizeMetric, wt as EvalCaseOptions, xn as formatTrajectoryLine, xt as EvalAgentRunStats, yn as formatEvalCaseSummary, yt as EvalAgentRunOptions, zt as EvalTestRunner } from "./index-C6Il4kBD.js";
1
+ import { $t as TrajectoryStep, At as EvalRunMetricAggregate, Bt as EvalVariantSummary, Cn as llmJudge, Ct as EvalArtifacts, Dn as runEvalCase, Dt as EvalDefinitionContext, En as relativeArtifactPath, Et as EvalDefinition, Ft as EvalRunUsage, Gt as MetricDirection, Ht as EvalWorkspaceOptions, It as EvalScore, Jt as MetricSpecMap, Kt as MetricEmitter, Lt as EvalScorer, Mt as EvalRunReporterOptions, Nt as EvalRunSummary, On as statusCompleted, Ot as EvalMetric, Pt as EvalRunSummaryCase, Qt as Trajectory, Rt as EvalScorerContext, Sn as functionalityMetric, St as EvalAgentStats, Tn as registerEvalTests, Tt as EvalCaseResult, Ut as EvalWorkspaceSnapshot, Vt as EvalWorkspaceFile, Wt as LlmJudgeOptions, Xt as RegisterEvalTestsOptions, Yt as MetricStats, Zt as ReusableExecutionContext, _n as fileExistsOneOf, _t as EvalAgent, an as clearRegisteredEvals, bn as formatEvalRunSummary, bt as EvalAgentRunResult, cn as createEvalRunReporter, dn as defineMetrics, en as TrajectoryStepKind, fn as efficiencyMetricValues, gn as fileExists, gt as EFFICIENCY_METRICS, hn as fileContentQuality, ht as CreateEvalAgentOptions, in as buildTrajectory, jt as EvalRunReporter, kt as EvalMetricError, ln as createReusableExecutionContext, mn as fileContains, nn as buildEvalRunSummary, on as computeEvalTagScores, pn as emitEfficiencyMetrics, qt as MetricSpec, rn as buildRegisteredEvals, sn as createEvalAgent, tn as artifactPath, un as defineEval, vn as finalizeEvalMetrics, vt as EvalAgentMcpServers, wn as normalizeMetric, wt as EvalCaseOptions, xn as formatTrajectoryLine, xt as EvalAgentRunStats, yn as formatEvalCaseSummary, yt as EvalAgentRunOptions, zt as EvalTestRunner } from "./index-DFjn8nA3.js";
2
2
  export { CreateEvalAgentOptions, EFFICIENCY_METRICS, EvalAgent, EvalAgentMcpServers, EvalAgentRunOptions, EvalAgentRunResult, EvalAgentRunStats, EvalAgentStats, EvalArtifacts, EvalCaseOptions, EvalCaseResult, EvalDefinition, EvalDefinitionContext, EvalMetric, EvalMetricError, EvalRunMetricAggregate, EvalRunReporter, EvalRunReporterOptions, EvalRunSummary, EvalRunSummaryCase, EvalRunUsage, EvalScore, EvalScorer, EvalScorerContext, EvalTestRunner, EvalVariantSummary, EvalWorkspaceFile, EvalWorkspaceOptions, EvalWorkspaceSnapshot, LlmJudgeOptions, MetricDirection, MetricEmitter, MetricSpec, MetricSpecMap, MetricStats, RegisterEvalTestsOptions, ReusableExecutionContext, Trajectory, TrajectoryStep, TrajectoryStepKind, artifactPath, buildEvalRunSummary, buildRegisteredEvals, buildTrajectory, clearRegisteredEvals, computeEvalTagScores, createEvalAgent, createEvalRunReporter, createReusableExecutionContext, defineEval, defineMetrics, efficiencyMetricValues, emitEfficiencyMetrics, fileContains, fileContentQuality, fileExists, fileExistsOneOf, finalizeEvalMetrics, formatEvalCaseSummary, formatEvalRunSummary, formatTrajectoryLine, functionalityMetric, llmJudge, normalizeMetric, registerEvalTests, relativeArtifactPath, runEvalCase, statusCompleted };
@@ -1,2 +1,2 @@
1
- import { $a as ExtensionBehaviorTransform, $i as ExtensionInstallError, $o as ExtensionHostRuntimeBridge, Aa as ExtensionConfigBooleanItem, Ao as ExtensionToolPolicy, Ba as ExtensionConfigValue, Bo as GuiContributions, Ca as scanExtensionDirectories, Co as ExtensionRuntimeEnv, Da as ExtensionPromptDelivery, Do as ExtensionStorageScope, Ea as ExtensionPromptBridge, Eo as ExtensionSource, Fa as ExtensionConfigItemBase, Fo as ExtensionToolResultMetadataRegistration, Ga as coerceExtensionConfigInput, Gi as buildExtensionRegistry, Go as ExtensionHudState, Ha as WireExtensionConfigItem, Hi as BuildExtensionRegistryOptions, Ho as TuiContributions, Ia as ExtensionConfigNumberItem, Io as ExtensionToolResultPatch, Ja as resolveExtensionConfig, Ji as filterExtensionRegistry, Jo as ExtensionNotification, Ka as isValidExtensionConfigItem, Ki as composeExtensionPreset, Ko as ExtensionHudStatus, La as ExtensionConfigScope, Lo as ExtensionToolResultTransform, Ma as ExtensionConfigChangeBehavior, Mo as ExtensionToolRenderer, Na as ExtensionConfigEnumItem, No as ExtensionToolRendererEntry, Oa as createExtensionPromptBridge, Oo as ExtensionStorageSurface, Pa as ExtensionConfigItem, Po as ExtensionToolRendererRegistration, Qa as ExtensionApiVersion, Qi as ExtensionInstallCandidate, Qo as createExtensionHud, Ra as ExtensionConfigStringItem, Ro as ExtensionToolVerdict, Sa as parseExtensionScanPathEnv, So as ExtensionRunTransform, Ta as discoverAndBuildExtensionRegistry, To as ExtensionSkillPolicy, Ua as WireExtensionConfigSchema, Ui as ExtensionCatalogPartition, Uo as ExtensionBannerOptions, Va as StoredExtensionConfigItem, Vo as LoadedExtension, Wa as clampExtensionConfigNumber, Wi as buildExtensionPreset, Wo as ExtensionHud, Xa as toWireConfigSchema, Xi as partitionExtensionCatalog, Xo as ExtensionNotifyTone, Ya as resolveExtensionConfigValue, Yi as mergeContributions, Yo as ExtensionNotifyOptions, Za as EMPTY_EXTENSION_REGISTRY, Zi as ExtensionFetchResult, Zo as ExtensionStatusOptions, _a as ExtensionScanEntry, _o as ExtensionPaths, aa as ExtensionInstallSource, ao as ExtensionCustomRendererEntry, as as ExtensionWorkspaceSurface, ba as inlineLoadedExtension, bo as ExtensionProviderMiddleware, ca as fetchExtensionSource, co as ExtensionGuiPanel, da as parseExtensionInstallSource, do as ExtensionKeybindingDispatchContext, ea as ExtensionInstallErrorCode, eo as ExtensionCapability, es as ExtensionHostRuntimeImpl, fa as readExtensionInstallProvenance, fo as ExtensionManifest, ga as ENTRY_CANDIDATES, go as ExtensionOrderedContribution, ha as registerExtensionHostModules, ho as ExtensionModalNode, ia as ExtensionInstallScope, io as ExtensionCustomRenderer, is as ExtensionWorkspacePair, ja as ExtensionConfigCategory, jo as ExtensionToolRenderProps, ka as defineExtension, ko as ExtensionToolCatalogTransform, la as installExtensionFromSpec, lo as ExtensionGuiSurface, ma as updateInstalledExtension, mo as ExtensionModal, na as ExtensionInstallProvenance, no as ExtensionContextTransform, ns as ExtensionSessionSummary, oa as InstallExtensionFromSpecOptions, oo as ExtensionDefinition, os as createExtensionHostRuntimeBridge, pa as removeInstalledExtension, po as ExtensionMcpConfigTransform, qa as isValidExtensionConfigValue, qi as disposeExtensionRegistry, qo as ExtensionHudWriter, ra as ExtensionInstallResult, ro as ExtensionContributions, rs as ExtensionSessionsSurface, sa as InstalledExtensionTargetOptions, so as ExtensionFooterHint, ss as createWorkspaceSurface, ta as ExtensionInstallIo, to as ExtensionContext, ts as ExtensionRuntimeSurface, ua as listExtensionCandidates, uo as ExtensionKeybinding, va as defaultExtensionScanPaths, vo as ExtensionPermission, wa as DiscoverAndBuildExtensionRegistryOptions, wo as ExtensionSessionStateSurface, xa as isExtensionDefinition, xo as ExtensionRegistry, ya as discoverExtensions, yo as ExtensionPromptTransform, za as ExtensionConfigSurface, zo as ExtensionTuiSurface } from "./index-C6Il4kBD.js";
2
- export { type BuildExtensionRegistryOptions, type DiscoverAndBuildExtensionRegistryOptions, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, type ExtensionApiVersion, type ExtensionBannerOptions, type ExtensionBehaviorTransform, type ExtensionCapability, type ExtensionCatalogPartition, type ExtensionConfigBooleanItem, type ExtensionConfigCategory, type ExtensionConfigChangeBehavior, type ExtensionConfigEnumItem, type ExtensionConfigItem, type ExtensionConfigItemBase, type ExtensionConfigNumberItem, type ExtensionConfigScope, type ExtensionConfigStringItem, type ExtensionConfigSurface, type ExtensionConfigValue, type ExtensionContext, type ExtensionContextTransform, type ExtensionContributions, type ExtensionCustomRenderer, type ExtensionCustomRendererEntry, type ExtensionDefinition, type ExtensionFetchResult, type ExtensionFooterHint, type ExtensionGuiPanel, type ExtensionGuiSurface, type ExtensionHostRuntimeBridge, type ExtensionHostRuntimeImpl, type ExtensionHud, type ExtensionHudState, type ExtensionHudStatus, type ExtensionHudWriter, type ExtensionInstallCandidate, ExtensionInstallError, type ExtensionInstallErrorCode, type ExtensionInstallIo, type ExtensionInstallProvenance, type ExtensionInstallResult, type ExtensionInstallScope, type ExtensionInstallSource, type ExtensionKeybinding, type ExtensionKeybindingDispatchContext, type ExtensionManifest, type ExtensionMcpConfigTransform, type ExtensionModal, type ExtensionModalNode, type ExtensionNotification, type ExtensionNotifyOptions, type ExtensionNotifyTone, type ExtensionOrderedContribution, type ExtensionPaths, type ExtensionPermission, type ExtensionPromptBridge, type ExtensionPromptDelivery, type ExtensionPromptTransform, type ExtensionProviderMiddleware, type ExtensionRegistry, type ExtensionRunTransform, type ExtensionRuntimeEnv, type ExtensionRuntimeSurface, type ExtensionScanEntry, type ExtensionSessionStateSurface, type ExtensionSessionSummary, type ExtensionSessionsSurface, type ExtensionSkillPolicy, type ExtensionSource, type ExtensionStatusOptions, type ExtensionStorageScope, type ExtensionStorageSurface, type ExtensionToolCatalogTransform, type ExtensionToolPolicy, type ExtensionToolRenderProps, type ExtensionToolRenderer, type ExtensionToolRendererEntry, type ExtensionToolRendererRegistration, type ExtensionToolResultMetadataRegistration, type ExtensionToolResultPatch, type ExtensionToolResultTransform, type ExtensionToolVerdict, type ExtensionTuiSurface, type ExtensionWorkspacePair, type ExtensionWorkspaceSurface, type GuiContributions, type InstallExtensionFromSpecOptions, type InstalledExtensionTargetOptions, type LoadedExtension, type StoredExtensionConfigItem, type TuiContributions, type WireExtensionConfigItem, type WireExtensionConfigSchema, buildExtensionPreset, buildExtensionRegistry, clampExtensionConfigNumber, coerceExtensionConfigInput, composeExtensionPreset, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createWorkspaceSurface, defaultExtensionScanPaths, defineExtension, discoverAndBuildExtensionRegistry, discoverExtensions, disposeExtensionRegistry, fetchExtensionSource, filterExtensionRegistry, inlineLoadedExtension, installExtensionFromSpec, isExtensionDefinition, isValidExtensionConfigItem, isValidExtensionConfigValue, listExtensionCandidates, mergeContributions, parseExtensionInstallSource, parseExtensionScanPathEnv, partitionExtensionCatalog, readExtensionInstallProvenance, registerExtensionHostModules, removeInstalledExtension, resolveExtensionConfig, resolveExtensionConfigValue, scanExtensionDirectories, toWireConfigSchema, updateInstalledExtension };
1
+ import { $a as ExtensionApiVersion, $i as ExtensionInstallError, $o as createExtensionHud, Aa as ExtensionConfigBooleanItem, Ao as ExtensionToolCatalogTransform, Ba as ExtensionConfigSurface, Bo as ExtensionTuiSurface, Ca as scanExtensionDirectories, Co as ExtensionRunTransform, Da as ExtensionPromptDelivery, Do as ExtensionSource, Ea as ExtensionPromptBridge, Eo as ExtensionSkillPolicy, Fa as ExtensionConfigItemBase, Fo as ExtensionToolRendererRegistration, Ga as clampExtensionConfigNumber, Gi as buildExtensionRegistry, Go as ExtensionHud, Ha as StoredExtensionConfigItem, Hi as BuildExtensionRegistryOptions, Ho as LoadedExtension, Ia as ExtensionConfigModelItem, Io as ExtensionToolResultMetadataRegistration, Ja as isValidExtensionConfigValue, Ji as filterExtensionRegistry, Jo as ExtensionHudWriter, Ka as coerceExtensionConfigInput, Ki as composeExtensionPreset, Ko as ExtensionHudState, La as ExtensionConfigNumberItem, Lo as ExtensionToolResultPatch, Ma as ExtensionConfigChangeBehavior, Mo as ExtensionToolRenderProps, Na as ExtensionConfigEnumItem, No as ExtensionToolRenderer, Oa as createExtensionPromptBridge, Oo as ExtensionStorageScope, Pa as ExtensionConfigItem, Po as ExtensionToolRendererEntry, Qa as EMPTY_EXTENSION_REGISTRY, Qi as ExtensionInstallCandidate, Qo as ExtensionStatusOptions, Ra as ExtensionConfigScope, Ro as ExtensionToolResultTransform, Sa as parseExtensionScanPathEnv, So as ExtensionRegistry, Ta as discoverAndBuildExtensionRegistry, To as ExtensionSessionStateSurface, Ua as WireExtensionConfigItem, Ui as ExtensionCatalogPartition, Uo as TuiContributions, Va as ExtensionConfigValue, Vo as GuiContributions, Wa as WireExtensionConfigSchema, Wi as buildExtensionPreset, Wo as ExtensionBannerOptions, Xa as resolveExtensionConfigValue, Xi as partitionExtensionCatalog, Xo as ExtensionNotifyOptions, Ya as resolveExtensionConfig, Yi as mergeContributions, Yo as ExtensionNotification, Za as toWireConfigSchema, Zi as ExtensionFetchResult, Zo as ExtensionNotifyTone, _a as ExtensionScanEntry, _o as ExtensionOrderedContribution, aa as ExtensionInstallSource, ao as ExtensionCustomRenderer, as as ExtensionSessionsSurface, ba as inlineLoadedExtension, bo as ExtensionPromptTransform, ca as fetchExtensionSource, co as ExtensionFooterHint, cs as createExtensionHostRuntimeBridge, da as parseExtensionInstallSource, do as ExtensionKeybinding, ea as ExtensionInstallErrorCode, eo as ExtensionBehaviorTransform, es as ExtensionHostRuntimeBridge, fa as readExtensionInstallProvenance, fo as ExtensionKeybindingDispatchContext, ga as ENTRY_CANDIDATES, go as ExtensionModalNode, ha as registerExtensionHostModules, ho as ExtensionModal, ia as ExtensionInstallScope, io as ExtensionContributions, is as ExtensionSessionSummary, ja as ExtensionConfigCategory, jo as ExtensionToolPolicy, ka as defineExtension, ko as ExtensionStorageSurface, la as installExtensionFromSpec, lo as ExtensionGuiPanel, ls as createWorkspaceSurface, ma as updateInstalledExtension, mo as ExtensionMcpConfigTransform, na as ExtensionInstallProvenance, no as ExtensionContext, ns as ExtensionModelEntry, oa as InstallExtensionFromSpecOptions, oo as ExtensionCustomRendererEntry, os as ExtensionWorkspacePair, pa as removeInstalledExtension, po as ExtensionManifest, qa as isValidExtensionConfigItem, qi as disposeExtensionRegistry, qo as ExtensionHudStatus, ra as ExtensionInstallResult, ro as ExtensionContextTransform, rs as ExtensionRuntimeSurface, sa as InstalledExtensionTargetOptions, so as ExtensionDefinition, ss as ExtensionWorkspaceSurface, ta as ExtensionInstallIo, to as ExtensionCapability, ts as ExtensionHostRuntimeImpl, ua as listExtensionCandidates, uo as ExtensionGuiSurface, va as defaultExtensionScanPaths, vo as ExtensionPaths, wa as DiscoverAndBuildExtensionRegistryOptions, wo as ExtensionRuntimeEnv, xa as isExtensionDefinition, xo as ExtensionProviderMiddleware, ya as discoverExtensions, yo as ExtensionPermission, za as ExtensionConfigStringItem, zo as ExtensionToolVerdict } from "./index-DFjn8nA3.js";
2
+ export { type BuildExtensionRegistryOptions, type DiscoverAndBuildExtensionRegistryOptions, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, type ExtensionApiVersion, type ExtensionBannerOptions, type ExtensionBehaviorTransform, type ExtensionCapability, type ExtensionCatalogPartition, type ExtensionConfigBooleanItem, type ExtensionConfigCategory, type ExtensionConfigChangeBehavior, type ExtensionConfigEnumItem, type ExtensionConfigItem, type ExtensionConfigItemBase, type ExtensionConfigModelItem, type ExtensionConfigNumberItem, type ExtensionConfigScope, type ExtensionConfigStringItem, type ExtensionConfigSurface, type ExtensionConfigValue, type ExtensionContext, type ExtensionContextTransform, type ExtensionContributions, type ExtensionCustomRenderer, type ExtensionCustomRendererEntry, type ExtensionDefinition, type ExtensionFetchResult, type ExtensionFooterHint, type ExtensionGuiPanel, type ExtensionGuiSurface, type ExtensionHostRuntimeBridge, type ExtensionHostRuntimeImpl, type ExtensionHud, type ExtensionHudState, type ExtensionHudStatus, type ExtensionHudWriter, type ExtensionInstallCandidate, ExtensionInstallError, type ExtensionInstallErrorCode, type ExtensionInstallIo, type ExtensionInstallProvenance, type ExtensionInstallResult, type ExtensionInstallScope, type ExtensionInstallSource, type ExtensionKeybinding, type ExtensionKeybindingDispatchContext, type ExtensionManifest, type ExtensionMcpConfigTransform, type ExtensionModal, type ExtensionModalNode, type ExtensionModelEntry, type ExtensionNotification, type ExtensionNotifyOptions, type ExtensionNotifyTone, type ExtensionOrderedContribution, type ExtensionPaths, type ExtensionPermission, type ExtensionPromptBridge, type ExtensionPromptDelivery, type ExtensionPromptTransform, type ExtensionProviderMiddleware, type ExtensionRegistry, type ExtensionRunTransform, type ExtensionRuntimeEnv, type ExtensionRuntimeSurface, type ExtensionScanEntry, type ExtensionSessionStateSurface, type ExtensionSessionSummary, type ExtensionSessionsSurface, type ExtensionSkillPolicy, type ExtensionSource, type ExtensionStatusOptions, type ExtensionStorageScope, type ExtensionStorageSurface, type ExtensionToolCatalogTransform, type ExtensionToolPolicy, type ExtensionToolRenderProps, type ExtensionToolRenderer, type ExtensionToolRendererEntry, type ExtensionToolRendererRegistration, type ExtensionToolResultMetadataRegistration, type ExtensionToolResultPatch, type ExtensionToolResultTransform, type ExtensionToolVerdict, type ExtensionTuiSurface, type ExtensionWorkspacePair, type ExtensionWorkspaceSurface, type GuiContributions, type InstallExtensionFromSpecOptions, type InstalledExtensionTargetOptions, type LoadedExtension, type StoredExtensionConfigItem, type TuiContributions, type WireExtensionConfigItem, type WireExtensionConfigSchema, buildExtensionPreset, buildExtensionRegistry, clampExtensionConfigNumber, coerceExtensionConfigInput, composeExtensionPreset, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createWorkspaceSurface, defaultExtensionScanPaths, defineExtension, discoverAndBuildExtensionRegistry, discoverExtensions, disposeExtensionRegistry, fetchExtensionSource, filterExtensionRegistry, inlineLoadedExtension, installExtensionFromSpec, isExtensionDefinition, isValidExtensionConfigItem, isValidExtensionConfigValue, listExtensionCandidates, mergeContributions, parseExtensionInstallSource, parseExtensionScanPathEnv, partitionExtensionCatalog, readExtensionInstallProvenance, registerExtensionHostModules, removeInstalledExtension, resolveExtensionConfig, resolveExtensionConfigValue, scanExtensionDirectories, toWireConfigSchema, updateInstalledExtension };
@@ -1,2 +1,2 @@
1
- import { $ as composeExtensionPreset, $t as discoverExtensions, B as ExtensionInstallError, G as readExtensionInstallProvenance, H as installExtensionFromSpec, J as createExtensionHud, K as removeInstalledExtension, Q as buildExtensionRegistry, Qt as defaultExtensionScanPaths, R as EMPTY_EXTENSION_REGISTRY, U as listExtensionCandidates, V as fetchExtensionSource, W as parseExtensionInstallSource, X as discoverAndBuildExtensionRegistry, Y as registerExtensionHostModules, Z as buildExtensionPreset, Zt as ENTRY_CANDIDATES, an as clampExtensionConfigNumber, at as createWorkspaceSurface, cn as isValidExtensionConfigValue, dn as toWireConfigSchema, en as inlineLoadedExtension, et as disposeExtensionRegistry, in as defineExtension, it as createExtensionHostRuntimeBridge, ln as resolveExtensionConfig, nn as parseExtensionScanPathEnv, nt as mergeContributions, on as coerceExtensionConfigInput, q as updateInstalledExtension, rn as scanExtensionDirectories, rt as partitionExtensionCatalog, sn as isValidExtensionConfigItem, tn as isExtensionDefinition, tt as filterExtensionRegistry, un as resolveExtensionConfigValue, z as createExtensionPromptBridge } from "./agent-Dm-ihe-r.js";
1
+ import { $ as composeExtensionPreset, $t as discoverExtensions, B as ExtensionInstallError, G as readExtensionInstallProvenance, H as installExtensionFromSpec, J as createExtensionHud, K as removeInstalledExtension, Q as buildExtensionRegistry, Qt as defaultExtensionScanPaths, R as EMPTY_EXTENSION_REGISTRY, U as listExtensionCandidates, V as fetchExtensionSource, W as parseExtensionInstallSource, X as discoverAndBuildExtensionRegistry, Y as registerExtensionHostModules, Z as buildExtensionPreset, Zt as ENTRY_CANDIDATES, an as clampExtensionConfigNumber, at as createWorkspaceSurface, cn as isValidExtensionConfigValue, dn as toWireConfigSchema, en as inlineLoadedExtension, et as disposeExtensionRegistry, in as defineExtension, it as createExtensionHostRuntimeBridge, ln as resolveExtensionConfig, nn as parseExtensionScanPathEnv, nt as mergeContributions, on as coerceExtensionConfigInput, q as updateInstalledExtension, rn as scanExtensionDirectories, rt as partitionExtensionCatalog, sn as isValidExtensionConfigItem, tn as isExtensionDefinition, tt as filterExtensionRegistry, un as resolveExtensionConfigValue, z as createExtensionPromptBridge } from "./agent-BJ1NC1pA.js";
2
2
  export { EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, ExtensionInstallError, buildExtensionPreset, buildExtensionRegistry, clampExtensionConfigNumber, coerceExtensionConfigInput, composeExtensionPreset, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createWorkspaceSurface, defaultExtensionScanPaths, defineExtension, discoverAndBuildExtensionRegistry, discoverExtensions, disposeExtensionRegistry, fetchExtensionSource, filterExtensionRegistry, inlineLoadedExtension, installExtensionFromSpec, isExtensionDefinition, isValidExtensionConfigItem, isValidExtensionConfigValue, listExtensionCandidates, mergeContributions, parseExtensionInstallSource, parseExtensionScanPathEnv, partitionExtensionCatalog, readExtensionInstallProvenance, registerExtensionHostModules, removeInstalledExtension, resolveExtensionConfig, resolveExtensionConfigValue, scanExtensionDirectories, toWireConfigSchema, updateInstalledExtension };
@@ -1 +1 @@
1
- {"version":3,"file":"generate-data-WL_yGVL6.js","names":[],"sources":["../src/chat/commands.ts","../src/zod.ts","../src/chat/generate-title.ts","../src/chat/generate-data.ts"],"sourcesContent":["/**\n * `/` command model — an extension-contributed workflow invoked by typing\n * `/<name> [args]` as the whole prompt. A command is an ordered list of\n * handler **steps**; a bare `run` is sugar for a single step. Steps share a\n * mutable `data` bag, emit local output blocks (rendered in the transcript,\n * never sent to the model), and can drive the agent via `ctx.runAgent` so a\n * workflow can interact with the LLM mid-flight.\n *\n * This module is renderer-free and node-free: the types are the authoring\n * surface extensions compile against, and `executeCommand` / the parse\n * helper are pure so they're unit-testable without a TUI. The host supplies\n * the side-effecting capabilities on the step context: `emit` (render +\n * persist local output), `runAgent` (interactive sub-run), `generateData`\n * (silent schema-pinned JSON), and the optional `session` (read-only view)\n * and `interaction` (confirm / forms / plan approval) surfaces.\n */\n\nimport type { Logger } from '../logger'\nimport type { SessionRun } from '../session'\nimport type { JsonValue, SessionTurn } from '../types'\nimport type { InferSchemaOutput, SchemaInput, StandardSchemaLike } from '../zod'\nimport type { AnswerValue, PlanPayload, PlanResponse, QuestionPayload } from './interactions'\nimport type { StreamEvent } from './types'\n\n/**\n * A block of local output a step renders into the chat.\n *\n * Plain blocks (`text` only) render as full markdown, both live and on\n * reload — use them for the output the user should read in full (e.g. a\n * final commit message). Blocks with `detail` render as a collapsed\n * `command-detail` row instead (dim `▸ label` + line-capped body with\n * \"… N more lines\") — use them for bulky supporting output (diffs, logs,\n * listings) that shouldn't drown the transcript.\n */\nexport interface CommandOutputBlock {\n /**\n * The block body — full markdown, the detail body, or (for `custom`\n * blocks) the MANDATORY fallback markdown rendered wherever the\n * renderer isn't available: extension uninstalled or disabled,\n * headless host, GUI, renderer threw. The fallback is what persists\n * as the block's output, so pre-custom hosts render it natively.\n */\n text: string\n /**\n * Render as a collapsed detail row (dim `▸ label` + line-capped body)\n * instead of full markdown. `syntax: 'diff'` additionally colors\n * `+N` / `−N` count tokens (added green / deleted red) in both label\n * and body — for diff-stat-style output.\n */\n detail?: { label?: string, syntax?: 'diff' }\n /**\n * Render through an extension-registered custom renderer\n * (`ctx.tui.registerRenderer`). `renderer` must be the NAMESPACED id\n * (`<extension>/<id>`) — `ctx.appendNote` auto-prefixes bare ids for\n * its own extension; command `emit` requires the full form. `data`\n * must be JSON-safe (it persists in the session). Takes precedence\n * over `detail` when both are set.\n */\n custom?: { renderer: string, data?: JsonValue }\n}\n\n/**\n * User-interaction surface for commands — the same prompt-slot primitives\n * the `ask_user` / `present_plan` TOOLS render, but WITHOUT the tools: a\n * command enqueues directly into the host's interaction queue. No tool\n * calls, no turns, no model involvement — the answer routes straight back\n * to the awaiting step. Every method rejects on cancel/esc, which the\n * executor classifies as a quiet abort.\n */\nexport interface CommandInteraction {\n /**\n * One-tap yes/no — sugar over a single `confirm`-type question:\n *\n * if (await ctx.interaction.confirm('Push to origin/main?')) …\n */\n confirm: (prompt: string, opts?: {\n /** Optional context shown above the question (Markdown). */\n intro?: string\n /** Label for the affirmative option. Default `'yes'`. */\n affirmLabel?: string\n /** Label for the negative option. Default `'no'`. */\n denyLabel?: string\n }) => Promise<boolean>\n /**\n * Show a form (text / textarea / select / confirm questions — identical\n * UI to the ask_user tool) and resolve with the answers keyed by\n * `Question.id` (`string` for text/select, `boolean` for confirm).\n */\n askUser: (form: QuestionPayload) => Promise<Readonly<Record<string, AnswerValue>>>\n /**\n * Present a plan for the full approval ceremony (approve / reject /\n * revise + optional comment — identical UI to present_plan). For\n * lightweight gating prefer {@link confirm}.\n */\n presentPlan: (plan: PlanPayload) => Promise<PlanResponse>\n}\n\n/**\n * Read-only view over the session a command runs inside — live getters, so\n * turns appended mid-workflow (e.g. by a `runAgent` sub-run) are visible on\n * the next read. Deliberately projection-only: no mutators, so commands\n * can't bypass the display-only `command`-turn contract or the wire guard\n * (`isWireTurn`). Persisting output goes through `emit`; driving the\n * conversation goes through `runAgent`.\n */\nexport interface CommandSessionView {\n readonly id: string\n /** Full persisted history, including display-only `command` turns. */\n readonly turns: readonly SessionTurn[]\n /** Run records (status, usage, cost, `origin`, …), newest last. */\n readonly runs: readonly SessionRun[]\n readonly metadata: Readonly<Record<string, unknown>>\n}\n\n/** Options for `ctx.generateData` — a silent, schema-pinned model call. */\nexport interface CommandGenerateDataOptions {\n /** Instruction describing the value to produce. */\n prompt: string\n /**\n * Shape of the result — a zod v4 schema (return type inferred, no casts)\n * or a plain JSON Schema object (name the type via the generic).\n */\n schema: SchemaInput\n /** Optional system prompt override. */\n system?: string\n /**\n * Fold a compacted transcript of the recent conversation into the call as\n * context. Default false — most workflow values derive from data the\n * command already gathered itself.\n */\n includeConversation?: boolean\n}\n\n/** Result of driving the agent from within a step via `ctx.runAgent`. */\nexport interface CommandAgentResult {\n /** The assistant's final text for this sub-run. */\n text: string\n}\n\n/** Capabilities + inputs handed to every step. */\nexport interface CommandStepContext {\n /** Raw text after `/<name>` (trimmed of the leading space). */\n readonly args: string\n /** `args` split on whitespace, empties removed. */\n readonly argv: readonly string[]\n /** Mutable bag threaded across steps; a step's returned `data` is merged in. */\n readonly data: Record<string, unknown>\n /** Render + persist a local output block. */\n readonly emit: (block: CommandOutputBlock) => void\n /**\n * Drive one agent run to completion and return its result. The prompt is\n * injected as a real user turn (model-visible, unchanged on the wire) and\n * the response streams into the transcript. Serialized with the host's run\n * slot, so a workflow can interleave deterministic steps with LLM\n * interaction. Any output `emit`ted before this call is flushed first,\n * preserving transcript order.\n *\n * `opts.display` replaces the full-prompt echo in the transcript with a\n * short line (the full prompt still renders beneath it as a collapsed\n * detail row, and still reaches the model verbatim) — pass it when the\n * prompt embeds bulky material like a diff.\n */\n readonly runAgent: (prompt: string, opts?: { readonly display?: string }) => Promise<CommandAgentResult>\n /**\n * Generate schema-conforming JSON with ONE silent model call — no session\n * turns, no transcript output, nothing added to the conversation (the\n * workflow presents results itself via `emit`). Reach for this when a\n * step needs a VALUE (a commit message, a classification, extracted\n * fields); reach for `runAgent` when it needs an interactive sub-run\n * with tools and streaming.\n */\n readonly generateData: {\n /** zod v4 schema → the result type is inferred from the schema. */\n <S extends StandardSchemaLike>(opts: Omit<CommandGenerateDataOptions, 'schema'> & { schema: S }): Promise<InferSchemaOutput<S>>\n /** Plain JSON Schema → name the result type explicitly. */\n <T = unknown>(opts: CommandGenerateDataOptions): Promise<T>\n }\n /** Logger with a `command=<name>` binding, routed to the host's log funnel. */\n readonly logger: Logger\n /** Aborts when the user presses esc during execution. */\n readonly signal: AbortSignal\n /** Working directory the command runs against. */\n readonly cwd: string\n /**\n * The surrounding session, when the host runs commands inside one (the\n * TUI always does). ABSENT in session-less contexts — a command that\n * reads it must guard (`if (!ctx.session) …`) or degrade gracefully.\n */\n readonly session?: CommandSessionView\n /**\n * User interaction (confirm / forms / plan approval), when the host has\n * an interactive surface (the TUI always does). ABSENT on UI-less hosts\n * — guard (`if (!ctx.interaction) …`) and degrade gracefully.\n */\n readonly interaction?: CommandInteraction\n}\n\n/** Optional per-step return — `data` is merged into the shared bag for later steps. */\nexport interface CommandStepResult {\n data?: Record<string, unknown>\n}\n\nexport type CommandStepFn = (\n ctx: CommandStepContext,\n) => void | CommandStepResult | Promise<void | CommandStepResult>\n\nexport interface CommandStep {\n run: CommandStepFn\n}\n\n/** One argument suggestion returned by {@link Command.completeArgs}. */\nexport interface CommandArgSuggestion {\n /** Text inserted after `/<name> ` on accept. */\n value: string\n /** Display label. Defaults to `value`. */\n label?: string\n description?: string\n}\n\n/** An extension-contributed `/` command. Provide EITHER `run` (one step) or `steps`. */\nexport interface Command {\n /** Invoked as `/<name>`. Lowercase, no whitespace. */\n name: string\n /** One-line summary shown in the completion popover. */\n description: string\n /** Single-step sugar. */\n run?: CommandStepFn\n /** Explicit ordered pipeline. Takes precedence over `run` when both are set. */\n steps?: readonly CommandStep[]\n /**\n * Argument completion — called while the user types `/<name> <prefix>▌`\n * with everything after the command name (may itself contain spaces).\n * Return suggestions to show in the `/` popover; return `[]`/`undefined`\n * for none. Sync or async.\n */\n completeArgs?: (argsPrefix: string) => readonly CommandArgSuggestion[] | undefined | Promise<readonly CommandArgSuggestion[] | undefined>\n}\n\n/**\n * Persisted form of output blocks inside a display-only `command` turn:\n * plain blocks → `text` content; `detail` blocks → `tool_result` content\n * with the label/syntax carried in namespaced metadata (rebuilt into the\n * collapsed rendering on reload). Shared by the command emit flush and\n * `ctx.appendNote` so both persist identically.\n */\nexport function commandBlocksToContent(blocks: readonly CommandOutputBlock[]): SessionTurn['content'] {\n return blocks.map((block) => {\n if (!block.detail && !block.custom)\n return { type: 'text' as const, text: block.text }\n // Custom blocks persist with the FALLBACK as the output — an older\n // zidane (or any host without the renderer) reads this turn as a\n // plain detail block and renders the fallback natively. The renderer\n // binding rides namespaced metadata, exactly like detail label/syntax.\n const commandMeta: Record<string, JsonValue> = block.custom\n ? { custom: { renderer: block.custom.renderer, ...(block.custom.data !== undefined ? { data: block.custom.data } : {}) } }\n : {\n ...(block.detail?.label ? { label: block.detail.label } : {}),\n ...(block.detail?.syntax ? { syntax: block.detail.syntax } : {}),\n }\n return {\n type: 'tool_result' as const,\n callId: `command_detail_${crypto.randomUUID()}`,\n output: block.text,\n ...(Object.keys(commandMeta).length > 0 ? { metadata: { command: commandMeta } } : {}),\n }\n })\n}\n\n/**\n * Map ONE command-output block to its LIVE transcript event — the\n * in-memory mirror of {@link commandBlocksToContent}'s persisted shape\n * (whose replay side lives in `eventsFromTurns`). One definition shared\n * by the command emit flush and the `ctx.appendNote` host impl so live\n * rendering can never drift from reloaded rendering — the exact drift\n * that shipped `custom` blocks rendering only after a reload.\n *\n * Precedence matches the persisted side: `custom` > `detail` > markdown.\n */\nexport function commandBlockToEvent(block: CommandOutputBlock): StreamEvent {\n if (block.custom) {\n return {\n kind: 'custom',\n text: block.text,\n custom: {\n renderer: block.custom.renderer,\n ...(block.custom.data !== undefined ? { data: block.custom.data } : {}),\n },\n }\n }\n if (block.detail) {\n return {\n kind: 'command-detail',\n text: block.text,\n ...(block.detail.label ? { label: block.detail.label } : {}),\n ...(block.detail.syntax ? { syntax: block.detail.syntax } : {}),\n }\n }\n return { kind: 'markdown', text: block.text, streaming: false }\n}\n\n/** Normalize a command to its ordered step list (`steps` wins over `run`). */\nexport function commandSteps(command: Command): readonly CommandStep[] {\n if (command.steps && command.steps.length > 0)\n return command.steps\n if (command.run)\n return [{ run: command.run }]\n return []\n}\n\n/** Parsed `/<name> [args]` invocation. */\nexport interface CommandInvocation {\n name: string\n /** Text after the name, trimmed. */\n args: string\n /** `args` split on whitespace. */\n argv: string[]\n}\n\n/**\n * Parse a prompt as a command invocation, but only when the command token is\n * the LEADING token of the whole prompt and names a known command. This is\n * what keeps mid-prompt `/skill` mentions routed to the skills provider:\n * `\"summarize /research\"` is not a command, `\"/research foo\"` is.\n *\n * `knownNames` is matched case-insensitively; the returned `name` is the\n * canonical (registered) casing.\n */\nexport function parseCommandInvocation(\n prompt: string,\n knownNames: readonly string[],\n): CommandInvocation | null {\n const body = prompt.trimStart()\n if (body[0] !== '/')\n return null\n // First token = the command name; the remainder (after the first run of\n // whitespace) is the args. Linear scan — no backtracking-prone regex.\n const afterSlash = body.slice(1)\n const wsIdx = afterSlash.search(/\\s/)\n const typed = (wsIdx === -1 ? afterSlash : afterSlash.slice(0, wsIdx)).toLowerCase()\n if (typed.length === 0)\n return null\n const canonical = knownNames.find(n => n.toLowerCase() === typed)\n if (canonical === undefined)\n return null\n const args = (wsIdx === -1 ? '' : afterSlash.slice(wsIdx + 1)).trim()\n return { name: canonical, args, argv: args.length > 0 ? args.split(/\\s+/) : [] }\n}\n\n/** Outcome of a command run. `error` is set when a step threw (pipeline stops). */\nexport interface CommandExecution {\n ok: boolean\n /** Number of steps that ran (including the one that threw). */\n ranSteps: number\n error?: unknown\n /** True when the run stopped because `ctx.signal` aborted. */\n aborted?: boolean\n}\n\n/**\n * Run a command's steps in order, threading `ctx.data`. Stops at the first\n * step that throws (error isolated + returned, not rethrown) or when the\n * signal aborts. Pure orchestration — all I/O lives in the host-supplied\n * `ctx` capabilities.\n */\nexport async function executeCommand(\n command: Command,\n ctx: CommandStepContext,\n): Promise<CommandExecution> {\n const steps = commandSteps(command)\n let ranSteps = 0\n for (const step of steps) {\n if (ctx.signal.aborted)\n return { ok: false, ranSteps, aborted: true }\n ranSteps++\n try {\n const result = await step.run(ctx)\n if (result && result.data)\n Object.assign(ctx.data, result.data)\n }\n catch (error) {\n // An esc mid-step usually surfaces as a thrown AbortError from whatever\n // I/O the handler had in flight. Classify by the signal so hosts can\n // stay quiet on user-initiated aborts instead of painting an error.\n if (ctx.signal.aborted)\n return { ok: false, ranSteps, aborted: true }\n return { ok: false, ranSteps, error }\n }\n }\n return { ok: true, ranSteps }\n}\n","/**\n * Zod v4 integration helpers.\n *\n * Zod is an OPTIONAL peer dependency, so this module never imports it at the\n * top level. Schema-accepting APIs (`ctx.generateData`, `generateStructuredData`)\n * take either a plain JSON Schema object or any Standard-Schema-carrying\n * value (https://standardschema.dev — zod v4 implements it). Zod schemas are\n * detected structurally by vendor and converted with a lazy\n * `import('zod')` — safe because whoever constructed the schema necessarily\n * has zod installed. Result types are inferred from the standard-schema\n * `types.output` slot, so callers get full typing without a single cast:\n *\n * const CommitMessage = z.object({ subject: z.string(), body: z.string().optional() })\n * const msg = await ctx.generateData({ prompt, schema: CommitMessage })\n * // ^? { subject: string, body?: string }\n */\n\n/**\n * Structural stand-in for a Standard Schema (zod v4 et al.) — enough surface\n * to detect the vendor and infer the output type WITHOUT importing zod's\n * types into our public API.\n */\nexport interface StandardSchemaLike<Output = unknown> {\n readonly '~standard': {\n readonly version: number\n readonly vendor: string\n /** Type-level only (undefined at runtime) — carries the inferred output type. */\n readonly types?: { readonly output: Output } | undefined\n }\n}\n\n/** Output type carried by a {@link StandardSchemaLike}; `unknown` for plain JSON Schema. */\nexport type InferSchemaOutput<S> = S extends StandardSchemaLike<infer O> ? O : unknown\n\n/** A schema-accepting input: plain JSON Schema, or a Standard Schema (e.g. zod v4). */\nexport type SchemaInput = Record<string, unknown> | StandardSchemaLike\n\nexport function isStandardSchema(value: unknown): value is StandardSchemaLike {\n if (typeof value !== 'object' || value === null)\n return false\n const marker = (value as Record<string, unknown>)['~standard']\n return typeof marker === 'object' && marker !== null\n && typeof (marker as Record<string, unknown>).vendor === 'string'\n}\n\n/**\n * Resolve a {@link SchemaInput} to the plain JSON Schema object providers\n * expect. Zod schemas convert via the lazily-imported `z.toJSONSchema`\n * (v4 native); other Standard Schema vendors are rejected with a clear\n * error — conversion is vendor-specific and only zod is wired today.\n */\nexport async function resolveSchemaInput(schema: SchemaInput): Promise<Record<string, unknown>> {\n if (!isStandardSchema(schema))\n return schema\n const vendor = schema['~standard'].vendor\n if (vendor !== 'zod') {\n throw new Error(\n `unsupported schema vendor \"${vendor}\" — pass a zod v4 schema or a plain JSON Schema object`,\n )\n }\n // Lazy + guarded: zod is an optional peer, but a zod schema in hand means\n // the caller's process has zod — this import only fails on truly broken\n // installs, and then with an actionable message.\n let toJSONSchema: (schema: unknown) => Record<string, unknown>\n try {\n const zod = await import('zod')\n toJSONSchema = zod.z.toJSONSchema as typeof toJSONSchema\n }\n catch {\n throw new Error('a zod schema was passed but the \"zod\" package could not be imported — install zod >= 4')\n }\n return zodToJsonSchema(toJSONSchema(schema))\n}\n\n/**\n * Normalize a JSON Schema (e.g. from zod v4's z.toJSONSchema()) for use\n * as a ToolSpec.inputSchema.\n *\n * Strips the $schema key that some providers reject.\n */\nexport function zodToJsonSchema(jsonSchema: Record<string, unknown>): Record<string, unknown> {\n const { $schema, ...rest } = jsonSchema\n return rest\n}\n","/**\n * One-shot title generation for an existing session — feeds the last N\n * turns to the provider with a \"write me a title\" system prompt and\n * returns the cleaned-up result.\n *\n * Provider-agnostic: works with anything implementing the renderer-\n * shared `Provider` interface. No tools, no session mutation, no\n * caching — this is a cheap, isolated completion that should be safe to\n * fire even mid-session without touching the live agent loop.\n */\n\nimport type { Provider } from '../providers'\nimport type { SessionTurn } from '../types'\n\n/** Hard cap on the result length. Anything longer is truncated client-side. */\nconst TITLE_MAX_CHARS = 60\n\n/** Default turn count fed to the model. 10 covers most exchanges without bloat. */\nconst DEFAULT_MAX_TURNS = 10\n\n/** Tokens budgeted for the model's reply. 64 fits any sane title with headroom. */\nconst TITLE_RESPONSE_MAX_TOKENS = 64\n\n/** Per-turn body cap when assembling the prompt — keeps the request payload tight. */\nconst PROMPT_TURN_CHAR_MAX = 2000\n\nexport interface GenerateSessionTitleOptions {\n provider: Provider\n /** Model id used for the call. */\n model: string\n /** Conversation history to summarize. Empty → throws synchronously. */\n turns: readonly SessionTurn[]\n /** Cap on how many trailing turns to feed the model. Defaults to 10. */\n maxTurns?: number\n /** Optional cancellation signal — forwarded to the provider's stream. */\n signal?: AbortSignal\n}\n\n/**\n * Drive the provider's `stream()` once and return a concise title for\n * the conversation represented by `turns`. Throws when:\n * - `turns` contains no text-bearing content (nothing to summarize),\n * - the provider stream completes with no output text,\n * - `signal` is aborted (rethrown verbatim).\n *\n * Output is trimmed, single-line, with surrounding quotes / trailing\n * punctuation stripped, and truncated to `TITLE_MAX_CHARS`.\n */\nexport async function generateSessionTitle({\n provider,\n model,\n turns,\n maxTurns = DEFAULT_MAX_TURNS,\n signal,\n}: GenerateSessionTitleOptions): Promise<string> {\n const slice = turns.slice(-Math.max(1, maxTurns))\n const transcript = renderTurnsForPrompt(slice)\n if (!transcript)\n throw new Error('No text content in the recent turns to summarize.')\n\n const system = [\n 'You generate concise, descriptive titles for chat conversations.',\n 'Reply with ONLY the title — no quotes, no markdown, no trailing punctuation,',\n 'no preamble (do not say \"Title:\" or similar).',\n `Aim for 3 to 7 words and stay under ${TITLE_MAX_CHARS} characters.`,\n ].join(' ')\n\n const userPrompt = `Generate a title for this conversation:\\n\\n${transcript}`\n\n let text = ''\n const result = await provider.stream(\n {\n model,\n system,\n tools: [],\n messages: [provider.userMessage(userPrompt)],\n maxTokens: TITLE_RESPONSE_MAX_TOKENS,\n ...(signal ? { signal } : {}),\n },\n {\n onText: (delta) => { text += delta },\n },\n )\n // Prefer the streamed-text accumulator (driven by deltas) but fall\n // back to the provider's already-concatenated `result.text` for\n // adapters that batch on the final frame instead of emitting deltas.\n const raw = text.trim().length > 0 ? text : result.text\n return cleanTitle(raw)\n}\n\n/**\n * Decide whether a session is ready for one-shot automatic titling.\n *\n * Returns `true` iff the conversation has had its first exchange — at\n * least two turns, i.e. the opening user message plus the assistant's\n * reply (this is exactly the \"N turns\" count the sessions list shows) —\n * AND no explicit title has been set yet. An existing `metadata.title`\n * (a previous auto-generation, or a manual title from the session-details\n * \"generate title\" action) is never clobbered.\n *\n * Pure + total. The runtime layers its own \"is one already in flight?\"\n * and \"is a provider picked?\" guards on top of this; the predicate only\n * encodes the content-level rule so it can be pinned in tests without a\n * mock provider — same rationale as the exported {@link cleanTitle}.\n */\nexport function shouldAutoGenerateTitle(\n turns: readonly SessionTurn[],\n metadata?: Record<string, unknown>,\n): boolean {\n const existing = typeof metadata?.title === 'string' ? metadata.title.trim() : ''\n if (existing.length > 0)\n return false\n return turns.length >= 2\n}\n\n/**\n * Compact a turn list into a transcript-style prompt:\n *\n * user: …\n * assistant: …\n * user: …\n *\n * Tool calls and tool results are summarized to keep the request\n * payload small — the model needs the rough flow of the conversation,\n * not full JSON blobs. Per-turn text is clipped at `PROMPT_TURN_CHAR_MAX`\n * so a single huge code dump doesn't blow the budget.\n *\n * Returns an empty string when the slice has no text-bearing content\n * (e.g. a turn list that's only tool plumbing).\n *\n * Exported for reuse by other silent one-shot helpers (`generate-data`'s\n * optional conversation context) so every side-channel inference compacts\n * history the same way.\n */\nexport function renderTurnsForPrompt(turns: readonly SessionTurn[]): string {\n const lines: string[] = []\n for (const turn of turns) {\n const body = textBodyOf(turn)\n if (!body)\n continue\n const role = turn.role === 'assistant' ? 'assistant' : turn.role === 'user' ? 'user' : 'system'\n lines.push(`${role}: ${clip(body, PROMPT_TURN_CHAR_MAX)}`)\n }\n return lines.join('\\n\\n')\n}\n\nfunction textBodyOf(turn: SessionTurn): string {\n const parts: string[] = []\n for (const block of turn.content) {\n if (block.type === 'text' && block.text.trim())\n parts.push(block.text.trim())\n else if (block.type === 'tool_call')\n parts.push(`[tool: ${block.name}]`)\n else if (block.type === 'tool_result')\n parts.push(`[tool result]`)\n }\n return parts.join(' ')\n}\n\n/**\n * Normalize a model-generated title into the shape we want to persist:\n *\n * - Collapse internal whitespace + take the first line only (some\n * models emit \"Title: foo\\n\\nReason: …\" despite instructions).\n * - Strip surrounding quote characters (`\"foo\"`, `'foo'`, `` `foo` ``).\n * - Strip a leading `Title:` / `title -` prefix if the model added one.\n * - Strip trailing punctuation (`.`, `!`, `?`) — titles read cleaner\n * without it.\n * - Truncate to `TITLE_MAX_CHARS` with a trailing `…` when over.\n *\n * Exported as `cleanTitle` so tests can pin the normalization rules\n * without going through a mock provider.\n */\nexport function cleanTitle(raw: string): string {\n let s = raw.split('\\n')[0]?.trim() ?? ''\n // Strip a \"Title:\" / \"Title -\" preamble the model sometimes adds.\n s = s.replace(/^\\s*title\\s*[:\\-–—]\\s*/i, '')\n // Strip surrounding matched quotes.\n if (s.length >= 2) {\n const first = s.charAt(0)\n const last = s.charAt(s.length - 1)\n const matched = (first === '\"' && last === '\"')\n || (first === '\\'' && last === '\\'')\n || (first === '`' && last === '`')\n || (first === '“' && last === '”')\n if (matched)\n s = s.slice(1, -1).trim()\n }\n // Trim trailing terminal punctuation — titles don't take periods.\n s = s.replace(/[.!?]+$/, '').trim()\n if (s.length === 0)\n throw new Error('Model returned an empty title.')\n return s.length > TITLE_MAX_CHARS ? `${s.slice(0, TITLE_MAX_CHARS - 1)}…` : s\n}\n\nfunction clip(text: string, max: number): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n","/**\n * Silent structured-output generation — one provider call that returns\n * schema-conforming JSON without touching the session or the transcript.\n *\n * Modeled on the two proven side-channel patterns in the codebase:\n * - `generate-title.ts`: a single `provider.stream()` with no session\n * writes and no transcript events (optionally seeded with a compacted\n * conversation transcript), and\n * - the loop's `__output__` schema enforcement: a synthetic tool whose\n * `inputSchema` IS the requested JSON Schema, with `toolChoice` pinned\n * so the model must answer with a conforming payload.\n *\n * Used by `/` commands via `ctx.generateData` to derive values from the\n * model (or from the conversation) mid-workflow without bloating the chat\n * history — e.g. `/commit` generating `{ subject, body }` from a diff.\n * For genuinely interactive sub-runs (real turns, streaming, tools), use\n * `ctx.runAgent` instead.\n */\n\nimport type { Provider, ToolSpec } from '../providers'\nimport type { SessionTurn } from '../types'\nimport type { InferSchemaOutput, SchemaInput, StandardSchemaLike } from '../zod'\nimport { resolveSchemaInput } from '../zod'\nimport { renderTurnsForPrompt } from './generate-title'\n\n/** Synthetic forced-choice tool name (never persisted — the call is side-channel only). */\nconst DATA_TOOL_NAME = '__data__'\n\n/** Default cap on conversation turns folded into the context block. */\nconst DEFAULT_CONTEXT_TURNS = 12\n\nexport interface GenerateStructuredDataOptions {\n provider: Provider\n model: string\n /** Instruction describing the value to produce. */\n prompt: string\n /**\n * Shape of the result — a plain JSON Schema object, or a zod v4 schema\n * (converted automatically; the return type is then inferred from it).\n * Becomes the forced tool's inputSchema.\n */\n schema: SchemaInput\n /** Optional system prompt. Defaults to a terse data-extraction persona. */\n system?: string\n /**\n * Conversation turns to fold in as compacted context (same clipping as\n * session auto-titling). Omit or pass empty for a context-free call.\n */\n turns?: readonly SessionTurn[]\n /** Cap on turns rendered into the context block. Default 12 (most recent). */\n maxContextTurns?: number\n signal?: AbortSignal\n}\n\n/**\n * Drive one schema-pinned provider call and return the conforming payload.\n * Throws when the provider returns no structured payload (and rethrows\n * aborts verbatim). The caller owns presentation — nothing is rendered or\n * persisted here.\n *\n * Pass a zod v4 schema and the return type is inferred from it; pass a\n * plain JSON Schema object and name the type via the generic.\n */\nexport async function generateStructuredData<S extends StandardSchemaLike>(\n options: GenerateStructuredDataOptions & { schema: S },\n): Promise<InferSchemaOutput<S>>\nexport async function generateStructuredData<T = unknown>(\n options: GenerateStructuredDataOptions,\n): Promise<T>\nexport async function generateStructuredData(\n options: GenerateStructuredDataOptions,\n): Promise<unknown> {\n const { provider, model, prompt, signal } = options\n const spec: ToolSpec = {\n name: DATA_TOOL_NAME,\n description: 'Return the result. The input of this call IS the answer — it must conform to the schema.',\n inputSchema: await resolveSchemaInput(options.schema),\n }\n\n const contextTurns = options.turns && options.turns.length > 0\n ? options.turns.slice(-(options.maxContextTurns ?? DEFAULT_CONTEXT_TURNS))\n : []\n const transcript = contextTurns.length > 0 ? renderTurnsForPrompt(contextTurns) : ''\n const userPrompt = transcript\n ? `<conversation>\\n${transcript}\\n</conversation>\\n\\n${prompt}`\n : prompt\n\n const result = await provider.stream(\n {\n model,\n system: options.system\n ?? `You produce structured data. Call the ${DATA_TOOL_NAME} tool exactly once with the requested value. No prose.`,\n tools: provider.formatTools([spec]),\n messages: [provider.userMessage(userPrompt)],\n toolChoice: { type: 'tool', name: DATA_TOOL_NAME },\n ...(signal ? { signal } : {}),\n },\n {\n onText: () => {},\n },\n )\n\n const payload = result.toolCalls.find(tc => tc.name === DATA_TOOL_NAME)?.input\n if (payload === undefined)\n throw new Error('generateStructuredData: the model returned no structured payload')\n return payload\n}\n"],"mappings":";;;;;;;;AAqPA,SAAgB,uBAAuB,QAA+D;CACpG,OAAO,OAAO,KAAK,UAAU;EAC3B,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,QAC1B,OAAO;GAAE,MAAM;GAAiB,MAAM,MAAM;EAAK;EAKnD,MAAM,cAAyC,MAAM,SACjD,EAAE,QAAQ;GAAE,UAAU,MAAM,OAAO;GAAU,GAAI,MAAM,OAAO,SAAS,KAAA,IAAY,EAAE,MAAM,MAAM,OAAO,KAAK,IAAI,CAAC;EAAG,EAAE,IACvH;GACE,GAAI,MAAM,QAAQ,QAAQ,EAAE,OAAO,MAAM,OAAO,MAAM,IAAI,CAAC;GAC3D,GAAI,MAAM,QAAQ,SAAS,EAAE,QAAQ,MAAM,OAAO,OAAO,IAAI,CAAC;EAChE;EACJ,OAAO;GACL,MAAM;GACN,QAAQ,kBAAkB,OAAO,WAAW;GAC5C,QAAQ,MAAM;GACd,GAAI,OAAO,KAAK,WAAW,CAAC,CAAC,SAAS,IAAI,EAAE,UAAU,EAAE,SAAS,YAAY,EAAE,IAAI,CAAC;EACtF;CACF,CAAC;AACH;;;;;;;;;;;AAYA,SAAgB,oBAAoB,OAA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AAM,EAAE,QAAQ,mBAAmB,sBAAsB,IACvE,CAAC;CACL,MAAM,aAAa,aAAa,SAAS,IAAI,qBAAqB,YAAY,IAAI;CAClF,MAAM,aAAa,aACf,mBAAmB,WAAW,uBAAuB,WACrD;CAiBJ,MAAM,WAAU,MAfK,SAAS,OAC5B;EACE;EACA,QAAQ,QAAQ,UACX,yCAAyC,eAAe;EAC7D,OAAO,SAAS,YAAY,CAAC,IAAI,CAAC;EAClC,UAAU,CAAC,SAAS,YAAY,UAAU,CAAC;EAC3C,YAAY;GAAE,MAAM;GAAQ,MAAM;EAAe;EACjD,GAAI,SAAS,EAAE,OAAO,IAAI,CAAC;CAC7B,GACA,EACE,cAAc,CAAC,EACjB,CACF,EAAA,CAEuB,UAAU,MAAK,OAAM,GAAG,SAAS,cAAc,CAAC,EAAE;CACzE,IAAI,YAAY,KAAA,GACd,MAAM,IAAI,MAAM,kEAAkE;CACpF,OAAO;AACT"}
1
+ {"version":3,"file":"generate-data-WL_yGVL6.js","names":[],"sources":["../src/chat/commands.ts","../src/zod.ts","../src/chat/generate-title.ts","../src/chat/generate-data.ts"],"sourcesContent":["/**\n * `/` command model — an extension-contributed workflow invoked by typing\n * `/<name> [args]` as the whole prompt. A command is an ordered list of\n * handler **steps**; a bare `run` is sugar for a single step. Steps share a\n * mutable `data` bag, emit local output blocks (rendered in the transcript,\n * never sent to the model), and can drive the agent via `ctx.runAgent` so a\n * workflow can interact with the LLM mid-flight.\n *\n * This module is renderer-free and node-free: the types are the authoring\n * surface extensions compile against, and `executeCommand` / the parse\n * helper are pure so they're unit-testable without a TUI. The host supplies\n * the side-effecting capabilities on the step context: `emit` (render +\n * persist local output), `runAgent` (interactive sub-run), `generateData`\n * (silent schema-pinned JSON), and the optional `session` (read-only view)\n * and `interaction` (confirm / forms / plan approval) surfaces.\n */\n\nimport type { Logger } from '../logger'\nimport type { SessionRun } from '../session'\nimport type { JsonValue, SessionTurn } from '../types'\nimport type { InferSchemaOutput, SchemaInput, StandardSchemaLike } from '../zod'\nimport type { AnswerValue, PlanPayload, PlanResponse, QuestionPayload } from './interactions'\nimport type { StreamEvent } from './types'\n\n/**\n * A block of local output a step renders into the chat.\n *\n * Plain blocks (`text` only) render as full markdown, both live and on\n * reload — use them for the output the user should read in full (e.g. a\n * final commit message). Blocks with `detail` render as a collapsed\n * `command-detail` row instead (dim `▸ label` + line-capped body with\n * \"… N more lines\") — use them for bulky supporting output (diffs, logs,\n * listings) that shouldn't drown the transcript.\n */\nexport interface CommandOutputBlock {\n /**\n * The block body — full markdown, the detail body, or (for `custom`\n * blocks) the MANDATORY fallback markdown rendered wherever the\n * renderer isn't available: extension uninstalled or disabled,\n * headless host, GUI, renderer threw. The fallback is what persists\n * as the block's output, so pre-custom hosts render it natively.\n */\n text: string\n /**\n * Render as a collapsed detail row (dim `▸ label` + line-capped body)\n * instead of full markdown. `syntax: 'diff'` additionally colors\n * `+N` / `−N` count tokens (added green / deleted red) in both label\n * and body — for diff-stat-style output.\n */\n detail?: { label?: string, syntax?: 'diff' }\n /**\n * Render through an extension-registered custom renderer\n * (`ctx.tui.registerRenderer`). `renderer` must be the NAMESPACED id\n * (`<extension>/<id>`) — `ctx.appendNote` auto-prefixes bare ids for\n * its own extension; command `emit` requires the full form. `data`\n * must be JSON-safe (it persists in the session). Takes precedence\n * over `detail` when both are set.\n */\n custom?: { renderer: string, data?: JsonValue }\n}\n\n/**\n * User-interaction surface for commands — the same prompt-slot primitives\n * the `ask_user` / `present_plan` TOOLS render, but WITHOUT the tools: a\n * command enqueues directly into the host's interaction queue. No tool\n * calls, no turns, no model involvement — the answer routes straight back\n * to the awaiting step. Every method rejects on cancel/esc, which the\n * executor classifies as a quiet abort.\n */\nexport interface CommandInteraction {\n /**\n * One-tap yes/no — sugar over a single `confirm`-type question:\n *\n * if (await ctx.interaction.confirm('Push to origin/main?')) …\n */\n confirm: (prompt: string, opts?: {\n /** Optional context shown above the question (Markdown). */\n intro?: string\n /** Label for the affirmative option. Default `'yes'`. */\n affirmLabel?: string\n /** Label for the negative option. Default `'no'`. */\n denyLabel?: string\n }) => Promise<boolean>\n /**\n * Show a form (text / textarea / select / confirm questions — identical\n * UI to the ask_user tool) and resolve with the answers keyed by\n * `Question.id` (`string` for text/select, `boolean` for confirm,\n * `string[]` of choice ids for `multi: true` selects).\n */\n askUser: (form: QuestionPayload) => Promise<Readonly<Record<string, AnswerValue>>>\n /**\n * Present a plan for the full approval ceremony (approve / reject /\n * revise + optional comment — identical UI to present_plan). For\n * lightweight gating prefer {@link confirm}.\n */\n presentPlan: (plan: PlanPayload) => Promise<PlanResponse>\n}\n\n/**\n * Read-only view over the session a command runs inside — live getters, so\n * turns appended mid-workflow (e.g. by a `runAgent` sub-run) are visible on\n * the next read. Deliberately projection-only: no mutators, so commands\n * can't bypass the display-only `command`-turn contract or the wire guard\n * (`isWireTurn`). Persisting output goes through `emit`; driving the\n * conversation goes through `runAgent`.\n */\nexport interface CommandSessionView {\n readonly id: string\n /** Full persisted history, including display-only `command` turns. */\n readonly turns: readonly SessionTurn[]\n /** Run records (status, usage, cost, `origin`, …), newest last. */\n readonly runs: readonly SessionRun[]\n readonly metadata: Readonly<Record<string, unknown>>\n}\n\n/** Options for `ctx.generateData` — a silent, schema-pinned model call. */\nexport interface CommandGenerateDataOptions {\n /** Instruction describing the value to produce. */\n prompt: string\n /**\n * Shape of the result — a zod v4 schema (return type inferred, no casts)\n * or a plain JSON Schema object (name the type via the generic).\n */\n schema: SchemaInput\n /** Optional system prompt override. */\n system?: string\n /**\n * Fold a compacted transcript of the recent conversation into the call as\n * context. Default false — most workflow values derive from data the\n * command already gathered itself.\n */\n includeConversation?: boolean\n /**\n * Model id to run the call on (must exist in the host's model catalog —\n * see `ctx.runtime.models()` on the extension context). Omit to use the\n * session's active model.\n */\n model?: string\n}\n\n/** One task for {@link CommandStepContext.spawnAgents} — an isolated child agent run. */\nexport interface CommandSpawnTask {\n /** Task prompt for the child agent. Brief it like a colleague — it has no conversation context. */\n prompt: string\n /**\n * Model id from the host catalog (`ctx.runtime.models()` on the extension\n * context). Omit to inherit the session's active model. Unknown ids reject\n * the task (`status: 'rejected'`) without running anything.\n */\n model?: string\n /** System prompt override for the child. Inherits the agent's system prompt when omitted. */\n system?: string\n /** Short display label carried back on the result (defaults to the child id). */\n label?: string\n}\n\n/** Outcome of one {@link CommandSpawnTask}. */\nexport interface CommandSpawnResult {\n /** The task's `label` (or the child id when none was given). */\n label: string\n /** Model the task asked for, when pinned. */\n model?: string\n /** Terminal status. `'rejected'` = refused before running (unknown model, caps). */\n status: 'completed' | 'aborted' | 'timeout' | 'error' | 'rejected'\n /** The child's final assistant text. Empty unless `status === 'completed'`. */\n text: string\n /** Full formatted result / diagnostic (always set; useful for non-completed statuses). */\n message: string\n}\n\n/** Result of driving the agent from within a step via `ctx.runAgent`. */\nexport interface CommandAgentResult {\n /** The assistant's final text for this sub-run. */\n text: string\n}\n\n/** Capabilities + inputs handed to every step. */\nexport interface CommandStepContext {\n /** Raw text after `/<name>` (trimmed of the leading space). */\n readonly args: string\n /** `args` split on whitespace, empties removed. */\n readonly argv: readonly string[]\n /** Mutable bag threaded across steps; a step's returned `data` is merged in. */\n readonly data: Record<string, unknown>\n /** Render + persist a local output block. */\n readonly emit: (block: CommandOutputBlock) => void\n /**\n * Drive one agent run to completion and return its result. The prompt is\n * injected as a real user turn (model-visible, unchanged on the wire) and\n * the response streams into the transcript. Serialized with the host's run\n * slot, so a workflow can interleave deterministic steps with LLM\n * interaction. Any output `emit`ted before this call is flushed first,\n * preserving transcript order.\n *\n * `opts.display` replaces the full-prompt echo in the transcript with a\n * short line (the full prompt still renders beneath it as a collapsed\n * detail row, and still reaches the model verbatim) — pass it when the\n * prompt embeds bulky material like a diff.\n */\n readonly runAgent: (prompt: string, opts?: { readonly display?: string }) => Promise<CommandAgentResult>\n /**\n * Generate schema-conforming JSON with ONE silent model call — no session\n * turns, no transcript output, nothing added to the conversation (the\n * workflow presents results itself via `emit`). Reach for this when a\n * step needs a VALUE (a commit message, a classification, extracted\n * fields); reach for `runAgent` when it needs an interactive sub-run\n * with tools and streaming.\n */\n readonly generateData: {\n /** zod v4 schema → the result type is inferred from the schema. */\n <S extends StandardSchemaLike>(opts: Omit<CommandGenerateDataOptions, 'schema'> & { schema: S }): Promise<InferSchemaOutput<S>>\n /** Plain JSON Schema → name the result type explicitly. */\n <T = unknown>(opts: CommandGenerateDataOptions): Promise<T>\n }\n /** Logger with a `command=<name>` binding, routed to the host's log funnel. */\n readonly logger: Logger\n /** Aborts when the user presses esc during execution. */\n readonly signal: AbortSignal\n /** Working directory the command runs against. */\n readonly cwd: string\n /**\n * The surrounding session, when the host runs commands inside one (the\n * TUI always does). ABSENT in session-less contexts — a command that\n * reads it must guard (`if (!ctx.session) …`) or degrade gracefully.\n */\n readonly session?: CommandSessionView\n /**\n * User interaction (confirm / forms / plan approval), when the host has\n * an interactive surface (the TUI always does). ABSENT on UI-less hosts\n * — guard (`if (!ctx.interaction) …`) and degrade gracefully.\n */\n readonly interaction?: CommandInteraction\n /**\n * Run one or more ISOLATED child agents — each with its own context\n * window and the full tool set, optionally pinned to a different model\n * — and resolve when the whole batch settles. Tasks run in parallel\n * (bounded by `opts.maxConcurrent`, default 3). Children stream and\n * persist into the transcript exactly like `spawn`-tool subagents, so\n * the user sees their activity live and on reload; their context stays\n * isolated from the conversation.\n *\n * Complements {@link runAgent}: `runAgent` drives THE conversation\n * (model-visible turns, active model, serialized); `spawnAgents` fans\n * work out to throwaway workers. Results come back to the command —\n * persist what matters via {@link emit} (user-facing) and\n * {@link appendContext} (model-facing).\n *\n * ABSENT on hosts without an agent (guard like `session`).\n */\n readonly spawnAgents?: (\n tasks: readonly CommandSpawnTask[],\n opts?: { readonly maxConcurrent?: number },\n ) => Promise<readonly CommandSpawnResult[]>\n /**\n * Persist a compact MODEL-VISIBLE context note — a real user-role turn,\n * sent on the wire unchanged from the next run onward, without\n * triggering a run now. This is how a command's outcome becomes part of\n * the conversation: the next user prompt sees what the workflow\n * found/did without replaying subagent transcripts.\n *\n * `opts.display` swaps the LIVE transcript echo for a short line (the\n * full note renders as a collapsed detail under it); a reloaded session\n * renders the persisted full text as a plain user prompt. Keep notes\n * compact — they occupy context for the rest of the conversation.\n * ABSENT on session-less hosts.\n */\n readonly appendContext?: (text: string, opts?: { readonly display?: string }) => Promise<void>\n}\n\n/** Optional per-step return — `data` is merged into the shared bag for later steps. */\nexport interface CommandStepResult {\n data?: Record<string, unknown>\n}\n\nexport type CommandStepFn = (\n ctx: CommandStepContext,\n) => void | CommandStepResult | Promise<void | CommandStepResult>\n\nexport interface CommandStep {\n run: CommandStepFn\n}\n\n/** One argument suggestion returned by {@link Command.completeArgs}. */\nexport interface CommandArgSuggestion {\n /** Text inserted after `/<name> ` on accept. */\n value: string\n /** Display label. Defaults to `value`. */\n label?: string\n description?: string\n}\n\n/** An extension-contributed `/` command. Provide EITHER `run` (one step) or `steps`. */\nexport interface Command {\n /** Invoked as `/<name>`. Lowercase, no whitespace. */\n name: string\n /** One-line summary shown in the completion popover. */\n description: string\n /** Single-step sugar. */\n run?: CommandStepFn\n /** Explicit ordered pipeline. Takes precedence over `run` when both are set. */\n steps?: readonly CommandStep[]\n /**\n * Argument completion — called while the user types `/<name> <prefix>▌`\n * with everything after the command name (may itself contain spaces).\n * Return suggestions to show in the `/` popover; return `[]`/`undefined`\n * for none. Sync or async.\n */\n completeArgs?: (argsPrefix: string) => readonly CommandArgSuggestion[] | undefined | Promise<readonly CommandArgSuggestion[] | undefined>\n}\n\n/**\n * Persisted form of output blocks inside a display-only `command` turn:\n * plain blocks → `text` content; `detail` blocks → `tool_result` content\n * with the label/syntax carried in namespaced metadata (rebuilt into the\n * collapsed rendering on reload). Shared by the command emit flush and\n * `ctx.appendNote` so both persist identically.\n */\nexport function commandBlocksToContent(blocks: readonly CommandOutputBlock[]): SessionTurn['content'] {\n return blocks.map((block) => {\n if (!block.detail && !block.custom)\n return { type: 'text' as const, text: block.text }\n // Custom blocks persist with the FALLBACK as the output — an older\n // zidane (or any host without the renderer) reads this turn as a\n // plain detail block and renders the fallback natively. The renderer\n // binding rides namespaced metadata, exactly like detail label/syntax.\n const commandMeta: Record<string, JsonValue> = block.custom\n ? { custom: { renderer: block.custom.renderer, ...(block.custom.data !== undefined ? { data: block.custom.data } : {}) } }\n : {\n ...(block.detail?.label ? { label: block.detail.label } : {}),\n ...(block.detail?.syntax ? { syntax: block.detail.syntax } : {}),\n }\n return {\n type: 'tool_result' as const,\n callId: `command_detail_${crypto.randomUUID()}`,\n output: block.text,\n ...(Object.keys(commandMeta).length > 0 ? { metadata: { command: commandMeta } } : {}),\n }\n })\n}\n\n/**\n * Map ONE command-output block to its LIVE transcript event — the\n * in-memory mirror of {@link commandBlocksToContent}'s persisted shape\n * (whose replay side lives in `eventsFromTurns`). One definition shared\n * by the command emit flush and the `ctx.appendNote` host impl so live\n * rendering can never drift from reloaded rendering — the exact drift\n * that shipped `custom` blocks rendering only after a reload.\n *\n * Precedence matches the persisted side: `custom` > `detail` > markdown.\n */\nexport function commandBlockToEvent(block: CommandOutputBlock): StreamEvent {\n if (block.custom) {\n return {\n kind: 'custom',\n text: block.text,\n custom: {\n renderer: block.custom.renderer,\n ...(block.custom.data !== undefined ? { data: block.custom.data } : {}),\n },\n }\n }\n if (block.detail) {\n return {\n kind: 'command-detail',\n text: block.text,\n ...(block.detail.label ? { label: block.detail.label } : {}),\n ...(block.detail.syntax ? { syntax: block.detail.syntax } : {}),\n }\n }\n return { kind: 'markdown', text: block.text, streaming: false }\n}\n\n/** Normalize a command to its ordered step list (`steps` wins over `run`). */\nexport function commandSteps(command: Command): readonly CommandStep[] {\n if (command.steps && command.steps.length > 0)\n return command.steps\n if (command.run)\n return [{ run: command.run }]\n return []\n}\n\n/** Parsed `/<name> [args]` invocation. */\nexport interface CommandInvocation {\n name: string\n /** Text after the name, trimmed. */\n args: string\n /** `args` split on whitespace. */\n argv: string[]\n}\n\n/**\n * Parse a prompt as a command invocation, but only when the command token is\n * the LEADING token of the whole prompt and names a known command. This is\n * what keeps mid-prompt `/skill` mentions routed to the skills provider:\n * `\"summarize /research\"` is not a command, `\"/research foo\"` is.\n *\n * `knownNames` is matched case-insensitively; the returned `name` is the\n * canonical (registered) casing.\n */\nexport function parseCommandInvocation(\n prompt: string,\n knownNames: readonly string[],\n): CommandInvocation | null {\n const body = prompt.trimStart()\n if (body[0] !== '/')\n return null\n // First token = the command name; the remainder (after the first run of\n // whitespace) is the args. Linear scan — no backtracking-prone regex.\n const afterSlash = body.slice(1)\n const wsIdx = afterSlash.search(/\\s/)\n const typed = (wsIdx === -1 ? afterSlash : afterSlash.slice(0, wsIdx)).toLowerCase()\n if (typed.length === 0)\n return null\n const canonical = knownNames.find(n => n.toLowerCase() === typed)\n if (canonical === undefined)\n return null\n const args = (wsIdx === -1 ? '' : afterSlash.slice(wsIdx + 1)).trim()\n return { name: canonical, args, argv: args.length > 0 ? args.split(/\\s+/) : [] }\n}\n\n/** Outcome of a command run. `error` is set when a step threw (pipeline stops). */\nexport interface CommandExecution {\n ok: boolean\n /** Number of steps that ran (including the one that threw). */\n ranSteps: number\n error?: unknown\n /** True when the run stopped because `ctx.signal` aborted. */\n aborted?: boolean\n}\n\n/**\n * Run a command's steps in order, threading `ctx.data`. Stops at the first\n * step that throws (error isolated + returned, not rethrown) or when the\n * signal aborts. Pure orchestration — all I/O lives in the host-supplied\n * `ctx` capabilities.\n */\nexport async function executeCommand(\n command: Command,\n ctx: CommandStepContext,\n): Promise<CommandExecution> {\n const steps = commandSteps(command)\n let ranSteps = 0\n for (const step of steps) {\n if (ctx.signal.aborted)\n return { ok: false, ranSteps, aborted: true }\n ranSteps++\n try {\n const result = await step.run(ctx)\n if (result && result.data)\n Object.assign(ctx.data, result.data)\n }\n catch (error) {\n // An esc mid-step usually surfaces as a thrown AbortError from whatever\n // I/O the handler had in flight. Classify by the signal so hosts can\n // stay quiet on user-initiated aborts instead of painting an error.\n if (ctx.signal.aborted)\n return { ok: false, ranSteps, aborted: true }\n return { ok: false, ranSteps, error }\n }\n }\n return { ok: true, ranSteps }\n}\n","/**\n * Zod v4 integration helpers.\n *\n * Zod is an OPTIONAL peer dependency, so this module never imports it at the\n * top level. Schema-accepting APIs (`ctx.generateData`, `generateStructuredData`)\n * take either a plain JSON Schema object or any Standard-Schema-carrying\n * value (https://standardschema.dev — zod v4 implements it). Zod schemas are\n * detected structurally by vendor and converted with a lazy\n * `import('zod')` — safe because whoever constructed the schema necessarily\n * has zod installed. Result types are inferred from the standard-schema\n * `types.output` slot, so callers get full typing without a single cast:\n *\n * const CommitMessage = z.object({ subject: z.string(), body: z.string().optional() })\n * const msg = await ctx.generateData({ prompt, schema: CommitMessage })\n * // ^? { subject: string, body?: string }\n */\n\n/**\n * Structural stand-in for a Standard Schema (zod v4 et al.) — enough surface\n * to detect the vendor and infer the output type WITHOUT importing zod's\n * types into our public API.\n */\nexport interface StandardSchemaLike<Output = unknown> {\n readonly '~standard': {\n readonly version: number\n readonly vendor: string\n /** Type-level only (undefined at runtime) — carries the inferred output type. */\n readonly types?: { readonly output: Output } | undefined\n }\n}\n\n/** Output type carried by a {@link StandardSchemaLike}; `unknown` for plain JSON Schema. */\nexport type InferSchemaOutput<S> = S extends StandardSchemaLike<infer O> ? O : unknown\n\n/** A schema-accepting input: plain JSON Schema, or a Standard Schema (e.g. zod v4). */\nexport type SchemaInput = Record<string, unknown> | StandardSchemaLike\n\nexport function isStandardSchema(value: unknown): value is StandardSchemaLike {\n if (typeof value !== 'object' || value === null)\n return false\n const marker = (value as Record<string, unknown>)['~standard']\n return typeof marker === 'object' && marker !== null\n && typeof (marker as Record<string, unknown>).vendor === 'string'\n}\n\n/**\n * Resolve a {@link SchemaInput} to the plain JSON Schema object providers\n * expect. Zod schemas convert via the lazily-imported `z.toJSONSchema`\n * (v4 native); other Standard Schema vendors are rejected with a clear\n * error — conversion is vendor-specific and only zod is wired today.\n */\nexport async function resolveSchemaInput(schema: SchemaInput): Promise<Record<string, unknown>> {\n if (!isStandardSchema(schema))\n return schema\n const vendor = schema['~standard'].vendor\n if (vendor !== 'zod') {\n throw new Error(\n `unsupported schema vendor \"${vendor}\" — pass a zod v4 schema or a plain JSON Schema object`,\n )\n }\n // Lazy + guarded: zod is an optional peer, but a zod schema in hand means\n // the caller's process has zod — this import only fails on truly broken\n // installs, and then with an actionable message.\n let toJSONSchema: (schema: unknown) => Record<string, unknown>\n try {\n const zod = await import('zod')\n toJSONSchema = zod.z.toJSONSchema as typeof toJSONSchema\n }\n catch {\n throw new Error('a zod schema was passed but the \"zod\" package could not be imported — install zod >= 4')\n }\n return zodToJsonSchema(toJSONSchema(schema))\n}\n\n/**\n * Normalize a JSON Schema (e.g. from zod v4's z.toJSONSchema()) for use\n * as a ToolSpec.inputSchema.\n *\n * Strips the $schema key that some providers reject.\n */\nexport function zodToJsonSchema(jsonSchema: Record<string, unknown>): Record<string, unknown> {\n const { $schema, ...rest } = jsonSchema\n return rest\n}\n","/**\n * One-shot title generation for an existing session — feeds the last N\n * turns to the provider with a \"write me a title\" system prompt and\n * returns the cleaned-up result.\n *\n * Provider-agnostic: works with anything implementing the renderer-\n * shared `Provider` interface. No tools, no session mutation, no\n * caching — this is a cheap, isolated completion that should be safe to\n * fire even mid-session without touching the live agent loop.\n */\n\nimport type { Provider } from '../providers'\nimport type { SessionTurn } from '../types'\n\n/** Hard cap on the result length. Anything longer is truncated client-side. */\nconst TITLE_MAX_CHARS = 60\n\n/** Default turn count fed to the model. 10 covers most exchanges without bloat. */\nconst DEFAULT_MAX_TURNS = 10\n\n/** Tokens budgeted for the model's reply. 64 fits any sane title with headroom. */\nconst TITLE_RESPONSE_MAX_TOKENS = 64\n\n/** Per-turn body cap when assembling the prompt — keeps the request payload tight. */\nconst PROMPT_TURN_CHAR_MAX = 2000\n\nexport interface GenerateSessionTitleOptions {\n provider: Provider\n /** Model id used for the call. */\n model: string\n /** Conversation history to summarize. Empty → throws synchronously. */\n turns: readonly SessionTurn[]\n /** Cap on how many trailing turns to feed the model. Defaults to 10. */\n maxTurns?: number\n /** Optional cancellation signal — forwarded to the provider's stream. */\n signal?: AbortSignal\n}\n\n/**\n * Drive the provider's `stream()` once and return a concise title for\n * the conversation represented by `turns`. Throws when:\n * - `turns` contains no text-bearing content (nothing to summarize),\n * - the provider stream completes with no output text,\n * - `signal` is aborted (rethrown verbatim).\n *\n * Output is trimmed, single-line, with surrounding quotes / trailing\n * punctuation stripped, and truncated to `TITLE_MAX_CHARS`.\n */\nexport async function generateSessionTitle({\n provider,\n model,\n turns,\n maxTurns = DEFAULT_MAX_TURNS,\n signal,\n}: GenerateSessionTitleOptions): Promise<string> {\n const slice = turns.slice(-Math.max(1, maxTurns))\n const transcript = renderTurnsForPrompt(slice)\n if (!transcript)\n throw new Error('No text content in the recent turns to summarize.')\n\n const system = [\n 'You generate concise, descriptive titles for chat conversations.',\n 'Reply with ONLY the title — no quotes, no markdown, no trailing punctuation,',\n 'no preamble (do not say \"Title:\" or similar).',\n `Aim for 3 to 7 words and stay under ${TITLE_MAX_CHARS} characters.`,\n ].join(' ')\n\n const userPrompt = `Generate a title for this conversation:\\n\\n${transcript}`\n\n let text = ''\n const result = await provider.stream(\n {\n model,\n system,\n tools: [],\n messages: [provider.userMessage(userPrompt)],\n maxTokens: TITLE_RESPONSE_MAX_TOKENS,\n ...(signal ? { signal } : {}),\n },\n {\n onText: (delta) => { text += delta },\n },\n )\n // Prefer the streamed-text accumulator (driven by deltas) but fall\n // back to the provider's already-concatenated `result.text` for\n // adapters that batch on the final frame instead of emitting deltas.\n const raw = text.trim().length > 0 ? text : result.text\n return cleanTitle(raw)\n}\n\n/**\n * Decide whether a session is ready for one-shot automatic titling.\n *\n * Returns `true` iff the conversation has had its first exchange — at\n * least two turns, i.e. the opening user message plus the assistant's\n * reply (this is exactly the \"N turns\" count the sessions list shows) —\n * AND no explicit title has been set yet. An existing `metadata.title`\n * (a previous auto-generation, or a manual title from the session-details\n * \"generate title\" action) is never clobbered.\n *\n * Pure + total. The runtime layers its own \"is one already in flight?\"\n * and \"is a provider picked?\" guards on top of this; the predicate only\n * encodes the content-level rule so it can be pinned in tests without a\n * mock provider — same rationale as the exported {@link cleanTitle}.\n */\nexport function shouldAutoGenerateTitle(\n turns: readonly SessionTurn[],\n metadata?: Record<string, unknown>,\n): boolean {\n const existing = typeof metadata?.title === 'string' ? metadata.title.trim() : ''\n if (existing.length > 0)\n return false\n return turns.length >= 2\n}\n\n/**\n * Compact a turn list into a transcript-style prompt:\n *\n * user: …\n * assistant: …\n * user: …\n *\n * Tool calls and tool results are summarized to keep the request\n * payload small — the model needs the rough flow of the conversation,\n * not full JSON blobs. Per-turn text is clipped at `PROMPT_TURN_CHAR_MAX`\n * so a single huge code dump doesn't blow the budget.\n *\n * Returns an empty string when the slice has no text-bearing content\n * (e.g. a turn list that's only tool plumbing).\n *\n * Exported for reuse by other silent one-shot helpers (`generate-data`'s\n * optional conversation context) so every side-channel inference compacts\n * history the same way.\n */\nexport function renderTurnsForPrompt(turns: readonly SessionTurn[]): string {\n const lines: string[] = []\n for (const turn of turns) {\n const body = textBodyOf(turn)\n if (!body)\n continue\n const role = turn.role === 'assistant' ? 'assistant' : turn.role === 'user' ? 'user' : 'system'\n lines.push(`${role}: ${clip(body, PROMPT_TURN_CHAR_MAX)}`)\n }\n return lines.join('\\n\\n')\n}\n\nfunction textBodyOf(turn: SessionTurn): string {\n const parts: string[] = []\n for (const block of turn.content) {\n if (block.type === 'text' && block.text.trim())\n parts.push(block.text.trim())\n else if (block.type === 'tool_call')\n parts.push(`[tool: ${block.name}]`)\n else if (block.type === 'tool_result')\n parts.push(`[tool result]`)\n }\n return parts.join(' ')\n}\n\n/**\n * Normalize a model-generated title into the shape we want to persist:\n *\n * - Collapse internal whitespace + take the first line only (some\n * models emit \"Title: foo\\n\\nReason: …\" despite instructions).\n * - Strip surrounding quote characters (`\"foo\"`, `'foo'`, `` `foo` ``).\n * - Strip a leading `Title:` / `title -` prefix if the model added one.\n * - Strip trailing punctuation (`.`, `!`, `?`) — titles read cleaner\n * without it.\n * - Truncate to `TITLE_MAX_CHARS` with a trailing `…` when over.\n *\n * Exported as `cleanTitle` so tests can pin the normalization rules\n * without going through a mock provider.\n */\nexport function cleanTitle(raw: string): string {\n let s = raw.split('\\n')[0]?.trim() ?? ''\n // Strip a \"Title:\" / \"Title -\" preamble the model sometimes adds.\n s = s.replace(/^\\s*title\\s*[:\\-–—]\\s*/i, '')\n // Strip surrounding matched quotes.\n if (s.length >= 2) {\n const first = s.charAt(0)\n const last = s.charAt(s.length - 1)\n const matched = (first === '\"' && last === '\"')\n || (first === '\\'' && last === '\\'')\n || (first === '`' && last === '`')\n || (first === '“' && last === '”')\n if (matched)\n s = s.slice(1, -1).trim()\n }\n // Trim trailing terminal punctuation — titles don't take periods.\n s = s.replace(/[.!?]+$/, '').trim()\n if (s.length === 0)\n throw new Error('Model returned an empty title.')\n return s.length > TITLE_MAX_CHARS ? `${s.slice(0, TITLE_MAX_CHARS - 1)}…` : s\n}\n\nfunction clip(text: string, max: number): string {\n return text.length > max ? `${text.slice(0, max)}…` : text\n}\n","/**\n * Silent structured-output generation — one provider call that returns\n * schema-conforming JSON without touching the session or the transcript.\n *\n * Modeled on the two proven side-channel patterns in the codebase:\n * - `generate-title.ts`: a single `provider.stream()` with no session\n * writes and no transcript events (optionally seeded with a compacted\n * conversation transcript), and\n * - the loop's `__output__` schema enforcement: a synthetic tool whose\n * `inputSchema` IS the requested JSON Schema, with `toolChoice` pinned\n * so the model must answer with a conforming payload.\n *\n * Used by `/` commands via `ctx.generateData` to derive values from the\n * model (or from the conversation) mid-workflow without bloating the chat\n * history — e.g. `/commit` generating `{ subject, body }` from a diff.\n * For genuinely interactive sub-runs (real turns, streaming, tools), use\n * `ctx.runAgent` instead.\n */\n\nimport type { Provider, ToolSpec } from '../providers'\nimport type { SessionTurn } from '../types'\nimport type { InferSchemaOutput, SchemaInput, StandardSchemaLike } from '../zod'\nimport { resolveSchemaInput } from '../zod'\nimport { renderTurnsForPrompt } from './generate-title'\n\n/** Synthetic forced-choice tool name (never persisted — the call is side-channel only). */\nconst DATA_TOOL_NAME = '__data__'\n\n/** Default cap on conversation turns folded into the context block. */\nconst DEFAULT_CONTEXT_TURNS = 12\n\nexport interface GenerateStructuredDataOptions {\n provider: Provider\n model: string\n /** Instruction describing the value to produce. */\n prompt: string\n /**\n * Shape of the result — a plain JSON Schema object, or a zod v4 schema\n * (converted automatically; the return type is then inferred from it).\n * Becomes the forced tool's inputSchema.\n */\n schema: SchemaInput\n /** Optional system prompt. Defaults to a terse data-extraction persona. */\n system?: string\n /**\n * Conversation turns to fold in as compacted context (same clipping as\n * session auto-titling). Omit or pass empty for a context-free call.\n */\n turns?: readonly SessionTurn[]\n /** Cap on turns rendered into the context block. Default 12 (most recent). */\n maxContextTurns?: number\n signal?: AbortSignal\n}\n\n/**\n * Drive one schema-pinned provider call and return the conforming payload.\n * Throws when the provider returns no structured payload (and rethrows\n * aborts verbatim). The caller owns presentation — nothing is rendered or\n * persisted here.\n *\n * Pass a zod v4 schema and the return type is inferred from it; pass a\n * plain JSON Schema object and name the type via the generic.\n */\nexport async function generateStructuredData<S extends StandardSchemaLike>(\n options: GenerateStructuredDataOptions & { schema: S },\n): Promise<InferSchemaOutput<S>>\nexport async function generateStructuredData<T = unknown>(\n options: GenerateStructuredDataOptions,\n): Promise<T>\nexport async function generateStructuredData(\n options: GenerateStructuredDataOptions,\n): Promise<unknown> {\n const { provider, model, prompt, signal } = options\n const spec: ToolSpec = {\n name: DATA_TOOL_NAME,\n description: 'Return the result. The input of this call IS the answer — it must conform to the schema.',\n inputSchema: await resolveSchemaInput(options.schema),\n }\n\n const contextTurns = options.turns && options.turns.length > 0\n ? options.turns.slice(-(options.maxContextTurns ?? DEFAULT_CONTEXT_TURNS))\n : []\n const transcript = contextTurns.length > 0 ? renderTurnsForPrompt(contextTurns) : ''\n const userPrompt = transcript\n ? `<conversation>\\n${transcript}\\n</conversation>\\n\\n${prompt}`\n : prompt\n\n const result = await provider.stream(\n {\n model,\n system: options.system\n ?? `You produce structured data. Call the ${DATA_TOOL_NAME} tool exactly once with the requested value. No prose.`,\n tools: provider.formatTools([spec]),\n messages: [provider.userMessage(userPrompt)],\n toolChoice: { type: 'tool', name: DATA_TOOL_NAME },\n ...(signal ? { signal } : {}),\n },\n {\n onText: () => {},\n },\n )\n\n const payload = result.toolCalls.find(tc => tc.name === DATA_TOOL_NAME)?.input\n if (payload === undefined)\n throw new Error('generateStructuredData: the model returned no structured payload')\n return payload\n}\n"],"mappings":";;;;;;;;AA6TA,SAAgB,uBAAuB,QAA+D;CACpG,OAAO,OAAO,KAAK,UAAU;EAC3B,IAAI,CAAC,MAAM,UAAU,CAAC,MAAM,QAC1B,OAAO;GAAE,MAAM;GAAiB,MAAM,MAAM;EAAK;EAKnD,MAAM,cAAyC,MAAM,SACjD,EAAE,QAAQ;GAAE,UAAU,MAAM,OAAO;GAAU,GAAI,MAAM,OAAO,SAAS,KAAA,IAAY,EAAE,MAAM,MAAM,OAAO,KAAK,IAAI,CAAC;EAAG,EAAE,IACvH;GACE,GAAI,MAAM,QAAQ,QAAQ,EAAE,OAAO,MAAM,OAAO,MAAM,IAAI,CAAC;GAC3D,GAAI,MAAM,QAAQ,SAAS,EAAE,QAAQ,MAAM,OAAO,OAAO,IAAI,CAAC;EAChE;EACJ,OAAO;GACL,MAAM;GACN,QAAQ,kBAAkB,OAAO,WAAW;GAC5C,QAAQ,MAAM;GACd,GAAI,OAAO,KAAK,WAAW,CAAC,CAAC,SAAS,IAAI,EAAE,UAAU,EAAE,SAAS,YAAY,EAAE,IAAI,CAAC;EACtF;CACF,CAAC;AACH;;;;;;;;;;;AAYA,SAAgB,oBAAoB,OAAwC;CAC1E,IAAI,MAAM,QACR,OAAO;EACL,MAAM;EACN,MAAM,MAAM;EACZ,QAAQ;GACN,UAAU,MAAM,OAAO;GACvB,GAAI,MAAM,OAAO,SAAS,KAAA,IAAY,EAAE,MAAM,MAAM,OAAO,KAAK,IAAI,CAAC;EACvE;CACF;CAEF,I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EACA,QAAQ,QAAQ,UACX,yCAAyC,eAAe;EAC7D,OAAO,SAAS,YAAY,CAAC,IAAI,CAAC;EAClC,UAAU,CAAC,SAAS,YAAY,UAAU,CAAC;EAC3C,YAAY;GAAE,MAAM;GAAQ,MAAM;EAAe;EACjD,GAAI,SAAS,EAAE,OAAO,IAAI,CAAC;CAC7B,GACA,EACE,cAAc,CAAC,EACjB,CACF,EAAA,CAEuB,UAAU,MAAK,OAAM,GAAG,SAAS,cAAc,CAAC,EAAE;CACzE,IAAI,YAAY,KAAA,GACd,MAAM,IAAI,MAAM,kEAAkE;CACpF,OAAO;AACT"}
@@ -1,2 +1,2 @@
1
- import { An as FormattedHeadlessTurnEvent, Bn as ProviderTranscriptFormat, Fn as HeadlessResult, Gn as headlessEventToJsonl, Hn as formatHeadlessResult, In as HeadlessStatus, Jn as runHeadless, Kn as installHeadlessEventAdapter, Ln as HeadlessUsage, Mn as HeadlessEvent, Nn as HeadlessOptions, Pn as HeadlessOutputFormat, Rn as OpenAIChatContentPart, Un as formatHeadlessTurnEvent, Vn as exitCodeForHeadlessResult, Wn as formattedHeadlessTurnEventToJsonl, Xn as transcriptToProviderMessages, Yn as transcriptToOpenAIMessages, jn as HeadlessErrorInfo, kn as FormattedHeadlessResult, qn as providerTranscriptFormatForProvider, zn as OpenAIChatMessage } from "./index-C6Il4kBD.js";
1
+ import { An as FormattedHeadlessTurnEvent, Bn as ProviderTranscriptFormat, Fn as HeadlessResult, Gn as headlessEventToJsonl, Hn as formatHeadlessResult, In as HeadlessStatus, Jn as runHeadless, Kn as installHeadlessEventAdapter, Ln as HeadlessUsage, Mn as HeadlessEvent, Nn as HeadlessOptions, Pn as HeadlessOutputFormat, Rn as OpenAIChatContentPart, Un as formatHeadlessTurnEvent, Vn as exitCodeForHeadlessResult, Wn as formattedHeadlessTurnEventToJsonl, Xn as transcriptToProviderMessages, Yn as transcriptToOpenAIMessages, jn as HeadlessErrorInfo, kn as FormattedHeadlessResult, qn as providerTranscriptFormatForProvider, zn as OpenAIChatMessage } from "./index-DFjn8nA3.js";
2
2
  export { FormattedHeadlessResult, FormattedHeadlessTurnEvent, HeadlessErrorInfo, HeadlessEvent, HeadlessOptions, HeadlessOutputFormat, HeadlessResult, HeadlessStatus, HeadlessUsage, OpenAIChatContentPart, OpenAIChatMessage, ProviderTranscriptFormat, exitCodeForHeadlessResult, formatHeadlessResult, formatHeadlessTurnEvent, formattedHeadlessTurnEventToJsonl, headlessEventToJsonl, installHeadlessEventAdapter, providerTranscriptFormatForProvider, runHeadless, transcriptToOpenAIMessages, transcriptToProviderMessages };
package/dist/headless.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as isWireTurn, i as documentBlockMarker, l as toolResultToText, n as assertResolvedMediaBlock } from "./types-BIarq1qE.js";
2
- import { lt as basic_default, t as createAgent } from "./agent-Dm-ihe-r.js";
2
+ import { lt as basic_default, t as createAgent } from "./agent-BJ1NC1pA.js";
3
3
  import { r as createProcessContext } from "./contexts-A4ep-iJs.js";
4
4
  import { t as audioFormatFromMediaType } from "./media-sniff-Bn76JxAu.js";
5
5
  import { p as toAnthropic, s as ensureToolResultPairing } from "./messages-Ce4yRjd3.js";