@agentstep/agent-sdk 0.4.29 → 0.4.30

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 (174) hide show
  1. package/dist/auth/middleware.js +7 -7
  2. package/dist/backends/claude/args.js +5 -5
  3. package/dist/backends/claude/index.js +6 -6
  4. package/dist/backends/codex/auth.js +5 -5
  5. package/dist/backends/codex/index.js +6 -6
  6. package/dist/backends/factory/auth.js +5 -5
  7. package/dist/backends/factory/index.js +6 -6
  8. package/dist/backends/gemini/auth.js +5 -5
  9. package/dist/backends/gemini/index.js +6 -6
  10. package/dist/backends/opencode/auth.js +5 -5
  11. package/dist/backends/opencode/index.js +6 -6
  12. package/dist/backends/pi/auth.js +5 -5
  13. package/dist/backends/pi/index.js +6 -6
  14. package/dist/backends/registry.js +17 -17
  15. package/dist/{chunk-TY3HD5I5.js → chunk-2DRBKIGQ.js} +1 -1
  16. package/dist/{chunk-UIVEK3MD.js → chunk-2JKOYBUO.js} +1 -1
  17. package/dist/{chunk-HMBJOI5F.js → chunk-3KLJGU75.js} +17 -14
  18. package/dist/{chunk-ZP5VMV5O.js → chunk-46XURNM7.js} +4 -4
  19. package/dist/{chunk-KOGG7CSN.js → chunk-4B7PQTTS.js} +6 -6
  20. package/dist/{chunk-5GZEX4HV.js → chunk-4C7XJI2V.js} +1 -1
  21. package/dist/{chunk-R5OZHLAD.js → chunk-4PVPM2WC.js} +1 -1
  22. package/dist/{chunk-O45IQUWS.js → chunk-5NBZZZKH.js} +2 -2
  23. package/dist/{chunk-S3SKODVV.js → chunk-5QTDZQ2H.js} +4 -4
  24. package/dist/{chunk-LLYP77OL.js → chunk-65XR7JU6.js} +11 -5
  25. package/dist/{chunk-X2CAT5MN.js → chunk-67D4I5AE.js} +1 -1
  26. package/dist/{chunk-EHCGLMPC.js → chunk-6EQZSMIZ.js} +1 -1
  27. package/dist/{chunk-RZKUB4JQ.js → chunk-6VENJOPG.js} +2 -2
  28. package/dist/{chunk-4GC7D5GD.js → chunk-7DSZOBSQ.js} +2 -2
  29. package/dist/{chunk-VIGJQU6V.js → chunk-7GNSB22P.js} +3 -3
  30. package/dist/{chunk-LMHXLYUV.js → chunk-7UJ2PIXJ.js} +2 -2
  31. package/dist/{chunk-NUINUAXO.js → chunk-7V277COF.js} +2 -2
  32. package/dist/{chunk-4RNCKCDV.js → chunk-AP2N4R6D.js} +1 -1
  33. package/dist/{chunk-NX6SIEN6.js → chunk-AXISFTHX.js} +2 -2
  34. package/dist/{chunk-JDELTTHV.js → chunk-BBYQMNGK.js} +1 -1
  35. package/dist/{chunk-OONL25NZ.js → chunk-BJK4SGWG.js} +2 -2
  36. package/dist/{chunk-4WMYJM36.js → chunk-BKBC43KV.js} +1 -1
  37. package/dist/{chunk-OA3CLTYY.js → chunk-BQOFXJSK.js} +3 -3
  38. package/dist/{chunk-OC2RYYTW.js → chunk-BSVZAXLI.js} +11 -8
  39. package/dist/{chunk-O3Z7JWR7.js → chunk-CL3DUJRJ.js} +7 -4
  40. package/dist/{chunk-WHASPTF3.js → chunk-DL2BACWC.js} +12 -9
  41. package/dist/{chunk-2NAUMCWE.js → chunk-DNV6JZLZ.js} +1 -1
  42. package/dist/{chunk-GQFC44YI.js → chunk-EFCCO74P.js} +8 -5
  43. package/dist/{chunk-EF5QCTEQ.js → chunk-EFDAVLKN.js} +1 -1
  44. package/dist/{chunk-WFIMX3HG.js → chunk-EIR2TG5I.js} +1 -1
  45. package/dist/{chunk-XGUSWFDD.js → chunk-EN3ICYTL.js} +9 -9
  46. package/dist/{chunk-Y2KDIPCT.js → chunk-F3BVYYRX.js} +5 -5
  47. package/dist/{chunk-ZMMDLKR3.js → chunk-FGQFNIRI.js} +3 -3
  48. package/dist/{chunk-DNGLD7VN.js → chunk-FIJTBRZ5.js} +1 -1
  49. package/dist/{chunk-AMWWPUSK.js → chunk-H3O7QBOQ.js} +1 -1
  50. package/dist/{chunk-KZ4AECAK.js → chunk-H62LRJJP.js} +13 -16
  51. package/dist/{chunk-YIVJ3JTW.js → chunk-H7Z4BWRI.js} +2 -2
  52. package/dist/{chunk-I44FSUBC.js → chunk-HA5FIXGQ.js} +1 -1
  53. package/dist/{chunk-NWW4246M.js → chunk-HEDK5J34.js} +1 -1
  54. package/dist/{chunk-M4CTE7EH.js → chunk-HF6HORZZ.js} +2 -2
  55. package/dist/{chunk-EGCAA6KI.js → chunk-HFBC2TOG.js} +2 -2
  56. package/dist/{chunk-DO4WVWW7.js → chunk-IFXD4DH5.js} +1 -1
  57. package/dist/{chunk-ATTHVKNE.js → chunk-JN3G4Y4L.js} +4 -4
  58. package/dist/{chunk-ZQGJKPPY.js → chunk-JSKZXF5J.js} +31 -6
  59. package/dist/{chunk-W26HCKWX.js → chunk-JYUJQHPR.js} +3 -3
  60. package/dist/{chunk-HLNTWWAZ.js → chunk-KA33M67F.js} +2 -2
  61. package/dist/{chunk-T45NOW43.js → chunk-L43UD7PK.js} +1 -1
  62. package/dist/{chunk-ESXH27JB.js → chunk-LOAFGJWC.js} +2 -2
  63. package/dist/{chunk-DT57EZQB.js → chunk-LR4TA74O.js} +15 -15
  64. package/dist/{chunk-MJ5J57UJ.js → chunk-M36DF445.js} +1 -1
  65. package/dist/{chunk-MHQXDTJB.js → chunk-NC4FHDIP.js} +1 -1
  66. package/dist/{chunk-NIOWKTIF.js → chunk-NT2AI5IE.js} +1 -1
  67. package/dist/{chunk-5D5P37FY.js → chunk-NZATVUV2.js} +1 -1
  68. package/dist/{chunk-LYTHR3HC.js → chunk-PFWTQ43U.js} +1 -1
  69. package/dist/{chunk-HGZ6R6ST.js → chunk-QV5WI73T.js} +19 -6
  70. package/dist/{chunk-I5ZA45YL.js → chunk-QWGJS6V6.js} +4 -4
  71. package/dist/{chunk-YCXELHKG.js → chunk-REGPK5NG.js} +1 -1
  72. package/dist/{chunk-NUO56TF7.js → chunk-S5HVHCAK.js} +2 -2
  73. package/dist/{chunk-SXE7H3VK.js → chunk-SLAOS6JN.js} +1 -1
  74. package/dist/{chunk-NXRJ7Z4G.js → chunk-SW75SNDB.js} +1 -1
  75. package/dist/{chunk-JK5TPJHH.js → chunk-SXTHM67U.js} +1 -1
  76. package/dist/{chunk-FJAWIVSD.js → chunk-TRGHIMCR.js} +4 -4
  77. package/dist/{chunk-BMPB7XJH.js → chunk-TRQX5AIZ.js} +4 -4
  78. package/dist/{chunk-JEI7I3EH.js → chunk-TXUUUO5R.js} +2 -2
  79. package/dist/{chunk-ZNQD65DN.js → chunk-TZZMVXFM.js} +4 -4
  80. package/dist/{chunk-JURAGCGR.js → chunk-UF3NB27E.js} +8 -8
  81. package/dist/{chunk-XZOBOKL6.js → chunk-ULJVEN67.js} +3 -3
  82. package/dist/{chunk-UXMCHRGA.js → chunk-ULQOJ3WO.js} +2 -2
  83. package/dist/{chunk-B2JLKTBJ.js → chunk-VC25NYHW.js} +1 -1
  84. package/dist/{chunk-BFXQ3IOS.js → chunk-VMILIALE.js} +18 -15
  85. package/dist/chunk-VUADJZRV.js +212 -0
  86. package/dist/{chunk-ADK2TYO4.js → chunk-WHV4YUQB.js} +1 -1
  87. package/dist/{chunk-OTLXV4RO.js → chunk-WP5EWNGJ.js} +4 -4
  88. package/dist/{chunk-RK3QBYXO.js → chunk-X2EEOO6Q.js} +5 -5
  89. package/dist/{chunk-AQXCXWAZ.js → chunk-XQEMI2MI.js} +1 -1
  90. package/dist/{chunk-OWP537VU.js → chunk-XTTHH5MF.js} +1 -1
  91. package/dist/{chunk-2BDD6OHG.js → chunk-XUNTHJIE.js} +7 -0
  92. package/dist/{chunk-BZ6HFTHU.js → chunk-YGTC5UP5.js} +1 -1
  93. package/dist/{chunk-YGAHGTVZ.js → chunk-YIOKUA23.js} +2 -2
  94. package/dist/{chunk-4DTL7OKD.js → chunk-YTC6ST5T.js} +5 -5
  95. package/dist/config/index.js +4 -4
  96. package/dist/containers/client.js +5 -5
  97. package/dist/containers/exec.js +5 -5
  98. package/dist/containers/lifecycle.js +29 -29
  99. package/dist/containers/setup.js +7 -7
  100. package/dist/db/agents.js +5 -5
  101. package/dist/db/api_keys.js +4 -4
  102. package/dist/db/audit.js +3 -3
  103. package/dist/db/batch.js +9 -9
  104. package/dist/db/client.js +2 -2
  105. package/dist/db/credentials.js +3 -3
  106. package/dist/db/drizzle.js +3 -3
  107. package/dist/db/environments.js +5 -5
  108. package/dist/db/events.js +4 -4
  109. package/dist/db/files.js +4 -4
  110. package/dist/db/memory.js +4 -4
  111. package/dist/db/migrations.js +1 -1
  112. package/dist/db/proxy.js +4 -4
  113. package/dist/db/session-resources.js +4 -4
  114. package/dist/db/sessions.js +6 -6
  115. package/dist/db/sync.js +4 -4
  116. package/dist/db/tenants.js +3 -3
  117. package/dist/db/traces.js +4 -4
  118. package/dist/db/upstream_keys.js +3 -3
  119. package/dist/db/vaults.js +5 -5
  120. package/dist/handlers/agents.js +44 -44
  121. package/dist/handlers/api_keys.js +45 -45
  122. package/dist/handlers/audit.js +45 -45
  123. package/dist/handlers/batch.js +45 -45
  124. package/dist/handlers/credentials.js +45 -45
  125. package/dist/handlers/environments.js +45 -45
  126. package/dist/handlers/events.js +48 -48
  127. package/dist/handlers/files.js +45 -45
  128. package/dist/handlers/index.js +80 -80
  129. package/dist/handlers/license.js +44 -44
  130. package/dist/handlers/memory.js +45 -45
  131. package/dist/handlers/metrics.js +44 -44
  132. package/dist/handlers/models.js +45 -45
  133. package/dist/handlers/providers.js +44 -44
  134. package/dist/handlers/resources.js +44 -44
  135. package/dist/handlers/sessions.js +47 -47
  136. package/dist/handlers/settings.js +44 -44
  137. package/dist/handlers/skills-write.js +44 -44
  138. package/dist/handlers/skills.js +45 -45
  139. package/dist/handlers/stream.js +44 -44
  140. package/dist/handlers/tenants.js +45 -45
  141. package/dist/handlers/threads.js +44 -44
  142. package/dist/handlers/traces.js +45 -45
  143. package/dist/handlers/upstream_keys.js +47 -47
  144. package/dist/handlers/vaults.js +44 -44
  145. package/dist/handlers/whoami.js +44 -44
  146. package/dist/http.js +43 -43
  147. package/dist/index.js +47 -47
  148. package/dist/init.js +40 -40
  149. package/dist/lib/model-registry.js +5 -5
  150. package/dist/lib/skills-cache.js +5 -5
  151. package/dist/observability/otlp.js +11 -11
  152. package/dist/observability/redactor.js +7 -7
  153. package/dist/providers/fly.js +4 -4
  154. package/dist/providers/modal.js +4 -4
  155. package/dist/providers/registry.js +1 -1
  156. package/dist/providers/resolve-secrets.js +6 -6
  157. package/dist/providers/sprites.js +6 -6
  158. package/dist/providers/upstream-keys.js +10 -10
  159. package/dist/providers/vercel.js +4 -4
  160. package/dist/proxy/forward.js +5 -5
  161. package/dist/queue/index.js +5 -5
  162. package/dist/sessions/bus.js +9 -9
  163. package/dist/sessions/driver.js +33 -33
  164. package/dist/sessions/grader.js +4 -4
  165. package/dist/sessions/secrets.js +7 -7
  166. package/dist/sessions/sweeper.js +30 -30
  167. package/dist/sessions/threads.js +33 -33
  168. package/dist/shutdown.js +31 -31
  169. package/dist/sync/anthropic.js +9 -9
  170. package/dist/sync/container-file-sync.js +5 -5
  171. package/dist/sync/file-sync.js +16 -16
  172. package/package.json +1 -1
  173. package/dist/chunk-AE5JQORN.js +0 -131
  174. /package/dist/{chunk-QUJNG4RA.js → chunk-C6JEPQ7T.js} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  jsonOk,
