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
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var E=Object.defineProperty;var d=(t,s)=>E(t,"name",{value:s,configurable:!0});const C=2e3,F=51200,M=500,g=globalThis.Buffer,_=/[^\x00-\x7f]/;function x(t){if(g)return g.byteLength(t,"utf8");const s=t.search(_);if(s===-1)return t.length;let e=s;for(let n=s;n<t.length;n++){const i=t.charCodeAt(n);if(i<=127)e+=1;else if(i<=2047)e+=2;else if(i>=55296&&i<=56319&&n+1<t.length){const f=t.charCodeAt(n+1);f>=56320&&f<=57343?(e+=4,n++):e+=3}else e+=3}return e}d(x,"utf8ByteLength");function A(t){if(t.length===0)return[];const s=t.split(`
|
|
2
|
-
`);return t.endsWith(`
|
|
3
|
-
`)&&s.pop(),s}d(A,"splitLinesForCounting");function T(t){let s="";for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n>=55296&&n<=56319){if(e+1<t.length){const i=t.charCodeAt(e+1);if(i>=56320&&i<=57343){s+=t[e]+t[e+1],e++;continue}}s+="\uFFFD"}else n>=56320&&n<=57343?s+="\uFFFD":s+=t[e]}return s}d(T,"replaceUnpairedSurrogates");function b(t){return t<1024?`${t}B`:t<1024*1024?`${(t/1024).toFixed(1)}KB`:`${(t/(1024*1024)).toFixed(1)}MB`}d(b,"formatSize");function N(t,s={}){const e=s.maxLines??2e3,n=s.maxBytes??51200,i=x(t),f=A(t),l=f.length;if(l<=e&&i<=n)return{content:t,truncated:!1,truncatedBy:null,totalLines:l,totalBytes:i,outputLines:l,outputBytes:i,lastLinePartial:!1,firstLineExceedsLimit:!1,maxLines:e,maxBytes:n};if(x(f[0])>n)return{content:"",truncated:!0,truncatedBy:"bytes",totalLines:l,totalBytes:i,outputLines:0,outputBytes:0,lastLinePartial:!1,firstLineExceedsLimit:!0,maxLines:e,maxBytes:n};const u=[];let o=0,a="lines";for(let c=0;c<f.length&&c<e;c++){const p=f[c],h=x(p)+(c>0?1:0);if(o+h>n){a="bytes";break}u.push(p),o+=h}u.length>=e&&o<=n&&(a="lines");const L=u.join(`
|
|
4
|
-
`),B=x(L);return{content:L,truncated:!0,truncatedBy:a,totalLines:l,totalBytes:i,outputLines:u.length,outputBytes:B,lastLinePartial:!1,firstLineExceedsLimit:!1,maxLines:e,maxBytes:n}}d(N,"truncateHead");function P(t,s={}){const e=s.maxLines??2e3,n=s.maxBytes??51200,i=x(t),f=A(t),l=f.length;if(l<=e&&i<=n)return{content:t,truncated:!1,truncatedBy:null,totalLines:l,totalBytes:i,outputLines:l,outputBytes:i,lastLinePartial:!1,firstLineExceedsLimit:!1,maxLines:e,maxBytes:n};const r=[];let u=0,o="lines",a=!1;for(let c=f.length-1;c>=0&&r.length<e;c--){const p=f[c],h=x(p)+(r.length>0?1:0);if(u+h>n){if(o="bytes",r.length===0){const y=m(p,n);r.unshift(y),u=x(y),a=!0}break}r.unshift(p),u+=h}r.length>=e&&u<=n&&(o="lines");const L=r.join(`
|
|
5
|
-
`),B=x(L);return{content:L,truncated:!0,truncatedBy:o,totalLines:l,totalBytes:i,outputLines:r.length,outputBytes:B,lastLinePartial:a,firstLineExceedsLimit:!1,maxLines:e,maxBytes:n}}d(P,"truncateTail");function m(t,s){if(s<=0)return"";let e=0,n=t.length,i=!1;for(let l=t.length;l>0;){let r=l-1;const u=t.charCodeAt(r);let o,a=!1;if(u>=56320&&u<=57343&&r>0){const L=t.charCodeAt(r-1);L>=55296&&L<=56319?(r--,o=4):(o=3,a=!0)}else u>=55296&&u<=57343?(o=3,a=!0):o=u<=127?1:u<=2047?2:3;if(e+o>s)break;e+=o,n=r,i||=a,l=r}const f=t.slice(n);return i?T(f):f}d(m,"truncateStringToBytesFromEnd");function X(t,s=500){return t.length<=s?{text:t,wasTruncated:!1}:{text:`${t.slice(0,s)}... [truncated]`,wasTruncated:!0}}d(X,"truncateLine");export{F as DEFAULT_MAX_BYTES,C as DEFAULT_MAX_LINES,M as GREP_MAX_LINE_LENGTH,b as formatSize,N as truncateHead,X as truncateLine,P as truncateTail,x as utf8ByteLength};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var t=(c,e)=>a(c,"name",{value:e,configurable:!0});function n(){return{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}t(n,"emptyUsage");function u(c,e){return{input:c.input+e.input,output:c.output+e.output,cacheRead:c.cacheRead+e.cacheRead,cacheWrite:c.cacheWrite+e.cacheWrite,...c.cacheWrite1h===void 0&&e.cacheWrite1h===void 0?{}:{cacheWrite1h:(c.cacheWrite1h??0)+(e.cacheWrite1h??0)},...c.reasoning===void 0&&e.reasoning===void 0?{}:{reasoning:(c.reasoning??0)+(e.reasoning??0)},totalTokens:c.totalTokens+e.totalTokens,cost:{input:c.cost.input+e.cost.input,output:c.cost.output+e.cost.output,cacheRead:c.cost.cacheRead+e.cost.cacheRead,cacheWrite:c.cost.cacheWrite+e.cost.cacheWrite,total:c.cost.total+e.cost.total}}}t(u,"addUsage");export{u as addUsage,n as emptyUsage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{NodeExecutionEnv as r}from"./harness/env/nodejs.js";export*from"./index.js";export{r as NodeExecutionEnv};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var r=(e,t)=>w(e,"name",{value:t,configurable:!0});function S(e,t,d){return d===void 0?JSON.stringify(t):`${JSON.stringify(t)} ${d}`}r(S,"defaultSearchText");async function*m(e,t,d,i={}){const n=d.projectText??S,s=i.limit??d.pageSize??100;let f=i.afterSeq??0;const y=i.entryTypes===void 0?void 0:new Set(i.entryTypes);for(;;){const o=await e.findEntries({order:"oldestFirst",limit:s,cursor:{afterSeq:f},type:i.entryTypes?.length===1?i.entryTypes[0]:void 0});if(o.length===0)break;for(const a of o){if(y!==void 0&&!y.has(a.type))continue;const c=await e.getLabel(a.id);yield{entryId:a.id,seq:a.seq,type:a.type,timestamp:a.timestamp,text:n(t,a,c),fields:c===void 0?void 0:{label:c}}}if(f=o[o.length-1]?.seq??f,o.length<s)break}}r(m,"scanReadableEntries");async function*I(e,t={}){yield*m(e,await e.getMetadata(),t)}r(I,"scanningEntries");async function*T(e){yield*e}r(T,"arraySource");function g(e,t){return typeof e=="function"?e(t):T(e)}r(g,"readablesFor");function h(e,t){return t.text.toLowerCase().includes(e)}r(h,"defaultMatch");function p(e){if(!e?.aborted)return;if(e.reason instanceof Error)throw e.reason;const t=new Error("The operation was aborted");throw t.name="AbortError",t}r(p,"throwIfAborted");function x(e,t){return{sessionId:e.id,entryId:t.entryId,timestamp:t.timestamp,snippet:t.text}}r(x,"createDefaultScanningHit");function z(e,t={}){const d=t.createHit??((i,n)=>x(i,n));return{async*search(i,n={}){const s=i.trim().toLowerCase();if(!s||n.limit!==void 0&&n.limit<=0||n.entryTypes?.length===0)return;let f=0;const y=new Set,o=n.entryTypes===void 0?void 0:new Set(n.entryTypes),a=t.sourceOptions?.(s,n);for await(const c of g(e,a)){p(n.signal);const u=await c.getMetadata();if(y.has(u.id))throw new Error(`Duplicate sessionId: ${u.id}`);y.add(u.id);for await(const l of m(c,u,t,{entryTypes:n.entryTypes}))if(p(n.signal),!(o!==void 0&&!o.has(l.type)||!(t.match?.(s,l,u)??h(s,l)))&&(yield d(u,l),f+=1,n.limit!==void 0&&f>=n.limit))return}}}}r(z,"createScanningSessionSearch");export{z as createScanningSessionSearch,I as scanningEntries};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var S=Object.defineProperty;var c=(r,s)=>S(r,"name",{value:s,configurable:!0});const U="cloudflare-gateway-binding",A=new Set(["content-length","host","cf-aig-authorization"]);function $(r){const{binding:s,gateway:n}=r,a=new URL(r.baseUrl),o=a.pathname.endsWith("/")?a.pathname:`${a.pathname}/`;return async(t,e)=>{const i=t instanceof Request?t:void 0,u=i?i.url:t.toString(),l=(e?.method??i?.method??"GET").toUpperCase();let d;try{d=new URL(u)}catch{d=void 0}if(d===void 0||d.origin!==a.origin||!d.pathname.startsWith(o))throw new Error(`createGatewayBindingFetch: ${l} ${u} is outside the configured gateway prefix (${a.origin}${o}); this fetch only serves its gateway-bound client`);const f=c(m=>{throw new Error(`createGatewayBindingFetch: cannot express ${l} ${u} as a universal gateway request (${m}); route it over HTTPS with gateway auth instead`)},"unexpressible");if(l!=="POST")return f("only POST is supported");const h=d.pathname.slice(o.length),y=h.indexOf("/");if(y<=0)return f("missing provider/endpoint path");const b=h.slice(0,y),T=h.slice(y+1)+d.search,w=await v(i,e);let g;try{g=w===void 0?void 0:JSON.parse(w)}catch{return f("non-JSON body")}if(g===void 0)return f("missing body");const x=E(i,e),p=e?.signal??(e&&"signal"in e&&e.signal===null?void 0:i?.signal);return s.gateway(n).run({provider:b,endpoint:T,headers:x,query:g},p?{signal:p}:{})}}c($,"createGatewayBindingFetch");async function v(r,s){const n=s?.body;return n==null?s&&"body"in s&&n===null?void 0:r&&r.body!==null?r.clone().text():void 0:typeof n=="string"?n:n instanceof Uint8Array?new TextDecoder().decode(n):n instanceof ArrayBuffer?new TextDecoder().decode(new Uint8Array(n)):new Request("http://body.local",{method:"POST",body:n,duplex:"half"}).text()}c(v,"readBodyText");function E(r,s){const n={},a=c((t,e)=>{const i=t.toLowerCase();A.has(i)||(n[i]=e)},"add"),o=s?.headers;if(o===void 0){if(r)for(const[t,e]of r.headers)a(t,e)}else if(o instanceof Headers)for(const[t,e]of o)a(t,e);else if(Array.isArray(o))for(const[t,e]of o)a(t,e);else for(const[t,e]of Object.entries(o))e!==void 0&&a(t,String(e));return n}c(E,"collectHeaders");export{U as CLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,$ as createGatewayBindingFetch};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var i=(e,t)=>s(e,"name",{value:t,configurable:!0});const c='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" aria-hidden="true"><path fill="#fff" fill-rule="evenodd" d="M165.29 165.29 H517.36 V400 H400 V517.36 H282.65 V634.72 H165.29 Z M282.65 282.65 V400 H400 V282.65 Z"/><path fill="#fff" d="M517.36 400 H634.72 V634.72 H517.36 Z"/></svg>';function o(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}i(o,"escapeHtml");function n(e){const t=o(e.title),l=o(e.heading),r=o(e.message),a=e.details?o(e.details):void 0;return`<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>${t}</title>
|
|
7
|
-
<style>
|
|
8
|
-
:root {
|
|
9
|
-
--text: #fafafa;
|
|
10
|
-
--text-dim: #a1a1aa;
|
|
11
|
-
--page-bg: #09090b;
|
|
12
|
-
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
13
|
-
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
14
|
-
}
|
|
15
|
-
* { box-sizing: border-box; }
|
|
16
|
-
html { color-scheme: dark; }
|
|
17
|
-
body {
|
|
18
|
-
margin: 0;
|
|
19
|
-
min-height: 100vh;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
padding: 24px;
|
|
24
|
-
background: var(--page-bg);
|
|
25
|
-
color: var(--text);
|
|
26
|
-
font-family: var(--font-sans);
|
|
27
|
-
text-align: center;
|
|
28
|
-
}
|
|
29
|
-
main {
|
|
30
|
-
width: 100%;
|
|
31
|
-
max-width: 560px;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
}
|
|
37
|
-
.logo {
|
|
38
|
-
width: 72px;
|
|
39
|
-
height: 72px;
|
|
40
|
-
display: block;
|
|
41
|
-
margin-bottom: 24px;
|
|
42
|
-
}
|
|
43
|
-
h1 {
|
|
44
|
-
margin: 0 0 10px;
|
|
45
|
-
font-size: 28px;
|
|
46
|
-
line-height: 1.15;
|
|
47
|
-
font-weight: 650;
|
|
48
|
-
color: var(--text);
|
|
49
|
-
}
|
|
50
|
-
p {
|
|
51
|
-
margin: 0;
|
|
52
|
-
line-height: 1.7;
|
|
53
|
-
color: var(--text-dim);
|
|
54
|
-
font-size: 15px;
|
|
55
|
-
}
|
|
56
|
-
.details {
|
|
57
|
-
margin-top: 16px;
|
|
58
|
-
font-family: var(--font-mono);
|
|
59
|
-
font-size: 13px;
|
|
60
|
-
color: var(--text-dim);
|
|
61
|
-
white-space: pre-wrap;
|
|
62
|
-
word-break: break-word;
|
|
63
|
-
}
|
|
64
|
-
</style>
|
|
65
|
-
</head>
|
|
66
|
-
<body>
|
|
67
|
-
<main>
|
|
68
|
-
<div class="logo">${c}</div>
|
|
69
|
-
<h1>${l}</h1>
|
|
70
|
-
<p>${r}</p>
|
|
71
|
-
${a?`<div class="details">${a}</div>`:""}
|
|
72
|
-
</main>
|
|
73
|
-
</body>
|
|
74
|
-
</html>`}i(n,"renderPage");function m(e){return n({title:"Authentication successful",heading:"Authentication successful",message:e})}i(m,"oauthSuccessHtml");function f(e,t){return n({title:"Authentication failed",heading:"Authentication failed",message:e,details:t})}i(f,"oauthErrorHtml");export{f as oauthErrorHtml,m as oauthSuccessHtml};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={openrouter:{"black-forest-labs/flux.2-flex":{id:"black-forest-labs/flux.2-flex",name:"Black Forest Labs: FLUX.2 Flex",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"black-forest-labs/flux.2-klein-4b":{id:"black-forest-labs/flux.2-klein-4b",name:"Black Forest Labs: FLUX.2 Klein 4B",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"black-forest-labs/flux.2-max":{id:"black-forest-labs/flux.2-max",name:"Black Forest Labs: FLUX.2 Max",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"black-forest-labs/flux.2-pro":{id:"black-forest-labs/flux.2-pro",name:"Black Forest Labs: FLUX.2 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"bytedance-seed/seedream-4.5":{id:"bytedance-seed/seedream-4.5",name:"ByteDance Seed: Seedream 4.5",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"bytedance-seed/seedream-5-0-lite":{id:"bytedance-seed/seedream-5-0-lite",name:"ByteDance Seed: Seedream 5.0 Lite",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"bytedance-seed/seedream-5-0-pro":{id:"bytedance-seed/seedream-5-0-pro",name:"ByteDance Seed: Seedream 5.0 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"google/gemini-2.5-flash-image":{id:"google/gemini-2.5-flash-image",name:"Google: Nano Banana (Gemini 2.5 Flash Image)",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:.0833333333333333}},"google/gemini-3-pro-image":{id:"google/gemini-3-pro-image",name:"Google: Nano Banana Pro (Gemini 3 Pro Image)",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:2,output:12,cacheRead:.19999999999999998,cacheWrite:.375}},"google/gemini-3-pro-image-preview":{id:"google/gemini-3-pro-image-preview",name:"Google: Nano Banana Pro (Gemini 3 Pro Image Preview)",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:2,output:12,cacheRead:.19999999999999998,cacheWrite:.375}},"google/gemini-3.1-flash-image":{id:"google/gemini-3.1-flash-image",name:"Google: Nano Banana 2 (Gemini 3.1 Flash Image)",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:.5,output:3,cacheRead:0,cacheWrite:0}},"google/gemini-3.1-flash-image-preview":{id:"google/gemini-3.1-flash-image-preview",name:"Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:.5,output:3,cacheRead:0,cacheWrite:0}},"google/gemini-3.1-flash-lite-image":{id:"google/gemini-3.1-flash-lite-image",name:"Google: Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:.25,output:1.5,cacheRead:0,cacheWrite:0}},"inclusionai/ming-image-0.1-design":{id:"inclusionai/ming-image-0.1-design",name:"inclusionAI: Ming Image 0.1 Design",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"krea/krea-2-large":{id:"krea/krea-2-large",name:"Krea: Krea 2 Large",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"krea/krea-2-medium":{id:"krea/krea-2-medium",name:"Krea: Krea 2 Medium",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"krea/krea-2-medium-turbo":{id:"krea/krea-2-medium-turbo",name:"Krea: Krea 2 Medium Turbo",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"meta/muse-image":{id:"meta/muse-image",name:"Meta: Muse Image",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"microsoft/mai-image-2.5":{id:"microsoft/mai-image-2.5",name:"Microsoft AI: MAI-Image-2.5",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:5,output:0,cacheRead:0,cacheWrite:0}},"microsoft/mai-image-2.5-pro":{id:"microsoft/mai-image-2.5-pro",name:"Microsoft AI: MAI-Image-2.5 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:5,output:0,cacheRead:0,cacheWrite:0}},"microsoft/mai-image-2.6":{id:"microsoft/mai-image-2.6",name:"Microsoft AI: MAI-Image-2.6",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:5,output:0,cacheRead:0,cacheWrite:0}},"microsoft/mai-image-2.6-flash":{id:"microsoft/mai-image-2.6-flash",name:"Microsoft AI: MAI-Image-2.6 Flash",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:1.75,output:0,cacheRead:0,cacheWrite:0}},"openai/gpt-5-image":{id:"openai/gpt-5-image",name:"OpenAI: GPT-5 Image",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:10,output:10,cacheRead:1.25,cacheWrite:0}},"openai/gpt-5-image-mini":{id:"openai/gpt-5-image-mini",name:"OpenAI: GPT-5 Image Mini",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:2.5,output:2,cacheRead:.25,cacheWrite:0}},"openai/gpt-5.4-image-2":{id:"openai/gpt-5.4-image-2",name:"OpenAI: GPT-5.4 Image 2",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["image","text"],output:["image","text"],cost:{input:8,output:15,cacheRead:2,cacheWrite:0}},"openai/gpt-image-1":{id:"openai/gpt-image-1",name:"OpenAI: GPT Image 1",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:10,output:10,cacheRead:1.25,cacheWrite:0}},"openai/gpt-image-1-mini":{id:"openai/gpt-image-1-mini",name:"OpenAI: GPT Image 1 Mini",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:2.5,output:2.5,cacheRead:.25,cacheWrite:0}},"openai/gpt-image-2":{id:"openai/gpt-image-2",name:"OpenAI: GPT Image 2",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:8,output:8,cacheRead:2,cacheWrite:0}},"openai/gpt-image-2.5-flare":{id:"openai/gpt-image-2.5-flare",name:"OpenAI: GPT Image 2.5 Flare",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:8,output:8,cacheRead:2,cacheWrite:0}},"openai/gpt-image-2.5-sunburst":{id:"openai/gpt-image-2.5-sunburst",name:"OpenAI: GPT Image 2.5 Sunburst",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:8,output:8,cacheRead:2,cacheWrite:0}},"openrouter/auto":{id:"openrouter/auto",name:"Auto Router",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["text","image"],cost:{input:-1e6,output:-1e6,cacheRead:0,cacheWrite:0}},"openrouter/auto-beta":{id:"openrouter/auto-beta",name:"Auto Router (Beta)",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["text","image"],cost:{input:-1e6,output:-1e6,cacheRead:0,cacheWrite:0}},"qwen/qwen-image-3":{id:"qwen/qwen-image-3",name:"Qwen: Qwen Image 3",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"qwen/qwen-image-3-pro":{id:"qwen/qwen-image-3-pro",name:"Qwen: Qwen Image 3 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v3":{id:"recraft/recraft-v3",name:"Recraft: Recraft V3",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4":{id:"recraft/recraft-v4",name:"Recraft: Recraft V4",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4-pro":{id:"recraft/recraft-v4-pro",name:"Recraft: Recraft V4 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4-pro-vector":{id:"recraft/recraft-v4-pro-vector",name:"Recraft: Recraft V4 Pro Vector",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4-styles":{id:"recraft/recraft-v4-styles",name:"Recraft: Recraft V4 Styles",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4-styles-pro":{id:"recraft/recraft-v4-styles-pro",name:"Recraft: Recraft V4 Styles Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4-styles-pro-vector":{id:"recraft/recraft-v4-styles-pro-vector",name:"Recraft: Recraft V4 Styles Pro Vector",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4-styles-vector":{id:"recraft/recraft-v4-styles-vector",name:"Recraft: Recraft V4 Styles Vector",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4-vector":{id:"recraft/recraft-v4-vector",name:"Recraft: Recraft V4 Vector",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4.1":{id:"recraft/recraft-v4.1",name:"Recraft: Recraft V4.1",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4.1-pro":{id:"recraft/recraft-v4.1-pro",name:"Recraft: Recraft V4.1 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4.1-pro-vector":{id:"recraft/recraft-v4.1-pro-vector",name:"Recraft: Recraft V4.1 Pro Vector",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4.1-utility":{id:"recraft/recraft-v4.1-utility",name:"Recraft: Recraft V4.1 Utility",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4.1-utility-pro":{id:"recraft/recraft-v4.1-utility-pro",name:"Recraft: Recraft V4.1 Utility Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"recraft/recraft-v4.1-vector":{id:"recraft/recraft-v4.1-vector",name:"Recraft: Recraft V4.1 Vector",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"sourceful/riverflow-v2-fast":{id:"sourceful/riverflow-v2-fast",name:"Sourceful: Riverflow V2 Fast",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"sourceful/riverflow-v2-pro":{id:"sourceful/riverflow-v2-pro",name:"Sourceful: Riverflow V2 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"sourceful/riverflow-v2.5-fast":{id:"sourceful/riverflow-v2.5-fast",name:"Sourceful: Riverflow V2.5 Fast",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"sourceful/riverflow-v2.5-pro":{id:"sourceful/riverflow-v2.5-pro",name:"Sourceful: Riverflow V2.5 Pro",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"x-ai/grok-imagine-image-2.0":{id:"x-ai/grok-imagine-image-2.0",name:"xAI: Grok Imagine Image 2.0",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}},"x-ai/grok-imagine-image-quality":{id:"x-ai/grok-imagine-image-quality",name:"SpaceXAI: Grok Imagine Image Quality",api:"openrouter-images",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",input:["text","image"],output:["image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0}}}};export{e as IMAGE_MODELS};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var i=(s,e)=>f(s,"name",{value:e,configurable:!0});import{defaultProviderAuthContext as g}from"./auth/context.js";import{InMemoryCredentialStore as v}from"./auth/credential-store.js";import{ModelsError as d,resolveProviderAuth as y}from"./auth/resolve.js";class m{static{i(this,"ImagesModelsImpl")}providers=new Map;credentials;authContext;constructor(e){this.credentials=e?.credentials??new v,this.authContext=e?.authContext??g()}setProvider(e){this.providers.set(e.id,e)}deleteProvider(e){this.providers.delete(e)}clearProviders(){this.providers.clear()}getProviders(){return Array.from(this.providers.values())}getProvider(e){return this.providers.get(e)}getModels(e){if(e!==void 0){const r=this.providers.get(e);if(!r)return[];try{return r.getModels()}catch{return[]}}const t=[];for(const r of this.providers.values())try{t.push(...r.getModels())}catch{}return t}getModel(e,t){return this.getModels(e).find(r=>r.id===t)}async refresh(e){if(e!==void 0){const t=this.providers.get(e);if(!t?.refreshModels)return;try{await t.refreshModels()}catch(r){throw r instanceof d?r:new d("model_source",`Model refresh failed for ${e}`,{cause:r})}return}await Promise.allSettled(Array.from(this.providers.values(),async t=>t.refreshModels?.()))}async getAuth(e,t){const r=typeof e=="string"?e:e.provider,a=this.providers.get(r);if(a)return y(a,this.credentials,this.authContext,t)}async generateImages(e,t,r){try{const a=this.providers.get(e.provider);if(!a)throw new d("provider",`Unknown provider: ${e.provider}`);const o=await this.getAuth(e,{apiKey:r?.apiKey,env:r?.env,signal:r?.signal}),n=o?.auth;if(!n)return a.generateImages(e,t,r);const h=n.baseUrl?{...e,baseUrl:n.baseUrl}:e,u=r?.apiKey??n.apiKey,l=n.headers||r?.headers?{...n.headers,...r?.headers}:void 0,c=o.env||r?.env?{...o.env??{},...r?.env??{}}:void 0;return await a.generateImages(h,t,{...r,apiKey:u,headers:l,env:c})}catch(a){return{api:e.api,provider:e.provider,model:e.id,output:[],stopReason:"error",errorMessage:a instanceof Error?a.message:String(a),timestamp:Date.now()}}}}function P(s){return new m(s)}i(P,"createImagesModels");function x(s){let e=s.models,t;const r=s.refreshModels;return{id:s.id,name:s.name??s.id,auth:s.auth,getModels:i(()=>e,"getModels"),refreshModels:r?()=>(t??=(async()=>{try{e=await r()}finally{t=void 0}})(),t):void 0,generateImages:i((a,o,n)=>s.api.generateImages(a,o,n),"generateImages")}}i(x,"createImagesProvider");export{P as createImagesModels,x as createImagesProvider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var e=(r,o)=>p(r,"name",{value:o,configurable:!0});import{azureOpenAIResponsesApi as A}from"../api/azure-openai-responses.lazy.js";import{envApiKeyAuth as i}from"../auth/helpers.js";import{createProvider as n}from"../models.js";import{AZURE_OPENAI_RESPONSES_MODELS as s}from"./azure-openai-responses.models.js";function E(){return n({id:"azure-openai-responses",name:"Azure OpenAI",auth:{apiKey:i("Azure OpenAI API key",["AZURE_OPENAI_API_KEY"])},models:Object.values(s),api:A()})}e(E,"azureOpenAIResponsesProvider");export{E as azureOpenAIResponsesProvider};
|
package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"./data/azure-openai-responses.json"with{type:"json"};import{flattenModelCatalog as e}from"../model-catalog.js";const a=e("azure-openai-responses",o);export{a as AZURE_OPENAI_RESPONSES_MODELS};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var e=(o,r)=>t(o,"name",{value:r,configurable:!0});import{openrouterImagesApi as p}from"../api/openrouter-images.lazy.js";import{envApiKeyAuth as n,lazyOAuth as u}from"../auth/helpers.js";import{loadOpenRouterOAuth as i}from"../auth/oauth/load.js";import{IMAGE_MODELS as m}from"../image-models.generated.js";import{createImagesProvider as a}from"../images-models.js";function f(){return a({id:"openrouter",name:"OpenRouter",auth:{apiKey:n("OpenRouter API key",["OPENROUTER_API_KEY"]),oauth:u({name:"OpenRouter OAuth",loginLabel:"Sign in with OpenRouter",load:i})},models:Object.values(m.openrouter),api:p()})}e(f,"openrouterImagesProvider");export{f as openrouterImagesProvider};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var k=Object.defineProperty;var s=(o,t)=>k(o,"name",{value:t,configurable:!0});import{parseStreamingJson as d}from"./json-parse.js";function x(o){return{type:"text",text:o.text,...o.textSignature===void 0?{}:{textSignature:o.textSignature}}}s(x,"cloneTextContent");function w(o){return{type:"thinking",thinking:o.thinking,...o.thinkingSignature===void 0?{}:{thinkingSignature:o.thinkingSignature},...o.redacted===void 0?{}:{redacted:o.redacted}}}s(w,"cloneThinkingContent");function m(o){return{type:"toolCall",id:o.id,name:o.name,arguments:structuredClone(o.arguments),...o.thoughtSignature===void 0?{}:{thoughtSignature:o.thoughtSignature},...o.namespace===void 0?{}:{namespace:o.namespace}}}s(m,"cloneToolCall");function y(o){return{role:"assistant",content:[],api:o.api,provider:o.provider,model:o.model,...o.responseModel===void 0?{}:{responseModel:o.responseModel},...o.responseId===void 0?{}:{responseId:o.responseId},...o.providerThinkingLevel===void 0?{}:{providerThinkingLevel:o.providerThinkingLevel},...o.diagnostics===void 0?{}:{diagnostics:structuredClone(o.diagnostics)},usage:structuredClone(o.usage),stopReason:"pending",timestamp:o.timestamp}}s(y,"cloneStartMessage");function h(o){if(!Number.isSafeInteger(o)||o<0)throw new Error(`Invalid assistant message frame contentIndex: ${o}`)}s(h,"assertContentIndex");function c(o){h(o.contentIndex);const t=o.partial.content[o.contentIndex];if(!t)throw new Error(`${o.type} event has no content block at index ${o.contentIndex}`);return t}s(c,"eventBlock");function u(o){const t=JSON.stringify(o);if(t===void 0)throw new Error("Tool-call arguments are not JSON-serializable");return t}s(u,"serializedArguments");const b=u(d(""));function f(o,t){if(typeof o=="string")return typeof t=="string"&&t.startsWith(o);if(Array.isArray(o))return Array.isArray(t)&&o.length<=t.length&&o.every((a,n)=>f(a,t[n]));if(typeof o!="object"||o===null)return Object.is(o,t);if(typeof t!="object"||t===null||Array.isArray(t))return!1;const e=t;return Object.entries(o).every(([a,n])=>Object.hasOwn(e,a)&&f(n,e[a]))}s(f,"isJsonPrefix");class E{static{s(this,"AssistantMessageFrameEncoder")}started=!1;terminal=!1;blocks=new Map;encode(t){if(this.terminal)throw new Error(`Assistant message event ${t.type} follows a terminal event`);switch(t.type){case"start":if(this.started)throw new Error("Assistant message stream contains more than one start event");return this.started=!0,{type:"start",partial:y(t.partial)};case"done":if(!this.started)throw new Error("Assistant message done event appears before start");this.terminal=!0;return;case"error":this.terminal=!0;return}if(!this.started)throw new Error(`Assistant message ${t.type} event appears before start`);switch(t.type){case"text_start":{const e=c(t);if(e.type!=="text")throw new Error(`text_start event points to ${e.type} block at index ${t.contentIndex}`);return this.startBlock(t.contentIndex,{kind:"text",coveredChars:e.text.length,deltaChars:0}),{type:"text_start",contentIndex:t.contentIndex,content:x(e)}}case"text_delta":return this.encodeTextDelta(t.contentIndex,t.delta,"text");case"text_end":{const e=c(t);if(e.type!=="text")throw new Error(`text_end event points to ${e.type} block at index ${t.contentIndex}`);return this.endBlock(t.contentIndex,"text"),{type:"text_end",contentIndex:t.contentIndex,content:t.content,...e.textSignature===void 0?{}:{textSignature:e.textSignature}}}case"thinking_start":{const e=c(t);if(e.type!=="thinking")throw new Error(`thinking_start event points to ${e.type} block at index ${t.contentIndex}`);return this.startBlock(t.contentIndex,{kind:"thinking",coveredChars:e.thinking.length,deltaChars:0}),{type:"thinking_start",contentIndex:t.contentIndex,content:w(e)}}case"thinking_delta":return this.encodeTextDelta(t.contentIndex,t.delta,"thinking");case"thinking_end":{const e=c(t);if(e.type!=="thinking")throw new Error(`thinking_end event points to ${e.type} block at index ${t.contentIndex}`);return this.endBlock(t.contentIndex,"thinking"),{type:"thinking_end",contentIndex:t.contentIndex,content:t.content,...e.thinkingSignature===void 0?{}:{thinkingSignature:e.thinkingSignature},...e.redacted===void 0?{}:{redacted:e.redacted}}}case"toolcall_start":{const e=c(t);if(e.type!=="toolCall")throw new Error(`toolcall_start event points to ${e.type} block at index ${t.contentIndex}`);const a=u(e.arguments),n=a===b;return this.startBlock(t.contentIndex,{kind:"toolCall",caughtUp:n,catchupJson:"",snapshotArguments:n?"":a}),{type:"toolcall_start",contentIndex:t.contentIndex,toolCall:m(e)}}case"toolcall_delta":{const e=this.block(t.contentIndex,"toolCall");if(e.kind!=="toolCall")throw new Error("Unreachable tool-call encoder state");if(e.caughtUp)return t.delta.length===0?void 0:{type:"toolcall_delta",contentIndex:t.contentIndex,delta:t.delta};e.catchupJson+=t.delta;const a=d(e.catchupJson);if(u(a)!==e.snapshotArguments){const r=d(e.snapshotArguments);if(!f(r,a))return}e.caughtUp=!0,e.snapshotArguments="";const n=e.catchupJson;return e.catchupJson="",n.length===0?void 0:{type:"toolcall_checkpoint",contentIndex:t.contentIndex,json:n}}case"toolcall_end":{const e=c(t);if(e.type!=="toolCall")throw new Error(`toolcall_end event points to ${e.type} block at index ${t.contentIndex}`);if(t.toolCall.type!=="toolCall")throw new Error(`toolcall_end event has invalid tool call at index ${t.contentIndex}`);return this.endBlock(t.contentIndex,"toolCall"),{type:"toolcall_end",contentIndex:t.contentIndex,id:t.toolCall.id,name:t.toolCall.name,arguments:structuredClone(t.toolCall.arguments),...t.toolCall.thoughtSignature===void 0?{}:{thoughtSignature:t.toolCall.thoughtSignature},...t.toolCall.namespace===void 0?{}:{namespace:t.toolCall.namespace}}}}}startBlock(t,e){if(h(t),this.blocks.has(t))throw new Error(`Assistant message block ${t} starts more than once`);this.blocks.set(t,e)}block(t,e){h(t);const a=this.blocks.get(t);if(a===void 0)throw new Error(`Assistant message ${e} block ${t} has not started`);if(a.kind!==e)throw new Error(`Assistant message block ${t} is ${a.kind}, not ${e}`);return a}endBlock(t,e){this.block(t,e),this.blocks.delete(t)}encodeTextDelta(t,e,a){const n=this.block(t,a);if(n.kind==="toolCall")throw new Error("Unreachable text encoder state");const r=n.deltaChars;n.deltaChars+=e.length;const i=Math.max(0,n.coveredChars-r);if(i>=e.length)return;const p=i===0?e:e.slice(i);return a==="text"?{type:"text_delta",contentIndex:t,delta:p}:{type:"thinking_delta",contentIndex:t,delta:p}}}function g(o,t,e,a,n){if(h(e),e!==o.content.length){const r=e<o.content.length?"already exists":"would leave a gap";throw new Error(`Cannot start assistant message block at index ${e}: ${r}`)}o.content.push(structuredClone(a)),t.set(e,n)}s(g,"appendBlock");function l(o,t,e,a,n){h(e);const r=t.get(e),i=o.content[e];if(!r||!i)throw new Error(`${n} frame has no started block at index ${e}`);if(r.kind!==a||i.type!==a)throw new Error(`${n} frame expected ${a} block at index ${e}, found ${i.type}`);if(r.ended)throw new Error(`${n} frame follows the end of block at index ${e}`);return{block:i,state:r}}s(l,"activeBlock");function S(o){let t,e;const a=new Map;for(const n of o){if(n.type==="start"){if(t)throw new Error("Assistant message frame sequence contains more than one start frame");if(e!==void 0)throw new Error(`${e} frame appears before the start frame`);t=structuredClone(n.partial);continue}if(!t){e??=n.type;continue}switch(n.type){case"text_start":if(n.content.type!=="text")throw new Error(`text_start frame contains ${n.content.type} content`);g(t,a,n.contentIndex,n.content,{kind:"text",ended:!1});break;case"text_delta":{const{block:r}=l(t,a,n.contentIndex,"text",n.type);if(r.type!=="text")throw new Error("Unreachable text frame state");r.text+=n.delta;break}case"text_end":{const{block:r,state:i}=l(t,a,n.contentIndex,"text",n.type);if(r.type!=="text")throw new Error("Unreachable text frame state");r.text=n.content,delete r.textSignature,n.textSignature!==void 0&&(r.textSignature=n.textSignature),i.ended=!0;break}case"thinking_start":if(n.content.type!=="thinking")throw new Error(`thinking_start frame contains ${n.content.type} content`);g(t,a,n.contentIndex,n.content,{kind:"thinking",ended:!1});break;case"thinking_delta":{const{block:r}=l(t,a,n.contentIndex,"thinking",n.type);if(r.type!=="thinking")throw new Error("Unreachable thinking frame state");r.thinking+=n.delta;break}case"thinking_end":{const{block:r,state:i}=l(t,a,n.contentIndex,"thinking",n.type);if(r.type!=="thinking")throw new Error("Unreachable thinking frame state");r.thinking=n.content,delete r.thinkingSignature,delete r.redacted,n.thinkingSignature!==void 0&&(r.thinkingSignature=n.thinkingSignature),n.redacted!==void 0&&(r.redacted=n.redacted),i.ended=!0;break}case"toolcall_start":if(n.toolCall.type!=="toolCall")throw new Error(`toolcall_start frame contains ${n.toolCall.type} content`);g(t,a,n.contentIndex,n.toolCall,{kind:"toolCall",ended:!1,json:""});break;case"toolcall_checkpoint":{const{block:r,state:i}=l(t,a,n.contentIndex,"toolCall",n.type);if(r.type!=="toolCall"||i.kind!=="toolCall")throw new Error("Unreachable tool-call checkpoint state");i.json=n.json,r.arguments=d(n.json);break}case"toolcall_delta":{const{block:r,state:i}=l(t,a,n.contentIndex,"toolCall",n.type);if(r.type!=="toolCall"||i.kind!=="toolCall")throw new Error("Unreachable tool-call frame state");i.json+=n.delta;break}case"toolcall_end":{const{block:r,state:i}=l(t,a,n.contentIndex,"toolCall",n.type);if(r.type!=="toolCall")throw new Error("Unreachable tool-call frame state");r.id=n.id,r.name=n.name,r.arguments=structuredClone(n.arguments),delete r.thoughtSignature,delete r.namespace,n.thoughtSignature!==void 0&&(r.thoughtSignature=n.thoughtSignature),n.namespace!==void 0&&(r.namespace=n.namespace),i.ended=!0;break}}}if(t){for(const[n,r]of a){if(r.kind!=="toolCall"||r.ended||r.json.length===0)continue;const i=t.content[n];if(i?.type!=="toolCall")throw new Error("Unreachable tool-call frame state");i.arguments=d(r.json)}return t}}s(S,"reduceAssistantMessageFrames");export{E as AssistantMessageFrameEncoder,S as reduceAssistantMessageFrames};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var f=(s,t)=>m(s,"name",{value:t,configurable:!0});const u=f(s=>s,"identityToolName");function w(s,t,n=u){const a=new Map;for(const e of s.tools??[])a.set(n(e.name),e);if(!t)return{immediate:[...a.values()],deferred:new Map};const d=new Set,r=new Set;for(const e of s.messages)if(e.role==="assistant")for(const o of e.content)o.type==="toolCall"&&r.add(n(o.name));else if(e.role==="toolResult")for(const o of e.addedToolNames??[]){const c=n(o);r.has(c)||d.add(c)}const l=[],i=new Map;for(const[e,o]of a)d.has(e)?i.set(e,o):l.push(o);return{immediate:l,deferred:i}}f(w,"splitDeferredTools");export{w as splitDeferredTools};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var n=(o,r)=>s(o,"name",{value:r,configurable:!0});function t(){return typeof process>"u"||!(process.versions?.node||process.versions?.bun)?null:process.getBuiltinModule?.("node:os")??null}n(t,"loadNodeOs");const e=t();function u(){return e?`dal (${e.platform()} ${e.release()}; ${e.arch()})`:"dal (browser)"}n(u,"getPiUserAgent");export{u as getPiUserAgent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var t=(r,e)=>n(r,"name",{value:e,configurable:!0});import{Type as i}from"typebox";function f(r,e){return i.Unsafe({type:"string",enum:r,...e?.description&&{description:e.description},...e?.default&&{default:e.default}})}t(f,"StringEnum");export{f as StringEnum};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var s=(e,o)=>h(e,"name",{value:o,configurable:!0});import{AgentHarness as H,createBashTool as O,createEditTool as A,createReadTool as _,createWriteTool as G}from"@earendil-works/pi-agent-core";import{getExperimentalToolSampling as L}from"../core/experimental.js";import{buildSystemPrompt as M}from"../core/system-prompt.js";import{bashToolSystemPromptContribution as P}from"../core/tools/bash.js";import{editToolSystemPromptContribution as v}from"../core/tools/edit.js";import{readToolSystemPromptContribution as y}from"../core/tools/read.js";import{writeToolSystemPromptContribution as E}from"../core/tools/write.js";function d(e,o,p){return{...e,...p,constrainedSampling:L(),execute:s((m,t,n,l)=>e.execute(m,t,n,l,o),"execute")}}s(d,"createCodingAgentHarnessTool");function x(e){const o=e.activeToolNames.flatMap(t=>{const n=e.tools.find(l=>l.name===t);return n?[n]:[]}),p=Object.fromEntries(o.flatMap(t=>{const n=t.promptSnippet?.replace(/[\r\n]+/g," ").replace(/\s+/g," ").trim();return n?[[t.name,n]]:[]})),m=o.flatMap(t=>t.promptGuidelines??[]);return M({...e.systemPromptOptions,cwd:e.cwd,selectedTools:o.map(t=>t.name),toolSnippets:p,promptGuidelines:m})}s(x,"buildCodingAgentHarnessSystemPrompt");async function W(e){const{env:o,bashCommandPrefix:p,sessionFile:m,systemPromptOptions:t,tools:n,activeToolNames:l,systemPrompt:b,...w}=e;let u;const g=s(()=>{if(!u)throw new Error("Coding-agent Harness callback ran before Harness initialization");return u},"getHarness");let c=n;if(c===void 0){const i=await e.session.getMetadata(),a={env:o};c=[d(_(),a,{promptSnippet:y.snippet,promptGuidelines:y.guidelines}),d(O({commandPrefix:p,prepare:s(async r=>{const T=g(),[f,N]=await Promise.all([T.getModel(),T.getThinkingLevel()]);r.env.PI_SESSION_ID=i.id,r.env.PI_SESSION_FILE=m??"",r.env.PI_PROVIDER=f.provider,r.env.PI_MODEL=f.id,r.env.PI_REASONING_LEVEL=N},"prepare")}),a,{promptSnippet:P.snippet,promptGuidelines:P.guidelines}),d(A(),a,{promptSnippet:v.snippet,promptGuidelines:v.guidelines}),d(G(),a,{promptSnippet:E.snippet,promptGuidelines:E.guidelines})]}const I=[...l??c.map(i=>i.name)],C=b??(async()=>{const i=g(),[a,r]=await Promise.all([i.getTools(),i.getActiveTools()]);return x({cwd:o.cwd,tools:a,activeToolNames:r,systemPromptOptions:t})}),S=await H.create({...w,tools:c,activeToolNames:I,systemPrompt:C});return u=S.harness,S}s(W,"createCodingAgentHarness");export{x as buildCodingAgentHarnessSystemPrompt,W as createCodingAgentHarness};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var o=(e,r)=>i(e,"name",{value:r,configurable:!0});import{createRequire as t}from"module";import{dirname as a,join as c}from"path";import{pathToFileURL as n}from"url";const p=t(import.meta.url),s=t(n(c(a(process.execPath),"package.json")).href),l=process.platform!=="linux"||!!(process.env.DISPLAY||process.env.WAYLAND_DISPLAY);function u(e=[p,s]){for(const r of e)try{return r("@mariozechner/clipboard")}catch{}return null}o(u,"loadClipboardNative");const m=!process.env.TERMUX_VERSION&&l?u():null;export{m as clipboard,u as loadClipboardNative};
|