@zpi-dev/agent-sdk 0.0.0-stage → 0.1.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/NOTICE +1206 -0
  2. package/README.md +54 -2
  3. package/dist/chunk-GPIEWH3K.js +24368 -0
  4. package/dist/chunk-GPIEWH3K.js.map +1 -0
  5. package/dist/chunk-YPFTXFZL.js +29655 -0
  6. package/dist/chunk-YPFTXFZL.js.map +1 -0
  7. package/dist/host.d.ts +1 -0
  8. package/dist/host.js +32 -0
  9. package/dist/host.js.map +1 -0
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +23 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/src-GYA4LFM7.js +126 -0
  14. package/dist/src-GYA4LFM7.js.map +1 -0
  15. package/dist/types/agent/src/agent-loop.d.ts +3 -0
  16. package/dist/types/agent/src/agent.d.ts +21 -0
  17. package/dist/types/agent/src/index.d.ts +3 -0
  18. package/dist/types/agent/src/streaming-tool-coordinator.d.ts +10 -0
  19. package/dist/types/agent/src/tool-execution.d.ts +9 -0
  20. package/dist/types/agent/src/types.d.ts +144 -0
  21. package/dist/types/agent-sdk/src/hooks.d.ts +12 -0
  22. package/dist/types/agent-sdk/src/host.d.ts +4 -0
  23. package/dist/types/agent-sdk/src/index.d.ts +4 -0
  24. package/dist/types/agent-sdk/src/messages.d.ts +12 -0
  25. package/dist/types/agent-sdk/src/permissions.d.ts +10 -0
  26. package/dist/types/agent-sdk/src/query-result.d.ts +7 -0
  27. package/dist/types/agent-sdk/src/query.d.ts +6 -0
  28. package/dist/types/agent-sdk/src/resources.d.ts +16 -0
  29. package/dist/types/agent-sdk/src/runtime.d.ts +7 -0
  30. package/dist/types/agent-sdk/src/sessions.d.ts +48 -0
  31. package/dist/types/agent-sdk/src/tasks.d.ts +8 -0
  32. package/dist/types/agent-sdk/src/tools.d.ts +5 -0
  33. package/dist/types/agent-sdk/src/types.d.ts +428 -0
  34. package/dist/types/ai/src/api/anthropic-messages.d.ts +70 -0
  35. package/dist/types/ai/src/api/constrained-sampling.d.ts +5 -0
  36. package/dist/types/ai/src/api/github-copilot-headers.d.ts +7 -0
  37. package/dist/types/ai/src/api/openai-completions.d.ts +10 -0
  38. package/dist/types/ai/src/api/openai-responses.d.ts +5 -0
  39. package/dist/types/ai/src/api/responses-cache.d.ts +6 -0
  40. package/dist/types/ai/src/api/responses-events.d.ts +3 -0
  41. package/dist/types/ai/src/api/responses-session.d.ts +56 -0
  42. package/dist/types/ai/src/api/simple-options.d.ts +14 -0
  43. package/dist/types/ai/src/api/transform-messages.d.ts +3 -0
  44. package/dist/types/ai/src/auth/openai-chatgpt.d.ts +32 -0
  45. package/dist/types/ai/src/index.d.ts +20 -0
  46. package/dist/types/ai/src/providers/discovery.d.ts +14 -0
  47. package/dist/types/ai/src/providers/registry.d.ts +155 -0
  48. package/dist/types/ai/src/stream.d.ts +5 -0
  49. package/dist/types/ai/src/types.d.ts +395 -0
  50. package/dist/types/ai/src/utils/abort.d.ts +2 -0
  51. package/dist/types/ai/src/utils/context-breakdown.d.ts +3 -0
  52. package/dist/types/ai/src/utils/cost.d.ts +2 -0
  53. package/dist/types/ai/src/utils/diagnostics.d.ts +16 -0
  54. package/dist/types/ai/src/utils/error-body.d.ts +24 -0
  55. package/dist/types/ai/src/utils/estimate.d.ts +16 -0
  56. package/dist/types/ai/src/utils/event-stream.d.ts +15 -0
  57. package/dist/types/ai/src/utils/guard-model-stream.d.ts +3 -0
  58. package/dist/types/ai/src/utils/headers.d.ts +1 -0
  59. package/dist/types/ai/src/utils/json-parse.d.ts +7 -0
  60. package/dist/types/ai/src/utils/media-policy.d.ts +68 -0
  61. package/dist/types/ai/src/utils/model-performance.d.ts +23 -0
  62. package/dist/types/ai/src/utils/model-retry.d.ts +3 -0
  63. package/dist/types/ai/src/utils/option-map/compiler.d.ts +2 -0
  64. package/dist/types/ai/src/utils/option-map/evaluator.d.ts +3 -0
  65. package/dist/types/ai/src/utils/option-map/parser.d.ts +40 -0
  66. package/dist/types/ai/src/utils/option-map/tokenizer.d.ts +8 -0
  67. package/dist/types/ai/src/utils/option-map/types.d.ts +15 -0
  68. package/dist/types/ai/src/utils/overflow.d.ts +68 -0
  69. package/dist/types/ai/src/utils/provider-cache.d.ts +11 -0
  70. package/dist/types/ai/src/utils/provider-env.d.ts +2 -0
  71. package/dist/types/ai/src/utils/provider-retry.d.ts +17 -0
  72. package/dist/types/ai/src/utils/reasoning.d.ts +14 -0
  73. package/dist/types/ai/src/utils/redact-error.d.ts +2 -0
  74. package/dist/types/ai/src/utils/retry.d.ts +62 -0
  75. package/dist/types/ai/src/utils/sanitize-unicode.d.ts +21 -0
  76. package/dist/types/ai/src/utils/stream-idle-timeout.d.ts +36 -0
  77. package/dist/types/ai/src/utils/text.d.ts +5 -0
  78. package/dist/types/ai/src/utils/transcript.d.ts +28 -0
  79. package/dist/types/coding-agent/src/core/agent-session.d.ts +175 -0
  80. package/dist/types/coding-agent/src/core/commands.d.ts +19 -0
  81. package/dist/types/coding-agent/src/core/compaction-utils.d.ts +37 -0
  82. package/dist/types/coding-agent/src/core/compaction.d.ts +139 -0
  83. package/dist/types/coding-agent/src/core/dynamic-context.d.ts +3 -0
  84. package/dist/types/coding-agent/src/core/file-rewind.d.ts +24 -0
  85. package/dist/types/coding-agent/src/core/fs.d.ts +1 -0
  86. package/dist/types/coding-agent/src/core/http-idle-timeout.d.ts +2 -0
  87. package/dist/types/coding-agent/src/core/image-limits.d.ts +19 -0
  88. package/dist/types/coding-agent/src/core/images.d.ts +18 -0
  89. package/dist/types/coding-agent/src/core/input.d.ts +3 -0
  90. package/dist/types/coding-agent/src/core/markdown-code.d.ts +7 -0
  91. package/dist/types/coding-agent/src/core/markdown.d.ts +13 -0
  92. package/dist/types/coding-agent/src/core/mentions.d.ts +12 -0
  93. package/dist/types/coding-agent/src/core/microcompact.d.ts +40 -0
  94. package/dist/types/coding-agent/src/core/model-performance.d.ts +57 -0
  95. package/dist/types/coding-agent/src/core/model-runtime.d.ts +51 -0
  96. package/dist/types/coding-agent/src/core/read-file-bounded.d.ts +2 -0
  97. package/dist/types/coding-agent/src/core/record-validation.d.ts +6 -0
  98. package/dist/types/coding-agent/src/core/resources.d.ts +51 -0
  99. package/dist/types/coding-agent/src/core/sdk.d.ts +48 -0
  100. package/dist/types/coding-agent/src/core/session-manager.d.ts +138 -0
  101. package/dist/types/coding-agent/src/core/session-state.d.ts +14 -0
  102. package/dist/types/coding-agent/src/core/settings-manager.d.ts +41 -0
  103. package/dist/types/coding-agent/src/core/streaming-tool-journal.d.ts +17 -0
  104. package/dist/types/coding-agent/src/core/system-prompt.d.ts +32 -0
  105. package/dist/types/coding-agent/src/core/tools/file-change.d.ts +21 -0
  106. package/dist/types/coding-agent/src/core/tools/index.d.ts +20 -0
  107. package/dist/types/coding-agent/src/core/tools/pi/bash.d.ts +185 -0
  108. package/dist/types/coding-agent/src/core/tools/pi/edit-diff.d.ts +84 -0
  109. package/dist/types/coding-agent/src/core/tools/pi/edit.d.ts +69 -0
  110. package/dist/types/coding-agent/src/core/tools/pi/file-mutation-queue.d.ts +5 -0
  111. package/dist/types/coding-agent/src/core/tools/pi/file-read-state.d.ts +12 -0
  112. package/dist/types/coding-agent/src/core/tools/pi/output-accumulator.d.ts +68 -0
  113. package/dist/types/coding-agent/src/core/tools/pi/path-utils.d.ts +7 -0
  114. package/dist/types/coding-agent/src/core/tools/pi/read.d.ts +63 -0
  115. package/dist/types/coding-agent/src/core/tools/pi/text-range-reader.d.ts +22 -0
  116. package/dist/types/coding-agent/src/core/tools/pi/tool-definition-wrapper.d.ts +4 -0
  117. package/dist/types/coding-agent/src/core/tools/pi/truncate.d.ts +60 -0
  118. package/dist/types/coding-agent/src/core/tools/pi/utils/bmp-source.d.ts +2 -0
  119. package/dist/types/coding-agent/src/core/tools/pi/utils/child-process.d.ts +13 -0
  120. package/dist/types/coding-agent/src/core/tools/pi/utils/image-budget.d.ts +16 -0
  121. package/dist/types/coding-agent/src/core/tools/pi/utils/image-process.d.ts +18 -0
  122. package/dist/types/coding-agent/src/core/tools/pi/utils/image-resize-core.d.ts +26 -0
  123. package/dist/types/coding-agent/src/core/tools/pi/utils/image-resize.d.ts +3 -0
  124. package/dist/types/coding-agent/src/core/tools/pi/utils/image-source.d.ts +11 -0
  125. package/dist/types/coding-agent/src/core/tools/pi/utils/mime.d.ts +3 -0
  126. package/dist/types/coding-agent/src/core/tools/pi/utils/paths.d.ts +16 -0
  127. package/dist/types/coding-agent/src/core/tools/pi/utils/read-file.d.ts +2 -0
  128. package/dist/types/coding-agent/src/core/tools/pi/utils/shell.d.ts +18 -0
  129. package/dist/types/coding-agent/src/core/tools/pi/utils/text.d.ts +5 -0
  130. package/dist/types/coding-agent/src/core/tools/pi/write.d.ts +44 -0
  131. package/dist/types/coding-agent/src/core/transcript-store.d.ts +71 -0
  132. package/dist/types/coding-agent/src/core/types.d.ts +60 -0
  133. package/dist/types/coding-agent/src/index.d.ts +42 -0
  134. package/dist/types/coding-agent/src/plugins/assembly.d.ts +36 -0
  135. package/dist/types/coding-agent/src/plugins/hooks.d.ts +82 -0
  136. package/dist/types/coding-agent/src/plugins/resources.d.ts +4 -0
  137. package/dist/types/coding-agent/src/plugins/session-hooks.d.ts +26 -0
  138. package/dist/types/coding-agent/src/plugins/types.d.ts +41 -0
  139. package/dist/types/plugin-compat/src/command-hooks.d.ts +184 -0
  140. package/dist/types/plugin-compat/src/index.d.ts +11 -0
  141. package/package.json +53 -4
