@reticlehq/core 3.2.0 → 3.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 (91) hide show
  1. package/README.md +1 -1
  2. package/dist/artifacts/flow-composition.d.ts +3 -2
  3. package/dist/artifacts/flow-constants.d.ts +68 -2
  4. package/dist/artifacts/flow-constants.js +84 -2
  5. package/dist/artifacts/flow-expect-flat.d.ts +260 -0
  6. package/dist/artifacts/flow-expect-flat.js +284 -0
  7. package/dist/artifacts/flow-mutation-target.d.ts +0 -1
  8. package/dist/artifacts/flow-mutation-target.js +30 -2
  9. package/dist/artifacts/flow-step-tool.d.ts +2 -0
  10. package/dist/artifacts/flow-types.d.ts +1285 -1343
  11. package/dist/artifacts/flow-types.js +111 -140
  12. package/dist/artifacts/impact.d.ts +48 -20
  13. package/dist/artifacts/impact.js +11 -0
  14. package/dist/artifacts/journal.d.ts +34 -6
  15. package/dist/artifacts/journal.js +13 -0
  16. package/dist/hooks/hook-events.d.ts +18 -18
  17. package/dist/hud-entry.d.ts +9 -0
  18. package/dist/hud-entry.js +9 -0
  19. package/dist/identity/source-constants.d.ts +11 -0
  20. package/dist/identity/source-constants.js +11 -0
  21. package/dist/index.d.ts +9 -0
  22. package/dist/index.js +25 -1
  23. package/dist/onboarding.d.ts +2 -2
  24. package/dist/realm/registry.d.ts +0 -8
  25. package/dist/realm/registry.js +1 -11
  26. package/dist/registry/daemon-registry.d.ts +14 -4
  27. package/dist/registry/daemon-registry.js +20 -4
  28. package/dist/schema/event-message.json +3 -1
  29. package/dist/schema/event-payloads.json +72 -0
  30. package/dist/schema/event-type.json +3 -1
  31. package/dist/schema/reticle-event.json +3 -1
  32. package/dist/schema/reticle-message.json +3 -1
  33. package/dist/source-constants.cjs +1 -0
  34. package/dist/source-constants.d.cts +1 -0
  35. package/dist/telemetry-feedback.d.ts +6 -6
  36. package/dist/telemetry-refusal.d.ts +5 -4
  37. package/dist/telemetry-session.d.ts +25 -2
  38. package/dist/telemetry-session.js +13 -0
  39. package/dist/telemetry.d.ts +130 -102
  40. package/dist/verdict/compare-source.d.ts +80 -0
  41. package/dist/verdict/compare-source.js +93 -0
  42. package/dist/verdict/consequence.d.ts +12 -0
  43. package/dist/verdict/consequence.js +15 -0
  44. package/dist/verdict/instrumentation-gap.js +1 -1
  45. package/dist/verdict/intent.d.ts +24 -0
  46. package/dist/verdict/intent.js +66 -10
  47. package/dist/verdict/predicate-tree.d.ts +82 -0
  48. package/dist/verdict/predicate-tree.js +186 -0
  49. package/dist/verdict/predicate.d.ts +138 -0
  50. package/dist/verdict/predicate.js +430 -0
  51. package/dist/verdict/property-assertion.d.ts +191 -0
  52. package/dist/verdict/property-assertion.js +42 -0
  53. package/dist/verdict/security.js +16 -4
  54. package/dist/verdict/verdict-attribution.d.ts +52 -0
  55. package/dist/verdict/verdict-attribution.js +87 -0
  56. package/dist/verdict/verification-run.d.ts +330 -83
  57. package/dist/verdict/verification-run.js +44 -1
  58. package/dist/verdict/verified-constants.d.ts +9 -0
  59. package/dist/verdict/verified-constants.js +9 -0
  60. package/dist/wire/channel.d.ts +10 -0
  61. package/dist/wire/channel.js +25 -0
  62. package/dist/wire/constants/constants.d.ts +65 -102
  63. package/dist/wire/constants/constants.js +79 -101
  64. package/dist/wire/constants/discovery.d.ts +25 -0
  65. package/dist/wire/constants/discovery.js +25 -0
  66. package/dist/wire/constants/event-types.d.ts +122 -0
  67. package/dist/wire/constants/event-types.js +121 -0
  68. package/dist/wire/constants/hud-controls.d.ts +19 -0
  69. package/dist/wire/constants/hud-controls.js +95 -0
  70. package/dist/wire/constants/hud-use.d.ts +27 -0
  71. package/dist/wire/constants/hud-use.js +24 -0
  72. package/dist/wire/constants/session-constants.d.ts +10 -0
  73. package/dist/wire/constants/session-constants.js +10 -0
  74. package/dist/wire/event-payloads.d.ts +72 -13
  75. package/dist/wire/event-payloads.js +26 -4
  76. package/dist/wire/messages.d.ts +97 -56
  77. package/dist/wire/messages.js +17 -0
  78. package/dist/wire/net.d.ts +35 -0
  79. package/dist/wire/net.js +41 -0
  80. package/dist/wire/redaction.js +17 -0
  81. package/dist/wire/state-select.d.ts +2 -1
  82. package/dist/wire/state-select.js +56 -3
  83. package/dist/wire/toon.d.ts +1 -1
  84. package/dist/wire/toon.js +30 -8
  85. package/dist/wire/types.d.ts +119 -94
  86. package/dist/wire/types.js +23 -1
  87. package/dist/words/no-session-reason.d.ts +7 -0
  88. package/dist/words/no-session-reason.js +7 -0
  89. package/dist/words/notices.d.ts +7 -0
  90. package/dist/words/notices.js +9 -2
  91. package/package.json +7 -2
