@skillcap/gdh 0.22.0 → 0.23.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.
Files changed (51) hide show
  1. package/INSTALL-BUNDLE.json +1 -1
  2. package/RELEASE-SPAN-UPDATE-CONTRACTS.json +65 -0
  3. package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
  4. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +7 -1
  5. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
  6. package/node_modules/@gdh/adapters/package.json +8 -8
  7. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts +112 -0
  8. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.d.ts.map +1 -0
  9. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js +264 -0
  10. package/node_modules/@gdh/authoring/dist/diagnostics-broker-contract.js.map +1 -0
  11. package/node_modules/@gdh/authoring/dist/diagnostics-broker.d.ts +92 -0
  12. package/node_modules/@gdh/authoring/dist/diagnostics-broker.d.ts.map +1 -0
  13. package/node_modules/@gdh/authoring/dist/diagnostics-broker.js +532 -0
  14. package/node_modules/@gdh/authoring/dist/diagnostics-broker.js.map +1 -0
  15. package/node_modules/@gdh/authoring/dist/index.d.ts +1 -0
  16. package/node_modules/@gdh/authoring/dist/index.d.ts.map +1 -1
  17. package/node_modules/@gdh/authoring/dist/index.js +1 -0
  18. package/node_modules/@gdh/authoring/dist/index.js.map +1 -1
  19. package/node_modules/@gdh/authoring/dist/lsp-client.d.ts +16 -0
  20. package/node_modules/@gdh/authoring/dist/lsp-client.d.ts.map +1 -1
  21. package/node_modules/@gdh/authoring/dist/lsp-client.js +24 -0
  22. package/node_modules/@gdh/authoring/dist/lsp-client.js.map +1 -1
  23. package/node_modules/@gdh/authoring/dist/lsp.d.ts.map +1 -1
  24. package/node_modules/@gdh/authoring/dist/lsp.js +123 -2
  25. package/node_modules/@gdh/authoring/dist/lsp.js.map +1 -1
  26. package/node_modules/@gdh/authoring/package.json +2 -2
  27. package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
  28. package/node_modules/@gdh/cli/dist/index.js +179 -3
  29. package/node_modules/@gdh/cli/dist/index.js.map +1 -1
  30. package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
  31. package/node_modules/@gdh/cli/dist/migrate.js +5 -3
  32. package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
  33. package/node_modules/@gdh/cli/package.json +10 -10
  34. package/node_modules/@gdh/core/dist/index.d.ts +114 -3
  35. package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
  36. package/node_modules/@gdh/core/dist/index.js +7 -2
  37. package/node_modules/@gdh/core/dist/index.js.map +1 -1
  38. package/node_modules/@gdh/core/package.json +1 -1
  39. package/node_modules/@gdh/docs/dist/guidance.d.ts.map +1 -1
  40. package/node_modules/@gdh/docs/dist/guidance.js +11 -6
  41. package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
  42. package/node_modules/@gdh/docs/package.json +2 -2
  43. package/node_modules/@gdh/mcp/dist/index.d.ts.map +1 -1
  44. package/node_modules/@gdh/mcp/dist/index.js +77 -1
  45. package/node_modules/@gdh/mcp/dist/index.js.map +1 -1
  46. package/node_modules/@gdh/mcp/package.json +8 -8
  47. package/node_modules/@gdh/observability/package.json +2 -2
  48. package/node_modules/@gdh/runtime/package.json +2 -2
  49. package/node_modules/@gdh/scan/package.json +3 -3
  50. package/node_modules/@gdh/verify/package.json +7 -7
  51. package/package.json +11 -11
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "product": "GDH",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "installMode": "packaged_install"
5
5
  }
@@ -2427,6 +2427,71 @@
2427
2427
  }
2428
2428
  ]
2429
2429
  }
