@alfe.ai/agent-api-client 0.0.13 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  //#region ../../packages-internal/types/dist/access.d.ts
2
+
2
3
  /**
3
4
  * The four resource scopes at which a permission can apply.
4
5
  * Order is meaningful: broader scopes first (`org`) → narrower last (`agent`).
@@ -129,19 +130,89 @@ interface EncryptedEnvelopeV1 {
129
130
  authTag: string;
130
131
  dataKeyCiphertext: string;
131
132
  }
132
- /** Opaque metadata about a secret row — never includes plaintext. */
133
+ /**
134
+ * Display/validation hint for a field's value. `"json"` signals that the
135
+ * string is a JSON-stringified payload that consumers should `JSON.parse`.
136
+ */
137
+ declare const FIELD_FORMATS: readonly ["text", "email", "url", "phone", "date", "number", "json"];
138
+ type FieldFormat = (typeof FIELD_FORMATS)[number];
139
+ /**
140
+ * Whether a field is stored in plaintext (visible to anyone with read access)
141
+ * or encrypted (requires KMS + the right encryption context to read).
142
+ */
143
+ declare const FIELD_SENSITIVITIES: readonly ["plaintext", "encrypted"];
144
+ type FieldSensitivity = (typeof FIELD_SENSITIVITIES)[number];
145
+ /**
146
+ * A field on a secret. `value` is always a string at the wire; for encrypted
147
+ * fields it's the plaintext at the API edge (the service encrypts before
148
+ * persistence). Reads from the dashboard omit `value` for encrypted fields;
149
+ * agents get a `FieldEnvelope` instead and decrypt locally.
150
+ */
151
+ interface Field {
152
+ key: string;
153
+ format?: FieldFormat;
154
+ sensitivity: FieldSensitivity;
155
+ value: string;
156
+ }
157
+ /**
158
+ * Secret category — drives icon/template/filter behaviour. Defaults to
159
+ * `"other"` for migrated rows.
160
+ */
161
+ declare const SECRET_CATEGORIES: readonly ["login", "api_key", "database", "ssh_key", "certificate", "secure_note", "credit_card", "identity", "wifi", "other"];
162
+ type SecretCategory = (typeof SECRET_CATEGORIES)[number];
163
+ /**
164
+ * One field as exposed to readers. Encrypted fields have no `value` on the
165
+ * dashboard read path; the agent-side aggregate carries `envelope` instead.
166
+ */
167
+ interface FieldView {
168
+ key: string;
169
+ format?: FieldFormat;
170
+ sensitivity: FieldSensitivity;
171
+ /** Present for `sensitivity: "plaintext"` only. */
172
+ value?: string;
173
+ /** Present for `sensitivity: "encrypted"` on agent-side reads only. */
174
+ envelope?: EncryptedEnvelopeV1;
175
+ /** Plaintext fields that opt into `format: "json"` are pre-parsed for callers. */
176
+ parsedValue?: unknown;
177
+ rotatedAt?: string;
178
+ createdAt: string;
179
+ updatedAt: string;
180
+ }
181
+ /** A secret as assembled from its multi-row aggregate. */
182
+ interface SecretAggregate {
183
+ secretId: string;
184
+ secretName: string;
185
+ description?: string;
186
+ tags: string[];
187
+ category: SecretCategory;
188
+ fields: FieldView[];
189
+ changelogVersion: number;
190
+ createdAt: string;
191
+ updatedAt: string;
192
+ }
193
+ /** Metadata-only projection — used by list endpoints. */
133
194
  interface SecretMetadata {
134
195
  secretId: string;
135
196
  secretName: string;
136
197
  description?: string;
137
- tags?: string[];
198
+ tags: string[];
199
+ category: SecretCategory;
200
+ fieldKeys: string[];
201
+ changelogVersion: number;
138
202
  createdAt: string;
139
203
  updatedAt: string;
140
- rotatedAt?: string;
141
204
  }
