@h-rig/contracts 0.0.6-alpha.156 → 0.0.6-alpha.158
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,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure session-asset-materializer contract.
|
|
3
|
+
*
|
|
4
|
+
* Neutral home for the "materialize plugin-contributed session assets into the
|
|
5
|
+
* workspace" seam so the plugin-host assembler (@rig/core/plugin-host-context)
|
|
6
|
+
* can trigger Pi skill + package materialization without importing
|
|
7
|
+
* @rig/provider-plugin (a floor->plugin cycle). The provider plugin owns the
|
|
8
|
+
* concrete impl (it knows the `.pi/skills` + `.pi/settings.json` layout) and
|
|
9
|
+
* registers it under {@link SESSION_ASSET_MATERIALIZER}; the assembler resolves
|
|
10
|
+
* it by id off the project plugin host and calls it. When no provider plugin is
|
|
11
|
+
* loaded the capability is simply absent and materialization is skipped — the
|
|
12
|
+
* same non-fatal default the inline implementation had.
|
|
13
|
+
*
|
|
14
|
+
* Carries no behaviour and imports only sibling contract types.
|
|
15
|
+
*/
|
|
16
|
+
import type { CapabilityId } from "./capability-id";
|
|
17
|
+
import type { RigConfig } from "./config";
|
|
18
|
+
/** Capability id the provider plugin registers its session-asset materializer under. */
|
|
19
|
+
export declare const SESSION_ASSET_MATERIALIZER_CAPABILITY_ID = "provider.session-asset-materializer";
|
|
20
|
+
/**
|
|
21
|
+
* Materializes the plugin-contributed session assets (Pi skills declared via
|
|
22
|
+
* `contributes.skills`, and the config-declared Pi extension packages in
|
|
23
|
+
* `runtime.pi.packages`) into the project workspace. Idempotent and non-fatal:
|
|
24
|
+
* implementations log-and-continue on individual write failures so a
|
|
25
|
+
* materialization error can never deadlock harness boot.
|
|
26
|
+
*/
|
|
27
|
+
export interface SessionAssetMaterializerService {
|
|
28
|
+
materializeSessionAssets(projectRoot: string, config: RigConfig): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Typed capability id the provider plugin provides and the plugin-host assembler
|
|
32
|
+
* requires. Phantom-typed with `SessionAssetMaterializerService` so `resolve(host)`
|
|
33
|
+
* returns the service with no cast leaking to callers.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SESSION_ASSET_MATERIALIZER: CapabilityId<SessionAssetMaterializerService>;
|
|
@@ -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/session-asset-materializer.ts
|
|
8
|
+
var SESSION_ASSET_MATERIALIZER_CAPABILITY_ID = "provider.session-asset-materializer";
|
|
9
|
+
var SESSION_ASSET_MATERIALIZER = makeCapabilityId(SESSION_ASSET_MATERIALIZER_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
SESSION_ASSET_MATERIALIZER_CAPABILITY_ID,
|
|
12
|
+
SESSION_ASSET_MATERIALIZER
|
|
13
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cap:project-setup — cross-plugin seam.
|
|
3
|
+
*
|
|
4
|
+
* `@rig/cli-surface-plugin` (the `rig setup`/onboarding surface) runs project
|
|
5
|
+
* setup WITHOUT importing `@rig/init-plugin`: it requires this capability by id
|
|
6
|
+
* off the host. `@rig/init-plugin` OWNS the impl (`runSetup`) and registers it
|
|
7
|
+
* under this id. This file holds ONLY the pure seam vocabulary — no IO, no
|
|
8
|
+
* function-laden deps (those are the impl's concern, not the cross-plugin seam).
|
|
9
|
+
*/
|
|
10
|
+
import type { CapabilityId } from "./capability-id";
|
|
11
|
+
/** Capability id the init/setup plugin registers its setup runner under. */
|
|
12
|
+
export declare const PROJECT_SETUP_CAPABILITY_ID = "cap:project-setup";
|
|
13
|
+
/**
|
|
14
|
+
* Where runs execute for this project. `kind` is the placement discriminator
|
|
15
|
+
* (e.g. "local" | "remote"); kept as a plain string so contracts stays free of
|
|
16
|
+
* the placement-domain enum.
|
|
17
|
+
*/
|
|
18
|
+
export type ProjectSetupPlacement = {
|
|
19
|
+
readonly alias: string;
|
|
20
|
+
readonly kind: string;
|
|
21
|
+
readonly host?: string;
|
|
22
|
+
readonly port?: number;
|
|
23
|
+
readonly token?: string | null;
|
|
24
|
+
};
|
|
25
|
+
/** Pure input to a project-setup pass. */
|
|
26
|
+
export type ProjectSetupInput = {
|
|
27
|
+
readonly projectRoot: string;
|
|
28
|
+
readonly slug: string;
|
|
29
|
+
readonly placement: ProjectSetupPlacement;
|
|
30
|
+
readonly rewriteConfig?: boolean;
|
|
31
|
+
readonly ensurePi?: boolean;
|
|
32
|
+
readonly ensureLabels?: boolean;
|
|
33
|
+
readonly githubToken?: string | null;
|
|
34
|
+
readonly importGhToken?: boolean;
|
|
35
|
+
};
|
|
36
|
+
/** Pure summary of a project-setup pass. */
|
|
37
|
+
export type ProjectSetupResult = {
|
|
38
|
+
readonly repoSlug: string;
|
|
39
|
+
readonly placement: string;
|
|
40
|
+
readonly configWritten: boolean;
|
|
41
|
+
};
|
|
42
|
+
/** The cohesive project-setup operation the CLI surface depends on. Async (does IO). */
|
|
43
|
+
export interface ProjectSetupService {
|
|
44
|
+
runSetup(input: ProjectSetupInput): Promise<ProjectSetupResult>;
|
|
45
|
+
}
|
|
46
|
+
/** Typed capability id; string value is {@link PROJECT_SETUP_CAPABILITY_ID}. */
|
|
47
|
+
export declare const PROJECT_SETUP: CapabilityId<ProjectSetupService>;
|
|
@@ -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/setup.ts
|
|
8
|
+
var PROJECT_SETUP_CAPABILITY_ID = "cap:project-setup";
|
|
9
|
+
var PROJECT_SETUP = makeCapabilityId(PROJECT_SETUP_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
PROJECT_SETUP_CAPABILITY_ID,
|
|
12
|
+
PROJECT_SETUP
|
|
13
|
+
};
|