piclaw 0.0.4 → 0.0.6

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 (185) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/dist-D51xeTP2.js +12 -0
  3. package/.output/public/assets/index-B3x2_en6.css +1 -0
  4. package/.output/public/assets/index-SfjxJZSD.js +38 -0
  5. package/.output/public/assets/md4x-CNLJ57xO.wasm +0 -0
  6. package/.output/public/assets/md4x-CyfQToGJ.js +1 -0
  7. package/.output/public/assets/wasm-Cm7RZrwg.js +1 -0
  8. package/.output/public/icon.svg +25 -0
  9. package/.output/public/index.html +3 -2
  10. package/.output/public/manifest.json +1 -1
  11. package/.output/server/_chunks/bun.mjs +49 -0
  12. package/.output/server/_chunks/commands.mjs +280 -0
  13. package/.output/server/_chunks/config.mjs +2 -4
  14. package/.output/server/_chunks/db.mjs +11 -5
  15. package/.output/server/_chunks/logger.mjs +1 -1
  16. package/.output/server/_chunks/node.mjs +31 -0
  17. package/.output/server/_chunks/ntfy.mjs +45 -0
  18. package/.output/server/_chunks/pi.mjs +33 -1
  19. package/.output/server/_chunks/renderer-template.mjs +1 -1
  20. package/.output/server/_chunks/{bootstrap.mjs → server.mjs} +203 -205
  21. package/.output/server/_chunks/session.mjs +249 -40
  22. package/.output/server/_chunks/settings.mjs +1 -1
  23. package/.output/server/_chunks/terminal.mjs +35 -20
  24. package/.output/server/_chunks/virtual.mjs +129 -0
  25. package/.output/server/_jid_.delete.mjs +2 -2
  26. package/.output/server/_jid_.patch.mjs +30 -3
  27. package/.output/server/_jid_2.delete.mjs +2 -2
  28. package/.output/server/_libs/@aws-sdk/client-bedrock-runtime+[...].mjs +13148 -13149
  29. package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +1 -1
  30. package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +2 -2
  31. package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +1 -1
  32. package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +1 -1
  33. package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +1 -1
  34. package/.output/server/_libs/@google/genai.mjs +2 -2
  35. package/.output/server/_libs/@mariozechner/pi-agent-core+[...].mjs +40 -74
  36. package/.output/server/_libs/@mariozechner/pi-coding-agent+[...].mjs +1315 -1210
  37. package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +3 -3
  38. package/.output/server/_libs/_.mjs +3 -2
  39. package/.output/server/_libs/_100.mjs +3 -0
  40. package/.output/server/_libs/_101.mjs +2 -0
  41. package/.output/server/_libs/_102.mjs +3 -0
  42. package/.output/server/_libs/_103.mjs +2 -0
  43. package/.output/server/_libs/_16.mjs +2 -5
  44. package/.output/server/_libs/_17.mjs +2 -3
  45. package/.output/server/_libs/_18.mjs +2 -3
  46. package/.output/server/_libs/_19.mjs +2 -4
  47. package/.output/server/_libs/_2.mjs +2 -3
  48. package/.output/server/_libs/_20.mjs +2 -2
  49. package/.output/server/_libs/_21.mjs +2 -0
  50. package/.output/server/_libs/_22.mjs +2 -0
  51. package/.output/server/_libs/_23.mjs +2 -0
  52. package/.output/server/_libs/_24.mjs +2 -0
  53. package/.output/server/_libs/_25.mjs +2 -0
  54. package/.output/server/_libs/_26.mjs +2 -0
  55. package/.output/server/_libs/_27.mjs +2 -0
  56. package/.output/server/_libs/_28.mjs +2 -0
  57. package/.output/server/_libs/_29.mjs +2 -0
  58. package/.output/server/_libs/_30.mjs +2 -0
  59. package/.output/server/_libs/_31.mjs +2 -0
  60. package/.output/server/_libs/_32.mjs +2 -0
  61. package/.output/server/_libs/_33.mjs +2 -0
  62. package/.output/server/_libs/_34.mjs +2 -0
  63. package/.output/server/_libs/_35.mjs +2 -0
  64. package/.output/server/_libs/_36.mjs +2 -0
  65. package/.output/server/_libs/_37.mjs +2 -0
  66. package/.output/server/_libs/_38.mjs +2 -0
  67. package/.output/server/_libs/_39.mjs +2 -0
  68. package/.output/server/_libs/_40.mjs +2 -0
  69. package/.output/server/_libs/_41.mjs +2 -0
  70. package/.output/server/_libs/_42.mjs +2 -0
  71. package/.output/server/_libs/_43.mjs +2 -0
  72. package/.output/server/_libs/_44.mjs +2 -0
  73. package/.output/server/_libs/_45.mjs +2 -0
  74. package/.output/server/_libs/_46.mjs +2 -0
  75. package/.output/server/_libs/_47.mjs +2 -0
  76. package/.output/server/_libs/_48.mjs +2 -0
  77. package/.output/server/_libs/_49.mjs +2 -0
  78. package/.output/server/_libs/_50.mjs +2 -0
  79. package/.output/server/_libs/_51.mjs +2 -0
  80. package/.output/server/_libs/_52.mjs +2 -0
  81. package/.output/server/_libs/_53.mjs +2 -0
  82. package/.output/server/_libs/_54.mjs +2 -0
  83. package/.output/server/_libs/_55.mjs +2 -0
  84. package/.output/server/_libs/_56.mjs +2 -0
  85. package/.output/server/_libs/_57.mjs +2 -0
  86. package/.output/server/_libs/_58.mjs +2 -0
  87. package/.output/server/_libs/_59.mjs +2 -0
  88. package/.output/server/_libs/_60.mjs +2 -0
  89. package/.output/server/_libs/_61.mjs +2 -0
  90. package/.output/server/_libs/_62.mjs +2 -0
  91. package/.output/server/_libs/_63.mjs +2 -0
  92. package/.output/server/_libs/_64.mjs +2 -0
  93. package/.output/server/_libs/_65.mjs +2 -0
  94. package/.output/server/_libs/_66.mjs +2 -0
  95. package/.output/server/_libs/_67.mjs +2 -0
  96. package/.output/server/_libs/_68.mjs +2 -0
  97. package/.output/server/_libs/_69.mjs +2 -0
  98. package/.output/server/_libs/_70.mjs +2 -0
  99. package/.output/server/_libs/_71.mjs +2 -0
  100. package/.output/server/_libs/_72.mjs +2 -0
  101. package/.output/server/_libs/_73.mjs +2 -0
  102. package/.output/server/_libs/_74.mjs +2 -0
  103. package/.output/server/_libs/_75.mjs +2 -0
  104. package/.output/server/_libs/_76.mjs +2 -0
  105. package/.output/server/_libs/_77.mjs +2 -0
  106. package/.output/server/_libs/_78.mjs +2 -0
  107. package/.output/server/_libs/_79.mjs +2 -0
  108. package/.output/server/_libs/_80.mjs +2 -0
  109. package/.output/server/_libs/_81.mjs +2 -0
  110. package/.output/server/_libs/_82.mjs +2 -0
  111. package/.output/server/_libs/_83.mjs +2 -0
  112. package/.output/server/_libs/_84.mjs +2 -0
  113. package/.output/server/_libs/_85.mjs +2 -0
  114. package/.output/server/_libs/_86.mjs +2 -0
  115. package/.output/server/_libs/_87.mjs +2 -0
  116. package/.output/server/_libs/_88.mjs +2 -0
  117. package/.output/server/_libs/_89.mjs +2 -0
  118. package/.output/server/_libs/_90.mjs +2 -0
  119. package/.output/server/_libs/_91.mjs +2 -0
  120. package/.output/server/_libs/_92.mjs +2 -0
  121. package/.output/server/_libs/_93.mjs +2 -0
  122. package/.output/server/_libs/_94.mjs +2 -0
  123. package/.output/server/_libs/_95.mjs +2 -0
  124. package/.output/server/_libs/_96.mjs +2 -0
  125. package/.output/server/_libs/_97.mjs +2 -0
  126. package/.output/server/_libs/_98.mjs +2 -0
  127. package/.output/server/_libs/_99.mjs +5 -0
  128. package/.output/server/_libs/amdefine.mjs +188 -0
  129. package/.output/server/_libs/aws-sdk__nested-clients.mjs +1 -1
  130. package/.output/server/_libs/compressjs.mjs +50 -0
  131. package/.output/server/_libs/diff.mjs +137 -0
  132. package/.output/server/_libs/get-uri.mjs +1 -1
  133. package/.output/server/_libs/http-proxy-agent.mjs +1 -1
  134. package/.output/server/_libs/https-proxy-agent.mjs +1 -1
  135. package/.output/server/_libs/just-bash+[...].mjs +80359 -0
  136. package/.output/server/_libs/md4x.mjs +73 -0
  137. package/.output/server/_libs/mixmark-io__domino.mjs +14801 -0
  138. package/.output/server/_libs/node-fetch.mjs +1 -1
  139. package/.output/server/_libs/node-liblzma.mjs +1107 -0
  140. package/.output/server/_libs/pac-proxy-agent+[...].mjs +1 -1
  141. package/.output/server/_libs/proxy-agent+proxy-from-env.mjs +1 -1
  142. package/.output/server/_libs/smithy__core.mjs +1 -1
  143. package/.output/server/_routes/api/files/delete.mjs +2 -2
  144. package/.output/server/_routes/api/files/groups.mjs +14 -0
  145. package/.output/server/_routes/api/files/raw.mjs +1 -1
  146. package/.output/server/_routes/api/files/read.mjs +1 -1
  147. package/.output/server/_routes/api/files/watch.mjs +1 -1
  148. package/.output/server/_routes/api/files/write.mjs +3 -2
  149. package/.output/server/_routes/api/files.mjs +1 -1
  150. package/.output/server/_routes/api/groups.mjs +2 -2
  151. package/.output/server/_routes/api/groups2.mjs +3 -2
  152. package/.output/server/_routes/api/health.mjs +2 -2
  153. package/.output/server/_routes/api/logs.mjs +4 -2
  154. package/.output/server/_routes/api/ntfy/setup.mjs +54 -0
  155. package/.output/server/_routes/api/ntfy/status.mjs +12 -0
  156. package/.output/server/_routes/api/pi/apikey.mjs +1 -1
  157. package/.output/server/_routes/api/pi/apikey_providers.mjs +1 -1
  158. package/.output/server/_routes/api/pi/commands.mjs +6 -0
  159. package/.output/server/_routes/api/pi/login/events.mjs +1 -1
  160. package/.output/server/_routes/api/pi/login/respond.mjs +1 -1
  161. package/.output/server/_routes/api/pi/login.mjs +1 -1
  162. package/.output/server/_routes/api/pi/logout.mjs +1 -1
  163. package/.output/server/_routes/api/pi/models.mjs +1 -1
  164. package/.output/server/_routes/api/pi/status.mjs +1 -1
  165. package/.output/server/_routes/api/send.mjs +22 -3
  166. package/.output/server/_routes/api/status.mjs +9 -7
  167. package/.output/server/_routes/api/tasks2.mjs +2 -2
  168. package/.output/server/_routes/api/telegram/setup.mjs +2 -2
  169. package/.output/server/_routes/api/telegram/status.mjs +2 -2
  170. package/.output/server/_routes/api/terminal2.mjs +3 -2
  171. package/.output/server/_utils.mjs +12 -4
  172. package/.output/server/build/md4x.wasm +0 -0
  173. package/.output/server/index.mjs +223 -149
  174. package/.output/server/node_modules/@mongodb-js/zstd/lib/index.js +55 -0
  175. package/.output/server/node_modules/@mongodb-js/zstd/package.json +51 -0
  176. package/.output/server/package.json +1 -0
  177. package/README.md +118 -24
  178. package/bin/piclaw.mjs +39 -1
  179. package/package.json +16 -13
  180. package/.output/public/assets/client-TIs-Ghqj.js +0 -9
  181. package/.output/public/assets/dist-BVjfG3ok.js +0 -12
  182. package/.output/public/assets/dist-DJh8l6yS.js +0 -1
  183. package/.output/public/assets/index-BNNEMkNV.js +0 -39
  184. package/.output/public/assets/index-CdWBxO5V.css +0 -1
  185. package/.output/public/assets/react-DFP7nCmh.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { a as __require, o as __toCommonJS, t as __commonJSMin } from "../_runtime.mjs";
