@h-rig/run-plugin 0.0.6-alpha.186

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 (70) hide show
  1. package/README.md +1 -0
  2. package/dist/src/plugin.d.ts +4 -0
  3. package/dist/src/plugin.js +4319 -0
  4. package/dist/src/read-model/inspect-command.d.ts +19 -0
  5. package/dist/src/read-model/inspect-command.js +341 -0
  6. package/dist/src/read-model/plugin.d.ts +4 -0
  7. package/dist/src/read-model/plugin.js +2550 -0
  8. package/dist/src/read-model/read-model-backend/diagnostics.d.ts +9 -0
  9. package/dist/src/read-model/read-model-backend/diagnostics.js +51 -0
  10. package/dist/src/read-model/read-model-backend/guard.d.ts +4 -0
  11. package/dist/src/read-model/read-model-backend/guard.js +25 -0
  12. package/dist/src/read-model/read-model-backend/inbox.d.ts +23 -0
  13. package/dist/src/read-model/read-model-backend/inbox.js +669 -0
  14. package/dist/src/read-model/read-model-backend/index.d.ts +8 -0
  15. package/dist/src/read-model/read-model-backend/index.js +1163 -0
  16. package/dist/src/read-model/read-model-backend/inspect.d.ts +26 -0
  17. package/dist/src/read-model/read-model-backend/inspect.js +770 -0
  18. package/dist/src/read-model/read-model-backend/projection.d.ts +39 -0
  19. package/dist/src/read-model/read-model-backend/projection.js +669 -0
  20. package/dist/src/read-model/read-model-backend/run-status.d.ts +27 -0
  21. package/dist/src/read-model/read-model-backend/run-status.js +237 -0
  22. package/dist/src/read-model/read-model-backend/stats.d.ts +12 -0
  23. package/dist/src/read-model/read-model-backend/stats.js +800 -0
  24. package/dist/src/read-model/read-model-service.d.ts +2 -0
  25. package/dist/src/read-model/read-model-service.js +1725 -0
  26. package/dist/src/read-model/reconcile.d.ts +23 -0
  27. package/dist/src/read-model/reconcile.js +306 -0
  28. package/dist/src/read-model/run-format.d.ts +23 -0
  29. package/dist/src/read-model/run-format.js +202 -0
  30. package/dist/src/read-model/runs-screen.d.ts +14 -0
  31. package/dist/src/read-model/runs-screen.js +217 -0
  32. package/dist/src/read-model/session-journal.d.ts +26 -0
  33. package/dist/src/read-model/session-journal.js +355 -0
  34. package/dist/src/read-model/stats-command.d.ts +16 -0
  35. package/dist/src/read-model/stats-command.js +88 -0
  36. package/dist/src/read-model/stats-format.d.ts +1 -0
  37. package/dist/src/read-model/stats-format.js +8 -0
  38. package/dist/src/worker/autohost.d.ts +11 -0
  39. package/dist/src/worker/autohost.js +858 -0
  40. package/dist/src/worker/constants.d.ts +3 -0
  41. package/dist/src/worker/constants.js +10 -0
  42. package/dist/src/worker/extension.d.ts +14 -0
  43. package/dist/src/worker/extension.js +881 -0
  44. package/dist/src/worker/host.d.ts +1 -0
  45. package/dist/src/worker/host.js +1 -0
  46. package/dist/src/worker/inbox-command.d.ts +23 -0
  47. package/dist/src/worker/inbox-command.js +163 -0
  48. package/dist/src/worker/index.d.ts +2 -0
  49. package/dist/src/worker/index.js +1767 -0
  50. package/dist/src/worker/local-run-changes.d.ts +3 -0
  51. package/dist/src/worker/local-run-changes.js +65 -0
  52. package/dist/src/worker/notifications.d.ts +1 -0
  53. package/dist/src/worker/notifications.js +27 -0
  54. package/dist/src/worker/notify-cap.d.ts +11 -0
  55. package/dist/src/worker/notify-cap.js +13 -0
  56. package/dist/src/worker/panel-plugin.d.ts +11 -0
  57. package/dist/src/worker/panel-plugin.js +37 -0
  58. package/dist/src/worker/plugin.d.ts +3 -0
  59. package/dist/src/worker/plugin.js +1761 -0
  60. package/dist/src/worker/run-control-service.d.ts +2 -0
  61. package/dist/src/worker/run-control-service.js +210 -0
  62. package/dist/src/worker/session-journal-writer.d.ts +4 -0
  63. package/dist/src/worker/session-journal-writer.js +184 -0
  64. package/dist/src/worker/stall.d.ts +21 -0
  65. package/dist/src/worker/stall.js +55 -0
  66. package/dist/src/worker/utils.d.ts +21 -0
  67. package/dist/src/worker/utils.js +29 -0
  68. package/dist/src/worker/workflow-journal-writer.d.ts +7 -0
  69. package/dist/src/worker/workflow-journal-writer.js +76 -0
  70. package/package.json +47 -0
