@forgezero/access 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@ Declare your security posture as seven lists. Handlers hold business logic only.
11
11
 
12
12
  ## Package overview
13
13
 
14
- Anyone building a service on our request shape: one declared matrix of routes and factors, enforced by one pipeline whatever the framework. Imports no sibling at all, so it can be adopted on its own. Supported runtimes: bun, node, workers, deno. Package root: @forgezero/access. The sections below show the actual named imports emitted by each declaration entry point; wildcard imports are intentionally not used in the documentation.
14
+ Anyone building a service on our request shape: one declared matrix of routes and factors, enforced by one pipeline whatever the framework. Imports no sibling at all, so it can be adopted on its own. Supported runtimes: bun, node, workers, deno. Package root: @forgezero/access. Consumer documentation is curated with each module's explicit public flag; the complete internal/export inventory remains in the typed SSOT and declaration files.
15
15
 
16
16
  ```text
17
17
  bun add @forgezero/access
@@ -29,9 +29,9 @@ The five packages are installation boundaries. Choose a package by who installs
29
29
  | @forgezero/runtime | Portable runtime primitives for queries, jobs, events, schemas and finance. | bun, node | [Open](https://www.forgezero.net/docs/runtime) |
30
30
  | @forgezero/agent | Operator CLI and managed-node agent for bootstrap, deploy and lifecycle. | bun, node | [Open](https://www.forgezero.net/docs/agent) |
31
31
 
32
- ## @forgezero/access public imports and commands
32
+ ## @forgezero/access supported imports and commands
33
33
 
34
- Every row links to the detailed explanation and named-import/example area below. This table and those details are generated from the package inventory and emitted declarations.
34
+ These are supported consumer entry points, not every internal module shipped for ForgeZero managed installation. Each row links to its task-oriented usage.
35
35
 
36
36
  | public entry | short description | runtime | details |
37
37
  |---|---|---|---|
@@ -62,61 +62,11 @@ bun add @forgezero/access
62
62
  <a id="forgezero-access"></a>
63
63
  ## @forgezero/access
64
64
 
65
- Declare routes, factors and policies as orthogonal lists; authorise against them. This entry exposes 21 named value exports and 27 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
65
+ Declare routes, factors and policies as orthogonal lists; authorise against them. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
66
66
 
67
67
  ```text
68
68
  import {
69
69
  AccessError,
70
- Refusal,
71
- SCHEMA_VERSION,
72
- Settled,
73
- VERSION,
74
- action,
75
- assertReadable,
76
- authorise,
77
- codePolicy,
78
- defineAccessControl,
79
- defineFactors,
80
- defineRoutes,
81
- externalPolicy,
82
- fulfilledActionFactors,
83
- grantsRoute,
84
- impactOfDisabling,
85
- isRefusal,
86
- isSettled,
87
- page,
88
- resolveActionFactors,
89
- stemOf,
90
- } from '@forgezero/access';
91
-
92
- import type {
93
- AccessControl,
94
- AccessControlConfig,
95
- ActionPolicy,
96
- ActionRoute,
97
- AfterHandler,
98
- BeforeHandler,
99
- Binding,
100
- FactorContext,
101
- FactorKind,
102
- FactorRegistry,
103
- FactorSpec,
104
- GrantOptions,
105
- Method,
106
- Outcome,
107
- PageRoute,
108
- PolicySource,
109
- Problem,
110
- RatePolicy,
111
- RequestContext,
112
- Role,
113
- RouteBase,
114
- RouteContract,
115
- RouteRegistry,
116
- RouteSpec,
117
- SessionContext,
118
- SessionPolicy,
119
- Versioned,
120
70
  } from '@forgezero/access';
121
71
  ```
122
72
 
@@ -140,43 +90,11 @@ export const routes = defineRoutes({
140
90
  <a id="forgezero-access-conditions"></a>
141
91
  ## @forgezero/access/conditions
142
92
 
143
- The twelve guards every project writes into `before`, each with the status its refusal deserves. This entry exposes 14 named value exports and 16 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
93
+ The twelve guards every project writes into `before`, each with the status its refusal deserves. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
144
94
 
145
95
  ```text
146
96
  import {
147
97
  assertDeclaredRefusals,
148
- loadTarget,
149
- refusalsFor,
150
- requireApproval,
151
- requireBalance,
152
- requireIdempotency,
153
- requireNotFrozen,
154
- requireOwner,
155
- requireQuota,
156
- requireService,
157
- requireState,
158
- requireTier,
159
- requireUnlocked,
160
- requireVersion,
161
- } from '@forgezero/access/conditions';
162
-
163
- import type {
164
- ApprovalState,
165
- Condition,
166
- IdempotencyStore,
167
- LoadTargetOptions,
168
- RefusalSpec,
169
- RequireApprovalOptions,
170
- RequireBalanceOptions,
171
- RequireIdempotencyOptions,
172
- RequireNotFrozenOptions,
173
- RequireOwnerOptions,
174
- RequireQuotaOptions,
175
- RequireServiceOptions,
176
- RequireStateOptions,
177
- RequireTierOptions,
178
- RequireUnlockedOptions,
179
- RequireVersionOptions,
180
98
  } from '@forgezero/access/conditions';
