prismalens 0.3.0 → 0.4.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/bin/prismalens.js +39 -50
- package/dist/chunk-2Z7QZSIS.js +20 -0
- package/dist/chunk-5BT3XQOG.js +2990 -0
- package/dist/chunk-6N4PHBII.js +30 -0
- package/dist/chunk-CTKCK7QT.js +387 -0
- package/dist/chunk-CVSS5JPC.js +130 -0
- package/dist/chunk-HPE5CTO4.js +22 -0
- package/dist/chunk-PTBCAI34.js +34 -0
- package/dist/chunk-PVQVFRIV.js +452 -0
- package/dist/chunk-QDK5PAI3.js +155 -0
- package/dist/chunk-SSEIMBQ2.js +204 -0
- package/dist/chunk-TGP6QTFO.js +156 -0
- package/dist/chunk-V6M6ISKI.js +161 -0
- package/dist/chunk-XH6DIKTA.js +83 -0
- package/dist/src/cli/auth.js +112 -101
- package/dist/src/cli/doctor.js +184 -187
- package/dist/src/cli/flags.js +6 -32
- package/dist/src/cli/grouping.js +16 -227
- package/dist/src/cli/init.js +54 -48
- package/dist/src/cli/investigate.js +23 -465
- package/dist/src/cli/listen.js +550 -286
- package/dist/src/cli/report.js +70 -67
- package/dist/src/cli/serve.js +260 -30
- package/dist/src/cli/status.js +87 -86
- package/package.json +16 -7
- package/dist/bin/prismalens.d.ts +0 -3
- package/dist/bin/prismalens.d.ts.map +0 -1
- package/dist/bin/prismalens.js.map +0 -1
- package/dist/src/cli/auth.d.ts +0 -3
- package/dist/src/cli/auth.d.ts.map +0 -1
- package/dist/src/cli/auth.js.map +0 -1
- package/dist/src/cli/doctor.d.ts +0 -18
- package/dist/src/cli/doctor.d.ts.map +0 -1
- package/dist/src/cli/doctor.js.map +0 -1
- package/dist/src/cli/flags.d.ts +0 -2
- package/dist/src/cli/flags.d.ts.map +0 -1
- package/dist/src/cli/flags.js.map +0 -1
- package/dist/src/cli/grouping.d.ts +0 -18
- package/dist/src/cli/grouping.d.ts.map +0 -1
- package/dist/src/cli/grouping.js.map +0 -1
- package/dist/src/cli/init.d.ts +0 -3
- package/dist/src/cli/init.d.ts.map +0 -1
- package/dist/src/cli/init.js.map +0 -1
- package/dist/src/cli/investigate.d.ts +0 -115
- package/dist/src/cli/investigate.d.ts.map +0 -1
- package/dist/src/cli/investigate.js.map +0 -1
- package/dist/src/cli/listen.d.ts +0 -56
- package/dist/src/cli/listen.d.ts.map +0 -1
- package/dist/src/cli/listen.js.map +0 -1
- package/dist/src/cli/report.d.ts +0 -24
- package/dist/src/cli/report.d.ts.map +0 -1
- package/dist/src/cli/report.js.map +0 -1
- package/dist/src/cli/serve.d.ts +0 -3
- package/dist/src/cli/serve.d.ts.map +0 -1
- package/dist/src/cli/serve.js.map +0 -1
- package/dist/src/cli/status.d.ts +0 -19
- package/dist/src/cli/status.d.ts.map +0 -1
- package/dist/src/cli/status.js.map +0 -1
- package/dist/src/config/loader.d.ts +0 -22
- package/dist/src/config/loader.d.ts.map +0 -1
- package/dist/src/config/loader.js +0 -195
- package/dist/src/config/loader.js.map +0 -1
- package/dist/src/config/schema.d.ts +0 -465
- package/dist/src/config/schema.d.ts.map +0 -1
- package/dist/src/config/schema.js +0 -219
- package/dist/src/config/schema.js.map +0 -1
- package/dist/src/core/caps.d.ts +0 -36
- package/dist/src/core/caps.d.ts.map +0 -1
- package/dist/src/core/caps.js +0 -36
- package/dist/src/core/caps.js.map +0 -1
- package/dist/src/core/db.d.ts +0 -3
- package/dist/src/core/db.d.ts.map +0 -1
- package/dist/src/core/db.js +0 -105
- package/dist/src/core/db.js.map +0 -1
- package/dist/src/core/detect-repo.d.ts +0 -4
- package/dist/src/core/detect-repo.d.ts.map +0 -1
- package/dist/src/core/detect-repo.js +0 -28
- package/dist/src/core/detect-repo.js.map +0 -1
- package/dist/src/core/file-session-store.d.ts +0 -10
- package/dist/src/core/file-session-store.d.ts.map +0 -1
- package/dist/src/core/file-session-store.js +0 -34
- package/dist/src/core/file-session-store.js.map +0 -1
- package/dist/src/core/parse-stdin.d.ts +0 -2
- package/dist/src/core/parse-stdin.d.ts.map +0 -1
- package/dist/src/core/parse-stdin.js +0 -21
- package/dist/src/core/parse-stdin.js.map +0 -1
- package/dist/src/core/run-investigation.d.ts +0 -54
- package/dist/src/core/run-investigation.d.ts.map +0 -1
- package/dist/src/core/run-investigation.js +0 -202
- package/dist/src/core/run-investigation.js.map +0 -1
- package/dist/src/core/session.d.ts +0 -63
- package/dist/src/core/session.d.ts.map +0 -1
- package/dist/src/core/session.js +0 -45
- package/dist/src/core/session.js.map +0 -1
- package/dist/src/core/slack-notify.d.ts +0 -9
- package/dist/src/core/slack-notify.d.ts.map +0 -1
- package/dist/src/core/slack-notify.js +0 -57
- package/dist/src/core/slack-notify.js.map +0 -1
- package/dist/src/core/sqlite-session-store.d.ts +0 -39
- package/dist/src/core/sqlite-session-store.d.ts.map +0 -1
- package/dist/src/core/sqlite-session-store.js +0 -239
- package/dist/src/core/sqlite-session-store.js.map +0 -1
- package/dist/src/http/server.d.ts +0 -31
- package/dist/src/http/server.d.ts.map +0 -1
- package/dist/src/http/server.js +0 -164
- package/dist/src/http/server.js.map +0 -1
- package/dist/src/jsonrpc/server.d.ts +0 -44
- package/dist/src/jsonrpc/server.d.ts.map +0 -1
- package/dist/src/jsonrpc/server.js +0 -267
- package/dist/src/jsonrpc/server.js.map +0 -1
- package/dist/src/jsonrpc/types.d.ts +0 -12
- package/dist/src/jsonrpc/types.d.ts.map +0 -1
- package/dist/src/jsonrpc/types.js +0 -4
- package/dist/src/jsonrpc/types.js.map +0 -1
- package/dist/src/version.d.ts +0 -8
- package/dist/src/version.d.ts.map +0 -1
- package/dist/src/version.js +0 -27
- package/dist/src/version.js.map +0 -1
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
// Copyright 2026 Sumit Patel
|
|
3
|
-
/**
|
|
4
|
-
* prismalens.config.yaml schema (ADR-0010 engine-as-CLI), adapted from the retired
|
|
5
|
-
* pl orchestrator's config to the two-tier engine (ADR-0008).
|
|
6
|
-
*
|
|
7
|
-
* What changed vs. the old pl config:
|
|
8
|
-
* - `agent.default` enum is the harness BACKEND the supervisor rents
|
|
9
|
-
* ("deepagents" | "claude-code" | "codex"), not the old "deepagents-cli" et al.
|
|
10
|
-
* - `agent.model` is now OPTIONAL — each harness has its own default (deepagents:
|
|
11
|
-
* "openai:gpt-oss:120b"; Claude Code: the CLI/subscription default).
|
|
12
|
-
* - ADDED `telemetry` — the engine's TelemetryEndpoints (read-only surfaces the
|
|
13
|
-
* rented harness queries).
|
|
14
|
-
* - DROPPED the gatherer/analyst/verifier role taxonomy: `harness.roles` +
|
|
15
|
-
* `harness.tool_access`, the `sub_agents` role section, `investigation`, and
|
|
16
|
-
* `convergence.confidence_threshold` (ADR-0002: no numeric confidence). In the
|
|
17
|
-
* two-tier engine decompose is N=1 (one alert → one rented branch → reduce), so
|
|
18
|
-
* the role machinery is gone.
|
|
19
|
-
*/
|
|
20
|
-
import { HARNESS_IDS, PERMISSION_MODES } from "@prismalens/config/harness";
|
|
21
|
-
import { llmProviderIdSchema } from "@prismalens/config/llm";
|
|
22
|
-
import { SANDBOX_MODES } from "@prismalens/engine";
|
|
23
|
-
import { z } from "zod";
|
|
24
|
-
/**
|
|
25
|
-
* The single posture dial (ADR-0017) — prismalens does not build a permission
|
|
26
|
-
* policy engine; it exposes this one dial and translates it to each harness's
|
|
27
|
-
* native config. Defaults to the safest posture, `read-only`.
|
|
28
|
-
*/
|
|
29
|
-
export const PermissionConfigSchema = z.object({
|
|
30
|
-
mode: z.enum(PERMISSION_MODES).default("read-only"),
|
|
31
|
-
});
|
|
32
|
-
/**
|
|
33
|
-
* Arbitrary harness-native passthrough (ADR-0017) — e.g. Agent SDK query options
|
|
34
|
-
* for `claude-code`, or `args` (extra CLI args) for `deepagents`. Kept untyped
|
|
35
|
-
* here (per-harness runners narrow it); prismalens does not validate the shape,
|
|
36
|
-
* it defers to the harness.
|
|
37
|
-
*/
|
|
38
|
-
export const HarnessNativeConfigSchema = z.object({
|
|
39
|
-
native: z.record(z.string(), z.unknown()).optional(),
|
|
40
|
-
});
|
|
41
|
-
/**
|
|
42
|
-
* Best-effort resource caps for the sandboxed harness run (ADR-0020: "resource
|
|
43
|
-
* limits are part of the contract"). All optional with NO defaults — an unset knob
|
|
44
|
-
* means "no cap", never a value that would lie about being enforced. What actually
|
|
45
|
-
* takes effect is provider-dependent (the `process` floor enforces only
|
|
46
|
-
* `wall_clock_ms`; `srt` adds memory/cpu when `systemd-run` is present).
|
|
47
|
-
*/
|
|
48
|
-
export const AgentLimitsConfigSchema = z.object({
|
|
49
|
-
/** Wall-clock deadline (ms) — enforced by every sandbox provider. */
|
|
50
|
-
wall_clock_ms: z.number().int().positive().optional(),
|
|
51
|
-
/** Memory ceiling (MB) — best-effort (srt+systemd-run only). */
|
|
52
|
-
memory_mb: z.number().int().positive().optional(),
|
|
53
|
-
/** CPU quota (whole/fractional cores) — best-effort (srt+systemd-run only). */
|
|
54
|
-
cpu_cores: z.number().positive().optional(),
|
|
55
|
-
});
|
|
56
|
-
/** Tier-2 harness backend the supervisor rents (ADR-0008). */
|
|
57
|
-
export const AgentConfigSchema = z.object({
|
|
58
|
-
default: z.enum(HARNESS_IDS).default("claude-code"),
|
|
59
|
-
/**
|
|
60
|
-
* BARE model id (e.g. "gpt-oss:120b") for the Tier-2 HARNESS ONLY — the chosen
|
|
61
|
-
* harness applies its own provider prefix (ADR-0017: deepagents prepends
|
|
62
|
-
* "openai:"; Claude Code takes it bare). Omit to let the harness pick its own
|
|
63
|
-
* default. The Tier-1 reduce model is a SEPARATE knob — `synth.model` (ADR-0013/
|
|
64
|
-
* 0016): the two calls go to different providers, so one key must never feed both.
|
|
65
|
-
*/
|
|
66
|
-
model: z.string().optional(),
|
|
67
|
-
/** The posture dial (ADR-0017). Defaults to `read-only`. */
|
|
68
|
-
permissions: optionalWithDefaults(PermissionConfigSchema),
|
|
69
|
-
/**
|
|
70
|
-
* The isolation boundary the harness runs in (ADR-0020): `process` (the always-on
|
|
71
|
-
* cooperative floor), `srt` (enforced OS boundary), or `auto` (srt WHEN its egress
|
|
72
|
-
* bridge is healthy — the self-check, B.1.1 — else the floor; the degrade is honest,
|
|
73
|
-
* never silent). Defaults to `auto`: honest precisely BECAUSE of the self-check, which
|
|
74
|
-
* is what makes it safe to prefer the enforced boundary by default.
|
|
75
|
-
*/
|
|
76
|
-
sandbox: z.enum(SANDBOX_MODES).default("auto"),
|
|
77
|
-
/**
|
|
78
|
-
* Best-effort resource caps for the sandboxed harness (ADR-0020). Optional; an
|
|
79
|
-
* omitted section means "no caps" (the object defaults to `{}` after parse).
|
|
80
|
-
*/
|
|
81
|
-
limits: optionalWithDefaults(AgentLimitsConfigSchema),
|
|
82
|
-
/**
|
|
83
|
-
* Per-alert fan-out cap (ADR-0016 decision 2): the max branches the supervisor
|
|
84
|
-
* runs when a context carries multiple alerts. Optional — omitted ⇒ the engine
|
|
85
|
-
* default (3). A single-alert run always uses one branch regardless.
|
|
86
|
-
*/
|
|
87
|
-
max_branches: z.number().int().positive().optional(),
|
|
88
|
-
max_turns: z.number().int().positive().optional(),
|
|
89
|
-
});
|
|
90
|
-
export const WorkspaceConfigSchema = z.object({
|
|
91
|
-
dir: z.string().default("~/.prismalens"),
|
|
92
|
-
});
|
|
93
|
-
/**
|
|
94
|
-
* Run-budget guardrails for `pl listen` (issue #62): non-dollar caps only.
|
|
95
|
-
* `max_concurrent`/`max_per_hour` gate dispatch; `max_turns` is threaded into the
|
|
96
|
-
* default harness as a per-run runaway guard (no default ⇒ the harness's own default).
|
|
97
|
-
*/
|
|
98
|
-
export const ListenCapsConfigSchema = z.object({
|
|
99
|
-
/** Max investigations running at once. Default 2. */
|
|
100
|
-
max_concurrent: z.number().int().positive().default(2),
|
|
101
|
-
/** Max investigations started per trailing hour. Default 10. */
|
|
102
|
-
max_per_hour: z.number().int().positive().default(10),
|
|
103
|
-
/** Per-run turn ceiling for the default harness. Unset ⇒ the harness default. */
|
|
104
|
-
max_turns: z.number().int().positive().optional(),
|
|
105
|
-
});
|
|
106
|
-
/**
|
|
107
|
-
* `pl listen` webhook intake (issue #58, Phase 1 R1). `token` is REQUIRED to
|
|
108
|
-
* start listening but optional here so every other command parses a config
|
|
109
|
-
* without it; set it via env interpolation (`token: "${PRISMALENS_LISTEN_TOKEN}"`)
|
|
110
|
-
* rather than a literal. The grouping_window_ms configures the debounce window.
|
|
111
|
-
*/
|
|
112
|
-
export const ListenConfigSchema = z.object({
|
|
113
|
-
/** Local intake host. Default 127.0.0.1. */
|
|
114
|
-
host: z.string().default("127.0.0.1"),
|
|
115
|
-
/** Local intake port (4181: clear of 9090/9093/3000/8080 defaults). 0 = ephemeral. */
|
|
116
|
-
port: z.number().int().min(0).max(65535).default(4181),
|
|
117
|
-
/** Shared bearer token Alertmanager presents; unset ⇒ `pl listen` refuses to start. */
|
|
118
|
-
token: z.string().optional(),
|
|
119
|
-
/** Max alerts waiting or running at once; default 8. */
|
|
120
|
-
max_pending: z.number().int().positive().default(8),
|
|
121
|
-
/** Grouping window in milliseconds to debounce alerts into one investigation. */
|
|
122
|
-
grouping_window_ms: z.number().int().min(1000).max(120000).default(60000),
|
|
123
|
-
/**
|
|
124
|
-
* Slack incoming-webhook URL for report delivery (issue #61). Optional — unset ⇒
|
|
125
|
-
* delivery disabled. Set via env interpolation (slack_webhook_url:
|
|
126
|
-
* "${PRISMALENS_SLACK_WEBHOOK_URL}") so the secret stays in env (ADR-0006).
|
|
127
|
-
*/
|
|
128
|
-
slack_webhook_url: z.string().url().optional(),
|
|
129
|
-
/** Run-budget guardrails (issue #62). Always present with defaults after parse. */
|
|
130
|
-
caps: optionalWithDefaults(ListenCapsConfigSchema),
|
|
131
|
-
});
|
|
132
|
-
/**
|
|
133
|
-
* Read-only telemetry + app endpoints the harness may query. Keys are snake_case
|
|
134
|
-
* (the config-file convention — every other key in this schema is snake_case); the
|
|
135
|
-
* CLI maps them to the engine's camelCase `TelemetryEndpoints` at the boundary
|
|
136
|
-
* (`run-investigation`). All optional here — resolved/overridden per run.
|
|
137
|
-
*/
|
|
138
|
-
export const TelemetryConfigSchema = z.object({
|
|
139
|
-
prometheus_url: z.string().optional(),
|
|
140
|
-
alertmanager_url: z.string().optional(),
|
|
141
|
-
api_url: z.string().optional(),
|
|
142
|
-
});
|
|
143
|
-
/**
|
|
144
|
-
* A service in the catalog (ADR-0015). The CLI maps the matched entry into the
|
|
145
|
-
* investigation context's `service` field so a single-alert run carries the affected
|
|
146
|
-
* service's repo/tier/deps, not just the bare alert.
|
|
147
|
-
*/
|
|
148
|
-
export const ServiceConfigSchema = z.object({
|
|
149
|
-
tier: z.string().optional(),
|
|
150
|
-
/** owner/name slug or a local path the harness reads. */
|
|
151
|
-
repo: z.string().optional(),
|
|
152
|
-
/** Direct dependency service names (blast-radius seed). */
|
|
153
|
-
depends_on: z.array(z.string()).default([]),
|
|
154
|
-
});
|
|
155
|
-
/** A read-only log-query system the harness may curl (Loki/Elasticsearch/…). */
|
|
156
|
-
export const LogSourceConfigSchema = z.object({
|
|
157
|
-
kind: z.string().optional(),
|
|
158
|
-
url: z.string().optional(),
|
|
159
|
-
});
|
|
160
|
-
/** Free-form `{ source: { key: value } }` connection hints for alert ingestion. */
|
|
161
|
-
export const AlertSourceConfigSchema = z.record(z.string(), z.record(z.string(), z.string()));
|
|
162
|
-
export const RepoConfigSchema = z.object({
|
|
163
|
-
repo: z.string(),
|
|
164
|
-
local_path: z.string().nullable().default(null),
|
|
165
|
-
alert_sources: AlertSourceConfigSchema.optional(),
|
|
166
|
-
});
|
|
167
|
-
/**
|
|
168
|
-
* Make a sub-section optional in YAML but always present (with defaults) after
|
|
169
|
-
* parse. The transform's return is annotated `z.output<T>` so the resolved
|
|
170
|
-
* `PlConfig` keeps each sub-object's precise field types (e.g. `agent.default` is
|
|
171
|
-
* the harness-id union, not `any`) instead of collapsing to `any`.
|
|
172
|
-
*/
|
|
173
|
-
function optionalWithDefaults(schema) {
|
|
174
|
-
return z
|
|
175
|
-
.optional(z.record(z.string(), z.unknown()))
|
|
176
|
-
.transform((val, ctx) => {
|
|
177
|
-
const res = schema.safeParse(val ?? {});
|
|
178
|
-
if (!res.success) {
|
|
179
|
-
for (const issue of res.error.issues) {
|
|
180
|
-
ctx.addIssue(issue);
|
|
181
|
-
}
|
|
182
|
-
return z.NEVER;
|
|
183
|
-
}
|
|
184
|
-
return res.data;
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
export const SynthConfigSchema = z.object({
|
|
188
|
-
provider: llmProviderIdSchema.optional(),
|
|
189
|
-
model: z.string().optional(),
|
|
190
|
-
base_url: z.string().url().optional(),
|
|
191
|
-
});
|
|
192
|
-
export const PlConfigSchema = z.object({
|
|
193
|
-
$schema: z.string().optional(),
|
|
194
|
-
/** Convenience single-repo default (owner/name); `repos` is the multi-repo map. */
|
|
195
|
-
repo: z.string().optional(),
|
|
196
|
-
repos: z
|
|
197
|
-
.record(z.string(), RepoConfigSchema)
|
|
198
|
-
.optional()
|
|
199
|
-
.transform((val) => val ?? {}),
|
|
200
|
-
/** Service catalog (ADR-0015) — keyed by service name; maps into the context. */
|
|
201
|
-
services: z
|
|
202
|
-
.record(z.string(), ServiceConfigSchema)
|
|
203
|
-
.optional()
|
|
204
|
-
.transform((val) => val ?? {}),
|
|
205
|
-
/** Read-only log-query system the harness may query. */
|
|
206
|
-
logs: optionalWithDefaults(LogSourceConfigSchema),
|
|
207
|
-
agent: optionalWithDefaults(AgentConfigSchema),
|
|
208
|
-
synth: optionalWithDefaults(SynthConfigSchema),
|
|
209
|
-
workspace: optionalWithDefaults(WorkspaceConfigSchema),
|
|
210
|
-
listen: optionalWithDefaults(ListenConfigSchema),
|
|
211
|
-
telemetry: optionalWithDefaults(TelemetryConfigSchema),
|
|
212
|
-
alert_sources: AlertSourceConfigSchema.optional().transform((val) => val ?? {}),
|
|
213
|
-
/** Per-harness native passthrough (ADR-0017), keyed by harness id. */
|
|
214
|
-
harnesses: z
|
|
215
|
-
.record(z.string(), HarnessNativeConfigSchema)
|
|
216
|
-
.optional()
|
|
217
|
-
.transform((val) => val ?? {}),
|
|
218
|
-
});
|
|
219
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/config/schema.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,6BAA6B;AAE7B;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;CACnD,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,qEAAqE;IACrE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACrD,gEAAgE;IAChE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,+EAA+E;IAC/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CAAC,MAAM,EAAE,EAAE,mBAAmB,CAAC;SACvC,QAAQ,EAAE;SACV,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC;IAC/B,wDAAwD;IACxD,IAAI,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IACjD,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC;IAC9C,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC;IAC9C,SAAS,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IACtD,MAAM,EAAE,oBAAoB,CAAC,kBAAkB,CAAC;IAChD,SAAS,EAAE,oBAAoB,CAAC,qBAAqB,CAAC;IACtD,aAAa,EAAE,uBAAuB,CAAC,QAAQ,EAAE,CAAC,SAAS,CAC1D,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAClB;IACD,sEAAsE;IACtE,SAAS,EAAE,CAAC;SACV,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,yBAAyB,CAAC;SAC7C,QAAQ,EAAE;SACV,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC;CAC/B,CAAC,CAAC"}
|
package/dist/src/core/caps.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The dispatch-time run-budget gate for `pl listen` (issue #62). Concurrency +
|
|
3
|
-
* per-hour ONLY gate dispatch here; `max_turns` is threaded to the engine harness
|
|
4
|
-
* (not a dispatch decision) and is deliberately absent from {@link DispatchCaps}.
|
|
5
|
-
* Pure and clock-injected: state lives in the closure, the clock is a caller arg, so
|
|
6
|
-
* the per-hour window is deterministically testable with a fake clock.
|
|
7
|
-
*/
|
|
8
|
-
export interface DispatchCaps {
|
|
9
|
-
/** Max investigations running at once. Unset ⇒ concurrency unbounded. */
|
|
10
|
-
maxConcurrent?: number;
|
|
11
|
-
/** Max investigations STARTED in the trailing hour. Unset ⇒ rate unbounded. */
|
|
12
|
-
maxPerHour?: number;
|
|
13
|
-
}
|
|
14
|
-
export type CapReason = "concurrency" | "per_hour";
|
|
15
|
-
export type CapDecision = {
|
|
16
|
-
allow: true;
|
|
17
|
-
} | {
|
|
18
|
-
allow: false;
|
|
19
|
-
reason: CapReason;
|
|
20
|
-
};
|
|
21
|
-
export interface CapsGate {
|
|
22
|
-
/**
|
|
23
|
-
* Evaluate the caps and, on allow, ATOMICALLY record the start (active++ and push
|
|
24
|
-
* `nowMs` into the hourly window). The caller MUST invoke this with NO `await`
|
|
25
|
-
* between reading the caps and this call — the single-threaded event loop then
|
|
26
|
-
* makes check-and-commit atomic, so two window timers cannot both pass a
|
|
27
|
-
* concurrency=1 gate (the dispatch race the scout flagged).
|
|
28
|
-
*/
|
|
29
|
-
tryDispatch(caps: DispatchCaps, nowMs: number): CapDecision;
|
|
30
|
-
/** Release one active slot when a dispatched run finishes. Call exactly once per `allow`. */
|
|
31
|
-
release(): void;
|
|
32
|
-
/** Live active count (inspection/tests). */
|
|
33
|
-
readonly activeCount: number;
|
|
34
|
-
}
|
|
35
|
-
export declare function createCapsGate(): CapsGate;
|
|
36
|
-
//# sourceMappingURL=caps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"caps.d.ts","sourceRoot":"","sources":["../../../src/core/caps.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC5B,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAEhF,MAAM,WAAW,QAAQ;IACxB;;;;;;OAMG;IACH,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5D,6FAA6F;IAC7F,OAAO,IAAI,IAAI,CAAC;IAChB,4CAA4C;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC7B;AAID,wBAAgB,cAAc,IAAI,QAAQ,CA+BzC"}
|
package/dist/src/core/caps.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
// Copyright 2026 Sumit Patel
|
|
3
|
-
const HOUR_MS = 3_600_000;
|
|
4
|
-
export function createCapsGate() {
|
|
5
|
-
let active = 0;
|
|
6
|
-
// Rolling window of dispatched-run START times (ms). Per-hour is a rate on
|
|
7
|
-
// STARTS, so entries are pruned by age, never by release.
|
|
8
|
-
const startsMs = [];
|
|
9
|
-
return {
|
|
10
|
-
get activeCount() {
|
|
11
|
-
return active;
|
|
12
|
-
},
|
|
13
|
-
tryDispatch(caps, nowMs) {
|
|
14
|
-
// Concurrency FIRST (cheapest, trips most often), then per-hour. The FIRST
|
|
15
|
-
// cap that trips is the recorded reason.
|
|
16
|
-
if (caps.maxConcurrent !== undefined && active >= caps.maxConcurrent) {
|
|
17
|
-
return { allow: false, reason: "concurrency" };
|
|
18
|
-
}
|
|
19
|
-
const cutoff = nowMs - HOUR_MS;
|
|
20
|
-
while (startsMs.length > 0 && startsMs[0] <= cutoff) {
|
|
21
|
-
startsMs.shift();
|
|
22
|
-
}
|
|
23
|
-
if (caps.maxPerHour !== undefined && startsMs.length >= caps.maxPerHour) {
|
|
24
|
-
return { allow: false, reason: "per_hour" };
|
|
25
|
-
}
|
|
26
|
-
active++;
|
|
27
|
-
startsMs.push(nowMs);
|
|
28
|
-
return { allow: true };
|
|
29
|
-
},
|
|
30
|
-
release() {
|
|
31
|
-
if (active > 0)
|
|
32
|
-
active--;
|
|
33
|
-
},
|
|
34
|
-
};
|
|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1B,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/dist/src/core/db.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../src/core/db.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAyEpE,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAmC9D"}
|
package/dist/src/core/db.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
// Copyright 2026 Sumit Patel
|
|
3
|
-
import { existsSync, mkdirSync, renameSync } from "node:fs";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
let DatabaseSync;
|
|
6
|
-
try {
|
|
7
|
-
const mod = await import("node:sqlite");
|
|
8
|
-
DatabaseSync = mod.DatabaseSync;
|
|
9
|
-
}
|
|
10
|
-
catch {
|
|
11
|
-
console.error("PrismaLens requires Node >= 22.13.");
|
|
12
|
-
process.exit(1);
|
|
13
|
-
}
|
|
14
|
-
const SCHEMA = `
|
|
15
|
-
PRAGMA journal_mode = WAL;
|
|
16
|
-
PRAGMA busy_timeout = 5000;
|
|
17
|
-
PRAGMA foreign_keys = ON;
|
|
18
|
-
|
|
19
|
-
CREATE TABLE IF NOT EXISTS groups (
|
|
20
|
-
id TEXT PRIMARY KEY,
|
|
21
|
-
group_key TEXT,
|
|
22
|
-
formed_by TEXT NOT NULL DEFAULT 'window',
|
|
23
|
-
created_at TEXT NOT NULL
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
CREATE TABLE IF NOT EXISTS runs (
|
|
27
|
-
run_id TEXT PRIMARY KEY,
|
|
28
|
-
group_id TEXT REFERENCES groups(id),
|
|
29
|
-
status TEXT NOT NULL CHECK (status IN ('running','done','errored','suppressed')),
|
|
30
|
-
alertname TEXT,
|
|
31
|
-
agent TEXT,
|
|
32
|
-
repo TEXT,
|
|
33
|
-
workspace_path TEXT NOT NULL,
|
|
34
|
-
error TEXT,
|
|
35
|
-
suppression_reason TEXT,
|
|
36
|
-
created_at TEXT NOT NULL,
|
|
37
|
-
updated_at TEXT NOT NULL,
|
|
38
|
-
completed_at TEXT
|
|
39
|
-
);
|
|
40
|
-
CREATE INDEX IF NOT EXISTS idx_runs_created_at ON runs(created_at DESC);
|
|
41
|
-
CREATE INDEX IF NOT EXISTS idx_runs_status ON runs(status);
|
|
42
|
-
|
|
43
|
-
CREATE TABLE IF NOT EXISTS events (
|
|
44
|
-
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
45
|
-
run_id TEXT NOT NULL REFERENCES runs(run_id),
|
|
46
|
-
payload TEXT NOT NULL
|
|
47
|
-
);
|
|
48
|
-
CREATE INDEX IF NOT EXISTS idx_events_run ON events(run_id, id);
|
|
49
|
-
|
|
50
|
-
CREATE TABLE IF NOT EXISTS reports (
|
|
51
|
-
run_id TEXT PRIMARY KEY REFERENCES runs(run_id),
|
|
52
|
-
payload TEXT NOT NULL
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
-- One row per alert attached to a group, in insertion order (rowid).
|
|
56
|
-
-- late = 0 for the alerts that formed the window, 1 for alerts that
|
|
57
|
-
-- attached while the group's run was already in flight.
|
|
58
|
-
CREATE TABLE IF NOT EXISTS group_alerts (
|
|
59
|
-
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
60
|
-
group_id TEXT NOT NULL REFERENCES groups(id),
|
|
61
|
-
late INTEGER NOT NULL,
|
|
62
|
-
payload TEXT NOT NULL
|
|
63
|
-
);
|
|
64
|
-
CREATE INDEX IF NOT EXISTS idx_group_alerts ON group_alerts(group_id, id);
|
|
65
|
-
`;
|
|
66
|
-
const SCHEMA_CHECK = `
|
|
67
|
-
SELECT id, group_key, formed_by, created_at FROM groups LIMIT 1;
|
|
68
|
-
SELECT run_id, group_id, status, alertname, agent, repo, workspace_path, error, suppression_reason, created_at, updated_at, completed_at FROM runs LIMIT 1;
|
|
69
|
-
SELECT id, run_id, payload FROM events LIMIT 1;
|
|
70
|
-
SELECT run_id, payload FROM reports LIMIT 1;
|
|
71
|
-
SELECT id, group_id, late, payload FROM group_alerts LIMIT 1;
|
|
72
|
-
`;
|
|
73
|
-
export function openDatabase(baseDir) {
|
|
74
|
-
mkdirSync(baseDir, { recursive: true });
|
|
75
|
-
const dbPath = join(baseDir, "prismalens.db");
|
|
76
|
-
let db = new DatabaseSync(dbPath);
|
|
77
|
-
try {
|
|
78
|
-
db.exec(SCHEMA);
|
|
79
|
-
db.exec(SCHEMA_CHECK);
|
|
80
|
-
}
|
|
81
|
-
catch (err) {
|
|
82
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
83
|
-
if (!/no such column|no such table|has no column named/i.test(msg)) {
|
|
84
|
-
try {
|
|
85
|
-
db.close();
|
|
86
|
-
}
|
|
87
|
-
catch { }
|
|
88
|
-
throw err;
|
|
89
|
-
}
|
|
90
|
-
// Schema mismatch or corruption detected.
|
|
91
|
-
const backupPath = join(baseDir, `prismalens.db.bak-${Date.now()}`);
|
|
92
|
-
if (existsSync(`${dbPath}-wal`))
|
|
93
|
-
renameSync(`${dbPath}-wal`, `${backupPath}-wal`);
|
|
94
|
-
if (existsSync(`${dbPath}-shm`))
|
|
95
|
-
renameSync(`${dbPath}-shm`, `${backupPath}-shm`);
|
|
96
|
-
db.close();
|
|
97
|
-
renameSync(dbPath, backupPath);
|
|
98
|
-
console.warn(`[!] Workspace schema is incompatible. Backed up old database to ${backupPath} and recreated.`);
|
|
99
|
-
// Recreate a fresh database.
|
|
100
|
-
db = new DatabaseSync(dbPath);
|
|
101
|
-
db.exec(SCHEMA);
|
|
102
|
-
}
|
|
103
|
-
return db;
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=db.js.map
|
package/dist/src/core/db.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","s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CAAC,KAAK,EAAE,CAAC;YACZ,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;YACV,MAAM,GAAG,CAAC;QACX,CAAC;QAED,0CAA0C;QAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,qBAAqB,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpE,IAAI,UAAU,CAAC,GAAG,MAAM,MAAM,CAAC;YAC9B,UAAU,CAAC,GAAG,MAAM,MAAM,EAAE,GAAG,UAAU,MAAM,CAAC,CAAC;QAClD,IAAI,UAAU,CAAC,GAAG,MAAM,MAAM,CAAC;YAC9B,UAAU,CAAC,GAAG,MAAM,MAAM,EAAE,GAAG,UAAU,MAAM,CAAC,CAAC;QAClD,EAAE,CAAC,KAAK,EAAE,CAAC;QACX,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAC/B,OAAO,CAAC,IAAI,CACX,mEAAmE,UAAU,iBAAiB,CAC9F,CAAC;QAEF,6BAA6B;QAC7B,EAAE,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9B,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** Session repo label: an explicit config `repo` (owner/name) wins; else git
|
|
2
|
-
* auto-detect from cwd; else none. */
|
|
3
|
-
export declare function resolveRepoSlug(configRepo: string | undefined, cwd?: string): Promise<string | undefined>;
|
|
4
|
-
//# sourceMappingURL=detect-repo.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detect-repo.d.ts","sourceRoot":"","sources":["../../../src/core/detect-repo.ts"],"names":[],"mappings":"AA+BA;sCACsC;AACtC,wBAAsB,eAAe,CACpC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,GAAG,GAAE,MAAsB,GACzB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAE7B"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
// Copyright 2026 Sumit Patel
|
|
3
|
-
/**
|
|
4
|
-
* Resolve the repository label under investigation. Precedence: an explicit
|
|
5
|
-
* config `repo` value (owner/name) wins; else git origin auto-detect from the
|
|
6
|
-
* working directory; else `undefined`.
|
|
7
|
-
*
|
|
8
|
-
* Uses node:child_process directly (no tinyexec dependency).
|
|
9
|
-
*/
|
|
10
|
-
import { execFile } from "node:child_process";
|
|
11
|
-
import { promisify } from "node:util";
|
|
12
|
-
const execFileAsync = promisify(execFile);
|
|
13
|
-
const REPO_PATTERN = /(?:github\.com|gitlab\.com|bitbucket\.org)[/:](.+?)(?:\.git)?$/;
|
|
14
|
-
async function detectRepo(cwd) {
|
|
15
|
-
try {
|
|
16
|
-
const { stdout } = await execFileAsync("git", ["remote", "get-url", "origin"], { cwd });
|
|
17
|
-
return stdout.trim().match(REPO_PATTERN)?.[1];
|
|
18
|
-
}
|
|
19
|
-
catch {
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/** Session repo label: an explicit config `repo` (owner/name) wins; else git
|
|
24
|
-
* auto-detect from cwd; else none. */
|
|
25
|
-
export async function resolveRepoSlug(configRepo, cwd = process.cwd()) {
|
|
26
|
-
return configRepo ?? (await detectRepo(cwd));
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=detect-repo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detect-repo.js","sourceRoot":"","sources":["../../../src/core/detect-repo.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,6BAA6B;AAE7B;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,MAAM,YAAY,GACjB,gEAAgE,CAAC;AAElE,KAAK,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC;QACJ,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,aAAa,CACrC,KAAK,EACL,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,EAC/B,EAAE,GAAG,EAAE,CACP,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,SAAS,CAAC;IAClB,CAAC;AACF,CAAC;AAED;sCACsC;AACtC,MAAM,CAAC,KAAK,UAAU,eAAe,CACpC,UAA8B,EAC9B,MAAc,OAAO,CAAC,GAAG,EAAE;IAE3B,OAAO,UAAU,IAAI,CAAC,MAAM,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { InvestigationStore } from "@prismalens/engine";
|
|
2
|
-
import type { CreateSessionInput, SessionManager } from "./session.js";
|
|
3
|
-
export interface FileSessionStore {
|
|
4
|
-
store: InvestigationStore;
|
|
5
|
-
/** The created session's workspace dir. Throws if read before `create()` resolves. */
|
|
6
|
-
workspacePath(): string;
|
|
7
|
-
}
|
|
8
|
-
/** Build a `conductRun`-ready store over `sessions`, scoped to one run's `meta`. */
|
|
9
|
-
export declare function createFileSessionStore(sessions: SessionManager, meta: CreateSessionInput): FileSessionStore;
|
|
10
|
-
//# sourceMappingURL=file-session-store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-session-store.d.ts","sourceRoot":"","sources":["../../../src/core/file-session-store.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EACX,kBAAkB,EAClB,cAAc,EAEd,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,sFAAsF;IACtF,aAAa,IAAI,MAAM,CAAC;CACxB;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,kBAAkB,GACtB,gBAAgB,CAiClB"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
// Copyright 2026 Sumit Patel
|
|
3
|
-
/** Build a `conductRun`-ready store over `sessions`, scoped to one run's `meta`. */
|
|
4
|
-
export function createFileSessionStore(sessions, meta) {
|
|
5
|
-
let session;
|
|
6
|
-
const store = {
|
|
7
|
-
async create() {
|
|
8
|
-
session = await sessions.create(meta);
|
|
9
|
-
},
|
|
10
|
-
async append(event) {
|
|
11
|
-
await sessions.appendEvent(meta.runId, event);
|
|
12
|
-
},
|
|
13
|
-
async finish(report) {
|
|
14
|
-
await sessions.writeReport(meta.runId, report);
|
|
15
|
-
await sessions.update(meta.runId, {
|
|
16
|
-
status: "done",
|
|
17
|
-
completedAt: new Date().toISOString(),
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
async fail(error) {
|
|
21
|
-
await sessions.update(meta.runId, { status: "errored", error });
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
return {
|
|
25
|
-
store,
|
|
26
|
-
workspacePath() {
|
|
27
|
-
if (!session) {
|
|
28
|
-
throw new Error("workspacePath() called before store.create() resolved");
|
|
29
|
-
}
|
|
30
|
-
return session.workspacePath;
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=file-session-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-session-store.js","sourceRoot":"","sources":["../../../src/core/file-session-store.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,6BAA6B;AA4B7B,oFAAoF;A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0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
// Copyright 2026 Sumit Patel
|
|
3
|
-
export async function parseStdin() {
|
|
4
|
-
if (process.stdin.isTTY)
|
|
5
|
-
return undefined;
|
|
6
|
-
const chunks = [];
|
|
7
|
-
for await (const chunk of process.stdin) {
|
|
8
|
-
chunks.push(chunk);
|
|
9
|
-
}
|
|
10
|
-
const raw = Buffer.concat(chunks).toString("utf-8").trim();
|
|
11
|
-
if (!raw)
|
|
12
|
-
return undefined;
|
|
13
|
-
try {
|
|
14
|
-
return JSON.parse(raw);
|
|
15
|
-
}
|
|
16
|
-
catch (err) {
|
|
17
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
18
|
-
throw new Error(`invalid FiringAlert JSON on stdin: ${msg}`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=parse-stdin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse-stdin.js","sourceRoot":"","sources":["../../../src/core/parse-stdin.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,6BAA6B;AAE7B,MAAM,CAAC,KAAK,UAAU,UAAU;IAG/B,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAE1C,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAE3B,IAAI,CAAC;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B,CAAC;IACnD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,MAAM,IAAI,KAAK,CAAC,sCAAsC,GAAG,EAAE,CAAC,CAAC;IAC9D,CAAC;AACF,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type ResolvedInvestigation, type Sandbox } from "@prismalens/engine";
|
|
2
|
-
import type { PlConfig } from "../config/schema.js";
|
|
3
|
-
export type { ResolvedInvestigation };
|
|
4
|
-
export interface ResolveInvestigationArgs {
|
|
5
|
-
/** Raw alert payload (piped JSON / RPC param) coerced into a FiringAlert. */
|
|
6
|
-
alert?: Record<string, unknown>;
|
|
7
|
-
/** Multiple raw alerts (storm grouping). When present, supersedes `alert`. */
|
|
8
|
-
alerts?: Record<string, unknown>[];
|
|
9
|
-
/** Free-text fallback → a synthesized alert when no alert payload is supplied. */
|
|
10
|
-
query?: string;
|
|
11
|
-
/** Repository the harness investigates (its cwd). Defaults to `process.cwd()`. */
|
|
12
|
-
repo?: string;
|
|
13
|
-
/** Harness backend override; else `config.agent.default`. */
|
|
14
|
-
harness?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Service name to select from `config.services` — overrides the alert's own
|
|
17
|
-
* service label. Covers `--query` runs that carry no labels (ADR-0015 §4).
|
|
18
|
-
*/
|
|
19
|
-
service?: string;
|
|
20
|
-
/** The posture dial override (ADR-0017); else `config.agent.permissions.mode`. */
|
|
21
|
-
permissionMode?: string;
|
|
22
|
-
/**
|
|
23
|
-
* The resolved isolation boundary (ADR-0020), CALLER-OWNED — the command resolves
|
|
24
|
-
* it from `--sandbox`/`agent.sandbox` (`resolveSandbox`) and destroys it after the
|
|
25
|
-
* run. Forwarded to the engine so the harness spawns into it.
|
|
26
|
-
*/
|
|
27
|
-
sandbox?: Sandbox;
|
|
28
|
-
/**
|
|
29
|
-
* What the CLI asked for (ADR-0020 honest fidelity, structured
|
|
30
|
-
* `fidelity.sandbox` field) — `selection.requested` from `resolveSandbox`,
|
|
31
|
-
* threaded alongside the resolved `sandbox` so a degrade (e.g. `auto` ->
|
|
32
|
-
* `process-floor`) is reported honestly in the run-metadata, not just the
|
|
33
|
-
* console warning.
|
|
34
|
-
*/
|
|
35
|
-
requestedSandbox?: string;
|
|
36
|
-
/** Per-run turn ceiling for the default harness (issue #62). Forwarded to the engine. */
|
|
37
|
-
maxTurns?: number;
|
|
38
|
-
/** If true, stops host settings/hooks/plugins/MCP servers from leaking into the rented harness. */
|
|
39
|
-
isolateSettings?: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Resolve a seed alert + merged `pl.config.yaml` into the inputs
|
|
43
|
-
* `investigateIncidentStream` wants: applies the shared host-local fallbacks, reads
|
|
44
|
-
* the BYO-key secrets from env, and delegates the actual build to the engine
|
|
45
|
-
* resolver. Throws (via the engine) on a hard input error.
|
|
46
|
-
*/
|
|
47
|
-
export declare function isSynthConfigured(config: PlConfig): boolean;
|
|
48
|
-
export declare function resolveInvestigation(args: ResolveInvestigationArgs, config: PlConfig): ResolvedInvestigation;
|
|
49
|
-
/**
|
|
50
|
-
* The alert's service identity label — `service`, else `namespace`, else `job`.
|
|
51
|
-
* Exported for the `listen` path's per-payload repo resolution (issue #58 AC5).
|
|
52
|
-
*/
|
|
53
|
-
export declare function pickServiceLabel(alert: Record<string, unknown> | undefined): string | undefined;
|
|
54
|
-
//# sourceMappingURL=run-investigation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run-investigation.d.ts","sourceRoot":"","sources":["../../../src/core/run-investigation.ts"],"names":[],"mappings":"AAyBA,OAAO,EAIN,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,YA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