142
- /** A single secret row including its encrypted envelope. */
143
- interface SecretEnvelopeResponse extends SecretMetadata {
205
+ /**
206
+ * Per-field encrypted envelope returned to agents on the agent-side aggregate.
207
+ * Agents decrypt locally using a data key fetched from `/decrypt-data-key`.
208
+ */
209
+ interface FieldEnvelope {
210
+ key: string;
211
+ format?: FieldFormat;
144
212
  envelope: EncryptedEnvelopeV1;
213
+ rotatedAt?: string;
214
+ createdAt: string;
215
+ updatedAt: string;
145
216
  }
146
217
  /** A scope the caller can read or write secrets in. */
147
218
  interface ScopeInfo {
@@ -159,6 +230,30 @@ interface GeneratedDataKey {
159
230
  plaintextKey: string;
160
231
  dataKeyCiphertext: string;
161
232
  }
233
+ /**
234
+ * Action types recorded in the secret changelog. Append-only.
235
+ */
236
+ declare const CHANGELOG_ACTIONS: readonly ["created", "deleted", "metadata_updated", "field_added", "field_rotated", "field_removed", "tag_added", "tag_removed"];
237
+ type ChangelogAction = (typeof CHANGELOG_ACTIONS)[number];
238
+ /** Who triggered a changelog entry. */
239
+ interface ChangelogActor {
240
+ kind: "user" | "agent" | "system";
241
+ id: string;
242
+ }
243
+ /**
244
+ * One audit row from the secret's changelog. Metadata only — never carries
245
+ * field VALUES (old or new). Rolling back a rotated secret is intentionally
246
+ * not supported.
247
+ */
248
+ interface ChangelogEntry {
249
+ changelogVersion: number;
250
+ action: ChangelogAction;
251
+ fieldKey?: string;
252
+ fieldSensitivity?: FieldSensitivity;
253
+ changedBy: ChangelogActor;
254
+ reason?: string;
255
+ timestamp: string;
256
+ }
162
257
  //# sourceMappingURL=secrets.d.ts.map
163
258
  //#endregion
164
259
  //#region src/index.d.ts
@@ -166,11 +261,147 @@ interface AgentApiClientConfig {
166
261
  apiKey: string;
167
262
  apiUrl: string;
168
263
  }
264
+ interface SyncAgentInfo {
265
+ agentId: string;
266
+ tenantId: string;
267
+ displayName: string;
268
+ s3Prefix: string;
269
+ status: "stale" | "syncing" | "synced";
270
+ fileCount?: number;
271
+ totalSize?: number;
272
+ lastSync?: string;
273
+ }
274
+ interface SyncManifestEntry {
275
+ hash: string;
276
+ size: number;
277
+ modified: string;
278
+ etag?: string;
279
+ storageClass?: string;
280
+ compressed?: boolean;
281
+ }
282
+ interface SyncManifest {
283
+ version: 1;
284
+ agentId: string;
285
+ lastSync: string;
286
+ files: Record<string, SyncManifestEntry>;
287
+ }
288
+ interface SyncPresignedUrl {
289
+ path: string;
290
+ url: string;
291
+ expiresAt: string;
292
+ }
293
+ interface SyncConfirmedUpload {
294
+ filePath: string;
295
+ hash: string;
296
+ size: number;
297
+ storageClass: "STANDARD" | "GLACIER_IR";
298
+ syncedAt: string;
299
+ }
300
+ interface SyncReconstructFile {
301
+ path: string;
302
+ size: number;
303
+ url: string;
304
+ storageClass?: string;
305
+ compressed?: boolean;
306
+ }
307
+ interface SyncReconstructBundle {
308
+ agentId: string;
309
+ mode: "full" | "active" | "memory";
310
+ fileCount: number;
311
+ totalSize: number;
312
+ files: SyncReconstructFile[];
313
+ expiresAt: string;
314
+ }
315
+ interface SyncAgentStats {
316
+ agentId: string;
317
+ standardBytes: number;
318
+ glacierBytes: number;
319
+ fileCount: number;
320
+ lastSyncAt: string | null;
321
+ }
322
+ interface SyncFileEntry {
323
+ filePath: string;
324
+ size: number;
325
+ modified: string;
326
+ contentHash: string;
327
+ storageClass?: string;
328
+ compressed?: boolean;
329
+ }
330
+ interface SyncSessionEntry {
331
+ sessionId: string;
332
+ size: number;
333
+ lastModified: string;
334
+ storageClass?: string;
335
+ isArchived: boolean;
336
+ }
337
+ interface SyncSessionContent {
338
+ sessionId: string;
339
+ content: string;
340
+ compressed: boolean;
341
+ }
342
+ interface SharedFileEntry {
343
+ filePath: string;
344
+ fileName: string;
345
+ size: number;
346
+ contentType?: string;
347
+ }
169
348
  declare class AgentApiClient {
170
349
  private readonly apiKey;
171
350
  private readonly apiUrl;
172
351
  constructor(config: AgentApiClientConfig);
173
352
  private request;
353
+ syncRegister(args?: {
354
+ displayName?: string;
355
+ }): Promise<{
356
+ agent: SyncAgentInfo;
357
+ }>;
358
+ syncGetManifest(): Promise<SyncManifest>;
359
+ syncPresign(args: {
360
+ files: {
361
+ path: string;
362
+ operation: "put" | "get";
363
+ contentType?: string;
364
+ }[];
365
+ }): Promise<{
366
+ urls: SyncPresignedUrl[];
367
+ }>;
368
+ syncConfirmUpload(args: {
369
+ filePath: string;
370
+ hash: string;
371
+ size: number;
372
+ storageClass?: "STANDARD" | "GLACIER_IR";
373
+ }): Promise<SyncConfirmedUpload>;
374
+ syncReconstruct(args: {
375
+ mode: "full" | "active" | "memory";
376
+ }): Promise<SyncReconstructBundle>;
377
+ syncGetStats(): Promise<SyncAgentStats>;
378
+ syncListFiles(args?: {
379
+ prefix?: string;
380
+ }): Promise<{
381
+ files: SyncFileEntry[];
382
+ }>;
383
+ syncListSessions(): Promise<{
384
+ sessions: SyncSessionEntry[];
385
+ }>;
386
+ syncGetSession(sessionId: string): Promise<SyncSessionContent>;
387
+ syncDeleteFile(filePath: string): Promise<{
388
+ removed: boolean;
389
+ }>;
390
+ sharedListFiles(args: {
391
+ scope: "org" | "team" | "project";
392
+ scopeId: string;
393
+ }): Promise<{
394
+ files: SharedFileEntry[];
395
+ nextCursor: string | null;
396
+ }>;
397
+ sharedDownloadUrl(args: {
398
+ scope: "org" | "team" | "project";
399
+ scopeId: string;
400
+ filePath: string;
401
+ }): Promise<{
402
+ downloadUrl: string;
403
+ expiresIn: number;
404
+ }>;
174
405
  listIntegrations(): Promise<IntegrationInstall[]>;
175
406
  getIntegrationConfig(integrationId: string): Promise<IntegrationConfigResult>;
176
407
  updateIntegrationConfig(integrationId: string, config: Record<string, unknown>): Promise<void>;
@@ -320,52 +551,135 @@ declare class AgentApiClient {
320
551
  recorded: boolean;
321
552
  }>;
322
553
  /**
323
- * Mint a fresh AES-256 data key for a new secret or rotation. The encryption
324
- * context is rebuilt server-side from `auth.tenantId` + the body fields; the
325
- * agent cannot forge context for a scope it doesn't own.
554
+ * Mint a fresh AES-256 data key for a specific (secret, field) pair. The
555
+ * encryption context is rebuilt server-side from `auth.tenantId` + the body
556
+ * fields including `fieldKey`; the agent cannot forge context for a scope
557
+ * or field it doesn't own. Legacy single-envelope secrets are migrated to
558
+ * `field#value` rows by the data migration, so call with `fieldKey: "value"`
559
+ * to reach them.
326
560
  */
327
561
  generateSecretDataKey(args: {
328
562
  scope: SecretScope;
329
563
  scopeId: string;
330
564
  secretId: string;
565
+ fieldKey: string;
331
566
  }): Promise<GeneratedDataKey>;
332
567
  /**
333
568
  * Unwrap a wrapped data key so the agent can decrypt the envelope locally.
334
- * KMS Decrypt will fail with `InvalidCiphertextException` if the envelope
335
- * was tampered with in a way that changes `{ tenantId, scope, scopeId, secretId }`.
569
+ * `fieldKey` MUST match the value supplied when the data key was generated
570
+ * (it's bound into KMS encryption context); mismatch fails with
571
+ * `InvalidCiphertextException`.
336
572
  */
337
573
  decryptSecretDataKey(args: {
338
574
  scope: SecretScope;
339
575
  scopeId: string;
340
576
  secretId: string;
577
+ fieldKey: string;
341
578
  dataKeyCiphertext: string;
342
579
  }): Promise<{
343
580
  plaintextKey: string;
344
581
  }>;
345
- /** Upload a pre-encrypted envelope for a secret. */
346
- putSecretEnvelope(args: {
582
+ /**
583
+ * Create a new secret with one or more fields. Encrypted fields must arrive
584
+ * pre-sealed (the agent has already obtained per-field data keys via
585
+ * `generateSecretDataKey({ ..., fieldKey })` and AES-encrypted locally).
586
+ * Plaintext fields ship the value inline.
587
+ */
588
+ createSecret(args: {
347
589
  scope: SecretScope;
348
590
  scopeId: string;
349
591
  secretId: string;
350
592
  secretName: string;
351
- envelope: EncryptedEnvelopeV1;
593
+ category?: SecretCategory;
352
594
  description?: string;
353
595
  tags?: string[];
596
+ fields: {
597
+ key: string;
598
+ format?: FieldFormat;
599
+ sensitivity: FieldSensitivity;
600
+ value?: string;
601
+ envelope?: EncryptedEnvelopeV1;
602
+ }[];
603
+ reason?: string;
604
+ }): Promise<SecretAggregate>;
605
+ /** Fetch the secret aggregate plus per-field encrypted envelopes. */
606
+ getSecret(args: {
607
+ scope: SecretScope;
608
+ scopeId: string;
609
+ secretId: string;
354
610
  }): Promise<{
611
+ aggregate: SecretAggregate;
612
+ envelopes: FieldEnvelope[];
613
+ }>;
614
+ /** Fetch one field. Plaintext: value inline. Encrypted: envelope. */
615
+ getSecretField(args: {
616
+ scope: SecretScope;
617
+ scopeId: string;
618
+ secretId: string;
619
+ fieldKey: string;
620
+ }): Promise<{
621
+ key: string;
622
+ sensitivity: FieldSensitivity;
623
+ format?: FieldFormat;
624
+ value?: string;
625
+ envelope?: EncryptedEnvelopeV1;
626
+ rotatedAt?: string;
627
+ createdAt: string;
628
+ updatedAt: string;
629
+ }>;
630
+ /** Add OR rotate one field. */
631
+ setSecretField(args: {
632
+ scope: SecretScope;
633
+ scopeId: string;
355
634
  secretId: string;
635
+ fieldKey: string;
636
+ sensitivity: FieldSensitivity;
637
+ format?: FieldFormat;
638
+ value?: string;
639
+ envelope?: EncryptedEnvelopeV1;
640
+ reason?: string;
641
+ }): Promise<{
642
+ fieldKey: string;
643
+ rotated: boolean;
356
644
  }>;
357
- /** Fetch the encrypted envelope for a single secret. */
358
- getSecretEnvelope(args: {
645
+ /** Remove one field. */
646
+ removeSecretField(args: {
359
647
  scope: SecretScope;
360
648
  scopeId: string;
361
649
  secretId: string;
362
- }): Promise<SecretEnvelopeResponse>;
363
- /** List metadata (never envelopes) for secrets in a scope. */
650
+ fieldKey: string;
651
+ }): Promise<void>;
652
+ /** Update secret-level metadata (name/description/tags/category). */
653
+ updateSecretMetadata(args: {
654
+ scope: SecretScope;
655
+ scopeId: string;
656
+ secretId: string;
657
+ secretName?: string;
658
+ description?: string;
659
+ tags?: string[];
660
+ category?: SecretCategory;
661
+ reason?: string;
662
+ }): Promise<SecretAggregate>;
663
+ /** List metadata for secrets in a scope. Optional filters route through the byFacet GSI. */
364
664
  listSecrets(args: {
365
665
  scope: SecretScope;
366
666
  scopeId: string;
667
+ category?: SecretCategory;
668
+ tag?: string;
669
+ fieldKey?: string;
367
670
  }): Promise<SecretMetadata[]>;
368
- /** Delete a secret. */
671
+ /** Bounded changelog read — metadata-only audit entries. */
672
+ getSecretHistory(args: {
673
+ scope: SecretScope;
674
+ scopeId: string;
675
+ secretId: string;
676
+ limit?: number;
677
+ cursor?: string;
678
+ }): Promise<{
679
+ entries: ChangelogEntry[];
680
+ nextCursor?: string;
681
+ }>;
682
+ /** Delete a secret (and all its field rows + tag rows + changelog rows). */
369
683
  deleteSecret(args: {
370
684
  scope: SecretScope;
371
685
  scopeId: string;
@@ -374,8 +688,9 @@ declare class AgentApiClient {
374
688
  /** Enumerate scopes (org/team/project/agent) this agent can access. */
375
689
  listSecretScopes(): Promise<ScopeInfo[]>;
376
690
  resolveIdentity(args: {
377
- platform: string;
691
+ provider: string;
378
692
  platformId: string;
693
+ kind?: "user" | "agent" | "service" | "bot" | "workspace";
379
694
  displayName?: string;
380
695
  }): Promise<{
381
696
  identityId: string | null;
@@ -384,41 +699,15 @@ declare class AgentApiClient {
384
699
  created?: boolean;
385
700
  reason?: string;
386
701
  }>;
387
- enforcePolicy(args: {
388
- platform: string;
389
- senderId: string;
390
- channelId?: string;
391
- }): Promise<{
392
- identityId: string | null;
393
- orgId: string | null;
394
- role: string | null;
395
- allowedTools: string[];
396
- deniedTools: string[];
397
- identified: boolean;
398
- }>;
399
- checkToolPermission(args: {
400
- platform: string;
401
- senderId: string;
402
- toolName: string;
403
- toolArgs?: Record<string, unknown>;
404
- channelId?: string;
405
- }): Promise<{
406
- allowed: boolean;
407
- reason?: string;
408
- }>;
409
702
  searchIdentities(args?: {
410
703
  q?: string;
411
704
  status?: string;
412
- tag?: string;
413
- platform?: string;
414
705
  limit?: number;
415
- offset?: number;
416
706
  }): Promise<{
417
707
  identities: unknown[];
418
708
  }>;
419
709
  getIdentityContext(identityId: string): Promise<{
420
- identity: unknown;
421
- recentChanges: unknown[];
710
+ context: unknown;
422
711
  }>;
423
712
  mergeIdentities(survivorId: string, args: {
424
713
  mergedId: string;
@@ -465,7 +754,6 @@ declare class AgentApiClient {
465
754
  }>;
466
755
  getIdentityChangelog(identityId: string, args?: {
467
756
  limit?: number;
468
- offset?: number;
469
757
  }): Promise<{
470
758
  entries: unknown[];
471
759
  }>;
@@ -483,9 +771,17 @@ declare class AgentApiClient {
483
771
  requestIdentityVerification(args: {
484
772
  claimedIdentityId: string;
485
773
  requestingIdentityId: string;
486
- requestingPlatform: string;
774
+ requestingProvider: string;
487
775
  requestingPlatformId: string;
488
- preferredChannel?: "sms" | "email";
776
+ preferredChannel?: "mobile" | "email";
777
+ /**
778
+ * Phase 2: agent-supplied contact endpoint. When provided, the top-level
779
+ * `preferredChannel` is ignored — the contact's channel wins.
780
+ */
781
+ contact?: {
782
+ channel: "email" | "mobile";
783
+ value: string;
784
+ };
489
785
  }): Promise<{
490
786
  verificationId: string;
491
787
  channel: string;
@@ -499,13 +795,43 @@ declare class AgentApiClient {
499
795
  error: string;
500
796
  }>;
501
797
  confirmIdentityVerification(args: {
798
+ claimedIdentityId: string;
502
799
  verificationId: string;
503
800
  phrase: string;
504
801
  }): Promise<{
505
802
  verified: boolean;
506
803
  identityId?: string;
804
+ /** Phase 2: how the confirm resolved — Scenario A vs B. */
805
+ action?: "merged" | "contact_verified";
507
806
  error?: string;
508
807
  }>;
808
+ /**
809
+ * Update display-shape fields on an Identity. Body excludes `email` /
810
+ * `phone` / `title` / `company` / `metadata` per Section D4 — contacts go
811
+ * via the verify flow, title/company live on OrgMembership, metadata is
812
+ * not agent-writable.
813
+ */
814
+ updateIdentity(identityId: string, args: {
815
+ name?: string;
816
+ avatarUrl?: string;
817
+ timezone?: string;
818
+ locale?: string;
819
+ }): Promise<{
820
+ ok: boolean;
821
+ }>;
822
+ /**
823
+ * Phase 2 (Section H): server-side verification of a Google Chat sender via
824
+ * the agent's existing Google OAuth credentials. Returns the resolved
825
+ * identity (created or matched via Scenario-B email enrichment).
826
+ */
827
+ resolveGoogleChatSender(args: {
828
+ senderUserId: string;
829
+ spaceId?: string;
830
+ }): Promise<{
831
+ identityId: string | null;
832
+ status: string;
833
+ accessAllowed: boolean;
834
+ }>;
509
835
  memorySearch(query: string, opts?: {
510
836
  limit?: number;
511
837
  topic?: string;
@@ -615,5 +941,5 @@ declare class AgentApiClient {
615
941
  }
616
942
  //# sourceMappingURL=index.d.ts.map
617
943
  //#endregion
618
- export { AgentApiClient, AgentApiClientConfig, type EncryptedEnvelopeV1, type GeneratedDataKey, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, type RegistryEntry, type ScopeInfo, type SecretEnvelopeResponse, type SecretMetadata, type SecretScope };
944
+ export { AgentApiClient, AgentApiClientConfig, type ChangelogAction, type ChangelogActor, type ChangelogEntry, type EncryptedEnvelopeV1, type Field, type FieldEnvelope, type FieldFormat, type FieldSensitivity, type FieldView, type GeneratedDataKey, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, type RegistryEntry, type ScopeInfo, type SecretAggregate, type SecretCategory, type SecretMetadata, type SecretScope, SharedFileEntry, SyncAgentInfo, SyncAgentStats, SyncConfirmedUpload, SyncFileEntry, SyncManifest, SyncManifestEntry, SyncPresignedUrl, SyncReconstructBundle, SyncReconstructFile, SyncSessionContent, SyncSessionEntry };
619
945
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["ResourceScope","RESOURCE_SCOPES","AccessLevel","ScopedAccess","AllScopedAccess","ResourceScope","DEFAULT_INTEGRATIONS","IntegrationVisibility","INTEGRATION_VISIBILITIES","IntegrationScope","INTEGRATION_SCOPES","IntegrationDesiredStatus","INTEGRATION_DESIRED_STATUSES","IntegrationActualStatus","INTEGRATION_ACTUAL_STATUSES","IntegrationInstall","Record","AgentIntegration","OrgIntegration","IntegrationConfigSchemaField","IntegrationConfigResult","RegistryEntry","ResourceScope","SecretScope","SECRET_SCOPES","EncryptedEnvelopeV1","SecretMetadata","SecretEnvelopeResponse","ScopeInfo","GeneratedDataKey"],"sources":["../../../packages-internal/types/dist/access.d.ts","../../../packages-internal/types/dist/integration.d.ts","../../../packages-internal/types/dist/secrets.d.ts","../src/index.ts"],"sourcesContent":["/**\n * The four resource scopes at which a permission can apply.\n * Order is meaningful: broader scopes first (`org`) → narrower last (`agent`).\n *\n * `IntegrationScope` in integration.ts and `SecretScope` in secrets.ts are\n * intentional aliases of this same enum — there is only one concept of\n * \"scope\" in Alfe.\n */\nexport declare const ResourceScope: {\n readonly Org: \"org\";\n readonly Team: \"team\";\n readonly Project: \"project\";\n readonly Agent: \"agent\";\n};\nexport type ResourceScope = (typeof ResourceScope)[keyof typeof ResourceScope];\n/** Ordered tuple of resource scope string values (broad → narrow). */\nexport declare const RESOURCE_SCOPES: readonly [\"org\" | \"team\" | \"project\" | \"agent\", ...(\"org\" | \"team\" | \"project\" | \"agent\")[]];\nexport declare const AccessLevel: {\n readonly None: \"none\";\n readonly Read: \"read\";\n readonly Write: \"write\";\n readonly Manage: \"manage\";\n};\nexport type AccessLevel = (typeof AccessLevel)[keyof typeof AccessLevel];\nexport interface ScopedAccess {\n scope: ResourceScope;\n scopeId: string;\n accessLevel: AccessLevel;\n /** Resolved role label (e.g. \"org_admin\", \"team_member\") */\n role: string;\n}\nexport interface AllScopedAccess {\n orgAccess: ScopedAccess;\n teamAccess: ScopedAccess[];\n projectAccess: ScopedAccess[];\n}\n//# sourceMappingURL=access.d.ts.map","import { ResourceScope } from \"./access.js\";\n/** Integrations auto-installed for ALL agents regardless of hosting type. Cannot be removed. */\nexport declare const DEFAULT_INTEGRATIONS: readonly string[];\n/** Controls where an integration appears: public (everyone), hidden (nowhere) */\nexport declare const IntegrationVisibility: {\n readonly Public: \"public\";\n readonly Hidden: \"hidden\";\n};\nexport type IntegrationVisibility = (typeof IntegrationVisibility)[keyof typeof IntegrationVisibility];\nexport declare const INTEGRATION_VISIBILITIES: readonly [\"public\" | \"hidden\", ...(\"public\" | \"hidden\")[]];\n/** Scope at which an integration is installed */\nexport declare const IntegrationScope: {\n readonly Org: \"org\";\n readonly Team: \"team\";\n readonly Project: \"project\";\n readonly Agent: \"agent\";\n};\nexport type IntegrationScope = ResourceScope;\nexport declare const INTEGRATION_SCOPES: readonly [\"org\" | \"team\" | \"project\" | \"agent\", ...(\"org\" | \"team\" | \"project\" | \"agent\")[]];\nexport declare const IntegrationDesiredStatus: {\n readonly Active: \"active\";\n readonly Removed: \"removed\";\n};\nexport type IntegrationDesiredStatus = (typeof IntegrationDesiredStatus)[keyof typeof IntegrationDesiredStatus];\nexport declare const INTEGRATION_DESIRED_STATUSES: readonly [\"active\" | \"removed\", ...(\"active\" | \"removed\")[]];\nexport declare const IntegrationActualStatus: {\n readonly Installing: \"installing\";\n readonly Active: \"active\";\n readonly Error: \"error\";\n readonly Removing: \"removing\";\n readonly Inactive: \"inactive\";\n readonly Unknown: \"unknown\";\n};\nexport type IntegrationActualStatus = (typeof IntegrationActualStatus)[keyof typeof IntegrationActualStatus];\nexport declare const INTEGRATION_ACTUAL_STATUSES: readonly [\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\", ...(\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\")[]];\nexport interface IntegrationInstall {\n scope: IntegrationScope;\n scopeId: string;\n integrationId: string;\n tenantId: string;\n desiredStatus: IntegrationDesiredStatus;\n actualStatus: IntegrationActualStatus;\n version: string;\n config: Record<string, unknown>;\n errorMessage: string;\n installedAt: string;\n updatedAt: string;\n}\n/** @deprecated Use IntegrationInstall instead */\nexport type AgentIntegration = IntegrationInstall;\n/** Org-scoped integration install */\nexport type OrgIntegration = IntegrationInstall;\nexport interface IntegrationConfigSchemaField {\n key: string;\n label: string;\n type: string;\n description?: string;\n required?: boolean;\n default?: string | number | boolean;\n options?: string[];\n select_options?: {\n value: string;\n label: string;\n }[];\n oauth_provider?: string;\n oauth_scopes?: string[];\n oauth_integration_id?: string;\n editable?: string;\n hidden?: boolean;\n}\nexport interface IntegrationConfigResult {\n integrationId: string;\n config: Record<string, unknown>;\n configSchema: IntegrationConfigSchemaField[];\n}\nexport interface RegistryEntry {\n id: string;\n name: string;\n description: string;\n versions: string[];\n latest: string;\n repository: string;\n commit: string;\n icon?: string;\n author?: {\n name: string;\n url?: string;\n } | string;\n pricing?: {\n type: \"free\" | \"paid\" | \"usage\";\n price?: number;\n currency?: string;\n interval?: \"month\" | \"year\";\n description?: string;\n };\n features?: string[];\n preview_images?: string[];\n config_schema?: IntegrationConfigSchemaField[];\n supported_agents?: string[];\n /** Scopes where this integration can be installed */\n supported_scopes?: IntegrationScope[];\n /** Visibility status — controls where integration appears */\n visibility?: IntegrationVisibility;\n}\n//# sourceMappingURL=integration.d.ts.map","/**\n * Secrets types — shared between services/secrets, @alfe.ai/agent-api-client,\n * the openclaw-secrets plugin, and dashboard clients.\n *\n * Server-side crypto and KMS glue live in @alfe/secret-store (Node/AWS-only);\n * this module is a pure, dependency-free shape contract safe for every\n * environment the agent-api-client ships to.\n */\nimport type { ResourceScope } from \"./access.js\";\n/** Scope levels at which a secret can be owned. Aliased to ResourceScope. */\nexport type SecretScope = ResourceScope;\nexport declare const SECRET_SCOPES: readonly [\"org\" | \"team\" | \"project\" | \"agent\", ...(\"org\" | \"team\" | \"project\" | \"agent\")[]];\n/**\n * v1 encrypted envelope as persisted by services/secrets and exchanged with\n * agents. Values are AES-256-GCM ciphertext; iv/authTag/ciphertext/dataKeyCiphertext\n * are all base64-encoded.\n */\nexport interface EncryptedEnvelopeV1 {\n version: 1;\n iv: string;\n ciphertext: string;\n authTag: string;\n dataKeyCiphertext: string;\n}\n/** Opaque metadata about a secret row — never includes plaintext. */\nexport interface SecretMetadata {\n secretId: string;\n secretName: string;\n description?: string;\n tags?: string[];\n createdAt: string;\n updatedAt: string;\n rotatedAt?: string;\n}\n/** A single secret row including its encrypted envelope. */\nexport interface SecretEnvelopeResponse extends SecretMetadata {\n envelope: EncryptedEnvelopeV1;\n}\n/** A scope the caller can read or write secrets in. */\nexport interface ScopeInfo {\n scope: SecretScope;\n scopeId: string;\n name?: string;\n}\n/**\n * KMS-issued data key, returned by the secrets service's\n * `/secrets/generate-data-key` KMS proxy endpoint. The plaintext key is\n * returned base64-encoded; callers MUST decode it to a Buffer and zero the\n * Buffer after use — never keep the plaintext as a JS string.\n */\nexport interface GeneratedDataKey {\n plaintextKey: string;\n dataKeyCiphertext: string;\n}\n//# sourceMappingURL=secrets.d.ts.map"],"mappings":";;AAQA;AAMA;;;;;;cANqBA;;ECJAO,SAAAA,IAAAA,EAAAA,MAAAA;EAITA,SAAAA,OAAAA,EAAAA,SAAqB;EAAA,SAAA,KAAA,EAAA,OAAA;;AAA+CA,KDMpEP,aAAAA,GCNoEO,CAAAA,ODM5CP,aCN4CO,CAAAA,CAAAA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ASH;;;MAGL;;sBAQsB,QAAQ;;;;;MAc9B;;;;;;;;;;;MAiBA;;;;;;;;;;;;eAkBS;;MAET;;;;;;;;;;;MAcA;;;0CAY0C;;;;;;;;;;;MAU1C;;;;;;;;;;MASA;;;;;;;;;;;;MAWA;;;;;;;;;;;MAWA;;;;;;MAUA;;;;;;;;;;MAWA;;;;;;;;;;MAaA;;;;;;;;;;;;;;;MAgBA;;;;;;;;;;;MAkBA;;;;;;;;;;;;;;;;;;;;;;;;MAsBA;;;;;;;;;;;;MAsBA;;;;wDAYwD;;;;uCAWjB;;;;;;;;;;;oBAOnB;;;;;;;;kCAOc;;;iBAMjB;;;;;;;;;;;;MAiBjB;;;;MAUA;;;;;MAWA;iCASiC;;;;;;;;;;;MAcjC"}
1
+ {"version":3,"file":"index.d.ts","names":["PERMISSION_CATALOG","Record","TENANT_ALLOWED_SUBJECTS","TenantAllowedSubject","ResourceScope","RESOURCE_SCOPES","AccessLevel","ScopedAccess","AllScopedAccess","ResourceScope","DEFAULT_INTEGRATIONS","IntegrationVisibility","INTEGRATION_VISIBILITIES","IntegrationScope","INTEGRATION_SCOPES","IntegrationDesiredStatus","INTEGRATION_DESIRED_STATUSES","IntegrationActualStatus","INTEGRATION_ACTUAL_STATUSES","IntegrationInstall","Record","AgentIntegration","OrgIntegration","IntegrationConfigSchemaField","IntegrationConfigResult","RegistryEntry","ResourceScope","SecretScope","SECRET_SCOPES","EncryptedEnvelopeV1","FIELD_FORMATS","FieldFormat","FIELD_SENSITIVITIES","FieldSensitivity","Field","SECRET_CATEGORIES","SecretCategory","FieldView","SecretAggregate","SecretMetadata","FieldEnvelope","ScopeInfo","GeneratedDataKey","CHANGELOG_ACTIONS","ChangelogAction","ChangelogActor","ChangelogEntry"],"sources":["../../../packages-internal/types/dist/access.d.ts","../../../packages-internal/types/dist/integration.d.ts","../../../packages-internal/types/dist/secrets.d.ts","../src/index.ts"],"sourcesContent":["/**\n * Runtime catalog of declared permission subjects + allowed actions.\n *\n * Mirrors the compile-time `PermissionDefinitions` augmentation in\n * `@alfe/api-core/auriclabs-roles.ts`. Kept here so browser code\n * (dashboard) can consume it without pulling in server-only deps\n * (`@middy/core`, `aws-lambda`, etc.).\n */\nexport declare const PERMISSION_CATALOG: Record<string, readonly string[]>;\n/**\n * Subjects a tenant may grant via a custom role.\n *\n * Excludes `all` (platform-admin escape hatch) and `admin_*` subjects.\n */\nexport declare const TENANT_ALLOWED_SUBJECTS: readonly [\"agent\", \"sync\", \"integration\", \"secret\", \"database\", \"template\", \"org_file\", \"team\", \"project\", \"model_policy\", \"role_management\", \"billing\", \"identity\", \"token\", \"user\", \"gateway\", \"voice\"];\nexport type TenantAllowedSubject = (typeof TENANT_ALLOWED_SUBJECTS)[number];\n/**\n * The four resource scopes at which a permission can apply.\n * Order is meaningful: broader scopes first (`org`) → narrower last (`agent`).\n *\n * `IntegrationScope` in integration.ts and `SecretScope` in secrets.ts are\n * intentional aliases of this same enum — there is only one concept of\n * \"scope\" in Alfe.\n */\nexport declare const ResourceScope: {\n readonly Org: \"org\";\n readonly Team: \"team\";\n readonly Project: \"project\";\n readonly Agent: \"agent\";\n};\nexport type ResourceScope = (typeof ResourceScope)[keyof typeof ResourceScope];\n/** Ordered tuple of resource scope string values (broad → narrow). */\nexport declare const RESOURCE_SCOPES: readonly [\"agent\" | \"team\" | \"project\" | \"org\", ...(\"agent\" | \"team\" | \"project\" | \"org\")[]];\nexport declare const AccessLevel: {\n readonly None: \"none\";\n readonly Read: \"read\";\n readonly Write: \"write\";\n readonly Manage: \"manage\";\n};\nexport type AccessLevel = (typeof AccessLevel)[keyof typeof AccessLevel];\nexport interface ScopedAccess {\n scope: ResourceScope;\n scopeId: string;\n accessLevel: AccessLevel;\n /** Resolved role label (e.g. \"org_admin\", \"team_member\") */\n role: string;\n}\nexport interface AllScopedAccess {\n orgAccess: ScopedAccess;\n teamAccess: ScopedAccess[];\n projectAccess: ScopedAccess[];\n}\n//# sourceMappingURL=access.d.ts.map","import { ResourceScope } from \"./access.js\";\n/** Integrations auto-installed for ALL agents regardless of hosting type. Cannot be removed. */\nexport declare const DEFAULT_INTEGRATIONS: readonly string[];\n/** Controls where an integration appears: public (everyone), hidden (nowhere) */\nexport declare const IntegrationVisibility: {\n readonly Public: \"public\";\n readonly Hidden: \"hidden\";\n};\nexport type IntegrationVisibility = (typeof IntegrationVisibility)[keyof typeof IntegrationVisibility];\nexport declare const INTEGRATION_VISIBILITIES: readonly [\"public\" | \"hidden\", ...(\"public\" | \"hidden\")[]];\n/** Scope at which an integration is installed */\nexport declare const IntegrationScope: {\n readonly Org: \"org\";\n readonly Team: \"team\";\n readonly Project: \"project\";\n readonly Agent: \"agent\";\n};\nexport type IntegrationScope = ResourceScope;\nexport declare const INTEGRATION_SCOPES: readonly [\"agent\" | \"team\" | \"project\" | \"org\", ...(\"agent\" | \"team\" | \"project\" | \"org\")[]];\nexport declare const IntegrationDesiredStatus: {\n readonly Active: \"active\";\n readonly Removed: \"removed\";\n};\nexport type IntegrationDesiredStatus = (typeof IntegrationDesiredStatus)[keyof typeof IntegrationDesiredStatus];\nexport declare const INTEGRATION_DESIRED_STATUSES: readonly [\"active\" | \"removed\", ...(\"active\" | \"removed\")[]];\nexport declare const IntegrationActualStatus: {\n readonly Installing: \"installing\";\n readonly Active: \"active\";\n readonly Error: \"error\";\n readonly Removing: \"removing\";\n readonly Inactive: \"inactive\";\n readonly Unknown: \"unknown\";\n};\nexport type IntegrationActualStatus = (typeof IntegrationActualStatus)[keyof typeof IntegrationActualStatus];\nexport declare const INTEGRATION_ACTUAL_STATUSES: readonly [\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\", ...(\"active\" | \"error\" | \"installing\" | \"removing\" | \"inactive\" | \"unknown\")[]];\nexport interface IntegrationInstall {\n scope: IntegrationScope;\n scopeId: string;\n integrationId: string;\n tenantId: string;\n desiredStatus: IntegrationDesiredStatus;\n actualStatus: IntegrationActualStatus;\n version: string;\n config: Record<string, unknown>;\n errorMessage: string;\n installedAt: string;\n updatedAt: string;\n}\n/** @deprecated Use IntegrationInstall instead */\nexport type AgentIntegration = IntegrationInstall;\n/** Org-scoped integration install */\nexport type OrgIntegration = IntegrationInstall;\nexport interface IntegrationConfigSchemaField {\n key: string;\n label: string;\n type: string;\n description?: string;\n required?: boolean;\n default?: string | number | boolean;\n options?: string[];\n select_options?: {\n value: string;\n label: string;\n }[];\n oauth_provider?: string;\n oauth_scopes?: string[];\n oauth_integration_id?: string;\n editable?: string;\n hidden?: boolean;\n}\nexport interface IntegrationConfigResult {\n integrationId: string;\n config: Record<string, unknown>;\n configSchema: IntegrationConfigSchemaField[];\n}\nexport interface RegistryEntry {\n id: string;\n name: string;\n description: string;\n versions: string[];\n latest: string;\n repository: string;\n commit: string;\n icon?: string;\n author?: {\n name: string;\n url?: string;\n } | string;\n pricing?: {\n type: \"free\" | \"paid\" | \"usage\";\n price?: number;\n currency?: string;\n interval?: \"month\" | \"year\";\n description?: string;\n };\n features?: string[];\n preview_images?: string[];\n config_schema?: IntegrationConfigSchemaField[];\n supported_agents?: string[];\n /** Scopes where this integration can be installed */\n supported_scopes?: IntegrationScope[];\n /** Visibility status — controls where integration appears */\n visibility?: IntegrationVisibility;\n}\n//# sourceMappingURL=integration.d.ts.map","/**\n * Secrets types — shared between services/secrets, @alfe.ai/agent-api-client,\n * the openclaw-secrets plugin, and dashboard clients.\n *\n * Server-side crypto and KMS glue live in @alfe/secret-store (Node/AWS-only);\n * this module is a pure, dependency-free shape contract safe for every\n * environment the agent-api-client ships to.\n */\nimport type { ResourceScope } from \"./access.js\";\n/** Scope levels at which a secret can be owned. Aliased to ResourceScope. */\nexport type SecretScope = ResourceScope;\nexport declare const SECRET_SCOPES: readonly [\"agent\" | \"team\" | \"project\" | \"org\", ...(\"agent\" | \"team\" | \"project\" | \"org\")[]];\n/**\n * v1 encrypted envelope as persisted by services/secrets and exchanged with\n * agents. Values are AES-256-GCM ciphertext; iv/authTag/ciphertext/dataKeyCiphertext\n * are all base64-encoded.\n */\nexport interface EncryptedEnvelopeV1 {\n version: 1;\n iv: string;\n ciphertext: string;\n authTag: string;\n dataKeyCiphertext: string;\n}\n/**\n * Display/validation hint for a field's value. `\"json\"` signals that the\n * string is a JSON-stringified payload that consumers should `JSON.parse`.\n */\nexport declare const FIELD_FORMATS: readonly [\"text\", \"email\", \"url\", \"phone\", \"date\", \"number\", \"json\"];\nexport type FieldFormat = (typeof FIELD_FORMATS)[number];\n/**\n * Whether a field is stored in plaintext (visible to anyone with read access)\n * or encrypted (requires KMS + the right encryption context to read).\n */\nexport declare const FIELD_SENSITIVITIES: readonly [\"plaintext\", \"encrypted\"];\nexport type FieldSensitivity = (typeof FIELD_SENSITIVITIES)[number];\n/**\n * A field on a secret. `value` is always a string at the wire; for encrypted\n * fields it's the plaintext at the API edge (the service encrypts before\n * persistence). Reads from the dashboard omit `value` for encrypted fields;\n * agents get a `FieldEnvelope` instead and decrypt locally.\n */\nexport interface Field {\n key: string;\n format?: FieldFormat;\n sensitivity: FieldSensitivity;\n value: string;\n}\n/**\n * Secret category — drives icon/template/filter behaviour. Defaults to\n * `\"other\"` for migrated rows.\n */\nexport declare const SECRET_CATEGORIES: readonly [\"login\", \"api_key\", \"database\", \"ssh_key\", \"certificate\", \"secure_note\", \"credit_card\", \"identity\", \"wifi\", \"other\"];\nexport type SecretCategory = (typeof SECRET_CATEGORIES)[number];\n/**\n * One field as exposed to readers. Encrypted fields have no `value` on the\n * dashboard read path; the agent-side aggregate carries `envelope` instead.\n */\nexport interface FieldView {\n key: string;\n format?: FieldFormat;\n sensitivity: FieldSensitivity;\n /** Present for `sensitivity: \"plaintext\"` only. */\n value?: string;\n /** Present for `sensitivity: \"encrypted\"` on agent-side reads only. */\n envelope?: EncryptedEnvelopeV1;\n /** Plaintext fields that opt into `format: \"json\"` are pre-parsed for callers. */\n parsedValue?: unknown;\n rotatedAt?: string;\n createdAt: string;\n updatedAt: string;\n}\n/** A secret as assembled from its multi-row aggregate. */\nexport interface SecretAggregate {\n secretId: string;\n secretName: string;\n description?: string;\n tags: string[];\n category: SecretCategory;\n fields: FieldView[];\n changelogVersion: number;\n createdAt: string;\n updatedAt: string;\n}\n/** Metadata-only projection — used by list endpoints. */\nexport interface SecretMetadata {\n secretId: string;\n secretName: string;\n description?: string;\n tags: string[];\n category: SecretCategory;\n fieldKeys: string[];\n changelogVersion: number;\n createdAt: string;\n updatedAt: string;\n}\n/**\n * Per-field encrypted envelope returned to agents on the agent-side aggregate.\n * Agents decrypt locally using a data key fetched from `/decrypt-data-key`.\n */\nexport interface FieldEnvelope {\n key: string;\n format?: FieldFormat;\n envelope: EncryptedEnvelopeV1;\n rotatedAt?: string;\n createdAt: string;\n updatedAt: string;\n}\n/** A scope the caller can read or write secrets in. */\nexport interface ScopeInfo {\n scope: SecretScope;\n scopeId: string;\n name?: string;\n}\n/**\n * KMS-issued data key, returned by the secrets service's\n * `/secrets/generate-data-key` KMS proxy endpoint. The plaintext key is\n * returned base64-encoded; callers MUST decode it to a Buffer and zero the\n * Buffer after use — never keep the plaintext as a JS string.\n */\nexport interface GeneratedDataKey {\n plaintextKey: string;\n dataKeyCiphertext: string;\n}\n/**\n * Action types recorded in the secret changelog. Append-only.\n */\nexport declare const CHANGELOG_ACTIONS: readonly [\"created\", \"deleted\", \"metadata_updated\", \"field_added\", \"field_rotated\", \"field_removed\", \"tag_added\", \"tag_removed\"];\nexport type ChangelogAction = (typeof CHANGELOG_ACTIONS)[number];\n/** Who triggered a changelog entry. */\nexport interface ChangelogActor {\n kind: \"user\" | \"agent\" | \"system\";\n id: string;\n}\n/**\n * One audit row from the secret's changelog. Metadata only — never carries\n * field VALUES (old or new). Rolling back a rotated secret is intentionally\n * not supported.\n */\nexport interface ChangelogEntry {\n changelogVersion: number;\n action: ChangelogAction;\n fieldKey?: string;\n fieldSensitivity?: FieldSensitivity;\n changedBy: ChangelogActor;\n reason?: string;\n timestamp: string;\n}\n//# sourceMappingURL=secrets.d.ts.map"],"mappings":";;ACWA;AAM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