@ixo/openhands-sdk 0.3.0 → 0.4.1
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 +4 -1
- 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 +4 -3
- package/dist/cjs/campaign/pool.js.map +1 -1
- package/dist/cjs/campaign/record.d.ts.map +1 -1
- package/dist/cjs/campaign/record.js +1 -1
- package/dist/cjs/campaign/record.js.map +1 -1
- package/dist/cjs/campaign/spots.d.ts.map +1 -1
- package/dist/cjs/campaign/spots.js +10 -8
- package/dist/cjs/campaign/spots.js.map +1 -1
- package/dist/cjs/campaign/treasurySends.d.ts.map +1 -1
- package/dist/cjs/campaign/treasurySends.js +3 -3
- package/dist/cjs/campaign/treasurySends.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 +31 -2
- package/dist/cjs/chain/entityShape.d.ts.map +1 -1
- package/dist/cjs/chain/entityShape.js +71 -8
- package/dist/cjs/chain/entityShape.js.map +1 -1
- package/dist/cjs/chain/env.d.ts +33 -3
- package/dist/cjs/chain/env.d.ts.map +1 -1
- package/dist/cjs/chain/env.js +38 -6
- 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 +53 -2
- package/dist/cjs/chain/money.d.ts.map +1 -1
- package/dist/cjs/chain/money.js +73 -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 +21 -9
- package/dist/cjs/chain.js.map +1 -1
- package/dist/cjs/config.d.ts +11 -5
- package/dist/cjs/config.d.ts.map +1 -1
- package/dist/cjs/config.js +2 -0
- package/dist/cjs/config.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 +43 -2
- package/dist/cjs/data/install.d.ts.map +1 -1
- package/dist/cjs/data/install.js +60 -10
- 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/receipt.d.ts +7 -0
- package/dist/cjs/data/receipt.d.ts.map +1 -1
- package/dist/cjs/data/receipt.js +19 -4
- 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 +32 -20
- 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 +11 -0
- package/dist/cjs/geo/geohash.d.ts.map +1 -1
- package/dist/cjs/geo/geohash.js +53 -3
- package/dist/cjs/geo/geohash.js.map +1 -1
- 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 +41 -3
- package/dist/cjs/rubric/marketPlan.d.ts.map +1 -1
- package/dist/cjs/rubric/marketPlan.js +110 -10
- package/dist/cjs/rubric/marketPlan.js.map +1 -1
- package/dist/cjs/rubric/observation.d.ts +56 -14
- package/dist/cjs/rubric/observation.d.ts.map +1 -1
- package/dist/cjs/rubric/observation.js +61 -11
- package/dist/cjs/rubric/observation.js.map +1 -1
- 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 +7 -0
- package/dist/cjs/rubric/terms.d.ts.map +1 -1
- package/dist/cjs/rubric/terms.js +12 -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 +5 -2
- 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 +4 -3
- package/dist/esm/campaign/pool.js.map +1 -1
- package/dist/esm/campaign/record.d.ts.map +1 -1
- package/dist/esm/campaign/record.js +2 -2
- package/dist/esm/campaign/record.js.map +1 -1
- package/dist/esm/campaign/spots.d.ts.map +1 -1
- package/dist/esm/campaign/spots.js +10 -8
- package/dist/esm/campaign/spots.js.map +1 -1
- package/dist/esm/campaign/treasurySends.d.ts.map +1 -1
- package/dist/esm/campaign/treasurySends.js +4 -4
- package/dist/esm/campaign/treasurySends.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 +31 -2
- package/dist/esm/chain/entityShape.d.ts.map +1 -1
- package/dist/esm/chain/entityShape.js +65 -7
- package/dist/esm/chain/entityShape.js.map +1 -1
- package/dist/esm/chain/env.d.ts +33 -3
- package/dist/esm/chain/env.d.ts.map +1 -1
- package/dist/esm/chain/env.js +33 -5
- 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 +53 -2
- package/dist/esm/chain/money.d.ts.map +1 -1
- package/dist/esm/chain/money.js +63 -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 +11 -5
- package/dist/esm/config.d.ts.map +1 -1
- package/dist/esm/config.js +3 -1
- package/dist/esm/config.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 +43 -2
- package/dist/esm/data/install.d.ts.map +1 -1
- package/dist/esm/data/install.js +56 -9
- 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/receipt.d.ts +7 -0
- package/dist/esm/data/receipt.d.ts.map +1 -1
- package/dist/esm/data/receipt.js +20 -5
- 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 +32 -21
- 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 +11 -0
- package/dist/esm/geo/geohash.d.ts.map +1 -1
- package/dist/esm/geo/geohash.js +52 -3
- package/dist/esm/geo/geohash.js.map +1 -1
- 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 +41 -3
- package/dist/esm/rubric/marketPlan.d.ts.map +1 -1
- package/dist/esm/rubric/marketPlan.js +107 -9
- package/dist/esm/rubric/marketPlan.js.map +1 -1
- package/dist/esm/rubric/observation.d.ts +56 -14
- package/dist/esm/rubric/observation.d.ts.map +1 -1
- package/dist/esm/rubric/observation.js +61 -12
- package/dist/esm/rubric/observation.js.map +1 -1
- 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 +7 -0
- package/dist/esm/rubric/terms.d.ts.map +1 -1
- package/dist/esm/rubric/terms.js +12 -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,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a picture says about where it came from (an AI label: IPTC DigitalSourceType in its XMP; C2PA content
|
|
3
|
+
* credentials), and whether it is a photo the reviewer can read at all (JPEG or PNG, within its pixel cap).
|
|
4
|
+
*
|
|
5
|
+
* The answer page used to shrink a photograph by redrawing it on a canvas, and a generator's PNG, labelled
|
|
6
|
+
* `trainedAlgorithmicMedia` in its XMP and signed in a C2PA manifest, lost both: the reviewer's not-generated
|
|
7
|
+
* screen then passed it (Red Harbor demo, 2026-10-16). Evidence photos are now sent as they are (camera.ts). This
|
|
8
|
+
* reads what the original declares, for the page's early warning on a photo marked AI-generated (`markedAi`) and
|
|
9
|
+
* the provenance the evidence records. The oracle still decides.
|
|
10
|
+
*
|
|
11
|
+
* Pure byte reading, no decoder. PNG (iTXt XMP, caBX), JPEG (APP1 XMP, APP11 JUMBF) and WebP (`XMP `, `C2PA`).
|
|
12
|
+
* shortcut: a compressed PNG iTXt XMP is not inflated (generators write it plain); upgrade with DecompressionStream if one turns up.
|
|
13
|
+
*/
|
|
14
|
+
/** The IPTC digital source types that say a model made or composited the picture. */
|
|
15
|
+
const AI_SOURCE = /\b(trainedAlgorithmicMedia|compositeWithTrainedAlgorithmicMedia|compositeSynthetic|algorithmicMedia)\b/;
|
|
16
|
+
/** The ones the answer page refuses on sight (owner, 2026-10-16). */
|
|
17
|
+
const MARKED_AI = /\b(trainedAlgorithmicMedia|compositeSynthetic|algorithmicMedia)\b/;
|
|
18
|
+
const XMP_JPEG_HEADER = "http://ns.adobe.com/xap/1.0/\0";
|
|
19
|
+
const XMP_PNG_KEYWORD = "XML:com.adobe.xmp";
|
|
20
|
+
const latin1 = (bytes) => {
|
|
21
|
+
let out = "";
|
|
22
|
+
for (let at = 0; at < bytes.length; at += 8192)
|
|
23
|
+
out += String.fromCharCode(...bytes.subarray(at, at + 8192));
|
|
24
|
+
return out;
|
|
25
|
+
};
|
|
26
|
+
const startsWith = (bytes, at, text) => {
|
|
27
|
+
if (at + text.length > bytes.length)
|
|
28
|
+
return false;
|
|
29
|
+
for (let index = 0; index < text.length; index += 1)
|
|
30
|
+
if (bytes[at + index] !== text.charCodeAt(index))
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
};
|
|
34
|
+
const u32 = (bytes, at) => ((bytes[at] << 24) >>> 0) + (bytes[at + 1] << 16) + (bytes[at + 2] << 8) + bytes[at + 3];
|
|
35
|
+
const u32le = (bytes, at) => (bytes[at] | (bytes[at + 1] << 8) | (bytes[at + 2] << 16)) + bytes[at + 3] * 0x1000000;
|
|
36
|
+
const isPng = (bytes) => bytes.length > 8 && bytes[0] === 0x89 && startsWith(bytes, 1, "PNG");
|
|
37
|
+
const isJpeg = (bytes) => bytes.length > 4 && bytes[0] === 0xff && bytes[1] === 0xd8;
|
|
38
|
+
/** 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. */
|
|
39
|
+
export const EVIDENCE_MAX_BYTES = 10_000_000;
|
|
40
|
+
export const PNG_MAX_PIXELS = 40_000_000;
|
|
41
|
+
/**
|
|
42
|
+
* Why the reviewer could not read this photo, in plain words, or null. By its bytes, never its name: JPEG or PNG
|
|
43
|
+
* only, at most `maxBytes` (never above EVIDENCE_MAX_BYTES), and a PNG at most 40 MP (read from its IHDR).
|
|
44
|
+
*/
|
|
45
|
+
export function photoRefusal(bytes, maxBytes = EVIDENCE_MAX_BYTES) {
|
|
46
|
+
if (!isJpeg(bytes) && !isPng(bytes))
|
|
47
|
+
return "Please send a JPEG or PNG photo.";
|
|
48
|
+
const limit = Math.min(maxBytes, EVIDENCE_MAX_BYTES);
|
|
49
|
+
const mb = (count) => (count / 1_000_000).toFixed(1).replace(/\.0$/, "");
|
|
50
|
+
if (bytes.length > limit)
|
|
51
|
+
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.`;
|
|
52
|
+
if (isPng(bytes) && startsWith(bytes, 12, "IHDR")) {
|
|
53
|
+
const pixels = u32(bytes, 16) * u32(bytes, 20);
|
|
54
|
+
if (pixels > PNG_MAX_PIXELS)
|
|
55
|
+
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.`;
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
/** What a picture's own bytes say about its source. Never throws: a file it cannot read says nothing. */
|
|
60
|
+
export function scanProvenance(bytes) {
|
|
61
|
+
let xmp = null;
|
|
62
|
+
const c2pa = [];
|
|
63
|
+
try {
|
|
64
|
+
if (isPng(bytes)) {
|
|
65
|
+
for (let at = 8; at + 12 <= bytes.length;) {
|
|
66
|
+
const length = u32(bytes, at);
|
|
67
|
+
const data = bytes.subarray(at + 8, at + 8 + length);
|
|
68
|
+
if (startsWith(bytes, at + 4, "iTXt") && startsWith(data, 0, `${XMP_PNG_KEYWORD}\0`)) {
|
|
69
|
+
let cursor = XMP_PNG_KEYWORD.length + 1;
|
|
70
|
+
const compressed = data[cursor] === 1;
|
|
71
|
+
cursor += 2;
|
|
72
|
+
/* The language tag, then the translated keyword: both NUL-terminated. */
|
|
73
|
+
for (let nul = 0; nul < 2; nul += 1)
|
|
74
|
+
cursor = data.indexOf(0, cursor) + 1;
|
|
75
|
+
if (!compressed && cursor > 0)
|
|
76
|
+
xmp = data.subarray(cursor);
|
|
77
|
+
}
|
|
78
|
+
else if (startsWith(bytes, at + 4, "caBX"))
|
|
79
|
+
c2pa.push(data);
|
|
80
|
+
else if (startsWith(bytes, at + 4, "IEND"))
|
|
81
|
+
break;
|
|
82
|
+
at += 12 + length;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else if (isJpeg(bytes)) {
|
|
86
|
+
for (let at = 2; at + 4 <= bytes.length && bytes[at] === 0xff;) {
|
|
87
|
+
const marker = bytes[at + 1];
|
|
88
|
+
/* Start of scan: the pixels begin and the metadata is behind us. */
|
|
89
|
+
if (marker === 0xda)
|
|
90
|
+
break;
|
|
91
|
+
const length = (bytes[at + 2] << 8) | bytes[at + 3];
|
|
92
|
+
if (length < 2)
|
|
93
|
+
break;
|
|
94
|
+
if (marker === 0xe1 && startsWith(bytes, at + 4, XMP_JPEG_HEADER))
|
|
95
|
+
xmp = bytes.subarray(at + 4 + XMP_JPEG_HEADER.length, at + 2 + length);
|
|
96
|
+
/* APP11, JPEG XT "JP": a JUMBF box, which C2PA uses. */
|
|
97
|
+
if (marker === 0xeb && startsWith(bytes, at + 4, "JP"))
|
|
98
|
+
c2pa.push(bytes.subarray(at, at + 2 + length));
|
|
99
|
+
at += 2 + length;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else if (startsWith(bytes, 0, "RIFF") && startsWith(bytes, 8, "WEBP")) {
|
|
103
|
+
for (let at = 12; at + 8 <= bytes.length;) {
|
|
104
|
+
const size = u32le(bytes, at + 4);
|
|
105
|
+
const data = bytes.subarray(at + 8, at + 8 + size);
|
|
106
|
+
if (startsWith(bytes, at, "XMP "))
|
|
107
|
+
xmp = data;
|
|
108
|
+
if (startsWith(bytes, at, "C2PA"))
|
|
109
|
+
c2pa.push(data);
|
|
110
|
+
at += 8 + size + (size % 2);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
/* A truncated or odd file: whatever was read so far stands. */
|
|
116
|
+
}
|
|
117
|
+
const xmpText = xmp ? latin1(xmp) : "";
|
|
118
|
+
const labelledXmp = /DigitalSourceType/.test(xmpText);
|
|
119
|
+
const credentials = c2pa.map(latin1).filter((text) => text.includes("c2pa"));
|
|
120
|
+
const labelled = labelledXmp ? AI_SOURCE.exec(xmpText) : null;
|
|
121
|
+
const signed = credentials.map((text) => AI_SOURCE.exec(text)).find(Boolean) ?? null;
|
|
122
|
+
const sources = [...(labelledXmp ? ["xmp"] : []), ...(credentials.length ? ["c2pa"] : [])];
|
|
123
|
+
const type = (labelled ?? signed)?.[1];
|
|
124
|
+
return {
|
|
125
|
+
provenance: sources.length ? { aiLabel: Boolean(labelled || signed), sources, ...(type ? { digitalSourceType: type } : {}) } : null,
|
|
126
|
+
markedAi: (labelledXmp && MARKED_AI.test(xmpText)) || credentials.some((text) => MARKED_AI.test(text))
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=provenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provenance.js","sourceRoot":"","sources":["../../../src/geo/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqBH,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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
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;;;;;;;;;;;;;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CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,kOAC+L,CAAC;AAE/N;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,eAAO,MAAM,cAAc,m5CACk3C,CAAC;AAE94C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,mBAAmB,g4CACq1C,CAAC;AAEt3C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;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"}
|
|
@@ -63,6 +63,8 @@ export const SOURCE_NAMES = {
|
|
|
63
63
|
};
|
|
64
64
|
/** The cool-off source, emitted from the options rather than from a gate. */
|
|
65
65
|
export const COOLDOWN_SOURCE = "cooldown";
|
|
66
|
+
/** The pin-free radius source of a campaign rubric (W7a): the oracle reads the ask's point and radius from its deed's `#done`. */
|
|
67
|
+
export const WITHIN_ASK_RADIUS_SOURCE = "withinAskRadius";
|
|
66
68
|
/** The marker source on a site ask, so the claim's `kind` is frozen on the receipt for the oracle's act policy. */
|
|
67
69
|
export const SITE_SOURCE = "openhandsSite";
|
|
68
70
|
/** The AI check, per judge criterion: `judge`, then `judge2..`. */
|
|
@@ -116,6 +118,13 @@ export const PHOTO_CHECKS = {
|
|
|
116
118
|
notMarkedGenerated: "notMarkedGenerated",
|
|
117
119
|
notElsewhere: "notElsewhere"
|
|
118
120
|
};
|
|
121
|
+
/** The two facts of the camera-or-live gate, asked only where a person reviews (`personReviews`). */
|
|
122
|
+
export const PERSON_CHECKS = {
|
|
123
|
+
/** True when the file has EXIF Make/Model or a trusted C2PA camera capture (S3). */
|
|
124
|
+
cameraPhoto: "cameraPhoto",
|
|
125
|
+
/** True when the evidence carries a valid live-capture stamp for the photo (app/lib/stamp.ts, S3). */
|
|
126
|
+
liveCapture: "liveCapture"
|
|
127
|
+
};
|
|
119
128
|
/**
|
|
120
129
|
* How far a photograph's own GPS may sit from the point the claim reported.
|
|
121
130
|
*
|
|
@@ -156,6 +165,7 @@ export const UNIQUE_RULE_ID = "OH-DUP-1";
|
|
|
156
165
|
*/
|
|
157
166
|
export const SEND_KEYS = {
|
|
158
167
|
withinRadius: ["lat", "lon", "photo", "centerLat", "centerLon", "meters"],
|
|
168
|
+
withinAskRadius: ["lat", "lon", "photo"],
|
|
159
169
|
located: ["lat", "lon", "photo"],
|
|
160
170
|
beforeAfter: ["before", "after", "meters"],
|
|
161
171
|
daylight: ["text", "at", "fallbackAt", "lat", "lon"],
|
|
@@ -168,6 +178,8 @@ export const SEND_KEYS = {
|
|
|
168
178
|
openhandsSite: ["kind", "lat", "lon"],
|
|
169
179
|
notElsewhere: ["lat", "lon", "photo", "meters"],
|
|
170
180
|
notMarkedGenerated: ["photo"],
|
|
181
|
+
cameraPhoto: ["photo"],
|
|
182
|
+
liveCapture: ["photo"],
|
|
171
183
|
judge: ["task", "text", "photo"]
|
|
172
184
|
};
|
|
173
185
|
/**
|
|
@@ -265,8 +277,45 @@ export const SITE_KIND_PREAMBLE = 'A claim of kind "patch" carries a before phot
|
|
|
265
277
|
*
|
|
266
278
|
* Everything from "Where a rule asks" on is untouched, the `reason` guidance
|
|
267
279
|
* and the last sentence included.
|
|
280
|
+
*
|
|
281
|
+
* **Only where the judge is sent a file** (`guidanceFor`). A typed answer is
|
|
282
|
+
* read under `TEXT_JUDGE_GUIDANCE` instead, which has the incident that
|
|
283
|
+
* bought it.
|
|
268
284
|
*/
|
|
269
285
|
export 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 — 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.";
|
|
286
|
+
/**
|
|
287
|
+
* What a judge is told first when all it is sent is words — `JUDGE_GUIDANCE`
|
|
288
|
+
* for an ask whose deliverable is typed.
|
|
289
|
+
*
|
|
290
|
+
* **What bought it (testnet, 2026-10-15).** The same typed answer, "It's dry
|
|
291
|
+
* and the streetlights are working", to the same observation, "Look out of a
|
|
292
|
+
* window: is it raining or dry right now, and are the street lights on?",
|
|
293
|
+
* under the same judge sentence: ask #44040 passed the judge at 92, and ask
|
|
294
|
+
* #44041 failed it at 96 (`openai/gpt-5.6-luna`, R2). The receipt keeps only
|
|
295
|
+
* a digest of the model's reason, so why cannot be read. What is known is what
|
|
296
|
+
* both judges were given: `task` and `text` and nothing else, under a first
|
|
297
|
+
* instruction that "the evidence is what an ordinary person can capture on a
|
|
298
|
+
* phone, outdoors", that a photograph "is still evidence, so rule on what you
|
|
299
|
+
* can see in it", and that what a rule asks to be shown "has to be visible" —
|
|
300
|
+
* about a photograph neither of them had, inside the oracle's "if a rule
|
|
301
|
+
* requires something and you cannot find it, that rule FAILS". A plain answer
|
|
302
|
+
* became a coin toss.
|
|
303
|
+
*
|
|
304
|
+
* So it says what the evidence is — words, often one line, sometimes a page —
|
|
305
|
+
* and that no photograph or file is in front of the model, so nothing fails
|
|
306
|
+
* for not being shown. It reads an answer as its writer plainly meant it,
|
|
307
|
+
* because "working" for "on" is how people answer. Everything from "Apply each
|
|
308
|
+
* rule" on follows the photograph paragraph clause for clause with the
|
|
309
|
+
* evidence made the words — "plainly contradict", "has to be in the words",
|
|
310
|
+
* "what you read in their answer" — and the clause about whether a photograph
|
|
311
|
+
* is genuine left out, since none is. Those sentences were bought by the 1149
|
|
312
|
+
* rejections and ask 43910, and their point was never pictures. "Never list it
|
|
313
|
+
* as a failed rule" stays the last sentence, for the reason it is there.
|
|
314
|
+
*
|
|
315
|
+
* It carries no sentence about the place or the time: a typed ask may carry no
|
|
316
|
+
* place rule at all, and the ones that do ask it as a rule of their own.
|
|
317
|
+
*/
|
|
318
|
+
export const 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.";
|
|
270
319
|
/**
|
|
271
320
|
* The sentence the authenticity judge rules on — `PHOTO_CHECKS` has why.
|
|
272
321
|
*
|
|
@@ -290,8 +339,8 @@ export const JUDGE_GUIDANCE = "How to read the rules below. The evidence is what
|
|
|
290
339
|
* cleared, so the bags in a van and the load at a depot are not failed for
|
|
291
340
|
* having a roof over them.
|
|
292
341
|
*
|
|
293
|
-
* `
|
|
294
|
-
*
|
|
342
|
+
* `refusal` is the gate's `reason`: the sentence a refused worker reads, worded as the failure with what to do
|
|
343
|
+
* (S3, 2026-10-17: the pass sentence on a reject read as a contradiction). `rule` and the list of signs are for the model.
|
|
295
344
|
*/
|
|
296
345
|
export function realPhotoRule(shape) {
|
|
297
346
|
const one = shape.pair ? "Every photograph" : "The photograph";
|
|
@@ -306,7 +355,8 @@ export function realPhotoRule(shape) {
|
|
|
306
355
|
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)`;
|
|
307
356
|
const indoors = `${scene} is indoors or part of somebody's home — a household floor, table, balcony or room`;
|
|
308
357
|
const fails = shape.outdoors ? `Fail this if ${screen}, if ${generated}, or if ${indoors}.` : `Fail this if ${screen}, or if ${generated}.`;
|
|
309
|
-
|
|
358
|
+
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.`;
|
|
359
|
+
return { rule, text: `${rule} ${fails}`, refusal };
|
|
310
360
|
}
|
|
311
361
|
/** Per attempt. Their ceiling is 30 s; the oracle answers in-process, so this is generous. */
|
|
312
362
|
const SOURCE_TIMEOUT_MS = 15_000;
|
|
@@ -344,6 +394,15 @@ const WITH_PHOTO = new Set(["photo", "photo-pair", "mess-report", "field-report"
|
|
|
344
394
|
* photograph screens are not asked of it.
|
|
345
395
|
*/
|
|
346
396
|
const PHOTOGRAPH = new Set(["photo", "photo-pair", "mess-report", "field-report"]);
|
|
397
|
+
/**
|
|
398
|
+
* Which paragraph a judge is handed first: the one about what it is sent.
|
|
399
|
+
*
|
|
400
|
+
* Decided by the deliverable's shape — the same switch that puts `$photo` in
|
|
401
|
+
* the judge's `send` — and never by reading the ask: a question that mentions
|
|
402
|
+
* a photograph is still answered in words. A `file` keeps the photograph
|
|
403
|
+
* paragraph, because its judge is sent the file.
|
|
404
|
+
*/
|
|
405
|
+
export const guidanceFor = (type) => (WITH_PHOTO.has(type) ? JUDGE_GUIDANCE : TEXT_JUDGE_GUIDANCE);
|
|
347
406
|
/** The rules that make a claim report where it was — what `notElsewhere` compares the photograph against. */
|
|
348
407
|
const PLACE_GATES = new Set(["located", "within-radius", "not-already-mapped", "at-registered-point"]);
|
|
349
408
|
/** Long enough that no honest deliverable hits it; `lengthBetween` is inclusive. */
|
|
@@ -501,6 +560,16 @@ function sourcedGate(gate, index, context) {
|
|
|
501
560
|
const reject = (label, reason, kind = "refuted") => ({ "@type": "Gate", code: codeFor(index, label), reason, onFail: "reject", class: kind });
|
|
502
561
|
switch (gate.id) {
|
|
503
562
|
case "within-radius":
|
|
563
|
+
/* A campaign rubric sends only the claim's fields: the oracle resolves the
|
|
564
|
+
ask's point and radius from the deed's #done (W7a). The reason names no
|
|
565
|
+
place either — one document serves every ask in the campaign. */
|
|
566
|
+
if (context.pinFromAsk) {
|
|
567
|
+
return {
|
|
568
|
+
name: WITHIN_ASK_RADIUS_SOURCE,
|
|
569
|
+
send: { lat: LAT, lon: LON, photo: PHOTO },
|
|
570
|
+
gate: reject("within-radius", "Not within the ask's radius of its point")
|
|
571
|
+
};
|
|
572
|
+
}
|
|
504
573
|
return {
|
|
505
574
|
name,
|
|
506
575
|
send: { lat: LAT, lon: LON, photo: PHOTO, centerLat: gate.lat, centerLon: gate.lon, meters: gate.meters },
|
|
@@ -595,7 +664,7 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
595
664
|
return null;
|
|
596
665
|
};
|
|
597
666
|
const radius = measure("within-radius");
|
|
598
|
-
const context = { radiusMeters: radius && radius.id === "within-radius" ? radius.meters : null };
|
|
667
|
+
const context = { radiusMeters: radius && radius.id === "within-radius" ? radius.meters : null, pinFromAsk: options.pinFromAsk === true };
|
|
599
668
|
/*
|
|
600
669
|
* What the judges are shown, decided once from the shape of the whole ask.
|
|
601
670
|
*
|
|
@@ -609,14 +678,17 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
609
678
|
/* A site, a second file, or a disposal photograph: the bags ride beside the pair. */
|
|
610
679
|
const expectsExtra = normalized.site === true || measure("with-file") !== null || measure("at-registered-point") !== null;
|
|
611
680
|
const judgeSend = {
|
|
612
|
-
task: literal(normalized.task),
|
|
681
|
+
task: literal(options.task?.trim() || normalized.task),
|
|
613
682
|
text: TEXT,
|
|
614
683
|
...(withPhoto ? { photo: PHOTO } : {}),
|
|
615
684
|
...(pair ? { before: BEFORE_PHOTO, after: AFTER_PHOTO } : {}),
|
|
616
685
|
...(pair && expectsExtra ? { bags: EXTRA_FILE } : {}),
|
|
617
686
|
...(normalized.site ? { kind: KIND } : {})
|
|
618
687
|
};
|
|
688
|
+
/* Read off the same shape as the send map, so the paragraph describes what the judge is actually given. */
|
|
689
|
+
const guidance = guidanceFor(normalized.deliverable.type);
|
|
619
690
|
const gates = [];
|
|
691
|
+
let review = null;
|
|
620
692
|
const aiChecks = [];
|
|
621
693
|
/* Sources by bare name first; the suffix is decided once the count is known. */
|
|
622
694
|
const pending = [];
|
|
@@ -625,6 +697,10 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
625
697
|
every other rule reads the deliverable. It is also the one rule every ask
|
|
626
698
|
has. */
|
|
627
699
|
gates.push(nativeGate({ id: "non-empty" }, 0));
|
|
700
|
+
/* On a photo ask the photo IS the hand-over, and words are optional unless a Words block asks (`wantsWords`): reading
|
|
701
|
+
the text there refused every photo sent without a note (testnet 44066/44068, 2026-10-17). */
|
|
702
|
+
if (PHOTOGRAPH.has(normalized.deliverable.type))
|
|
703
|
+
gates[0] = { ...gates[0], reason: "No photo was handed over", when: field(PHOTO, "present") };
|
|
628
704
|
/*
|
|
629
705
|
* Which kind of claim this is — asked before anything that depends on it,
|
|
630
706
|
* and never itself conditional.
|
|
@@ -698,10 +774,12 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
698
774
|
name,
|
|
699
775
|
send: { ...judgeSend },
|
|
700
776
|
/* The guidance first, always — see `JUDGE_GUIDANCE` for the six
|
|
701
|
-
rejections that bought it
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
777
|
+
rejections that bought it, and `TEXT_JUDGE_GUIDANCE` for the typed
|
|
778
|
+
answer failed as if a photograph were missing. Then, on a site only,
|
|
779
|
+
what each kind of claim carries (`SITE_KIND_PREAMBLE`). The
|
|
780
|
+
criterion itself is last and is the only one of the three that is a
|
|
781
|
+
rule. */
|
|
782
|
+
instructions: normalized.site ? [guidance, SITE_KIND_PREAMBLE, criterion.text] : [guidance, criterion.text],
|
|
705
783
|
expect: "boolean",
|
|
706
784
|
onError: ON_ERROR
|
|
707
785
|
});
|
|
@@ -824,11 +902,11 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
824
902
|
"@type": "AiCheck",
|
|
825
903
|
name,
|
|
826
904
|
send: { ...judgeSend },
|
|
827
|
-
instructions: normalized.site ? [
|
|
905
|
+
instructions: normalized.site ? [guidance, SITE_KIND_PREAMBLE, sentence.text] : [guidance, sentence.text],
|
|
828
906
|
expect: "boolean",
|
|
829
907
|
onError: ON_ERROR
|
|
830
908
|
});
|
|
831
|
-
screens.push({ "@type": "Gate", code: codeFor(extra, "real-photo"), reason: sentence.
|
|
909
|
+
screens.push({ "@type": "Gate", code: codeFor(extra, "real-photo"), reason: sentence.refusal, when: field(`ai.${name}.valid`, "isTrue"), onFail: "reject", class: "invalid_evidence" });
|
|
832
910
|
}
|
|
833
911
|
/* Only where a rule makes the claim say where it was: an ask that never
|
|
834
912
|
asks has no reported point, the contract answers that with an error,
|
|
@@ -851,6 +929,43 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
851
929
|
});
|
|
852
930
|
}
|
|
853
931
|
gates.splice(authenticityAt, 0, ...screens);
|
|
932
|
+
/*
|
|
933
|
+
* Camera data or a live capture, else a person looks (S3, 2026-10-16). Only where a person is there to look
|
|
934
|
+
* (`personReviews`), never on a campaign rubric. Last, so every refusal above still refuses; and `review`, never
|
|
935
|
+
* `reject`: no camera data and no stamp is not a fake photograph, it is one nobody can vouch for. A pair asks it
|
|
936
|
+
* of each photograph (`cameraPhoto2`/`liveCapture2` for the after).
|
|
937
|
+
*/
|
|
938
|
+
if (options.personReviews && !options.pinFromAsk) {
|
|
939
|
+
const shots = pair && !normalized.site ? [BEFORE_PHOTO, AFTER_PHOTO] : [PHOTO];
|
|
940
|
+
review = {
|
|
941
|
+
"@type": "HumanReview",
|
|
942
|
+
assignTo: { role: "reviewer" },
|
|
943
|
+
slaHours: 48,
|
|
944
|
+
onTimeout: "reject",
|
|
945
|
+
tasks: [
|
|
946
|
+
{
|
|
947
|
+
"@type": "ReviewTask",
|
|
948
|
+
id: "OH-RT-PHOTO",
|
|
949
|
+
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.",
|
|
950
|
+
show: [...shots, TEXT, LAT, LON],
|
|
951
|
+
answer: { type: "boolean" },
|
|
952
|
+
map: { true: "approve", false: "reject" }
|
|
953
|
+
}
|
|
954
|
+
]
|
|
955
|
+
};
|
|
956
|
+
for (const [index, photo] of shots.entries()) {
|
|
957
|
+
pending.push({ name: PERSON_CHECKS.cameraPhoto, send: { photo }, onError: "review" }, { name: PERSON_CHECKS.liveCapture, send: { photo }, onError: "review" });
|
|
958
|
+
extra += 1;
|
|
959
|
+
gates.push({
|
|
960
|
+
"@type": "Gate",
|
|
961
|
+
code: codeFor(extra, "camera-or-live"),
|
|
962
|
+
reason: "No camera data and no live capture: a person checks this photo",
|
|
963
|
+
when: { "@type": "Condition", any: [extRef(suffixed(PERSON_CHECKS.cameraPhoto, index + 1)), extRef(suffixed(PERSON_CHECKS.liveCapture, index + 1))] },
|
|
964
|
+
onFail: "review",
|
|
965
|
+
class: "insufficient_evidence"
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
}
|
|
854
969
|
}
|
|
855
970
|
/*
|
|
856
971
|
* Names, finally. A vocabulary word is used bare the first time and with a
|
|
@@ -863,7 +978,7 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
863
978
|
const ordinal = (seen.get(one.name) ?? 0) + 1;
|
|
864
979
|
seen.set(one.name, ordinal);
|
|
865
980
|
const name = suffixed(one.name, ordinal);
|
|
866
|
-
const gate = gates.find((candidate) => candidate.code === one.gate.code);
|
|
981
|
+
const gate = one.gate ? gates.find((candidate) => candidate.code === one.gate.code) : undefined;
|
|
867
982
|
if (gate)
|
|
868
983
|
gate.when = extRef(name);
|
|
869
984
|
return {
|
|
@@ -873,7 +988,7 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
873
988
|
audience: `did:web:${ORACLE_HOST}`,
|
|
874
989
|
send: one.send,
|
|
875
990
|
expect: "boolean",
|
|
876
|
-
onError: ON_ERROR,
|
|
991
|
+
onError: one.onError ?? ON_ERROR,
|
|
877
992
|
timeoutMs: SOURCE_TIMEOUT_MS
|
|
878
993
|
};
|
|
879
994
|
});
|
|
@@ -903,7 +1018,8 @@ export function toEngineRubric(terms, binding, options = {}) {
|
|
|
903
1018
|
...(sources.length > 0 ? { sources } : {}),
|
|
904
1019
|
...(aiChecks.length > 0 ? { aiChecks } : {}),
|
|
905
1020
|
...(unique ? { unique } : {}),
|
|
906
|
-
gates
|
|
1021
|
+
gates,
|
|
1022
|
+
...(review ? { review } : {})
|
|
907
1023
|
}
|
|
908
1024
|
}
|
|
909
1025
|
};
|