@swarmvaultai/engine 0.7.23 → 0.7.24
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/index.d.ts +1 -1
- package/dist/index.js +17 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ type PageStatus = "draft" | "candidate" | "active" | "archived";
|
|
|
57
57
|
type PageManager = "system" | "human";
|
|
58
58
|
type ApprovalEntryStatus = "pending" | "accepted" | "rejected";
|
|
59
59
|
type ApprovalChangeType = "create" | "update" | "delete" | "promote";
|
|
60
|
-
type ApprovalBundleType = "compile" | "
|
|
60
|
+
type ApprovalBundleType = "compile" | "generated-output" | "source-review" | "guided-source" | "guided-session";
|
|
61
61
|
type ApprovalEntryLabel = "source-brief" | "source-review" | "source-guide" | "guided-update";
|
|
62
62
|
type GuidedSourceSessionStatus = "awaiting_input" | "ready_to_stage" | "staged" | "accepted" | "rejected";
|
|
63
63
|
type VaultProfilePreset = "reader" | "timeline" | "diligence" | "thesis";
|
package/dist/index.js
CHANGED
|
@@ -17485,8 +17485,8 @@ async function buildDashboardRecords(config, paths, graph, schemaHash, report) {
|
|
|
17485
17485
|
).slice(0, 20);
|
|
17486
17486
|
const sourceSessions = await listGuidedSourceSessions(paths.rootDir);
|
|
17487
17487
|
const stagedGuideBundles = (await Promise.all(
|
|
17488
|
-
(await fs19.readdir(paths.approvalsDir, { withFileTypes: true }).catch(() => [])).filter((entry) => entry.isDirectory()).map(async (entry) => await
|
|
17489
|
-
)).filter((manifest) => Boolean(manifest)).filter((manifest) => manifest.bundleType === "
|
|
17488
|
+
(await fs19.readdir(paths.approvalsDir, { withFileTypes: true }).catch(() => [])).filter((entry) => entry.isDirectory()).map(async (entry) => await readApprovalManifest(paths, entry.name).catch(() => null))
|
|
17489
|
+
)).filter((manifest) => Boolean(manifest)).filter((manifest) => manifest.bundleType === "guided-source" || manifest.bundleType === "guided-session").sort((left, right) => right.createdAt.localeCompare(left.createdAt)).slice(0, 12);
|
|
17490
17490
|
const readerFocusPages = uniqueBy([...guidePages, ...briefPages, ...conceptPages, ...entityPages], (page) => page.id).slice(0, 8);
|
|
17491
17491
|
const diligenceSessions = sourceSessions.filter((session) => session.status === "staged" || session.status === "awaiting_input").slice(0, 8);
|
|
17492
17492
|
const dashboards = [
|
|
@@ -18713,11 +18713,22 @@ function approvalManifestPath(paths, approvalId) {
|
|
|
18713
18713
|
function approvalGraphPath(paths, approvalId) {
|
|
18714
18714
|
return path23.join(paths.approvalsDir, approvalId, "state", "graph.json");
|
|
18715
18715
|
}
|
|
18716
|
+
function normalizeApprovalBundleType(raw) {
|
|
18717
|
+
if (!raw) return void 0;
|
|
18718
|
+
const legacy = {
|
|
18719
|
+
generated_output: "generated-output",
|
|
18720
|
+
source_review: "source-review",
|
|
18721
|
+
guided_source: "guided-source",
|
|
18722
|
+
guided_session: "guided-session"
|
|
18723
|
+
};
|
|
18724
|
+
return legacy[raw] ?? raw;
|
|
18725
|
+
}
|
|
18716
18726
|
async function readApprovalManifest(paths, approvalId) {
|
|
18717
18727
|
const manifest = await readJsonFile(approvalManifestPath(paths, approvalId));
|
|
18718
18728
|
if (!manifest) {
|
|
18719
18729
|
throw new Error(`Approval bundle not found: ${approvalId}`);
|
|
18720
18730
|
}
|
|
18731
|
+
manifest.bundleType = normalizeApprovalBundleType(manifest.bundleType);
|
|
18721
18732
|
return manifest;
|
|
18722
18733
|
}
|
|
18723
18734
|
async function writeApprovalManifest(paths, manifest) {
|
|
@@ -19560,7 +19571,7 @@ async function stageOutputApprovalBundle(rootDir, stagedPages, options = {}) {
|
|
|
19560
19571
|
await writeApprovalManifest(paths, {
|
|
19561
19572
|
approvalId,
|
|
19562
19573
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
19563
|
-
bundleType: options.bundleType ?? "
|
|
19574
|
+
bundleType: options.bundleType ?? "generated-output",
|
|
19564
19575
|
title: options.title,
|
|
19565
19576
|
sourceSessionId: options.sourceSessionId,
|
|
19566
19577
|
entries: await buildApprovalEntries(
|
|
@@ -21252,7 +21263,7 @@ async function bootstrapDemo(rootDir, input) {
|
|
|
21252
21263
|
}
|
|
21253
21264
|
|
|
21254
21265
|
// src/mcp.ts
|
|
21255
|
-
var SERVER_VERSION = "0.7.
|
|
21266
|
+
var SERVER_VERSION = "0.7.24";
|
|
21256
21267
|
async function createMcpServer(rootDir) {
|
|
21257
21268
|
const server = new McpServer({
|
|
21258
21269
|
name: "swarmvault",
|
|
@@ -23078,7 +23089,7 @@ async function buildSourceGuideStagedPage(rootDir, scope) {
|
|
|
23078
23089
|
async function stageSourceReviewForScope(rootDir, scope) {
|
|
23079
23090
|
const output = await buildSourceReviewStagedPage(rootDir, scope);
|
|
23080
23091
|
const approval = await stageGeneratedOutputPages(rootDir, [{ page: output.page, content: output.content, label: "source-review" }], {
|
|
23081
|
-
bundleType: "
|
|
23092
|
+
bundleType: "source-review",
|
|
23082
23093
|
title: `Source Review: ${scope.title}`
|
|
23083
23094
|
});
|
|
23084
23095
|
return {
|
|
@@ -23430,7 +23441,7 @@ async function stageSourceGuideForScope(rootDir, scope, options = {}) {
|
|
|
23430
23441
|
...guidedUpdates
|
|
23431
23442
|
],
|
|
23432
23443
|
{
|
|
23433
|
-
bundleType: "
|
|
23444
|
+
bundleType: "guided-session",
|
|
23434
23445
|
title: `Guided Session: ${scope.title}`,
|
|
23435
23446
|
sourceSessionId: session.sessionId
|
|
23436
23447
|
}
|