@oneie/sdk 0.17.5 → 0.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing.d.ts +244 -14
- package/dist/billing.d.ts.map +1 -1
- package/dist/billing.js +374 -55
- package/dist/billing.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +8 -1
- package/dist/client.js.map +1 -1
- package/dist/generated/schemas/index.d.ts +2 -2
- package/dist/generated/schemas.d.ts +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/meta.d.ts +13 -0
- package/dist/meta.d.ts.map +1 -1
- package/dist/meta.js +11 -0
- package/dist/meta.js.map +1 -1
- package/dist/prices/vendors.d.ts +7 -0
- package/dist/prices/vendors.d.ts.map +1 -0
- package/dist/prices/vendors.js +229 -0
- package/dist/prices/vendors.js.map +1 -0
- package/dist/prices.d.ts +41 -0
- package/dist/prices.d.ts.map +1 -0
- package/dist/prices.js +79 -0
- package/dist/prices.js.map +1 -0
- package/dist/receiver-layers.d.ts +26 -0
- package/dist/receiver-layers.d.ts.map +1 -1
- package/dist/receiver-layers.js +54 -5
- package/dist/receiver-layers.js.map +1 -1
- package/dist/receivers.d.ts +437 -63
- package/dist/receivers.d.ts.map +1 -1
- package/dist/receivers.js +566 -129
- package/dist/receivers.js.map +1 -1
- package/dist/secrets-give.d.ts +1 -1
- package/dist/secrets-give.d.ts.map +1 -1
- package/dist/secrets-give.js +1 -1
- package/dist/secrets-give.js.map +1 -1
- package/dist/secrets-list.d.ts +169 -0
- package/dist/secrets-list.d.ts.map +1 -0
- package/dist/secrets-list.js +13 -0
- package/dist/secrets-list.js.map +1 -0
- package/dist/secrets-one-vault.d.ts +33 -1
- package/dist/secrets-one-vault.d.ts.map +1 -1
- package/dist/secrets-one-vault.js +42 -2
- package/dist/secrets-one-vault.js.map +1 -1
- package/dist/secrets.d.ts +9 -0
- package/dist/secrets.d.ts.map +1 -1
- package/dist/secrets.js +12 -0
- package/dist/secrets.js.map +1 -1
- package/dist/work-contract-grammar.json +36 -5
- package/dist/work-contract.d.ts +24 -0
- package/dist/work-contract.d.ts.map +1 -1
- package/dist/work-contract.js +55 -0
- package/dist/work-contract.js.map +1 -1
- package/package.json +6 -2
package/dist/receivers.js
CHANGED
|
@@ -3,6 +3,47 @@ import { AgentActionResponseSchema, AgentStatusResponseSchema, CapabilityItemSch
|
|
|
3
3
|
import { FieldSchema, ResourceTypeSchema } from "./types.js";
|
|
4
4
|
import { GroupEntitySchema } from "./generated/schemas/index.js";
|
|
5
5
|
import { PROVIDER_NAMES, REFUSALS, USED_REFUSALS } from "./secrets.js";
|
|
6
|
+
/**
|
|
7
|
+
* The work-contract pair, declared on every VALUE-MOVING receiver's request.
|
|
8
|
+
*
|
|
9
|
+
* `/api/ask` dispatches zod's PARSED body (receiver-envelope.ts validateReceiver),
|
|
10
|
+
* so a field a request schema does not name is stripped before the universal gate
|
|
11
|
+
* (one.ie/web resolvers/_shared.ts validateContractGate) ever runs. That gate
|
|
12
|
+
* REQUIRES a contract from an agent key on `VALUE_MOVING_RECEIVERS` — so a
|
|
13
|
+
* value-moving receiver that omits this pair demands a field it can never receive.
|
|
14
|
+
* Measured on production 2026-11-07 (text/agent-path.md walk 7): `market:escrow`
|
|
15
|
+
* and `checkout:create` answered `contract_required` with the contract in the body.
|
|
16
|
+
*
|
|
17
|
+
* `contractScope` is the namespaced name on purpose: five receivers already use a
|
|
18
|
+
* bare `scope` for a board filter / visibility / key scope. For a BARE KEY (a
|
|
19
|
+
* Bearer with no browser session — human- or agent-typed) the gate binds `agent`
|
|
20
|
+
* and `workspace` to the attested key (ctx.actorId / ctx.keyGroup) and resolves
|
|
21
|
+
* `granted` as the request INTERSECTED with (the bare-key ceiling ∪ the key's
|
|
22
|
+
* attested grant rows) — a caller names a scope, it never grants one. A
|
|
23
|
+
* value-moving capability (`signal:<receiver>` for a receiver declared
|
|
24
|
+
* `moves: "value"`) comes only from a `work_contract_grants` row the
|
|
25
|
+
* workspace owner wrote through `agents:approve`; without one the refusal is
|
|
26
|
+
* `grant_required`, naming the capability and that door. And the contract must
|
|
27
|
+
* NAME the receiver being called — `(signal (to "<receiver>"))` — or it is a decoy.
|
|
28
|
+
* Parity with the `moves: "value"` set: tests/unit/agents/value-moving-parity.test.ts.
|
|
29
|
+
*/
|
|
30
|
+
const WORK_CONTRACT_FIELDS = {
|
|
31
|
+
contract: z.unknown().optional().describe("WORK-AST s-expression (JSON arrays) — `[\"contract\", [\"workflow\", name, [\"signal\", [\"to\", \"<this receiver>\"]], …]]`. Required from an agent key on a value-moving receiver, and it must name THIS receiver in a `signal` node; validated against the schema-generated grammar before the resolver runs (@oneie/sdk/work-contract)."),
|
|
32
|
+
contractScope: z.object({
|
|
33
|
+
agent: z.string().describe("Overridden server-side by the attested actor (ctx.actorId) for a bare key."),
|
|
34
|
+
workspace: z.string().describe("Overridden server-side for a bare key: at a value-moving receiver, the workspace the call moves value in (its declared movesIn field, else the caller's attested ownerSlug — exactly what the resolver debits); elsewhere the key's attested home."),
|
|
35
|
+
granted: z.array(z.string()).describe("Capabilities the contract may use (workflow:define · step:<kind> · track:mark · signal:<receiver> …). For a bare key this is a REQUEST: it is intersected with the bare-key ceiling plus the key's attested grant rows. A value-moving capability (signal:<receiver> for a `moves: \"value\"` receiver) is held only through an `agents:approve` row the workspace owner wrote — it cannot be self-granted here. step:sell is a step kind in the ceiling: a sell step only mints a checkout."),
|
|
36
|
+
}).optional().describe("The scope the contract is validated against. Must travel with `contract` (half a declaration is refused)."),
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The workspace a SERVICE caller (the channels worker, shared gateway key) acts in.
|
|
40
|
+
* `/api/ask` reads it off the zod-PARSED payload, so a receiver that does not name it
|
|
41
|
+
* strips it, `ctx.ownerSlug` arrives undefined, and every chat workflow tool past
|
|
42
|
+
* workflow_list answered "workflow not found" (production chat, 2026-09-17). A session
|
|
43
|
+
* or world-key caller's own attested workspace always wins; the field is ignored there.
|
|
44
|
+
* Guard: packages/sdk/test/service-lane-slug.test.ts.
|
|
45
|
+
*/
|
|
46
|
+
const SERVICE_SLUG = z.string().optional().describe("Workspace a service caller acts in. Ignored for a session or key caller — their attested workspace is used.");
|
|
6
47
|
/**
|
|
7
48
|
* Declare a receiver contract. Identity at runtime — its only job is to pin the
|
|
8
49
|
* `Req`/`Res` generics so the catalog infers payload + outcome types.
|
|
@@ -67,6 +108,22 @@ const CARD_STEP_RESPONSE = z.object({
|
|
|
67
108
|
* receiver that pages, caps or reads a snapshot names its window in the response, every
|
|
68
109
|
* time — and `reason` had three readers branching on it while the contract denied it.
|
|
69
110
|
*/
|
|
111
|
+
/**
|
|
112
|
+
* One row of the swap alias table (one.ie/web/src/lib/swap/assets.ts, text/swap-plan.md
|
|
113
|
+
* § The asset table) — what swap:quote resolved an alias to, and what can sign it.
|
|
114
|
+
*/
|
|
115
|
+
const SWAP_ASSET = z.object({
|
|
116
|
+
alias: z.string().describe("Canonical alias, e.g. USDC@base"),
|
|
117
|
+
chain: z.string().describe("ethereum | base | arbitrum | solana | sui | bitcoin | hyperliquid"),
|
|
118
|
+
symbol: z.string().describe("Ticker"),
|
|
119
|
+
assetId: z.string().describe("1Click asset id this alias resolves to"),
|
|
120
|
+
decimals: z.number().describe("Base-unit decimals"),
|
|
121
|
+
contract: z.string().nullable().describe("EVM contract or Sui coin type; null for a native coin"),
|
|
122
|
+
signer: z.string().describe("browser = ONE's in-browser key can send it · external = send from any wallet to the deposit address · none = quote only"),
|
|
123
|
+
origin: z.boolean().describe("Can be swapped FROM (live)"),
|
|
124
|
+
destination: z.boolean().describe("Can be swapped TO"),
|
|
125
|
+
});
|
|
126
|
+
const SWAP_TX = z.object({ hash: z.string().describe("Tx hash"), explorerUrl: z.string().describe("Explorer link") });
|
|
70
127
|
const QUEUE_READ_FIELDS = {
|
|
71
128
|
total: z.number().optional().describe("Rows matching BEFORE `limit`. A FLOOR, not a count, whenever `truncatedTypes` is present"),
|
|
72
129
|
truncated: z.boolean().optional().describe("true = the answer is short: more rows than returned (raise limit, or use tasks:board) OR graph.json marks a type this read touched as cut (`truncatedTypes`)"),
|
|
@@ -179,25 +236,51 @@ export const RECEIVERS = {
|
|
|
179
236
|
effect: "ask", cost: "free", reversible: false, idempotent: true, settles: "none", auth: "manage_workspace",
|
|
180
237
|
examples: [{ agentId: "acme--research-agent", objectId: "0x5f3a" }],
|
|
181
238
|
}),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
239
|
+
// ── agents:approve / agents:update — the attested grant store the work-contract gate reads ──
|
|
240
|
+
// A bare key (agent- or human-typed, no browser session) that calls a receiver
|
|
241
|
+
// declared `moves: "value"` must carry a contract naming `signal:<receiver>`, and
|
|
242
|
+
// that capability is held ONLY through a `work_contract_grants` row (migration
|
|
243
|
+
// 0370) keyed (workspace, actor, capability). This is the door that writes the
|
|
244
|
+
// row: a person's own session, controlling the workspace, never a bare key
|
|
245
|
+
// (requireHumanPresence) and never a workflow step. The gate reads the row
|
|
246
|
+
// (one.ie/web lib/contract-grants.ts) and refuses `grant_required` without it.
|
|
247
|
+
"agents:approve": receiver({
|
|
248
|
+
receiver: "agents:approve",
|
|
249
|
+
summary: "Workspace owner, in a signed-in session: grant a key's actor one value-moving capability for work contracts — `signal:<receiver>` for a receiver declared `moves: \"value\"` (market:escrow, wallet:transfer, wallet:send …). Written to work_contract_grants keyed (workspace, actor, capability); the universal gate reads the row and answers `grant_required` without it. Never a bare key, never a workflow step",
|
|
186
250
|
request: () => z.object({
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
skills: z.array(z.string()).optional(),
|
|
191
|
-
invite: z.object({ email: z.string().email().optional(), role: z.string().optional() }).optional(),
|
|
192
|
-
live: z.boolean().optional(),
|
|
251
|
+
actor: z.string().min(1).max(128).describe("The key's actor id — what `grant_required` names as `actor`, the same string verifyWorldKey attests as ctx.actorId"),
|
|
252
|
+
capability: z.string().min(1).max(128).describe("`signal:<receiver>` for a `moves: \"value\"` receiver. A capability that is not value-moving — a step kind, step:sell included (a sell step only mints a checkout), a plain signal — is refused `not_a_value_capability`: the bare-key ceiling already holds it"),
|
|
253
|
+
workspace: z.string().optional().describe("The workspace the grant lives under — `grant_required` prints it as `workspace`: for a call that names its target (wallet:transfer {workspace|from: X}, payout:set {workspace: X}) it is X, granted by X's owner; for a call from the key's OWN purse (market:escrow, a transfer with no field) it is the key's HOME — the group that homes the agent — granted by the home's owner. Defaults to the caller's own workspace. The caller must control it"),
|
|
193
254
|
}),
|
|
194
255
|
response: () => z.object({
|
|
195
|
-
|
|
196
|
-
workspace: z.string(),
|
|
197
|
-
|
|
198
|
-
|
|
256
|
+
ok: z.boolean(),
|
|
257
|
+
workspace: z.string().optional(),
|
|
258
|
+
actor: z.string().optional(),
|
|
259
|
+
capability: z.string().optional(),
|
|
260
|
+
grantedBy: z.string().optional().describe("The session's attested slug that wrote the row"),
|
|
261
|
+
error: z.string().optional().describe("unauthorized | approval_required (a bare key) | not_in_workflow | forbidden (the caller does not control `workspace`) | not_a_value_capability | no_db"),
|
|
262
|
+
}),
|
|
263
|
+
effect: "ask", auth: "manage_workspace", cost: "free", reversible: true, idempotent: true,
|
|
264
|
+
examples: [{ actor: "01a1b2b393c785de0503803b", capability: "signal:market:escrow" }],
|
|
265
|
+
}),
|
|
266
|
+
"agents:update": receiver({
|
|
267
|
+
receiver: "agents:update",
|
|
268
|
+
summary: "Workspace owner, in a signed-in session: archive a work-contract grant written by agents:approve — `status: \"revoked\"` sets revoked_at on the (workspace, actor, capability) row, the row is kept, and the gate stops honouring it on the next call. The verb is `update` because archiving is an update with a status; granting is agents:approve",
|
|
269
|
+
request: () => z.object({
|
|
270
|
+
actor: z.string().min(1).max(128).describe("The key's actor id the grant names"),
|
|
271
|
+
capability: z.string().min(1).max(128).describe("The capability to revoke, exactly as granted"),
|
|
272
|
+
status: z.literal("revoked").describe("The only status this door writes — a grant is re-armed by agents:approve, never here"),
|
|
273
|
+
workspace: z.string().optional().describe("The workspace the grant is scoped to; defaults to the caller's own. The caller must control it"),
|
|
274
|
+
}),
|
|
275
|
+
response: () => z.object({
|
|
276
|
+
ok: z.boolean(),
|
|
277
|
+
revoked: z.boolean().optional().describe("false when no live row matched — already revoked or never granted"),
|
|
278
|
+
workspace: z.string().optional(),
|
|
279
|
+
actor: z.string().optional(),
|
|
280
|
+
capability: z.string().optional(),
|
|
281
|
+
error: z.string().optional().describe("unauthorized | approval_required | not_in_workflow | forbidden | no_db"),
|
|
199
282
|
}),
|
|
200
|
-
effect: "ask", auth: "
|
|
283
|
+
effect: "ask", auth: "manage_workspace", cost: "free", reversible: true, idempotent: true,
|
|
201
284
|
}),
|
|
202
285
|
"agent:bootstrap": receiver({
|
|
203
286
|
receiver: "agent:bootstrap",
|
|
@@ -220,6 +303,8 @@ export const RECEIVERS = {
|
|
|
220
303
|
}),
|
|
221
304
|
"auth:agent": receiver({
|
|
222
305
|
receiver: "auth:agent",
|
|
306
|
+
// auth (public) — task:01a128d6108e551f5966106b: the open agent sign-up door by design — handler reads only ctx.ip for its rate limit (resolvers/auth.ts:65-74); the pay/tools demos call it with no key.
|
|
307
|
+
auth: "public",
|
|
223
308
|
canonical: "agent:enroll",
|
|
224
309
|
// `wallet` is a PUBLIC receiving address the caller derived in its own process.
|
|
225
310
|
// Nothing here generates keys. The address is stored on the TypeDB actor but NOT
|
|
@@ -237,6 +322,8 @@ export const RECEIVERS = {
|
|
|
237
322
|
}),
|
|
238
323
|
"agents:sync": receiver({
|
|
239
324
|
receiver: "agents:sync",
|
|
325
|
+
// auth (member) — task:01a128d6108e551f5966106b: no handler (parity-baseline declaredNoHandler); syncs the CALLER's agent definitions — RECIPES.spine reaches it holding the key auth:agent minted.
|
|
326
|
+
auth: "member",
|
|
240
327
|
surfaces: { mcp: { name: "sync_agent" } },
|
|
241
328
|
summary: "Declare capability — sync agent definitions, skills, and memberships",
|
|
242
329
|
// Accepts a single markdown body or a structured multi-agent world payload.
|
|
@@ -305,6 +392,8 @@ export const RECEIVERS = {
|
|
|
305
392
|
}),
|
|
306
393
|
"world:accept-client-invite": receiver({
|
|
307
394
|
receiver: "world:accept-client-invite",
|
|
395
|
+
// auth (public) — task:01a128d6108e551f5966106b: the TOKEN is the credential: verifyInviteToken + single-use UPDATE (world-receivers.ts:1266-1278), ctx is ignored; the invitee is logged out by design (auth-plugins/invite-redeem.ts:371).
|
|
396
|
+
auth: "public",
|
|
308
397
|
summary: "Redeem a client invite — creates the workspace owned by the invitee (single-use, replay-protected)",
|
|
309
398
|
request: () => z.object({ token: z.string(), email: z.string().email().optional(), name: z.string().optional() }),
|
|
310
399
|
response: () => z.object({ wsid: z.string(), slug: z.string(), owner: z.string(), parent: z.string() }),
|
|
@@ -520,7 +609,10 @@ export const RECEIVERS = {
|
|
|
520
609
|
"visitor:promote": receiver({
|
|
521
610
|
receiver: "visitor:promote",
|
|
522
611
|
summary: "Promote a tracked anonymous visitor to a TypeDB actor (anon:<hash12>) so it surfaces in People; binds rung-1 visitor_hash→aid. Idempotent.",
|
|
523
|
-
request: () => z.object({
|
|
612
|
+
request: () => z.object({
|
|
613
|
+
visitorHash: z.string(),
|
|
614
|
+
workspace: z.string().optional().describe("The workspace the visitor visited — files them in THAT workspace's People instead of the caller's. Honoured only when the caller's authority reaches it (platform staff, or an owner above it), else reason 'forbidden'; 'no_activity' if the hash never visited it."),
|
|
615
|
+
}),
|
|
524
616
|
response: () => z.object({
|
|
525
617
|
ok: z.boolean(),
|
|
526
618
|
aid: z.string().optional(),
|
|
@@ -1712,6 +1804,8 @@ export const RECEIVERS = {
|
|
|
1712
1804
|
// ── identity ──
|
|
1713
1805
|
"identity:address": receiver({
|
|
1714
1806
|
receiver: "identity:address",
|
|
1807
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler reads no ctx (resolvers/billing.ts:115) but no anonymous caller exists: the SDK walletFor and the MCP tool both carry a key.
|
|
1808
|
+
auth: "member",
|
|
1715
1809
|
surfaces: { mcp: true },
|
|
1716
1810
|
summary: "Resolve an actor's wallet address",
|
|
1717
1811
|
request: () => z.object({ uid: z.string() }),
|
|
@@ -1805,21 +1899,14 @@ export const RECEIVERS = {
|
|
|
1805
1899
|
}),
|
|
1806
1900
|
effect: "ask", auth: "public", cost: "free", idempotent: true,
|
|
1807
1901
|
}),
|
|
1808
|
-
// ── auth (human session) ──
|
|
1809
|
-
// auth:sign-in killed (C7): Better Auth handles all human auth; signal/ask pipeline returns dissolved
|
|
1810
|
-
"auth:sign-out": receiver({
|
|
1811
|
-
receiver: "auth:sign-out",
|
|
1812
|
-
summary: "End the current session",
|
|
1813
|
-
request: () => z.object({}),
|
|
1814
|
-
response: () => ok,
|
|
1815
|
-
effect: "signal", idempotent: true,
|
|
1816
|
-
}),
|
|
1817
1902
|
// board:join killed (C7): no resolver, no route, no caller
|
|
1818
1903
|
// agency:push:complete killed (C7): no resolver, no route, no caller
|
|
1819
1904
|
// agency:friction killed (C7): no resolver, no route, no caller
|
|
1820
1905
|
// ── groups ──
|
|
1821
1906
|
"groups:join": receiver({
|
|
1822
1907
|
receiver: "groups:join",
|
|
1908
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!gid || !uid) return { ok: false }` on ctx.ownerSlug (resolvers/groups.ts:125-126), then the discover walk for a non-public group.
|
|
1909
|
+
auth: "member",
|
|
1823
1910
|
canonical: "world:request-access",
|
|
1824
1911
|
surfaces: { mcp: true },
|
|
1825
1912
|
summary: "Join a group",
|
|
@@ -1829,6 +1916,8 @@ export const RECEIVERS = {
|
|
|
1829
1916
|
}),
|
|
1830
1917
|
"groups:leave": receiver({
|
|
1831
1918
|
receiver: "groups:leave",
|
|
1919
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!gid || !uid) return { ok: false }` on ctx.ownerSlug (resolvers/groups.ts:155-156).
|
|
1920
|
+
auth: "member",
|
|
1832
1921
|
canonical: "world:remove-member",
|
|
1833
1922
|
surfaces: { mcp: true },
|
|
1834
1923
|
summary: "Leave a group",
|
|
@@ -1881,6 +1970,8 @@ export const RECEIVERS = {
|
|
|
1881
1970
|
}),
|
|
1882
1971
|
"groups:members": receiver({
|
|
1883
1972
|
receiver: "groups:members",
|
|
1973
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!ctx.ownerSlug) throw forbidden` (resolvers/groups.ts:108).
|
|
1974
|
+
auth: "member",
|
|
1884
1975
|
canonical: "world:list-actors",
|
|
1885
1976
|
surfaces: { mcp: true },
|
|
1886
1977
|
summary: "List a group's members",
|
|
@@ -1937,6 +2028,7 @@ export const RECEIVERS = {
|
|
|
1937
2028
|
summary: "Funder only: approve a credits:request token — sets the requester's monthly budget to what it was when asked plus the amount, never past your own plan grant; replaying the same token changes nothing. The requester can never approve its own",
|
|
1938
2029
|
request: () => z.object({
|
|
1939
2030
|
token: z.string().min(10).max(4000).describe("The token credits:request returned (also in the inbox notice)."),
|
|
2031
|
+
...WORK_CONTRACT_FIELDS,
|
|
1940
2032
|
}),
|
|
1941
2033
|
response: () => z.object({
|
|
1942
2034
|
ok: z.boolean(),
|
|
@@ -1945,7 +2037,7 @@ export const RECEIVERS = {
|
|
|
1945
2037
|
clamped: z.boolean().optional().describe("true when the approval was cut to the funder's own plan grant."),
|
|
1946
2038
|
error: z.string().optional().describe("unauthorized | invalid_token | expired | not_the_funder | self_approval | recipient_moved | request_unavailable"),
|
|
1947
2039
|
}),
|
|
1948
|
-
effect: "ask", auth: "manage_clients", cost: "free", idempotent: true,
|
|
2040
|
+
effect: "ask", auth: "manage_clients", cost: "free", idempotent: true, moves: "value",
|
|
1949
2041
|
}),
|
|
1950
2042
|
"billing:clients": receiver({
|
|
1951
2043
|
receiver: "billing:clients",
|
|
@@ -1971,6 +2063,8 @@ export const RECEIVERS = {
|
|
|
1971
2063
|
// ── subscriptions ──
|
|
1972
2064
|
"subscriptions:register": receiver({
|
|
1973
2065
|
receiver: "subscriptions:register",
|
|
2066
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return forbidden` on ctx.ownerSlug (resolvers/subscriptions.ts:1092-1093).
|
|
2067
|
+
auth: "member",
|
|
1974
2068
|
canonical: "world:subscribe",
|
|
1975
2069
|
summary: "Subscribe to a receiver's events by tag",
|
|
1976
2070
|
request: () => z.object({
|
|
@@ -2004,6 +2098,8 @@ export const RECEIVERS = {
|
|
|
2004
2098
|
}),
|
|
2005
2099
|
"world:announce": receiver({
|
|
2006
2100
|
receiver: "world:announce",
|
|
2101
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!sender) return forbidden` (resolvers/subscriptions.ts:1143).
|
|
2102
|
+
auth: "member",
|
|
2007
2103
|
summary: "Broadcast a tagged signal; the world fans it to every subscriber whose follow-tags intersect. reply:true also invokes up to 5 of the matched actors and returns their answers inline (repliesTruncated:true if more matched)",
|
|
2008
2104
|
request: () => z.object({
|
|
2009
2105
|
tags: z.array(z.string()),
|
|
@@ -2027,6 +2123,8 @@ export const RECEIVERS = {
|
|
|
2027
2123
|
}),
|
|
2028
2124
|
"world": receiver({
|
|
2029
2125
|
receiver: "world",
|
|
2126
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!sender) return forbidden` (resolvers/subscriptions.ts:1078).
|
|
2127
|
+
auth: "member",
|
|
2030
2128
|
summary: "THE door — say it once, the world decides. Routes a tagged signal via the ladder (learned path → staked subscribers → CEO); fan:'all' broadcasts to every matching subscriber instead. Address form world:<tag-expr> carries tags in the receiver. reply:true also invokes the resolved actor and returns its answer inline (single-actor routes only, not fan:'all')",
|
|
2031
2129
|
request: () => z.object({
|
|
2032
2130
|
tags: z.array(z.string()).optional(),
|
|
@@ -2050,6 +2148,8 @@ export const RECEIVERS = {
|
|
|
2050
2148
|
}),
|
|
2051
2149
|
"world:outcome": receiver({
|
|
2052
2150
|
receiver: "world:outcome",
|
|
2151
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!sender) return forbidden` (resolvers/subscriptions.ts:1469).
|
|
2152
|
+
auth: "member",
|
|
2053
2153
|
summary: "Close the routing loop with the RESULT: whoever consumed a route reports success/failure, moving the same tag→receiver paths the router reads — success marks, failure warns. Pass the actor id the route returned",
|
|
2054
2154
|
request: () => z.object({
|
|
2055
2155
|
tags: z.array(z.string()),
|
|
@@ -2070,6 +2170,8 @@ export const RECEIVERS = {
|
|
|
2070
2170
|
}),
|
|
2071
2171
|
"world:route": receiver({
|
|
2072
2172
|
receiver: "world:route",
|
|
2173
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!sender) return forbidden` (resolvers/subscriptions.ts:1211).
|
|
2174
|
+
auth: "member",
|
|
2073
2175
|
summary: "Route a tagged signal to THE handler via the ladder: learned tag-node path (follow_route) → staked subscribers (reputation-ranked) → CEO standing workflow; marks the delivery path so the next route is smarter. reply:true also invokes the resolved actor and returns its answer inline. decide:true instead answers the deterministic verdict { receiver, rung, reason } (reason: highway|classified|ceo) from the learned lane — a pure read, zero side effects, zero tokens; TypeQL twin: route_verdict (migration 0043)",
|
|
2074
2176
|
request: () => z.object({
|
|
2075
2177
|
tags: z.array(z.string()).optional(),
|
|
@@ -2096,6 +2198,8 @@ export const RECEIVERS = {
|
|
|
2096
2198
|
}),
|
|
2097
2199
|
"world:suggest-workflow": receiver({
|
|
2098
2200
|
receiver: "world:suggest-workflow",
|
|
2201
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler takes data.workspace when ctx.ownerSlug is absent and then skips its mismatch check (resolvers/subscriptions.ts:1382-1386) — an anonymous cross-workspace read; the door now refuses that caller.
|
|
2202
|
+
auth: "member",
|
|
2099
2203
|
summary: "Rank staked workflows by tag match + earned track record (claw_paths), read-only — no delivery, no run, no auto-trigger. Requires >=3 successful runs before a workflow is surfaced; caps at 3 suggestions",
|
|
2100
2204
|
request: () => z.object({
|
|
2101
2205
|
tags: z.array(z.string()),
|
|
@@ -2116,6 +2220,8 @@ export const RECEIVERS = {
|
|
|
2116
2220
|
}),
|
|
2117
2221
|
"tasks:announce": receiver({
|
|
2118
2222
|
receiver: "tasks:announce",
|
|
2223
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!sender) return forbidden` (resolvers/subscriptions.ts:1518).
|
|
2224
|
+
auth: "member",
|
|
2119
2225
|
surfaces: { mcp: true },
|
|
2120
2226
|
summary: "Announce a task into the world by its tags — the first caller of world:announce",
|
|
2121
2227
|
request: () => z.object({
|
|
@@ -2145,6 +2251,8 @@ export const RECEIVERS = {
|
|
|
2145
2251
|
}),
|
|
2146
2252
|
"tasks:mine": receiver({
|
|
2147
2253
|
receiver: "tasks:mine",
|
|
2254
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return forbidden` (resolvers/subscriptions.ts:1544).
|
|
2255
|
+
auth: "member",
|
|
2148
2256
|
surfaces: { mcp: true },
|
|
2149
2257
|
summary: "My work queue: the open tasks whose words match what I subscribed to, ranked by learned weight (the tag-node lane), not static priority. Read from RAM as of `asOf`",
|
|
2150
2258
|
// `workspace` is not decoration — /api/ask reads a SERVICE caller's nominated slug off
|
|
@@ -2178,6 +2286,8 @@ export const RECEIVERS = {
|
|
|
2178
2286
|
}),
|
|
2179
2287
|
"tasks:everywhere": receiver({
|
|
2180
2288
|
receiver: "tasks:everywhere",
|
|
2289
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return forbidden` (resolvers/subscriptions.ts:1655).
|
|
2290
|
+
auth: "member",
|
|
2181
2291
|
surfaces: { mcp: true },
|
|
2182
2292
|
summary: "Every workspace I belong to, one queue: open+picked tasks visible by assignment/follow/ownership, with claimable + mine + offeredByMe flags; closed:true returns the logbook (done/verified, newest first)",
|
|
2183
2293
|
// See tasks:mine — a service caller nominates its workspace here, and zod strips any
|
|
@@ -2221,6 +2331,8 @@ export const RECEIVERS = {
|
|
|
2221
2331
|
}),
|
|
2222
2332
|
"factory:elaborate": receiver({
|
|
2223
2333
|
receiver: "factory:elaborate",
|
|
2334
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return forbidden` + inWorkspace(parent) (resolvers/factory.ts:285,307-309).
|
|
2335
|
+
auth: "member",
|
|
2224
2336
|
summary: "Create one rung of the derivation ladder (objective | deliverable | task) and hang it under its parent with containment — the ELABORATE move. The rung id is derived from slug + ordinal, so a retry dedupes instead of duplicating",
|
|
2225
2337
|
request: () => z.object({
|
|
2226
2338
|
type: z.enum(["objective", "deliverable", "task"]),
|
|
@@ -2254,6 +2366,8 @@ export const RECEIVERS = {
|
|
|
2254
2366
|
}),
|
|
2255
2367
|
"factory:size": receiver({
|
|
2256
2368
|
receiver: "factory:size",
|
|
2369
|
+
// auth (public) — task:01a128d6108e551f5966106b: pure function, no ctx (resolvers/factory.ts:243-250); the public /factory page's signal-gates probe reads it logged out (lib/factory/signal-gates.ts:73).
|
|
2370
|
+
auth: "public",
|
|
2257
2371
|
summary: "How big is this change — the tier `.claude/scripts/do-tier.sh` returns for the same paths, answered where a Worker can ask (a Worker cannot run a shell script, which is the only reason the Size card at factory flow.ts:306 is a gap). Zero real paths is REFUSED as `unsized`, mirroring the script's exit 3: absence of recon must not read as simplicity. The pin ladder in the response is a pure function of the tier; the surfaces are additive obligation, never a second gate selector",
|
|
2258
2372
|
request: () => z.object({
|
|
2259
2373
|
// The changed paths, repo-relative. do-tier sizes a DIFF, never a sentence,
|
|
@@ -2285,6 +2399,8 @@ export const RECEIVERS = {
|
|
|
2285
2399
|
}),
|
|
2286
2400
|
"factory:recon": receiver({
|
|
2287
2401
|
receiver: "factory:recon",
|
|
2402
|
+
// auth (public) — task:01a128d6108e551f5966106b: pure function over build-time PAGE_FILES, no ctx (resolvers/factory.ts:218) — the read-only sibling of factory:size.
|
|
2403
|
+
auth: "public",
|
|
2288
2404
|
summary: "What does this sentence touch — the paths, the route and the verdict `.claude/scripts/do-triage.sh` returns for the same text, answered where a Worker can ask (a Worker cannot exec a shell script, which is the only reason the recon card at factory flow.ts:480 was a gap). Runs UPSTREAM of factory:size: prose in, repo paths out, and the sizer's own contract unchanged. No model call. It ALWAYS answers with a verdict and never refuses — it runs as a workflow tool step (one.ie/ai/workflows/eng-intake.tql:33), where a failed step poisons every step downstream of it; factory:size's `unsized` stays the one refusal on this lane",
|
|
2289
2405
|
request: () => z.object({
|
|
2290
2406
|
// The captured sentence. do-triage reads what the text LITERALLY names —
|
|
@@ -2318,6 +2434,8 @@ export const RECEIVERS = {
|
|
|
2318
2434
|
}),
|
|
2319
2435
|
"factory:attempt": receiver({
|
|
2320
2436
|
receiver: "factory:attempt",
|
|
2437
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return forbidden` + inWorkspace(task) (resolvers/factory.ts:356,371-373).
|
|
2438
|
+
auth: "member",
|
|
2321
2439
|
summary: "Open an attempt contained by its task, or close it with the production edge to what it produced plus the rubric. A do-cycle IS an attempt (factory-plan.md §3.1) — do:cycle-close arms as a caller of the close phase, never as a second writer",
|
|
2322
2440
|
request: () => z.object({
|
|
2323
2441
|
phase: z.enum(["open", "close"]),
|
|
@@ -2615,6 +2733,7 @@ export const RECEIVERS = {
|
|
|
2615
2733
|
receiver: "ehc:evidence-remove",
|
|
2616
2734
|
summary: "Remove one artefact from an EHC case's evidence locker, or restore it (removed:false). Owner-only: authority is the caller's control of the case's group, read off the attested caller and never the payload. Writes one row to an append-only log — nothing is deleted, and every page says how many items the owner removed. Takes an exact evidence id from ehc:evidence; never matches a caption",
|
|
2617
2735
|
request: () => z.object({
|
|
2736
|
+
slug: SERVICE_SLUG,
|
|
2618
2737
|
cyp: z.string(), // case id or slug
|
|
2619
2738
|
evidenceId: z.string(), // exact id from ehc:evidence, e.g. 'ev-a7-railay'
|
|
2620
2739
|
removed: z.boolean().optional(), // default true; false restores
|
|
@@ -2804,6 +2923,8 @@ export const RECEIVERS = {
|
|
|
2804
2923
|
}),
|
|
2805
2924
|
"do:halt": receiver({
|
|
2806
2925
|
receiver: "do:halt",
|
|
2926
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return forbidden` + inWorkspace(plan) (resolvers/factory.ts:576,592-594).
|
|
2927
|
+
auth: "member",
|
|
2807
2928
|
summary: "Stop a factory run, or release the stop. Sets a halt latch on the plan thing that `factory:attempt` phase \"open\" refuses against, so no new attempt can be claimed; with `attempt`, also closes that in-flight attempt as dissolved. It does NOT kill an OS process — a cycle already executing stops at its next substrate write",
|
|
2808
2929
|
request: () => z.object({
|
|
2809
2930
|
// The plan slug the operator sees ("factory"). The plan tid is resolved server-side;
|
|
@@ -2831,6 +2952,8 @@ export const RECEIVERS = {
|
|
|
2831
2952
|
}),
|
|
2832
2953
|
"tasks:create": receiver({
|
|
2833
2954
|
receiver: "tasks:create",
|
|
2955
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return { error: 'workspace required' }` (resolvers/tasks.ts:415); operate on the parent (:459).
|
|
2956
|
+
auth: "member",
|
|
2834
2957
|
surfaces: { mcp: true },
|
|
2835
2958
|
summary: "Write one open task to the substrate and announce it by its tags in the same act — the quick-add entry point",
|
|
2836
2959
|
request: () => z.object({
|
|
@@ -2861,6 +2984,8 @@ export const RECEIVERS = {
|
|
|
2861
2984
|
}),
|
|
2862
2985
|
"tasks:claim": receiver({
|
|
2863
2986
|
receiver: "tasks:claim",
|
|
2987
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!claimant) return { error: 'workspace required' }` + taskAccess === 'operate' (resolvers/tasks.ts:1319,1336-1337).
|
|
2988
|
+
auth: "member",
|
|
2864
2989
|
surfaces: { mcp: true },
|
|
2865
2990
|
summary: "Take a task off the queue: blocker-gate → status picked → tag the claimant @<slug>. Address it by tid, or by the /do slug the task was created under. The claimant is the attested caller, never a body field",
|
|
2866
2991
|
// Addressable two ways, and BOTH must be optional here. The resolver has always
|
|
@@ -2889,6 +3014,8 @@ export const RECEIVERS = {
|
|
|
2889
3014
|
}),
|
|
2890
3015
|
"tasks:reap": receiver({
|
|
2891
3016
|
receiver: "tasks:reap",
|
|
3017
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!ctx.ownerSlug) return { error: 'workspace required' }` (resolvers/tasks.ts:1273).
|
|
3018
|
+
auth: "member",
|
|
2892
3019
|
surfaces: { mcp: true },
|
|
2893
3020
|
summary: "Sweep stranded claim leases in a workspace: every `picked` task whose newest updated-at-ms is older than the 45-minute TTL goes back to `open`, its @claimant tags are stripped, and the abandoned path is warned",
|
|
2894
3021
|
// The other half of the claim seam. tasks:claim is atomic, so two workers can
|
|
@@ -3023,7 +3150,11 @@ export const RECEIVERS = {
|
|
|
3023
3150
|
surfaces: { mcp: true },
|
|
3024
3151
|
summary: "Every task carrying a tag, with its task-status — the read that lets a plan's checkboxes be a PROJECTION of task state instead of a second copy. Scoped to the caller's workspace on the server",
|
|
3025
3152
|
request: () => z.object({
|
|
3026
|
-
|
|
3153
|
+
// Optional: without a tag the handler lists the caller's workspace's ACTIVE rows
|
|
3154
|
+
// (open|blocked|picked) from the board snapshot — a page of `limit`, with `total` +
|
|
3155
|
+
// `truncated`. A tag narrows to one plan's rows, unbounded as before.
|
|
3156
|
+
tag: z.string().optional(),
|
|
3157
|
+
limit: z.number().int().positive().optional().describe("Tag-less page size (default 50, cap 1000); ignored when a tag is given."),
|
|
3027
3158
|
// Optional task-status filter (open|blocked|picked|done|verified|failed|dissolved).
|
|
3028
3159
|
// Declared here because the HTTP edge dispatches zod's PARSED output — an
|
|
3029
3160
|
// undeclared field is silently stripped before the resolver reads it, and the
|
|
@@ -3040,6 +3171,11 @@ export const RECEIVERS = {
|
|
|
3040
3171
|
status: z.string(),
|
|
3041
3172
|
name: z.string().optional(),
|
|
3042
3173
|
})).optional(),
|
|
3174
|
+
total: z.number().optional().describe("Tag-less list only: rows matched before the page cut."),
|
|
3175
|
+
truncated: z.boolean().optional().describe("Tag-less list only: true when `limit` (or the board snapshot's own row cap) cut rows — `total` is the count matched, a floor when the snapshot was cut."),
|
|
3176
|
+
asOf: z.string().optional().describe("Tag-less list only: when the board snapshot it was read from was built."),
|
|
3177
|
+
stale: z.boolean().optional().describe("Tag-less list only: the snapshot rebuild failed and this is the last board that was built."),
|
|
3178
|
+
status: z.string().optional().describe("Echo of the status filter, when one was given."),
|
|
3043
3179
|
error: z.string().optional(),
|
|
3044
3180
|
}),
|
|
3045
3181
|
effect: "ask", idempotent: true, auth: "member",
|
|
@@ -3523,6 +3659,8 @@ export const RECEIVERS = {
|
|
|
3523
3659
|
}),
|
|
3524
3660
|
"tasks:undepend": receiver({
|
|
3525
3661
|
receiver: "tasks:undepend",
|
|
3662
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return { error: 'workspace required' }` + gateTask on both rows (resolvers/tasks.ts:1768,1773-1774).
|
|
3663
|
+
auth: "member",
|
|
3526
3664
|
surfaces: { mcp: true },
|
|
3527
3665
|
summary: "Remove one blocks edge — the inverse of tasks:depend. Deletes exactly the (blockedBy → tid) pair; does not touch task status. Auth: attested caller only, both ends in the caller's workspace",
|
|
3528
3666
|
request: () => z.object({
|
|
@@ -3540,6 +3678,8 @@ export const RECEIVERS = {
|
|
|
3540
3678
|
}),
|
|
3541
3679
|
"tasks:launch": receiver({
|
|
3542
3680
|
receiver: "tasks:launch",
|
|
3681
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!owner) return { error: 'workspace required' }` + operate per tid (resolvers/tasks.ts:2100,2118-2121).
|
|
3682
|
+
auth: "member",
|
|
3543
3683
|
summary: "Batch-launch ready agent-assigned tasks: per task re-check blockers, resolve the @assignee, set picked, fire agent:run, mark owner→assignee on success or revert to open + warn on failure. Per-task receipts — a batch is never all-or-nothing. Caps at 20 tids; skips human assignees",
|
|
3544
3684
|
request: () => z.object({
|
|
3545
3685
|
tids: z.array(z.string()),
|
|
@@ -3565,6 +3705,8 @@ export const RECEIVERS = {
|
|
|
3565
3705
|
}),
|
|
3566
3706
|
"tasks:link": receiver({
|
|
3567
3707
|
receiver: "tasks:link",
|
|
3708
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!actor) return { error: 'workspace required' }` + gateTask (resolvers/tasks.ts:1451,1467).
|
|
3709
|
+
auth: "member",
|
|
3568
3710
|
surfaces: { mcp: true },
|
|
3569
3711
|
summary: "Close the handoff: record that a claimed task was built via /do <slug> — append a provenance line to the task's notes (the id back-ref + doc stems) and move it to done. Auth: attested caller only",
|
|
3570
3712
|
// The slug IS the handle here — the resolver requires it and resolves the origin tid
|
|
@@ -3619,6 +3761,8 @@ export const RECEIVERS = {
|
|
|
3619
3761
|
}),
|
|
3620
3762
|
"agents:commend": receiver({
|
|
3621
3763
|
receiver: "agents:commend",
|
|
3764
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!voter) throw forbidden` (resolvers/market.ts:1865-1866).
|
|
3765
|
+
auth: "member",
|
|
3622
3766
|
summary: "Commend an agent — strengthen its reputation path",
|
|
3623
3767
|
request: () => z.object({ uid: z.string() }),
|
|
3624
3768
|
response: () => AgentActionResponseSchema,
|
|
@@ -3626,6 +3770,8 @@ export const RECEIVERS = {
|
|
|
3626
3770
|
}),
|
|
3627
3771
|
"agents:flag": receiver({
|
|
3628
3772
|
receiver: "agents:flag",
|
|
3773
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!voter) throw forbidden` (resolvers/market.ts:1878-1879).
|
|
3774
|
+
auth: "member",
|
|
3629
3775
|
summary: "Flag an agent — add resistance to its reputation path",
|
|
3630
3776
|
request: () => z.object({ uid: z.string() }),
|
|
3631
3777
|
response: () => AgentActionResponseSchema,
|
|
@@ -3633,6 +3779,8 @@ export const RECEIVERS = {
|
|
|
3633
3779
|
}),
|
|
3634
3780
|
"agents:status": receiver({
|
|
3635
3781
|
receiver: "agents:status",
|
|
3782
|
+
// auth (owner) — task:01a128d6108e551f5966106b: handler requires uid === caller or callerControlsWorkspace(caller, uid) (resolvers/market.ts:1892-1896); not a manage_actors label, which would bar an agent key setting its own status.
|
|
3783
|
+
auth: "owner",
|
|
3636
3784
|
canonical: "world:update-actor",
|
|
3637
3785
|
summary: "Set an agent active or inactive",
|
|
3638
3786
|
request: () => z.object({ uid: z.string(), status: z.string() }),
|
|
@@ -3641,6 +3789,8 @@ export const RECEIVERS = {
|
|
|
3641
3789
|
}),
|
|
3642
3790
|
"agents:capabilities": receiver({
|
|
3643
3791
|
receiver: "agents:capabilities",
|
|
3792
|
+
// auth (public) — task:01a128d6108e551f5966106b: named by the anonymous /.well-known agent door (well-known-door.ts:42,131). The handler reads no ctx and shows only what market:list would: active, visibility='open', no scope, no bounty:* row, and no TypeDB fallback (resolvers/market.ts agents:capabilities).
|
|
3793
|
+
auth: "public",
|
|
3644
3794
|
summary: "List an agent's published capabilities",
|
|
3645
3795
|
request: () => z.object({ uid: z.string() }),
|
|
3646
3796
|
response: () => z.array(CapabilityItemSchema),
|
|
@@ -3650,6 +3800,8 @@ export const RECEIVERS = {
|
|
|
3650
3800
|
// ── pay (TRANSACT — onchain settlement) ──
|
|
3651
3801
|
"pay:weight": receiver({
|
|
3652
3802
|
receiver: "pay:weight",
|
|
3803
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!callerSlug) throw forbidden` (resolvers/market.ts:1561).
|
|
3804
|
+
auth: "member",
|
|
3653
3805
|
surfaces: { mcp: { name: "pay" } },
|
|
3654
3806
|
summary: "Pay for a task by weighting the path between two actors",
|
|
3655
3807
|
request: () => z.object({
|
|
@@ -3658,9 +3810,10 @@ export const RECEIVERS = {
|
|
|
3658
3810
|
// before the handler could derive it — and before its own auth check ran.
|
|
3659
3811
|
from: z.string().optional(),
|
|
3660
3812
|
to: z.string(), task: z.string(), amount: z.number(),
|
|
3813
|
+
...WORK_CONTRACT_FIELDS,
|
|
3661
3814
|
}),
|
|
3662
3815
|
response: () => PayResponseSchema,
|
|
3663
|
-
effect: "ask", cost: "variable", settles: "onchain", reversible: false, simulatable: true,
|
|
3816
|
+
effect: "ask", cost: "variable", settles: "onchain", reversible: false, simulatable: true, moves: "value",
|
|
3664
3817
|
}),
|
|
3665
3818
|
"tasks:stake": receiver({
|
|
3666
3819
|
receiver: "tasks:stake",
|
|
@@ -3685,6 +3838,7 @@ export const RECEIVERS = {
|
|
|
3685
3838
|
receiver: "market:offer",
|
|
3686
3839
|
summary: "Buyer creates a Deal at OFFER stage — initiates A2A negotiation",
|
|
3687
3840
|
request: () => z.object({
|
|
3841
|
+
slug: SERVICE_SLUG,
|
|
3688
3842
|
id: z.string().uuid().optional(),
|
|
3689
3843
|
seller: z.string().min(1),
|
|
3690
3844
|
skill: z.string().min(1),
|
|
@@ -3718,7 +3872,7 @@ export const RECEIVERS = {
|
|
|
3718
3872
|
"market:accept": receiver({
|
|
3719
3873
|
receiver: "market:accept",
|
|
3720
3874
|
summary: "Buyer accepts deal — OFFER → ESCROW",
|
|
3721
|
-
request: () => z.object({ dealId: z.string().min(1) }),
|
|
3875
|
+
request: () => z.object({ slug: SERVICE_SLUG, dealId: z.string().min(1) }),
|
|
3722
3876
|
response: () => z.union([
|
|
3723
3877
|
z.object({ ok: z.literal(true), deal: z.object({ id: z.string(), stage: z.string(), version: z.number() }) }),
|
|
3724
3878
|
z.object({ ok: z.literal(false), error: z.string() }),
|
|
@@ -3764,12 +3918,12 @@ export const RECEIVERS = {
|
|
|
3764
3918
|
"market:settle": receiver({
|
|
3765
3919
|
receiver: "market:settle",
|
|
3766
3920
|
summary: "Release escrow payment — SETTLE → RECEIPT",
|
|
3767
|
-
request: () => z.object({ dealId: z.string().min(1) }),
|
|
3921
|
+
request: () => z.object({ slug: SERVICE_SLUG, dealId: z.string().min(1), ...WORK_CONTRACT_FIELDS }),
|
|
3768
3922
|
response: () => z.union([
|
|
3769
3923
|
z.object({ ok: z.literal(true), deal: z.object({ id: z.string(), stage: z.string(), version: z.number() }) }),
|
|
3770
3924
|
z.object({ ok: z.literal(false), error: z.string() }),
|
|
3771
3925
|
]),
|
|
3772
|
-
effect: "ask", auth: "required", reversible: false, idempotent: false,
|
|
3926
|
+
effect: "ask", auth: "required", reversible: false, idempotent: false, moves: "value",
|
|
3773
3927
|
}),
|
|
3774
3928
|
"market:dispute": receiver({
|
|
3775
3929
|
receiver: "market:dispute",
|
|
@@ -3784,17 +3938,17 @@ export const RECEIVERS = {
|
|
|
3784
3938
|
"market:escrow": receiver({
|
|
3785
3939
|
receiver: "market:escrow",
|
|
3786
3940
|
summary: "Buyer locks payment via pay.one.ie — ESCROW → EXECUTE on confirmed tx",
|
|
3787
|
-
request: () => z.object({ dealId: z.string().min(1) }),
|
|
3941
|
+
request: () => z.object({ dealId: z.string().min(1), ...WORK_CONTRACT_FIELDS }),
|
|
3788
3942
|
response: () => z.union([
|
|
3789
3943
|
z.object({ ok: z.literal(true), deal: z.object({ id: z.string(), stage: z.string(), version: z.number() }), escrowRef: z.string() }),
|
|
3790
3944
|
z.object({ ok: z.literal(false), error: z.string(), deal: z.object({ id: z.string(), stage: z.string() }).optional() }),
|
|
3791
3945
|
]),
|
|
3792
|
-
effect: "ask", auth: "required", reversible: false, idempotent: false,
|
|
3946
|
+
effect: "ask", auth: "required", reversible: false, idempotent: false, moves: "value",
|
|
3793
3947
|
}),
|
|
3794
3948
|
"market:offers": receiver({
|
|
3795
3949
|
receiver: "market:offers",
|
|
3796
3950
|
summary: "List the caller's own deals (as buyer or seller), optionally filtered by stage",
|
|
3797
|
-
request: () => z.object({ stage: z.string().optional() }),
|
|
3951
|
+
request: () => z.object({ slug: SERVICE_SLUG, stage: z.string().optional() }),
|
|
3798
3952
|
response: () => z.union([
|
|
3799
3953
|
z.object({ ok: z.literal(true), deals: z.array(z.object({
|
|
3800
3954
|
id: z.string(), buyer: z.string(), seller: z.string(), skill: z.string(),
|
|
@@ -3808,6 +3962,8 @@ export const RECEIVERS = {
|
|
|
3808
3962
|
// ── market (TRADE) ──
|
|
3809
3963
|
"market:hire": receiver({
|
|
3810
3964
|
receiver: "market:hire",
|
|
3965
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!callerSlug) throw forbidden` (resolvers/market.ts:1493).
|
|
3966
|
+
auth: "member",
|
|
3811
3967
|
summary: "Hire an agent for a skill — opens a chat or returns an escrow template",
|
|
3812
3968
|
request: () => z.object({ providerUid: z.string(), skillId: z.string(), initialMessage: z.string().optional() }),
|
|
3813
3969
|
response: () => z.union([
|
|
@@ -3821,6 +3977,8 @@ export const RECEIVERS = {
|
|
|
3821
3977
|
}),
|
|
3822
3978
|
"market:bounty": receiver({
|
|
3823
3979
|
receiver: "market:bounty",
|
|
3980
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!callerSlug) throw forbidden` (resolvers/market.ts:1616).
|
|
3981
|
+
auth: "member",
|
|
3824
3982
|
summary: "Post a bounty for a skill, backed by an escrow",
|
|
3825
3983
|
request: () => z.object({
|
|
3826
3984
|
skillId: z.string(), sellerUid: z.string(),
|
|
@@ -3844,6 +4002,8 @@ export const RECEIVERS = {
|
|
|
3844
4002
|
}),
|
|
3845
4003
|
"market:bounties": receiver({
|
|
3846
4004
|
receiver: "market:bounties",
|
|
4005
|
+
// auth (public) — task:01a128d6108e551f5966106b: the prerendered public /marketplace reads it logged out (MarketplaceApp.tsx:278); handler reads no ctx (resolvers/market.ts:1649).
|
|
4006
|
+
auth: "public",
|
|
3847
4007
|
summary: "List bounties, optionally filtered by seller or poster",
|
|
3848
4008
|
request: () => z.object({ seller: z.string().optional(), poster: z.string().optional() }),
|
|
3849
4009
|
response: () => z.array(z.object({
|
|
@@ -3854,6 +4014,8 @@ export const RECEIVERS = {
|
|
|
3854
4014
|
}),
|
|
3855
4015
|
"market:claim": receiver({
|
|
3856
4016
|
receiver: "market:claim",
|
|
4017
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!claimantUid) throw forbidden` (resolvers/market.ts:1689-1690).
|
|
4018
|
+
auth: "member",
|
|
3857
4019
|
summary: "Claim an open bounty — atomically marks it picked and binds the claimant",
|
|
3858
4020
|
request: () => z.object({ bountyId: z.string() }),
|
|
3859
4021
|
response: () => z.union([
|
|
@@ -3890,6 +4052,8 @@ export const RECEIVERS = {
|
|
|
3890
4052
|
}),
|
|
3891
4053
|
"market:list": receiver({
|
|
3892
4054
|
receiver: "market:list",
|
|
4055
|
+
// auth (public) — task:01a128d6108e551f5966106b: the /.well-known door (well-known-door.ts:43) and the prerendered public /marketplace (MarketplaceApp.tsx:277) read it logged out; handler reads no ctx (resolvers/market.ts:571).
|
|
4056
|
+
auth: "public",
|
|
3893
4057
|
summary: "List the capability market",
|
|
3894
4058
|
request: () => z.object({ tag: z.string().optional(), maxPrice: z.number().optional() }),
|
|
3895
4059
|
response: () => z.object({ capabilities: z.array(z.unknown()) }),
|
|
@@ -3898,6 +4062,8 @@ export const RECEIVERS = {
|
|
|
3898
4062
|
// ── capabilities ──
|
|
3899
4063
|
"capabilities:publish": receiver({
|
|
3900
4064
|
receiver: "capabilities:publish",
|
|
4065
|
+
// auth (owner) — task:01a128d6108e551f5966106b: handler requires sellerUid === caller or callerControlsWorkspace (resolvers/market.ts:1908-1916).
|
|
4066
|
+
auth: "owner",
|
|
3901
4067
|
summary: "Publish a capability (skill listing) to the market",
|
|
3902
4068
|
request: () => z.object({
|
|
3903
4069
|
skillId: z.string(), name: z.string(),
|
|
@@ -3921,8 +4087,14 @@ export const RECEIVERS = {
|
|
|
3921
4087
|
// ── reads (free · idempotent) ──
|
|
3922
4088
|
"signals:list": receiver({
|
|
3923
4089
|
receiver: "signals:list",
|
|
4090
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler reads the CALLER's events; with no ctx.ownerSlug it reads the 'none' bucket (resolvers/billing.ts:81-85) — nothing an anonymous caller is meant to have.
|
|
4091
|
+
auth: "member",
|
|
3924
4092
|
summary: "List recent signals",
|
|
3925
4093
|
request: () => z.object({
|
|
4094
|
+
// The service lane (channels' analytics tools) names the workspace it asks for; the ask
|
|
4095
|
+
// door reads only a service caller's nomination, from the PARSED payload — undeclared,
|
|
4096
|
+
// zod strips it and the member label refuses the call.
|
|
4097
|
+
slug: z.string().optional(),
|
|
3926
4098
|
limit: z.number().optional(), since: z.number().optional(),
|
|
3927
4099
|
from: z.number().optional(), to: z.number().optional(),
|
|
3928
4100
|
intent: z.string().optional(),
|
|
@@ -3936,16 +4108,26 @@ export const RECEIVERS = {
|
|
|
3936
4108
|
}),
|
|
3937
4109
|
"stats:current": receiver({
|
|
3938
4110
|
receiver: "stats:current",
|
|
4111
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler reads no ctx (resolvers/billing.ts:8); every caller found carries a key (SDK, MCP stats, channels service lane).
|
|
4112
|
+
auth: "member",
|
|
3939
4113
|
surfaces: { mcp: { name: "stats" } },
|
|
3940
4114
|
summary: "Current world stats — units, skills, highways, revenue, signals",
|
|
3941
|
-
request: () => z.object({
|
|
4115
|
+
request: () => z.object({
|
|
4116
|
+
// The service lane names the workspace it asks for (see signals:list).
|
|
4117
|
+
slug: z.string().optional(),
|
|
4118
|
+
}),
|
|
3942
4119
|
response: () => StatsSchema,
|
|
3943
4120
|
effect: "ask", cost: "free", idempotent: true,
|
|
3944
4121
|
}),
|
|
3945
4122
|
"dashboard:usage": receiver({
|
|
3946
4123
|
receiver: "dashboard:usage",
|
|
4124
|
+
// auth (member) — task:01a128d6108e551f5966106b: the CALLER's usage; with no ctx.ownerSlug the handler returns a canned free tier (resolvers/billing.ts:96) — nothing an anonymous caller is meant to have.
|
|
4125
|
+
auth: "member",
|
|
3947
4126
|
summary: "Caller's plan usage — calls, agents, limits",
|
|
3948
|
-
request: () => z.object({
|
|
4127
|
+
request: () => z.object({
|
|
4128
|
+
// The service lane names the workspace it asks for (see signals:list).
|
|
4129
|
+
slug: z.string().optional(),
|
|
4130
|
+
}),
|
|
3949
4131
|
response: () => z.object({
|
|
3950
4132
|
tier: z.string(), calls_this_month: z.number(), agents_count: z.number(),
|
|
3951
4133
|
api_limit: z.number(), agent_limit: z.number(), loops: z.array(z.string()),
|
|
@@ -3955,6 +4137,8 @@ export const RECEIVERS = {
|
|
|
3955
4137
|
}),
|
|
3956
4138
|
"world:state": receiver({
|
|
3957
4139
|
receiver: "world:state",
|
|
4140
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler reads no ctx (resolvers/groups.ts:340); the only caller is the SDK state(), which carries the client's key.
|
|
4141
|
+
auth: "member",
|
|
3958
4142
|
summary: "Full world snapshot — units, edges, highways, tags, stats",
|
|
3959
4143
|
request: () => z.object({}),
|
|
3960
4144
|
response: () => z.object({}).passthrough(),
|
|
@@ -3967,9 +4151,11 @@ export const RECEIVERS = {
|
|
|
3967
4151
|
// ════════════════════════════════════════════════════════════════════════
|
|
3968
4152
|
"meta:catalog": receiver({
|
|
3969
4153
|
receiver: "meta:catalog",
|
|
4154
|
+
// auth (public) — task:01a128d6108e551f5966106b: the /.well-known door advertises it to agents that hold no key yet (well-known-door.ts:44,141); an anonymous caller gets the owner-filtered projection (meta-receivers.ts:119-120).
|
|
4155
|
+
auth: "public",
|
|
3970
4156
|
surfaces: { mcp: true },
|
|
3971
4157
|
summary: "List every receiver the caller can use (with cost/reversibility/settlement), or a goal's recipe",
|
|
3972
|
-
request: () => z.object({ goal: z.enum(["spine", "build", "trade", "transact"]).optional() }),
|
|
4158
|
+
request: () => z.object({ goal: z.enum(["spine", "build", "trade", "transact"]).optional(), tag: z.string().optional() }),
|
|
3973
4159
|
response: () => z.union([
|
|
3974
4160
|
z.array(z.object({
|
|
3975
4161
|
receiver: z.string(), summary: z.string(), effect: z.enum(["signal", "ask"]),
|
|
@@ -3982,6 +4168,8 @@ export const RECEIVERS = {
|
|
|
3982
4168
|
}),
|
|
3983
4169
|
"meta:schema": receiver({
|
|
3984
4170
|
receiver: "meta:schema",
|
|
4171
|
+
// auth (public) — task:01a128d6108e551f5966106b: the /.well-known door advertises it to agents that hold no key yet (well-known-door.ts:45,140); named paths are read only for an attested slug (meta-receivers.ts:147).
|
|
4172
|
+
auth: "public",
|
|
3985
4173
|
surfaces: { mcp: true },
|
|
3986
4174
|
summary: "JSON Schema for one receiver's request + response — read it before you call",
|
|
3987
4175
|
request: () => z.object({ receiver: z.string() }),
|
|
@@ -3993,6 +4181,8 @@ export const RECEIVERS = {
|
|
|
3993
4181
|
}),
|
|
3994
4182
|
"meta:recall": receiver({
|
|
3995
4183
|
receiver: "meta:recall",
|
|
4184
|
+
// auth (member) — task:01a128d6108e551f5966106b: the CALLER's hypotheses — the handler requires ctx.ownerSlug (or staff) and scopes the read to group_id = group:<ownerSlug>; staff read all (meta-receivers.ts recall). No anonymous caller depends on it (CLI/MCP carry keys).
|
|
4185
|
+
auth: "member",
|
|
3996
4186
|
surfaces: { mcp: true },
|
|
3997
4187
|
summary: "Recall the caller's hypotheses (memory), optionally filtered by a search term",
|
|
3998
4188
|
request: () => z.object({ match: z.string().optional(), limit: z.number().optional() }),
|
|
@@ -4005,6 +4195,8 @@ export const RECEIVERS = {
|
|
|
4005
4195
|
}),
|
|
4006
4196
|
"meta:reputation": receiver({
|
|
4007
4197
|
receiver: "meta:reputation",
|
|
4198
|
+
// auth (public) — task:01a128d6108e551f5966106b: reputation is a public score: an anonymous caller gets disclosure 'public' (score + counts, no payer rows) — meta-receivers.ts:198-201.
|
|
4199
|
+
auth: "public",
|
|
4008
4200
|
summary: "Read an actor's reputation score — the net of the claw_paths rows routing ranks by, plus vote counts from reputation_votes. The score and the counts go to every caller. Each row's payer identity, strength and resistance are disclosed by the workspace the payment was SETTLED TO, written on the row at payment time by wallet:send (never looked up by the uid, which any registry can be squatted under): a controller of that workspace reads the row (the spend walk from the attested caller), and so does a member of it when that workspace's C10 visibility is Members (the membership snapshot). Every other row is counted and withheld; `withheld` says how many, and `disclosure` names the highest rung that opened one. A row with no recorded workspace — written before the field existed, paid into two workspaces, or paid to a slug nobody owned yet — opens to nobody, ever. A walk or snapshot that cannot answer opens nothing",
|
|
4009
4201
|
request: () => z.object({ uid: z.string().describe("The actor's slug or aid to look up") }),
|
|
4010
4202
|
response: () => z.object({
|
|
@@ -4031,6 +4223,8 @@ export const RECEIVERS = {
|
|
|
4031
4223
|
}),
|
|
4032
4224
|
"meta:types": receiver({
|
|
4033
4225
|
receiver: "meta:types",
|
|
4226
|
+
// auth (public) — task:01a128d6108e551f5966106b: an anonymous caller gets the empty manifest + first-party templates (meta-receivers.ts:160); the role-scoped read needs ctx.ownerSlug.
|
|
4227
|
+
auth: "public",
|
|
4034
4228
|
surfaces: { mcp: true },
|
|
4035
4229
|
summary: "Read the resource-type manifest for the caller's workspace, plus the built-in industry templates",
|
|
4036
4230
|
request: () => z.object({}),
|
|
@@ -4042,6 +4236,8 @@ export const RECEIVERS = {
|
|
|
4042
4236
|
}),
|
|
4043
4237
|
"meta:entitlements": receiver({
|
|
4044
4238
|
receiver: "meta:entitlements",
|
|
4239
|
+
// auth (member) — task:01a128d6108e551f5966106b: the CALLER's entitlement; with no ctx.ownerSlug the handler answers allowed:false (meta-receivers.ts:173) — no anonymous caller found.
|
|
4240
|
+
auth: "member",
|
|
4045
4241
|
summary: "Check the caller workspace's entitlement for one feature — the authoritative paid-plugin gate; absent/over-limit claim → not allowed (backend returns 402)",
|
|
4046
4242
|
request: () => z.object({ feature: z.string() }),
|
|
4047
4243
|
response: () => z.object({
|
|
@@ -4129,6 +4325,8 @@ export const RECEIVERS = {
|
|
|
4129
4325
|
}),
|
|
4130
4326
|
"plugins:list": receiver({
|
|
4131
4327
|
receiver: "plugins:list",
|
|
4328
|
+
// auth (public) — task:01a128d6108e551f5966106b: the static plugin catalog, no ctx (resolvers/plugins.ts:71); the chat PluginPanel reads it logged out (PluginPanel.tsx:236).
|
|
4329
|
+
auth: "public",
|
|
4132
4330
|
summary: "List all available ONE plugins with their feature key, price, and description",
|
|
4133
4331
|
request: () => z.object({}),
|
|
4134
4332
|
response: () => z.object({
|
|
@@ -4153,6 +4351,7 @@ export const RECEIVERS = {
|
|
|
4153
4351
|
kind: z.enum(["plugin", "agent", "skill"]).optional(),
|
|
4154
4352
|
uses: z.number().optional(),
|
|
4155
4353
|
idem: z.string().optional(),
|
|
4354
|
+
...WORK_CONTRACT_FIELDS,
|
|
4156
4355
|
}),
|
|
4157
4356
|
response: () => z.object({
|
|
4158
4357
|
method: z.enum(["stripe", "credits"]),
|
|
@@ -4172,7 +4371,7 @@ export const RECEIVERS = {
|
|
|
4172
4371
|
plugin: z.string(),
|
|
4173
4372
|
feature: z.string(),
|
|
4174
4373
|
}),
|
|
4175
|
-
effect: "ask", auth: "owner", cost: "variable", idempotent: false,
|
|
4374
|
+
effect: "ask", auth: "owner", cost: "variable", idempotent: false, moves: "value",
|
|
4176
4375
|
examples: [{ name: "shop" }, { name: "shop", method: "credits" }],
|
|
4177
4376
|
}),
|
|
4178
4377
|
"plugins:grant": receiver({
|
|
@@ -4195,6 +4394,8 @@ export const RECEIVERS = {
|
|
|
4195
4394
|
}),
|
|
4196
4395
|
"plugins:source": receiver({
|
|
4197
4396
|
receiver: "plugins:source",
|
|
4397
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!ws) return { error: 'unauthenticated' }` + checkEntitlement (resolvers/plugins.ts:288-292).
|
|
4398
|
+
auth: "member",
|
|
4198
4399
|
summary: "Get the install reference for a plugin — 402 when the workspace is not entitled. Use meta:entitlements to check first; this doubles as the delivery gate.",
|
|
4199
4400
|
request: () => z.object({ feature: z.string() }),
|
|
4200
4401
|
response: () => z.object({
|
|
@@ -4209,6 +4410,8 @@ export const RECEIVERS = {
|
|
|
4209
4410
|
// ── actor discovery + messaging ──────────────────────────────────────────
|
|
4210
4411
|
"actors:find": receiver({
|
|
4211
4412
|
receiver: "actors:find",
|
|
4413
|
+
// auth (public) — task:01a128d6108e551f5966106b: the agent directory: keyless `one market --query` against api.one.ie reads it (packages/cli/src/trade.ts:41); handler reads no ctx and refuses type 'human' (resolvers/groups.ts:313-315).
|
|
4414
|
+
auth: "public",
|
|
4212
4415
|
summary: "Find agents on the marketplace by name fragment or skill — marketplace discovery only",
|
|
4213
4416
|
request: () => z.object({
|
|
4214
4417
|
// human is excluded: personal names/emails are PII, not marketplace data.
|
|
@@ -4225,6 +4428,8 @@ export const RECEIVERS = {
|
|
|
4225
4428
|
}),
|
|
4226
4429
|
"peer:message": receiver({
|
|
4227
4430
|
receiver: "peer:message",
|
|
4431
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!from) throw forbidden` (resolvers/messaging.ts:699-700).
|
|
4432
|
+
auth: "member",
|
|
4228
4433
|
summary: "Send an async message to another agent's inbox — instant store, no LLM, no streaming",
|
|
4229
4434
|
request: () => z.object({ to: z.string(), content: z.string(), from: z.string().optional() }),
|
|
4230
4435
|
response: () => z.object({ ok: z.boolean(), id: z.string().optional(), ts: z.number().optional(), to: z.string().optional(), from: z.string().optional(), error: z.string().optional() }),
|
|
@@ -4232,6 +4437,8 @@ export const RECEIVERS = {
|
|
|
4232
4437
|
}),
|
|
4233
4438
|
"notify": receiver({
|
|
4234
4439
|
receiver: "notify",
|
|
4440
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!from) throw forbidden` (resolvers/messaging.ts:789-790).
|
|
4441
|
+
auth: "member",
|
|
4235
4442
|
// NOT surfaces.mcp — the curated `message` tool in packages/mcp/src/tools/
|
|
4236
4443
|
// messaging.ts already fronts this receiver and carries shaping the registry
|
|
4237
4444
|
// cannot infer: it defaults `kind: "message"` and names the argument
|
|
@@ -4261,6 +4468,8 @@ export const RECEIVERS = {
|
|
|
4261
4468
|
}),
|
|
4262
4469
|
"notify:count": receiver({
|
|
4263
4470
|
receiver: "notify:count",
|
|
4471
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!slug) throw forbidden` (resolvers/messaging.ts:819-820).
|
|
4472
|
+
auth: "member",
|
|
4264
4473
|
summary: "Unread thread count for the caller's inbox (a thread is unread when its last message is newer than the caller's read marker).",
|
|
4265
4474
|
request: () => z.object({}),
|
|
4266
4475
|
response: () => z.object({ unread: z.number() }),
|
|
@@ -4268,6 +4477,8 @@ export const RECEIVERS = {
|
|
|
4268
4477
|
}),
|
|
4269
4478
|
"notify:list": receiver({
|
|
4270
4479
|
receiver: "notify:list",
|
|
4480
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!slug) throw forbidden` (resolvers/messaging.ts:839-840).
|
|
4481
|
+
auth: "member",
|
|
4271
4482
|
summary: "The caller's unread threads, newest first, each with a short preview.",
|
|
4272
4483
|
request: () => z.object({ limit: z.number().optional() }),
|
|
4273
4484
|
response: () => z.object({ unread: z.array(z.object({ id: z.string(), ts: z.number(), preview: z.string() })) }),
|
|
@@ -4275,6 +4486,8 @@ export const RECEIVERS = {
|
|
|
4275
4486
|
}),
|
|
4276
4487
|
"notify:read": receiver({
|
|
4277
4488
|
receiver: "notify:read",
|
|
4489
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!slug) throw forbidden` (resolvers/messaging.ts:875-876).
|
|
4490
|
+
auth: "member",
|
|
4278
4491
|
summary: "Mark one thread (threadId) or all of the caller's threads (all:true) as read; nudges the inbox live.",
|
|
4279
4492
|
request: () => z.object({ threadId: z.string().optional(), id: z.string().optional(), all: z.boolean().optional() }),
|
|
4280
4493
|
response: () => z.object({ ok: z.boolean(), ts: z.number().optional(), error: z.string().optional() }),
|
|
@@ -4282,6 +4495,8 @@ export const RECEIVERS = {
|
|
|
4282
4495
|
}),
|
|
4283
4496
|
"push:subscribe": receiver({
|
|
4284
4497
|
receiver: "push:subscribe",
|
|
4498
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!caller) throw forbidden` (resolvers/messaging.ts:914-915).
|
|
4499
|
+
auth: "member",
|
|
4285
4500
|
summary: "Store a browser's Web Push subscription so notify() can reach the caller off-screen — the send side behind the shipped inbox service worker. Optional slug keys the row to a workspace the caller controls (else their own slug).",
|
|
4286
4501
|
request: () => z.object({
|
|
4287
4502
|
endpoint: z.string(),
|
|
@@ -4293,6 +4508,8 @@ export const RECEIVERS = {
|
|
|
4293
4508
|
}),
|
|
4294
4509
|
"thread:append": receiver({
|
|
4295
4510
|
receiver: "thread:append",
|
|
4511
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!slug) return forbidden` (resolvers/messaging.ts:945-946); the keyless /api/write sealed note calls it IN-PROCESS with an attested ownerSlug (lib/key/sealed-append.ts:24-38), never through this door.
|
|
4512
|
+
auth: "member",
|
|
4296
4513
|
summary: "Gateway-callable write into web threads — carries tags into entity_tags so slug/in renders every channel by tag. Called by the channels bridge after every inbound signal.",
|
|
4297
4514
|
request: () => z.object({
|
|
4298
4515
|
slug: z.string(),
|
|
@@ -4328,6 +4545,8 @@ export const RECEIVERS = {
|
|
|
4328
4545
|
}),
|
|
4329
4546
|
"space:post": receiver({
|
|
4330
4547
|
receiver: "space:post",
|
|
4548
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!from) return forbidden` + callerMayPostToSpace (resolvers/messaging.ts:1081-1090).
|
|
4549
|
+
auth: "member",
|
|
4331
4550
|
summary: "Post a message to a Space — authenticated member or public Space; stamps space:<slug> tag so the message appears in the Space's thread on slug/in alongside every channel's conversation",
|
|
4332
4551
|
request: () => z.object({
|
|
4333
4552
|
space: z.string(),
|
|
@@ -4346,6 +4565,8 @@ export const RECEIVERS = {
|
|
|
4346
4565
|
}),
|
|
4347
4566
|
"space:create": receiver({
|
|
4348
4567
|
receiver: "space:create",
|
|
4568
|
+
// auth (owner) — task:01a128d6108e551f5966106b: handler requires callerControlsWorkspace(from, slug) (resolvers/space.ts:14-22).
|
|
4569
|
+
auth: "owner",
|
|
4349
4570
|
summary: "Create a new Space — registers the channel_link inbox door in channels so every inbound signal is mirrored to the workspace thread read model; private flag restricts posting to members",
|
|
4350
4571
|
request: () => z.object({
|
|
4351
4572
|
slug: z.string(),
|
|
@@ -4362,6 +4583,8 @@ export const RECEIVERS = {
|
|
|
4362
4583
|
}),
|
|
4363
4584
|
"space:join": receiver({
|
|
4364
4585
|
receiver: "space:join",
|
|
4586
|
+
// auth (member) — task:01a128d6108e551f5966106b: handler: `if (!from) return forbidden` (resolvers/space.ts:53-54).
|
|
4587
|
+
auth: "member",
|
|
4365
4588
|
canonical: "world:request-access",
|
|
4366
4589
|
summary: "Join a public Space — caller begins receiving its signals and their posts are stamped with the space tag",
|
|
4367
4590
|
request: () => z.object({ space: z.string() }),
|
|
@@ -4374,6 +4597,8 @@ export const RECEIVERS = {
|
|
|
4374
4597
|
}),
|
|
4375
4598
|
"space:invite": receiver({
|
|
4376
4599
|
receiver: "space:invite",
|
|
4600
|
+
// auth (owner) — task:01a128d6108e551f5966106b: handler requires callerControlsWorkspace(from, space) (resolvers/space.ts:76-83).
|
|
4601
|
+
auth: "owner",
|
|
4377
4602
|
canonical: "world:invite-member",
|
|
4378
4603
|
summary: "Invite an actor to a private Space — grants membership so they can read and post; requires the caller to be a member or admin of the Space",
|
|
4379
4604
|
request: () => z.object({
|
|
@@ -4524,6 +4749,7 @@ export const RECEIVERS = {
|
|
|
4524
4749
|
receiver: "entity:reply",
|
|
4525
4750
|
summary: "Reply to a conversation — persists the message, delivers to the customer's channel (telegram/discord) when not web, clears the pending draft; kind:'note' stays internal",
|
|
4526
4751
|
request: () => z.object({
|
|
4752
|
+
slug: SERVICE_SLUG,
|
|
4527
4753
|
entityId: z.string(), // conv/session/thread id (alias: id)
|
|
4528
4754
|
content: z.string(),
|
|
4529
4755
|
kind: z.enum(["send", "note"]).optional(), // 'send' (default, egresses) | 'note' (internal)
|
|
@@ -4546,6 +4772,7 @@ export const RECEIVERS = {
|
|
|
4546
4772
|
receiver: "entity:tag",
|
|
4547
4773
|
summary: "Tag a conversation/entity (add/remove) or move it between lifecycle stages — the sole stage_transition writer",
|
|
4548
4774
|
request: () => z.object({
|
|
4775
|
+
slug: SERVICE_SLUG,
|
|
4549
4776
|
id: z.string(),
|
|
4550
4777
|
add: z.array(z.string()).optional(),
|
|
4551
4778
|
remove: z.array(z.string()).optional(),
|
|
@@ -4760,7 +4987,6 @@ export const RECEIVERS = {
|
|
|
4760
4987
|
// conversation:autonomy — read by the channels worker per inbound turn (send vs
|
|
4761
4988
|
// draft), not an operator/agent verb.
|
|
4762
4989
|
// member:invited — an internal event hook, not a callable capability.
|
|
4763
|
-
// ui:campaigns:compile · ui:campaigns:approve — UI build-pipeline steps.
|
|
4764
4990
|
// These have live resolvers but no RECEIVERS entry by design — keep it that way.
|
|
4765
4991
|
// ── commerce (storefront products) — handlers in resolvers/commerce.ts ─────────
|
|
4766
4992
|
"products:create": receiver({
|
|
@@ -4843,7 +5069,9 @@ export const RECEIVERS = {
|
|
|
4843
5069
|
surfaces: { mcp: true },
|
|
4844
5070
|
summary: "List a workspace's storefront products with their prices (public). To buy as an agent: open an ACP session with POST /api/checkout_sessions, or pay the item's x402 link.",
|
|
4845
5071
|
request: () => z.object({
|
|
4846
|
-
|
|
5072
|
+
// Required: a public storefront read names its storefront. No default to the caller's own
|
|
5073
|
+
// group — an anonymous caller has none — so a missing slug is 400 validation field slug.
|
|
5074
|
+
slug: z.string(),
|
|
4847
5075
|
collection: z.string().optional().describe("Narrow the catalogue to one collection, matched TRIMMED on both sides (the facet label is derived as `(collection ?? '').trim()`, so an untrimmed predicate would match zero rows and filter everything). Empty or unknown returns the whole catalogue, never an error. Public: it can only narrow rows an anonymous caller could already see — unlike includeDrafts, which is honoured only for the attested owner (ctx.ownerSlug), never a body claim."),
|
|
4848
5076
|
includeDrafts: z.boolean().optional().describe("Owner-only: true returns draft products and every active price row. Honoured only when the attested caller owns slug (ctx.ownerSlug === slug); for anyone else it is ignored, never an error."),
|
|
4849
5077
|
sort: z.string().optional().describe("featured | newest | price-asc | price-desc, trimmed and lower-cased by the resolver; anything else orders as featured (updated_at desc)."),
|
|
@@ -5624,6 +5852,34 @@ export const RECEIVERS = {
|
|
|
5624
5852
|
effect: "ask", cost: "free", reversible: true, idempotent: true, settles: "none", auth: "member",
|
|
5625
5853
|
examples: [{}, { workspace: "acme" }, { workspace: "acme", actor: "agent:scout" }],
|
|
5626
5854
|
}),
|
|
5855
|
+
// wallet:update — the owner's one number: how many credits an agent may spend a month.
|
|
5856
|
+
// Lowering (and pausing at 0) is open to the workspace's controllers and to the agent for
|
|
5857
|
+
// itself, never a sibling; raising needs a person's hand (a session, or the owner's own human key).
|
|
5858
|
+
"wallet:update": receiver({
|
|
5859
|
+
receiver: "wallet:update",
|
|
5860
|
+
surfaces: { mcp: { name: "wallet_limit" } },
|
|
5861
|
+
summary: "Set an agent's spending limit in credits a month (0 pauses it). Lowering is open to the people who control the workspace and to the agent for itself (never a sibling); raising needs a person — a signed-in session or the owner's own key, never an agent key",
|
|
5862
|
+
request: () => z.object({
|
|
5863
|
+
actor: z.string().min(1).max(200).describe("The agent whose limit is set — its wallets row (kind 'agent') in `workspace`"),
|
|
5864
|
+
limit: z.number().int().min(0).max(10_000_000).describe("The spending limit in credits per month. 0 pauses the agent (every spend refused, liftable by the owner). 1000 credits = $1"),
|
|
5865
|
+
workspace: z.string().optional().describe("The workspace that holds the agent's wallet; defaults to the attested caller"),
|
|
5866
|
+
}),
|
|
5867
|
+
response: () => z.object({
|
|
5868
|
+
ok: z.boolean(),
|
|
5869
|
+
workspace: z.string().optional(),
|
|
5870
|
+
actor: z.string().optional(),
|
|
5871
|
+
monthlyCredits: z.number().optional(),
|
|
5872
|
+
spentCredits: z.number().optional().describe("What this period has used against the limit"),
|
|
5873
|
+
paused: z.boolean().optional(),
|
|
5874
|
+
changed: z.boolean().optional(),
|
|
5875
|
+
raised: z.boolean().optional(),
|
|
5876
|
+
closed: z.enum(["mark", "warn", "dissolve"]).optional(),
|
|
5877
|
+
detail: z.string().optional(),
|
|
5878
|
+
error: z.string().optional().describe("unauthorized | actor_required | no_db | bad_limit | forbidden | not_an_agent_wallet | zeroed_on_chain (the on-chain Zero is final) | human_presence_required (a raise from an agent or a bare key) | write_unconfirmed"),
|
|
5879
|
+
}),
|
|
5880
|
+
effect: "ask", cost: "free", reversible: true, idempotent: true, settles: "none", auth: "member",
|
|
5881
|
+
examples: [{ actor: "scout", limit: 5000 }, { actor: "scout", limit: 0 }],
|
|
5882
|
+
}),
|
|
5627
5883
|
"wallet:transactions": receiver({
|
|
5628
5884
|
receiver: "wallet:transactions",
|
|
5629
5885
|
surfaces: { mcp: true },
|
|
@@ -5631,12 +5887,14 @@ export const RECEIVERS = {
|
|
|
5631
5887
|
request: () => z.object({
|
|
5632
5888
|
workspace: z.string().optional().describe("Defaults to the attested caller's workspace"),
|
|
5633
5889
|
limit: z.number().optional().describe("Rows to return; the handler caps at 500"),
|
|
5890
|
+
actor: z.string().optional().describe("One person's money in the workspace (the CRM Orders tab): settlements and orders keyed on the aid, the hash or address of their VERIFIED account email, or their rung-1 browser hashes. Only when the caller may read that contact; else 'forbidden'"),
|
|
5634
5891
|
}),
|
|
5635
5892
|
response: () => z.object({
|
|
5636
5893
|
transactions: z.array(z.object({
|
|
5637
5894
|
ts: z.number(), rail: z.string(), direction: z.enum(["in", "out"]), counterparty: z.string(),
|
|
5638
5895
|
amountCents: z.number(), currency: z.string(), ref: z.string(), status: z.string(),
|
|
5639
5896
|
})).optional(),
|
|
5897
|
+
truncated: z.boolean().optional().describe("With `actor`: true when more rows exist than `limit` returned"),
|
|
5640
5898
|
error: z.string().optional(),
|
|
5641
5899
|
}),
|
|
5642
5900
|
effect: "ask", cost: "free", reversible: true, idempotent: true, settles: "none", auth: "member",
|
|
@@ -5659,6 +5917,7 @@ export const RECEIVERS = {
|
|
|
5659
5917
|
from: z.string().optional().describe("Alias for `workspace` — the source the authority walk runs against"),
|
|
5660
5918
|
transferId: z.string().optional().describe("Idempotency key; both legs share it as rail_ref"),
|
|
5661
5919
|
memo: z.string().optional(),
|
|
5920
|
+
...WORK_CONTRACT_FIELDS,
|
|
5662
5921
|
}),
|
|
5663
5922
|
response: () => z.object({
|
|
5664
5923
|
ok: z.boolean(),
|
|
@@ -5670,7 +5929,7 @@ export const RECEIVERS = {
|
|
|
5670
5929
|
}),
|
|
5671
5930
|
// Zero-sum inside the credit ledger — real value, settled OFFCHAIN (never on
|
|
5672
5931
|
// chain), reversible by a compensating transfer. Idempotent on `transferId`.
|
|
5673
|
-
effect: "ask", cost: "free", reversible: true, idempotent: true, settles: "offchain", auth: "manage_workspace",
|
|
5932
|
+
effect: "ask", cost: "free", reversible: true, idempotent: true, settles: "offchain", auth: "manage_workspace", moves: "value", movesIn: ["workspace", "from"],
|
|
5674
5933
|
examples: [{ to: "acme", amount: 500 }],
|
|
5675
5934
|
}),
|
|
5676
5935
|
// The caller signs and broadcasts the transfer CLIENT-SIDE and passes the
|
|
@@ -5694,6 +5953,7 @@ export const RECEIVERS = {
|
|
|
5694
5953
|
userAddress: z.string().optional().describe("Sender address; defaults to `to`"),
|
|
5695
5954
|
memo: z.string().optional(),
|
|
5696
5955
|
product: z.string().optional().describe("Falls back to `memo`, then a generated transfer label"),
|
|
5956
|
+
...WORK_CONTRACT_FIELDS,
|
|
5697
5957
|
}),
|
|
5698
5958
|
response: () => z.object({
|
|
5699
5959
|
ok: z.boolean(),
|
|
@@ -5735,7 +5995,7 @@ export const RECEIVERS = {
|
|
|
5735
5995
|
}).optional().describe("Whether this payment raised the payee's score, and if not, why"),
|
|
5736
5996
|
error: z.string().optional(),
|
|
5737
5997
|
}),
|
|
5738
|
-
effect: "ask", cost: "variable", reversible: false, idempotent: false, settles: "onchain", auth: "manage_workspace",
|
|
5998
|
+
effect: "ask", cost: "variable", reversible: false, idempotent: false, settles: "onchain", auth: "manage_workspace", moves: "value", movesIn: ["workspace", "from"],
|
|
5739
5999
|
examples: [{ to: "0xabc", chain: "SUI", amount: 5, paymentTx: "8xKvQ1" }],
|
|
5740
6000
|
}),
|
|
5741
6001
|
// text/key.md deliverable 8 — bound what an agent HOLDS. Tony, 2026-10-06:
|
|
@@ -6074,6 +6334,153 @@ export const RECEIVERS = {
|
|
|
6074
6334
|
{ workspace: "acme", actor: "agent:scout", amountCents: 2500, currency: "usd" },
|
|
6075
6335
|
],
|
|
6076
6336
|
}),
|
|
6337
|
+
// swap:quote + swap:get (text/swap-plan.md) — any coin to any coin, and straight into
|
|
6338
|
+
// Hyperliquid, through NEAR Intents 1Click's deposit-address model. The server QUOTES and
|
|
6339
|
+
// READS; the person's own key sends to the deposit address, client-side, after the client
|
|
6340
|
+
// has read the quote back from 1Click directly (R16). ONE never holds a key or a cent, so
|
|
6341
|
+
// neither door carries `moves` (value-moving-parity.test.ts records why). 1Click is mainnet
|
|
6342
|
+
// only: every answer says network:'mainnet', and net:'testnet' is refused by name.
|
|
6343
|
+
"swap:quote": receiver({
|
|
6344
|
+
receiver: "swap:quote",
|
|
6345
|
+
surfaces: { mcp: true },
|
|
6346
|
+
summary: "Price a swap of any coin to any coin, or into Hyperliquid; live, get the deposit address your OWN wallet sends to — ONE never holds funds. Dry by default",
|
|
6347
|
+
request: () => z.object({
|
|
6348
|
+
from: z.string().describe("What you pay with, as an alias: BTC, SOL, SUI, USDC@sui, ETH@ethereum, ETH@base, ETH@arbitrum, USDC@ethereum, USDC@base, USDC@arbitrum, USDC@solana, USDT@ethereum, USDT0@arbitrum. A symbol on several chains must name its chain. An unknown alias returns the whole table"),
|
|
6349
|
+
to: z.string().describe("What you receive, as an alias; 'hyperliquid' or 'hl' = USDC in your Hyperliquid perps account. Bare ETH→ethereum, USDC→base, USDT→ethereum"),
|
|
6350
|
+
amount: z.string().describe("Decimal string in the FROM asset (in the TO asset when exact is 'out'), e.g. '0.01' — never a number; converted to base units exactly"),
|
|
6351
|
+
exact: z.enum(["in", "out"]).optional().describe("'in' (default): spend exactly amount · 'out': receive exactly amount; slippage applies to the input"),
|
|
6352
|
+
dry: z.boolean().optional().describe("true (default) = price only, no deposit address · false = mint a live deposit address; needs a signed-in person or a world key"),
|
|
6353
|
+
recipient: z.string().optional().describe("Destination address. Absent = your own address on the destination chain. Someone else's needs toOther:true"),
|
|
6354
|
+
refundTo: z.string().optional().describe("Only to choose among YOUR OWN source-chain addresses (the options of ambiguous_address). Absent = your one owned address. Someone else's is refused (refund_not_yours); toOther never applies"),
|
|
6355
|
+
toOther: z.boolean().optional().describe("true = recipient is deliberately someone else's; echoed back. A person's session only — an agent key is refused. Never applies to the refund address"),
|
|
6356
|
+
slippageBps: z.number().optional().describe("Max slippage in basis points, an integer 1–500; default 100 (1%). Out of range is refused bad_slippage"),
|
|
6357
|
+
net: z.string().optional().describe("1Click is mainnet only: 'testnet' is refused by name (oneclick_mainnet_only), never answered with mainnet"),
|
|
6358
|
+
}),
|
|
6359
|
+
response: () => z.object({
|
|
6360
|
+
ok: z.boolean().describe("true = a quote; false = a named refusal in error"),
|
|
6361
|
+
error: z.string().optional().describe("unknown_asset · ambiguous_asset · not_a_destination · hyperliquid_origin_unsupported · bad_amount · bad_slippage · same_asset · oneclick_mainnet_only · sign_in_required · platform_cannot_swap · live_quote_limit · refund_address_unknown · refund_not_yours · ambiguous_address · recipient_address_unknown · recipient_not_yours · toOther_needs_person · destination_unsignable · refund_unsignable · recipient_must_be_named · refund_must_be_named · recipient_invalid · refund_invalid · amount_too_low · amount_too_small_for_fees · exact_out_needs_funded_account · no_liquidity · asset_unsupported · memo_unsupported · quote_refused · oneclick_timeout · oneclick_unavailable · oneclick_error"),
|
|
6362
|
+
detail: z.string().optional().describe("1Click's own message on an upstream refusal, verbatim"),
|
|
6363
|
+
options: z.array(z.string()).optional().describe("ambiguous_asset: aliases to choose from · ambiguous_address: your addresses to choose from (pass one as recipient or refundTo)"),
|
|
6364
|
+
assets: z.array(SWAP_ASSET).optional().describe("unknown_asset: the whole table (never paged)"),
|
|
6365
|
+
minimum: z.string().optional().describe("amount_too_low: the minimum 1Click named, as a decimal in FROM, only when its unit is known; otherwise read detail"),
|
|
6366
|
+
network: z.string().describe("Always 'mainnet' — real chains, real money"),
|
|
6367
|
+
dry: z.boolean().optional().describe("Echo: true = price only"),
|
|
6368
|
+
from: SWAP_ASSET.optional().describe("Resolved origin"),
|
|
6369
|
+
to: SWAP_ASSET.optional().describe("Resolved destination"),
|
|
6370
|
+
route: z.object({
|
|
6371
|
+
via: z.string().describe("'1click' (NEAR Intents 1Click) — v1's only route"),
|
|
6372
|
+
steps: z.array(z.string()).describe("Human steps, in order"),
|
|
6373
|
+
credits: z.string().optional().describe("Hyperliquid only: 'perps' — USDC lands in the perps balance"),
|
|
6374
|
+
}).optional().describe("How the coins get there"),
|
|
6375
|
+
depositAddress: z.string().optional().describe("Live only: the key swap:get takes. Send exactly send.amount here — verify it with 1Click first"),
|
|
6376
|
+
amountIn: z.string().optional().describe("Decimal you send"),
|
|
6377
|
+
minAmountIn: z.string().optional().describe("exact 'out': lowest input accepted, decimal"),
|
|
6378
|
+
amountOut: z.string().optional().describe("Decimal you receive (withdraw fee already taken)"),
|
|
6379
|
+
minAmountOut: z.string().optional().describe("Decimal floor after slippage"),
|
|
6380
|
+
amountInUsd: z.string().optional().describe("USD value in, per 1Click"),
|
|
6381
|
+
amountOutUsd: z.string().optional().describe("USD value out, per 1Click"),
|
|
6382
|
+
costUsd: z.string().optional().describe("amountInUsd − amountOutUsd, plus a possible Hyperliquid activation when it applies"),
|
|
6383
|
+
fees: z.array(z.object({
|
|
6384
|
+
kind: z.string().describe("protocol (1Click) · app (ONE) · withdraw (destination chain) · refund (only on a refund)"),
|
|
6385
|
+
bps: z.number().optional().describe("Basis points, for protocol/app"),
|
|
6386
|
+
amount: z.string().optional().describe("Decimal amount"),
|
|
6387
|
+
asset: z.string().optional().describe("Alias the amount counts in"),
|
|
6388
|
+
note: z.string().optional().describe("One line for a human"),
|
|
6389
|
+
})).optional().describe("Every fee read from the live quote — none hardcoded"),
|
|
6390
|
+
timeEstimateSec: z.number().optional().describe("Seconds after the deposit confirms"),
|
|
6391
|
+
refundAfter: z.string().optional().describe("ISO: if not filled by now, refunds begin. Never send after this"),
|
|
6392
|
+
addressExpires: z.string().optional().describe("Live only, ISO: deposit address goes inactive"),
|
|
6393
|
+
quotedAt: z.string().optional().describe("1Click's timestamp — clients correct their clock skew with it before the deadline check"),
|
|
6394
|
+
recipient: z.string().optional().describe("Where the coins go — echoed"),
|
|
6395
|
+
refundTo: z.string().optional().describe("Where a refund goes — always your own address on the source chain"),
|
|
6396
|
+
ownership: z.object({
|
|
6397
|
+
recipient: z.string().describe("proven (signature) · registered (your row, session only) · other (toOther) · placeholder (dry)"),
|
|
6398
|
+
refundTo: z.string().describe("proven · registered · placeholder"),
|
|
6399
|
+
note: z.string().describe("Which row each address came from and what was and was not verified, in one sentence"),
|
|
6400
|
+
}).optional().describe("Whose addresses these are, and how ONE knows"),
|
|
6401
|
+
send: z.object({
|
|
6402
|
+
how: z.string().describe("browser · external"),
|
|
6403
|
+
to: z.string().describe("The deposit address"),
|
|
6404
|
+
amountBase: z.string().describe("Exact base units"),
|
|
6405
|
+
amount: z.string().describe("Same, as a decimal"),
|
|
6406
|
+
asset: z.string().describe("Alias to send"),
|
|
6407
|
+
chain: z.string().describe("Chain to send on — the wrong chain loses funds"),
|
|
6408
|
+
uri: z.string().optional().describe("Wallet link: bitcoin: (BIP21), solana:, or ethereum: (EIP-681); scan or tap in any wallet"),
|
|
6409
|
+
refundsTo: z.string().describe("Where a failed swap refunds, and how to recover it, in one sentence"),
|
|
6410
|
+
}).optional().describe("Live only: the exact send instruction — plain transfer, self-custody wallet, no bridge"),
|
|
6411
|
+
hyperliquid: z.object({
|
|
6412
|
+
checked: z.boolean().describe("false = the account read failed; treated as possibly new"),
|
|
6413
|
+
firstDeposit: z.boolean().describe("true = empty account; Hyperliquid MAY take a one-time ~1 USDC activation (unverified)"),
|
|
6414
|
+
}).optional().describe("Hyperliquid destination with YOUR recipient only — absent for placeholders"),
|
|
6415
|
+
keyed: z.boolean().optional().describe("true = ONE's partner key was used (live only); false = keyless fee schedule"),
|
|
6416
|
+
warnings: z.array(z.string()).optional().describe("poor_rate:<pct kept> · possible_activation_fee · external_send · jwt_rejected · app_fee_off · amount_too_small_for_fees (dry only; live refuses) · exact_out_needs_funded_account (dry only; live refuses)"),
|
|
6417
|
+
link: z.string().optional().describe("Absolute one.ie URL: dry = a prefilled /swap form a person can sign from · live = its status page"),
|
|
6418
|
+
next: z.string().describe("One sentence: what to do now. An agent cannot sign — give the person the link, or the exact send line"),
|
|
6419
|
+
}),
|
|
6420
|
+
examples: [
|
|
6421
|
+
{ from: "USDC@base", to: "hl", amount: "10" },
|
|
6422
|
+
{ from: "BTC", to: "hyperliquid", amount: "0.001" },
|
|
6423
|
+
{ from: "SUI", to: "ETH", amount: "25" },
|
|
6424
|
+
],
|
|
6425
|
+
effect: "ask", cost: "free", reversible: true, idempotent: false, settles: "none", auth: "public",
|
|
6426
|
+
}),
|
|
6427
|
+
"swap:get": receiver({
|
|
6428
|
+
receiver: "swap:get",
|
|
6429
|
+
surfaces: { mcp: true },
|
|
6430
|
+
summary: "Track a swap by its deposit address until it lands or refunds, and read any Hyperliquid account's balance",
|
|
6431
|
+
request: () => z.object({
|
|
6432
|
+
depositAddress: z.string().optional().describe("The deposit address swap:quote returned"),
|
|
6433
|
+
depositMemo: z.string().optional().describe("Memo, for memo chains only"),
|
|
6434
|
+
txHash: z.string().optional().describe("Your deposit tx hash — forwarded to 1Click to speed matching. NOT a verification; status stays the truth"),
|
|
6435
|
+
hyperliquid: z.string().optional().describe("A 0x address: also read its Hyperliquid balance (perps + spot, never summed)"),
|
|
6436
|
+
net: z.string().optional().describe("For the asked hyperliquid read only: 'testnet' reads api.hyperliquid-testnet.xyz. The swap and the post-SUCCESS read are always mainnet"),
|
|
6437
|
+
}),
|
|
6438
|
+
response: () => z.object({
|
|
6439
|
+
ok: z.boolean().describe("true = read; false = named refusal"),
|
|
6440
|
+
error: z.string().optional().describe("nothing_to_read · address_unknown · bad_address · bad_tx_hash · oneclick_timeout · oneclick_unavailable · oneclick_error · hyperliquid_unavailable"),
|
|
6441
|
+
detail: z.string().optional().describe("1Click's own message on an upstream refusal, verbatim"),
|
|
6442
|
+
network: z.string().describe("'mainnet' for the swap"),
|
|
6443
|
+
status: z.string().optional().describe("PENDING_DEPOSIT · KNOWN_DEPOSIT_TX · INCOMPLETE_DEPOSIT · PROCESSING · SUCCESS · REFUNDED · FAILED"),
|
|
6444
|
+
terminal: z.boolean().optional().describe("true at SUCCESS · REFUNDED · FAILED — stop polling"),
|
|
6445
|
+
explain: z.string().optional().describe("One human sentence for this status (INCOMPLETE_DEPOSIT: less than quoted arrived; refunded minus refundFee)"),
|
|
6446
|
+
submitted: z.boolean().optional().describe("txHash was forwarded to 1Click — not verified"),
|
|
6447
|
+
from: z.string().optional().describe("Origin alias (or raw assetId if not in the table)"),
|
|
6448
|
+
to: z.string().optional().describe("Destination alias (or raw assetId)"),
|
|
6449
|
+
recipient: z.string().optional().describe("Destination address, from 1Click's stored quote"),
|
|
6450
|
+
refundTo: z.string().optional().describe("Refund address, from 1Click's stored quote"),
|
|
6451
|
+
amountIn: z.string().optional().describe("Decimal deposited"),
|
|
6452
|
+
amountOut: z.string().optional().describe("Decimal delivered"),
|
|
6453
|
+
amountOutUsd: z.string().optional().describe("USD delivered"),
|
|
6454
|
+
refundedAmount: z.string().optional().describe("Decimal refunded"),
|
|
6455
|
+
refundReason: z.string().optional().describe("1Click's refund reason"),
|
|
6456
|
+
originTxs: z.array(SWAP_TX).optional().describe("Deposit-side txs"),
|
|
6457
|
+
destinationTxs: z.array(SWAP_TX).optional().describe("Delivery-side txs"),
|
|
6458
|
+
updatedAt: z.string().optional().describe("1Click timestamp"),
|
|
6459
|
+
refundAfter: z.string().optional().describe("ISO, from the stored quote — no send instruction is valid after it"),
|
|
6460
|
+
addressExpires: z.string().optional().describe("ISO, from the stored quote"),
|
|
6461
|
+
hyperliquid: z.object({
|
|
6462
|
+
address: z.string().describe("Account read"),
|
|
6463
|
+
network: z.string().describe("mainnet · testnet — always mainnet for the post-SUCCESS read"),
|
|
6464
|
+
perps: z.object({
|
|
6465
|
+
accountValue: z.string().describe("Decimal USD"),
|
|
6466
|
+
withdrawable: z.string().describe("Decimal USD"),
|
|
6467
|
+
}).describe("clearinghouseState"),
|
|
6468
|
+
spot: z.array(z.object({
|
|
6469
|
+
coin: z.string().describe("e.g. USDC, UBTC"),
|
|
6470
|
+
total: z.string().describe("Decimal"),
|
|
6471
|
+
hold: z.string().describe("Decimal on hold"),
|
|
6472
|
+
})).describe("spotClearinghouseState balances, every non-zero coin (never paged)"),
|
|
6473
|
+
firstDeposit: z.boolean().describe("true = empty account; Hyperliquid MAY take a one-time ~1 USDC activation (unverified)"),
|
|
6474
|
+
note: z.string().describe("Not summed: unified/portfolio-margin accounts show everything in spot"),
|
|
6475
|
+
}).optional().describe("Balance of the hyperliquid address asked for, or of the recipient after a SUCCESS into Hyperliquid"),
|
|
6476
|
+
next: z.string().describe("One sentence: what happens next or what to do"),
|
|
6477
|
+
}),
|
|
6478
|
+
examples: [
|
|
6479
|
+
{ depositAddress: "0xd63c8F578F0a5541c14bFc9AFbC4AdEbE0250Ef2" },
|
|
6480
|
+
{ hyperliquid: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" },
|
|
6481
|
+
],
|
|
6482
|
+
effect: "ask", cost: "free", reversible: true, idempotent: true, settles: "none", auth: "public",
|
|
6483
|
+
}),
|
|
6077
6484
|
// wallet:portfolio — the authority walk projected onto wallet rows. One call
|
|
6078
6485
|
// answers "what does my whole estate hold", which no client could ask before:
|
|
6079
6486
|
// every wallet read was scoped to one workspace at a time.
|
|
@@ -6404,6 +6811,8 @@ export const RECEIVERS = {
|
|
|
6404
6811
|
// ══════════════════════════════════════════════════════════════════════════
|
|
6405
6812
|
"blocks:list": receiver({
|
|
6406
6813
|
receiver: "blocks:list",
|
|
6814
|
+
// auth (public) — task:01a128d6108e551f5966106b: registry-only for an anonymous caller, tenant blocks need ctx.ownerSlug (resolvers/blocks.ts:125,265) — the same shape as meta:types.
|
|
6815
|
+
auth: "public",
|
|
6407
6816
|
surfaces: { mcp: true },
|
|
6408
6817
|
summary: "Discover the page blocks that exist — name, category, surface, description and variant list, filterable and paged",
|
|
6409
6818
|
request: () => z.object({
|
|
@@ -6450,6 +6859,8 @@ export const RECEIVERS = {
|
|
|
6450
6859
|
}),
|
|
6451
6860
|
"blocks:schema": receiver({
|
|
6452
6861
|
receiver: "blocks:schema",
|
|
6862
|
+
// auth (public) — task:01a128d6108e551f5966106b: registry rows answer anyone, tenant rows need ctx.ownerSlug (resolvers/blocks.ts:221,265); the channels visitor tool block_schema is public (channels/src/tools/pages.ts:320).
|
|
6863
|
+
auth: "public",
|
|
6453
6864
|
surfaces: { mcp: true },
|
|
6454
6865
|
summary: "Read one block's full prop contract — per-variant fields, the block's own heading/body/cta/image mapping, and the props the render reads that the editor cannot express",
|
|
6455
6866
|
request: () => z.object({
|
|
@@ -6583,6 +6994,8 @@ export const RECEIVERS = {
|
|
|
6583
6994
|
}),
|
|
6584
6995
|
"pages:templates": receiver({
|
|
6585
6996
|
receiver: "pages:templates",
|
|
6997
|
+
// auth (public) — task:01a128d6108e551f5966106b: first-party code identical for every caller, no ctx read (resolvers/pages.ts:1084-1085); the channels visitor tools are public (channels/src/tools/pages.ts:278,301).
|
|
6998
|
+
auth: "public",
|
|
6586
6999
|
surfaces: { mcp: true },
|
|
6587
7000
|
summary: "Browse the page templates (store, sales, webinar, course, about, …) — list them with their block line-up, or read one template's full blocks to start a page from",
|
|
6588
7001
|
request: () => z.object({
|
|
@@ -6620,8 +7033,9 @@ export const RECEIVERS = {
|
|
|
6620
7033
|
puckData: z.object({ content: z.array(z.record(z.string(), z.unknown())), root: z.record(z.string(), z.unknown()).optional() }).passthrough().optional()
|
|
6621
7034
|
.describe("Full replacement Puck data — any registry block. Top-level props are normalised and ids stamped exactly as `pages:create` does. Refused beside `sections`."),
|
|
6622
7035
|
root: PAGE_ROOT_PATCH.optional().describe("PAGE SETTINGS — merged into the stored `data.root.props` (what Layout reads for the page's head, chat, dock and chrome). Only these keys; an empty string CLEARS a key so it falls back to its default. Refused beside `sections`."),
|
|
7036
|
+
allowRemove: z.boolean().optional().describe("A rewrite that leaves the page empty, or keeps under half of a 3+ block page, is refused (would_remove_blocks) unless this is true. Set it only after the person confirmed the removal."),
|
|
6623
7037
|
}),
|
|
6624
|
-
response: () => z.object({ ok: z.boolean(), slug: z.string().optional(), title: z.string().optional(), url: z.string().optional(), status: z.string().optional(), updatedAt: z.number().optional(), error: z.string().optional(), quality: PAGE_QUALITY.optional() }),
|
|
7038
|
+
response: () => z.object({ ok: z.boolean(), slug: z.string().optional(), title: z.string().optional(), url: z.string().optional(), status: z.string().optional(), updatedAt: z.number().optional(), error: z.string().optional(), quality: PAGE_QUALITY.optional(), before: z.number().optional(), after: z.number().optional() }),
|
|
6625
7039
|
effect: "ask", cost: "free", reversible: true, idempotent: false, auth: "member",
|
|
6626
7040
|
}),
|
|
6627
7041
|
"pages:list": receiver({
|
|
@@ -7633,18 +8047,37 @@ export const RECEIVERS = {
|
|
|
7633
8047
|
// ──billing — handlers in resolvers/market.ts ──────────────────────────────────
|
|
7634
8048
|
"billing:plan": receiver({
|
|
7635
8049
|
receiver: "billing:plan",
|
|
7636
|
-
summary: "Change a workspace's plan — returns a checkout URL to complete the upgrade",
|
|
7637
|
-
request: () => z.object({ slug: z.string(), actorId: z.string(), plan: z.enum(["pro", "agency", "scale"]) }),
|
|
7638
|
-
response: () => z.object({ ok: z.boolean(), intent: z.string().optional(), checkoutUrl: z.string().optional(), plan: z.string().optional(), reason: z.string().optional() }),
|
|
8050
|
+
summary: "Change a workspace's plan — returns a checkout URL to complete the upgrade. Sellable: pro, team, business (priced from plan-prices.ts, the same session /pricing mints); free/cancel return the plan page; a grandfathered name (agency, scale) is refused as not_sellable with the sellable list",
|
|
8051
|
+
request: () => z.object({ slug: z.string(), actorId: z.string(), plan: z.enum(["pro", "team", "business", "free", "cancel", "agency", "scale"]) }),
|
|
8052
|
+
response: () => z.object({ ok: z.boolean(), intent: z.string().optional(), checkoutUrl: z.string().optional(), plan: z.string().optional(), amount_cents: z.number().optional(), sellable: z.array(z.object({ plan: z.string(), monthly_cents: z.number() })).optional(), reason: z.string().optional() }),
|
|
8053
|
+
// Intent-only: returns a checkout URL a person later pays — not `moves: "value"`.
|
|
7639
8054
|
effect: "ask", cost: "free", reversible: false, idempotent: false, auth: "update_group",
|
|
7640
8055
|
}),
|
|
7641
8056
|
"billing:topup": receiver({
|
|
7642
8057
|
receiver: "billing:topup",
|
|
7643
|
-
summary: "Top up workspace AI credits — returns
|
|
7644
|
-
request: () => z.object({ slug: z.string(), actorId: z.string(), amount: z.number(), currency: z.string().optional() }),
|
|
7645
|
-
response: () => z.object({ ok: z.boolean(), intent: z.string().optional(), checkoutUrl: z.string().optional(), amount: z.number().optional(), currency: z.string().optional(), reason: z.string().optional() }),
|
|
8058
|
+
summary: "Top up workspace AI credits — returns the checkout URL of a credits PACK. Credits are sold only as packs priced by the pack table (one.ie/web lib/credits-packs.ts, USD, at CREDITS_PER_USD): name `credits` or the pack's USD `amount`; a number that names no pack, or credits and amount that disagree, is refused (not_a_pack / amount_mismatch) with `packs` and a `suggested` pack. Credits are prepaid, NON-WITHDRAWABLE service units: they buy work on ONE (AI replies, tool and skill calls, agent runs, storage, API requests) and there is no payout, withdraw or cash-out rail against a credits balance",
|
|
8059
|
+
request: () => z.object({ slug: z.string(), actorId: z.string(), credits: z.number().optional(), amount: z.number().optional(), currency: z.string().optional() }),
|
|
8060
|
+
response: () => z.object({ ok: z.boolean(), intent: z.string().optional(), checkoutUrl: z.string().optional(), ppid: z.string().optional(), credits: z.number().optional(), amount: z.number().optional(), currency: z.string().optional(), suggested: z.object({ credits: z.number(), usd: z.number(), ppid: z.string() }).optional(), packs: z.array(z.object({ credits: z.number(), usd: z.number(), ppid: z.string() })).optional(), reason: z.string().optional() }),
|
|
8061
|
+
// Intent-only: returns a checkout URL a person later pays — not `moves: "value"`.
|
|
7646
8062
|
effect: "ask", cost: "free", reversible: false, idempotent: false, auth: "update_group",
|
|
7647
8063
|
}),
|
|
8064
|
+
// Public read: the same numbers /.well-known/one.json `fees` serves. The chat reads prices
|
|
8065
|
+
// here (channels get_pricing) instead of carrying them in a prompt. Handler: resolvers/billing.ts.
|
|
8066
|
+
"billing:list": receiver({
|
|
8067
|
+
receiver: "billing:list",
|
|
8068
|
+
summary: "ONE's current prices — the credit rate, the credit packs (credits, USD, ppid) and the plans on sale (monthly, annual, credit grant). Public and read-only; derived from the price tables, so call it before quoting any ONE price",
|
|
8069
|
+
request: () => z.object({}).optional(),
|
|
8070
|
+
response: () => z.object({
|
|
8071
|
+
ok: z.boolean(),
|
|
8072
|
+
currency: z.literal("USD").describe("Every price here is US dollars."),
|
|
8073
|
+
credit_usd: z.number().describe("The price of one credit in USD."),
|
|
8074
|
+
credits_per_usd: z.number().describe("Credits one US dollar buys."),
|
|
8075
|
+
credit_packs: z.array(z.object({ credits: z.number(), usd: z.number(), ppid: z.string() })).describe("The packs credits are sold in; billing:topup accepts only these."),
|
|
8076
|
+
plans: z.array(z.object({ plan: z.string(), monthly_cents: z.number(), annual_cents: z.number(), grant_credits: z.number() })).describe("The plans on sale (billing:plan sells these); prices in US cents."),
|
|
8077
|
+
closed: z.enum(["mark", "none"]).describe("mark: the caller's path to this door was marked off the request path; none: no caller to mark."),
|
|
8078
|
+
}),
|
|
8079
|
+
effect: "ask", cost: "free", reversible: true, idempotent: true, auth: "public",
|
|
8080
|
+
}),
|
|
7648
8081
|
// ── video — handler in resolvers/video.ts ──────────────────────────────────────
|
|
7649
8082
|
"video:ensure-defaults": receiver({
|
|
7650
8083
|
receiver: "video:ensure-defaults",
|
|
@@ -7666,6 +8099,8 @@ export const RECEIVERS = {
|
|
|
7666
8099
|
// side (configure a service) is the separate, gated booking:configure.
|
|
7667
8100
|
"booking:list-slots": receiver({
|
|
7668
8101
|
receiver: "booking:list-slots",
|
|
8102
|
+
// auth (public) — task:01a128d6108e551f5966106b: a customer with no account books a slot: /u/<slug>/book needs no sign-in (BookingCalendar.tsx:269); handler takes no ctx (resolvers/booking.ts:227).
|
|
8103
|
+
auth: "public",
|
|
7669
8104
|
summary: "List open slots for a workspace's service on a date (or next open days)",
|
|
7670
8105
|
request: () => z.object({
|
|
7671
8106
|
slug: z.string(), // provider workspace
|
|
@@ -7723,6 +8158,8 @@ export const RECEIVERS = {
|
|
|
7723
8158
|
}),
|
|
7724
8159
|
"booking:create": receiver({
|
|
7725
8160
|
receiver: "booking:create",
|
|
8161
|
+
// auth (public) — task:01a128d6108e551f5966106b: the anonymous visitor booking on /u/<slug>/book (BookingCalendar.tsx:318); the handler is built for it — customerRef falls back to the typed email (resolvers/booking.ts:319-320).
|
|
8162
|
+
auth: "public",
|
|
7726
8163
|
summary: "Hold a slot for a customer; returns a ref and a payment intent when price > 0",
|
|
7727
8164
|
request: () => z.object({
|
|
7728
8165
|
slug: z.string(),
|
|
@@ -7864,22 +8301,27 @@ export const RECEIVERS = {
|
|
|
7864
8301
|
request: () => z.object({
|
|
7865
8302
|
slug: z.string().optional(),
|
|
7866
8303
|
templates: z.boolean().optional(),
|
|
8304
|
+
// Named here because the door parses with this schema and zod strips what it does not name.
|
|
8305
|
+
limit: z.number().int().optional(),
|
|
7867
8306
|
}),
|
|
7868
8307
|
response: () => z.object({
|
|
7869
8308
|
workflows: z.array(z.object({
|
|
7870
8309
|
id: z.string(), name: z.string(), description: z.string().optional(), step_count: z.number(),
|
|
7871
8310
|
status: z.string(), last_run_status: z.string().nullable(),
|
|
7872
8311
|
})),
|
|
8312
|
+
// A short answer says it is short: total rows that exist, and whether `workflows` was cut.
|
|
8313
|
+
total: z.number().optional(),
|
|
8314
|
+
truncated: z.boolean().optional(),
|
|
7873
8315
|
error: z.string().optional(),
|
|
7874
8316
|
}),
|
|
7875
8317
|
effect: "ask", cost: "free", idempotent: true, simulatable: false, auth: "view_workflows",
|
|
7876
|
-
examples: [{ slug: "acme" }, { templates: true }],
|
|
8318
|
+
examples: [{ slug: "acme" }, { templates: true }, { limit: 5 }],
|
|
7877
8319
|
}),
|
|
7878
8320
|
"workflow:get": receiver({
|
|
7879
8321
|
receiver: "workflow:get",
|
|
7880
8322
|
surfaces: { mcp: true },
|
|
7881
8323
|
summary: "Fetch one workflow's full graph — steps (kind, config, position) and edges (with conditions)",
|
|
7882
|
-
request: () => z.object({ workflowId: z.string() }),
|
|
8324
|
+
request: () => z.object({ workflowId: z.string(), slug: SERVICE_SLUG }),
|
|
7883
8325
|
response: () => z.object({
|
|
7884
8326
|
id: z.string(), name: z.string(), status: z.string(),
|
|
7885
8327
|
steps: z.array(z.object({
|
|
@@ -7900,7 +8342,7 @@ export const RECEIVERS = {
|
|
|
7900
8342
|
receiver: "workflow:runs",
|
|
7901
8343
|
surfaces: { mcp: true },
|
|
7902
8344
|
summary: "List recent runs of a workflow (D1 workflow_run) for the monitor + history surfaces",
|
|
7903
|
-
request: () => z.object({ workflowId: z.string(), runId: z.string().optional(), limit: z.number().int().min(1).max(200).optional(), stepId: z.string().optional(), stepLimit: z.number().int().min(1).max(100).optional() }),
|
|
8345
|
+
request: () => z.object({ workflowId: z.string(), runId: z.string().optional(), limit: z.number().int().min(1).max(200).optional(), stepId: z.string().optional(), stepLimit: z.number().int().min(1).max(100).optional(), slug: SERVICE_SLUG }),
|
|
7904
8346
|
response: () => z.object({
|
|
7905
8347
|
runs: z.array(z.object({
|
|
7906
8348
|
id: z.string(), status: z.string(),
|
|
@@ -8038,6 +8480,7 @@ export const RECEIVERS = {
|
|
|
8038
8480
|
diff: WorkflowDiffSchema,
|
|
8039
8481
|
simulate: z.boolean().optional(),
|
|
8040
8482
|
version: z.number().int().optional(), // optimistic lock — stale → conflict
|
|
8483
|
+
slug: SERVICE_SLUG,
|
|
8041
8484
|
}),
|
|
8042
8485
|
response: () => z.object({
|
|
8043
8486
|
ok: z.boolean(),
|
|
@@ -8057,6 +8500,7 @@ export const RECEIVERS = {
|
|
|
8057
8500
|
request: () => z.object({
|
|
8058
8501
|
workflowId: z.string(),
|
|
8059
8502
|
diff: WorkflowDiffSchema,
|
|
8503
|
+
slug: SERVICE_SLUG,
|
|
8060
8504
|
}),
|
|
8061
8505
|
response: () => z.object({
|
|
8062
8506
|
ok: z.boolean(),
|
|
@@ -8083,6 +8527,11 @@ export const RECEIVERS = {
|
|
|
8083
8527
|
// Undeclared until 2026-10-11, zod STRIPPED this at /api/ask and the canvas
|
|
8084
8528
|
// Test button minted a LIVE run that deposited pheromone on every edge.
|
|
8085
8529
|
test: z.boolean().optional().describe("Test run: is_test=1, bypasses trigger match + flow gates, deposits zero pheromone. Steps still execute for real — not a dry run."),
|
|
8530
|
+
// A bare key's work contract for THE RUN: declared at the top level so the edge
|
|
8531
|
+
// keeps it (zod strips the undeclared); runWorkflow stores it in triggerPayload,
|
|
8532
|
+
// where every lane reads a bare-key run's contract from, and it rides beneath
|
|
8533
|
+
// every step. Also accepted inside triggerPayload (round 5, finding 3).
|
|
8534
|
+
...WORK_CONTRACT_FIELDS,
|
|
8086
8535
|
}),
|
|
8087
8536
|
response: () => z.object({ runId: z.string(), status: z.string().describe("open | done | paused | failed — never `open` for a run whose executor refused to start it"), error: z.string().optional() }),
|
|
8088
8537
|
effect: "ask", cost: "variable", reversible: false, idempotent: true, simulatable: false, settles: "none",
|
|
@@ -8156,6 +8605,8 @@ export const RECEIVERS = {
|
|
|
8156
8605
|
stripeAccount: z.string().optional(),
|
|
8157
8606
|
error: z.string().optional(),
|
|
8158
8607
|
}),
|
|
8608
|
+
// Intent-only: mints the session a buyer later pays; nothing moves at the call, so
|
|
8609
|
+
// it is deliberately NOT `moves: "value"` (value-moving-parity.test.ts names it).
|
|
8159
8610
|
effect: "ask", cost: "variable", reversible: false, idempotent: false, simulatable: false, settles: "offchain",
|
|
8160
8611
|
auth: "manage_workflows",
|
|
8161
8612
|
examples: [{ workspace: "acme", ppid: "pr_1" }],
|
|
@@ -8221,6 +8672,10 @@ export const RECEIVERS = {
|
|
|
8221
8672
|
source: z.string(),
|
|
8222
8673
|
slug: z.string().optional(),
|
|
8223
8674
|
triggerPayload: z.record(z.string(), z.unknown()).optional(),
|
|
8675
|
+
// A bare key's work contract for every run this fire starts — declared so the
|
|
8676
|
+
// edge keeps it; the door puts it in each child's triggerPayload and the child's
|
|
8677
|
+
// value steps are gated as the origin key with it (round 4 finding 2, round 5 finding 3).
|
|
8678
|
+
...WORK_CONTRACT_FIELDS,
|
|
8224
8679
|
}),
|
|
8225
8680
|
response: () => z.object({ ok: z.boolean(), started: z.number(), runIds: z.array(z.string()) }),
|
|
8226
8681
|
effect: "signal", cost: "variable", reversible: false, idempotent: false, simulatable: false, auth: "manage_workflows",
|
|
@@ -8550,29 +9005,17 @@ export const RECEIVERS = {
|
|
|
8550
9005
|
// on the way back, and a name the model would pick by accident. The curated
|
|
8551
9006
|
// `meet_human` (channels/src/tools/meetings.ts) is the chat surface.
|
|
8552
9007
|
}),
|
|
8553
|
-
"video:join-event": receiver({
|
|
8554
|
-
receiver: "video:join-event",
|
|
8555
|
-
summary: "Record a peer join event for tracking and lifecycle; public — called from the /go/ link handler",
|
|
8556
|
-
request: () => z.object({
|
|
8557
|
-
workspace: z.string(),
|
|
8558
|
-
roomSlug: z.string(),
|
|
8559
|
-
role: z.string().optional(),
|
|
8560
|
-
actorId: z.string().optional(),
|
|
8561
|
-
}),
|
|
8562
|
-
response: () => z.object({ ok: z.boolean(), error: z.string().optional() }),
|
|
8563
|
-
effect: "signal", cost: "free", idempotent: true,
|
|
8564
|
-
examples: [{ workspace: "acme", roomSlug: "consult-abc", role: "guest" }],
|
|
8565
|
-
}),
|
|
8566
9008
|
"video:start-recording": receiver({
|
|
8567
9009
|
receiver: "video:start-recording",
|
|
8568
|
-
summary: "Start cloud recording for an active room via 100ms REST; inserts a video_recordings row",
|
|
9010
|
+
summary: "Start cloud recording for an active room via 100ms REST; inserts a video_recordings row. Idempotent per room: a repeat start while the room's recording is fresh returns that recording with reused:true; an HMS refusal is error:'hms_start_failed', never ok",
|
|
8569
9011
|
request: () => z.object({ workspace: z.string(), roomSlug: z.string() }),
|
|
8570
9012
|
response: () => z.object({
|
|
8571
9013
|
ok: z.boolean(),
|
|
8572
9014
|
recordingId: z.string().optional(),
|
|
9015
|
+
reused: z.boolean().optional(),
|
|
8573
9016
|
error: z.string().optional(),
|
|
8574
9017
|
}),
|
|
8575
|
-
effect: "ask", cost: "free", idempotent:
|
|
9018
|
+
effect: "ask", cost: "free", idempotent: true, auth: "manage_clients",
|
|
8576
9019
|
examples: [{ workspace: "acme", roomSlug: "algebra-101" }],
|
|
8577
9020
|
surfaces: { chat: true, mcp: { name: "start_recording" } }, // fan-out: chat (actions-fan-out C5) + MCP (agent-native C1)
|
|
8578
9021
|
}),
|
|
@@ -8615,54 +9058,6 @@ export const RECEIVERS = {
|
|
|
8615
9058
|
examples: [{ workspace: "acme", roomSlug: "product-launch" }],
|
|
8616
9059
|
surfaces: { chat: true, mcp: { name: "start_stream" } }, // fan-out: chat (actions-fan-out C5) + MCP (agent-native C1)
|
|
8617
9060
|
}),
|
|
8618
|
-
// connect:channel — token-paste connect for a channel (Connect plan C7). The
|
|
8619
|
-
// typed contract over the shipped /api/connect/telegram route: the caller pastes
|
|
8620
|
-
// a channel credential, web verifies it (getMe), points the webhook, then hands
|
|
8621
|
-
// the raw secret to channels' /connect sink under the owner gate. SECURITY: the
|
|
8622
|
-
// token rides the REQUEST only; the response NEVER echoes it. effect:ask,
|
|
8623
|
-
// auth:manage_clients re-walked server-side off locals.slug (never body actorId).
|
|
8624
|
-
"connect:channel": receiver({
|
|
8625
|
-
receiver: "connect:channel",
|
|
8626
|
-
summary: "Connect a channel (e.g. telegram) by pasting its bot token; verifies, sets the webhook, seals the credential under the owner gate",
|
|
8627
|
-
request: () => z.object({
|
|
8628
|
-
channel: z.string(), // 'telegram' (token-paste path)
|
|
8629
|
-
token: z.string(), // the bot credential — request-only, never returned/logged
|
|
8630
|
-
slug: z.string().optional(), // workspace; gate re-scopes to the authenticated owner
|
|
8631
|
-
}),
|
|
8632
|
-
response: () => z.object({
|
|
8633
|
-
ok: z.boolean(),
|
|
8634
|
-
status: z.string().optional(), // 'active' | 'updated' from the channels sink
|
|
8635
|
-
account: z.string().optional(), // public handle (e.g. bot username) — never the token
|
|
8636
|
-
error: z.string().optional(), // 'invalid token' | 'unauthorized' | 'duplicate'
|
|
8637
|
-
}),
|
|
8638
|
-
effect: "ask", cost: "free", reversible: false, idempotent: true, auth: "manage_clients",
|
|
8639
|
-
examples: [{ channel: "telegram", token: "<bot-token>" }],
|
|
8640
|
-
}),
|
|
8641
|
-
// connect:status — list the workspace's connected channels (Connect plan C8).
|
|
8642
|
-
// Read-only contract over /api/connect/status: rows come from the `connection`
|
|
8643
|
-
// table scoped to the authenticated owner (locals.slug — never a body slug).
|
|
8644
|
-
// SECURITY: the response carries channel + public account id + status only;
|
|
8645
|
-
// cred_ref and webhook_secret never leave the server.
|
|
8646
|
-
"connect:status": receiver({
|
|
8647
|
-
receiver: "connect:status",
|
|
8648
|
-
summary: "List connected channels for the workspace — channel, account, status, runtime; never the credential",
|
|
8649
|
-
request: () => z.object({}),
|
|
8650
|
-
response: () => z.object({
|
|
8651
|
-
ok: z.boolean(),
|
|
8652
|
-
connections: z
|
|
8653
|
-
.array(z.object({
|
|
8654
|
-
channel: z.string(), // 'telegram' | 'slack' | 'discord' | 'email'
|
|
8655
|
-
account: z.string(), // external_account_id (bot id / team id / inbound address)
|
|
8656
|
-
status: z.string(), // 'active' | 'revoked'
|
|
8657
|
-
runtime: z.string(), // 'webhook' | 'socket'
|
|
8658
|
-
connected_at: z.number(), // unix epoch seconds
|
|
8659
|
-
}))
|
|
8660
|
-
.optional(),
|
|
8661
|
-
error: z.string().optional(),
|
|
8662
|
-
}),
|
|
8663
|
-
effect: "ask", cost: "free", reversible: true, idempotent: true, auth: "manage_clients",
|
|
8664
|
-
examples: [{}],
|
|
8665
|
-
}),
|
|
8666
9061
|
// ── News desk (text/magazine.md) — follow, fetch once, rank per group, publish an issue ──
|
|
8667
9062
|
// Fetch is shared (a feed is public); everything private is keyed by the group. Handlers in
|
|
8668
9063
|
// resolvers/news.ts. Every one refuses BY NAME: forbidden · not_found · bad_request ·
|
|
@@ -9441,7 +9836,7 @@ export const RECEIVERS = {
|
|
|
9441
9836
|
receiver: "seo:backlinks-summary",
|
|
9442
9837
|
surfaces: { mcp: { name: "seo_backlinks" } },
|
|
9443
9838
|
summary: "Pull live backlink summary for a domain via DataForSEO; marks domain→seo:backlinks path",
|
|
9444
|
-
request: () => z.object({ target: z.string(), limit: z.number().int().min(1).max(1000).optional() }),
|
|
9839
|
+
request: () => z.object({ slug: SERVICE_SLUG, target: z.string(), limit: z.number().int().min(1).max(1000).optional() }),
|
|
9445
9840
|
response: () => z.object({ ok: z.boolean(), data: z.unknown().optional(), error: z.string().optional() }),
|
|
9446
9841
|
effect: "ask", cost: "variable", reversible: true, idempotent: false, auth: "member",
|
|
9447
9842
|
examples: [{ target: "one.ie" }],
|
|
@@ -9450,7 +9845,7 @@ export const RECEIVERS = {
|
|
|
9450
9845
|
receiver: "seo:llm-mentions",
|
|
9451
9846
|
surfaces: { mcp: { name: "seo_ai_visibility" } },
|
|
9452
9847
|
summary: "Pull live AI-visibility (LLM mentions) data for a domain via DataForSEO; marks domain→seo:llm-mentions path",
|
|
9453
|
-
request: () => z.object({ target: z.string() }),
|
|
9848
|
+
request: () => z.object({ slug: SERVICE_SLUG, target: z.string() }),
|
|
9454
9849
|
response: () => z.object({ ok: z.boolean(), data: z.unknown().optional(), error: z.string().optional() }),
|
|
9455
9850
|
effect: "ask", cost: "variable", reversible: true, idempotent: false, auth: "member",
|
|
9456
9851
|
examples: [{ target: "one.ie" }],
|
|
@@ -9459,7 +9854,7 @@ export const RECEIVERS = {
|
|
|
9459
9854
|
receiver: "seo:keywords-for-keyword",
|
|
9460
9855
|
surfaces: { mcp: { name: "seo_research_keywords" } },
|
|
9461
9856
|
summary: "Return related keyword suggestions for a seed keyword via DataForSEO Google Ads; marks keyword→seo:keywords path",
|
|
9462
|
-
request: () => z.object({ keyword: z.string(), location_code: z.number().int().optional(), language_code: z.string().optional() }),
|
|
9857
|
+
request: () => z.object({ slug: SERVICE_SLUG, keyword: z.string(), location_code: z.number().int().optional(), language_code: z.string().optional() }),
|
|
9463
9858
|
response: () => z.object({ ok: z.boolean(), data: z.unknown().optional(), error: z.string().optional() }),
|
|
9464
9859
|
effect: "ask", cost: "variable", reversible: true, idempotent: false, auth: "member",
|
|
9465
9860
|
examples: [{ keyword: "ai agents", location_code: 2840, language_code: "en" }],
|
|
@@ -9938,9 +10333,9 @@ export const RECEIVERS = {
|
|
|
9938
10333
|
"affiliate:ppc-payout": receiver({
|
|
9939
10334
|
receiver: "affiliate:ppc-payout",
|
|
9940
10335
|
summary: "Drains unpaid PPC accrual for a budget to affiliate payout addresses via pay.one.ie",
|
|
9941
|
-
request: () => z.object({ budgetId: z.unknown().optional(), chain: z.unknown().optional(), refToAddress: z.unknown().optional(), treasuryAddress: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
|
|
10336
|
+
request: () => z.object({ budgetId: z.unknown().optional(), chain: z.unknown().optional(), refToAddress: z.unknown().optional(), treasuryAddress: z.unknown().optional(), workspace: z.unknown().optional(), ...WORK_CONTRACT_FIELDS }).passthrough(),
|
|
9942
10337
|
response: () => z.unknown(),
|
|
9943
|
-
effect: "ask", auth: "owner", reversible: false,
|
|
10338
|
+
effect: "ask", auth: "owner", reversible: false, moves: "value", movesIn: ["workspace"],
|
|
9944
10339
|
}),
|
|
9945
10340
|
"agent:draft": receiver({
|
|
9946
10341
|
receiver: "agent:draft",
|
|
@@ -10000,6 +10395,24 @@ export const RECEIVERS = {
|
|
|
10000
10395
|
response: () => z.unknown(),
|
|
10001
10396
|
effect: "ask", auth: "member", reversible: false,
|
|
10002
10397
|
}),
|
|
10398
|
+
// The campaign build pipeline: compile the stored sections into a workflow (compile), and the same
|
|
10399
|
+
// door driven by the approve button, which runs it (approve). Renamed from the two-colon
|
|
10400
|
+
// ui:campaigns:approve / ui:campaigns:compile, which /receivers/<family>/<verb> cannot route
|
|
10401
|
+
// (task:01a0f0bfd11bccc1674f7241).
|
|
10402
|
+
"campaign:approve": receiver({
|
|
10403
|
+
receiver: "campaign:approve",
|
|
10404
|
+
summary: "Approves a campaign: compiles its stored sections (else the sections sent) into a workflow and runs it. Add requireApproval to put a human gate before the first send",
|
|
10405
|
+
request: () => z.object({ campaignId: z.unknown().optional(), sections: z.unknown().optional(), requireApproval: z.unknown().optional() }).passthrough(),
|
|
10406
|
+
response: () => z.unknown(),
|
|
10407
|
+
effect: "ask", auth: "member", reversible: false,
|
|
10408
|
+
}),
|
|
10409
|
+
"campaign:compile": receiver({
|
|
10410
|
+
receiver: "campaign:compile",
|
|
10411
|
+
summary: "Compiles a campaign's stored sections (else the sections sent) into a workflow and runs it. Add requireApproval to put a human gate before the first send",
|
|
10412
|
+
request: () => z.object({ campaignId: z.unknown().optional(), sections: z.unknown().optional(), requireApproval: z.unknown().optional() }).passthrough(),
|
|
10413
|
+
response: () => z.unknown(),
|
|
10414
|
+
effect: "ask", auth: "member", reversible: false,
|
|
10415
|
+
}),
|
|
10003
10416
|
"chat:delete-template": receiver({
|
|
10004
10417
|
receiver: "chat:delete-template",
|
|
10005
10418
|
summary: "Deletes a chat template for a chip_id in the workspace",
|
|
@@ -10026,6 +10439,7 @@ export const RECEIVERS = {
|
|
|
10026
10439
|
summary: "Mints a shareable payment link for a product price",
|
|
10027
10440
|
request: () => z.object({ chain: z.unknown().optional(), network: z.unknown().optional(), ppid: z.unknown().optional(), slug: z.unknown().optional() }).passthrough(),
|
|
10028
10441
|
response: () => z.unknown(),
|
|
10442
|
+
// Intent-only: mints a link a buyer later pays — not `moves: "value"`.
|
|
10029
10443
|
effect: "ask", auth: "owner", reversible: false,
|
|
10030
10444
|
}),
|
|
10031
10445
|
"checkout:notify": receiver({
|
|
@@ -10224,7 +10638,7 @@ export const RECEIVERS = {
|
|
|
10224
10638
|
}),
|
|
10225
10639
|
"learning:complete": receiver({
|
|
10226
10640
|
receiver: "learning:complete",
|
|
10227
|
-
summary: "Grants credits and
|
|
10641
|
+
summary: "Grants the attested caller credits and a pending reward for a course stage (or whole course) the substrate already records them completing — their own enrolment and their own account progress rows, never a device row; once per caller, course and stage. Platform courses only: any other course answers {ok:true, creditsGranted:0, reason:'course_not_rewarding'}. An author of the course's workspace earns nothing; a roles read that cannot answer refuses retryably ('unavailable'). Per-learner ceiling of 1 course and 10 lesson rewards a UTC day — past it, 'daily_limit'; a platform-wide budget of 100,000 course-reward credits a UTC day — past it, 'daily_budget' (retryable). Both limits are checked in the same statement as the grant",
|
|
10228
10642
|
request: () => z.object({ courseId: z.unknown().optional(), kind: z.unknown().optional(), stageId: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
|
|
10229
10643
|
response: () => z.unknown(),
|
|
10230
10644
|
effect: "ask", auth: "session", reversible: false,
|
|
@@ -10323,23 +10737,25 @@ export const RECEIVERS = {
|
|
|
10323
10737
|
"payout:set": receiver({
|
|
10324
10738
|
receiver: "payout:set",
|
|
10325
10739
|
summary: "Set a merchant's crypto payout treasury addresses (sui/evm) and its custody switch (off | on) after workspace ownership check and human presence confirmation",
|
|
10326
|
-
request: () => z.object({ confirm: z.unknown().optional(), custody: z.unknown().optional(), treasury_evm: z.unknown().optional(), treasury_sui: z.unknown().optional(), workspace: z.unknown().optional() }).passthrough(),
|
|
10740
|
+
request: () => z.object({ confirm: z.unknown().optional(), custody: z.unknown().optional(), treasury_evm: z.unknown().optional(), treasury_sui: z.unknown().optional(), workspace: z.unknown().optional(), ...WORK_CONTRACT_FIELDS }).passthrough(),
|
|
10327
10741
|
response: () => z.unknown(),
|
|
10328
|
-
effect: "ask", auth: "owner", reversible: false,
|
|
10742
|
+
effect: "ask", auth: "owner", reversible: false, moves: "value", movesIn: ["workspace"],
|
|
10329
10743
|
}),
|
|
10330
10744
|
"plugins:buy-with-credits": receiver({
|
|
10331
10745
|
receiver: "plugins:buy-with-credits",
|
|
10332
10746
|
summary: "Buy a plugin using workspace credits, granting entitlement synchronously",
|
|
10333
|
-
request: () => z.object({ name: z.unknown().optional() }).passthrough(),
|
|
10747
|
+
request: () => z.object({ name: z.unknown().optional(), ...WORK_CONTRACT_FIELDS }).passthrough(),
|
|
10334
10748
|
response: () => z.unknown(),
|
|
10335
|
-
effect: "ask", auth: "member", reversible: false,
|
|
10749
|
+
effect: "ask", auth: "member", reversible: false, moves: "value",
|
|
10336
10750
|
}),
|
|
10337
10751
|
"plugins:buy-with-one-token": receiver({
|
|
10338
10752
|
receiver: "plugins:buy-with-one-token",
|
|
10339
10753
|
summary: "Buys a plugin by verifying a Sui ONE token transfer and granting entitlement with no credit mint",
|
|
10340
|
-
request: () => z.object({ name: z.unknown().optional(), tx: z.unknown().optional(), txDigest: z.unknown().optional() }).passthrough(),
|
|
10754
|
+
request: () => z.object({ name: z.unknown().optional(), tx: z.unknown().optional(), txDigest: z.unknown().optional(), ...WORK_CONTRACT_FIELDS }).passthrough(),
|
|
10341
10755
|
response: () => z.unknown(),
|
|
10342
|
-
|
|
10756
|
+
// Settles at the call: verifies the token transfer and writes the entitlement — the
|
|
10757
|
+
// same class as wallet:send (a settlement recorded for value that changed hands).
|
|
10758
|
+
effect: "ask", auth: "member", reversible: false, moves: "value",
|
|
10343
10759
|
}),
|
|
10344
10760
|
"plugins:credit-balance": receiver({
|
|
10345
10761
|
receiver: "plugins:credit-balance",
|
|
@@ -10401,7 +10817,7 @@ export const RECEIVERS = {
|
|
|
10401
10817
|
// A key given to ONE is used for a caller who never holds it: `secrets/` is a worker of
|
|
10402
10818
|
// its own, reached over the `OPENER` service binding. call + used land here with C6's
|
|
10403
10819
|
// resolver (one.ie/web/src/lib/resolvers/secrets.ts), `secrets:give` with C8's, `secrets:grant` +
|
|
10404
|
-
// `secrets:revoke` with C12's
|
|
10820
|
+
// `secrets:revoke` with C12's, `secrets:list` with C15's (Interface Contract #2). There is NO `secrets:refused`: a
|
|
10405
10821
|
// refusal is `secrets:used` with `refused` set, closed with a warn.
|
|
10406
10822
|
"secrets:call": receiver({
|
|
10407
10823
|
receiver: "secrets:call",
|
|
@@ -10477,9 +10893,30 @@ export const RECEIVERS = {
|
|
|
10477
10893
|
effect: "ask", auth: "authenticated", cost: "free", reversible: false, idempotent: false,
|
|
10478
10894
|
examples: [{ signer: { kind: "agent", sig: "<base64>", signer: "0x…" }, payload: { type: "give", vault: "0x…", body: { name: "OPENAI_API_KEY", provider: "openai", sealed: "age:…", mode: "give", replaces: null, subject: { kind: "actor", id: "<your actor id>" } } } }],
|
|
10479
10895
|
}),
|
|
10896
|
+
"secrets:list": receiver({
|
|
10897
|
+
receiver: "secrets:list",
|
|
10898
|
+
// text/secrets.md § What an agent sees: "through the SDK or MCP: names, never values".
|
|
10899
|
+
surfaces: { mcp: true },
|
|
10900
|
+
summary: "Your secrets desk — names and meters, never values. Each key you gave (yours, and each group's you may manage): its name, provider, last four characters, sigHash (what a Rotate signs as `replaces`), who uses it through which grant (grantee, which calls, a day's ceiling, until when, today's count from the opener's own meter, stopped or not) and the opener's own call log (who, which entry, counted or over the limit — never a path, body or header; a call is on it whether or not the caller ever sent secrets:used). Keys lent to you (never the lender's last four or vault), the Composio groups running without a grant, each vault's whole grant-signer list with the proposals waiting beside it, its history, a pending reset and the alerts. A cut answer says capped and names what was cut. Everything about WHO comes from the session or attested caller and D1 — never from the body.",
|
|
10901
|
+
request: () => z.object({}).describe("Nothing: the caller, its group chain, its owner and the groups it may manage are read from the session and D1. Any field sent is ignored."),
|
|
10902
|
+
response: () => z.object({
|
|
10903
|
+
ok: z.boolean(),
|
|
10904
|
+
keys: z.array(z.unknown()).optional().describe("Per key: vault, name, provider, last4, flagged, subject, sigHash, givenAt, grants[{ id, ref, to, for, perDay, until, today, stopped }], calls[{ at, grant, actor, entry, outcome }] (newest first, ≤50)."),
|
|
10905
|
+
lentToMe: z.array(z.unknown()).optional().describe("Per lend: ref, name, provider, from (who lends it), to (with the agents it covers), left_today, until, perDay, for, accepted, family, stopped."),
|
|
10906
|
+
composio: z.array(z.unknown()).optional().describe("Per group you manage: requireGrants ({ vault, on } or null), noGrantToday, noGrantCalls."),
|
|
10907
|
+
vaults: z.array(z.unknown()).optional().describe("Per key vault: grantSigners (the opener's chain cache), state fresh · held · unavailable, and from the chain's events (display only): history, pending, pendingReset, alerts."),
|
|
10908
|
+
ownVault: z.object({ vault: z.string(), anchored: z.boolean() }).nullable().optional().describe("The signed-in person's own vault: born by them, anchored once one of their registered passkeys accepted itself onto its grant-signer list — the only vault the seal frame gives into."),
|
|
10909
|
+
capped: z.boolean().optional().describe("true when something was cut (more than 200 keys or grants, more than 50 calls in a log); `cut` names each."),
|
|
10910
|
+
cut: z.array(z.string()).optional(),
|
|
10911
|
+
refused: z.string().optional().describe("The opener's: malformed."),
|
|
10912
|
+
error: z.string().optional().describe("The web side: unauthorized · not_in_workflow (a workflow step never reads the runner's desk) · opener_unbound (the opener is not live yet — nothing was read) · opener_unreachable."),
|
|
10913
|
+
}),
|
|
10914
|
+
effect: "ask", auth: "authenticated", cost: "free", reversible: true, idempotent: true,
|
|
10915
|
+
examples: [{}],
|
|
10916
|
+
}),
|
|
10480
10917
|
"secrets:grant": receiver({
|
|
10481
10918
|
receiver: "secrets:grant",
|
|
10482
|
-
summary: "Lend a key you gave to ONE, or accept one lent to you. LEND: a signed grant — who may use the key (a person, an agent, or a group), which calls (catalogue entries of the provider row), how many a day, until when — checked against the grant-signers of the vault the key was given under (never the vault the document names), and stored only once its signature verifies (an id is never reused on a vault). The borrower gets a card linking one.ie/
|
|
10919
|
+
summary: "Lend a key you gave to ONE, or accept one lent to you. LEND: a signed grant — who may use the key (a person, an agent, or a group), which calls (catalogue entries of the provider row), how many a day, until when — checked against the grant-signers of the vault the key was given under (never the vault the document names), and stored only once its signature verifies (an id is never reused on a vault). The borrower gets a card linking one.ie/secrets?lent=<ref>; their calls run on the key once they accept, and they never see it. ACCEPT: `accept` names the grant's ref; `confirm: false` shows it in words and writes nothing, `confirm: true` records the acceptance. Only a person's own session accepts — for themselves, or with `group` / `agent` for a group or an agent they control — never an agent, and never from a body field. Closes with a mark on `actor → provider:<name>`, a warn on a refusal once the provider is known.",
|
|
10483
10920
|
request: () => z.object({
|
|
10484
10921
|
signer: z.object({
|
|
10485
10922
|
kind: z.enum(["person", "agent"]).describe("person: a passkey touch on the seal page, in a window of its own (a framed grant is refused). agent: its own ed25519 Sui key (the SDK's grantData)."),
|