@h-rig/core 0.0.6-alpha.9 → 0.0.6-alpha.90

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.
@@ -0,0 +1,18 @@
1
+ import { RigConfig } from "@rig/contracts";
2
+ /**
3
+ * Author-facing config input: `plugins` and `workspace` are optional and
4
+ * default to a plugin-less worktree setup, so the minimal documented config
5
+ * (project + taskSource) works out of the box.
6
+ */
7
+ export type RigConfigInput = Omit<RigConfig, "plugins" | "workspace"> & {
8
+ plugins?: RigConfig["plugins"];
9
+ workspace?: RigConfig["workspace"];
10
+ };
11
+ /** Fill optional top-level sections before Schema decode (which requires them). */
12
+ export declare function applyConfigDefaults(raw: unknown): unknown;
13
+ /**
14
+ * Validate a Rig config and decode through Schema, preserving each plugin's
15
+ * `__runtime` channel. Schema decode strips unknown fields, so we capture
16
+ * the runtime objects before decoding and re-attach them after.
17
+ */
18
+ export declare function defineConfig(cfg: RigConfigInput): RigConfig;
@@ -2,6 +2,23 @@
2
2
  // packages/core/src/define-config.ts
3
3
  import { Schema } from "effect";
4
4
  import { RigConfig } from "@rig/contracts";
5
+ function normalizeWorkspaceConfig(raw) {
6
+ const workspace = raw && typeof raw === "object" && !Array.isArray(raw) ? { ...raw } : { mainRepo: "." };
7
+ workspace.checkout = workspace.checkout ?? workspace.isolation ?? "worktree";
8
+ workspace.isolation = workspace.isolation ?? workspace.checkout;
9
+ workspace.sandbox = workspace.sandbox ?? "enforce";
10
+ return workspace;
11
+ }
12
+ function applyConfigDefaults(raw) {
13
+ if (!raw || typeof raw !== "object" || Array.isArray(raw))
14
+ return raw;
15
+ const record = raw;
16
+ return {
17
+ ...record,
18
+ plugins: Array.isArray(record.plugins) ? record.plugins : [],
19
+ workspace: normalizeWorkspaceConfig(record.workspace)
20
+ };
21
+ }
5
22
  function defineConfig(cfg) {
6
23
  const runtimeByName = new Map;
7
24
  const plugins = cfg.plugins ?? [];
@@ -10,7 +27,7 @@ function defineConfig(cfg) {
10
27
  runtimeByName.set(plugin.name, plugin.__runtime);
11
28
  }
12
29
  }
13
- const decoded = Schema.decodeUnknownSync(RigConfig)(cfg);
30
+ const decoded = Schema.decodeUnknownSync(RigConfig)(applyConfigDefaults(cfg));
14
31
  const decodedPlugins = decoded.plugins.map((p) => {
15
32
  const runtime = runtimeByName.get(p.name);
16
33
  if (!runtime)
@@ -20,5 +37,6 @@ function defineConfig(cfg) {
20
37
  return { ...decoded, plugins: decodedPlugins };
21
38
  }
22
39
  export {
23
- defineConfig
40
+ defineConfig,
41
+ applyConfigDefaults
24
42
  };
@@ -0,0 +1,9 @@
1
+ import { RigPlugin } from "@rig/contracts";
2
+ import type { RigPluginRuntime, RigPluginWithRuntime } from "./plugin-runtime";
3
+ /**
4
+ * Define a Rig plugin. The first argument is the schema-validated metadata
5
+ * (id strings, version, contributions). The optional second argument carries
6
+ * executable bits (validator `run` functions, etc.) that Schema cannot
7
+ * represent — they travel alongside the validated metadata as `__runtime`.
8
+ */
9
+ export declare function definePlugin(meta: RigPlugin, runtime?: RigPluginRuntime): RigPluginWithRuntime;
@@ -43,6 +43,23 @@ function definePlugin(meta, runtime) {
43
43
  }
44
44
  }
45
45
  }
46
+ const declaredHooks = new Map((validated.contributes?.hooks ?? []).map((h) => [h.id, h]));
47
+ for (const hookId of Object.keys(runtime.hooks ?? {})) {
48
+ const metadata = declaredHooks.get(hookId);
49
+ if (!metadata) {
50
+ throw new Error(`definePlugin(${validated.name}): typed hook "${hookId}" has no matching metadata entry in contributes.hooks`);
51
+ }
52
+ if (metadata.command) {
53
+ throw new Error(`definePlugin(${validated.name}): hook "${hookId}" has both a typed implementation and a command string \u2014 pick one`);
54
+ }
55
+ }
56
+ if (runtime.hooks) {
57
+ for (const h of declaredHooks.values()) {
58
+ if (!runtime.hooks[h.id] && !h.command) {
59
+ throw new Error(`definePlugin(${validated.name}): hook metadata "${h.id}" has no implementation (typed function or command)`);
60
+ }
61
+ }
62
+ }
46
63
  return { ...validated, __runtime: runtime };
47
64
  }
48
65
  export {
@@ -0,0 +1,12 @@
1
+ import { EngineEvent, EngineReadModel, QueueEntry, RunSummary, TaskSummary } from "@rig/contracts";
2
+ type EngineApplyStatus = "applied" | "ignored" | "requires-resync";
3
+ export type ApplyStatus = EngineApplyStatus;
4
+ export interface EngineEventApplyResult {
5
+ readonly status: EngineApplyStatus;
6
+ readonly snapshot: EngineReadModel;
7
+ }
8
+ export declare function mapTaskStatusFromRunStatus(status: RunSummary["status"], fallback: TaskSummary["status"]): TaskSummary["status"];
9
+ export declare function applyEngineEvent(snapshot: EngineReadModel, event: EngineEvent): EngineEventApplyResult;
10
+ export declare function applyEngineEvents(snapshot: EngineReadModel, events: ReadonlyArray<EngineEvent>): EngineEventApplyResult;
11
+ export declare function pruneQueueEntries(snapshot: EngineReadModel): QueueEntry[];
12
+ export {};
@@ -149,7 +149,7 @@ function mapLegacySessionStatusToRunStatus(status) {
149
149
  case "error":
150
150
  return "failed";
151
151
  case "stopped":
152
- return "cancelled";
152
+ return "stopped";
153
153
  default:
154
154
  return "created";
155
155
  }
@@ -185,12 +185,15 @@ function mapTaskStatusFromRunStatus(status, fallback) {
185
185
  case "paused":
186
186
  return "in_progress";
187
187
  case "reviewing":
188
+ case "closing-out":
188
189
  return "under_review";
190
+ case "needs-attention":
191
+ return "blocked";
189
192
  case "completed":
190
193
  return "completed";
191
194
  case "failed":
192
195
  return "ready";
193
- case "cancelled":
196
+ case "stopped":
194
197
  return "cancelled";
195
198
  }
196
199
  }
