@a-company/paradigm 3.5.0 → 3.6.0
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/{chunk-CRICL4FQ.js → chunk-ADOBV4PH.js} +385 -2
- package/dist/{chunk-2E2RTBSM.js → chunk-GY5KO3YZ.js} +147 -2
- package/dist/{dist-YP2CO4TG.js → dist-OLFOTUHS.js} +4 -2
- package/dist/{habits-CHP4EW5H.js → habits-ZJBAL4HD.js} +2 -2
- package/dist/index.js +29 -29
- package/dist/mcp.js +175 -16
- package/dist/{sentinel-ZTL224IG.js → sentinel-KDIGZWKT.js} +1 -1
- package/dist/{server-MZBYDXJY.js → server-NN7WDAZJ.js} +222 -2
- package/dist/{triage-PXMU3RWV.js → triage-B5W6GZLT.js} +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -521,76 +521,76 @@ hooksCmd.action(async () => {
|
|
|
521
521
|
});
|
|
522
522
|
var triageCmd = program.command("triage").description("Semantic error triage - incident management and pattern matching");
|
|
523
523
|
triageCmd.command("list").alias("ls").description("List recent incidents with matched patterns").option("-l, --limit <number>", "Maximum incidents to show", "10").option("-s, --status <status>", "Filter by status: open, investigating, resolved, wont-fix, all").option("--symbol <symbol>", "Filter by symbol (e.g., @checkout, ^auth)").option("-e, --env <environment>", "Filter by environment").option("--search <text>", "Search in error messages").option("--from <date>", "Filter from date (ISO format)").option("--to <date>", "Filter to date (ISO format)").option("--json", "Output as JSON").action(async (options) => {
|
|
524
|
-
const { triageListCommand } = await import("./triage-
|
|
524
|
+
const { triageListCommand } = await import("./triage-B5W6GZLT.js");
|
|
525
525
|
await triageListCommand(options);
|
|
526
526
|
});
|
|
527
527
|
triageCmd.command("show <id>").description("Show full incident details").option("--timeline", "Include flow timeline").option("--json", "Output as JSON").action(async (id, options) => {
|
|
528
|
-
const { triageShowCommand } = await import("./triage-
|
|
528
|
+
const { triageShowCommand } = await import("./triage-B5W6GZLT.js");
|
|
529
529
|
await triageShowCommand(id, options);
|
|
530
530
|
});
|
|
531
531
|
triageCmd.command("resolve <id>").description("Mark incident as resolved").option("-p, --pattern <patternId>", "Pattern that led to resolution").option("-c, --commit <hash>", "Git commit hash of fix").option("--pr <url>", "Pull request URL").option("-n, --notes <text>", "Resolution notes").option("--wont-fix", "Mark as will not fix").action(async (id, options) => {
|
|
532
|
-
const { triageResolveCommand } = await import("./triage-
|
|
532
|
+
const { triageResolveCommand } = await import("./triage-B5W6GZLT.js");
|
|
533
533
|
await triageResolveCommand(id, options);
|
|
534
534
|
});
|
|
535
535
|
triageCmd.command("note <id> <note>").description("Add a note to an incident").action(async (id, note) => {
|
|
536
|
-
const { triageNoteCommand } = await import("./triage-
|
|
536
|
+
const { triageNoteCommand } = await import("./triage-B5W6GZLT.js");
|
|
537
537
|
await triageNoteCommand(id, note);
|
|
538
538
|
});
|
|
539
539
|
triageCmd.command("link <id1> <id2>").description("Link two related incidents").action(async (id1, id2) => {
|
|
540
|
-
const { triageLinkCommand } = await import("./triage-
|
|
540
|
+
const { triageLinkCommand } = await import("./triage-B5W6GZLT.js");
|
|
541
541
|
await triageLinkCommand(id1, id2);
|
|
542
542
|
});
|
|
543
543
|
var triagePatternsCmd = triageCmd.command("patterns").description("Manage failure patterns");
|
|
544
544
|
triagePatternsCmd.command("list").alias("ls").description("List all patterns").option("--source <source>", "Filter by source: manual, suggested, imported, community").option("--min-confidence <score>", "Minimum confidence score").option("--json", "Output as JSON").action(async (options) => {
|
|
545
|
-
const { triagePatternsListCommand } = await import("./triage-
|
|
545
|
+
const { triagePatternsListCommand } = await import("./triage-B5W6GZLT.js");
|
|
546
546
|
await triagePatternsListCommand(options);
|
|
547
547
|
});
|
|
548
548
|
triagePatternsCmd.command("show <id>").description("Show pattern details").option("--json", "Output as JSON").action(async (id, options) => {
|
|
549
|
-
const { triagePatternsShowCommand } = await import("./triage-
|
|
549
|
+
const { triagePatternsShowCommand } = await import("./triage-B5W6GZLT.js");
|
|
550
550
|
await triagePatternsShowCommand(id, options);
|
|
551
551
|
});
|
|
552
552
|
triagePatternsCmd.command("add").description("Create a new pattern").requiredOption("--id <id>", "Pattern ID (kebab-case)").requiredOption("--name <name>", "Human-readable name").option("--description <text>", "Pattern description").option("--symbols <pairs>", 'Symbol criteria (e.g., "feature:@checkout,gate:^auth")').option("--error-contains <keywords>", "Error keywords (comma-separated)").option("--missing-signals <signals>", "Expected missing signals (comma-separated)").option("--strategy <strategy>", "Resolution strategy: retry, fallback, fix-data, fix-code, ignore, escalate", "fix-code").option("--priority <priority>", "Priority: low, medium, high, critical", "medium").option("--code-hint <text>", "Code hint for resolution").option("--tags <tags>", "Tags (comma-separated)").option("--from-incident <id>", "Generate suggestion from incident").action(async (options) => {
|
|
553
|
-
const { triagePatternsAddCommand } = await import("./triage-
|
|
553
|
+
const { triagePatternsAddCommand } = await import("./triage-B5W6GZLT.js");
|
|
554
554
|
await triagePatternsAddCommand(options);
|
|
555
555
|
});
|
|
556
556
|
triagePatternsCmd.command("delete <id>").alias("rm").description("Delete a pattern").action(async (id) => {
|
|
557
|
-
const { triagePatternsDeleteCommand } = await import("./triage-
|
|
557
|
+
const { triagePatternsDeleteCommand } = await import("./triage-B5W6GZLT.js");
|
|
558
558
|
await triagePatternsDeleteCommand(id);
|
|
559
559
|
});
|
|
560
560
|
triagePatternsCmd.command("test <id>").description("Test pattern against historical incidents").option("-l, --limit <number>", "Max incidents to test against", "100").option("--json", "Output as JSON").action(async (id, options) => {
|
|
561
|
-
const { triagePatternsTestCommand } = await import("./triage-
|
|
561
|
+
const { triagePatternsTestCommand } = await import("./triage-B5W6GZLT.js");
|
|
562
562
|
await triagePatternsTestCommand(id, options);
|
|
563
563
|
});
|
|
564
564
|
triagePatternsCmd.command("seed").description("Load built-in seed patterns").action(async () => {
|
|
565
|
-
const { triagePatternsSeedCommand } = await import("./triage-
|
|
565
|
+
const { triagePatternsSeedCommand } = await import("./triage-B5W6GZLT.js");
|
|
566
566
|
await triagePatternsSeedCommand();
|
|
567
567
|
});
|
|
568
568
|
triagePatternsCmd.action(async () => {
|
|
569
|
-
const { triagePatternsListCommand } = await import("./triage-
|
|
569
|
+
const { triagePatternsListCommand } = await import("./triage-B5W6GZLT.js");
|
|
570
570
|
await triagePatternsListCommand({});
|
|
571
571
|
});
|
|
572
572
|
triageCmd.command("export <type>").description("Export patterns or full backup (type: patterns, backup)").option("-o, --output <path>", "Output file path").option("--include-private", "Include private patterns").action(async (type, options) => {
|
|
573
|
-
const { triageExportCommand } = await import("./triage-
|
|
573
|
+
const { triageExportCommand } = await import("./triage-B5W6GZLT.js");
|
|
574
574
|
await triageExportCommand(type, options);
|
|
575
575
|
});
|
|
576
576
|
triageCmd.command("import <file>").description("Import patterns from JSON file").option("--overwrite", "Overwrite existing patterns").action(async (file, options) => {
|
|
577
|
-
const { triageImportCommand } = await import("./triage-
|
|
577
|
+
const { triageImportCommand } = await import("./triage-B5W6GZLT.js");
|
|
578
578
|
await triageImportCommand(file, options);
|
|
579
579
|
});
|
|
580
580
|
triageCmd.command("restore <file>").description("Restore from full backup").action(async (file) => {
|
|
581
|
-
const { triageRestoreCommand } = await import("./triage-
|
|
581
|
+
const { triageRestoreCommand } = await import("./triage-B5W6GZLT.js");
|
|
582
582
|
await triageRestoreCommand(file);
|
|
583
583
|
});
|
|
584
584
|
triageCmd.command("stats").description("Show statistics dashboard").option("-p, --period <period>", "Time period: 1d, 7d, 30d, 90d", "7d").option("--symbol <symbol>", "Show health for specific symbol").option("--json", "Output as JSON").action(async (options) => {
|
|
585
|
-
const { triageStatsCommand } = await import("./triage-
|
|
585
|
+
const { triageStatsCommand } = await import("./triage-B5W6GZLT.js");
|
|
586
586
|
await triageStatsCommand(options);
|
|
587
587
|
});
|
|
588
588
|
triageCmd.command("record").description("Manually record an incident").requiredOption("--error <message>", "Error message").requiredOption("-e, --env <environment>", "Environment").option("--feature <symbol>", "Feature symbol (@...)").option("--component <symbol>", "Component symbol (#...)").option("--flow <symbol>", "Flow symbol ($...)").option("--gate <symbol>", "Gate symbol (^...)").option("--signal <symbol>", "Signal symbol (!...)").option("--state <symbol>", "State symbol (%...)").option("--integration <symbol>", "Integration symbol (&...)").option("--service <name>", "Service name").option("--version <version>", "App version").option("--stack <trace>", "Stack trace").option("--json", "Output as JSON").action(async (options) => {
|
|
589
|
-
const { triageRecordCommand } = await import("./triage-
|
|
589
|
+
const { triageRecordCommand } = await import("./triage-B5W6GZLT.js");
|
|
590
590
|
await triageRecordCommand(options);
|
|
591
591
|
});
|
|
592
592
|
triageCmd.option("-l, --limit <number>", "Maximum incidents to show", "10").option("-s, --status <status>", "Filter by status").option("--json", "Output as JSON").action(async (options) => {
|
|
593
|
-
const { triageListCommand } = await import("./triage-
|
|
593
|
+
const { triageListCommand } = await import("./triage-B5W6GZLT.js");
|
|
594
594
|
await triageListCommand(options);
|
|
595
595
|
});
|
|
596
596
|
var loreCmd = program.command("lore").description("Project lore - timeline of everything that happened to this project");
|
|
@@ -628,47 +628,47 @@ loreCmd.option("-p, --port <port>", "Port to run on", "3840").option("--no-open"
|
|
|
628
628
|
});
|
|
629
629
|
var habitsCmd = program.command("habits").description("Behavioral habits - practice tracking and compliance");
|
|
630
630
|
habitsCmd.command("list").alias("ls").description("List all configured habits").option("--trigger <trigger>", "Filter by trigger: preflight, postflight, on-stop, on-commit").option("--category <category>", "Filter by category: discovery, verification, testing, documentation, collaboration, security").option("--json", "Output as JSON").action(async (options) => {
|
|
631
|
-
const { habitsListCommand } = await import("./habits-
|
|
631
|
+
const { habitsListCommand } = await import("./habits-ZJBAL4HD.js");
|
|
632
632
|
await habitsListCommand(options);
|
|
633
633
|
});
|
|
634
634
|
habitsCmd.command("status").description("Show practice profile with compliance rates").option("-p, --period <period>", "Time period: 7d, 30d, 90d, all", "30d").option("--json", "Output as JSON").action(async (options) => {
|
|
635
|
-
const { habitsStatusCommand } = await import("./habits-
|
|
635
|
+
const { habitsStatusCommand } = await import("./habits-ZJBAL4HD.js");
|
|
636
636
|
await habitsStatusCommand(options);
|
|
637
637
|
});
|
|
638
638
|
habitsCmd.command("init").description("Initialize habits.yaml with seed habits").option("-f, --force", "Overwrite existing file").action(async (options) => {
|
|
639
|
-
const { habitsInitCommand } = await import("./habits-
|
|
639
|
+
const { habitsInitCommand } = await import("./habits-ZJBAL4HD.js");
|
|
640
640
|
await habitsInitCommand(options);
|
|
641
641
|
});
|
|
642
642
|
habitsCmd.command("check").description("Evaluate habit compliance for a trigger point").requiredOption("-t, --trigger <trigger>", "Trigger: preflight, postflight, on-stop, on-commit").option("--record", "Record practice events to Sentinel").option("--json", "Output as JSON").option("--files <files>", "Comma-separated files modified (default: git diff)").option("--symbols <symbols>", "Comma-separated symbols touched").action(async (options) => {
|
|
643
|
-
const { habitsCheckCommand } = await import("./habits-
|
|
643
|
+
const { habitsCheckCommand } = await import("./habits-ZJBAL4HD.js");
|
|
644
644
|
await habitsCheckCommand(options);
|
|
645
645
|
});
|
|
646
646
|
habitsCmd.command("add").description("Add a custom habit").requiredOption("--id <id>", "Habit ID (kebab-case)").requiredOption("--name <name>", "Human-readable name").requiredOption("--description <desc>", "What this habit enforces").requiredOption("--category <category>", "Category: discovery, verification, testing, documentation, collaboration, security").requiredOption("--trigger <trigger>", "Trigger: preflight, postflight, on-stop, on-commit").option("--severity <severity>", "Severity: advisory, warn, block", "advisory").option("--tools <tools>", "Comma-separated tools to check (for tool-called check type)").option("--check-type <type>", "Check type: tool-called, file-exists, file-modified, lore-recorded, symbols-registered, gates-declared, tests-exist, git-clean", "tool-called").option("--patterns <patterns>", "Comma-separated patterns (for file-exists, file-modified, tests-exist check types)").action(async (options) => {
|
|
647
|
-
const { habitsAddCommand } = await import("./habits-
|
|
647
|
+
const { habitsAddCommand } = await import("./habits-ZJBAL4HD.js");
|
|
648
648
|
await habitsAddCommand({ ...options, checkType: options.checkType });
|
|
649
649
|
});
|
|
650
650
|
habitsCmd.command("edit <id>").description("Edit a habit (seed habits: only severity/enabled; custom: all fields)").option("--name <name>", "New name").option("--description <desc>", "New description").option("--category <category>", "New category").option("--trigger <trigger>", "New trigger").option("--severity <severity>", "New severity: advisory, warn, block").option("--enabled <bool>", "Enable or disable: true, false").option("--check-type <type>", "New check type").option("--patterns <patterns>", "Comma-separated patterns").option("--tools <tools>", "Comma-separated tools").action(async (id, options) => {
|
|
651
|
-
const { habitsEditCommand } = await import("./habits-
|
|
651
|
+
const { habitsEditCommand } = await import("./habits-ZJBAL4HD.js");
|
|
652
652
|
await habitsEditCommand(id, { ...options, checkType: options.checkType });
|
|
653
653
|
});
|
|
654
654
|
habitsCmd.command("remove <id>").description("Remove a custom habit (seed habits cannot be removed, only disabled)").option("-y, --yes", "Skip confirmation").action(async (id, options) => {
|
|
655
|
-
const { habitsRemoveCommand } = await import("./habits-
|
|
655
|
+
const { habitsRemoveCommand } = await import("./habits-ZJBAL4HD.js");
|
|
656
656
|
await habitsRemoveCommand(id, options);
|
|
657
657
|
});
|
|
658
658
|
habitsCmd.command("enable <id>").description("Enable a habit").action(async (id) => {
|
|
659
|
-
const { habitsToggleCommand } = await import("./habits-
|
|
659
|
+
const { habitsToggleCommand } = await import("./habits-ZJBAL4HD.js");
|
|
660
660
|
await habitsToggleCommand(id, "enable");
|
|
661
661
|
});
|
|
662
662
|
habitsCmd.command("disable <id>").description("Disable a habit").action(async (id) => {
|
|
663
|
-
const { habitsToggleCommand } = await import("./habits-
|
|
663
|
+
const { habitsToggleCommand } = await import("./habits-ZJBAL4HD.js");
|
|
664
664
|
await habitsToggleCommand(id, "disable");
|
|
665
665
|
});
|
|
666
666
|
habitsCmd.action(async () => {
|
|
667
|
-
const { habitsListCommand } = await import("./habits-
|
|
667
|
+
const { habitsListCommand } = await import("./habits-ZJBAL4HD.js");
|
|
668
668
|
await habitsListCommand({});
|
|
669
669
|
});
|
|
670
670
|
program.command("sentinel [path]").description("Launch the Sentinel UI - unified codebase intelligence visualizer").option("-p, --port <port>", "Port to run on", "3838").option("--no-open", "Don't open browser automatically").action(async (path2, options) => {
|
|
671
|
-
const { sentinelCommand } = await import("./sentinel-
|
|
671
|
+
const { sentinelCommand } = await import("./sentinel-KDIGZWKT.js");
|
|
672
672
|
await sentinelCommand(path2, options);
|
|
673
673
|
});
|
|
674
674
|
program.command("university").description("Launch Paradigm University - interactive learning platform & PLSAT certification").option("-p, --port <port>", "Port to run on", "3839").option("--no-open", "Don't open browser automatically").action(async (options) => {
|
package/dist/mcp.js
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
schedulePluginUpdateCheck
|
|
8
8
|
} from "./chunk-4G54C4VM.js";
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// ../paradigm-mcp/node_modules/.pnpm/sql.js@1.14.0/node_modules/sql.js/dist/sql-wasm.js
|
|
11
11
|
var require_sql_wasm = __commonJS({
|
|
12
|
-
"
|
|
12
|
+
"../paradigm-mcp/node_modules/.pnpm/sql.js@1.14.0/node_modules/sql.js/dist/sql-wasm.js"(exports, module) {
|
|
13
13
|
"use strict";
|
|
14
14
|
var initSqlJsPromise = void 0;
|
|
15
15
|
var initSqlJs3 = function(moduleConfig) {
|
|
@@ -2131,12 +2131,12 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
2131
2131
|
import * as fs6 from "fs";
|
|
2132
2132
|
import * as path7 from "path";
|
|
2133
2133
|
|
|
2134
|
-
// ../premise/core/dist/index.js
|
|
2134
|
+
// ../paradigm-mcp/node_modules/.pnpm/@a-company+premise-core@0.2.0_typescript@5.9.3/node_modules/@a-company/premise-core/dist/index.js
|
|
2135
2135
|
import * as yaml3 from "js-yaml";
|
|
2136
2136
|
import { z as z2 } from "zod";
|
|
2137
2137
|
import * as path3 from "path";
|
|
2138
2138
|
|
|
2139
|
-
// ../purpose/core/dist/index.js
|
|
2139
|
+
// ../paradigm-mcp/node_modules/.pnpm/@a-company+purpose-core@3.5.0_typescript@5.9.3/node_modules/@a-company/purpose-core/dist/index.js
|
|
2140
2140
|
import * as fs from "fs";
|
|
2141
2141
|
import * as yaml from "js-yaml";
|
|
2142
2142
|
import { z } from "zod";
|
|
@@ -2743,7 +2743,7 @@ function validatePurposeItem(id, item, itemType, prefix, issues) {
|
|
|
2743
2743
|
}
|
|
2744
2744
|
}
|
|
2745
2745
|
|
|
2746
|
-
// ../portal/core/dist/index.js
|
|
2746
|
+
// ../paradigm-mcp/node_modules/.pnpm/@a-company+portal-core@0.1.0/node_modules/@a-company/portal-core/dist/index.js
|
|
2747
2747
|
import * as fs2 from "fs";
|
|
2748
2748
|
import * as path2 from "path";
|
|
2749
2749
|
import * as yaml2 from "js-yaml";
|
|
@@ -2887,7 +2887,7 @@ async function findGateFiles(rootDir) {
|
|
|
2887
2887
|
return files;
|
|
2888
2888
|
}
|
|
2889
2889
|
|
|
2890
|
-
// ../premise/core/dist/index.js
|
|
2890
|
+
// ../paradigm-mcp/node_modules/.pnpm/@a-company+premise-core@0.2.0_typescript@5.9.3/node_modules/@a-company/premise-core/dist/index.js
|
|
2891
2891
|
var PositionSchema = z2.object({
|
|
2892
2892
|
x: z2.number(),
|
|
2893
2893
|
y: z2.number()
|
|
@@ -3052,9 +3052,7 @@ async function aggregateFromPremise(premiseFile, rootDir) {
|
|
|
3052
3052
|
data: item,
|
|
3053
3053
|
description: item.description,
|
|
3054
3054
|
anchors: item.anchors?.map((a) => parseAnchorString(a)),
|
|
3055
|
-
appliesTo: item["applies-to"]
|
|
3056
|
-
tags: item.tags,
|
|
3057
|
-
enforcement: item.enforcement
|
|
3055
|
+
appliesTo: item["applies-to"]
|
|
3058
3056
|
}));
|
|
3059
3057
|
}
|
|
3060
3058
|
const symbolRefs = extractSymbolReferences(parsed);
|
|
@@ -7414,7 +7412,7 @@ function generateMinimalNavigator(ctx) {
|
|
|
7414
7412
|
};
|
|
7415
7413
|
}
|
|
7416
7414
|
|
|
7417
|
-
// ../
|
|
7415
|
+
// ../paradigm-mcp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/rng.js
|
|
7418
7416
|
import crypto3 from "crypto";
|
|
7419
7417
|
var rnds8Pool = new Uint8Array(256);
|
|
7420
7418
|
var poolPtr = rnds8Pool.length;
|
|
@@ -7426,7 +7424,7 @@ function rng() {
|
|
|
7426
7424
|
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
7427
7425
|
}
|
|
7428
7426
|
|
|
7429
|
-
// ../
|
|
7427
|
+
// ../paradigm-mcp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/stringify.js
|
|
7430
7428
|
var byteToHex = [];
|
|
7431
7429
|
for (let i = 0; i < 256; ++i) {
|
|
7432
7430
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
@@ -7435,13 +7433,13 @@ function unsafeStringify(arr, offset = 0) {
|
|
|
7435
7433
|
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
7436
7434
|
}
|
|
7437
7435
|
|
|
7438
|
-
// ../
|
|
7436
|
+
// ../paradigm-mcp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/native.js
|
|
7439
7437
|
import crypto4 from "crypto";
|
|
7440
7438
|
var native_default = {
|
|
7441
7439
|
randomUUID: crypto4.randomUUID
|
|
7442
7440
|
};
|
|
7443
7441
|
|
|
7444
|
-
// ../
|
|
7442
|
+
// ../paradigm-mcp/node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/v4.js
|
|
7445
7443
|
function v4(options, buf, offset) {
|
|
7446
7444
|
if (native_default.randomUUID && !buf && !options) {
|
|
7447
7445
|
return native_default.randomUUID();
|
|
@@ -7461,7 +7459,7 @@ function v4(options, buf, offset) {
|
|
|
7461
7459
|
}
|
|
7462
7460
|
var v4_default = v4;
|
|
7463
7461
|
|
|
7464
|
-
// ../sentinel/dist/chunk-FOF7CPJ6.js
|
|
7462
|
+
// ../paradigm-mcp/node_modules/.pnpm/@a-company+sentinel@3.5.0/node_modules/@a-company/sentinel/dist/chunk-FOF7CPJ6.js
|
|
7465
7463
|
var import_sql = __toESM(require_sql_wasm(), 1);
|
|
7466
7464
|
import * as path14 from "path";
|
|
7467
7465
|
import * as fs12 from "fs";
|
|
@@ -9493,7 +9491,7 @@ var SentinelStorage = class {
|
|
|
9493
9491
|
}
|
|
9494
9492
|
};
|
|
9495
9493
|
|
|
9496
|
-
// ../sentinel/dist/index.js
|
|
9494
|
+
// ../paradigm-mcp/node_modules/.pnpm/@a-company+sentinel@3.5.0/node_modules/@a-company/sentinel/dist/index.js
|
|
9497
9495
|
import * as path15 from "path";
|
|
9498
9496
|
import * as fs13 from "fs";
|
|
9499
9497
|
import { fileURLToPath } from "url";
|
|
@@ -10913,6 +10911,51 @@ function getSentinelToolsList() {
|
|
|
10913
10911
|
}
|
|
10914
10912
|
},
|
|
10915
10913
|
annotations: { readOnlyHint: true, destructiveHint: false }
|
|
10914
|
+
},
|
|
10915
|
+
// ─── Schema-Driven Observability ──────────────────────────────
|
|
10916
|
+
{
|
|
10917
|
+
name: "paradigm_sentinel_schemas",
|
|
10918
|
+
description: "List or get registered event schemas. Schemas define event types, scopes, causality, and visualization for application-agnostic observability. ~150 tokens.",
|
|
10919
|
+
inputSchema: {
|
|
10920
|
+
type: "object",
|
|
10921
|
+
properties: {
|
|
10922
|
+
id: { type: "string", description: "Get a specific schema by ID. Omit to list all." }
|
|
10923
|
+
}
|
|
10924
|
+
},
|
|
10925
|
+
annotations: { readOnlyHint: true, destructiveHint: false }
|
|
10926
|
+
},
|
|
10927
|
+
{
|
|
10928
|
+
name: "paradigm_sentinel_events",
|
|
10929
|
+
description: "Query generic events from any registered schema. Filters by schema, event type, category, scope, service, severity, time range. ~200-400 tokens.",
|
|
10930
|
+
inputSchema: {
|
|
10931
|
+
type: "object",
|
|
10932
|
+
properties: {
|
|
10933
|
+
schemaId: { type: "string", description: 'Filter by schema ID (e.g., "pretend-engine")' },
|
|
10934
|
+
eventType: { type: "string", description: 'Filter by event type (e.g., "rule:fire")' },
|
|
10935
|
+
category: { type: "string", description: 'Filter by category (e.g., "rules")' },
|
|
10936
|
+
service: { type: "string", description: "Filter by service name" },
|
|
10937
|
+
scopeValue: { type: "string", description: "Filter by scope value (e.g., frame number)" },
|
|
10938
|
+
severity: { type: "string", enum: ["debug", "info", "warn", "error"], description: "Filter by severity" },
|
|
10939
|
+
since: { type: "string", description: "ISO timestamp \u2014 events after this time" },
|
|
10940
|
+
search: { type: "string", description: "Full-text search in event data" },
|
|
10941
|
+
limit: { type: "number", description: "Max results (default: 50)" }
|
|
10942
|
+
}
|
|
10943
|
+
},
|
|
10944
|
+
annotations: { readOnlyHint: true, destructiveHint: false }
|
|
10945
|
+
},
|
|
10946
|
+
{
|
|
10947
|
+
name: "paradigm_sentinel_scopes",
|
|
10948
|
+
description: "Get scope summaries for a schema \u2014 e.g., frame list with event counts, request list with category breakdown. ~200 tokens.",
|
|
10949
|
+
inputSchema: {
|
|
10950
|
+
type: "object",
|
|
10951
|
+
properties: {
|
|
10952
|
+
schemaId: { type: "string", description: "Schema ID (required)" },
|
|
10953
|
+
sessionId: { type: "string", description: "Filter by session ID" },
|
|
10954
|
+
limit: { type: "number", description: "Max scopes (default: 50)" }
|
|
10955
|
+
},
|
|
10956
|
+
required: ["schemaId"]
|
|
10957
|
+
},
|
|
10958
|
+
annotations: { readOnlyHint: true, destructiveHint: false }
|
|
10916
10959
|
}
|
|
10917
10960
|
];
|
|
10918
10961
|
}
|
|
@@ -11403,6 +11446,122 @@ async function handleSentinelTool(name, args, ctx) {
|
|
|
11403
11446
|
}, null, 2)
|
|
11404
11447
|
};
|
|
11405
11448
|
}
|
|
11449
|
+
// ─── Schema-Driven Observability ──────────────────────────────
|
|
11450
|
+
// Note: cast to any for new v3.6 methods until types are rebuilt
|
|
11451
|
+
case "paradigm_sentinel_schemas": {
|
|
11452
|
+
const { id: schemaId } = args;
|
|
11453
|
+
if (schemaId) {
|
|
11454
|
+
const schema = store.getSchema(schemaId);
|
|
11455
|
+
if (!schema) {
|
|
11456
|
+
return { handled: true, text: JSON.stringify({ error: `Schema "${schemaId}" not found` }) };
|
|
11457
|
+
}
|
|
11458
|
+
return { handled: true, text: JSON.stringify(schema, null, 2) };
|
|
11459
|
+
}
|
|
11460
|
+
const schemas = store.listSchemas();
|
|
11461
|
+
if (schemas.length === 0) {
|
|
11462
|
+
return {
|
|
11463
|
+
handled: true,
|
|
11464
|
+
text: JSON.stringify({
|
|
11465
|
+
count: 0,
|
|
11466
|
+
schemas: [],
|
|
11467
|
+
tip: "No event schemas registered yet. Applications register schemas via POST /api/schemas or SentinelWebClient.registerSchema()."
|
|
11468
|
+
}, null, 2)
|
|
11469
|
+
};
|
|
11470
|
+
}
|
|
11471
|
+
return {
|
|
11472
|
+
handled: true,
|
|
11473
|
+
text: JSON.stringify({
|
|
11474
|
+
count: schemas.length,
|
|
11475
|
+
schemas: schemas.map((s) => ({
|
|
11476
|
+
id: s.id,
|
|
11477
|
+
version: s.version,
|
|
11478
|
+
name: s.name,
|
|
11479
|
+
description: s.description,
|
|
11480
|
+
eventTypeCount: s.eventTypes.length,
|
|
11481
|
+
scope: s.scope.label,
|
|
11482
|
+
tags: s.tags,
|
|
11483
|
+
registeredAt: s.registeredAt
|
|
11484
|
+
}))
|
|
11485
|
+
}, null, 2)
|
|
11486
|
+
};
|
|
11487
|
+
}
|
|
11488
|
+
case "paradigm_sentinel_events": {
|
|
11489
|
+
const {
|
|
11490
|
+
schemaId: evSchemaId,
|
|
11491
|
+
eventType: evType,
|
|
11492
|
+
category: evCategory,
|
|
11493
|
+
service: evService,
|
|
11494
|
+
scopeValue: evScope,
|
|
11495
|
+
severity: evSeverity,
|
|
11496
|
+
since: evSince,
|
|
11497
|
+
search: evSearch,
|
|
11498
|
+
limit: evLimit
|
|
11499
|
+
} = args;
|
|
11500
|
+
const events = store.queryEvents({
|
|
11501
|
+
schemaId: evSchemaId,
|
|
11502
|
+
eventType: evType,
|
|
11503
|
+
category: evCategory,
|
|
11504
|
+
service: evService,
|
|
11505
|
+
scopeValue: evScope,
|
|
11506
|
+
severity: evSeverity,
|
|
11507
|
+
since: evSince,
|
|
11508
|
+
search: evSearch,
|
|
11509
|
+
limit: Math.min(evLimit || 50, 100)
|
|
11510
|
+
});
|
|
11511
|
+
if (events.length === 0) {
|
|
11512
|
+
return {
|
|
11513
|
+
handled: true,
|
|
11514
|
+
text: JSON.stringify({
|
|
11515
|
+
count: 0,
|
|
11516
|
+
events: [],
|
|
11517
|
+
tip: "No events found. Events are ingested via POST /api/events or SentinelWebClient.emit()."
|
|
11518
|
+
}, null, 2)
|
|
11519
|
+
};
|
|
11520
|
+
}
|
|
11521
|
+
return {
|
|
11522
|
+
handled: true,
|
|
11523
|
+
text: JSON.stringify({
|
|
11524
|
+
count: events.length,
|
|
11525
|
+
events: events.map((e) => ({
|
|
11526
|
+
id: e.id,
|
|
11527
|
+
schemaId: e.schemaId,
|
|
11528
|
+
eventType: e.eventType,
|
|
11529
|
+
category: e.category,
|
|
11530
|
+
timestamp: e.timestamp,
|
|
11531
|
+
scopeValue: e.scopeValue,
|
|
11532
|
+
service: e.service,
|
|
11533
|
+
severity: e.severity,
|
|
11534
|
+
data: e.data,
|
|
11535
|
+
parentEventId: e.parentEventId,
|
|
11536
|
+
depth: e.depth
|
|
11537
|
+
}))
|
|
11538
|
+
}, null, 2)
|
|
11539
|
+
};
|
|
11540
|
+
}
|
|
11541
|
+
case "paradigm_sentinel_scopes": {
|
|
11542
|
+
const { schemaId: scopeSchemaId, sessionId: scopeSession, limit: scopeLimit } = args;
|
|
11543
|
+
const scopes = store.getEventScopes(scopeSchemaId, {
|
|
11544
|
+
limit: Math.min(scopeLimit || 50, 200),
|
|
11545
|
+
sessionId: scopeSession
|
|
11546
|
+
});
|
|
11547
|
+
if (scopes.length === 0) {
|
|
11548
|
+
return {
|
|
11549
|
+
handled: true,
|
|
11550
|
+
text: JSON.stringify({
|
|
11551
|
+
count: 0,
|
|
11552
|
+
scopes: [],
|
|
11553
|
+
tip: `No scopes found for schema "${scopeSchemaId}". Events with scope values are required.`
|
|
11554
|
+
}, null, 2)
|
|
11555
|
+
};
|
|
11556
|
+
}
|
|
11557
|
+
return {
|
|
11558
|
+
handled: true,
|
|
11559
|
+
text: JSON.stringify({
|
|
11560
|
+
count: scopes.length,
|
|
11561
|
+
scopes
|
|
11562
|
+
}, null, 2)
|
|
11563
|
+
};
|
|
11564
|
+
}
|
|
11406
11565
|
default:
|
|
11407
11566
|
return { handled: false, text: "" };
|
|
11408
11567
|
}
|
|
@@ -15434,7 +15593,7 @@ import * as fs26 from "fs";
|
|
|
15434
15593
|
import * as path29 from "path";
|
|
15435
15594
|
import * as yaml15 from "js-yaml";
|
|
15436
15595
|
|
|
15437
|
-
// ../probe/core/dist/generator.js
|
|
15596
|
+
// ../paradigm-mcp/node_modules/.pnpm/@a-company+probe-core@3.5.0/node_modules/@a-company/probe-core/dist/generator.js
|
|
15438
15597
|
var PARADIGM_VERSION = "0.1.0";
|
|
15439
15598
|
var SCHEMA_VERSION2 = "1.0.0";
|
|
15440
15599
|
function generateScanIndex(input, options) {
|
|
@@ -9,7 +9,7 @@ async function sentinelCommand(path, options) {
|
|
|
9
9
|
const shouldOpen = options.open !== false;
|
|
10
10
|
console.log(chalk.cyan("\nStarting Sentinel...\n"));
|
|
11
11
|
try {
|
|
12
|
-
const { startServer } = await import("./server-
|
|
12
|
+
const { startServer } = await import("./server-NN7WDAZJ.js");
|
|
13
13
|
console.log(chalk.gray(`Project: ${projectDir}`));
|
|
14
14
|
console.log(chalk.gray(`Port: ${port}`));
|
|
15
15
|
console.log();
|