@owlmeans/llm-common 0.1.18-rc.11 → 0.1.18-rc.12

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
@@ -20,7 +20,7 @@ extends these; `@owlmeans/llm` implements against them.
20
20
  ## Installation
21
21
 
22
22
  ```bash
23
- bun add @owlmeans/llm-common
23
+ bun add @owlmeans/llm-common@^0.1.18-rc.11
24
24
  ```
25
25
 
26
26
  ## Usage
@@ -96,7 +96,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
96
96
  your project's skill store (`.agents/skills/`):
97
97
 
98
98
  ```sh
99
- npx @owlmeans/agent-skills
99
+ npx @owlmeans/agent-skills@^0.1.18-rc.12
100
100
  ```
101
101
 
102
102
  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/llm-common",
4
- "version": "0.1.18-rc.11",
5
- "generatedAt": "2026-09-01T22:50:56.459Z",
4
+ "version": "0.1.18-rc.12",
5
+ "generatedAt": "2026-09-04T22:43:25.447Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/llm-common
9
9
 
10
10
  **Layer:** Core
11
- **Install:** `"@owlmeans/llm-common": "^0.1.18-rc.11"` in `dependencies`
11
+ **Install:** `"@owlmeans/llm-common": "^0.1.18-rc.12"` in `dependencies`
12
12
 
13
13
  The contracts half of the LLM stack. **No `@langchain/*` runtime dependency** — importable
14
14
  from a browser bundle, a queue worker, or any package that must not pull an inference SDK.
@@ -34,21 +34,43 @@ The dependency direction is one-way: a domain contracts package extends these;
34
34
  | `SkillDefinition` | One named block of reusable prompt knowledge. `body` must be a pure constant. |
35
35
  | `PromptPolicy` | `{ role?, skills?, cacheSystem?, cacheTtl? }` — carried on `ExecutionState`, merged downward. |
36
36
  | `CacheTtl`, `CacheUsage` | `'5m' \| '1h'`; normalized prompt-cache accounting. |
37
- | `LlmFileProvider`, `FileProviderRef`, `resolveFileProvider` | The minimal read/write file contract prompt plugins work against. Its optional `key` is the provider's stable identity (project root, sandbox id) — the only thing a plugin caching per-project reads can key on, since providers are rebuilt per request. |
37
+ | `LlmFileProvider`, `FileProviderRef`, `resolveFileProvider` | The file contract prompt plugins work against — four members, every path relative to the host's project root. `FileProviderRef` accepts the provider or a thunk returning one; `resolveFileProvider` unwraps whichever form arrived, or `undefined`. |
38
38
  | `NullCapture`, `NullKind` | Full diagnostics of a call that returned nothing usable. |
39
39
  | `SpectatorArgument`, `SpectatorEntry`, `SpectatorEntryLogged`, `SpectatorEntryMessage` | What an observability sink stores. |
40
40
 
41
+ ## `LlmFileProvider` — what a host must supply
42
+
43
+ A consumer's own file helper satisfies it structurally (`interface FileHelper extends
44
+ LlmFileProvider`); implementing it from scratch means all four:
45
+
46
+ | Member | Contract |
47
+ |---|---|
48
+ | `readFile(path, noThrow?)` | Read a file relative to the root. With `noThrow`, a missing file yields `''`. |
49
+ | `getSourceList(pattern?)` | Glob for files relative to the root. Project-skill discovery in `@owlmeans/agent-skills` is built on it, so a provider that stubs it indexes nothing. |
50
+ | `writeFile(path, content)` | Write relative to the root, creating parent directories. |
51
+ | `deleteFile(path, noThrow?)` | Delete relative to the root. With `noThrow`, a missing file is a no-op. |
52
+ | `key?` | Optional. The provider's stable identity (project root, sandbox id) — the only thing a plugin caching per-project reads can key on, since providers are rebuilt per request. A provider without one is treated as uncacheable. |
53
+
54
+ Resolving the project root is deliberately NOT part of the contract, and an implementation must not
55
+ narrow an inherited signature — that is what stops a rich helper from satisfying this one.
56
+
41
57
  ## Extension rules
42
58
 
43
59
  Open types are open **on purpose** — extend, do not fork:
44
60
 
45
61
  ```typescript
62
+ import type {
63
+ ExecutionState as LlmExecutionState, LlmPurpose,
64
+ TaskExecutionState as LlmTaskExecutionState,
65
+ } from '@owlmeans/llm-common'
66
+
46
67
  // Your roles: an enum whose values satisfy the open `ModelRole` string.
47
68
  export enum MyRole { Analyst = 'analyst', Coder = 'coder' }
48
69
 
49
- // Your purpose and state: extend, never redeclare.
70
+ // Your purpose and state: extend, never redeclare. Aliasing the imports keeps your own
71
+ // `ExecutionState` the name the rest of your domain uses.
50
72
  export interface MyPurpose extends LlmPurpose { agent?: string }
51
- export interface MyExecutionState extends ExecutionState {
73
+ export interface MyExecutionState extends LlmExecutionState {
52
74
  purpose: MyPurpose
53
75
  projectId?: string
54
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/files/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAElE,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,GAC9B,KAAK,eAAe,GAAG,SAAS,KAC/B,eAAe,GAAG,SAAoD,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/files/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAElE,qEAAqE;AACrE,eAAO,MAAM,mBAAmB,QACzB,eAAe,GAAG,SAAS,KAC/B,eAAe,GAAG,SAAoD,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/llm-common",
3
- "version": "0.1.18-rc.11",
3
+ "version": "0.1.18-rc.12",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {