larness 0.3.1 → 0.4.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/apps/server/dist/{address-Dh8XUuOk.js → address-BDs0FfMq.js} +1 -1
- package/apps/server/dist/{client-D64wZ3lt.js → client-D88ULjn9.js} +1 -1
- package/apps/server/dist/{doctor-rEr7DMMb.js → doctor-dwTQiTef.js} +1 -1
- package/apps/server/dist/doctor.js +1 -1
- package/apps/server/dist/index.js +11987 -5714
- package/apps/server/dist/{managed-nCF4mKiY.js → managed-Br7VqQiP.js} +70 -6
- package/apps/server/dist/{paths-Dds-A0kx.js → paths-DUfwiH2X.js} +641 -19
- package/apps/server/dist/{status-toJt8Dby.js → status-D2oSIMoj.js} +1 -1
- package/apps/server/dist/status.js +3 -3
- package/apps/server/dist/tui.js +4 -4
- package/apps/server/drizzle/0001_auth.sql +109 -109
- package/apps/server/drizzle/0002_projects.sql +12 -12
- package/apps/server/drizzle/0003_workspace.sql +80 -80
- package/apps/server/drizzle/0004_models.sql +30 -30
- package/apps/server/drizzle/0005_resources.sql +54 -54
- package/apps/server/drizzle/0006_commands.sql +23 -23
- package/apps/server/drizzle/0007_terminals.sql +41 -41
- package/apps/server/drizzle/0008_resource_actions.sql +23 -23
- package/apps/server/drizzle/0010_services.sql +31 -31
- package/apps/server/drizzle/0032_agent_profile.sql +1 -0
- package/apps/server/drizzle/0033_agent_profile_service_ops.sql +1 -0
- package/apps/server/drizzle/0034_agent_profile_coding_plan.sql +1 -0
- package/apps/server/drizzle/0035_session_title_source.sql +1 -0
- package/apps/server/drizzle/0036_project_memory.sql +62 -0
- package/apps/server/drizzle/0037_web_search.sql +14 -0
- package/apps/server/drizzle/0038_document_attachments.sql +16 -0
- package/apps/server/drizzle/meta/0032_snapshot.json +5169 -0
- package/apps/server/drizzle/meta/0035_snapshot.json +5177 -0
- package/apps/server/drizzle/meta/0036_snapshot.json +5576 -0
- package/apps/server/drizzle/meta/0037_snapshot.json +5667 -0
- package/apps/server/drizzle/meta/0038_snapshot.json +5776 -0
- package/apps/server/drizzle/meta/_journal.json +49 -0
- package/apps/server/package.json +10 -0
- package/apps/web/dist/assets/{FileEditor-Qgvegzha.js → FileEditor-CxzD-z_w.js} +1 -1
- package/apps/web/dist/assets/{FileViewer-DOkamgXq.js → FileViewer-4LwgwN4s.js} +1 -1
- package/apps/web/dist/assets/{cssMode-CNLukUsc.js → cssMode-BfW9rKao.js} +1 -1
- package/apps/web/dist/assets/{editor.api-BGAC2PgT.js → editor.api-D0PbFQmb.js} +1 -1
- package/apps/web/dist/assets/{freemarker2-DmzUAvZs.js → freemarker2-CUmmnP_9.js} +1 -1
- package/apps/web/dist/assets/{handlebars-CMacXF3P.js → handlebars-CV0ntFU6.js} +1 -1
- package/apps/web/dist/assets/{html-BufzDub2.js → html-lbv15ZCZ.js} +1 -1
- package/apps/web/dist/assets/{htmlMode-vSvsTicL.js → htmlMode-2S1Ml4u-.js} +1 -1
- package/apps/web/dist/assets/{index-Pz8dIHnt.js → index-Bu4wSG15.js} +2 -2
- package/apps/web/dist/assets/{javascript-CWkrvOWF.js → javascript-s1wW-h_2.js} +1 -1
- package/apps/web/dist/assets/{jsonMode-D6vtcW2h.js → jsonMode-Di8Ytqtu.js} +1 -1
- package/apps/web/dist/assets/{liquid-D5KkJyqT.js → liquid-CR28rx5y.js} +1 -1
- package/apps/web/dist/assets/{lspLanguageFeatures-DI8_dTOp.js → lspLanguageFeatures-uPJRSuKu.js} +1 -1
- package/apps/web/dist/assets/main-KzEpvsAJ.js +157 -0
- package/apps/web/dist/assets/main-ptChOROf.css +1 -0
- package/apps/web/dist/assets/{mdx-BdPaDdpH.js → mdx-B_RQg_ko.js} +1 -1
- package/apps/web/dist/assets/{monaco-EglqICVw.js → monaco-BHRE2AKp.js} +3 -3
- package/apps/web/dist/assets/{python-BrXsyyj_.js → python-DxrD-zEd.js} +1 -1
- package/apps/web/dist/assets/{razor-xmumdcGT.js → razor-BGSx-heg.js} +1 -1
- package/apps/web/dist/assets/{tsMode-CkDNjbjK.js → tsMode-CkPGnA4g.js} +1 -1
- package/apps/web/dist/assets/{typescript-BYDg93Ut.js → typescript-oJa8RtP0.js} +1 -1
- package/apps/web/dist/assets/{workers-CMKTm3o5.js → workers-BmwP04Ml.js} +1 -1
- package/apps/web/dist/assets/{xml-DLqAxpyK.js → xml-NoacuPD-.js} +1 -1
- package/apps/web/dist/assets/{yaml-Y5128Ncw.js → yaml-PU4CKcMI.js} +1 -1
- package/apps/web/dist/favicon.svg +4 -4
- package/apps/web/dist/index.html +1 -1
- package/docs/README.md +1 -0
- package/docs/guides/install.md +3 -3
- package/package.json +9 -1
- package/apps/web/dist/assets/main-D1Y-WDQ4.css +0 -1
- package/apps/web/dist/assets/main-LsqGdepC.js +0 -158
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Yn as FilePathSchema, jn as OriginUrlSchema, nr as MAX_EDITABLE_FILE_BYTES } from "./paths-DUfwiH2X.js";
|
|
2
2
|
import { createHash, randomInt, randomUUID } from "node:crypto";
|
|
3
3
|
import { constants, existsSync, readFileSync, realpathSync, statSync, watch } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -635,10 +635,10 @@ async function runCommand(options) {
|
|
|
635
635
|
setTimeout(() => finishStop?.(), 200);
|
|
636
636
|
});
|
|
637
637
|
};
|
|
638
|
-
const launch =
|
|
638
|
+
const launch = options.shell === true || !windows ? {
|
|
639
639
|
executable: options.executable,
|
|
640
640
|
args: options.args
|
|
641
|
-
};
|
|
641
|
+
} : windowsLaunch(options.executable, options.args, options.cwd);
|
|
642
642
|
const child = spawn(launch.executable, launch.args, {
|
|
643
643
|
cwd: options.cwd,
|
|
644
644
|
env: {
|
|
@@ -704,8 +704,8 @@ async function runCommand(options) {
|
|
|
704
704
|
resolve();
|
|
705
705
|
});
|
|
706
706
|
});
|
|
707
|
-
child.once("error", () => {
|
|
708
|
-
reason ??= "SPAWN_FAILED";
|
|
707
|
+
child.once("error", (error) => {
|
|
708
|
+
reason ??= error.code === "ENOENT" ? options.shell === true ? "SHELL_UNAVAILABLE" : "COMMAND_NOT_FOUND" : "SPAWN_FAILED";
|
|
709
709
|
});
|
|
710
710
|
child.once("spawn", () => {
|
|
711
711
|
if (child.pid) {
|
|
@@ -1703,6 +1703,10 @@ async function runGit(root, args, options = {}) {
|
|
|
1703
1703
|
} catch (error) {
|
|
1704
1704
|
if (!(error instanceof Error)) throw new GitError("GIT_UNAVAILABLE", "Git command failed");
|
|
1705
1705
|
const value = error;
|
|
1706
|
+
if (typeof value.code === "number" && options.allowedExitCodes?.includes(value.code)) return {
|
|
1707
|
+
stdout: (value.stdout ?? Buffer.alloc(0)).toString("utf8"),
|
|
1708
|
+
stderr: (value.stderr ?? Buffer.alloc(0)).toString("utf8")
|
|
1709
|
+
};
|
|
1706
1710
|
if (value.code === "ENOENT") throw new GitError("GIT_UNAVAILABLE", "Git is not installed");
|
|
1707
1711
|
if (value.code === "ERR_CHILD_PROCESS_STDIO_MAXBUFFER") throw new GitError("PAYLOAD_TOO_LARGE", "Git output exceeds the limit");
|
|
1708
1712
|
if (value.killed || value.code === "ETIMEDOUT") throw new GitError("GIT_CONFLICT", "Git command timed out");
|
|
@@ -1718,6 +1722,66 @@ function validateGitPath(root, value, gitReported = false) {
|
|
|
1718
1722
|
if (!isInsideRoot(root, path.resolve(root, normalized))) throw new GitError("GIT_CONFLICT", "Git path escapes root");
|
|
1719
1723
|
return normalized;
|
|
1720
1724
|
}
|
|
1725
|
+
/**
|
|
1726
|
+
* Git runs inside the project directory but still reports every path relative
|
|
1727
|
+
* to the repository root and applies pathspecs relative to the current
|
|
1728
|
+
* directory. A project may be a subdirectory of a larger repository, so paths
|
|
1729
|
+
* have to be rebased onto the project before they are listed or reused.
|
|
1730
|
+
*/
|
|
1731
|
+
async function gitPrefix(root, options = {}) {
|
|
1732
|
+
const { stdout } = await runGit(root, ["rev-parse", "--show-prefix"], {
|
|
1733
|
+
readOnly: true,
|
|
1734
|
+
timeoutMs: options.timeoutMs ?? 15e3
|
|
1735
|
+
});
|
|
1736
|
+
const value = stdout.trim().replaceAll("\\", "/");
|
|
1737
|
+
if (!value) return "";
|
|
1738
|
+
return value.endsWith("/") ? value : `${value}/`;
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Rebase the NUL separated `git status --porcelain=v2` stream onto the project
|
|
1742
|
+
* directory: changes outside it are dropped and the rest keep their record
|
|
1743
|
+
* shape, so `parseStatus` and the snapshot hash stay stable.
|
|
1744
|
+
*/
|
|
1745
|
+
function scopeStatusToPrefix(raw, prefix) {
|
|
1746
|
+
if (!prefix) return raw;
|
|
1747
|
+
const base = prefix.endsWith("/") ? prefix : `${prefix}/`;
|
|
1748
|
+
const tokens = raw.split("\0");
|
|
1749
|
+
const scoped = [];
|
|
1750
|
+
for (let index = 0; index < tokens.length; index++) {
|
|
1751
|
+
const token = tokens[index] ?? "";
|
|
1752
|
+
if (!token) continue;
|
|
1753
|
+
const fields = token.split(" ");
|
|
1754
|
+
const kind = fields[0];
|
|
1755
|
+
if (kind === "2") {
|
|
1756
|
+
const origPath = tokens[index + 1] ?? "";
|
|
1757
|
+
index += 1;
|
|
1758
|
+
const renamed = toProjectPath(fields.slice(9).join(" "), base);
|
|
1759
|
+
if (renamed === null) continue;
|
|
1760
|
+
scoped.push([...fields.slice(0, 9), renamed].join(" "));
|
|
1761
|
+
scoped.push(toProjectPath(origPath, base) ?? renamed);
|
|
1762
|
+
continue;
|
|
1763
|
+
}
|
|
1764
|
+
const head = kind === "1" ? 8 : kind === "u" ? 10 : 0;
|
|
1765
|
+
if (head > 0) {
|
|
1766
|
+
const pathValue = toProjectPath(fields.slice(head).join(" "), base);
|
|
1767
|
+
if (pathValue !== null) scoped.push([...fields.slice(0, head), pathValue].join(" "));
|
|
1768
|
+
continue;
|
|
1769
|
+
}
|
|
1770
|
+
if (kind === "?") {
|
|
1771
|
+
const pathValue = toProjectPath(token.slice(2), base);
|
|
1772
|
+
if (pathValue !== null) scoped.push(`? ${pathValue}`);
|
|
1773
|
+
continue;
|
|
1774
|
+
}
|
|
1775
|
+
scoped.push(token);
|
|
1776
|
+
}
|
|
1777
|
+
return scoped.map((token) => `${token}\0`).join("");
|
|
1778
|
+
}
|
|
1779
|
+
function toProjectPath(value, base) {
|
|
1780
|
+
const normalized = value.replaceAll("\\", "/");
|
|
1781
|
+
if (!normalized.startsWith(base)) return null;
|
|
1782
|
+
const relative = normalized.slice(base.length);
|
|
1783
|
+
return relative ? relative : null;
|
|
1784
|
+
}
|
|
1721
1785
|
function parseStatus(raw) {
|
|
1722
1786
|
const tokens = raw.split("\0");
|
|
1723
1787
|
const status = {
|
|
@@ -2220,4 +2284,4 @@ function waitChildMessage(child, parse, signal, phase = "Server") {
|
|
|
2220
2284
|
if (signal?.aborted) abort();
|
|
2221
2285
|
});
|
|
2222
2286
|
}
|
|
2223
|
-
export {
|
|
2287
|
+
export { isInsideRoot as $, validateGitPath as A, saveEditableFile as B, gitPrefix as C, runGit as D, parseStatus as E, fileEntryVersion as F, createTextFile as G, DEFAULT_IGNORED as H, listDirectory as I, listFiles as J, hashContent as K, normalizeFilePath as L, scanWatchPath as M, FileManagerError as N, scopeStatusToPrefix as O, encodeEditableContent as P, canonicalDirectory as Q, readEditableFile as R, GitError as S, parseLog as T, FileError as U, searchFiles as V, applyPatch$1 as W, searchCode as X, readTextFile as Y, PathGuardError as Z, formatPairingCode as _, DevWebControl as a, resolveWindowsExecutable as at, normalizePairingCode as b, EntryConfigError as c, processCommandLine as ct, devWebCache as d, windowsTcpListeners as dt, resolveInsideRoot as et, isDevPath as f, commandEnvironment as ft, PAIRING_REQUEST_TTL_MS as g, OutputRedactor as gt, PAIRING_CODE_TTL_MS as h, windowsPowerShell as ht, DevWebAttachedSchema as i, stopCommandGroup as it, createDirectoryWatcher as j, snapshotOf as k, HMR_PATH as l, processSnapshot as lt, ENROLLMENT_TTL_MS as m, powerShellEncodedCommand as mt, receiveDevWebTarget as n, groupAlive as nt, DevWebTargetSchema as o, windowsLaunch as ot, permittedPath as p, powerShellArguments as pt, isIgnoredFile as q, waitChildMessage as r, runCommand as rt, DevWebUnavailable as s, processAlive as st, managedWebFiles as t, MAX_COMMAND_OUTPUT_BYTES as tt, NONCE_MARKER as u, terminateProcessTree as ut, generatePairingCode as v, parseBranches as w, ManagedPty as x, generateShortCode as y, resolveFilePath as z };
|