@ixo/decision-oracle 0.2.27 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/networks.d.ts +3 -0
- package/dist/networks.d.ts.map +1 -1
- package/dist/networks.js +3 -0
- package/dist/networks.js.map +1 -1
- package/dist/routes/v1/api/protocols.d.ts +1 -1
- package/dist/routes/v1/api/protocols.d.ts.map +1 -1
- package/dist/routes/v1/api/protocols.js +13 -20
- package/dist/routes/v1/api/protocols.js.map +1 -1
- package/dist/routes/v1/info.js +1 -1
- package/dist/routes/v1/info.js.map +1 -1
- package/docs/api.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -786,6 +786,6 @@ symlinks are not packed). CI diffs them — change one, copy it to the other.
|
|
|
786
786
|
|
|
787
787
|
## Status
|
|
788
788
|
|
|
789
|
-
Published on npm: `@ixo/decision-oracle` 0.2.
|
|
789
|
+
Published on npm: `@ixo/decision-oracle` 0.2.28 and `@ixo/decision-oracle-client` 0.1.1.
|
|
790
790
|
|
|
791
791
|
Apache License 2.0: `LICENSE` at the repo root and in each package.
|
package/dist/networks.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ export interface NetworkDefaults {
|
|
|
28
28
|
* (`api review-billing enable`; the Decision Console's own per-network preset). The worker
|
|
29
29
|
* reads its facilitator from `X402_FACILITATOR_URL`, never from here. */
|
|
30
30
|
facilitator: string;
|
|
31
|
+
/** IXO Names — the ONE place an id (entity, account, denom, …) becomes a display name, cached
|
|
32
|
+
* for every IXO app (owner, 2026-11-01). Never a source of truth: display only. */
|
|
33
|
+
names: string;
|
|
31
34
|
}
|
|
32
35
|
export declare const NETWORKS: Record<IxoNetwork, NetworkDefaults>;
|
|
33
36
|
export declare const networkDefaults: (network: IxoNetwork) => NetworkDefaults;
|
package/dist/networks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../src/networks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1D,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,cAAc,EAAE,MAAM,CAAC;IACvB;;mDAE+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB;;8EAE0E;IAC1E,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"networks.d.ts","sourceRoot":"","sources":["../src/networks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1D,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,cAAc,EAAE,MAAM,CAAC;IACvB;;mDAE+C;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB;;8EAE0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB;wFACoF;IACpF,KAAK,EAAE,MAAM,CAAC;CACf;AACD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE,eAAe,CAiDxD,CAAC;AACF,eAAO,MAAM,eAAe,YAAa,UAAU,KAAG,eAAoC,CAAC"}
|
package/dist/networks.js
CHANGED
|
@@ -13,6 +13,7 @@ export const NETWORKS = {
|
|
|
13
13
|
relayerNodeDid: "did:ixo:entity:2f22535f8b179a51d77a0e302e68d35d",
|
|
14
14
|
domainIndexer: "https://domain-indexer.devnet.ixo.earth",
|
|
15
15
|
facilitator: "https://facilitator.devnet.ixo.earth",
|
|
16
|
+
names: "https://devnet.names.ixo.earth",
|
|
16
17
|
},
|
|
17
18
|
testnet: {
|
|
18
19
|
engineHost: "decision-engine.testnet.ixo.earth",
|
|
@@ -28,6 +29,7 @@ export const NETWORKS = {
|
|
|
28
29
|
relayerNodeDid: "did:ixo:entity:3d079ebc0b332aad3305bb4a51c72edb",
|
|
29
30
|
domainIndexer: "https://domain-indexer.testnet.ixo.earth",
|
|
30
31
|
facilitator: "https://facilitator.testnet.ixo.earth",
|
|
32
|
+
names: "https://testnet.names.ixo.earth",
|
|
31
33
|
},
|
|
32
34
|
mainnet: {
|
|
33
35
|
engineHost: "decision-engine.ixo.earth",
|
|
@@ -43,6 +45,7 @@ export const NETWORKS = {
|
|
|
43
45
|
relayerNodeDid: "did:ixo:entity:2f22535f8b179a51d77a0e302e68d35d",
|
|
44
46
|
domainIndexer: "https://domain-indexer.ixo.earth",
|
|
45
47
|
facilitator: "https://facilitator.ixo.earth",
|
|
48
|
+
names: "https://names.ixo.earth",
|
|
46
49
|
},
|
|
47
50
|
};
|
|
48
51
|
export const networkDefaults = (network) => NETWORKS[network];
|
package/dist/networks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networks.js","sourceRoot":"","sources":["../src/networks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"networks.js","sourceRoot":"","sources":["../src/networks.ts"],"names":[],"mappings":"AAkCA,MAAM,CAAC,MAAM,QAAQ,GAAwC;IAC3D,MAAM,EAAE;QACN,UAAU,EAAE,kCAAkC;QAC9C,SAAS,EAAE,oDAAoD;QAC/D,GAAG,EAAE,+BAA+B;QACpC,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,yBAAyB;QACjC,SAAS,EAAE,qCAAqC;QAChD,GAAG,EAAE,8BAA8B;QACnC,WAAW,EAAE,gCAAgC;QAC7C,MAAM,EAAE,6BAA6B;QACrC,OAAO,EAAE,4BAA4B;QACrC,cAAc,EAAE,iDAAiD;QACjE,aAAa,EAAE,yCAAyC;QACxD,WAAW,EAAE,sCAAsC;QACnD,KAAK,EAAE,gCAAgC;KACxC;IACD,OAAO,EAAE;QACP,UAAU,EAAE,mCAAmC;QAC/C,SAAS,EAAE,qDAAqD;QAChE,GAAG,EAAE,gCAAgC;QACrC,IAAI,EAAE,gCAAgC;QACtC,MAAM,EAAE,0BAA0B;QAClC,SAAS,EAAE,sCAAsC;QACjD,GAAG,EAAE,+BAA+B;QACpC,WAAW,EAAE,gCAAgC;QAC7C,MAAM,EAAE,8BAA8B;QACtC,OAAO,EAAE,6BAA6B;QACtC,cAAc,EAAE,iDAAiD;QACjE,aAAa,EAAE,0CAA0C;QACzD,WAAW,EAAE,uCAAuC;QACpD,KAAK,EAAE,iCAAiC;KACzC;IACD,OAAO,EAAE;QACP,UAAU,EAAE,2BAA2B;QACvC,SAAS,EAAE,6CAA6C;QACxD,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,sBAAsB;QAC9B,SAAS,EAAE,8BAA8B;QACzC,GAAG,EAAE,uBAAuB;QAC5B,WAAW,EAAE,gCAAgC;QAC7C,MAAM,EAAE,yBAAyB;QACjC,OAAO,EAAE,wBAAwB;QACjC,cAAc,EAAE,iDAAiD;QACjE,aAAa,EAAE,kCAAkC;QACjD,WAAW,EAAE,+BAA+B;QAC5C,KAAK,EAAE,yBAAyB;KACjC;CACF,CAAC;AACF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAmB,EAAmB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -14,7 +14,7 @@ import type { OracleEnv } from "../../../env.js";
|
|
|
14
14
|
import type { ApiEnv } from "../../../middleware/api/types.js";
|
|
15
15
|
export declare const protocols: Hono<ApiEnv, import("hono/types").BlankSchema, "/">;
|
|
16
16
|
/**
|
|
17
|
-
* A protocol's display name: its entity's
|
|
17
|
+
* A protocol's display name: its entity's profile name (IXO Names), else its
|
|
18
18
|
* claim form's title, else null — a listing never fails on one protocol (an unusable rubric, an
|
|
19
19
|
* outage); `GET /protocols/:did` says why.
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocols.d.ts","sourceRoot":"","sources":["../../../../src/routes/v1/api/protocols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"protocols.d.ts","sourceRoot":"","sources":["../../../../src/routes/v1/api/protocols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQ9C,OAAO,KAAK,EAAc,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAKxE,eAAO,MAAM,SAAS,qDAAqB,CAAC;AA2D5C;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxF"}
|
|
@@ -13,15 +13,14 @@ import { sql } from "drizzle-orm";
|
|
|
13
13
|
import { Hono } from "hono";
|
|
14
14
|
import { loadConfig } from "../../../config.js";
|
|
15
15
|
import { apiSources } from "../../../db/schema.js";
|
|
16
|
-
import { readLinkedDoc } from "../../../facts/linked-doc.js";
|
|
17
16
|
import { fetchClient } from "../../../lib/http/client.js";
|
|
18
|
-
import { getEntityDocs } from "../../../lib/ixo/blocksync/index.js";
|
|
19
17
|
import { readCache } from "../../../lib/metrics.js";
|
|
20
18
|
import { publishedPrice } from "../../../lib/payments/index.js";
|
|
21
19
|
import { perReviewProtocols, reviewBillingActive } from "../../../lib/payments/review-billing.js";
|
|
22
20
|
import { generateTraceContext } from "../../../lib/tracing.js";
|
|
23
21
|
import { access } from "../../../middleware/api/auth.js";
|
|
24
22
|
import { ApiError } from "../../../middleware/api/errors.js";
|
|
23
|
+
import { networkDefaults } from "../../../networks.js";
|
|
25
24
|
import { getOracle } from "../../../oracle.js";
|
|
26
25
|
import { workOrderFor } from "./work-orders.js";
|
|
27
26
|
export const protocols = new Hono();
|
|
@@ -76,7 +75,7 @@ function cacheHeaders(c) {
|
|
|
76
75
|
/** How long a protocol entity's profile name is kept: a rename on chain shows within the hour. */
|
|
77
76
|
const PROFILE_NAME_TTL_SEC = 3600;
|
|
78
77
|
/**
|
|
79
|
-
* A protocol's display name: its entity's
|
|
78
|
+
* A protocol's display name: its entity's profile name (IXO Names), else its
|
|
80
79
|
* claim form's title, else null — a listing never fails on one protocol (an unusable rubric, an
|
|
81
80
|
* outage); `GET /protocols/:did` says why.
|
|
82
81
|
*/
|
|
@@ -91,9 +90,10 @@ export async function nameOf(env, protocolDid) {
|
|
|
91
90
|
return null;
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
/** The
|
|
95
|
-
* `PROFILE_NAME_TTL_SEC` in KV (`""` =
|
|
96
|
-
*
|
|
93
|
+
/** The entity's name as IXO Names resolves it (its profile name — what the portal shows; owner,
|
|
94
|
+
* 2026-11-01: every IXO name goes through that worker). Kept `PROFILE_NAME_TTL_SEC` in KV (`""` =
|
|
95
|
+
* the entity has none); a failed or `partial` read is null and never kept, so a Names blip costs
|
|
96
|
+
* one listing its names, not an hour of them. */
|
|
97
97
|
async function profileName(env, protocolDid) {
|
|
98
98
|
const key = `protocol-name:${protocolDid}`;
|
|
99
99
|
const cached = await readCache("protocol-name", () => env.CACHE_KV.get(key));
|
|
@@ -101,20 +101,13 @@ async function profileName(env, protocolDid) {
|
|
|
101
101
|
return cached || null;
|
|
102
102
|
try {
|
|
103
103
|
const config = loadConfig(env);
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
fetch: (u, init) => fetchClient(u, { ...init, trace, attempts: 2 }),
|
|
112
|
-
});
|
|
113
|
-
if (!read.ok)
|
|
114
|
-
return null;
|
|
115
|
-
const raw = read.json?.name;
|
|
116
|
-
name = typeof raw === "string" ? raw.trim() : "";
|
|
117
|
-
}
|
|
104
|
+
const res = await fetchClient(`${networkDefaults(config.IXO_NETWORK).names}/v1/names/${encodeURIComponent(protocolDid)}`, { trace: generateTraceContext(), attempts: 2 });
|
|
105
|
+
if (!res.ok)
|
|
106
|
+
return null;
|
|
107
|
+
const body = (await res.json());
|
|
108
|
+
if (body.status === "partial")
|
|
109
|
+
return null;
|
|
110
|
+
const name = typeof body.name === "string" ? body.name.trim() : "";
|
|
118
111
|
await env.CACHE_KV.put(key, name, { expirationTtl: PROFILE_NAME_TTL_SEC }).catch(() => { });
|
|
119
112
|
return name || null;
|
|
120
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocols.js","sourceRoot":"","sources":["../../../../src/routes/v1/api/protocols.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MA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pD,CAAC;IACF,YAAY,CAAC,CAAC,CAAC,CAAC;IAChB,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC,CACF,CAAC"}
|
package/dist/routes/v1/info.js
CHANGED
|
@@ -49,7 +49,7 @@ info.get("/", async (c) => {
|
|
|
49
49
|
// the oracle for the Decision API only where `/v1/api` answers.
|
|
50
50
|
lanes: { chain: config.CHAIN_LANE, api: config.API_LANE },
|
|
51
51
|
supportedProtocols,
|
|
52
|
-
// The same list, readable: each protocol's display name (its
|
|
52
|
+
// The same list, readable: each protocol's display name (its entity name from IXO Names, else its claim
|
|
53
53
|
// form's title — cached an hour; null when neither reads) and the fee register charges for it,
|
|
54
54
|
// so an app can list this oracle's protocols without reading the chain itself.
|
|
55
55
|
protocols: await Promise.all(supportedProtocols.map(async (did) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/routes/v1/info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,EAAU,CAAC;AAEvC,oFAAoF;AACpF,KAAK,UAAU,iBAAiB,CAAC,IAA+C;IAC9E,IAAI,CAAC,CAAC,MAAM,mBAAmB,CAAC,IAAI,CAAC,CAAC;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U,EAAE,MAAM,CAAC,oBAAoB,IAAI,IAAI;SAChD;QACD,uFAAuF;QACvF,oFAAoF;QACpF,8FAA8F;QAC9F,yFAAyF;QACzF,OAAO,EAAE;YACP,aAAa,EAAE,OAAO,IAAI,EAAE;YAC5B,cAAc,EAAE,QAAQ,CAAC,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI;SAC5E;QACD,8FAA8F;QAC9F,mGAAmG;QACnG,wFAAwF;QACxF,wEAAwE;QACxE,aAAa,EAAE,MAAM,iBAAiB,CAAC;YACrC,MAAM;YACN,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;YACvB,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;YACrB,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ;SACtB,CAAC;QACF,gGAAgG;QAChG,8FAA8F;QAC9F,8CAA8C;QAC9C,GAAG,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS;YAC5C,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;YACpE,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/docs/api.md
CHANGED
|
@@ -1785,7 +1785,7 @@ check.**
|
|
|
1785
1785
|
| `GET /health/ready` | public, **rate-limited** (per IP) | `{ ok }` only — `200` when every critical check passes, `503` otherwise. Checks `d1`, `kv`, `engine` (its `/.well-known/did.json`) and, with `API_LANE` and `API_PAYMENTS` on, `facilitator` (`X402_FACILITATOR_URL/supported`), in parallel, 2 s each, plus `identity` (a config read: fails when `ORACLE_ENTITY_DID` is unset on a non-local `ORACLE_HOSTNAME`) and `owner-delegation` (fails when `OWNER_DELEGATION_CAR` is set but is not a UCAN delegation; unset passes); the settled answer is cached per isolate for 15 s. A failure before the route runs (a config that does not load) is also `503 { ok: false }`. Names no check — the detail is `/v1/admin/status`'s |
|
|
1786
1786
|
| `GET /.well-known/did.json` | public, rate-limit exempt | Needs `SERVICE_ED25519_MNEMONIC` |
|
|
1787
1787
|
| `GET /.well-known/oauth-protected-resource/v1/mcp` | public, rate-limit exempt, `Access-Control-Allow-Origin: *`, `cache-control: public, max-age=300` | RFC 9728 metadata for the MCP server: `{ resource: "https://<ORACLE_HOSTNAME>/v1/mcp", authorization_servers: [AUTH_HUB_URL], scopes_supported: ["claims:write", "claims:read"], bearer_methods_supported: ["header"] }`. `404` unless `API_LANE` is on. Outside the `/v1/api` contract |
|
|
1788
|
-
| `GET /v1/info` | **public** (the only public `/v1` path) | —. The marketplace listing: `name`, `description`, `did`, `address`, `entityDid` (the on-chain oracle entity from `ORACLE_ENTITY_DID`, `null` when unset), `serviceDid`, `lanes: { chain, api }` (booleans: `CHAIN_LANE` and `API_LANE` — a portal offers an on-chain hire only where `chain` is `true`, a console lists the oracle for the Decision API only where `api` is; the listing is cached 300 s, so a lane flip shows up to 5 min late), `supportedProtocols`, `protocols` (the same list readably: `[{ did, name, fee }]` — `name` the protocol's
|
|
1788
|
+
| `GET /v1/info` | **public** (the only public `/v1` path) | —. The marketplace listing: `name`, `description`, `did`, `address`, `entityDid` (the on-chain oracle entity from `ORACLE_ENTITY_DID`, `null` when unset), `serviceDid`, `lanes: { chain, api }` (booleans: `CHAIN_LANE` and `API_LANE` — a portal offers an on-chain hire only where `chain` is `true`, a console lists the oracle for the Decision API only where `api` is; the listing is cached 300 s, so a lane flip shows up to 5 min late), `supportedProtocols`, `protocols` (the same list readably: `[{ did, name, fee }]` — `name` the protocol entity's name from IXO Names (`https://names.ixo.earth`, per network — its profile name), else its claim form's title, cached 1 h, `null` when neither reads; `fee` the `{ denom, minAmount }` register charges for it), `pricing`, `policies`, `earnings: { address, baseWallet }` (the operator's `EARNINGS_ADDRESS` / `EARNINGS_BASE_WALLET`, `null` when unset — read-only, set in the oracle's config), `payouts: { decisionToPay, operatorAmount }` — how a payout amount is chosen, for a portal to show before a company opts in: `decisionToPay` is the config's `payouts` map verbatim (per protocol DID, `{ amount: <answer path>, currency: <ISO 4217 code> | { path } | { asset, decimals } }`; `{}` when none, and a protocol absent from it gets no decision to pay), `operatorAmount` is `{ summary }` from `policies.actSummary` when an `act` policy is configured, else `null` (`actSummary` is served only here, never under `policies`), and `reviewBilling: { mode, pricePerReview }` — how a collection pays for its reviews: `mode: "x402"` (per-review billing ACTIVE: IXO's plan for the oracle allows it — the engine's `GET /v1/oracles/me` `reviewBilling`, KV-cached 5 min — on an oracle running `API_LANE`: per review from the company's credits, an empty evaluation leg) with `pricePerReview: { denom: "upay", amount }` the published per-review price (the one the supported protocols share, else `pricing.api.amountMicroUsd` / `API_PRICE_USD_CENTS`; `null` when none is published), or `mode: "escrow"` (the collection's on-chain evaluation payment, `pricing`) with `pricePerReview: null`. `cache-control: public, max-age=300`. With `openhands` set, also `openhands: { hire: "/openhands/hire/:collectionId", scan: "/openhands/scan/:collectionId", why: "/openhands/claims/:claimId/why" }` — absent on any other oracle. A portal is built against these exact field names |
|
|
1789
1789
|
| `POST /openhands/hire/:collectionId` | public, **`OPENHANDS_RATE_LIMITER`** (per caller and per collection; unbound outside development ⇒ `503`), `openhands` on only | With `CHAIN_LANE` `"false"`, `409 { error, reason: "chain_lane_off" }` before anything else (no limiter token, no read, no start). Starts the collection's hire (`202 { started: true }`) after reading that it exists and its admin granted this oracle a live meta-grant: `404` no such collection (not cached), `409` no meta-grant (cached 10 min). A hire in flight, or an ended one the chain says is healthy, is `200 { existing: true }` (the healthy answer cached 1 min); an ended one the chain says is stale or low is rerun from the webhook's own budget (`200 { restarted: true, reason }`, three a day, then `{ throttled: true }`). `400` a malformed id, `405` not POST, `503` when the chain or Blocksync cannot answer |
|
|
1790
1790
|
| `POST /openhands/scan/:collectionId` | public, **`OPENHANDS_RATE_LIMITER`**, `openhands` on only | Scans one watched collection now (with `CHAIN_LANE` `"false"`, `409 { error, reason: "chain_lane_off" }` first): `200 { started }`, `202 { coalesced: true }` within a minute of the last (scanned on the next minute tick), `404` not watched, `409` paused. A `200 { started: 0 }` (or a failed scan) is retried on the next three minute ticks |
|
|
1791
1791
|
| `GET /openhands/claims/:claimId/why` | **the claim's own submitter**: a UCAN invocation (`Authorization: Bearer <token>`, `X-Auth-Type: ucan`) carrying exactly `{ can: "claims/why", with: "ixo:claim:<claimId>" }`, addressed to this oracle's did:web, self-issued (no delegation), expiring at most 10 min out, whose issuer is the claim's on-chain `agentDid`. **`OPENHANDS_RATE_LIMITER`** per caller address before the token is checked and per issuer after (`429`; unbound outside development ⇒ `429`). `openhands` on only | Why the claim was decided: `200 { outcome, summary, reasons[], evidenceGrade?, reviewNote?, receiptCid? }` — `outcome` is `approved` (approve or partial) / `rejected` / `review` (held for a person) / `pending`; each reason is `{ code, label, result: pass \| fail \| error \| review, detail, value?, threshold?, unit? }`, one per gate or criterion, explained through the one fact it reads and labelled by the pinned rubric (`#rub`, read for its public sentences only, hash-checked, cached 7 days; unreadable ⇒ codes without labels). An `ext` fact's reason is never echoed (only the stock geo handlers' distances and evidence grade), an AI sentence only scrubbed of identifiers, and no AI instruction is ever read. A claim queued, or on a watched collection and not yet seen, is `pending`; a **failed ingest** is `pending` with a fixed sentence (`claimFailureReason`) — never the stored error. Anyone but the agent, or a claim this oracle never saw, gets the same `404 NOT_FOUND`; `401` no or a bad token, `400` a malformed id, `405` not GET, `503` when Blocksync or the DID resolver cannot answer |
|
|
@@ -2225,7 +2225,7 @@ the inner request — never a caller's `X-Auth-Type` / `X-Source-Id`:
|
|
|
2225
2225
|
| `submit_claim` | `protocolDid?`, `answers`, `attachments?`, `submitter?`, `metadata?`, `webhookUrl?`, `idempotencyKey?`, `resumePayment?` (after a card 3-D Secure refusal: its `paymentRequired`, once the payer has confirmed at `confirmUrl`) | `POST /v1/api/claims` with `Prefer: wait=90` and an `Idempotency-Key` — the argument, else `mcp_` + hex `sha256(canonicalJson(request))`; a 402 is paid by at most one attempt per rail with `X-Payment-Delegation`, as the SDK's payer does (the card authorize goes to this oracle's `X402_FACILITATOR_URL`, never the delegation's audience; a `resumePayment` that is not this oracle's card 402 is a `VALIDATION` refusal) | the decided record, or `{ status: "pending", claimId, pollUrl }` |
|
|
2226
2226
|
| `upload_file` | `sourceId?` (OAuth only) | `POST /v1/api/uploads/links` | `{ uploadId, uploadUrl, expiresAt }` as `structuredContent`; the text is instructions instead of the JSON (the upload card, or `curl -sS -T <path> '<uploadUrl>'`, then `submit_claim` with `{ question, uploadId }`) |
|
|
2227
2227
|
| `get_decision` | `claimId` | `GET /v1/api/claims/:claimId` | the record |
|
|
2228
|
-
| `list_protocols` | `protocolDid?` | `GET /v1/api/protocols`, or `…/:did` for one protocol's work order (answers JSON Schema, files, facts, price, example) | the list (`{ protocolDid, name, price }`: `name` is the protocol entity's
|
|
2228
|
+
| `list_protocols` | `protocolDid?` | `GET /v1/api/protocols`, or `…/:did` for one protocol's work order (answers JSON Schema, files, facts, price, example) | the list (`{ protocolDid, name, price }`: `name` is the protocol entity's name from IXO Names (its profile name, KV-cached 1 h), else its claim form's title, else `null`; a failed read never fails the list), or the work order |
|
|
2229
2229
|
| `verify_receipt` | `claimId`, or `jws` (+ `cid?`) | `GET /v1/api/claims/:claimId/receipt` (with `claimId` alone; given both, the `jws` is verified and must name that `claimId`), then `verifyReceipt` trusting only this oracle's engine (`did:web:<EVAL_ENGINE_HOSTNAME>`) | `{ valid: true, issuer, claimId, verdict, status, outcome, protocolDid, oracleDid, kind, evaluatedAt }` or `{ valid: false, reason, message }` |
|
|
2230
2230
|
|
|
2231
2231
|
**An attachment named by `uploadId` alone gets its `cid` filled in.** Before anything else is
|
package/package.json
CHANGED