@openwop/openwop-conformance 2.46.35 → 2.46.36

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 (31) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +3 -3
  3. package/coverage.md +4 -5
  4. package/dist/spec-artifacts.lock.json +2 -2
  5. package/fixtures/conformance-interrupt-form-refused.json +108 -0
  6. package/fixtures/conformance-interrupt-form-unbound.json +108 -0
  7. package/fixtures/conformance-interrupt-form.json +107 -0
  8. package/fixtures/conformance-stream-text.json +1 -2
  9. package/fixtures.md +19 -4
  10. package/package.json +2 -2
  11. package/requirement-aliases.json +98 -1
  12. package/requirements.json +551 -804
  13. package/scenario-majors.json +13 -19
  14. package/schemas/CORPUS-STAMP.json +56 -69
  15. package/src/lib/callai-attempts-witness.ts +13 -1
  16. package/src/lib/family-advert-witness.ts +37 -50
  17. package/src/scenarios/stream-text-fixture.test.ts +13 -5
  18. package/src/scenarios/v2-envelope-surfaces-absent.test.ts +55 -0
  19. package/src/scenarios/v2-interrupt-form-rules.test.ts +143 -0
  20. package/src/scenarios/v2-limits-clarification-rounds-advertisement.test.ts +42 -0
  21. package/src/scenarios/v2-peer-dependency-declared.test.ts +1 -1
  22. package/src/scenarios/v2-provider-output-reliability.test.ts +94 -0
  23. package/src/scenarios/v2-structured-output-advertisement.test.ts +82 -0
  24. package/src/lib/envelope-schema-static.ts +0 -167
  25. package/src/scenarios/v2-a2ui-v09-surface.test.ts +0 -323
  26. package/src/scenarios/v2-ai-envelope-advertisement.test.ts +0 -43
  27. package/src/scenarios/v2-envelope-contracts-advertisement.test.ts +0 -48
  28. package/src/scenarios/v2-envelope-reasoning-shape.test.ts +0 -81
  29. package/src/scenarios/v2-envelope-tier-one-subset-static.test.ts +0 -64
  30. package/src/scenarios/v2-envelopes-advertisement.test.ts +0 -85
  31. package/src/scenarios/v2-limits-envelope-caps-advertisement.test.ts +0 -61