8
8
  routeWrap
9
- } from "./chunk-ESXH27JB.js";
9
+ } from "./chunk-LOAFGJWC.js";
10
10
  import {
11
11
  createVault,
12
12
  deleteEntry,
@@ -16,14 +16,14 @@ import {
16
16
  listEntries,
17
17
  listVaults,
18
18
  setEntry
19
- } from "./chunk-VIGJQU6V.js";
19
+ } from "./chunk-7GNSB22P.js";
20
20
  import {
21
21
  getAgent
22
- } from "./chunk-JEI7I3EH.js";
22
+ } from "./chunk-TXUUUO5R.js";
23
23
  import {
24
24
  getDb,
25
25
  init_client
26
- } from "./chunk-5GZEX4HV.js";
26
+ } from "./chunk-4C7XJI2V.js";
27
27
  import {
28
28
  badRequest,
29
29
  conflict,
@@ -101,8 +101,14 @@ function handleListVaults(request) {
101
101
  return routeWrap(request, async ({ auth, request: req }) => {
102
102
  const url = new URL(req.url);
103
103
  const agentId = url.searchParams.get("agent_id") ?? void 0;
104
+ const requestedLimit = Number(url.searchParams.get("limit") || "100");
104
105
  const data = listVaults({ agent_id: agentId, tenantFilter: tenantFilter(auth) });
105
- return jsonOk({ data });
106
+ return jsonOk({
107
+ data,
108
+ has_more: data.length === requestedLimit,
109
+ first_id: data.length > 0 ? data[0].id : null,
110
+ last_id: data.length > 0 ? data[data.length - 1].id : null
111
+ });
106
112
  });
107
113
  }
108
114
  function handleGetVault(request, id) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCodexAuthEnv,
3
3
  validateCodexRuntime
4
- } from "./chunk-NWW4246M.js";
4
+ } from "./chunk-HEDK5J34.js";
5
5
  import {
6
6
  prepareCodexOnSandbox
7
7
  } from "./chunk-M2LUXIXU.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  buildGeminiAuthEnv,
