@ghl-ai/aw 0.1.37-beta.76 → 0.1.37-beta.77

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.
@@ -191,12 +191,13 @@ function resolveNamespace() {
191
191
  } catch { return null; }
192
192
  }
193
193
 
194
- function detectPlatform() {
194
+ function detectPlatform(input) {
195
+ if (input?.hook_event_name || input?.cursor_version || input?.conversation_id) return 'cursor';
195
196
  if (process.env.CLAUDECODE) return 'claude-code';
196
197
  if (process.env.CURSOR_TRACE_ID || process.env.CURSOR_PROJECT_DIR) return 'cursor';
197
198
  if (Object.keys(process.env).some(k => k.startsWith('WINDSURF_'))) return 'windsurf';
198
199
  if (Object.keys(process.env).some(k => k.startsWith('CODEX_'))) return 'codex';
199
- return 'claude-code'; // default assumption
200
+ return 'claude-code';
200
201
  }
201
202
 
202
203
  function computeProjectHash(cwd) {
@@ -657,7 +658,7 @@ export async function handleSessionStart(rawInput) {
657
658
  session_id: sessionId,
658
659
  branch: getBranch(cwd),
659
660
  project_hash: computeProjectHash(cwd),
660
- platform: detectPlatform(),
661
+ platform: detectPlatform(rawInput),
661
662
  platform_version: input.platform_version || null,
662
663
  namespace: resolveNamespace(),
663
664
  start_ts: new Date().toISOString(),
@@ -741,7 +742,7 @@ export async function handleStop(rawInput) {
741
742
  total_tokens: deltaTotal,
742
743
  cost_usd: Math.round(deltaCost * 1_000_000) / 1_000_000,
743
744
  status,
744
- platform: detectPlatform(),
745
+ platform: detectPlatform(rawInput),
745
746
  };
746
747
  appendFileSync(costPath, JSON.stringify(record) + '\n');
747
748
  } catch { /* never block */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.37-beta.76",
3
+ "version": "0.1.37-beta.77",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": "bin.js",