@theagenthealth/agenthealth 0.14.0 → 0.15.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
@@ -6,10 +6,10 @@ not supported. All implemented adapters and graph configurations use the same
6
6
  AHS v1 configuration and result contracts as the CLI.
7
7
 
8
8
  ```sh
9
- npm install @theagenthealth/agenthealth@0.14.0
9
+ npm install @theagenthealth/agenthealth@0.15.0
10
10
  ```
11
11
 
12
- Install and verify CLI **v0.14.0** separately using the
12
+ Install and verify CLI **v0.15.0** separately using the
13
13
  [installation guide](../../docs/installation.md). The SDK never downloads or
14
14
  executes binaries at import/install time. A mismatched CLI raises
15
15
  `CompatibilityError` before running checks.
@@ -57,3 +57,6 @@ a CLI/server capability, rather than an SDK HTTP server.
57
57
  See the [SDK guide](../../docs/javascript-sdk.md),
58
58
  [example](../../examples/javascript-sdk/README.md), and
59
59
  [Phase 16 impact review](../../docs/phase-16-alignment.md).
60
+
61
+ Source release target: v0.15.0. Requires the matching CLI; model/LLM
62
+ configuration is supported through the canonical schema.
package/index.js CHANGED
@@ -7,7 +7,7 @@ import { performance } from 'node:perf_hooks';
7
7
  import Ajv2020 from 'ajv/dist/2020.js';
8
8
  import { parseDocument } from 'yaml';
9
9
 
10
- export const version = '0.14.0';
10
+ export const version = '0.15.0';
11
11
  export const healthStates = Object.freeze(['HEALTHY', 'DEGRADED', 'UNHEALTHY', 'UNREACHABLE', 'MISCONFIGURED', 'UNKNOWN']);
12
12
  export class AgentHealthError extends Error {
13
13
  constructor(message) { super(message); this.name = new.target.name; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theagenthealth/agenthealth",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Typed Node.js SDK for the AgentHealth reference CLI",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -750,6 +750,9 @@
750
750
  "type": "integer",
751
751
  "minimum": 1,
752
752
  "maximum": 60000
753
+ },
754
+ "model": {
755
+ "$ref": "#/$defs/ModelOptions"
753
756
  }
754
757
  },
755
758
  "required": [
@@ -1192,6 +1195,142 @@
1192
1195
  }
1193
1196
  }
1194
1197
  }
