@openwop/openwop-conformance 1.2.0 → 1.4.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 (144) hide show
  1. package/CHANGELOG.md +156 -1
  2. package/README.md +3 -2
  3. package/api/asyncapi.yaml +8 -0
  4. package/api/openapi.yaml +371 -1
  5. package/api/redocly.yaml +15 -0
  6. package/coverage.md +26 -5
  7. package/fixtures/conformance-agent-reasoning-streaming.json +37 -0
  8. package/fixtures/conformance-dispatch-cancellable-child.json +27 -0
  9. package/fixtures/conformance-dispatch-deterministic-fail-child.json +30 -0
  10. package/fixtures/conformance-dispatch-input-mapping-no-default.json +49 -0
  11. package/fixtures/conformance-dispatch-per-worker-override.json +59 -0
  12. package/fixtures/conformance-envelope-nl-to-format-engaged.json +41 -0
  13. package/fixtures/conformance-envelope-recovery-applied.json +39 -0
  14. package/fixtures/conformance-envelope-refusal.json +38 -0
  15. package/fixtures/conformance-envelope-retry-attempted.json +39 -0
  16. package/fixtures/conformance-envelope-retry-exhausted.json +38 -0
  17. package/fixtures/conformance-envelope-truncated.json +39 -0
  18. package/fixtures/conformance-envelope-truncation-cap-exhaustion.json +39 -0
  19. package/fixtures/conformance-model-capability-insufficient.json +25 -0
  20. package/fixtures/conformance-multi-agent-confidence-escalation.json +49 -0
  21. package/fixtures/conformance-multi-agent-handoff-child.json +27 -0
  22. package/fixtures/conformance-multi-agent-handoff.json +49 -0
  23. package/fixtures/conformance-prompt-all-four-kinds.json +39 -0
  24. package/fixtures/conformance-prompt-end-to-end.json +33 -0
  25. package/fixtures/conformance-subworkflow-input-mapping-no-default.json +33 -0
  26. package/fixtures/conformance-subworkflow-mid-run-mutation-child.json +31 -0
  27. package/fixtures/conformance-subworkflow-mid-run-mutation.json +33 -0
  28. package/fixtures/openwop-smoke-cost-emit.json +37 -0
  29. package/fixtures/prompt-templates/conformance-prompt-few-shot-2.json +14 -0
  30. package/fixtures/prompt-templates/conformance-prompt-few-shot.json +14 -0
  31. package/fixtures/prompt-templates/conformance-prompt-schema-hint.json +14 -0
  32. package/fixtures/prompt-templates/conformance-prompt-secret-redaction.json +23 -0
  33. package/fixtures/prompt-templates/conformance-prompt-trust-marker.json +23 -0
  34. package/fixtures/prompt-templates/conformance-prompt-writer-system.json +15 -0
  35. package/fixtures/prompt-templates/conformance-prompt-writer-user.json +15 -0
  36. package/fixtures.md +45 -0
  37. package/package.json +1 -1
  38. package/schemas/README.md +5 -0
  39. package/schemas/agent-manifest.schema.json +16 -0
  40. package/schemas/capabilities.schema.json +390 -0
  41. package/schemas/core-conformance-mock-agent-config.schema.json +5 -0
  42. package/schemas/envelopes/clarification.request.schema.json +9 -0
  43. package/schemas/envelopes/error.schema.json +4 -0
  44. package/schemas/envelopes/schema.request.schema.json +4 -0
  45. package/schemas/envelopes/schema.response.schema.json +1 -1
  46. package/schemas/node-pack-manifest.schema.json +28 -0
  47. package/schemas/orchestrator-decision.schema.json +12 -0
  48. package/schemas/prompt-kind.schema.json +8 -0
  49. package/schemas/prompt-pack-manifest.schema.json +80 -0
  50. package/schemas/prompt-ref.schema.json +40 -0
  51. package/schemas/prompt-template.schema.json +149 -0
  52. package/schemas/registry-version-manifest.schema.json +5 -0
  53. package/schemas/run-ancestry-response.schema.json +54 -0
  54. package/schemas/run-event-payloads.schema.json +513 -11
  55. package/schemas/run-event.schema.json +17 -1
  56. package/schemas/run-snapshot.schema.json +3 -2
  57. package/schemas/workflow-definition.schema.json +19 -1
  58. package/src/lib/driver.ts +15 -0
  59. package/src/lib/env.ts +51 -0
  60. package/src/lib/event-log-query.ts +62 -0
  61. package/src/lib/fixtures.ts +38 -1
  62. package/src/lib/host-toggle.ts +54 -0
  63. package/src/lib/llm-cache-key-recipe.ts +68 -0
  64. package/src/lib/multi-agent-capabilities.ts +10 -0
  65. package/src/lib/otel-scrape.ts +59 -0
  66. package/src/scenarios/agentReasoningStreaming.test.ts +193 -0
  67. package/src/scenarios/aiEnvelope.capBreached.test.ts +97 -9
  68. package/src/scenarios/aiEnvelope.contractRefusal.test.ts +224 -15
  69. package/src/scenarios/aiEnvelope.correlationReplay.test.ts +257 -25
  70. package/src/scenarios/aiEnvelope.redaction.test.ts +210 -29
  71. package/src/scenarios/aiEnvelope.schemaDrift.test.ts +163 -24
  72. package/src/scenarios/aiEnvelope.trustBoundaryPropagation.test.ts +262 -12
  73. package/src/scenarios/aiEnvelope.universalKinds.test.ts +107 -16
  74. package/src/scenarios/blob-presign-expiry.test.ts +42 -9
  75. package/src/scenarios/blob-roundtrip.test.ts +0 -0
  76. package/src/scenarios/cache-ttl-expiry.test.ts +34 -8
  77. package/src/scenarios/cost-attribution.test.ts +124 -11
  78. package/src/scenarios/cross-engine-append-ordering.test.ts +99 -0
  79. package/src/scenarios/cross-host-ancestry-endpoint.test.ts +136 -0
  80. package/src/scenarios/cross-host-causation-shape.test.ts +117 -0
  81. package/src/scenarios/cross-host-traceparent-propagation.test.ts +60 -0
  82. package/src/scenarios/dispatch-cross-worker-handoff.test.ts +34 -3
  83. package/src/scenarios/dispatch-input-mapping.test.ts +75 -6
  84. package/src/scenarios/dispatch-output-mapping.test.ts +96 -6
  85. package/src/scenarios/envelope-completion-distinguishes-truncation.test.ts +223 -0
  86. package/src/scenarios/envelope-nl-to-format-engaged.test.ts +152 -0
  87. package/src/scenarios/envelope-reasoning-secret-redaction.test.ts +343 -0
  88. package/src/scenarios/envelope-reasoning-shape.test.ts +190 -0
  89. package/src/scenarios/envelope-recovery-applied.test.ts +229 -0
  90. package/src/scenarios/envelope-refusal-shape.test.ts +289 -0
  91. package/src/scenarios/envelope-retry-attempted.test.ts +258 -0
  92. package/src/scenarios/envelope-retry-exhausted.test.ts +168 -0
  93. package/src/scenarios/envelope-tier-one-subset-static.test.ts +229 -0
  94. package/src/scenarios/envelope-truncated.test.ts +136 -0
  95. package/src/scenarios/envelope-truncation-cap-exhaustion.test.ts +144 -0
  96. package/src/scenarios/envelope-variant-discriminator-static.test.ts +152 -0
  97. package/src/scenarios/fixtures-gating.test.ts +139 -1
  98. package/src/scenarios/fixtures-valid.test.ts +123 -15
  99. package/src/scenarios/kv-ttl-expiry.test.ts +40 -9
  100. package/src/scenarios/model-capability-insufficient.test.ts +221 -0
  101. package/src/scenarios/model-capability-substituted.test.ts +203 -0
  102. package/src/scenarios/multi-agent-confidence-escalation.test.ts +164 -0
  103. package/src/scenarios/multi-agent-handoff-state-machine.test.ts +167 -0
  104. package/src/scenarios/multi-agent-memory-lifecycle.test.ts +124 -0
  105. package/src/scenarios/multi-region-idempotency.test.ts +58 -0
  106. package/src/scenarios/node-module-required-capabilities-shape.test.ts +185 -0
  107. package/src/scenarios/otel-trace-propagation-subworkflow.test.ts +19 -0
  108. package/src/scenarios/pack-registry-publish.test.ts +231 -51
  109. package/src/scenarios/prompt-all-four-kinds-events.test.ts +198 -0
  110. package/src/scenarios/prompt-composed-secret-redaction.test.ts +178 -0
  111. package/src/scenarios/prompt-composed-trust-marker.test.ts +165 -0
  112. package/src/scenarios/prompt-end-to-end-events.test.ts +202 -0
  113. package/src/scenarios/prompt-list-and-fetch.test.ts +207 -0
  114. package/src/scenarios/prompt-mutable-lifecycle.test.ts +216 -0
  115. package/src/scenarios/prompt-pack-install.test.ts +187 -0
  116. package/src/scenarios/prompt-render-deterministic.test.ts +240 -0
  117. package/src/scenarios/prompt-resolution-chain-agent-intrinsic.test.ts +140 -0
  118. package/src/scenarios/prompt-resolution-chain-fallback-cascade.test.ts +172 -0
  119. package/src/scenarios/prompt-resolution-chain-node-wins.test.ts +144 -0
  120. package/src/scenarios/prompt-template-shape.test.ts +359 -0
  121. package/src/scenarios/provider-usage.test.ts +185 -0
  122. package/src/scenarios/queue-ack-nack-dlq.test.ts +64 -10
  123. package/src/scenarios/queue-publish-consume-roundtrip.test.ts +50 -10
  124. package/src/scenarios/replay-divergence-at-refusal.test.ts +134 -0
  125. package/src/scenarios/replay-llm-cache-key-portable.test.ts +197 -0
  126. package/src/scenarios/replay-llm-cache-key.test.ts +127 -25
  127. package/src/scenarios/replay-observable-sequence-determinism.test.ts +80 -0
  128. package/src/scenarios/sandbox-capability-gate-respected.test.ts +31 -0
  129. package/src/scenarios/sandbox-memory-cap.test.ts +61 -0
  130. package/src/scenarios/sandbox-no-cross-pack-mutation.test.ts +35 -0
  131. package/src/scenarios/sandbox-no-host-env-leak.test.ts +38 -0
  132. package/src/scenarios/sandbox-no-host-fs-escape.test.ts +91 -0
  133. package/src/scenarios/sandbox-no-host-process-escape.test.ts +30 -0
  134. package/src/scenarios/sandbox-no-network-escape.test.ts +49 -0
  135. package/src/scenarios/sandbox-timeout-cap.test.ts +61 -0
  136. package/src/scenarios/search-bm25-roundtrip.test.ts +54 -9
  137. package/src/scenarios/spec-corpus-validity.test.ts +34 -6
  138. package/src/scenarios/sql-transaction-atomicity.test.ts +37 -8
  139. package/src/scenarios/stream-subscribe-from-beginning.test.ts +46 -9
  140. package/src/scenarios/subworkflow-input-mapping.test.ts +146 -10
  141. package/src/scenarios/table-cursor-pagination.test.ts +47 -9
  142. package/src/scenarios/table-schema-enforcement.test.ts +46 -9
  143. package/src/scenarios/vector-knn-roundtrip.test.ts +50 -10
  144. package/src/scenarios/workflow-chain-host-expansion.test.ts +202 -0
