@axorum/client 0.0.0-stage → 1.0.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.
Files changed (79) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +530 -2
  3. package/dist/agent-uri.d.ts +30 -0
  4. package/dist/agent-uri.d.ts.map +1 -0
  5. package/dist/agent-uri.js +218 -0
  6. package/dist/agent-uri.js.map +1 -0
  7. package/dist/authorize.d.ts +671 -0
  8. package/dist/authorize.d.ts.map +1 -0
  9. package/dist/authorize.js +947 -0
  10. package/dist/authorize.js.map +1 -0
  11. package/dist/capabilities.d.ts +30 -0
  12. package/dist/capabilities.d.ts.map +1 -0
  13. package/dist/capabilities.js +40 -0
  14. package/dist/capabilities.js.map +1 -0
  15. package/dist/chart.d.ts +74 -0
  16. package/dist/chart.d.ts.map +1 -0
  17. package/dist/chart.js +107 -0
  18. package/dist/chart.js.map +1 -0
  19. package/dist/client.d.ts +644 -0
  20. package/dist/client.d.ts.map +1 -0
  21. package/dist/client.js +1302 -0
  22. package/dist/client.js.map +1 -0
  23. package/dist/errors.d.ts +646 -0
  24. package/dist/errors.d.ts.map +1 -0
  25. package/dist/errors.js +928 -0
  26. package/dist/errors.js.map +1 -0
  27. package/dist/failover.d.ts +197 -0
  28. package/dist/failover.d.ts.map +1 -0
  29. package/dist/failover.js +289 -0
  30. package/dist/failover.js.map +1 -0
  31. package/dist/freshness.d.ts +65 -0
  32. package/dist/freshness.d.ts.map +1 -0
  33. package/dist/freshness.js +148 -0
  34. package/dist/freshness.js.map +1 -0
  35. package/dist/generated/agent-plane.d.ts +1863 -0
  36. package/dist/generated/agent-plane.d.ts.map +1 -0
  37. package/dist/generated/agent-plane.js +19 -0
  38. package/dist/generated/agent-plane.js.map +1 -0
  39. package/dist/idempotency.d.ts +160 -0
  40. package/dist/idempotency.d.ts.map +1 -0
  41. package/dist/idempotency.js +208 -0
  42. package/dist/idempotency.js.map +1 -0
  43. package/dist/index.d.ts +89 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +87 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/intent.d.ts +163 -0
  48. package/dist/intent.d.ts.map +1 -0
  49. package/dist/intent.js +82 -0
  50. package/dist/intent.js.map +1 -0
  51. package/dist/json.d.ts +49 -0
  52. package/dist/json.d.ts.map +1 -0
  53. package/dist/json.js +259 -0
  54. package/dist/json.js.map +1 -0
  55. package/dist/key.d.ts +64 -0
  56. package/dist/key.d.ts.map +1 -0
  57. package/dist/key.js +71 -0
  58. package/dist/key.js.map +1 -0
  59. package/dist/payment.d.ts +172 -0
  60. package/dist/payment.d.ts.map +1 -0
  61. package/dist/payment.js +178 -0
  62. package/dist/payment.js.map +1 -0
  63. package/dist/refusal.d.ts +121 -0
  64. package/dist/refusal.d.ts.map +1 -0
  65. package/dist/refusal.js +176 -0
  66. package/dist/refusal.js.map +1 -0
  67. package/dist/retry.d.ts +215 -0
  68. package/dist/retry.d.ts.map +1 -0
  69. package/dist/retry.js +297 -0
  70. package/dist/retry.js.map +1 -0
  71. package/dist/typeid.d.ts +64 -0
  72. package/dist/typeid.d.ts.map +1 -0
  73. package/dist/typeid.js +119 -0
  74. package/dist/typeid.js.map +1 -0
  75. package/dist/types.d.ts +245 -0
  76. package/dist/types.d.ts.map +1 -0
  77. package/dist/types.js +14 -0
  78. package/dist/types.js.map +1 -0
  79. package/package.json +58 -3