@@ -1,85 +0,0 @@
1
- /**
2
- * v2 — the `envelopes` advertisement (`spec/v2/core/events.md` §`envelopes`;
3
- * RFCs 0030, 0032, 0033). A claims-check family: what the host says about its
4
- * envelope posture is what is witnessed. The v1 twins are the advertisement
5
- * legs of `envelope-reasoning-shape`, `envelope-retry-attempted` /
6
- * `envelope-refusal-shape` and `envelope-completion-distinguishes-truncation`;
7
- * the legs live in `lib/family-advert-witness.ts`.
8
- *
9
- * record the record validates against its seat in
10
- * `schemas/v2/capabilities.schema.json` (no v1 `supported` seat);
11
- * reasoning `reasoning.promptDirective` is mandatory | advisory | off;
12
- * tier-one `tierOneSubsetCompliance` is strict | warn | off;
13
- * reliability `reliability.events[]` names only reliability events and, with
14
- * the four v1 dotted names folded to their v2 equivalents
15
- * (aliases until 3.0, RFC 0228 §G), lists the two MUST-tier
16
- * events `envelope.retry-exhausted` and `envelope.refusal`;
17
- * completion `reliability.completion.distinguishesTruncation` is a boolean
18
- * and `truncationBudgetMultiplier` is in [1, 8].
19
- *
20
- * Dispositions: discovery unreadable ⇒ `blocked`; `envelopes` absent, or the
21
- * facet a leg reads absent ⇒ `inapplicable`.
22
- *
23
- * @see spec/v2/core/events.md §envelopes
24
- */
25
-
26
- import { describe, it, expect } from 'vitest';
27
- import { v2Discovery } from '../lib/v2.js';
28
- import { softSkip } from '../lib/soft-skip.js';
29
- import { req } from '../lib/requirement-ids.js';
30
- import { majorProfile } from '../lib/major-profile.js';
31
- import { envelopesCompletionLeg, envelopesReasoningLeg, envelopesReliabilityLeg, envelopesTierOneLeg, recordSchemaLeg } from '../lib/family-advert-witness.js';
32
-
33
- const PROFILE = majorProfile(2);
34
- const ID_RECORD = 'openwop.requirement.envelopes.advert-record-schema';
35
- const ID_REASONING = 'openwop.requirement.envelopes.reasoning-advert-shape';
36
- const ID_TIER_ONE = 'openwop.requirement.envelopes.tier-one-subset-compliance-value';
37
- const ID_RELIABILITY = 'openwop.requirement.envelopes.reliability-events-advert';
38
- const ID_COMPLETION = 'openwop.requirement.envelopes.completion-advert-shape';
39
-
40
- async function discovery(): Promise<Record<string, unknown> | null> {
41
- try { return await v2Discovery(); } catch { return null; }
42
- }
43
- const UNREADABLE = 'v2 discovery unreachable — /.well-known/openwop did not answer 200 JSON under OpenWOP-Version: 2.0';
44
-
45
- describe('v2 envelopes advertisement (events.md §envelopes)', () => {
46
- it('the envelopes record validates against its capabilities-schema seat', async () => {
47
- const doc = await discovery();
48
- if (!doc) return softSkip('blocked', UNREADABLE);
49
- const out = recordSchemaLeg(PROFILE, doc, 'envelopes', 'events.md §envelopes');
50
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
51
- for (const x of out.findings) expect(x.ok, req(ID_RECORD, x.doc, x.message)).toBe(true);
52
- });
53
-
54
- it('envelopes.reasoning.promptDirective is mandatory, advisory or off', async () => {
55
- const doc = await discovery();
56
- if (!doc) return softSkip('blocked', UNREADABLE);
57
- const out = envelopesReasoningLeg(PROFILE, doc);
58
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
59
- for (const x of out.findings) expect(x.ok, req(ID_REASONING, x.doc, x.message)).toBe(true);
60
- });
61
-
62
- it('envelopes.tierOneSubsetCompliance is strict, warn or off', async () => {
63
- const doc = await discovery();
64
- if (!doc) return softSkip('blocked', UNREADABLE);
65
- const out = envelopesTierOneLeg(PROFILE, doc);
66
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
67
- for (const x of out.findings) expect(x.ok, req(ID_TIER_ONE, x.doc, x.message)).toBe(true);
68
- });
69
-
70
- it('envelopes.reliability.events lists only reliability events and includes retry-exhausted and refusal', async () => {
71
- const doc = await discovery();
72
- if (!doc) return softSkip('blocked', UNREADABLE);
73
- const out = envelopesReliabilityLeg(PROFILE, doc);
74
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
75
- for (const x of out.findings) expect(x.ok, req(ID_RELIABILITY, x.doc, x.message)).toBe(true);
76
- });
77
-
78
- it('envelopes.reliability.completion.distinguishesTruncation is a boolean', async () => {
79
- const doc = await discovery();
80
- if (!doc) return softSkip('blocked', UNREADABLE);
81
- const out = envelopesCompletionLeg(PROFILE, doc);
82
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
83
- for (const x of out.findings) expect(x.ok, req(ID_COMPLETION, x.doc, x.message)).toBe(true);
84
- });
85
- });
@@ -1,61 +0,0 @@
1
- /**
2
- * v2 — the three envelope caps on `limits` (`spec/v2/core/runs.md` §Limits:
3
- * "`limits` always carries `clarificationRounds` (per task), `schemaRounds`
4
- * (per envelope) and `envelopesPerTurn` (per chat turn)"). The v1 twin is the
5
- * advertisement half of `aiEnvelope.capBreached`; the legs live in
6
- * `lib/family-advert-witness.ts`. The other `limits` facets
7
- * (`maxRunDurationMs`, `maxLoopIterations`) are `v2-run-execution-bounds`.
8
- *
9
- * Each cap MUST be present and validate against its subschema in
10
- * `schemas/v2/capabilities.schema.json` (a non-negative integer).
11
- *
12
- * Dispositions: discovery unreadable ⇒ `blocked`; `limits` absent ⇒
13
- * `inapplicable` (at v2 presence of the record is the claim; the v1 rule that
14
- * `limits` itself is always present has no v2 seat — the root schema requires
15
- * only `protocolVersions` and `preferredVersion`).
16
- *
17
- * @see spec/v2/core/runs.md §Limits
18
- */
19
-
20
- import { describe, it, expect } from 'vitest';
21
- import { v2Discovery } from '../lib/v2.js';
22
- import { softSkip } from '../lib/soft-skip.js';
23
- import { req } from '../lib/requirement-ids.js';
24
- import { majorProfile } from '../lib/major-profile.js';
25
- import { limitsCapLeg } from '../lib/family-advert-witness.js';
26
-
27
- const PROFILE = majorProfile(2);
28
- const UNREADABLE = 'v2 discovery unreachable — /.well-known/openwop did not answer 200 JSON under OpenWOP-Version: 2.0';
29
- const ID_CLARIFICATION = 'openwop.requirement.limits.clarification-rounds-advertised';
30
- const ID_SCHEMA = 'openwop.requirement.limits.schema-rounds-advertised';
31
- const ID_ENVELOPES = 'openwop.requirement.limits.envelopes-per-turn-advertised';
32
-
33
- async function discovery(): Promise<Record<string, unknown> | null> {
34
- try { return await v2Discovery(); } catch { return null; }
35
- }
36
-
37
- describe('v2 limits envelope caps (runs.md §Limits)', () => {
38
- it('limits.clarificationRounds is present and a non-negative integer', async () => {
39
- const doc = await discovery();
40
- if (!doc) return softSkip('blocked', UNREADABLE);
41
- const out = limitsCapLeg(PROFILE, doc, 'clarificationRounds');
42
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
43
- for (const x of out.findings) expect(x.ok, req(ID_CLARIFICATION, x.doc, x.message)).toBe(true);
44
- });
45
-
46
- it('limits.schemaRounds is present and a non-negative integer', async () => {
47
- const doc = await discovery();
48
- if (!doc) return softSkip('blocked', UNREADABLE);
49
- const out = limitsCapLeg(PROFILE, doc, 'schemaRounds');
50
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
51
- for (const x of out.findings) expect(x.ok, req(ID_SCHEMA, x.doc, x.message)).toBe(true);
52
- });
53
-
54
- it('limits.envelopesPerTurn is present and a non-negative integer', async () => {
55
- const doc = await discovery();
56
- if (!doc) return softSkip('blocked', UNREADABLE);
57
- const out = limitsCapLeg(PROFILE, doc, 'envelopesPerTurn');
58
- if (out.kind === 'skip') return softSkip(out.disposition, out.reason);
59
- for (const x of out.findings) expect(x.ok, req(ID_ENVELOPES, x.doc, x.message)).toBe(true);
60
- });
61
- });