@@ -0,0 +1,33 @@
1
+ {
2
+ "id": "conformance-prompt-end-to-end",
3
+ "name": "Conformance: Prompt-Library End-to-End",
4
+ "version": "1.0",
5
+ "description": "RFC 0027 + RFC 0029 end-to-end. Single mock-ai node configured with `config.systemPromptRef` pointing at a host-built-in template (`conformance.prompt.writer-system`); when the node executes, the host MUST resolve the ref via the four-layer chain (RFC 0029 §A), emit one `agent.promptResolved` event with the chain trace, compose the body (RFC 0027 §E), emit one `prompt.composed` event, and complete the run successfully. Capability-gated: host MUST advertise `capabilities.prompts.supported: true`. See conformance/src/scenarios/prompt-end-to-end-events.test.ts.",
6
+ "nodes": [
7
+ {
8
+ "id": "writer",
9
+ "typeId": "local.sample.demo.mock-ai",
10
+ "name": "Writer (mock AI)",
11
+ "position": { "x": 0, "y": 0 },
12
+ "config": {
13
+ "systemPromptRef": "prompt:conformance.prompt.writer-system@1.0.0"
14
+ },
15
+ "inputs": {}
16
+ }
17
+ ],
18
+ "edges": [],
19
+ "triggers": [
20
+ { "id": "manual", "type": "manual", "enabled": true }
21
+ ],
22
+ "variables": [
23
+ {
24
+ "name": "prompt",
25
+ "type": "string",
26
+ "description": "Optional inline prompt content. The mock-ai node prefers the composed body from `config.systemPromptRef` when present; this variable is the fallback baseline if no ref resolves.",
27
+ "required": false,
28
+ "defaultValue": "conformance baseline prompt"
29
+ }
30
+ ],
31
+ "metadata": { "tags": ["conformance", "prompts", "end-to-end"] },
32
+ "settings": { "timeout": 10000 }
33
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "id": "conformance-subworkflow-input-mapping-no-default",
3
+ "name": "Conformance: subWorkflow Input Mapping — currentPrdId unset (RFC 0022 §B HVMAP-2-unset)",
4
+ "version": "1.0",
5
+ "description": "RFC 0022 §B / HVMAP-2-unset — parent variant of `conformance-subworkflow-input-mapping` that DECLARES `currentPrdId` in `variables[]` but OMITS its `defaultValue`. The `core.subWorkflow` node's `inputMapping: { receivedPrdId: 'currentPrdId' }` projects an unset parent variable. Per RFC 0022 §B normative bullet: child `receivedPrdId` MUST surface as `undefined` (NOT `null`, NOT omitted) — distinct from the child's own `defaultValue` fold. Same shape as the base fixture; only `currentPrdId.defaultValue` is removed. See subworkflow-input-mapping.test.ts § HVMAP-2-unset.",
6
+ "nodes": [
7
+ {
8
+ "id": "subwf-call",
9
+ "typeId": "core.subWorkflow",
10
+ "name": "Invoke child with inputMapping (parent var unset)",
11
+ "position": { "x": 0, "y": 0 },
12
+ "config": {
13
+ "workflowId": "conformance-subworkflow-input-mapping-child",
14
+ "waitForCompletion": true,
15
+ "onChildFailure": "fail-parent",
16
+ "inputMapping": { "receivedPrdId": "currentPrdId" }
17
+ },
18
+ "inputs": {}
19
+ }
20
+ ],
21
+ "edges": [],
22
+ "triggers": [
23
+ { "id": "manual", "type": "manual", "enabled": true }
24
+ ],
25
+ "variables": [
26
+ { "name": "currentPrdId", "type": "string" }
27
+ ],
28
+ "metadata": {
29
+ "tags": ["conformance", "rfc-0022", "subworkflow", "input-mapping", "hvmap-2-unset"],
30
+ "requiresCapability": "capabilities.subWorkflow.inputMapping"
31
+ },
32
+ "settings": { "timeout": 10000 }
33
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "id": "conformance-subworkflow-mid-run-mutation-child",
3
+ "name": "Conformance: subWorkflow one-shot fold — child (RFC 0022 §B HVMAP-2)",
4
+ "version": "1.0",
5
+ "description": "Child fixture for `conformance-subworkflow-mid-run-mutation`. The child declares `receivedPrdId.defaultValue='baked-in'` (overridden at dispatch-time by the parent's `inputMapping`), then suspends on an approval gate so the test can mutate the parent's `currentPrdId` while the child is paused. On resume the child terminates; the assertion reads the child's final `receivedPrdId` variable and confirms it remained at the dispatch-time projected value (NOT the parent's later-mutated value).",
6
+ "nodes": [
7
+ {
8
+ "id": "child-gate",
9
+ "typeId": "core.approvalGate",
10
+ "name": "Pause so parent can mutate currentPrdId",
11
+ "position": { "x": 0, "y": 0 },
12
+ "config": {
13
+ "title": "HVMAP-2 mid-run pause",
14
+ "description": "Held by the conformance harness so the parent can mutate its variable bag while the child is suspended; on resume the child completes and the test reads its final receivedPrdId.",
15
+ "actions": ["accept", "reject"]
16
+ },
17
+ "inputs": {}
18
+ }
19
+ ],
20
+ "edges": [],
21
+ "triggers": [
22
+ { "id": "manual", "type": "manual", "enabled": true }
23
+ ],
24
+ "variables": [
25
+ { "name": "receivedPrdId", "type": "string", "defaultValue": "baked-in" }
26
+ ],
27
+ "metadata": {
28
+ "tags": ["conformance", "rfc-0022", "subworkflow", "input-mapping", "hvmap-2", "child"]
29
+ },
30
+ "settings": { "timeout": 30000 }
31
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "id": "conformance-subworkflow-mid-run-mutation",
3
+ "name": "Conformance: subWorkflow inputMapping is a one-shot fold (RFC 0022 §B HVMAP-2)",
4
+ "version": "1.0",
5
+ "description": "RFC 0022 §B HVMAP-2 — `inputMapping` is a one-shot fold at child-dispatch time; mid-run mutations to the parent variable bag MUST NOT propagate into the already-seeded child. Parent declares `currentPrdId: 'seeded-id'`, dispatches the child (`conformance-subworkflow-mid-run-mutation-child`) with `inputMapping: { receivedPrdId: 'currentPrdId' }`. The child suspends on an approval gate, giving the test window to POST `/v1/host/sample/test/runs/:parentRunId/variables { variables: { currentPrdId: 'mutated-id' } }` against the parent. After the parent mutation, the test resolves the child's approval; the child terminates and its final `receivedPrdId` variable MUST still equal `seeded-id` (the dispatch-time fold). Pairs with `subworkflow-input-mapping.test.ts §HVMAP-2-no-midrun-propagation`.",
6
+ "nodes": [
7
+ {
8
+ "id": "subwf-call",
9
+ "typeId": "core.subWorkflow",
10
+ "name": "Invoke child with inputMapping (one-shot fold)",
11
+ "position": { "x": 0, "y": 0 },
12
+ "config": {
13
+ "workflowId": "conformance-subworkflow-mid-run-mutation-child",
14
+ "waitForCompletion": true,
15
+ "onChildFailure": "fail-parent",
16
+ "inputMapping": { "receivedPrdId": "currentPrdId" }
17
+ },
18
+ "inputs": {}
19
+ }
20
+ ],
21
+ "edges": [],
22
+ "triggers": [
23
+ { "id": "manual", "type": "manual", "enabled": true }
24
+ ],
25
+ "variables": [
26
+ { "name": "currentPrdId", "type": "string", "defaultValue": "seeded-id" }
27
+ ],
28
+ "metadata": {
29
+ "tags": ["conformance", "rfc-0022", "subworkflow", "input-mapping", "hvmap-2"],
30
+ "requiresCapability": "capabilities.subWorkflow.inputMapping"
31
+ },
32
+ "settings": { "timeout": 30000 }
33
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "id": "openwop-smoke-cost-emit",
3
+ "name": "Conformance: cost-attribute allowlist + credential redaction (O4 / G6)",
4
+ "version": "1.0",
5
+ "description": "Drives the `conformance.cost.emit` typeId with a payload that mixes ALLOWLISTED `openwop.cost.*` attributes (per `spec/v1/observability.md §\"Cost attribution attributes\"`) with two intentional violations: (a) a non-allowlisted key (`openwop.cost.evil`) which MUST be dropped by `sanitizeCostForOtel`, and (b) a credential-shaped canary under a non-allowlisted name (`openwop.cost.leaked_token`) which MUST NOT appear in any OTel span attribute. Conformance scenario `cost-attribution.test.ts` reads the run's OTel spans (via the in-suite collector when `OPENWOP_OTEL_COLLECTOR=true`) and asserts the cost-namespace attrs are a strict subset of the allowlist AND that no canary plaintext leaked. Pairs with the `cost-attribution-allowlist-redaction` SECURITY invariant.",
6
+ "nodes": [
7
+ {
8
+ "id": "emit-cost",
9
+ "typeId": "conformance.cost.emit",
10
+ "name": "Emit cost attrs (mix of allowed + dropped)",
11
+ "position": { "x": 0, "y": 0 },
12
+ "config": {
13
+ "attrs": {
14
+ "openwop.cost.tokens.input": 100,
15
+ "openwop.cost.tokens.output": 50,
16
+ "openwop.cost.tokens.total": 150,
17
+ "openwop.cost.usd": 0.00123,
18
+ "openwop.cost.currency": "usd",
19
+ "openwop.cost.estimated": true,
20
+ "openwop.cost.provider": "anthropic",
21
+ "openwop.cost.evil": "must-be-dropped",
22
+ "openwop.cost.leaked_token": "sk-ant-CANARY-openwop-CONFORMANCE-NEVER-SECRET-cost-attr-leak"
23
+ }
24
+ },
25
+ "inputs": {}
26
+ }
27
+ ],
28
+ "edges": [],
29
+ "triggers": [
30
+ { "id": "manual", "type": "manual", "enabled": true }
31
+ ],
32
+ "variables": [],
33
+ "metadata": {
34
+ "tags": ["conformance", "observability", "cost-attribution", "g6", "o4", "security"]
35
+ },
36
+ "settings": { "timeout": 10000 }
37
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "templateId": "conformance.prompt.few-shot-2",
3
+ "version": "1.0.0",
4
+ "kind": "few-shot",
5
+ "text": "Example 3:\nQ: Summarize a paragraph about chocolate in two sentences.\nA: Chocolate is made from fermented and roasted cacao seeds. It is consumed worldwide as both confectionery and a flavoring for drinks and desserts.\n\nExample 4:\nQ: Summarize a paragraph about cheese in two sentences.\nA: Cheese is produced by curdling milk and aging the resulting solids. It exists in hundreds of regional varieties that differ in texture, flavor, and ripening method.",
6
+ "name": "Conformance: Few-shot exemplars (set 2)",
7
+ "description": "Second `kind: \"few-shot\"` template paired with `conformance.prompt.few-shot` to give the four-kinds conformance fixture a multi-entry `fewShotPromptRefs[]` array. Variable-free; renders verbatim. The multi-entry shape is the templateKinds-coverage regression pin for `fewShotPromptRefs[slotIndex]` resolution per RFC 0027 §A — a host that only handles entry [0] would silently drop this template.",
8
+ "tags": ["conformance", "few-shot"],
9
+ "meta": {
10
+ "author": "openwop-conformance-suite",
11
+ "createdAt": "2026-05-20T00:00:00Z",
12
+ "source": "host"
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "templateId": "conformance.prompt.few-shot",
3
+ "version": "1.0.0",
4
+ "kind": "few-shot",
5
+ "text": "Example 1:\nQ: Summarize a paragraph about coffee in two sentences.\nA: Coffee is brewed from roasted seeds of the Coffea plant. It is one of the world's most-traded commodities by value.\n\nExample 2:\nQ: Summarize a paragraph about tea in two sentences.\nA: Tea is brewed from cured leaves of the Camellia sinensis plant. It is consumed in more countries than coffee but produces less global trade value.",
6
+ "name": "Conformance: Few-shot exemplars (Q/A pairs)",
7
+ "description": "few-shot-kind PromptTemplate used by the prompt-end-to-end-events conformance scenario to assert all four kinds dispatch end-to-end. Variable-free; renders verbatim. Two Q/A exemplars in the conventional shape — real provider dispatchers route each exemplar to a separate assistant/user message pair; the mock LLM here just concatenates them into the composed body.",
8
+ "tags": ["conformance", "few-shot"],
9
+ "meta": {
10
+ "author": "openwop-conformance-suite",
11
+ "createdAt": "2026-05-20T00:00:00Z",
12
+ "source": "host"
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "templateId": "conformance.prompt.schema-hint",
3
+ "version": "1.0.0",
4
+ "kind": "schema-hint",
5
+ "text": "Respond as a JSON object with exactly these keys: `topic` (string), `tone` (string), `outline` (array of three strings).",
6
+ "name": "Conformance: Schema hint (structured-output directive)",
7
+ "description": "schema-hint-kind PromptTemplate used by the prompt-end-to-end-events conformance scenario to assert all four kinds dispatch end-to-end. Variable-free; renders verbatim. Conventional dispatch slot per RFC 0027 §A is the structured-output directive a vendor SDK injects as `response_format` / `responseSchema` adjacent to the system message.",
8
+ "tags": ["conformance", "schema-hint"],
9
+ "meta": {
10
+ "author": "openwop-conformance-suite",
11
+ "createdAt": "2026-05-20T00:00:00Z",
12
+ "source": "host"
13
+ }
14
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "templateId": "conformance.prompt.secret-redaction",
3
+ "version": "1.0.0",
4
+ "kind": "user",
5
+ "text": "Authenticate with the following key: {{apiKey}}\nThen summarize the request.",
6
+ "name": "Conformance: Secret-Redaction Probe",
7
+ "description": "Prompt template used by prompt-composed-secret-redaction conformance. The `apiKey` variable's source: secret triggers the [REDACTED:<secretId>] marker in any `prompt.composed` payload emitted under observability: full.",
8
+ "tags": ["conformance", "security", "secret-redaction"],
9
+ "variables": [
10
+ {
11
+ "name": "apiKey",
12
+ "type": "string",
13
+ "required": true,
14
+ "source": "secret",
15
+ "description": "Secret-source variable used to assert SECURITY/threat-model-secret-leakage.md §SR-1 redaction in prompt.composed events."
16
+ }
17
+ ],
18
+ "meta": {
19
+ "author": "openwop-conformance-suite",
20
+ "createdAt": "2026-05-20T00:00:00Z",
21
+ "source": "host"
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "templateId": "conformance.prompt.trust-marker",
3
+ "version": "1.0.0",
4
+ "kind": "user",
5
+ "text": "Process the following user payload: {{userPayload}}\nRespond carefully.",
6
+ "name": "Conformance: Trust-Marker Probe",
7
+ "description": "Prompt template used by prompt-composed-trust-marker conformance. The `userPayload` variable's source: input is tagged untrusted by the test seam to verify <UNTRUSTED>...</UNTRUSTED> wrapping + contentTrust propagation per RFC 0027 §E + RFC 0020 §D.",
8
+ "tags": ["conformance", "security", "trust-marker"],
9
+ "variables": [
10
+ {
11
+ "name": "userPayload",
12
+ "type": "string",
13
+ "required": true,
14
+ "source": "input",
15
+ "description": "User-supplied content; tagged untrusted by the conformance test seam to verify trust-boundary propagation."
16
+ }
17
+ ],
18
+ "meta": {
19
+ "author": "openwop-conformance-suite",
20
+ "createdAt": "2026-05-20T00:00:00Z",
21
+ "source": "host"
22
+ }
23
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "templateId": "conformance.prompt.writer-system",
3
+ "version": "1.0.0",
4
+ "kind": "system",
5
+ "text": "You are a careful editorial writer. Match the requested tone exactly. Keep paragraphs tight. Do not invent facts.",
6
+ "name": "Conformance: Writer (system)",
7
+ "description": "Minimal system-kind PromptTemplate used by prompt-template-shape conformance to assert positive-fixture round-trip. Variable-free; renders verbatim.",
8
+ "tags": ["conformance", "system"],
9
+ "modelHints": { "modelClass": "writing", "temperature": 0.7 },
10
+ "meta": {
11
+ "author": "openwop-conformance-suite",
12
+ "createdAt": "2026-05-20T00:00:00Z",
13
+ "source": "host"
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "templateId": "conformance.prompt.writer-user",
3
+ "version": "1.0.0",
4
+ "kind": "user",
5
+ "text": "Please write a 100-word piece on a topic chosen by the system prompt. Keep it tight.",
6
+ "name": "Conformance: Writer (user)",
7
+ "description": "Minimal `kind: \"user\"` template paired with `conformance.prompt.writer-system` to give the four-kinds conformance fixture a kind-accurate user slot (the system slot uses the writer-system template). Variable-free; renders verbatim.",
8
+ "tags": ["conformance", "user"],
9
+ "modelHints": { "modelClass": "writing", "temperature": 0.7 },
10
+ "meta": {
11
+ "author": "openwop-conformance-suite",
12
+ "createdAt": "2026-05-20T00:00:00Z",
13
+ "source": "host"
14
+ }
15
+ }
package/fixtures.md CHANGED
@@ -52,6 +52,8 @@ All fixtures MUST advertise:
52
52
  | Idempotent | `conformance-idempotent` | Verifies `Idempotency-Key` cache | `completed` | ≤ 5s |
53
53
  | Cancellable | `conformance-cancellable` | Verifies `:cancel` endpoint mid-run | `cancelled` after cancel | ≤ 60s (input-controlled) |
54
54
  | Capability Missing | `conformance-capability-missing` | Verifies dispatch refusal on unsatisfied `requires` | `failed` (`error.code='capability_not_provided'`) | ≤ 5s |
55
+ | Prompt End-to-End | `conformance-prompt-end-to-end` | RFC 0027 + RFC 0029 end-to-end. Single `mock-ai` node with `config.systemPromptRef` set; host MUST emit `agent.promptResolved` + `prompt.composed` events during dispatch, then complete. Capability-gated on `capabilities.prompts.supported`. | `completed` | ≤ 10s |
56
+ | Prompt All Four Kinds | `conformance-prompt-all-four-kinds` | RFC 0027 §A four-kind dispatch coverage with a MULTI-ENTRY `fewShotPromptRefs[]` array. Single `mock-ai` node with one ref per singular-kind slot (`systemPromptRef`, `userPromptRef`, `schemaHintPromptRef`) + two distinct templateIds in `fewShotPromptRefs[]`; host MUST emit 5 `agent.promptResolved` events (one per slot) AND 5 `prompt.composed` events. Multi-entry few-shot is the regression pin for `fewShotPromptRefs[slotIndex]` per-index resolution — a host that hard-codes `[0]` would emit the same template twice in the few-shot events and fail the per-templateId assertion. Capability-gated on `capabilities.prompts.supported`. | `completed` | ≤ 10s |
55
57
  | Dispatch Loop | `conformance-dispatch-loop` | Verifies `core.dispatch` loop mechanism | `completed` | ≤ 30s |
56
58
  | Interrupt — Quorum | `conformance-interrupt-quorum` | Verifies `openwop-interrupt-quorum` profile (multi-approver, majority rejection) | `completed` after 3 accepts, `failed` after quorum reject | unbounded (suspends) |
57
59
  | Interrupt — External Event | `conformance-interrupt-external-event` | Verifies `openwop-interrupt-external-event` profile (correlation-matched callback) | `completed` after matching POST, `failed` on timeout | ≤ 60s (timeoutMs configured) |
@@ -59,6 +61,7 @@ All fixtures MUST advertise:
59
61
  | Interrupt — Parent/Child Cancel | `conformance-interrupt-parent-child-cancel` + `conformance-interrupt-parent-child-cancel-child` | Verifies `openwop-interrupt-parent-child` cancel cascade | `cancelled` (both runs) | ≤ 30s |
60
62
  | Agent Identity | `conformance-agent-identity` | Phase 1 — `RunSnapshot.agent` / `runOrchestrator` AgentRef wire-shape | `completed` | ≤ 10s |
61
63
  | Agent Reasoning | `conformance-agent-reasoning` | Phase 1 / RFC 0023 — `agent.*` event family emission + `callId` pairing on `core.conformance.mock-agent` | `completed` | ≤ 15s |
64
+ | Agent Reasoning Streaming | `conformance-agent-reasoning-streaming` | RFC 0024 — `core.conformance.mock-agent` with `mockReasoning.streamChunks` drives incremental `agent.reasoning.delta` events (sequence 0..N-1) followed by exactly one closing `agent.reasoned` whose `reasoning` equals the concatenation. Gated on `capabilities.agents.reasoning.streaming: true`. | `completed` | ≤ 15s |
62
65
  | Agent Low-Confidence | `conformance-agent-low-confidence` | Phase 1 / CP-1 / RFC 0023 — `core.conformance.mock-agent` emits `agent.decided` with confidence < threshold; host MUST follow with `node.suspended { reason: 'low-confidence' }` | `waiting-approval` (suspends) | unbounded (suspends) |
63
66
  | Message Reducer | `conformance-message-reducer` | Phase 1 — `message` reducer idempotency on duplicate `messageId` | `completed` | ≤ 10s |
64
67
  | Agent Pack Install | `conformance-agent-pack-install` | Phase 2 — pack `agents[]` surface as AgentManifest at `GET /v1/packs` | `completed` | ≤ 5s |
@@ -74,6 +77,16 @@ All fixtures MUST advertise:
74
77
  | Dispatch Output Mapping (child) | `conformance-dispatch-output-mapping-child` | RFC 0022 §A / HVMAP-1b — child workflow for the dispatch output-mapping scenario. Declares `childOutcome.defaultValue='done'`; on terminal, parent's `outputMapping` harvests `childOutcome → parentResult`. | `completed` | ≤ 5s |
75
78
  | Dispatch Cross-Worker Handoff (child-a) | `conformance-dispatch-cross-worker-handoff-child-a` | RFC 0022 §A / HVMAP-1c — first child of the cross-worker-handoff scenario. Declares `output.defaultValue='hello'`; on terminal, parent's `perWorkerOutputMappings.child-a` harvests `output → sharedVar`. | `completed` | ≤ 5s |
76
79
  | Dispatch Cross-Worker Handoff (child-b) | `conformance-dispatch-cross-worker-handoff-child-b` | RFC 0022 §A + §D / HVMAP-1c — second child of the cross-worker-handoff scenario. Sequential fan-out — runs after child-a; receives parent's `sharedVar` via `perWorkerInputMappings.child-b` onto its `input` input. Scenario reads child-b's `inputs_json` to assert `inputs.input === 'hello'`. | `completed` | ≤ 5s |
80
+ | Dispatch Input Mapping — unset variant | `conformance-dispatch-input-mapping-no-default` | RFC 0022 §A / HVMAP-1a-null — parent variant that DECLARES `parentName` but OMITS its `defaultValue`. The dispatch's `inputMapping` projects an unset parent variable; per §A normative bullet, child `inputs.childGreeting` MUST surface as `undefined` (NOT `null`, NOT omitted). Reuses `conformance-dispatch-input-mapping-child`. | `completed` | ≤ 30s |
81
+ | subWorkflow Input Mapping — unset variant | `conformance-subworkflow-input-mapping-no-default` | RFC 0022 §B / HVMAP-2-unset — parent variant that DECLARES `currentPrdId` but OMITS its `defaultValue`. Per §B, the unset projection MUST surface as `undefined` (NOT `null`) — distinct from the child's own `defaultValue` fold. Reuses `conformance-subworkflow-input-mapping-child`. | `completed` | ≤ 10s |
82
+ | subWorkflow Mid-Run Mutation (parent) | `conformance-subworkflow-mid-run-mutation` | RFC 0022 §B / HVMAP-2-no-midrun-propagation — `inputMapping` is a one-shot fold at child-dispatch time. Parent declares `currentPrdId='seeded-id'`, dispatches child with `inputMapping`, then test mutates the parent variable via `POST /v1/host/sample/test/runs/:parentRunId/variables` WHILE the child is suspended. The child's `receivedPrdId` MUST remain at the dispatch-time fold (`seeded-id`), proving mid-run parent mutations do NOT propagate. | `completed` | ≤ 30s |
83
+ | subWorkflow Mid-Run Mutation (child) | `conformance-subworkflow-mid-run-mutation-child` | RFC 0022 §B / HVMAP-2-no-midrun-propagation — child workflow with a `core.approvalGate` that suspends so the parent can mutate its variable bag mid-run. Declares `receivedPrdId.defaultValue='baked-in'` (overridden at dispatch by inputMapping). | `completed` | ≤ 30s |
84
+ | Dispatch Per-Worker Mapping Override | `conformance-dispatch-per-worker-override` | RFC 0022 §A / HVMAP-1c-override — parent with BOTH a default `inputMapping` (`{ input: 'defaultX' }`) AND `perWorkerInputMappings.child-b: { input: 'sharedVar' }`. Verifies `effectiveInputMapping` precedence per §A: child-a receives the default, child-b receives the override. Reuses `conformance-dispatch-cross-worker-handoff-child-a` + `-child-b`. | `completed` | ≤ 30s |
85
+ | Dispatch deterministic-fail child | `conformance-dispatch-deterministic-fail-child` | RFC 0022 §B / HVMAP-1b-failed — child workflow that ALWAYS terminates `failed` via `core.fail`. Used by `conformance-dispatch-output-mapping` to verify the parent's `outputMapping` is SKIPPED when the child fails terminally. | `failed` | ≤ 5s |
86
+ | Dispatch cancellable child | `conformance-dispatch-cancellable-child` | RFC 0022 §B / HVMAP-1b-cancelled — child workflow with a long `core.delay` so the test cancels it externally via `POST /v1/runs/{childRunId}/cancel`. Verifies the parent's `outputMapping` is SKIPPED when the child terminates `cancelled`. | `cancelled` | ≤ 60s |
87
+ | Multi-Agent Handoff (parent) | `conformance-multi-agent-handoff` | RFC 0037 Phase 1 — exercises the planner→worker handoff state machine. Supervisor decides one `next-worker`, dispatch spawns the child, harvests outputMapping. Conformance reads the event log for the 4 `core.workflowChain.event` transition records in causation-chained order (`dispatch.began → dispatch.succeeded → child.completed → output.harvested`). Capability-gated on `capabilities.multiAgent.executionModel.supported`. | `completed` | ≤ 30s |
88
+ | Multi-Agent Handoff (child) | `conformance-multi-agent-handoff-child` | RFC 0037 Phase 1 — child for `conformance-multi-agent-handoff`. Declares `childOutcome.defaultValue='handoff-complete'`; the parent's outputMapping harvests it onto `parentResult`, triggering the `output.harvested` transition event. | `completed` | ≤ 5s |
89
+ | Multi-Agent Confidence Escalation | `conformance-multi-agent-confidence-escalation` | RFC 0039 §A — exercises the Phase 2 confidence-floor escalation contract. Supervisor's `mockDispatchPlan` carries ONE decision with `confidence: 0.3` (below the 0.5 spec floor). The host MUST emit `core.workflowChain.confidence-escalated` AND suspend with a clarification interrupt BEFORE any dispatch.began fires; conformance asserts zero `core.workflowChain.event` records (no dispatch). Capability-gated on `capabilities.multiAgent.executionModel.version >= 2`. | `waiting-clarification` | ≤ 30s |
77
90
  | Agent Memory Round-Trip | `conformance-agent-memory-roundtrip` | Phase 3 — `MemoryAdapter.list/get` write → read | `completed` | ≤ 15s |
78
91
  | Agent Memory Cross-Tenant | `conformance-agent-memory-cross-tenant` | Phase 3 / CTI-1 — cross-tenant probe MUST return `[]` / `null` | `completed` | ≤ 10s |
79
92
  | Agent Memory Redaction | `conformance-agent-memory-redaction` | Phase 3 / SR-1 — BYOK plaintext surfaces as `[REDACTED:<id>]` on read | `completed` | ≤ 15s |
@@ -91,6 +104,15 @@ All fixtures MUST advertise:
91
104
  | WASM Pack Memory-Cap Breach | `conformance-wasm-pack-memory-cap-breach` | RFC 0008 §K — invokes the deliberately-misbehaving `vendor.openwop.misbehaving.memory-bomb` pack (allocates 1 GiB beyond the host's `memoryPagesMax`). Host MUST emit `cap.breached` with `kind: "wasm-memory"` and drive the run to terminal `failed`. Misbehaving pack lives at `examples/packs/rust-misbehaving-memory/` and is fixture-only (NOT signed for registry publication). | `failed` (with `cap.breached`) | ≤ 10s |
92
105
  | Configurable Schema | `conformance-configurable-schema` | Track 13 — workflow declares `configurableSchema` (`additionalProperties: false`, `recursionLimit: integer ≥ 1`). Suite verifies `GET /v1/workflows/{id}` surfaces the schema AND `POST /v1/runs` with a mismatched `configurable` returns `validation_error`. | `completed` (with accepted overlay) | ≤ 5s |
93
106
  | Smoke — BYOK Roundtrip | `openwop-smoke-byok-roundtrip` | End-to-end BYOK secret-resolution smoke. Single `conformance.secret.echo` node fetches the host-provisioned canary secret `openwop-conformance-canary-secret`, emits SHA-256 hex + byte length to variables — never the raw value. Spec: `run-options.md` §"Credential references" + `auth.md` §"Secret resolution" + `observability.md` §"Redaction". | `completed` | ≤ 10s |
107
+ | Smoke — Cost Emit (G6 allowlist) | `openwop-smoke-cost-emit` | End-to-end cost-attribute allowlist smoke (G6 / O4). Single `conformance.cost.emit` node configured with a mix of allowlisted `openwop.cost.*` attributes + one non-allowlisted key + one credential-shaped canary under a non-allowlisted name. Scenario reads the live OTel span (when `OPENWOP_OTEL_COLLECTOR=true`) and asserts the cost-namespace attrs ⊆ `OPENWOP_COST_ATTRIBUTE_NAMES` AND that no canary plaintext leaks. Pairs with the `cost-attribution-allowlist-redaction` SECURITY invariant. Spec: `observability.md §"Cost attribution attributes"`. | `completed` | ≤ 10s |
108
+ | Model Capability Insufficient | `conformance-model-capability-insufficient` | RFC 0031 §B step 4 + §D — single `conformance.modelCapability.insufficient` node whose NodeModule declares `requiredModelCapabilities: ['nonexistent-capability-9b3f']`. Executor's gate MUST refuse at dispatch with `error.code = "capability_not_provided"` and emit `model.capability.insufficient` BEFORE `node.failed`. Capability-gated on `capabilities.modelCapabilities.supported: true`. | `failed` (`error.code='capability_not_provided'`) | ≤ 5s |
109
+ | Envelope Retry Attempted | `conformance-envelope-retry-attempted` | RFC 0032 §B.1 — single `core.ai.structuredOutput` node calls the conformance mock provider with a pre-seeded `MockProgram[]` (POSTed to `/v1/host/sample/test/mock-ai/program` by nodeId BEFORE run start). Attempt 1 returns invalid JSON; attempt 2 returns a valid envelope. Host's `dispatchStructured()` retry loop MUST emit exactly one `envelope.retry.attempted` event between the two attempts. Pairs with `envelope-retry-attempted.test.ts`. Capability-gated on `capabilities.envelopes.reliability.supported: true` AND `capabilities.testing.mockProviders` advertised. | `completed` | ≤ 10s |
110
+ | Envelope Retry Exhausted | `conformance-envelope-retry-exhausted` | RFC 0032 §B.2 + RFC 0033 §C — single `core.ai.structuredOutput` node against the mock provider with a program returning invalid JSON on EVERY attempt. Host MUST exhaust its retry budget and emit exactly one `envelope.retry.exhausted` BEFORE `node.failed`. RunSnapshot.error.code MUST be `envelope_payload_invalid` (schema-violation-exhaustion per RFC 0033 §C). | `failed` (`error.code='envelope_payload_invalid'`) | ≤ 10s |
111
+ | Envelope Truncated | `conformance-envelope-truncated` | RFC 0032 §B.4 + RFC 0033 §B — single `core.ai.structuredOutput` node against the mock provider with a 2-entry program: attempt 1 returns `stopReason: 'max_tokens'`; attempt 2 returns a valid envelope. Host MUST emit exactly one `envelope.truncated` event and retry with `maxTokens` strictly greater than the initial budget per `truncationBudgetMultiplier`. | `completed` (after truncation-retry succeeds) | ≤ 10s |
112
+ | Envelope Truncation Cap Exhaustion | `conformance-envelope-truncation-cap-exhaustion` | RFC 0033 §B + §F DoS-bound assertion — mock provider returns `stopReason: 'max_tokens'` on EVERY attempt. Host MUST emit `envelope.retry.exhausted { finalReason: 'truncation' }`, fail with `error.code: 'envelope_truncation_unrecoverable'`, AND bound the total LLM call count to the advertised `maxRetryAttempts` (no infinite-budget-doubling loop). | `failed` (`error.code='envelope_truncation_unrecoverable'`) | ≤ 10s |
113
+ | Envelope Refusal | `conformance-envelope-refusal` | RFC 0032 §B.3 + RFC 0033 §D + §F end-to-end refusal — mock provider returns `stopReason: 'safety'` with `refusalText`. Host MUST emit exactly one `envelope.refusal` event, NOT retry (RFC 0033 §D), fail with `error.code: 'envelope_refused_by_provider'`, AND keep refusalText off `RunSnapshot.error.message` (SECURITY invariant `envelope-refusal-no-prompt-leak`). | `failed` (`error.code='envelope_refused_by_provider'`) | ≤ 10s |
114
+ | Envelope Recovery Applied | `conformance-envelope-recovery-applied` | RFC 0032 §B.6 lenient-parse — mock returns a markdown-fenced JSON envelope (```json\\n...\\n```). Host's `dispatchStructured()` lenient-parse fallback (`tryLenientParse()`) strips the fence, emits exactly one `envelope.recovery.applied` with `path: 'markdown-fence'`, and accepts the parsed value WITHOUT counting against the retry budget per RFC 0033 §D. | `completed` | ≤ 10s |
115
+ | Envelope NL-to-Format Engaged | `conformance-envelope-nl-to-format-engaged` | RFC 0032 §B.5 NL-to-Format fallback — mock returns natural-language prose on the first 3 attempts (exhausting the retry budget); the host detects the NL shape after exhaustion, emits exactly one `envelope.nlToFormat.engaged { originalEnvelopeType, fallbackCalls: 1 }`, then fires ONE additional dispatch with a corrective coercion fragment. The 4th program entry returns valid JSON; the schema validates; the run terminates `completed`. | `completed` | ≤ 10s |
94
116
 
95
117
  The `messages`-mode stream fixture (AI token streaming) is covered by the deterministic mock-provider surface in `spec/v1/run-options.md`. Hosts that do not advertise `Capabilities.testing.mockProviders` skip-equivalent on those scenarios.
96
118
 
@@ -426,6 +448,29 @@ Pack-manifest fixtures are exercised by the server-free `fixtures-valid.test.ts`
426
448
 
427
449
  ---
428
450
 
451
+ ## Prompt-template fixtures
452
+
453
+ The `fixtures/prompt-templates/` sub-directory holds canonical PromptTemplate documents (per RFC 0027 §A) used as schema-level proof points (validated server-free against `../schemas/prompt-template.schema.json`). They are NOT seeded into a workflow store. They exist so the `prompt-template-shape` scenario has stable positive fixtures, the secret-redaction + trust-marker conformance scenarios have known fixture templateIds to compose against (when a host advertises `capabilities.prompts.supported: true` + `observability: "full"`), and follow-up RFCs (RFC 0028 prompt packs, RFC 0029 resolution chain) can reference a stable shared fixture set.
454
+
455
+ | Fixture | `templateId` | Purpose |
456
+ |---|---|---|
457
+ | `conformance-prompt-writer-system` | `conformance.prompt.writer-system` | Minimal `kind: "system"` template with no variables. Asserts positive round-trip against the canonical schema. |
458
+ | `conformance-prompt-secret-redaction` | `conformance.prompt.secret-redaction` | `kind: "user"` template carrying a `source: "secret"` variable. Drives `prompt-composed-secret-redaction` scenario; the host's compose seam binds `apiKey` to a canary-marker secret and the scenario asserts the `[REDACTED:<secretId>]` marker appears in `prompt.composed` payload. |
459
+ | `conformance-prompt-trust-marker` | `conformance.prompt.trust-marker` | `kind: "user"` template with a `source: "input"` variable. The conformance compose seam tags the binding `meta.contentTrust: "untrusted"` so the `prompt-composed-trust-marker` scenario asserts `<UNTRUSTED>...</UNTRUSTED>` wrapping + `contentTrust: "untrusted"` propagation. |
460
+ | `conformance-prompt-schema-hint` | `conformance.prompt.schema-hint` | `kind: "schema-hint"` template — structured-output directive instructing the model to emit a specific JSON shape. Variable-free. Used by the `prompt-all-four-kinds-events` scenario to exercise the schema-hint dispatch slot on the reference workflow-engine's `local.sample.demo.mock-ai` node. |
461
+ | `conformance-prompt-few-shot` | `conformance.prompt.few-shot` | `kind: "few-shot"` template carrying two Q/A exemplar pairs (coffee + tea). Variable-free. Used by the `prompt-all-four-kinds-events` scenario as the FIRST entry of the multi-entry `fewShotPromptRefs[]` array — exercises `slotIndex: 0` of the resolver's per-index lookup. |
462
+ | `conformance-prompt-few-shot-2` | `conformance.prompt.few-shot-2` | Second `kind: "few-shot"` template carrying two Q/A exemplar pairs (chocolate + cheese). Variable-free. Used by the `prompt-all-four-kinds-events` scenario as the SECOND entry of the multi-entry `fewShotPromptRefs[]` array — exercises `slotIndex: 1`. The regression pin for `fewShotPromptRefs[slotIndex]` per-index resolution; a host that hard-codes `[0]` silently drops this template. |
463
+ | `conformance-prompt-writer-user` | `conformance.prompt.writer-user` | Minimal `kind: "user"` template paired with `conformance.prompt.writer-system` to give the four-kinds fixture a kind-accurate user slot. Variable-free; renders verbatim. |
464
+
465
+ Fixture invariants enforced by `fixtures-valid.test.ts`:
466
+ 1. Every file under `prompt-templates/` validates against `prompt-template.schema.json`.
467
+ 2. Every file declares a non-empty `templateId`.
468
+ 3. Any fixture declaring a `source: "secret"` variable MUST carry the `secret-redaction` tag — the prompt-composed-secret-redaction scenario discovers fixtures by tag, so an untagged fixture would silently bypass redaction assertions.
469
+
470
+ Prompt-template fixtures are exercised by the server-free `fixtures-valid.test.ts` scenarios — adding one runs the schema validator against it automatically. Capability-gated behavioral scenarios (`prompt-composed-secret-redaction`, `prompt-composed-trust-marker`) skip cleanly when the host doesn't advertise `capabilities.prompts.supported: true` + `observability: "full"`.
471
+
472
+ ---
473
+
429
474
  ## References
430
475
 
431
476
  - `README.md` — conformance suite operator docs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwop/openwop-conformance",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Production-ready black-box conformance suite for OpenWOP v1.0 compliant servers.",
5
5
  "repository": {
6
6
  "type": "git",
package/schemas/README.md CHANGED
@@ -24,8 +24,13 @@
24
24
  | `memory-list-options.schema.json` | memory-layer RFC | Query options for listing agent memory entries |
25
25
  | `node-pack-manifest.schema.json` | `node-packs.md` | Pack manifest (`pack.json`) — name, version, engines, nodes[], runtime, signing |
26
26
  | `pack-lockfile.schema.json` | `node-packs.md` §"Dependency resolution + lockfile" | Reproducible-build lockfile pinning resolved pack versions + SHA-256 integrity + Ed25519 signature for the entire workspace dependency graph |
27
+ | `prompt-kind.schema.json` | `prompts.md` + RFC 0027 | Shared `string` enum (`system` / `user` / `few-shot` / `schema-hint`) `$ref`-ed by every schema that names a prompt kind. Single edit point when introducing a new kind. |
28
+ | `prompt-pack-manifest.schema.json` | `prompts.md` §"Discovery & distribution" + RFC 0028 | Manifest for `kind: "prompt"` registry packs. Peer to `node-pack-manifest.schema.json` (RFC 0003) and `workflow-chain-pack-manifest.schema.json` (RFC 0013); disjoint via the `kind` discriminator. Distributes curated PromptTemplate collections via the same signed-tarball + Ed25519 + SRI pipeline. |
29
+ | `prompt-ref.schema.json` | `prompts.md` + RFC 0027 | Reference to a PromptTemplate. `oneOf` accepts the stringy form (`prompt:templateId@version`) or a structured object with `libraryId` / `templateId` / `version` / `variableOverrides`. |
30
+ | `prompt-template.schema.json` | `prompts.md` + RFC 0027 | Named, versioned, variable-bound prompt body. Carries `templateId` + SemVer `version` + `kind` (via `prompt-kind.schema.json`) + Mustache `text` + typed `variables[]` + optional `modelHints` + `meta` provenance (incl. RFC 0028 `packName` + `packVersion` when pack-sourced). |
27
31
  | `registry-version-manifest.schema.json` | `registry-operations.md` | Registry-augmented version manifest served at `GET /v1/packs/{name}/-/{version}.json`. Extends the bare pack-manifest contract with registry-side metadata (integrity hash, signing-block polymorphism, lifecycle flags). Enforced by the `Validate version manifests against registry-version-manifest schema` step in `.github/workflows/registry-publish.yml`. |
28
32
  | `orchestrator-decision.schema.json` | `node-packs.md` + orchestrator RFC | Decision output shape for orchestrator routing nodes |
33
+ | `run-ancestry-response.schema.json` | `multi-agent-execution.md` + RFC 0040 | Response body for `GET /v1/runs/{runId}/ancestry` — names the run's immediate parent in the cross-host composition chain (or `parent: null` for top-level runs). Capability-gated on `capabilities.multiAgent.executionModel.crossHostCausation.ancestryEndpointSupported`. |
29
34
  | `run-event-payloads.schema.json` | `run-event.schema.json` §RunEventType | Per-RunEventType payload contracts, indexed by `$defs.<typeId>` for opt-in strict validation |
30
35
  | `run-event.schema.json` | `version-negotiation.md` + `RunEventDoc` | Event log envelope + event type enum |
31
36
  | `run-options.schema.json` | `run-options.md` | Per-run input overlay (configurable + tags + metadata) on `POST /v1/runs` |
@@ -97,6 +97,22 @@
97
97
  "type": "string",
98
98
  "description": "Optional one-line summary for UI / catalog surfaces.",
99
99
  "maxLength": 500
100
+ },
101
+ "promptLibraryRef": {
102
+ "type": "string",
103
+ "pattern": "^[a-z0-9][a-z0-9._-]{0,127}$",
104
+ "description": "RFC 0029 §B. Optional library identifier (per RFC 0028 §C) the agent draws fallback prompts from. When set AND `promptOverrides[kind]` is unset for a given kind, the host MAY look up a same-kind default template from this library at resolution time (layer-2 `agent-library-default` per the resolution chain in `spec/v1/prompts.md` §\"Resolution chain (normative)\"). NOT a replacement for `systemPrompt | systemPromptRef` — those remain the agent's intrinsic system-prompt declaration."
105
+ },
106
+ "promptOverrides": {
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "description": "RFC 0029 §B. Per-kind preferred PromptRefs that apply at resolution chain layer 2 (`agent-overrides`) per `spec/v1/prompts.md` §\"Resolution chain (normative)\". For `system` kind, applies ONLY when the manifest has no intrinsic `systemPrompt | systemPromptRef` (the intrinsic surface wins). For other kinds, applies whenever the node doesn't carry a layer-1 explicit override.",
110
+ "properties": {
111
+ "system": { "$ref": "./prompt-ref.schema.json" },
112
+ "user": { "$ref": "./prompt-ref.schema.json" },
113
+ "few-shot": { "$ref": "./prompt-ref.schema.json" },
114
+ "schema-hint": { "$ref": "./prompt-ref.schema.json" }
115
+ }
100
116
  }
101
117
  },
102
118
  "additionalProperties": false,