@linnlabs/linnkit 0.37.0 → 0.37.1

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 +11 -0
  2. package/dist/cli.cjs +13 -1
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +13 -1
  5. package/dist/cli.js.map +1 -1
  6. package/dist/contracts/agentSpec.d.cts +30 -30
  7. package/dist/contracts/agentSpec.d.ts +30 -30
  8. package/dist/contracts/audit.d.cts +32 -32
  9. package/dist/contracts/audit.d.ts +32 -32
  10. package/dist/contracts/contextPolicy.d.cts +36 -36
  11. package/dist/contracts/contextPolicy.d.ts +36 -36
  12. package/dist/contracts/events.d.cts +1114 -1114
  13. package/dist/contracts/events.d.ts +1114 -1114
  14. package/dist/contracts/execution.d.cts +8 -8
  15. package/dist/contracts/execution.d.ts +8 -8
  16. package/dist/contracts/messages.d.cts +1178 -1178
  17. package/dist/contracts/messages.d.ts +1178 -1178
  18. package/dist/contracts/provider-continuation.d.cts +28 -28
  19. package/dist/contracts/provider-continuation.d.ts +28 -28
  20. package/dist/contracts/sse.d.cts +899 -899
  21. package/dist/contracts/sse.d.ts +899 -899
  22. package/dist/contracts/sub-run-trace-payload.d.cts +26 -26
  23. package/dist/contracts/sub-run-trace-payload.d.ts +26 -26
  24. package/dist/contracts/token-accounting.d.cts +38 -38
  25. package/dist/contracts/token-accounting.d.ts +38 -38
  26. package/dist/index.cjs +13 -1
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +13 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/quickstart.cjs +13 -1
  31. package/dist/quickstart.cjs.map +1 -1
  32. package/dist/quickstart.js +13 -1
  33. package/dist/quickstart.js.map +1 -1
  34. package/dist/runtime-kernel/events/agentEvents.d.cts +172 -172
  35. package/dist/runtime-kernel/events/agentEvents.d.ts +172 -172
  36. package/dist/runtime-kernel.cjs +13 -1
  37. package/dist/runtime-kernel.cjs.map +1 -1
  38. package/dist/runtime-kernel.js +13 -1
  39. package/dist/runtime-kernel.js.map +1 -1
  40. package/dist/testkit.cjs +13 -1
  41. package/dist/testkit.cjs.map +1 -1
  42. package/dist/testkit.js +13 -1
  43. package/dist/testkit.js.map +1 -1
  44. package/docs/README.md +1 -1
  45. package/docs/integration/persistence.md +10 -0
  46. package/docs/integration/tools.md +12 -0
  47. package/package.json +2 -2
