@cotal-ai/core 0.166.3 → 0.168.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 (88) hide show
  1. package/dist/agent-endpoint.d.ts +242 -0
  2. package/dist/agent-endpoint.d.ts.map +1 -0
  3. package/dist/agent-endpoint.js +183 -0
  4. package/dist/agent-endpoint.js.map +1 -0
  5. package/dist/backup-config.d.ts +2 -2
  6. package/dist/endpoint-call.d.ts +36 -1
  7. package/dist/endpoint-call.d.ts.map +1 -1
  8. package/dist/endpoint-call.js +218 -116
  9. package/dist/endpoint-call.js.map +1 -1
  10. package/dist/endpoint-cluster.d.ts +6 -1
  11. package/dist/endpoint-cluster.d.ts.map +1 -1
  12. package/dist/endpoint-cluster.js +25 -1
  13. package/dist/endpoint-cluster.js.map +1 -1
  14. package/dist/endpoint-delivery-lease.d.ts +184 -0
  15. package/dist/endpoint-delivery-lease.d.ts.map +1 -0
  16. package/dist/endpoint-delivery-lease.js +270 -0
  17. package/dist/endpoint-delivery-lease.js.map +1 -0
  18. package/dist/endpoint-envelope.d.ts +4 -3
  19. package/dist/endpoint-envelope.d.ts.map +1 -1
  20. package/dist/endpoint-envelope.js +19 -2
  21. package/dist/endpoint-envelope.js.map +1 -1
  22. package/dist/endpoint-grants.d.ts +31 -1
  23. package/dist/endpoint-grants.d.ts.map +1 -1
  24. package/dist/endpoint-grants.js +62 -1
  25. package/dist/endpoint-grants.js.map +1 -1
  26. package/dist/endpoint-presence.d.ts +296 -0
  27. package/dist/endpoint-presence.d.ts.map +1 -0
  28. package/dist/endpoint-presence.js +784 -0
  29. package/dist/endpoint-presence.js.map +1 -0
  30. package/dist/endpoint-provenance.d.ts +11 -0
  31. package/dist/endpoint-provenance.d.ts.map +1 -0
  32. package/dist/endpoint-provenance.js +20 -0
  33. package/dist/endpoint-provenance.js.map +1 -0
  34. package/dist/endpoint-serve.d.ts +76 -2
  35. package/dist/endpoint-serve.d.ts.map +1 -1
  36. package/dist/endpoint-serve.js +332 -147
  37. package/dist/endpoint-serve.js.map +1 -1
  38. package/dist/endpoint-service.d.ts +5 -1
  39. package/dist/endpoint-service.d.ts.map +1 -1
  40. package/dist/endpoint-service.js +2 -1
  41. package/dist/endpoint-service.js.map +1 -1
  42. package/dist/endpoint-subjects.d.ts +76 -2
  43. package/dist/endpoint-subjects.d.ts.map +1 -1
  44. package/dist/endpoint-subjects.js +113 -2
  45. package/dist/endpoint-subjects.js.map +1 -1
  46. package/dist/endpoint-verbs.d.ts +1 -1
  47. package/dist/endpoint-verbs.d.ts.map +1 -1
  48. package/dist/endpoint-verbs.js +1 -1
  49. package/dist/endpoint-verbs.js.map +1 -1
  50. package/dist/endpoint.d.ts +132 -188
  51. package/dist/endpoint.d.ts.map +1 -1
  52. package/dist/endpoint.js +380 -790
  53. package/dist/endpoint.js.map +1 -1
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +1 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/peer-label.d.ts +6 -5
  59. package/dist/peer-label.d.ts.map +1 -1
  60. package/dist/peer-label.js +7 -6
  61. package/dist/peer-label.js.map +1 -1
  62. package/dist/provision-jwt.d.ts +518 -0
  63. package/dist/provision-jwt.d.ts.map +1 -0
  64. package/dist/provision-jwt.js +641 -0
  65. package/dist/provision-jwt.js.map +1 -0
  66. package/dist/provision-permissions.d.ts +72 -0
  67. package/dist/provision-permissions.d.ts.map +1 -0
  68. package/dist/provision-permissions.js +2009 -0
  69. package/dist/provision-permissions.js.map +1 -0
  70. package/dist/provision-resources.d.ts +66 -0
  71. package/dist/provision-resources.d.ts.map +1 -0
  72. package/dist/provision-resources.js +61 -0
  73. package/dist/provision-resources.js.map +1 -0
  74. package/dist/provision-server-config.d.ts +115 -0
  75. package/dist/provision-server-config.d.ts.map +1 -0
  76. package/dist/provision-server-config.js +169 -0
  77. package/dist/provision-server-config.js.map +1 -0
  78. package/dist/provision.d.ts +19 -701
  79. package/dist/provision.d.ts.map +1 -1
  80. package/dist/provision.js +4 -2835
  81. package/dist/provision.js.map +1 -1
  82. package/dist/subjects.d.ts +3 -2
  83. package/dist/subjects.d.ts.map +1 -1
  84. package/dist/subjects.js +10 -2
  85. package/dist/subjects.js.map +1 -1
  86. package/dist/types.d.ts +11 -0
  87. package/dist/types.d.ts.map +1 -1
  88. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from "./endpoint-auth-digest.js";
11
11
  export * from "./endpoint-grants.js";
12
12
  export * from "./endpoint-coverage.js";
13
13
  export * from "./registry-contract.js";
14
+ export * from "./agent-endpoint.js";
14
15
  export * from "./registry-client.js";
15
16
  export type { RegistryService, RegistryServiceHandle, RegistryServiceInputs } from "./registry-service.js";
16
17
  export * from "./endpoint-envelope.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACnE,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,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Ac,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ export * from "./endpoint-auth-digest.js";
11
11
  export * from "./endpoint-grants.js";