6
6
  validateGeminiRuntime
7
- } from "./chunk-MJ5J57UJ.js";
7
+ } from "./chunk-M36DF445.js";
8
8
  import {
9
9
  prepareGeminiOnSandbox
10
10
  } from "./chunk-XG4UIGDH.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildClaudeArgs,
3
3
  buildClaudeAuthEnv
4
- } from "./chunk-WFIMX3HG.js";
4
+ } from "./chunk-EIR2TG5I.js";
5
5
  import {
6
6
  PERMISSION_BRIDGE_DIR,
7
7
  PERMISSION_HOOK_SCRIPT_PATH,
@@ -25,7 +25,7 @@ import {
25
25
  } from "./chunk-IU457W7Q.js";
26
26
  import {
27
27
  getConfig
28
- } from "./chunk-EF5QCTEQ.js";
28
+ } from "./chunk-EFDAVLKN.js";
29
29
 
30
30
  // src/backends/claude/index.ts
31
31
  function buildTurn(input) {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  BatchError,
3
3
  executeBatch
4
- } from "./chunk-S3SKODVV.js";
4
+ } from "./chunk-5QTDZQ2H.js";
5
5
  import {
6
6
  jsonOk,
7
7
  routeWrap
8
- } from "./chunk-ESXH27JB.js";
8
+ } from "./chunk-LOAFGJWC.js";
9
9
  import {
10
10
  badRequest
11
11
  } from "./chunk-EZYKRG4W.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-AIBH32FN.js";
5
5
  import {
6
6
  DEFAULT_TENANT_ID
7
- } from "./chunk-JDELTTHV.js";
7
+ } from "./chunk-BBYQMNGK.js";
8
8
  import {
9
9
  init_ids,
10
10
  newId
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  getDrizzle,
14
14
  init_drizzle
15
- } from "./chunk-SXE7H3VK.js";
15
+ } from "./chunk-SLAOS6JN.js";
16
16
  import {
17
17
  schema_exports
18
18
  } from "./chunk-LHHBOQUR.js";
@@ -39,7 +39,7 @@ function hydrateVault(row) {
39
39
  }
40
40
  function createVault(input) {
41
41
  const db = getDrizzle();
42
- const id = newId("vault");
42
+ const id = newId("vlt");
43
43
  const now = nowMs();
44
44
  db.insert(schema_exports.vaults).values({
45
45
  id,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  jsonOk,
3
3
  routeWrap
4
- } from "./chunk-ESXH27JB.js";
4
+ } from "./chunk-LOAFGJWC.js";
5
5
  import {
6
6
  readSetting,
7
7
  writeSetting
8
- } from "./chunk-EF5QCTEQ.js";
8
+ } from "./chunk-EFDAVLKN.js";
9
9
  import {
10
10
  badRequest
11
11
  } from "./chunk-EZYKRG4W.js";
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  getDrizzle,
7
7
  init_drizzle
8
- } from "./chunk-SXE7H3VK.js";
8
+ } from "./chunk-SLAOS6JN.js";
9
9
  import {
10
10
  schema_exports
11
11
  } from "./chunk-LHHBOQUR.js";
@@ -47,7 +47,7 @@ function sha256(content) {
47
47
  }
