@owlmeans/agent 0.1.18-rc.40 → 0.1.18-rc.41

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.
package/README.md CHANGED
@@ -84,7 +84,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
84
84
  your project's skill store (`.agents/skills/`):
85
85
 
86
86
  ```sh
87
- npx @owlmeans/agent-skills@^0.1.18-rc.41
87
+ npx @owlmeans/agent-skills@^0.1.18-rc.42
88
88
  ```
89
89
 
90
90
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/agent",
4
- "version": "0.1.18-rc.40",
5
- "generatedAt": "2026-09-28T02:06:37.884Z",
4
+ "version": "0.1.18-rc.41",
5
+ "generatedAt": "2026-09-29T08:01:58.133Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/agent
9
9
 
10
10
  **Layer:** Cross-cutting domain
11
- **Install:** `"@owlmeans/agent": "^0.1.18-rc.40"` in `dependencies`, plus the `@langchain/core` and
11
+ **Install:** `"@owlmeans/agent": "^0.1.18-rc.41"` in `dependencies`, plus the `@langchain/core` and
12
12
  `@langchain/langgraph` **peers**
13
13
 
14
14
  The agent runtime. Contracts live in `@owlmeans/agent-common`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/agent",
3
- "version": "0.1.18-rc.40",
3
+ "version": "0.1.18-rc.41",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -68,12 +68,12 @@
68
68
  "@langchain/langgraph-checkpoint": "^1.1.5"
69
69
  },
70
70
  "dependencies": {
71
- "@owlmeans/agent-common": "^0.1.18-rc.42",
71
+ "@owlmeans/agent-common": "^0.1.18-rc.43",
72
72
  "@owlmeans/basic-ids": "^0.1.18-rc.34",
73
73
  "@owlmeans/context": "^0.1.18-rc.32",
74
74
  "@owlmeans/error": "^0.1.18-rc.36",
75
- "@owlmeans/flow": "^0.1.18-rc.39",
76
- "@owlmeans/llm": "^0.1.18-rc.39",
75
+ "@owlmeans/flow": "^0.1.18-rc.40",
76
+ "@owlmeans/llm": "^0.1.18-rc.40",
77
77
  "@owlmeans/llm-common": "^0.1.18-rc.37",
78
78
  "ajv": "^8.17.1"
79
79
  },
