@owlmeans/llm-common 0.1.18-rc.8 → 0.1.18

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 (96) hide show
  1. package/README.md +2 -2
  2. package/agent-meta/manifest.json +3 -3
  3. package/agent-meta/skills/llm-common/SKILL.md +64 -12
  4. package/build/consts.d.ts +107 -7
  5. package/build/consts.d.ts.map +1 -1
  6. package/build/consts.js +125 -5
  7. package/build/consts.js.map +1 -1
  8. package/build/delegate/consts.d.ts +25 -0
  9. package/build/delegate/consts.d.ts.map +1 -0
  10. package/build/delegate/consts.js +28 -0
  11. package/build/delegate/consts.js.map +1 -0
  12. package/build/delegate/index.d.ts +3 -0
  13. package/build/delegate/index.d.ts.map +1 -0
  14. package/build/delegate/index.js +3 -0
  15. package/build/delegate/index.js.map +1 -0
  16. package/build/delegate/types.d.ts +85 -0
  17. package/build/delegate/types.d.ts.map +1 -0
  18. package/build/delegate/types.js +13 -0
  19. package/build/delegate/types.js.map +1 -0
  20. package/build/files/types.d.ts +10 -0
  21. package/build/files/types.d.ts.map +1 -1
  22. package/build/index.d.ts +3 -0
  23. package/build/index.d.ts.map +1 -1
  24. package/build/index.js +3 -0
  25. package/build/index.js.map +1 -1
  26. package/build/inquiry/consts.d.ts +48 -0
  27. package/build/inquiry/consts.d.ts.map +1 -0
  28. package/build/inquiry/consts.js +50 -0
  29. package/build/inquiry/consts.js.map +1 -0
  30. package/build/inquiry/helper/types.d.ts +47 -0
  31. package/build/inquiry/helper/types.d.ts.map +1 -0
  32. package/build/inquiry/helper/types.js +2 -0
  33. package/build/inquiry/helper/types.js.map +1 -0
  34. package/build/inquiry/helper.d.ts +4 -0
  35. package/build/inquiry/helper.d.ts.map +1 -0
  36. package/build/inquiry/helper.js +39 -0
  37. package/build/inquiry/helper.js.map +1 -0
  38. package/build/inquiry/index.d.ts +6 -0
  39. package/build/inquiry/index.d.ts.map +1 -0
  40. package/build/inquiry/index.js +4 -0
  41. package/build/inquiry/index.js.map +1 -0
  42. package/build/inquiry/types.d.ts +72 -0
  43. package/build/inquiry/types.d.ts.map +1 -0
  44. package/build/inquiry/types.js +2 -0
  45. package/build/inquiry/types.js.map +1 -0
  46. package/build/inquiry/utils.d.ts +14 -0
  47. package/build/inquiry/utils.d.ts.map +1 -0
  48. package/build/inquiry/utils.js +14 -0
  49. package/build/inquiry/utils.js.map +1 -0
  50. package/build/results/consts.d.ts +19 -0
  51. package/build/results/consts.d.ts.map +1 -0
  52. package/build/results/consts.js +30 -0
  53. package/build/results/consts.js.map +1 -0
  54. package/build/results/consts.local.d.ts +3 -0
  55. package/build/results/consts.local.d.ts.map +1 -0
  56. package/build/results/consts.local.js +3 -0
  57. package/build/results/consts.local.js.map +1 -0
  58. package/build/results/index.d.ts +4 -0
  59. package/build/results/index.d.ts.map +1 -0
  60. package/build/results/index.js +3 -0
  61. package/build/results/index.js.map +1 -0
  62. package/build/results/types.d.ts +37 -0
  63. package/build/results/types.d.ts.map +1 -0
  64. package/build/results/types.js +2 -0
  65. package/build/results/types.js.map +1 -0
  66. package/build/results/utils.d.ts +11 -0
  67. package/build/results/utils.d.ts.map +1 -0
  68. package/build/results/utils.js +27 -0
  69. package/build/results/utils.js.map +1 -0
  70. package/build/spectator/types.d.ts +6 -0
  71. package/build/spectator/types.d.ts.map +1 -1
  72. package/build/types.d.ts +99 -7
  73. package/build/types.d.ts.map +1 -1
  74. package/package.json +5 -4
  75. package/src/consts.ts +129 -5
  76. package/src/delegate/consts.ts +26 -0
  77. package/src/delegate/index.ts +2 -0
  78. package/src/delegate/types.ts +91 -0
  79. package/src/files/types.ts +11 -0
  80. package/src/index.ts +3 -0
  81. package/src/inquiry/consts.ts +52 -0
  82. package/src/inquiry/helper/types.ts +47 -0
  83. package/src/inquiry/helper.ts +53 -0
  84. package/src/inquiry/index.ts +5 -0
  85. package/src/inquiry/types.ts +77 -0
  86. package/src/inquiry/utils.ts +20 -0
  87. package/src/results/consts.local.ts +2 -0
  88. package/src/results/consts.ts +32 -0
  89. package/src/results/index.ts +3 -0
  90. package/src/results/types.ts +37 -0
  91. package/src/results/utils.ts +34 -0
  92. package/src/spectator/types.ts +6 -0
  93. package/src/types.ts +101 -7
  94. package/tests/inquiry.spec.ts +111 -0
  95. package/tests/results.spec.ts +81 -0
  96. package/tsconfig.json +3 -1
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
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
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
- "schemaVersion": 2,
2
+ "schemaVersion": 3,
3
3
  "package": "@owlmeans/llm-common",