48
48
  function createMemoryStore(input) {
49
49
  const db = getDrizzle();
50
- const id = newId("ms");
50
+ const id = newId("memstore");
51
51
  const now = nowMs();
52
52
  db.insert(schema_exports.memoryStores).values({
53
53
  id,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getConfig
3
- } from "./chunk-EF5QCTEQ.js";
3
+ } from "./chunk-EFDAVLKN.js";
4
4
  import {
5
5
  ApiError
6
6
  } from "./chunk-EZYKRG4W.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  markStopping
3
- } from "./chunk-FJAWIVSD.js";
3
+ } from "./chunk-TRGHIMCR.js";
4
4
  import {
5
5
  closeDb,
6
6
  init_client,
7
7
  syncDb
8
- } from "./chunk-5GZEX4HV.js";
8
+ } from "./chunk-4C7XJI2V.js";
9
9
  import {
10
10
  getRuntime
11
11
  } from "./chunk-UYTSKFGK.js";
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  getDb,
12
12
  init_client
13
- } from "./chunk-5GZEX4HV.js";
13
+ } from "./chunk-4C7XJI2V.js";
14
14
 
15
15
  // src/db/tenants.ts
16
16
  init_client();
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getModels
3
- } from "./chunk-4WMYJM36.js";
3
+ } from "./chunk-BKBC43KV.js";
4
4
  import {
5
5
  jsonOk,
6
6
  routeWrap
7
- } from "./chunk-ESXH27JB.js";
7
+ } from "./chunk-LOAFGJWC.js";
8
8
 
9
9
  // src/handlers/models.ts
10
10
  function handleListModels(request) {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getConfig,
6
6
  readSetting
7
- } from "./chunk-EF5QCTEQ.js";
7
+ } from "./chunk-EFDAVLKN.js";
8
8
  import {
9
9
  __commonJS
10
10
  } from "./chunk-2ESYSVXG.js";
@@ -11,18 +11,18 @@ import {
11
11
  getFileRecord,
12
12
  listFiles,
13
13
  updateFileStoragePath
14
- } from "./chunk-NXRJ7Z4G.js";
14
+ } from "./chunk-SW75SNDB.js";
15
15
  import {
16
16
  assertResourceTenant
17
17
  } from "./chunk-23UKWXJH.js";
18
18
  import {
19
19
  jsonOk,
20
20
  routeWrap
21
- } from "./chunk-ESXH27JB.js";
21
+ } from "./chunk-LOAFGJWC.js";
22
22
  import {
23
23
  getDb,
24
24
  init_client
25
- } from "./chunk-5GZEX4HV.js";
25
+ } from "./chunk-4C7XJI2V.js";
26
26
  import {
27
27
  badRequest,
28
28
  notFound
@@ -6,31 +6,31 @@ import {
6
6
  import {
7
7
  jsonOk,
8
8
  routeWrap
9
- } from "./chunk-ESXH27JB.js";
9
+ } from "./chunk-LOAFGJWC.js";
10
10
  import {
11
11
  forwardToAnthropic,
12
12
  validateAnthropicProxy
13
- } from "./chunk-T45NOW43.js";
13
+ } from "./chunk-L43UD7PK.js";
14
14
  import {
15
15
  getProxiedTenantId,
16
16
  isProxied,
17
17
  markProxied,
18
18
  unmarkProxied
19
- } from "./chunk-NIOWKTIF.js";
19
+ } from "./chunk-NT2AI5IE.js";
20
20
  import {
21
21
  archiveAgent,
22
22
  createAgent,
23
23
  getAgent,
24
24
  listAgents,
25
25
  updateAgent
26
- } from "./chunk-JEI7I3EH.js";
26
+ } from "./chunk-TXUUUO5R.js";
27
27
  import {
28
28
  resolveBackend
29
- } from "./chunk-KOGG7CSN.js";
29
+ } from "./chunk-4B7PQTTS.js";
30
30
  import {
31
31
  getDb,
32
32
  init_client
33
- } from "./chunk-5GZEX4HV.js";
33
+ } from "./chunk-4C7XJI2V.js";
34
34
  import {
35
35
  badRequest,
36
36
  conflict,
@@ -216,8 +216,9 @@ function handleListAgents(request) {
216
216
  const order = url.searchParams.get("order");
217
217
  const includeArchived = url.searchParams.get("include_archived") === "true";
218
218
  const cursor = url.searchParams.get("page") ?? void 0;
219
+ const requestedLimit = limit ? Number(limit) : 20;
219
220
  const data = listAgents({
220
- limit: limit ? Number(limit) : void 0,
221
+ limit: requestedLimit,
221
222
  order: order ?? void 0,
222
223
  includeArchived,
223
224
  cursor,
@@ -225,7 +226,9 @@ function handleListAgents(request) {
225
226
  });
226
227
  return jsonOk({
227
228
  data,
228
- next_page: data.length > 0 ? data[data.length - 1].id : null
229
+ has_more: data.length === requestedLimit,
230
+ first_id: data.length > 0 ? data[0].id : null,
231
+ last_id: data.length > 0 ? data[data.length - 1].id : null
229
232
  });
230
233
  });
231
234
  }
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-23UKWXJH.js";
5
5
  import {
6
6
  listAudit
7
- } from "./chunk-MHQXDTJB.js";
7
+ } from "./chunk-NC4FHDIP.js";
8
8
  import {
9
9
  jsonOk,
10
10
  routeWrap
11
- } from "./chunk-ESXH27JB.js";
11
+ } from "./chunk-LOAFGJWC.js";
12
12
  import {
13
13
  badRequest
14
14
  } from "./chunk-EZYKRG4W.js";
