@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
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[A2A](https://a2a-protocol.org/) 与 [UCP](https://ucp.dev/) 完成发现 → capability 协商 →
|
|
5
5
|
磋商 → 非绑定协议。磋商以**非约束性商业协议**终止:不创建订单、不支付、不锁库存。
|
|
6
6
|
|
|
7
|
-
**Kiwi 当前代码版本以 `package.json` 为准**(当前 0.
|
|
7
|
+
**Kiwi 当前代码版本以 `package.json` 为准**(当前 0.10.0):当前发布线包含 A2A 双栈、KNP/1.0 磋商、签名身份
|
|
8
8
|
与安全交接能力。A2A 1.0 线协议互操作以组合 conformance transcript 为准,不用历史审计
|
|
9
9
|
文档替代运行证据。
|
|
10
10
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-cloud:0.1.2:card-publication-request",
|
|
4
|
+
"title": "Kiwi Merchant Cloud 名片发布请求 0.1.2",
|
|
5
|
+
"description": "POST /v1/agents/{id}/card-publications 的请求体(创建**不可变** revision,不激活)。激活/暂停/撤回是独立端点(/publish、/pause、/withdraw),带 CAS 的 expected_revision。请求签名走 x-kiwi-binding-jws,不进 body。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["publication"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"publication": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": true,
|
|
13
|
+
"required": [
|
|
14
|
+
"schema_version",
|
|
15
|
+
"agent_id",
|
|
16
|
+
"binding_id",
|
|
17
|
+
"generation",
|
|
18
|
+
"expected_revision",
|
|
19
|
+
"wire_profile",
|
|
20
|
+
"card_digest",
|
|
21
|
+
"agent_card"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"schema_version": { "const": "0.1.2" },
|
|
25
|
+
"agent_id": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "必须与路由上的 catalog_agent_id 一致。"
|
|
28
|
+
},
|
|
29
|
+
"binding_id": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"description": "发布由**当前活动绑定**背书;签名必须覆盖它。"
|
|
33
|
+
},
|
|
34
|
+
"generation": {
|
|
35
|
+
"type": "integer",
|
|
36
|
+
"minimum": 0
|
|
37
|
+
},
|
|
38
|
+
"expected_revision": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"minimum": 0,
|
|
41
|
+
"description": "CAS 前置条件:不等于当前活动 revision 时拒绝(旧 revision 不能覆盖新 revision)。"
|
|
42
|
+
},
|
|
43
|
+
"wire_profile": {
|
|
44
|
+
"const": "a2a-1.0"
|
|
45
|
+
},
|
|
46
|
+
"card_digest": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
49
|
+
"description": "由发布方(Runtime)计算并经其请求签名背书;Catalog 只存不算,避免自造规范化。"
|
|
50
|
+
},
|
|
51
|
+
"agent_card": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["name", "version", "url", "supportedInterfaces"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"name": { "type": "string", "minLength": 1 },
|
|
56
|
+
"version": { "type": "string", "minLength": 1 },
|
|
57
|
+
"url": { "type": "string", "minLength": 1 },
|
|
58
|
+
"supportedInterfaces": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"minItems": 1,
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": ["url", "protocolBinding"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"url": { "type": "string", "minLength": 1 },
|
|
66
|
+
"protocolBinding": { "type": "string", "minLength": 1 },
|
|
67
|
+
"protocolVersion": { "type": "string", "minLength": 1 }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"description": "至少一项的 url 必须等于绑定的 a2a_endpoint(不得指向 Catalog 自己)。"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"description": "标准 Agent Card;含私密字段(成本/底价/密钥/token 等)时整次发布被拒,旧活动名片不受影响。"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"lock_version": 1,
|
|
3
3
|
"source_repository": "harrylabsj/kiwi",
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"bundle_sha256": "
|
|
4
|
+
"source_commit": "af21fa275f8d14f58a2922c7d977b1d94a8a01ac",
|
|
5
|
+
"bundle_sha256": "bcce9c88bafa4ced2362c17688b86600476d5d6063a44f55b3302e255fc1662d",
|
|
6
6
|
"contracts_manifest": "contracts/manifest.json"
|
|
7
7
|
}
|
package/contracts/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 1,
|
|
3
3
|
"authority": "kiwi/contracts",
|
|
4
|
-
"bundle_sha256": "
|
|
4
|
+
"bundle_sha256": "bcce9c88bafa4ced2362c17688b86600476d5d6063a44f55b3302e255fc1662d",
|
|
5
5
|
"contracts": [
|
|
6
6
|
{
|
|
7
7
|
"id": "commerce-intent",
|
|
@@ -80,6 +80,132 @@
|
|
|
80
80
|
"version": "0.1",
|
|
81
81
|
"path": "contracts/shopping.negotiation/0.1/snapshot.schema.json",
|
|
82
82
|
"sha256": "3684e5674917b1d3777e298d9e18e34f3f124d1ba7534540de08023be45a4e27"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "merchant-rfq-delivery-record",
|
|
86
|
+
"version": "0.1.0",
|
|
87
|
+
"path": "contracts/merchant-rfq/0.1.0/delivery-record.schema.json",
|
|
88
|
+
"sha256": "a49bf130a1da087ba32ae0b97d89785829acdcd71f744cdc023e9720b4bfbf24"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "merchant-rfq-fact-snapshot",
|
|
92
|
+
"version": "0.1.0",
|
|
93
|
+
"path": "contracts/merchant-rfq/0.1.0/fact-snapshot.schema.json",
|
|
94
|
+
"sha256": "393e875e64afe4dca8d4e2eb6b094006c0c10a6b0c620bcad0534d85f1341a6e"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "merchant-rfq-handoff-record",
|
|
98
|
+
"version": "0.1.0",
|
|
99
|
+
"path": "contracts/merchant-rfq/0.1.0/handoff-record.schema.json",
|
|
100
|
+
"sha256": "ea6a8177d351542493e4992865eddf84f778335765dc5d2c28172f6a70d14029"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "merchant-rfq-pricing-input",
|
|
104
|
+
"version": "0.1.0",
|
|
105
|
+
"path": "contracts/merchant-rfq/0.1.0/pricing-input.schema.json",
|
|
106
|
+
"sha256": "c22cfb4ddb76b6e6e6b866a0d0a06d83b9a0847924b4801415861d9cce7493ed"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "merchant-rfq-quote-revision",
|
|
110
|
+
"version": "0.1.0",
|
|
111
|
+
"path": "contracts/merchant-rfq/0.1.0/quote-revision.schema.json",
|
|
112
|
+
"sha256": "e089db6aa725b1ac5c0a7bd248e69298ca3a1a5af9437f086490b9ca096a770e"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "merchant-rfq-release-request",
|
|
116
|
+
"version": "0.1.0",
|
|
117
|
+
"path": "contracts/merchant-rfq/0.1.0/release-request.schema.json",
|
|
118
|
+
"sha256": "aeff815962e28232da2b8784b6e61b80e04bbdcbdd40ff13801514e26911164b"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "merchant-rfq-rfq-case",
|
|
122
|
+
"version": "0.1.0",
|
|
123
|
+
"path": "contracts/merchant-rfq/0.1.0/rfq-case.schema.json",
|
|
124
|
+
"sha256": "20d384a302602707bd3562e891edb5e7558f5e825251b35f90d51409cbe36cb6"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "merchant-rfq-source-record",
|
|
128
|
+
"version": "0.1.0",
|
|
129
|
+
"path": "contracts/merchant-rfq/0.1.0/source-record.schema.json",
|
|
130
|
+
"sha256": "822f6b17ab3b77479385e092c50b04355a84b0820fba74a57d4ab38aa60415ad"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "runtime-binding-claims",
|
|
134
|
+
"version": "0.1.2",
|
|
135
|
+
"path": "contracts/runtime-binding/0.1.2/claims.schema.json",
|
|
136
|
+
"sha256": "dacdacf7099c595cf70899994d3778f33f0476757426555c31168fbfd6660d4e"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "runtime-binding-document",
|
|
140
|
+
"version": "0.1.2",
|
|
141
|
+
"path": "contracts/runtime-binding/0.1.2/document.schema.json",
|
|
142
|
+
"sha256": "9a7a0cc4e86b0f3b87f20dcb3b4721b28c797136ce5173d636daa76962329925"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "runtime-binding-request",
|
|
146
|
+
"version": "0.1.2",
|
|
147
|
+
"path": "contracts/runtime-binding/0.1.2/binding-request.schema.json",
|
|
148
|
+
"sha256": "7788b5722614b0ae4ccb47657a64f75be9dac13f962a50aa6a1937c3761b7b15"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "card-publication-request",
|
|
152
|
+
"version": "0.1.2",
|
|
153
|
+
"path": "contracts/card-publication/0.1.2/request.schema.json",
|
|
154
|
+
"sha256": "9053e039b8d59c0bbb2d9c73a6d1219491148f28346e1202355605aa5311c72e"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "merchant-management-runtime-status",
|
|
158
|
+
"version": "1.0",
|
|
159
|
+
"path": "contracts/merchant-management/1.0/runtime-status.schema.json",
|
|
160
|
+
"sha256": "6ac15f81c9443dd6a1401ae45d40d956b1967af1952985a7856e0b79ff6e354f"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "merchant-management-approval-preview",
|
|
164
|
+
"version": "1.0",
|
|
165
|
+
"path": "contracts/merchant-management/1.0/approval-preview.schema.json",
|
|
166
|
+
"sha256": "2bd48d77482677a8a142c8e751da10fd678dd66a2bc6d72014c17f459ad519fa"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "merchant-management-approval-decision",
|
|
170
|
+
"version": "1.0",
|
|
171
|
+
"path": "contracts/merchant-management/1.0/approval-decision.schema.json",
|
|
172
|
+
"sha256": "e3e606bd6d4ae152910de304b283207d5407e4f7a31f9dfcffb5ec8e9d07aa6c"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": "merchant-management-operation-receipt",
|
|
176
|
+
"version": "1.0",
|
|
177
|
+
"path": "contracts/merchant-management/1.0/operation-receipt.schema.json",
|
|
178
|
+
"sha256": "f247d3060f93aa0cdc986152c39d3ec7f821e5ddf370274b795b85df7902059f"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "merchant-management-management-error",
|
|
182
|
+
"version": "1.0",
|
|
183
|
+
"path": "contracts/merchant-management/1.0/management-error.schema.json",
|
|
184
|
+
"sha256": "20feb287235c383769407fd673457a30166ef5778e148e56e9f92310c69221a3"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "merchant-management-runtime-descriptor",
|
|
188
|
+
"version": "1.0",
|
|
189
|
+
"path": "contracts/merchant-management/1.0/runtime-management-descriptor.schema.json",
|
|
190
|
+
"sha256": "cb284a6b03119219967090562e4723371e9052f31f51d06b790ab4602b144af0"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"id": "merchant-management-delivery-manifest",
|
|
194
|
+
"version": "1.0",
|
|
195
|
+
"path": "contracts/merchant-management/1.0/connector-delivery-manifest.schema.json",
|
|
196
|
+
"sha256": "cad7c8735d0b1684176b4871a17b9b3b1831b6600b745ee2551e753bfcade82d"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "merchant-workbench-problem",
|
|
200
|
+
"version": "1.0",
|
|
201
|
+
"path": "contracts/merchant-workbench/1.0/problem.schema.json",
|
|
202
|
+
"sha256": "0763b5106af2fa3ad6a2b180dd2cbe7476844a4a7089bca1a2d978eaa949fe34"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"id": "merchant-workbench-money",
|
|
206
|
+
"version": "1.0",
|
|
207
|
+
"path": "contracts/merchant-workbench/1.0/money.schema.json",
|
|
208
|
+
"sha256": "f7f52cde540607fc0ff7185b6681171317d0f24bea5a68f8012061478ca93265"
|
|
83
209
|
}
|
|
84
210
|
]
|
|
85
211
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# merchant-management/1 —— 商家私有管理 API 契约(BD 设计 §9–§11)
|
|
2
|
+
|
|
3
|
+
管理 API major = **1**(`MANAGEMENT_API_MAJOR`)。本目录是契约权威;运行时实现
|
|
4
|
+
在 `src/http/merchant-management/`,共用业务层是 `src/merchant/application/`。
|
|
5
|
+
|
|
6
|
+
## 端点(均在 `/merchant/api` 下)
|
|
7
|
+
|
|
8
|
+
| 方法与路径 | 说明 |
|
|
9
|
+
|---|---|
|
|
10
|
+
| GET `/session` | 会话/主体信息 + CSRF 令牌(页面启动时取一次) |
|
|
11
|
+
| GET `/status` | `RuntimeStatus` |
|
|
12
|
+
| GET `/products?cursor&limit` | 公开商品投影分页;无商品源 → 503(不伪造空目录) |
|
|
13
|
+
| GET `/policy` | 规则版本与摘要(脱敏;内容不在此通道) |
|
|
14
|
+
| GET `/approvals?cursor&limit` | 待审批列表(脱敏投影) |
|
|
15
|
+
| GET `/approvals/{id}` | 确认预览(有效期、参数/前置哈希) |
|
|
16
|
+
| GET `/operations/{id}` | 操作回执对账 |
|
|
17
|
+
| POST `/confirmations` | 签发短时单次确认引用(候选审批 / `service.resume`) |
|
|
18
|
+
| POST `/approvals/{id}/approve` | 批准并执行(`ApprovalDecision`) |
|
|
19
|
+
| POST `/approvals/{id}/reject` | 拒绝并审计 |
|
|
20
|
+
| POST `/service/pause` | 暂停接待(拒新询价,既有任务不受影响) |
|
|
21
|
+
| POST `/service/resume` | 恢复接待(owner + 确认引用 + 就绪门) |
|
|
22
|
+
| POST `/products/import-drafts` | 商品表整表校验 + CAS + 预览(增/改/留/删行数);不动现有商品 |
|
|
23
|
+
| POST `/products/import-drafts/{id}/commit` | 原子提交(temp+rename,全批成功或全批不变;**整表替换语义**) |
|
|
24
|
+
| POST `/policy/drafts` | 策略补丁草稿;**响应与回执只含 draft_id/摘要/版本,绝不含补丁原文** |
|
|
25
|
+
| POST `/policy/drafts/{id}/commit` | 提交生效(`MerchantPolicyRuntime.apply`,版本递增) |
|
|
26
|
+
|
|
27
|
+
草稿语义(BD §10.1):校验/预览(draft)与生效(commit)分离;提交是幂等命令
|
|
28
|
+
(同键同摘要回放原回执);草稿一次性(committed 后不可复用)。商品导入是
|
|
29
|
+
**整表替换**——新表未包含的 SKU 提交后移除,预览给出 removed 计数。
|
|
30
|
+
|
|
31
|
+
`/events`(SSE)属同 major 的可选端点,本版未提供。
|
|
32
|
+
|
|
33
|
+
## 鉴权(一个部署单元 ≠ 一个权限域)
|
|
34
|
+
|
|
35
|
+
- 会话:`kiwi_admin` cookie(与 `/admin` 同源,12h,可撤销)。未认证 → 401。
|
|
36
|
+
A2A Bearer/签名、Catalog OAuth、平台 publishableKey **都不是**管理凭据。
|
|
37
|
+
- 写请求必须带 `X-CSRF-Token: <GET /session 返回的 csrf_token>`;请求携带
|
|
38
|
+
`Origin` 头时必须精确命中实例 origin。CORS 不是认证。
|
|
39
|
+
- 主体只从会话派生;正文/路径/头里的 `merchant_id` / `actor_id` 一律不认(UC10)。
|
|
40
|
+
跨商家对象统一 404(UC09)。
|
|
41
|
+
- 角色:owner(全部)/ operator(商品导入、策略草稿、审批、暂停)/ viewer(只读)。
|
|
42
|
+
`service:resume`、敏感策略读取、资源删除是 owner 专属。
|
|
43
|
+
|
|
44
|
+
## 幂等(§10.2)
|
|
45
|
+
|
|
46
|
+
- 顺序:先认证与归属 → 规范化输入(未知字段拒绝)→ 权威存储查
|
|
47
|
+
`(merchant_id, actor_id, command_type, idempotency_key)`。
|
|
48
|
+
- 同键同请求摘要 → 重放原回执(200);同键不同摘要 → 409 conflict。
|
|
49
|
+
- 校验/授权类失败(未触达执行)不占幂等键——修正后可用**原键**重试;
|
|
50
|
+
执行层异常且无法证明「未执行」→ 记 `unknown` 并保留 `operation_id`
|
|
51
|
+
查询路径,**不能当作失败自动重做**。终态结果不可被普通重试覆盖。
|
|
52
|
+
|
|
53
|
+
## 错误码 → HTTP(§11.3;仅适用于本 API)
|
|
54
|
+
|
|
55
|
+
| code | HTTP | 说明 |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| unauthorized | 401 | 未登录/会话或主体过期 |
|
|
58
|
+
| forbidden | 403 | 权限不足 / CSRF 或 Origin 不符 / 确认引用无效 |
|
|
59
|
+
| not_found | 404 | 对象不存在**或不属本商家** |
|
|
60
|
+
| conflict | 409 | 幂等键冲突 / 候选状态不允许 |
|
|
61
|
+
| precondition_changed | 409 | 哈希/版本/有效期变化,旧确认失效 |
|
|
62
|
+
| invalid_input | 400/405/413 | 输入不合法 / 方法不允许 / 请求过大 |
|
|
63
|
+
| rate_limited | 429 | 配额/速率限制 |
|
|
64
|
+
| unavailable | 503 | 服务或真实数据源不可用;结果未知(附 operation_id) |
|
|
65
|
+
| tool_binding_unavailable | 503 | 对话绑定失败(B07 未通过时页面路径不受影响) |
|
|
66
|
+
| update_required | 409 | 客户端与 Runtime major 不兼容 |
|
|
67
|
+
|
|
68
|
+
## 示例
|
|
69
|
+
|
|
70
|
+
正例(审批执行):
|
|
71
|
+
|
|
72
|
+
```http
|
|
73
|
+
POST /merchant/api/approvals/act_example/approve
|
|
74
|
+
Content-Type: application/json
|
|
75
|
+
X-CSRF-Token: <GET /session 取得>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"arguments_hash": "sha256:3f7a…",
|
|
81
|
+
"preconditions_hash": "sha256:9c01…",
|
|
82
|
+
"confirmation_ref": "(POST /confirmations 签发的一次性引用)",
|
|
83
|
+
"idempotency_key": "approve-act_example-2026-09-21-1"
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
→ 200 `OperationReceipt`(`status: "succeeded"`,`resource_ref: "act_example"`)。
|
|
88
|
+
|
|
89
|
+
反例(都必须被拒绝):
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{ "approved": true }
|
|
93
|
+
```
|
|
94
|
+
```json
|
|
95
|
+
{ "arguments_hash": "sha256:…", "preconditions_hash": "sha256:…",
|
|
96
|
+
"confirmation_ref": "self-made", "idempotency_key": "k", "merchant_id": "merchant-002" }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
第一个缺少确认引用与哈希;第二个含未知字段 `merchant_id`(UC10:正文不能改变
|
|
100
|
+
认证主体)。`expected_revision` 未纳入本版审批契约:候选对象尚无持久 revision
|
|
101
|
+
字段,条件更新证明由 `arguments_hash` / `preconditions_hash` 承担(BD §11.2
|
|
102
|
+
允许的等价机制);service 暂停/恢复使用真实的 `expected_service_revision`。
|
|
103
|
+
|
|
104
|
+
## RuntimeManagementDescriptor
|
|
105
|
+
|
|
106
|
+
`runtime-management-descriptor.schema.json` 描述 BD §6.3 的私有只读绑定对象
|
|
107
|
+
(Catalog 控制面 `GET /v1/cloud-enrollments/{id}/management-descriptor` 的响应
|
|
108
|
+
形状,属 Catalog 侧交付)。它**不含凭据**、不能替代服务端认证、不得在公开
|
|
109
|
+
Agent Card 中自动出现。
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-management:1.0:approval-decision",
|
|
4
|
+
"title": "Kiwi 商家管理 ApprovalDecision 1.0",
|
|
5
|
+
"description": "POST /merchant/api/approvals/{id}/approve|reject 请求体(BD 设计 §11.1/§11.2)。actor/merchant 从会话派生,**不在正文里**(UC10);哈希即条件更新证明——与预览不符返回 precondition_changed(409),旧确认不能继续使用(§10.3)。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["arguments_hash", "preconditions_hash", "confirmation_ref", "idempotency_key"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"arguments_hash": { "type": "string", "pattern": "^sha256:[0-9a-f]+$", "description": "来自预览的 arguments_hash。" },
|
|
11
|
+
"preconditions_hash": { "type": "string", "pattern": "^sha256:[0-9a-f]+$" },
|
|
12
|
+
"confirmation_ref": { "type": "string", "minLength": 1, "description": "由可信页面流程(POST /confirmations)签发的一次性确认引用;approved=true、聊天「同意」与自造引用一律无效(§7.3)。" },
|
|
13
|
+
"reason": { "type": "string", "maxLength": 500, "description": "可选原因(reject 常用;写入审计)。" },
|
|
14
|
+
"idempotency_key": { "type": "string", "minLength": 1, "maxLength": 200, "description": "调用方生成的幂等键;重试必须复用原键,不得为同一逻辑操作换新键(§10.2)。" }
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-management:1.0:approval-preview",
|
|
4
|
+
"title": "Kiwi 商家管理 ApprovalPreview 1.0",
|
|
5
|
+
"description": "GET /merchant/api/approvals 与 /approvals/{id} 的条目(BD 设计 §11.1)。**不泄露受限值**:只有可显示摘要与参数/前置状态哈希,绝不含参数原文、底价或成本。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"candidate_id",
|
|
10
|
+
"status",
|
|
11
|
+
"expires_at",
|
|
12
|
+
"summary",
|
|
13
|
+
"arguments_hash",
|
|
14
|
+
"preconditions_hash",
|
|
15
|
+
"related_revision"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"candidate_id": { "type": "string", "minLength": 1 },
|
|
19
|
+
"status": { "type": "string", "minLength": 1, "description": "既有候选状态机的取值(如 pending_approval);本契约不复制该状态机。" },
|
|
20
|
+
"expires_at": { "type": "string", "format": "date-time" },
|
|
21
|
+
"summary": { "type": "string", "description": "脱敏的可显示摘要。" },
|
|
22
|
+
"arguments_hash": { "type": "string", "pattern": "^sha256:[0-9a-f]+$", "description": "服务端参数摘要(approve 的条件更新依据之一)。" },
|
|
23
|
+
"preconditions_hash": { "type": "string", "pattern": "^sha256:[0-9a-f]+$" },
|
|
24
|
+
"related_revision": { "type": "integer", "minimum": 0, "description": "相关对象版本;候选对象尚无持久 revision 时由服务层给出占位值。" }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-management:1.0:connector-delivery-manifest",
|
|
4
|
+
"title": "Kiwi 连接能力内置交付清单 1.0",
|
|
5
|
+
"description": "connector-delivery-manifest.json(BD 设计 §16.1)——本专项**独立**交付清单;通过 parent_release_manifest.sha256 引用云端总发布清单(D1),不向其 Schema 塞未定义字段。签名/证明走 detached 机制:「文件内自带 hash」不构成可信。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"delivery_version",
|
|
11
|
+
"source_commit",
|
|
12
|
+
"runtime_version",
|
|
13
|
+
"runtime_artifact",
|
|
14
|
+
"lockfile_sha256",
|
|
15
|
+
"build_environment_ref",
|
|
16
|
+
"management_api_major",
|
|
17
|
+
"compatible_buddy_versions",
|
|
18
|
+
"enabled_modes",
|
|
19
|
+
"migration_version",
|
|
20
|
+
"rollback_policy_ref",
|
|
21
|
+
"parent_release_manifest"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"schema_version": { "const": "1.0" },
|
|
25
|
+
"delivery_version": { "type": "string", "minLength": 1, "description": "交付版本(与 Kiwi 软件版本、协议版本分开),如 2026-09-21.1。" },
|
|
26
|
+
"source_commit": { "type": "string", "pattern": "^[0-9a-f]{40}$", "description": "完整 git 提交。" },
|
|
27
|
+
"runtime_version": { "type": "string", "minLength": 1, "description": "实际 Kiwi 运行版本(package.json version)。" },
|
|
28
|
+
"runtime_artifact": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": ["status"],
|
|
32
|
+
"properties": {
|
|
33
|
+
"status": { "enum": ["bound", "not_produced"], "description": "bound=已绑定真正上传的制品;not_produced=本轮无制品(不得对外交付)。" },
|
|
34
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
35
|
+
"path": { "type": "string", "description": "制品相对引用(可选;不含凭据)。" }
|
|
36
|
+
},
|
|
37
|
+
"allOf": [
|
|
38
|
+
{
|
|
39
|
+
"if": { "properties": { "status": { "const": "bound" } } },
|
|
40
|
+
"then": { "required": ["status", "sha256"] }
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"lockfile_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "完整依赖解析锁(package-lock.json)摘要。" },
|
|
45
|
+
"build_environment_ref": { "type": "string", "minLength": 1, "description": "工具链/平台证据(node 版本、OS/arch、CI 标识)。" },
|
|
46
|
+
"management_api_major": { "type": "integer", "minimum": 1, "description": "本制品实现的管理 API major。" },
|
|
47
|
+
"compatible_buddy_versions": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": { "type": "string", "minLength": 1 },
|
|
50
|
+
"description": "声明并**测试**支持的 UI/工具客户端范围;空数组 = 未声明(不得声称兼容)。"
|
|
51
|
+
},
|
|
52
|
+
"enabled_modes": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["page", "mcp_readonly"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"page": { "const": true, "description": "同源管理页为必选模式。" },
|
|
58
|
+
"mcp_readonly": { "type": "boolean", "description": "对话只读工具(BD-06):仅 B07 实测与 UC37–40 通过后才可为 true。" }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"migration_version": { "type": "integer", "minimum": 0 },
|
|
62
|
+
"rollback_policy_ref": { "type": "string", "minLength": 1, "description": "可执行的恢复/回滚策略文档(仓库相对路径,必须存在)。" },
|
|
63
|
+
"parent_release_manifest": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"required": ["sha256", "ref"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"sha256": { "type": ["string", "null"], "pattern": "^[0-9a-f]{64}$", "description": "云端总发布清单(D1 release-manifest)摘要;null = 尚未挂接(不得据此声称通过总设计门槛)。" },
|
|
69
|
+
"ref": { "type": "string", "minLength": 1, "description": "总发布清单的引用说明。" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"notes": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": { "type": "string" },
|
|
75
|
+
"description": "可选交付注记(不含秘密)。"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-management:1.0:management-error",
|
|
4
|
+
"title": "Kiwi 商家管理 ManagementError 1.0",
|
|
5
|
+
"description": "管理 API 错误响应体(BD 设计 §11.1/§11.3)。不附秘密与堆栈;跨商家对象按 not_found 统一返回,不透露对方存在。仅适用于 /merchant/api/*;A2A 与 MCP 各自保持自己的协议错误格式。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["code", "message", "retryable", "support_id"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"code": {
|
|
11
|
+
"enum": [
|
|
12
|
+
"unauthorized",
|
|
13
|
+
"forbidden",
|
|
14
|
+
"not_found",
|
|
15
|
+
"conflict",
|
|
16
|
+
"precondition_changed",
|
|
17
|
+
"invalid_input",
|
|
18
|
+
"rate_limited",
|
|
19
|
+
"unavailable",
|
|
20
|
+
"tool_binding_unavailable",
|
|
21
|
+
"update_required"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"message": { "type": "string", "minLength": 1 },
|
|
25
|
+
"retryable": { "type": "boolean" },
|
|
26
|
+
"support_id": { "type": "string", "minLength": 1 },
|
|
27
|
+
"next_action": { "type": "string", "minLength": 1, "description": "可选的下一步指引(中文、面向商家)。" },
|
|
28
|
+
"operation_id": { "type": "string", "minLength": 1, "description": "结果未知时附上,供 GET /operations/{id} 对账。" }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-management:1.0:operation-receipt",
|
|
4
|
+
"title": "Kiwi 商家管理 OperationReceipt 1.0",
|
|
5
|
+
"description": "写命令的持久回执(BD 设计 §11.1)。accepted 只表示可靠受理;succeeded 才表示已提交结果;unknown 必须保留查询/对账路径(GET /merchant/api/operations/{id}),不能当作失败自动重做。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"operation_id",
|
|
10
|
+
"command_type",
|
|
11
|
+
"status",
|
|
12
|
+
"resource_ref",
|
|
13
|
+
"result_revision",
|
|
14
|
+
"created_at",
|
|
15
|
+
"completed_at",
|
|
16
|
+
"support_id"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"operation_id": { "type": "string", "minLength": 1 },
|
|
20
|
+
"command_type": { "type": "string", "minLength": 1, "examples": ["approval.approve", "approval.reject", "service.pause", "service.resume"] },
|
|
21
|
+
"status": { "enum": ["accepted", "running", "succeeded", "failed", "unknown"] },
|
|
22
|
+
"resource_ref": { "type": ["string", "null"], "description": "目标对象引用(候选 id 或 \"service\")。" },
|
|
23
|
+
"result_revision": { "type": ["integer", "null"], "minimum": 0 },
|
|
24
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
25
|
+
"completed_at": { "type": ["string", "null"], "format": "date-time", "description": "终态时间;running/unknown/accepted 为 null。" },
|
|
26
|
+
"support_id": { "type": "string", "minLength": 1, "description": "脱敏诊断引用;不含秘密与堆栈。" }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-management:1.0:runtime-management-descriptor",
|
|
4
|
+
"title": "Kiwi RuntimeManagementDescriptor 1.0",
|
|
5
|
+
"description": "私有只读绑定描述对象(BD 设计 §6.3)。仅供当前商家授权的入口经可信控制面获取;**不含任何凭据**(Token/Cookie/平台密钥/商家私钥/底价都禁止)。它不是认证凭据:打开地址本身不授予管理权限。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"binding_ref",
|
|
10
|
+
"merchant_id",
|
|
11
|
+
"agent_id",
|
|
12
|
+
"runtime_origin",
|
|
13
|
+
"management_base_path",
|
|
14
|
+
"binding_version",
|
|
15
|
+
"deployment_generation",
|
|
16
|
+
"status",
|
|
17
|
+
"expires_at",
|
|
18
|
+
"management_api_major"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"binding_ref": { "type": "string", "minLength": 1, "description": "开通记录/绑定引用。" },
|
|
22
|
+
"merchant_id": { "type": "string", "minLength": 1 },
|
|
23
|
+
"agent_id": { "type": "string", "minLength": 1 },
|
|
24
|
+
"runtime_origin": { "type": "string", "pattern": "^https://", "description": "经验证的 Runtime origin(来自可信控制面,不来自模型输出或自由文本)。" },
|
|
25
|
+
"management_base_path": { "type": "string", "pattern": "^/", "description": "管理页基路径(如 /merchant/)。" },
|
|
26
|
+
"binding_version": { "type": "integer", "minimum": 0 },
|
|
27
|
+
"deployment_generation": { "type": "integer", "minimum": 0 },
|
|
28
|
+
"status": { "type": "string", "minLength": 1 },
|
|
29
|
+
"expires_at": { "type": "string", "format": "date-time" },
|
|
30
|
+
"management_api_major": { "type": "integer", "minimum": 1, "description": "受支持的管理 API major;入口先核对再导航。" },
|
|
31
|
+
"mcp_path": { "type": "string", "pattern": "^/", "description": "可选:本实例 MCP 路径(B07 通过前不返回)。" }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kiwi:merchant-management:1.0:runtime-status",
|
|
4
|
+
"title": "Kiwi 商家管理 RuntimeStatus 1.0",
|
|
5
|
+
"description": "GET /merchant/api/status 响应体(BD 设计 §11.1)。不含秘密;readiness.failed_checks 只含检查名,不含细节。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"api_version",
|
|
10
|
+
"runtime_version",
|
|
11
|
+
"generation",
|
|
12
|
+
"service_state",
|
|
13
|
+
"readiness",
|
|
14
|
+
"capabilities",
|
|
15
|
+
"observed_at"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"api_version": { "type": "string", "pattern": "^[0-9]+$", "description": "管理契约 major(本版恒 \"1\")。" },
|
|
19
|
+
"runtime_version": { "type": "string", "minLength": 1 },
|
|
20
|
+
"generation": { "type": "integer", "minimum": 0, "description": "当前部署代次;旧代次不得继续产生业务写入(§12.3)。" },
|
|
21
|
+
"service_state": { "enum": ["OPERATING", "PAUSED", "WITHDRAWN", "DEGRADED"] },
|
|
22
|
+
"readiness": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["ready", "failed_checks"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"ready": { "type": "boolean" },
|
|
28
|
+
"failed_checks": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "未通过检查的**名字**(稳定码),不含细节与凭据。" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"capabilities": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["management_page", "dialog_tools"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"management_page": { "type": "boolean", "description": "同源管理页(必选能力)。" },
|
|
37
|
+
"dialog_tools": { "type": "boolean", "description": "对话私有只读工具(B07 通过前恒 false,§4.2)。" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"observed_at": { "type": "string", "format": "date-time" }
|
|
41
|
+
}
|
|
42
|
+
}
|