1198
+ },
1199
+ {
1200
+ "if": {
1201
+ "required": [
1202
+ "model"
1203
+ ]
1204
+ },
1205
+ "then": {
1206
+ "properties": {
1207
+ "type": {
1208
+ "enum": [
1209
+ "model",
1210
+ "llm"
1211
+ ]
1212
+ }
1213
+ }
1214
+ }
1215
+ },
1216
+ {
1217
+ "if": {
1218
+ "required": [
1219
+ "model"
1220
+ ],
1221
+ "properties": {
1222
+ "model": {
1223
+ "required": [
1224
+ "functional"
1225
+ ]
1226
+ }
1227
+ }
1228
+ },
1229
+ "then": {
1230
+ "required": [
1231
+ "checks"
1232
+ ],
1233
+ "properties": {
1234
+ "checks": {
1235
+ "contains": {
1236
+ "const": "functional"
1237
+ }
1238
+ }
1239
+ }
1240
+ }
1241
+ },
1242
+ {
1243
+ "if": {
1244
+ "required": [
1245
+ "type",
1246
+ "checks"
1247
+ ],
1248
+ "properties": {
1249
+ "type": {
1250
+ "enum": [
1251
+ "model",
1252
+ "llm"
1253
+ ]
1254
+ },
1255
+ "checks": {
1256
+ "contains": {
1257
+ "const": "functional"
1258
+ }
1259
+ }
1260
+ }
1261
+ },
1262
+ "then": {
1263
+ "required": [
1264
+ "model"
1265
+ ],
1266
+ "properties": {
1267
+ "model": {
1268
+ "required": [
1269
+ "functional"
1270
+ ]
1271
+ }
1272
+ }
1273
+ }
1274
+ },
1275
+ {
1276
+ "if": {
1277
+ "required": [
1278
+ "model",
1279
+ "checks"
1280
+ ],
1281
+ "properties": {
1282
+ "model": {
1283
+ "required": [
1284
+ "required_models"
1285
+ ],
1286
+ "properties": {
1287
+ "required_models": {
1288
+ "minItems": 1
1289
+ }
1290
+ }
1291
+ }
1292
+ }
1293
+ },
1294
+ "then": {
1295
+ "properties": {
1296
+ "checks": {
1297
+ "contains": {
1298
+ "const": "capability"
1299
+ }
1300
+ }
1301
+ }
1302
+ }
1303
+ },
1304
+ {
1305
+ "if": {
1306
+ "required": [
1307
+ "model"
1308
+ ],
1309
+ "properties": {
1310
+ "model": {
1311
+ "required": [
1312
+ "api",
1313
+ "functional"
1314
+ ],
1315
+ "properties": {
1316
+ "api": {
1317
+ "const": "anthropic"
1318
+ },
1319
+ "functional": {
1320
+ "required": [
1321
+ "token_parameter"
1322
+ ],
1323
+ "properties": {
1324
+ "token_parameter": {
1325
+ "const": "max_completion_tokens"
1326
+ }
1327
+ }
1328
+ }
1329
+ }
1330
+ }
1331
+ }
1332
+ },
1333
+ "then": false
1195
1334
  }
1196
1335
  ]
1197
1336
  },
@@ -1670,6 +1809,72 @@
1670
1809
  "ref"
1671
1810
  ],
1672
1811
  "additionalProperties": false
1812
+ },
1813
+ "ModelOptions": {
1814
+ "type": "object",
1815
+ "additionalProperties": false,
1816
+ "properties": {
1817
+ "api": {
1818
+ "enum": [
1819
+ "",
1820
+ "openai",
1821
+ "anthropic"
1822
+ ],
1823
+ "description": "Inference API dialect. Empty selects openai (OpenAI-compatible)."
1824
+ },
1825
+ "required_models": {
1826
+ "type": "array",
1827
+ "uniqueItems": true,
1828
+ "items": {
1829
+ "type": "string",
1830
+ "minLength": 1,
1831
+ "pattern": "\\S"
1832
+ }
1833
+ },
1834
+ "functional": {
1835
+ "$ref": "#/$defs/ModelInference"
1836
+ }
1837
+ }
1838
+ },
1839
+ "ModelInference": {
1840
+ "type": "object",
1841
+ "additionalProperties": false,
1842
+ "required": [
1843
+ "safe",
1844
+ "model",
1845
+ "prompt"
1846
+ ],
1847
+ "properties": {
1848
+ "safe": {
1849
+ "const": true
1850
+ },
1851
+ "model": {
1852
+ "type": "string",
1853
+ "minLength": 1,
1854
+ "pattern": "\\S"
1855
+ },
1856
+ "prompt": {
1857
+ "type": "string",
1858
+ "minLength": 1,
1859
+ "maxLength": 4096,
1860
+ "pattern": "\\S",
1861
+ "description": "Go validation additionally limits UTF-8 prompt to 4096 bytes."
1862
+ },
1863
+ "max_output_tokens": {
1864
+ "type": "integer",
1865
+ "minimum": 1,
1866
+ "maximum": 1024,
1867
+ "default": 16
1868
+ },
1869
+ "token_parameter": {
1870
+ "enum": [
1871
+ "",
1872
+ "max_tokens",
1873
+ "max_completion_tokens"
1874
+ ],
1875
+ "description": "OpenAI-compatible output limit field; empty selects max_tokens. The anthropic api always uses max_tokens."
1876
+ }
1877
+ }
1673
1878
  }
1674
1879
  },
1675
1880
  "type": "object",