package/NOTICE ADDED
@@ -0,0 +1,1206 @@
1
+ # ZCode file manager and draft workspaces
2
+
3
+ The review pane in `packages/desktop/src/renderer/ReviewPane.tsx`, `review-pane.css`, and the virtual review file list adapt ZCode commit `3c5b227649371507ddc4eb46ac5133afe6db1cab`: `GitPane.tsx`, `GitPaneChangeCard.tsx`, `components/ui/select.tsx`, and Chinese Git review labels. Code preview preferences in `packages/ui/src/code-preview.ts` adapt its `lib/codePreviewSettings.ts` and `lib/codePreviewPreferences.ts`. Git source comparisons follow its `services/src/git/repo/gitCliRepo.ts`. Apache-2.0 applies. ZPI reuses its own IPC and persisted turn snapshots.
4
+
5
+ The tab overview, search ranking, recently closed tabs, tab context menus and full-view conversation host in `packages/desktop/src/renderer/{PaneTabOverview,PaneFullViewControls,RightPane}.tsx`, `pane-full-view.ts`, `pane-tabs.css` and `pane-store.ts` adapt that revision's `app-shell/{SidePaneTabOverview,sidePaneTabSearch,AnimatedSidePanePanel}` and `side-pane-full-view/{ConversationHost,ConversationTab,ToggleButton,model}`. Modified to retain ZPI's existing task ownership, composer and conversation instances, native guest lifecycle, shortcuts and preference storage. Existing Lucide artwork is reused; no additional assets or dependencies are bundled. Apache-2.0 applies.
6
+
7
+ The full-content review renderer, highlighter worker setup, preview fallback rules, lightweight layout, and Git watch debounce in `packages/ui/src/components/ReviewDiffViewer.tsx`, `packages/ui/src/review-diff.ts`, `packages/ui/src/patch-preview.ts`, `packages/desktop/src/renderer/DiffsWorkerPool.tsx`, and the review pane follow the same ZCode revision's `components/ui/diff-viewer.tsx`, `components/ui/lightweight-diff-preview.tsx`, `GitPane/helpers.ts`, `lib/patchDiffPreview.ts`, `root/DiffsWorkerPoolProvider.tsx`, and `hooks/useGitAutoRefresh.ts`. The review's virtual file list now lives in the desktop review pane; generic chat Diff rendering remains separate. Existing Material SVG and Lucide attribution applies.
8
+
9
+ The file launcher, file-manager split layout, directory row styling, lazy loading, compact folders, Git decorations, virtualized rows, sticky folders, watcher lifecycle and refresh request guards in `packages/desktop/src/renderer/{PaneLauncher,FileManagerPane}.tsx`, `workspace-file-tree/`, related pane state and styles adapt ZCode commit `3c5b227649371507ddc4eb46ac5133afe6db1cab`: `packages/ui/src/WorkspaceFileTree.tsx`, `workspace-file-tree/`, `plugin-ui/components/PluginUiLauncherItems.tsx`, `app-shell/{AnimatedSidePanePanel,animatedSidePanePanelModel}` and `lib/workspaceSidePane.ts`. Draft workspace allocation follows `packages/services/src/project/index.ts`. Adapted to ZPI's local session IDs, existing previews and mention index, `.zpi/workspace` storage, and Electron preload IPC; remote projects, additional roots and plugins are excluded. Compacted expanded directories additionally hold a watch on their represented leaf directory. The existing Material icons and Lucide artwork are reused. The desktop uses the same `react-resizable-panels` 4.10.0 layout primitives (MIT). Apache-2.0 and the existing Lucide licenses below apply.
10
+
11
+ Ordinary chat file previews and single-file diffs use that same file-manager container, following ZCode's `app-shell/AnimatedSidePanePanel.tsx`, `WorkspaceFileTree.tsx`, `PreviewPane.tsx` and `lib/workspaceSidePane.ts`. The shared toolbar, workspace navigation preferences, in-tab source replacement, source reopening and editor preference snapshot follow those implementations. The file-tree menu uses ZCode's Lucide `FolderOpen` artwork rather than an operating-system Finder image; existing conversation-menu Finder artwork remains the attributed ZCode asset.
12
+
13
+ ## react-resizable-panels 4.10.0
14
+
15
+ The MIT License (MIT)
16
+
17
+ Copyright (c) 2018 Brian Vaughn
18
+
19
+ Permission is hereby granted, free of charge, to any person obtaining a copy
20
+ of this software and associated documentation files (the "Software"), to deal
21
+ in the Software without restriction, including without limitation the rights
22
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23
+ copies of the Software, and to permit persons to whom the Software is
24
+ furnished to do so, subject to the following conditions:
25
+
26
+ The above copyright notice and this permission notice shall be included in all
27
+ copies or substantial portions of the Software.
28
+
29
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
+ SOFTWARE.
36
+
37
+ # Codex memory pipeline reference
38
+
39
+ The two-stage memory design and adapted evidence, consolidation and retrieval instructions in `packages/builtin-plugins/src/memory/` reference OpenAI Codex commit `2839ed763bd3f404398e1f0c95bf4e2d172213c0`, specifically `codex-rs/memories/write`, `codex-rs/state/src/runtime/memories.rs` and `codex-rs/ext/memories`. Copyright OpenAI. Apache-2.0 (the license is reproduced below). Modified for ZPI's existing file tools, desktop owners, SQLite state and configurable models: no skills generation, telemetry, vendor-specific selection, Codex rollout parser, or version dual-write. ZPI now uses the Codex v2 summary/rollout contract, adapts the v2 extraction and consolidation templates, and uses a fixed Git-baseline workspace with a multi-turn SDK worker. The ad-hoc note instructions are copied from `codex-rs/memories/write/templates/extensions/ad_hoc/instructions.md`; note creation and consolidation follow `codex-rs/ext/memories/templates/memories/read_path_v2.md` and the memory extension prompt blocks. ZPI adds summary rollback protection and keeps its own source-cutoff semantics. See `docs/internals/memory.md` for the reference/default distinction and implementation differences.
40
+
41
+ # Codex subagent delegation prompt
42
+
43
+ The opt-in delegation instructions in `packages/builtin-plugins/src/collaboration/prompts.ts` adapt the default spawn-agent description in OpenAI Codex commit `2839ed763bd3f404398e1f0c95bf4e2d172213c0`, `codex-rs/core/src/tools/handlers/multi_agents_spec.rs`. Copyright OpenAI. Apache-2.0 (the license is reproduced below). Adapted for ZPI's Agent/subagent_type schema, system-reminder type catalog, run_in_background notifications, SendMessage and TaskOutput tools, shared workspace, and .zpi/agents configuration. The original ZPI prompt remains the default.
44
+
45
+ # ZCode image request pipeline
46
+
47
+ The image budgets, compression candidate sequence and WebP passthrough in `packages/coding-agent/src/core/tools/pi/utils`, request media projection and compact error predicates in `packages/ai/src/utils`, cache breakpoints and text-only microcompact follow ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`, `apps/zcode-cli/packages/{contracts/src/tools/read.ts,adapters/src/image,core/src/runtime/helpers/media-budget.ts,core/src/compact/microcompact.ts}`. Adapted to ZPI's transcript and provider interfaces under the Apache-2.0 license reproduced below. Historical media selection deliberately uses `break` instead of the upstream `continue`. Image processing uses Sharp with the existing guarded BMP decoder; compression candidate order and budgets are retained, but encoded bytes may differ from the upstream encoders. Read's WebP passthrough intentionally performs budget checks without decoding.
48
+
49
+ # ZCode custom commands
50
+
51
+ Custom-command settings, forms, explicit import dialog, slash grouping/search/keyboard/chips and template expansion in `packages/desktop/src/{main,renderer,shared}/*command*`, `packages/ui/src/components/{Conversation,MentionEditor,Reference,command-suggestions}.tsx/ts` and related styles adapt ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`: `packages/ui/src/settings/{CommandsSection,CommandCard,CommandForm,ExternalAgentImportDialog,SettingsResourceHeaderActions,SettingsResourceGroup}.tsx`, `SlashCommandPlugin.tsx`, `slashCommandPanelSections.tsx`, `mentions/components/MentionPanel.tsx`, `lib/{promptInputTriggers,slashApplyMentionPayload}.ts`, `packages/services/src/{commands,settings-sync}` and `apps/zcode-cli/packages/{bootstrap,contracts}/src/custom-command*`. Modified for ZPI's existing local IPC, user/project `.zpi/commands` roots, session ownership, enabled skill loader and Bash process backend. Explicitly registered import links preserve source-edit semantics with a displayed source confirmation; atomic publication, path validation, bounded scans and conflict checks harden the reference behavior. Apache-2.0 and the existing Lucide licenses reproduced below apply. No new artwork or dependency is bundled.
52
+
53
+ # ZCode file and change previews
54
+
55
+ Single-file change-summary preview scoping and tab source identity in `ChangesPane.tsx` and `pane-store.ts` follow ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`, `MessageChangeSummaryPanel.tsx`, `messageChangeSummaryPreview.ts`, `previewPaneContent.tsx`, and `lib/workspaceSidePane.ts`. Adapted to ZPI's session/run/tool-operation identities and existing aggregate changes entry point; existing preview layout, Lucide icons and Material assets are reused. Apache-2.0 applies.
56
+
57
+ The breadcrumb toolbar, overflow menu, Markdown/SVG view controls, text line-comment interaction, comment cards, Diff tab badge, lightweight addition/deletion colors, image checkerboard/Retina sizing and media layout in `packages/desktop/src/renderer/{PreviewHeader,FilePane,FileCommentEditor,RightPane}.tsx`, `file-comments.ts`, `file-gutter.ts`, `preview-breadcrumb.ts`, `workbench.css`, and `packages/ui/src/components/DiffView.tsx` adapt ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`: `packages/ui/src/{PreviewPane,previewPaneImageContent,previewPaneMediaContent,previewPaneMarkdownContent}.tsx`, `components/ui/{code-viewer,diff-viewer,lightweight-diff-preview}.tsx` and `app-shell/SidePaneTabTrigger.tsx`. Modified to reuse ZPI's existing composer selection attachments, task ownership, file actions, search and Electron IPC; file comments remain draft context and do not modify files or submit a model request. Apache-2.0 and the Lucide licenses reproduced below apply.
58
+
59
+ Preferred-editor discovery, launch commands, workspace split button and preference handling in `packages/desktop/src/main/{editor-definitions,editors}.ts` and `packages/desktop/src/renderer/{PreviewEditorButton,WorkspaceEditorButton}.tsx`, `editor-preference*.ts` adapt that revision's `packages/desktop/src/main/{editors,openInEditor}.ts` and `packages/ui/src/{WorkspaceEditorButtonGroup.tsx,lib/openWithEditors.ts,lib/editorPreference.ts}`. Modified for ZPI's validated local IPC, existing session roots and isolated test services. Editor icons are obtained from the installed host applications; no new editor artwork is bundled. Apache-2.0 applies.
60
+
61
+ Office/PDF rendering in `packages/desktop/src/renderer/{OfficePreview,DocxPreview,LegacyDocPreview,PdfPreview}.tsx`, `{office-preview-model,pdf-zoom,pdf-assets}.ts` adapts the same ZCode revision's `previewPaneOffice{Docx,LegacyDoc,Xlsx}Content.tsx`, `components/ui/{pdf-viewer,usePdfZoomOverlay}.tsx`, and `lib/{officeFilePreview,pdfJsAssets}.ts`. Modified for ZPI's local buffers, bounded PDF range IPC, safe links, application tokens and isolated tests. Apache-2.0 applies.
62
+
63
+ The PPTX PDF export host in `packages/desktop/src/main/preview-pdf-export.ts` adapts ZCode `desktopPrintToPdf.ts` (CSS page size, background, zero margins, per-window concurrency) and `desktopSaveFile.ts` (explicit save dialog). Modified to accept only PDF bytes just generated by that renderer window, with a 50 MiB limit; no general download or arbitrary file-write interface is imported. Apache-2.0 applies.
64
+
65
+ New preview runtime dependencies: `@extend-ai/react-docx` 0.8.1 and `react-pdf` 10.4.1 (MIT); `pdfjs-dist` 5.4.296 and `@aiden0z/pptx-renderer` 1.2.4 (Apache-2.0). PDF.js worker/CMap/standard-font resources remain local and retain their upstream licenses. Existing `docx-preview` 0.4.0 and `@extend-ai/react-xlsx` 0.16.0 are unchanged.
66
+
67
+ PPTX preview in `packages/desktop/src/renderer/PptxPreview.tsx`, `PptxPreview.css`, and `presentation/{types,controls,element-model,pptx-engine,print-export}.ts` adapts the same ZCode revision's presentation preview controls, element model, renderer engine and print-export pipeline. `presentation/{export,reference}.ts` integrates these with ZPI's draft context and bounded host IPC. The test fixture `packages/desktop/test/fixtures/presentation-preview.pptx` comes from the reference's `sample.pptx`, under the same Apache-2.0 license. Preview language inference in `packages/ui/src/code-language.ts` adapts `packages/ui/src/lib/codeViewer.ts`. Test-only XML parsing uses `@xmldom/xmldom` 0.8.15 (MIT).
68
+
69
+ # ZCode shortcut settings
70
+
71
+ The four-column layout, compact keycaps, search/recording controls and reset confirmation in `packages/desktop/src/renderer/ShortcutSettings.tsx`, `shortcut-settings-model.ts` and `workbench.css` adapt ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`, `packages/ui/src/settings/{ShortcutSettingsSection,ShortcutBindingRow,ShortcutSearchBar,useShortcutKeySearch,useShortcutRecording}.tsx/ts`, `SettingsPage.tsx` and `components/ui/{kbd,input,button}.tsx`. ZPI retains its own single-binding commands, explicit save, master switch and registration transaction. The Apache-2.0 and Lucide licenses reproduced below apply.
72
+
73
+ # ZCode task search
74
+
75
+ The sidebar search entry, top-positioned Command Center, scope tabs/prefixes, keyboard navigation, result rows, snippets, highlights and workspace search history in `packages/desktop/src/renderer/{TaskSearchDialog,HighlightedMatchText}.tsx`, `task-search-{model,history,icons}.ts`, and `workbench.css` follow ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`, `packages/ui/src/{WorkspaceSidebar.tsx,command-center/{CommandCenterDialog,commandCenterSearchHistory}.ts*,quickpick/{quickPickStyles,HighlightedMatchText}.ts*,components/ui/command.tsx}`. The bounded 200000-character text index and four 20/72-character context snippets adapt `packages/services/src/session/taskIndexRepo.ts`. Adapted to ZPI's JSONL history index and Electron IPC. The original Lucide and Material Icon Theme assets are reused; no new bitmap artwork or remote services are imported. Apache-2.0 and the icon licenses reproduced below apply.
76
+
77
+ # ZCode subagent plugin
78
+
79
+ The background result title, subtle divider and always-visible work layout in `packages/ui/src/components/Conversation.tsx` and `packages/ui/src/styles.css` follow `packages/ui/src/v4/ConversationTurnGroup.tsx` at ZCode commit `3c5b227649371507ddc4eb46ac5133afe6db1cab`. Adapted to ZPI's existing run projection, tools and error display; background result turns omit the ordinary work-duration fold. Apache-2.0 applies.
80
+
81
+ The task status UI directly adapts `v4/ConversationStatusPanel.tsx`, `v4/conversationLayout.ts`, `BackgroundTaskElapsedLabel.tsx`, `components/ui/{button,collapsible,dropdown-menu}.tsx` and `i18n/locales/zh-CN.ts` at ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`: content-sized capsule, hover icon swap, independently collapsible terminal/agent sections, elapsed labels, inline Stop, automatic 1280px container layout, and matching spacing, colors, shadows and Lucide assets. Completed-command history remains a ZPI extension; task execution uses the existing Electron IPC.
82
+
83
+ TaskOutput's bounded wait/result contract, the coordinator response tool's independence from profile allowlists, task output/stop summaries, and the floating status panel placement also follow ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f`: `apps/zcode-cli/packages/contracts/src/tools/task-output.ts`, `apps/zcode-cli/packages/core/src/{tool/handlers/task-output.ts,runtime/methods/subagent.ts}`, and `packages/ui/src/{ToolCallBlocks/renderers/{task-output,task-stop}.tsx,v4/ConversationStatusPanel.tsx}`. ZPI uses event-driven waits and its existing local subagent records.
84
+
85
+ The built-in background command implementation in `packages/builtin-plugins/src/background/{tasks,processes}.ts` and combined `TaskActivity`/`BackgroundTaskPane` follow that same ZCode revision's `apps/zcode-cli/packages/core/src/tool/{bash-timeout-policy.ts,handlers/{bash,task-output-bash,task-stop}.ts}`, `runtime/helpers/runtime-tools.ts`, and `apps/zcode-cli/packages/adapters/src/exec/{node-execution-adapter-lifecycle,process-tree,execution-utils}.ts`: explicit/timeout background handoff, detachment from foreground cancellation, merged disk output, bounded output retrieval, process-tree termination, and child command lifetime limits. Adapted to local Electron IPC and ZPI session persistence; no remote-task runtime or telemetry is imported.
86
+
87
+ The built-in general-purpose and Explore prompts and descriptions, Agent and SendMessage contracts, profile scopes and model inheritance, single-row Agent summaries, grouped settings rows, Bot icons and color palette, and read-only child session tabs in `packages/builtin-plugins/src/collaboration`, `packages/desktop/src/renderer/{SubagentSettings,SubagentPane}.tsx`, and `packages/ui/src/components/SubagentToolBlock.tsx` follow the local ZCode reference: `apps/zcode-cli/packages/core/src/subagent/{general-purpose,explore,profile}.ts`, `packages/contracts/src/tools/{agent,send-message}.ts`, and `packages/ui/src/{settings/SubagentsSection.tsx,ToolCallBlocks/renderers/agent.tsx,lib/subagentColors.ts,app-shell/SubagentSessionSidePane.tsx}`. Adapted to ZPI's existing custom-tool and Electron IPC boundaries under the Apache-2.0 license reproduced below. The original uses Lucide Bot and CSS identity colors; no additional bitmap artwork is used. The four-tool coding core remains independent of the built-in collaboration plugin. Follow-up corrections at ZCode commit `aac4755666d09fdcd70272fcf063c077a639015f` also adapt `settings/{PluginScopeMenu,SettingsResourceHeaderActions,PluginInstallEmptyState,SettingsSearchInput}.tsx`, `v4/{ConversationHeader,ConversationStatusPanel}.tsx`, `app-shell/SubagentDirectorySidePane.tsx`, `ToolCallBlocks/renderers/{send-message,respond-to-coordinator}.tsx`, the shared Markdown model-selection codec, and the subagent runtime refresh/RespondToCoordinator contracts. Generic SDK steering supplies the completed model/tool boundary; subagent routing is owned by the built-in collaboration plugin.
88
+
89
+ # ZCode conversation interaction refinements
90
+
91
+ The 120px user-message collapse, fade and expand/collapse button in packages/ui/src/components/UserMessageBody.tsx and styles.css follow ZCode packages/ui/src/v4/ConversationUserInputBody.tsx. Auxiliary chat numbering follows lib/workspaceSidePane.ts; task interaction capture follows v4/WorkbenchPane.tsx; pending write previews follow ToolCallBlocks/renderers/edit.tsx and its parameter/change snapshots. Adapted to ZPI's existing React components and Electron interfaces under the Apache-2.0 license reproduced below.
92
+
93
+ # ZCode model stream idle recovery
94
+
95
+ The event-iterator watchdog, 600-second default, 30-second retry increments, linked attempt cancellation, timeout error identity, and one-second bounded iterator cleanup in `packages/ai/src/utils/{stream-idle-timeout,guard-model-stream}.ts` follow ZCode commit `872ad960de7ec172591f7e1952f7849229f94521`, `apps/zcode-cli/packages/adapters/src/model/{stream-idle-timeout,runner-stream}.ts` and `packages/contracts/src/config/index.ts`. The ten-retry recovery default follows `packages/core/src/runtime/methods/streaming-recovery.ts`. Adapted to ZPI's native model event streams, existing safe tool-result recovery, JSONL error records and retry UI; no telemetry or orchestration is imported. Explicit Pi HTTP timeout overrides remain available, while model-event idle detection is now the default. The Apache-2.0 license reproduced below applies.
96
+
97
+ # ZCode questions and side conversations
98
+
99
+ AskUserQuestion's schema, choice card layout, keyboard navigation, answer/skip semantics, and selection side-chat context boundary in packages/desktop/src/{main,renderer} follow ZCode's contracts/tools/ask-user-question.ts, ElicitationDialog.tsx, v4/SessionPane.tsx, and runtime/methods/session-fork.ts. Adapted to ZPI's existing custom-tool, session and Electron IPC interfaces under the Apache-2.0 license reproduced below.
100
+
101
+ # ZCode streaming tool parameter previews
102
+
103
+ The partial JSON string decoding and empty-input visibility in packages/ui/src/components/tool-input-preview.ts follow ZCode commit 872ad960de7ec172591f7e1952f7849229f94521, packages/shared/src/streaming-tool-input-preview.ts and packages/ui/src/v4/toolCallRowAdapter.ts. The write content-versus-Parameters switch and preview surfaces follow ToolCallBody.tsx, lib/toolDisplay.ts and components/ai-elements/tool.tsx. Adapted to ZPI's Pi argument fields and existing Markdown/code/diff components under the Apache-2.0 license reproduced below. No new artwork is included.
104
+
105
+ # ZCode visual interactions
106
+
107
+ Workspace sidebar spacing, input drag feedback, menu/dialog surfaces and motion, side-pane toggle animation and content width locking, and live tool entrances in packages/desktop/src/renderer and packages/ui/src follow ZCode packages/ui/src/{WorkspaceSidebar,ToolCallBlocks}.tsx, app-shell/{useAnimatedResizablePanel.ts,AnimatedSidePanePanel.tsx}, prompt-editor/ChatPromptEditor.tsx, components/ui/{button,dialog,dropdown-menu,popover}.tsx and styles.css. Adapted to ZPI’s four-tool interface and existing React/Radix components under the Apache-2.0 license reproduced below. No new artwork is included.
108
+
109
+ # Model protocol selector
110
+
111
+ The model connection form layout, protocol labels, field spacing, input/select sizing, credential visibility control and empty model state in packages/desktop/src/renderer/{SettingsPage,ProviderApiFormatSelect}.tsx and workbench.css follow ZCode packages/ui/src/settings/model-provider-section/{InlineEditableProviderCard,ProviderApiFormatSelect,ProviderCardSections,ApiKeyInput}.tsx and components/ui/{input,select}.tsx, under the Apache-2.0 license already reproduced below. Existing ZPI provider logos and Lucide icons remain in use.
112
+
113
+ # ChatGPT provider icon
114
+
115
+ The ChatGPT provider image in packages/desktop/src/renderer/assets/providers/chatgpt.png is the user-supplied OpenAI ChatGPT application icon, provided through icon-chatgpt.png. The ChatGPT name and icon belong to OpenAI; the asset is used to identify the provider.
116
+
117
+ # Pi implementation
118
+
119
+ Anthropic Messages transport in packages/ai/src/api/anthropic-messages.ts and its JSON repair, Unicode, thinking-budget, cost, strict-schema and transcript helpers are adapted from Pi commit cd34e17ff039502f3664d8363b3c0a23f93a2ca3. The corresponding SSE, eager-tool-input, managed-effort and cache-cost regression tests use the same reference. Adaptations connect ZPI's event, reasoning-editor, usage and retry interfaces; no telemetry or orchestration modules are included. The MIT license below applies.
120
+
121
+ Parallel tool scheduling and ordered preparation in packages/agent/src/{agent-loop,tool-execution}.ts follow Pi commit cd34e17ff039502f3664d8363b3c0a23f93a2ca3, packages/agent/src/agent-loop.ts. Adapted to ZPI's transcript and event interfaces. The MIT license below applies.
122
+
123
+ The system prompt and adapted tool modules in packages/coding-agent/src/core/tools/pi originate from Pi commit c20cb09772bf4e2590a316cb54514cef76df4293.
124
+
125
+ Assistant history replay rules in packages/ai/src/api/openai-completions.ts also follow that Pi commit's src/api/transform-messages.ts and src/api/openai-completions.ts: exclude errored/aborted and empty assistant messages from requests, convert non-redacted thinking to text across models, and preserve valid tool calls/results. Adapted to ZPI's existing supported Chat Completions fields; stored history is unchanged.
126
+
127
+ The provider model data in packages/ai/src/providers/catalog.json are selected from the same Pi commit, src/providers/data/{deepseek,zai,zai-coding-cn,minimax-cn,xiaomi,xiaomi-token-plan-cn}.json. Cost and unrelated transport fields are omitted; thinking compatibility is adapted to ZPI's existing OpenAI transport. MiniMax OpenAI thinking toggles and reasoning_split are based on the official CN OpenAI SDK documentation; fixed-depth models expose only their default enabled level.
128
+
129
+ GPT-6.1 Sol, GPT-6 Astra and GPT-6 Luna capability presets use the current OpenAI model documentation and the reference Pi OpenAI catalog. ChatGPT context limits are taken from account discovery when present; presets use Pi's conservative 272K plan context. Preset capabilities do not establish account availability.
130
+
131
+ ChatGPT OAuth in packages/ai/src/auth/openai-chatgpt.ts and Responses history conversion in packages/ai/src/api/{openai-responses,transform-messages}.ts are adapted from the reference Pi implementation in src/auth/oauth/openai-chatgpt.ts and src/api/{openai-responses-shared,transform-messages}.ts, with OIDC validation and the current public ChatGPT plan API requirements.
132
+
133
+ Context estimation, compaction preparation/cuts/prompts, summary budgets and file tracking in packages/coding-agent/src/core/{compaction,compaction-utils}.ts, assistant retry and overflow detection in packages/ai/src/utils/{retry,overflow,error-body}.ts, and the settings/default-thinking/history/automatic-compaction lifecycle follow Pi commit cd34e17ff039502f3664d8363b3c0a23f93a2ca3. Adapted to ZPI's four-tool core, system-message transcript and Electron fetch boundary. Provider request retry in packages/ai/src/utils/provider-retry.ts originates from Pi commit c20cb09772bf4e2590a316cb54514cef76df4293; both OpenAI adapters now use it with the SDK's two-retry default. The MIT license below applies.
134
+
135
+ MIT License
136
+
137
+ Copyright (c) 2025 Mario Zechner
138
+
139
+ Permission is hereby granted, free of charge, to any person obtaining a copy
140
+ of this software and associated documentation files (the "Software"), to deal
141
+ in the Software without restriction, including without limitation the rights
142
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
143
+ copies of the Software, and to permit persons to whom the Software is
144
+ furnished to do so, subject to the following conditions:
145
+
146
+ The above copyright notice and this permission notice shall be included in all
147
+ copies or substantial portions of the Software.
148
+
149
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
150
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
151
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
152
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
153
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
154
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
155
+ SOFTWARE.
156
+
157
+
158
+ # node-pty
159
+
160
+ Copyright (c) 2012-2015, Christopher Jeffrey (https://github.com/chjj/)
161
+
162
+ Permission is hereby granted, free of charge, to any person obtaining a copy
163
+ of this software and associated documentation files (the "Software"), to deal
164
+ in the Software without restriction, including without limitation the rights
165
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
166
+ copies of the Software, and to permit persons to whom the Software is
167
+ furnished to do so, subject to the following conditions:
168
+
169
+ The above copyright notice and this permission notice shall be included in
170
+ all copies or substantial portions of the Software.
171
+
172
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
173
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
174
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
175
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
176
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
177
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
178
+ THE SOFTWARE.
179
+
180
+
181
+
182
+ The MIT License (MIT)
183
+
184
+ Copyright (c) 2016, Daniel Imms (http://www.growingwiththeweb.com)
185
+
186
+ Permission is hereby granted, free of charge, to any person obtaining a copy
187
+ of this software and associated documentation files (the "Software"), to deal
188
+ in the Software without restriction, including without limitation the rights
189
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
190
+ copies of the Software, and to permit persons to whom the Software is
191
+ furnished to do so, subject to the following conditions:
192
+
193
+ The above copyright notice and this permission notice shall be included in all
194
+ copies or substantial portions of the Software.
195
+
196
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
197
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
198
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
199
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
200
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
201
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
202
+ SOFTWARE.
203
+
204
+
205
+
206
+ MIT License
207
+
208
+ Copyright (c) 2018 - present Microsoft Corporation
209
+
210
+ All rights reserved.
211
+
212
+ Permission is hereby granted, free of charge, to any person obtaining a copy
213
+ of this software and associated documentation files (the "Software"), to deal
214
+ in the Software without restriction, including without limitation the rights
215
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
216
+ copies of the Software, and to permit persons to whom the Software is
217
+ furnished to do so, subject to the following conditions:
218
+
219
+ The above copyright notice and this permission notice shall be included in all
220
+ copies or substantial portions of the Software.
221
+
222
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
223
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
224
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
225
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
226
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
227
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
228
+ SOFTWARE.
229
+
230
+
231
+
232
+ # @xterm/xterm
233
+
234
+ Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
235
+ Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
236
+ Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)
237
+
238
+ Permission is hereby granted, free of charge, to any person obtaining a copy
239
+ of this software and associated documentation files (the "Software"), to deal
240
+ in the Software without restriction, including without limitation the rights
241
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
242
+ copies of the Software, and to permit persons to whom the Software is
243
+ furnished to do so, subject to the following conditions:
244
+
245
+ The above copyright notice and this permission notice shall be included in
246
+ all copies or substantial portions of the Software.
247
+
248
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
249
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
250
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
251
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
252
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
253
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
254
+ THE SOFTWARE.
255
+
256
+
257
+
258
+ # @xterm/addon-fit
259
+
260
+ Copyright (c) 2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
261
+
262
+ Permission is hereby granted, free of charge, to any person obtaining a copy
263
+ of this software and associated documentation files (the "Software"), to deal
264
+ in the Software without restriction, including without limitation the rights
265
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
266
+ copies of the Software, and to permit persons to whom the Software is
267
+ furnished to do so, subject to the following conditions:
268
+
269
+ The above copyright notice and this permission notice shall be included in
270
+ all copies or substantial portions of the Software.
271
+
272
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
273
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
274
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
275
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
276
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
277
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
278
+ THE SOFTWARE.
279
+
280
+
281
+
282
+ # @xterm/addon-web-links
283
+
284
+ Copyright (c) 2017, The xterm.js authors (https://github.com/xtermjs/xterm.js)
285
+
286
+ Permission is hereby granted, free of charge, to any person obtaining a copy
287
+ of this software and associated documentation files (the "Software"), to deal
288
+ in the Software without restriction, including without limitation the rights
289
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
290
+ copies of the Software, and to permit persons to whom the Software is
291
+ furnished to do so, subject to the following conditions:
292
+
293
+ The above copyright notice and this permission notice shall be included in
294
+ all copies or substantial portions of the Software.
295
+
296
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
297
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
298
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
299
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
300
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
301
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
302
+ THE SOFTWARE.
303
+
304
+
305
+
306
+ # @pierre/diffs
307
+
308
+ Apache License
309
+ Version 2.0, January 2004
310
+ http://www.apache.org/licenses/
311
+
312
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
313
+
314
+ 1. Definitions.
315
+
316
+ "License" shall mean the terms and conditions for use, reproduction, and
317
+ distribution as defined by Sections 1 through 9 of this document.
318
+
319
+ "Licensor" shall mean the copyright owner or entity authorized by the
320
+ copyright owner that is granting the License.
321
+
322
+ "Legal Entity" shall mean the union of the acting entity and all other
323
+ entities that control, are controlled by, or are under common control with
324
+ that entity. For the purposes of this definition, "control" means (i) the
325
+ power, direct or indirect, to cause the direction or management of such
326
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
327
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
328
+ such entity.
329
+
330
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
331
+ permissions granted by this License.
332
+
333
+ "Source" form shall mean the preferred form for making modifications,
334
+ including but not limited to software source code, documentation source, and
335
+ configuration files.
336
+
337
+ "Object" form shall mean any form resulting from mechanical transformation
338
+ or translation of a Source form, including but not limited to compiled
339
+ object code, generated documentation, and conversions to other media types.
340
+
341
+ "Work" shall mean the work of authorship, whether in Source or Object form,
342
+ made available under the License, as indicated by a copyright notice that is
343
+ included in or attached to the work (an example is provided in the Appendix
344
+ below).
345
+
346
+ "Derivative Works" shall mean any work, whether in Source or Object form,
347
+ that is based on (or derived from) the Work and for which the editorial
348
+ revisions, annotations, elaborations, or other modifications represent, as a
349
+ whole, an original work of authorship. For the purposes of this License,
350
+ Derivative Works shall not include works that remain separable from, or
351
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
352
+ Works thereof.
353
+
354
+ "Contribution" shall mean any work of authorship, including the original
355
+ version of the Work and any modifications or additions to that Work or
356
+ Derivative Works thereof, that is intentionally submitted to Licensor for
357
+ inclusion in the Work by the copyright owner or by an individual or Legal
358
+ Entity authorized to submit on behalf of the copyright owner. For the
359
+ purposes of this definition, "submitted" means any form of electronic,
360
+ verbal, or written communication sent to the Licensor or its
361
+ representatives, including but not limited to communication on electronic
362
+ mailing lists, source code control systems, and issue tracking systems that
363
+ are managed by, or on behalf of, the Licensor for the purpose of discussing
364
+ and improving the Work, but excluding communication that is conspicuously
365
+ marked or otherwise designated in writing by the copyright owner as "Not a
366
+ Contribution."
367
+
368
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
369
+ behalf of whom a Contribution has been received by Licensor and subsequently
370
+ incorporated within the Work.
371
+
372
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
373
+ License, each Contributor hereby grants to You a perpetual, worldwide,
374
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
375
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
376
+ sublicense, and distribute the Work and such Derivative Works in Source or
377
+ Object form.
378
+
379
+ 3. Grant of Patent License. Subject to the terms and conditions of this
380
+ License, each Contributor hereby grants to You a perpetual, worldwide,
381
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
382
+ this section) patent license to make, have made, use, offer to sell, sell,
383
+ import, and otherwise transfer the Work, where such license applies only to
384
+ those patent claims licensable by such Contributor that are necessarily
385
+ infringed by their Contribution(s) alone or by combination of their
386
+ Contribution(s) with the Work to which such Contribution(s) was submitted.
387
+ If You institute patent litigation against any entity (including a
388
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
389
+ Contribution incorporated within the Work constitutes direct or contributory
390
+ patent infringement, then any patent licenses granted to You under this
391
+ License for that Work shall terminate as of the date such litigation is
392
+ filed.
393
+
394
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
395
+ Derivative Works thereof in any medium, with or without modifications, and
396
+ in Source or Object form, provided that You meet the following conditions:
397
+
398
+ (a) You must give any other recipients of the Work or Derivative Works a
399
+ copy of this License; and
400
+
401
+ (b) You must cause any modified files to carry prominent notices stating
402
+ that You changed the files; and
403
+
404
+ (c) You must retain, in the Source form of any Derivative Works that You
405
+ distribute, all copyright, patent, trademark, and attribution notices from
406
+ the Source form of the Work, excluding those notices that do not pertain to
407
+ any part of the Derivative Works; and
408
+
409
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
410
+ then any Derivative Works that You distribute must include a readable copy
411
+ of the attribution notices contained within such NOTICE file, excluding
412
+ those notices that do not pertain to any part of the Derivative Works, in at
413
+ least one of the following places: within a NOTICE text file distributed as
414
+ part of the Derivative Works; within the Source form or documentation, if
415
+ provided along with the Derivative Works; or, within a display generated by
416
+ the Derivative Works, if and wherever such third-party notices normally
417
+ appear. The contents of the NOTICE file are for informational purposes only
418
+ and do not modify the License. You may add Your own attribution notices
419
+ within Derivative Works that You distribute, alongside or as an addendum to
420
+ the NOTICE text from the Work, provided that such additional attribution
421
+ notices cannot be construed as modifying the License.
422
+
423
+ You may add Your own copyright statement to Your modifications and may
424
+ provide additional or different license terms and conditions for use,
425
+ reproduction, or distribution of Your modifications, or for any such
426
+ Derivative Works as a whole, provided Your use, reproduction, and
427
+ distribution of the Work otherwise complies with the conditions stated in
428
+ this License.
429
+
430
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
431
+ Contribution intentionally submitted for inclusion in the Work by You to the
432
+ Licensor shall be under the terms and conditions of this License, without
433
+ any additional terms or conditions. Notwithstanding the above, nothing
434
+ herein shall supersede or modify the terms of any separate license agreement
435
+ you may have executed with Licensor regarding such Contributions.
436
+
437
+ 6. Trademarks. This License does not grant permission to use the trade names,
438
+ trademarks, service marks, or product names of the Licensor, except as
439
+ required for reasonable and customary use in describing the origin of the
440
+ Work and reproducing the content of the NOTICE file.
441
+
442
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
443
+ writing, Licensor provides the Work (and each Contributor provides its
444
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
445
+ KIND, either express or implied, including, without limitation, any
446
+ warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
447
+ FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining
448
+ the appropriateness of using or redistributing the Work and assume any risks
449
+ associated with Your exercise of permissions under this License.
450
+
451
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
452
+ tort (including negligence), contract, or otherwise, unless required by
453
+ applicable law (such as deliberate and grossly negligent acts) or agreed to
454
+ in writing, shall any Contributor be liable to You for damages, including
455
+ any direct, indirect, special, incidental, or consequential damages of any
456
+ character arising as a result of this License or out of the use or inability
457
+ to use the Work (including but not limited to damages for loss of goodwill,
458
+ work stoppage, computer failure or malfunction, or any and all other
459
+ commercial damages or losses), even if such Contributor has been advised of
460
+ the possibility of such damages.
461
+
462
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
463
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
464
+ acceptance of support, warranty, indemnity, or other liability obligations
465
+ and/or rights consistent with this License. However, in accepting such
466
+ obligations, You may act only on Your own behalf and on Your sole
467
+ responsibility, not on behalf of any other Contributor, and only if You
468
+ agree to indemnify, defend, and hold each Contributor harmless for any
469
+ liability incurred by, or claims asserted against, such Contributor by
470
+ reason of your accepting any such warranty or additional liability.
471
+
472
+ END OF TERMS AND CONDITIONS
473
+
474
+ APPENDIX: How to apply the Apache License to your work.
475
+
476
+ To apply the Apache License to your work, attach the following
477
+ boilerplate notice, with the fields enclosed by brackets "[]"
478
+ replaced with your own identifying information. (Don't include
479
+ the brackets!) The text should be enclosed in the appropriate
480
+ comment syntax for the file format. We also recommend that a
481
+ file or class name and description of purpose be included on the
482
+ same "printed page" as the copyright notice for easier
483
+ identification within third-party archives.
484
+
485
+ Copyright 2025 Pierre Computer Company
486
+
487
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
488
+ this file except in compliance with the License. You may obtain a copy of the
489
+ License at
490
+
491
+ http://www.apache.org/licenses/LICENSE-2.0
492
+
493
+ Unless required by applicable law or agreed to in writing, software distributed
494
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
495
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
496
+ specific language governing permissions and limitations under the License.
497
+
498
+
499
+
500
+ # ZCode desktop presentation
501
+
502
+ Read-only execution during model streaming, safety admission, result reuse, 250 ms cancellation drain, durable pending/result journaling and interrupted-call recovery in packages/agent/src/streaming-tool-coordinator.ts and packages/coding-agent/src/core/streaming-tool-journal.ts follow ZCode commit 872ad960de7ec172591f7e1952f7849229f94521, apps/zcode-cli/packages/core/src/runtime/methods/{streaming-tool-coordinator,streaming-tool-synthetic-result,tool-part-persistence}.ts. Adapted to ZPI's four-tool runtime, append-only JSONL and existing transcript/retry events. The Apache-2.0 license below applies.
503
+
504
+ Task notifications follow ZCode commit 872ad960de7ec172591f7e1952f7849229f94521: desktopNotifications.ts, taskNotificationOrchestrator.ts, taskNotificationPreferences.ts, taskNotificationSound.ts, settingsPageHelpers.tsx and zh-CN notification labels. The original task-notification-pop.mp3 is copied into packages/desktop/src/renderer/assets/notification-sounds. Notification delivery, preference persistence and task navigation are adapted to ZPI's live run events and Electron bridge. Apache-2.0 attribution and license below apply.
505
+
506
+ MermaidBlock rendering queue, CSS color normalization and base theme, mermaid-budget.ts and mermaid-language.ts are adapted from ZCode commit 872ad960de7ec172591f7e1952f7849229f94521. UI labels, theme-token names, preview shell, desktop SVG sizing and queued cancellation are adapted for ZPI.
507
+
508
+ The process layout and icon selection in packages/ui/src/components/Conversation.tsx, process-specific CSS tokens/styles, and work-duration/latest-reasoning-line helpers in process-presentation.ts follow the same ZCode commit. References: packages/ui/src/v4/ConversationTurnGroup.tsx, packages/ui/src/ToolCallBlocks/ToolLayout.tsx, ToolSummaryRow.tsx and renderers, packages/ui/src/lib/workDuration.ts, packages/ui/src/components/ai-elements/reasoning.tsx, and styles.css. Adapted to ZPI's existing Pi tool names, desktop events and expansion state.
509
+
510
+ WindowChrome, macOS window-button placement, sidebar typography/icons/pinned section, the empty side-pane launcher, and skills/model-provider settings layouts also follow this commit. References: DesktopTopOverlay.tsx, WorkspaceSidePaneToggleButton.tsx, WorkspaceSidebarItem.tsx, WorkspacePinnedTasksSection.tsx, TaskListItem.tsx, app-shell/AnimatedSidePanePanel.tsx, settings/SkillsSection.tsx, SettingsResourceGroup.tsx, model-provider-section/SectionLayout.tsx, Navigation.tsx, ApiKeyInput.tsx and desktopWindowButtonPosition.ts. Adapted to ZPI's existing session, settings and pane APIs; capabilities not present in ZPI were not added.
511
+
512
+ Pixel-based interface font settings, rounded settings/workspace frames, transparent 4px resize gutters and side-pane launcher fills follow the same ZCode commit. References: lib/uiFontSize.ts, settingsCodePreview.tsx, SettingsPage.tsx, app-shell/WorkspaceShellLayout.tsx, app-shell/AnimatedSidePanePanel.tsx, WorkspaceHeader.tsx, v4/ConversationTimeline.tsx, v4/ConversationDraftEmptyState.tsx, v4/ConversationComposer.tsx, desktopWindowSize.ts and theme-zai tokens in styles.css. Adapted to ZPI's preference storage and existing panes. Workspace surfaces, translucent macOS backdrop and native overlay scrollbar styling follow ZCode styles.css and DesktopWindowFrame.tsx; native under-window vibrancy and active visual effects follow desktopWindowChrome.ts. Colors retain the reference alpha compositing instead of hardcoding sampled display RGB values.
513
+
514
+ Copyright 2026 Z.AI Co., Ltd
515
+
516
+ ZCode's reasoning.tsx is derived from vercel/ai-elements packages/elements/src/reasoning.tsx.
517
+ Copyright 2023 Vercel, Inc.
518
+
519
+ Licensed under the Apache License, Version 2.0. The complete Apache-2.0 license text is included above under @pierre/diffs.
520
+
521
+ Provider logos in packages/desktop/src/renderer/assets/providers are copied from the same ZCode commit (deepseek.png, minimax.png, mimo.png and logo-bigmodel.svg). Provider picker and ModelConfigDialog follow ProviderTemplatePicker.tsx, ProviderModelMetadataDialog.tsx and ModalityOptions.tsx, adapted to ZPI's existing configuration fields. The composer stop button, draft greeting, neutral color tokens, no-drag overlay parent and equal-width pane tabs follow ConversationComposer.tsx, ConversationDraftEmptyState.tsx, DesktopTopOverlay.tsx, SidePaneTabTrigger.tsx and styles.css. Modified layouts, labels, metadata source indicators and supported capabilities remain specific to ZPI. Apache-2.0 attribution and license above apply.
522
+
523
+ Composer spacing and controls, suggestion menus and the circular back-to-bottom control are adapted from ZCode ChatPromptEditor.tsx, ChatPromptActionMenu.tsx, MentionPanel.tsx, ModelConfigSelect.tsx, ThoughtLevelCycleControl.tsx and ConversationTimeline.tsx at the same commit. The back-to-bottom hover treatment is omitted as requested. Existing ZPI draft/reference editing, file lookup and model-selection storage remain in use.
524
+
525
+ The skills suggestion row, 14px WandSparkles icon, complete skill names, secondary descriptions and source labels follow mentions/MentionPlugin.tsx, MentionPanel.tsx, providers/skillsMentionProvider.ts and lib/builtinSkillI18n.ts at the same commit. Skill search ranking, the 1000-result cap, contiguous Chinese matching and yen-sign trigger aliases follow mentions/mentionSearch.ts and lib/promptInputTriggers.ts. Adapted to ZPI's existing skill catalog and canonical Markdown references. Apache-2.0 attribution above applies.
526
+
527
+ The desktop follow-up queue layout, labels, icons, drag activation distance and reorder-anchor logic in ConversationQueuePanel.tsx follow ZCode packages/ui/src/v4/ConversationQueuePanel.tsx, ConversationComposer.tsx, SessionPane.tsx, components/ui/button.tsx and i18n/locales/zh-CN.ts at the same commit. The GripVertical, ArrowUpFromLine, Pencil and Trash2 icons use the same Lucide assets. Queue persistence and delivery are adapted to ZPI's existing Electron IPC, JSONL, draft/attachment storage and Pi session runtime. Apache-2.0 attribution and license above apply.
528
+
529
+ The model-provider navigation groups, provider heading/actions, connection fields, compact model rows and enable switches follow model-provider-section/ProviderCardSections.tsx, ProviderFormControls.tsx, ProviderStatusIndicator.tsx, Navigation.tsx, SettingsResourceHeaderActions.tsx, components/ui/switch.tsx and lib/tokenNumberFormat.ts at the same ZCode commit. New-task control dimensions and typography follow NewTaskButtonGroup.tsx. Draft storage/promotion and runtime model-field projection remain ZPI-specific.
530
+
531
+ The task-row 16px leading slot, Lucide LoaderIcon/Pin, hover/focus replacement, spinner timing, 6px unread/error dots and indicator precedence follow TaskListItem.tsx, lib/taskListItemPresentation.ts, lib/taskStatusUnreadSync.ts and app-shell/useWorkspaceTaskNavigation.ts at the same ZCode commit. Unread storage/acknowledgement are adapted to ZPI's existing main-owned JSONL and Electron IPC. Apache-2.0 attribution and license above apply.
532
+
533
+ ToolFailure.tsx error tooltip, dashed failure label and copy action follow ZCode ToolCallBlocks/ToolLayout.tsx at the same commit, using ZPI's existing restricted clipboard bridge. Apache-2.0 attribution and license above apply.
534
+
535
+ File reference name/extension aliases, original Material SVG assets in renderer/public/material-icons, command/skill Lucide paths in renderer/public/mention-icons, inline pseudo-element decoration, reference colors and file-link presentation follow ZCode lib/fileDisplayHelpers.ts, lib/fileDisplay.tsx, mentions/mentionChip.ts, mentions/nodes/mentionIconDom.ts, promptMentionDecoration.ts and components/ai-elements/message.tsx at the same commit. File preview and read-only Excel sheet tabs follow PreviewPane.tsx, previewPaneCodeContent.tsx and previewPaneOfficeXlsxContent.tsx. Adapted to ZPI's canonical text editor, local Electron bridge and pane store. Apache-2.0 attribution above applies.
536
+
537
+ SettingsSelect follows ZCode components/ui/select.tsx and interface-settings-section.tsx at the same commit, including Radix Select 2.2.6, item-aligned menus, spacing and Lucide theme/check icons. Composer history follows lib/promptHistory.ts, lib/promptHistoryStorage.ts and LexicalChatInput.tsx: 30 workspace-scoped entries, consecutive duplicate suppression, arrow navigation and manual-edit reset. Storage keys and draft integration are adapted to ZPI. Apache-2.0 attribution above applies.
538
+
539
+ # Additional document preview dependencies
540
+
541
+ @extend-ai/react-xlsx, @dukelib/sheets-wasm and docx-preview are used for local read-only document previews. Available MIT license texts are included below; @dukelib/sheets-wasm declares MIT in its package metadata.
542
+
543
+ ## @extend-ai/react-xlsx
544
+
545
+ ```text
546
+ MIT License
547
+
548
+ Copyright (c) 2026 CrowdView Inc, dba Extend
549
+
550
+ Permission is hereby granted, free of charge, to any person obtaining a copy
551
+ of this software and associated documentation files (the "Software"), to deal
552
+ in the Software without restriction, including without limitation the rights
553
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
554
+ copies of the Software, and to permit persons to whom the Software is
555
+ furnished to do so, subject to the following conditions:
556
+
557
+ The above copyright notice and this permission notice shall be included in all
558
+ copies or substantial portions of the Software.
559
+
560
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
561
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
562
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
563
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
564
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
565
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
566
+ SOFTWARE.
567
+
568
+ ```
569
+
570
+ ## docx-preview
571
+
572
+ ```text
573
+ Apache License
574
+ Version 2.0, January 2004
575
+ http://www.apache.org/licenses/
576
+
577
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
578
+
579
+ 1. Definitions.
580
+
581
+ "License" shall mean the terms and conditions for use, reproduction,
582
+ and distribution as defined by Sections 1 through 9 of this document.
583
+
584
+ "Licensor" shall mean the copyright owner or entity authorized by
585
+ the copyright owner that is granting the License.
586
+
587
+ "Legal Entity" shall mean the union of the acting entity and all
588
+ other entities that control, are controlled by, or are under common
589
+ control with that entity. For the purposes of this definition,
590
+ "control" means (i) the power, direct or indirect, to cause the
591
+ direction or management of such entity, whether by contract or
592
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
593
+ outstanding shares, or (iii) beneficial ownership of such entity.
594
+
595
+ "You" (or "Your") shall mean an individual or Legal Entity
596
+ exercising permissions granted by this License.
597
+
598
+ "Source" form shall mean the preferred form for making modifications,
599
+ including but not limited to software source code, documentation
600
+ source, and configuration files.
601
+
602
+ "Object" form shall mean any form resulting from mechanical
603
+ transformation or translation of a Source form, including but
604
+ not limited to compiled object code, generated documentation,
605
+ and conversions to other media types.
606
+
607
+ "Work" shall mean the work of authorship, whether in Source or
608
+ Object form, made available under the License, as indicated by a
609
+ copyright notice that is included in or attached to the work
610
+ (an example is provided in the Appendix below).
611
+
612
+ "Derivative Works" shall mean any work, whether in Source or Object
613
+ form, that is based on (or derived from) the Work and for which the
614
+ editorial revisions, annotations, elaborations, or other modifications
615
+ represent, as a whole, an original work of authorship. For the purposes
616
+ of this License, Derivative Works shall not include works that remain
617
+ separable from, or merely link (or bind by name) to the interfaces of,
618
+ the Work and Derivative Works thereof.
619
+
620
+ "Contribution" shall mean any work of authorship, including
621
+ the original version of the Work and any modifications or additions
622
+ to that Work or Derivative Works thereof, that is intentionally
623
+ submitted to Licensor for inclusion in the Work by the copyright owner
624
+ or by an individual or Legal Entity authorized to submit on behalf of
625
+ the copyright owner. For the purposes of this definition, "submitted"
626
+ means any form of electronic, verbal, or written communication sent
627
+ to the Licensor or its representatives, including but not limited to
628
+ communication on electronic mailing lists, source code control systems,
629
+ and issue tracking systems that are managed by, or on behalf of, the
630
+ Licensor for the purpose of discussing and improving the Work, but
631
+ excluding communication that is conspicuously marked or otherwise
632
+ designated in writing by the copyright owner as "Not a Contribution."
633
+
634
+ "Contributor" shall mean Licensor and any individual or Legal Entity
635
+ on behalf of whom a Contribution has been received by Licensor and
636
+ subsequently incorporated within the Work.
637
+
638
+ 2. Grant of Copyright License. Subject to the terms and conditions of
639
+ this License, each Contributor hereby grants to You a perpetual,
640
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
641
+ copyright license to reproduce, prepare Derivative Works of,
642
+ publicly display, publicly perform, sublicense, and distribute the
643
+ Work and such Derivative Works in Source or Object form.
644
+
645
+ 3. Grant of Patent License. Subject to the terms and conditions of
646
+ this License, each Contributor hereby grants to You a perpetual,
647
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
648
+ (except as stated in this section) patent license to make, have made,
649
+ use, offer to sell, sell, import, and otherwise transfer the Work,
650
+ where such license applies only to those patent claims licensable
651
+ by such Contributor that are necessarily infringed by their
652
+ Contribution(s) alone or by combination of their Contribution(s)
653
+ with the Work to which such Contribution(s) was submitted. If You
654
+ institute patent litigation against any entity (including a
655
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
656
+ or a Contribution incorporated within the Work constitutes direct
657
+ or contributory patent infringement, then any patent licenses
658
+ granted to You under this License for that Work shall terminate
659
+ as of the date such litigation is filed.
660
+
661
+ 4. Redistribution. You may reproduce and distribute copies of the
662
+ Work or Derivative Works thereof in any medium, with or without
663
+ modifications, and in Source or Object form, provided that You
664
+ meet the following conditions:
665
+
666
+ (a) You must give any other recipients of the Work or
667
+ Derivative Works a copy of this License; and
668
+
669
+ (b) You must cause any modified files to carry prominent notices
670
+ stating that You changed the files; and
671
+
672
+ (c) You must retain, in the Source form of any Derivative Works
673
+ that You distribute, all copyright, patent, trademark, and
674
+ attribution notices from the Source form of the Work,
675
+ excluding those notices that do not pertain to any part of
676
+ the Derivative Works; and
677
+
678
+ (d) If the Work includes a "NOTICE" text file as part of its
679
+ distribution, then any Derivative Works that You distribute must
680
+ include a readable copy of the attribution notices contained
681
+ within such NOTICE file, excluding those notices that do not
682
+ pertain to any part of the Derivative Works, in at least one
683
+ of the following places: within a NOTICE text file distributed
684
+ as part of the Derivative Works; within the Source form or
685
+ documentation, if provided along with the Derivative Works; or,
686
+ within a display generated by the Derivative Works, if and
687
+ wherever such third-party notices normally appear. The contents
688
+ of the NOTICE file are for informational purposes only and
689
+ do not modify the License. You may add Your own attribution
690
+ notices within Derivative Works that You distribute, alongside
691
+ or as an addendum to the NOTICE text from the Work, provided
692
+ that such additional attribution notices cannot be construed
693
+ as modifying the License.
694
+
695
+ You may add Your own copyright statement to Your modifications and
696
+ may provide additional or different license terms and conditions
697
+ for use, reproduction, or distribution of Your modifications, or
698
+ for any such Derivative Works as a whole, provided Your use,
699
+ reproduction, and distribution of the Work otherwise complies with
700
+ the conditions stated in this License.
701
+
702
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
703
+ any Contribution intentionally submitted for inclusion in the Work
704
+ by You to the Licensor shall be under the terms and conditions of
705
+ this License, without any additional terms or conditions.
706
+ Notwithstanding the above, nothing herein shall supersede or modify
707
+ the terms of any separate license agreement you may have executed
708
+ with Licensor regarding such Contributions.
709
+
710
+ 6. Trademarks. This License does not grant permission to use the trade
711
+ names, trademarks, service marks, or product names of the Licensor,
712
+ except as required for reasonable and customary use in describing the
713
+ origin of the Work and reproducing the content of the NOTICE file.
714
+
715
+ 7. Disclaimer of Warranty. Unless required by applicable law or
716
+ agreed to in writing, Licensor provides the Work (and each
717
+ Contributor provides its Contributions) on an "AS IS" BASIS,
718
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
719
+ implied, including, without limitation, any warranties or conditions
720
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
721
+ PARTICULAR PURPOSE. You are solely responsible for determining the
722
+ appropriateness of using or redistributing the Work and assume any
723
+ risks associated with Your exercise of permissions under this License.
724
+
725
+ 8. Limitation of Liability. In no event and under no legal theory,
726
+ whether in tort (including negligence), contract, or otherwise,
727
+ unless required by applicable law (such as deliberate and grossly
728
+ negligent acts) or agreed to in writing, shall any Contributor be
729
+ liable to You for damages, including any direct, indirect, special,
730
+ incidental, or consequential damages of any character arising as a
731
+ result of this License or out of the use or inability to use the
732
+ Work (including but not limited to damages for loss of goodwill,
733
+ work stoppage, computer failure or malfunction, or any and all
734
+ other commercial damages or losses), even if such Contributor
735
+ has been advised of the possibility of such damages.
736
+
737
+ 9. Accepting Warranty or Additional Liability. While redistributing
738
+ the Work or Derivative Works thereof, You may choose to offer,
739
+ and charge a fee for, acceptance of support, warranty, indemnity,
740
+ or other liability obligations and/or rights consistent with this
741
+ License. However, in accepting such obligations, You may act only
742
+ on Your own behalf and on Your sole responsibility, not on behalf
743
+ of any other Contributor, and only if You agree to indemnify,
744
+ defend, and hold each Contributor harmless for any liability
745
+ incurred by, or claims asserted against, such Contributor by reason
746
+ of your accepting any such warranty or additional liability.
747
+
748
+ END OF TERMS AND CONDITIONS
749
+
750
+ APPENDIX: How to apply the Apache License to your work.
751
+
752
+ To apply the Apache License to your work, attach the following
753
+ boilerplate notice, with the fields enclosed by brackets "{}"
754
+ replaced with your own identifying information. (Don't include
755
+ the brackets!) The text should be enclosed in the appropriate
756
+ comment syntax for the file format. We also recommend that a
757
+ file or class name and description of purpose be included on the
758
+ same "printed page" as the copyright notice for easier
759
+ identification within third-party archives.
760
+
761
+ Copyright (c) 2016-2023 Volodymyr Baydalka
762
+
763
+ Licensed under the Apache License, Version 2.0 (the "License");
764
+ you may not use this file except in compliance with the License.
765
+ You may obtain a copy of the License at
766
+
767
+ http://www.apache.org/licenses/LICENSE-2.0
768
+
769
+ Unless required by applicable law or agreed to in writing, software
770
+ distributed under the License is distributed on an "AS IS" BASIS,
771
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
772
+ See the License for the specific language governing permissions and
773
+ limitations under the License.
774
+
775
+ ```
776
+
777
+ ## Material Icon Theme
778
+
779
+ ```text
780
+ The MIT License (MIT)
781
+ Copyright (c) 2025 Material Extensions
782
+
783
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
784
+
785
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
786
+
787
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
788
+
789
+ ```
790
+
791
+ Markdown table layout/actions, code highlighting controls, image galleries/previews, prose styles and single-dollar math normalization follow ZCode components/ai-elements/message.tsx, markdown-table.tsx, code-block.tsx, markdown-image.tsx at the same commit. Adapted to ZPI's Streamdown version, shared desktop theme and restricted local file/clipboard bridge. Apache-2.0 attribution above applies.
792
+
793
+ The Markdown link routing, Windows destination recovery and basic file citation parsing adapt ZCode UI source (`markdownFileLink.ts`, `embeddedBrowserHelpers.ts`, `windowsFileLinkEscapeRemarkPlugin.ts`, `assistantDirectiveParser.ts`, `zcodeFileCitation.ts`, `zcodeFileCitationRemarkPlugin.ts`, and `message.tsx`) under the ZCode license stated above.
794
+
795
+ The desktop task menu order, compact trigger and separated directory actions follow ZCode packages/ui/src/WorkspaceHeaderSections.tsx and TaskActionMenuContent.tsx. The archived-task delete control uses the same Lucide Trash2 asset as ZCode WorkspaceArchivedTasksFlatSection.tsx. The archive settings layout follows the user-provided Codex screenshot. The existing ZCode Apache-2.0 and Lucide ISC attributions above apply.
796
+
797
+ The model provider action menu, delete confirmation and editable reasoning level chips adapt ZCode `ProviderCardSections.tsx`, `dropdown-menu.tsx`, `ConfirmDialog.tsx`, `ProviderModelReasoningLevelEditor.tsx`, and model metadata dialog components. The restricted CEL compiler, tokenizer, parser, and evaluator in `packages/ai/src/utils/option-map` adapt ZCode `packages/model-option-map/src` (Apache-2.0), with its logic retained and TypeScript imports adapted. Existing ZCode and Lucide license attributions above apply.
798
+
799
+ The changed-file summary, inline file rows, review/open buttons and dropdown spacing follow ZCode packages/ui/src/v4/ConversationFileSummaryPanel.tsx, OpenSplitButton.tsx, lib/fileDisplay.tsx and components/ui/button.tsx and dropdown-menu.tsx. The Finder image in renderer/public/file-actions/finder.png is copied from ZCode packages/ui/src/onboarding/assets/finder.png. File icons reuse the Material assets attributed above; dropdown icons use the same Lucide ChevronDown and Copy assets. System-default opening, Finder reveal and path copying are adapted to ZPI's local Electron bridge. The existing ZCode Apache-2.0 and Lucide ISC attributions above apply.
800
+
801
+ Conversation file and folder context menus follow ZCode `components/ai-elements/message.tsx` and `components/ui/context-menu.tsx`, including item order, separators, spacing and the Lucide Copy icon. They reuse the Finder image attributed above, with local file actions handled by ZPI's Electron bridge and folders opened in Finder. The existing ZCode Apache-2.0 and Lucide ISC attributions above apply.
802
+
803
+ Message hover actions, the 1.2-second copy feedback, Lucide Copy/Pencil/TrendingUpDown/Quote/Trash2/FileClock/GitBranch assets, inline message editor, file reset conflict dialog, time labels, conversation selection guards, userselect wire format and reference pills follow ZCode ConversationRowView.tsx, ConversationFileRewindDialog.tsx, messageTimeLabel.ts, SelectionActionMenu.tsx, conversationSelectionReference.ts, ConversationSelectionReferenceChip.tsx and ContextAttachmentPill.tsx at commit 872ad96. Adapted to ZPI's four-tool runtime, main-owned JSONL history and restricted Electron IPC. The existing ZCode Apache-2.0 and Lucide ISC attributions above apply.
804
+
805
+ Assistant prose placement, running and abnormal history visibility, final-segment folding, empty reasoning filtering, status chevrons and 20px/16px conversation spacing follow ZCode `v4/conversationTurnWorkSegments.ts`, `conversationTurnRenderUnits.ts`, `ConversationTurnGroup.tsx` and `ConversationRowView.tsx` at commit 872ad96. Adapted to ZPI's existing ordered blocks and four-tool runtime; Markdown and Lucide assets reuse the components attributed above. The existing ZCode Apache-2.0 and Lucide ISC attributions apply.
806
+
807
+ Sidebar purpose headings, their hover/focus and touch behavior, Lucide ChevronDown/ChevronRight/GripVertical/Plus/MessageCirclePlus assets, pinned heading, and vertical section sorting follow ZCode WorkspaceSidebar/WorkspacePurposeSection.tsx, WorkspacePinnedTasksSection.tsx, sidebarPurposeSectionPreferences.ts, restrictVerticalDragWithinContainer.ts and zh-CN.ts at commit 872ad96. Adapted to ZPI's existing SortableList, collapsed preferences and local sidebar order storage. The existing ZCode Apache-2.0 and Lucide ISC attributions above apply.
808
+
809
+ Sidebar project and task name typography and row geometry follow ZCode WorkspaceSidebarItem.tsx, TaskListItem.tsx and components/ui/button.tsx at commit 872ad96: shared UI font size, normal-weight names, 1.5 line height and 24px task text slots with 4px vertical padding. Adapted to ZPI's existing project and session buttons.
810
+
811
+ Application-wide Lucide stroke width follows ZCode Root.tsx's LucideProvider default of 1.5. Sidebar project folder icons follow the rendered 14px size of WorkspaceSidebarItem.tsx and components/ui/button.tsx, centered in their 16px slots. Existing ZCode Apache-2.0 and Lucide ISC attributions apply.
812
+
813
+ The composer stop button hover colors and the top-positioned shortcut hint follow ZCode `v4/ConversationComposer.tsx`, `components/ui/button.tsx`, `ControlHintTooltip.tsx`, `components/ui/tooltip.tsx` and theme-zai tooltip tokens in `styles.css`. Adapted to ZPI's existing ActionHint component and stop handler. Existing ZCode Apache-2.0 and Lucide ISC attributions apply.
814
+
815
+ Task find bar geometry, labels, Lucide Search/ArrowUp/ArrowDown/MessageCircle/FileDiff/X assets, keyboard navigation, scope switching, history loading, stable selection and highlight colors follow ZCode `quickpick/TaskFindDialog.tsx`, `conversationFindSearch.ts`, `taskFindNavigationState.ts`, `v4/useConversationTimelineFind.ts`, `conversationFindIndex.ts`, `conversationFindHighlightDom.ts`, `GitPane/fileChangeFindSearch.ts` and theme-zai tokens. Adapted to ZPI's message rendering, local history paging and existing diff/IPC components. The existing ZCode Apache-2.0, Lucide ISC and @pierre/diffs attributions above apply.
816
+
817
+ Structured provider error details, streamed-tool recovery, and the retry/loading presentation follow ZCode `retry-policy.ts`, `runner-retry.ts`, `failure-classifier.ts`, `failure-provider-business-codes.ts`, `stream-retry-boundary.ts`, `streaming-recovery.ts`, `ConversationTurnGroup.tsx`, `chat-input-toolbar/display.tsx`, `chat-loading.tsx` and `styles.css`. The loading indicator uses the same Lucide Loader asset; retry text reuses the existing four-second gradient animation with the secondary text peak. Adapted to ZPI's four-tool execution loop and existing session/IPC projection. Existing ZCode Apache-2.0 and Lucide ISC attributions apply.
818
+
819
+ Tool summaries, phase grouping, file chips, per-operation patch previews, terminal output following/freezing, scroll fades, failure tooltips, 300ms collapsibles, queued summary transitions and flipping diff counts adapt ZCode `ToolCallBlocks/{ToolLayout,ToolSummaryRow,QueuedSummaryContent}.tsx`, `renderers/{read,execute,ExecuteOutput,explore,execute-group,edit,EditInlineDiffContent}.tsx`, `v4/conversationAssistantWorkItems.ts`, `lib/{exploreToolCall,patchDiffPreview}.ts`, and `components/ui/{collapsible,scroll-fade-viewport,lightweight-diff-preview,flip-metric-value}` at commit 872ad96. Adapted to ZPI’s four-tool runtime and existing file/patch IPC. The 1,146 Material SVG assets are byte-identical to the reference set. Existing ZCode Apache-2.0, Lucide ISC, and Material MIT attributions above apply.
820
+
821
+ Hash conversation references follow ZCode commit aac47556: `mentions/providers/sessionsMentionProvider.ts`, `mentionMarkdown.ts`, `mentionSearch.ts`, `MentionPlugin.tsx`, `components/ContextMentionOptionContent.tsx`, `nodes/mentionIconDom.ts`, and CLI `session-context/{references,parts}.ts`. Current-workspace priority, per-workspace result limits, canonical Markdown, MessagesSquare icon, session colors and search labels are retained. Session identities, IPC and bounded transcript snapshots are adapted to ZPI's JSONL storage and existing `read` tool instead of introducing ReadSessionContext or a secondary extraction model. The existing ZCode Apache-2.0 and Lucide ISC attributions above apply.
822
+
823
+ # Radix Collapsible
824
+
825
+ MIT License
826
+
827
+ Copyright (c) 2022 WorkOS
828
+
829
+ Permission is hereby granted, free of charge, to any person obtaining a copy
830
+ of this software and associated documentation files (the "Software"), to deal
831
+ in the Software without restriction, including without limitation the rights
832
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
833
+ copies of the Software, and to permit persons to whom the Software is
834
+ furnished to do so, subject to the following conditions:
835
+
836
+ The above copyright notice and this permission notice shall be included in all
837
+ copies or substantial portions of the Software.
838
+
839
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
840
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
841
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
842
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
843
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
844
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
845
+ SOFTWARE.
846
+
847
+
848
+ # Motion
849
+
850
+ The MIT License (MIT)
851
+
852
+ Copyright (c) 2024 [Motion](https://motion.dev) B.V.
853
+
854
+ Permission is hereby granted, free of charge, to any person obtaining a copy
855
+ of this software and associated documentation files (the "Software"), to deal
856
+ in the Software without restriction, including without limitation the rights
857
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
858
+ copies of the Software, and to permit persons to whom the Software is
859
+ furnished to do so, subject to the following conditions:
860
+
861
+ The above copyright notice and this permission notice shall be included in all
862
+ copies or substantial portions of the Software.
863
+
864
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
865
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
866
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
867
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
868
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
869
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
870
+ SOFTWARE.
871
+
872
+
873
+ # Framer Motion
874
+
875
+ The MIT License (MIT)
876
+
877
+ Copyright (c) 2018 Framer B.V.
878
+
879
+ Permission is hereby granted, free of charge, to any person obtaining a copy
880
+ of this software and associated documentation files (the "Software"), to deal
881
+ in the Software without restriction, including without limitation the rights
882
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
883
+ copies of the Software, and to permit persons to whom the Software is
884
+ furnished to do so, subject to the following conditions:
885
+
886
+ The above copyright notice and this permission notice shall be included in all
887
+ copies or substantial portions of the Software.
888
+
889
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
890
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
891
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
892
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
893
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
894
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
895
+ SOFTWARE.
896
+
897
+
898
+ # Shiki
899
+
900
+ MIT License
901
+
902
+ Copyright (c) 2021 Pine Wu
903
+ Copyright (c) 2023 Anthony Fu <https://github.com/antfu>
904
+
905
+ Permission is hereby granted, free of charge, to any person obtaining a copy
906
+ of this software and associated documentation files (the "Software"), to deal
907
+ in the Software without restriction, including without limitation the rights
908
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
909
+ copies of the Software, and to permit persons to whom the Software is
910
+ furnished to do so, subject to the following conditions:
911
+
912
+ The above copyright notice and this permission notice shall be included in all
913
+ copies or substantial portions of the Software.
914
+
915
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
916
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
917
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
918
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
920
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
921
+ SOFTWARE.
922
+
923
+ Conversation column widths, turn padding, composer dock insets, footer action spacing and the shared turn hover scope follow ZCode `v4/conversationLayout.ts`, `v4/ConversationTurnGroup.tsx`, `v4/ConversationTimeline.tsx`, `v4/ConversationRowView.tsx` and `components/ai-elements/message.tsx` from commit 872ad960de7ec172591f7e1952f7849229f94521. Adapted to ZPI's existing copy, fork and local session controls. Existing ZCode Apache-2.0 and Lucide ISC attributions apply.
924
+
925
+ Window viewport containment and file/folder mentions follow ZCode `styles.css`, `shared/workspaceFileSearch.ts`, `mentions/MentionPlugin.tsx`, `mentions/mentionMarkdown.ts`, `mentions/components/{MentionPanel,ContextMentionOptionContent}.tsx`, `mentions/components/scrollMask.ts` and `lib/fileDisplay.tsx` from the same commit. Search ranking, parent-directory labels, 34px rows, 24px scroll fades and folder SVG presentation are adapted to ZPI's existing Git-aware lookup, Markdown draft storage and four-tool runtime. `material-icons/folder.svg` is byte-identical to the reference asset already included above. Existing ZCode Apache-2.0 and Material MIT attributions apply.
926
+
927
+ The composer add panel follows ZCode `ConversationComposerActionMenu.tsx`, `mentions/components/{MentionPanel,ContextMentionOptionContent}.tsx`, `LexicalChatInput.tsx`, and `zh-CN.ts`: full-width positioning, attachment and file sections, 34px rows, rounded surface, keyboard selection and shortcut footer. Paperclip, Plus and Info use the same Lucide assets; file icons reuse the Material SVG assets attributed above. Adapted to ZPI’s attachment picker, Git-aware file search and canonical Markdown editor. Existing ZCode Apache-2.0, Lucide ISC and Material MIT attributions apply.
928
+
929
+ Generic attachment selection, native path references, text-file classification, 48px media thumbnails, file cards and prompt mention line-box alignment follow ZCode `desktopMainIpcPlatform.ts`, `chatAttachments.ts`, `chatAttachmentMetadata.ts`, runtime `helpers/{attachments,attachment-path-reference}.ts`, `v4/ConversationComposer.tsx` and `mentions/mentionChip.ts`. Adapted to ZPI's existing text/image model API, bounded Pi read output, Electron IPC and attachment storage. Existing ZCode Apache-2.0, Lucide ISC and Material MIT attributions apply.
930
+
931
+ Automatic assistant preview parsing, change gates, candidate limits, stat validation, cards, open menus and PPTX completion consumption adapt ZCode `AssistantPreviewCards.tsx`, `OpenSplitButton.tsx`, `lib/{assistantPreviewCards,assistantFileReferences,assistantPreviewCardValidation,assistantPathQuotes,markdownFileLink,path}.ts`, `shared/conversation-preview-artifacts.ts`, `shared/media-preview.ts`, `v4/useAssistantPreviewCardsForRow.ts` and `v4/assistantPreviewPptxAutoOpen.ts` at commit 872ad960de7ec172591f7e1952f7849229f94521. Sidebar view/sort controls, time formatting, running-first ordering, project/task pagination, timeline grouping and title overflow adapt `WorkspaceSidebar.tsx`, `WorkspaceTimelineTasksSection.tsx`, `TaskListItem.tsx`, `components/TaskTitleOverflowText.tsx` and their ordering, pagination, preferences and presentation helpers at the same commit. Local application discovery follows `desktop/src/main/editors.ts` and `lib/openWithEditors.ts`. Adapted to ZPI's existing session host, four-tool changes, local Electron IPC and pane store. Lucide and byte-identical Material SVGs reuse the assets attributed above; no new icon set is introduced. Existing ZCode Apache-2.0, Lucide ISC and Material MIT attributions apply.
932
+
933
+ Context compaction timeline dividers in packages/ui/src/components/CompactionDivider.tsx follow ZCode `v4/ConversationRowView.tsx` (`MarkerDividerRow`, compact status labels) and `styles.css` at commit 872ad960de7ec172591f7e1952f7849229f94521: 14px Lucide Archive, centered label, 1px border at 50% opacity, 12px outer gap, 6px icon gap, 8px/16px padding and the existing four-second gradient text animation. Adapted to ZPI's Pi compaction lifecycle and local session history. Existing ZCode Apache-2.0 and Lucide ISC attributions above apply; the compaction prompt is unchanged.
934
+
935
+ Question transcript presentation in `AskQuestionToolBlock.tsx` and `user-question-presentation.ts` adapts ZCode `ToolCallBlocks/renderers/ask-question.tsx` and `lib/askUserQuestion.ts`. `UserQuestionCard.tsx` and its styles follow `ElicitationDialog.tsx` and the Badge, Button and Textarea primitives, including option descriptions, paging, focus restoration, keyboard/IME handling, responsive collapse and scroll bounds. Adapted to ZPI’s optional question tool, Pi text results and local IPC. CircleHelp, Check, Chevron and Info reuse the Lucide assets attributed above. Existing ZCode Apache-2.0 and Lucide ISC attributions apply.
936
+
937
+ # cmdk
938
+
939
+ The search palette uses cmdk 1.1.1 for the same keyboard and selection behavior as ZCode.
940
+
941
+ MIT License
942
+
943
+ Copyright (c) 2022 Paco Coursey
944
+
945
+ Permission is hereby granted, free of charge, to any person obtaining a copy
946
+ of this software and associated documentation files (the "Software"), to deal
947
+ in the Software without restriction, including without limitation the rights
948
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
949
+ copies of the Software, and to permit persons to whom the Software is
950
+ furnished to do so, subject to the following conditions:
951
+
952
+ The above copyright notice and this permission notice shall be included in all
953
+ copies or substantial portions of the Software.
954
+
955
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
956
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
957
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
958
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
959
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
960
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
961
+ SOFTWARE.
962
+
963
+
964
+ ## ZCode task groups
965
+
966
+ The task grouping state transitions, drag/drop semantics, group and task row layout,
967
+ seven-color palette, view switcher, sticky headers, and virtualized lists are adapted
968
+ from [ZCode](https://github.com/zai-org/ZCode), commit
969
+ `aac4755666d09fdcd70272fcf063c077a639015f`. Reference sources:
970
+ `packages/ui/src/WorkspaceSidebar.tsx`, `WorkspaceGroupedTasksSection.tsx`,
971
+ `workspace-grouped-tasks/`, `lib/buildGroupedTaskViewFromSessions.ts`,
972
+ `lib/groupedTaskExpansionPreference.ts`, and `packages/services/src/session/taskIndexRepo.ts`.
973
+
974
+ Copyright 2026 Z.AI Co., Ltd. Licensed under Apache-2.0 (full license reproduced above).
975
+ ZPI adapts persistence to its existing Electron IPC / local JSON architecture and
976
+ reuses its existing Lucide icon package; no new bitmap artwork is copied.
977
+
978
+ ## Lucide and Feather icons
979
+
980
+ The following license text is reproduced from the installed `lucide-react` 1.51.0
981
+ package, including the Feather-derived icons such as Hash, ChevronDown and X:
982
+
983
+ ISC License
984
+
985
+ Copyright (c) 2026 Lucide Icons and Contributors
986
+
987
+ Permission to use, copy, modify, and/or distribute this software for any
988
+ purpose with or without fee is hereby granted, provided that the above
989
+ copyright notice and this permission notice appear in all copies.
990
+
991
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
992
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
993
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
994
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
995
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
996
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
997
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
998
+
999
+ ---
1000
+
1001
+ The following Lucide icons are derived from the Feather project:
1002
+
1003
+ airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1004
+
1005
+ The MIT License (MIT) (for the icons listed above)
1006
+
1007
+ Copyright (c) 2013-present Cole Bemis
1008
+
1009
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1010
+ of this software and associated documentation files (the "Software"), to deal
1011
+ in the Software without restriction, including without limitation the rights
1012
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1013
+ copies of the Software, and to permit persons to whom the Software is
1014
+ furnished to do so, subject to the following conditions:
1015
+
1016
+ The above copyright notice and this permission notice shall be included in all
1017
+ copies or substantial portions of the Software.
1018
+
1019
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1020
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1021
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1022
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1023
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1024
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1025
+ SOFTWARE.
1026
+
1027
+
1028
+ ## DeepSeek Harness performance and usage presentation
1029
+
1030
+ The model-performance dock layout, labels and numeric presentation are adapted from [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), revision 571902028a75c64c1d767f4ae5fd099485f0ddf0.
1031
+
1032
+ MIT License
1033
+
1034
+ Copyright (c) 2026 DeepSeek
1035
+
1036
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1037
+ of this software and associated documentation files (the "Software"), to deal
1038
+ in the Software without restriction, including without limitation the rights
1039
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1040
+ copies of the Software, and to permit persons to whom the Software is
1041
+ furnished to do so, subject to the following conditions:
1042
+
1043
+ The above copyright notice and this permission notice shall be included in all
1044
+ copies or substantial portions of the Software.
1045
+
1046
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1047
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1048
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1049
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1051
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1052
+ SOFTWARE.
1053
+
1054
+
1055
+ ## @extend-ai/react-docx
1056
+
1057
+ MIT License
1058
+
1059
+ Copyright (c) 2026 CrowdView Inc, dba Extend
1060
+
1061
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1062
+ of this software and associated documentation files (the "Software"), to deal
1063
+ in the Software without restriction, including without limitation the rights
1064
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1065
+ copies of the Software, and to permit persons to whom the Software is
1066
+ furnished to do so, subject to the following conditions:
1067
+
1068
+ The above copyright notice and this permission notice shall be included in all
1069
+ copies or substantial portions of the Software.
1070
+
1071
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1072
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1073
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1074
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1075
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1076
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1077
+ SOFTWARE.
1078
+
1079
+
1080
+ ## react-pdf
1081
+
1082
+ MIT License
1083
+
1084
+ Copyright (c) 2017–2024 Wojciech Maj
1085
+
1086
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1087
+ of this software and associated documentation files (the "Software"), to deal
1088
+ in the Software without restriction, including without limitation the rights
1089
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1090
+ copies of the Software, and to permit persons to whom the Software is
1091
+ furnished to do so, subject to the following conditions:
1092
+
1093
+ The above copyright notice and this permission notice shall be included in all
1094
+ copies or substantial portions of the Software.
1095
+
1096
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1097
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1098
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1099
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1100
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1101
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1102
+ SOFTWARE.
1103
+
1104
+
1105
+ ## @xmldom/xmldom (test dependency)
1106
+
1107
+ Copyright 2019 - present Christopher J. Brody and other contributors, as listed in: https://github.com/xmldom/xmldom/graphs/contributors
1108
+ Copyright 2012 - 2017 @jindw <jindw@xidea.org> and other contributors, as listed in: https://github.com/jindw/xmldom/graphs/contributors
1109
+
1110
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1111
+
1112
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1113
+
1114
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1115
+
1116
+ ## File icon parity and load fallback
1117
+
1118
+ The complete file icon alias regression fixture in `packages/ui/test/fixtures/file-icons-reference.json`
1119
+ is derived from ZCode `packages/ui/src/lib/fileDisplayHelpers.ts` at
1120
+ `aac4755666d09fdcd70272fcf063c077a639015f` (Apache-2.0). It records all 27 filename aliases,
1121
+ 50 extension aliases, and the combined checksum of the existing 1,146 byte-identical
1122
+ Material Icon Theme SVGs. Filename overrides, including `README.txt` → `readme`, are
1123
+ preserved before extension lookup; no theme-specific substitution is introduced.
1124
+ The two-stage image-load fallback in `packages/ui/src/file-icons.ts` and
1125
+ `components/Reference.tsx` adapts that revision's `lib/fileDisplay.tsx`, with a valid
1126
+ inline SVG stroke color and source-keyed image reset. Existing Apache-2.0 and Material
1127
+ Icon Theme MIT notices above apply. No additional icon artwork or ZCode brand assets
1128
+ are imported.
1129
+
1130
+ # ZCode task list header and project sorting update
1131
+
1132
+ `TaskListHeader.tsx`, `TaskViewMenu.tsx`, `SortableProjects.tsx`, `sidebar-task-model.ts`, and the corresponding workbench styles adapt ZCode commit `3c5b227649371507ddc4eb46ac5133afe6db1cab`, `packages/ui/src/project-sidebar/{ProjectSidebarListHeader,SortableProjects,ProjectNode,PurposeSections,view,timelineDates}.tsx/ts` and `WorkspaceSidebar/WorkspacePurposeSection.tsx` and `components/ui/dropdown-menu.tsx`. Folder, Hash, Clock, ListFilter, Search and expand/collapse icons reuse Lucide. The Apache-2.0 and Lucide licenses reproduced above apply. Project and task-group writes retain ZPI's desktop state owner and SQLite storage. The grouped drag lifecycle and final-position commands also adapt `project-sidebar/grouped/{useGroupedDrag,drag,model}.ts` at the same commit.
1133
+
1134
+ Conversation history content windowing in `ConversationHistory.tsx` and reading anchors in `Conversation.tsx` follow the measured-height, stable live-tail and scroll-anchor principles of ZCode `packages/ui/src/v4/ConversationTimeline.tsx` at commit `3c5b227649371507ddc4eb46ac5133afe6db1cab`. Adapted to ZPI's existing pagination with normal-flow placeholders and IntersectionObserver, without copying its virtualizer or adding dependencies. The ZCode Apache-2.0 notice above applies.
1135
+
1136
+ Per-target search caching in `find.ts` and `use-text-find.ts` follows the stable-unit match cache in ZCode `packages/ui/src/v4/useConversationTimelineFind.ts` at the same commit. Adapted to ZPI's rendered-text matching, mutation-based DOM invalidation and reusable CSS Highlight ranges, preserving existing Unicode offsets and diff search. The ZCode Apache-2.0 notice above applies.
1137
+
1138
+ First-search text projection in `conversation-find.ts` and `markdown-find.ts` follows ZCode `v4/useConversationTimelineFind.ts`'s separation of a full text index from mounted-row highlights at commit `3c5b227649371507ddc4eb46ac5133afe6db1cab`. Adapted to ZPI's shared Markdown pipeline, short indexing tasks, existing history placeholders and a mounted fallback for dynamic content. The ZCode Apache-2.0 notice above applies.
1139
+
1140
+ ## remark-parse
1141
+
1142
+ Used by the existing Streamdown parser and directly by the lightweight conversation search projection.
1143
+
1144
+ ```text
1145
+ (The MIT License)
1146
+
1147
+ Copyright (c) 2014 Titus Wormer <tituswormer@gmail.com>
1148
+
1149
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1150
+ of this software and associated documentation files (the "Software"), to deal
1151
+ in the Software without restriction, including without limitation the rights
1152
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1153
+ copies of the Software, and to permit persons to whom the Software is
1154
+ furnished to do so, subject to the following conditions:
1155
+
1156
+ The above copyright notice and this permission notice shall be included in
1157
+ all copies or substantial portions of the Software.
1158
+
1159
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1160
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1161
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1162
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1163
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1164
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1165
+ THE SOFTWARE.
1166
+ ```
1167
+
1168
+ ## remark-rehype
1169
+
1170
+ Used by the existing Streamdown parser and directly by the lightweight conversation search projection.
1171
+
1172
+ ```text
1173
+ (The MIT License)
1174
+
1175
+ Copyright (c) Titus Wormer <tituswormer@gmail.com>
1176
+
1177
+ Permission is hereby granted, free of charge, to any person obtaining
1178
+ a copy of this software and associated documentation files (the
1179
+ 'Software'), to deal in the Software without restriction, including
1180
+ without limitation the rights to use, copy, modify, merge, publish,
1181
+ distribute, sublicense, and/or sell copies of the Software, and to
1182
+ permit persons to whom the Software is furnished to do so, subject to
1183
+ the following conditions:
1184
+
1185
+ The above copyright notice and this permission notice shall be
1186
+ included in all copies or substantial portions of the Software.
1187
+
1188
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
1189
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1190
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1191
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1192
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1193
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1194
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1195
+ ```
1196
+
1197
+
1198
+ # Source icon regression fixture provenance
1199
+
1200
+ # DeepSeek source-icon regression fixtures
1201
+
1202
+ These small public icons reproduce the user-reported missing source icons. Downloaded anonymously on 2026-10-17 from the exact `site_icon` URLs shown in the supplied screenshot; every request returned HTTP 200 without redirects. No DeepSeek API or credential was used.
1203
+
1204
+ `sources.json` records the original URL, actual Content-Type, byte length and SHA-256. The first four are rejected by the former MIME/format gate; the JPEG was already shown correctly. Two additional screenshot samples cover a multi-frame ICO and WebP served as binary/octet-stream. Tests replay these response bytes through mock transport and the real bounded decoder, with no live requests.
1205
+
1206
+ The logos and marks belong to their respective publishers. These files are regression test inputs only, not application UI assets.