@agentstep/agent-sdk 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 (97) hide show
  1. package/dist/{chunk-75US4UAE.js → chunk-2E43SH4Y.js} +1 -1
  2. package/dist/{chunk-QZE37OGX.js → chunk-2HTAIROL.js} +1 -1
  3. package/dist/{chunk-SAI6LBXW.js → chunk-2HVY2WZL.js} +79 -5
  4. package/dist/{chunk-ZHEE6UTX.js → chunk-2YZUXJAN.js} +1 -1
  5. package/dist/{chunk-GABMXDZZ.js → chunk-2Z4T32WO.js} +1 -1
  6. package/dist/{chunk-SUEPFZN2.js → chunk-3CDJ2VQN.js} +1 -1
  7. package/dist/{chunk-XXAO5YYL.js → chunk-3IO3EGWP.js} +1 -1
  8. package/dist/{chunk-HHLVVJGT.js → chunk-3RK6EX7J.js} +1 -1
  9. package/dist/{chunk-3LYNN5VT.js → chunk-3WPVSQGI.js} +1 -1
  10. package/dist/{chunk-SWGCL54X.js → chunk-3XGUMXGR.js} +132 -132
  11. package/dist/{chunk-ZAUWB5DQ.js → chunk-4XB2CJPE.js} +1 -1
  12. package/dist/{chunk-6NFK5RJX.js → chunk-52K3LOFD.js} +1 -1
  13. package/dist/{chunk-AD2WPGDN.js → chunk-5BIX3H2D.js} +1 -1
  14. package/dist/{chunk-K3LM6O44.js → chunk-AE7UG76I.js} +1 -1
  15. package/dist/{chunk-NQ6BN7WH.js → chunk-BVBVWMQS.js} +16 -9
  16. package/dist/{chunk-IMJTHYN3.js → chunk-CCNG7D6Y.js} +1 -1
  17. package/dist/{chunk-LR6FK2J7.js → chunk-DQIQBMC2.js} +1 -1
  18. package/dist/{chunk-JIXRTWYL.js → chunk-FH2IOAQM.js} +1 -1
  19. package/dist/{chunk-ZACPJA3G.js → chunk-HGV3Y4PS.js} +1 -1
  20. package/dist/{chunk-VQM2MCQR.js → chunk-JFIJEF4N.js} +2 -2
  21. package/dist/{chunk-FCPZF7KJ.js → chunk-L2ZB7TCF.js} +1 -1
  22. package/dist/{chunk-2R4IT7HG.js → chunk-L7X2UMNJ.js} +2 -2
  23. package/dist/{chunk-YKPRNV6J.js → chunk-LJ2ZXLLT.js} +2 -4
  24. package/dist/{chunk-GBBQD6VY.js → chunk-MG2DS6QE.js} +1 -1
  25. package/dist/{chunk-GFZ2WIVH.js → chunk-NO77URFL.js} +1 -1
  26. package/dist/{chunk-OEYLPPID.js → chunk-OMGJEZJS.js} +2 -2
  27. package/dist/{chunk-6CODFATQ.js → chunk-PUAK45BO.js} +2 -2
  28. package/dist/{chunk-X7UWCDYG.js → chunk-PULMO5OO.js} +1 -1
  29. package/dist/{chunk-PWLWDWRL.js → chunk-R43A2QH7.js} +171 -2
  30. package/dist/{chunk-BSAF4YJB.js → chunk-R6NWAM37.js} +4 -4
  31. package/dist/{chunk-3EI7IPMI.js → chunk-R7MZNZNC.js} +1 -1
  32. package/dist/{chunk-4EKHW6VS.js → chunk-RMCBO7K7.js} +5 -3
  33. package/dist/{chunk-LKHJLSYG.js → chunk-SP26BYYZ.js} +2 -2
  34. package/dist/{chunk-6NEWWPL4.js → chunk-TBLHBMA5.js} +1 -1
  35. package/dist/{chunk-JDAOTVWV.js → chunk-VIWYYVGR.js} +1 -1
  36. package/dist/{chunk-IYE5USSW.js → chunk-VRWXVIIG.js} +10 -2
  37. package/dist/{chunk-3EWEKBVC.js → chunk-VWCIN45Y.js} +1 -1
  38. package/dist/{chunk-CZ4N5FJW.js → chunk-W3DA3OFL.js} +1 -1
  39. package/dist/{chunk-FHOJOLXU.js → chunk-XLVZ5236.js} +1 -1
  40. package/dist/{chunk-KYKVHH7I.js → chunk-YAJJ7KHX.js} +1 -1
  41. package/dist/{chunk-P7V3S2T3.js → chunk-ZDURV2LI.js} +4 -4
  42. package/dist/{chunk-25E64UIV.js → chunk-ZPTYXWUO.js} +1 -1
  43. package/dist/containers/lifecycle.js +1 -1
  44. package/dist/db/files.js +1 -1
  45. package/dist/handlers/agents.js +7 -7
  46. package/dist/handlers/api_keys.js +7 -7
  47. package/dist/handlers/audit.js +7 -7
  48. package/dist/handlers/batch.js +7 -7
  49. package/dist/handlers/credentials.js +8 -8
  50. package/dist/handlers/enrollment.js +7 -7
  51. package/dist/handlers/environments.js +7 -7
  52. package/dist/handlers/events.js +7 -7
  53. package/dist/handlers/files.js +8 -8
  54. package/dist/handlers/google-compat/agents.js +7 -7
  55. package/dist/handlers/google-compat/files.js +7 -7
  56. package/dist/handlers/google-compat/index.js +9 -9
  57. package/dist/handlers/google-compat/interactions.js +7 -7
  58. package/dist/handlers/index.js +43 -43
  59. package/dist/handlers/license.js +7 -7
  60. package/dist/handlers/memory.js +7 -7
  61. package/dist/handlers/metrics.js +7 -7
  62. package/dist/handlers/models.js +7 -7
  63. package/dist/handlers/openapi.js +3 -3
  64. package/dist/handlers/providers.js +7 -7
  65. package/dist/handlers/resources.js +7 -7
  66. package/dist/handlers/sessions.js +8 -8
  67. package/dist/handlers/settings.js +7 -7
  68. package/dist/handlers/skills-write.js +7 -7
  69. package/dist/handlers/skills.js +7 -7
  70. package/dist/handlers/stream.js +6 -6
  71. package/dist/handlers/tenants.js +7 -7
  72. package/dist/handlers/threads.js +7 -7
  73. package/dist/handlers/traces.js +7 -7
  74. package/dist/handlers/ui.js +1 -1
  75. package/dist/handlers/upstream_keys.js +7 -7
  76. package/dist/handlers/user-profiles.js +7 -7
  77. package/dist/handlers/vaults.js +7 -7
  78. package/dist/handlers/whoami.js +7 -7
  79. package/dist/handlers/work.js +7 -7
  80. package/dist/http.js +6 -6
  81. package/dist/index.js +9 -9
  82. package/dist/init.js +5 -5
  83. package/dist/openapi/schemas.js +15 -1
  84. package/dist/openapi/spec.js +2 -2
  85. package/dist/sessions/driver.js +2 -2
  86. package/dist/sessions/sweeper.js +2 -2
  87. package/dist/sessions/threads.js +2 -2
  88. package/dist/shutdown.js +3 -3
  89. package/dist/sync/anthropic.js +1 -1
  90. package/dist/sync/container-file-sync.js +1 -1
  91. package/dist/sync/file-sync.js +1 -1
  92. package/dist/workers/runner.js +3 -3
  93. package/package.json +1 -1
  94. package/dist/handlers/ui.d.ts +0 -6
  95. package/dist/handlers/ui.d.ts.map +0 -1
  96. /package/dist/{chunk-ZCCHLDLC.js → chunk-IL2CZHNC.js} +0 -0
  97. /package/dist/{chunk-AUEKXYNE.js → chunk-VCU64NHY.js} +0 -0