2
- import { A as init_dist_es$20, C as init_dist_es$15, D as init_dist_es$11, E as dist_es_exports$11, F as require_dist_cjs, Ft as require_client, G as dist_es_exports$17, H as init_dist_es$2, I as dist_es_exports$1, J as init_dist_es$16, K as init_dist_es$17, L as init_dist_es$1, M as init_dist_es$8, N as dist_es_exports$19, P as init_dist_es$19, R as dist_es_exports$4, S as dist_es_exports$15, T as init_dist_es$21, U as dist_es_exports$18, V as dist_es_exports$2, W as init_dist_es$18, Y as require_dist_cjs$1, _ as init_dist_es$9, at as init_dist_es$3, b as dist_es_exports$10, bt as dist_es_exports$23, ct as init_dist_es, d as require_protocols, dt as dist_es_exports$5, f as dist_es_exports$14, ft as init_dist_es$5, g as dist_es_exports$9, gt as init_dist_es$12, h as init_dist_es$13, ht as dist_es_exports$12, it as dist_es_exports$3, j as dist_es_exports$8, k as dist_es_exports$20, l as dist_es_exports$22, m as dist_es_exports$13, mt as init_dist_es$6, ot as require_schema, p as init_dist_es$14, pt as dist_es_exports$6, q as dist_es_exports$16, st as dist_es_exports, u as init_dist_es$22, v as dist_es_exports$7, w as dist_es_exports$21, x as init_dist_es$10, xt as init_dist_es$23, y as init_dist_es$7, z as init_dist_es$4 } from "./@aws-sdk/client-bedrock-runtime+[...].mjs";
2
+ import { $ as require_client, A as init_dist_es$15, At as init_dist_es$17, Ct as dist_es_exports$6, D as dist_es_exports$10, Dt as dist_es_exports$18, Et as init_dist_es, G as init_dist_es$20, J as dist_es_exports$19, K as dist_es_exports$8, M as init_dist_es$21, Mt as init_dist_es$16, N as dist_es_exports$11, Nt as dist_es_exports$23, O as init_dist_es$10, Ot as init_dist_es$18, P as init_dist_es$11, Pt as init_dist_es$23, Q as init_dist_es$3, St as init_dist_es$5, Tt as dist_es_exports, W as dist_es_exports$20, X as require_dist_cjs, Y as init_dist_es$19, Z as dist_es_exports$3, _ as init_dist_es$9, _t as init_dist_es$12, at as dist_es_exports$1, ct as init_dist_es$4, d as require_protocols, dt as init_dist_es$2, f as dist_es_exports$14, ft as require_dist_cjs$1, g as dist_es_exports$9, gt as dist_es_exports$12, h as init_dist_es$13, j as dist_es_exports$21, jt as dist_es_exports$16, k as dist_es_exports$15, kt as dist_es_exports$17, l as dist_es_exports$22, m as dist_es_exports$13, ot as init_dist_es$1, p as init_dist_es$14, pt as require_schema, q as init_dist_es$8, st as dist_es_exports$4, u as init_dist_es$22, ut as dist_es_exports$2, v as dist_es_exports$7, wt as init_dist_es$6, xt as dist_es_exports$5, y as init_dist_es$7 } from "./@aws-sdk/client-bedrock-runtime+[...].mjs";
3
3
  import { n as init_package, r as package_exports } from "./@aws-sdk/credential-provider-sso+[...].mjs";
