@reticlehq/core 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/consequence.d.ts +27 -0
  2. package/dist/consequence.js +26 -0
  3. package/dist/constants.d.ts +52 -0
  4. package/dist/constants.js +49 -0
  5. package/dist/contract-fingerprint.d.ts +29 -0
  6. package/dist/contract-fingerprint.js +56 -0
  7. package/dist/daemon-registry.js +1 -1
  8. package/dist/event-payloads.d.ts +48 -0
  9. package/dist/event-payloads.js +12 -1
  10. package/dist/flow-constants.d.ts +8 -0
  11. package/dist/flow-constants.js +12 -0
  12. package/dist/flow-types.d.ts +23 -0
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.js +2 -0
  15. package/dist/journal.d.ts +2 -2
  16. package/dist/messages.d.ts +48 -0
  17. package/dist/messages.js +20 -0
  18. package/dist/net.d.ts +40 -0
  19. package/dist/net.js +44 -0
  20. package/dist/project-id.d.ts +28 -0
  21. package/dist/project-id.js +51 -0
  22. package/dist/redaction.js +4 -4
  23. package/dist/schema/hello-message.json +8 -0
  24. package/dist/schema/reticle-message.json +8 -0
  25. package/dist/security.js +10 -5
  26. package/dist/source-constants.d.ts +6 -0
  27. package/dist/source-constants.js +6 -0
  28. package/dist/state-select.d.ts +14 -2
  29. package/dist/state-select.js +77 -14
  30. package/dist/telemetry-feedback.d.ts +32 -10
  31. package/dist/telemetry-feedback.js +21 -0
  32. package/dist/telemetry-session.d.ts +30 -0
  33. package/dist/telemetry-session.js +24 -0
  34. package/dist/telemetry.d.ts +491 -81
  35. package/dist/telemetry.js +188 -2
  36. package/dist/toon.d.ts +2 -1
  37. package/dist/toon.js +37 -37
  38. package/dist/types.d.ts +48 -0
  39. package/dist/types.js +12 -0
  40. package/dist/upgrade.js +1 -1
  41. package/dist/verification-run.d.ts +28 -28
  42. package/dist/verified-constants.d.ts +37 -0
  43. package/dist/verified-constants.js +36 -0
  44. package/package.json +5 -3
@@ -20,6 +20,42 @@ export const Verified = {
20
20
  /** Not determinable from this evidence — vacuous grade, dirty capture, or never settled. */
21
21
  UNKNOWN: 'unknown',
22
22
  };
23
+ /**
24
+ * WHY a verdict came out the way it did — the deciding clause of the rule, named.
25
+ *
26
+ * `Verified` has three values and the rule has ten clauses, so the wire collapsed opposite facts
27
+ * into one string. Measured over a real session: `unknown` covered "the agent malformed the call",
28
+ * "the app answered 202 and has not finished", and "Reticle could not see the capture" — three
29
+ * owners needing three opposite responses, one bar on a dashboard. `no` was no better: "channels
30
+ * disagree" (Reticle earning its keep) and "the agent's predicate failed" read identically.
31
+ *
32
+ * This is the SINGLE list. `decideVerified` returns a member from each clause, and the telemetry
33
+ * schema narrows to `z.nativeEnum` of this — so a new clause cannot ship without a member here, and
34
+ * a member cannot exist without a clause producing it (`verified.test.ts` asserts the two sets are
35
+ * equal). Nothing anywhere re-lists these.
36
+ */
37
+ export const VerifiedReason = {
38
+ /** The assertion was never EVALUATED — under-specified call, or nothing instrumented to read. */
39
+ INCONCLUSIVE: 'inconclusive',
40
+ /** The declared consequence did not hold. */
41
+ ASSERTION_FAILED: 'assertion_failed',
42
+ /** Channels disagreed about the action — the false green this product exists to catch. */
43
+ CONTRADICTED: 'contradicted',
44
+ /** The consequence was already true beforehand, so it proves nothing about the action. */
45
+ ALREADY_TRUE: 'already_true',
46
+ /** The capture was not clean, so a green would only describe what happened to be observed. */
47
+ UNCLEAN_CAPTURE: 'unclean_capture',
48
+ /** Nothing was asserted at a real grade — the assertion could not have failed. */
49
+ VACUOUS_GRADE: 'vacuous_grade',
50
+ /** A write answered 202 Accepted: the outcome does not exist yet. */
51
+ OUTCOME_PENDING: 'outcome_pending',
52
+ /** A 2xx whose body was never recorded, so the one channel that could disagree was closed. */
53
+ OUTCOME_UNREAD: 'outcome_unread',
54
+ /** The page never settled, so the reaction window may have closed early. */
55
+ UNSETTLED: 'unsettled',
56
+ /** Held at a real grade over a clean capture with no channel disagreeing. */
57
+ PROVED: 'proved',
58
+ };
23
59
  /**
24
60
  * Actionable companion to NO_PROVIDER for the tools that genuinely intercept or capture through CDP
25
61
  * — network mocking and viewport control — which is NOT "visual capture".
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reticlehq/core",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "The Reticle foundation: the shared wire contract — types, zod schemas, constants, messages, and the isomorphic kernel that every Reticle package (browser SDK, server, kits, test harness) imports. Depends only on zod.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,7 +14,8 @@
14
14
  "./desktop-contract": {
15
15
  "types": "./dist/desktop-contract.d.cts",
16
16
  "default": "./dist/desktop-contract.cjs"
17
- }
17
+ },
18
+ "./package.json": "./package.json"
18
19
  },
19
20
  "dependencies": {
20
21
  "zod": "^3.24.1"
@@ -54,6 +55,7 @@
54
55
  "build": "tsc -b && node scripts/gen-schema.mjs && node scripts/gen-desktop-contract.mjs",
55
56
  "typecheck": "tsc -b",
56
57
  "lint": "eslint src",
57
- "test:unit": "vitest run src --passWithNoTests"
58
+ "test:unit": "vitest run src --passWithNoTests",
59
+ "test:coverage": "vitest run src --passWithNoTests --coverage.enabled --coverage.provider=v8 --coverage.reporter=text-summary --coverage.include='src/**/*.ts' --coverage.exclude='src/**/*.test.ts'"
58
60
  }
59
61
  }