@@ -1040,7 +1043,7 @@ function applyEngineEvent(snapshot, event) {
1040
1043
  ...base,
1041
1044
  runs: patchById(base.runs, payload.runId, (run) => ({
1042
1045
  ...run,
1043
- status: "cancelled",
1046
+ status: "stopped",
1044
1047
  updatedAt: payload.createdAt,
1045
1048
  completedAt: payload.createdAt
1046
1049
  }))
@@ -0,0 +1,12 @@
1
+ export declare const RIG_CORE_PACKAGE = "@rig/core";
2
+ export { definePlugin } from "./define-plugin";
3
+ export { defineConfig } from "./define-config";
4
+ export { createPluginHost } from "./plugin-host";
5
+ export type { PluginHost } from "./plugin-host";
6
+ export { buildRigInitConfigSource, type RigInitConfigInput, } from "./rig-init-builder";
7
+ export type { RegisteredValidator, RigPluginRuntime, RigPluginWithRuntime, TaskSourceFactoryContext, TaskSourceFactoryEntry, ValidatorContext, ValidatorResult, } from "./plugin-runtime";
8
+ export { applyEngineEvent, applyEngineEvents, applyEngineEvent as applyRigEvent, pruneQueueEntries, type ApplyStatus, type EngineEventApplyResult, type EngineEventApplyResult as RigEventApplyResult, } from "./engineReadModelReducer";
9
+ export { pickDefaultWorkspaceId, selectAdhocRuns, selectAdhocRunsForWorkspace, selectApprovalsForRun, selectApprovalsForWorkspace, selectGraphsForWorkspace, selectPendingApprovals, selectPrimaryWorkspace, selectQueueForWorkspace, selectRun, selectRunsByTask, selectRunsForTask, selectRunsForWorkspace, selectTask, selectTasksByStatus, selectTasksByWorkspace, selectTasksForWorkspace, selectTasksGroupedByStatus, selectUserInputsForRun, selectUserInputsForWorkspace, selectWorkspace, selectWorkspaces, } from "./rigSelectors";
10
+ export { buildTaskReferenceIndex, computeTaskBlockingDepths, readTaskMetadataStringList, readTaskSourceIssueId, resolveTaskReference, } from "./taskGraph";
11
+ export { extractTaskCode, extractTaskGroupKey, stripTaskCode, } from "./taskGraphCodes";
12
+ export { buildTaskGraphLayout, type TaskGraphEdge, type TaskGraphLane, type TaskGraphLayout, type TaskGraphNode, type TaskGraphStage, } from "./taskGraphLayout";
package/dist/src/index.js CHANGED
@@ -43,11 +43,45 @@ function definePlugin(meta, runtime) {
43
43
  }
44
44
  }
45
45
  }
46
+ const declaredHooks = new Map((validated.contributes?.hooks ?? []).map((h) => [h.id, h]));
47
+ for (const hookId of Object.keys(runtime.hooks ?? {})) {
48
+ const metadata = declaredHooks.get(hookId);
49
+ if (!metadata) {
50
+ throw new Error(`definePlugin(${validated.name}): typed hook "${hookId}" has no matching metadata entry in contributes.hooks`);
51
+ }
52
+ if (metadata.command) {
53
+ throw new Error(`definePlugin(${validated.name}): hook "${hookId}" has both a typed implementation and a command string \u2014 pick one`);
54
+ }
55
+ }
56
+ if (runtime.hooks) {
57
+ for (const h of declaredHooks.values()) {
58
+ if (!runtime.hooks[h.id] && !h.command) {
59
+ throw new Error(`definePlugin(${validated.name}): hook metadata "${h.id}" has no implementation (typed function or command)`);
60
+ }
61
+ }
62
+ }
46
63
  return { ...validated, __runtime: runtime };
47
64
  }
48
65
  // packages/core/src/define-config.ts
49
66
  import { Schema as Schema2 } from "effect";
50
67
  import { RigConfig } from "@rig/contracts";
68
+ function normalizeWorkspaceConfig(raw) {
69
+ const workspace = raw && typeof raw === "object" && !Array.isArray(raw) ? { ...raw } : { mainRepo: "." };
70
+ workspace.checkout = workspace.checkout ?? workspace.isolation ?? "worktree";
71
+ workspace.isolation = workspace.isolation ?? workspace.checkout;
72
+ workspace.sandbox = workspace.sandbox ?? "enforce";
73
+ return workspace;
74
+ }
75
+ function applyConfigDefaults(raw) {
76
+ if (!raw || typeof raw !== "object" || Array.isArray(raw))
77
+ return raw;
78
+ const record = raw;
79
+ return {
80
+ ...record,
81
+ plugins: Array.isArray(record.plugins) ? record.plugins : [],
82
+ workspace: normalizeWorkspaceConfig(record.workspace)
83
+ };
84
+ }
51
85
  function defineConfig(cfg) {
52
86
  const runtimeByName = new Map;
53
87
  const plugins = cfg.plugins ?? [];
@@ -56,7 +90,7 @@ function defineConfig(cfg) {
56
90
  runtimeByName.set(plugin.name, plugin.__runtime);
57
91
  }
58
92
  }
59
- const decoded = Schema2.decodeUnknownSync(RigConfig)(cfg);
93
+ const decoded = Schema2.decodeUnknownSync(RigConfig)(applyConfigDefaults(cfg));
60
94
  const decodedPlugins = decoded.plugins.map((p) => {
61
95
  const runtime = runtimeByName.get(p.name);
62
96
  if (!runtime)
@@ -124,6 +158,24 @@ function assertRuntimeMatchesMetadata(plugin) {
124
158
  }
125
159
  }
126
160
  }
