@namzu/sdk 64.4.0 → 65.1.0

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 (61) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/agents/explore.d.ts +1 -1
  3. package/dist/agents/explore.d.ts.map +1 -1
  4. package/dist/agents/explore.js +3 -2
  5. package/dist/agents/explore.js.map +1 -1
  6. package/dist/agents/plan.d.ts +1 -1
  7. package/dist/agents/plan.d.ts.map +1 -1
  8. package/dist/agents/plan.js +3 -2
  9. package/dist/agents/plan.js.map +1 -1
  10. package/dist/prompt/coding-agent-doctrine.d.ts +2 -2
  11. package/dist/prompt/coding-agent-doctrine.d.ts.map +1 -1
  12. package/dist/prompt/coding-agent-doctrine.js +39 -44
  13. package/dist/prompt/coding-agent-doctrine.js.map +1 -1
  14. package/dist/provider/errors.d.ts +10 -0
  15. package/dist/provider/errors.d.ts.map +1 -1
  16. package/dist/provider/errors.js +29 -1
  17. package/dist/provider/errors.js.map +1 -1
  18. package/dist/provider/fallback.d.ts.map +1 -1
  19. package/dist/provider/fallback.js +4 -3
  20. package/dist/provider/fallback.js.map +1 -1
  21. package/dist/provider/idle-timeout.js +1 -1
  22. package/dist/provider/idle-timeout.js.map +1 -1
  23. package/dist/provider/retry.js +1 -1
  24. package/dist/provider/retry.js.map +1 -1
  25. package/dist/provider/token-budget.d.ts.map +1 -1
  26. package/dist/provider/token-budget.js +9 -1
  27. package/dist/provider/token-budget.js.map +1 -1
  28. package/dist/runtime/query/iteration/index.d.ts +11 -0
  29. package/dist/runtime/query/iteration/index.d.ts.map +1 -1
  30. package/dist/runtime/query/iteration/index.js +93 -13
  31. package/dist/runtime/query/iteration/index.js.map +1 -1
  32. package/dist/runtime/query/turn/stall-monitor.d.ts +26 -0
  33. package/dist/runtime/query/turn/stall-monitor.d.ts.map +1 -1
  34. package/dist/runtime/query/turn/stall-monitor.js +45 -4
  35. package/dist/runtime/query/turn/stall-monitor.js.map +1 -1
  36. package/dist/types/provider/error.d.ts +7 -1
  37. package/dist/types/provider/error.d.ts.map +1 -1
  38. package/dist/types/provider/errors.d.ts.map +1 -1
  39. package/dist/types/provider/errors.js +5 -0
  40. package/dist/types/provider/errors.js.map +1 -1
  41. package/dist/types/provider/interface.d.ts +8 -6
  42. package/dist/types/provider/interface.d.ts.map +1 -1
  43. package/dist/types/session/records.d.ts +6 -0
  44. package/dist/types/session/records.d.ts.map +1 -1
  45. package/dist/types/session/records.js +11 -1
  46. package/dist/types/session/records.js.map +1 -1
  47. package/package.json +1 -1
  48. package/src/agents/explore.ts +3 -2
  49. package/src/agents/plan.ts +3 -2
  50. package/src/prompt/coding-agent-doctrine.ts +40 -45
  51. package/src/provider/errors.ts +32 -1
  52. package/src/provider/fallback.ts +4 -3
  53. package/src/provider/idle-timeout.ts +1 -1
  54. package/src/provider/retry.ts +1 -1
  55. package/src/provider/token-budget.ts +9 -1
  56. package/src/runtime/query/iteration/index.ts +105 -16
  57. package/src/runtime/query/turn/stall-monitor.ts +55 -4
  58. package/src/types/provider/error.ts +6 -0
  59. package/src/types/provider/errors.ts +5 -0
  60. package/src/types/provider/interface.ts +8 -6
  61. package/src/types/session/records.ts +11 -1
@@ -183,15 +183,17 @@ export interface LLMProvider {
183
183
  * Whether `model` takes a forced tool choice (`toolChoice: 'required'` or a
184
184
  * named function) under the thinking configuration the request will carry.
185
185
  *
186
- * The kernel asks before it requires a tool call on a step it wants to act,
187
- * and when the answer is `false` it keeps the step at low effort and asks the
188
- * model in words instead of sending a choice the driver would refuse. `effort`
186
+ * The kernel asks before a guard requires a tool call on a step it wants to
187
+ * act, and sends a forced choice only when the answer is `true` and the
188
+ * request does not turn thinking on. Otherwise it keeps the step at low effort
189
+ * and asks the model in words. `effort`
189
190
  * is the level the request will carry, for a driver where the level also
190
191
  * decides whether thinking is on (a provider that does not need it ignores
191
192
  * it). Optional:
192
- * a provider that does not declare it is treated as taking the choice, so
193
- * every existing driver behaves as before. A wrapper that rebuilds a provider
194
- * forwards it.
193
+ * a provider that does not declare it is not sent a guard's forced choice (the
194
+ * words are used). A host's own `toolChoice` is sent as given. A wrapper that
195
+ * rebuilds a provider forwards it; a chain answers `true` only when every
196
+ * member does.
195
197
  */
196
198
  acceptsForcedToolChoiceFor?(
197
199
  model: string,
@@ -210,7 +210,17 @@ const platformError = z
210
210
  /** The provider's own classification; its fields are owned by `types/provider/error.ts`. */
211
211
  const providerError = z
212
212
  .object({
213
- kind: z.enum(['throttle', 'network', 'auth', 'context_overflow', 'bad_request', 'server']),
213
+ kind: z.enum([
214
+ 'throttle',
215
+ 'network',
216
+ 'auth',
217
+ 'context_overflow',
218
+ 'bad_request',
219
+ 'server',
220
+ 'credits',
221
+ 'moderation',
222
+ 'no_endpoints',
223
+ ]),
214
224
  providerId: text,
215
225
  })
216
226
  .passthrough()