@pablopunk/tau 0.0.0-stage → 0.1.0

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.
Files changed (64) hide show
  1. package/dist/auth-storage-Dk3CUY3q.js +1814 -0
  2. package/dist/bin.js +23 -0
  3. package/dist/cli-entry-DcDpQ30L.js +13 -0
  4. package/dist/client-C91-b2CL.js +1 -0
  5. package/dist/client-y2WkNuZj.js +7977 -0
  6. package/dist/dist-BFP19NOO.js +432 -0
  7. package/dist/dist-Bh1bQHZA.js +38890 -0
  8. package/dist/dist-Cq73_r65.js +3 -0
  9. package/dist/esm-CMGh_WhC.js +9446 -0
  10. package/dist/execute-BeGXhU1O.js +1757 -0
  11. package/dist/fake-claude-connectors-DSP9UC8d.js +1 -0
  12. package/dist/fake-claude-connectors-sDLeP10T.js +107 -0
  13. package/dist/fake-claude-sdk-CvqW_1iQ.js +571 -0
  14. package/dist/fake-claude-thread-script-2iHHwUZM.js +48 -0
  15. package/dist/last-exit-write-ksHeHGrC.js +9 -0
  16. package/dist/lib-DIX7q_HJ.js +1460 -0
  17. package/dist/main-CI9q691u.js +1490 -0
  18. package/dist/names-cTrEXB6w.js +35 -0
  19. package/dist/node-BpwblPFP.js +56269 -0
  20. package/dist/pdfjs-nTcHjDPT.js +69856 -0
  21. package/dist/photon_rs-DBr7W_rK.js +4252 -0
  22. package/dist/promise.try-CAAOYvMP.js +1426 -0
  23. package/dist/readability-DsDNO63a.js +1670 -0
  24. package/dist/rolldown-runtime-1p2KPIdQ.js +44 -0
  25. package/dist/runtime-i-oEtgAl.js +2721 -0
  26. package/dist/sdk-missing-CHbVbY1G.js +10 -0
  27. package/dist/sdk-port-BGw9ORUR.js +215 -0
  28. package/dist/serve-92lMbcls.js +2958 -0
  29. package/dist/serve-BcVZj5e2.js +1 -0
  30. package/dist/service-command-BVr33vlP.js +1 -0
  31. package/dist/service-command-C7WDeeR2.js +621 -0
  32. package/dist/shell-CQa4e7rx.js +643 -0
  33. package/dist/skills/builtin/tau/SKILL.md +51 -0
  34. package/dist/streamableHttp-BBaRYV9h.js +1 -0
  35. package/dist/streamableHttp-DPAoMlJd.js +1931 -0
  36. package/dist/tool-DBZK2lci.js +14335 -0
  37. package/dist/tool-server-BjP37EJg.js +40 -0
  38. package/dist/turndown.cjs-Bo1xLg2S.js +15620 -0
  39. package/dist/turndown.cjs-jpUF50AR.js +3 -0
  40. package/dist/types-C4M3CRp2.js +7592 -0
  41. package/dist/undici-8cI97lnP.js +27110 -0
  42. package/dist/wait-for-lock-BMk6v3J5.js +1 -0
  43. package/dist/wait-for-lock-D2V3vuye.js +43951 -0
  44. package/dist/watchdog.js +47 -0
  45. package/dist/web/dist/assets/addon-fit-DIOBYJe3.js +1 -0
  46. package/dist/web/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  47. package/dist/web/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  48. package/dist/web/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  49. package/dist/web/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  50. package/dist/web/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  51. package/dist/web/dist/assets/index--f7AYPm0.js +108 -0
  52. package/dist/web/dist/assets/index-7m0crRNF.css +2 -0
  53. package/dist/web/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  54. package/dist/web/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  55. package/dist/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  56. package/dist/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  57. package/dist/web/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  58. package/dist/web/dist/assets/wght-DMLdVLkb.css +1 -0
  59. package/dist/web/dist/assets/xterm-BrP-ENHg.css +1 -0
  60. package/dist/web/dist/assets/xterm-CerOhKYV.js +16 -0
  61. package/dist/web/dist/favicon.svg +14 -0
  62. package/dist/web/dist/index.html +25 -0
  63. package/package.json +53 -4
  64. package/README.md +0 -3
@@ -0,0 +1,48 @@
1
+ //#region ../core/src/claude-cli/testing/fake-claude-thread-script.ts
2
+ const FAKE_CLAUDE_REPLY = "Fake Claude reply.";
3
+ const FAKE_CLAUDE_TOOL_REPLY = "Fake Claude ran the tool.";
4
+ const TOOL_COMMAND = /^(bash|read) (.+)/s;
5
+ const toolArguments = (tool, rest) => tool === "bash" ? { command: rest } : { path: rest };
6
+ function toolSteps(tool, rest) {
7
+ return [{
8
+ kind: "tools",
9
+ calls: [{
10
+ name: tool,
11
+ arguments: toolArguments(tool, rest)
12
+ }]
13
+ }, {
14
+ kind: "text",
15
+ text: FAKE_CLAUDE_TOOL_REPLY
16
+ }];
17
+ }
18
+ const CONNECTOR_COMMAND = /^connector (\S+) (\S+)/;
19
+ const fakeConnectorResult = (tool) => `Fake connector result for ${tool}.`;
20
+ function connectorSteps(server, tool) {
21
+ return [{
22
+ kind: "tools",
23
+ calls: [{
24
+ name: tool,
25
+ arguments: {},
26
+ connector: {
27
+ server: `claude.ai ${server}`,
28
+ result: fakeConnectorResult(tool)
29
+ }
30
+ }]
31
+ }, {
32
+ kind: "text",
33
+ text: FAKE_CLAUDE_TOOL_REPLY
34
+ }];
35
+ }
36
+ /** The script behind `TAU_FAKE_CLAUDE_CLI=1`: "bash <command>" and "read <path>" call that Pi tool, anything else gets a reply. */
37
+ const fakeThreadScript = (_turn, firstUserText, hasTools) => {
38
+ const connector = hasTools ? CONNECTOR_COMMAND.exec(firstUserText.trim()) : null;
39
+ if (connector?.[1] && connector[2]) return connectorSteps(connector[1], connector[2]);
40
+ const match = hasTools ? TOOL_COMMAND.exec(firstUserText.trim()) : null;
41
+ if (match?.[1] && match[2]) return toolSteps(match[1], match[2]);
42
+ return [{
43
+ kind: "text",
44
+ text: FAKE_CLAUDE_REPLY
45
+ }];
46
+ };
47
+ //#endregion
48
+ export { fakeThreadScript };
@@ -0,0 +1,9 @@
1
+ import { appendFileSync, writeFileSync } from "node:fs";
2
+ //#region ../core/src/watchdog/last-exit-write.ts
3
+ /** Synchronous on purpose: the watchdog writes this just before it kills the process. */
4
+ function writeLastExitSync(file, logFile, exit) {
5
+ writeFileSync(file, `${JSON.stringify(exit)}\n`, { mode: 384 });
6
+ if (logFile && exit.reason === "watchdog") appendFileSync(logFile, `tau: watchdog killed the server (${exit.detail ?? exit.reason})\n`);
7
+ }
8
+ //#endregion
9
+ export { writeLastExitSync as t };