dal-code 1.0.57 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/bundle/chunks/{anthropic-messages-ASQGS6BL.js → anthropic-messages-FOIJU7LX.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-ZSCUJBSU.js → azure-openai-responses-7NBJZKX5.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
- package/dist/bundle/chunks/{chunk-YTDTROS5.js → chunk-3QG7FIE4.js} +1 -1
- package/dist/bundle/chunks/{chunk-6SPX3U36.js → chunk-4BOWD7PQ.js} +1 -1
- package/dist/bundle/chunks/{chunk-F577XLVZ.js → chunk-4PBY6OYS.js} +1 -1
- package/dist/bundle/chunks/{chunk-PD6QS7YD.js → chunk-5MF5GEDD.js} +1 -1
- package/dist/bundle/chunks/{chunk-KP7CMLOT.js → chunk-B7KZDIWA.js} +1 -1
- package/dist/bundle/chunks/{chunk-6PQZ4KMC.js → chunk-C5ELI234.js} +1 -1
- package/dist/bundle/chunks/{chunk-FSX34SAZ.js → chunk-CCU76UL3.js} +6 -6
- package/dist/bundle/chunks/{chunk-MAJODFX6.js → chunk-DVEPGKL5.js} +1 -1
- package/dist/bundle/chunks/{chunk-34D4KVPX.js → chunk-IONGABQF.js} +1 -1
- package/dist/bundle/chunks/{chunk-GPI2GHBH.js → chunk-JK74OC6W.js} +1 -1
- package/dist/bundle/chunks/{chunk-JPBJUBY4.js → chunk-JXAFVEE4.js} +2 -2
- package/dist/bundle/chunks/{chunk-XIJS4F22.js → chunk-LMZYTWXD.js} +1 -1
- package/dist/bundle/chunks/{chunk-2E7RGBKM.js → chunk-NYSVXLKF.js} +1 -1
- package/dist/bundle/chunks/{chunk-O3XFDBJ3.js → chunk-PMFHJN7I.js} +1 -1
- package/dist/bundle/chunks/{chunk-JPCWLZUZ.js → chunk-QFBU27TM.js} +1 -1
- package/dist/bundle/chunks/{chunk-MZ7O6YLD.js → chunk-QU2VEHMW.js} +1 -1
- package/dist/bundle/chunks/{chunk-LZTZWS3N.js → chunk-SCZEDPDC.js} +1 -1
- package/dist/bundle/chunks/{chunk-TNSXMGQB.js → chunk-T5PI6B5P.js} +1 -1
- package/dist/bundle/chunks/{chunk-S7K3JBWA.js → chunk-X7I3V6OA.js} +1 -1
- package/dist/bundle/chunks/{chunk-IRSW3MVW.js → chunk-XQF5XDEM.js} +2 -2
- package/dist/bundle/chunks/{cli-NP7QEFQE.js → cli-NQ7B7BGV.js} +1 -1
- package/dist/bundle/chunks/{cli-IDAZVEZ2.js → cli-RY666QAD.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLKVTF6I.js → cloudflare-workers-ai-system-one-CFGOMWWZ.js} +1 -1
- package/dist/bundle/chunks/{execute-VXSJSHXH.js → execute-NJRE4WBO.js} +1 -1
- package/dist/bundle/chunks/{google-generative-ai-3HIBMVL4.js → google-generative-ai-ZA2RHPNE.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-7PIUZFM3.js → google-vertex-Y2GRWOK7.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-5OLOZHKT.js → llama-cpp-classify-G2JDOFHY.js} +1 -1
- package/dist/bundle/chunks/{mcp-GHYUCPI4.js → mcp-45D7KCZZ.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-6Y33SI3U.js → mistral-conversations-MLV32BRV.js} +1 -1
- package/dist/bundle/chunks/{office-2JSKOL7V.js → office-UBOUFRAU.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-BYGMMTPH.js → openai-codex-responses-BDK3PY6G.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-UWYQMOLR.js → openai-completions-BLXHKAB3.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-I5J7OD62.js → openai-decisions-IGVID576.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-LWVKQGLT.js → openai-responses-KHZOEDF2.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-BDUFN6XX.js → openrouter-images-SA6PUASF.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-64FHWMQR.js → pi-messages-3VAOLQ2Y.js} +1 -1
- package/dist/bundle/chunks/{review-OQEOVDLP.js → review-RZXLHPUZ.js} +1 -1
- package/dist/bundle/chunks/{router-3UQE4LBN.js → router-YBVXODIL.js} +1 -1
- package/dist/bundle/chunks/{runtime-E7KOB62K.js → runtime-FNCZJKOC.js} +1 -1
- package/dist/bundle/chunks/{sdk-5V64WBOZ.js → sdk-X6RX7FNE.js} +1 -1
- package/dist/bundle/chunks/{sync-INSWGFSB.js → sync-CRV6BXXC.js} +2 -2
- package/dist/bundle/chunks/{typesafe-system-one-7QFJ5JNW.js → typesafe-system-one-ER3DLYNF.js} +1 -1
- package/dist/bundle/chunks/{usage-MG7QDPG2.js → usage-LMRFS2HV.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-73ZLFCNE.js → virtual-modules-XIUNRFOZ.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-compat/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-learn/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/engine.js +3 -3
- package/dist/node_modules/@dalcode/dal-learn/src/index.js +11 -11
- package/dist/node_modules/@dalcode/dal-learn/src/lessons.js +4 -4
- package/dist/node_modules/@dalcode/dal-learn/src/project-map.js +2 -2
- package/dist/node_modules/@dalcode/dal-learn/src/signals.js +6 -6
- package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +1 -1
- package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-sync/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +0 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-mcp/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-schema/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/bun/register-bedrock.js +0 -1
- package/dist/cli/experimental/auth.js +0 -1
- package/dist/cli/experimental/cli.js +0 -1
- package/dist/cli/experimental/command-options.js +0 -1
- package/dist/cli/experimental/command.js +0 -1
- package/dist/cli/experimental/commands/client.js +0 -1
- package/dist/cli/experimental/commands/pi.js +0 -1
- package/dist/cli/experimental/commands/server.js +0 -1
- package/dist/cli/experimental/transport-address.js +0 -1
- package/dist/client/index.js +0 -1
- package/dist/client/remote-session.js +0 -1
- package/dist/client/transcript.js +0 -1
- package/dist/core/provider-attribution.js +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -1
- package/dist/modes/interactive/theme/theme-json.js +0 -12
- package/dist/modes/interactive/theme/theme-schema.json +0 -356
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +0 -37
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +0 -104
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js +0 -16
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +0 -10
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +0 -17
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bash.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bounded.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/chord.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/context.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/harness.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/hooks.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/jsonl.js +0 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/collapse.js +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/entries.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/frames.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/generation.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/job.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/plugin.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/post-tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/task-api.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/tool.js +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/membrane.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/memory.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/scheduler.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/session.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/system.js +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/view.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +0 -10
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +0 -12
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.js +0 -16
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +0 -14
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/node.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +0 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/oauth-page.js +0 -74
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js +0 -1
- package/dist/server/create-harness.js +0 -1
- package/dist/utils/clipboard-native.js +0 -1
package/dist/client/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{RemoteSession as e}from"./remote-session.js";import{applyTranscriptProgress as s,applyTranscriptSnapshot as a,createTranscriptState as o,selectTranscript as c}from"./transcript.js";export{e as RemoteSession,s as applyTranscriptProgress,a as applyTranscriptSnapshot,o as createTranscriptState,c as selectTranscript};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var r=(a,s)=>p(a,"name",{value:s,configurable:!0});import{applyTranscriptProgress as u,applyTranscriptSnapshot as l,createTranscriptState as w,selectTranscript as f}from"./transcript.js";class c extends Error{static{r(this,"RemoteSessionDisposedError")}constructor(){super("Remote session is disposed"),this.name="RemoteSessionDisposedError"}}async function y(a){const t=(await Promise.allSettled(a)).flatMap(i=>i.status==="rejected"&&!(i.reason instanceof c)?[i.reason]:[]);if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Failed to dispose remote session")}r(y,"settleRemoteSessionDisposal");class o{static{r(this,"RemoteSession")}#e;#u;#s={status:"unbound"};#i;#t;#l;#w;#c=new Set;#f=new Set;#y=new Set;#d;#b=r(()=>{},"#resolveDisposeSignal");#C=new Promise(s=>{this.#b=s});constructor(s,t={}){this.#e=s,this.#u=t.onListenerError}get id(){return this.#i?.id}get state(){return{lifecycle:this.#s,snapshot:this.#t?.snapshot,transcript:this.#t?f(this.#t):[]}}get snapshot(){return this.#t?.snapshot}get phase(){return this.snapshot?.phase}get operation(){return this.#s.status==="busy"?this.#s.operation:void 0}get models(){return this.#e.snapshot?.models??[]}get sessions(){return this.#e.snapshot?.sessions??[]}get connectionState(){return this.#e.connectionState}get disposed(){return this.#s.status==="disposed"}subscribe(s){return this.#o(),this.#c.add(s),this.#A(s,this.state),()=>this.#c.delete(s)}onConnectionStateChange(s){return this.#o(),this.#e.onConnectionStateChange(s)}static async open(s,t,i={}){const e=new o(s,i);try{return await e.open(t),e}catch(n){throw await e.dispose(),n}}async open(s){this.#i?.id===s&&this.#s.status==="ready"||await this.#S("open",()=>this.#e.acquireSession(s,{mode:"exclusive"}))}static async create(s,t,i={}){const e=new o(s,i);try{return await e.create(t),e}catch(n){throw await e.dispose(),n}}async create(s){await this.#S("create",()=>this.#e.createSession(s))}async submit(s){const t=s.trim();if(!t)return;this.#a();const i=this.#r();if(this.phase!=="idle"&&this.phase!=="turn")throw new Error(`Session cannot accept input during ${this.phase??"unknown"} phase`);await this.#h("submit",()=>(this.phase==="idle"?i.prompt(t):i.steer(t)).then(()=>{}))}async abort(){const s=this.#s.status==="busy"&&this.#s.operation==="submit";s?this.#o():this.#a();const t=this.#r();this.phase==="idle"&&!s||await this.#h("abort",()=>t.abort().then(()=>{}),s)}async setModel(s){await this.#v("setModel","change model",()=>this.#r().setModel(s).then(()=>{}))}async setThinking(s){await this.#v("setThinking","change thinking level",()=>this.#r().setThinking(s).then(()=>{}))}async reconnect(){this.#a();const s=this.#r().id;await this.#h("reconnect",()=>this.#E(async()=>{await this.#e.reconnect();const t=await this.#e.acquireSession(s,{mode:"exclusive"});await this.#m(t),this.#$(t)}))}dispose(){if(this.#d)return this.#d;const s=this.#i;this.#s={status:"disposed"},this.#b(),this.#g(),this.#i=void 0,this.#t=void 0;const t=[...this.#f];return s&&t.push(s.dispose()),this.#d=y(t),this.#n(),this.#c.clear(),this.#d}[Symbol.asyncDispose](){return this.dispose()}async#S(s,t){if(this.#a(),this.#i&&this.phase!=="idle")throw new Error(`Cannot ${s} a session while session is ${this.phase??"unavailable"}`);await this.#h(s,()=>this.#E(()=>this.#D(s,t)))}async#E(s){const t=s();this.#f.add(t);try{await t}finally{this.#f.delete(t)}}async#D(s,t){const i=this.#i,e=await t();await this.#m(e);const n=e.snapshot;if(!n)throw await this.#p(e),new Error(`Session ${e.id} did not provide a snapshot`);if(i&&i.id!==e.id&&i.attached&&this.phase!=="idle")throw await this.#p(e),new Error(`Cannot ${s} a session while session is ${this.phase??"unavailable"}`);if(i&&i.id!==e.id&&i.attached)try{await i.detach()}catch(h){try{await this.#p(e)}catch(d){throw new AggregateError([h,d],"Failed to replace remote session attachment")}throw h}await this.#m(e),this.#$(e,n)}async#v(s,t,i){if(this.#a(),this.#r(),this.phase!=="idle")throw new Error(`Cannot ${t} while session is ${this.phase??"unavailable"}`);await this.#h(s,i)}async#h(s,t,i=!1){i?this.#o():this.#a();const e=this.#s,n={status:"busy",operation:s};this.#s=n,this.#y.add(n),this.#n();const h=t();try{await Promise.race([h,this.#C.then(()=>{throw new Error("Remote session is disposed")})])}finally{this.#y.delete(n),!this.disposed&&this.#s===n&&(this.#s=i&&this.#y.has(e)?e:this.#i?{status:"ready"}:{status:"unbound"},this.#n())}}#$(s,t){const i=t??s.snapshot;if(!i)throw new Error(`Session ${s.id} did not provide a snapshot`);this.#g(),this.#i=s,this.#t=w(i),this.#l=s.subscribe(e=>{this.#t&&(this.#t=l(this.#t,e),this.#n())}),this.#w=s.onEvent(e=>this.#R(e))}#R(s){if(s.type==="session_removed"){this.#g(),this.#i=void 0,this.#t=void 0,this.#s.status!=="busy"&&(this.#s={status:"unbound"}),this.#n();return}s.type!=="session_progress"||!this.#t||(this.#t=u(this.#t,s.progress),this.#n())}#n(){const s=this.state;for(const t of this.#c)this.#A(t,s)}#A(s,t){try{s(t)}catch(i){this.#T(i)}}#T(s){if(this.#u)try{this.#u(s instanceof Error?s:new Error(String(s)))}catch{}}#g(){this.#l?.(),this.#w?.(),this.#l=void 0,this.#w=void 0}#r(){if(!this.#i)throw new Error("No remote session is attached");return this.#i}#a(){if(this.#o(),this.#s.status==="busy")throw new Error(`Remote session is busy with ${this.#s.operation}`)}#o(){if(this.disposed)throw new Error("Remote session is disposed")}async#m(s){if(this.disposed)throw await this.#p(s),new c}async#p(s){await s.dispose()}}export{o as RemoteSession};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var o=(t,e)=>p(t,"name",{value:e,configurable:!0});function u(t){return t===null||typeof t=="boolean"||typeof t=="string"?!0:typeof t=="number"?Number.isFinite(t):Array.isArray(t)?t.every(u):typeof t!="object"||Object.getPrototypeOf(t)!==Object.prototype?!1:Object.values(t).every(u)}o(u,"isJsonValue");function y(t){try{const e=JSON.parse(t);if(u(e))return e}catch{}return t}o(y,"parsePartialToolInput");function a(t){return{snapshot:structuredClone(t),progressItems:new Map,progressOrder:[],toolCallBuffers:new Map}}o(a,"createTranscriptState");function g(t,e){return t.snapshot.id===e.id&&e.revision<t.snapshot.revision?t:a(e)}o(g,"applyTranscriptSnapshot");function C(t,e){if(e.type==="item_started"||e.type==="item_updated")return c(t,e.item);if(e.type==="item_finished"){const n=new Map(t.toolCallBuffers);for(const f of n.keys())f.startsWith(`${e.item.id}:`)&&n.delete(f);return c({...t,toolCallBuffers:n},e.item)}const i=t.progressItems.get(e.messageId)??t.snapshot.transcript.find(({id:n})=>n===e.messageId);if(!i||i.role!=="assistant")return t;let r=t.toolCallBuffers;const s=i.content.map((n,f)=>{if(f!==e.contentIndex)return structuredClone(n);if(e.kind==="text"&&n.type==="text")return{...n,text:n.text+e.delta};if(e.kind==="thinking"&&n.type==="thinking")return{...n,thinking:n.thinking+e.delta};if(e.kind==="toolCall"&&n.type==="toolCall"){const d=`${e.messageId}:${e.contentIndex}`,l=(t.toolCallBuffers.get(d)??(typeof n.input=="string"?n.input:""))+e.delta;return r=new Map(t.toolCallBuffers).set(d,l),{...n,input:y(l)}}return structuredClone(n)});return c({...t,toolCallBuffers:r},{...i,content:s})}o(C,"applyTranscriptProgress");function I(t){const e=t.snapshot.transcript.map(r=>t.progressItems.get(r.id)??r),i=new Set(e.map(r=>r.id));for(const r of t.progressOrder){if(i.has(r))continue;const s=t.progressItems.get(r);s&&(e.push(s),i.add(r))}for(const r of t.snapshot.queuedSteer)i.has(r.id)||(e.push(r),i.add(r.id));return e}o(I,"selectTranscript");function c(t,e){const i=new Map(t.progressItems),r=i.has(e.id)?t.progressOrder:[...t.progressOrder,e.id];return i.set(e.id,structuredClone(e)),{...t,progressItems:i,progressOrder:r}}o(c,"setProgressItem");export{C as applyTranscriptProgress,g as applyTranscriptSnapshot,a as createTranscriptState,I as selectTranscript};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var c=Object.defineProperty;var n=(e,r)=>c(e,"name",{value:r,configurable:!0});import{isInstallTelemetryEnabled as d}from"./telemetry.js";const s="openrouter.ai",f="integrate.api.nvidia.com",l="api.cloudflare.com",p="gateway.ai.cloudflare.com",O="opencode.ai";function t(e,r){try{return new URL(e).hostname===r}catch{return!1}}n(t,"matchesHost");function g(e){return e.provider==="openrouter"||e.baseUrl.includes(s)}n(g,"isOpenRouterModel");function b(e){return e.provider==="nvidia"||t(e.baseUrl,f)}n(b,"isNvidiaNimModel");function T(e){return e.provider==="cloudflare-workers-ai"||e.provider==="cloudflare-ai-gateway"||t(e.baseUrl,l)||t(e.baseUrl,p)}n(T,"isCloudflareModel");function v(e,r){if(d(r)){if(g(e))return{"HTTP-Referer":"https://deepailab.ai","X-OpenRouter-Title":"dal","X-OpenRouter-Categories":"cli-agent"};if(b(e))return{"X-BILLING-INVOKE-ORIGIN":"dal"};if(T(e))return{"User-Agent":"dal-coding-agent"}}}n(v,"getDefaultAttributionHeaders");function A(e,r){if(r&&!(e.provider!=="opencode"&&e.provider!=="opencode-go"&&!t(e.baseUrl,O)))return{"x-opencode-session":r,"x-opencode-client":"dal"}}n(A,"getSessionHeaders");function R(e,r,a,...u){const i={...A(e,a),...v(e,r)};for(const o of u)o&&Object.assign(i,o);return Object.keys(i).length>0?i:void 0}n(R,"mergeProviderAttributionHeaders");export{R as mergeProviderAttributionHeaders};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var i=(d,c)=>m(d,"name",{value:c,configurable:!0});import{theme as x}from"../theme/theme.js";const o="bbbab8b9b9b6b9b8b5bcbbb8b8b7b4b7b5b2b6b5b2b8b7b4b7b6b3b6b4b1bdbcb8bab8b6bbb8b5b8b5b1bbb8b4c2bebbc1bebac0bdbabfbcb9c1bebabfbebbc0bfbcc0bdbabbb8b5c1bfbcbfbcb8bbb9b6bfbcb8c2bfbcc1bfbcbfbbb8bdb9b6b8b7b5b9b8b5b8b8b5b5b5b2b6b5b2b8b7b4b9b8b5b9b8b5b6b5b3bab8b5bcbab7bbb9b6bbb8b5bfb9b5bdb2abbcb0a8beb2aabeb5afbfbab6bebab7c0bfbcbebdbabebbb8c0bdbabfbebbc2bebbbdbab7c3c0bdc3c0bdc1bebbc2bebabfbcb8bab9b6b7b6b3b2b1aeb6b5b2b5b4b1b5b4b2b6b5b2b7b6b4b9b8b6b7b6b3bbbab7b2afaba5988fb49e90b09481b79a88b39683b09583b7a395bfb6b0c0bdbabdbbb8bebcb9c1bfbcc0bebbbdbab7bebbb8c2bfbcc0bdbac0bcb9bdb9b6c0bcb8b5b4b2b4b3b0bab9b6b9b9b6b5b4b1b5b4b1b6b5b3b9b8b5b9b8b6b9b8b6b2aeaa968174a6836eaa856eab846eaf8973ac8973b08f79b18f7ab39786b7a89dbbb3aebfbab6c2c0bdbebcb9bfbdbac3c1bdc2bebbc0bcb9bdb9b6c1bdbabfbbb8b4b3b0b9b8b5b8b7b5b4b3b1b5b4b1b8b7b4b8b7b5bab9b6bbbab7b1afad8c7a719d735ca47860a87d65a98069ae8972ae8c75af8d77aa826ba98067aa8974b39e90b6a79dbbb2adc0bdbac1bfbdbfbbb8c1bdb9bebab6c0bdb9bfbbb8c1bdbab4b2b0b7b6b4b7b6b3b4b2b0bab9b7b6b5b2b6b5b2bab9b6bab9b6958c87977663aa836bac8772b08f7aad8c77b2917db0917db0907cac8971a77d64a87f67ac8972b29887b8a89dbfbab5bfbdbac1bebac0bcb9c0bcb9c0bcb9c1bebabebab7b8b7b4b7b6b4b5b4b1b5b4b2b7b6b3b5b4b2bab9b7bab9b6b4b1ada88f7fad8973ae8d78b19684b19685b29786b69a89b29582b1917daa856ea87e66a97e66ad866ea9826baf9280b8ada6bdbbb8bebab7bfbbb8c1bdbabfbbb8bcb8b4bcb8b5b6b4b2b7b5b3b6b5b2b8b7b4b3b2afb8b7b4b6b5b2b3b2b0b3a59aab856fad8d78b0917eb19886b49b8bb49a89b39785b0917eaf8f7cab866fa77d65a77a61a87d64a9816ab08f79b5a296c1bcb8c3bfbcc2bebbbebab7bfbbb7bdbab6c2bebab8b7b4b7b6b4b6b5b3b7b6b3b6b5b2b9b8b6b4b3b1b6b1acac8f7ca9826bae8f7aaf9583b49c8cb49c8bb79d8cb59987b19380ad8e79ae8c77af8e78ac8771a3775faa826bae8972b39888bbb6b2bebbb8bfbbb8bfbbb8c0bdb9bebbb7c0bdb9b6b5b2b9b8b5b4b3b1b8b7b5b4b3b0b7b6b4b6b5b3b1a7a0aa8772a77d65a88570b49887b19b8d9c887c907a6d987f71aa907faf917daf8e7aad8c78ac8b77a8836ca9836cac8770b49b8abdb6b2c0bcb9c0bdb9bfbbb8bebab7bfbcb9bebab7b9b8b6b5b4b2b9b8b5b8b7b5b8b7b4b7b6b4b5b4b2b3a9a2ad8973a1755da9856fb398858c776a65544b776358725d526e594d9c7f6eb1907ba68672ad8e7aab8771ac856db18f79b3a092beb9b5c1bdbabdb9b5bebab7bfbbb7bebab7bcb9b6b7b6b4b6b6b3b8b7b4b5b4b2b8b6b4b7b6b3b4b3b0b4aba4a6826ba3775fb08e79b19584a88e7daa8e7db29481ad8f7c997e6da38674ac8d79ac8e7aae917f9a7c6a896a599a7c6ab3a398c1bdbabdb9b6bcb8b5bebab6bebab7bdb9b5bdb9b6b5b4b1b7b5b3b5b4b2b7b6b3b7b6b4b3b3b0b3b2b0b4aca5a7846fa97f68ae8f7bae9383b59c8bb2937fae8e79ac8b76af927eaf927eb29683b39885b2988891786a72594c6e594d978d86bdbab7bab7b3c0bcb9c0bcb9bebab7bebbb7bdb9b6b3b2b0b4b3b0b5b4b2b4b4b1b4b3b1b4b3b1b4b3b0b6ada5aa8670a57a62ad8e7ab29b8cb69d8dab856fa9826aa88069ab8771af907db49987b19684b29886b59987b39480b09787b5a9a1bcb8b5bebab7bdb9b5bebab7bfbbb8bfbbb7bbb7b4b3b2afb8b7b5b8b7b5b3b2b0b5b4b2b6b5b3b6b4b1afa299a98975a9826baf907cb39988b49a89af8e7aac8973aa856eaf8c74b1917dae907dac907db39988b29785b49785b7a090b9aca3bfbab7bcb8b5bdb9b6bcb8b4bcb8b5bdb9b5bcb8b4b5b4b2b6b5b3b4b3b0b4b3b0b9b8b5b8b6b4908b88887467aa8f7ea78976ad8973b08b74b59885b69e8eb29888b1917cb1917db1937fae907cb19686b39a8ab29886b59b8ab8a192b6aaa3b7b2afbcb8b4bcb8b5bbb7b4c0bcb9bebab7c0bcb9b6b5b2b6b5b3b4b3b0bab9b7b7b6b4b1b0ae7b716ba083709b806f716158967764b08870b29481b69b8ab69f8fb39a89b69f90b49d8db39a89b29988b49c8cb6a090b8a496baa49593867f8f8986bfbbb7bdb9b5bcb7b4bab6b3b9b5b2bab6b2b4b3b1b3b3b0b6b5b3b8b7b5b4b2b0a7a5a38f837dae917ea084725a504c63544da28370b39784b59e8db2a093a698909b918b998e8790857e95877dad998bb39c8cb5a091b9a2938d827c95908dbebab6bbb7b3bdbab7bbb7b4bdb9b6bbb7b4b4b3b0b5b4b1b8b7b5b6b5b3b8b8b5b4b2af968f8ab29a8bab9485544b483a323073655d96887f70655f61595547403e453e3c453f3d57504f655e5b90847db39c8db7a090b6a09189807aaba6a3bdb9b6c0bcb9bebab7bcb7b4bebab7bbb7b4b3b2b0b6b5b3b2b1afb7b6b4b8b7b4b5b4b1aeaba8b5a89fac998d4d44412d25244d46444e4744322b293a3230423937433a37352d2a59504c534b48524a48988a81b59f8fb19c8d827974b2afacbdb9b5bcb8b4bdb9b5bcb8b5bdb9b6bab6b2b8b7b5b5b4b2b6b6b3b9b8b5b7b6b3b6b5b2b8b6b3b9b4b1b2a9a26c64612d25242d2625312a28352d2c453d3a78675c8d7a6ea09792aea6a0615854332b29524a479f8e82b09d90a49b96c1bdb9bebab7bfbbb8bbb8b4b9b5b1b8b4b0b9b4b0b7b6b4b8b7b5b8b7b4b6b5b3b8b6b3bab9b6b9b8b5b4b3b0b7b5b2a5a29f453d3b261e1d261f1e2e2625413936857268977865b19482b5a69caca5a07c7572453d3b746963a0948cc5bfbbc0bbb8beb9b6bbb7b3bbb6b3b7b3afb8b4b0b9b5b1b7b6b3b6b5b3b5b4b2b5b4b2b7b6b3b7b6b3b8b6b3b4b2afb7b6b3b3b1ae6d6765251f1e1e18172a22212d2523443b3971625ab19888b09482a89182877e792c25243e3634766d6abeb9b5bfbbb7bebab6bcb7b3bbb6b3b9b5b1b7b3afb8b4b0b4b3b0b5b4b1b5b4b1b4b3b1b5b4b2b8b6b4b5b3b0b9b6b4b5b4b1b6b4b27f79762a2322221c1b2d2524221b1a443e3c47413f6f676281766f867971675e5a3e37352a222166605dbab7b3bdb9b5beb9b5bcb7b3bcb7b3b9b4b0bab6b2bab6b2b5b3b0b6b4b2b3b2afb7b6b3b4b4b1b4b3b0b6b4b1b5b4b1b4b3b0b9b6b29a8c8252474230292828201f181212322c2c231e1d1c16162c26252923222d26252d2523332b2a8e8885bcb8b5bcb7b3bbb6b2bcb7b3b9b4b1b9b5b1b7b2afb7b2ae7a838e9b9b9caeadacb3b2b0b3b2afb7b7b4b6b5b3b6b6b3b7b6b3b9ada4a991808e7b6f50453f2b24231a14142923221f19181d17161f18182620201d17162a22215d5654b7b3b0bbb7b3bbb6b2b8b4b0bab5b1bbb6b2bab5b1b8b4b0bab6b22c496b4c5d735f68766e727a828285929090adaba8b7b2aeb6a59ab39682a28470a387748e76674e403a1a14141d1716181211221c1c1f1918221c1b2f2827342d2c8d8884bab6b3b9b5b2bab5b1bab5b1b9b4b0bab6b2b8b4b0b9b4b0b7b2ae325e8b365f8a3a5d833f5b7a545f70646469706b6aa08f84b08e78b18e769f7e689e7f6b9e816d907766584940362d2a1c1615201b1a1a1413201a1a251e1d393331a39e9bbab5b1bcb7b3bab6b2b8b3afb8b4b0b9b4b0b9b4b1bab5b2b5b0ac3d6c9843729d44719c426e98415f805a64716f6a699d8677b1927eb3947faa89749d7a649f7f6ba487749e837186716454463f2c25231e181837302e3a33317a7471beb9b6bcb8b4bbb6b2b6b2aebab5b1b9b5b1b8b3afbab6b2b6b1adb5aeaa4877a14c7aa44e7ba345719a3a5d80586b7f767475927b6eb1927faf8e79b08e78a78169a07861a17f6aa58570a688749b83738270666f66618a8480a49e99b7b2aebab6b2bcb8b4b9b5b1b7b2aebab5b1b9b4b0b6b1aeb6b1adb2aca8b2aca84876a04a78a2517fa74771973a5d80405c7a6161677c695fac8a75b08d77b4917aaf8971ad876fa5816aa6846ea78670a98a76ac9484ab9f96b2aca8bdb8b4bcb7b3bcb8b4bcb8b4b8b3afb7b2aeb9b4b0b8b3afb8b2aeb6afabb3aeaab2aeaa4878a14b7aa34c7ba44a759b3d63873b5f825b67766f5f569c7e6caf8c77b18f79b28f78b5927caf8e78a98872aa8a76a98a76ac917fada199b7b0acb9b3afbfb9b5c1bab6bdb6b2b8b3afbab5b1b9b4b0b6afabb7b1adb3ada9b3aeaab0aba8",n=32,l=32;function g(){const d=[];for(let c=0;c<l;c++){const e=[];for(let b=0;b<n;b++){const a=(c*n+b)*6,t=parseInt(o.slice(a,a+2),16),s=parseInt(o.slice(a+2,a+4),16),f=parseInt(o.slice(a+4,a+6),16);e.push([t,s,f])}d.push(e)}return d}i(g,"parseImage");function r(d,c,e,b=!1){return`\x1B[${b?48:38};2;${d};${c};${e}m`}i(r,"rgb");const u="\x1B[0m";function k(){const d=g(),c=[];for(let e=0;e<l;e+=2){let b="";for(let a=0;a<n;a++){const t=d[e][a],s=d[e+1]?.[a]??t;b+=`${r(s[0],s[1],s[2])}${r(t[0],t[1],t[2],!0)}\u2584`}b+=u,c.push(b)}return c}i(k,"buildImage");class I{static{i(this,"DaxnutsComponent")}ui;image;interval=null;tick=0;maxTicks=25;cachedLines=[];cachedWidth=0;cachedTick=-1;constructor(c){this.ui=c,this.image=k(),this.startAnimation()}invalidate(){this.cachedWidth=0}startAnimation(){this.interval=setInterval(()=>{this.tick++,this.tick>=this.maxTicks&&this.stopAnimation(),this.cachedWidth=0,this.ui.requestRender()},80)}stopAnimation(){this.interval&&(clearInterval(this.interval),this.interval=null)}render(c){if(c===this.cachedWidth&&this.cachedTick===this.tick)return this.cachedLines;const e=x,b=[],a=i(f=>{const h=f.replace(/\x1b\[[0-9;]*m/g,"").length,p=Math.max(0,Math.floor((c-h)/2));return" ".repeat(p)+f},"center");b.push("");const t=Math.min(this.image.length,Math.floor(this.tick/this.maxTicks*(this.image.length+3)));for(let f=0;f<this.image.length;f++)if(f<t)b.push(a(this.image[f]));else if(f===t){const h="\u2593".repeat(n);b.push(a(r(100,200,255)+h+u))}else b.push(a(" ".repeat(n)));b.push("");const s=Math.max(0,this.tick-this.maxTicks*.6);return s>0||this.tick>=this.maxTicks?(b.push(a(e.fg("accent","Free Kimi K2.5 via OpenCode Zen"))),b.push(a(e.fg("success",'"Powered by daxnuts"'))),b.push(a(e.fg("muted","\u2014 @thdxr")))):(b.push(""),b.push(""),b.push("")),b.push(""),s>2||this.tick>=this.maxTicks?(b.push(a(e.fg("dim","Try OpenCode"))),b.push(a(e.fg("mdLink","https://mistral.ai/news/mistral-vibe-2-0")))):(b.push(""),b.push("")),b.push(""),this.cachedLines=b,this.cachedWidth=c,this.cachedTick=this.tick,b}dispose(){this.stopAnimation()}}export{I as DaxnutsComponent};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var m=(i,n)=>p(i,"name",{value:n,configurable:!0});import{Type as t}from"typebox";import{Compile as f}from"typebox/compile";const e=t.Union([t.String(),t.Integer({minimum:0,maximum:255})]),x=t.Object({$schema:t.Optional(t.String()),name:t.String(),vars:t.Optional(t.Record(t.String(),e)),colors:t.Object({accent:e,border:e,borderAccent:e,borderMuted:e,success:e,error:e,warning:e,muted:e,dim:e,text:e,thinkingText:e,scrollbarTrack:t.Optional(e),scrollbarThumb:t.Optional(e),selectedBg:e,searchMatchBg:t.Optional(e),searchMatchText:t.Optional(e),userMessageBg:e,userMessageText:e,customMessageBg:e,customMessageText:e,customMessageLabel:e,toolPendingBg:e,toolSuccessBg:e,toolErrorBg:e,toolTitle:e,toolOutput:e,mdHeading:e,mdLink:e,mdLinkUrl:e,mdCode:e,mdCodeBlock:e,mdCodeBlockBorder:e,mdQuote:e,mdQuoteBorder:e,mdHr:e,mdListBullet:e,toolDiffAdded:e,toolDiffRemoved:e,toolDiffContext:e,syntaxComment:e,syntaxKeyword:e,syntaxFunction:e,syntaxVariable:e,syntaxString:e,syntaxNumber:e,syntaxType:e,syntaxOperator:e,syntaxPunctuation:e,thinkingOff:e,thinkingMinimal:e,thinkingLow:e,thinkingMedium:e,thinkingHigh:e,thinkingXhigh:e,thinkingMax:t.Optional(e),bashMode:e}),export:t.Optional(t.Object({pageBg:t.Optional(e),cardBg:t.Optional(e),infoBg:t.Optional(e)}))}),l=f(x);function b(i,n){if(!l.Check(n)){const d=Array.from(l.Errors(n)),a=new Set,c=[];for(const o of d){if(o.keyword==="required"&&o.instancePath==="/colors"){const g=o.params.requiredProperties;for(const u of g??[])a.add(u);continue}const h=o.instancePath||"/";c.push(` - ${h}: ${o.message}`)}let r=`Invalid theme "${i}":
|
|
2
|
-
`;throw a.size>0&&(r+=`
|
|
3
|
-
Missing required color tokens:
|
|
4
|
-
`,r+=Array.from(a).sort().map(o=>` - ${o}`).join(`
|
|
5
|
-
`),r+=`
|
|
6
|
-
|
|
7
|
-
Please add these colors to your theme's "colors" object.`,r+=`
|
|
8
|
-
See the built-in themes (dark.json, light.json) for reference values.`),c.length>0&&(r+=`
|
|
9
|
-
|
|
10
|
-
Other errors:
|
|
11
|
-
${c.join(`
|
|
12
|
-
`)}`),new Error(r)}const s=n;if(s.name.includes("/"))throw new Error(`Invalid theme name "${s.name}": theme names cannot contain "/" because it is reserved for automatic light/dark theme settings.`);return s}m(b,"validateThemeJson");export{b as validateThemeJson};
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Pi Coding Agent Theme",
|
|
4
|
-
"description": "Theme schema for Pi coding agent",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"required": ["name", "colors"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"$schema": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "JSON schema reference"
|
|
11
|
-
},
|
|
12
|
-
"name": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"pattern": "^[^/]+$",
|
|
15
|
-
"description": "Theme name. Must not contain '/' because it is reserved for automatic light/dark theme settings."
|
|
16
|
-
},
|
|
17
|
-
"vars": {
|
|
18
|
-
"type": "object",
|
|
19
|
-
"description": "Reusable color variables",
|
|
20
|
-
"additionalProperties": {
|
|
21
|
-
"oneOf": [
|
|
22
|
-
{
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "Hex color (#RRGGBB), variable reference, or empty string for terminal default"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"type": "integer",
|
|
28
|
-
"minimum": 0,
|
|
29
|
-
"maximum": 255,
|
|
30
|
-
"description": "256-color palette index (0-255)"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"colors": {
|
|
36
|
-
"type": "object",
|
|
37
|
-
"description": "Theme color definitions (scrollbar, thinkingMax, and search highlight colors are optional and use compatible fallbacks)",
|
|
38
|
-
"required": [
|
|
39
|
-
"accent",
|
|
40
|
-
"border",
|
|
41
|
-
"borderAccent",
|
|
42
|
-
"borderMuted",
|
|
43
|
-
"success",
|
|
44
|
-
"error",
|
|
45
|
-
"warning",
|
|
46
|
-
"muted",
|
|
47
|
-
"dim",
|
|
48
|
-
"text",
|
|
49
|
-
"thinkingText",
|
|
50
|
-
"selectedBg",
|
|
51
|
-
"userMessageBg",
|
|
52
|
-
"userMessageText",
|
|
53
|
-
"customMessageBg",
|
|
54
|
-
"customMessageText",
|
|
55
|
-
"customMessageLabel",
|
|
56
|
-
"toolPendingBg",
|
|
57
|
-
"toolSuccessBg",
|
|
58
|
-
"toolErrorBg",
|
|
59
|
-
"toolTitle",
|
|
60
|
-
"toolOutput",
|
|
61
|
-
"mdHeading",
|
|
62
|
-
"mdLink",
|
|
63
|
-
"mdLinkUrl",
|
|
64
|
-
"mdCode",
|
|
65
|
-
"mdCodeBlock",
|
|
66
|
-
"mdCodeBlockBorder",
|
|
67
|
-
"mdQuote",
|
|
68
|
-
"mdQuoteBorder",
|
|
69
|
-
"mdHr",
|
|
70
|
-
"mdListBullet",
|
|
71
|
-
"toolDiffAdded",
|
|
72
|
-
"toolDiffRemoved",
|
|
73
|
-
"toolDiffContext",
|
|
74
|
-
"syntaxComment",
|
|
75
|
-
"syntaxKeyword",
|
|
76
|
-
"syntaxFunction",
|
|
77
|
-
"syntaxVariable",
|
|
78
|
-
"syntaxString",
|
|
79
|
-
"syntaxNumber",
|
|
80
|
-
"syntaxType",
|
|
81
|
-
"syntaxOperator",
|
|
82
|
-
"syntaxPunctuation",
|
|
83
|
-
"thinkingOff",
|
|
84
|
-
"thinkingMinimal",
|
|
85
|
-
"thinkingLow",
|
|
86
|
-
"thinkingMedium",
|
|
87
|
-
"thinkingHigh",
|
|
88
|
-
"thinkingXhigh",
|
|
89
|
-
"bashMode"
|
|
90
|
-
],
|
|
91
|
-
"properties": {
|
|
92
|
-
"accent": {
|
|
93
|
-
"$ref": "#/$defs/colorValue",
|
|
94
|
-
"description": "Primary accent color (logo, selected items, cursor)"
|
|
95
|
-
},
|
|
96
|
-
"border": {
|
|
97
|
-
"$ref": "#/$defs/colorValue",
|
|
98
|
-
"description": "Normal borders"
|
|
99
|
-
},
|
|
100
|
-
"borderAccent": {
|
|
101
|
-
"$ref": "#/$defs/colorValue",
|
|
102
|
-
"description": "Highlighted borders"
|
|
103
|
-
},
|
|
104
|
-
"borderMuted": {
|
|
105
|
-
"$ref": "#/$defs/colorValue",
|
|
106
|
-
"description": "Subtle borders"
|
|
107
|
-
},
|
|
108
|
-
"success": {
|
|
109
|
-
"$ref": "#/$defs/colorValue",
|
|
110
|
-
"description": "Success states"
|
|
111
|
-
},
|
|
112
|
-
"error": {
|
|
113
|
-
"$ref": "#/$defs/colorValue",
|
|
114
|
-
"description": "Error states"
|
|
115
|
-
},
|
|
116
|
-
"warning": {
|
|
117
|
-
"$ref": "#/$defs/colorValue",
|
|
118
|
-
"description": "Warning states"
|
|
119
|
-
},
|
|
120
|
-
"muted": {
|
|
121
|
-
"$ref": "#/$defs/colorValue",
|
|
122
|
-
"description": "Secondary/dimmed text"
|
|
123
|
-
},
|
|
124
|
-
"dim": {
|
|
125
|
-
"$ref": "#/$defs/colorValue",
|
|
126
|
-
"description": "Very dimmed text (more subtle than muted)"
|
|
127
|
-
},
|
|
128
|
-
"text": {
|
|
129
|
-
"$ref": "#/$defs/colorValue",
|
|
130
|
-
"description": "Default text color (usually empty string)"
|
|
131
|
-
},
|
|
132
|
-
"thinkingText": {
|
|
133
|
-
"$ref": "#/$defs/colorValue",
|
|
134
|
-
"description": "Thinking block text color"
|
|
135
|
-
},
|
|
136
|
-
"selectedBg": {
|
|
137
|
-
"$ref": "#/$defs/colorValue",
|
|
138
|
-
"description": "Selected item background"
|
|
139
|
-
},
|
|
140
|
-
"scrollbarTrack": {
|
|
141
|
-
"$ref": "#/$defs/colorValue",
|
|
142
|
-
"description": "Fullscreen scrollbar track foreground (falls back to muted when omitted)"
|
|
143
|
-
},
|
|
144
|
-
"scrollbarThumb": {
|
|
145
|
-
"$ref": "#/$defs/colorValue",
|
|
146
|
-
"description": "Fullscreen scrollbar thumb foreground (falls back to text when omitted)"
|
|
147
|
-
},
|
|
148
|
-
"searchMatchBg": {
|
|
149
|
-
"$ref": "#/$defs/colorValue",
|
|
150
|
-
"description": "Transcript search match background and current-match text (falls back to selectedBg when omitted)"
|
|
151
|
-
},
|
|
152
|
-
"searchMatchText": {
|
|
153
|
-
"$ref": "#/$defs/colorValue",
|
|
154
|
-
"description": "Transcript search match text and current-match background (falls back to text when omitted)"
|
|
155
|
-
},
|
|
156
|
-
"userMessageBg": {
|
|
157
|
-
"$ref": "#/$defs/colorValue",
|
|
158
|
-
"description": "User message background"
|
|
159
|
-
},
|
|
160
|
-
"userMessageText": {
|
|
161
|
-
"$ref": "#/$defs/colorValue",
|
|
162
|
-
"description": "User message text color"
|
|
163
|
-
},
|
|
164
|
-
"customMessageBg": {
|
|
165
|
-
"$ref": "#/$defs/colorValue",
|
|
166
|
-
"description": "Custom message background (hook-injected messages)"
|
|
167
|
-
},
|
|
168
|
-
"customMessageText": {
|
|
169
|
-
"$ref": "#/$defs/colorValue",
|
|
170
|
-
"description": "Custom message text color"
|
|
171
|
-
},
|
|
172
|
-
"customMessageLabel": {
|
|
173
|
-
"$ref": "#/$defs/colorValue",
|
|
174
|
-
"description": "Custom message type label color"
|
|
175
|
-
},
|
|
176
|
-
"toolPendingBg": {
|
|
177
|
-
"$ref": "#/$defs/colorValue",
|
|
178
|
-
"description": "Tool execution box (pending state)"
|
|
179
|
-
},
|
|
180
|
-
"toolSuccessBg": {
|
|
181
|
-
"$ref": "#/$defs/colorValue",
|
|
182
|
-
"description": "Tool execution box (success state)"
|
|
183
|
-
},
|
|
184
|
-
"toolErrorBg": {
|
|
185
|
-
"$ref": "#/$defs/colorValue",
|
|
186
|
-
"description": "Tool execution box (error state)"
|
|
187
|
-
},
|
|
188
|
-
"toolTitle": {
|
|
189
|
-
"$ref": "#/$defs/colorValue",
|
|
190
|
-
"description": "Tool execution box title color"
|
|
191
|
-
},
|
|
192
|
-
"toolOutput": {
|
|
193
|
-
"$ref": "#/$defs/colorValue",
|
|
194
|
-
"description": "Tool execution box output text color"
|
|
195
|
-
},
|
|
196
|
-
"mdHeading": {
|
|
197
|
-
"$ref": "#/$defs/colorValue",
|
|
198
|
-
"description": "Markdown heading text"
|
|
199
|
-
},
|
|
200
|
-
"mdLink": {
|
|
201
|
-
"$ref": "#/$defs/colorValue",
|
|
202
|
-
"description": "Markdown link text"
|
|
203
|
-
},
|
|
204
|
-
"mdLinkUrl": {
|
|
205
|
-
"$ref": "#/$defs/colorValue",
|
|
206
|
-
"description": "Markdown link URL"
|
|
207
|
-
},
|
|
208
|
-
"mdCode": {
|
|
209
|
-
"$ref": "#/$defs/colorValue",
|
|
210
|
-
"description": "Markdown inline code"
|
|
211
|
-
},
|
|
212
|
-
"mdCodeBlock": {
|
|
213
|
-
"$ref": "#/$defs/colorValue",
|
|
214
|
-
"description": "Markdown code block content"
|
|
215
|
-
},
|
|
216
|
-
"mdCodeBlockBorder": {
|
|
217
|
-
"$ref": "#/$defs/colorValue",
|
|
218
|
-
"description": "Markdown code block fences"
|
|
219
|
-
},
|
|
220
|
-
"mdQuote": {
|
|
221
|
-
"$ref": "#/$defs/colorValue",
|
|
222
|
-
"description": "Markdown blockquote text"
|
|
223
|
-
},
|
|
224
|
-
"mdQuoteBorder": {
|
|
225
|
-
"$ref": "#/$defs/colorValue",
|
|
226
|
-
"description": "Markdown blockquote border"
|
|
227
|
-
},
|
|
228
|
-
"mdHr": {
|
|
229
|
-
"$ref": "#/$defs/colorValue",
|
|
230
|
-
"description": "Markdown horizontal rule"
|
|
231
|
-
},
|
|
232
|
-
"mdListBullet": {
|
|
233
|
-
"$ref": "#/$defs/colorValue",
|
|
234
|
-
"description": "Markdown list bullets/numbers"
|
|
235
|
-
},
|
|
236
|
-
"toolDiffAdded": {
|
|
237
|
-
"$ref": "#/$defs/colorValue",
|
|
238
|
-
"description": "Added lines in tool diffs"
|
|
239
|
-
},
|
|
240
|
-
"toolDiffRemoved": {
|
|
241
|
-
"$ref": "#/$defs/colorValue",
|
|
242
|
-
"description": "Removed lines in tool diffs"
|
|
243
|
-
},
|
|
244
|
-
"toolDiffContext": {
|
|
245
|
-
"$ref": "#/$defs/colorValue",
|
|
246
|
-
"description": "Context lines in tool diffs"
|
|
247
|
-
},
|
|
248
|
-
"syntaxComment": {
|
|
249
|
-
"$ref": "#/$defs/colorValue",
|
|
250
|
-
"description": "Syntax highlighting: comments"
|
|
251
|
-
},
|
|
252
|
-
"syntaxKeyword": {
|
|
253
|
-
"$ref": "#/$defs/colorValue",
|
|
254
|
-
"description": "Syntax highlighting: keywords"
|
|
255
|
-
},
|
|
256
|
-
"syntaxFunction": {
|
|
257
|
-
"$ref": "#/$defs/colorValue",
|
|
258
|
-
"description": "Syntax highlighting: function names"
|
|
259
|
-
},
|
|
260
|
-
"syntaxVariable": {
|
|
261
|
-
"$ref": "#/$defs/colorValue",
|
|
262
|
-
"description": "Syntax highlighting: variable names"
|
|
263
|
-
},
|
|
264
|
-
"syntaxString": {
|
|
265
|
-
"$ref": "#/$defs/colorValue",
|
|
266
|
-
"description": "Syntax highlighting: string literals"
|
|
267
|
-
},
|
|
268
|
-
"syntaxNumber": {
|
|
269
|
-
"$ref": "#/$defs/colorValue",
|
|
270
|
-
"description": "Syntax highlighting: number literals"
|
|
271
|
-
},
|
|
272
|
-
"syntaxType": {
|
|
273
|
-
"$ref": "#/$defs/colorValue",
|
|
274
|
-
"description": "Syntax highlighting: type names"
|
|
275
|
-
},
|
|
276
|
-
"syntaxOperator": {
|
|
277
|
-
"$ref": "#/$defs/colorValue",
|
|
278
|
-
"description": "Syntax highlighting: operators"
|
|
279
|
-
},
|
|
280
|
-
"syntaxPunctuation": {
|
|
281
|
-
"$ref": "#/$defs/colorValue",
|
|
282
|
-
"description": "Syntax highlighting: punctuation"
|
|
283
|
-
},
|
|
284
|
-
"thinkingOff": {
|
|
285
|
-
"$ref": "#/$defs/colorValue",
|
|
286
|
-
"description": "Thinking level border: off"
|
|
287
|
-
},
|
|
288
|
-
"thinkingMinimal": {
|
|
289
|
-
"$ref": "#/$defs/colorValue",
|
|
290
|
-
"description": "Thinking level border: minimal"
|
|
291
|
-
},
|
|
292
|
-
"thinkingLow": {
|
|
293
|
-
"$ref": "#/$defs/colorValue",
|
|
294
|
-
"description": "Thinking level border: low"
|
|
295
|
-
},
|
|
296
|
-
"thinkingMedium": {
|
|
297
|
-
"$ref": "#/$defs/colorValue",
|
|
298
|
-
"description": "Thinking level border: medium"
|
|
299
|
-
},
|
|
300
|
-
"thinkingHigh": {
|
|
301
|
-
"$ref": "#/$defs/colorValue",
|
|
302
|
-
"description": "Thinking level border: high"
|
|
303
|
-
},
|
|
304
|
-
"thinkingXhigh": {
|
|
305
|
-
"$ref": "#/$defs/colorValue",
|
|
306
|
-
"description": "Thinking level border: xhigh"
|
|
307
|
-
},
|
|
308
|
-
"thinkingMax": {
|
|
309
|
-
"$ref": "#/$defs/colorValue",
|
|
310
|
-
"description": "Thinking level border: max (falls back to thinkingXhigh when omitted)"
|
|
311
|
-
},
|
|
312
|
-
"bashMode": {
|
|
313
|
-
"$ref": "#/$defs/colorValue",
|
|
314
|
-
"description": "Editor border color in bash mode"
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
"additionalProperties": false
|
|
318
|
-
},
|
|
319
|
-
"export": {
|
|
320
|
-
"type": "object",
|
|
321
|
-
"description": "Optional colors for HTML export (defaults derived from userMessageBg if not specified)",
|
|
322
|
-
"properties": {
|
|
323
|
-
"pageBg": {
|
|
324
|
-
"$ref": "#/$defs/colorValue",
|
|
325
|
-
"description": "Page background color"
|
|
326
|
-
},
|
|
327
|
-
"cardBg": {
|
|
328
|
-
"$ref": "#/$defs/colorValue",
|
|
329
|
-
"description": "Card/container background color"
|
|
330
|
-
},
|
|
331
|
-
"infoBg": {
|
|
332
|
-
"$ref": "#/$defs/colorValue",
|
|
333
|
-
"description": "Info sections background (system prompt, notices)"
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
"additionalProperties": false
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
"additionalProperties": false,
|
|
340
|
-
"$defs": {
|
|
341
|
-
"colorValue": {
|
|
342
|
-
"oneOf": [
|
|
343
|
-
{
|
|
344
|
-
"type": "string",
|
|
345
|
-
"description": "Hex color (#RRGGBB), variable reference, or empty string for terminal default"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"type": "integer",
|
|
349
|
-
"minimum": 0,
|
|
350
|
-
"maximum": 255,
|
|
351
|
-
"description": "256-color palette index (0-255)"
|
|
352
|
-
}
|
|
353
|
-
]
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Closed as r,HarnessClosed as s,HarnessFault as i,InvalidLane as l,InvalidMessage as m,InvalidNavigation as p,LaneBusy as c,NoActiveOperation as g,NoActiveRun as d,NothingToCompact as v,NothingToResume as N,OperationMismatch as k,UnknownSkill as u,UnknownTarget as A,UnknownTemplate as H}from"./result.js";import{SliceNotImplemented as T}from"./runtime/types.js";import{createAgentHarness as e}from"./runtime/harness.js";const o={create:e};export{o as AgentHarness,r as Closed,s as HarnessClosed,i as HarnessFault,l as InvalidLane,m as InvalidMessage,p as InvalidNavigation,c as LaneBusy,g as NoActiveOperation,d as NoActiveRun,v as NothingToCompact,N as NothingToResume,k as OperationMismatch,T as SliceNotImplemented,u as UnknownSkill,A as UnknownTarget,H as UnknownTemplate};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var S=Object.defineProperty;var p=(e,a)=>S(e,"name",{value:a,configurable:!0});import{contentText as F}from"@earendil-works/pi-ai";import{convertToLlm as b,createBranchSummaryMessage as R,createCompactionSummaryMessage as k}from"../messages.js";import{BranchSummaryError as w,err as x,ok as A}from"../types.js";import{completeSimpleWithRetries as T,createSummaryRequestOptions as B,estimateTokens as E,SUMMARIZATION_SYSTEM_PROMPT as P}from"./compaction.js";import{computeFileLists as v,createFileOps as I,extractFileOpsFromMessage as O,formatFileOperations as _,serializeConversation as C}from"./utils.js";async function K(e,a,i,c,r){if(!i)return{entries:[],commonAncestorId:null};const t=new Set((await e.findEntries({start:i},r)).map(n=>n.id)),s=await e.findEntries({start:c},r);let o=null;for(const n of s)if(t.has(n.id)){o=n.id;break}const m=[];let u=i;for(;u&&u!==o;){const n=await a.getEntry(u,r);if(!n)throw new Error(`Corrupt session: entry ${u} not found`);m.push(n),u=n.parentId}return m.reverse(),{entries:m,commonAncestorId:o}}p(K,"collectEntriesForBranchSummary");function W(e){switch(e.type){case"message":return e.message.role==="toolResult"?void 0:e.message;case"branch_summary":return R(e.summary,e.fromId,e.timestamp);case"compaction":return k(e.summary,e.tokensBefore,e.timestamp);case"custom":return}}p(W,"getMessageFromEntry");function N(e,a=0){const i=[],c=I();let r=0;for(const t of e)if(!(t.type!=="branch_summary"||typeof t.details!="object"||t.details===null||Array.isArray(t.details))){if(Array.isArray(t.details.readFiles))for(const s of t.details.readFiles)typeof s=="string"&&c.read.add(s);if(Array.isArray(t.details.modifiedFiles))for(const s of t.details.modifiedFiles)typeof s=="string"&&c.edited.add(s)}for(let t=e.length-1;t>=0;t--){const s=e[t],o=W(s);if(!o)continue;O(o,c);const m=E(o);if(a>0&&r+m>a){(s.type==="compaction"||s.type==="branch_summary")&&r<a*.9&&(i.unshift(o),r+=m);break}i.unshift(o),r+=m}return{messages:i,fileOps:c,totalTokens:r}}p(N,"prepareBranchEntries");const $=`The user explored a different conversation branch before returning here.
|
|
2
|
-
Summary of that exploration:
|
|
3
|
-
|
|
4
|
-
`,M=`Create a structured summary of this conversation branch for context when returning later.
|
|
5
|
-
|
|
6
|
-
Use this EXACT format:
|
|
7
|
-
|
|
8
|
-
## Goal
|
|
9
|
-
[What was the user trying to accomplish in this branch?]
|
|
10
|
-
|
|
11
|
-
## Constraints & Preferences
|
|
12
|
-
- [Any constraints, preferences, or requirements mentioned]
|
|
13
|
-
- [Or "(none)" if none were mentioned]
|
|
14
|
-
|
|
15
|
-
## Progress
|
|
16
|
-
### Done
|
|
17
|
-
- [x] [Completed tasks/changes]
|
|
18
|
-
|
|
19
|
-
### In Progress
|
|
20
|
-
- [ ] [Work that was started but not finished]
|
|
21
|
-
|
|
22
|
-
### Blocked
|
|
23
|
-
- [Issues preventing progress, if any]
|
|
24
|
-
|
|
25
|
-
## Key Decisions
|
|
26
|
-
- **[Decision]**: [Brief rationale]
|
|
27
|
-
|
|
28
|
-
## Next Steps
|
|
29
|
-
1. [What should happen next to continue this work]
|
|
30
|
-
|
|
31
|
-
Keep each section concise. Preserve exact file paths, function names, and error messages.`;function j(e,a,i){const{models:c,model:r,customInstructions:t,replaceInstructions:s,reserveTokens:o=16384,retry:m,callbacks:u}=a,n=r.contextWindow||128e3,h=N(e,n-o);return U(h,{customInstructions:t,replaceInstructions:s},(d,f,l)=>T(c,r,d,f,m,u,l),i)}p(j,"generateBranchSummary");async function U(e,a,i,c){const{customInstructions:r,replaceInstructions:t}=a,{messages:s,fileOps:o}=e;if(s.length===0)return A({summary:"No content to summarize",readFiles:[],modifiedFiles:[]});const m=b(s),u=C(m);let n;t&&r?n=r:r?n=`${M}
|
|
32
|
-
|
|
33
|
-
Additional focus: ${r}`:n=M;const d=[{role:"user",content:[{type:"text",text:`<conversation>
|
|
34
|
-
${u}
|
|
35
|
-
</conversation>
|
|
36
|
-
|
|
37
|
-
${n}`}],timestamp:Date.now()}],f=await i({systemPrompt:P,messages:d},B({maxTokens:2048},c),c);if(f.stopReason==="aborted")return x(new w("aborted",f.errorMessage||"Branch summary aborted"));if(f.stopReason==="error")return x(new w("summarization_failed",`Branch summary failed: ${f.errorMessage||"Unknown error"}`));let l=F(f.content);l=$+l;const{readFiles:y,modifiedFiles:g}=v(o);return l+=_(y,g),A({summary:l||"No summary generated",usage:f.usage,readFiles:y,modifiedFiles:g})}p(U,"generateBranchSummaryWithRequest");export{K as collectEntriesForBranchSummary,j as generateBranchSummary,U as generateBranchSummaryWithRequest,N as prepareBranchEntries};
|
package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
var K=Object.defineProperty;var m=(e,t)=>K(e,"name",{value:t,configurable:!0});import{contentText as E,retryAssistantCall as B,uuidv7 as L}from"@earendil-works/pi-ai";import{getTelemetryContext as W}from"../context.js";import{convertToLlm as O,createBranchSummaryMessage as q,createCompactionSummaryMessage as Y}from"../messages.js";import{buildContextEntries as V,sessionEntryToContextMessages as X}from"../session/context.js";import{CompactionError as b,err as x,ok as k}from"../types.js";import{addUsage as G}from"../utils/usage.js";import{computeFileLists as Z,createFileOps as J,extractFileOpsFromMessage as U,formatFileOperations as j,serializeConversation as F}from"./utils.js";function H(e){try{return JSON.stringify(e)??"undefined"}catch{return"[unserializable]"}}m(H,"safeJsonStringify");function Q(e,t,r){const s=J();if(r>=0){const n=t[r];if(typeof n.details=="object"&&n.details!==null&&!Array.isArray(n.details)){if(Array.isArray(n.details.readFiles))for(const o of n.details.readFiles)typeof o=="string"&&s.read.add(o);if(Array.isArray(n.details.modifiedFiles))for(const o of n.details.modifiedFiles)typeof o=="string"&&s.edited.add(o)}}for(const n of e)U(n,s);return s}m(Q,"extractFileOperations");function ee(e){if(e.type==="message")return e.message;if(e.type==="branch_summary")return q(e.summary,e.fromId,e.timestamp);if(e.type==="compaction")return Y(e.summary,e.tokensBefore,e.timestamp)}m(ee,"getMessageFromEntry");function P(e){if(e.type!=="compaction")return ee(e)}m(P,"getMessageFromEntryForCompaction");function w(e,t){return{...e,signal:t.abortSignal,telemetryContext:W(t),cacheRetention:"none",sessionId:e.sessionId??L()}}m(w,"createSummaryRequestOptions");async function N(e,t,r,s,n,o,c){const i=w(s,c);return B(()=>e.completeSimple(t,r,i),n,i.signal,o)}m(N,"completeSimpleWithRetries");const Se={enabled:!0,reserveTokens:16384,keepRecentTokens:2e4};function _(e){return e.totalTokens||e.input+e.output+e.cacheRead+e.cacheWrite}m(_,"calculateContextTokens");function D(e){if(e.role==="assistant"&&"usage"in e){const t=e;if(t.stopReason!=="aborted"&&t.stopReason!=="error"&&t.usage&&_(t.usage)>0)return t.usage}}m(D,"getAssistantUsage");function Ie(e){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r.type==="message"){const s=D(r.message);if(s)return s}}}m(Ie,"getLastAssistantUsage");function te(e){for(let t=e.length-1;t>=0;t--){const r=D(e[t]);if(r)return{usage:r,index:t}}}m(te,"getLastAssistantUsageInfo");function ne(e){const t=te(e);if(!t){let n=0;for(const o of e)n+=C(o);return{tokens:n,usageTokens:0,trailingTokens:n,lastUsageIndex:null}}const r=_(t.usage);let s=0;for(let n=t.index+1;n<e.length;n++)s+=C(e[n]);return{tokens:r+s,usageTokens:r,trailingTokens:s,lastUsageIndex:t.index}}m(ne,"estimateContextTokens");function be(e,t,r){return r.enabled?e>t-r.reserveTokens:!1}m(be,"shouldCompact");const se=4800;function z(e){if(typeof e=="string")return e.length;let t=0;for(const r of e)r.type==="text"&&r.text?t+=r.text.length:r.type==="image"&&(t+=se);return t}m(z,"estimateTextAndImageContentChars");function C(e){let t=0;switch(e.role){case"user":return t=z(e.content),Math.ceil(t/4);case"assistant":{const r=e;for(const s of r.content)s.type==="text"?t+=s.text.length:s.type==="thinking"?t+=s.thinking.length:s.type==="toolCall"&&(t+=s.name.length+H(s.arguments).length);return Math.ceil(t/4)}case"custom":case"toolResult":return t=z(e.content),Math.ceil(t/4);case"bashExecution":return t=e.command.length+e.output.length,Math.ceil(t/4);case"branchSummary":case"compactionSummary":return t=e.summary.length,Math.ceil(t/4)}return 0}m(C,"estimateTokens");function re(e,t,r){const s=[];for(let n=t;n<r;n++){const o=e[n];switch(o.type){case"message":{switch(o.message.role){case"bashExecution":case"custom":case"branchSummary":case"compactionSummary":case"user":case"assistant":s.push(n);break;case"toolResult":break}break}case"compaction":case"branch_summary":case"custom":break}o.type==="branch_summary"&&s.push(n)}return s}m(re,"findValidCutPoints");function oe(e,t,r){for(let s=t;s>=r;s--){const n=e[s];if(n.type==="branch_summary")return s;if(n.type==="message"){const o=n.message.role;if(o==="user"||o==="bashExecution")return s}}return-1}m(oe,"findTurnStartIndex");function ae(e,t,r,s){const n=re(e,t,r);if(n.length===0)return{firstKeptEntryIndex:t,turnStartIndex:-1,isSplitTurn:!1};let o=0,c=n[0];for(let u=r-1;u>=t;u--){const h=e[u];if(h.type!=="message")continue;const p=C(h.message);if(o+=p,o>=s){for(let a=0;a<n.length;a++)if(n[a]>=u){c=n[a];break}break}}for(;c>t;){const u=e[c-1];if(u.type==="compaction"||u.type==="message")break;c--}const i=e[c],l=i.type==="message"&&i.message.role==="user",f=l?-1:oe(e,c,t);return{firstKeptEntryIndex:c,turnStartIndex:f,isSplitTurn:!l&&f!==-1}}m(ae,"findCutPoint");const $=`You are a context summarization assistant. Your task is to read a conversation between a user and an AI assistant, then produce a structured summary following the exact format specified.
|
|
2
|
-
|
|
3
|
-
Do NOT continue the conversation. Do NOT respond to any questions in the conversation. ONLY output the structured summary.`,ie=`The messages above are a conversation to summarize. Create a structured context checkpoint summary that another LLM will use to continue the work.
|
|
4
|
-
|
|
5
|
-
Use this EXACT format:
|
|
6
|
-
|
|
7
|
-
## Goal
|
|
8
|
-
[What is the user trying to accomplish? Can be multiple items if the session covers different tasks.]
|
|
9
|
-
|
|
10
|
-
## Constraints & Preferences
|
|
11
|
-
- [Any constraints, preferences, or requirements mentioned by user]
|
|
12
|
-
- [Or "(none)" if none were mentioned]
|
|
13
|
-
|
|
14
|
-
## Progress
|
|
15
|
-
### Done
|
|
16
|
-
- [x] [Completed tasks/changes]
|
|
17
|
-
|
|
18
|
-
### In Progress
|
|
19
|
-
- [ ] [Current work]
|
|
20
|
-
|
|
21
|
-
### Blocked
|
|
22
|
-
- [Issues preventing progress, if any]
|
|
23
|
-
|
|
24
|
-
## Key Decisions
|
|
25
|
-
- **[Decision]**: [Brief rationale]
|
|
26
|
-
|
|
27
|
-
## Next Steps
|
|
28
|
-
1. [Ordered list of what should happen next]
|
|
29
|
-
|
|
30
|
-
## Critical Context
|
|
31
|
-
- [Any data, examples, or references needed to continue]
|
|
32
|
-
- [Or "(none)" if not applicable]
|
|
33
|
-
|
|
34
|
-
Keep each section concise. Preserve exact file paths, function names, and error messages.`,ce=`The messages above are NEW conversation messages to incorporate into the existing summary provided in <previous-summary> tags.
|
|
35
|
-
|
|
36
|
-
Update the existing structured summary with new information. RULES:
|
|
37
|
-
- PRESERVE all existing information from the previous summary
|
|
38
|
-
- ADD new progress, decisions, and context from the new messages
|
|
39
|
-
- UPDATE the Progress section: move items from "In Progress" to "Done" when completed
|
|
40
|
-
- UPDATE "Next Steps" based on what was accomplished
|
|
41
|
-
- PRESERVE exact file paths, function names, and error messages
|
|
42
|
-
- If something is no longer relevant, you may remove it
|
|
43
|
-
|
|
44
|
-
Use this EXACT format:
|
|
45
|
-
|
|
46
|
-
## Goal
|
|
47
|
-
[Preserve existing goals, add new ones if the task expanded]
|
|
48
|
-
|
|
49
|
-
## Constraints & Preferences
|
|
50
|
-
- [Preserve existing, add new ones discovered]
|
|
51
|
-
|
|
52
|
-
## Progress
|
|
53
|
-
### Done
|
|
54
|
-
- [x] [Include previously done items AND newly completed items]
|
|
55
|
-
|
|
56
|
-
### In Progress
|
|
57
|
-
- [ ] [Current work - update based on progress]
|
|
58
|
-
|
|
59
|
-
### Blocked
|
|
60
|
-
- [Current blockers - remove if resolved]
|
|
61
|
-
|
|
62
|
-
## Key Decisions
|
|
63
|
-
- **[Decision]**: [Brief rationale] (preserve all previous, add new)
|
|
64
|
-
|
|
65
|
-
## Next Steps
|
|
66
|
-
1. [Update based on current state]
|
|
67
|
-
|
|
68
|
-
## Critical Context
|
|
69
|
-
- [Preserve important context, add new if needed]
|
|
70
|
-
|
|
71
|
-
Keep each section concise. Preserve exact file paths, function names, and error messages.`;async function Me(e,t,r,s,n,o,c,i,l,f){const u=await ue(e,t,r,s,n,o,c,i,l,f);return u.ok?k(u.value.text):x(u.error)}m(Me,"generateSummary");function ue(e,t,r,s,n,o,c,i,l,f){return R(e,{model:r,reserveTokens:s,customInstructions:n,previousSummary:o,thinkingLevel:c},(u,h,p)=>N(t,r,u,h,i,l,p),f)}m(ue,"generateSummaryWithUsage");async function R(e,t,r,s){const{model:n,reserveTokens:o,customInstructions:c,previousSummary:i,thinkingLevel:l}=t,f=Math.min(Math.floor(.8*o),n.maxTokens>0?n.maxTokens:Number.POSITIVE_INFINITY);let u=i?ce:ie;c&&(u=`${u}
|
|
72
|
-
|
|
73
|
-
Additional focus: ${c}`);const h=O(e);let a=`<conversation>
|
|
74
|
-
${F(h)}
|
|
75
|
-
</conversation>
|
|
76
|
-
|
|
77
|
-
`;i&&(a+=`<previous-summary>
|
|
78
|
-
${i}
|
|
79
|
-
</previous-summary>
|
|
80
|
-
|
|
81
|
-
`),a+=u;const d=[{role:"user",content:[{type:"text",text:a}],timestamp:Date.now()}],y=n.reasoning&&l&&l!=="off"?{maxTokens:f,reasoning:l}:{maxTokens:f},g=await r({systemPrompt:$,messages:d},w(y,s),s);if(g.stopReason==="aborted")return x(new b("aborted",g.errorMessage||"Summarization aborted"));if(g.stopReason==="error")return x(new b("summarization_failed",`Summarization failed: ${g.errorMessage||"Unknown error"}`));const S=E(g.content);return k({text:S,usage:g.usage})}m(R,"generateSummaryWithRequest");function Pe(e,t){if(e.length===0||e[e.length-1].type==="compaction")return k(void 0);let r=-1;for(let a=e.length-1;a>=0;a--)if(e[a].type==="compaction"){r=a;break}let s,n=e;if(r>=0){const a=e[r];s=a.summary,n=[...a.retainedTail.map((y,g)=>({type:"message",id:`${a.id}:retained:${g}`,parentId:g===0?a.id:`${a.id}:retained:${g-1}`,seq:a.seq,timestamp:y.timestamp,message:y})),...e.slice(r+1)]}const o=n.length,c=ne(V(e).flatMap(X)).tokens,i=ae(n,0,o,t.keepRecentTokens),l=i.isSplitTurn?i.turnStartIndex:i.firstKeptEntryIndex,f=[];for(let a=0;a<l;a++){const d=P(n[a]);d&&f.push(d)}const u=[];if(i.isSplitTurn)for(let a=i.turnStartIndex;a<i.firstKeptEntryIndex;a++){const d=P(n[a]);d&&u.push(d)}const h=[];for(let a=i.firstKeptEntryIndex;a<o;a++){const d=P(n[a]);d&&h.push(d)}const p=Q(f,e,r);if(i.isSplitTurn)for(const a of u)U(a,p);return k({messagesToSummarize:f,turnPrefixMessages:u,retainedTail:h,isSplitTurn:i.isSplitTurn,tokensBefore:c,previousSummary:s,fileOps:p,settings:t})}m(Pe,"prepareCompaction");const me=`This is the PREFIX of a turn that was too large to keep. The SUFFIX (recent work) is retained.
|
|
82
|
-
|
|
83
|
-
Summarize the prefix to provide context for the retained suffix:
|
|
84
|
-
|
|
85
|
-
## Original Request
|
|
86
|
-
[What did the user ask for in this turn?]
|
|
87
|
-
|
|
88
|
-
## Early Progress
|
|
89
|
-
- [Key decisions and work done in the prefix]
|
|
90
|
-
|
|
91
|
-
## Context for Suffix
|
|
92
|
-
- [Information needed to understand the retained recent work]
|
|
93
|
-
|
|
94
|
-
Be concise. Focus on what's needed to understand the kept suffix.`;import{serializeConversation as Ae}from"./utils.js";function we(e,t,r,s,n,o,c,i){return le(e,{model:r,customInstructions:s,thinkingLevel:n},(l,f,u)=>N(t,r,l,f,o,c,u),i)}m(we,"compact");async function le(e,t,r,s){const{model:n,customInstructions:o,thinkingLevel:c}=t,{messagesToSummarize:i,turnPrefixMessages:l,retainedTail:f,isSplitTurn:u,tokensBefore:h,previousSummary:p,fileOps:a,settings:d}=e;let y,g;if(u&&l.length>0){let T="No prior history.",M;if(i.length>0){const I=await R(i,{model:n,reserveTokens:d.reserveTokens,customInstructions:o,previousSummary:p,thinkingLevel:c},r,s);if(!I.ok)return x(I.error);T=I.value.text,M=I.value.usage}const v=await fe(l,n,d.reserveTokens,c,r,s);if(!v.ok)return x(v.error);y=`${T}
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
**Turn Context (split turn):**
|
|
99
|
-
|
|
100
|
-
${v.value.text}`,g=M?G(M,v.value.usage):v.value.usage}else{const T=await R(i,{model:n,reserveTokens:d.reserveTokens,customInstructions:o,previousSummary:p,thinkingLevel:c},r,s);if(!T.ok)return x(T.error);y=T.value.text,g=T.value.usage}const{readFiles:S,modifiedFiles:A}=Z(a);return y+=j(S,A),k({summary:y,tokensBefore:h,usage:g,retainedTail:f,details:{readFiles:S,modifiedFiles:A}})}m(le,"compactWithRequest");async function fe(e,t,r,s,n,o){const c=Math.min(Math.floor(.5*r),t.maxTokens>0?t.maxTokens:Number.POSITIVE_INFINITY),i=O(e),u=[{role:"user",content:[{type:"text",text:`<conversation>
|
|
101
|
-
${F(i)}
|
|
102
|
-
</conversation>
|
|
103
|
-
|
|
104
|
-
${me}`}],timestamp:Date.now()}],h=t.reasoning&&s&&s!=="off"?{maxTokens:c,reasoning:s}:{maxTokens:c},p=await n({systemPrompt:$,messages:u},w(h,o),o);return p.stopReason==="aborted"?x(new b("aborted",p.errorMessage||"Turn prefix summarization aborted")):p.stopReason==="error"?x(new b("summarization_failed",`Turn prefix summarization failed: ${p.errorMessage||"Unknown error"}`)):k({text:E(p.content),usage:p.usage})}m(fe,"generateTurnPrefixSummary");export{Se as DEFAULT_COMPACTION_SETTINGS,$ as SUMMARIZATION_SYSTEM_PROMPT,_ as calculateContextTokens,we as compact,le as compactWithRequest,N as completeSimpleWithRetries,w as createSummaryRequestOptions,ne as estimateContextTokens,C as estimateTokens,ae as findCutPoint,oe as findTurnStartIndex,Me as generateSummary,R as generateSummaryWithRequest,ue as generateSummaryWithUsage,Ie as getLastAssistantUsage,Pe as prepareCompaction,Ae as serializeConversation,be as shouldCompact};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var r=(t,e)=>d(t,"name",{value:e,configurable:!0});import{contentText as c}from"@earendil-works/pi-ai";function $(){return{read:new Set,written:new Set,edited:new Set}}r($,"createFileOps");function S(t,e){if(t.role==="assistant"&&!(!("content"in t)||!Array.isArray(t.content)))for(const n of t.content){if(typeof n!="object"||n===null||!("type"in n)||n.type!=="toolCall"||!("arguments"in n)||!("name"in n))continue;const o=n.arguments;if(!o)continue;const i=typeof o.path=="string"?o.path:void 0;if(i)switch(n.name){case"read":e.read.add(i);break;case"write":e.written.add(i);break;case"edit":e.edited.add(i);break}}}r(S,"extractFileOpsFromMessage");function j(t){const e=new Set([...t.edited,...t.written]),n=[...t.read].filter(i=>!e.has(i)).sort(),o=[...e].sort();return{readFiles:n,modifiedFiles:o}}r(j,"computeFileLists");function k(t,e){const n=[];return t.length>0&&n.push(`<read-files>
|
|
2
|
-
${t.join(`
|
|
3
|
-
`)}
|
|
4
|
-
</read-files>`),e.length>0&&n.push(`<modified-files>
|
|
5
|
-
${e.join(`
|
|
6
|
-
`)}
|
|
7
|
-
</modified-files>`),n.length===0?"":`
|
|
8
|
-
|
|
9
|
-
${n.join(`
|
|
10
|
-
|
|
11
|
-
`)}`}r(k,"formatFileOperations");const p=2e3;function h(t){try{return JSON.stringify(t)??"undefined"}catch{return"[unserializable]"}}r(h,"safeJsonStringify");function g(t,e){if(t.length<=e)return t;const n=t.length-e;return`${t.slice(0,e)}
|
|
12
|
-
|
|
13
|
-
[... ${n} more characters truncated]`}r(g,"truncateForSummary");function w(t){const e=[];for(const n of t)if(n.role==="user"){const o=c(n.content,"");o&&e.push(`[User]: ${o}`)}else if(n.role==="assistant"){const o=[],i=[];for(const s of n.content)if(s.type==="thinking")o.push(s.thinking);else if(s.type==="toolCall"){const a=s.arguments,f=Object.entries(a).map(([u,l])=>`${u}=${h(l)}`).join(", ");i.push(`${s.name}(${f})`)}o.length>0&&e.push(`[Assistant thinking]: ${o.join(`
|
|
14
|
-
`)}`),n.content.some(s=>s.type==="text")&&e.push(`[Assistant]: ${c(n.content)}`),i.length>0&&e.push(`[Assistant tool calls]: ${i.join("; ")}`)}else if(n.role==="toolResult"){const o=c(n.content,"");o&&e.push(`[Tool result]: ${g(o,p)}`)}return e.join(`
|
|
15
|
-
|
|
16
|
-
`)}r(w,"serializeConversation");export{j as computeFileLists,$ as createFileOps,S as extractFileOpsFromMessage,k as formatFileOperations,w as serializeConversation};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=Object.defineProperty;var a=(e,n)=>r(e,"name",{value:n,configurable:!0});import{DEFAULT_MAX_AGENT_RETRY_DELAY_MS as s}from"@earendil-works/pi-ai";const m={enabled:!0,maxRetries:3,baseDelayMs:1e3,maxAgentDelayMs:s};function f(e){const n=new Set;for(const t of e){if(n.has(t.name))throw new TypeError(`Duplicate tool name: ${JSON.stringify(t.name)}`);n.add(t.name)}}a(f,"validateToolNames");function u(e){if(!Number.isSafeInteger(e.maxRetries)||e.maxRetries<0||e.maxRetries===Number.MAX_SAFE_INTEGER||!Number.isSafeInteger(e.baseDelayMs)||e.baseDelayMs<0||e.maxAgentDelayMs!==void 0&&(!Number.isSafeInteger(e.maxAgentDelayMs)||e.maxAgentDelayMs<0))throw new RangeError("Retry policy values must be finite non-negative safe integers")}a(u,"validateRetryPolicy");function R(e){if(!Number.isSafeInteger(e.reserveTokens)||e.reserveTokens<0||!Number.isSafeInteger(e.keepRecentTokens)||e.keepRecentTokens<0)throw new RangeError("Compaction token counts must be finite non-negative safe integers")}a(R,"validateCompactionSettings");export{m as DEFAULT_RETRY_POLICY,R as validateCompactionSettings,u as validateRetryPolicy,f as validateToolNames};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var o=(t,e)=>i(t,"name",{value:e,configurable:!0});import{awaitWithContext as C,BACKGROUND_CONTEXT as E,createContextKey as r,TODO_CONTEXT as x,withAbortSignal as O,withCancel as a,withContextValue as n,withoutAbortSignal as l}from"@earendil-works/chord/context";import{NOOP_TELEMETRY_CONTEXT as m}from"@earendil-works/pi-telemetry";const T=r("pi.telemetryContext");function w(t){return t.value(T)??m}o(w,"getTelemetryContext");function N(t,e){return n(T,t,e)}o(N,"withTelemetryContext");export{E as BACKGROUND_CONTEXT,x as TODO_CONTEXT,C as awaitWithContext,r as createContextKey,w as getTelemetryContext,O as withAbortSignal,a as withCancel,n as withContextValue,N as withTelemetryContext,l as withoutAbortSignal};
|