@theokit/sdk 2.30.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 (55) hide show
  1. package/CHANGELOG.md +10 -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-BNHJywtl.d.ts → cron-BLRe166v.d.ts} +19 -15
  19. package/dist/{cron-t4oKI2Is.d.cts → cron-C2jWAvlQ.d.cts} +19 -15
  20. package/dist/cron.d.cts +1 -1
  21. package/dist/cron.d.ts +1 -1
  22. package/dist/define-tool.d.ts +12 -1
  23. package/dist/index.cjs +90 -12
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +60 -114
  26. package/dist/index.d.ts +60 -114
  27. package/dist/index.js +79 -1
  28. package/dist/index.js.map +1 -1
  29. package/dist/internal/plugins/index.d.cts +1 -1
  30. package/dist/internal/plugins/index.d.ts +1 -1
  31. package/dist/internal/plugins/types.d.cts +4 -0
  32. package/dist/internal/plugins/types.d.ts +4 -0
  33. package/dist/retry.cjs +10 -1
  34. package/dist/retry.cjs.map +1 -1
  35. package/dist/retry.d.cts +12 -1
  36. package/dist/retry.d.ts +12 -1
  37. package/dist/retry.js +10 -1
  38. package/dist/retry.js.map +1 -1
  39. package/dist/server/auth/index.cjs +8 -1
  40. package/dist/server/auth/index.cjs.map +1 -1
  41. package/dist/server/auth/index.d.cts +1 -1
  42. package/dist/server/auth/index.d.ts +1 -1
  43. package/dist/server/auth/index.js +8 -1
  44. package/dist/server/auth/index.js.map +1 -1
  45. package/dist/server/auth/orchestrator.d.cts +5 -1
  46. package/dist/server/auth/orchestrator.d.ts +5 -1
  47. package/dist/subscription/define-subscription.d.cts +5 -0
  48. package/dist/subscription/define-subscription.d.ts +5 -0
  49. package/dist/subscription/index.cjs +8 -1
  50. package/dist/subscription/index.cjs.map +1 -1
  51. package/dist/subscription/index.d.cts +1 -1
  52. package/dist/subscription/index.d.ts +1 -1
  53. package/dist/subscription/index.js +8 -1
  54. package/dist/subscription/index.js.map +1 -1
  55. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19433,6 +19433,13 @@ function deepMergeCloud(base, top) {
19433
19433
  if (base === void 0 && top === void 0) return void 0;
19434
19434
  return { ...base ?? {}, ...top ?? {} };
19435
19435
  }
19436
+ var AgentFactory = class {
19437
+ constructor() {
19438
+ }
19439
+ static create(common) {
19440
+ return createAgentFactory(common);
19441
+ }
19442
+ };
19436
19443
 
19437
19444
  // src/internal/budget/enforcement.ts
19438
19445
  init_errors();
@@ -19870,6 +19877,20 @@ function createTokenLimiter(opts) {
19870
19877
  processOutput: (ctx) => cap2(ctx.text, ctx)
19871
19878
  };
19872
19879
  }
19880
+ var TokenLimiter = class {
19881
+ constructor() {
19882
+ }
19883
+ static create(opts) {
19884
+ return createTokenLimiter(opts);
19885
+ }
19886
+ };
19887
+ var UnicodeNormalizer = class {
19888
+ constructor() {
19889
+ }
19890
+ static create(opts = {}) {
19891
+ return createUnicodeNormalizer(opts);
19892
+ }
19893
+ };
19873
19894
 
19874
19895
  // src/create-skill.ts
19875
19896
  function createSkill(spec) {
@@ -19885,6 +19906,13 @@ function createSkill(spec) {
19885
19906
  ...spec.references !== void 0 ? { references: spec.references } : {}
19886
19907
  };
19887
19908
  }
19909
+ var Skill = class {
19910
+ constructor() {
19911
+ }
19912
+ static create(spec) {
19913
+ return createSkill(spec);
19914
+ }
19915
+ };
19888
19916
 
19889
19917
  // src/cron.ts
19890
19918
  init_errors();
@@ -20353,6 +20381,13 @@ function defineProvider(profile, opts) {
20353
20381
  profile
20354
20382
  };
20355
20383
  }
20384
+ var Provider = class {
20385
+ constructor() {
20386
+ }
20387
+ static create(profile, opts) {
20388
+ return defineProvider(profile, opts);
20389
+ }
20390
+ };
20356
20391
 
20357
20392
  // src/define-skill-read-tool.ts
20358
20393
  init_to_json_schema();
@@ -20393,6 +20428,13 @@ function defineSkillReadTool(skills) {
20393
20428
  }
20394
20429
  };
20395
20430
  }
20431
+ var SkillReadTool = class {
20432
+ constructor() {
20433
+ }
20434
+ static create(skills) {
20435
+ return defineSkillReadTool(skills);
20436
+ }
20437
+ };
20396
20438
 
20397
20439
  // src/define-tool.ts
20398
20440
  init_to_json_schema();