@@ -44,8 +44,9 @@ function handleListAudit(request) {
44
44
  }
45
45
  outcome = outcomeRaw;
46
46
  }
47
+ const requestedLimit = limit ? Number(limit) : 100;
47
48
  const data = listAudit({
48
- limit: limit ? Number(limit) : void 0,
49
+ limit: requestedLimit,
49
50
  cursor,
50
51
  action,
51
52
  actor_key_id: actorKeyId,
@@ -58,7 +59,9 @@ function handleListAudit(request) {
58
59
  });
59
60
  return jsonOk({
60
61
  data,
61
- next_page: data.length > 0 ? data[data.length - 1].id : null
62
+ has_more: data.length === requestedLimit,
63
+ first_id: data.length > 0 ? data[0].id : null,
64
+ last_id: data.length > 0 ? data[data.length - 1].id : null
62
65
  });
63
66
  });
64
67
  }
@@ -5,23 +5,23 @@ import {
5
5
  } from "./chunk-23UKWXJH.js";
6
6
  import {
7
7
  kickoffEnvironmentSetup
8
- } from "./chunk-HLNTWWAZ.js";
8
+ } from "./chunk-KA33M67F.js";
9
9
  import {
10
10
  jsonOk,
11
11
  routeWrap
12
- } from "./chunk-ESXH27JB.js";
12
+ } from "./chunk-LOAFGJWC.js";
13
13
  import {
14
14
  forwardToAnthropic
15
- } from "./chunk-T45NOW43.js";
15
+ } from "./chunk-L43UD7PK.js";
16
16
  import {
17
17
  getProxiedTenantId,
18
18
  isProxied,
19
19
  markProxied,
20
20
  unmarkProxied
21
- } from "./chunk-NIOWKTIF.js";
21
+ } from "./chunk-NT2AI5IE.js";
22
22
  import {
23
23
  resolveContainerProvider
24
- } from "./chunk-QUJNG4RA.js";
24
+ } from "./chunk-C6JEPQ7T.js";
25
25
  import {
26
26
  archiveEnvironment,
27
27
  createEnvironment,
@@ -30,11 +30,11 @@ import {
30
30
  hasSessionsAttached,
31
31
  listEnvironments,
32
32
  updateEnvironment
33
- } from "./chunk-NUO56TF7.js";
33
+ } from "./chunk-S5HVHCAK.js";
34
34
  import {
35
35
  getDb,
36
36
  init_client
37
- } from "./chunk-5GZEX4HV.js";
37
+ } from "./chunk-4C7XJI2V.js";
38
38
  import {
39
39
  badRequest,
40
40
  conflict,
@@ -155,8 +155,9 @@ function handleListEnvironments(request) {
155
155
  const order = url.searchParams.get("order");
156
156
  const includeArchived = url.searchParams.get("include_archived") === "true";
157
157
  const cursor = url.searchParams.get("page") ?? void 0;
158
+ const requestedLimit = limit ? Number(limit) : 20;
158
159
  const data = listEnvironments({
159
- limit: limit ? Number(limit) : void 0,
160
+ limit: requestedLimit,
160
161
  order: order ?? void 0,
161
162
  includeArchived,
162
163
  cursor,
@@ -164,7 +165,9 @@ function handleListEnvironments(request) {
164
165
  });
165
166
  return jsonOk({
166
167
  data,
167
- next_page: data.length > 0 ? data[data.length - 1].id : null
168
+ has_more: data.length === requestedLimit,
169
+ first_id: data.length > 0 ? data[0].id : null,
170
+ last_id: data.length > 0 ? data[data.length - 1].id : null
168
171
  });
169
172
  });
170
173
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  jsonOk,
3
3
  routeWrap
4
- } from "./chunk-ESXH27JB.js";
4
+ } from "./chunk-LOAFGJWC.js";
5
5
 
6
6
  // src/handlers/whoami.ts
7
7
  function handleWhoami(request) {
@@ -5,15 +5,15 @@ import {
5
5
  import {
6
6
  jsonOk,
7
7
  routeWrap
8
- } from "./chunk-ESXH27JB.js";
8
+ } from "./chunk-LOAFGJWC.js";
9
9
  import {
10
10
  getSession,
11
11
  listSessions
12
- } from "./chunk-I5ZA45YL.js";
12
+ } from "./chunk-QWGJS6V6.js";
13
13
  import {
14
14
  getDb,
15
15
  init_client
16
- } from "./chunk-5GZEX4HV.js";
16
+ } from "./chunk-4C7XJI2V.js";
17
17
  import {
18
18
  notFound
19
19
  } from "./chunk-EZYKRG4W.js";