2430
+ },
2431
+ {
2432
+ "version": "0.23.0",
2433
+ "releaseTag": "v0.23.0",
2434
+ "migrationStatus": "required",
2435
+ "summary": "v0.23.0 ships the persistent diagnostics broker for agent-visible Godot LSP feedback. Existing managed targets need `gdh migrate --apply` because GDH_GUIDANCE_UNIT_VERSION moves 16 -> 17 (authoring guidance now teaches the diagnostics broker workflow) and GDH_UPDATE_HOOK_VERSION moves 4 -> 5 (managed post-edit hooks now refresh the broker before the authoring check).",
2436
+ "releaseHighlights": {
2437
+ "summary": "v0.23.0 ships a persistent diagnostics broker for GDH-managed Godot targets. A target/worktree-local broker keeps a live Godot LSP client connected, maintains the current normalized diagnostics snapshot under `.gdh-state`, and exposes that snapshot to CLI, MCP, post-edit hooks, and generated agent guidance. Broker state is local-only, loopback-bound, and token-protected. `gdh authoring check --mode post-edit|final` remains the explicit validation/evidence path with broker fast-path and direct LSP/static fallback.",
2438
+ "operatorChanges": [
2439
+ "**New `gdh authoring diagnostics` CLI surface.** `status`, `current`, `refresh`, `doctor`, and `prune` operations let agents inspect current Godot LSP problems without re-running ad hoc authoring checks. `prune` is intentionally CLI-only and not exposed via MCP.",
2440
+ "**New MCP `authoring.diagnostics` tools.** MCP exposes `status`, `current`, `refresh`, and `doctor` parity for the same broker surface.",
2441
+ "**Post-edit hooks refresh the broker before authoring check.** Managed Codex and Claude post-edit hooks now call `gdh authoring diagnostics refresh --target <root> --changed <path>` before the existing `gdh authoring check --mode post-edit` call. Broker refresh failure is non-fatal; the authoring check falls back to direct LSP collection.",
2442
+ "**Generated agent guidance teaches the broker workflow.** Agent guidance distinguishes diagnostics-broker visibility (`diagnostics current/refresh/doctor`) from explicit evidence runs (`authoring check --mode final` for task handoff, commit, or broad validation).",
2443
+ "**Honest snapshot scope and freshness.** Snapshots default to `opened_files_only` scope and `scope_limited` freshness classification. GDH does not claim whole-project diagnostics unless the Godot LSP emits evidence at that scope.",
2444
+ "**Self-update detects legacy hooks without diagnostics refresh.** Self-update re-renders post-edit hooks that pre-date the broker workflow.",
2445
+ "**Docs-validation tripwires.** `DIAG-BROKER-01` validate-docs checks block regression of the `authoring-dirty.json` ledger and Stop-hook validation patterns."
2446
+ ]
2447
+ },
2448
+ "updateContract": {
2449
+ "summary": "Managed targets need release-specific migration for v0.23.0 because generated authoring guidance and post-edit hook surfaces changed for the diagnostics broker workflow. After self-update, run `gdh migrate --apply`, then validate adapter status, drift, and the new diagnostics broker surfaces.",
2450
+ "steps": [
2451
+ {
2452
+ "id": "self_update_runtime_workflow_package",
2453
+ "kind": "mechanical",
2454
+ "summary": "Install the v0.23.0 GDH package.",
2455
+ "detail": "Run the normal GDH self-update or package update path. This makes the new authoring diagnostics CLI/MCP surfaces, refreshed managed hook renderer, and updated guidance available to the host.",
2456
+ "commands": [
2457
+ "gdh self-update --apply"
2458
+ ],
2459
+ "validationCommands": [
2460
+ "gdh status"
2461
+ ]
2462
+ },
2463
+ {
2464
+ "id": "rebake_diagnostics_broker_surfaces",
2465
+ "kind": "mechanical",
2466
+ "summary": "Re-bake managed authoring guidance and post-edit hook surfaces.",
2467
+ "detail": "Run `gdh migrate --apply` so guidance unit version 17 writes the new diagnostics broker guidance and hook version 5 writes the managed post-edit hooks that refresh the broker before the authoring check.",
2468
+ "commands": [
2469
+ "gdh migrate --apply"
2470
+ ],
2471
+ "validationCommands": [
2472
+ "gdh adapters status",
2473
+ "gdh verify drift",
2474
+ "gdh status"
2475
+ ]
2476
+ },
2477
+ {
2478
+ "id": "verify_diagnostics_broker_visibility",
2479
+ "kind": "agent_reasoning",
2480
+ "summary": "Confirm the diagnostics broker is reachable for the target.",
2481
+ "detail": "Inspect the broker with `gdh authoring diagnostics status` and, if needed, `gdh authoring diagnostics doctor`. On hosts without a configured Godot editor binary, expect honest `unavailable` results and rely on `gdh authoring check --mode final` for explicit evidence runs. Use `gdh authoring diagnostics refresh --changed <path>` after edits to warm the snapshot before reading it.",
2482
+ "commands": [
2483
+ "gdh authoring diagnostics status",
2484
+ "gdh authoring diagnostics doctor",
2485
+ "gdh authoring diagnostics refresh --changed <path>",
2486
+ "gdh authoring diagnostics current"
2487
+ ],
2488
+ "validationCommands": [
2489
+ "gdh authoring diagnostics status",
2490
+ "gdh authoring check --mode final"
2491
+ ]
2492
+ }
2493
+ ]
2494
+ }
2430
2495
  }
2431
2496
  ]
