@alfe.ai/agent-api-client 0.1.0 → 0.1.2
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.cjs +87 -24
- package/dist/index.d.cts +225 -21
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +225 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +87 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -130,19 +130,89 @@ interface EncryptedEnvelopeV1 {
|
|
|
130
130
|
authTag: string;
|
|
131
131
|
dataKeyCiphertext: string;
|
|
132
132
|
}
|
|
133
|
-
/**
|
|
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. */
|
|
134
194
|
interface SecretMetadata {
|
|
135
195
|
secretId: string;
|
|
136
196
|
secretName: string;
|
|
137
197
|
description?: string;
|
|
138
|
-
tags
|
|
198
|
+
tags: string[];
|
|
199
|
+
category: SecretCategory;
|
|
200
|
+
fieldKeys: string[];
|
|
201
|
+
changelogVersion: number;
|
|
139
202
|
createdAt: string;
|
|
140
203
|
updatedAt: string;
|
|
141
|
-
rotatedAt?: string;
|
|
142
204
|
}
|
|
143
|
-
/**
|
|
144
|
-
|
|
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;
|
|
145
212
|
envelope: EncryptedEnvelopeV1;
|
|
213
|
+
rotatedAt?: string;
|
|
214
|
+
createdAt: string;
|
|
215
|
+
updatedAt: string;
|
|
146
216
|
}
|
|
147
217
|
/** A scope the caller can read or write secrets in. */
|
|
148
218
|
interface ScopeInfo {
|
|
@@ -160,6 +230,30 @@ interface GeneratedDataKey {
|
|
|
160
230
|
plaintextKey: string;
|
|
161
231
|
dataKeyCiphertext: string;
|
|
162
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
|
+
}
|
|
163
257
|
//# sourceMappingURL=secrets.d.ts.map
|
|
164
258
|
//#endregion
|
|
165
259
|
//#region src/index.d.ts
|
|
@@ -457,52 +551,135 @@ declare class AgentApiClient {
|
|
|
457
551
|
recorded: boolean;
|
|
458
552
|
}>;
|
|
459
553
|
/**
|
|
460
|
-
* Mint a fresh AES-256 data key for a
|
|
461
|
-
* context is rebuilt server-side from `auth.tenantId` + the body
|
|
462
|
-
* agent cannot forge context for a scope
|
|
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.
|
|
463
560
|
*/
|
|
464
561
|
generateSecretDataKey(args: {
|
|
465
562
|
scope: SecretScope;
|
|
466
563
|
scopeId: string;
|
|
467
564
|
secretId: string;
|
|
565
|
+
fieldKey: string;
|
|
468
566
|
}): Promise<GeneratedDataKey>;
|
|
469
567
|
/**
|
|
470
568
|
* Unwrap a wrapped data key so the agent can decrypt the envelope locally.
|
|
471
|
-
*
|
|
472
|
-
*
|
|
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`.
|
|
473
572
|
*/
|
|
474
573
|
decryptSecretDataKey(args: {
|
|
475
574
|
scope: SecretScope;
|
|
476
575
|
scopeId: string;
|
|
477
576
|
secretId: string;
|
|
577
|
+
fieldKey: string;
|
|
478
578
|
dataKeyCiphertext: string;
|
|
479
579
|
}): Promise<{
|
|
480
580
|
plaintextKey: string;
|
|
481
581
|
}>;
|
|
482
|
-
/**
|
|
483
|
-
|
|
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: {
|
|
484
589
|
scope: SecretScope;
|
|
485
590
|
scopeId: string;
|
|
486
591
|
secretId: string;
|
|
487
592
|
secretName: string;
|
|
488
|
-
|
|
593
|
+
category?: SecretCategory;
|
|
489
594
|
description?: string;
|
|
490
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;
|
|
491
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;
|
|
492
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;
|
|
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;
|
|
493
644
|
}>;
|
|
494
|
-
/**
|
|
495
|
-
|
|
645
|
+
/** Remove one field. */
|
|
646
|
+
removeSecretField(args: {
|
|
496
647
|
scope: SecretScope;
|
|
497
648
|
scopeId: string;
|
|
498
649
|
secretId: string;
|
|
499
|
-
|
|
500
|
-
|
|
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. */
|
|
501
664
|
listSecrets(args: {
|
|
502
665
|
scope: SecretScope;
|
|
503
666
|
scopeId: string;
|
|
667
|
+
category?: SecretCategory;
|
|
668
|
+
tag?: string;
|
|
669
|
+
fieldKey?: string;
|
|
504
670
|
}): Promise<SecretMetadata[]>;
|
|
505
|
-
/**
|
|
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). */
|
|
506
683
|
deleteSecret(args: {
|
|
507
684
|
scope: SecretScope;
|
|
508
685
|
scopeId: string;
|
|
@@ -518,9 +695,14 @@ declare class AgentApiClient {
|
|
|
518
695
|
}): Promise<{
|
|
519
696
|
identityId: string | null;
|
|
520
697
|
status: string;
|
|
521
|
-
accessAllowed: boolean;
|
|
522
698
|
created?: boolean;
|
|
523
699
|
reason?: string;
|
|
700
|
+
/**
|
|
701
|
+
* Flattened auriclabs permission strings for the resolved identity
|
|
702
|
+
* (scope-prefixed where applicable). Empty array on miss / org service
|
|
703
|
+
* outage — the runtime gate fails closed in that case.
|
|
704
|
+
*/
|
|
705
|
+
permissions: string[];
|
|
524
706
|
}>;
|
|
525
707
|
searchIdentities(args?: {
|
|
526
708
|
q?: string;
|
|
@@ -653,7 +835,6 @@ declare class AgentApiClient {
|
|
|
653
835
|
}): Promise<{
|
|
654
836
|
identityId: string | null;
|
|
655
837
|
status: string;
|
|
656
|
-
accessAllowed: boolean;
|
|
657
838
|
}>;
|
|
658
839
|
memorySearch(query: string, opts?: {
|
|
659
840
|
limit?: number;
|
|
@@ -733,6 +914,29 @@ declare class AgentApiClient {
|
|
|
733
914
|
storageEstimateBytes: number;
|
|
734
915
|
lastIngestionAt?: string;
|
|
735
916
|
}>;
|
|
917
|
+
memoryLearn(args: {
|
|
918
|
+
text: string;
|
|
919
|
+
source?: string;
|
|
920
|
+
sourceType?: "file" | "url" | "inline";
|
|
921
|
+
metadata?: {
|
|
922
|
+
sessionId?: string;
|
|
923
|
+
channelId?: string;
|
|
924
|
+
userName?: string;
|
|
925
|
+
};
|
|
926
|
+
}): Promise<{
|
|
927
|
+
memoriesStored: number;
|
|
928
|
+
triplesStored: number;
|
|
929
|
+
chunks: number;
|
|
930
|
+
source?: string;
|
|
931
|
+
}>;
|
|
932
|
+
memoryBootstrapStatus(): Promise<{
|
|
933
|
+
synced: boolean;
|
|
934
|
+
syncedAt?: string;
|
|
935
|
+
}>;
|
|
936
|
+
memoryBootstrapStatusMark(): Promise<{
|
|
937
|
+
synced: true;
|
|
938
|
+
syncedAt: string;
|
|
939
|
+
}>;
|
|
736
940
|
searchWeb(params: {
|
|
737
941
|
query: string;
|
|
738
942
|
count?: number;
|
|
@@ -764,5 +968,5 @@ declare class AgentApiClient {
|
|
|
764
968
|
}
|
|
765
969
|
//# sourceMappingURL=index.d.ts.map
|
|
766
970
|
//#endregion
|
|
767
|
-
export { AgentApiClient, AgentApiClientConfig, type EncryptedEnvelopeV1, type GeneratedDataKey, type IntegrationConfigResult, type IntegrationConfigSchemaField, type IntegrationInstall, type RegistryEntry, type ScopeInfo, type
|
|
971
|
+
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 };
|
|
768
972
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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","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 * 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/** 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":";;ACWA;AAMA;AAEA;AAIA;;;;;AAEqBiB,cDDAb,aCQpB,EAAA;EACWa,SAAAA,GAAAA,EAAAA,KAAAA;EAAuB,SAAA,IAAA,EAAA,MAAA;WAAWA,OAAAA,EAAAA,SAAAA;WAAsCA,KAAAA,EAAAA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;;;MAiBA;;;0CAS0C;;;;;;;;;;MAS1C;;;;;;;;;;MASA;;;;;;;;;;;;MAWA;;;;;;;;;;;MAWA;;;;;MASA;;;;;;;;;;MAUA;;;;;;;;;;;;;;;;;;MAkBA;;;;;;;;;;;;;;;;MAiBA;;;;;;;;;;;;;;;;;;MA2BD;;;;;;;;;;;MAeC;;;;;;;;;;;MAsBA;;;;;;;;;;;;;;;;;;;;;;;;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;AAMA;AAEA;AAIA;;;;;AAEqBiB,cDD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A;mBACI;;iBAEF;;;MAGX,QAAQ;;;WAaH;;;MAGL;eAAqB;eAA4B;;;;WAQ5C;;;;MAIL;;iBAEW;aACJ;;eAEE;;;;;;;WAYJ;;;;iBAIM;aACJ;;eAEE;;MAET;;;;;;WAUK;;;;MAIL;;;WASK;;;;;;eAMI;;MAET,QAAQ;;;WAUH;;eAEI;;;MAGT,QAAQ;;;WAcH;;;;;MAKL;aAAmB;;;;;WAYd;;;MAGL;;sBAQsB,QAAQ;;;;;;MAe9B;;;;;;;;;;;;;;;;MAsBA;;;0CAS0C;;;;;;;;;;MAS1C;;;;;;;;;;MASA;;;;;;;;;;;;MAWA;;;;;;;;;;;MAWA;;;;;MASA;;;;;;;;;;MAUA;;;;;;;;;;;;;;;;;;MAkBA;;;;;;;;;;;;;;;;MAiBA;;;;;;;;;;;;;;;;;;MA2BD;;;;;;;;;;;MAeC;;;;;;;;;;MAqBA;;;;;;;;;;;;;;;;;;;;;;;;MAsBA;;;;;;;;;;;;MAsBA;;;;wDAYwD;;;;uCAWjB;;;;;;;;;;;oBAOnB;;;;;;;;kCAOc;;;iBAMjB;;;;;;;;;;;;;;;MAcjB;;;;;;2BAiB2B;;;;+BAII;;;;;;;;;;MAY/B;;;;MAUA;;;;;MAWA;iCASiC;;;;;;;;;;;MAcjC"}
|
package/dist/index.js
CHANGED
|
@@ -29,55 +29,55 @@ var AgentApiClient = class {
|
|
|
29
29
|
return (await res.json()).data;
|
|
30
30
|
}
|
|
31
31
|
async syncRegister(args) {
|
|
32
|
-
return this.request("/
|
|
32
|
+
return this.request("/agent/sync/register", {
|
|
33
33
|
method: "POST",
|
|
34
34
|
body: JSON.stringify(args ?? {})
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
async syncGetManifest() {
|
|
38
|
-
return this.request("/
|
|
38
|
+
return this.request("/agent/sync/manifest");
|
|
39
39
|
}
|
|
40
40
|
async syncPresign(args) {
|
|
41
|
-
return this.request("/
|
|
41
|
+
return this.request("/agent/sync/presign", {
|
|
42
42
|
method: "POST",
|
|
43
43
|
body: JSON.stringify(args)
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
async syncConfirmUpload(args) {
|
|
47
|
-
return this.request("/
|
|
47
|
+
return this.request("/agent/sync/confirm", {
|
|
48
48
|
method: "POST",
|
|
49
49
|
body: JSON.stringify(args)
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
async syncReconstruct(args) {
|
|
53
|
-
return this.request("/
|
|
53
|
+
return this.request("/agent/sync/reconstruct", {
|
|
54
54
|
method: "POST",
|
|
55
55
|
body: JSON.stringify(args)
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
async syncGetStats() {
|
|
59
|
-
return this.request("/
|
|
59
|
+
return this.request("/agent/sync/stats");
|
|
60
60
|
}
|
|
61
61
|
async syncListFiles(args) {
|
|
62
62
|
const qs = new URLSearchParams();
|
|
63
63
|
if (args?.prefix) qs.set("prefix", args.prefix);
|
|
64
64
|
const query = qs.toString();
|
|
65
|
-
return this.request(`/
|
|
65
|
+
return this.request(`/agent/sync/files${query ? `?${query}` : ""}`);
|
|
66
66
|
}
|
|
67
67
|
async syncListSessions() {
|
|
68
|
-
return this.request("/
|
|
68
|
+
return this.request("/agent/sync/sessions");
|
|
69
69
|
}
|
|
70
70
|
async syncGetSession(sessionId) {
|
|
71
|
-
return this.request(`/
|
|
71
|
+
return this.request(`/agent/sync/sessions/${encodeURIComponent(sessionId)}`);
|
|
72
72
|
}
|
|
73
73
|
async syncDeleteFile(filePath) {
|
|
74
|
-
return this.request(`/
|
|
74
|
+
return this.request(`/agent/sync/files/${encodeFilePath(filePath)}`, { method: "DELETE" });
|
|
75
75
|
}
|
|
76
76
|
async sharedListFiles(args) {
|
|
77
|
-
return this.request(`/
|
|
77
|
+
return this.request(`/agent/org/files/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}`);
|
|
78
78
|
}
|
|
79
79
|
async sharedDownloadUrl(args) {
|
|
80
|
-
return this.request(`/
|
|
80
|
+
return this.request(`/agent/org/files/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}/download/${encodeFilePath(args.filePath)}`);
|
|
81
81
|
}
|
|
82
82
|
async listIntegrations() {
|
|
83
83
|
return this.request("/agent/integrations");
|
|
@@ -176,9 +176,12 @@ var AgentApiClient = class {
|
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
|
-
* Mint a fresh AES-256 data key for a
|
|
180
|
-
* context is rebuilt server-side from `auth.tenantId` + the body
|
|
181
|
-
* agent cannot forge context for a scope
|
|
179
|
+
* Mint a fresh AES-256 data key for a specific (secret, field) pair. The
|
|
180
|
+
* encryption context is rebuilt server-side from `auth.tenantId` + the body
|
|
181
|
+
* fields including `fieldKey`; the agent cannot forge context for a scope
|
|
182
|
+
* or field it doesn't own. Legacy single-envelope secrets are migrated to
|
|
183
|
+
* `field#value` rows by the data migration, so call with `fieldKey: "value"`
|
|
184
|
+
* to reach them.
|
|
182
185
|
*/
|
|
183
186
|
async generateSecretDataKey(args) {
|
|
184
187
|
return this.request("/agent/secrets/generate-data-key", {
|
|
@@ -188,8 +191,9 @@ var AgentApiClient = class {
|
|
|
188
191
|
}
|
|
189
192
|
/**
|
|
190
193
|
* Unwrap a wrapped data key so the agent can decrypt the envelope locally.
|
|
191
|
-
*
|
|
192
|
-
*
|
|
194
|
+
* `fieldKey` MUST match the value supplied when the data key was generated
|
|
195
|
+
* (it's bound into KMS encryption context); mismatch fails with
|
|
196
|
+
* `InvalidCiphertextException`.
|
|
193
197
|
*/
|
|
194
198
|
async decryptSecretDataKey(args) {
|
|
195
199
|
return this.request("/agent/secrets/decrypt-data-key", {
|
|
@@ -197,23 +201,65 @@ var AgentApiClient = class {
|
|
|
197
201
|
body: JSON.stringify(args)
|
|
198
202
|
});
|
|
199
203
|
}
|
|
200
|
-
/**
|
|
201
|
-
|
|
204
|
+
/**
|
|
205
|
+
* Create a new secret with one or more fields. Encrypted fields must arrive
|
|
206
|
+
* pre-sealed (the agent has already obtained per-field data keys via
|
|
207
|
+
* `generateSecretDataKey({ ..., fieldKey })` and AES-encrypted locally).
|
|
208
|
+
* Plaintext fields ship the value inline.
|
|
209
|
+
*/
|
|
210
|
+
async createSecret(args) {
|
|
202
211
|
const { scope, scopeId, secretId, ...body } = args;
|
|
203
212
|
return this.request(`/agent/secrets/${encodeURIComponent(scope)}/${encodeURIComponent(scopeId)}/${encodeURIComponent(secretId)}`, {
|
|
204
213
|
method: "PUT",
|
|
205
214
|
body: JSON.stringify(body)
|
|
206
215
|
});
|
|
207
216
|
}
|
|
208
|
-
/** Fetch the
|
|
209
|
-
async
|
|
217
|
+
/** Fetch the secret aggregate plus per-field encrypted envelopes. */
|
|
218
|
+
async getSecret(args) {
|
|
210
219
|
return this.request(`/agent/secrets/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}/${encodeURIComponent(args.secretId)}`);
|
|
211
220
|
}
|
|
212
|
-
/**
|
|
221
|
+
/** Fetch one field. Plaintext: value inline. Encrypted: envelope. */
|
|
222
|
+
async getSecretField(args) {
|
|
223
|
+
return this.request(`/agent/secrets/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}/${encodeURIComponent(args.secretId)}/fields/${encodeURIComponent(args.fieldKey)}`);
|
|
224
|
+
}
|
|
225
|
+
/** Add OR rotate one field. */
|
|
226
|
+
async setSecretField(args) {
|
|
227
|
+
const { scope, scopeId, secretId, fieldKey, ...body } = args;
|
|
228
|
+
return this.request(`/agent/secrets/${encodeURIComponent(scope)}/${encodeURIComponent(scopeId)}/${encodeURIComponent(secretId)}/fields/${encodeURIComponent(fieldKey)}`, {
|
|
229
|
+
method: "PUT",
|
|
230
|
+
body: JSON.stringify(body)
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/** Remove one field. */
|
|
234
|
+
async removeSecretField(args) {
|
|
235
|
+
await this.request(`/agent/secrets/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}/${encodeURIComponent(args.secretId)}/fields/${encodeURIComponent(args.fieldKey)}`, { method: "DELETE" });
|
|
236
|
+
}
|
|
237
|
+
/** Update secret-level metadata (name/description/tags/category). */
|
|
238
|
+
async updateSecretMetadata(args) {
|
|
239
|
+
const { scope, scopeId, secretId, ...body } = args;
|
|
240
|
+
return this.request(`/agent/secrets/${encodeURIComponent(scope)}/${encodeURIComponent(scopeId)}/${encodeURIComponent(secretId)}`, {
|
|
241
|
+
method: "PATCH",
|
|
242
|
+
body: JSON.stringify(body)
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
/** List metadata for secrets in a scope. Optional filters route through the byFacet GSI. */
|
|
213
246
|
async listSecrets(args) {
|
|
214
|
-
|
|
247
|
+
const params = new URLSearchParams();
|
|
248
|
+
if (args.category) params.set("category", args.category);
|
|
249
|
+
if (args.tag) params.set("tag", args.tag);
|
|
250
|
+
if (args.fieldKey) params.set("fieldKey", args.fieldKey);
|
|
251
|
+
const qs = params.toString();
|
|
252
|
+
return (await this.request(`/agent/secrets/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}${qs ? `?${qs}` : ""}`)).secrets;
|
|
215
253
|
}
|
|
216
|
-
/**
|
|
254
|
+
/** Bounded changelog read — metadata-only audit entries. */
|
|
255
|
+
async getSecretHistory(args) {
|
|
256
|
+
const params = new URLSearchParams();
|
|
257
|
+
if (args.limit) params.set("limit", String(args.limit));
|
|
258
|
+
if (args.cursor) params.set("cursor", args.cursor);
|
|
259
|
+
const qs = params.toString();
|
|
260
|
+
return this.request(`/agent/secrets/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}/${encodeURIComponent(args.secretId)}/history${qs ? `?${qs}` : ""}`);
|
|
261
|
+
}
|
|
262
|
+
/** Delete a secret (and all its field rows + tag rows + changelog rows). */
|
|
217
263
|
async deleteSecret(args) {
|
|
218
264
|
await this.request(`/agent/secrets/${encodeURIComponent(args.scope)}/${encodeURIComponent(args.scopeId)}/${encodeURIComponent(args.secretId)}`, { method: "DELETE" });
|
|
219
265
|
}
|
|
@@ -364,6 +410,23 @@ var AgentApiClient = class {
|
|
|
364
410
|
async memoryStats() {
|
|
365
411
|
return this.request("/agent/memory/stats");
|
|
366
412
|
}
|
|
413
|
+
async memoryLearn(args) {
|
|
414
|
+
return this.request("/agent/memory/learn", {
|
|
415
|
+
method: "POST",
|
|
416
|
+
body: JSON.stringify({
|
|
417
|
+
text: args.text,
|
|
418
|
+
source: args.source,
|
|
419
|
+
sourceType: args.sourceType ?? "inline",
|
|
420
|
+
metadata: args.metadata
|
|
421
|
+
})
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
async memoryBootstrapStatus() {
|
|
425
|
+
return this.request("/agent/memory/bootstrap-status");
|
|
426
|
+
}
|
|
427
|
+
async memoryBootstrapStatusMark() {
|
|
428
|
+
return this.request("/agent/memory/bootstrap-status", { method: "POST" });
|
|
429
|
+
}
|
|
367
430
|
async searchWeb(params) {
|
|
368
431
|
return this.request("/agent/search/web", {
|
|
369
432
|
method: "POST",
|