digital-workers 2.1.1 → 2.1.3

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 (51) hide show
  1. package/.turbo/turbo-build.log +4 -5
  2. package/CHANGELOG.md +14 -0
  3. package/LICENSE +21 -0
  4. package/README.md +134 -180
  5. package/dist/actions.d.ts.map +1 -1
  6. package/dist/actions.js +1 -0
  7. package/dist/actions.js.map +1 -1
  8. package/dist/agent-comms.d.ts +438 -0
  9. package/dist/agent-comms.d.ts.map +1 -0
  10. package/dist/agent-comms.js +666 -0
  11. package/dist/agent-comms.js.map +1 -0
  12. package/dist/capability-tiers.d.ts +230 -0
  13. package/dist/capability-tiers.d.ts.map +1 -0
  14. package/dist/capability-tiers.js +388 -0
  15. package/dist/capability-tiers.js.map +1 -0
  16. package/dist/cascade-context.d.ts +523 -0
  17. package/dist/cascade-context.d.ts.map +1 -0
  18. package/dist/cascade-context.js +494 -0
  19. package/dist/cascade-context.js.map +1 -0
  20. package/dist/error-escalation.d.ts +416 -0
  21. package/dist/error-escalation.d.ts.map +1 -0
  22. package/dist/error-escalation.js +656 -0
  23. package/dist/error-escalation.js.map +1 -0
  24. package/dist/index.d.ts +10 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +34 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/load-balancing.d.ts +395 -0
  29. package/dist/load-balancing.d.ts.map +1 -0
  30. package/dist/load-balancing.js +905 -0
  31. package/dist/load-balancing.js.map +1 -0
  32. package/dist/types.d.ts +8 -0
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/types.js +1 -0
  35. package/dist/types.js.map +1 -1
  36. package/package.json +14 -13
  37. package/src/actions.ts +9 -8
  38. package/src/agent-comms.ts +1238 -0
  39. package/src/capability-tiers.ts +545 -0
  40. package/src/cascade-context.ts +648 -0
  41. package/src/error-escalation.ts +1135 -0
  42. package/src/index.ts +223 -0
  43. package/src/load-balancing.ts +1381 -0
  44. package/src/types.ts +8 -0
  45. package/test/agent-comms.test.ts +1397 -0
  46. package/test/capability-tiers.test.ts +631 -0
  47. package/test/cascade-context.test.ts +692 -0
  48. package/test/error-escalation.test.ts +1205 -0
  49. package/test/load-balancing-thread-safety.test.ts +464 -0
  50. package/test/load-balancing.test.ts +1145 -0
  51. package/test/types.test.ts +35 -0
package/src/types.ts CHANGED
@@ -11,11 +11,13 @@
11
11
  * - **Contacts**: How a worker can be reached (email, slack, phone, etc.)
12
12
  * - **Action**: Durable workflow action (notify, ask, approve, decide)
13
13
  * - **Team**: Group of workers with shared contacts
14
+ * - **CapabilityTier**: Agent capability level (code, generative, agentic, human)
14
15
  *
15
16
  * @packageDocumentation
16
17
  */
17
18
 
18
19
  import type { SimpleSchema } from 'ai-functions'
20
+ import type { CapabilityTier, CapabilityProfile } from './capability-tiers.js'
19
21
 
20
22
  // ============================================================================
21
23
  // Worker Types
@@ -233,6 +235,10 @@ export interface Worker {
233
235
  teams?: string[]
234
236
  skills?: string[]
235
237
  tools?: string[]
238
+ /** Capability tier (code, generative, agentic, human) */
239
+ capabilityTier?: CapabilityTier
240
+ /** Full capability profile for detailed configuration */
241
+ capabilityProfile?: CapabilityProfile
236
242
  metadata?: Record<string, unknown>
237
243
  }
238
244
 
@@ -244,6 +250,8 @@ export interface WorkerRef {
244
250
  type?: WorkerType
245
251
  name?: string
246
252
  role?: string
253
+ /** Capability tier for routing decisions */
254
+ capabilityTier?: CapabilityTier
247
255
  }
248
256
 
249
257
  // ============================================================================