trellis 3.2.0 → 3.2.2
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/CHANGELOG.md +7 -0
- package/README.md +61 -171
- package/dist/browser/index.d.ts +18 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +95 -0
- package/dist/{chunk-3ETIIPPB.js → chunk-2W3MHTMG.js} +190 -27
- package/dist/{chunk-MBNBTJCR.js → chunk-6GEZ6DN5.js} +2 -2
- package/dist/chunk-7ZFRVCUE.js +211 -0
- package/dist/chunk-CAG4FULI.js +121 -0
- package/dist/{chunk-GD5QJXSS.js → chunk-FWRS4CSC.js} +2 -2
- package/dist/{chunk-36VSSTL7.js → chunk-GU374KWZ.js} +1 -1
- package/dist/{chunk-3GDRZTAW.js → chunk-H6JB3PZ3.js} +1 -1
- package/dist/{chunk-ZHVI7BQN.js → chunk-IZX2PLIB.js} +191 -28
- package/dist/chunk-J2TXUFCZ.js +289 -0
- package/dist/{chunk-BJ7EZ7FP.js → chunk-JHHEXEDM.js} +17 -0
- package/dist/{chunk-X762XWVC.js → chunk-KIJITUZB.js} +1 -1
- package/dist/{chunk-7WQGTFVJ.js → chunk-L5N5PR2S.js} +130 -75
- package/dist/{chunk-BXSTJVE3.js → chunk-N6MYZT4O.js} +2 -1
- package/dist/{chunk-KKDRMIV6.js → chunk-QB5ISE47.js} +1 -1
- package/dist/{chunk-HO4TURXW.js → chunk-S3XLFZ27.js} +28 -11
- package/dist/{chunk-BQBUVMRN.js → chunk-S6GBJ2ZB.js} +25 -14
- package/dist/{chunk-IUWVEEOX.js → chunk-SGMDTWJJ.js} +4 -0
- package/dist/{chunk-FZVCXDYW.js → chunk-UQISRW6T.js} +65 -12
- package/dist/{chunk-B3ZIFA2O.js → chunk-VBYUTRXX.js} +1 -1
- package/dist/cli/deploy-cli.d.ts +18 -0
- package/dist/cli/deploy-cli.d.ts.map +1 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +153 -100
- package/dist/client/index.browser.d.ts +29 -0
- package/dist/client/index.browser.d.ts.map +1 -0
- package/dist/client/index.browser.js +64 -0
- package/dist/client/index.js +10 -10
- package/dist/client/sdk.browser.d.ts +104 -0
- package/dist/client/sdk.browser.d.ts.map +1 -0
- package/dist/{sdk-LZ7W3EEY.js → client/sdk.browser.js} +2 -2
- package/dist/client/sdk.js +1 -1
- package/dist/core/index.js +6 -6
- package/dist/db/index.js +18 -18
- package/dist/db/inspector.js +6 -6
- package/dist/db/trellis.css +1 -1
- package/dist/decisions/index.js +2 -2
- package/dist/deploy-LQ7GUGJ5.js +9 -0
- package/dist/{deploy-66EC752W.js → deploy-YNVG5E4E.js} +1 -1
- package/dist/deploy-cli-24BCHAXY.js +67 -0
- package/dist/deploy-cli-C35HTITO.js +67 -0
- package/dist/embeddings/auto-embed.d.ts.map +1 -1
- package/dist/embeddings/index.js +1 -1
- package/dist/embeddings/store.d.ts.map +1 -1
- package/dist/engine.d.ts +27 -7
- package/dist/engine.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/react/index.js +2 -2
- package/dist/react/schema-hooks.js +7 -7
- package/dist/{remote-manager-SG545WNY.js → remote-manager-ODE3T2KR.js} +5 -5
- package/dist/scaffold/seed.d.ts.map +1 -1
- package/dist/scaffold/write.d.ts +1 -1
- package/dist/scaffold/write.d.ts.map +1 -1
- package/dist/schema/index.js +4 -3
- package/dist/server/deploy-meta.d.ts +25 -0
- package/dist/server/deploy-meta.d.ts.map +1 -0
- package/dist/server/deploy.d.ts +7 -2
- package/dist/server/deploy.d.ts.map +1 -1
- package/dist/server/index.d.ts +5 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +52 -18
- package/dist/server/realtime.d.ts +4 -1
- package/dist/server/realtime.d.ts.map +1 -1
- package/dist/server/server.d.ts +1 -0
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/sprites.d.ts +18 -1
- package/dist/server/sprites.d.ts.map +1 -1
- package/dist/server/tenancy.d.ts +4 -0
- package/dist/server/tenancy.d.ts.map +1 -1
- package/dist/server/usage-meter.d.ts +53 -0
- package/dist/server/usage-meter.d.ts.map +1 -0
- package/dist/{server-IGBIIJSF.js → server-MB3OPSPI.js} +6 -1
- package/dist/{server-BOH7M4TT.js → server-ZVWGLLRF.js} +7 -2
- package/dist/sprites-KQGTGM6W.js +27 -0
- package/dist/{tenancy-S676GLID.js → tenancy-NBLLGCNJ.js} +1 -1
- package/dist/{tenancy-OP34NFFS.js → tenancy-POMWQP6M.js} +5 -3
- package/dist/vcs/index.js +3 -3
- package/dist/vcs/types.d.ts +2 -0
- package/dist/vcs/types.d.ts.map +1 -1
- package/package.json +17 -6
- package/dist/better-sqlite-backend-PII64VE6.js +0 -159
- package/dist/better-sqlite-backend-VUBVQ7SN.js +0 -209
- package/dist/better-sqlite-backend-Y3AQN65E.js +0 -159
- package/dist/better-sqlite-backend-Y3M7DXOX.js +0 -159
- package/dist/boot-middleware-FJDGVUM4.js +0 -9
- package/dist/boot-middleware-MLJUTLUM.js +0 -9
- package/dist/boot-middleware-ZZPDZNYR.js +0 -9
- package/dist/chunk-276LKLZR.js +0 -359
- package/dist/chunk-2CX5UCRV.js +0 -111
- package/dist/chunk-2ESYSVXG.js +0 -48
- package/dist/chunk-2I5JU73Y.js +0 -340
- package/dist/chunk-2UNSRRNB.js +0 -171
- package/dist/chunk-335UEHQR.js +0 -907
- package/dist/chunk-4CF2L46N.js +0 -29
- package/dist/chunk-5CINODKT.js +0 -41
- package/dist/chunk-5ESGWJ5L.js +0 -45
- package/dist/chunk-5FGLQGMF.js +0 -1676
- package/dist/chunk-5IQZFITY.js +0 -357
- package/dist/chunk-5JWFAQDW.js +0 -150
- package/dist/chunk-62UHTVU3.js +0 -141
- package/dist/chunk-66UJQT2I.js +0 -35
- package/dist/chunk-6RNNVOAS.js +0 -355
- package/dist/chunk-6X23PZ6H.js +0 -969
- package/dist/chunk-7C7LL6MB.js +0 -315
- package/dist/chunk-7F4HM3JG.js +0 -394
- package/dist/chunk-7KJ7T4D3.js +0 -910
- package/dist/chunk-7QQQNUB5.js +0 -92
- package/dist/chunk-7QWJBS72.js +0 -946
- package/dist/chunk-7R36OZK3.js +0 -957
- package/dist/chunk-7UPKCOHE.js +0 -946
- package/dist/chunk-A3BONW34.js +0 -35
- package/dist/chunk-AHMDVHBL.js +0 -141
- package/dist/chunk-AW6A4OZY.js +0 -171
- package/dist/chunk-BJ5EKCJ5.js +0 -458
- package/dist/chunk-BRGYDO7D.js +0 -223
- package/dist/chunk-C5KPSEDN.js +0 -359
- package/dist/chunk-CCTNYTUC.js +0 -940
- package/dist/chunk-CYQ2OVD2.js +0 -35
- package/dist/chunk-DDAK7YOE.js +0 -299
- package/dist/chunk-DRILKBY6.js +0 -965
- package/dist/chunk-DXE24HNN.js +0 -45
- package/dist/chunk-E7ICUNW7.js +0 -945
- package/dist/chunk-EAL2PUOE.js +0 -10022
- package/dist/chunk-ELT7MLZB.js +0 -109
- package/dist/chunk-EWEIRF6G.js +0 -171
- package/dist/chunk-F5VDGQJC.js +0 -120
- package/dist/chunk-FCPL3IEQ.js +0 -98
- package/dist/chunk-FDPKYSV7.js +0 -96
- package/dist/chunk-FES3TC24.js +0 -171
- package/dist/chunk-FOWKR5TW.js +0 -129
- package/dist/chunk-G3XIHPSQ.js +0 -361
- package/dist/chunk-GKJLYLVU.js +0 -359
- package/dist/chunk-GNXHXNVQ.js +0 -113
- package/dist/chunk-GSR6ILTM.js +0 -277
- package/dist/chunk-GWRIMRSX.js +0 -45
- package/dist/chunk-H72UW2HJ.js +0 -45
- package/dist/chunk-HGI74PXB.js +0 -7417
- package/dist/chunk-HGRA37LO.js +0 -145
- package/dist/chunk-HXSRQO3L.js +0 -145
- package/dist/chunk-IG2X2BVO.js +0 -373
- package/dist/chunk-IIJVDD54.js +0 -373
- package/dist/chunk-IX4BBOIT.js +0 -394
- package/dist/chunk-IXU4RMQM.js +0 -349
- package/dist/chunk-J6OUIION.js +0 -857
- package/dist/chunk-K46RNFDE.js +0 -171
- package/dist/chunk-KAGU2XMY.js +0 -359
- package/dist/chunk-KCVYJNVX.js +0 -394
- package/dist/chunk-KYLIQ3YI.js +0 -399
- package/dist/chunk-KZYJJIRN.js +0 -946
- package/dist/chunk-LFOX744K.js +0 -96
- package/dist/chunk-LHOVJEWR.js +0 -7403
- package/dist/chunk-LOPXTPF3.js +0 -120
- package/dist/chunk-LZR3VIFU.js +0 -907
- package/dist/chunk-MCKGQKYU.js +0 -15
- package/dist/chunk-MU6EOS6F.js +0 -0
- package/dist/chunk-MWRQ2TXT.js +0 -357
- package/dist/chunk-NO73OK2I.js +0 -102
- package/dist/chunk-NPE2YJHK.js +0 -394
- package/dist/chunk-NSDXU6QX.js +0 -2213
- package/dist/chunk-NXIRDSZ6.js +0 -145
- package/dist/chunk-NZWFNHCS.js +0 -407
- package/dist/chunk-OB4CMMX6.js +0 -260
- package/dist/chunk-OBKU74FU.js +0 -7411
- package/dist/chunk-OQNDWRDE.js +0 -145
- package/dist/chunk-OVWAJMB6.js +0 -394
- package/dist/chunk-PDHLBTTD.js +0 -45
- package/dist/chunk-PEQNRKLG.js +0 -210
- package/dist/chunk-QERIS7QY.js +0 -7403
- package/dist/chunk-QHA2DM3C.js +0 -373
- package/dist/chunk-QLM4HSYC.js +0 -45
- package/dist/chunk-S2OT3TQJ.js +0 -283
- package/dist/chunk-S5PHSN5K.js +0 -907
- package/dist/chunk-SIAA4J6H.js +0 -21
- package/dist/chunk-SQBNLUIA.js +0 -171
- package/dist/chunk-STLN6A6B.js +0 -355
- package/dist/chunk-U7HV7GU2.js +0 -17
- package/dist/chunk-UGZHOGRA.js +0 -39
- package/dist/chunk-UICF66FS.js +0 -359
- package/dist/chunk-UK3EQREE.js +0 -1078
- package/dist/chunk-UPKPURVY.js +0 -394
- package/dist/chunk-URC74VCN.js +0 -959
- package/dist/chunk-V3G7Q3QQ.js +0 -102
- package/dist/chunk-VUJ6SA55.js +0 -303
- package/dist/chunk-VUJQLIML.js +0 -141
- package/dist/chunk-VWKLKLYB.js +0 -267
- package/dist/chunk-VYC3RZMK.js +0 -277
- package/dist/chunk-WMERMSWI.js +0 -154
- package/dist/chunk-WMR777PO.js +0 -2213
- package/dist/chunk-X46IECAC.js +0 -517
- package/dist/chunk-XEN3OEYY.js +0 -2234
- package/dist/chunk-XZQ66K7A.js +0 -124
- package/dist/chunk-YY3GF7DH.js +0 -7411
- package/dist/chunk-ZE5R3H4C.js +0 -907
- package/dist/chunk-ZMN5LUB7.js +0 -7411
- package/dist/chunk-ZUV4MD5U.js +0 -94
- package/dist/config-KMY6RRK3.js +0 -19
- package/dist/config-VDMK2DUJ.js +0 -19
- package/dist/deploy-SO7AFK6L.js +0 -9
- package/dist/engine-7GXBM4IT.js +0 -7
- package/dist/engine-NSR6BIF7.js +0 -7
- package/dist/factory-2P64OC7M.js +0 -34
- package/dist/factory-YP4ZZK5K.js +0 -34
- package/dist/import-AJLYHFIA.js +0 -10
- package/dist/launch-explorer-AI6L2AWJ.js +0 -91
- package/dist/query-GJL3CVGN.js +0 -31
- package/dist/query-MBJSK3EB.js +0 -31
- package/dist/query-TJHEVSKL.js +0 -31
- package/dist/query-WUIKOHPE.js +0 -524
- package/dist/remote-manager-BLJZ6KF6.js +0 -224
- package/dist/remote-manager-BPYE46SI.js +0 -223
- package/dist/remote-manager-FMESEAFA.js +0 -224
- package/dist/remote-manager-K2WZ5RHY.js +0 -223
- package/dist/remote-manager-SG5PQKCH.js +0 -224
- package/dist/remote-manager-WGP6MIQZ.js +0 -224
- package/dist/sdk-3KBB3E6V.js +0 -16
- package/dist/sdk-4ZQO6UTU.js +0 -16
- package/dist/sdk-6JA6GV3G.js +0 -16
- package/dist/sdk-6VTP5UTZ.js +0 -16
- package/dist/sdk-7VS6TYCD.js +0 -16
- package/dist/sdk-HQ3FTLRT.js +0 -16
- package/dist/sdk-HZ7NU3XE.js +0 -15
- package/dist/sdk-KBQE2OXT.js +0 -16
- package/dist/sdk-MSCDZ7JU.js +0 -15
- package/dist/sdk-WNZOGO3S.js +0 -15
- package/dist/sdk-YLV33ZCW.js +0 -9
- package/dist/sdk-ZSUD2LLJ.js +0 -16
- package/dist/server-AFXFFBWA.js +0 -11
- package/dist/server-AGHC4VUL.js +0 -11
- package/dist/server-DBUY2KY5.js +0 -11
- package/dist/server-GWBQJPRG.js +0 -11
- package/dist/server-JZZFULVU.js +0 -11
- package/dist/server-L5XAF4M5.js +0 -11
- package/dist/server-NYFUHANA.js +0 -12
- package/dist/server-OABUB2LO.js +0 -12
- package/dist/server-P2CKZWWV.js +0 -12
- package/dist/sprites-XVSMQLSI.js +0 -15
- package/dist/sql-wasm-FORCZFHZ.js +0 -2148
- package/dist/sql-wasm-JZH76RLO.js +0 -2148
- package/dist/sqljs-backend-CJQOIQYE.js +0 -266
- package/dist/sqljs-backend-KWXBUDUO.js +0 -266
- package/dist/state-demo.bundle.js +0 -1033
- package/dist/tenancy-CBWYEVUB.js +0 -11
- package/dist/tenancy-FO6WVYFN.js +0 -13
- package/dist/tenancy-FWDBESMX.js +0 -14
- package/dist/tenancy-HGPIS5QA.js +0 -13
- package/dist/tenancy-HXFALA37.js +0 -14
- package/dist/tenancy-V7ARWNNV.js +0 -14
- package/dist/tenancy-ZDN4GXK5.js +0 -13
- package/dist/tenancy-ZT5VMY7B.js +0 -14
- package/dist/vm-config-YZRJ3KUB.js +0 -21
- /package/dist/{chunk-2BRTCEHB.js → chunk-PZ4XYZ4J.js} +0 -0
- /package/dist/{chunk-EO3J7GRP.js → chunk-WXSWA3MV.js} +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "../chunk-TCKXSOBP.js";
|
|
6
6
|
import {
|
|
7
7
|
seedContext
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-S6GBJ2ZB.js";
|
|
9
9
|
import {
|
|
10
10
|
TrellisVcsEngine,
|
|
11
11
|
formatPromoteExplain,
|
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
updateProfile,
|
|
20
20
|
writeAgentScaffold,
|
|
21
21
|
writeIdeScaffold
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-L5N5PR2S.js";
|
|
23
|
+
import "../chunk-GU374KWZ.js";
|
|
23
24
|
import {
|
|
24
25
|
OntologyRegistry,
|
|
25
26
|
builtinOntologies,
|
|
@@ -36,11 +37,16 @@ import {
|
|
|
36
37
|
QueryEngine
|
|
37
38
|
} from "../chunk-6CTA6MCE.js";
|
|
38
39
|
import "../chunk-4XIVMVHC.js";
|
|
39
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-VBYUTRXX.js";
|
|
41
|
+
import "../chunk-N6MYZT4O.js";
|
|
40
42
|
import {
|
|
41
43
|
init_reconciler,
|
|
42
44
|
reconciler_exports
|
|
43
45
|
} from "../chunk-4HYPLFJD.js";
|
|
46
|
+
import {
|
|
47
|
+
createVcsOp,
|
|
48
|
+
init_ops
|
|
49
|
+
} from "../chunk-GLM4HGN4.js";
|
|
44
50
|
import {
|
|
45
51
|
VectorStore,
|
|
46
52
|
buildRAGContext,
|
|
@@ -50,19 +56,13 @@ import {
|
|
|
50
56
|
init_embeddings,
|
|
51
57
|
init_model,
|
|
52
58
|
init_store
|
|
53
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-S3XLFZ27.js";
|
|
54
60
|
import {
|
|
55
61
|
buildRefIndex,
|
|
56
62
|
createResolverContext,
|
|
57
63
|
init_links,
|
|
58
64
|
links_exports
|
|
59
65
|
} from "../chunk-VDAKEOML.js";
|
|
60
|
-
import "../chunk-36VSSTL7.js";
|
|
61
|
-
import "../chunk-BXSTJVE3.js";
|
|
62
|
-
import {
|
|
63
|
-
createVcsOp,
|
|
64
|
-
init_ops
|
|
65
|
-
} from "../chunk-GLM4HGN4.js";
|
|
66
66
|
import {
|
|
67
67
|
__esm,
|
|
68
68
|
__export,
|
|
@@ -1653,7 +1653,10 @@ async function runInit(rootPath, opts = {}) {
|
|
|
1653
1653
|
return {
|
|
1654
1654
|
selectedIdes: opts.ides || [],
|
|
1655
1655
|
footprint: opts.footprint || "standard",
|
|
1656
|
-
framework: opts.framework || "none"
|
|
1656
|
+
framework: opts.framework || "none",
|
|
1657
|
+
opsCreated: 0,
|
|
1658
|
+
filesIndexed: 0,
|
|
1659
|
+
indexWorkspace: opts.indexWorkspace ?? true
|
|
1657
1660
|
};
|
|
1658
1661
|
}
|
|
1659
1662
|
if (!hasProfile()) {
|
|
@@ -1677,6 +1680,7 @@ async function runInit(rootPath, opts = {}) {
|
|
|
1677
1680
|
let footprint = opts.footprint || "standard";
|
|
1678
1681
|
let framework = opts.framework || detectedFramework || "none";
|
|
1679
1682
|
let plugins = opts.plugins || [];
|
|
1683
|
+
let indexWorkspace = opts.indexWorkspace ?? true;
|
|
1680
1684
|
if (!isInteractive && framework === "none" && detectedFramework) {
|
|
1681
1685
|
framework = detectedFramework;
|
|
1682
1686
|
}
|
|
@@ -1702,14 +1706,15 @@ async function runInit(rootPath, opts = {}) {
|
|
|
1702
1706
|
if (setupType === "minimal") {
|
|
1703
1707
|
footprint = "minimal";
|
|
1704
1708
|
framework = detectedFramework || "none";
|
|
1709
|
+
indexWorkspace = false;
|
|
1705
1710
|
const ides = [];
|
|
1706
1711
|
const envKeys = Object.keys(process.env).join(",").toLowerCase();
|
|
1707
|
-
if (process.env.TERM_PROGRAM === "
|
|
1708
|
-
ides.push("
|
|
1712
|
+
if (process.env.TERM_PROGRAM === "Devin" || envKeys.includes("devin")) {
|
|
1713
|
+
ides.push("devin");
|
|
1709
1714
|
} else if (process.env.TERM_PROGRAM === "vscode" || envKeys.includes("cursor")) {
|
|
1710
1715
|
ides.push("cursor");
|
|
1711
1716
|
} else {
|
|
1712
|
-
ides.push("cursor", "
|
|
1717
|
+
ides.push("cursor", "devin");
|
|
1713
1718
|
}
|
|
1714
1719
|
selectedIdes = ides;
|
|
1715
1720
|
plugins = [];
|
|
@@ -1750,9 +1755,9 @@ async function runInit(rootPath, opts = {}) {
|
|
|
1750
1755
|
checked: selectedIdes.includes("cursor") || selectedIdes.length === 0
|
|
1751
1756
|
},
|
|
1752
1757
|
{
|
|
1753
|
-
name: "
|
|
1754
|
-
value: "
|
|
1755
|
-
checked: selectedIdes.includes("
|
|
1758
|
+
name: "Devin",
|
|
1759
|
+
value: "devin",
|
|
1760
|
+
checked: selectedIdes.includes("devin")
|
|
1756
1761
|
},
|
|
1757
1762
|
{
|
|
1758
1763
|
name: "Claude Desktop",
|
|
@@ -1834,9 +1839,10 @@ async function runInit(rootPath, opts = {}) {
|
|
|
1834
1839
|
}
|
|
1835
1840
|
}
|
|
1836
1841
|
}
|
|
1837
|
-
const engine = new TrellisVcsEngine({ rootPath });
|
|
1842
|
+
const engine = new TrellisVcsEngine({ rootPath, indexWorkspace });
|
|
1838
1843
|
let renderedProgress = false;
|
|
1839
1844
|
const result = await engine.initRepo({
|
|
1845
|
+
indexWorkspace,
|
|
1840
1846
|
onProgress: (progress) => {
|
|
1841
1847
|
renderedProgress = true;
|
|
1842
1848
|
if (progress.phase === "done") {
|
|
@@ -1865,13 +1871,20 @@ async function runInit(rootPath, opts = {}) {
|
|
|
1865
1871
|
});
|
|
1866
1872
|
}
|
|
1867
1873
|
}
|
|
1868
|
-
return {
|
|
1874
|
+
return {
|
|
1875
|
+
selectedIdes,
|
|
1876
|
+
footprint,
|
|
1877
|
+
framework,
|
|
1878
|
+
opsCreated: result.opsCreated,
|
|
1879
|
+
filesIndexed: result.filesIndexed,
|
|
1880
|
+
indexWorkspace: result.indexWorkspace
|
|
1881
|
+
};
|
|
1869
1882
|
}
|
|
1870
1883
|
program.command("init").description(
|
|
1871
1884
|
"Initialize a new TrellisVCS repository in the current directory"
|
|
1872
1885
|
).option("-p, --path <path>", "Path to initialize", ".").option(
|
|
1873
1886
|
"--ides <ides...>",
|
|
1874
|
-
"IDEs to scaffold for (cursor,
|
|
1887
|
+
"IDEs to scaffold for (cursor, devin, claude, copilot, codex, gemini)"
|
|
1875
1888
|
).option(
|
|
1876
1889
|
"--framework <framework>",
|
|
1877
1890
|
"Project framework (react, vue, svelte, next, nuxt, remotion, expo, bun, node, cli, library, animation, games, none)",
|
|
@@ -1880,9 +1893,47 @@ program.command("init").description(
|
|
|
1880
1893
|
"--footprint <footprint>",
|
|
1881
1894
|
"Workspace footprint (minimal, standard, full)",
|
|
1882
1895
|
"standard"
|
|
1883
|
-
).option(
|
|
1896
|
+
).option(
|
|
1897
|
+
"--minimal",
|
|
1898
|
+
"Create minimal .trellis metadata and skip existing-file indexing"
|
|
1899
|
+
).option(
|
|
1900
|
+
"--index-workspace",
|
|
1901
|
+
"Index existing workspace files into the Trellis graph"
|
|
1902
|
+
).option("--no-index", "Skip indexing existing workspace files during init").option("--no-interactive", "Skip interactive prompts").action(async (opts) => {
|
|
1884
1903
|
const rootPath = resolve2(opts.path);
|
|
1904
|
+
const indexWorkspace = opts.minimal || opts.index === false ? false : opts.indexWorkspace === true ? true : void 0;
|
|
1905
|
+
const footprint = opts.minimal ? "minimal" : opts.footprint;
|
|
1885
1906
|
if (TrellisVcsEngine.isRepo(rootPath)) {
|
|
1907
|
+
if (opts.indexWorkspace === true && indexWorkspace !== false) {
|
|
1908
|
+
const engine = new TrellisVcsEngine({ rootPath });
|
|
1909
|
+
engine.open();
|
|
1910
|
+
let renderedProgress = false;
|
|
1911
|
+
const result = await engine.indexWorkspace({
|
|
1912
|
+
onProgress: (progress) => {
|
|
1913
|
+
renderedProgress = true;
|
|
1914
|
+
if (progress.phase === "done") {
|
|
1915
|
+
process.stdout.write("\r\x1B[2K");
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
const label = progress.phase === "discovering" ? "Discovering\u2026" : progress.phase === "hashing" ? "Hashing\u2026" : progress.phase === "scaffolding" ? "Scaffolding\u2026" : "Scanning\u2026";
|
|
1919
|
+
process.stdout.write(
|
|
1920
|
+
`\r\x1B[2K ${chalk4.dim(label)} ${progress.message}`
|
|
1921
|
+
);
|
|
1922
|
+
}
|
|
1923
|
+
});
|
|
1924
|
+
if (renderedProgress) {
|
|
1925
|
+
process.stdout.write("\n");
|
|
1926
|
+
}
|
|
1927
|
+
console.log(chalk4.green("\u2713 Indexed Trellis workspace"));
|
|
1928
|
+
console.log(` ${chalk4.dim("Path:")} ${rootPath}`);
|
|
1929
|
+
console.log(
|
|
1930
|
+
` ${chalk4.dim("Files indexed:")} ${result.filesIndexed}`
|
|
1931
|
+
);
|
|
1932
|
+
console.log(
|
|
1933
|
+
` ${chalk4.dim("Ops created:")} ${result.opsCreated}`
|
|
1934
|
+
);
|
|
1935
|
+
return;
|
|
1936
|
+
}
|
|
1886
1937
|
console.log(chalk4.yellow("Already a Trellis workspace."));
|
|
1887
1938
|
return;
|
|
1888
1939
|
}
|
|
@@ -1890,14 +1941,16 @@ program.command("init").description(
|
|
|
1890
1941
|
interactive: process.stdout.isTTY && !process.argv.includes("--no-interactive"),
|
|
1891
1942
|
ides: opts.ides,
|
|
1892
1943
|
framework: opts.framework,
|
|
1893
|
-
footprint
|
|
1944
|
+
footprint,
|
|
1945
|
+
indexWorkspace
|
|
1894
1946
|
});
|
|
1895
1947
|
console.log(chalk4.green("\u2713 Initialized Trellis repository"));
|
|
1896
|
-
const engine = new TrellisVcsEngine({ rootPath });
|
|
1897
|
-
const opsCount = (await engine.log()).length;
|
|
1898
1948
|
console.log(` ${chalk4.dim("Path:")} ${rootPath}`);
|
|
1899
1949
|
console.log(
|
|
1900
|
-
` ${chalk4.dim("
|
|
1950
|
+
` ${chalk4.dim("Files indexed:")} ${configResult.filesIndexed}`
|
|
1951
|
+
);
|
|
1952
|
+
console.log(
|
|
1953
|
+
` ${chalk4.dim("Ops:")} ${configResult.opsCreated} initial ${configResult.opsCreated === 1 ? "operation" : "operations"}`
|
|
1901
1954
|
);
|
|
1902
1955
|
console.log(` ${chalk4.dim("Config:")} .trellis/config.json`);
|
|
1903
1956
|
console.log(` ${chalk4.dim("Op log:")} .trellis/ops.json`);
|
|
@@ -1950,15 +2003,23 @@ program.command("init").description(
|
|
|
1950
2003
|
);
|
|
1951
2004
|
}
|
|
1952
2005
|
console.log();
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
2006
|
+
if (configResult.indexWorkspace) {
|
|
2007
|
+
console.log(
|
|
2008
|
+
chalk4.dim(
|
|
2009
|
+
"The causal stream is now active. Every file change will be tracked."
|
|
2010
|
+
)
|
|
2011
|
+
);
|
|
2012
|
+
} else {
|
|
2013
|
+
console.log(
|
|
2014
|
+
chalk4.dim(
|
|
2015
|
+
"Minimal workspace initialized. Existing files were not indexed."
|
|
2016
|
+
)
|
|
2017
|
+
);
|
|
2018
|
+
}
|
|
1958
2019
|
});
|
|
1959
2020
|
program.command("seed").description("Refresh agent context files with current project state").option("-p, --path <path>", "Repository path", ".").option(
|
|
1960
2021
|
"--ide <ide>",
|
|
1961
|
-
"IDE to update (cursor,
|
|
2022
|
+
"IDE to update (cursor, devin, claude, copilot)",
|
|
1962
2023
|
"none"
|
|
1963
2024
|
).option("-f, --force", "Force rewrite even if files do not exist", false).action(async (opts) => {
|
|
1964
2025
|
const rootPath = resolveRepoRoot(opts.path);
|
|
@@ -2038,7 +2099,7 @@ program.command("log").description("Show operation history").option("-p, --path
|
|
|
2038
2099
|
filePath: opts.file
|
|
2039
2100
|
});
|
|
2040
2101
|
if (opts.remote || opts.all) {
|
|
2041
|
-
const { RemoteManager } = await import("../remote-manager-
|
|
2102
|
+
const { RemoteManager } = await import("../remote-manager-ODE3T2KR.js");
|
|
2042
2103
|
const remoteManager = new RemoteManager(join6(rootPath, ".trellis"));
|
|
2043
2104
|
if (opts.all) {
|
|
2044
2105
|
const remotes = remoteManager.listRemotes();
|
|
@@ -2835,7 +2896,7 @@ issueCmd.command("list").description("List issues").option(
|
|
|
2835
2896
|
parentId: opts.parent
|
|
2836
2897
|
});
|
|
2837
2898
|
if (opts.remote || opts.all) {
|
|
2838
|
-
const { RemoteManager } = await import("../remote-manager-
|
|
2899
|
+
const { RemoteManager } = await import("../remote-manager-ODE3T2KR.js");
|
|
2839
2900
|
const remoteManager = new RemoteManager(join6(rootPath, ".trellis"));
|
|
2840
2901
|
if (opts.all) {
|
|
2841
2902
|
const remotes = remoteManager.listRemotes();
|
|
@@ -3572,7 +3633,11 @@ program.command("reindex").description("Rebuild the semantic embedding index").o
|
|
|
3572
3633
|
});
|
|
3573
3634
|
program.command("ui").description(
|
|
3574
3635
|
"Launch the live graph explorer (SvelteKit realtime-app at demo/realtime-app)"
|
|
3575
|
-
).option(
|
|
3636
|
+
).option(
|
|
3637
|
+
"-p, --path <path>",
|
|
3638
|
+
"Repository path (init .trellis if missing)",
|
|
3639
|
+
"."
|
|
3640
|
+
).option("--port <port>", "SvelteKit app port", "4000").option("--trellis-port <port>", "Trellis graph sidecar port", "3920").option(
|
|
3576
3641
|
"--legacy",
|
|
3577
3642
|
"Use legacy client.html System Visualizer instead of the Svelte explorer"
|
|
3578
3643
|
).option("--no-open", "Do not auto-open browser").action(async (opts) => {
|
|
@@ -3590,12 +3655,8 @@ program.command("ui").description(
|
|
|
3590
3655
|
try {
|
|
3591
3656
|
const server = await startUIServer2({ rootPath, port: appPort });
|
|
3592
3657
|
const url = `http://localhost:${server.port}`;
|
|
3593
|
-
console.log(
|
|
3594
|
-
|
|
3595
|
-
);
|
|
3596
|
-
console.log(
|
|
3597
|
-
chalk4.green(`\u2713 Running at ${chalk4.bold(url)}`)
|
|
3598
|
-
);
|
|
3658
|
+
console.log(chalk4.yellow("Legacy System Visualizer (client.html)"));
|
|
3659
|
+
console.log(chalk4.green(`\u2713 Running at ${chalk4.bold(url)}`));
|
|
3599
3660
|
openBrowser(url);
|
|
3600
3661
|
process.on("SIGINT", () => {
|
|
3601
3662
|
server.stop();
|
|
@@ -3609,9 +3670,7 @@ program.command("ui").description(
|
|
|
3609
3670
|
}
|
|
3610
3671
|
try {
|
|
3611
3672
|
const { launchRealtimeExplorer } = await import("../launch-explorer-HZ4ZJA4X.js");
|
|
3612
|
-
console.log(
|
|
3613
|
-
chalk4.dim(`Workspace: ${rootPath}`)
|
|
3614
|
-
);
|
|
3673
|
+
console.log(chalk4.dim(`Workspace: ${rootPath}`));
|
|
3615
3674
|
console.log(
|
|
3616
3675
|
chalk4.dim("Starting Svelte realtime explorer (sidecar + Vite)\u2026\n")
|
|
3617
3676
|
);
|
|
@@ -4402,13 +4461,13 @@ db.command("init").description("Initialize a new Trellis DB in the current direc
|
|
|
4402
4461
|
` ${chalk4.cyan("trellis db serve")} Start the local HTTP server`
|
|
4403
4462
|
);
|
|
4404
4463
|
console.log(
|
|
4405
|
-
` ${chalk4.cyan("trellis
|
|
4464
|
+
` ${chalk4.cyan("trellis deploy --name <n>")} Deploy room node to Sprites`
|
|
4406
4465
|
);
|
|
4407
4466
|
});
|
|
4408
4467
|
db.command("serve").description("Start the Trellis DB HTTP + WebSocket server").option("-p, --port <port>", "Override port from config").option("--config-dir <dir>", "Directory containing .trellis-db.json", ".").action(async (opts) => {
|
|
4409
4468
|
const { readConfig } = await import("../config-PFTP67TR.js");
|
|
4410
|
-
const { TenantPool } = await import("../tenancy-
|
|
4411
|
-
const { startServer } = await import("../server-
|
|
4469
|
+
const { TenantPool } = await import("../tenancy-POMWQP6M.js");
|
|
4470
|
+
const { startServer } = await import("../server-ZVWGLLRF.js");
|
|
4412
4471
|
const config = readConfig(opts.configDir);
|
|
4413
4472
|
if (!config) {
|
|
4414
4473
|
console.error(
|
|
@@ -4423,8 +4482,14 @@ db.command("serve").description("Start the Trellis DB HTTP + WebSocket server").
|
|
|
4423
4482
|
process.exit(1);
|
|
4424
4483
|
}
|
|
4425
4484
|
const port = opts.port ? parseInt(opts.port) : config.port ?? 3e3;
|
|
4426
|
-
const
|
|
4427
|
-
const
|
|
4485
|
+
const { DEFAULT_TENANT, resolvePoolBackendFromEnv } = await import("../tenancy-POMWQP6M.js");
|
|
4486
|
+
const backendOpts = resolvePoolBackendFromEnv();
|
|
4487
|
+
const pool = new TenantPool(
|
|
4488
|
+
config.dbPath,
|
|
4489
|
+
backendOpts ? { backend: backendOpts } : void 0
|
|
4490
|
+
);
|
|
4491
|
+
await pool.preload(DEFAULT_TENANT);
|
|
4492
|
+
const { startServerCrossRuntime } = await import("../server-ZVWGLLRF.js");
|
|
4428
4493
|
const server = await startServerCrossRuntime({ port, config, pool });
|
|
4429
4494
|
console.log(chalk4.green(`\u2713 Trellis DB running`));
|
|
4430
4495
|
console.log(chalk4.dim(` URL: http://localhost:${port}`));
|
|
@@ -4515,7 +4580,7 @@ db.command("upload <file>").description("Upload a file to the blob store").optio
|
|
|
4515
4580
|
});
|
|
4516
4581
|
db.command("import <file>").description("Import data from CSV, JSON, NDJSON, or Parquet").requiredOption("--type <type>", "Entity type to assign to each record").option("--id-field <field>", "Field to use as entity ID").option("--limit <n>", "Max rows to import").option("--config-dir <dir>", "Config directory", ".").option("--tenant <id>", "Tenant ID").action(async (filePath, opts) => {
|
|
4517
4582
|
const { readConfig } = await import("../config-PFTP67TR.js");
|
|
4518
|
-
const { TenantPool } = await import("../tenancy-
|
|
4583
|
+
const { TenantPool } = await import("../tenancy-POMWQP6M.js");
|
|
4519
4584
|
const { importFile } = await import("../import-UZEKXU3B.js");
|
|
4520
4585
|
const config = readConfig(opts.configDir);
|
|
4521
4586
|
if (!config?.dbPath) {
|
|
@@ -4542,41 +4607,29 @@ db.command("import <file>").description("Import data from CSV, JSON, NDJSON, or
|
|
|
4542
4607
|
}
|
|
4543
4608
|
pool.closeAll();
|
|
4544
4609
|
});
|
|
4545
|
-
|
|
4546
|
-
"--
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
console.log(chalk4.bold("SDK usage:"));
|
|
4569
|
-
console.log(chalk4.cyan(` import { TrellisDb } from 'trellis/client';`));
|
|
4570
|
-
console.log(
|
|
4571
|
-
chalk4.cyan(
|
|
4572
|
-
` const db = new TrellisDb({ url: '${result.url}', apiKey: '${result.apiKey}' });`
|
|
4573
|
-
)
|
|
4574
|
-
);
|
|
4575
|
-
} catch (err) {
|
|
4576
|
-
console.error(chalk4.red(`Deploy failed: ${err.message}`));
|
|
4577
|
-
process.exit(1);
|
|
4578
|
-
}
|
|
4579
|
-
});
|
|
4610
|
+
function registerDeployOptions(cmd) {
|
|
4611
|
+
return cmd.requiredOption("--name <name>", "Room slug (becomes <name>.sprites.app)").option(
|
|
4612
|
+
"--key <key>",
|
|
4613
|
+
"API key for the deployed server (auto-generated if omitted)"
|
|
4614
|
+
).option("--jwt-secret <secret>", "JWT secret (auto-generated if omitted)").option(
|
|
4615
|
+
"--port <port>",
|
|
4616
|
+
"Port inside Sprite (live default: 8080 \u2014 Sprites public URL)"
|
|
4617
|
+
).option("--config-dir <dir>", "Directory for .trellis-db.json", ".").option(
|
|
4618
|
+
"--stub",
|
|
4619
|
+
"Validate name and write config only \u2014 skip Sprites provisioning",
|
|
4620
|
+
false
|
|
4621
|
+
);
|
|
4622
|
+
}
|
|
4623
|
+
async function handleDeployCommand(opts) {
|
|
4624
|
+
const { runDeployCli } = await import("../deploy-cli-C35HTITO.js");
|
|
4625
|
+
await runDeployCli(opts);
|
|
4626
|
+
}
|
|
4627
|
+
registerDeployOptions(
|
|
4628
|
+
db.command("deploy").description("Deploy Trellis DB to a Sprites cloud environment")
|
|
4629
|
+
).action(handleDeployCommand);
|
|
4630
|
+
registerDeployOptions(
|
|
4631
|
+
program.command("deploy").description("Deploy a managed TurtleDB room node to Sprites")
|
|
4632
|
+
).action(handleDeployCommand);
|
|
4580
4633
|
var vmProgram = new Command("vm");
|
|
4581
4634
|
vmProgram.description("Manage Sprites VMs").option("-s, --sprite <name>", "Sprite name to operate on");
|
|
4582
4635
|
async function getSpriteName(spriteOption) {
|
|
@@ -4589,9 +4642,9 @@ async function getSpriteName(spriteOption) {
|
|
|
4589
4642
|
);
|
|
4590
4643
|
}
|
|
4591
4644
|
vmProgram.command("create <name>").description("Create a new Sprite and deploy Trellis DB").option("-k, --api-key <key>", "API key (auto-generated if omitted)").option("-p, --port <port>", "Port (default: 3000)", "3000").action(async (name, cmdOpts) => {
|
|
4592
|
-
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-
|
|
4645
|
+
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4593
4646
|
const { trackSprite } = await import("../vm-config-JI4OXKDQ.js");
|
|
4594
|
-
const { deploy } = await import("../deploy-
|
|
4647
|
+
const { deploy } = await import("../deploy-LQ7GUGJ5.js");
|
|
4595
4648
|
try {
|
|
4596
4649
|
await assertSpriteCli();
|
|
4597
4650
|
console.log(`Creating Sprite: ${name}...`);
|
|
@@ -4643,7 +4696,7 @@ vmProgram.command("list").description("List all tracked Sprites").action(async (
|
|
|
4643
4696
|
}
|
|
4644
4697
|
});
|
|
4645
4698
|
vmProgram.command("use <name>").description("Set the active Sprite").action(async (name) => {
|
|
4646
|
-
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-
|
|
4699
|
+
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4647
4700
|
const { setActiveSprite } = await import("../vm-config-JI4OXKDQ.js");
|
|
4648
4701
|
try {
|
|
4649
4702
|
await assertSpriteCli();
|
|
@@ -4660,7 +4713,7 @@ vmProgram.command("use <name>").description("Set the active Sprite").action(asyn
|
|
|
4660
4713
|
}
|
|
4661
4714
|
});
|
|
4662
4715
|
vmProgram.command("destroy <name>").description("Destroy a Sprite").action(async (name) => {
|
|
4663
|
-
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-
|
|
4716
|
+
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4664
4717
|
const { untrackSprite } = await import("../vm-config-JI4OXKDQ.js");
|
|
4665
4718
|
try {
|
|
4666
4719
|
await assertSpriteCli();
|
|
@@ -4691,7 +4744,7 @@ vmProgram.command("destroy <name>").description("Destroy a Sprite").action(async
|
|
|
4691
4744
|
}
|
|
4692
4745
|
});
|
|
4693
4746
|
vmProgram.command("exec <command...>").description("Execute a command on the active Sprite").action(async (command) => {
|
|
4694
|
-
const { runSpriteInteractive, assertSpriteCli } = await import("../sprites-
|
|
4747
|
+
const { runSpriteInteractive, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4695
4748
|
try {
|
|
4696
4749
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
4697
4750
|
console.log(`Executing on ${spriteName}: ${command.join(" ")}`);
|
|
@@ -4702,7 +4755,7 @@ vmProgram.command("exec <command...>").description("Execute a command on the act
|
|
|
4702
4755
|
}
|
|
4703
4756
|
});
|
|
4704
4757
|
vmProgram.command("console").description("Open an interactive console on the active Sprite").action(async () => {
|
|
4705
|
-
const { runSpriteInteractive, assertSpriteCli } = await import("../sprites-
|
|
4758
|
+
const { runSpriteInteractive, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4706
4759
|
try {
|
|
4707
4760
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
4708
4761
|
console.log(`Opening console on ${spriteName}...`);
|
|
@@ -4713,7 +4766,7 @@ vmProgram.command("console").description("Open an interactive console on the act
|
|
|
4713
4766
|
}
|
|
4714
4767
|
});
|
|
4715
4768
|
vmProgram.command("sessions").description("Manage Sprite sessions").argument("<action>", "Action: list, attach, or kill").argument("[sessionId]", "Session ID (required for attach/kill)").action(async (action, sessionId) => {
|
|
4716
|
-
const { runSpriteCmd, runSpriteInteractive, assertSpriteCli } = await import("../sprites-
|
|
4769
|
+
const { runSpriteCmd, runSpriteInteractive, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4717
4770
|
try {
|
|
4718
4771
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
4719
4772
|
switch (action) {
|
|
@@ -4750,7 +4803,7 @@ vmProgram.command("sessions").description("Manage Sprite sessions").argument("<a
|
|
|
4750
4803
|
}
|
|
4751
4804
|
});
|
|
4752
4805
|
vmProgram.command("url").description("Get or update the URL for the active Sprite").option("--public", "Get public URL (default)").option("--private", "Get private URL").option("--update-auth", "Update authentication").action(async (cmdOpts) => {
|
|
4753
|
-
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-
|
|
4806
|
+
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4754
4807
|
try {
|
|
4755
4808
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
4756
4809
|
if (cmdOpts.updateAuth) {
|
|
@@ -4772,7 +4825,7 @@ vmProgram.command("url").description("Get or update the URL for the active Sprit
|
|
|
4772
4825
|
}
|
|
4773
4826
|
});
|
|
4774
4827
|
vmProgram.command("proxy <ports...>").description("Proxy local ports to the active Sprite").action(async (ports) => {
|
|
4775
|
-
const { runSpriteInteractive, assertSpriteCli } = await import("../sprites-
|
|
4828
|
+
const { runSpriteInteractive, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4776
4829
|
try {
|
|
4777
4830
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
4778
4831
|
console.log(`Proxying ports ${ports.join(", ")} to ${spriteName}...`);
|
|
@@ -4783,7 +4836,7 @@ vmProgram.command("proxy <ports...>").description("Proxy local ports to the acti
|
|
|
4783
4836
|
}
|
|
4784
4837
|
});
|
|
4785
4838
|
vmProgram.command("checkpoint").description("Manage Sprite checkpoints").argument("<action>", "Action: create, list, or restore").option("-m, --milestone <msg>", "Message for linked milestone (create only)").option("-c, --checkpoint <id>", "Checkpoint ID (restore only)").action(async (action, cmdOpts) => {
|
|
4786
|
-
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-
|
|
4839
|
+
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4787
4840
|
const { loadVmConfig, trackSprite } = await import("../vm-config-JI4OXKDQ.js");
|
|
4788
4841
|
try {
|
|
4789
4842
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
@@ -4838,7 +4891,7 @@ vmProgram.command("checkpoint").description("Manage Sprite checkpoints").argumen
|
|
|
4838
4891
|
}
|
|
4839
4892
|
});
|
|
4840
4893
|
vmProgram.command("cp <src> <dest>").description("Copy files (use :prefix for remote paths)").action(async (src, dest) => {
|
|
4841
|
-
const { runSpriteCmd, runSpriteCopy, assertSpriteCli } = await import("../sprites-
|
|
4894
|
+
const { runSpriteCmd, runSpriteCopy, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4842
4895
|
try {
|
|
4843
4896
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
4844
4897
|
const isToSprite = !src.startsWith(":") && dest.startsWith(":");
|
|
@@ -4863,7 +4916,7 @@ vmProgram.command("cp <src> <dest>").description("Copy files (use :prefix for re
|
|
|
4863
4916
|
}
|
|
4864
4917
|
});
|
|
4865
4918
|
vmProgram.command("status").description("Show detailed status of the active Sprite").action(async () => {
|
|
4866
|
-
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-
|
|
4919
|
+
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4867
4920
|
const { loadVmConfig } = await import("../vm-config-JI4OXKDQ.js");
|
|
4868
4921
|
try {
|
|
4869
4922
|
const spriteName = await getSpriteName(vmProgram.opts().sprite);
|
|
@@ -4895,9 +4948,9 @@ vmProgram.command("status").description("Show detailed status of the active Spri
|
|
|
4895
4948
|
}
|
|
4896
4949
|
});
|
|
4897
4950
|
vmProgram.command("code [name]").description("Create Sprite, deploy Trellis, open in browser").action(async (nameOpt) => {
|
|
4898
|
-
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-
|
|
4951
|
+
const { runSpriteCmd, assertSpriteCli } = await import("../sprites-KQGTGM6W.js");
|
|
4899
4952
|
const { loadVmConfig, trackSprite, getActiveSprite } = await import("../vm-config-JI4OXKDQ.js");
|
|
4900
|
-
const { deploy } = await import("../deploy-
|
|
4953
|
+
const { deploy } = await import("../deploy-LQ7GUGJ5.js");
|
|
4901
4954
|
const openUrl = (url) => {
|
|
4902
4955
|
const cmd = process.platform === "darwin" ? "open" : process.platform === "linux" ? "xdg-open" : null;
|
|
4903
4956
|
if (!cmd) {
|
|
@@ -5372,7 +5425,7 @@ cmsCmd.command("register-library <pkg>").description(
|
|
|
5372
5425
|
});
|
|
5373
5426
|
program.command("remote").description("Manage remote workspace subscriptions").argument("[action]", '"add", "remove", or "list" (default: list)').argument("[name]", "Remote name (for add/remove)").argument("[path]", "Remote path (for add)").option("-p, --path <path>", "Repository path", ".").action(async (action, name, path, opts) => {
|
|
5374
5427
|
const rootPath = resolveRepoRoot(opts.path);
|
|
5375
|
-
const { RemoteManager } = await import("../remote-manager-
|
|
5428
|
+
const { RemoteManager } = await import("../remote-manager-ODE3T2KR.js");
|
|
5376
5429
|
const remoteManager = new RemoteManager(join6(rootPath, ".trellis"));
|
|
5377
5430
|
try {
|
|
5378
5431
|
if (!action || action === "list") {
|
|
@@ -5424,7 +5477,7 @@ program.command("remote").description("Manage remote workspace subscriptions").a
|
|
|
5424
5477
|
});
|
|
5425
5478
|
program.command("pull").description("Pull operations from remote workspaces").option("-p, --path <path>", "Repository path", ".").option("--remote <remote>", "Pull from specific remote only").action(async (opts) => {
|
|
5426
5479
|
const rootPath = resolveRepoRoot(opts.path);
|
|
5427
|
-
const { RemoteManager } = await import("../remote-manager-
|
|
5480
|
+
const { RemoteManager } = await import("../remote-manager-ODE3T2KR.js");
|
|
5428
5481
|
const remoteManager = new RemoteManager(join6(rootPath, ".trellis"));
|
|
5429
5482
|
const engine = new TrellisVcsEngine({ rootPath });
|
|
5430
5483
|
engine.open();
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trellis Client — browser runtime surface
|
|
3
|
+
*
|
|
4
|
+
* This barrel is selected by the package `browser` condition. It exposes the
|
|
5
|
+
* remote DB SDK and framework-agnostic live-read primitives without importing
|
|
6
|
+
* filesystem config, embedded tenancy, or the VCS engine.
|
|
7
|
+
*
|
|
8
|
+
* @module trellis/client
|
|
9
|
+
*/
|
|
10
|
+
export { TrellisDb, FetchError } from './sdk.browser.js';
|
|
11
|
+
export type { AuthResult, EntityData, ListResult, QueryResult, Subscription, SubscriptionCallback, TrellisDbLocalOptions, TrellisDbOptions, TrellisDbRemoteOptions, UploadResult, } from './sdk.browser.js';
|
|
12
|
+
export { Signal, BatchSignal } from './reactive.js';
|
|
13
|
+
export { liveQuery, liveEntities, liveEntity } from './live.js';
|
|
14
|
+
export type { LiveEntitiesOptions, LiveEntityOptions, LiveResource, ReadState, } from './live.js';
|
|
15
|
+
export type { DbMode, TrellisDbConfig } from './config.js';
|
|
16
|
+
export declare const CONFIG_FILE = ".trellis-db.json";
|
|
17
|
+
/**
|
|
18
|
+
* Filesystem-backed Trellis config is not available in browsers.
|
|
19
|
+
*/
|
|
20
|
+
export declare function hasConfig(_dir?: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Filesystem-backed Trellis config is not available in browsers.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readConfig(_dir?: string): null;
|
|
25
|
+
export declare function configPath(dir?: string): string;
|
|
26
|
+
export declare function writeConfig(): never;
|
|
27
|
+
export declare function updateConfig(): never;
|
|
28
|
+
export declare function defaultLocalConfig(dbPath: string, opts?: Partial<import('./config.js').TrellisDbConfig>): import('./config.js').TrellisDbConfig;
|
|
29
|
+
//# sourceMappingURL=index.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../../src/client/index.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChE,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,SAAS,GACV,MAAM,WAAW,CAAC;AAEnB,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE3D,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAE9C;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,SAAM,GAAG,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,SAAM,GAAG,IAAI,CAE3C;AAED,wBAAgB,UAAU,CAAC,GAAG,SAAM,GAAG,MAAM,CAG5C;AAED,wBAAgB,WAAW,IAAI,KAAK,CAEnC;AAED,wBAAgB,YAAY,IAAI,KAAK,CAEpC;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,OAAO,CAAC,OAAO,aAAa,EAAE,eAAe,CAAM,GACxD,OAAO,aAAa,EAAE,eAAe,CAQvC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
liveEntities,
|
|
3
|
+
liveEntity,
|
|
4
|
+
liveQuery
|
|
5
|
+
} from "../chunk-J3WYZO3Q.js";
|
|
6
|
+
import "../chunk-JUEMDWLU.js";
|
|
7
|
+
import {
|
|
8
|
+
FetchError,
|
|
9
|
+
TrellisDb
|
|
10
|
+
} from "../chunk-J2TXUFCZ.js";
|
|
11
|
+
import {
|
|
12
|
+
BatchSignal,
|
|
13
|
+
Signal
|
|
14
|
+
} from "../chunk-UBGUDMUV.js";
|
|
15
|
+
import "../chunk-KFQGP6VL.js";
|
|
16
|
+
|
|
17
|
+
// src/client/index.browser.ts
|
|
18
|
+
var CONFIG_FILE = ".trellis-db.json";
|
|
19
|
+
function hasConfig(_dir = ".") {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
function readConfig(_dir = ".") {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
function configPath(dir = ".") {
|
|
26
|
+
const base = dir.endsWith("/") ? dir.slice(0, -1) : dir;
|
|
27
|
+
return `${base}/${CONFIG_FILE}`;
|
|
28
|
+
}
|
|
29
|
+
function writeConfig() {
|
|
30
|
+
throw browserConfigError("writeConfig()");
|
|
31
|
+
}
|
|
32
|
+
function updateConfig() {
|
|
33
|
+
throw browserConfigError("updateConfig()");
|
|
34
|
+
}
|
|
35
|
+
function defaultLocalConfig(dbPath, opts = {}) {
|
|
36
|
+
return {
|
|
37
|
+
mode: "local",
|
|
38
|
+
dbPath,
|
|
39
|
+
port: 3e3,
|
|
40
|
+
multiTenant: false,
|
|
41
|
+
...opts
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function browserConfigError(feature) {
|
|
45
|
+
return new Error(
|
|
46
|
+
`${feature} is only available in Node. Browser apps should construct \`new TrellisDb({ url })\` directly.`
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
BatchSignal,
|
|
51
|
+
CONFIG_FILE,
|
|
52
|
+
FetchError,
|
|
53
|
+
Signal,
|
|
54
|
+
TrellisDb,
|
|
55
|
+
configPath,
|
|
56
|
+
defaultLocalConfig,
|
|
57
|
+
hasConfig,
|
|
58
|
+
liveEntities,
|
|
59
|
+
liveEntity,
|
|
60
|
+
liveQuery,
|
|
61
|
+
readConfig,
|
|
62
|
+
updateConfig,
|
|
63
|
+
writeConfig
|
|
64
|
+
};
|