prismalens-agents 0.0.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/LICENSE +21 -0
- package/README.md +2 -0
- package/dist/bin/pl.js +20 -0
- package/dist/bin/pl.js.map +1 -0
- package/dist/src/__tests__/smoke.test.js +7 -0
- package/dist/src/__tests__/smoke.test.js.map +1 -0
- package/dist/src/cli/dispatch.js +46 -0
- package/dist/src/cli/dispatch.js.map +1 -0
- package/dist/src/cli/doctor.js +11 -0
- package/dist/src/cli/doctor.js.map +1 -0
- package/dist/src/cli/init.js +11 -0
- package/dist/src/cli/init.js.map +1 -0
- package/dist/src/cli/investigate.js +55 -0
- package/dist/src/cli/investigate.js.map +1 -0
- package/dist/src/cli/report/complete.js +21 -0
- package/dist/src/cli/report/complete.js.map +1 -0
- package/dist/src/cli/report/error.js +12 -0
- package/dist/src/cli/report/error.js.map +1 -0
- package/dist/src/cli/report/finding.js +27 -0
- package/dist/src/cli/report/finding.js.map +1 -0
- package/dist/src/cli/report/status.js +15 -0
- package/dist/src/cli/report/status.js.map +1 -0
- package/dist/src/cli/report.js +17 -0
- package/dist/src/cli/report.js.map +1 -0
- package/dist/src/cli/session/cleanup.js +19 -0
- package/dist/src/cli/session/cleanup.js.map +1 -0
- package/dist/src/cli/session/kill.js +12 -0
- package/dist/src/cli/session/kill.js.map +1 -0
- package/dist/src/cli/session/list.js +14 -0
- package/dist/src/cli/session/list.js.map +1 -0
- package/dist/src/cli/session/show.js +12 -0
- package/dist/src/cli/session/show.js.map +1 -0
- package/dist/src/cli/session.js +17 -0
- package/dist/src/cli/session.js.map +1 -0
- package/dist/src/cli/status.js +11 -0
- package/dist/src/cli/status.js.map +1 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PrismaLens
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/bin/pl.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { defineCommand, runMain } from "citty";
|
|
3
|
+
const main = defineCommand({
|
|
4
|
+
meta: {
|
|
5
|
+
name: "pl",
|
|
6
|
+
version: "0.0.1",
|
|
7
|
+
description: "PrismaLens Investigation Orchestrator",
|
|
8
|
+
},
|
|
9
|
+
subCommands: {
|
|
10
|
+
investigate: () => import("../src/cli/investigate.js").then((m) => m.default),
|
|
11
|
+
report: () => import("../src/cli/report.js").then((m) => m.default),
|
|
12
|
+
dispatch: () => import("../src/cli/dispatch.js").then((m) => m.default),
|
|
13
|
+
session: () => import("../src/cli/session.js").then((m) => m.default),
|
|
14
|
+
init: () => import("../src/cli/init.js").then((m) => m.default),
|
|
15
|
+
doctor: () => import("../src/cli/doctor.js").then((m) => m.default),
|
|
16
|
+
status: () => import("../src/cli/status.js").then((m) => m.default),
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
runMain(main);
|
|
20
|
+
//# sourceMappingURL=pl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pl.js","sourceRoot":"","sources":["../../bin/pl.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE/C,MAAM,IAAI,GAAG,aAAa,CAAC;IAC1B,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,uCAAuC;KACpD;IACD,WAAW,EAAE;QACZ,WAAW,EAAE,GAAG,EAAE,CACjB,MAAM,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAC3D,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QACnE,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QACvE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QACrE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAC/D,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QACnE,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;KACnE;CACD,CAAC,CAAC;AAEH,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smoke.test.js","sourceRoot":"","sources":["../../../src/__tests__/smoke.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACjB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: {
|
|
4
|
+
name: "dispatch",
|
|
5
|
+
description: "Spawn and manage investigation sub-agents",
|
|
6
|
+
},
|
|
7
|
+
args: {
|
|
8
|
+
role: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "Agent role: gatherer, analyst, resolver",
|
|
11
|
+
},
|
|
12
|
+
task: {
|
|
13
|
+
type: "string",
|
|
14
|
+
description: "Task description for the sub-agent",
|
|
15
|
+
},
|
|
16
|
+
timeout: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Agent timeout in seconds (default: 120)",
|
|
19
|
+
},
|
|
20
|
+
"budget-tokens": {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Remaining token budget for this sub-agent",
|
|
23
|
+
},
|
|
24
|
+
agent: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Override agent backend for this sub-agent",
|
|
27
|
+
},
|
|
28
|
+
list: {
|
|
29
|
+
type: "boolean",
|
|
30
|
+
description: "List running sub-agents",
|
|
31
|
+
},
|
|
32
|
+
output: {
|
|
33
|
+
type: "string",
|
|
34
|
+
description: "Read sub-agent output by agent ID",
|
|
35
|
+
},
|
|
36
|
+
kill: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "Kill a sub-agent by agent ID",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
run({ args }) {
|
|
42
|
+
console.log("pl dispatch is not yet implemented");
|
|
43
|
+
console.log("args:", args);
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=dispatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../../../src/cli/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,2CAA2C;KACxD;IACD,IAAI,EAAE;QACL,IAAI,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yCAAyC;SACtD;QACD,IAAI,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oCAAoC;SACjD;QACD,OAAO,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yCAAyC;SACtD;QACD,eAAe,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,2CAA2C;SACxD;QACD,KAAK,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,2CAA2C;SACxD;QACD,IAAI,EAAE;YACL,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yBAAyB;SACtC;QACD,MAAM,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,mCAAmC;SAChD;QACD,IAAI,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,8BAA8B;SAC3C;KACD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: {
|
|
4
|
+
name: "doctor",
|
|
5
|
+
description: "Verify the investigation environment",
|
|
6
|
+
},
|
|
7
|
+
run() {
|
|
8
|
+
console.log("pl doctor is not yet implemented");
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sCAAsC;KACnD;IACD,GAAG;QACF,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IACjD,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: {
|
|
4
|
+
name: "init",
|
|
5
|
+
description: "Interactive setup wizard — generates pl.config.yaml and installs skills",
|
|
6
|
+
},
|
|
7
|
+
run() {
|
|
8
|
+
console.log("pl init is not yet implemented");
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,WAAW,EACV,yEAAyE;KAC1E;IACD,GAAG;QACF,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC/C,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: {
|
|
4
|
+
name: "investigate",
|
|
5
|
+
description: "Run an investigation",
|
|
6
|
+
},
|
|
7
|
+
args: {
|
|
8
|
+
repo: {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "Repository to investigate (org/repo or /local/path)",
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
alert: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "Alert name hint — agent searches all configured sources",
|
|
16
|
+
},
|
|
17
|
+
describe: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Free-text problem description",
|
|
20
|
+
},
|
|
21
|
+
model: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "LLM model override (provider:model)",
|
|
24
|
+
},
|
|
25
|
+
timeout: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Investigation timeout in seconds (default: 600)",
|
|
28
|
+
},
|
|
29
|
+
runtime: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Runtime plugin: process or tmux (default: process)",
|
|
32
|
+
},
|
|
33
|
+
resume: {
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "Resume investigation by session ID",
|
|
36
|
+
},
|
|
37
|
+
output: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: "Write final report to file",
|
|
40
|
+
},
|
|
41
|
+
json: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description: "JSON output to stdout",
|
|
44
|
+
},
|
|
45
|
+
quiet: {
|
|
46
|
+
type: "boolean",
|
|
47
|
+
description: "Suppress progress output",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
run({ args }) {
|
|
51
|
+
console.log("pl investigate is not yet implemented");
|
|
52
|
+
console.log("args:", args);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=investigate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"investigate.js","sourceRoot":"","sources":["../../../src/cli/investigate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,sBAAsB;KACnC;IACD,IAAI,EAAE;QACL,IAAI,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,IAAI;SACd;QACD,KAAK,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yDAAyD;SACtE;QACD,QAAQ,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,+BAA+B;SAC5C;QACD,KAAK,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qCAAqC;SAClD;QACD,OAAO,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,iDAAiD;SAC9D;QACD,OAAO,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oDAAoD;SACjE;QACD,MAAM,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oCAAoC;SACjD;QACD,MAAM,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,4BAA4B;SACzC;QACD,IAAI,EAAE;YACL,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,uBAAuB;SACpC;QACD,KAAK,EAAE;YACN,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,0BAA0B;SACvC;KACD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "complete", description: "Report investigation completion" },
|
|
4
|
+
args: {
|
|
5
|
+
"root-cause": {
|
|
6
|
+
type: "string",
|
|
7
|
+
description: "Identified root cause",
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
confidence: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "Confidence in root cause (0.0-1.0)",
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
run({ args }) {
|
|
17
|
+
console.log("pl report complete is not yet implemented");
|
|
18
|
+
console.log("args:", args);
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=complete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete.js","sourceRoot":"","sources":["../../../../src/cli/report/complete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,iCAAiC,EAAE;IAC1E,IAAI,EAAE;QACL,YAAY,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,IAAI;SACd;QACD,UAAU,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACd;KACD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "error", description: "Report an error or blocker" },
|
|
4
|
+
args: {
|
|
5
|
+
_: { type: "positional", description: "Error message" },
|
|
6
|
+
},
|
|
7
|
+
run({ args }) {
|
|
8
|
+
console.log("pl report error is not yet implemented");
|
|
9
|
+
console.log("args:", args);
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../src/cli/report/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAClE,IAAI,EAAE;QACL,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE;KACvD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "finding", description: "Report a finding" },
|
|
4
|
+
args: {
|
|
5
|
+
type: {
|
|
6
|
+
type: "string",
|
|
7
|
+
description: "Finding type: hypothesis, evidence, observation, recommendation",
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
description: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "What was found",
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
confidence: { type: "string", description: "Confidence level (0.0-1.0)" },
|
|
16
|
+
source: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Data source (e.g., prometheus, github)",
|
|
19
|
+
},
|
|
20
|
+
"related-to": { type: "string", description: "Related finding ID" },
|
|
21
|
+
},
|
|
22
|
+
run({ args }) {
|
|
23
|
+
console.log("pl report finding is not yet implemented");
|
|
24
|
+
console.log("args:", args);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=finding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finding.js","sourceRoot":"","sources":["../../../../src/cli/report/finding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE;IAC1D,IAAI,EAAE;QACL,IAAI,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EACV,iEAAiE;YAClE,QAAQ,EAAE,IAAI;SACd;QACD,WAAW,EAAE;YACZ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gBAAgB;YAC7B,QAAQ,EAAE,IAAI;SACd;QACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;QACzE,MAAM,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,wCAAwC;SACrD;QACD,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;KACnE;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "status", description: "Update investigation status" },
|
|
4
|
+
args: {
|
|
5
|
+
_: {
|
|
6
|
+
type: "positional",
|
|
7
|
+
description: "Status: gathering, analyzing, resolving",
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
run({ args }) {
|
|
11
|
+
console.log("pl report status is not yet implemented");
|
|
12
|
+
console.log("args:", args);
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../src/cli/report/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;IACpE,IAAI,EAAE;QACL,CAAC,EAAE;YACF,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,yCAAyC;SACtD;KACD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: {
|
|
4
|
+
name: "report",
|
|
5
|
+
description: "Report findings, status, completion, or errors (appends to findings.jsonl)",
|
|
6
|
+
},
|
|
7
|
+
subCommands: {
|
|
8
|
+
finding: () => import("./report/finding.js").then((m) => m.default),
|
|
9
|
+
status: () => import("./report/status.js").then((m) => m.default),
|
|
10
|
+
complete: () => import("./report/complete.js").then((m) => m.default),
|
|
11
|
+
error: () => import("./report/error.js").then((m) => m.default),
|
|
12
|
+
},
|
|
13
|
+
run() {
|
|
14
|
+
console.log("Usage: pl report <finding|status|complete|error>");
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/cli/report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,WAAW,EACV,4EAA4E;KAC7E;IACD,WAAW,EAAE;QACZ,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QACnE,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QACjE,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QACrE,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;KAC/D;IACD,GAAG;QACF,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;IACjE,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "cleanup", description: "Cleanup completed/orphaned sessions" },
|
|
4
|
+
args: {
|
|
5
|
+
all: {
|
|
6
|
+
type: "boolean",
|
|
7
|
+
description: "Remove all session records + workspaces",
|
|
8
|
+
},
|
|
9
|
+
"older-than": {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "Remove sessions older than duration (e.g., 24h, 7d)",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
run({ args }) {
|
|
15
|
+
console.log("pl session cleanup is not yet implemented");
|
|
16
|
+
console.log("args:", args);
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=cleanup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../../src/cli/session/cleanup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,qCAAqC,EAAE;IAC7E,IAAI,EAAE;QACL,GAAG,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,yCAAyC;SACtD;QACD,YAAY,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qDAAqD;SAClE;KACD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "kill", description: "Kill a running investigation" },
|
|
4
|
+
args: {
|
|
5
|
+
_: { type: "positional", description: "Session ID" },
|
|
6
|
+
},
|
|
7
|
+
run({ args }) {
|
|
8
|
+
console.log("pl session kill is not yet implemented");
|
|
9
|
+
console.log("args:", args);
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=kill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kill.js","sourceRoot":"","sources":["../../../../src/cli/session/kill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8BAA8B,EAAE;IACnE,IAAI,EAAE;QACL,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE;KACpD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "list", description: "List investigation sessions" },
|
|
4
|
+
args: {
|
|
5
|
+
all: { type: "boolean", description: "Include completed/errored sessions" },
|
|
6
|
+
active: { type: "boolean", description: "Only running investigations" },
|
|
7
|
+
json: { type: "boolean", description: "JSON output" },
|
|
8
|
+
},
|
|
9
|
+
run({ args }) {
|
|
10
|
+
console.log("pl session list is not yet implemented");
|
|
11
|
+
console.log("args:", args);
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/cli/session/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,6BAA6B,EAAE;IAClE,IAAI,EAAE;QACL,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,oCAAoC,EAAE;QAC3E,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;QACvE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE;KACrD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: { name: "show", description: "Show session details" },
|
|
4
|
+
args: {
|
|
5
|
+
_: { type: "positional", description: "Session ID" },
|
|
6
|
+
},
|
|
7
|
+
run({ args }) {
|
|
8
|
+
console.log("pl session show is not yet implemented");
|
|
9
|
+
console.log("args:", args);
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../../../src/cli/session/show.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE;IAC3D,IAAI,EAAE;QACL,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE;KACpD;IACD,GAAG,CAAC,EAAE,IAAI,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: {
|
|
4
|
+
name: "session",
|
|
5
|
+
description: "Manage investigation sessions",
|
|
6
|
+
},
|
|
7
|
+
subCommands: {
|
|
8
|
+
list: () => import("./session/list.js").then((m) => m.default),
|
|
9
|
+
show: () => import("./session/show.js").then((m) => m.default),
|
|
10
|
+
kill: () => import("./session/kill.js").then((m) => m.default),
|
|
11
|
+
cleanup: () => import("./session/cleanup.js").then((m) => m.default),
|
|
12
|
+
},
|
|
13
|
+
run() {
|
|
14
|
+
console.log("Usage: pl session <list|show|kill|cleanup>");
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/cli/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,+BAA+B;KAC5C;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAC9D,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAC9D,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAC9D,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;KACpE;IACD,GAAG;QACF,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;IAC3D,CAAC;CACD,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineCommand } from "citty";
|
|
2
|
+
export default defineCommand({
|
|
3
|
+
meta: {
|
|
4
|
+
name: "status",
|
|
5
|
+
description: "Show investigation budget and progress",
|
|
6
|
+
},
|
|
7
|
+
run() {
|
|
8
|
+
console.log("pl status is not yet implemented");
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/cli/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAe,aAAa,CAAC;IAC5B,IAAI,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,wCAAwC;KACrD;IACD,GAAG;QACF,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;IACjD,CAAC;CACD,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "prismalens-agents",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "AI investigation orchestrator — root cause analysis for production incidents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"pl": "./dist/bin/pl.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"dev": "tsx bin/pl.ts",
|
|
12
|
+
"lint": "biome check .",
|
|
13
|
+
"lint:fix": "biome check --fix .",
|
|
14
|
+
"format": "biome format --write .",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"prepublishOnly": "pnpm build"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=22"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"investigation",
|
|
24
|
+
"incident",
|
|
25
|
+
"root-cause",
|
|
26
|
+
"sre",
|
|
27
|
+
"observability",
|
|
28
|
+
"ai-agent"
|
|
29
|
+
],
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"LICENSE",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/prismalens/prismalens-agents.git"
|
|
39
|
+
},
|
|
40
|
+
"packageManager": "pnpm@10.26.2",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"chokidar": "^5.0.0",
|
|
43
|
+
"citty": "^0.2.1",
|
|
44
|
+
"consola": "^3.4.2",
|
|
45
|
+
"pino": "^10.3.1",
|
|
46
|
+
"tinyexec": "^1.0.4",
|
|
47
|
+
"yaml": "^2.8.2",
|
|
48
|
+
"zod": "^4.3.6"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@biomejs/biome": "^2.4.8",
|
|
52
|
+
"@types/node": "^25.5.0",
|
|
53
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
54
|
+
"pino-pretty": "^13.1.3",
|
|
55
|
+
"tsx": "^4.21.0",
|
|
56
|
+
"typescript": "^5.9.3",
|
|
57
|
+
"vitest": "^4.1.0"
|
|
58
|
+
}
|
|
59
|
+
}
|