@vertesia/common 1.4.0-dev.20260615.051508Z → 1.4.0-dev.20260629.130134Z

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 (100) hide show
  1. package/lib/access-control.d.ts +2 -6
  2. package/lib/access-control.d.ts.map +1 -1
  3. package/lib/access-control.js +3 -0
  4. package/lib/access-control.js.map +1 -1
  5. package/lib/apikey.d.ts +4 -5
  6. package/lib/apikey.d.ts.map +1 -1
  7. package/lib/apikey.js.map +1 -1
  8. package/lib/apps.d.ts +15 -275
  9. package/lib/apps.d.ts.map +1 -1
  10. package/lib/apps.js.map +1 -1
  11. package/lib/ask-user.d.ts +29 -1
  12. package/lib/ask-user.d.ts.map +1 -1
  13. package/lib/data-platform.d.ts +33 -121
  14. package/lib/data-platform.d.ts.map +1 -1
  15. package/lib/data-platform.js.map +1 -1
  16. package/lib/environment.d.ts +11 -1
  17. package/lib/environment.d.ts.map +1 -1
  18. package/lib/environment.js.map +1 -1
  19. package/lib/index.d.ts +1 -1
  20. package/lib/index.d.ts.map +1 -1
  21. package/lib/index.js +1 -1
  22. package/lib/index.js.map +1 -1
  23. package/lib/interaction.d.ts +11 -7
  24. package/lib/interaction.d.ts.map +1 -1
  25. package/lib/interaction.js.map +1 -1
  26. package/lib/json-schema.d.ts +1 -1
  27. package/lib/json-schema.d.ts.map +1 -1
  28. package/lib/oauth-scopes.d.ts +5 -0
  29. package/lib/oauth-scopes.d.ts.map +1 -1
  30. package/lib/oauth-scopes.js +10 -1
  31. package/lib/oauth-scopes.js.map +1 -1
  32. package/lib/oauth-server.d.ts +17 -0
  33. package/lib/oauth-server.d.ts.map +1 -1
  34. package/lib/project.d.ts +1 -1
  35. package/lib/project.d.ts.map +1 -1
  36. package/lib/project.js +26 -26
  37. package/lib/project.js.map +1 -1
  38. package/lib/roles/types.d.ts +54 -0
  39. package/lib/roles/types.d.ts.map +1 -0
  40. package/lib/roles/types.js +17 -0
  41. package/lib/roles/types.js.map +1 -0
  42. package/lib/store/agent-approval.d.ts +18 -0
  43. package/lib/store/agent-approval.d.ts.map +1 -0
  44. package/lib/store/agent-approval.js +11 -0
  45. package/lib/store/agent-approval.js.map +1 -0
  46. package/lib/store/agent-run.d.ts +18 -4
  47. package/lib/store/agent-run.d.ts.map +1 -1
  48. package/lib/store/conversation-state.d.ts +54 -30
  49. package/lib/store/conversation-state.d.ts.map +1 -1
  50. package/lib/store/conversation-state.js +0 -3
  51. package/lib/store/conversation-state.js.map +1 -1
  52. package/lib/store/index.d.ts +1 -0
  53. package/lib/store/index.d.ts.map +1 -1
  54. package/lib/store/index.js +1 -0
  55. package/lib/store/index.js.map +1 -1
  56. package/lib/store/signals.d.ts +15 -0
  57. package/lib/store/signals.d.ts.map +1 -1
  58. package/lib/store/workflow.d.ts +41 -2
  59. package/lib/store/workflow.d.ts.map +1 -1
  60. package/lib/store/workflow.js +8 -5
  61. package/lib/store/workflow.js.map +1 -1
  62. package/lib/sts-token-types.d.ts +2 -2
  63. package/lib/sts-token-types.d.ts.map +1 -1
  64. package/lib/transient-tokens.d.ts +2 -2
  65. package/lib/transient-tokens.d.ts.map +1 -1
  66. package/lib/user.d.ts +2 -2
  67. package/lib/user.d.ts.map +1 -1
  68. package/lib/vertesia-common.js +1 -1
  69. package/lib/vertesia-common.js.map +1 -1
  70. package/package.json +7 -6
  71. package/src/access-control.ts +5 -6
  72. package/src/apikey.ts +4 -5
  73. package/src/apps.ts +15 -298
  74. package/src/ask-user.ts +31 -1
  75. package/src/data-platform.ts +35 -129
  76. package/src/environment.ts +12 -1
  77. package/src/index.ts +1 -1
  78. package/src/interaction.ts +13 -7
  79. package/src/json-schema.ts +1 -0
  80. package/src/oauth-scopes.ts +13 -1
  81. package/src/oauth-server.ts +17 -0
  82. package/src/project.ts +8 -8
  83. package/src/roles/types.ts +58 -0
  84. package/src/store/agent-approval.test.ts +18 -0
  85. package/src/store/agent-approval.ts +33 -0
  86. package/src/store/agent-run.ts +20 -3
  87. package/src/store/conversation-state.ts +62 -36
  88. package/src/store/index.ts +1 -0
  89. package/src/store/signals.ts +16 -0
  90. package/src/store/workflow.test.ts +60 -0
  91. package/src/store/workflow.ts +51 -7
  92. package/src/sts-token-types.ts +2 -2
  93. package/src/transient-tokens.ts +2 -2
  94. package/src/user.ts +2 -2
  95. package/lib/roles.d.ts +0 -19
  96. package/lib/roles.d.ts.map +0 -1
  97. package/lib/roles.js +0 -228
  98. package/lib/roles.js.map +0 -1
  99. package/src/roles.test.ts +0 -30
  100. package/src/roles.ts +0 -251
