zidane 8.2.1 → 8.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acp-cli.js +8 -8
- package/dist/{acp-D7Pr8NGt.js → acp-oYRjlh71.js} +6 -6
- package/dist/{acp-D7Pr8NGt.js.map → acp-oYRjlh71.js.map} +1 -1
- package/dist/acp.d.ts +2 -2
- package/dist/acp.js +1 -1
- package/dist/{agent-DecDtKA_.js → agent-CBQglXtH.js} +9 -379
- package/dist/agent-CBQglXtH.js.map +1 -0
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +1 -1
- package/dist/{builtin-artifact-kinds-B_OEgf8b.js → builtin-artifact-kinds-BmorPkgz.js} +36 -9
- package/dist/builtin-artifact-kinds-BmorPkgz.js.map +1 -0
- package/dist/chat/pure.d.ts +3 -3
- package/dist/chat/pure.js +4 -4
- package/dist/chat.d.ts +4 -4
- package/dist/chat.js +14 -14
- package/dist/{cli-shared-Dx4vmif6.js → cli-shared-E5m_pI8A.js} +2 -2
- package/dist/{cli-shared-Dx4vmif6.js.map → cli-shared-E5m_pI8A.js.map} +1 -1
- package/dist/{client-core-imHuBWV3.d.ts → client-core-BdD20sOv.d.ts} +24 -5
- package/dist/{client-core-imHuBWV3.d.ts.map → client-core-BdD20sOv.d.ts.map} +1 -1
- package/dist/{connection-loop-CdHt3iQi.d.ts → connection-loop-DTk82YVl.d.ts} +3 -3
- package/dist/{connection-loop-CdHt3iQi.d.ts.map → connection-loop-DTk82YVl.d.ts.map} +1 -1
- package/dist/contexts/daytona.d.ts +1 -1
- package/dist/contexts/e2b.d.ts +1 -1
- package/dist/{credentials-Dti61yoi.js → credentials-B9DfBJP9.js} +11 -7
- package/dist/credentials-B9DfBJP9.js.map +1 -0
- package/dist/daemon-cli.js +2 -2
- package/dist/{dispatcher-vy3J6JMA.js → dispatcher-BICXFGiJ.js} +27 -13
- package/dist/dispatcher-BICXFGiJ.js.map +1 -0
- package/dist/{engine-BN6PjWAW.js → engine-QCX3GV-i.js} +5 -5
- package/dist/{engine-BN6PjWAW.js.map → engine-QCX3GV-i.js.map} +1 -1
- package/dist/{eval-BaJtxLCW.js → eval-CfQlBR81.js} +2 -2
- package/dist/{eval-BaJtxLCW.js.map → eval-CfQlBR81.js.map} +1 -1
- package/dist/eval.d.ts +1 -1
- package/dist/eval.js +1 -1
- package/dist/{executor-CT4oUkg6.js → executor-B8GoXaaE.js} +2 -2
- package/dist/{executor-CT4oUkg6.js.map → executor-B8GoXaaE.js.map} +1 -1
- package/dist/{extensions-BKt7lxxv.js → extensions-BeH3D-bq.js} +114 -113
- package/dist/extensions-BeH3D-bq.js.map +1 -0
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.js +2 -2
- package/dist/{fold-rules-BYedvsH7.d.ts → fold-rules-DSypi36k.d.ts} +2 -2
- package/dist/{fold-rules-BYedvsH7.d.ts.map → fold-rules-DSypi36k.d.ts.map} +1 -1
- package/dist/google-O6pRnddf.js +881 -0
- package/dist/google-O6pRnddf.js.map +1 -0
- package/dist/{headless-Ebd1ZEzC.js → headless-R4pbpTkm.js} +3 -3
- package/dist/{headless-Ebd1ZEzC.js.map → headless-R4pbpTkm.js.map} +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/{host-scoped-settings-Cy_zbmB_.js → host-scoped-settings-CCnaBkCV.js} +2 -2
- package/dist/{host-scoped-settings-Cy_zbmB_.js.map → host-scoped-settings-CCnaBkCV.js.map} +1 -1
- package/dist/{host-signals-Cx2IAbHh.js → host-signals-DI9JQvR9.js} +5 -5
- package/dist/{host-signals-Cx2IAbHh.js.map → host-signals-DI9JQvR9.js.map} +1 -1
- package/dist/{index-pc71ADi6.d.ts → index-BkNeiJYI.d.ts} +71 -4
- package/dist/index-BkNeiJYI.d.ts.map +1 -0
- package/dist/{index-CidMTcxS.d.ts → index-DyQyDLX1.d.ts} +167 -10
- package/dist/index-DyQyDLX1.d.ts.map +1 -0
- package/dist/{index-Bt_G2Z_2.d.ts → index-lcuvhQfF.d.ts} +5 -5
- package/dist/{index-Bt_G2Z_2.d.ts.map → index-lcuvhQfF.d.ts.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +15 -15
- package/dist/ipc/remote.d.ts +5 -5
- package/dist/ipc/remote.js +3 -3
- package/dist/ipc.d.ts +5 -5
- package/dist/ipc.js +6 -6
- package/dist/{links-DSZ4uQ5w.js → links-CN5JFFde.js} +9 -9
- package/dist/{links-DSZ4uQ5w.js.map → links-CN5JFFde.js.map} +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/{oauth-BSqXgads.js → oauth-TVPPye84.js} +155 -25
- package/dist/oauth-TVPPye84.js.map +1 -0
- package/dist/{openai-dTmPxM6T.js → openai-Rh6u5NXF.js} +121 -2
- package/dist/openai-Rh6u5NXF.js.map +1 -0
- package/dist/{openrouter-CtZbQDa0.js → openrouter-Dg0yaI-o.js} +91 -2
- package/dist/openrouter-Dg0yaI-o.js.map +1 -0
- 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-EzlHyFSi.js → presets-DXeHsd24.js} +3 -3
- package/dist/{presets-EzlHyFSi.js.map → presets-DXeHsd24.js.map} +1 -1
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +1 -1
- package/dist/{prompts-D2lPHLOV.d.ts → prompts-DmY13jvF.d.ts} +2 -1
- package/dist/prompts-DmY13jvF.d.ts.map +1 -0
- package/dist/protocol-BIv1Yuvl.js.map +1 -1
- package/dist/providers/anthropic.d.ts +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/google.d.ts +1 -1
- package/dist/providers/google.js +1 -784
- package/dist/providers/local.d.ts +1 -1
- package/dist/providers/neuralwatt.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/openrouter.js +1 -1
- package/dist/providers/xai.d.ts +1 -1
- package/dist/providers/xai.js +1 -101
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +6 -5
- package/dist/{registry-BBaEgTsX.js → registry-PNi9rsGi.js} +3 -3
- package/dist/{registry-BBaEgTsX.js.map → registry-PNi9rsGi.js.map} +1 -1
- package/dist/{remote-hosts-bO7wOt44.js → remote-hosts-b6Luwdhu.js} +4 -4
- package/dist/{remote-hosts-bO7wOt44.js.map → remote-hosts-b6Luwdhu.js.map} +1 -1
- package/dist/restate.d.ts +1 -1
- package/dist/{secret-shapes-Cda65uDH.js → secret-shapes-CEoGmfEE.js} +10 -1
- package/dist/secret-shapes-CEoGmfEE.js.map +1 -0
- package/dist/session/sqlite.d.ts +1 -1
- package/dist/{session-factory-BazyVdzj.js → session-factory-CMwIXE-7.js} +5 -5
- package/dist/{session-factory-BazyVdzj.js.map → session-factory-CMwIXE-7.js.map} +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/{settings-keys-zYaer8DY.js → settings-keys-DssjmqAV.js} +3 -3
- package/dist/{settings-keys-zYaer8DY.js.map → settings-keys-DssjmqAV.js.map} +1 -1
- package/dist/{shell-path-od9XHRPt.js → shell-path-BUFwqU_A.js} +3 -3
- package/dist/{shell-path-od9XHRPt.js.map → shell-path-BUFwqU_A.js.map} +1 -1
- package/dist/{skills-use-D68a1gyZ.js → skills-use-CssTEaIj.js} +375 -2
- package/dist/skills-use-CssTEaIj.js.map +1 -0
- package/dist/skills.d.ts +1 -1
- package/dist/{system-freeze-DXvJpveP.js → system-freeze-Um9ZJiPo.js} +24 -9
- package/dist/system-freeze-Um9ZJiPo.js.map +1 -0
- package/dist/{todo-edits-CmqNFvLJ.js → todo-edits-H77ROt6X.js} +2 -2
- package/dist/{todo-edits-CmqNFvLJ.js.map → todo-edits-H77ROt6X.js.map} +1 -1
- package/dist/tools/fetch-url.d.ts +1 -1
- package/dist/tools/prompts.d.ts +1 -1
- package/dist/tools/prompts.js +7 -0
- package/dist/tools/prompts.js.map +1 -1
- package/dist/tools/web-search.d.ts +1 -1
- package/dist/{tools-9Dpm8F-f.js → tools-pZVFIJ_K.js} +273 -2
- package/dist/tools-pZVFIJ_K.js.map +1 -0
- package/dist/tools.d.ts +3 -3
- package/dist/tools.js +4 -4
- package/dist/{transcript-anchors-B3TFJqr_.js → transcript-anchors-s-yxh0jt.js} +10 -10
- package/dist/{transcript-anchors-B3TFJqr_.js.map → transcript-anchors-s-yxh0jt.js.map} +1 -1
- package/dist/{transcript-reconcile-BC2DbTmp.js → transcript-reconcile-DeFLIQ14.js} +19 -2
- package/dist/{transcript-reconcile-BC2DbTmp.js.map → transcript-reconcile-DeFLIQ14.js.map} +1 -1
- package/dist/tui.d.ts +7 -7
- package/dist/tui.js +24 -22
- package/dist/tui.js.map +1 -1
- package/dist/{turn-operations-CIFoOebZ.d.ts → turn-operations-BbGJ-KSt.d.ts} +2 -2
- package/dist/{turn-operations-CIFoOebZ.d.ts.map → turn-operations-BbGJ-KSt.d.ts.map} +1 -1
- package/dist/{types-iFLlZKd0.d.ts → types-C0PJmBaO.d.ts} +2 -2
- package/dist/{types-iFLlZKd0.d.ts.map → types-C0PJmBaO.d.ts.map} +1 -1
- package/dist/types-JzccL5GE.js +24 -0
- package/dist/types-JzccL5GE.js.map +1 -0
- package/dist/types.d.ts +2 -2
- package/dist/{url-BTH-HE9Y.js → url-CLl0u4Z8.js} +2 -2
- package/dist/{url-BTH-HE9Y.js.map → url-CLl0u4Z8.js.map} +1 -1
- package/dist/{version-4T82xRxQ.js → version-v77Y4A3C.js} +2 -2
- package/dist/{version-4T82xRxQ.js.map → version-v77Y4A3C.js.map} +1 -1
- package/dist/wire-DH77Z-rr.js +80 -0
- package/dist/wire-DH77Z-rr.js.map +1 -0
- package/dist/{workspace-exec-stream-By8na6vz.js → workspace-exec-stream-kqARO8iC.js} +4 -4
- package/dist/{workspace-exec-stream-By8na6vz.js.map → workspace-exec-stream-kqARO8iC.js.map} +1 -1
- package/dist/{write-file-B4vi3SvQ.js → write-file-QYrcDdl3.js} +3 -3
- package/dist/{write-file-B4vi3SvQ.js.map → write-file-QYrcDdl3.js.map} +1 -1
- package/dist/{ws-CS312Jpx.js → ws-BD9FN98u.js} +5 -5
- package/dist/{ws-CS312Jpx.js.map → ws-BD9FN98u.js.map} +1 -1
- package/dist/{ws-client-wWka-Jku.js → ws-client-D7eb2UbH.js} +3 -3
- package/dist/{ws-client-wWka-Jku.js.map → ws-client-D7eb2UbH.js.map} +1 -1
- package/dist/xai-CStTwCV2.js +182 -0
- package/dist/xai-CStTwCV2.js.map +1 -0
- package/docs/ARCHITECTURE.md +1 -0
- package/docs/ARTIFACTS.md +1 -1
- package/docs/EXTENSIONS.md +9 -5
- package/package.json +2 -2
- package/dist/agent-DecDtKA_.js.map +0 -1
- package/dist/builtin-artifact-kinds-B_OEgf8b.js.map +0 -1
- package/dist/credentials-Dti61yoi.js.map +0 -1
- package/dist/dispatcher-vy3J6JMA.js.map +0 -1
- package/dist/extensions-BKt7lxxv.js.map +0 -1
- package/dist/index-CidMTcxS.d.ts.map +0 -1
- package/dist/index-pc71ADi6.d.ts.map +0 -1
- package/dist/oauth-BSqXgads.js.map +0 -1
- package/dist/openai-dTmPxM6T.js.map +0 -1
- package/dist/openrouter-CtZbQDa0.js.map +0 -1
- package/dist/prompts-D2lPHLOV.d.ts.map +0 -1
- package/dist/providers/google.js.map +0 -1
- package/dist/providers/xai.js.map +0 -1
- package/dist/secret-shapes-Cda65uDH.js.map +0 -1
- package/dist/skills-use-D68a1gyZ.js.map +0 -1
- package/dist/system-freeze-DXvJpveP.js.map +0 -1
- package/dist/tools-9Dpm8F-f.js.map +0 -1
|
@@ -171,13 +171,13 @@ export default defineExtension({
|
|
|
171
171
|
displayName: 'My Ext', // optional UI label
|
|
172
172
|
description: 'what it does',
|
|
173
173
|
capabilities: ['tools'], // optional descriptive manifest labels
|
|
174
|
-
permissions: [], //
|
|
174
|
+
permissions: [], // labels, not a sandbox — except 'mcp:call' (ctx.mcp) and 'ipc' (ctx.bus), which gate those surfaces
|
|
175
175
|
setup(ctx) { /* register everything here; may be async */ },
|
|
176
|
-
teardown() {}, // optional
|
|
176
|
+
teardown() {}, // optional: stop what setup started; runs on every reload
|
|
177
177
|
})
|
|
178
178
|
\`\`\`
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
\`import ... from 'zidane'\` works on every host (TUI, compiled binaries, desktop app, headless): the host maps it to its own live copy. Zero-import form, equivalent since \`defineExtension\` returns its argument:
|
|
181
181
|
\`\`\`ts
|
|
182
182
|
import type { ExtensionContext } from 'zidane' // type-only: erased at runtime
|
|
183
183
|
export default {
|
|
@@ -195,13 +195,18 @@ Identity / utilities:
|
|
|
195
195
|
- ctx.paths — cwd/projectRoot/dataDir/cacheDir/configDir/stateDir
|
|
196
196
|
- ctx.storage.path(scope, ...segments) — extension-scoped storage path
|
|
197
197
|
- ctx.session — JSON-only per-session state: get / set / delete
|
|
198
|
+
- ctx.signal — aborts when setup times out (10 s) or the registry is disposed mid-setup
|
|
199
|
+
- ctx.disabled — true when the extension is off: setup still runs so its settings show, but contributions are dropped and runtime surfaces are no-ops. Gate side effects (network, processes) on \`!ctx.disabled\`.
|
|
198
200
|
|
|
199
201
|
Renderer-agnostic registration:
|
|
200
202
|
- ctx.registerTool(name, toolDef)
|
|
201
203
|
- ctx.registerHook(event, handler) — an AgentHooks event; fires on the PARENT agent (use child:* for subagents)
|
|
202
204
|
- ctx.registerMcpServer(config)
|
|
203
205
|
- ctx.registerSkill(skillConfig) — a defineSkill() shape
|
|
204
|
-
- ctx.registerCompletionProvider(provider) — single-
|
|
206
|
+
- ctx.registerCompletionProvider(provider) — popover completions on a single-character trigger (built-ins use '/', '@', '#')
|
|
207
|
+
- ctx.registerInlineAutocompleteProvider(p) — ghost-text suffix at the cursor, accepted with Tab; first non-empty suffix wins
|
|
208
|
+
- ctx.loadAgentPlugin(dirOrOptions) — load an Agent Plugin (path relative to ctx.dir allowed) and register its skills/MCP servers; await it inside setup; never throws, check \`ok\`
|
|
209
|
+
- ctx.registerRunSettled(handler) — after each run of any session settles (GUI + daemon hosts); act through ctx.sessions.send/getData/setData
|
|
205
210
|
- ctx.tui.notify(text, { tone? }) — one-shot transcript line (info/warn/error); buffered pre-mount
|
|
206
211
|
- ctx.tui.setStatus(text | null, { loader?, timeout?, sessionId? }) — single dim status line (transcript-tail slot); loader glyph, auto-clear ms; sessionId scopes it to one session (the GUI shows it as a badge in that session's composer; null with the same id clears it)
|
|
207
212
|
- ctx.composer.setBadge(id, { label, count?, icon?, tone?, loader?, highlight?, title?, panel?, order? } | null, { sessionId, timeout? }) — a badge in that session's composer (desktop app; the TUI ignores it): panel = the tab a click opens (bare id = this extension's panel), highlight only while something waits on the user; max 8 per extension and session
|
|
@@ -211,12 +216,12 @@ Renderer-agnostic registration:
|
|
|
211
216
|
- ctx.registerToolResultTransform(fn) — middleware over finished tool results (chained)
|
|
212
217
|
- ctx.registerContextTransform(fn) — rewrite wire messages before each provider call
|
|
213
218
|
- ctx.registerPromptTransform(fn) — transform or consume submitted prompts (after / commands, before skills)
|
|
214
|
-
- ctx.runtime / ctx.sessions — late-bound host controls: model()/thinking()/setThinking()
|
|
219
|
+
- ctx.runtime / ctx.sessions — late-bound host controls: runtime model()/models()/thinking()/setThinking(); sessions list/switch/create, send(sessionId, prompt), getData/setData(sessionId, key[, value])
|
|
215
220
|
- ctx.appendNote(blocks) — durable display-only transcript note (command-output block vocabulary)
|
|
216
221
|
- ctx.workspace.exec/readFile/writeFile/listFiles/fileSize — shell + files through the SESSION'S execution context (sandbox-correct; host child_process silently targets the wrong filesystem under docker/e2b). Detached ⇒ rejects; guard with \`await ctx.workspace.available()\`.
|
|
217
222
|
- ctx.tui.registerToolRenderer({ tools?, render }) — custom view for tool-result rows; return null to fall through to the default. View-layer only: never persisted, error-bounded per row, TUI-scoped.
|
|
218
223
|
- ctx.tui.registerRenderer(id, render) + emit/appendNote \`custom: { renderer, data }\` blocks — custom components in the transcript. \`data\` must be JSON-safe (it persists); the block's \`text\` is the MANDATORY markdown fallback (disabled extension, headless host, GUI, renderer throw). appendNote auto-prefixes bare ids; command emit needs \`<ext>/<id>\`.
|
|
219
|
-
- Renderer components: import \`react\` / \`@opentui/react\` BARE (never as your own dependency) — the
|
|
224
|
+
- Renderer components (TUI): import \`react\` / \`@opentui/react\` / \`zidane/tui\` BARE (never as your own dependency) — the TUI maps them to its live instances at load time, so hooks work. The desktop app does not map them; keep UI behind lazy imports so it never loads there. Async data: render() stays sync; return a component that fetches with useState/useEffect.
|
|
220
225
|
- Renderer async caching: \`useSessionState(id, initial)\` (per-row, session-persisted — rehydrates on reload) + \`useRowVisible()\` (latched viewport gate) from \`zidane/tui\` — fetch once, only when scrolled in.
|
|
221
226
|
- ctx.registerCommand(command) — a '/<name>' workflow (handler or steps[]); step ctx: emit (local output),
|
|
222
227
|
runAgent (interactive sub-run), generateData (silent zod/JSON-Schema JSON),
|
|
@@ -243,11 +248,18 @@ Renderer-agnostic registration:
|
|
|
243
248
|
- ctx.registerSkillPolicy(policy) — auto-activate skills by run context
|
|
244
249
|
- ctx.registerConfigCategory(category)
|
|
245
250
|
- ctx.registerConfigItem([categoryId,] item) — typed setting; supports scope/onChange metadata
|
|
251
|
+
- ctx.registerPaletteCommand(cmd) / ctx.registerPaletteProvider(p) — command palette entries (ids namespaced \`<ext>/<id>\`)
|
|
252
|
+
- ctx.registerArtifactKind(reg) + ctx.artifacts.list({ scope?: 'session' | 'project' | 'all', kind? }) — give an artifact kind detection/rows/badges; read the artifact store
|
|
253
|
+
- ctx.registerReferences(provider) — find refs in text (ticket ids, URLs) and paint them as badges
|
|
254
|
+
- ctx.registerBadgeActions(reg) — right-click actions on badges
|
|
255
|
+
- ctx.mcp — call the user's MCP tools outside runs; undefined unless permissions include 'mcp:call' and the host offers MCP
|
|
256
|
+
- ctx.bus — private per-extension message channel across windows; undefined unless permissions include 'ipc'
|
|
246
257
|
|
|
247
258
|
TUI-only (ctx.tui.* — silently ignored on non-TUI hosts):
|
|
248
259
|
- ctx.tui.registerKeybinding(binding)
|
|
249
260
|
- ctx.tui.registerFooterHint(hint)
|
|
250
261
|
- ctx.tui.registerModal(modal) — keep UI lazy: \`node: () => import('./panel')\`
|
|
262
|
+
- ctx.tui.registerArtifactRenderer(reg) — detail view for one artifact kind in the artifacts modal
|
|
251
263
|
|
|
252
264
|
Side panels (both hosts):
|
|
253
265
|
- ctx.registerPanel({ id, label, icon?, scope?, load, subscribe?, onAction? })
|
|
@@ -277,13 +289,16 @@ ctx.registerTool('my_tool', {
|
|
|
277
289
|
- Register ONLY inside \`setup\` — calls after it resolves are dropped (logger.warn).
|
|
278
290
|
- A throw in \`setup\` is caught and shown on the extension's Settings row; the rest of boot continues.
|
|
279
291
|
- Discovery order, first per name wins: project \`.agents\` → project \`.zidane\` → \`~/.agents\` → \`~/.zidane\`.
|
|
280
|
-
-
|
|
292
|
+
- Project extensions load only once the user turns on \`loadProjectExtensions\` (Settings, "Load project extensions") or sets ZIDANE_TRUST_PROJECT_EXTENSIONS=1.
|
|
293
|
+
- \`/reload\` is a TRUE hot-reload: re-discover + re-run setup, and each extension's module graph is re-imported fresh — code edits (deep imports included) apply live. Module-level state resets; clean up external resources in \`teardown\`, or the old version stays in memory.
|
|
294
|
+
- The desktop app reloads on its own when a source file in a user/project extension folder is saved (~300 ms after the last write, after any in-flight run). Don't write the extension's own data as \`.ts\`/\`.js\` files in its folder.
|
|
295
|
+
- On the desktop app (Node), extensions load through jiti: all TS/TSX works, but \`import.meta.dirname\`/\`filename\` are undefined — use \`ctx.dir\`. Only \`zidane\`, \`zidane/providers\`, \`zidane/providers/google\` and \`zidane/oauth\` are host-mapped there; other packages need the extension's own \`node_modules\`.
|
|
281
296
|
|
|
282
297
|
## Distribution
|
|
283
298
|
- Users install via Settings → Extensions → \`ctrl+g\` (source input + scope picker) — GitHub (\`owner/repo[#ref][:sub/dir]\`, tree URLs) or npm (\`pkg[@version]\`, exact versions / dist-tags).
|
|
284
299
|
- Update / remove: Settings → Extensions, \`ctrl+u\` / \`ctrl+x\` on the focused row (update replays the recorded \`.install.json\` provenance in place, skipping when the recorded commit/version still matches the remote).
|
|
285
300
|
- Shape your repo/package as a root \`index.ts\` (single extension) or \`extensions/<name>/index.*\` dirs (collection).
|
|
286
|
-
- Reference packages to copy: \`extensions/git-flow\`
|
|
301
|
+
- Reference packages to copy, in the zidane repo: \`extensions/git-flow\` (multi-file; \`/commit\`, \`/review\`, \`/fix\`, \`/pr\`, \`/ticket\` commands, type-only \`zidane\` imports) and \`extensions/headroom\` (hooks + tool + config).
|
|
287
302
|
- Declare runtime deps in \`package.json#dependencies\` — installed with bun/npm/… WITHOUT lifecycle scripts; don't rely on postinstall.
|
|
288
303
|
- The installed folder is named from your exported \`definition.name\` — pick it to be folder-safe ([A-Za-z0-9_.-]).`;
|
|
289
304
|
/** Preset preamble for "edit / create extension" sessions. */
|
|
@@ -611,4 +626,4 @@ function toolsNote(text, frozen, history) {
|
|
|
611
626
|
//#endregion
|
|
612
627
|
export { readSkillEditMarker as _, sectionDigest as a, withZidaneSkillEditSkill as b, EXTENSION_EDIT_METADATA_KEY as c, ZIDANE_SKILL_EDIT_SKILL_NAME as d, buildZidaneExtensionSkill as f, extensionScaffold as g, extensionDirForCwd as h, latestSystemSnapshot as i, SKILL_EDIT_METADATA_KEY as l, editSessionMetadata as m, announcedDigest as n, sectionDigests as o, buildZidaneSkillEditSkill as p, catalogChangeNotes as r, systemSnapshotTurn as s, FROZEN_PROMPT_SECTION_KINDS as t, ZIDANE_EXTENSION_SKILL_NAME as u, resolveExtensionDocsDir as v, withZidaneExtensionSkill as y };
|
|
613
628
|
|
|
614
|
-
//# sourceMappingURL=system-freeze-
|
|
629
|
+
//# sourceMappingURL=system-freeze-Um9ZJiPo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-freeze-Um9ZJiPo.js","names":[],"sources":["../src/extension-authoring.ts","../src/system-freeze.ts"],"sourcesContent":["/**\n * Host glue for the \"edit / create extension\" and \"edit skill\" authoring\n * flows (TUI + GUI).\n *\n * Pure, renderer-neutral helpers consumed by the hosts — deliberately kept OUT\n * of `src/extensions/**` (the extension loader / registry core) so the\n * authoring UX can never entangle with discovery / registration. Imports only\n * the skills lib and node builtins.\n *\n * - {@link extensionScaffold} — minimal `index.ts` for a new extension.\n * - {@link resolveExtensionDocsDir} — locate the shipped `docs/` directory.\n * - {@link buildZidaneExtensionSkill} — the inline extension docs skill.\n * - {@link buildZidaneSkillEditSkill} — the inline skill-editing skill.\n * - {@link withZidaneExtensionSkill} / {@link withZidaneSkillEditSkill}\n * — inject either into a `SkillsConfig`.\n * - {@link editSessionMetadata} — the ONE canonical \"open an editing session\n * with preset context\" seed both hosts stamp at session creation.\n * - {@link EXTENSION_EDIT_METADATA_KEY} / {@link SKILL_EDIT_METADATA_KEY} /\n * {@link ZIDANE_EXTENSION_SKILL_NAME} / {@link ZIDANE_SKILL_EDIT_SKILL_NAME}\n * — constants shared by both hosts.\n */\nimport type { SkillConfig, SkillsConfig } from './skills'\nimport { existsSync } from 'node:fs'\nimport { createRequire } from 'node:module'\nimport { basename, dirname, join, resolve } from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport { defineSkill } from './skills'\n\n/**\n * Session-metadata key marking an \"edit / create extension\" session. The value\n * is an {@link ExtensionEditMarker}. Both hosts stamp it at session creation so\n * the agent build can scope the docs skill to exactly these sessions (and it\n * survives reload because metadata is persisted).\n */\nexport const EXTENSION_EDIT_METADATA_KEY = 'zidane.extensionEdit'\n\n/** Name of the inline docs skill auto-activated in extension edit sessions. */\nexport const ZIDANE_EXTENSION_SKILL_NAME = 'zidane-extension'\n\n/**\n * Session-metadata key marking an \"edit skill\" session — the skill-editing\n * counterpart of {@link EXTENSION_EDIT_METADATA_KEY}. The value is a\n * {@link SkillEditMarker}. Stamped at session creation by both hosts (via\n * {@link editSessionMetadata}); persisted metadata means it survives reload.\n */\nexport const SKILL_EDIT_METADATA_KEY = 'zidane.skillEdit'\n\n/** Name of the inline preset skill auto-activated in skill edit sessions. */\nexport const ZIDANE_SKILL_EDIT_SKILL_NAME = 'zidane-skill'\n\n/** Per-edit-session marker persisted on `session.metadata[EXTENSION_EDIT_METADATA_KEY]`. */\nexport interface ExtensionEditMarker {\n /** Absolute path to the extension's directory (the session's cwd). */\n dir: string\n}\n\n/** Per-edit-session marker persisted on `session.metadata[SKILL_EDIT_METADATA_KEY]`. */\nexport interface SkillEditMarker {\n /** Absolute path to the skill's directory (the session's cwd). */\n dir: string\n /** The skill's name (frontmatter-first, as discovered). */\n name: string\n}\n\n/**\n * What an editing session targets. `dir` becomes the session's cwd; `name`\n * feeds the preset wording (and the skill marker).\n */\nexport interface EditSessionTarget {\n /** Whether the session edits an extension or a skill. */\n kind: 'extension' | 'skill'\n /** Name of the extension or skill. */\n name: string\n /** Absolute path of the extension or skill directory. */\n dir: string\n}\n\n/**\n * THE canonical seed for \"open an editing session with preset context\" —\n * the session metadata both hosts stamp at creation time. The engines read\n * the marker back and inject + auto-activate the matching inline preset\n * skill ({@link buildZidaneExtensionSkill} / {@link buildZidaneSkillEditSkill}),\n * so the preset rides as real conversation context from turn one.\n *\n * @param target - The extension or skill the editing session targets.\n */\nexport function editSessionMetadata(target: EditSessionTarget): Record<string, unknown> {\n return target.kind === 'extension'\n ? { [EXTENSION_EDIT_METADATA_KEY]: { dir: target.dir } satisfies ExtensionEditMarker }\n : { [SKILL_EDIT_METADATA_KEY]: { dir: target.dir, name: target.name } satisfies SkillEditMarker }\n}\n\n/**\n * Parse a persisted {@link SkillEditMarker} back out of session metadata.\n * Tolerant: anything that isn't `{ dir: string, name: string }` → `null`\n * (older sessions, manual metadata edits, type drift).\n *\n * @param raw - Value read from `session.metadata`, of unknown shape.\n */\nexport function readSkillEditMarker(raw: unknown): SkillEditMarker | null {\n if (typeof raw !== 'object' || raw === null)\n return null\n const { dir, name } = raw as Record<string, unknown>\n if (typeof dir !== 'string' || dir.length === 0 || typeof name !== 'string' || name.length === 0)\n return null\n return { dir, name }\n}\n\n/**\n * Minimal valid extension module for a freshly-created extension. `name` MUST\n * equal the folder name or the loader rejects it (see `src/extensions/discovery`).\n * Does nothing by default — the author registers contributions via `ctx.*`\n * inside `setup`; the auto-activated docs skill guides them from there.\n *\n * @param name - Extension name. Must equal the extension's folder name.\n */\nexport function extensionScaffold(name: string): string {\n return `import { defineExtension } from 'zidane'\n\n/**\n * ${name} — a zidane extension.\n *\n * Register tools / hooks / skills / MCP servers / subagents / config / themes /\n * agents / keybindings via the \\`ctx\\` surface inside \\`setup\\`.\n *\n * Authoring reference: activate the \\`${ZIDANE_EXTENSION_SKILL_NAME}\\` skill — it carries\n * the full \\`ctx\\` API + invariants and is available whenever you open this\n * folder in zidane (or run \\`zidane\\` from inside it).\n */\nexport default defineExtension({\n name: '${name}',\n setup(ctx) {\n // e.g. ctx.registerTool('${name}_hello', {\n // spec: { name: '${name}_hello', description: 'say hi', inputSchema: { type: 'object', properties: {} } },\n // isConcurrencySafe: true,\n // async execute() { return 'hello from ${name}' },\n // })\n },\n})\n`\n}\n\n/**\n * Locate the shipped `docs/` directory (`docs/EXTENSIONS.md` + siblings).\n *\n * The docs ship via `package.json` `files`, so an installed consumer has\n * `<root>/node_modules/zidane/docs` and the repo itself has `<repo>/docs`.\n * Returns the first existing candidate, or `null` (the skill then falls back to\n * the literal `node_modules/zidane/docs` hint, which the model's file tools can\n * still attempt from cwd).\n *\n * @param cwd - Directory used for the `node_modules/zidane/docs` fallback lookup. Defaults to `process.cwd()`.\n */\nexport function resolveExtensionDocsDir(cwd: string = process.cwd()): string | null {\n const candidates: string[] = []\n\n // 1) The installed (or self-linked) zidane package, via its package.json\n // (exposed through `exports[\"./package.json\"]`).\n try {\n const req = createRequire(import.meta.url)\n candidates.push(join(dirname(req.resolve('zidane/package.json')), 'docs'))\n }\n catch {\n // No resolvable package (compiled binary / odd layout) — fall through.\n }\n\n // 2) Relative to this module: the bundled chunk in `dist/` -> `../docs`, or\n // walking up from `src/` when running from source.\n try {\n let dir = dirname(fileURLToPath(import.meta.url))\n for (let i = 0; i < 6; i++) {\n if (existsSync(join(dir, 'docs', 'EXTENSIONS.md'))) {\n candidates.push(join(dir, 'docs'))\n break\n }\n dir = dirname(dir)\n }\n }\n catch {\n // `import.meta.url` is virtual under `bun build --compile` — fall through.\n }\n\n // 3) cwd-relative — the project the author is actually editing.\n candidates.push(join(cwd, 'node_modules', 'zidane', 'docs'))\n\n for (const candidate of candidates) {\n if (existsSync(join(candidate, 'EXTENSIONS.md')))\n return candidate\n }\n return null\n}\n\n/** Entry-file probe order for an extension dir (mirrors the loader's discovery). */\nconst EXTENSION_ENTRY_FILES = ['index.ts', 'index.tsx', 'index.mjs', 'index.js'] as const\n\n/**\n * If `cwd` sits inside a zidane extension, return that extension's root dir,\n * else `null`. Mirrors the discovery layout\n * `<scope>/.{agents,zidane}/extensions/<name>/` — the root is the `<name>` dir\n * (parent `extensions`, grandparent `.agents` / `.zidane`) holding an entry\n * file. Walks up from `cwd`, so the nearest enclosing extension wins. Lets the\n * hosts surface the authoring skill for a plain `zidane` launched from an\n * extension folder, not just sessions opened through the edit/create flow.\n *\n * @param cwd - Directory to start the upward walk from. Defaults to `process.cwd()`.\n */\nexport function extensionDirForCwd(cwd: string = process.cwd()): string | null {\n let dir = resolve(cwd)\n // Bounded walk to the filesystem root (the `parent === dir` guard is the real\n // terminator; the cap is just belt-and-braces against pathological inputs).\n for (let i = 0; i < 64; i++) {\n const parent = dirname(dir)\n if (\n basename(parent) === 'extensions'\n && (basename(dirname(parent)) === '.agents' || basename(dirname(parent)) === '.zidane')\n && EXTENSION_ENTRY_FILES.some(f => existsSync(join(dir, f)))\n ) {\n return dir\n }\n if (parent === dir)\n break\n dir = parent\n }\n return null\n}\n\n/**\n * The authoring reference embedded into the skill body. Kept INLINE (not a\n * filesystem path) on purpose: a `bun build --compile` TUI binary has no\n * resolvable `node_modules/zidane/docs`, no real `import.meta.url`, and the\n * edited extension's own cwd has no `node_modules` — so a path reference dead-\n * ends there. The model gets the API verbatim on activation regardless of host.\n *\n * Mirrors `ExtensionContext` (src/extensions/types.ts) — keep in sync when the\n * `ctx.*` surface changes.\n */\nconst EXTENSION_AUTHORING_CHEATSHEET = `## defineExtension\n\nA zidane extension is a module at \\`<scope>/.{agents,zidane}/extensions/<name>/index.{ts,tsx,mjs,js}\\`\nthat default-exports \\`defineExtension({ ... })\\`. It runs in-process in the host (TUI / GUI / SDK).\n\n\\`\\`\\`ts\nimport { defineExtension } from 'zidane'\n\nexport default defineExtension({\n name: 'my-ext', // MUST equal the folder name\n apiVersion: 1, // optional; omitted means v1\n version: '0.1.0', // optional — shown in Settings → Extensions\n displayName: 'My Ext', // optional UI label\n description: 'what it does',\n capabilities: ['tools'], // optional descriptive manifest labels\n permissions: [], // labels, not a sandbox — except 'mcp:call' (ctx.mcp) and 'ipc' (ctx.bus), which gate those surfaces\n setup(ctx) { /* register everything here; may be async */ },\n teardown() {}, // optional: stop what setup started; runs on every reload\n})\n\\`\\`\\`\n\n\\`import ... from 'zidane'\\` works on every host (TUI, compiled binaries, desktop app, headless): the host maps it to its own live copy. Zero-import form, equivalent since \\`defineExtension\\` returns its argument:\n\\`\\`\\`ts\nimport type { ExtensionContext } from 'zidane' // type-only: erased at runtime\nexport default {\n name: 'my-ext',\n setup(ctx: ExtensionContext) { /* ... */ },\n}\n\\`\\`\\`\n\n## ctx surface (call everything inside setup)\n\nIdentity / utilities:\n- ctx.name / ctx.version / ctx.dir / ctx.scope ('project' | 'user' | 'inline' | 'builtin')\n- ctx.logger — Logger namespaced \\`extension:<name>\\`\n- ctx.config — read THIS extension's config, default-first: \\`ctx.config.get(key)\\`\n- ctx.paths — cwd/projectRoot/dataDir/cacheDir/configDir/stateDir\n- ctx.storage.path(scope, ...segments) — extension-scoped storage path\n- ctx.session — JSON-only per-session state: get / set / delete\n- ctx.signal — aborts when setup times out (10 s) or the registry is disposed mid-setup\n- ctx.disabled — true when the extension is off: setup still runs so its settings show, but contributions are dropped and runtime surfaces are no-ops. Gate side effects (network, processes) on \\`!ctx.disabled\\`.\n\nRenderer-agnostic registration:\n- ctx.registerTool(name, toolDef)\n- ctx.registerHook(event, handler) — an AgentHooks event; fires on the PARENT agent (use child:* for subagents)\n- ctx.registerMcpServer(config)\n- ctx.registerSkill(skillConfig) — a defineSkill() shape\n- ctx.registerCompletionProvider(provider) — popover completions on a single-character trigger (built-ins use '/', '@', '#')\n- ctx.registerInlineAutocompleteProvider(p) — ghost-text suffix at the cursor, accepted with Tab; first non-empty suffix wins\n- ctx.loadAgentPlugin(dirOrOptions) — load an Agent Plugin (path relative to ctx.dir allowed) and register its skills/MCP servers; await it inside setup; never throws, check \\`ok\\`\n- ctx.registerRunSettled(handler) — after each run of any session settles (GUI + daemon hosts); act through ctx.sessions.send/getData/setData\n- ctx.tui.notify(text, { tone? }) — one-shot transcript line (info/warn/error); buffered pre-mount\n- ctx.tui.setStatus(text | null, { loader?, timeout?, sessionId? }) — single dim status line (transcript-tail slot); loader glyph, auto-clear ms; sessionId scopes it to one session (the GUI shows it as a badge in that session's composer; null with the same id clears it)\n- ctx.composer.setBadge(id, { label, count?, icon?, tone?, loader?, highlight?, title?, panel?, order? } | null, { sessionId, timeout? }) — a badge in that session's composer (desktop app; the TUI ignores it): panel = the tab a click opens (bare id = this extension's panel), highlight only while something waits on the user; max 8 per extension and session\n- ctx.tui.setBanner(lines | null, { timeout? }) — short block above the prompt (stacked with the todo indicator); auto-clear ms\n- ctx.submitPrompt(text, { delivery? }) — submit as the user: 'auto' (run-or-queue), 'steer', 'followUp'; false when detached\n- ctx.registerToolPolicy({ tools?, decide }) — gate tool calls: allow / { block } / { patch } (patches re-validated by the loop)\n- ctx.registerToolResultTransform(fn) — middleware over finished tool results (chained)\n- ctx.registerContextTransform(fn) — rewrite wire messages before each provider call\n- ctx.registerPromptTransform(fn) — transform or consume submitted prompts (after / commands, before skills)\n- ctx.runtime / ctx.sessions — late-bound host controls: runtime model()/models()/thinking()/setThinking(); sessions list/switch/create, send(sessionId, prompt), getData/setData(sessionId, key[, value])\n- ctx.appendNote(blocks) — durable display-only transcript note (command-output block vocabulary)\n- ctx.workspace.exec/readFile/writeFile/listFiles/fileSize — shell + files through the SESSION'S execution context (sandbox-correct; host child_process silently targets the wrong filesystem under docker/e2b). Detached ⇒ rejects; guard with \\`await ctx.workspace.available()\\`.\n- ctx.tui.registerToolRenderer({ tools?, render }) — custom view for tool-result rows; return null to fall through to the default. View-layer only: never persisted, error-bounded per row, TUI-scoped.\n- ctx.tui.registerRenderer(id, render) + emit/appendNote \\`custom: { renderer, data }\\` blocks — custom components in the transcript. \\`data\\` must be JSON-safe (it persists); the block's \\`text\\` is the MANDATORY markdown fallback (disabled extension, headless host, GUI, renderer throw). appendNote auto-prefixes bare ids; command emit needs \\`<ext>/<id>\\`.\n- Renderer components (TUI): import \\`react\\` / \\`@opentui/react\\` / \\`zidane/tui\\` BARE (never as your own dependency) — the TUI maps them to its live instances at load time, so hooks work. The desktop app does not map them; keep UI behind lazy imports so it never loads there. Async data: render() stays sync; return a component that fetches with useState/useEffect.\n- Renderer async caching: \\`useSessionState(id, initial)\\` (per-row, session-persisted — rehydrates on reload) + \\`useRowVisible()\\` (latched viewport gate) from \\`zidane/tui\\` — fetch once, only when scrolled in.\n- ctx.registerCommand(command) — a '/<name>' workflow (handler or steps[]); step ctx: emit (local output),\n runAgent (interactive sub-run), generateData (silent zod/JSON-Schema JSON),\n session? (read-only turns/runs view), interaction? (confirm / askUser forms /\n presentPlan approval — both optional; guard for bare hosts)\n- ctx.registerTheme(theme)\n- ctx.registerAgent(profile) — extra agent profile in the picker; same \\`family\\` = one shared agent (tools = every\n member's, prompt = the first registered member's), so a switch keeps the prompt\n cache; a gate refuses tools the active profile lacks; \\`switchNote\\` (string or\n ({ tools, allowInteraction }) => string) tells the model about the switch\n- ctx.registerSubagent(def) — spawnable subagent (the spawn tool's subagent_type)\n- ctx.registerSubagentOverride(name, fn) — edit/delete an existing subagent\n- ctx.registerProvider(descriptor) — LLM provider; its oauthProvider joins the OAuth registry with it (id = credential\n key), usage probe via descriptor.usage, helpers in 'zidane/oauth' + googleCompatible\n- ctx.registerSystemPromptFragment(text)\n- ctx.registerContextBreakdownSection(fn) — render extension-owned rows in the context panel\n- ctx.registerContextPanelSection(section) — richer context panel section with rows/load\n- ctx.registerToolResultMetadata(registration) — project namespaced tool-result metadata into context\n- ctx.registerRunTransform(fn) — sync rewrite of agent.run options\n- ctx.registerBehaviorTransform(fn) — sync rewrite of resolved behavior\n- ctx.registerProviderMiddleware(fn) — wrap provider instances\n- ctx.registerToolCatalogTransform(fn) — shape/hide/rename tools before disclosure/execution\n- ctx.registerMcpConfigTransform(fn) — rewrite MCP server configs before connect\n- ctx.registerSkillPolicy(policy) — auto-activate skills by run context\n- ctx.registerConfigCategory(category)\n- ctx.registerConfigItem([categoryId,] item) — typed setting; supports scope/onChange metadata\n- ctx.registerPaletteCommand(cmd) / ctx.registerPaletteProvider(p) — command palette entries (ids namespaced \\`<ext>/<id>\\`)\n- ctx.registerArtifactKind(reg) + ctx.artifacts.list({ scope?: 'session' | 'project' | 'all', kind? }) — give an artifact kind detection/rows/badges; read the artifact store\n- ctx.registerReferences(provider) — find refs in text (ticket ids, URLs) and paint them as badges\n- ctx.registerBadgeActions(reg) — right-click actions on badges\n- ctx.mcp — call the user's MCP tools outside runs; undefined unless permissions include 'mcp:call' and the host offers MCP\n- ctx.bus — private per-extension message channel across windows; undefined unless permissions include 'ipc'\n\nTUI-only (ctx.tui.* — silently ignored on non-TUI hosts):\n- ctx.tui.registerKeybinding(binding)\n- ctx.tui.registerFooterHint(hint)\n- ctx.tui.registerModal(modal) — keep UI lazy: \\`node: () => import('./panel')\\`\n- ctx.tui.registerArtifactRenderer(reg) — detail view for one artifact kind in the artifacts modal\n\nSide panels (both hosts):\n- ctx.registerPanel({ id, label, icon?, scope?, load, subscribe?, onAction? })\n — declarative tab in the TUI rail / GUI side panel; load gets\n { cwd, scope, sessionId?, focus? }. scope 'session' (default),\n 'project' or 'both' opts into showing without a session\n (ctx.gui.registerPanel is a deprecated alias)\n\nCompletion providers may also implement submit hooks:\n- resolveReferences(refs, ctx, signal)\n- onSubmit({ text, cursor, references }, signal)\nBoth TUI and GUI call these before dispatching a submitted prompt.\n\n## ToolDef shape\n\\`\\`\\`ts\nctx.registerTool('my_tool', {\n spec: { name: 'my_tool', description: '...', inputSchema: { type: 'object', properties: {} } },\n isConcurrencySafe: true, // default false (barrier/write); true = read-only, fans out in parallel\n async execute(args) { return 'result' },\n})\n\\`\\`\\`\n\n## Invariants\n- The folder name MUST equal \\`name\\`, or the loader rejects the extension.\n- Optional metadata lives in \\`extension.json\\` or \\`package.json#zidane\\`; unsupported \\`apiVersion\\` is rejected.\n- Export as \\`default\\` (or a named \\`extension\\` export).\n- Register ONLY inside \\`setup\\` — calls after it resolves are dropped (logger.warn).\n- A throw in \\`setup\\` is caught and shown on the extension's Settings row; the rest of boot continues.\n- Discovery order, first per name wins: project \\`.agents\\` → project \\`.zidane\\` → \\`~/.agents\\` → \\`~/.zidane\\`.\n- Project extensions load only once the user turns on \\`loadProjectExtensions\\` (Settings, \"Load project extensions\") or sets ZIDANE_TRUST_PROJECT_EXTENSIONS=1.\n- \\`/reload\\` is a TRUE hot-reload: re-discover + re-run setup, and each extension's module graph is re-imported fresh — code edits (deep imports included) apply live. Module-level state resets; clean up external resources in \\`teardown\\`, or the old version stays in memory.\n- The desktop app reloads on its own when a source file in a user/project extension folder is saved (~300 ms after the last write, after any in-flight run). Don't write the extension's own data as \\`.ts\\`/\\`.js\\` files in its folder.\n- On the desktop app (Node), extensions load through jiti: all TS/TSX works, but \\`import.meta.dirname\\`/\\`filename\\` are undefined — use \\`ctx.dir\\`. Only \\`zidane\\`, \\`zidane/providers\\`, \\`zidane/providers/google\\` and \\`zidane/oauth\\` are host-mapped there; other packages need the extension's own \\`node_modules\\`.\n\n## Distribution\n- Users install via Settings → Extensions → \\`ctrl+g\\` (source input + scope picker) — GitHub (\\`owner/repo[#ref][:sub/dir]\\`, tree URLs) or npm (\\`pkg[@version]\\`, exact versions / dist-tags).\n- Update / remove: Settings → Extensions, \\`ctrl+u\\` / \\`ctrl+x\\` on the focused row (update replays the recorded \\`.install.json\\` provenance in place, skipping when the recorded commit/version still matches the remote).\n- Shape your repo/package as a root \\`index.ts\\` (single extension) or \\`extensions/<name>/index.*\\` dirs (collection).\n- Reference packages to copy, in the zidane repo: \\`extensions/git-flow\\` (multi-file; \\`/commit\\`, \\`/review\\`, \\`/fix\\`, \\`/pr\\`, \\`/ticket\\` commands, type-only \\`zidane\\` imports) and \\`extensions/headroom\\` (hooks + tool + config).\n- Declare runtime deps in \\`package.json#dependencies\\` — installed with bun/npm/… WITHOUT lifecycle scripts; don't rely on postinstall.\n- The installed folder is named from your exported \\`definition.name\\` — pick it to be folder-safe ([A-Za-z0-9_.-]).`\n\n// ---------------------------------------------------------------------------\n// Edit-session presets — the first line of each inline skill's instructions.\n// Kept next to each other so the two flows stay phrased consistently.\n// ---------------------------------------------------------------------------\n\n/** Preset preamble for \"edit / create extension\" sessions. */\nconst EXTENSION_EDIT_PRESET\n = 'You are authoring / editing a zidane extension. Authoritative API reference:'\n\n/** Preset preamble for \"edit skill\" sessions — same spirit, skill-flavored. */\nfunction skillEditPreset(marker: SkillEditMarker): string {\n return `We are going to work on ${marker.name}, in ${marker.dir} directory, `\n + 'next messages will be requests at modifying and improving the skill or '\n + 'understanding how it works better.'\n}\n\n/**\n * The inline `zidane-extension` skill. Carries the authoring reference IN its\n * body ({@link EXTENSION_AUTHORING_CHEATSHEET}) so it works in every host —\n * incl. compiled binaries where the on-disk docs aren't resolvable. The shipped\n * `EXTENSIONS.md` (prose long-form) is appended as a \"see also\" only when found\n * on disk. `source: 'inline'` (the `defineSkill` default) survives the\n * project-trust gate.\n *\n * @param opts - Options. `cwd` is the directory used to locate the shipped docs. Defaults to `process.cwd()`.\n */\nexport function buildZidaneExtensionSkill(opts: { cwd?: string } = {}): SkillConfig {\n const docsDir = resolveExtensionDocsDir(opts.cwd)\n const seeAlso = docsDir\n ? `\\n\\n---\\nFull prose reference on disk: ${join(docsDir, 'EXTENSIONS.md')}\\n`\n + 'Sibling docs cover related surfaces (ARCHITECTURE.md, CHAT.md, TUI.md, SKILL.md, HEADLESS.md, …).'\n : '\\n\\n---\\nFuller prose reference, when present: node_modules/zidane/docs/EXTENSIONS.md '\n + '(often absent in compiled binaries — the API above is authoritative).'\n return defineSkill({\n name: ZIDANE_EXTENSION_SKILL_NAME,\n description:\n 'Authoring or editing a zidane extension (a module calling defineExtension, under '\n + '.zidane/extensions/** or .agents/extensions/**). Carries the extension authoring reference.',\n instructions: `${EXTENSION_EDIT_PRESET}\\n\\n${EXTENSION_AUTHORING_CHEATSHEET}${seeAlso}`,\n })\n}\n\n/**\n * Inject the `zidane-extension` skill into an already-merged {@link SkillsConfig}.\n *\n * Call this on the FINAL merged skills object (after folding extension / preset\n * skills): `composePresets` is last-wins on `catalog`, so injecting earlier\n * would be silently dropped whenever an extension also contributes skills.\n *\n * Adds the skill to the catalog and, when an `enabled` allowlist is in force,\n * force-includes the name so the allowlist filter can't hide it (mirrors how\n * extension-contributed skill names are force-included). When skills are fully\n * disabled (`enabled === false`), the edit session still gets just this skill.\n *\n * @param skills - Merged skills configuration to extend.\n * @param opts - Options. `cwd` is the directory used to locate the shipped docs. Defaults to `process.cwd()`.\n */\nexport function withZidaneExtensionSkill(skills: SkillsConfig, opts: { cwd?: string } = {}): SkillsConfig {\n return injectInlineSkill(skills, buildZidaneExtensionSkill(opts))\n}\n\n/**\n * Compact skill-authoring reference embedded into the skill-edit skill body.\n * Inline for the same reason as {@link EXTENSION_AUTHORING_CHEATSHEET}: works\n * in compiled binaries where on-disk docs don't resolve.\n */\nconst SKILL_AUTHORING_CHEATSHEET = `## SKILL.md anatomy\n\nA skill is a directory holding a \\`SKILL.md\\` (YAML frontmatter + markdown body)\nper the Agent Skills standard (agentskills.io/specification):\n\n\\`\\`\\`md\n---\nname: my-skill # 1-64 chars, lowercase alphanumeric + hyphens; SHOULD match the directory name\ndescription: what it does AND when to use it (drives activation — 1-1024 chars)\nlicense: MIT # optional\ncompatibility: … # optional environment requirements\nallowed-tools: # optional — restricts the agent to these tools while active\n - read_file\nmetadata: # optional flat string map; zidane-specific keys use the \\`zidane.\\` prefix\n some-key: value\n---\nThe body is the skill's instructions — injected into context when the skill\nis activated. Keep it token-lean: move depth into references/.\n\\`\\`\\`\n\n## Bundled resources (all optional, discovered automatically)\n- \\`references/\\` — docs loaded on demand via \\`skills_read\\`\n- \\`scripts/\\` — executables run via \\`skills_run_script\\` (honor shebangs)\n- \\`assets/\\` — templates / static files\n\n## Guidance\n- The description is the activation trigger — write it for the ROUTER (\"use when …\"), the body for the ACTIVATED agent.\n- Prefer small bodies + lazy references over one giant SKILL.md.\n- Shell interpolation (exclamation mark + backtick-quoted command) in the body runs at activation — use sparingly; hosts may gate or disable it.\n- Validate names: mismatched frontmatter name vs directory loads with a warning diagnostic.`\n\n/**\n * The inline skill auto-activated in \"edit skill\" sessions. Body = the\n * session preset (which skill, which directory, what the next messages will\n * be about) + a compact SKILL.md authoring reference — the skill-editing\n * counterpart of {@link buildZidaneExtensionSkill}.\n *\n * @param marker - Marker naming the skill's directory and name.\n * @param opts - Options. `cwd` is the directory used to locate the shipped docs. Defaults to `process.cwd()`.\n */\nexport function buildZidaneSkillEditSkill(marker: SkillEditMarker, opts: { cwd?: string } = {}): SkillConfig {\n const docsDir = resolveExtensionDocsDir(opts.cwd)\n const seeAlso = docsDir && existsSync(join(docsDir, 'SKILL.md'))\n ? `\\n\\n---\\nFull prose reference on disk: ${join(docsDir, 'SKILL.md')}`\n : ''\n return defineSkill({\n name: ZIDANE_SKILL_EDIT_SKILL_NAME,\n description:\n `Editing or improving the \"${marker.name}\" agent skill (its SKILL.md, references, `\n + 'scripts, and assets). Carries the skill-authoring reference for this edit session.',\n instructions: `${skillEditPreset(marker)}\\n\\n${SKILL_AUTHORING_CHEATSHEET}${seeAlso}`,\n })\n}\n\n/**\n * Inject the skill-edit preset skill into an already-merged {@link SkillsConfig}.\n * Same contract as {@link withZidaneExtensionSkill} — call on the FINAL merged\n * skills object.\n *\n * @param skills - Merged skills configuration to extend.\n * @param marker - Marker naming the skill's directory and name.\n * @param opts - Options. `cwd` is the directory used to locate the shipped docs. Defaults to `process.cwd()`.\n */\nexport function withZidaneSkillEditSkill(\n skills: SkillsConfig,\n marker: SkillEditMarker,\n opts: { cwd?: string } = {},\n): SkillsConfig {\n return injectInlineSkill(skills, buildZidaneSkillEditSkill(marker, opts))\n}\n\n/**\n * Shared injector: add `skill` to the catalog and, when an `enabled`\n * allowlist is in force, force-include its name so the filter can't hide it\n * (mirrors how extension-contributed skill names are force-included). When\n * skills are fully disabled (`enabled === false`), the edit session still\n * gets just this skill.\n */\nfunction injectInlineSkill(skills: SkillsConfig, skill: SkillConfig): SkillsConfig {\n const catalog = [...(skills.catalog ?? []), skill]\n const enabled = skills.enabled\n const nextEnabled: SkillsConfig['enabled']\n = enabled === undefined\n ? undefined\n : Array.isArray(enabled)\n ? (enabled.includes(skill.name) ? enabled : [...enabled, skill.name])\n : [skill.name]\n return {\n ...skills,\n catalog,\n ...(nextEnabled !== undefined ? { enabled: nextEnabled } : {}),\n }\n}\n","/**\n * Building blocks for hosts that freeze a conversation's system prompt (see\n * `AgentRunOptions.systemFreeze`): the out-of-band snapshot turn, lookup of\n * the newest snapshot for a prompt key, section digests, and the notes\n * announcing changes to the sections the SDK appends to every run's prompt\n * (skills catalog, searchable tools catalog, MCP server instructions).\n *\n * Which other sections a host tracks, and when it clears a snapshot, is the\n * host's policy.\n */\n\nimport type { FrozenPromptSections, SessionTurn, SystemNote, SystemPromptSnapshot } from './types'\nimport { createHash } from 'node:crypto'\n\n/** The newest snapshot for a prompt key, with its prompt text and the index of the turn holding it. */\nexport interface FrozenSystemPrompt {\n /** The frozen system prompt. */\n text: string\n /** The snapshot's bookkeeping. */\n snapshot: SystemPromptSnapshot\n /** Index of the snapshot turn in the session's turns. */\n index: number\n}\n\n/** A note announcing one changed section, with the text the model reads. */\nexport type SectionChangeNote = SystemNote & { text: string }\n\n/** The SDK-appended sections, in announcement order. */\nexport const FROZEN_PROMPT_SECTION_KINDS = ['skills', 'tools', 'mcp'] as const\n\n/**\n * Short stable digest of a section's text.\n *\n * @param text - Section text.\n */\nexport function sectionDigest(text: string): string {\n return createHash('sha256').update(text).digest('hex').slice(0, 16)\n}\n\n/**\n * Digest of every section present, by section kind.\n *\n * @param sections - Section texts by kind; `undefined` entries are skipped.\n */\nexport function sectionDigests(sections: Readonly<Record<string, string | undefined>>): Record<string, string> {\n const digests: Record<string, string> = {}\n for (const [kind, text] of Object.entries(sections)) {\n if (text !== undefined)\n digests[kind] = sectionDigest(text)\n }\n return digests\n}\n\n/**\n * The out-of-band `role: 'system'` turn recording a frozen prompt, or\n * clearing the one recorded for `key` (every key when omitted).\n *\n * @param input - Turn id and time, plus the prompt and its snapshot, or `cleared` with an optional key.\n */\nexport function systemSnapshotTurn(input: { id: string, createdAt: number } & ({ cleared: true, key?: string } | { system: string, snapshot: Omit<SystemPromptSnapshot, 'v' | 'cleared'> })): SessionTurn {\n if ('cleared' in input) {\n return {\n id: input.id,\n role: 'system',\n createdAt: input.createdAt,\n content: [],\n systemSnapshot: { v: 1, ...(input.key !== undefined ? { key: input.key } : {}), cleared: true, digests: {} },\n }\n }\n return {\n id: input.id,\n role: 'system',\n createdAt: input.createdAt,\n content: [{ type: 'text', text: input.system }],\n systemSnapshot: { v: 1, ...input.snapshot },\n }\n}\n\n/**\n * The newest frozen prompt recorded for `key`. A cleared snapshot for the\n * same key, or one with no key, ends the search with `undefined`; snapshots\n * for other keys are skipped.\n *\n * @param turns - Session turns, oldest first.\n * @param key - The prompt key the snapshot was recorded under; omitted matches keyless snapshots.\n */\nexport function latestSystemSnapshot(turns: readonly SessionTurn[], key?: string): FrozenSystemPrompt | undefined {\n for (let index = turns.length - 1; index >= 0; index--) {\n const turn = turns[index]!\n const snapshot = turn.systemSnapshot\n if (turn.role !== 'system' || !snapshot)\n continue\n if (snapshot.cleared) {\n if (snapshot.key === undefined || snapshot.key === key)\n return undefined\n continue\n }\n if (snapshot.key !== key)\n continue\n const block = turn.content.find(b => b.type === 'text')\n return block?.type === 'text' && block.text ? { text: block.text, snapshot, index } : undefined\n }\n return undefined\n}\n\n/**\n * Digest of a section as the model was last told it: the newest note of\n * `kind` carrying a digest after the snapshot, else the snapshot's digest.\n *\n * @param frozen - The frozen prompt.\n * @param turns - Session turns, oldest first.\n * @param kind - Section kind.\n */\nexport function announcedDigest(frozen: FrozenSystemPrompt, turns: readonly SessionTurn[], kind: string): string | undefined {\n for (let t = turns.length - 1; t > frozen.index; t--) {\n const content = turns[t]!.content\n for (let b = content.length - 1; b >= 0; b--) {\n const block = content[b]!\n if (block.type === 'text' && block.systemNote?.kind === kind && block.systemNote.digest !== undefined)\n return block.systemNote.digest\n }\n }\n return frozen.snapshot.digests[kind]\n}\n\n/**\n * Notes for each SDK-appended section whose live text differs from what the\n * model was last told (see {@link announcedDigest}). A section the model was\n * told about that is now absent is announced as emptied; tools changes list\n * the entries added and removed. Deterministic.\n *\n * @param input - The frozen prompt, the session turns and this run's sections.\n * @param input.frozen - The frozen prompt.\n * @param input.turns - Session turns, oldest first.\n * @param input.sections - The sections the SDK appended to this run's fresh prompt.\n */\nexport function catalogChangeNotes(input: { frozen: FrozenSystemPrompt, turns: readonly SessionTurn[], sections: FrozenPromptSections }): SectionChangeNote[] {\n const { frozen, turns, sections } = input\n const notes: SectionChangeNote[] = []\n for (const kind of FROZEN_PROMPT_SECTION_KINDS) {\n const text = sections[kind] ?? ''\n const digest = sectionDigest(text)\n const told = announcedDigest(frozen, turns, kind)\n if (told === digest || (told === undefined && text === ''))\n continue\n notes.push({ kind, digest, ...sectionNote(kind, text, frozen, turns) })\n }\n return notes\n}\n\nfunction sectionNote(kind: (typeof FROZEN_PROMPT_SECTION_KINDS)[number], text: string, frozen: FrozenSystemPrompt, turns: readonly SessionTurn[]): { label: string, text: string } {\n switch (kind) {\n case 'skills':\n return text\n ? { label: 'Skills catalog changed', text: `The skills catalog changed. It now reads:\\n\\n${text}` }\n : { label: 'No skills available', text: 'The skills catalog is now empty: no skills are available.' }\n case 'tools':\n return toolsNote(text, frozenToolsBlock(frozen.text), noteTexts(frozen, turns, 'tools'))\n case 'mcp':\n return text\n ? { label: 'MCP server instructions changed', text: `The MCP server instructions changed. They now read:\\n\\n${text}` }\n : { label: 'MCP server instructions removed', text: 'The MCP server instructions were removed. The ones given earlier no longer apply.' }\n }\n}\n\n/** Texts of the notes of `kind` after the snapshot, oldest first. */\nfunction noteTexts(frozen: FrozenSystemPrompt, turns: readonly SessionTurn[], kind: string): string[] {\n const texts: string[] = []\n for (const turn of turns.slice(frozen.index + 1)) {\n for (const block of turn.content) {\n if (block.type === 'text' && block.systemNote?.kind === kind)\n texts.push(block.text)\n }\n }\n return texts\n}\n\n/** The last `<searchable_tools>` block of a frozen prompt. */\nfunction frozenToolsBlock(system: string): string | undefined {\n const start = system.lastIndexOf('<searchable_tools>')\n const end = start < 0 ? -1 : system.indexOf('</searchable_tools>', start)\n return end < 0 ? undefined : system.slice(start, end + '</searchable_tools>'.length)\n}\n\n/** Tool names listed in a `<searchable_tools>` block, either catalog detail. */\nfunction catalogEntries(block: string | undefined): Set<string> {\n const names = new Set<string>()\n for (const match of (block ?? '').matchAll(/<tool name=\"([^\"]*)\">/g))\n names.add(match[1]!)\n for (const match of (block ?? '').matchAll(/<(?:server name=\"[^\"]*\"|tools)>([^<\\n]+)<\\/(?:server|tools)>/g)) {\n for (const name of match[1]!.split(', '))\n names.add(name)\n }\n return names\n}\n\nconst ADDED = 'Added: '\nconst REMOVED = 'Removed: '\n\n/** The catalog entries added and removed since the frozen catalog and the tools notes after it. */\nfunction toolsNote(text: string, frozen: string | undefined, history: readonly string[]): { label: string, text: string } {\n let told = catalogEntries(frozen)\n for (const note of history) {\n if (note.includes('<searchable_tools>')) {\n told = catalogEntries(note)\n continue\n }\n for (const line of note.split('\\n')) {\n if (line.startsWith(ADDED))\n line.slice(ADDED.length).split(', ').forEach(name => told.add(name))\n else if (line.startsWith(REMOVED))\n line.slice(REMOVED.length).split(', ').forEach(name => told.delete(name))\n }\n }\n const now = catalogEntries(text)\n const added = [...now].filter(name => !told.has(name))\n const removed = [...told].filter(name => !now.has(name))\n if (added.length + removed.length === 0)\n return { label: 'Searchable tools catalog changed', text: `The searchable tools catalog changed. It now reads:\\n\\n${text}` }\n return {\n label: `Searchable tools: +${added.length} / -${removed.length}`,\n text: [\n 'The searchable tools catalog changed.',\n ...(added.length > 0 ? [`${ADDED}${added.join(', ')}`] : []),\n ...(removed.length > 0 ? [`${REMOVED}${removed.join(', ')}`] : []),\n ].join('\\n'),\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAkCA,MAAa,8BAA8B;;AAG3C,MAAa,8BAA8B;;;;;;;AAQ3C,MAAa,0BAA0B;;AAGvC,MAAa,+BAA+B;;;;;;;;;;AAsC5C,SAAgB,oBAAoB,QAAoD;CACtF,OAAO,OAAO,SAAS,cACnB,GAAG,8BAA8B,EAAE,KAAK,OAAO,IAAI,EAAgC,IACnF,GAAG,0BAA0B;EAAE,KAAK,OAAO;EAAK,MAAM,OAAO;CAAK,EAA4B;AACpG;;;;;;;;AASA,SAAgB,oBAAoB,KAAsC;CACxE,IAAI,OAAO,QAAQ,YAAY,QAAQ,MACrC,OAAO;CACT,MAAM,EAAE,KAAK,SAAS;CACtB,IAAI,OAAO,QAAQ,YAAY,IAAI,WAAW,KAAK,OAAO,SAAS,YAAY,KAAK,WAAW,GAC7F,OAAO;CACT,OAAO;EAAE;EAAK;CAAK;AACrB;;;;;;;;;AAUA,SAAgB,kBAAkB,MAAsB;CACtD,OAAO;;;KAGJ,KAAK;;;;;yCAK+B,4BAA4B;;;;;WAK1D,KA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M,QAAQ,SAAS;EAC1B,IAAI,KAAK,SAAS,oBAAoB,GAAG;GACvC,OAAO,eAAe,IAAI;GAC1B;EACF;EACA,KAAK,MAAM,QAAQ,KAAK,MAAM,IAAI,GAChC,IAAI,KAAK,WAAW,KAAK,GACvB,KAAK,MAAM,CAAY,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,SAAQ,SAAQ,KAAK,IAAI,IAAI,CAAC;OAChE,IAAI,KAAK,WAAW,OAAO,GAC9B,KAAK,MAAM,CAAc,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,SAAQ,SAAQ,KAAK,OAAO,IAAI,CAAC;CAE9E;CACA,MAAM,MAAM,eAAe,IAAI;CAC/B,MAAM,QAAQ,CAAC,GAAG,GAAG,CAAC,CAAC,QAAO,SAAQ,CAAC,KAAK,IAAI,IAAI,CAAC;CACrD,MAAM,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,QAAO,SAAQ,CAAC,IAAI,IAAI,IAAI,CAAC;CACvD,IAAI,MAAM,SAAS,QAAQ,WAAW,GACpC,OAAO;EAAE,OAAO;EAAoC,MAAM,0DAA0D;CAAO;CAC7H,OAAO;EACL,OAAO,sBAAsB,MAAM,OAAO,MAAM,QAAQ;EACxD,MAAM;GACJ;GACA,GAAI,MAAM,SAAS,IAAI,CAAC,GAAG,QAAQ,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;GAC1D,GAAI,QAAQ,SAAS,IAAI,CAAC,GAAG,UAAU,QAAQ,KAAK,IAAI,GAAG,IAAI,CAAC;EAClE,CAAC,CAAC,KAAK,IAAI;CACb;AACF"}
|
|
@@ -2,7 +2,7 @@ import { i as readFileInputPaths } from "./format-bytes-LHrZVMIt.js";
|
|
|
2
2
|
import { n as looksBinary } from "./binary-detect-Dtj5NGns.js";
|
|
3
3
|
import { h as spawnStartParts, i as describeSpawnEnd, p as previewLine } from "./format-YgaIcuQ5.js";
|
|
4
4
|
import { o as panelShowsIn } from "./panels-B_DfAx68.js";
|
|
5
|
-
import { I as spawnLaneResolver, i as descriptionLabel } from "./transcript-reconcile-
|
|
5
|
+
import { I as spawnLaneResolver, i as descriptionLabel } from "./transcript-reconcile-DeFLIQ14.js";
|
|
6
6
|
import { y as computeLineDiff } from "./session-title-text-DHCNlzjb.js";
|
|
7
7
|
import { I as mayHaveStreamFailure, L as splitStreamFailure, ct as parseMachineKind } from "./mcp-allowlist-BQ5MvhHi.js";
|
|
8
8
|
import { n as LOCAL_HOST_KEY } from "./connection-BaHd3T-D.js";
|
|
@@ -2512,4 +2512,4 @@ function buildTodoRetryMessage(item) {
|
|
|
2512
2512
|
//#endregion
|
|
2513
2513
|
export { MACHINE_LINK_STATE_TEXT as $, openProactive as A, planAttachment as At, createPaletteRanker as B, TERMINAL_PANEL_ID as C, isExpandableProvider as Ct, cycleTab as D, MAX_FILE_ATTACHMENT_BYTES as Dt, closePanel as E, ATTACHMENT_SNIFF_BYTES as Et, togglePanel as F, HostRemovedError as Ft, normalizePaletteRunResult as G, groupPaletteRows as H, PALETTE_LIMITS as I, UnknownHostIdError as It, NOTICE_GLYPH as J, pushPaletteRecent as K, PALETTE_RECENTS_MAX as L, createHostIndex as Lt, pinTab as M, parseSessionKey as Mt, reorderTabs as N, sessionKey as Nt, moveTab as O, MAX_IMAGE_ATTACHMENT_BYTES as Ot, resolveActiveTab as P, AmbiguousHostIdError as Pt, validateMcpForm as Q, PALETTE_RECENT_GROUP as R, SIDE_PANEL_ID as S, indexOfProviderRow as St, buildPanelCatalog as T, selectableSources as Tt, isPaletteContext as U, fuzzyMatch as V, normalizePaletteItems as W, parseKeyValueLines as X, MCP_TRANSPORTS as Y, splitCommandLine as Z, DIFFS_PANEL_ID as _, messagePreview as _t, editTodo as a, machineWaiting as at, INITIAL_PANEL_STATE as b, toolPhrase as bt, EMPTY_RATE as c, buildVisibleInstructionRows as ct, streamRateValue as d, foldSummary as dt, MACHINE_NOTICE_LABEL as et, createRunStopMarker as f, foldsInCompactShape as ft, BUILTIN_PANEL_TABS as g, commandGist as gt, BROWSER_PANEL_ID as h, thoughtLabel as ht, cycleTodoStatus as i, machineDirListing as it, pickTab as j, SESSION_KEY_SEPARATOR as jt, openForAttention as k, SENDABLE_IMAGE_TYPES as kt, MAX_PLAUSIBLE_RATE as l, instructionOriginBadge as lt, ARTIFACTS_PANEL_ID as m, planFold as mt, buildTodoRetryMessage as n, lastSeenText as nt, nextTodoId as o, orderByMachine as ot, tidyPromptText as p, noteLabel as pt, rankPaletteItems as q, clearTodos as r, machineBlockedReason as rt, removeTodo as s, INSTRUCTION_PREVIEW_LINE_CAP as st, addTodo as t, environmentLabel as tt, stepStreamRate as u, instructionPreviewLines as ut, FILES_PANEL_ID as v, summarizeTools as vt, TODOS_PANEL_ID as w, parentProviderKey as wt, QUEUE_PANEL_ID as x, buildVisibleAuthRows as xt, INBOX_PANEL_ID as y, toolOverview as yt, PALETTE_RESULT_MAX as z };
|
|
2514
2514
|
|
|
2515
|
-
//# sourceMappingURL=todo-edits-
|
|
2515
|
+
//# sourceMappingURL=todo-edits-H77ROt6X.js.map
|