@linnlabs/linnkit 0.33.0 → 0.35.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 (43) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cli.cjs +155 -28
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +155 -28
  5. package/dist/cli.js.map +1 -1
  6. package/dist/context-manager.cjs +54 -0
  7. package/dist/context-manager.cjs.map +1 -1
  8. package/dist/context-manager.js +54 -0
  9. package/dist/context-manager.js.map +1 -1
  10. package/dist/index.cjs +175 -43
  11. package/dist/index.cjs.map +1 -1
  12. package/dist/index.js +175 -43
  13. package/dist/index.js.map +1 -1
  14. package/dist/quickstart.cjs +155 -28
  15. package/dist/quickstart.cjs.map +1 -1
  16. package/dist/quickstart.js +155 -28
  17. package/dist/quickstart.js.map +1 -1
  18. package/dist/runtime-kernel/child-runs/childRunInvoker.d.cts +5 -0
  19. package/dist/runtime-kernel/child-runs/childRunInvoker.d.ts +5 -0
  20. package/dist/runtime-kernel/graph-engine/functions/parseEngineCheckpoint.d.cts +6 -0
  21. package/dist/runtime-kernel/graph-engine/functions/parseEngineCheckpoint.d.ts +6 -0
  22. package/dist/runtime-kernel/graph-engine/index.d.cts +1 -0
  23. package/dist/runtime-kernel/graph-engine/index.d.ts +1 -0
  24. package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.cts +22 -4
  25. package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.ts +22 -4
  26. package/dist/runtime-kernel/run-supervisor/index.d.cts +1 -1
  27. package/dist/runtime-kernel/run-supervisor/index.d.ts +1 -1
  28. package/dist/runtime-kernel/run-supervisor/runSupervisor.d.cts +2 -1
  29. package/dist/runtime-kernel/run-supervisor/runSupervisor.d.ts +2 -1
  30. package/dist/runtime-kernel.cjs +172 -40
  31. package/dist/runtime-kernel.cjs.map +1 -1
  32. package/dist/runtime-kernel.d.cts +1 -0
  33. package/dist/runtime-kernel.d.ts +1 -0
  34. package/dist/runtime-kernel.js +172 -41
  35. package/dist/runtime-kernel.js.map +1 -1
  36. package/dist/testkit.cjs +172 -40
  37. package/dist/testkit.cjs.map +1 -1
  38. package/dist/testkit.js +172 -40
  39. package/dist/testkit.js.map +1 -1
  40. package/docs/integration/child-runs.md +8 -0
  41. package/docs/integration/persistence.md +1 -0
  42. package/docs/integration/run-supervisor.md +3 -0
  43. package/package.json +2 -2
@@ -6432,6 +6432,9 @@ function createDefaultAgentPreprocessorPipeline(context = {}, options = {}) {
6432
6432
  const registry = createDefaultAgentPreprocessorRegistry(options);
6433
6433
  return new PreprocessorPipeline(registry, context);
6434
6434
  }
6435
+
6436
+ // src/runtime-kernel/graph-engine/types.ts
6437
+ var ENGINE_STATE_SCHEMA_VERSION = 1;
6435
6438
  new async_hooks.AsyncLocalStorage();
6436
6439
 
6437
6440
  // src/runtime-kernel/graph-engine/tick-pipeline/runTickPipeline.ts
@@ -7480,6 +7483,57 @@ function findLatestProgressAnswer(events) {
7480
7483
  }
7481
7484
  return void 0;
7482
7485
  }
7486
+ var counter = zod.z.number().int().nonnegative();
7487
+ var executor = zod.z.object({
7488
+ stepCount: counter,
7489
+ phase: zod.z.string().optional(),
7490
+ maxSteps: counter.optional(),
7491
+ remainingSteps: zod.z.number().int().optional(),
7492
+ finalStepPolicy: zod.z.enum(["final_answer", "force_tools"]).optional(),
7493
+ finalStepForcedTools: zod.z.array(zod.z.string()).optional(),
7494
+ lastStepsHintThreshold: counter.optional(),
7495
+ systemReminderPolicy: AgentSpecSystemReminderPolicy.optional(),
7496
+ toolObservationPolicy: AgentSpecToolObservationGovernancePolicy.optional(),
7497
+ runLockedModelId: zod.z.string().optional(),
7498
+ lastSuccessfulLlmModelId: zod.z.string().optional(),
7499
+ llmInvocationKind: zod.z.enum(["user_initiated", "continuation"]).optional(),
7500
+ llmInvocationCount: counter.optional(),
7501
+ lockRequestedModelId: zod.z.boolean().optional(),
7502
+ contextCompaction: zod.z.object({
7503
+ attemptCount: counter,
7504
+ committedCount: counter,
7505
+ lastCommittedFingerprint: zod.z.string().optional()
7506
+ }).strict().optional()
7507
+ }).strict();
7508
+ zod.z.object({
7509
+ nodeId: zod.z.string().min(1),
7510
+ schemaVersion: zod.z.literal(ENGINE_STATE_SCHEMA_VERSION).optional(),
7511
+ revision: counter.optional(),
7512
+ executionStatus: zod.z.enum(["ready", "executing", "yielded", "awaiting_user"]).optional(),
7513
+ local: zod.z.object({
7514
+ runId: RunIdSchema.optional(),
7515
+ parentRunId: RunIdSchema.optional(),
7516
+ conversationId: zod.z.string().optional(),
7517
+ turnId: zod.z.string().optional(),
7518
+ request: SerializableJsonRecord.optional(),
7519
+ history: zod.z.array(RuntimeEvent).optional(),
7520
+ newEvents: zod.z.array(RuntimeEvent).optional(),
7521
+ executorLocal: executor.optional(),
7522
+ pendingToolCalls: zod.z.array(zod.z.object({
7523
+ id: ToolCallIdSchema,
7524
+ type: zod.z.literal("function"),
7525
+ function: zod.z.object({ name: zod.z.string().min(1), arguments: zod.z.string() }).strict()
7526
+ }).strict()).optional(),
7527
+ executingToolCallId: ToolCallIdSchema.optional(),
7528
+ toolBatchCompletionMode: zod.z.enum(["continue_to_llm", "yield_after_batch"]).optional(),
7529
+ pendingInteractionSpec: SerializableJsonRecord.optional(),
7530
+ lastToolResult: SerializableJsonRecord.optional(),
7531
+ finalAnswer: zod.z.string().optional(),
7532
+ answerId: zod.z.string().optional(),
7533
+ chunkSeq: counter.optional(),
7534
+ contextUsage: ContextUsageSnapshot.optional()
7535
+ }).passthrough().optional()
7536
+ }).strict();
7483
7537
 
7484
7538
  // src/runtime-kernel/audit/consoleAudit.ts
7485
7539
  function createConsoleAudit(options = {}) {