my-durable 0.0.78 → 0.0.80
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/apps/dpi-backend/src/config.ts +6 -2
- package/apps/dpi-backend/src/store.ts +89 -2
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/{index-BF6mtGF4.css → index-CkTw4GSI.css} +1 -1
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/{index-DAF9D074.js → index-CqQCh8Ch.js} +7 -7
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/index.html +2 -2
- package/apps/dpi-playground/apps/dpi-playground-fe/src/client/git-rules.ts +6 -2
- package/apps/dpi-playground/apps/dpi-playground-fe/src/components/GitPanel.vue +16 -3
- package/apps/dpi-sdk/src/api.ts +4 -0
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<meta name="referrer" content="no-referrer" />
|
|
8
8
|
<link rel="icon" type="image/svg+xml" href="/icons/durable-pi.svg" />
|
|
9
9
|
<title>Durable Pi | Network</title>
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-CqQCh8Ch.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CkTw4GSI.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="app"></div>
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
// it without a cycle.
|
|
6
6
|
export interface GitDeviceFacts {
|
|
7
7
|
startDirs?: unknown;
|
|
8
|
+
/** run-8: the device's own served set (start dirs + session folders). Preferred
|
|
9
|
+
* when present — the FE must judge with the same list the enforcer uses. */
|
|
10
|
+
gitDirs?: unknown;
|
|
8
11
|
platform?: unknown;
|
|
9
12
|
}
|
|
10
13
|
|
|
@@ -19,7 +22,7 @@ export function normGitPath(p: string, win: boolean): string {
|
|
|
19
22
|
/** True when the device's start dirs are unknown (allow: the device decides) or
|
|
20
23
|
* `path` IS a start dir / lives under one. */
|
|
21
24
|
export function pathUnderStartDirs(info: GitDeviceFacts | undefined, path: string): boolean {
|
|
22
|
-
const dirs = info?.startDirs;
|
|
25
|
+
const dirs = Array.isArray(info?.gitDirs) && info.gitDirs.length ? info.gitDirs : info?.startDirs;
|
|
23
26
|
if (!Array.isArray(dirs) || dirs.length === 0) return true;
|
|
24
27
|
const win = String(info?.platform ?? "").startsWith("win32");
|
|
25
28
|
const a = normGitPath(path, win);
|
|
@@ -31,7 +34,8 @@ export function pathUnderStartDirs(info: GitDeviceFacts | undefined, path: strin
|
|
|
31
34
|
|
|
32
35
|
/** Operator-facing sentence naming the roots the device actually serves. */
|
|
33
36
|
export function outsideStartDirsReason(info: GitDeviceFacts | undefined): string {
|
|
34
|
-
const
|
|
37
|
+
const source = Array.isArray(info?.gitDirs) && info.gitDirs.length ? info.gitDirs : info?.startDirs;
|
|
38
|
+
const dirs = Array.isArray(source) ? (source as unknown[]).map(String) : [];
|
|
35
39
|
return dirs.length
|
|
36
40
|
? `outside the device's start dirs (it serves: ${dirs.join(", ")})`
|
|
37
41
|
: "outside the device's start dirs";
|
|
@@ -48,6 +48,14 @@ const loading = computed(() => entry.value.loading);
|
|
|
48
48
|
/** run-8 (live report): a folder the device does not serve is NOT a transient
|
|
49
49
|
* failure — a retry re-runs the same local verdict forever. Render it as a
|
|
50
50
|
* callout that names the served dirs and says what would actually fix it. */
|
|
51
|
+
/** Device platform decides the DPI_START_DIRS separator in the hint. */
|
|
52
|
+
const winDevice = computed(() =>
|
|
53
|
+
String(
|
|
54
|
+
(network.devices.value.find((d) => d.id === devId.value) as { info?: { platform?: unknown } } | undefined)?.info
|
|
55
|
+
?.platform ?? "",
|
|
56
|
+
).startsWith("win32"),
|
|
57
|
+
);
|
|
58
|
+
|
|
51
59
|
const unserved = computed(() => {
|
|
52
60
|
const e = entry.value;
|
|
53
61
|
if (!e.error || !/start dirs/i.test(e.error)) return "";
|
|
@@ -915,12 +923,17 @@ const laneX = (lane: number) => lane * 12 + 7;
|
|
|
915
923
|
fixed by retrying — name the roots it does serve and the real fix. -->
|
|
916
924
|
<div v-if="unserved" class="message-error">
|
|
917
925
|
<p>
|
|
918
|
-
<strong>{{ cwd }}</strong> is
|
|
926
|
+
<strong>{{ cwd }}</strong> is outside the folders this device serves — it serves
|
|
919
927
|
<code>{{ unserved }}</code>.
|
|
920
928
|
</p>
|
|
921
929
|
<p class="muted-line">
|
|
922
|
-
|
|
923
|
-
the
|
|
930
|
+
Your session and its history are intact, and the agent still runs in that folder; only the Git and Files panels
|
|
931
|
+
(the device's HTTP surface) are confined. Nothing has to be recreated: add the folder to
|
|
932
|
+
<code>DPI_START_DIRS</code> and restart the device, and this panel works again for the same session.
|
|
933
|
+
</p>
|
|
934
|
+
<p class="muted-line">
|
|
935
|
+
Example ({{ winDevice ? "Windows: separate with ;" : "Linux/macOS: separate with :" }}) —
|
|
936
|
+
<code>{{ winDevice ? "setx DPI_START_DIRS \"%USERPROFILE%\\dpi-work;D:\\source\"" : "DPI_START_DIRS=\"$HOME/dpi-work:/srv/src\"" }}</code>
|
|
924
937
|
</p>
|
|
925
938
|
</div>
|
|
926
939
|
<p v-else-if="error" class="message-error">{{ error }} <button @click="refresh()">retry</button></p>
|
package/apps/dpi-sdk/src/api.ts
CHANGED
|
@@ -99,6 +99,10 @@ export interface DeviceInfo {
|
|
|
99
99
|
startedAt: number;
|
|
100
100
|
/** Where new sessions start: the directory browser opens here, relative cwds resolve against the first. */
|
|
101
101
|
startDirs: string[];
|
|
102
|
+
/** Folders this device will serve git/files for: the start dirs plus the
|
|
103
|
+
* folders that already host a session (a narrowed start-dir list must not
|
|
104
|
+
* strand a live session's panels). Clients pre-check with this when present. */
|
|
105
|
+
gitDirs?: string[];
|
|
102
106
|
models: ModelInfo[];
|
|
103
107
|
defaultModel: string;
|
|
104
108
|
/** Provider id of this device ("openrouter" | "faux"); FE model fallback. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-durable",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.80",
|
|
4
4
|
"description": "Durable Pi — the durable agent network: hub web UI, device backend daemon, TUI admin and the shared SDK, packaged as one runnable monorepo install",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|