@linnlabs/linnkit 0.42.0 → 0.43.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 (47) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cli.cjs +12 -1
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +12 -1
  5. package/dist/cli.js.map +1 -1
  6. package/dist/contracts/agentSpec.d.cts +5 -5
  7. package/dist/contracts/agentSpec.d.ts +5 -5
  8. package/dist/contracts/audit.d.cts +10 -10
  9. package/dist/contracts/audit.d.ts +10 -10
  10. package/dist/contracts/contextPolicy.d.cts +14 -14
  11. package/dist/contracts/contextPolicy.d.ts +14 -14
  12. package/dist/contracts/events.d.cts +117 -117
  13. package/dist/contracts/events.d.ts +117 -117
  14. package/dist/contracts/execution.d.cts +2 -2
  15. package/dist/contracts/execution.d.ts +2 -2
  16. package/dist/contracts/llm-retry.d.cts +2 -2
  17. package/dist/contracts/llm-retry.d.ts +2 -2
  18. package/dist/contracts/messages.d.cts +32 -32
  19. package/dist/contracts/messages.d.ts +32 -32
  20. package/dist/contracts/sse.d.cts +97 -97
  21. package/dist/contracts/sse.d.ts +97 -97
  22. package/dist/contracts/sub-run-trace-payload.d.cts +8 -8
  23. package/dist/contracts/sub-run-trace-payload.d.ts +8 -8
  24. package/dist/contracts/token-accounting.d.cts +12 -12
  25. package/dist/contracts/token-accounting.d.ts +12 -12
  26. package/dist/index.cjs +12 -1
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +12 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/quickstart.cjs +12 -1
  31. package/dist/quickstart.cjs.map +1 -1
  32. package/dist/quickstart.js +12 -1
  33. package/dist/quickstart.js.map +1 -1
  34. package/dist/runtime-kernel/events/agentEvents.d.cts +2 -2
  35. package/dist/runtime-kernel/events/agentEvents.d.ts +2 -2
  36. package/dist/runtime-kernel/graph-engine/engine.d.cts +1 -0
  37. package/dist/runtime-kernel/graph-engine/engine.d.ts +1 -0
  38. package/dist/runtime-kernel.cjs +12 -1
  39. package/dist/runtime-kernel.cjs.map +1 -1
  40. package/dist/runtime-kernel.js +12 -1
  41. package/dist/runtime-kernel.js.map +1 -1
  42. package/dist/testkit.cjs +12 -1
  43. package/dist/testkit.cjs.map +1 -1
  44. package/dist/testkit.js +12 -1
  45. package/dist/testkit.js.map +1 -1
  46. package/docs/integration/tool-development-guide.md +1 -0
  47. package/package.json +2 -2
@@ -42,9 +42,9 @@ declare const AgentSpec: z.ZodObject<{
42
42
  }, z.core.$strip>>;