@@ -1,6 +1,7 @@
1
1
  import type { CompletionResult, ExecutionTokenUsage, StatelessExecutionOptions, ToolUse } from '@llumiverse/common';
2
2
  import type { ConversationStripOptions, ResolvedInteractionExecutionInfo, UserChannel } from '../interaction.js';
3
3
  import type { ExecutionRunDocRef } from '../runs.js';
4
+ import type { AgentToolApprovalMode, PendingToolApprovalResults, ToolApprovalGrant } from './agent-approval.js';
4
5
  import type { Plan, WorkflowAncestor } from './workflow.js';
5
6
 
6
7
  /**
@@ -13,34 +14,6 @@ export interface ToolReference {
13
14
  stored_at: string;
14
15
  }
15
16
 
16
- /** Reference to text content externalized to agent artifact storage. */
17
- export interface TextArtifactReference {
18
- storage_id: string;
19
- artifact_path: string;
20
- display_ref: string;
21
- sha256: string;
22
- size_bytes: number;
23
- content_type: string;
24
- }
25
-
26
- /**
27
- * Sidecar metadata for generated tool input fields that were stored outside
28
- * model-visible tool_input. Keyed by tool_use.id on ConversationState.
29
- */
30
- export interface ExternalizedToolInputRef {
31
- tool_name: string;
32
- input_path: ['content'];
33
- ref: TextArtifactReference;
34
- }
35
-
36
- export interface ExternalizedToolInputRefs {
37
- [toolUseId: string]: ExternalizedToolInputRef[];
38
- }
39
-
40
- export function toolInputRefsArtifactPath(storageId: string): string {
41
- return `agents/${storageId}/tool-input-refs.json`;
42
- }
43
-
44
17
  /**
45
18
  * Conversation state passed between workflow activities.
46
19
  * Contains all context needed to continue a multi-turn agent conversation.
@@ -66,14 +39,17 @@ export interface ConversationState {
66
39
  */
67
40
  tool_use?: ToolUse[];
68
41
 