@@ -0,0 +1,245 @@
1
+ /**
2
+ * The wire contract, given names.
3
+ *
4
+ * Every type here is an alias into `src/generated/agent-plane.ts`, which is generated
5
+ * from the frozen OpenAPI spec. The aliases exist so that a caller writes
6
+ * `IntentEnvelope` rather than `components["schemas"]["IntentEnvelope"]`; they add no
7
+ * shape of their own, and they **rename nothing** — `snake_case` on the wire is
8
+ * `snake_case` here. A second vocabulary would be a second thing to keep in sync, and
9
+ * the frozen contract is the one that wins.
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ import type { components } from "./generated/agent-plane.js";
14
+ /**
15
+ * What an agent submits: identity (`agent` + `attestation`), the accounting view
16
+ * (`entries`), the deontic view (`action`), the policy pin, external `evidence`, and
17
+ * the agent's `justification`.
18
+ *
19
+ * Build one with {@link pinIntent} from an {@link IntentDraft} rather than by hand —
20
+ * the `policy` pin is a claim about the *service's* state, not the agent's, and
21
+ * getting it wrong is a `409`.
22
+ *
23
+ * The contract's type with `minted_at_ms` required: every envelope carries the time its transaction id was minted, so the service ages the
24
+ * key on its own clock; {@link pinIntent} stamps it, and {@link AxorumClient.submitIntent}
25
+ * refuses an envelope without it.
26
+ */
27
+ export type IntentEnvelope = components["schemas"]["IntentEnvelope"] & {
28
+ minted_at_ms: bigint;
29
+ };
30
+ /**
31
+ * What the ledger answers with — the outcome typology.
32
+ *
33
+ * **A refusal lives in here, not in an error.** If the policy in force forbids the
34
+ * action, this arrives on a `200` with `posted: false` and
35
+ * `verdict: "ForbiddenRejected"`: the intent reached the commit point, was judged, and
36
+ * the refusal was *recorded*. That record is the product. Branch on
37
+ * `posted`/`verdict`, never on a status code.
38
+ */
39
+ export type AgentOutcome = components["schemas"]["AgentOutcome"];
40
+ /**
41
+ * The service's idempotency window (contract 5.0.0): how long a committed transaction
42
+ * id answers a retry with the original outcome.
43
+ *
44
+ * Not a document in the contract: the service states it in three response headers on
45
+ * `GET /api/openapi.json` ({@link IDEMPOTENCY_WINDOW_HEADERS}), and
46
+ * {@link AxorumClient.idempotencyWindow} reads them into this shape.
47
+ *
48
+ * `window_ticks` is the window in server ticks; `window_seconds` its wall-clock length,
49
+ * rounded down, or `null` when the heartbeat is disabled; `capacity` how many ids the
50
+ * service holds before it refuses new commits `507`. Every figure is a `bigint`, because
51
+ * the service may state any count up to `2^64 - 1`. Past the window a resubmission is
52
+ * refused `409 stale_idempotency_key`. See {@link ensureFresh}.
53
+ */
54
+ export interface IdempotencyWindow {
55
+ /** How many committed ids the index holds before it refuses new commits `507`. */
56
+ readonly capacity: bigint;
57
+ /** The window's wall-clock length in whole seconds, or `null` when the heartbeat is disabled. */
58
+ readonly window_seconds: bigint | null;
59
+ /** The window in server ticks. */
60
+ readonly window_ticks: bigint;
61
+ }
62
+ /**
63
+ * Why a refused intent was refused (contract 5.0.0): present on an
64
+ * {@link AgentOutcome} exactly when `posted` is `false`, absent otherwise.
65
+ *
66
+ * A stable `code` (an open vocabulary, see {@link REFUSAL_CODES}), the `rule` behind
67
+ * it when there is one, and a plain-English `explanation` that says what to do next.
68
+ * A `forbidden_by_rule` refusal also carries the guard `conditions` that held and the
69
+ * exact `figures` they compared; any refusal may carry the norms their own exceptions
70
+ * `set_aside`. Every list is absent when empty. Branch on `code`; for policy-specific
71
+ * reasons, branch on `rule.name`, which you declared.
72
+ *
73
+ * Not signed: the receipt signs the provenance and the policy hash, and the refusal is
74
+ * derived from them. Read it with {@link refusalOf}.
75
+ */
76
+ export type Refusal = components["schemas"]["Refusal"];
77
+ /**
78
+ * The rule that refused an intent: its `id`, and its `name` as declared in the policy
79
+ * that judged the intent (absent when the service could not read that policy's source).
80
+ */
81
+ export type RefusingRule = components["schemas"]["RefusingRule"];
82
+ /**
83
+ * One clause of a refusing forbid's guard and the literal that satisfied it. `kind` is
84
+ * an open vocabulary (see {@link CONDITION_KINDS}); `figure` indexes
85
+ * {@link Refusal}`.figures`, read it with {@link figureOf}.
86
+ */
87
+ export type Condition = components["schemas"]["Condition"];
88
+ /**
89
+ * One exact comparison a refusing forbid's guard made. `current`, `attempted`,
90
+ * `compared`, `limit` and `headroom` are **`bigint`** minor units of `currency`, exact
91
+ * at any magnitude (see {@link Amount}). `headroom` is the largest `attempted` that
92
+ * would have cleared this comparison; zero or negative means no amount does.
93
+ *
94
+ * `current`, `compared` and `headroom` are `undefined` when the service **withheld**
95
+ * them: the wire omits the key, never `null` or `0`, so `undefined` means "not
96
+ * disclosed", never zero. Test with `=== undefined` rather than truthiness, which
97
+ * would also swallow a real `0n`. `attempted`, `limit` and `held` are always present.
98
+ *
99
+ * The service discloses them only on the acting party's own `per_party` cell and on
100
+ * the agent's own mandate (the one charged or, on a refusal, the bound mandate the cap
101
+ * was evaluated against). It withholds them on a `global` cap, on every other register
102
+ * scope (a named counterparty keeps its `display_name`), on another party's mandate,
103
+ * and on a non-spend intent's own mandate.
104
+ */
105
+ export type Figure = components["schemas"]["Figure"];
106
+ /** The window a register figure accumulates over: `kind`, and `ticks` unless unbounded. */
107
+ export type FigureWindow = components["schemas"]["FigureWindow"];
108
+ /** The counterparty cell a counterparty-scoped register read resolved to. */
109
+ export type FigureCounterparty = components["schemas"]["FigureCounterparty"];
110
+ /** A norm its own `unless` clause set aside for this intent. */
111
+ export type SetAside = components["schemas"]["SetAside"];
112
+ /**
113
+ * A detached-payload signature envelope — `axorum.evidence.v0` (contract 4.1.0).
114
+ *
115
+ * The base64 `payload` carries the **exact** signed bytes (for a receipt: the
116
+ * compact `axorum.receipt.v0` JSON), so verification needs nothing but this
117
+ * envelope and the deployment's published key list
118
+ * (`GET /api/verification-keys.json`) — offline, in any stack:
119
+ * `crypto.verify(null, message, spkiPem, signature)` in Node, where the signed
120
+ * message is `"axorum.evidence.v0\n" + kind + "\n" + deployment + "\n" +
121
+ * sha256(payload)`. See `spec/evidence-signing.md` and the committed JSON
122
+ * Schemas under `spec/schemas/`.
123
+ */
124
+ export type Envelope = components["schemas"]["Envelope"];
125
+ /** The five-member deontic verdict. `"ForbiddenRejected"` is the recorded refusal. */
126
+ export type Verdict = components["schemas"]["Verdict"];
127
+ /** A single journal leg: a positive amount posted to one side of one account. */
128
+ export type Entry = components["schemas"]["Entry"];
129
+ /** Whether a journal leg is a debit or a credit. */
130
+ export type Side = components["schemas"]["Side"];
131
+ /**
132
+ * A monetary amount in integer minor units.
133
+ *
134
+ * `minor` is a **`bigint`**: the ledger's minor units are 128-bit integers, and a
135
+ * JavaScript `number` would truncate large ones silently. Write `{ minor: 50_000n,
136
+ * currency: "USD" }`.
137
+ */
138
+ export type Amount = components["schemas"]["Amount"];
139
+ /** A concrete action reference with its argument values bound by parameter name. */
140
+ export type ActionTerm = components["schemas"]["ActionTerm"];
141
+ /** A typed literal in the deontic AST: an externally tagged union, e.g. `{ Int: 3n }`. */
142
+ export type Value = components["schemas"]["Value"];
143
+ /** A live obligation instance — a duty bound to an actor at a tick. */
144
+ export type ObligationInstance = components["schemas"]["ObligationInstance"];
145
+ /** The obligation lifecycle state machine. */
146
+ export type ObligationState = components["schemas"]["ObligationState"];
147
+ /** The obligation state changes recorded by one evaluation. */
148
+ export type ObligationOutcomes = components["schemas"]["ObligationOutcomes"];
149
+ /**
150
+ * The self-contained audit record accompanying every verdict.
151
+ *
152
+ * `semantics` is optional for pre-versioning records. When present, it names the
153
+ * evaluation law, not the outcome itself; `master_data` is likewise omitted when
154
+ * the governing policy did not consult replicated reference data.
155
+ */
156
+ export type Provenance = components["schemas"]["Provenance"];
157
+ /**
158
+ * The provenance carried by a committed transaction's outcome.
159
+ *
160
+ * An externally tagged union with a twist: `Recorded` is an object
161
+ * (`{ Recorded: {…} }`) but `Archived` is the bare string `"Archived"`. Both forms
162
+ * occur; narrow with `typeof provenance === "string"`.
163
+ */
164
+ export type OutcomeProvenance = components["schemas"]["OutcomeProvenance"];
165
+ /** The ERP source-version markers a verdict was decided under. */
166
+ export type MasterDataBasis = components["schemas"]["MasterDataBasis"];
167
+ /**
168
+ * The evaluation-semantics version carried by stamped provenance.
169
+ *
170
+ * The generator types every OpenAPI `integer` as `bigint`, because the same wire
171
+ * convention protects 128-bit monetary values elsewhere in the contract.
172
+ */
173
+ export type SemanticsVersion = bigint;
174
+ /** A replicated master-data set a policy can test membership in. */
175
+ export type ReferenceSet = components["schemas"]["ReferenceSet"];
176
+ /** The `GET /api/v1/obligations` response: the duties an actor owes. */
177
+ export type ObligationsResponse = components["schemas"]["ObligationsResponse"];
178
+ /**
179
+ * The `GET /api/v1/accounts/{id}/balance` response.
180
+ *
181
+ * `balance` is a **`bigint`** — 128-bit minor units. See {@link Amount}.
182
+ */
183
+ export type BalanceResponse = components["schemas"]["BalanceResponse"];
184
+ /** The `GET /api/v1/policies/active` response. `policy` is `null` when none is in force. */
185
+ export type ActivePolicyResponse = components["schemas"]["ActivePolicyResponse"];
186
+ /**
187
+ * One declared currency: its code, how many decimal digits one minor unit is worth, and a
188
+ * `warning` when the policy in force refuses some action in it.
189
+ */
190
+ export type DeclaredCurrency = components["schemas"]["DeclaredCurrency"];
191
+ /**
192
+ * A declared currency the policy in force refuses some action in: every intent on one of
193
+ * `actions` in that currency is refused at commit (`422`, `cause: "currency_mismatch"`),
194
+ * whatever its parameters. An agent cannot change that. Pay in a currency with no warning,
195
+ * or hand `remedy` to a human operator. `code` is an open vocabulary; `"DSL3002"` today.
196
+ */
197
+ export type CurrencyWarning = components["schemas"]["CurrencyWarning"];
198
+ /**
199
+ * The `GET /api/v1/currencies` response: every declared currency, in canonical (sorted)
200
+ * code order. An empty list means nothing is declared.
201
+ */
202
+ export type DeclaredCurrencies = components["schemas"]["DeclaredCurrencies"];
203
+ /**
204
+ * A single **usage move**: a signed delta against one usage balance's counter.
205
+ *
206
+ * An intent carries up to three of them — `consume_usage`, `meter_usage`, `bill_usage` —
207
+ * and the three are judged **together** against the combined post-state, so one intent may
208
+ * consume, meter, and bill the same amount. A positive `amount` recognizes fresh
209
+ * consumption/metering/billing; a negative one is a correction that unwinds it.
210
+ *
211
+ * `amount.minor` is a **`bigint`**, like every other money figure. See {@link Amount}.
212
+ */
213
+ export type UsageMove = components["schemas"]["UsageMove"];
214
+ /**
215
+ * The `GET /api/v1/usages/{id}` response: one usage balance's three running totals.
216
+ *
217
+ * Every counter — `consumed`, `metered`, `billed`, and the derived `unmetered`/`unbilled`
218
+ * headrooms — is a **`bigint`**. It matters more here than anywhere else on the agent
219
+ * plane: `consumed` takes no ceiling, so a balance can lawfully outgrow `u64`, and a
220
+ * JavaScript `number` would truncate it silently.
221
+ *
222
+ * `text` is the balance narrated in compliance English with exact figures — the sentence to
223
+ * show a human, rather than a rendering of the counters you assemble yourself.
224
+ */
225
+ export type UsageBalanceReport = components["schemas"]["UsageBalanceReport"];
226
+ /**
227
+ * The stored ledger record for one transaction — **opaque in this version of the
228
+ * contract**, and typed as such.
229
+ *
230
+ * The record's own shape is not yet frozen, so the contract declines to publish a
231
+ * guess at it. What is guaranteed today: a committed transaction's record carries a
232
+ * `posted` boolean, and a recorded refusal appears with `posted: false`.
233
+ */
234
+ export type TransactionRecord = components["schemas"]["TransactionRecord"];
235
+ /**
236
+ * The structured error body every non-2xx agent-plane response carries.
237
+ *
238
+ * `error` is a stable `snake_case` code to branch on; `message` is human prose; the
239
+ * remaining fields are the **load-bearing extras** — `pinned`/`active` (without which
240
+ * no client could re-pin) and `primary_api_addr` (without which none could tell which
241
+ * replica holds the primary). This client parses them all and hands them to you on a typed
242
+ * {@link AxorumError}; it never flattens them away.
243
+ */
244
+ export type ErrorBody = components["schemas"]["ApiError"];
245
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;AAEjE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,iBAAiB;IAChC,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,iGAAiG;IACjG,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,kCAAkC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;;;;;GA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AC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAC;AAE7E;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The wire contract, given names.
3
+ *
4
+ * Every type here is an alias into `src/generated/agent-plane.ts`, which is generated
5
+ * from the frozen OpenAPI spec. The aliases exist so that a caller writes
6
+ * `IntentEnvelope` rather than `components["schemas"]["IntentEnvelope"]`; they add no
7
+ * shape of their own, and they **rename nothing** — `snake_case` on the wire is
8
+ * `snake_case` here. A second vocabulary would be a second thing to keep in sync, and
9
+ * the frozen contract is the one that wins.
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@axorum/client",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "The official TypeScript client for the Axorum agent plane — submit intents, read ledger state, and recover from a stale policy pin.",
5
+ "license": "Apache-2.0",
6
+ "author": "Roland Rodriguez <roland@axorum.com>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/AxorumHQ/axorum.git",
10
+ "directory": "clients/typescript"
11
+ },
12
+ "homepage": "https://github.com/AxorumHQ/axorum/tree/main/clients/typescript#readme",
13
+ "bugs": "https://github.com/AxorumHQ/axorum/issues",
14
+ "keywords": [
15
+ "axorum",
16
+ "agent",
17
+ "agent-plane",
18
+ "ledger",
19
+ "payments",
20
+ "policy",
21
+ "sdk",
22
+ "client"
23
+ ],
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "type": "module",
28
+ "sideEffects": false,
29
+ "engines": {
30
+ "node": ">=20"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "import": "./dist/index.js",
36
+ "default": "./dist/index.js"
37
+ },
38
+ "./package.json": "./package.json"
39
+ },
40
+ "types": "./dist/index.d.ts",
41
+ "main": "./dist/index.js",
42
+ "files": [
43
+ "dist",
44
+ "README.md"
45
+ ],
46
+ "devDependencies": {
47
+ "@types/node": "^22.10.2",
48
+ "openapi-typescript": "^7.5.2",
49
+ "typescript": "^5.7.2",
50
+ "undici": "^7.28.0",
51
+ "vitest": "^2.1.8"
52
+ },
53
+ "scripts": {
54
+ "generate": "node scripts/generate.mjs",
55
+ "typecheck": "tsc --noEmit",
56
+ "build": "tsc --project tsconfig.build.json",
57
+ "test": "vitest run",
58
+ "test:unit": "vitest run test/unit",
59
+ "test:conformance": "vitest run test/conformance"
60
+ }
6
61
  }