43
43
  toolHistory: z.ZodOptional<z.ZodObject<{
44
44
  strategy: z.ZodOptional<z.ZodEnum<{
45
- none: "none";
46
45
  "per-pair": "per-pair";
47
46
  "per-run": "per-run";
47
+ none: "none";
48
48
  }>>;
49
49
  retentionMode: z.ZodOptional<z.ZodEnum<{
50
50
  drop: "drop";
@@ -75,16 +75,16 @@ declare const AgentSpec: z.ZodObject<{
75
75
  }, z.core.$strip>>;
76
76
  mustKeep: z.ZodOptional<z.ZodObject<{
77
77
  alwaysKeepTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
78
- user_input: "user_input";
79
78
  tool_calls: "tool_calls";
80
- tool_output: "tool_output";
81
- final_answer: "final_answer";
82
- history_summary: "history_summary";
83
79
  system_prompt: "system_prompt";
80
+ history_summary: "history_summary";
84
81
  context_injection: "context_injection";
82
+ user_input: "user_input";
85
83
  task_request: "task_request";
84
+ final_answer: "final_answer";
86
85
  tool_code: "tool_code";
87
86
  task_completion: "task_completion";
87
+ tool_output: "tool_output";
88
88
  }>>>;
89
89
  alwaysKeepFenceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
90
  truncationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -42,9 +42,9 @@ declare const AgentSpec: z.ZodObject<{
42
42
  }, z.core.$strip>>;
43
43
  toolHistory: z.ZodOptional<z.ZodObject<{
44
44
  strategy: z.ZodOptional<z.ZodEnum<{
45
- none: "none";
46
45
  "per-pair": "per-pair";
47
46
  "per-run": "per-run";
47
+ none: "none";
48
48
  }>>;
49
49
  retentionMode: z.ZodOptional<z.ZodEnum<{
50
50
  drop: "drop";
@@ -75,16 +75,16 @@ declare const AgentSpec: z.ZodObject<{
75
75
  }, z.core.$strip>>;
76
76
  mustKeep: z.ZodOptional<z.ZodObject<{
77
77
  alwaysKeepTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
78
- user_input: "user_input";
79
78
  tool_calls: "tool_calls";
80
- tool_output: "tool_output";
81
- final_answer: "final_answer";
82
- history_summary: "history_summary";
83
79
  system_prompt: "system_prompt";
80
+ history_summary: "history_summary";
84
81
  context_injection: "context_injection";
82
+ user_input: "user_input";
85
83
  task_request: "task_request";
84
+ final_answer: "final_answer";
86
85
  tool_code: "tool_code";
87
86
  task_completion: "task_completion";
87
+ tool_output: "tool_output";
88
88
  }>>>;
89
89
  alwaysKeepFenceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
90
  truncationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -4,12 +4,12 @@ declare const AUDIT_ACTIONS: readonly ["model.select", "model.fallback", "tool.a
4
4
  declare const AUDIT_DECISION_OUTCOMES: readonly ["allowed", "denied", "fallback", "retry", "cancelled", "paused", "resumed", "requested", "recorded"];
5
5
  declare const AuditActor: z.ZodObject<{
6
6
  kind: z.ZodEnum<{
7
- user: "user";
8
7
  system: "system";
8
+ user: "user";
9
+ tool: "tool";
9
10
  host: "host";
10
11
  agent: "agent";
11
12
  model: "model";
12
- tool: "tool";
13
13
  }>;
14
14
  id: z.ZodOptional<z.ZodString>;
15
15
  name: z.ZodOptional<z.ZodString>;
@@ -17,14 +17,14 @@ declare const AuditActor: z.ZodObject<{
17
17
  type AuditActor = z.infer<typeof AuditActor>;
18
18
  declare const AuditDecision: z.ZodObject<{
19
19
  outcome: z.ZodEnum<{
20
- cancelled: "cancelled";
21
- retry: "retry";
20
+ requested: "requested";
22
21
  allowed: "allowed";
23
22
  denied: "denied";
24
23
  fallback: "fallback";
24
+ retry: "retry";
25
+ cancelled: "cancelled";
25
26
  paused: "paused";
26
27
  resumed: "resumed";
27
- requested: "requested";
28
28
  recorded: "recorded";
29
29
  }>;
30
30
  reason: z.ZodOptional<z.ZodString>;
@@ -75,12 +75,12 @@ declare const AuditEnvelope: z.ZodObject<{
75
75
  ts: z.ZodNumber;
76
76
  actor: z.ZodObject<{
77
77
  kind: z.ZodEnum<{
78
- user: "user";
79
78
  system: "system";
79
+ user: "user";
80
+ tool: "tool";
80
81
  host: "host";
81
82
  agent: "agent";
82
83
  model: "model";
83
- tool: "tool";
84
84
  }>;
85
85
  id: z.ZodOptional<z.ZodString>;
86
86
  name: z.ZodOptional<z.ZodString>;
@@ -88,14 +88,14 @@ declare const AuditEnvelope: z.ZodObject<{
88
88
  action: z.ZodString;
89
89
  decision: z.ZodOptional<z.ZodObject<{
90
90
  outcome: z.ZodEnum<{
91
- cancelled: "cancelled";
92
- retry: "retry";
91
+ requested: "requested";
93
92
  allowed: "allowed";
94
93
  denied: "denied";
95
94
  fallback: "fallback";
95
+ retry: "retry";
96
+ cancelled: "cancelled";
96
97
  paused: "paused";
97
98
  resumed: "resumed";
98
- requested: "requested";
99
99
  recorded: "recorded";
100
100
  }>;
101
101
  reason: z.ZodOptional<z.ZodString>;
@@ -4,12 +4,12 @@ declare const AUDIT_ACTIONS: readonly ["model.select", "model.fallback", "tool.a
4
4
  declare const AUDIT_DECISION_OUTCOMES: readonly ["allowed", "denied", "fallback", "retry", "cancelled", "paused", "resumed", "requested", "recorded"];
5
5
  declare const AuditActor: z.ZodObject<{
6
6
  kind: z.ZodEnum<{
7
- user: "user";
8
7
  system: "system";
8
+ user: "user";
9
+ tool: "tool";
9
10
  host: "host";
10
11
  agent: "agent";
11
12
  model: "model";
12
- tool: "tool";
13
13
  }>;
14
14
  id: z.ZodOptional<z.ZodString>;
15
15
  name: z.ZodOptional<z.ZodString>;
@@ -17,14 +17,14 @@ declare const AuditActor: z.ZodObject<{
17
17
  type AuditActor = z.infer<typeof AuditActor>;
18
18
  declare const AuditDecision: z.ZodObject<{
19
19
  outcome: z.ZodEnum<{
20
- cancelled: "cancelled";
21
- retry: "retry";
20
+ requested: "requested";
22
21
  allowed: "allowed";
23
22
  denied: "denied";
24
23
  fallback: "fallback";
24
+ retry: "retry";
25
+ cancelled: "cancelled";
25
26
  paused: "paused";
26
27
  resumed: "resumed";
27
- requested: "requested";
28
28
  recorded: "recorded";
29
29
  }>;
30
30
  reason: z.ZodOptional<z.ZodString>;
@@ -75,12 +75,12 @@ declare const AuditEnvelope: z.ZodObject<{
75
75
  ts: z.ZodNumber;
76
76
  actor: z.ZodObject<{
77
77
  kind: z.ZodEnum<{
78
- user: "user";
79
78
  system: "system";
79
+ user: "user";
80
+ tool: "tool";
80
81
  host: "host";
81
82
  agent: "agent";
82
83
  model: "model";
83
- tool: "tool";
84
84
  }>;
85
85
  id: z.ZodOptional<z.ZodString>;
86
86
  name: z.ZodOptional<z.ZodString>;
@@ -88,14 +88,14 @@ declare const AuditEnvelope: z.ZodObject<{
88
88
  action: z.ZodString;
89
89
  decision: z.ZodOptional<z.ZodObject<{
90
90
  outcome: z.ZodEnum<{
91
- cancelled: "cancelled";
92
- retry: "retry";
91
+ requested: "requested";
93
92
  allowed: "allowed";
94
93
  denied: "denied";
95
94
  fallback: "fallback";
95
+ retry: "retry";
96
+ cancelled: "cancelled";
96
97
  paused: "paused";
97
98
  resumed: "resumed";
98
- requested: "requested";
99
99
  recorded: "recorded";
100
100
  }>;
101
101
  reason: z.ZodOptional<z.ZodString>;
@@ -2,16 +2,16 @@ import { SerializableJsonValue } from './json.cjs';
2
2
  import { z } from 'zod';
3
3
 
4
4
  declare const AgentSpecMessageType: z.ZodEnum<{
5
- user_input: "user_input";
6
5
  tool_calls: "tool_calls";
7
- tool_output: "tool_output";
8
- final_answer: "final_answer";
9
- history_summary: "history_summary";
10
6
  system_prompt: "system_prompt";
7
+ history_summary: "history_summary";
11
8
  context_injection: "context_injection";
9
+ user_input: "user_input";
12
10
  task_request: "task_request";
11
+ final_answer: "final_answer";
13
12
  tool_code: "tool_code";
14
13
  task_completion: "task_completion";
14
+ tool_output: "tool_output";
15
15
  }>;
16
16
  type AgentSpecMessageType = z.infer<typeof AgentSpecMessageType>;
17
17
  declare const AgentSpecBudgetPolicy: z.ZodObject<{
@@ -22,9 +22,9 @@ declare const AgentSpecBudgetPolicy: z.ZodObject<{
22
22
  type AgentSpecBudgetPolicy = z.infer<typeof AgentSpecBudgetPolicy>;
23
23
  declare const AgentSpecToolHistoryPolicy: z.ZodObject<{
24
24
  strategy: z.ZodOptional<z.ZodEnum<{
25
- none: "none";
26
25
  "per-pair": "per-pair";
27
26
  "per-run": "per-run";
27
+ none: "none";
28
28
  }>>;
29
29
  retentionMode: z.ZodOptional<z.ZodEnum<{
30
30
  drop: "drop";
@@ -71,16 +71,16 @@ declare const AgentSpecMustKeepTruncationRule: z.ZodObject<{
71
71
  type AgentSpecMustKeepTruncationRule = z.infer<typeof AgentSpecMustKeepTruncationRule>;
72
72
  declare const AgentSpecMustKeepPolicy: z.ZodObject<{
73
73
  alwaysKeepTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
74
- user_input: "user_input";
75
74
  tool_calls: "tool_calls";
76
- tool_output: "tool_output";
77
- final_answer: "final_answer";
78
- history_summary: "history_summary";
79
75
  system_prompt: "system_prompt";
76
+ history_summary: "history_summary";
80
77
  context_injection: "context_injection";
78
+ user_input: "user_input";
81
79
  task_request: "task_request";
80
+ final_answer: "final_answer";
82
81
  tool_code: "tool_code";
83
82
  task_completion: "task_completion";
83
+ tool_output: "tool_output";
84
84
  }>>>;
85
85
  alwaysKeepFenceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
86
  truncationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -185,9 +185,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
185
185
  }, z.core.$strip>>;
186
186
  toolHistory: z.ZodOptional<z.ZodObject<{
187
187
  strategy: z.ZodOptional<z.ZodEnum<{
188
- none: "none";
189
188
  "per-pair": "per-pair";
190
189
  "per-run": "per-run";
190
+ none: "none";
191
191
  }>>;
192
192
  retentionMode: z.ZodOptional<z.ZodEnum<{
193
193
  drop: "drop";
@@ -218,16 +218,16 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
218
218
  }, z.core.$strip>>;
219
219
  mustKeep: z.ZodOptional<z.ZodObject<{
220
220
  alwaysKeepTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
221
- user_input: "user_input";
222
221
  tool_calls: "tool_calls";
223
- tool_output: "tool_output";
224
- final_answer: "final_answer";
225
- history_summary: "history_summary";
226
222
  system_prompt: "system_prompt";
223
+ history_summary: "history_summary";
227
224
  context_injection: "context_injection";
225
+ user_input: "user_input";
228
226
  task_request: "task_request";
227
+ final_answer: "final_answer";
229
228
  tool_code: "tool_code";
230
229
  task_completion: "task_completion";
230
+ tool_output: "tool_output";
231
231
  }>>>;
232
232
  alwaysKeepFenceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
233
233
  truncationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2,16 +2,16 @@ import { SerializableJsonValue } from './json.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  declare const AgentSpecMessageType: z.ZodEnum<{
5
- user_input: "user_input";
6
5
  tool_calls: "tool_calls";
7
- tool_output: "tool_output";
8
- final_answer: "final_answer";
9
- history_summary: "history_summary";
10
6
  system_prompt: "system_prompt";
7
+ history_summary: "history_summary";
11
8
  context_injection: "context_injection";
9
+ user_input: "user_input";
12
10
  task_request: "task_request";
11
+ final_answer: "final_answer";
13
12
  tool_code: "tool_code";
14
13
  task_completion: "task_completion";
14
+ tool_output: "tool_output";
15
15
  }>;
16
16
  type AgentSpecMessageType = z.infer<typeof AgentSpecMessageType>;
17
17
  declare const AgentSpecBudgetPolicy: z.ZodObject<{
@@ -22,9 +22,9 @@ declare const AgentSpecBudgetPolicy: z.ZodObject<{
22
22
  type AgentSpecBudgetPolicy = z.infer<typeof AgentSpecBudgetPolicy>;
23
23
  declare const AgentSpecToolHistoryPolicy: z.ZodObject<{
24
24
  strategy: z.ZodOptional<z.ZodEnum<{
25
- none: "none";
26
25
  "per-pair": "per-pair";
27
26
  "per-run": "per-run";
27
+ none: "none";
28
28
  }>>;
29
29
  retentionMode: z.ZodOptional<z.ZodEnum<{
30
30
  drop: "drop";
@@ -71,16 +71,16 @@ declare const AgentSpecMustKeepTruncationRule: z.ZodObject<{
71
71
  type AgentSpecMustKeepTruncationRule = z.infer<typeof AgentSpecMustKeepTruncationRule>;
72
72
  declare const AgentSpecMustKeepPolicy: z.ZodObject<{
73
73
  alwaysKeepTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
74
- user_input: "user_input";
75
74
  tool_calls: "tool_calls";
76
- tool_output: "tool_output";
77
- final_answer: "final_answer";
78
- history_summary: "history_summary";
79
75
  system_prompt: "system_prompt";
76
+ history_summary: "history_summary";
80
77
  context_injection: "context_injection";
78
+ user_input: "user_input";
81
79
  task_request: "task_request";
80
+ final_answer: "final_answer";
82
81
  tool_code: "tool_code";
83
82
  task_completion: "task_completion";
83
+ tool_output: "tool_output";
84
84
  }>>>;
85
85
  alwaysKeepFenceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
86
  truncationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -185,9 +185,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
185
185
  }, z.core.$strip>>;
186
186
  toolHistory: z.ZodOptional<z.ZodObject<{
187
187
  strategy: z.ZodOptional<z.ZodEnum<{
188
- none: "none";
189
188
  "per-pair": "per-pair";
190
189
  "per-run": "per-run";
190
+ none: "none";
191
191
  }>>;
192
192
  retentionMode: z.ZodOptional<z.ZodEnum<{
193
193
  drop: "drop";
@@ -218,16 +218,16 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
218
218
  }, z.core.$strip>>;
219
219
  mustKeep: z.ZodOptional<z.ZodObject<{
220
220
  alwaysKeepTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
221
- user_input: "user_input";
222
221
  tool_calls: "tool_calls";
223
- tool_output: "tool_output";
224
- final_answer: "final_answer";
225
- history_summary: "history_summary";
226
222
  system_prompt: "system_prompt";
223
+ history_summary: "history_summary";
227
224
  context_injection: "context_injection";
225
+ user_input: "user_input";
228
226
  task_request: "task_request";
227
+ final_answer: "final_answer";
229
228
  tool_code: "tool_code";
230
229
  task_completion: "task_completion";
230
+ tool_output: "tool_output";
231
231
  }>>>;
232
232
  alwaysKeepFenceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
233
233
  truncationRules: z.ZodOptional<z.ZodArray<z.ZodObject<{