69
- /**
70
- * Transport sidecar for large generated tool input fields.
71
- *
72
- * These refs are intentionally kept out of tool_use.tool_input so they are
73
- * not shown to the model. Tool execution hydrates them from artifact storage
74
- * immediately before activity validation.
75
- */
76
- tool_input_refs?: ExternalizedToolInputRefs;
42
+ /** Effective side-effecting tool approval mode for this interactive conversation. */
43
+ tool_approval_mode?: AgentToolApprovalMode;
44
+
45
+ /** Run-scoped, exact-target grants created by "allow this action for this run". */
46
+ tool_approval_grants?: Record<string, ToolApprovalGrant>;
47
+
48
+ /** Buffered tool results held while approval denial pauses until the next user message. */
49
+ pending_tool_approval_results?: PendingToolApprovalResults;
50
+
51
+ /** Compact, redacted latest user intent for reviewer-style system interactions. */
52
+ latest_user_message?: string;
77
53
 
78
54
  /**
79
55
  * The output of the this conversation step
@@ -168,12 +144,44 @@ export interface ConversationState {
168
144
  */
169
145
  latest_activity_id?: string;
170
146
 
147
+ /**
148
+ * Stable streaming ID from the latest LLM call.
149
+ * Unlike Temporal activity IDs, this is scoped to the concrete workflow run
150
+ * that produced the stream, so it remains safe across continue-as-new.
151
+ */
152
+ latest_streaming_id?: string;
153
+
171
154
  /**
172
155
  * Mapping of skill names to their related tools.
173
156
  * When a skill is called, its related tools are added to unlocked_tools.
174
157
  */
175
158
  skill_tool_map?: Record<string, string[]>;
176
159
 
160
+ /**
161
+ * Names of skills whose full instructions are already present in the live conversation
162
+ * history (i.e. were delivered by a prior `learn_<skill>` call). Used to make skill
163
+ * re-activation idempotent: a repeat call returns a short "already active" acknowledgement
164
+ * instead of re-dumping the instructions.
165
+ *
166
+ * Unlike `unlocked_tools`/`skill_tool_map` (which must survive a checkpoint so tools stay
167
+ * unlocked), this list is reset when a checkpoint compacts the conversation, because the
168
+ * summary no longer carries the skill instructions and the next call must re-deliver them.
169
+ */
170
+ skill_instructions_delivered?: string[];
171
+
172
+ /**
173
+ * Denylist of MCP tool-collection ids deactivated for this conversation.
174
+ * `undefined`/empty means all installed/connected MCP collections are active.
175
+ * Updated mid-conversation via the MCP config signal; consumed when tools are re-discovered.
176
+ */
177
+ disabled_mcp_collections?: string[];
178
+
179
+ /**
180
+ * MCP servers that are active (not disabled) and accessible to the user but not yet
181
+ * OAuth-connected. Surfaced to the agent (via discover_tools) so it can offer to connect.
182
+ */
183
+ pending_mcp_connections?: PendingMcpConnection[];
184
+
177
185
  /**
178
186
  * Current activity group ID for internal tool-execution progress messages.
179
187
  * All updates emitted during one tool-execution cycle should share this ID.
@@ -198,6 +206,24 @@ export interface ConversationState {
198
206
  launch_id?: string;
199
207
  }
200
208
 
209
+ /**
210
+ * An MCP server the user can connect to but hasn't yet (active + accessible, no OAuth token).
211
+ * Built at tool-discovery time and stored on the conversation state so the agent can
212
+ * discover it (by description) and ask the user to connect.
213
+ */
214
+ export interface PendingMcpConnection {
215
+ /** The app installation id owning the collection (used for OAuth operations). */
216
+ app_install_id: string;
217
+ /** The MCP tool-collection id. */
218
+ collection_id: string;
219
+ /** Human-readable label for the server/collection. */
220
+ name: string;
221
+ /** Manifest description of what the server provides (used for discovery). */
222
+ description?: string;
223
+ /** Tool-name prefix for this collection. */
224
+ namespace?: string;
225
+ }
226
+
201
227
  /** Skill metadata collected at workflow start for upfront sandbox hydration */