@@ -30,9 +30,10 @@ function handleListThreads(request, sessionId) {
30
30
  const url = new URL(request.url);
31
31
  const limit = url.searchParams.get("limit");
32
32
  const order = url.searchParams.get("order");
33
+ const requestedLimit = limit ? Number(limit) : 50;
33
34
  const data = listSessions({
34
35
  parent_session_id: sessionId,
35
- limit: limit ? Number(limit) : void 0,
36
+ limit: requestedLimit,
36
37
  order: order ?? void 0,
37
38
  includeArchived: true,
38
39
  // show all threads including completed ones
@@ -40,7 +41,9 @@ function handleListThreads(request, sessionId) {
40
41
  });
41
42
  return jsonOk({
42
43
  data,
43
- next_page: data.length > 0 ? data[data.length - 1].id : null
44
+ has_more: data.length === requestedLimit,
45
+ first_id: data.length > 0 ? data[0].id : null,
46
+ last_id: data.length > 0 ? data[data.length - 1].id : null
44
47
  });
45
48
  });
46
49
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDrizzle,
3
3
  init_drizzle
4
- } from "./chunk-SXE7H3VK.js";
4
+ } from "./chunk-SLAOS6JN.js";
5
5
  import {
6
6
  schema_exports
7
7
  } from "./chunk-LHHBOQUR.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-XBHDQK4Z.js";
7
7
  import {
8
8
  getConfig
9
- } from "./chunk-EF5QCTEQ.js";
9
+ } from "./chunk-EFDAVLKN.js";
10
10
 
11
11
  // src/backends/claude/args.ts
12
12
  function buildClaudeArgs(input) {
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  resolveVaultSecrets
3
- } from "./chunk-DO4WVWW7.js";
3
+ } from "./chunk-IFXD4DH5.js";
4
4
  import {
5
5
  dockerProvider
6
6
  } from "./chunk-RMZRSYIJ.js";
7
7
  import {
8
8
  appendEvent
9
- } from "./chunk-BMPB7XJH.js";
9
+ } from "./chunk-TRQX5AIZ.js";
10
10
  import {
11
11
  getSession,
12
12
  getSessionRow,
13
13
  setSessionSandbox
14
- } from "./chunk-I5ZA45YL.js";
14
+ } from "./chunk-QWGJS6V6.js";
15
15
  import {
16
16
  deleteSprite,
17
17
  listSprites
18
- } from "./chunk-YCXELHKG.js";
18
+ } from "./chunk-REGPK5NG.js";
19
19
  import {
20
20
  allSessionSandboxes,
21
21
  countInEnv,
@@ -24,20 +24,20 @@ import {
24
24
  } from "./chunk-EFOIR7R3.js";
25
25
  import {
26
26
  resolveContainerProvider
27
- } from "./chunk-QUJNG4RA.js";
27
+ } from "./chunk-C6JEPQ7T.js";
28
28
  import {
29
29
  getEnvironment,
30
30
  getEnvironmentRow
31
- } from "./chunk-NUO56TF7.js";
31
+ } from "./chunk-S5HVHCAK.js";
32
32
  import {
33
33
  getAgent
34
- } from "./chunk-JEI7I3EH.js";
34
+ } from "./chunk-TXUUUO5R.js";
35
35
  import {
36
36
  resolveBackend
37
- } from "./chunk-KOGG7CSN.js";
37
+ } from "./chunk-4B7PQTTS.js";
38
38
  import {
39
39
  getConfig
40
- } from "./chunk-EF5QCTEQ.js";
40
+ } from "./chunk-EFDAVLKN.js";
41
41
  import {
42
42
  init_clock,
43
43
  nowMs
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  onAfterCommit
3
- } from "./chunk-BMPB7XJH.js";
3
+ } from "./chunk-TRQX5AIZ.js";
4
4
  import {
5
5
  getSessionRow
6
- } from "./chunk-I5ZA45YL.js";
6
+ } from "./chunk-QWGJS6V6.js";
7
7
  import {
8
8
  listEventsByTrace
9
- } from "./chunk-O45IQUWS.js";
9
+ } from "./chunk-5NBZZZKH.js";
10
10
  import {
11
11
  getAgent
12
- } from "./chunk-JEI7I3EH.js";
12
+ } from "./chunk-TXUUUO5R.js";
13
13
  import {
14
14
  getConfig
15
- } from "./chunk-EF5QCTEQ.js";
15
+ } from "./chunk-EFDAVLKN.js";
16
16
 
17
17
  // src/observability/otlp.ts
18
18
  import { createHash } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  forwardToAnthropic
