@hasna/contacts 0.7.0 → 0.9.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 +93 -13
- package/dist/browser/cli.d.ts +4 -0
- package/dist/browser/cli.d.ts.map +1 -0
- package/dist/browser/identity.d.ts +3 -0
- package/dist/browser/identity.d.ts.map +1 -0
- package/dist/browser/install.d.ts +32 -0
- package/dist/browser/install.d.ts.map +1 -0
- package/dist/browser/native.d.ts +3 -0
- package/dist/browser/native.d.ts.map +1 -0
- package/dist/browser/native.js +822 -0
- package/dist/browser/protocol.d.ts +26 -0
- package/dist/browser/protocol.d.ts.map +1 -0
- package/dist/browser/values.d.ts +18 -0
- package/dist/browser/values.d.ts.map +1 -0
- package/dist/cli/commands/core.d.ts.map +1 -1
- package/dist/cli/index.js +479 -149
- package/dist/cli/status-domain.preload.d.ts +1 -1
- package/dist/cli/status-domain.preload.d.ts.map +1 -1
- package/dist/cli/status-fixture.d.ts +17 -0
- package/dist/cli/status-fixture.d.ts.map +1 -0
- package/dist/cloud/http-storage.d.ts +20 -12
- package/dist/cloud/http-storage.d.ts.map +1 -1
- package/dist/cloud/resolver-inputs.d.ts +51 -0
- package/dist/cloud/resolver-inputs.d.ts.map +1 -0
- package/dist/db/paths.d.ts +4 -4
- package/dist/db/paths.d.ts.map +1 -1
- package/dist/generated/storage-kit/backend.d.ts +19 -0
- package/dist/generated/storage-kit/backend.d.ts.map +1 -0
- package/dist/generated/storage-kit/index.d.ts +2 -1
- package/dist/generated/storage-kit/index.d.ts.map +1 -1
- package/dist/generated/storage-kit/migrations.d.ts +21 -0
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
- package/dist/generated/storage-kit/own.d.ts +11 -0
- package/dist/generated/storage-kit/own.d.ts.map +1 -0
- package/dist/generated/storage-kit/pool.d.ts +5 -17
- package/dist/generated/storage-kit/pool.d.ts.map +1 -1
- package/dist/generated/storage-kit/query.d.ts +1 -1
- package/dist/generated/storage-kit/query.d.ts.map +1 -1
- package/dist/generated/storage-kit/tls.d.ts +30 -3
- package/dist/generated/storage-kit/tls.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -28
- package/dist/lib/audience-contract.d.ts +9 -9
- package/dist/lib/compact-output.d.ts +67 -0
- package/dist/lib/compact-output.d.ts.map +1 -0
- package/dist/mcp/handlers/core.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +11 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +490 -212
- package/dist/mcp/profile.d.ts +8 -0
- package/dist/mcp/profile.d.ts.map +1 -0
- package/dist/mcp/register-tools.d.ts +3 -1
- package/dist/mcp/register-tools.d.ts.map +1 -1
- package/dist/mcp/startup-gate.d.ts +48 -0
- package/dist/mcp/startup-gate.d.ts.map +1 -0
- package/dist/mcp/storage-tools.d.ts +2 -1
- package/dist/mcp/storage-tools.d.ts.map +1 -1
- package/dist/mcp/tools.d.ts +7 -45
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +70 -3
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +990 -7
- package/dist/server/index.js +231 -59
- package/dist/server/pg-store.d.ts +1 -0
- package/dist/server/pg-store.d.ts.map +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/docs/chrome-autofill.md +45 -0
- package/extension/background.js +284 -0
- package/extension/content.js +387 -0
- package/extension/detect.js +228 -0
- package/extension/fill.js +112 -0
- package/extension/icons/128.png +0 -0
- package/extension/icons/16.png +0 -0
- package/extension/icons/32.png +0 -0
- package/extension/icons/48.png +0 -0
- package/extension/icons/icon.svg +17 -0
- package/extension/manifest.json +54 -0
- package/extension/popup.css +78 -0
- package/extension/popup.html +47 -0
- package/extension/popup.js +166 -0
- package/hasna.contract.json +20 -6
- package/package.json +10 -6
- package/dist/lib/config.d.ts +0 -7
- package/dist/lib/config.d.ts.map +0 -1
package/dist/mcp/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var __export = (target, all) => {
|
|
|
46
46
|
};
|
|
47
47
|
var __require = import.meta.require;
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// node_modules/ajv/dist/compile/codegen/code.js
|
|
50
50
|
var require_code = __commonJS((exports) => {
|
|
51
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
52
|
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = undefined;
|
|
@@ -200,7 +200,7 @@ var require_code = __commonJS((exports) => {
|
|
|
200
200
|
exports.regexpCode = regexpCode;
|
|
201
201
|
});
|
|
202
202
|
|
|
203
|
-
//
|
|
203
|
+
// node_modules/ajv/dist/compile/codegen/scope.js
|
|
204
204
|
var require_scope = __commonJS((exports) => {
|
|
205
205
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
206
206
|
exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = undefined;
|
|
@@ -346,7 +346,7 @@ var require_scope = __commonJS((exports) => {
|
|
|
346
346
|
exports.ValueScope = ValueScope;
|
|
347
347
|
});
|
|
348
348
|
|
|
349
|
-
//
|
|
349
|
+
// node_modules/ajv/dist/compile/codegen/index.js
|
|
350
350
|
var require_codegen = __commonJS((exports) => {
|
|
351
351
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
352
352
|
exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = undefined;
|
|
@@ -1056,7 +1056,7 @@ var require_codegen = __commonJS((exports) => {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
1058
|
|
|
1059
|
-
//
|
|
1059
|
+
// node_modules/ajv/dist/compile/util.js
|
|
1060
1060
|
var require_util = __commonJS((exports) => {
|
|
1061
1061
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1062
1062
|
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = undefined;
|
|
@@ -1220,7 +1220,7 @@ var require_util = __commonJS((exports) => {
|
|
|
1220
1220
|
exports.checkStrictMode = checkStrictMode;
|
|
1221
1221
|
});
|
|
1222
1222
|
|
|
1223
|
-
//
|
|
1223
|
+
// node_modules/ajv/dist/compile/names.js
|
|
1224
1224
|
var require_names = __commonJS((exports) => {
|
|
1225
1225
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1226
1226
|
var codegen_1 = require_codegen();
|
|
@@ -1245,7 +1245,7 @@ var require_names = __commonJS((exports) => {
|
|
|
1245
1245
|
exports.default = names;
|
|
1246
1246
|
});
|
|
1247
1247
|
|
|
1248
|
-
//
|
|
1248
|
+
// node_modules/ajv/dist/compile/errors.js
|
|
1249
1249
|
var require_errors = __commonJS((exports) => {
|
|
1250
1250
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1251
1251
|
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = undefined;
|
|
@@ -1363,7 +1363,7 @@ var require_errors = __commonJS((exports) => {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
});
|
|
1365
1365
|
|
|
1366
|
-
//
|
|
1366
|
+
// node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
1367
1367
|
var require_boolSchema = __commonJS((exports) => {
|
|
1368
1368
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1369
1369
|
exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = undefined;
|
|
@@ -1411,7 +1411,7 @@ var require_boolSchema = __commonJS((exports) => {
|
|
|
1411
1411
|
}
|
|
1412
1412
|
});
|
|
1413
1413
|
|
|
1414
|
-
//
|
|
1414
|
+
// node_modules/ajv/dist/compile/rules.js
|
|
1415
1415
|
var require_rules = __commonJS((exports) => {
|
|
1416
1416
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1417
1417
|
exports.getRules = exports.isJSONType = undefined;
|
|
@@ -1439,7 +1439,7 @@ var require_rules = __commonJS((exports) => {
|
|
|
1439
1439
|
exports.getRules = getRules;
|
|
1440
1440
|
});
|
|
1441
1441
|
|
|
1442
|
-
//
|
|
1442
|
+
// node_modules/ajv/dist/compile/validate/applicability.js
|
|
1443
1443
|
var require_applicability = __commonJS((exports) => {
|
|
1444
1444
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1445
1445
|
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = undefined;
|
|
@@ -1459,7 +1459,7 @@ var require_applicability = __commonJS((exports) => {
|
|
|
1459
1459
|
exports.shouldUseRule = shouldUseRule;
|
|
1460
1460
|
});
|
|
1461
1461
|
|
|
1462
|
-
//
|
|
1462
|
+
// node_modules/ajv/dist/compile/validate/dataType.js
|
|
1463
1463
|
var require_dataType = __commonJS((exports) => {
|
|
1464
1464
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1465
1465
|
exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = undefined;
|
|
@@ -1640,7 +1640,7 @@ var require_dataType = __commonJS((exports) => {
|
|
|
1640
1640
|
}
|
|
1641
1641
|
});
|
|
1642
1642
|
|
|
1643
|
-
//
|
|
1643
|
+
// node_modules/ajv/dist/compile/validate/defaults.js
|
|
1644
1644
|
var require_defaults = __commonJS((exports) => {
|
|
1645
1645
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1646
1646
|
exports.assignDefaults = undefined;
|
|
@@ -1674,7 +1674,7 @@ var require_defaults = __commonJS((exports) => {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
});
|
|
1676
1676
|
|
|
1677
|
-
//
|
|
1677
|
+
// node_modules/ajv/dist/vocabularies/code.js
|
|
1678
1678
|
var require_code2 = __commonJS((exports) => {
|
|
1679
1679
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1680
1680
|
exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = undefined;
|
|
@@ -1803,7 +1803,7 @@ var require_code2 = __commonJS((exports) => {
|
|
|
1803
1803
|
exports.validateUnion = validateUnion;
|
|
1804
1804
|
});
|
|
1805
1805
|
|
|
1806
|
-
//
|
|
1806
|
+
// node_modules/ajv/dist/compile/validate/keyword.js
|
|
1807
1807
|
var require_keyword = __commonJS((exports) => {
|
|
1808
1808
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1809
1809
|
exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = undefined;
|
|
@@ -1918,7 +1918,7 @@ var require_keyword = __commonJS((exports) => {
|
|
|
1918
1918
|
exports.validateKeywordUsage = validateKeywordUsage;
|
|
1919
1919
|
});
|
|
1920
1920
|
|
|
1921
|
-
//
|
|
1921
|
+
// node_modules/ajv/dist/compile/validate/subschema.js
|
|
1922
1922
|
var require_subschema = __commonJS((exports) => {
|
|
1923
1923
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1924
1924
|
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = undefined;
|
|
@@ -1998,7 +1998,7 @@ var require_subschema = __commonJS((exports) => {
|
|
|
1998
1998
|
exports.extendSubschemaMode = extendSubschemaMode;
|
|
1999
1999
|
});
|
|
2000
2000
|
|
|
2001
|
-
//
|
|
2001
|
+
// node_modules/fast-deep-equal/index.js
|
|
2002
2002
|
var require_fast_deep_equal = __commonJS((exports, module) => {
|
|
2003
2003
|
module.exports = function equal(a, b) {
|
|
2004
2004
|
if (a === b)
|
|
@@ -2040,7 +2040,7 @@ var require_fast_deep_equal = __commonJS((exports, module) => {
|
|
|
2040
2040
|
};
|
|
2041
2041
|
});
|
|
2042
2042
|
|
|
2043
|
-
//
|
|
2043
|
+
// node_modules/json-schema-traverse/index.js
|
|
2044
2044
|
var require_json_schema_traverse = __commonJS((exports, module) => {
|
|
2045
2045
|
var traverse = module.exports = function(schema, opts, cb) {
|
|
2046
2046
|
if (typeof opts == "function") {
|
|
@@ -2123,7 +2123,7 @@ var require_json_schema_traverse = __commonJS((exports, module) => {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
});
|
|
2125
2125
|
|
|
2126
|
-
//
|
|
2126
|
+
// node_modules/ajv/dist/compile/resolve.js
|
|
2127
2127
|
var require_resolve = __commonJS((exports) => {
|
|
2128
2128
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2129
2129
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = undefined;
|
|
@@ -2276,7 +2276,7 @@ var require_resolve = __commonJS((exports) => {
|
|
|
2276
2276
|
exports.getSchemaRefs = getSchemaRefs;
|
|
2277
2277
|
});
|
|
2278
2278
|
|
|
2279
|
-
//
|
|
2279
|
+
// node_modules/ajv/dist/compile/validate/index.js
|
|
2280
2280
|
var require_validate = __commonJS((exports) => {
|
|
2281
2281
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2282
2282
|
exports.getData = exports.KeywordCxt = exports.validateFunctionCode = undefined;
|
|
@@ -2781,7 +2781,7 @@ var require_validate = __commonJS((exports) => {
|
|
|
2781
2781
|
exports.getData = getData;
|
|
2782
2782
|
});
|
|
2783
2783
|
|
|
2784
|
-
//
|
|
2784
|
+
// node_modules/ajv/dist/runtime/validation_error.js
|
|
2785
2785
|
var require_validation_error = __commonJS((exports) => {
|
|
2786
2786
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2787
2787
|
|
|
@@ -2795,7 +2795,7 @@ var require_validation_error = __commonJS((exports) => {
|
|
|
2795
2795
|
exports.default = ValidationError;
|
|
2796
2796
|
});
|
|
2797
2797
|
|
|
2798
|
-
//
|
|
2798
|
+
// node_modules/ajv/dist/compile/ref_error.js
|
|
2799
2799
|
var require_ref_error = __commonJS((exports) => {
|
|
2800
2800
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2801
2801
|
var resolve_1 = require_resolve();
|
|
@@ -2810,7 +2810,7 @@ var require_ref_error = __commonJS((exports) => {
|
|
|
2810
2810
|
exports.default = MissingRefError;
|
|
2811
2811
|
});
|
|
2812
2812
|
|
|
2813
|
-
//
|
|
2813
|
+
// node_modules/ajv/dist/compile/index.js
|
|
2814
2814
|
var require_compile = __commonJS((exports) => {
|
|
2815
2815
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2816
2816
|
exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = undefined;
|
|
@@ -3031,7 +3031,7 @@ var require_compile = __commonJS((exports) => {
|
|
|
3031
3031
|
}
|
|
3032
3032
|
});
|
|
3033
3033
|
|
|
3034
|
-
//
|
|
3034
|
+
// node_modules/ajv/dist/refs/data.json
|
|
3035
3035
|
var require_data = __commonJS((exports, module) => {
|
|
3036
3036
|
module.exports = {
|
|
3037
3037
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
@@ -3821,7 +3821,7 @@ var require_fast_uri = __commonJS((exports, module) => {
|
|
|
3821
3821
|
module.exports.fastUri = fastUri;
|
|
3822
3822
|
});
|
|
3823
3823
|
|
|
3824
|
-
//
|
|
3824
|
+
// node_modules/ajv/dist/runtime/uri.js
|
|
3825
3825
|
var require_uri = __commonJS((exports) => {
|
|
3826
3826
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3827
3827
|
var uri = require_fast_uri();
|
|
@@ -3829,7 +3829,7 @@ var require_uri = __commonJS((exports) => {
|
|
|
3829
3829
|
exports.default = uri;
|
|
3830
3830
|
});
|
|
3831
3831
|
|
|
3832
|
-
//
|
|
3832
|
+
// node_modules/ajv/dist/core.js
|
|
3833
3833
|
var require_core = __commonJS((exports) => {
|
|
3834
3834
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3835
3835
|
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = undefined;
|
|
@@ -4422,7 +4422,7 @@ var require_core = __commonJS((exports) => {
|
|
|
4422
4422
|
}
|
|
4423
4423
|
});
|
|
4424
4424
|
|
|
4425
|
-
//
|
|
4425
|
+
// node_modules/ajv/dist/vocabularies/core/id.js
|
|
4426
4426
|
var require_id = __commonJS((exports) => {
|
|
4427
4427
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4428
4428
|
var def = {
|
|
@@ -4434,7 +4434,7 @@ var require_id = __commonJS((exports) => {
|
|
|
4434
4434
|
exports.default = def;
|
|
4435
4435
|
});
|
|
4436
4436
|
|
|
4437
|
-
//
|
|
4437
|
+
// node_modules/ajv/dist/vocabularies/core/ref.js
|
|
4438
4438
|
var require_ref = __commonJS((exports) => {
|
|
4439
4439
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4440
4440
|
exports.callRef = exports.getValidate = undefined;
|
|
@@ -4553,7 +4553,7 @@ var require_ref = __commonJS((exports) => {
|
|
|
4553
4553
|
exports.default = def;
|
|
4554
4554
|
});
|
|
4555
4555
|
|
|
4556
|
-
//
|
|
4556
|
+
// node_modules/ajv/dist/vocabularies/core/index.js
|
|
4557
4557
|
var require_core2 = __commonJS((exports) => {
|
|
4558
4558
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4559
4559
|
var id_1 = require_id();
|
|
@@ -4571,7 +4571,7 @@ var require_core2 = __commonJS((exports) => {
|
|
|
4571
4571
|
exports.default = core2;
|
|
4572
4572
|
});
|
|
4573
4573
|
|
|
4574
|
-
//
|
|
4574
|
+
// node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
4575
4575
|
var require_limitNumber = __commonJS((exports) => {
|
|
4576
4576
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4577
4577
|
var codegen_1 = require_codegen();
|
|
@@ -4600,7 +4600,7 @@ var require_limitNumber = __commonJS((exports) => {
|
|
|
4600
4600
|
exports.default = def;
|
|
4601
4601
|
});
|
|
4602
4602
|
|
|
4603
|
-
//
|
|
4603
|
+
// node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
4604
4604
|
var require_multipleOf = __commonJS((exports) => {
|
|
4605
4605
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4606
4606
|
var codegen_1 = require_codegen();
|
|
@@ -4625,7 +4625,7 @@ var require_multipleOf = __commonJS((exports) => {
|
|
|
4625
4625
|
exports.default = def;
|
|
4626
4626
|
});
|
|
4627
4627
|
|
|
4628
|
-
//
|
|
4628
|
+
// node_modules/ajv/dist/runtime/ucs2length.js
|
|
4629
4629
|
var require_ucs2length = __commonJS((exports) => {
|
|
4630
4630
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4631
4631
|
function ucs2length(str) {
|
|
@@ -4648,7 +4648,7 @@ var require_ucs2length = __commonJS((exports) => {
|
|
|
4648
4648
|
ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
4649
4649
|
});
|
|
4650
4650
|
|
|
4651
|
-
//
|
|
4651
|
+
// node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
4652
4652
|
var require_limitLength = __commonJS((exports) => {
|
|
4653
4653
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4654
4654
|
var codegen_1 = require_codegen();
|
|
@@ -4677,7 +4677,7 @@ var require_limitLength = __commonJS((exports) => {
|
|
|
4677
4677
|
exports.default = def;
|
|
4678
4678
|
});
|
|
4679
4679
|
|
|
4680
|
-
//
|
|
4680
|
+
// node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
4681
4681
|
var require_pattern = __commonJS((exports) => {
|
|
4682
4682
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4683
4683
|
var code_1 = require_code2();
|
|
@@ -4711,7 +4711,7 @@ var require_pattern = __commonJS((exports) => {
|
|
|
4711
4711
|
exports.default = def;
|
|
4712
4712
|
});
|
|
4713
4713
|
|
|
4714
|
-
//
|
|
4714
|
+
// node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
4715
4715
|
var require_limitProperties = __commonJS((exports) => {
|
|
4716
4716
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4717
4717
|
var codegen_1 = require_codegen();
|
|
@@ -4737,7 +4737,7 @@ var require_limitProperties = __commonJS((exports) => {
|
|
|
4737
4737
|
exports.default = def;
|
|
4738
4738
|
});
|
|
4739
4739
|
|
|
4740
|
-
//
|
|
4740
|
+
// node_modules/ajv/dist/vocabularies/validation/required.js
|
|
4741
4741
|
var require_required = __commonJS((exports) => {
|
|
4742
4742
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4743
4743
|
var code_1 = require_code2();
|
|
@@ -4816,7 +4816,7 @@ var require_required = __commonJS((exports) => {
|
|
|
4816
4816
|
exports.default = def;
|
|
4817
4817
|
});
|
|
4818
4818
|
|
|
4819
|
-
//
|
|
4819
|
+
// node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
4820
4820
|
var require_limitItems = __commonJS((exports) => {
|
|
4821
4821
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4822
4822
|
var codegen_1 = require_codegen();
|
|
@@ -4842,7 +4842,7 @@ var require_limitItems = __commonJS((exports) => {
|
|
|
4842
4842
|
exports.default = def;
|
|
4843
4843
|
});
|
|
4844
4844
|
|
|
4845
|
-
//
|
|
4845
|
+
// node_modules/ajv/dist/runtime/equal.js
|
|
4846
4846
|
var require_equal = __commonJS((exports) => {
|
|
4847
4847
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4848
4848
|
var equal = require_fast_deep_equal();
|
|
@@ -4850,7 +4850,7 @@ var require_equal = __commonJS((exports) => {
|
|
|
4850
4850
|
exports.default = equal;
|
|
4851
4851
|
});
|
|
4852
4852
|
|
|
4853
|
-
//
|
|
4853
|
+
// node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
4854
4854
|
var require_uniqueItems = __commonJS((exports) => {
|
|
4855
4855
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4856
4856
|
var dataType_1 = require_dataType();
|
|
@@ -4914,7 +4914,7 @@ var require_uniqueItems = __commonJS((exports) => {
|
|
|
4914
4914
|
exports.default = def;
|
|
4915
4915
|
});
|
|
4916
4916
|
|
|
4917
|
-
//
|
|
4917
|
+
// node_modules/ajv/dist/vocabularies/validation/const.js
|
|
4918
4918
|
var require_const = __commonJS((exports) => {
|
|
4919
4919
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4920
4920
|
var codegen_1 = require_codegen();
|
|
@@ -4940,7 +4940,7 @@ var require_const = __commonJS((exports) => {
|
|
|
4940
4940
|
exports.default = def;
|
|
4941
4941
|
});
|
|
4942
4942
|
|
|
4943
|
-
//
|
|
4943
|
+
// node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
4944
4944
|
var require_enum = __commonJS((exports) => {
|
|
4945
4945
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4946
4946
|
var codegen_1 = require_codegen();
|
|
@@ -4986,7 +4986,7 @@ var require_enum = __commonJS((exports) => {
|
|
|
4986
4986
|
exports.default = def;
|
|
4987
4987
|
});
|
|
4988
4988
|
|
|
4989
|
-
//
|
|
4989
|
+
// node_modules/ajv/dist/vocabularies/validation/index.js
|
|
4990
4990
|
var require_validation = __commonJS((exports) => {
|
|
4991
4991
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4992
4992
|
var limitNumber_1 = require_limitNumber();
|
|
@@ -5016,7 +5016,7 @@ var require_validation = __commonJS((exports) => {
|
|
|
5016
5016
|
exports.default = validation;
|
|
5017
5017
|
});
|
|
5018
5018
|
|
|
5019
|
-
//
|
|
5019
|
+
// node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
5020
5020
|
var require_additionalItems = __commonJS((exports) => {
|
|
5021
5021
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5022
5022
|
exports.validateAdditionalItems = undefined;
|
|
@@ -5066,7 +5066,7 @@ var require_additionalItems = __commonJS((exports) => {
|
|
|
5066
5066
|
exports.default = def;
|
|
5067
5067
|
});
|
|
5068
5068
|
|
|
5069
|
-
//
|
|
5069
|
+
// node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
5070
5070
|
var require_items = __commonJS((exports) => {
|
|
5071
5071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5072
5072
|
exports.validateTuple = undefined;
|
|
@@ -5120,7 +5120,7 @@ var require_items = __commonJS((exports) => {
|
|
|
5120
5120
|
exports.default = def;
|
|
5121
5121
|
});
|
|
5122
5122
|
|
|
5123
|
-
//
|
|
5123
|
+
// node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
5124
5124
|
var require_prefixItems = __commonJS((exports) => {
|
|
5125
5125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5126
5126
|
var items_1 = require_items();
|
|
@@ -5134,7 +5134,7 @@ var require_prefixItems = __commonJS((exports) => {
|
|
|
5134
5134
|
exports.default = def;
|
|
5135
5135
|
});
|
|
5136
5136
|
|
|
5137
|
-
//
|
|
5137
|
+
// node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
5138
5138
|
var require_items2020 = __commonJS((exports) => {
|
|
5139
5139
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5140
5140
|
var codegen_1 = require_codegen();
|
|
@@ -5166,7 +5166,7 @@ var require_items2020 = __commonJS((exports) => {
|
|
|
5166
5166
|
exports.default = def;
|
|
5167
5167
|
});
|
|
5168
5168
|
|
|
5169
|
-
//
|
|
5169
|
+
// node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
5170
5170
|
var require_contains = __commonJS((exports) => {
|
|
5171
5171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5172
5172
|
var codegen_1 = require_codegen();
|
|
@@ -5257,7 +5257,7 @@ var require_contains = __commonJS((exports) => {
|
|
|
5257
5257
|
exports.default = def;
|
|
5258
5258
|
});
|
|
5259
5259
|
|
|
5260
|
-
//
|
|
5260
|
+
// node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
5261
5261
|
var require_dependencies = __commonJS((exports) => {
|
|
5262
5262
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5263
5263
|
exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = undefined;
|
|
@@ -5342,7 +5342,7 @@ var require_dependencies = __commonJS((exports) => {
|
|
|
5342
5342
|
exports.default = def;
|
|
5343
5343
|
});
|
|
5344
5344
|
|
|
5345
|
-
//
|
|
5345
|
+
// node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
5346
5346
|
var require_propertyNames = __commonJS((exports) => {
|
|
5347
5347
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5348
5348
|
var codegen_1 = require_codegen();
|
|
@@ -5382,7 +5382,7 @@ var require_propertyNames = __commonJS((exports) => {
|
|
|
5382
5382
|
exports.default = def;
|
|
5383
5383
|
});
|
|
5384
5384
|
|
|
5385
|
-
//
|
|
5385
|
+
// node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
5386
5386
|
var require_additionalProperties = __commonJS((exports) => {
|
|
5387
5387
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5388
5388
|
var code_1 = require_code2();
|
|
@@ -5485,7 +5485,7 @@ var require_additionalProperties = __commonJS((exports) => {
|
|
|
5485
5485
|
exports.default = def;
|
|
5486
5486
|
});
|
|
5487
5487
|
|
|
5488
|
-
//
|
|
5488
|
+
// node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
5489
5489
|
var require_properties = __commonJS((exports) => {
|
|
5490
5490
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5491
5491
|
var validate_1 = require_validate();
|
|
@@ -5540,7 +5540,7 @@ var require_properties = __commonJS((exports) => {
|
|
|
5540
5540
|
exports.default = def;
|
|
5541
5541
|
});
|
|
5542
5542
|
|
|
5543
|
-
//
|
|
5543
|
+
// node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
5544
5544
|
var require_patternProperties = __commonJS((exports) => {
|
|
5545
5545
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5546
5546
|
var code_1 = require_code2();
|
|
@@ -5611,7 +5611,7 @@ var require_patternProperties = __commonJS((exports) => {
|
|
|
5611
5611
|
exports.default = def;
|
|
5612
5612
|
});
|
|
5613
5613
|
|
|
5614
|
-
//
|
|
5614
|
+
// node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
5615
5615
|
var require_not = __commonJS((exports) => {
|
|
5616
5616
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5617
5617
|
var util_1 = require_util();
|
|
@@ -5639,7 +5639,7 @@ var require_not = __commonJS((exports) => {
|
|
|
5639
5639
|
exports.default = def;
|
|
5640
5640
|
});
|
|
5641
5641
|
|
|
5642
|
-
//
|
|
5642
|
+
// node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
5643
5643
|
var require_anyOf = __commonJS((exports) => {
|
|
5644
5644
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5645
5645
|
var code_1 = require_code2();
|
|
@@ -5653,7 +5653,7 @@ var require_anyOf = __commonJS((exports) => {
|
|
|
5653
5653
|
exports.default = def;
|
|
5654
5654
|
});
|
|
5655
5655
|
|
|
5656
|
-
//
|
|
5656
|
+
// node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
5657
5657
|
var require_oneOf = __commonJS((exports) => {
|
|
5658
5658
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5659
5659
|
var codegen_1 = require_codegen();
|
|
@@ -5708,7 +5708,7 @@ var require_oneOf = __commonJS((exports) => {
|
|
|
5708
5708
|
exports.default = def;
|
|
5709
5709
|
});
|
|
5710
5710
|
|
|
5711
|
-
//
|
|
5711
|
+
// node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
5712
5712
|
var require_allOf = __commonJS((exports) => {
|
|
5713
5713
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5714
5714
|
var util_1 = require_util();
|
|
@@ -5732,7 +5732,7 @@ var require_allOf = __commonJS((exports) => {
|
|
|
5732
5732
|
exports.default = def;
|
|
5733
5733
|
});
|
|
5734
5734
|
|
|
5735
|
-
//
|
|
5735
|
+
// node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
5736
5736
|
var require_if = __commonJS((exports) => {
|
|
5737
5737
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5738
5738
|
var codegen_1 = require_codegen();
|
|
@@ -5798,7 +5798,7 @@ var require_if = __commonJS((exports) => {
|
|
|
5798
5798
|
exports.default = def;
|
|
5799
5799
|
});
|
|
5800
5800
|
|
|
5801
|
-
//
|
|
5801
|
+
// node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
5802
5802
|
var require_thenElse = __commonJS((exports) => {
|
|
5803
5803
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5804
5804
|
var util_1 = require_util();
|
|
@@ -5813,7 +5813,7 @@ var require_thenElse = __commonJS((exports) => {
|
|
|
5813
5813
|
exports.default = def;
|
|
5814
5814
|
});
|
|
5815
5815
|
|
|
5816
|
-
//
|
|
5816
|
+
// node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
5817
5817
|
var require_applicator = __commonJS((exports) => {
|
|
5818
5818
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5819
5819
|
var additionalItems_1 = require_additionalItems();
|
|
@@ -5856,7 +5856,7 @@ var require_applicator = __commonJS((exports) => {
|
|
|
5856
5856
|
exports.default = getApplicator;
|
|
5857
5857
|
});
|
|
5858
5858
|
|
|
5859
|
-
//
|
|
5859
|
+
// node_modules/ajv/dist/vocabularies/format/format.js
|
|
5860
5860
|
var require_format = __commonJS((exports) => {
|
|
5861
5861
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5862
5862
|
var codegen_1 = require_codegen();
|
|
@@ -5943,7 +5943,7 @@ var require_format = __commonJS((exports) => {
|
|
|
5943
5943
|
exports.default = def;
|
|
5944
5944
|
});
|
|
5945
5945
|
|
|
5946
|
-
//
|
|
5946
|
+
// node_modules/ajv/dist/vocabularies/format/index.js
|
|
5947
5947
|
var require_format2 = __commonJS((exports) => {
|
|
5948
5948
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5949
5949
|
var format_1 = require_format();
|
|
@@ -5951,7 +5951,7 @@ var require_format2 = __commonJS((exports) => {
|
|
|
5951
5951
|
exports.default = format;
|
|
5952
5952
|
});
|
|
5953
5953
|
|
|
5954
|
-
//
|
|
5954
|
+
// node_modules/ajv/dist/vocabularies/metadata.js
|
|
5955
5955
|
var require_metadata = __commonJS((exports) => {
|
|
5956
5956
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5957
5957
|
exports.contentVocabulary = exports.metadataVocabulary = undefined;
|
|
@@ -5971,7 +5971,7 @@ var require_metadata = __commonJS((exports) => {
|
|
|
5971
5971
|
];
|
|
5972
5972
|
});
|
|
5973
5973
|
|
|
5974
|
-
//
|
|
5974
|
+
// node_modules/ajv/dist/vocabularies/draft7.js
|
|
5975
5975
|
var require_draft7 = __commonJS((exports) => {
|
|
5976
5976
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5977
5977
|
var core_1 = require_core2();
|
|
@@ -5990,7 +5990,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
5990
5990
|
exports.default = draft7Vocabularies;
|
|
5991
5991
|
});
|
|
5992
5992
|
|
|
5993
|
-
//
|
|
5993
|
+
// node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
5994
5994
|
var require_types = __commonJS((exports) => {
|
|
5995
5995
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5996
5996
|
exports.DiscrError = undefined;
|
|
@@ -6001,7 +6001,7 @@ var require_types = __commonJS((exports) => {
|
|
|
6001
6001
|
})(DiscrError || (exports.DiscrError = DiscrError = {}));
|
|
6002
6002
|
});
|
|
6003
6003
|
|
|
6004
|
-
//
|
|
6004
|
+
// node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
6005
6005
|
var require_discriminator = __commonJS((exports) => {
|
|
6006
6006
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6007
6007
|
var codegen_1 = require_codegen();
|
|
@@ -6103,7 +6103,7 @@ var require_discriminator = __commonJS((exports) => {
|
|
|
6103
6103
|
exports.default = def;
|
|
6104
6104
|
});
|
|
6105
6105
|
|
|
6106
|
-
//
|
|
6106
|
+
// node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
6107
6107
|
var require_json_schema_draft_07 = __commonJS((exports, module) => {
|
|
6108
6108
|
module.exports = {
|
|
6109
6109
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
@@ -6258,7 +6258,7 @@ var require_json_schema_draft_07 = __commonJS((exports, module) => {
|
|
|
6258
6258
|
};
|
|
6259
6259
|
});
|
|
6260
6260
|
|
|
6261
|
-
//
|
|
6261
|
+
// node_modules/ajv/dist/ajv.js
|
|
6262
6262
|
var require_ajv = __commonJS((exports, module) => {
|
|
6263
6263
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6264
6264
|
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = undefined;
|
|
@@ -6326,7 +6326,7 @@ var require_ajv = __commonJS((exports, module) => {
|
|
|
6326
6326
|
} });
|
|
6327
6327
|
});
|
|
6328
6328
|
|
|
6329
|
-
//
|
|
6329
|
+
// node_modules/ajv-formats/dist/formats.js
|
|
6330
6330
|
var require_formats = __commonJS((exports) => {
|
|
6331
6331
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6332
6332
|
exports.formatNames = exports.fastFormats = exports.fullFormats = undefined;
|
|
@@ -6503,7 +6503,7 @@ var require_formats = __commonJS((exports) => {
|
|
|
6503
6503
|
}
|
|
6504
6504
|
});
|
|
6505
6505
|
|
|
6506
|
-
//
|
|
6506
|
+
// node_modules/ajv-formats/dist/limit.js
|
|
6507
6507
|
var require_limit = __commonJS((exports) => {
|
|
6508
6508
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6509
6509
|
exports.formatLimitDefinition = undefined;
|
|
@@ -6572,7 +6572,7 @@ var require_limit = __commonJS((exports) => {
|
|
|
6572
6572
|
exports.default = formatLimitPlugin;
|
|
6573
6573
|
});
|
|
6574
6574
|
|
|
6575
|
-
//
|
|
6575
|
+
// node_modules/ajv-formats/dist/index.js
|
|
6576
6576
|
var require_dist = __commonJS((exports, module) => {
|
|
6577
6577
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6578
6578
|
var formats_1 = require_formats();
|
|
@@ -6611,7 +6611,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6611
6611
|
exports.default = formatsPlugin;
|
|
6612
6612
|
});
|
|
6613
6613
|
|
|
6614
|
-
//
|
|
6614
|
+
// node_modules/content-type/index.js
|
|
6615
6615
|
var require_content_type = __commonJS((exports) => {
|
|
6616
6616
|
/*!
|
|
6617
6617
|
* content-type
|
|
@@ -6721,7 +6721,7 @@ var require_content_type = __commonJS((exports) => {
|
|
|
6721
6721
|
import { readFileSync as readFileSync4 } from "fs";
|
|
6722
6722
|
import { join as join2 } from "path";
|
|
6723
6723
|
|
|
6724
|
-
//
|
|
6724
|
+
// node_modules/zod/v3/external.js
|
|
6725
6725
|
var exports_external = {};
|
|
6726
6726
|
__export(exports_external, {
|
|
6727
6727
|
void: () => voidType,
|
|
@@ -6833,7 +6833,7 @@ __export(exports_external, {
|
|
|
6833
6833
|
BRAND: () => BRAND
|
|
6834
6834
|
});
|
|
6835
6835
|
|
|
6836
|
-
//
|
|
6836
|
+
// node_modules/zod/v3/helpers/util.js
|
|
6837
6837
|
var util;
|
|
6838
6838
|
(function(util2) {
|
|
6839
6839
|
util2.assertEqual = (_) => {};
|
|
@@ -6964,7 +6964,7 @@ var getParsedType = (data) => {
|
|
|
6964
6964
|
}
|
|
6965
6965
|
};
|
|
6966
6966
|
|
|
6967
|
-
//
|
|
6967
|
+
// node_modules/zod/v3/ZodError.js
|
|
6968
6968
|
var ZodIssueCode = util.arrayToEnum([
|
|
6969
6969
|
"invalid_type",
|
|
6970
6970
|
"invalid_literal",
|
|
@@ -7083,7 +7083,7 @@ ZodError.create = (issues) => {
|
|
|
7083
7083
|
return error;
|
|
7084
7084
|
};
|
|
7085
7085
|
|
|
7086
|
-
//
|
|
7086
|
+
// node_modules/zod/v3/locales/en.js
|
|
7087
7087
|
var errorMap = (issue, _ctx) => {
|
|
7088
7088
|
let message;
|
|
7089
7089
|
switch (issue.code) {
|
|
@@ -7186,7 +7186,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
7186
7186
|
};
|
|
7187
7187
|
var en_default = errorMap;
|
|
7188
7188
|
|
|
7189
|
-
//
|
|
7189
|
+
// node_modules/zod/v3/errors.js
|
|
7190
7190
|
var overrideErrorMap = en_default;
|
|
7191
7191
|
function setErrorMap(map) {
|
|
7192
7192
|
overrideErrorMap = map;
|
|
@@ -7194,7 +7194,7 @@ function setErrorMap(map) {
|
|
|
7194
7194
|
function getErrorMap() {
|
|
7195
7195
|
return overrideErrorMap;
|
|
7196
7196
|
}
|
|
7197
|
-
//
|
|
7197
|
+
// node_modules/zod/v3/helpers/parseUtil.js
|
|
7198
7198
|
var makeIssue = (params) => {
|
|
7199
7199
|
const { data, path, errorMaps, issueData } = params;
|
|
7200
7200
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -7300,14 +7300,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
7300
7300
|
var isDirty = (x) => x.status === "dirty";
|
|
7301
7301
|
var isValid = (x) => x.status === "valid";
|
|
7302
7302
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
7303
|
-
//
|
|
7303
|
+
// node_modules/zod/v3/helpers/errorUtil.js
|
|
7304
7304
|
var errorUtil;
|
|
7305
7305
|
(function(errorUtil2) {
|
|
7306
7306
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
7307
7307
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
7308
7308
|
})(errorUtil || (errorUtil = {}));
|
|
7309
7309
|
|
|
7310
|
-
//
|
|
7310
|
+
// node_modules/zod/v3/types.js
|
|
7311
7311
|
class ParseInputLazyPath {
|
|
7312
7312
|
constructor(parent, value, path, key) {
|
|
7313
7313
|
this._cachedPath = [];
|
|
@@ -10694,7 +10694,7 @@ var coerce = {
|
|
|
10694
10694
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
10695
10695
|
};
|
|
10696
10696
|
var NEVER = INVALID;
|
|
10697
|
-
//
|
|
10697
|
+
// node_modules/zod/v4/core/core.js
|
|
10698
10698
|
var NEVER2 = Object.freeze({
|
|
10699
10699
|
status: "aborted"
|
|
10700
10700
|
});
|
|
@@ -10754,7 +10754,7 @@ function config(newConfig) {
|
|
|
10754
10754
|
Object.assign(globalConfig, newConfig);
|
|
10755
10755
|
return globalConfig;
|
|
10756
10756
|
}
|
|
10757
|
-
//
|
|
10757
|
+
// node_modules/zod/v4/core/util.js
|
|
10758
10758
|
var exports_util = {};
|
|
10759
10759
|
__export(exports_util, {
|
|
10760
10760
|
unwrapMessage: () => unwrapMessage,
|
|
@@ -11268,7 +11268,7 @@ class Class {
|
|
|
11268
11268
|
constructor(..._args) {}
|
|
11269
11269
|
}
|
|
11270
11270
|
|
|
11271
|
-
//
|
|
11271
|
+
// node_modules/zod/v4/core/errors.js
|
|
11272
11272
|
var initializer = (inst, def) => {
|
|
11273
11273
|
inst.name = "$ZodError";
|
|
11274
11274
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -11342,7 +11342,7 @@ function formatError(error, _mapper) {
|
|
|
11342
11342
|
return fieldErrors;
|
|
11343
11343
|
}
|
|
11344
11344
|
|
|
11345
|
-
//
|
|
11345
|
+
// node_modules/zod/v4/core/parse.js
|
|
11346
11346
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
11347
11347
|
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
11348
11348
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -11393,7 +11393,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
11393
11393
|
} : { success: true, data: result.value };
|
|
11394
11394
|
};
|
|
11395
11395
|
var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
11396
|
-
//
|
|
11396
|
+
// node_modules/zod/v4/core/regexes.js
|
|
11397
11397
|
var cuid = /^[cC][^\s-]{8,}$/;
|
|
11398
11398
|
var cuid2 = /^[0-9a-z]+$/;
|
|
11399
11399
|
var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
@@ -11451,7 +11451,7 @@ var _null = /null/i;
|
|
|
11451
11451
|
var lowercase = /^[^A-Z]*$/;
|
|
11452
11452
|
var uppercase = /^[^a-z]*$/;
|
|
11453
11453
|
|
|
11454
|
-
//
|
|
11454
|
+
// node_modules/zod/v4/core/checks.js
|
|
11455
11455
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
11456
11456
|
var _a;
|
|
11457
11457
|
inst._zod ?? (inst._zod = {});
|
|
@@ -11835,7 +11835,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
11835
11835
|
};
|
|
11836
11836
|
});
|
|
11837
11837
|
|
|
11838
|
-
//
|
|
11838
|
+
// node_modules/zod/v4/core/doc.js
|
|
11839
11839
|
class Doc {
|
|
11840
11840
|
constructor(args = []) {
|
|
11841
11841
|
this.content = [];
|
|
@@ -11873,14 +11873,14 @@ class Doc {
|
|
|
11873
11873
|
}
|
|
11874
11874
|
}
|
|
11875
11875
|
|
|
11876
|
-
//
|
|
11876
|
+
// node_modules/zod/v4/core/versions.js
|
|
11877
11877
|
var version = {
|
|
11878
11878
|
major: 4,
|
|
11879
11879
|
minor: 0,
|
|
11880
11880
|
patch: 0
|
|
11881
11881
|
};
|
|
11882
11882
|
|
|
11883
|
-
//
|
|
11883
|
+
// node_modules/zod/v4/core/schemas.js
|
|
11884
11884
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
11885
11885
|
var _a;
|
|
11886
11886
|
inst ?? (inst = {});
|
|
@@ -13111,7 +13111,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
13111
13111
|
payload.issues.push(issue(_iss));
|
|
13112
13112
|
}
|
|
13113
13113
|
}
|
|
13114
|
-
//
|
|
13114
|
+
// node_modules/zod/v4/locales/en.js
|
|
13115
13115
|
var parsedType = (data) => {
|
|
13116
13116
|
const t = typeof data;
|
|
13117
13117
|
switch (t) {
|
|
@@ -13228,7 +13228,7 @@ function en_default2() {
|
|
|
13228
13228
|
localeError: error()
|
|
13229
13229
|
};
|
|
13230
13230
|
}
|
|
13231
|
-
//
|
|
13231
|
+
// node_modules/zod/v4/core/registries.js
|
|
13232
13232
|
var $output = Symbol("ZodOutput");
|
|
13233
13233
|
var $input = Symbol("ZodInput");
|
|
13234
13234
|
|
|
@@ -13278,7 +13278,7 @@ function registry() {
|
|
|
13278
13278
|
return new $ZodRegistry;
|
|
13279
13279
|
}
|
|
13280
13280
|
var globalRegistry = /* @__PURE__ */ registry();
|
|
13281
|
-
//
|
|
13281
|
+
// node_modules/zod/v4/core/api.js
|
|
13282
13282
|
function _string(Class2, params) {
|
|
13283
13283
|
return new Class2({
|
|
13284
13284
|
type: "string",
|
|
@@ -13713,7 +13713,7 @@ function _refine(Class2, fn, _params) {
|
|
|
13713
13713
|
});
|
|
13714
13714
|
return schema;
|
|
13715
13715
|
}
|
|
13716
|
-
//
|
|
13716
|
+
// node_modules/zod/v4/core/to-json-schema.js
|
|
13717
13717
|
class JSONSchemaGenerator {
|
|
13718
13718
|
constructor(params) {
|
|
13719
13719
|
this.counter = 0;
|
|
@@ -14465,7 +14465,7 @@ function isTransforming(_schema, _ctx) {
|
|
|
14465
14465
|
}
|
|
14466
14466
|
throw new Error(`Unknown schema type: ${def.type}`);
|
|
14467
14467
|
}
|
|
14468
|
-
//
|
|
14468
|
+
// node_modules/zod/v4/mini/schemas.js
|
|
14469
14469
|
var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
|
|
14470
14470
|
if (!inst._zod)
|
|
14471
14471
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
@@ -14507,7 +14507,7 @@ function object(shape, params) {
|
|
|
14507
14507
|
};
|
|
14508
14508
|
return new ZodMiniObject(def);
|
|
14509
14509
|
}
|
|
14510
|
-
//
|
|
14510
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
14511
14511
|
function isZ4Schema(s) {
|
|
14512
14512
|
const schema = s;
|
|
14513
14513
|
return !!schema._zod;
|
|
@@ -14667,7 +14667,7 @@ function getLiteralValue(schema) {
|
|
|
14667
14667
|
return directValue;
|
|
14668
14668
|
return;
|
|
14669
14669
|
}
|
|
14670
|
-
//
|
|
14670
|
+
// node_modules/zod/v4/classic/iso.js
|
|
14671
14671
|
var exports_iso2 = {};
|
|
14672
14672
|
__export(exports_iso2, {
|
|
14673
14673
|
time: () => time2,
|
|
@@ -14708,7 +14708,7 @@ function duration2(params) {
|
|
|
14708
14708
|
return _isoDuration(ZodISODuration, params);
|
|
14709
14709
|
}
|
|
14710
14710
|
|
|
14711
|
-
//
|
|
14711
|
+
// node_modules/zod/v4/classic/errors.js
|
|
14712
14712
|
var initializer2 = (inst, issues) => {
|
|
14713
14713
|
$ZodError.init(inst, issues);
|
|
14714
14714
|
inst.name = "ZodError";
|
|
@@ -14737,13 +14737,13 @@ var ZodRealError = $constructor("ZodError", initializer2, {
|
|
|
14737
14737
|
Parent: Error
|
|
14738
14738
|
});
|
|
14739
14739
|
|
|
14740
|
-
//
|
|
14740
|
+
// node_modules/zod/v4/classic/parse.js
|
|
14741
14741
|
var parse4 = /* @__PURE__ */ _parse(ZodRealError);
|
|
14742
14742
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
14743
14743
|
var safeParse3 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
14744
14744
|
var safeParseAsync3 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
|
|
14745
14745
|
|
|
14746
|
-
//
|
|
14746
|
+
// node_modules/zod/v4/classic/schemas.js
|
|
14747
14747
|
var ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
14748
14748
|
$ZodType.init(inst, def);
|
|
14749
14749
|
inst.def = def;
|
|
@@ -15348,10 +15348,10 @@ function superRefine(fn) {
|
|
|
15348
15348
|
function preprocess(fn, schema) {
|
|
15349
15349
|
return pipe(transform(fn), schema);
|
|
15350
15350
|
}
|
|
15351
|
-
//
|
|
15351
|
+
// node_modules/zod/v4/classic/external.js
|
|
15352
15352
|
config(en_default2());
|
|
15353
15353
|
|
|
15354
|
-
//
|
|
15354
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
15355
15355
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
15356
15356
|
var DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
|
|
15357
15357
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
@@ -16198,12 +16198,12 @@ class UrlElicitationRequiredError extends McpError {
|
|
|
16198
16198
|
}
|
|
16199
16199
|
}
|
|
16200
16200
|
|
|
16201
|
-
//
|
|
16201
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
16202
16202
|
function isTerminal(status) {
|
|
16203
16203
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
16204
16204
|
}
|
|
16205
16205
|
|
|
16206
|
-
//
|
|
16206
|
+
// node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
16207
16207
|
var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
16208
16208
|
var defaultOptions = {
|
|
16209
16209
|
name: undefined,
|
|
@@ -16236,7 +16236,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
|
|
|
16236
16236
|
...defaultOptions,
|
|
16237
16237
|
...options
|
|
16238
16238
|
};
|
|
16239
|
-
//
|
|
16239
|
+
// node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
16240
16240
|
var getRefs = (options) => {
|
|
16241
16241
|
const _options = getDefaultOptions(options);
|
|
16242
16242
|
const currentPath = _options.name !== undefined ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
|
|
@@ -16255,7 +16255,7 @@ var getRefs = (options) => {
|
|
|
16255
16255
|
]))
|
|
16256
16256
|
};
|
|
16257
16257
|
};
|
|
16258
|
-
//
|
|
16258
|
+
// node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
16259
16259
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
16260
16260
|
if (!refs?.errorMessages)
|
|
16261
16261
|
return;
|
|
@@ -16270,7 +16270,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
16270
16270
|
res[key] = value;
|
|
16271
16271
|
addErrorMessage(res, key, errorMessage, refs);
|
|
16272
16272
|
}
|
|
16273
|
-
//
|
|
16273
|
+
// node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
16274
16274
|
var getRelativePath = (pathA, pathB) => {
|
|
16275
16275
|
let i = 0;
|
|
16276
16276
|
for (;i < pathA.length && i < pathB.length; i++) {
|
|
@@ -16279,7 +16279,7 @@ var getRelativePath = (pathA, pathB) => {
|
|
|
16279
16279
|
}
|
|
16280
16280
|
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
16281
16281
|
};
|
|
16282
|
-
//
|
|
16282
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
16283
16283
|
function parseAnyDef(refs) {
|
|
16284
16284
|
if (refs.target !== "openAi") {
|
|
16285
16285
|
return {};
|
|
@@ -16295,7 +16295,7 @@ function parseAnyDef(refs) {
|
|
|
16295
16295
|
};
|
|
16296
16296
|
}
|
|
16297
16297
|
|
|
16298
|
-
//
|
|
16298
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
16299
16299
|
function parseArrayDef(def, refs) {
|
|
16300
16300
|
const res = {
|
|
16301
16301
|
type: "array"
|
|
@@ -16319,7 +16319,7 @@ function parseArrayDef(def, refs) {
|
|
|
16319
16319
|
return res;
|
|
16320
16320
|
}
|
|
16321
16321
|
|
|
16322
|
-
//
|
|
16322
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
16323
16323
|
function parseBigintDef(def, refs) {
|
|
16324
16324
|
const res = {
|
|
16325
16325
|
type: "integer",
|
|
@@ -16365,24 +16365,24 @@ function parseBigintDef(def, refs) {
|
|
|
16365
16365
|
return res;
|
|
16366
16366
|
}
|
|
16367
16367
|
|
|
16368
|
-
//
|
|
16368
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
16369
16369
|
function parseBooleanDef() {
|
|
16370
16370
|
return {
|
|
16371
16371
|
type: "boolean"
|
|
16372
16372
|
};
|
|
16373
16373
|
}
|
|
16374
16374
|
|
|
16375
|
-
//
|
|
16375
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
16376
16376
|
function parseBrandedDef(_def, refs) {
|
|
16377
16377
|
return parseDef(_def.type._def, refs);
|
|
16378
16378
|
}
|
|
16379
16379
|
|
|
16380
|
-
//
|
|
16380
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
16381
16381
|
var parseCatchDef = (def, refs) => {
|
|
16382
16382
|
return parseDef(def.innerType._def, refs);
|
|
16383
16383
|
};
|
|
16384
16384
|
|
|
16385
|
-
//
|
|
16385
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
16386
16386
|
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
16387
16387
|
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
16388
16388
|
if (Array.isArray(strategy)) {
|
|
@@ -16427,7 +16427,7 @@ var integerDateParser = (def, refs) => {
|
|
|
16427
16427
|
return res;
|
|
16428
16428
|
};
|
|
16429
16429
|
|
|
16430
|
-
//
|
|
16430
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
16431
16431
|
function parseDefaultDef(_def, refs) {
|
|
16432
16432
|
return {
|
|
16433
16433
|
...parseDef(_def.innerType._def, refs),
|
|
@@ -16435,12 +16435,12 @@ function parseDefaultDef(_def, refs) {
|
|
|
16435
16435
|
};
|
|
16436
16436
|
}
|
|
16437
16437
|
|
|
16438
|
-
//
|
|
16438
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
16439
16439
|
function parseEffectsDef(_def, refs) {
|
|
16440
16440
|
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
|
|
16441
16441
|
}
|
|
16442
16442
|
|
|
16443
|
-
//
|
|
16443
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
16444
16444
|
function parseEnumDef(def) {
|
|
16445
16445
|
return {
|
|
16446
16446
|
type: "string",
|
|
@@ -16448,7 +16448,7 @@ function parseEnumDef(def) {
|
|
|
16448
16448
|
};
|
|
16449
16449
|
}
|
|
16450
16450
|
|
|
16451
|
-
//
|
|
16451
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
16452
16452
|
var isJsonSchema7AllOfType = (type) => {
|
|
16453
16453
|
if ("type" in type && type.type === "string")
|
|
16454
16454
|
return false;
|
|
@@ -16490,7 +16490,7 @@ function parseIntersectionDef(def, refs) {
|
|
|
16490
16490
|
} : undefined;
|
|
16491
16491
|
}
|
|
16492
16492
|
|
|
16493
|
-
//
|
|
16493
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
16494
16494
|
function parseLiteralDef(def, refs) {
|
|
16495
16495
|
const parsedType2 = typeof def.value;
|
|
16496
16496
|
if (parsedType2 !== "bigint" && parsedType2 !== "number" && parsedType2 !== "boolean" && parsedType2 !== "string") {
|
|
@@ -16510,7 +16510,7 @@ function parseLiteralDef(def, refs) {
|
|
|
16510
16510
|
};
|
|
16511
16511
|
}
|
|
16512
16512
|
|
|
16513
|
-
//
|
|
16513
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
16514
16514
|
var emojiRegex2 = undefined;
|
|
16515
16515
|
var zodPatterns = {
|
|
16516
16516
|
cuid: /^[cC][^\s-]{8,}$/,
|
|
@@ -16807,7 +16807,7 @@ function stringifyRegExpWithFlags(regex, refs) {
|
|
|
16807
16807
|
return pattern;
|
|
16808
16808
|
}
|
|
16809
16809
|
|
|
16810
|
-
//
|
|
16810
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
16811
16811
|
function parseRecordDef(def, refs) {
|
|
16812
16812
|
if (refs.target === "openAi") {
|
|
16813
16813
|
console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
@@ -16859,7 +16859,7 @@ function parseRecordDef(def, refs) {
|
|
|
16859
16859
|
return schema;
|
|
16860
16860
|
}
|
|
16861
16861
|
|
|
16862
|
-
//
|
|
16862
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
16863
16863
|
function parseMapDef(def, refs) {
|
|
16864
16864
|
if (refs.mapStrategy === "record") {
|
|
16865
16865
|
return parseRecordDef(def, refs);
|
|
@@ -16884,7 +16884,7 @@ function parseMapDef(def, refs) {
|
|
|
16884
16884
|
};
|
|
16885
16885
|
}
|
|
16886
16886
|
|
|
16887
|
-
//
|
|
16887
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
16888
16888
|
function parseNativeEnumDef(def) {
|
|
16889
16889
|
const object3 = def.values;
|
|
16890
16890
|
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
@@ -16898,7 +16898,7 @@ function parseNativeEnumDef(def) {
|
|
|
16898
16898
|
};
|
|
16899
16899
|
}
|
|
16900
16900
|
|
|
16901
|
-
//
|
|
16901
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
16902
16902
|
function parseNeverDef(refs) {
|
|
16903
16903
|
return refs.target === "openAi" ? undefined : {
|
|
16904
16904
|
not: parseAnyDef({
|
|
@@ -16908,7 +16908,7 @@ function parseNeverDef(refs) {
|
|
|
16908
16908
|
};
|
|
16909
16909
|
}
|
|
16910
16910
|
|
|
16911
|
-
//
|
|
16911
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
16912
16912
|
function parseNullDef(refs) {
|
|
16913
16913
|
return refs.target === "openApi3" ? {
|
|
16914
16914
|
enum: ["null"],
|
|
@@ -16918,7 +16918,7 @@ function parseNullDef(refs) {
|
|
|
16918
16918
|
};
|
|
16919
16919
|
}
|
|
16920
16920
|
|
|
16921
|
-
//
|
|
16921
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
16922
16922
|
var primitiveMappings = {
|
|
16923
16923
|
ZodString: "string",
|
|
16924
16924
|
ZodNumber: "number",
|
|
@@ -16986,7 +16986,7 @@ var asAnyOf = (def, refs) => {
|
|
|
16986
16986
|
return anyOf.length ? { anyOf } : undefined;
|
|
16987
16987
|
};
|
|
16988
16988
|
|
|
16989
|
-
//
|
|
16989
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
16990
16990
|
function parseNullableDef(def, refs) {
|
|
16991
16991
|
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
16992
16992
|
if (refs.target === "openApi3") {
|
|
@@ -17018,7 +17018,7 @@ function parseNullableDef(def, refs) {
|
|
|
17018
17018
|
return base && { anyOf: [base, { type: "null" }] };
|
|
17019
17019
|
}
|
|
17020
17020
|
|
|
17021
|
-
//
|
|
17021
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
17022
17022
|
function parseNumberDef(def, refs) {
|
|
17023
17023
|
const res = {
|
|
17024
17024
|
type: "number"
|
|
@@ -17067,7 +17067,7 @@ function parseNumberDef(def, refs) {
|
|
|
17067
17067
|
return res;
|
|
17068
17068
|
}
|
|
17069
17069
|
|
|
17070
|
-
//
|
|
17070
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
17071
17071
|
function parseObjectDef(def, refs) {
|
|
17072
17072
|
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
17073
17073
|
const result = {
|
|
@@ -17137,7 +17137,7 @@ function safeIsOptional(schema) {
|
|
|
17137
17137
|
}
|
|
17138
17138
|
}
|
|
17139
17139
|
|
|
17140
|
-
//
|
|
17140
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
17141
17141
|
var parseOptionalDef = (def, refs) => {
|
|
17142
17142
|
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
17143
17143
|
return parseDef(def.innerType._def, refs);
|
|
@@ -17156,7 +17156,7 @@ var parseOptionalDef = (def, refs) => {
|
|
|
17156
17156
|
} : parseAnyDef(refs);
|
|
17157
17157
|
};
|
|
17158
17158
|
|
|
17159
|
-
//
|
|
17159
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
17160
17160
|
var parsePipelineDef = (def, refs) => {
|
|
17161
17161
|
if (refs.pipeStrategy === "input") {
|
|
17162
17162
|
return parseDef(def.in._def, refs);
|
|
@@ -17176,12 +17176,12 @@ var parsePipelineDef = (def, refs) => {
|
|
|
17176
17176
|
};
|
|
17177
17177
|
};
|
|
17178
17178
|
|
|
17179
|
-
//
|
|
17179
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
17180
17180
|
function parsePromiseDef(def, refs) {
|
|
17181
17181
|
return parseDef(def.type._def, refs);
|
|
17182
17182
|
}
|
|
17183
17183
|
|
|
17184
|
-
//
|
|
17184
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
17185
17185
|
function parseSetDef(def, refs) {
|
|
17186
17186
|
const items = parseDef(def.valueType._def, {
|
|
17187
17187
|
...refs,
|
|
@@ -17201,7 +17201,7 @@ function parseSetDef(def, refs) {
|
|
|
17201
17201
|
return schema;
|
|
17202
17202
|
}
|
|
17203
17203
|
|
|
17204
|
-
//
|
|
17204
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
17205
17205
|
function parseTupleDef(def, refs) {
|
|
17206
17206
|
if (def.rest) {
|
|
17207
17207
|
return {
|
|
@@ -17229,24 +17229,24 @@ function parseTupleDef(def, refs) {
|
|
|
17229
17229
|
}
|
|
17230
17230
|
}
|
|
17231
17231
|
|
|
17232
|
-
//
|
|
17232
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
17233
17233
|
function parseUndefinedDef(refs) {
|
|
17234
17234
|
return {
|
|
17235
17235
|
not: parseAnyDef(refs)
|
|
17236
17236
|
};
|
|
17237
17237
|
}
|
|
17238
17238
|
|
|
17239
|
-
//
|
|
17239
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
17240
17240
|
function parseUnknownDef(refs) {
|
|
17241
17241
|
return parseAnyDef(refs);
|
|
17242
17242
|
}
|
|
17243
17243
|
|
|
17244
|
-
//
|
|
17244
|
+
// node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
17245
17245
|
var parseReadonlyDef = (def, refs) => {
|
|
17246
17246
|
return parseDef(def.innerType._def, refs);
|
|
17247
17247
|
};
|
|
17248
17248
|
|
|
17249
|
-
//
|
|
17249
|
+
// node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
17250
17250
|
var selectParser = (def, typeName, refs) => {
|
|
17251
17251
|
switch (typeName) {
|
|
17252
17252
|
case ZodFirstPartyTypeKind.ZodString:
|
|
@@ -17324,7 +17324,7 @@ var selectParser = (def, typeName, refs) => {
|
|
|
17324
17324
|
}
|
|
17325
17325
|
};
|
|
17326
17326
|
|
|
17327
|
-
//
|
|
17327
|
+
// node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
17328
17328
|
function parseDef(def, refs, forceResolution = false) {
|
|
17329
17329
|
const seenItem = refs.seen.get(def);
|
|
17330
17330
|
if (refs.override) {
|
|
@@ -17379,7 +17379,7 @@ var addMeta = (def, refs, jsonSchema) => {
|
|
|
17379
17379
|
}
|
|
17380
17380
|
return jsonSchema;
|
|
17381
17381
|
};
|
|
17382
|
-
//
|
|
17382
|
+
// node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
17383
17383
|
var zodToJsonSchema = (schema, options) => {
|
|
17384
17384
|
const refs = getRefs(options);
|
|
17385
17385
|
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
|
|
@@ -17439,7 +17439,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
17439
17439
|
}
|
|
17440
17440
|
return combined;
|
|
17441
17441
|
};
|
|
17442
|
-
//
|
|
17442
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
17443
17443
|
function mapMiniTarget(t) {
|
|
17444
17444
|
if (!t)
|
|
17445
17445
|
return "draft-7";
|
|
@@ -17481,7 +17481,7 @@ function parseWithCompat(schema, data) {
|
|
|
17481
17481
|
return result.data;
|
|
17482
17482
|
}
|
|
17483
17483
|
|
|
17484
|
-
//
|
|
17484
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
17485
17485
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
|
|
17486
17486
|
|
|
17487
17487
|
class Protocol {
|
|
@@ -18322,7 +18322,7 @@ function mergeCapabilities(base, additional) {
|
|
|
18322
18322
|
return result;
|
|
18323
18323
|
}
|
|
18324
18324
|
|
|
18325
|
-
//
|
|
18325
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
18326
18326
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
18327
18327
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
18328
18328
|
function createDefaultAjvInstance() {
|
|
@@ -18362,7 +18362,7 @@ class AjvJsonSchemaValidator {
|
|
|
18362
18362
|
}
|
|
18363
18363
|
}
|
|
18364
18364
|
|
|
18365
|
-
//
|
|
18365
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
18366
18366
|
class ExperimentalServerTasks {
|
|
18367
18367
|
constructor(_server) {
|
|
18368
18368
|
this._server = _server;
|
|
@@ -18440,7 +18440,7 @@ class ExperimentalServerTasks {
|
|
|
18440
18440
|
}
|
|
18441
18441
|
}
|
|
18442
18442
|
|
|
18443
|
-
//
|
|
18443
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
18444
18444
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
18445
18445
|
if (!requests) {
|
|
18446
18446
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -18475,7 +18475,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
18475
18475
|
}
|
|
18476
18476
|
}
|
|
18477
18477
|
|
|
18478
|
-
//
|
|
18478
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
18479
18479
|
class Server extends Protocol {
|
|
18480
18480
|
constructor(_serverInfo, options) {
|
|
18481
18481
|
super(options);
|
|
@@ -18799,7 +18799,7 @@ class Server extends Protocol {
|
|
|
18799
18799
|
}
|
|
18800
18800
|
}
|
|
18801
18801
|
|
|
18802
|
-
//
|
|
18802
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
18803
18803
|
var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
|
|
18804
18804
|
function isCompletable(schema) {
|
|
18805
18805
|
return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
|
|
@@ -18813,7 +18813,7 @@ var McpZodTypeKind;
|
|
|
18813
18813
|
McpZodTypeKind2["Completable"] = "McpCompletable";
|
|
18814
18814
|
})(McpZodTypeKind || (McpZodTypeKind = {}));
|
|
18815
18815
|
|
|
18816
|
-
//
|
|
18816
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
18817
18817
|
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
|
|
18818
18818
|
function validateToolName(name) {
|
|
18819
18819
|
const warnings = [];
|
|
@@ -18871,7 +18871,7 @@ function validateAndWarnToolName(name) {
|
|
|
18871
18871
|
return result.isValid;
|
|
18872
18872
|
}
|
|
18873
18873
|
|
|
18874
|
-
//
|
|
18874
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
|
|
18875
18875
|
class ExperimentalMcpServerTasks {
|
|
18876
18876
|
constructor(_mcpServer) {
|
|
18877
18877
|
this._mcpServer = _mcpServer;
|
|
@@ -18885,7 +18885,7 @@ class ExperimentalMcpServerTasks {
|
|
|
18885
18885
|
return mcpServerInternal._createRegisteredTool(name, config2.title, config2.description, config2.inputSchema, config2.outputSchema, config2.annotations, execution, config2._meta, handler);
|
|
18886
18886
|
}
|
|
18887
18887
|
}
|
|
18888
|
-
//
|
|
18888
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
18889
18889
|
class McpServer {
|
|
18890
18890
|
constructor(serverInfo, options) {
|
|
18891
18891
|
this._registeredResources = {};
|
|
@@ -19611,10 +19611,10 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
19611
19611
|
}
|
|
19612
19612
|
};
|
|
19613
19613
|
|
|
19614
|
-
//
|
|
19614
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
19615
19615
|
import process2 from "process";
|
|
19616
19616
|
|
|
19617
|
-
//
|
|
19617
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
19618
19618
|
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
19619
19619
|
|
|
19620
19620
|
class ReadBuffer {
|
|
@@ -19654,7 +19654,7 @@ function serializeMessage(message) {
|
|
|
19654
19654
|
`;
|
|
19655
19655
|
}
|
|
19656
19656
|
|
|
19657
|
-
//
|
|
19657
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
19658
19658
|
class StdioServerTransport {
|
|
19659
19659
|
constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
|
|
19660
19660
|
this._stdin = _stdin;
|
|
@@ -19811,6 +19811,7 @@ function readConnectorTokens(name, profile = "default") {
|
|
|
19811
19811
|
|
|
19812
19812
|
// src/cloud/http-storage.ts
|
|
19813
19813
|
import {
|
|
19814
|
+
ClientTransportConfigurationError,
|
|
19814
19815
|
createHasnaHttpTransport,
|
|
19815
19816
|
resolveCredential,
|
|
19816
19817
|
resolveClientTransport as resolveSharedClientTransport
|
|
@@ -19900,6 +19901,27 @@ function assertConfigurationUnchanged(env, expected) {
|
|
|
19900
19901
|
invalid();
|
|
19901
19902
|
}
|
|
19902
19903
|
|
|
19904
|
+
// src/cloud/resolver-inputs.ts
|
|
19905
|
+
import {
|
|
19906
|
+
clientTransportEnvKeys as clientTransportEnvKeys2,
|
|
19907
|
+
credentialOverrideEnvKey,
|
|
19908
|
+
credentialPointerEnvKey,
|
|
19909
|
+
CREDENTIAL_PROFILE_ENV_KEY
|
|
19910
|
+
} from "@hasna/contracts/client";
|
|
19911
|
+
var CONTRACTS_AMBIENT_ENVIRONMENT = Symbol.for("hasna:contracts:ambientClientEnvironment");
|
|
19912
|
+
function isAmbientContactsEnv(env) {
|
|
19913
|
+
if (typeof process !== "undefined" && env === process.env)
|
|
19914
|
+
return true;
|
|
19915
|
+
return env[CONTRACTS_AMBIENT_ENVIRONMENT] === true;
|
|
19916
|
+
}
|
|
19917
|
+
function contactsResolverCredentials(env, credentials = {}) {
|
|
19918
|
+
const keychain = { ...credentials.keychain };
|
|
19919
|
+
if (keychain.enabled === undefined && keychain.run === undefined) {
|
|
19920
|
+
keychain.enabled = isAmbientContactsEnv(env);
|
|
19921
|
+
}
|
|
19922
|
+
return { ...credentials, keychain };
|
|
19923
|
+
}
|
|
19924
|
+
|
|
19903
19925
|
// src/cloud/http-storage.ts
|
|
19904
19926
|
var RETIRED_CLIENT_SELECTOR_KEYS = [
|
|
19905
19927
|
"HASNA_CONTACTS_STORAGE_MODE",
|
|
@@ -19935,37 +19957,44 @@ class ContactsClientConfigurationError extends Error {
|
|
|
19935
19957
|
this.name = "ContactsClientConfigurationError";
|
|
19936
19958
|
}
|
|
19937
19959
|
}
|
|
19938
|
-
function unconfiguredResolution(resolution,
|
|
19960
|
+
function unconfiguredResolution(issue2, resolution, warning = null) {
|
|
19939
19961
|
return {
|
|
19940
19962
|
transport: "unconfigured",
|
|
19941
19963
|
baseUrl: null,
|
|
19942
|
-
apiUrlSource: resolution
|
|
19943
|
-
apiKeyPresent: resolution
|
|
19944
|
-
apiKeySource: resolution
|
|
19945
|
-
apiKeyTier: resolution
|
|
19964
|
+
apiUrlSource: resolution?.apiUrlSource ?? null,
|
|
19965
|
+
apiKeyPresent: resolution?.apiKeyPresent ?? false,
|
|
19966
|
+
apiKeySource: resolution?.apiKeySource ?? null,
|
|
19967
|
+
apiKeyTier: resolution?.apiKeyTier ?? null,
|
|
19946
19968
|
configured: false,
|
|
19947
19969
|
misconfigured: true,
|
|
19948
19970
|
issue: issue2,
|
|
19949
|
-
warning
|
|
19971
|
+
warning
|
|
19950
19972
|
};
|
|
19951
19973
|
}
|
|
19952
|
-
function resolveContactsClientTransport(name, env = process.env) {
|
|
19974
|
+
function resolveContactsClientTransport(name, env = process.env, credentials = {}) {
|
|
19953
19975
|
if (name !== "contacts") {
|
|
19954
19976
|
throw new ContactsClientConfigurationError("CONTACTS_CLIENT_NAME_INVALID", "This resolver only accepts the contacts app slug.");
|
|
19955
19977
|
}
|
|
19956
19978
|
assertNoRetiredClientSelectors(env);
|
|
19957
19979
|
const stamp = clientConfigurationStamp(env);
|
|
19958
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
19961
|
-
|
|
19962
|
-
|
|
19980
|
+
let resolution;
|
|
19981
|
+
try {
|
|
19982
|
+
resolution = resolveSharedClientTransport(name, env, {
|
|
19983
|
+
credentials: contactsResolverCredentials(env, credentials)
|
|
19984
|
+
});
|
|
19985
|
+
} catch (error2) {
|
|
19986
|
+
assertConfigurationUnchanged(env, stamp);
|
|
19987
|
+
if (error2 instanceof ClientTransportConfigurationError) {
|
|
19988
|
+
return unconfiguredResolution(error2.message, null);
|
|
19989
|
+
}
|
|
19990
|
+
throw error2;
|
|
19963
19991
|
}
|
|
19992
|
+
assertConfigurationUnchanged(env, stamp);
|
|
19964
19993
|
try {
|
|
19965
19994
|
assertHttpsBaseUrl(resolution.baseUrl);
|
|
19966
19995
|
} catch (error2) {
|
|
19967
19996
|
return {
|
|
19968
|
-
...unconfiguredResolution(
|
|
19997
|
+
...unconfiguredResolution(error2 instanceof Error ? error2.message : String(error2), resolution),
|
|
19969
19998
|
apiKeyPresent: resolution.apiKeyPresent
|
|
19970
19999
|
};
|
|
19971
20000
|
}
|
|
@@ -19979,7 +20008,7 @@ function resolveContactsClientTransport(name, env = process.env) {
|
|
|
19979
20008
|
configured: true,
|
|
19980
20009
|
misconfigured: false,
|
|
19981
20010
|
issue: null,
|
|
19982
|
-
warning:
|
|
20011
|
+
warning: resolution.warning
|
|
19983
20012
|
};
|
|
19984
20013
|
}
|
|
19985
20014
|
function resourcePath(resource) {
|
|
@@ -20033,20 +20062,21 @@ function createStorageClient(name, transport) {
|
|
|
20033
20062
|
}
|
|
20034
20063
|
};
|
|
20035
20064
|
}
|
|
20036
|
-
function resolveContactsStorageClient(name, env = process.env) {
|
|
20037
|
-
const resolution = resolveContactsClientTransport(name, env);
|
|
20065
|
+
function resolveContactsStorageClient(name, env = process.env, credentials = {}) {
|
|
20066
|
+
const resolution = resolveContactsClientTransport(name, env, credentials);
|
|
20038
20067
|
if (!resolution.configured || !resolution.baseUrl) {
|
|
20039
20068
|
throw new ContactsClientConfigurationError("CONTACTS_API_NOT_CONFIGURED", `${resolution.issue ?? "The contacts API client is not configured."} ` + "Configure HASNA_CONTACTS_API_URL and a contacts API key; the client will not read or create a local SQLite database.");
|
|
20040
20069
|
}
|
|
20041
20070
|
const baseUrl = resolution.baseUrl;
|
|
20071
|
+
const chainOptions = contactsResolverCredentials(env, credentials);
|
|
20042
20072
|
const request = async (method, path, body, opts) => {
|
|
20043
20073
|
const stamp = clientConfigurationStamp(env);
|
|
20044
20074
|
const snapshot = { ...env };
|
|
20045
|
-
const current = resolveContactsClientTransport(name, snapshot);
|
|
20075
|
+
const current = resolveContactsClientTransport(name, snapshot, chainOptions);
|
|
20046
20076
|
if (!current.configured || current.baseUrl !== baseUrl) {
|
|
20047
20077
|
throw new ContactsClientConfigurationError("CONTACTS_AUTHORITY_CHANGED", "Client authority changed or disappeared; construct a new client before sending data.");
|
|
20048
20078
|
}
|
|
20049
|
-
const credential = resolveCredential(name, snapshot);
|
|
20079
|
+
const credential = resolveCredential(name, snapshot, chainOptions);
|
|
20050
20080
|
if (!credential)
|
|
20051
20081
|
throw new ContactsClientConfigurationError("CONTACTS_API_NOT_CONFIGURED", "No credential is available.");
|
|
20052
20082
|
assertConfigurationUnchanged(env, stamp);
|
|
@@ -20096,6 +20126,39 @@ function stripUndefined(input) {
|
|
|
20096
20126
|
return out;
|
|
20097
20127
|
}
|
|
20098
20128
|
|
|
20129
|
+
class ContactsApiResponseError extends Error {
|
|
20130
|
+
constructor(operation, detail) {
|
|
20131
|
+
super(`contacts: malformed /v1 response for ${operation}: ${detail}`);
|
|
20132
|
+
this.name = "ContactsApiResponseError";
|
|
20133
|
+
}
|
|
20134
|
+
}
|
|
20135
|
+
function requireAppendedContact(response, contactId, collection, matchKey, value) {
|
|
20136
|
+
const operation = collection === "emails" ? "addEmailToContact" : "addPhoneToContact";
|
|
20137
|
+
const contact = pick2(response, "contact");
|
|
20138
|
+
if (!contact || typeof contact !== "object" || Array.isArray(contact)) {
|
|
20139
|
+
throw new ContactsApiResponseError(operation, "expected an object at response.contact");
|
|
20140
|
+
}
|
|
20141
|
+
if (contact.id !== contactId) {
|
|
20142
|
+
throw new ContactsApiResponseError(operation, "response.contact.id did not match the requested contact");
|
|
20143
|
+
}
|
|
20144
|
+
const items = contact[collection];
|
|
20145
|
+
if (!Array.isArray(items)) {
|
|
20146
|
+
throw new ContactsApiResponseError(operation, `response.contact.${collection} was not an array`);
|
|
20147
|
+
}
|
|
20148
|
+
const normalize = collection === "emails" ? (input) => input.toLowerCase() : (input) => input;
|
|
20149
|
+
const wanted = normalize(value);
|
|
20150
|
+
const appended = items.find((item) => {
|
|
20151
|
+
if (!item || typeof item !== "object" || Array.isArray(item))
|
|
20152
|
+
return false;
|
|
20153
|
+
const record3 = item;
|
|
20154
|
+
return typeof record3.id === "string" && record3.contact_id === contactId && typeof record3[matchKey] === "string" && normalize(record3[matchKey]) === wanted;
|
|
20155
|
+
});
|
|
20156
|
+
if (!appended) {
|
|
20157
|
+
throw new ContactsApiResponseError(operation, `response.contact.${collection} did not contain the requested value`);
|
|
20158
|
+
}
|
|
20159
|
+
return contact;
|
|
20160
|
+
}
|
|
20161
|
+
|
|
20099
20162
|
class ApiStore {
|
|
20100
20163
|
client;
|
|
20101
20164
|
mode = "api";
|
|
@@ -20165,11 +20228,17 @@ class ApiStore {
|
|
|
20165
20228
|
async mergeContacts() {
|
|
20166
20229
|
return unavailable("mergeContacts");
|
|
20167
20230
|
}
|
|
20168
|
-
async addEmailToContact() {
|
|
20169
|
-
|
|
20231
|
+
async addEmailToContact(contactId, email2) {
|
|
20232
|
+
const res = await this.patch(`/contacts/${this.enc(contactId)}`, {
|
|
20233
|
+
emails_add: [stripUndefined(email2)]
|
|
20234
|
+
});
|
|
20235
|
+
return requireAppendedContact(res, contactId, "emails", "address", email2.address);
|
|
20170
20236
|
}
|
|
20171
|
-
async addPhoneToContact() {
|
|
20172
|
-
|
|
20237
|
+
async addPhoneToContact(contactId, phone) {
|
|
20238
|
+
const res = await this.patch(`/contacts/${this.enc(contactId)}`, {
|
|
20239
|
+
phones_add: [stripUndefined(phone)]
|
|
20240
|
+
});
|
|
20241
|
+
return requireAppendedContact(res, contactId, "phones", "number", phone.number);
|
|
20173
20242
|
}
|
|
20174
20243
|
async archiveContact() {
|
|
20175
20244
|
return unavailable("archiveContact");
|
|
@@ -21074,6 +21143,58 @@ async function importContacts(format, data) {
|
|
|
21074
21143
|
}
|
|
21075
21144
|
}
|
|
21076
21145
|
|
|
21146
|
+
// src/lib/compact-output.ts
|
|
21147
|
+
var CONTACTS_COMPACT_LIMIT = 20;
|
|
21148
|
+
var CONTACTS_MAX_LIMIT = 500;
|
|
21149
|
+
function normalizeContactsLimit(value, fallback = CONTACTS_COMPACT_LIMIT) {
|
|
21150
|
+
const parsed = typeof value === "number" ? value : Number(value ?? fallback);
|
|
21151
|
+
if (!Number.isFinite(parsed))
|
|
21152
|
+
return fallback;
|
|
21153
|
+
return Math.max(1, Math.min(CONTACTS_MAX_LIMIT, Math.trunc(parsed)));
|
|
21154
|
+
}
|
|
21155
|
+
function normalizeContactsOffset(value) {
|
|
21156
|
+
const parsed = typeof value === "number" ? value : Number(value ?? 0);
|
|
21157
|
+
if (!Number.isFinite(parsed))
|
|
21158
|
+
return 0;
|
|
21159
|
+
return Math.max(0, Math.trunc(parsed));
|
|
21160
|
+
}
|
|
21161
|
+
function summarizeContact(contact) {
|
|
21162
|
+
return {
|
|
21163
|
+
id: contact.id,
|
|
21164
|
+
display_name: contact.display_name,
|
|
21165
|
+
job_title: contact.job_title,
|
|
21166
|
+
company: contact.company ? { id: contact.company.id, name: contact.company.name } : null,
|
|
21167
|
+
primary_email: contact.emails?.find((email2) => email2.is_primary)?.address ?? contact.emails?.[0]?.address ?? null,
|
|
21168
|
+
primary_phone: contact.phones?.find((phone) => phone.is_primary)?.number ?? contact.phones?.[0]?.number ?? null,
|
|
21169
|
+
status: contact.status,
|
|
21170
|
+
follow_up_at: contact.follow_up_at,
|
|
21171
|
+
last_contacted_at: contact.last_contacted_at,
|
|
21172
|
+
archived: contact.archived,
|
|
21173
|
+
sensitivity: contact.sensitivity,
|
|
21174
|
+
tags: (contact.tags ?? []).map((tag) => ({ id: tag.id, name: tag.name })),
|
|
21175
|
+
updated_at: contact.updated_at
|
|
21176
|
+
};
|
|
21177
|
+
}
|
|
21178
|
+
function compareContactsByDisplayNameAndId(left, right) {
|
|
21179
|
+
return left.display_name.localeCompare(right.display_name) || left.id.localeCompare(right.id);
|
|
21180
|
+
}
|
|
21181
|
+
function compactContactsPage(contacts, options) {
|
|
21182
|
+
const ordered = [...contacts].sort(compareContactsByDisplayNameAndId);
|
|
21183
|
+
const nextCursor = options.offset + ordered.length < options.total ? options.offset + contacts.length : null;
|
|
21184
|
+
return {
|
|
21185
|
+
contacts: ordered.map(summarizeContact),
|
|
21186
|
+
count: ordered.length,
|
|
21187
|
+
total: options.total,
|
|
21188
|
+
limit: options.limit,
|
|
21189
|
+
cursor: options.offset,
|
|
21190
|
+
next_cursor: nextCursor,
|
|
21191
|
+
has_more: nextCursor !== null,
|
|
21192
|
+
compact: true,
|
|
21193
|
+
sort: { fields: ["display_name", "id"], direction: "asc" },
|
|
21194
|
+
hint: "Use contacts show <id> for one full record; pass --full for the legacy list payload."
|
|
21195
|
+
};
|
|
21196
|
+
}
|
|
21197
|
+
|
|
21077
21198
|
// src/mcp/handlers/core.ts
|
|
21078
21199
|
var json = (v) => ({ content: [{ type: "text", text: JSON.stringify(v, null, 2) }] });
|
|
21079
21200
|
async function withProjectIds(store, contact) {
|
|
@@ -21114,12 +21235,12 @@ var coreHandlers = {
|
|
|
21114
21235
|
status: a.status,
|
|
21115
21236
|
follow_up_at: a.follow_up_at,
|
|
21116
21237
|
project_id: a.project_id,
|
|
21238
|
+
source: a.source,
|
|
21239
|
+
tag_ids: a.tag_ids,
|
|
21117
21240
|
emails: a.emails,
|
|
21118
21241
|
phones: a.phones,
|
|
21119
21242
|
addresses: a.addresses,
|
|
21120
21243
|
social_profiles: a.social_profiles,
|
|
21121
|
-
tag_ids: a.tag_ids,
|
|
21122
|
-
source: a.source,
|
|
21123
21244
|
sensitivity: a.sensitivity
|
|
21124
21245
|
};
|
|
21125
21246
|
const contact = await store.createContact(input);
|
|
@@ -21168,24 +21289,17 @@ var coreHandlers = {
|
|
|
21168
21289
|
},
|
|
21169
21290
|
list_contacts: async (a) => {
|
|
21170
21291
|
const store = getStore();
|
|
21292
|
+
const verbose = a.verbose === true;
|
|
21293
|
+
const limit = normalizeContactsLimit(a.limit, verbose ? 50 : 20);
|
|
21294
|
+
const offset = normalizeContactsOffset(a.offset);
|
|
21171
21295
|
const result = await store.listContacts({
|
|
21172
21296
|
company_id: a.company_id,
|
|
21173
21297
|
tag_id: a.tag_id,
|
|
21174
|
-
tag_ids: a.tag_ids,
|
|
21175
|
-
source: a.source,
|
|
21176
21298
|
status: a.status,
|
|
21177
|
-
|
|
21178
|
-
|
|
21179
|
-
include_restricted: a.include_restricted,
|
|
21180
|
-
follow_up_due: a.follow_up_due,
|
|
21181
|
-
last_contacted_after: a.last_contacted_after,
|
|
21182
|
-
last_contacted_before: a.last_contacted_before,
|
|
21183
|
-
limit: a.limit,
|
|
21184
|
-
offset: a.offset,
|
|
21185
|
-
order_by: a.order_by,
|
|
21186
|
-
order_dir: a.order_dir
|
|
21299
|
+
limit,
|
|
21300
|
+
offset
|
|
21187
21301
|
});
|
|
21188
|
-
return json({ contacts: result.contacts, count: result.total });
|
|
21302
|
+
return json(verbose ? { contacts: result.contacts, count: result.total } : compactContactsPage(result.contacts, { total: result.total, limit, offset }));
|
|
21189
21303
|
},
|
|
21190
21304
|
search_contacts: async (a) => json(await getStore().searchContacts(a.query)),
|
|
21191
21305
|
create_company: async (a) => {
|
|
@@ -23248,25 +23362,16 @@ var TOOL_DEFINITIONS = [
|
|
|
23248
23362
|
},
|
|
23249
23363
|
{
|
|
23250
23364
|
name: "list_contacts",
|
|
23251
|
-
description: "List
|
|
23365
|
+
description: "List the hosted contacts page in deterministic display_name,id order. Supported hosted filters: company_id, tag_id, and status.",
|
|
23252
23366
|
inputSchema: {
|
|
23253
23367
|
type: "object",
|
|
23254
23368
|
properties: {
|
|
23255
23369
|
company_id: { type: "string" },
|
|
23256
|
-
tag_id: { type: "string", description: "Filter by
|
|
23257
|
-
tag_ids: { type: "array", items: { type: "string" }, description: "Filter by multiple tag IDs (AND logic \u2014 contact must have all tags)" },
|
|
23258
|
-
source: { type: "string", enum: ["manual", "import", "linkedin", "github", "twitter", "email", "calendar", "crm", "other"] },
|
|
23370
|
+
tag_id: { type: "string", description: "Filter by one hosted tag ID" },
|
|
23259
23371
|
status: { type: "string", enum: ["active", "pending_reply", "converted", "closed", "other"] },
|
|
23260
|
-
|
|
23261
|
-
|
|
23262
|
-
|
|
23263
|
-
follow_up_due: { type: "boolean", description: "Only return contacts whose follow_up_at is in the past" },
|
|
23264
|
-
last_contacted_after: { type: "string", description: "ISO 8601 date \u2014 only contacts last contacted after this date" },
|
|
23265
|
-
last_contacted_before: { type: "string", description: "ISO 8601 date \u2014 only contacts last contacted before this date" },
|
|
23266
|
-
limit: { type: "number", description: "Max results (default 50)" },
|
|
23267
|
-
offset: { type: "number" },
|
|
23268
|
-
order_by: { type: "string", enum: ["display_name", "created_at", "updated_at", "last_contacted_at", "follow_up_at"] },
|
|
23269
|
-
order_dir: { type: "string", enum: ["asc", "desc"] }
|
|
23372
|
+
limit: { type: "number", description: "Max results (default 20 compact, 50 verbose; hosted max 500)" },
|
|
23373
|
+
offset: { type: "number", description: "Zero-based pagination cursor" },
|
|
23374
|
+
verbose: { type: "boolean", description: "Return the legacy full contact records" }
|
|
23270
23375
|
}
|
|
23271
23376
|
}
|
|
23272
23377
|
},
|
|
@@ -24618,6 +24723,69 @@ var TOOL_DEFINITIONS = [
|
|
|
24618
24723
|
{ name: "sync_suppressions", description: "Push unsynced email suppressions to mailery via @hasna/mailery. Use dry_run to preview.", inputSchema: { type: "object", properties: { dry_run: { type: "boolean" } }, required: [] } }
|
|
24619
24724
|
];
|
|
24620
24725
|
|
|
24726
|
+
// src/mcp/profile.ts
|
|
24727
|
+
var CONTACTS_MCP_PROFILE_ENV = "HASNA_CONTACTS_MCP_PROFILE";
|
|
24728
|
+
var CONTACTS_CORE_TOOL_NAMES = [
|
|
24729
|
+
"create_contact",
|
|
24730
|
+
"get_contact",
|
|
24731
|
+
"update_contact",
|
|
24732
|
+
"delete_contact",
|
|
24733
|
+
"list_contacts",
|
|
24734
|
+
"search_contacts",
|
|
24735
|
+
"find_or_create_contact",
|
|
24736
|
+
"upsert_contact",
|
|
24737
|
+
"get_contact_by_email",
|
|
24738
|
+
"add_email_to_contact",
|
|
24739
|
+
"add_phone_to_contact",
|
|
24740
|
+
"create_company",
|
|
24741
|
+
"get_company",
|
|
24742
|
+
"update_company",
|
|
24743
|
+
"delete_company",
|
|
24744
|
+
"list_companies",
|
|
24745
|
+
"search_companies",
|
|
24746
|
+
"create_tag",
|
|
24747
|
+
"list_tags",
|
|
24748
|
+
"add_tag_to_contact",
|
|
24749
|
+
"remove_tag_from_contact",
|
|
24750
|
+
"add_relationship",
|
|
24751
|
+
"list_relationships",
|
|
24752
|
+
"delete_relationship",
|
|
24753
|
+
"get_contact_brief",
|
|
24754
|
+
"get_contact_timeline",
|
|
24755
|
+
"get_recent_contact_events",
|
|
24756
|
+
"send_feedback",
|
|
24757
|
+
"contacts_connection_status",
|
|
24758
|
+
"search_tools",
|
|
24759
|
+
"describe_tools"
|
|
24760
|
+
];
|
|
24761
|
+
var CORE_TOOLS = new Set(CONTACTS_CORE_TOOL_NAMES);
|
|
24762
|
+
function resolveContactsMcpProfile(argv = [], env = process.env, defaultProfile = "core") {
|
|
24763
|
+
let cliValue;
|
|
24764
|
+
for (let index = 0;index < argv.length; index += 1) {
|
|
24765
|
+
const arg = argv[index];
|
|
24766
|
+
if (arg === "--mcp-profile") {
|
|
24767
|
+
const value2 = argv[index + 1];
|
|
24768
|
+
if (!value2 || value2.startsWith("-"))
|
|
24769
|
+
throw new Error("--mcp-profile requires core or full");
|
|
24770
|
+
if (cliValue !== undefined)
|
|
24771
|
+
throw new Error("--mcp-profile may be provided only once");
|
|
24772
|
+
cliValue = value2;
|
|
24773
|
+
index += 1;
|
|
24774
|
+
} else if (arg.startsWith("--mcp-profile=")) {
|
|
24775
|
+
if (cliValue !== undefined)
|
|
24776
|
+
throw new Error("--mcp-profile may be provided only once");
|
|
24777
|
+
cliValue = arg.slice("--mcp-profile=".length);
|
|
24778
|
+
}
|
|
24779
|
+
}
|
|
24780
|
+
const value = (cliValue ?? env[CONTACTS_MCP_PROFILE_ENV] ?? defaultProfile).trim().toLowerCase();
|
|
24781
|
+
if (value === "core" || value === "full")
|
|
24782
|
+
return value;
|
|
24783
|
+
throw new Error(`Invalid ${CONTACTS_MCP_PROFILE_ENV} value ${JSON.stringify(value)}: expected core or full`);
|
|
24784
|
+
}
|
|
24785
|
+
function shouldRegisterContactsTool(name, profile) {
|
|
24786
|
+
return profile === "full" || CORE_TOOLS.has(name);
|
|
24787
|
+
}
|
|
24788
|
+
|
|
24621
24789
|
// src/mcp/register-tools.ts
|
|
24622
24790
|
function formatToolError(err) {
|
|
24623
24791
|
if (err instanceof ConnectorNotInstalledError || err instanceof ConnectorAuthError) {
|
|
@@ -24625,8 +24793,10 @@ function formatToolError(err) {
|
|
|
24625
24793
|
}
|
|
24626
24794
|
return `Error: ${err instanceof Error ? err.message : String(err)}`;
|
|
24627
24795
|
}
|
|
24628
|
-
function registerContactsTools(server) {
|
|
24796
|
+
function registerContactsTools(server, profile = "full") {
|
|
24629
24797
|
for (const tool of TOOL_DEFINITIONS) {
|
|
24798
|
+
if (!shouldRegisterContactsTool(tool.name, profile))
|
|
24799
|
+
continue;
|
|
24630
24800
|
const handler = allHandlers[tool.name];
|
|
24631
24801
|
if (!handler)
|
|
24632
24802
|
continue;
|
|
@@ -24642,6 +24812,41 @@ function registerContactsTools(server) {
|
|
|
24642
24812
|
});
|
|
24643
24813
|
}
|
|
24644
24814
|
}
|
|
24815
|
+
var CONTACTS_DISCOVERY_DEFINITIONS = [
|
|
24816
|
+
...TOOL_DEFINITIONS,
|
|
24817
|
+
{
|
|
24818
|
+
name: "contacts_connection_status",
|
|
24819
|
+
description: "Inspect canonical hosted Contacts HTTPS configuration without credential values.",
|
|
24820
|
+
inputSchema: { type: "object", properties: {} }
|
|
24821
|
+
}
|
|
24822
|
+
];
|
|
24823
|
+
function registerContactsDiscoveryTools(server) {
|
|
24824
|
+
server.tool("search_tools", "Search the complete Contacts MCP inventory by tool name or description without loading every schema.", {
|
|
24825
|
+
query: exports_external.string().optional().describe("Optional name/description filter"),
|
|
24826
|
+
limit: exports_external.number().int().positive().max(100).optional().describe("Maximum matches (default 20, max 100)"),
|
|
24827
|
+
cursor: exports_external.number().int().nonnegative().optional().describe("Zero-based result cursor")
|
|
24828
|
+
}, async (args) => {
|
|
24829
|
+
const query = String(args.query ?? "").trim().toLowerCase();
|
|
24830
|
+
const limit = Math.max(1, Math.min(100, Math.trunc(args.limit ?? 20)));
|
|
24831
|
+
const cursor = Math.max(0, Math.trunc(args.cursor ?? 0));
|
|
24832
|
+
const matches = CONTACTS_DISCOVERY_DEFINITIONS.filter((tool) => !query || tool.name.includes(query) || (tool.description ?? "").toLowerCase().includes(query));
|
|
24833
|
+
const items = matches.slice(cursor, cursor + limit).map((tool) => ({ name: tool.name, description: tool.description ?? "" }));
|
|
24834
|
+
const nextCursor = cursor + items.length < matches.length ? cursor + items.length : null;
|
|
24835
|
+
return { content: [{ type: "text", text: JSON.stringify({ items, count: items.length, total: matches.length, cursor, next_cursor: nextCursor, has_more: nextCursor !== null, hint: "Restart with HASNA_CONTACTS_MCP_PROFILE=full to expose the complete callable inventory." }) }] };
|
|
24836
|
+
});
|
|
24837
|
+
server.tool("describe_tools", "Describe selected Contacts tools on demand.", { names: exports_external.array(exports_external.string()).max(20).describe("Tool names (max 20)") }, async (args) => {
|
|
24838
|
+
const names = Array.isArray(args.names) ? args.names.slice(0, 20) : [];
|
|
24839
|
+
const wanted = new Set(names);
|
|
24840
|
+
const items = CONTACTS_DISCOVERY_DEFINITIONS.filter((tool) => wanted.has(tool.name)).map((tool) => ({
|
|
24841
|
+
name: tool.name,
|
|
24842
|
+
description: tool.description ?? "",
|
|
24843
|
+
inputSchema: tool.inputSchema ?? { type: "object", properties: {} }
|
|
24844
|
+
}));
|
|
24845
|
+
const found = new Set(items.map((item) => item.name));
|
|
24846
|
+
const missing = names.filter((name) => !found.has(name));
|
|
24847
|
+
return { content: [{ type: "text", text: JSON.stringify({ items, count: items.length, requested: names.length, missing, complete: missing.length === 0, hint: "Restart with HASNA_CONTACTS_MCP_PROFILE=full for callable non-core tools." }) }] };
|
|
24848
|
+
});
|
|
24849
|
+
}
|
|
24645
24850
|
|
|
24646
24851
|
// src/mcp/storage-tools.ts
|
|
24647
24852
|
function ok(data) {
|
|
@@ -24668,7 +24873,9 @@ function connectionStatus() {
|
|
|
24668
24873
|
local_fallback: false
|
|
24669
24874
|
};
|
|
24670
24875
|
}
|
|
24671
|
-
function registerContactsStorageTools(server) {
|
|
24876
|
+
function registerContactsStorageTools(server, profile = "full") {
|
|
24877
|
+
if (!shouldRegisterContactsTool("contacts_connection_status", profile))
|
|
24878
|
+
return;
|
|
24672
24879
|
server.tool("contacts_connection_status", "Inspect the canonical contacts HTTPS client configuration without exposing credential values", {}, async () => {
|
|
24673
24880
|
try {
|
|
24674
24881
|
return ok(connectionStatus());
|
|
@@ -24678,7 +24885,38 @@ function registerContactsStorageTools(server) {
|
|
|
24678
24885
|
});
|
|
24679
24886
|
}
|
|
24680
24887
|
|
|
24681
|
-
//
|
|
24888
|
+
// src/mcp/startup-gate.ts
|
|
24889
|
+
import {
|
|
24890
|
+
completePointerCredential,
|
|
24891
|
+
resolveCredential as resolveCredential2
|
|
24892
|
+
} from "@hasna/contracts/client";
|
|
24893
|
+
var MCP_REFUSAL_PREFIX = "contacts-mcp: refusing to start \u2014";
|
|
24894
|
+
var MCP_REFUSAL_HINT = "The MCP server never serves tools without a contacts credential and never reads or creates a local store; " + "configure the credential and restart contacts-mcp.";
|
|
24895
|
+
async function resolveMcpStartupGate(env = process.env, credentials = {}, options = {}) {
|
|
24896
|
+
let issue2;
|
|
24897
|
+
try {
|
|
24898
|
+
const resolution = resolveContactsClientTransport("contacts", env, credentials);
|
|
24899
|
+
if (resolution.configured) {
|
|
24900
|
+
if (resolution.apiKeyTier !== "pointer") {
|
|
24901
|
+
return { ok: true, apiUrlSource: resolution.apiUrlSource, apiKeySource: resolution.apiKeySource };
|
|
24902
|
+
}
|
|
24903
|
+
const chainOptions = contactsResolverCredentials(env, credentials);
|
|
24904
|
+
const pointer = resolveCredential2("contacts", env, chainOptions);
|
|
24905
|
+
if (!pointer || pointer.tier !== "pointer") {
|
|
24906
|
+
throw new Error(`${resolution.apiKeySource ?? "HASNA_CONTACTS_API_KEY_REF"} resolved as a vault pointer but produced no pointer credential; this is a defect in the resolver.`);
|
|
24907
|
+
}
|
|
24908
|
+
const completed = await (options.completePointer ?? completePointerCredential)("contacts", pointer, env);
|
|
24909
|
+
return { ok: true, apiUrlSource: resolution.apiUrlSource, apiKeySource: completed.source };
|
|
24910
|
+
}
|
|
24911
|
+
issue2 = `CONTACTS_API_NOT_CONFIGURED: ${resolution.issue ?? "The contacts API client is not configured."}`;
|
|
24912
|
+
} catch (error2) {
|
|
24913
|
+
issue2 = error2 instanceof Error ? error2.message : String(error2);
|
|
24914
|
+
}
|
|
24915
|
+
return { ok: false, message: `${MCP_REFUSAL_PREFIX} ${issue2}
|
|
24916
|
+
${MCP_REFUSAL_HINT}` };
|
|
24917
|
+
}
|
|
24918
|
+
|
|
24919
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
|
|
24682
24920
|
var import_content_type = __toESM(require_content_type(), 1);
|
|
24683
24921
|
function mediaTypeEssence(header) {
|
|
24684
24922
|
if (!header) {
|
|
@@ -24701,7 +24939,7 @@ function isJsonContentType(header) {
|
|
|
24701
24939
|
return mediaTypeEssence(header) === "application/json";
|
|
24702
24940
|
}
|
|
24703
24941
|
|
|
24704
|
-
//
|
|
24942
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js
|
|
24705
24943
|
var DEFAULT_SSE_KEEP_ALIVE_MS = 15000;
|
|
24706
24944
|
var MAX_TIMER_DELAY_MS = 2 ** 31 - 1;
|
|
24707
24945
|
function armSseKeepAlive(intervalMs, onTick) {
|
|
@@ -24713,7 +24951,7 @@ function armSseKeepAlive(intervalMs, onTick) {
|
|
|
24713
24951
|
return timer;
|
|
24714
24952
|
}
|
|
24715
24953
|
|
|
24716
|
-
//
|
|
24954
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js
|
|
24717
24955
|
class WebStandardStreamableHTTPServerTransport {
|
|
24718
24956
|
constructor(options = {}) {
|
|
24719
24957
|
this._started = false;
|
|
@@ -25428,24 +25666,62 @@ function getServerVersion() {
|
|
|
25428
25666
|
return "0.0.0";
|
|
25429
25667
|
}
|
|
25430
25668
|
}
|
|
25431
|
-
function buildServer() {
|
|
25432
|
-
const server = new McpServer({ name: "contacts", version: getServerVersion() }
|
|
25433
|
-
|
|
25434
|
-
|
|
25669
|
+
function buildServer(profile = "full") {
|
|
25670
|
+
const server = new McpServer({ name: "contacts", version: getServerVersion() }, {
|
|
25671
|
+
instructions: `Active MCP profile: ${profile}. The default core profile keeps tool-list schemas bounded; set HASNA_CONTACTS_MCP_PROFILE=full only when the complete inventory is required.`
|
|
25672
|
+
});
|
|
25673
|
+
registerContactsTools(server, profile);
|
|
25674
|
+
registerContactsStorageTools(server, profile);
|
|
25675
|
+
if (profile === "core")
|
|
25676
|
+
registerContactsDiscoveryTools(server);
|
|
25435
25677
|
return server;
|
|
25436
25678
|
}
|
|
25679
|
+
function handleEarlyArgs(argv) {
|
|
25680
|
+
if (argv.includes("--help") || argv.includes("-h"))
|
|
25681
|
+
return "help";
|
|
25682
|
+
if (argv.includes("--version") || argv.includes("-V"))
|
|
25683
|
+
return "version";
|
|
25684
|
+
return "start";
|
|
25685
|
+
}
|
|
25686
|
+
function mcpUsage() {
|
|
25687
|
+
return `usage: contacts-mcp MCP server over stdio (default)
|
|
25688
|
+
contacts-mcp --http [--port <n>] Streamable-HTTP dev server (loopback)
|
|
25689
|
+
contacts-mcp --mcp-profile <name> core (default) or full
|
|
25690
|
+
contacts-mcp --version Print the version
|
|
25691
|
+
|
|
25692
|
+
options:
|
|
25693
|
+
--help, -h show this help and exit
|
|
25694
|
+
--mcp-profile <p> advertise core (default) or full tool inventory
|
|
25695
|
+
--version, -V print the package version and exit
|
|
25696
|
+
`;
|
|
25697
|
+
}
|
|
25437
25698
|
async function main() {
|
|
25438
25699
|
const args = process.argv.slice(2);
|
|
25700
|
+
const early = handleEarlyArgs(args);
|
|
25701
|
+
if (early === "help") {
|
|
25702
|
+
console.log(mcpUsage());
|
|
25703
|
+
return;
|
|
25704
|
+
}
|
|
25705
|
+
if (early === "version") {
|
|
25706
|
+
console.log(getServerVersion());
|
|
25707
|
+
return;
|
|
25708
|
+
}
|
|
25709
|
+
const profile = resolveContactsMcpProfile(args);
|
|
25710
|
+
const gate = await resolveMcpStartupGate();
|
|
25711
|
+
if (!gate.ok) {
|
|
25712
|
+
console.error(gate.message);
|
|
25713
|
+
process.exit(1);
|
|
25714
|
+
}
|
|
25439
25715
|
if (isHttpMode(args)) {
|
|
25440
25716
|
startMcpHttpServer({
|
|
25441
25717
|
name: "contacts",
|
|
25442
25718
|
port: resolveMcpHttpPort(args),
|
|
25443
|
-
buildServer
|
|
25719
|
+
buildServer: () => buildServer(profile)
|
|
25444
25720
|
});
|
|
25445
25721
|
return;
|
|
25446
25722
|
}
|
|
25447
25723
|
const transport = new StdioServerTransport;
|
|
25448
|
-
await buildServer().connect(transport);
|
|
25724
|
+
await buildServer(profile).connect(transport);
|
|
25449
25725
|
console.error("Contacts MCP server running on stdio");
|
|
25450
25726
|
}
|
|
25451
25727
|
function isDirectMcpEntry(entry = process.argv[1]) {
|
|
@@ -25456,11 +25732,13 @@ function isDirectMcpEntry(entry = process.argv[1]) {
|
|
|
25456
25732
|
}
|
|
25457
25733
|
if (isDirectMcpEntry()) {
|
|
25458
25734
|
main().catch((err2) => {
|
|
25459
|
-
console.error(
|
|
25735
|
+
console.error(err2 instanceof Error ? err2.message : String(err2));
|
|
25460
25736
|
process.exit(1);
|
|
25461
25737
|
});
|
|
25462
25738
|
}
|
|
25463
25739
|
export {
|
|
25740
|
+
mcpUsage,
|
|
25464
25741
|
isDirectMcpEntry,
|
|
25742
|
+
handleEarlyArgs,
|
|
25465
25743
|
buildServer
|
|
25466
25744
|
};
|