my-durable 0.0.21 → 0.0.22

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.
@@ -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-Cv3w8azJ.js"></script>
11
- <link rel="stylesheet" crossorigin href="/assets/index-BvDyZN2S.css">
10
+ <script type="module" crossorigin src="/assets/index-D7bC_-V3.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-D5Ehu13_.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="app"></div>
@@ -35,7 +35,7 @@ if (!import.meta.env.SSR) void refresh();
35
35
  onServerPrefetch(() => refresh());
36
36
  watch(cwd, () => void refresh());
37
37
  onMounted(() => {
38
- timer = setInterval(refresh, 15000);
38
+ timer = setInterval(refresh, 60000);
39
39
  });
40
40
  onBeforeUnmount(() => timer && clearInterval(timer));
41
41
 
@@ -31,9 +31,12 @@ async function refresh() {
31
31
  const first = !status.value;
32
32
  if (first) loading.value = true;
33
33
  else refreshing.value = true;
34
+ error.value = ""; // a new attempt must not stack on the old verdict
34
35
  inFlight = (async () => {
35
36
  try {
36
- status.value = await c.gitStatus(cwd.value);
37
+ // Big checkouts honestly take 20s+ (measured on the operator's repo):
38
+ // wait for the truth instead of declaring the device unreachable.
39
+ status.value = await c.gitStatus(cwd.value, { timeoutMs: 60_000 });
37
40
  error.value = "";
38
41
  } catch (e) {
39
42
  const raw = (e as Error).message ?? "";
@@ -57,7 +60,7 @@ async function refresh() {
57
60
  if (!import.meta.env.SSR) void refresh();
58
61
  onServerPrefetch(() => refresh());
59
62
  onMounted(() => {
60
- timer = setInterval(refresh, 10000);
63
+ timer = setInterval(refresh, 30000);
61
64
  });
62
65
  onBeforeUnmount(() => timer && clearInterval(timer));
63
66
  // The operator switching sessions changes cwd — refetch for the new folder.
@@ -169,9 +169,10 @@ export class DpiClient {
169
169
  }
170
170
 
171
171
  // ------------------------------------------------------------ git
172
- /** Structured git status for a folder on the device (repo:false when none). */
173
- gitStatus(path: string) {
174
- return this.request<GitStatus>("GET", `/v1/git/status?path=${enc(path)}`);
172
+ /** Structured git status for a folder on the device (repo:false when none).
173
+ * Big Windows repos can honestly take 20s+ — pass a longer timeoutMs. */
174
+ gitStatus(path: string, options: { timeoutMs?: number } = {}) {
175
+ return this.request<GitStatus>("GET", `/v1/git/status?path=${enc(path)}`, undefined, options);
175
176
  }
176
177
  /** One whitelisted git operation; see the device's git.ts for the op list. */
177
178
  gitOp(path: string, op: GitOpName, opts: { ref?: string; branch?: string; message?: string; target?: string } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Durable Pi \u2014 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": {