@h-rig/core 0.0.6-alpha.129 → 0.0.6-alpha.130
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/src/engineReadModelReducer.js +11 -10
- package/dist/src/index.js +11 -10
- package/dist/src/rigSelectors.d.ts +2 -2
- package/package.json +2 -2
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
WorkspaceId,
|
|
11
11
|
WorktreeId
|
|
12
12
|
} from "@rig/contracts";
|
|
13
|
+
var CANONICAL_RUNTIME_ADAPTER = "pi";
|
|
13
14
|
function isRecord(value) {
|
|
14
15
|
return typeof value === "object" && value !== null;
|
|
15
16
|
}
|
|
@@ -377,7 +378,7 @@ function applySyntheticRuntimePreparation(snapshot, event) {
|
|
|
377
378
|
...existingRun,
|
|
378
379
|
taskId: existingRun.taskId ?? nextTaskId,
|
|
379
380
|
runKind: existingRun.runKind === "adhoc" && nextTaskId ? "task" : existingRun.runKind,
|
|
380
|
-
runtimeAdapter:
|
|
381
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
381
382
|
initialPrompt: existingRun.initialPrompt ?? null,
|
|
382
383
|
executionTarget: existingRun.executionTarget ?? "local",
|
|
383
384
|
remoteHostId: existingRun.remoteHostId ?? null,
|
|
@@ -393,7 +394,7 @@ function applySyntheticRuntimePreparation(snapshot, event) {
|
|
|
393
394
|
...runtimeBase,
|
|
394
395
|
workspaceId: nextWorkspaceId,
|
|
395
396
|
runId: runtimeRunId,
|
|
396
|
-
adapterKind:
|
|
397
|
+
adapterKind: CANONICAL_RUNTIME_ADAPTER,
|
|
397
398
|
executionTarget: existingRun.executionTarget ?? "local",
|
|
398
399
|
remoteHostId: existingRun.remoteHostId ?? null,
|
|
399
400
|
status: failed ? "failed" : finished ? "prepared" : "starting",
|
|
@@ -442,7 +443,7 @@ function applySyntheticRuntimePrepared(snapshot, event) {
|
|
|
442
443
|
...snapshot.runtimes.find((runtime) => runtime.runId === runId) ?? makeRuntimeFromRun(existingRun, event.createdAt),
|
|
443
444
|
workspaceId: nextWorkspaceId,
|
|
444
445
|
runId: runtimeRunId,
|
|
445
|
-
adapterKind:
|
|
446
|
+
adapterKind: CANONICAL_RUNTIME_ADAPTER,
|
|
446
447
|
executionTarget: existingRun.executionTarget ?? "local",
|
|
447
448
|
remoteHostId: existingRun.remoteHostId ?? null,
|
|
448
449
|
status: "prepared",
|
|
@@ -485,7 +486,7 @@ function applyLegacyProjectEvent(snapshot, event) {
|
|
|
485
486
|
title,
|
|
486
487
|
rootPath,
|
|
487
488
|
sourceKind: "native",
|
|
488
|
-
defaultRuntimeAdapter:
|
|
489
|
+
defaultRuntimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
489
490
|
defaultModel: readNullableString(payload, "defaultModel") ?? null,
|
|
490
491
|
createdAt,
|
|
491
492
|
updatedAt
|
|
@@ -580,7 +581,7 @@ function applyLegacyThreadEvent(snapshot, event) {
|
|
|
580
581
|
runtimeMode: "full-access",
|
|
581
582
|
interactionMode: "default",
|
|
582
583
|
status: "created",
|
|
583
|
-
runtimeAdapter:
|
|
584
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
584
585
|
model,
|
|
585
586
|
initialPrompt: null,
|
|
586
587
|
activeRuntimeId: null,
|
|
@@ -764,7 +765,7 @@ function applyLegacyThreadEvent(snapshot, event) {
|
|
|
764
765
|
const providerName = readNullableString(session, "providerName");
|
|
765
766
|
const nextRun = {
|
|
766
767
|
...existingRun,
|
|
767
|
-
runtimeAdapter:
|
|
768
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
768
769
|
initialPrompt: existingRun.initialPrompt ?? null,
|
|
769
770
|
activeRuntimeId: runtimeIdFromRunId(asRunId(runId)),
|
|
770
771
|
status: mapLegacySessionStatusToRunStatus(readString(session, "status")),
|
|
@@ -777,7 +778,7 @@ function applyLegacyThreadEvent(snapshot, event) {
|
|
|
777
778
|
...snapshot.runtimes.find((runtime) => runtime.runId === runId) ?? makeRuntimeFromRun(nextRun, sessionUpdatedAt),
|
|
778
779
|
workspaceId: existingRun.workspaceId,
|
|
779
780
|
runId: asRunId(runId),
|
|
780
|
-
adapterKind:
|
|
781
|
+
adapterKind: CANONICAL_RUNTIME_ADAPTER,
|
|
781
782
|
status: mapLegacySessionStatusToRuntimeStatus(readString(session, "status")),
|
|
782
783
|
workspaceDir: existingRun.worktreePath,
|
|
783
784
|
isolationMode: existingRun.worktreePath ? "worktree" : "env",
|
|
@@ -1011,7 +1012,7 @@ function applyEngineEvent(snapshot, event) {
|
|
|
1011
1012
|
runtimeMode: payload.runtimeMode,
|
|
1012
1013
|
interactionMode: payload.interactionMode,
|
|
1013
1014
|
status: "created",
|
|
1014
|
-
runtimeAdapter:
|
|
1015
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
1015
1016
|
model: payload.model ?? null,
|
|
1016
1017
|
initialPrompt: payload.initialPrompt ?? null,
|
|
1017
1018
|
executionTarget: payload.executionTarget ?? (payload.remoteHostId ? "remote" : "local"),
|
|
@@ -1707,7 +1708,7 @@ function applyEngineEvent(snapshot, event) {
|
|
|
1707
1708
|
runtimeMode: "full-access",
|
|
1708
1709
|
interactionMode: "default",
|
|
1709
1710
|
status: "created",
|
|
1710
|
-
runtimeAdapter:
|
|
1711
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
1711
1712
|
model: null,
|
|
1712
1713
|
initialPrompt: null,
|
|
1713
1714
|
activeRuntimeId: runtimeIdFromRunId(asRunId(runId)),
|
|
@@ -1727,7 +1728,7 @@ function applyEngineEvent(snapshot, event) {
|
|
|
1727
1728
|
workspaceId: asWorkspaceId(workspaceId),
|
|
1728
1729
|
taskId: asTaskId(taskId),
|
|
1729
1730
|
runKind: "task",
|
|
1730
|
-
runtimeAdapter:
|
|
1731
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
1731
1732
|
activeRuntimeId: runtimeIdFromRunId(asRunId(runId)),
|
|
1732
1733
|
updatedAt: event.createdAt
|
|
1733
1734
|
});
|
package/dist/src/index.js
CHANGED
|
@@ -336,6 +336,7 @@ import {
|
|
|
336
336
|
WorkspaceId,
|
|
337
337
|
WorktreeId
|
|
338
338
|
} from "@rig/contracts";
|
|
339
|
+
var CANONICAL_RUNTIME_ADAPTER = "pi";
|
|
339
340
|
function isRecord(value) {
|
|
340
341
|
return typeof value === "object" && value !== null;
|
|
341
342
|
}
|
|
@@ -703,7 +704,7 @@ function applySyntheticRuntimePreparation(snapshot, event) {
|
|
|
703
704
|
...existingRun,
|
|
704
705
|
taskId: existingRun.taskId ?? nextTaskId,
|
|
705
706
|
runKind: existingRun.runKind === "adhoc" && nextTaskId ? "task" : existingRun.runKind,
|
|
706
|
-
runtimeAdapter:
|
|
707
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
707
708
|
initialPrompt: existingRun.initialPrompt ?? null,
|
|
708
709
|
executionTarget: existingRun.executionTarget ?? "local",
|
|
709
710
|
remoteHostId: existingRun.remoteHostId ?? null,
|
|
@@ -719,7 +720,7 @@ function applySyntheticRuntimePreparation(snapshot, event) {
|
|
|
719
720
|
...runtimeBase,
|
|
720
721
|
workspaceId: nextWorkspaceId,
|
|
721
722
|
runId: runtimeRunId,
|
|
722
|
-
adapterKind:
|
|
723
|
+
adapterKind: CANONICAL_RUNTIME_ADAPTER,
|
|
723
724
|
executionTarget: existingRun.executionTarget ?? "local",
|
|
724
725
|
remoteHostId: existingRun.remoteHostId ?? null,
|
|
725
726
|
status: failed ? "failed" : finished ? "prepared" : "starting",
|
|
@@ -768,7 +769,7 @@ function applySyntheticRuntimePrepared(snapshot, event) {
|
|
|
768
769
|
...snapshot.runtimes.find((runtime) => runtime.runId === runId) ?? makeRuntimeFromRun(existingRun, event.createdAt),
|
|
769
770
|
workspaceId: nextWorkspaceId,
|
|
770
771
|
runId: runtimeRunId,
|
|
771
|
-
adapterKind:
|
|
772
|
+
adapterKind: CANONICAL_RUNTIME_ADAPTER,
|
|
772
773
|
executionTarget: existingRun.executionTarget ?? "local",
|
|
773
774
|
remoteHostId: existingRun.remoteHostId ?? null,
|
|
774
775
|
status: "prepared",
|
|
@@ -811,7 +812,7 @@ function applyLegacyProjectEvent(snapshot, event) {
|
|
|
811
812
|
title,
|
|
812
813
|
rootPath,
|
|
813
814
|
sourceKind: "native",
|
|
814
|
-
defaultRuntimeAdapter:
|
|
815
|
+
defaultRuntimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
815
816
|
defaultModel: readNullableString(payload, "defaultModel") ?? null,
|
|
816
817
|
createdAt,
|
|
817
818
|
updatedAt
|
|
@@ -906,7 +907,7 @@ function applyLegacyThreadEvent(snapshot, event) {
|
|
|
906
907
|
runtimeMode: "full-access",
|
|
907
908
|
interactionMode: "default",
|
|
908
909
|
status: "created",
|
|
909
|
-
runtimeAdapter:
|
|
910
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
910
911
|
model,
|
|
911
912
|
initialPrompt: null,
|
|
912
913
|
activeRuntimeId: null,
|
|
@@ -1090,7 +1091,7 @@ function applyLegacyThreadEvent(snapshot, event) {
|
|
|
1090
1091
|
const providerName = readNullableString(session, "providerName");
|
|
1091
1092
|
const nextRun = {
|
|
1092
1093
|
...existingRun,
|
|
1093
|
-
runtimeAdapter:
|
|
1094
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
1094
1095
|
initialPrompt: existingRun.initialPrompt ?? null,
|
|
1095
1096
|
activeRuntimeId: runtimeIdFromRunId(asRunId(runId)),
|
|
1096
1097
|
status: mapLegacySessionStatusToRunStatus(readString(session, "status")),
|
|
@@ -1103,7 +1104,7 @@ function applyLegacyThreadEvent(snapshot, event) {
|
|
|
1103
1104
|
...snapshot.runtimes.find((runtime) => runtime.runId === runId) ?? makeRuntimeFromRun(nextRun, sessionUpdatedAt),
|
|
1104
1105
|
workspaceId: existingRun.workspaceId,
|
|
1105
1106
|
runId: asRunId(runId),
|
|
1106
|
-
adapterKind:
|
|
1107
|
+
adapterKind: CANONICAL_RUNTIME_ADAPTER,
|
|
1107
1108
|
status: mapLegacySessionStatusToRuntimeStatus(readString(session, "status")),
|
|
1108
1109
|
workspaceDir: existingRun.worktreePath,
|
|
1109
1110
|
isolationMode: existingRun.worktreePath ? "worktree" : "env",
|
|
@@ -1337,7 +1338,7 @@ function applyEngineEvent(snapshot, event) {
|
|
|
1337
1338
|
runtimeMode: payload.runtimeMode,
|
|
1338
1339
|
interactionMode: payload.interactionMode,
|
|
1339
1340
|
status: "created",
|
|
1340
|
-
runtimeAdapter:
|
|
1341
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
1341
1342
|
model: payload.model ?? null,
|
|
1342
1343
|
initialPrompt: payload.initialPrompt ?? null,
|
|
1343
1344
|
executionTarget: payload.executionTarget ?? (payload.remoteHostId ? "remote" : "local"),
|
|
@@ -2033,7 +2034,7 @@ function applyEngineEvent(snapshot, event) {
|
|
|
2033
2034
|
runtimeMode: "full-access",
|
|
2034
2035
|
interactionMode: "default",
|
|
2035
2036
|
status: "created",
|
|
2036
|
-
runtimeAdapter:
|
|
2037
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
2037
2038
|
model: null,
|
|
2038
2039
|
initialPrompt: null,
|
|
2039
2040
|
activeRuntimeId: runtimeIdFromRunId(asRunId(runId)),
|
|
@@ -2053,7 +2054,7 @@ function applyEngineEvent(snapshot, event) {
|
|
|
2053
2054
|
workspaceId: asWorkspaceId(workspaceId),
|
|
2054
2055
|
taskId: asTaskId(taskId),
|
|
2055
2056
|
runKind: "task",
|
|
2056
|
-
runtimeAdapter:
|
|
2057
|
+
runtimeAdapter: CANONICAL_RUNTIME_ADAPTER,
|
|
2057
2058
|
activeRuntimeId: runtimeIdFromRunId(asRunId(runId)),
|
|
2058
2059
|
updatedAt: event.createdAt
|
|
2059
2060
|
});
|
|
@@ -61,6 +61,7 @@ export declare function selectRuntimeForRun(snapshot: EngineReadModel | null, ru
|
|
|
61
61
|
readonly pid: number | null;
|
|
62
62
|
readonly stateDir: string | null;
|
|
63
63
|
readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
|
|
64
|
+
readonly adapterKind: "pi";
|
|
64
65
|
readonly workspaceDir: string | null;
|
|
65
66
|
readonly homeDir: string | null;
|
|
66
67
|
readonly tmpDir: string | null;
|
|
@@ -70,7 +71,6 @@ export declare function selectRuntimeForRun(snapshot: EngineReadModel | null, ru
|
|
|
70
71
|
readonly sessionLogPath: string | null;
|
|
71
72
|
readonly exitedAt: string | null;
|
|
72
73
|
readonly runId: string & import("effect/Brand").Brand<"RunId">;
|
|
73
|
-
readonly adapterKind: string;
|
|
74
74
|
readonly sandboxMode: "read-only" | "workspace-write" | "danger-full-access";
|
|
75
75
|
readonly isolationMode: "none" | "env" | "worktree";
|
|
76
76
|
readonly executionTarget?: "remote" | "local" | undefined;
|
|
@@ -84,6 +84,7 @@ export declare function selectLatestRuntimeForTask(snapshot: EngineReadModel | n
|
|
|
84
84
|
readonly pid: number | null;
|
|
85
85
|
readonly stateDir: string | null;
|
|
86
86
|
readonly workspaceId: string & import("effect/Brand").Brand<"WorkspaceId">;
|
|
87
|
+
readonly adapterKind: "pi";
|
|
87
88
|
readonly workspaceDir: string | null;
|
|
88
89
|
readonly homeDir: string | null;
|
|
89
90
|
readonly tmpDir: string | null;
|
|
@@ -93,7 +94,6 @@ export declare function selectLatestRuntimeForTask(snapshot: EngineReadModel | n
|
|
|
93
94
|
readonly sessionLogPath: string | null;
|
|
94
95
|
readonly exitedAt: string | null;
|
|
95
96
|
readonly runId: string & import("effect/Brand").Brand<"RunId">;
|
|
96
|
-
readonly adapterKind: string;
|
|
97
97
|
readonly sandboxMode: "read-only" | "workspace-write" | "danger-full-access";
|
|
98
98
|
readonly isolationMode: "none" | "env" | "worktree";
|
|
99
99
|
readonly executionTarget?: "remote" | "local" | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/core",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.130",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Config and plugin composition library for Rig's OMP extension ecosystem; not a product host/runtime.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"module": "./dist/src/index.js",
|
|
26
26
|
"types": "./dist/src/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.
|
|
28
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.130",
|
|
29
29
|
"effect": "4.0.0-beta.78"
|
|
30
30
|
}
|
|
31
31
|
}
|