4
4
  var require_httpAuthSchemeProvider$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,50 @@
1
+ import { t as __commonJSMin } from "../_runtime.mjs";
2
+ import { t as require_amdefine } from "./amdefine.mjs";
3
+ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
+ if (typeof define !== "function") var define = require_amdefine()(module);
5
+ define([
6
+ "./lib/freeze",
7
+ "./lib/BitStream",
8
+ "./lib/Stream",
9
+ "./lib/BWT",
10
+ "./lib/Context1Model",
11
+ "./lib/DefSumModel",
12
+ "./lib/FenwickModel",
13
+ "./lib/MTFModel",
14
+ "./lib/NoModel",
15
+ "./lib/Huffman",
16
+ "./lib/RangeCoder",
17
+ "./lib/BWTC",
18
+ "./lib/Bzip2",
19
+ "./lib/Dmc",
20
+ "./lib/Lzjb",
21
+ "./lib/LzjbR",
22
+ "./lib/Lzp3",
23
+ "./lib/PPM",
24
+ "./lib/Simple"
25
+ ], function(freeze, BitStream, Stream, BWT, Context1Model, DefSumModel, FenwickModel, MTFModel, NoModel, Huffman, RangeCoder, BWTC, Bzip2, Dmc, Lzjb, LzjbR, Lzp3, PPM, Simple) {
26
+ "use strict";
27
+ return freeze({
28
+ version: "0.0.1",
29
+ BitStream,
30
+ Stream,
31
+ BWT,
32
+ Context1Model,
33
+ DefSumModel,
34
+ FenwickModel,
35
+ MTFModel,
36
+ NoModel,
37
+ Huffman,
38
+ RangeCoder,
39
+ BWTC,
40
+ Bzip2,
41
+ Dmc,
42
+ Lzjb,
43
+ LzjbR,
44
+ Lzp3,
45
+ PPM,
46
+ Simple
47
+ });
48
+ });
49
+ }));
50
+ export { require_main as t };
@@ -0,0 +1,137 @@
1
+ import { c as diffLines } from "./@mariozechner/pi-coding-agent+[...].mjs";
2
+ const INCLUDE_HEADERS = {
3
+ includeIndex: true,
4
+ includeUnderline: true,
5
+ includeFileHeaders: true
6
+ };
7
+ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
8
+ let optionsObj;
9
+ if (!options) optionsObj = {};
10
+ else if (typeof options === "function") optionsObj = { callback: options };
11
+ else optionsObj = options;
12
+ if (typeof optionsObj.context === "undefined") optionsObj.context = 4;
13
+ const context = optionsObj.context;
14
+ if (optionsObj.newlineIsToken) throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");
15
+ if (!optionsObj.callback) return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj));
16
+ else {
17
+ const { callback } = optionsObj;
18
+ diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => {
19
+ callback(diffLinesResultToPatch(diff));
20
+ } }));
21
+ }
22
+ function diffLinesResultToPatch(diff) {
23
+ if (!diff) return;
24
+ diff.push({
25
+ value: "",
26
+ lines: []
27
+ });
28
+ function contextLines(lines) {
29
+ return lines.map(function(entry) {
30
+ return " " + entry;
31
+ });
32
+ }
33
+ const hunks = [];
34
+ let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
35
+ for (let i = 0; i < diff.length; i++) {
36
+ const current = diff[i], lines = current.lines || splitLines(current.value);
37
+ current.lines = lines;
38
+ if (current.added || current.removed) {
39
+ if (!oldRangeStart) {
40
+ const prev = diff[i - 1];
41
+ oldRangeStart = oldLine;
42
+ newRangeStart = newLine;
43
+ if (prev) {
44
+ curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : [];
45
+ oldRangeStart -= curRange.length;
46
+ newRangeStart -= curRange.length;
47
+ }
48
+ }
49
+ for (const line of lines) curRange.push((current.added ? "+" : "-") + line);
50
+ if (current.added) newLine += lines.length;
51
+ else oldLine += lines.length;
52
+ } else {
53
+ if (oldRangeStart) if (lines.length <= context * 2 && i < diff.length - 2) for (const line of contextLines(lines)) curRange.push(line);
54
+ else {
55
+ const contextSize = Math.min(lines.length, context);
56
+ for (const line of contextLines(lines.slice(0, contextSize))) curRange.push(line);
57
+ const hunk = {
58
+ oldStart: oldRangeStart,
59
+ oldLines: oldLine - oldRangeStart + contextSize,
60
+ newStart: newRangeStart,
61
+ newLines: newLine - newRangeStart + contextSize,
62
+ lines: curRange
63
+ };
64
+ hunks.push(hunk);
65
+ oldRangeStart = 0;
66
+ newRangeStart = 0;
67
+ curRange = [];
68
+ }
69
+ oldLine += lines.length;
70
+ newLine += lines.length;
71
+ }
72
+ }
73
+ for (const hunk of hunks) for (let i = 0; i < hunk.lines.length; i++) if (hunk.lines[i].endsWith("\n")) hunk.lines[i] = hunk.lines[i].slice(0, -1);
74
+ else {
75
+ hunk.lines.splice(i + 1, 0, "\");
76
+ i++;
77
+ }
78
+ return {
79
+ oldFileName,
80
+ newFileName,
81
+ oldHeader,
82
+ newHeader,
83
+ hunks
84
+ };
85
+ }
86
+ }
87
+ /**
88
+ * creates a unified diff patch.
89
+ * @param patch either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`)
90
+ */
91
+ function formatPatch(patch, headerOptions) {
92
+ if (!headerOptions) headerOptions = INCLUDE_HEADERS;
93
+ if (Array.isArray(patch)) {
94
+ if (patch.length > 1 && !headerOptions.includeFileHeaders) throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");
95
+ return patch.map((p) => formatPatch(p, headerOptions)).join("\n");
96
+ }
97
+ const ret = [];
98
+ if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName) ret.push("Index: " + patch.oldFileName);
99
+ if (headerOptions.includeUnderline) ret.push("===================================================================");
100
+ if (headerOptions.includeFileHeaders) {
101
+ ret.push("--- " + patch.oldFileName + (typeof patch.oldHeader === "undefined" ? "" : " " + patch.oldHeader));
102
+ ret.push("+++ " + patch.newFileName + (typeof patch.newHeader === "undefined" ? "" : " " + patch.newHeader));
103
+ }
104
+ for (let i = 0; i < patch.hunks.length; i++) {
105
+ const hunk = patch.hunks[i];
106
+ if (hunk.oldLines === 0) hunk.oldStart -= 1;
107
+ if (hunk.newLines === 0) hunk.newStart -= 1;
108
+ ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
109
+ for (const line of hunk.lines) ret.push(line);
110
+ }
111
+ return ret.join("\n") + "\n";
112
+ }
113
+ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
114
+ if (typeof options === "function") options = { callback: options };
115
+ if (!(options === null || options === void 0 ? void 0 : options.callback)) {
116
+ const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
117
+ if (!patchObj) return;
118
+ return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions);
119
+ } else {
120
+ const { callback } = options;
121
+ structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: (patchObj) => {
122
+ if (!patchObj) callback(void 0);
123
+ else callback(formatPatch(patchObj, options.headerOptions));
124
+ } }));
125
+ }
126
+ }
127
+ /**
128
+ * Split `text` into an array of lines, including the trailing newline character (where present)
129
+ */
130
+ function splitLines(text) {
131
+ const hasTrailingNl = text.endsWith("\n");
132
+ const result = text.split("\n").map((line) => line + "\n");
133
+ if (hasTrailingNl) result.pop();
134
+ else result.push(result.pop().slice(0, -1));
135
+ return result;
136
+ }
137
+ export { createTwoFilesPatch as t };
@@ -1,5 +1,5 @@
1
1
  import { a as __require, t as __commonJSMin } from "../_runtime.mjs";
2
- import { c as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
2
+ import { s as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
3
3
  import { t as require_node } from "./data-uri-to-buffer.mjs";
4
4
  import { t as require_dist$1 } from "./basic-ftp.mjs";
5
5
  var require_notmodified = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -1,5 +1,5 @@
1
1
  import { a as __require, t as __commonJSMin } from "../_runtime.mjs";
2
- import { c as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
2
+ import { s as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
3
3
  import { t as require_dist$1 } from "./agent-base.mjs";
4
4
  var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
5
5
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
@@ -1,5 +1,5 @@
1
1
  import { a as __require, t as __commonJSMin } from "../_runtime.mjs";
2
- import { c as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
2
+ import { s as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
3
3
  import { t as require_dist$1 } from "./agent-base.mjs";
4
4
  var require_parse_proxy_response = /* @__PURE__ */ __commonJSMin(((exports) => {
5
5
  var __importDefault = exports && exports.__importDefault || function(mod) {