@hasna/switcher 0.2.0 → 0.2.2
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 +85 -6
- package/dist/cli/index.js +2034 -1169
- package/dist/credentials.d.ts +96 -7
- package/dist/direct-launch.d.ts +2 -1
- package/dist/domain.d.ts +63 -1
- package/dist/generated/api.d.ts +32 -0
- package/dist/index.js +11 -1
- package/dist/launcher.d.ts +1 -0
- package/dist/mcp/index.js +106 -4
- package/dist/opencode.d.ts +30 -0
- package/dist/presets.d.ts +8 -0
- package/dist/sdk.d.ts +36 -0
- package/dist/sdk.js +11 -1
- package/dist/serve/index.js +106 -4
- package/openapi.json +93 -1
- package/package.json +3 -2
package/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Switcher API",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.2",
|
|
6
6
|
"description": "Authenticated provider/profile/catalog control plane. Launches run locally; the API never returns provider credentials."
|
|
7
7
|
},
|
|
8
8
|
"security": [
|
|
@@ -1232,6 +1232,29 @@
|
|
|
1232
1232
|
"api-key"
|
|
1233
1233
|
]
|
|
1234
1234
|
},
|
|
1235
|
+
"credentialCheck": {
|
|
1236
|
+
"type": "object",
|
|
1237
|
+
"properties": {
|
|
1238
|
+
"method": {
|
|
1239
|
+
"type": "string",
|
|
1240
|
+
"enum": [
|
|
1241
|
+
"GET",
|
|
1242
|
+
"HEAD"
|
|
1243
|
+
],
|
|
1244
|
+
"default": "GET"
|
|
1245
|
+
},
|
|
1246
|
+
"path": {
|
|
1247
|
+
"type": "string",
|
|
1248
|
+
"minLength": 1,
|
|
1249
|
+
"maxLength": 200,
|
|
1250
|
+
"pattern": "^[a-zA-Z0-9_~!$&'()*+,;=:@%./-]+$"
|
|
1251
|
+
}
|
|
1252
|
+
},
|
|
1253
|
+
"required": [
|
|
1254
|
+
"path"
|
|
1255
|
+
],
|
|
1256
|
+
"additionalProperties": false
|
|
1257
|
+
},
|
|
1235
1258
|
"catalogBaseUrl": {
|
|
1236
1259
|
"type": "string",
|
|
1237
1260
|
"maxLength": 2000
|
|
@@ -1341,6 +1364,29 @@
|
|
|
1341
1364
|
],
|
|
1342
1365
|
"default": "bearer"
|
|
1343
1366
|
},
|
|
1367
|
+
"credentialCheck": {
|
|
1368
|
+
"type": "object",
|
|
1369
|
+
"properties": {
|
|
1370
|
+
"method": {
|
|
1371
|
+
"type": "string",
|
|
1372
|
+
"enum": [
|
|
1373
|
+
"GET",
|
|
1374
|
+
"HEAD"
|
|
1375
|
+
],
|
|
1376
|
+
"default": "GET"
|
|
1377
|
+
},
|
|
1378
|
+
"path": {
|
|
1379
|
+
"type": "string",
|
|
1380
|
+
"minLength": 1,
|
|
1381
|
+
"maxLength": 200,
|
|
1382
|
+
"pattern": "^[a-zA-Z0-9_~!$&'()*+,;=:@%./-]+$"
|
|
1383
|
+
}
|
|
1384
|
+
},
|
|
1385
|
+
"required": [
|
|
1386
|
+
"path"
|
|
1387
|
+
],
|
|
1388
|
+
"additionalProperties": false
|
|
1389
|
+
},
|
|
1344
1390
|
"catalogBaseUrl": {
|
|
1345
1391
|
"type": "string",
|
|
1346
1392
|
"maxLength": 2000
|
|
@@ -1619,6 +1665,29 @@
|
|
|
1619
1665
|
],
|
|
1620
1666
|
"default": "bearer"
|
|
1621
1667
|
},
|
|
1668
|
+
"credentialCheck": {
|
|
1669
|
+
"type": "object",
|
|
1670
|
+
"properties": {
|
|
1671
|
+
"method": {
|
|
1672
|
+
"type": "string",
|
|
1673
|
+
"enum": [
|
|
1674
|
+
"GET",
|
|
1675
|
+
"HEAD"
|
|
1676
|
+
],
|
|
1677
|
+
"default": "GET"
|
|
1678
|
+
},
|
|
1679
|
+
"path": {
|
|
1680
|
+
"type": "string",
|
|
1681
|
+
"minLength": 1,
|
|
1682
|
+
"maxLength": 200,
|
|
1683
|
+
"pattern": "^[a-zA-Z0-9_~!$&'()*+,;=:@%./-]+$"
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
"required": [
|
|
1687
|
+
"path"
|
|
1688
|
+
],
|
|
1689
|
+
"additionalProperties": false
|
|
1690
|
+
},
|
|
1622
1691
|
"catalogBaseUrl": {
|
|
1623
1692
|
"type": "string",
|
|
1624
1693
|
"maxLength": 2000
|
|
@@ -2741,6 +2810,29 @@
|
|
|
2741
2810
|
],
|
|
2742
2811
|
"default": "bearer"
|
|
2743
2812
|
},
|
|
2813
|
+
"credentialCheck": {
|
|
2814
|
+
"type": "object",
|
|
2815
|
+
"properties": {
|
|
2816
|
+
"method": {
|
|
2817
|
+
"type": "string",
|
|
2818
|
+
"enum": [
|
|
2819
|
+
"GET",
|
|
2820
|
+
"HEAD"
|
|
2821
|
+
],
|
|
2822
|
+
"default": "GET"
|
|
2823
|
+
},
|
|
2824
|
+
"path": {
|
|
2825
|
+
"type": "string",
|
|
2826
|
+
"minLength": 1,
|
|
2827
|
+
"maxLength": 200,
|
|
2828
|
+
"pattern": "^[a-zA-Z0-9_~!$&'()*+,;=:@%./-]+$"
|
|
2829
|
+
}
|
|
2830
|
+
},
|
|
2831
|
+
"required": [
|
|
2832
|
+
"path"
|
|
2833
|
+
],
|
|
2834
|
+
"additionalProperties": false
|
|
2835
|
+
},
|
|
2744
2836
|
"catalogBaseUrl": {
|
|
2745
2837
|
"type": "string",
|
|
2746
2838
|
"maxLength": 2000
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/switcher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Universal provider and model switcher for coding harnesses with an API, SDK and self-hosted storage",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
"test:native-kilo": "bun scripts/test-native-kilo.ts",
|
|
62
62
|
"test:native-kilo-lifecycle": "bun scripts/test-native-kilo-lifecycle.ts",
|
|
63
63
|
"test:native-chatgpt-runtime": "bun scripts/test-native-chatgpt-runtime.ts",
|
|
64
|
-
"test:native-chatgpt-tools": "bun scripts/test-native-chatgpt-tools.ts"
|
|
64
|
+
"test:native-chatgpt-tools": "bun scripts/test-native-chatgpt-tools.ts",
|
|
65
|
+
"test:native-claude-providers": "bun scripts/test-native-claude-providers.ts"
|
|
65
66
|
},
|
|
66
67
|
"devDependencies": {
|
|
67
68
|
"@types/bun": "1.3.14",
|