@h-rig/contracts 0.0.6-alpha.18 → 0.0.6-alpha.181

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 (205) hide show
  1. package/dist/index.cjs +3442 -0
  2. package/dist/index.mjs +3401 -0
  3. package/dist/src/agent-roles.d.ts +8 -0
  4. package/dist/src/artifact.d.ts +13 -0
  5. package/dist/src/artifact.js +3 -0
  6. package/dist/src/baseSchemas.d.ts +63 -0
  7. package/dist/src/baseSchemas.js +6 -0
  8. package/dist/src/blocker-classifier.d.ts +21 -0
  9. package/dist/src/blocker-classifier.js +13 -0
  10. package/dist/src/browser.d.ts +80 -0
  11. package/dist/src/browser.js +13 -0
  12. package/dist/src/capability-id.d.ts +22 -0
  13. package/dist/src/capability-id.js +8 -0
  14. package/dist/src/cli-output.d.ts +348 -0
  15. package/dist/src/cli-output.js +190 -0
  16. package/dist/src/cli-runner.d.ts +43 -0
  17. package/dist/src/cli-runner.js +13 -0
  18. package/dist/src/cockpit.d.ts +58 -0
  19. package/dist/src/cockpit.js +13 -0
  20. package/dist/src/collab-session-viewer.d.ts +36 -0
  21. package/dist/src/collab-session-viewer.js +13 -0
  22. package/dist/src/config.d.ts +553 -0
  23. package/dist/src/config.js +767 -162
  24. package/dist/src/control-plane-types.d.ts +323 -0
  25. package/dist/src/control-plane-types.js +13 -0
  26. package/dist/src/conversation.d.ts +50 -0
  27. package/dist/src/conversation.js +3 -0
  28. package/dist/src/dependency-preflight.d.ts +43 -0
  29. package/dist/src/dependency-preflight.js +13 -0
  30. package/dist/src/docs-drift.d.ts +10 -0
  31. package/dist/src/docs-drift.js +12 -0
  32. package/dist/src/doctor.d.ts +90 -0
  33. package/dist/src/doctor.js +13 -0
  34. package/dist/src/drift.d.ts +28 -0
  35. package/dist/src/drift.js +69 -0
  36. package/dist/src/editor.d.ts +25 -0
  37. package/dist/src/editor.js +3 -0
  38. package/dist/src/errors.d.ts +13 -0
  39. package/dist/src/errors.js +17 -0
  40. package/dist/src/git.d.ts +152 -0
  41. package/dist/src/git.js +3 -0
  42. package/dist/src/github.d.ts +295 -0
  43. package/dist/src/github.js +17 -0
  44. package/dist/src/graph.d.ts +360 -0
  45. package/dist/src/graph.js +137 -1
  46. package/dist/src/guard.d.ts +118 -0
  47. package/dist/src/guard.js +15 -0
  48. package/dist/src/harness-events.d.ts +8 -0
  49. package/dist/src/harness-events.js +1 -0
  50. package/dist/src/harness-profile-state.d.ts +10 -0
  51. package/dist/src/harness-profile-state.js +13 -0
  52. package/dist/src/help-catalog.d.ts +41 -0
  53. package/dist/src/help-catalog.js +13 -0
  54. package/dist/src/host.d.ts +41 -0
  55. package/dist/src/host.js +13 -0
  56. package/dist/src/identity.d.ts +44 -0
  57. package/dist/src/identity.js +1 -0
  58. package/dist/src/index.d.ts +98 -0
  59. package/dist/src/index.js +2605 -3752
  60. package/dist/src/isolation.d.ts +213 -0
  61. package/dist/src/isolation.js +13 -0
  62. package/dist/src/kernel.d.ts +200 -0
  63. package/dist/src/kernel.js +261 -0
  64. package/dist/src/keybindings.d.ts +71 -0
  65. package/dist/src/keybindings.js +3 -0
  66. package/dist/src/layout.d.ts +44 -0
  67. package/dist/src/layout.js +8 -0
  68. package/dist/src/lifecycle-capabilities.d.ts +224 -0
  69. package/dist/src/lifecycle-capabilities.js +45 -0
  70. package/dist/src/managed-repos.d.ts +339 -0
  71. package/dist/src/managed-repos.js +37 -0
  72. package/dist/src/memory.d.ts +199 -0
  73. package/dist/src/memory.js +15 -0
  74. package/dist/src/model.d.ts +13 -0
  75. package/dist/src/model.js +3 -58
  76. package/dist/src/native-toolchain.d.ts +46 -0
  77. package/dist/src/native-toolchain.js +13 -0
  78. package/dist/src/notify.d.ts +46 -0
  79. package/dist/src/notify.js +13 -0
  80. package/dist/src/orchestration.d.ts +43 -0
  81. package/dist/src/orchestration.js +28 -961
  82. package/dist/src/panel-protocol.d.ts +17 -0
  83. package/dist/src/panel-protocol.js +10 -0
  84. package/dist/src/pi-session.d.ts +113 -0
  85. package/dist/src/pi-session.js +1 -0
  86. package/dist/src/placement.d.ts +47 -0
  87. package/dist/src/placement.js +13 -0
  88. package/dist/src/planning.d.ts +64 -0
  89. package/dist/src/planning.js +90 -0
  90. package/dist/src/plugin-hooks.d.ts +51 -0
  91. package/dist/src/plugin-hooks.js +386 -0
  92. package/dist/src/plugin.d.ts +476 -0
  93. package/dist/src/plugin.js +346 -64
  94. package/dist/src/policy.d.ts +16 -0
  95. package/dist/src/policy.js +3 -0
  96. package/dist/src/product-entrypoint.d.ts +22 -0
  97. package/dist/src/product-entrypoint.js +13 -0
  98. package/dist/src/project.d.ts +71 -0
  99. package/dist/src/project.js +3 -0
  100. package/dist/src/prompt.d.ts +29 -0
  101. package/dist/src/prompt.js +13 -0
  102. package/dist/src/protocol-version.d.ts +21 -0
  103. package/dist/src/protocol-version.js +6 -0
  104. package/dist/src/provider-instructions.d.ts +41 -0
  105. package/dist/src/provider-instructions.js +13 -0
  106. package/dist/src/provider.d.ts +105 -0
  107. package/dist/src/provider.js +16 -835
  108. package/dist/src/remote-control.d.ts +93 -0
  109. package/dist/src/remote-control.js +26 -0
  110. package/dist/src/remote.d.ts +318 -0
  111. package/dist/src/remote.js +238 -1078
  112. package/dist/src/review.d.ts +18 -0
  113. package/dist/src/review.js +3 -0
  114. package/dist/src/rollups.d.ts +41 -0
  115. package/dist/src/rollups.js +70 -0
  116. package/dist/src/run-control.d.ts +164 -0
  117. package/dist/src/run-control.js +13 -0
  118. package/dist/src/run-discovery.d.ts +83 -0
  119. package/dist/src/run-discovery.js +13 -0
  120. package/dist/src/run-dispatch.d.ts +34 -0
  121. package/dist/src/run-dispatch.js +13 -0
  122. package/dist/src/run-identity.d.ts +47 -0
  123. package/dist/src/run-identity.js +13 -0
  124. package/dist/src/run-journal.d.ts +694 -0
  125. package/dist/src/run-journal.js +569 -0
  126. package/dist/src/run-queue.d.ts +36 -0
  127. package/dist/src/run-queue.js +13 -0
  128. package/dist/src/run-read-model.d.ts +200 -0
  129. package/dist/src/run-read-model.js +13 -0
  130. package/dist/src/run-record.d.ts +45 -0
  131. package/dist/src/run-record.js +1 -0
  132. package/dist/src/run-registry-backbone.d.ts +56 -0
  133. package/dist/src/run-registry-backbone.js +13 -0
  134. package/dist/src/run-session-journal.d.ts +154 -0
  135. package/dist/src/run-session-journal.js +87 -0
  136. package/dist/src/run-status.d.ts +10 -0
  137. package/dist/src/run-status.js +27 -0
  138. package/dist/src/run-timeline.d.ts +7 -0
  139. package/dist/src/run-timeline.js +1 -0
  140. package/dist/src/runtime-secrets.d.ts +10 -0
  141. package/dist/src/runtime-secrets.js +13 -0
  142. package/dist/src/runtime-task-context.d.ts +82 -0
  143. package/dist/src/runtime-task-context.js +1 -0
  144. package/dist/src/runtime.d.ts +103 -0
  145. package/dist/src/runtime.js +73 -906
  146. package/dist/src/session-asset-materializer.d.ts +35 -0
  147. package/dist/src/session-asset-materializer.js +13 -0
  148. package/dist/src/session-hook-materializer.d.ts +41 -0
  149. package/dist/src/session-hook-materializer.js +13 -0
  150. package/dist/src/setup.d.ts +154 -0
  151. package/dist/src/setup.js +13 -0
  152. package/dist/src/stage.d.ts +245 -0
  153. package/dist/src/stage.js +169 -0
  154. package/dist/src/supervisor-journal.d.ts +204 -0
  155. package/dist/src/supervisor-journal.js +336 -0
  156. package/dist/src/supervisor-loop.d.ts +40 -0
  157. package/dist/src/supervisor-loop.js +13 -0
  158. package/dist/src/task-artifacts.d.ts +53 -0
  159. package/dist/src/task-artifacts.js +13 -0
  160. package/dist/src/task-config.d.ts +22 -0
  161. package/dist/src/task-config.js +1 -0
  162. package/dist/src/task-context-renderer.d.ts +29 -0
  163. package/dist/src/task-context-renderer.js +13 -0
  164. package/dist/src/task-data.d.ts +196 -0
  165. package/dist/src/task-data.js +13 -0
  166. package/dist/src/task-graph-primitives.d.ts +47 -0
  167. package/dist/src/task-graph-primitives.js +1 -0
  168. package/dist/src/task-source.d.ts +167 -0
  169. package/dist/src/task-source.js +24 -0
  170. package/dist/src/task-state-metadata.d.ts +21 -0
  171. package/dist/src/task-state-metadata.js +1 -0
  172. package/dist/src/task-state-paths.d.ts +14 -0
  173. package/dist/src/task-state-paths.js +13 -0
  174. package/dist/src/task-state-store.d.ts +36 -0
  175. package/dist/src/task-state-store.js +17 -0
  176. package/dist/src/task-tracker-state.d.ts +101 -0
  177. package/dist/src/task-tracker-state.js +39 -0
  178. package/dist/src/terminal.d.ts +130 -0
  179. package/dist/src/terminal.js +3 -0
  180. package/dist/src/tool-materializer.d.ts +36 -0
  181. package/dist/src/tool-materializer.js +13 -0
  182. package/dist/src/tool-registry.d.ts +3 -0
  183. package/dist/src/tool-registry.js +58 -0
  184. package/dist/src/toolchain-sources.d.ts +54 -0
  185. package/dist/src/toolchain-sources.js +17 -0
  186. package/dist/src/transport-config.d.ts +161 -0
  187. package/dist/src/transport-config.js +15 -0
  188. package/dist/src/validation.d.ts +14 -0
  189. package/dist/src/validation.js +3 -0
  190. package/dist/src/workflow-journal.d.ts +125 -0
  191. package/dist/src/workflow-journal.js +27 -0
  192. package/dist/src/workspace-config.d.ts +18 -0
  193. package/dist/src/workspace-config.js +13 -0
  194. package/dist/src/workspace-service.d.ts +16 -0
  195. package/dist/src/workspace-service.js +13 -0
  196. package/dist/src/workspace.d.ts +204 -0
  197. package/dist/src/workspace.js +76 -911
  198. package/package.json +55 -4
  199. package/dist/src/engine.js +0 -2278
  200. package/dist/src/providerRuntime.js +0 -1630
  201. package/dist/src/rig.js +0 -2374
  202. package/dist/src/server.js +0 -1053
  203. package/dist/src/serviceFabric.js +0 -1066
  204. package/dist/src/ws.js +0 -2968
  205. /package/dist/src/{ipc.js → agent-roles.js} +0 -0
@@ -0,0 +1,93 @@
1
+ import type { CapabilityId } from "./capability-id";
2
+ export type RemoteControlEnv = Readonly<Record<string, string | undefined>>;
3
+ export type RemoteControlJsonRecord = Record<string, unknown>;
4
+ export type RemoteControlMessage = {
5
+ readonly type: string;
6
+ readonly id?: string;
7
+ readonly timestamp?: string;
8
+ } & RemoteControlJsonRecord;
9
+ export type RemoteControlEndpointSelection = {
10
+ readonly projectRoot: string;
11
+ readonly host?: string | undefined;
12
+ readonly port?: string | undefined;
13
+ readonly token?: string | undefined;
14
+ readonly remoteAlias?: string | undefined;
15
+ readonly env?: RemoteControlEnv | undefined;
16
+ };
17
+ export type RemoteControlRemote = {
18
+ readonly source: "flags" | "alias" | "env";
19
+ readonly alias?: string | undefined;
20
+ readonly host: string;
21
+ readonly port: number;
22
+ };
23
+ export type RemoteControlEndpoint = RemoteControlRemote & {
24
+ readonly token: string;
25
+ };
26
+ export type RemoteControlEvent = {
27
+ readonly receivedAt: string;
28
+ readonly message: RemoteControlMessage;
29
+ };
30
+ export type RemoteControlWatchEvent = RemoteControlEvent & {
31
+ readonly summary: string;
32
+ };
33
+ export type RemoteControlOperationResult = {
34
+ readonly remote: RemoteControlRemote;
35
+ readonly response: RemoteControlMessage;
36
+ };
37
+ export type RemoteControlEndpointTestResult = RemoteControlOperationResult & {
38
+ readonly latencyMs: number;
39
+ };
40
+ export type RemoteControlWatchOptions = RemoteControlEndpointSelection & {
41
+ readonly eventType?: string | undefined;
42
+ readonly seconds?: number | undefined;
43
+ readonly maxCaptured?: number | undefined;
44
+ readonly shouldStop?: (() => boolean) | undefined;
45
+ readonly onEvent?: ((event: RemoteControlWatchEvent) => void) | undefined;
46
+ };
47
+ export type RemoteControlWatchResult = {
48
+ readonly remote: RemoteControlRemote;
49
+ readonly received: number;
50
+ readonly dropped: number;
51
+ readonly captured: readonly RemoteControlMessage[];
52
+ readonly event: string | null;
53
+ readonly seconds: number | null;
54
+ };
55
+ export type RemoteControlStartOrchestrationOptions = {
56
+ readonly maxWorkers?: number | undefined;
57
+ readonly maxIterations?: number | undefined;
58
+ readonly directMerge?: boolean | undefined;
59
+ };
60
+ export interface RemoteControlClient {
61
+ readonly remote: RemoteControlRemote;
62
+ readonly ping: () => Promise<RemoteControlMessage>;
63
+ readonly getState: () => Promise<RemoteControlMessage>;
64
+ readonly getTasks: () => Promise<RemoteControlMessage>;
65
+ readonly pause: () => Promise<RemoteControlMessage>;
66
+ readonly resume: () => Promise<RemoteControlMessage>;
67
+ readonly stop: () => Promise<RemoteControlMessage>;
68
+ readonly continueExecution: () => Promise<RemoteControlMessage>;
69
+ readonly refreshTasks: () => Promise<RemoteControlMessage>;
70
+ readonly addIterations: (count: number) => Promise<RemoteControlMessage>;
71
+ readonly removeIterations: (count: number) => Promise<RemoteControlMessage>;
72
+ readonly getPromptPreview: (taskId: string) => Promise<RemoteControlMessage>;
73
+ readonly getIterationOutput: (taskId: string) => Promise<RemoteControlMessage>;
74
+ readonly startOrchestration: (options: RemoteControlStartOrchestrationOptions) => Promise<RemoteControlMessage>;
75
+ readonly pauseOrchestration: (orchestrationId: string) => Promise<RemoteControlMessage>;
76
+ readonly resumeOrchestration: (orchestrationId: string) => Promise<RemoteControlMessage>;
77
+ readonly stopOrchestration: (orchestrationId: string) => Promise<RemoteControlMessage>;
78
+ readonly getOrchestrationState: (orchestrationId: string) => Promise<RemoteControlMessage>;
79
+ }
80
+ export interface RemoteControlService {
81
+ readonly resolveEndpoint: (input: RemoteControlEndpointSelection) => RemoteControlRemote;
82
+ readonly withClient: <T>(input: RemoteControlEndpointSelection, runner: (client: RemoteControlClient) => Promise<T>) => Promise<T>;
83
+ readonly testEndpoint: (input: RemoteControlEndpointSelection) => Promise<RemoteControlEndpointTestResult>;
84
+ readonly watch: (input: RemoteControlWatchOptions) => Promise<RemoteControlWatchResult>;
85
+ }
86
+ export declare class RemoteControlError extends Error {
87
+ readonly code: string;
88
+ readonly exitCode: number;
89
+ readonly details: RemoteControlJsonRecord | undefined;
90
+ constructor(code: string, message: string, exitCode?: number, details?: RemoteControlJsonRecord);
91
+ }
92
+ export declare const REMOTE_CONTROL_CAPABILITY_ID = "rig.remote.control";
93
+ export declare const REMOTE_CONTROL: CapabilityId<RemoteControlService>;
@@ -0,0 +1,26 @@
1
+ // @bun
2
+ // packages/contracts/src/capability-id.ts
3
+ function makeCapabilityId(id) {
4
+ return id;
5
+ }
6
+
7
+ // packages/contracts/src/remote-control.ts
8
+ class RemoteControlError extends Error {
9
+ code;
10
+ exitCode;
11
+ details;
12
+ constructor(code, message, exitCode = 1, details) {
13
+ super(message);
14
+ this.name = "RemoteControlError";
15
+ this.code = code;
16
+ this.exitCode = exitCode;
17
+ this.details = details;
18
+ }
19
+ }
20
+ var REMOTE_CONTROL_CAPABILITY_ID = "rig.remote.control";
21
+ var REMOTE_CONTROL = makeCapabilityId(REMOTE_CONTROL_CAPABILITY_ID);
22
+ export {
23
+ RemoteControlError,
24
+ REMOTE_CONTROL_CAPABILITY_ID,
25
+ REMOTE_CONTROL
26
+ };
@@ -0,0 +1,318 @@
1
+ import { Schema } from "effect";
2
+ export declare const RemoteEndpoint: Schema.Struct<{
3
+ readonly id: Schema.brand<Schema.Trim, "RemoteEndpointId">;
4
+ readonly alias: Schema.Trim;
5
+ readonly host: Schema.Trim;
6
+ readonly port: Schema.Int;
7
+ readonly token: Schema.String;
8
+ readonly tokenConfigured: Schema.optional<Schema.Boolean>;
9
+ readonly autoConnect: Schema.optional<Schema.Boolean>;
10
+ readonly addedAt: Schema.String;
11
+ readonly lastConnectedAt: Schema.NullOr<Schema.String>;
12
+ }>;
13
+ export type RemoteEndpoint = typeof RemoteEndpoint.Type;
14
+ export declare const RemoteConnectionStatus: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
15
+ export type RemoteConnectionStatus = typeof RemoteConnectionStatus.Type;
16
+ export declare const RemoteConnectionSummary: Schema.Struct<{
17
+ readonly endpointId: Schema.brand<Schema.Trim, "RemoteEndpointId">;
18
+ readonly status: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
19
+ readonly error: Schema.NullOr<Schema.String>;
20
+ readonly connectedAt: Schema.NullOr<Schema.String>;
21
+ readonly tokenExpiresAt: Schema.NullOr<Schema.String>;
22
+ readonly latencyMs: Schema.NullOr<Schema.Number>;
23
+ readonly subscribedEvents: Schema.$Array<Schema.String>;
24
+ }>;
25
+ export type RemoteConnectionSummary = typeof RemoteConnectionSummary.Type;
26
+ export declare const RemoteConnectionStatusChanged: Schema.Struct<{
27
+ readonly endpointId: Schema.String;
28
+ readonly endpointAlias: Schema.String;
29
+ readonly status: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
30
+ readonly previousStatus: Schema.Literals<readonly ["disconnected", "connecting", "authenticating", "connected", "reconnecting", "error"]>;
31
+ readonly error: Schema.NullOr<Schema.String>;
32
+ readonly connectedAt: Schema.NullOr<Schema.String>;
33
+ readonly latencyMs: Schema.NullOr<Schema.Number>;
34
+ readonly timestamp: Schema.String;
35
+ }>;
36
+ export type RemoteConnectionStatusChanged = typeof RemoteConnectionStatusChanged.Type;
37
+ export declare const RemoteOrchestratorState: Schema.Struct<{
38
+ readonly activeTaskId: Schema.NullOr<Schema.String>;
39
+ readonly activeIteration: Schema.NullOr<Schema.Number>;
40
+ readonly maxIterations: Schema.Number;
41
+ readonly isPaused: Schema.Boolean;
42
+ readonly isRunning: Schema.Boolean;
43
+ readonly totalCompleted: Schema.Int;
44
+ readonly totalFailed: Schema.Int;
45
+ readonly lastActivity: Schema.NullOr<Schema.String>;
46
+ }>;
47
+ export type RemoteOrchestratorState = typeof RemoteOrchestratorState.Type;
48
+ export declare const RemoteOrchestrationSummary: Schema.Struct<{
49
+ readonly orchestrationId: Schema.Trim;
50
+ readonly endpointId: Schema.brand<Schema.Trim, "RemoteEndpointId">;
51
+ readonly status: Schema.Literals<readonly ["running", "paused", "stopped", "completed"]>;
52
+ readonly totalTasks: Schema.Int;
53
+ readonly totalGroups: Schema.Int;
54
+ readonly maxParallelism: Schema.Int;
55
+ readonly startedAt: Schema.String;
56
+ }>;
57
+ export type RemoteOrchestrationSummary = typeof RemoteOrchestrationSummary.Type;
58
+ export declare const RemoteIterationOutput: Schema.Struct<{
59
+ readonly taskId: Schema.optional<Schema.String>;
60
+ readonly iteration: Schema.optional<Schema.Number>;
61
+ readonly output: Schema.optional<Schema.String>;
62
+ readonly startedAt: Schema.optional<Schema.String>;
63
+ readonly endedAt: Schema.optional<Schema.String>;
64
+ readonly durationMs: Schema.optional<Schema.Number>;
65
+ readonly isRunning: Schema.optional<Schema.Boolean>;
66
+ }>;
67
+ export type RemoteIterationOutput = typeof RemoteIterationOutput.Type;
68
+ export declare const RemoteRunnerRegisterInput: Schema.Struct<{
69
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
70
+ readonly hostId: Schema.Trim;
71
+ readonly name: Schema.Trim;
72
+ readonly baseUrl: Schema.Trim;
73
+ readonly workspacePath: Schema.optional<Schema.Trim>;
74
+ readonly transport: Schema.optional<Schema.Trim>;
75
+ readonly hostname: Schema.optional<Schema.Trim>;
76
+ readonly region: Schema.optional<Schema.Trim>;
77
+ readonly labels: Schema.optional<Schema.$Array<Schema.Trim>>;
78
+ readonly capabilities: Schema.optional<Schema.$Array<Schema.Trim>>;
79
+ readonly runtimeAdapters: Schema.optional<Schema.$Array<Schema.Literal<"pi">>>;
80
+ readonly status: Schema.optional<Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>>;
81
+ readonly currentLeaseCount: Schema.optional<Schema.Number>;
82
+ }>;
83
+ export type RemoteRunnerRegisterInput = typeof RemoteRunnerRegisterInput.Type;
84
+ export declare const RemoteRunnerHeartbeatInput: Schema.Struct<{
85
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
86
+ readonly hostId: Schema.Trim;
87
+ readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
88
+ readonly currentLeaseCount: Schema.optional<Schema.Number>;
89
+ readonly observedAt: Schema.optional<Schema.String>;
90
+ }>;
91
+ export type RemoteRunnerHeartbeatInput = typeof RemoteRunnerHeartbeatInput.Type;
92
+ export declare const RemoteRunnerLifecycleResult: Schema.Struct<{
93
+ readonly ok: Schema.Boolean;
94
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
95
+ readonly hostId: Schema.Trim;
96
+ readonly acceptedAt: Schema.String;
97
+ readonly heartbeatIntervalMs: Schema.Number;
98
+ }>;
99
+ export type RemoteRunnerLifecycleResult = typeof RemoteRunnerLifecycleResult.Type;
100
+ export declare const RemoteRunClaimInput: Schema.Struct<{
101
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
102
+ readonly hostId: Schema.Trim;
103
+ readonly runtimeAdapters: Schema.optional<Schema.$Array<Schema.Literal<"pi">>>;
104
+ }>;
105
+ export type RemoteRunClaimInput = typeof RemoteRunClaimInput.Type;
106
+ export declare const RemoteRunLeaseSummary: Schema.Struct<{
107
+ readonly leaseId: Schema.Trim;
108
+ readonly runId: Schema.Trim;
109
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
110
+ readonly title: Schema.Trim;
111
+ readonly runtimeAdapter: Schema.Literal<"pi">;
112
+ readonly model: Schema.NullOr<Schema.Trim>;
113
+ readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
114
+ readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
115
+ readonly executionTarget: Schema.Literals<readonly ["local", "remote"]>;
116
+ readonly remoteHostId: Schema.NullOr<Schema.Trim>;
117
+ readonly claimedAt: Schema.String;
118
+ }>;
119
+ export type RemoteRunLeaseSummary = typeof RemoteRunLeaseSummary.Type;
120
+ export declare const RemoteRunConversationEntry: Schema.Struct<{
121
+ readonly role: Schema.Literals<readonly ["user", "assistant", "system"]>;
122
+ readonly text: Schema.String;
123
+ readonly createdAt: Schema.String;
124
+ }>;
125
+ export type RemoteRunConversationEntry = typeof RemoteRunConversationEntry.Type;
126
+ export declare const RemoteRunExecutionBundle: Schema.Struct<{
127
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
128
+ readonly runId: Schema.Trim;
129
+ readonly leaseId: Schema.Trim;
130
+ readonly workspacePath: Schema.NullOr<Schema.Trim>;
131
+ readonly runtimeAdapter: Schema.Literal<"pi">;
132
+ readonly model: Schema.NullOr<Schema.Trim>;
133
+ readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
134
+ readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
135
+ readonly prompt: Schema.String;
136
+ readonly conversation: Schema.$Array<Schema.Struct<{
137
+ readonly role: Schema.Literals<readonly ["user", "assistant", "system"]>;
138
+ readonly text: Schema.String;
139
+ readonly createdAt: Schema.String;
140
+ }>>;
141
+ readonly taskId: Schema.NullOr<Schema.Trim>;
142
+ readonly taskTitle: Schema.NullOr<Schema.Trim>;
143
+ }>;
144
+ export type RemoteRunExecutionBundle = typeof RemoteRunExecutionBundle.Type;
145
+ export declare const RemoteRunClaimResult: Schema.Struct<{
146
+ readonly ok: Schema.Boolean;
147
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
148
+ readonly hostId: Schema.Trim;
149
+ readonly acceptedAt: Schema.String;
150
+ readonly lease: Schema.NullOr<Schema.Struct<{
151
+ readonly leaseId: Schema.Trim;
152
+ readonly runId: Schema.Trim;
153
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
154
+ readonly title: Schema.Trim;
155
+ readonly runtimeAdapter: Schema.Literal<"pi">;
156
+ readonly model: Schema.NullOr<Schema.Trim>;
157
+ readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
158
+ readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
159
+ readonly executionTarget: Schema.Literals<readonly ["local", "remote"]>;
160
+ readonly remoteHostId: Schema.NullOr<Schema.Trim>;
161
+ readonly claimedAt: Schema.String;
162
+ }>>;
163
+ readonly bundle: Schema.NullOr<Schema.Struct<{
164
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
165
+ readonly runId: Schema.Trim;
166
+ readonly leaseId: Schema.Trim;
167
+ readonly workspacePath: Schema.NullOr<Schema.Trim>;
168
+ readonly runtimeAdapter: Schema.Literal<"pi">;
169
+ readonly model: Schema.NullOr<Schema.Trim>;
170
+ readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
171
+ readonly interactionMode: Schema.Literals<readonly ["default", "plan"]>;
172
+ readonly prompt: Schema.String;
173
+ readonly conversation: Schema.$Array<Schema.Struct<{
174
+ readonly role: Schema.Literals<readonly ["user", "assistant", "system"]>;
175
+ readonly text: Schema.String;
176
+ readonly createdAt: Schema.String;
177
+ }>>;
178
+ readonly taskId: Schema.NullOr<Schema.Trim>;
179
+ readonly taskTitle: Schema.NullOr<Schema.Trim>;
180
+ }>>;
181
+ }>;
182
+ export type RemoteRunClaimResult = typeof RemoteRunClaimResult.Type;
183
+ export declare const RemoteRunReleaseInput: Schema.Struct<{
184
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
185
+ readonly hostId: Schema.Trim;
186
+ readonly runId: Schema.Trim;
187
+ readonly leaseId: Schema.Trim;
188
+ readonly status: Schema.optional<Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>>;
189
+ }>;
190
+ export type RemoteRunReleaseInput = typeof RemoteRunReleaseInput.Type;
191
+ export declare const RemoteRunReleaseResult: Schema.Struct<{
192
+ readonly ok: Schema.Boolean;
193
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
194
+ readonly hostId: Schema.Trim;
195
+ readonly runId: Schema.Trim;
196
+ readonly leaseId: Schema.Trim;
197
+ readonly acceptedAt: Schema.String;
198
+ }>;
199
+ export type RemoteRunReleaseResult = typeof RemoteRunReleaseResult.Type;
200
+ export declare const RemoteRunStartInput: Schema.Struct<{
201
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
202
+ readonly hostId: Schema.Trim;
203
+ readonly runId: Schema.Trim;
204
+ readonly leaseId: Schema.Trim;
205
+ }>;
206
+ export type RemoteRunStartInput = typeof RemoteRunStartInput.Type;
207
+ export declare const RemoteRunStartResult: Schema.Struct<{
208
+ readonly ok: Schema.Boolean;
209
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
210
+ readonly hostId: Schema.Trim;
211
+ readonly runId: Schema.Trim;
212
+ readonly leaseId: Schema.Trim;
213
+ readonly runtimeId: Schema.Trim;
214
+ readonly acceptedAt: Schema.String;
215
+ }>;
216
+ export type RemoteRunStartResult = typeof RemoteRunStartResult.Type;
217
+ export declare const RemoteRunLogInput: Schema.Struct<{
218
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
219
+ readonly hostId: Schema.Trim;
220
+ readonly runId: Schema.Trim;
221
+ readonly leaseId: Schema.Trim;
222
+ readonly title: Schema.Trim;
223
+ readonly detail: Schema.optional<Schema.String>;
224
+ readonly tone: Schema.optional<Schema.Literals<readonly ["thinking", "tool", "info", "error"]>>;
225
+ readonly status: Schema.optional<Schema.Trim>;
226
+ readonly payload: Schema.optional<Schema.Unknown>;
227
+ }>;
228
+ export type RemoteRunLogInput = typeof RemoteRunLogInput.Type;
229
+ export declare const RemoteRunMessageInput: Schema.Struct<{
230
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
231
+ readonly hostId: Schema.Trim;
232
+ readonly runId: Schema.Trim;
233
+ readonly leaseId: Schema.Trim;
234
+ readonly messageId: Schema.optional<Schema.Trim>;
235
+ readonly text: Schema.String;
236
+ readonly state: Schema.optional<Schema.Literals<readonly ["streaming", "completed"]>>;
237
+ }>;
238
+ export type RemoteRunMessageInput = typeof RemoteRunMessageInput.Type;
239
+ export declare const RemoteRunMutationResult: Schema.Struct<{
240
+ readonly ok: Schema.Boolean;
241
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
242
+ readonly hostId: Schema.Trim;
243
+ readonly runId: Schema.Trim;
244
+ readonly leaseId: Schema.Trim;
245
+ readonly acceptedAt: Schema.String;
246
+ }>;
247
+ export type RemoteRunMutationResult = typeof RemoteRunMutationResult.Type;
248
+ export declare const RemoteRunCompleteInput: Schema.Struct<{
249
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
250
+ readonly hostId: Schema.Trim;
251
+ readonly runId: Schema.Trim;
252
+ readonly leaseId: Schema.Trim;
253
+ }>;
254
+ export type RemoteRunCompleteInput = typeof RemoteRunCompleteInput.Type;
255
+ export declare const RemoteRunFailInput: Schema.Struct<{
256
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
257
+ readonly hostId: Schema.Trim;
258
+ readonly runId: Schema.Trim;
259
+ readonly leaseId: Schema.Trim;
260
+ readonly errorText: Schema.optional<Schema.String>;
261
+ }>;
262
+ export type RemoteRunFailInput = typeof RemoteRunFailInput.Type;
263
+ export declare const RemoteRunArtifactInput: Schema.Struct<{
264
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
265
+ readonly hostId: Schema.Trim;
266
+ readonly runId: Schema.Trim;
267
+ readonly leaseId: Schema.Trim;
268
+ readonly kind: Schema.Trim;
269
+ readonly label: Schema.Trim;
270
+ readonly filename: Schema.Trim;
271
+ readonly contentType: Schema.Trim;
272
+ readonly contentBase64: Schema.Trim;
273
+ }>;
274
+ export type RemoteRunArtifactInput = typeof RemoteRunArtifactInput.Type;
275
+ export declare const RemoteRunArtifactResult: Schema.Struct<{
276
+ readonly ok: Schema.Boolean;
277
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
278
+ readonly hostId: Schema.Trim;
279
+ readonly runId: Schema.Trim;
280
+ readonly leaseId: Schema.Trim;
281
+ readonly acceptedAt: Schema.String;
282
+ readonly artifactPath: Schema.Trim;
283
+ }>;
284
+ export type RemoteRunArtifactResult = typeof RemoteRunArtifactResult.Type;
285
+ export declare const RemoteRunArtifactSummary: Schema.Struct<{
286
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
287
+ readonly runId: Schema.Trim;
288
+ readonly hostId: Schema.Trim;
289
+ readonly leaseId: Schema.Trim;
290
+ readonly kind: Schema.Trim;
291
+ readonly label: Schema.Trim;
292
+ readonly filename: Schema.Trim;
293
+ readonly contentType: Schema.Trim;
294
+ readonly uploadedAt: Schema.String;
295
+ readonly byteSize: Schema.Number;
296
+ readonly artifactPath: Schema.Trim;
297
+ readonly downloadPath: Schema.Trim;
298
+ }>;
299
+ export type RemoteRunArtifactSummary = typeof RemoteRunArtifactSummary.Type;
300
+ export declare const RemoteRunArtifactsResult: Schema.Struct<{
301
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
302
+ readonly runId: Schema.Trim;
303
+ readonly artifacts: Schema.$Array<Schema.Struct<{
304
+ readonly workspaceId: Schema.brand<Schema.Trim, "WorkspaceId">;
305
+ readonly runId: Schema.Trim;
306
+ readonly hostId: Schema.Trim;
307
+ readonly leaseId: Schema.Trim;
308
+ readonly kind: Schema.Trim;
309
+ readonly label: Schema.Trim;
310
+ readonly filename: Schema.Trim;
311
+ readonly contentType: Schema.Trim;
312
+ readonly uploadedAt: Schema.String;
313
+ readonly byteSize: Schema.Number;
314
+ readonly artifactPath: Schema.Trim;
315
+ readonly downloadPath: Schema.Trim;
316
+ }>>;
317
+ }>;
318
+ export type RemoteRunArtifactsResult = typeof RemoteRunArtifactsResult.Type;