agent-relay-sdk 0.2.17 → 0.2.19

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 (56) hide show
  1. package/dist/bus-client.d.ts +5 -4
  2. package/dist/bus-client.d.ts.map +1 -1
  3. package/dist/claim-tracker.d.ts +1 -18
  4. package/dist/claim-tracker.d.ts.map +1 -1
  5. package/dist/claim-tracker.js +2 -1
  6. package/dist/claim-tracker.js.map +1 -1
  7. package/dist/context-probe.d.ts +4 -6
  8. package/dist/context-probe.d.ts.map +1 -1
  9. package/dist/context-probe.js +11 -5
  10. package/dist/context-probe.js.map +1 -1
  11. package/dist/fs-name.d.ts +2 -1
  12. package/dist/fs-name.d.ts.map +1 -1
  13. package/dist/http-client.d.ts +3 -10
  14. package/dist/http-client.d.ts.map +1 -1
  15. package/dist/http-client.js +1 -1
  16. package/dist/http-client.js.map +1 -1
  17. package/dist/process-utils.d.ts +2 -2
  18. package/dist/process-utils.d.ts.map +1 -1
  19. package/dist/process-utils.js +36 -1
  20. package/dist/process-utils.js.map +1 -1
  21. package/dist/protocol.d.ts +11 -17
  22. package/dist/protocol.d.ts.map +1 -1
  23. package/dist/protocol.js +7 -7
  24. package/dist/protocol.js.map +1 -1
  25. package/dist/provider-base.d.ts +3 -26
  26. package/dist/provider-base.d.ts.map +1 -1
  27. package/dist/provider-base.js +1 -1
  28. package/dist/provider-base.js.map +1 -1
  29. package/dist/provider-catalog.d.ts +10 -10
  30. package/dist/provider-catalog.d.ts.map +1 -1
  31. package/dist/provider-catalog.js +1 -1
  32. package/dist/provider-catalog.js.map +1 -1
  33. package/dist/reconnect.d.ts +2 -1
  34. package/dist/reconnect.d.ts.map +1 -1
  35. package/dist/speech-text.d.ts +2 -1
  36. package/dist/speech-text.d.ts.map +1 -1
  37. package/dist/sse.d.ts +2 -1
  38. package/dist/sse.d.ts.map +1 -1
  39. package/dist/types.d.ts +59 -45
  40. package/dist/types.d.ts.map +1 -1
  41. package/dist/types.js +26 -3
  42. package/dist/types.js.map +1 -1
  43. package/package.json +1 -1
  44. package/src/bus-client.ts +4 -4
  45. package/src/claim-tracker.ts +4 -4
  46. package/src/context-probe.ts +14 -8
  47. package/src/fs-name.ts +1 -1
  48. package/src/http-client.ts +3 -3
  49. package/src/process-utils.ts +34 -1
  50. package/src/protocol.ts +17 -17
  51. package/src/provider-base.ts +4 -4
  52. package/src/provider-catalog.ts +10 -10
  53. package/src/reconnect.ts +1 -1
  54. package/src/speech-text.ts +1 -1
  55. package/src/sse.ts +1 -1
  56. package/src/types.ts +74 -19
package/src/protocol.ts CHANGED
@@ -24,7 +24,7 @@ export interface RegisterFrame extends BusFrame {
24
24
  };
25
25
  }
26
26
 