@@ -15,7 +15,7 @@ import {
15
15
  jsonOk,
16
16
  paginatedOk,
17
17
  routeWrap
18
- } from "./chunk-4EKHW6VS.js";
18
+ } from "./chunk-RMCBO7K7.js";
19
19
  import {
20
20
  badRequest,
21
21
  notFound
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  jsonOk,
3
3
  routeWrap
4
- } from "./chunk-4EKHW6VS.js";
4
+ } from "./chunk-RMCBO7K7.js";
5
5
  import {
6
6
  badRequest,
7
7
  notFound
@@ -127,6 +127,10 @@ var AgentSchema = registry.register(
127
127
  skills: z.array(AgentSkillSchema).openapi({
128
128
  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."
129
129
  }),
130
+ permission_policy: z.object({
131
+ always_allow: z.array(z.string()).optional(),
132
+ always_ask: z.array(z.string()).optional()
133
+ }).nullable().optional().openapi({ description: "Per-tool permission control." }),
130
134
  model_config: ModelConfigSchema.openapi({
131
135
  description: "Model configuration options. 'fast' speed enables fast mode on Claude (claude engine only)."
132
136
  }),
@@ -139,7 +143,10 @@ var CreateAgentRequestSchema = registry.register(
139
143
  "CreateAgentRequest",
140
144
  z.object({
141
145
  name: z.string().min(1).openapi({ example: "my-agent" }),
142
- model: z.object({ id: z.string().min(1), speed: z.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" } }),
146
+ model: z.union([
147
+ z.string().openapi({ example: "claude-sonnet-4-6" }),
148
+ z.object({ id: z.string().min(1), speed: z.enum(["standard", "fast"]).optional() }).openapi({ example: { id: "claude-sonnet-4-6" } })
149
+ ]).openapi({ description: 'Model identifier \u2014 either a bare string (`"claude-sonnet-4-6"`) or an object (`{id, speed?}`). Do not include provider prefixes.' }),
143
150
  description: z.string().max(2048).optional().openapi({
144
151
  description: "Human-readable description of the agent."
145
152
  }),
@@ -362,6 +369,7 @@ var SessionSchema = registry.register(
362
369
  vault_ids: z.array(z.string()).nullable().openapi({
363
370
  description: "Vault IDs whose entries are injected as environment variables."
364
371
  }),
372
+ user_profile_id: z.string().nullable().optional().openapi({ description: "User profile ID for credential scoping." }),
365
373
  parent_session_id: z.string().nullable().openapi({
366
374
  description: "Parent session ID if this is a child thread session."
367
375
  }),
@@ -397,7 +405,17 @@ var CreateSessionRequestSchema = registry.register(
397
405
  uri: z.string().optional(),
398
406
  content: z.string().optional()
399
407
  })).optional(),
400
- vault_ids: z.array(z.string()).optional()
408
+ vault_ids: z.array(z.string()).optional(),
409
+ user_profile_id: z.string().optional().openapi({ description: "Links session to a user profile for per-user credential scoping." }),
410
+ outcomes: z.object({
411
+ description: z.string(),
412
+ rubric: z.array(z.object({
413
+ name: z.string(),
414
+ description: z.string(),
415
+ weight: z.number().optional()
416
+ })).optional(),
417
+ max_iterations: z.number().int().optional()
418
+ }).optional().openapi({ description: "Success criteria with optional rubric for self-evaluation." })
401
419
  }).openapi({
402
420
  example: {
403
421
  agent: "agent_01ABCDEFG...",
@@ -583,7 +601,9 @@ var BatchResponseSchema = registry.register(
583
601
  function listEnvelope(name, item) {
584
602
  const schema = z.object({
585
603
  data: z.array(item),
586
- next_page: z.string().nullable()
604
+ has_more: z.boolean(),
605
+ first_id: z.string().nullable(),
606
+ last_id: z.string().nullable()
587
607
  });
588
608
  return registry.register(name, schema);
589
609
  }
@@ -602,6 +622,49 @@ var VaultEntryListResponseSchema = registry.register(
602
622
  "VaultEntryListResponse",
603
623
  z.object({ data: z.array(VaultEntrySchema) })
604
624
  );
625
+ var TrustGrantSchema = registry.register("TrustGrant", z.object({
626
+ type: z.literal("vault_credential"),
627
+ vault_id: z.string(),
628
+ credential_id: z.string()
629
+ }));
630
+ var UserProfileSchema = registry.register("UserProfile", z.object({
631
+ type: z.literal("user_profile"),
632
+ id: z.string(),
633
+ external_id: z.string().nullable(),
634
+ display_name: z.string().nullable(),
635
+ trust_grants: z.array(TrustGrantSchema),
636
+ created_at: z.string(),
637
+ updated_at: z.string()
638
+ }));
639
+ var UserProfileCreateSchema = registry.register("UserProfileCreate", z.object({
640
+ external_id: z.string().optional(),
641
+ display_name: z.string().optional(),
642
+ trust_grants: z.array(TrustGrantSchema).optional()
643
+ }));
644
+ var UserProfileUpdateSchema = registry.register("UserProfileUpdate", z.object({
645
+ external_id: z.string().nullish(),
646
+ display_name: z.string().nullish(),
647
+ trust_grants: z.array(TrustGrantSchema).optional()
648
+ }));
649
+ var UserProfileListSchema = listEnvelope("UserProfileList", UserProfileSchema);
650
+ var EnrollmentUrlRequestSchema = registry.register("EnrollmentUrlRequest", z.object({
651
+ vault_id: z.string(),
652
+ credential_id: z.string().optional(),
653
+ display_name: z.string().optional(),
654
+ authorize_url: z.string(),
655
+ token_endpoint: z.string(),
656
+ client_id: z.string(),
657
+ client_secret: z.string().optional(),
658
+ scope: z.string().optional(),
659
+ redirect_uri: z.string().optional()
660
+ }));
661
+ var EnrollmentUrlResponseSchema = registry.register("EnrollmentUrlResponse", z.object({
662
+ type: z.literal("enrollment_url"),
663
+ url: z.string(),
664
+ state: z.string(),
665
+ redirect_uri: z.string(),
666
+ expires_in: z.number()
667
+ }));
605
668
  var AgentDeletedResponseSchema = registry.register(
606
669
  "AgentDeletedResponse",
607
670
  z.object({ id: UlidId, type: z.literal("agent_deleted") })
@@ -641,7 +704,9 @@ var FileListResponseSchema = registry.register(
641
704
  "FileListResponse",
642
705
  z.object({
643
706
  data: z.array(FileRecordSchema),
644
- next_page: z.string().nullable().openapi({ description: "Opaque cursor for the next page, or null if no more results." })
707
+ has_more: z.boolean().openapi({ description: "Whether more results exist beyond this page." }),
708
+ first_id: z.string().nullable().openapi({ description: "ID of the first item in this page." }),
709
+ last_id: z.string().nullable().openapi({ description: "ID of the last item in this page. Pass as after_id for the next page." })
645
710
  })
646
711
  );
647
712
  var FileDeletedResponseSchema = registry.register(
@@ -954,7 +1019,9 @@ var AuditListResponseSchema = registry.register(
954
1019
  "AuditListResponse",
955
1020
  z.object({
956
1021
  data: z.array(AuditEntrySchema),
957
- next_page: z.string().nullable()
1022
+ has_more: z.boolean(),
1023
+ first_id: z.string().nullable(),
1024
+ last_id: z.string().nullable()
958
1025
  })
959
1026
  );
960
1027
  var TraceListItemSchema = registry.register(
@@ -1191,6 +1258,13 @@ export {
1191
1258
  EventListResponseSchema,
1192
1259
  VaultListResponseSchema,
1193
1260
  VaultEntryListResponseSchema,
1261
+ TrustGrantSchema,
1262
+ UserProfileSchema,
1263
+ UserProfileCreateSchema,
1264
+ UserProfileUpdateSchema,
1265
+ UserProfileListSchema,
1266
+ EnrollmentUrlRequestSchema,
1267
+ EnrollmentUrlResponseSchema,
1194
1268
  AgentDeletedResponseSchema,
1195
1269
  SessionDeletedResponseSchema,
1196
1270
  EnvironmentDeletedResponseSchema,
@@ -6,7 +6,7 @@ import {
6
6
  jsonOk,
7
7
  paginatedOk,
8
8
  routeWrap
9
- } from "./chunk-4EKHW6VS.js";
9
+ } from "./chunk-RMCBO7K7.js";
10
10
  import {
11
11
  createUserProfile,
12
12
  getUserProfile,
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-JF777FWD.js";
8
8
  import {
9
9
  runTurn
10
- } from "./chunk-KYKVHH7I.js";
10
+ } from "./chunk-YAJJ7KHX.js";
11
11
 
12
12
  // src/workers/runner.ts
13
13
  async function startWorker(opts) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  jsonOk,
3
3
  routeWrap
4
- } from "./chunk-4EKHW6VS.js";
4
+ } from "./chunk-RMCBO7K7.js";
5
5
 
6
6
  // src/handlers/whoami.ts
7
7
  function handleWhoami(request) {
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  jsonOk,
12
12
  routeWrap
13
- } from "./chunk-4EKHW6VS.js";
13
+ } from "./chunk-RMCBO7K7.js";
14
14
  import {
15
15
  archiveTenant,
16
16
  createTenant,
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  jsonOk,
7
7
  routeWrap
8
- } from "./chunk-4EKHW6VS.js";
8
+ } from "./chunk-RMCBO7K7.js";
9
9
  import {
10
10
  badRequest
11
11
  } from "./chunk-EZYKRG4W.js";
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  jsonOk,
17
17
  routeWrap
18
- } from "./chunk-4EKHW6VS.js";
18
+ } from "./chunk-RMCBO7K7.js";
19
19
  import {
20
20
  createApiKey,
21
21
  getApiKeyById,