181
99
  ```
182
100
 
@@ -195,34 +113,11 @@ export const selectedCapability = assertDeclaredRefusals;
195
113
  <a id="forgezero-access-effects"></a>
196
114
  ## @forgezero/access/effects
197
115
 
198
- Audit, emit, meter, invalidate and notify — what happens after a request is decided, never failing it. This entry exposes 6 named value exports and 15 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
116
+ Audit, emit, meter, invalidate and notify — what happens after a request is decided, never failing it. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
199
117
 
200
118
  ```text
201
119
  import {
202
120
  audit,
203
- emit,
204
- invalidate,
205
- meter,
206
- notify,
207
- settlementOf,
208
- } from '@forgezero/access/effects';
209
-
210
- import type {
211
- AuditOptions,
212
- AuditRecord,
213
- AuditSink,
214
- CacheInvalidator,
215
- Effect,
216
- EmitOptions,
217
- InvalidateOptions,
218
- MeterOptions,
219
- Notification,
220
- Notifier,
221
- NotifyOptions,
222
- Outbox,
223
- OutboxEvent,
224
- Settlement,
225
- UsageMeter,
226
121
  } from '@forgezero/access/effects';
227
122
  ```
228
123
 
@@ -241,34 +136,11 @@ export const selectedCapability = audit;
241
136
  <a id="forgezero-access-security"></a>
242
137
  ## @forgezero/access/security
243
138
 
244
- Constant-time comparison, CSPRNG tokens, HMAC, HKDF, AES-GCM sealing and redaction. Web Crypto only. This entry exposes 20 named value exports and 1 named type export. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
139
+ Constant-time comparison, CSPRNG tokens, HMAC, HKDF, AES-GCM sealing and redaction. Web Crypto only. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
245
140
 
246
141
  ```text
247
142
  import {
248
143
  fromBase64Url,
249
- fromHex,
250
- hashToken,
251
- hkdf,
252
- hmacSha256,
253
- isLive,
254
- nowSeconds,
255
- open,
256
- randomDigits,
257
- randomHex,
258
- randomInt,
259
- randomToken,
260
- redact,
261
- seal,
262
- secretFieldPattern,
263
- sha256,
264
- timingSafeEqual,
265
- toBase64Url,
266
- toHex,
267
- verifyHmac,
268
- } from '@forgezero/access/security';
269
-
270
- import type {
271
- Sealed,
272
144
  } from '@forgezero/access/security';
273
145
  ```
274
146
 
@@ -287,19 +159,11 @@ export const selectedCapability = fromBase64Url;
287
159
  <a id="forgezero-access-rate-limit"></a>
288
160
  ## @forgezero/access/rate-limit
289
161
 
290
- Request counters over a window — in memory, in Redis, or in a Durable Object. This entry exposes 4 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
162
+ Request counters over a window — in memory, in Redis, or in a Durable Object. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
291
163
 
292
164
  ```text
293
165
  import {
294
166
  durableObjectStore,
295
- memoryStore,
296
- redisStore,
297
- slidingWindowStore,
298
- } from '@forgezero/access/rate-limit';
299
-
300
- import type {
301
- DurableStorageLike,
302
- RedisLike,
303
167
  } from '@forgezero/access/rate-limit';
304
168
  ```
305
169
 
@@ -318,17 +182,11 @@ export const selectedCapability = durableObjectStore;
318
182
  <a id="forgezero-access-fetch"></a>
319
183
  ## @forgezero/access/fetch
320
184
 
321
- A Fetch-native adapter over the declared access pipeline. This entry exposes 3 named value exports and 1 named type export. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
185
+ A Fetch-native adapter over the declared access pipeline. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
322
186
 
323
187
  ```text
324
188
  import {
325
189
  compileRoute,
326
- matchRoute,
327
- toFetch,
328
- } from '@forgezero/access/fetch';
329
-
330
- import type {
331
- FetchHandler,
332
190
  } from '@forgezero/access/fetch';
333
191
  ```
334
192
 
@@ -347,25 +205,11 @@ export const selectedCapability = compileRoute;
347
205
  <a id="forgezero-access-pipeline"></a>
348
206
  ## @forgezero/access/pipeline
349
207
 
350
- The framework-neutral route, principal, factor, policy, rate-limit and effects pipeline. This entry exposes 3 named value exports and 9 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
208
+ The framework-neutral route, principal, factor, policy, rate-limit and effects pipeline. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
351
209
 
352
210
  ```text
