@hasna/switcher 0.2.12 → 0.2.13
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/dist/claude-desktop-gateway.d.ts +3 -0
- package/dist/claude-desktop.js +423 -62
- package/dist/cli/index.js +453 -94
- package/dist/desktop-state.d.ts +20 -1
- package/dist/index.js +9 -9
- package/dist/mcp/index.js +13 -13
- package/dist/sdk.js +9 -9
- package/dist/serve/index.js +2 -2
- package/docs/CLAUDE-DESKTOP-GATEWAY.md +22 -7
- package/hasna.contract.json +1 -1
- package/openapi.json +1 -1
- package/package.json +3 -3
package/dist/desktop-state.d.ts
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
export type DesktopFileSnapshot = {
|
|
2
2
|
text: string;
|
|
3
3
|
mode: number;
|
|
4
|
+
metadataHash: string;
|
|
4
5
|
};
|
|
5
6
|
export declare function safeDesktopSnapshot(path: string): Promise<DesktopFileSnapshot | undefined>;
|
|
6
7
|
/** Bounded, no-yield form for the final native launch handoff. */
|
|
7
8
|
export declare function safeDesktopSnapshotSync(path: string): DesktopFileSnapshot | undefined;
|
|
8
9
|
export declare function safeDesktopRead(path: string): Promise<string | undefined>;
|
|
9
|
-
export declare function
|
|
10
|
+
export declare function sameDesktopSnapshot(a: DesktopFileSnapshot | undefined, b: DesktopFileSnapshot | undefined): boolean;
|
|
11
|
+
/** Preserve a complete original, including admitted attributes, without
|
|
12
|
+
* overwriting an incumbent. Verify both source continuity and copied bytes. */
|
|
13
|
+
export declare function preserveDesktopFile(source: string, destination: string, expected: DesktopFileSnapshot): Promise<void>;
|
|
14
|
+
/** Atomically replace `path` only while the current directory entry still
|
|
15
|
+
* matches `expectedCurrent`. The current entry is moved aside first; the new
|
|
16
|
+
* inode is installed with link-exclusive semantics, so a foreign entry that
|
|
17
|
+
* appears in the gap is never overwritten. The displaced entry is checked
|
|
18
|
+
* after the move, and restored on any mismatch. */
|
|
19
|
+
export declare function replaceDesktopFile(path: string, temporary: string, expectedCurrent: DesktopFileSnapshot | undefined, expectedNew: DesktopFileSnapshot): Promise<void>;
|
|
20
|
+
/** Remove `path` only while its moved directory entry still matches the
|
|
21
|
+
* expected snapshot. A foreign replacement in the gap is preserved. */
|
|
22
|
+
export declare function removeDesktopFile(path: string, expected: DesktopFileSnapshot | undefined, guard?: () => Promise<void> | void): Promise<void>;
|
|
23
|
+
export declare function writeDesktopPrivate(path: string, text: string, mode?: number, metadataSource?: {
|
|
24
|
+
path: string;
|
|
25
|
+
snapshot: DesktopFileSnapshot;
|
|
26
|
+
}, expectation?: {
|
|
27
|
+
current: DesktopFileSnapshot | undefined;
|
|
28
|
+
}): Promise<void>;
|
|
10
29
|
export declare function desktopLease(path: string): Promise<() => void>;
|
|
11
30
|
export declare function assertDesktopRuntime(): Promise<void>;
|
|
12
31
|
/** Read-only preflight, not acquisition of a future launch lease. */
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __export = (target, all) => {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
17
17
|
var exports_external = {};
|
|
18
18
|
__export(exports_external, {
|
|
19
19
|
void: () => voidType,
|
|
@@ -125,7 +125,7 @@ __export(exports_external, {
|
|
|
125
125
|
BRAND: () => BRAND
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
//
|
|
128
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
129
129
|
var util;
|
|
130
130
|
(function(util2) {
|
|
131
131
|
util2.assertEqual = (_) => {};
|
|
@@ -256,7 +256,7 @@ var getParsedType = (data) => {
|
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
258
|
|
|
259
|
-
//
|
|
259
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
260
260
|
var ZodIssueCode = util.arrayToEnum([
|
|
261
261
|
"invalid_type",
|
|
262
262
|
"invalid_literal",
|
|
@@ -375,7 +375,7 @@ ZodError.create = (issues) => {
|
|
|
375
375
|
return error;
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
-
//
|
|
378
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
379
379
|
var errorMap = (issue, _ctx) => {
|
|
380
380
|
let message;
|
|
381
381
|
switch (issue.code) {
|
|
@@ -478,7 +478,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
478
478
|
};
|
|
479
479
|
var en_default = errorMap;
|
|
480
480
|
|
|
481
|
-
//
|
|
481
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
482
482
|
var overrideErrorMap = en_default;
|
|
483
483
|
function setErrorMap(map) {
|
|
484
484
|
overrideErrorMap = map;
|
|
@@ -486,7 +486,7 @@ function setErrorMap(map) {
|
|
|
486
486
|
function getErrorMap() {
|
|
487
487
|
return overrideErrorMap;
|
|
488
488
|
}
|
|
489
|
-
//
|
|
489
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
490
490
|
var makeIssue = (params) => {
|
|
491
491
|
const { data, path, errorMaps, issueData } = params;
|
|
492
492
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -592,14 +592,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
592
592
|
var isDirty = (x) => x.status === "dirty";
|
|
593
593
|
var isValid = (x) => x.status === "valid";
|
|
594
594
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
595
|
-
//
|
|
595
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
596
596
|
var errorUtil;
|
|
597
597
|
(function(errorUtil2) {
|
|
598
598
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
599
599
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
600
600
|
})(errorUtil || (errorUtil = {}));
|
|
601
601
|
|
|
602
|
-
//
|
|
602
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
603
603
|
class ParseInputLazyPath {
|
|
604
604
|
constructor(parent, value, path, key) {
|
|
605
605
|
this._cachedPath = [];
|
|
@@ -4200,7 +4200,7 @@ async function boundedJson(response, maxBytes = MAX_BYTES) {
|
|
|
4200
4200
|
}
|
|
4201
4201
|
}
|
|
4202
4202
|
|
|
4203
|
-
//
|
|
4203
|
+
// ../contracts/dist/client/transport.js
|
|
4204
4204
|
import { isIP } from "net";
|
|
4205
4205
|
import { spawnSync } from "child_process";
|
|
4206
4206
|
import { closeSync as closeSync2, fstatSync as fstatSync2, openSync as openSync2, readFileSync as readFileSync2 } from "fs";
|
package/dist/mcp/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __export = (target, all) => {
|
|
|
19
19
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
20
20
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
21
21
|
|
|
22
|
-
//
|
|
22
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
23
23
|
var exports_external = {};
|
|
24
24
|
__export(exports_external, {
|
|
25
25
|
void: () => voidType,
|
|
@@ -131,7 +131,7 @@ __export(exports_external, {
|
|
|
131
131
|
BRAND: () => BRAND
|
|
132
132
|
});
|
|
133
133
|
|
|
134
|
-
//
|
|
134
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
135
135
|
var util;
|
|
136
136
|
(function(util2) {
|
|
137
137
|
util2.assertEqual = (_) => {};
|
|
@@ -262,7 +262,7 @@ var getParsedType = (data) => {
|
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
264
|
|
|
265
|
-
//
|
|
265
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
266
266
|
var ZodIssueCode = util.arrayToEnum([
|
|
267
267
|
"invalid_type",
|
|
268
268
|
"invalid_literal",
|
|
@@ -381,7 +381,7 @@ ZodError.create = (issues) => {
|
|
|
381
381
|
return error;
|
|
382
382
|
};
|
|
383
383
|
|
|
384
|
-
//
|
|
384
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
385
385
|
var errorMap = (issue, _ctx) => {
|
|
386
386
|
let message;
|
|
387
387
|
switch (issue.code) {
|
|
@@ -484,7 +484,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
484
484
|
};
|
|
485
485
|
var en_default = errorMap;
|
|
486
486
|
|
|
487
|
-
//
|
|
487
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
488
488
|
var overrideErrorMap = en_default;
|
|
489
489
|
function setErrorMap(map) {
|
|
490
490
|
overrideErrorMap = map;
|
|
@@ -492,7 +492,7 @@ function setErrorMap(map) {
|
|
|
492
492
|
function getErrorMap() {
|
|
493
493
|
return overrideErrorMap;
|
|
494
494
|
}
|
|
495
|
-
//
|
|
495
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
496
496
|
var makeIssue = (params) => {
|
|
497
497
|
const { data, path, errorMaps, issueData } = params;
|
|
498
498
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -598,14 +598,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
598
598
|
var isDirty = (x) => x.status === "dirty";
|
|
599
599
|
var isValid = (x) => x.status === "valid";
|
|
600
600
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
601
|
-
//
|
|
601
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
602
602
|
var errorUtil;
|
|
603
603
|
(function(errorUtil2) {
|
|
604
604
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
605
605
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
606
606
|
})(errorUtil || (errorUtil = {}));
|
|
607
607
|
|
|
608
|
-
//
|
|
608
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
609
609
|
class ParseInputLazyPath {
|
|
610
610
|
constructor(parent, value, path, key) {
|
|
611
611
|
this._cachedPath = [];
|
|
@@ -4049,7 +4049,7 @@ function canonicalPolicyJSON(value) {
|
|
|
4049
4049
|
return JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.entries(item).sort(([a], [b]) => a.localeCompare(b))) : item);
|
|
4050
4050
|
}
|
|
4051
4051
|
// package.json
|
|
4052
|
-
var version = "0.2.
|
|
4052
|
+
var version = "0.2.13";
|
|
4053
4053
|
|
|
4054
4054
|
// src/version.ts
|
|
4055
4055
|
var VERSION = version;
|
|
@@ -4243,7 +4243,7 @@ async function boundedJson(response, maxBytes = MAX_BYTES) {
|
|
|
4243
4243
|
}
|
|
4244
4244
|
}
|
|
4245
4245
|
|
|
4246
|
-
//
|
|
4246
|
+
// ../contracts/dist/client/transport.js
|
|
4247
4247
|
import { isIP } from "net";
|
|
4248
4248
|
import { spawnSync } from "child_process";
|
|
4249
4249
|
import { closeSync as closeSync2, fstatSync as fstatSync2, openSync as openSync2, readFileSync as readFileSync2 } from "fs";
|
|
@@ -5919,7 +5919,7 @@ import { chmod, mkdir } from "fs/promises";
|
|
|
5919
5919
|
import { dirname as dirname2, resolve } from "path";
|
|
5920
5920
|
import { createHash as createHash2 } from "crypto";
|
|
5921
5921
|
|
|
5922
|
-
//
|
|
5922
|
+
// ../contracts/dist/auth/index.js
|
|
5923
5923
|
import { createHash, createHmac, randomBytes, timingSafeEqual } from "crypto";
|
|
5924
5924
|
var MAX_TENANT_ID_LENGTH = 64;
|
|
5925
5925
|
var TENANT_ID_PATTERN = new RegExp(`^[A-Za-z0-9][A-Za-z0-9._-]{0,${MAX_TENANT_ID_LENGTH - 1}}$`);
|
|
@@ -7080,7 +7080,7 @@ var openapi_default = {
|
|
|
7080
7080
|
openapi: "3.0.3",
|
|
7081
7081
|
info: {
|
|
7082
7082
|
title: "Switcher API",
|
|
7083
|
-
version: "0.2.
|
|
7083
|
+
version: "0.2.13",
|
|
7084
7084
|
description: "Authenticated provider/profile/catalog control plane. Launches run locally; the API never returns provider credentials."
|
|
7085
7085
|
},
|
|
7086
7086
|
security: [
|
|
@@ -11693,7 +11693,7 @@ async function openCliRuntime(env = process.env, resolveCredential2) {
|
|
|
11693
11693
|
return { client: new SwitcherClient({ baseUrl: service.url, apiKey }), mode: "local", providerEnv, close: service.close };
|
|
11694
11694
|
}
|
|
11695
11695
|
|
|
11696
|
-
//
|
|
11696
|
+
// ../contracts/dist/executable-trust.js
|
|
11697
11697
|
import { constants as constants2 } from "fs";
|
|
11698
11698
|
import { access as access2, lstat as lstat2, open, readlink, realpath, rename, unlink } from "fs/promises";
|
|
11699
11699
|
import { dirname as dirname3, isAbsolute as isAbsolute3, join as join5, parse as parse2, sep as sep2 } from "path";
|
package/dist/sdk.js
CHANGED
|
@@ -13,7 +13,7 @@ var __export = (target, all) => {
|
|
|
13
13
|
});
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
17
17
|
var exports_external = {};
|
|
18
18
|
__export(exports_external, {
|
|
19
19
|
void: () => voidType,
|
|
@@ -125,7 +125,7 @@ __export(exports_external, {
|
|
|
125
125
|
BRAND: () => BRAND
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
//
|
|
128
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
129
129
|
var util;
|
|
130
130
|
(function(util2) {
|
|
131
131
|
util2.assertEqual = (_) => {};
|
|
@@ -256,7 +256,7 @@ var getParsedType = (data) => {
|
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
258
|
|
|
259
|
-
//
|
|
259
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
260
260
|
var ZodIssueCode = util.arrayToEnum([
|
|
261
261
|
"invalid_type",
|
|
262
262
|
"invalid_literal",
|
|
@@ -375,7 +375,7 @@ ZodError.create = (issues) => {
|
|
|
375
375
|
return error;
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
-
//
|
|
378
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
379
379
|
var errorMap = (issue, _ctx) => {
|
|
380
380
|
let message;
|
|
381
381
|
switch (issue.code) {
|
|
@@ -478,7 +478,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
478
478
|
};
|
|
479
479
|
var en_default = errorMap;
|
|
480
480
|
|
|
481
|
-
//
|
|
481
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
482
482
|
var overrideErrorMap = en_default;
|
|
483
483
|
function setErrorMap(map) {
|
|
484
484
|
overrideErrorMap = map;
|
|
@@ -486,7 +486,7 @@ function setErrorMap(map) {
|
|
|
486
486
|
function getErrorMap() {
|
|
487
487
|
return overrideErrorMap;
|
|
488
488
|
}
|
|
489
|
-
//
|
|
489
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
490
490
|
var makeIssue = (params) => {
|
|
491
491
|
const { data, path, errorMaps, issueData } = params;
|
|
492
492
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -592,14 +592,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
592
592
|
var isDirty = (x) => x.status === "dirty";
|
|
593
593
|
var isValid = (x) => x.status === "valid";
|
|
594
594
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
595
|
-
//
|
|
595
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
596
596
|
var errorUtil;
|
|
597
597
|
(function(errorUtil2) {
|
|
598
598
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
599
599
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
600
600
|
})(errorUtil || (errorUtil = {}));
|
|
601
601
|
|
|
602
|
-
//
|
|
602
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
603
603
|
class ParseInputLazyPath {
|
|
604
604
|
constructor(parent, value, path, key) {
|
|
605
605
|
this._cachedPath = [];
|
|
@@ -4200,7 +4200,7 @@ async function boundedJson(response, maxBytes = MAX_BYTES) {
|
|
|
4200
4200
|
}
|
|
4201
4201
|
}
|
|
4202
4202
|
|
|
4203
|
-
//
|
|
4203
|
+
// ../contracts/dist/client/transport.js
|
|
4204
4204
|
import { isIP } from "net";
|
|
4205
4205
|
import { spawnSync } from "child_process";
|
|
4206
4206
|
import { closeSync as closeSync2, fstatSync as fstatSync2, openSync as openSync2, readFileSync as readFileSync2 } from "fs";
|
package/dist/serve/index.js
CHANGED
|
@@ -68,7 +68,7 @@ function canonicalPolicyJSON(value) {
|
|
|
68
68
|
return JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.entries(item).sort(([a], [b]) => a.localeCompare(b))) : item);
|
|
69
69
|
}
|
|
70
70
|
// package.json
|
|
71
|
-
var version = "0.2.
|
|
71
|
+
var version = "0.2.13";
|
|
72
72
|
|
|
73
73
|
// src/version.ts
|
|
74
74
|
var VERSION = version;
|
|
@@ -922,7 +922,7 @@ var openapi_default = {
|
|
|
922
922
|
openapi: "3.0.3",
|
|
923
923
|
info: {
|
|
924
924
|
title: "Switcher API",
|
|
925
|
-
version: "0.2.
|
|
925
|
+
version: "0.2.13",
|
|
926
926
|
description: "Authenticated provider/profile/catalog control plane. Launches run locally; the API never returns provider credentials."
|
|
927
927
|
},
|
|
928
928
|
security: [
|
|
@@ -38,14 +38,29 @@ handoff gaps; it does not make the subsequent spawn atomic against unrelated
|
|
|
38
38
|
same-user processes that can still change files.
|
|
39
39
|
|
|
40
40
|
Cleanup restores exact original selection bytes and admitted file permissions
|
|
41
|
-
only for its matching generation. The version
|
|
41
|
+
only for its matching generation. The version 4 recovery receipt binds both;
|
|
42
42
|
foreign permission changes are conflicts, just like foreign content changes.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
Existing settings must belong to the current user and their primary group.
|
|
44
|
+
On macOS, settings with ACLs or file flags are refused before selection. Extended
|
|
45
|
+
attributes are copied exactly, checked by digest and retained in a readback-verified
|
|
46
|
+
original capsule until restoration succeeds. This includes ordinary macOS provenance
|
|
47
|
+
attributes. An
|
|
48
|
+
unavailable or inconclusive native metadata inspection also refuses admission.
|
|
49
|
+
The adapter repeats this check before replacing settings; it never strips
|
|
50
|
+
metadata to make a launch succeed.
|
|
51
|
+
Foreign edits and conflicted recovery receipts are retained and reported.
|
|
52
|
+
Restoration checks the receipt-bound current selection again when its writer
|
|
53
|
+
starts and before replacement. Read-only original modes remain supported; only
|
|
54
|
+
the verified private preparation copy is made writable. Legacy recovery formats
|
|
55
|
+
require their original owning version; they are not silently
|
|
56
|
+
adopted. Successful recovery removes the generated config and preparation file,
|
|
57
|
+
retains the readback-verified original capsule, and renames the receipt to
|
|
58
|
+
`.switcher-selection.json.recovered-*`; generated metadata is removed when the
|
|
59
|
+
original was absent. A successful replacement also retains its moved-aside
|
|
60
|
+
original as `_meta.json.<uuid>.previous`. A conflict preserves the foreign file
|
|
61
|
+
beside the original capsule and receipt. The original account and configuration
|
|
62
|
+
files are preserved. Live disposal remains subject to the owning preservation
|
|
63
|
+
and recovery rules.
|
|
49
64
|
|
|
50
65
|
The catalog must complete within the existing eight-second, one-MiB budget.
|
|
51
66
|
Malformed, repeating or over-three-page discovery is refused before selection.
|
package/hasna.contract.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "switcher",
|
|
5
5
|
"class": "cli-with-store",
|
|
6
6
|
"contractVersion": "v1",
|
|
7
|
-
"kitVersion": "1.3.
|
|
7
|
+
"kitVersion": "1.3.7",
|
|
8
8
|
"description": "Universal provider and model switcher with API-first local and hosted operation. CLI, MCP and SDK resolve one authenticated HTTP authority through @hasna/contracts and fail closed when hosted configuration is missing or invalid. HASNA_SWITCHER_LOCAL=1 deliberately selects an owned loopback API backed by SQLite; hosted https://api.hasna.com/switcher uses PostgreSQL and signed revocable API keys. Provider credentials remain local to the launcher and are never stored or returned by the service.",
|
|
9
9
|
"bins": [
|
|
10
10
|
"switcher",
|
package/openapi.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/switcher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"generate": "bun scripts/generate.ts",
|
|
47
47
|
"check:generated": "bun scripts/generate.ts --check",
|
|
48
48
|
"typecheck": "tsc --noEmit",
|
|
49
|
-
"test": "bun test",
|
|
49
|
+
"test": "bun test --timeout 30000",
|
|
50
50
|
"contract:check": "bun ./node_modules/@hasna/contracts/dist/cli/contracts-cli.js repo-conformance .",
|
|
51
51
|
"verify": "bun run check:generated && bun run typecheck && bun run test && bun run build && bun run contract:check",
|
|
52
52
|
"test:postgres": "bun scripts/pg-test-gate.mjs",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@types/pg": "8.23.1"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@hasna/contracts": "1.3.
|
|
80
|
+
"@hasna/contracts": "1.3.7",
|
|
81
81
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
82
82
|
"jsonc-parser": "3.3.1",
|
|
83
83
|
"yaml": "2.9.0",
|