zidane 7.1.4 → 7.1.7
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 +4 -0
- package/dist/{acp-DbYGzaVK.js → acp-BxRfclPQ.js} +3 -3
- package/dist/{acp-DbYGzaVK.js.map → acp-BxRfclPQ.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-BlGt76qk.js → agent-CJbmpTmA.js} +94 -106
- package/dist/agent-CJbmpTmA.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{anthropic-DPPs3wjJ.js → anthropic-BQdAnY-w.js} +2 -2
- package/dist/{anthropic-DPPs3wjJ.js.map → anthropic-BQdAnY-w.js.map} +1 -1
- package/dist/{approvals-CnFq-_Gu.js → approvals-DMxUgyVd.js} +162 -56
- package/dist/approvals-DMxUgyVd.js.map +1 -0
- package/dist/{auth-CNetxyJH.js → auth-DvMdkpGD.js} +4 -4
- package/dist/{auth-CNetxyJH.js.map → auth-DvMdkpGD.js.map} +1 -1
- package/dist/chat/pure.d.ts +4 -4
- package/dist/chat/pure.js +2 -2
- 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 +2 -1
- package/dist/daemon-cli.js.map +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +1 -1
- package/dist/{fetch-url-ma-5_p0p.js → fetch-url-DX75gpL0.js} +3 -2
- package/dist/fetch-url-DX75gpL0.js.map +1 -0
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{index-DtF2yPaI.d.ts → index-BMOl2Bog.d.ts} +20 -11
- package/dist/index-BMOl2Bog.d.ts.map +1 -0
- package/dist/{index-BIJKozYj.d.ts → index-DCYh6lOp.d.ts} +71 -5
- package/dist/index-DCYh6lOp.d.ts.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -5
- package/dist/{ipc-DZffY7UT.js → ipc-BZcE9wnT.js} +2 -2
- package/dist/{ipc-DZffY7UT.js.map → ipc-BZcE9wnT.js.map} +1 -1
- package/dist/ipc.d.ts +28 -6
- package/dist/ipc.d.ts.map +1 -1
- package/dist/ipc.js +4 -4
- package/dist/mcp.d.ts +1 -1
- package/dist/{oauth-B6F43fti.js → oauth-DxHO17JE.js} +10 -8
- package/dist/{oauth-B6F43fti.js.map → oauth-DxHO17JE.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 +1 -1
- package/dist/presets.js +1 -1
- package/dist/prompts-Pqc3JdW_.d.ts +116 -0
- package/dist/prompts-Pqc3JdW_.d.ts.map +1 -0
- 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 +1 -1
- package/dist/{providers-DP9kwXYo.js → providers-BVhnFyiY.js} +2 -2
- package/dist/{providers-DP9kwXYo.js.map → providers-BVhnFyiY.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/session/sqlite.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/{server-Cdrcncg-.js → shell-path-BBH8xrmU.js} +95 -9
- package/dist/shell-path-BBH8xrmU.js.map +1 -0
- package/dist/skills.d.ts +1 -1
- package/dist/{tool-formatters-Baj_BroN.d.ts → tool-formatters-BDm0tjgy.d.ts} +2 -2
- package/dist/{tool-formatters-Baj_BroN.d.ts.map → tool-formatters-BDm0tjgy.d.ts.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/fetch-url.d.ts.map +1 -1
- package/dist/tools/fetch-url.js +1 -1
- package/dist/tools/prompts.d.ts +2 -0
- package/dist/tools/prompts.js +164 -0
- package/dist/tools/prompts.js.map +1 -0
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/web-search.js +3 -3
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools.d.ts +3 -2
- package/dist/tools.js +3 -2
- package/dist/{transcript-anchors-DfnBVZX0.d.ts → transcript-anchors-DjcEsOYq.d.ts} +2 -2
- package/dist/{transcript-anchors-DfnBVZX0.d.ts.map → transcript-anchors-DjcEsOYq.d.ts.map} +1 -1
- package/dist/tui.d.ts +3 -3
- package/dist/tui.js +43 -25
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-BHeYIvSY.js → turn-operations-JynC5ODZ.js} +30 -2
- package/dist/{turn-operations-BHeYIvSY.js.map → turn-operations-JynC5ODZ.js.map} +1 -1
- package/dist/{turn-operations-Cl3RNQ2O.d.ts → turn-operations-Rqk3E0Ue.d.ts} +34 -4
- package/dist/{turn-operations-Cl3RNQ2O.d.ts.map → turn-operations-Rqk3E0Ue.d.ts.map} +1 -1
- package/dist/types.d.ts +3 -2
- package/docs/ARCHITECTURE.md +14 -2
- package/docs/SKILL.md +31 -1
- package/package.json +6 -1
- package/dist/agent-BlGt76qk.js.map +0 -1
- package/dist/approvals-CnFq-_Gu.js.map +0 -1
- package/dist/fetch-url-ma-5_p0p.js.map +0 -1
- package/dist/index-BIJKozYj.d.ts.map +0 -1
- package/dist/index-DtF2yPaI.d.ts.map +0 -1
- package/dist/server-Cdrcncg-.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C_ as TurnUsage, Gu as Owner, Uu as EditPayload, Vu as EditOutcome, Xu as StreamEvent,
|
|
2
|
-
import { V as ApprovalDecision } from "./tool-formatters-
|
|
1
|
+
import { C_ as TurnUsage, Gu as Owner, Q_ as SkillConfig, Uu as EditPayload, Vu as EditOutcome, Xu as StreamEvent, av as Session, bu as Command, du as CompletionProvider, fu as CompletionReference, m_ as ToolResultContent, om as CacheBreakInfo, t as Preset, t_ as SessionTurn } from "./index-DCYh6lOp.js";
|
|
2
|
+
import { V as ApprovalDecision } from "./tool-formatters-BDm0tjgy.js";
|
|
3
3
|
|
|
4
4
|
//#region src/chat/color-gradient.d.ts
|
|
5
5
|
/**
|
|
@@ -708,6 +708,20 @@ interface ProviderUsageSnapshot {
|
|
|
708
708
|
providerKey: string;
|
|
709
709
|
/** Display label for the provider. */
|
|
710
710
|
label: string;
|
|
711
|
+
/**
|
|
712
|
+
* Credentials-file key of the credential this snapshot was probed with. A
|
|
713
|
+
* provider holding several OAuth accounts yields one snapshot per account;
|
|
714
|
+
* this is what tells them apart (and the stable list key).
|
|
715
|
+
*/
|
|
716
|
+
credentialKey: string;
|
|
717
|
+
/**
|
|
718
|
+
* Account name for OAuth-backed snapshots (`Default`, `work`, …); `null` for
|
|
719
|
+
* API-key probes. Surfaces show it only when the provider has more than one
|
|
720
|
+
* snapshot, so a single-account provider stays as quiet as before.
|
|
721
|
+
*/
|
|
722
|
+
account: string | null;
|
|
723
|
+
/** True when this credential is the one requests use (the canonical slot). */
|
|
724
|
+
activeCredential: boolean;
|
|
711
725
|
status: ProviderUsageStatus;
|
|
712
726
|
/** Plan name when the provider reports one. */
|
|
713
727
|
plan: string | null;
|
|
@@ -716,6 +730,16 @@ interface ProviderUsageSnapshot {
|
|
|
716
730
|
fetchedAt: number;
|
|
717
731
|
error: string | null;
|
|
718
732
|
}
|
|
733
|
+
/**
|
|
734
|
+
* Whether a snapshot should show its account name: only when another snapshot
|
|
735
|
+
* in the same list belongs to the same provider. One account is the provider.
|
|
736
|
+
*/
|
|
737
|
+
declare function showsAccount(snapshot: ProviderUsageSnapshot, all: readonly ProviderUsageSnapshot[]): boolean;
|
|
738
|
+
/**
|
|
739
|
+
* The snapshot the footer indicator shows for a provider: the one probed with
|
|
740
|
+
* the credential requests use, else the first reported. `null` when none.
|
|
741
|
+
*/
|
|
742
|
+
declare function activeSnapshotFor(all: readonly ProviderUsageSnapshot[], providerKey: string): ProviderUsageSnapshot | null;
|
|
719
743
|
/**
|
|
720
744
|
* The window closest to its ceiling, which is the one that will bite first and
|
|
721
745
|
* the only one a single-line indicator has room for. `null` when the snapshot
|
|
@@ -742,6 +766,12 @@ declare function usageTone(usedPercent: number): UsageTone;
|
|
|
742
766
|
* wrong in.
|
|
743
767
|
*/
|
|
744
768
|
declare function resetLabel(resetsAt: number | null, now?: number): string | null;
|
|
769
|
+
/**
|
|
770
|
+
* `updated 12s ago` / `updated 3m ago` for the newest snapshot in a list, so a
|
|
771
|
+
* refresh that returns identical numbers is still visibly a refresh. `null`
|
|
772
|
+
* when the list is empty.
|
|
773
|
+
*/
|
|
774
|
+
declare function updatedLabel(snapshots: readonly ProviderUsageSnapshot[], now?: number): string | null;
|
|
745
775
|
/** Balances are dollars for OpenRouter and opaque units elsewhere. */
|
|
746
776
|
declare function formatCredits(value: number): string;
|
|
747
777
|
/** `20.00 / 25.00`, or just the remainder when no total is reported. */
|
|
@@ -1218,5 +1248,5 @@ declare function countNeighbors(turnIds: readonly string[], turnId: string): {
|
|
|
1218
1248
|
after: number;
|
|
1219
1249
|
} | null;
|
|
1220
1250
|
//#endregion
|
|
1221
|
-
export {
|
|
1222
|
-
//# sourceMappingURL=turn-operations-
|
|
1251
|
+
export { formatTaskSummary as $, chatReferenceTokensFromText as $t, finalizeStreamingMarkdown as A, buildEditOutcomesAnnotation as At, formatCredits as B, uniqueSkillNamesFromReferences as Bt, sanitizeTodoItems as C, extractEditPayload as Ct, MAX_TRANSCRIPT_EVENTS as D, summarizeEditPayload as Dt, useActiveTodos as E, splitLines as Et, ProviderUsageStatus as F, rewriteMultiEditHeader as Ft, updatedLabel as G, ListProjectFilesOptions as Gt, mostConstrainedWindow as H, createFilesCompletionProvider as Ht, ProviderUsageWindow as I, stripEditOutcomesAnnotation as It, compactPath as J, createCommandsCompletionProvider as Jt, usageTone as K, listProjectFiles as Kt, UsageTone as L, summarizeOutcomes as Lt, turnContextSize as M, mergeApprovalAndBodyOutcomes as Mt, ProviderUsageCredits as N, parseEditOutcomesFromResult as Nt, TRANSCRIPT_TRIM_TO_EVENTS as O, tokenize as Ot, ProviderUsageSnapshot as P, resolveApprovalForPayload as Pt, formatTaskStatus as Q, ChatReferenceScope as Qt, activeSnapshotFor as R, SKILLS_TRIGGER as Rt, pruneTodosByRun as S, computeLineDiff as St, setTodosForRun as T, previewEditPayload as Tt, resetLabel as U, uniqueFilesFromReferences as Ut, formatUsagePercent as V, FILES_TRIGGER as Vt, showsAccount as W, FileEntry as Wt, fmtTokens as X, ChatReferenceData as Xt, fmtCost as Y, CHATS_TRIGGER as Yt, formatDuration as Z, ChatReferenceEntry as Zt, createTodoTools as _, PreviewResult as _t, ActiveTodosState as a, cacheBreakNoticeText as at, isTodoTool as b, buildUnifiedDiff as bt, TODOREAD_TOOL as c, retryLabel as ct, TODO_STATUS_GLYPHS as d, DiffOp as dt, createChatsCompletionProvider as en, previewLine as et, TODO_WRITE_COUNTS_METADATA_KEY as f, EditHunkSummary as ft, TodosBag as g, InlineSegment as gt, TodoTally as h, InlineDiff as ht, turnAsText as i, cacheBreakChip as it, finalizeStreamingMarkdownForOwner as j, maskToOutcomeKinds as jt, capTranscriptEvents as k, ResolvedApproval as kt, TODOS_METADATA_KEY as l, streamingLabel as lt, TodoStatus as m, HunkResolution as mt, deleteTurnSafely as n, blendHsl as nn, CacheChipContent as nt, CreateTodoToolsOptions as o, compactingLabel as ot, TodoItem as p, EditSummary as pt, ageString as q, COMMANDS_TRIGGER as qt, truncateTurnsAt as r, buildLinearRamp as rn, CacheChipTone as rt, DEFAULT_MAX_TODO_ITEMS as s, liveSessionCost as st, countNeighbors as t, uniqueChatIdsFromReferences as tn, shortId as tt, TODOWRITE_TOOL as u, DiffLine as ut, getArchivedTodosForRun as v, applyEditPayload as vt, selectActiveTodos as w, filetypeFromPath as wt, pickActiveRunId as x, computeInlineDiff as xt, getTodosForRun as y, buildContextualDiff as yt, formatBalance as z, createSkillsCompletionProvider as zt };
|
|
1252
|
+
//# sourceMappingURL=turn-operations-Rqk3E0Ue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-operations-
|
|
1
|
+
{"version":3,"file":"turn-operations-Rqk3E0Ue.d.ts","names":[],"sources":["../src/chat/color-gradient.ts","../src/chat/completion-chats.ts","../src/chat/completion-commands.ts","../src/chat/files-discovery.ts","../src/chat/completion-files.ts","../src/chat/completion-skills.ts","../src/chat/edit-approval.ts","../src/tools/edit-utils.ts","../src/chat/edit-diff.ts","../src/chat/footer-chips.ts","../src/chat/format.ts","../src/chat/provider-usage-format.ts","../src/chat/streaming-pure.ts","../src/chat/todos.ts","../src/chat/turn-operations.ts"],"mappings":";;;;;;;;iBAmFgB,QAAA,CAAS,IAAA,UAAc,EAAA,UAAY,CAAA;;;;;;iBAuBnC,eAAA,CAAgB,IAAA,UAAc,EAAA,UAAY,CAAA;;;cCxF7C,aAAA;AAAA,KAKD,kBAAA;AAAA,UAEK,kBAAA;EACf,EAAA;EACA,KAAA;EACA,SAAA;EACA,gBAAA;EACA,QAAA;EACA,WAAA;EACA,SAAA;ED0EwD;ECxExD,aAAA;AAAA;AAAA,UAGe,iBAAA;EACf,KAAA,EAAO,kBAAkB;EACzB,KAAA;AAAA;AAAA,iBAqIc,6BAAA,CAA8B,IAAA;EAC5C,UAAA,iBAA2B,kBAAA;EAC3B,mBAAA,kBAAqC,kBAAA;EACrC,QAAA,SAAiB,kBAAA;EACjB,aAAA,SAAsB,OAAA,UAAiB,kB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BKuuBgB,iBAAA,CAAkB,OAAA,EAAS,OAAA,sBAA6B,gBAAgB;ALvsBxF;;;;;;;;AAAuE;AA+GvE;;;;;;;AA/GA,iBK+wBgB,cAAA,CAAe,OAAA,EAAS,OAAA,sBAA6B,gBAAgB;;;;;;;;;;AbjrClB;;;;ACxFnE;;;;AAA0B;AAK1B;iBaUgB,eAAA,CAAgB,KAAA,WAAgB,WAAA,IAAe,MAAA,WAAiB,WAAW;;;AbV7D;AAE9B;;;;;;;;;;;;;AASe;iBawBC,gBAAA,CAAiB,KAAA,WAAgB,WAAA,IAAe,MAAA,WAAiB,WAAW;;;;;;;;AbnBrF;iBa2ES,UAAA,CAAW,IAAiB,EAAX,WAAW;;;;;;iBA+B5B,cAAA,CACd,OAAA,qBACA,MAAA;EACG,MAAA;EAAgB,KAAA;AAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $g as SessionHookContext, A_ as ToolDescriptionTarget, Ah as AnthropicParams, Bg as PromptDocumentPart, Br as InteractionToolOptions, C as SuccessfulMutationOutcome, C_ as TurnUsage, Cm as StreamOptions, D_ as ToolContext, Dm as ToolSpec, E_ as toolResultToText, Eg as DEFAULT_AGENT_CLOCK, Em as ToolResult, F_ as ReadStateMap, G_ as ToolStateOp, Gg as RepeatGuardConfig, Hg as PromptPart, Ig as OAuthRefreshHookContext, Jg as ResolveContentRefBlock, Ji as AgentHookMap, K_ as ToolStateStore, Kg as RepeatGuardToolMatcher, Lg as ProgressNudgeKind, M_ as ToolMap, Mg as McpToolHookContext, O_ as ToolDef, Om as TurnResult, P_ as ReadStateEntry, Q_ as SkillConfig, Qg as SessionEndStatus, Rg as ProgressNudgeMessage, S as MutationValidationResult, S_ as TurnFinishReason, Sm as StreamCallbacks, T_ as toolOutputByteLength, Tm as ToolCall, U_ as StagedToolState, Ug as PromptTextPart, Vg as PromptImagePart, W_ as ToolStateController, Wg as PromptVideoPart, Xg as RunHookMap, Xi as AgentOptions, Yg as RetryConfig, Yi as AgentHooks, Zg as SessionContentBlock, Zi as AgentToolState, _ as statsByModel, __ as ToolResultImageContent, _g as AgentStats, a_ as StreamHookContext, av as Session, b as MutationValidationHooksOptions, b_ as ToolResultTextContent, bm as ProviderCapabilities, cv as SessionRun, d_ as ToolHookContext, e_ as SessionMessage, ev as SkillResource, f_ as ToolOutcome, g_ as ToolResultDocumentRefContent, gc as SpawnToolState, gg as AgentRunOptions, h as flattenTurns, h_ as ToolResultDocumentContent, hc as SpawnToolOptions, hg as AgentClock, j_ as ToolDescriptions, jg as McpServerConfig, k_ as ToolDescriptionOverride, l_ as ThinkingLevel, lh as OpenAIParams, lv as SessionStore, m_ as ToolResultContent, mg as AgentBehavior, n_ as SpawnHookContext, nv as SkillsConfig, ov as SessionData, p as ModelUsage, p_ as ToolResultAudioContent, q_ as ToolStateView, qg as ResolveContentRef, qi as Agent, rv as CreateSessionOptions, t as Preset, t_ as SessionTurn, uc as ChildAgent, uy as McpConnection, v as MutationValidationBatch, v_ as ToolResultImageRefContent, vr as ValidationResult, w_ as toolOutputBudgetByteLength, x as MutationValidationMutation, x_ as ToolResultVideoContent, xg as ChildRunStats, xh as CerebrasParams, y as MutationValidationFailure, y_ as ToolResultMetadata, ym as Provider, yv as RemoteStoreOptions, zg as PromptAudioPart, zm as OpenRouterParams } from "./index-DCYh6lOp.js";
|
|
2
2
|
import { d as ClassifiedErrorKind, i as AgentContextExceededError, l as CONTEXT_EXCEEDED_MESSAGE_PATTERNS, n as AgentAbortedError, o as AgentProviderError, p as matchesContextExceeded, r as AgentBudgetExceededError, s as AgentToolNotAllowedError, u as ClassifiedError } from "./timeout-DEaqslLO.js";
|
|
3
3
|
import { C as TaskHandle, S as TaskExitInfo, c as ContextCapabilities, d as ContextType, f as DetachedTasksCapability, h as ExecutionHandle, l as ContextHardening, m as ExecutionContext, p as ExecResult, s as BackgroundTaskStatus, w as TaskStallInfo, x as TaskEntry, y as SpawnConfig } from "./isolation-Kfoof0MM.js";
|
|
4
4
|
import { t as SandboxProvider } from "./sandbox-BH0WQkXn.js";
|
|
5
|
-
|
|
5
|
+
import { t as ToolPrompts } from "./prompts-Pqc3JdW_.js";
|
|
6
|
+
export { type Agent, AgentAbortedError, type AgentBehavior, AgentBudgetExceededError, type AgentClock, AgentContextExceededError, type AgentHookMap, type AgentHooks, type AgentOptions, AgentProviderError, type AgentRunOptions, type AgentStats, AgentToolNotAllowedError, type AgentToolState, type AnthropicParams, type BackgroundTaskStatus, CONTEXT_EXCEEDED_MESSAGE_PATTERNS, type CerebrasParams, type ChildAgent, type ChildRunStats, type ClassifiedError, type ClassifiedErrorKind, type ContextCapabilities, type ContextHardening, type ContextType, type CreateSessionOptions, DEFAULT_AGENT_CLOCK, type DetachedTasksCapability, type ExecResult, type ExecutionContext, type ExecutionHandle, type InteractionToolOptions, type McpConnection, type McpServerConfig, type McpToolHookContext, type ModelUsage, type MutationValidationBatch, type MutationValidationFailure, type MutationValidationHooksOptions, type MutationValidationMutation, type MutationValidationResult, type OAuthRefreshHookContext, type OpenAIParams, type OpenRouterParams, type Preset, type ProgressNudgeKind, type ProgressNudgeMessage, type PromptAudioPart, type PromptDocumentPart, type PromptImagePart, type PromptPart, type PromptTextPart, type PromptVideoPart, type Provider, type ProviderCapabilities, type ReadStateEntry, type ReadStateMap, type RemoteStoreOptions, type RepeatGuardConfig, type RepeatGuardToolMatcher, type ResolveContentRef, type ResolveContentRefBlock, type RetryConfig, type RunHookMap, type SandboxProvider, type Session, type SessionContentBlock, type SessionData, type SessionEndStatus, type SessionHookContext, type SessionMessage, type SessionRun, type SessionStore, type SessionTurn, type SkillConfig, type SkillResource, type SkillsConfig, type SpawnConfig, type SpawnHookContext, type SpawnToolOptions, type SpawnToolState, type StagedToolState, type StreamCallbacks, type StreamHookContext, type StreamOptions, type SuccessfulMutationOutcome, type TaskEntry, type TaskExitInfo, type TaskHandle, type TaskStallInfo, type ThinkingLevel, type ToolCall, type ToolContext, type ToolDef, type ToolDescriptionOverride, type ToolDescriptionTarget, type ToolDescriptions, type ToolHookContext, type ToolMap, type ToolOutcome, type ToolPrompts, 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 TurnFinishReason, type TurnResult, type TurnUsage, type ValidationResult, flattenTurns, matchesContextExceeded, statsByModel, toolOutputBudgetByteLength, toolOutputByteLength, toolResultToText };
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -376,6 +376,18 @@ ToolHookContext.name = canonical, .displayName = wire
|
|
|
376
376
|
|
|
377
377
|
`session.turns` can't desync on alias-map changes; hooks match on canonical names; UI adapters read `displayName` for labels.
|
|
378
378
|
|
|
379
|
+
## Tool description overrides
|
|
380
|
+
|
|
381
|
+
`AgentOptions.toolDescriptions` (canonical-keyed `string | (current, target) => string`) is applied by `applyToolDescriptionOverrides` in `src/agent.ts` at exactly three points, always last in its pipeline:
|
|
382
|
+
|
|
383
|
+
1. Tail of `buildRunToolRegistry` — after extension catalog transforms and the per-run built-in `shell` rewrite, before disclosure partitioning (so the lazy catalog and `tool_search` results pick up the new text).
|
|
384
|
+
2. `buildRunDisclosureState` — on the framework-injected `tool_search` / `call_tool` only (the base registry is already done; re-running a function override there would double-apply).
|
|
385
|
+
3. The pre-run assembly behind `getContextBreakdown()` so token estimates match the real wire.
|
|
386
|
+
|
|
387
|
+
Matched `ToolDef`s are shallow-copied with a rewritten `spec.description`; the host's objects (and the `builtinShell` identity the shell rewrite depends on) are never mutated. It is a description-only knob by design — structural changes belong to `registerToolCatalogTransform`.
|
|
388
|
+
|
|
389
|
+
The default prose lives in one place, `src/tools/prompts.ts` (`toolPrompts`, published as `zidane/tools/prompts`): every native tool file imports its `spec.description` from there — plain strings for static tools, named fragments for the per-run-assembled ones (`shell`, `spawn`, `tool_search`, `call_tool`, `web_search`). `test/tool-prompts.test.ts` pins each tool to its entry so the exported text and the wire bytes cannot drift.
|
|
390
|
+
|
|
379
391
|
## Skills activation lifecycle
|
|
380
392
|
|
|
381
393
|
Zidane implements the [Agent Skills spec](https://agentskills.io/specification) via dedicated-tool activation. Three tools auto-inject when the catalog is non-empty: `skills_use` / `skills_read` / `skills_run_script`.
|
|
@@ -645,7 +657,7 @@ A `Preset` is `Omit<Partial<AgentOptions>, 'provider' | 'execution' | 'session'
|
|
|
645
657
|
createAgent({ ...basic, provider })
|
|
646
658
|
```
|
|
647
659
|
|
|
648
|
-
Excluded fields are ambient/per-invocation runtime wiring. Everything else — `name`, `system`, `tools`, `toolAliases`, `behavior`, `mcpServers`, `skills`, `eager`, **`hooks`** — is preset-shareable.
|
|
660
|
+
Excluded fields are ambient/per-invocation runtime wiring. Everything else — `name`, `system`, `tools`, `toolAliases`, `toolDescriptions`, `behavior`, `mcpServers`, `skills`, `eager`, **`hooks`** — is preset-shareable.
|
|
649
661
|
|
|
650
662
|
`AgentOptions.hooks` registers for the agent's lifetime (same effect as `agent.hooks.hook(event, fn)` right after `createAgent`); unknown event names throw at construction. `AgentRunOptions.hooks` is the per-run, auto-detaching equivalent.
|
|
651
663
|
|
|
@@ -658,7 +670,7 @@ createAgent({ ...composePresets(basic, telemetry, mine), provider })
|
|
|
658
670
|
| Field | Rule |
|
|
659
671
|
|---|---|
|
|
660
672
|
| `name`, `system`, `eager`, `skills` | Last-defined wins. |
|
|
661
|
-
| `tools`, `toolAliases`, `behavior` | Shallow-merge (later keys override per field). |
|
|
673
|
+
| `tools`, `toolAliases`, `toolDescriptions`, `behavior` | Shallow-merge (later keys override per field). |
|
|
662
674
|
| `mcpServers` | Concat, last-wins on `name` collision. |
|
|
663
675
|
| `hooks` | Per-event concat — every handler fires, in preset order. |
|
|
664
676
|
|
package/docs/SKILL.md
CHANGED
|
@@ -257,6 +257,36 @@ Presets are plain `Partial<AgentOptions>` — inline literals work too, no `defi
|
|
|
257
257
|
|
|
258
258
|
`toolAliases` maps canonical → wire names, LLM-boundary-only: the alias is what the provider/model/`displayName` see; the **canonical** name lives in `session.turns`, `ToolHookContext.name`, and dispatch lookup, so alias changes never desync persisted history. The factory rejects collisions (two canonicals → same alias). Alias only when semantically equivalent (`shell → Bash` is safe; `list_files → Glob` is not — add a real implementation like the built-in `glob` instead). Full rewrite flow: `docs/ARCHITECTURE.md` § Tool Aliasing.
|
|
259
259
|
|
|
260
|
+
### Tool descriptions
|
|
261
|
+
|
|
262
|
+
`toolDescriptions` overrides the LLM-facing description of any tool — native, host-provided, or MCP-discovered — keyed by **canonical** name (same keys as `toolAliases`: `shell`, `mcp_<server>_<tool>`). A string replaces; a function receives the current text and returns the new one:
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
createAgent({
|
|
266
|
+
...basic,
|
|
267
|
+
provider,
|
|
268
|
+
toolDescriptions: {
|
|
269
|
+
shell: cur => `${cur}\nNever invoke sudo.`, // amend — keeps the framework's per-run shell text
|
|
270
|
+
read_file: 'Read a file. Always prefer this over shell cat.',
|
|
271
|
+
mcp_github_create_pull_request: 'Open a PR. Always target `develop`.',
|
|
272
|
+
},
|
|
273
|
+
})
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Applied once per run, **after** every built-in rewrite (e.g. `shell`'s background gate and "prefer the dedicated tool" block), so the function form sees exactly what the model would otherwise receive. Reaches every surface that reads `spec.description`: the wire tool list, the lazy `<searchable_tools>` catalog, `tool_search` results (and the injected `tool_search` / `call_tool` themselves), and `getContextBreakdown()`. Unknown keys are ignored (an MCP server may be offline). Presets shallow-merge it (later wins per key); spawned subagents inherit it via `ToolContext.toolDescriptions`. For structural changes (hide, rename, reshape schemas) use an extension's `registerToolCatalogTransform` instead.
|
|
277
|
+
|
|
278
|
+
The defaults are importable as data from `zidane/tools/prompts` (zero runtime deps — safe in a config file) or as `toolPrompts` from `zidane` / `zidane/tools`. Static tools are strings; tools assembled per run (`shell`, `spawn`, `tool_search`, `call_tool`, `web_search`) expose the exact fragments the factory joins, so `String#replace` against them is a precise edit:
|
|
279
|
+
|
|
280
|
+
```ts
|
|
281
|
+
import { toolPrompts } from 'zidane/tools/prompts'
|
|
282
|
+
|
|
283
|
+
toolDescriptions: {
|
|
284
|
+
read_file: toolPrompts.read_file.replace('Claude Code', 'the editor'),
|
|
285
|
+
shell: cur => cur.replace(toolPrompts.shell.background, 'Background mode: ask first.'),
|
|
286
|
+
edit: `${toolPrompts.edit}\nNever edit generated files under dist/.`,
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
260
290
|
### Built-in tools
|
|
261
291
|
|
|
262
292
|
| Tool | Purpose |
|
|
@@ -296,7 +326,7 @@ interface ToolDef {
|
|
|
296
326
|
}
|
|
297
327
|
```
|
|
298
328
|
|
|
299
|
-
`ToolContext` exposes `provider`, `signal`, `execution`, `handle`, `hooks`, `turnId`, `callId`, `runId?`, `parentRunId?`, `parentCallId?`, `session?`, `readState?`, `clock?`, `depth?`, plus preset fields (`name`, `system`, `tools`, `toolAliases`, `mcpServers`, `skills`, `behavior`) so `spawn` can inherit.
|
|
329
|
+
`ToolContext` exposes `provider`, `signal`, `execution`, `handle`, `hooks`, `turnId`, `callId`, `runId?`, `parentRunId?`, `parentCallId?`, `session?`, `readState?`, `clock?`, `depth?`, plus preset fields (`name`, `system`, `tools`, `toolAliases`, `toolDescriptions`, `mcpServers`, `skills`, `behavior`) so `spawn` can inherit.
|
|
300
330
|
|
|
301
331
|
`clock` is the run's time / UUID source (`AgentClock`) — prefer it over `Date.now()` / `crypto.randomUUID()` for anything persisted or shown to the model, because a durable host replaces it with a journaled one so those values replay byte-identically. Durable adapters set `AgentClock.journaled: true`; consumers read it to avoid a wall-clock timer inside a journaled region (`spawn` switches its per-child timeout to a turn-boundary check on that signal).
|
|
302
332
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zidane",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.7",
|
|
4
4
|
"description": "an agent that goes straight to the goal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -121,6 +121,11 @@
|
|
|
121
121
|
"import": "./dist/tools/fetch-url.js",
|
|
122
122
|
"default": "./dist/tools/fetch-url.js"
|
|
123
123
|
},
|
|
124
|
+
"./tools/prompts": {
|
|
125
|
+
"types": "./dist/tools/prompts.d.ts",
|
|
126
|
+
"import": "./dist/tools/prompts.js",
|
|
127
|
+
"default": "./dist/tools/prompts.js"
|
|
128
|
+
},
|
|
124
129
|
"./presets": {
|
|
125
130
|
"types": "./dist/presets.d.ts",
|
|
126
131
|
"import": "./dist/presets.js",
|