202
228
  export interface AvailableSkill {
203
229
  /** Skill name (e.g., "analyze_data") - without the "learn_" prefix */
@@ -1,4 +1,5 @@
1
1
  export * from './activity-catalog.js';
2
+ export * from './agent-approval.js';
2
3
  export * from './agent-run.js';
3
4
  export * from './collections.js';
4
5
  export * from './common.js';
@@ -1,5 +1,10 @@
1
1
  export interface UserInputSignal {
2
2
  message: string;
3
+ /**
4
+ * Client-generated id used to correlate a UserInput signal with the
5
+ * persisted QUESTION message emitted by the workflow.
6
+ */
7
+ client_message_id?: string;
3
8
  metadata?: Record<string, unknown>;
4
9
  auth_token?: string;
5
10
  /**
@@ -10,6 +15,17 @@ export interface UserInputSignal {
10
15
  attachments?: Attachment[];
11
16
  }
12
17
 
18
+ export interface StopSignal {
19
+ message?: string;
20
+ /**
21
+ * Client-generated id used to correlate a Stop signal with the persisted
22
+ * IDLE marker emitted by the workflow.
23
+ */
24
+ client_message_id?: string;
25
+ metadata?: Record<string, unknown>;
26
+ auth_token?: string;
27
+ }
28
+
13
29
  /**
14
30
  * Attachment metadata for processing in conversation workflows.
15
31
  */
@@ -160,6 +160,28 @@ describe('CompactMessage converters', () => {
160
160
  expect(compact.d).toEqual({ plan: [{ id: 1, goal: 'Step 1' }] });
161
161
  });
162
162
 
163
+ it('preserves user message acknowledgement details', () => {
164
+ const legacy: AgentMessage = {
165
+ type: AgentMessageType.QUESTION,
166
+ timestamp: 1234567890,
167
+ workflow_run_id: 'run-123',
168
+ message: 'Follow up',
169
+ details: {
170
+ event_class: 'user_content',
171
+ ack: 'message-1',
172
+ _deliveryStatus: 'consumed',
173
+ },
174
+ };
175
+
176
+ const compact = toCompactMessage(legacy);
177
+
178
+ expect(compact.d).toEqual({
179
+ event_class: 'user_content',
180
+ ack: 'message-1',
181
+ _deliveryStatus: 'consumed',
182
+ });
183
+ });
184
+
163
185
  it('handles streaming chunk with is_final flag', () => {
164
186
  const legacy: AgentMessage = {
165
187
  type: AgentMessageType.STREAMING_CHUNK,
@@ -199,6 +221,24 @@ describe('CompactMessage converters', () => {
199
221
  expect(compact.f).toBeUndefined();
200
222
  });
201
223
 
224
+ it('restores run-scoped streaming id from compact streaming chunk details', () => {
225
+ const compact: CompactMessage = {
226
+ t: AgentMessageType.STREAMING_CHUNK,
227
+ m: 'chunk content',
228
+ i: 'activity-7',
229
+ d: {
230
+ streaming_id: 'run-2-activity-7',
231
+ streaming_id_scope: 'workflow_run',
232
+ },
233
+ };
234
+
235
+ const restored = toAgentMessage(compact, 'workflow-id');
236
+
237
+ expect(restored.details?.streaming_id).toBe('run-2-activity-7');
238
+ expect(restored.details?.streaming_id_scope).toBe('workflow_run');
239
+ expect(restored.details?.activity_id).toBe('activity-7');
240
+ });
241
+
202
242
  it('normalizes legacy string type values', () => {
203
243
  // Simulate a message from Redis with old string type
204
244
  const legacy = {
@@ -282,6 +322,26 @@ describe('CompactMessage converters', () => {
282
322
  expect(legacy.details).toEqual({ batch_id: 'batch-1', completed: 5, total: 10 });
283
323
  });
284
324
 
325
+ it('restores user message acknowledgement details', () => {
326
+ const compact: CompactMessage = {
327
+ t: AgentMessageType.QUESTION,
328
+ m: 'Follow up',
329
+ d: {
330
+ event_class: 'user_content',
331
+ ack: 'message-1',
332
+ _deliveryStatus: 'consumed',
333
+ },
334
+ };
335
+
336
+ const legacy = toAgentMessage(compact, 'run-1');
337
+
338
+ expect(legacy.details).toEqual({
339
+ event_class: 'user_content',
340
+ ack: 'message-1',
341
+ _deliveryStatus: 'consumed',
342
+ });
343
+ });
344
+
285
345
  it('restores streaming chunk details with is_final', () => {
286
346
  const compact: CompactMessage = {
287
347
  t: AgentMessageType.STREAMING_CHUNK,
@@ -1,4 +1,4 @@
1
- import type { HttpTimeoutOptions, ModelOptions } from '@llumiverse/common';
1
+ import type { ExecutionTokenUsage, HttpTimeoutOptions, ModelOptions } from '@llumiverse/common';
2
2
  import type {
3
3
  ConversationVisibility,
4
4
  InteractionExecutionConfiguration,
@@ -7,6 +7,7 @@ import type {
7
7
  } from '../interaction.js';
8
8
  import type { JSONObject, JSONValue } from '../json.js';
9
9
  import type { JSONSchema } from '../json-schema.js';
10
+ import type { AgentToolApprovalMode } from './agent-approval.js';
10
11
  import type { WorkflowInput } from './dsl-workflow.js';
11
12
 
12
13
  export enum ContentEventName {
@@ -638,6 +639,7 @@ export interface WorkflowInteractionVars {
638
639
  type: string;
639
640
  interaction: string;
640
641
  interactive: boolean;
642
+ tool_approval_mode?: AgentToolApprovalMode;
641
643
  debug_mode?: boolean;
642
644
  non_blocking_subagents?: boolean;
643
645
  /**
@@ -654,6 +656,11 @@ export interface WorkflowInteractionVars {
654
656
  };
655
657
  interactionParamsSchema?: JSONSchema;
656
658
  collection_id?: string;
659
+ /**
660
+ * Denylist of MCP tool-collection ids deactivated for this conversation.
661
+ * `undefined`/empty ⇒ all installed/connected MCP collections are active.
662
+ */
663
+ disabled_mcp_collections?: string[];
657
664
  /**
658
665
  * The token threshold in thousands (K) for creating checkpoints.
659
666
  * If total tokens exceed this value, a checkpoint will be created.
@@ -736,6 +743,7 @@ export enum AgentMessageType {
736
743
  }
737
744
 
738
745
  export interface AgentMessageDetails extends Record<string, unknown> {
746
+ ack?: string;
739
747
  event_class?: string;
740
748
  tool?: string;
741
749
  tools?: string[];
@@ -752,15 +760,20 @@ export interface AgentMessageDetails extends Record<string, unknown> {
752
760
  message_to_human?: string;
753
761
  duration_ms?: number;
754
762
  observation?: unknown;
763
+ token_usage?: ExecutionTokenUsage;
764
+ checkpoint_at?: number;
765
+ checkpoint_threshold?: number;
755
766
  workflow_run_id?: string;
756
767
  outputFiles?: string[];
757
768
  files?: ConversationFile[] | string[];
758
769
  plan?: PlanTask[];
759
770
  streaming_id?: string;
771
+ streaming_id_scope?: 'workflow_run' | 'workstream';
760
772
  chunk_index?: number;
761
773
  is_final?: boolean;
762
774
  _optimistic?: boolean;
763
775
  _messageId?: string;
776
+ _deliveryStatus?: 'sending' | 'received' | 'consumed' | 'failed';
764
777
  }
765
778
 
766
779
  // ============================================
@@ -871,7 +884,7 @@ export interface StreamingChunkDetails {
871
884
  /** Unique identifier grouping chunks from the same stream */
872
885
  streaming_id: string;
873
886
  /** Order of this chunk within the stream (0-indexed) */
874
- chunk_index: number;
887
+ chunk_index?: number;
875
888
  /** True if this is the final chunk of the stream */
876
889
  is_final: boolean;
877
890
  /** Activity ID for deduplication with final THOUGHT/ANSWER message */
@@ -1063,14 +1076,18 @@ export function toAgentMessage(compact: CompactMessage, workflowRunId: string =
1063
1076
 
1064
1077
  if (compact.d !== undefined && compact.d !== null) message.details = compact.d;
1065
1078
 
1066
- // For streaming chunks, restore is_final and streaming_id in details
1067
- // (streaming_id removed from wire format, use workstream_id as grouping key)
1079
+ // For streaming chunks, restore is_final and preserve an explicit streaming_id
1080
+ // when present. Older chunks fall back to workstream_id as their grouping key.
1068
1081
  if (compact.t === AgentMessageType.STREAMING_CHUNK) {
1082
+ const details: AgentMessageDetails = typeof compact.d === 'object' && compact.d !== null ? compact.d : {};
1083
+ const streamingId = typeof details.streaming_id === 'string' ? details.streaming_id : compact.w || 'main';
1084
+ const activityId = compact.i ?? (typeof details.activity_id === 'string' ? details.activity_id : undefined);
1085
+
1069
1086
  message.details = {
1070
- ...(typeof compact.d === 'object' ? compact.d : {}),
1071
- streaming_id: compact.w || 'main', // Use workstream_id as streaming_id
1087
+ ...details,
1088
+ streaming_id: streamingId,
1072
1089
  is_final: compact.f === 1,
1073
- activity_id: compact.i, // For deduplication with final THOUGHT/ANSWER
1090
+ ...(activityId ? { activity_id: activityId } : {}),
1074
1091
  };
1075
1092
  }
1076
1093
 
@@ -1393,6 +1410,7 @@ export interface WorkstreamProgressInfo {
1393
1410
  export interface ActiveWorkstreamEntry {
1394
1411
  launch_id: string;
1395
1412
  workstream_id: string;
1413
+ kind?: 'agent' | 'process';
1396
1414
  interaction: string;
1397
1415
  started_at: number;
1398
1416
  elapsed_ms: number;
@@ -1403,9 +1421,35 @@ export interface ActiveWorkstreamEntry {
1403
1421
  child_workflow_id: string;
1404
1422
  /** Child workflow run ID — use with retrieveMessages / streamMessages */
1405
1423
  child_workflow_run_id?: string;
1424
+ process_run_id?: string;
1425
+ process_workflow_id?: string;
1426
+ process_name?: string;
1427
+ process_run_type?: 'programmatic' | 'supervised';
1428
+ }
1429
+
1430
+ /** Recently completed workstream entry returned by the ActiveWorkstreams query */
1431
+ export interface CompletedWorkstreamEntry {
1432
+ launch_id: string;
1433
+ workstream_id: string;
1434
+ kind?: 'agent' | 'process';
1435
+ status: 'completed' | 'failed' | 'canceled' | 'timeout';
1436
+ summary?: string;
1437
+ error?: string;
1438
+ duration_ms?: number;
1439
+ started_at?: number;
1440
+ interaction?: string;
1441
+ last_progress?: WorkstreamProgressInfo;
1442
+ child_workflow_id?: string;
1443
+ child_workflow_run_id?: string;
1444
+ process_run_id?: string;
1445
+ process_workflow_id?: string;
1446
+ process_name?: string;
1406
1447
  }
1407
1448
 
1408
1449
  /** Result of the ActiveWorkstreams Temporal query */
1409
1450
  export interface ActiveWorkstreamsQueryResult {
1410
1451
  running: ActiveWorkstreamEntry[];
1452
+ completed?: CompletedWorkstreamEntry[];
1453
+ /** True when the workflow could not answer this optional query. */
1454
+ unavailable?: boolean;
1411
1455
  }
@@ -2,7 +2,7 @@
2
2
  * STS Token Request Types
3
3
  * These types define the structure for token requests to the Security Token Service
4
4
  */
5
- import type { ProjectRoles } from './project.js';
5
+ import type { SystemRoles } from './project.js';
6
6
 
7
7
  export type TokenType = 'apikey' | 'user' | 'project' | 'environment' | 'agent' | 'service_account';
8
8
  export type SigningAlgorithm = 'ES256' | 'RS256';
@@ -81,7 +81,7 @@ export interface ServiceAccountTokenRequest extends BaseTokenRequest {
81
81
  type: 'service_account';
82
82
  account_id: string;
83
83
  project_id: string; // Will verify it belongs to account
84
- roles?: ProjectRoles[]; // Optional - roles for the service account token
84
+ roles?: SystemRoles[]; // Optional - roles for the service account token
85
85
  name?: string;
86
86
  }
87
87
 
@@ -1,4 +1,4 @@
1
- import type { ProjectRef, ProjectRoles } from './project.js';
1
+ import type { ProjectRef, SystemRoles } from './project.js';
2
2
  import type { AccountRef, UserRef } from './user.js';
3
3
 
4
4
  export enum TransientTokenType {
@@ -20,7 +20,7 @@ export interface CreateOrUpdateTransientTokenPayload<T> extends Partial<Transien
20
20
 
21
21
  export interface UserInviteTokenData {
22
22
  email: string;
23
- role: ProjectRoles;
23
+ role: SystemRoles;
24
24
  account: AccountRef;
25
25
  project?: ProjectRef;
26
26
  invited_by: UserRef;
package/src/user.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ApiKey } from './apikey.js';
2
- import type { ProjectRef, ProjectRoles } from './project.js';
2
+ import type { ProjectRef, SystemRoles } from './project.js';
3
3
 
4
4
  export interface UserWithAccounts extends User {
5
5
  accounts: AccountRef[];
@@ -110,7 +110,7 @@ export const AccountRefPopulate = 'id name';
110
110
 
111
111
  export interface InviteUserRequestPayload {
112
112
  email: string;
113
- role: ProjectRoles;
113
+ role: SystemRoles;
114
114
  }
115
115
 
116
116
  export interface InviteUserResponsePayload {
package/lib/roles.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import { Permission } from './access-control.js';
2
- import { ProjectRoles } from './project.js';
3
- export declare class Role {
4
- name: ProjectRoles;
5
- permissions: Set<Permission>;
6
- constructor(name: ProjectRoles, permissions: Permission[]);
7
- hasPermission(permission: Permission): boolean;
8
- }
9
- export declare class RoleList {
10
- readonly roles: Role[];
11
- private constructor();
12
- static fromRoleNames(roleNames: ProjectRoles[]): RoleList;
13
- static fromRoleName(roleName: ProjectRoles): RoleList;
14
- hasPermission(perm: Permission): boolean;
15
- }
16
- export declare function getRoleByName(name: ProjectRoles): Role;
17
- export declare function listRoles(): Role[];
18
- export declare function getPermissionsForRoles(roleNames: Iterable<ProjectRoles>): Permission[];
19
- //# sourceMappingURL=roles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../src/roles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,qBAAa,IAAI;IAGF,IAAI,EAAE,YAAY;IAF7B,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;gBAElB,IAAI,EAAE,YAAY,EACzB,WAAW,EAAE,UAAU,EAAE;IAK7B,aAAa,CAAC,UAAU,EAAE,UAAU;CAGvC;AAED,qBAAa,QAAQ;aACmB,KAAK,EAAE,IAAI,EAAE;IAAjD,OAAO;IAEP,MAAM,CAAC,aAAa,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,QAAQ;IAKzD,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ;IAKrD,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;CAG3C;AAsMD,wBAAgB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAItD;AAED,wBAAgB,SAAS,IAAI,IAAI,EAAE,CAElC;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,UAAU,EAAE,CAStF"}