@agentstep/gateway 0.5.35 → 0.5.37

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 (2) hide show
  1. package/dist/gateway.js +542 -297
  2. package/package.json +1 -1
package/dist/gateway.js CHANGED
@@ -154382,7 +154382,7 @@ var init_session_resources2 = __esm({
154382
154382
  }
154383
154383
  });
154384
154384
 
154385
- // ../agent-sdk/dist/chunk-YKPRNV6J.js
154385
+ // ../agent-sdk/dist/chunk-LJ2ZXLLT.js
154386
154386
  function hydrate8(row) {
154387
154387
  return {
154388
154388
  id: row.id,
@@ -154462,8 +154462,7 @@ function listFiles(opts) {
154462
154462
  const hasMore2 = rows2.length > limit;
154463
154463
  if (hasMore2) rows2.pop();
154464
154464
  const records2 = rows2.map(hydrate8);
154465
- const nextPage2 = hasMore2 && records2.length > 0 ? Buffer.from(records2[records2.length - 1].id).toString("base64url") : null;
154466
- return { data: records2, next_page: nextPage2 };
154465
+ return { data: records2, has_more: hasMore2, first_id: records2[0]?.id ?? null, last_id: records2[records2.length - 1]?.id ?? null };
154467
154466
  }
154468
154467
  let cursorCondition;
154469
154468
  if (opts?.after_id) {
@@ -154476,8 +154475,7 @@ function listFiles(opts) {
154476
154475
  const hasMore = rows.length > limit;
154477
154476
  if (hasMore) rows.pop();
154478
154477
  const records = rows.map(hydrate8);
154479
- const nextPage = hasMore && records.length > 0 ? Buffer.from(records[records.length - 1].id).toString("base64url") : null;
154480
- return { data: records, next_page: nextPage };
154478
+ return { data: records, has_more: hasMore, first_id: records[0]?.id ?? null, last_id: records[records.length - 1]?.id ?? null };
154481
154479
  }
154482
154480
  function countFilesForScope(scopeId) {
154483
154481
  const db = getDrizzle();
@@ -154497,8 +154495,8 @@ function deleteFileRecord(id) {
154497
154495
  db.delete(schema_exports.files).where(eq(schema_exports.files.id, id)).run();
154498
154496
  return { id, type: "file_deleted" };
154499
154497
  }
154500
- var init_chunk_YKPRNV6J = __esm({
154501
- "../agent-sdk/dist/chunk-YKPRNV6J.js"() {
154498
+ var init_chunk_LJ2ZXLLT = __esm({
154499
+ "../agent-sdk/dist/chunk-LJ2ZXLLT.js"() {
154502
154500
  "use strict";
154503
154501
  init_chunk_F4WUVOLE();
154504
154502
  init_chunk_HFDLUBWN();
@@ -154526,7 +154524,7 @@ __export(files_exports, {
154526
154524
  var init_files = __esm({
154527
154525
  "../agent-sdk/dist/db/files.js"() {
154528
154526
  "use strict";
154529
- init_chunk_YKPRNV6J();
154527
+ init_chunk_LJ2ZXLLT();
154530
154528
  init_chunk_F4WUVOLE();
154531
154529
  init_chunk_HFDLUBWN();
154532
154530
  init_chunk_ZDDMPGN4();
@@ -154917,7 +154915,7 @@ var init_memory = __esm({
154917
154915
  }
154918
154916
  });
154919
154917
 
154920
- // ../agent-sdk/dist/chunk-ZCCHLDLC.js
154918
+ // ../agent-sdk/dist/chunk-IL2CZHNC.js
154921
154919
  function wrapProviderWithSecrets(provider, secrets) {
154922
154920
  if (!secrets || Object.keys(secrets).length === 0) return provider;
154923
154921
  return {
@@ -155486,8 +155484,8 @@ async function reconcileDockerOrphanSandboxes() {
155486
155484
  return { deleted, kept };
155487
155485
  }
155488
155486
  var import_ulid2, lcLog, SANDBOX_NAME_PREFIX;
155489
- var init_chunk_ZCCHLDLC = __esm({
155490
- "../agent-sdk/dist/chunk-ZCCHLDLC.js"() {
155487
+ var init_chunk_IL2CZHNC = __esm({
155488
+ "../agent-sdk/dist/chunk-IL2CZHNC.js"() {
155491
155489
  "use strict";
155492
155490
  init_chunk_4XXQAVKE();
155493
155491
  init_chunk_JNSJKHYX();
@@ -155967,7 +155965,7 @@ var init_container_file_sync = __esm({
155967
155965
  "../agent-sdk/dist/sync/container-file-sync.js"() {
155968
155966
  "use strict";
155969
155967
  init_chunk_STPT3SWU();
155970
- init_chunk_YKPRNV6J();
155968
+ init_chunk_LJ2ZXLLT();
155971
155969
  init_chunk_OEFJPZYH();
155972
155970
  init_chunk_F4WUVOLE();
155973
155971
  init_chunk_HFDLUBWN();
@@ -156628,7 +156626,7 @@ var init_threads = __esm({
156628
156626
  "../agent-sdk/dist/sessions/threads.js"() {
156629
156627
  "use strict";
156630
156628
  init_chunk_Z5IENUYV();
156631
- init_chunk_KYKVHH7I();
156629
+ init_chunk_YAJJ7KHX();
156632
156630
  init_chunk_PJZ5TQYW();
156633
156631
  init_chunk_AU4NAQGA();
156634
156632
  init_chunk_H6TQGV4L();
@@ -156639,7 +156637,7 @@ var init_threads = __esm({
156639
156637
  init_chunk_DZKBUOYU();
156640
156638
  init_chunk_WK33IBKY();
156641
156639
  init_chunk_LAWTTG2E();
156642
- init_chunk_ZCCHLDLC();
156640
+ init_chunk_IL2CZHNC();
156643
156641
  init_chunk_4XXQAVKE();
156644
156642
  init_chunk_JNSJKHYX();
156645
156643
  init_chunk_5ZFOKZGR();
@@ -156713,7 +156711,7 @@ var init_threads = __esm({
156713
156711
  }
156714
156712
  });
156715
156713
 
156716
- // ../agent-sdk/dist/chunk-KYKVHH7I.js
156714
+ // ../agent-sdk/dist/chunk-YAJJ7KHX.js
156717
156715
  function formatStopReason(reason, eventIds) {
156718
156716
  if (reason === "custom_tool_call") {
156719
156717
  return { type: "requires_action", event_ids: eventIds ?? [] };
@@ -157619,8 +157617,8 @@ async function writeToolBridgeResponse(sessionId, content) {
157619
157617
  pendingToolBridgeCalls.delete(sessionId);
157620
157618
  }
157621
157619
  var gd, pendingToolBridgeCalls, customToolCallCounts, MAX_CUSTOM_TOOL_CALLS_PER_TURN;
157622
- var init_chunk_KYKVHH7I = __esm({
157623
- "../agent-sdk/dist/chunk-KYKVHH7I.js"() {
157620
+ var init_chunk_YAJJ7KHX = __esm({
157621
+ "../agent-sdk/dist/chunk-YAJJ7KHX.js"() {
157624
157622
  "use strict";
157625
157623
  init_chunk_PJZ5TQYW();
157626
157624
  init_chunk_AU4NAQGA();
@@ -157629,7 +157627,7 @@ var init_chunk_KYKVHH7I = __esm({
157629
157627
  init_chunk_72BKGVBE();
157630
157628
  init_chunk_VB6GGRIA();
157631
157629
  init_chunk_DZKBUOYU();
157632
- init_chunk_ZCCHLDLC();
157630
+ init_chunk_IL2CZHNC();
157633
157631
  init_chunk_JNSJKHYX();
157634
157632
  init_chunk_RES4BCTF();
157635
157633
  init_chunk_ZC7OR65K();
@@ -157655,7 +157653,7 @@ var init_chunk_KYKVHH7I = __esm({
157655
157653
  }
157656
157654
  });
157657
157655
 
157658
- // ../agent-sdk/dist/chunk-GABMXDZZ.js
157656
+ // ../agent-sdk/dist/chunk-2Z4T32WO.js
157659
157657
  async function startWorker(opts) {
157660
157658
  const pollInterval = opts.pollIntervalMs ?? 5e3;
157661
157659
  const workerId = opts.workerId ?? `worker-${process.pid}`;
@@ -157705,11 +157703,11 @@ async function startWorker(opts) {
157705
157703
  }
157706
157704
  console.log("[worker] stopped");
157707
157705
  }
157708
- var init_chunk_GABMXDZZ = __esm({
157709
- "../agent-sdk/dist/chunk-GABMXDZZ.js"() {
157706
+ var init_chunk_2Z4T32WO = __esm({
157707
+ "../agent-sdk/dist/chunk-2Z4T32WO.js"() {
157710
157708
  "use strict";
157711
157709
  init_chunk_JF777FWD();
157712
- init_chunk_KYKVHH7I();
157710
+ init_chunk_YAJJ7KHX();
157713
157711
  }
157714
157712
  });
157715
157713
 
@@ -158935,17 +158933,19 @@ var init_chunk_7346CKTF = __esm({
158935
158933
  }
158936
158934
  });
158937
158935
 
158938
- // ../agent-sdk/dist/chunk-SAI6LBXW.js
158936
+ // ../agent-sdk/dist/chunk-2HVY2WZL.js
158939
158937
  function listEnvelope(name, item) {
158940
158938
  const schema2 = external_exports.object({
158941
158939
  data: external_exports.array(item),
158942
- next_page: external_exports.string().nullable()
158940
+ has_more: external_exports.boolean(),
158941
+ first_id: external_exports.string().nullable(),
158942
+ last_id: external_exports.string().nullable()
158943
158943
  });
158944
158944
  return registry2.register(name, schema2);
158945
158945
  }
158946
- var import_zod_to_openapi2, UlidId, IsoTimestamp, ErrorEnvelopeSchema, AgentToolsetTool, CustomTool, ToolConfigSchema, McpServerConfigSchema, AgentSkillSchema, ModelConfigSchema, AgentSchema, CreateAgentRequestSchema, UpdateAgentRequestSchema, EnvironmentPackages, EnvironmentNetworking, EnvironmentConfigSchema, EnvironmentSchema, CreateEnvironmentRequestSchema, UpdateEnvironmentRequestSchema, SessionStatsSchema, SessionUsageSchema, SessionStatusSchema, SessionSchema, CreateSessionRequestSchema, UpdateSessionRequestSchema, TextBlock, UserMessageEvent, UserInterruptEvent, UserCustomToolResultEvent, UserToolConfirmationEvent, UserDefineOutcomeEvent, UserEventSchema, UserEventBatchRequestSchema, ManagedEventSchema, VaultSchema, VaultEntrySchema, CreateVaultRequestSchema, UpdateVaultRequestSchema, SetVaultEntryRequestSchema, VaultDeletedResponseSchema, VaultEntryDeletedResponseSchema, BatchOperationSchema, BatchRequestSchema, BatchResultSchema, BatchResponseSchema, AgentListResponseSchema, EnvironmentListResponseSchema, SessionListResponseSchema, EventListResponseSchema, VaultListResponseSchema, VaultEntryListResponseSchema, AgentDeletedResponseSchema, SessionDeletedResponseSchema, EnvironmentDeletedResponseSchema, UserEventAppendResponseSchema, FileScopeSchema, FileRecordSchema, FileListResponseSchema, FileDeletedResponseSchema, VaultCredentialSchema, CreateCredentialRequestSchema, UpdateCredentialRequestSchema, CredentialListResponseSchema, CredentialDeletedResponseSchema, MemoryStoreSchema, CreateMemoryStoreRequestSchema, MemoryStoreListResponseSchema, MemoryStoreDeletedResponseSchema, MemorySchema, CreateMemoryRequestSchema, UpdateMemoryRequestSchema, MemoryListResponseSchema, MemoryDeletedResponseSchema, SessionResourceSchema, AddResourceRequestSchema, ResourceListResponseSchema, ResourceDeletedResponseSchema, KeyScopeSchema, KeyPermissionsSchema, ApiKeySchema, ApiKeyCreatedSchema, CreateApiKeyRequestSchema, PatchApiKeyRequestSchema, ApiKeyListResponseSchema, ApiKeyRevokedResponseSchema, ApiKeyActivityResponseSchema, UpstreamKeySchema, AddUpstreamKeyRequestSchema, PatchUpstreamKeyRequestSchema, UpstreamKeyListResponseSchema, UpstreamKeyDeletedResponseSchema, TenantSchema, CreateTenantRequestSchema, PatchTenantRequestSchema, TenantListResponseSchema, TenantArchivedResponseSchema, AuditEntrySchema, AuditListResponseSchema, TraceListItemSchema, TraceListResponseSchema, SpanNodeSchema, TraceDetailSchema, TraceExportResponseSchema, SkillsCatalogResponseSchema, SkillsSearchResponseSchema, SkillsStatsResponseSchema, SkillsSourcesResponseSchema, MetricsTotalsSchema, MetricsResponseSchema, ApiMetricsResponseSchema, PutSettingRequestSchema, SettingResponseSchema, ProviderStatusResponseSchema, ModelEntrySchema, ModelListResponseSchema, WhoamiResponseSchema, LicenseResponseSchema;
158947
- var init_chunk_SAI6LBXW = __esm({
158948
- "../agent-sdk/dist/chunk-SAI6LBXW.js"() {
158946
+ var import_zod_to_openapi2, UlidId, IsoTimestamp, ErrorEnvelopeSchema, AgentToolsetTool, CustomTool, ToolConfigSchema, McpServerConfigSchema, AgentSkillSchema, ModelConfigSchema, AgentSchema, CreateAgentRequestSchema, UpdateAgentRequestSchema, EnvironmentPackages, EnvironmentNetworking, EnvironmentConfigSchema, EnvironmentSchema, CreateEnvironmentRequestSchema, UpdateEnvironmentRequestSchema, SessionStatsSchema, SessionUsageSchema, SessionStatusSchema, SessionSchema, CreateSessionRequestSchema, UpdateSessionRequestSchema, TextBlock, UserMessageEvent, UserInterruptEvent, UserCustomToolResultEvent, UserToolConfirmationEvent, UserDefineOutcomeEvent, UserEventSchema, UserEventBatchRequestSchema, ManagedEventSchema, VaultSchema, VaultEntrySchema, CreateVaultRequestSchema, UpdateVaultRequestSchema, SetVaultEntryRequestSchema, VaultDeletedResponseSchema, VaultEntryDeletedResponseSchema, BatchOperationSchema, BatchRequestSchema, BatchResultSchema, BatchResponseSchema, AgentListResponseSchema, EnvironmentListResponseSchema, SessionListResponseSchema, EventListResponseSchema, VaultListResponseSchema, VaultEntryListResponseSchema, TrustGrantSchema, UserProfileSchema, UserProfileCreateSchema, UserProfileUpdateSchema, UserProfileListSchema, EnrollmentUrlRequestSchema, EnrollmentUrlResponseSchema, AgentDeletedResponseSchema, SessionDeletedResponseSchema, EnvironmentDeletedResponseSchema, UserEventAppendResponseSchema, FileScopeSchema, FileRecordSchema, FileListResponseSchema, FileDeletedResponseSchema, VaultCredentialSchema, CreateCredentialRequestSchema, UpdateCredentialRequestSchema, CredentialListResponseSchema, CredentialDeletedResponseSchema, MemoryStoreSchema, CreateMemoryStoreRequestSchema, MemoryStoreListResponseSchema, MemoryStoreDeletedResponseSchema, MemorySchema, CreateMemoryRequestSchema, UpdateMemoryRequestSchema, MemoryListResponseSchema, MemoryDeletedResponseSchema, SessionResourceSchema, AddResourceRequestSchema, ResourceListResponseSchema, ResourceDeletedResponseSchema, KeyScopeSchema, KeyPermissionsSchema, ApiKeySchema, ApiKeyCreatedSchema, CreateApiKeyRequestSchema, PatchApiKeyRequestSchema, ApiKeyListResponseSchema, ApiKeyRevokedResponseSchema, ApiKeyActivityResponseSchema, UpstreamKeySchema, AddUpstreamKeyRequestSchema, PatchUpstreamKeyRequestSchema, UpstreamKeyListResponseSchema, UpstreamKeyDeletedResponseSchema, TenantSchema, CreateTenantRequestSchema, PatchTenantRequestSchema, TenantListResponseSchema, TenantArchivedResponseSchema, AuditEntrySchema, AuditListResponseSchema, TraceListItemSchema, TraceListResponseSchema, SpanNodeSchema, TraceDetailSchema, TraceExportResponseSchema, SkillsCatalogResponseSchema, SkillsSearchResponseSchema, SkillsStatsResponseSchema, SkillsSourcesResponseSchema, MetricsTotalsSchema, MetricsResponseSchema, ApiMetricsResponseSchema, PutSettingRequestSchema, SettingResponseSchema, ProviderStatusResponseSchema, ModelEntrySchema, ModelListResponseSchema, WhoamiResponseSchema, LicenseResponseSchema;
158947
+ var init_chunk_2HVY2WZL = __esm({
158948
+ "../agent-sdk/dist/chunk-2HVY2WZL.js"() {
158949
158949
  "use strict";
158950
158950
  init_chunk_7346CKTF();
158951
158951
  init_zod();
@@ -159072,6 +159072,10 @@ var init_chunk_SAI6LBXW = __esm({
159072
159072
  skills: external_exports.array(AgentSkillSchema).openapi({
159073
159073
  description: "Skills injected into the container at session start. For Claude backend, written to .claude/skills/<name>/SKILL.md. For all backends, also written to .agents/skills/<name>/SKILL.md. Non-Claude backends also receive skills prepended to the system prompt."
159074
159074
  }),
159075
+ permission_policy: external_exports.object({
159076
+ always_allow: external_exports.array(external_exports.string()).optional(),
159077
+ always_ask: external_exports.array(external_exports.string()).optional()
159078
+ }).nullable().optional().openapi({ description: "Per-tool permission control." }),
159075
159079
  model_config: ModelConfigSchema.openapi({
159076
159080
  description: "Model configuration options. 'fast' speed enables fast mode on Claude (claude engine only)."
159077
159081
  }),
@@ -159084,7 +159088,10 @@ var init_chunk_SAI6LBXW = __esm({
159084
159088
  "CreateAgentRequest",
159085
159089
  external_exports.object({
159086
159090
  name: external_exports.string().min(1).openapi({ example: "my-agent" }),
159087
- model: external_exports.object({ id: external_exports.string().min(1), speed: external_exports.enum(["standard", "fast"]).optional() }).openapi({ description: "Model configuration. `id` is the bare model identifier (e.g. `gemini-2.5-flash`, `claude-sonnet-4-6`, `gpt-5.4`). Do not include provider prefixes.", example: { id: "claude-sonnet-4-6" } }),
159091
+ model: external_exports.union([
159092
+ external_exports.string().openapi({ example: "claude-sonnet-4-6" }),
159093
+ external_exports.object({ id: external_exports.string().min(1), speed: external_exports.enum(["standard", "fast"]).optional() }).openapi({ example: { id: "claude-sonnet-4-6" } })
159094
+ ]).openapi({ description: 'Model identifier \u2014 either a bare string (`"claude-sonnet-4-6"`) or an object (`{id, speed?}`). Do not include provider prefixes.' }),
159088
159095
  description: external_exports.string().max(2048).optional().openapi({
159089
159096
  description: "Human-readable description of the agent."
159090
159097
  }),
@@ -159307,6 +159314,7 @@ var init_chunk_SAI6LBXW = __esm({
159307
159314
  vault_ids: external_exports.array(external_exports.string()).nullable().openapi({
159308
159315
  description: "Vault IDs whose entries are injected as environment variables."
159309
159316
  }),
159317
+ user_profile_id: external_exports.string().nullable().optional().openapi({ description: "User profile ID for credential scoping." }),
159310
159318
  parent_session_id: external_exports.string().nullable().openapi({
159311
159319
  description: "Parent session ID if this is a child thread session."
159312
159320
  }),
@@ -159342,7 +159350,17 @@ var init_chunk_SAI6LBXW = __esm({
159342
159350
  uri: external_exports.string().optional(),
159343
159351
  content: external_exports.string().optional()
159344
159352
  })).optional(),
159345
- vault_ids: external_exports.array(external_exports.string()).optional()
159353
+ vault_ids: external_exports.array(external_exports.string()).optional(),
159354
+ user_profile_id: external_exports.string().optional().openapi({ description: "Links session to a user profile for per-user credential scoping." }),
159355
+ outcomes: external_exports.object({
159356
+ description: external_exports.string(),
159357
+ rubric: external_exports.array(external_exports.object({
159358
+ name: external_exports.string(),
159359
+ description: external_exports.string(),
159360
+ weight: external_exports.number().optional()
159361
+ })).optional(),
159362
+ max_iterations: external_exports.number().int().optional()
159363
+ }).optional().openapi({ description: "Success criteria with optional rubric for self-evaluation." })
159346
159364
  }).openapi({
159347
159365
  example: {
159348
159366
  agent: "agent_01ABCDEFG...",
@@ -159540,6 +159558,49 @@ var init_chunk_SAI6LBXW = __esm({
159540
159558
  "VaultEntryListResponse",
159541
159559
  external_exports.object({ data: external_exports.array(VaultEntrySchema) })
159542
159560
  );
159561
+ TrustGrantSchema = registry2.register("TrustGrant", external_exports.object({
159562
+ type: external_exports.literal("vault_credential"),
159563
+ vault_id: external_exports.string(),
159564
+ credential_id: external_exports.string()
159565
+ }));
159566
+ UserProfileSchema = registry2.register("UserProfile", external_exports.object({
159567
+ type: external_exports.literal("user_profile"),
159568
+ id: external_exports.string(),
159569
+ external_id: external_exports.string().nullable(),
159570
+ display_name: external_exports.string().nullable(),
159571
+ trust_grants: external_exports.array(TrustGrantSchema),
159572
+ created_at: external_exports.string(),
159573
+ updated_at: external_exports.string()
159574
+ }));
159575
+ UserProfileCreateSchema = registry2.register("UserProfileCreate", external_exports.object({
159576
+ external_id: external_exports.string().optional(),
159577
+ display_name: external_exports.string().optional(),
159578
+ trust_grants: external_exports.array(TrustGrantSchema).optional()
159579
+ }));
159580
+ UserProfileUpdateSchema = registry2.register("UserProfileUpdate", external_exports.object({
159581
+ external_id: external_exports.string().nullish(),
159582
+ display_name: external_exports.string().nullish(),
159583
+ trust_grants: external_exports.array(TrustGrantSchema).optional()
159584
+ }));
159585
+ UserProfileListSchema = listEnvelope("UserProfileList", UserProfileSchema);
159586
+ EnrollmentUrlRequestSchema = registry2.register("EnrollmentUrlRequest", external_exports.object({
159587
+ vault_id: external_exports.string(),
159588
+ credential_id: external_exports.string().optional(),
159589
+ display_name: external_exports.string().optional(),
159590
+ authorize_url: external_exports.string(),
159591
+ token_endpoint: external_exports.string(),
159592
+ client_id: external_exports.string(),
159593
+ client_secret: external_exports.string().optional(),
159594
+ scope: external_exports.string().optional(),
159595
+ redirect_uri: external_exports.string().optional()
159596
+ }));
159597
+ EnrollmentUrlResponseSchema = registry2.register("EnrollmentUrlResponse", external_exports.object({
159598
+ type: external_exports.literal("enrollment_url"),
159599
+ url: external_exports.string(),
159600
+ state: external_exports.string(),
159601
+ redirect_uri: external_exports.string(),
159602
+ expires_in: external_exports.number()
159603
+ }));
159543
159604
  AgentDeletedResponseSchema = registry2.register(
159544
159605
  "AgentDeletedResponse",
159545
159606
  external_exports.object({ id: UlidId, type: external_exports.literal("agent_deleted") })
@@ -159579,7 +159640,9 @@ var init_chunk_SAI6LBXW = __esm({
159579
159640
  "FileListResponse",
159580
159641
  external_exports.object({
159581
159642
  data: external_exports.array(FileRecordSchema),
159582
- next_page: external_exports.string().nullable().openapi({ description: "Opaque cursor for the next page, or null if no more results." })
159643
+ has_more: external_exports.boolean().openapi({ description: "Whether more results exist beyond this page." }),
159644
+ first_id: external_exports.string().nullable().openapi({ description: "ID of the first item in this page." }),
159645
+ last_id: external_exports.string().nullable().openapi({ description: "ID of the last item in this page. Pass as after_id for the next page." })
159583
159646
  })
159584
159647
  );
159585
159648
  FileDeletedResponseSchema = registry2.register(
@@ -159892,7 +159955,9 @@ var init_chunk_SAI6LBXW = __esm({
159892
159955
  "AuditListResponse",
159893
159956
  external_exports.object({
159894
159957
  data: external_exports.array(AuditEntrySchema),
159895
- next_page: external_exports.string().nullable()
159958
+ has_more: external_exports.boolean(),
159959
+ first_id: external_exports.string().nullable(),
159960
+ last_id: external_exports.string().nullable()
159896
159961
  })
159897
159962
  );
159898
159963
  TraceListItemSchema = registry2.register(
@@ -160094,7 +160159,7 @@ var init_chunk_SAI6LBXW = __esm({
160094
160159
  }
160095
160160
  });
160096
160161
 
160097
- // ../agent-sdk/dist/chunk-PWLWDWRL.js
160162
+ // ../agent-sdk/dist/chunk-R43A2QH7.js
160098
160163
  function buildOpenApiDocument(opts) {
160099
160164
  const generator = new import_zod_to_openapi3.OpenApiGeneratorV31(registry2.definitions);
160100
160165
  return generator.generateDocument({
@@ -160127,15 +160192,17 @@ function buildOpenApiDocument(opts) {
160127
160192
  { name: "Tenants", description: "Multi-tenant isolation (global-admin-only)" },
160128
160193
  { name: "Audit", description: "Admin audit trail" },
160129
160194
  { name: "Auth", description: "Caller identity and license info" },
160130
- { name: "Batch", description: "Atomic batch operations" }
160195
+ { name: "Batch", description: "Atomic batch operations" },
160196
+ { name: "User Profiles", description: "User profile management and OAuth enrollment" },
160197
+ { name: "Google Compat", description: "Google Interactions API compatibility layer" }
160131
160198
  ]
160132
160199
  });
160133
160200
  }
160134
160201
  var import_zod_to_openapi3, ErrorResponses;
160135
- var init_chunk_PWLWDWRL = __esm({
160136
- "../agent-sdk/dist/chunk-PWLWDWRL.js"() {
160202
+ var init_chunk_R43A2QH7 = __esm({
160203
+ "../agent-sdk/dist/chunk-R43A2QH7.js"() {
160137
160204
  "use strict";
160138
- init_chunk_SAI6LBXW();
160205
+ init_chunk_2HVY2WZL();
160139
160206
  init_chunk_7346CKTF();
160140
160207
  init_zod();
160141
160208
  import_zod_to_openapi3 = __toESM(require_dist2(), 1);
@@ -161876,6 +161943,97 @@ var init_chunk_PWLWDWRL = __esm({
161876
161943
  ...ErrorResponses
161877
161944
  }
161878
161945
  });
161946
+ registry2.registerPath({
161947
+ method: "post",
161948
+ path: "/v1/user_profiles",
161949
+ tags: ["User Profiles"],
161950
+ summary: "Create user profile",
161951
+ security: [{ ApiKey: [] }],
161952
+ request: {
161953
+ body: {
161954
+ required: true,
161955
+ content: { "application/json": { schema: UserProfileCreateSchema } }
161956
+ }
161957
+ },
161958
+ responses: {
161959
+ 201: {
161960
+ description: "Created",
161961
+ content: { "application/json": { schema: UserProfileSchema } }
161962
+ },
161963
+ ...ErrorResponses
161964
+ }
161965
+ });
161966
+ registry2.registerPath({
161967
+ method: "get",
161968
+ path: "/v1/user_profiles",
161969
+ tags: ["User Profiles"],
161970
+ summary: "List user profiles",
161971
+ security: [{ ApiKey: [] }],
161972
+ responses: {
161973
+ 200: {
161974
+ description: "OK",
161975
+ content: { "application/json": { schema: UserProfileListSchema } }
161976
+ },
161977
+ ...ErrorResponses
161978
+ }
161979
+ });
161980
+ registry2.registerPath({
161981
+ method: "get",
161982
+ path: "/v1/user_profiles/{id}",
161983
+ tags: ["User Profiles"],
161984
+ summary: "Get user profile",
161985
+ security: [{ ApiKey: [] }],
161986
+ request: { params: external_exports.object({ id: external_exports.string() }) },
161987
+ responses: {
161988
+ 200: {
161989
+ description: "OK",
161990
+ content: { "application/json": { schema: UserProfileSchema } }
161991
+ },
161992
+ ...ErrorResponses
161993
+ }
161994
+ });
161995
+ registry2.registerPath({
161996
+ method: "post",
161997
+ path: "/v1/user_profiles/{id}",
161998
+ tags: ["User Profiles"],
161999
+ summary: "Update user profile",
162000
+ security: [{ ApiKey: [] }],
162001
+ request: {
162002
+ params: external_exports.object({ id: external_exports.string() }),
162003
+ body: {
162004
+ required: true,
162005
+ content: { "application/json": { schema: UserProfileUpdateSchema } }
162006
+ }
162007
+ },
162008
+ responses: {
162009
+ 200: {
162010
+ description: "OK",
162011
+ content: { "application/json": { schema: UserProfileSchema } }
162012
+ },
162013
+ ...ErrorResponses
162014
+ }
162015
+ });
162016
+ registry2.registerPath({
162017
+ method: "post",
162018
+ path: "/v1/user_profiles/{id}/enrollment_url",
162019
+ tags: ["User Profiles"],
162020
+ summary: "Generate OAuth enrollment URL",
162021
+ security: [{ ApiKey: [] }],
162022
+ request: {
162023
+ params: external_exports.object({ id: external_exports.string() }),
162024
+ body: {
162025
+ required: true,
162026
+ content: { "application/json": { schema: EnrollmentUrlRequestSchema } }
162027
+ }
162028
+ },
162029
+ responses: {
162030
+ 200: {
162031
+ description: "OK",
162032
+ content: { "application/json": { schema: EnrollmentUrlResponseSchema } }
162033
+ },
162034
+ ...ErrorResponses
162035
+ }
162036
+ });
161879
162037
  registry2.registerPath({
161880
162038
  method: "post",
161881
162039
  path: "/v1/batch",
@@ -161897,6 +162055,76 @@ var init_chunk_PWLWDWRL = __esm({
161897
162055
  ...ErrorResponses
161898
162056
  }
161899
162057
  });
162058
+ registry2.registerPath({
162059
+ method: "post",
162060
+ path: "/google/v1beta/interactions",
162061
+ tags: ["Google Compat"],
162062
+ summary: "Create interaction (Google compat)",
162063
+ description: "Google Interactions API compatibility. Accepts google-genai SDK format.",
162064
+ responses: { 200: { description: "OK" } }
162065
+ });
162066
+ registry2.registerPath({
162067
+ method: "get",
162068
+ path: "/google/v1beta/interactions/{id}",
162069
+ tags: ["Google Compat"],
162070
+ summary: "Get interaction (Google compat)",
162071
+ request: { params: external_exports.object({ id: external_exports.string() }) },
162072
+ responses: { 200: { description: "OK" } }
162073
+ });
162074
+ registry2.registerPath({
162075
+ method: "delete",
162076
+ path: "/google/v1beta/interactions/{id}",
162077
+ tags: ["Google Compat"],
162078
+ summary: "Delete interaction (Google compat)",
162079
+ request: { params: external_exports.object({ id: external_exports.string() }) },
162080
+ responses: { 200: { description: "OK" } }
162081
+ });
162082
+ registry2.registerPath({
162083
+ method: "post",
162084
+ path: "/google/v1beta/interactions/{id}/cancel",
162085
+ tags: ["Google Compat"],
162086
+ summary: "Cancel interaction (Google compat)",
162087
+ request: { params: external_exports.object({ id: external_exports.string() }) },
162088
+ responses: { 200: { description: "OK" } }
162089
+ });
162090
+ registry2.registerPath({
162091
+ method: "post",
162092
+ path: "/google/v1beta/agents",
162093
+ tags: ["Google Compat"],
162094
+ summary: "Create agent (Google compat)",
162095
+ responses: { 201: { description: "Created" } }
162096
+ });
162097
+ registry2.registerPath({
162098
+ method: "get",
162099
+ path: "/google/v1beta/agents",
162100
+ tags: ["Google Compat"],
162101
+ summary: "List agents (Google compat)",
162102
+ responses: { 200: { description: "OK" } }
162103
+ });
162104
+ registry2.registerPath({
162105
+ method: "get",
162106
+ path: "/google/v1beta/agents/{id}",
162107
+ tags: ["Google Compat"],
162108
+ summary: "Get agent (Google compat)",
162109
+ request: { params: external_exports.object({ id: external_exports.string() }) },
162110
+ responses: { 200: { description: "OK" } }
162111
+ });
162112
+ registry2.registerPath({
162113
+ method: "delete",
162114
+ path: "/google/v1beta/agents/{id}",
162115
+ tags: ["Google Compat"],
162116
+ summary: "Delete agent (Google compat)",
162117
+ request: { params: external_exports.object({ id: external_exports.string() }) },
162118
+ responses: { 200: { description: "OK" } }
162119
+ });
162120
+ registry2.registerPath({
162121
+ method: "get",
162122
+ path: "/google/v1beta/files/{fileRef}",
162123
+ tags: ["Google Compat"],
162124
+ summary: "Download environment files (Google compat)",
162125
+ request: { params: external_exports.object({ fileRef: external_exports.string() }) },
162126
+ responses: { 200: { description: "Tar archive", content: { "application/x-tar": { schema: external_exports.string().openapi({ description: "Raw tar archive bytes." }) } } } }
162127
+ });
161900
162128
  }
161901
162129
  });
161902
162130
 
@@ -215475,7 +215703,7 @@ var init_chunk_3MQ2FWXS = __esm({
215475
215703
  }
215476
215704
  });
215477
215705
 
215478
- // ../agent-sdk/dist/chunk-K3LM6O44.js
215706
+ // ../agent-sdk/dist/chunk-AE7UG76I.js
215479
215707
  function markStopping() {
215480
215708
  stopping = true;
215481
215709
  }
@@ -215564,11 +215792,11 @@ async function evictIdleSessions() {
215564
215792
  }
215565
215793
  }
215566
215794
  var sweeping, stopping;
215567
- var init_chunk_K3LM6O44 = __esm({
215568
- "../agent-sdk/dist/chunk-K3LM6O44.js"() {
215795
+ var init_chunk_AE7UG76I = __esm({
215796
+ "../agent-sdk/dist/chunk-AE7UG76I.js"() {
215569
215797
  "use strict";
215570
215798
  init_chunk_LAWTTG2E();
215571
- init_chunk_ZCCHLDLC();
215799
+ init_chunk_IL2CZHNC();
215572
215800
  init_chunk_RES4BCTF();
215573
215801
  init_chunk_ZC7OR65K();
215574
215802
  init_chunk_XLMNSDUJ();
@@ -215583,7 +215811,7 @@ var init_chunk_K3LM6O44 = __esm({
215583
215811
  }
215584
215812
  });
215585
215813
 
215586
- // ../agent-sdk/dist/chunk-ZACPJA3G.js
215814
+ // ../agent-sdk/dist/chunk-HGV3Y4PS.js
215587
215815
  function installShutdownHandlers() {
215588
215816
  if (g13.__caShutdownInstalled) return;
215589
215817
  g13.__caShutdownInstalled = true;
@@ -215626,10 +215854,10 @@ async function shutdown(signal) {
215626
215854
  process.exit(0);
215627
215855
  }
215628
215856
  var g13, shuttingDown;
215629
- var init_chunk_ZACPJA3G = __esm({
215630
- "../agent-sdk/dist/chunk-ZACPJA3G.js"() {
215857
+ var init_chunk_HGV3Y4PS = __esm({
215858
+ "../agent-sdk/dist/chunk-HGV3Y4PS.js"() {
215631
215859
  "use strict";
215632
- init_chunk_K3LM6O44();
215860
+ init_chunk_AE7UG76I();
215633
215861
  init_chunk_AGIXZFHQ();
215634
215862
  init_chunk_UYTSKFGK();
215635
215863
  init_client();
@@ -215969,7 +216197,7 @@ var init_file_sync = __esm({
215969
216197
  init_chunk_HWWFRSAX();
215970
216198
  init_chunk_ABUNDZCE();
215971
216199
  init_chunk_ZBWKJ42J();
215972
- init_chunk_YKPRNV6J();
216200
+ init_chunk_LJ2ZXLLT();
215973
216201
  init_chunk_DZKBUOYU();
215974
216202
  init_chunk_RES4BCTF();
215975
216203
  init_chunk_MUARVVXF();
@@ -217737,7 +217965,7 @@ var init_rate_limit = __esm({
217737
217965
  }
217738
217966
  });
217739
217967
 
217740
- // ../agent-sdk/dist/chunk-P7V3S2T3.js
217968
+ // ../agent-sdk/dist/chunk-ZDURV2LI.js
217741
217969
  import path10 from "path";
217742
217970
  async function ensureInitialized() {
217743
217971
  if (g15.__caInitPromise) return g15.__caInitPromise;
@@ -217961,18 +218189,18 @@ async function rebuildContainerPool() {
217961
218189
  }
217962
218190
  }
217963
218191
  var g15;
217964
- var init_chunk_P7V3S2T3 = __esm({
217965
- "../agent-sdk/dist/chunk-P7V3S2T3.js"() {
218192
+ var init_chunk_ZDURV2LI = __esm({
218193
+ "../agent-sdk/dist/chunk-ZDURV2LI.js"() {
217966
218194
  "use strict";
217967
- init_chunk_KYKVHH7I();
218195
+ init_chunk_YAJJ7KHX();
217968
218196
  init_chunk_B3W3E5CS();
217969
218197
  init_chunk_J6ESQUW6();
217970
218198
  init_chunk_2KF2TIEY();
217971
218199
  init_chunk_3NUTTKE5();
217972
218200
  init_chunk_3MQ2FWXS();
217973
- init_chunk_ZACPJA3G();
217974
- init_chunk_K3LM6O44();
217975
- init_chunk_ZCCHLDLC();
218201
+ init_chunk_HGV3Y4PS();
218202
+ init_chunk_AE7UG76I();
218203
+ init_chunk_IL2CZHNC();
217976
218204
  init_chunk_RES4BCTF();
217977
218205
  init_chunk_ZC7OR65K();
217978
218206
  init_chunk_YPXI7Q2M();
@@ -217990,7 +218218,7 @@ var init_chunk_P7V3S2T3 = __esm({
217990
218218
  }
217991
218219
  });
217992
218220
 
217993
- // ../agent-sdk/dist/chunk-4EKHW6VS.js
218221
+ // ../agent-sdk/dist/chunk-RMCBO7K7.js
217994
218222
  async function routeWrap(request2, handler) {
217995
218223
  const startedAt = Date.now();
217996
218224
  let status = 500;
@@ -218036,24 +218264,26 @@ function jsonOk(body, status = 200) {
218036
218264
  }
218037
218265
  function paginatedOk(data, requestedLimit) {
218038
218266
  const hasMore = data.length === requestedLimit;
218039
- const nextPage = hasMore && data.length > 0 ? Buffer.from(data[data.length - 1].id).toString("base64url") : null;
218040
- return jsonOk({ data, next_page: nextPage });
218267
+ const firstId = data.length > 0 ? data[0].id : null;
218268
+ const lastId = data.length > 0 ? data[data.length - 1].id : null;
218269
+ return jsonOk({ data, has_more: hasMore, first_id: firstId, last_id: lastId });
218041
218270
  }
218042
218271
  function decodeCursor(page) {
218043
218272
  if (!page) return void 0;
218273
+ if (page.includes("_")) return page;
218044
218274
  try {
218045
218275
  return Buffer.from(page, "base64url").toString("utf8");
218046
218276
  } catch {
218047
218277
  return void 0;
218048
218278
  }
218049
218279
  }
218050
- var init_chunk_4EKHW6VS = __esm({
218051
- "../agent-sdk/dist/chunk-4EKHW6VS.js"() {
218280
+ var init_chunk_RMCBO7K7 = __esm({
218281
+ "../agent-sdk/dist/chunk-RMCBO7K7.js"() {
218052
218282
  "use strict";
218053
218283
  init_chunk_D2XITRN6();
218054
218284
  init_chunk_CWB2DQN5();
218055
218285
  init_chunk_HVUWXUUI();
218056
- init_chunk_P7V3S2T3();
218286
+ init_chunk_ZDURV2LI();
218057
218287
  init_chunk_3MQ2FWXS();
218058
218288
  init_chunk_EZYKRG4W();
218059
218289
  }
@@ -218179,9 +218409,9 @@ var init_dist2 = __esm({
218179
218409
  "../agent-sdk/dist/index.js"() {
218180
218410
  "use strict";
218181
218411
  init_chunk_VFSOYCGN();
218182
- init_chunk_GABMXDZZ();
218183
- init_chunk_PWLWDWRL();
218184
- init_chunk_SAI6LBXW();
218412
+ init_chunk_2Z4T32WO();
218413
+ init_chunk_R43A2QH7();
218414
+ init_chunk_2HVY2WZL();
218185
218415
  init_chunk_7346CKTF();
218186
218416
  init_chunk_DC2UMEQH();
218187
218417
  init_chunk_IC2ETYU5();
@@ -218192,14 +218422,14 @@ var init_dist2 = __esm({
218192
218422
  init_chunk_2N2KL4KM();
218193
218423
  init_chunk_I2RVN7CP();
218194
218424
  init_chunk_K5J4IN2S();
218195
- init_chunk_4EKHW6VS();
218425
+ init_chunk_RMCBO7K7();
218196
218426
  init_chunk_D2XITRN6();
218197
218427
  init_chunk_CWB2DQN5();
218198
218428
  init_chunk_JFHYXFAL();
218199
218429
  init_chunk_W6WKXFHN();
218200
218430
  init_chunk_HVUWXUUI();
218201
- init_chunk_P7V3S2T3();
218202
- init_chunk_KYKVHH7I();
218431
+ init_chunk_ZDURV2LI();
218432
+ init_chunk_YAJJ7KHX();
218203
218433
  init_chunk_PJZ5TQYW();
218204
218434
  init_chunk_AU4NAQGA();
218205
218435
  init_chunk_H6TQGV4L();
@@ -218214,10 +218444,10 @@ var init_dist2 = __esm({
218214
218444
  init_chunk_WK33IBKY();
218215
218445
  init_chunk_3NUTTKE5();
218216
218446
  init_chunk_3MQ2FWXS();
218217
- init_chunk_ZACPJA3G();
218218
- init_chunk_K3LM6O44();
218447
+ init_chunk_HGV3Y4PS();
218448
+ init_chunk_AE7UG76I();
218219
218449
  init_chunk_LAWTTG2E();
218220
- init_chunk_ZCCHLDLC();
218450
+ init_chunk_IL2CZHNC();
218221
218451
  init_chunk_4XXQAVKE();
218222
218452
  init_chunk_JNSJKHYX();
218223
218453
  init_chunk_5ZFOKZGR();
@@ -218554,7 +218784,7 @@ var init_models = __esm({
218554
218784
  }
218555
218785
  });
218556
218786
 
218557
- // ../agent-sdk/dist/chunk-NQ6BN7WH.js
218787
+ // ../agent-sdk/dist/chunk-BVBVWMQS.js
218558
218788
  function getAgentTenantId(id) {
218559
218789
  const row = getDb().prepare(`SELECT tenant_id FROM agents WHERE id = ?`).get(id);
218560
218790
  return row?.tenant_id;
@@ -218703,7 +218933,7 @@ function handleCreateAgent(request2) {
218703
218933
  }
218704
218934
  const backend = resolveBackend(backendName);
218705
218935
  const modelId = parsed.data.model.id;
218706
- const modelSpeed = parsed.data.model.speed;
218936
+ const modelSpeed = "speed" in parsed.data.model ? parsed.data.model.speed : void 0;
218707
218937
  const { isValidModelForEngine: isValidModelForEngine2, FALLBACK_MODELS: FALLBACK_MODELS2 } = await Promise.resolve().then(() => (init_models(), models_exports));
218708
218938
  if (!isValidModelForEngine2(backendName, modelId)) {
218709
218939
  throw badRequest(
@@ -218760,7 +218990,7 @@ function handleListAgents(request2) {
218760
218990
  const limit = url2.searchParams.get("limit");
218761
218991
  const order = url2.searchParams.get("order");
218762
218992
  const includeArchived = url2.searchParams.get("include_archived") === "true";
218763
- const cursor = decodeCursor(url2.searchParams.get("page"));
218993
+ const cursor = decodeCursor(url2.searchParams.get("after_id") ?? url2.searchParams.get("page"));
218764
218994
  const requestedLimit = limit ? Number(limit) : 20;
218765
218995
  const data = listAgents({
218766
218996
  limit: requestedLimit,
@@ -218802,7 +219032,7 @@ function handleUpdateAgent(request2, id) {
218802
219032
  throw conflict(`Version mismatch: expected ${current.version}, got ${parsed.data.version}`);
218803
219033
  }
218804
219034
  const modelId = parsed.data.model?.id;
218805
- const modelSpeed = parsed.data.model?.speed;
219035
+ const modelSpeed = parsed.data.model && "speed" in parsed.data.model ? parsed.data.model.speed : void 0;
218806
219036
  let mcpRecord;
218807
219037
  if (parsed.data.mcp_servers !== void 0) {
218808
219038
  mcpRecord = {};
@@ -218869,7 +219099,7 @@ function handleListAgentVersions(request2, id) {
218869
219099
  loadAgentForCaller(auth, id);
218870
219100
  const url2 = new URL(req.url);
218871
219101
  const limit = url2.searchParams.get("limit");
218872
- const cursorRaw = decodeCursor(url2.searchParams.get("page"));
219102
+ const cursorRaw = decodeCursor(url2.searchParams.get("after_id") ?? url2.searchParams.get("page"));
218873
219103
  const cursor = cursorRaw ? Number(cursorRaw) : void 0;
218874
219104
  const requestedLimit = limit ? Number(limit) : 20;
218875
219105
  const data = listAgentVersions(id, {
@@ -218877,16 +219107,17 @@ function handleListAgentVersions(request2, id) {
218877
219107
  cursor
218878
219108
  });
218879
219109
  const hasMore = data.length === requestedLimit;
218880
- const nextPage = hasMore && data.length > 0 ? Buffer.from(String(data[data.length - 1].version)).toString("base64url") : null;
218881
- return jsonOk({ data, next_page: nextPage });
219110
+ const firstId = data.length > 0 ? String(data[0].version) : null;
219111
+ const lastId = data.length > 0 ? String(data[data.length - 1].version) : null;
219112
+ return jsonOk({ data, has_more: hasMore, first_id: firstId, last_id: lastId });
218882
219113
  });
218883
219114
  }
218884
219115
  var InlineSkillSchema, RefSkillSchema, SkillSchema, ToolSchema, ModelConfigSchema2, TEXT_EXTENSIONS, CreateSchema, UpdateSchema;
218885
- var init_chunk_NQ6BN7WH = __esm({
218886
- "../agent-sdk/dist/chunk-NQ6BN7WH.js"() {
219116
+ var init_chunk_BVBVWMQS = __esm({
219117
+ "../agent-sdk/dist/chunk-BVBVWMQS.js"() {
218887
219118
  "use strict";
218888
219119
  init_chunk_23UKWXJH();
218889
- init_chunk_4EKHW6VS();
219120
+ init_chunk_RMCBO7K7();
218890
219121
  init_chunk_JFHYXFAL();
218891
219122
  init_chunk_DZKBUOYU();
218892
219123
  init_chunk_6U6HEVSN();
@@ -218954,7 +219185,10 @@ var init_chunk_NQ6BN7WH = __esm({
218954
219185
  ]);
218955
219186
  CreateSchema = external_exports.object({
218956
219187
  name: external_exports.string().min(1),
218957
- model: external_exports.object({ id: external_exports.string().min(1), speed: external_exports.enum(["standard", "fast"]).optional() }),
219188
+ model: external_exports.union([
219189
+ external_exports.string().min(1).transform((s) => ({ id: s })),
219190
+ external_exports.object({ id: external_exports.string().min(1), speed: external_exports.enum(["standard", "fast"]).optional() })
219191
+ ]),
218958
219192
  description: external_exports.string().max(2048).optional(),
218959
219193
  metadata: external_exports.record(external_exports.string(), external_exports.string().max(512)).optional(),
218960
219194
  system: external_exports.string().nullish(),
@@ -219010,7 +219244,10 @@ var init_chunk_NQ6BN7WH = __esm({
219010
219244
  UpdateSchema = external_exports.object({
219011
219245
  version: external_exports.number().int().min(1),
219012
219246
  name: external_exports.string().min(1).optional(),
219013
- model: external_exports.object({ id: external_exports.string().min(1), speed: external_exports.enum(["standard", "fast"]).optional() }).optional(),
219247
+ model: external_exports.union([
219248
+ external_exports.string().min(1).transform((s) => ({ id: s })),
219249
+ external_exports.object({ id: external_exports.string().min(1), speed: external_exports.enum(["standard", "fast"]).optional() })
219250
+ ]).optional(),
219014
219251
  description: external_exports.string().max(2048).optional(),
219015
219252
  metadata: external_exports.record(external_exports.string(), external_exports.string().max(512)).optional(),
219016
219253
  system: external_exports.string().nullish(),
@@ -219072,16 +219309,16 @@ __export(agents_exports, {
219072
219309
  var init_agents = __esm({
219073
219310
  "../agent-sdk/dist/handlers/agents.js"() {
219074
219311
  "use strict";
219075
- init_chunk_NQ6BN7WH();
219312
+ init_chunk_BVBVWMQS();
219076
219313
  init_chunk_23UKWXJH();
219077
- init_chunk_4EKHW6VS();
219314
+ init_chunk_RMCBO7K7();
219078
219315
  init_chunk_D2XITRN6();
219079
219316
  init_chunk_CWB2DQN5();
219080
219317
  init_chunk_JFHYXFAL();
219081
219318
  init_chunk_W6WKXFHN();
219082
219319
  init_chunk_HVUWXUUI();
219083
- init_chunk_P7V3S2T3();
219084
- init_chunk_KYKVHH7I();
219320
+ init_chunk_ZDURV2LI();
219321
+ init_chunk_YAJJ7KHX();
219085
219322
  init_chunk_PJZ5TQYW();
219086
219323
  init_chunk_AU4NAQGA();
219087
219324
  init_chunk_H6TQGV4L();
@@ -219096,10 +219333,10 @@ var init_agents = __esm({
219096
219333
  init_chunk_WK33IBKY();
219097
219334
  init_chunk_3NUTTKE5();
219098
219335
  init_chunk_3MQ2FWXS();
219099
- init_chunk_ZACPJA3G();
219100
- init_chunk_K3LM6O44();
219336
+ init_chunk_HGV3Y4PS();
219337
+ init_chunk_AE7UG76I();
219101
219338
  init_chunk_LAWTTG2E();
219102
- init_chunk_ZCCHLDLC();
219339
+ init_chunk_IL2CZHNC();
219103
219340
  init_chunk_4XXQAVKE();
219104
219341
  init_chunk_JNSJKHYX();
219105
219342
  init_chunk_5ZFOKZGR();
@@ -219171,7 +219408,7 @@ var init_agents = __esm({
219171
219408
  }
219172
219409
  });
219173
219410
 
219174
- // ../agent-sdk/dist/chunk-AUEKXYNE.js
219411
+ // ../agent-sdk/dist/chunk-VCU64NHY.js
219175
219412
  import { createHash as createHash5 } from "crypto";
219176
219413
  function anthropicHeaders(apiKey) {
219177
219414
  return {
@@ -219325,8 +219562,8 @@ async function syncAndCreateSession(opts) {
219325
219562
  return { remoteSessionId: remoteSession.id };
219326
219563
  }
219327
219564
  var ANTHROPIC_BASE2, BETA_HEADER3;
219328
- var init_chunk_AUEKXYNE = __esm({
219329
- "../agent-sdk/dist/chunk-AUEKXYNE.js"() {
219565
+ var init_chunk_VCU64NHY = __esm({
219566
+ "../agent-sdk/dist/chunk-VCU64NHY.js"() {
219330
219567
  "use strict";
219331
219568
  init_chunk_ZBWKJ42J();
219332
219569
  init_chunk_DBFPJSOY();
@@ -219484,7 +219721,7 @@ var init_vaults = __esm({
219484
219721
  }
219485
219722
  });
219486
219723
 
219487
- // ../agent-sdk/dist/chunk-BSAF4YJB.js
219724
+ // ../agent-sdk/dist/chunk-R6NWAM37.js
219488
219725
  function getAgentTenantId2(id) {
219489
219726
  const row = getDb().prepare(`SELECT tenant_id FROM agents WHERE id = ?`).get(id);
219490
219727
  return row?.tenant_id;
@@ -219862,7 +220099,7 @@ function handleListSessions(request2) {
219862
220099
  const limit = url2.searchParams.get("limit");
219863
220100
  const order = url2.searchParams.get("order");
219864
220101
  const includeArchived = url2.searchParams.get("include_archived") === "true";
219865
- const cursor = decodeCursor(url2.searchParams.get("page"));
220102
+ const cursor = decodeCursor(url2.searchParams.get("after_id") ?? url2.searchParams.get("page"));
219866
220103
  const agentId = url2.searchParams.get("agent_id") ?? void 0;
219867
220104
  const agentVersion = url2.searchParams.get("agent_version");
219868
220105
  const environmentId = url2.searchParams.get("environment_id") ?? void 0;
@@ -219988,21 +220225,21 @@ function parseMs(v2) {
219988
220225
  return Number.isFinite(t2) ? t2 : void 0;
219989
220226
  }
219990
220227
  var ALLOWED_STATUSES, AgentRef, ResourceSchema, CreateSchema2, UpdateSchema2;
219991
- var init_chunk_BSAF4YJB = __esm({
219992
- "../agent-sdk/dist/chunk-BSAF4YJB.js"() {
220228
+ var init_chunk_R6NWAM37 = __esm({
220229
+ "../agent-sdk/dist/chunk-R6NWAM37.js"() {
219993
220230
  "use strict";
219994
- init_chunk_AUEKXYNE();
220231
+ init_chunk_VCU64NHY();
219995
220232
  init_chunk_ZBWKJ42J();
219996
220233
  init_chunk_23UKWXJH();
219997
220234
  init_chunk_DC2UMEQH();
219998
220235
  init_chunk_TVV7AE3G();
219999
220236
  init_chunk_K5J4IN2S();
220000
- init_chunk_4EKHW6VS();
220237
+ init_chunk_RMCBO7K7();
220001
220238
  init_chunk_JFHYXFAL();
220002
220239
  init_chunk_H6TQGV4L();
220003
220240
  init_chunk_DZKBUOYU();
220004
220241
  init_chunk_LAWTTG2E();
220005
- init_chunk_ZCCHLDLC();
220242
+ init_chunk_IL2CZHNC();
220006
220243
  init_chunk_RES4BCTF();
220007
220244
  init_chunk_ZC7OR65K();
220008
220245
  init_chunk_NSUVDKNC();
@@ -220084,21 +220321,21 @@ __export(sessions_exports, {
220084
220321
  var init_sessions = __esm({
220085
220322
  "../agent-sdk/dist/handlers/sessions.js"() {
220086
220323
  "use strict";
220087
- init_chunk_BSAF4YJB();
220088
- init_chunk_AUEKXYNE();
220324
+ init_chunk_R6NWAM37();
220325
+ init_chunk_VCU64NHY();
220089
220326
  init_chunk_ZBWKJ42J();
220090
220327
  init_chunk_23UKWXJH();
220091
220328
  init_chunk_DC2UMEQH();
220092
220329
  init_chunk_TVV7AE3G();
220093
220330
  init_chunk_K5J4IN2S();
220094
- init_chunk_4EKHW6VS();
220331
+ init_chunk_RMCBO7K7();
220095
220332
  init_chunk_D2XITRN6();
220096
220333
  init_chunk_CWB2DQN5();
220097
220334
  init_chunk_JFHYXFAL();
220098
220335
  init_chunk_W6WKXFHN();
220099
220336
  init_chunk_HVUWXUUI();
220100
- init_chunk_P7V3S2T3();
220101
- init_chunk_KYKVHH7I();
220337
+ init_chunk_ZDURV2LI();
220338
+ init_chunk_YAJJ7KHX();
220102
220339
  init_chunk_PJZ5TQYW();
220103
220340
  init_chunk_AU4NAQGA();
220104
220341
  init_chunk_H6TQGV4L();
@@ -220113,10 +220350,10 @@ var init_sessions = __esm({
220113
220350
  init_chunk_WK33IBKY();
220114
220351
  init_chunk_3NUTTKE5();
220115
220352
  init_chunk_3MQ2FWXS();
220116
- init_chunk_ZACPJA3G();
220117
- init_chunk_K3LM6O44();
220353
+ init_chunk_HGV3Y4PS();
220354
+ init_chunk_AE7UG76I();
220118
220355
  init_chunk_LAWTTG2E();
220119
- init_chunk_ZCCHLDLC();
220356
+ init_chunk_IL2CZHNC();
220120
220357
  init_chunk_4XXQAVKE();
220121
220358
  init_chunk_JNSJKHYX();
220122
220359
  init_chunk_5ZFOKZGR();
@@ -220200,7 +220437,7 @@ __export(driver_exports, {
220200
220437
  var init_driver = __esm({
220201
220438
  "../agent-sdk/dist/sessions/driver.js"() {
220202
220439
  "use strict";
220203
- init_chunk_KYKVHH7I();
220440
+ init_chunk_YAJJ7KHX();
220204
220441
  init_chunk_PJZ5TQYW();
220205
220442
  init_chunk_AU4NAQGA();
220206
220443
  init_chunk_H6TQGV4L();
@@ -220210,7 +220447,7 @@ var init_driver = __esm({
220210
220447
  init_chunk_YOZ6WDP3();
220211
220448
  init_chunk_DZKBUOYU();
220212
220449
  init_chunk_WK33IBKY();
220213
- init_chunk_ZCCHLDLC();
220450
+ init_chunk_IL2CZHNC();
220214
220451
  init_chunk_4XXQAVKE();
220215
220452
  init_chunk_JNSJKHYX();
220216
220453
  init_chunk_5ZFOKZGR();
@@ -220365,7 +220602,7 @@ var init_sessions2 = __esm({
220365
220602
  }
220366
220603
  });
220367
220604
 
220368
- // ../agent-sdk/dist/chunk-OEYLPPID.js
220605
+ // ../agent-sdk/dist/chunk-OMGJEZJS.js
220369
220606
  function assertSessionTenant(auth, sessionId) {
220370
220607
  const row = getDb().prepare(`SELECT tenant_id FROM sessions WHERE id = ?`).get(sessionId);
220371
220608
  if (row) {
@@ -220951,17 +221188,17 @@ function handleListEvents(request2, sessionId) {
220951
221188
  });
220952
221189
  }
220953
221190
  var teeLog, activeTees, MAX_TEE_REENTRIES, TextBlock2, UserMessage, UserInterrupt, UserToolConfirmation, UserCustomToolResult, UserDefineOutcome, UserEvent, BatchSchema;
220954
- var init_chunk_OEYLPPID = __esm({
220955
- "../agent-sdk/dist/chunk-OEYLPPID.js"() {
221191
+ var init_chunk_OMGJEZJS = __esm({
221192
+ "../agent-sdk/dist/chunk-OMGJEZJS.js"() {
220956
221193
  "use strict";
220957
221194
  init_chunk_HWWFRSAX();
220958
221195
  init_chunk_ZBWKJ42J();
220959
221196
  init_chunk_23UKWXJH();
220960
221197
  init_chunk_DC2UMEQH();
220961
221198
  init_chunk_TVV7AE3G();
220962
- init_chunk_4EKHW6VS();
221199
+ init_chunk_RMCBO7K7();
220963
221200
  init_chunk_JFHYXFAL();
220964
- init_chunk_KYKVHH7I();
221201
+ init_chunk_YAJJ7KHX();
220965
221202
  init_chunk_B3W3E5CS();
220966
221203
  init_chunk_DZKBUOYU();
220967
221204
  init_chunk_LAWTTG2E();
@@ -221034,21 +221271,21 @@ __export(events_exports, {
221034
221271
  var init_events = __esm({
221035
221272
  "../agent-sdk/dist/handlers/events.js"() {
221036
221273
  "use strict";
221037
- init_chunk_OEYLPPID();
221274
+ init_chunk_OMGJEZJS();
221038
221275
  init_chunk_HWWFRSAX();
221039
221276
  init_chunk_ABUNDZCE();
221040
221277
  init_chunk_ZBWKJ42J();
221041
221278
  init_chunk_23UKWXJH();
221042
221279
  init_chunk_DC2UMEQH();
221043
221280
  init_chunk_TVV7AE3G();
221044
- init_chunk_4EKHW6VS();
221281
+ init_chunk_RMCBO7K7();
221045
221282
  init_chunk_D2XITRN6();
221046
221283
  init_chunk_CWB2DQN5();
221047
221284
  init_chunk_JFHYXFAL();
221048
221285
  init_chunk_W6WKXFHN();
221049
221286
  init_chunk_HVUWXUUI();
221050
- init_chunk_P7V3S2T3();
221051
- init_chunk_KYKVHH7I();
221287
+ init_chunk_ZDURV2LI();
221288
+ init_chunk_YAJJ7KHX();
221052
221289
  init_chunk_PJZ5TQYW();
221053
221290
  init_chunk_AU4NAQGA();
221054
221291
  init_chunk_H6TQGV4L();
@@ -221063,10 +221300,10 @@ var init_events = __esm({
221063
221300
  init_chunk_WK33IBKY();
221064
221301
  init_chunk_3NUTTKE5();
221065
221302
  init_chunk_3MQ2FWXS();
221066
- init_chunk_ZACPJA3G();
221067
- init_chunk_K3LM6O44();
221303
+ init_chunk_HGV3Y4PS();
221304
+ init_chunk_AE7UG76I();
221068
221305
  init_chunk_LAWTTG2E();
221069
- init_chunk_ZCCHLDLC();
221306
+ init_chunk_IL2CZHNC();
221070
221307
  init_chunk_4XXQAVKE();
221071
221308
  init_chunk_JNSJKHYX();
221072
221309
  init_chunk_5ZFOKZGR();
@@ -221192,7 +221429,7 @@ var init_environments = __esm({
221192
221429
  }
221193
221430
  });
221194
221431
 
221195
- // ../agent-sdk/dist/chunk-LKHJLSYG.js
221432
+ // ../agent-sdk/dist/chunk-SP26BYYZ.js
221196
221433
  function getEnvironmentTenantId2(id) {
221197
221434
  const row = getDb().prepare(`SELECT tenant_id FROM environments WHERE id = ?`).get(id);
221198
221435
  return row?.tenant_id;
@@ -221273,7 +221510,7 @@ function handleListEnvironments(request2) {
221273
221510
  const limit = url2.searchParams.get("limit");
221274
221511
  const order = url2.searchParams.get("order");
221275
221512
  const includeArchived = url2.searchParams.get("include_archived") === "true";
221276
- const cursor = decodeCursor(url2.searchParams.get("page"));
221513
+ const cursor = decodeCursor(url2.searchParams.get("after_id") ?? url2.searchParams.get("page"));
221277
221514
  const requestedLimit = limit ? Number(limit) : 20;
221278
221515
  const data = listEnvironments({
221279
221516
  limit: requestedLimit,
@@ -221350,12 +221587,12 @@ function handleUpdateEnvironment(request2, id) {
221350
221587
  });
221351
221588
  }
221352
221589
  var PackagesSchema, NetworkingSchema, ConfigSchema, CreateSchema3, UpdateSchema3;
221353
- var init_chunk_LKHJLSYG = __esm({
221354
- "../agent-sdk/dist/chunk-LKHJLSYG.js"() {
221590
+ var init_chunk_SP26BYYZ = __esm({
221591
+ "../agent-sdk/dist/chunk-SP26BYYZ.js"() {
221355
221592
  "use strict";
221356
221593
  init_chunk_23UKWXJH();
221357
221594
  init_chunk_K5J4IN2S();
221358
- init_chunk_4EKHW6VS();
221595
+ init_chunk_RMCBO7K7();
221359
221596
  init_chunk_JFHYXFAL();
221360
221597
  init_chunk_DZKBUOYU();
221361
221598
  init_chunk_XLMNSDUJ();
@@ -221419,17 +221656,17 @@ __export(environments_exports2, {
221419
221656
  var init_environments2 = __esm({
221420
221657
  "../agent-sdk/dist/handlers/environments.js"() {
221421
221658
  "use strict";
221422
- init_chunk_LKHJLSYG();
221659
+ init_chunk_SP26BYYZ();
221423
221660
  init_chunk_23UKWXJH();
221424
221661
  init_chunk_K5J4IN2S();
221425
- init_chunk_4EKHW6VS();
221662
+ init_chunk_RMCBO7K7();
221426
221663
  init_chunk_D2XITRN6();
221427
221664
  init_chunk_CWB2DQN5();
221428
221665
  init_chunk_JFHYXFAL();
221429
221666
  init_chunk_W6WKXFHN();
221430
221667
  init_chunk_HVUWXUUI();
221431
- init_chunk_P7V3S2T3();
221432
- init_chunk_KYKVHH7I();
221668
+ init_chunk_ZDURV2LI();
221669
+ init_chunk_YAJJ7KHX();
221433
221670
  init_chunk_PJZ5TQYW();
221434
221671
  init_chunk_AU4NAQGA();
221435
221672
  init_chunk_H6TQGV4L();
@@ -221444,10 +221681,10 @@ var init_environments2 = __esm({
221444
221681
  init_chunk_WK33IBKY();
221445
221682
  init_chunk_3NUTTKE5();
221446
221683
  init_chunk_3MQ2FWXS();
221447
- init_chunk_ZACPJA3G();
221448
- init_chunk_K3LM6O44();
221684
+ init_chunk_HGV3Y4PS();
221685
+ init_chunk_AE7UG76I();
221449
221686
  init_chunk_LAWTTG2E();
221450
- init_chunk_ZCCHLDLC();
221687
+ init_chunk_IL2CZHNC();
221451
221688
  init_chunk_4XXQAVKE();
221452
221689
  init_chunk_JNSJKHYX();
221453
221690
  init_chunk_5ZFOKZGR();
@@ -221548,7 +221785,7 @@ var init_bus = __esm({
221548
221785
  }
221549
221786
  });
221550
221787
 
221551
- // ../agent-sdk/dist/chunk-IYE5USSW.js
221788
+ // ../agent-sdk/dist/chunk-VRWXVIIG.js
221552
221789
  function ensureTable() {
221553
221790
  const db = getDb();
221554
221791
  db.exec(`
@@ -221663,12 +221900,20 @@ function handleCreateInteraction(request2) {
221663
221900
  }
221664
221901
  }
221665
221902
  if (!environmentId) throw badRequest("no environment available");
221903
+ const { listVaults: listVaults2 } = await Promise.resolve().then(() => (init_vaults(), vaults_exports));
221904
+ const { tenantFilter: getTenantFilter } = await Promise.resolve().then(() => (init_scope2(), scope_exports));
221905
+ const tenantVaults = listVaults2({
221906
+ tenantFilter: getTenantFilter(auth)
221907
+ });
221908
+ const agentVaults = tenantVaults.filter((v2) => v2.agent_id === agentId || !v2.agent_id);
221909
+ const vaultIds = agentVaults.filter((v2) => !v2.archived_at).map((v2) => v2.id);
221666
221910
  const sessReq = new Request(request2.url.replace(/\/google\/v1beta\/interactions.*/, `/v1/sessions`), {
221667
221911
  method: "POST",
221668
221912
  headers: request2.headers,
221669
221913
  body: JSON.stringify({
221670
221914
  agent: agentId,
221671
- environment_id: environmentId
221915
+ environment_id: environmentId,
221916
+ ...vaultIds.length > 0 ? { vault_ids: vaultIds } : {}
221672
221917
  })
221673
221918
  });
221674
221919
  const sessRes = await handleCreateSession2(sessReq);
@@ -221923,10 +222168,10 @@ function buildResponse(id, result, environmentId) {
221923
222168
  };
221924
222169
  }
221925
222170
  var CreateSchema4;
221926
- var init_chunk_IYE5USSW = __esm({
221927
- "../agent-sdk/dist/chunk-IYE5USSW.js"() {
222171
+ var init_chunk_VRWXVIIG = __esm({
222172
+ "../agent-sdk/dist/chunk-VRWXVIIG.js"() {
221928
222173
  "use strict";
221929
- init_chunk_4EKHW6VS();
222174
+ init_chunk_RMCBO7K7();
221930
222175
  init_chunk_F4WUVOLE();
221931
222176
  init_chunk_AGIXZFHQ();
221932
222177
  init_chunk_EZYKRG4W();
@@ -221947,7 +222192,7 @@ var init_chunk_IYE5USSW = __esm({
221947
222192
  }
221948
222193
  });
221949
222194
 
221950
- // ../agent-sdk/dist/chunk-QZE37OGX.js
222195
+ // ../agent-sdk/dist/chunk-2HTAIROL.js
221951
222196
  function resolveBaseAgent(baseAgent) {
221952
222197
  if (!baseAgent) return { engine: "gemini", model: "gemini-2.5-flash" };
221953
222198
  if (baseAgent === "antigravity-preview-05-2026") {
@@ -222077,10 +222322,10 @@ function handleDeleteGoogleAgent(request2, id) {
222077
222322
  });
222078
222323
  }
222079
222324
  var SourceSchema, BaseEnvironmentSchema, CreateGoogleAgentSchema;
222080
- var init_chunk_QZE37OGX = __esm({
222081
- "../agent-sdk/dist/chunk-QZE37OGX.js"() {
222325
+ var init_chunk_2HTAIROL = __esm({
222326
+ "../agent-sdk/dist/chunk-2HTAIROL.js"() {
222082
222327
  "use strict";
222083
- init_chunk_4EKHW6VS();
222328
+ init_chunk_RMCBO7K7();
222084
222329
  init_chunk_EZYKRG4W();
222085
222330
  init_zod();
222086
222331
  SourceSchema = external_exports.object({
@@ -222104,7 +222349,7 @@ var init_chunk_QZE37OGX = __esm({
222104
222349
  }
222105
222350
  });
222106
222351
 
222107
- // ../agent-sdk/dist/chunk-X7UWCDYG.js
222352
+ // ../agent-sdk/dist/chunk-PULMO5OO.js
222108
222353
  function buildTarArchive(files2) {
222109
222354
  const blocks = [];
222110
222355
  for (const file of files2) {
@@ -222183,18 +222428,18 @@ function handleGetEnvironmentFiles(request2, fileRef) {
222183
222428
  });
222184
222429
  });
222185
222430
  }
222186
- var init_chunk_X7UWCDYG = __esm({
222187
- "../agent-sdk/dist/chunk-X7UWCDYG.js"() {
222431
+ var init_chunk_PULMO5OO = __esm({
222432
+ "../agent-sdk/dist/chunk-PULMO5OO.js"() {
222188
222433
  "use strict";
222189
222434
  init_chunk_STPT3SWU();
222190
- init_chunk_4EKHW6VS();
222435
+ init_chunk_RMCBO7K7();
222191
222436
  init_chunk_AGIXZFHQ();
222192
222437
  init_chunk_EZYKRG4W();
222193
222438
  init_client();
222194
222439
  }
222195
222440
  });
222196
222441
 
222197
- // ../agent-sdk/dist/chunk-SUEPFZN2.js
222442
+ // ../agent-sdk/dist/chunk-3CDJ2VQN.js
222198
222443
  function handleWhoami(request2) {
222199
222444
  return routeWrap(request2, async ({ auth }) => {
222200
222445
  return jsonOk({
@@ -222205,14 +222450,14 @@ function handleWhoami(request2) {
222205
222450
  });
222206
222451
  });
222207
222452
  }
222208
- var init_chunk_SUEPFZN2 = __esm({
222209
- "../agent-sdk/dist/chunk-SUEPFZN2.js"() {
222453
+ var init_chunk_3CDJ2VQN = __esm({
222454
+ "../agent-sdk/dist/chunk-3CDJ2VQN.js"() {
222210
222455
  "use strict";
222211
- init_chunk_4EKHW6VS();
222456
+ init_chunk_RMCBO7K7();
222212
222457
  }
222213
222458
  });
222214
222459
 
222215
- // ../agent-sdk/dist/chunk-6CODFATQ.js
222460
+ // ../agent-sdk/dist/chunk-PUAK45BO.js
222216
222461
  function assertSelfHostedEnv(envId) {
222217
222462
  const env3 = getEnvironment(envId);
222218
222463
  if (!env3) throw notFound(`environment not found: ${envId}`);
@@ -222225,7 +222470,7 @@ function handleListWork(request2, envId) {
222225
222470
  assertSelfHostedEnv(envId);
222226
222471
  const url2 = new URL(req.url);
222227
222472
  const requestedLimit = Number(url2.searchParams.get("limit") || "20");
222228
- const cursor = decodeCursor(url2.searchParams.get("page"));
222473
+ const cursor = decodeCursor(url2.searchParams.get("after_id") ?? url2.searchParams.get("page"));
222229
222474
  const state4 = url2.searchParams.get("state") ?? void 0;
222230
222475
  const items = listWorkItems(envId, { limit: requestedLimit, cursor, state: state4 });
222231
222476
  return paginatedOk(items, requestedLimit);
@@ -222314,11 +222559,11 @@ function handleStopWork(request2, envId, workId) {
222314
222559
  });
222315
222560
  }
222316
222561
  var UpdateWorkSchema, AckWorkSchema, StopWorkSchema;
222317
- var init_chunk_6CODFATQ = __esm({
222318
- "../agent-sdk/dist/chunk-6CODFATQ.js"() {
222562
+ var init_chunk_PUAK45BO = __esm({
222563
+ "../agent-sdk/dist/chunk-PUAK45BO.js"() {
222319
222564
  "use strict";
222320
222565
  init_chunk_JF777FWD();
222321
- init_chunk_4EKHW6VS();
222566
+ init_chunk_RMCBO7K7();
222322
222567
  init_chunk_NSUVDKNC();
222323
222568
  init_chunk_EZYKRG4W();
222324
222569
  init_zod();
@@ -222590,7 +222835,7 @@ var init_chunk_DF34ESOO = __esm({
222590
222835
  }
222591
222836
  });
222592
222837
 
222593
- // ../agent-sdk/dist/chunk-FHOJOLXU.js
222838
+ // ../agent-sdk/dist/chunk-XLVZ5236.js
222594
222839
  async function handleGetSkillsCatalog(request2) {
222595
222840
  return routeWrap(request2, async ({ request: req }) => {
222596
222841
  const url2 = new URL(req.url);
@@ -222646,15 +222891,15 @@ async function handleGetSkillsFeed(request2) {
222646
222891
  return jsonOk(feed);
222647
222892
  });
222648
222893
  }
222649
- var init_chunk_FHOJOLXU = __esm({
222650
- "../agent-sdk/dist/chunk-FHOJOLXU.js"() {
222894
+ var init_chunk_XLVZ5236 = __esm({
222895
+ "../agent-sdk/dist/chunk-XLVZ5236.js"() {
222651
222896
  "use strict";
222652
222897
  init_chunk_DF34ESOO();
222653
- init_chunk_4EKHW6VS();
222898
+ init_chunk_RMCBO7K7();
222654
222899
  }
222655
222900
  });
222656
222901
 
222657
- // ../agent-sdk/dist/chunk-AD2WPGDN.js
222902
+ // ../agent-sdk/dist/chunk-5BIX3H2D.js
222658
222903
  async function prepareSessionStream(request2, sessionId) {
222659
222904
  try {
222660
222905
  await ensureInitialized();
@@ -222747,14 +222992,14 @@ data: ${JSON.stringify(evt)}
222747
222992
  }
222748
222993
  });
222749
222994
  }
222750
- var init_chunk_AD2WPGDN = __esm({
222751
- "../agent-sdk/dist/chunk-AD2WPGDN.js"() {
222995
+ var init_chunk_5BIX3H2D = __esm({
222996
+ "../agent-sdk/dist/chunk-5BIX3H2D.js"() {
222752
222997
  "use strict";
222753
222998
  init_chunk_ZBWKJ42J();
222754
222999
  init_chunk_23UKWXJH();
222755
223000
  init_chunk_CWB2DQN5();
222756
223001
  init_chunk_JFHYXFAL();
222757
- init_chunk_P7V3S2T3();
223002
+ init_chunk_ZDURV2LI();
222758
223003
  init_chunk_DZKBUOYU();
222759
223004
  init_chunk_RES4BCTF();
222760
223005
  init_chunk_ZC7OR65K();
@@ -222764,7 +223009,7 @@ var init_chunk_AD2WPGDN = __esm({
222764
223009
  }
222765
223010
  });
222766
223011
 
222767
- // ../agent-sdk/dist/chunk-XXAO5YYL.js
223012
+ // ../agent-sdk/dist/chunk-3IO3EGWP.js
222768
223013
  function handleCreateTenant(request2) {
222769
223014
  return routeWrap(request2, async ({ auth, request: req }) => {
222770
223015
  requireFeature("tenancy", "multi-tenancy");
@@ -222863,13 +223108,13 @@ function handleArchiveTenant(request2, id) {
222863
223108
  });
222864
223109
  }
222865
223110
  var CreateBody, PatchBody;
222866
- var init_chunk_XXAO5YYL = __esm({
222867
- "../agent-sdk/dist/chunk-XXAO5YYL.js"() {
223111
+ var init_chunk_3IO3EGWP = __esm({
223112
+ "../agent-sdk/dist/chunk-3IO3EGWP.js"() {
222868
223113
  "use strict";
222869
223114
  init_chunk_23UKWXJH();
222870
223115
  init_chunk_FDLQ3IUB();
222871
223116
  init_chunk_2N2KL4KM();
222872
- init_chunk_4EKHW6VS();
223117
+ init_chunk_RMCBO7K7();
222873
223118
  init_chunk_YTBVILAH();
222874
223119
  init_chunk_EZYKRG4W();
222875
223120
  init_zod();
@@ -222883,7 +223128,7 @@ var init_chunk_XXAO5YYL = __esm({
222883
223128
  }
222884
223129
  });
222885
223130
 
222886
- // ../agent-sdk/dist/chunk-ZAUWB5DQ.js
223131
+ // ../agent-sdk/dist/chunk-4XB2CJPE.js
222887
223132
  function loadSession(auth, sessionId) {
222888
223133
  const row = getDb().prepare(`SELECT tenant_id FROM sessions WHERE id = ?`).get(sessionId);
222889
223134
  if (!row) throw notFound(`session ${sessionId} not found`);
@@ -223008,12 +223253,12 @@ data: ${JSON.stringify(evt)}
223008
223253
  });
223009
223254
  });
223010
223255
  }
223011
- var init_chunk_ZAUWB5DQ = __esm({
223012
- "../agent-sdk/dist/chunk-ZAUWB5DQ.js"() {
223256
+ var init_chunk_4XB2CJPE = __esm({
223257
+ "../agent-sdk/dist/chunk-4XB2CJPE.js"() {
223013
223258
  "use strict";
223014
223259
  init_chunk_Z5IENUYV();
223015
223260
  init_chunk_23UKWXJH();
223016
- init_chunk_4EKHW6VS();
223261
+ init_chunk_RMCBO7K7();
223017
223262
  init_chunk_RES4BCTF();
223018
223263
  init_chunk_ZC7OR65K();
223019
223264
  init_chunk_OEFJPZYH();
@@ -223065,7 +223310,7 @@ var init_chunk_UMXXZ6OX = __esm({
223065
223310
  }
223066
223311
  });
223067
223312
 
223068
- // ../agent-sdk/dist/chunk-3EWEKBVC.js
223313
+ // ../agent-sdk/dist/chunk-VWCIN45Y.js
223069
223314
  function buildSpanTree(events2) {
223070
223315
  const nodes = /* @__PURE__ */ new Map();
223071
223316
  const openStarts = /* @__PURE__ */ new Map();
@@ -223249,11 +223494,11 @@ function handleExportTrace(request2, traceId) {
223249
223494
  return jsonOk(result, result.ok ? 200 : 502);
223250
223495
  });
223251
223496
  }
223252
- var init_chunk_3EWEKBVC = __esm({
223253
- "../agent-sdk/dist/chunk-3EWEKBVC.js"() {
223497
+ var init_chunk_VWCIN45Y = __esm({
223498
+ "../agent-sdk/dist/chunk-VWCIN45Y.js"() {
223254
223499
  "use strict";
223255
223500
  init_chunk_UMXXZ6OX();
223256
- init_chunk_4EKHW6VS();
223501
+ init_chunk_RMCBO7K7();
223257
223502
  init_chunk_2KF2TIEY();
223258
223503
  init_chunk_OEFJPZYH();
223259
223504
  init_chunk_EZYKRG4W();
@@ -223840,7 +224085,7 @@ agentstep skills install \${n}
223840
224085
  }
223841
224086
  });
223842
224087
 
223843
- // ../agent-sdk/dist/chunk-JIXRTWYL.js
224088
+ // ../agent-sdk/dist/chunk-FH2IOAQM.js
223844
224089
  function handleAddUpstreamKey(request2) {
223845
224090
  return routeWrap(request2, async ({ auth, request: req }) => {
223846
224091
  requireFeature("upstream_pool", "upstream key pool");
@@ -223932,15 +224177,15 @@ function handleDeleteUpstreamKey(request2, id) {
223932
224177
  });
223933
224178
  }
223934
224179
  var AddBody, PatchBody2;
223935
- var init_chunk_JIXRTWYL = __esm({
223936
- "../agent-sdk/dist/chunk-JIXRTWYL.js"() {
224180
+ var init_chunk_FH2IOAQM = __esm({
224181
+ "../agent-sdk/dist/chunk-FH2IOAQM.js"() {
223937
224182
  "use strict";
223938
224183
  init_chunk_HWWFRSAX();
223939
224184
  init_chunk_ABUNDZCE();
223940
224185
  init_chunk_23UKWXJH();
223941
224186
  init_chunk_FDLQ3IUB();
223942
224187
  init_chunk_2N2KL4KM();
223943
- init_chunk_4EKHW6VS();
224188
+ init_chunk_RMCBO7K7();
223944
224189
  init_chunk_EZYKRG4W();
223945
224190
  init_zod();
223946
224191
  AddBody = external_exports.object({
@@ -223954,7 +224199,7 @@ var init_chunk_JIXRTWYL = __esm({
223954
224199
  }
223955
224200
  });
223956
224201
 
223957
- // ../agent-sdk/dist/chunk-ZHEE6UTX.js
224202
+ // ../agent-sdk/dist/chunk-2YZUXJAN.js
223958
224203
  function handleCreateUserProfile(request2) {
223959
224204
  return routeWrap(request2, async ({ auth }) => {
223960
224205
  const body = await request2.json().catch(() => null);
@@ -224019,16 +224264,16 @@ function handleUpdateUserProfile(request2, id) {
224019
224264
  return jsonOk(updated);
224020
224265
  });
224021
224266
  }
224022
- var TrustGrantSchema, CreateSchema5, UpdateSchema4;
224023
- var init_chunk_ZHEE6UTX = __esm({
224024
- "../agent-sdk/dist/chunk-ZHEE6UTX.js"() {
224267
+ var TrustGrantSchema2, CreateSchema5, UpdateSchema4;
224268
+ var init_chunk_2YZUXJAN = __esm({
224269
+ "../agent-sdk/dist/chunk-2YZUXJAN.js"() {
224025
224270
  "use strict";
224026
224271
  init_chunk_23UKWXJH();
224027
- init_chunk_4EKHW6VS();
224272
+ init_chunk_RMCBO7K7();
224028
224273
  init_chunk_YOZ6WDP3();
224029
224274
  init_chunk_EZYKRG4W();
224030
224275
  init_zod();
224031
- TrustGrantSchema = external_exports.object({
224276
+ TrustGrantSchema2 = external_exports.object({
224032
224277
  type: external_exports.literal("vault_credential"),
224033
224278
  vault_id: external_exports.string().min(1),
224034
224279
  credential_id: external_exports.string().min(1)
@@ -224036,17 +224281,17 @@ var init_chunk_ZHEE6UTX = __esm({
224036
224281
  CreateSchema5 = external_exports.object({
224037
224282
  external_id: external_exports.string().max(256).optional(),
224038
224283
  display_name: external_exports.string().max(256).optional(),
224039
- trust_grants: external_exports.array(TrustGrantSchema).max(50).optional()
224284
+ trust_grants: external_exports.array(TrustGrantSchema2).max(50).optional()
224040
224285
  });
224041
224286
  UpdateSchema4 = external_exports.object({
224042
224287
  external_id: external_exports.string().max(256).nullish(),
224043
224288
  display_name: external_exports.string().max(256).nullish(),
224044
- trust_grants: external_exports.array(TrustGrantSchema).max(50).optional()
224289
+ trust_grants: external_exports.array(TrustGrantSchema2).max(50).optional()
224045
224290
  });
224046
224291
  }
224047
224292
  });
224048
224293
 
224049
- // ../agent-sdk/dist/chunk-CZ4N5FJW.js
224294
+ // ../agent-sdk/dist/chunk-W3DA3OFL.js
224050
224295
  function zeroTotals() {
224051
224296
  return {
224052
224297
  session_count: 0,
@@ -224406,12 +224651,12 @@ function handleGetApiMetrics(request2) {
224406
224651
  });
224407
224652
  }
224408
224653
  var BUCKET_MS, TOP_N, MAX_POINTS_PER_SERIES, MAX_TOTAL_CELLS;
224409
- var init_chunk_CZ4N5FJW = __esm({
224410
- "../agent-sdk/dist/chunk-CZ4N5FJW.js"() {
224654
+ var init_chunk_W3DA3OFL = __esm({
224655
+ "../agent-sdk/dist/chunk-W3DA3OFL.js"() {
224411
224656
  "use strict";
224412
224657
  init_chunk_23UKWXJH();
224413
224658
  init_chunk_2N2KL4KM();
224414
- init_chunk_4EKHW6VS();
224659
+ init_chunk_RMCBO7K7();
224415
224660
  init_chunk_D2XITRN6();
224416
224661
  init_chunk_AGIXZFHQ();
224417
224662
  init_chunk_EZYKRG4W();
@@ -224427,7 +224672,7 @@ var init_chunk_CZ4N5FJW = __esm({
224427
224672
  }
224428
224673
  });
224429
224674
 
224430
- // ../agent-sdk/dist/chunk-JDAOTVWV.js
224675
+ // ../agent-sdk/dist/chunk-VIWYYVGR.js
224431
224676
  function handleListModels(request2) {
224432
224677
  return routeWrap(request2, async ({ request: req }) => {
224433
224678
  const url2 = new URL(req.url);
@@ -224438,15 +224683,15 @@ function handleListModels(request2) {
224438
224683
  return jsonOk({ data: models });
224439
224684
  });
224440
224685
  }
224441
- var init_chunk_JDAOTVWV = __esm({
224442
- "../agent-sdk/dist/chunk-JDAOTVWV.js"() {
224686
+ var init_chunk_VIWYYVGR = __esm({
224687
+ "../agent-sdk/dist/chunk-VIWYYVGR.js"() {
224443
224688
  "use strict";
224444
224689
  init_chunk_UTGP4X74();
224445
- init_chunk_4EKHW6VS();
224690
+ init_chunk_RMCBO7K7();
224446
224691
  }
224447
224692
  });
224448
224693
 
224449
- // ../agent-sdk/dist/chunk-IMJTHYN3.js
224694
+ // ../agent-sdk/dist/chunk-CCNG7D6Y.js
224450
224695
  function originFromRequest(request2) {
224451
224696
  const headers3 = request2.headers;
224452
224697
  const proto3 = headers3.get("x-forwarded-proto") ?? new URL(request2.url).protocol.replace(":", "");
@@ -224458,14 +224703,14 @@ async function handleGetOpenApiSpec(request2) {
224458
224703
  const doc = buildOpenApiDocument({ serverUrl });
224459
224704
  return Response.json(doc);
224460
224705
  }
224461
- var init_chunk_IMJTHYN3 = __esm({
224462
- "../agent-sdk/dist/chunk-IMJTHYN3.js"() {
224706
+ var init_chunk_CCNG7D6Y = __esm({
224707
+ "../agent-sdk/dist/chunk-CCNG7D6Y.js"() {
224463
224708
  "use strict";
224464
- init_chunk_PWLWDWRL();
224709
+ init_chunk_R43A2QH7();
224465
224710
  }
224466
224711
  });
224467
224712
 
224468
- // ../agent-sdk/dist/chunk-3EI7IPMI.js
224713
+ // ../agent-sdk/dist/chunk-R7MZNZNC.js
224469
224714
  async function checkLocalProvider(name) {
224470
224715
  try {
224471
224716
  const provider = await resolveContainerProvider(name);
@@ -224504,10 +224749,10 @@ async function handleGetProviderStatus(request2) {
224504
224749
  });
224505
224750
  }
224506
224751
  var LOCAL_PROVIDERS, CLOUD_PROVIDERS, CLOUD_KEY_MAP;
224507
- var init_chunk_3EI7IPMI = __esm({
224508
- "../agent-sdk/dist/chunk-3EI7IPMI.js"() {
224752
+ var init_chunk_R7MZNZNC = __esm({
224753
+ "../agent-sdk/dist/chunk-R7MZNZNC.js"() {
224509
224754
  "use strict";
224510
- init_chunk_4EKHW6VS();
224755
+ init_chunk_RMCBO7K7();
224511
224756
  init_chunk_XLMNSDUJ();
224512
224757
  init_chunk_6EIONZ7F();
224513
224758
  LOCAL_PROVIDERS = ["docker", "apple-container", "podman"];
@@ -224523,7 +224768,7 @@ var init_chunk_3EI7IPMI = __esm({
224523
224768
  }
224524
224769
  });
224525
224770
 
224526
- // ../agent-sdk/dist/chunk-LR6FK2J7.js
224771
+ // ../agent-sdk/dist/chunk-DQIQBMC2.js
224527
224772
  function assertSessionTenant2(auth, sessionId) {
224528
224773
  const row = getDb().prepare(`SELECT tenant_id FROM sessions WHERE id = ?`).get(sessionId);
224529
224774
  if (row) {
@@ -224611,11 +224856,11 @@ function handleDeleteResource(request2, sessionId, resourceId) {
224611
224856
  });
224612
224857
  }
224613
224858
  var MAX_RESOURCES_PER_SESSION, AddResourceSchema, UpdateResourceSchema;
224614
- var init_chunk_LR6FK2J7 = __esm({
224615
- "../agent-sdk/dist/chunk-LR6FK2J7.js"() {
224859
+ var init_chunk_DQIQBMC2 = __esm({
224860
+ "../agent-sdk/dist/chunk-DQIQBMC2.js"() {
224616
224861
  "use strict";
224617
224862
  init_chunk_23UKWXJH();
224618
- init_chunk_4EKHW6VS();
224863
+ init_chunk_RMCBO7K7();
224619
224864
  init_chunk_DZKBUOYU();
224620
224865
  init_chunk_ZC7OR65K();
224621
224866
  init_chunk_GCT7A5KR();
@@ -224646,7 +224891,7 @@ var init_chunk_LR6FK2J7 = __esm({
224646
224891
  }
224647
224892
  });
224648
224893
 
224649
- // ../agent-sdk/dist/chunk-6NFK5RJX.js
224894
+ // ../agent-sdk/dist/chunk-52K3LOFD.js
224650
224895
  function maskSecret(value) {
224651
224896
  if (!value) return "";
224652
224897
  if (value.length <= 12) return "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
@@ -224681,10 +224926,10 @@ function handleGetSetting(request2, key) {
224681
224926
  });
224682
224927
  }
224683
224928
  var NON_SECRET_KEYS, ALLOWED_KEYS, SECRET_KEYS;
224684
- var init_chunk_6NFK5RJX = __esm({
224685
- "../agent-sdk/dist/chunk-6NFK5RJX.js"() {
224929
+ var init_chunk_52K3LOFD = __esm({
224930
+ "../agent-sdk/dist/chunk-52K3LOFD.js"() {
224686
224931
  "use strict";
224687
- init_chunk_4EKHW6VS();
224932
+ init_chunk_RMCBO7K7();
224688
224933
  init_chunk_6EIONZ7F();
224689
224934
  init_chunk_EZYKRG4W();
224690
224935
  NON_SECRET_KEYS = /* @__PURE__ */ new Set([
@@ -224726,7 +224971,7 @@ var init_chunk_6NFK5RJX = __esm({
224726
224971
  }
224727
224972
  });
224728
224973
 
224729
- // ../agent-sdk/dist/chunk-75US4UAE.js
224974
+ // ../agent-sdk/dist/chunk-2E43SH4Y.js
224730
224975
  import { inflateRawSync } from "zlib";
224731
224976
  function extractFromZipRaw(buffer) {
224732
224977
  const files2 = /* @__PURE__ */ new Map();
@@ -224905,12 +225150,12 @@ function handleDeleteSkillVersion(request2, skillId, version3) {
224905
225150
  });
224906
225151
  }
224907
225152
  var TEXT_EXTENSIONS2, CreateSkillSchema, CreateVersionSchema;
224908
- var init_chunk_75US4UAE = __esm({
224909
- "../agent-sdk/dist/chunk-75US4UAE.js"() {
225153
+ var init_chunk_2E43SH4Y = __esm({
225154
+ "../agent-sdk/dist/chunk-2E43SH4Y.js"() {
224910
225155
  "use strict";
224911
225156
  init_chunk_TTDMQ54U();
224912
225157
  init_chunk_23UKWXJH();
224913
- init_chunk_4EKHW6VS();
225158
+ init_chunk_RMCBO7K7();
224914
225159
  init_chunk_EZYKRG4W();
224915
225160
  init_zod();
224916
225161
  TEXT_EXTENSIONS2 = /* @__PURE__ */ new Set([
@@ -225070,8 +225315,8 @@ __export(init_exports4, {
225070
225315
  var init_init = __esm({
225071
225316
  "../agent-sdk/dist/init.js"() {
225072
225317
  "use strict";
225073
- init_chunk_P7V3S2T3();
225074
- init_chunk_KYKVHH7I();
225318
+ init_chunk_ZDURV2LI();
225319
+ init_chunk_YAJJ7KHX();
225075
225320
  init_chunk_PJZ5TQYW();
225076
225321
  init_chunk_AU4NAQGA();
225077
225322
  init_chunk_H6TQGV4L();
@@ -225086,10 +225331,10 @@ var init_init = __esm({
225086
225331
  init_chunk_WK33IBKY();
225087
225332
  init_chunk_3NUTTKE5();
225088
225333
  init_chunk_3MQ2FWXS();
225089
- init_chunk_ZACPJA3G();
225090
- init_chunk_K3LM6O44();
225334
+ init_chunk_HGV3Y4PS();
225335
+ init_chunk_AE7UG76I();
225091
225336
  init_chunk_LAWTTG2E();
225092
- init_chunk_ZCCHLDLC();
225337
+ init_chunk_IL2CZHNC();
225093
225338
  init_chunk_4XXQAVKE();
225094
225339
  init_chunk_JNSJKHYX();
225095
225340
  init_chunk_5ZFOKZGR();
@@ -225161,7 +225406,7 @@ var init_init = __esm({
225161
225406
  }
225162
225407
  });
225163
225408
 
225164
- // ../agent-sdk/dist/chunk-6NEWWPL4.js
225409
+ // ../agent-sdk/dist/chunk-TBLHBMA5.js
225165
225410
  import { randomBytes } from "crypto";
225166
225411
  function handleEnrollmentUrl(request2, profileId) {
225167
225412
  return routeWrap(request2, async ({ auth }) => {
@@ -225325,11 +225570,11 @@ async function handleOAuthCallback(request2) {
225325
225570
  }
225326
225571
  }
225327
225572
  var pendingEnrollments, EnrollmentSchema;
225328
- var init_chunk_6NEWWPL4 = __esm({
225329
- "../agent-sdk/dist/chunk-6NEWWPL4.js"() {
225573
+ var init_chunk_TBLHBMA5 = __esm({
225574
+ "../agent-sdk/dist/chunk-TBLHBMA5.js"() {
225330
225575
  "use strict";
225331
225576
  init_chunk_23UKWXJH();
225332
- init_chunk_4EKHW6VS();
225577
+ init_chunk_RMCBO7K7();
225333
225578
  init_chunk_YOZ6WDP3();
225334
225579
  init_chunk_WK33IBKY();
225335
225580
  init_chunk_EZYKRG4W();
@@ -225357,7 +225602,7 @@ var init_chunk_6NEWWPL4 = __esm({
225357
225602
  }
225358
225603
  });
225359
225604
 
225360
- // ../agent-sdk/dist/chunk-VQM2MCQR.js
225605
+ // ../agent-sdk/dist/chunk-JFIJEF4N.js
225361
225606
  function assertFileTenantByScope(auth, scopeType, scopeId) {
225362
225607
  if (!scopeId || scopeType !== "session") {
225363
225608
  if (!auth.isGlobalAdmin) throw notFound("file not found");
@@ -225492,34 +225737,34 @@ function handleDeleteFile(request2, fileId) {
225492
225737
  return jsonOk(result);
225493
225738
  });
225494
225739
  }
225495
- var init_chunk_VQM2MCQR = __esm({
225496
- "../agent-sdk/dist/chunk-VQM2MCQR.js"() {
225740
+ var init_chunk_JFIJEF4N = __esm({
225741
+ "../agent-sdk/dist/chunk-JFIJEF4N.js"() {
225497
225742
  "use strict";
225498
225743
  init_chunk_STPT3SWU();
225499
- init_chunk_YKPRNV6J();
225744
+ init_chunk_LJ2ZXLLT();
225500
225745
  init_chunk_23UKWXJH();
225501
- init_chunk_4EKHW6VS();
225746
+ init_chunk_RMCBO7K7();
225502
225747
  init_chunk_AGIXZFHQ();
225503
225748
  init_chunk_EZYKRG4W();
225504
225749
  init_client();
225505
225750
  }
225506
225751
  });
225507
225752
 
225508
- // ../agent-sdk/dist/chunk-FCPZF7KJ.js
225753
+ // ../agent-sdk/dist/chunk-L2ZB7TCF.js
225509
225754
  function handleGetLicense(request2) {
225510
225755
  return routeWrap(request2, async () => {
225511
225756
  return jsonOk(getLicenseInfo());
225512
225757
  });
225513
225758
  }
225514
- var init_chunk_FCPZF7KJ = __esm({
225515
- "../agent-sdk/dist/chunk-FCPZF7KJ.js"() {
225759
+ var init_chunk_L2ZB7TCF = __esm({
225760
+ "../agent-sdk/dist/chunk-L2ZB7TCF.js"() {
225516
225761
  "use strict";
225517
225762
  init_chunk_2N2KL4KM();
225518
- init_chunk_4EKHW6VS();
225763
+ init_chunk_RMCBO7K7();
225519
225764
  }
225520
225765
  });
225521
225766
 
225522
- // ../agent-sdk/dist/chunk-25E64UIV.js
225767
+ // ../agent-sdk/dist/chunk-ZPTYXWUO.js
225523
225768
  function assertStoreTenant(auth, storeAgentId) {
225524
225769
  if (storeAgentId == null) {
225525
225770
  if (!auth.isGlobalAdmin) throw notFound("memory store not found");
@@ -225719,13 +225964,13 @@ function handleDreamMemoryStore(request2, storeId) {
225719
225964
  });
225720
225965
  }
225721
225966
  var CreateStoreSchema, UpdateStoreSchema, CreateMemorySchema, UpdateMemorySchema, DreamRequestSchema, dreamCooldowns, DREAM_COOLDOWN_MS;
225722
- var init_chunk_25E64UIV = __esm({
225723
- "../agent-sdk/dist/chunk-25E64UIV.js"() {
225967
+ var init_chunk_ZPTYXWUO = __esm({
225968
+ "../agent-sdk/dist/chunk-ZPTYXWUO.js"() {
225724
225969
  "use strict";
225725
225970
  init_chunk_23UKWXJH();
225726
225971
  init_chunk_IC2ETYU5();
225727
225972
  init_chunk_TVV7AE3G();
225728
- init_chunk_4EKHW6VS();
225973
+ init_chunk_RMCBO7K7();
225729
225974
  init_chunk_6EIONZ7F();
225730
225975
  init_chunk_AGIXZFHQ();
225731
225976
  init_chunk_EZYKRG4W();
@@ -225760,7 +226005,7 @@ var init_chunk_25E64UIV = __esm({
225760
226005
  }
225761
226006
  });
225762
226007
 
225763
- // ../agent-sdk/dist/chunk-3LYNN5VT.js
226008
+ // ../agent-sdk/dist/chunk-3WPVSQGI.js
225764
226009
  function toView3(row) {
225765
226010
  return row;
225766
226011
  }
@@ -225931,13 +226176,13 @@ function handleGetApiKeyActivity(request2, id) {
225931
226176
  });
225932
226177
  }
225933
226178
  var ScopeSchema, PermissionsSchema, CreateBody2, PatchBody3;
225934
- var init_chunk_3LYNN5VT = __esm({
225935
- "../agent-sdk/dist/chunk-3LYNN5VT.js"() {
226179
+ var init_chunk_3WPVSQGI = __esm({
226180
+ "../agent-sdk/dist/chunk-3WPVSQGI.js"() {
225936
226181
  "use strict";
225937
226182
  init_chunk_23UKWXJH();
225938
226183
  init_chunk_FDLQ3IUB();
225939
226184
  init_chunk_2N2KL4KM();
225940
- init_chunk_4EKHW6VS();
226185
+ init_chunk_RMCBO7K7();
225941
226186
  init_chunk_3NUTTKE5();
225942
226187
  init_chunk_ZC7OR65K();
225943
226188
  init_chunk_AGIXZFHQ();
@@ -225964,7 +226209,7 @@ var init_chunk_3LYNN5VT = __esm({
225964
226209
  }
225965
226210
  });
225966
226211
 
225967
- // ../agent-sdk/dist/chunk-GBBQD6VY.js
226212
+ // ../agent-sdk/dist/chunk-MG2DS6QE.js
225968
226213
  function parseMs2(v2) {
225969
226214
  if (!v2) return void 0;
225970
226215
  const n = Number(v2);
@@ -226011,18 +226256,18 @@ function handleListAudit(request2) {
226011
226256
  });
226012
226257
  }
226013
226258
  var VALID_OUTCOMES;
226014
- var init_chunk_GBBQD6VY = __esm({
226015
- "../agent-sdk/dist/chunk-GBBQD6VY.js"() {
226259
+ var init_chunk_MG2DS6QE = __esm({
226260
+ "../agent-sdk/dist/chunk-MG2DS6QE.js"() {
226016
226261
  "use strict";
226017
226262
  init_chunk_23UKWXJH();
226018
226263
  init_chunk_FDLQ3IUB();
226019
- init_chunk_4EKHW6VS();
226264
+ init_chunk_RMCBO7K7();
226020
226265
  init_chunk_EZYKRG4W();
226021
226266
  VALID_OUTCOMES = /* @__PURE__ */ new Set(["success", "denied", "failure"]);
226022
226267
  }
226023
226268
  });
226024
226269
 
226025
- // ../agent-sdk/dist/chunk-HHLVVJGT.js
226270
+ // ../agent-sdk/dist/chunk-3RK6EX7J.js
226026
226271
  function handleBatch(request2) {
226027
226272
  return routeWrap(request2, async () => {
226028
226273
  const body = await request2.json();
@@ -226049,11 +226294,11 @@ function handleBatch(request2) {
226049
226294
  });
226050
226295
  }
226051
226296
  var OperationSchema, BatchSchema2;
226052
- var init_chunk_HHLVVJGT = __esm({
226053
- "../agent-sdk/dist/chunk-HHLVVJGT.js"() {
226297
+ var init_chunk_3RK6EX7J = __esm({
226298
+ "../agent-sdk/dist/chunk-3RK6EX7J.js"() {
226054
226299
  "use strict";
226055
226300
  init_chunk_I2RVN7CP();
226056
- init_chunk_4EKHW6VS();
226301
+ init_chunk_RMCBO7K7();
226057
226302
  init_chunk_EZYKRG4W();
226058
226303
  init_zod();
226059
226304
  OperationSchema = external_exports.object({
@@ -226067,7 +226312,7 @@ var init_chunk_HHLVVJGT = __esm({
226067
226312
  }
226068
226313
  });
226069
226314
 
226070
- // ../agent-sdk/dist/chunk-GFZ2WIVH.js
226315
+ // ../agent-sdk/dist/chunk-NO77URFL.js
226071
226316
  function getVaultTenantId(id) {
226072
226317
  const row = getDb().prepare(`SELECT tenant_id FROM vaults WHERE id = ?`).get(id);
226073
226318
  return row?.tenant_id;
@@ -226206,11 +226451,11 @@ function handleDeleteEntry(request2, vaultId, key) {
226206
226451
  });
226207
226452
  }
226208
226453
  var CreateVaultSchema, PutEntrySchema, UpdateVaultSchema;
226209
- var init_chunk_GFZ2WIVH = __esm({
226210
- "../agent-sdk/dist/chunk-GFZ2WIVH.js"() {
226454
+ var init_chunk_NO77URFL = __esm({
226455
+ "../agent-sdk/dist/chunk-NO77URFL.js"() {
226211
226456
  "use strict";
226212
226457
  init_chunk_23UKWXJH();
226213
- init_chunk_4EKHW6VS();
226458
+ init_chunk_RMCBO7K7();
226214
226459
  init_chunk_MUARVVXF();
226215
226460
  init_chunk_6U6HEVSN();
226216
226461
  init_chunk_AGIXZFHQ();
@@ -226242,7 +226487,7 @@ var init_chunk_GFZ2WIVH = __esm({
226242
226487
  }
226243
226488
  });
226244
226489
 
226245
- // ../agent-sdk/dist/chunk-2R4IT7HG.js
226490
+ // ../agent-sdk/dist/chunk-L7X2UMNJ.js
226246
226491
  function handleCreateCredential(request2, vaultId) {
226247
226492
  return routeWrap(request2, async ({ auth }) => {
226248
226493
  loadVaultForCaller(auth, vaultId);
@@ -226433,11 +226678,11 @@ function handleMcpOauthValidate(request2, vaultId, credentialId) {
226433
226678
  });
226434
226679
  }
226435
226680
  var TokenEndpointAuthSchema, OAuthRefreshSchema, StaticBearerAuthSchema, McpOauthAuthSchema, CreateCredentialSchema, UpdateStaticBearerAuthSchema, UpdateMcpOauthAuthSchema, UpdateAuthSchema, UpdateCredentialSchema;
226436
- var init_chunk_2R4IT7HG = __esm({
226437
- "../agent-sdk/dist/chunk-2R4IT7HG.js"() {
226681
+ var init_chunk_L7X2UMNJ = __esm({
226682
+ "../agent-sdk/dist/chunk-L7X2UMNJ.js"() {
226438
226683
  "use strict";
226439
- init_chunk_GFZ2WIVH();
226440
- init_chunk_4EKHW6VS();
226684
+ init_chunk_NO77URFL();
226685
+ init_chunk_RMCBO7K7();
226441
226686
  init_chunk_WK33IBKY();
226442
226687
  init_chunk_EZYKRG4W();
226443
226688
  init_zod();
@@ -226641,55 +226886,55 @@ __export(handlers_exports, {
226641
226886
  var init_handlers3 = __esm({
226642
226887
  "../agent-sdk/dist/handlers/index.js"() {
226643
226888
  "use strict";
226644
- init_chunk_IYE5USSW();
226645
- init_chunk_QZE37OGX();
226646
- init_chunk_X7UWCDYG();
226647
- init_chunk_SUEPFZN2();
226648
- init_chunk_6CODFATQ();
226649
- init_chunk_FHOJOLXU();
226889
+ init_chunk_VRWXVIIG();
226890
+ init_chunk_2HTAIROL();
226891
+ init_chunk_PULMO5OO();
226892
+ init_chunk_3CDJ2VQN();
226893
+ init_chunk_PUAK45BO();
226894
+ init_chunk_XLVZ5236();
226650
226895
  init_chunk_DF34ESOO();
226651
- init_chunk_AD2WPGDN();
226652
- init_chunk_XXAO5YYL();
226653
- init_chunk_ZAUWB5DQ();
226654
- init_chunk_3EWEKBVC();
226896
+ init_chunk_5BIX3H2D();
226897
+ init_chunk_3IO3EGWP();
226898
+ init_chunk_4XB2CJPE();
226899
+ init_chunk_VWCIN45Y();
226655
226900
  init_chunk_3XGUMXGR();
226656
- init_chunk_JIXRTWYL();
226657
- init_chunk_ZHEE6UTX();
226658
- init_chunk_CZ4N5FJW();
226659
- init_chunk_JDAOTVWV();
226901
+ init_chunk_FH2IOAQM();
226902
+ init_chunk_2YZUXJAN();
226903
+ init_chunk_W3DA3OFL();
226904
+ init_chunk_VIWYYVGR();
226660
226905
  init_chunk_UTGP4X74();
226661
- init_chunk_IMJTHYN3();
226662
- init_chunk_3EI7IPMI();
226663
- init_chunk_LR6FK2J7();
226664
- init_chunk_BSAF4YJB();
226665
- init_chunk_AUEKXYNE();
226666
- init_chunk_6NFK5RJX();
226667
- init_chunk_75US4UAE();
226906
+ init_chunk_CCNG7D6Y();
226907
+ init_chunk_R7MZNZNC();
226908
+ init_chunk_DQIQBMC2();
226909
+ init_chunk_R6NWAM37();
226910
+ init_chunk_VCU64NHY();
226911
+ init_chunk_52K3LOFD();
226912
+ init_chunk_2E43SH4Y();
226668
226913
  init_chunk_F27XQZ2O();
226669
- init_chunk_6NEWWPL4();
226670
- init_chunk_LKHJLSYG();
226671
- init_chunk_OEYLPPID();
226914
+ init_chunk_TBLHBMA5();
226915
+ init_chunk_SP26BYYZ();
226916
+ init_chunk_OMGJEZJS();
226672
226917
  init_chunk_HWWFRSAX();
226673
- init_chunk_VQM2MCQR();
226674
- init_chunk_FCPZF7KJ();
226675
- init_chunk_25E64UIV();
226918
+ init_chunk_JFIJEF4N();
226919
+ init_chunk_L2ZB7TCF();
226920
+ init_chunk_ZPTYXWUO();
226676
226921
  init_chunk_STPT3SWU();
226677
- init_chunk_NQ6BN7WH();
226678
- init_chunk_3LYNN5VT();
226679
- init_chunk_GBBQD6VY();
226680
- init_chunk_HHLVVJGT();
226681
- init_chunk_2R4IT7HG();
226682
- init_chunk_GFZ2WIVH();
226922
+ init_chunk_BVBVWMQS();
226923
+ init_chunk_3WPVSQGI();
226924
+ init_chunk_MG2DS6QE();
226925
+ init_chunk_3RK6EX7J();
226926
+ init_chunk_L7X2UMNJ();
226927
+ init_chunk_NO77URFL();
226683
226928
  init_chunk_Z5IENUYV();
226684
226929
  init_chunk_UMXXZ6OX();
226685
226930
  init_chunk_ABUNDZCE();
226686
226931
  init_chunk_TTDMQ54U();
226687
226932
  init_chunk_ZBWKJ42J();
226688
- init_chunk_YKPRNV6J();
226933
+ init_chunk_LJ2ZXLLT();
226689
226934
  init_chunk_23UKWXJH();
226690
226935
  init_chunk_ZBFU37UL();
226691
- init_chunk_PWLWDWRL();
226692
- init_chunk_SAI6LBXW();
226936
+ init_chunk_R43A2QH7();
226937
+ init_chunk_2HVY2WZL();
226693
226938
  init_chunk_7346CKTF();
226694
226939
  init_chunk_DC2UMEQH();
226695
226940
  init_chunk_IC2ETYU5();
@@ -226700,14 +226945,14 @@ var init_handlers3 = __esm({
226700
226945
  init_chunk_2N2KL4KM();
226701
226946
  init_chunk_I2RVN7CP();
226702
226947
  init_chunk_K5J4IN2S();
226703
- init_chunk_4EKHW6VS();
226948
+ init_chunk_RMCBO7K7();
226704
226949
  init_chunk_D2XITRN6();
226705
226950
  init_chunk_CWB2DQN5();
226706
226951
  init_chunk_JFHYXFAL();
226707
226952
  init_chunk_W6WKXFHN();
226708
226953
  init_chunk_HVUWXUUI();
226709
- init_chunk_P7V3S2T3();
226710
- init_chunk_KYKVHH7I();
226954
+ init_chunk_ZDURV2LI();
226955
+ init_chunk_YAJJ7KHX();
226711
226956
  init_chunk_PJZ5TQYW();
226712
226957
  init_chunk_AU4NAQGA();
226713
226958
  init_chunk_H6TQGV4L();
@@ -226722,10 +226967,10 @@ var init_handlers3 = __esm({
226722
226967
  init_chunk_WK33IBKY();
226723
226968
  init_chunk_3NUTTKE5();
226724
226969
  init_chunk_3MQ2FWXS();
226725
- init_chunk_ZACPJA3G();
226726
- init_chunk_K3LM6O44();
226970
+ init_chunk_HGV3Y4PS();
226971
+ init_chunk_AE7UG76I();
226727
226972
  init_chunk_LAWTTG2E();
226728
- init_chunk_ZCCHLDLC();
226973
+ init_chunk_IL2CZHNC();
226729
226974
  init_chunk_4XXQAVKE();
226730
226975
  init_chunk_JNSJKHYX();
226731
226976
  init_chunk_5ZFOKZGR();