@linnlabs/linnkit 0.37.4 → 0.37.5

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 (45) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cli.cjs +1 -1
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +1 -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 +1113 -1113
  13. package/dist/contracts/events.d.ts +1113 -1113
  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 +897 -897
  21. package/dist/contracts/sse.d.ts +897 -897
  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 +1 -1
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/quickstart.cjs +1 -1
  31. package/dist/quickstart.cjs.map +1 -1
  32. package/dist/quickstart.js +1 -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 +1 -1
  37. package/dist/runtime-kernel.cjs.map +1 -1
  38. package/dist/runtime-kernel.js +1 -1
  39. package/dist/runtime-kernel.js.map +1 -1
  40. package/dist/testkit.cjs +1 -1
  41. package/dist/testkit.cjs.map +1 -1
  42. package/dist/testkit.js +1 -1
  43. package/dist/testkit.js.map +1 -1
  44. package/docs/integration/llm-provider.md +5 -0
  45. 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?: "none" | "per-pair" | "per-run" | undefined;
28
+ strategy?: "per-pair" | "per-run" | "none" | 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?: "none" | "per-pair" | "per-run" | undefined;
35
+ strategy?: "per-pair" | "per-run" | "none" | 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?: ("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;
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;
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?: ("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;
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;
163
163
  alwaysKeepFenceKinds?: string[] | undefined;
164
164
  truncationRules?: {
165
165
  fenceKind: string;
@@ -260,18 +260,18 @@ declare const AgentSpecSystemReminderTrigger: z.ZodObject<{
260
260
  }, "strip", z.ZodTypeAny, {
261
261
  kind: string;
262
262
  value?: string | number | boolean | undefined;
263
- toolName?: string | undefined;
264
263
  threshold?: number | undefined;
265
264
  moduloStep?: boolean | undefined;
265
+ toolName?: string | undefined;
266
266
  period?: number | undefined;
267
267
  minStep?: number | undefined;
268
268
  config?: Record<string, SerializableJsonValue> | undefined;
269
269
  }, {
270
270
  kind: string;
271
271
  value?: string | number | boolean | undefined;
272
- toolName?: string | undefined;
273
272
  threshold?: number | undefined;
274
273
  moduloStep?: boolean | undefined;
274
+ toolName?: string | undefined;
275
275
  period?: number | undefined;
276
276
  minStep?: number | undefined;
277
277
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -291,18 +291,18 @@ declare const AgentSpecSystemReminderExtraRule: z.ZodObject<{
291
291
  }, "strip", z.ZodTypeAny, {
292
292
  kind: string;
293
293
  value?: string | number | boolean | undefined;
294
- toolName?: string | undefined;
295
294
  threshold?: number | undefined;
296
295
  moduloStep?: boolean | undefined;
296
+ toolName?: string | undefined;
297
297
  period?: number | undefined;
298
298
  minStep?: number | undefined;
299
299
  config?: Record<string, SerializableJsonValue> | undefined;
300
300
  }, {
301
301
  kind: string;
302
302
  value?: string | number | boolean | undefined;
303
- toolName?: string | undefined;
304
303
  threshold?: number | undefined;
305
304
  moduloStep?: boolean | undefined;
305
+ toolName?: string | undefined;
306
306
  period?: number | undefined;
307
307
  minStep?: number | undefined;
308
308
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -314,9 +314,9 @@ declare const AgentSpecSystemReminderExtraRule: z.ZodObject<{
314
314
  trigger: {
315
315
  kind: string;
316
316
  value?: string | number | boolean | undefined;
317
- toolName?: string | undefined;
318
317
  threshold?: number | undefined;
319
318
  moduloStep?: boolean | undefined;
319
+ toolName?: string | undefined;
320
320
  period?: number | undefined;
321
321
  minStep?: number | undefined;
322
322
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -328,9 +328,9 @@ declare const AgentSpecSystemReminderExtraRule: z.ZodObject<{
328
328
  trigger: {
329
329
  kind: string;
330
330
  value?: string | number | boolean | undefined;
331
- toolName?: string | undefined;
332
331
  threshold?: number | undefined;
333
332
  moduloStep?: boolean | undefined;
333
+ toolName?: string | undefined;
334
334
  period?: number | undefined;
335
335
  minStep?: number | undefined;
336
336
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -369,18 +369,18 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
369
369
  }, "strip", z.ZodTypeAny, {
370
370
  kind: string;
371
371
  value?: string | number | boolean | undefined;
372
- toolName?: string | undefined;
373
372
  threshold?: number | undefined;
374
373
  moduloStep?: boolean | undefined;
374
+ toolName?: string | undefined;
375
375
  period?: number | undefined;
376
376
  minStep?: number | undefined;
377
377
  config?: Record<string, SerializableJsonValue> | undefined;
378
378
  }, {
379
379
  kind: string;
380
380
  value?: string | number | boolean | undefined;
381
- toolName?: string | undefined;
382
381
  threshold?: number | undefined;
383
382
  moduloStep?: boolean | undefined;
383
+ toolName?: string | undefined;
384
384
  period?: number | undefined;
385
385
  minStep?: number | undefined;
386
386
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -392,9 +392,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
392
392
  trigger: {
393
393
  kind: string;
394
394
  value?: string | number | boolean | undefined;
395
- toolName?: string | undefined;
396
395
  threshold?: number | undefined;
397
396
  moduloStep?: boolean | undefined;
397
+ toolName?: string | undefined;
398
398
  period?: number | undefined;
399
399
  minStep?: number | undefined;
400
400
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -406,9 +406,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
406
406
  trigger: {
407
407
  kind: string;
408
408
  value?: string | number | boolean | undefined;
409
- toolName?: string | undefined;
410
409
  threshold?: number | undefined;
411
410
  moduloStep?: boolean | undefined;
411
+ toolName?: string | undefined;
412
412
  period?: number | undefined;
413
413
  minStep?: number | undefined;
414
414
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -429,9 +429,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
429
429
  trigger: {
430
430
  kind: string;
431
431
  value?: string | number | boolean | undefined;
432
- toolName?: string | undefined;
433
432
  threshold?: number | undefined;
434
433
  moduloStep?: boolean | undefined;
434
+ toolName?: string | undefined;
435
435
  period?: number | undefined;
436
436
  minStep?: number | undefined;
437
437
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -452,9 +452,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
452
452
  trigger: {
453
453
  kind: string;
454
454
  value?: string | number | boolean | undefined;
455
- toolName?: string | undefined;
456
455
  threshold?: number | undefined;
457
456
  moduloStep?: boolean | undefined;
457
+ toolName?: string | undefined;
458
458
  period?: number | undefined;
459
459
  minStep?: number | undefined;
460
460
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -475,9 +475,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
475
475
  trigger: {
476
476
  kind: string;
477
477
  value?: string | number | boolean | undefined;
478
- toolName?: string | undefined;
479
478
  threshold?: number | undefined;
480
479
  moduloStep?: boolean | undefined;
480
+ toolName?: string | undefined;
481
481
  period?: number | undefined;
482
482
  minStep?: number | undefined;
483
483
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -498,9 +498,9 @@ declare const AgentSpecSystemReminderPolicy: z.ZodEffects<z.ZodObject<{
498
498
  trigger: {
499
499
  kind: string;
500
500
  value?: string | number | boolean | undefined;
501
- toolName?: string | undefined;
502
501
  threshold?: number | undefined;
503
502
  moduloStep?: boolean | undefined;
503
+ toolName?: string | undefined;
504
504
  period?: number | undefined;
505
505
  minStep?: number | undefined;
506
506
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -550,14 +550,14 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
550
550
  maxInteractionGroups: z.ZodOptional<z.ZodNumber>;
551
551
  overflowStrategy: z.ZodOptional<z.ZodEnum<["keep-latest", "fail-fast"]>>;
552
552
  }, "strip", z.ZodTypeAny, {
553
- strategy?: "none" | "per-pair" | "per-run" | undefined;
553
+ strategy?: "per-pair" | "per-run" | "none" | undefined;
554
554
  retentionMode?: "drop" | "compress" | undefined;
555
555
  keepLatestToolPairs?: number | undefined;
556
556
  keepLatestRuns?: number | undefined;
557
557
  maxInteractionGroups?: number | undefined;
558
558
  overflowStrategy?: "keep-latest" | "fail-fast" | undefined;
559
559
  }, {
560
- strategy?: "none" | "per-pair" | "per-run" | undefined;
560
+ strategy?: "per-pair" | "per-run" | "none" | undefined;
561
561
  retentionMode?: "drop" | "compress" | undefined;
562
562
  keepLatestToolPairs?: number | undefined;
563
563
  keepLatestRuns?: number | undefined;
@@ -644,7 +644,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
644
644
  strategyName: string;
645
645
  }>, "many">>;
646
646
  }, "strip", z.ZodTypeAny, {
647
- 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
+ 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;
648
648
  alwaysKeepFenceKinds?: string[] | undefined;
649
649
  truncationRules?: {
650
650
  fenceKind: string;
@@ -652,7 +652,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
652
652
  strategyName: string;
653
653
  }[] | undefined;
654
654
  }, {
655
- 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
+ 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;
656
656
  alwaysKeepFenceKinds?: string[] | undefined;
657
657
  truncationRules?: {
658
658
  fenceKind: string;
@@ -767,18 +767,18 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
767
767
  }, "strip", z.ZodTypeAny, {
768
768
  kind: string;
769
769
  value?: string | number | boolean | undefined;
770
- toolName?: string | undefined;
771
770
  threshold?: number | undefined;
772
771
  moduloStep?: boolean | undefined;
772
+ toolName?: string | undefined;
773
773
  period?: number | undefined;
774
774
  minStep?: number | undefined;
775
775
  config?: Record<string, SerializableJsonValue> | undefined;
776
776
  }, {
777
777
  kind: string;
778
778
  value?: string | number | boolean | undefined;
779
- toolName?: string | undefined;
780
779
  threshold?: number | undefined;
781
780
  moduloStep?: boolean | undefined;
781
+ toolName?: string | undefined;
782
782
  period?: number | undefined;
783
783
  minStep?: number | undefined;
784
784
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -790,9 +790,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
790
790
  trigger: {
791
791
  kind: string;
792
792
  value?: string | number | boolean | undefined;
793
- toolName?: string | undefined;
794
793
  threshold?: number | undefined;
795
794
  moduloStep?: boolean | undefined;
795
+ toolName?: string | undefined;
796
796
  period?: number | undefined;
797
797
  minStep?: number | undefined;
798
798
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -804,9 +804,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
804
804
  trigger: {
805
805
  kind: string;
806
806
  value?: string | number | boolean | undefined;
807
- toolName?: string | undefined;
808
807
  threshold?: number | undefined;
809
808
  moduloStep?: boolean | undefined;
809
+ toolName?: string | undefined;
810
810
  period?: number | undefined;
811
811
  minStep?: number | undefined;
812
812
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -827,9 +827,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
827
827
  trigger: {
828
828
  kind: string;
829
829
  value?: string | number | boolean | undefined;
830
- toolName?: string | undefined;
831
830
  threshold?: number | undefined;
832
831
  moduloStep?: boolean | undefined;
832
+ toolName?: string | undefined;
833
833
  period?: number | undefined;
834
834
  minStep?: number | undefined;
835
835
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -850,9 +850,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
850
850
  trigger: {
851
851
  kind: string;
852
852
  value?: string | number | boolean | undefined;
853
- toolName?: string | undefined;
854
853
  threshold?: number | undefined;
855
854
  moduloStep?: boolean | undefined;
855
+ toolName?: string | undefined;
856
856
  period?: number | undefined;
857
857
  minStep?: number | undefined;
858
858
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -873,9 +873,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
873
873
  trigger: {
874
874
  kind: string;
875
875
  value?: string | number | boolean | undefined;
876
- toolName?: string | undefined;
877
876
  threshold?: number | undefined;
878
877
  moduloStep?: boolean | undefined;
878
+ toolName?: string | undefined;
879
879
  period?: number | undefined;
880
880
  minStep?: number | undefined;
881
881
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -896,9 +896,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
896
896
  trigger: {
897
897
  kind: string;
898
898
  value?: string | number | boolean | undefined;
899
- toolName?: string | undefined;
900
899
  threshold?: number | undefined;
901
900
  moduloStep?: boolean | undefined;
901
+ toolName?: string | undefined;
902
902
  period?: number | undefined;
903
903
  minStep?: number | undefined;
904
904
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -931,7 +931,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
931
931
  workingMemoryBudgetPercentage?: number | undefined;
932
932
  } | undefined;
933
933
  toolHistory?: {
934
- strategy?: "none" | "per-pair" | "per-run" | undefined;
934
+ strategy?: "per-pair" | "per-run" | "none" | undefined;
935
935
  retentionMode?: "drop" | "compress" | undefined;
936
936
  keepLatestToolPairs?: number | undefined;
937
937
  keepLatestRuns?: number | undefined;
@@ -954,7 +954,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
954
954
  maxCompactionsPerRun?: number | undefined;
955
955
  } | undefined;
956
956
  mustKeep?: {
957
- 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;
957
+ 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;
958
958
  alwaysKeepFenceKinds?: string[] | undefined;
959
959
  truncationRules?: {
960
960
  fenceKind: string;
@@ -996,9 +996,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
996
996
  trigger: {
997
997
  kind: string;
998
998
  value?: string | number | boolean | undefined;
999
- toolName?: string | undefined;
1000
999
  threshold?: number | undefined;
1001
1000
  moduloStep?: boolean | undefined;
1001
+ toolName?: string | undefined;
1002
1002
  period?: number | undefined;
1003
1003
  minStep?: number | undefined;
1004
1004
  config?: Record<string, SerializableJsonValue> | undefined;
@@ -1021,7 +1021,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
1021
1021
  workingMemoryBudgetPercentage?: number | undefined;
1022
1022
  } | undefined;
1023
1023
  toolHistory?: {
1024
- strategy?: "none" | "per-pair" | "per-run" | undefined;
1024
+ strategy?: "per-pair" | "per-run" | "none" | undefined;
1025
1025
  retentionMode?: "drop" | "compress" | undefined;
1026
1026
  keepLatestToolPairs?: number | undefined;
1027
1027
  keepLatestRuns?: number | undefined;
@@ -1044,7 +1044,7 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
1044
1044
  maxCompactionsPerRun?: number | undefined;
1045
1045
  } | undefined;
1046
1046
  mustKeep?: {
1047
- 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;
1047
+ 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;
1048
1048
  alwaysKeepFenceKinds?: string[] | undefined;
1049
1049
  truncationRules?: {
1050
1050
  fenceKind: string;
@@ -1086,9 +1086,9 @@ declare const AgentSpecContextPolicy: z.ZodObject<{
1086
1086
  trigger: {
1087
1087
  kind: string;
1088
1088
  value?: string | number | boolean | undefined;
1089
- toolName?: string | undefined;
1090
1089
  threshold?: number | undefined;
1091
1090
  moduloStep?: boolean | undefined;
1091
+ toolName?: string | undefined;
1092
1092
  period?: number | undefined;
1093
1093
  minStep?: number | undefined;
1094
1094
  config?: Record<string, SerializableJsonValue> | undefined;