promptopskit 0.4.0 → 0.5.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 (82) hide show
  1. package/README.md +98 -57
  2. package/SKILL.md +360 -6
  3. package/dist/chunk-6BOUQVSX.js +130 -0
  4. package/dist/chunk-6BOUQVSX.js.map +1 -0
  5. package/dist/{chunk-F6UJ73Y6.js → chunk-6VLKZCNS.js} +6 -4
  6. package/dist/chunk-6VLKZCNS.js.map +1 -0
  7. package/dist/{chunk-HWEVRBKZ.js → chunk-AGTGIZMR.js} +6 -2
  8. package/dist/chunk-AGTGIZMR.js.map +1 -0
  9. package/dist/{chunk-L2V7LDKD.js → chunk-D75HKF64.js} +6 -4
  10. package/dist/chunk-D75HKF64.js.map +1 -0
  11. package/dist/{chunk-UPTCSWK3.js → chunk-IN4KT5EU.js} +4 -3
  12. package/dist/chunk-IN4KT5EU.js.map +1 -0
  13. package/dist/{chunk-JBLUPKY4.js → chunk-K6ZU3CGV.js} +54 -6
  14. package/dist/chunk-K6ZU3CGV.js.map +1 -0
  15. package/dist/{chunk-XNNDGDPI.js → chunk-KN7H4JRK.js} +61 -4
  16. package/dist/chunk-KN7H4JRK.js.map +1 -0
  17. package/dist/{chunk-HLNVKKMS.js → chunk-LNGHGGJN.js} +6 -4
  18. package/dist/chunk-LNGHGGJN.js.map +1 -0
  19. package/dist/{chunk-RY5DVTLV.js → chunk-QK3WKE3K.js} +6 -4
  20. package/dist/chunk-QK3WKE3K.js.map +1 -0
  21. package/dist/cli/index.js +114 -55
  22. package/dist/cli/index.js.map +1 -1
  23. package/dist/index.cjs +265 -22
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +9 -9
  26. package/dist/index.d.ts +9 -9
  27. package/dist/index.js +32 -10
  28. package/dist/index.js.map +1 -1
  29. package/dist/providers/anthropic.cjs +114 -9
  30. package/dist/providers/anthropic.cjs.map +1 -1
  31. package/dist/providers/anthropic.d.cts +2 -2
  32. package/dist/providers/anthropic.d.ts +2 -2
  33. package/dist/providers/anthropic.js +3 -3
  34. package/dist/providers/gemini.cjs +114 -9
  35. package/dist/providers/gemini.cjs.map +1 -1
  36. package/dist/providers/gemini.d.cts +2 -2
  37. package/dist/providers/gemini.d.ts +2 -2
  38. package/dist/providers/gemini.js +3 -3
  39. package/dist/providers/llmasaservice.cjs +1467 -0
  40. package/dist/providers/llmasaservice.cjs.map +1 -0
  41. package/dist/providers/llmasaservice.d.cts +28 -0
  42. package/dist/providers/llmasaservice.d.ts +28 -0
  43. package/dist/providers/llmasaservice.js +20 -0
  44. package/dist/providers/llmasaservice.js.map +1 -0
  45. package/dist/providers/openai-responses.cjs +114 -9
  46. package/dist/providers/openai-responses.cjs.map +1 -1
  47. package/dist/providers/openai-responses.d.cts +2 -2
  48. package/dist/providers/openai-responses.d.ts +2 -2
  49. package/dist/providers/openai-responses.js +3 -3
  50. package/dist/providers/openai.cjs +114 -9
  51. package/dist/providers/openai.cjs.map +1 -1
  52. package/dist/providers/openai.d.cts +2 -2
  53. package/dist/providers/openai.d.ts +2 -2
  54. package/dist/providers/openai.js +3 -3
  55. package/dist/providers/openrouter.cjs +115 -9
  56. package/dist/providers/openrouter.cjs.map +1 -1
  57. package/dist/providers/openrouter.d.cts +2 -2
  58. package/dist/providers/openrouter.d.ts +2 -2
  59. package/dist/providers/openrouter.js +4 -4
  60. package/dist/{schema-B9A1zLRk.d.cts → schema-D-RI4w-k.d.cts} +695 -183
  61. package/dist/{schema-B9A1zLRk.d.ts → schema-D-RI4w-k.d.ts} +695 -183
  62. package/dist/testing.cjs +21 -4
  63. package/dist/testing.cjs.map +1 -1
  64. package/dist/testing.d.cts +1 -1
  65. package/dist/testing.d.ts +1 -1
  66. package/dist/testing.js +1 -1
  67. package/dist/{types-DjGAwJxC.d.ts → types-B3dxBGu6.d.ts} +18 -6
  68. package/dist/{types-DpbzzZO2.d.cts → types-DbTAjlTN.d.cts} +18 -6
  69. package/dist/usagetap/index.cjs +6 -1
  70. package/dist/usagetap/index.cjs.map +1 -1
  71. package/dist/usagetap/index.d.cts +4 -3
  72. package/dist/usagetap/index.d.ts +4 -3
  73. package/dist/usagetap/index.js +3 -1
  74. package/package.json +11 -1
  75. package/dist/chunk-F6UJ73Y6.js.map +0 -1
  76. package/dist/chunk-HLNVKKMS.js.map +0 -1
  77. package/dist/chunk-HWEVRBKZ.js.map +0 -1
  78. package/dist/chunk-JBLUPKY4.js.map +0 -1
  79. package/dist/chunk-L2V7LDKD.js.map +0 -1
  80. package/dist/chunk-RY5DVTLV.js.map +0 -1
  81. package/dist/chunk-UPTCSWK3.js.map +0 -1
  82. package/dist/chunk-XNNDGDPI.js.map +0 -1
