@theokit/sdk 2.29.0 → 3.0.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 (65) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/a2a/index.cjs +8 -1
  3. package/dist/a2a/index.cjs.map +1 -1
  4. package/dist/a2a/index.d.cts +1 -1
  5. package/dist/a2a/index.d.ts +1 -1
  6. package/dist/a2a/index.js +8 -1
  7. package/dist/a2a/index.js.map +1 -1
  8. package/dist/a2a/subagent.d.cts +5 -1
  9. package/dist/a2a/subagent.d.ts +5 -1
  10. package/dist/agent-factory.d.ts +5 -20
  11. package/dist/concurrency.cjs +10 -1
  12. package/dist/concurrency.cjs.map +1 -1
  13. package/dist/concurrency.d.cts +7 -1
  14. package/dist/concurrency.d.ts +7 -1
  15. package/dist/concurrency.js +10 -1
  16. package/dist/concurrency.js.map +1 -1
  17. package/dist/create-skill.d.ts +7 -7
  18. package/dist/{cron-COSAehOL.d.ts → cron-BLRe166v.d.ts} +392 -31
  19. package/dist/{cron-yJoNUZxe.d.cts → cron-C2jWAvlQ.d.cts} +392 -31
  20. package/dist/cron.cjs +89 -44
  21. package/dist/cron.cjs.map +1 -1
  22. package/dist/cron.d.cts +2 -2
  23. package/dist/cron.d.ts +2 -2
  24. package/dist/cron.js +89 -44
  25. package/dist/cron.js.map +1 -1
  26. package/dist/define-tool.d.ts +12 -1
  27. package/dist/{errors-tP-8O-hR.d.cts → errors-DZpCGlYv.d.cts} +1 -1
  28. package/dist/{errors-BxMIlgLP.d.ts → errors-D_Bfo30u.d.ts} +1 -1
  29. package/dist/errors.d.cts +2 -2
  30. package/dist/index.cjs +179 -56
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +64 -246
  33. package/dist/index.d.ts +64 -246
  34. package/dist/index.js +168 -45
  35. package/dist/index.js.map +1 -1
  36. package/dist/internal/plugins/index.d.cts +1 -1
  37. package/dist/internal/plugins/index.d.ts +1 -1
  38. package/dist/internal/plugins/types.d.cts +4 -0
  39. package/dist/internal/plugins/types.d.ts +4 -0
  40. package/dist/retry.cjs +10 -1
  41. package/dist/retry.cjs.map +1 -1
  42. package/dist/retry.d.cts +12 -1
  43. package/dist/retry.d.ts +12 -1
  44. package/dist/retry.js +10 -1
  45. package/dist/retry.js.map +1 -1
  46. package/dist/{run-q_P0vHlY.d.cts → run-CLXKMRgq.d.cts} +1 -1
  47. package/dist/{run-q_P0vHlY.d.ts → run-CLXKMRgq.d.ts} +1 -1
  48. package/dist/server/auth/index.cjs +8 -1
  49. package/dist/server/auth/index.cjs.map +1 -1
  50. package/dist/server/auth/index.d.cts +1 -1
  51. package/dist/server/auth/index.d.ts +1 -1
  52. package/dist/server/auth/index.js +8 -1
  53. package/dist/server/auth/index.js.map +1 -1
  54. package/dist/server/auth/orchestrator.d.cts +5 -1
  55. package/dist/server/auth/orchestrator.d.ts +5 -1
  56. package/dist/subscription/define-subscription.d.cts +5 -0
  57. package/dist/subscription/define-subscription.d.ts +5 -0
  58. package/dist/subscription/index.cjs +8 -1
  59. package/dist/subscription/index.cjs.map +1 -1
  60. package/dist/subscription/index.d.cts +1 -1
  61. package/dist/subscription/index.d.ts +1 -1
  62. package/dist/subscription/index.js +8 -1
  63. package/dist/subscription/index.js.map +1 -1
  64. package/dist/types/cron.d.ts +30 -13
  65. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - SE36 — uniform `X.create()` public API (v3.0 breaking). Every public factory is removed in favor of a static `X.create()` namespace method, matching `Agent.create` / `Cron.create` / `Workflow.create`:
8
+
9
+ `defineTool`→`Tool.create`, `defineProvider`→`Provider.create`, `definePlugin`→`Plugin.create`, `defineSkillReadTool`→`SkillReadTool.create`, `defineSubAgent`→`SubAgent.create`, `createSquad`→`Squad.create`, `createSkill`→`Skill.create`, `createSessionManager`→`Session.create`, `createAgentFactory`→`AgentFactory.create`, `createNoopMemoryProvider`→`NoopMemoryProvider.create`, `createPermissionPlugin`→`PermissionPlugin.create`, `createTokenLimiter`→`TokenLimiter.create`, `createUnicodeNormalizer`→`UnicodeNormalizer.create`, `defineSubscription`→`Subscription.create`, `createSemaphore`→`Semaphore.create`, `defineAuth`→`Auth.create`, `withRetry`→`Retry.create`.
10
+
11
+ `Agent.create` / `Cron.create` / `Workflow.create` / `Budget.create` are unchanged. Run `npx @theokit/codemod-sdk-3-0 --write` to migrate consumers. Reverses Unbreakable Rule 9 (ADR 0015 supersedes D431).
12
+
13
+ ## 2.30.0
14
+
15
+ ### Minor Changes
16
+
17
+ - ea3cd14: **SE35 — schedule a workflow on the `Cron` primitive (`workflow` + `inputData`).**
18
+
19
+ A `Cron` job may now target a committed `Workflow` (SE27–30) instead of an agent — the runtime-legitimate slice of Mastra's Schedules. `Cron.create({ cron, workflow, inputData })` runs `workflow.run(inputData)` on each fire, reusing the shipped in-process scheduler + Task-registry observability. Mutually exclusive with agent targets: exactly one of `agent` | `agentId` | `workflow`; `message` is required for agent targets and forbidden with a workflow (typed `ConfigurationError`s: `cron_ambiguous_target` / `cron_no_target` / `cron_workflow_message` / `cron_missing_message`). `Cron.run(jobId)` returns `Run | WorkflowRun`; the fire handler records the correct terminal status for either shape.
20
+
21
+ Per ADR 0014, the job holds the `Workflow` **instance** (not a `workflowId` + resolver registry) — the cron store is in-memory, so there is no serialization problem to solve and a registry would be YAGNI; workflow cron jobs are local-runtime only (an instance can't cross the cloud boundary). Fire lifecycle hooks (`prepare`/`onFinish`/`onError`/`onAbort`) are deferred with a named re-eval trigger. Back-compat: agent-target jobs are byte-identical. From the Mastra Schedules comparison (SDK Evolution roadmap SE35).
22
+
3
23
  ## 2.29.0
4
24
 
5
25
  ### Minor Changes
@@ -19154,10 +19154,17 @@ function defineSubAgent(spec, _parentDepth = 0) {
19154
19154
  }
19155
19155
  };
19156
19156
  }
19157
+ var SubAgent = class {
19158
+ constructor() {
19159
+ }
19160
+ static create(spec, parentDepth = 0) {
19161
+ return defineSubAgent(spec, parentDepth);
19162
+ }
19163
+ };
19157
19164
 
19158
19165
  exports.AgentMailbox = AgentMailbox;
19159
19166
  exports.MaxDelegationDepthError = MaxDelegationDepthError;
19160
19167
  exports.MessageBus = MessageBus;
19161
- exports.defineSubAgent = defineSubAgent;
19168
+ exports.SubAgent = SubAgent;
19162
19169
  //# sourceMappingURL=index.cjs.map
19163
19170
  //# sourceMappingURL=index.cjs.map