@debugbundle/cli 1.6.2 → 1.6.4
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/main.cjs +110 -21
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -15977,9 +15977,12 @@ function buildSkill() {
|
|
|
15977
15977
|
"description: >-",
|
|
15978
15978
|
" Investigate runtime incidents, inspect debug bundles, generate reproductions,",
|
|
15979
15979
|
" run improvement analysis, and inspect operational controls using the DebugBundle",
|
|
15980
|
-
" CLI and local project scaffold. Use when
|
|
15981
|
-
"
|
|
15982
|
-
"
|
|
15980
|
+
" CLI and local project scaffold. Use when runtime errors/failures or captured",
|
|
15981
|
+
" operational evidence are relevant: production/customer-facing incidents,",
|
|
15982
|
+
" endpoint downtime, health-check failures, notification or webhook failures,",
|
|
15983
|
+
" probes, noisy captured incidents, or explicit DebugBundle artifact requests. Do not use for",
|
|
15984
|
+
" deterministic local source, UI, layout, copy, calculation, refactor, or",
|
|
15985
|
+
" test-only issues unless runtime evidence is needed.",
|
|
15983
15986
|
"metadata:",
|
|
15984
15987
|
" author: debugbundle",
|
|
15985
15988
|
' version: "1.0"',
|
|
@@ -15987,11 +15990,22 @@ function buildSkill() {
|
|
|
15987
15990
|
"",
|
|
15988
15991
|
"# DebugBundle",
|
|
15989
15992
|
"",
|
|
15990
|
-
"Use DebugBundle
|
|
15993
|
+
"Use DebugBundle when runtime evidence is relevant to the task.",
|
|
15994
|
+
"",
|
|
15995
|
+
"## When To Use DebugBundle",
|
|
15996
|
+
"",
|
|
15997
|
+
"Use the incident/artifact workflow when the user reports:",
|
|
15998
|
+
"",
|
|
15999
|
+
"- production or customer-facing incidents, runtime failures, regressions, broken deploys, or unknown errors likely to have generated captured events",
|
|
16000
|
+
"- endpoint downtime or a failing hosted health check",
|
|
16001
|
+
"- missing, duplicate, or failed alerts, webhooks, GitHub dispatches, probes, or other operational delivery",
|
|
16002
|
+
"- a specific DebugBundle incident id, bundle, reproduction, report, or noisy captured incident",
|
|
16003
|
+
"",
|
|
16004
|
+
"For deterministic local source-code, UI, layout, copy, calculation, refactor, or test-only issues, inspect source and tests first. Do not check DebugBundle incidents unless the user asks, the issue involves live runtime behavior, or captured evidence is needed.",
|
|
15991
16005
|
"",
|
|
15992
16006
|
"## Investigation Quickstart",
|
|
15993
16007
|
"",
|
|
15994
|
-
"When the
|
|
16008
|
+
"When the issue matches the runtime/incident criteria above, start here before reading arbitrary source files.",
|
|
15995
16009
|
"",
|
|
15996
16010
|
"1. Run `debugbundle doctor --json` to learn whether the project is local-only or connected and whether the local scaffold is healthy.",
|
|
15997
16011
|
"2. If `debugbundle doctor --json` reports `mode=local-only`, start with `debugbundle incidents --source local --status active --json`.",
|
|
@@ -16011,7 +16025,7 @@ function buildSkill() {
|
|
|
16011
16025
|
"",
|
|
16012
16026
|
"## Core Workflow",
|
|
16013
16027
|
"",
|
|
16014
|
-
"1.
|
|
16028
|
+
"1. For qualifying runtime/incident work, check DebugBundle incidents first to avoid re-investigating a known failure.",
|
|
16015
16029
|
"2. Inspect the incident bundle and reproduction artifact before proposing a fix.",
|
|
16016
16030
|
"3. Run `debugbundle analyze --type improvement --local` after local processing when you need a deterministic change plan.",
|
|
16017
16031
|
"4. Apply the narrowest fix, then validate it with the repository test workflow from `.debugbundle/profile.json`.",
|
|
@@ -16238,7 +16252,7 @@ function buildMcpReference() {
|
|
|
16238
16252
|
return [
|
|
16239
16253
|
"# DebugBundle MCP Reference",
|
|
16240
16254
|
"",
|
|
16241
|
-
"Use the same
|
|
16255
|
+
"Use the same runtime-evidence-gated workflow through MCP when an agent is operating in connected mode.",
|
|
16242
16256
|
"",
|
|
16243
16257
|
"## Investigation Tools",
|
|
16244
16258
|
"",
|
|
@@ -16252,8 +16266,9 @@ function buildMcpReference() {
|
|
|
16252
16266
|
"- `analyze` \u2014 run local agent-oriented analysis from local bundles and skill schemas.",
|
|
16253
16267
|
"",
|
|
16254
16268
|
"- Prefer bundle retrieval tools before reading raw repository files.",
|
|
16255
|
-
"- Use MCP bundle access when the current issue originated in production.",
|
|
16256
|
-
"-
|
|
16269
|
+
"- Use MCP bundle access when the current issue originated in production or otherwise needs captured runtime evidence.",
|
|
16270
|
+
"- For deterministic local source, UI, layout, copy, calculation, refactor, or test-only issues, inspect source and tests first unless the user asks for DebugBundle evidence.",
|
|
16271
|
+
"- Resolve fixed or intentionally generated incidents with `resolve_incident` or `resolve_incidents` so active incidents stay actionable.",
|
|
16257
16272
|
"- Fall back to local CLI processing when the project is local-only.",
|
|
16258
16273
|
"",
|
|
16259
16274
|
"## Noise and Capture Policy Tools",
|
|
@@ -16406,13 +16421,21 @@ function buildSkillEvals() {
|
|
|
16406
16421
|
skill: "debugbundle",
|
|
16407
16422
|
evaluations: [
|
|
16408
16423
|
{
|
|
16409
|
-
name: "
|
|
16424
|
+
name: "runtime_incident_workflow",
|
|
16410
16425
|
prompt: "The user reports a production checkout failure. Confirm the skill tells the agent to inspect DebugBundle artifacts first.",
|
|
16411
16426
|
expected_behavior: [
|
|
16412
|
-
"Check incidents before reading arbitrary source files.",
|
|
16427
|
+
"Check incidents before reading arbitrary source files for qualifying runtime or production incidents.",
|
|
16413
16428
|
"Read the skill workflow before proposing a fix."
|
|
16414
16429
|
]
|
|
16415
16430
|
},
|
|
16431
|
+
{
|
|
16432
|
+
name: "local_source_issue_gate",
|
|
16433
|
+
prompt: "The user reports a deterministic UI calculation glitch in local code with no runtime incident or report. Confirm the skill avoids checking DebugBundle incidents by default.",
|
|
16434
|
+
expected_behavior: [
|
|
16435
|
+
"Inspect source and tests first for deterministic local UI, layout, copy, calculation, refactor, or test-only issues.",
|
|
16436
|
+
"Do not check DebugBundle incidents unless the user asks, live runtime behavior is involved, or captured evidence is needed."
|
|
16437
|
+
]
|
|
16438
|
+
},
|
|
16416
16439
|
{
|
|
16417
16440
|
name: "profile_validation_task",
|
|
16418
16441
|
prompt: "The generated profile is shallow. Confirm the skill teaches the agent how to validate and enrich it.",
|
|
@@ -19352,11 +19375,19 @@ var STORAGE_BOOTSTRAP_STATEMENTS = [
|
|
|
19352
19375
|
channel text NOT NULL,
|
|
19353
19376
|
condition_type text NOT NULL,
|
|
19354
19377
|
severity_min text,
|
|
19378
|
+
severity_lifecycle_scope text,
|
|
19355
19379
|
cooldown_seconds integer NOT NULL DEFAULT 0,
|
|
19356
19380
|
config jsonb NOT NULL DEFAULT '{}'::jsonb,
|
|
19357
19381
|
is_enabled boolean NOT NULL DEFAULT true,
|
|
19358
19382
|
created_at timestamptz NOT NULL DEFAULT now(),
|
|
19359
|
-
updated_at timestamptz NOT NULL DEFAULT now()
|
|
19383
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
19384
|
+
CONSTRAINT alert_rules_severity_lifecycle_scope_check CHECK (
|
|
19385
|
+
severity_lifecycle_scope IS NULL
|
|
19386
|
+
OR (
|
|
19387
|
+
condition_type = 'severity_threshold'
|
|
19388
|
+
AND severity_lifecycle_scope IN ('new_incident', 'incident_regressed', 'both')
|
|
19389
|
+
)
|
|
19390
|
+
)
|
|
19360
19391
|
)
|
|
19361
19392
|
`,
|
|
19362
19393
|
`
|
|
@@ -20911,6 +20942,36 @@ var STORAGE_SCHEMA_MIGRATIONS = [
|
|
|
20911
20942
|
)
|
|
20912
20943
|
`
|
|
20913
20944
|
]
|
|
20945
|
+
}),
|
|
20946
|
+
defineStorageSchemaMigration({
|
|
20947
|
+
id: "202606260001_add_alert_severity_lifecycle_scope",
|
|
20948
|
+
description: "Add lifecycle scope for severity-threshold alert rules so new incidents and regressions can notify independently.",
|
|
20949
|
+
statements: [
|
|
20950
|
+
"ALTER TABLE alert_rules ADD COLUMN IF NOT EXISTS severity_lifecycle_scope text",
|
|
20951
|
+
`
|
|
20952
|
+
UPDATE alert_rules
|
|
20953
|
+
SET severity_lifecycle_scope = 'both'
|
|
20954
|
+
WHERE condition_type = 'severity_threshold'
|
|
20955
|
+
AND severity_lifecycle_scope IS NULL
|
|
20956
|
+
`,
|
|
20957
|
+
`
|
|
20958
|
+
UPDATE alert_rules
|
|
20959
|
+
SET severity_lifecycle_scope = NULL
|
|
20960
|
+
WHERE condition_type <> 'severity_threshold'
|
|
20961
|
+
AND severity_lifecycle_scope IS NOT NULL
|
|
20962
|
+
`,
|
|
20963
|
+
"ALTER TABLE alert_rules DROP CONSTRAINT IF EXISTS alert_rules_severity_lifecycle_scope_check",
|
|
20964
|
+
`
|
|
20965
|
+
ALTER TABLE alert_rules
|
|
20966
|
+
ADD CONSTRAINT alert_rules_severity_lifecycle_scope_check CHECK (
|
|
20967
|
+
severity_lifecycle_scope IS NULL
|
|
20968
|
+
OR (
|
|
20969
|
+
condition_type = 'severity_threshold'
|
|
20970
|
+
AND severity_lifecycle_scope IN ('new_incident', 'incident_regressed', 'both')
|
|
20971
|
+
)
|
|
20972
|
+
)
|
|
20973
|
+
`
|
|
20974
|
+
]
|
|
20914
20975
|
})
|
|
20915
20976
|
];
|
|
20916
20977
|
|
|
@@ -22082,6 +22143,7 @@ var AlertConditionTypeSchema = external_exports.enum([
|
|
|
22082
22143
|
"severity_threshold",
|
|
22083
22144
|
"regression_after_deploy"
|
|
22084
22145
|
]);
|
|
22146
|
+
var AlertSeverityLifecycleScopeSchema = external_exports.enum(["new_incident", "incident_regressed", "both"]);
|
|
22085
22147
|
var AlertSchema = external_exports.object({
|
|
22086
22148
|
alert_id: external_exports.string(),
|
|
22087
22149
|
project_id: external_exports.string(),
|
|
@@ -22090,6 +22152,7 @@ var AlertSchema = external_exports.object({
|
|
|
22090
22152
|
channel: AlertChannelSchema,
|
|
22091
22153
|
condition_type: AlertConditionTypeSchema,
|
|
22092
22154
|
severity_min: external_exports.enum(["low", "medium", "high", "critical"]).nullable(),
|
|
22155
|
+
severity_lifecycle_scope: AlertSeverityLifecycleScopeSchema.nullable().optional().default(null),
|
|
22093
22156
|
cooldown_seconds: external_exports.number().int().min(0),
|
|
22094
22157
|
config: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
22095
22158
|
is_enabled: external_exports.boolean(),
|
|
@@ -22177,6 +22240,9 @@ function createAlertApi(client) {
|
|
|
22177
22240
|
if (input2.severityMin !== void 0) {
|
|
22178
22241
|
body.severity_min = input2.severityMin;
|
|
22179
22242
|
}
|
|
22243
|
+
if (input2.severityLifecycleScope !== void 0) {
|
|
22244
|
+
body.severity_lifecycle_scope = input2.severityLifecycleScope;
|
|
22245
|
+
}
|
|
22180
22246
|
if (input2.cooldownSeconds !== void 0) {
|
|
22181
22247
|
body.cooldown_seconds = input2.cooldownSeconds;
|
|
22182
22248
|
}
|
|
@@ -22206,6 +22272,9 @@ function createAlertApi(client) {
|
|
|
22206
22272
|
if (input2.severityMin !== void 0) {
|
|
22207
22273
|
body.severity_min = input2.severityMin;
|
|
22208
22274
|
}
|
|
22275
|
+
if (input2.severityLifecycleScope !== void 0) {
|
|
22276
|
+
body.severity_lifecycle_scope = input2.severityLifecycleScope;
|
|
22277
|
+
}
|
|
22209
22278
|
if (input2.cooldownSeconds !== void 0) {
|
|
22210
22279
|
body.cooldown_seconds = input2.cooldownSeconds;
|
|
22211
22280
|
}
|
|
@@ -28181,11 +28250,9 @@ function buildManagedAgentsSection() {
|
|
|
28181
28250
|
return [
|
|
28182
28251
|
MANAGED_AGENTS_START,
|
|
28183
28252
|
"## DebugBundle",
|
|
28184
|
-
"-
|
|
28185
|
-
"-
|
|
28186
|
-
"-
|
|
28187
|
-
"- After a fix is verified, or after an intentional smoke or dogfood incident has served its purpose, resolve it with `debugbundle resolve <incident-id> [incident-id ...]` or MCP `resolve_incident` / `resolve_incidents` so open incidents remain actionable.",
|
|
28188
|
-
"- Use `debugbundle doctor` to validate local DebugBundle setup or connectivity issues.",
|
|
28253
|
+
"- Use DebugBundle for runtime failures, production/customer-facing incidents, endpoint downtime, notification/webhook delivery failures, health-check failures, specific incident reports, or symptoms likely to have generated captured events.",
|
|
28254
|
+
"- For deterministic local code, UI, layout, copy, calculation, refactor, or test-only issues, inspect source and tests first; do not check DebugBundle incidents unless runtime evidence is needed or the user asks.",
|
|
28255
|
+
"- Read `.agents/skills/debugbundle/SKILL.md` for the full DebugBundle workflow.",
|
|
28189
28256
|
MANAGED_AGENTS_END
|
|
28190
28257
|
].join("\n");
|
|
28191
28258
|
}
|
|
@@ -30705,8 +30772,8 @@ var CLI_USAGE_LINES = [
|
|
|
30705
30772
|
" debugbundle token member create --label <label> [--auth-file <path>] [--json]",
|
|
30706
30773
|
" debugbundle token member revoke <token-id> [--auth-file <path>] [--json]",
|
|
30707
30774
|
" debugbundle alert list --project-id <id> [--limit <n>] [--auth-file <path>] [--json]",
|
|
30708
|
-
" debugbundle alert create --project-id <id> --channel <channel> --condition <condition> [--service-id <id>] [--severity-min <level>] [--cooldown <seconds>] --config-json <json> [--is-enabled <true|false>] [--auth-file <path>] [--json]",
|
|
30709
|
-
" debugbundle alert update <alert-id> --project-id <id> [--service-id <id|null>] [--channel <channel>] [--condition <condition>] [--severity-min <level|null>] [--cooldown <seconds>] [--config-json <json|null>] [--is-enabled <true|false>] [--auth-file <path>] [--json]",
|
|
30775
|
+
" debugbundle alert create --project-id <id> --channel <channel> --condition <condition> [--service-id <id>] [--severity-min <level>] [--severity-lifecycle-scope <new_incident|incident_regressed|both>] [--cooldown <seconds>] --config-json <json> [--is-enabled <true|false>] [--auth-file <path>] [--json]",
|
|
30776
|
+
" debugbundle alert update <alert-id> --project-id <id> [--service-id <id|null>] [--channel <channel>] [--condition <condition>] [--severity-min <level|null>] [--severity-lifecycle-scope <new_incident|incident_regressed|both|null>] [--cooldown <seconds>] [--config-json <json|null>] [--is-enabled <true|false>] [--auth-file <path>] [--json]",
|
|
30710
30777
|
" debugbundle alert delete <alert-id> --project-id <id> [--auth-file <path>] [--json]",
|
|
30711
30778
|
" debugbundle slack list --project-id <id> [--auth-file <path>] [--json]",
|
|
30712
30779
|
" debugbundle slack connect-url --project-id <id> [--return-to </projects/...>] [--auth-file <path>] [--json]",
|
|
@@ -35781,6 +35848,9 @@ async function createAlertCommand(input2, api) {
|
|
|
35781
35848
|
if (input2.severityMin !== void 0) {
|
|
35782
35849
|
requestInput.severityMin = input2.severityMin;
|
|
35783
35850
|
}
|
|
35851
|
+
if (input2.severityLifecycleScope !== void 0) {
|
|
35852
|
+
requestInput.severityLifecycleScope = input2.severityLifecycleScope;
|
|
35853
|
+
}
|
|
35784
35854
|
if (input2.cooldownSeconds !== void 0) {
|
|
35785
35855
|
requestInput.cooldownSeconds = input2.cooldownSeconds;
|
|
35786
35856
|
}
|
|
@@ -35814,6 +35884,9 @@ async function createAlertWithAuthCommand(input2, dependencies) {
|
|
|
35814
35884
|
if (input2.severityMin !== void 0) {
|
|
35815
35885
|
commandInput.severityMin = input2.severityMin;
|
|
35816
35886
|
}
|
|
35887
|
+
if (input2.severityLifecycleScope !== void 0) {
|
|
35888
|
+
commandInput.severityLifecycleScope = input2.severityLifecycleScope;
|
|
35889
|
+
}
|
|
35817
35890
|
if (input2.cooldownSeconds !== void 0) {
|
|
35818
35891
|
commandInput.cooldownSeconds = input2.cooldownSeconds;
|
|
35819
35892
|
}
|
|
@@ -35848,6 +35921,9 @@ async function updateAlertCommand(input2, api) {
|
|
|
35848
35921
|
if (input2.severityMin !== void 0) {
|
|
35849
35922
|
requestInput.severityMin = input2.severityMin;
|
|
35850
35923
|
}
|
|
35924
|
+
if (input2.severityLifecycleScope !== void 0) {
|
|
35925
|
+
requestInput.severityLifecycleScope = input2.severityLifecycleScope;
|
|
35926
|
+
}
|
|
35851
35927
|
if (input2.cooldownSeconds !== void 0) {
|
|
35852
35928
|
requestInput.cooldownSeconds = input2.cooldownSeconds;
|
|
35853
35929
|
}
|
|
@@ -35888,6 +35964,9 @@ async function updateAlertWithAuthCommand(input2, dependencies) {
|
|
|
35888
35964
|
if (input2.severityMin !== void 0) {
|
|
35889
35965
|
commandInput.severityMin = input2.severityMin;
|
|
35890
35966
|
}
|
|
35967
|
+
if (input2.severityLifecycleScope !== void 0) {
|
|
35968
|
+
commandInput.severityLifecycleScope = input2.severityLifecycleScope;
|
|
35969
|
+
}
|
|
35891
35970
|
if (input2.cooldownSeconds !== void 0) {
|
|
35892
35971
|
commandInput.cooldownSeconds = input2.cooldownSeconds;
|
|
35893
35972
|
}
|
|
@@ -36813,6 +36892,7 @@ async function handleAlertCommand(parsedArgv, dependencies) {
|
|
|
36813
36892
|
"channel",
|
|
36814
36893
|
"condition",
|
|
36815
36894
|
"severity-min",
|
|
36895
|
+
"severity-lifecycle-scope",
|
|
36816
36896
|
"cooldown",
|
|
36817
36897
|
"config-json",
|
|
36818
36898
|
"is-enabled"
|
|
@@ -36843,6 +36923,10 @@ async function handleAlertCommand(parsedArgv, dependencies) {
|
|
|
36843
36923
|
if (severityMin !== void 0) {
|
|
36844
36924
|
input2.severityMin = severityMin;
|
|
36845
36925
|
}
|
|
36926
|
+
const severityLifecycleScope = readStringOption(parsedArgv, "severity-lifecycle-scope");
|
|
36927
|
+
if (severityLifecycleScope !== void 0) {
|
|
36928
|
+
input2.severityLifecycleScope = severityLifecycleScope;
|
|
36929
|
+
}
|
|
36846
36930
|
const cooldownSeconds = readIntegerOption(parsedArgv, "cooldown");
|
|
36847
36931
|
if (cooldownSeconds !== void 0) {
|
|
36848
36932
|
input2.cooldownSeconds = cooldownSeconds;
|
|
@@ -36867,6 +36951,7 @@ async function handleAlertCommand(parsedArgv, dependencies) {
|
|
|
36867
36951
|
"channel",
|
|
36868
36952
|
"condition",
|
|
36869
36953
|
"severity-min",
|
|
36954
|
+
"severity-lifecycle-scope",
|
|
36870
36955
|
"cooldown",
|
|
36871
36956
|
"config-json",
|
|
36872
36957
|
"is-enabled"
|
|
@@ -36896,6 +36981,10 @@ async function handleAlertCommand(parsedArgv, dependencies) {
|
|
|
36896
36981
|
if (severityMin !== void 0) {
|
|
36897
36982
|
input2.severityMin = severityMin === "null" ? null : severityMin;
|
|
36898
36983
|
}
|
|
36984
|
+
const severityLifecycleScope = readStringOption(parsedArgv, "severity-lifecycle-scope");
|
|
36985
|
+
if (severityLifecycleScope !== void 0) {
|
|
36986
|
+
input2.severityLifecycleScope = severityLifecycleScope === "null" ? null : severityLifecycleScope;
|
|
36987
|
+
}
|
|
36899
36988
|
const cooldownSeconds = readIntegerOption(parsedArgv, "cooldown");
|
|
36900
36989
|
if (cooldownSeconds !== void 0) {
|
|
36901
36990
|
input2.cooldownSeconds = cooldownSeconds;
|
|
@@ -36908,7 +36997,7 @@ async function handleAlertCommand(parsedArgv, dependencies) {
|
|
|
36908
36997
|
if (isEnabled !== void 0) {
|
|
36909
36998
|
input2.isEnabled = isEnabled;
|
|
36910
36999
|
}
|
|
36911
|
-
if (input2.serviceId === void 0 && input2.channel === void 0 && input2.conditionType === void 0 && input2.severityMin === void 0 && input2.cooldownSeconds === void 0 && input2.config === void 0 && input2.isEnabled === void 0) {
|
|
37000
|
+
if (input2.serviceId === void 0 && input2.channel === void 0 && input2.conditionType === void 0 && input2.severityMin === void 0 && input2.severityLifecycleScope === void 0 && input2.cooldownSeconds === void 0 && input2.config === void 0 && input2.isEnabled === void 0) {
|
|
36912
37001
|
throw new CliInputError("At least one alert field must be provided.");
|
|
36913
37002
|
}
|
|
36914
37003
|
return await (dependencies.updateAlertCommand ?? updateAlertWithAuthCommand)(input2);
|
|
@@ -37166,7 +37255,7 @@ async function handleCaptureRuleCommand2(parsedArgv, dependencies) {
|
|
|
37166
37255
|
// package.json
|
|
37167
37256
|
var package_default = {
|
|
37168
37257
|
name: "@debugbundle/cli",
|
|
37169
|
-
version: "1.6.
|
|
37258
|
+
version: "1.6.4",
|
|
37170
37259
|
private: false,
|
|
37171
37260
|
description: "Command-line interface for DebugBundle",
|
|
37172
37261
|
license: "AGPL-3.0-only",
|