@@ -25,14 +25,14 @@ declare const AgentSpecToolHistoryPolicy: z.ZodObject<{
25
25
  maxInteractionGroups: z.ZodOptional<z.ZodNumber>;
26
26
  overflowStrategy: z.ZodOptional<z.ZodEnum<["keep-latest", "fail-fast"]>>;
27
27
  }, "strip", z.ZodTypeAny, {
28
- strategy?: "per-pair" | "per-run" | "none" | undefined;
28
+ strategy?: "none" | "per-pair" | "per-run" | undefined;
29
29
  retentionMode?: "drop" | "compress" | undefined;
30
30
  keepLatestToolPairs?: number | undefined;
31
31
  keepLatestRuns?: number | undefined;
32
32
  maxInteractionGroups?: number | undefined;
33
33
  overflowStrategy?: "keep-latest" | "fail-fast" | undefined;
34
34
  }, {
35
- strategy?: "per-pair" | "per-run" | "none" | undefined;
35
+ strategy?: "none" | "per-pair" | "per-run" | undefined;
36
36
  retentionMode?: "drop" | "compress" | undefined;
37
37
  keepLatestToolPairs?: number | undefined;
38
38
  keepLatestRuns?: number | undefined;
@@ -151,7 +151,7 @@ declare const AgentSpecMustKeepPolicy: z.ZodObject<{
151
151
  strategyName: string;
152
152
  }>, "many">>;
153
153
  }, "strip", z.ZodTypeAny, {
154
- alwaysKeepTypes?: ("tool_calls" | "system_prompt" | "history_summary" | "context_injection" | "user_input" | "context_before" | "context_after" | "document_fragment" | "task_request" | "final_answer" | "tool_code" | "task_completion" | "tool_output")[] | undefined;
154
+ alwaysKeepTypes?: ("user_input" | "tool_calls" | "tool_output" | "final_answer" | "history_summary" | "system_prompt" | "context_injection" | "context_before" | "context_after" | "document_fragment" | "task_request" | "tool_code" | "task_completion")[] | undefined;
155
155
  alwaysKeepFenceKinds?: string[] | undefined;
156
156
  truncationRules?: {
157
157
  fenceKind: string;
@@ -159,7 +159,7 @@ declare const AgentSpecMustKeepPolicy: z.ZodObject<{
159
159
  strategyName: string;
160
160
  }[] | undefined;
161
161
  }, {
162
- alwaysKeepTypes?: ("tool_calls" | "system_prompt" | "history_summary" | "context_injection" | "user_input" | "context_before" | "context_after" | "document_fragment" | "task_request" | "final_answer" | "tool_code" | "task_completion" | "tool_output")[] | undefined;
162
+ alwaysKeepTypes?: ("user_input" | "tool_calls" | "tool_output" | "final_answer" | "history_summary" | "system_prompt" | "context_injection" | "context_before" | "context_after" | "document_fragment" | "task_request" | "tool_code" | "task_completion")[] | undefined;
163
163
  alwaysKeepFenceKinds?: string[] | undefined;
164
164
  truncationRules?: {
165
165
  fenceKind: string;
@@ -259,18 +259,18 @@ declare const AgentSpecSystemReminderTrigger: z.ZodObject<{
259
259
  }, "strip", z.ZodTypeAny, {
260
260
  kind: string;
261
261
  value?: string | number | boolean | undefined;
262
+ toolName?: string | undefined;
262
263
  threshold?: number | undefined;
263
264
  moduloStep?: boolean | undefined;
264
- toolName?: string | undefined;
265
265
  period?: number | undefined;
266
266
  minStep?: number | undefined;
267
267
  config?: Record<string, SerializableJsonValue> | undefined;
268
268
  }, {
269
269
  kind: string;
270
270
  value?: string | number | boolean | undefined;
271
+ toolName?: string | undefined;
271
272
  threshold?: number | undefined;
272
273
  moduloStep?: boolean | undefined;
273
- toolName?: string | undefined;
274
274
  period?: number | undefined;
275
275
  minStep?: number | undefined;
276
276
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -290,18 +290,18 @@ declare const AgentSpecSystemReminderExtraRule: z.ZodObject<{
290
290
  }, "strip", z.ZodTypeAny, {
291
291
  kind: string;
292
292
  value?: string | number | boolean | undefined;
293
+ toolName?: string | undefined;
293
294
  threshold?: number | undefined;
294
295
  moduloStep?: boolean | undefined;
295
- toolName?: string | undefined;
296
296
  period?: number | undefined;
297
297
  minStep?: number | undefined;
298
298
  config?: Record<string, SerializableJsonValue> | undefined;
299
299
  }, {
300
300
  kind: string;
301
301
  value?: string | number | boolean | undefined;
302
+ toolName?: string | undefined;
302
303
  threshold?: number | undefined;
303
304
  moduloStep?: boolean | undefined;
304
- toolName?: string | undefined;
305
305
  period?: number | undefined;
306
306
  minStep?: number | undefined;
307
307
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -313,9 +313,9 @@ declare const AgentSpecSystemReminderExtraRule: z.ZodObject<{
313
313
  trigger: {
314
314
  kind: string;
315
315
  value?: string | number | boolean | undefined;
316
+ toolName?: string | undefined;
316
317
  threshold?: number | undefined;
317
318
  moduloStep?: boolean | undefined;
318
- toolName?: string | undefined;
319
319
  period?: number | undefined;
320
320
  minStep?: number | undefined;
321
321
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -327,9 +327,9 @@ declare const AgentSpecSystemReminderExtraRule: z.ZodObject<{
327
327
  trigger: {
328
328
  kind: string;
329
329
  value?: string | number | boolean | undefined;
330
+ toolName?: string | undefined;
330
331
  threshold?: number | undefined;
331
332
  moduloStep?: boolean | undefined;
332
- toolName?: string | undefined;
333
333
  period?: number | undefined;
334
334
  minStep?: number | undefined;
335
335
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -368,18 +368,18 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
368
368
  }, "strip", z.ZodTypeAny, {
369
369
  kind: string;
370
370
  value?: string | number | boolean | undefined;
371
+ toolName?: string | undefined;
371
372
  threshold?: number | undefined;
372
373
  moduloStep?: boolean | undefined;
373
- toolName?: string | undefined;
374
374
  period?: number | undefined;
375
375
  minStep?: number | undefined;
376
376
  config?: Record<string, SerializableJsonValue> | undefined;
377
377
  }, {
378
378
  kind: string;
379
379
  value?: string | number | boolean | undefined;
380
+ toolName?: string | undefined;
380
381
  threshold?: number | undefined;
381
382
  moduloStep?: boolean | undefined;
382
- toolName?: string | undefined;
383
383
  period?: number | undefined;
384
384
  minStep?: number | undefined;
385
385
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -391,9 +391,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
391
391
  trigger: {
392
392
  kind: string;
393
393
  value?: string | number | boolean | undefined;
394
+ toolName?: string | undefined;
394
395
  threshold?: number | undefined;
395
396
  moduloStep?: boolean | undefined;
396
- toolName?: string | undefined;
397
397
  period?: number | undefined;
398
398
  minStep?: number | undefined;
399
399
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -405,9 +405,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
405
405
  trigger: {
406
406
  kind: string;
407
407
  value?: string | number | boolean | undefined;
408
+ toolName?: string | undefined;
408
409
  threshold?: number | undefined;
409
410
  moduloStep?: boolean | undefined;
410
- toolName?: string | undefined;
411
411
  period?: number | undefined;
412
412
  minStep?: number | undefined;
413
413
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -428,9 +428,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
428
428
  trigger: {
429
429
  kind: string;
430
430
  value?: string | number | boolean | undefined;
431
+ toolName?: string | undefined;
431
432
  threshold?: number | undefined;
432
433
  moduloStep?: boolean | undefined;
433
- toolName?: string | undefined;
434
434
  period?: number | undefined;
435
435
  minStep?: number | undefined;
436
436
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -451,9 +451,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
451
451
  trigger: {
452
452
  kind: string;
453
453
  value?: string | number | boolean | undefined;
454
+ toolName?: string | undefined;
454
455
  threshold?: number | undefined;
455
456
  moduloStep?: boolean | undefined;
456
- toolName?: string | undefined;
457
457
  period?: number | undefined;
458
458
  minStep?: number | undefined;
459
459
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -474,9 +474,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
474
474
  trigger: {
475
475
  kind: string;
476
476
  value?: string | number | boolean | undefined;
477
+ toolName?: string | undefined;
477
478
  threshold?: number | undefined;
478
479
  moduloStep?: boolean | undefined;
479
- toolName?: string | undefined;
480
480
  period?: number | undefined;
481
481
  minStep?: number | undefined;
482
482
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -497,9 +497,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
497
497
  trigger: {
498
498
  kind: string;
499
499
  value?: string | number | boolean | undefined;
500
+ toolName?: string | undefined;
500
501
  threshold?: number | undefined;
501
502
  moduloStep?: boolean | undefined;
502
- toolName?: string | undefined;
503
503
  period?: number | undefined;
504
504
  minStep?: number | undefined;
505
505
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -549,14 +549,14 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
549
549
  maxInteractionGroups: z.ZodOptional<z.ZodNumber>;
550
550
  overflowStrategy: z.ZodOptional<z.ZodEnum<["keep-latest", "fail-fast"]>>;
551
551
  }, "strip", z.ZodTypeAny, {
552
- strategy?: "per-pair" | "per-run" | "none" | undefined;
552
+ strategy?: "none" | "per-pair" | "per-run" | undefined;
553
553
  retentionMode?: "drop" | "compress" | undefined;
554
554
  keepLatestToolPairs?: number | undefined;
555
555
  keepLatestRuns?: number | undefined;
556
556
  maxInteractionGroups?: number | undefined;
557
557
  overflowStrategy?: "keep-latest" | "fail-fast" | undefined;
558
558
  }, {
559
- strategy?: "per-pair" | "per-run" | "none" | undefined;
559
+ strategy?: "none" | "per-pair" | "per-run" | undefined;
560
560
  retentionMode?: "drop" | "compress" | undefined;
561
561
  keepLatestToolPairs?: number | undefined;
562
562
  keepLatestRuns?: number | undefined;
@@ -643,7 +643,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
643
643
  strategyName: string;
644
644
  }>, "many">>;
645
645
  }, "strip", z.ZodTypeAny, {
646
- alwaysKeepTypes?: ("tool_calls" | "system_prompt" | "history_summary" | "context_injection" | "user_input" | "context_before" | "context_after" | "document_fragment" | "task_request" | "final_answer" | "tool_code" | "task_completion" | "tool_output")[] | undefined;
646
+ alwaysKeepTypes?: ("user_input" | "tool_calls" | "tool_output" | "final_answer" | "history_summary" | "system_prompt" | "context_injection" | "context_before" | "context_after" | "document_fragment" | "task_request" | "tool_code" | "task_completion")[] | undefined;
647
647
  alwaysKeepFenceKinds?: string[] | undefined;
648
648
  truncationRules?: {
649
649
  fenceKind: string;
@@ -651,7 +651,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
651
651
  strategyName: string;
652
652
  }[] | undefined;
653
653
  }, {
654
- alwaysKeepTypes?: ("tool_calls" | "system_prompt" | "history_summary" | "context_injection" | "user_input" | "context_before" | "context_after" | "document_fragment" | "task_request" | "final_answer" | "tool_code" | "task_completion" | "tool_output")[] | undefined;
654
+ alwaysKeepTypes?: ("user_input" | "tool_calls" | "tool_output" | "final_answer" | "history_summary" | "system_prompt" | "context_injection" | "context_before" | "context_after" | "document_fragment" | "task_request" | "tool_code" | "task_completion")[] | undefined;
655
655
  alwaysKeepFenceKinds?: string[] | undefined;
656
656
  truncationRules?: {
657
657
  fenceKind: string;
@@ -765,18 +765,18 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
765
765
  }, "strip", z.ZodTypeAny, {
766
766
  kind: string;
767
767
  value?: string | number | boolean | undefined;
768
+ toolName?: string | undefined;
768
769
  threshold?: number | undefined;
769
770
  moduloStep?: boolean | undefined;
770
- toolName?: string | undefined;
771
771
  period?: number | undefined;
772
772
  minStep?: number | undefined;
773
773
  config?: Record<string, SerializableJsonValue> | undefined;
774
774
  }, {
775
775
  kind: string;
776
776
  value?: string | number | boolean | undefined;
777
+ toolName?: string | undefined;
777
778
  threshold?: number | undefined;
778
779
  moduloStep?: boolean | undefined;
779
- toolName?: string | undefined;
780
780
  period?: number | undefined;
781
781
  minStep?: number | undefined;
782
782
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -788,9 +788,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
788
788
  trigger: {
789
789
  kind: string;
790
790
  value?: string | number | boolean | undefined;
791
+ toolName?: string | undefined;
791
792
  threshold?: number | undefined;
792
793
  moduloStep?: boolean | undefined;
793
- toolName?: string | undefined;
794
794
  period?: number | undefined;
795
795
  minStep?: number | undefined;
796
796
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -802,9 +802,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
802
802
  trigger: {
803
803
  kind: string;
804
804
  value?: string | number | boolean | undefined;
805
+ toolName?: string | undefined;
805
806
  threshold?: number | undefined;
806
807
  moduloStep?: boolean | undefined;
807
- toolName?: string | undefined;
808
808
  period?: number | undefined;
809
809
  minStep?: number | undefined;
810
810
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -825,9 +825,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
825
825
  trigger: {
826
826
  kind: string;
827
827
  value?: string | number | boolean | undefined;
828
+ toolName?: string | undefined;
828
829
  threshold?: number | undefined;
829
830
  moduloStep?: boolean | undefined;
830
- toolName?: string | undefined;
831
831
  period?: number | undefined;
832
832
  minStep?: number | undefined;
833
833
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -848,9 +848,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
848
848
  trigger: {
849
849
  kind: string;
850
850
  value?: string | number | boolean | undefined;
851
+ toolName?: string | undefined;
851
852
  threshold?: number | undefined;
852
853
  moduloStep?: boolean | undefined;
853
- toolName?: string | undefined;
854
854
  period?: number | undefined;
855
855
  minStep?: number | undefined;
856
856
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -871,9 +871,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
871
871
  trigger: {
872
872
  kind: string;
873
873
  value?: string | number | boolean | undefined;
874
+ toolName?: string | undefined;
874
875
  threshold?: number | undefined;
875
876
  moduloStep?: boolean | undefined;
876
- toolName?: string | undefined;
877
877
  period?: number | undefined;
878
878
  minStep?: number | undefined;
879
879
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -894,9 +894,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
894
894
  trigger: {
895
895
  kind: string;
896
896
  value?: string | number | boolean | undefined;
897
+ toolName?: string | undefined;
897
898
  threshold?: number | undefined;
898
899
  moduloStep?: boolean | undefined;
899
- toolName?: string | undefined;
900
900
  period?: number | undefined;
901
901
  minStep?: number | undefined;
902
902
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -929,7 +929,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
929
929
  workingMemoryBudgetPercentage?: number | undefined;
930
930
  } | undefined;
931
931
  toolHistory?: {
932
- strategy?: "per-pair" | "per-run" | "none" | undefined;
932
+ strategy?: "none" | "per-pair" | "per-run" | undefined;
933
933
  retentionMode?: "drop" | "compress" | undefined;
934
934
  keepLatestToolPairs?: number | undefined;
935
935
  keepLatestRuns?: number | undefined;
@@ -952,7 +952,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
952
952
  maxCompactionsPerRun?: number | undefined;
953
953
  } | undefined;
954
954
  mustKeep?: {
955
- alwaysKeepTypes?: ("tool_calls" | "system_prompt" | "history_summary" | "context_injection" | "user_input" | "context_before" | "context_after" | "document_fragment" | "task_request" | "final_answer" | "tool_code" | "task_completion" | "tool_output")[] | undefined;
955
+ alwaysKeepTypes?: ("user_input" | "tool_calls" | "tool_output" | "final_answer" | "history_summary" | "system_prompt" | "context_injection" | "context_before" | "context_after" | "document_fragment" | "task_request" | "tool_code" | "task_completion")[] | undefined;
956
956
  alwaysKeepFenceKinds?: string[] | undefined;
957
957
  truncationRules?: {
958
958
  fenceKind: string;
@@ -994,9 +994,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
994
994
  trigger: {
995
995
  kind: string;
996
996
  value?: string | number | boolean | undefined;
997
+ toolName?: string | undefined;
997
998
  threshold?: number | undefined;
998
999
  moduloStep?: boolean | undefined;
999
- toolName?: string | undefined;
1000
1000
  period?: number | undefined;
1001
1001
  minStep?: number | undefined;
1002
1002
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -1019,7 +1019,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
1019
1019
  workingMemoryBudgetPercentage?: number | undefined;
1020
1020
  } | undefined;
1021
1021
  toolHistory?: {
1022
- strategy?: "per-pair" | "per-run" | "none" | undefined;
1022
+ strategy?: "none" | "per-pair" | "per-run" | undefined;
1023
1023
  retentionMode?: "drop" | "compress" | undefined;
1024
1024
  keepLatestToolPairs?: number | undefined;
1025
1025
  keepLatestRuns?: number | undefined;
@@ -1042,7 +1042,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
1042
1042
  maxCompactionsPerRun?: number | undefined;
1043
1043
  } | undefined;
1044
1044
  mustKeep?: {
1045
- alwaysKeepTypes?: ("tool_calls" | "system_prompt" | "history_summary" | "context_injection" | "user_input" | "context_before" | "context_after" | "document_fragment" | "task_request" | "final_answer" | "tool_code" | "task_completion" | "tool_output")[] | undefined;
1045
+ alwaysKeepTypes?: ("user_input" | "tool_calls" | "tool_output" | "final_answer" | "history_summary" | "system_prompt" | "context_injection" | "context_before" | "context_after" | "document_fragment" | "task_request" | "tool_code" | "task_completion")[] | undefined;
1046
1046
  alwaysKeepFenceKinds?: string[] | undefined;
1047
1047
  truncationRules?: {
1048
1048
  fenceKind: string;
@@ -1084,9 +1084,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
1084
1084
  trigger: {
1085
1085
  kind: string;
1086
1086
  value?: string | number | boolean | undefined;
1087
+ toolName?: string | undefined;
1087
1088
  threshold?: number | undefined;
1088
1089
  moduloStep?: boolean | undefined;
1089
- toolName?: string | undefined;
1090
1090
  period?: number | undefined;
1091
1091
  minStep?: number | undefined;
1092
1092
  config?: Record<string, SerializableJsonValue> | undefined;