12
12
  export * from "./endpoint-coverage.js";
13
13
  export * from "./registry-contract.js";
14
+ export * from "./agent-endpoint.js";
14
15
  export * from "./registry-client.js";
15
16
  export * from "./endpoint-envelope.js";
16
17
  export * from "./endpoint-records.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACnE,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC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AiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC"}
@@ -3,11 +3,12 @@
3
3
  * A role equal to the name is still printed, because a bare name is how a peer with no role reads
4
4
  * and the role is what an anycast addresses.
5
5
  *
6
- * Control characters, Unicode line and paragraph separators, and brackets become a space. A peer
7
- * writes its own presence record, so its name and role arrive checked only as strings, and every
8
- * surface prints the label on one line beside bracketed fields of its own (message attribution sits
9
- * inside brackets): a `]` or a newline would end that syntax early and forge what follows, and an ESC
10
- * or BEL would reach the operator's terminal as a control sequence.
6
+ * Control characters, Unicode line and paragraph separators, brackets and double quotes become a
7
+ * space. A peer writes its own presence record, so its name and role arrive checked only as strings,
8
+ * and every surface prints the label on one line beside bracketed and quoted fields of its own
9
+ * (message attribution sits inside brackets, beside a quoted `sender_id`): a `]`, a `"` or a newline
10
+ * would end that syntax early and forge what follows, and an ESC or BEL would reach the operator's
11
+ * terminal as a control sequence.
11
12
  */