2432
2497
  }
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-hook-render.d.ts","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mCAAmC,yCAAyC,CAAC;AAC1F,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,6BAA6B,uRAC4O,CAAC;AACvR,eAAO,MAAM,4BAA4B,qRAC2O,CAAC;AAErR,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC,GAAG,MAAM,CA6HT"}
1
+ {"version":3,"file":"authoring-hook-render.d.ts","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mCAAmC,yCAAyC,CAAC;AAC1F,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,6BAA6B,uRAC4O,CAAC;AACvR,eAAO,MAAM,4BAA4B,qRAC2O,CAAC;AAErR,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC,GAAG,MAAM,CAmIT"}
@@ -35,7 +35,13 @@ export function renderGdhAuthoringHook(input) {
35
35
  " const changed = collectChangedFiles(input, targetRoot);",
36
36
  " const authoring = changed.filter(isAuthoringValidationPath);",
37
37
  " if (authoring.length === 0) return allow();",
38
- " const result = runGdh(targetRoot, ['authoring', 'check', '--target', targetRoot, '--mode', 'post-edit', '--format', 'compact', ...authoring.flatMap((file) => ['--changed', file])]);",
38
+ " const changedArgs = authoring.flatMap((file) => ['--changed', file]);",
39
+ " // Attempt to refresh the diagnostics broker for changed files.",
40
+ " // Broker refresh failure is non-fatal: the authoring check falls back to direct LSP.",
41
+ " runGdh(targetRoot, ['authoring', 'diagnostics', 'refresh', '--target', targetRoot, ...changedArgs]);",
42
+ " // Run compact authoring check. When broker was refreshed, this uses the fresh snapshot.",
43
+ " // When broker is unavailable, this falls back to direct LSP post-edit collection.",
44
+ " const result = runGdh(targetRoot, ['authoring', 'check', '--target', targetRoot, '--mode', 'post-edit', '--format', 'compact', ...changedArgs]);",
39
45
  " if (!result.ok || !/Completion allowed\\./.test(result.output)) {",
40
46
  " return block(`GDH post-edit authoring check needs attention.\\n${result.output || result.error || 'No check output.'}`);",
41
47
  " }",
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-hook-render.js","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,MAAM,mCAAmC,GAAG,sCAAsC,CAAC;AAC1F,MAAM,CAAC,MAAM,kCAAkC,GAAG,qCAAqC,CAAC;AACxF,MAAM,CAAC,MAAM,6BAA6B,GACxC,oRAAoR,CAAC;AACvR,MAAM,CAAC,MAAM,4BAA4B,GACvC,kRAAkR,CAAC;AAErR,MAAM,UAAU,sBAAsB,CAAC,KAItC;IACC,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,8DAA8D;QAC9D,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG;QAChE,gCAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG;QAC3E,iBAAiB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;QAC/C,EAAE;QACF,2BAA2B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zK,EAAE;QACF,4CAA4C;QAC5C,iFAAiF;QACjF,sEAAsE;QACtE,GAAG;QACH,EAAE;QACF,qCAAqC;QACrC,qDAAqD;QACrD,uEAAuE;QACvE,qDAAqD;QACrD,iEAAiE;QACjE,yBAAyB;QACzB,GAAG;QACH,EAAE;QACF,iFAAiF;QACjF,kHAAkH;QAClH,EAAE;QACF,uCAAuC;QACvC,0BAA0B;QAC1B,kDAAkD;QAClD,oHAAoH;QACpH,0DAA0D;QAC1D,oBAAoB;QACpB,GAAG;QACH,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"authoring-hook-render.js","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,MAAM,mCAAmC,GAAG,sCAAsC,CAAC;AAC1F,MAAM,CAAC,MAAM,kCAAkC,GAAG,qCAAqC,CAAC;AACxF,MAAM,CAAC,MAAM,6BAA6B,GACxC,oRAAoR,CAAC;AACvR,MAAM,CAAC,MAAM,4BAA4B,GACvC,kRAAkR,CAAC;AAErR,MAAM,UAAU,sBAAsB,CAAC,KAItC;IACC,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,8DAA8D;QAC9D,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG;QAChE,gCAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG;QAC3E,iBAAiB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;QAC/C,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,iDAAiD;QACjD,EAAE;QACF,kEAAkE;QAClE,yBAAyB;QACzB,EAAE;QACF,SAAS;QACT,EAAE;QACF,mBAAmB;QACnB,kCAAkC;QAClC,gDAAgD;QAChD,0DAA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,EAAE;QACF,qCAAqC;QACrC,qDAAqD;QACrD,uEAAuE;QACvE,qDAAqD;QACrD,iEAAiE;QACjE,yBAAyB;QACzB,GAAG;QACH,EAAE;QACF,iFAAiF;QACjF,kHAAkH;QAClH,EAAE;QACF,uCAAuC;QACvC,0BAA0B;QAC1B,kDAAkD;QAClD,oHAAoH;QACpH,0DAA0D;QAC1D,oBAAoB;QACpB,GAAG;QACH,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -11,13 +11,13 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/authoring": "0.22.0",
15
- "@gdh/core": "0.22.0",
16
- "@gdh/docs": "0.22.0",
17
- "@gdh/observability": "0.22.0",
18
- "@gdh/runtime": "0.22.0",
19
- "@gdh/scan": "0.22.0",
20
- "@gdh/verify": "0.22.0"
14
+ "@gdh/authoring": "0.23.0",
15
+ "@gdh/core": "0.23.0",
16
+ "@gdh/docs": "0.23.0",
17
+ "@gdh/observability": "0.23.0",
18
+ "@gdh/runtime": "0.23.0",
19
+ "@gdh/scan": "0.23.0",
20
+ "@gdh/verify": "0.23.0"
21
21
  },