353
211
  import {
354
212
  createPipeline,
355
- defineHandlers,
356
- windowSeconds,
357
- } from '@forgezero/access/pipeline';
358
-
359
- import type {
360
- Handler,
361
- HandlerRegistry,
362
- Pipeline,
363
- PipelineOptions,
364
- RateStore,
365
- SessionResolver,
366
- StepUpStore,
367
- Telemetry,
368
- Validator,
369
213
  } from '@forgezero/access/pipeline';
370
214
  ```
371
215
 
@@ -384,19 +228,11 @@ export const selectedCapability = createPipeline;
384
228
  <a id="forgezero-access-elysia"></a>
385
229
  ## @forgezero/access/elysia
386
230
 
387
- Elysia integration over the same access pipeline and route declarations. This entry exposes 4 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
231
+ Elysia integration over the same access pipeline and route declarations. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
388
232
 
389
233
  ```text
390
234
  import {
391
235
  elysia,
392
- forbiddenTelemetryAttribute,
393
- telemetryFrom,
394
- toElysiaPath,
395
- } from '@forgezero/access/elysia';
396
-
397
- import type {
398
- ElysiaAdapterOptions,
399
- OtelTracer,
400
236
  } from '@forgezero/access/elysia';
401
237
  ```
402
238
 
@@ -415,21 +251,11 @@ export const selectedCapability = elysia;
415
251
  <a id="forgezero-access-client"></a>
416
252
  ## @forgezero/access/client
417
253
 
418
- Typed client helpers that fulfil factors without duplicating the security matrix. This entry exposes 2 named value exports and 6 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
254
+ Typed client helpers that fulfil factors without duplicating the security matrix. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
419
255
 
420
256
  ```text
421
257
  import {
422
258
  buildPath,
423
- createClient,
424
- } from '@forgezero/access/client';
425
-
426
- import type {
427
- ChallengeHandler,
428
- ClientOptions,
429
- ClientResult,
430
- Problem,
431
- RequestArgs,
432
- SecurityChallenge,
433
259
  } from '@forgezero/access/client';
434
260
  ```
435
261
 
@@ -448,18 +274,11 @@ export const selectedCapability = buildPath;
448
274
  <a id="forgezero-access-testing"></a>
449
275
  ## @forgezero/access/testing
450
276
 
451
- Deterministic access-pipeline fixtures and assertions for consumer tests. This entry exposes 3 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
277
+ Deterministic access-pipeline fixtures and assertions for consumer tests. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
452
278
 
453
279
  ```text
454
280
  import {
455
281
  reachableRoutes,
456
- simulate,
457
- unreachableRoutes,
458
- } from '@forgezero/access/testing';
459
-
460
- import type {
461
- SimulateArgs,
462
- Verdict,
463
282
  } from '@forgezero/access/testing';
464
283
  ```
465
284
 
@@ -478,19 +297,11 @@ export const selectedCapability = reachableRoutes;
478
297
  <a id="forgezero-access-header"></a>
479
298
  ## @forgezero/access/header
480
299
 
481
- Strict configurable header-identity extraction with canonical names and bounded values. This entry exposes 2 named value exports and 4 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
300
+ Strict configurable header-identity extraction with canonical names and bounded values. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
482
301
 
483
302
  ```text
484
303
  import {
485
304
  defineHeaderIdentitySources,
486
- headerIdentityResolver,
487
- } from '@forgezero/access/header';
488
-
489
- import type {
490
- HeaderAssignmentResolver,
491
- HeaderIdentity,
492
- HeaderIdentitySource,
493
- HeaderPrincipal,
494
305
  } from '@forgezero/access/header';
495
306
  ```
496
307
 
@@ -509,20 +320,11 @@ export const selectedCapability = defineHeaderIdentitySources;
509
320
  <a id="forgezero-access-principal"></a>
510
321
  ## @forgezero/access/principal
511
322
 
512
- Generic principal-source resolution for browser, API-key, attestation or future identity adapters. This entry exposes 4 named value exports and 3 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
323
+ Generic principal-source resolution for browser, API-key, attestation or future identity adapters. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
513
324
 
514
325
  ```text
515
326
  import {
516
327
  assignmentIsActive,
517
- decidePrincipalAccess,
518
- defineRbacPrincipal,
519
- touchPrincipalAssignment,
520
- } from '@forgezero/access/principal';
521
-
522
- import type {
523
- PrincipalAccessDecision,
524
- PrincipalAssignment,
525
- RbacPrincipal,
526
328
  } from '@forgezero/access/principal';