161
+ const declaredHooks = new Map((plugin.contributes?.hooks ?? []).map((hook) => [hook.id, hook]));
162
+ const runtimeHooks = plugin.__runtime?.hooks;
163
+ for (const hookId of Object.keys(runtimeHooks ?? {})) {
164
+ const metadata = declaredHooks.get(hookId);
165
+ if (!metadata) {
166
+ throw new Error(`plugin "${plugin.name}" typed hook "${hookId}" has no matching metadata entry in contributes.hooks`);
167
+ }
168
+ if (metadata.command) {
169
+ throw new Error(`plugin "${plugin.name}" hook "${hookId}" has both a typed implementation and a command string \u2014 pick one`);
170
+ }
171
+ }
172
+ if (runtimeHooks) {
173
+ for (const hook of declaredHooks.values()) {
174
+ if (!runtimeHooks[hook.id] && !hook.command) {
175
+ throw new Error(`plugin "${plugin.name}" hook metadata "${hook.id}" has no implementation (typed function or command)`);
176
+ }
177
+ }
178
+ }
127
179
  }
128
180
  function createPluginHost(plugins) {
129
181
  assertUniquePluginNames(plugins);
@@ -263,7 +315,7 @@ function buildRigInitConfigSource(input) {
263
315
  lines.push(` issueUpdates: "lifecycle",`);
264
316
  lines.push(` projects: { enabled: false },`);
265
317
  lines.push(` },`);
266
- lines.push(` automation: { maxValidationAttempts: 30, maxPrFixIterations: 30 },`);
318
+ lines.push(` automation: { maxValidationAttempts: 30, maxPrFixIterations: 100500 },`);
267
319
  lines.push(` pr: { mode: "auto", watchChecks: true, autoFixChecks: true, autoFixReview: true },`);
268
320
  lines.push(` merge: { mode: "auto", method: "repo-default", deleteBranch: "repo-default", bypass: false },`);
269
321
  lines.push(` issueAnalysis: { enabled: true, harness: "pi", mode: "continuous" },`);
@@ -422,7 +474,7 @@ function mapLegacySessionStatusToRunStatus(status) {
422
474
  case "error":
423
475
  return "failed";
424
476
  case "stopped":
425
- return "cancelled";
477
+ return "stopped";
426
478
  default:
427
479
  return "created";
428
480
  }
@@ -458,12 +510,15 @@ function mapTaskStatusFromRunStatus(status, fallback) {
458
510
  case "paused":
459
511
  return "in_progress";
460
512
  case "reviewing":
513
+ case "closing-out":
461
514
  return "under_review";
515
+ case "needs-attention":
516
+ return "blocked";
462
517
  case "completed":
463
518
  return "completed";
464
519
  case "failed":
465
520
  return "ready";
466
- case "cancelled":
521
+ case "stopped":
467
522
  return "cancelled";
468
523
  }
469
524
  }
@@ -1313,7 +1368,7 @@ function applyEngineEvent(snapshot, event) {
1313
1368
  ...base,
1314
1369
  runs: patchById(base.runs, payload.runId, (run) => ({
1315
1370
  ...run,
1316
- status: "cancelled",
1371
+ status: "stopped",
1317
1372
  updatedAt: payload.createdAt,
1318
1373
  completedAt: payload.createdAt
1319
1374
  }))
@@ -0,0 +1,2 @@
1
+ import { RigConfig } from "@rig/contracts";
2
+ export declare function loadConfig(cwd: string): Promise<RigConfig>;
@@ -1,17 +1,145 @@
1
1
  // @bun
2
2
  // packages/core/src/load-config.ts
3
- import { existsSync, readFileSync } from "fs";
4
- import { join } from "path";
5
- import { pathToFileURL } from "url";
3
+ import { existsSync, mkdtempSync, readFileSync, rmSync } from "fs";
4
+ import { tmpdir } from "os";
5
+ import { dirname, join } from "path";
6
+ import { fileURLToPath, pathToFileURL } from "url";
7
+ import { Schema as Schema2 } from "effect";
8
+ import { RigConfig as RigConfig2 } from "@rig/contracts";
9
+
10
+ // packages/core/src/define-config.ts
6
11
  import { Schema } from "effect";
7
12
  import { RigConfig } from "@rig/contracts";
13
+ function normalizeWorkspaceConfig(raw) {
14
+ const workspace = raw && typeof raw === "object" && !Array.isArray(raw) ? { ...raw } : { mainRepo: "." };
15
+ workspace.checkout = workspace.checkout ?? workspace.isolation ?? "worktree";
16
+ workspace.isolation = workspace.isolation ?? workspace.checkout;
17
+ workspace.sandbox = workspace.sandbox ?? "enforce";
18
+ return workspace;
19
+ }
20
+ function applyConfigDefaults(raw) {
21
+ if (!raw || typeof raw !== "object" || Array.isArray(raw))
22
+ return raw;
23
+ const record = raw;
24
+ return {
25
+ ...record,
26
+ plugins: Array.isArray(record.plugins) ? record.plugins : [],
27
+ workspace: normalizeWorkspaceConfig(record.workspace)
28
+ };
29
+ }
30
+
31
+ // packages/core/src/load-config.ts
8
32
  var TS_NAMES = ["rig.config.ts", "rig.config.mts"];
9
33
  var JSON_NAMES = ["rig.config.json"];
34
+ function isModuleResolutionError(error) {
35
+ const message = error instanceof Error ? error.message : String(error);
36
+ return message.includes("Cannot find module") || message.includes("Could not resolve");
37
+ }
38
+ function runningFromCompiledBinary() {
39
+ return import.meta.url.includes("$bunfs");
40
+ }
41
+ var runtimeBundleQueue = Promise.resolve();
42
+ function enqueueRuntimeBundle(operation) {
43
+ const next = runtimeBundleQueue.then(operation, operation);
44
+ runtimeBundleQueue = next.then(() => {
45
+ return;
46
+ }, () => {
47
+ return;
48
+ });
49
+ return next;
50
+ }
51
+ async function importConfigViaRuntimeBundleUnserialized(configPath) {
52
+ const bun = globalThis.Bun;
53
+ if (!bun?.build) {
54
+ throw new Error(`Failed to import ${configPath}: bare imports could not be resolved and no Bun.build runtime bundler is available.`);
55
+ }
56
+ const hostDir = (() => {
57
+ try {
58
+ return dirname(fileURLToPath(import.meta.url));
59
+ } catch {
60
+ return process.cwd();
61
+ }
62
+ })();
63
+ const configDir = dirname(configPath);
64
+ const UNRESOLVED_NAMESPACE = "rig-config-unresolved";
65
+ const hostResolverPlugin = {
66
+ name: "rig-host-package-resolver",
67
+ setup(build) {
68
+ build.onResolve({ filter: /^@rig\// }, (args) => {
69
+ const candidates = [
70
+ [args.path, configDir],
71
+ [args.path, hostDir],
72
+ [args.path.replace(/^@rig\//, "@h-rig/"), hostDir]
73
+ ];
74
+ for (const [specifier, parent] of candidates) {
75
+ try {
76
+ const resolved = bun.resolveSync?.(specifier, parent);
77
+ if (resolved)
78
+ return { path: resolved };
79
+ } catch {}
80
+ }
81
+ return;
82
+ });
83
+ build.onResolve({ filter: /.*/ }, (args) => {
84
+ if (/^(?:node|bun):/.test(args.path))
85
+ return;
86
+ const parent = args.importer ? dirname(args.importer) : configDir;
87
+ try {
88
+ const resolved = bun.resolveSync?.(args.path, parent);
89
+ if (resolved)
90
+ return { path: resolved };
91
+ } catch {
92
+ return { path: args.path, namespace: UNRESOLVED_NAMESPACE };
93
+ }
94
+ return;
95
+ });
96
+ build.onLoad({ filter: /.*/, namespace: UNRESOLVED_NAMESPACE }, (args) => ({
97
+ loader: "js",
98
+ contents: `module.exports = {};
99
+ throw new Error(${JSON.stringify(`Failed to bundle ${configPath}: Could not resolve: "${args.path}". Maybe you need to "bun install"?`)});
100
+ `
101
+ }));
102
+ }
103
+ };
104
+ const result = await bun.build({
105
+ entrypoints: [configPath],
106
+ target: "bun",
107
+ format: "esm",
108
+ throw: false,
109
+ plugins: [hostResolverPlugin]
110
+ });
111
+ if (!result.success || !result.outputs[0]) {
112
+ const detail = result.logs.map((log) => String(log)).join(`
113
+ `);
114
+ throw new Error(`Failed to bundle ${configPath}: ${detail || "unknown bundler error"}`);
115
+ }
116
+ const dir = mkdtempSync(join(tmpdir(), "rig-config-bundle-"));
117
+ try {
118
+ const bundledPath = join(dir, "rig.config.bundled.js");
119
+ await bun.write(bundledPath, await result.outputs[0].text());
120
+ return await import(pathToFileURL(bundledPath).href);
121
+ } finally {
122
+ try {
123
+ rmSync(dir, { recursive: true, force: true });
124
+ } catch {}
125
+ }
126
+ }
10
127
  async function loadConfig(cwd) {
11
128
  for (const name of TS_NAMES) {
12
129
  const p = join(cwd, name);
13
130
  if (existsSync(p)) {
14
- const mod = await import(pathToFileURL(p).href);
131
+ const mod = await enqueueRuntimeBundle(async () => {
132
+ if (runningFromCompiledBinary()) {
133
+ return importConfigViaRuntimeBundleUnserialized(p);
134
+ }
135
+ try {
136
+ return await import(pathToFileURL(p).href);
137
+ } catch (error) {
138
+ if (!isModuleResolutionError(error))
139
+ throw error;
140
+ return importConfigViaRuntimeBundleUnserialized(p);
141
+ }
142
+ });
15
143
  const raw = mod.default ?? mod.config;
16
144
  return decodePreservingRuntime(raw);
17
145
  }
@@ -35,7 +163,7 @@ function decodePreservingRuntime(raw) {
35
163
  }
36
164
  }
37
165
  }
38
- const decoded = Schema.decodeUnknownSync(RigConfig)(raw);
166
+ const decoded = Schema2.decodeUnknownSync(RigConfig2)(applyConfigDefaults(raw));
39
167
  const plugins = decoded.plugins.map((p) => {
40
168
  const runtime = runtimeByName.get(p.name);
41
169
  if (!runtime)
@@ -0,0 +1,40 @@
1
+ import type { ValidatorRegistration, HookRegistration, SkillRegistration, RepoSourceRegistration, AgentRoleRegistration, TaskFieldExtension, TaskSourceRegistration, CliCommandRegistration } from "@rig/contracts";
2
+ import type { RegisteredValidator, RigPluginWithRuntime, TaskSourceFactoryEntry } from "./plugin-runtime";
3
+ export interface PluginHost {
4
+ getValidator(id: string): ValidatorRegistration | undefined;
5
+ getHook(id: string): HookRegistration | undefined;
6
+ getSkill(id: string): SkillRegistration | undefined;
7
+ getRepoSource(id: string): RepoSourceRegistration | undefined;
8
+ getAgentRole(id: string): AgentRoleRegistration | undefined;
9
+ getTaskFieldExtension(id: string): TaskFieldExtension | undefined;
10
+ getTaskSource(id: string): TaskSourceRegistration | undefined;
11
+ getCliCommand(id: string): CliCommandRegistration | undefined;
12
+ listValidators(): readonly ValidatorRegistration[];
13
+ listHooks(): readonly HookRegistration[];
14
+ listSkills(): readonly SkillRegistration[];
15
+ listRepoSources(): readonly RepoSourceRegistration[];
16
+ listAgentRoles(): readonly AgentRoleRegistration[];
17
+ listTaskFieldExtensions(): readonly TaskFieldExtension[];
18
+ listTaskSources(): readonly TaskSourceRegistration[];
19
+ listCliCommands(): readonly CliCommandRegistration[];
20
+ /**
21
+ * Executable validators contributed by plugins. Only validators whose
22
+ * metadata appears in `listValidators()` and whose plugin shipped a runtime
23
+ * implementation via `definePlugin(meta, { validators: [...] })` appear here.
24
+ * Validators registered metadata-only (no run() implementation) are absent.
25
+ */
26
+ listExecutableValidators(): readonly RegisteredValidator[];
27
+ /**
28
+ * Executable task source factories contributed by plugins. Used by the
29
+ * runtime's `buildTaskSourceRegistry` to instantiate non-standard task
30
+ * source kinds (Linear, Jira, custom) declared by plugins.
31
+ */
32
+ listExecutableTaskSources(): readonly TaskSourceFactoryEntry[];
33
+ /**
34
+ * Look up an executable task source factory by its `kind` (the value in
35
+ * `config.taskSource.kind`). Returns undefined when no plugin provides
36
+ * a factory for that kind.
37
+ */
38
+ resolveTaskSourceFactoryByKind(kind: string): TaskSourceFactoryEntry | undefined;
39
+ }
40
+ export declare function createPluginHost(plugins: readonly RigPluginWithRuntime[]): PluginHost;
@@ -58,6 +58,24 @@ function assertRuntimeMatchesMetadata(plugin) {
58
58
  }
59
59
  }
60
60
  }
61
+ const declaredHooks = new Map((plugin.contributes?.hooks ?? []).map((hook) => [hook.id, hook]));
62
+ const runtimeHooks = plugin.__runtime?.hooks;
63
+ for (const hookId of Object.keys(runtimeHooks ?? {})) {
64
+ const metadata = declaredHooks.get(hookId);
65
+ if (!metadata) {
66
+ throw new Error(`plugin "${plugin.name}" typed hook "${hookId}" has no matching metadata entry in contributes.hooks`);
67
+ }
68
+ if (metadata.command) {
69
+ throw new Error(`plugin "${plugin.name}" hook "${hookId}" has both a typed implementation and a command string \u2014 pick one`);
70
+ }
71
+ }
72
+ if (runtimeHooks) {
73
+ for (const hook of declaredHooks.values()) {
74
+ if (!runtimeHooks[hook.id] && !hook.command) {
75
+ throw new Error(`plugin "${plugin.name}" hook metadata "${hook.id}" has no implementation (typed function or command)`);
76
+ }
77
+ }
78
+ }
61
79
  }
62
80
  function createPluginHost(plugins) {
63
81
  assertUniquePluginNames(plugins);
@@ -0,0 +1,58 @@
1
+ import type { HookImplementation, RegisteredTaskSource, RigPlugin, TaskSourceConfig, TaskSourceRegistration, ValidatorRegistration } from "@rig/contracts";
2
+ export interface ValidatorResult {
3
+ id: string;
4
+ passed: boolean;
5
+ summary: string;
6
+ details?: string;
7
+ }
8
+ export interface ValidatorContext {
9
+ taskId: string;
10
+ workspaceRoot: string;
11
+ scope: readonly string[];
12
+ monorepoRoot?: string;
13
+ artifactsDir?: string;
14
+ taskConfig?: unknown;
15
+ }
16
+ export interface RegisteredValidator extends ValidatorRegistration {
17
+ run(ctx: ValidatorContext): Promise<ValidatorResult>;
18
+ }
19
+ /**
20
+ * Project context handed to task-source factories at instantiation. The
21
+ * server process's cwd is NOT necessarily the project root (workspace-spawned
22
+ * servers run from the engine checkout), so factories that touch the
23
+ * filesystem must resolve relative config paths against `projectRoot`,
24
+ * never cwd.
25
+ */
26
+ export interface TaskSourceFactoryContext {
27
+ projectRoot: string;
28
+ }
29
+ /**
30
+ * Executable task-source factory contributed by a plugin. A plugin
31
+ * registers a TaskSourceRegistration metadata entry (with `id` and `kind`)
32
+ * AND a factory here that turns a TaskSourceConfig into a RegisteredTaskSource.
33
+ *
34
+ * `kind` is matched against `config.taskSource.kind` at boot. The first
35
+ * matching plugin factory wins; if multiple plugins claim the same kind,
36
+ * `createPluginHost` throws a duplicate-kind error.
37
+ */
38
+ export interface TaskSourceFactoryEntry extends TaskSourceRegistration {
39
+ factory(config: TaskSourceConfig, context?: TaskSourceFactoryContext): RegisteredTaskSource;
40
+ }
41
+ export interface RigPluginRuntime {
42
+ validators?: readonly RegisteredValidator[];
43
+ taskSources?: readonly TaskSourceFactoryEntry[];
44
+ /**
45
+ * Typed hook implementations keyed by hook id. Each key must match a
46
+ * declared `contributes.hooks` entry on the same plugin. A typed hook and
47
+ * a metadata `command` string are mutually exclusive per hook — and when
48
+ * this channel is present, every declared hook must be implemented one way
49
+ * or the other (same all-or-none rule as validators). The runtime's
50
+ * hook-materializer generates the shim command that routes Claude Code's
51
+ * hook invocation to the typed function (see
52
+ * `@rig/runtime/control-plane/hook-runner`).
53
+ */
54
+ hooks?: Record<string, HookImplementation>;
55
+ }
56
+ export type RigPluginWithRuntime = RigPlugin & {
57
+ __runtime?: RigPluginRuntime;
58
+ };
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Pure builder that turns a small input shape into the source text of a
3
+ * `rig.config.ts` file. Shared between the CLI `rig init` wizard and the
4
+ * desktop app's in-app setup wizard so both surfaces produce identical
5
+ * output.
6
+ *
7
+ * Pure — no fs, no node, no imports outside this file. Safe to bundle into
8
+ * a renderer (Vite, esbuild, webpack).
9
+ */
10
+ export type RigInitConfigInput = {
11
+ projectName: string;
12
+ projectRepo?: string;
13
+ taskSource: {
14
+ kind: "github-issues";
15
+ owner: string;
16
+ repo: string;
17
+ assignee?: string;
18
+ } | {
19
+ kind: "files";
20
+ path: string;
21
+ };
22
+ useStandardPlugin: boolean;
23
+ };
24
+ export declare function buildRigInitConfigSource(input: RigInitConfigInput): string;
@@ -43,7 +43,7 @@ function buildRigInitConfigSource(input) {
43
43
  lines.push(` issueUpdates: "lifecycle",`);
44
44
  lines.push(` projects: { enabled: false },`);
45
45
  lines.push(` },`);
46
- lines.push(` automation: { maxValidationAttempts: 30, maxPrFixIterations: 30 },`);
46
+ lines.push(` automation: { maxValidationAttempts: 30, maxPrFixIterations: 100500 },`);
47
47
  lines.push(` pr: { mode: "auto", watchChecks: true, autoFixChecks: true, autoFixReview: true },`);
48
48
  lines.push(` merge: { mode: "auto", method: "repo-default", deleteBranch: "repo-default", bypass: false },`);
49
49
  lines.push(` issueAnalysis: { enabled: true, harness: "pi", mode: "continuous" },`);
@@ -0,0 +1,194 @@
1
+ import type { ArtifactSummary, ApprovalSummary, EngineReadModel, GraphSummary, QueueEntry, RemoteConnectionSummary, RemoteEndpoint, RunId, RunSummary, TaskId, TaskStatus, TaskSummary, UserInputRequestSummary, WorkspaceId, WorkspaceSummary } from "@rig/contracts";
2
+ export declare function selectWorkspaces(snapshot: EngineReadModel | null): readonly WorkspaceSummary[];
3
+ export declare function selectPrimaryWorkspace(snapshot: EngineReadModel | null): WorkspaceSummary | null;
4
+ export declare function pickDefaultWorkspaceId(snapshot: EngineReadModel | null): WorkspaceId | null;
5
+ export declare function selectWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): WorkspaceSummary | null;
6
+ export declare function selectTask(snapshot: EngineReadModel | null, taskId: TaskId | null): TaskSummary | null;
7
+ export declare function selectTasksByWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): TaskSummary[];
8
+ export declare const selectTasksForWorkspace: typeof selectTasksByWorkspace;
9
+ export declare function selectTasksByStatus(snapshot: EngineReadModel | null, status: TaskStatus): TaskSummary[];
10
+ export declare function selectTasksGroupedByStatus(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): Array<{
11
+ status: string;
12
+ tasks: readonly TaskSummary[];
13
+ }>;
14
+ export declare function selectRun(snapshot: EngineReadModel | null, runId: RunId | null): RunSummary | null;
15
+ export declare function selectRunsByTask(snapshot: EngineReadModel | null, taskId: TaskId | null): RunSummary[];
16
+ export declare const selectRunsForTask: typeof selectRunsByTask;
17
+ export declare function selectRunsForWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): RunSummary[];
18
+ export declare function selectAdhocRuns(snapshot: EngineReadModel | null): RunSummary[];
19
+ export declare function selectAdhocRunsForWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): RunSummary[];
20
+ export declare function selectGraphsForWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): GraphSummary[];
21
+ export declare function selectQueueForWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): QueueEntry[];
22
+ export declare function selectPendingApprovals(snapshot: EngineReadModel | null): ApprovalSummary[];
23
+ export declare function selectApprovalsForRun(snapshot: EngineReadModel | null, runId: RunId | null): ApprovalSummary[];
24
+ export declare function selectPendingApprovalsForRun(snapshot: EngineReadModel | null, runId: RunId | null): ApprovalSummary[];
25
+ export declare function selectApprovalsForWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): ApprovalSummary[];
26
+ export declare function selectUserInputsForRun(snapshot: EngineReadModel | null, runId: RunId | null): UserInputRequestSummary[];
27
+ export declare function selectPendingUserInputs(snapshot: EngineReadModel | null): UserInputRequestSummary[];
28
+ export declare function selectPendingUserInputsForRun(snapshot: EngineReadModel | null, runId: RunId | null): UserInputRequestSummary[];
29
+ export declare function selectUserInputsForWorkspace(snapshot: EngineReadModel | null, workspaceId: WorkspaceId | null): UserInputRequestSummary[];
30
+ export declare function selectRuntimeForRun(snapshot: EngineReadModel | null, runId: RunId | null): {
31
+ readonly id: string & import("effect/Brand").Brand<"EngineRuntimeId">;
32
+ readonly updatedAt: string;
33
+ readonly status: "starting" | "running" | "interrupted" | "failed" | "prepared" | "exited" | "destroyed";
34
+ readonly startedAt: string | null;
35
+ readonly pid: number | null;
36
+ readonly stateDir: string | null;
37
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
38
+ readonly workspaceDir: string | null;
39
+ readonly homeDir: string | null;
40
+ readonly tmpDir: string | null;
41
+ readonly cacheDir: string | null;
42
+ readonly logsDir: string | null;
43
+ readonly sessionDir: string | null;
44
+ readonly sessionLogPath: string | null;
45
+ readonly exitedAt: string | null;
46
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
47
+ readonly adapterKind: string;
48
+ readonly sandboxMode: "read-only" | "workspace-write" | "danger-full-access";
49
+ readonly isolationMode: "none" | "env" | "worktree";
50
+ readonly executionTarget?: "remote" | "local" | undefined;
51
+ readonly remoteHostId?: string | null | undefined;
52
+ } | null;
53
+ export declare function selectLatestRuntimeForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): {
54
+ readonly id: string & import("effect/Brand").Brand<"EngineRuntimeId">;
55
+ readonly updatedAt: string;
56
+ readonly status: "starting" | "running" | "interrupted" | "failed" | "prepared" | "exited" | "destroyed";
57
+ readonly startedAt: string | null;
58
+ readonly pid: number | null;
59
+ readonly stateDir: string | null;
60
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
61
+ readonly workspaceDir: string | null;
62
+ readonly homeDir: string | null;
63
+ readonly tmpDir: string | null;
64
+ readonly cacheDir: string | null;
65
+ readonly logsDir: string | null;
66
+ readonly sessionDir: string | null;
67
+ readonly sessionLogPath: string | null;
68
+ readonly exitedAt: string | null;
69
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
70
+ readonly adapterKind: string;
71
+ readonly sandboxMode: "read-only" | "workspace-write" | "danger-full-access";
72
+ readonly isolationMode: "none" | "env" | "worktree";
73
+ readonly executionTarget?: "remote" | "local" | undefined;
74
+ readonly remoteHostId?: string | null | undefined;
75
+ } | null;
76
+ export declare function selectActionsForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): {
77
+ readonly id: string & import("effect/Brand").Brand<"ActionId">;
78
+ readonly title: string;
79
+ readonly completedAt: string | null;
80
+ readonly payload: unknown;
81
+ readonly startedAt: string;
82
+ readonly state: string;
83
+ readonly messageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
84
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
85
+ readonly detail: string | null;
86
+ readonly actionType: string;
87
+ }[];
88
+ export declare function selectApprovalsForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): {
89
+ readonly id: string;
90
+ readonly createdAt: string;
91
+ readonly status: "pending" | "resolved";
92
+ readonly payload: unknown;
93
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
94
+ readonly actionId: string | null;
95
+ readonly resolvedAt: string | null;
96
+ readonly requestKind: string;
97
+ }[];
98
+ export declare function selectUserInputsForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): {
99
+ readonly id: string;
100
+ readonly createdAt: string;
101
+ readonly status: "pending" | "resolved";
102
+ readonly payload: unknown;
103
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
104
+ readonly resolvedAt: string | null;
105
+ }[];
106
+ export declare function selectValidationsForRun(snapshot: EngineReadModel | null, runId: RunId | null): {
107
+ readonly id: string & import("effect/Brand").Brand<"ValidationResultId">;
108
+ readonly status: "running" | "pending" | "failed" | "passed" | "skipped";
109
+ readonly completedAt: string | null;
110
+ readonly startedAt: string;
111
+ readonly taskId: (string & import("effect/Brand").Brand<"TaskId">) | null;
112
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
113
+ readonly validatorKey: string;
114
+ readonly output: unknown;
115
+ }[];
116
+ export declare function selectValidationsForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): {
117
+ readonly id: string & import("effect/Brand").Brand<"ValidationResultId">;
118
+ readonly status: "running" | "pending" | "failed" | "passed" | "skipped";
119
+ readonly completedAt: string | null;
120
+ readonly startedAt: string;
121
+ readonly taskId: (string & import("effect/Brand").Brand<"TaskId">) | null;
122
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
123
+ readonly validatorKey: string;
124
+ readonly output: unknown;
125
+ }[];
126
+ export declare function selectFailedValidations(snapshot: EngineReadModel | null, runId: RunId | null): {
127
+ readonly id: string & import("effect/Brand").Brand<"ValidationResultId">;
128
+ readonly status: "running" | "pending" | "failed" | "passed" | "skipped";
129
+ readonly completedAt: string | null;
130
+ readonly startedAt: string;
131
+ readonly taskId: (string & import("effect/Brand").Brand<"TaskId">) | null;
132
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
133
+ readonly validatorKey: string;
134
+ readonly output: unknown;
135
+ }[];
136
+ export declare function selectReviewsForRun(snapshot: EngineReadModel | null, runId: RunId | null): {
137
+ readonly id: string & import("effect/Brand").Brand<"ReviewResultId">;
138
+ readonly createdAt: string;
139
+ readonly status: "running" | "error" | "rejected" | "pending" | "approved";
140
+ readonly completedAt: string | null;
141
+ readonly summary: string | null;
142
+ readonly provider: string;
143
+ readonly mode: "required" | "off" | "advisory";
144
+ readonly taskId: (string & import("effect/Brand").Brand<"TaskId">) | null;
145
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
146
+ readonly output: unknown;
147
+ }[];
148
+ export declare function selectReviewsForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): {
149
+ readonly id: string & import("effect/Brand").Brand<"ReviewResultId">;
150
+ readonly createdAt: string;
151
+ readonly status: "running" | "error" | "rejected" | "pending" | "approved";
152
+ readonly completedAt: string | null;
153
+ readonly summary: string | null;
154
+ readonly provider: string;
155
+ readonly mode: "required" | "off" | "advisory";
156
+ readonly taskId: (string & import("effect/Brand").Brand<"TaskId">) | null;
157
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
158
+ readonly output: unknown;
159
+ }[];
160
+ export declare function selectArtifactsForRun(snapshot: EngineReadModel | null, runId: RunId | null): ArtifactSummary[];
161
+ export declare function selectArtifactsForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): ArtifactSummary[];
162
+ export declare function selectPolicyDecisionsForTask(snapshot: EngineReadModel | null, taskId: TaskId | null): {
163
+ readonly id: string;
164
+ readonly createdAt: string;
165
+ readonly decision: "allow" | "block" | "warn";
166
+ readonly mode: "off" | "enforce" | "observe";
167
+ readonly runId: string & import("effect/Brand").Brand<"RunId">;
168
+ readonly actionId: (string & import("effect/Brand").Brand<"ActionId">) | null;
169
+ readonly reason: string;
170
+ readonly matchedRules: readonly string[];
171
+ }[];
172
+ export declare function selectRemoteEndpoints(snapshot: EngineReadModel | null): readonly RemoteEndpoint[];
173
+ export declare function selectRemoteConnections(snapshot: EngineReadModel | null): readonly RemoteConnectionSummary[];
174
+ export declare function selectRemoteEndpoint(snapshot: EngineReadModel | null, endpointId: string | null): {
175
+ readonly id: string & import("effect/Brand").Brand<"RemoteEndpointId">;
176
+ readonly port: number;
177
+ readonly lastConnectedAt: string | null;
178
+ readonly alias: string;
179
+ readonly host: string;
180
+ readonly token: string;
181
+ readonly addedAt: string;
182
+ readonly tokenConfigured?: boolean | undefined;
183
+ readonly autoConnect?: boolean | undefined;
184
+ } | null;
185
+ export declare function selectRemoteConnection(snapshot: EngineReadModel | null, endpointId: string | null): {
186
+ readonly error: string | null;
187
+ readonly status: "error" | "disconnected" | "connecting" | "authenticating" | "connected" | "reconnecting";
188
+ readonly endpointId: string & import("effect/Brand").Brand<"RemoteEndpointId">;
189
+ readonly connectedAt: string | null;
190
+ readonly tokenExpiresAt: string | null;
191
+ readonly latencyMs: number | null;
192
+ readonly subscribedEvents: readonly string[];
193
+ } | null;
194
+ export declare function selectConnectedRemoteCount(snapshot: EngineReadModel | null): number;
@@ -0,0 +1,28 @@
1
+ import type { TaskSummary } from "@rig/contracts";
2
+ export declare function readTaskMetadataStringList(task: TaskSummary, key: "dependencies" | "parentChildDeps" | "labels"): string[];
3
+ export declare function readTaskSourceIssueId(task: TaskSummary): string | null;
4
+ export declare function resolveTaskReference(ref: string, tasksById: ReadonlyMap<string, TaskSummary>, taskIdByExternalRef: ReadonlyMap<string, string>, taskIdBySourceIssueId: ReadonlyMap<string, string>): string | null;
5
+ export declare function buildTaskReferenceIndex(tasks: readonly TaskSummary[]): {
6
+ tasksById: Map<string, {
7
+ readonly id: string & import("effect/Brand").Brand<"TaskId">;
8
+ readonly title: string;
9
+ readonly createdAt: string;
10
+ readonly updatedAt: string;
11
+ readonly role: string | null;
12
+ readonly status: "running" | "ready" | "completed" | "failed" | "draft" | "open" | "queued" | "in_progress" | "under_review" | "blocked" | "unknown" | "cancelled" | "closed";
13
+ readonly metadata: unknown;
14
+ readonly description: string;
15
+ readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
16
+ readonly graphId: (string & import("effect/Brand").Brand<"GraphId">) | null;
17
+ readonly externalId: string | null;
18
+ readonly priority: number | null;
19
+ readonly scope: readonly string[];
20
+ readonly validationKeys: readonly string[];
21
+ readonly dependencies?: readonly string[] | undefined;
22
+ readonly sourceIssueId?: string | null | undefined;
23
+ readonly parentChildDeps?: readonly string[] | undefined;
24
+ }>;
25
+ taskIdByExternalRef: Map<string, string & import("effect/Brand").Brand<"TaskId">>;
26
+ taskIdBySourceIssueId: Map<string, string & import("effect/Brand").Brand<"TaskId">>;
27
+ };
28
+ export declare function computeTaskBlockingDepths(tasks: readonly TaskSummary[]): Map<string, number>;
@@ -0,0 +1,3 @@
1
+ export declare function extractTaskCode(title: string): string | null;
2
+ export declare function extractTaskGroupKey(title: string): string | null;
3
+ export declare function stripTaskCode(label: string): string;
@@ -0,0 +1,60 @@
1
+ import type { EngineReadModel, TaskSummary } from "@rig/contracts";
2
+ export type TaskGraphLane = Readonly<{
3
+ key: string;
4
+ label: string;
5
+ rowIndex: number;
6
+ x: number;
7
+ y: number;
8
+ width: number;
9
+ height: number;
10
+ color: string;
11
+ taskCount: number;
12
+ }>;
13
+ export type TaskGraphStage = Readonly<{
14
+ index: number;
15
+ label: string;
16
+ x: number;
17
+ width: number;
18
+ }>;
19
+ export type TaskGraphNode = Readonly<{
20
+ id: string;
21
+ task: TaskSummary;
22
+ rowKey: string;
23
+ rowLabel: string;
24
+ rowIndex: number;
25
+ stage: number;
26
+ x: number;
27
+ y: number;
28
+ width: number;
29
+ height: number;
30
+ color: string;
31
+ taskCode: string | null;
32
+ strippedTitle: string;
33
+ depsIn: number;
34
+ depsOut: number;
35
+ runCount: number;
36
+ hasApprovals: boolean;
37
+ hasPendingUserInput: boolean;
38
+ hasRejectedReview: boolean;
39
+ hasFailedValidations: boolean;
40
+ artifactCount: number;
41
+ }>;
42
+ export type TaskGraphEdge = Readonly<{
43
+ id: string;
44
+ sourceId: string;
45
+ targetId: string;
46
+ color: string;
47
+ kind: "blocking" | "parent-child";
48
+ }>;
49
+ export type TaskGraphLayout = Readonly<{
50
+ lanes: readonly TaskGraphLane[];
51
+ stages: readonly TaskGraphStage[];
52
+ nodes: readonly TaskGraphNode[];
53
+ edges: readonly TaskGraphEdge[];
54
+ totalWidth: number;
55
+ totalHeight: number;
56
+ taskCount: number;
57
+ }>;
58
+ export declare function buildTaskGraphLayout(snapshot: EngineReadModel | null, tasks: readonly TaskSummary[], options?: {
59
+ showParentChild?: boolean;
60
+ }): TaskGraphLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-rig/core",
3
- "version": "0.0.6-alpha.9",
3
+ "version": "0.0.6-alpha.90",
4
4
  "type": "module",