@@ -1,37 +0,0 @@
1
- import type { Execution, ExecutionPlugin } from '@owlmeans/llm';
2
- import type { AgentRunStateStore } from '../stores/types.js';
3
- import type { AgentTransport } from './transport.js';
4
- export interface AgentCheckpointOptions {
5
- store: AgentRunStateStore;
6
- /** Dispatched after a successful save, so a queue-backed runner can pick the run up. */
7
- transport?: AgentTransport;
8
- /**
9
- * Refuse to persist a state larger than this, in serialized characters.
10
- *
11
- * A project-level execution carries the whole project specification in `state.project`, so an
12
- * unguarded checkpoint writes tens of kilobytes on every call. The guard drops the write and
13
- * says so, which is a recoverable gap; silently writing them is a storage problem that surfaces
14
- * much later and much worse.
15
- */
16
- maxStateChars?: number;
17
- /** How a run id is recovered from the key a caller checkpoints under. Defaults to the key. */
18
- runId?: (key: string | undefined, exec: Execution) => string;
19
- /** How a conversation id is recovered. Defaults to the execution's dedication. */
20
- conversationId?: (exec: Execution) => string;
21
- }
22
- export declare const DEFAULT_MAX_STATE_CHARS = 64000;
23
- /**
24
- * The first implementation of `@owlmeans/llm`'s `ExecutionPlugin`.
25
- *
26
- * That seam has shipped unimplemented since it was designed: `ExecutionService.checkpoint()` is a
27
- * no-op with no plugin registered, and applications call it at their lock boundaries in the
28
- * expectation that one day something will listen. This is that something — it turns a checkpoint
29
- * into an `AgentRunState` row, and a restore into a state a run can be rebuilt from.
30
- *
31
- * It persists the EXECUTION state only. The flow string belongs to a run and is written by the run
32
- * itself; a checkpoint taken from an execution has no run to ask, so `flow` is left empty and the
33
- * run's own save fills it in. Reading a state back with an empty `flow` means "a checkpoint exists
34
- * but no run had started" — resume from the beginning, not from a step.
35
- */
36
- export declare const makeAgentExecutionPlugin: (options: AgentCheckpointOptions) => ExecutionPlugin;
37
- //# sourceMappingURL=checkpoint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../src/runtime/checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,kBAAkB,CAAA;IACzB,wFAAwF;IACxF,SAAS,CAAC,EAAE,cAAc,CAAA;IAC1B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8FAA8F;IAC9F,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,KAAK,MAAM,CAAA;IAC5D,kFAAkF;IAClF,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,CAAA;CAC7C;AAED,eAAO,MAAM,uBAAuB,QAAS,CAAA;AAE7C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,YAAa,sBAAsB,KAAG,eAgD1E,CAAA"}
@@ -1,52 +0,0 @@
1
- export const DEFAULT_MAX_STATE_CHARS = 64_000;
2
- /**
3
- * The first implementation of `@owlmeans/llm`'s `ExecutionPlugin`.
4
- *
5
- * That seam has shipped unimplemented since it was designed: `ExecutionService.checkpoint()` is a
6
- * no-op with no plugin registered, and applications call it at their lock boundaries in the
7
- * expectation that one day something will listen. This is that something — it turns a checkpoint
8
- * into an `AgentRunState` row, and a restore into a state a run can be rebuilt from.
9
- *
10
- * It persists the EXECUTION state only. The flow string belongs to a run and is written by the run
11
- * itself; a checkpoint taken from an execution has no run to ask, so `flow` is left empty and the
12
- * run's own save fills it in. Reading a state back with an empty `flow` means "a checkpoint exists
13
- * but no run had started" — resume from the beginning, not from a step.
14
- */
15
- export const makeAgentExecutionPlugin = (options) => {
16
- const { store, transport, maxStateChars = DEFAULT_MAX_STATE_CHARS, runId = key => key ?? '', conversationId = exec => exec.purpose?.dedication ?? '', } = options;
17
- return {
18
- onCheckpoint: async (state, exec, key) => {
19
- const id = runId(key, exec);
20
- if (id === '') {
21
- console.warn('Agent checkpoint skipped: no run id could be resolved from the key');
22
- return;
23
- }
24
- let serialized;
25
- try {
26
- serialized = JSON.stringify(state);
27
- }
28
- catch (e) {
29
- // A state that will not serialize is a collaborator that leaked into it — report the fact
30
- // rather than the exception, because the caller cannot act on a cycle in someone's object.
31
- console.warn('Agent checkpoint skipped: execution state is not serializable:', e);
32
- return;
33
- }
34
- if (serialized.length > maxStateChars) {
35
- console.warn(`Agent checkpoint skipped: state is ${serialized.length} chars, over the `
36
- + `${maxStateChars} limit — narrow what the execution carries before checkpointing it`);
37
- return;
38
- }
39
- const record = {
40
- id,
41
- conversationId: conversationId(exec),
42
- flow: '',
43
- state,
44
- updatedAt: new Date().toISOString(),
45
- };
46
- await store.save(record);
47
- await transport?.dispatch({ id, conversationId: record.conversationId, flow: '', stateRef: id });
48
- },
49
- onRestore: async (key) => (await store.load(key))?.state ?? null,
50
- };
51
- };
52
- //# sourceMappingURL=checkpoint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkpoint.js","sourceRoot":"","sources":["../../src/runtime/checkpoint.ts"],"names":[],"mappings":"AAyBA,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAA;AAE7C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAA+B,EAAmB,EAAE;IAC3F,MAAM,EACJ,KAAK,EAAE,SAAS,EAChB,aAAa,GAAG,uBAAuB,EACvC,KAAK,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