@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.
- package/CHANGELOG.md +156 -1
- package/README.md +3 -2
- package/api/asyncapi.yaml +8 -0
- package/api/openapi.yaml +371 -1
- package/api/redocly.yaml +15 -0
- package/coverage.md +26 -5
- package/fixtures/conformance-agent-reasoning-streaming.json +37 -0
- package/fixtures/conformance-dispatch-cancellable-child.json +27 -0
- package/fixtures/conformance-dispatch-deterministic-fail-child.json +30 -0
- package/fixtures/conformance-dispatch-input-mapping-no-default.json +49 -0
- package/fixtures/conformance-dispatch-per-worker-override.json +59 -0
- package/fixtures/conformance-envelope-nl-to-format-engaged.json +41 -0
- package/fixtures/conformance-envelope-recovery-applied.json +39 -0
- package/fixtures/conformance-envelope-refusal.json +38 -0
- package/fixtures/conformance-envelope-retry-attempted.json +39 -0
- package/fixtures/conformance-envelope-retry-exhausted.json +38 -0
- package/fixtures/conformance-envelope-truncated.json +39 -0
- package/fixtures/conformance-envelope-truncation-cap-exhaustion.json +39 -0
- package/fixtures/conformance-model-capability-insufficient.json +25 -0
- package/fixtures/conformance-multi-agent-confidence-escalation.json +49 -0
- package/fixtures/conformance-multi-agent-handoff-child.json +27 -0
- package/fixtures/conformance-multi-agent-handoff.json +49 -0
- package/fixtures/conformance-prompt-all-four-kinds.json +39 -0
- package/fixtures/conformance-prompt-end-to-end.json +33 -0
- package/fixtures/conformance-subworkflow-input-mapping-no-default.json +33 -0
- package/fixtures/conformance-subworkflow-mid-run-mutation-child.json +31 -0
- package/fixtures/conformance-subworkflow-mid-run-mutation.json +33 -0
- package/fixtures/openwop-smoke-cost-emit.json +37 -0
- package/fixtures/prompt-templates/conformance-prompt-few-shot-2.json +14 -0
- package/fixtures/prompt-templates/conformance-prompt-few-shot.json +14 -0
- package/fixtures/prompt-templates/conformance-prompt-schema-hint.json +14 -0
- package/fixtures/prompt-templates/conformance-prompt-secret-redaction.json +23 -0
- package/fixtures/prompt-templates/conformance-prompt-trust-marker.json +23 -0
- package/fixtures/prompt-templates/conformance-prompt-writer-system.json +15 -0
- package/fixtures/prompt-templates/conformance-prompt-writer-user.json +15 -0
- package/fixtures.md +45 -0
- package/package.json +1 -1
- package/schemas/README.md +5 -0
- package/schemas/agent-manifest.schema.json +16 -0
- package/schemas/capabilities.schema.json +390 -0
- package/schemas/core-conformance-mock-agent-config.schema.json +5 -0
- package/schemas/envelopes/clarification.request.schema.json +9 -0
- package/schemas/envelopes/error.schema.json +4 -0
- package/schemas/envelopes/schema.request.schema.json +4 -0
- package/schemas/envelopes/schema.response.schema.json +1 -1
- package/schemas/node-pack-manifest.schema.json +28 -0
- package/schemas/orchestrator-decision.schema.json +12 -0
- package/schemas/prompt-kind.schema.json +8 -0
- package/schemas/prompt-pack-manifest.schema.json +80 -0
- package/schemas/prompt-ref.schema.json +40 -0
- package/schemas/prompt-template.schema.json +149 -0
- package/schemas/registry-version-manifest.schema.json +5 -0
- package/schemas/run-ancestry-response.schema.json +54 -0
- package/schemas/run-event-payloads.schema.json +513 -11
- package/schemas/run-event.schema.json +17 -1
- package/schemas/run-snapshot.schema.json +3 -2
- package/schemas/workflow-definition.schema.json +19 -1
- package/src/lib/driver.ts +15 -0
- package/src/lib/env.ts +51 -0
- package/src/lib/event-log-query.ts +62 -0
- package/src/lib/fixtures.ts +38 -1
- package/src/lib/host-toggle.ts +54 -0
- package/src/lib/llm-cache-key-recipe.ts +68 -0
- package/src/lib/multi-agent-capabilities.ts +10 -0
- package/src/lib/otel-scrape.ts +59 -0
- package/src/scenarios/agentReasoningStreaming.test.ts +193 -0
- package/src/scenarios/aiEnvelope.capBreached.test.ts +97 -9
- package/src/scenarios/aiEnvelope.contractRefusal.test.ts +224 -15
- package/src/scenarios/aiEnvelope.correlationReplay.test.ts +257 -25
- package/src/scenarios/aiEnvelope.redaction.test.ts +210 -29
- package/src/scenarios/aiEnvelope.schemaDrift.test.ts +163 -24
- package/src/scenarios/aiEnvelope.trustBoundaryPropagation.test.ts +262 -12
- package/src/scenarios/aiEnvelope.universalKinds.test.ts +107 -16
- package/src/scenarios/blob-presign-expiry.test.ts +42 -9
- package/src/scenarios/blob-roundtrip.test.ts +0 -0
- package/src/scenarios/cache-ttl-expiry.test.ts +34 -8
- package/src/scenarios/cost-attribution.test.ts +124 -11
- package/src/scenarios/cross-engine-append-ordering.test.ts +99 -0
- package/src/scenarios/cross-host-ancestry-endpoint.test.ts +136 -0
- package/src/scenarios/cross-host-causation-shape.test.ts +117 -0
- package/src/scenarios/cross-host-traceparent-propagation.test.ts +60 -0
- package/src/scenarios/dispatch-cross-worker-handoff.test.ts +34 -3
- package/src/scenarios/dispatch-input-mapping.test.ts +75 -6
- package/src/scenarios/dispatch-output-mapping.test.ts +96 -6
- package/src/scenarios/envelope-completion-distinguishes-truncation.test.ts +223 -0
- package/src/scenarios/envelope-nl-to-format-engaged.test.ts +152 -0
- package/src/scenarios/envelope-reasoning-secret-redaction.test.ts +343 -0
- package/src/scenarios/envelope-reasoning-shape.test.ts +190 -0
- package/src/scenarios/envelope-recovery-applied.test.ts +229 -0
- package/src/scenarios/envelope-refusal-shape.test.ts +289 -0
- package/src/scenarios/envelope-retry-attempted.test.ts +258 -0
- package/src/scenarios/envelope-retry-exhausted.test.ts +168 -0
- package/src/scenarios/envelope-tier-one-subset-static.test.ts +229 -0
- package/src/scenarios/envelope-truncated.test.ts +136 -0
- package/src/scenarios/envelope-truncation-cap-exhaustion.test.ts +144 -0
- package/src/scenarios/envelope-variant-discriminator-static.test.ts +152 -0
- package/src/scenarios/fixtures-gating.test.ts +139 -1
- package/src/scenarios/fixtures-valid.test.ts +123 -15
- package/src/scenarios/kv-ttl-expiry.test.ts +40 -9
- package/src/scenarios/model-capability-insufficient.test.ts +221 -0
- package/src/scenarios/model-capability-substituted.test.ts +203 -0
- package/src/scenarios/multi-agent-confidence-escalation.test.ts +164 -0
- package/src/scenarios/multi-agent-handoff-state-machine.test.ts +167 -0
- package/src/scenarios/multi-agent-memory-lifecycle.test.ts +124 -0
- package/src/scenarios/multi-region-idempotency.test.ts +58 -0
- package/src/scenarios/node-module-required-capabilities-shape.test.ts +185 -0
- package/src/scenarios/otel-trace-propagation-subworkflow.test.ts +19 -0
- package/src/scenarios/pack-registry-publish.test.ts +231 -51
- package/src/scenarios/prompt-all-four-kinds-events.test.ts +198 -0
- package/src/scenarios/prompt-composed-secret-redaction.test.ts +178 -0
- package/src/scenarios/prompt-composed-trust-marker.test.ts +165 -0
- package/src/scenarios/prompt-end-to-end-events.test.ts +202 -0
- package/src/scenarios/prompt-list-and-fetch.test.ts +207 -0
- package/src/scenarios/prompt-mutable-lifecycle.test.ts +216 -0
- package/src/scenarios/prompt-pack-install.test.ts +187 -0
- package/src/scenarios/prompt-render-deterministic.test.ts +240 -0
- package/src/scenarios/prompt-resolution-chain-agent-intrinsic.test.ts +140 -0
- package/src/scenarios/prompt-resolution-chain-fallback-cascade.test.ts +172 -0
- package/src/scenarios/prompt-resolution-chain-node-wins.test.ts +144 -0
- package/src/scenarios/prompt-template-shape.test.ts +359 -0
- package/src/scenarios/provider-usage.test.ts +185 -0
- package/src/scenarios/queue-ack-nack-dlq.test.ts +64 -10
- package/src/scenarios/queue-publish-consume-roundtrip.test.ts +50 -10
- package/src/scenarios/replay-divergence-at-refusal.test.ts +134 -0
- package/src/scenarios/replay-llm-cache-key-portable.test.ts +197 -0
- package/src/scenarios/replay-llm-cache-key.test.ts +127 -25
- package/src/scenarios/replay-observable-sequence-determinism.test.ts +80 -0
- package/src/scenarios/sandbox-capability-gate-respected.test.ts +31 -0
- package/src/scenarios/sandbox-memory-cap.test.ts +61 -0
- package/src/scenarios/sandbox-no-cross-pack-mutation.test.ts +35 -0
- package/src/scenarios/sandbox-no-host-env-leak.test.ts +38 -0
- package/src/scenarios/sandbox-no-host-fs-escape.test.ts +91 -0
- package/src/scenarios/sandbox-no-host-process-escape.test.ts +30 -0
- package/src/scenarios/sandbox-no-network-escape.test.ts +49 -0
- package/src/scenarios/sandbox-timeout-cap.test.ts +61 -0
- package/src/scenarios/search-bm25-roundtrip.test.ts +54 -9
- package/src/scenarios/spec-corpus-validity.test.ts +34 -6
- package/src/scenarios/sql-transaction-atomicity.test.ts +37 -8
- package/src/scenarios/stream-subscribe-from-beginning.test.ts +46 -9
- package/src/scenarios/subworkflow-input-mapping.test.ts +146 -10
- package/src/scenarios/table-cursor-pagination.test.ts +47 -9
- package/src/scenarios/table-schema-enforcement.test.ts +46 -9
- package/src/scenarios/vector-knn-roundtrip.test.ts +50 -10
- package/src/scenarios/workflow-chain-host-expansion.test.ts +202 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-dispatch-deterministic-fail-child",
|
|
3
|
+
"name": "Conformance: Dispatch deterministic-fail child (RFC 0022 §B HVMAP-1b-failed)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "RFC 0022 §B / HVMAP-1b-failed — child workflow that ALWAYS terminates `failed` via the host's `core.fail` node. Used by `conformance-dispatch-output-mapping` (parent) to verify that the parent's `outputMapping` MUST be SKIPPED when the child terminates non-completed; the parent's `parentResult` variable MUST remain at its pre-dispatch state.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "fail",
|
|
9
|
+
"typeId": "core.fail",
|
|
10
|
+
"name": "Deterministic fail",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"code": "hvmap_1b_failed_fixture",
|
|
14
|
+
"message": "intentional terminal failure for outputMapping-skip assertion"
|
|
15
|
+
},
|
|
16
|
+
"inputs": {}
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"edges": [],
|
|
20
|
+
"triggers": [
|
|
21
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
22
|
+
],
|
|
23
|
+
"variables": [
|
|
24
|
+
{ "name": "childOutcome", "type": "string", "defaultValue": "this-should-not-be-harvested" }
|
|
25
|
+
],
|
|
26
|
+
"metadata": {
|
|
27
|
+
"tags": ["conformance", "rfc-0022", "dispatch", "output-mapping", "hvmap-1b-failed", "child"]
|
|
28
|
+
},
|
|
29
|
+
"settings": { "timeout": 5000, "maxRetries": 0 }
|
|
30
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-dispatch-input-mapping-no-default",
|
|
3
|
+
"name": "Conformance: Dispatch Input Mapping — parentName unset (RFC 0022 §A HVMAP-1a-null)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "RFC 0022 §A / HVMAP-1a-null — parent variant of `conformance-dispatch-input-mapping` that DECLARES `parentName` in `variables[]` but OMITS its `defaultValue`. The dispatch's `inputMapping: { childGreeting: 'parentName' }` projects an unset parent variable. Per RFC 0022 §A normative bullet: child `inputs.childGreeting` MUST surface as `undefined` (NOT `null`, NOT omitted). Same supervisor + dispatch shape as the base fixture; only the `variables[].parentName.defaultValue` is removed. See dispatch-input-mapping.test.ts § HVMAP-1a-null.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "supervisor",
|
|
9
|
+
"typeId": "core.orchestrator.supervisor",
|
|
10
|
+
"name": "Supervisor (mock plan)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"mockDispatchPlan": [
|
|
14
|
+
{ "kind": "next-worker", "nextWorkerIds": ["conformance-dispatch-input-mapping-child"] },
|
|
15
|
+
{ "kind": "terminate", "reason": "goal-reached" }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"inputs": {}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "dispatch",
|
|
22
|
+
"typeId": "core.dispatch",
|
|
23
|
+
"name": "Dispatch with inputMapping (parent var unset)",
|
|
24
|
+
"position": { "x": 200, "y": 0 },
|
|
25
|
+
"config": {
|
|
26
|
+
"askUserRouting": "auto",
|
|
27
|
+
"workerDispatchModel": "child-run",
|
|
28
|
+
"fanOutPolicy": "sequential",
|
|
29
|
+
"inputMapping": { "childGreeting": "parentName" }
|
|
30
|
+
},
|
|
31
|
+
"inputs": {}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"edges": [
|
|
35
|
+
{ "id": "e1", "sourceNodeId": "supervisor", "targetNodeId": "dispatch" },
|
|
36
|
+
{ "id": "e2", "sourceNodeId": "dispatch", "targetNodeId": "supervisor" }
|
|
37
|
+
],
|
|
38
|
+
"triggers": [
|
|
39
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
40
|
+
],
|
|
41
|
+
"variables": [
|
|
42
|
+
{ "name": "parentName", "type": "string" }
|
|
43
|
+
],
|
|
44
|
+
"metadata": {
|
|
45
|
+
"tags": ["conformance", "rfc-0022", "dispatch", "input-mapping", "hvmap-1a-null"],
|
|
46
|
+
"requiresCapability": "capabilities.agents.dispatchMapping"
|
|
47
|
+
},
|
|
48
|
+
"settings": { "timeout": 30000 }
|
|
49
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-dispatch-per-worker-override",
|
|
3
|
+
"name": "Conformance: Dispatch Per-Worker Mapping Override (RFC 0022 §A HVMAP-1c-override)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "RFC 0022 §A / HVMAP-1c-override — verifies that `perWorkerInputMappings[childId]` OVERRIDES the default `inputMapping` for the named child, while OTHER children continue to use the default. Supervisor plan: `next-worker: ['conformance-dispatch-cross-worker-handoff-child-a', 'conformance-dispatch-cross-worker-handoff-child-b']` → `terminate`. Default `inputMapping: { input: 'defaultX' }`; `perWorkerInputMappings.conformance-dispatch-cross-worker-handoff-child-b: { input: 'sharedVar' }`. child-a receives `input: <defaultX-value>`; child-b receives `input: <sharedVar-value>` (NOT defaultX) per RFC 0022 §A `effectiveInputMapping` precedence. See dispatch-cross-worker-handoff.test.ts § HVMAP-1c-override.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "supervisor",
|
|
9
|
+
"typeId": "core.orchestrator.supervisor",
|
|
10
|
+
"name": "Supervisor (mock plan, multi-worker)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"mockDispatchPlan": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "next-worker",
|
|
16
|
+
"nextWorkerIds": [
|
|
17
|
+
"conformance-dispatch-cross-worker-handoff-child-a",
|
|
18
|
+
"conformance-dispatch-cross-worker-handoff-child-b"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{ "kind": "terminate", "reason": "goal-reached" }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"inputs": {}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "dispatch",
|
|
28
|
+
"typeId": "core.dispatch",
|
|
29
|
+
"name": "Dispatch with default + per-worker override",
|
|
30
|
+
"position": { "x": 200, "y": 0 },
|
|
31
|
+
"config": {
|
|
32
|
+
"askUserRouting": "auto",
|
|
33
|
+
"workerDispatchModel": "child-run",
|
|
34
|
+
"fanOutPolicy": "sequential",
|
|
35
|
+
"inputMapping": { "input": "defaultX" },
|
|
36
|
+
"perWorkerInputMappings": {
|
|
37
|
+
"conformance-dispatch-cross-worker-handoff-child-b": { "input": "sharedVar" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"inputs": {}
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"edges": [
|
|
44
|
+
{ "id": "e1", "sourceNodeId": "supervisor", "targetNodeId": "dispatch" },
|
|
45
|
+
{ "id": "e2", "sourceNodeId": "dispatch", "targetNodeId": "supervisor" }
|
|
46
|
+
],
|
|
47
|
+
"triggers": [
|
|
48
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
49
|
+
],
|
|
50
|
+
"variables": [
|
|
51
|
+
{ "name": "defaultX", "type": "string", "defaultValue": "default-x-value" },
|
|
52
|
+
{ "name": "sharedVar", "type": "string", "defaultValue": "shared-value" }
|
|
53
|
+
],
|
|
54
|
+
"metadata": {
|
|
55
|
+
"tags": ["conformance", "rfc-0022", "dispatch", "per-worker-mapping", "hvmap-1c-override"],
|
|
56
|
+
"requiresCapability": "capabilities.agents.dispatchMapping"
|
|
57
|
+
},
|
|
58
|
+
"settings": { "timeout": 30000 }
|
|
59
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-envelope-nl-to-format-engaged",
|
|
3
|
+
"name": "Conformance: envelope.nlToFormat.engaged (RFC 0032 §B.5)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Drives `core.ai.structuredOutput` against the conformance-only `mock` provider. The conformance scenario POSTs a 3-entry program: all three attempts return natural-language prose (no JSON sigil at the start). The host's `dispatchStructured` retry loop exhausts on parse-error, detects the NL shape, and fires ONE additional dispatch with a corrective coercion fragment — emitting `envelope.nlToFormat.engaged { originalEnvelopeType, fallbackCalls: 1 }` BEFORE the secondary call. The pre-seeded 4th program entry returns valid JSON, the schema validates, and the run terminates `completed`.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "structured-call",
|
|
9
|
+
"typeId": "core.ai.structuredOutput",
|
|
10
|
+
"name": "Structured output via mock provider (NL responses)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"provider": "mock",
|
|
14
|
+
"model": "mock-mini",
|
|
15
|
+
"outputSchema": {
|
|
16
|
+
"$id": "https://example.test/spec/v1/conformance-envelope.schema.json",
|
|
17
|
+
"title": "TestEnvelope",
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["result"],
|
|
20
|
+
"properties": { "result": { "type": "string" } }
|
|
21
|
+
},
|
|
22
|
+
"retryOnInvalidJson": 0
|
|
23
|
+
},
|
|
24
|
+
"inputs": {
|
|
25
|
+
"messages": {
|
|
26
|
+
"type": "static",
|
|
27
|
+
"value": [{ "role": "user", "content": "Please emit a structured envelope." }]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"edges": [],
|
|
33
|
+
"triggers": [
|
|
34
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
35
|
+
],
|
|
36
|
+
"variables": [],
|
|
37
|
+
"metadata": {
|
|
38
|
+
"tags": ["conformance", "rfc-0032", "envelope-reliability", "nl-to-format-engaged"]
|
|
39
|
+
},
|
|
40
|
+
"settings": { "timeout": 30000 }
|
|
41
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-envelope-recovery-applied",
|
|
3
|
+
"name": "Conformance: envelope.recovery.applied (RFC 0032 §B.6)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Drives `core.ai.structuredOutput` against the conformance-only `mock` provider. The conformance scenario POSTs a 1-entry program to `/v1/host/sample/test/mock-ai/program` (keyed by `nodeId: 'structured-call'`) BEFORE starting the run: the mock returns a markdown-fenced JSON envelope (e.g., ```json\\n{\"result\":\"ok\"}\\n```). The host's `dispatchStructured` lenient-parse fallback strips the fence via `tryLenientParse(text)`, 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. Run terminates `completed`.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "structured-call",
|
|
9
|
+
"typeId": "core.ai.structuredOutput",
|
|
10
|
+
"name": "Structured output via mock provider (markdown-fenced)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"provider": "mock",
|
|
14
|
+
"model": "mock-mini",
|
|
15
|
+
"outputSchema": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["result"],
|
|
18
|
+
"properties": { "result": { "type": "string" } }
|
|
19
|
+
},
|
|
20
|
+
"retryOnInvalidJson": 0
|
|
21
|
+
},
|
|
22
|
+
"inputs": {
|
|
23
|
+
"messages": {
|
|
24
|
+
"type": "static",
|
|
25
|
+
"value": [{ "role": "user", "content": "Please emit a markdown-fenced envelope." }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"edges": [],
|
|
31
|
+
"triggers": [
|
|
32
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
33
|
+
],
|
|
34
|
+
"variables": [],
|
|
35
|
+
"metadata": {
|
|
36
|
+
"tags": ["conformance", "rfc-0032", "envelope-reliability", "recovery-applied"]
|
|
37
|
+
},
|
|
38
|
+
"settings": { "timeout": 30000 }
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-envelope-refusal",
|
|
3
|
+
"name": "Conformance: envelope.refusal end-to-end (RFC 0032 §B.3 + RFC 0033 §D + §F)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Single `core.ai.structuredOutput` node against the conformance `mock` provider with a pre-seeded program returning `stopReason: 'safety'` + `refusalText: '...'` on attempt 1. Host's `dispatchStructured()` MUST: (a) emit exactly one `envelope.refusal` event with the canonical payload shape; (b) NOT retry (RFC 0032 §B.3 + RFC 0033 §D — refusal is terminal); (c) fail the node with `error.code: 'envelope_refused_by_provider'` per RFC 0033 §F; (d) NOT echo the refusal text in `RunSnapshot.error.message` (SECURITY invariant `envelope-refusal-no-prompt-leak` — refusal text lives only on the event-log entry, scrubbed via the existing SR-1 redaction harness).",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "structured-call",
|
|
9
|
+
"typeId": "core.ai.structuredOutput",
|
|
10
|
+
"name": "Structured output via mock provider (refusal)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"provider": "mock",
|
|
14
|
+
"model": "mock-mini",
|
|
15
|
+
"outputSchema": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["valid"],
|
|
18
|
+
"properties": { "valid": { "type": "boolean" } }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"inputs": {
|
|
22
|
+
"messages": {
|
|
23
|
+
"type": "static",
|
|
24
|
+
"value": [{ "role": "user", "content": "Please emit a valid envelope." }]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"edges": [],
|
|
30
|
+
"triggers": [
|
|
31
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
32
|
+
],
|
|
33
|
+
"variables": [],
|
|
34
|
+
"metadata": {
|
|
35
|
+
"tags": ["conformance", "rfc-0032", "rfc-0033", "envelope-reliability", "refusal"]
|
|
36
|
+
},
|
|
37
|
+
"settings": { "timeout": 30000 }
|
|
38
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-envelope-retry-attempted",
|
|
3
|
+
"name": "Conformance: envelope.retry.attempted (RFC 0032 §B.1)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Drives `core.ai.structuredOutput` against the conformance-only `mock` provider. The conformance scenario POSTs a 2-entry program to `/v1/host/sample/test/mock-ai/program` (keyed by `nodeId: 'structured-call'`) BEFORE starting the run: attempt 1 returns invalid JSON, attempt 2 returns a valid envelope. The host's `dispatchStructured` retry loop MUST emit exactly one `envelope.retry.attempted` event with `attempt: 2` between the two provider calls (RFC 0032 §B.1). The run terminates `completed` after the second attempt succeeds.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "structured-call",
|
|
9
|
+
"typeId": "core.ai.structuredOutput",
|
|
10
|
+
"name": "Structured output via mock provider",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"provider": "mock",
|
|
14
|
+
"model": "mock-mini",
|
|
15
|
+
"outputSchema": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["valid"],
|
|
18
|
+
"properties": { "valid": { "type": "boolean" } }
|
|
19
|
+
},
|
|
20
|
+
"retryOnInvalidJson": 0
|
|
21
|
+
},
|
|
22
|
+
"inputs": {
|
|
23
|
+
"messages": {
|
|
24
|
+
"type": "static",
|
|
25
|
+
"value": [{ "role": "user", "content": "Please emit a valid envelope." }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"edges": [],
|
|
31
|
+
"triggers": [
|
|
32
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
33
|
+
],
|
|
34
|
+
"variables": [],
|
|
35
|
+
"metadata": {
|
|
36
|
+
"tags": ["conformance", "rfc-0032", "envelope-reliability", "retry-attempted"]
|
|
37
|
+
},
|
|
38
|
+
"settings": { "timeout": 30000 }
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-envelope-retry-exhausted",
|
|
3
|
+
"name": "Conformance: envelope.retry.exhausted (RFC 0032 §B.2)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Drives `core.ai.structuredOutput` against the conformance `mock` provider with a program that returns invalid JSON on EVERY attempt. The host's `dispatchStructured` retry loop MUST exhaust its budget and emit exactly one `envelope.retry.exhausted` event with `finalReason: 'schema-violation'` (or `'parse-error'` per RFC 0032 §B.1 reason enum). The node MUST fail with `error.code: 'envelope_payload_invalid'` (existing RFC 0021 code per RFC 0033 §C). Pairs with `envelope-retry-exhausted.test.ts`.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "structured-call",
|
|
9
|
+
"typeId": "core.ai.structuredOutput",
|
|
10
|
+
"name": "Structured output via mock provider (always invalid)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"provider": "mock",
|
|
14
|
+
"model": "mock-mini",
|
|
15
|
+
"outputSchema": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["valid"],
|
|
18
|
+
"properties": { "valid": { "type": "boolean" } }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"inputs": {
|
|
22
|
+
"messages": {
|
|
23
|
+
"type": "static",
|
|
24
|
+
"value": [{ "role": "user", "content": "Please emit a valid envelope." }]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"edges": [],
|
|
30
|
+
"triggers": [
|
|
31
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
32
|
+
],
|
|
33
|
+
"variables": [],
|
|
34
|
+
"metadata": {
|
|
35
|
+
"tags": ["conformance", "rfc-0032", "envelope-reliability", "retry-exhausted"]
|
|
36
|
+
},
|
|
37
|
+
"settings": { "timeout": 30000 }
|
|
38
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-envelope-truncated",
|
|
3
|
+
"name": "Conformance: envelope.truncated (RFC 0032 §B.4 + RFC 0033 §B)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Drives `core.ai.structuredOutput` against the conformance `mock` provider with a program: attempt 1 returns `stopReason: 'max_tokens'` (truncation); attempt 2 returns a valid envelope. The host's `dispatchStructured` retry loop MUST: (a) emit exactly one `envelope.truncated` event with `stopReason: 'max_tokens'`; (b) retry with an INCREASED output budget per RFC 0033 §B (the host's `truncationBudgetMultiplier` — default 2×); (c) NOT inject the corrective schema fragment on the truncation retry (truncation is an output-size problem, not a schema problem). Eventually completes after attempt 2 succeeds. Pairs with `envelope-truncated.test.ts`.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "structured-call",
|
|
9
|
+
"typeId": "core.ai.structuredOutput",
|
|
10
|
+
"name": "Structured output (truncation then success)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"provider": "mock",
|
|
14
|
+
"model": "mock-mini",
|
|
15
|
+
"maxTokens": 50,
|
|
16
|
+
"outputSchema": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["valid"],
|
|
19
|
+
"properties": { "valid": { "type": "boolean" } }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"inputs": {
|
|
23
|
+
"messages": {
|
|
24
|
+
"type": "static",
|
|
25
|
+
"value": [{ "role": "user", "content": "Please emit a valid envelope." }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"edges": [],
|
|
31
|
+
"triggers": [
|
|
32
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
33
|
+
],
|
|
34
|
+
"variables": [],
|
|
35
|
+
"metadata": {
|
|
36
|
+
"tags": ["conformance", "rfc-0032", "rfc-0033", "envelope-reliability", "truncated"]
|
|
37
|
+
},
|
|
38
|
+
"settings": { "timeout": 30000 }
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-envelope-truncation-cap-exhaustion",
|
|
3
|
+
"name": "Conformance: envelope.truncation-cap-exhaustion (RFC 0033 §B + §F)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Drives `core.ai.structuredOutput` against the conformance `mock` provider with a program that returns `stopReason: 'max_tokens'` on EVERY attempt. The host's `dispatchStructured` retry loop MUST: (a) emit `envelope.truncated` on each attempt (or at least the first one — RFC 0032 §B.4 is per-attempt); (b) double the budget each retry (RFC 0033 §B); (c) exhaust retries after `maxRetryAttempts` (default 3); (d) emit exactly one `envelope.retry.exhausted` with `finalReason: 'truncation'`; (e) emit `cap.breached` with `kind: 'schema'`; (f) fail the node with `error.code: 'envelope_truncation_unrecoverable'` per RFC 0033 §F. The run does NOT exceed `maxRetryAttempts` total LLM calls — DoS-bound assertion. Pairs with `envelope-truncation-cap-exhaustion.test.ts`.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "structured-call",
|
|
9
|
+
"typeId": "core.ai.structuredOutput",
|
|
10
|
+
"name": "Structured output (perpetual truncation → cap exhaustion)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"provider": "mock",
|
|
14
|
+
"model": "mock-mini",
|
|
15
|
+
"maxTokens": 50,
|
|
16
|
+
"outputSchema": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["valid"],
|
|
19
|
+
"properties": { "valid": { "type": "boolean" } }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"inputs": {
|
|
23
|
+
"messages": {
|
|
24
|
+
"type": "static",
|
|
25
|
+
"value": [{ "role": "user", "content": "Please emit a valid envelope." }]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"edges": [],
|
|
31
|
+
"triggers": [
|
|
32
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
33
|
+
],
|
|
34
|
+
"variables": [],
|
|
35
|
+
"metadata": {
|
|
36
|
+
"tags": ["conformance", "rfc-0032", "rfc-0033", "envelope-reliability", "truncation-cap-exhaustion", "DoS-bound"]
|
|
37
|
+
},
|
|
38
|
+
"settings": { "timeout": 30000 }
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-model-capability-insufficient",
|
|
3
|
+
"name": "Conformance: model capability insufficient (RFC 0031 §B step 4 + §D)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Single `conformance.modelCapability.insufficient` node whose NodeModule declares `requiredModelCapabilities: ['nonexistent-capability-9b3f']` — an identifier outside the spec-reserved set. The executor's model-capability gate (executor.ts:230-289) MUST refuse at dispatch time, emitting `model.capability.insufficient` BEFORE `node.failed` per RFC 0031 §D. Pairs with `model-capability-insufficient.test.ts` end-to-end branch.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "insufficient-node",
|
|
9
|
+
"typeId": "conformance.modelCapability.insufficient",
|
|
10
|
+
"name": "Always refuses on capability gate",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {},
|
|
13
|
+
"inputs": {}
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"edges": [],
|
|
17
|
+
"triggers": [
|
|
18
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
19
|
+
],
|
|
20
|
+
"variables": [],
|
|
21
|
+
"metadata": {
|
|
22
|
+
"tags": ["conformance", "rfc-0031", "model-capability", "insufficient"]
|
|
23
|
+
},
|
|
24
|
+
"settings": { "timeout": 5000 }
|
|
25
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-multi-agent-confidence-escalation",
|
|
3
|
+
"name": "Conformance: Multi-Agent Confidence-Floor Escalation (RFC 0039 §A)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "RFC 0039 §A — exercises the confidence-floor escalation contract introduced by Phase 2 of the multi-agent execution model. Supervisor plan: ONE `next-worker` decision carrying `confidence: 0.3` (below the 0.5 spec floor). The `core.dispatch` node MUST escalate via clarification interrupt BEFORE any dispatch.began event fires; conformance asserts the run reaches `waiting-clarification` AND the event log carries exactly one `core.workflowChain.confidence-escalated` AND zero `core.workflowChain.event` records (no dispatch fired). Capability-gated on `capabilities.multiAgent.executionModel.version >= 2`. See multi-agent-confidence-escalation.test.ts.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "supervisor",
|
|
9
|
+
"typeId": "core.orchestrator.supervisor",
|
|
10
|
+
"name": "Supervisor (mock plan with low-confidence decision)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"mockDispatchPlan": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "next-worker",
|
|
16
|
+
"nextWorkerIds": ["conformance-multi-agent-handoff-child"],
|
|
17
|
+
"confidence": 0.3
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"inputs": {}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "dispatch",
|
|
25
|
+
"typeId": "core.dispatch",
|
|
26
|
+
"name": "Dispatch (confidence gate fires before worker spawn)",
|
|
27
|
+
"position": { "x": 200, "y": 0 },
|
|
28
|
+
"config": {
|
|
29
|
+
"askUserRouting": "auto",
|
|
30
|
+
"workerDispatchModel": "child-run",
|
|
31
|
+
"fanOutPolicy": "sequential"
|
|
32
|
+
},
|
|
33
|
+
"inputs": {}
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"edges": [
|
|
37
|
+
{ "id": "e1", "sourceNodeId": "supervisor", "targetNodeId": "dispatch" },
|
|
38
|
+
{ "id": "e2", "sourceNodeId": "dispatch", "targetNodeId": "supervisor" }
|
|
39
|
+
],
|
|
40
|
+
"triggers": [
|
|
41
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
42
|
+
],
|
|
43
|
+
"variables": [],
|
|
44
|
+
"metadata": {
|
|
45
|
+
"tags": ["conformance", "rfc-0039", "multi-agent", "confidence", "escalation"],
|
|
46
|
+
"requiresCapability": "capabilities.multiAgent.executionModel.version-2"
|
|
47
|
+
},
|
|
48
|
+
"settings": { "timeout": 30000 }
|
|
49
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-multi-agent-handoff-child",
|
|
3
|
+
"name": "Conformance: Multi-Agent Handoff State Machine (RFC 0037 Phase 1) — child",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "Child fixture for `conformance-multi-agent-handoff`. Declares `childOutcome.defaultValue='handoff-complete'`; the variable is folded into the child's initial `variables_json` at run-create time. On terminal `completed`, the parent's `outputMapping` harvests `childOutcome` onto `parentResult`, which triggers the `output.harvested` transition event per RFC 0037 §\"Handoff state machine\".",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "noop",
|
|
9
|
+
"typeId": "core.identity",
|
|
10
|
+
"name": "Noop (childOutcome seeded by defaultValue)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {},
|
|
13
|
+
"inputs": {}
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"edges": [],
|
|
17
|
+
"triggers": [
|
|
18
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
19
|
+
],
|
|
20
|
+
"variables": [
|
|
21
|
+
{ "name": "childOutcome", "type": "string", "defaultValue": "handoff-complete" }
|
|
22
|
+
],
|
|
23
|
+
"metadata": {
|
|
24
|
+
"tags": ["conformance", "rfc-0037", "multi-agent", "handoff", "child"]
|
|
25
|
+
},
|
|
26
|
+
"settings": { "timeout": 5000 }
|
|
27
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-multi-agent-handoff",
|
|
3
|
+
"name": "Conformance: Multi-Agent Handoff State Machine (RFC 0037 Phase 1)",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "RFC 0037 Phase 1 — exercises the planner→worker handoff state machine. Supervisor plan: `next-worker: ['conformance-multi-agent-handoff-child']` → `terminate`. The dispatch consumes one decision, spawns the child, harvests `childOutcome` into `parentResult` (outputMapping is non-empty so the `output.harvested` transition fires per RFC 0022 §A + RFC 0037 §\"Handoff state machine\" terminal-row constraint). Conformance reads the parent's event log and asserts 4 `core.workflowChain.event` records appear in causation-chained order: dispatch.began → dispatch.succeeded → child.completed → output.harvested. Gated on `capabilities.multiAgent.executionModel.supported: true`. See multi-agent-handoff-state-machine.test.ts.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "supervisor",
|
|
9
|
+
"typeId": "core.orchestrator.supervisor",
|
|
10
|
+
"name": "Supervisor (mock plan)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"mockDispatchPlan": [
|
|
14
|
+
{ "kind": "next-worker", "nextWorkerIds": ["conformance-multi-agent-handoff-child"] },
|
|
15
|
+
{ "kind": "terminate", "reason": "goal-reached" }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"inputs": {}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "dispatch",
|
|
22
|
+
"typeId": "core.dispatch",
|
|
23
|
+
"name": "Dispatch with outputMapping (drives output.harvested)",
|
|
24
|
+
"position": { "x": 200, "y": 0 },
|
|
25
|
+
"config": {
|
|
26
|
+
"askUserRouting": "auto",
|
|
27
|
+
"workerDispatchModel": "child-run",
|
|
28
|
+
"fanOutPolicy": "sequential",
|
|
29
|
+
"outputMapping": { "parentResult": "childOutcome" }
|
|
30
|
+
},
|
|
31
|
+
"inputs": {}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"edges": [
|
|
35
|
+
{ "id": "e1", "sourceNodeId": "supervisor", "targetNodeId": "dispatch" },
|
|
36
|
+
{ "id": "e2", "sourceNodeId": "dispatch", "targetNodeId": "supervisor" }
|
|
37
|
+
],
|
|
38
|
+
"triggers": [
|
|
39
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
40
|
+
],
|
|
41
|
+
"variables": [
|
|
42
|
+
{ "name": "parentResult", "type": "string", "defaultValue": "" }
|
|
43
|
+
],
|
|
44
|
+
"metadata": {
|
|
45
|
+
"tags": ["conformance", "rfc-0037", "multi-agent", "handoff"],
|
|
46
|
+
"requiresCapability": "capabilities.multiAgent.executionModel.supported"
|
|
47
|
+
},
|
|
48
|
+
"settings": { "timeout": 30000 }
|
|
49
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "conformance-prompt-all-four-kinds",
|
|
3
|
+
"name": "Conformance: Prompt-Library All Four Kinds End-to-End",
|
|
4
|
+
"version": "1.0",
|
|
5
|
+
"description": "RFC 0027 §A end-to-end coverage of all four `PromptKind` values (system, user, schema-hint, few-shot) with a MULTI-ENTRY `fewShotPromptRefs[]` array so the resolver's per-index lookup (`fewShotPromptRefs[slotIndex]`) is regression-pinned. Single mock-ai node configured with one ref per singular-kind slot and two distinct templateIds in the few-shot array; when the node executes, the host MUST resolve each ref via the four-layer chain (RFC 0029 §A), emit one `agent.promptResolved` event per kind+slot (4 events total: system, user, schema-hint, few-shot×2 sub-events count as 2 — total 5), compose the body (RFC 0027 §E), emit one `prompt.composed` event per composition (5 events), and complete the run successfully. Capability-gated: host MUST advertise `capabilities.prompts.supported: true`. See conformance/src/scenarios/prompt-all-four-kinds-events.test.ts.",
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "all-kinds",
|
|
9
|
+
"typeId": "local.sample.demo.mock-ai",
|
|
10
|
+
"name": "All-kinds (mock AI)",
|
|
11
|
+
"position": { "x": 0, "y": 0 },
|
|
12
|
+
"config": {
|
|
13
|
+
"systemPromptRef": "prompt:conformance.prompt.writer-system@1.0.0",
|
|
14
|
+
"userPromptRef": "prompt:conformance.prompt.writer-user@1.0.0",
|
|
15
|
+
"schemaHintPromptRef": "prompt:conformance.prompt.schema-hint@1.0.0",
|
|
16
|
+
"fewShotPromptRefs": [
|
|
17
|
+
"prompt:conformance.prompt.few-shot@1.0.0",
|
|
18
|
+
"prompt:conformance.prompt.few-shot-2@1.0.0"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"inputs": {}
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"edges": [],
|
|
25
|
+
"triggers": [
|
|
26
|
+
{ "id": "manual", "type": "manual", "enabled": true }
|
|
27
|
+
],
|
|
28
|
+
"variables": [
|
|
29
|
+
{
|
|
30
|
+
"name": "prompt",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Optional inline prompt content. The mock-ai node prefers the composed bodies (concatenated in system → schema-hint → few-shot exemplars → user order) when refs are present; this variable is the fallback baseline if no ref resolves.",
|
|
33
|
+
"required": false,
|
|
34
|
+
"defaultValue": "conformance baseline prompt"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"metadata": { "tags": ["conformance", "prompts", "all-four-kinds"] },
|
|
38
|
+
"settings": { "timeout": 10000 }
|
|
39
|
+
}
|