slateboard 0.1.0 → 0.1.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/README.md +33 -192
- package/dist/arch-3JZTL2DJ.js +1842 -0
- package/dist/bin.js +35 -11
- package/dist/{chunk-WXM4BB4D.js → chunk-4PKRRMRZ.js} +1340 -868
- package/dist/{chunk-FMO5B2KJ.js → chunk-4TPC7U6A.js} +5 -5
- package/dist/{chunk-SQHGMBUM.js → chunk-ANFNDJZO.js} +3 -2
- package/dist/{chunk-ONZFKR4I.js → chunk-PJ5WOZB3.js} +171 -21
- package/dist/{chunk-BWNUX4FT.js → chunk-V3PED2Z5.js} +4 -4
- package/dist/{client-JHI2EG6J.js → client-5B46626J.js} +2 -2
- package/dist/{commands-ONES545N.js → commands-6UA3YOD4.js} +1 -1
- package/dist/{doctor-H5Y5L2JZ.js → doctor-ZTQFKV32.js} +2 -2
- package/dist/{lifecycle-ZB5HEO5P.js → lifecycle-IZH4RJK5.js} +4 -4
- package/dist/{service-command-26BPMBK3.js → service-command-GKRIZCBL.js} +5 -5
- package/dist/{src-QZIVUACM.js → src-BDZFYUYY.js} +12 -2
- package/dist/{src-YVFB3ZLM.js → src-YO7L7J26.js} +13 -1
- package/dist/ui/assets/abnfDiagram-XWFEHMT6-DAC8TnbO.js +1 -0
- package/dist/ui/assets/architecture-WOLXFQ4H-X8k0-LVf.js +1 -0
- package/dist/ui/assets/architectureDiagram-CSQXQB3N-CVoxvA0s.js +36 -0
- package/dist/ui/assets/blockDiagram-BEDRHYPZ-DGf5VAwB.js +140 -0
- package/dist/ui/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
- package/dist/ui/assets/c4Diagram-M2UUVUY5-PB5quCOl.js +38 -0
- package/dist/ui/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/ui/assets/chunk-3GCGMST5-RRiusQp9.js +1 -0
- package/dist/ui/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/ui/assets/chunk-7U7NFRK5-CSOOpKZT.js +88 -0
- package/dist/ui/assets/chunk-CNRTWJTD-DJuDnaYn.js +1 -0
- package/dist/ui/assets/chunk-D5HYT7QG-imLQxbAy.js +1 -0
- package/dist/ui/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/ui/assets/chunk-DZSZGQHW-BCXsfFfT.js +1 -0
- package/dist/ui/assets/chunk-EBZ3SEQC-CdDips7b.js +2 -0
- package/dist/ui/assets/chunk-F3AE6A5H-DTVcMSk7.js +1 -0
- package/dist/ui/assets/chunk-FGVZ23HU-BEVs0fgA.js +213 -0
- package/dist/ui/assets/chunk-GZTWQ64R-CKGVWw4I.js +62 -0
- package/dist/ui/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/ui/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/ui/assets/chunk-KTR4FSNJ-DSr3q0Xy.js +1 -0
- package/dist/ui/assets/chunk-MDAHDJXZ-YMIkXJ0O.js +10 -0
- package/dist/ui/assets/chunk-MPYPSXSE-C-CxVwa7.js +1 -0
- package/dist/ui/assets/chunk-ND7LMLKX-lfusdDHU.js +72 -0
- package/dist/ui/assets/chunk-NGNAAXSQ-DqoPQk1a.js +136 -0
- package/dist/ui/assets/chunk-OWCVCYLK-4-W-ynqW.js +2 -0
- package/dist/ui/assets/chunk-QDWOWVBQ-Du0KmhW4.js +129 -0
- package/dist/ui/assets/chunk-T47YP6PS-CKli33QU.js +1 -0
- package/dist/ui/assets/chunk-XXDRQBXY-DSL17ZTh.js +1 -0
- package/dist/ui/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/ui/assets/classDiagram-v2-KXABOMEV-CYc2BZ2y.js +217 -0
- package/dist/ui/assets/cose-bilkent-JH36ORCC-81nUs0at.js +1 -0
- package/dist/ui/assets/cynefin-EF2NZ3EQ-Clvwy422.js +1 -0
- package/dist/ui/assets/cynefinDiagram-NJNITYFG-CsgTQqAC.js +62 -0
- package/dist/ui/assets/cytoscape.esm-BPveszXl.js +321 -0
- package/dist/ui/assets/d3-scale-lXtN6-Od.js +1 -0
- package/dist/ui/assets/d3-selection-BFzs9NTX.js +1 -0
- package/dist/ui/assets/dagre-KIHZ2IZ3--BpWd3hW.js +4 -0
- package/dist/ui/assets/diagram-7YQZDPLS-Dp_m-C1a.js +41 -0
- package/dist/ui/assets/diagram-QBROCOUO-Bt-Lp7vq.js +200 -0
- package/dist/ui/assets/diagram-RJJCUUZO-DLsG2Tej.js +30 -0
- package/dist/ui/assets/diagram-WERXNKYE-D31SLp70.js +24 -0
- package/dist/ui/assets/diagram-YHHI257C-CVMeUILe.js +3 -0
- package/dist/ui/assets/diagram-YR4HJLHV-Bz9qvIhJ.js +24 -0
- package/dist/ui/assets/dist-YCovsM_S.js +1 -0
- package/dist/ui/assets/ebnfDiagram-N527522P-_FIZSf8P.js +1 -0
- package/dist/ui/assets/elk-O5DQBFGD-BK3qD3UW.js +27 -0
- package/dist/ui/assets/erDiagram-K3K3BIDK-Dmpdi5Ob.js +99 -0
- package/dist/ui/assets/eventmodeling-K75KTNOO-Dt-51L4s.js +1 -0
- package/dist/ui/assets/flowDiagram-Z6JWZHQI-Cn2ZVzvO.js +1 -0
- package/dist/ui/assets/ganttDiagram-3PRQTZWP-BaZof7eT.js +292 -0
- package/dist/ui/assets/gitGraph-VSP46ZUC-ezyaB0jQ.js +1 -0
- package/dist/ui/assets/gitGraphDiagram-VXDFKS5L-DRNdClPw.js +106 -0
- package/dist/ui/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/ui/assets/grid-E2QIVN74--djCUwdI.js +1 -0
- package/dist/ui/assets/index-Bly281F6.css +1 -0
- package/dist/ui/assets/index-CXK8WmR8.js +45 -0
- package/dist/ui/assets/info-OHQRW6UA-DsFXrFWI.js +1 -0
- package/dist/ui/assets/infoDiagram-EZ3ZOAHP-e8qx3eqc.js +2 -0
- package/dist/ui/assets/ishikawaDiagram-S3EKX5GW-CuKExPKN.js +70 -0
- package/dist/ui/assets/journeyDiagram-POQNLL5X-D0GE8iji.js +139 -0
- package/dist/ui/assets/kanban-definition-BH5XI6FM-NL5dOF_0.js +89 -0
- package/dist/ui/assets/katex-BXIx1Jgr.js +257 -0
- package/dist/ui/assets/mermaid-parser.core-0pE4JCc_.js +7 -0
- package/dist/ui/assets/mermaid.core-BVgUieVU.js +44 -0
- package/dist/ui/assets/mindmap-definition-WVAN44T4-BLTtjuVH.js +98 -0
- package/dist/ui/assets/packet-JDAUHWVQ-C-7DeilZ.js +1 -0
- package/dist/ui/assets/pegDiagram-D4NLKWP3-F2SSXiqv.js +1 -0
- package/dist/ui/assets/pie-XZMESJXO-B4BkiWTy.js +1 -0
- package/dist/ui/assets/pieDiagram-36ENHN4W-BB5uEdtB.js +39 -0
- package/dist/ui/assets/quadrantDiagram-ZQUDMS73-B5iPooYO.js +7 -0
- package/dist/ui/assets/radar-ABXABTNO-Dx3jkQdr.js +1 -0
- package/dist/ui/assets/railroad-I3PHUGI6-BSh47OT_.js +1 -0
- package/dist/ui/assets/railroad-abnf-LNEFI6M7-BWFvDxOj.js +1 -0
- package/dist/ui/assets/railroad-ebnf-DWYD2UWJ-GBoLzumA.js +1 -0
- package/dist/ui/assets/railroad-peg-JR7BVNR7-DByw5Orh.js +1 -0
- package/dist/ui/assets/railroadDiagram-JIZHGYPL--ptGd2NR.js +1 -0
- package/dist/ui/assets/render-VIF2ZAQL-CzNp-J42.js +2 -0
- package/dist/ui/assets/requirementDiagram-AXW2TVFA-DBh9Dt63.js +84 -0
- package/dist/ui/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/ui/assets/sankeyDiagram-FBCJTAIF-CjJtGyu8.js +40 -0
- package/dist/ui/assets/sequenceDiagram-3LA2ROMG-BzeMVuzG.js +169 -0
- package/dist/ui/assets/sizeCapture-2Q2CQKSF-DSY_W0YL.js +1 -0
- package/dist/ui/assets/stateDiagram-v2-ATKHQDJO-DYavre2v.js +291 -0
- package/dist/ui/assets/swimlanes-YQL5WMAO-CUTCsfPM.js +1 -0
- package/dist/ui/assets/swimlanesDiagram-UCCPES4V-B7bXxKVr.js +8 -0
- package/dist/ui/assets/timeline-definition-7Z437IG3-HWrtH0QT.js +120 -0
- package/dist/ui/assets/treeView-D4JQ5SDB-B5lbyI_M.js +1 -0
- package/dist/ui/assets/treemap-SAJKECNS-Ckfi-DGc.js +1 -0
- package/dist/ui/assets/usecaseDiagram-RDK6N6HP-BuKN2NAW.js +328 -0
- package/dist/ui/assets/vennDiagram-SHRQU5PJ-s2gljkjP.js +34 -0
- package/dist/ui/assets/wardley-7MLQ67FV-CjAqYBcP.js +1 -0
- package/dist/ui/assets/wardleyDiagram-F3OXNVQS-Ba_SoMTx.js +78 -0
- package/dist/ui/assets/xychartDiagram-GDYJKCDI-FsxUUoqL.js +7 -0
- package/dist/ui/index.html +2 -2
- package/dist/{upgrade-FND3UBJR.js → upgrade-2CI4OVTY.js} +15 -15
- package/migrations/0006_arch_auto.sql +8 -0
- package/package.json +1 -1
- package/dist/ui/assets/index-4WzXlYHs.css +0 -1
- package/dist/ui/assets/index-ZKfByx7Q.js +0 -42
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
startDaemon
|
|
4
|
+
} from "./chunk-ANFNDJZO.js";
|
|
2
5
|
import {
|
|
3
6
|
stopPid
|
|
4
7
|
} from "./chunk-FNBCYJA2.js";
|
|
5
8
|
import {
|
|
6
9
|
readSchemaVersion
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
startDaemon
|
|
10
|
-
} from "./chunk-SQHGMBUM.js";
|
|
10
|
+
} from "./chunk-V3PED2Z5.js";
|
|
11
11
|
import {
|
|
12
12
|
START_TIMEOUT_MS,
|
|
13
13
|
logFile
|
|
@@ -120,7 +120,7 @@ async function statusCommand(service, port, version) {
|
|
|
120
120
|
} catch (err) {
|
|
121
121
|
schemaVersion = err;
|
|
122
122
|
}
|
|
123
|
-
const { readUpdateCache, updateStatus } = await import("./src-
|
|
123
|
+
const { readUpdateCache, updateStatus } = await import("./src-BDZFYUYY.js");
|
|
124
124
|
const cache = readUpdateCache(dir);
|
|
125
125
|
cachedUpdate = cache ? updateStatus(version, cache.latestVersion) : null;
|
|
126
126
|
}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
VERSION
|
|
4
4
|
} from "./chunk-TCKAXJOM.js";
|
|
5
5
|
import {
|
|
6
|
+
BIN,
|
|
6
7
|
START_TIMEOUT_MS,
|
|
7
8
|
launchDaemon,
|
|
8
9
|
logFile,
|
|
@@ -2421,8 +2422,8 @@ function openBrowser(url2, os = process.platform) {
|
|
|
2421
2422
|
}
|
|
2422
2423
|
}
|
|
2423
2424
|
async function startForeground(port, options = {}) {
|
|
2424
|
-
const { start } = await import("./src-
|
|
2425
|
-
const result = await start({ port });
|
|
2425
|
+
const { start, cliArchRunner } = await import("./src-BDZFYUYY.js");
|
|
2426
|
+
const result = await start({ port, archRunner: cliArchRunner([process.execPath, ...process.execArgv, BIN, "arch"]) });
|
|
2426
2427
|
if (result.status === "running") {
|
|
2427
2428
|
if (options.service) {
|
|
2428
2429
|
console.error(`slate: another server already runs at ${result.url} (pid ${result.pid}); stop it with \`slate stop\``);
|
|
@@ -1,23 +1,4 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
SlateError,
|
|
4
|
-
Store,
|
|
5
|
-
commitShaSchema,
|
|
6
|
-
createServices,
|
|
7
|
-
detailsSchema,
|
|
8
|
-
idSchema,
|
|
9
|
-
isSlateError,
|
|
10
|
-
linkKindSchema,
|
|
11
|
-
milestoneSchema,
|
|
12
|
-
positionSchema,
|
|
13
|
-
prioritySchema,
|
|
14
|
-
refTypeSchema,
|
|
15
|
-
slateHome,
|
|
16
|
-
statusKeySchema,
|
|
17
|
-
statusKindSchema,
|
|
18
|
-
tagsSchema,
|
|
19
|
-
titleSchema
|
|
20
|
-
} from "./chunk-WXM4BB4D.js";
|
|
21
2
|
import {
|
|
22
3
|
CallToolRequestSchema,
|
|
23
4
|
CompleteRequestSchema,
|
|
@@ -50,6 +31,25 @@ import {
|
|
|
50
31
|
safeParseAsync,
|
|
51
32
|
toJsonSchemaCompat
|
|
52
33
|
} from "./chunk-GD6AEWOM.js";
|
|
34
|
+
import {
|
|
35
|
+
SlateError,
|
|
36
|
+
Store,
|
|
37
|
+
commitShaSchema,
|
|
38
|
+
createServices,
|
|
39
|
+
detailsSchema,
|
|
40
|
+
idSchema,
|
|
41
|
+
isSlateError,
|
|
42
|
+
linkKindSchema,
|
|
43
|
+
milestoneSchema,
|
|
44
|
+
positionSchema,
|
|
45
|
+
prioritySchema,
|
|
46
|
+
refTypeSchema,
|
|
47
|
+
slateHome,
|
|
48
|
+
statusKeySchema,
|
|
49
|
+
statusKindSchema,
|
|
50
|
+
tagsSchema,
|
|
51
|
+
titleSchema
|
|
52
|
+
} from "./chunk-4PKRRMRZ.js";
|
|
53
53
|
import {
|
|
54
54
|
ZodOptional,
|
|
55
55
|
external_exports
|
|
@@ -2280,7 +2280,7 @@ function registerTools(server, services) {
|
|
|
2280
2280
|
);
|
|
2281
2281
|
tool(
|
|
2282
2282
|
"update_project",
|
|
2283
|
-
"Rename a project, change its key or description, turn git-driven moves on or off, reorder or replace its milestone list, or archive/unarchive it. Removing a milestone that items still use fails with milestone_in_use unless remap maps it to another milestone (or null for unscheduled).",
|
|
2283
|
+
"Rename a project, change its key or description, turn git-driven moves, the roadmap file or self-updating architecture views on or off, reorder or replace its milestone list, or archive/unarchive it. Removing a milestone that items still use fails with milestone_in_use unless remap maps it to another milestone (or null for unscheduled).",
|
|
2284
2284
|
{
|
|
2285
2285
|
project_id: projectId,
|
|
2286
2286
|
name: external_exports.string().min(1).optional(),
|
|
@@ -2290,12 +2290,15 @@ function registerTools(server, services) {
|
|
|
2290
2290
|
archived: external_exports.boolean().optional(),
|
|
2291
2291
|
key: external_exports.string().optional().describe("The project key, 2 to 5 letters: the prefix of item keys (SLT in SLT-42). Old keys keep resolving."),
|
|
2292
2292
|
roadmap_file: external_exports.string().nullable().optional().describe("Keep the board as a markdown file in the project (e.g. docs/ROADMAP.md), rewritten after each change but never over a hand edit; null stops it."),
|
|
2293
|
+
arch_auto: external_exports.boolean().optional().describe(
|
|
2294
|
+
"Keep docs/architecture current: the server regenerates facts.json and the views (as `slate arch generate`) when HEAD moves, and once now; it never commits or touches components.json. Needs TypeScript 7."
|
|
2295
|
+
),
|
|
2293
2296
|
git_transitions: external_exports.boolean().optional().describe("Move items from git activity: a related commit moves a not-started item to the first active column; on the default branch, an active item to the first review column.")
|
|
2294
2297
|
},
|
|
2295
2298
|
WRITE,
|
|
2296
2299
|
(a) => {
|
|
2297
2300
|
const { id } = project(a);
|
|
2298
|
-
let result = services.projects.update({ id, name: a.name, key: a.key, description: a.description, milestones: a.milestones, remap: a.remap, gitTransitions: a.git_transitions, roadmapFile: a.roadmap_file });
|
|
2301
|
+
let result = services.projects.update({ id, name: a.name, key: a.key, description: a.description, milestones: a.milestones, remap: a.remap, gitTransitions: a.git_transitions, roadmapFile: a.roadmap_file, archAuto: a.arch_auto });
|
|
2299
2302
|
if (a.archived !== void 0) result = services.projects.archive({ id, archived: a.archived });
|
|
2300
2303
|
return result;
|
|
2301
2304
|
}
|
|
@@ -2385,6 +2388,17 @@ function registerTools(server, services) {
|
|
|
2385
2388
|
READ,
|
|
2386
2389
|
(a) => services.items.commits(a.item_id, a.limit === void 0 ? {} : { limit: a.limit })
|
|
2387
2390
|
);
|
|
2391
|
+
tool(
|
|
2392
|
+
"get_touched_components",
|
|
2393
|
+
"Map commits to the architecture model in the project's docs/architecture: components.json components (by file glob) when it has them, else the packages of facts.json (longest directory prefix); files neither claims count as Other. With item_id, the components the item's commits changed, each with files, commits and up to 20 paths. Without it, the aggregate for the project's items in milestone (null: items without one; omitted: every item), each component with items, files and commits. model is null when the project has no architecture model (run `slate arch`). Only commits in the project's own repository count; diffs are against the first parent. Read-only.",
|
|
2394
|
+
{
|
|
2395
|
+
item_id: itemId.optional(),
|
|
2396
|
+
project_id: projectId,
|
|
2397
|
+
milestone: milestoneSchema.nullable().optional().describe("Without item_id: only items in this milestone; null for items without one. Omit for every item.")
|
|
2398
|
+
},
|
|
2399
|
+
READ,
|
|
2400
|
+
(a) => a.item_id ? services.touch.forItem(a.item_id) : services.touch.forMilestone(project(a).id, a.milestone)
|
|
2401
|
+
);
|
|
2388
2402
|
tool(
|
|
2389
2403
|
"update_item",
|
|
2390
2404
|
"Edit an item's title, details, milestone, priority or tags. Omitted fields are unchanged; null clears details or milestone. Does not change status or order; use move_item for that.",
|
|
@@ -4647,6 +4661,13 @@ function createApi(services) {
|
|
|
4647
4661
|
})
|
|
4648
4662
|
);
|
|
4649
4663
|
});
|
|
4664
|
+
api.get("/projects/:id/architecture", (c) => c.json(services.architecture.list(c.req.param("id"))));
|
|
4665
|
+
api.get("/projects/:id/architecture-status", (c) => c.json(services.architecture.status(c.req.param("id"))));
|
|
4666
|
+
api.get("/projects/:id/touch", async (c) => {
|
|
4667
|
+
const milestone = c.req.query("milestone");
|
|
4668
|
+
return c.json(await services.touch.forMilestone(c.req.param("id"), milestone === void 0 ? void 0 : milestone === "" ? null : milestone));
|
|
4669
|
+
});
|
|
4670
|
+
api.get("/projects/:id/architecture/:name", (c) => markdown2(services.architecture.read(c.req.param("id"), c.req.param("name")).markdown));
|
|
4650
4671
|
api.get("/projects/:id/export.md", (c) => markdown2(services.export.project(c.req.param("id"))));
|
|
4651
4672
|
api.post("/projects/:id/scan-todos", async (c) => {
|
|
4652
4673
|
const b = c.req.header("content-type") ? await body(c.req) : {};
|
|
@@ -4672,6 +4693,7 @@ function createApi(services) {
|
|
|
4672
4693
|
const { limit } = query(c.req.query());
|
|
4673
4694
|
return c.json(await items.commits(c.req.param("id"), limit === void 0 ? {} : { limit }));
|
|
4674
4695
|
});
|
|
4696
|
+
api.get("/items/:id/components", async (c) => c.json(await services.touch.forItem(c.req.param("id"))));
|
|
4675
4697
|
api.patch("/items/:id", async (c) => c.json(await items.withCommits(items.update({ ...await body(c.req), id: c.req.param("id") }))));
|
|
4676
4698
|
api.delete("/items/:id", (c) => {
|
|
4677
4699
|
items.remove(c.req.param("id"));
|
|
@@ -5071,6 +5093,126 @@ function createApp({ services, port, version, startedAt = Date.now(), uiDir = DE
|
|
|
5071
5093
|
return app;
|
|
5072
5094
|
}
|
|
5073
5095
|
|
|
5096
|
+
// ../server/src/arch-auto.ts
|
|
5097
|
+
import { spawn } from "node:child_process";
|
|
5098
|
+
var ARCH_POLL_MS = 1e4;
|
|
5099
|
+
var ARCH_EVENT_DEBOUNCE_MS = 300;
|
|
5100
|
+
var ARCH_TIMEOUT_MS = 12e4;
|
|
5101
|
+
var MAX_OUTPUT = 64 * 1024;
|
|
5102
|
+
var TS_MISSING = /needs TypeScript 7/;
|
|
5103
|
+
function archOutcome(code, stdout, stderr, timedOut = false, timeoutMs = ARCH_TIMEOUT_MS) {
|
|
5104
|
+
const errors = stderr.split("\n").map((l) => l.trim()).filter(Boolean);
|
|
5105
|
+
if (timedOut) return { state: "failed", reason: `timed out after ${timeoutMs >= 1e3 ? `${Math.round(timeoutMs / 1e3)}s` : `${timeoutMs}ms`}` };
|
|
5106
|
+
const missing = errors.find((l) => TS_MISSING.test(l));
|
|
5107
|
+
if (missing) return { state: "skipped", reason: missing };
|
|
5108
|
+
if (/^wrote /m.test(stdout)) {
|
|
5109
|
+
const problems = errors.filter((l) => !l.startsWith("unresolved import "));
|
|
5110
|
+
return { state: "generated", reason: code === 0 || !problems.length ? null : problems.at(-1) };
|
|
5111
|
+
}
|
|
5112
|
+
return { state: "failed", reason: errors.at(-1) ?? `exited with code ${code}` };
|
|
5113
|
+
}
|
|
5114
|
+
function cliArchRunner(argv, timeoutMs = ARCH_TIMEOUT_MS) {
|
|
5115
|
+
return (root) => new Promise((resolve) => {
|
|
5116
|
+
const child = spawn(argv[0], [...argv.slice(1), "generate", "--root", root], { cwd: root, stdio: ["ignore", "pipe", "pipe"], env: { ...process.env, SLATE_NO_START: "1" } });
|
|
5117
|
+
let stdout = "";
|
|
5118
|
+
let stderr = "";
|
|
5119
|
+
let timedOut = false;
|
|
5120
|
+
child.stdout.on("data", (d) => stdout = (stdout + d.toString("utf8")).slice(-MAX_OUTPUT));
|
|
5121
|
+
child.stderr.on("data", (d) => stderr = (stderr + d.toString("utf8")).slice(-MAX_OUTPUT));
|
|
5122
|
+
const timer = setTimeout(() => {
|
|
5123
|
+
timedOut = true;
|
|
5124
|
+
child.kill("SIGKILL");
|
|
5125
|
+
}, timeoutMs);
|
|
5126
|
+
timer.unref();
|
|
5127
|
+
child.once("error", (err) => {
|
|
5128
|
+
clearTimeout(timer);
|
|
5129
|
+
resolve({ state: "failed", reason: `could not run the generator: ${err.message}` });
|
|
5130
|
+
});
|
|
5131
|
+
child.once("close", (code) => {
|
|
5132
|
+
clearTimeout(timer);
|
|
5133
|
+
resolve(archOutcome(code, stdout, stderr, timedOut, timeoutMs));
|
|
5134
|
+
});
|
|
5135
|
+
});
|
|
5136
|
+
}
|
|
5137
|
+
function createArchAuto({ services, run: run2, pollMs = ARCH_POLL_MS }) {
|
|
5138
|
+
const queue = /* @__PURE__ */ new Set();
|
|
5139
|
+
let running = null;
|
|
5140
|
+
let checking = null;
|
|
5141
|
+
let closed = false;
|
|
5142
|
+
const due = (id) => services.archAuto.due(id).catch(() => null);
|
|
5143
|
+
async function runOne(id) {
|
|
5144
|
+
const head = await due(id);
|
|
5145
|
+
if (!head || closed) return;
|
|
5146
|
+
const since = services.archAuto.lastHead(id);
|
|
5147
|
+
const root = services.projects.get(id).path;
|
|
5148
|
+
const result = await run2(root).catch((err) => ({ state: "failed", reason: err instanceof Error ? err.message : String(err) }));
|
|
5149
|
+
if (closed) return;
|
|
5150
|
+
try {
|
|
5151
|
+
services.archAuto.record(id, head, result, since);
|
|
5152
|
+
} catch {
|
|
5153
|
+
return;
|
|
5154
|
+
}
|
|
5155
|
+
if (await due(id)) queue.add(id);
|
|
5156
|
+
}
|
|
5157
|
+
function kick() {
|
|
5158
|
+
if (running || closed) return;
|
|
5159
|
+
const id = queue.values().next().value;
|
|
5160
|
+
if (id === void 0) return;
|
|
5161
|
+
queue.delete(id);
|
|
5162
|
+
running = runOne(id).catch(() => {
|
|
5163
|
+
}).finally(() => {
|
|
5164
|
+
running = null;
|
|
5165
|
+
kick();
|
|
5166
|
+
});
|
|
5167
|
+
}
|
|
5168
|
+
function check() {
|
|
5169
|
+
if (checking) return checking;
|
|
5170
|
+
const current = (async () => {
|
|
5171
|
+
await null;
|
|
5172
|
+
try {
|
|
5173
|
+
for (const id of services.archAuto.enabled()) if (!queue.has(id) && await due(id)) queue.add(id);
|
|
5174
|
+
} finally {
|
|
5175
|
+
checking = null;
|
|
5176
|
+
}
|
|
5177
|
+
kick();
|
|
5178
|
+
})();
|
|
5179
|
+
checking = current;
|
|
5180
|
+
return current;
|
|
5181
|
+
}
|
|
5182
|
+
let nudge = null;
|
|
5183
|
+
const unsubscribe = services.events.subscribe((e) => {
|
|
5184
|
+
if (e.type !== "project.updated" && e.type !== "project.created") return;
|
|
5185
|
+
if (nudge) clearTimeout(nudge);
|
|
5186
|
+
nudge = setTimeout(() => {
|
|
5187
|
+
nudge = null;
|
|
5188
|
+
if (!closed) void check();
|
|
5189
|
+
}, ARCH_EVENT_DEBOUNCE_MS);
|
|
5190
|
+
nudge.unref();
|
|
5191
|
+
});
|
|
5192
|
+
const timer = setInterval(() => void check(), pollMs);
|
|
5193
|
+
timer.unref();
|
|
5194
|
+
void check();
|
|
5195
|
+
return {
|
|
5196
|
+
check,
|
|
5197
|
+
async idle() {
|
|
5198
|
+
for (; ; ) {
|
|
5199
|
+
await checking;
|
|
5200
|
+
await running;
|
|
5201
|
+
await new Promise((r) => setImmediate(r));
|
|
5202
|
+
if (!running && !checking && (closed || queue.size === 0)) return;
|
|
5203
|
+
if (!running) kick();
|
|
5204
|
+
}
|
|
5205
|
+
},
|
|
5206
|
+
close() {
|
|
5207
|
+
closed = true;
|
|
5208
|
+
clearInterval(timer);
|
|
5209
|
+
if (nudge) clearTimeout(nudge);
|
|
5210
|
+
unsubscribe();
|
|
5211
|
+
queue.clear();
|
|
5212
|
+
}
|
|
5213
|
+
};
|
|
5214
|
+
}
|
|
5215
|
+
|
|
5074
5216
|
// ../server/src/start.ts
|
|
5075
5217
|
import { mkdirSync } from "node:fs";
|
|
5076
5218
|
|
|
@@ -6668,6 +6810,7 @@ async function start(options = {}) {
|
|
|
6668
6810
|
if (event.projectId && services.roadmapFile.enabled().includes(event.projectId)) writeRoadmap(event.projectId);
|
|
6669
6811
|
});
|
|
6670
6812
|
for (const id of services.roadmapFile.enabled()) writeRoadmap(id);
|
|
6813
|
+
const archAuto = options.archRunner ? createArchAuto({ services, run: options.archRunner, ...options.archPollMs ? { pollMs: options.archPollMs } : {} }) : null;
|
|
6671
6814
|
const opened = store;
|
|
6672
6815
|
let closing = null;
|
|
6673
6816
|
return {
|
|
@@ -6677,6 +6820,8 @@ async function start(options = {}) {
|
|
|
6677
6820
|
close: () => closing ??= new Promise((resolve) => {
|
|
6678
6821
|
clearInterval(gitTimer);
|
|
6679
6822
|
unsubscribe();
|
|
6823
|
+
archAuto?.close();
|
|
6824
|
+
services.architecture.close();
|
|
6680
6825
|
for (const timer of pendingRoadmaps.values()) clearTimeout(timer);
|
|
6681
6826
|
server.close(() => resolve());
|
|
6682
6827
|
server.closeAllConnections();
|
|
@@ -6695,6 +6840,11 @@ async function start(options = {}) {
|
|
|
6695
6840
|
export {
|
|
6696
6841
|
resolveUiDir,
|
|
6697
6842
|
createApp,
|
|
6843
|
+
ARCH_POLL_MS,
|
|
6844
|
+
ARCH_TIMEOUT_MS,
|
|
6845
|
+
archOutcome,
|
|
6846
|
+
cliArchRunner,
|
|
6847
|
+
createArchAuto,
|
|
6698
6848
|
KEEP_BACKUPS,
|
|
6699
6849
|
backupsDir,
|
|
6700
6850
|
backupFileName,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
Store,
|
|
4
|
-
createServices
|
|
5
|
-
} from "./chunk-WXM4BB4D.js";
|
|
6
2
|
import {
|
|
7
3
|
dbFile
|
|
8
4
|
} from "./chunk-3TOSW3FU.js";
|
|
5
|
+
import {
|
|
6
|
+
Store,
|
|
7
|
+
createServices
|
|
8
|
+
} from "./chunk-4PKRRMRZ.js";
|
|
9
9
|
|
|
10
10
|
// src/readonly.ts
|
|
11
11
|
import { existsSync, mkdtempSync, rmSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
withSnapshot
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V3PED2Z5.js";
|
|
5
5
|
import {
|
|
6
6
|
ApiError,
|
|
7
7
|
api,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
run
|
|
12
12
|
} from "./chunk-I5SMACZY.js";
|
|
13
|
-
import "./chunk-WXM4BB4D.js";
|
|
14
13
|
import {
|
|
15
14
|
health
|
|
16
15
|
} from "./chunk-3TOSW3FU.js";
|
|
16
|
+
import "./chunk-4PKRRMRZ.js";
|
|
17
17
|
import "./chunk-WKKEXOKW.js";
|
|
18
18
|
import "./chunk-KPOE4I3O.js";
|
|
19
19
|
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
activeProjectPaths,
|
|
10
10
|
openReadOnly,
|
|
11
11
|
schemaVersionOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-V3PED2Z5.js";
|
|
13
13
|
import "./chunk-I5SMACZY.js";
|
|
14
|
-
import "./chunk-WXM4BB4D.js";
|
|
15
14
|
import {
|
|
16
15
|
baseUrl,
|
|
17
16
|
dbFile
|
|
18
17
|
} from "./chunk-3TOSW3FU.js";
|
|
18
|
+
import "./chunk-4PKRRMRZ.js";
|
|
19
19
|
import "./chunk-WKKEXOKW.js";
|
|
20
20
|
import "./chunk-KPOE4I3O.js";
|
|
21
21
|
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
statusLines,
|
|
8
8
|
stopCommand,
|
|
9
9
|
stopServer
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4TPC7U6A.js";
|
|
11
|
+
import "./chunk-ANFNDJZO.js";
|
|
11
12
|
import "./chunk-FNBCYJA2.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-WXM4BB4D.js";
|
|
14
|
-
import "./chunk-SQHGMBUM.js";
|
|
13
|
+
import "./chunk-V3PED2Z5.js";
|
|
15
14
|
import "./chunk-TCKAXJOM.js";
|
|
16
15
|
import "./chunk-MKT3PGWK.js";
|
|
17
16
|
import "./chunk-3TOSW3FU.js";
|
|
18
17
|
import "./chunk-GD6AEWOM.js";
|
|
18
|
+
import "./chunk-4PKRRMRZ.js";
|
|
19
19
|
import "./chunk-WKKEXOKW.js";
|
|
20
20
|
import "./chunk-KPOE4I3O.js";
|
|
21
21
|
export {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
stopServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4TPC7U6A.js";
|
|
5
|
+
import "./chunk-ANFNDJZO.js";
|
|
5
6
|
import "./chunk-FNBCYJA2.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-V3PED2Z5.js";
|
|
8
|
+
import "./chunk-TCKAXJOM.js";
|
|
7
9
|
import {
|
|
8
10
|
currentSpec
|
|
9
11
|
} from "./chunk-LDIOPHXZ.js";
|
|
10
12
|
import "./chunk-I5SMACZY.js";
|
|
11
|
-
import "./chunk-WXM4BB4D.js";
|
|
12
|
-
import "./chunk-SQHGMBUM.js";
|
|
13
|
-
import "./chunk-TCKAXJOM.js";
|
|
14
13
|
import {
|
|
15
14
|
START_TIMEOUT_MS,
|
|
16
15
|
logFile
|
|
@@ -23,6 +22,7 @@ import {
|
|
|
23
22
|
waitForHealth
|
|
24
23
|
} from "./chunk-3TOSW3FU.js";
|
|
25
24
|
import "./chunk-GD6AEWOM.js";
|
|
25
|
+
import "./chunk-4PKRRMRZ.js";
|
|
26
26
|
import "./chunk-WKKEXOKW.js";
|
|
27
27
|
import "./chunk-KPOE4I3O.js";
|
|
28
28
|
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
ARCH_POLL_MS,
|
|
4
|
+
ARCH_TIMEOUT_MS,
|
|
3
5
|
DEFAULT_PORT,
|
|
4
6
|
HOST,
|
|
5
7
|
KEEP_BACKUPS,
|
|
6
8
|
VERSION,
|
|
7
9
|
acquireLock,
|
|
10
|
+
archOutcome,
|
|
8
11
|
backupDatabase,
|
|
9
12
|
backupFileName,
|
|
10
13
|
backupsDir,
|
|
11
14
|
clearUpgradeMarker,
|
|
15
|
+
cliArchRunner,
|
|
12
16
|
compareVersions,
|
|
13
17
|
createApp,
|
|
18
|
+
createArchAuto,
|
|
14
19
|
createUpdateChecker,
|
|
15
20
|
isAlive,
|
|
16
21
|
listBackups,
|
|
@@ -30,23 +35,28 @@ import {
|
|
|
30
35
|
upgradeMarkerPath,
|
|
31
36
|
writeUpdateCache,
|
|
32
37
|
writeUpgradeMarker
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-WXM4BB4D.js";
|
|
38
|
+
} from "./chunk-PJ5WOZB3.js";
|
|
35
39
|
import "./chunk-GD6AEWOM.js";
|
|
40
|
+
import "./chunk-4PKRRMRZ.js";
|
|
36
41
|
import "./chunk-WKKEXOKW.js";
|
|
37
42
|
import "./chunk-KPOE4I3O.js";
|
|
38
43
|
export {
|
|
44
|
+
ARCH_POLL_MS,
|
|
45
|
+
ARCH_TIMEOUT_MS,
|
|
39
46
|
DEFAULT_PORT,
|
|
40
47
|
HOST,
|
|
41
48
|
KEEP_BACKUPS,
|
|
42
49
|
VERSION,
|
|
43
50
|
acquireLock,
|
|
51
|
+
archOutcome,
|
|
44
52
|
backupDatabase,
|
|
45
53
|
backupFileName,
|
|
46
54
|
backupsDir,
|
|
47
55
|
clearUpgradeMarker,
|
|
56
|
+
cliArchRunner,
|
|
48
57
|
compareVersions,
|
|
49
58
|
createApp,
|
|
59
|
+
createArchAuto,
|
|
50
60
|
createUpdateChecker,
|
|
51
61
|
isAlive,
|
|
52
62
|
listBackups,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
ARCHITECTURE_DIR,
|
|
3
4
|
BOARD_FORMAT_VERSION,
|
|
4
5
|
DEFAULT_CLAIM_MINUTES,
|
|
5
6
|
DEFAULT_COMMIT_SCAN,
|
|
@@ -9,16 +10,20 @@ import {
|
|
|
9
10
|
ERROR_CODES,
|
|
10
11
|
EventBus,
|
|
11
12
|
GIT_CACHE_TTL_MS,
|
|
13
|
+
MAX_ARCHITECTURE_VIEWS,
|
|
14
|
+
MAX_CHANGED_FILES,
|
|
12
15
|
MAX_LIST_LIMIT,
|
|
13
16
|
MAX_REF_BYTES,
|
|
14
17
|
MAX_TODOS,
|
|
15
18
|
MAX_TODO_FILES,
|
|
16
19
|
MAX_TODO_FILE_BYTES,
|
|
20
|
+
MAX_TOUCH_PATHS,
|
|
17
21
|
MAX_WORKSPACE_REPOS,
|
|
18
22
|
PROJECT_KEY,
|
|
19
23
|
SlateError,
|
|
20
24
|
Store,
|
|
21
25
|
ancestors,
|
|
26
|
+
changedFiles,
|
|
22
27
|
claimantSchema,
|
|
23
28
|
clearGitCache,
|
|
24
29
|
commitShaSchema,
|
|
@@ -28,6 +33,7 @@ import {
|
|
|
28
33
|
expandHome,
|
|
29
34
|
findCommitsMentioning,
|
|
30
35
|
findTodos,
|
|
36
|
+
headCommit,
|
|
31
37
|
idSchema,
|
|
32
38
|
invalid,
|
|
33
39
|
isInside,
|
|
@@ -84,10 +90,11 @@ import {
|
|
|
84
90
|
workspaceCreateSchema,
|
|
85
91
|
workspaceUpdateSchema,
|
|
86
92
|
worktreeMainRepo
|
|
87
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-4PKRRMRZ.js";
|
|
88
94
|
import "./chunk-WKKEXOKW.js";
|
|
89
95
|
import "./chunk-KPOE4I3O.js";
|
|
90
96
|
export {
|
|
97
|
+
ARCHITECTURE_DIR,
|
|
91
98
|
BOARD_FORMAT_VERSION,
|
|
92
99
|
DEFAULT_CLAIM_MINUTES,
|
|
93
100
|
DEFAULT_COMMIT_SCAN,
|
|
@@ -97,16 +104,20 @@ export {
|
|
|
97
104
|
ERROR_CODES,
|
|
98
105
|
EventBus,
|
|
99
106
|
GIT_CACHE_TTL_MS,
|
|
107
|
+
MAX_ARCHITECTURE_VIEWS,
|
|
108
|
+
MAX_CHANGED_FILES,
|
|
100
109
|
MAX_LIST_LIMIT,
|
|
101
110
|
MAX_REF_BYTES,
|
|
102
111
|
MAX_TODOS,
|
|
103
112
|
MAX_TODO_FILES,
|
|
104
113
|
MAX_TODO_FILE_BYTES,
|
|
114
|
+
MAX_TOUCH_PATHS,
|
|
105
115
|
MAX_WORKSPACE_REPOS,
|
|
106
116
|
PROJECT_KEY,
|
|
107
117
|
SlateError,
|
|
108
118
|
Store,
|
|
109
119
|
ancestors,
|
|
120
|
+
changedFiles,
|
|
110
121
|
claimantSchema,
|
|
111
122
|
clearGitCache,
|
|
112
123
|
commitShaSchema,
|
|
@@ -116,6 +127,7 @@ export {
|
|
|
116
127
|
expandHome,
|
|
117
128
|
findCommitsMentioning,
|
|
118
129
|
findTodos,
|
|
130
|
+
headCommit,
|
|
119
131
|
idSchema,
|
|
120
132
|
invalid,
|
|
121
133
|
isInside,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as e,t}from"./mermaid-parser.core-0pE4JCc_.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as r}from"./d3-selection-BFzs9NTX.js";import"./chunk-QDWOWVBQ-Du0KmhW4.js";import{n as i,r as a,t as o}from"./chunk-7U7NFRK5-CSOOpKZT.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-BVgUieVU.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-NGNAAXSQ-DqoPQk1a.js";import{M as e}from"./mermaid-parser.core-0pE4JCc_.js";export{e as createArchitectureServices};
|