@pablopunk/tau 0.0.0-stage → 0.1.1
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/auth-storage-Dk3CUY3q.js +1814 -0
- package/dist/bin.js +23 -0
- package/dist/cli-entry-DcDpQ30L.js +13 -0
- package/dist/client-C91-b2CL.js +1 -0
- package/dist/client-y2WkNuZj.js +7977 -0
- package/dist/dist-BFP19NOO.js +432 -0
- package/dist/dist-Bh1bQHZA.js +38890 -0
- package/dist/dist-Cq73_r65.js +3 -0
- package/dist/esm-CMGh_WhC.js +9446 -0
- package/dist/execute-BeGXhU1O.js +1757 -0
- package/dist/fake-claude-connectors-DSP9UC8d.js +1 -0
- package/dist/fake-claude-connectors-sDLeP10T.js +107 -0
- package/dist/fake-claude-sdk-CvqW_1iQ.js +571 -0
- package/dist/fake-claude-thread-script-2iHHwUZM.js +48 -0
- package/dist/last-exit-write-ksHeHGrC.js +9 -0
- package/dist/latest-version-di9hD7cY.js +106 -0
- package/dist/lib-DIX7q_HJ.js +1460 -0
- package/dist/machines-behind-BjGgmSs_.js +257 -0
- package/dist/main-D-Tg9b5Y.js +1610 -0
- package/dist/manager-B_WHbb1U.js +589 -0
- package/dist/names-cTrEXB6w.js +35 -0
- package/dist/node-BpwblPFP.js +56269 -0
- package/dist/pdfjs-nTcHjDPT.js +69856 -0
- package/dist/photon_rs-DBr7W_rK.js +4252 -0
- package/dist/promise.try-CAAOYvMP.js +1426 -0
- package/dist/readability-DsDNO63a.js +1670 -0
- package/dist/real-deps-f96UmLBz.js +89 -0
- package/dist/rolldown-runtime-1p2KPIdQ.js +44 -0
- package/dist/runtime-i-oEtgAl.js +2721 -0
- package/dist/sdk-missing-CHbVbY1G.js +10 -0
- package/dist/sdk-port-BGw9ORUR.js +215 -0
- package/dist/serve-Cmy0rUWr.js +2932 -0
- package/dist/serve-Dmzn5V0l.js +1 -0
- package/dist/service-command-C74K0saj.js +34 -0
- package/dist/service-command-DqcstJ8e.js +1 -0
- package/dist/shell-CQa4e7rx.js +643 -0
- package/dist/skills/builtin/tau/SKILL.md +51 -0
- package/dist/src-DO9LUlhi.js +44088 -0
- package/dist/streamableHttp-BBaRYV9h.js +1 -0
- package/dist/streamableHttp-DPAoMlJd.js +1931 -0
- package/dist/tool-DBZK2lci.js +14335 -0
- package/dist/tool-server-BjP37EJg.js +40 -0
- package/dist/turndown.cjs-Bo1xLg2S.js +15620 -0
- package/dist/turndown.cjs-jpUF50AR.js +3 -0
- package/dist/types-C4M3CRp2.js +7592 -0
- package/dist/undici-8cI97lnP.js +27110 -0
- package/dist/wait-for-lock-B1Qx8GWg.js +1 -0
- package/dist/wait-for-lock-CrSl2mi1.js +25 -0
- package/dist/watchdog.js +47 -0
- package/dist/web/dist/assets/addon-fit-DIOBYJe3.js +1 -0
- package/dist/web/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/web/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/web/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/web/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/web/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/web/dist/assets/index-BktLKZHR.js +108 -0
- package/dist/web/dist/assets/index-D_Aa3Oou.css +2 -0
- package/dist/web/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/web/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/web/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/web/dist/assets/wght-DMLdVLkb.css +1 -0
- package/dist/web/dist/assets/xterm-BrP-ENHg.css +1 -0
- package/dist/web/dist/assets/xterm-CerOhKYV.js +16 -0
- package/dist/web/dist/favicon.svg +14 -0
- package/dist/web/dist/index.html +25 -0
- package/package.json +53 -4
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { r as waitForUrl } from "./wait-for-lock-CrSl2mi1.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { n as readRunningInstance } from "./src-DO9LUlhi.js";
|
|
2
|
+
//#region src/lifecycle/wait-for-lock.ts
|
|
3
|
+
const LOCK_POLL_MS = 5e3;
|
|
4
|
+
const sleepFor = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
5
|
+
/** `serve --service` waits here while a foreground tau holds the home, so no manager sees an exit loop. */
|
|
6
|
+
async function waitForFreeHome(home, dependencies = {}) {
|
|
7
|
+
const { readInstance = readRunningInstance, sleep = sleepFor, log, intervalMs = LOCK_POLL_MS } = dependencies;
|
|
8
|
+
let announced = false;
|
|
9
|
+
for (let owner = await readInstance(home); owner; owner = await readInstance(home)) {
|
|
10
|
+
if (!announced) log?.(`Another tau (pid ${owner.pid}) holds ${home}. Waiting for it to stop.`);
|
|
11
|
+
announced = true;
|
|
12
|
+
await sleep(intervalMs);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/** Polls until the running server has published its URL. */
|
|
16
|
+
async function waitForUrl(home, dependencies = {}) {
|
|
17
|
+
const { readInstance = readRunningInstance, sleep = sleepFor, intervalMs = 250, attempts = 60 } = dependencies;
|
|
18
|
+
for (let attempt = 0; attempt < attempts; attempt += 1) {
|
|
19
|
+
const info = await readInstance(home);
|
|
20
|
+
if (info?.url) return info;
|
|
21
|
+
await sleep(intervalMs);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { waitForFreeHome as n, waitForUrl as r, LOCK_POLL_MS as t };
|
package/dist/watchdog.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { t as writeLastExitSync } from "./last-exit-write-ksHeHGrC.js";
|
|
2
|
+
import { workerData } from "node:worker_threads";
|
|
3
|
+
//#region ../core/src/watchdog/clock.ts
|
|
4
|
+
const monotonicNow = () => Number(process.hrtime.bigint() / 1000000n);
|
|
5
|
+
/**
|
|
6
|
+
* Called every tick. The counter is bumped by the main thread every second; a counter that does not move for
|
|
7
|
+
* `stallTicks` ticks in a row is a hang. A gap between ticks above `sleepGapMs` (sleep, SIGSTOP) resets the count,
|
|
8
|
+
* so a woken machine gets a full window to beat again before anything is killed.
|
|
9
|
+
*/
|
|
10
|
+
function createWatchdogLoop(options) {
|
|
11
|
+
const stallTicks = options.stallTicks ?? 12;
|
|
12
|
+
const sleepGapMs = options.sleepGapMs ?? 1e4;
|
|
13
|
+
let lastCounter = options.readCounter();
|
|
14
|
+
let lastTickAt = options.now();
|
|
15
|
+
let unchanged = 0;
|
|
16
|
+
return { tick() {
|
|
17
|
+
const at = options.now();
|
|
18
|
+
const counter = options.readCounter();
|
|
19
|
+
const slept = at - lastTickAt > sleepGapMs;
|
|
20
|
+
lastTickAt = at;
|
|
21
|
+
if (slept || counter !== lastCounter) unchanged = 0;
|
|
22
|
+
else unchanged += 1;
|
|
23
|
+
lastCounter = counter;
|
|
24
|
+
if (unchanged >= stallTicks) options.onStall(`no heartbeat for ${unchanged} checks`);
|
|
25
|
+
} };
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region ../core/src/watchdog/worker.ts
|
|
29
|
+
const data = workerData;
|
|
30
|
+
const counter = new Int32Array(data.counter);
|
|
31
|
+
const loop = createWatchdogLoop({
|
|
32
|
+
readCounter: () => Atomics.load(counter, 0),
|
|
33
|
+
now: monotonicNow,
|
|
34
|
+
stallTicks: data.stallTicks,
|
|
35
|
+
sleepGapMs: data.sleepGapMs,
|
|
36
|
+
onStall: (detail) => {
|
|
37
|
+
writeLastExitSync(data.lastExitFile, data.logFile, {
|
|
38
|
+
reason: "watchdog",
|
|
39
|
+
at: Date.now(),
|
|
40
|
+
detail
|
|
41
|
+
});
|
|
42
|
+
process.kill(process.pid, "SIGKILL");
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
setInterval(() => loop.tick(), data.tickMs ?? 5e3);
|
|
46
|
+
//#endregion
|
|
47
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(2,Math.floor(u/e.css.cell.width)),rows:Math.max(1,Math.floor(l/e.css.cell.height))}}};export{e as FitAddon};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|