527
329
  ```
528
330
 
@@ -541,23 +343,11 @@ export const selectedCapability = assignmentIsActive;
541
343
  <a id="forgezero-access-principal-session"></a>
542
344
  ## @forgezero/access/principal-session
543
345
 
544
- Short-lived scope-bound delegated-principal sessions with sliding and absolute expiry. This entry exposes 8 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
346
+ Short-lived scope-bound delegated-principal sessions with sliding and absolute expiry. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
545
347
 
546
348
  ```text
547
349
  import {
548
350
  DEFAULT_PRINCIPAL_ABSOLUTE_TTL_MS,
549
- DEFAULT_PRINCIPAL_IDLE_TTL_MS,
550
- MAX_PRINCIPAL_ABSOLUTE_TTL_MS,
551
- MAX_PRINCIPAL_IDLE_TTL_MS,
552
- authenticatePrincipalSession,
553
- issuePrincipalSession,
554
- principalSessionIsActive,
555
- touchPrincipalSession,
556
- } from '@forgezero/access/principal-session';
557
-
558
- import type {
559
- IssuedPrincipalSession,
560
- PrincipalSessionRecord,
561
351
  } from '@forgezero/access/principal-session';
562
352
  ```
563
353
 
@@ -576,22 +366,11 @@ export const selectedCapability = DEFAULT_PRINCIPAL_ABSOLUTE_TTL_MS;
576
366
  <a id="forgezero-access-authenticator"></a>
577
367
  ## @forgezero/access/authenticator
578
368
 
579
- Authentication-source contracts for adding identity mechanisms without changing route policy. This entry exposes 2 named value exports and 7 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
369
+ Authentication-source contracts for adding identity mechanisms without changing route policy. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
580
370
 
581
371
  ```text
582
372
  import {
583
373
  createAuthenticator,
584
- encoding,
585
- } from '@forgezero/access/authenticator';
586
-
587
- import type {
588
- AuthenticationOptions,
589
- AuthenticationResponse,
590
- Authenticator,
591
- AuthenticatorOptions,
592
- Credential,
593
- RegistrationOptions,
594
- RegistrationResponse,
595
374
  } from '@forgezero/access/authenticator';
596
375
  ```
597
376
 
@@ -610,18 +389,11 @@ export const selectedCapability = createAuthenticator;
610
389
  <a id="forgezero-access-ceremony-modes"></a>
611
390
  ## @forgezero/access/ceremony-modes
612
391
 
613
- Named security-ceremony modes and their session/action fulfilment semantics. This entry exposes 3 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
392
+ Named security-ceremony modes and their session/action fulfilment semantics. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
614
393
 
615
394
  ```text
616
395
  import {
617
396
  MAX_CUSTODIANS,
618
- THRESHOLD_MODES,
619
- thresholdMode,
620
- } from '@forgezero/access/ceremony-modes';
621
-
622
- import type {
623
- ThresholdMode,
624
- ThresholdModeId,
625
397
  } from '@forgezero/access/ceremony-modes';
626
398
  ```
627
399
 
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/conditions.ts
281
281
  function define(condition, routes, refusals, run) {
package/dist/effects.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/security.ts
281
281
  var HEX = Array.from({ length: 256 }, (_, index) => index.toString(16).padStart(2, "0"));
package/dist/elysia.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/pipeline.ts
281
281
  function defineHandlers(routes, handlers) {
package/dist/fetch.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/pipeline.ts
281
281
  function defineHandlers(routes, handlers) {
package/dist/header.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/principal.ts
281
281
  var ATOM = /^[A-Za-z0-9][A-Za-z0-9_.:@/-]{0,255}$/;
package/dist/index.d.ts CHANGED
@@ -379,4 +379,4 @@ export declare function impactOfDisabling<R extends RouteRegistry>(access: Acces
379
379
  available: number;
380
380
  required: number;
381
381
  }[];
382
- export declare const VERSION = "0.1.8";
382
+ export declare const VERSION = "0.1.10";
package/dist/index.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
  export {
280
280
  stemOf,
281
281
  resolveActionFactors,
package/dist/pipeline.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/pipeline.ts
281
281
  function defineHandlers(routes, handlers) {
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/security.ts
281
281
  var HEX = Array.from({ length: 256 }, (_, index) => index.toString(16).padStart(2, "0"));
package/dist/principal.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/principal.ts
281
281
  var ATOM = /^[A-Za-z0-9][A-Za-z0-9_.:@/-]{0,255}$/;
package/dist/testing.js CHANGED
@@ -275,7 +275,7 @@ function impactOfDisabling(access, enabledAfter) {
275
275
  }
276
276
  return broken;
277
277
  }
278
- var VERSION = "0.1.8";
278
+ var VERSION = "0.1.10";
279
279
 
280
280
  // src/testing.ts
281
281
  function nameOf(policies, route) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgezero/access",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",