trellis 1.0.8 → 2.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.
- package/LICENSE +21 -0
- package/README.md +564 -83
- package/bin/trellis.mjs +2 -0
- package/dist/cli/index.js +4718 -0
- package/dist/core/index.js +12 -0
- package/dist/decisions/index.js +19 -0
- package/dist/embeddings/index.js +43 -0
- package/dist/index-1j1anhmr.js +4038 -0
- package/dist/index-3s0eak0p.js +1556 -0
- package/dist/index-8pce39mh.js +272 -0
- package/dist/index-a76rekgs.js +67 -0
- package/dist/index-cy9k1g6v.js +684 -0
- package/dist/index-fd4e26s4.js +69 -0
- package/dist/{store/eav-store.js → index-gkvhzm9f.js} +4 -6
- package/dist/index-gnw8d7d6.js +51 -0
- package/dist/index-vkpkfwhq.js +817 -0
- package/dist/index.js +118 -2876
- package/dist/links/index.js +55 -0
- package/dist/transformers-m9je15kg.js +32491 -0
- package/dist/vcs/index.js +110 -0
- package/logo.png +0 -0
- package/logo.svg +9 -0
- package/package.json +79 -76
- package/src/cli/index.ts +2340 -0
- package/src/core/index.ts +35 -0
- package/src/core/kernel/middleware.ts +44 -0
- package/src/core/persist/backend.ts +64 -0
- package/src/core/store/eav-store.ts +467 -0
- package/src/decisions/auto-capture.ts +136 -0
- package/src/decisions/hooks.ts +163 -0
- package/src/decisions/index.ts +261 -0
- package/src/decisions/types.ts +103 -0
- package/src/embeddings/chunker.ts +327 -0
- package/src/embeddings/index.ts +41 -0
- package/src/embeddings/model.ts +95 -0
- package/src/embeddings/search.ts +305 -0
- package/src/embeddings/store.ts +313 -0
- package/src/embeddings/types.ts +85 -0
- package/src/engine.ts +1083 -0
- package/src/garden/cluster.ts +330 -0
- package/src/garden/garden.ts +306 -0
- package/src/garden/index.ts +29 -0
- package/src/git/git-exporter.ts +286 -0
- package/src/git/git-importer.ts +329 -0
- package/src/git/git-reader.ts +189 -0
- package/src/git/index.ts +22 -0
- package/src/identity/governance.ts +211 -0
- package/src/identity/identity.ts +224 -0
- package/src/identity/index.ts +30 -0
- package/src/identity/signing-middleware.ts +97 -0
- package/src/index.ts +20 -0
- package/src/links/index.ts +49 -0
- package/src/links/lifecycle.ts +400 -0
- package/src/links/parser.ts +484 -0
- package/src/links/ref-index.ts +186 -0
- package/src/links/resolver.ts +314 -0
- package/src/links/types.ts +108 -0
- package/src/mcp/index.ts +22 -0
- package/src/mcp/server.ts +1278 -0
- package/src/semantic/csharp-parser.ts +493 -0
- package/src/semantic/go-parser.ts +585 -0
- package/src/semantic/index.ts +34 -0
- package/src/semantic/java-parser.ts +456 -0
- package/src/semantic/python-parser.ts +659 -0
- package/src/semantic/ruby-parser.ts +446 -0
- package/src/semantic/rust-parser.ts +784 -0
- package/src/semantic/semantic-merge.ts +210 -0
- package/src/semantic/ts-parser.ts +681 -0
- package/src/semantic/types.ts +175 -0
- package/src/sync/index.ts +32 -0
- package/src/sync/memory-transport.ts +66 -0
- package/src/sync/reconciler.ts +237 -0
- package/src/sync/sync-engine.ts +258 -0
- package/src/sync/types.ts +104 -0
- package/src/vcs/blob-store.ts +124 -0
- package/src/vcs/branch.ts +150 -0
- package/src/vcs/checkpoint.ts +64 -0
- package/src/vcs/decompose.ts +469 -0
- package/src/vcs/diff.ts +409 -0
- package/src/vcs/engine-context.ts +26 -0
- package/src/vcs/index.ts +23 -0
- package/src/vcs/issue.ts +800 -0
- package/src/vcs/merge.ts +425 -0
- package/src/vcs/milestone.ts +124 -0
- package/src/vcs/ops.ts +59 -0
- package/src/vcs/types.ts +213 -0
- package/src/vcs/vcs-middleware.ts +81 -0
- package/src/watcher/fs-watcher.ts +217 -0
- package/src/watcher/index.ts +9 -0
- package/src/watcher/ingestion.ts +116 -0
- package/dist/ai/index.js +0 -688
- package/dist/cli/server.js +0 -3321
- package/dist/cli/tql.js +0 -5282
- package/dist/client/tql-client.js +0 -108
- package/dist/graph/index.js +0 -2248
- package/dist/kernel/logic-middleware.js +0 -179
- package/dist/kernel/middleware.js +0 -0
- package/dist/kernel/operations.js +0 -32
- package/dist/kernel/schema-middleware.js +0 -34
- package/dist/kernel/security-middleware.js +0 -53
- package/dist/kernel/trellis-kernel.js +0 -2239
- package/dist/kernel/workspace.js +0 -91
- package/dist/persist/backend.js +0 -0
- package/dist/persist/sqlite-backend.js +0 -123
- package/dist/query/index.js +0 -1643
- package/dist/server/index.js +0 -3309
- package/dist/workflows/index.js +0 -3160
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
// src/client/tql-client.ts
|
|
2
|
-
class TQLError extends Error {
|
|
3
|
-
status;
|
|
4
|
-
constructor(message, status) {
|
|
5
|
-
super(message);
|
|
6
|
-
this.status = status;
|
|
7
|
-
this.name = "TQLError";
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
class TQLClient {
|
|
12
|
-
baseUrl;
|
|
13
|
-
fetch;
|
|
14
|
-
apiKey;
|
|
15
|
-
constructor(baseUrlOrOptions) {
|
|
16
|
-
if (typeof baseUrlOrOptions === "string") {
|
|
17
|
-
this.baseUrl = baseUrlOrOptions.replace(/\/$/, "");
|
|
18
|
-
this.fetch = globalThis.fetch;
|
|
19
|
-
this.apiKey = undefined;
|
|
20
|
-
} else {
|
|
21
|
-
this.baseUrl = baseUrlOrOptions.baseUrl.replace(/\/$/, "");
|
|
22
|
-
this.fetch = baseUrlOrOptions.fetch ?? globalThis.fetch;
|
|
23
|
-
this.apiKey = baseUrlOrOptions.apiKey;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
async req(method, path, body) {
|
|
27
|
-
const headers = {};
|
|
28
|
-
if (body !== undefined)
|
|
29
|
-
headers["Content-Type"] = "application/json";
|
|
30
|
-
if (this.apiKey)
|
|
31
|
-
headers["Authorization"] = `Bearer ${this.apiKey}`;
|
|
32
|
-
const res = await this.fetch(`${this.baseUrl}${path}`, {
|
|
33
|
-
method,
|
|
34
|
-
headers,
|
|
35
|
-
body: body !== undefined ? JSON.stringify(body) : undefined
|
|
36
|
-
});
|
|
37
|
-
const data = await res.json();
|
|
38
|
-
if (!res.ok) {
|
|
39
|
-
throw new TQLError(data.error ?? `HTTP ${res.status}`, res.status);
|
|
40
|
-
}
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
async provision(adminKey, label) {
|
|
44
|
-
const headers = {
|
|
45
|
-
"Content-Type": "application/json",
|
|
46
|
-
Authorization: `Bearer ${adminKey}`
|
|
47
|
-
};
|
|
48
|
-
const res = await this.fetch(`${this.baseUrl}/instances`, {
|
|
49
|
-
method: "POST",
|
|
50
|
-
headers,
|
|
51
|
-
body: JSON.stringify({ label })
|
|
52
|
-
});
|
|
53
|
-
const data = await res.json();
|
|
54
|
-
if (!res.ok) {
|
|
55
|
-
throw new TQLError(data.error ?? `HTTP ${res.status}`, res.status);
|
|
56
|
-
}
|
|
57
|
-
return data;
|
|
58
|
-
}
|
|
59
|
-
health() {
|
|
60
|
-
return this.req("GET", "/health");
|
|
61
|
-
}
|
|
62
|
-
stats() {
|
|
63
|
-
return this.req("GET", "/stats");
|
|
64
|
-
}
|
|
65
|
-
catalog() {
|
|
66
|
-
return this.req("GET", "/catalog");
|
|
67
|
-
}
|
|
68
|
-
listNodes() {
|
|
69
|
-
return this.req("GET", "/nodes");
|
|
70
|
-
}
|
|
71
|
-
createNode(id, data, type = "default") {
|
|
72
|
-
return this.req("POST", "/nodes", { id, data, type });
|
|
73
|
-
}
|
|
74
|
-
getNode(id) {
|
|
75
|
-
return this.req("GET", `/nodes/${encodeURIComponent(id)}`);
|
|
76
|
-
}
|
|
77
|
-
updateNode(id, data, type = "default") {
|
|
78
|
-
return this.req("PUT", `/nodes/${encodeURIComponent(id)}`, { data, type });
|
|
79
|
-
}
|
|
80
|
-
deleteNode(id) {
|
|
81
|
-
return this.req("DELETE", `/nodes/${encodeURIComponent(id)}`);
|
|
82
|
-
}
|
|
83
|
-
listLinks() {
|
|
84
|
-
return this.req("GET", "/links");
|
|
85
|
-
}
|
|
86
|
-
createLink(source, relation, target) {
|
|
87
|
-
return this.req("POST", "/links", { source, target, relation });
|
|
88
|
-
}
|
|
89
|
-
query(q) {
|
|
90
|
-
return this.req("POST", "/query", { q });
|
|
91
|
-
}
|
|
92
|
-
queryNatural(q, context) {
|
|
93
|
-
return this.req("POST", "/query", { q, natural: true, context });
|
|
94
|
-
}
|
|
95
|
-
exportWorkspace() {
|
|
96
|
-
return this.req("GET", "/workspace");
|
|
97
|
-
}
|
|
98
|
-
bootWorkspace(config) {
|
|
99
|
-
return this.req("POST", "/workspace", config);
|
|
100
|
-
}
|
|
101
|
-
checkpoint() {
|
|
102
|
-
return this.req("POST", "/workspace/checkpoint");
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
export {
|
|
106
|
-
TQLError,
|
|
107
|
-
TQLClient
|
|
108
|
-
};
|