@@ -20401,6 +20443,13 @@ function shapeToolResult(spec, out) {
20401
20443
  if (spec.toModelOutput !== void 0) return spec.toModelOutput(validated);
20402
20444
  return typeof validated === "string" ? validated : JSON.stringify(validated);
20403
20445
  }
20446
+ var Tool = class {
20447
+ constructor() {
20448
+ }
20449
+ static create(spec) {
20450
+ return defineTool(spec);
20451
+ }
20452
+ };
20404
20453
  function defineTool(spec) {
20405
20454
  const inputSchema = toJsonSchema(spec.inputSchema, {
20406
20455
  unrepresentable: "any"
@@ -20584,6 +20633,7 @@ init_cwd_mutex();
20584
20633
  function definePlugin(p) {
20585
20634
  return p;
20586
20635
  }
20636
+ var Plugin = { create: definePlugin };
20587
20637
 
20588
20638
  // src/internal/runtime/budget/budget-tracker-counter.ts
20589
20639
  function createCounterBudgetTracker(options = {}) {
@@ -20742,6 +20792,13 @@ function createNoopMemoryProvider() {
20742
20792
  }
20743
20793
  };
20744
20794
  }
20795
+ var NoopMemoryProvider = class {
20796
+ constructor() {
20797
+ }
20798
+ static create() {
20799
+ return createNoopMemoryProvider();
20800
+ }
20801
+ };
20745
20802
  var JobQueue = class {
20746
20803
  jobs = /* @__PURE__ */ new Map();
20747
20804
  controllers = /* @__PURE__ */ new Map();
@@ -21398,6 +21455,13 @@ function createPermissionPlugin(engine, opts = {}) {
21398
21455
  }
21399
21456
  });
21400
21457
  }
21458
+ var PermissionPlugin = class {
21459
+ constructor() {
21460
+ }
21461
+ static create(engine, opts = {}) {
21462
+ return createPermissionPlugin(engine, opts);
21463
+ }
21464
+ };
21401
21465
 
21402
21466
  // src/schema-normalizer.ts
21403
21467
  init_to_json_schema();
@@ -21587,6 +21651,13 @@ function previewOf(text) {
21587
21651
  if (oneLine.length === 0) return void 0;
21588
21652
  return oneLine.length > SUMMARY_PREVIEW_MAX ? `${oneLine.slice(0, SUMMARY_PREVIEW_MAX - 1)}\u2026` : oneLine;
21589
21653
  }
21654
+ var Session = class {
21655
+ constructor() {
21656
+ }
21657
+ static create(storage2) {
21658
+ return createSessionManager(storage2);
21659
+ }
21660
+ };
21590
21661
 
21591
21662
  // src/session-scope.ts
21592
21663
  function scopedConversationId(scope, id) {
@@ -21944,6 +22015,13 @@ function createSquad(options) {
21944
22015
  }
21945
22016
  };
21946
22017
  }
22018
+ var Squad = class {
22019
+ constructor() {
22020
+ }
22021
+ static create(options) {
22022
+ return createSquad(options);
22023
+ }
22024
+ };
21947
22025
 
21948
22026
  // src/index.ts
21949
22027
  init_stream_object();
@@ -22391,6 +22469,6 @@ function safeStringify2(v) {
22391
22469
  }
22392
22470
  }
22393
22471
 
22394
- export { Agent, AgentBuilder, AgentDisposedError, AgentRunError, AuthenticationError, Budget, BudgetExceededError, ConfigurationError, Cron, EventBus, FileSystemConversationStorage, GenerateObjectError, InMemoryConversationStorage, IntegrationNotConnectedError, InvalidTaskIdError, JobQueue, Memory, MemoryAdapterError, NetworkError, PermissionEngine, RateLimitError, Security, StreamObjectError, Task, TaskNotFoundError, Theokit, TheokitAgentError, ToolError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createAgentFactory, createCounterBudgetTracker, createNoopMemoryProvider, createPermissionPlugin, createSessionManager, createSkill, createSquad, createTokenLimiter, createUnicodeNormalizer, definePlugin, defineProvider, defineSkillReadTool, defineTool, emitRunEvent, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isTransientError, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
22472
+ export { Agent, AgentBuilder, AgentDisposedError, AgentFactory, AgentRunError, AuthenticationError, Budget, BudgetExceededError, ConfigurationError, Cron, EventBus, FileSystemConversationStorage, GenerateObjectError, InMemoryConversationStorage, IntegrationNotConnectedError, InvalidTaskIdError, JobQueue, Memory, MemoryAdapterError, NetworkError, NoopMemoryProvider, PermissionEngine, PermissionPlugin, Plugin, Provider, RateLimitError, Security, Session, Skill, SkillReadTool, Squad, StreamObjectError, Task, TaskNotFoundError, Theokit, TheokitAgentError, TokenLimiter, Tool, ToolError, UnicodeNormalizer, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, UsageAccumulator, applyMode, buildReplayHistory, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, emitRunEvent, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isTransientError, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
22395
22473
  //# sourceMappingURL=index.js.map
22396
22474
  //# sourceMappingURL=index.js.map