noctrace 1.2.0 → 1.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.
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Provider registry for Noctrace multi-provider support.
3
+ * Phase A: registers the 'claude-code' provider by default.
4
+ * Additional providers (Codex, Copilot, etc.) will be registered in Phase B/C.
5
+ */
6
+ import { createClaudeCodeProvider } from './claude-code.js';
7
+ import { createCodexProvider } from './codex.js';
8
+ // ---------------------------------------------------------------------------
9
+ // Registry
10
+ // ---------------------------------------------------------------------------
11
+ const _registry = new Map();
12
+ /**
13
+ * Register a provider in the global registry.
14
+ * Overwrites any existing provider with the same id.
15
+ * Use this in tests to inject mock or fixture-backed providers.
16
+ */
17
+ export function registerProvider(provider) {
18
+ _registry.set(provider.id, provider);
19
+ }
20
+ /**
21
+ * Retrieve a provider by its stable id.
22
+ * Returns undefined when no provider with that id is registered.
23
+ */
24
+ export function getProvider(id) {
25
+ return _registry.get(id);
26
+ }
27
+ /**
28
+ * Return all currently registered providers as an array.
29
+ */
30
+ export function listProviders() {
31
+ return Array.from(_registry.values());
32
+ }
33
+ // ---------------------------------------------------------------------------
34
+ // Default registration
35
+ // ---------------------------------------------------------------------------
36
+ // Register the Claude Code provider with default settings.
37
+ // The claudeHome path is resolved from CLAUDE_HOME env var or ~/.claude.
38
+ registerProvider(createClaudeCodeProvider());
39
+ // Register the Codex CLI provider.
40
+ // The codexHome path is resolved from CODEX_HOME env var or ~/.codex.
41
+ registerProvider(createCodexProvider());
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Core Provider interface and supporting types for the multi-provider abstraction.
3
+ * Phase A: defines the contract that all agent-log providers must implement.
4
+ */
5
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Normalised session schema shared across all providers.
3
+ * Phase A: minimal contract — providers pass rich data through `native`.
4
+ * Phase B/C may introduce richer normalised fields on AgentSession.
5
+ */
6
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noctrace",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Claude Code observability — DevTools-style waterfall visualizer for AI agent workflows, token tracking, and context health monitoring",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -61,6 +61,8 @@
61
61
  "test:smoke": "npm run build && vitest run tests/smoke/",
62
62
  "lint": "eslint src/",
63
63
  "typecheck": "tsc -p tsconfig.server.json --noEmit && tsc -p tsconfig.client.json --noEmit",
64
+ "version:check": "node scripts/check-version.mjs",
65
+ "version:bump": "node scripts/bump-version.mjs",
64
66
  "postinstall": "node bin/postinstall.js",
65
67
  "preuninstall": "node bin/preuninstall.js"
66
68
  },