@@ -241,13 +241,13 @@ export declare const FeedbackSchema: z.ZodObject<{
241
241
  }, "strip", z.ZodTypeAny, {
242
242
  text: string;
243
243
  kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
244
- source: "agent" | "human";
244
+ source: "human" | "agent";
245
245
  impact?: string | undefined;
246
+ model?: string | undefined;
246
247
  trace?: string | undefined;
247
248
  rating?: number | undefined;
248
249
  need?: string | undefined;
249
250
  currentApproach?: string | undefined;
250
- model?: string | undefined;
251
251
  clientVersion?: string | undefined;
252
252
  stack?: string | undefined;
253
253
  stackMajor?: number | undefined;
@@ -255,17 +255,17 @@ export declare const FeedbackSchema: z.ZodObject<{
255
255
  engine?: "blink" | "gecko" | "webkit" | undefined;
256
256
  driver?: "cdp" | "sdk" | undefined;
257
257
  client?: string | undefined;
258
- mcpScope?: "user" | "project" | undefined;
258
+ mcpScope?: "project" | "user" | undefined;
259
259
  }, {
260
260
  text: string;
261
261
  kind: "bug" | "gap" | "ambiguity" | "feature_request" | "improvement" | "experience";
262
- source: "agent" | "human";
262
+ source: "human" | "agent";
263
263
  impact?: string | undefined;
264
+ model?: string | undefined;
264
265
  trace?: string | undefined;
265
266
  rating?: number | undefined;
266
267
  need?: string | undefined;
267
268
  currentApproach?: string | undefined;
268
- model?: string | undefined;
269
269
  clientVersion?: string | undefined;
270
270
  stack?: string | undefined;
271
271
  stackMajor?: number | undefined;
@@ -273,7 +273,7 @@ export declare const FeedbackSchema: z.ZodObject<{
273
273
  engine?: "blink" | "gecko" | "webkit" | undefined;
274
274
  driver?: "cdp" | "sdk" | undefined;
275
275
  client?: string | undefined;
276
- mcpScope?: "user" | "project" | undefined;
276
+ mcpScope?: "project" | "user" | undefined;
277
277
  }>;
278
278
  export type Feedback = z.infer<typeof FeedbackSchema>;
279
279
  /** What Reticle is being used for. Self-declared; never inferred. */
@@ -63,6 +63,7 @@ export declare const ToolRefusalSchema: z.ZodObject<{
63
63
  readonly AUTH_REFUSED: "auth_refused";
64
64
  readonly LEASE_EXPIRED: "lease_expired";
65
65
  readonly TAB_GONE: "tab_gone";
66
+ readonly ROUTE_SERVER_ERROR: "route_server_error";
66
67
  readonly APP_NOT_REOPENED: "app_not_reopened";
67
68
  readonly CONFIG_ELSEWHERE: "config_elsewhere";
68
69
  readonly NO_LISTENER_NO_CONFIG: "no_listener_no_config";
@@ -81,14 +82,14 @@ export declare const ToolRefusalSchema: z.ZodObject<{
81
82
  */
82
83
  retried: z.ZodBoolean;
83
84
  }, "strip", z.ZodTypeAny, {
84
- tool: string;
85
85
  reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
86
+ tool: string;
86
87
  retried: boolean;
87
- noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
88
+ noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "route_server_error" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
88
89
  }, {
89
- tool: string;
90
90
  reason: "other" | "no_session" | "no_match" | "unsupported" | "bad_args" | "not_ready";
91
+ tool: string;
91
92
  retried: boolean;
92
- noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
93
+ noSessionReason?: "auth_refused" | "lease_expired" | "tab_gone" | "route_server_error" | "app_not_reopened" | "config_elsewhere" | "no_listener_no_config" | "no_listener" | "no_config" | "sdk_not_reaching_daemon" | undefined;
93
94
  }>;
94
95
  export type ToolRefusal = z.infer<typeof ToolRefusalSchema>;
@@ -480,6 +480,19 @@ export declare const SessionSummarySchema: z.ZodObject<{
480
480
  * something was and the nudge did not fire — and only the second is a defect.
481
481
  */
482
482
  updateOffered: z.ZodOptional<z.ZodString>;
483
+ /**
484
+ * How people used the in-page HUD this window. All windowed, all absent when nobody touched it.
485
+ *
486
+ * `hudControls` counts presses per control id (a toggle as `id:on` / `id:off`), `hudViewMs` and
487
+ * `hudPanelMs` time how the HUD sat (bubble / collapsed / expanded) and which panel was showing,
488
+ * and `hudJourney` is the window's presses and view changes in order, cut at 60 with
489
+ * `hudJourneyCut`. Every key is a control id from core's closed list: names, never values.
490
+ */
491
+ hudControls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
492
+ hudViewMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
493
+ hudPanelMs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
494
+ hudJourney: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
495
+ hudJourneyCut: z.ZodOptional<z.ZodLiteral<true>>;
483
496
  /** Was this a clean shutdown, or a periodic flush of a still-running session? */
484
497
  final: z.ZodBoolean;
485
498
  /**
@@ -559,6 +572,11 @@ export declare const SessionSummarySchema: z.ZodObject<{
559
572
  endedWithVerdict?: boolean | undefined;
560
573
  updateNudged?: boolean | undefined;
561
574
  updateOffered?: string | undefined;
575
+ hudControls?: Record<string, number> | undefined;
576
+ hudViewMs?: Record<string, number> | undefined;
577
+ hudPanelMs?: Record<string, number> | undefined;
578
+ hudJourney?: string[] | undefined;
579
+ hudJourneyCut?: true | undefined;
562
580
  exit?: "signal" | "idle" | "unknown" | undefined;
563
581
  }, {
564
582
  durationMs: number;
@@ -624,6 +642,11 @@ export declare const SessionSummarySchema: z.ZodObject<{
624
642
  endedWithVerdict?: boolean | undefined;
625
643
  updateNudged?: boolean | undefined;
626
644
  updateOffered?: string | undefined;
645
+ hudControls?: Record<string, number> | undefined;
646
+ hudViewMs?: Record<string, number> | undefined;
647
+ hudPanelMs?: Record<string, number> | undefined;
648
+ hudJourney?: string[] | undefined;
649
+ hudJourneyCut?: true | undefined;
627
650
  exit?: "signal" | "idle" | "unknown" | undefined;
628
651
  }>;
629
652
  export type SessionSummary = z.infer<typeof SessionSummarySchema>;
@@ -818,9 +841,9 @@ export declare const ProjectProfileSchema: z.ZodObject<{
818
841
  featureDepth: number;
819
842
  stack?: string | undefined;
820
843
  stackMajor?: number | undefined;
844
+ size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
821
845
  stackSource?: "cwd" | "workspace" | undefined;
822
846
  stackUnknownReason?: "no_app_found" | "manifest_unrecognised" | "workspace_apps_unrecognised" | "workspace_root_no_apps" | "discovery_failed" | undefined;
823
- size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
824
847
  monorepo?: boolean | undefined;
825
848
  forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
826
849
  ageWeeks?: number | undefined;
@@ -838,9 +861,9 @@ export declare const ProjectProfileSchema: z.ZodObject<{
838
861
  featureDepth: number;
839
862
  stack?: string | undefined;
840
863
  stackMajor?: number | undefined;
864
+ size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
841
865
  stackSource?: "cwd" | "workspace" | undefined;
842
866
  stackUnknownReason?: "no_app_found" | "manifest_unrecognised" | "workspace_apps_unrecognised" | "workspace_root_no_apps" | "discovery_failed" | undefined;
843
- size?: "medium" | "tiny" | "small" | "large" | "huge" | undefined;
844
867
  monorepo?: boolean | undefined;
845
868
  forge?: "github" | "gitlab" | "bitbucket" | "azure" | "sourcehut" | "codeberg" | "self_hosted" | undefined;
846
869
  ageWeeks?: number | undefined;
@@ -349,6 +349,19 @@ export const SessionSummarySchema = z.object({
349
349
  * something was and the nudge did not fire — and only the second is a defect.
350
350
  */
351
351
  updateOffered: z.string().max(32).optional(),
352
+ /**
353
+ * How people used the in-page HUD this window. All windowed, all absent when nobody touched it.
354
+ *
355
+ * `hudControls` counts presses per control id (a toggle as `id:on` / `id:off`), `hudViewMs` and
356
+ * `hudPanelMs` time how the HUD sat (bubble / collapsed / expanded) and which panel was showing,
357
+ * and `hudJourney` is the window's presses and view changes in order, cut at 60 with
358
+ * `hudJourneyCut`. Every key is a control id from core's closed list: names, never values.
359
+ */
360
+ hudControls: z.record(z.number()).optional(),
361
+ hudViewMs: z.record(z.number()).optional(),
362
+ hudPanelMs: z.record(z.number()).optional(),
363
+ hudJourney: z.array(z.string().max(64)).max(60).optional(),
364
+ hudJourneyCut: z.literal(true).optional(),
352
365
  /** Was this a clean shutdown, or a periodic flush of a still-running session? */
353
366
  final: z.boolean(),
354
367
  /**