@harrylabsj/kiwi-merchant-cloud 0.12.4 → 0.12.5
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/app/a2a/node.d.ts +5 -1
- package/app/a2a/node.js +68 -30
- package/app/a2a/node.js.map +1 -1
- package/app/a2a/server/merchant-handler.d.ts +4 -0
- package/app/a2a/server/merchant-handler.js +123 -45
- package/app/a2a/server/merchant-handler.js.map +1 -1
- package/app/a2a/server/merchant-product-facts.d.ts +32 -0
- package/app/a2a/server/merchant-product-facts.js +57 -0
- package/app/a2a/server/merchant-product-facts.js.map +1 -0
- package/app/agent/buyer/buyer-tools.js +285 -3
- package/app/agent/buyer/buyer-tools.js.map +1 -1
- package/app/agent/merchant/types.d.ts +4 -9
- package/app/agent/merchant/types.js +14 -0
- package/app/agent/merchant/types.js.map +1 -1
- package/app/buyer-core/a2a-knp.d.ts +1 -0
- package/app/buyer-core/a2a-knp.js +1 -1
- package/app/buyer-core/a2a-knp.js.map +1 -1
- package/app/buyer-core/a2a-negotiator.d.ts +2 -0
- package/app/buyer-core/a2a-negotiator.js +20 -19
- package/app/buyer-core/a2a-negotiator.js.map +1 -1
- package/app/buyer-core/a2a-quote-fetcher.d.ts +2 -0
- package/app/buyer-core/a2a-quote-fetcher.js +13 -5
- package/app/buyer-core/a2a-quote-fetcher.js.map +1 -1
- package/app/buyer-core/product-summary.d.ts +4 -0
- package/app/buyer-core/product-summary.js +6 -0
- package/app/buyer-core/product-summary.js.map +1 -1
- package/app/buyer-core/protocol-recovery.d.ts +12 -1
- package/app/buyer-core/protocol-recovery.js +59 -19
- package/app/buyer-core/protocol-recovery.js.map +1 -1
- package/app/buyer-core/receive-gate.d.ts +11 -0
- package/app/buyer-core/receive-gate.js +107 -0
- package/app/buyer-core/receive-gate.js.map +1 -0
- package/app/cloud/bootstrap.d.ts +4 -0
- package/app/cloud/bootstrap.js +69 -55
- package/app/cloud/bootstrap.js.map +1 -1
- package/app/cloud/file-listing-publication.js +6 -0
- package/app/cloud/file-listing-publication.js.map +1 -1
- package/app/cloud/main.d.ts +3 -0
- package/app/cloud/main.js +47 -11
- package/app/cloud/main.js.map +1 -1
- package/app/cloud/product-import-tabular.d.ts +1 -1
- package/app/cloud/product-import-tabular.js +263 -36
- package/app/cloud/product-import-tabular.js.map +1 -1
- package/app/cloud/product-source.d.ts +6 -1
- package/app/cloud/product-source.js +47 -15
- package/app/cloud/product-source.js.map +1 -1
- package/app/cloud-sample/products.json +3 -3
- package/app/commerce/data-source.d.ts +4 -0
- package/app/commerce/data-source.js.map +1 -1
- package/app/commerce/shopping-cli-source.js +4 -0
- package/app/commerce/shopping-cli-source.js.map +1 -1
- package/app/discovery/catalog-source/kiwi-source.d.ts +2 -0
- package/app/discovery/catalog-source/kiwi-source.js +4 -0
- package/app/discovery/catalog-source/kiwi-source.js.map +1 -1
- package/app/handoff/index.d.ts +2 -1
- package/app/handoff/index.js +1 -0
- package/app/handoff/index.js.map +1 -1
- package/app/handoff/launch-marketplace-policy.d.ts +149 -0
- package/app/handoff/launch-marketplace-policy.js +301 -0
- package/app/handoff/launch-marketplace-policy.js.map +1 -0
- package/app/handoff/marketplace-product-link.d.ts +18 -0
- package/app/handoff/marketplace-product-link.js +71 -0
- package/app/handoff/marketplace-product-link.js.map +1 -0
- package/app/handoff/transaction.d.ts +30 -0
- package/app/handoff/transaction.js +64 -0
- package/app/handoff/transaction.js.map +1 -1
- package/app/handoff/url-safety.d.ts +3 -0
- package/app/handoff/url-safety.js +4 -0
- package/app/handoff/url-safety.js.map +1 -1
- package/app/http/merchant-management/page.js +176 -45
- package/app/http/merchant-management/page.js.map +1 -1
- package/app/i18n.d.ts +1 -0
- package/app/i18n.js +3 -0
- package/app/i18n.js.map +1 -1
- package/app/lifecycle/close.d.ts +24 -0
- package/app/lifecycle/close.js +131 -0
- package/app/lifecycle/close.js.map +1 -0
- package/app/mcp/merchant-runtime-assembly.js +6 -4
- package/app/mcp/merchant-runtime-assembly.js.map +1 -1
- package/app/mcp/tools.js +17 -16
- package/app/mcp/tools.js.map +1 -1
- package/app/merchant/application/service.d.ts +4 -0
- package/app/merchant/application/service.js.map +1 -1
- package/app/merchant/stats-store.d.ts +3 -0
- package/app/merchant/stats-store.js +15 -1
- package/app/merchant/stats-store.js.map +1 -1
- package/app/merchant-core/rfq/data-source-adapter.d.ts +2 -10
- package/app/merchant-core/rfq/data-source-adapter.js +21 -9
- package/app/merchant-core/rfq/data-source-adapter.js.map +1 -1
- package/app/merchant-gateway/pinned-fetch.js +5 -2
- package/app/merchant-gateway/pinned-fetch.js.map +1 -1
- package/build-manifest.json +2901 -1966
- package/node_modules/@earendil-works/chord/CHANGELOG.md +20 -0
- package/node_modules/@earendil-works/chord/README.md +77 -194
- package/node_modules/@earendil-works/chord/dist/cell.d.ts +101 -0
- package/node_modules/@earendil-works/chord/dist/cell.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/cell.js +316 -0
- package/node_modules/@earendil-works/chord/dist/cell.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/cluster.d.ts +26 -0
- package/node_modules/@earendil-works/chord/dist/cluster.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/cluster.js +214 -0
- package/node_modules/@earendil-works/chord/dist/cluster.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/connection.d.ts +157 -0
- package/node_modules/@earendil-works/chord/dist/connection.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/connection.js +757 -0
- package/node_modules/@earendil-works/chord/dist/connection.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/context/index.d.ts +12 -1
- package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/context/index.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/contract.d.ts +133 -0
- package/node_modules/@earendil-works/chord/dist/contract.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/contract.js +157 -0
- package/node_modules/@earendil-works/chord/dist/contract.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/declare.d.ts +70 -0
- package/node_modules/@earendil-works/chord/dist/declare.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/declare.js +22 -0
- package/node_modules/@earendil-works/chord/dist/declare.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/delta/apply-immutable-trusted.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/diff.d.ts +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/diff.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/diff.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +2 -2
- package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/index.js +41 -0
- package/node_modules/@earendil-works/chord/dist/delta/index.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/revision-validator.d.ts +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/revision-validator.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/revision-validator.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/tracker.d.ts +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/tracker.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/delta/tracker.js +40 -4
- package/node_modules/@earendil-works/chord/dist/delta/tracker.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/errors.d.ts +27 -0
- package/node_modules/@earendil-works/chord/dist/errors.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/errors.js +44 -0
- package/node_modules/@earendil-works/chord/dist/errors.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/host.d.ts +254 -0
- package/node_modules/@earendil-works/chord/dist/host.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/host.js +795 -0
- package/node_modules/@earendil-works/chord/dist/host.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/index.d.ts +17 -10
- package/node_modules/@earendil-works/chord/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/index.js +8 -8
- package/node_modules/@earendil-works/chord/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/json.d.ts +9 -1
- package/node_modules/@earendil-works/chord/dist/json.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/json.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/link.d.ts +72 -0
- package/node_modules/@earendil-works/chord/dist/link.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/link.js +169 -0
- package/node_modules/@earendil-works/chord/dist/link.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/loader.d.ts +4 -0
- package/node_modules/@earendil-works/chord/dist/loader.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/loader.js +68 -0
- package/node_modules/@earendil-works/chord/dist/loader.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/manager.d.ts +115 -0
- package/node_modules/@earendil-works/chord/dist/manager.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/manager.js +319 -0
- package/node_modules/@earendil-works/chord/dist/manager.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/node.d.ts +3 -4
- package/node_modules/@earendil-works/chord/dist/node.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/node.js +3 -2
- package/node_modules/@earendil-works/chord/dist/node.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/publish.d.ts +5 -0
- package/node_modules/@earendil-works/chord/dist/publish.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/publish.js +40 -0
- package/node_modules/@earendil-works/chord/dist/publish.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/record.d.ts +320 -0
- package/node_modules/@earendil-works/chord/dist/record.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/record.js +1292 -0
- package/node_modules/@earendil-works/chord/dist/record.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/registry.d.ts +25 -0
- package/node_modules/@earendil-works/chord/dist/registry.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/registry.js +6 -0
- package/node_modules/@earendil-works/chord/dist/registry.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/reload.d.ts +118 -0
- package/node_modules/@earendil-works/chord/dist/reload.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/reload.js +589 -0
- package/node_modules/@earendil-works/chord/dist/reload.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/remote.d.ts +70 -0
- package/node_modules/@earendil-works/chord/dist/remote.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/remote.js +308 -0
- package/node_modules/@earendil-works/chord/dist/remote.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/schema.d.ts +21 -0
- package/node_modules/@earendil-works/chord/dist/schema.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/schema.js +228 -0
- package/node_modules/@earendil-works/chord/dist/schema.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/state.d.ts +92 -0
- package/node_modules/@earendil-works/chord/dist/state.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/{services/state.js → state.js} +28 -138
- package/node_modules/@earendil-works/chord/dist/state.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/types.d.ts +62 -262
- package/node_modules/@earendil-works/chord/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/chord/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/chord/dist/websocket.d.ts +16 -0
- package/node_modules/@earendil-works/chord/dist/websocket.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/websocket.js +15 -0
- package/node_modules/@earendil-works/chord/dist/websocket.js.map +1 -0
- package/node_modules/@earendil-works/chord/dist/wire.d.ts +135 -0
- package/node_modules/@earendil-works/chord/dist/wire.d.ts.map +1 -0
- package/node_modules/@earendil-works/chord/dist/wire.js +112 -0
- package/node_modules/@earendil-works/chord/dist/wire.js.map +1 -0
- package/node_modules/@earendil-works/chord/docs/guide.md +750 -0
- package/node_modules/@earendil-works/chord/docs/spec.md +261 -0
- package/node_modules/@earendil-works/chord/docs/tutorial.md +909 -0
- package/node_modules/@earendil-works/chord/package.json +10 -11
- package/node_modules/@earendil-works/chord/src/delta/README.md +5 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +9 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +2 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +2 -14
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +4 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/README.md +14 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +63 -22
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.d.ts +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.js +76 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +3 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +2 -74
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +33 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.d.ts +21 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js +98 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/lazy.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +31 -14
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +7 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.js +162 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.d.ts +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js +5 -89
- package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js +14 -6
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +16 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +51 -27
- package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +4 -4
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +7 -8
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.js +46 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.d.ts +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts +338 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +375 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +25 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts +91 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +55 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js +12 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.d.ts +40 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.js +41 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts +11 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +52 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js +4 -12
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +22 -305
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +10 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.d.ts +3 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +8 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-codemode/README.md +177 -11
- package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts +53 -0
- package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js +64 -0
- package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts +6 -21
- package/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/declarations.js +113 -127
- package/node_modules/@earendil-works/pi-codemode/dist/declarations.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/index.d.ts +5 -2
- package/node_modules/@earendil-works/pi-codemode/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/index.js +4 -1
- package/node_modules/@earendil-works/pi-codemode/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts +15 -0
- package/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/portable.js +12 -0
- package/node_modules/@earendil-works/pi-codemode/dist/portable.js.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts +66 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js +494 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts +8 -30
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +41 -283
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts +63 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js +80 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts +9 -3
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +122 -12
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts +47 -6
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js +6 -1
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts +102 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js +175 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts +24 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js +293 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js.map +1 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js +11 -110
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/source.d.ts +2 -1
- package/node_modules/@earendil-works/pi-codemode/dist/source.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/source.js +8 -2
- package/node_modules/@earendil-works/pi-codemode/dist/source.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/types.d.ts +101 -6
- package/node_modules/@earendil-works/pi-codemode/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-codemode/package.json +15 -3
- package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +165 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-Q7SXESRX.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-LM52U7CK.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/bedrock-converse-stream.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-22CYIUS4.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-3ZATHNCK.js +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-5GTPJSRI.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6MWTY2OB.js +130 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6QGV3IWD.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-2KAZSACP.js → chunk-AKJ3ZOR3.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-G7EDXK4D.js → chunk-CQ3XTLTY.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-SYF2TF6W.js → chunk-D7PHKNBM.js} +29 -92
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DOST5PQW.js +82 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DVQEBGVL.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-ZSI3BL5Q.js → chunk-GDR5JFDJ.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-HACVPRBJ.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ITZNWD4K.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-LD2P6SFZ.js → chunk-PMRZO46Y.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-ZSBPJAJ2.js → chunk-TJXZSVTD.js} +116 -99
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-BYB6ZAAQ.js → chunk-TN4NLWHF.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WBQBCFWG.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WJUNYZC5.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-XIX7LUWI.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ZBURYEWF.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{cli-KILDDGW3.js → cli-SWM4FQ6V.js} +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/codemode-worker.js +117 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/easter-egg-3d-OX6RUCIS.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/execute-3CFUPDLS.js +499 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/github-copilot.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-generative-ai-ZOK6CV7D.js → google-generative-ai-DXKP72HC.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-vertex-VKWZQ3AY.js → google-vertex-W6SIDOVV.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{llama-cpp-classify-XT44PI3C.js → llama-cpp-classify-FYN623RH.js} +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-GBMHTSYF.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-RN6B5UPP.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-completions-GWHGMQ3T.js → openai-completions-QW2B4SML.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-decisions-WVPMQ4JD.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-responses-EZ7FJ2KL.js → openai-responses-KDJUSIU7.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openrouter-images-ZVXWCSIM.js → openrouter-images-DUPG5DZO.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{pi-messages-TM5SOOIW.js → pi-messages-YHKPQIHC.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/runtime-366HE7CW.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-GI6FRNLG.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +24 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts +18 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +44 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +47 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +148 -78
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +20 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js +42 -52
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/bug-report.d.ts +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/bug-report.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +7 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +4 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +44 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.d.ts +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.js +16 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.d.ts +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.js +16 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts +198 -66
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js +26 -23
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js +30 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts +695 -74
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js +16 -166
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +13 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.d.ts +12 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +82 -24
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +9 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts +13 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +19 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts +65 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js +66 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +15 -145
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +85 -57
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.d.ts +228 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.js +287 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.d.ts +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +9 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.js +4 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts +13 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +18 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts +18 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +46 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.js +7 -35
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.js +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js +165 -48
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.js +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.d.ts +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js +9 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.d.ts +15 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js +58 -38
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +34 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js +22 -31
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js +188 -84
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts +5 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js +36 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts +3 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js +4 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts +7 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js +26 -44
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js +68 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.d.ts +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.js +10 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.d.ts +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js +2 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts +5 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +17 -14
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +5 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +5 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js +8 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +4 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +5 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +9 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +103 -40
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.d.ts +34 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.js +110 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/dark.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/light.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +13 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +22 -29
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +24 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.d.ts +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js +30 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js +18 -12
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js +5 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +9 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.d.ts +15 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.js +30 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js +6 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/cli-integration.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/cli.md +19 -7
- package/node_modules/@earendil-works/pi-coding-agent/docs/codemode.md +30 -9
- package/node_modules/@earendil-works/pi-coding-agent/docs/compaction.md +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/environment-variables.md +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +7 -4
- package/node_modules/@earendil-works/pi-coding-agent/docs/json.md +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/docs/keybindings.md +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/docs/llama-cpp.md +8 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/mcp.md +4 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/message-types.md +22 -4
- package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +5 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +47 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +6 -4
- package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +14 -0
- package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +4 -2
- package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/README.md +0 -3
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-test.ts +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/plan-mode/index.ts +6 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/package.json +10 -21
- package/node_modules/@earendil-works/pi-coding-agent/schemas/keybindings.schema.json +393 -0
- package/node_modules/@earendil-works/pi-coding-agent/schemas/models.schema.json +1157 -0
- package/node_modules/@earendil-works/pi-coding-agent/schemas/settings.schema.json +765 -0
- package/node_modules/@earendil-works/pi-coding-agent/schemas/theme.schema.json +365 -0
- package/node_modules/@earendil-works/pi-durable/CHANGELOG.md +114 -0
- package/node_modules/@earendil-works/pi-durable/README.md +164 -12
- package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.d.ts +173 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.js +886 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.d.ts +38 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.js +119 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/index.d.ts +3 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/index.js +3 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/models.d.ts +28 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/models.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/models.js +231 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/models.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/output.d.ts +41 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/output.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/output.js +167 -0
- package/node_modules/@earendil-works/pi-durable/dist/codemode/output.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/decode.d.ts +16 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/decode.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/decode.js +28 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/decode.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/index.d.ts +197 -3
- package/node_modules/@earendil-works/pi-durable/dist/env/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/env/index.js +2 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.d.ts +13 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.js +147 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.d.ts +29 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.js +485 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/env/node.d.ts +11 -2
- package/node_modules/@earendil-works/pi-durable/dist/env/node.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/env/node.js +284 -21
- package/node_modules/@earendil-works/pi-durable/dist/env/node.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/errors.d.ts +20 -3
- package/node_modules/@earendil-works/pi-durable/dist/errors.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/errors.js +34 -5
- package/node_modules/@earendil-works/pi-durable/dist/errors.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/agent.d.ts +7 -3
- package/node_modules/@earendil-works/pi-durable/dist/harness/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/agent.js +81 -25
- package/node_modules/@earendil-works/pi-durable/dist/harness/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.d.ts +6 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.js +11 -8
- package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/context.d.ts +29 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/context.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/context.js +125 -24
- package/node_modules/@earendil-works/pi-durable/dist/harness/context.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/events.d.ts +35 -15
- package/node_modules/@earendil-works/pi-durable/dist/harness/events.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/events.js +77 -23
- package/node_modules/@earendil-works/pi-durable/dist/harness/events.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/generation.d.ts +2 -0
- package/node_modules/@earendil-works/pi-durable/dist/harness/generation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/generation.js +40 -16
- package/node_modules/@earendil-works/pi-durable/dist/harness/generation.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/harness.d.ts +7 -0
- package/node_modules/@earendil-works/pi-durable/dist/harness/harness.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/harness.js +56 -28
- package/node_modules/@earendil-works/pi-durable/dist/harness/harness.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.d.ts +16 -4
- package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.js +26 -3
- package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/live.d.ts +74 -17
- package/node_modules/@earendil-works/pi-durable/dist/harness/live.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/live.js +66 -14
- package/node_modules/@earendil-works/pi-durable/dist/harness/live.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/output.d.ts +13 -6
- package/node_modules/@earendil-works/pi-durable/dist/harness/output.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/output.js +75 -18
- package/node_modules/@earendil-works/pi-durable/dist/harness/output.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.d.ts +18 -5
- package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.js +794 -168
- package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.d.ts +7 -4
- package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.js +32 -13
- package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.d.ts +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.js +15 -10
- package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/tool.d.ts +45 -5
- package/node_modules/@earendil-works/pi-durable/dist/harness/tool.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/tool.js +400 -67
- package/node_modules/@earendil-works/pi-durable/dist/harness/tool.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/types.d.ts +194 -17
- package/node_modules/@earendil-works/pi-durable/dist/harness/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/util.d.ts +6 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/util.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/util.js +5 -2
- package/node_modules/@earendil-works/pi-durable/dist/harness/util.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/view.d.ts +6 -2
- package/node_modules/@earendil-works/pi-durable/dist/harness/view.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/harness/view.js +22 -12
- package/node_modules/@earendil-works/pi-durable/dist/harness/view.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.d.ts +4 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.js +9 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/exif.d.ts +3 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/exif.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/exif.js +71 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/exif.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/index.d.ts +18 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/index.js +125 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.d.ts +17 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.js +16 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node.d.ts +21 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node.js +121 -0
- package/node_modules/@earendil-works/pi-durable/dist/images/node.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/index.d.ts +7 -7
- package/node_modules/@earendil-works/pi-durable/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/index.js +4 -4
- package/node_modules/@earendil-works/pi-durable/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/search.d.ts +13 -0
- package/node_modules/@earendil-works/pi-durable/dist/search.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/search.js +85 -0
- package/node_modules/@earendil-works/pi-durable/dist/search.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/session/observation.d.ts +10 -3
- package/node_modules/@earendil-works/pi-durable/dist/session/observation.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/session/observation.js +24 -34
- package/node_modules/@earendil-works/pi-durable/dist/session/observation.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/session/session.d.ts +71 -6
- package/node_modules/@earendil-works/pi-durable/dist/session/session.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/session/session.js +463 -50
- package/node_modules/@earendil-works/pi-durable/dist/session/session.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/session/transaction.d.ts +2 -0
- package/node_modules/@earendil-works/pi-durable/dist/session/transaction.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/session/transaction.js +19 -1
- package/node_modules/@earendil-works/pi-durable/dist/session/transaction.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.d.ts +8 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.js +2 -1
- package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/storage/memory.d.ts +2 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/memory.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/storage/memory.js +79 -27
- package/node_modules/@earendil-works/pi-durable/dist/storage/memory.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/storage/scan.d.ts +18 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/scan.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/scan.js +29 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/scan.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.d.ts +46 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.js +106 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.d.ts +2 -0
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.js +77 -27
- package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.d.ts +7 -0
- package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.js +531 -0
- package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/testing/index.d.ts +3 -2
- package/node_modules/@earendil-works/pi-durable/dist/testing/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/index.js +2 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/runner.d.ts +4 -2
- package/node_modules/@earendil-works/pi-durable/dist/testing/runner.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/runner.js +9 -0
- package/node_modules/@earendil-works/pi-durable/dist/testing/runner.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.js +61 -2
- package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/types.d.ts +20 -0
- package/node_modules/@earendil-works/pi-durable/dist/testing/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/testing/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.d.ts +2 -0
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.js +2 -0
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.d.ts +23 -0
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.js +84 -0
- package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/tools/bash.d.ts +30 -3
- package/node_modules/@earendil-works/pi-durable/dist/tools/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/bash.js +105 -37
- package/node_modules/@earendil-works/pi-durable/dist/tools/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/edit.js +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/edit.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.d.ts +47 -0
- package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.js +30 -0
- package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.js.map +1 -0
- package/node_modules/@earendil-works/pi-durable/dist/tools/image.d.ts +18 -0
- package/node_modules/@earendil-works/pi-durable/dist/tools/image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/image.js +86 -0
- package/node_modules/@earendil-works/pi-durable/dist/tools/image.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/index.d.ts +26 -3
- package/node_modules/@earendil-works/pi-durable/dist/tools/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/index.js +14 -6
- package/node_modules/@earendil-works/pi-durable/dist/tools/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/read.d.ts +10 -2
- package/node_modules/@earendil-works/pi-durable/dist/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/read.js +212 -78
- package/node_modules/@earendil-works/pi-durable/dist/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/write.js +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/tools/write.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/truncate.d.ts +9 -0
- package/node_modules/@earendil-works/pi-durable/dist/truncate.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/truncate.js +12 -4
- package/node_modules/@earendil-works/pi-durable/dist/truncate.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/types.d.ts +89 -12
- package/node_modules/@earendil-works/pi-durable/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-durable/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-durable/package.json +50 -5
- package/node_modules/@earendil-works/pi-mcp/CHANGELOG.md +29 -0
- package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.d.ts +4 -0
- package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/client.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/client.js +9 -5
- package/node_modules/@earendil-works/pi-mcp/dist/client.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/index.d.ts +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.d.ts +3 -0
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.js +8 -5
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts +3 -2
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js +3 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts +4 -0
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js +35 -7
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts +5 -0
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.d.ts +2 -1
- package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.d.ts +9 -2
- package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js +28 -19
- package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.d.ts +9 -1
- package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.js.map +1 -1
- package/node_modules/@earendil-works/pi-mcp/package.json +2 -2
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/README.md +5 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +4 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +3 -3
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +4 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +3 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +4 -4
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js +52 -20
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/program-status.d.ts +23 -0
- package/node_modules/@earendil-works/pi-tui/dist/program-status.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/program-status.js +43 -0
- package/node_modules/@earendil-works/pi-tui/dist/program-status.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +4 -2
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +36 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +5 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +17 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +46 -2
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +8 -4
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +2 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +11 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +23 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +5 -2
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@silvia-odwyer/photon/LICENSE.md +201 -0
- package/node_modules/@silvia-odwyer/photon/README.md +158 -0
- package/node_modules/@silvia-odwyer/photon/package.json +23 -0
- package/node_modules/@silvia-odwyer/photon/photon_rs.d.ts +3443 -0
- package/node_modules/@silvia-odwyer/photon/photon_rs.js +4572 -0
- package/node_modules/@silvia-odwyer/photon/photon_rs_bg.wasm +0 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/@types/node/zlib.d.ts +6 -0
- package/package.json +7 -8
- package/runtime-package.json +7 -9
- package/scripts/check-install-toolchain.mjs +64 -40
- package/shipping-sbom.cdx.json +126 -160
- package/shipping-source.json +15 -15
- package/node_modules/@earendil-works/chord/dist/api.d.ts +0 -20
- package/node_modules/@earendil-works/chord/dist/api.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/api.js +0 -77
- package/node_modules/@earendil-works/chord/dist/api.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/bundler.d.ts +0 -6
- package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/bundler.js +0 -3
- package/node_modules/@earendil-works/chord/dist/bundler.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +0 -12
- package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/host.js +0 -763
- package/node_modules/@earendil-works/chord/dist/facets/host.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +0 -3
- package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/facets/loader.js +0 -5
- package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +0 -30
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +0 -377
- package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +0 -26
- package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/bundle.js +0 -183
- package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +0 -36
- package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/manifest.js +0 -6
- package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/package.d.ts +0 -15
- package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/node/package.js +0 -199
- package/node_modules/@earendil-works/chord/dist/node/package.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +0 -11
- package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/consumer.js +0 -585
- package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +0 -8
- package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/errors.js +0 -22
- package/node_modules/@earendil-works/chord/dist/services/errors.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +0 -15
- package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/handle.js +0 -101
- package/node_modules/@earendil-works/chord/dist/services/handle.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +0 -26
- package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/instances.js +0 -140
- package/node_modules/@earendil-works/chord/dist/services/instances.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +0 -5
- package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/loopback.js +0 -15
- package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +0 -37
- package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/provider.js +0 -521
- package/node_modules/@earendil-works/chord/dist/services/provider.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +0 -15
- package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-codec.js +0 -133
- package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +0 -13
- package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state-internals.js +0 -10
- package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state.d.ts +0 -28
- package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/state.js.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +0 -63
- package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +0 -1
- package/node_modules/@earendil-works/chord/dist/services/wire.js +0 -186
- package/node_modules/@earendil-works/chord/dist/services/wire.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts +0 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +0 -14
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts +0 -6
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +0 -8
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js.map +0 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +0 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-MVG2FL56.js +0 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-7AMFUIWJ.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6FX7UEPL.js +0 -132
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-7JGR3GZN.js +0 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-A3JYRWB6.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-IKZJX7ZT.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-OSKPX3Z5.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-OYBSLV7Y.js +0 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PDFMCAOZ.js +0 -19
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-U7B62NSC.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-VIV3CWXG.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WCQZGZ6I.js +0 -82
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/cloudflare-workers-ai-system-one-X5PVWWYJ.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/easter-egg-3d-T5FFWIBR.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/execute-RYVK27GT.js +0 -388
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-7DAUEE4N.js +0 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-TC3OK7B4.js +0 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/runtime-D5I2NTIF.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/typesafe-system-one-A4CZTQWZ.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-KVWJD3T3.js +0 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.d.ts +0 -85
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.js +0 -132
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.js.map +0 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -361
- package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/README.md +0 -38
- package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/package.json +0 -10
- package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
- package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/session.ts +0 -24
- package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
- package/node_modules/@esbuild/linux-x64/README.md +0 -3
- package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- package/node_modules/@esbuild/linux-x64/package.json +0 -20
- package/node_modules/esbuild/LICENSE.md +0 -21
- package/node_modules/esbuild/README.md +0 -3
- package/node_modules/esbuild/bin/esbuild +0 -223
- package/node_modules/esbuild/install.js +0 -300
- package/node_modules/esbuild/lib/main.d.ts +0 -720
- package/node_modules/esbuild/lib/main.js +0 -2536
- package/node_modules/esbuild/package.json +0 -74
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export class MarketplaceProductLinkError extends Error {
|
|
2
|
+
field;
|
|
3
|
+
constructor(field, message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "MarketplaceProductLinkError";
|
|
6
|
+
this.field = field;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
const PLATFORM_ALIASES = {
|
|
10
|
+
jd: "jd",
|
|
11
|
+
jingdong: "jd",
|
|
12
|
+
"jing dong": "jd",
|
|
13
|
+
京东: "jd",
|
|
14
|
+
京东商城: "jd",
|
|
15
|
+
taobao: "taobao",
|
|
16
|
+
淘宝: "taobao",
|
|
17
|
+
淘宝网: "taobao",
|
|
18
|
+
tmall: "tmall",
|
|
19
|
+
天猫: "tmall",
|
|
20
|
+
天猫商城: "tmall",
|
|
21
|
+
};
|
|
22
|
+
export function normalizeMarketplaceTradePlatform(value) {
|
|
23
|
+
const normalized = typeof value === "string" ? value.trim().normalize("NFKC").toLowerCase() : "";
|
|
24
|
+
const platform = Object.hasOwn(PLATFORM_ALIASES, normalized)
|
|
25
|
+
? PLATFORM_ALIASES[normalized]
|
|
26
|
+
: undefined;
|
|
27
|
+
if (platform === undefined) {
|
|
28
|
+
throw new MarketplaceProductLinkError("trade_platform", "交易平台必须是京东、淘宝、天猫(jd/taobao/tmall)");
|
|
29
|
+
}
|
|
30
|
+
return platform;
|
|
31
|
+
}
|
|
32
|
+
function empty(value) {
|
|
33
|
+
return value === undefined || (typeof value === "string" && value.trim() === "");
|
|
34
|
+
}
|
|
35
|
+
/** The two optional fields form one pair. Never coerce a number or normalize ID digits. */
|
|
36
|
+
export function parseMarketplaceProductFields(value) {
|
|
37
|
+
const platformEmpty = empty(value.trade_platform);
|
|
38
|
+
const idEmpty = empty(value.platform_product_id);
|
|
39
|
+
if (platformEmpty && idEmpty)
|
|
40
|
+
return {};
|
|
41
|
+
if (platformEmpty) {
|
|
42
|
+
throw new MarketplaceProductLinkError("trade_platform", "填写平台商品ID时必须同时填写交易平台");
|
|
43
|
+
}
|
|
44
|
+
if (idEmpty) {
|
|
45
|
+
throw new MarketplaceProductLinkError("platform_product_id", "填写交易平台时必须同时填写平台商品ID");
|
|
46
|
+
}
|
|
47
|
+
const trade_platform = normalizeMarketplaceTradePlatform(value.trade_platform);
|
|
48
|
+
const id = value.platform_product_id;
|
|
49
|
+
if (typeof id !== "string" || !/^[1-9][0-9]*$/.test(id)) {
|
|
50
|
+
throw new MarketplaceProductLinkError("platform_product_id", "平台商品ID必须为ASCII正整数字符串;不能填数字类型、科学计数法、URL或公式");
|
|
51
|
+
}
|
|
52
|
+
return { trade_platform, platform_product_id: id };
|
|
53
|
+
}
|
|
54
|
+
/** No arbitrary URL input, network requests, order placement or payment authorization. */
|
|
55
|
+
export function buildMarketplaceProductLink(platform, id) {
|
|
56
|
+
const fields = parseMarketplaceProductFields({
|
|
57
|
+
trade_platform: platform,
|
|
58
|
+
platform_product_id: id,
|
|
59
|
+
});
|
|
60
|
+
if (fields.trade_platform === undefined || fields.platform_product_id === undefined)
|
|
61
|
+
return undefined;
|
|
62
|
+
switch (fields.trade_platform) {
|
|
63
|
+
case "jd":
|
|
64
|
+
return `https://item.jd.com/${fields.platform_product_id}.html`;
|
|
65
|
+
case "taobao":
|
|
66
|
+
return `https://item.taobao.com/item.htm?id=${fields.platform_product_id}`;
|
|
67
|
+
case "tmall":
|
|
68
|
+
return `https://detail.tmall.com/item.htm?id=${fields.platform_product_id}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=marketplace-product-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace-product-link.js","sourceRoot":"","sources":["../../src/handoff/marketplace-product-link.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAC3C,KAAK,CAA2C;IAEzD,YAAY,KAA+C,EAAE,OAAe;QAC1E,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED,MAAM,gBAAgB,GAAuD;IAC3E,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,IAAI;IACjB,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,QAAQ;IAChB,EAAE,EAAE,QAAQ;IACZ,GAAG,EAAE,QAAQ;IACb,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,OAAO;CACd,CAAC;AAEF,MAAM,UAAU,iCAAiC,CAAC,KAAc;IAC9D,MAAM,UAAU,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CA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C,CAC5C,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,EAAE,EAAE,CAAC;AACrD,CAAC;AAED,0FAA0F;AAC1F,MAAM,UAAU,2BAA2B,CAAC,QAAiB,EAAE,EAAW;IACxE,MAAM,MAAM,GAAG,6BAA6B,CAAC;QAC3C,cAAc,EAAE,QAAQ;QACxB,mBAAmB,EAAE,EAAE;KACxB,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,cAAc,KAAK,SAAS,IAAI,MAAM,CAAC,mBAAmB,KAAK,SAAS;QACjF,OAAO,SAAS,CAAC;IACnB,QAAQ,MAAM,CAAC,cAAc,EAAE,CAAC;QAC9B,KAAK,IAAI;YACP,OAAO,uBAAuB,MAAM,CAAC,mBAAmB,OAAO,CAAC;QAClE,KAAK,QAAQ;YACX,OAAO,uCAAuC,MAAM,CAAC,mBAAmB,EAAE,CAAC;QAC7E,KAAK,OAAO;YACV,OAAO,wCAAwC,MAAM,CAAC,mBAAmB,EAAE,CAAC;IAChF,CAAC;AACH,CAAC"}
|
|
@@ -19,6 +19,7 @@ import type { HandoffEventStore } from "./ledger.js";
|
|
|
19
19
|
import type { HandoffIdempotencyStore } from "./idempotency.js";
|
|
20
20
|
import { type SafeDestinationUrl } from "./url-safety.js";
|
|
21
21
|
import { type DestinationType } from "./destination.js";
|
|
22
|
+
import { type MarketplaceListingSnapshot } from "./launch-marketplace-policy.js";
|
|
22
23
|
/** TransactionHandoff(KTH rev0.3 §6)。不可变;digest 覆盖全部内容。 */
|
|
23
24
|
export interface TransactionHandoff {
|
|
24
25
|
readonly handoff_id: string;
|
|
@@ -61,12 +62,39 @@ export type ExecuteHandoffResult = {
|
|
|
61
62
|
} | {
|
|
62
63
|
kind: "expired";
|
|
63
64
|
reason: string;
|
|
65
|
+
}
|
|
66
|
+
/** URL 承载类目的地缺可信交易来源上下文(A651 包四强制门):固定拒绝、
|
|
67
|
+
* 不交付;候选生命周期不动(配置来源后可重试)。 */
|
|
68
|
+
| {
|
|
69
|
+
kind: "needs_configuration";
|
|
70
|
+
reason: string;
|
|
64
71
|
};
|
|
65
72
|
export interface AgreementReadResult {
|
|
66
73
|
agreement_id: string;
|
|
67
74
|
negotiation_id: string;
|
|
68
75
|
agreed_terms: unknown;
|
|
69
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* A651 包四:三平台市场形态 URL 目的地的可信交易来源上下文(generic
|
|
79
|
+
* executeHandoff 强制门输入)。source reader 是 normal host 依赖(不暴露给
|
|
80
|
+
* 模型参数);市场形态 URL 目的地缺本上下文固定 needs_configuration、不
|
|
81
|
+
* 交付——可选 approval callback / urlSafety 都不能替代或跳过本门
|
|
82
|
+
* (PACK4-READONLY-PLAN §5)。非市场形态 URL 与 opaque 类型不走本门。
|
|
83
|
+
*/
|
|
84
|
+
export interface HandoffLaunchContext {
|
|
85
|
+
/** 审批时由可信读取形成、随批准链持久化的 sidecar 证据(恢复/重试原样带回)。 */
|
|
86
|
+
readonly binding: unknown;
|
|
87
|
+
/** 执行期对同一 listing 的新鲜重读(已配置 CatalogSource.getListing)。 */
|
|
88
|
+
readonly readSource: () => Promise<MarketplaceListingSnapshot | undefined>;
|
|
89
|
+
/** 配置态 catalog 来源标识(与 binding.configured_catalog_origin 同源)。 */
|
|
90
|
+
readonly catalogOrigin: string;
|
|
91
|
+
/** 绑定所属 buyer 任务 id(sidecar task_id 绑定重核)。 */
|
|
92
|
+
readonly taskId: string;
|
|
93
|
+
/** 当前协议实际接受商品 SKU(agreement 重读产物,非模型输入)。 */
|
|
94
|
+
readonly agreedSku: string;
|
|
95
|
+
/** 协议商家归属(catalog owner agent id)。 */
|
|
96
|
+
readonly ownerAgentId: string;
|
|
97
|
+
}
|
|
70
98
|
export interface ExecuteHandoffInput {
|
|
71
99
|
candidate: HandoffCandidate;
|
|
72
100
|
ledger: HandoffEventStore;
|
|
@@ -83,6 +111,8 @@ export interface ExecuteHandoffInput {
|
|
|
83
111
|
agreementReader: (agreementId: string) => Promise<AgreementReadResult | undefined>;
|
|
84
112
|
/** 目的地 URL 安全策略(缺省 HTTPS-only + expectedHost 校验)。 */
|
|
85
113
|
urlSafety?: (url: string) => Promise<SafeDestinationUrl>;
|
|
114
|
+
/** URL 承载类目的地的可信交易来源上下文(强制门;缺失 → needs_configuration)。 */
|
|
115
|
+
launchContext?: HandoffLaunchContext;
|
|
86
116
|
now?: () => string;
|
|
87
117
|
}
|
|
88
118
|
/**
|
|
@@ -38,6 +38,7 @@ import { CommerceError } from "../commerce/data-source.js";
|
|
|
38
38
|
import { foldCandidateLifecycle, transitionCandidateLifecycle } from "./lifecycle.js";
|
|
39
39
|
import { validateExternalDestinationUrl } from "./url-safety.js";
|
|
40
40
|
import { isUrlDestinationType } from "./destination.js";
|
|
41
|
+
import { parseMarketplaceTradeUrl, verifyMarketplaceLaunch, } from "./launch-marketplace-policy.js";
|
|
41
42
|
// 审查 K-M16:handoff 幂等 prune 节流——此前每次 executeHandoff 都读+重写整个
|
|
42
43
|
// JSONL(原子 rename),忙时开销随规模线性放大。改每 HANDOFF_PRUNE_INTERVAL_MS
|
|
43
44
|
// 至多一次;首次执行必跑(0 起点)。
|
|
@@ -203,6 +204,60 @@ async function executeHandoffUnlocked(input) {
|
|
|
203
204
|
return { kind: "expired", reason: "candidate expired before execution" };
|
|
204
205
|
}
|
|
205
206
|
let finalUrl;
|
|
207
|
+
// ── 2.5 A651 包四:三平台市场形态 URL 目的地的可信交易来源强制门 ──────
|
|
208
|
+
// 顺序遵守 PACK4-READONLY-PLAN §6:先判原 expired/terminal/已交付幂等
|
|
209
|
+
// (上方 0.5/0.6/1),再新读取——已 delivered 不重复探测。市场形态 URL
|
|
210
|
+
// 交易没有正常来源上下文时固定 needs_configuration、不交付(旧 READY 无
|
|
211
|
+
// 证据不能迁移旧授权);证据与当前事实不一致(来源/绑定变更)→ stale,
|
|
212
|
+
// 需原审批流程新确认。政策只覆盖三平台(PACK4 §1):非市场形态 URL 保持
|
|
213
|
+
// 原防钓鱼路径(host 门),opaque(quote/contact/session 等)不受本门影响。
|
|
214
|
+
if (isUrlDestinationType(candidate.destination_type)) {
|
|
215
|
+
const marketplaceTrade = parseMarketplaceTradeUrlSafe(candidate.destination_ref) !== undefined;
|
|
216
|
+
if (marketplaceTrade) {
|
|
217
|
+
const launch = input.launchContext;
|
|
218
|
+
if (launch === undefined) {
|
|
219
|
+
return {
|
|
220
|
+
kind: "needs_configuration",
|
|
221
|
+
reason: "marketplace trade destination requires a verified trade source context (unverified origin; not delivered)",
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
let fresh;
|
|
225
|
+
try {
|
|
226
|
+
fresh = await launch.readSource();
|
|
227
|
+
}
|
|
228
|
+
catch (err) {
|
|
229
|
+
if (err instanceof CommerceError && err.code === "request_failed") {
|
|
230
|
+
// 瞬时不可读(超时/网络):候选保持 READY 可重试;不冒交付。
|
|
231
|
+
return { kind: "probe_failed", reason: "trade source re-read temporarily unavailable" };
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
kind: "needs_configuration",
|
|
235
|
+
reason: "trade source re-read failed; source context is unusable (not delivered)",
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
const verdict = verifyMarketplaceLaunch({
|
|
239
|
+
binding: launch.binding,
|
|
240
|
+
fresh,
|
|
241
|
+
catalogOrigin: launch.catalogOrigin,
|
|
242
|
+
taskId: launch.taskId,
|
|
243
|
+
negotiationId: candidate.negotiation_id,
|
|
244
|
+
agreementId: candidate.agreement_id,
|
|
245
|
+
termsDigest: candidate.terms_digest,
|
|
246
|
+
candidateDigest: candidate.candidate_digest,
|
|
247
|
+
destinationType: candidate.destination_type,
|
|
248
|
+
destinationRef: candidate.destination_ref,
|
|
249
|
+
agreedSku: launch.agreedSku,
|
|
250
|
+
ownerAgentId: launch.ownerAgentId,
|
|
251
|
+
nowMs: nowMs,
|
|
252
|
+
});
|
|
253
|
+
if (!verdict.ok) {
|
|
254
|
+
if (verdict.disposition === "needs_configuration") {
|
|
255
|
+
return { kind: "needs_configuration", reason: verdict.reason };
|
|
256
|
+
}
|
|
257
|
+
return stale(input, candidate, now, verdict.reason);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
206
261
|
// URL 安全只适用于 URL 承载类目的地(quote/PO/contact 等 opaque ref
|
|
207
262
|
// 不做 URL 探测——它们不是可点击链接,KTH §7 类型语义)。
|
|
208
263
|
if (input.urlSafety !== undefined && isUrlDestinationType(candidate.destination_type)) {
|
|
@@ -302,6 +357,15 @@ function stale(input, candidate, now, reason) {
|
|
|
302
357
|
});
|
|
303
358
|
return { kind: "stale", reason };
|
|
304
359
|
}
|
|
360
|
+
/** 三平台市场形态判定(吞掉分类错误;非市场形态 → undefined,走原路径)。 */
|
|
361
|
+
function parseMarketplaceTradeUrlSafe(ref) {
|
|
362
|
+
try {
|
|
363
|
+
return parseMarketplaceTradeUrl(ref);
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
return undefined;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
305
369
|
/** 供调用方构造缺省 URL 安全策略(HTTPS-only + merchant 域绑定;allowlist 可
|
|
306
370
|
* 放行商家直传的外部成交入口主机,如 item.jd.com)。 */
|
|
307
371
|
export function defaultUrlSafety(expectedHost, allowlist) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../src/handoff/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAM3D,OAAO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<string[]>;
|
|
31
31
|
/** 跳过 SSRF DNS 复查(仅测试/受控环境;生产缺省 false)。 */
|
|
32
32
|
skipDnsCheck?: boolean;
|
|
33
|
+
/** A651 包四:每一跳(含首跳与每个重定向)的附加收紧校验——只能抛错
|
|
34
|
+
* 收紧,返回值不被采纳,不能替代或放宽既有 scheme/host/SSRF 守卫。 */
|
|
35
|
+
onHop?: (url: string) => void;
|
|
33
36
|
}
|
|
34
37
|
export interface SafeDestinationUrl {
|
|
35
38
|
/** 展示给用户的最终 URL(重定向解析后)。 */
|
|
@@ -68,6 +68,10 @@ export async function validateExternalDestinationUrl(value, options = {}) {
|
|
|
68
68
|
if (!hostAllowed(parsed.hostname, options)) {
|
|
69
69
|
throw new CommerceError("invalid_input", `destination host "${parsed.hostname}" is not allowed (expected ${options.expectedHost ?? "allowlist"})`);
|
|
70
70
|
}
|
|
71
|
+
// A651 包四:附加收紧(同平台同 opaque 商品 ID);在既有守卫之后调用,
|
|
72
|
+
// 只能抛错、不能放行。
|
|
73
|
+
if (options.onHop !== undefined)
|
|
74
|
+
options.onHop(current);
|
|
71
75
|
// 请求前 DNS 复查:主机名解析的每个 IP 过保留网段判定(防 rebinding)。
|
|
72
76
|
// 此前只对字面 IP 生效——expectedHost 命中但解析到 169.254.169.254 等
|
|
73
77
|
// 内网地址的主机名会真实发出探测。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-safety.js","sourceRoot":"","sources":["../../src/handoff/url-safety.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"url-safety.js","sourceRoot":"","sources":["../../src/handoff/url-safety.ts"],"names":[],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,EAAE,CAChG,CAAC;YACJ,CAAC;YACD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACpD,MAAM,IAAI,aAAa,CACrB,gBAAgB,EAChB,sEAAsE,QAAQ,CAAC,MAAM,MAAM,OAAO,EAAE,CACrG,CAAC;QACJ,CAAC;QACD,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;YACzB,MAAM,IAAI,aAAa,CACrB,eAAe,EACf,uCAAuC,YAAY,GAAG,CACvD,CAAC;QACJ,CAAC;QACD,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxB,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;IAC5C,CAAC;IACD,MAAM,IAAI,aAAa,CACrB,eAAe,EACf,uCAAuC,YAAY,GAAG,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -34,51 +34,126 @@ export function renderMerchantManagementPage(options = {}) {
|
|
|
34
34
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
35
35
|
<title>商家工作台 — Kiwi</title>
|
|
36
36
|
<style>
|
|
37
|
-
:root { font-family:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
.
|
|
60
|
-
.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
.
|
|
67
|
-
.
|
|
37
|
+
:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #23342d; background: #f5f7f4; font-size: 14px; line-height: 1.6; --kiwi: #205c43; --border: #dce4de; --muted: #5e7066; }
|
|
38
|
+
* { box-sizing: border-box; }
|
|
39
|
+
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); grid-template-rows: 76px 1fr; }
|
|
40
|
+
button, input, select, textarea { font: inherit; }
|
|
41
|
+
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
|
|
42
|
+
a { color: var(--kiwi); text-underline-offset: 3px; }
|
|
43
|
+
button { cursor: pointer; }
|
|
44
|
+
button:disabled { cursor: not-allowed; opacity: .55; }
|
|
45
|
+
:focus-visible { outline: 3px solid #9b7214; outline-offset: 3px; }
|
|
46
|
+
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; padding: 10px 16px; background: #fff; border: 2px solid var(--kiwi); border-radius: 8px; }
|
|
47
|
+
.skip-link:focus { top: 12px; }
|
|
48
|
+
header { grid-column: 1 / -1; background: #fff; border-bottom: 1px solid var(--border); padding: 0 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
|
|
49
|
+
.brand { display: flex; align-items: center; gap: 16px; }
|
|
50
|
+
.brand-name { color: var(--kiwi); font-size: 30px; font-weight: 750; letter-spacing: -1.6px; line-height: 1; }
|
|
51
|
+
.brand-title { font-size: 14px; font-weight: 600; padding-left: 16px; border-left: 1px solid var(--border); }
|
|
52
|
+
header .who { font-size: 12px; color: var(--muted); padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; max-width: 50%; overflow-wrap: anywhere; }
|
|
53
|
+
header .who:empty { display: none; }
|
|
54
|
+
nav { padding: 28px 16px; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
|
|
55
|
+
.nav-label { margin: 0 12px 12px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 1.4px; }
|
|
56
|
+
nav button { border: 1px solid transparent; padding: 12px 16px; border-radius: 8px; background: transparent; color: #53665b; text-align: left; font-weight: 500; line-height: 1.4; }
|
|
57
|
+
nav button:hover { background: #f3f7f3; color: var(--kiwi); }
|
|
58
|
+
nav button.on { background: #eaf2ec; color: #174c35; border-color: #d9e8dd; font-weight: 650; box-shadow: inset 3px 0 #2e7050; }
|
|
59
|
+
.nav-foot { margin: auto 12px 0; padding-top: 40px; color: var(--muted); font-size: 11px; }
|
|
60
|
+
.workspace { min-width: 0; padding: 32px clamp(20px, 3vw, 48px) 72px; width: 100%; max-width: 1400px; margin: 0 auto; }
|
|
61
|
+
.page-head { margin-bottom: 24px; }
|
|
62
|
+
.eyebrow { margin: 0 0 6px; color: var(--kiwi); font-size: 11px; letter-spacing: 1.8px; font-weight: 650; }
|
|
63
|
+
.page-head h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.35; letter-spacing: -.6px; font-weight: 650; }
|
|
64
|
+
.page-head p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
|
|
65
|
+
main { min-width: 0; }
|
|
66
|
+
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 3px 12px #243b2b04; min-width: 0; }
|
|
67
|
+
.card h2 { font-size: 16px; line-height: 1.5; margin: 0 0 18px; color: #233b2d; font-weight: 650; }
|
|
68
|
+
.card p { margin: 12px 0; overflow-wrap: anywhere; }
|
|
69
|
+
.card > :last-child { margin-bottom: 0; }
|
|
70
|
+
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid #e4eae5; border-radius: 8px; margin: 12px 0 18px; }
|
|
71
|
+
table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; line-height: 1.6; }
|
|
72
|
+
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #e9eee9; vertical-align: middle; }
|
|
73
|
+
th { color: #53665b; font-weight: 600; white-space: nowrap; background: #f7f9f6; }
|
|
74
|
+
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
|
|
75
|
+
tr:hover > td { background: #fafcf9; }
|
|
76
|
+
.detail-table { min-width: 0; }
|
|
77
|
+
.detail-table th { width: 190px; }
|
|
78
|
+
td { overflow-wrap: anywhere; }
|
|
79
|
+
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 5px; font-size: 12px; line-height: 1.7; font-weight: 550; background: #edf1ed; color: #53665b; white-space: nowrap; }
|
|
80
|
+
.ok { background: #e9f4ec; color: #24623b; } .warn { background: #fcf2de; color: #795309; } .bad { background: #fcebea; color: #a03933; }
|
|
81
|
+
.act { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #c8d5cc; background: #fff; color: #344c3d; border-radius: 7px; padding: 8px 14px; min-height: 38px; text-decoration: none; font-size: 13px; font-weight: 550; line-height: 1.5; }
|
|
82
|
+
.act:hover { background: #f4f8f3; border-color: #8ba695; }
|
|
83
|
+
.act.primary { background: var(--kiwi); color: #fff; border-color: var(--kiwi); }
|
|
84
|
+
.act.primary:hover { background: #164a34; }
|
|
85
|
+
.act.danger { color: #a03933; border-color: #e5c2bd; }
|
|
86
|
+
.act.danger:hover { background: #fff4f2; }
|
|
87
|
+
#bar { position: fixed; left: 240px; right: 24px; bottom: 20px; max-width: 760px; margin: auto; padding: 14px 20px; font-size: 13px; background: #244b36; color: #fff; border-radius: 9px; box-shadow: 0 6px 24px #233b2d26; display: none; z-index: 10; overflow-wrap: anywhere; }
|
|
88
|
+
#bar.err { background: #89372f; }
|
|
89
|
+
textarea, input[type=text] { width: 100%; max-width: 100%; border: 1px solid #c8d5cc; border-radius: 7px; padding: 10px 12px; color: #23342d; background: #fcfdfb; font: 13px ui-monospace, SFMono-Regular, monospace; line-height: 1.6; }
|
|
90
|
+
textarea { resize: vertical; }
|
|
91
|
+
input::placeholder, textarea::placeholder { color: #69796e; }
|
|
92
|
+
input[type=file] { min-width: 0; max-width: 100%; border: 1px dashed #b4c9b9; border-radius: 8px; padding: 10px; background: #f7faf5; font-size: 13px; }
|
|
93
|
+
input[type=file]::file-selector-button { border: 1px solid #c8d5cc; border-radius: 5px; background: #fff; color: #344c3d; padding: 6px 10px; margin-right: 10px; cursor: pointer; }
|
|
94
|
+
input[type=checkbox] { accent-color: var(--kiwi); width: 16px; height: 16px; vertical-align: middle; }
|
|
95
|
+
.muted { color: var(--muted); font-size: 12px; line-height: 1.8; }
|
|
96
|
+
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
|
|
97
|
+
.row > .muted { flex: 1 1 180px; }
|
|
98
|
+
pre.digest { font: 11px ui-monospace, monospace; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; max-width: 320px; }
|
|
99
|
+
label { font-size: 13px; }
|
|
100
|
+
select { border: 1px solid #c8d5cc; border-radius: 7px; padding: 8px 12px; font-size: 13px; color: #23342d; background: #fff; max-width: 100%; }
|
|
101
|
+
.trendrow { display: flex; align-items: center; gap: 12px; margin: 10px 0; font-size: 12px; }
|
|
102
|
+
.trendrow > span:first-child { width: 44px; color: var(--muted); }
|
|
103
|
+
.trendbar { flex: 1; height: 8px; background: #edf2eb; border-radius: 4px; overflow: hidden; }
|
|
104
|
+
.trendfill { height: 100%; background: #4b815c; }
|
|
105
|
+
.login-card { max-width: 600px; padding: 32px; }
|
|
106
|
+
.empty-state { padding: 24px 16px; background: #f8faf6; border: 1px dashed #d5e1d5; border-radius: 8px; }
|
|
107
|
+
@media (max-width: 900px) {
|
|
108
|
+
body { grid-template-columns: 176px minmax(0, 1fr); }
|
|
109
|
+
header { padding: 0 24px; }
|
|
110
|
+
nav { padding: 24px 10px; }
|
|
111
|
+
nav button { padding: 12px; }
|
|
112
|
+
.workspace { padding: 26px 24px 64px; }
|
|
113
|
+
.card { padding: 20px; }
|
|
114
|
+
#bar { left: 196px; }
|
|
115
|
+
}
|
|
116
|
+
@media (max-width: 640px) {
|
|
117
|
+
body { display: block; }
|
|
118
|
+
header { min-height: 72px; padding: 16px; gap: 12px; flex-wrap: wrap; }
|
|
119
|
+
.brand-name { font-size: 27px; }
|
|
120
|
+
header .who { max-width: 100%; padding: 0; border: 0; font-size: 11px; }
|
|
121
|
+
nav { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
|
|
122
|
+
.nav-label, .nav-foot { display: none; }
|
|
123
|
+
nav button { padding: 10px 4px; font-size: 12px; text-align: center; min-height: 40px; }
|
|
124
|
+
nav button.on { box-shadow: none; }
|
|
125
|
+
.workspace { padding: 24px 16px 64px; }
|
|
126
|
+
.page-head { margin-bottom: 20px; }
|
|
127
|
+
.page-head h1 { font-size: 23px; }
|
|
128
|
+
.card, .login-card { padding: 20px 16px; border-radius: 10px; margin-bottom: 16px; }
|
|
129
|
+
.card h2 { font-size: 15px; margin-bottom: 14px; }
|
|
130
|
+
.detail-table th { width: 110px; white-space: normal; }
|
|
131
|
+
th, td { padding: 10px 12px; }
|
|
132
|
+
.detail-table td { word-break: break-word; }
|
|
133
|
+
#bar { left: 16px; right: 16px; bottom: 16px; }
|
|
134
|
+
.row { gap: 10px; }
|
|
135
|
+
}
|
|
136
|
+
@media (prefers-reduced-motion: no-preference) { .act, nav button { transition: background-color .15s, border-color .15s; } }
|
|
68
137
|
</style>
|
|
69
138
|
</head>
|
|
70
139
|
<body>
|
|
71
|
-
<
|
|
72
|
-
<
|
|
73
|
-
|
|
140
|
+
<a href="#view" class="skip-link">跳至工作区</a>
|
|
141
|
+
<header><div class="brand"><span class="brand-name" aria-label="Kiwi">kiwi</span><span class="brand-title">商家工作台</span></div><span class="who" id="who"></span></header>
|
|
142
|
+
<nav id="tabs" aria-label="工作台导航">
|
|
143
|
+
<p class="nav-label">工作空间</p>
|
|
144
|
+
<button data-v="status" class="on" aria-current="page">服务状态</button>
|
|
74
145
|
<button data-v="products">商品与导入</button>
|
|
75
146
|
<button data-v="approvals">待审批</button>
|
|
76
147
|
<button data-v="negotiations">会话旁观</button>
|
|
77
148
|
<button data-v="reports">运营报告</button>
|
|
78
149
|
<button data-v="policy">报价规则</button>
|
|
150
|
+
<p class="nav-foot">日常经营,井然有序。<br>Kiwi Merchant</p>
|
|
79
151
|
</nav>
|
|
80
|
-
<
|
|
81
|
-
<
|
|
152
|
+
<div class="workspace">
|
|
153
|
+
<section class="page-head" aria-labelledby="page-title"><p class="eyebrow">MERCHANT WORKSPACE</p><h1 id="page-title">服务状态</h1><p id="page-description">掌握接待状态,管理店铺与目录连接。</p></section>
|
|
154
|
+
<main id="view" tabindex="-1" aria-label="商家工作区"><div class="card">加载中…</div></main>
|
|
155
|
+
</div>
|
|
156
|
+
<div id="bar" role="status" aria-live="polite" aria-atomic="true"></div>
|
|
82
157
|
<script>
|
|
83
158
|
"use strict";
|
|
84
159
|
var CSRF = "";
|
|
@@ -96,6 +171,16 @@ function esc(s) {
|
|
|
96
171
|
return { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c];
|
|
97
172
|
});
|
|
98
173
|
}
|
|
174
|
+
function marketplaceLink(it) {
|
|
175
|
+
var value = it.platform_product_url;
|
|
176
|
+
if (typeof value !== "string") return "-";
|
|
177
|
+
try {
|
|
178
|
+
var url = new URL(value);
|
|
179
|
+
if (url.protocol !== "https:" || url.username || url.password ||
|
|
180
|
+
["item.jd.com", "item.taobao.com", "detail.tmall.com"].indexOf(url.hostname) < 0) return "-";
|
|
181
|
+
return '<a href="' + esc(value) + '" target="_blank" rel="noopener noreferrer">' + esc(value) + '</a>';
|
|
182
|
+
} catch (_) { return "-"; }
|
|
183
|
+
}
|
|
99
184
|
function bar(msg, isErr) {
|
|
100
185
|
var b = $("bar");
|
|
101
186
|
b.textContent = msg;
|
|
@@ -150,9 +235,9 @@ function call(method, path, body, apiBase) {
|
|
|
150
235
|
});
|
|
151
236
|
}
|
|
152
237
|
function showLogin() {
|
|
153
|
-
$("view").innerHTML = '<div class="card"><h2
|
|
238
|
+
$("view").innerHTML = '<div class="card login-card"><h2>登录你的商家工作台</h2>' +
|
|
154
239
|
'<p class="muted">请使用商家管理员口令登录后回到本页。</p>' +
|
|
155
|
-
'<p><a class="act" href="/admin/login?next=%2Fmerchant%2F"
|
|
240
|
+
'<p><a class="act primary" href="/admin/login?next=%2Fmerchant%2F">去登录</a></p></div>';
|
|
156
241
|
}
|
|
157
242
|
function key(p) { return p + "-" + Date.now() + "-" + Math.random().toString(36).slice(2, 8); }
|
|
158
243
|
function statePill(state) {
|
|
@@ -262,7 +347,9 @@ var views = {
|
|
|
262
347
|
return "<tr><td>" + esc(it.sku) + "</td><td>" + esc(it.title) + "</td><td>" +
|
|
263
348
|
esc(it.currency) + " " + esc(it.price) + " / " + esc(it.price_unit) + "</td><td>" +
|
|
264
349
|
esc(it.min_order_qty == null ? "-" : it.min_order_qty) + "</td><td>" +
|
|
265
|
-
esc(it.valid_until) + "</td><td>" + esc(it.status) + "</td
|
|
350
|
+
esc(it.valid_until) + "</td><td>" + esc(it.status) + "</td><td>" +
|
|
351
|
+
esc(({jd:"京东",taobao:"淘宝",tmall:"天猫"})[it.trade_platform] || "-") + "</td><td>" +
|
|
352
|
+
esc(it.platform_product_id || "-") + "</td><td>" + marketplaceLink(it) + "</td></tr>";
|
|
266
353
|
}
|
|
267
354
|
var money = it.money || {};
|
|
268
355
|
return "<tr><td>" + esc(it.sku) + "</td><td>" + esc(it.title) + "</td><td>" +
|
|
@@ -272,16 +359,17 @@ var views = {
|
|
|
272
359
|
}).join("");
|
|
273
360
|
return '<div class="card"><h2>当前商品(' + (p.items || []).length + ")</h2>" +
|
|
274
361
|
(rows ? (FILE_PRODUCTS
|
|
275
|
-
? "<table><tr><th>SKU</th><th>名称</th><th>单价</th><th>起订量</th><th>有效期至</th><th>状态</th></tr>"
|
|
362
|
+
? "<table><tr><th>SKU</th><th>名称</th><th>单价</th><th>起订量</th><th>有效期至</th><th>状态</th><th>交易平台</th><th>平台商品ID</th><th>平台商品页链接</th></tr>"
|
|
276
363
|
: "<table><tr><th>SKU</th><th>名称</th><th>价格(最小币单位)</th><th>库存</th><th>版本</th></tr>") + rows + "</table>"
|
|
277
364
|
: '<p class="muted">暂无商品,请先导入商品。没有商品时服务不会报价或发布名片。</p>') + "</div>" +
|
|
278
365
|
'<div class="card"><h2>导入商品表(整表替换)</h2>' +
|
|
366
|
+
'<p class="muted">交易链接仅为平台商品页;是否成交、实际价格与付款结果由交易平台确认。</p>' +
|
|
279
367
|
'<p class="muted">支持 CSV、Excel(.xlsx)与商品表 JSON:先转换校验、预览增/改/留/删,确认后整批生效(不成功的批次不改动现有商品)。</p>' +
|
|
280
368
|
'<p class="muted">模板:<a href="/merchant/api/v1/products/import-template?format=csv" download="kiwi-product-import-template.csv">下载 CSV 模板</a> · <a href="/merchant/api/v1/products/import-template?format=xlsx" download="kiwi-product-import-template.xlsx">下载 Excel 模板</a>(中文表头与示例行;中英文常见列名会自动识别)。</p>' +
|
|
281
|
-
'<div class="row"><input type="file" id="pfile" accept=".json,.csv,.xlsx">' +
|
|
369
|
+
'<div class="row"><input type="file" id="pfile" aria-label="选择商品导入文件" accept=".json,.csv,.xlsx">' +
|
|
282
370
|
'<button class="act" onclick="previewImport()">校验预览</button></div><div id="presult"></div></div>' +
|
|
283
371
|
(FILE_PRODUCTS && CATALOG_CONNECT && ROLE === "owner" ?
|
|
284
|
-
'<div class="card"><h2>发布商品到 Kiwi 目录</h2><p>先完成目录连接,再选择商品并填写分类。公开名称、SKU
|
|
372
|
+
'<div class="card"><h2>发布商品到 Kiwi 目录</h2><p>先完成目录连接,再选择商品并填写分类。公开名称、SKU、分类及填写的平台商品页链接;价格、库存及私有规则不会发布。</p>' +
|
|
285
373
|
'<p>每行填写一个 SKU 和分类,用英文竖线分隔,例如:KIWI-ACCEPT-001 | 验收测试</p>' +
|
|
286
374
|
'<textarea id="publication-selection" rows="4" aria-label="选定商品与分类"></textarea>' +
|
|
287
375
|
'<button class="act" onclick="previewPublication()">预览公开内容</button><div id="publication-result"></div></div>' : '');
|
|
@@ -410,7 +498,7 @@ var views = {
|
|
|
410
498
|
'<span class="muted">per-SKU 底价/折扣、促销与库存来源请用下方高级模式。</span></div><div id="polformresult"></div></div>' +
|
|
411
499
|
'<div class="card"><h2>高级:JSON patch 模式</h2>' +
|
|
412
500
|
'<p class="muted">适合 per-SKU 底价/折扣映射、促销与库存来源等完整 patch;字段名以策略 schema 文档为准,不在页面枚举。</p>' +
|
|
413
|
-
'<textarea id="patch" rows="8"></textarea>' +
|
|
501
|
+
'<textarea id="patch" rows="8" aria-label="高级规则 JSON patch"></textarea>' +
|
|
414
502
|
'<div class="row" style="margin-top:8px"><button class="act" onclick="draftPolicy()">保存草稿</button>' +
|
|
415
503
|
'<span class="muted">保存后生成草稿摘要,再点提交才生效。</span></div><div id="polresult"></div></div>'
|
|
416
504
|
: '<div class="card"><p class="muted">规则调整需要 operator/owner 角色。</p></div>');
|
|
@@ -733,12 +821,55 @@ function commitPolicy(draftId, digest) {
|
|
|
733
821
|
}).catch(function (e) { bar("提交失败:" + e.message, true); });
|
|
734
822
|
}
|
|
735
823
|
var current = "status";
|
|
736
|
-
|
|
824
|
+
var VIEW_COPY = {
|
|
825
|
+
status: ["服务状态", "掌握接待状态,管理店铺与目录连接。"],
|
|
826
|
+
products: ["商品与导入", "维护商品资料,先预览,再确认变更。"],
|
|
827
|
+
approvals: ["待审批", "核对每一项变更,重要决定由你确认。"],
|
|
828
|
+
negotiations: ["会话旁观", "查看询价与磋商进展,掌握需要关注的会话。"],
|
|
829
|
+
reports: ["运营报告", "了解买家触达与接待表现。"],
|
|
830
|
+
policy: ["报价规则", "管理自动报价边界,规则确认后生效。"]
|
|
831
|
+
};
|
|
832
|
+
function decorateView() {
|
|
833
|
+
var view = $("view");
|
|
834
|
+
Array.prototype.forEach.call(view.querySelectorAll("table"), function (table) {
|
|
835
|
+
if (table.parentElement.classList.contains("table-scroll")) return;
|
|
836
|
+
if (table.rows.length && table.rows[0].cells.length <= 2) table.classList.add("detail-table");
|
|
837
|
+
var wrap = document.createElement("div");
|
|
838
|
+
wrap.className = "table-scroll";
|
|
839
|
+
wrap.tabIndex = 0;
|
|
840
|
+
wrap.setAttribute("role", "region");
|
|
841
|
+
var card = table.closest(".card");
|
|
842
|
+
var heading = card && card.querySelector("h2");
|
|
843
|
+
wrap.setAttribute("aria-label", (heading ? heading.textContent : "工作台") + "表格,可横向滚动");
|
|
844
|
+
table.parentNode.insertBefore(wrap, table);
|
|
845
|
+
wrap.appendChild(table);
|
|
846
|
+
});
|
|
847
|
+
Array.prototype.forEach.call(view.querySelectorAll("input[type=text], select"), function (control) {
|
|
848
|
+
if (control.getAttribute("aria-label")) return;
|
|
849
|
+
var row = control.closest("tr");
|
|
850
|
+
var heading = row && row.querySelector("th");
|
|
851
|
+
if (heading) control.setAttribute("aria-label", heading.textContent);
|
|
852
|
+
});
|
|
853
|
+
Array.prototype.forEach.call(view.querySelectorAll(".card > p.muted"), function (p) {
|
|
854
|
+
if (/^(暂无|当前过滤条件下没有)/.test(p.textContent)) p.classList.add("empty-state");
|
|
855
|
+
});
|
|
856
|
+
}
|
|
857
|
+
// 导入预览与可信确认内容动态插入后同样获得局部表格滚动。
|
|
858
|
+
if (typeof MutationObserver !== "undefined") {
|
|
859
|
+
new MutationObserver(decorateView).observe($("view"), { childList: true, subtree: true });
|
|
860
|
+
}
|
|
861
|
+
function refresh() {
|
|
862
|
+
var copy = VIEW_COPY[current];
|
|
863
|
+
$("page-title").textContent = copy[0];
|
|
864
|
+
$("page-description").textContent = copy[1];
|
|
865
|
+
$("view").setAttribute("data-view", current);
|
|
866
|
+
views[current]().then(function (html) { $("view").innerHTML = html; decorateView(); })
|
|
737
867
|
.catch(function (e) { if (e.message !== "需要登录") bar(e.message, true); }); }
|
|
738
868
|
Array.prototype.forEach.call(document.querySelectorAll("#tabs button"), function (btn) {
|
|
739
869
|
btn.addEventListener("click", function () {
|
|
740
|
-
Array.prototype.forEach.call(document.querySelectorAll("#tabs button"), function (b) { b.className = ""; });
|
|
870
|
+
Array.prototype.forEach.call(document.querySelectorAll("#tabs button"), function (b) { b.className = ""; b.removeAttribute("aria-current"); });
|
|
741
871
|
btn.className = "on";
|
|
872
|
+
btn.setAttribute("aria-current", "page");
|
|
742
873
|
current = btn.getAttribute("data-v");
|
|
743
874
|
refresh();
|
|
744
875
|
});
|