@proofoftech/flowsafe 0.3.0 → 0.6.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 +336 -0
- package/dist/agent-runner/approval-shapes.d.ts +36 -0
- package/dist/agent-runner/approval-shapes.d.ts.map +1 -0
- package/dist/agent-runner/approval-shapes.js +101 -0
- package/dist/agent-runner/approval-shapes.js.map +1 -0
- package/dist/agent-runner/durable-agent-runner.d.ts +154 -0
- package/dist/agent-runner/durable-agent-runner.d.ts.map +1 -0
- package/dist/agent-runner/durable-agent-runner.js +291 -0
- package/dist/agent-runner/durable-agent-runner.js.map +1 -0
- package/dist/agent-runner/index.d.ts +3 -0
- package/dist/agent-runner/index.d.ts.map +1 -0
- package/dist/agent-runner/index.js +10 -0
- package/dist/agent-runner/index.js.map +1 -0
- package/dist/approval-api/contract.d.ts +29 -0
- package/dist/approval-api/contract.d.ts.map +1 -1
- package/dist/approval-api/d1-store.d.ts.map +1 -1
- package/dist/approval-api/d1-store.js +112 -18
- package/dist/approval-api/d1-store.js.map +1 -1
- package/dist/approval-api/grants.d.ts +1 -1
- package/dist/approval-api/grants.d.ts.map +1 -1
- package/dist/approval-api/grants.js +8 -32
- package/dist/approval-api/grants.js.map +1 -1
- package/dist/approval-api/index.d.ts +2 -2
- package/dist/approval-api/index.d.ts.map +1 -1
- package/dist/approval-api/index.js.map +1 -1
- package/dist/approval-api/router.d.ts +1 -1
- package/dist/approval-api/router.d.ts.map +1 -1
- package/dist/approval-api/router.js +1 -0
- package/dist/approval-api/router.js.map +1 -1
- package/dist/approval-api/service.d.ts +24 -3
- package/dist/approval-api/service.d.ts.map +1 -1
- package/dist/approval-api/service.js +116 -1
- package/dist/approval-api/service.js.map +1 -1
- package/dist/approval-api/store.d.ts +29 -6
- package/dist/approval-api/store.d.ts.map +1 -1
- package/dist/approval-api/store.js +62 -2
- package/dist/approval-api/store.js.map +1 -1
- package/dist/approval-api/tenant-context.d.ts.map +1 -1
- package/dist/approval-api/tenant-context.js +17 -1
- package/dist/approval-api/tenant-context.js.map +1 -1
- package/dist/approval-api/tenant-store.d.ts.map +1 -1
- package/dist/approval-api/tenant-store.js +8 -2
- package/dist/approval-api/tenant-store.js.map +1 -1
- package/dist/approval-api/types.d.ts +19 -0
- package/dist/approval-api/types.d.ts.map +1 -1
- package/dist/approval-api/types.js +16 -0
- package/dist/approval-api/types.js.map +1 -1
- package/dist/approval-ui/App.d.ts +9 -1
- package/dist/approval-ui/App.d.ts.map +1 -1
- package/dist/approval-ui/App.js +10 -5
- package/dist/approval-ui/App.js.map +1 -1
- package/dist/approval-ui/DetailView.d.ts +4 -1
- package/dist/approval-ui/DetailView.d.ts.map +1 -1
- package/dist/approval-ui/DetailView.js +2 -2
- package/dist/approval-ui/DetailView.js.map +1 -1
- package/dist/approval-ui/QueueView.d.ts +7 -1
- package/dist/approval-ui/QueueView.d.ts.map +1 -1
- package/dist/approval-ui/QueueView.js +8 -3
- package/dist/approval-ui/QueueView.js.map +1 -1
- package/dist/approval-ui/client.d.ts +19 -0
- package/dist/approval-ui/client.d.ts.map +1 -1
- package/dist/approval-ui/client.js +29 -1
- package/dist/approval-ui/client.js.map +1 -1
- package/dist/approval-ui/components.d.ts +20 -0
- package/dist/approval-ui/components.d.ts.map +1 -1
- package/dist/approval-ui/components.js +2 -0
- package/dist/approval-ui/components.js.map +1 -1
- package/dist/approval-ui/index.d.ts +4 -2
- package/dist/approval-ui/index.d.ts.map +1 -1
- package/dist/approval-ui/index.js +3 -0
- package/dist/approval-ui/index.js.map +1 -1
- package/dist/approval-ui/stream.d.ts +142 -0
- package/dist/approval-ui/stream.d.ts.map +1 -0
- package/dist/approval-ui/stream.js +136 -0
- package/dist/approval-ui/stream.js.map +1 -0
- package/dist/approval-ui/use-approval-dashboard.d.ts +74 -1
- package/dist/approval-ui/use-approval-dashboard.d.ts.map +1 -1
- package/dist/approval-ui/use-approval-dashboard.js +307 -7
- package/dist/approval-ui/use-approval-dashboard.js.map +1 -1
- package/dist/approval-ui/use-web-socket-transport.d.ts +10 -0
- package/dist/approval-ui/use-web-socket-transport.d.ts.map +1 -0
- package/dist/approval-ui/use-web-socket-transport.js +46 -0
- package/dist/approval-ui/use-web-socket-transport.js.map +1 -0
- package/dist/background-tasks/d1-storage.d.ts +66 -0
- package/dist/background-tasks/d1-storage.d.ts.map +1 -0
- package/dist/background-tasks/d1-storage.js +196 -0
- package/dist/background-tasks/d1-storage.js.map +1 -0
- package/dist/background-tasks/host.d.ts +82 -0
- package/dist/background-tasks/host.d.ts.map +1 -0
- package/dist/background-tasks/host.js +275 -0
- package/dist/background-tasks/host.js.map +1 -0
- package/dist/background-tasks/index.d.ts +7 -0
- package/dist/background-tasks/index.d.ts.map +1 -0
- package/dist/background-tasks/index.js +10 -0
- package/dist/background-tasks/index.js.map +1 -0
- package/dist/background-tasks/routes.d.ts +15 -0
- package/dist/background-tasks/routes.d.ts.map +1 -0
- package/dist/background-tasks/routes.js +144 -0
- package/dist/background-tasks/routes.js.map +1 -0
- package/dist/do-runner/cf-types.d.ts +70 -2
- package/dist/do-runner/cf-types.d.ts.map +1 -1
- package/dist/do-runner/cf-types.js +30 -1
- package/dist/do-runner/cf-types.js.map +1 -1
- package/dist/do-runner/d1-storage.d.ts +343 -2
- package/dist/do-runner/d1-storage.d.ts.map +1 -1
- package/dist/do-runner/d1-storage.js +566 -13
- package/dist/do-runner/d1-storage.js.map +1 -1
- package/dist/do-runner/do-error-response.d.ts +29 -0
- package/dist/do-runner/do-error-response.d.ts.map +1 -0
- package/dist/do-runner/do-error-response.js +73 -0
- package/dist/do-runner/do-error-response.js.map +1 -0
- package/dist/do-runner/durable-object.d.ts +5 -2
- package/dist/do-runner/durable-object.d.ts.map +1 -1
- package/dist/do-runner/durable-object.js +87 -20
- package/dist/do-runner/durable-object.js.map +1 -1
- package/dist/do-runner/hub-do.d.ts +55 -0
- package/dist/do-runner/hub-do.d.ts.map +1 -0
- package/dist/do-runner/hub-do.js +197 -0
- package/dist/do-runner/hub-do.js.map +1 -0
- package/dist/do-runner/index.d.ts +12 -4
- package/dist/do-runner/index.d.ts.map +1 -1
- package/dist/do-runner/index.js +9 -2
- package/dist/do-runner/index.js.map +1 -1
- package/dist/do-runner/init.d.ts +20 -0
- package/dist/do-runner/init.d.ts.map +1 -1
- package/dist/do-runner/init.js +12 -1
- package/dist/do-runner/init.js.map +1 -1
- package/dist/do-runner/path-safe-id.js +1 -1
- package/dist/do-runner/path-safe-id.js.map +1 -1
- package/dist/do-runner/pubsub.d.ts +18 -0
- package/dist/do-runner/pubsub.d.ts.map +1 -0
- package/dist/do-runner/pubsub.js +42 -0
- package/dist/do-runner/pubsub.js.map +1 -0
- package/dist/do-runner/runtime.d.ts +24 -0
- package/dist/do-runner/runtime.d.ts.map +1 -1
- package/dist/do-runner/runtime.js +29 -2
- package/dist/do-runner/runtime.js.map +1 -1
- package/dist/do-runner/thread-do.d.ts +74 -0
- package/dist/do-runner/thread-do.d.ts.map +1 -0
- package/dist/do-runner/thread-do.js +156 -0
- package/dist/do-runner/thread-do.js.map +1 -0
- package/dist/do-runner/thread-header.d.ts +16 -0
- package/dist/do-runner/thread-header.d.ts.map +1 -0
- package/dist/do-runner/thread-header.js +24 -0
- package/dist/do-runner/thread-header.js.map +1 -0
- package/dist/goals/index.d.ts +2 -0
- package/dist/goals/index.d.ts.map +1 -0
- package/dist/goals/index.js +7 -0
- package/dist/goals/index.js.map +1 -0
- package/dist/goals/objective-routes.d.ts +87 -0
- package/dist/goals/objective-routes.d.ts.map +1 -0
- package/dist/goals/objective-routes.js +375 -0
- package/dist/goals/objective-routes.js.map +1 -0
- package/dist/host-kit/approval-bridge.d.ts +24 -4
- package/dist/host-kit/approval-bridge.d.ts.map +1 -1
- package/dist/host-kit/approval-bridge.js +32 -10
- package/dist/host-kit/approval-bridge.js.map +1 -1
- package/dist/host-kit/env-vars.d.ts +20 -0
- package/dist/host-kit/env-vars.d.ts.map +1 -1
- package/dist/host-kit/env-vars.js +30 -0
- package/dist/host-kit/env-vars.js.map +1 -1
- package/dist/host-kit/flowsafe-worker.d.ts +134 -5
- package/dist/host-kit/flowsafe-worker.d.ts.map +1 -1
- package/dist/host-kit/flowsafe-worker.js +283 -47
- package/dist/host-kit/flowsafe-worker.js.map +1 -1
- package/dist/host-kit/host-approval-service.d.ts +20 -1
- package/dist/host-kit/host-approval-service.d.ts.map +1 -1
- package/dist/host-kit/host-approval-service.js +15 -0
- package/dist/host-kit/host-approval-service.js.map +1 -1
- package/dist/host-kit/hub-topology.d.ts +35 -0
- package/dist/host-kit/hub-topology.d.ts.map +1 -0
- package/dist/host-kit/hub-topology.js +32 -0
- package/dist/host-kit/hub-topology.js.map +1 -0
- package/dist/host-kit/index.d.ts +8 -1
- package/dist/host-kit/index.d.ts.map +1 -1
- package/dist/host-kit/index.js +10 -0
- package/dist/host-kit/index.js.map +1 -1
- package/dist/host-kit/memory-boundary.d.ts +64 -0
- package/dist/host-kit/memory-boundary.d.ts.map +1 -0
- package/dist/host-kit/memory-boundary.js +109 -0
- package/dist/host-kit/memory-boundary.js.map +1 -0
- package/dist/host-kit/route-path.d.ts +17 -0
- package/dist/host-kit/route-path.d.ts.map +1 -0
- package/dist/host-kit/route-path.js +35 -0
- package/dist/host-kit/route-path.js.map +1 -0
- package/dist/host-kit/stream-router.d.ts +22 -0
- package/dist/host-kit/stream-router.d.ts.map +1 -0
- package/dist/host-kit/stream-router.js +191 -0
- package/dist/host-kit/stream-router.js.map +1 -0
- package/dist/host-kit/stream-ticket.d.ts +55 -0
- package/dist/host-kit/stream-ticket.d.ts.map +1 -0
- package/dist/host-kit/stream-ticket.js +156 -0
- package/dist/host-kit/stream-ticket.js.map +1 -0
- package/dist/host-kit/tenant-registry.js +1 -1
- package/dist/host-kit/tenant-registry.js.map +1 -1
- package/dist/host-kit/thread-topology.d.ts +44 -0
- package/dist/host-kit/thread-topology.d.ts.map +1 -0
- package/dist/host-kit/thread-topology.js +76 -0
- package/dist/host-kit/thread-topology.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal-error-response.d.ts +3 -0
- package/dist/internal-error-response.d.ts.map +1 -0
- package/dist/internal-error-response.js +20 -0
- package/dist/internal-error-response.js.map +1 -0
- package/dist/numeric-config.d.ts +4 -0
- package/dist/numeric-config.d.ts.map +1 -0
- package/dist/numeric-config.js +23 -0
- package/dist/numeric-config.js.map +1 -0
- package/dist/schedules/index.d.ts +5 -0
- package/dist/schedules/index.d.ts.map +1 -0
- package/dist/schedules/index.js +13 -0
- package/dist/schedules/index.js.map +1 -0
- package/dist/schedules/router.d.ts +66 -0
- package/dist/schedules/router.d.ts.map +1 -0
- package/dist/schedules/router.js +827 -0
- package/dist/schedules/router.js.map +1 -0
- package/dist/schedules/schedules-d1.d.ts +30 -0
- package/dist/schedules/schedules-d1.d.ts.map +1 -0
- package/dist/schedules/schedules-d1.js +374 -0
- package/dist/schedules/schedules-d1.js.map +1 -0
- package/dist/schedules/storage.d.ts +11 -0
- package/dist/schedules/storage.d.ts.map +1 -0
- package/dist/schedules/storage.js +34 -0
- package/dist/schedules/storage.js.map +1 -0
- package/dist/schedules/tick.d.ts +131 -0
- package/dist/schedules/tick.d.ts.map +1 -0
- package/dist/schedules/tick.js +598 -0
- package/dist/schedules/tick.js.map +1 -0
- package/dist/signal-providers/delivery.d.ts +24 -0
- package/dist/signal-providers/delivery.d.ts.map +1 -0
- package/dist/signal-providers/delivery.js +62 -0
- package/dist/signal-providers/delivery.js.map +1 -0
- package/dist/signal-providers/github-provider.d.ts +33 -0
- package/dist/signal-providers/github-provider.d.ts.map +1 -0
- package/dist/signal-providers/github-provider.js +116 -0
- package/dist/signal-providers/github-provider.js.map +1 -0
- package/dist/signal-providers/host-do.d.ts +79 -0
- package/dist/signal-providers/host-do.d.ts.map +1 -0
- package/dist/signal-providers/host-do.js +216 -0
- package/dist/signal-providers/host-do.js.map +1 -0
- package/dist/signal-providers/index.d.ts +7 -0
- package/dist/signal-providers/index.d.ts.map +1 -0
- package/dist/signal-providers/index.js +19 -0
- package/dist/signal-providers/index.js.map +1 -0
- package/dist/signal-providers/provider.d.ts +92 -0
- package/dist/signal-providers/provider.d.ts.map +1 -0
- package/dist/signal-providers/provider.js +87 -0
- package/dist/signal-providers/provider.js.map +1 -0
- package/dist/signal-providers/subscription-d1.d.ts +88 -0
- package/dist/signal-providers/subscription-d1.d.ts.map +1 -0
- package/dist/signal-providers/subscription-d1.js +259 -0
- package/dist/signal-providers/subscription-d1.js.map +1 -0
- package/dist/signal-providers/webhook-route.d.ts +88 -0
- package/dist/signal-providers/webhook-route.d.ts.map +1 -0
- package/dist/signal-providers/webhook-route.js +391 -0
- package/dist/signal-providers/webhook-route.js.map +1 -0
- package/dist/signals/client.d.ts +72 -0
- package/dist/signals/client.d.ts.map +1 -0
- package/dist/signals/client.js +87 -0
- package/dist/signals/client.js.map +1 -0
- package/dist/signals/d1-shared.d.ts +43 -0
- package/dist/signals/d1-shared.d.ts.map +1 -0
- package/dist/signals/d1-shared.js +46 -0
- package/dist/signals/d1-shared.js.map +1 -0
- package/dist/signals/index.d.ts +9 -0
- package/dist/signals/index.d.ts.map +1 -0
- package/dist/signals/index.js +15 -0
- package/dist/signals/index.js.map +1 -0
- package/dist/signals/notification-dispatch.d.ts +52 -0
- package/dist/signals/notification-dispatch.d.ts.map +1 -0
- package/dist/signals/notification-dispatch.js +198 -0
- package/dist/signals/notification-dispatch.js.map +1 -0
- package/dist/signals/notifications-d1.d.ts +28 -0
- package/dist/signals/notifications-d1.d.ts.map +1 -0
- package/dist/signals/notifications-d1.js +704 -0
- package/dist/signals/notifications-d1.js.map +1 -0
- package/dist/signals/router.d.ts +73 -0
- package/dist/signals/router.d.ts.map +1 -0
- package/dist/signals/router.js +240 -0
- package/dist/signals/router.js.map +1 -0
- package/dist/signals/storage.d.ts +11 -0
- package/dist/signals/storage.d.ts.map +1 -0
- package/dist/signals/storage.js +27 -0
- package/dist/signals/storage.js.map +1 -0
- package/dist/signals/thread-do-routes.d.ts +82 -0
- package/dist/signals/thread-do-routes.d.ts.map +1 -0
- package/dist/signals/thread-do-routes.js +660 -0
- package/dist/signals/thread-do-routes.js.map +1 -0
- package/dist/signals/thread-state-d1.d.ts +22 -0
- package/dist/signals/thread-state-d1.d.ts.map +1 -0
- package/dist/signals/thread-state-d1.js +83 -0
- package/dist/signals/thread-state-d1.js.map +1 -0
- package/package.json +11 -2
|
@@ -2,7 +2,7 @@ export type { ApprovalDashboardProps } from './App.js';
|
|
|
2
2
|
export { App, batchFailureSummary } from './App.js';
|
|
3
3
|
export type { ApprovalApiClientOptions, FetchLike, ResponseLike, } from './client.js';
|
|
4
4
|
export { ApprovalApiClient, ApprovalApiError, } from './client.js';
|
|
5
|
-
export type { ApprovalColumn, ApprovalUIComponents, ApprovalUIProviderProps, BadgeProps, BannerProps, ButtonProps, ButtonVariant, CheckboxProps, CodeProps, EmptyStateProps, HeadingProps, InfoTipProps, MetadataItemProps, MetadataListProps, ResolvedApprovalUIComponents, SectionProps, SelectOption, SelectProps, SpinnerProps, StackDirection, StackGap, StackProps, TableProps, TextFieldProps, TextProps, Tone, } from './components.js';
|
|
5
|
+
export type { ApprovalColumn, ApprovalUIComponents, ApprovalUIProviderProps, BadgeProps, BannerProps, ButtonProps, ButtonVariant, CheckboxProps, CodeProps, EmptyStateProps, HeadingProps, InfoTipProps, MetadataItemProps, MetadataListProps, PresenceIndicatorProps, ResolvedApprovalUIComponents, SectionProps, SelectOption, SelectProps, SpinnerProps, StackDirection, StackGap, StackProps, TableProps, TextFieldProps, TextProps, ToastProps, Tone, } from './components.js';
|
|
6
6
|
export { ApprovalUIProvider, htmlComponents, useApprovalUIComponents, } from './components.js';
|
|
7
7
|
export type { DetailViewProps } from './DetailView.js';
|
|
8
8
|
export { DetailView } from './DetailView.js';
|
|
@@ -14,10 +14,12 @@ export type { CreateApprovalDashboardOptions } from './mount.js';
|
|
|
14
14
|
export { createApprovalDashboard } from './mount.js';
|
|
15
15
|
export type { QueueViewProps } from './QueueView.js';
|
|
16
16
|
export { QueueView } from './QueueView.js';
|
|
17
|
+
export type { DecisionConflict, PresenceMember, StreamConnection, StreamFrame, StreamHandlers, StreamRunSummary, StreamTransport, } from './stream.js';
|
|
17
18
|
export type { MetricLabel } from './tips.js';
|
|
18
19
|
export { APPROVAL_TIPS } from './tips.js';
|
|
19
|
-
export type { ApprovalDashboardState, UseApprovalDashboardOptions, } from './use-approval-dashboard.js';
|
|
20
|
+
export type { ApprovalDashboardState, ApprovalStreamOption, UseApprovalDashboardOptions, } from './use-approval-dashboard.js';
|
|
20
21
|
export { DEFAULT_QUEUE_FILTER, useApprovalDashboard, } from './use-approval-dashboard.js';
|
|
22
|
+
export { createWebSocketStreamTransport } from './use-web-socket-transport.js';
|
|
21
23
|
export type { SlaState } from './view-model.js';
|
|
22
24
|
export { DEFAULT_SLA_WARNING_MS, formatDuration, formatResolution, formatSlaCountdown, msRemaining, slaStateOf, sortQueue, } from './view-model.js';
|
|
23
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/approval-ui/index.ts"],"names":[],"mappings":"AAYA,YAAY,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,YAAY,EACV,wBAAwB,EACxB,SAAS,EACT,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACT,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,4BAA4B,EAC5B,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,UAAU,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACT,IAAI,GACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EACV,QAAQ,EACR,cAAc,EACd,WAAW,EACX,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,EACT,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/approval-ui/index.ts"],"names":[],"mappings":"AAYA,YAAY,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,YAAY,EACV,wBAAwB,EACxB,SAAS,EACT,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,EACV,WAAW,EACX,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BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC"}
|
|
@@ -23,5 +23,8 @@ export { APPROVAL_TIPS } from './tips.js';
|
|
|
23
23
|
// consumer API — keeping them off the barrel keeps them out of the frozen
|
|
24
24
|
// 0.2.0 surface.
|
|
25
25
|
export { DEFAULT_QUEUE_FILTER, useApprovalDashboard, } from './use-approval-dashboard.js';
|
|
26
|
+
// The one browser-WebSocket StreamTransport (UI-pass-only module); hosts inject
|
|
27
|
+
// it into useApprovalDashboard's `stream` option (showcase, M-008).
|
|
28
|
+
export { createWebSocketStreamTransport } from './use-web-socket-transport.js';
|
|
26
29
|
export { DEFAULT_SLA_WARNING_MS, formatDuration, formatResolution, formatSlaCountdown, msRemaining, slaStateOf, sortQueue, } from './view-model.js';
|
|
27
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/approval-ui/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAC9E,2DAA2D;AAC3D,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,yDAAyD;AAGzD,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/approval-ui/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,8EAA8E;AAC9E,+CAA+C;AAC/C,8EAA8E;AAC9E,2DAA2D;AAC3D,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,yDAAyD;AAGzD,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AA+BrB,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO7C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,qBAAqB,EACrB,SAAS,EACT,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAc3C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAM1C,6EAA6E;AAC7E,uEAAuE;AACvE,0EAA0E;AAC1E,iBAAiB;AACjB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AACrC,gFAAgF;AAChF,oEAAoE;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,SAAS,GACV,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { ApprovalStreamEvent } from '../approval-api/contract.js';
|
|
2
|
+
import { type ApprovalDecision, type ApprovalMetrics, type ApprovalRecord, type ApprovalStatus } from '../approval-api/types.js';
|
|
3
|
+
/** A live connection the hook closes on unmount / transport change. */
|
|
4
|
+
export interface StreamConnection {
|
|
5
|
+
close(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Send a frame to the server (optional). The hook uses it for a liveness
|
|
8
|
+
* heartbeat ('ping'); a transport that omits it simply gets no heartbeat and
|
|
9
|
+
* relies on the socket's own onClose. Browsers cannot send on a half-open
|
|
10
|
+
* socket, so the heartbeat + a pong deadline is what detects a silently dead
|
|
11
|
+
* connection and resumes polling (a broadcast-only run channel never fires
|
|
12
|
+
* onClose on its own).
|
|
13
|
+
*/
|
|
14
|
+
send?(data: string): void;
|
|
15
|
+
}
|
|
16
|
+
/** The transport wires these back to the subscriber. */
|
|
17
|
+
export interface StreamHandlers {
|
|
18
|
+
onMessage(data: string): void;
|
|
19
|
+
onOpen?(): void;
|
|
20
|
+
onClose?(): void;
|
|
21
|
+
onError?(err: unknown): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The injected transport. A browser-WebSocket implementation lives ONLY in the
|
|
25
|
+
* UI pass (use-web-socket-transport.ts); the library never hard-depends on a
|
|
26
|
+
* WebSocket global.
|
|
27
|
+
*/
|
|
28
|
+
export interface StreamTransport {
|
|
29
|
+
open(url: string, handlers: StreamHandlers): StreamConnection;
|
|
30
|
+
}
|
|
31
|
+
/** A reviewer attached to the tenant's hub, mirrored from do-runner/hub-do. */
|
|
32
|
+
export interface PresenceMember {
|
|
33
|
+
actorId: string;
|
|
34
|
+
role: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Minimal structural mirror of do-runner's RunSummary — only the JSON-safe
|
|
38
|
+
* fields a run frame carries. Defined locally (not imported) so approval-ui
|
|
39
|
+
* stays free of a do-runner/Mastra dependency; a real RunSummary is
|
|
40
|
+
* structurally assignable to it.
|
|
41
|
+
*/
|
|
42
|
+
export interface StreamRunSummary {
|
|
43
|
+
runId: string;
|
|
44
|
+
status: string;
|
|
45
|
+
result?: unknown;
|
|
46
|
+
error?: string;
|
|
47
|
+
suspended?: string[][];
|
|
48
|
+
suspendPayload?: unknown;
|
|
49
|
+
suspendedAt?: Record<string, number>;
|
|
50
|
+
resumedAt?: Record<string, number>;
|
|
51
|
+
resumeCount?: Record<string, number>;
|
|
52
|
+
createdAt?: string;
|
|
53
|
+
updatedAt?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The wire union every DO emits (M-005): the per-tenant hub fans out `queue`
|
|
57
|
+
* (an ApprovalStreamEvent) and `presence` (the roster) frames; the per-run
|
|
58
|
+
* runner DO emits `run` (the wholesale authoritative RunSummary) frames.
|
|
59
|
+
*/
|
|
60
|
+
export type StreamFrame = {
|
|
61
|
+
type: 'queue';
|
|
62
|
+
event: ApprovalStreamEvent;
|
|
63
|
+
} | {
|
|
64
|
+
type: 'run';
|
|
65
|
+
summary: StreamRunSummary;
|
|
66
|
+
} | {
|
|
67
|
+
type: 'presence';
|
|
68
|
+
roster: PresenceMember[];
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Parse a raw text frame to a StreamFrame, or undefined for anything malformed
|
|
72
|
+
* or of an unknown type. This is a same-trust intra-tenant feed (every
|
|
73
|
+
* subscriber is an authenticated reviewer of this tenant), so it validates the
|
|
74
|
+
* discriminant only, not the payload shape.
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseStreamFrame(data: string): StreamFrame | undefined;
|
|
77
|
+
/** One reviewer's in-flight optimistic decision, awaiting authoritative confirmation. */
|
|
78
|
+
export interface OptimisticDecision {
|
|
79
|
+
id: string;
|
|
80
|
+
decision: ApprovalDecision;
|
|
81
|
+
/** The deciding reviewer's id — compared against the authoritative decidedBy to detect a conflict. */
|
|
82
|
+
actorId: string;
|
|
83
|
+
}
|
|
84
|
+
/** Optimistic decisions keyed by record id. */
|
|
85
|
+
export type PendingDecisions = Readonly<Record<string, OptimisticDecision>>;
|
|
86
|
+
/** A live decision the stream attributed to a DIFFERENT reviewer than our optimistic decide. */
|
|
87
|
+
export interface DecisionConflict {
|
|
88
|
+
id: string;
|
|
89
|
+
actualDecider: string;
|
|
90
|
+
}
|
|
91
|
+
export interface MergeApprovalEventOptions {
|
|
92
|
+
/**
|
|
93
|
+
* The queue's status filter. When set, an upserted record whose status is
|
|
94
|
+
* NOT in the set is dropped from the list (a `decided` event removes a record
|
|
95
|
+
* from the open queue; a `created` event never enters a decided-history
|
|
96
|
+
* view). Undefined keeps every status.
|
|
97
|
+
*/
|
|
98
|
+
statuses?: readonly ApprovalStatus[];
|
|
99
|
+
/** Row comparator — defaults to the reviewer order the dashboard renders in. */
|
|
100
|
+
comparator?: (a: ApprovalRecord, b: ApprovalRecord) => number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Live-merge one queue event: upsert the post-transition record by id, drop it
|
|
104
|
+
* when it leaves the current status filter, and re-sort by the SAME comparator
|
|
105
|
+
* the hook renders with (byReviewerOrder). Non-mutating.
|
|
106
|
+
*/
|
|
107
|
+
export declare function mergeApprovalEvent(records: readonly ApprovalRecord[], event: ApprovalStreamEvent, options?: MergeApprovalEventOptions): ApprovalRecord[];
|
|
108
|
+
/**
|
|
109
|
+
* Mark a record locally decided (it greys out immediately) and return the
|
|
110
|
+
* pending descriptor to track until the authoritative event reconciles it.
|
|
111
|
+
* Non-mutating.
|
|
112
|
+
*/
|
|
113
|
+
export declare function applyOptimisticDecide(records: readonly ApprovalRecord[], id: string, decision: ApprovalDecision, actorId: string): {
|
|
114
|
+
records: ApprovalRecord[];
|
|
115
|
+
pending: OptimisticDecision;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Reconcile an authoritative decided event against the optimistic pending map:
|
|
119
|
+
* clear the matching entry, and surface a conflict when the authoritative
|
|
120
|
+
* decidedBy differs from the reviewer who optimistically decided (someone else
|
|
121
|
+
* decided first). A pending entry with an empty actorId (no id was supplied to
|
|
122
|
+
* the hook) clears WITHOUT raising a conflict — there is no identity to compare.
|
|
123
|
+
* Non-mutating.
|
|
124
|
+
*/
|
|
125
|
+
export declare function reconcileDecided(pending: PendingDecisions, event: ApprovalStreamEvent): {
|
|
126
|
+
pending: PendingDecisions;
|
|
127
|
+
conflict?: DecisionConflict;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Reduce a presence roster frame: distinct reviewers by actorId (a reviewer
|
|
131
|
+
* with two tabs counts once), in a stable order. Non-mutating.
|
|
132
|
+
*/
|
|
133
|
+
export declare function presenceReducer(roster: readonly PresenceMember[]): PresenceMember[];
|
|
134
|
+
/**
|
|
135
|
+
* Optimistic metrics counter deltas (DL-013): apply the derivable movement on
|
|
136
|
+
* each event for instant feedback; the interval poll's wholesale metrics()
|
|
137
|
+
* refetch is the authoritative reconciler (DL-021). Counts never go negative.
|
|
138
|
+
* Returns the same reference when nothing derivable changed (no re-render), and
|
|
139
|
+
* null when metrics have not loaded yet.
|
|
140
|
+
*/
|
|
141
|
+
export declare function applyMetricsDelta(metrics: ApprovalMetrics | null, event: ApprovalStreamEvent): ApprovalMetrics | null;
|
|
142
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../src/approval-ui/stream.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAIlC,uEAAuE;AACvE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,IAAI,IAAI,CAAC;IACd;;;;;;;OAOG;IACH,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MA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S,cAAc,EAAE,GAChC,cAAc,EAAE,CAYlB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,eAAe,GAAG,IAAI,EAC/B,KAAK,EAAE,mBAAmB,GACzB,eAAe,GAAG,IAAI,CAuBxB"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// The live-streaming seam and its pure reducers. Deliberately DOM-free: the
|
|
3
|
+
// transport is INJECTED behind a structural interface (like client.ts's
|
|
4
|
+
// FetchLike), so this file typechecks in the main (workers-typed) pass with no
|
|
5
|
+
// DOM lib — a browser-WebSocket reference here would break that build far from
|
|
6
|
+
// the cause. The only place a `WebSocket` global lives is the UI-pass-only
|
|
7
|
+
// use-web-socket-transport.ts, which supplies a StreamTransport by injection.
|
|
8
|
+
//
|
|
9
|
+
// The reducers are pure and node-testable (stream.test.ts): they take the
|
|
10
|
+
// current dashboard state plus one wire event and return the next state, so all
|
|
11
|
+
// live-merge / optimistic-decide / reconcile logic stays out of the React hook.
|
|
12
|
+
// Wire types come from ../approval-api — the frame payloads ARE those types
|
|
13
|
+
// serialized (ApprovalStreamEvent for the queue channel); RunSummary and the
|
|
14
|
+
// presence roster are mirrored as minimal local structural shapes so this
|
|
15
|
+
// module keeps approval-ui's "no Mastra, no do-runner" decoupling.
|
|
16
|
+
import { byReviewerOrder, } from '../approval-api/types.js';
|
|
17
|
+
/**
|
|
18
|
+
* Parse a raw text frame to a StreamFrame, or undefined for anything malformed
|
|
19
|
+
* or of an unknown type. This is a same-trust intra-tenant feed (every
|
|
20
|
+
* subscriber is an authenticated reviewer of this tenant), so it validates the
|
|
21
|
+
* discriminant only, not the payload shape.
|
|
22
|
+
*/
|
|
23
|
+
export function parseStreamFrame(data) {
|
|
24
|
+
let parsed;
|
|
25
|
+
try {
|
|
26
|
+
parsed = JSON.parse(data);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
32
|
+
return undefined;
|
|
33
|
+
const { type } = parsed;
|
|
34
|
+
if (type === 'queue' || type === 'run' || type === 'presence') {
|
|
35
|
+
return parsed;
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Live-merge one queue event: upsert the post-transition record by id, drop it
|
|
41
|
+
* when it leaves the current status filter, and re-sort by the SAME comparator
|
|
42
|
+
* the hook renders with (byReviewerOrder). Non-mutating.
|
|
43
|
+
*/
|
|
44
|
+
export function mergeApprovalEvent(records, event, options = {}) {
|
|
45
|
+
const { statuses, comparator = byReviewerOrder } = options;
|
|
46
|
+
const incoming = event.record;
|
|
47
|
+
const withoutIncoming = records.filter((record) => record.id !== incoming.id);
|
|
48
|
+
const leavesFilter = statuses !== undefined && !statuses.includes(incoming.status);
|
|
49
|
+
const next = leavesFilter ? withoutIncoming : [...withoutIncoming, incoming];
|
|
50
|
+
return next.sort(comparator);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Mark a record locally decided (it greys out immediately) and return the
|
|
54
|
+
* pending descriptor to track until the authoritative event reconciles it.
|
|
55
|
+
* Non-mutating.
|
|
56
|
+
*/
|
|
57
|
+
export function applyOptimisticDecide(records, id, decision, actorId) {
|
|
58
|
+
const status = decision === 'approve' ? 'approved' : 'rejected';
|
|
59
|
+
const next = records.map((record) => record.id === id
|
|
60
|
+
? { ...record, status, decision, decidedBy: actorId }
|
|
61
|
+
: record);
|
|
62
|
+
return { records: next, pending: { id, decision, actorId } };
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Reconcile an authoritative decided event against the optimistic pending map:
|
|
66
|
+
* clear the matching entry, and surface a conflict when the authoritative
|
|
67
|
+
* decidedBy differs from the reviewer who optimistically decided (someone else
|
|
68
|
+
* decided first). A pending entry with an empty actorId (no id was supplied to
|
|
69
|
+
* the hook) clears WITHOUT raising a conflict — there is no identity to compare.
|
|
70
|
+
* Non-mutating.
|
|
71
|
+
*/
|
|
72
|
+
export function reconcileDecided(pending, event) {
|
|
73
|
+
const { id, decidedBy } = event.record;
|
|
74
|
+
const entry = pending[id];
|
|
75
|
+
if (entry === undefined)
|
|
76
|
+
return { pending };
|
|
77
|
+
const rest = {};
|
|
78
|
+
for (const [key, value] of Object.entries(pending)) {
|
|
79
|
+
if (key !== id)
|
|
80
|
+
rest[key] = value;
|
|
81
|
+
}
|
|
82
|
+
const conflict = entry.actorId !== '' &&
|
|
83
|
+
decidedBy !== undefined &&
|
|
84
|
+
decidedBy !== entry.actorId
|
|
85
|
+
? { id, actualDecider: decidedBy }
|
|
86
|
+
: undefined;
|
|
87
|
+
return { pending: rest, conflict };
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Reduce a presence roster frame: distinct reviewers by actorId (a reviewer
|
|
91
|
+
* with two tabs counts once), in a stable order. Non-mutating.
|
|
92
|
+
*/
|
|
93
|
+
export function presenceReducer(roster) {
|
|
94
|
+
const seen = new Set();
|
|
95
|
+
const distinct = [];
|
|
96
|
+
for (const member of roster) {
|
|
97
|
+
if (!seen.has(member.actorId)) {
|
|
98
|
+
seen.add(member.actorId);
|
|
99
|
+
distinct.push({ actorId: member.actorId, role: member.role });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return distinct.sort((a, b) => a.actorId < b.actorId ? -1 : a.actorId > b.actorId ? 1 : 0);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Optimistic metrics counter deltas (DL-013): apply the derivable movement on
|
|
106
|
+
* each event for instant feedback; the interval poll's wholesale metrics()
|
|
107
|
+
* refetch is the authoritative reconciler (DL-021). Counts never go negative.
|
|
108
|
+
* Returns the same reference when nothing derivable changed (no re-render), and
|
|
109
|
+
* null when metrics have not loaded yet.
|
|
110
|
+
*/
|
|
111
|
+
export function applyMetricsDelta(metrics, event) {
|
|
112
|
+
if (metrics === null)
|
|
113
|
+
return null;
|
|
114
|
+
switch (event.type) {
|
|
115
|
+
case 'created':
|
|
116
|
+
return { ...metrics, openCount: metrics.openCount + 1 };
|
|
117
|
+
case 'decided': {
|
|
118
|
+
const approved = event.record.decision === 'approve';
|
|
119
|
+
return {
|
|
120
|
+
...metrics,
|
|
121
|
+
openCount: Math.max(0, metrics.openCount - 1),
|
|
122
|
+
decidedCount: metrics.decidedCount + 1,
|
|
123
|
+
approvedCount: metrics.approvedCount + (approved ? 1 : 0),
|
|
124
|
+
rejectedCount: metrics.rejectedCount + (approved ? 0 : 1),
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
case 'escalated':
|
|
128
|
+
return { ...metrics, escalationCount: metrics.escalationCount + 1 };
|
|
129
|
+
case 'superseded':
|
|
130
|
+
return { ...metrics, openCount: Math.max(0, metrics.openCount - 1) };
|
|
131
|
+
default:
|
|
132
|
+
// claimed / delegated leave the counters untouched.
|
|
133
|
+
return metrics;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../src/approval-ui/stream.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,4EAA4E;AAC5E,wEAAwE;AACxE,+EAA+E;AAC/E,+EAA+E;AAC/E,2EAA2E;AAC3E,8EAA8E;AAC9E,EAAE;AACF,0EAA0E;AAC1E,gFAAgF;AAChF,gFAAgF;AAChF,4EAA4E;AAC5E,6EAA6E;AAC7E,0EAA0E;AAC1E,mEAAmE;AAGnE,OAAO,EAKL,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAyElC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,S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CAAC,CAAC,CAAC;gBACzD,aAAa,EAAE,OAAO,CAAC,aAAa,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC1D,CAAC;QACJ,CAAC;QACD,KAAK,WAAW;YACd,OAAO,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC;QACtE,KAAK,YAAY;YACf,OAAO,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;QACvE;YACE,oDAAoD;YACpD,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ApprovalDecision, ApprovalListFilter, ApprovalMetrics, ApprovalRecord, BatchDecideResult } from '../approval-api/types.js';
|
|
2
2
|
import type { ApprovalApiClient } from './client.js';
|
|
3
|
+
import { type DecisionConflict, type PresenceMember, type StreamConnection, type StreamFrame, type StreamTransport } from './stream.js';
|
|
3
4
|
/**
|
|
4
5
|
* The dashboard's default queue slice: open (non-terminal) requests only,
|
|
5
6
|
* page-bounded at 100 in REVIEWER order. The bound is D3 — an unfiltered
|
|
@@ -71,6 +72,51 @@ export interface ApprovalFilterOverride {
|
|
|
71
72
|
* DOM-free testing; the hook applies it every render.
|
|
72
73
|
*/
|
|
73
74
|
export declare function effectiveApprovalFilter(override: ApprovalFilterOverride | null, optionsFilter: ApprovalListFilter): ApprovalListFilter;
|
|
75
|
+
/**
|
|
76
|
+
* A cancelable timer seam — injected in tests, defaults to the host globals.
|
|
77
|
+
* Kept structural (no ambient-timer types) so it typechecks in both the UI and
|
|
78
|
+
* the transitively-included workers-typed test pass.
|
|
79
|
+
*/
|
|
80
|
+
export interface StreamScheduler {
|
|
81
|
+
setTimeout(handler: () => void, ms: number): ReturnType<typeof setTimeout>;
|
|
82
|
+
clearTimeout(handle: ReturnType<typeof setTimeout>): void;
|
|
83
|
+
}
|
|
84
|
+
/** Reconnect backoff (ms); the last entry repeats for every further attempt. */
|
|
85
|
+
export declare const DEFAULT_STREAM_RECONNECT_MS: readonly number[];
|
|
86
|
+
/** Heartbeat ping cadence (ms) — how often the client proves the socket is live. */
|
|
87
|
+
export declare const DEFAULT_STREAM_HEARTBEAT_MS = 20000;
|
|
88
|
+
/** Pong deadline (ms) after a ping — a missed pong forces a reconnect. */
|
|
89
|
+
export declare const DEFAULT_STREAM_HEARTBEAT_TIMEOUT_MS = 10000;
|
|
90
|
+
/** The injected stream option: a transport plus a ticket() thunk (both from the host). */
|
|
91
|
+
export interface ApprovalStreamOption {
|
|
92
|
+
transport: StreamTransport;
|
|
93
|
+
/** Mints a fresh addressing ticket; the socket URL is `url + ticket`. */
|
|
94
|
+
ticket: () => Promise<{
|
|
95
|
+
url: string;
|
|
96
|
+
ticket: string;
|
|
97
|
+
}>;
|
|
98
|
+
}
|
|
99
|
+
export interface SubscribeApprovalStreamOptions extends ApprovalStreamOption {
|
|
100
|
+
onFrame: (frame: StreamFrame) => void;
|
|
101
|
+
/** Fires on each successful (re)open — the run channel resumes pausing its poll here. */
|
|
102
|
+
onOpen?: () => void;
|
|
103
|
+
/** Fires once per disconnect (before the backoff reconnect) — poll fallback resumes here. */
|
|
104
|
+
onClose?: () => void;
|
|
105
|
+
reconnectDelaysMs?: readonly number[];
|
|
106
|
+
scheduler?: StreamScheduler;
|
|
107
|
+
/** Heartbeat ping cadence (ms). Default DEFAULT_STREAM_HEARTBEAT_MS. */
|
|
108
|
+
heartbeatMs?: number;
|
|
109
|
+
/** Pong deadline (ms) after a ping. Default DEFAULT_STREAM_HEARTBEAT_TIMEOUT_MS. */
|
|
110
|
+
heartbeatTimeoutMs?: number;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Open a stream and keep it open across drops (fetch a ticket, open the injected
|
|
114
|
+
* transport, parse each frame to onFrame, reconnect with backoff on
|
|
115
|
+
* close/error). Pure and node-testable — the React hook wires onFrame to its
|
|
116
|
+
* reducers. DOM-free: the transport and timers are injected. Returns a
|
|
117
|
+
* StreamConnection whose close() stops reconnecting and closes the live socket.
|
|
118
|
+
*/
|
|
119
|
+
export declare function subscribeApprovalStream({ transport, ticket, onFrame, onOpen, onClose, reconnectDelaysMs, scheduler, heartbeatMs, heartbeatTimeoutMs, }: SubscribeApprovalStreamOptions): StreamConnection;
|
|
74
120
|
export interface UseApprovalDashboardOptions {
|
|
75
121
|
/** Queue/metrics refresh cadence; <= 0 disables polling. Default 10s. */
|
|
76
122
|
pollIntervalMs?: number;
|
|
@@ -82,6 +128,20 @@ export interface UseApprovalDashboardOptions {
|
|
|
82
128
|
* dashboard never issues an unfiltered full-table scan.
|
|
83
129
|
*/
|
|
84
130
|
filter?: ApprovalListFilter;
|
|
131
|
+
/**
|
|
132
|
+
* Live streaming (Part B): an injected StreamTransport + a ticket() thunk.
|
|
133
|
+
* ABSENT ⇒ poll-only, exactly today's behavior. When present the hook opens
|
|
134
|
+
* the tenant's approval stream and live-merges events on top of the interval
|
|
135
|
+
* poll, which keeps running as the periodic reconciler (DL-021).
|
|
136
|
+
*/
|
|
137
|
+
stream?: ApprovalStreamOption;
|
|
138
|
+
/**
|
|
139
|
+
* The current reviewer's id — attributes an optimistic decide so a live
|
|
140
|
+
* 'decided' event naming a DIFFERENT decider surfaces a conflict. Absent ⇒
|
|
141
|
+
* optimistic decide still greys the row, but no conflict is ever raised (no
|
|
142
|
+
* id to compare against); the host supplies it (showcase, M-008).
|
|
143
|
+
*/
|
|
144
|
+
actorId?: string;
|
|
85
145
|
}
|
|
86
146
|
export interface ApprovalDashboardState {
|
|
87
147
|
/**
|
|
@@ -123,6 +183,19 @@ export interface ApprovalDashboardState {
|
|
|
123
183
|
claim: () => void;
|
|
124
184
|
delegate: (to: string) => void;
|
|
125
185
|
refresh: () => Promise<void>;
|
|
186
|
+
/**
|
|
187
|
+
* Reviewers currently connected to the tenant's live stream (deduped by
|
|
188
|
+
* actorId). Empty in poll-only mode.
|
|
189
|
+
*/
|
|
190
|
+
presence: PresenceMember[];
|
|
191
|
+
/**
|
|
192
|
+
* Set when a live 'decided' event attributes a record this reviewer
|
|
193
|
+
* optimistically decided to a DIFFERENT decider (they decided first). null
|
|
194
|
+
* otherwise. Never set in poll-only mode or without an actorId.
|
|
195
|
+
*/
|
|
196
|
+
conflict: DecisionConflict | null;
|
|
197
|
+
/** Clears the current conflict surface (Toast dismissal). */
|
|
198
|
+
dismissConflict: () => void;
|
|
126
199
|
}
|
|
127
|
-
export declare function useApprovalDashboard(client: ApprovalApiClient, { pollIntervalMs, now, filter, }?: UseApprovalDashboardOptions): ApprovalDashboardState;
|
|
200
|
+
export declare function useApprovalDashboard(client: ApprovalApiClient, { pollIntervalMs, now, filter, stream, actorId, }?: UseApprovalDashboardOptions): ApprovalDashboardState;
|
|
128
201
|
//# sourceMappingURL=use-approval-dashboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-approval-dashboard.d.ts","sourceRoot":"","sources":["../../src/approval-ui/use-approval-dashboard.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,cAAc,
|
|
1
|
+
{"version":3,"file":"use-approval-dashboard.d.ts","sourceRoot":"","sources":["../../src/approval-ui/use-approval-dashboard.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,cAAc,EAEd,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAGL,KAAK,gBAAgB,EAGrB,KAAK,cAAc,EAInB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAEhB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAGrB;;;;;;;;;;GAUG;AACH,e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