@h-rig/contracts 0.0.0-e2e-live.20260630085347
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/README.md +14 -0
- package/dist/index.cjs +3442 -0
- package/dist/index.mjs +3401 -0
- package/dist/src/agent-roles.d.ts +8 -0
- package/dist/src/agent-roles.js +1 -0
- package/dist/src/artifact.d.ts +13 -0
- package/dist/src/artifact.js +56 -0
- package/dist/src/baseSchemas.d.ts +63 -0
- package/dist/src/baseSchemas.js +72 -0
- package/dist/src/blocker-classifier.d.ts +21 -0
- package/dist/src/blocker-classifier.js +13 -0
- package/dist/src/browser.d.ts +80 -0
- package/dist/src/browser.js +13 -0
- package/dist/src/capability-id.d.ts +22 -0
- package/dist/src/capability-id.js +8 -0
- package/dist/src/cli-output.d.ts +348 -0
- package/dist/src/cli-output.js +190 -0
- package/dist/src/cli-runner.d.ts +43 -0
- package/dist/src/cli-runner.js +13 -0
- package/dist/src/cockpit.d.ts +58 -0
- package/dist/src/cockpit.js +13 -0
- package/dist/src/collab-session-viewer.d.ts +36 -0
- package/dist/src/collab-session-viewer.js +13 -0
- package/dist/src/config.d.ts +553 -0
- package/dist/src/config.js +822 -0
- package/dist/src/control-plane-types.d.ts +323 -0
- package/dist/src/control-plane-types.js +13 -0
- package/dist/src/conversation.d.ts +50 -0
- package/dist/src/conversation.js +98 -0
- package/dist/src/dependency-preflight.d.ts +43 -0
- package/dist/src/dependency-preflight.js +13 -0
- package/dist/src/docs-drift.d.ts +10 -0
- package/dist/src/docs-drift.js +12 -0
- package/dist/src/doctor.d.ts +90 -0
- package/dist/src/doctor.js +13 -0
- package/dist/src/drift.d.ts +28 -0
- package/dist/src/drift.js +69 -0
- package/dist/src/editor.d.ts +25 -0
- package/dist/src/editor.js +58 -0
- package/dist/src/errors.d.ts +13 -0
- package/dist/src/errors.js +17 -0
- package/dist/src/git.d.ts +152 -0
- package/dist/src/git.js +196 -0
- package/dist/src/github.d.ts +295 -0
- package/dist/src/github.js +17 -0
- package/dist/src/graph.d.ts +360 -0
- package/dist/src/graph.js +229 -0
- package/dist/src/guard.d.ts +118 -0
- package/dist/src/guard.js +15 -0
- package/dist/src/harness-events.d.ts +8 -0
- package/dist/src/harness-events.js +1 -0
- package/dist/src/harness-profile-state.d.ts +10 -0
- package/dist/src/harness-profile-state.js +13 -0
- package/dist/src/help-catalog.d.ts +41 -0
- package/dist/src/help-catalog.js +13 -0
- package/dist/src/host.d.ts +41 -0
- package/dist/src/host.js +13 -0
- package/dist/src/identity.d.ts +44 -0
- package/dist/src/identity.js +1 -0
- package/dist/src/index.d.ts +98 -0
- package/dist/src/index.js +3401 -0
- package/dist/src/isolation.d.ts +213 -0
- package/dist/src/isolation.js +13 -0
- package/dist/src/kernel.d.ts +200 -0
- package/dist/src/kernel.js +261 -0
- package/dist/src/keybindings.d.ts +71 -0
- package/dist/src/keybindings.js +122 -0
- package/dist/src/layout.d.ts +44 -0
- package/dist/src/layout.js +8 -0
- package/dist/src/lifecycle-capabilities.d.ts +224 -0
- package/dist/src/lifecycle-capabilities.js +45 -0
- package/dist/src/managed-repos.d.ts +339 -0
- package/dist/src/managed-repos.js +37 -0
- package/dist/src/memory.d.ts +199 -0
- package/dist/src/memory.js +15 -0
- package/dist/src/model.d.ts +13 -0
- package/dist/src/model.js +9 -0
- package/dist/src/native-toolchain.d.ts +46 -0
- package/dist/src/native-toolchain.js +13 -0
- package/dist/src/notify.d.ts +46 -0
- package/dist/src/notify.js +13 -0
- package/dist/src/orchestration.d.ts +43 -0
- package/dist/src/orchestration.js +98 -0
- package/dist/src/panel-protocol.d.ts +17 -0
- package/dist/src/panel-protocol.js +10 -0
- package/dist/src/pi-session.d.ts +113 -0
- package/dist/src/pi-session.js +1 -0
- package/dist/src/placement.d.ts +47 -0
- package/dist/src/placement.js +13 -0
- package/dist/src/planning.d.ts +64 -0
- package/dist/src/planning.js +90 -0
- package/dist/src/plugin-hooks.d.ts +51 -0
- package/dist/src/plugin-hooks.js +386 -0
- package/dist/src/plugin.d.ts +476 -0
- package/dist/src/plugin.js +384 -0
- package/dist/src/policy.d.ts +16 -0
- package/dist/src/policy.js +59 -0
- package/dist/src/product-entrypoint.d.ts +22 -0
- package/dist/src/product-entrypoint.js +13 -0
- package/dist/src/project.d.ts +71 -0
- package/dist/src/project.js +110 -0
- package/dist/src/prompt.d.ts +29 -0
- package/dist/src/prompt.js +13 -0
- package/dist/src/protocol-version.d.ts +21 -0
- package/dist/src/protocol-version.js +6 -0
- package/dist/src/provider-instructions.d.ts +41 -0
- package/dist/src/provider-instructions.js +13 -0
- package/dist/src/provider.d.ts +105 -0
- package/dist/src/provider.js +194 -0
- package/dist/src/remote-control.d.ts +93 -0
- package/dist/src/remote-control.js +26 -0
- package/dist/src/remote.d.ts +318 -0
- package/dist/src/remote.js +634 -0
- package/dist/src/review.d.ts +18 -0
- package/dist/src/review.js +61 -0
- package/dist/src/rollups.d.ts +41 -0
- package/dist/src/rollups.js +70 -0
- package/dist/src/run-control.d.ts +164 -0
- package/dist/src/run-control.js +13 -0
- package/dist/src/run-discovery.d.ts +83 -0
- package/dist/src/run-discovery.js +13 -0
- package/dist/src/run-dispatch.d.ts +34 -0
- package/dist/src/run-dispatch.js +13 -0
- package/dist/src/run-identity.d.ts +47 -0
- package/dist/src/run-identity.js +13 -0
- package/dist/src/run-journal.d.ts +694 -0
- package/dist/src/run-journal.js +569 -0
- package/dist/src/run-queue.d.ts +36 -0
- package/dist/src/run-queue.js +13 -0
- package/dist/src/run-read-model.d.ts +200 -0
- package/dist/src/run-read-model.js +13 -0
- package/dist/src/run-record.d.ts +45 -0
- package/dist/src/run-record.js +1 -0
- package/dist/src/run-registry-backbone.d.ts +56 -0
- package/dist/src/run-registry-backbone.js +13 -0
- package/dist/src/run-session-journal.d.ts +154 -0
- package/dist/src/run-session-journal.js +87 -0
- package/dist/src/run-status.d.ts +10 -0
- package/dist/src/run-status.js +27 -0
- package/dist/src/run-timeline.d.ts +7 -0
- package/dist/src/run-timeline.js +1 -0
- package/dist/src/runtime-secrets.d.ts +10 -0
- package/dist/src/runtime-secrets.js +13 -0
- package/dist/src/runtime-task-context.d.ts +82 -0
- package/dist/src/runtime-task-context.js +1 -0
- package/dist/src/runtime.d.ts +103 -0
- package/dist/src/runtime.js +210 -0
- package/dist/src/session-asset-materializer.d.ts +35 -0
- package/dist/src/session-asset-materializer.js +13 -0
- package/dist/src/session-hook-materializer.d.ts +41 -0
- package/dist/src/session-hook-materializer.js +13 -0
- package/dist/src/setup.d.ts +154 -0
- package/dist/src/setup.js +13 -0
- package/dist/src/stage.d.ts +245 -0
- package/dist/src/stage.js +169 -0
- package/dist/src/supervisor-journal.d.ts +204 -0
- package/dist/src/supervisor-journal.js +336 -0
- package/dist/src/supervisor-loop.d.ts +40 -0
- package/dist/src/supervisor-loop.js +13 -0
- package/dist/src/task-artifacts.d.ts +53 -0
- package/dist/src/task-artifacts.js +13 -0
- package/dist/src/task-config.d.ts +22 -0
- package/dist/src/task-config.js +1 -0
- package/dist/src/task-context-renderer.d.ts +29 -0
- package/dist/src/task-context-renderer.js +13 -0
- package/dist/src/task-data.d.ts +196 -0
- package/dist/src/task-data.js +13 -0
- package/dist/src/task-graph-primitives.d.ts +47 -0
- package/dist/src/task-graph-primitives.js +1 -0
- package/dist/src/task-source.d.ts +167 -0
- package/dist/src/task-source.js +25 -0
- package/dist/src/task-state-metadata.d.ts +21 -0
- package/dist/src/task-state-metadata.js +1 -0
- package/dist/src/task-state-paths.d.ts +14 -0
- package/dist/src/task-state-paths.js +13 -0
- package/dist/src/task-state-store.d.ts +36 -0
- package/dist/src/task-state-store.js +17 -0
- package/dist/src/task-tracker-state.d.ts +101 -0
- package/dist/src/task-tracker-state.js +39 -0
- package/dist/src/terminal.d.ts +130 -0
- package/dist/src/terminal.js +161 -0
- package/dist/src/tool-materializer.d.ts +36 -0
- package/dist/src/tool-materializer.js +13 -0
- package/dist/src/tool-registry.d.ts +3 -0
- package/dist/src/tool-registry.js +58 -0
- package/dist/src/toolchain-sources.d.ts +54 -0
- package/dist/src/toolchain-sources.js +17 -0
- package/dist/src/transport-config.d.ts +161 -0
- package/dist/src/transport-config.js +15 -0
- package/dist/src/validation.d.ts +14 -0
- package/dist/src/validation.js +63 -0
- package/dist/src/workflow-journal.d.ts +125 -0
- package/dist/src/workflow-journal.js +27 -0
- package/dist/src/workspace-config.d.ts +18 -0
- package/dist/src/workspace-config.js +13 -0
- package/dist/src/workspace-service.d.ts +16 -0
- package/dist/src/workspace-service.js +13 -0
- package/dist/src/workspace.d.ts +204 -0
- package/dist/src/workspace.js +195 -0
- package/package.json +79 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prompt.ts — pure capability vocabulary for agent prompt assembly.
|
|
3
|
+
*
|
|
4
|
+
* Moved here from `@rig/prompt-plugin` (where it was defined locally): the FLOOR
|
|
5
|
+
* cannot resolve a capability whose id/input type only exist inside a plugin
|
|
6
|
+
* without importing the plugin. The plugin OWNS the impl
|
|
7
|
+
* (`readPriorPrProgressPromptSection`, lazy-loaded inside `run()`) and registers
|
|
8
|
+
* it under this id; consumers resolve it off the host. Types only here.
|
|
9
|
+
*/
|
|
10
|
+
import type { CapabilityId } from "./capability-id";
|
|
11
|
+
/**
|
|
12
|
+
* Capability id: agent prompt assembly — the prior-progress section of what the
|
|
13
|
+
* agent is told for a re-dispatched task.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PRIOR_PROGRESS_PROMPT_CAPABILITY_ID = "prompt.prior-progress";
|
|
16
|
+
/** Pure input: which workspace + task to assemble the prior-progress section for. */
|
|
17
|
+
export type PriorProgressPromptInput = {
|
|
18
|
+
readonly projectRoot: string;
|
|
19
|
+
readonly taskId: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The cohesive prompt-assembly operation: returns the prior-PR-progress prompt
|
|
23
|
+
* section, or null when there is no prior progress. Async (reads fs).
|
|
24
|
+
*/
|
|
25
|
+
export interface PriorProgressPromptService {
|
|
26
|
+
readPriorProgressSection(input: PriorProgressPromptInput): Promise<string | null>;
|
|
27
|
+
}
|
|
28
|
+
/** Typed capability id; string value is {@link PRIOR_PROGRESS_PROMPT_CAPABILITY_ID}. */
|
|
29
|
+
export declare const PRIOR_PROGRESS_PROMPT: CapabilityId<PriorProgressPromptService>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// packages/contracts/src/prompt.ts
|
|
8
|
+
var PRIOR_PROGRESS_PROMPT_CAPABILITY_ID = "prompt.prior-progress";
|
|
9
|
+
var PRIOR_PROGRESS_PROMPT = makeCapabilityId(PRIOR_PROGRESS_PROMPT_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
PRIOR_PROGRESS_PROMPT_CAPABILITY_ID,
|
|
12
|
+
PRIOR_PROGRESS_PROMPT
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rig client–server protocol version.
|
|
3
|
+
*
|
|
4
|
+
* A single integer shared by the server (reported in the
|
|
5
|
+
* `GET /api/server/status` bootstrap payload as `protocolVersion`) and by
|
|
6
|
+
* clients that speak the HTTP/WS surface (the pi-rig bridge validates it at
|
|
7
|
+
* extension init and disables itself on mismatch instead of failing on a
|
|
8
|
+
* random later request).
|
|
9
|
+
*
|
|
10
|
+
* Bump rules:
|
|
11
|
+
* - Increment whenever a change to the server API surface would break an
|
|
12
|
+
* older client (removed/renamed routes, changed payload shapes, changed
|
|
13
|
+
* steering/event semantics).
|
|
14
|
+
* - Purely additive changes (new routes, new optional fields) do NOT require
|
|
15
|
+
* a bump.
|
|
16
|
+
*
|
|
17
|
+
* History:
|
|
18
|
+
* - 1: first explicit version (2026-06). Servers older than this do not
|
|
19
|
+
* report `protocolVersion` at all; clients treat the missing field as v0.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RIG_PROTOCOL_VERSION = 1;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure provider-instruction contract types.
|
|
3
|
+
*
|
|
4
|
+
* Neutral home for the agent-harness provider identity so the dumb runtime
|
|
5
|
+
* substrate (native/task-ops, hooks/inject-context) and the
|
|
6
|
+
* @rig/provider-plugin that owns the instruction text can both reference it
|
|
7
|
+
* without a substrate->plugin import cycle. Carries no behaviour and imports
|
|
8
|
+
* nothing — exactly like `memory.ts` / `lifecycle-capabilities.ts`.
|
|
9
|
+
*
|
|
10
|
+
* The plugin registers its executable `RuntimeInstructionService` impl under the
|
|
11
|
+
* typed id {@link RUNTIME_INSTRUCTION} (whose string value is
|
|
12
|
+
* {@link RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID}) via `*.provide`; the runtime
|
|
13
|
+
* resolves it by id from `pluginHost.listExecutableCapabilities()` via the
|
|
14
|
+
* `defineCapability` seam (`@rig/core/capability`), re-exported from the thin
|
|
15
|
+
* `@rig/runtime/control-plane/provider-instruction-port`.
|
|
16
|
+
*/
|
|
17
|
+
import type { CapabilityId } from "./capability-id";
|
|
18
|
+
/** Capability id the provider plugin registers its instruction service under. */
|
|
19
|
+
export declare const RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID = "provider.runtime-instructions";
|
|
20
|
+
/** The agent harness adapter the runtime is currently wired to. */
|
|
21
|
+
export type RuntimeInstructionProvider = "pi";
|
|
22
|
+
/**
|
|
23
|
+
* The cohesive set of agent-harness instruction builders the runtime consumers
|
|
24
|
+
* depend on. This is pure capability VOCAB: the `@rig/provider-plugin` provides a
|
|
25
|
+
* concrete impl (statically checked against this interface via the typed
|
|
26
|
+
* capability seam), and the substrate only ever sees this contract — resolved by
|
|
27
|
+
* id off a plugin host with no `as unknown as` at any call site.
|
|
28
|
+
*/
|
|
29
|
+
export interface RuntimeInstructionService {
|
|
30
|
+
normalizeProvider(value: string | undefined | null): RuntimeInstructionProvider;
|
|
31
|
+
buildTaskRunInstructionLines(provider: RuntimeInstructionProvider): string[];
|
|
32
|
+
buildRuntimeContextLines(provider: RuntimeInstructionProvider): string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The typed capability id the provider plugin provides and consumers require.
|
|
36
|
+
* Phantom-typed with `RuntimeInstructionService` so `resolve(host)` returns a
|
|
37
|
+
* `RuntimeInstructionService` with no cast leaking to callers. Its string value
|
|
38
|
+
* is {@link RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID}, so it indexes the same
|
|
39
|
+
* host entry.
|
|
40
|
+
*/
|
|
41
|
+
export declare const RUNTIME_INSTRUCTION: CapabilityId<RuntimeInstructionService>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// packages/contracts/src/provider-instructions.ts
|
|
8
|
+
var RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID = "provider.runtime-instructions";
|
|
9
|
+
var RUNTIME_INSTRUCTION = makeCapabilityId(RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID,
|
|
12
|
+
RUNTIME_INSTRUCTION
|
|
13
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { CapabilityId } from "./capability-id";
|
|
3
|
+
export declare const ProviderSession: Schema.Struct<{
|
|
4
|
+
readonly provider: Schema.Literals<readonly ["codex", "claude"]>;
|
|
5
|
+
readonly status: Schema.Literals<readonly ["connecting", "ready", "running", "error", "closed"]>;
|
|
6
|
+
readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
|
|
7
|
+
readonly cwd: Schema.optional<Schema.Trim>;
|
|
8
|
+
readonly model: Schema.optional<Schema.Trim>;
|
|
9
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
10
|
+
readonly resumeCursor: Schema.optional<Schema.Unknown>;
|
|
11
|
+
readonly activeTurnId: Schema.optional<Schema.brand<Schema.Trim, "TurnId">>;
|
|
12
|
+
readonly createdAt: Schema.String;
|
|
13
|
+
readonly updatedAt: Schema.String;
|
|
14
|
+
readonly lastError: Schema.optional<Schema.Trim>;
|
|
15
|
+
}>;
|
|
16
|
+
export type ProviderSession = typeof ProviderSession.Type;
|
|
17
|
+
export declare const ProviderSessionStartInput: Schema.Struct<{
|
|
18
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
19
|
+
readonly provider: Schema.optional<Schema.Literals<readonly ["codex", "claude"]>>;
|
|
20
|
+
readonly cwd: Schema.optional<Schema.Trim>;
|
|
21
|
+
readonly model: Schema.optional<Schema.Trim>;
|
|
22
|
+
readonly modelOptions: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
23
|
+
readonly resumeCursor: Schema.optional<Schema.Unknown>;
|
|
24
|
+
readonly serviceTier: Schema.optional<Schema.NullOr<Schema.Literals<readonly ["fast", "flex"]>>>;
|
|
25
|
+
readonly approvalPolicy: Schema.optional<Schema.Literals<readonly ["untrusted", "on-failure", "on-request", "never"]>>;
|
|
26
|
+
readonly sandboxMode: Schema.optional<Schema.Literals<readonly ["read-only", "workspace-write", "danger-full-access"]>>;
|
|
27
|
+
readonly providerOptions: Schema.optional<Schema.Struct<{
|
|
28
|
+
readonly codex: Schema.optional<Schema.Struct<{
|
|
29
|
+
readonly binaryPath: Schema.optional<Schema.Trim>;
|
|
30
|
+
readonly homePath: Schema.optional<Schema.Trim>;
|
|
31
|
+
}>>;
|
|
32
|
+
}>>;
|
|
33
|
+
readonly runtimeMode: Schema.Literals<readonly ["approval-required", "full-access"]>;
|
|
34
|
+
}>;
|
|
35
|
+
export type ProviderSessionStartInput = typeof ProviderSessionStartInput.Type;
|
|
36
|
+
export declare const ProviderSendTurnInput: Schema.Struct<{
|
|
37
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
38
|
+
readonly input: Schema.optional<Schema.Trim>;
|
|
39
|
+
readonly attachments: Schema.optional<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
40
|
+
readonly type: Schema.Literal<"image">;
|
|
41
|
+
readonly id: Schema.Trim;
|
|
42
|
+
readonly name: Schema.Trim;
|
|
43
|
+
readonly mimeType: Schema.Trim;
|
|
44
|
+
readonly sizeBytes: Schema.Int;
|
|
45
|
+
}>]>>>;
|
|
46
|
+
readonly model: Schema.optional<Schema.Trim>;
|
|
47
|
+
readonly serviceTier: Schema.optional<Schema.NullOr<Schema.Literals<readonly ["fast", "flex"]>>>;
|
|
48
|
+
readonly modelOptions: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
49
|
+
readonly interactionMode: Schema.optional<Schema.Literals<readonly ["default", "plan"]>>;
|
|
50
|
+
}>;
|
|
51
|
+
export type ProviderSendTurnInput = typeof ProviderSendTurnInput.Type;
|
|
52
|
+
export declare const ProviderTurnStartResult: Schema.Struct<{
|
|
53
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
54
|
+
readonly turnId: Schema.brand<Schema.Trim, "TurnId">;
|
|
55
|
+
readonly resumeCursor: Schema.optional<Schema.Unknown>;
|
|
56
|
+
}>;
|
|
57
|
+
export type ProviderTurnStartResult = typeof ProviderTurnStartResult.Type;
|
|
58
|
+
export declare const ProviderInterruptTurnInput: Schema.Struct<{
|
|
59
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
60
|
+
readonly turnId: Schema.optional<Schema.brand<Schema.Trim, "TurnId">>;
|
|
61
|
+
}>;
|
|
62
|
+
export type ProviderInterruptTurnInput = typeof ProviderInterruptTurnInput.Type;
|
|
63
|
+
export declare const ProviderStopSessionInput: Schema.Struct<{
|
|
64
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
65
|
+
}>;
|
|
66
|
+
export type ProviderStopSessionInput = typeof ProviderStopSessionInput.Type;
|
|
67
|
+
export declare const ProviderRespondToRequestInput: Schema.Struct<{
|
|
68
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
69
|
+
readonly requestId: Schema.brand<Schema.Trim, "ApprovalRequestId">;
|
|
70
|
+
readonly decision: Schema.Literals<readonly ["accept", "acceptForSession", "decline", "cancel"]>;
|
|
71
|
+
}>;
|
|
72
|
+
export type ProviderRespondToRequestInput = typeof ProviderRespondToRequestInput.Type;
|
|
73
|
+
export declare const ProviderRespondToUserInputInput: Schema.Struct<{
|
|
74
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
75
|
+
readonly requestId: Schema.brand<Schema.Trim, "ApprovalRequestId">;
|
|
76
|
+
readonly answers: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
77
|
+
}>;
|
|
78
|
+
export type ProviderRespondToUserInputInput = typeof ProviderRespondToUserInputInput.Type;
|
|
79
|
+
export declare const ProviderEvent: Schema.Struct<{
|
|
80
|
+
readonly id: Schema.brand<Schema.Trim, "EventId">;
|
|
81
|
+
readonly kind: Schema.Literals<readonly ["session", "notification", "request", "error"]>;
|
|
82
|
+
readonly provider: Schema.Literals<readonly ["codex", "claude"]>;
|
|
83
|
+
readonly threadId: Schema.brand<Schema.Trim, "ThreadId">;
|
|
84
|
+
readonly createdAt: Schema.String;
|
|
85
|
+
readonly method: Schema.Trim;
|
|
86
|
+
readonly message: Schema.optional<Schema.Trim>;
|
|
87
|
+
readonly turnId: Schema.optional<Schema.brand<Schema.Trim, "TurnId">>;
|
|
88
|
+
readonly itemId: Schema.optional<Schema.brand<Schema.Trim, "ProviderItemId">>;
|
|
89
|
+
readonly requestId: Schema.optional<Schema.brand<Schema.Trim, "ApprovalRequestId">>;
|
|
90
|
+
readonly requestKind: Schema.optional<Schema.Literals<readonly ["command", "file-read", "file-change"]>>;
|
|
91
|
+
readonly textDelta: Schema.optional<Schema.String>;
|
|
92
|
+
readonly payload: Schema.optional<Schema.Unknown>;
|
|
93
|
+
}>;
|
|
94
|
+
export type ProviderEvent = typeof ProviderEvent.Type;
|
|
95
|
+
export interface AgentHarnessRunWrapperInput {
|
|
96
|
+
readonly argv: readonly string[];
|
|
97
|
+
}
|
|
98
|
+
export interface AgentHarnessService {
|
|
99
|
+
/** Provider-owned source entrypoint used when a project-local rig-agent binary must be materialized from source. */
|
|
100
|
+
readonly resolveAgentWrapperEntrypoint: () => string;
|
|
101
|
+
readonly runAgentWrapper: (input: AgentHarnessRunWrapperInput) => Promise<number>;
|
|
102
|
+
readonly runRigAgentEntrypoint: () => Promise<void>;
|
|
103
|
+
}
|
|
104
|
+
export declare const AGENT_HARNESS_CAPABILITY_ID = "rig.provider.agent-harness";
|
|
105
|
+
export declare const AGENT_HARNESS: CapabilityId<AgentHarnessService>;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/provider.ts
|
|
3
|
+
import { Schema as Schema4 } from "effect";
|
|
4
|
+
|
|
5
|
+
// packages/contracts/src/capability-id.ts
|
|
6
|
+
function makeCapabilityId(id) {
|
|
7
|
+
return id;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// packages/contracts/src/baseSchemas.ts
|
|
11
|
+
import { Schema } from "effect";
|
|
12
|
+
var TrimmedString = Schema.Trim;
|
|
13
|
+
var TrimmedNonEmptyString = TrimmedString.check(Schema.isNonEmpty());
|
|
14
|
+
var NonNegativeInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
15
|
+
var PositiveInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1));
|
|
16
|
+
var IsoDateTime = Schema.String;
|
|
17
|
+
var makeEntityId = (brand) => TrimmedNonEmptyString.pipe(Schema.brand(brand));
|
|
18
|
+
var ThreadId = makeEntityId("ThreadId");
|
|
19
|
+
var ProjectId = makeEntityId("ProjectId");
|
|
20
|
+
var WorkspaceId = makeEntityId("WorkspaceId");
|
|
21
|
+
var GraphId = makeEntityId("GraphId");
|
|
22
|
+
var TaskId = makeEntityId("TaskId");
|
|
23
|
+
var RunId = makeEntityId("RunId");
|
|
24
|
+
var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
|
|
25
|
+
var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
|
|
26
|
+
var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
|
|
27
|
+
var EngineRuntimeId = makeEntityId("EngineRuntimeId");
|
|
28
|
+
var ConversationId = makeEntityId("ConversationId");
|
|
29
|
+
var ActionId = makeEntityId("ActionId");
|
|
30
|
+
var ArtifactId = makeEntityId("ArtifactId");
|
|
31
|
+
var WorktreeId = makeEntityId("WorktreeId");
|
|
32
|
+
var ValidationResultId = makeEntityId("ValidationResultId");
|
|
33
|
+
var ReviewResultId = makeEntityId("ReviewResultId");
|
|
34
|
+
var CommandId = makeEntityId("CommandId");
|
|
35
|
+
var EventId = makeEntityId("EventId");
|
|
36
|
+
var MessageId = makeEntityId("MessageId");
|
|
37
|
+
var TurnId = makeEntityId("TurnId");
|
|
38
|
+
var ProviderItemId = makeEntityId("ProviderItemId");
|
|
39
|
+
var RuntimeSessionId = makeEntityId("RuntimeSessionId");
|
|
40
|
+
var RuntimeItemId = makeEntityId("RuntimeItemId");
|
|
41
|
+
var RuntimeRequestId = makeEntityId("RuntimeRequestId");
|
|
42
|
+
var RuntimeTaskId = makeEntityId("RuntimeTaskId");
|
|
43
|
+
var ApprovalRequestId = makeEntityId("ApprovalRequestId");
|
|
44
|
+
var CheckpointRef = makeEntityId("CheckpointRef");
|
|
45
|
+
var RemoteEndpointId = makeEntityId("RemoteEndpointId");
|
|
46
|
+
|
|
47
|
+
// packages/contracts/src/model.ts
|
|
48
|
+
import { Schema as Schema2 } from "effect";
|
|
49
|
+
var ModelSlug = Schema2.String;
|
|
50
|
+
var ProviderModelOptions = Schema2.Record(Schema2.String, Schema2.Unknown);
|
|
51
|
+
|
|
52
|
+
// packages/contracts/src/orchestration.ts
|
|
53
|
+
import { Schema as Schema3 } from "effect";
|
|
54
|
+
var ProviderKind = Schema3.Literals(["codex", "claude"]);
|
|
55
|
+
var ProviderApprovalPolicy = Schema3.Literals([
|
|
56
|
+
"untrusted",
|
|
57
|
+
"on-failure",
|
|
58
|
+
"on-request",
|
|
59
|
+
"never"
|
|
60
|
+
]);
|
|
61
|
+
var ProviderSandboxMode = Schema3.Literals([
|
|
62
|
+
"read-only",
|
|
63
|
+
"workspace-write",
|
|
64
|
+
"danger-full-access"
|
|
65
|
+
]);
|
|
66
|
+
var ProviderServiceTier = Schema3.Literals(["fast", "flex"]);
|
|
67
|
+
var RuntimeMode = Schema3.Literals(["approval-required", "full-access"]);
|
|
68
|
+
var ProviderInteractionMode = Schema3.Literals(["default", "plan"]);
|
|
69
|
+
var ProviderRequestKind = Schema3.Literals(["command", "file-read", "file-change"]);
|
|
70
|
+
var ProviderApprovalDecision = Schema3.Literals([
|
|
71
|
+
"accept",
|
|
72
|
+
"acceptForSession",
|
|
73
|
+
"decline",
|
|
74
|
+
"cancel"
|
|
75
|
+
]);
|
|
76
|
+
var ProviderUserInputAnswers = Schema3.Record(Schema3.String, Schema3.Unknown);
|
|
77
|
+
var PROVIDER_SEND_TURN_MAX_INPUT_CHARS = 120000;
|
|
78
|
+
var PROVIDER_SEND_TURN_MAX_ATTACHMENTS = 8;
|
|
79
|
+
var PROVIDER_SEND_TURN_MAX_IMAGE_BYTES = 10 * 1024 * 1024;
|
|
80
|
+
var CHAT_ATTACHMENT_ID_MAX_CHARS = 128;
|
|
81
|
+
var ChatAttachmentId = TrimmedNonEmptyString.check(Schema3.isMaxLength(CHAT_ATTACHMENT_ID_MAX_CHARS), Schema3.isPattern(/^[a-z0-9_-]+$/i));
|
|
82
|
+
var ChatImageAttachment = Schema3.Struct({
|
|
83
|
+
type: Schema3.Literal("image"),
|
|
84
|
+
id: ChatAttachmentId,
|
|
85
|
+
name: TrimmedNonEmptyString.check(Schema3.isMaxLength(255)),
|
|
86
|
+
mimeType: TrimmedNonEmptyString.check(Schema3.isMaxLength(100), Schema3.isPattern(/^image\//i)),
|
|
87
|
+
sizeBytes: NonNegativeInt.check(Schema3.isLessThanOrEqualTo(PROVIDER_SEND_TURN_MAX_IMAGE_BYTES))
|
|
88
|
+
});
|
|
89
|
+
var ChatAttachment = Schema3.Union([ChatImageAttachment]);
|
|
90
|
+
|
|
91
|
+
// packages/contracts/src/provider.ts
|
|
92
|
+
var TrimmedNonEmptyStringSchema = TrimmedNonEmptyString;
|
|
93
|
+
var ProviderSessionStatus = Schema4.Literals([
|
|
94
|
+
"connecting",
|
|
95
|
+
"ready",
|
|
96
|
+
"running",
|
|
97
|
+
"error",
|
|
98
|
+
"closed"
|
|
99
|
+
]);
|
|
100
|
+
var ProviderSession = Schema4.Struct({
|
|
101
|
+
provider: ProviderKind,
|
|
102
|
+
status: ProviderSessionStatus,
|
|
103
|
+
runtimeMode: RuntimeMode,
|
|
104
|
+
cwd: Schema4.optional(TrimmedNonEmptyStringSchema),
|
|
105
|
+
model: Schema4.optional(TrimmedNonEmptyStringSchema),
|
|
106
|
+
threadId: ThreadId,
|
|
107
|
+
resumeCursor: Schema4.optional(Schema4.Unknown),
|
|
108
|
+
activeTurnId: Schema4.optional(TurnId),
|
|
109
|
+
createdAt: IsoDateTime,
|
|
110
|
+
updatedAt: IsoDateTime,
|
|
111
|
+
lastError: Schema4.optional(TrimmedNonEmptyStringSchema)
|
|
112
|
+
});
|
|
113
|
+
var CodexProviderStartOptions = Schema4.Struct({
|
|
114
|
+
binaryPath: Schema4.optional(TrimmedNonEmptyStringSchema),
|
|
115
|
+
homePath: Schema4.optional(TrimmedNonEmptyStringSchema)
|
|
116
|
+
});
|
|
117
|
+
var ProviderStartOptions = Schema4.Struct({
|
|
118
|
+
codex: Schema4.optional(CodexProviderStartOptions)
|
|
119
|
+
});
|
|
120
|
+
var ProviderSessionStartInput = Schema4.Struct({
|
|
121
|
+
threadId: ThreadId,
|
|
122
|
+
provider: Schema4.optional(ProviderKind),
|
|
123
|
+
cwd: Schema4.optional(TrimmedNonEmptyStringSchema),
|
|
124
|
+
model: Schema4.optional(TrimmedNonEmptyStringSchema),
|
|
125
|
+
modelOptions: Schema4.optional(ProviderModelOptions),
|
|
126
|
+
resumeCursor: Schema4.optional(Schema4.Unknown),
|
|
127
|
+
serviceTier: Schema4.optional(Schema4.NullOr(ProviderServiceTier)),
|
|
128
|
+
approvalPolicy: Schema4.optional(ProviderApprovalPolicy),
|
|
129
|
+
sandboxMode: Schema4.optional(ProviderSandboxMode),
|
|
130
|
+
providerOptions: Schema4.optional(ProviderStartOptions),
|
|
131
|
+
runtimeMode: RuntimeMode
|
|
132
|
+
});
|
|
133
|
+
var ProviderSendTurnInput = Schema4.Struct({
|
|
134
|
+
threadId: ThreadId,
|
|
135
|
+
input: Schema4.optional(TrimmedNonEmptyStringSchema.check(Schema4.isMaxLength(PROVIDER_SEND_TURN_MAX_INPUT_CHARS))),
|
|
136
|
+
attachments: Schema4.optional(Schema4.Array(ChatAttachment).check(Schema4.isMaxLength(PROVIDER_SEND_TURN_MAX_ATTACHMENTS))),
|
|
137
|
+
model: Schema4.optional(TrimmedNonEmptyStringSchema),
|
|
138
|
+
serviceTier: Schema4.optional(Schema4.NullOr(ProviderServiceTier)),
|
|
139
|
+
modelOptions: Schema4.optional(ProviderModelOptions),
|
|
140
|
+
interactionMode: Schema4.optional(ProviderInteractionMode)
|
|
141
|
+
});
|
|
142
|
+
var ProviderTurnStartResult = Schema4.Struct({
|
|
143
|
+
threadId: ThreadId,
|
|
144
|
+
turnId: TurnId,
|
|
145
|
+
resumeCursor: Schema4.optional(Schema4.Unknown)
|
|
146
|
+
});
|
|
147
|
+
var ProviderInterruptTurnInput = Schema4.Struct({
|
|
148
|
+
threadId: ThreadId,
|
|
149
|
+
turnId: Schema4.optional(TurnId)
|
|
150
|
+
});
|
|
151
|
+
var ProviderStopSessionInput = Schema4.Struct({
|
|
152
|
+
threadId: ThreadId
|
|
153
|
+
});
|
|
154
|
+
var ProviderRespondToRequestInput = Schema4.Struct({
|
|
155
|
+
threadId: ThreadId,
|
|
156
|
+
requestId: ApprovalRequestId,
|
|
157
|
+
decision: ProviderApprovalDecision
|
|
158
|
+
});
|
|
159
|
+
var ProviderRespondToUserInputInput = Schema4.Struct({
|
|
160
|
+
threadId: ThreadId,
|
|
161
|
+
requestId: ApprovalRequestId,
|
|
162
|
+
answers: ProviderUserInputAnswers
|
|
163
|
+
});
|
|
164
|
+
var ProviderEventKind = Schema4.Literals(["session", "notification", "request", "error"]);
|
|
165
|
+
var ProviderEvent = Schema4.Struct({
|
|
166
|
+
id: EventId,
|
|
167
|
+
kind: ProviderEventKind,
|
|
168
|
+
provider: ProviderKind,
|
|
169
|
+
threadId: ThreadId,
|
|
170
|
+
createdAt: IsoDateTime,
|
|
171
|
+
method: TrimmedNonEmptyStringSchema,
|
|
172
|
+
message: Schema4.optional(TrimmedNonEmptyStringSchema),
|
|
173
|
+
turnId: Schema4.optional(TurnId),
|
|
174
|
+
itemId: Schema4.optional(ProviderItemId),
|
|
175
|
+
requestId: Schema4.optional(ApprovalRequestId),
|
|
176
|
+
requestKind: Schema4.optional(ProviderRequestKind),
|
|
177
|
+
textDelta: Schema4.optional(Schema4.String),
|
|
178
|
+
payload: Schema4.optional(Schema4.Unknown)
|
|
179
|
+
});
|
|
180
|
+
var AGENT_HARNESS_CAPABILITY_ID = "rig.provider.agent-harness";
|
|
181
|
+
var AGENT_HARNESS = makeCapabilityId(AGENT_HARNESS_CAPABILITY_ID);
|
|
182
|
+
export {
|
|
183
|
+
ProviderTurnStartResult,
|
|
184
|
+
ProviderStopSessionInput,
|
|
185
|
+
ProviderSessionStartInput,
|
|
186
|
+
ProviderSession,
|
|
187
|
+
ProviderSendTurnInput,
|
|
188
|
+
ProviderRespondToUserInputInput,
|
|
189
|
+
ProviderRespondToRequestInput,
|
|
190
|
+
ProviderInterruptTurnInput,
|
|
191
|
+
ProviderEvent,
|
|
192
|
+
AGENT_HARNESS_CAPABILITY_ID,
|
|
193
|
+
AGENT_HARNESS
|
|
194
|
+
};
|
|
@@ -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
|
+
};
|