@@ -0,0 +1,39 @@
1
+ import { type RunDiscoveryFilter, type LiveRunCollabProjection, type RunRecord, type RunSessionCustomEntry, type RunStatus } from "@rig/contracts";
2
+ type RegistryStatusToRunStatus = (value: unknown) => RunStatus | null;
3
+ type ListedRegistryEntry = {
4
+ readonly roomId: string;
5
+ readonly title: string;
6
+ readonly status: string;
7
+ readonly startedAt?: string | null;
8
+ readonly heartbeatAt?: string | null;
9
+ readonly sessionPath?: string | null;
10
+ readonly cwd?: string | null;
11
+ readonly joinLink?: string | null;
12
+ readonly webLink?: string | null;
13
+ readonly relayUrl?: string | null;
14
+ readonly stale: boolean;
15
+ readonly repo?: string | null;
16
+ readonly pid?: number;
17
+ readonly projection?: unknown;
18
+ };
19
+ export type { RunRecord, UnifiedInboxRequest } from "@rig/contracts";
20
+ export type RunProjectionRecord = RunRecord;
21
+ /** What an attach/steer caller needs to reach a live run over collab. */
22
+ export interface RunJoinTarget {
23
+ readonly runId: string;
24
+ readonly taskId: string | null;
25
+ readonly joinLink: string;
26
+ readonly cwd: string | null;
27
+ readonly stale: boolean;
28
+ }
29
+ export declare function readSessionRunEntries(sessionPath: string | null): RunSessionCustomEntry[];
30
+ export declare function runRecordFromRegistryEntry(projectRoot: string, entry: ListedRegistryEntry, toRunStatus: RegistryStatusToRunStatus): RunRecord | null;
31
+ export declare function runRecordsFromCollab(projectRoot: string, collabs: readonly LiveRunCollabProjection[], toRunStatus: RegistryStatusToRunStatus): RunRecord[];
32
+ export declare function discoveryDiagnosticRunRecord(projectRoot: string, error: unknown): RunRecord;
33
+ export declare function listRunProjections(projectRoot: string, filter?: RunDiscoveryFilter): Promise<RunRecord[]>;
34
+ export declare function selectRunProjection(runs: readonly RunRecord[], runId: string): RunRecord | null;
35
+ export declare function getRunProjection(projectRoot: string, runId: string, filter?: RunDiscoveryFilter): Promise<RunRecord | null>;
36
+ export declare function resolveRunJoinTarget(projectRoot: string, runId: string, filter?: RunDiscoveryFilter): Promise<RunJoinTarget | null>;
37
+ export declare const listRuns: typeof listRunProjections;
38
+ export declare const getRun: typeof getRunProjection;
39
+ export declare const resolveJoinTarget: typeof resolveRunJoinTarget;