gramatr 0.3.51 → 0.3.53

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/bin/statusline.ts CHANGED
@@ -220,7 +220,7 @@ function readLocalStats(): GramatrStats | null {
220
220
  operations_24h: ops24h,
221
221
  classifier: {
222
222
  level: stats.classifier_level || 0,
223
- model: stats.classifier_model || savings.qwen_model || '',
223
+ model: stats.classifier_model || savings.classifier_model || '', // previously: qwen_model
224
224
  accuracy: stats.accuracy || 0,
225
225
  feedback_rate: stats.feedback_rate || 0,
226
226
  total_classifications: stats.total_classifications || 0,
@@ -338,7 +338,7 @@ function getHeartbeat(): Heartbeat {
338
338
  effort: data.effort || '',
339
339
  intent: data.intent || '',
340
340
  confidence: data.confidence ? `${Math.round(data.confidence * 100)}%` : '',
341
- totalMs: st.total_ms || data.qwen_time_ms || 0,
341
+ totalMs: st.total_ms || data.classifier_time_ms || 0, // previously: qwen_time_ms
342
342
  memoryDelivered: data.memory_delivered || 0,
343
343
  stale,
344
344
  };
package/core/routing.ts CHANGED
@@ -88,7 +88,7 @@ export function persistClassificationResult(options: {
88
88
  effort_level: options.route?.classification?.effort_level || null,
89
89
  intent_type: options.route?.classification?.intent_type || null,
90
90
  confidence: options.route?.classification?.confidence ?? null,
91
- classifier_model: options.route?.execution_summary?.qwen_model || null,
91
+ classifier_model: options.route?.execution_summary?.classifier_model || null, // previously: qwen_model
92
92
  downstream_model: options.downstreamModel || null,
93
93
  client_type: options.clientType,
94
94
  agent_name: options.agentName,
package/core/types.ts CHANGED
@@ -130,8 +130,8 @@ export interface RouteResponse {
130
130
  savings_ratio?: number;
131
131
  };
132
132
  execution_summary?: {
133
- qwen_model?: string;
134
- qwen_time_ms?: number;
133
+ classifier_model?: string; // previously: qwen_model
134
+ classifier_time_ms?: number; // previously: qwen_time_ms
135
135
  execution_time_ms?: number;
136
136
  server_version?: string;
137
137
  stage_timing?: Record<string, number>;
package/core/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** Auto-generated by version-sync.ts — do not edit */
2
- export const VERSION = '0.3.51';
2
+ export const VERSION = '0.3.53';
@@ -156,7 +156,7 @@ function formatIntelligence(data: RouteResponse): string {
156
156
  const lines: string[] = [];
157
157
  const serverVersion = es.server_version || '';
158
158
  const versionTag = serverVersion ? ` v${serverVersion}` : '';
159
- lines.push(`[GMTR Intelligence — pre-classified by ${es.qwen_model || 'gramatr'}]`);
159
+ lines.push(`[GMTR Intelligence — pre-classified by ${es.classifier_model || 'gramatr'}]`); // previously: qwen_model
160
160
 
161
161
  // ── PROJECT STATE (Issue #80 — render FIRST so agent can't miss it) ──
162
162
  const ps = data.project_state;
@@ -460,7 +460,7 @@ function emitStatus(data: RouteResponse | null, elapsed: number): void {
460
460
  const version = es.server_version ? `v${es.server_version}` : '';
461
461
 
462
462
  // Summary line
463
- const classifier = es.qwen_model || 'unknown';
463
+ const classifier = es.classifier_model || 'unknown'; // previously: qwen_model
464
464
  const confidence = c.confidence ? `${Math.round(c.confidence * 100)}%` : '';
465
465
  process.stderr.write(
466
466
  `[grāmatr${version ? ' ' + version : ''}] ✓ ${c.effort_level || '?'}/${c.intent_type || '?'} ${confidence} (${classifier}, ${elapsed}ms)\n`
@@ -580,8 +580,8 @@ async function main() {
580
580
  const savingsEntry = {
581
581
  tokens_saved: ts.total_saved || ts.tokens_saved || 0,
582
582
  savings_ratio: ts.savings_ratio || 0,
583
- qwen_model: es.qwen_model || null,
584
- qwen_time_ms: es.qwen_time_ms || 0,
583
+ classifier_model: es.classifier_model || null, // previously: qwen_model
584
+ classifier_time_ms: es.classifier_time_ms || 0, // previously: qwen_time_ms
585
585
  effort: cl.effort_level || null,
586
586
  intent: cl.intent_type || null,
587
587
  confidence: cl.confidence || null,
@@ -599,8 +599,8 @@ async function main() {
599
599
  if (savingsEntry.tokens_saved > 0) {
600
600
  const historyEntry = JSON.stringify({
601
601
  tool: 'classification',
602
- model: savingsEntry.qwen_model,
603
- time_ms: savingsEntry.qwen_time_ms,
602
+ model: savingsEntry.classifier_model,
603
+ time_ms: savingsEntry.classifier_time_ms,
604
604
  tokens_saved: savingsEntry.tokens_saved,
605
605
  cache_hit: false,
606
606
  timestamp: Date.now(),
@@ -100,7 +100,7 @@ async function main() {
100
100
  const metricsFile = '/tmp/gmtr-last-op.json';
101
101
  const metrics = {
102
102
  tool: shortName,
103
- model: summary?.qwen_model || null,
103
+ model: summary?.classifier_model || null, // previously: qwen_model
104
104
  time_ms: summary?.execution_time_ms || null,
105
105
  tokens_saved: summary?.tokens_saved || null,
106
106
  cache_hit: summary?.cache_hit ?? null,
@@ -119,7 +119,7 @@ async function main() {
119
119
  try {
120
120
  const historyEntry = JSON.stringify({
121
121
  tool: shortName,
122
- model: summary?.qwen_model || null,
122
+ model: summary?.classifier_model || null, // previously: qwen_model
123
123
  time_ms: summary?.execution_time_ms || 0,
124
124
  tokens_saved: summary?.tokens_saved || 0,
125
125
  cache_hit: summary?.cache_hit ?? false,
@@ -9,9 +9,9 @@
9
9
 
10
10
  export interface ExecutionSummary {
11
11
  execution_time_ms?: number;
12
- qwen_calls?: number;
13
- qwen_time_ms?: number;
14
- qwen_model?: string;
12
+ classifier_calls?: number; // previously: qwen_calls
13
+ classifier_time_ms?: number; // previously: qwen_time_ms
14
+ classifier_model?: string; // previously: qwen_model
15
15
  tokens_saved?: number;
16
16
  savings_ratio?: number;
17
17
  cache_hit?: boolean;
@@ -72,9 +72,9 @@ export function buildStatusLine(toolShortName: string, summary: ExecutionSummary
72
72
  parts.push(formatMs(summary.execution_time_ms));
73
73
  }
74
74
 
75
- if (summary.qwen_calls && summary.qwen_calls > 0) {
76
- const model = summary.qwen_model || 'qwen2.5:14b';
77
- const time = summary.qwen_time_ms ? ` ${formatMs(summary.qwen_time_ms)}` : '';
75
+ if (summary.classifier_calls && summary.classifier_calls > 0) {
76
+ const model = summary.classifier_model || 'qwen2.5:14b';
77
+ const time = summary.classifier_time_ms ? ` ${formatMs(summary.classifier_time_ms)}` : '';
78
78
  parts.push(`${model}${time}`);
79
79
  }
80
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gramatr",
3
- "version": "0.3.51",
3
+ "version": "0.3.53",
4
4
  "description": "grāmatr — context engineering layer for AI coding agents. Every prompt gets a pre-computed intelligence packet: decision routing, capability audit, behavioral directives, memory pre-load, and ISC scaffolds. Continuity across sessions for Claude Code, Codex, and Gemini CLI.",
5
5
  "license": "MIT",
6
6
  "repository": {