22
- "version": "0.22.0"
22
+ "version": "0.23.0"
23
23
  }
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Authoring Diagnostics Broker Contract
3
+ *
4
+ * Defines the types, constants, identity normalization helpers, and health
5
+ * classification logic for the persistent diagnostics broker.
6
+ *
7
+ * The broker is target/worktree scoped, local-only (loopback), and
8
+ * token-protected. Its state lives under `.gdh-state/authoring/diagnostics-broker/`.
9
+ * It builds on the existing managed LSP lifecycle rather than introducing
10
+ * a second Godot editor process.
11
+ *
12
+ * Raw LSP payloads are provenance only. All product-facing shapes use
13
+ * `GdhAuthoringDiagnostic` from `@gdh/core`.
14
+ *
15
+ * Pattern reference: packages/runtime/src/bridge-broker-contract.ts
16
+ * ADR: docs/adrs/0003-lsp-based-authoring-validation.md (Persistent Diagnostics Broker Addendum)
17
+ */
18
+ import type { GdhDiagnosticsBrokerHealth, GdhDiagnosticsBrokerMetadata, GdhDiagnosticsBrokerTargetIdentity, GdhDiagnosticsFreshnessState, GdhDiagnosticsFileSnapshot, GdhDiagnosticsSnapshot } from "@gdh/core";
19
+ import { GDH_DIAGNOSTICS_BROKER_DEFAULT_HEARTBEAT_STALE_AFTER_MS, GDH_DIAGNOSTICS_BROKER_LOOPBACK_HOST, GDH_DIAGNOSTICS_BROKER_PROTOCOL_VERSION, GDH_DIAGNOSTICS_BROKER_STATE_RELATIVE_PATH } from "@gdh/core";
20
+ export { GDH_DIAGNOSTICS_BROKER_DEFAULT_HEARTBEAT_STALE_AFTER_MS, GDH_DIAGNOSTICS_BROKER_LOOPBACK_HOST, GDH_DIAGNOSTICS_BROKER_PROTOCOL_VERSION, GDH_DIAGNOSTICS_BROKER_STATE_RELATIVE_PATH, };
21
+ export declare const DIAGNOSTICS_BROKER_DEFAULT_FRESHNESS_STALE_AFTER_MS = 60000;
22
+ export type GdhDiagnosticsBrokerPathStyle = "posix" | "win32";
23
+ export interface NormalizeDiagnosticsBrokerTargetIdentityInput {
24
+ readonly targetRootPath: string;
25
+ readonly godotProjectRootPath: string;
26
+ readonly stateRootPath: string;
27
+ readonly pathStyle?: GdhDiagnosticsBrokerPathStyle;
28
+ }
29
+ /**
30
+ * Normalize target/worktree identity for the diagnostics broker.
31
+ *
32
+ * Uses the same path-normalization approach as the runtime bridge broker
33
+ * contract to ensure consistent identity keys across OS path variants,
34
+ * trailing separators, and relative segments.
35
+ */
36
+ export declare function normalizeDiagnosticsBrokerTargetIdentity(input: NormalizeDiagnosticsBrokerTargetIdentityInput): GdhDiagnosticsBrokerTargetIdentity;
37
+ export interface ValidateDiagnosticsBrokerHandshakeInput {
38
+ readonly expectedIdentity: GdhDiagnosticsBrokerTargetIdentity;
39
+ readonly metadata: GdhDiagnosticsBrokerMetadata | null;
40
+ readonly expectedGdhVersion: string;
41
+ readonly tokenPresent: boolean;
42
+ readonly pidAlive: boolean;
43
+ readonly nowMs?: number;
44
+ readonly heartbeatStaleAfterMs?: number;
45
+ }
46
+ /**
47
+ * Validate broker metadata and classify its health state.
48
+ *
49
+ * Returns `missing` if metadata is null.
50
+ * Returns `incompatible` for protocol, GDH version, or identity mismatches.
51
+ * Returns `stale` for token, heartbeat, or process failures.
52
+ * Returns `ready` when all checks pass.
53
+ */
54
+ export declare function validateDiagnosticsBrokerHandshake(input: ValidateDiagnosticsBrokerHandshakeInput): GdhDiagnosticsBrokerHealth;
55
+ export interface ClassifyDiagnosticsFreshnessInput {
56
+ readonly fileSnapshot: GdhDiagnosticsFileSnapshot | null;
57
+ readonly nowMs?: number;
58
+ readonly staleAfterMs?: number;
59
+ }
60
+ /**
61
+ * Classify the freshness state of a file's diagnostics snapshot.
62
+ *
63
+ * - `missing`: no snapshot exists for this file
64
+ * - `unavailable`: snapshot exists but LSP instance identity is missing (broker degraded)
65
+ * - `stale`: snapshot is older than the configured staleness threshold
66
+ * - `fresh`: snapshot is within the staleness threshold
67
+ */
68
+ export declare function classifyDiagnosticsFreshness(input: ClassifyDiagnosticsFreshnessInput): GdhDiagnosticsFreshnessState;
69
+ export interface ClassifySnapshotFreshnessInput {
70
+ readonly files: readonly GdhDiagnosticsFileSnapshot[];
71
+ readonly requestedUris?: readonly string[];
72
+ readonly nowMs?: number;
73
+ readonly staleAfterMs?: number;
74
+ }
75
+ /**
76
+ * Roll up freshness across all files in a snapshot.
77
+ *
78
+ * - `missing`: no files in snapshot
79
+ * - `unavailable`: all files are unavailable
80
+ * - `scope_limited`: some requested URIs are not covered
81
+ * - `stale`: at least one file is stale and none is missing
82
+ * - `fresh`: all files are fresh
83
+ */
84
+ export declare function classifySnapshotFreshness(input: ClassifySnapshotFreshnessInput): GdhDiagnosticsFreshnessState;
85
+ /**
86
+ * Count diagnostics by severity across all file snapshots.
87
+ */
88
+ export declare function countDiagnosticsInSnapshot(files: readonly GdhDiagnosticsFileSnapshot[]): {
89
+ errorCount: number;
90
+ warningCount: number;
91
+ infoCount: number;
92
+ };
93
+ /**
94
+ * Build a complete `GdhDiagnosticsSnapshot` from a health result and file list.
95
+ */
96
+ export declare function buildDiagnosticsSnapshot(health: GdhDiagnosticsBrokerHealth, files: readonly GdhDiagnosticsFileSnapshot[], options?: {
97
+ readonly requestedUris?: readonly string[];
98
+ readonly nowMs?: number;
99
+ readonly staleAfterMs?: number;
100
+ }): GdhDiagnosticsSnapshot;
101
+ /**
102
+ * Resolve the standard file paths used by the diagnostics broker under
103
+ * `.gdh-state/authoring/diagnostics-broker/`.
104
+ */
105
+ export declare function resolveDiagnosticsBrokerPaths(stateRootPath: string): {
106
+ readonly brokerDir: string;
107
+ readonly metadataPath: string;
108
+ readonly tokenFilePath: string;
109
+ readonly heartbeatPath: string;
110
+ readonly snapshotPath: string;
111
+ };
112
+ //# sourceMappingURL=diagnostics-broker-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-broker-contract.d.ts","sourceRoot":"","sources":["../src/diagnostics-broker-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAE5B,kCAAkC,EAClC,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,uDAAuD,EACvD,oCAAoC,EACpC,uCAAuC,EACvC,0CAA0C,EAC3C,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,uDAAuD,EACvD,oCAAoC,EACpC,uCAAuC,EACvC,0CAA0C,GAC3C,CAAC;AAEF,eAAO,MAAM,mDAAmD,QAAS,CAAC;AAE1E,MAAM,MAAM,6BAA6B,GAAG,OAAO,GAAG,OAAO,CAAC;AAI9D,MAAM,WAAW,6CAA6C;IAC5D,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,aAAa,E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pC,4BAA4B,CA6B9B;AAID;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,0BAA0B,EAAE,GAAG;IACxF,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAcA;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,SAAS,0BAA0B,EAAE,EAC5C,OAAO,GAAE;IACP,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAC3B,GACL,sBAAsB,CAsBxB;AAID;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,MAAM,GAAG;IACpE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CASA"}
@@ -0,0 +1,264 @@
1
+ /**
2
+ * Authoring Diagnostics Broker Contract
3
+ *
4
+ * Defines the types, constants, identity normalization helpers, and health
5
+ * classification logic for the persistent diagnostics broker.
6
+ *
7
+ * The broker is target/worktree scoped, local-only (loopback), and
8
+ * token-protected. Its state lives under `.gdh-state/authoring/diagnostics-broker/`.
9
+ * It builds on the existing managed LSP lifecycle rather than introducing
10
+ * a second Godot editor process.
11
+ *
12
+ * Raw LSP payloads are provenance only. All product-facing shapes use
13
+ * `GdhAuthoringDiagnostic` from `@gdh/core`.
14
+ *
15
+ * Pattern reference: packages/runtime/src/bridge-broker-contract.ts
16
+ * ADR: docs/adrs/0003-lsp-based-authoring-validation.md (Persistent Diagnostics Broker Addendum)
17
+ */
18
+ import path from "node:path";
19
+ import { GDH_DIAGNOSTICS_BROKER_DEFAULT_HEARTBEAT_STALE_AFTER_MS, GDH_DIAGNOSTICS_BROKER_LOOPBACK_HOST, GDH_DIAGNOSTICS_BROKER_PROTOCOL_VERSION, GDH_DIAGNOSTICS_BROKER_STATE_RELATIVE_PATH, } from "@gdh/core";
20
+ export { GDH_DIAGNOSTICS_BROKER_DEFAULT_HEARTBEAT_STALE_AFTER_MS, GDH_DIAGNOSTICS_BROKER_LOOPBACK_HOST, GDH_DIAGNOSTICS_BROKER_PROTOCOL_VERSION, GDH_DIAGNOSTICS_BROKER_STATE_RELATIVE_PATH, };
21
+ export const DIAGNOSTICS_BROKER_DEFAULT_FRESHNESS_STALE_AFTER_MS = 60_000;
22
+ /**
23
+ * Normalize target/worktree identity for the diagnostics broker.
24
+ *
25
+ * Uses the same path-normalization approach as the runtime bridge broker
26
+ * contract to ensure consistent identity keys across OS path variants,
27
+ * trailing separators, and relative segments.
28
+ */
29
+ export function normalizeDiagnosticsBrokerTargetIdentity(input) {
30
+ const pathStyle = input.pathStyle ?? (process.platform === "win32" ? "win32" : "posix");
31
+ const normalizedTargetRootPath = normalizeBrokerPath(input.targetRootPath, pathStyle);
32
+ const normalizedGodotProjectRootPath = normalizeBrokerPath(input.godotProjectRootPath, pathStyle);
33
+ const normalizedStateRootPath = normalizeBrokerPath(input.stateRootPath, pathStyle);
34
+ return {
35
+ targetRootPath: input.targetRootPath,
36
+ godotProjectRootPath: input.godotProjectRootPath,
37
+ stateRootPath: input.stateRootPath,
38
+ normalizedTargetRootPath,
39
+ normalizedGodotProjectRootPath,
40
+ normalizedStateRootPath,
41
+ pathStyle,
42
+ identityKey: [
43
+ `target=${normalizedTargetRootPath}`,
44
+ `godot=${normalizedGodotProjectRootPath}`,
45
+ `state=${normalizedStateRootPath}`,
46
+ `style=${pathStyle}`,
47
+ ].join("|"),
48
+ };
49
+ }
50
+ /**
51
+ * Validate broker metadata and classify its health state.
52
+ *
53
+ * Returns `missing` if metadata is null.
54
+ * Returns `incompatible` for protocol, GDH version, or identity mismatches.
55
+ * Returns `stale` for token, heartbeat, or process failures.
56
+ * Returns `ready` when all checks pass.
57
+ */
58
+ export function validateDiagnosticsBrokerHandshake(input) {
59
+ const reasons = [];
60
+ const metadata = input.metadata;
61
+ if (metadata === null) {
62
+ return {
63
+ lifecycle: "missing",
64
+ reasons: ["broker_metadata_missing"],
65
+ metadata: null,
66
+ };
67
+ }
68
+ if (metadata.protocolVersion !== GDH_DIAGNOSTICS_BROKER_PROTOCOL_VERSION) {
69
+ reasons.push("broker_protocol_mismatch");
70
+ }
71
+ if (metadata.gdhVersion !== input.expectedGdhVersion) {
72
+ reasons.push("broker_gdh_version_mismatch");
73
+ }
74
+ if (metadata.targetIdentity.normalizedTargetRootPath !==
75
+ input.expectedIdentity.normalizedTargetRootPath) {
76
+ reasons.push("broker_target_mismatch");
77
+ }
78
+ if (metadata.targetIdentity.normalizedGodotProjectRootPath !==
79
+ input.expectedIdentity.normalizedGodotProjectRootPath) {
80
+ reasons.push("broker_godot_project_mismatch");
81
+ }
82
+ if (metadata.targetIdentity.normalizedStateRootPath !==
83
+ input.expectedIdentity.normalizedStateRootPath) {
84
+ reasons.push("broker_state_root_mismatch");
85
+ }
86
+ if (!input.tokenPresent) {
87
+ reasons.push("broker_token_missing");
88
+ }
89
+ if (!input.pidAlive) {
90
+ reasons.push("broker_process_not_alive");
91
+ }
92
+ if (metadata.host !== GDH_DIAGNOSTICS_BROKER_LOOPBACK_HOST) {
93
+ // Not currently a typed reason since host is fixed by the protocol.
94
+ // Treat it as a protocol mismatch if host is non-loopback.
95
+ reasons.push("broker_protocol_mismatch");
96
+ }
97
+ const nowMs = input.nowMs ?? Date.now();
98
+ const heartbeatMs = Date.parse(metadata.lastHeartbeatAt);
99
+ const heartbeatStaleAfterMs = input.heartbeatStaleAfterMs ?? GDH_DIAGNOSTICS_BROKER_DEFAULT_HEARTBEAT_STALE_AFTER_MS;
100
+ if (!Number.isFinite(heartbeatMs) || nowMs - heartbeatMs > heartbeatStaleAfterMs) {
101
+ reasons.push("broker_heartbeat_stale");
102
+ }
103
+ const lifecycle = classifyDiagnosticsBrokerLifecycle(reasons);
104
+ return {
105
+ lifecycle,
106
+ reasons: reasons.length === 0 ? ["broker_ready"] : reasons,
107
+ metadata,
108
+ };
109
+ }
110
+ function classifyDiagnosticsBrokerLifecycle(reasons) {
111
+ if (reasons.length === 0)
112
+ return "ready";
113
+ if (reasons.some((r) => [
114
+ "broker_protocol_mismatch",
115
+ "broker_gdh_version_mismatch",
116
+ "broker_target_mismatch",
117
+ "broker_godot_project_mismatch",
118
+ "broker_state_root_mismatch",
119
+ ].includes(r))) {
120
+ return "incompatible";
121
+ }
122
+ if (reasons.some((r) => ["broker_token_missing", "broker_heartbeat_stale", "broker_process_not_alive"].includes(r))) {
123
+ return "stale";
124
+ }
125
+ return "unavailable";
126
+ }
127
+ /**
128
+ * Classify the freshness state of a file's diagnostics snapshot.
129
+ *
130
+ * - `missing`: no snapshot exists for this file
131
+ * - `unavailable`: snapshot exists but LSP instance identity is missing (broker degraded)
132
+ * - `stale`: snapshot is older than the configured staleness threshold
133
+ * - `fresh`: snapshot is within the staleness threshold
134
+ */
135
+ export function classifyDiagnosticsFreshness(input) {
136
+ const { fileSnapshot, nowMs = Date.now(), staleAfterMs = DIAGNOSTICS_BROKER_DEFAULT_FRESHNESS_STALE_AFTER_MS } = input;
137
+ if (fileSnapshot === null) {
138
+ return "missing";
139
+ }
140
+ if (fileSnapshot.lspInstanceId === null) {
141
+ return "unavailable";
142
+ }
143
+ if (fileSnapshot.lastUpdatedAt === null) {
144
+ return "missing";
145
+ }
146
+ const updatedMs = Date.parse(fileSnapshot.lastUpdatedAt);
147
+ if (!Number.isFinite(updatedMs) || nowMs - updatedMs > staleAfterMs) {
148
+ return "stale";
149
+ }
150
+ return "fresh";
151
+ }
152
+ /**
153
+ * Roll up freshness across all files in a snapshot.
154
+ *
155
+ * - `missing`: no files in snapshot
156
+ * - `unavailable`: all files are unavailable
157
+ * - `scope_limited`: some requested URIs are not covered
158
+ * - `stale`: at least one file is stale and none is missing
159
+ * - `fresh`: all files are fresh
160
+ */
161
+ export function classifySnapshotFreshness(input) {
162
+ const { files, requestedUris, nowMs, staleAfterMs } = input;
163
+ if (files.length === 0) {
164
+ return "missing";
165
+ }
166
+ const fileByUri = new Map(files.map((f) => [f.uri, f]));
167
+ // If caller specified requested URIs, check for scope gap first.
168
+ if (requestedUris !== undefined && requestedUris.length > 0) {
169
+ const covered = requestedUris.filter((uri) => fileByUri.has(uri));
170
+ if (covered.length < requestedUris.length) {
171
+ return "scope_limited";
172
+ }
173
+ }
174
+ const freshnesses = files.map((f) => classifyDiagnosticsFreshness({
175
+ fileSnapshot: f,
176
+ ...(nowMs !== undefined && { nowMs }),
177
+ ...(staleAfterMs !== undefined && { staleAfterMs }),
178
+ }));
179
+ if (freshnesses.every((s) => s === "unavailable"))
180
+ return "unavailable";
181
+ if (freshnesses.some((s) => s === "missing"))
182
+ return "missing";
183
+ if (freshnesses.some((s) => s === "stale"))
184
+ return "stale";
185
+ return "fresh";
186
+ }
187
+ // ─── Snapshot Summary Helpers ─────────────────────────────────────────────────
188
+ /**
189
+ * Count diagnostics by severity across all file snapshots.
190
+ */
191
+ export function countDiagnosticsInSnapshot(files) {
192
+ let errorCount = 0;
193
+ let warningCount = 0;
194
+ let infoCount = 0;
195
+ for (const file of files) {
196
+ for (const diag of file.diagnostics) {
197
+ if (diag.severity === "error")
198
+ errorCount++;
199
+ else if (diag.severity === "warning")
200
+ warningCount++;
201
+ else
202
+ infoCount++;
203
+ }
204
+ }
205
+ return { errorCount, warningCount, infoCount };
206
+ }
207
+ /**
208
+ * Build a complete `GdhDiagnosticsSnapshot` from a health result and file list.
209
+ */
210
+ export function buildDiagnosticsSnapshot(health, files, options = {}) {
211
+ const { requestedUris, nowMs = Date.now(), staleAfterMs } = options;
212
+ const freshness = classifySnapshotFreshness({
213
+ files,
214
+ ...(requestedUris !== undefined && { requestedUris }),
215
+ nowMs,
216
+ ...(staleAfterMs !== undefined && { staleAfterMs }),
217
+ });
218
+ const scope = health.metadata?.snapshotScope ?? "unknown";
219
+ const { errorCount, warningCount, infoCount } = countDiagnosticsInSnapshot(files);
220
+ return {
221
+ health,
222
+ scope,
223
+ freshness,
224
+ files,
225
+ observedAt: new Date(nowMs).toISOString(),
226
+ errorCount,
227
+ warningCount,
228
+ infoCount,
229
+ };
230
+ }
231
+ // ─── Metadata Path Helpers ────────────────────────────────────────────────────
232
+ /**
233
+ * Resolve the standard file paths used by the diagnostics broker under
234
+ * `.gdh-state/authoring/diagnostics-broker/`.
235
+ */
236
+ export function resolveDiagnosticsBrokerPaths(stateRootPath) {
237
+ const brokerDir = path.join(stateRootPath, GDH_DIAGNOSTICS_BROKER_STATE_RELATIVE_PATH);
238
+ return {
239
+ brokerDir,
240
+ metadataPath: path.join(brokerDir, "metadata.json"),
241
+ tokenFilePath: path.join(brokerDir, "token"),
242
+ heartbeatPath: path.join(brokerDir, "heartbeat"),
243
+ snapshotPath: path.join(brokerDir, "snapshot.json"),
244
+ };
245
+ }
246
+ // ─── Internal Path Normalization ──────────────────────────────────────────────
247
+ function normalizeBrokerPath(value, pathStyle) {
248
+ const pathModule = pathStyle === "win32" ? path.win32 : path.posix;
249
+ const resolved = pathModule.resolve(value);
250
+ const normalized = pathModule.normalize(resolved);
251
+ const withoutTrailingSeparator = stripTrailingSeparators(normalized, pathModule.parse(normalized).root, pathStyle);
252
+ return pathStyle === "win32"
253
+ ? withoutTrailingSeparator.replaceAll("/", "\\").toLowerCase()
254
+ : withoutTrailingSeparator;
255
+ }
256
+ function stripTrailingSeparators(value, root, pathStyle) {
257
+ let next = value;
258
+ const separators = pathStyle === "win32" ? ["\\", "/"] : ["/"];
259
+ while (next.length > root.length && separators.some((sep) => next.endsWith(sep))) {
260
+ next = next.slice(0, -1);
261
+ }
262
+ return next;
263
+ }
264
+ //# sourceMappingURL=diagnostics-broker-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-broker-contract.js","sourceRoot":"","sources":["../src/diagnostics-broker-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAW7B,OAAO,EACL,uDAAuD,EACvD,oCAAoC,EACpC,uCAAuC,EACvC,0CAA0C,GAC3C,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,uDAAuD,EACvD,oCAAoC,EACpC,uCAAuC,EACvC,0CAA0C,GAC3C,CAAC;AAEF,MAAM,CAAC,MAAM,mDAAmD,GAAG,MAAM,CAAC;AAa1E;;;;;;GAMG;AACH,MAAM,UAAU,wCAAwC,CACtD,KAAoD;IAEpD,MAAM,SAAS,GACb,KAAK,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAExE,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,KAAK,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IACtF,MAAM,8BAA8B,GAAG,mBAAmB,CACxD,KAAK,CAAC,oBAAoB,EAC1B,SAAS,CACV,CAAC;IACF,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IAEpF,OAAO;QACL,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,oBAAoB,EAAE,KAAK,CAAC,oBAAoB;QAChD,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,wBAAwB;QACxB,8BAA8B;QAC9B,uBAAuB;QACvB,SAAS;QACT,WAAW,EAAE;YACX,UAAU,wBAAwB,EAAE;YACpC,SAAS,8BAA8B,EAAE;YACzC,SAAS,uBAAuB,EAAE;YAClC,SAAS,SAAS,EAAE;SACrB,CAAC,IAAI,CAAC,GAAG,CAAC;KACZ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,CAAC,CAAC,EAAE,CAAC;QACjF,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Authoring Diagnostics Broker Service
3
+ *
4
+ * Provides broker status, current snapshot, refresh, doctor, and prune operations
5
+ * for the persistent diagnostics broker.
6
+ *
7
+ * The broker reuses the existing managed Godot LSP lifecycle. It does NOT launch
8
+ * a second Godot editor process. State is stored under:
9
+ * `.gdh-state/authoring/diagnostics-broker/snapshot.json`
10
+ *
11
+ * This file implements the service layer on top of:
12
+ * - packages/authoring/src/diagnostics-broker-contract.ts (pure functions/types)
13
+ * - packages/authoring/src/lsp.ts (managed LSP lifecycle)
14
+ * - packages/authoring/src/lsp-client.ts (TCP LSP client with diagnostics store)
15
+ *
16
+ * ADR: docs/adrs/0003-lsp-based-authoring-validation.md (Persistent Diagnostics Broker Addendum)
17
+ */
18
+ import type { GdhAuthoringStatusResult, GdhDiagnosticsSnapshot, GdhManagedLspStatusResult, GdhProjectConfig } from "@gdh/core";
19
+ export interface GetAuthoringDiagnosticsStatusInput {
20
+ readonly targetPath: string;
21
+ readonly status: GdhAuthoringStatusResult;
22
+ readonly projectConfig: GdhProjectConfig | null;
23
+ }
24
+ export interface GetCurrentAuthoringDiagnosticsInput {
25
+ readonly targetPath: string;
26
+ readonly status: GdhAuthoringStatusResult;
27
+ readonly projectConfig: GdhProjectConfig | null;
28
+ readonly requestedUris?: readonly string[];
29
+ readonly staleAfterMs?: number;
30
+ }
31
+ export interface RefreshAuthoringDiagnosticsInput {
32
+ readonly targetPath: string;
33
+ readonly status: GdhAuthoringStatusResult;
34
+ readonly projectConfig: GdhProjectConfig | null;
35
+ readonly changedFiles?: readonly string[];
36
+ }
37
+ export interface RefreshAuthoringDiagnosticsResult {
38
+ readonly snapshot: GdhDiagnosticsSnapshot;
39
+ readonly filesRefreshed: number;
40
+ readonly lspInstanceId: string | null;
41
+ readonly summary: string;
42
+ }
43
+ export interface DoctorAuthoringDiagnosticsInput {
44
+ readonly targetPath: string;
45
+ readonly status: GdhAuthoringStatusResult;
46
+ readonly projectConfig: GdhProjectConfig | null;
47
+ }
48
+ export interface DoctorAuthoringDiagnosticsResult {
49
+ readonly snapshot: GdhDiagnosticsSnapshot | null;
50
+ readonly lspStatus: GdhManagedLspStatusResult;
51
+ readonly recommendations: readonly string[];
52
+ readonly summary: string;
53
+ }
54
+ export interface PruneAuthoringDiagnosticsInput {
55
+ readonly targetPath: string;
56
+ readonly status: GdhAuthoringStatusResult;
57
+ readonly projectConfig: GdhProjectConfig | null;
58
+ }
59
+ export interface PruneAuthoringDiagnosticsResult {
60
+ readonly pruned: boolean;
61
+ readonly summary: string;
62
+ }
63
+ /**
64
+ * Return a lightweight status summary for the broker: whether a snapshot exists,
65
+ * how many files are tracked, and the snapshot's freshness.
66
+ */
67
+ export declare function getAuthoringDiagnosticsStatus(input: GetAuthoringDiagnosticsStatusInput): Promise<GdhDiagnosticsSnapshot>;
68
+ /**
69
+ * Return the latest stored diagnostics snapshot for this target/worktree.
70
+ * Classifies freshness relative to the staleness threshold.
71
+ * Does not trigger a new LSP refresh.
72
+ */
73
+ export declare function getCurrentAuthoringDiagnostics(input: GetCurrentAuthoringDiagnosticsInput): Promise<GdhDiagnosticsSnapshot>;
74
+ /**
75
+ * Open/refresh the specified (or all project) GDScript files through the managed
76
+ * LSP instance, collect the published diagnostics, and persist the snapshot.
77
+ *
78
+ * The broker does NOT launch a second Godot editor — it reuses the existing
79
+ * managed LSP lifecycle.
80
+ */
81
+ export declare function refreshAuthoringDiagnostics(input: RefreshAuthoringDiagnosticsInput): Promise<RefreshAuthoringDiagnosticsResult>;
82
+ /**
83
+ * Explain the broker's current state without mutating anything.
84
+ * Surfaces recommendations for missing, stale, or unavailable broker states.
85
+ */
86
+ export declare function doctorAuthoringDiagnostics(input: DoctorAuthoringDiagnosticsInput): Promise<DoctorAuthoringDiagnosticsResult>;
87
+ /**
88
+ * Remove the broker snapshot file. Does not affect the managed LSP lifecycle.
89
+ * Bounded to GDH-owned metadata only.
90
+ */
91
+ export declare function pruneAuthoringDiagnostics(input: PruneAuthoringDiagnosticsInput): Promise<PruneAuthoringDiagnosticsResult>;
92
+ //# sourceMappingURL=diagnostics-broker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics-broker.d.ts","sourceRoot":"","sources":["../src/diagnostics-broker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAEV,wBAAwB,EAGxB,sBAAsB,EAEtB,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AAuCnB,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACjD;AAED,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,Q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