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