12
13
  export declare function peerLabel(card: {
13
14
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"peer-label.d.ts","sourceRoot":"","sources":["../src/peer-label.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEvE;AAED,0GAA0G;AAC1G,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,QAAqC,CAAC"}
1
+ {"version":3,"file":"peer-label.d.ts","sourceRoot":"","sources":["../src/peer-label.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAEvE;AAED,0GAA0G;AAC1G,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,QAAqC,CAAC"}
@@ -3,14 +3,15 @@
3
3
  * A role equal to the name is still printed, because a bare name is how a peer with no role reads
4
4
  * and the role is what an anycast addresses.
5
5
  *
6
- * Control characters, Unicode line and paragraph separators, and brackets become a space. A peer
7
- * writes its own presence record, so its name and role arrive checked only as strings, and every
8
- * surface prints the label on one line beside bracketed fields of its own (message attribution sits
9
- * inside brackets): a `]` or a newline would end that syntax early and forge what follows, and an ESC
10
- * or BEL would reach the operator's terminal as a control sequence.
6
+ * Control characters, Unicode line and paragraph separators, brackets and double quotes become a
7
+ * space. A peer writes its own presence record, so its name and role arrive checked only as strings,
8
+ * and every surface prints the label on one line beside bracketed and quoted fields of its own
9
+ * (message attribution sits inside brackets, beside a quoted `sender_id`): a `]`, a `"` or a newline
10
+ * would end that syntax early and forge what follows, and an ESC or BEL would reach the operator's
11
+ * terminal as a control sequence.
11
12
  */
12
13
  export function peerLabel(card) {
13
- return (card.role ? `${card.name}/${card.role}` : card.name).replace(/[\p{Cc}\p{Zl}\p{Zp}[\]]+/gu, " ");
14
+ return (card.role ? `${card.name}/${card.role}` : card.name).replace(/[\p{Cc}\p{Zl}\p{Zp}[\]"]+/gu, " ");
14
15
  }
15
16
  /** A participant name safe for one line of an error. A blank name is not one, so the line uses the id. */
16
17
  export function shownPeerName(name, id) {
@@ -1 +1 @@
1
- {"version":3,"file":"peer-label.js","sourceRoot":"","sources":["../src/peer-label.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,SAAS,CAAC,IAAqC;IAC7D,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;AAC1G,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,EAAU;IACpD,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kCAAkC,CAAC"}
1
+ {"version":3,"file":"peer-label.js","sourceRoot":"","sources":["../src/peer-label.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,SAAS,CAAC,IAAqC;IAC7D,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;AAC3G,CAAC;AAED,0GAA0G;AAC1G,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,EAAU;IACpD,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,kCAAkC,CAAC"}
@@ -0,0 +1,518 @@
1
+ import { type DeprovisionTarget } from "./subjects.js";
2
+ import { type EpCapability } from "./endpoint-grants.js";
3
+ import { type EpServeGrant, type EpIssuanceGate } from "./endpoint-service.js";
4
+ import { type ServiceConnectionBinding } from "./service-gate.js";
5
+ import { type IssuanceSeam, type ListingBinding, type ListingSeam } from "./issued-authority.js";
6
+ import { type RunDriverGrantArgs, type RunOperatorGrantArgs } from "./run-driver-grants.js";
7
+ import { type EnvironmentManagerGrantPin } from "./environment-manager-grants.js";
8
+ import { type Identity } from "./identity.js";
9
+ import { type BackupPermissionScope, type RestorePermissionScope } from "./backup.js";
10
+ import type { Profile } from "./provision-permissions.js";
11
+ export type CredentialLifetimeClass = "standing-renewable" | "rotation-renewed" | "one-shot" | "static-operator-managed" | "mixed";
12
+ export type CredentialKind = Profile | "membership-observer" | "account-census" | "connection-evictor";
13
+ export interface CredentialLifetimePolicy {
14
+ class: CredentialLifetimeClass;
15
+ /** Default max age at mint. Undefined = the profile mints no default exp. */
16
+ defaultTtlSeconds?: number;
17
+ renewalOwner?: string;
18
+ note: string;
19
+ }
20
+ /** The broker's pre-auth control-line cap, in bytes (`max_control_line` in the generated config —
21
+ * `openServerConfig` and `serverConfig` below both render this literal, so the cap and the
22
+ * mint-time bound derived from it below can never drift). 64 KiB clears a many-channel agent
23
+ * JWT (~4-8 KB) with wide margin while keeping the pre-auth allocation ~16x tighter than 1 MB
24
+ * under connection flooding (the CONNECT line is parsed BEFORE auth). */
25
+ export declare const MAX_CONTROL_LINE_BYTES = 65536;
26
+ /** The fixed bytes a NATS client wraps around the `jwt` field on the CONNECT protocol line, over
27
+ * and above the JWT itself: the JSON object's other keys (`nkey`, `sig`, `name`, `lang`,
28
+ * `version`, `protocol`, `verbose`, `pedantic`, `no_responders`, `headers`), their values, and
29
+ * the surrounding braces/quotes/commas. Measured live (nats-server `-DV`, the trace of the raw
30
+ * protocol) on a real connect with the nats.js v3 client: a control-name credential produced a
31
+ * 5,104-byte JWT inside a 5,291-byte CONNECT line — 187 bytes of envelope, reproduced twice.
32
+ * Rounded up generously (>2.5x) to absorb client/library variation this repo does not control. */
33
+ export declare const CONNECT_ENVELOPE_OVERHEAD_BYTES = 512;
34
+ /** The mint-time budget for a user JWT's byte size: every composition that inflates the JWT (a
35
+ * long single channel, many channels, the per-agent event channel, any grant a later change
36
+ * adds) is priced against the SAME number, because the credential is what the client sends on
37
+ * the CONNECT line and the CONNECT line is what the broker caps — not any one contributor to it.
38
+ * `assertValidName`/`assertValidChannel` bound one input each; this bounds the OUTPUT, closing
39
+ * the gap between "every individual grant is legal" and "the composed credential still fits"
40
+ * (issue #375's review finding: six distinct 4096-char channels, each individually accepted,
41
+ * minted a JWT the broker would silently drop). */
42
+ export declare const MAX_MINTED_JWT_BYTES: number;
43
+ /** Bounded lifetime for `standing-renewable` credentials whose renewal owner is ONLINE:
44
+ * the holder (or its launcher) re-mints at 75% of the lifetime via the endpoint's creds-source seam,
45
+ * so a copied cred is broker-dead within a day while renewal never involves an operator. 24h keeps
46
+ * the remaining-25% loud-failure window at ~6h — wide enough to notice and repair before expiry. */
47
+ export declare const STANDING_RENEWABLE_TTL_SEC: number;
48
+ /** Bounded lifetime for the `rotation-renewed` $SYS credentials (membership-observer + connection-
49
+ * evictor). They are NOT online-renewable (the $SYS seed dies at end of `up`), so this exp is the
50
+ * credential-death horizon: a copied observer/evictor cred becomes broker-dead after it, and the
51
+ * operator is expected to have run a coordinated system-account rotation + broker restart within it
52
+ * (the doctor surface warns ahead). 30 days balances "copied cred eventually dies" against
53
+ * a comfortable monthly rotation cadence; tune here as one named knob. */
54
+ export declare const ROTATION_RENEWED_TTL_SEC: number;
55
+ /** The credential lifetime matrix. This is intentionally centralized so every new mint profile must classify its
56
+ * credential-death behavior instead of silently inheriting non-expiring static creds. */
57
+ export declare const CREDENTIAL_LIFETIMES: Record<CredentialKind, CredentialLifetimePolicy>;
58
+ export declare function credentialLifetime(kind: CredentialKind): CredentialLifetimePolicy;
59
+ /** A local credential file's health, by the SAME convention the renewal seam runs on: renewal is due
60
+ * at 75% of the iat→exp lifetime, so `near-expiry` means "past the point where a healthy renewal
61
+ * owner would already have re-signed this" — the doctor's yellow. `unreadable` (not a throw) is for
62
+ * a corrupt/spliced file: the doctor must render it red with a repair, not crash the diagnosis. */
63
+ export type CredHealthState = "healthy" | "near-expiry" | "expired" | "unbounded" | "unreadable";
64
+ export interface CredHealth {
65
+ state: CredHealthState;
66
+ /** Issue time (epoch sec) — the "last renewal" timestamp for reminted creds. */
67
+ iat?: number;
68
+ exp?: number;
69
+ /** The 75%-of-lifetime renewal point (epoch sec); past it = near-expiry. */
70
+ renewAt?: number;
71
+ /** Present only for `unreadable`. */
72
+ error?: string;
73
+ }
74
+ export declare function inspectCredHealth(creds: string, nowSec?: number): CredHealth;
75
+ /** BROKER-level trust: the operator root and the system account. A nats-server trusts exactly ONE
76
+ * operator and one system account, so this is the per-BROKER authority, not a per-space one. With
77
+ * many spaces on one broker every space's accounts are signed by this one operator.
78
+ *
79
+ * `sys.signingSeed` is minting capability for system-account users (the membership observer and the
80
+ * connection evictor). It is in-memory only on a fresh {@link createBrokerAuth} and is NOT written
81
+ * by the local filesystem persistence, so on that path a space added after first boot cannot mint
82
+ * its `$SYS` users. A hosted composition that needs incremental space provisioning must hold this
83
+ * seed in a BROKER-scoped secret store (never a tenant-scoped one, which would give each tenant its
84
+ * own operator or duplicate the seed and so recreate multiple owners). */
85
+ export interface BrokerAuth {
86
+ operator: {
87
+ seed: string;
88
+ jwt: string;
89
+ };
90
+ sys: {
91
+ pub: string;
92
+ jwt: string;
93
+ signingSeed?: string;
94
+ };
95
+ /** Monotonic generation of the system-account authority. {@link rotateSystemAccount} bumps it
96
+ * IN MEMORY (each rotation is the next generation of the value it derived from); persistence
97
+ * (`saveBrokerAuth`) then only accepts a sys-changing write that is the DIRECT successor of the
98
+ * current record, refusing anything else as stale. Absent = 0 (in-memory creates and
99
+ * pre-generation records). The JWT `iat` cannot carry this ordering — it is second-resolution,
100
+ * so two generations minted within one second are unordered by it. */
101
+ gen?: number;
102
+ }
103
+ /** SPACE-level trust: one space's data account, signed by its broker's operator. This is the only
104
+ * part of a space's trust material a space actually OWNS; broker trust is referenced, never owned
105
+ * (a per-space restore or rotation must not be able to move the broker's root). The `signingSeed`
106
+ * is the sensitive provisioner secret that mints this account's users. */
107
+ export interface SpaceAccountAuth {
108
+ space: string;
109
+ account: {
110
+ pub: string;
111
+ seed: string;
112
+ jwt: string;
113
+ signingSeed: string;
114
+ signingPub: string;
115
+ };
116
+ }
117
+ /** The COMPOSED read view of one space's full trust chain: broker authority plus that space's
118
+ * account. Deliberately structurally identical to the single-space shape, so the many
119
+ * existing readers compose rather than churn.
120
+ *
121
+ * This is a read adapter, never a persistence authority: it is produced by loading the two
122
+ * persisted records and validating their binding. Writing a composed value back as one document
123
+ * would let a mutation made through space A resurrect a stale broker copy when space B next loads
124
+ * it, which is exactly the ownership bug the split exists to prevent. */
125
+ export interface SpaceAuth extends BrokerAuth, SpaceAccountAuth {
126
+ }
127
+ /** Compose the read view from its two persisted authorities. Fails loud when the space account was
128
+ * not signed by THIS broker's operator: a self-consistent account signed by a FOREIGN operator is
129
+ * perfectly valid on its own and would otherwise be rendered into the resolver as untrusted trust. */
130
+ export declare function composeSpaceAuth(broker: BrokerAuth, spaceAccount: SpaceAccountAuth): SpaceAuth;
131
+ /** The binding check behind {@link composeSpaceAuth} and registry admission: this space's data
132
+ * account JWT must be issued by this broker's operator identity. */
133
+ export declare function assertAccountSignedByBroker(broker: BrokerAuth, spaceAccount: SpaceAccountAuth): void;
134
+ /** Reduce a {@link SpaceAuth} to just the material a *minting* host needs: `space`,
135
+ * `account.pub`, and `account.signingSeed` (the only fields {@link mintCreds} reads).
136
+ * The operator root-of-trust, system account, and the account's own seed are blanked.
137
+ *
138
+ * This is the file you hand a manager that should mint per-agent creds but must never
139
+ * hold the operator key — e.g. a containerized team. A leaked stripped file only lets
140
+ * someone mint *users within this one account*, which the account boundary already
141
+ * contains; it cannot mint new accounts or touch the system account. */
142
+ export declare function stripSpaceAuth(auth: SpaceAuth): SpaceAuth;
143
+ /** The user public keys a data-account JWT revokes, each with the Unix second it was revoked at. The
144
+ * broker refuses a user JWT for that key issued at or before that second. */
145
+ export declare function accountRevocations(accountJwt: string): Record<string, number>;
146
+ /** Re-issue the data-account JWT with the user key `userPub` revoked at `at` (Unix seconds), keeping
147
+ * every other claim. A key already revoked keeps its first time and the auth is returned unchanged.
148
+ * The broker applies it when it next loads its configuration. */
149
+ export declare function revokeAccountUser(auth: SpaceAuth, userPub: string, at: number): Promise<SpaceAuth>;
150
+ /** Re-issue an account JWT that this broker's operator signed so the account serves nobody: every
151
+ * user key issued at or before `at` (Unix seconds) is revoked, and the account admits no client or
152
+ * leaf connection, so a user minted later is refused as well. Every other claim is kept, so the
153
+ * account's JetStream data stays where it is. Push the result with {@link pushAccountClaim} to stop
154
+ * a space on a running full-resolver broker; its live connections close without a reload. */
155
+ export declare function retireAccountClaim(broker: BrokerAuth, accountJwt: string, at: number): Promise<string>;
156
+ /** Rotate the SYSTEM account and re-issue the operator JWT so persisted system-account users (currently
157
+ * `membership-observer`) become broker-dead once the broker loads the returned auth. The fresh
158
+ * `sys.signingSeed` is intentionally in-memory only; callers must mint replacement observer creds before
159
+ * persisting via `saveSpaceAuth`, which strips the seed again. */
160
+ export declare function rotateSystemAccount(auth: SpaceAuth): Promise<SpaceAuth>;
161
+ /** Generate a fresh BROKER trust root: operator → system account. One per broker, NOT one per space.
162
+ * `label` names the operator (cosmetic, but it lands in the operator JWT); multi-space brokers pass
163
+ * a broker label, and the single-space compatibility path passes the space name so existing
164
+ * operator names are unchanged.
165
+ *
166
+ * The returned `sys.signingSeed` is the ONLY window in which system-account users (the membership
167
+ * observer and the connection evictor) can be minted, because the local filesystem persistence does
168
+ * not write it. Callers that need to add spaces later must retain it in a broker-scoped store. */
169
+ export declare function createBrokerAuth(label: string): Promise<BrokerAuth>;
170
+ /** Generate one space's data account (+ signing key), signed by an EXISTING broker operator. This is
171
+ * the per-tenant half of provisioning: call it once per space against the same {@link BrokerAuth}
172
+ * to put many spaces on one broker, each in its own NATS account. Key generation and JWT
173
+ * construction stay with NATS; the existing native signer derives public keys and signs. */
174
+ export declare function createSpaceAccountAuth(broker: BrokerAuth, space: string): Promise<SpaceAccountAuth>;
175
+ /** Generate a fresh operator → account(+signing key) → system-account chain for a space.
176
+ * The single-space composition of {@link createBrokerAuth} + {@link createSpaceAccountAuth}: one
177
+ * broker whose only tenant is this space. */
178
+ export declare function createSpaceAuth(space: string): Promise<SpaceAuth>;
179
+ /** An issuance's binding on a mint (SPEC 13.15): the generation, the token naming its accepted
180
+ * row, and whether the ceiling carries the registry's `endpoints` row. That flag is recorded with
181
+ * the issuance so a renewal mints the same ceiling it was issued with. */
182
+ export interface IssuedBinding {
183
+ readonly generation: string;
184
+ readonly acceptedToken: string;
185
+ readonly listing?: true;
186
+ }
187
+ /** Options shaping a minted user's permissions. */
188
+ export interface MintOpts {
189
+ /** Trusted issuance restriction: exclude the tool-payload publish rail when false. */
190
+ eventPayloads?: boolean;
191
+ /** The owner+actor principal to mint for. Omitted ⇒ the no-login dev default (owner `"local"`, actor
192
+ * = the connection id) via {@link principalOf}. User mode supplies the derived owner + ledger actor. */
193
+ principal?: {
194
+ owner: string;
195
+ actor: string;
196
+ };
197
+ /** Read ACL — channels an "agent" MAY read (the agent file's `allowSubscribe`, already resolved
198
+ * by the caller). Minted as per-channel single-filter history-consumer create grants
199
+ * (`CONSUMER.CREATE.<CHAT>.<chathist_id>.<chat.*.ch>`) — the broker boundary on chat **history**
200
+ * reads (join-backfill / focus-recall). Each is run through the chat-subject builder so a
201
+ * wildcard subtree `team.>` becomes `chat.*.team.>`. Omitted or empty ⇒ NO channel read rows at
202
+ * all (the cred carries no chat history grant and no `chat.*.<ch>` sub row); DM, presence,
203
+ * anycast and the control rails are unaffected. The live read is the agent's own native
204
+ * `sub.allow` over `chat.*.<channel>` (also minted from this list, below). */
205
+ allowSubscribe?: string[];
206
+ /** Post ACL — channels an "agent" may publish to (the agent file's `allowPublish`, already
207
+ * resolved by the caller). Each becomes a `chat.<id>.<ch>` publish grant. **Default-deny**:
208
+ * omitted/empty ⇒ no chat publish grant at all — publishing must be declared. */
209
+ allowPublish?: string[];
210
+ /** The agent's role — scopes its TASK-queue consumer to svc_<role>. */
211
+ role?: string;
212
+ /** Capabilities declared in the agent file (e.g. `"spawn"`). Each gates a set of manager ep
213
+ * caller rows in {@link permissionsFor}: `spawn` → {@link spawnCallerCapabilities}, `run` →
214
+ * {@link runCallerCapabilities}, `admin` → the admin {@link operatorInstrumentCapabilities} set.
215
+ * Default-deny when absent — nats-server rejects the publish, no handler involved. */
216
+ capabilities?: string[];
217
+ /** v0.4 endpoint request capabilities (SPEC §13.9 caller rows): each mints its exact
218
+ * request-publish rows (+ optional journal-append row) and, when any is present, the
219
+ * caller's own reply-rail read row. Requires {@link MintOpts.lifecycleUid} — the rows pin
220
+ * the full caller triple. Default-deny when absent. */
221
+ endpointCapabilities?: EpCapability[];
222
+ /** `manager-caller` profile only: the one manager instance every request row pins. */
223
+ managerInstanceId?: string;
224
+ /** The caller's lifecycle UID (SPEC §13.1), minted by the managing authority BEFORE the
225
+ * entity is reachable. REQUIRED with `endpointCapabilities` — every endpoint-rail row
226
+ * forge-locks it as the third caller token. */
227
+ lifecycleUid?: string;
228
+ /** v0.4 SERVE identity (SPEC §13.9 serve rows), `endpoint-serve` profile ONLY: mints the
229
+ * instance's queue-qualified class subscribes (no plain class-rail subscribe exists on any
230
+ * credential), the plain scatter and own `inst` rails for the FULL registered command set
231
+ * plus the derived `describe`, the own epoch-pinned timer-fire read, and the epoch-pinned
232
+ * egress (reply/epe/ept-schedule/epr). MUST be the branded ARTIFACT `authorizeServeGrant`
233
+ * returned — a raw literal, a structural copy, or a diverging value refuses at the mint, and
234
+ * the mint context is bound to the artifact (same space; the minted principal IS the
235
+ * registered owner). The freshness FENCE is the durable issuance gate ({@link serveIssuance}
236
+ * / SPEC §13.1), not this artifact. Every other profile refuses it (a serve credential is
237
+ * per-instance, never an agent-baseline cred). The `$JS.API` bind rows (effects/pool
238
+ * durables) ride `effectsBindGrants`/`poolOwnerBindGrants`, not this subject-space builder. */
239
+ endpointServe?: EpServeGrant;
240
+ /** v0.4 SERVE mint fence (SPEC §13.1), `endpoint-serve` profile ONLY and REQUIRED there: the
241
+ * durable, single-key issuance gate whose revision-pinned CAS `mintCreds` must WIN to release
242
+ * the serve credential. Both the takeover and re-registration barriers freeze this same gate,
243
+ * so a mint racing either loses the CAS and releases nothing. Production wires it to the
244
+ * credential ledger's endpoint family `epgate.<endpoint>.<instanceId>` (the auth
245
+ * implementation's `kvServeIssuanceGate`); a test provides a faithful CAS fake. */
246
+ serveIssuance?: EpIssuanceGate;
247
+ /** Delivery-daemon shard seam (`delivery` profile only). N=1 is the only operating mode; these do
248
+ * not change permissions in this build (the daemon owns the whole space at N=1). Present so the
249
+ * N>1 follow-up is a small diff. Default `{0,1}`. */
250
+ shard?: number;
251
+ shards?: number;
252
+ /** The departed LIFECYCLE whose footprint a `deprovisioner` cred may tear down: the target's
253
+ * principal PLUS the exact lifecycle uid being retired (SPEC §13.1). REQUIRED for that profile (it
254
+ * throws without one): the grants are pinned to exactly this incarnation's
255
+ * `dm_<o>-<a>-<uid>`/`dlv_<o>-<a>-<uid>` durables + `<o>.<a>.<uid>` ACL row, so a leaked or
256
+ * REPLAYED deprovisioner cred can delete ONE retired incarnation's footprint and nothing else —
257
+ * never a peer's, never the role-shared `svc_<role>`, and structurally never a same-alias
258
+ * successor's (its names carry a different uid). Ignored by every other profile. */
259
+ deprovisionTarget?: DeprovisionTarget;
260
+ /** `retirement-requester` profile only: the REQUESTING CALLER TRIPLE (the current space-manager's
261
+ * own `owner`/`actor`/`uid`) whose auth-endpoint request subject the credential may publish, and
262
+ * whose reply rail it may read. The subject IS the attribution: the auth plane's rail derives
263
+ * the caller principal from the subject the broker admitted, and refuses unless the serve
264
+ * registration the request names belongs to THAT principal — so a requester cannot be authorized
265
+ * by another instance's registration.
266
+ *
267
+ * The `uid` is why this carries a triple and not the pre-#350 `{owner, actor}` pair: the `ctl`
268
+ * rail's two-token subject could express only a recyclable alias, while the `ep` caller triple
269
+ * is `<owner>.<actor>.<uid>` and the grant pins all three. Ignored by every other profile. */
270
+ retirementRequester?: {
271
+ owner: string;
272
+ actor: string;
273
+ uid: string;
274
+ /** The ONE incarnation this credential may ask to retire. It rides the SUBJECT as the
275
+ * `handle` target, so the grant pins it: a leaked requester cannot be re-aimed. */
276
+ target: {
277
+ owner: string;
278
+ actor: string;
279
+ lifecycleUid: string;
280
+ };
281
+ };
282
+ /** `lifecycle-executor` profile only (the static §13.1 executor): the ONE incarnation
283
+ * whose lifecycle-state keys this credential may write — the head `lifecycle.<owner>.<actor>`,
284
+ * the reservation `uid.<lifecycleUid>`, the gate `gate.<lifecycleUid>`, the ledger family
285
+ * `cred.<lifecycleUid>.>`, and the manager's durable slot row `mgrslot.<owner>.<alias>`.
286
+ * REQUIRED for that profile (it throws without one). EVERY key is DERIVED inside the profile
287
+ * from (owner, actor, lifecycleUid, alias) — none is a caller-supplied literal — so the pin is
288
+ * coherent by construction and a leaked executor cred can move exactly one incarnation's state
289
+ * machine and nothing else. Ignored by every other profile. */
290
+ lifecycleExecutor?: {
291
+ owner: string;
292
+ actor: string;
293
+ lifecycleUid: string;
294
+ alias: string;
295
+ };
296
+ /** `endpoint-serve-executor` profile only: the ONE endpoint instance whose
297
+ * endpoint-serve state this credential may write — the endpoint gate `epgate.<endpoint>.
298
+ * <instanceId>` (the registration barrier's freeze/reopen CAS + the provisioner create) and the
299
+ * serving ledger family `epcred.<endpoint>.<instanceId>.>` (the mint fence's stage + the barrier's
300
+ * revoke). REQUIRED for that profile. Every key is DERIVED inside the profile from
301
+ * (endpoint, instanceId) — none is a caller literal — so the manager drives the gate CAS + serve
302
+ * mint through THIS scoped executor and nothing else (the standing seed connection never writes
303
+ * the epgate or the epcred family). Ignored by every other profile. */
304
+ endpointServeExecutor?: {
305
+ endpoint: string;
306
+ instanceId: string;
307
+ };
308
+ /** `goal-writer` profile only (spawn-as-action): the endpoint whose action goals this
309
+ * standing connection may bind + commit ({@link goalWriterGrants}). REQUIRED for that profile;
310
+ * ignored by every other. */
311
+ goalWriter?: {
312
+ endpoint: string;
313
+ };
314
+ /** `session-caller` profile only: the ONE §13.6 session whose two eps rails this
315
+ * credential may use — the serving endpoint, the fresh sessionId, and the serving epoch. REQUIRED
316
+ * for that profile; ignored by every other. The rows pin all three, so the cred authorizes
317
+ * exactly that session's `in`+`out` and nothing else. */
318
+ sessionCaller?: {
319
+ endpoint: string;
320
+ sessionId: string;
321
+ epoch: number;
322
+ };
323
+ /** `session-serving` profile only: the ONE §13.6 session this SERVING credential may
324
+ * serve — same three coordinates as {@link sessionCaller}, with the rail directions swapped.
325
+ * REQUIRED for that profile; ignored by every other. The `session-ledger` profile takes no pin
326
+ * at all: it holds no rail, so it has nothing to pin. */
327
+ sessionServing?: {
328
+ endpoint: string;
329
+ sessionId: string;
330
+ epoch: number;
331
+ };
332
+ /** `run-driver` profile only (SPEC 14.6): the ONE run this credential drives, the takeover attempt
333
+ * it is minted for (names the replay durable), and the driving instance's id and epoch (the
334
+ * coordinates its timer schedules are addressed by). REQUIRED for that profile; ignored by every
335
+ * other. The ep caller triple is DERIVED from the run id ({@link runDriverCaller}), never supplied. */
336
+ runDriver?: RunDriverGrantArgs;
337
+ /** Trusted host only: the run and takeover whose journal authorizes its effects. */
338
+ runMediator?: RunDriverGrantArgs;
339
+ /** `run-operator` profile only (SPEC 14.3): the ONE endpoint whose runs this credential may read,
340
+ * the takeover id its journal replays are named by, and, for the answering half of a
341
+ * `run-answer`, the ONE checkpoint token its answer and settle writes are pinned to. REQUIRED
342
+ * for that profile; ignored by every other. */
343
+ runOperator?: RunOperatorGrantArgs;
344
+ /** `remote-manager` profile only: the server-derived owner, fixed server-selected actor, and the
345
+ * ONE locally-selected manager instance id this credential may supervise. REQUIRED for that profile. The builder pins its
346
+ * manager lease/presence and same-owner provisioning resources; no caller-supplied subject rows
347
+ * or profile fallback are accepted. */
348
+ remoteManager?: {
349
+ instanceId: string;
350
+ owner: string;
351
+ actor: string;
352
+ };
353
+ /** Fixed environment profiles only. Host-derived pins confer no admission authority.
354
+ * These profiles require explicit expiresAt, no later than this admission's expiry. */
355
+ environmentManager?: EnvironmentManagerGrantPin;
356
+ /** `deployer` profile only: which v0.4 ep instrument set its `launch`/`ps` rows carry. Defaults
357
+ * to `"admin"` (the static operator's ephemeral deploy cred). The user-mode `deployer` VIEW
358
+ * mints `"privileged"` instead, so a spawn-scoped deploy reaches the manager where its
359
+ * owner-equality launch authorization governs — never the admin any-mode reach. Ignored by
360
+ * every other profile. */
361
+ controlTier?: "privileged" | "admin";
362
+ /** Override the profile default lifetime. Internal/test hook; command surfaces should prefer the
363
+ * centralized {@link CREDENTIAL_LIFETIMES} defaults so profile behavior stays auditable. */
364
+ expiresInSeconds?: number;
365
+ /** Absolute JWT `exp` timestamp in seconds. Used by cutover/test code that needs already-expired creds. */
366
+ expiresAt?: number;
367
+ /** Issued authority (SPEC 13.15): mint this credential's ep-rail rows on the VERSIONED rail,
368
+ * pinned to `generation`, and grant the per-key read of its accepted row. The issuer chose the
369
+ * generation and persisted its evidence before calling; the client chose `acceptedToken` and
370
+ * learns the accepted generation by reading that one row after it connects. Taken by the
371
+ * profiles that hold caller rails (`agent`, the operator instruments); every other profile
372
+ * refuses it. */
373
+ issued?: IssuedBinding;
374
+ /** A LISTING generation (SPEC 13.15, "Listing issuance"): the credential keeps the legacy rail
375
+ * for every row and gains exactly {@link listingGrantRows}. `agent` and `manager-caller` only,
376
+ * and never beside {@link MintOpts.issued}, whose own generation carries the listing. */
377
+ listing?: ListingBinding;
378
+ /** The issuer handles a static `agent` mint decides its listing generation over. The horizon is
379
+ * the credential's own expiry, so a mint with no expiry gets no listing generation. */
380
+ listingSeam?: ListingSeam;
381
+ /** `agent` profile only: the kind of the ledger row the principal was found in, which only the
382
+ * auth callout reads (SPEC 13.21). A row of either kind serves its own `agent` endpoint on the
383
+ * principal route; an `interactive` row, an actor its person granted directly, also calls its
384
+ * owner's agents there with the `owner` word. It never comes from a scope token, which a parent
385
+ * could hand to the agents it spawns. A static mint refuses it. */
386
+ ledgerKind?: "interactive" | "managed-agent";
387
+ /** The durable half of an issuance, REQUIRED beside {@link MintOpts.issued} on {@link mintCreds}:
388
+ * the credential is built first, then its evidence is staged create-only, the existing
389
+ * finalizer runs, and the attempt activates by CAS at the revision the stage observed; only
390
+ * then is the accepted row written and the material returned (SPEC 13.15). `renew` confirms an
391
+ * existing generation's ceiling is unchanged and stages nothing. */
392
+ issuance?: IssuanceSeam;
393
+ /** `run-admitter` profile only: the ONE hosted run whose admission record and revocation marker
394
+ * this connection may create. */
395
+ runAdmitter?: {
396
+ endpoint: string;
397
+ runId: string;
398
+ submission?: {
399
+ caller: import("./endpoint-subjects.js").EpCaller;
400
+ id: string;
401
+ };
402
+ };
403
+ /** `transfer-writer` profile only: the ONE object (the transcript's hex digest) in the ONE manager
404
+ * instance's transfer bucket this instrument may write. */
405
+ transferWriter?: {
406
+ instanceId: string;
407
+ hex: string;
408
+ };
409
+ /** `transfer-reader` profile only: the manager instance whose own transfer bucket this reads. */
410
+ transferReader?: {
411
+ instanceId: string;
412
+ };
413
+ /** `teardown` profile only: the space's transfer streams, listed before the mint, that this
414
+ * teardown may inspect and delete by name ({@link deleteSpace} lists and names them). */
415
+ transferStreams?: string[];
416
+ /** `backup` profile only: one discriminated inspector or snapshot phase. */
417
+ backup?: BackupPermissionScope;
418
+ /** `restore` profile only: one discriminated initiate, upload, validate, or checkpoint phase. */
419
+ restore?: RestorePermissionScope;
420
+ }
421
+ /** The identity a cred is minted for: the owner+actor wire principal PLUS the connection nkey the cred
422
+ * authenticates as. The wire grammar, per-agent KV keys, durables and presence key off owner+actor; the
423
+ * private reply inbox (`_INBOX_<connId>`) keys off the connection nkey — under the auth callout that is a
424
+ * per-connection ephemeral the client always knows, whereas the derived owner is not known pre-connect. */
425
+ export interface MintPrincipal {
426
+ owner: string;
427
+ actor: string;
428
+ connId: string;
429
+ /** The incarnation's lifecycle UID (SPEC §13.1). REQUIRED for the `agent` profile — its
430
+ * dm/dlv/chathist grants are lifecycle-keyed EXACT names, so a credential cannot name another
431
+ * incarnation's resources. Other profiles ignore it. */
432
+ lifecycleUid?: string;
433
+ /** The connection's history-reader id, the key of the observer and admin profiles' reader deletes
434
+ * ({@link historyReaderConsumer}). A static mint leaves it unset, because there `connId` is the
435
+ * credential's own nkey, which its holder proves by signing. The auth callout sets it to
436
+ * {@link calloutReaderId}, because there `connId` is the inbox nonce the client chose. */
437
+ readerId?: string;
438
+ }
439
+ /** Resolve a {@link MintPrincipal} for the STATIC/dev mint path from an {@link Identity} + optional
440
+ * explicit principal. No-login dev default: owner = {@link DEV_OWNER} ("local"), actor = the connection
441
+ * id, so the agent's lane is `local.<id>`. The connection nkey is always the identity's id here (the
442
+ * creds bind to it). User mode does NOT flow through here — the callout mints directly with the
443
+ * server-derived owner + ledger actor. */
444
+ declare function principalOf(identity: Identity, principal?: {
445
+ owner: string;
446
+ actor: string;
447
+ }, lifecycleUid?: string): MintPrincipal;
448
+ /** Mint a user creds file for an agent {@link Identity} (its stable id+seed from
449
+ * {@link newIdentity}). The account signing key signs over ONLY the public key
450
+ * (`fromPublic`) — the agent seed is never part of the signature, it's only folded into
451
+ * the resulting creds file. The "agent" profile is scoped to publish only as itself and only to
452
+ * its declared `allowPublish` channels (post ACL, default-deny), and to read only within
453
+ * `allowSubscribe` (live tail bind-only + per-channel history grants). Every profile is now
454
+ * enumerated least-privilege — there is no allow-all cred (the former `manager` is deleted). */
455
+ export declare function mintCreds(auth: SpaceAuth, identity: Identity, profile: Profile, opts?: MintOpts): Promise<string>;
456
+ /** Issue a host-signed NATS user JWT for a caller-generated nkey. The private seed stays with
457
+ * the remote manager. This is deliberately narrower than {@link mintCreds}: only the typed remote
458
+ * manager protocol may request it, and every profile still goes through the same permission and
459
+ * lifetime builders. It signs with the space account's signing key alone, so a host that holds
460
+ * only that key passes no placeholder broker trust. */
461
+ export declare function mintPublicUserJwt(auth: {
462
+ space: string;
463
+ account: Pick<SpaceAccountAuth["account"], "pub" | "signingSeed">;
464
+ }, publicId: string, profile: Profile, opts: MintOpts): Promise<{
465
+ jwt: string;
466
+ exp: number;
467
+ }>;
468
+ /** Host-only service-callout mint. The host authenticates the connection and bearer, fixes
469
+ * expiry before authority reads, and keeps this JWT inside its encrypted authorization response.
470
+ * Native root reauthorization and natkey recording remain the host's final release obligations.
471
+ */
472
+ export declare function mintServiceCalloutJwt(auth: {
473
+ space: string;
474
+ account: Pick<SpaceAccountAuth["account"], "pub" | "signingSeed">;
475
+ }, args: {
476
+ serve: EpServeGrant;
477
+ gate: EpIssuanceGate;
478
+ principal: {
479
+ owner: string;
480
+ actor: string;
481
+ };
482
+ connection: ServiceConnectionBinding;
483
+ inboxNonce: string;
484
+ admittedAt: number;
485
+ accessExpiresAt: number;
486
+ expiresAt: number;
487
+ }): Promise<{
488
+ jwt: string;
489
+ credentialId: string;
490
+ iat: number;
491
+ exp: number;
492
+ }>;
493
+ /** Mint the scoped `membership-observer` creds — a SYSTEM-account user (conn A of the graph feed),
494
+ * signed with the in-memory `auth.sys.signingSeed` from a fresh {@link createSpaceAuth}. THROWS if that
495
+ * seed is absent (a re-`up` of an already-provisioned space, whose `$SYS` seed was discarded at its
496
+ * original `up`): the observer can only be minted at the (re-)provision that creates the account — a
497
+ * documented migration property, not a silent no-op. The CONNZ/event subjects pin the DATA account id
498
+ * (`auth.account.pub`). Mirrors {@link mintCreds} but issues into the system account. */
499
+ export declare function mintMembershipObserverCreds(auth: SpaceAuth, identity: Identity, opts?: MintOpts): Promise<string>;
500
+ /** Host-only read-only census credential. A registered system signer is required; no fallback
501
+ * to a broader observer or eviction credential. Reissuing with a retained registered signer
502
+ * needs no broker restart. The helper does not discover or persist that signer.
503
+ */
504
+ export declare function mintAccountCensusCreds(auth: {
505
+ account: {
506
+ pub: string;
507
+ };
508
+ sys: {
509
+ pub: string;
510
+ signingSeed?: string;
511
+ };
512
+ }, identity: Identity, opts?: MintOpts): Promise<string>;
513
+ /** Mint the scoped `connection-evictor` creds — the kick-only SYSTEM-account user for live
514
+ * eviction. Same mint-only-at-provision property as the observer (the $SYS seed is in-memory
515
+ * only), same fail-loud when it's absent. Paired with the observer at `up`. */
516
+ export declare function mintConnectionEvictorCreds(auth: SpaceAuth, identity: Identity, opts?: MintOpts): Promise<string>;
517
+ export { principalOf };
518
+ //# sourceMappingURL=provision-jwt.d.ts.map