@mrclrchtr/supi-debug 2.6.0 → 2.7.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/README.md CHANGED
@@ -114,7 +114,7 @@ Defaults come from the shared debug registry:
114
114
 
115
115
  ## Extra status logging
116
116
 
117
- If `SUPI_LOG_STATUS` is enabled in the environment, the package emits a versioned SuPi load-status marker to stderr on `session_start` and appends the same payload as a session entry. Version 2 reports observed tool and command inventory only; external harnesses decide which resources they require.
117
+ If `SUPI_LOG_STATUS` is enabled in the environment, the package emits a versioned SuPi load-status marker to stderr during `resources_discover` (after session-start registrations) and appends the same payload as a session entry. The payload uses `phase: "resources_discover"`. Version 2 reports observed tool and command inventory only; external harnesses decide which resources they require.
118
118
 
119
119
  ## Source
120
120
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-debug",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "SuPi Debug extension — shared debug event inspection for SuPi extensions",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "README.md"
32
32
  ],
33
33
  "dependencies": {
34
- "@mrclrchtr/supi-core": "2.6.0"
34
+ "@mrclrchtr/supi-core": "2.7.0"
35
35
  },
36
36
  "bundledDependencies": [
37
37
  "@mrclrchtr/supi-core"
package/src/debug.ts CHANGED
@@ -279,7 +279,12 @@ export default function debugExtension(pi: ExtensionAPI) {
279
279
  pi.on("session_start", async (_event, ctx) => {
280
280
  clearDebugEvents();
281
281
  applyDebugConfig(ctx.cwd);
282
- maybeLogLoadStatus(pi, ctx.cwd);
282
+ });
283
+
284
+ // Commands registered during every extension's session_start handler are
285
+ // available before resource discovery, so this inventory is load-order safe.
286
+ pi.on("resources_discover", async (_event, ctx) => {
287
+ maybeLogLoadStatus(pi, ctx.cwd, "resources_discover");
283
288
  });
284
289
 
285
290
  pi.registerCommand("supi-debug", {
package/src/status-log.ts CHANGED
@@ -24,7 +24,11 @@ function statusLogEnabled(): boolean {
24
24
  * stderr is captured by Harbor's `2>&1 | tee pi.txt` command for `--no-session`
25
25
  * runs where session entries are not inspectable.
26
26
  */
27
- export function maybeLogLoadStatus(pi: ExtensionAPI, cwd: string): void {
27
+ export function maybeLogLoadStatus(
28
+ pi: ExtensionAPI,
29
+ cwd: string,
30
+ phase: "session_start" | "resources_discover" = "session_start",
31
+ ): void {
28
32
  if (!statusLogEnabled()) return;
29
33
 
30
34
  const allTools = typeof pi.getAllTools === "function" ? pi.getAllTools() : [];
@@ -37,7 +41,7 @@ export function maybeLogLoadStatus(pi: ExtensionAPI, cwd: string): void {
37
41
  const status = {
38
42
  type: "supi_status",
39
43
  version: 2,
40
- phase: "session_start",
44
+ phase,
41
45
  cwd,
42
46
  tools: {
43
47
  registered: registeredToolNames,