@ixo/editor 6.27.0 → 6.28.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.
@@ -1691,6 +1691,353 @@ interface IntegrationsHandlers {
1691
1691
  bindingId: string;
1692
1692
  }) => Promise<void>;
1693
1693
  }
1694
+ /** Pipeline row (`claim_ingests`): has the engine picked the claim up yet? */
1695
+ interface EngineIngest {
1696
+ status: 'queued' | 'processed' | 'failed';
1697
+ instanceId: string | null;
1698
+ createdAt: string;
1699
+ updatedAt: string;
1700
+ }
1701
+ /** One member check's outcome inside a compound gate — identifiers only, never answer values. */
1702
+ interface EngineGateMember {
1703
+ index: number;
1704
+ /** The member's own field ref (`$question`), its forEach target, or its compound keyword. */
1705
+ ref: string;
1706
+ ok: boolean;
1707
+ }
1708
+ interface EngineGateOutcome {
1709
+ code: string;
1710
+ outcome: 'passed' | 'failed' | 'skipped' | 'unevaluated' | 'not_reached';
1711
+ /** Present iff the gate's check is compound (linked rules) — recorded pass or fail alike. */
1712
+ members?: EngineGateMember[];
1713
+ }
1714
+ interface EngineCriterionOutcome {
1715
+ code: string;
1716
+ scoreBps: number | null;
1717
+ pending: boolean;
1718
+ capped: boolean;
1719
+ }
1720
+ interface EngineDecisionReason {
1721
+ code: string;
1722
+ reason: string;
1723
+ class: string;
1724
+ }
1725
+ /** The engine's authoritative decision jsonb — codes, scores and outcomes only. */
1726
+ interface EngineDecision {
1727
+ status: 'decided' | 'pending_review' | 'unusable';
1728
+ verdict: 'approve' | 'partial' | 'reject' | 'review';
1729
+ class: string;
1730
+ evaluationStatus: number;
1731
+ action: string;
1732
+ totalBps: number | null;
1733
+ gates: EngineGateOutcome[];
1734
+ criteria: EngineCriterionOutcome[];
1735
+ pendingTasks: string[];
1736
+ reasons: EngineDecisionReason[];
1737
+ }
1738
+ /** One frozen ext/AI call record — request, response, attempts, token usage. */
1739
+ interface EngineTranscript {
1740
+ request: {
1741
+ url: string;
1742
+ body: unknown;
1743
+ headers: Record<string, string>;
1744
+ };
1745
+ response: {
1746
+ status: number;
1747
+ body: unknown;
1748
+ } | null;
1749
+ attempts: number;
1750
+ elapsedMs: number;
1751
+ latencyMs?: number;
1752
+ genId?: string | null;
1753
+ usage?: {
1754
+ promptTokens: number;
1755
+ completionTokens: number;
1756
+ cachedTokens: number;
1757
+ costUsd: number;
1758
+ } | null;
1759
+ }
1760
+ type EngineExtFact = {
1761
+ status: 'ok';
1762
+ value: boolean | number;
1763
+ reason: string | null;
1764
+ transcript: EngineTranscript;
1765
+ } | {
1766
+ status: 'error';
1767
+ onError: 'review' | 'reject';
1768
+ detail: string;
1769
+ transcript: EngineTranscript;
1770
+ };
1771
+ type EngineAiFact = {
1772
+ status: 'ok';
1773
+ value: boolean;
1774
+ reason: string | null;
1775
+ failedRules: string[];
1776
+ score: number;
1777
+ transcript: EngineTranscript;
1778
+ } | {
1779
+ status: 'error';
1780
+ onError: 'review' | 'reject';
1781
+ detail: string;
1782
+ transcript: EngineTranscript;
1783
+ };
1784
+ /** The frozen evaluation trace — everything the engine saw or produced. */
1785
+ interface EngineTrace {
1786
+ attachments: Array<{
1787
+ question: string;
1788
+ name: string;
1789
+ mediaType: string;
1790
+ cid: string | null;
1791
+ size: number | null;
1792
+ }>;
1793
+ ctx: {
1794
+ now: string;
1795
+ collection: {
1796
+ startDate: string | null;
1797
+ endDate: string | null;
1798
+ };
1799
+ claim: {
1800
+ submitter: string | null;
1801
+ submissionDate: string | null;
1802
+ };
1803
+ };
1804
+ derived: Record<string, number | null>;
1805
+ ext: Record<string, EngineExtFact>;
1806
+ ai: Record<string, EngineAiFact>;
1807
+ formProof: {
1808
+ pinned: string;
1809
+ live: string | null;
1810
+ drifted: boolean;
1811
+ };
1812
+ /** The check settings in effect for the run (§B.2) — why AI did or didn't run. */
1813
+ settings?: {
1814
+ allowAiChecks: boolean;
1815
+ allowImageChecks: boolean;
1816
+ };
1817
+ }
1818
+ /** The billing receipt (§B.5) — the owner's charges, never the engine's costs. */
1819
+ interface EngineBilling {
1820
+ /** The engine receipt's lines carry usd + the frozen credits figure; the UI shows USD only. */
1821
+ base?: {
1822
+ usd: number;
1823
+ credits: number;
1824
+ };
1825
+ aiChecks?: {
1826
+ count: number;
1827
+ usd: number;
1828
+ credits: number;
1829
+ };
1830
+ imageChecks?: {
1831
+ count: number;
1832
+ usd: number;
1833
+ credits: number;
1834
+ };
1835
+ /** The PRICING snapshot in effect when the run was charged. */
1836
+ model?: Record<string, number>;
1837
+ /** Present on free runs (`no_rubric` / `unusable`) with the reason. */
1838
+ free?: string;
1839
+ }
1840
+ interface EngineEvaluation {
1841
+ collectionId: string;
1842
+ rubricId: string | null;
1843
+ status: 'decided' | 'pending_review' | 'unusable' | 'no_rubric';
1844
+ verdict: 'approve' | 'partial' | 'reject' | 'review' | null;
1845
+ verdictClass: string | null;
1846
+ action: string | null;
1847
+ totalBps: number | null;
1848
+ decision: EngineDecision | null;
1849
+ explanation: string | null;
1850
+ trace: EngineTrace | null;
1851
+ revenueUsd: number;
1852
+ billing: EngineBilling | null;
1853
+ resultDigest: string;
1854
+ createdAt: string;
1855
+ }
1856
+ /** Human-review completion row (§A.10) — null until a person has answered. */
1857
+ interface EngineReview {
1858
+ status: 'received' | 'completed' | 'failed';
1859
+ reviewerDid: string;
1860
+ answers: Record<string, boolean | string>;
1861
+ createdAt: string;
1862
+ finalVerdict: string | null;
1863
+ finalVerdictClass: string | null;
1864
+ finalAction: string | null;
1865
+ finalTotalBps: number | null;
1866
+ finalDecision: EngineDecision | null;
1867
+ finalExplanation: string | null;
1868
+ finalDigest: string | null;
1869
+ completedAt: string | null;
1870
+ }
1871
+ /**
1872
+ * The engine's duplicate case for one claim (duplicate-detection spec §6),
1873
+ * derived server-side from the frozen `trace.unique` — `reason` is a finished
1874
+ * sentence the UI renders VERBATIM, never re-derived here. Null when the run
1875
+ * had no duplicate rule (or predates the feature).
1876
+ */
1877
+ interface EngineDuplicate {
1878
+ ruleId: string;
1879
+ /** Similarity in basis points (0–10000) — `/100` for the percent shown. */
1880
+ scoreBps: number;
1881
+ band: 'pass' | 'review' | 'reject';
1882
+ /** "Same attachment as claim X (different submitter)", "72% similar to claim X", … */
1883
+ reason: string;
1884
+ winnerKind: string | null;
1885
+ /** The prior claims it matched — `verdict` is theirs, not this claim's. */
1886
+ candidates: Array<{
1887
+ claimId: string;
1888
+ verdict: string | null;
1889
+ sameAgent: boolean;
1890
+ }>;
1891
+ }
1892
+ /**
1893
+ * What the reader must DO — the one thing every surface routes on (eval-ui
1894
+ * humanization design §3.1). Cross-repo contract with eval-engine's
1895
+ * `decision-summary.ts`: field names and members are transcribed verbatim,
1896
+ * never re-derived here. Deliberately no `canAnswer` member — the review
1897
+ * lane's assignee gate is uniform (design §3.5), so a boolean that would
1898
+ * always be true for every reader who can see it is not a field.
1899
+ */
1900
+ type Disposition = 'settled' | 'engine_signing' | 'sign_to_settle' | 'your_call_on_chain' | 'answer_questions' | 'decide_yourself' | 'nothing_ran';
1901
+ /**
1902
+ * The engine's read-time decision projection (design §3.1) — derived
1903
+ * server-side from the stored `decision` jsonb + `trace` + the chain row on
1904
+ * every read, never a stored column. The UI renders `headline`/`detail`
1905
+ * verbatim; it does not compose prose from `decision`/`trace` itself.
1906
+ */
1907
+ interface DecisionSummary {
1908
+ /**
1909
+ * Sentence case. Never an id, code, or score. Two shapes only: a bare subject, ≤ 4 words
1910
+ * ("Rejected as a duplicate", "Needs your answer"), or a subject ≤ 4 words + the §14
1911
+ * disposition suffix " — your call" (load-bearing, does NOT count toward the limit — a §14
1912
+ * hold must never read as a decision that landed on chain, so it is never shortened).
1913
+ */
1914
+ headline: string;
1915
+ /**
1916
+ * At most TWO short sentences, ≤ 140 chars total, second person, no ids. When there are two,
1917
+ * the split is deliberate and always the same: what the engine found, then what you do about
1918
+ * it — "All 10 checks passed. Approve it below to write that on chain."
1919
+ */
1920
+ detail: string;
1921
+ disposition: Disposition;
1922
+ /**
1923
+ * True iff this claim still owes SOMEONE a decision — a property of the record, not of the
1924
+ * caller (spec §3.1, corrected). `settled`, `engine_signing` and `nothing_ran` are always
1925
+ * false. It deliberately does NOT account for a review assigned to a different person: the
1926
+ * producer has no caller identity, so it cannot — an earlier version of this comment said it
1927
+ * did, which left the rule split three ways (spec, producer, consumer each holding a
1928
+ * different version; Important 2, coordinator review round 3).
1929
+ *
1930
+ * **The consumer narrows it, in exactly one place.** "An assigned review is that person's
1931
+ * queue, and being able to step in is not the same as owing it" is a client-side judgement,
1932
+ * because only the client knows who is looking. That narrowing happens once, in the row
1933
+ * view-model (`engineRowViewOf` / `rowViewByClaimId` in `EvaluateClaimFlowDetail.tsx`), and
1934
+ * the rail, the "Owed by you" filter and its count all read the narrowed value — reading raw
1935
+ * `owed` in any of the three puts a claim in the count that shows no rail.
1936
+ */
1937
+ owed: boolean;
1938
+ /** How the chain stands, in the reader's words. Null when there is no chain row yet. */
1939
+ chainState: {
1940
+ label: string;
1941
+ written: boolean;
1942
+ } | null;
1943
+ /** Max 3. Rendered as quiet neutral chips — never coloured, never the signal. */
1944
+ facts: Array<{
1945
+ kind: 'checks' | 'score' | 'match' | 'window' | 'cost';
1946
+ text: string;
1947
+ }>;
1948
+ /** Ids pulled OUT of prose so the client can truncate, copy, and link them. */
1949
+ refs: Array<{
1950
+ kind: 'claim';
1951
+ id: string;
1952
+ label: string;
1953
+ }>;
1954
+ /** Drives the "Why this result?" default state — open only when worth reading. */
1955
+ expandByDefault: boolean;
1956
+ }
1957
+ /** GET /v1/claims/:claimId — the full engine record for one claim. */
1958
+ interface ClaimEvaluationRecord {
1959
+ claimId: string;
1960
+ ingest: EngineIngest | null;
1961
+ evaluation: EngineEvaluation | null;
1962
+ review: EngineReview | null;
1963
+ /** The duplicate case (§6) — a sibling of `evaluation`, not part of the decision. */
1964
+ duplicate?: EngineDuplicate | null;
1965
+ /** The full decision summary (design §3.1) — presentation only, derived at read time. */
1966
+ summary?: DecisionSummary | null;
1967
+ }
1968
+ /** Typed 403 — the reader lacks evaluate rights; rendered as copy, never a toast. */
1969
+ interface ClaimEvaluationForbidden {
1970
+ forbidden: true;
1971
+ }
1972
+ /** GET /v1/claims?collectionId= item — drives the list view's engine badges. */
1973
+ interface ClaimEvaluationSummary {
1974
+ claimId: string;
1975
+ ingestStatus: 'queued' | 'processed' | 'failed';
1976
+ evalStatus: string | null;
1977
+ verdict: string | null;
1978
+ totalBps: number | null;
1979
+ evaluatedAt: string | null;
1980
+ /**
1981
+ * The raw ledger/review columns the list route still returns alongside `summary` — kept on
1982
+ * the wire, but no longer read by `EngineBadge`/`engineRowViewOf`, which derive the row's one
1983
+ * status word from `summary` exclusively (design §3.1). This comment used to claim the badge
1984
+ * read these directly; it never has since the humanization pass (stale comment fixed,
1985
+ * coordinator review round 3).
1986
+ */
1987
+ reviewStatus?: 'received' | 'completed' | 'failed' | null;
1988
+ finalVerdict?: string | null;
1989
+ finalTotalBps?: number | null;
1990
+ /**
1991
+ * The duplicate case (§6) — a sibling fact, not read by the row anymore. The separate
1992
+ * "Duplicate 92%" chip this used to drive is gone (design §4.7): a flagged duplicate now folds
1993
+ * into `summary.headline` ("Duplicate — your call") like every other disposition. Kept on the
1994
+ * wire for `VerdictBlock`'s detail-view use of the equivalent `ClaimEvaluationRecord.duplicate`
1995
+ * (a different field on a different response), not this one.
1996
+ */
1997
+ duplicate?: EngineDuplicate | null;
1998
+ /** Reduced projection of the full summary (design §3.2) — one status word without re-deriving anything client-side. */
1999
+ summary?: Pick<DecisionSummary, 'headline' | 'disposition' | 'owed' | 'chainState'> | null;
2000
+ }
2001
+ /** One published price card. Prices are per relayer node, so which card applies depends on the collection. */
2002
+ interface EngineRateCard {
2003
+ name?: string;
2004
+ /** Base fee per evaluated claim. */
2005
+ baseUsd: number;
2006
+ /** Top-up per AI rule run per claim. */
2007
+ aiRuleUsd: number;
2008
+ /** Top-up per photo screened. */
2009
+ photoUsd: number;
2010
+ /** Top-up per agent-submitted claim. */
2011
+ agentClaimUsd?: number;
2012
+ }
2013
+ /**
2014
+ * GET /v1/pricing?collectionId= — what a claim actually costs ONE collection's
2015
+ * owner (per-claim billing guide §11). `estimate.ownerPaysUsd` is the number
2016
+ * that matters: the card MINUS what the collection's own on-chain evaluation
2017
+ * payment already credits back, which is why a well-funded collection can owe
2018
+ * nothing. `aiRules` is counted off the pinned rubric, so the estimate is real.
2019
+ */
2020
+ interface EnginePricing {
2021
+ /** The relayer node the collection's entity sits on — it selects the card. */
2022
+ relayerNode: {
2023
+ label: string;
2024
+ isIxo: boolean;
2025
+ };
2026
+ rateCard: EngineRateCard;
2027
+ /** The collection's on-chain evaluation payment — what funds the offset. */
2028
+ evaluationPayment: {
2029
+ amount: string;
2030
+ denom: string;
2031
+ usd: number;
2032
+ allowlisted: boolean;
2033
+ } | null;
2034
+ estimate: {
2035
+ aiRules: number;
2036
+ cardUsd: number;
2037
+ chainCreditUsd: number;
2038
+ ownerPaysUsd: number;
2039
+ } | null;
2040
+ }
1694
2041
  interface BlocknoteHandlers {
1695
2042
  getVote: (proposalContractAddress: string, proposalId: string, userAddress: string) => Promise<VoteResponse>;
1696
2043
  getProposal: (proposalContractAddress: string, proposalId: string) => Promise<ProposalResponse>;
@@ -1951,9 +2298,18 @@ interface BlocknoteHandlers {
1951
2298
  getBalanceDetails?: (id: string) => Promise<BalanceDetails>;
1952
2299
  getDeedSubscriptionDetails?: (id: string) => Promise<DeedSubscriptionDetails>;
1953
2300
  getClaimDetails?: (id: string) => Promise<ClaimDetails>;
2301
+ /**
2302
+ * Resolve a collection's claim form (`#vct`). `proof` and `resourceId`
2303
+ * describe the LinkedResource the content was read from — the rubric builder
2304
+ * pins them as its form binding (§A.3). Both are OPTIONAL: a host that does
2305
+ * not supply them leaves the pin blank, which stays valid (nothing enforces
2306
+ * it yet), and `qi/claim.submit` never reads them.
2307
+ */
1954
2308
  getDeedSurveyTemplate: (deedDid: string, claimCollectionId?: string) => Promise<{
1955
2309
  surveyTemplate: any;
1956
2310
  claimCollectionId: string;
2311
+ proof?: string;
2312
+ resourceId?: string;
1957
2313
  } | null>;
1958
2314
  submitClaim: (params: {
1959
2315
  surveyData: any;
@@ -2172,6 +2528,58 @@ interface BlocknoteHandlers {
2172
2528
  /** Base64-encoded CAR bytes */
2173
2529
  delegation: string;
2174
2530
  }>;
2531
+ /**
2532
+ * Mint the `owner → oracle` enrolment delegation host-side and return its
2533
+ * serialized base64-CAR `token` (to deposit into the UCAN Store). The host owns
2534
+ * the oracle-DID default (devnet `did:ixo:ixo1fyc0…`), the `issuerType:'user'`
2535
+ * signing, medium TTL, and revocability — the editor passes nothing, or only the
2536
+ * optional overrides.
2537
+ *
2538
+ * Both capabilities are REQUIRED: `{ can:'*', with:'ixo:matrix-claims-bot' }`
2539
+ * (read the claims) and `{ can:'subscriptions/read', with:'ixo:subscriptions' }`
2540
+ * (let the engine resolve the owner's oracle claim collection, the only account
2541
+ * a per-claim fee can be billed to). See `EvalRegisterService.mintBotDelegation`.
2542
+ */
2543
+ mintBotDelegation?: (params: {
2544
+ ttlDays?: number;
2545
+ oracleDid?: string;
2546
+ pin?: string;
2547
+ evalEngineUrl?: string;
2548
+ }) => Promise<{
2549
+ token: string;
2550
+ }>;
2551
+ /**
2552
+ * Deposit a delegation CAR into the UCAN Store
2553
+ * (`POST {ucanStoreUrl}/api/delegations { token }`), authorized by a
2554
+ * self-signed `store/add` invocation the host mints. `ucanStoreUrl` is
2555
+ * optional — resolve it from the host's configured network when omitted.
2556
+ * Returns the stored delegation's CID.
2557
+ */
2558
+ depositDelegation?: (params: {
2559
+ token: string;
2560
+ note?: string;
2561
+ ucanStoreUrl?: string;
2562
+ }) => Promise<{
2563
+ cid: string;
2564
+ }>;
2565
+ /**
2566
+ * Register a collection with the Evaluation Engine
2567
+ * (`POST {evalEngineUrl}/v1/collections/register
2568
+ * { collectionId, deedDid, ownerDid, rubricId? }`), authorized by a host-minted
2569
+ * UCAN invocation on `ixo:eval-engine`. `evalEngineUrl` is optional — resolve
2570
+ * it from the host's configured network when omitted. Idempotent upsert on
2571
+ * `collectionId`; returns the engine's registration `id`.
2572
+ */
2573
+ registerEvalCollection?: (params: {
2574
+ collectionId: string;
2575
+ deedDid: string;
2576
+ ownerDid: string;
2577
+ rubricId?: string;
2578
+ evalEngineUrl?: string;
2579
+ }) => Promise<{
2580
+ id: string;
2581
+ collectionId?: string;
2582
+ }>;
2175
2583
  /**
2176
2584
  * Create an invocation using @ixo/ucan (CAR format)
2177
2585
  */
@@ -2485,6 +2893,96 @@ interface BlocknoteHandlers {
2485
2893
  rubric: any;
2486
2894
  claimCollectionId: string;
2487
2895
  } | null>;
2896
+ /**
2897
+ * Fetch the evaluation engine's canonical rubric JSON Schema — a public GET of
2898
+ * `/v1/rubric-schema` (rubric-spec §A.12). The rubric builder compiles it with
2899
+ * Ajv and validates the rules' shape against it, so the editor can never
2900
+ * publish a shape the engine will reject. `evalEngineUrl` is optional — the
2901
+ * host resolves it from its configured network when omitted.
2902
+ */
2903
+ getRubricSchema?: (evalEngineUrl?: string) => Promise<object>;
2904
+ /**
2905
+ * Ask the engine to check a rubric BEFORE it is anchored (eval-engine §C.7).
2906
+ * Stronger than `getRubricSchema`'s local Ajv pass: the engine re-parses the
2907
+ * envelope, re-binds against the LIVE claim form, and checks the collection's
2908
+ * engine settings — the last of which the editor cannot see at all (AI rules
2909
+ * on a collection with AI checks off are publishable but never run). The
2910
+ * publish step blocks on any error, so the owner never signs an anchor
2911
+ * transaction for rules that cannot work. Read-only.
2912
+ */
2913
+ previewRubric?: (params: {
2914
+ collectionId: string;
2915
+ rubric: unknown;
2916
+ evalEngineUrl?: string;
2917
+ /**
2918
+ * True only on a user gesture that is ALREADY collecting a PIN (the publish step). The
2919
+ * builder re-checks on every edit, so by default the host mints SILENTLY and resolves `null`
2920
+ * when the wallet is locked, rather than interrupting authoring with the PIN modal.
2921
+ */
2922
+ interactive?: boolean;
2923
+ /**
2924
+ * The engine settings the author INTENDS to enrol with — lets the engine judge AI rules
2925
+ * truthfully before the collection is enrolled (the stored row doesn't exist yet, or is stale
2926
+ * against the block's unexecuted toggles). Absent = the engine falls back to its stored row.
2927
+ */
2928
+ settings?: {
2929
+ allowAiChecks: boolean;
2930
+ allowImageChecks: boolean;
2931
+ allowChainEvaluation: boolean;
2932
+ };
2933
+ }) => Promise<{
2934
+ ok: boolean;
2935
+ problems: {
2936
+ code: string;
2937
+ severity: 'error' | 'warning';
2938
+ path: string;
2939
+ message: string;
2940
+ }[];
2941
+ settings: {
2942
+ allowAiChecks: boolean;
2943
+ allowImageChecks: boolean;
2944
+ allowChainEvaluation: boolean;
2945
+ };
2946
+ } | null>;
2947
+ /**
2948
+ * Test a single §A.14 external source live for the rubric builder's Test
2949
+ * button (rubric-spec §B.5). The host makes the real UCAN-signed HTTP call to
2950
+ * `source.audience` with the author's `sampleValues` (one per `send` key) and
2951
+ * returns what happened. Optional — the builder disables Test and shows a hint
2952
+ * when a host has not wired it.
2953
+ */
2954
+ testExternalSource?: (params: {
2955
+ source: object;
2956
+ sampleValues?: Record<string, string | number | boolean>;
2957
+ }) => Promise<SourcePreviewResult>;
2958
+ /**
2959
+ * Resolve a §A.14 external source's `did:web:` audience from its endpoint, so
2960
+ * the rubric builder can auto-fill it instead of asking the author to paste a
2961
+ * DID (rubric-spec §B.5). Public host read — no signing, no PIN.
2962
+ * `resolved:false` (or no handler) makes the builder reveal a manual audience
2963
+ * box; `audience` stays required in the format.
2964
+ */
2965
+ resolveSourceDid?: (params: {
2966
+ endpoint: string;
2967
+ }) => Promise<{
2968
+ did: string | null;
2969
+ resolved: boolean;
2970
+ error: string | null;
2971
+ }>;
2972
+ /**
2973
+ * The protocol entity's existing `#rub` LinkedResource — its on-chain `id`
2974
+ * EXACTLY as stored (may be the literal template `{id}#rub`) and `proof`, or
2975
+ * `null` when the entity carries none. The publish path reads it to compose a
2976
+ * replace-in-place (delete + add in ONE transaction, delete first) — IID has
2977
+ * no update, and a bare second add is rejected as a duplicated resource id
2978
+ * (x/iid). Throws on a genuine query failure; the publish must then stop.
2979
+ */
2980
+ getRubricResource?: (params: {
2981
+ protocolDid: string;
2982
+ }) => Promise<{
2983
+ id: string;
2984
+ proof: string;
2985
+ } | null>;
2488
2986
  /**
2489
2987
  * Evaluate a claim using a rubric via the rubric engine
2490
2988
  */
@@ -2523,6 +3021,73 @@ interface BlocknoteHandlers {
2523
3021
  };
2524
3022
  error?: string;
2525
3023
  }>;
3024
+ /**
3025
+ * The engine's full record for one claim (GET /v1/claims/:claimId, signed
3026
+ * UCAN like `pinRubric`). Resolves `null` on 404 — the UI's "engine hasn't
3027
+ * seen this claim yet" state, never an error toast — and `{forbidden: true}`
3028
+ * on 403 (the reader lacks evaluate rights on the collection).
3029
+ */
3030
+ getClaimEvaluation?: (params: {
3031
+ claimId: string;
3032
+ evalEngineUrl?: string;
3033
+ }) => Promise<ClaimEvaluationRecord | ClaimEvaluationForbidden | null>;
3034
+ /**
3035
+ * Engine summaries for a collection's claims (GET /v1/claims?collectionId=),
3036
+ * merged into the block's list view by claimId for the per-row badges.
3037
+ */
3038
+ /**
3039
+ * `notEnrolled: true` = the collection isn't registered with the engine (a normal state —
3040
+ * the block shows its "try the Evaluation Engine" promo, never an error).
3041
+ */
3042
+ listClaimEvaluations?: (params: {
3043
+ collectionId: string;
3044
+ evalEngineUrl?: string;
3045
+ }) => Promise<{
3046
+ items: ClaimEvaluationSummary[];
3047
+ nextCursor: string | null;
3048
+ notEnrolled?: boolean;
3049
+ }>;
3050
+ /**
3051
+ * Send a human review's answers (POST /v1/claims/:claimId/review, §A.10).
3052
+ * All-or-nothing: `answers` must cover exactly the decision's pendingTasks.
3053
+ * Idempotent until completed — re-sending the same answers is the recovery
3054
+ * path; the host maps 409s to plain copy ("Someone already reviewed this
3055
+ * claim" / "This claim's evaluation changed — refresh and look again").
3056
+ */
3057
+ submitClaimReview?: (params: {
3058
+ claimId: string;
3059
+ resultDigest: string;
3060
+ answers: Record<string, boolean | string>;
3061
+ evalEngineUrl?: string;
3062
+ }) => Promise<{
3063
+ status: 'completing';
3064
+ } | {
3065
+ status: 'conflict';
3066
+ message: string;
3067
+ }>;
3068
+ /**
3069
+ * The engine's live price for one collection (GET /v1/pricing?collectionId=,
3070
+ * per-claim billing guide §11). Public and unauthenticated on the engine, but
3071
+ * the block still asks the host rather than fetching a URL itself. Resolves
3072
+ * `null` when the engine is unreachable or doesn't know the collection — the
3073
+ * pricing surface then falls back to its static card, because a price read
3074
+ * must never be the reason someone cannot enrol.
3075
+ */
3076
+ getEnginePricing?: (params: {
3077
+ collectionId: string;
3078
+ evalEngineUrl?: string;
3079
+ }) => Promise<EnginePricing | null>;
3080
+ /**
3081
+ * The signed-in owner's notification email, for PREFILLING the eval.register
3082
+ * block's required "Billing email" field (engine billing guide §10; owner,
3083
+ * 2026-07-30). The host owns where it comes from (the portal reads auth-hub's
3084
+ * `GET /api/user/email` with a self-signed user UCAN, session-cached — the
3085
+ * endpoint is rate-limited per user). MUST resolve `null` on any failure —
3086
+ * signed-out, no email on file, rate-limited — and never throw into a block
3087
+ * render; the block then leaves the field empty for the owner to type.
3088
+ * Absent handler (an older host) means no prefill, nothing else breaks.
3089
+ */
3090
+ getNotificationEmail?: () => Promise<string | null>;
2526
3091
  /**
2527
3092
  * Create a Universal Decentralized Identifier (UDID) for an evaluation result
2528
3093
  */
@@ -2628,6 +3193,30 @@ interface BlocknoteHandlers {
2628
3193
  sourceDomainSpaces?: (params?: {
2629
3194
  entityDid?: string;
2630
3195
  }) => Promise<MatrixSpaceStructure>;
3196
+ /**
3197
+ * The domain's LIVE channel list (joined, named chat rooms under its main
3198
+ * space — a client-side `m.space.child` walk on the host). Preferred by the
3199
+ * rubric reviewer picker over flattening `sourceDomainSpaces`, whose `rooms`
3200
+ * arrays are the space skeleton rather than the channels.
3201
+ */
3202
+ listDomainChannels?: (params?: {
3203
+ entityDid?: string;
3204
+ }) => Promise<Array<{
3205
+ roomId: string;
3206
+ name: string;
3207
+ }>>;
3208
+ /**
3209
+ * Let the evaluation engine into a review channel, so it can post the claims
3210
+ * that need a person. Called the moment the author routes reviews to a channel
3211
+ * — the engine can only post where it is a member, and that is part of picking
3212
+ * a channel rather than a step the author has to remember. The host owns the
3213
+ * chat client and the engine's identity; the block only reports the outcome.
3214
+ */
3215
+ inviteEvalEngineToChannel?: (params: {
3216
+ roomId: string;
3217
+ }) => Promise<{
3218
+ status: 'invited' | 'already-there' | 'not-configured';
3219
+ }>;
2631
3220
  /**
2632
3221
  * Create a Cosmos governance group from explicit members and decision policy.
2633
3222
  * Used by the POD setup flow after domain entity creation.
@@ -6185,11 +6774,14 @@ interface ActionHandlers {
6185
6774
  createProposal?: (...args: any[]) => any;
6186
6775
  getUserRoles?: (...args: any[]) => any;
6187
6776
  getClaimData?: (...args: any[]) => any;
6777
+ getDeedSurveyTemplate?: (...args: any[]) => any;
6778
+ getDeedRubric?: (...args: any[]) => any;
6188
6779
  requestPin?: (...args: any[]) => any;
6189
6780
  signCredential?: (...args: any[]) => any;
6190
6781
  publicFileUpload?: (...args: any[]) => any;
6191
6782
  createDomain?: (...args: any[]) => any;
6192
6783
  createAddLinkedResourceMessage?: (...args: any[]) => any;
6784
+ createDeleteLinkedResourceMessage?: (...args: any[]) => any;
6193
6785
  executeTransaction?: (...args: any[]) => any;
6194
6786
  createGovernanceGroup?: (...args: any[]) => any;
6195
6787
  getEntityDid?: (...args: any[]) => any;
@@ -7177,6 +7769,266 @@ interface FlowRunLifecycleService {
7177
7769
  cancelledAt?: number;
7178
7770
  }>;
7179
7771
  }
7772
+ /**
7773
+ * Evaluation-Engine enrollment service (qi/eval.register — pull-claim-spec §6).
7774
+ * The editor declares the contract only; the consumer app implements each
7775
+ * method. All three signing/HTTP steps live host-side (the portal owns the
7776
+ * oracle-DID default, the delegation's capability list, the UCAN mints, and the
7777
+ * HTTP). The editor only orchestrates the calls. See the
7778
+ * module comment in `actions/evalRegister/evalRegister.ts` for the one-signed-step
7779
+ * flow. All-or-nothing group (see adapters.ts).
7780
+ */
7781
+ interface EvalRegisterService {
7782
+ /**
7783
+ * Prompt the user for their verification PIN — the user-authorization gate for
7784
+ * the host-signed enrollment (primes the host signer session the delegation
7785
+ * mint uses). Same primitive as `ClaimService.requestPin`; declared here so
7786
+ * the composite action depends on this one service group.
7787
+ */
7788
+ requestPin: (config?: {
7789
+ title?: string;
7790
+ description?: string;
7791
+ submitText?: string;
7792
+ }) => Promise<string>;
7793
+ /**
7794
+ * Mint the `owner → oracle` enrolment delegation host-side and return its
7795
+ * serialized base64-CAR `token` (deposited into the UCAN Store). The host owns
7796
+ * the oracle-DID default, the `issuerType:'user'` signing, and revocability —
7797
+ * so the block passes nothing, or only the optional overrides
7798
+ * (`oracleDid`, `ttlDays`).
7799
+ *
7800
+ * The host MUST grant BOTH capabilities — one delegation, two things the
7801
+ * engine does on the owner's behalf:
7802
+ * - `{ can: '*', with: 'ixo:matrix-claims-bot' }`
7803
+ * read the collection's claim bodies out of Matrix.
7804
+ * - `{ can: 'subscriptions/read', with: 'ixo:subscriptions' }`
7805
+ * ask subscriptions-api for the owner's ORACLE CLAIM COLLECTION, which
7806
+ * is the only account a per-claim fee can be billed to. subscriptions-api
7807
+ * resolves the acting user as the delegation ROOT, so an engine-signed
7808
+ * invocation proved by this delegation returns the OWNER's subscription.
7809
+ * Omit it and enrolment succeeds but the collection can never be billed —
7810
+ * the engine 403s the register with a "re-register" message rather than
7811
+ * recording that silently.
7812
+ *
7813
+ * Hosts SHOULD echo back the resolved `oracleDid` (the delegation audience) —
7814
+ * the standard submit-authz grant derives the engine's grantee address from it
7815
+ * when the block carries no explicit `oracleDid`/`oracleAddress` override.
7816
+ */
7817
+ mintBotDelegation: (params: {
7818
+ ttlDays?: number;
7819
+ oracleDid?: string;
7820
+ pin?: string;
7821
+ evalEngineUrl?: string;
7822
+ }) => Promise<{
7823
+ token: string;
7824
+ oracleDid?: string;
7825
+ }>;
7826
+ /**
7827
+ * Deposit a delegation CAR into the UCAN Store
7828
+ * (`POST {ucanStoreUrl}/api/delegations { token }`), authorized by a
7829
+ * self-signed `store/add` invocation the host mints. `ucanStoreUrl` is
7830
+ * optional — the host resolves it from its configured network when omitted.
7831
+ */
7832
+ depositDelegation: (params: {
7833
+ token: string;
7834
+ note?: string;
7835
+ ucanStoreUrl?: string;
7836
+ }) => Promise<{
7837
+ cid: string;
7838
+ }>;
7839
+ /**
7840
+ * Register the collection with the Evaluation Engine
7841
+ * (`POST {evalEngineUrl}/v1/collections/register
7842
+ * { collectionId, deedDid, ownerDid, rubricId?, settings? }`), authorized
7843
+ * host-side by a UCAN invocation on `ixo:eval-engine`. `evalEngineUrl` is
7844
+ * optional — the host resolves it from its configured network when omitted.
7845
+ * Idempotent upsert on `collectionId` (re-registering updates `settings` —
7846
+ * that is the v1 "change my mind" path); returns the engine's registration
7847
+ * `id`. `settings` gates the engine's paid check lanes per collection
7848
+ * (eval-dashboard spec §B.1); the host forwards it verbatim.
7849
+ */
7850
+ registerCollection: (params: {
7851
+ collectionId: string;
7852
+ deedDid: string;
7853
+ ownerDid: string;
7854
+ rubricId?: string;
7855
+ evalEngineUrl?: string;
7856
+ /**
7857
+ * Owner-typed collection name — the engine renders its billing notices as
7858
+ * `Name (collection 913)` when set. Forwarded verbatim; the engine trims
7859
+ * and caps it (120).
7860
+ */
7861
+ displayName?: string;
7862
+ /**
7863
+ * Owner-written description of what this collection collects — the context the engine's
7864
+ * duplicate-claim judge is missing when it compares two submissions. Composed by the block
7865
+ * from three plain questions (`evalRegister/description.ts`); the engine stores it as ONE
7866
+ * opaque string (max 1000, never parsed). Same "no opinion" semantics as `displayName`:
7867
+ * OMITTED leaves any stored description alone, an explicit `''` erases it — so hosts must
7868
+ * forward the key only when it is actually present.
7869
+ */
7870
+ description?: string;
7871
+ /**
7872
+ * The address the engine sends this collection's billing notices to.
7873
+ * Client-supplied on purpose — the owner naming their own notification
7874
+ * address, not an authorization input. The action REQUIRES it before
7875
+ * signing (owner, 2026-07-30), so hosts always receive one; the param
7876
+ * stays optional only so older callers keep compiling.
7877
+ */
7878
+ notifyEmail?: string;
7879
+ settings?: {
7880
+ allowAiChecks: boolean;
7881
+ allowImageChecks: boolean;
7882
+ allowChainEvaluation: boolean;
7883
+ };
7884
+ }) => Promise<{
7885
+ id: string;
7886
+ collectionId?: string;
7887
+ }>;
7888
+ }
7889
+ /**
7890
+ * Rubric publishing service (qi/eval.rubric — rubric-spec §C.1). The editor
7891
+ * declares the contract only; the consumer app implements it. `uploadRubric`
7892
+ * uploads the serialized JSON-LD document to Matrix media (the portal's
7893
+ * `publicUploadToMatrix`: public HTTP media URL + sha256 content proof — NOT
7894
+ * the generic `publicFileUpload`, which returns an empty proof). `pinRubric`
7895
+ * is the optional best-effort engine notification: the host forwards the new
7896
+ * `rubricId` to the evaluation engine's register upsert; the engine re-resolves
7897
+ * from chain regardless, so failures never fail a run.
7898
+ */
7899
+ /**
7900
+ * The result of a live §A.14 external-source test — the host makes the real
7901
+ * HTTP call (UCAN-signed to the source's `audience`) with the author's sample
7902
+ * values and reports back what happened, so the builder can show ✅/❌ without
7903
+ * ever judging a claim itself. `reachable`/`httpStatus` describe the transport,
7904
+ * `contractOk`/`value`/`reason` the answer, `error` any failure in the author's
7905
+ * words, and `sent` the exact payload that went on the wire.
7906
+ */
7907
+ interface SourcePreviewResult {
7908
+ ok: boolean;
7909
+ reachable: boolean;
7910
+ httpStatus: number | null;
7911
+ contractOk: boolean;
7912
+ expect: 'boolean' | 'score';
7913
+ value: boolean | number | null;
7914
+ reason: string | null;
7915
+ error: string | null;
7916
+ sent: Record<string, unknown>;
7917
+ audience: string;
7918
+ elapsedMs: number;
7919
+ }
7920
+ /**
7921
+ * The engine's verdict on a rubric BEFORE it is anchored (§C.7). `problems` carries schema
7922
+ * violations, binder issues against the LIVE claim form, and the one thing the editor cannot
7923
+ * check for itself — whether the collection's engine settings actually permit these rules.
7924
+ */
7925
+ interface RubricPreviewResult {
7926
+ ok: boolean;
7927
+ problems: {
7928
+ code: string;
7929
+ severity: 'error' | 'warning';
7930
+ path: string;
7931
+ message: string;
7932
+ }[];
7933
+ settings: {
7934
+ allowAiChecks: boolean;
7935
+ allowImageChecks: boolean;
7936
+ allowChainEvaluation: boolean;
7937
+ };
7938
+ }
7939
+ interface RubricService {
7940
+ /**
7941
+ * Upload the exact rubric bytes; returns the public media URL and the sha256
7942
+ * hex OF THOSE BYTES — which IS the rubric's id and its on-chain proof
7943
+ * (§A.10). An implementation must hash exactly what it stores and pass the
7944
+ * pre-serialized `json` string through untouched (no re-encoding, no
7945
+ * re-serialization), or the id stops identifying the document.
7946
+ */
7947
+ uploadRubric(params: {
7948
+ json: string;
7949
+ fileName?: string;
7950
+ }): Promise<{
7951
+ url: string;
7952
+ sha256: string;
7953
+ }>;
7954
+ /** Best-effort: tell the engine about the newly anchored rubric. Optional; never proof-bearing. */
7955
+ pinRubric?(params: {
7956
+ collectionId: string;
7957
+ rubricId: string;
7958
+ evalEngineUrl?: string;
7959
+ }): Promise<void>;
7960
+ /**
7961
+ * Ask the engine to check a rubric it has not seen yet (§C.7). Read-only — writes nothing and
7962
+ * anchors nothing. Optional: a host without it falls back to the local Ajv shape gate, which is
7963
+ * strictly weaker (no form binding, no settings check).
7964
+ */
7965
+ previewRubric?(params: {
7966
+ collectionId: string;
7967
+ rubric: unknown;
7968
+ evalEngineUrl?: string;
7969
+ /**
7970
+ * True only on a user gesture that is ALREADY collecting a PIN (the publish step). Otherwise
7971
+ * the host mints silently and returns `null` rather than interrupting authoring with a modal.
7972
+ */
7973
+ interactive?: boolean;
7974
+ /**
7975
+ * The engine settings the author INTENDS to enrol with — lets the engine judge AI rules
7976
+ * truthfully before the collection is enrolled (the stored row doesn't exist yet, or is stale
7977
+ * against the block's unexecuted toggles). Absent = the engine falls back to its stored row.
7978
+ */
7979
+ settings?: {
7980
+ allowAiChecks: boolean;
7981
+ allowImageChecks: boolean;
7982
+ allowChainEvaluation: boolean;
7983
+ };
7984
+ }): Promise<RubricPreviewResult | null>;
7985
+ /**
7986
+ * Fetch the engine's canonical rubric JSON Schema — a public GET of
7987
+ * `/v1/rubric-schema` (§A.12). `run()` compiles it once with Ajv and validates
7988
+ * the built envelope's SHAPE against it (the defense that the editor can never
7989
+ * publish a shape the engine rejects). `evalEngineUrl` is optional — the host
7990
+ * resolves it from its configured network when omitted.
7991
+ */
7992
+ getRubricSchema?: (evalEngineUrl?: string) => Promise<object>;
7993
+ /**
7994
+ * Test a single §A.14 external source live (§B.5): the host makes the real
7995
+ * UCAN-signed HTTP call to `source.audience` with the author's `sampleValues`
7996
+ * (one per `send` key) and returns what happened. Optional — the builder
7997
+ * disables the Test button and shows a hint when a host hasn't wired it.
7998
+ */
7999
+ testExternalSource?: (params: {
8000
+ source: object;
8001
+ sampleValues?: Record<string, string | number | boolean>;
8002
+ }) => Promise<SourcePreviewResult>;
8003
+ /**
8004
+ * Resolve a §A.14 source's `did:web:` audience from its endpoint — a public
8005
+ * host read (no signing, no PIN), so the builder can auto-fill `audience`
8006
+ * instead of asking the author to paste a DID. `resolved:false` (or an absent
8007
+ * handler) falls back to a manual `audience` box; `audience` stays REQUIRED.
8008
+ */
8009
+ resolveSourceDid?: (params: {
8010
+ endpoint: string;
8011
+ }) => Promise<{
8012
+ did: string | null;
8013
+ resolved: boolean;
8014
+ error: string | null;
8015
+ }>;
8016
+ /**
8017
+ * The protocol entity's existing `#rub` LinkedResource — its on-chain `id`
8018
+ * EXACTLY as stored (may be the literal template `{id}#rub`) and `proof` —
8019
+ * or `null` when the entity carries none. Read by `run()` before anchoring:
8020
+ * IID has no update, so republishing must DELETE the existing resource and
8021
+ * add the new one in the SAME transaction (delete first), or the chain
8022
+ * rejects the add as a duplicated resource id (x/iid). THROWS on a genuine
8023
+ * query failure — the publish must stop rather than add-and-fail on chain.
8024
+ */
8025
+ getRubricResource?: (params: {
8026
+ protocolDid: string;
8027
+ }) => Promise<{
8028
+ id: string;
8029
+ proof: string;
8030
+ } | null>;
8031
+ }
7180
8032
  /**
7181
8033
  * The full service contract an action execution context can carry. Composed
7182
8034
  * from the per-domain service interfaces above so consumers can implement and
@@ -7199,6 +8051,8 @@ interface ActionServices {
7199
8051
  carbon?: CarbonService;
7200
8052
  entity?: EntityService;
7201
8053
  kyc?: KycService;
8054
+ evalRegister?: EvalRegisterService;
8055
+ rubric?: RubricService;
7202
8056
  }
7203
8057
  interface OutputSchemaField {
7204
8058
  path: string;
@@ -8394,4 +9248,4 @@ interface IxoEditorConfig {
8394
9248
  tableHandles: boolean;
8395
9249
  }
8396
9250
 
8397
- export { type ImportProtocolTemplateResult as $, AuthzExecActionTypes as A, BlocknoteProvider as B, type SingleChoiceProposal as C, type DelegationChainValidationResult as D, type VoteResponse as E, type FlowRuntimeStateManager as F, type VoteInfo as G, type Vote as H, type InvocationStore as I, type User as J, type Addr as K, type Uint128 as L, type Expiration as M, type Status as N, type Threshold as O, type ProposalResponse as P, type Votes as Q, type CosmosMsgForEmpty as R, type StoredDelegation as S, type Timestamp as T, type UcanDelegationStore as U, ValidatorActionType as V, type ProposalAction as W, type ListProtocolDeedsWithTemplatesParams as X, type ProtocolDeedWithTemplates as Y, type ProtocolTemplateSummary as Z, type ImportProtocolTemplatesToSpaceParams as _, createUcanDelegationStore as a, assertRunActionExecutionAllowed as a$, type MatrixPrivacySettings as a0, type MatrixRoom as a1, type MatrixSpace as a2, type MatrixSubspace as a3, type MatrixSpaceStructure as a4, type Translate as a5, type FlowNode as a6, type FlowNodeAuthzExtension as a7, type EvaluationStatus as a8, type IxoEditorType as a9, type FlowMetadata as aA, createYDocRuntimeManager as aB, clearRuntimeForTemplateClone as aC, LEGACY_RUN_STORAGE_VERSION as aD, MULTI_RUN_STORAGE_VERSION as aE, RUNS_TERMINAL_MAP_KEY as aF, RUN_STORAGE_VERSION_KEY as aG, adoptLegacyRuntime as aH, clearAllActionState as aI, collectPhantomLegacyRun as aJ, createRunRuntimeReader as aK, createRunRuntimeReaderWithDoc as aL, createRunScopedRuntimeManager as aM, deleteActionState as aN, enableMultiRunStorage as aO, ensureRun as aP, getRunActionsMap as aQ, getRunMeta as aR, getRunsMap as aS, getRunsTerminalMap as aT, getRunStorageVersion as aU, hasLegacyRuntimeHistory as aV, isLegacyRuntimeAdoptionEnabled as aW, isRecordInRun as aX, readActionState as aY, readActionStates as aZ, resetActionState as a_, type PendingInvocation as aa, type ActionServices as ab, type ActionHandlers as ac, type RunEventAppender as ad, type ActionResult as ae, type ActionDefinition as af, type FlowNodeRuntimeState as ag, type IxoBlockProps as ah, type VisualizationRenderer as ai, type DynamicListData as aj, type DynamicListDataProvider as ak, type DynamicListPanelRenderer as al, type DomainCardRenderer as am, type DomainCardData as an, type UnlMapConfig as ao, type ActionDoneContract as ap, type ActionEventDefinition as aq, type OutputSchemaField as ar, type RunEventInput as as, type RunJsonValue as at, type ActionRunContext as au, type CompletionCheck as av, type ActionReadBackMetadata as aw, type ReadBackTerminalState as ax, type ActionProofDeclaration as ay, type RunRecordDetails as az, createMemoryUcanDelegationStore as b, type CollectionService as b$, isBelowTheLineBlock as b0, resolveActiveRunId as b1, resolveRecordRunId as b2, resolveRunIdForExecution as b3, resolveRunIdForRead as b4, seedRunFromLegacyRuntime as b5, setMultiRunStorage as b6, subscribeToActionState as b7, usesLegacyRuntimeCompatibility as b8, writeActionState as b9, RunNotReadyError as bA, type CancelRunParams as bB, type CloseRunParams as bC, type ActionRunEventInput as bD, type FinishRunResult as bE, type MigrateFlowParams as bF, type MigrateFlowResult as bG, type LifecycleRunEventInput as bH, type RunDefinitionBlock as bI, type RunDefinitionDrift as bJ, type RunDefinitionSnapshot as bK, type RunJsonObject as bL, type RunLogEventInput as bM, type RunLifecycleAuthorizationDecision as bN, type RunLifecycleAuthorizationRequest as bO, type RunLifecycleAuthorizer as bP, type RunLifecycleCapability as bQ, type RunManifest as bR, type RunSnapshot as bS, type StartRunParams as bT, type StartRunResult as bU, type ActionContext as bV, type HttpService as bW, type EmailService as bX, type NotifyService as bY, type BidService as bZ, type ClaimService as b_, ExplicitRunRequiredError as ba, TerminalRunExecutionError as bb, UnknownRunError as bc, type RunMeta as bd, type MultiRunMigrationResult as be, type RunStorageVersion as bf, type RunTerminalRecord as bg, buildRunDefinitionSnapshot as bh, cancelRun as bi, closeRun as bj, computeRunDefinitionHash as bk, computeRunSummary as bl, createRunId as bm, createRunUlid as bn, detectRunDefinitionDrift as bo, listOpenRuns as bp, listRuns as bq, migrateFlowToSessions as br, readRunActionStates as bs, recordRunDefinitionDrift as bt, setAdvisoryActiveRunId as bu, startRun as bv, toRunJsonValue as bw, FlowNotMigratedError as bx, RunLifecycleAuthorizationError as by, RunNotMigratedError as bz, createRuntimeStateManager as c, type CollectionUsersService as c0, type MatrixCredentialService as c1, type IntegrationsService as c2, type OracleService as c3, type CarbonService as c4, type EntityService as c5, type FlowRunLifecycleService as c6, appendRunRecord as c7, readRunRecords as c8, getPendingInvocationsMap as c9, countPendingInvocations as ca, getOrCreateBlockPendingMap as cb, readPendingInvocations as cc, queuePendingInvocation as cd, removePendingInvocation as ce, findFailedListenersForSourceRun as cf, replayFailedListenerRun as cg, snapshotInputRefs as ch, computePendingInvocationId as ci, RUN_RECORD_AUDIT_TYPE as cj, type FailedListenerRun as ck, type DID as cl, type ClaimCollectionURI as cm, type LinkedClaim as cn, type NodeServiceReport as co, type NodeState as cp, type FlowNodeBase as cq, type InvocationRequest as cr, type InvocationResult as cs, type ExecutionWithInvocationResult as ct, type FindProofsResult as cu, type CreateRootDelegationParams as cv, type CreateDelegationParams as cw, type CreateInvocationParams as cx, createInvocationStore as d, createMemoryInvocationStore as e, createUcanService as f, type UcanService as g, type UcanServiceConfig as h, type UcanServiceHandlers as i, type UcanCapability as j, type StoredInvocation as k, type DelegationGrant as l, type IxoEditorOptions as m, type IxoEditorTheme as n, type IxoEditorConfig as o, type IxoCollaborativeUser as p, type IxoCollaborativeEditorOptions as q, blockSpecs as r, getExtraSlashMenuItems as s, useBlocknoteHandlers as t, useBlocknoteContext as u, useTranslate as v, StakeType as w, type BlocknoteHandlers as x, type BlocknoteContextValue as y, type BlockRequirements as z };
9251
+ export { type ImportProtocolTemplateResult as $, AuthzExecActionTypes as A, BlocknoteProvider as B, type SingleChoiceProposal as C, type DelegationChainValidationResult as D, type VoteResponse as E, type FlowRuntimeStateManager as F, type VoteInfo as G, type Vote as H, type InvocationStore as I, type User as J, type Addr as K, type Uint128 as L, type Expiration as M, type Status as N, type Threshold as O, type ProposalResponse as P, type Votes as Q, type CosmosMsgForEmpty as R, type StoredDelegation as S, type Timestamp as T, type UcanDelegationStore as U, ValidatorActionType as V, type ProposalAction as W, type ListProtocolDeedsWithTemplatesParams as X, type ProtocolDeedWithTemplates as Y, type ProtocolTemplateSummary as Z, type ImportProtocolTemplatesToSpaceParams as _, createUcanDelegationStore as a, assertRunActionExecutionAllowed as a$, type MatrixPrivacySettings as a0, type MatrixRoom as a1, type MatrixSpace as a2, type MatrixSubspace as a3, type MatrixSpaceStructure as a4, type Translate as a5, type FlowNode as a6, type FlowNodeAuthzExtension as a7, type EvaluationStatus as a8, type IxoEditorType as a9, type FlowMetadata as aA, createYDocRuntimeManager as aB, clearRuntimeForTemplateClone as aC, LEGACY_RUN_STORAGE_VERSION as aD, MULTI_RUN_STORAGE_VERSION as aE, RUNS_TERMINAL_MAP_KEY as aF, RUN_STORAGE_VERSION_KEY as aG, adoptLegacyRuntime as aH, clearAllActionState as aI, collectPhantomLegacyRun as aJ, createRunRuntimeReader as aK, createRunRuntimeReaderWithDoc as aL, createRunScopedRuntimeManager as aM, deleteActionState as aN, enableMultiRunStorage as aO, ensureRun as aP, getRunActionsMap as aQ, getRunMeta as aR, getRunsMap as aS, getRunsTerminalMap as aT, getRunStorageVersion as aU, hasLegacyRuntimeHistory as aV, isLegacyRuntimeAdoptionEnabled as aW, isRecordInRun as aX, readActionState as aY, readActionStates as aZ, resetActionState as a_, type PendingInvocation as aa, type ActionServices as ab, type ActionHandlers as ac, type RunEventAppender as ad, type ActionResult as ae, type ActionDefinition as af, type FlowNodeRuntimeState as ag, type IxoBlockProps as ah, type VisualizationRenderer as ai, type DynamicListData as aj, type DynamicListDataProvider as ak, type DynamicListPanelRenderer as al, type DomainCardRenderer as am, type DomainCardData as an, type UnlMapConfig as ao, type ActionDoneContract as ap, type ActionEventDefinition as aq, type OutputSchemaField as ar, type RunEventInput as as, type RunJsonValue as at, type ActionRunContext as au, type CompletionCheck as av, type ActionReadBackMetadata as aw, type ReadBackTerminalState as ax, type ActionProofDeclaration as ay, type RunRecordDetails as az, createMemoryUcanDelegationStore as b, type CollectionService as b$, isBelowTheLineBlock as b0, resolveActiveRunId as b1, resolveRecordRunId as b2, resolveRunIdForExecution as b3, resolveRunIdForRead as b4, seedRunFromLegacyRuntime as b5, setMultiRunStorage as b6, subscribeToActionState as b7, usesLegacyRuntimeCompatibility as b8, writeActionState as b9, RunNotReadyError as bA, type CancelRunParams as bB, type CloseRunParams as bC, type ActionRunEventInput as bD, type FinishRunResult as bE, type MigrateFlowParams as bF, type MigrateFlowResult as bG, type LifecycleRunEventInput as bH, type RunDefinitionBlock as bI, type RunDefinitionDrift as bJ, type RunDefinitionSnapshot as bK, type RunJsonObject as bL, type RunLogEventInput as bM, type RunLifecycleAuthorizationDecision as bN, type RunLifecycleAuthorizationRequest as bO, type RunLifecycleAuthorizer as bP, type RunLifecycleCapability as bQ, type RunManifest as bR, type RunSnapshot as bS, type StartRunParams as bT, type StartRunResult as bU, type ActionContext as bV, type HttpService as bW, type EmailService as bX, type NotifyService as bY, type BidService as bZ, type ClaimService as b_, ExplicitRunRequiredError as ba, TerminalRunExecutionError as bb, UnknownRunError as bc, type RunMeta as bd, type MultiRunMigrationResult as be, type RunStorageVersion as bf, type RunTerminalRecord as bg, buildRunDefinitionSnapshot as bh, cancelRun as bi, closeRun as bj, computeRunDefinitionHash as bk, computeRunSummary as bl, createRunId as bm, createRunUlid as bn, detectRunDefinitionDrift as bo, listOpenRuns as bp, listRuns as bq, migrateFlowToSessions as br, readRunActionStates as bs, recordRunDefinitionDrift as bt, setAdvisoryActiveRunId as bu, startRun as bv, toRunJsonValue as bw, FlowNotMigratedError as bx, RunLifecycleAuthorizationError as by, RunNotMigratedError as bz, createRuntimeStateManager as c, type CollectionUsersService as c0, type MatrixCredentialService as c1, type IntegrationsService as c2, type OracleService as c3, type CarbonService as c4, type EntityService as c5, type EvalRegisterService as c6, type RubricService as c7, type FlowRunLifecycleService as c8, appendRunRecord as c9, readRunRecords as ca, getPendingInvocationsMap as cb, countPendingInvocations as cc, getOrCreateBlockPendingMap as cd, readPendingInvocations as ce, queuePendingInvocation as cf, removePendingInvocation as cg, findFailedListenersForSourceRun as ch, replayFailedListenerRun as ci, snapshotInputRefs as cj, computePendingInvocationId as ck, RUN_RECORD_AUDIT_TYPE as cl, type FailedListenerRun as cm, type DID as cn, type ClaimCollectionURI as co, type LinkedClaim as cp, type NodeServiceReport as cq, type NodeState as cr, type FlowNodeBase as cs, type InvocationRequest as ct, type InvocationResult as cu, type ExecutionWithInvocationResult as cv, type FindProofsResult as cw, type CreateRootDelegationParams as cx, type CreateDelegationParams as cy, type CreateInvocationParams as cz, createInvocationStore as d, createMemoryInvocationStore as e, createUcanService as f, type UcanService as g, type UcanServiceConfig as h, type UcanServiceHandlers as i, type UcanCapability as j, type StoredInvocation as k, type DelegationGrant as l, type IxoEditorOptions as m, type IxoEditorTheme as n, type IxoEditorConfig as o, type IxoCollaborativeUser as p, type IxoCollaborativeEditorOptions as q, blockSpecs as r, getExtraSlashMenuItems as s, useBlocknoteHandlers as t, useBlocknoteContext as u, useTranslate as v, StakeType as w, type BlocknoteHandlers as x, type BlocknoteContextValue as y, type BlockRequirements as z };