@h-rig/contracts 0.0.6-alpha.9 → 0.0.6-alpha.91

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 (73) hide show
  1. package/dist/index.cjs +5838 -0
  2. package/dist/index.mjs +5797 -0
  3. package/dist/src/artifact.d.ts +13 -0
  4. package/dist/src/artifact.js +3 -0
  5. package/dist/src/baseSchemas.d.ts +63 -0
  6. package/dist/src/baseSchemas.js +6 -0
  7. package/dist/src/cli-output.d.ts +324 -0
  8. package/dist/src/cli-output.js +190 -0
  9. package/dist/src/config.d.ts +316 -0
  10. package/dist/src/config.js +14 -2
  11. package/dist/src/conversation.d.ts +50 -0
  12. package/dist/src/conversation.js +3 -0
  13. package/dist/src/editor.d.ts +25 -0
  14. package/dist/src/editor.js +3 -0
  15. package/dist/src/engine.d.ts +2789 -0
  16. package/dist/src/engine.js +7 -2
  17. package/dist/src/git.d.ts +144 -0
  18. package/dist/src/git.js +3 -0
  19. package/dist/src/graph.d.ts +39 -0
  20. package/dist/src/graph.js +3 -0
  21. package/dist/src/help-catalog.d.ts +30 -0
  22. package/dist/src/help-catalog.js +351 -0
  23. package/dist/src/index.d.ts +37 -0
  24. package/dist/src/index.js +2469 -1219
  25. package/dist/src/ipc.d.ts +248 -0
  26. package/dist/src/keybindings.d.ts +71 -0
  27. package/dist/src/keybindings.js +3 -0
  28. package/dist/src/model.d.ts +77 -0
  29. package/dist/src/orchestration.d.ts +3695 -0
  30. package/dist/src/orchestration.js +3 -0
  31. package/dist/src/pi-session.d.ts +113 -0
  32. package/dist/src/pi-session.js +1 -0
  33. package/dist/src/plugin-hooks.d.ts +51 -0
  34. package/dist/src/plugin-hooks.js +112 -0
  35. package/dist/src/plugin.d.ts +230 -0
  36. package/dist/src/policy.d.ts +16 -0
  37. package/dist/src/policy.js +3 -0
  38. package/dist/src/project.d.ts +71 -0
  39. package/dist/src/project.js +3 -0
  40. package/dist/src/protocol-version.d.ts +21 -0
  41. package/dist/src/protocol-version.js +6 -0
  42. package/dist/src/provider.d.ts +105 -0
  43. package/dist/src/provider.js +3 -0
  44. package/dist/src/providerRuntime.d.ts +3949 -0
  45. package/dist/src/providerRuntime.js +3 -0
  46. package/dist/src/remote.d.ts +326 -0
  47. package/dist/src/remote.js +7 -2
  48. package/dist/src/review.d.ts +18 -0
  49. package/dist/src/review.js +3 -0
  50. package/dist/src/rig.d.ts +783 -0
  51. package/dist/src/rig.js +58 -4
  52. package/dist/src/run-journal.d.ts +763 -0
  53. package/dist/src/run-journal.js +1509 -0
  54. package/dist/src/run-session-journal.d.ts +53 -0
  55. package/dist/src/run-session-journal.js +1582 -0
  56. package/dist/src/run-status.d.ts +12 -0
  57. package/dist/src/run-status.js +38 -0
  58. package/dist/src/runtime.d.ts +103 -0
  59. package/dist/src/runtime.js +7 -2
  60. package/dist/src/server.d.ts +106 -0
  61. package/dist/src/server.js +3 -0
  62. package/dist/src/serviceFabric.d.ts +62 -0
  63. package/dist/src/serviceFabric.js +3 -0
  64. package/dist/src/task-source.d.ts +28 -0
  65. package/dist/src/terminal.d.ts +130 -0
  66. package/dist/src/terminal.js +3 -0
  67. package/dist/src/validation.d.ts +14 -0
  68. package/dist/src/validation.js +3 -0
  69. package/dist/src/workspace.d.ts +204 -0
  70. package/dist/src/workspace.js +3 -0
  71. package/dist/src/ws.d.ts +747 -0
  72. package/dist/src/ws.js +52 -3
  73. package/package.json +6 -3
@@ -0,0 +1,53 @@
1
+ import { type RunJournalEvent, type RunJournalProjection } from "./run-journal";
2
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
3
+ export type RunJournalEventInit = DistributiveOmit<RunJournalEvent, "v" | "seq" | "at" | "runId">;
4
+ export declare const RIG_RUN_STATUS_CHANGED = "rig.run.status-changed";
5
+ export declare const RIG_RUN_RECORD_PATCH = "rig.run.record-patch";
6
+ export declare const RIG_RUN_TIMELINE_ENTRY = "rig.run.timeline-entry";
7
+ export declare const RIG_RUN_LOG_ENTRY = "rig.run.log-entry";
8
+ export declare const RIG_RUN_APPROVAL_REQUESTED = "rig.run.approval-requested";
9
+ export declare const RIG_RUN_APPROVAL_RESOLVED = "rig.run.approval-resolved";
10
+ export declare const RIG_RUN_INPUT_REQUESTED = "rig.run.input-requested";
11
+ export declare const RIG_RUN_INPUT_RESOLVED = "rig.run.input-resolved";
12
+ export declare const RIG_RUN_STEERING = "rig.run.steering";
13
+ export declare const RIG_RUN_ADOPTED = "rig.run.adopted";
14
+ export declare const RIG_RUN_STALL_DETECTED = "rig.run.stall-detected";
15
+ export declare const RIG_RUN_CLOSEOUT_PHASE = "rig.run.closeout-phase";
16
+ export declare const RIG_STOP_SENTINEL = "<<RIG_STOP";
17
+ export declare const RIG_STOP_SENTINEL_END = ">>";
18
+ export declare function buildStopSentinel(runId: string, reason?: string | null, requestedBy?: string): string;
19
+ export declare function parseStopSentinel(text: string, expectedRunId: string): {
20
+ reason: string | null;
21
+ } | null;
22
+ /**
23
+ * The OMP session id embedded in a session journal filename
24
+ * (`<ISO-timestamp>_<sessionId>.jsonl`). This is a run's CANONICAL id — the same
25
+ * id OMP hosts as the collab roomId and the relay registry + operator CLI key on.
26
+ * A run's dispatch/worktree id is different; this is what links them, so stop /
27
+ * steer / discovery all resolve a run by one id (the OMP session id).
28
+ */
29
+ export declare function sessionIdFromSessionFile(sessionPath: string | null | undefined): string | null;
30
+ export declare const CUSTOM_TYPE_FOR: {
31
+ readonly "status-changed": "rig.run.status-changed";
32
+ readonly "record-patch": "rig.run.record-patch";
33
+ readonly "timeline-entry": "rig.run.timeline-entry";
34
+ readonly "log-entry": "rig.run.log-entry";
35
+ readonly "approval-requested": "rig.run.approval-requested";
36
+ readonly "approval-resolved": "rig.run.approval-resolved";
37
+ readonly "input-requested": "rig.run.input-requested";
38
+ readonly "input-resolved": "rig.run.input-resolved";
39
+ readonly steering: "rig.run.steering";
40
+ readonly adopted: "rig.run.adopted";
41
+ readonly "stall-detected": "rig.run.stall-detected";
42
+ readonly "closeout-phase": "rig.run.closeout-phase";
43
+ };
44
+ export type RunSessionCustomType = (typeof CUSTOM_TYPE_FOR)[RunJournalEvent["type"]];
45
+ export declare const TYPE_FOR_CUSTOM: Readonly<Record<RunSessionCustomType, RunJournalEvent["type"]>>;
46
+ export type RunSessionCustomEntry = {
47
+ type: string;
48
+ customType?: string;
49
+ data?: unknown;
50
+ };
51
+ export declare function isRunSessionCustomType(customType: string | undefined): customType is RunSessionCustomType;
52
+ export declare function foldRunSessionEntries(entries: ReadonlyArray<RunSessionCustomEntry>, runId: string): RunJournalProjection;
53
+ export {};