27
- export interface HeartbeatFrame extends BusFrame {
27
+ interface HeartbeatFrame extends BusFrame {
28
28
  type: "heartbeat";
29
29
  payload: {
30
30
  status: Exclude<BusAgentStatus, "offline">;
@@ -32,7 +32,7 @@ export interface HeartbeatFrame extends BusFrame {
32
32
  };
33
33
  }
34
34
 
35
- export interface CommandFrame extends BusFrame {
35
+ interface CommandFrame extends BusFrame {
36
36
  type: "command";
37
37
  id: string;
38
38
  payload: {
@@ -42,7 +42,7 @@ export interface CommandFrame extends BusFrame {
42
42
  };
43
43
  }
44
44
 
45
- export interface SubscribeFrame extends BusFrame {
45
+ interface SubscribeFrame extends BusFrame {
46
46
  type: "subscribe";
47
47
  id: string;
48
48
  payload: {
@@ -51,7 +51,7 @@ export interface SubscribeFrame extends BusFrame {
51
51
  };
52
52
  }
53
53
 
54
- export interface StatusFrame extends BusFrame {
54
+ interface StatusFrame extends BusFrame {
55
55
  type: "status";
56
56
  payload: {
57
57
  agentStatus: BusAgentStatus;
@@ -60,14 +60,14 @@ export interface StatusFrame extends BusFrame {
60
60
  };
61
61
  }
62
62
 
63
- export interface AckFrame extends BusFrame {
63
+ interface AckFrame extends BusFrame {
64
64
  type: "ack";
65
65
  payload: {
66
66
  frameId: string;
67
67
  };
68
68
  }
69
69
 
70
- export interface ResumeFrame extends BusFrame {
70
+ interface ResumeFrame extends BusFrame {
71
71
  type: "resume";
72
72
  id: string;
73
73
  payload: {
@@ -87,7 +87,7 @@ export interface RegisteredFrame extends BusFrame {
87
87
  };
88
88
  }
89
89
 
90
- export interface EventPayload {
90
+ interface EventPayload {
91
91
  seq: number;
92
92
  eventType: string;
93
93
  source: string;
@@ -102,7 +102,7 @@ export interface EventFrame extends BusFrame {
102
102
  payload: EventPayload;
103
103
  }
104
104
 
105
- export interface CommandResultFrame extends BusFrame {
105
+ interface CommandResultFrame extends BusFrame {
106
106
  type: "command.result";
107
107
  payload: {
108
108
  commandId: string;
@@ -118,7 +118,7 @@ export interface CommandStatusUpdateParams {
118
118
  error?: string;
119
119
  }
120
120
 
121
- export interface ResumedFrame extends BusFrame {
121
+ interface ResumedFrame extends BusFrame {
122
122
  type: "resumed";
123
123
  payload: {
124
124
  events: EventPayload[];
@@ -136,7 +136,7 @@ export interface ErrorFrame extends BusFrame {
136
136
  };
137
137
  }
138
138
 
139
- export type ClientBusFrame =
139
+ type ClientBusFrame =
140
140
  | RegisterFrame
141
141
  | HeartbeatFrame
142
142
  | CommandFrame
@@ -162,13 +162,13 @@ export class BusProtocolError extends Error {
162
162
  }
163
163
  }
164
164
 
165
- export function isRegisterFrame(f: BusFrame): f is RegisterFrame { return f.type === "register"; }
166
- export function isHeartbeatFrame(f: BusFrame): f is HeartbeatFrame { return f.type === "heartbeat"; }
167
- export function isCommandFrame(f: BusFrame): f is CommandFrame { return f.type === "command"; }
168
- export function isSubscribeFrame(f: BusFrame): f is SubscribeFrame { return f.type === "subscribe"; }
169
- export function isStatusFrame(f: BusFrame): f is StatusFrame { return f.type === "status"; }
170
- export function isAckFrame(f: BusFrame): f is AckFrame { return f.type === "ack"; }
171
- export function isResumeFrame(f: BusFrame): f is ResumeFrame { return f.type === "resume"; }
165
+ function isRegisterFrame(f: BusFrame): f is RegisterFrame { return f.type === "register"; }
166
+ function isHeartbeatFrame(f: BusFrame): f is HeartbeatFrame { return f.type === "heartbeat"; }
167
+ function isCommandFrame(f: BusFrame): f is CommandFrame { return f.type === "command"; }
168
+ function isSubscribeFrame(f: BusFrame): f is SubscribeFrame { return f.type === "subscribe"; }
169
+ function isStatusFrame(f: BusFrame): f is StatusFrame { return f.type === "status"; }
170
+ function isAckFrame(f: BusFrame): f is AckFrame { return f.type === "ack"; }
171
+ function isResumeFrame(f: BusFrame): f is ResumeFrame { return f.type === "resume"; }
172
172
 
173
173
  export function parseBusFrame(data: string | ArrayBuffer | Uint8Array): BusFrame {
174
174
  const text = typeof data === "string" ? data : new TextDecoder().decode(data);
@@ -11,7 +11,7 @@ export interface ProviderAdapter {
11
11
  formatDelivery?(messages: Message[]): string;
12
12
  }
13
13
 
14
- export interface SpawnConfig {
14
+ interface SpawnConfig {
15
15
  cwd: string;
16
16
  label?: string;
17
17
  approvalMode?: string;
@@ -19,13 +19,13 @@ export interface SpawnConfig {
19
19
  env?: Record<string, string>;
20
20
  }
21
21
 
22
- export interface SpawnResult {
22
+ interface SpawnResult {
23
23
  agentId: string;
24
24
  pid?: number;
25
25
  sessionId?: string;
26
26
  }
27
27
 
28
- export interface ProviderBaseOptions {
28
+ interface ProviderBaseOptions {
29
29
  relayUrl: string;
30
30
  adapter: ProviderAdapter;
31
31
  agentId: string;
@@ -36,7 +36,7 @@ export interface ProviderBaseOptions {
36
36
  token?: string;
37
37
  }
38
38
 
39
- export class ProviderBase {
39
+ class ProviderBase {
40
40
  readonly client: RelayBusClient;
41
41
  private running = false;
42
42
  private readonly pending = new Map<number, Message>();
@@ -3,25 +3,25 @@ import type { SpawnProvider } from "./types.js";
3
3
  /** Valid reasoning-effort levels — runtime tuple is the single source of truth. */
4
4
  export const VALID_EFFORTS = ["low", "medium", "high", "xhigh", "max"] as const;
5
5
  export type ProviderEffort = (typeof VALID_EFFORTS)[number];
6
- export function isProviderEffort(value: unknown): value is ProviderEffort {
6
+ function isProviderEffort(value: unknown): value is ProviderEffort {
7
7
  return typeof value === "string" && (VALID_EFFORTS as readonly string[]).includes(value);
8
8
  }
9
- export type ProviderCatalogValueSource = "catalog" | "provider" | "runtime" | "override";
10
- export type ProviderCatalogConfidence = "declared" | "verified" | "estimated" | "unknown";
9
+ type ProviderCatalogValueSource = "catalog" | "provider" | "runtime" | "override";
10
+ type ProviderCatalogConfidence = "declared" | "verified" | "estimated" | "unknown";
11
11
 
12
- export interface ProviderCatalogValue<T> {
12
+ interface ProviderCatalogValue<T> {
13
13
  value: T;
14
14
  source: ProviderCatalogValueSource;
15
15
  confidence: ProviderCatalogConfidence;
16
16
  lastUpdatedAt?: number;
17
17
  }
18
18
 
19
- export interface ProviderModelLimits {
19
+ interface ProviderModelLimits {
20
20
  contextWindowTokens?: ProviderCatalogValue<number>;
21
21
  maxOutputTokens?: ProviderCatalogValue<number>;
22
22
  }
23
23
 
24
- export interface ProviderModelModalities {
24
+ interface ProviderModelModalities {
25
25
  input: {
26
26
  text: boolean;
27
27
  image?: boolean;
@@ -37,7 +37,7 @@ export interface ProviderModelModalities {
37
37
  };
38
38
  }
39
39
 
40
- export interface ProviderModelToolCapabilities {
40
+ interface ProviderModelToolCapabilities {
41
41
  code?: boolean;
42
42
  review?: boolean;
43
43
  debug?: boolean;
@@ -50,7 +50,7 @@ export interface ProviderModelToolCapabilities {
50
50
  imageEditing?: boolean;
51
51
  }
52
52
 
53
- export interface ProviderModelCapabilities {
53
+ interface ProviderModelCapabilities {
54
54
  modalities: ProviderModelModalities;
55
55
  tools?: ProviderModelToolCapabilities;
56
56
  source: ProviderCatalogValueSource;
@@ -75,13 +75,13 @@ export interface ProviderCatalogEntry {
75
75
  models: ProviderModelCatalogEntry[];
76
76
  }
77
77
 
78
- export interface ProviderSelection {
78
+ interface ProviderSelection {
79
79
  provider: SpawnProvider;
80
80
  model?: string;
81
81
  effort?: ProviderEffort;
82
82
  }
83
83
 
84
- export interface ResolvedProviderSelection {
84
+ interface ResolvedProviderSelection {
85
85
  provider: SpawnProvider;
86
86
  modelAlias?: string;
87
87
  providerModel?: string;
package/src/reconnect.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { setTimeout as delay } from "node:timers/promises";
2
2
 
3
- export interface ReconnectOptions {
3
+ interface ReconnectOptions {
4
4
  initialMs: number;
5
5
  maxMs: number;
6
6
  jitterMs: number;
@@ -111,7 +111,7 @@ function collapseTables(text: string): string {
111
111
  * by appending an entry. Order matters: earlier rules see the raw text, later
112
112
  * rules see the output of earlier ones (see the ordering notes in SPEECH_RULES).
113
113
  */
114
- export interface SpeechRule {
114
+ interface SpeechRule {
115
115
  readonly name: string
116
116
  readonly pattern: RegExp
117
117
  readonly replace: string | ((substring: string, ...args: string[]) => string)
package/src/sse.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // (voice connector). One home for the `event:`/`data:`/`retry:` field parse
4
4
  // that was hand-rolled in connectors/voice and dashboard/src/lib/api.ts.
5
5
 
6
- export interface ParsedSseFrame {
6
+ interface ParsedSseFrame {
7
7
  /** Event name; defaults to "message" per the SSE spec when no `event:` field. */
8
8
  event: string;
9
9
  /** Each `data:` line, in order. Join with "\n" to reconstruct the payload. */
package/src/types.ts CHANGED
@@ -20,14 +20,36 @@ export interface AgentCard {
20
20
  * signed runner token at registration). Absent for top-level/user/system agents. Powers
21
21
  * spawn quotas, the `spawnedBy:` search filter, scoped shutdown, and the no-grandchild gate. */
22
22
  spawnedBy?: string;
23
+ /** Branch-workspace lifecycle state, server-derived from the agent's owned isolated
24
+ * worktree (#236). Absent for non-branch agents (no live isolated workspace). Lets the
25
+ * dashboard show a "where is this in the merge-back" badge without recomputing it. */
26
+ branchState?: BranchState;
27
+ /** Id of the live isolated workspace this agent owns — populated whenever `branchState`
28
+ * is, so the dashboard can deep-link the badge to that workspace row (#236). */
29
+ branchWorkspaceId?: string;
23
30
  lastSeen: number;
24
31
  createdAt: number;
25
32
  }
26
33
 
27
34
  export type AgentStatus = "online" | "idle" | "busy" | "stale" | "offline";
28
35
 
29
- export type CapabilitySource = "catalog" | "provider" | "runtime" | "override" | "estimate";
30
- export type CapabilityConfidence = "declared" | "reported" | "verified" | "estimated" | "unknown";
36
+ /**
37
+ * At-a-glance branch-workspace state for an isolated-workspace owner (#236). One
38
+ * server-derived projection of `WorkspaceStatus` + claim + git ahead/dirty, so the
39
+ * human can answer "does this agent have unlanded work, and where is it in the
40
+ * merge-back lifecycle" from the agent card alone.
41
+ * - `idle` ⚪ active worktree, nothing to land (0 ahead, clean tree)
42
+ * - `changes` 🟡 active worktree with commits/dirty work — human can mark it ready
43
+ * - `ready` 🔵 handed off; the relay auto-merge will land it (~2 min sweep)
44
+ * - `steward` 🟠 under reconciliation (a steward holds it, or conflict/merge in flight)
45
+ * - `blocked` 🔴 escalated/failed — needs human attention
46
+ */
47
+ export type BranchState = "idle" | "changes" | "ready" | "steward" | "blocked";
48
+ /** All BranchState values, for exhaustive UI maps and validation. */
49
+ export const BRANCH_STATE_VALUES = ["idle", "changes", "ready", "steward", "blocked"] as const satisfies readonly BranchState[];
50
+
51
+ type CapabilitySource = "catalog" | "provider" | "runtime" | "override" | "estimate";
52
+ type CapabilityConfidence = "declared" | "reported" | "verified" | "estimated" | "unknown";
31
53
 
32
54
  export interface ProviderCapabilities {
33
55
  lifecycle: {
@@ -99,7 +121,7 @@ export interface ProviderCapabilities {
99
121
  lastUpdatedAt: number;
100
122
  }
101
123
 
102
- export type ContextLifecycleState =
124
+ type ContextLifecycleState =
103
125
  | "fresh"
104
126
  | "primed"
105
127
  | "working"
@@ -249,7 +271,7 @@ export interface ContextBudget {
249
271
  priorityCutoff: 1 | 2 | 3;
250
272
  }
251
273
 
252
- export interface TaskHistorySummary {
274
+ interface TaskHistorySummary {
253
275
  taskId: number;
254
276
  agentId: string;
255
277
  status: string;
@@ -303,7 +325,7 @@ export interface MemoryBrokerContext {
303
325
 
304
326
  export type MemoryBrokerKind = "sqlite" | "http" | "command";
305
327
 
306
- export interface SqliteMemoryBrokerConfig {
328
+ interface SqliteMemoryBrokerConfig {
307
329
  type: "sqlite";
308
330
  }
309
331
 
@@ -332,6 +354,31 @@ export type MessageKind =
332
354
  | "system"
333
355
  | "session";
334
356
 
357
+ /**
358
+ * Mechanical message kinds: the relay's own lifecycle/observability lane, not
359
+ * agent-directed messaging. They bypass delivery resolution (never re-delivered
360
+ * into a session) and — when targeting a reserved sink — the recipient-constraint
361
+ * auth check (a managed token's `targets`/`policies`/`agents` constraints gate which
362
+ * *agents* it may message, not a session-mirror capture to the reserved sink; #284).
363
+ * Keep in sync with the `MessageKind` union.
364
+ */
365
+ export const MECHANICAL_MESSAGE_KINDS: readonly MessageKind[] = ["system", "control", "session"];
366
+
367
+ export function isMechanicalMessageKind(kind: string | undefined): boolean {
368
+ return MECHANICAL_MESSAGE_KINDS.includes((kind ?? "") as MessageKind);
369
+ }
370
+
371
+ /**
372
+ * Reserved built-in identities that are not real agents: the `user` chat/mirror sink
373
+ * and the `system` lifecycle sender. They are never registered, polled, or delivered to
374
+ * like agents, so recipient constraints don't apply to mechanical posts addressed to them.
375
+ */
376
+ export const RESERVED_AGENT_IDS: readonly string[] = ["user", "system"];
377
+
378
+ export function isReservedAgentId(id: string | undefined): boolean {
379
+ return id === "user" || id === "system";
380
+ }
381
+
335
382
  /**
336
383
  * Session-mirror event taxonomy. Every `kind: "session"` message carries a
337
384
  * `payload.session` of this shape so the dashboard can render the live provider
@@ -342,9 +389,9 @@ export type MessageKind =
342
389
  * and `notice` render discreetly (collapsed/inline activity, never bubbles).
343
390
  * A legacy session message with no `payload.session` is treated as a `response`.
344
391
  */
345
- export type SessionEventType = "prompt" | "response" | "narration" | "reasoning" | "tool" | "notice";
392
+ type SessionEventType = "prompt" | "response" | "narration" | "reasoning" | "tool" | "notice";
346
393
 
347
- export type SessionEventOrigin = "chat" | "terminal" | "provider";
394
+ type SessionEventOrigin = "chat" | "terminal" | "provider";
348
395
 
349
396
  export interface MessageSessionMeta {
350
397
  type: SessionEventType;
@@ -1150,14 +1197,14 @@ export type OrchestratorStatus = "online" | "offline";
1150
1197
  /** Spawn providers — the runtime tuple is the single source of truth; the type derives from it. */
1151
1198
  export const SPAWN_PROVIDERS = ["claude", "codex"] as const;
1152
1199
  export type SpawnProvider = (typeof SPAWN_PROVIDERS)[number];
1153
- export function isSpawnProvider(value: unknown): value is SpawnProvider {
1200
+ function isSpawnProvider(value: unknown): value is SpawnProvider {
1154
1201
  return typeof value === "string" && (SPAWN_PROVIDERS as readonly string[]).includes(value);
1155
1202
  }
1156
1203
 
1157
1204
  /** Approval modes — runtime tuple + derived type. */
1158
1205
  export const APPROVAL_MODES = ["open", "guarded", "read-only"] as const;
1159
1206
  export type SpawnApprovalMode = (typeof APPROVAL_MODES)[number];
1160
- export function isApprovalMode(value: unknown): value is SpawnApprovalMode {
1207
+ function isApprovalMode(value: unknown): value is SpawnApprovalMode {
1161
1208
  return typeof value === "string" && (APPROVAL_MODES as readonly string[]).includes(value);
1162
1209
  }
1163
1210
 
@@ -1203,7 +1250,7 @@ export interface WorkspaceProbe {
1203
1250
  error?: string;
1204
1251
  }
1205
1252
 
1206
- export interface WorkspaceGitCommit {
1253
+ interface WorkspaceGitCommit {
1207
1254
  sha: string;
1208
1255
  message: string;
1209
1256
  at?: number;
@@ -1311,8 +1358,16 @@ export interface WorkspaceMergeResult {
1311
1358
  prUrl?: string;
1312
1359
  branch?: string;
1313
1360
  baseRef?: string;
1314
- /** SHA base now points at after a successful rebase-ff. */
1361
+ /** SHA of the landed commit the agent branch's tip, preserved verbatim (#287).
1362
+ * This is the SHA reported in the `branch.landed` notice, so it exists on base
1363
+ * exactly as the agent produced it (no rebase rewrite). On a clean fast-forward
1364
+ * it equals {@link baseSha}; on a no-ff merge it's the merge's second parent. */
1315
1365
  mergedSha?: string;
1366
+ /** SHA base points at after the land (#287): equals {@link mergedSha} on a
1367
+ * fast-forward, or the merge commit on a no-ff merge when base had advanced. The
1368
+ * relay records this as the recycled workspace's new base_sha. Absent on older
1369
+ * orchestrators — consumers fall back to {@link mergedSha}. */
1370
+ baseSha?: string;
1316
1371
  /** Subject line of the landed commit (git log -1 --format=%s of mergedSha), for
1317
1372
  * the `branch.landed` notification body (#239). Best-effort; absent on older
1318
1373
  * orchestrators or when the subject can't be read. */
@@ -1548,7 +1603,7 @@ export interface ManagedAgentState {
1548
1603
  updatedAt: number;
1549
1604
  }
1550
1605
 
1551
- export type SpawnPolicyMode = "always-on" | "on-demand";
1606
+ type SpawnPolicyMode = "always-on" | "on-demand";
1552
1607
 
1553
1608
  export type AgentProfileProvider = SpawnProvider | "any";
1554
1609
  export type AgentProfileBase = "host" | "minimal" | "isolated";
@@ -1921,7 +1976,7 @@ export interface OrchestratorRuntimeInput {
1921
1976
  providerCatalog?: ProviderCatalogSummary[];
1922
1977
  }
1923
1978
 
1924
- export interface OrchestratorSpawnInput {
1979
+ interface OrchestratorSpawnInput {
1925
1980
  provider: SpawnProvider;
1926
1981
  model?: string;
1927
1982
  effort?: SpawnEffort;
@@ -2016,7 +2071,7 @@ export interface ProviderCatalogSummary {
2016
2071
  }>;
2017
2072
  }
2018
2073
 
2019
- export interface OrchestratorSpawnResult {
2074
+ interface OrchestratorSpawnResult {
2020
2075
  orchestratorId: string;
2021
2076
  provider: SpawnProvider;
2022
2077
  sessionName?: string;
@@ -2057,19 +2112,19 @@ export interface RecipeAgent {
2057
2112
  env?: Record<string, string>;
2058
2113
  }
2059
2114
 
2060
- export interface RecipeWorkflow {
2115
+ interface RecipeWorkflow {
2061
2116
  trigger?: string;
2062
2117
  fanOut?: "all" | "first";
2063
2118
  collect?: string;
2064
2119
  routing?: RecipeRoute[];
2065
2120
  }
2066
2121
 
2067
- export interface RecipeRoute {
2122
+ interface RecipeRoute {
2068
2123
  pattern: string;
2069
2124
  pipeline: string[];
2070
2125
  }
2071
2126
 
2072
- export interface RecipeLifecycle {
2127
+ interface RecipeLifecycle {
2073
2128
  mode?: "persistent" | "ephemeral";
2074
2129
  idleTimeoutMs?: number;
2075
2130
  memory?: RecipeMemoryPolicy;
@@ -2186,7 +2241,7 @@ export interface TokenConstraints {
2186
2241
  canDelegate?: boolean;
2187
2242
  }
2188
2243
 
2189
- export type TokenScope =
2244
+ type TokenScope =
2190
2245
  | "system:admin"
2191
2246
  | "token:read"
2192
2247
  | "token:write"
@@ -2291,7 +2346,7 @@ export function errMessage(error: unknown): string {
2291
2346
  // --- Relay connection defaults ---
2292
2347
 
2293
2348
  /** Default port the relay server listens on. */
2294
- export const DEFAULT_RELAY_PORT = 4850;
2349
+ const DEFAULT_RELAY_PORT = 4850;
2295
2350
 
2296
2351
  /** Default relay base URL. Loopback spelling settled on `127.0.0.1` (not `localhost`). */
2297
2352
  export const DEFAULT_RELAY_URL = `http://127.0.0.1:${DEFAULT_RELAY_PORT}`;