package/README.md CHANGED
@@ -5,48 +5,40 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
6
6
  [![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org)
7
7
 
8
- **Centralize prompts, system instructions, tools, and model settings — without leaving your codebase.**
8
+ **Turn hardcoded AI prompts into versioned, tested application assets.**
9
9
 
10
- Your prompts are already in Git. PromptOpsKit makes them manageable. It replaces hardcoded strings and scattered provider-specific glue with structured Markdown files where prompt text, model settings, sampling parameters, tool bindings, environment overrides, and composable shared instructions all live together — diffable, reviewable, and release-aware.
10
+ Your prompts are already in Git. PromptOpsKit makes them manageable.
11
11
 
12
- Provider adapters for OpenAI, Anthropic, Gemini, and OpenRouter produce a ready-to-send **request body only** no HTTP client, no auth, no headers. Your application owns transport, so PromptOpsKit slots into any stack without opinions about how you call the API.
12
+ Keep prompts, model settings, tools, input validation, shared instructions, environment overrides, and tests together in Markdown files that live in Git and ship with your app. Render provider-ready request bodies without giving up your SDK, gateway, auth, retries, routing, observability, or billing.
13
13
 
14
- ## How is this different from GitHub Models?
14
+ PromptOpsKit is not a prompt dashboard, LLM gateway, or hosted runtime service. It is the repo-native layer between scattered prompt strings and production AI calls.
15
15
 
16
- GitHub Models is a great place to prototype prompts, compare models, and run evaluations inside GitHub.
16
+ ## Why PromptOpsKit?
17
17
 
18
- PromptOpsKit is focused on the application runtime layer.
18
+ From scattered prompt glue:
19
19
 
20
- It helps you turn prompt behavior into repo-native assets that your application can load, validate, compose, compile, and render into provider-specific request bodies.
20
+ - Prompt strings live inline in code
21
+ - Model config and tools drift in separate files
22
+ - Validation checks happen outside the prompt
23
+ - Environment logic hides in if/else branches
24
+ - Testing is ad hoc and hard to review
21
25
 
22
- Use GitHub Models when you want:
26
+ To one reviewable asset:
23
27
 
24
- - a GitHub-hosted prompt editor and playground
25
- - side-by-side model comparisons
26
- - structured evaluations inside GitHub
27
- - `.prompt.yml` files for prompt experiments and evals
28
+ - Prompt, model, tools, and input rules live together
29
+ - `includes` and `defaults.md` avoid copy-paste drift
30
+ - `environments` and `tiers` handle overrides cleanly
31
+ - `.test.yaml` sidecars keep deterministic test behavior
32
+ - Runtime rendering and compiled artifacts support production deployment
28
33
 
29
- Use PromptOpsKit when you want:
34
+ Core capabilities:
30
35
 
31
- - Markdown prompt assets with YAML metadata
32
- - production input hardening and validation
33
- - environment-specific model and parameter overrides
34
- - reusable prompt composition
35
- - compiled artifacts for deployment
36
- - provider-specific request bodies for your own runtime code
37
- - control over SDKs, auth, retries, routing, observability, and billing
38
-
39
- ### Why PromptOpsKit?
40
-
41
- - **Centralized, not scattered** — each prompt is a single Markdown file that captures prompt text, model config, tool bindings, and context rules together.
42
- - **Operational, not just templated** — model name, temperature, reasoning effort, tools, and response format are declared alongside the prompt they govern.
43
- - **Reusable, not duplicated** — `includes` lets you define shared tone, policy, or safety instructions once and compose them into any prompt.
44
- - **Layered defaults, not repetition** — `defaults.md` in any folder sets shared `provider`, `model`, `metadata`, and `# System instructions` for that subtree, with nearest-folder override behavior.
45
- - **Release-aware, not ad hoc** — environment and tier overrides swap models and parameters without forking prompt files.
46
- - **Provider-portable** — write once, render for OpenAI, Anthropic, Gemini, or OpenRouter with correct body shapes.
47
- - **Validate early** — Zod schema validation, Levenshtein-based "did you mean?" suggestions for typos, and variable usage checks catch mistakes before runtime.
48
- - **Compile for production** — pre-compile `.md` to JSON or ESM so deployments skip parsing entirely.
49
- - **Repo-native, not dashboard-native** — no hosted service, no external admin tool. Everything lives in source control.
36
+ - **Markdown prompt assets** capture prompt text, model config, tool bindings, context rules, and metadata together.
37
+ - **Provider-ready output** render request bodies for OpenAI Chat, OpenAI Responses, Anthropic, Gemini, OpenRouter, and LLMAsAService while your app owns transport.
38
+ - **Input hardening** — define required values, size limits, allow/deny patterns, and secret rejection close to the prompt template.
39
+ - **Reusable composition** — share tone, policy, and safety instructions with `includes`, and apply folder-level standards with `defaults.md`.
40
+ - **Environment and tier overrides** — keep dev/prod and plan-specific behavior in one prompt source with explicit, reviewable overrides.
41
+ - **Sidecar tests** run deterministic prompt checks in local development and CI without calling a model.
50
42
 
51
43
  ## Install
52
44
 
@@ -85,26 +77,21 @@ id: support/reply
85
77
  schema_version: 1
86
78
  provider: openai
87
79
  model: gpt-5.4
88
- reasoning:
89
- effort: medium
90
- sampling:
91
- temperature: 0.7
80
+ includes:
81
+ - ./shared/tone.md
92
82
  context:
93
83
  inputs:
94
84
  - name: user_message
95
- non_empty:
96
- return_message: "Please enter a message before continuing."
85
+ non_empty: true
97
86
  reject_secrets: true
98
- - name: app_context
99
- max_size: 2000
100
- allow_regex: /^[A-Za-z0-9 _-]+$/i
101
- includes:
102
- - ./shared/tone.md
87
+ environments:
88
+ dev:
89
+ model: gpt-5.4-mini
103
90
  ---
104
91
 
105
92
  # System instructions
106
93
 
107
- You are a helpful support assistant working in {{ app_context }}.
94
+ You are a helpful support assistant.
108
95
 
109
96
  # Prompt template
110
97
 
@@ -116,14 +103,14 @@ You are a helpful support assistant working in {{ app_context }}.
116
103
  ```typescript
117
104
  import { createPromptOpsKit } from 'promptopskit';
118
105
 
119
- const kit = createPromptOpsKit();
106
+ const kit = createPromptOpsKit({ sourceDir: './prompts' });
120
107
 
121
108
  const result = await kit.renderPrompt({
122
109
  path: 'support/reply',
123
110
  provider: 'openai',
111
+ environment: 'prod',
124
112
  variables: {
125
113
  user_message: 'How do I reset my password?',
126
- app_context: 'Account settings page',
127
114
  },
128
115
  });
129
116
 
@@ -161,13 +148,14 @@ Supported values for `warnings.contextSize` are `auto`, `off`, `result-only`, `c
161
148
  - **Composition** — `includes` to share system instructions across prompts, with circular detection
162
149
  - **Folder defaults** — `defaults.md` inheritance for shared provider, model, metadata, and system instructions
163
150
  - **Overrides** — Environment and tier-based overrides (base → env → tier → runtime)
164
- - **5 provider adapters** — OpenAI (Chat), OpenAI (Responses), Anthropic, Gemini, OpenRouter — body-only output
151
+ - **6 provider adapters** — OpenAI (Chat), OpenAI (Responses), Anthropic, Gemini, OpenRouter, LLMAsAService
165
152
  - **Provider-aware input caching controls** — optional `cache` front matter maps to OpenAI prompt cache hints, Anthropic `cache_control`, and Gemini `cachedContent`
166
153
  - **Vendor escape hatch** — optional `raw.<provider>` blocks shallow-merge unmodeled request-body fields into the final provider payload
167
154
  - **Validation** — Zod schema validation, Levenshtein-based "did you mean?" for typos, variable usage checks
168
155
  - **Context hardening** — copyable `/pattern/i` regex literals, structured regexes with `return_message`, and built-in `non_empty` / `reject_secrets` validators
169
156
  - **Optional short-circuit messages** — validators can return a structured `returnMessage` instead of throwing when configured
170
157
  - **Context size guardrails** — optional per-input `max_size` metadata with non-blocking render-time warnings
158
+ - **History preservation** — optional `context.history.max_items` compacts older conversation turns into one preserved history item, with a runtime `onHistoryCompaction` hook for custom summaries
171
159
  - **Warning controls** — top-level config can suppress or emit context size warnings differently in dev and prod
172
160
  - **Caching** — LRU cache with mtime-based invalidation
173
161
  - **CLI** — init, validate, compile, render, inspect, skill
@@ -215,6 +203,24 @@ result = await kit.renderPrompt({
215
203
  variables: { name: 'World', app_context: 'Welcome screen' },
216
204
  });
217
205
  if (!result.request) throw new Error(result.returnMessage ?? 'Prompt rendering failed.');
206
+
207
+ // LLMAsAService — OpenAI-compatible gateway with project and customer metadata
208
+ result = await kit.renderPrompt({
209
+ path: 'hello',
210
+ provider: 'llmasaservice',
211
+ runtime: {
212
+ provider_options: {
213
+ llmasaservice: {
214
+ project_id: process.env.LLM_GATEWAY_PROJECT_ID,
215
+ customer: { customer_id: 'cust_123', customer_name: 'Acme' },
216
+ },
217
+ },
218
+ },
219
+ variables: { name: 'World', app_context: 'Welcome screen' },
220
+ });
221
+ if (!result.request) throw new Error(result.returnMessage ?? 'Prompt rendering failed.');
222
+ // result.request.body → { model, messages, customer, ... }
223
+ // result.request.headers → { 'x-project-id': '...' }
218
224
  ```
219
225
 
220
226
  Provider adapters are also available as direct imports:
@@ -225,6 +231,7 @@ import { openaiResponsesAdapter } from 'promptopskit/openai-responses';
225
231
  import { anthropicAdapter } from 'promptopskit/anthropic';
226
232
  import { geminiAdapter } from 'promptopskit/gemini';
227
233
  import { openrouterAdapter } from 'promptopskit/openrouter';
234
+ import { llmasaserviceAdapter } from 'promptopskit/llmasaservice';
228
235
  ```
229
236
 
230
237
  Direct adapter rendering also accepts `environment` and `tier` selectors. This is useful for compiled JSON/ESM assets in browser, edge, or worker code:
@@ -254,9 +261,9 @@ In browser or client-side code, keep provider credentials on the server. Use the
254
261
 
255
262
  ### Provider-specific fields and raw passthrough
256
263
 
257
- Use normalized fields first (`sampling`, `response`, `cache`, `tools`) so prompts stay portable. `response.schema` is the neutral JSON Schema path; adapters emit it as OpenAI/OpenRouter `response_format`, OpenAI Responses `text.format`, Anthropic `output_config.format`, and Gemini `generationConfig.responseJsonSchema`.
264
+ Use normalized fields first (`sampling`, `response`, `cache`, `tools`) so prompts stay portable. `response.schema` is the neutral JSON Schema path; adapters emit it as OpenAI/OpenRouter/LLMAsAService `response_format`, OpenAI Responses `text.format`, Anthropic `output_config.format`, and Gemini `generationConfig.responseJsonSchema`.
258
265
 
259
- Use `provider_options` when PromptOpsKit has a known provider-specific mapping, such as Anthropic `top_k`, Gemini's native `response_schema`, or OpenRouter routing fields.
266
+ Use `provider_options` when PromptOpsKit has a known provider-specific mapping, such as Anthropic `top_k`, Gemini's native `response_schema`, OpenRouter routing fields, or LLMAsAService gateway routing/customer metadata.
260
267
 
261
268
  ```yaml
262
269
  response:
@@ -273,8 +280,16 @@ provider_options:
273
280
  provider:
274
281
  order: ["anthropic", "openai"]
275
282
  transforms: ["middle-out"]
283
+ llmasaservice:
284
+ project_id: "llm-project-id"
285
+ # Optional default; usually pass the real customer at render time.
286
+ customer:
287
+ customer_id: "cust_123"
288
+ customer_name: "Acme"
276
289
  ```
277
290
 
291
+ For LLMAsAService, `provider_options.llmasaservice.customer` is intended to be render-time attribution for the current account/user. A prompt can keep a default, but production calls should normally override it through `runtime.provider_options.llmasaservice.customer`.
292
+
278
293
  When a provider adds a body field PromptOpsKit does not model yet, use `raw`:
279
294
 
280
295
  ```yaml
@@ -290,6 +305,8 @@ raw:
290
305
  openrouter:
291
306
  usage:
292
307
  include: true
308
+ llmasaservice:
309
+ conversationId: "conv_123"
293
310
  ```
294
311
 
295
312
  Each adapter reads only its matching raw block and shallow-merges it into the generated request body after normalized mappings. This is intentionally an escape hatch; prefer first-class fields when they exist.
@@ -323,9 +340,32 @@ If you need a different layout, keep passing `sourceDir` and `compiledDir` expli
323
340
 
324
341
  `renderPrompt()` and `validatePrompt()` use the same source-versus-compiled resolution rules as `kit.renderPrompt()`. The existing synchronous `render()` and `validate()` methods still work for already-resolved compiled or inline assets.
325
342
 
343
+ ## How It Compares to GitHub Models
344
+
345
+ GitHub Models is a good place to prototype prompts, compare models, and run evaluations inside GitHub.
346
+
347
+ PromptOpsKit is focused on the application runtime layer. Use it when prompt behavior needs to live in your repo with validated inputs, reusable composition, environment and tier overrides, sidecar tests, compiled artifacts, and provider-ready request bodies.
348
+
349
+ Use GitHub Models when you want:
350
+
351
+ - A GitHub-hosted prompt playground
352
+ - Side-by-side model comparison
353
+ - Evaluation workflows inside GitHub
354
+ - `.prompt.yml` files for prompt experiments and evals
355
+
356
+ Use PromptOpsKit when you want:
357
+
358
+ - Runtime-focused Markdown prompt assets
359
+ - Production input hardening and validation
360
+ - Reusable `includes` and folder-level `defaults.md`
361
+ - Environment-specific model and parameter overrides
362
+ - Deterministic local and CI testing without model calls
363
+ - Provider-specific request bodies for your own runtime code
364
+ - Control over SDKs, auth, retries, routing, observability, and billing
365
+
326
366
  ## Optional UsageTap Tracking
327
367
 
328
- PromptOpsKit can also help you track provider calls with UsageTap.com while keeping the core render API body-only.
368
+ PromptOpsKit can also help you track provider calls with UsageTap.com while keeping the core render API transport-light.
329
369
 
330
370
  ```typescript
331
371
  import { createPromptOpsKit } from 'promptopskit';
@@ -389,7 +429,7 @@ const tracked = await runOpenAIWithUsageTap(usageTap, {
389
429
 
390
430
  Notes:
391
431
  - `entitlementMode` defaults to `'off'`. Set it to `'apply'` only when you want UsageTap allowances to mutate a cloned provider request.
392
- - `runOpenRouterWithUsageTap`, `runAnthropicWithUsageTap`, and `runGeminiWithUsageTap` follow the same pattern.
432
+ - `runOpenRouterWithUsageTap`, `runLLMAsAServiceWithUsageTap`, `runAnthropicWithUsageTap`, and `runGeminiWithUsageTap` follow the same pattern.
393
433
  - `extractOpenAIUsage`, `extractAnthropicUsage`, and `extractGeminiUsage` are public if you want to manage UsageTap lifecycle yourself.
394
434
 
395
435
  For explicit lifecycle control, use `beginUsageTapCall`, `endUsageTapCall`, or `withUsageTapCall` from `promptopskit/usagetap`. Full documentation: [docs/usagetap.md](./docs/usagetap.md).
@@ -582,12 +622,13 @@ Renders a prompt for a specific provider. Returns `{ resolved, request?, returnM
582
622
  |--------|------|-------------|
583
623
  | `path` | `string` | Prompt path (no extension), e.g. `'support/reply'` |
584
624
  | `source` | `string` | Inline prompt source (alternative to path) |
585
- | `provider` | `string` | `'openai'`, `'openai-responses'`, `'anthropic'`, `'gemini'`, `'openrouter'` |
625
+ | `provider` | `string` | `'openai'`, `'openai-responses'`, `'anthropic'`, `'gemini'`, `'openrouter'`, `'llmasaservice'` |
586
626
  | `variables` | `Record<string, string>` | Template variables |
587
627
  | `onContextOverflow` | `(info) => string` | Optional callback to transform oversized context values before rendering |
628
+ | `onHistoryCompaction` | `(info) => string \| { role, content }` | Optional callback to compact overflow history when `context.history.max_items` is exceeded |
588
629
  | `environment` | `string` | Environment override name |
589
630
  | `tier` | `string` | Tier override name |
590
- | `history` | `Array<{ role, content }>` | Conversation history |
631
+ | `history` | `Array<{ role, content }>` | Conversation history. If the prompt declares `context.history.max_items`, older turns are compacted into one preserved history item before provider rendering. |
591
632
  | `toolRegistry` | `Record<string, unknown>` | Tool definitions for resolving string tool references |
592
633
  | `strict` | `boolean` | Fail on missing variables |
593
634
  | `openaiResponses` | `object` | Optional Responses API extras (`previous_response_id`, `conversation`, `instructions`, `parallel_tool_calls`, `max_tool_calls`, `store`, `metadata`, `include`, `background`) |
@@ -610,7 +651,7 @@ Prompt files use YAML front matter with these fields:
610
651
  |-------|------|-------------|
611
652
  | `id` | `string` | Unique prompt identifier (required) |
612
653
  | `schema_version` | `number` | Schema version, currently `1` |
613
- | `provider` | `string` | `openai`, `openai-responses`, `anthropic`, `gemini` (or `google`), `openrouter`, `any` |
654
+ | `provider` | `string` | `openai`, `openai-responses`, `anthropic`, `gemini` (or `google`), `openrouter`, `llmasaservice`, `any` |
614
655
  | `model` | `string` | Model name |
615
656
  | `fallback_models` | `string[]` | Fallback model list |
616
657
  | `reasoning` | `object` | `{ effort, budget_tokens }` |
@@ -618,10 +659,10 @@ Prompt files use YAML front matter with these fields:
618
659
  | `response` | `object` | `{ format, stream, schema, schema_name, schema_description, schema_strict }` |
619
660
  | `cache` | `object` | Provider-specific cache controls (`openai`, `anthropic`, `gemini`/`google`) |
620
661
  | `tools` | `array` | Tool references (string names or inline definitions) |
621
- | `provider_options` | `object` | Provider-specific non-portable options (`anthropic`, `gemini`, `openrouter`) |
622
- | `raw` | `object` | Provider-scoped request-body passthrough (`openai`, `openai-responses`, `anthropic`, `gemini`/`google`, `openrouter`) |
662
+ | `provider_options` | `object` | Provider-specific non-portable options (`anthropic`, `gemini`, `openrouter`, `llmasaservice`) |
663
+ | `raw` | `object` | Provider-scoped request-body passthrough (`openai`, `openai-responses`, `anthropic`, `gemini`/`google`, `openrouter`, `llmasaservice`) |
623
664
  | `mcp` | `object` | MCP server references |
624
- | `context` | `object` | `{ inputs, history }` — declare expected variables, with optional per-input `max_size`, `trim`, structured or literal `allow_regex`/`deny_regex`, and built-in `non_empty` / `reject_secrets` validators |
665
+ | `context` | `object` | `{ inputs, history }` — declare expected variables, with optional per-input `max_size`, `trim`, structured or literal `allow_regex`/`deny_regex`, built-in `non_empty` / `reject_secrets` validators, and `history.max_items` compaction |
625
666
  | `includes` | `string[]` | Paths to included prompt files |
626
667
  | `environments` | `object` | Named environment overrides |
627
668
  | `tiers` | `object` | Named tier overrides |