@happyvertical/smrt-inference 0.60.16 → 0.60.17

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.
@@ -60,20 +60,20 @@ function revert(): void {
60
60
  }
61
61
  </script>
62
62
 
63
- <div class="its" data-testid="inference-transcripts">
63
+ <div class="smrt-inference-transcript-settings__root" data-testid="inference-transcripts" data-smrt-component="InferenceTranscriptSettings">
64
64
  {#if settings.envEnabled !== null && settings.envEnabled !== undefined}
65
- <p class="its-hint" data-testid="inference-transcripts-env">
65
+ <p class="smrt-inference-transcript-settings__hint" data-smrt-part="description" data-testid="inference-transcripts-env">
66
66
  SMRT_INFERENCE_TRANSCRIPTS turns transcripts {settings.envEnabled ? 'on' : 'off'} over this setting.
67
67
  </p>
68
68
  {/if}
69
69
  {#if editable}
70
- <form class="its-form" onsubmit={save} data-testid="inference-transcripts-form">
70
+ <form class="smrt-inference-transcript-settings__form" data-smrt-part="field" onsubmit={save} data-testid="inference-transcripts-form">
71
71
  <label>
72
72
  <input type="checkbox" name="enabled" checked={settings.enabled} disabled={busy} />
73
73
  Store transcripts
74
74
  </label>
75
75
  <label>
76
- <span class="its-hint">Success sample rate (0–1)</span>
76
+ <span class="smrt-inference-transcript-settings__hint" data-smrt-part="description">Success sample rate (0–1)</span>
77
77
  <input
78
78
  type="number"
79
79
  name="sample"
@@ -86,7 +86,7 @@ function revert(): void {
86
86
  />
87
87
  </label>
88
88
  <label>
89
- <span class="its-hint">Max bytes per call</span>
89
+ <span class="smrt-inference-transcript-settings__hint" data-smrt-part="description">Max bytes per call</span>
90
90
  <input
91
91
  type="number"
92
92
  name="maxBytes"
@@ -107,7 +107,7 @@ function revert(): void {
107
107
  {/if}
108
108
  </form>
109
109
  {/if}
110
- <dl class="its-values">
110
+ <dl class="smrt-inference-transcript-settings__values" data-smrt-part="list">
111
111
  {#if !editable}
112
112
  <dt>Stored</dt>
113
113
  <dd data-testid="inference-transcripts-enabled">{settings.enabled ? 'On' : 'Off'}</dd>
@@ -124,42 +124,48 @@ function revert(): void {
124
124
  {/if}
125
125
  </dl>
126
126
  {#if settings.promptOverrides && settings.promptOverrides.length > 0}
127
- <p class="its-hint">
127
+ <p class="smrt-inference-transcript-settings__hint" data-smrt-part="description">
128
128
  Config sets its own sample rate for {settings.promptOverrides.length} prompt key(s).
129
129
  </p>
130
130
  {/if}
131
131
  {#if !editable}
132
- <p class="its-hint">App-wide setting; tenants cannot change it.</p>
132
+ <p class="smrt-inference-transcript-settings__hint" data-smrt-part="description">App-wide setting; tenants cannot change it.</p>
133
133
  {/if}
134
134
  </div>
135
135
 
136
136
  <style>
137
137
  @layer smrt.reset, smrt.structure, smrt.theme;
138
- @layer smrt.theme {
139
- .its {
138
+ @layer smrt.structure {
139
+ .smrt-inference-transcript-settings__root {
140
140
  display: flex;
141
141
  flex-direction: column;
142
142
  gap: 0.5rem;
143
143
  }
144
- .its-form {
144
+ .smrt-inference-transcript-settings__form {
145
145
  display: flex;
146
146
  gap: 0.75rem;
147
147
  align-items: flex-end;
148
148
  flex-wrap: wrap;
149
149
  }
150
- .its-values {
150
+ .smrt-inference-transcript-settings__values {
151
151
  display: grid;
152
152
  grid-template-columns: max-content 1fr;
153
153
  gap: 0.25rem 0.75rem;
154
154
  margin: 0;
155
155
  }
156
- .its-values dd {
156
+ .smrt-inference-transcript-settings__values dd {
157
157
  margin: 0;
158
158
  }
159
- .its-hint {
159
+ .smrt-inference-transcript-settings__hint {
160
160
  margin: 0;
161
+ }
162
+ }
163
+
164
+ @layer smrt.theme {
165
+ .smrt-inference-transcript-settings__hint {
161
166
  font-size: 0.8125rem;
162
167
  color: var(--smrt-color-on-surface-variant);
163
168
  }
164
169
  }
170
+
165
171
  </style>
@@ -70,15 +70,15 @@ function regroup(event: Event): void {
70
70
  }
71
71
  </script>
72
72
 
73
- <div class="iut" data-testid="inference-usage">
73
+ <div class="smrt-inference-usage-table__root" data-testid="inference-usage" data-smrt-component="InferenceUsageTable">
74
74
  {#if transcriptsEnabled === false}
75
- <p class="iut-label" role="status" data-testid="inference-transcripts-off">
75
+ <p class="smrt-inference-usage-table__label" data-smrt-part="label" role="status" data-testid="inference-transcripts-off">
76
76
  Transcripts are off; turn them on with <code>inference.transcripts.enabled</code> (Advanced, Transcripts) or <code>SMRT_INFERENCE_TRANSCRIPTS=1</code>.
77
77
  </p>
78
78
  {/if}
79
79
  {#if onUsageGroupBy}
80
- <form class="iut-group">
81
- <span class="iut-label">Group by</span>
80
+ <form class="smrt-inference-usage-table__group" data-smrt-part="field">
81
+ <span class="smrt-inference-usage-table__label" data-smrt-part="label">Group by</span>
82
82
  {#each DIMENSIONS as dimension (dimension.id)}
83
83
  <label>
84
84
  <input
@@ -95,10 +95,10 @@ function regroup(event: Event): void {
95
95
  </form>
96
96
  {/if}
97
97
  {#if !usage || usage.buckets.length === 0}
98
- <p class="iut-label">No usage recorded yet.</p>
98
+ <p class="smrt-inference-usage-table__label" data-smrt-part="label">No usage recorded yet.</p>
99
99
  {:else}
100
- <table class="iut-table">
101
- <thead>
100
+ <table class="smrt-inference-usage-table__table" data-smrt-part="table">
101
+ <thead data-smrt-part="header">
102
102
  <tr>
103
103
  {#each columns as column (column)}
104
104
  <th scope="col">{DIMENSIONS.find((entry) => entry.id === column)?.label ?? column}</th>
@@ -110,7 +110,7 @@ function regroup(event: Event): void {
110
110
  {#if showTranscripts}<th scope="col">Transcripts</th>{/if}
111
111
  </tr>
112
112
  </thead>
113
- <tbody>
113
+ <tbody data-smrt-part="body">
114
114
  {#each usage.buckets as bucket, index (index)}
115
115
  <tr>
116
116
  {#each columns as column (column)}
@@ -120,7 +120,7 @@ function regroup(event: Event): void {
120
120
  <td>{bucket.totalTokens}</td>
121
121
  <td>
122
122
  ${bucket.estimatedCost.toFixed(4)}
123
- {#if bucket.uncostedCalls}<span class="iut-label">({bucket.uncostedCalls} uncosted)</span>{/if}
123
+ {#if bucket.uncostedCalls}<span class="smrt-inference-usage-table__label" data-smrt-part="label">({bucket.uncostedCalls} uncosted)</span>{/if}
124
124
  </td>
125
125
  <td>
126
126
  {#each outcomeEntries(bucket.outcomes) as [label, count], position (label)}
@@ -141,37 +141,46 @@ function regroup(event: Event): void {
141
141
  {/each}
142
142
  </tbody>
143
143
  </table>
144
- {#if usage.costBasis}<p class="iut-label">{usage.costBasis}</p>{/if}
144
+ {#if usage.costBasis}<p class="smrt-inference-usage-table__label" data-smrt-part="label">{usage.costBasis}</p>{/if}
145
145
  {/if}
146
146
  </div>
147
147
 
148
148
  <style>
149
149
  @layer smrt.reset, smrt.structure, smrt.theme;
150
- @layer smrt.theme {
151
- .iut {
150
+ @layer smrt.structure {
151
+ .smrt-inference-usage-table__root {
152
152
  display: flex;
153
153
  flex-direction: column;
154
154
  gap: 0.75rem;
155
155
  }
156
- .iut-group {
156
+ .smrt-inference-usage-table__group {
157
157
  display: flex;
158
158
  gap: 0.75rem;
159
159
  align-items: center;
160
160
  }
161
- .iut-table {
161
+ .smrt-inference-usage-table__table th,
162
+ .smrt-inference-usage-table__table td {
163
+ padding: 0.25rem 0.75rem 0.25rem 0;
164
+ }
165
+ .smrt-inference-usage-table__label {
166
+ margin: 0;
167
+ }
168
+ }
169
+
170
+ @layer smrt.theme {
171
+ .smrt-inference-usage-table__table {
162
172
  border-collapse: collapse;
163
173
  font-size: 0.875rem;
164
174
  }
165
- .iut-table th,
166
- .iut-table td {
175
+ .smrt-inference-usage-table__table th,
176
+ .smrt-inference-usage-table__table td {
167
177
  text-align: left;
168
- padding: 0.25rem 0.75rem 0.25rem 0;
169
178
  border-bottom: var(--smrt-hairline);
170
179
  }
171
- .iut-label {
172
- margin: 0;
180
+ .smrt-inference-usage-table__label {
173
181
  font-size: 0.8125rem;
174
182
  color: var(--smrt-color-on-surface-variant);
175
183
  }
176
184
  }
185
+
177
186
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-inference",
3
- "version": "0.60.16",
3
+ "version": "0.60.17",
4
4
  "description": "Inference alias chains with classified failures, recorded fallback and ladder degradation, consumer-defined fusions, per-user and per-tenant bindings, the InferenceSettingsPanel, hosted provisioning and spend gate, and the smrt doctor --ai binding check, for SMRT inference tiers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -45,17 +45,17 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@happyvertical/ai": "^0.111.8",
49
- "@happyvertical/smrt-config": "0.60.16",
50
- "@happyvertical/smrt-core": "0.60.16",
51
- "@happyvertical/smrt-prompts": "0.60.16",
52
- "@happyvertical/smrt-secrets": "0.60.16",
53
- "@happyvertical/smrt-tenancy": "0.60.16",
54
- "@happyvertical/smrt-users": "0.60.16",
55
- "@happyvertical/sql": "^0.111.8"
48
+ "@happyvertical/ai": "^0.112.2",
49
+ "@happyvertical/smrt-config": "0.60.17",
50
+ "@happyvertical/smrt-core": "0.60.17",
51
+ "@happyvertical/smrt-prompts": "0.60.17",
52
+ "@happyvertical/smrt-secrets": "0.60.17",
53
+ "@happyvertical/smrt-tenancy": "0.60.17",
54
+ "@happyvertical/smrt-users": "0.60.17",
55
+ "@happyvertical/sql": "^0.112.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@happyvertical/smrt-vitest": "0.60.16",
58
+ "@happyvertical/smrt-vitest": "0.60.17",
59
59
  "@sveltejs/package": "^2.5.8",
60
60
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
61
61
  "@types/node": "24.13.6",