@avow-finance/spec 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +119 -2
- package/dist/agent-connect.d.ts +82 -0
- package/dist/agent-connect.d.ts.map +1 -0
- package/dist/agent-connect.js +91 -0
- package/dist/agent-connect.js.map +1 -0
- package/dist/agent-session.d.ts +791 -0
- package/dist/agent-session.d.ts.map +1 -0
- package/dist/agent-session.js +176 -0
- package/dist/agent-session.js.map +1 -0
- package/dist/ap2.d.ts +79 -0
- package/dist/ap2.d.ts.map +1 -0
- package/dist/ap2.js +151 -0
- package/dist/ap2.js.map +1 -0
- package/dist/api-request.d.ts +144 -0
- package/dist/api-request.d.ts.map +1 -0
- package/dist/api-request.js +246 -0
- package/dist/api-request.js.map +1 -0
- package/dist/api.d.ts +288 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +332 -0
- package/dist/api.js.map +1 -0
- package/dist/canonical.d.ts +22 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +66 -0
- package/dist/canonical.js.map +1 -0
- package/dist/commitment-card.d.ts +78 -0
- package/dist/commitment-card.d.ts.map +1 -0
- package/dist/commitment-card.js +224 -0
- package/dist/commitment-card.js.map +1 -0
- package/dist/commitment.d.ts +185 -0
- package/dist/commitment.d.ts.map +1 -0
- package/dist/commitment.js +148 -0
- package/dist/commitment.js.map +1 -0
- package/dist/compute-offers.d.ts +128 -0
- package/dist/compute-offers.d.ts.map +1 -0
- package/dist/compute-offers.js +111 -0
- package/dist/compute-offers.js.map +1 -0
- package/dist/contest.d.ts +88 -0
- package/dist/contest.d.ts.map +1 -0
- package/dist/contest.js +131 -0
- package/dist/contest.js.map +1 -0
- package/dist/demo.d.ts +69 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/demo.js +152 -0
- package/dist/demo.js.map +1 -0
- package/dist/dependencies.d.ts +308 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +133 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/eip712.d.ts +1569 -0
- package/dist/eip712.d.ts.map +1 -0
- package/dist/eip712.js +550 -0
- package/dist/eip712.js.map +1 -0
- package/dist/elided-terms.d.ts +37 -0
- package/dist/elided-terms.d.ts.map +1 -0
- package/dist/elided-terms.js +48 -0
- package/dist/elided-terms.js.map +1 -0
- package/dist/erc8183.d.ts +78 -0
- package/dist/erc8183.d.ts.map +1 -0
- package/dist/erc8183.js +88 -0
- package/dist/erc8183.js.map +1 -0
- package/dist/facts.d.ts +70 -0
- package/dist/facts.d.ts.map +1 -0
- package/dist/facts.js +33 -0
- package/dist/facts.js.map +1 -0
- package/dist/gpu-reservation.d.ts +79 -0
- package/dist/gpu-reservation.d.ts.map +1 -0
- package/dist/gpu-reservation.js +135 -0
- package/dist/gpu-reservation.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/job-session.d.ts +981 -0
- package/dist/job-session.d.ts.map +1 -0
- package/dist/job-session.js +170 -0
- package/dist/job-session.js.map +1 -0
- package/dist/job-verification.d.ts +244 -0
- package/dist/job-verification.d.ts.map +1 -0
- package/dist/job-verification.js +89 -0
- package/dist/job-verification.js.map +1 -0
- package/dist/job-wording.d.ts +48 -0
- package/dist/job-wording.d.ts.map +1 -0
- package/dist/job-wording.js +134 -0
- package/dist/job-wording.js.map +1 -0
- package/dist/job.d.ts +117 -0
- package/dist/job.d.ts.map +1 -0
- package/dist/job.js +166 -0
- package/dist/job.js.map +1 -0
- package/dist/json-fields.d.ts +13 -0
- package/dist/json-fields.d.ts.map +1 -0
- package/dist/json-fields.js +30 -0
- package/dist/json-fields.js.map +1 -0
- package/dist/keychain.d.ts +51 -0
- package/dist/keychain.d.ts.map +1 -0
- package/dist/keychain.js +133 -0
- package/dist/keychain.js.map +1 -0
- package/dist/mailbox.d.ts +1650 -0
- package/dist/mailbox.d.ts.map +1 -0
- package/dist/mailbox.js +87 -0
- package/dist/mailbox.js.map +1 -0
- package/dist/mandate.d.ts +53 -0
- package/dist/mandate.d.ts.map +1 -0
- package/dist/mandate.js +97 -0
- package/dist/mandate.js.map +1 -0
- package/dist/networks.d.ts +18 -0
- package/dist/networks.d.ts.map +1 -0
- package/dist/networks.js +24 -0
- package/dist/networks.js.map +1 -0
- package/dist/profiles.d.ts +31 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +33 -0
- package/dist/profiles.js.map +1 -0
- package/dist/rail.d.ts +48 -0
- package/dist/rail.d.ts.map +1 -0
- package/dist/rail.js +28 -0
- package/dist/rail.js.map +1 -0
- package/dist/reasons.d.ts +173 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +174 -0
- package/dist/reasons.js.map +1 -0
- package/dist/reference-link.d.ts +23 -0
- package/dist/reference-link.d.ts.map +1 -0
- package/dist/reference-link.js +56 -0
- package/dist/reference-link.js.map +1 -0
- package/dist/references.d.ts +125 -0
- package/dist/references.d.ts.map +1 -0
- package/dist/references.js +108 -0
- package/dist/references.js.map +1 -0
- package/dist/replay.d.ts +30 -0
- package/dist/replay.d.ts.map +1 -0
- package/dist/replay.js +27 -0
- package/dist/replay.js.map +1 -0
- package/dist/sandbox-registration.d.ts +200 -0
- package/dist/sandbox-registration.d.ts.map +1 -0
- package/dist/sandbox-registration.js +172 -0
- package/dist/sandbox-registration.js.map +1 -0
- package/dist/sandbox.d.ts +3478 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +316 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/session-fields.d.ts +203 -0
- package/dist/session-fields.d.ts.map +1 -0
- package/dist/session-fields.js +43 -0
- package/dist/session-fields.js.map +1 -0
- package/dist/supplier-adapter.d.ts +65 -0
- package/dist/supplier-adapter.d.ts.map +1 -0
- package/dist/supplier-adapter.js +91 -0
- package/dist/supplier-adapter.js.map +1 -0
- package/dist/terms-v1.d.ts +74 -0
- package/dist/terms-v1.d.ts.map +1 -0
- package/dist/terms-v1.js +156 -0
- package/dist/terms-v1.js.map +1 -0
- package/dist/terms.d.ts +341 -0
- package/dist/terms.d.ts.map +1 -0
- package/dist/terms.js +715 -0
- package/dist/terms.js.map +1 -0
- package/dist/test-customer.d.ts +1525 -0
- package/dist/test-customer.d.ts.map +1 -0
- package/dist/test-customer.js +260 -0
- package/dist/test-customer.js.map +1 -0
- package/dist/types.d.ts +272 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +51 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +66 -0
- package/dist/version.js.map +1 -0
- package/dist/wire.d.ts +2698 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +678 -0
- package/dist/wire.js.map +1 -0
- package/package.json +37 -3
- package/vectors/api-request-v1.json +53 -0
- package/vectors/contest-statement-v1.json +42 -0
- package/vectors/terms-v2.json +398 -0
- package/vectors/terms-v3.json +2103 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAc,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAsC,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAGpF,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAE1D,OAAO,EAEL,KAAK,WAAW,EAGhB,KAAK,YAAY,EAGlB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,M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EVENT_SCHEMAS, AGENT_SESSION_EVENT_TYPES, } from './agent-session.js';
|
|
4
|
+
import { isApiAudience } from './api-request.js';
|
|
5
|
+
import { JOB_EVENT_SCHEMAS, JOB_EVENT_TYPES } from './job-session.js';
|
|
6
|
+
import { address, bytes32, u256 } from './json-fields.js';
|
|
7
|
+
import { isTestnetChain } from './networks.js';
|
|
8
|
+
import { describeReason } from './reasons.js';
|
|
9
|
+
import { commitmentReferenceJson } from './references.js';
|
|
10
|
+
import { AGENT_SOURCES, agentSourceJson, REFUSAL_LAYERS, reasonCodeJson, runJson, } from './session-fields.js';
|
|
11
|
+
/**
|
|
12
|
+
* Avow's sandbox on testnet. A developer's machine registers a sandbox business, which Avow pays
|
|
13
|
+
* in test dollars, and reports what the business's agent does to a session. A screen at the
|
|
14
|
+
* session's link shows each event as it arrives, relayed through Avow's API.
|
|
15
|
+
*/
|
|
16
|
+
/** A session id: 16 random bytes as 32 lower-case hex characters, which no one can guess. */
|
|
17
|
+
const SESSION_ID = /^[0-9a-f]{32}$/;
|
|
18
|
+
/** Whether text is a session id, the only form a session's path and link carry. */
|
|
19
|
+
export const isSessionId = (text) => SESSION_ID.test(text);
|
|
20
|
+
/** A new session id from the platform's random source. */
|
|
21
|
+
export function newSessionId() {
|
|
22
|
+
return Array.from(crypto.getRandomValues(new Uint8Array(16)), (b) => b.toString(16).padStart(2, '0')).join('');
|
|
23
|
+
}
|
|
24
|
+
/** Where a sandbox business and a sandbox supplier register, and where a session's events go. */
|
|
25
|
+
/**
|
|
26
|
+
* The id Avow gives a sandbox business, made from its account: `sandbox-` and the account's
|
|
27
|
+
* address in lowercase hex. So an agent that knows the id knows the account, and from the factory
|
|
28
|
+
* the lock, with nothing to look up.
|
|
29
|
+
*/
|
|
30
|
+
export const sandboxBusinessId = (account) => `sandbox-${account.slice(2).toLowerCase()}`;
|
|
31
|
+
/** The account a sandbox business id was made from, or null when it isn't one. */
|
|
32
|
+
export function accountOfSandboxId(businessId) {
|
|
33
|
+
const match = /^sandbox-([0-9a-f]{40})$/.exec(businessId.trim());
|
|
34
|
+
return match ? getAddress(`0x${match[1]}`) : null;
|
|
35
|
+
}
|
|
36
|
+
const mailboxOrderId = (orderId) => {
|
|
37
|
+
if (!/^[0-9a-f]{32}$/.test(orderId))
|
|
38
|
+
throw new RangeError(`${orderId} isn't an order id`);
|
|
39
|
+
return orderId;
|
|
40
|
+
};
|
|
41
|
+
export const SANDBOX_PATHS = {
|
|
42
|
+
businesses: '/v1/sandbox/businesses',
|
|
43
|
+
suppliers: '/v1/sandbox/suppliers',
|
|
44
|
+
/** The profile Avow registered for a sandbox business, which anyone may read. */
|
|
45
|
+
supplier: (businessId) => {
|
|
46
|
+
if (!/^[A-Za-z0-9_-]{1,100}$/.test(businessId)) {
|
|
47
|
+
throw new RangeError(`${businessId} isn't a business id`);
|
|
48
|
+
}
|
|
49
|
+
return `/v1/sandbox/suppliers/${businessId}`;
|
|
50
|
+
},
|
|
51
|
+
/** Where an agent asks a business for authority, and asks again to hear the answer. */
|
|
52
|
+
agentRequests: '/v1/sandbox/agent-requests',
|
|
53
|
+
/** Where the business's console sends the administrator's approval of one agent's request. */
|
|
54
|
+
agentApproval: (agentKey) => `/v1/sandbox/agent-requests/${agentKey.toLowerCase()}/approval`,
|
|
55
|
+
/** Where a buyer's agent sends an order to another business. */
|
|
56
|
+
mailboxOrders: '/v1/sandbox/mailbox/orders',
|
|
57
|
+
/** Where a supplier's agent reads the orders waiting on it. */
|
|
58
|
+
mailboxInbox: '/v1/sandbox/mailbox/inbox',
|
|
59
|
+
/** Where either side reads one order. */
|
|
60
|
+
mailboxOrder: (orderId) => `/v1/sandbox/mailbox/orders/${mailboxOrderId(orderId)}`,
|
|
61
|
+
/** Where the supplier's agent sends its quote. */
|
|
62
|
+
mailboxQuote: (orderId) => `/v1/sandbox/mailbox/orders/${mailboxOrderId(orderId)}/quote`,
|
|
63
|
+
/** Where the buyer's agent says its reserve landed. */
|
|
64
|
+
mailboxReserved: (orderId) => `/v1/sandbox/mailbox/orders/${mailboxOrderId(orderId)}/reserved`,
|
|
65
|
+
/** Where the supplier's agent says its acceptance landed. */
|
|
66
|
+
mailboxAccepted: (orderId) => `/v1/sandbox/mailbox/orders/${mailboxOrderId(orderId)}/accepted`,
|
|
67
|
+
sessionEvents: (sessionId) => {
|
|
68
|
+
if (!isSessionId(sessionId))
|
|
69
|
+
throw new RangeError(`${sessionId} isn't a session id`);
|
|
70
|
+
return `/v1/sandbox/sessions/${sessionId}/events`;
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
/** Where the sandbox's screen publishes the facts of the deployment it runs against. */
|
|
74
|
+
export const SANDBOX_DEPLOYMENT_PATH = '/config.json';
|
|
75
|
+
const origin = z.string().refine(isApiAudience, 'an http or https origin, with no path');
|
|
76
|
+
/** The deployment's facts as the screen publishes them. Fields a client doesn't use are left out. */
|
|
77
|
+
export const sandboxDeploymentJson = z.object({
|
|
78
|
+
chainId: z.number().int().refine(isTestnetChain, 'a testnet chain'),
|
|
79
|
+
rpcUrl: z.url({ protocol: /^https?$/ }),
|
|
80
|
+
apiUrl: origin,
|
|
81
|
+
supplierUrl: origin,
|
|
82
|
+
customerUrl: origin.optional(),
|
|
83
|
+
factory: address,
|
|
84
|
+
token: address,
|
|
85
|
+
arbiter: address,
|
|
86
|
+
day90SupplierShareBps: z.number().int().min(0).max(10_000),
|
|
87
|
+
});
|
|
88
|
+
/** Reads the deployment's facts, refusing any chain that isn't a testnet. */
|
|
89
|
+
export function parseSandboxDeployment(json) {
|
|
90
|
+
const parsed = sandboxDeploymentJson.safeParse(json);
|
|
91
|
+
return parsed.success
|
|
92
|
+
? {
|
|
93
|
+
ok: true,
|
|
94
|
+
value: {
|
|
95
|
+
chainId: parsed.data.chainId,
|
|
96
|
+
rpcUrl: parsed.data.rpcUrl,
|
|
97
|
+
apiUrl: parsed.data.apiUrl,
|
|
98
|
+
supplierUrl: parsed.data.supplierUrl,
|
|
99
|
+
...(parsed.data.customerUrl === undefined
|
|
100
|
+
? {}
|
|
101
|
+
: { customerUrl: parsed.data.customerUrl }),
|
|
102
|
+
factory: parsed.data.factory,
|
|
103
|
+
token: parsed.data.token,
|
|
104
|
+
arbiter: parsed.data.arbiter,
|
|
105
|
+
day90SupplierShareBps: parsed.data.day90SupplierShareBps,
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
: { ok: false, reason: 'message.invalid' };
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Who made an event. `business` is the runner, which alone holds the business's root key and
|
|
112
|
+
* changes the authority, so it marks `authority_changed` and no other event. `script` is the
|
|
113
|
+
* developer's agent file, `mcp` is the agent a model drives through the sandbox's MCP server, and
|
|
114
|
+
* `session` is the developer's agent session. Each acts with only the agent's key, and every other
|
|
115
|
+
* event names one of them. So the source follows from the event's type, and no event the agent's
|
|
116
|
+
* key signs can claim the business.
|
|
117
|
+
*/
|
|
118
|
+
export const SESSION_SOURCES = ['business', ...AGENT_SOURCES];
|
|
119
|
+
/** The tools the sandbox's MCP server gives a model. */
|
|
120
|
+
export const SANDBOX_TOOLS = ['authority', 'book', 'commitments'];
|
|
121
|
+
export const SESSION_EVENT_TYPES = [
|
|
122
|
+
'run_started',
|
|
123
|
+
'authority_changed',
|
|
124
|
+
'refused',
|
|
125
|
+
'committed',
|
|
126
|
+
'accepted',
|
|
127
|
+
...JOB_EVENT_TYPES,
|
|
128
|
+
...AGENT_SESSION_EVENT_TYPES,
|
|
129
|
+
];
|
|
130
|
+
const businessId = z.string().min(1).max(100);
|
|
131
|
+
const sandboxEventJson = z.discriminatedUnion('type', [
|
|
132
|
+
z.strictObject({
|
|
133
|
+
type: z.literal('run_started'),
|
|
134
|
+
run: runJson,
|
|
135
|
+
source: agentSourceJson,
|
|
136
|
+
tool: z.enum(SANDBOX_TOOLS).nullable(),
|
|
137
|
+
}),
|
|
138
|
+
z.strictObject({
|
|
139
|
+
type: z.literal('authority_changed'),
|
|
140
|
+
run: runJson,
|
|
141
|
+
source: z.literal('business'),
|
|
142
|
+
authority: u256,
|
|
143
|
+
previous: u256.nullable(),
|
|
144
|
+
suppliers: z.array(businessId).min(1).max(20),
|
|
145
|
+
mandateHash: bytes32,
|
|
146
|
+
}),
|
|
147
|
+
z.strictObject({
|
|
148
|
+
type: z.literal('refused'),
|
|
149
|
+
run: runJson,
|
|
150
|
+
source: agentSourceJson,
|
|
151
|
+
code: reasonCodeJson,
|
|
152
|
+
layer: z.enum(REFUSAL_LAYERS),
|
|
153
|
+
amounts: z.strictObject({
|
|
154
|
+
needed: u256,
|
|
155
|
+
left: u256,
|
|
156
|
+
authority: u256,
|
|
157
|
+
capPerCommitment: u256.nullable().default(null),
|
|
158
|
+
dailyLimit: u256.nullable(),
|
|
159
|
+
dailyLeft: u256.nullable(),
|
|
160
|
+
}),
|
|
161
|
+
}),
|
|
162
|
+
z.strictObject({
|
|
163
|
+
type: z.literal('committed'),
|
|
164
|
+
run: runJson,
|
|
165
|
+
source: agentSourceJson,
|
|
166
|
+
reference: commitmentReferenceJson,
|
|
167
|
+
amount: u256,
|
|
168
|
+
}),
|
|
169
|
+
z.strictObject({
|
|
170
|
+
type: z.literal('accepted'),
|
|
171
|
+
run: runJson,
|
|
172
|
+
source: agentSourceJson,
|
|
173
|
+
reference: commitmentReferenceJson,
|
|
174
|
+
}),
|
|
175
|
+
...JOB_EVENT_SCHEMAS,
|
|
176
|
+
]);
|
|
177
|
+
/** Every session event's JSON form: the sandbox's own, a job's and the agent session's. */
|
|
178
|
+
export const sessionEventJson = z.union([sandboxEventJson, ...AGENT_SESSION_EVENT_SCHEMAS]);
|
|
179
|
+
export const sessionEventPostJson = z.strictObject({ event: sessionEventJson });
|
|
180
|
+
export const sessionEventAnswerJson = z.strictObject({
|
|
181
|
+
sequence: z.number().int().positive(),
|
|
182
|
+
});
|
|
183
|
+
/** Reads one session event from its JSON form, with amounts as decimal strings. */
|
|
184
|
+
export function parseSessionEvent(json) {
|
|
185
|
+
const parsed = sessionEventJson.safeParse(json);
|
|
186
|
+
return parsed.success
|
|
187
|
+
? { ok: true, value: parsed.data }
|
|
188
|
+
: { ok: false, reason: 'message.invalid' };
|
|
189
|
+
}
|
|
190
|
+
/** Reads the body of a request that posts an event to a session, as Avow's API takes it. */
|
|
191
|
+
export function parseSessionEventPost(json) {
|
|
192
|
+
const parsed = sessionEventPostJson.safeParse(json);
|
|
193
|
+
return parsed.success
|
|
194
|
+
? { ok: true, value: parsed.data }
|
|
195
|
+
: { ok: false, reason: 'message.invalid' };
|
|
196
|
+
}
|
|
197
|
+
/** Reads Avow's answer to a posted event. */
|
|
198
|
+
export function parseSessionEventAnswer(json) {
|
|
199
|
+
const parsed = sessionEventAnswerJson.safeParse(json);
|
|
200
|
+
return parsed.success
|
|
201
|
+
? { ok: true, value: parsed.data }
|
|
202
|
+
: { ok: false, reason: 'message.invalid' };
|
|
203
|
+
}
|
|
204
|
+
/** An amount in micros as dollars, such as `$1,500` or `$12.50`. */
|
|
205
|
+
export function formatUsd(micros) {
|
|
206
|
+
const sign = micros < 0n ? '-' : '';
|
|
207
|
+
const abs = micros < 0n ? -micros : micros;
|
|
208
|
+
const whole = (abs / 1000000n).toLocaleString('en-US');
|
|
209
|
+
const fraction = abs % 1000000n;
|
|
210
|
+
if (fraction === 0n)
|
|
211
|
+
return `${sign}$${whole}`;
|
|
212
|
+
const digits = fraction.toString().padStart(6, '0').replace(/0+$/, '').padEnd(2, '0');
|
|
213
|
+
return `${sign}$${whole}.${digits}`;
|
|
214
|
+
}
|
|
215
|
+
/** Who refused, as a sentence names each layer. */
|
|
216
|
+
export const REFUSED_BY = {
|
|
217
|
+
service: 'your service.ts',
|
|
218
|
+
sdk: 'the SDK',
|
|
219
|
+
avow: 'Avow',
|
|
220
|
+
customer: "the customer's verifier",
|
|
221
|
+
supplier: 'the supplier',
|
|
222
|
+
relay: "Avow's relay",
|
|
223
|
+
lock: 'the lock',
|
|
224
|
+
keychain: "your account's keychain",
|
|
225
|
+
unknown: 'nothing on the way',
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* A refusal in plain words with its amounts, then when the same booking could pass, so the
|
|
229
|
+
* developer's terminal, a model's MCP tools and the session's screen say the same thing from the
|
|
230
|
+
* same event.
|
|
231
|
+
*/
|
|
232
|
+
export function refusalSentence(r) {
|
|
233
|
+
return `${refusalReason(r)} ${whenRetryPasses(r)}`;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* The first part of `refusalSentence`, the refusal and its amounts. A refusal by the SDK or by
|
|
237
|
+
* Avow goes on to say what the chain holds without trusting either. The lock takes no reserve
|
|
238
|
+
* without Avow's approval, and the account's keychain holds the agent's key to the daily limit the
|
|
239
|
+
* business set. The caps the lock checks are the ones Avow's approval carries, so the sentence
|
|
240
|
+
* never says the lock would refuse what Avow approved.
|
|
241
|
+
*/
|
|
242
|
+
export function refusalReason(r) {
|
|
243
|
+
const who = REFUSED_BY[r.layer];
|
|
244
|
+
const { needed, left, authority, capPerCommitment, dailyLimit, dailyLeft } = r.amounts;
|
|
245
|
+
const onChain = r.layer !== 'sdk' && r.layer !== 'avow'
|
|
246
|
+
? ''
|
|
247
|
+
: dailyLimit === null
|
|
248
|
+
? " The lock takes no reserve without Avow's approval."
|
|
249
|
+
: ` The lock takes no reserve without Avow's approval, and your agent's key moves at most ${formatUsd(dailyLimit)} a day, a limit your business set on chain.`;
|
|
250
|
+
if (r.layer === 'unknown') {
|
|
251
|
+
return `The reserve for this ${formatUsd(needed)} booking never landed, and nothing on the way said why, so no money moved.`;
|
|
252
|
+
}
|
|
253
|
+
switch (r.code) {
|
|
254
|
+
case 'keychain.over_daily_limit':
|
|
255
|
+
return `This booking needs ${formatUsd(needed)}. Your agent had ${formatUsd(left)} left of its ${formatUsd(authority)} held at once, so Avow approved it, but ${dailyLimit === null || dailyLeft === null
|
|
256
|
+
? 'that is more than its key can still move today'
|
|
257
|
+
: `its key has ${formatUsd(dailyLeft)} left of its ${formatUsd(dailyLimit)} a day`}, so ${who} refused it and no money moved. Your business set that daily limit on chain, and no approval from Avow lifts it.`;
|
|
258
|
+
case 'mandate.over_open_reserves_cap':
|
|
259
|
+
return `This booking needs ${formatUsd(needed)} and your agent has ${formatUsd(left)} left of its ${formatUsd(authority)} held at once, so ${who} refused the reserve and no money moved.${onChain}`;
|
|
260
|
+
case 'mandate.over_commitment_cap':
|
|
261
|
+
return `This booking needs ${formatUsd(needed)}, more than ${capPerCommitment === null ? 'your mandate allows' : `the ${formatUsd(capPerCommitment)} your mandate allows`} for one commitment, so ${who} refused the reserve and no money moved.${onChain}`;
|
|
262
|
+
default:
|
|
263
|
+
return `${who.charAt(0).toUpperCase()}${who.slice(1)} refused this ${formatUsd(needed)} booking and no money moved. ${describeReason(r.code)}.${onChain}`;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/** The codes Avow's relay gives when it's only short of time or budget for now. */
|
|
267
|
+
const RELAY_FOR_NOW = [
|
|
268
|
+
'sponsorship.rate_limited',
|
|
269
|
+
'sponsorship.budget_spent',
|
|
270
|
+
'service.unavailable',
|
|
271
|
+
'request.in_progress',
|
|
272
|
+
];
|
|
273
|
+
/**
|
|
274
|
+
* When the same booking could pass, said as plainly as the refusal. Held reserves come back as
|
|
275
|
+
* their bookings release or are cancelled, the key's daily limit starts again each day, and the
|
|
276
|
+
* relay can be short of time or budget for a while. Anything else in the mandate changes only when
|
|
277
|
+
* the business signs a new one, and a refusal nothing explained might not come again.
|
|
278
|
+
*/
|
|
279
|
+
export function whenRetryPasses(r) {
|
|
280
|
+
if (r.layer === 'unknown') {
|
|
281
|
+
return 'The same booking might pass if you try again.';
|
|
282
|
+
}
|
|
283
|
+
if (r.layer === 'keychain') {
|
|
284
|
+
return "The same booking can pass once the key's day starts again, or once the business raises the daily limit on chain. Reserves cancelled today still count until then.";
|
|
285
|
+
}
|
|
286
|
+
if (r.layer === 'service') {
|
|
287
|
+
return r.code === 'service.compute_off'
|
|
288
|
+
? 'The same booking can pass once the compute switch in service.ts is on again.'
|
|
289
|
+
: 'The same booking can pass once service.ts allows it, such as with a compute budget that covers the rate.';
|
|
290
|
+
}
|
|
291
|
+
if (r.layer === 'customer') {
|
|
292
|
+
return "The customer's verifier gives the same answer until what it checked changes.";
|
|
293
|
+
}
|
|
294
|
+
if (r.layer === 'supplier') {
|
|
295
|
+
return 'The supplier gives the same answer until its limits allow the booking, such as once one of its open bookings ends.';
|
|
296
|
+
}
|
|
297
|
+
if (r.layer === 'relay') {
|
|
298
|
+
if (r.code === 'sponsorship.altered') {
|
|
299
|
+
return 'Nothing was sent, so the same booking can pass when you try again.';
|
|
300
|
+
}
|
|
301
|
+
return RELAY_FOR_NOW.includes(r.code)
|
|
302
|
+
? "Avow's relay was only limiting how much it takes for now, so the same booking can pass when you try again later."
|
|
303
|
+
: "Avow's relay refuses the same transaction again, so the same booking can pass only once what it checked changes.";
|
|
304
|
+
}
|
|
305
|
+
if (RELAY_FOR_NOW.includes(r.code)) {
|
|
306
|
+
return 'Avow was busy or out of reach, so the same booking can pass when you try again later.';
|
|
307
|
+
}
|
|
308
|
+
if (r.code === 'mandate.over_open_reserves_cap') {
|
|
309
|
+
return 'The same booking can pass once enough of what the agent holds is released, when a booking ends or is cancelled, or once the business raises the authority.';
|
|
310
|
+
}
|
|
311
|
+
if (r.code.startsWith('mandate.')) {
|
|
312
|
+
return 'The same booking can pass only once the business signs a new mandate that allows it.';
|
|
313
|
+
}
|
|
314
|
+
return 'The same booking gets the same answer until what was checked changes.';
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=sandbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAY,MAAM,MAAM,CAAA;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAE1B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EA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C,CAAC,0GAA0G,CAAA;IAChH,CAAC;IACD,IAAI,CAAC,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QAC3B,OAAO,8EAA8E,CAAA;IACvF,CAAC;IACD,IAAI,CAAC,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QAC3B,OAAO,oHAAoH,CAAA;IAC7H,CAAC;IACD,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;YACrC,OAAO,oEAAoE,CAAA;QAC7E,CAAC;QACD,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;YACnC,CAAC,CAAC,kHAAkH;YACpH,CAAC,CAAC,kHAAkH,CAAA;IACxH,CAAC;IACD,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,OAAO,uFAAuF,CAAA;IAChG,CAAC;IACD,IAAI,CAAC,CAAC,IAAI,KAAK,gCAAgC,EAAE,CAAC;QAChD,OAAO,4JAA4J,CAAA;IACrK,CAAC;IACD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,OAAO,sFAAsF,CAAA;IAC/F,CAAC;IACD,OAAO,uEAAuE,CAAA;AAChF,CAAC"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The fields every session event shares, in one place so the sandbox's events and a job's events
|
|
4
|
+
* read them the same way.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The sources that act with only the agent's key. `script` is the developer's agent file, `mcp` a
|
|
8
|
+
* model driving the sandbox's MCP server, and `session` the developer's agent session, where a
|
|
9
|
+
* model, or the scripted fixture, takes jobs through the job tools.
|
|
10
|
+
*/
|
|
11
|
+
export declare const AGENT_SOURCES: readonly ['script', 'mcp', 'session'];
|
|
12
|
+
export type AgentSource = (typeof AGENT_SOURCES)[number];
|
|
13
|
+
/**
|
|
14
|
+
* Who refused. `service` is the developer's own policy in `service.ts`, which the session's tool
|
|
15
|
+
* layer applies before anything is signed. `sdk` is the agent's own SDK, which checks the mandate
|
|
16
|
+
* before anyone signs. `avow` is Avow's API, which checks the mandate against what the lock holds
|
|
17
|
+
* before it approves a reserve. `customer` is the customer's verifier, which checks a quote before
|
|
18
|
+
* the customer commits. `supplier` is the supplier the agent books with, which can decline to sign
|
|
19
|
+
* the agreement or never accept the reserve. `relay` is Avow's relay, which refuses to pay the fee
|
|
20
|
+
* for a transaction it won't sponsor, or can't be reached. `lock` is a lock on-chain, which reverts
|
|
21
|
+
* a reserve that breaks Avow's approval, including the caps the approval carries, whether the
|
|
22
|
+
* revert lands or shows while the node prepares the transaction. `keychain` is the business
|
|
23
|
+
* account's keychain, which holds the agent's key to the daily limit the business's root key set.
|
|
24
|
+
* `unknown` is a transaction whose fate nobody gave: it expired in no block, the node never took
|
|
25
|
+
* it, or the node wouldn't give its latest block.
|
|
26
|
+
*/
|
|
27
|
+
export declare const REFUSAL_LAYERS: readonly ['service', 'sdk', 'avow', 'customer', 'supplier', 'relay', 'lock', 'keychain', 'unknown'];
|
|
28
|
+
export type RefusalLayer = (typeof REFUSAL_LAYERS)[number];
|
|
29
|
+
/** Which run of the agent an event belongs to, counting from 1. */
|
|
30
|
+
export declare const runJson: z.ZodNumber;
|
|
31
|
+
export declare const agentSourceJson: z.ZodEnum<{
|
|
32
|
+
mcp: "mcp";
|
|
33
|
+
script: "script";
|
|
34
|
+
session: "session";
|
|
35
|
+
}>;
|
|
36
|
+
/** A reason code this package knows. */
|
|
37
|
+
export declare const reasonCodeJson: z.ZodEnum<{
|
|
38
|
+
"administrator.no_authority": "administrator.no_authority";
|
|
39
|
+
"agent.key_mismatch": "agent.key_mismatch";
|
|
40
|
+
"agent.revoked": "agent.revoked";
|
|
41
|
+
"agreement.parties_mismatch": "agreement.parties_mismatch";
|
|
42
|
+
"approval.charges_mismatch": "approval.charges_mismatch";
|
|
43
|
+
"approval.commitment_mismatch": "approval.commitment_mismatch";
|
|
44
|
+
"approval.dispute_mismatch": "approval.dispute_mismatch";
|
|
45
|
+
"approval.human_invalid": "approval.human_invalid";
|
|
46
|
+
"approval.human_required": "approval.human_required";
|
|
47
|
+
"approval.mandate_mismatch": "approval.mandate_mismatch";
|
|
48
|
+
"approval.parties_mismatch": "approval.parties_mismatch";
|
|
49
|
+
"approval.terms_mismatch": "approval.terms_mismatch";
|
|
50
|
+
approved: "approved";
|
|
51
|
+
"authorization.accept_by_passed": "authorization.accept_by_passed";
|
|
52
|
+
"authorization.buyer_mismatch": "authorization.buyer_mismatch";
|
|
53
|
+
"authorization.commitment_mismatch": "authorization.commitment_mismatch";
|
|
54
|
+
"authorization.mandate_mismatch": "authorization.mandate_mismatch";
|
|
55
|
+
"authorization.payee_mismatch": "authorization.payee_mismatch";
|
|
56
|
+
"authorization.terms_mismatch": "authorization.terms_mismatch";
|
|
57
|
+
"authorization.token_not_accepted": "authorization.token_not_accepted";
|
|
58
|
+
"business.test_data": "business.test_data";
|
|
59
|
+
"business.unknown": "business.unknown";
|
|
60
|
+
"business.unverified": "business.unverified";
|
|
61
|
+
"chain.acceptance_reverted": "chain.acceptance_reverted";
|
|
62
|
+
"chain.agent_key_inactive": "chain.agent_key_inactive";
|
|
63
|
+
"chain.approval_mismatch": "chain.approval_mismatch";
|
|
64
|
+
"chain.cancel_reverted": "chain.cancel_reverted";
|
|
65
|
+
"chain.lock_timing_unexpected": "chain.lock_timing_unexpected";
|
|
66
|
+
"chain.lock_unknown": "chain.lock_unknown";
|
|
67
|
+
"chain.mandate_mismatch": "chain.mandate_mismatch";
|
|
68
|
+
"chain.report_reverted": "chain.report_reverted";
|
|
69
|
+
"chain.reserve_accepted": "chain.reserve_accepted";
|
|
70
|
+
"chain.reserve_mismatch": "chain.reserve_mismatch";
|
|
71
|
+
"chain.reserve_missing": "chain.reserve_missing";
|
|
72
|
+
"chain.supplier_mismatch": "chain.supplier_mismatch";
|
|
73
|
+
"commitment.cancel_closed": "commitment.cancel_closed";
|
|
74
|
+
"commitment.cancel_on_lock": "commitment.cancel_on_lock";
|
|
75
|
+
"commitment.ended": "commitment.ended";
|
|
76
|
+
"commitment.unknown": "commitment.unknown";
|
|
77
|
+
"consent.count_out_of_range": "consent.count_out_of_range";
|
|
78
|
+
"consent.count_passed": "consent.count_passed";
|
|
79
|
+
"consent.not_releasable": "consent.not_releasable";
|
|
80
|
+
"contest.already_contested": "contest.already_contested";
|
|
81
|
+
"contest.not_contestable": "contest.not_contestable";
|
|
82
|
+
"contest.not_on_chain": "contest.not_on_chain";
|
|
83
|
+
"contest.reason_not_for_charge": "contest.reason_not_for_charge";
|
|
84
|
+
"contest.statement_invalid": "contest.statement_invalid";
|
|
85
|
+
"contest.statement_mismatch": "contest.statement_mismatch";
|
|
86
|
+
"contest.window_closed": "contest.window_closed";
|
|
87
|
+
"dependency.cancellable": "dependency.cancellable";
|
|
88
|
+
"dependency.charge_pending": "dependency.charge_pending";
|
|
89
|
+
"dependency.disclosure_invalid": "dependency.disclosure_invalid";
|
|
90
|
+
"dependency.does_not_fit": "dependency.does_not_fit";
|
|
91
|
+
"dependency.elided": "dependency.elided";
|
|
92
|
+
"dependency.ended": "dependency.ended";
|
|
93
|
+
"dependency.lock_unknown": "dependency.lock_unknown";
|
|
94
|
+
"dependency.not_accepted": "dependency.not_accepted";
|
|
95
|
+
"dependency.not_found": "dependency.not_found";
|
|
96
|
+
"dependency.not_owned": "dependency.not_owned";
|
|
97
|
+
"dependency.required": "dependency.required";
|
|
98
|
+
"dependency.self_supplied": "dependency.self_supplied";
|
|
99
|
+
"dependency.stale": "dependency.stale";
|
|
100
|
+
"dependency.terms_mismatch": "dependency.terms_mismatch";
|
|
101
|
+
"dependency.unreadable": "dependency.unreadable";
|
|
102
|
+
"dependency.unrecorded": "dependency.unrecorded";
|
|
103
|
+
"keychain.over_daily_limit": "keychain.over_daily_limit";
|
|
104
|
+
"mandate.action_not_permitted": "mandate.action_not_permitted";
|
|
105
|
+
"mandate.ap2_mismatch": "mandate.ap2_mismatch";
|
|
106
|
+
"mandate.category_not_allowed": "mandate.category_not_allowed";
|
|
107
|
+
"mandate.currency_not_allowed": "mandate.currency_not_allowed";
|
|
108
|
+
"mandate.ends_before_window": "mandate.ends_before_window";
|
|
109
|
+
"mandate.expired": "mandate.expired";
|
|
110
|
+
"mandate.invalid": "mandate.invalid";
|
|
111
|
+
"mandate.missing": "mandate.missing";
|
|
112
|
+
"mandate.over_commitment_cap": "mandate.over_commitment_cap";
|
|
113
|
+
"mandate.over_open_reserves_cap": "mandate.over_open_reserves_cap";
|
|
114
|
+
"mandate.over_payment_limit": "mandate.over_payment_limit";
|
|
115
|
+
"mandate.revoked": "mandate.revoked";
|
|
116
|
+
"mandate.signature_invalid": "mandate.signature_invalid";
|
|
117
|
+
"mandate.supplier_not_allowed": "mandate.supplier_not_allowed";
|
|
118
|
+
"mandate.token_not_allowed": "mandate.token_not_allowed";
|
|
119
|
+
"message.expired": "message.expired";
|
|
120
|
+
"message.invalid": "message.invalid";
|
|
121
|
+
"message.replayed": "message.replayed";
|
|
122
|
+
"message.schema_unknown": "message.schema_unknown";
|
|
123
|
+
"message.signature_invalid": "message.signature_invalid";
|
|
124
|
+
"message.signer_unknown": "message.signer_unknown";
|
|
125
|
+
"message.validity_too_long": "message.validity_too_long";
|
|
126
|
+
"message.wrong_chain": "message.wrong_chain";
|
|
127
|
+
"message.wrong_contract": "message.wrong_contract";
|
|
128
|
+
"order.commitment_mismatch": "order.commitment_mismatch";
|
|
129
|
+
"order.limit_reached": "order.limit_reached";
|
|
130
|
+
"order.out_of_step": "order.out_of_step";
|
|
131
|
+
"order.supplier_mismatch": "order.supplier_mismatch";
|
|
132
|
+
"order.terms_changed": "order.terms_changed";
|
|
133
|
+
"order.unknown": "order.unknown";
|
|
134
|
+
"payment.amount_mismatch": "payment.amount_mismatch";
|
|
135
|
+
"payment.attributed_twice": "payment.attributed_twice";
|
|
136
|
+
"payment.failed": "payment.failed";
|
|
137
|
+
"payment.memo_mismatch": "payment.memo_mismatch";
|
|
138
|
+
"payment.not_final": "payment.not_final";
|
|
139
|
+
"payment.not_found": "payment.not_found";
|
|
140
|
+
"payment.not_memo_transfer": "payment.not_memo_transfer";
|
|
141
|
+
"payment.recipient_mismatch": "payment.recipient_mismatch";
|
|
142
|
+
"payment.sender_mismatch": "payment.sender_mismatch";
|
|
143
|
+
"payment.token_mismatch": "payment.token_mismatch";
|
|
144
|
+
"payment.token_not_accepted": "payment.token_not_accepted";
|
|
145
|
+
"reference.commitment_mismatch": "reference.commitment_mismatch";
|
|
146
|
+
"reference.unreadable": "reference.unreadable";
|
|
147
|
+
"report.amount_invalid": "report.amount_invalid";
|
|
148
|
+
"report.kind_not_allowed": "report.kind_not_allowed";
|
|
149
|
+
"report.limit_reached": "report.limit_reached";
|
|
150
|
+
"report.not_reportable": "report.not_reportable";
|
|
151
|
+
"report.open": "report.open";
|
|
152
|
+
"report.too_early": "report.too_early";
|
|
153
|
+
"request.id_reused": "request.id_reused";
|
|
154
|
+
"request.in_progress": "request.in_progress";
|
|
155
|
+
"request.invalid": "request.invalid";
|
|
156
|
+
"request.signer_unknown": "request.signer_unknown";
|
|
157
|
+
"request.unsigned": "request.unsigned";
|
|
158
|
+
"sandbox.budget_spent": "sandbox.budget_spent";
|
|
159
|
+
"sandbox.closed": "sandbox.closed";
|
|
160
|
+
"sandbox.event_too_large": "sandbox.event_too_large";
|
|
161
|
+
"sandbox.faucet_fees_low": "sandbox.faucet_fees_low";
|
|
162
|
+
"sandbox.limit_reached": "sandbox.limit_reached";
|
|
163
|
+
"sandbox.pool_empty": "sandbox.pool_empty";
|
|
164
|
+
"sandbox.session_expired": "sandbox.session_expired";
|
|
165
|
+
"sandbox.session_full": "sandbox.session_full";
|
|
166
|
+
"sandbox.session_rate": "sandbox.session_rate";
|
|
167
|
+
"sandbox.session_taken": "sandbox.session_taken";
|
|
168
|
+
"sandbox.taken": "sandbox.taken";
|
|
169
|
+
"service.booking_required": "service.booking_required";
|
|
170
|
+
"service.cancel_declined": "service.cancel_declined";
|
|
171
|
+
"service.cancel_late": "service.cancel_late";
|
|
172
|
+
"service.check_failed": "service.check_failed";
|
|
173
|
+
"service.compute_off": "service.compute_off";
|
|
174
|
+
"service.over_budget": "service.over_budget";
|
|
175
|
+
"service.quantity_unavailable": "service.quantity_unavailable";
|
|
176
|
+
"service.unavailable": "service.unavailable";
|
|
177
|
+
"service.unknown_booking": "service.unknown_booking";
|
|
178
|
+
"service.unknown_offer": "service.unknown_offer";
|
|
179
|
+
"sponsorship.altered": "sponsorship.altered";
|
|
180
|
+
"sponsorship.budget_spent": "sponsorship.budget_spent";
|
|
181
|
+
"sponsorship.over_cap": "sponsorship.over_cap";
|
|
182
|
+
"sponsorship.rate_limited": "sponsorship.rate_limited";
|
|
183
|
+
"sponsorship.refused": "sponsorship.refused";
|
|
184
|
+
"sponsorship.simulation_failed": "sponsorship.simulation_failed";
|
|
185
|
+
"supplier.declined": "supplier.declined";
|
|
186
|
+
"supplier.not_accepted": "supplier.not_accepted";
|
|
187
|
+
"supplier.unknown": "supplier.unknown";
|
|
188
|
+
"terms.backing_unsupported": "terms.backing_unsupported";
|
|
189
|
+
"terms.category_mismatch": "terms.category_mismatch";
|
|
190
|
+
"terms.charges_invalid": "terms.charges_invalid";
|
|
191
|
+
"terms.contest_window_short": "terms.contest_window_short";
|
|
192
|
+
"terms.currency_mismatch": "terms.currency_mismatch";
|
|
193
|
+
"terms.deadlines_out_of_order": "terms.deadlines_out_of_order";
|
|
194
|
+
"terms.dispute_invalid": "terms.dispute_invalid";
|
|
195
|
+
"terms.hash_mismatch": "terms.hash_mismatch";
|
|
196
|
+
"terms.incomplete": "terms.incomplete";
|
|
197
|
+
"terms.invalid": "terms.invalid";
|
|
198
|
+
"terms.reserve_mismatch": "terms.reserve_mismatch";
|
|
199
|
+
"terms.template_invalid": "terms.template_invalid";
|
|
200
|
+
"terms.template_unknown": "terms.template_unknown";
|
|
201
|
+
"terms.version_unknown": "terms.version_unknown";
|
|
202
|
+
}>;
|
|
203
|
+
//# sourceMappingURL=session-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-fields.d.ts","sourceRoot":"","sources":["../src/session-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAAI,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAU,CAAA;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAExD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,YACzB,SAAS,EACT,KAAK,EACL,MAAM,EACN,UAAU,EACV,UAAU,EACV,OAAO,EACP,MAAM,EACN,UAAU,EACV,SAAS,CACD,CAAA;AACV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1D,mEAAmE;AACnE,eAAO,MAAM,OAAO,aAA6C,CAAA;AAEjE,eAAO,MAAM,eAAe;;;;EAAwB,CAAA;AAEpD,wCAAwC;AACxC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqE,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { REASON_CODES } from './reasons.js';
|
|
3
|
+
/**
|
|
4
|
+
* The fields every session event shares, in one place so the sandbox's events and a job's events
|
|
5
|
+
* read them the same way.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The sources that act with only the agent's key. `script` is the developer's agent file, `mcp` a
|
|
9
|
+
* model driving the sandbox's MCP server, and `session` the developer's agent session, where a
|
|
10
|
+
* model, or the scripted fixture, takes jobs through the job tools.
|
|
11
|
+
*/
|
|
12
|
+
export const AGENT_SOURCES = ['script', 'mcp', 'session'];
|
|
13
|
+
/**
|
|
14
|
+
* Who refused. `service` is the developer's own policy in `service.ts`, which the session's tool
|
|
15
|
+
* layer applies before anything is signed. `sdk` is the agent's own SDK, which checks the mandate
|
|
16
|
+
* before anyone signs. `avow` is Avow's API, which checks the mandate against what the lock holds
|
|
17
|
+
* before it approves a reserve. `customer` is the customer's verifier, which checks a quote before
|
|
18
|
+
* the customer commits. `supplier` is the supplier the agent books with, which can decline to sign
|
|
19
|
+
* the agreement or never accept the reserve. `relay` is Avow's relay, which refuses to pay the fee
|
|
20
|
+
* for a transaction it won't sponsor, or can't be reached. `lock` is a lock on-chain, which reverts
|
|
21
|
+
* a reserve that breaks Avow's approval, including the caps the approval carries, whether the
|
|
22
|
+
* revert lands or shows while the node prepares the transaction. `keychain` is the business
|
|
23
|
+
* account's keychain, which holds the agent's key to the daily limit the business's root key set.
|
|
24
|
+
* `unknown` is a transaction whose fate nobody gave: it expired in no block, the node never took
|
|
25
|
+
* it, or the node wouldn't give its latest block.
|
|
26
|
+
*/
|
|
27
|
+
export const REFUSAL_LAYERS = [
|
|
28
|
+
'service',
|
|
29
|
+
'sdk',
|
|
30
|
+
'avow',
|
|
31
|
+
'customer',
|
|
32
|
+
'supplier',
|
|
33
|
+
'relay',
|
|
34
|
+
'lock',
|
|
35
|
+
'keychain',
|
|
36
|
+
'unknown',
|
|
37
|
+
];
|
|
38
|
+
/** Which run of the agent an event belongs to, counting from 1. */
|
|
39
|
+
export const runJson = z.number().int().positive().max(1_000_000);
|
|
40
|
+
export const agentSourceJson = z.enum(AGENT_SOURCES);
|
|
41
|
+
/** A reason code this package knows. */
|
|
42
|
+
export const reasonCodeJson = z.enum(Object.keys(REASON_CODES));
|
|
43
|
+
//# sourceMappingURL=session-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-fields.js","sourceRoot":"","sources":["../src/session-fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,YAAY,EAAmB,MAAM,cAAc,CAAA;AAE5D;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAU,CAAA;AAGlE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS;IACT,KAAK;IACL,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;IACP,MAAM;IACN,UAAU;IACV,SAAS;CACD,CAAA;AAGV,mEAAmE;AACnE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;AAEpD,wCAAwC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAkC,CAAC,CAAA"}
|