3
- } from "./chunk-T45NOW43.js";
3
+ } from "./chunk-L43UD7PK.js";
4
4
  import {
5
5
  isAnthropicApiKey,
6
6
  isPassthroughAllowedPath
@@ -8,10 +8,10 @@ import {
8
8
  import {
9
9
  findByRawKey,
10
10
  hydratePermissions
11
- } from "./chunk-ADK2TYO4.js";
11
+ } from "./chunk-WHV4YUQB.js";
12
12
  import {
13
13
  getConfig
14
- } from "./chunk-EF5QCTEQ.js";
14
+ } from "./chunk-EFDAVLKN.js";
15
15
  import {
16
16
  unauthorized
17
17
  } from "./chunk-EZYKRG4W.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  buildOpencodeAuthEnv,
6
6
  validateOpencodeRuntime
7
- } from "./chunk-B2JLKTBJ.js";
7
+ } from "./chunk-VC25NYHW.js";
8
8
  import {
9
9
  buildOpencodeConfigEnv
10
10
  } from "./chunk-Z25I7DRV.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readSetting
3
- } from "./chunk-EF5QCTEQ.js";
3
+ } from "./chunk-EFDAVLKN.js";
4
4
 
5
5
  // src/lib/skills-cache.ts
6
6
  var DEFAULT_FEED_URL = "https://www.agentstep.com/v1/skills/feed";
@@ -21,24 +21,24 @@ import {
21
21
  } from "./chunk-72BKGVBE.js";
22
22
  import {
23
23
  loadSessionSecrets
24
- } from "./chunk-M4CTE7EH.js";
24
+ } from "./chunk-HF6HORZZ.js";
25
25
  import {
26
26
  isProxied
27
- } from "./chunk-NIOWKTIF.js";
27
+ } from "./chunk-NT2AI5IE.js";
28
28
  import {
29
29
  acquireForFirstTurn,
30
30
  installSkills,
31
31
  provisionResources,
32
32
  wrapProviderWithSecrets
33
- } from "./chunk-XGUSWFDD.js";
33
+ } from "./chunk-EN3ICYTL.js";
34
34
  import {
35
35
  BLOCKED_ENV_KEYS,
36
36
  resolveVaultSecrets
37
- } from "./chunk-DO4WVWW7.js";
37
+ } from "./chunk-IFXD4DH5.js";
38
38
  import {
39
39
  appendEvent,
40
40
  appendEventsBatch
41
- } from "./chunk-BMPB7XJH.js";
41
+ } from "./chunk-TRQX5AIZ.js";
42
42
  import {
43
43
  bumpSessionStats,
44
44
  getOutcomeCriteria,
@@ -49,26 +49,26 @@ import {
49
49
  setOutcomeCriteria,
50
50
  updateSessionMutable,
51
51
  updateSessionStatus
52
- } from "./chunk-I5ZA45YL.js";
52
+ } from "./chunk-QWGJS6V6.js";
53
53
  import {
54
54
  listEvents,
55
55
  markUserEventProcessed
56
- } from "./chunk-O45IQUWS.js";
56
+ } from "./chunk-5NBZZZKH.js";
57
57
  import {
58
58
  getBySession
59
59
  } from "./chunk-EFOIR7R3.js";
60
60
  import {
61
61
  resolveContainerProvider
62
- } from "./chunk-QUJNG4RA.js";
62
+ } from "./chunk-C6JEPQ7T.js";
63
63
  import {
64
64
  getEnvironment
65
- } from "./chunk-NUO56TF7.js";
65
+ } from "./chunk-S5HVHCAK.js";
66
66
  import {
67
67
  getAgent
68
- } from "./chunk-JEI7I3EH.js";
68
+ } from "./chunk-TXUUUO5R.js";
69
69
  import {
70
70
  resolveBackend
71
- } from "./chunk-KOGG7CSN.js";
71
+ } from "./chunk-4B7PQTTS.js";
72
72
  import {
73
73
  PERMISSION_BRIDGE_PENDING_PATH,
74
74
  PERMISSION_BRIDGE_REQUEST_PATH,
@@ -84,7 +84,7 @@ import {
84
84
  } from "./chunk-XBHDQK4Z.js";
85
85
  import {
86
86
  getConfig
87
- } from "./chunk-EF5QCTEQ.js";
87
+ } from "./chunk-EFDAVLKN.js";
88
88
  import {
89
89
  init_clock,
90
90
  nowMs
@@ -101,11 +101,8 @@ import {
101
101
  init_errors();
102
102
  init_clock();
103
103
  function formatStopReason(reason, eventIds) {
104
- if (reason === "custom_tool_call" && eventIds?.length) {
105
- return { type: "requires_action", event_ids: eventIds };
106
- }
107
104
  if (reason === "custom_tool_call") {
108
- return { type: "requires_action" };
105
+ return { type: "requires_action", event_ids: eventIds ?? [] };
109
106
  }
110
107
  return { type: reason };
111
108
  }