@ixo/openhands-sdk 0.2.0 → 0.4.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/dist/cjs/campaign/campaign.js +3 -2
- package/dist/cjs/campaign/campaign.js.map +1 -1
- package/dist/cjs/campaign/funding.d.ts.map +1 -1
- package/dist/cjs/campaign/funding.js +3 -0
- package/dist/cjs/campaign/funding.js.map +1 -1
- package/dist/cjs/campaign/pool.d.ts.map +1 -1
- package/dist/cjs/campaign/pool.js +2 -1
- package/dist/cjs/campaign/pool.js.map +1 -1
- package/dist/cjs/campaign/spots.d.ts.map +1 -1
- package/dist/cjs/campaign/spots.js +8 -6
- package/dist/cjs/campaign/spots.js.map +1 -1
- package/dist/cjs/chain/ask.d.ts +104 -14
- package/dist/cjs/chain/ask.d.ts.map +1 -1
- package/dist/cjs/chain/ask.js +151 -78
- package/dist/cjs/chain/ask.js.map +1 -1
- package/dist/cjs/chain/askImage.d.ts +19 -0
- package/dist/cjs/chain/askImage.d.ts.map +1 -0
- package/dist/cjs/chain/askImage.js +56 -0
- package/dist/cjs/chain/askImage.js.map +1 -0
- package/dist/cjs/chain/bridge.d.ts +7 -33
- package/dist/cjs/chain/bridge.d.ts.map +1 -1
- package/dist/cjs/chain/bridge.js +10 -25
- package/dist/cjs/chain/bridge.js.map +1 -1
- package/dist/cjs/chain/claimSubmit.d.ts +15 -0
- package/dist/cjs/chain/claimSubmit.d.ts.map +1 -0
- package/dist/cjs/chain/claimSubmit.js +14 -0
- package/dist/cjs/chain/claimSubmit.js.map +1 -0
- package/dist/cjs/chain/delegate.d.ts +52 -7
- package/dist/cjs/chain/delegate.d.ts.map +1 -1
- package/dist/cjs/chain/delegate.js +66 -14
- package/dist/cjs/chain/delegate.js.map +1 -1
- package/dist/cjs/chain/domainIndexer.d.ts +26 -0
- package/dist/cjs/chain/domainIndexer.d.ts.map +1 -0
- package/dist/cjs/chain/domainIndexer.js +51 -0
- package/dist/cjs/chain/domainIndexer.js.map +1 -0
- package/dist/cjs/chain/entityShape.d.ts +233 -0
- package/dist/cjs/chain/entityShape.d.ts.map +1 -0
- package/dist/cjs/chain/entityShape.js +251 -0
- package/dist/cjs/chain/entityShape.js.map +1 -0
- package/dist/cjs/chain/env.d.ts +103 -6
- package/dist/cjs/chain/env.d.ts.map +1 -1
- package/dist/cjs/chain/env.js +188 -14
- package/dist/cjs/chain/env.js.map +1 -1
- package/dist/cjs/chain/guest.d.ts +14 -0
- package/dist/cjs/chain/guest.d.ts.map +1 -1
- package/dist/cjs/chain/guest.js +9 -9
- package/dist/cjs/chain/guest.js.map +1 -1
- package/dist/cjs/chain/money.d.ts +47 -2
- package/dist/cjs/chain/money.d.ts.map +1 -1
- package/dist/cjs/chain/money.js +63 -6
- package/dist/cjs/chain/money.js.map +1 -1
- package/dist/cjs/chain/orgReviewBilling.d.ts +124 -0
- package/dist/cjs/chain/orgReviewBilling.d.ts.map +1 -0
- package/dist/cjs/chain/orgReviewBilling.js +290 -0
- package/dist/cjs/chain/orgReviewBilling.js.map +1 -0
- package/dist/cjs/chain/orgReviewBillingSign.d.ts +63 -0
- package/dist/cjs/chain/orgReviewBillingSign.d.ts.map +1 -0
- package/dist/cjs/chain/orgReviewBillingSign.js +166 -0
- package/dist/cjs/chain/orgReviewBillingSign.js.map +1 -0
- package/dist/cjs/chain/payoutSettings.d.ts +97 -0
- package/dist/cjs/chain/payoutSettings.d.ts.map +1 -0
- package/dist/cjs/chain/payoutSettings.js +123 -0
- package/dist/cjs/chain/payoutSettings.js.map +1 -0
- package/dist/cjs/chain/payoutTerms.d.ts +72 -0
- package/dist/cjs/chain/payoutTerms.d.ts.map +1 -0
- package/dist/cjs/chain/payoutTerms.js +141 -0
- package/dist/cjs/chain/payoutTerms.js.map +1 -0
- package/dist/cjs/chain/query.d.ts +14 -0
- package/dist/cjs/chain/query.d.ts.map +1 -1
- package/dist/cjs/chain/query.js +27 -0
- package/dist/cjs/chain/query.js.map +1 -1
- package/dist/cjs/chain/reviewBilling.d.ts +86 -0
- package/dist/cjs/chain/reviewBilling.d.ts.map +1 -0
- package/dist/cjs/chain/reviewBilling.js +265 -0
- package/dist/cjs/chain/reviewBilling.js.map +1 -0
- package/dist/cjs/chain/store.d.ts +7 -6
- package/dist/cjs/chain/store.d.ts.map +1 -1
- package/dist/cjs/chain/store.js +7 -6
- package/dist/cjs/chain/store.js.map +1 -1
- package/dist/cjs/chain/subscription.d.ts +0 -7
- package/dist/cjs/chain/subscription.d.ts.map +1 -1
- package/dist/cjs/chain/subscription.js +4 -47
- package/dist/cjs/chain/subscription.js.map +1 -1
- package/dist/cjs/chain/takeBack.d.ts +12 -0
- package/dist/cjs/chain/takeBack.d.ts.map +1 -1
- package/dist/cjs/chain/takeBack.js +24 -10
- package/dist/cjs/chain/takeBack.js.map +1 -1
- package/dist/cjs/chain/why.d.ts +44 -0
- package/dist/cjs/chain/why.d.ts.map +1 -0
- package/dist/cjs/chain/why.js +153 -0
- package/dist/cjs/chain/why.js.map +1 -0
- package/dist/cjs/chain/whyMint.d.ts +8 -0
- package/dist/cjs/chain/whyMint.d.ts.map +1 -0
- package/dist/cjs/chain/whyMint.js +53 -0
- package/dist/cjs/chain/whyMint.js.map +1 -0
- package/dist/cjs/chain.d.ts +8 -4
- package/dist/cjs/chain.d.ts.map +1 -1
- package/dist/cjs/chain.js +19 -9
- package/dist/cjs/chain.js.map +1 -1
- package/dist/cjs/config.d.ts +37 -5
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/config.js +9 -2
- package/dist/cjs/config.js.map +1 -1
- package/dist/cjs/data/agent.d.ts.map +1 -1
- package/dist/cjs/data/agent.js +5 -4
- package/dist/cjs/data/agent.js.map +1 -1
- package/dist/cjs/data/askEntity.d.ts +40 -0
- package/dist/cjs/data/askEntity.d.ts.map +1 -0
- package/dist/cjs/data/askEntity.js +48 -0
- package/dist/cjs/data/askEntity.js.map +1 -0
- package/dist/cjs/data/askLinks.d.ts +6 -0
- package/dist/cjs/data/askLinks.d.ts.map +1 -0
- package/dist/cjs/data/askLinks.js +21 -0
- package/dist/cjs/data/askLinks.js.map +1 -0
- package/dist/cjs/data/board/assemble.d.ts.map +1 -1
- package/dist/cjs/data/board/assemble.js +15 -2
- package/dist/cjs/data/board/assemble.js.map +1 -1
- package/dist/cjs/data/board/facts.d.ts +11 -0
- package/dist/cjs/data/board/facts.d.ts.map +1 -1
- package/dist/cjs/data/board/facts.js +16 -0
- package/dist/cjs/data/board/facts.js.map +1 -1
- package/dist/cjs/data/board/read.d.ts.map +1 -1
- package/dist/cjs/data/board/read.js +2 -1
- package/dist/cjs/data/board/read.js.map +1 -1
- package/dist/cjs/data/board/types.d.ts +9 -0
- package/dist/cjs/data/board/types.d.ts.map +1 -1
- package/dist/cjs/data/board/types.js.map +1 -1
- package/dist/cjs/data/docs.d.ts +10 -2
- package/dist/cjs/data/docs.d.ts.map +1 -1
- package/dist/cjs/data/docs.js +43 -3
- package/dist/cjs/data/docs.js.map +1 -1
- package/dist/cjs/data/format.js +1 -1
- package/dist/cjs/data/format.js.map +1 -1
- package/dist/cjs/data/install.d.ts +8 -0
- package/dist/cjs/data/install.d.ts.map +1 -1
- package/dist/cjs/data/install.js +9 -1
- package/dist/cjs/data/install.js.map +1 -1
- package/dist/cjs/data/oracleInfo.d.ts +6 -1
- package/dist/cjs/data/oracleInfo.d.ts.map +1 -1
- package/dist/cjs/data/oracleInfo.js +22 -3
- package/dist/cjs/data/oracleInfo.js.map +1 -1
- package/dist/cjs/data/oracles.d.ts +62 -5
- package/dist/cjs/data/oracles.d.ts.map +1 -1
- package/dist/cjs/data/oracles.js +90 -11
- package/dist/cjs/data/oracles.js.map +1 -1
- package/dist/cjs/data/orgPayouts.d.ts +87 -0
- package/dist/cjs/data/orgPayouts.d.ts.map +1 -0
- package/dist/cjs/data/orgPayouts.js +183 -0
- package/dist/cjs/data/orgPayouts.js.map +1 -0
- package/dist/cjs/data/plans.d.ts +8 -0
- package/dist/cjs/data/plans.d.ts.map +1 -0
- package/dist/cjs/data/plans.js +12 -0
- package/dist/cjs/data/plans.js.map +1 -0
- package/dist/cjs/data/profiles.d.ts +20 -0
- package/dist/cjs/data/profiles.d.ts.map +1 -1
- package/dist/cjs/data/profiles.js +63 -4
- package/dist/cjs/data/profiles.js.map +1 -1
- package/dist/cjs/data/queue.d.ts.map +1 -1
- package/dist/cjs/data/queue.js +3 -2
- package/dist/cjs/data/queue.js.map +1 -1
- package/dist/cjs/data/receipt.d.ts +7 -0
- package/dist/cjs/data/receipt.d.ts.map +1 -1
- package/dist/cjs/data/receipt.js +25 -6
- package/dist/cjs/data/receipt.js.map +1 -1
- package/dist/cjs/data/resources.d.ts +3 -0
- package/dist/cjs/data/resources.d.ts.map +1 -1
- package/dist/cjs/data/resources.js +4 -1
- package/dist/cjs/data/resources.js.map +1 -1
- package/dist/cjs/data/threads.d.ts +14 -0
- package/dist/cjs/data/threads.d.ts.map +1 -1
- package/dist/cjs/data/threads.js +40 -23
- package/dist/cjs/data/threads.js.map +1 -1
- package/dist/cjs/data/trace.d.ts +8 -0
- package/dist/cjs/data/trace.d.ts.map +1 -1
- package/dist/cjs/data/trace.js +1 -1
- package/dist/cjs/data/trace.js.map +1 -1
- package/dist/cjs/data/traceWords.d.ts +4 -1
- package/dist/cjs/data/traceWords.d.ts.map +1 -1
- package/dist/cjs/data/traceWords.js +8 -2
- package/dist/cjs/data/traceWords.js.map +1 -1
- package/dist/cjs/data/why.d.ts +38 -0
- package/dist/cjs/data/why.d.ts.map +1 -0
- package/dist/cjs/data/why.js +86 -0
- package/dist/cjs/data/why.js.map +1 -0
- package/dist/cjs/data/whyReceipt.d.ts +33 -0
- package/dist/cjs/data/whyReceipt.d.ts.map +1 -0
- package/dist/cjs/data/whyReceipt.js +291 -0
- package/dist/cjs/data/whyReceipt.js.map +1 -0
- package/dist/cjs/geo/exifcarry.d.ts +9 -0
- package/dist/cjs/geo/exifcarry.d.ts.map +1 -1
- package/dist/cjs/geo/exifcarry.js +35 -0
- package/dist/cjs/geo/exifcarry.js.map +1 -1
- package/dist/cjs/geo/geohash.d.ts +25 -0
- package/dist/cjs/geo/geohash.d.ts.map +1 -0
- package/dist/cjs/geo/geohash.js +114 -0
- package/dist/cjs/geo/geohash.js.map +1 -0
- package/dist/cjs/geo/provenance.d.ts +41 -0
- package/dist/cjs/geo/provenance.d.ts.map +1 -0
- package/dist/cjs/geo/provenance.js +134 -0
- package/dist/cjs/geo/provenance.js.map +1 -0
- package/dist/cjs/rubric/bridge.d.ts +98 -2
- package/dist/cjs/rubric/bridge.d.ts.map +1 -1
- package/dist/cjs/rubric/bridge.js +132 -15
- package/dist/cjs/rubric/bridge.js.map +1 -1
- package/dist/cjs/rubric/card.d.ts +28 -14
- package/dist/cjs/rubric/card.d.ts.map +1 -1
- package/dist/cjs/rubric/card.js +28 -7
- package/dist/cjs/rubric/card.js.map +1 -1
- package/dist/cjs/rubric/claimForm.d.ts +116 -0
- package/dist/cjs/rubric/claimForm.d.ts.map +1 -1
- package/dist/cjs/rubric/claimForm.js +12 -1
- package/dist/cjs/rubric/claimForm.js.map +1 -1
- package/dist/cjs/rubric/compose.d.ts +5 -0
- package/dist/cjs/rubric/compose.d.ts.map +1 -1
- package/dist/cjs/rubric/compose.js +9 -3
- package/dist/cjs/rubric/compose.js.map +1 -1
- package/dist/cjs/rubric/gateMet.d.ts.map +1 -1
- package/dist/cjs/rubric/gateMet.js +4 -2
- package/dist/cjs/rubric/gateMet.js.map +1 -1
- package/dist/cjs/rubric/leg.d.ts +2 -2
- package/dist/cjs/rubric/leg.d.ts.map +1 -1
- package/dist/cjs/rubric/leg.js +7 -5
- package/dist/cjs/rubric/leg.js.map +1 -1
- package/dist/cjs/rubric/marketPlan.d.ts +182 -0
- package/dist/cjs/rubric/marketPlan.d.ts.map +1 -0
- package/dist/cjs/rubric/marketPlan.js +419 -0
- package/dist/cjs/rubric/marketPlan.js.map +1 -0
- package/dist/cjs/rubric/observation.d.ts +95 -0
- package/dist/cjs/rubric/observation.d.ts.map +1 -0
- package/dist/cjs/rubric/observation.js +88 -0
- package/dist/cjs/rubric/observation.js.map +1 -0
- package/dist/cjs/rubric/pingLink.d.ts +45 -0
- package/dist/cjs/rubric/pingLink.d.ts.map +1 -0
- package/dist/cjs/rubric/pingLink.js +74 -0
- package/dist/cjs/rubric/pingLink.js.map +1 -0
- package/dist/cjs/rubric/pingMatch.d.ts +73 -0
- package/dist/cjs/rubric/pingMatch.d.ts.map +1 -0
- package/dist/cjs/rubric/pingMatch.js +65 -0
- package/dist/cjs/rubric/pingMatch.js.map +1 -0
- package/dist/cjs/rubric/survey.d.ts +65 -0
- package/dist/cjs/rubric/survey.d.ts.map +1 -0
- package/dist/cjs/rubric/survey.js +101 -0
- package/dist/cjs/rubric/survey.js.map +1 -0
- package/dist/cjs/rubric/terms.d.ts +15 -0
- package/dist/cjs/rubric/terms.d.ts.map +1 -1
- package/dist/cjs/rubric/terms.js +14 -1
- package/dist/cjs/rubric/terms.js.map +1 -1
- package/dist/cjs/rubric.d.ts +1 -1
- package/dist/cjs/rubric.d.ts.map +1 -1
- package/dist/cjs/rubric.js +4 -2
- package/dist/cjs/rubric.js.map +1 -1
- package/dist/esm/campaign/campaign.js +4 -3
- package/dist/esm/campaign/campaign.js.map +1 -1
- package/dist/esm/campaign/funding.d.ts.map +1 -1
- package/dist/esm/campaign/funding.js +3 -0
- package/dist/esm/campaign/funding.js.map +1 -1
- package/dist/esm/campaign/pool.d.ts.map +1 -1
- package/dist/esm/campaign/pool.js +2 -1
- package/dist/esm/campaign/pool.js.map +1 -1
- package/dist/esm/campaign/spots.d.ts.map +1 -1
- package/dist/esm/campaign/spots.js +8 -6
- package/dist/esm/campaign/spots.js.map +1 -1
- package/dist/esm/chain/ask.d.ts +104 -14
- package/dist/esm/chain/ask.d.ts.map +1 -1
- package/dist/esm/chain/ask.js +152 -80
- package/dist/esm/chain/ask.js.map +1 -1
- package/dist/esm/chain/askImage.d.ts +19 -0
- package/dist/esm/chain/askImage.d.ts.map +1 -0
- package/dist/esm/chain/askImage.js +50 -0
- package/dist/esm/chain/askImage.js.map +1 -0
- package/dist/esm/chain/bridge.d.ts +7 -33
- package/dist/esm/chain/bridge.d.ts.map +1 -1
- package/dist/esm/chain/bridge.js +10 -24
- package/dist/esm/chain/bridge.js.map +1 -1
- package/dist/esm/chain/claimSubmit.d.ts +15 -0
- package/dist/esm/chain/claimSubmit.d.ts.map +1 -0
- package/dist/esm/chain/claimSubmit.js +10 -0
- package/dist/esm/chain/claimSubmit.js.map +1 -0
- package/dist/esm/chain/delegate.d.ts +52 -7
- package/dist/esm/chain/delegate.d.ts.map +1 -1
- package/dist/esm/chain/delegate.js +64 -13
- package/dist/esm/chain/delegate.js.map +1 -1
- package/dist/esm/chain/domainIndexer.d.ts +26 -0
- package/dist/esm/chain/domainIndexer.d.ts.map +1 -0
- package/dist/esm/chain/domainIndexer.js +48 -0
- package/dist/esm/chain/domainIndexer.js.map +1 -0
- package/dist/esm/chain/entityShape.d.ts +233 -0
- package/dist/esm/chain/entityShape.d.ts.map +1 -0
- package/dist/esm/chain/entityShape.js +231 -0
- package/dist/esm/chain/entityShape.js.map +1 -0
- package/dist/esm/chain/env.d.ts +103 -6
- package/dist/esm/chain/env.d.ts.map +1 -1
- package/dist/esm/chain/env.js +174 -12
- package/dist/esm/chain/env.js.map +1 -1
- package/dist/esm/chain/guest.d.ts +14 -0
- package/dist/esm/chain/guest.d.ts.map +1 -1
- package/dist/esm/chain/guest.js +7 -8
- package/dist/esm/chain/guest.js.map +1 -1
- package/dist/esm/chain/money.d.ts +47 -2
- package/dist/esm/chain/money.d.ts.map +1 -1
- package/dist/esm/chain/money.js +54 -4
- package/dist/esm/chain/money.js.map +1 -1
- package/dist/esm/chain/orgReviewBilling.d.ts +124 -0
- package/dist/esm/chain/orgReviewBilling.d.ts.map +1 -0
- package/dist/esm/chain/orgReviewBilling.js +241 -0
- package/dist/esm/chain/orgReviewBilling.js.map +1 -0
- package/dist/esm/chain/orgReviewBillingSign.d.ts +63 -0
- package/dist/esm/chain/orgReviewBillingSign.d.ts.map +1 -0
- package/dist/esm/chain/orgReviewBillingSign.js +124 -0
- package/dist/esm/chain/orgReviewBillingSign.js.map +1 -0
- package/dist/esm/chain/payoutSettings.d.ts +97 -0
- package/dist/esm/chain/payoutSettings.d.ts.map +1 -0
- package/dist/esm/chain/payoutSettings.js +111 -0
- package/dist/esm/chain/payoutSettings.js.map +1 -0
- package/dist/esm/chain/payoutTerms.d.ts +72 -0
- package/dist/esm/chain/payoutTerms.d.ts.map +1 -0
- package/dist/esm/chain/payoutTerms.js +127 -0
- package/dist/esm/chain/payoutTerms.js.map +1 -0
- package/dist/esm/chain/query.d.ts +14 -0
- package/dist/esm/chain/query.d.ts.map +1 -1
- package/dist/esm/chain/query.js +25 -0
- package/dist/esm/chain/query.js.map +1 -1
- package/dist/esm/chain/reviewBilling.d.ts +86 -0
- package/dist/esm/chain/reviewBilling.d.ts.map +1 -0
- package/dist/esm/chain/reviewBilling.js +215 -0
- package/dist/esm/chain/reviewBilling.js.map +1 -0
- package/dist/esm/chain/store.d.ts +7 -6
- package/dist/esm/chain/store.d.ts.map +1 -1
- package/dist/esm/chain/store.js +7 -6
- package/dist/esm/chain/store.js.map +1 -1
- package/dist/esm/chain/subscription.d.ts +0 -7
- package/dist/esm/chain/subscription.d.ts.map +1 -1
- package/dist/esm/chain/subscription.js +4 -13
- package/dist/esm/chain/subscription.js.map +1 -1
- package/dist/esm/chain/takeBack.d.ts +12 -0
- package/dist/esm/chain/takeBack.d.ts.map +1 -1
- package/dist/esm/chain/takeBack.js +22 -9
- package/dist/esm/chain/takeBack.js.map +1 -1
- package/dist/esm/chain/why.d.ts +44 -0
- package/dist/esm/chain/why.d.ts.map +1 -0
- package/dist/esm/chain/why.js +111 -0
- package/dist/esm/chain/why.js.map +1 -0
- package/dist/esm/chain/whyMint.d.ts +8 -0
- package/dist/esm/chain/whyMint.d.ts.map +1 -0
- package/dist/esm/chain/whyMint.js +17 -0
- package/dist/esm/chain/whyMint.js.map +1 -0
- package/dist/esm/chain.d.ts +8 -4
- package/dist/esm/chain.d.ts.map +1 -1
- package/dist/esm/chain.js +9 -4
- package/dist/esm/chain.js.map +1 -1
- package/dist/esm/config.d.ts +37 -5
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/config.js +9 -3
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/data/agent.d.ts.map +1 -1
- package/dist/esm/data/agent.js +5 -4
- package/dist/esm/data/agent.js.map +1 -1
- package/dist/esm/data/askEntity.d.ts +40 -0
- package/dist/esm/data/askEntity.d.ts.map +1 -0
- package/dist/esm/data/askEntity.js +41 -0
- package/dist/esm/data/askEntity.js.map +1 -0
- package/dist/esm/data/askLinks.d.ts +6 -0
- package/dist/esm/data/askLinks.d.ts.map +1 -0
- package/dist/esm/data/askLinks.js +16 -0
- package/dist/esm/data/askLinks.js.map +1 -0
- package/dist/esm/data/board/assemble.d.ts.map +1 -1
- package/dist/esm/data/board/assemble.js +15 -2
- package/dist/esm/data/board/assemble.js.map +1 -1
- package/dist/esm/data/board/facts.d.ts +11 -0
- package/dist/esm/data/board/facts.d.ts.map +1 -1
- package/dist/esm/data/board/facts.js +15 -0
- package/dist/esm/data/board/facts.js.map +1 -1
- package/dist/esm/data/board/read.d.ts.map +1 -1
- package/dist/esm/data/board/read.js +2 -1
- package/dist/esm/data/board/read.js.map +1 -1
- package/dist/esm/data/board/types.d.ts +9 -0
- package/dist/esm/data/board/types.d.ts.map +1 -1
- package/dist/esm/data/board/types.js.map +1 -1
- package/dist/esm/data/docs.d.ts +10 -2
- package/dist/esm/data/docs.d.ts.map +1 -1
- package/dist/esm/data/docs.js +43 -4
- package/dist/esm/data/docs.js.map +1 -1
- package/dist/esm/data/format.js +1 -1
- package/dist/esm/data/format.js.map +1 -1
- package/dist/esm/data/install.d.ts +8 -0
- package/dist/esm/data/install.d.ts.map +1 -1
- package/dist/esm/data/install.js +8 -0
- package/dist/esm/data/install.js.map +1 -1
- package/dist/esm/data/oracleInfo.d.ts +6 -1
- package/dist/esm/data/oracleInfo.d.ts.map +1 -1
- package/dist/esm/data/oracleInfo.js +22 -3
- package/dist/esm/data/oracleInfo.js.map +1 -1
- package/dist/esm/data/oracles.d.ts +62 -5
- package/dist/esm/data/oracles.d.ts.map +1 -1
- package/dist/esm/data/oracles.js +87 -12
- package/dist/esm/data/oracles.js.map +1 -1
- package/dist/esm/data/orgPayouts.d.ts +87 -0
- package/dist/esm/data/orgPayouts.d.ts.map +1 -0
- package/dist/esm/data/orgPayouts.js +170 -0
- package/dist/esm/data/orgPayouts.js.map +1 -0
- package/dist/esm/data/plans.d.ts +8 -0
- package/dist/esm/data/plans.d.ts.map +1 -0
- package/dist/esm/data/plans.js +8 -0
- package/dist/esm/data/plans.js.map +1 -0
- package/dist/esm/data/profiles.d.ts +20 -0
- package/dist/esm/data/profiles.d.ts.map +1 -1
- package/dist/esm/data/profiles.js +60 -4
- package/dist/esm/data/profiles.js.map +1 -1
- package/dist/esm/data/queue.d.ts.map +1 -1
- package/dist/esm/data/queue.js +3 -2
- package/dist/esm/data/queue.js.map +1 -1
- package/dist/esm/data/receipt.d.ts +7 -0
- package/dist/esm/data/receipt.d.ts.map +1 -1
- package/dist/esm/data/receipt.js +26 -7
- package/dist/esm/data/receipt.js.map +1 -1
- package/dist/esm/data/resources.d.ts +3 -0
- package/dist/esm/data/resources.d.ts.map +1 -1
- package/dist/esm/data/resources.js +2 -0
- package/dist/esm/data/resources.js.map +1 -1
- package/dist/esm/data/threads.d.ts +14 -0
- package/dist/esm/data/threads.d.ts.map +1 -1
- package/dist/esm/data/threads.js +40 -24
- package/dist/esm/data/threads.js.map +1 -1
- package/dist/esm/data/trace.d.ts +8 -0
- package/dist/esm/data/trace.d.ts.map +1 -1
- package/dist/esm/data/trace.js +1 -1
- package/dist/esm/data/trace.js.map +1 -1
- package/dist/esm/data/traceWords.d.ts +4 -1
- package/dist/esm/data/traceWords.d.ts.map +1 -1
- package/dist/esm/data/traceWords.js +8 -2
- package/dist/esm/data/traceWords.js.map +1 -1
- package/dist/esm/data/why.d.ts +38 -0
- package/dist/esm/data/why.d.ts.map +1 -0
- package/dist/esm/data/why.js +78 -0
- package/dist/esm/data/why.js.map +1 -0
- package/dist/esm/data/whyReceipt.d.ts +33 -0
- package/dist/esm/data/whyReceipt.d.ts.map +1 -0
- package/dist/esm/data/whyReceipt.js +284 -0
- package/dist/esm/data/whyReceipt.js.map +1 -0
- package/dist/esm/geo/exifcarry.d.ts +9 -0
- package/dist/esm/geo/exifcarry.d.ts.map +1 -1
- package/dist/esm/geo/exifcarry.js +34 -0
- package/dist/esm/geo/exifcarry.js.map +1 -1
- package/dist/esm/geo/geohash.d.ts +25 -0
- package/dist/esm/geo/geohash.d.ts.map +1 -0
- package/dist/esm/geo/geohash.js +109 -0
- package/dist/esm/geo/geohash.js.map +1 -0
- package/dist/esm/geo/provenance.d.ts +41 -0
- package/dist/esm/geo/provenance.d.ts.map +1 -0
- package/dist/esm/geo/provenance.js +129 -0
- package/dist/esm/geo/provenance.js.map +1 -0
- package/dist/esm/rubric/bridge.d.ts +98 -2
- package/dist/esm/rubric/bridge.d.ts.map +1 -1
- package/dist/esm/rubric/bridge.js +130 -14
- package/dist/esm/rubric/bridge.js.map +1 -1
- package/dist/esm/rubric/card.d.ts +28 -14
- package/dist/esm/rubric/card.d.ts.map +1 -1
- package/dist/esm/rubric/card.js +24 -5
- package/dist/esm/rubric/card.js.map +1 -1
- package/dist/esm/rubric/claimForm.d.ts +116 -0
- package/dist/esm/rubric/claimForm.d.ts.map +1 -1
- package/dist/esm/rubric/claimForm.js +11 -0
- package/dist/esm/rubric/claimForm.js.map +1 -1
- package/dist/esm/rubric/compose.d.ts +5 -0
- package/dist/esm/rubric/compose.d.ts.map +1 -1
- package/dist/esm/rubric/compose.js +7 -2
- package/dist/esm/rubric/compose.js.map +1 -1
- package/dist/esm/rubric/gateMet.d.ts.map +1 -1
- package/dist/esm/rubric/gateMet.js +4 -2
- package/dist/esm/rubric/gateMet.js.map +1 -1
- package/dist/esm/rubric/leg.d.ts +2 -2
- package/dist/esm/rubric/leg.d.ts.map +1 -1
- package/dist/esm/rubric/leg.js +7 -5
- package/dist/esm/rubric/leg.js.map +1 -1
- package/dist/esm/rubric/marketPlan.d.ts +182 -0
- package/dist/esm/rubric/marketPlan.d.ts.map +1 -0
- package/dist/esm/rubric/marketPlan.js +403 -0
- package/dist/esm/rubric/marketPlan.js.map +1 -0
- package/dist/esm/rubric/observation.d.ts +95 -0
- package/dist/esm/rubric/observation.d.ts.map +1 -0
- package/dist/esm/rubric/observation.js +82 -0
- package/dist/esm/rubric/observation.js.map +1 -0
- package/dist/esm/rubric/pingLink.d.ts +45 -0
- package/dist/esm/rubric/pingLink.d.ts.map +1 -0
- package/dist/esm/rubric/pingLink.js +69 -0
- package/dist/esm/rubric/pingLink.js.map +1 -0
- package/dist/esm/rubric/pingMatch.d.ts +73 -0
- package/dist/esm/rubric/pingMatch.d.ts.map +1 -0
- package/dist/esm/rubric/pingMatch.js +60 -0
- package/dist/esm/rubric/pingMatch.js.map +1 -0
- package/dist/esm/rubric/survey.d.ts +65 -0
- package/dist/esm/rubric/survey.d.ts.map +1 -0
- package/dist/esm/rubric/survey.js +94 -0
- package/dist/esm/rubric/survey.js.map +1 -0
- package/dist/esm/rubric/terms.d.ts +15 -0
- package/dist/esm/rubric/terms.d.ts.map +1 -1
- package/dist/esm/rubric/terms.js +14 -2
- package/dist/esm/rubric/terms.js.map +1 -1
- package/dist/esm/rubric.d.ts +1 -1
- package/dist/esm/rubric.d.ts.map +1 -1
- package/dist/esm/rubric.js +1 -1
- package/dist/esm/rubric.js.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What a picture says about where it came from (an AI label: IPTC DigitalSourceType in its XMP; C2PA content
|
|
4
|
+
* credentials), and whether it is a photo the reviewer can read at all (JPEG or PNG, within its pixel cap).
|
|
5
|
+
*
|
|
6
|
+
* The answer page used to shrink a photograph by redrawing it on a canvas, and a generator's PNG, labelled
|
|
7
|
+
* `trainedAlgorithmicMedia` in its XMP and signed in a C2PA manifest, lost both: the reviewer's not-generated
|
|
8
|
+
* screen then passed it (Red Harbor demo, 2026-10-16). Evidence photos are now sent as they are (camera.ts). This
|
|
9
|
+
* reads what the original declares, for the page's early warning on a photo marked AI-generated (`markedAi`) and
|
|
10
|
+
* the provenance the evidence records. The oracle still decides.
|
|
11
|
+
*
|
|
12
|
+
* Pure byte reading, no decoder. PNG (iTXt XMP, caBX), JPEG (APP1 XMP, APP11 JUMBF) and WebP (`XMP `, `C2PA`).
|
|
13
|
+
* shortcut: a compressed PNG iTXt XMP is not inflated (generators write it plain); upgrade with DecompressionStream if one turns up.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PNG_MAX_PIXELS = exports.EVIDENCE_MAX_BYTES = void 0;
|
|
17
|
+
exports.photoRefusal = photoRefusal;
|
|
18
|
+
exports.scanProvenance = scanProvenance;
|
|
19
|
+
/** The IPTC digital source types that say a model made or composited the picture. */
|
|
20
|
+
const AI_SOURCE = /\b(trainedAlgorithmicMedia|compositeWithTrainedAlgorithmicMedia|compositeSynthetic|algorithmicMedia)\b/;
|
|
21
|
+
/** The ones the answer page refuses on sight (owner, 2026-10-16). */
|
|
22
|
+
const MARKED_AI = /\b(trainedAlgorithmicMedia|compositeSynthetic|algorithmicMedia)\b/;
|
|
23
|
+
const XMP_JPEG_HEADER = "http://ns.adobe.com/xap/1.0/\0";
|
|
24
|
+
const XMP_PNG_KEYWORD = "XML:com.adobe.xmp";
|
|
25
|
+
const latin1 = (bytes) => {
|
|
26
|
+
let out = "";
|
|
27
|
+
for (let at = 0; at < bytes.length; at += 8192)
|
|
28
|
+
out += String.fromCharCode(...bytes.subarray(at, at + 8192));
|
|
29
|
+
return out;
|
|
30
|
+
};
|
|
31
|
+
const startsWith = (bytes, at, text) => {
|
|
32
|
+
if (at + text.length > bytes.length)
|
|
33
|
+
return false;
|
|
34
|
+
for (let index = 0; index < text.length; index += 1)
|
|
35
|
+
if (bytes[at + index] !== text.charCodeAt(index))
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
};
|
|
39
|
+
const u32 = (bytes, at) => ((bytes[at] << 24) >>> 0) + (bytes[at + 1] << 16) + (bytes[at + 2] << 8) + bytes[at + 3];
|
|
40
|
+
const u32le = (bytes, at) => (bytes[at] | (bytes[at + 1] << 8) | (bytes[at + 2] << 16)) + bytes[at + 3] * 0x1000000;
|
|
41
|
+
const isPng = (bytes) => bytes.length > 8 && bytes[0] === 0x89 && startsWith(bytes, 1, "PNG");
|
|
42
|
+
const isJpeg = (bytes) => bytes.length > 4 && bytes[0] === 0xff && bytes[1] === 0xd8;
|
|
43
|
+
/** The oracle's limits on an evidence photo (S3, 2026-10-16): its AI judge skips anything over 10 MB, and it reads at most 40 MP of a PNG. */
|
|
44
|
+
exports.EVIDENCE_MAX_BYTES = 10_000_000;
|
|
45
|
+
exports.PNG_MAX_PIXELS = 40_000_000;
|
|
46
|
+
/**
|
|
47
|
+
* Why the reviewer could not read this photo, in plain words, or null. By its bytes, never its name: JPEG or PNG
|
|
48
|
+
* only, at most `maxBytes` (never above EVIDENCE_MAX_BYTES), and a PNG at most 40 MP (read from its IHDR).
|
|
49
|
+
*/
|
|
50
|
+
function photoRefusal(bytes, maxBytes = exports.EVIDENCE_MAX_BYTES) {
|
|
51
|
+
if (!isJpeg(bytes) && !isPng(bytes))
|
|
52
|
+
return "Please send a JPEG or PNG photo.";
|
|
53
|
+
const limit = Math.min(maxBytes, exports.EVIDENCE_MAX_BYTES);
|
|
54
|
+
const mb = (count) => (count / 1_000_000).toFixed(1).replace(/\.0$/, "");
|
|
55
|
+
if (bytes.length > limit)
|
|
56
|
+
return `This photo is too big to send (${mb(bytes.length)} MB; the limit is ${mb(limit)} MB). Take it again at a lower resolution, or pick a smaller photo.`;
|
|
57
|
+
if (isPng(bytes) && startsWith(bytes, 12, "IHDR")) {
|
|
58
|
+
const pixels = u32(bytes, 16) * u32(bytes, 20);
|
|
59
|
+
if (pixels > exports.PNG_MAX_PIXELS)
|
|
60
|
+
return `This photo has too many pixels to send (${Math.round(pixels / 1_000_000)} megapixels; the limit is 40). Take it again at a lower resolution, or pick a smaller photo.`;
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
/** What a picture's own bytes say about its source. Never throws: a file it cannot read says nothing. */
|
|
65
|
+
function scanProvenance(bytes) {
|
|
66
|
+
let xmp = null;
|
|
67
|
+
const c2pa = [];
|
|
68
|
+
try {
|
|
69
|
+
if (isPng(bytes)) {
|
|
70
|
+
for (let at = 8; at + 12 <= bytes.length;) {
|
|
71
|
+
const length = u32(bytes, at);
|
|
72
|
+
const data = bytes.subarray(at + 8, at + 8 + length);
|
|
73
|
+
if (startsWith(bytes, at + 4, "iTXt") && startsWith(data, 0, `${XMP_PNG_KEYWORD}\0`)) {
|
|
74
|
+
let cursor = XMP_PNG_KEYWORD.length + 1;
|
|
75
|
+
const compressed = data[cursor] === 1;
|
|
76
|
+
cursor += 2;
|
|
77
|
+
/* The language tag, then the translated keyword: both NUL-terminated. */
|
|
78
|
+
for (let nul = 0; nul < 2; nul += 1)
|
|
79
|
+
cursor = data.indexOf(0, cursor) + 1;
|
|
80
|
+
if (!compressed && cursor > 0)
|
|
81
|
+
xmp = data.subarray(cursor);
|
|
82
|
+
}
|
|
83
|
+
else if (startsWith(bytes, at + 4, "caBX"))
|
|
84
|
+
c2pa.push(data);
|
|
85
|
+
else if (startsWith(bytes, at + 4, "IEND"))
|
|
86
|
+
break;
|
|
87
|
+
at += 12 + length;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else if (isJpeg(bytes)) {
|
|
91
|
+
for (let at = 2; at + 4 <= bytes.length && bytes[at] === 0xff;) {
|
|
92
|
+
const marker = bytes[at + 1];
|
|
93
|
+
/* Start of scan: the pixels begin and the metadata is behind us. */
|
|
94
|
+
if (marker === 0xda)
|
|
95
|
+
break;
|
|
96
|
+
const length = (bytes[at + 2] << 8) | bytes[at + 3];
|
|
97
|
+
if (length < 2)
|
|
98
|
+
break;
|
|
99
|
+
if (marker === 0xe1 && startsWith(bytes, at + 4, XMP_JPEG_HEADER))
|
|
100
|
+
xmp = bytes.subarray(at + 4 + XMP_JPEG_HEADER.length, at + 2 + length);
|
|
101
|
+
/* APP11, JPEG XT "JP": a JUMBF box, which C2PA uses. */
|
|
102
|
+
if (marker === 0xeb && startsWith(bytes, at + 4, "JP"))
|
|
103
|
+
c2pa.push(bytes.subarray(at, at + 2 + length));
|
|
104
|
+
at += 2 + length;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else if (startsWith(bytes, 0, "RIFF") && startsWith(bytes, 8, "WEBP")) {
|
|
108
|
+
for (let at = 12; at + 8 <= bytes.length;) {
|
|
109
|
+
const size = u32le(bytes, at + 4);
|
|
110
|
+
const data = bytes.subarray(at + 8, at + 8 + size);
|
|
111
|
+
if (startsWith(bytes, at, "XMP "))
|
|
112
|
+
xmp = data;
|
|
113
|
+
if (startsWith(bytes, at, "C2PA"))
|
|
114
|
+
c2pa.push(data);
|
|
115
|
+
at += 8 + size + (size % 2);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
/* A truncated or odd file: whatever was read so far stands. */
|
|
121
|
+
}
|
|
122
|
+
const xmpText = xmp ? latin1(xmp) : "";
|
|
123
|
+
const labelledXmp = /DigitalSourceType/.test(xmpText);
|
|
124
|
+
const credentials = c2pa.map(latin1).filter((text) => text.includes("c2pa"));
|
|
125
|
+
const labelled = labelledXmp ? AI_SOURCE.exec(xmpText) : null;
|
|
126
|
+
const signed = credentials.map((text) => AI_SOURCE.exec(text)).find(Boolean) ?? null;
|
|
127
|
+
const sources = [...(labelledXmp ? ["xmp"] : []), ...(credentials.length ? ["c2pa"] : [])];
|
|
128
|
+
const type = (labelled ?? signed)?.[1];
|
|
129
|
+
return {
|
|
130
|
+
provenance: sources.length ? { aiLabel: Boolean(labelled || signed), sources, ...(type ? { digitalSourceType: type } : {}) } : null,
|
|
131
|
+
markedAi: (labelledXmp && MARKED_AI.test(xmpText)) || credentials.some((text) => MARKED_AI.test(text))
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=provenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.js","sourceRoot":"","sources":["../../../src/geo/provenance.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAmDH,oCAUC;AAGD,wCAuDC;AAlGD,qFAAqF;AACrF,MAAM,SAAS,GAAG,wGAAwG,CAAC;AAC3H,qEAAqE;AACrE,MAAM,SAAS,GAAG,mEAAmE,CAAC;AACtF,MAAM,eAAe,GAAG,gCAAgC,CAAC;AACzD,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAE5C,MAAM,MAAM,GAAG,CAAC,KAAiB,EAAU,EAAE;IAC3C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,IAAI;QAAE,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7G,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AACF,MAAM,UAAU,GAAG,CAAC,KAAiB,EAAE,EAAU,EAAE,IAAY,EAAW,EAAE;IAC1E,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAClD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAA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C,EAAE,CAAC,CAAC,CAAC;IACpI,MAAM,IAAI,GAAG,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;QACnI,QAAQ,EAAE,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACvG,CAAC;AACJ,CAAC"}
|
|
@@ -53,6 +53,23 @@ export interface BridgeOptions {
|
|
|
53
53
|
meters: number;
|
|
54
54
|
days: number;
|
|
55
55
|
} | null;
|
|
56
|
+
/**
|
|
57
|
+
* W7a: a CAMPAIGN rubric — one document for every ask in a campaign, so it
|
|
58
|
+
* carries no per-ask literal. The `within-radius` gate is emitted as the
|
|
59
|
+
* `withinAskRadius` source with only the claim's fields; the oracle resolves
|
|
60
|
+
* the pin itself from the claim's collection → its deed → `#done`. The judge
|
|
61
|
+
* is shown `task` below (the campaign's wording) instead of the ask's.
|
|
62
|
+
*/
|
|
63
|
+
pinFromAsk?: boolean;
|
|
64
|
+
/** The task the judges are shown, in place of the ask's own; the campaign's wording under `pinFromAsk`. */
|
|
65
|
+
task?: string;
|
|
66
|
+
/**
|
|
67
|
+
* A person stands behind the ask's reviews (an organisation's ask, its reviewers in the Console): then a photo
|
|
68
|
+
* with no camera data and no live capture is held for that person (the `cameraPhoto`/`liveCapture` gate) rather
|
|
69
|
+
* than ruled on by the screens alone. Never on a campaign rubric or an ask from a key with nobody behind it: a
|
|
70
|
+
* `review` there is held for ever (`ON_ERROR`).
|
|
71
|
+
*/
|
|
72
|
+
personReviews?: boolean;
|
|
56
73
|
}
|
|
57
74
|
/**
|
|
58
75
|
* What every source and AI check says when it could not answer at all.
|
|
@@ -177,8 +194,31 @@ export interface EngineRubric {
|
|
|
177
194
|
aiChecks?: EngineAiCheck[];
|
|
178
195
|
unique?: EngineUnique;
|
|
179
196
|
gates: EngineGate[];
|
|
197
|
+
review?: EngineReview;
|
|
180
198
|
};
|
|
181
199
|
}
|
|
200
|
+
/** A person's look, for a gate that fails to `review`: without a claim-level task the engine turns review into reject (S3). */
|
|
201
|
+
export interface EngineReview {
|
|
202
|
+
"@type": "HumanReview";
|
|
203
|
+
assignTo: {
|
|
204
|
+
role: "reviewer";
|
|
205
|
+
};
|
|
206
|
+
slaHours: number;
|
|
207
|
+
onTimeout: "reject";
|
|
208
|
+
tasks: {
|
|
209
|
+
"@type": "ReviewTask";
|
|
210
|
+
id: string;
|
|
211
|
+
prompt: string;
|
|
212
|
+
show: string[];
|
|
213
|
+
answer: {
|
|
214
|
+
type: "boolean";
|
|
215
|
+
};
|
|
216
|
+
map: {
|
|
217
|
+
true: "approve";
|
|
218
|
+
false: "reject";
|
|
219
|
+
};
|
|
220
|
+
}[];
|
|
221
|
+
}
|
|
182
222
|
/**
|
|
183
223
|
* The names the oracle answers to, per gate. Exact: the oracle registers a
|
|
184
224
|
* handler per name (and per suffix, 2..5, for a rule that repeats within one
|
|
@@ -198,6 +238,8 @@ export declare const SOURCE_NAMES: {
|
|
|
198
238
|
};
|
|
199
239
|
/** The cool-off source, emitted from the options rather than from a gate. */
|
|
200
240
|
export declare const COOLDOWN_SOURCE = "cooldown";
|
|
241
|
+
/** The pin-free radius source of a campaign rubric (W7a): the oracle reads the ask's point and radius from its deed's `#done`. */
|
|
242
|
+
export declare const WITHIN_ASK_RADIUS_SOURCE = "withinAskRadius";
|
|
201
243
|
/** The marker source on a site ask, so the claim's `kind` is frozen on the receipt for the oracle's act policy. */
|
|
202
244
|
export declare const SITE_SOURCE = "openhandsSite";
|
|
203
245
|
/** The AI check, per judge criterion: `judge`, then `judge2..`. */
|
|
@@ -251,6 +293,13 @@ export declare const PHOTO_CHECKS: {
|
|
|
251
293
|
readonly notMarkedGenerated: "notMarkedGenerated";
|
|
252
294
|
readonly notElsewhere: "notElsewhere";
|
|
253
295
|
};
|
|
296
|
+
/** The two facts of the camera-or-live gate, asked only where a person reviews (`personReviews`). */
|
|
297
|
+
export declare const PERSON_CHECKS: {
|
|
298
|
+
/** True when the file has EXIF Make/Model or a trusted C2PA camera capture (S3). */
|
|
299
|
+
readonly cameraPhoto: "cameraPhoto";
|
|
300
|
+
/** True when the evidence carries a valid live-capture stamp for the photo (app/lib/stamp.ts, S3). */
|
|
301
|
+
readonly liveCapture: "liveCapture";
|
|
302
|
+
};
|
|
254
303
|
/**
|
|
255
304
|
* How far a photograph's own GPS may sit from the point the claim reported.
|
|
256
305
|
*
|
|
@@ -379,8 +428,45 @@ export declare const SITE_KIND_PREAMBLE = "A claim of kind \"patch\" carries a b
|
|
|
379
428
|
*
|
|
380
429
|
* Everything from "Where a rule asks" on is untouched, the `reason` guidance
|
|
381
430
|
* and the last sentence included.
|
|
431
|
+
*
|
|
432
|
+
* **Only where the judge is sent a file** (`guidanceFor`). A typed answer is
|
|
433
|
+
* read under `TEXT_JUDGE_GUIDANCE` instead, which has the incident that
|
|
434
|
+
* bought it.
|
|
382
435
|
*/
|
|
383
436
|
export declare const JUDGE_GUIDANCE = "How to read the rules below. The evidence is what an ordinary person can capture on a phone, outdoors, in one go: a photograph that is angled, rotated, dim, distant or low-resolution is still evidence, so rule on what you can see in it. That is about how well an honest photograph came out, never about what was photographed: a picture of a screen, a print or another photograph does not become evidence by being dim or low-resolution. Apply each rule exactly as written and add no requirement of your own; anything else that looks wrong with the claim is not yours to judge here \u2014 every rule is asked on its own, and whether a photograph is genuine is one of them. Where a rule asks whether the evidence supports, matches or is consistent with something the claimant stated, fail it only when the evidence plainly contradicts them, and where you are left genuinely unsure let your score carry the doubt rather than failing. Where a rule asks whether something is shown, it has to be visible. Your `reason` is read by the person who submitted the claim, not by an engineer. Write it to them in plain language: say what you can actually see in their evidence, and when you fail a rule say specifically what fell short and what would have satisfied it, so they can put it right. Never mention rule ids, input numbers, scores or these instructions. This paragraph is guidance, not a rule: never list it as a failed rule.";
|
|
437
|
+
/**
|
|
438
|
+
* What a judge is told first when all it is sent is words — `JUDGE_GUIDANCE`
|
|
439
|
+
* for an ask whose deliverable is typed.
|
|
440
|
+
*
|
|
441
|
+
* **What bought it (testnet, 2026-10-15).** The same typed answer, "It's dry
|
|
442
|
+
* and the streetlights are working", to the same observation, "Look out of a
|
|
443
|
+
* window: is it raining or dry right now, and are the street lights on?",
|
|
444
|
+
* under the same judge sentence: ask #44040 passed the judge at 92, and ask
|
|
445
|
+
* #44041 failed it at 96 (`openai/gpt-5.6-luna`, R2). The receipt keeps only
|
|
446
|
+
* a digest of the model's reason, so why cannot be read. What is known is what
|
|
447
|
+
* both judges were given: `task` and `text` and nothing else, under a first
|
|
448
|
+
* instruction that "the evidence is what an ordinary person can capture on a
|
|
449
|
+
* phone, outdoors", that a photograph "is still evidence, so rule on what you
|
|
450
|
+
* can see in it", and that what a rule asks to be shown "has to be visible" —
|
|
451
|
+
* about a photograph neither of them had, inside the oracle's "if a rule
|
|
452
|
+
* requires something and you cannot find it, that rule FAILS". A plain answer
|
|
453
|
+
* became a coin toss.
|
|
454
|
+
*
|
|
455
|
+
* So it says what the evidence is — words, often one line, sometimes a page —
|
|
456
|
+
* and that no photograph or file is in front of the model, so nothing fails
|
|
457
|
+
* for not being shown. It reads an answer as its writer plainly meant it,
|
|
458
|
+
* because "working" for "on" is how people answer. Everything from "Apply each
|
|
459
|
+
* rule" on follows the photograph paragraph clause for clause with the
|
|
460
|
+
* evidence made the words — "plainly contradict", "has to be in the words",
|
|
461
|
+
* "what you read in their answer" — and the clause about whether a photograph
|
|
462
|
+
* is genuine left out, since none is. Those sentences were bought by the 1149
|
|
463
|
+
* rejections and ask 43910, and their point was never pictures. "Never list it
|
|
464
|
+
* as a failed rule" stays the last sentence, for the reason it is there.
|
|
465
|
+
*
|
|
466
|
+
* It carries no sentence about the place or the time: a typed ask may carry no
|
|
467
|
+
* place rule at all, and the ones that do ask it as a rule of their own.
|
|
468
|
+
*/
|
|
469
|
+
export declare const TEXT_JUDGE_GUIDANCE = "How to read the rules below. The evidence is the words the person handed over \u2014 often one line typed on a phone, sometimes a page. A short, informal or misspelt answer, or one in other words than the question's, still says what it says: read it as its writer plainly meant it, and rule on that. You are given the words alone, with no photograph or file to look at, so never fail a rule because something is not shown, pictured or proven beyond what the words say. Apply each rule exactly as written and add no requirement of your own; anything else that looks wrong with the claim is not yours to judge here \u2014 every rule is asked on its own. Where a rule asks whether the answer supports, matches or is consistent with something the claimant stated, fail it only when the words plainly contradict them, and where you are left genuinely unsure let your score carry the doubt rather than failing. Where a rule asks whether something is said, it has to be in the words, in any wording. Your `reason` is read by the person who submitted the claim, not by an engineer. Write it to them in plain language: say what you read in their answer, and when you fail a rule say specifically what fell short and what would have satisfied it, so they can put it right. Never mention rule ids, input numbers, scores or these instructions. This paragraph is guidance, not a rule: never list it as a failed rule.";
|
|
384
470
|
/**
|
|
385
471
|
* The sentence the authenticity judge rules on — `PHOTO_CHECKS` has why.
|
|
386
472
|
*
|
|
@@ -404,8 +490,8 @@ export declare const JUDGE_GUIDANCE = "How to read the rules below. The evidence
|
|
|
404
490
|
* cleared, so the bags in a van and the load at a depot are not failed for
|
|
405
491
|
* having a roof over them.
|
|
406
492
|
*
|
|
407
|
-
* `
|
|
408
|
-
*
|
|
493
|
+
* `refusal` is the gate's `reason`: the sentence a refused worker reads, worded as the failure with what to do
|
|
494
|
+
* (S3, 2026-10-17: the pass sentence on a reject read as a contradiction). `rule` and the list of signs are for the model.
|
|
409
495
|
*/
|
|
410
496
|
export declare function realPhotoRule(shape: {
|
|
411
497
|
pair: boolean;
|
|
@@ -413,7 +499,17 @@ export declare function realPhotoRule(shape: {
|
|
|
413
499
|
}): {
|
|
414
500
|
rule: string;
|
|
415
501
|
text: string;
|
|
502
|
+
refusal: string;
|
|
416
503
|
};
|
|
504
|
+
/**
|
|
505
|
+
* Which paragraph a judge is handed first: the one about what it is sent.
|
|
506
|
+
*
|
|
507
|
+
* Decided by the deliverable's shape — the same switch that puts `$photo` in
|
|
508
|
+
* the judge's `send` — and never by reading the ask: a question that mentions
|
|
509
|
+
* a photograph is still answered in words. A `file` keeps the photograph
|
|
510
|
+
* paragraph, because its judge is sent the file.
|
|
511
|
+
*/
|
|
512
|
+
export declare const guidanceFor: (type: AskTerms["deliverable"]["type"]) => string;
|
|
417
513
|
/**
|
|
418
514
|
* Terms → the engine's rubric.
|
|
419
515
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/rubric/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,QAAQ,EAAkB,KAAK,SAAS,EAAa,MAAM,YAAY,CAAC;AAE3H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,yFAAyF;AACzF,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/rubric/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,QAAQ,EAAkB,KAAK,SAAS,EAAa,MAAM,YAAY,CAAC;AAE3H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,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AA;CAAE,CAe1H;AA6CD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,QAAQ,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,KAAG,MAAuE,CAAC;AA0S5I;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAE,aAAkB,GAAG,WAAW,CAoY1H"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JUDGE_GUIDANCE = exports.SITE_KIND_PREAMBLE = exports.JUDGE_SEND_KEYS = exports.SEND_KEYS = exports.UNIQUE_RULE_ID = exports.NAME_CEILING = exports.NOT_ELSEWHERE_FLOOR_METERS = exports.PHOTO_CHECKS = exports.JUDGE_NAME = exports.SITE_SOURCE = exports.COOLDOWN_SOURCE = exports.SOURCE_NAMES = exports.ORACLE_HOST = exports.DEFAULT_COOLDOWN = exports.ON_ERROR = void 0;
|
|
3
|
+
exports.guidanceFor = exports.TEXT_JUDGE_GUIDANCE = exports.JUDGE_GUIDANCE = exports.SITE_KIND_PREAMBLE = exports.JUDGE_SEND_KEYS = exports.SEND_KEYS = exports.UNIQUE_RULE_ID = exports.NAME_CEILING = exports.NOT_ELSEWHERE_FLOOR_METERS = exports.PERSON_CHECKS = exports.PHOTO_CHECKS = exports.JUDGE_NAME = exports.SITE_SOURCE = exports.WITHIN_ASK_RADIUS_SOURCE = exports.COOLDOWN_SOURCE = exports.SOURCE_NAMES = exports.ORACLE_HOST = exports.DEFAULT_COOLDOWN = exports.ON_ERROR = void 0;
|
|
4
4
|
exports.rubricDocument = rubricDocument;
|
|
5
5
|
exports.realPhotoRule = realPhotoRule;
|
|
6
6
|
exports.toEngineRubric = toEngineRubric;
|
|
@@ -69,6 +69,8 @@ exports.SOURCE_NAMES = {
|
|
|
69
69
|
};
|
|
70
70
|
/** The cool-off source, emitted from the options rather than from a gate. */
|
|
71
71
|
exports.COOLDOWN_SOURCE = "cooldown";
|
|
72
|
+
/** The pin-free radius source of a campaign rubric (W7a): the oracle reads the ask's point and radius from its deed's `#done`. */
|
|
73
|
+
exports.WITHIN_ASK_RADIUS_SOURCE = "withinAskRadius";
|
|
72
74
|
/** The marker source on a site ask, so the claim's `kind` is frozen on the receipt for the oracle's act policy. */
|
|
73
75
|
exports.SITE_SOURCE = "openhandsSite";
|
|
74
76
|
/** The AI check, per judge criterion: `judge`, then `judge2..`. */
|
|
@@ -122,6 +124,13 @@ exports.PHOTO_CHECKS = {
|
|
|
122
124
|
notMarkedGenerated: "notMarkedGenerated",
|
|
123
125
|
notElsewhere: "notElsewhere"
|
|
124
126
|
};
|
|
127
|
+
/** The two facts of the camera-or-live gate, asked only where a person reviews (`personReviews`). */
|
|
128
|
+
exports.PERSON_CHECKS = {
|
|
129
|
+
/** True when the file has EXIF Make/Model or a trusted C2PA camera capture (S3). */
|
|
130
|
+
cameraPhoto: "cameraPhoto",
|
|
131
|
+
/** True when the evidence carries a valid live-capture stamp for the photo (app/lib/stamp.ts, S3). */
|
|
132
|
+
liveCapture: "liveCapture"
|
|
133
|
+
};
|
|
125
134
|
/**
|
|
126
135
|
* How far a photograph's own GPS may sit from the point the claim reported.
|
|
127
136
|
*
|
|
@@ -162,6 +171,7 @@ exports.UNIQUE_RULE_ID = "OH-DUP-1";
|
|
|
162
171
|
*/
|
|
163
172
|
exports.SEND_KEYS = {
|
|
164
173
|
withinRadius: ["lat", "lon", "photo", "centerLat", "centerLon", "meters"],
|
|
174
|
+
withinAskRadius: ["lat", "lon", "photo"],
|
|
165
175
|
located: ["lat", "lon", "photo"],
|
|
166
176
|
beforeAfter: ["before", "after", "meters"],
|
|
167
177
|
daylight: ["text", "at", "fallbackAt", "lat", "lon"],
|
|
@@ -174,6 +184,8 @@ exports.SEND_KEYS = {
|
|
|
174
184
|
openhandsSite: ["kind", "lat", "lon"],
|
|
175
185
|
notElsewhere: ["lat", "lon", "photo", "meters"],
|
|
176
186
|
notMarkedGenerated: ["photo"],
|
|
187
|
+
cameraPhoto: ["photo"],
|
|
188
|
+
liveCapture: ["photo"],
|
|
177
189
|
judge: ["task", "text", "photo"]
|
|
178
190
|
};
|
|
179
191
|
/**
|
|
@@ -271,8 +283,45 @@ exports.SITE_KIND_PREAMBLE = 'A claim of kind "patch" carries a before photograp
|
|
|
271
283
|
*
|
|
272
284
|
* Everything from "Where a rule asks" on is untouched, the `reason` guidance
|
|
273
285
|
* and the last sentence included.
|
|
286
|
+
*
|
|
287
|
+
* **Only where the judge is sent a file** (`guidanceFor`). A typed answer is
|
|
288
|
+
* read under `TEXT_JUDGE_GUIDANCE` instead, which has the incident that
|
|
289
|
+
* bought it.
|
|
274
290
|
*/
|
|
275
291
|
exports.JUDGE_GUIDANCE = "How to read the rules below. The evidence is what an ordinary person can capture on a phone, outdoors, in one go: a photograph that is angled, rotated, dim, distant or low-resolution is still evidence, so rule on what you can see in it. That is about how well an honest photograph came out, never about what was photographed: a picture of a screen, a print or another photograph does not become evidence by being dim or low-resolution. Apply each rule exactly as written and add no requirement of your own; anything else that looks wrong with the claim is not yours to judge here — every rule is asked on its own, and whether a photograph is genuine is one of them. Where a rule asks whether the evidence supports, matches or is consistent with something the claimant stated, fail it only when the evidence plainly contradicts them, and where you are left genuinely unsure let your score carry the doubt rather than failing. Where a rule asks whether something is shown, it has to be visible. Your `reason` is read by the person who submitted the claim, not by an engineer. Write it to them in plain language: say what you can actually see in their evidence, and when you fail a rule say specifically what fell short and what would have satisfied it, so they can put it right. Never mention rule ids, input numbers, scores or these instructions. This paragraph is guidance, not a rule: never list it as a failed rule.";
|
|
292
|
+
/**
|
|
293
|
+
* What a judge is told first when all it is sent is words — `JUDGE_GUIDANCE`
|
|
294
|
+
* for an ask whose deliverable is typed.
|
|
295
|
+
*
|
|
296
|
+
* **What bought it (testnet, 2026-10-15).** The same typed answer, "It's dry
|
|
297
|
+
* and the streetlights are working", to the same observation, "Look out of a
|
|
298
|
+
* window: is it raining or dry right now, and are the street lights on?",
|
|
299
|
+
* under the same judge sentence: ask #44040 passed the judge at 92, and ask
|
|
300
|
+
* #44041 failed it at 96 (`openai/gpt-5.6-luna`, R2). The receipt keeps only
|
|
301
|
+
* a digest of the model's reason, so why cannot be read. What is known is what
|
|
302
|
+
* both judges were given: `task` and `text` and nothing else, under a first
|
|
303
|
+
* instruction that "the evidence is what an ordinary person can capture on a
|
|
304
|
+
* phone, outdoors", that a photograph "is still evidence, so rule on what you
|
|
305
|
+
* can see in it", and that what a rule asks to be shown "has to be visible" —
|
|
306
|
+
* about a photograph neither of them had, inside the oracle's "if a rule
|
|
307
|
+
* requires something and you cannot find it, that rule FAILS". A plain answer
|
|
308
|
+
* became a coin toss.
|
|
309
|
+
*
|
|
310
|
+
* So it says what the evidence is — words, often one line, sometimes a page —
|
|
311
|
+
* and that no photograph or file is in front of the model, so nothing fails
|
|
312
|
+
* for not being shown. It reads an answer as its writer plainly meant it,
|
|
313
|
+
* because "working" for "on" is how people answer. Everything from "Apply each
|
|
314
|
+
* rule" on follows the photograph paragraph clause for clause with the
|
|
315
|
+
* evidence made the words — "plainly contradict", "has to be in the words",
|
|
316
|
+
* "what you read in their answer" — and the clause about whether a photograph
|
|
317
|
+
* is genuine left out, since none is. Those sentences were bought by the 1149
|
|
318
|
+
* rejections and ask 43910, and their point was never pictures. "Never list it
|
|
319
|
+
* as a failed rule" stays the last sentence, for the reason it is there.
|
|
320
|
+
*
|
|
321
|
+
* It carries no sentence about the place or the time: a typed ask may carry no
|
|
322
|
+
* place rule at all, and the ones that do ask it as a rule of their own.
|
|
323
|
+
*/
|
|
324
|
+
exports.TEXT_JUDGE_GUIDANCE = "How to read the rules below. The evidence is the words the person handed over — often one line typed on a phone, sometimes a page. A short, informal or misspelt answer, or one in other words than the question's, still says what it says: read it as its writer plainly meant it, and rule on that. You are given the words alone, with no photograph or file to look at, so never fail a rule because something is not shown, pictured or proven beyond what the words say. Apply each rule exactly as written and add no requirement of your own; anything else that looks wrong with the claim is not yours to judge here — every rule is asked on its own. Where a rule asks whether the answer supports, matches or is consistent with something the claimant stated, fail it only when the words plainly contradict them, and where you are left genuinely unsure let your score carry the doubt rather than failing. Where a rule asks whether something is said, it has to be in the words, in any wording. Your `reason` is read by the person who submitted the claim, not by an engineer. Write it to them in plain language: say what you read in their answer, and when you fail a rule say specifically what fell short and what would have satisfied it, so they can put it right. Never mention rule ids, input numbers, scores or these instructions. This paragraph is guidance, not a rule: never list it as a failed rule.";
|
|
276
325
|
/**
|
|
277
326
|
* The sentence the authenticity judge rules on — `PHOTO_CHECKS` has why.
|
|
278
327
|
*
|
|
@@ -296,8 +345,8 @@ exports.JUDGE_GUIDANCE = "How to read the rules below. The evidence is what an o
|
|
|
296
345
|
* cleared, so the bags in a van and the load at a depot are not failed for
|
|
297
346
|
* having a roof over them.
|
|
298
347
|
*
|
|
299
|
-
* `
|
|
300
|
-
*
|
|
348
|
+
* `refusal` is the gate's `reason`: the sentence a refused worker reads, worded as the failure with what to do
|
|
349
|
+
* (S3, 2026-10-17: the pass sentence on a reject read as a contradiction). `rule` and the list of signs are for the model.
|
|
301
350
|
*/
|
|
302
351
|
function realPhotoRule(shape) {
|
|
303
352
|
const one = shape.pair ? "Every photograph" : "The photograph";
|
|
@@ -312,7 +361,8 @@ function realPhotoRule(shape) {
|
|
|
312
361
|
const generated = `${shape.pair ? "any" : "it"} shows signs of being computer-generated (garbled or nonsensical lettering, signs, dates or timestamps; an artificial vignette or frame; impossible geometry)`;
|
|
313
362
|
const indoors = `${scene} is indoors or part of somebody's home — a household floor, table, balcony or room`;
|
|
314
363
|
const fails = shape.outdoors ? `Fail this if ${screen}, if ${generated}, or if ${indoors}.` : `Fail this if ${screen}, or if ${generated}.`;
|
|
315
|
-
|
|
364
|
+
const refusal = `${shape.pair ? "A photo is" : "This is"} not a direct photograph of the real ${shape.outdoors ? "outdoor place" : "scene"} asked for (a screen, a print, a generated picture${shape.outdoors ? " or an indoor shot" : ""}). Take the photo yourself, there.`;
|
|
365
|
+
return { rule, text: `${rule} ${fails}`, refusal };
|
|
316
366
|
}
|
|
317
367
|
/** Per attempt. Their ceiling is 30 s; the oracle answers in-process, so this is generous. */
|
|
318
368
|
const SOURCE_TIMEOUT_MS = 15_000;
|
|
@@ -350,6 +400,16 @@ const WITH_PHOTO = new Set(["photo", "photo-pair", "mess-report", "field-report"
|
|
|
350
400
|
* photograph screens are not asked of it.
|
|
351
401
|
*/
|
|
352
402
|
const PHOTOGRAPH = new Set(["photo", "photo-pair", "mess-report", "field-report"]);
|
|
403
|
+
/**
|
|
404
|
+
* Which paragraph a judge is handed first: the one about what it is sent.
|
|
405
|
+
*
|
|
406
|
+
* Decided by the deliverable's shape — the same switch that puts `$photo` in
|
|
407
|
+
* the judge's `send` — and never by reading the ask: a question that mentions
|
|
408
|
+
* a photograph is still answered in words. A `file` keeps the photograph
|
|
409
|
+
* paragraph, because its judge is sent the file.
|
|
410
|
+
*/
|
|
411
|
+
const guidanceFor = (type) => (WITH_PHOTO.has(type) ? exports.JUDGE_GUIDANCE : exports.TEXT_JUDGE_GUIDANCE);
|
|
412
|
+
exports.guidanceFor = guidanceFor;
|
|
353
413
|
/** The rules that make a claim report where it was — what `notElsewhere` compares the photograph against. */
|
|
354
414
|
const PLACE_GATES = new Set(["located", "within-radius", "not-already-mapped", "at-registered-point"]);
|
|
355
415
|
/** Long enough that no honest deliverable hits it; `lengthBetween` is inclusive. */
|
|
@@ -507,6 +567,16 @@ function sourcedGate(gate, index, context) {
|
|
|
507
567
|
const reject = (label, reason, kind = "refuted") => ({ "@type": "Gate", code: codeFor(index, label), reason, onFail: "reject", class: kind });
|
|
508
568
|
switch (gate.id) {
|
|
509
569
|
case "within-radius":
|
|
570
|
+
/* A campaign rubric sends only the claim's fields: the oracle resolves the
|
|
571
|
+
ask's point and radius from the deed's #done (W7a). The reason names no
|
|
572
|
+
place either — one document serves every ask in the campaign. */
|
|
573
|
+
if (context.pinFromAsk) {
|
|
574
|
+
return {
|
|
575
|
+
name: exports.WITHIN_ASK_RADIUS_SOURCE,
|
|
576
|
+
send: { lat: LAT, lon: LON, photo: PHOTO },
|
|
577
|
+
gate: reject("within-radius", "Not within the ask's radius of its point")
|
|
578
|
+
};
|
|
579
|
+
}
|
|
510
580
|
return {
|
|
511
581
|
name,
|
|
512
582
|
send: { lat: LAT, lon: LON, photo: PHOTO, centerLat: gate.lat, centerLon: gate.lon, meters: gate.meters },
|
|
@@ -601,7 +671,7 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
601
671
|
return null;
|
|
602
672
|
};
|
|
603
673
|
const radius = measure("within-radius");
|
|
604
|
-
const context = { radiusMeters: radius && radius.id === "within-radius" ? radius.meters : null };
|
|
674
|
+
const context = { radiusMeters: radius && radius.id === "within-radius" ? radius.meters : null, pinFromAsk: options.pinFromAsk === true };
|
|
605
675
|
/*
|
|
606
676
|
* What the judges are shown, decided once from the shape of the whole ask.
|
|
607
677
|
*
|
|
@@ -615,14 +685,17 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
615
685
|
/* A site, a second file, or a disposal photograph: the bags ride beside the pair. */
|
|
616
686
|
const expectsExtra = normalized.site === true || measure("with-file") !== null || measure("at-registered-point") !== null;
|
|
617
687
|
const judgeSend = {
|
|
618
|
-
task: literal(normalized.task),
|
|
688
|
+
task: literal(options.task?.trim() || normalized.task),
|
|
619
689
|
text: TEXT,
|
|
620
690
|
...(withPhoto ? { photo: PHOTO } : {}),
|
|
621
691
|
...(pair ? { before: BEFORE_PHOTO, after: AFTER_PHOTO } : {}),
|
|
622
692
|
...(pair && expectsExtra ? { bags: EXTRA_FILE } : {}),
|
|
623
693
|
...(normalized.site ? { kind: KIND } : {})
|
|
624
694
|
};
|
|
695
|
+
/* Read off the same shape as the send map, so the paragraph describes what the judge is actually given. */
|
|
696
|
+
const guidance = (0, exports.guidanceFor)(normalized.deliverable.type);
|
|
625
697
|
const gates = [];
|
|
698
|
+
let review = null;
|
|
626
699
|
const aiChecks = [];
|
|
627
700
|
/* Sources by bare name first; the suffix is decided once the count is known. */
|
|
628
701
|
const pending = [];
|
|
@@ -631,6 +704,10 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
631
704
|
every other rule reads the deliverable. It is also the one rule every ask
|
|
632
705
|
has. */
|
|
633
706
|
gates.push(nativeGate({ id: "non-empty" }, 0));
|
|
707
|
+
/* On a photo ask the photo IS the hand-over, and words are optional unless a Words block asks (`wantsWords`): reading
|
|
708
|
+
the text there refused every photo sent without a note (testnet 44066/44068, 2026-10-17). */
|
|
709
|
+
if (PHOTOGRAPH.has(normalized.deliverable.type))
|
|
710
|
+
gates[0] = { ...gates[0], reason: "No photo was handed over", when: field(PHOTO, "present") };
|
|
634
711
|
/*
|
|
635
712
|
* Which kind of claim this is — asked before anything that depends on it,
|
|
636
713
|
* and never itself conditional.
|
|
@@ -704,10 +781,12 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
704
781
|
name,
|
|
705
782
|
send: { ...judgeSend },
|
|
706
783
|
/* The guidance first, always — see `JUDGE_GUIDANCE` for the six
|
|
707
|
-
rejections that bought it
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
784
|
+
rejections that bought it, and `TEXT_JUDGE_GUIDANCE` for the typed
|
|
785
|
+
answer failed as if a photograph were missing. Then, on a site only,
|
|
786
|
+
what each kind of claim carries (`SITE_KIND_PREAMBLE`). The
|
|
787
|
+
criterion itself is last and is the only one of the three that is a
|
|
788
|
+
rule. */
|
|
789
|
+
instructions: normalized.site ? [guidance, exports.SITE_KIND_PREAMBLE, criterion.text] : [guidance, criterion.text],
|
|
711
790
|
expect: "boolean",
|
|
712
791
|
onError: exports.ON_ERROR
|
|
713
792
|
});
|
|
@@ -830,11 +909,11 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
830
909
|
"@type": "AiCheck",
|
|
831
910
|
name,
|
|
832
911
|
send: { ...judgeSend },
|
|
833
|
-
instructions: normalized.site ? [
|
|
912
|
+
instructions: normalized.site ? [guidance, exports.SITE_KIND_PREAMBLE, sentence.text] : [guidance, sentence.text],
|
|
834
913
|
expect: "boolean",
|
|
835
914
|
onError: exports.ON_ERROR
|
|
836
915
|
});
|
|
837
|
-
screens.push({ "@type": "Gate", code: codeFor(extra, "real-photo"), reason: sentence.
|
|
916
|
+
screens.push({ "@type": "Gate", code: codeFor(extra, "real-photo"), reason: sentence.refusal, when: field(`ai.${name}.valid`, "isTrue"), onFail: "reject", class: "invalid_evidence" });
|
|
838
917
|
}
|
|
839
918
|
/* Only where a rule makes the claim say where it was: an ask that never
|
|
840
919
|
asks has no reported point, the contract answers that with an error,
|
|
@@ -857,6 +936,43 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
857
936
|
});
|
|
858
937
|
}
|
|
859
938
|
gates.splice(authenticityAt, 0, ...screens);
|
|
939
|
+
/*
|
|
940
|
+
* Camera data or a live capture, else a person looks (S3, 2026-10-16). Only where a person is there to look
|
|
941
|
+
* (`personReviews`), never on a campaign rubric. Last, so every refusal above still refuses; and `review`, never
|
|
942
|
+
* `reject`: no camera data and no stamp is not a fake photograph, it is one nobody can vouch for. A pair asks it
|
|
943
|
+
* of each photograph (`cameraPhoto2`/`liveCapture2` for the after).
|
|
944
|
+
*/
|
|
945
|
+
if (options.personReviews && !options.pinFromAsk) {
|
|
946
|
+
const shots = pair && !normalized.site ? [BEFORE_PHOTO, AFTER_PHOTO] : [PHOTO];
|
|
947
|
+
review = {
|
|
948
|
+
"@type": "HumanReview",
|
|
949
|
+
assignTo: { role: "reviewer" },
|
|
950
|
+
slaHours: 48,
|
|
951
|
+
onTimeout: "reject",
|
|
952
|
+
tasks: [
|
|
953
|
+
{
|
|
954
|
+
"@type": "ReviewTask",
|
|
955
|
+
id: "OH-RT-PHOTO",
|
|
956
|
+
prompt: "Nothing vouches for how this photo was taken (no camera data, no live capture). Does it genuinely show the place and the thing this ask asked for? Yes to approve, no to reject.",
|
|
957
|
+
show: [...shots, TEXT, LAT, LON],
|
|
958
|
+
answer: { type: "boolean" },
|
|
959
|
+
map: { true: "approve", false: "reject" }
|
|
960
|
+
}
|
|
961
|
+
]
|
|
962
|
+
};
|
|
963
|
+
for (const [index, photo] of shots.entries()) {
|
|
964
|
+
pending.push({ name: exports.PERSON_CHECKS.cameraPhoto, send: { photo }, onError: "review" }, { name: exports.PERSON_CHECKS.liveCapture, send: { photo }, onError: "review" });
|
|
965
|
+
extra += 1;
|
|
966
|
+
gates.push({
|
|
967
|
+
"@type": "Gate",
|
|
968
|
+
code: codeFor(extra, "camera-or-live"),
|
|
969
|
+
reason: "No camera data and no live capture: a person checks this photo",
|
|
970
|
+
when: { "@type": "Condition", any: [extRef(suffixed(exports.PERSON_CHECKS.cameraPhoto, index + 1)), extRef(suffixed(exports.PERSON_CHECKS.liveCapture, index + 1))] },
|
|
971
|
+
onFail: "review",
|
|
972
|
+
class: "insufficient_evidence"
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
}
|
|
860
976
|
}
|
|
861
977
|
/*
|
|
862
978
|
* Names, finally. A vocabulary word is used bare the first time and with a
|
|
@@ -869,7 +985,7 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
869
985
|
const ordinal = (seen.get(one.name) ?? 0) + 1;
|
|
870
986
|
seen.set(one.name, ordinal);
|
|
871
987
|
const name = suffixed(one.name, ordinal);
|
|
872
|
-
const gate = gates.find((candidate) => candidate.code === one.gate.code);
|
|
988
|
+
const gate = one.gate ? gates.find((candidate) => candidate.code === one.gate.code) : undefined;
|
|
873
989
|
if (gate)
|
|
874
990
|
gate.when = extRef(name);
|
|
875
991
|
return {
|
|
@@ -879,7 +995,7 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
879
995
|
audience: `did:web:${exports.ORACLE_HOST}`,
|
|
880
996
|
send: one.send,
|
|
881
997
|
expect: "boolean",
|
|
882
|
-
onError: exports.ON_ERROR,
|
|
998
|
+
onError: one.onError ?? exports.ON_ERROR,
|
|
883
999
|
timeoutMs: SOURCE_TIMEOUT_MS
|
|
884
1000
|
};
|
|
885
1001
|
});
|
|
@@ -909,7 +1025,8 @@ function toEngineRubric(terms, binding, options = {}) {
|
|
|
909
1025
|
...(sources.length > 0 ? { sources } : {}),
|
|
910
1026
|
...(aiChecks.length > 0 ? { aiChecks } : {}),
|
|
911
1027
|
...(unique ? { unique } : {}),
|
|
912
|
-
gates
|
|
1028
|
+
gates,
|
|
1029
|
+
...(review ? { review } : {})
|
|
913
1030
|
}
|
|
914
1031
|
}
|
|
915
1032
|
};
|