zidane 7.0.14 → 7.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -9
- package/dist/{acp-CZpX91YE.js → acp-Bw2b_kka.js} +3 -3
- package/dist/{acp-CZpX91YE.js.map → acp-Bw2b_kka.js.map} +1 -1
- package/dist/acp-cli.js +4 -4
- package/dist/acp.d.ts +1 -1
- package/dist/acp.js +1 -1
- package/dist/{agent-B1jsFaDq.js → agent-B_uQo4f1.js} +649 -48
- package/dist/agent-B_uQo4f1.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-Da39cE-d.js → anthropic-QbHqqTkV.js} +2 -2
- package/dist/{anthropic-Da39cE-d.js.map → anthropic-QbHqqTkV.js.map} +1 -1
- package/dist/{approvals-S100xf1d.js → approvals-B9aIQJRQ.js} +287 -45
- package/dist/approvals-B9aIQJRQ.js.map +1 -0
- package/dist/artifacts-CV2hUKnL.js +112 -0
- package/dist/artifacts-CV2hUKnL.js.map +1 -0
- package/dist/{auth-DfEWnkC7.js → auth-plw6npda.js} +19 -7
- package/dist/auth-plw6npda.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +1 -1
- package/dist/chat.d.ts +6 -6
- package/dist/chat.js +5 -5
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/daemon-cli.js +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/extensions.d.ts +2 -2
- package/dist/extensions.js +2 -2
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +2 -2
- package/dist/{index-DFGECPfm.d.ts → index-Dc_zYpEu.d.ts} +351 -2
- package/dist/index-Dc_zYpEu.d.ts.map +1 -0
- package/dist/{index-DP7xYXr9.d.ts → index-Df2CH6bn.d.ts} +92 -7
- package/dist/index-Df2CH6bn.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -6
- package/dist/{ipc-BLLscoIl.js → ipc-T_pPnHkp.js} +2 -2
- package/dist/{ipc-BLLscoIl.js.map → ipc-T_pPnHkp.js.map} +1 -1
- package/dist/ipc.d.ts +54 -6
- package/dist/ipc.d.ts.map +1 -1
- package/dist/ipc.js +3 -3
- package/dist/mcp.d.ts +1 -1
- package/dist/{oauth-C4GvY_p1.js → oauth-EIBUuSDK.js} +2 -2
- package/dist/{oauth-C4GvY_p1.js.map → oauth-EIBUuSDK.js.map} +1 -1
- package/dist/output/stream-json.d.ts +1 -1
- package/dist/output/terminal.d.ts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +2 -2
- package/dist/providers/anthropic.d.ts +1 -1
- package/dist/providers/anthropic.js +1 -1
- package/dist/providers/arcee.d.ts +1 -1
- package/dist/providers/baseten.d.ts +1 -1
- package/dist/providers/cerebras.d.ts +1 -1
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/openai-compat.d.ts +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.js +1 -1
- package/dist/providers/openrouter.d.ts +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +2 -2
- package/dist/{providers-BYgyPb15.js → providers-CoK1rZ1p.js} +2 -2
- package/dist/{providers-BYgyPb15.js.map → providers-CoK1rZ1p.js.map} +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +3 -3
- package/dist/restate.d.ts +1 -1
- package/dist/restate.js +1 -1
- package/dist/{server-C8gULJ0d.js → server-DXM8ZbGi.js} +64 -6
- package/dist/server-DXM8ZbGi.js.map +1 -0
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/session/sqlite.d.ts.map +1 -1
- package/dist/session/sqlite.js +117 -1
- package/dist/session/sqlite.js.map +1 -1
- package/dist/{session-K3icbPH9.js → session-DPZnncaQ.js} +60 -1
- package/dist/session-DPZnncaQ.js.map +1 -0
- package/dist/session.d.ts +2 -2
- package/dist/session.js +3 -2
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-C-s_-u0v.d.ts → tool-formatters-BgdOYAy9.d.ts} +2 -2
- package/dist/{tool-formatters-C-s_-u0v.d.ts.map → tool-formatters-BgdOYAy9.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +2 -2
- package/dist/{transcript-anchors-D1ToF-EW.d.ts → transcript-anchors-CtnwuQJM.d.ts} +3 -3
- package/dist/transcript-anchors-CtnwuQJM.d.ts.map +1 -0
- package/dist/tui.d.ts +3 -3
- package/dist/tui.d.ts.map +1 -1
- package/dist/tui.js +576 -102
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-CZLsNgw-.js → turn-operations-DkJ1R0p8.js} +4 -3
- package/dist/turn-operations-DkJ1R0p8.js.map +1 -0
- package/dist/{turn-operations-Bp5-BAki.d.ts → turn-operations-khAvr7KJ.d.ts} +5 -3
- package/dist/turn-operations-khAvr7KJ.d.ts.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/{xai-DILdFGzN.js → xai-CazjStOK.js} +3 -3
- package/dist/{xai-DILdFGzN.js.map → xai-CazjStOK.js.map} +1 -1
- package/docs/ACP.md +6 -0
- package/docs/ARCHITECTURE.md +179 -356
- package/docs/ARTIFACTS.md +130 -0
- package/docs/CHAT.md +426 -1312
- package/docs/EXECUTION_CONTEXT.md +46 -19
- package/docs/EXTENSIONS.md +234 -584
- package/docs/HEADLESS.md +5 -0
- package/docs/INTERACTIONS.md +21 -22
- package/docs/IPC.md +318 -335
- package/docs/PLUGINS.md +2 -0
- package/docs/README.md +57 -0
- package/docs/RESTATE.md +199 -491
- package/docs/RUN_IN_BACKGROUND.md +107 -558
- package/docs/SKILL.md +171 -238
- package/docs/TUI.md +213 -591
- package/package.json +1 -1
- package/dist/agent-B1jsFaDq.js.map +0 -1
- package/dist/approvals-S100xf1d.js.map +0 -1
- package/dist/auth-DfEWnkC7.js.map +0 -1
- package/dist/index-DFGECPfm.d.ts.map +0 -1
- package/dist/index-DP7xYXr9.d.ts.map +0 -1
- package/dist/server-C8gULJ0d.js.map +0 -1
- package/dist/session-K3icbPH9.js.map +0 -1
- package/dist/transcript-anchors-D1ToF-EW.d.ts.map +0 -1
- package/dist/turn-operations-Bp5-BAki.d.ts.map +0 -1
- package/dist/turn-operations-CZLsNgw-.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AgentLengthResumeExhaustedError, c as AgentToolPairingError, d as ClassifiedErrorKind, f as errorMessage, i as AgentContextExceededError, l as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, m as toTypedError, n as AgentAbortedError, o as AgentProviderError, p as matchesContextExceeded, r as AgentBudgetExceededError, s as AgentToolNotAllowedError, t as OperationTimeoutError, u as ClassifiedError } from "./timeout-DEaqslLO.js";
|
|
2
|
-
import { $ as SessionArtifactDirMigration, $_ as autoDetectAndConvert, $a as ExtensionBusSurface, $c as parseSkillFile, $d as ConfirmQuestion, $g as hashContent, $h as McpToolHookContext, $i as ExtensionCatalogPartition, $l as CommandInteraction, $m as arcee, $n as HeadlessResult, $o as createExtensionHud, $p as ToolSpec, $r as createRunSummaryCollector, $s as PLUGIN_SKILLS_DIR, $t as EvalRunUsage, A as Meter, Aa as discoverExtensions, Ac as validateSkillForWrite, Ag as ToolHookContext, Ah as getOAuthApiKey, Ai as CompactionSlice, Al as patchInlineGhost, An as efficiencyMetricValues, Ao as ExtensionToolPolicy, Ap as ContextSnapshot, Ar as createSkillsReadTool, As as coerceExtensionConfigInput, At as resolveExtensionDocsDir, Av as originPinnedFetch, B as McpCredentialStore, B_ as createFileMapStore, Ba as defineExtension, Bc as SkillInstallErrorCode, Bf as LogRecord, Bg as ToolResultVideoContent, Bh as AutoCompactConfig, Bi as defaultRepeatGuardTracked, Bl as CompletionSubmitContext, Bm as MistralParams, Bn as functionalityMetric, Bo as GuiContributions, Bp as fnv1a32, Br as grep, Bs as SpawnTaskOutcome, Bt as EvalAgentStats, C as SuccessfulMutationOutcome, C_ as SessionMetaRow, Ca as readExtensionInstallProvenance, Cc as SkillValidationIssue, Cg as SpawnHookContext, Ch as extractRuntimeCredentials, Ci as buildCompactPrompt, Cn as clearRegisteredEvals, Co as ExtensionRuntimeEnv, Cp as ContextCategory, Cs as ExtensionConfigSurface, Ct as ZIDANE_SKILL_EDIT_SKILL_NAME, Cv as normalizeMcpBlocks, D as Counter, Da as ENTRY_CANDIDATES, Dc as parseAllowedToolPattern, Dd as ModelInfo, Dg as ThinkingDecay, Dh as resolveOAuthApiKey, Di as buildUpToCompactPrompt, Dl as InlineAutocompleteProvider, Dn as createReusableExecutionContext, Do as ExtensionStorageScope, Dp as ContextExtensionSection, Dr as SkillsRunScriptToolOptions, Ds as WireExtensionConfigItem, Dt as extensionDirForCwd, E as resolveModelTargets, E_ as createSession, Ea as registerExtensionHostModules, Ec as matchesAllowedTool, Ed as CustomField, Eg as StreamHookContext, Eh as registerCustomOAuthProvider, Ei as buildTailCompactPrompt, El as InlineAutocompleteContext, Em as classifyOpenAICompatError, En as createEvalRunReporter, Eo as ExtensionSource, Ep as ContextExtensionRow, Er as createSkillsUseTool, Es as StoredExtensionConfigItem, Et as editSessionMetadata, Ev as resultToString, F as createMetricsHooks, F_ as RemoteStoreOptions, Fa as DiscoverAndBuildExtensionRegistryOptions, Fc as stripShellInterpolations, Ff as isStandardSchema, Fg as ToolResultDocumentRefContent, Fh as AgentBehavior, Fi as summaryToTurn, Fm as OpenAIParams, Fn as fileExistsOneOf, Fo as ExtensionToolResultMetadataRegistration, Fp as CacheDimensionDiff, Fs as sanitizeExtensionConfigActionPatch, Ft as EvalAgent, Fv as setModelCatalog, G as OAuthCallbackHandle, G_ as PairingRepair, Ga as createExtensionBus, Gc as listSkillCandidates, Gd as AutoCompactDecision, Gf as RingBufferSink, Gg as toolResultToText, Gh as CompactHookContext, Gi as AgentHookMap, Gn as runEvalCase, Go as ExtensionHud, Gp as Provider, Gr as RunSummaryBudget, Gs as SubagentOverride, Gt as EvalDefinitionContext, H as McpOAuthProviderOptions, H_ as ORPHANED_TOOL_RESULT_MARKER, Ha as ExtensionBus, Hc as SkillInstallResult, Hf as Logger, Hg as TurnUsage, Hi as stableStringify, Hn as normalizeMetric, Ho as LoadedPluginRecord, Hp as installCacheBreakLogger, Hr as edit, Hs as SpawnToolOptions, Ht as EvalCaseOptions, I as LoginMcpServerOptions, I_ as createRemoteStore, Ia as discoverAndBuildExtensionRegistry, If as resolveSchemaInput, Ig as ToolResultImageContent, Ii as truncateHeadForPtlRetry, Il as CompletionContext, In as finalizeEvalMetrics, Io as ExtensionToolResultPatch, Ip as CacheDimensionName, Ir as multiEdit, Is as toWireConfigSchema, It as EvalAgentMcpServers, J as startOAuthCallback, J_ as RemintResult, Ja as ExtensionAgentPluginOptions, Jc as SourcedScanPath, Jd as effectiveContextWindow, Jf as createLoggingHooks, Jg as ToolMap, Jh as DedupHasher, Ji as McpConnector, Jl as CommandAgentResult, Jm as cerebras, Jo as ExtensionHudWriter, Jp as StreamCallbacks, Jr as RunSummaryCollectorOptions, Js as isSpawnTool, Jt as EvalRunMetricAggregate, K as OAuthCallbackOptions, K_ as PairingRepairMode, Kc as parseSkillInstallSpec, Kd as AutoCompactInput, Kf as consoleSink, Kg as ToolContext, Kh as CompactStartHookContext, Ki as AgentHooks, Kl as resolveCompletionSubmit, Kn as statusCompleted, Ko as ExtensionHudState, Kp as ProviderCapabilities, Kr as RunSummaryByModel, Ks as SubagentRegistry, Kt as EvalMetric, L as LoginMcpServerResult, L_ as createMemoryStore, La as ExtensionPromptBridge, Lf as zodToJsonSchema, Lg as ToolResultImageRefContent, Lh as AgentRunOptions, Li as GenerateStructuredDataOptions, Ll as CompletionItem, Ln as formatEvalCaseSummary, Lo as ExtensionToolResultTransform, Lp as CacheDimensionSnapshot, Ls as ChildAgent, Lt as EvalAgentRunOptions, M as MetricsHookSet, Ma as isExtensionDefinition, Mc as resolveSkills, Mf as InferSchemaOutput, Mg as ToolResultAudioContent, Mh as refreshAnthropicToken, Mi as anchorPreviewFor, Mn as fileContains, Mo as ExtensionToolRenderer, Mr as CreateShellToolOptions, Ms as isValidExtensionConfigValue, Mt as withZidaneSkillEditSkill, Mv as ModelCatalogEntry, N as MetricsHooksOptions, Na as parseExtensionScanPathEnv, Nc as InterpolateShellCommandsOptions, Nf as SchemaInput, Ng as ToolResultContent, Nh as refreshOpenAICodexToken, Ni as sliceForCompaction, Nn as fileContentQuality, No as ExtensionToolRendererEntry, Np as CacheBreakInfo, Nr as createShellTool, Ns as resolveExtensionConfig, Nt as CreateEvalAgentOptions, Nv as ModelCatalogSource, O as Histogram, Oa as ExtensionScanEntry, Oc as validateResourcePath, Od as ModelOption, Og as ThinkingLevel, Oh as writeOAuthCredentials, Oi as ANCHOR_PREVIEW_MAX_CHARS, Ol as InlineGhost, On as defineEval, Oo as ExtensionStorageSurface, Op as ContextItem, Or as createSkillsRunScriptTool, Os as WireExtensionConfigSchema, Ot as extensionScaffold, P as UpDownCounter, Pa as scanExtensionDirectories, Pc as interpolateShellCommands, Pf as StandardSchemaLike, Pg as ToolResultDocumentContent, Ph as registerOAuthProvider, Pi as stripImagesFromTurns, Pn as fileExists, Po as ExtensionToolRendererRegistration, Pp as CacheBreakLoggerOptions, Ps as resolveExtensionConfigValue, Pt as EFFICIENCY_METRICS, Pv as getModelCatalog, Q as PersistOutcome, Q_ as TurnInterruptionState, Qa as ExtensionBusMessage, Qd as AnswerValue, Qg as getReadState, Qh as McpServerConfig, Qi as BuildExtensionRegistryOptions, Ql as CommandGenerateDataOptions, Qm as ArceeParams, Qo as ExtensionStatusOptions, Qp as ToolResult, Qr as RunSummaryValidation, Qs as matchModelEntries, Qt as EvalRunSummaryCase, R as loginMcpServer, R_ as FileMapAdapter, Ra as ExtensionPromptDelivery, Rc as SkillInstallCandidate, Rf as ConsoleSinkOptions, Rg as ToolResultMetadata, Rh as AgentStats, Ri as generateStructuredData, Rl as CompletionProvider, Rm as openai, Rn as formatEvalRunSummary, Ro as ExtensionToolVerdict, Rp as CacheDriftInfo, Rr as InteractionToolOptions, Rs as ExtensionSubagentDef, Rt as EvalAgentRunResult, S as MutationValidationResult, S_ as SessionData, Sa as parseExtensionInstallSource, Sc as writeSkillsToDisk, Sg as SessionTurn, Sh as credentialsFromParams, Si as TRAILER, Sn as buildTrajectory, So as ExtensionRunTransform, Sp as ContextBreakdownOptions, Ss as ExtensionConfigStringItem, St as ZIDANE_EXTENSION_SKILL_NAME, T as normalizeProviders, T_ as SessionStore, Ta as updateInstalledExtension, Tc as isToolAllowedByUnion, Tg as StepThinkingDecay, Th as readOAuthCredentials, Ti as buildFullCompactPrompt, Tn as createEvalAgent, To as ExtensionSkillPolicy, Tp as ContextExactCounts, Tr as SkillsUseToolOptions, Ts as ExtensionConfigValueItem, Tt as buildZidaneSkillEditSkill, Tv as resolveTransportConfig, U as createMemoryMcpCredentialStore, U_ as PairingDrop, Ua as ExtensionBusChannel, Uc as SkillInstallSpec, Uf as LoggingHookSet, Ug as toolOutputBudgetByteLength, Uh as CompactEndHookContext, Ui as localReliabilityBehavior, Um as LocalParams, Un as registerEvalTests, Uo as TuiContributions, Up as snapshotCacheDimensions, Ur as RunSummary, Us as SpawnToolState, Ut as EvalCaseResult, V as McpOAuthProvider, V_ as EnsureToolResultPairingOptions, Va as EXTENSION_BUS_MAX_PAYLOAD_BYTES, Vc as SkillInstallOptions, Vf as LogSink, Vg as TurnFinishReason, Vh as CacheTtl, Vi as normalizeShellCommand, Vm as mistral, Vn as llmJudge, Vo as LoadedExtension, Vp as hashMessages, Vr as glob, Vs as SpawnTool, Vt as EvalArtifacts, W as hasAuthorizationHeader, W_ as PairingDropKind, Wa as ExtensionBusEnvelope, Wc as installSkillFromSpec, Wd as AUTO_COMPACT_MIN_GROWTH_FRACTION, Wf as LoggingHooksOptions, Wg as toolOutputByteLength, Wh as CompactFunction, Wi as Agent, Wm as local, Wn as relativeArtifactPath, Wo as ExtensionBannerOptions, Wp as HistoryRepair, Wr as RunSummaryBlock, Ws as SubagentDef, Wt as EvalDefinition, X as PERSISTENCE_PREVIEW_BYTES, X_ as TOOL_USE_INTERRUPTED_MARKER, Xa as ExtensionBehaviorTransform, Xf as fanoutSink, Xg as ReadStateEntry, Xh as GeometricThinkingDecay, Xi as McpToolWrap, Xl as CommandAttachment, Xm as baseten, Xn as HeadlessEvent, Xo as ExtensionNotifyOptions, Xr as RunSummaryRepeatGuard, Xs as createModelSearchTool, Xt as EvalRunReporterOptions, Y as PERSISTED_STUB_PREFIX, Y_ as SYNTHETIC_TOOL_RESULT_PLACEHOLDER, Ya as ExtensionApiVersion, Yc as discoverSkills, Yd as shouldAutoCompact, Yf as createRingBufferSink, Yg as HydrateReadStateOptions, Yh as DedupToolConfig, Yi as McpToolMeta, Yl as CommandArgSuggestion, Ym as BasetenParams, Yn as HeadlessErrorInfo, Yo as ExtensionNotification, Yp as StreamOptions, Yr as RunSummaryError, Ys as SpawnModelEntry, Yt as EvalRunReporter, Z as PersistInput, Z_ as ToWireMessagesOptions, Za as ExtensionBusEmitOptions, Zf as jsonSink, Zg as ReadStateMap, Zi as createAgent, Zl as CommandExecution, Zn as HeadlessOptions, Zo as ExtensionNotifyTone, Zp as ToolCall, Zr as RunSummaryTokens, Zs as formatModelLine, Zt as EvalRunSummary, _ as statsByModel, __ as SkillSource, _a as InstallExtensionFromSpecOptions, _c as agentPluginsSchemaId, _g as RunHookMap, _i as BASE_INSTRUCTIONS, _m as OpenAICompatAuthHeader, _n as TrajectoryStep, _o as ExtensionPaths, _p as ContextSegmentsInput, _r as waitTask, _s as ExtensionConfigItem, _t as EXTENSION_EDIT_METADATA_KEY, _v as connectMcpServers, a as basicTools, a_ as StagedToolState, ac as PLUGIN_MANIFEST_FILE, ag as ProgressNudgeMessage, ah as anthropic, ai as RecentFile, al as DeactivationReason, am as xai, an as EvalWorkspaceFile, ao as ExtensionCustomRendererEntry, as as ExtensionSessionsSurface, at as resolveLegacySessionDir, au as CommandStepContext, av as fromAnthropic, b as MutationValidationHooksOptions, b_ as LoadSessionOptions, ba as installExtensionFromSpec, bc as defineSkill, bf as SelectQuestion, bg as SessionHookContext, bh as ResolveOAuthApiKeyOptions, bi as CompactPromptOptions, bn as buildEvalRunSummary, bo as ExtensionProviderMiddleware, bp as ContextBreakdownContributionContext, bs as ExtensionConfigNumberItem, bt as SKILL_EDIT_METADATA_KEY, bv as expandEnvPlaceholders, c as StartSpan, c_ as ToolStateStore, ca as ExtensionFetchResult, cc as AgentPluginsVersion, cg as PromptImagePart, ci as selectFilesFromSession, cl as createSkillActivationState, cm as SchemaSanitizeResult, cn as LlmJudgeOptions, co as ExtensionGuiPanel, cs as createExtensionHostRuntimeBridge, ct as resolveSessionDir, cu as commandBlocksToContent, cv as remintDuplicateToolCallIds, d as TracingHooksOptions, d_ as isToolStateOps, da as ExtensionInstallErrorCode, dc as PluginAuthor, dg as PromptVideoPart, di as CompactOptions, dm as OpenRouterParams, dn as MetricSpec, do as ExtensionKeybindingDispatchContext, ds as ExtensionConfigActionResult, dt as SHELL_CASCADE_CANCEL_MESSAGE, du as parseCommandInvocation, dv as toOpenAI, e_ as hydrateReadStateFromSession, ea as buildExtensionPreset, ec as PLUGIN_MCP_FILE, ei as BYTES_PER_TOKEN, el as buildCatalog, em as TurnResult, en as EvalScore, eo as ExtensionCapability, ep as formatLogLine, er as HeadlessStatus, es as ExtensionHostRuntimeBridge, et as buildPersistedStub, eu as CommandInvocation, ev as detectTurnInterruption, f as createTracingHooks, f_ as stagedToolState, fa as ExtensionInstallIo, fc as PluginComponentStatus, ff as PlanResponse, fg as RepeatGuardConfig, fi as CompactResult, fn as MetricSpecMap, fo as ExtensionManifest, fr as runHeadless, fs as ExtensionConfigActionStatus, ft as TOOL_USE_CANCELLED_MESSAGE, fv as toWireMessages, g as formatTokenUsage, g_ as SkillResource, ga as ExtensionInstallSource, gc as SUPPORTED_AGENT_PLUGINS_VERSIONS, gf as QuestionPayload, gg as RetryConfig, gi as CompactPromptTooLongError, gn as Trajectory, go as ExtensionOrderedContribution, gp as ContextSegmentOrigin, gs as ExtensionConfigEnumItem, gt as renderStaleReadNotice, h as flattenTurns, h_ as SkillDiagnostic, ha as ExtensionInstallScope, hc as PluginSchemaKind, hf as QuestionChoice, hg as ResolveContentRefBlock, hi as CompactInvalidInputError, hn as ReusableExecutionContext, ho as ExtensionModalNode, hp as ContextSegmentFile, hs as ExtensionConfigChangeBehavior, ht as collectNewlyStaleReadPaths, hv as McpExecutionBinding, i as _default, i_ as DEFAULT_MAX_VALUE_BYTES, ia as filterExtensionRegistry, ic as validatePluginManifest, ig as ProgressNudgeKind, ii as PostCompactRestoreOptions, il as ActiveSkill, im as XaiParams, in as EvalVariantSummary, io as ExtensionCustomRenderer, is as ExtensionSessionSummary, it as resolveLegacyPersistDir, iu as CommandStep, iv as filterUnresolvedToolUses, j as MetricAttributes, j_ as loadSession, ja as inlineLoadedExtension, jc as validateSkillName, jg as ToolOutcome, jh as getOAuthProvider, ji as SummaryToTurnInput, jl as resolveInlineSuggestion, jm as openaiCompat, jn as emitEfficiencyMetrics, jo as ExtensionToolRenderProps, jp as ContextUsageSplit, js as isValidExtensionConfigItem, jt as withZidaneExtensionSkill, jv as ModelCatalog, k as InstrumentOptions, ka as defaultExtensionScanPaths, kc as validateResourcePathReal, kd as ProviderDescriptor, kh as OAuthProviderInterface, ki as CompactScope, kl as createPathAutocompleteProvider, km as mapOAIFinishReason, kn as defineMetrics, ko as ExtensionToolCatalogTransform, kp as ContextMcpGroup, kr as SkillsReadToolOptions, ks as clampExtensionConfigNumber, kt as readSkillEditMarker, l as TracingConventions, l_ as ToolStateView, la as ExtensionInstallCandidate, lc as LoadAgentPluginOptions, lg as PromptPart, li as selectRecentFiles, lm as sanitizeToolSchema, ln as MetricDirection, lo as ExtensionGuiSurface, lr as headlessEventToJsonl, ls as createWorkspaceSurface, lt as resolveTasksDir, lu as commandSteps, lv as sanitizeHistoryForProvider, m as TokenUsageLike, m_ as SkillConfig, ma as ExtensionInstallResult, mc as PluginManifest, mf as Question, mg as ResolveContentRef, mi as compactConversation, mn as RegisterEvalTestsOptions, mo as ExtensionModal, mp as ContextSegment, ms as ExtensionConfigCategory, mt as applyCompactSummaryCutoff, mv as McpConnection, n_ as readStateKey, na as composeExtensionPreset, nc as ManifestValidation, ng as ModelTargetSpec, nh as AnthropicParams, ni as utf8ByteLength, nl as installAllowedToolsGate, nn as EvalScorerContext, no as ExtensionContextTransform, ns as ExtensionModelEntry, nt as maybePersistToolResult, nu as CommandSpawnResult, nv as ensureEndsWithUserMessage, o as GEN_AI_ATTRIBUTES, o_ as ToolStateController, oa as mergeContributions, oc as defaultPluginDataRoot, og as PromptAudioPart, oh as applyAnthropicCacheBreakpoints, oi as buildPostCompactAttachments, ol as SkillActivationState, om as SchemaSanitizeOptions, on as EvalWorkspaceOptions, oo as ExtensionDefinition, os as ExtensionWorkspacePair, ot as resolveMcpWarningsDir, ou as CommandStepFn, ov as fromOpenAI, p as ModelUsage, p_ as ShellInterpolationApproval, pa as ExtensionInstallProvenance, pc as PluginDiagnostic, pg as RepeatGuardToolMatcher, pi as CompactStartEvent, pm as openrouter, pn as MetricStats, po as ExtensionMcpConfigTransform, pr as transcriptToOpenAIMessages, ps as ExtensionConfigBooleanItem, pt as TOOL_USE_SKIPPED_MESSAGE, pv as ConnectMcpServersOptions, q as OAuthCallbackResult, q_ as ReasoningWireAction, qa as EMPTY_EXTENSION_REGISTRY, qc as readSkillProvenance, qd as OUTPUT_RESERVE_TOKENS, qf as createLogger, qg as ToolDef, qi as AgentOptions, ql as Command, qm as CerebrasParams, qo as ExtensionHudStatus, qp as ProviderMeta, qr as RunSummaryCollector, qs as createSpawnTool, qt as EvalMetricError, r as definePreset, r_ as resolveReadStateMap, ra as disposeExtensionRegistry, rc as parsePluginManifest, rg as OAuthRefreshHookContext, ri as PostCompactAttachments, rl as ActivationVia, rn as EvalTestRunner, ro as ExtensionContributions, rr as OpenAIChatMessage, rs as ExtensionRuntimeSurface, rt as migrateSessionArtifactDirs, ru as CommandSpawnTask, rv as ensureToolResultPairing, s as Span, s_ as ToolStateOp, sa as partitionExtensionCatalog, sc as loadAgentPlugin, sg as PromptDocumentPart, si as selectFilesFromReadState, sl as SkillActivationStateOptions, sm as SchemaSanitizeProfile, sn as EvalWorkspaceSnapshot, so as ExtensionFooterHint, ss as ExtensionWorkspaceSurface, st as resolvePersistDir, su as commandBlockToEvent, sv as reasoningWireAction, t as Preset, t_ as hydrateReadStateFromSessionAsync, ta as buildExtensionRegistry, tc as expandPluginVars, tg as ModelTarget, ti as estimateTokens, tl as IMPLICITLY_ALLOWED_SKILL_TOOLS, tn as EvalScorer, to as ExtensionContext, tr as HeadlessUsage, ts as ExtensionHostRuntimeImpl, tt as cleanupPersistedSession, tu as CommandOutputBlock, tv as dropInvalidToolPairings, u as TracingHookSet, u_ as createToolStateController, ua as ExtensionInstallError, uc as LoadedPlugin, uf as PlanPayload, ug as PromptTextPart, ui as CompactEndEvent, um as sanitizeToolSpecs, un as MetricEmitter, uo as ExtensionKeybinding, us as ExtensionConfigActionItem, ut as INTERRUPT_MESSAGE_FOR_TOOL_USE, uu as executeCommand, uv as toAnthropic, v as MutationValidationBatch, v_ as SkillsConfig, va as InstalledExtensionTargetOptions, vc as isSupportedAgentPluginsVersion, vg as SessionContentBlock, vi as CompactDirection, vm as OpenAICompatHttpError, vn as TrajectoryStepKind, vo as ExtensionPermission, vr as ValidationResult, vs as ExtensionConfigItemBase, vt as EditSessionTarget, w as createMutationValidationHooks, w_ as SessionRun, wa as removeInstalledExtension, wc as SkillValidationResult, wg as StaleReadPolicy, wh as isOAuthAccessToken, wi as buildFromCompactPrompt, wn as computeEvalTagScores, wo as ExtensionSessionStateSurface, wp as ContextCategoryId, ws as ExtensionConfigValue, wt as buildZidaneExtensionSkill, wv as normalizeMcpServers, x as MutationValidationMutation, x_ as Session, xa as listExtensionCandidates, xc as writeSkillToDisk, xf as TextQuestion, xg as SessionMessage, xh as credentialsFilePath, xi as NO_TOOLS_PREAMBLE, xn as buildRegisteredEvals, xo as ExtensionRegistry, xp as ContextBreakdownContributor, xs as ExtensionConfigScope, xt as SkillEditMarker, xv as expandMcpConfigEnv, y as MutationValidationFailure, y_ as CreateSessionOptions, ya as fetchExtensionSource, yc as parseSchemaId, yg as SessionEndStatus, yh as OAuthParams, yi as CompactPromptBuilder, ym as OpenAICompatParams, yn as artifactPath, yo as ExtensionPromptTransform, yp as ContextBreakdown, yr as validateToolArgs, ys as ExtensionConfigModelItem, yt as ExtensionEditMarker, z as McpCredentialEntry, z_ as FileMapStoreOptions, za as createExtensionPromptBridge, zc as SkillInstallError, zf as LogLevel, zg as ToolResultTextContent, zh as AutoCompact, zi as defaultRepeatGuardNormalize, zl as CompletionReference, zn as formatTrajectoryLine, zo as ExtensionTuiSurface, zp as diffCacheDimensions, zr as createInteractionTool, zs as SpawnTaskInput, zt as EvalAgentRunStats } from "./index-DFGECPfm.js";
|
|
2
|
+
import { $ as SessionArtifactDirMigration, $c as validateSkillForWrite, $g as ToolHookContext, $h as getOAuthApiKey, $i as McpToolWrap, $l as patchInlineGhost, $n as HeadlessResult, $o as ExtensionToolRenderer, $p as ContextSnapshot, $r as RunSummaryTokens, $s as coerceExtensionConfigInput, $t as EvalRunUsage, A as Meter, A_ as ToolStateOp, Aa as ENTRY_CANDIDATES, Ac as loadAgentPlugin, Ag as PromptDocumentPart, Ai as ANCHOR_PREVIEW_MAX_CHARS, Al as SkillActivationStateOptions, Am as SchemaSanitizeProfile, An as efficiencyMetricValues, Ao as ExtensionGuiSurface, Ar as createSkillsReadTool, As as createArtifactsSurface, At as resolveExtensionDocsDir, Au as commandBlockToEvent, Av as reasoningWireAction, B as McpCredentialStore, B_ as SkillSource, Ba as ExtensionPromptBridge, Bc as agentPluginsSchemaId, Bg as RunHookMap, Bi as generateStructuredData, Bm as OpenAICompatAuthHeader, Bn as functionalityMetric, Bo as ExtensionPromptTransform, Bp as ContextSegmentsInput, Br as InteractionToolOptions, Bs as ExtensionConfigItem, Bt as EvalAgentStats, Bv as ArtifactFilter, C as SuccessfulMutationOutcome, C_ as hydrateReadStateFromSession, Ca as installExtensionFromSpec, Cc as PLUGIN_MCP_FILE, Ci as NO_TOOLS_PREAMBLE, Cl as buildCatalog, Cm as TurnResult, Cn as clearRegisteredEvals, Co as ExtensionContextTransform, Cp as formatLogLine, Cs as ExtensionHostRuntimeImpl, Ct as ZIDANE_SKILL_EDIT_SKILL_NAME, Cu as CommandInvocation, Cv as detectTurnInterruption, D as Counter, D_ as DEFAULT_MAX_VALUE_BYTES, Da as removeInstalledExtension, Dc as validatePluginManifest, Dg as ProgressNudgeKind, Di as buildFullCompactPrompt, Dl as ActiveSkill, Dm as XaiParams, Dn as createReusableExecutionContext, Do as ExtensionDefinition, Dr as SkillsRunScriptToolOptions, Ds as ExtensionSessionsSurface, Dt as extensionDirForCwd, Du as CommandStep, Dv as filterUnresolvedToolUses, E as resolveModelTargets, E_ as resolveReadStateMap, Ea as readExtensionInstallProvenance, Ec as parsePluginManifest, Eg as OAuthRefreshHookContext, Ei as buildFromCompactPrompt, El as ActivationVia, En as createEvalRunReporter, Eo as ExtensionCustomRendererEntry, Er as createSkillsUseTool, Es as ExtensionSessionSummary, Et as editSessionMetadata, Eu as CommandSpawnTask, Ev as ensureToolResultPairing, F as createMetricsHooks, F_ as stagedToolState, Fa as isExtensionDefinition, Fc as PluginComponentStatus, Ff as PlanResponse, Fg as RepeatGuardConfig, Fi as sliceForCompaction, Fn as fileExistsOneOf, Fo as ExtensionModal, Fs as ExtensionConfigActionStatus, Ft as EvalAgent, Fv as toWireMessages, G as OAuthCallbackHandle, G_ as SessionData, Ga as ExtensionBus, Gc as writeSkillsToDisk, Gg as SessionTurn, Gh as credentialsFromParams, Gi as localReliabilityBehavior, Gn as runEvalCase, Go as ExtensionSessionStateSurface, Gp as ContextBreakdownOptions, Gr as RunSummary, Gs as ExtensionConfigStringItem, Gt as EvalDefinitionContext, Gv as McpConnection, H as McpOAuthProviderOptions, H_ as CreateSessionOptions, Ha as createExtensionPromptBridge, Hc as parseSchemaId, Hg as SessionEndStatus, Hh as OAuthParams, Hi as defaultRepeatGuardTracked, Hm as OpenAICompatParams, Hn as normalizeMetric, Ho as ExtensionRegistry, Hp as ContextBreakdown, Hr as grep, Hs as ExtensionConfigModelItem, Ht as EvalCaseOptions, Hv as SessionArtifactInput, I as LoginMcpServerOptions, I_ as ShellInterpolationApproval, Ia as parseExtensionScanPathEnv, Ic as PluginDiagnostic, Ig as RepeatGuardToolMatcher, Ii as stripImagesFromTurns, Im as openrouter, In as finalizeEvalMetrics, Io as ExtensionModalNode, Is as ExtensionConfigBooleanItem, It as EvalAgentMcpServers, Iv as ARTIFACTS_METADATA_KEY, J as startOAuthCallback, J_ as SessionStore, Ja as createExtensionBus, Jc as isToolAllowedByUnion, Jg as StepThinkingDecay, Jh as readOAuthCredentials, Ji as AgentHookMap, Jo as ExtensionStorageScope, Jp as ContextExactCounts, Jr as RunSummaryByModel, Js as ExtensionConfigValueItem, Jt as EvalRunMetricAggregate, Jv as connectMcpServers, K as OAuthCallbackOptions, K_ as SessionMetaRow, Ka as ExtensionBusChannel, Kc as SkillValidationIssue, Kg as SpawnHookContext, Kh as extractRuntimeCredentials, Ki as _default, Kn as statusCompleted, Ko as ExtensionSkillPolicy, Kp as ContextCategory, Kr as RunSummaryBlock, Ks as ExtensionConfigSurface, Kt as EvalMetric, Kv as McpExecutionBinding, L as LoginMcpServerResult, L_ as SkillConfig, La as scanExtensionDirectories, Lc as PluginManifest, Lf as Question, Lg as ResolveContentRef, Li as summaryToTurn, Ln as formatEvalCaseSummary, Lo as ExtensionOrderedContribution, Lp as ContextSegment, Ls as ExtensionConfigCategory, Lt as EvalAgentRunOptions, Lv as ARTIFACTS_PER_SESSION_CAP, M as MetricsHookSet, M_ as ToolStateView, Ma as defaultExtensionScanPaths, Mc as LoadAgentPluginOptions, Mg as PromptPart, Mi as CompactionSlice, Mm as sanitizeToolSchema, Mn as fileContains, Mo as ExtensionKeybindingDispatchContext, Mr as CreateShellToolOptions, Ms as createWorkspaceSurface, Mt as withZidaneSkillEditSkill, Mu as commandSteps, Mv as sanitizeHistoryForProvider, N as MetricsHooksOptions, N_ as createToolStateController, Na as discoverExtensions, Nc as LoadedPlugin, Nf as PlanPayload, Ng as PromptTextPart, Ni as SummaryToTurnInput, Nm as sanitizeToolSpecs, Nn as fileContentQuality, No as ExtensionManifest, Nr as createShellTool, Ns as ExtensionConfigActionItem, Nt as CreateEvalAgentOptions, Nu as executeCommand, Nv as toAnthropic, O as Histogram, O_ as StagedToolState, Oa as updateInstalledExtension, Oc as PLUGIN_MANIFEST_FILE, Og as ProgressNudgeMessage, Oh as anthropic, Oi as buildTailCompactPrompt, Ol as DeactivationReason, Om as xai, On as defineEval, Oo as ExtensionFooterHint, Or as createSkillsRunScriptTool, Os as ExtensionWorkspacePair, Ot as extensionScaffold, Ou as CommandStepContext, Ov as fromAnthropic, P as UpDownCounter, P_ as isToolStateOps, Pa as inlineLoadedExtension, Pc as PluginAuthor, Pg as PromptVideoPart, Pi as anchorPreviewFor, Pm as OpenRouterParams, Pn as fileExists, Po as ExtensionMcpConfigTransform, Ps as ExtensionConfigActionResult, Pt as EFFICIENCY_METRICS, Pu as parseCommandInvocation, Pv as toOpenAI, Q as PersistOutcome, Qc as validateResourcePathReal, Qd as ProviderDescriptor, Qh as OAuthProviderInterface, Qi as McpToolMeta, Ql as createPathAutocompleteProvider, Qm as mapOAIFinishReason, Qo as ExtensionToolRenderProps, Qp as ContextMcpGroup, Qr as RunSummaryRepeatGuard, Qs as clampExtensionConfigNumber, Qt as EvalRunSummaryCase, Qv as expandMcpConfigEnv, R as loginMcpServer, R_ as SkillDiagnostic, Ra as DiscoverAndBuildExtensionRegistryOptions, Rc as PluginSchemaKind, Rf as QuestionChoice, Rg as ResolveContentRefBlock, Ri as truncateHeadForPtlRetry, Rn as formatEvalRunSummary, Ro as ExtensionPaths, Rp as ContextSegmentFile, Rr as multiEdit, Rs as ExtensionConfigChangeBehavior, Rt as EvalAgentRunResult, Rv as ARTIFACT_KINDS, S as MutationValidationResult, S_ as hashContent, Sa as fetchExtensionSource, Sc as PLUGIN_SKILLS_DIR, Sf as ConfirmQuestion, Sg as McpToolHookContext, Sh as arcee, Si as CompactPromptOptions, Sl as parseSkillFile, Sm as ToolSpec, Sn as buildTrajectory, So as ExtensionContext, Ss as ExtensionHostRuntimeBridge, St as ZIDANE_EXTENSION_SKILL_NAME, Su as CommandInteraction, Sv as autoDetectAndConvert, T as normalizeProviders, T_ as readStateKey, Ta as parseExtensionInstallSource, Tc as ManifestValidation, Tg as ModelTargetSpec, Th as AnthropicParams, Ti as buildCompactPrompt, Tl as installAllowedToolsGate, Tn as createEvalAgent, To as ExtensionCustomRenderer, Tr as SkillsUseToolOptions, Ts as ExtensionRuntimeSurface, Tt as buildZidaneSkillEditSkill, Tu as CommandSpawnResult, Tv as ensureEndsWithUserMessage, U as createMemoryMcpCredentialStore, U_ as LoadSessionOptions, Ua as defineExtension, Uc as defineSkill, Uf as SelectQuestion, Ug as SessionHookContext, Uh as ResolveOAuthApiKeyOptions, Ui as normalizeShellCommand, Un as registerEvalTests, Uo as ExtensionRunTransform, Up as ContextBreakdownContributionContext, Ur as glob, Us as ExtensionConfigNumberItem, Ut as EvalCaseResult, Uv as normalizeArtifactInput, V as McpOAuthProvider, V_ as SkillsConfig, Va as ExtensionPromptDelivery, Vc as isSupportedAgentPluginsVersion, Vg as SessionContentBlock, Vi as defaultRepeatGuardNormalize, Vm as OpenAICompatHttpError, Vn as llmJudge, Vo as ExtensionProviderMiddleware, Vr as createInteractionTool, Vs as ExtensionConfigItemBase, Vt as EvalArtifacts, Vv as SessionArtifact, W as hasAuthorizationHeader, W_ as Session, Wa as EXTENSION_BUS_MAX_PAYLOAD_BYTES, Wc as writeSkillToDisk, Wf as TextQuestion, Wg as SessionMessage, Wh as credentialsFilePath, Wi as stableStringify, Wn as relativeArtifactPath, Wo as ExtensionRuntimeEnv, Wp as ContextBreakdownContributor, Wr as edit, Ws as ExtensionConfigScope, Wt as EvalDefinition, Wv as ConnectMcpServersOptions, X as PERSISTENCE_PREVIEW_BYTES, Xa as BUILTIN_ARTIFACT_KINDS, Xc as parseAllowedToolPattern, Xd as ModelInfo, Xg as ThinkingDecay, Xh as resolveOAuthApiKey, Xi as AgentOptions, Xl as InlineAutocompleteProvider, Xn as HeadlessEvent, Xo as ExtensionToolCatalogTransform, Xp as ContextExtensionSection, Xr as RunSummaryCollectorOptions, Xs as WireExtensionConfigItem, Xt as EvalRunReporterOptions, Y as PERSISTED_STUB_PREFIX, Y_ as createSession, Yc as matchesAllowedTool, Yd as CustomField, Yg as StreamHookContext, Yh as registerCustomOAuthProvider, Yi as AgentHooks, Yl as InlineAutocompleteContext, Ym as classifyOpenAICompatError, Yn as HeadlessErrorInfo, Yo as ExtensionStorageSurface, Yp as ContextExtensionRow, Yr as RunSummaryCollector, Ys as StoredExtensionConfigItem, Yt as EvalRunReporter, Z as PersistInput, Za as artifactKindLabel, Zc as validateResourcePath, Zd as ModelOption, Zg as ThinkingLevel, Zh as writeOAuthCredentials, Zi as McpConnector, Zl as InlineGhost, Zn as HeadlessOptions, Zo as ExtensionToolPolicy, Zp as ContextItem, Zr as RunSummaryError, Zs as WireExtensionConfigSchema, Zt as EvalRunSummary, Zv as expandEnvPlaceholders, _ as statsByModel, __ as ToolMap, _a as ExtensionInstallResult, _c as isSpawnTool, _f as effectiveContextWindow, _g as DedupHasher, _h as cerebras, _i as CompactInvalidInputError, _l as SourcedScanPath, _m as StreamCallbacks, _n as TrajectoryStep, _o as ExtensionBehaviorTransform, _p as createLoggingHooks, _r as waitTask, _s as ExtensionNotifyOptions, _t as EXTENSION_EDIT_METADATA_KEY, _u as CommandAgentResult, _v as RemintResult, a as basicTools, a_ as ToolResultImageContent, aa as composeExtensionPreset, ac as toWireConfigSchema, ai as PostCompactAttachments, am as CacheDimensionName, an as EvalWorkspaceFile, ap as resolveSchemaInput, as as ExtensionToolVerdict, at as resolveLegacySessionDir, au as CompletionContext, av as createRemoteStore, b as MutationValidationHooksOptions, b_ as ReadStateMap, ba as InstallExtensionFromSpecOptions, bc as formatModelLine, bi as CompactDirection, bm as ToolCall, bn as buildEvalRunSummary, bo as ExtensionBusSurface, bp as jsonSink, bs as createExtensionHud, bt as SKILL_EDIT_METADATA_KEY, bu as CommandExecution, bv as ToWireMessagesOptions, c as StartSpan, c_ as ToolResultTextContent, cc as SpawnTaskInput, cg as AutoCompact, ci as buildPostCompactAttachments, cl as SkillInstallError, cm as diffCacheDimensions, cn as LlmJudgeOptions, co as ExtensionAgentPluginOptions, cp as LogLevel, cs as LoadedExtension, ct as resolveSessionDir, cu as CompletionReference, cv as FileMapStoreOptions, cy as ModelCatalog, d as TracingHooksOptions, d_ as TurnUsage, da as ExtensionFetchResult, dc as SpawnToolOptions, di as selectRecentFiles, dl as SkillInstallResult, dm as installCacheBreakLogger, dn as MetricSpec, do as ExtensionArtifactKindRegistration, dp as Logger, ds as ExtensionBannerOptions, dt as SHELL_CASCADE_CANCEL_MESSAGE, dv as ORPHANED_TOOL_RESULT_MARKER, dy as getModelCatalog, e_ as ToolOutcome, ea as createAgent, ec as isValidExtensionConfigItem, eg as getOAuthProvider, eh as openaiCompat, ei as RunSummaryValidation, el as validateSkillName, em as ContextUsageSplit, en as EvalScore, er as HeadlessStatus, es as ExtensionToolRendererEntry, et as buildPersistedStub, eu as resolveInlineSuggestion, ev as loadSession, ey as normalizeMcpBlocks, f as createTracingHooks, f_ as toolOutputBudgetByteLength, fa as ExtensionInstallCandidate, fc as SpawnToolState, fg as CompactEndHookContext, fh as LocalParams, fi as CompactEndEvent, fl as SkillInstallSpec, fm as snapshotCacheDimensions, fn as MetricSpecMap, fo as ExtensionArtifactQuery, fp as LoggingHookSet, fr as runHeadless, fs as ExtensionHud, ft as TOOL_USE_CANCELLED_MESSAGE, fv as PairingDrop, fy as setModelCatalog, g as formatTokenUsage, g_ as ToolDef, ga as ExtensionInstallProvenance, gc as createSpawnTool, gf as OUTPUT_RESERVE_TOKENS, gh as CerebrasParams, gi as compactConversation, gl as readSkillProvenance, gm as ProviderMeta, gn as Trajectory, go as ExtensionArtifactsSurface, gp as createLogger, gs as ExtensionNotification, gt as renderStaleReadNotice, gu as Command, gv as ReasoningWireAction, h as flattenTurns, h_ as ToolContext, ha as ExtensionInstallIo, hc as SubagentRegistry, hf as AutoCompactInput, hg as CompactStartHookContext, hi as CompactStartEvent, hl as parseSkillInstallSpec, hm as ProviderCapabilities, hn as ReusableExecutionContext, ho as ExtensionArtifactRow, hp as consoleSink, hs as ExtensionHudWriter, ht as collectNewlyStaleReadPaths, hu as resolveCompletionSubmit, hv as PairingRepairMode, i as _default$1, i_ as ToolResultDocumentRefContent, ia as buildExtensionRegistry, ic as sanitizeExtensionConfigActionPatch, ig as AgentBehavior, ih as OpenAIParams, ii as utf8ByteLength, il as stripShellInterpolations, im as CacheDimensionDiff, in as EvalVariantSummary, io as resolveArtifactKind, ip as isStandardSchema, is as ExtensionToolResultTransform, it as resolveLegacyPersistDir, iv as RemoteStoreOptions, j as MetricAttributes, j_ as ToolStateStore, ja as ExtensionScanEntry, jc as AgentPluginsVersion, jg as PromptImagePart, ji as CompactScope, jl as createSkillActivationState, jm as SchemaSanitizeResult, jn as emitEfficiencyMetrics, jo as ExtensionKeybinding, js as createExtensionHostRuntimeBridge, jt as withZidaneExtensionSkill, ju as commandBlocksToContent, jv as remintDuplicateToolCallIds, k as InstrumentOptions, k_ as ToolStateController, ka as registerExtensionHostModules, kc as defaultPluginDataRoot, kg as PromptAudioPart, kh as applyAnthropicCacheBreakpoints, ki as buildUpToCompactPrompt, kl as SkillActivationState, km as SchemaSanitizeOptions, kn as defineMetrics, ko as ExtensionGuiPanel, kr as SkillsReadToolOptions, ks as ExtensionWorkspaceSurface, kt as readSkillEditMarker, ku as CommandStepFn, kv as fromOpenAI, l as TracingConventions, l_ as ToolResultVideoContent, la as mergeContributions, lc as SpawnTaskOutcome, lg as AutoCompactConfig, lh as MistralParams, li as selectFilesFromReadState, ll as SkillInstallErrorCode, lm as fnv1a32, ln as MetricDirection, lo as ExtensionApiVersion, lp as LogRecord, lr as headlessEventToJsonl, ls as LoadedPluginRecord, lt as resolveTasksDir, lu as CompletionSubmitContext, lv as createFileMapStore, ly as ModelCatalogEntry, m as TokenUsageLike, m_ as toolResultToText, ma as ExtensionInstallErrorCode, mc as SubagentOverride, mf as AutoCompactDecision, mg as CompactHookContext, mi as CompactResult, ml as listSkillCandidates, mm as Provider, mn as RegisterEvalTestsOptions, mo as ExtensionArtifactRendererRegistration, mp as RingBufferSink, ms as ExtensionHudStatus, mt as applyCompactSummaryCutoff, mv as PairingRepair, n as composePresets, n_ as ToolResultContent, na as ExtensionCatalogPartition, nc as resolveExtensionConfig, ng as refreshOpenAICodexToken, ni as BYTES_PER_TOKEN, nl as InterpolateShellCommandsOptions, nm as CacheBreakInfo, nn as EvalScorerContext, no as refreshArtifact, np as SchemaInput, ns as ExtensionToolResultMetadataRegistration, nt as maybePersistToolResult, ny as resolveTransportConfig, o as GEN_AI_ATTRIBUTES, o_ as ToolResultImageRefContent, oa as disposeExtensionRegistry, oc as ChildAgent, og as AgentRunOptions, oi as PostCompactRestoreOptions, om as CacheDimensionSnapshot, on as EvalWorkspaceOptions, oo as createArtifactDetectHook, op as zodToJsonSchema, os as ExtensionTuiSurface, ot as resolveMcpWarningsDir, ou as CompletionItem, ov as createMemoryStore, p as ModelUsage, p_ as toolOutputByteLength, pa as ExtensionInstallError, pc as SubagentDef, pf as AUTO_COMPACT_MIN_GROWTH_FRACTION, pg as CompactFunction, ph as local, pi as CompactOptions, pl as installSkillFromSpec, pm as HistoryRepair, pn as MetricStats, pp as LoggingHooksOptions, pr as transcriptToOpenAIMessages, ps as ExtensionHudState, pt as TOOL_USE_SKIPPED_MESSAGE, pv as PairingDropKind, q as OAuthCallbackResult, q_ as SessionRun, qa as ExtensionBusEnvelope, qc as SkillValidationResult, qg as StaleReadPolicy, qh as isOAuthAccessToken, qi as Agent, qo as ExtensionSource, qp as ContextCategoryId, qr as RunSummaryBudget, qs as ExtensionConfigValue, qt as EvalMetricError, r as definePreset, r_ as ToolResultDocumentContent, ra as buildExtensionPreset, rc as resolveExtensionConfigValue, rg as registerOAuthProvider, ri as estimateTokens, rl as interpolateShellCommands, rm as CacheBreakLoggerOptions, rn as EvalTestRunner, ro as renderArtifactRow, rp as StandardSchemaLike, rr as OpenAIChatMessage, rs as ExtensionToolResultPatch, rt as migrateSessionArtifactDirs, ry as resultToString, s as Span, s_ as ToolResultMetadata, sa as filterExtensionRegistry, sc as ExtensionSubagentDef, sg as AgentStats, sh as openai, si as RecentFile, sl as SkillInstallCandidate, sm as CacheDriftInfo, sn as EvalWorkspaceSnapshot, so as EMPTY_EXTENSION_REGISTRY, sp as ConsoleSinkOptions, ss as GuiContributions, st as resolvePersistDir, su as CompletionProvider, sv as FileMapAdapter, sy as originPinnedFetch, t as Preset, t_ as ToolResultAudioContent, ta as BuildExtensionRegistryOptions, tc as isValidExtensionConfigValue, tg as refreshAnthropicToken, ti as createRunSummaryCollector, tl as resolveSkills, tn as EvalScorer, tp as InferSchemaOutput, tr as HeadlessUsage, ts as ExtensionToolRendererRegistration, tt as cleanupPersistedSession, ty as normalizeMcpServers, u as TracingHookSet, u_ as TurnFinishReason, ua as partitionExtensionCatalog, uc as SpawnTool, ug as CacheTtl, uh as mistral, ui as selectFilesFromSession, ul as SkillInstallOptions, um as hashMessages, un as MetricEmitter, uo as ExtensionArtifactDetection, up as LogSink, us as TuiContributions, ut as INTERRUPT_MESSAGE_FOR_TOOL_USE, uv as EnsureToolResultPairingOptions, uy as ModelCatalogSource, v as MutationValidationBatch, v_ as HydrateReadStateOptions, va as ExtensionInstallScope, vc as SpawnModelEntry, vf as shouldAutoCompact, vg as DedupToolConfig, vh as BasetenParams, vi as CompactPromptTooLongError, vl as discoverSkills, vm as StreamOptions, vn as TrajectoryStepKind, vo as ExtensionBusEmitOptions, vp as createRingBufferSink, vr as ValidationResult, vs as ExtensionNotifyTone, vt as EditSessionTarget, vu as CommandArgSuggestion, vv as SYNTHETIC_TOOL_RESULT_PLACEHOLDER, w as createMutationValidationHooks, w_ as hydrateReadStateFromSessionAsync, wa as listExtensionCandidates, wc as expandPluginVars, wg as ModelTarget, wi as TRAILER, wl as IMPLICITLY_ALLOWED_SKILL_TOOLS, wn as computeEvalTagScores, wo as ExtensionContributions, ws as ExtensionModelEntry, wt as buildZidaneExtensionSkill, wu as CommandOutputBlock, wv as dropInvalidToolPairings, x as MutationValidationMutation, x_ as getReadState, xa as InstalledExtensionTargetOptions, xc as matchModelEntries, xf as AnswerValue, xg as McpServerConfig, xh as ArceeParams, xi as CompactPromptBuilder, xm as ToolResult, xn as buildRegisteredEvals, xo as ExtensionCapability, xs as ExtensionArtifactScope, xt as SkillEditMarker, xu as CommandGenerateDataOptions, xv as TurnInterruptionState, y as MutationValidationFailure, y_ as ReadStateEntry, ya as ExtensionInstallSource, yc as createModelSearchTool, yg as GeometricThinkingDecay, yh as baseten, yi as BASE_INSTRUCTIONS, yn as artifactPath, yo as ExtensionBusMessage, yp as fanoutSink, yr as validateToolArgs, ys as ExtensionStatusOptions, yt as ExtensionEditMarker, yu as CommandAttachment, yv as TOOL_USE_INTERRUPTED_MARKER, z as McpCredentialEntry, z_ as SkillResource, za as discoverAndBuildExtensionRegistry, zc as SUPPORTED_AGENT_PLUGINS_VERSIONS, zf as QuestionPayload, zg as RetryConfig, zi as GenerateStructuredDataOptions, zn as formatTrajectoryLine, zo as ExtensionPermission, zp as ContextSegmentOrigin, zs as ExtensionConfigEnumItem, zt as EvalAgentRunStats } from "./index-Dc_zYpEu.js";
|
|
3
3
|
import { _ as TaskHandle, a as ContextType, c as ExecutionContext, d as ListFilesEntry, f as ListFilesOptions, g as TaskExitInfo, h as TaskEntry, i as ContextMount, l as ExecutionHandle, m as StreamHandle, n as ContextCapabilities, o as DetachedTasksCapability, p as SpawnConfig, r as ContextHardening, s as ExecResult, t as BackgroundTaskStatus, u as ListFileMetadata, v as TaskStallInfo, y as resolveDetachedTasksCapability } from "./types-U-rIVUDw.js";
|
|
4
4
|
import { t as createProcessContext } from "./index-B6FkK6ZN.js";
|
|
5
5
|
import { n as createSandboxContext, t as SandboxProvider } from "./sandbox-CDl9tfTo.js";
|
|
6
6
|
import { a as hasSystemPromptBoundary, c as replaceDynamicSection, i as appendStaticSection, l as splitSystemPrompt, n as SystemPromptParts, o as joinSystemPrompt, r as appendDynamicSection, s as renderSystemForWire, t as SYSTEM_PROMPT_BOUNDARY } from "./system-prompt-MNVHatSD.js";
|
|
7
|
-
export { ANCHOR_PREVIEW_MAX_CHARS, AUTO_COMPACT_MIN_GROWTH_FRACTION, type ActivationVia, type ActiveSkill, type Agent, AgentAbortedError, type AgentBehavior, AgentBudgetExceededError, AgentContextExceededError, type AgentHookMap, type AgentHooks, AgentLengthResumeExhaustedError, type AgentOptions, type AgentPluginsVersion, AgentProviderError, type AgentRunOptions, type AgentStats, AgentToolNotAllowedError, AgentToolPairingError, type AnswerValue, type AnthropicParams, type ArceeParams, type AutoCompact, type AutoCompactConfig, type AutoCompactDecision, type AutoCompactInput, BASE_INSTRUCTIONS, BYTES_PER_TOKEN, type BackgroundTaskStatus, type BasetenParams, type BuildExtensionRegistryOptions, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, type CacheBreakInfo, type CacheBreakLoggerOptions, type CacheDimensionDiff, type CacheDimensionName, type CacheDimensionSnapshot, type CacheDriftInfo, type CacheTtl, type CerebrasParams, type ChildAgent, type ClassifiedError, type ClassifiedErrorKind, type Command, type CommandAgentResult, type CommandArgSuggestion, type CommandAttachment, type CommandExecution, type CommandGenerateDataOptions, type CommandInteraction, type CommandInvocation, type CommandOutputBlock, type CommandSpawnResult, type CommandSpawnTask, type CommandStep, type CommandStepContext, type CommandStepFn, type CompactDirection, type CompactEndEvent, type CompactEndHookContext, type CompactFunction, type CompactHookContext, CompactInvalidInputError, type CompactOptions, type CompactPromptBuilder, type CompactPromptOptions, CompactPromptTooLongError, type CompactResult, type CompactScope, type CompactStartEvent, type CompactStartHookContext, type CompactionSlice, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type CompletionSubmitContext, type ConfirmQuestion, type ConnectMcpServersOptions, type ConsoleSinkOptions, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCapabilities, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextHardening, type ContextItem, type ContextMcpGroup, type ContextMount, type ContextSegment, type ContextSegmentFile, type ContextSegmentOrigin, type ContextSegmentsInput, type ContextSnapshot, type ContextType, type ContextUsageSplit, type Counter, type CreateEvalAgentOptions, type CreateSessionOptions, type CreateShellToolOptions, type CustomField, DEFAULT_MAX_VALUE_BYTES, type DeactivationReason, type DedupHasher, type DedupToolConfig, type DetachedTasksCapability, type DiscoverAndBuildExtensionRegistryOptions, EFFICIENCY_METRICS, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, EXTENSION_BUS_MAX_PAYLOAD_BYTES, EXTENSION_EDIT_METADATA_KEY, type EditSessionTarget, type EnsureToolResultPairingOptions, type EvalAgent, type EvalAgentMcpServers, type EvalAgentRunOptions, type EvalAgentRunResult, type EvalAgentRunStats, type EvalAgentStats, type EvalArtifacts, type EvalCaseOptions, type EvalCaseResult, type EvalDefinition, type EvalDefinitionContext, type EvalMetric, EvalMetricError, type EvalRunMetricAggregate, type EvalRunReporter, type EvalRunReporterOptions, type EvalRunSummary, type EvalRunSummaryCase, type EvalRunUsage, type EvalScore, type EvalScorer, type EvalScorerContext, type EvalTestRunner, type EvalVariantSummary, type EvalWorkspaceFile, type EvalWorkspaceOptions, type EvalWorkspaceSnapshot, type ExecResult, type ExecutionContext, type ExecutionHandle, type ExtensionAgentPluginOptions, type ExtensionApiVersion, type ExtensionBannerOptions, type ExtensionBehaviorTransform, type ExtensionBus, type ExtensionBusChannel, type ExtensionBusEmitOptions, type ExtensionBusEnvelope, type ExtensionBusMessage, type ExtensionBusSurface, type ExtensionCapability, type ExtensionCatalogPartition, type ExtensionConfigActionItem, type ExtensionConfigActionResult, type ExtensionConfigActionStatus, 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 ExtensionConfigValueItem, type ExtensionContext, type ExtensionContextTransform, type ExtensionContributions, type ExtensionCustomRenderer, type ExtensionCustomRendererEntry, type ExtensionDefinition, type ExtensionEditMarker, 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 ExtensionSubagentDef, 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 FileMapAdapter, type FileMapStoreOptions, GEN_AI_ATTRIBUTES, type GenerateStructuredDataOptions, type GeometricThinkingDecay, type GuiContributions, type HeadlessErrorInfo, type HeadlessEvent, type HeadlessOptions, type HeadlessResult, type HeadlessStatus, type HeadlessUsage, type Histogram, type HistoryRepair, type HydrateReadStateOptions, IMPLICITLY_ALLOWED_SKILL_TOOLS, INTERRUPT_MESSAGE_FOR_TOOL_USE, type InferSchemaOutput, type InlineAutocompleteContext, type InlineAutocompleteProvider, type InlineGhost, type InstallExtensionFromSpecOptions, type InstalledExtensionTargetOptions, type InstrumentOptions, type InteractionToolOptions, type InterpolateShellCommandsOptions, type ListFileMetadata, type ListFilesEntry, type ListFilesOptions, type LlmJudgeOptions, type LoadAgentPluginOptions, type LoadSessionOptions, type LoadedExtension, type LoadedPlugin, type LoadedPluginRecord, type LocalParams, type LogLevel, type LogRecord, type LogSink, type Logger, type LoggingHookSet, type LoggingHooksOptions, type LoginMcpServerOptions, type LoginMcpServerResult, type ManifestValidation, type McpConnection, type McpConnector, type McpCredentialEntry, type McpCredentialStore, type McpExecutionBinding, McpOAuthProvider, type McpOAuthProviderOptions, type McpServerConfig, type McpToolHookContext, type McpToolMeta, type McpToolWrap, type Meter, type MetricAttributes, type MetricDirection, type MetricEmitter, type MetricSpec, type MetricSpecMap, type MetricStats, type MetricsHookSet, type MetricsHooksOptions, type MistralParams, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogSource, type ModelInfo, type ModelOption, type ModelTarget, type ModelTargetSpec, type ModelUsage, type MutationValidationBatch, type MutationValidationFailure, type MutationValidationHooksOptions, type MutationValidationMutation, type MutationValidationResult, NO_TOOLS_PREAMBLE, type OAuthCallbackHandle, type OAuthCallbackOptions, type OAuthCallbackResult, type OAuthParams, type OAuthProviderInterface, type OAuthRefreshHookContext, ORPHANED_TOOL_RESULT_MARKER, OUTPUT_RESERVE_TOKENS, type OpenAIChatMessage, type OpenAICompatAuthHeader, OpenAICompatHttpError, type OpenAICompatParams, type OpenAIParams, type OpenRouterParams, OperationTimeoutError, PERSISTED_STUB_PREFIX, PERSISTENCE_PREVIEW_BYTES, PLUGIN_MANIFEST_FILE, PLUGIN_MCP_FILE, PLUGIN_SKILLS_DIR, type PairingDrop, type PairingDropKind, type PairingRepair, type PairingRepairMode, type PersistInput, type PersistOutcome, type PlanPayload, type PlanResponse, type PluginAuthor, type PluginComponentStatus, type PluginDiagnostic, type PluginManifest, type PluginSchemaKind, type PostCompactAttachments, type PostCompactRestoreOptions, type Preset, type ProgressNudgeKind, type ProgressNudgeMessage, type PromptAudioPart, type PromptDocumentPart, type PromptImagePart, type PromptPart, type PromptTextPart, type PromptVideoPart, type Provider, type ProviderCapabilities, type ProviderDescriptor, type ProviderMeta, type Question, type QuestionChoice, type QuestionPayload, type ReadStateEntry, type ReadStateMap, type ReasoningWireAction, type RecentFile, type RegisterEvalTestsOptions, type RemintResult, type RemoteStoreOptions, type RepeatGuardConfig, type RepeatGuardToolMatcher, type ResolveContentRef, type ResolveContentRefBlock, type ResolveOAuthApiKeyOptions, type RetryConfig, type ReusableExecutionContext, type RingBufferSink, type RunHookMap, type RunSummary, type RunSummaryBlock, type RunSummaryBudget, type RunSummaryByModel, type RunSummaryCollector, type RunSummaryCollectorOptions, type RunSummaryError, type RunSummaryRepeatGuard, type RunSummaryTokens, type RunSummaryValidation, SHELL_CASCADE_CANCEL_MESSAGE, SKILL_EDIT_METADATA_KEY, SUPPORTED_AGENT_PLUGINS_VERSIONS, SYNTHETIC_TOOL_RESULT_PLACEHOLDER, SYSTEM_PROMPT_BOUNDARY, type SandboxProvider, type SchemaInput, type SchemaSanitizeOptions, type SchemaSanitizeProfile, type SchemaSanitizeResult, type SelectQuestion, type Session, type SessionArtifactDirMigration, type SessionContentBlock, type SessionData, type SessionEndStatus, type SessionHookContext, type SessionMessage, type SessionMetaRow, type SessionRun, type SessionStore, type SessionTurn, type ShellInterpolationApproval, type SkillActivationState, type SkillActivationStateOptions, type SkillConfig, type SkillDiagnostic, type SkillEditMarker, type SkillInstallCandidate, SkillInstallError, type SkillInstallErrorCode, type SkillInstallOptions, type SkillInstallResult, type SkillInstallSpec, type SkillResource, type SkillSource, type SkillValidationIssue, type SkillValidationResult, type SkillsConfig, type SkillsReadToolOptions, type SkillsRunScriptToolOptions, type SkillsUseToolOptions, type SourcedScanPath, type Span, type SpawnConfig, type SpawnHookContext, type SpawnModelEntry, type SpawnTaskInput, type SpawnTaskOutcome, type SpawnTool, type SpawnToolOptions, type SpawnToolState, type StagedToolState, type StaleReadPolicy, type StandardSchemaLike, type StartSpan, type StepThinkingDecay, type StoredExtensionConfigItem, type StreamCallbacks, type StreamHandle, type StreamHookContext, type StreamOptions, type SubagentDef, type SubagentOverride, type SubagentRegistry, type SuccessfulMutationOutcome, type SummaryToTurnInput, type SystemPromptParts, TOOL_USE_CANCELLED_MESSAGE, TOOL_USE_INTERRUPTED_MARKER, TOOL_USE_SKIPPED_MESSAGE, TRAILER, type TaskEntry, type TaskExitInfo, type TaskHandle, type TaskStallInfo, type TextQuestion, type ThinkingDecay, type ThinkingLevel, type ToWireMessagesOptions, type TokenUsageLike, type ToolCall, type ToolContext, type ToolDef, type ToolHookContext, type ToolMap, type ToolOutcome, type ToolResult, type ToolResultAudioContent, type ToolResultContent, type ToolResultDocumentContent, type ToolResultDocumentRefContent, type ToolResultImageContent, type ToolResultImageRefContent, type ToolResultMetadata, type ToolResultTextContent, type ToolResultVideoContent, type ToolSpec, type ToolStateController, type ToolStateOp, type ToolStateStore, type ToolStateView, type TracingConventions, type TracingHookSet, type TracingHooksOptions, type Trajectory, type TrajectoryStep, type TrajectoryStepKind, type TuiContributions, type TurnFinishReason, type TurnInterruptionState, type TurnResult, type TurnUsage, type UpDownCounter, type ValidationResult, type WireExtensionConfigItem, type WireExtensionConfigSchema, type XaiParams, ZIDANE_EXTENSION_SKILL_NAME, ZIDANE_SKILL_EDIT_SKILL_NAME, agentPluginsSchemaId, anchorPreviewFor, anthropic, appendDynamicSection, appendStaticSection, applyAnthropicCacheBreakpoints, applyCompactSummaryCutoff, arcee, artifactPath, autoDetectAndConvert, baseten, _default as basic, basicTools, buildCatalog, buildCompactPrompt, buildEvalRunSummary, buildExtensionPreset, buildExtensionRegistry, buildFromCompactPrompt, buildFullCompactPrompt, buildPersistedStub, buildPostCompactAttachments, buildRegisteredEvals, buildTailCompactPrompt, buildTrajectory, buildUpToCompactPrompt, buildZidaneExtensionSkill, buildZidaneSkillEditSkill, cerebras, clampExtensionConfigNumber, classifyOpenAICompatError, cleanupPersistedSession, clearRegisteredEvals, coerceExtensionConfigInput, collectNewlyStaleReadPaths, commandBlockToEvent, commandBlocksToContent, commandSteps, compactConversation, composeExtensionPreset, computeEvalTagScores, connectMcpServers, consoleSink, createAgent, createEvalAgent, createEvalRunReporter, createExtensionBus, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createFileMapStore, createInteractionTool, createLogger, createLoggingHooks, createMemoryMcpCredentialStore, createMemoryStore, createMetricsHooks, createModelSearchTool, createMutationValidationHooks, createPathAutocompleteProvider, createProcessContext, createRemoteStore, createReusableExecutionContext, createRingBufferSink, createRunSummaryCollector, createSandboxContext, createSession, createShellTool, createSkillActivationState, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolStateController, createTracingHooks, createWorkspaceSurface, credentialsFilePath, credentialsFromParams, defaultExtensionScanPaths, defaultPluginDataRoot, defaultRepeatGuardNormalize, defaultRepeatGuardTracked, defineEval, defineExtension, defineMetrics, definePreset, defineSkill, detectTurnInterruption, diffCacheDimensions, discoverAndBuildExtensionRegistry, discoverExtensions, discoverSkills, disposeExtensionRegistry, dropInvalidToolPairings, edit, editSessionMetadata, effectiveContextWindow, efficiencyMetricValues, emitEfficiencyMetrics, ensureEndsWithUserMessage, ensureToolResultPairing, errorMessage, estimateTokens, executeCommand, expandEnvPlaceholders, expandMcpConfigEnv, expandPluginVars, extensionDirForCwd, extensionScaffold, extractRuntimeCredentials, fanoutSink, fetchExtensionSource, fileContains, fileContentQuality, fileExists, fileExistsOneOf, filterExtensionRegistry, filterUnresolvedToolUses, finalizeEvalMetrics, flattenTurns, fnv1a32, formatEvalCaseSummary, formatEvalRunSummary, formatLogLine, formatModelLine, formatTokenUsage, formatTrajectoryLine, fromAnthropic, fromOpenAI, functionalityMetric, generateStructuredData, getModelCatalog, getOAuthApiKey, getOAuthProvider, getReadState, glob, grep, hasAuthorizationHeader, hasSystemPromptBoundary, hashContent, hashMessages, headlessEventToJsonl, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, inlineLoadedExtension, installAllowedToolsGate, installCacheBreakLogger, installExtensionFromSpec, installSkillFromSpec, interpolateShellCommands, isExtensionDefinition, isOAuthAccessToken, isSpawnTool, isStandardSchema, isSupportedAgentPluginsVersion, isToolAllowedByUnion, isToolStateOps, isValidExtensionConfigItem, isValidExtensionConfigValue, joinSystemPrompt, jsonSink, listExtensionCandidates, listSkillCandidates, llmJudge, loadAgentPlugin, loadSession, local, localReliabilityBehavior, loginMcpServer, mapOAIFinishReason, matchModelEntries, matchesAllowedTool, matchesContextExceeded, maybePersistToolResult, mergeContributions, migrateSessionArtifactDirs, mistral, multiEdit, normalizeMcpBlocks, normalizeMcpServers, normalizeMetric, normalizeProviders, normalizeShellCommand, openai, openaiCompat, openrouter, originPinnedFetch, parseAllowedToolPattern, parseCommandInvocation, parseExtensionInstallSource, parseExtensionScanPathEnv, parsePluginManifest, parseSchemaId, parseSkillFile, parseSkillInstallSpec, partitionExtensionCatalog, patchInlineGhost, readExtensionInstallProvenance, readOAuthCredentials, readSkillEditMarker, readSkillProvenance, readStateKey, reasoningWireAction, refreshAnthropicToken, refreshOpenAICodexToken, registerCustomOAuthProvider, registerEvalTests, registerExtensionHostModules, registerOAuthProvider, relativeArtifactPath, remintDuplicateToolCallIds, removeInstalledExtension, renderStaleReadNotice, renderSystemForWire, replaceDynamicSection, resolveCompletionSubmit, resolveDetachedTasksCapability, resolveExtensionConfig, resolveExtensionConfigValue, resolveExtensionDocsDir, resolveInlineSuggestion, resolveLegacyPersistDir, resolveLegacySessionDir, resolveMcpWarningsDir, resolveModelTargets, resolveOAuthApiKey, resolvePersistDir, resolveReadStateMap, resolveSchemaInput, resolveSessionDir, resolveSkills, resolveTasksDir, resolveTransportConfig, resultToString, runEvalCase, runHeadless, sanitizeExtensionConfigActionPatch, sanitizeHistoryForProvider, sanitizeToolSchema, sanitizeToolSpecs, scanExtensionDirectories, selectFilesFromReadState, selectFilesFromSession, selectRecentFiles, setModelCatalog, shouldAutoCompact, sliceForCompaction, snapshotCacheDimensions, splitSystemPrompt, stableStringify, stagedToolState, startOAuthCallback, statsByModel, statusCompleted, stripImagesFromTurns, stripShellInterpolations, summaryToTurn, toAnthropic, toOpenAI, toTypedError, toWireConfigSchema, toWireMessages, toolOutputBudgetByteLength, toolOutputByteLength, toolResultToText, transcriptToOpenAIMessages, truncateHeadForPtlRetry, updateInstalledExtension, utf8ByteLength, validatePluginManifest, validateResourcePath, validateResourcePathReal, validateSkillForWrite, validateSkillName, validateToolArgs, waitTask, withZidaneExtensionSkill, withZidaneSkillEditSkill, writeOAuthCredentials, writeSkillToDisk, writeSkillsToDisk, xai, zodToJsonSchema };
|
|
7
|
+
export { ANCHOR_PREVIEW_MAX_CHARS, ARTIFACTS_METADATA_KEY, ARTIFACTS_PER_SESSION_CAP, ARTIFACT_KINDS, AUTO_COMPACT_MIN_GROWTH_FRACTION, type ActivationVia, type ActiveSkill, type Agent, AgentAbortedError, type AgentBehavior, AgentBudgetExceededError, AgentContextExceededError, type AgentHookMap, type AgentHooks, AgentLengthResumeExhaustedError, type AgentOptions, type AgentPluginsVersion, AgentProviderError, type AgentRunOptions, type AgentStats, AgentToolNotAllowedError, AgentToolPairingError, type AnswerValue, type AnthropicParams, type ArceeParams, type ArtifactFilter, type AutoCompact, type AutoCompactConfig, type AutoCompactDecision, type AutoCompactInput, BASE_INSTRUCTIONS, BUILTIN_ARTIFACT_KINDS, BYTES_PER_TOKEN, type BackgroundTaskStatus, type BasetenParams, type BuildExtensionRegistryOptions, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, type CacheBreakInfo, type CacheBreakLoggerOptions, type CacheDimensionDiff, type CacheDimensionName, type CacheDimensionSnapshot, type CacheDriftInfo, type CacheTtl, type CerebrasParams, type ChildAgent, type ClassifiedError, type ClassifiedErrorKind, type Command, type CommandAgentResult, type CommandArgSuggestion, type CommandAttachment, type CommandExecution, type CommandGenerateDataOptions, type CommandInteraction, type CommandInvocation, type CommandOutputBlock, type CommandSpawnResult, type CommandSpawnTask, type CommandStep, type CommandStepContext, type CommandStepFn, type CompactDirection, type CompactEndEvent, type CompactEndHookContext, type CompactFunction, type CompactHookContext, CompactInvalidInputError, type CompactOptions, type CompactPromptBuilder, type CompactPromptOptions, CompactPromptTooLongError, type CompactResult, type CompactScope, type CompactStartEvent, type CompactStartHookContext, type CompactionSlice, type CompletionContext, type CompletionItem, type CompletionProvider, type CompletionReference, type CompletionSubmitContext, type ConfirmQuestion, type ConnectMcpServersOptions, type ConsoleSinkOptions, type ContextBreakdown, type ContextBreakdownContributionContext, type ContextBreakdownContributor, type ContextBreakdownOptions, type ContextCapabilities, type ContextCategory, type ContextCategoryId, type ContextExactCounts, type ContextExtensionRow, type ContextExtensionSection, type ContextHardening, type ContextItem, type ContextMcpGroup, type ContextMount, type ContextSegment, type ContextSegmentFile, type ContextSegmentOrigin, type ContextSegmentsInput, type ContextSnapshot, type ContextType, type ContextUsageSplit, type Counter, type CreateEvalAgentOptions, type CreateSessionOptions, type CreateShellToolOptions, type CustomField, DEFAULT_MAX_VALUE_BYTES, type DeactivationReason, type DedupHasher, type DedupToolConfig, type DetachedTasksCapability, type DiscoverAndBuildExtensionRegistryOptions, EFFICIENCY_METRICS, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, EXTENSION_BUS_MAX_PAYLOAD_BYTES, EXTENSION_EDIT_METADATA_KEY, type EditSessionTarget, type EnsureToolResultPairingOptions, type EvalAgent, type EvalAgentMcpServers, type EvalAgentRunOptions, type EvalAgentRunResult, type EvalAgentRunStats, type EvalAgentStats, type EvalArtifacts, type EvalCaseOptions, type EvalCaseResult, type EvalDefinition, type EvalDefinitionContext, type EvalMetric, EvalMetricError, type EvalRunMetricAggregate, type EvalRunReporter, type EvalRunReporterOptions, type EvalRunSummary, type EvalRunSummaryCase, type EvalRunUsage, type EvalScore, type EvalScorer, type EvalScorerContext, type EvalTestRunner, type EvalVariantSummary, type EvalWorkspaceFile, type EvalWorkspaceOptions, type EvalWorkspaceSnapshot, type ExecResult, type ExecutionContext, type ExecutionHandle, type ExtensionAgentPluginOptions, type ExtensionApiVersion, type ExtensionArtifactDetection, type ExtensionArtifactKindRegistration, type ExtensionArtifactQuery, type ExtensionArtifactRendererRegistration, type ExtensionArtifactRow, type ExtensionArtifactScope, type ExtensionArtifactsSurface, type ExtensionBannerOptions, type ExtensionBehaviorTransform, type ExtensionBus, type ExtensionBusChannel, type ExtensionBusEmitOptions, type ExtensionBusEnvelope, type ExtensionBusMessage, type ExtensionBusSurface, type ExtensionCapability, type ExtensionCatalogPartition, type ExtensionConfigActionItem, type ExtensionConfigActionResult, type ExtensionConfigActionStatus, 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 ExtensionConfigValueItem, type ExtensionContext, type ExtensionContextTransform, type ExtensionContributions, type ExtensionCustomRenderer, type ExtensionCustomRendererEntry, type ExtensionDefinition, type ExtensionEditMarker, 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 ExtensionSubagentDef, 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 FileMapAdapter, type FileMapStoreOptions, GEN_AI_ATTRIBUTES, type GenerateStructuredDataOptions, type GeometricThinkingDecay, type GuiContributions, type HeadlessErrorInfo, type HeadlessEvent, type HeadlessOptions, type HeadlessResult, type HeadlessStatus, type HeadlessUsage, type Histogram, type HistoryRepair, type HydrateReadStateOptions, IMPLICITLY_ALLOWED_SKILL_TOOLS, INTERRUPT_MESSAGE_FOR_TOOL_USE, type InferSchemaOutput, type InlineAutocompleteContext, type InlineAutocompleteProvider, type InlineGhost, type InstallExtensionFromSpecOptions, type InstalledExtensionTargetOptions, type InstrumentOptions, type InteractionToolOptions, type InterpolateShellCommandsOptions, type ListFileMetadata, type ListFilesEntry, type ListFilesOptions, type LlmJudgeOptions, type LoadAgentPluginOptions, type LoadSessionOptions, type LoadedExtension, type LoadedPlugin, type LoadedPluginRecord, type LocalParams, type LogLevel, type LogRecord, type LogSink, type Logger, type LoggingHookSet, type LoggingHooksOptions, type LoginMcpServerOptions, type LoginMcpServerResult, type ManifestValidation, type McpConnection, type McpConnector, type McpCredentialEntry, type McpCredentialStore, type McpExecutionBinding, McpOAuthProvider, type McpOAuthProviderOptions, type McpServerConfig, type McpToolHookContext, type McpToolMeta, type McpToolWrap, type Meter, type MetricAttributes, type MetricDirection, type MetricEmitter, type MetricSpec, type MetricSpecMap, type MetricStats, type MetricsHookSet, type MetricsHooksOptions, type MistralParams, type ModelCatalog, type ModelCatalogEntry, type ModelCatalogSource, type ModelInfo, type ModelOption, type ModelTarget, type ModelTargetSpec, type ModelUsage, type MutationValidationBatch, type MutationValidationFailure, type MutationValidationHooksOptions, type MutationValidationMutation, type MutationValidationResult, NO_TOOLS_PREAMBLE, type OAuthCallbackHandle, type OAuthCallbackOptions, type OAuthCallbackResult, type OAuthParams, type OAuthProviderInterface, type OAuthRefreshHookContext, ORPHANED_TOOL_RESULT_MARKER, OUTPUT_RESERVE_TOKENS, type OpenAIChatMessage, type OpenAICompatAuthHeader, OpenAICompatHttpError, type OpenAICompatParams, type OpenAIParams, type OpenRouterParams, OperationTimeoutError, PERSISTED_STUB_PREFIX, PERSISTENCE_PREVIEW_BYTES, PLUGIN_MANIFEST_FILE, PLUGIN_MCP_FILE, PLUGIN_SKILLS_DIR, type PairingDrop, type PairingDropKind, type PairingRepair, type PairingRepairMode, type PersistInput, type PersistOutcome, type PlanPayload, type PlanResponse, type PluginAuthor, type PluginComponentStatus, type PluginDiagnostic, type PluginManifest, type PluginSchemaKind, type PostCompactAttachments, type PostCompactRestoreOptions, type Preset, type ProgressNudgeKind, type ProgressNudgeMessage, type PromptAudioPart, type PromptDocumentPart, type PromptImagePart, type PromptPart, type PromptTextPart, type PromptVideoPart, type Provider, type ProviderCapabilities, type ProviderDescriptor, type ProviderMeta, type Question, type QuestionChoice, type QuestionPayload, type ReadStateEntry, type ReadStateMap, type ReasoningWireAction, type RecentFile, type RegisterEvalTestsOptions, type RemintResult, type RemoteStoreOptions, type RepeatGuardConfig, type RepeatGuardToolMatcher, type ResolveContentRef, type ResolveContentRefBlock, type ResolveOAuthApiKeyOptions, type RetryConfig, type ReusableExecutionContext, type RingBufferSink, type RunHookMap, type RunSummary, type RunSummaryBlock, type RunSummaryBudget, type RunSummaryByModel, type RunSummaryCollector, type RunSummaryCollectorOptions, type RunSummaryError, type RunSummaryRepeatGuard, type RunSummaryTokens, type RunSummaryValidation, SHELL_CASCADE_CANCEL_MESSAGE, SKILL_EDIT_METADATA_KEY, SUPPORTED_AGENT_PLUGINS_VERSIONS, SYNTHETIC_TOOL_RESULT_PLACEHOLDER, SYSTEM_PROMPT_BOUNDARY, type SandboxProvider, type SchemaInput, type SchemaSanitizeOptions, type SchemaSanitizeProfile, type SchemaSanitizeResult, type SelectQuestion, type Session, type SessionArtifact, type SessionArtifactDirMigration, type SessionArtifactInput, type SessionContentBlock, type SessionData, type SessionEndStatus, type SessionHookContext, type SessionMessage, type SessionMetaRow, type SessionRun, type SessionStore, type SessionTurn, type ShellInterpolationApproval, type SkillActivationState, type SkillActivationStateOptions, type SkillConfig, type SkillDiagnostic, type SkillEditMarker, type SkillInstallCandidate, SkillInstallError, type SkillInstallErrorCode, type SkillInstallOptions, type SkillInstallResult, type SkillInstallSpec, type SkillResource, type SkillSource, type SkillValidationIssue, type SkillValidationResult, type SkillsConfig, type SkillsReadToolOptions, type SkillsRunScriptToolOptions, type SkillsUseToolOptions, type SourcedScanPath, type Span, type SpawnConfig, type SpawnHookContext, type SpawnModelEntry, type SpawnTaskInput, type SpawnTaskOutcome, type SpawnTool, type SpawnToolOptions, type SpawnToolState, type StagedToolState, type StaleReadPolicy, type StandardSchemaLike, type StartSpan, type StepThinkingDecay, type StoredExtensionConfigItem, type StreamCallbacks, type StreamHandle, type StreamHookContext, type StreamOptions, type SubagentDef, type SubagentOverride, type SubagentRegistry, type SuccessfulMutationOutcome, type SummaryToTurnInput, type SystemPromptParts, TOOL_USE_CANCELLED_MESSAGE, TOOL_USE_INTERRUPTED_MARKER, TOOL_USE_SKIPPED_MESSAGE, TRAILER, type TaskEntry, type TaskExitInfo, type TaskHandle, type TaskStallInfo, type TextQuestion, type ThinkingDecay, type ThinkingLevel, type ToWireMessagesOptions, type TokenUsageLike, type ToolCall, type ToolContext, type ToolDef, type ToolHookContext, type ToolMap, type ToolOutcome, type ToolResult, type ToolResultAudioContent, type ToolResultContent, type ToolResultDocumentContent, type ToolResultDocumentRefContent, type ToolResultImageContent, type ToolResultImageRefContent, type ToolResultMetadata, type ToolResultTextContent, type ToolResultVideoContent, type ToolSpec, type ToolStateController, type ToolStateOp, type ToolStateStore, type ToolStateView, type TracingConventions, type TracingHookSet, type TracingHooksOptions, type Trajectory, type TrajectoryStep, type TrajectoryStepKind, type TuiContributions, type TurnFinishReason, type TurnInterruptionState, type TurnResult, type TurnUsage, type UpDownCounter, type ValidationResult, type WireExtensionConfigItem, type WireExtensionConfigSchema, type XaiParams, ZIDANE_EXTENSION_SKILL_NAME, ZIDANE_SKILL_EDIT_SKILL_NAME, agentPluginsSchemaId, anchorPreviewFor, anthropic, appendDynamicSection, appendStaticSection, applyAnthropicCacheBreakpoints, applyCompactSummaryCutoff, arcee, artifactKindLabel, artifactPath, _default as artifactsPreset, autoDetectAndConvert, baseten, _default$1 as basic, basicTools, buildCatalog, buildCompactPrompt, buildEvalRunSummary, buildExtensionPreset, buildExtensionRegistry, buildFromCompactPrompt, buildFullCompactPrompt, buildPersistedStub, buildPostCompactAttachments, buildRegisteredEvals, buildTailCompactPrompt, buildTrajectory, buildUpToCompactPrompt, buildZidaneExtensionSkill, buildZidaneSkillEditSkill, cerebras, clampExtensionConfigNumber, classifyOpenAICompatError, cleanupPersistedSession, clearRegisteredEvals, coerceExtensionConfigInput, collectNewlyStaleReadPaths, commandBlockToEvent, commandBlocksToContent, commandSteps, compactConversation, composeExtensionPreset, composePresets, computeEvalTagScores, connectMcpServers, consoleSink, createAgent, createArtifactDetectHook, createArtifactsSurface, createEvalAgent, createEvalRunReporter, createExtensionBus, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createFileMapStore, createInteractionTool, createLogger, createLoggingHooks, createMemoryMcpCredentialStore, createMemoryStore, createMetricsHooks, createModelSearchTool, createMutationValidationHooks, createPathAutocompleteProvider, createProcessContext, createRemoteStore, createReusableExecutionContext, createRingBufferSink, createRunSummaryCollector, createSandboxContext, createSession, createShellTool, createSkillActivationState, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolStateController, createTracingHooks, createWorkspaceSurface, credentialsFilePath, credentialsFromParams, defaultExtensionScanPaths, defaultPluginDataRoot, defaultRepeatGuardNormalize, defaultRepeatGuardTracked, defineEval, defineExtension, defineMetrics, definePreset, defineSkill, detectTurnInterruption, diffCacheDimensions, discoverAndBuildExtensionRegistry, discoverExtensions, discoverSkills, disposeExtensionRegistry, dropInvalidToolPairings, edit, editSessionMetadata, effectiveContextWindow, efficiencyMetricValues, emitEfficiencyMetrics, ensureEndsWithUserMessage, ensureToolResultPairing, errorMessage, estimateTokens, executeCommand, expandEnvPlaceholders, expandMcpConfigEnv, expandPluginVars, extensionDirForCwd, extensionScaffold, extractRuntimeCredentials, fanoutSink, fetchExtensionSource, fileContains, fileContentQuality, fileExists, fileExistsOneOf, filterExtensionRegistry, filterUnresolvedToolUses, finalizeEvalMetrics, flattenTurns, fnv1a32, formatEvalCaseSummary, formatEvalRunSummary, formatLogLine, formatModelLine, formatTokenUsage, formatTrajectoryLine, fromAnthropic, fromOpenAI, functionalityMetric, generateStructuredData, getModelCatalog, getOAuthApiKey, getOAuthProvider, getReadState, glob, grep, hasAuthorizationHeader, hasSystemPromptBoundary, hashContent, hashMessages, headlessEventToJsonl, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, inlineLoadedExtension, installAllowedToolsGate, installCacheBreakLogger, installExtensionFromSpec, installSkillFromSpec, interpolateShellCommands, isExtensionDefinition, isOAuthAccessToken, isSpawnTool, isStandardSchema, isSupportedAgentPluginsVersion, isToolAllowedByUnion, isToolStateOps, isValidExtensionConfigItem, isValidExtensionConfigValue, joinSystemPrompt, jsonSink, listExtensionCandidates, listSkillCandidates, llmJudge, loadAgentPlugin, loadSession, local, localReliabilityBehavior, loginMcpServer, mapOAIFinishReason, matchModelEntries, matchesAllowedTool, matchesContextExceeded, maybePersistToolResult, mergeContributions, migrateSessionArtifactDirs, mistral, multiEdit, normalizeArtifactInput, normalizeMcpBlocks, normalizeMcpServers, normalizeMetric, normalizeProviders, normalizeShellCommand, openai, openaiCompat, openrouter, originPinnedFetch, parseAllowedToolPattern, parseCommandInvocation, parseExtensionInstallSource, parseExtensionScanPathEnv, parsePluginManifest, parseSchemaId, parseSkillFile, parseSkillInstallSpec, partitionExtensionCatalog, patchInlineGhost, readExtensionInstallProvenance, readOAuthCredentials, readSkillEditMarker, readSkillProvenance, readStateKey, reasoningWireAction, refreshAnthropicToken, refreshArtifact, refreshOpenAICodexToken, registerCustomOAuthProvider, registerEvalTests, registerExtensionHostModules, registerOAuthProvider, relativeArtifactPath, remintDuplicateToolCallIds, removeInstalledExtension, renderArtifactRow, renderStaleReadNotice, renderSystemForWire, replaceDynamicSection, resolveArtifactKind, resolveCompletionSubmit, resolveDetachedTasksCapability, resolveExtensionConfig, resolveExtensionConfigValue, resolveExtensionDocsDir, resolveInlineSuggestion, resolveLegacyPersistDir, resolveLegacySessionDir, resolveMcpWarningsDir, resolveModelTargets, resolveOAuthApiKey, resolvePersistDir, resolveReadStateMap, resolveSchemaInput, resolveSessionDir, resolveSkills, resolveTasksDir, resolveTransportConfig, resultToString, runEvalCase, runHeadless, sanitizeExtensionConfigActionPatch, sanitizeHistoryForProvider, sanitizeToolSchema, sanitizeToolSpecs, scanExtensionDirectories, selectFilesFromReadState, selectFilesFromSession, selectRecentFiles, setModelCatalog, shouldAutoCompact, sliceForCompaction, snapshotCacheDimensions, splitSystemPrompt, stableStringify, stagedToolState, startOAuthCallback, statsByModel, statusCompleted, stripImagesFromTurns, stripShellInterpolations, summaryToTurn, toAnthropic, toOpenAI, toTypedError, toWireConfigSchema, toWireMessages, toolOutputBudgetByteLength, toolOutputByteLength, toolResultToText, transcriptToOpenAIMessages, truncateHeadForPtlRetry, updateInstalledExtension, utf8ByteLength, validatePluginManifest, validateResourcePath, validateResourcePathReal, validateSkillForWrite, validateSkillName, validateToolArgs, waitTask, withZidaneExtensionSkill, withZidaneSkillEditSkill, writeOAuthCredentials, writeSkillToDisk, writeSkillsToDisk, xai, zodToJsonSchema };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { E as getModelCatalog, b as sanitizeToolSpecs, f as mapOAIFinishReason, j as setModelCatalog, l as classifyOpenAICompatError, m as openaiCompat, n as OpenAICompatHttpError, y as sanitizeToolSchema } from "./openai-compat-DY-AKxCg.js";
|
|
2
2
|
import { c as toolOutputBudgetByteLength, l as toolOutputByteLength, u as toolResultToText } from "./types-CWgENVLY.js";
|
|
3
|
-
import { $ as installExtensionFromSpec, A as selectFilesFromSession, An as
|
|
3
|
+
import { $ as installExtensionFromSpec, $n as normalizeShellCommand, A as selectFilesFromSession, An as resolveExtensionConfig, At as createSkillsRunScriptTool, B as buildUpToCompactPrompt, Bt as formatModelLine, C as resolveLegacySessionDir, D as resolveTasksDir, Dn as coerceExtensionConfigInput, Dt as isSpawnTool, E as resolveSessionDir, En as clampExtensionConfigNumber, Et as createSpawnTool, F as TRAILER, Fn as createExtensionBus, G as summaryToTurn, Gn as resolveArtifactKind, Gt as glob, H as anchorPreviewFor, I as buildCompactPrompt, J as CompactPromptTooLongError, Jn as OUTPUT_RESERVE_TOKENS, Jt as artifacts_default, K as truncateHeadForPtlRetry, Kn as createArtifactDetectHook, Kt as edit, L as buildFromCompactPrompt, Ln as BUILTIN_ARTIFACT_KINDS, M as compactConversation, Mn as sanitizeExtensionConfigActionPatch, N as BASE_INSTRUCTIONS, Nn as toWireConfigSchema, Nt as createShellTool, O as buildPostCompactAttachments, On as isValidExtensionConfigItem, P as NO_TOOLS_PREAMBLE, Pn as EXTENSION_BUS_MAX_PAYLOAD_BYTES, Q as fetchExtensionSource, Qn as defaultRepeatGuardTracked, R as buildFullCompactPrompt, Rn as artifactKindLabel, Rt as multiEdit, S as resolveLegacyPersistDir, Sn as scanExtensionDirectories, T as resolvePersistDir, Tn as defineExtension, U as sliceForCompaction, Un as refreshArtifact, Ut as createInteractionTool, V as ANCHOR_PREVIEW_MAX_CHARS, Vt as matchModelEntries, W as stripImagesFromTurns, Wn as renderArtifactRow, Wt as grep, X as createExtensionPromptBridge, Xn as shouldAutoCompact, Y as EMPTY_EXTENSION_REGISTRY, Yn as effectiveContextWindow, Z as ExtensionInstallError, Zn as defaultRepeatGuardNormalize, _ as buildPersistedStub, _n as defaultExtensionScanPaths, _t as createWorkspaceSurface, a as stagedToolState, ar as readStateKey, at as createExtensionHud, b as migrateSessionArtifactDirs, bn as isExtensionDefinition, bt as basicTools, c as INTERRUPT_MESSAGE_FOR_TOOL_USE, ct as buildExtensionRegistry, d as TOOL_USE_SKIPPED_MESSAGE, dt as filterExtensionRegistry, er as stableStringify, et as listExtensionCandidates, f as applyCompactSummaryCutoff, g as PERSISTENCE_PREVIEW_BYTES, gn as ENTRY_CANDIDATES, gt as createExtensionHostRuntimeBridge, h as PERSISTED_STUB_PREFIX, hn as registerExtensionHostModules, ht as createArtifactsSurface, i as isToolStateOps, ir as hydrateReadStateFromSessionAsync, it as updateInstalledExtension, j as selectRecentFiles, jn as resolveExtensionConfigValue, jt as createSkillsReadTool, k as selectFilesFromReadState, kn as isValidExtensionConfigValue, kt as createSkillsUseTool, l as SHELL_CASCADE_CANCEL_MESSAGE, lt as composeExtensionPreset, m as renderStaleReadNotice, mt as partitionExtensionCatalog, n as DEFAULT_MAX_VALUE_BYTES, nr as hashContent, nt as readExtensionInstallProvenance, o as normalizeProviders, or as resolveReadStateMap, ot as discoverAndBuildExtensionRegistry, p as collectNewlyStaleReadPaths, pt as mergeContributions, q as CompactInvalidInputError, qn as AUTO_COMPACT_MIN_GROWTH_FRACTION, qt as validateToolArgs, r as createToolStateController, rr as hydrateReadStateFromSession, rt as removeInstalledExtension, s as resolveModelTargets, st as buildExtensionPreset, t as createAgent, tr as getReadState, tt as parseExtensionInstallSource, u as TOOL_USE_CANCELLED_MESSAGE, ut as disposeExtensionRegistry, v as cleanupPersistedSession, vn as discoverExtensions, vt as composePresets, w as resolveMcpWarningsDir, wt as waitTask, xn as parseExtensionScanPathEnv, xt as basic_default, y as maybePersistToolResult, yn as inlineLoadedExtension, yt as definePreset, z as buildTailCompactPrompt, zt as createModelSearchTool } from "./agent-B_uQo4f1.js";
|
|
4
4
|
import { A as zodToJsonSchema, F as parseCommandInvocation, I as localReliabilityBehavior, M as commandBlocksToContent, N as commandSteps, O as isStandardSchema, P as executeCommand, S as resolveInlineSuggestion, _ as resolveExtensionDocsDir, a as loginMcpServer, b as createPathAutocompleteProvider, c as SKILL_EDIT_METADATA_KEY, d as buildZidaneExtensionSkill, f as buildZidaneSkillEditSkill, g as readSkillEditMarker, h as extensionScaffold, i as createMetricsHooks, j as commandBlockToEvent, k as resolveSchemaInput, l as ZIDANE_EXTENSION_SKILL_NAME, m as extensionDirForCwd, n as createTracingHooks, o as startOAuthCallback, p as editSessionMetadata, r as createMutationValidationHooks, s as EXTENSION_EDIT_METADATA_KEY, t as GEN_AI_ATTRIBUTES, u as ZIDANE_SKILL_EDIT_SKILL_NAME, v as withZidaneExtensionSkill, w as generateStructuredData, x as patchInlineGhost, y as withZidaneSkillEditSkill } from "./src-DzzhE2YO.js";
|
|
5
5
|
import { n as estimateTokens, r as utf8ByteLength, t as BYTES_PER_TOKEN } from "./utils-ngQzYzZD.js";
|
|
6
6
|
import { r as createProcessContext, t as resolveDetachedTasksCapability } from "./contexts-BSFQVclW.js";
|
|
7
7
|
import { createSandboxContext } from "./contexts/sandbox.js";
|
|
8
8
|
import { a as AgentProviderError, c as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, g as toTypedError, i as AgentLengthResumeExhaustedError, m as matchesContextExceeded, n as AgentBudgetExceededError, o as AgentToolNotAllowedError, r as AgentContextExceededError, s as AgentToolPairingError, t as AgentAbortedError, u as errorMessage } from "./errors-DKiMrOKq.js";
|
|
9
|
+
import { l as normalizeArtifactInput, n as ARTIFACTS_PER_SESSION_CAP, r as ARTIFACT_KINDS, t as ARTIFACTS_METADATA_KEY } from "./artifacts-CV2hUKnL.js";
|
|
9
10
|
import { A as isToolAllowedByUnion, D as IMPLICITLY_ALLOWED_SKILL_TOOLS, E as buildCatalog, F as validateSkillForWrite, I as validateSkillName, M as parseAllowedToolPattern, N as validateResourcePath, O as installAllowedToolsGate, P as validateResourcePathReal, T as parseSkillFile, a as interpolateShellCommands, c as SkillInstallError, d as parseSkillInstallSpec, f as readSkillProvenance, i as writeSkillsToDisk, j as matchesAllowedTool, k as createSkillActivationState, l as installSkillFromSpec, n as resolveSkills, o as stripShellInterpolations, r as writeSkillToDisk, t as defineSkill, u as listSkillCandidates, x as discoverSkills } from "./skills-PJyiSRCp.js";
|
|
10
11
|
import { a as PLUGIN_MCP_FILE, c as validatePluginManifest, d as isSupportedAgentPluginsVersion, f as parseSchemaId, i as PLUGIN_SKILLS_DIR, l as SUPPORTED_AGENT_PLUGINS_VERSIONS, n as defaultPluginDataRoot, o as expandPluginVars, r as loadAgentPlugin, s as parsePluginManifest, t as PLUGIN_MANIFEST_FILE, u as agentPluginsSchemaId } from "./plugins-B531Tz5b.js";
|
|
11
12
|
import { r as formatLogLine } from "./logs-view-CWG8aUAG.js";
|
|
@@ -14,7 +15,7 @@ import { n as originPinnedFetch } from "./origin-pinned-fetch-CqG8VZIq.js";
|
|
|
14
15
|
import { _ as hasAuthorizationHeader, a as expandEnvPlaceholders, c as normalizeMcpBlocks, d as resultToString, g as createMemoryMcpCredentialStore, h as McpOAuthProvider, l as normalizeMcpServers, n as connectMcpServers, o as expandMcpConfigEnv, u as resolveTransportConfig } from "./mcp-BIWa57eY.js";
|
|
15
16
|
import { SYSTEM_PROMPT_BOUNDARY, appendDynamicSection, appendStaticSection, hasSystemPromptBoundary, joinSystemPrompt, renderSystemForWire, replaceDynamicSection, splitSystemPrompt } from "./prompt.js";
|
|
16
17
|
import { _ as toOpenAI, a as detectTurnInterruption, c as ensureToolResultPairing, d as fromOpenAI, f as reasoningWireAction, g as toAnthropic, h as sanitizeHistoryForProvider, i as autoDetectAndConvert, l as filterUnresolvedToolUses, n as SYNTHETIC_TOOL_RESULT_PLACEHOLDER, o as dropInvalidToolPairings, p as remintDuplicateToolCallIds, r as TOOL_USE_INTERRUPTED_MARKER, s as ensureEndsWithUserMessage, t as ORPHANED_TOOL_RESULT_MARKER, u as fromAnthropic, v as toWireMessages } from "./messages-21XfHxyF.js";
|
|
17
|
-
import { d as createMemoryStore, f as createFileMapStore, o as loadSession, t as createSession, u as createRemoteStore } from "./session-
|
|
18
|
+
import { d as createMemoryStore, f as createFileMapStore, o as loadSession, t as createSession, u as createRemoteStore } from "./session-DPZnncaQ.js";
|
|
18
19
|
import { i as statsByModel, n as flattenTurns, r as formatTokenUsage } from "./stats-DAKBEKjc.js";
|
|
19
20
|
import { t as OperationTimeoutError } from "./timeout-CjOG2mea.js";
|
|
20
21
|
import { a as snapshotCacheDimensions, i as installCacheBreakLogger, n as fnv1a32, r as hashMessages, t as diffCacheDimensions } from "./cache-telemetry-ehVdWsg2.js";
|
|
@@ -22,14 +23,14 @@ import { s as resolveCompletionSubmit } from "./completion-core-BRo86R_L.js";
|
|
|
22
23
|
import { t as createRunSummaryCollector } from "./run-summary-BU_NgwUT.js";
|
|
23
24
|
import { headlessEventToJsonl, runHeadless, transcriptToOpenAIMessages } from "./headless.js";
|
|
24
25
|
import { EFFICIENCY_METRICS, EvalMetricError, 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 } from "./eval.js";
|
|
25
|
-
import { n as anthropic, r as applyAnthropicCacheBreakpoints } from "./anthropic-
|
|
26
|
-
import { a as readOAuthCredentials, c as writeOAuthCredentials, d as refreshAnthropicToken, f as refreshOpenAICodexToken, i as isOAuthAccessToken, l as getOAuthApiKey, n as credentialsFromParams, o as registerCustomOAuthProvider, p as registerOAuthProvider, r as extractRuntimeCredentials, s as resolveOAuthApiKey, t as credentialsFilePath, u as getOAuthProvider } from "./oauth-
|
|
26
|
+
import { n as anthropic, r as applyAnthropicCacheBreakpoints } from "./anthropic-QbHqqTkV.js";
|
|
27
|
+
import { a as readOAuthCredentials, c as writeOAuthCredentials, d as refreshAnthropicToken, f as refreshOpenAICodexToken, i as isOAuthAccessToken, l as getOAuthApiKey, n as credentialsFromParams, o as registerCustomOAuthProvider, p as registerOAuthProvider, r as extractRuntimeCredentials, s as resolveOAuthApiKey, t as credentialsFilePath, u as getOAuthProvider } from "./oauth-EIBUuSDK.js";
|
|
27
28
|
import { arcee } from "./providers/arcee.js";
|
|
28
29
|
import { baseten } from "./providers/baseten.js";
|
|
29
30
|
import { cerebras } from "./providers/cerebras.js";
|
|
30
|
-
import { r as mistral } from "./providers-
|
|
31
|
+
import { r as mistral } from "./providers-CoK1rZ1p.js";
|
|
31
32
|
import { local } from "./providers/local.js";
|
|
32
33
|
import { openai } from "./providers/openai.js";
|
|
33
34
|
import { openrouter } from "./providers/openrouter.js";
|
|
34
35
|
import { xai } from "./providers/xai.js";
|
|
35
|
-
export { ANCHOR_PREVIEW_MAX_CHARS, AUTO_COMPACT_MIN_GROWTH_FRACTION, AgentAbortedError, AgentBudgetExceededError, AgentContextExceededError, AgentLengthResumeExhaustedError, AgentProviderError, AgentToolNotAllowedError, AgentToolPairingError, BASE_INSTRUCTIONS, BYTES_PER_TOKEN, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, CompactInvalidInputError, CompactPromptTooLongError, DEFAULT_MAX_VALUE_BYTES, EFFICIENCY_METRICS, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, EXTENSION_BUS_MAX_PAYLOAD_BYTES, EXTENSION_EDIT_METADATA_KEY, EvalMetricError, ExtensionInstallError, GEN_AI_ATTRIBUTES, IMPLICITLY_ALLOWED_SKILL_TOOLS, INTERRUPT_MESSAGE_FOR_TOOL_USE, McpOAuthProvider, NO_TOOLS_PREAMBLE, ORPHANED_TOOL_RESULT_MARKER, OUTPUT_RESERVE_TOKENS, OpenAICompatHttpError, OperationTimeoutError, PERSISTED_STUB_PREFIX, PERSISTENCE_PREVIEW_BYTES, PLUGIN_MANIFEST_FILE, PLUGIN_MCP_FILE, PLUGIN_SKILLS_DIR, SHELL_CASCADE_CANCEL_MESSAGE, SKILL_EDIT_METADATA_KEY, SUPPORTED_AGENT_PLUGINS_VERSIONS, SYNTHETIC_TOOL_RESULT_PLACEHOLDER, SYSTEM_PROMPT_BOUNDARY, SkillInstallError, TOOL_USE_CANCELLED_MESSAGE, TOOL_USE_INTERRUPTED_MARKER, TOOL_USE_SKIPPED_MESSAGE, TRAILER, ZIDANE_EXTENSION_SKILL_NAME, ZIDANE_SKILL_EDIT_SKILL_NAME, agentPluginsSchemaId, anchorPreviewFor, anthropic, appendDynamicSection, appendStaticSection, applyAnthropicCacheBreakpoints, applyCompactSummaryCutoff, arcee, artifactPath, autoDetectAndConvert, baseten, basic_default as basic, basicTools, buildCatalog, buildCompactPrompt, buildEvalRunSummary, buildExtensionPreset, buildExtensionRegistry, buildFromCompactPrompt, buildFullCompactPrompt, buildPersistedStub, buildPostCompactAttachments, buildRegisteredEvals, buildTailCompactPrompt, buildTrajectory, buildUpToCompactPrompt, buildZidaneExtensionSkill, buildZidaneSkillEditSkill, cerebras, clampExtensionConfigNumber, classifyOpenAICompatError, cleanupPersistedSession, clearRegisteredEvals, coerceExtensionConfigInput, collectNewlyStaleReadPaths, commandBlockToEvent, commandBlocksToContent, commandSteps, compactConversation, composeExtensionPreset, computeEvalTagScores, connectMcpServers, consoleSink, createAgent, createEvalAgent, createEvalRunReporter, createExtensionBus, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createFileMapStore, createInteractionTool, createLogger, createLoggingHooks, createMemoryMcpCredentialStore, createMemoryStore, createMetricsHooks, createModelSearchTool, createMutationValidationHooks, createPathAutocompleteProvider, createProcessContext, createRemoteStore, createReusableExecutionContext, createRingBufferSink, createRunSummaryCollector, createSandboxContext, createSession, createShellTool, createSkillActivationState, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolStateController, createTracingHooks, createWorkspaceSurface, credentialsFilePath, credentialsFromParams, defaultExtensionScanPaths, defaultPluginDataRoot, defaultRepeatGuardNormalize, defaultRepeatGuardTracked, defineEval, defineExtension, defineMetrics, definePreset, defineSkill, detectTurnInterruption, diffCacheDimensions, discoverAndBuildExtensionRegistry, discoverExtensions, discoverSkills, disposeExtensionRegistry, dropInvalidToolPairings, edit, editSessionMetadata, effectiveContextWindow, efficiencyMetricValues, emitEfficiencyMetrics, ensureEndsWithUserMessage, ensureToolResultPairing, errorMessage, estimateTokens, executeCommand, expandEnvPlaceholders, expandMcpConfigEnv, expandPluginVars, extensionDirForCwd, extensionScaffold, extractRuntimeCredentials, fanoutSink, fetchExtensionSource, fileContains, fileContentQuality, fileExists, fileExistsOneOf, filterExtensionRegistry, filterUnresolvedToolUses, finalizeEvalMetrics, flattenTurns, fnv1a32, formatEvalCaseSummary, formatEvalRunSummary, formatLogLine, formatModelLine, formatTokenUsage, formatTrajectoryLine, fromAnthropic, fromOpenAI, functionalityMetric, generateStructuredData, getModelCatalog, getOAuthApiKey, getOAuthProvider, getReadState, glob, grep, hasAuthorizationHeader, hasSystemPromptBoundary, hashContent, hashMessages, headlessEventToJsonl, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, inlineLoadedExtension, installAllowedToolsGate, installCacheBreakLogger, installExtensionFromSpec, installSkillFromSpec, interpolateShellCommands, isExtensionDefinition, isOAuthAccessToken, isSpawnTool, isStandardSchema, isSupportedAgentPluginsVersion, isToolAllowedByUnion, isToolStateOps, isValidExtensionConfigItem, isValidExtensionConfigValue, joinSystemPrompt, jsonSink, listExtensionCandidates, listSkillCandidates, llmJudge, loadAgentPlugin, loadSession, local, localReliabilityBehavior, loginMcpServer, mapOAIFinishReason, matchModelEntries, matchesAllowedTool, matchesContextExceeded, maybePersistToolResult, mergeContributions, migrateSessionArtifactDirs, mistral, multiEdit, normalizeMcpBlocks, normalizeMcpServers, normalizeMetric, normalizeProviders, normalizeShellCommand, openai, openaiCompat, openrouter, originPinnedFetch, parseAllowedToolPattern, parseCommandInvocation, parseExtensionInstallSource, parseExtensionScanPathEnv, parsePluginManifest, parseSchemaId, parseSkillFile, parseSkillInstallSpec, partitionExtensionCatalog, patchInlineGhost, readExtensionInstallProvenance, readOAuthCredentials, readSkillEditMarker, readSkillProvenance, readStateKey, reasoningWireAction, refreshAnthropicToken, refreshOpenAICodexToken, registerCustomOAuthProvider, registerEvalTests, registerExtensionHostModules, registerOAuthProvider, relativeArtifactPath, remintDuplicateToolCallIds, removeInstalledExtension, renderStaleReadNotice, renderSystemForWire, replaceDynamicSection, resolveCompletionSubmit, resolveDetachedTasksCapability, resolveExtensionConfig, resolveExtensionConfigValue, resolveExtensionDocsDir, resolveInlineSuggestion, resolveLegacyPersistDir, resolveLegacySessionDir, resolveMcpWarningsDir, resolveModelTargets, resolveOAuthApiKey, resolvePersistDir, resolveReadStateMap, resolveSchemaInput, resolveSessionDir, resolveSkills, resolveTasksDir, resolveTransportConfig, resultToString, runEvalCase, runHeadless, sanitizeExtensionConfigActionPatch, sanitizeHistoryForProvider, sanitizeToolSchema, sanitizeToolSpecs, scanExtensionDirectories, selectFilesFromReadState, selectFilesFromSession, selectRecentFiles, setModelCatalog, shouldAutoCompact, sliceForCompaction, snapshotCacheDimensions, splitSystemPrompt, stableStringify, stagedToolState, startOAuthCallback, statsByModel, statusCompleted, stripImagesFromTurns, stripShellInterpolations, summaryToTurn, toAnthropic, toOpenAI, toTypedError, toWireConfigSchema, toWireMessages, toolOutputBudgetByteLength, toolOutputByteLength, toolResultToText, transcriptToOpenAIMessages, truncateHeadForPtlRetry, updateInstalledExtension, utf8ByteLength, validatePluginManifest, validateResourcePath, validateResourcePathReal, validateSkillForWrite, validateSkillName, validateToolArgs, waitTask, withZidaneExtensionSkill, withZidaneSkillEditSkill, writeOAuthCredentials, writeSkillToDisk, writeSkillsToDisk, xai, zodToJsonSchema };
|
|
36
|
+
export { ANCHOR_PREVIEW_MAX_CHARS, ARTIFACTS_METADATA_KEY, ARTIFACTS_PER_SESSION_CAP, ARTIFACT_KINDS, AUTO_COMPACT_MIN_GROWTH_FRACTION, AgentAbortedError, AgentBudgetExceededError, AgentContextExceededError, AgentLengthResumeExhaustedError, AgentProviderError, AgentToolNotAllowedError, AgentToolPairingError, BASE_INSTRUCTIONS, BUILTIN_ARTIFACT_KINDS, BYTES_PER_TOKEN, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, CompactInvalidInputError, CompactPromptTooLongError, DEFAULT_MAX_VALUE_BYTES, EFFICIENCY_METRICS, EMPTY_EXTENSION_REGISTRY, ENTRY_CANDIDATES, EXTENSION_BUS_MAX_PAYLOAD_BYTES, EXTENSION_EDIT_METADATA_KEY, EvalMetricError, ExtensionInstallError, GEN_AI_ATTRIBUTES, IMPLICITLY_ALLOWED_SKILL_TOOLS, INTERRUPT_MESSAGE_FOR_TOOL_USE, McpOAuthProvider, NO_TOOLS_PREAMBLE, ORPHANED_TOOL_RESULT_MARKER, OUTPUT_RESERVE_TOKENS, OpenAICompatHttpError, OperationTimeoutError, PERSISTED_STUB_PREFIX, PERSISTENCE_PREVIEW_BYTES, PLUGIN_MANIFEST_FILE, PLUGIN_MCP_FILE, PLUGIN_SKILLS_DIR, SHELL_CASCADE_CANCEL_MESSAGE, SKILL_EDIT_METADATA_KEY, SUPPORTED_AGENT_PLUGINS_VERSIONS, SYNTHETIC_TOOL_RESULT_PLACEHOLDER, SYSTEM_PROMPT_BOUNDARY, SkillInstallError, TOOL_USE_CANCELLED_MESSAGE, TOOL_USE_INTERRUPTED_MARKER, TOOL_USE_SKIPPED_MESSAGE, TRAILER, ZIDANE_EXTENSION_SKILL_NAME, ZIDANE_SKILL_EDIT_SKILL_NAME, agentPluginsSchemaId, anchorPreviewFor, anthropic, appendDynamicSection, appendStaticSection, applyAnthropicCacheBreakpoints, applyCompactSummaryCutoff, arcee, artifactKindLabel, artifactPath, artifacts_default as artifactsPreset, autoDetectAndConvert, baseten, basic_default as basic, basicTools, buildCatalog, buildCompactPrompt, buildEvalRunSummary, buildExtensionPreset, buildExtensionRegistry, buildFromCompactPrompt, buildFullCompactPrompt, buildPersistedStub, buildPostCompactAttachments, buildRegisteredEvals, buildTailCompactPrompt, buildTrajectory, buildUpToCompactPrompt, buildZidaneExtensionSkill, buildZidaneSkillEditSkill, cerebras, clampExtensionConfigNumber, classifyOpenAICompatError, cleanupPersistedSession, clearRegisteredEvals, coerceExtensionConfigInput, collectNewlyStaleReadPaths, commandBlockToEvent, commandBlocksToContent, commandSteps, compactConversation, composeExtensionPreset, composePresets, computeEvalTagScores, connectMcpServers, consoleSink, createAgent, createArtifactDetectHook, createArtifactsSurface, createEvalAgent, createEvalRunReporter, createExtensionBus, createExtensionHostRuntimeBridge, createExtensionHud, createExtensionPromptBridge, createFileMapStore, createInteractionTool, createLogger, createLoggingHooks, createMemoryMcpCredentialStore, createMemoryStore, createMetricsHooks, createModelSearchTool, createMutationValidationHooks, createPathAutocompleteProvider, createProcessContext, createRemoteStore, createReusableExecutionContext, createRingBufferSink, createRunSummaryCollector, createSandboxContext, createSession, createShellTool, createSkillActivationState, createSkillsReadTool, createSkillsRunScriptTool, createSkillsUseTool, createSpawnTool, createToolStateController, createTracingHooks, createWorkspaceSurface, credentialsFilePath, credentialsFromParams, defaultExtensionScanPaths, defaultPluginDataRoot, defaultRepeatGuardNormalize, defaultRepeatGuardTracked, defineEval, defineExtension, defineMetrics, definePreset, defineSkill, detectTurnInterruption, diffCacheDimensions, discoverAndBuildExtensionRegistry, discoverExtensions, discoverSkills, disposeExtensionRegistry, dropInvalidToolPairings, edit, editSessionMetadata, effectiveContextWindow, efficiencyMetricValues, emitEfficiencyMetrics, ensureEndsWithUserMessage, ensureToolResultPairing, errorMessage, estimateTokens, executeCommand, expandEnvPlaceholders, expandMcpConfigEnv, expandPluginVars, extensionDirForCwd, extensionScaffold, extractRuntimeCredentials, fanoutSink, fetchExtensionSource, fileContains, fileContentQuality, fileExists, fileExistsOneOf, filterExtensionRegistry, filterUnresolvedToolUses, finalizeEvalMetrics, flattenTurns, fnv1a32, formatEvalCaseSummary, formatEvalRunSummary, formatLogLine, formatModelLine, formatTokenUsage, formatTrajectoryLine, fromAnthropic, fromOpenAI, functionalityMetric, generateStructuredData, getModelCatalog, getOAuthApiKey, getOAuthProvider, getReadState, glob, grep, hasAuthorizationHeader, hasSystemPromptBoundary, hashContent, hashMessages, headlessEventToJsonl, hydrateReadStateFromSession, hydrateReadStateFromSessionAsync, inlineLoadedExtension, installAllowedToolsGate, installCacheBreakLogger, installExtensionFromSpec, installSkillFromSpec, interpolateShellCommands, isExtensionDefinition, isOAuthAccessToken, isSpawnTool, isStandardSchema, isSupportedAgentPluginsVersion, isToolAllowedByUnion, isToolStateOps, isValidExtensionConfigItem, isValidExtensionConfigValue, joinSystemPrompt, jsonSink, listExtensionCandidates, listSkillCandidates, llmJudge, loadAgentPlugin, loadSession, local, localReliabilityBehavior, loginMcpServer, mapOAIFinishReason, matchModelEntries, matchesAllowedTool, matchesContextExceeded, maybePersistToolResult, mergeContributions, migrateSessionArtifactDirs, mistral, multiEdit, normalizeArtifactInput, normalizeMcpBlocks, normalizeMcpServers, normalizeMetric, normalizeProviders, normalizeShellCommand, openai, openaiCompat, openrouter, originPinnedFetch, parseAllowedToolPattern, parseCommandInvocation, parseExtensionInstallSource, parseExtensionScanPathEnv, parsePluginManifest, parseSchemaId, parseSkillFile, parseSkillInstallSpec, partitionExtensionCatalog, patchInlineGhost, readExtensionInstallProvenance, readOAuthCredentials, readSkillEditMarker, readSkillProvenance, readStateKey, reasoningWireAction, refreshAnthropicToken, refreshArtifact, refreshOpenAICodexToken, registerCustomOAuthProvider, registerEvalTests, registerExtensionHostModules, registerOAuthProvider, relativeArtifactPath, remintDuplicateToolCallIds, removeInstalledExtension, renderArtifactRow, renderStaleReadNotice, renderSystemForWire, replaceDynamicSection, resolveArtifactKind, resolveCompletionSubmit, resolveDetachedTasksCapability, resolveExtensionConfig, resolveExtensionConfigValue, resolveExtensionDocsDir, resolveInlineSuggestion, resolveLegacyPersistDir, resolveLegacySessionDir, resolveMcpWarningsDir, resolveModelTargets, resolveOAuthApiKey, resolvePersistDir, resolveReadStateMap, resolveSchemaInput, resolveSessionDir, resolveSkills, resolveTasksDir, resolveTransportConfig, resultToString, runEvalCase, runHeadless, sanitizeExtensionConfigActionPatch, sanitizeHistoryForProvider, sanitizeToolSchema, sanitizeToolSpecs, scanExtensionDirectories, selectFilesFromReadState, selectFilesFromSession, selectRecentFiles, setModelCatalog, shouldAutoCompact, sliceForCompaction, snapshotCacheDimensions, splitSystemPrompt, stableStringify, stagedToolState, startOAuthCallback, statsByModel, statusCompleted, stripImagesFromTurns, stripShellInterpolations, summaryToTurn, toAnthropic, toOpenAI, toTypedError, toWireConfigSchema, toWireMessages, toolOutputBudgetByteLength, toolOutputByteLength, toolResultToText, transcriptToOpenAIMessages, truncateHeadForPtlRetry, updateInstalledExtension, utf8ByteLength, validatePluginManifest, validateResourcePath, validateResourcePathReal, validateSkillForWrite, validateSkillName, validateToolArgs, waitTask, withZidaneExtensionSkill, withZidaneSkillEditSkill, writeOAuthCredentials, writeSkillToDisk, writeSkillsToDisk, xai, zodToJsonSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { R as findGitRoot } from "./skills-PJyiSRCp.js";
|
|
2
|
-
import { d as defaultSocketPath, o as connectOrSpawnDaemon } from "./server-
|
|
2
|
+
import { d as defaultSocketPath, o as connectOrSpawnDaemon } from "./server-DXM8ZbGi.js";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { createInterface } from "node:readline";
|
|
5
5
|
//#region src/ipc/attach.ts
|
|
@@ -328,4 +328,4 @@ function clipLines(text, max) {
|
|
|
328
328
|
//#endregion
|
|
329
329
|
export { runAttach as t };
|
|
330
330
|
|
|
331
|
-
//# sourceMappingURL=ipc-
|
|
331
|
+
//# sourceMappingURL=ipc-T_pPnHkp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ipc-BLLscoIl.js","names":[],"sources":["../src/ipc/attach.ts"],"sourcesContent":["/**\n * `zidane attach` — a thin terminal client over the daemon protocol.\n *\n * Deliberately minimal (readline, no TUI framework): it exists to prove and\n * exercise the multi-window contract — several attach clients plus the GUI\n * can watch the SAME session converge live, answer each other's approvals,\n * and steer the same run. The full OpenTUI front-end migrates onto\n * `connectIpcClient` separately.\n *\n * Everything here is presentation: all state lives in the daemon.\n */\nimport type { InteractionRequest, StreamEvent } from '../chat/index'\nimport type { AnswerValue } from '../chat/interactions'\nimport type { IpcClient } from './client'\nimport type { EnsureDaemonOptions } from './daemon/lifecycle'\nimport type { HostSignal, SessionRow, WireApprovalRequest } from './protocol'\nimport process from 'node:process'\nimport { createInterface } from 'node:readline'\nimport { findGitRoot } from '../chat/index'\nimport { connectOrSpawnDaemon } from './client'\nimport { defaultSocketPath } from './daemon/lifecycle'\n\nconst DIM = '\\u001B[2m'\nconst BOLD = '\\u001B[1m'\nconst CYAN = '\\u001B[36m'\nconst YELLOW = '\\u001B[33m'\nconst RED = '\\u001B[31m'\nconst RESET = '\\u001B[0m'\n\nexport interface AttachOptions {\n socketPath?: string\n /** Attach to this session id (prefix match against the list). */\n sessionId?: string\n /** Create a fresh session instead of picking. */\n createNew?: boolean\n cwd?: string\n appVersion?: string\n /** Spawn-on-demand command when no daemon is listening. */\n spawnCommand?: string[]\n /** Injectable streams for tests. */\n stdin?: NodeJS.ReadableStream\n stdout?: NodeJS.WritableStream\n}\n\ninterface PendingAsk {\n resolve: (line: string) => void\n}\n\nexport async function runAttach(options: AttachOptions = {}): Promise<void> {\n const out = options.stdout ?? process.stdout\n const write = (text: string): void => void out.write(text)\n const cwd = options.cwd ?? process.cwd()\n\n const ensureOptions: EnsureDaemonOptions = {\n socketPath: options.socketPath ?? defaultSocketPath(),\n ...(options.spawnCommand ? { spawnCommand: options.spawnCommand } : {}),\n }\n /*\n * Library-safe failure: `runAttach` is exported from `zidane/ipc`, so a\n * dropped daemon REJECTS (the CLI wrapper owns the exit code) instead\n * of killing an embedder's process from inside the library.\n */\n let failRun: ((error: Error) => void) | null = null\n\n // Drain-and-respawn on version mismatch — a stale daemon self-heals\n // instead of hard-failing the window.\n const client = await connectOrSpawnDaemon({\n ...ensureOptions,\n ...(options.appVersion ? { appVersion: options.appVersion } : {}),\n onClose: () => {\n write(`\\n${RED}daemon connection lost${RESET}\\n`)\n failRun?.(new Error('daemon connection lost'))\n },\n })\n\n write(`${DIM}connected to zidane daemon (pid ${client.hello.pid}, v${client.hello.appVersion})${RESET}\\n`)\n\n const rl = createInterface({\n input: (options.stdin ?? process.stdin) as NodeJS.ReadableStream,\n output: out as NodeJS.WritableStream,\n prompt: `${BOLD}> ${RESET}`,\n })\n\n /*\n * Line routing: normally a line is a prompt for the model, but while an\n * approval / interaction / picker question is pending, the next line\n * answers it instead. One slot suffices — questions are asked serially.\n * Registered BEFORE the session picker so `ask` works during picking.\n */\n let pendingAsk: PendingAsk | null = null\n let submitLine: ((line: string) => void) | null = null\n /** Prompt lines typed before the input loop is armed (mid-boot) queue up. */\n const earlyLines: string[] = []\n\n rl.on('line', (line) => {\n if (pendingAsk) {\n const slot = pendingAsk\n pendingAsk = null\n slot.resolve(line)\n return\n }\n if (submitLine)\n submitLine(line)\n else\n earlyLines.push(line)\n })\n\n const ask = (prompt: string): Promise<string> => {\n write(prompt)\n return new Promise<string>((resolve) => {\n pendingAsk = { resolve }\n })\n }\n\n /*\n * HITL prompts share the single `pendingAsk` slot, so approvals /\n * interactions MUST be asked one at a time — the startup rehydrate loops\n * and live signals can otherwise fire several handlers at once, each\n * overwriting the previous resolver and leaving those prompts hung\n * forever (unanswerable from this window). Chain every handler on the\n * previous one so they run strictly sequentially.\n */\n let hitlQueue: Promise<void> = Promise.resolve()\n\n /*\n * De-dup + resolution tracking for HITL prompts. A request can arrive\n * both via `*:listPending` backfill AND a live `*:request` signal, and\n * another window can answer it while it's still queued here. We track\n * every id we've queued (so we never prompt twice) and every id the host\n * reported resolved (so a queued-but-not-yet-prompted request is skipped\n * instead of blocking the queue on a no-op stdin answer).\n */\n const queuedHitlIds = new Set<string>()\n const resolvedHitlIds = new Set<string>()\n\n const enqueueHitl = (requestId: string, task: () => Promise<void>): void => {\n if (queuedHitlIds.has(requestId) || resolvedHitlIds.has(requestId))\n return\n queuedHitlIds.add(requestId)\n hitlQueue = hitlQueue.then(async () => {\n // Another window may have answered it while it waited in the queue.\n if (resolvedHitlIds.has(requestId))\n return\n await task()\n }, () => undefined)\n }\n\n const session = await pickSession(client, { ask, write, cwd, ...options })\n if (!session) {\n rl.close()\n client.close()\n return\n }\n\n write(`${BOLD}session${RESET} ${session.id} ${DIM}(${session.title})${RESET}\\n`)\n write(`${DIM}tools run in ${session.cwd} — /interrupt to stop a run, /exit to detach (run keeps going)${RESET}\\n\\n`)\n\n /*\n * Subscribe BEFORE replaying the transcript / snapshotting run state so\n * stream events emitted in that window aren't permanently lost from this\n * client's view. Signals that arrive during replay buffer here and drain\n * once the replay completes.\n */\n const bufferedSignals: HostSignal[] = []\n let signalSink: (signal: HostSignal) => void = s => bufferedSignals.push(s)\n const unsubscribe = client.onSignal(s => signalSink(s))\n\n await replayTranscript(client, session.id, write)\n\n let running = await client.request('chat.isRunning', { sessionId: session.id })\n if (running)\n write(`${DIM}a run is in flight — attaching to the live stream${RESET}\\n`)\n\n /* ----------------------------------------------------------------------\n * Signal rendering\n * -------------------------------------------------------------------- */\n\n let lastEventKind: StreamEvent['kind'] | null = null\n\n /**\n * The host broadcasts every window's user message as a `user-prompt`\n * event — render it so this window sees prompts posted elsewhere. Our\n * OWN just-sent messages are skipped once each (readline already echoed\n * them). A multiset (text → count) handles rapid identical sends and\n * never suppresses another window's matching message beyond our own\n * outstanding count.\n */\n const ownEchoes = new Map<string, number>()\n\n const renderEvent = (event: StreamEvent): void => {\n switch (event.kind) {\n case 'user-prompt': {\n const outstanding = ownEchoes.get(event.text) ?? 0\n if (outstanding > 0) {\n if (outstanding === 1)\n ownEchoes.delete(event.text)\n else\n ownEchoes.set(event.text, outstanding - 1)\n break\n }\n write(`\\n${BOLD}> ${event.text}${RESET}\\n`)\n break\n }\n case 'markdown':\n if (lastEventKind !== 'markdown' && lastEventKind !== null)\n write('\\n')\n write(event.text)\n break\n case 'thinking':\n // Streamed reasoning stays out of the transcript — show a pulse once.\n if (lastEventKind !== 'thinking')\n write(`${DIM}(thinking…)${RESET}\\n`)\n break\n case 'tool':\n write(`\\n${CYAN}▸ ${event.text}${RESET}\\n`)\n break\n case 'tool-result':\n write(`${DIM}${clipLines(event.text, 3)}${RESET}\\n`)\n break\n case 'task-notification':\n case 'info':\n write(`${DIM}${event.text}${RESET}\\n`)\n break\n case 'error':\n write(`${RED}${event.text}${RESET}\\n`)\n break\n default:\n break\n }\n lastEventKind = event.kind\n }\n\n const handleApproval = async (request: WireApprovalRequest): Promise<void> => {\n write(`\\n${YELLOW}approval needed${RESET} — ${BOLD}${request.tool}${RESET}\\n`)\n write(`${DIM}${clipLines(JSON.stringify(request.input, null, 2), 12)}${RESET}\\n`)\n const answer = await ask(`${YELLOW}[y]es once / [s]ession / [a]lways (safelist) / [n]o: ${RESET}`)\n const decision\n = answer.trim().toLowerCase() === 'y'\n ? 'accept-once'\n : answer.trim().toLowerCase() === 's'\n ? 'accept-session'\n : answer.trim().toLowerCase() === 'a'\n ? 'accept-safelist'\n : 'deny'\n await client.request('approvals.resolve', { requestId: request.id, decision })\n }\n\n const handleInteraction = async (request: InteractionRequest): Promise<void> => {\n if (request.kind === 'plan') {\n write(`\\n${YELLOW}plan:${RESET} ${BOLD}${request.payload.title}${RESET}\\n${request.payload.plan}\\n`)\n const answer = await ask(`${YELLOW}[a]pprove / [r]eject / re[v]ise (with comment): ${RESET}`)\n const c = answer.trim().toLowerCase()\n if (c === 'v') {\n const comment = await ask('comment: ')\n await client.request('interactions.respond', {\n requestId: request.id,\n response: { kind: 'plan', decision: 'revise', comment },\n })\n return\n }\n await client.request('interactions.respond', {\n requestId: request.id,\n response: { kind: 'plan', decision: c === 'a' ? 'approve' : 'reject' },\n })\n return\n }\n\n if (request.payload.intro)\n write(`\\n${request.payload.intro}\\n`)\n const answers: Record<string, AnswerValue> = {}\n for (const question of request.payload.questions) {\n if (question.type === 'confirm') {\n const answer = await ask(`${YELLOW}${question.prompt}${RESET} [y/n]: `)\n answers[question.id] = answer.trim().toLowerCase().startsWith('y')\n continue\n }\n if (question.type === 'select') {\n write(`${YELLOW}${question.prompt}${RESET}\\n`)\n question.choices.forEach((choice, i) => write(` ${i + 1}. ${choice.label}\\n`))\n const answer = await ask(question.multi ? 'pick (comma-separated numbers): ' : 'pick a number: ')\n const picks = answer\n .split(',')\n .map(part => question.choices[Number.parseInt(part.trim(), 10) - 1]?.id)\n .filter((id): id is string => typeof id === 'string')\n answers[question.id] = question.multi ? picks : (picks[0] ?? '')\n continue\n }\n answers[question.id] = await ask(`${YELLOW}${question.prompt}${RESET}: `)\n }\n await client.request('interactions.respond', {\n requestId: request.id,\n response: { kind: 'question', answers },\n })\n }\n\n const onSignal = (signal: HostSignal): void => {\n // Converge on resolution: mark the id answered so a queued-but-not-yet-\n // prompted request is skipped instead of blocking on stdin, and record\n // it so late backfill can't re-raise it.\n if (signal.kind === 'approval:resolved' || signal.kind === 'interaction:resolved') {\n resolvedHitlIds.add(signal.requestId)\n return\n }\n\n if (signal.kind === 'approval:request') {\n // Only surface approvals for the attached session — other windows'\n // sessions raise their own prompts in their own windows.\n if (signal.request.sessionId === session.id)\n enqueueHitl(signal.request.id, () => handleApproval(signal.request))\n return\n }\n\n if ('sessionId' in signal && signal.sessionId !== session.id)\n return\n\n switch (signal.kind) {\n case 'run:start':\n running = true\n lastEventKind = null\n break\n case 'run:end':\n running = false\n write(signal.ok ? '\\n' : `\\n${RED}run failed: ${signal.error ?? 'unknown error'}${RESET}\\n`)\n if (!pendingAsk)\n rl.prompt()\n break\n case 'event':\n renderEvent(signal.event)\n break\n case 'compacting:start':\n write(`${DIM}compacting…${RESET}\\n`)\n break\n case 'interaction:request':\n enqueueHitl(signal.request.id, () => handleInteraction(signal.request))\n break\n default:\n break\n }\n }\n\n // Surface HITL state left pending before this window attached. Done\n // BEFORE draining buffered signals so a live `*:request` that arrived\n // during backfill de-dups against the same id (via `queuedHitlIds`).\n for (const request of await client.request('approvals.listPending', {})) {\n if (request.sessionId === session.id)\n enqueueHitl(request.id, () => handleApproval(request))\n }\n for (const pending of await client.request('interactions.list', { sessionId: session.id })) {\n if (pending.live)\n enqueueHitl(pending.request.id, () => handleInteraction(pending.request))\n }\n\n // Drain signals buffered during replay/backfill, then hand live signals\n // straight to `onSignal`.\n signalSink = onSignal\n for (const buffered of bufferedSignals.splice(0))\n onSignal(buffered)\n\n /* ----------------------------------------------------------------------\n * Input loop\n * -------------------------------------------------------------------- */\n\n const detach = (): void => {\n unsubscribe()\n rl.close()\n client.close()\n write(`\\n${DIM}detached — the session keeps running in the daemon${RESET}\\n`)\n }\n\n rl.on('SIGINT', () => {\n if (running) {\n // Fire-and-forget: a dead daemon rejects the request, and an\n // uncaught rejection would crash the attach client.\n client.request('chat.interrupt', { sessionId: session.id }).catch(() => undefined)\n write(`\\n${DIM}interrupt sent${RESET}\\n`)\n return\n }\n detach()\n })\n\n await new Promise<void>((resolve, reject) => {\n failRun = (error) => {\n unsubscribe()\n rl.close()\n client.close()\n reject(error)\n }\n rl.on('close', () => resolve())\n\n const handleLine = (line: string): void => {\n const text = line.trim()\n if (text.length === 0) {\n rl.prompt()\n return\n }\n if (text === '/exit' || text === '/quit') {\n detach()\n resolve()\n return\n }\n if (text === '/interrupt') {\n client.request('chat.interrupt', { sessionId: session.id }).catch(() => undefined)\n return\n }\n\n ownEchoes.set(text, (ownEchoes.get(text) ?? 0) + 1)\n void client.request('chat.pushQueued', { sessionId: session.id, message: text }).then(({ delivered }) => {\n if (delivered === 'steer')\n write(`${DIM}(steered into the live run)${RESET}\\n`)\n }).catch((err) => {\n // Send failed: the host never broadcast the prompt, so release the\n // pending echo suppression to avoid eating a later identical one.\n const outstanding = ownEchoes.get(text) ?? 0\n if (outstanding <= 1)\n ownEchoes.delete(text)\n else\n ownEchoes.set(text, outstanding - 1)\n write(`${RED}${err instanceof Error ? err.message : String(err)}${RESET}\\n`)\n rl.prompt()\n })\n }\n\n submitLine = handleLine\n while (earlyLines.length > 0)\n handleLine(earlyLines.shift()!)\n\n if (!running)\n rl.prompt()\n })\n}\n\n/* --------------------------------------------------------------------------\n * Session picking\n * ------------------------------------------------------------------------ */\n\nasync function pickSession(\n client: IpcClient,\n ctx: {\n ask: (prompt: string) => Promise<string>\n write: (text: string) => void\n cwd: string\n sessionId?: string\n createNew?: boolean\n },\n): Promise<SessionRow | null> {\n const projectRoot = findGitRoot(ctx.cwd) ?? ctx.cwd\n\n if (ctx.createNew)\n return client.request('sessions.create', { cwd: ctx.cwd })\n\n const rows = await client.request('sessions.list', { projectRoot, archive: 'active' })\n\n if (ctx.sessionId) {\n const match = rows.find(r => r.id === ctx.sessionId || r.id.startsWith(ctx.sessionId!))\n if (match)\n return match\n // Not in this project — try the full list before giving up.\n const all = await client.request('sessions.list', {})\n const global = all.find(r => r.id === ctx.sessionId || r.id.startsWith(ctx.sessionId!))\n if (global)\n return global\n ctx.write(`${RED}no session matching \"${ctx.sessionId}\"${RESET}\\n`)\n return null\n }\n\n if (rows.length === 0)\n return client.request('sessions.create', { cwd: ctx.cwd })\n\n ctx.write(`${BOLD}sessions in ${projectRoot}:${RESET}\\n`)\n rows.slice(0, 15).forEach((row, i) => {\n const status = row.status === 'running' ? ` ${YELLOW}● running${RESET}` : ''\n ctx.write(` ${i + 1}. ${row.title} ${DIM}(${row.id.slice(0, 8)})${RESET}${status}\\n`)\n })\n\n const answer = await ctx.ask('pick a number, or [n]ew: ')\n if (answer.trim().toLowerCase() === 'n')\n return client.request('sessions.create', { cwd: ctx.cwd })\n\n const picked = rows[Number.parseInt(answer.trim(), 10) - 1]\n if (!picked) {\n ctx.write(`${RED}invalid pick${RESET}\\n`)\n return null\n }\n return picked\n}\n\n/* --------------------------------------------------------------------------\n * Transcript replay\n * ------------------------------------------------------------------------ */\n\nconst REPLAY_EVENT_CAP = 60\n\nasync function replayTranscript(\n client: IpcClient,\n sessionId: string,\n write: (text: string) => void,\n): Promise<void> {\n const events = await client.request('sessions.loadEvents', { sessionId })\n if (events.length === 0)\n return\n\n const tail = events.slice(-REPLAY_EVENT_CAP)\n if (events.length > tail.length)\n write(`${DIM}… ${events.length - tail.length} earlier events omitted${RESET}\\n`)\n\n for (const event of tail) {\n if (event.kind === 'user-prompt')\n write(`\\n${BOLD}> ${event.text}${RESET}\\n`)\n else if (event.kind === 'markdown')\n write(`${event.text}\\n`)\n else if (event.kind === 'tool')\n write(`${CYAN}▸ ${event.text}${RESET}\\n`)\n }\n write('\\n')\n}\n\nfunction clipLines(text: string, max: number): string {\n const lines = text.split('\\n')\n if (lines.length <= max)\n return text\n return `${lines.slice(0, max).join('\\n')}\\n${DIM}… ${lines.length - max} more lines${RESET}`\n}\n"],"mappings":";;;;;AAsBA,MAAM,MAAM;AACZ,MAAM,OAAO;AACb,MAAM,OAAO;AACb,MAAM,SAAS;AACf,MAAM,MAAM;AACZ,MAAM,QAAQ;AAqBd,eAAsB,UAAU,UAAyB,CAAC,GAAkB;CAC1E,MAAM,MAAM,QAAQ,UAAU,QAAQ;CACtC,MAAM,SAAS,SAAuB,KAAK,IAAI,MAAM,IAAI;CACzD,MAAM,MAAM,QAAQ,OAAO,QAAQ,IAAI;CAEvC,MAAM,gBAAqC;EACzC,YAAY,QAAQ,cAAc,kBAAkB;EACpD,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;CACvE;CAMA,IAAI,UAA2C;CAI/C,MAAM,SAAS,MAAM,qBAAqB;EACxC,GAAG;EACH,GAAI,QAAQ,aAAa,EAAE,YAAY,QAAQ,WAAW,IAAI,CAAC;EAC/D,eAAe;GACb,MAAM,KAAK,IAAI,wBAAwB,MAAM,GAAG;GAChD,0BAAU,IAAI,MAAM,wBAAwB,CAAC;EAC/C;CACF,CAAC;CAED,MAAM,GAAG,IAAI,kCAAkC,OAAO,MAAM,IAAI,KAAK,OAAO,MAAM,WAAW,GAAG,MAAM,GAAG;CAEzG,MAAM,KAAK,gBAAgB;EACzB,OAAQ,QAAQ,SAAS,QAAQ;EACjC,QAAQ;EACR,QAAQ,GAAG,KAAK,IAAI;CACtB,CAAC;CAQD,IAAI,aAAgC;CACpC,IAAI,aAA8C;;CAElD,MAAM,aAAuB,CAAC;CAE9B,GAAG,GAAG,SAAS,SAAS;EACtB,IAAI,YAAY;GACd,MAAM,OAAO;GACb,aAAa;GACb,K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C7B,IAAI,MAAM,UAAU,KAClB,OAAO;CACT,OAAO,GAAG,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,IAAI,IAAI,IAAI,MAAM,SAAS,IAAI,aAAa;AACvF"}
|
|
1
|
+
{"version":3,"file":"ipc-T_pPnHkp.js","names":[],"sources":["../src/ipc/attach.ts"],"sourcesContent":["/**\n * `zidane attach` — a thin terminal client over the daemon protocol.\n *\n * Deliberately minimal (readline, no TUI framework): it exists to prove and\n * exercise the multi-window contract — several attach clients plus the GUI\n * can watch the SAME session converge live, answer each other's approvals,\n * and steer the same run. The full OpenTUI front-end migrates onto\n * `connectIpcClient` separately.\n *\n * Everything here is presentation: all state lives in the daemon.\n */\nimport type { InteractionRequest, StreamEvent } from '../chat/index'\nimport type { AnswerValue } from '../chat/interactions'\nimport type { IpcClient } from './client'\nimport type { EnsureDaemonOptions } from './daemon/lifecycle'\nimport type { HostSignal, SessionRow, WireApprovalRequest } from './protocol'\nimport process from 'node:process'\nimport { createInterface } from 'node:readline'\nimport { findGitRoot } from '../chat/index'\nimport { connectOrSpawnDaemon } from './client'\nimport { defaultSocketPath } from './daemon/lifecycle'\n\nconst DIM = '\\u001B[2m'\nconst BOLD = '\\u001B[1m'\nconst CYAN = '\\u001B[36m'\nconst YELLOW = '\\u001B[33m'\nconst RED = '\\u001B[31m'\nconst RESET = '\\u001B[0m'\n\nexport interface AttachOptions {\n socketPath?: string\n /** Attach to this session id (prefix match against the list). */\n sessionId?: string\n /** Create a fresh session instead of picking. */\n createNew?: boolean\n cwd?: string\n appVersion?: string\n /** Spawn-on-demand command when no daemon is listening. */\n spawnCommand?: string[]\n /** Injectable streams for tests. */\n stdin?: NodeJS.ReadableStream\n stdout?: NodeJS.WritableStream\n}\n\ninterface PendingAsk {\n resolve: (line: string) => void\n}\n\nexport async function runAttach(options: AttachOptions = {}): Promise<void> {\n const out = options.stdout ?? process.stdout\n const write = (text: string): void => void out.write(text)\n const cwd = options.cwd ?? process.cwd()\n\n const ensureOptions: EnsureDaemonOptions = {\n socketPath: options.socketPath ?? defaultSocketPath(),\n ...(options.spawnCommand ? { spawnCommand: options.spawnCommand } : {}),\n }\n /*\n * Library-safe failure: `runAttach` is exported from `zidane/ipc`, so a\n * dropped daemon REJECTS (the CLI wrapper owns the exit code) instead\n * of killing an embedder's process from inside the library.\n */\n let failRun: ((error: Error) => void) | null = null\n\n // Drain-and-respawn on version mismatch — a stale daemon self-heals\n // instead of hard-failing the window.\n const client = await connectOrSpawnDaemon({\n ...ensureOptions,\n ...(options.appVersion ? { appVersion: options.appVersion } : {}),\n onClose: () => {\n write(`\\n${RED}daemon connection lost${RESET}\\n`)\n failRun?.(new Error('daemon connection lost'))\n },\n })\n\n write(`${DIM}connected to zidane daemon (pid ${client.hello.pid}, v${client.hello.appVersion})${RESET}\\n`)\n\n const rl = createInterface({\n input: (options.stdin ?? process.stdin) as NodeJS.ReadableStream,\n output: out as NodeJS.WritableStream,\n prompt: `${BOLD}> ${RESET}`,\n })\n\n /*\n * Line routing: normally a line is a prompt for the model, but while an\n * approval / interaction / picker question is pending, the next line\n * answers it instead. One slot suffices — questions are asked serially.\n * Registered BEFORE the session picker so `ask` works during picking.\n */\n let pendingAsk: PendingAsk | null = null\n let submitLine: ((line: string) => void) | null = null\n /** Prompt lines typed before the input loop is armed (mid-boot) queue up. */\n const earlyLines: string[] = []\n\n rl.on('line', (line) => {\n if (pendingAsk) {\n const slot = pendingAsk\n pendingAsk = null\n slot.resolve(line)\n return\n }\n if (submitLine)\n submitLine(line)\n else\n earlyLines.push(line)\n })\n\n const ask = (prompt: string): Promise<string> => {\n write(prompt)\n return new Promise<string>((resolve) => {\n pendingAsk = { resolve }\n })\n }\n\n /*\n * HITL prompts share the single `pendingAsk` slot, so approvals /\n * interactions MUST be asked one at a time — the startup rehydrate loops\n * and live signals can otherwise fire several handlers at once, each\n * overwriting the previous resolver and leaving those prompts hung\n * forever (unanswerable from this window). Chain every handler on the\n * previous one so they run strictly sequentially.\n */\n let hitlQueue: Promise<void> = Promise.resolve()\n\n /*\n * De-dup + resolution tracking for HITL prompts. A request can arrive\n * both via `*:listPending` backfill AND a live `*:request` signal, and\n * another window can answer it while it's still queued here. We track\n * every id we've queued (so we never prompt twice) and every id the host\n * reported resolved (so a queued-but-not-yet-prompted request is skipped\n * instead of blocking the queue on a no-op stdin answer).\n */\n const queuedHitlIds = new Set<string>()\n const resolvedHitlIds = new Set<string>()\n\n const enqueueHitl = (requestId: string, task: () => Promise<void>): void => {\n if (queuedHitlIds.has(requestId) || resolvedHitlIds.has(requestId))\n return\n queuedHitlIds.add(requestId)\n hitlQueue = hitlQueue.then(async () => {\n // Another window may have answered it while it waited in the queue.\n if (resolvedHitlIds.has(requestId))\n return\n await task()\n }, () => undefined)\n }\n\n const session = await pickSession(client, { ask, write, cwd, ...options })\n if (!session) {\n rl.close()\n client.close()\n return\n }\n\n write(`${BOLD}session${RESET} ${session.id} ${DIM}(${session.title})${RESET}\\n`)\n write(`${DIM}tools run in ${session.cwd} — /interrupt to stop a run, /exit to detach (run keeps going)${RESET}\\n\\n`)\n\n /*\n * Subscribe BEFORE replaying the transcript / snapshotting run state so\n * stream events emitted in that window aren't permanently lost from this\n * client's view. Signals that arrive during replay buffer here and drain\n * once the replay completes.\n */\n const bufferedSignals: HostSignal[] = []\n let signalSink: (signal: HostSignal) => void = s => bufferedSignals.push(s)\n const unsubscribe = client.onSignal(s => signalSink(s))\n\n await replayTranscript(client, session.id, write)\n\n let running = await client.request('chat.isRunning', { sessionId: session.id })\n if (running)\n write(`${DIM}a run is in flight — attaching to the live stream${RESET}\\n`)\n\n /* ----------------------------------------------------------------------\n * Signal rendering\n * -------------------------------------------------------------------- */\n\n let lastEventKind: StreamEvent['kind'] | null = null\n\n /**\n * The host broadcasts every window's user message as a `user-prompt`\n * event — render it so this window sees prompts posted elsewhere. Our\n * OWN just-sent messages are skipped once each (readline already echoed\n * them). A multiset (text → count) handles rapid identical sends and\n * never suppresses another window's matching message beyond our own\n * outstanding count.\n */\n const ownEchoes = new Map<string, number>()\n\n const renderEvent = (event: StreamEvent): void => {\n switch (event.kind) {\n case 'user-prompt': {\n const outstanding = ownEchoes.get(event.text) ?? 0\n if (outstanding > 0) {\n if (outstanding === 1)\n ownEchoes.delete(event.text)\n else\n ownEchoes.set(event.text, outstanding - 1)\n break\n }\n write(`\\n${BOLD}> ${event.text}${RESET}\\n`)\n break\n }\n case 'markdown':\n if (lastEventKind !== 'markdown' && lastEventKind !== null)\n write('\\n')\n write(event.text)\n break\n case 'thinking':\n // Streamed reasoning stays out of the transcript — show a pulse once.\n if (lastEventKind !== 'thinking')\n write(`${DIM}(thinking…)${RESET}\\n`)\n break\n case 'tool':\n write(`\\n${CYAN}▸ ${event.text}${RESET}\\n`)\n break\n case 'tool-result':\n write(`${DIM}${clipLines(event.text, 3)}${RESET}\\n`)\n break\n case 'task-notification':\n case 'info':\n write(`${DIM}${event.text}${RESET}\\n`)\n break\n case 'error':\n write(`${RED}${event.text}${RESET}\\n`)\n break\n default:\n break\n }\n lastEventKind = event.kind\n }\n\n const handleApproval = async (request: WireApprovalRequest): Promise<void> => {\n write(`\\n${YELLOW}approval needed${RESET} — ${BOLD}${request.tool}${RESET}\\n`)\n write(`${DIM}${clipLines(JSON.stringify(request.input, null, 2), 12)}${RESET}\\n`)\n const answer = await ask(`${YELLOW}[y]es once / [s]ession / [a]lways (safelist) / [n]o: ${RESET}`)\n const decision\n = answer.trim().toLowerCase() === 'y'\n ? 'accept-once'\n : answer.trim().toLowerCase() === 's'\n ? 'accept-session'\n : answer.trim().toLowerCase() === 'a'\n ? 'accept-safelist'\n : 'deny'\n await client.request('approvals.resolve', { requestId: request.id, decision })\n }\n\n const handleInteraction = async (request: InteractionRequest): Promise<void> => {\n if (request.kind === 'plan') {\n write(`\\n${YELLOW}plan:${RESET} ${BOLD}${request.payload.title}${RESET}\\n${request.payload.plan}\\n`)\n const answer = await ask(`${YELLOW}[a]pprove / [r]eject / re[v]ise (with comment): ${RESET}`)\n const c = answer.trim().toLowerCase()\n if (c === 'v') {\n const comment = await ask('comment: ')\n await client.request('interactions.respond', {\n requestId: request.id,\n response: { kind: 'plan', decision: 'revise', comment },\n })\n return\n }\n await client.request('interactions.respond', {\n requestId: request.id,\n response: { kind: 'plan', decision: c === 'a' ? 'approve' : 'reject' },\n })\n return\n }\n\n if (request.payload.intro)\n write(`\\n${request.payload.intro}\\n`)\n const answers: Record<string, AnswerValue> = {}\n for (const question of request.payload.questions) {\n if (question.type === 'confirm') {\n const answer = await ask(`${YELLOW}${question.prompt}${RESET} [y/n]: `)\n answers[question.id] = answer.trim().toLowerCase().startsWith('y')\n continue\n }\n if (question.type === 'select') {\n write(`${YELLOW}${question.prompt}${RESET}\\n`)\n question.choices.forEach((choice, i) => write(` ${i + 1}. ${choice.label}\\n`))\n const answer = await ask(question.multi ? 'pick (comma-separated numbers): ' : 'pick a number: ')\n const picks = answer\n .split(',')\n .map(part => question.choices[Number.parseInt(part.trim(), 10) - 1]?.id)\n .filter((id): id is string => typeof id === 'string')\n answers[question.id] = question.multi ? picks : (picks[0] ?? '')\n continue\n }\n answers[question.id] = await ask(`${YELLOW}${question.prompt}${RESET}: `)\n }\n await client.request('interactions.respond', {\n requestId: request.id,\n response: { kind: 'question', answers },\n })\n }\n\n const onSignal = (signal: HostSignal): void => {\n // Converge on resolution: mark the id answered so a queued-but-not-yet-\n // prompted request is skipped instead of blocking on stdin, and record\n // it so late backfill can't re-raise it.\n if (signal.kind === 'approval:resolved' || signal.kind === 'interaction:resolved') {\n resolvedHitlIds.add(signal.requestId)\n return\n }\n\n if (signal.kind === 'approval:request') {\n // Only surface approvals for the attached session — other windows'\n // sessions raise their own prompts in their own windows.\n if (signal.request.sessionId === session.id)\n enqueueHitl(signal.request.id, () => handleApproval(signal.request))\n return\n }\n\n if ('sessionId' in signal && signal.sessionId !== session.id)\n return\n\n switch (signal.kind) {\n case 'run:start':\n running = true\n lastEventKind = null\n break\n case 'run:end':\n running = false\n write(signal.ok ? '\\n' : `\\n${RED}run failed: ${signal.error ?? 'unknown error'}${RESET}\\n`)\n if (!pendingAsk)\n rl.prompt()\n break\n case 'event':\n renderEvent(signal.event)\n break\n case 'compacting:start':\n write(`${DIM}compacting…${RESET}\\n`)\n break\n case 'interaction:request':\n enqueueHitl(signal.request.id, () => handleInteraction(signal.request))\n break\n default:\n break\n }\n }\n\n // Surface HITL state left pending before this window attached. Done\n // BEFORE draining buffered signals so a live `*:request` that arrived\n // during backfill de-dups against the same id (via `queuedHitlIds`).\n for (const request of await client.request('approvals.listPending', {})) {\n if (request.sessionId === session.id)\n enqueueHitl(request.id, () => handleApproval(request))\n }\n for (const pending of await client.request('interactions.list', { sessionId: session.id })) {\n if (pending.live)\n enqueueHitl(pending.request.id, () => handleInteraction(pending.request))\n }\n\n // Drain signals buffered during replay/backfill, then hand live signals\n // straight to `onSignal`.\n signalSink = onSignal\n for (const buffered of bufferedSignals.splice(0))\n onSignal(buffered)\n\n /* ----------------------------------------------------------------------\n * Input loop\n * -------------------------------------------------------------------- */\n\n const detach = (): void => {\n unsubscribe()\n rl.close()\n client.close()\n write(`\\n${DIM}detached — the session keeps running in the daemon${RESET}\\n`)\n }\n\n rl.on('SIGINT', () => {\n if (running) {\n // Fire-and-forget: a dead daemon rejects the request, and an\n // uncaught rejection would crash the attach client.\n client.request('chat.interrupt', { sessionId: session.id }).catch(() => undefined)\n write(`\\n${DIM}interrupt sent${RESET}\\n`)\n return\n }\n detach()\n })\n\n await new Promise<void>((resolve, reject) => {\n failRun = (error) => {\n unsubscribe()\n rl.close()\n client.close()\n reject(error)\n }\n rl.on('close', () => resolve())\n\n const handleLine = (line: string): void => {\n const text = line.trim()\n if (text.length === 0) {\n rl.prompt()\n return\n }\n if (text === '/exit' || text === '/quit') {\n detach()\n resolve()\n return\n }\n if (text === '/interrupt') {\n client.request('chat.interrupt', { sessionId: session.id }).catch(() => undefined)\n return\n }\n\n ownEchoes.set(text, (ownEchoes.get(text) ?? 0) + 1)\n void client.request('chat.pushQueued', { sessionId: session.id, message: text }).then(({ delivered }) => {\n if (delivered === 'steer')\n write(`${DIM}(steered into the live run)${RESET}\\n`)\n }).catch((err) => {\n // Send failed: the host never broadcast the prompt, so release the\n // pending echo suppression to avoid eating a later identical one.\n const outstanding = ownEchoes.get(text) ?? 0\n if (outstanding <= 1)\n ownEchoes.delete(text)\n else\n ownEchoes.set(text, outstanding - 1)\n write(`${RED}${err instanceof Error ? err.message : String(err)}${RESET}\\n`)\n rl.prompt()\n })\n }\n\n submitLine = handleLine\n while (earlyLines.length > 0)\n handleLine(earlyLines.shift()!)\n\n if (!running)\n rl.prompt()\n })\n}\n\n/* --------------------------------------------------------------------------\n * Session picking\n * ------------------------------------------------------------------------ */\n\nasync function pickSession(\n client: IpcClient,\n ctx: {\n ask: (prompt: string) => Promise<string>\n write: (text: string) => void\n cwd: string\n sessionId?: string\n createNew?: boolean\n },\n): Promise<SessionRow | null> {\n const projectRoot = findGitRoot(ctx.cwd) ?? ctx.cwd\n\n if (ctx.createNew)\n return client.request('sessions.create', { cwd: ctx.cwd })\n\n const rows = await client.request('sessions.list', { projectRoot, archive: 'active' })\n\n if (ctx.sessionId) {\n const match = rows.find(r => r.id === ctx.sessionId || r.id.startsWith(ctx.sessionId!))\n if (match)\n return match\n // Not in this project — try the full list before giving up.\n const all = await client.request('sessions.list', {})\n const global = all.find(r => r.id === ctx.sessionId || r.id.startsWith(ctx.sessionId!))\n if (global)\n return global\n ctx.write(`${RED}no session matching \"${ctx.sessionId}\"${RESET}\\n`)\n return null\n }\n\n if (rows.length === 0)\n return client.request('sessions.create', { cwd: ctx.cwd })\n\n ctx.write(`${BOLD}sessions in ${projectRoot}:${RESET}\\n`)\n rows.slice(0, 15).forEach((row, i) => {\n const status = row.status === 'running' ? ` ${YELLOW}● running${RESET}` : ''\n ctx.write(` ${i + 1}. ${row.title} ${DIM}(${row.id.slice(0, 8)})${RESET}${status}\\n`)\n })\n\n const answer = await ctx.ask('pick a number, or [n]ew: ')\n if (answer.trim().toLowerCase() === 'n')\n return client.request('sessions.create', { cwd: ctx.cwd })\n\n const picked = rows[Number.parseInt(answer.trim(), 10) - 1]\n if (!picked) {\n ctx.write(`${RED}invalid pick${RESET}\\n`)\n return null\n }\n return picked\n}\n\n/* --------------------------------------------------------------------------\n * Transcript replay\n * ------------------------------------------------------------------------ */\n\nconst REPLAY_EVENT_CAP = 60\n\nasync function replayTranscript(\n client: IpcClient,\n sessionId: string,\n write: (text: string) => void,\n): Promise<void> {\n const events = await client.request('sessions.loadEvents', { sessionId })\n if (events.length === 0)\n return\n\n const tail = events.slice(-REPLAY_EVENT_CAP)\n if (events.length > tail.length)\n write(`${DIM}… ${events.length - tail.length} earlier events omitted${RESET}\\n`)\n\n for (const event of tail) {\n if (event.kind === 'user-prompt')\n write(`\\n${BOLD}> ${event.text}${RESET}\\n`)\n else if (event.kind === 'markdown')\n write(`${event.text}\\n`)\n else if (event.kind === 'tool')\n write(`${CYAN}▸ ${event.text}${RESET}\\n`)\n }\n write('\\n')\n}\n\nfunction clipLines(text: string, max: number): string {\n const lines = text.split('\\n')\n if (lines.length <= max)\n return text\n return `${lines.slice(0, max).join('\\n')}\\n${DIM}… ${lines.length - max} more lines${RESET}`\n}\n"],"mappings":";;;;;AAsBA,MAAM,MAAM;AACZ,MAAM,OAAO;AACb,MAAM,OAAO;AACb,MAAM,SAAS;AACf,MAAM,MAAM;AACZ,MAAM,QAAQ;AAqBd,eAAsB,UAAU,UAAyB,CAAC,GAAkB;CAC1E,MAAM,MAAM,QAAQ,UAAU,QAAQ;CACtC,MAAM,SAAS,SAAuB,KAAK,IAAI,MAAM,IAAI;CACzD,MAAM,MAAM,QAAQ,OAAO,QAAQ,IAAI;CAEvC,MAAM,gBAAqC;EACzC,YAAY,QAAQ,cAAc,kBAAkB;EACpD,GAAI,QAAQ,eAAe,EAAE,cAAc,QAAQ,aAAa,IAAI,CAAC;CACvE;CAMA,IAAI,UAA2C;CAI/C,MAAM,SAAS,M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MAAM,OAAO,QAAQ,uBAAuB,EAAE,UAAU,CAAC;CACxE,IAAI,OAAO,WAAW,GACpB;CAEF,MAAM,OAAO,OAAO,MAAM,GAAiB;CAC3C,IAAI,OAAO,SAAS,KAAK,QACvB,MAAM,GAAG,IAAI,IAAI,OAAO,SAAS,KAAK,OAAO,yBAAyB,MAAM,GAAG;CAEjF,KAAK,MAAM,SAAS,MAClB,IAAI,MAAM,SAAS,eACjB,MAAM,KAAK,KAAK,IAAI,MAAM,OAAO,MAAM,GAAG;MACvC,IAAI,MAAM,SAAS,YACtB,MAAM,GAAG,MAAM,KAAK,GAAG;MACpB,IAAI,MAAM,SAAS,QACtB,MAAM,GAAG,KAAK,IAAI,MAAM,OAAO,MAAM,GAAG;CAE5C,MAAM,IAAI;AACZ;AAEA,SAAS,UAAU,MAAc,KAAqB;CACpD,MAAM,QAAQ,KAAK,MAAM,IAAI;CAC7B,IAAI,MAAM,UAAU,KAClB,OAAO;CACT,OAAO,GAAG,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,IAAI,IAAI,IAAI,MAAM,SAAS,IAAI,aAAa;AACvF"}
|
package/dist/ipc.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { An as ChatHostEnvironment, Bn as QueuedItem, Cn as PendingAnnotation, Dn as ApprovalRequestInput, En as ApprovalHub, Fn as HostSettings, Gn as TodosSnapshot, Hn as SendOptions, In as HostSignal, Kn as WireApprovalRequest, Ln as PendingInteraction, Mn as ApprovalOriginator, Nn as CommandArgSuggestionSummary, On as createApprovalHub, Pn as CommandSummary, Rn as PromptAttachment, Sn as EditOutcomeLedger, Tn as runCompaction, Un as SerializedPreview, Vn as RunningWorkItem, Wn as SessionPresence, _n as CreateWorkerParams, bn as InteractionHub, dn as readFileSafe, fn as resolveCwdPath, gn as createChatHost, hn as ContextSegmentsReport, jn as PendingApprovalsStore, kn as createMemoryApprovalsStore, mn as ChatHost, pn as serializePreview, un as extractEditPayloadForGate, v as SystemMdFile, vn as WorkerRow, wn as CompactionEntry, xn as createInteractionHub, yn as WorkerSummary } from "./index-
|
|
3
|
-
import { O as ResolvedConfig } from "./transcript-anchors-
|
|
4
|
-
import { p as TodoItem } from "./turn-operations-
|
|
5
|
-
import { T as SessionHistoryMatch, V as ApprovalDecision, w as SearchTurnResult } from "./tool-formatters-
|
|
1
|
+
import { Df as InteractionResponse, Ga as ExtensionBus, Gg as SessionTurn, Hp as ContextBreakdown, Kd as ProviderKey, Ku as StreamEvent, Vv as SessionArtifact, Zg as ThinkingLevel, bg as JsonValue } from "./index-Dc_zYpEu.js";
|
|
2
|
+
import { An as ChatHostEnvironment, Bn as QueuedItem, Cn as PendingAnnotation, Dn as ApprovalRequestInput, En as ApprovalHub, Fn as HostSettings, Gn as TodosSnapshot, Hn as SendOptions, In as HostSignal, Kn as WireApprovalRequest, Ln as PendingInteraction, Mn as ApprovalOriginator, Nn as CommandArgSuggestionSummary, On as createApprovalHub, Pn as CommandSummary, Rn as PromptAttachment, Sn as EditOutcomeLedger, Tn as runCompaction, Un as SerializedPreview, Vn as RunningWorkItem, Wn as SessionPresence, _n as CreateWorkerParams, bn as InteractionHub, dn as readFileSafe, fn as resolveCwdPath, gn as createChatHost, hn as ContextSegmentsReport, jn as PendingApprovalsStore, kn as createMemoryApprovalsStore, mn as ChatHost, pn as serializePreview, un as extractEditPayloadForGate, v as SystemMdFile, vn as WorkerRow, wn as CompactionEntry, xn as createInteractionHub, yn as WorkerSummary } from "./index-Df2CH6bn.js";
|
|
3
|
+
import { O as ResolvedConfig } from "./transcript-anchors-CtnwuQJM.js";
|
|
4
|
+
import { p as TodoItem } from "./turn-operations-khAvr7KJ.js";
|
|
5
|
+
import { T as SessionHistoryMatch, V as ApprovalDecision, w as SearchTurnResult } from "./tool-formatters-BgdOYAy9.js";
|
|
6
6
|
|
|
7
7
|
//#region src/ipc/attach.d.ts
|
|
8
8
|
interface AttachOptions {
|
|
@@ -291,6 +291,53 @@ interface IpcMethods {
|
|
|
291
291
|
};
|
|
292
292
|
result: ContextBreakdown | null;
|
|
293
293
|
};
|
|
294
|
+
/**
|
|
295
|
+
* Artifacts one session recorded (PRs, branches, commits, files,
|
|
296
|
+
* extension kinds — see `session/artifacts.ts`), newest first. Empty on
|
|
297
|
+
* stores without artifact support. Additive; pre-artifact daemons
|
|
298
|
+
* reject the method and clients treat that as empty.
|
|
299
|
+
*/
|
|
300
|
+
'sessions.artifacts': {
|
|
301
|
+
params: {
|
|
302
|
+
sessionId: string;
|
|
303
|
+
kind?: string;
|
|
304
|
+
limit?: number;
|
|
305
|
+
};
|
|
306
|
+
result: SessionArtifact[];
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Artifacts across sessions, filtered by project root (`null` = untagged
|
|
310
|
+
* sessions, omitted = every project) and/or kind/uri (reverse lookup).
|
|
311
|
+
*/
|
|
312
|
+
'artifacts.list': {
|
|
313
|
+
params: {
|
|
314
|
+
projectRoot?: string | null;
|
|
315
|
+
kind?: string;
|
|
316
|
+
uri?: string;
|
|
317
|
+
since?: number;
|
|
318
|
+
limit?: number;
|
|
319
|
+
};
|
|
320
|
+
result: SessionArtifact[];
|
|
321
|
+
};
|
|
322
|
+
/** Remove one artifact. `false` when the store has no artifact support. Fans out `artifact:changed`. */
|
|
323
|
+
'artifacts.delete': {
|
|
324
|
+
params: {
|
|
325
|
+
sessionId: string;
|
|
326
|
+
artifactId: string;
|
|
327
|
+
};
|
|
328
|
+
result: boolean;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* Upsert an artifact — the lazy `resolve()` write-back (refreshed
|
|
332
|
+
* `label` / `meta`). Same merge semantics as `SessionStore.upsertArtifact`;
|
|
333
|
+
* `null` when the session is unknown or the store lacks support.
|
|
334
|
+
*/
|
|
335
|
+
'artifacts.upsert': {
|
|
336
|
+
params: {
|
|
337
|
+
artifact: SessionArtifact;
|
|
338
|
+
};
|
|
339
|
+
result: SessionArtifact | null;
|
|
340
|
+
};
|
|
294
341
|
/**
|
|
295
342
|
* Transcript search over ONE session, daemon-side. The daemon owns the
|
|
296
343
|
* authoritative turns (live wrapper when an agent is active — fresh
|
|
@@ -540,11 +587,12 @@ interface IpcMethods {
|
|
|
540
587
|
};
|
|
541
588
|
};
|
|
542
589
|
'queue.add': {
|
|
543
|
-
params: {
|
|
590
|
+
/** `asCommand`: see `SendOptions.asCommand` — the host refuses when it cannot resolve it. */params: {
|
|
544
591
|
sessionId: string;
|
|
545
592
|
text: string;
|
|
546
593
|
activatedSkills?: string[];
|
|
547
594
|
attachments?: PromptAttachment[];
|
|
595
|
+
asCommand?: string;
|
|
548
596
|
};
|
|
549
597
|
result: {
|
|
550
598
|
delivered: 'queued' | 'sent';
|
package/dist/ipc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ipc.d.ts","names":[],"sources":["../src/ipc/attach.ts","../src/ipc/daemon/lifecycle.ts","../src/ipc/protocol.ts","../src/ipc/client.ts","../src/ipc/daemon/environment.ts","../src/ipc/daemon/server.ts"],"mappings":";;;;;;;UA6BiB,aAAA;EACf,UAAA;;EAEA,SAAA;;EAEA,SAAA;EACA,GAAA;EACA,UAAA;EAP4B;EAS5B,YAAA;EAG8B;EAD9B,KAAA,GAAQ,MAAA,CAAO,cAAA;EACf,MAAA,GAAS,MAAA,CAAO,cAAc;AAAA;AAAA,iBAOV,SAAA,CAAU,OAAA,GAAS,aAAA,GAAqB,OAAO;;;;;;;;;;AAnBrE;;;;;;;cCEa,YAAA;;;;;;;;;iBAgEG,gBAAA,CAAiB,GAAA,GAAK,MAAA,CAAO,UAAwB;AAAA,iBAIrD,iBAAA;;;AApEhB;;;;AAsDI;AAUJ;;;;iBAoDgB,sBAAA;;;;AApDqD;iBAsErD,WAAA,CAAY,UAAA,UAAoB,SAAA,YAAmB,OAAO;AAAA,UAqCzD,mBAAA;EACf,UAAA;EAxG+B;AAAA;AAgDjC;;;EA8DE,YAAA;EA9DoC;EAgEpC,SAAA;AAAA;;;;;;iBAQoB,mBAAA,CAAoB,OAAA,GAAS,mBAAA,GAA2B,OAAO
|
|
1
|
+
{"version":3,"file":"ipc.d.ts","names":[],"sources":["../src/ipc/attach.ts","../src/ipc/daemon/lifecycle.ts","../src/ipc/protocol.ts","../src/ipc/client.ts","../src/ipc/daemon/environment.ts","../src/ipc/daemon/server.ts"],"mappings":";;;;;;;UA6BiB,aAAA;EACf,UAAA;;EAEA,SAAA;;EAEA,SAAA;EACA,GAAA;EACA,UAAA;EAP4B;EAS5B,YAAA;EAG8B;EAD9B,KAAA,GAAQ,MAAA,CAAO,cAAA;EACf,MAAA,GAAS,MAAA,CAAO,cAAc;AAAA;AAAA,iBAOV,SAAA,CAAU,OAAA,GAAS,aAAA,GAAqB,OAAO;;;;;;;;;;AAnBrE;;;;;;;cCEa,YAAA;;;;;;;;;iBAgEG,gBAAA,CAAiB,GAAA,GAAK,MAAA,CAAO,UAAwB;AAAA,iBAIrD,iBAAA;;;AApEhB;;;;AAsDI;AAUJ;;;;iBAoDgB,sBAAA;;;;AApDqD;iBAsErD,WAAA,CAAY,UAAA,UAAoB,SAAA,YAAmB,OAAO;AAAA,UAqCzD,mBAAA;EACf,UAAA;EAxG+B;AAAA;AAgDjC;;;EA8DE,YAAA;EA9DoC;EAgEpC,SAAA;AAAA;;;;;;iBAQoB,mBAAA,CAAoB,OAAA,GAAS,mBAAA,GAA2B,OAAO;;;;;;;AD3KhB;;;;ACjBrE;;;;AAsDI;AAUJ;;;;;;;;AAAqE;AAIrE;;;;AAAiC;AAgDjC;;;;AAAsC;AAkBtC;;cC3Da,oBAAA;;;;;;cAOA,YAAA;EAAA,SAGH,eAAA;EAAA,SAAA,aAAA;AAAA;;;;;;AD+FC;AAQX;;UCzFiB,UAAA;EDyFoE;ECvFnF,WAAA;IAAe,MAAA,EAAQ,IAAA,CAAK,WAAA;IAAsB,MAAA;MAAU,KAAA;IAAA;EAAA;EAC5D,gBAAA;IAAo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,4 @@
|
|
|
1
|
-
import { $t as runCompaction, Bt as readFileSafe, Ht as serializePreview, It as createChatHost, Qt as EditOutcomeLedger, Rt as createInteractionHub, Vt as resolveCwdPath, n as createMemoryApprovalsStore, t as createApprovalHub, zt as extractEditPayloadForGate } from "./approvals-
|
|
2
|
-
import { a as connectIpcClient, c as IpcErrorCode, d as defaultSocketPath, f as ensureDaemonRunning, i as IpcVersionMismatchError, l as IPC_BUILD_ID, m as selfDaemonSpawnCommand, n as createDaemonEnvironment, o as connectOrSpawnDaemon, p as probeSocket, r as createFileApprovalsStore, s as IPC_PROTOCOL_VERSION, t as startIpcDaemon, u as daemonSocketName } from "./server-
|
|
3
|
-
import { t as runAttach } from "./ipc-
|
|
1
|
+
import { $t as runCompaction, Bt as readFileSafe, Ht as serializePreview, It as createChatHost, Qt as EditOutcomeLedger, Rt as createInteractionHub, Vt as resolveCwdPath, n as createMemoryApprovalsStore, t as createApprovalHub, zt as extractEditPayloadForGate } from "./approvals-B9aIQJRQ.js";
|
|
2
|
+
import { a as connectIpcClient, c as IpcErrorCode, d as defaultSocketPath, f as ensureDaemonRunning, i as IpcVersionMismatchError, l as IPC_BUILD_ID, m as selfDaemonSpawnCommand, n as createDaemonEnvironment, o as connectOrSpawnDaemon, p as probeSocket, r as createFileApprovalsStore, s as IPC_PROTOCOL_VERSION, t as startIpcDaemon, u as daemonSocketName } from "./server-DXM8ZbGi.js";
|
|
3
|
+
import { t as runAttach } from "./ipc-T_pPnHkp.js";
|
|
4
4
|
export { EditOutcomeLedger, IPC_BUILD_ID, IPC_PROTOCOL_VERSION, IpcErrorCode, IpcVersionMismatchError, connectIpcClient, connectOrSpawnDaemon, createApprovalHub, createChatHost, createDaemonEnvironment, createFileApprovalsStore, createInteractionHub, createMemoryApprovalsStore, daemonSocketName, defaultSocketPath, ensureDaemonRunning, extractEditPayloadForGate, probeSocket, readFileSafe, resolveCwdPath, runAttach, runCompaction, selfDaemonSpawnCommand, serializePreview, startIpcDaemon };
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $v as nonOwningMcpView, Cg as McpToolSchema, Gv as McpConnection, Jv as connectMcpServers, Kv as McpExecutionBinding, Qv as expandMcpConfigEnv, Wv as ConnectMcpServersOptions, Xv as deriveMcpToolMeta, Yv as createStderrLineEmitter, Zv as expandEnvPlaceholders, ay as PinnedFetch, ey as normalizeMcpBlocks, iy as wrapDiscoveredMcpTools, ny as resolveTransportConfig, oy as isAllowedRemoteUrl, qv as attachStderrWarnPump, ry as resultToString, sy as originPinnedFetch, ty as normalizeMcpServers, xg as McpServerConfig } from "./index-Dc_zYpEu.js";
|
|
2
2
|
export { ConnectMcpServersOptions, McpConnection, McpExecutionBinding, type McpServerConfig, type McpToolSchema, type PinnedFetch, attachStderrWarnPump, connectMcpServers, createStderrLineEmitter, deriveMcpToolMeta, expandEnvPlaceholders, expandMcpConfigEnv, isAllowedRemoteUrl, nonOwningMcpView, normalizeMcpBlocks, normalizeMcpServers, originPinnedFetch, resolveTransportConfig, resultToString, wrapDiscoveredMcpTools };
|