@harrylabsj/kiwi 0.10.0 → 0.11.0
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/README.md +1 -1
- package/contracts/card-publication/0.1.2/request.schema.json +78 -0
- package/contracts/kiwi-contracts.lock.json +2 -2
- package/contracts/manifest.json +127 -1
- package/contracts/merchant-management/1.0/README.md +109 -0
- package/contracts/merchant-management/1.0/approval-decision.schema.json +16 -0
- package/contracts/merchant-management/1.0/approval-preview.schema.json +26 -0
- package/contracts/merchant-management/1.0/connector-delivery-manifest.schema.json +78 -0
- package/contracts/merchant-management/1.0/management-error.schema.json +30 -0
- package/contracts/merchant-management/1.0/operation-receipt.schema.json +28 -0
- package/contracts/merchant-management/1.0/runtime-management-descriptor.schema.json +33 -0
- package/contracts/merchant-management/1.0/runtime-status.schema.json +42 -0
- package/contracts/merchant-rfq/0.1.0/delivery-record.schema.json +206 -0
- package/contracts/merchant-rfq/0.1.0/fact-snapshot.schema.json +118 -0
- package/contracts/merchant-rfq/0.1.0/handoff-record.schema.json +251 -0
- package/contracts/merchant-rfq/0.1.0/pricing-input.schema.json +139 -0
- package/contracts/merchant-rfq/0.1.0/quote-revision.schema.json +153 -0
- package/contracts/merchant-rfq/0.1.0/release-request.schema.json +121 -0
- package/contracts/merchant-rfq/0.1.0/rfq-case.schema.json +357 -0
- package/contracts/merchant-rfq/0.1.0/source-record.schema.json +162 -0
- package/contracts/merchant-workbench/1.0/README.md +6 -0
- package/contracts/merchant-workbench/1.0/money.schema.json +19 -0
- package/contracts/merchant-workbench/1.0/problem.schema.json +73 -0
- package/contracts/runtime-binding/0.1.2/binding-request.schema.json +73 -0
- package/contracts/runtime-binding/0.1.2/claims.schema.json +100 -0
- package/contracts/runtime-binding/0.1.2/document.schema.json +161 -0
- package/contracts/vectors/binding-thumbprint.json +15 -0
- package/dist/a2a/node.d.ts +96 -2
- package/dist/a2a/node.js +164 -91
- package/dist/a2a/node.js.map +1 -1
- package/dist/a2a/server/errors.d.ts +8 -0
- package/dist/a2a/server/errors.js +8 -0
- package/dist/a2a/server/errors.js.map +1 -1
- package/dist/a2a/server/merchant-handler.d.ts +13 -0
- package/dist/a2a/server/merchant-handler.js +267 -34
- package/dist/a2a/server/merchant-handler.js.map +1 -1
- package/dist/a2a/server/pipeline.d.ts +15 -10
- package/dist/a2a/server/pipeline.js +48 -18
- package/dist/a2a/server/pipeline.js.map +1 -1
- package/dist/a2a/server/server.d.ts +20 -1
- package/dist/a2a/server/server.js +87 -13
- package/dist/a2a/server/server.js.map +1 -1
- package/dist/a2a/server/task-registry.d.ts +31 -11
- package/dist/a2a/server/task-registry.js +65 -20
- package/dist/a2a/server/task-registry.js.map +1 -1
- package/dist/a2a/server/types.d.ts +23 -0
- package/dist/a2a/signing-key.d.ts +6 -0
- package/dist/a2a/signing-key.js +12 -0
- package/dist/a2a/signing-key.js.map +1 -1
- package/dist/agent/buyer/buyer-tools.js +1 -1
- package/dist/agent/buyer/buyer-tools.js.map +1 -1
- package/dist/agent/host/web-renderer.d.ts +5 -0
- package/dist/agent/host/web-renderer.js +25 -6
- package/dist/agent/host/web-renderer.js.map +1 -1
- package/dist/agent/kernel.js +6 -6
- package/dist/agent/kernel.js.map +1 -1
- package/dist/agent/memory/schema.d.ts +1 -1
- package/dist/agent/memory/schema.js +190 -1
- package/dist/agent/memory/schema.js.map +1 -1
- package/dist/agent/memory/store.js +3 -1
- package/dist/agent/memory/store.js.map +1 -1
- package/dist/agent/merchant/action-candidate.d.ts +1 -0
- package/dist/agent/merchant/action-candidate.js +42 -24
- package/dist/agent/merchant/action-candidate.js.map +1 -1
- package/dist/agent/merchant/fake-merchant-client.d.ts +30 -1
- package/dist/agent/merchant/fake-merchant-client.js +151 -2
- package/dist/agent/merchant/fake-merchant-client.js.map +1 -1
- package/dist/agent/merchant/intelligence/default-backend.js +2 -2
- package/dist/agent/merchant/intelligence/default-backend.js.map +1 -1
- package/dist/agent/merchant/merchant-client.d.ts +38 -5
- package/dist/agent/merchant/merchant-client.js +103 -8
- package/dist/agent/merchant/merchant-client.js.map +1 -1
- package/dist/agent/merchant/types.d.ts +107 -0
- package/dist/agent/merchant/types.js +69 -0
- package/dist/agent/merchant/types.js.map +1 -1
- package/dist/alerts/external-delivery.d.ts +78 -0
- package/dist/alerts/external-delivery.js +256 -0
- package/dist/alerts/external-delivery.js.map +1 -0
- package/dist/auth/app-oauth-callback.d.ts +38 -0
- package/dist/auth/app-oauth-callback.js +119 -0
- package/dist/auth/app-oauth-callback.js.map +1 -0
- package/dist/auth/merchant-oauth.js +15 -41
- package/dist/auth/merchant-oauth.js.map +1 -1
- package/dist/auth/merchant-pairing.d.ts +51 -0
- package/dist/auth/merchant-pairing.js +66 -16
- package/dist/auth/merchant-pairing.js.map +1 -1
- package/dist/auth/merchant-sessions.d.ts +7 -1
- package/dist/auth/merchant-sessions.js +25 -3
- package/dist/auth/merchant-sessions.js.map +1 -1
- package/dist/buyer-core/build-service.d.ts +3 -1
- package/dist/buyer-core/build-service.js +4 -1
- package/dist/buyer-core/build-service.js.map +1 -1
- package/dist/buyer-core/merchant-index.d.ts +20 -0
- package/dist/buyer-core/merchant-index.js +83 -12
- package/dist/buyer-core/merchant-index.js.map +1 -1
- package/dist/buyer-core/network-search.d.ts +92 -0
- package/dist/buyer-core/network-search.js +144 -0
- package/dist/buyer-core/network-search.js.map +1 -0
- package/dist/buyer-core/product-summary.d.ts +71 -0
- package/dist/buyer-core/product-summary.js +63 -0
- package/dist/buyer-core/product-summary.js.map +1 -0
- package/dist/buyer-core/service.d.ts +26 -0
- package/dist/buyer-core/service.js +38 -8
- package/dist/buyer-core/service.js.map +1 -1
- package/dist/cli.js +21 -242
- package/dist/cli.js.map +1 -1
- package/dist/cloud/binding/audit.d.ts +72 -0
- package/dist/cloud/binding/audit.js +137 -0
- package/dist/cloud/binding/audit.js.map +1 -0
- package/dist/cloud/binding/issuance.d.ts +76 -0
- package/dist/cloud/binding/issuance.js +121 -0
- package/dist/cloud/binding/issuance.js.map +1 -0
- package/dist/cloud/binding/proofs.d.ts +110 -0
- package/dist/cloud/binding/proofs.js +200 -0
- package/dist/cloud/binding/proofs.js.map +1 -0
- package/dist/cloud/binding/runtime-challenge.d.ts +48 -0
- package/dist/cloud/binding/runtime-challenge.js +178 -0
- package/dist/cloud/binding/runtime-challenge.js.map +1 -0
- package/dist/cloud/bootstrap.d.ts +63 -0
- package/dist/cloud/bootstrap.js +937 -0
- package/dist/cloud/bootstrap.js.map +1 -0
- package/dist/cloud/config.d.ts +91 -0
- package/dist/cloud/config.js +229 -0
- package/dist/cloud/config.js.map +1 -0
- package/dist/cloud/http-router.d.ts +61 -0
- package/dist/cloud/http-router.js +127 -0
- package/dist/cloud/http-router.js.map +1 -0
- package/dist/cloud/main.d.ts +16 -0
- package/dist/cloud/main.js +64 -0
- package/dist/cloud/main.js.map +1 -0
- package/dist/cloud/onboarding/local-fallback.d.ts +86 -0
- package/dist/cloud/onboarding/local-fallback.js +98 -0
- package/dist/cloud/onboarding/local-fallback.js.map +1 -0
- package/dist/cloud/onboarding/steps.d.ts +95 -0
- package/dist/cloud/onboarding/steps.js +175 -0
- package/dist/cloud/onboarding/steps.js.map +1 -0
- package/dist/cloud/onboarding/store.d.ts +136 -0
- package/dist/cloud/onboarding/store.js +472 -0
- package/dist/cloud/onboarding/store.js.map +1 -0
- package/dist/cloud/onboarding/types.d.ts +132 -0
- package/dist/cloud/onboarding/types.js +152 -0
- package/dist/cloud/onboarding/types.js.map +1 -0
- package/dist/cloud/product-source.d.ts +97 -0
- package/dist/cloud/product-source.js +226 -0
- package/dist/cloud/product-source.js.map +1 -0
- package/dist/cloud/readiness.d.ts +49 -0
- package/dist/cloud/readiness.js +54 -0
- package/dist/cloud/readiness.js.map +1 -0
- package/dist/commerce/data-source.d.ts +5 -0
- package/dist/commerce/data-source.js.map +1 -1
- package/dist/config/provider-kind.d.ts +26 -0
- package/dist/config/provider-kind.js +19 -0
- package/dist/config/provider-kind.js.map +1 -0
- package/dist/contracts/cloud-contracts.d.ts +23 -0
- package/dist/contracts/cloud-contracts.js +90 -0
- package/dist/contracts/cloud-contracts.js.map +1 -0
- package/dist/counterparty/a2a-direct/index.d.ts +3 -0
- package/dist/counterparty/a2a-direct/index.js +22 -6
- package/dist/counterparty/a2a-direct/index.js.map +1 -1
- package/dist/counterparty/registry.d.ts +2 -0
- package/dist/counterparty/registry.js +2 -0
- package/dist/counterparty/registry.js.map +1 -1
- package/dist/counterparty/shopping-cli-hosted/index.d.ts +3 -0
- package/dist/counterparty/shopping-cli-hosted/index.js +9 -2
- package/dist/counterparty/shopping-cli-hosted/index.js.map +1 -1
- package/dist/discovery/catalog-source/buyer-follows.js +2 -2
- package/dist/discovery/catalog-source/buyer-follows.js.map +1 -1
- package/dist/discovery/catalog-source/cloud-card.d.ts +184 -0
- package/dist/discovery/catalog-source/cloud-card.js +379 -0
- package/dist/discovery/catalog-source/cloud-card.js.map +1 -0
- package/dist/discovery/catalog-source/cloud-hosting.d.ts +71 -0
- package/dist/discovery/catalog-source/cloud-hosting.js +70 -0
- package/dist/discovery/catalog-source/cloud-hosting.js.map +1 -0
- package/dist/discovery/catalog-source/errors.d.ts +12 -2
- package/dist/discovery/catalog-source/errors.js +14 -1
- package/dist/discovery/catalog-source/errors.js.map +1 -1
- package/dist/discovery/catalog-source/index.d.ts +2 -0
- package/dist/discovery/catalog-source/index.js +2 -0
- package/dist/discovery/catalog-source/index.js.map +1 -1
- package/dist/discovery/catalog-source/kiwi-source.js +2 -2
- package/dist/discovery/catalog-source/kiwi-source.js.map +1 -1
- package/dist/discovery/catalog-source/merchant-publications.d.ts +2 -2
- package/dist/discovery/catalog-source/merchant-publications.js +10 -5
- package/dist/discovery/catalog-source/merchant-publications.js.map +1 -1
- package/dist/discovery/catalog-source/source.js +2 -2
- package/dist/discovery/catalog-source/source.js.map +1 -1
- package/dist/discovery/merchant-subscriptions.d.ts +45 -0
- package/dist/discovery/merchant-subscriptions.js +319 -0
- package/dist/discovery/merchant-subscriptions.js.map +1 -0
- package/dist/discovery/resolve.d.ts +38 -0
- package/dist/discovery/resolve.js +100 -7
- package/dist/discovery/resolve.js.map +1 -1
- package/dist/fanout/orchestrator.d.ts +2 -0
- package/dist/fanout/orchestrator.js +4 -1
- package/dist/fanout/orchestrator.js.map +1 -1
- package/dist/handoff/ledger.d.ts +1 -0
- package/dist/handoff/ledger.js +3 -0
- package/dist/handoff/ledger.js.map +1 -1
- package/dist/handoff/transaction.js +1 -1
- package/dist/handoff/transaction.js.map +1 -1
- package/dist/http/merchant-engagement-api.d.ts +10 -0
- package/dist/http/merchant-engagement-api.js +138 -0
- package/dist/http/merchant-engagement-api.js.map +1 -0
- package/dist/http/merchant-feed-api.d.ts +7 -0
- package/dist/http/merchant-feed-api.js +129 -0
- package/dist/http/merchant-feed-api.js.map +1 -0
- package/dist/http/merchant-follow-api.d.ts +15 -0
- package/dist/http/merchant-follow-api.js +192 -0
- package/dist/http/merchant-follow-api.js.map +1 -0
- package/dist/http/merchant-management/api.d.ts +241 -0
- package/dist/http/merchant-management/api.js +2785 -0
- package/dist/http/merchant-management/api.js.map +1 -0
- package/dist/http/merchant-management/draft-store.d.ts +51 -0
- package/dist/http/merchant-management/draft-store.js +95 -0
- package/dist/http/merchant-management/draft-store.js.map +1 -0
- package/dist/http/merchant-management/event-projection.d.ts +41 -0
- package/dist/http/merchant-management/event-projection.js +190 -0
- package/dist/http/merchant-management/event-projection.js.map +1 -0
- package/dist/http/merchant-management/operation-store.d.ts +97 -0
- package/dist/http/merchant-management/operation-store.js +252 -0
- package/dist/http/merchant-management/operation-store.js.map +1 -0
- package/dist/http/merchant-management/page.d.ts +29 -0
- package/dist/http/merchant-management/page.js +346 -0
- package/dist/http/merchant-management/page.js.map +1 -0
- package/dist/http/merchant-management/problem-client.d.ts +19 -0
- package/dist/http/merchant-management/problem-client.js +55 -0
- package/dist/http/merchant-management/problem-client.js.map +1 -0
- package/dist/http/merchant-management/problem.d.ts +74 -0
- package/dist/http/merchant-management/problem.js +112 -0
- package/dist/http/merchant-management/problem.js.map +1 -0
- package/dist/http/merchant-management/reconciliation-worker.d.ts +95 -0
- package/dist/http/merchant-management/reconciliation-worker.js +397 -0
- package/dist/http/merchant-management/reconciliation-worker.js.map +1 -0
- package/dist/http/merchant-management/service-state.d.ts +86 -0
- package/dist/http/merchant-management/service-state.js +217 -0
- package/dist/http/merchant-management/service-state.js.map +1 -0
- package/dist/http/merchant-management/trusted-page.d.ts +3 -0
- package/dist/http/merchant-management/trusted-page.js +73 -0
- package/dist/http/merchant-management/trusted-page.js.map +1 -0
- package/dist/http/merchant-management/webauthn-confirmation.d.ts +148 -0
- package/dist/http/merchant-management/webauthn-confirmation.js +517 -0
- package/dist/http/merchant-management/webauthn-confirmation.js.map +1 -0
- package/dist/http/merchant-privacy-api.d.ts +9 -0
- package/dist/http/merchant-privacy-api.js +96 -0
- package/dist/http/merchant-privacy-api.js.map +1 -0
- package/dist/mcp/merchant-rfq-resources.d.ts +37 -0
- package/dist/mcp/merchant-rfq-resources.js +132 -0
- package/dist/mcp/merchant-rfq-resources.js.map +1 -0
- package/dist/mcp/merchant-rfq-tools.d.ts +61 -0
- package/dist/mcp/merchant-rfq-tools.js +584 -0
- package/dist/mcp/merchant-rfq-tools.js.map +1 -0
- package/dist/mcp/merchant-runtime-assembly.d.ts +74 -0
- package/dist/mcp/merchant-runtime-assembly.js +473 -0
- package/dist/mcp/merchant-runtime-assembly.js.map +1 -0
- package/dist/mcp/merchant-server.d.ts +64 -1
- package/dist/mcp/merchant-server.js +245 -23
- package/dist/mcp/merchant-server.js.map +1 -1
- package/dist/mcp/tools.js +8 -2
- package/dist/mcp/tools.js.map +1 -1
- package/dist/merchant/application/actor.d.ts +85 -0
- package/dist/merchant/application/actor.js +162 -0
- package/dist/merchant/application/actor.js.map +1 -0
- package/dist/merchant/application/money.d.ts +35 -0
- package/dist/merchant/application/money.js +124 -0
- package/dist/merchant/application/money.js.map +1 -0
- package/dist/merchant/application/service.d.ts +228 -0
- package/dist/merchant/application/service.js +262 -0
- package/dist/merchant/application/service.js.map +1 -0
- package/dist/merchant/clock-safety.d.ts +50 -0
- package/dist/merchant/clock-safety.js +153 -0
- package/dist/merchant/clock-safety.js.map +1 -0
- package/dist/merchant/engagement-store.d.ts +32 -0
- package/dist/merchant/engagement-store.js +119 -0
- package/dist/merchant/engagement-store.js.map +1 -0
- package/dist/merchant/exact-product-executors.d.ts +11 -0
- package/dist/merchant/exact-product-executors.js +132 -0
- package/dist/merchant/exact-product-executors.js.map +1 -0
- package/dist/merchant/feed-executors.d.ts +17 -0
- package/dist/merchant/feed-executors.js +151 -0
- package/dist/merchant/feed-executors.js.map +1 -0
- package/dist/merchant/feed-store.d.ts +141 -0
- package/dist/merchant/feed-store.js +496 -0
- package/dist/merchant/feed-store.js.map +1 -0
- package/dist/merchant/follow-store.d.ts +66 -0
- package/dist/merchant/follow-store.js +295 -0
- package/dist/merchant/follow-store.js.map +1 -0
- package/dist/merchant/grant-executors.d.ts +11 -0
- package/dist/merchant/grant-executors.js +136 -0
- package/dist/merchant/grant-executors.js.map +1 -0
- package/dist/merchant/grant-store.d.ts +125 -0
- package/dist/merchant/grant-store.js +313 -0
- package/dist/merchant/grant-store.js.map +1 -0
- package/dist/merchant/inventory-executors.d.ts +47 -0
- package/dist/merchant/inventory-executors.js +91 -0
- package/dist/merchant/inventory-executors.js.map +1 -0
- package/dist/merchant/listing-executors.d.ts +51 -0
- package/dist/merchant/listing-executors.js +100 -0
- package/dist/merchant/listing-executors.js.map +1 -0
- package/dist/merchant/operation-receipts.d.ts +57 -0
- package/dist/merchant/operation-receipts.js +138 -0
- package/dist/merchant/operation-receipts.js.map +1 -0
- package/dist/merchant/promotion-broadcast-recovery.d.ts +22 -0
- package/dist/merchant/promotion-broadcast-recovery.js +74 -0
- package/dist/merchant/promotion-broadcast-recovery.js.map +1 -0
- package/dist/merchant/promotion-broadcast-workflow.d.ts +42 -0
- package/dist/merchant/promotion-broadcast-workflow.js +171 -0
- package/dist/merchant/promotion-broadcast-workflow.js.map +1 -0
- package/dist/merchant/promotion-executors.d.ts +18 -0
- package/dist/merchant/promotion-executors.js +133 -0
- package/dist/merchant/promotion-executors.js.map +1 -0
- package/dist/merchant/promotion-store.d.ts +114 -0
- package/dist/merchant/promotion-store.js +325 -0
- package/dist/merchant/promotion-store.js.map +1 -0
- package/dist/merchant/promotion-time.d.ts +19 -0
- package/dist/merchant/promotion-time.js +162 -0
- package/dist/merchant/promotion-time.js.map +1 -0
- package/dist/merchant/quote-calculator.d.ts +32 -0
- package/dist/merchant/quote-calculator.js +70 -0
- package/dist/merchant/quote-calculator.js.map +1 -0
- package/dist/merchant/service-control-executors.d.ts +15 -0
- package/dist/merchant/service-control-executors.js +52 -0
- package/dist/merchant/service-control-executors.js.map +1 -0
- package/dist/merchant/workbench-service.d.ts +1 -0
- package/dist/merchant/workbench-service.js +11 -1
- package/dist/merchant/workbench-service.js.map +1 -1
- package/dist/merchant-admin/pending-page.d.ts +104 -0
- package/dist/merchant-admin/pending-page.js +20 -0
- package/dist/merchant-admin/pending-page.js.map +1 -1
- package/dist/merchant-admin/rfq-page.d.ts +105 -0
- package/dist/merchant-admin/rfq-page.js +176 -0
- package/dist/merchant-admin/rfq-page.js.map +1 -0
- package/dist/merchant-core/commands.d.ts +27 -0
- package/dist/merchant-core/commands.js +90 -1
- package/dist/merchant-core/commands.js.map +1 -1
- package/dist/merchant-core/executor.d.ts +27 -3
- package/dist/merchant-core/executor.js +13 -4
- package/dist/merchant-core/executor.js.map +1 -1
- package/dist/merchant-core/rfq/artifacts.d.ts +78 -0
- package/dist/merchant-core/rfq/artifacts.js +219 -0
- package/dist/merchant-core/rfq/artifacts.js.map +1 -0
- package/dist/merchant-core/rfq/data-source-adapter.d.ts +49 -0
- package/dist/merchant-core/rfq/data-source-adapter.js +128 -0
- package/dist/merchant-core/rfq/data-source-adapter.js.map +1 -0
- package/dist/merchant-core/rfq/delivery.d.ts +43 -0
- package/dist/merchant-core/rfq/delivery.js +57 -0
- package/dist/merchant-core/rfq/delivery.js.map +1 -0
- package/dist/merchant-core/rfq/fact-resolver.d.ts +76 -0
- package/dist/merchant-core/rfq/fact-resolver.js +220 -0
- package/dist/merchant-core/rfq/fact-resolver.js.map +1 -0
- package/dist/merchant-core/rfq/handoff.d.ts +54 -0
- package/dist/merchant-core/rfq/handoff.js +71 -0
- package/dist/merchant-core/rfq/handoff.js.map +1 -0
- package/dist/merchant-core/rfq/policy.d.ts +77 -0
- package/dist/merchant-core/rfq/policy.js +104 -0
- package/dist/merchant-core/rfq/policy.js.map +1 -0
- package/dist/merchant-core/rfq/pricing.d.ts +48 -0
- package/dist/merchant-core/rfq/pricing.js +150 -0
- package/dist/merchant-core/rfq/pricing.js.map +1 -0
- package/dist/merchant-core/rfq/quote-revisions.d.ts +52 -0
- package/dist/merchant-core/rfq/quote-revisions.js +126 -0
- package/dist/merchant-core/rfq/quote-revisions.js.map +1 -0
- package/dist/merchant-core/rfq/release-coordinator.d.ts +99 -0
- package/dist/merchant-core/rfq/release-coordinator.js +355 -0
- package/dist/merchant-core/rfq/release-coordinator.js.map +1 -0
- package/dist/merchant-core/rfq/repository.d.ts +398 -0
- package/dist/merchant-core/rfq/repository.js +855 -0
- package/dist/merchant-core/rfq/repository.js.map +1 -0
- package/dist/merchant-core/rfq/service.d.ts +398 -0
- package/dist/merchant-core/rfq/service.js +1036 -0
- package/dist/merchant-core/rfq/service.js.map +1 -0
- package/dist/merchant-core/rfq/source-records.d.ts +97 -0
- package/dist/merchant-core/rfq/source-records.js +349 -0
- package/dist/merchant-core/rfq/source-records.js.map +1 -0
- package/dist/merchant-core/rfq/types.d.ts +197 -0
- package/dist/merchant-core/rfq/types.js +110 -0
- package/dist/merchant-core/rfq/types.js.map +1 -0
- package/dist/merchant-core/service.d.ts +118 -1
- package/dist/merchant-core/service.js +202 -7
- package/dist/merchant-core/service.js.map +1 -1
- package/dist/merchant-core/storage/clock-skew-alerts.d.ts +21 -0
- package/dist/merchant-core/storage/clock-skew-alerts.js +67 -0
- package/dist/merchant-core/storage/clock-skew-alerts.js.map +1 -0
- package/dist/merchant-core/storage/leased-job.d.ts +42 -0
- package/dist/merchant-core/storage/leased-job.js +38 -0
- package/dist/merchant-core/storage/leased-job.js.map +1 -0
- package/dist/merchant-core/storage/operation-lifecycle.d.ts +78 -0
- package/dist/merchant-core/storage/operation-lifecycle.js +111 -0
- package/dist/merchant-core/storage/operation-lifecycle.js.map +1 -0
- package/dist/merchant-core/storage/redact.d.ts +29 -0
- package/dist/merchant-core/storage/redact.js +34 -0
- package/dist/merchant-core/storage/redact.js.map +1 -0
- package/dist/merchant-core/storage/schema.d.ts +24 -0
- package/dist/merchant-core/storage/schema.js +22 -0
- package/dist/merchant-core/storage/schema.js.map +1 -0
- package/dist/merchant-core/storage/transaction.d.ts +47 -0
- package/dist/merchant-core/storage/transaction.js +28 -0
- package/dist/merchant-core/storage/transaction.js.map +1 -0
- package/dist/merchant-gateway/entry-server.js +10 -0
- package/dist/merchant-gateway/entry-server.js.map +1 -1
- package/dist/negotiation/domain/objects.d.ts +7 -0
- package/dist/negotiation/domain/objects.js +8 -0
- package/dist/negotiation/domain/objects.js.map +1 -1
- package/dist/negotiation/idempotency/store.d.ts +23 -0
- package/dist/negotiation/idempotency/store.js +72 -1
- package/dist/negotiation/idempotency/store.js.map +1 -1
- package/dist/negotiation/idempotency/types.d.ts +16 -0
- package/dist/negotiation/idempotency/types.js +2 -0
- package/dist/negotiation/idempotency/types.js.map +1 -1
- package/dist/negotiation/lease/store.d.ts +18 -22
- package/dist/negotiation/lease/store.js +133 -88
- package/dist/negotiation/lease/store.js.map +1 -1
- package/dist/negotiation/ledger/event.d.ts +6 -0
- package/dist/negotiation/ledger/event.js +1 -0
- package/dist/negotiation/ledger/event.js.map +1 -1
- package/dist/negotiation/ledger/index.d.ts +4 -2
- package/dist/negotiation/ledger/index.js +1 -0
- package/dist/negotiation/ledger/index.js.map +1 -1
- package/dist/negotiation/ledger/payload-segments.d.ts +51 -0
- package/dist/negotiation/ledger/payload-segments.js +247 -0
- package/dist/negotiation/ledger/payload-segments.js.map +1 -0
- package/dist/negotiation/ledger/store.d.ts +34 -0
- package/dist/negotiation/ledger/store.js +162 -0
- package/dist/negotiation/ledger/store.js.map +1 -1
- package/dist/negotiation/recovery/recover.js +1 -1
- package/dist/negotiation/recovery/recover.js.map +1 -1
- package/dist/privacy/ledger-payload-deletion.d.ts +10 -0
- package/dist/privacy/ledger-payload-deletion.js +31 -0
- package/dist/privacy/ledger-payload-deletion.js.map +1 -0
- package/dist/privacy/local-backup-deletion.d.ts +13 -0
- package/dist/privacy/local-backup-deletion.js +115 -0
- package/dist/privacy/local-backup-deletion.js.map +1 -0
- package/dist/privacy/workbench-retention.d.ts +105 -0
- package/dist/privacy/workbench-retention.js +501 -0
- package/dist/privacy/workbench-retention.js.map +1 -0
- package/dist/runtime/model.d.ts +1 -1
- package/dist/runtime/model.js +3 -3
- package/dist/runtime/model.js.map +1 -1
- package/dist/trust/binding/claims.d.ts +92 -0
- package/dist/trust/binding/claims.js +175 -0
- package/dist/trust/binding/claims.js.map +1 -0
- package/dist/trust/binding/thumbprint.d.ts +35 -0
- package/dist/trust/binding/thumbprint.js +88 -0
- package/dist/trust/binding/thumbprint.js.map +1 -0
- package/dist/trust/binding/verify.d.ts +84 -0
- package/dist/trust/binding/verify.js +121 -0
- package/dist/trust/binding/verify.js.map +1 -0
- package/dist/trust/identity/auth-verifier.d.ts +9 -0
- package/dist/trust/identity/auth-verifier.js +10 -2
- package/dist/trust/identity/auth-verifier.js.map +1 -1
- package/dist/trust/identity/jws.d.ts +22 -1
- package/dist/trust/identity/jws.js +31 -2
- package/dist/trust/identity/jws.js.map +1 -1
- package/package.json +12 -4
- package/skills/kiwi-buyer/SKILL.md +33 -2
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:rfq-workbench:0.1.0:source-record",
|
|
4
|
+
"title": "SourceRecord",
|
|
5
|
+
"description": "候选开发契约;记录结构不等于模型工具输入。权限、引用一致性与跨字段约束由服务端校验。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": {
|
|
10
|
+
"const": "0.1.0"
|
|
11
|
+
},
|
|
12
|
+
"merchant_id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 256
|
|
16
|
+
},
|
|
17
|
+
"source_id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 256
|
|
21
|
+
},
|
|
22
|
+
"case_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"maxLength": 256
|
|
26
|
+
},
|
|
27
|
+
"kind": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"enum": [
|
|
30
|
+
"manual_text",
|
|
31
|
+
"csv",
|
|
32
|
+
"customer_feedback",
|
|
33
|
+
"manual_fact"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"content_sha256": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
39
|
+
},
|
|
40
|
+
"content_ref": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1,
|
|
43
|
+
"maxLength": 1024
|
|
44
|
+
},
|
|
45
|
+
"received_at": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "date-time"
|
|
48
|
+
},
|
|
49
|
+
"locator": {
|
|
50
|
+
"oneOf": [
|
|
51
|
+
{
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"properties": {
|
|
55
|
+
"kind": {
|
|
56
|
+
"const": "text_span"
|
|
57
|
+
},
|
|
58
|
+
"character_start": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 0
|
|
61
|
+
},
|
|
62
|
+
"character_end": {
|
|
63
|
+
"type": "integer",
|
|
64
|
+
"minimum": 1
|
|
65
|
+
},
|
|
66
|
+
"offset_unit": {
|
|
67
|
+
"const": "unicode_code_point"
|
|
68
|
+
},
|
|
69
|
+
"description": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"maxLength": 1024
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": [
|
|
76
|
+
"kind",
|
|
77
|
+
"character_start",
|
|
78
|
+
"character_end",
|
|
79
|
+
"offset_unit",
|
|
80
|
+
"description"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": false,
|
|
86
|
+
"properties": {
|
|
87
|
+
"kind": {
|
|
88
|
+
"const": "csv_cell"
|
|
89
|
+
},
|
|
90
|
+
"row_start": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"minimum": 1
|
|
93
|
+
},
|
|
94
|
+
"row_end": {
|
|
95
|
+
"type": "integer",
|
|
96
|
+
"minimum": 1
|
|
97
|
+
},
|
|
98
|
+
"columns": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"minItems": 1,
|
|
101
|
+
"items": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"description": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1,
|
|
109
|
+
"maxLength": 1024
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"kind",
|
|
114
|
+
"row_start",
|
|
115
|
+
"row_end",
|
|
116
|
+
"columns",
|
|
117
|
+
"description"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "object",
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"properties": {
|
|
124
|
+
"kind": {
|
|
125
|
+
"const": "manual_note"
|
|
126
|
+
},
|
|
127
|
+
"description": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"minLength": 1,
|
|
130
|
+
"maxLength": 1024
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": [
|
|
134
|
+
"kind",
|
|
135
|
+
"description"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
"submitted_by": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"maxLength": 256
|
|
144
|
+
},
|
|
145
|
+
"synthetic": {
|
|
146
|
+
"type": "boolean"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"required": [
|
|
150
|
+
"schema_version",
|
|
151
|
+
"merchant_id",
|
|
152
|
+
"source_id",
|
|
153
|
+
"case_id",
|
|
154
|
+
"kind",
|
|
155
|
+
"content_sha256",
|
|
156
|
+
"content_ref",
|
|
157
|
+
"received_at",
|
|
158
|
+
"locator",
|
|
159
|
+
"submitted_by",
|
|
160
|
+
"synthetic"
|
|
161
|
+
]
|
|
162
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Merchant Workbench contracts 1.0
|
|
2
|
+
|
|
3
|
+
- `problem.schema.json`:`/merchant/api/v1/*` 的 RFC 9457 错误外壳;不用于 A2A/MCP/legacy 管理 API。
|
|
4
|
+
- `money.schema.json`:精确非负金额,`amount_minor` 为十进制整数字符串。
|
|
5
|
+
|
|
6
|
+
运行时注册表与转换实现位于 `src/http/merchant-management/problem.ts` 和 `src/merchant/application/money.ts`。Schema 校验不代表 WebAuthn、平台或业务验收通过。
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-workbench:1.0:money",
|
|
4
|
+
"title": "Kiwi Merchant Workbench Exact Money 1.0",
|
|
5
|
+
"description": "Exact non-negative money at the Workbench management boundary. The locked KNP wire may adapt amount_minor to a safe JSON integer only after range validation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["currency", "amount_minor", "currency_table_version"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
|
|
11
|
+
"amount_minor": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^(0|[1-9][0-9]*)$",
|
|
14
|
+
"maxLength": 16,
|
|
15
|
+
"description": "Must be <= 9007199254740991 when adapted to the locked KNP JSON-number wire."
|
|
16
|
+
},
|
|
17
|
+
"currency_table_version": { "const": "kiwi-workbench-currency-v1-2026-09-21" }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-workbench:1.0:problem",
|
|
4
|
+
"title": "Kiwi Merchant Workbench Problem Details 1.0",
|
|
5
|
+
"description": "RFC 9457 response for /merchant/api/v1/* only. A2A, MCP and legacy /merchant/api/* retain their locked envelopes.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["type", "title", "status", "detail", "code", "request_id", "retryable", "recovery_action"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"type": { "type": "string", "pattern": "^urn:kiwi:problem:[a-z0-9-]+$" },
|
|
10
|
+
"title": { "type": "string", "minLength": 1, "maxLength": 160 },
|
|
11
|
+
"status": { "type": "integer", "minimum": 400, "maximum": 599 },
|
|
12
|
+
"detail": { "type": "string", "minLength": 1, "maxLength": 1000 },
|
|
13
|
+
"code": {
|
|
14
|
+
"enum": [
|
|
15
|
+
"VALIDATION_ERROR", "UNAUTHENTICATED", "PERMISSION_REVOKED", "RESOURCE_NOT_FOUND",
|
|
16
|
+
"VERSION_CONFLICT", "PRECONDITION_FAILED", "PRECONDITION_REQUIRED",
|
|
17
|
+
"APPROVAL_ALREADY_DECIDED", "CANDIDATE_EXPIRED", "CONFIRMATION_REQUIRED",
|
|
18
|
+
"CONFIRMATION_EXPIRED", "CONFIRMATION_INVALID", "CONFIRMATION_CHANNEL_UNAVAILABLE",
|
|
19
|
+
"IDEMPOTENCY_KEY_REUSED", "IDEMPOTENCY_WINDOW_EXPIRED", "OPERATION_RESULT_UNKNOWN",
|
|
20
|
+
"DEPENDENCY_UNAVAILABLE", "CATALOG_UNAVAILABLE", "PRODUCT_SOURCE_UNAVAILABLE",
|
|
21
|
+
"LLM_UNAVAILABLE", "BROADCAST_PUBLISH_FAILED", "RATE_LIMITED", "RUNTIME_PAUSED",
|
|
22
|
+
"RUNTIME_RECOVERING", "SERVICE_AUTH_REVOKED", "FEED_RESET_REQUIRED",
|
|
23
|
+
"FEED_CURSOR_INVALID", "SNAPSHOT_EXPIRED", "MONEY_PRECISION_UNRECOVERABLE",
|
|
24
|
+
"MONEY_RANGE_EXCEEDED", "RETENTION_RESTRICTED", "STORAGE_CAPACITY_EXCEEDED",
|
|
25
|
+
"COMPLIANCE_REVIEW_REQUIRED", "INTERNAL_ERROR"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"request_id": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
29
|
+
"operation_id": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
30
|
+
"retryable": { "type": "boolean" },
|
|
31
|
+
"recovery_action": {
|
|
32
|
+
"enum": ["none", "reauthenticate", "refresh_resource", "confirm", "query_operation", "retry_same_operation", "resync_feed", "open_support"]
|
|
33
|
+
},
|
|
34
|
+
"details": { "type": "object", "additionalProperties": true }
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": true,
|
|
37
|
+
"oneOf": [
|
|
38
|
+
{"properties":{"code":{"const":"VALIDATION_ERROR"},"type":{"const":"urn:kiwi:problem:validation-error"},"status":{"const":422},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
39
|
+
{"properties":{"code":{"const":"UNAUTHENTICATED"},"type":{"const":"urn:kiwi:problem:unauthenticated"},"status":{"const":401},"retryable":{"const":false},"recovery_action":{"const":"reauthenticate"}}},
|
|
40
|
+
{"properties":{"code":{"const":"PERMISSION_REVOKED"},"type":{"const":"urn:kiwi:problem:permission-revoked"},"status":{"const":403},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}},
|
|
41
|
+
{"properties":{"code":{"const":"RESOURCE_NOT_FOUND"},"type":{"const":"urn:kiwi:problem:resource-not-found"},"status":{"const":404},"retryable":{"const":false},"recovery_action":{"const":"none"}}},
|
|
42
|
+
{"properties":{"code":{"const":"VERSION_CONFLICT"},"type":{"const":"urn:kiwi:problem:version-conflict"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
43
|
+
{"properties":{"code":{"const":"PRECONDITION_FAILED"},"type":{"const":"urn:kiwi:problem:precondition-failed"},"status":{"const":412},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
44
|
+
{"properties":{"code":{"const":"PRECONDITION_REQUIRED"},"type":{"const":"urn:kiwi:problem:precondition-required"},"status":{"const":428},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
45
|
+
{"properties":{"code":{"const":"APPROVAL_ALREADY_DECIDED"},"type":{"const":"urn:kiwi:problem:approval-already-decided"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
46
|
+
{"properties":{"code":{"const":"CANDIDATE_EXPIRED"},"type":{"const":"urn:kiwi:problem:candidate-expired"},"status":{"const":410},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
47
|
+
{"properties":{"code":{"const":"CONFIRMATION_REQUIRED"},"type":{"const":"urn:kiwi:problem:confirmation-required"},"status":{"const":403},"retryable":{"const":false},"recovery_action":{"const":"confirm"}}},
|
|
48
|
+
{"properties":{"code":{"const":"CONFIRMATION_EXPIRED"},"type":{"const":"urn:kiwi:problem:confirmation-expired"},"status":{"const":410},"retryable":{"const":false},"recovery_action":{"const":"confirm"}}},
|
|
49
|
+
{"properties":{"code":{"const":"CONFIRMATION_INVALID"},"type":{"const":"urn:kiwi:problem:confirmation-invalid"},"status":{"const":403},"retryable":{"const":false},"recovery_action":{"const":"confirm"}}},
|
|
50
|
+
{"properties":{"code":{"const":"CONFIRMATION_CHANNEL_UNAVAILABLE"},"type":{"const":"urn:kiwi:problem:confirmation-channel-unavailable"},"status":{"const":503},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}},
|
|
51
|
+
{"properties":{"code":{"const":"IDEMPOTENCY_KEY_REUSED"},"type":{"const":"urn:kiwi:problem:idempotency-key-reused"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
52
|
+
{"properties":{"code":{"const":"IDEMPOTENCY_WINDOW_EXPIRED"},"type":{"const":"urn:kiwi:problem:idempotency-window-expired"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
53
|
+
{"required":["operation_id"],"properties":{"code":{"const":"OPERATION_RESULT_UNKNOWN"},"type":{"const":"urn:kiwi:problem:operation-result-unknown"},"status":{"const":504},"retryable":{"const":false},"recovery_action":{"const":"query_operation"}}},
|
|
54
|
+
{"properties":{"code":{"const":"DEPENDENCY_UNAVAILABLE"},"type":{"const":"urn:kiwi:problem:dependency-unavailable"},"status":{"const":503},"retryable":{"const":true},"recovery_action":{"const":"retry_same_operation"}}},
|
|
55
|
+
{"properties":{"code":{"const":"CATALOG_UNAVAILABLE"},"type":{"const":"urn:kiwi:problem:catalog-unavailable"},"status":{"const":503},"retryable":{"const":true},"recovery_action":{"const":"retry_same_operation"}}},
|
|
56
|
+
{"properties":{"code":{"const":"PRODUCT_SOURCE_UNAVAILABLE"},"type":{"const":"urn:kiwi:problem:product-source-unavailable"},"status":{"const":503},"retryable":{"const":true},"recovery_action":{"const":"retry_same_operation"}}},
|
|
57
|
+
{"properties":{"code":{"const":"LLM_UNAVAILABLE"},"type":{"const":"urn:kiwi:problem:llm-unavailable"},"status":{"const":503},"retryable":{"const":true},"recovery_action":{"const":"retry_same_operation"}}},
|
|
58
|
+
{"properties":{"code":{"const":"BROADCAST_PUBLISH_FAILED"},"type":{"const":"urn:kiwi:problem:broadcast-publish-failed"},"status":{"const":503},"retryable":{"const":false},"recovery_action":{"const":"query_operation"}}},
|
|
59
|
+
{"properties":{"code":{"const":"RATE_LIMITED"},"type":{"const":"urn:kiwi:problem:rate-limited"},"status":{"const":429},"retryable":{"const":true},"recovery_action":{"const":"retry_same_operation"}}},
|
|
60
|
+
{"properties":{"code":{"const":"RUNTIME_PAUSED"},"type":{"const":"urn:kiwi:problem:runtime-paused"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"none"}}},
|
|
61
|
+
{"properties":{"code":{"const":"RUNTIME_RECOVERING"},"type":{"const":"urn:kiwi:problem:runtime-recovering"},"status":{"const":503},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}},
|
|
62
|
+
{"properties":{"code":{"const":"SERVICE_AUTH_REVOKED"},"type":{"const":"urn:kiwi:problem:service-auth-revoked"},"status":{"const":403},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}},
|
|
63
|
+
{"properties":{"code":{"const":"FEED_RESET_REQUIRED"},"type":{"const":"urn:kiwi:problem:feed-reset-required"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"resync_feed"}}},
|
|
64
|
+
{"properties":{"code":{"const":"FEED_CURSOR_INVALID"},"type":{"const":"urn:kiwi:problem:feed-cursor-invalid"},"status":{"const":400},"retryable":{"const":false},"recovery_action":{"const":"resync_feed"}}},
|
|
65
|
+
{"properties":{"code":{"const":"SNAPSHOT_EXPIRED"},"type":{"const":"urn:kiwi:problem:snapshot-expired"},"status":{"const":410},"retryable":{"const":false},"recovery_action":{"const":"resync_feed"}}},
|
|
66
|
+
{"properties":{"code":{"const":"MONEY_PRECISION_UNRECOVERABLE"},"type":{"const":"urn:kiwi:problem:money-precision-unrecoverable"},"status":{"const":422},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
67
|
+
{"properties":{"code":{"const":"MONEY_RANGE_EXCEEDED"},"type":{"const":"urn:kiwi:problem:money-range-exceeded"},"status":{"const":422},"retryable":{"const":false},"recovery_action":{"const":"refresh_resource"}}},
|
|
68
|
+
{"properties":{"code":{"const":"RETENTION_RESTRICTED"},"type":{"const":"urn:kiwi:problem:retention-restricted"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}},
|
|
69
|
+
{"properties":{"code":{"const":"STORAGE_CAPACITY_EXCEEDED"},"type":{"const":"urn:kiwi:problem:storage-capacity-exceeded"},"status":{"const":507},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}},
|
|
70
|
+
{"properties":{"code":{"const":"COMPLIANCE_REVIEW_REQUIRED"},"type":{"const":"urn:kiwi:problem:compliance-review-required"},"status":{"const":409},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}},
|
|
71
|
+
{"properties":{"code":{"const":"INTERNAL_ERROR"},"type":{"const":"urn:kiwi:problem:internal-error"},"status":{"const":500},"retryable":{"const":false},"recovery_action":{"const":"open_support"}}}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-cloud:0.1.2:runtime-binding-request",
|
|
4
|
+
"title": "Kiwi Merchant Cloud runtime-binding 创建/轮换请求 0.1.2",
|
|
5
|
+
"description": "POST /v1/agents/{id}/runtime-bindings 的请求体。请求签名(x-kiwi-binding-jws,EdDSA)不在 body 里——owner token 与密码学凭据都不进 JSON(设计 §14.1)。首次绑定需 admin_token 闸门;轮换由当前活动绑定的私钥签名授权。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["binding"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"binding": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": true,
|
|
13
|
+
"required": [
|
|
14
|
+
"runtime_origin",
|
|
15
|
+
"a2a_endpoint",
|
|
16
|
+
"key_jwk",
|
|
17
|
+
"key_id",
|
|
18
|
+
"generation",
|
|
19
|
+
"service_epoch"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"runtime_origin": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^https://",
|
|
25
|
+
"description": "Runtime 的公开 origin;私网 / loopback / cloud metadata / 保留主机名一律拒绝(T035)。"
|
|
26
|
+
},
|
|
27
|
+
"a2a_endpoint": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^https://",
|
|
30
|
+
"description": "A2A 端点;同样受 T035 端点策略约束。"
|
|
31
|
+
},
|
|
32
|
+
"key_jwk": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": ["kty", "crv", "x"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"kty": { "const": "OKP" },
|
|
37
|
+
"crv": { "const": "Ed25519" },
|
|
38
|
+
"x": { "type": "string", "minLength": 1 }
|
|
39
|
+
},
|
|
40
|
+
"description": "Runtime 的签名公钥;key_thumbprint 由它按 RFC 7638 必需成员子集 + sha256 计算,跨语言锁定。"
|
|
41
|
+
},
|
|
42
|
+
"key_id": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
},
|
|
46
|
+
"generation": {
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"minimum": 0,
|
|
49
|
+
"description": "Runtime 侧的部署代次;换址/重部署须递增,旧绑定不复活。"
|
|
50
|
+
},
|
|
51
|
+
"service_epoch": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 1
|
|
54
|
+
},
|
|
55
|
+
"binding_id": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$",
|
|
58
|
+
"description": "可选:调用方指定 binding_id;省略时由 Catalog 生成。"
|
|
59
|
+
},
|
|
60
|
+
"expires_at": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"format": "date-time",
|
|
63
|
+
"description": "可选:绑定到期时间(ISO 8601)。"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"admin_token": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1,
|
|
70
|
+
"description": "首次绑定/管理员轮换的受控注册闸门;M4 开通向导落地后换成商家授权 + 端点挑战。"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-cloud:0.1.2:runtime-binding-claims",
|
|
4
|
+
"title": "Kiwi Merchant Cloud runtime-binding-claims 0.1.2",
|
|
5
|
+
"description": "新增内部设计契约。不是WorkBuddy官方接口;不构成平台成功、密码学或生产就绪证明。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": {
|
|
10
|
+
"const": "0.1.2"
|
|
11
|
+
},
|
|
12
|
+
"binding_id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
15
|
+
},
|
|
16
|
+
"binding_version": {
|
|
17
|
+
"type": "integer",
|
|
18
|
+
"minimum": 1
|
|
19
|
+
},
|
|
20
|
+
"merchant_id": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
23
|
+
},
|
|
24
|
+
"agent_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
27
|
+
},
|
|
28
|
+
"workload_ref": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
31
|
+
},
|
|
32
|
+
"runtime_origin": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "uri",
|
|
35
|
+
"pattern": "^https://"
|
|
36
|
+
},
|
|
37
|
+
"a2a_endpoint": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "uri",
|
|
40
|
+
"pattern": "^https://"
|
|
41
|
+
},
|
|
42
|
+
"card_url": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"format": "uri",
|
|
45
|
+
"pattern": "^https://"
|
|
46
|
+
},
|
|
47
|
+
"key_id": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1
|
|
50
|
+
},
|
|
51
|
+
"key_thumbprint": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
54
|
+
},
|
|
55
|
+
"service_epoch": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": 1
|
|
58
|
+
},
|
|
59
|
+
"issued_at": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"format": "date-time"
|
|
62
|
+
},
|
|
63
|
+
"expires_at": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "date-time"
|
|
66
|
+
},
|
|
67
|
+
"issuer": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"minLength": 1
|
|
70
|
+
},
|
|
71
|
+
"scope": {
|
|
72
|
+
"const": "a2a-runtime"
|
|
73
|
+
},
|
|
74
|
+
"status": {
|
|
75
|
+
"enum": [
|
|
76
|
+
"active",
|
|
77
|
+
"revoked"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": [
|
|
82
|
+
"schema_version",
|
|
83
|
+
"binding_id",
|
|
84
|
+
"binding_version",
|
|
85
|
+
"merchant_id",
|
|
86
|
+
"agent_id",
|
|
87
|
+
"workload_ref",
|
|
88
|
+
"runtime_origin",
|
|
89
|
+
"a2a_endpoint",
|
|
90
|
+
"card_url",
|
|
91
|
+
"key_id",
|
|
92
|
+
"key_thumbprint",
|
|
93
|
+
"service_epoch",
|
|
94
|
+
"issued_at",
|
|
95
|
+
"expires_at",
|
|
96
|
+
"issuer",
|
|
97
|
+
"scope",
|
|
98
|
+
"status"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-cloud:0.1.2:runtime-binding-document",
|
|
4
|
+
"title": "Kiwi Merchant Cloud runtime-binding 读响应 0.1.2",
|
|
5
|
+
"description": "GET /v1/agents/{id}/runtime-binding 的响应体(Catalog 签发)。公开读,不含平台 applicationId / 用户 ID 等控制面私有信息。properties.claims 是 runtime-binding/0.1.2/claims.schema.json 的**逐字段内联副本**(测试锁定两者一致)。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"claims",
|
|
10
|
+
"claims_jws",
|
|
11
|
+
"issuer_kid",
|
|
12
|
+
"issuer_thumbprint",
|
|
13
|
+
"governance"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"claims": {
|
|
17
|
+
"title": "Kiwi Merchant Cloud runtime-binding-claims 0.1.2",
|
|
18
|
+
"description": "新增内部设计契约。不是WorkBuddy官方接口;不构成平台成功、密码学或生产就绪证明。",
|
|
19
|
+
"type": "object",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"schema_version": {
|
|
23
|
+
"const": "0.1.2"
|
|
24
|
+
},
|
|
25
|
+
"binding_id": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
28
|
+
},
|
|
29
|
+
"binding_version": {
|
|
30
|
+
"type": "integer",
|
|
31
|
+
"minimum": 1
|
|
32
|
+
},
|
|
33
|
+
"merchant_id": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
36
|
+
},
|
|
37
|
+
"agent_id": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
40
|
+
},
|
|
41
|
+
"workload_ref": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_-]{2,95}$"
|
|
44
|
+
},
|
|
45
|
+
"runtime_origin": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "uri",
|
|
48
|
+
"pattern": "^https://"
|
|
49
|
+
},
|
|
50
|
+
"a2a_endpoint": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"format": "uri",
|
|
53
|
+
"pattern": "^https://"
|
|
54
|
+
},
|
|
55
|
+
"card_url": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"format": "uri",
|
|
58
|
+
"pattern": "^https://"
|
|
59
|
+
},
|
|
60
|
+
"key_id": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"key_thumbprint": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
67
|
+
},
|
|
68
|
+
"service_epoch": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 1
|
|
71
|
+
},
|
|
72
|
+
"issued_at": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"format": "date-time"
|
|
75
|
+
},
|
|
76
|
+
"expires_at": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"format": "date-time"
|
|
79
|
+
},
|
|
80
|
+
"issuer": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1
|
|
83
|
+
},
|
|
84
|
+
"scope": {
|
|
85
|
+
"const": "a2a-runtime"
|
|
86
|
+
},
|
|
87
|
+
"status": {
|
|
88
|
+
"enum": [
|
|
89
|
+
"active",
|
|
90
|
+
"revoked"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"schema_version",
|
|
96
|
+
"binding_id",
|
|
97
|
+
"binding_version",
|
|
98
|
+
"merchant_id",
|
|
99
|
+
"agent_id",
|
|
100
|
+
"workload_ref",
|
|
101
|
+
"runtime_origin",
|
|
102
|
+
"a2a_endpoint",
|
|
103
|
+
"card_url",
|
|
104
|
+
"key_id",
|
|
105
|
+
"key_thumbprint",
|
|
106
|
+
"service_epoch",
|
|
107
|
+
"issued_at",
|
|
108
|
+
"expires_at",
|
|
109
|
+
"issuer",
|
|
110
|
+
"scope",
|
|
111
|
+
"status"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"claims_jws": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"minLength": 1,
|
|
117
|
+
"description": "compact JWS(EdDSA,typ=kiwi-runtime-binding-claims),载荷必须是 claims 字段的逐字段同一对象。"
|
|
118
|
+
},
|
|
119
|
+
"issuer_kid": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"minLength": 1,
|
|
122
|
+
"description": "必须与 claims_jws 头部的 kid 一致:选信任钥匙的是 JWS 头,不是本字段。"
|
|
123
|
+
},
|
|
124
|
+
"issuer_thumbprint": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
127
|
+
"description": "发行者公钥指纹;Buyer 必须与本地可信钥匙的指纹比对。"
|
|
128
|
+
},
|
|
129
|
+
"governance": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": [
|
|
133
|
+
"publication_state"
|
|
134
|
+
],
|
|
135
|
+
"properties": {
|
|
136
|
+
"publication_state": {
|
|
137
|
+
"enum": [
|
|
138
|
+
"ACTIVE",
|
|
139
|
+
"PAUSED",
|
|
140
|
+
"WITHDRAWN"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"card_revision": {
|
|
146
|
+
"type": [
|
|
147
|
+
"integer",
|
|
148
|
+
"null"
|
|
149
|
+
],
|
|
150
|
+
"minimum": 1,
|
|
151
|
+
"description": "活动名片版本(信任缓存的元组分;公开元数据,非敏感)。"
|
|
152
|
+
},
|
|
153
|
+
"card_etag": {
|
|
154
|
+
"type": [
|
|
155
|
+
"string",
|
|
156
|
+
"null"
|
|
157
|
+
],
|
|
158
|
+
"description": "Catalog 对公开读地址响应体的 ETag 承诺;Buyer 用它做 If-None-Match 重验证。"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "跨语言锁:kiwi(TS) 与 kiwi-catalog(Python) 必须对同一 JWK 得到同一 key_thumbprint,并对同一 payload/签名身份产出**逐字节相同**的 compact JWS(Ed25519 签名确定性)。",
|
|
3
|
+
"vector_version": 1,
|
|
4
|
+
"kid": "catalog-issuer-vector-2026",
|
|
5
|
+
"public_jwk": {
|
|
6
|
+
"kty": "OKP",
|
|
7
|
+
"crv": "Ed25519",
|
|
8
|
+
"x": "PKgLO3S6UFVpZqFxIGCpBJ0cCnYqObAZGFp2tycvaQs"
|
|
9
|
+
},
|
|
10
|
+
"private_key_pem": "-----BEGIN PRIVATE KEY-----\nMC4CAQAwBQYDK2VwBCIEIDWTJ9pQFSeRx3Abzp7CBJ5qAdUZN98/crUN1hMZI8mY\n-----END PRIVATE KEY-----\n",
|
|
11
|
+
"payload_string": "{\"schema_version\":\"0.1.2\",\"scope\":\"a2a-runtime\",\"agent_id\":\"cagt_vector_demo\"}",
|
|
12
|
+
"expected_thumbprint": "sha256:ba92f94fd89e682bae49416b83d9039eeb5ea9300992660a669f17d3a87b01a1",
|
|
13
|
+
"expected_jws": "eyJ0eXAiOiJraXdpLXJ1bnRpbWUtYmluZGluZy1jbGFpbXMiLCJhbGciOiJFZERTQSIsImtpZCI6ImNhdGFsb2ctaXNzdWVyLXZlY3Rvci0yMDI2In0.eyJzY2hlbWFfdmVyc2lvbiI6IjAuMS4yIiwic2NvcGUiOiJhMmEtcnVudGltZSIsImFnZW50X2lkIjoiY2FndF92ZWN0b3JfZGVtbyJ9.mdpZ1JCbUoEzhWQHEyEBvMvWIo7pAH0fiamS9jXpZKZsUsTOLlObxxL4rp4W_96oAJM83r2SB6Fv94I2RohVBg",
|
|
14
|
+
"canonical_jwk_json": "{\"crv\":\"Ed25519\",\"kty\":\"OKP\",\"x\":\"PKgLO3S6UFVpZqFxIGCpBJ0cCnYqObAZGFp2tycvaQs\"}"
|
|
15
|
+
}
|