@h-rig/contracts 0.0.6-alpha.157 → 0.0.6-alpha.159
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 +2340 -6832
- package/dist/index.mjs +2116 -6608
- package/dist/src/agent-roles.d.ts +8 -0
- package/dist/src/browser.d.ts +34 -4
- package/dist/src/browser.js +8 -1
- package/dist/src/capability-id.d.ts +22 -0
- package/dist/src/capability-id.js +8 -0
- package/dist/src/cli-output.d.ts +24 -0
- package/dist/src/cli-runner.d.ts +43 -0
- package/dist/src/cli-runner.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 +11 -0
- package/dist/src/config.js +279 -1098
- package/dist/src/control-plane-types.d.ts +41 -1
- package/dist/src/control-plane-types.js +9 -25
- package/dist/src/dependency-preflight.d.ts +43 -0
- package/dist/src/dependency-preflight.js +13 -0
- package/dist/src/doctor.d.ts +67 -4
- package/dist/src/doctor.js +8 -9
- package/dist/src/errors.d.ts +13 -0
- package/dist/src/errors.js +17 -0
- package/dist/src/github.d.ts +43 -0
- package/dist/src/github.js +12 -1
- package/dist/src/graph.d.ts +37 -0
- package/dist/src/graph.js +13 -0
- package/dist/src/guard.d.ts +111 -0
- package/dist/src/guard.js +6 -0
- package/dist/src/harness-events.d.ts +8 -0
- package/dist/src/harness-events.js +1 -0
- package/dist/src/help-catalog.d.ts +17 -10
- package/dist/src/help-catalog.js +9 -651
- 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 +27 -7
- package/dist/src/index.js +2116 -6608
- package/dist/src/isolation.d.ts +207 -15
- package/dist/src/isolation.js +8 -1
- package/dist/src/kernel.d.ts +11 -0
- package/dist/src/kernel.js +7 -0
- package/dist/src/layout.d.ts +49 -0
- package/dist/src/layout.js +10 -0
- package/dist/src/lifecycle-capabilities.d.ts +99 -0
- package/dist/src/lifecycle-capabilities.js +18 -1
- package/dist/src/managed-repos.d.ts +79 -16
- package/dist/src/managed-repos.js +12 -1
- package/dist/src/memory.d.ts +52 -4
- package/dist/src/memory.js +8 -1
- package/dist/src/notify.d.ts +46 -0
- package/dist/src/notify.js +13 -0
- package/dist/src/orchestration.d.ts +0 -3652
- package/dist/src/orchestration.js +28 -964
- package/dist/src/plugin-hooks.js +22 -3
- package/dist/src/plugin.d.ts +47 -0
- package/dist/src/plugin.js +24 -3
- package/dist/src/prompt.d.ts +29 -0
- package/dist/src/prompt.js +13 -0
- package/dist/src/provider-instructions.d.ts +26 -4
- package/dist/src/provider-instructions.js +8 -1
- package/dist/src/provider.js +1 -824
- package/dist/src/remote.d.ts +0 -8
- package/dist/src/remote.js +229 -1075
- package/dist/src/run-discovery.d.ts +79 -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 +0 -236
- package/dist/src/run-journal.js +249 -1321
- package/dist/src/run-read-model.d.ts +234 -0
- package/dist/src/run-read-model.js +13 -0
- package/dist/src/run-record.d.ts +0 -11
- package/dist/src/run-record.js +0 -16
- 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 +1 -25
- package/dist/src/run-session-journal.js +0 -1731
- package/dist/src/run-status.d.ts +0 -2
- package/dist/src/run-status.js +0 -11
- package/dist/src/run-timeline.d.ts +0 -3
- package/dist/src/run-timeline.js +0 -1498
- package/dist/src/runtime-task-context.d.ts +82 -0
- package/dist/src/runtime-task-context.js +1 -0
- package/dist/src/runtime.js +66 -904
- package/dist/src/session-asset-materializer.d.ts +35 -0
- package/dist/src/session-asset-materializer.js +13 -0
- package/dist/src/setup.d.ts +47 -0
- package/dist/src/setup.js +13 -0
- package/dist/src/supervisor-journal.js +117 -955
- package/dist/src/task-data.d.ts +239 -0
- package/dist/src/task-data.js +13 -0
- package/dist/src/task-graph-primitives.d.ts +0 -21
- package/dist/src/task-graph-primitives.js +0 -318
- package/dist/src/task-source.d.ts +65 -0
- package/dist/src/task-source.js +12 -0
- package/dist/src/task-state-metadata.d.ts +21 -0
- package/dist/src/task-state-metadata.js +1 -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/workflow-journal.d.ts +0 -32
- package/dist/src/workflow-journal.js +0 -371
- package/dist/src/workspace-config.d.ts +18 -0
- package/dist/src/workspace-config.js +13 -0
- package/dist/src/workspace.js +73 -911
- package/package.json +1 -1
- package/dist/src/engine.d.ts +0 -2789
- package/dist/src/engine.js +0 -2392
- package/dist/src/ipc.d.ts +0 -248
- package/dist/src/providerRuntime.d.ts +0 -3949
- package/dist/src/providerRuntime.js +0 -1633
- package/dist/src/rig.d.ts +0 -783
- package/dist/src/rig.js +0 -2537
- package/dist/src/server.d.ts +0 -106
- package/dist/src/server.js +0 -1056
- package/dist/src/serviceFabric.d.ts +0 -62
- package/dist/src/serviceFabric.js +0 -1069
- package/dist/src/ws.d.ts +0 -747
- package/dist/src/ws.js +0 -3126
- /package/dist/src/{ipc.js → agent-roles.js} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cap:host-run — the OMP run-host seam.
|
|
3
|
+
*
|
|
4
|
+
* `@rig/rig-host` is reclassified MOSTLY floor-neutral-exec (its generic
|
|
5
|
+
* session/pty/protocol/workspace launch plumbing is product-agnostic). The
|
|
6
|
+
* OMP-SPECIFIC runner (provision an isolated workspace + spawn the PTY-hosted
|
|
7
|
+
* OMP run process) is NOT baked into the floor — it is contributed as a host
|
|
8
|
+
* plugin capability under this id. Consumers (a dispatch surface) resolve this
|
|
9
|
+
* capability off the host instead of importing the runner impl.
|
|
10
|
+
*
|
|
11
|
+
* This file holds ONLY the pure seam vocabulary — no IO, no runner deps (those
|
|
12
|
+
* belong to the impl in `@rig/rig-host`, never to the cross-package seam).
|
|
13
|
+
*/
|
|
14
|
+
import type { CapabilityId } from "./capability-id";
|
|
15
|
+
/** Capability id the OMP run-host plugin registers its runner under. */
|
|
16
|
+
export declare const HOST_RUN_CAPABILITY_ID = "cap:host-run";
|
|
17
|
+
/** Pure input describing the run to host. */
|
|
18
|
+
export type HostRunProcessInput = {
|
|
19
|
+
readonly projectRoot?: string;
|
|
20
|
+
readonly taskId: string;
|
|
21
|
+
/** Dispatch/worktree handle (historical external name); not the OMP session id. */
|
|
22
|
+
readonly runId?: string;
|
|
23
|
+
readonly title?: string | null;
|
|
24
|
+
readonly model?: string | null;
|
|
25
|
+
readonly prompt?: string | null;
|
|
26
|
+
readonly forceSteerOnce?: boolean;
|
|
27
|
+
/** Optional sink for the bootstrap launcher's stdout. */
|
|
28
|
+
readonly writeStdout?: (text: string) => void;
|
|
29
|
+
};
|
|
30
|
+
/** Pure summary of a hosted run bootstrap (impl-internal runtime handle omitted). */
|
|
31
|
+
export type HostRunProcessResult = {
|
|
32
|
+
readonly dispatchHandle: string;
|
|
33
|
+
readonly pid: number;
|
|
34
|
+
readonly sessionName: string;
|
|
35
|
+
};
|
|
36
|
+
/** The cohesive run-host operation a dispatch surface depends on. Async (does IO). */
|
|
37
|
+
export interface HostRunService {
|
|
38
|
+
runHostProcess(input: HostRunProcessInput): Promise<HostRunProcessResult>;
|
|
39
|
+
}
|
|
40
|
+
/** Typed capability id; string value is {@link HOST_RUN_CAPABILITY_ID}. */
|
|
41
|
+
export declare const HOST_RUN: CapabilityId<HostRunService>;
|
package/dist/src/host.js
ADDED
|
@@ -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/host.ts
|
|
8
|
+
var HOST_RUN_CAPABILITY_ID = "cap:host-run";
|
|
9
|
+
var HOST_RUN = makeCapabilityId(HOST_RUN_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
HOST_RUN_CAPABILITY_ID,
|
|
12
|
+
HOST_RUN
|
|
13
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* identity.ts — pure structural vocabulary for Rig run identity resolution.
|
|
3
|
+
*
|
|
4
|
+
* The identity resolver implementation (`resolveRigIdentity` /
|
|
5
|
+
* `resolveRigIdentityFilter`) is the GitHub provider's SCM-identity domain and
|
|
6
|
+
* is exposed through the `RUN_IDENTITY_ENV` capability. Only the structural
|
|
7
|
+
* TYPES the resolver reads/returns live here, so any consumer can name the
|
|
8
|
+
* shapes without importing a plugin.
|
|
9
|
+
*
|
|
10
|
+
* The session-manager / auth-storage shapes are deliberately minimal
|
|
11
|
+
* (read-only, structural) so they stay decoupled from the concrete OMP
|
|
12
|
+
* session-manager class — exactly the slice the identity resolver needs.
|
|
13
|
+
*/
|
|
14
|
+
import type { RigWorkflowOwner } from "./workflow-journal";
|
|
15
|
+
/** Read-only slice of an OMP session manager the identity resolver reads. */
|
|
16
|
+
export type ReadonlySessionIdentityManager = {
|
|
17
|
+
getCwd(): string;
|
|
18
|
+
getSessionId(): string;
|
|
19
|
+
getBranch(): readonly {
|
|
20
|
+
type: string;
|
|
21
|
+
customType?: string;
|
|
22
|
+
data?: unknown;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
/** Read-only slice of OMP auth storage the identity resolver probes for github-copilot identity. */
|
|
26
|
+
export type OmpAuthStorage = {
|
|
27
|
+
getOAuthAccountIdentity?: (provider: string, sessionId?: string) => unknown;
|
|
28
|
+
};
|
|
29
|
+
/** The structural context the Rig identity resolver reads to derive run owner identity. */
|
|
30
|
+
export type RigIdentityContext = {
|
|
31
|
+
sessionManager: ReadonlySessionIdentityManager;
|
|
32
|
+
modelRegistry?: {
|
|
33
|
+
authStorage?: OmpAuthStorage;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/** A resolved Rig run identity: the selected repo and its github-derived owner. */
|
|
37
|
+
export type RigIdentity = {
|
|
38
|
+
selectedRepo: string;
|
|
39
|
+
owner: RigWorkflowOwner;
|
|
40
|
+
};
|
|
41
|
+
/** A `RigIdentity` annotated with the `+`-joined provenance of the inputs that produced it. */
|
|
42
|
+
export type RigResolvedIdentity = RigIdentity & {
|
|
43
|
+
source: string;
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,31 +9,34 @@ export * from "./workflow-journal";
|
|
|
9
9
|
export * from "./run-timeline";
|
|
10
10
|
export * from "./run-record";
|
|
11
11
|
export * from "./run-status";
|
|
12
|
+
export * from "./run-read-model";
|
|
12
13
|
export * from "./conversation";
|
|
13
14
|
export * from "./plugin";
|
|
15
|
+
export * from "./agent-roles";
|
|
14
16
|
export * from "./plugin-hooks";
|
|
15
17
|
export * from "./config";
|
|
16
18
|
export * from "./policy";
|
|
19
|
+
export * from "./guard";
|
|
20
|
+
export * from "./tool-registry";
|
|
17
21
|
export * from "./validation";
|
|
18
22
|
export * from "./review";
|
|
19
23
|
export * from "./artifact";
|
|
20
|
-
export * from "./engine";
|
|
21
|
-
export * from "./rig";
|
|
22
24
|
export * from "./remote";
|
|
23
|
-
export * from "./ipc";
|
|
24
25
|
export * from "./terminal";
|
|
25
26
|
export * from "./provider";
|
|
26
|
-
export * from "./providerRuntime";
|
|
27
27
|
export * from "./model";
|
|
28
|
-
export * from "./ws";
|
|
29
28
|
export * from "./keybindings";
|
|
30
|
-
export * from "./server";
|
|
31
|
-
export * from "./serviceFabric";
|
|
32
29
|
export * from "./git";
|
|
33
30
|
export * from "./orchestration";
|
|
34
31
|
export * from "./editor";
|
|
35
32
|
export * from "./project";
|
|
33
|
+
export * from "./setup";
|
|
34
|
+
export * from "./host";
|
|
35
|
+
export * from "./run-identity";
|
|
36
|
+
export * from "./prompt";
|
|
36
37
|
export * from "./task-source";
|
|
38
|
+
export * from "./task-state-metadata";
|
|
39
|
+
export * from "./task-data";
|
|
37
40
|
export * from "./cli-output";
|
|
38
41
|
export * from "./pi-session";
|
|
39
42
|
export * from "./protocol-version";
|
|
@@ -46,12 +49,29 @@ export * from "./drift";
|
|
|
46
49
|
export * from "./rollups";
|
|
47
50
|
export * from "./panel-protocol";
|
|
48
51
|
export * from "./control-plane-types";
|
|
52
|
+
export * from "./capability-id";
|
|
53
|
+
export * from "./dependency-preflight";
|
|
54
|
+
export * from "./workspace-config";
|
|
55
|
+
export * from "./runtime-task-context";
|
|
56
|
+
export * from "./layout";
|
|
57
|
+
export * from "./errors";
|
|
58
|
+
export * from "./harness-events";
|
|
49
59
|
export * from "./lifecycle-capabilities";
|
|
50
60
|
export * from "./browser";
|
|
51
61
|
export * from "./memory";
|
|
62
|
+
export * from "./notify";
|
|
63
|
+
export * from "./collab-session-viewer";
|
|
52
64
|
export * from "./provider-instructions";
|
|
65
|
+
export * from "./session-asset-materializer";
|
|
53
66
|
export * from "./isolation";
|
|
54
67
|
export * from "./managed-repos";
|
|
55
68
|
export * from "./task-graph-primitives";
|
|
56
69
|
export * from "./github";
|
|
57
70
|
export * from "./doctor";
|
|
71
|
+
export * from "./run-dispatch";
|
|
72
|
+
export * from "./identity";
|
|
73
|
+
export * from "./run-discovery";
|
|
74
|
+
export * from "./run-registry-backbone";
|
|
75
|
+
export * from "./tool-materializer";
|
|
76
|
+
export * from "./toolchain-sources";
|
|
77
|
+
export * from "./cli-runner";
|