5
5
  "description": "Rig package",
6
6
  "license": "UNLICENSED",
@@ -10,18 +10,23 @@
10
10
  ],
11
11
  "exports": {
12
12
  ".": {
13
+ "types": "./dist/src/index.d.ts",
13
14
  "import": "./dist/src/index.js"
14
15
  },
15
16
  "./load-config": {
17
+ "types": "./dist/src/load-config.d.ts",
16
18
  "import": "./dist/src/load-config.js"
17
19
  },
18
20
  "./engineReadModelReducer": {
21
+ "types": "./dist/src/engineReadModelReducer.d.ts",
19
22
  "import": "./dist/src/engineReadModelReducer.js"
20
23
  },
21
24
  "./rigSelectors": {
25
+ "types": "./dist/src/rigSelectors.d.ts",
22
26
  "import": "./dist/src/rigSelectors.js"
23
27
  },
24
28
  "./taskGraph": {
29
+ "types": "./dist/src/taskGraph.d.ts",
25
30
  "import": "./dist/src/taskGraph.js"
26
31
  }
27
32
  },
@@ -30,8 +35,9 @@
30
35
  },
31
36
  "main": "./dist/src/index.js",
32
37
  "module": "./dist/src/index.js",
38
+ "types": "./dist/src/index.d.ts",
33
39
  "dependencies": {
34
- "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.9",
40
+ "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.90",
35
41
  "effect": "4.0.0-beta.78"
36
42
  }
37
43
  }