4
- "version": "0.1.18-rc.7",
5
- "generatedAt": "2026-08-29T20:14:19.670Z",
4
+ "version": "0.1.18",
5
+ "generatedAt": "2026-10-28T00:31:34.746Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: llm-common
3
- description: How to use @owlmeans/llm-common — runtime-free serializable contracts for LLM inference and execution (ModelProvider, ExecutionEffort/Level, ModelPolicy, PromptPolicy, SkillDefinition, ExecutionState, spectator records, NullCapture, LlmFileProvider). Auto-invoked when importing those contracts or extending them for a domain.
3
+ description: How to use @owlmeans/llm-common — runtime-free serializable contracts for LLM inference and execution (ModelProvider, ExecutionEffort/Level, ModelPolicy, PromptPolicy, SkillDefinition, ExecutionState and its cumulative-results view, PromptBlock/PromptRegion, PromptFocus, PackagePurpose, CacheTtlPolicy, spectator records, NullCapture, LlmFileProvider). Auto-invoked when importing those contracts or extending them for a domain.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -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.7"` in `dependencies`
11
+ **Install:** `"@owlmeans/llm-common": "^0.1.18"` 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.
@@ -22,32 +22,77 @@ The dependency direction is one-way: a domain contracts package extends these;
22
22
  | `ModelProvider` | `OpenAI` · `Anthropic` · `Compatible`. Each value is an `LlmPlugin.type` in `@owlmeans/llm`. |
23
23
  | `ExecutionLevel` | `Project` → `Task` → `Helper`. Refinement is downward only. |
24
24
  | `ExecutionEffort` | `Economy` · `Standard` · `High` · `Max` — the single "how hard should this run" axis. |
25
+ | `ModelEffort` · `MODEL_EFFORT_ORDER` | The PROVIDER's effort value (`none` … `max`) sent as OpenAI `reasoning.effort` / Anthropic `output_config.effort`; `ModelConfigPatch.effort`. Not `ExecutionEffort`, which only sizes budgets. Which levels a model accepts is the `llm` plugins' table. |
25
26
  | `StructuredMode` | `Native` (provider JSON-schema mode) vs `Tool` (forced tool call). |
26
27
  | `SpectatorContentType`, `SPECTATOR_GENERAL` | Observability record enums/defaults. |
27
28
  | `ModelRole` | Open `string` — declare your own enum, its values stay assignable. |
28
29
  | `ModelConfigPatch` / `ModelConfigOverride` | The JSON-safe config subset; never credentials. Carries the model-capability fields (`contextWindow`, `maxOutput`, `combinedWindow`) alongside the budget ones — see the `llm` skill for what each means. |
29
- | `ModelPolicy` | `{ effort, roleOverrides?, modelOverrides? }` — inherited by every refinement. |
30
- | `ExecutionState` / `TaskExecutionState` | The persistable core (`level`/`purpose`/`policy`, plus `phase`/`completed`/`cursor`/`data`). |
30
+ | `ModelPolicy` | `{ effort, roleOverrides?, modelOverrides?, utilityRole? }` — inherited by every refinement. |
31
+ | `UTILITY_ROLE` | `'utility'` — the conventional cheap tier for side calls (a relevance pick, a classification). `ModelPolicy.utilityRole` points it at another alias; `ExecutionService.utility` resolves it. |
32
+ | `ExecutionState` / `TaskExecutionState` | The persistable core (`level`/`purpose`/`policy`, optional `prompt`/`inquiry`/`results`, plus `phase`/`completed`/`cursor`/`data`). |
31
33
  | `LlmPurpose` | `{ type?, dedication? }` — metadata carried on every model call. |
32
- | `PromptBlock`, `PROMPT_BLOCK_ORDER`, `DEFAULT_SKILL_ORDER` | The ordered sections of a composed system prompt — the order IS the cache key. |
34
+ | `PromptBlock`, `PROMPT_BLOCK_ORDER`, `DEFAULT_SKILL_ORDER` | The ordered sections of a composed prompt — `Role`, `Skills`, `Packages`, `Results`, `Context`, `Tail`; the order IS the cache key. |
35
+ | `PromptRegion`, `PROMPT_REGIONS` | Where each block travels: `System` (role, skills, packages — the system message), `Project` (results, context — a user turn right after it), `Tail` (appended to the final message, never cached). |
36
+ | `PackagePurpose`, `PACKAGE_PURPOSES` | The closed vocabulary a package skill's parts are tagged with and a focus selects by (`view`, `form`, … `ops`); `library-manager` keeps a pinned copy. |
37
+ | `PromptFocus` | `{ packages?, purposes?, parts?, types?, late? }` — the package documentation (and types) a persona works with, chosen once per persona and story; arrays merge as a first-seen union down the chain, the deepest `late` wins. |
38
+ | `CumulativeResults`, `CumulativeResultsSection` | A pipeline step's view of what earlier steps produced: `step`, rendered `sections` (oldest first), `omitted` step names, `chars`, and a `digest` that is never rendered. |
39
+ | `renderCumulativeResults(view)` · `CUMULATIVE_RESULTS_PREAMBLE` · `CUMULATIVE_RESULTS_OMITTED_LEAD`/`_TAIL` | The view as prompt text: the fixed rules, the sections, the "not listed for space" line — or `''` for no view. |
33
40
  | `SkillDefinition` | One named block of reusable prompt knowledge. `body` must be a pure constant. |
