@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.
- package/dist/index.cjs +3442 -0
- package/dist/index.mjs +3401 -0
- package/dist/src/agent-roles.d.ts +8 -0
- package/dist/src/artifact.d.ts +13 -0
- package/dist/src/artifact.js +3 -0
- package/dist/src/baseSchemas.d.ts +63 -0
- package/dist/src/baseSchemas.js +6 -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 +767 -162
- 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 +3 -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 +3 -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 +3 -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 +137 -1
- 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 +2605 -3752
- 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 +3 -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 +3 -58
- 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 +28 -961
- 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 +346 -64
- package/dist/src/policy.d.ts +16 -0
- package/dist/src/policy.js +3 -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 +3 -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 +16 -835
- 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 +238 -1078
- package/dist/src/review.d.ts +18 -0
- package/dist/src/review.js +3 -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 +73 -906
- 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 +24 -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 +3 -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 +3 -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 +76 -911
- package/package.json +55 -4
- package/dist/src/engine.js +0 -2278
- package/dist/src/providerRuntime.js +0 -1630
- package/dist/src/rig.js +0 -2374
- package/dist/src/server.js +0 -1053
- package/dist/src/serviceFabric.js +0 -1066
- package/dist/src/ws.js +0 -2968
- /package/dist/src/{ipc.js → agent-roles.js} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { CapabilityId } from "./capability-id";
|
|
2
|
+
export declare const RIG_WORKFLOW_STARTED: "rig.workflow.started";
|
|
3
|
+
export declare const RIG_WORKFLOW_TARGET_SELECTED: "rig.workflow.target.selected";
|
|
4
|
+
export declare const RIG_WORKFLOW_TASK_SELECTED: "rig.workflow.task.selected";
|
|
5
|
+
export declare const RIG_WORKFLOW_STATUS_CHANGED: "rig.workflow.status.changed";
|
|
6
|
+
export declare const RIG_WORKFLOW_OPERATOR_NOTE: "rig.workflow.operator.note";
|
|
7
|
+
export declare const RIG_WORKFLOW_INBOX_REQUESTED: "rig.workflow.inbox.requested";
|
|
8
|
+
export declare const RIG_WORKFLOW_INBOX_RESOLVED: "rig.workflow.inbox.resolved";
|
|
9
|
+
export type RigWorkflowEntryType = typeof RIG_WORKFLOW_STARTED | typeof RIG_WORKFLOW_TARGET_SELECTED | typeof RIG_WORKFLOW_TASK_SELECTED | typeof RIG_WORKFLOW_STATUS_CHANGED | typeof RIG_WORKFLOW_OPERATOR_NOTE | typeof RIG_WORKFLOW_INBOX_REQUESTED | typeof RIG_WORKFLOW_INBOX_RESOLVED;
|
|
10
|
+
export type RigWorkflowTarget = "local" | "remote";
|
|
11
|
+
export type RigWorkflowOwner = {
|
|
12
|
+
githubUserId: string;
|
|
13
|
+
login: string;
|
|
14
|
+
namespaceKey: string;
|
|
15
|
+
};
|
|
16
|
+
export type RigWorkflowStarted = {
|
|
17
|
+
schemaVersion: 1;
|
|
18
|
+
workflowId: string;
|
|
19
|
+
target: RigWorkflowTarget;
|
|
20
|
+
selectedRepo: string;
|
|
21
|
+
owner: RigWorkflowOwner;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
};
|
|
24
|
+
export type RigWorkflowTargetSelected = {
|
|
25
|
+
schemaVersion: 1;
|
|
26
|
+
target: RigWorkflowTarget;
|
|
27
|
+
reason?: string;
|
|
28
|
+
selectedAt: string;
|
|
29
|
+
};
|
|
30
|
+
export type RigWorkflowTaskSelected = {
|
|
31
|
+
schemaVersion: 1;
|
|
32
|
+
taskId: string;
|
|
33
|
+
title?: string;
|
|
34
|
+
selectedAt: string;
|
|
35
|
+
};
|
|
36
|
+
export type RigWorkflowStatus = "starting" | "running" | "waiting-approval" | "waiting-input" | "completed" | "failed" | "stopped";
|
|
37
|
+
export type RigWorkflowStatusChanged = {
|
|
38
|
+
schemaVersion: 1;
|
|
39
|
+
status: RigWorkflowStatus;
|
|
40
|
+
detail?: string;
|
|
41
|
+
changedAt: string;
|
|
42
|
+
};
|
|
43
|
+
export type RigWorkflowOperatorNote = {
|
|
44
|
+
schemaVersion: 1;
|
|
45
|
+
noteId?: string;
|
|
46
|
+
note: string;
|
|
47
|
+
notedAt: string;
|
|
48
|
+
};
|
|
49
|
+
export type RigWorkflowStartedInput = Omit<RigWorkflowStarted, "schemaVersion" | "createdAt"> & {
|
|
50
|
+
createdAt?: string;
|
|
51
|
+
};
|
|
52
|
+
export type RigWorkflowTargetSelectedInput = Omit<RigWorkflowTargetSelected, "schemaVersion" | "selectedAt"> & {
|
|
53
|
+
selectedAt?: string;
|
|
54
|
+
};
|
|
55
|
+
export type RigWorkflowTaskSelectedInput = Omit<RigWorkflowTaskSelected, "schemaVersion" | "selectedAt"> & {
|
|
56
|
+
selectedAt?: string;
|
|
57
|
+
};
|
|
58
|
+
export type RigWorkflowStatusChangedInput = Omit<RigWorkflowStatusChanged, "schemaVersion" | "changedAt"> & {
|
|
59
|
+
changedAt?: string;
|
|
60
|
+
};
|
|
61
|
+
export type RigWorkflowOperatorNoteInput = Omit<RigWorkflowOperatorNote, "schemaVersion" | "notedAt"> & {
|
|
62
|
+
notedAt?: string;
|
|
63
|
+
};
|
|
64
|
+
/** Minimal writable session/custom-entry surface for workflow fact writers. */
|
|
65
|
+
export interface RigWorkflowEntryAppender {
|
|
66
|
+
appendEntry<T = unknown>(customType: string, data?: T): void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Owner-side workflow journal writer. Consumers pass an OMP/custom-entry appender
|
|
70
|
+
* and unversioned fact inputs; the owner mints wire entries and appends them.
|
|
71
|
+
*/
|
|
72
|
+
export interface RigWorkflowJournalWriterService {
|
|
73
|
+
appendStarted(appender: RigWorkflowEntryAppender, input: RigWorkflowStartedInput): void;
|
|
74
|
+
appendTargetSelected(appender: RigWorkflowEntryAppender, input: RigWorkflowTargetSelectedInput): void;
|
|
75
|
+
appendTaskSelected(appender: RigWorkflowEntryAppender, input: RigWorkflowTaskSelectedInput): void;
|
|
76
|
+
appendStatusChanged(appender: RigWorkflowEntryAppender, input: RigWorkflowStatusChangedInput): void;
|
|
77
|
+
appendOperatorNote(appender: RigWorkflowEntryAppender, input: RigWorkflowOperatorNoteInput): void;
|
|
78
|
+
}
|
|
79
|
+
export declare const RIG_WORKFLOW_JOURNAL_WRITER_CAPABILITY_ID = "rig.workflow.journal-writer";
|
|
80
|
+
export declare const RIG_WORKFLOW_JOURNAL_WRITER: CapabilityId<RigWorkflowJournalWriterService>;
|
|
81
|
+
export type RigWorkflowInboxRequested = {
|
|
82
|
+
schemaVersion: 1;
|
|
83
|
+
requestId: string;
|
|
84
|
+
kind: "approval" | "input";
|
|
85
|
+
title: string;
|
|
86
|
+
body?: string;
|
|
87
|
+
options?: readonly string[];
|
|
88
|
+
requestedAt: string;
|
|
89
|
+
};
|
|
90
|
+
export type RigWorkflowInboxResolved = {
|
|
91
|
+
schemaVersion: 1;
|
|
92
|
+
requestId: string;
|
|
93
|
+
decision: "approved" | "rejected" | "answered";
|
|
94
|
+
answer?: unknown;
|
|
95
|
+
resolvedAt: string;
|
|
96
|
+
};
|
|
97
|
+
export type RigWorkflowProjection = {
|
|
98
|
+
started: RigWorkflowStarted | null;
|
|
99
|
+
target: RigWorkflowTargetSelected | null;
|
|
100
|
+
task: RigWorkflowTaskSelected | null;
|
|
101
|
+
status: RigWorkflowStatusChanged | null;
|
|
102
|
+
notes: readonly RigWorkflowOperatorNote[];
|
|
103
|
+
inbox: readonly RigWorkflowInboxRequested[];
|
|
104
|
+
resolvedInbox: readonly RigWorkflowInboxResolved[];
|
|
105
|
+
updatedAt: string | null;
|
|
106
|
+
};
|
|
107
|
+
export type RigWorkflowCustomEntry = {
|
|
108
|
+
type: string;
|
|
109
|
+
customType?: string;
|
|
110
|
+
data?: unknown;
|
|
111
|
+
};
|
|
112
|
+
export type RigCollabWorkflowMarkerInput = {
|
|
113
|
+
sessionId: string;
|
|
114
|
+
sessionPath: string;
|
|
115
|
+
cwd: string;
|
|
116
|
+
title: string;
|
|
117
|
+
joinLink: string;
|
|
118
|
+
webLink: string;
|
|
119
|
+
relayUrl?: string;
|
|
120
|
+
selectedRepo?: string;
|
|
121
|
+
owner?: Partial<RigWorkflowOwner>;
|
|
122
|
+
startedAt: string;
|
|
123
|
+
updatedAt: string;
|
|
124
|
+
stale: boolean;
|
|
125
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// packages/contracts/src/workflow-journal.ts
|
|
8
|
+
var RIG_WORKFLOW_STARTED = "rig.workflow.started";
|
|
9
|
+
var RIG_WORKFLOW_TARGET_SELECTED = "rig.workflow.target.selected";
|
|
10
|
+
var RIG_WORKFLOW_TASK_SELECTED = "rig.workflow.task.selected";
|
|
11
|
+
var RIG_WORKFLOW_STATUS_CHANGED = "rig.workflow.status.changed";
|
|
12
|
+
var RIG_WORKFLOW_OPERATOR_NOTE = "rig.workflow.operator.note";
|
|
13
|
+
var RIG_WORKFLOW_INBOX_REQUESTED = "rig.workflow.inbox.requested";
|
|
14
|
+
var RIG_WORKFLOW_INBOX_RESOLVED = "rig.workflow.inbox.resolved";
|
|
15
|
+
var RIG_WORKFLOW_JOURNAL_WRITER_CAPABILITY_ID = "rig.workflow.journal-writer";
|
|
16
|
+
var RIG_WORKFLOW_JOURNAL_WRITER = makeCapabilityId(RIG_WORKFLOW_JOURNAL_WRITER_CAPABILITY_ID);
|
|
17
|
+
export {
|
|
18
|
+
RIG_WORKFLOW_TASK_SELECTED,
|
|
19
|
+
RIG_WORKFLOW_TARGET_SELECTED,
|
|
20
|
+
RIG_WORKFLOW_STATUS_CHANGED,
|
|
21
|
+
RIG_WORKFLOW_STARTED,
|
|
22
|
+
RIG_WORKFLOW_OPERATOR_NOTE,
|
|
23
|
+
RIG_WORKFLOW_JOURNAL_WRITER_CAPABILITY_ID,
|
|
24
|
+
RIG_WORKFLOW_JOURNAL_WRITER,
|
|
25
|
+
RIG_WORKFLOW_INBOX_RESOLVED,
|
|
26
|
+
RIG_WORKFLOW_INBOX_REQUESTED
|
|
27
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CapabilityId } from "./capability-id";
|
|
2
|
+
export type EnsureDeclarativeConfigInput = {
|
|
3
|
+
readonly projectRoot: string;
|
|
4
|
+
readonly repoSlug?: string;
|
|
5
|
+
};
|
|
6
|
+
export type EnsureDeclarativeConfigResult = {
|
|
7
|
+
/** True when this call wrote a new `.rig/rigfig.toml`. */
|
|
8
|
+
readonly created: boolean;
|
|
9
|
+
/** The rigfig path when one now exists (created or pre-existing), else null. */
|
|
10
|
+
readonly path: string | null;
|
|
11
|
+
/** Why nothing was created (code config present, no plugin produced a config, …). */
|
|
12
|
+
readonly reason?: string;
|
|
13
|
+
};
|
|
14
|
+
export interface WorkspaceConfigEnsureService {
|
|
15
|
+
ensureDeclarativeConfig(input: EnsureDeclarativeConfigInput): EnsureDeclarativeConfigResult;
|
|
16
|
+
}
|
|
17
|
+
export declare const WORKSPACE_CONFIG_ENSURE_CAPABILITY_ID = "workspace.config.ensure";
|
|
18
|
+
export declare const WORKSPACE_CONFIG_ENSURE: CapabilityId<WorkspaceConfigEnsureService>;
|
|
@@ -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/workspace-config.ts
|
|
8
|
+
var WORKSPACE_CONFIG_ENSURE_CAPABILITY_ID = "workspace.config.ensure";
|
|
9
|
+
var WORKSPACE_CONFIG_ENSURE = makeCapabilityId(WORKSPACE_CONFIG_ENSURE_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
WORKSPACE_CONFIG_ENSURE_CAPABILITY_ID,
|
|
12
|
+
WORKSPACE_CONFIG_ENSURE
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Typed workspace-domain service seam owned by @rig/workspace-plugin. */
|
|
2
|
+
import type { CapabilityId } from "./capability-id";
|
|
3
|
+
export interface WorkspaceServiceFabricMutationInput {
|
|
4
|
+
readonly projectRoot: string;
|
|
5
|
+
readonly command: "up" | "verify" | "down";
|
|
6
|
+
readonly services?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export interface WorkspaceService {
|
|
9
|
+
readonly readSummary: (projectRoot: string) => Promise<unknown>;
|
|
10
|
+
readonly readTopology: (projectRoot: string) => unknown;
|
|
11
|
+
readonly readRemoteFleet: (projectRoot: string) => unknown;
|
|
12
|
+
readonly readServiceFabric: (projectRoot: string) => Promise<unknown>;
|
|
13
|
+
readonly mutateServiceFabric: (input: WorkspaceServiceFabricMutationInput) => Promise<unknown>;
|
|
14
|
+
}
|
|
15
|
+
export declare const WORKSPACE_SERVICE_CAPABILITY_ID = "rig.workspace.service";
|
|
16
|
+
export declare const WORKSPACE_SERVICE: CapabilityId<WorkspaceService>;
|
|
@@ -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/workspace-service.ts
|
|
8
|
+
var WORKSPACE_SERVICE_CAPABILITY_ID = "rig.workspace.service";
|
|
9
|
+
var WORKSPACE_SERVICE = makeCapabilityId(WORKSPACE_SERVICE_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
WORKSPACE_SERVICE_CAPABILITY_ID,
|
|
12
|
+
WORKSPACE_SERVICE
|
|
13
|
+
};
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const WorkspaceSourceKind: Schema.Literals<readonly ["native", "rig-import", "manual", "remote"]>;
|
|
3
|
+
export type WorkspaceSourceKind = typeof WorkspaceSourceKind.Type;
|
|
4
|
+
export declare const WorkspaceTopologyStatus: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
|
|
5
|
+
export type WorkspaceTopologyStatus = typeof WorkspaceTopologyStatus.Type;
|
|
6
|
+
export declare const WorkspaceRemoteFleetStatus: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
|
|
7
|
+
export type WorkspaceRemoteFleetStatus = typeof WorkspaceRemoteFleetStatus.Type;
|
|
8
|
+
export declare const WorkspaceServiceFabricStatus: Schema.Literals<readonly ["empty", "booting", "ready", "degraded", "stopped"]>;
|
|
9
|
+
export type WorkspaceServiceFabricStatus = typeof WorkspaceServiceFabricStatus.Type;
|
|
10
|
+
export declare const WorkspaceRemoteHostStatus: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
|
|
11
|
+
export type WorkspaceRemoteHostStatus = typeof WorkspaceRemoteHostStatus.Type;
|
|
12
|
+
export declare const WorkspaceTopologyServiceSummary: Schema.Struct<{
|
|
13
|
+
readonly name: Schema.Trim;
|
|
14
|
+
readonly relativeRootPath: Schema.Trim;
|
|
15
|
+
readonly runtime: Schema.Trim;
|
|
16
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
17
|
+
readonly healthcheck: Schema.NullOr<Schema.Trim>;
|
|
18
|
+
readonly sourceOfTruth: Schema.Struct<{
|
|
19
|
+
readonly code: Schema.NullOr<Schema.Trim>;
|
|
20
|
+
readonly tests: Schema.NullOr<Schema.Trim>;
|
|
21
|
+
readonly infra: Schema.NullOr<Schema.Trim>;
|
|
22
|
+
readonly deploy: Schema.NullOr<Schema.Trim>;
|
|
23
|
+
readonly dependencies: Schema.NullOr<Schema.Trim>;
|
|
24
|
+
}>;
|
|
25
|
+
readonly splitReadyChecklist: Schema.$Array<Schema.Trim>;
|
|
26
|
+
}>;
|
|
27
|
+
export type WorkspaceTopologyServiceSummary = typeof WorkspaceTopologyServiceSummary.Type;
|
|
28
|
+
export declare const WorkspaceTopologySummary: Schema.Struct<{
|
|
29
|
+
readonly compiledAt: Schema.String;
|
|
30
|
+
readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
|
|
31
|
+
readonly manifestCount: Schema.Number;
|
|
32
|
+
readonly serviceCount: Schema.Number;
|
|
33
|
+
readonly services: Schema.$Array<Schema.Struct<{
|
|
34
|
+
readonly name: Schema.Trim;
|
|
35
|
+
readonly relativeRootPath: Schema.Trim;
|
|
36
|
+
readonly runtime: Schema.Trim;
|
|
37
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
38
|
+
readonly healthcheck: Schema.NullOr<Schema.Trim>;
|
|
39
|
+
readonly sourceOfTruth: Schema.Struct<{
|
|
40
|
+
readonly code: Schema.NullOr<Schema.Trim>;
|
|
41
|
+
readonly tests: Schema.NullOr<Schema.Trim>;
|
|
42
|
+
readonly infra: Schema.NullOr<Schema.Trim>;
|
|
43
|
+
readonly deploy: Schema.NullOr<Schema.Trim>;
|
|
44
|
+
readonly dependencies: Schema.NullOr<Schema.Trim>;
|
|
45
|
+
}>;
|
|
46
|
+
readonly splitReadyChecklist: Schema.$Array<Schema.Trim>;
|
|
47
|
+
}>>;
|
|
48
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
49
|
+
}>;
|
|
50
|
+
export type WorkspaceTopologySummary = typeof WorkspaceTopologySummary.Type;
|
|
51
|
+
export declare const WorkspaceRemoteHostSummary: Schema.Struct<{
|
|
52
|
+
readonly id: Schema.Trim;
|
|
53
|
+
readonly name: Schema.Trim;
|
|
54
|
+
readonly baseUrl: Schema.Trim;
|
|
55
|
+
readonly workspacePath: Schema.NullOr<Schema.Trim>;
|
|
56
|
+
readonly transport: Schema.Trim;
|
|
57
|
+
readonly hostname: Schema.NullOr<Schema.Trim>;
|
|
58
|
+
readonly region: Schema.NullOr<Schema.Trim>;
|
|
59
|
+
readonly labels: Schema.$Array<Schema.Trim>;
|
|
60
|
+
readonly capabilities: Schema.$Array<Schema.Trim>;
|
|
61
|
+
readonly runtimeAdapters: Schema.$Array<Schema.Literal<"pi">>;
|
|
62
|
+
readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
|
|
63
|
+
readonly currentLeaseCount: Schema.Number;
|
|
64
|
+
readonly lastHeartbeatAt: Schema.NullOr<Schema.String>;
|
|
65
|
+
readonly registeredAt: Schema.String;
|
|
66
|
+
readonly manifestPath: Schema.Trim;
|
|
67
|
+
}>;
|
|
68
|
+
export type WorkspaceRemoteHostSummary = typeof WorkspaceRemoteHostSummary.Type;
|
|
69
|
+
export declare const WorkspaceRemoteFleetSummary: Schema.Struct<{
|
|
70
|
+
readonly updatedAt: Schema.String;
|
|
71
|
+
readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
|
|
72
|
+
readonly manifestCount: Schema.Number;
|
|
73
|
+
readonly hostCount: Schema.Number;
|
|
74
|
+
readonly onlineHostCount: Schema.Number;
|
|
75
|
+
readonly hosts: Schema.$Array<Schema.Struct<{
|
|
76
|
+
readonly id: Schema.Trim;
|
|
77
|
+
readonly name: Schema.Trim;
|
|
78
|
+
readonly baseUrl: Schema.Trim;
|
|
79
|
+
readonly workspacePath: Schema.NullOr<Schema.Trim>;
|
|
80
|
+
readonly transport: Schema.Trim;
|
|
81
|
+
readonly hostname: Schema.NullOr<Schema.Trim>;
|
|
82
|
+
readonly region: Schema.NullOr<Schema.Trim>;
|
|
83
|
+
readonly labels: Schema.$Array<Schema.Trim>;
|
|
84
|
+
readonly capabilities: Schema.$Array<Schema.Trim>;
|
|
85
|
+
readonly runtimeAdapters: Schema.$Array<Schema.Literal<"pi">>;
|
|
86
|
+
readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
|
|
87
|
+
readonly currentLeaseCount: Schema.Number;
|
|
88
|
+
readonly lastHeartbeatAt: Schema.NullOr<Schema.String>;
|
|
89
|
+
readonly registeredAt: Schema.String;
|
|
90
|
+
readonly manifestPath: Schema.Trim;
|
|
91
|
+
}>>;
|
|
92
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
93
|
+
}>;
|
|
94
|
+
export type WorkspaceRemoteFleetSummary = typeof WorkspaceRemoteFleetSummary.Type;
|
|
95
|
+
export declare const WorkspaceServiceFabricServiceSummary: Schema.Struct<{
|
|
96
|
+
readonly name: Schema.Trim;
|
|
97
|
+
readonly relativeRootPath: Schema.Trim;
|
|
98
|
+
readonly mode: Schema.Literals<readonly ["stub", "process"]>;
|
|
99
|
+
readonly port: Schema.Number;
|
|
100
|
+
readonly healthcheck: Schema.Trim;
|
|
101
|
+
readonly routePrefix: Schema.NullOr<Schema.Trim>;
|
|
102
|
+
readonly status: Schema.Literals<readonly ["planned", "booting", "healthy", "degraded", "failed", "stopped"]>;
|
|
103
|
+
readonly pid: Schema.NullOr<Schema.Number>;
|
|
104
|
+
readonly logPath: Schema.NullOr<Schema.Trim>;
|
|
105
|
+
}>;
|
|
106
|
+
export type WorkspaceServiceFabricServiceSummary = typeof WorkspaceServiceFabricServiceSummary.Type;
|
|
107
|
+
export declare const WorkspaceServiceFabricSummary: Schema.Struct<{
|
|
108
|
+
readonly updatedAt: Schema.String;
|
|
109
|
+
readonly status: Schema.Literals<readonly ["empty", "booting", "ready", "degraded", "stopped"]>;
|
|
110
|
+
readonly serviceCount: Schema.Number;
|
|
111
|
+
readonly healthyServiceCount: Schema.Number;
|
|
112
|
+
readonly stateDir: Schema.Trim;
|
|
113
|
+
readonly services: Schema.$Array<Schema.Struct<{
|
|
114
|
+
readonly name: Schema.Trim;
|
|
115
|
+
readonly relativeRootPath: Schema.Trim;
|
|
116
|
+
readonly mode: Schema.Literals<readonly ["stub", "process"]>;
|
|
117
|
+
readonly port: Schema.Number;
|
|
118
|
+
readonly healthcheck: Schema.Trim;
|
|
119
|
+
readonly routePrefix: Schema.NullOr<Schema.Trim>;
|
|
120
|
+
readonly status: Schema.Literals<readonly ["planned", "booting", "healthy", "degraded", "failed", "stopped"]>;
|
|
121
|
+
readonly pid: Schema.NullOr<Schema.Number>;
|
|
122
|
+
readonly logPath: Schema.NullOr<Schema.Trim>;
|
|
123
|
+
}>>;
|
|
124
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
125
|
+
}>;
|
|
126
|
+
export type WorkspaceServiceFabricSummary = typeof WorkspaceServiceFabricSummary.Type;
|
|
127
|
+
export declare const WorkspaceSummary: Schema.Struct<{
|
|
128
|
+
readonly id: Schema.brand<Schema.Trim, "WorkspaceId">;
|
|
129
|
+
readonly title: Schema.Trim;
|
|
130
|
+
readonly rootPath: Schema.Trim;
|
|
131
|
+
readonly sourceKind: Schema.Literals<readonly ["native", "rig-import", "manual", "remote"]>;
|
|
132
|
+
readonly defaultRuntimeAdapter: Schema.optional<Schema.Literal<"pi">>;
|
|
133
|
+
readonly defaultProvider: Schema.optional<Schema.Literals<readonly ["codex", "claude"]>>;
|
|
134
|
+
readonly defaultModel: Schema.NullOr<Schema.Trim>;
|
|
135
|
+
readonly topology: Schema.optional<Schema.Struct<{
|
|
136
|
+
readonly compiledAt: Schema.String;
|
|
137
|
+
readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
|
|
138
|
+
readonly manifestCount: Schema.Number;
|
|
139
|
+
readonly serviceCount: Schema.Number;
|
|
140
|
+
readonly services: Schema.$Array<Schema.Struct<{
|
|
141
|
+
readonly name: Schema.Trim;
|
|
142
|
+
readonly relativeRootPath: Schema.Trim;
|
|
143
|
+
readonly runtime: Schema.Trim;
|
|
144
|
+
readonly port: Schema.NullOr<Schema.Number>;
|
|
145
|
+
readonly healthcheck: Schema.NullOr<Schema.Trim>;
|
|
146
|
+
readonly sourceOfTruth: Schema.Struct<{
|
|
147
|
+
readonly code: Schema.NullOr<Schema.Trim>;
|
|
148
|
+
readonly tests: Schema.NullOr<Schema.Trim>;
|
|
149
|
+
readonly infra: Schema.NullOr<Schema.Trim>;
|
|
150
|
+
readonly deploy: Schema.NullOr<Schema.Trim>;
|
|
151
|
+
readonly dependencies: Schema.NullOr<Schema.Trim>;
|
|
152
|
+
}>;
|
|
153
|
+
readonly splitReadyChecklist: Schema.$Array<Schema.Trim>;
|
|
154
|
+
}>>;
|
|
155
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
156
|
+
}>>;
|
|
157
|
+
readonly remoteFleet: Schema.optional<Schema.Struct<{
|
|
158
|
+
readonly updatedAt: Schema.String;
|
|
159
|
+
readonly status: Schema.Literals<readonly ["empty", "ready", "degraded"]>;
|
|
160
|
+
readonly manifestCount: Schema.Number;
|
|
161
|
+
readonly hostCount: Schema.Number;
|
|
162
|
+
readonly onlineHostCount: Schema.Number;
|
|
163
|
+
readonly hosts: Schema.$Array<Schema.Struct<{
|
|
164
|
+
readonly id: Schema.Trim;
|
|
165
|
+
readonly name: Schema.Trim;
|
|
166
|
+
readonly baseUrl: Schema.Trim;
|
|
167
|
+
readonly workspacePath: Schema.NullOr<Schema.Trim>;
|
|
168
|
+
readonly transport: Schema.Trim;
|
|
169
|
+
readonly hostname: Schema.NullOr<Schema.Trim>;
|
|
170
|
+
readonly region: Schema.NullOr<Schema.Trim>;
|
|
171
|
+
readonly labels: Schema.$Array<Schema.Trim>;
|
|
172
|
+
readonly capabilities: Schema.$Array<Schema.Trim>;
|
|
173
|
+
readonly runtimeAdapters: Schema.$Array<Schema.Literal<"pi">>;
|
|
174
|
+
readonly status: Schema.Literals<readonly ["registering", "ready", "busy", "degraded", "draining", "offline", "quarantined"]>;
|
|
175
|
+
readonly currentLeaseCount: Schema.Number;
|
|
176
|
+
readonly lastHeartbeatAt: Schema.NullOr<Schema.String>;
|
|
177
|
+
readonly registeredAt: Schema.String;
|
|
178
|
+
readonly manifestPath: Schema.Trim;
|
|
179
|
+
}>>;
|
|
180
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
181
|
+
}>>;
|
|
182
|
+
readonly serviceFabric: Schema.optional<Schema.Struct<{
|
|
183
|
+
readonly updatedAt: Schema.String;
|
|
184
|
+
readonly status: Schema.Literals<readonly ["empty", "booting", "ready", "degraded", "stopped"]>;
|
|
185
|
+
readonly serviceCount: Schema.Number;
|
|
186
|
+
readonly healthyServiceCount: Schema.Number;
|
|
187
|
+
readonly stateDir: Schema.Trim;
|
|
188
|
+
readonly services: Schema.$Array<Schema.Struct<{
|
|
189
|
+
readonly name: Schema.Trim;
|
|
190
|
+
readonly relativeRootPath: Schema.Trim;
|
|
191
|
+
readonly mode: Schema.Literals<readonly ["stub", "process"]>;
|
|
192
|
+
readonly port: Schema.Number;
|
|
193
|
+
readonly healthcheck: Schema.Trim;
|
|
194
|
+
readonly routePrefix: Schema.NullOr<Schema.Trim>;
|
|
195
|
+
readonly status: Schema.Literals<readonly ["planned", "booting", "healthy", "degraded", "failed", "stopped"]>;
|
|
196
|
+
readonly pid: Schema.NullOr<Schema.Number>;
|
|
197
|
+
readonly logPath: Schema.NullOr<Schema.Trim>;
|
|
198
|
+
}>>;
|
|
199
|
+
readonly warnings: Schema.$Array<Schema.String>;
|
|
200
|
+
}>>;
|
|
201
|
+
readonly createdAt: Schema.String;
|
|
202
|
+
readonly updatedAt: Schema.String;
|
|
203
|
+
}>;
|
|
204
|
+
export type WorkspaceSummary = typeof WorkspaceSummary.Type;
|