@bendyline/gezel 1.0.5 → 1.0.7
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/dist/checks/index.d.ts +101 -2
- package/dist/checks/index.js +433 -21
- package/dist/{index-CiHSDsBv.d.ts → index-BgRfJ_Pt.d.ts} +13833 -905
- package/dist/index.d.ts +1131 -15
- package/dist/index.js +19787 -5857
- package/dist/markdown/index.d.ts +1 -1
- package/dist/markdown/index.js +1301 -868
- package/dist/native/index.d.ts +121 -11
- package/dist/native/index.js +80 -7
- package/dist/paths.d.ts +133 -5
- package/dist/paths.js +396 -2
- package/dist/{report-action-BUinEFPt.d.ts → report-action-Kt6W23xy.d.ts} +1021 -4
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.js +9855 -5599
- package/package.json +1 -1
package/dist/paths.js
CHANGED
|
@@ -42,6 +42,286 @@ function assertSafeEntityId(value, label = "entity id") {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// src/schemas/knowledge.ts
|
|
46
|
+
import { z } from "zod";
|
|
47
|
+
var KNOWLEDGE_ID_PATTERN = /^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$/;
|
|
48
|
+
var KnowledgeIdSchema = z.string().regex(KNOWLEDGE_ID_PATTERN);
|
|
49
|
+
var KNOWLEDGE_VERSION_PATTERN = /^[A-Za-z0-9](?:[A-Za-z0-9._+-]{0,126}[A-Za-z0-9])?$/;
|
|
50
|
+
var KnowledgeVersionSchema = z.string().min(1).max(128).regex(KNOWLEDGE_VERSION_PATTERN, "catalog version must be one portable path segment").refine(
|
|
51
|
+
(value) => !/^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(value),
|
|
52
|
+
"catalog version must not use a reserved Windows device name"
|
|
53
|
+
);
|
|
54
|
+
var KnowledgeDocumentIdSchema = z.string().min(1).max(256).refine((s) => s === s.normalize("NFC"), "document id must be NFC-normalized").refine((s) => !/[\u0000-\u001f\u007f-\u009f]/u.test(s), "document id must not contain controls").refine((s) => s === s.trim(), "document id must not have leading/trailing whitespace");
|
|
55
|
+
var KnowledgeChunkUidSchema = z.string().regex(/^[0-9a-f]{32}$/);
|
|
56
|
+
var Sha256HexSchema = z.string().regex(/^[0-9a-f]{64}$/);
|
|
57
|
+
var KnowledgeVectorEncodingSchema = z.enum(["bit384+int8"]);
|
|
58
|
+
var KnowledgeEmbeddingProfileSchema = z.object({
|
|
59
|
+
/** e.g. `gezel-multilingual-e5-small@1`. New encoding/model = new id. */
|
|
60
|
+
id: z.string().min(1),
|
|
61
|
+
model: z.object({
|
|
62
|
+
repo: z.string().min(1),
|
|
63
|
+
revision: z.string().min(1),
|
|
64
|
+
onnxDigest: z.string().optional()
|
|
65
|
+
}),
|
|
66
|
+
tokenizer: z.object({
|
|
67
|
+
kind: z.string().min(1),
|
|
68
|
+
digest: z.string().optional()
|
|
69
|
+
}),
|
|
70
|
+
pooling: z.literal("mean"),
|
|
71
|
+
normalized: z.literal(true),
|
|
72
|
+
dimensions: z.number().int().positive(),
|
|
73
|
+
maxTokens: z.number().int().positive(),
|
|
74
|
+
queryInstruction: z.string(),
|
|
75
|
+
passageInstruction: z.string(),
|
|
76
|
+
vectorEncoding: KnowledgeVectorEncodingSchema,
|
|
77
|
+
distance: z.object({
|
|
78
|
+
stage1: z.literal("hamming"),
|
|
79
|
+
stage2: z.literal("cosine")
|
|
80
|
+
}),
|
|
81
|
+
quantization: z.object({
|
|
82
|
+
int8: z.object({
|
|
83
|
+
method: z.literal("symmetric-linear"),
|
|
84
|
+
scale: z.literal(127)
|
|
85
|
+
}),
|
|
86
|
+
binary: z.object({
|
|
87
|
+
method: z.literal("sign"),
|
|
88
|
+
threshold: z.literal(0),
|
|
89
|
+
packing: z.literal("lsb-first")
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
var KnowledgeChunkingProfileSchema = z.object({
|
|
94
|
+
/** `gezel-markdown-chunks@2` for knowledge; `@1` names the project chunker. */
|
|
95
|
+
id: z.string().min(1),
|
|
96
|
+
unit: z.literal("tokens"),
|
|
97
|
+
tokenizer: z.literal("profile"),
|
|
98
|
+
targetTokens: z.number().int().positive(),
|
|
99
|
+
overlapTokens: z.number().int().nonnegative(),
|
|
100
|
+
contextHeader: z.object({ maxTokens: z.number().int().nonnegative() })
|
|
101
|
+
});
|
|
102
|
+
var KnowledgeManifestFileSchema = z.object({
|
|
103
|
+
path: z.string().min(1),
|
|
104
|
+
sizeBytes: z.number().int().nonnegative(),
|
|
105
|
+
sha256: Sha256HexSchema
|
|
106
|
+
});
|
|
107
|
+
var KnowledgeCatalogManifestSchema = z.object({
|
|
108
|
+
kind: z.literal("gezel-knowledge-catalog"),
|
|
109
|
+
formatVersion: z.literal(1),
|
|
110
|
+
indexSchemaVersion: z.literal(1),
|
|
111
|
+
id: KnowledgeIdSchema,
|
|
112
|
+
version: KnowledgeVersionSchema,
|
|
113
|
+
name: z.string().min(1),
|
|
114
|
+
description: z.string().optional(),
|
|
115
|
+
language: z.string().min(2),
|
|
116
|
+
publisher: z.object({
|
|
117
|
+
id: KnowledgeIdSchema,
|
|
118
|
+
name: z.string().min(1),
|
|
119
|
+
url: z.string().optional()
|
|
120
|
+
}),
|
|
121
|
+
createdAt: z.string(),
|
|
122
|
+
sourceSnapshot: z.object({
|
|
123
|
+
name: z.string(),
|
|
124
|
+
date: z.string(),
|
|
125
|
+
taxonomyVersion: z.string().optional()
|
|
126
|
+
}).optional(),
|
|
127
|
+
license: z.object({
|
|
128
|
+
name: z.string().min(1),
|
|
129
|
+
noticePath: z.string().optional(),
|
|
130
|
+
attributionRequired: z.boolean()
|
|
131
|
+
}),
|
|
132
|
+
embedding: KnowledgeEmbeddingProfileSchema,
|
|
133
|
+
chunking: KnowledgeChunkingProfileSchema,
|
|
134
|
+
topics: z.array(z.object({ id: KnowledgeIdSchema, name: z.string().min(1) })).min(1, "a catalog must ship a table of contents (at least one topic)"),
|
|
135
|
+
router: z.object({
|
|
136
|
+
shardTargetChunks: z.number().int().positive(),
|
|
137
|
+
shards: z.array(
|
|
138
|
+
z.object({
|
|
139
|
+
id: z.number().int().nonnegative(),
|
|
140
|
+
path: z.string().min(1),
|
|
141
|
+
chunks: z.number().int().nonnegative(),
|
|
142
|
+
documents: z.number().int().nonnegative(),
|
|
143
|
+
centroids: z.number().int().nonnegative(),
|
|
144
|
+
sha256: Sha256HexSchema
|
|
145
|
+
})
|
|
146
|
+
),
|
|
147
|
+
totalCentroids: z.number().int().nonnegative()
|
|
148
|
+
}),
|
|
149
|
+
counts: z.object({
|
|
150
|
+
documents: z.number().int().nonnegative(),
|
|
151
|
+
chunks: z.number().int().nonnegative(),
|
|
152
|
+
shards: z.number().int().positive()
|
|
153
|
+
}),
|
|
154
|
+
files: z.array(KnowledgeManifestFileSchema).min(1),
|
|
155
|
+
compatibility: z.object({
|
|
156
|
+
minimumGezelVersion: z.string().optional(),
|
|
157
|
+
maximumIndexSchemaVersion: z.number().int().positive()
|
|
158
|
+
}),
|
|
159
|
+
smokeQueries: z.array(
|
|
160
|
+
z.object({
|
|
161
|
+
query: z.string().min(1),
|
|
162
|
+
expectedDocumentIds: z.array(KnowledgeDocumentIdSchema).min(1)
|
|
163
|
+
})
|
|
164
|
+
).optional(),
|
|
165
|
+
toolchain: z.object({
|
|
166
|
+
compiler: z.string(),
|
|
167
|
+
node: z.string(),
|
|
168
|
+
sqlite: z.string().optional(),
|
|
169
|
+
sqliteVec: z.string().optional(),
|
|
170
|
+
onnxruntime: z.string().optional(),
|
|
171
|
+
platform: z.string(),
|
|
172
|
+
modelDigest: z.string().optional(),
|
|
173
|
+
tokenizerDigest: z.string().optional()
|
|
174
|
+
}).optional(),
|
|
175
|
+
signature: z.object({
|
|
176
|
+
algorithm: z.literal("ed25519"),
|
|
177
|
+
keyId: z.string().min(1),
|
|
178
|
+
canonicalization: z.literal("rfc8785"),
|
|
179
|
+
value: z.string().min(1)
|
|
180
|
+
}).optional()
|
|
181
|
+
});
|
|
182
|
+
var CatalogDocumentSchema = z.object({
|
|
183
|
+
id: KnowledgeDocumentIdSchema,
|
|
184
|
+
title: z.string().min(1),
|
|
185
|
+
slug: z.string().min(1),
|
|
186
|
+
summary: z.string().optional(),
|
|
187
|
+
language: z.string().min(2),
|
|
188
|
+
/** Root→leaf topic id path; the first segment must exist in the manifest. */
|
|
189
|
+
topicPath: z.array(KnowledgeIdSchema).min(1),
|
|
190
|
+
markdown: z.string(),
|
|
191
|
+
sourceUrl: z.string().optional(),
|
|
192
|
+
sourceRevision: z.string().optional(),
|
|
193
|
+
sourceUpdatedAt: z.string().optional(),
|
|
194
|
+
attribution: z.record(z.string(), z.string()).optional(),
|
|
195
|
+
aliases: z.array(z.string()).optional()
|
|
196
|
+
});
|
|
197
|
+
var KnowledgeStorageScopeSchema = z.enum(["machine-shared", "user"]);
|
|
198
|
+
var KnowledgeCatalogRefSchema = z.object({
|
|
199
|
+
publisherId: KnowledgeIdSchema,
|
|
200
|
+
catalogId: KnowledgeIdSchema,
|
|
201
|
+
version: KnowledgeVersionSchema,
|
|
202
|
+
contentDigest: Sha256HexSchema,
|
|
203
|
+
storageScope: KnowledgeStorageScopeSchema
|
|
204
|
+
});
|
|
205
|
+
var KnowledgeUserRegistrySchema = z.object({
|
|
206
|
+
version: z.literal(1),
|
|
207
|
+
catalogs: z.array(
|
|
208
|
+
z.object({
|
|
209
|
+
ref: KnowledgeCatalogRefSchema,
|
|
210
|
+
enabled: z.boolean(),
|
|
211
|
+
addedAt: z.string(),
|
|
212
|
+
autoUpdate: z.boolean().optional(),
|
|
213
|
+
/** Set when the manager quarantined this catalog (with the reason). */
|
|
214
|
+
disabledReason: z.string().optional()
|
|
215
|
+
})
|
|
216
|
+
)
|
|
217
|
+
});
|
|
218
|
+
var KnowledgeMachineInventorySchema = z.object({
|
|
219
|
+
version: z.literal(1),
|
|
220
|
+
catalogs: z.array(
|
|
221
|
+
z.object({
|
|
222
|
+
publisherId: KnowledgeIdSchema,
|
|
223
|
+
catalogId: KnowledgeIdSchema,
|
|
224
|
+
version: KnowledgeVersionSchema,
|
|
225
|
+
contentDigest: Sha256HexSchema,
|
|
226
|
+
publishedAt: z.string(),
|
|
227
|
+
bytes: z.number().int().nonnegative()
|
|
228
|
+
})
|
|
229
|
+
)
|
|
230
|
+
});
|
|
231
|
+
var TrustedKnowledgeCoordinateSchema = z.object({
|
|
232
|
+
publisherId: KnowledgeIdSchema,
|
|
233
|
+
catalogId: KnowledgeIdSchema,
|
|
234
|
+
version: KnowledgeVersionSchema,
|
|
235
|
+
expectedDigest: Sha256HexSchema
|
|
236
|
+
});
|
|
237
|
+
var ProjectKnowledgeCatalogsSchema = z.object({
|
|
238
|
+
mode: z.enum(["inherit", "selected", "off"]),
|
|
239
|
+
/**
|
|
240
|
+
* Only for mode 'selected'. Unresolvable refs are RETAINED (not stripped)
|
|
241
|
+
* so a restored project regains its selection when the catalog returns.
|
|
242
|
+
*/
|
|
243
|
+
refs: z.array(z.object({ publisherId: KnowledgeIdSchema, catalogId: KnowledgeIdSchema })).optional()
|
|
244
|
+
});
|
|
245
|
+
var KnowledgeRegistryEntrySchema = z.object({
|
|
246
|
+
catalogId: KnowledgeIdSchema,
|
|
247
|
+
version: z.string().min(1),
|
|
248
|
+
name: z.string().min(1),
|
|
249
|
+
description: z.string().optional(),
|
|
250
|
+
language: z.string().min(2),
|
|
251
|
+
documents: z.number().int().nonnegative(),
|
|
252
|
+
/** Size of the `.gezk` archive itself (download accounting/preflight). */
|
|
253
|
+
archiveBytes: z.number().int().nonnegative(),
|
|
254
|
+
/** sha256 of the `.gezk` archive — the ref's contentDigest after install. */
|
|
255
|
+
contentDigest: z.string().regex(/^[0-9a-f]{64}$/),
|
|
256
|
+
/** Absolute download URL. Uploaded before the registry that names it. */
|
|
257
|
+
url: z.string().url(),
|
|
258
|
+
license: z.object({ name: z.string().min(1), attributionRequired: z.boolean() }),
|
|
259
|
+
sourceSnapshot: z.object({ name: z.string(), date: z.string(), taxonomyVersion: z.string().optional() }).optional()
|
|
260
|
+
});
|
|
261
|
+
var KnowledgeRegistryIndexSchema = z.object({
|
|
262
|
+
kind: z.literal("gezel-knowledge-registry"),
|
|
263
|
+
formatVersion: z.literal(1),
|
|
264
|
+
publisher: z.object({
|
|
265
|
+
id: KnowledgeIdSchema,
|
|
266
|
+
name: z.string().min(1),
|
|
267
|
+
url: z.string().optional()
|
|
268
|
+
}),
|
|
269
|
+
generatedAt: z.string(),
|
|
270
|
+
catalogs: z.array(KnowledgeRegistryEntrySchema),
|
|
271
|
+
signature: z.object({
|
|
272
|
+
algorithm: z.literal("ed25519"),
|
|
273
|
+
keyId: z.string().min(1),
|
|
274
|
+
canonicalization: z.literal("rfc8785"),
|
|
275
|
+
value: z.string().min(1)
|
|
276
|
+
}).optional()
|
|
277
|
+
});
|
|
278
|
+
var KnowledgeUpdateCandidateSchema = z.object({
|
|
279
|
+
publisherId: KnowledgeIdSchema,
|
|
280
|
+
catalogId: KnowledgeIdSchema,
|
|
281
|
+
name: z.string(),
|
|
282
|
+
installedVersion: z.string(),
|
|
283
|
+
availableVersion: z.string(),
|
|
284
|
+
archiveBytes: z.number().int().nonnegative(),
|
|
285
|
+
contentDigest: z.string().regex(/^[0-9a-f]{64}$/),
|
|
286
|
+
url: z.string().url()
|
|
287
|
+
});
|
|
288
|
+
var KnowledgeUpdatesResponseSchema = z.discriminatedUnion("available", [
|
|
289
|
+
z.object({
|
|
290
|
+
available: z.literal(false),
|
|
291
|
+
reason: z.enum(["no-registry-url", "network-blocked", "no-trust-anchors", "fetch-failed"]),
|
|
292
|
+
detail: z.string().optional()
|
|
293
|
+
}),
|
|
294
|
+
z.object({
|
|
295
|
+
available: z.literal(true),
|
|
296
|
+
registryUrl: z.string(),
|
|
297
|
+
publisher: z.object({ id: KnowledgeIdSchema, name: z.string() }),
|
|
298
|
+
checkedAt: z.string(),
|
|
299
|
+
updates: z.array(KnowledgeUpdateCandidateSchema)
|
|
300
|
+
})
|
|
301
|
+
]);
|
|
302
|
+
var KnowledgeInstallRequestSchema = z.object({
|
|
303
|
+
source: z.discriminatedUnion("kind", [
|
|
304
|
+
z.object({ kind: z.literal("file"), path: z.string().min(1) }),
|
|
305
|
+
z.object({
|
|
306
|
+
kind: z.literal("url"),
|
|
307
|
+
url: z.string().url(),
|
|
308
|
+
/** Optional out-of-band identity for remote imports. When present, the
|
|
309
|
+
* daemon rejects bytes that do not match before extracting the archive. */
|
|
310
|
+
expectedSha256: z.string().regex(/^[0-9a-fA-F]{64}$/).optional()
|
|
311
|
+
})
|
|
312
|
+
])
|
|
313
|
+
});
|
|
314
|
+
var UpdateKnowledgeCatalogRequestSchema = z.object({
|
|
315
|
+
enabled: z.boolean().optional(),
|
|
316
|
+
autoUpdate: z.boolean().optional()
|
|
317
|
+
});
|
|
318
|
+
var KnowledgeSearchRequestSchema = z.object({
|
|
319
|
+
query: z.string().min(1),
|
|
320
|
+
maxResults: z.number().int().min(1).max(50).optional(),
|
|
321
|
+
/** Restrict to these catalog ids (default: every enabled catalog). */
|
|
322
|
+
catalogs: z.array(KnowledgeIdSchema).optional()
|
|
323
|
+
});
|
|
324
|
+
|
|
45
325
|
// src/paths.ts
|
|
46
326
|
var MACHINE_SHARED_MARKER = ".gezel-machine-shared-v1.json";
|
|
47
327
|
function machineSharedHome(platform = process.platform, env = process.env) {
|
|
@@ -93,6 +373,9 @@ function userProjectDir(root, projectId) {
|
|
|
93
373
|
function projectPrivateDir(root, projectId) {
|
|
94
374
|
return userProjectDir(root, projectId);
|
|
95
375
|
}
|
|
376
|
+
function projectTypeOverlayFile(root, projectId) {
|
|
377
|
+
return join(projectPrivateDir(root, projectId), "project-type-overlay.json");
|
|
378
|
+
}
|
|
96
379
|
function machineSharedGezelDir(gezelId) {
|
|
97
380
|
assertSafeEntityId(gezelId, "gezel id");
|
|
98
381
|
const shared = activeMachineSharedHome();
|
|
@@ -222,6 +505,9 @@ function projectBoekwachterIssuesFile(root, projectId) {
|
|
|
222
505
|
function projectCodeReviewsFile(root, projectId) {
|
|
223
506
|
return join(projectPrivateDir(root, projectId), "code-reviews.json");
|
|
224
507
|
}
|
|
508
|
+
function projectDiffpacksFile(root, projectId) {
|
|
509
|
+
return join(projectPrivateDir(root, projectId), "diffpacks.json");
|
|
510
|
+
}
|
|
225
511
|
function projectReportActionsFile(root, projectId) {
|
|
226
512
|
return join(projectPrivateDir(root, projectId), "report-actions.json");
|
|
227
513
|
}
|
|
@@ -235,6 +521,22 @@ var PROJECT_SHADOW_DIR_NAME = "shadow";
|
|
|
235
521
|
function projectShadowDir(root, projectId, external) {
|
|
236
522
|
return join(projectArtifactsDir(root, projectId, external), PROJECT_SHADOW_DIR_NAME);
|
|
237
523
|
}
|
|
524
|
+
var PROJECT_TABULAR_DIR_NAME = "tabular";
|
|
525
|
+
var TABULAR_COMPANION_SUFFIX = "_tables";
|
|
526
|
+
function projectTabularDir(root, projectId, external) {
|
|
527
|
+
return join(projectArtifactsDir(root, projectId, external), PROJECT_TABULAR_DIR_NAME);
|
|
528
|
+
}
|
|
529
|
+
var CONNECTOR_TABLES_DIR_NAME = "tables";
|
|
530
|
+
var CONNECTOR_ROLLUPS_DIR_NAME = "rollups";
|
|
531
|
+
var OBSERVATION_TABLE_MANIFEST_FILE = "manifest.json";
|
|
532
|
+
var OBSERVATION_TABLE_STATE_FILE = "state.json";
|
|
533
|
+
var PROJECT_DIFFPACKS_DIR_NAME = "diffpacks";
|
|
534
|
+
function projectDiffpacksDir(root, projectId, external) {
|
|
535
|
+
return join(projectArtifactsDir(root, projectId, external), PROJECT_DIFFPACKS_DIR_NAME);
|
|
536
|
+
}
|
|
537
|
+
function projectDiffpackDir(root, projectId, packId, external) {
|
|
538
|
+
return join(projectDiffpacksDir(root, projectId, external), packId);
|
|
539
|
+
}
|
|
238
540
|
function projectMemoriesDir(root, projectId, external) {
|
|
239
541
|
return join(projectDir(root, projectId, external), "memories");
|
|
240
542
|
}
|
|
@@ -262,6 +564,9 @@ function projectTerminalFile(root, projectId, threadId) {
|
|
|
262
564
|
function globalHistoryFile(root) {
|
|
263
565
|
return join(root, "history.jsonl");
|
|
264
566
|
}
|
|
567
|
+
function pendingHandoffsFile(root) {
|
|
568
|
+
return join(root, "pending-handoffs.json");
|
|
569
|
+
}
|
|
265
570
|
function globalIndexDir(root) {
|
|
266
571
|
return join(root, "index");
|
|
267
572
|
}
|
|
@@ -271,6 +576,33 @@ function globalIndexDbFile(root) {
|
|
|
271
576
|
function projectHistoryFile(root, projectId) {
|
|
272
577
|
return join(projectPrivateDir(root, projectId), "history.jsonl");
|
|
273
578
|
}
|
|
579
|
+
function knowledgeDir(root) {
|
|
580
|
+
return join(root, "knowledge");
|
|
581
|
+
}
|
|
582
|
+
function knowledgeRegistryFile(root) {
|
|
583
|
+
return join(knowledgeDir(root), "registry.json");
|
|
584
|
+
}
|
|
585
|
+
function knowledgeCatalogsDir(root) {
|
|
586
|
+
return join(knowledgeDir(root), "catalogs");
|
|
587
|
+
}
|
|
588
|
+
function knowledgeCatalogVersionDir(root, publisherId, catalogId, version, contentDigest) {
|
|
589
|
+
const publisher = KnowledgeIdSchema.parse(publisherId);
|
|
590
|
+
const catalog = KnowledgeIdSchema.parse(catalogId);
|
|
591
|
+
const catalogVersion = KnowledgeVersionSchema.parse(version);
|
|
592
|
+
if (!/^[0-9a-f]{64}$/i.test(contentDigest)) {
|
|
593
|
+
throw new Error("knowledge catalog content digest must be a sha256");
|
|
594
|
+
}
|
|
595
|
+
return join(
|
|
596
|
+
knowledgeCatalogsDir(root),
|
|
597
|
+
publisher,
|
|
598
|
+
catalog,
|
|
599
|
+
catalogVersion,
|
|
600
|
+
contentDigest.slice(0, 16)
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
function knowledgeDownloadsDir(root) {
|
|
604
|
+
return join(knowledgeDir(root), "downloads");
|
|
605
|
+
}
|
|
274
606
|
function projectQuestionsFile(root, projectId) {
|
|
275
607
|
return join(projectPrivateDir(root, projectId), "questions.json");
|
|
276
608
|
}
|
|
@@ -286,6 +618,18 @@ function meesterStatusFile(root) {
|
|
|
286
618
|
function meesterStatusStateFile(root) {
|
|
287
619
|
return join(meesterStatusDir(root), "state.json");
|
|
288
620
|
}
|
|
621
|
+
function ambientDir(root) {
|
|
622
|
+
return join(root, "ambient");
|
|
623
|
+
}
|
|
624
|
+
function ambientDashboardStateFile(root) {
|
|
625
|
+
return join(ambientDir(root), "state.json");
|
|
626
|
+
}
|
|
627
|
+
function ambientDashboardLatestFile(root) {
|
|
628
|
+
return join(ambientDir(root), "latest.png");
|
|
629
|
+
}
|
|
630
|
+
function ambientDisplayStateFile(root) {
|
|
631
|
+
return join(ambientDir(root), "display-state.json");
|
|
632
|
+
}
|
|
289
633
|
function projectTasksDir(root, projectId, external) {
|
|
290
634
|
return join(projectDir(root, projectId, external), "tasks");
|
|
291
635
|
}
|
|
@@ -346,6 +690,21 @@ function craftbookTemplateScriptFile(root, prefix, id, version, name) {
|
|
|
346
690
|
function craftbookShardPrefix(id) {
|
|
347
691
|
return id.slice(0, 2).toLowerCase();
|
|
348
692
|
}
|
|
693
|
+
function aiAppsRoot(root) {
|
|
694
|
+
return join(root, "ai-apps");
|
|
695
|
+
}
|
|
696
|
+
function aiAppsRegistryFile(root) {
|
|
697
|
+
return join(aiAppsRoot(root), "registry.json");
|
|
698
|
+
}
|
|
699
|
+
function aiAppVersionDir(root, appId, version) {
|
|
700
|
+
return join(aiAppsRoot(root), appId, version);
|
|
701
|
+
}
|
|
702
|
+
function aiAppItemsDir(root, appId, version) {
|
|
703
|
+
return join(aiAppVersionDir(root, appId, version), "items");
|
|
704
|
+
}
|
|
705
|
+
function aiAppReceiptFile(root, appId, version) {
|
|
706
|
+
return join(aiAppVersionDir(root, appId, version), "receipt.json");
|
|
707
|
+
}
|
|
349
708
|
function projectTypesRoot(root) {
|
|
350
709
|
return join(root, "project-types");
|
|
351
710
|
}
|
|
@@ -382,8 +741,8 @@ function projectLocalQuarantineDir(workspaceDir) {
|
|
|
382
741
|
function fallbackProjectIndexDir(root, projectId) {
|
|
383
742
|
return join(projectPrivateDir(root, projectId), "index");
|
|
384
743
|
}
|
|
385
|
-
function projectContentIndexDbFile(root, projectId, workspaceDir) {
|
|
386
|
-
return projectStorageScope(root, projectId) === "machine-shared" ? join(fallbackProjectIndexDir(root, projectId), "index.db") : projectLocalIndexDbFile(workspaceDir);
|
|
744
|
+
function projectContentIndexDbFile(root, projectId, workspaceDir, opts = {}) {
|
|
745
|
+
return opts.forceHomeSide || projectStorageScope(root, projectId) === "machine-shared" ? join(fallbackProjectIndexDir(root, projectId), "index.db") : projectLocalIndexDbFile(workspaceDir);
|
|
387
746
|
}
|
|
388
747
|
function projectArtifactsIndexDbFile(root, projectId) {
|
|
389
748
|
return join(fallbackProjectIndexDir(root, projectId), "artifacts.db");
|
|
@@ -497,6 +856,12 @@ function keurmeesterDigestsDir(root) {
|
|
|
497
856
|
function keurmeesterDigestStatePath(root) {
|
|
498
857
|
return join(keurmeesterDir(root), "digest-state.json");
|
|
499
858
|
}
|
|
859
|
+
function enginesRoot(root) {
|
|
860
|
+
return join(root, "engines");
|
|
861
|
+
}
|
|
862
|
+
function binRuntimeRoot(root) {
|
|
863
|
+
return join(root, "bin");
|
|
864
|
+
}
|
|
500
865
|
async function readConfigRaw(root) {
|
|
501
866
|
const { readFile } = await import("fs/promises");
|
|
502
867
|
try {
|
|
@@ -507,10 +872,27 @@ async function readConfigRaw(root) {
|
|
|
507
872
|
}
|
|
508
873
|
}
|
|
509
874
|
export {
|
|
875
|
+
CONNECTOR_ROLLUPS_DIR_NAME,
|
|
876
|
+
CONNECTOR_TABLES_DIR_NAME,
|
|
510
877
|
MACHINE_SHARED_MARKER,
|
|
878
|
+
OBSERVATION_TABLE_MANIFEST_FILE,
|
|
879
|
+
OBSERVATION_TABLE_STATE_FILE,
|
|
880
|
+
PROJECT_DIFFPACKS_DIR_NAME,
|
|
511
881
|
PROJECT_SHADOW_DIR_NAME,
|
|
882
|
+
PROJECT_TABULAR_DIR_NAME,
|
|
883
|
+
TABULAR_COMPANION_SUFFIX,
|
|
512
884
|
activeMachineSharedHome,
|
|
885
|
+
aiAppItemsDir,
|
|
886
|
+
aiAppReceiptFile,
|
|
887
|
+
aiAppVersionDir,
|
|
888
|
+
aiAppsRegistryFile,
|
|
889
|
+
aiAppsRoot,
|
|
890
|
+
ambientDashboardLatestFile,
|
|
891
|
+
ambientDashboardStateFile,
|
|
892
|
+
ambientDir,
|
|
893
|
+
ambientDisplayStateFile,
|
|
513
894
|
backupsDir,
|
|
895
|
+
binRuntimeRoot,
|
|
514
896
|
channelsDir,
|
|
515
897
|
craftbookShardPrefix,
|
|
516
898
|
craftbookTemplateDir,
|
|
@@ -522,6 +904,7 @@ export {
|
|
|
522
904
|
craftbookTemplatesRoot,
|
|
523
905
|
daemonTransactionsRoot,
|
|
524
906
|
deviceIdentityFile,
|
|
907
|
+
enginesRoot,
|
|
525
908
|
fallbackProjectIndexDir,
|
|
526
909
|
fallbackProjectVillageFile,
|
|
527
910
|
foldersStateDir,
|
|
@@ -549,6 +932,11 @@ export {
|
|
|
549
932
|
keurmeesterDigestStatePath,
|
|
550
933
|
keurmeesterDigestsDir,
|
|
551
934
|
keurmeesterDir,
|
|
935
|
+
knowledgeCatalogVersionDir,
|
|
936
|
+
knowledgeCatalogsDir,
|
|
937
|
+
knowledgeDir,
|
|
938
|
+
knowledgeDownloadsDir,
|
|
939
|
+
knowledgeRegistryFile,
|
|
552
940
|
machineSharedGezelDir,
|
|
553
941
|
machineSharedHome,
|
|
554
942
|
machineSharedMarkerFile,
|
|
@@ -557,6 +945,7 @@ export {
|
|
|
557
945
|
meesterStatusFile,
|
|
558
946
|
meesterStatusStateFile,
|
|
559
947
|
pendingGrantsFile,
|
|
948
|
+
pendingHandoffsFile,
|
|
560
949
|
playwrightBrowsersDir,
|
|
561
950
|
projectActivityFile,
|
|
562
951
|
projectArtifactsDir,
|
|
@@ -565,6 +954,9 @@ export {
|
|
|
565
954
|
projectCodeReviewsFile,
|
|
566
955
|
projectContentIndexDbFile,
|
|
567
956
|
projectCreateTransactionsRoot,
|
|
957
|
+
projectDiffpackDir,
|
|
958
|
+
projectDiffpacksDir,
|
|
959
|
+
projectDiffpacksFile,
|
|
568
960
|
projectDir,
|
|
569
961
|
projectDocsDir,
|
|
570
962
|
projectFindingLifecycleFile,
|
|
@@ -598,6 +990,7 @@ export {
|
|
|
598
990
|
projectShadowDir,
|
|
599
991
|
projectStorageDir,
|
|
600
992
|
projectStorageScope,
|
|
993
|
+
projectTabularDir,
|
|
601
994
|
projectTaskAboutFile,
|
|
602
995
|
projectTaskDir,
|
|
603
996
|
projectTaskFile,
|
|
@@ -610,6 +1003,7 @@ export {
|
|
|
610
1003
|
projectToolsetsInstallDir,
|
|
611
1004
|
projectTypeDir,
|
|
612
1005
|
projectTypeManifestFile,
|
|
1006
|
+
projectTypeOverlayFile,
|
|
613
1007
|
projectTypeShardPrefix,
|
|
614
1008
|
projectTypeVersionDir,
|
|
615
1009
|
projectTypeVersionManifestFile,
|