34
- | `PromptPolicy` | `{ role?, skills?, cacheSystem?, cacheTtl? }` — carried on `ExecutionState`, merged downward. |
35
- | `CacheTtl`, `CacheUsage` | `'5m' \| '1h'`; normalized prompt-cache accounting. |
36
- | `LlmFileProvider`, `FileProviderRef`, `resolveFileProvider` | The minimal read/write file contract prompt plugins work against. |
37
- | `NullCapture`, `NullKind` | Full diagnostics of a call that returned nothing usable. |
38
- | `SpectatorArgument`, `SpectatorEntry`, `SpectatorEntryLogged`, `SpectatorEntryMessage` | What an observability sink stores. |
41
+ | `PromptPolicy` | `{ role?, skills?, cacheSystem?, cacheTtl?, focus? }` — carried on `ExecutionState`, merged downward. `cacheSystem: false` leaves the system and project message unmarked. |
42
+ | `CacheTtl`, `CacheTtlPolicy`, `CacheUsage` | `'5m' \| '1h'`; a lifetime per breakpoint (`skills`, `packages`, `project`, `stable`), which never rises along the prefix; normalized prompt-cache accounting — `creationLong` is the 1-hour share of `creation`, present only when non-zero. |
43
+ | `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`. |
44
+ | `NullCapture`, `NullKind` | Full diagnostics of a call that returned nothing usable; `request.useCache` = the prepared request carried a breakpoint, `request.stable` = the caller's `stable` count. |
45
+ | `SpectatorArgument`, `SpectatorEntry`, `SpectatorEntryLogged`, `SpectatorEntryMessage` | What an observability sink stores. `SpectatorArgument.model` is the model that ANSWERED (a fallback rung's own id); absent, a sink falls back to its own resolution. |
46
+
47
+ ## `LlmFileProvider` — what a host must supply
48
+
49
+ A consumer's own file helper satisfies it structurally (`interface FileHelper extends
50
+ LlmFileProvider`); implementing it from scratch means all four:
51
+
52
+ | Member | Contract |
53
+ |---|---|
54
+ | `readFile(path, noThrow?)` | Read a file relative to the root. With `noThrow`, a missing file yields `''`. |
55
+ | `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. |
56
+ | `writeFile(path, content)` | Write relative to the root, creating parent directories. |
57
+ | `deleteFile(path, noThrow?)` | Delete relative to the root. With `noThrow`, a missing file is a no-op. |
58
+ | `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. |
59
+
60
+ Resolving the project root is deliberately NOT part of the contract, and an implementation must not
61
+ narrow an inherited signature — that is what stops a rich helper from satisfying this one.
62
+
63
+ ## `ExecutionState.results` — the cumulative-results view
64
+
65
+ What the earlier steps of the pipeline an execution works inside produced, cut by `@owlmeans/agent`'s
66
+ `cumulativeResultsPlugin` for ONE step. It is state, not a collaborator — plain rendered text, so a
67
+ snapshot and a restore compose the same prompt — and it is inherited down the execution chain like
68
+ any state field, but REPLACED (`ExecutionService.withResults`), never merged, when another step is
69
+ handed its own view.
70
+
71
+ `renderCumulativeResults` is pure: the same view renders the same bytes, an absent or empty view
72
+ renders NOTHING (never a heading over an empty list, which a model reads as "nothing was produced"),
73
+ and the digest never reaches a prompt. `CUMULATIVE_RESULTS_PREAMBLE` is written for the weakest model
74
+ a pipeline may run on — use the names verbatim, import only from the listed specifier, never declare
75
+ a listed thing again, a missing thing does not exist yet unless the list says it left something out,
76
+ and a source file shown in the conversation is NEWER than the list and wins. Change its wording only
77
+ deliberately: it opens a block that recurs on every call of a step.
39
78
 
40
79
  ## Extension rules
41
80
 
42
81
  Open types are open **on purpose** — extend, do not fork:
43
82
 
44
83
  ```typescript
84
+ import type {
85
+ ExecutionState as LlmExecutionState, LlmPurpose,
86
+ TaskExecutionState as LlmTaskExecutionState,
87
+ } from '@owlmeans/llm-common'
88
+
45
89
  // Your roles: an enum whose values satisfy the open `ModelRole` string.
46
90
  export enum MyRole { Analyst = 'analyst', Coder = 'coder' }
47
91
 
48
- // Your purpose and state: extend, never redeclare.
92
+ // Your purpose and state: extend, never redeclare. Aliasing the imports keeps your own
93
+ // `ExecutionState` the name the rest of your domain uses.
49
94
  export interface MyPurpose extends LlmPurpose { agent?: string }
50
- export interface MyExecutionState extends ExecutionState {
95
+ export interface MyExecutionState extends LlmExecutionState {
51
96
  purpose: MyPurpose
52
97
  projectId?: string
53
98
  }
@@ -74,6 +119,13 @@ instances, credentials, file handles, callbacks, `ModelConfig` (it carries `secr
74
119
  Nothing at runtime. `@langchain/core` is a **dev** dependency, for the `UsageMetadata` type
75
120
  on a spectator message only.
76
121
 
122
+ ## Testing
123
+
124
+ Category A. `bun test ./tests` (the package's `test` script, so the root run includes it):
125
+ `inquiry.spec.ts` for the answer helpers, `results.spec.ts` for the block order, the regions, the purpose list and the rendered view.
126
+
77
127
  ## Related
78
128
 
79
129
  - [[llm]] — the runtime that implements these contracts
130
+ - [[llm-prompt-caching]] — the regions, the cache boundaries and their lifetimes
131
+ - [[agent]] — `cumulativeResultsPlugin`, which cuts the view
package/build/consts.d.ts CHANGED
@@ -9,7 +9,21 @@ export declare enum ModelProvider {
9
9
  /** Anthropic messages API. */
10
10
  Anthropic = "anthropic",
11
11
  /** Any OpenAI-compatible endpoint — OpenRouter, HuggingFace router, Together, vLLM, … */
12
- Compatible = "compatible"
12
+ Compatible = "compatible",
13
+ /**
14
+ * No endpoint at all: the call is handed to whoever holds the execution.
15
+ *
16
+ * A delegated model does not talk to a provider. It packages the call — the system prompt, the
17
+ * conversation, the tools or the schema — and hands it to a transport the application seated,
18
+ * which carries it to something outside this process entirely: a coding agent driving the
19
+ * application through a connector, a human, a test. The answer comes back the same way and is
20
+ * turned into a completion the rest of the stack cannot tell apart from a provider's.
21
+ *
22
+ * It exists so that "who performs this call" can be a property of the SESSION rather than of the
23
+ * code: the same pipeline, the same prompts and the same retry rules, billed to somebody else's
24
+ * model.
25
+ */
26
+ Delegated = "delegated"
13
27
  }
14
28
  /**
15
29
  * Refinement level of an execution. An execution is refined downward only:
@@ -31,6 +45,23 @@ export declare enum ExecutionEffort {
31
45
  High = "high",
32
46
  Max = "max"
33
47
  }
48
+ /**
49
+ * The PROVIDER's own effort knob — OpenAI `reasoning.effort`, Anthropic
50
+ * `output_config.effort`. Not {@link ExecutionEffort}: that is this package's tier, which
51
+ * sizes token budgets; this is a value sent on the wire. Which levels a model accepts is a
52
+ * provider-plugin fact in `@owlmeans/llm`.
53
+ */
54
+ export declare enum ModelEffort {
55
+ None = "none",
56
+ Minimal = "minimal",
57
+ Low = "low",
58
+ Medium = "medium",
59
+ High = "high",
60
+ XHigh = "xhigh",
61
+ Max = "max"
62
+ }
63
+ /** {@link ModelEffort} from least to most work — the order an escalation climbs. */
64
+ export declare const MODEL_EFFORT_ORDER: readonly ModelEffort[];
34
65
  /**
35
66
  * How a model is asked to produce a schema-conforming object.
36
67
  *
@@ -54,7 +85,7 @@ export declare enum SpectatorContentType {
54
85
  /** Default spectator entry kind for consumers that do not classify their calls. */
55
86
  export declare const SPECTATOR_GENERAL = "general";
56
87
  /**
57
- * Ordered sections of a composed system prompt.
88
+ * Ordered sections of a composed prompt.
58
89
  *
59
90
  * The ordering is not cosmetic — it IS the prompt-cache design. Every provider caches
60
91
  * a prompt by exact PREFIX match, so the sections are laid out most-stable first and a
@@ -63,16 +94,27 @@ export declare const SPECTATOR_GENERAL = "general";
63
94
  * - `Role` — the base system prompt defining who the model is. Stable per role.
64
95
  * - `Skills` — the statically declared capabilities, rendered in a deterministic
65
96
  * order. Stable per helper. A breakpoint closes `Role` + `Skills`.
66
- * - `Packages` — capabilities resolved from whatever the request happens to mention.
67
- * Varies per request, so it gets its OWN breakpoint and can never
68
- * invalidate the two blocks above it.
69
- * - `Context` — volatile, caller-supplied system text. Never cached.
97
+ * - `Packages` — the package documentation this persona needs for the work at hand (a focus),
98
+ * or what the request happens to mention. It gets its OWN breakpoint and can
99
+ * never invalidate the two blocks above it.
100
+ * - `Results` — what the earlier steps of the pipeline this call runs in produced
101
+ * (`ExecutionState.results`). Stable within one step, different on the
102
+ * next, so it sits BELOW every boundary that is cached across steps and
103
+ * is emitted only when a view is present.
104
+ * - `Context` — caller-supplied system text and project facts. Stable for one step of the work,
105
+ * so it sits in the project message with `Results`.
106
+ * - `Tail` — what belongs to ONE call: per-call skills, late packages and types. Appended to the
107
+ * final message after the call's payload and never cached.
108
+ *
109
+ * Where each block is sent is {@link PROMPT_REGIONS}.
70
110
  */
71
111
  export declare enum PromptBlock {
72
112
  Role = "role",
73
113
  Skills = "skills",
74
114
  Packages = "packages",
75
- Context = "context"
115
+ Results = "results",
116
+ Context = "context",
117
+ Tail = "tail"
76
118
  }
77
119
  /**
78
120
  * Emission order of {@link PromptBlock}. Declared explicitly rather than derived from
@@ -80,6 +122,64 @@ export declare enum PromptBlock {
80
122
  * and enum iteration order is not part of any contract worth betting a cache on.
81
123
  */
82
124
  export declare const PROMPT_BLOCK_ORDER: readonly PromptBlock[];
125
+ /**
126
+ * Where a composed block travels in a request. Each region is stable for a different span of
127
+ * work, so each closes on its own cache breakpoint (the tail on none):
128
+ *
129
+ * - `System` — the system message: who the model is and what it may use. Stable per persona
130
+ * (role + skills) and per persona and story (packages).
131
+ * - `Project` — the user turn right after the system: facts about this project and step.
132
+ * - `Tail` — appended to the final message, after the call's own payload.
133
+ */
134
+ export declare enum PromptRegion {
135
+ System = "system",
136
+ Project = "project",
137
+ Tail = "tail"
138
+ }
139
+ /** The blocks of each {@link PromptRegion}, in emission order. */
140
+ export declare const PROMPT_REGIONS: Readonly<Record<PromptRegion, readonly PromptBlock[]>>;
141
+ /**
142
+ * What a part of a package's documentation is FOR — the closed vocabulary a chunked package skill
143
+ * tags its parts with, and a {@link PromptFocus} selects them by. `library-manager` keeps a copy
144
+ * (it cannot import this package) and a test pins that the two are equal.
145
+ */
146
+ export declare enum PackagePurpose {
147
+ View = "view",
148
+ Form = "form",
149
+ List = "list",
150
+ Detail = "detail",
151
+ Dialog = "dialog",
152
+ Picker = "picker",
153
+ Navigation = "navigation",
154
+ Layout = "layout",
155
+ Screen = "screen",
156
+ Theme = "theme",
157
+ Feedback = "feedback",
158
+ State = "state",
159
+ ClientApi = "client-api",
160
+ ServerApi = "server-api",
161
+ Data = "data",
162
+ Migration = "migration",
163
+ Query = "query",
164
+ Auth = "auth",
165
+ Consent = "consent",
166
+ Payment = "payment",
167
+ Planning = "planning",
168
+ Job = "job",
169
+ Agent = "agent",
170
+ Config = "config",
171
+ Test = "test",
172
+ Ops = "ops"
173
+ }
174
+ /** Every {@link PackagePurpose}, in declaration order — declared, not derived from the enum. */
175
+ export declare const PACKAGE_PURPOSES: readonly PackagePurpose[];
83
176
  /** Sort weight of a skill that declares none — see `SkillDefinition.order`. */
84
177
  export declare const DEFAULT_SKILL_ORDER = 100;
178
+ /**
179
+ * Conventional {@link ModelRole} for the cheap side calls the layer makes on its own
180
+ * behalf — a relevance pick, a classification, a one-line judgement — rather than for the
181
+ * work a caller asked for. A deployment that names its cheap tier differently points
182
+ * `ModelPolicy.utilityRole` at its own alias; nothing else has to change.
183
+ */
184
+ export declare const UTILITY_ROLE = "utility";
85
185
  //# sourceMappingURL=consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,oBAAY,aAAa;IACvB,yFAAyF;IACzF,MAAM,WAAW;IACjB,8BAA8B;IAC9B,SAAS,cAAc;IACvB,yFAAyF;IACzF,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ;AAED;;;;;;;;;GASG;AACH,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,0DAA0D;AAC1D,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,QAAQ,cAAc;CACvB;AAED,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,YAA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rB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,WAAW,EAO3C,CAAA;AAEV;;;;;;;;GAQG;AACH,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,kEAAkE;AAClE,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC,CAIhF,CAAA;AAEF;;;;GAIG;AACH,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ;AAED,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAQpD,CAAA;AAEF,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,YAAY,CAAA"}
package/build/consts.js CHANGED
@@ -11,6 +11,20 @@ export var ModelProvider;
11
11
  ModelProvider["Anthropic"] = "anthropic";
12
12
  /** Any OpenAI-compatible endpoint — OpenRouter, HuggingFace router, Together, vLLM, … */
13
13
  ModelProvider["Compatible"] = "compatible";
14
+ /**
15
+ * No endpoint at all: the call is handed to whoever holds the execution.
16
+ *
17
+ * A delegated model does not talk to a provider. It packages the call — the system prompt, the
18
+ * conversation, the tools or the schema — and hands it to a transport the application seated,
19
+ * which carries it to something outside this process entirely: a coding agent driving the
20
+ * application through a connector, a human, a test. The answer comes back the same way and is
21
+ * turned into a completion the rest of the stack cannot tell apart from a provider's.
22
+ *
23
+ * It exists so that "who performs this call" can be a property of the SESSION rather than of the
24
+ * code: the same pipeline, the same prompts and the same retry rules, billed to somebody else's
25
+ * model.
26
+ */
27
+ ModelProvider["Delegated"] = "delegated";
14
28
  })(ModelProvider || (ModelProvider = {}));
15
29
  /**
16
30
  * Refinement level of an execution. An execution is refined downward only:
@@ -34,6 +48,27 @@ export var ExecutionEffort;
34
48
  ExecutionEffort["High"] = "high";
35
49
  ExecutionEffort["Max"] = "max";
36
50
  })(ExecutionEffort || (ExecutionEffort = {}));
51
+ /**
52
+ * The PROVIDER's own effort knob — OpenAI `reasoning.effort`, Anthropic
53
+ * `output_config.effort`. Not {@link ExecutionEffort}: that is this package's tier, which
54
+ * sizes token budgets; this is a value sent on the wire. Which levels a model accepts is a
55
+ * provider-plugin fact in `@owlmeans/llm`.
56
+ */
57
+ export var ModelEffort;
58
+ (function (ModelEffort) {
59
+ ModelEffort["None"] = "none";
60
+ ModelEffort["Minimal"] = "minimal";
61
+ ModelEffort["Low"] = "low";
62
+ ModelEffort["Medium"] = "medium";
63
+ ModelEffort["High"] = "high";
64
+ ModelEffort["XHigh"] = "xhigh";
65
+ ModelEffort["Max"] = "max";
66
+ })(ModelEffort || (ModelEffort = {}));
67
+ /** {@link ModelEffort} from least to most work — the order an escalation climbs. */
68
+ export const MODEL_EFFORT_ORDER = [
69
+ ModelEffort.None, ModelEffort.Minimal, ModelEffort.Low, ModelEffort.Medium,
70
+ ModelEffort.High, ModelEffort.XHigh, ModelEffort.Max,
71
+ ];
37
72
  /**
38
73
  * How a model is asked to produce a schema-conforming object.
39
74
  *
@@ -59,7 +94,7 @@ export var SpectatorContentType;
59
94
  /** Default spectator entry kind for consumers that do not classify their calls. */
60
95
  export const SPECTATOR_GENERAL = 'general';
61
96
  /**
62
- * Ordered sections of a composed system prompt.
97
+ * Ordered sections of a composed prompt.
63
98
  *
64
99
  * The ordering is not cosmetic — it IS the prompt-cache design. Every provider caches
65
100
  * a prompt by exact PREFIX match, so the sections are laid out most-stable first and a
@@ -68,17 +103,28 @@ export const SPECTATOR_GENERAL = 'general';
68
103
  * - `Role` — the base system prompt defining who the model is. Stable per role.
69
104
  * - `Skills` — the statically declared capabilities, rendered in a deterministic
70
105
  * order. Stable per helper. A breakpoint closes `Role` + `Skills`.
71
- * - `Packages` — capabilities resolved from whatever the request happens to mention.
72
- * Varies per request, so it gets its OWN breakpoint and can never
73
- * invalidate the two blocks above it.
74
- * - `Context` — volatile, caller-supplied system text. Never cached.
106
+ * - `Packages` — the package documentation this persona needs for the work at hand (a focus),
107
+ * or what the request happens to mention. It gets its OWN breakpoint and can
108
+ * never invalidate the two blocks above it.
109
+ * - `Results` — what the earlier steps of the pipeline this call runs in produced
110
+ * (`ExecutionState.results`). Stable within one step, different on the
111
+ * next, so it sits BELOW every boundary that is cached across steps and
112
+ * is emitted only when a view is present.
113
+ * - `Context` — caller-supplied system text and project facts. Stable for one step of the work,
114
+ * so it sits in the project message with `Results`.
115
+ * - `Tail` — what belongs to ONE call: per-call skills, late packages and types. Appended to the
116
+ * final message after the call's payload and never cached.
117
+ *
118
+ * Where each block is sent is {@link PROMPT_REGIONS}.
75
119
  */
76
120
  export var PromptBlock;
77
121
  (function (PromptBlock) {
78
122
  PromptBlock["Role"] = "role";
79
123
  PromptBlock["Skills"] = "skills";
80
124
  PromptBlock["Packages"] = "packages";
125
+ PromptBlock["Results"] = "results";
81
126
  PromptBlock["Context"] = "context";
127
+ PromptBlock["Tail"] = "tail";
82
128
  })(PromptBlock || (PromptBlock = {}));
83
129
  /**
84
130
  * Emission order of {@link PromptBlock}. Declared explicitly rather than derived from
@@ -89,8 +135,82 @@ export const PROMPT_BLOCK_ORDER = [
89
135
  PromptBlock.Role,
90
136
  PromptBlock.Skills,
91
137
  PromptBlock.Packages,
138
+ PromptBlock.Results,
92
139
  PromptBlock.Context,
140
+ PromptBlock.Tail,
93
141
  ];
142
+ /**
143
+ * Where a composed block travels in a request. Each region is stable for a different span of
144
+ * work, so each closes on its own cache breakpoint (the tail on none):
145
+ *
146
+ * - `System` — the system message: who the model is and what it may use. Stable per persona
147
+ * (role + skills) and per persona and story (packages).
148
+ * - `Project` — the user turn right after the system: facts about this project and step.
149
+ * - `Tail` — appended to the final message, after the call's own payload.
150
+ */
151
+ export var PromptRegion;
152
+ (function (PromptRegion) {
153
+ PromptRegion["System"] = "system";
154
+ PromptRegion["Project"] = "project";
155
+ PromptRegion["Tail"] = "tail";
156
+ })(PromptRegion || (PromptRegion = {}));
157
+ /** The blocks of each {@link PromptRegion}, in emission order. */
158
+ export const PROMPT_REGIONS = Object.freeze({
159
+ [PromptRegion.System]: [PromptBlock.Role, PromptBlock.Skills, PromptBlock.Packages],
160
+ [PromptRegion.Project]: [PromptBlock.Results, PromptBlock.Context],
161
+ [PromptRegion.Tail]: [PromptBlock.Tail],
162
+ });
163
+ /**
164
+ * What a part of a package's documentation is FOR — the closed vocabulary a chunked package skill
165
+ * tags its parts with, and a {@link PromptFocus} selects them by. `library-manager` keeps a copy
166
+ * (it cannot import this package) and a test pins that the two are equal.
167
+ */
168
+ export var PackagePurpose;
169
+ (function (PackagePurpose) {
170
+ PackagePurpose["View"] = "view";
171
+ PackagePurpose["Form"] = "form";
172
+ PackagePurpose["List"] = "list";
173
+ PackagePurpose["Detail"] = "detail";
174
+ PackagePurpose["Dialog"] = "dialog";
175
+ PackagePurpose["Picker"] = "picker";
176
+ PackagePurpose["Navigation"] = "navigation";
177
+ PackagePurpose["Layout"] = "layout";
178
+ PackagePurpose["Screen"] = "screen";
179
+ PackagePurpose["Theme"] = "theme";
180
+ PackagePurpose["Feedback"] = "feedback";
181
+ PackagePurpose["State"] = "state";
182
+ PackagePurpose["ClientApi"] = "client-api";
183
+ PackagePurpose["ServerApi"] = "server-api";
184
+ PackagePurpose["Data"] = "data";
185
+ PackagePurpose["Migration"] = "migration";
186
+ PackagePurpose["Query"] = "query";
187
+ PackagePurpose["Auth"] = "auth";
188
+ PackagePurpose["Consent"] = "consent";
189
+ PackagePurpose["Payment"] = "payment";
190
+ PackagePurpose["Planning"] = "planning";
191
+ PackagePurpose["Job"] = "job";
192
+ PackagePurpose["Agent"] = "agent";
193
+ PackagePurpose["Config"] = "config";
194
+ PackagePurpose["Test"] = "test";
195
+ PackagePurpose["Ops"] = "ops";
196
+ })(PackagePurpose || (PackagePurpose = {}));
197
+ /** Every {@link PackagePurpose}, in declaration order — declared, not derived from the enum. */
198
+ export const PACKAGE_PURPOSES = Object.freeze([
199
+ PackagePurpose.View, PackagePurpose.Form, PackagePurpose.List, PackagePurpose.Detail,
200
+ PackagePurpose.Dialog, PackagePurpose.Picker, PackagePurpose.Navigation, PackagePurpose.Layout,
201
+ PackagePurpose.Screen, PackagePurpose.Theme, PackagePurpose.Feedback, PackagePurpose.State,
202
+ PackagePurpose.ClientApi, PackagePurpose.ServerApi, PackagePurpose.Data, PackagePurpose.Migration,
203
+ PackagePurpose.Query, PackagePurpose.Auth, PackagePurpose.Consent, PackagePurpose.Payment,
204
+ PackagePurpose.Planning, PackagePurpose.Job, PackagePurpose.Agent, PackagePurpose.Config,
205
+ PackagePurpose.Test, PackagePurpose.Ops,
206
+ ]);
94
207
  /** Sort weight of a skill that declares none — see `SkillDefinition.order`. */
95
208
  export const DEFAULT_SKILL_ORDER = 100;
209
+ /**
210
+ * Conventional {@link ModelRole} for the cheap side calls the layer makes on its own
211
+ * behalf — a relevance pick, a classification, a one-line judgement — rather than for the
212
+ * work a caller asked for. A deployment that names its cheap tier differently points
213
+ * `ModelPolicy.utilityRole` at its own alias; nothing else has to change.
214
+ */
215
+ export const UTILITY_ROLE = 'utility';
96
216
  //# sourceMappingURL=consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,yFAAyF;IACzF,kCAAiB,CAAA;IACjB,8BAA8B;IAC9B,wCAAuB,CAAA;IACvB,yFAAyF;IACzF,0CAAyB,CAAA;AAC3B,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,gCAAa,CAAA;IACb,8BAAW,CAAA;AACb,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B;AAED;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,0DAA0D;AAC1D,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,8CAAsB,CAAA;AACxB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAA;AAE1C;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gCAAiB,CAAA;IACjB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EALW,WAAW,KAAX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C,KAAK,EAAE,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,KAAK;IAC1F,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS;IACjG,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO;IACzF,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,MAAM;IACxF,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,GAAG;CACxC,CAAC,CAAA;AAEF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,CAAA"}
@@ -0,0 +1,25 @@
1
+ /** What the answer must be. */
2
+ export declare enum DelegatedMode {
3
+ /** Prose or code. */
4
+ Text = "text",
5
+ /** Exactly one JSON object satisfying `outputSchema`. */
6
+ Json = "json",
7
+ /** A list of calls chosen from `tools`. */
8
+ Tools = "tools"
9
+ }
10
+ /** Who a message came from. Deliberately the four roles every chat API agrees on. */
11
+ export declare enum DelegatedRole {
12
+ System = "system",
13
+ User = "user",
14
+ Assistant = "assistant",
15
+ Tool = "tool"
16
+ }
17
+ /** What shape an answer came back in. */
18
+ export declare enum DelegatedResultKind {
19
+ Text = "text",
20
+ Json = "json",
21
+ ToolCalls = "tool-calls",
22
+ /** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
23
+ Error = "error"
24
+ }
25
+ //# sourceMappingURL=consts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/delegate/consts.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,oBAAY,aAAa;IACvB,qBAAqB;IACrB,IAAI,SAAS;IACb,yDAAyD;IACzD,IAAI,SAAS;IACb,2CAA2C;IAC3C,KAAK,UAAU;CAChB;AAED,qFAAqF;AACrF,oBAAY,aAAa;IACvB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;CACd;AAED,yCAAyC;AACzC,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,mGAAmG;IACnG,KAAK,UAAU;CAChB"}
@@ -0,0 +1,28 @@
1
+ /** What the answer must be. */
2
+ export var DelegatedMode;
3
+ (function (DelegatedMode) {
4
+ /** Prose or code. */
5
+ DelegatedMode["Text"] = "text";
6
+ /** Exactly one JSON object satisfying `outputSchema`. */
7
+ DelegatedMode["Json"] = "json";
8
+ /** A list of calls chosen from `tools`. */
9
+ DelegatedMode["Tools"] = "tools";
10
+ })(DelegatedMode || (DelegatedMode = {}));
11
+ /** Who a message came from. Deliberately the four roles every chat API agrees on. */
12
+ export var DelegatedRole;
13
+ (function (DelegatedRole) {
14
+ DelegatedRole["System"] = "system";
15
+ DelegatedRole["User"] = "user";
16
+ DelegatedRole["Assistant"] = "assistant";
17
+ DelegatedRole["Tool"] = "tool";
18
+ })(DelegatedRole || (DelegatedRole = {}));
19
+ /** What shape an answer came back in. */
20
+ export var DelegatedResultKind;
21
+ (function (DelegatedResultKind) {
22
+ DelegatedResultKind["Text"] = "text";
23
+ DelegatedResultKind["Json"] = "json";
24
+ DelegatedResultKind["ToolCalls"] = "tool-calls";
25
+ /** The performer could not answer. Treated as a malformed answer: asked again, with the reason. */
26
+ DelegatedResultKind["Error"] = "error";
27
+ })(DelegatedResultKind || (DelegatedResultKind = {}));
28
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/delegate/consts.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,qBAAqB;IACrB,8BAAa,CAAA;IACb,yDAAyD;IACzD,8BAAa,CAAA;IACb,2CAA2C;IAC3C,gCAAe,CAAA;AACjB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED,qFAAqF;AACrF,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,kCAAiB,CAAA;IACjB,8BAAa,CAAA;IACb,wCAAuB,CAAA;IACvB,8BAAa,CAAA;AACf,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,yCAAyC;AACzC,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,oCAAa,CAAA;IACb,+CAAwB,CAAA;IACxB,mGAAmG;IACnG,sCAAe,CAAA;AACjB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './consts.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delegate/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './types.js';
2
+ export * from './consts.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delegate/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA"}