@ixo/decision-oracle 0.2.10 → 0.2.12
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 +13 -13
- package/dist/cli/commands/derive.d.ts +6 -2
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +33 -3
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/engine.d.ts.map +1 -1
- package/dist/cli/commands/engine.js +9 -2
- package/dist/cli/commands/engine.js.map +1 -1
- package/dist/cli/commands/init.js +2 -2
- package/dist/cli/commands/oracle-init.d.ts.map +1 -1
- package/dist/cli/commands/oracle-init.js +2 -2
- package/dist/cli/commands/oracle-init.js.map +1 -1
- package/dist/cli/index.js +24 -85
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lib/usage.d.ts +11 -0
- package/dist/cli/lib/usage.d.ts.map +1 -0
- package/dist/cli/lib/usage.js +112 -0
- package/dist/cli/lib/usage.js.map +1 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -1
- package/dist/config.js.map +1 -1
- package/dist/middleware/error-handler.d.ts.map +1 -1
- package/dist/middleware/error-handler.js +11 -0
- package/dist/middleware/error-handler.js.map +1 -1
- package/docs/api.md +7 -2
- package/docs/guide.md +13 -10
- package/package.json +1 -1
- package/skills/add-openhands-support/SKILL.md +3 -1
- package/skills/create-oracle/SKILL.md +20 -14
- package/skills/create-rubric/reference/format-cheatsheet.md +20 -0
- package/skills/decision-api-oracle/SKILL.md +2 -2
- package/templates/project/README.md +4 -3
- package/templates/project/package.json +1 -0
- package/templates/project/src/facts/index.ts +6 -2
- package/templates/project/src/index.ts +3 -1
- package/templates/project/wrangler.jsonc +116 -11
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;GA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AQ,CAAC;QACd,KAAK,IAAI,CAAC;QACV,KAAK,MAAM;YACT,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,CAAC,CAAC;QAEX;YACE,MAAM,IAAI,UAAU,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AAED,IAAI,CAAC;IACH,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,IAAI,GAAG,YAAY,UAAU,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC;QAC5C,OAAO,CAAC,QAAQ,GAAG,EAAE,CAAC;IACxB,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5E,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI's usage text, and one command's slice of it for `decision-oracle <command> --help`.
|
|
3
|
+
*/
|
|
4
|
+
export declare const USAGE = "usage: decision-oracle <command> [options]\n\nproject\n init <dir> [--name <project-name>] [--openhands] generate a new oracle project (never installs for you);\n --openhands makes it an OpenHands checker\n skills sync [--dir <path>] refresh the package's Claude skills (default .claude/skills)\n\nidentity\n derive (\"<mnemonic>\" | --new) [--write <file> [--as <VAR>]]\n the ORACLE_* lines for .dev.vars, from a chain mnemonic;\n --write appends the key to that file (0600) instead of\n printing it, under --as (default ORACLE_SECP_MNEMONIC)\n login sign in to ixo AuthHub \u2014 once per network\n logout forget that network's saved session ({ removed, path })\n delegation --audience <did> --out <file> mint an owner\u2192oracle claim-bot delegation CAR\n (--for engine mints the billing one instead)\n\nchain (needs a login; nothing is signed without --yes)\n oracle init --protocol <did> --kit-url <url> [--logo <url|file>] [--openhands]\n provision this oracle (13 steps): fund its wallet,\n its IID + Ed25519 key, its Matrix account, its\n entity + profile + domain card + agent card\n publish-protocol --rubric <file> --form <file> publish a protocol entity + its #vct and #rub\n publish-protocol --phase rub --protocol <did> --rubric <file> --form <file>\n anchor/replace #rub alone on a protocol that\n already has its form\n create-deed --protocol <did> --title <name> create a deed linked to that protocol\n create-collection --entity <deed> --protocol <did> --eval-amount <uixo>\n create/fund/grant a claim collection\n submit-claim --collection <id> --answers <file> submit a test claim as the logged-in wallet\n org create --name <name> [--logo <url>] create an organisation (a dao entity) your login\n controls \u2014 or print the one it owns by that name\n org balance --entity <did> an organisation's admin account and its balances\n org fund --entity <did> --amount <n> [--coin ixo|usdc]\n send coins from your wallet to that admin account\n\nthis oracle\n register --collection <id> enrol a collection with this oracle, as its owner\n scan --collection <id> make this oracle scan an enrolled collection now\n relink [--collection <id>]\u2026 operator: link watched collections to their company's\n Decision API sources, as register does (ORACLE_ADMIN_DIDS)\n erase (<claimId>\u2026 | --collection <id>) [--yes]\n as the collection's owner, erase claims' transcripts and\n registry text (the oracle never deletes them on its own)\n manifest <protocol did> the engine's work order for a protocol's rubric\n engine register [--env <name>] [--env-file <path>] [--yes]\n register this oracle with the engine now (payable at the\n Standard plan at once), not lazily at the first decide\n\nthe Decision API (API_LANE on; signed as your login, --kit <url> or .dev.vars' host)\n api source create --name <n> --contact <email> --entity <did>\n add this oracle to your organisation \u2014 its\n webhook secret shown ONCE; pending-link\n api source link <sourceId> sign the organisation's link at the engine and\n sync it: pending-link \u2192 active\n api sources the sources your login belongs to\n api key create --source <id> --scopes <s,\u2026> [--name <n>] [--max-spend-cents <n>]\n mint an API key \u2014 shown ONCE\n api keys --source <id> a source's keys, masked\n api key revoke --source <id> <prefix|masked key> [--grace-days <n>]\n api admin sources every source (your DID in ORACLE_ADMIN_DIDS)\n api admin pause <sourceId> [--note <text>]\n api admin resume <sourceId>\n api admin protocols <sourceId> <did,\u2026>|--none replace a source's allowed protocols\n api admin billing-mode <sourceId> x402|none\n (a source link, a key revoke and every admin change is a dry run without --yes; --json prints the raw answer;\n api --help for the flags)\n\nyour handlers\n protocol review <protocol did> what a protocol's rubric asks your oracle to produce\n facts scaffold <protocol did> [--all] a stub handler + a test per name needing one\n facts run --protocol <did> --claim <file> [--preview] [--no-ai]\n run your handlers against a claim file (its answers, or\n { answers, attachments }) \u2014 no chain, no credits; a rubric's\n dup lane needs D1, so here it stands in as \"review\"\n\nrubric authoring\n rubric fetch-form --protocol <did> --out <file> download a protocol's live claim form (#vct)\n rubric validate --rubric <file> --form <file> check a rubric with the engine's own binder\n\nevery network-facing command takes --network devnet|testnet|mainnet (default devnet); every\nengine-facing one takes --engine-url <url>.\n";
|
|
5
|
+
/**
|
|
6
|
+
* The usage lines for one command — every entry whose text starts with it (`engine` → `engine
|
|
7
|
+
* register …`), each with its continuation lines — or null when none does. An entry is a line
|
|
8
|
+
* indented two spaces; a continuation is a deeper-indented line under it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function usageFor(command: string): string | null;
|
|
11
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/usage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,KAAK,i1LAkFjB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBvD"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI's usage text, and one command's slice of it for `decision-oracle <command> --help`.
|
|
3
|
+
*/
|
|
4
|
+
export const USAGE = `usage: decision-oracle <command> [options]
|
|
5
|
+
|
|
6
|
+
project
|
|
7
|
+
init <dir> [--name <project-name>] [--openhands] generate a new oracle project (never installs for you);
|
|
8
|
+
--openhands makes it an OpenHands checker
|
|
9
|
+
skills sync [--dir <path>] refresh the package's Claude skills (default .claude/skills)
|
|
10
|
+
|
|
11
|
+
identity
|
|
12
|
+
derive ("<mnemonic>" | --new) [--write <file> [--as <VAR>]]
|
|
13
|
+
the ORACLE_* lines for .dev.vars, from a chain mnemonic;
|
|
14
|
+
--write appends the key to that file (0600) instead of
|
|
15
|
+
printing it, under --as (default ORACLE_SECP_MNEMONIC)
|
|
16
|
+
login sign in to ixo AuthHub — once per network
|
|
17
|
+
logout forget that network's saved session ({ removed, path })
|
|
18
|
+
delegation --audience <did> --out <file> mint an owner→oracle claim-bot delegation CAR
|
|
19
|
+
(--for engine mints the billing one instead)
|
|
20
|
+
|
|
21
|
+
chain (needs a login; nothing is signed without --yes)
|
|
22
|
+
oracle init --protocol <did> --kit-url <url> [--logo <url|file>] [--openhands]
|
|
23
|
+
provision this oracle (13 steps): fund its wallet,
|
|
24
|
+
its IID + Ed25519 key, its Matrix account, its
|
|
25
|
+
entity + profile + domain card + agent card
|
|
26
|
+
publish-protocol --rubric <file> --form <file> publish a protocol entity + its #vct and #rub
|
|
27
|
+
publish-protocol --phase rub --protocol <did> --rubric <file> --form <file>
|
|
28
|
+
anchor/replace #rub alone on a protocol that
|
|
29
|
+
already has its form
|
|
30
|
+
create-deed --protocol <did> --title <name> create a deed linked to that protocol
|
|
31
|
+
create-collection --entity <deed> --protocol <did> --eval-amount <uixo>
|
|
32
|
+
create/fund/grant a claim collection
|
|
33
|
+
submit-claim --collection <id> --answers <file> submit a test claim as the logged-in wallet
|
|
34
|
+
org create --name <name> [--logo <url>] create an organisation (a dao entity) your login
|
|
35
|
+
controls — or print the one it owns by that name
|
|
36
|
+
org balance --entity <did> an organisation's admin account and its balances
|
|
37
|
+
org fund --entity <did> --amount <n> [--coin ixo|usdc]
|
|
38
|
+
send coins from your wallet to that admin account
|
|
39
|
+
|
|
40
|
+
this oracle
|
|
41
|
+
register --collection <id> enrol a collection with this oracle, as its owner
|
|
42
|
+
scan --collection <id> make this oracle scan an enrolled collection now
|
|
43
|
+
relink [--collection <id>]… operator: link watched collections to their company's
|
|
44
|
+
Decision API sources, as register does (ORACLE_ADMIN_DIDS)
|
|
45
|
+
erase (<claimId>… | --collection <id>) [--yes]
|
|
46
|
+
as the collection's owner, erase claims' transcripts and
|
|
47
|
+
registry text (the oracle never deletes them on its own)
|
|
48
|
+
manifest <protocol did> the engine's work order for a protocol's rubric
|
|
49
|
+
engine register [--env <name>] [--env-file <path>] [--yes]
|
|
50
|
+
register this oracle with the engine now (payable at the
|
|
51
|
+
Standard plan at once), not lazily at the first decide
|
|
52
|
+
|
|
53
|
+
the Decision API (API_LANE on; signed as your login, --kit <url> or .dev.vars' host)
|
|
54
|
+
api source create --name <n> --contact <email> --entity <did>
|
|
55
|
+
add this oracle to your organisation — its
|
|
56
|
+
webhook secret shown ONCE; pending-link
|
|
57
|
+
api source link <sourceId> sign the organisation's link at the engine and
|
|
58
|
+
sync it: pending-link → active
|
|
59
|
+
api sources the sources your login belongs to
|
|
60
|
+
api key create --source <id> --scopes <s,…> [--name <n>] [--max-spend-cents <n>]
|
|
61
|
+
mint an API key — shown ONCE
|
|
62
|
+
api keys --source <id> a source's keys, masked
|
|
63
|
+
api key revoke --source <id> <prefix|masked key> [--grace-days <n>]
|
|
64
|
+
api admin sources every source (your DID in ORACLE_ADMIN_DIDS)
|
|
65
|
+
api admin pause <sourceId> [--note <text>]
|
|
66
|
+
api admin resume <sourceId>
|
|
67
|
+
api admin protocols <sourceId> <did,…>|--none replace a source's allowed protocols
|
|
68
|
+
api admin billing-mode <sourceId> x402|none
|
|
69
|
+
(a source link, a key revoke and every admin change is a dry run without --yes; --json prints the raw answer;
|
|
70
|
+
api --help for the flags)
|
|
71
|
+
|
|
72
|
+
your handlers
|
|
73
|
+
protocol review <protocol did> what a protocol's rubric asks your oracle to produce
|
|
74
|
+
facts scaffold <protocol did> [--all] a stub handler + a test per name needing one
|
|
75
|
+
facts run --protocol <did> --claim <file> [--preview] [--no-ai]
|
|
76
|
+
run your handlers against a claim file (its answers, or
|
|
77
|
+
{ answers, attachments }) — no chain, no credits; a rubric's
|
|
78
|
+
dup lane needs D1, so here it stands in as "review"
|
|
79
|
+
|
|
80
|
+
rubric authoring
|
|
81
|
+
rubric fetch-form --protocol <did> --out <file> download a protocol's live claim form (#vct)
|
|
82
|
+
rubric validate --rubric <file> --form <file> check a rubric with the engine's own binder
|
|
83
|
+
|
|
84
|
+
every network-facing command takes --network devnet|testnet|mainnet (default devnet); every
|
|
85
|
+
engine-facing one takes --engine-url <url>.
|
|
86
|
+
`;
|
|
87
|
+
/**
|
|
88
|
+
* The usage lines for one command — every entry whose text starts with it (`engine` → `engine
|
|
89
|
+
* register …`), each with its continuation lines — or null when none does. An entry is a line
|
|
90
|
+
* indented two spaces; a continuation is a deeper-indented line under it.
|
|
91
|
+
*/
|
|
92
|
+
export function usageFor(command) {
|
|
93
|
+
const out = [];
|
|
94
|
+
let taking = false;
|
|
95
|
+
for (const line of USAGE.split("\n")) {
|
|
96
|
+
const entry = /^ {2}(\S.*)$/.exec(line);
|
|
97
|
+
if (entry?.[1]) {
|
|
98
|
+
const text = entry[1];
|
|
99
|
+
taking = text === command || text.startsWith(`${command} `);
|
|
100
|
+
if (taking)
|
|
101
|
+
out.push(line);
|
|
102
|
+
}
|
|
103
|
+
else if (taking && /^ {3,}\S/.test(line)) {
|
|
104
|
+
out.push(line);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
taking = false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return out.length > 0 ? `usage: decision-oracle ${command} …\n\n${out.join("\n")}` : null;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","source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M_NAME?: string | undefined;
|
|
215
215
|
}>>;
|
|
216
216
|
export type Config = z.infer<typeof ConfigSchema>;
|
|
217
|
+
/**
|
|
218
|
+
* A deployment's vars failed validation. `vars` names them (never their values), so the 500 a
|
|
219
|
+
* request gets can say WHICH var to fix (middleware/error-handler.ts) — the full issue text, which
|
|
220
|
+
* may describe a value, goes to the log only.
|
|
221
|
+
*/
|
|
222
|
+
export declare class ConfigError extends Error {
|
|
223
|
+
readonly vars: string[];
|
|
224
|
+
constructor(message: string, vars: string[]);
|
|
225
|
+
}
|
|
217
226
|
export declare function loadConfig(env: OracleEnv): Config;
|
|
218
227
|
export declare function corsOrigins(config: Config): "*" | string[];
|
|
219
228
|
export declare const isProduction: (config: Config) => boolean;
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwZd,CAAC;AAIL,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAKlD,wBAAgB,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwZd,CAAC;AAIL,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAKlD;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,KAAK;IAGlC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE;IAFzB,YACE,OAAO,EAAE,MAAM,EACN,IAAI,EAAE,MAAM,EAAE,EAIxB;CACF;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAejD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,EAAE,CAO1D;AAED,eAAO,MAAM,YAAY,WAAY,MAAM,KAAG,OAA8C,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -404,6 +404,19 @@ const ConfigSchema = z
|
|
|
404
404
|
});
|
|
405
405
|
// Memoize per Env object so we validate once per isolate, not once per request.
|
|
406
406
|
const cache = new WeakMap();
|
|
407
|
+
/**
|
|
408
|
+
* A deployment's vars failed validation. `vars` names them (never their values), so the 500 a
|
|
409
|
+
* request gets can say WHICH var to fix (middleware/error-handler.ts) — the full issue text, which
|
|
410
|
+
* may describe a value, goes to the log only.
|
|
411
|
+
*/
|
|
412
|
+
export class ConfigError extends Error {
|
|
413
|
+
vars;
|
|
414
|
+
constructor(message, vars) {
|
|
415
|
+
super(message);
|
|
416
|
+
this.vars = vars;
|
|
417
|
+
this.name = "ConfigError";
|
|
418
|
+
}
|
|
419
|
+
}
|
|
407
420
|
export function loadConfig(env) {
|
|
408
421
|
const cached = cache.get(env);
|
|
409
422
|
if (cached)
|
|
@@ -413,7 +426,8 @@ export function loadConfig(env) {
|
|
|
413
426
|
const issues = parsed.error.issues
|
|
414
427
|
.map((i) => `${i.path.join(".") || "(root)"}: ${i.message}`)
|
|
415
428
|
.join("; ");
|
|
416
|
-
|
|
429
|
+
const vars = [...new Set(parsed.error.issues.map((i) => i.path.join(".") || "(root)"))];
|
|
430
|
+
throw new ConfigError(`Invalid environment configuration: ${issues}`, vars);
|
|
417
431
|
}
|
|
418
432
|
cache.set(env, parsed.data);
|
|
419
433
|
return parsed.data;
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,sFAAsF;AACtF,MAAM,OAAO,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,mBAAmB,CAAC,CAAC;AAE7E,MAAM,YAAY,GAAG,CAAC;KACnB,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IACpF,SAAS,EAAE,cAAc,CAAC,OAAO,CAAC,MAA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W,CAAC,MAAc;IACxC,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IACvC,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,EAAE;QAAE,OAAO,GAAG,CAAC;IAC1C,OAAO,GAAG;SACP,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,MAAM,CAAC,WAAW,KAAK,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/middleware/error-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/middleware/error-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAK1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AA8DzC,eAAO,MAAM,OAAO,EAAE,YAAY,CAAC,MAAM,CAmExC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,eAAe,CAAC,MAAM,CAW5C,CAAC"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { HTTPException } from "hono/http-exception";
|
|
10
10
|
import { routePath } from "hono/route";
|
|
11
11
|
import { ZodError } from "zod";
|
|
12
|
+
import { ConfigError } from "../config.js";
|
|
12
13
|
import { AppError, toErrorBody, VALIDATION_FAILED } from "../lib/errors.js";
|
|
13
14
|
import { createLogger } from "../lib/logger.js";
|
|
14
15
|
import { reportError } from "../lib/sentry.js";
|
|
@@ -25,6 +26,16 @@ function normalize(err) {
|
|
|
25
26
|
})),
|
|
26
27
|
});
|
|
27
28
|
}
|
|
29
|
+
// A broken deployment config: say which vars (names only) so the operator can fix it; the issue
|
|
30
|
+
// text itself stays in the log.
|
|
31
|
+
if (err instanceof ConfigError) {
|
|
32
|
+
return new AppError(`This oracle's configuration is invalid — check: ${err.vars.join(", ")}`, {
|
|
33
|
+
code: "INTERNAL",
|
|
34
|
+
status: 500,
|
|
35
|
+
expose: true,
|
|
36
|
+
cause: err,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
28
39
|
if (err instanceof HTTPException) {
|
|
29
40
|
const expose = err.status < 500;
|
|
30
41
|
return new AppError(err.message || "Request failed", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/middleware/error-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/middleware/error-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,YAAY,EAAe,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,E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AI,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC7B,8FAA8F;QAC9F,gFAAgF;QAChF,MAAM,CAAC,KAAK,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAC9C,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,8FAA8F;IAC9F,+FAA+F;IAC/F,qCAAqC;IACrC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,eAAe,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;QAC7D,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,CAAC,EAAE,EAAE;IACrD,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,SAAS,CAAC;IAClD,OAAO,CAAC,CAAC,IAAI,CACX,WAAW,CACT,QAAQ,CAAC,QAAQ,CACf,eAAe,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,6CAA6C,CACvF,EACD,SAAS,CACV,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
package/docs/api.md
CHANGED
|
@@ -397,7 +397,7 @@ set, below) re-exports a fourth, `OpenhandsHire`, bound as `HIRE_WORKFLOW`.
|
|
|
397
397
|
| `description` | `string` | any string | The listing blurb |
|
|
398
398
|
| `supportedProtocols` | `string[]` | every entry must start with `did:ixo:entity:` | Register gate 3: a collection whose protocol is not listed is refused `409`. `[]` ⇒ **no restriction**. Convention: exactly one entry — one oracle, one protocol |
|
|
399
399
|
| `pricing.evaluation.denom` | `string` | non-empty | The denom a collection's on-chain `Payments.evaluation` must be in |
|
|
400
|
-
| `pricing.evaluation.minAmount` | `string` | `/^\d+$/` — an **integer base-unit string** | The minimum that payment must carry, compared with `BigInt`. Below it, register is refused `402`: the chain's 80/10/10
|
|
400
|
+
| `pricing.evaluation.minAmount` | `string` | `/^\d+$/` — an **integer base-unit string** | The minimum that payment must carry, compared with `BigInt`. Below it, register is refused `402`: the chain's split of that coin (80% to the oracle, 10% to the network, 10% to the relayer node — the x/claims `network_fee_percentage` / `node_fee_percentage` chain params, governance-set, 10/10 on mainnet today; rounding remainder to the oracle) is how the oracle earns. Both fields are replaced, per deployment, by the `EVALUATION_DENOM` / `EVALUATION_MIN_AMOUNT` vars when those are set (required on mainnet) — what register charges and `/v1/info` serves is the result (`effectivePricing`) |
|
|
401
401
|
| `pricing.byProtocol` | `Record<protocolDid, { denom, minAmount }>` | optional; each entry the same shape/validation as `pricing.evaluation` | Per-protocol override, keyed by `did:ixo:entity:…`. Register's gate 4 resolves the collection's protocol against this map first, falling back to `pricing.evaluation` when unlisted. `minAmount: "0"` lets that protocol's collections register with an EMPTY `Payments.evaluation` leg — for an oracle whose income for it isn't the evaluation split. `GET /v1/info` advertises this map alongside `pricing.evaluation` |
|
|
402
402
|
| `pricing.api.amountMicroUsd` | `number` | optional (`pricing.api` whole is optional); an integer ≥ 10 000 and a multiple of 10 000 (whole cents ≥ 1¢), micro-USD (1 upay = 1 µUSD; $1.20 = `1_200_000`) | The Decision API lane's price per decision — a separate thing from the chain fees above. Published at `GET /v1/api/protocols[/:did]` as `price` (public, `cache-control: public, max-age=300`), quoted in every 402, and checked by the facilitator against every offer (`price_mismatch` otherwise). A function of the protocol alone — there are no per-source prices; a partner who should not pay gets billing mode `none`. Every price is a whole number of cents, at least 1¢ (a multiple of 10 000 µUSD — anything else fails at startup), so `price.amountCents` and `price.amount` (upay) are both exact |
|
|
403
403
|
| `payouts` | `Record<protocolDid, { amount: string; currency: string \| { path: string } \| { asset: string; decimals: number } }>` | optional; `amount` / `currency.path` are a path like `$.invoice.total` or `$.lines[0].amount` (`$` then `.key` / `[n]` only); `currency` an ISO 4217 code (`EUR`), or `{ asset: "eip155:<chain>/erc20:0x…", decimals }`; nothing else (a `payee` or `readers` key is refused); with a non-empty `supportedProtocols`, every key must be in it (refused at module evaluation) | S16 Decision Payouts: where a protocol's claims carry the amount to pay. The oracle sends it to the engine as the `payout` block (outside the facts) on the decide call and the fold of EVERY claim of the protocol; the engine reads the amount from the claim's answers and, when the claim is approved, binds the payment into the decision's one credential: `ClaimRecord.decision.receipt` is then also typed `DecisionToPayCredential` and carries the payment binding, public at the engine's `/v1/receipts/:cid` (contracts 1.13.0 removed the separate `decisionToPay`). The engine derives the payee — a chain claim's on-chain agent; an API claim's `submitter`, else the answer the source's company link names (`payeeField`) — and answers `decisionToPayRefused: "NO_PAYEE"` (a receipt with no binding, logged `payout.refused`) when there is none. Submitter ids must be **opaque** (never a name, email or phone), at most 256 characters: the public receipt names the payee by that id. Absent ⇒ no payout block, nothing changes |
|
|
@@ -2518,7 +2518,7 @@ than a suppressed one.
|
|
|
2518
2518
|
found through the `OWNER_DELEGATION_CAR` you posted at register. An exhausted balance is the `402`
|
|
2519
2519
|
above: the owner tops up at the portal URL the engine names, and the cron resumes everything.
|
|
2520
2520
|
- **The chain pays you.** The collection's on-chain `Payments.evaluation` — the coin your
|
|
2521
|
-
`pricing.evaluation` gate insists on — is split 80/10/10
|
|
2521
|
+
`pricing.evaluation` gate insists on — is split by the chain (80% to the oracle, 10% to the network, 10% to the relayer node — the x/claims `network_fee_percentage` / `node_fee_percentage` chain params, governance-set, 10/10 on mainnet today; rounding remainder to the oracle) on every `MsgEvaluateClaim`
|
|
2522
2522
|
you sign. That split is the oracle's income, which is why registering a collection that pays less
|
|
2523
2523
|
than your minimum is refused.
|
|
2524
2524
|
- **The collection's admin account pays the evaluation leg**, on every evaluation, approve or reject
|
|
@@ -2557,6 +2557,11 @@ Every HTTP error is one envelope:
|
|
|
2557
2557
|
Inside a handler, throwing anything other than `fact.retryLater()` is an error fact, not an error
|
|
2558
2558
|
response — see §7.
|
|
2559
2559
|
|
|
2560
|
+
A deployment whose vars fail validation (an `ENVIRONMENT` outside development / staging /
|
|
2561
|
+
production, a missing mainnet `EVALUATION_DENOM`, …) answers every request `500 INTERNAL` with the
|
|
2562
|
+
message `This oracle's configuration is invalid — check: <VAR>, …` — the var NAMES only; the full
|
|
2563
|
+
validation text, which may describe a value, is in the log (`request_failed`).
|
|
2564
|
+
|
|
2560
2565
|
### CLI exit codes
|
|
2561
2566
|
|
|
2562
2567
|
| Code | Meaning |
|
package/docs/guide.md
CHANGED
|
@@ -70,7 +70,7 @@ bun run cf-typegen
|
|
|
70
70
|
| `test/facts.test.ts`, `test/facts/*.test.ts` | **yours** | Plain vitest in node, with `@ixo/decision-oracle/testing` |
|
|
71
71
|
| `wrangler.jsonc` | **yours to fill** | Bindings, vars, the cron, the custom domains. Binding and var **names are the package's contract** — never rename one |
|
|
72
72
|
| `.dev.vars` | **yours, never committed** | Local secrets. `.dev.vars.example` lists every one with what it does |
|
|
73
|
-
| `tsconfig.json`, `biome.json`, `vitest.config.ts`, `package.json` | generated | Scripts: `dev`, `deploy`, `deploy:testnet`, `deploy:production`, `build`, `cf-typegen`, `db:migrate`, `db:migrate:remote`, `test`, `typecheck`, `lint`, `check` |
|
|
73
|
+
| `tsconfig.json`, `biome.json`, `vitest.config.ts`, `package.json` | generated | Scripts: `dev`, `deploy`, `deploy:devnet`, `deploy:testnet`, `deploy:production`, `build`, `cf-typegen`, `db:migrate`, `db:migrate:remote`, `test`, `typecheck`, `lint`, `check` |
|
|
74
74
|
| `.claude/skills/` | shipped | The six skills below. Refresh after an upgrade: `bunx decision-oracle skills sync` |
|
|
75
75
|
| `CLAUDE.md` | shipped | The two rules, and where the package docs live |
|
|
76
76
|
|
|
@@ -83,16 +83,19 @@ write, billing pauses, Matrix and email notices — is the package. See
|
|
|
83
83
|
## 3. Identities — two keys, two jobs
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
bunx decision-oracle derive --new
|
|
86
|
+
bunx decision-oracle derive --new --write .dev.vars --as SERVICE_ED25519_MNEMONIC
|
|
87
|
+
bunx decision-oracle derive --new --write .dev.vars
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
invocation the oracle mints (to the engine, to external sources, to the claim bot, to the UCAN
|
|
93
|
-
Store, to the VFS) and backs `/.well-known/did.json`. Ignore the `ORACLE_*` lines this run prints.
|
|
90
|
+
`--write` appends the mnemonic to the file (0600) under `--as` (default `ORACLE_SECP_MNEMONIC`) and
|
|
91
|
+
never prints it; a name the file already holds is refused (replacing a key changes the oracle's
|
|
92
|
+
identity). Without `--write`, `derive` prints the mnemonic as an `ORACLE_SECP_MNEMONIC=` line.
|
|
94
93
|
|
|
95
|
-
**
|
|
94
|
+
**The first** is the `did:web` key. It signs every UCAN invocation the oracle mints (to the engine,
|
|
95
|
+
to external sources, to the claim bot, to the UCAN Store, to the VFS) and backs
|
|
96
|
+
`/.well-known/did.json`.
|
|
97
|
+
|
|
98
|
+
**The second** is the chain account key. Its mnemonic is `ORACLE_SECP_MNEMONIC` (a secret), and
|
|
96
99
|
the same run prints `ORACLE_ADDRESS`, `ORACLE_DID` and `ORACLE_MATRIX_USER_ID` — those three are
|
|
97
100
|
**public config**, so they go in `wrangler.jsonc` `vars`. This key signs `MsgEvaluateClaim`, holds
|
|
98
101
|
the on-chain grant, and is the audience of the owner's claim-bot delegation. `ORACLE_ADDRESS` is
|
|
@@ -852,7 +855,7 @@ bunx decision-oracle oracle init --protocol <protocol did> --kit-url http://loca
|
|
|
852
855
|
```
|
|
853
856
|
|
|
854
857
|
**A full on-chain identity is mandatory** for every oracle built with this kit — the entity, its
|
|
855
|
-
`#pro` profile, its `#dmn` domain card and its `#acard` Agent Card. `--logo` — an https URL, or a local .png/.jpg/.webp/.svg file the CLI stores on the IXO Vault (the dry run shows its content-addressed URL, `--yes` uploads it) — is the one input to ask for: without it the domain card carries no logo, and the portal, the console and the Openhands app show a placeholder.
|
|
858
|
+
`#pro` profile, its `#dmn` domain card and its `#acard` Agent Card. `--logo` — an https URL, or a local .png/.jpg/.webp/.svg file (up to 5 MB) the CLI stores on the IXO Vault (the dry run shows its content-addressed URL, `--yes` uploads it) — is the one input to ask for: without it the domain card carries no logo, and the portal, the console and the Openhands app show a placeholder.
|
|
856
859
|
|
|
857
860
|
Thirteen steps, always in this order, each printing `do` or `skip (<why>)`:
|
|
858
861
|
|
|
@@ -1047,7 +1050,7 @@ Three things to decide:
|
|
|
1047
1050
|
### Third-party oracle fees
|
|
1048
1051
|
|
|
1049
1052
|
An oracle that IXO does not run is paid on chain claims by the collection's on-chain **evaluation
|
|
1050
|
-
fee**: the `Payments.evaluation` coin, split 80/10/10
|
|
1053
|
+
fee**: the `Payments.evaluation` coin, split by the chain (80% to the oracle, 10% to the network, 10% to the relayer node — the x/claims `network_fee_percentage` / `node_fee_percentage` chain params, governance-set, 10/10 on mainnet today; rounding remainder to the oracle) on every `MsgEvaluateClaim`. Gate 4
|
|
1051
1054
|
holds a collection to your fee, matching the denom exactly. The coin differs per network:
|
|
1052
1055
|
|
|
1053
1056
|
- **mainnet** — real USDC: USDC.inj, native Circle USDC on Injective over IBC (the USDC IXO's
|
package/package.json
CHANGED
|
@@ -51,7 +51,9 @@ The engine bills every decision to the account that registered the oracle. Pick
|
|
|
51
51
|
`ibc/77C12480BD8C29BF0ACEC2143736C15BAF8CD232CA27BAE09336677B828955E6`). Never PAY (`upay`): it
|
|
52
52
|
is only for oracles IXO runs, and register refuses it on yours. The app escrows each ask in your
|
|
53
53
|
coin and amount (read from your `/v1/info`); an ask escrowing less is refused 402 and never
|
|
54
|
-
judged.
|
|
54
|
+
judged. You keep 80% of it (on mainnet today the chain pays 10% to the network and 10% to the
|
|
55
|
+
relayer node — chain parameters governance can change), so
|
|
56
|
+
price that 80% above the engine's per-decision cost, which is billed to you.
|
|
55
57
|
- **Or free, bounded** — `minAmount: "0"` and an `openhands.admit` hook that refuses asks you will
|
|
56
58
|
not pay for (an allow-list of admins, a daily budget):
|
|
57
59
|
|
|
@@ -62,7 +62,7 @@ bunx @ixo/decision-oracle init <dir> [--name <project-name>] [--openhands]
|
|
|
62
62
|
cd <dir> && bun install
|
|
63
63
|
bun run cf-typegen # after ANY wrangler.jsonc binding/var change, too
|
|
64
64
|
wrangler d1 create <project-name> # paste the id into wrangler.jsonc
|
|
65
|
-
wrangler kv namespace create
|
|
65
|
+
wrangler kv namespace create <project>-cache # paste the id into wrangler.jsonc (KV names are per account)
|
|
66
66
|
bun run db:migrate # the package's own migrations, applied to the local D1
|
|
67
67
|
cp .dev.vars.example .dev.vars # git-ignored; secrets only
|
|
68
68
|
```
|
|
@@ -77,19 +77,23 @@ every env) — then follow `add-openhands-support` for who pays, registering and
|
|
|
77
77
|
### 1. Identity — two keys
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
-
bunx decision-oracle derive --new
|
|
80
|
+
bunx decision-oracle derive --new --write .dev.vars --as SERVICE_ED25519_MNEMONIC
|
|
81
|
+
bunx decision-oracle derive --new --write .dev.vars
|
|
81
82
|
```
|
|
82
83
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
paste silently sets the wrong key. This is the did:web key that signs every UCAN invocation this
|
|
86
|
-
oracle mints and backs `/.well-known/did.json`; ignore the `ORACLE_*` lines this run prints.
|
|
87
|
-
- Run two: the mnemonic is `ORACLE_SECP_MNEMONIC` (the chain wallet that signs `MsgEvaluateClaim`);
|
|
88
|
-
the same run prints `ORACLE_ADDRESS`, `ORACLE_DID` and `ORACLE_MATRIX_USER_ID` — those three are
|
|
89
|
-
**public vars**, so they go in `wrangler.jsonc` `vars`, not `.dev.vars`.
|
|
84
|
+
`--write` appends the key to the file (0600) and never prints it — never run `derive --new` without
|
|
85
|
+
it in an agent session, or the mnemonic lands in the transcript.
|
|
90
86
|
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
- The first is `SERVICE_ED25519_MNEMONIC`: the did:web key that signs every UCAN invocation this
|
|
88
|
+
oracle mints and backs `/.well-known/did.json`.
|
|
89
|
+
- The second is `ORACLE_SECP_MNEMONIC` (the chain wallet that signs `MsgEvaluateClaim`); it prints
|
|
90
|
+
`ORACLE_ADDRESS`, `ORACLE_DID` and `ORACLE_MATRIX_USER_ID` — **public vars**, so they go in
|
|
91
|
+
`wrangler.jsonc` `vars` (top level and every env), not `.dev.vars`.
|
|
92
|
+
|
|
93
|
+
`ORACLE_HOSTNAME` (the host the did:web is served from) is `localhost:8787` in `.dev.vars` for local
|
|
94
|
+
dev ONLY. Each deployed env's host lives in that env's `wrangler.jsonc` `vars` and must equal its
|
|
95
|
+
Custom Domain in `routes`; a per-env secrets file (`.dev.vars.<env>`) must NOT carry a localhost
|
|
96
|
+
`ORACLE_HOSTNAME`, or `engine register --env-file .dev.vars.<env>` registers localhost. Also put
|
|
93
97
|
`UNIQUE_HMAC_KEY` in `.dev.vars` (any long random string; rotating it orphans every registered
|
|
94
98
|
duplicate digest). `derive "<existing mnemonic>"` uses a wallet the provider already holds instead of
|
|
95
99
|
minting one. `ORACLE_ADDRESS` is asserted against the mnemonic before the first proof or signature:
|
|
@@ -119,7 +123,9 @@ it; no handler stands in). Then fill in `src/index.ts` with the provider's answe
|
|
|
119
123
|
table below):
|
|
120
124
|
`supportedProtocols: ["<protocol did>"]`, the evaluation fee, and `policies`.
|
|
121
125
|
|
|
122
|
-
The fee is the on-chain evaluation payment a collection must carry, or register refuses it.
|
|
126
|
+
The fee is the on-chain evaluation payment a collection must carry, or register refuses it. The
|
|
127
|
+
chain splits each payment: 80% to the oracle, 10% to the network, 10% to the relayer node (chain
|
|
128
|
+
parameters, 10/10 on mainnet today). Set it
|
|
123
129
|
per wrangler env with the `EVALUATION_DENOM` / `EVALUATION_MIN_AMOUNT` vars (both or neither; the
|
|
124
130
|
minimum in integer base units) — they replace `pricing.evaluation` from `defineOracle`, and they
|
|
125
131
|
are REQUIRED on mainnet: the worker refuses to start without them. A third-party oracle charges
|
|
@@ -306,7 +312,7 @@ where a live token would have skipped (it mints a new Matrix device — not a ca
|
|
|
306
312
|
```bash
|
|
307
313
|
bun run db:migrate:remote # BEFORE the first deploy of the default env; for a named env:
|
|
308
314
|
# bunx wrangler d1 migrations apply DB --remote --env <env>
|
|
309
|
-
bun run deploy
|
|
315
|
+
bun run deploy:devnet # or deploy:testnet / deploy:production (`--env <env>`)
|
|
310
316
|
wrangler secret put ORACLE_MATRIX_ACCESS_TOKEN # the value step 8 wrote into .dev.vars
|
|
311
317
|
```
|
|
312
318
|
|
|
@@ -330,7 +336,7 @@ failed check — `identity` means `ORACLE_ENTITY_DID` is missing from that env's
|
|
|
330
336
|
**Then register with the engine — do it now, don't wait for the first claim:**
|
|
331
337
|
|
|
332
338
|
```bash
|
|
333
|
-
bunx decision-oracle engine register --env <env> --env-file .dev.vars
|
|
339
|
+
bunx decision-oracle engine register --env <env> --env-file .dev.vars.<env>
|
|
334
340
|
```
|
|
335
341
|
|
|
336
342
|
The chain lane proves its address lazily, on its first `decide`; until then the engine — and the
|
|
@@ -135,6 +135,26 @@ tasks downgrade approve/partial to review → verdict → action.
|
|
|
135
135
|
"map": { "true": "approve", "false": "reject" } } ] } // EVERY possible answer mapped
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
+
`assignTo.role` is **routing, not access**: any non-empty name for the lane the review goes to (default
|
|
139
|
+
`"reviewer"`; who may answer is the review gate's business — the company's reviewer grants — never this
|
|
140
|
+
field). `assigneeDid` names ONE person instead; `route.matrixRoom` sends it to a room. Use one or the other.
|
|
141
|
+
|
|
142
|
+
**Claim-level task** — a `ReviewTask` with NO `forCriterion` that no `ManualScore` binds: the "a person
|
|
143
|
+
gives the final OK" question.
|
|
144
|
+
|
|
145
|
+
```jsonc
|
|
146
|
+
{ "@type": "ReviewTask", "id": "MED-RT-FINAL", "prompt": "Do you accept this delivery as done?",
|
|
147
|
+
"show": ["$deliveryPhoto", "$clinicId"], "answer": { "type": "boolean" },
|
|
148
|
+
"map": { "true": "approve", "false": "reject" } }
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- **When it is asked:** on the claim's first decision, whenever the verdict is `review` — beside anything
|
|
152
|
+
else pending (a held ManualScore, a duplicate hold, a gate with `onFail: "review"`, an errored
|
|
153
|
+
`onError: "review"` check). A claim the machine approves or rejects outright is never asked.
|
|
154
|
+
- **What the answer does:** its `map` IS the final verdict (several claim-level answers: reject beats
|
|
155
|
+
partial beats approve). It settles even a capped or errored-check hold — it is the final human authority.
|
|
156
|
+
- To make EVERY claim go to a person, pair it with a gate whose `onFail` is `"review"` and that always holds.
|
|
157
|
+
|
|
138
158
|
## Derived values
|
|
139
159
|
|
|
140
160
|
```jsonc
|
|
@@ -84,7 +84,7 @@ It must list `ext.orderKnown`, `ext.deliveryCodeValid`, `ext.cashReconciled`,
|
|
|
84
84
|
|
|
85
85
|
### 2. Identity
|
|
86
86
|
|
|
87
|
-
Do `create-oracle` step 1 (two `derive --new` runs
|
|
87
|
+
Do `create-oracle` step 1 (two `derive --new --write` runs, the first `--as SERVICE_ED25519_MNEMONIC`;
|
|
88
88
|
the second is `ORACLE_SECP_MNEMONIC`) and step 6 (the owner's engine delegation), with:
|
|
89
89
|
|
|
90
90
|
- the three public lines (`ORACLE_ADDRESS`, `ORACLE_DID`, `ORACLE_MATRIX_USER_ID`) written into BOTH
|
|
@@ -125,7 +125,7 @@ deploy — `devnet` in the example, `testnet` / `production` in the template):
|
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
127
|
bunx wrangler d1 create shipment-delivery-oracle-devnet # → env.<env> d1 database_id
|
|
128
|
-
bunx wrangler kv namespace create
|
|
128
|
+
bunx wrangler kv namespace create <project>-cache-devnet # → env.<env> kv id
|
|
129
129
|
bunx wrangler r2 bucket create shipment-delivery-oracle-uploads-devnet
|
|
130
130
|
```
|
|
131
131
|
|
|
@@ -30,7 +30,7 @@ Create the two bindings and paste their ids into `wrangler.jsonc` (once per env
|
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
wrangler d1 create {{name}}
|
|
33
|
-
wrangler kv namespace create
|
|
33
|
+
wrangler kv namespace create {{name}}-cache
|
|
34
34
|
bun run db:migrate # applies the package's migrations to the local D1
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -39,7 +39,8 @@ never write a migration.
|
|
|
39
39
|
|
|
40
40
|
## 3. Identity — two keys, two DIDs
|
|
41
41
|
|
|
42
|
-
`bunx decision-oracle derive --new
|
|
42
|
+
`bunx decision-oracle derive --new --write .dev.vars [--as SERVICE_ED25519_MNEMONIC]` writes a fresh
|
|
43
|
+
mnemonic into `.dev.vars` (never printed) and prints the three public vars derived from it.
|
|
43
44
|
Secrets go in `.dev.vars` locally (`cp .dev.vars.example .dev.vars`) and via
|
|
44
45
|
`wrangler secret put <NAME>` once deployed; their public halves are `vars` in `wrangler.jsonc`.
|
|
45
46
|
|
|
@@ -139,7 +140,7 @@ under `/v1` requires a UCAN invocation addressed to `did:web:<ORACLE_HOSTNAME>`.
|
|
|
139
140
|
## 7. Deploy and declare yourself on chain
|
|
140
141
|
|
|
141
142
|
```bash
|
|
142
|
-
bun run deploy
|
|
143
|
+
bun run deploy:devnet # or deploy:testnet / deploy:production
|
|
143
144
|
```
|
|
144
145
|
|
|
145
146
|
The Custom Domain in `routes` must equal `ORACLE_HOSTNAME` — the did:web document is served from
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "wrangler dev --test-scheduled",
|
|
7
7
|
"deploy": "wrangler deploy",
|
|
8
|
+
"deploy:devnet": "wrangler deploy --env devnet",
|
|
8
9
|
"deploy:testnet": "wrangler deploy --env testnet",
|
|
9
10
|
"deploy:production": "wrangler deploy --env production",
|
|
10
11
|
"build": "wrangler deploy --dry-run --outdir dist",
|