@keyban/cli 0.2.4 → 0.3.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 +26 -22
- package/dist/index.mjs +449 -237
- package/dist/index.mjs.map +4 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10059,9 +10059,9 @@ var init_types = __esm({
|
|
|
10059
10059
|
}
|
|
10060
10060
|
});
|
|
10061
10061
|
|
|
10062
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
10062
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/auth-headers.js
|
|
10063
10063
|
var require_auth_headers = __commonJS({
|
|
10064
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
10064
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/auth-headers.js"(exports) {
|
|
10065
10065
|
"use strict";
|
|
10066
10066
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10067
10067
|
exports.extractAuthHeaders = extractAuthHeaders;
|
|
@@ -10094,9 +10094,9 @@ var require_auth_headers = __commonJS({
|
|
|
10094
10094
|
}
|
|
10095
10095
|
});
|
|
10096
10096
|
|
|
10097
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
10097
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/http-client.js
|
|
10098
10098
|
var require_http_client = __commonJS({
|
|
10099
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
10099
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/http-client.js"(exports) {
|
|
10100
10100
|
"use strict";
|
|
10101
10101
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10102
10102
|
exports.HttpClient = void 0;
|
|
@@ -10185,9 +10185,9 @@ var require_http_client = __commonJS({
|
|
|
10185
10185
|
}
|
|
10186
10186
|
});
|
|
10187
10187
|
|
|
10188
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
10188
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/logger.js
|
|
10189
10189
|
var require_logger = __commonJS({
|
|
10190
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
10190
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/logger.js"(exports) {
|
|
10191
10191
|
"use strict";
|
|
10192
10192
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10193
10193
|
exports.createLogger = exports.Logger = void 0;
|
|
@@ -14392,9 +14392,9 @@ var require_zod = __commonJS({
|
|
|
14392
14392
|
}
|
|
14393
14393
|
});
|
|
14394
14394
|
|
|
14395
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14395
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/zod-compat.js
|
|
14396
14396
|
var require_zod_compat = __commonJS({
|
|
14397
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14397
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/zod-compat.js"(exports) {
|
|
14398
14398
|
"use strict";
|
|
14399
14399
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14400
14400
|
exports.z = void 0;
|
|
@@ -14411,9 +14411,9 @@ var require_zod_compat = __commonJS({
|
|
|
14411
14411
|
}
|
|
14412
14412
|
});
|
|
14413
14413
|
|
|
14414
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14414
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/schema-utils.js
|
|
14415
14415
|
var require_schema_utils = __commonJS({
|
|
14416
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14416
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/schema-utils.js"(exports) {
|
|
14417
14417
|
"use strict";
|
|
14418
14418
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14419
14419
|
exports.EMPTY_OBJECT_JSON_SCHEMA = exports.WRAPPED_OUTPUT_KEY = exports.DEFAULT_JSON_SCHEMA_URL = void 0;
|
|
@@ -14632,9 +14632,9 @@ var require_schema_utils = __commonJS({
|
|
|
14632
14632
|
}
|
|
14633
14633
|
});
|
|
14634
14634
|
|
|
14635
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14635
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/validation-utils.js
|
|
14636
14636
|
var require_validation_utils = __commonJS({
|
|
14637
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14637
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/validation-utils.js"(exports) {
|
|
14638
14638
|
"use strict";
|
|
14639
14639
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14640
14640
|
exports.formatZodIssues = formatZodIssues;
|
|
@@ -14647,9 +14647,9 @@ var require_validation_utils = __commonJS({
|
|
|
14647
14647
|
}
|
|
14648
14648
|
});
|
|
14649
14649
|
|
|
14650
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14650
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/application-lookup-service.js
|
|
14651
14651
|
var require_application_lookup_service = __commonJS({
|
|
14652
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
14652
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/application-lookup-service.js"(exports) {
|
|
14653
14653
|
"use strict";
|
|
14654
14654
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14655
14655
|
exports.ApplicationLookupService = void 0;
|
|
@@ -15002,9 +15002,9 @@ var require_application_lookup_service = __commonJS({
|
|
|
15002
15002
|
}
|
|
15003
15003
|
});
|
|
15004
15004
|
|
|
15005
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
15005
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/skills.js
|
|
15006
15006
|
var require_skills = __commonJS({
|
|
15007
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
15007
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/skills.js"(exports) {
|
|
15008
15008
|
"use strict";
|
|
15009
15009
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15010
15010
|
exports.fetchPublishedSkill = exports.skillUrl = exports.SKILL_NAMES = void 0;
|
|
@@ -15023,9 +15023,9 @@ var require_skills = __commonJS({
|
|
|
15023
15023
|
}
|
|
15024
15024
|
});
|
|
15025
15025
|
|
|
15026
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
15026
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/instructions-service.js
|
|
15027
15027
|
var require_instructions_service = __commonJS({
|
|
15028
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
15028
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/instructions-service.js"(exports) {
|
|
15029
15029
|
"use strict";
|
|
15030
15030
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15031
15031
|
exports.InstructionsService = void 0;
|
|
@@ -15122,9 +15122,9 @@ var require_instructions_service = __commonJS({
|
|
|
15122
15122
|
}
|
|
15123
15123
|
});
|
|
15124
15124
|
|
|
15125
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
15125
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/prompt-registry.js
|
|
15126
15126
|
var require_prompt_registry = __commonJS({
|
|
15127
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
15127
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/prompt-registry.js"(exports) {
|
|
15128
15128
|
"use strict";
|
|
15129
15129
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15130
15130
|
exports.PromptRegistry = void 0;
|
|
@@ -31278,9 +31278,9 @@ var init_mcp = __esm({
|
|
|
31278
31278
|
}
|
|
31279
31279
|
});
|
|
31280
31280
|
|
|
31281
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31281
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/openapi.js
|
|
31282
31282
|
var require_openapi = __commonJS({
|
|
31283
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31283
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/openapi.js"(exports) {
|
|
31284
31284
|
"use strict";
|
|
31285
31285
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31286
31286
|
exports.collectOperations = collectOperations3;
|
|
@@ -31537,9 +31537,9 @@ var require_openapi = __commonJS({
|
|
|
31537
31537
|
}
|
|
31538
31538
|
});
|
|
31539
31539
|
|
|
31540
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31540
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/json-schema-to-zod.js
|
|
31541
31541
|
var require_json_schema_to_zod = __commonJS({
|
|
31542
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31542
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/json-schema-to-zod.js"(exports) {
|
|
31543
31543
|
"use strict";
|
|
31544
31544
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31545
31545
|
exports.jsonSchemaToZodShape = jsonSchemaToZodShape;
|
|
@@ -31716,9 +31716,9 @@ var require_json_schema_to_zod = __commonJS({
|
|
|
31716
31716
|
}
|
|
31717
31717
|
});
|
|
31718
31718
|
|
|
31719
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31719
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/operation-schemas.js
|
|
31720
31720
|
var require_operation_schemas = __commonJS({
|
|
31721
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31721
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/operation-schemas.js"(exports) {
|
|
31722
31722
|
"use strict";
|
|
31723
31723
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31724
31724
|
exports.operationSchemas = operationSchemas;
|
|
@@ -31748,9 +31748,9 @@ var require_operation_schemas = __commonJS({
|
|
|
31748
31748
|
}
|
|
31749
31749
|
});
|
|
31750
31750
|
|
|
31751
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31751
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/response-builders.js
|
|
31752
31752
|
var require_response_builders = __commonJS({
|
|
31753
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31753
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/response-builders.js"(exports) {
|
|
31754
31754
|
"use strict";
|
|
31755
31755
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31756
31756
|
exports.buildSuccessResponse = buildSuccessResponse;
|
|
@@ -31851,9 +31851,9 @@ var require_response_builders = __commonJS({
|
|
|
31851
31851
|
}
|
|
31852
31852
|
});
|
|
31853
31853
|
|
|
31854
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31854
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/resource-registry.js
|
|
31855
31855
|
var require_resource_registry = __commonJS({
|
|
31856
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31856
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/resource-registry.js"(exports) {
|
|
31857
31857
|
"use strict";
|
|
31858
31858
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31859
31859
|
exports.ResourceRegistry = void 0;
|
|
@@ -31971,9 +31971,9 @@ var require_resource_registry = __commonJS({
|
|
|
31971
31971
|
}
|
|
31972
31972
|
});
|
|
31973
31973
|
|
|
31974
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31974
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/server-introspection.js
|
|
31975
31975
|
var require_server_introspection = __commonJS({
|
|
31976
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
31976
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/server-introspection.js"(exports) {
|
|
31977
31977
|
"use strict";
|
|
31978
31978
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31979
31979
|
exports.ServerIntrospectionInstaller = void 0;
|
|
@@ -32039,9 +32039,9 @@ var require_server_introspection = __commonJS({
|
|
|
32039
32039
|
}
|
|
32040
32040
|
});
|
|
32041
32041
|
|
|
32042
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32042
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/tool-registry.js
|
|
32043
32043
|
var require_tool_registry = __commonJS({
|
|
32044
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32044
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/registrar/tool-registry.js"(exports) {
|
|
32045
32045
|
"use strict";
|
|
32046
32046
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32047
32047
|
exports.ToolRegistry = void 0;
|
|
@@ -32194,9 +32194,9 @@ var require_tool_registry = __commonJS({
|
|
|
32194
32194
|
}
|
|
32195
32195
|
});
|
|
32196
32196
|
|
|
32197
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32197
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/mcp-registrar.js
|
|
32198
32198
|
var require_mcp_registrar = __commonJS({
|
|
32199
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32199
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/mcp-registrar.js"(exports) {
|
|
32200
32200
|
"use strict";
|
|
32201
32201
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32202
32202
|
exports.McpOperationRegistrar = void 0;
|
|
@@ -32255,9 +32255,9 @@ var require_mcp_registrar = __commonJS({
|
|
|
32255
32255
|
}
|
|
32256
32256
|
});
|
|
32257
32257
|
|
|
32258
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32258
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/mcp-server.js
|
|
32259
32259
|
var require_mcp_server = __commonJS({
|
|
32260
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32260
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/mcp-server.js"(exports) {
|
|
32261
32261
|
"use strict";
|
|
32262
32262
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32263
32263
|
exports.createMcpServer = createMcpServer3;
|
|
@@ -32268,17 +32268,17 @@ var require_mcp_server = __commonJS({
|
|
|
32268
32268
|
}
|
|
32269
32269
|
});
|
|
32270
32270
|
|
|
32271
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32271
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/types.js
|
|
32272
32272
|
var require_types3 = __commonJS({
|
|
32273
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32273
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/types.js"(exports) {
|
|
32274
32274
|
"use strict";
|
|
32275
32275
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32276
32276
|
}
|
|
32277
32277
|
});
|
|
32278
32278
|
|
|
32279
|
-
// node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32279
|
+
// node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/index.js
|
|
32280
32280
|
var require_dist2 = __commonJS({
|
|
32281
|
-
"node_modules/.pnpm/@keyban+mcp-openapi@file
|
|
32281
|
+
"node_modules/.pnpm/@keyban+mcp-openapi@file+..+..+sdk+libs+keyban-mcp-openapi_@modelcontextprotocol+sdk@1._4d810e0200ac4c68cff07162d9118ec3/node_modules/@keyban/mcp-openapi/dist/index.js"(exports) {
|
|
32282
32282
|
"use strict";
|
|
32283
32283
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
32284
32284
|
if (k2 === void 0) k2 = k;
|
|
@@ -42114,9 +42114,9 @@ var init_call = __esm({
|
|
|
42114
42114
|
}
|
|
42115
42115
|
});
|
|
42116
42116
|
|
|
42117
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
42117
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/usdc-registry.js
|
|
42118
42118
|
var require_usdc_registry = __commonJS({
|
|
42119
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
42119
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/usdc-registry.js"(exports) {
|
|
42120
42120
|
"use strict";
|
|
42121
42121
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42122
42122
|
exports.getUsdcChainEntry = getUsdcChainEntry7;
|
|
@@ -66949,7 +66949,7 @@ var require_lib = __commonJS({
|
|
|
66949
66949
|
};
|
|
66950
66950
|
}
|
|
66951
66951
|
// @__NO_SIDE_EFFECTS__
|
|
66952
|
-
function
|
|
66952
|
+
function join7(separator = "") {
|
|
66953
66953
|
astr("join", separator);
|
|
66954
66954
|
return {
|
|
66955
66955
|
encode: (from16) => {
|
|
@@ -67165,15 +67165,15 @@ var require_lib = __commonJS({
|
|
|
67165
67165
|
convertRadix2,
|
|
67166
67166
|
radix,
|
|
67167
67167
|
radix2,
|
|
67168
|
-
join:
|
|
67168
|
+
join: join7,
|
|
67169
67169
|
padding
|
|
67170
67170
|
};
|
|
67171
|
-
exports.base16 = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(4), /* @__PURE__ */ alphabet("0123456789ABCDEF"), /* @__PURE__ */
|
|
67172
|
-
exports.base32 = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), /* @__PURE__ */ padding(5), /* @__PURE__ */
|
|
67173
|
-
exports.base32nopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), /* @__PURE__ */
|
|
67174
|
-
exports.base32hex = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ padding(5), /* @__PURE__ */
|
|
67175
|
-
exports.base32hexnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */
|
|
67176
|
-
exports.base32crockford = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), /* @__PURE__ */
|
|
67171
|
+
exports.base16 = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(4), /* @__PURE__ */ alphabet("0123456789ABCDEF"), /* @__PURE__ */ join7(""));
|
|
67172
|
+
exports.base32 = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), /* @__PURE__ */ padding(5), /* @__PURE__ */ join7(""));
|
|
67173
|
+
exports.base32nopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), /* @__PURE__ */ join7(""));
|
|
67174
|
+
exports.base32hex = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ padding(5), /* @__PURE__ */ join7(""));
|
|
67175
|
+
exports.base32hexnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ join7(""));
|
|
67176
|
+
exports.base32crockford = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(5), /* @__PURE__ */ alphabet("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), /* @__PURE__ */ join7(""), /* @__PURE__ */ normalize((s) => s.toUpperCase().replace(/O/g, "0").replace(/[IL]/g, "1")));
|
|
67177
67177
|
var hasBase64Builtin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toBase64 === "function" && typeof Uint8Array.fromBase64 === "function")();
|
|
67178
67178
|
var decodeBase64Builtin = (s, isUrl) => {
|
|
67179
67179
|
astr("base64", s);
|
|
@@ -67191,8 +67191,8 @@ var require_lib = __commonJS({
|
|
|
67191
67191
|
decode(s) {
|
|
67192
67192
|
return decodeBase64Builtin(s, false);
|
|
67193
67193
|
}
|
|
67194
|
-
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ padding(6), /* @__PURE__ */
|
|
67195
|
-
exports.base64nopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */
|
|
67194
|
+
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ padding(6), /* @__PURE__ */ join7(""));
|
|
67195
|
+
exports.base64nopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ join7(""));
|
|
67196
67196
|
exports.base64url = hasBase64Builtin ? {
|
|
67197
67197
|
encode(b) {
|
|
67198
67198
|
abytes5(b);
|
|
@@ -67201,9 +67201,9 @@ var require_lib = __commonJS({
|
|
|
67201
67201
|
decode(s) {
|
|
67202
67202
|
return decodeBase64Builtin(s, true);
|
|
67203
67203
|
}
|
|
67204
|
-
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ padding(6), /* @__PURE__ */
|
|
67205
|
-
exports.base64urlnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */
|
|
67206
|
-
var genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */
|
|
67204
|
+
} : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ padding(6), /* @__PURE__ */ join7(""));
|
|
67205
|
+
exports.base64urlnopad = /* @__PURE__ */ chain(/* @__PURE__ */ radix2(6), /* @__PURE__ */ alphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ join7(""));
|
|
67206
|
+
var genBase58 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain(/* @__PURE__ */ radix(58), /* @__PURE__ */ alphabet(abc), /* @__PURE__ */ join7(""));
|
|
67207
67207
|
exports.base58 = /* @__PURE__ */ genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
|
|
67208
67208
|
exports.base58flickr = /* @__PURE__ */ genBase58("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");
|
|
67209
67209
|
exports.base58xrp = /* @__PURE__ */ genBase58("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");
|
|
@@ -67235,7 +67235,7 @@ var require_lib = __commonJS({
|
|
|
67235
67235
|
var createBase58check = (sha2565) => /* @__PURE__ */ chain(checksum3(4, (data) => sha2565(sha2565(data))), exports.base58);
|
|
67236
67236
|
exports.createBase58check = createBase58check;
|
|
67237
67237
|
exports.base58check = exports.createBase58check;
|
|
67238
|
-
var BECH_ALPHABET = /* @__PURE__ */ chain(/* @__PURE__ */ alphabet("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), /* @__PURE__ */
|
|
67238
|
+
var BECH_ALPHABET = /* @__PURE__ */ chain(/* @__PURE__ */ alphabet("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), /* @__PURE__ */ join7(""));
|
|
67239
67239
|
var POLYMOD_GENERATORS = [996825010, 642813549, 513874426, 1027748829, 705979059];
|
|
67240
67240
|
function bech32Polymod(pre) {
|
|
67241
67241
|
const b = pre >> 25;
|
|
@@ -67344,7 +67344,7 @@ var require_lib = __commonJS({
|
|
|
67344
67344
|
return Uint8Array.fromHex(s);
|
|
67345
67345
|
}
|
|
67346
67346
|
};
|
|
67347
|
-
exports.hex = hasHexBuiltin4 ? hexBuiltin : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(4), /* @__PURE__ */ alphabet("0123456789abcdef"), /* @__PURE__ */
|
|
67347
|
+
exports.hex = hasHexBuiltin4 ? hexBuiltin : /* @__PURE__ */ chain(/* @__PURE__ */ radix2(4), /* @__PURE__ */ alphabet("0123456789abcdef"), /* @__PURE__ */ join7(""), /* @__PURE__ */ normalize((s) => {
|
|
67348
67348
|
if (typeof s !== "string" || s.length % 2 !== 0)
|
|
67349
67349
|
throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);
|
|
67350
67350
|
return s.toLowerCase();
|
|
@@ -76384,9 +76384,9 @@ var require_cjs2 = __commonJS({
|
|
|
76384
76384
|
}
|
|
76385
76385
|
});
|
|
76386
76386
|
|
|
76387
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
76387
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/sas.js
|
|
76388
76388
|
var require_sas = __commonJS({
|
|
76389
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
76389
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/sas.js"(exports) {
|
|
76390
76390
|
"use strict";
|
|
76391
76391
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76392
76392
|
exports.commitEnrollment = commitEnrollment;
|
|
@@ -76457,9 +76457,9 @@ var require_sas = __commonJS({
|
|
|
76457
76457
|
}
|
|
76458
76458
|
});
|
|
76459
76459
|
|
|
76460
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
76460
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/multisig-envelope.js
|
|
76461
76461
|
var require_multisig_envelope = __commonJS({
|
|
76462
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
76462
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/multisig-envelope.js"(exports) {
|
|
76463
76463
|
"use strict";
|
|
76464
76464
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76465
76465
|
exports.encodeMultiSignerEnvelope = encodeMultiSignerEnvelope;
|
|
@@ -81164,9 +81164,9 @@ var init_nist = __esm({
|
|
|
81164
81164
|
}
|
|
81165
81165
|
});
|
|
81166
81166
|
|
|
81167
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
81167
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/webauthn.js
|
|
81168
81168
|
var require_webauthn = __commonJS({
|
|
81169
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
81169
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/webauthn.js"(exports) {
|
|
81170
81170
|
"use strict";
|
|
81171
81171
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81172
81172
|
exports.P256_N = void 0;
|
|
@@ -81413,9 +81413,9 @@ var require_webauthn = __commonJS({
|
|
|
81413
81413
|
}
|
|
81414
81414
|
});
|
|
81415
81415
|
|
|
81416
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
81416
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/eip3009.js
|
|
81417
81417
|
var require_eip3009 = __commonJS({
|
|
81418
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
81418
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/eip3009.js"(exports) {
|
|
81419
81419
|
"use strict";
|
|
81420
81420
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81421
81421
|
exports.EIP3009_FIELDS = exports.EIP3009_PRIMARY_TYPES = void 0;
|
|
@@ -102754,9 +102754,9 @@ var require_erc77392 = __commonJS({
|
|
|
102754
102754
|
}
|
|
102755
102755
|
});
|
|
102756
102756
|
|
|
102757
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
102757
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/erc7739.js
|
|
102758
102758
|
var require_erc77393 = __commonJS({
|
|
102759
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
102759
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/erc7739.js"(exports) {
|
|
102760
102760
|
"use strict";
|
|
102761
102761
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
102762
102762
|
exports.recomputeErc7739Hash = recomputeErc7739Hash2;
|
|
@@ -102790,9 +102790,9 @@ var require_erc77393 = __commonJS({
|
|
|
102790
102790
|
}
|
|
102791
102791
|
});
|
|
102792
102792
|
|
|
102793
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
102793
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/relay.js
|
|
102794
102794
|
var require_relay = __commonJS({
|
|
102795
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
102795
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/relay.js"(exports) {
|
|
102796
102796
|
"use strict";
|
|
102797
102797
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
102798
102798
|
exports.computeRelayHash = computeRelayHash2;
|
|
@@ -104901,9 +104901,9 @@ var require_schemas = __commonJS({
|
|
|
104901
104901
|
}
|
|
104902
104902
|
});
|
|
104903
104903
|
|
|
104904
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
104904
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/network.js
|
|
104905
104905
|
var require_network = __commonJS({
|
|
104906
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
104906
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/network.js"(exports) {
|
|
104907
104907
|
"use strict";
|
|
104908
104908
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
104909
104909
|
exports.networkToChainId = networkToChainId2;
|
|
@@ -104944,9 +104944,9 @@ var require_network = __commonJS({
|
|
|
104944
104944
|
}
|
|
104945
104945
|
});
|
|
104946
104946
|
|
|
104947
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
104947
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/x402.js
|
|
104948
104948
|
var require_x402 = __commonJS({
|
|
104949
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
104949
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/x402.js"(exports) {
|
|
104950
104950
|
"use strict";
|
|
104951
104951
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
104952
104952
|
exports.x402ToCanonical = x402ToCanonical;
|
|
@@ -105471,9 +105471,9 @@ var init_secp256k12 = __esm({
|
|
|
105471
105471
|
}
|
|
105472
105472
|
});
|
|
105473
105473
|
|
|
105474
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
105474
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/crypto/secp256k1.js
|
|
105475
105475
|
var require_secp256k13 = __commonJS({
|
|
105476
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
105476
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/crypto/secp256k1.js"(exports) {
|
|
105477
105477
|
"use strict";
|
|
105478
105478
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
105479
105479
|
exports.decompressPoint = decompressPoint2;
|
|
@@ -105486,9 +105486,9 @@ var require_secp256k13 = __commonJS({
|
|
|
105486
105486
|
}
|
|
105487
105487
|
});
|
|
105488
105488
|
|
|
105489
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
105489
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/crypto/frost.js
|
|
105490
105490
|
var require_frost = __commonJS({
|
|
105491
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
105491
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/crypto/frost.js"(exports) {
|
|
105492
105492
|
"use strict";
|
|
105493
105493
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
105494
105494
|
exports.normalizeFrostSig = normalizeFrostSig3;
|
|
@@ -128774,9 +128774,9 @@ var require_zod2 = __commonJS({
|
|
|
128774
128774
|
}
|
|
128775
128775
|
});
|
|
128776
128776
|
|
|
128777
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
128777
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/wire-schemas.js
|
|
128778
128778
|
var require_wire_schemas = __commonJS({
|
|
128779
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
128779
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/wire-schemas.js"(exports) {
|
|
128780
128780
|
"use strict";
|
|
128781
128781
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
128782
128782
|
exports.policyDecisionSchema = exports.policyInputSchema = exports.x402AuthorizationSchema = exports.x402RequestSchema = exports.relayPreimageSchema = void 0;
|
|
@@ -128910,9 +128910,9 @@ var require_wire_schemas = __commonJS({
|
|
|
128910
128910
|
}
|
|
128911
128911
|
});
|
|
128912
128912
|
|
|
128913
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
128913
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/index.js
|
|
128914
128914
|
var require_dist3 = __commonJS({
|
|
128915
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
128915
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/index.js"(exports) {
|
|
128916
128916
|
"use strict";
|
|
128917
128917
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
128918
128918
|
exports.networkToChainId = exports.evmChainIdForNetwork = exports.x402RequestSchema = exports.x402AuthorizationSchema = exports.relayPreimageSchema = exports.policyInputSchema = exports.policyDecisionSchema = exports.normalizeFrostSig = exports.encodeMultiSignerSignature = exports.decompressPoint = exports.selectExactUsdcAccept = exports.extractPayTos = exports.decodeX402 = exports.x402ToCanonical = exports.relayToCanonical = exports.extractRelayPayment = exports.computeRelayHash = exports.computeLotRelayHash = exports.computeBatchRelayHash = exports.recomputeErc7739Hash = exports.buildEip3009TypedData = exports.EIP3009_PRIMARY_TYPES = exports.EIP3009_FIELDS = exports.webAuthnSignerFromPrivateKey = exports.webAuthnChallenge = exports.verifyWebAuthnAssertion = exports.toLowS = exports.signWebAuthnAssertion = exports.encodeWebAuthnSigner = exports.encodeWebAuthnSignature = exports.encodeAuthenticatorAssertion = exports.decodeWebAuthnSignature = exports.decodeP256PublicKey = exports.base64UrlToBytes = exports.P256_N = exports.encodeMultiSignerEnvelope = exports.verifyEnrollmentCommitment = exports.sasMatches = exports.deriveSas = exports.commitEnrollment = exports.isCanonicalUsdc = exports.getUsdcChainEntry = void 0;
|
|
@@ -129057,9 +129057,9 @@ var require_dist3 = __commonJS({
|
|
|
129057
129057
|
}
|
|
129058
129058
|
});
|
|
129059
129059
|
|
|
129060
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
129060
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/amount.js
|
|
129061
129061
|
var require_amount = __commonJS({
|
|
129062
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
129062
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/amount.js"(exports) {
|
|
129063
129063
|
"use strict";
|
|
129064
129064
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
129065
129065
|
exports.formatMoney = formatMoney2;
|
|
@@ -129136,9 +129136,9 @@ var require_amount = __commonJS({
|
|
|
129136
129136
|
}
|
|
129137
129137
|
});
|
|
129138
129138
|
|
|
129139
|
-
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
129139
|
+
// node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/expense-period.js
|
|
129140
129140
|
var require_expense_period = __commonJS({
|
|
129141
|
-
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file
|
|
129141
|
+
"node_modules/.pnpm/@keyban+agent-wallet-protocol@file+..+..+sdk+libs+keyban-agent-wallet-protocol_viem@2.57.4_typescript@5.9.3_zod@3.25.76_/node_modules/@keyban/agent-wallet-protocol/dist/expense-period.js"(exports) {
|
|
129142
129142
|
"use strict";
|
|
129143
129143
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
129144
129144
|
exports.rangeEnd = exports.rangeStart = exports.DEFAULT_EXPENSE_PERIOD = exports.EXPENSE_PERIODS = void 0;
|
|
@@ -129309,7 +129309,6 @@ var {
|
|
|
129309
129309
|
|
|
129310
129310
|
// src/admin.ts
|
|
129311
129311
|
import { spawnSync } from "node:child_process";
|
|
129312
|
-
import { readFileSync as readFileSync3 } from "node:fs";
|
|
129313
129312
|
|
|
129314
129313
|
// src/lib/admin-auth.ts
|
|
129315
129314
|
import { Entry } from "@napi-rs/keyring";
|
|
@@ -131175,9 +131174,10 @@ function readCache(path) {
|
|
|
131175
131174
|
return void 0;
|
|
131176
131175
|
}
|
|
131177
131176
|
}
|
|
131178
|
-
async function loadOpenApi(origin) {
|
|
131177
|
+
async function loadOpenApi(origin, { revalidate = true } = {}) {
|
|
131179
131178
|
const path = cachePath(origin);
|
|
131180
131179
|
const cached2 = readCache(path);
|
|
131180
|
+
if (cached2 && !revalidate) return cached2.document;
|
|
131181
131181
|
let response;
|
|
131182
131182
|
try {
|
|
131183
131183
|
response = await fetch(`${origin}/openapi.json`, {
|
|
@@ -131304,22 +131304,32 @@ function isScoped(kind) {
|
|
|
131304
131304
|
function text(result) {
|
|
131305
131305
|
return result.content.map((part) => part.type === "text" ? part.text : "").join("");
|
|
131306
131306
|
}
|
|
131307
|
-
|
|
131307
|
+
function scopeOf(kind, args) {
|
|
131308
|
+
return KINDS[kind].scope?.(args);
|
|
131309
|
+
}
|
|
131310
|
+
async function listItems(kind, list, args = {}) {
|
|
131308
131311
|
const { list: tool, nameField, page, scope } = KINDS[kind];
|
|
131309
131312
|
const path = scope?.(args);
|
|
131310
131313
|
if (scope && !path) throw new Error(`A ${kind} is found by name within its wallet: pass the wallet too.`);
|
|
131311
|
-
const
|
|
131314
|
+
const items = [];
|
|
131312
131315
|
let seen = 0;
|
|
131313
131316
|
for (let index2 = 0; ; index2++) {
|
|
131314
131317
|
const result = await list(tool, { ...path && { path }, query: page(index2) });
|
|
131315
131318
|
if (result.isError) throw new Error(text(result));
|
|
131316
131319
|
const { data = [], total = 0 } = JSON.parse(text(result)) ?? {};
|
|
131317
131320
|
seen += data.length;
|
|
131318
|
-
|
|
131319
|
-
|
|
131320
|
-
|
|
131321
|
+
for (const item of data) {
|
|
131322
|
+
if (item.id === void 0) continue;
|
|
131323
|
+
const name = item[nameField];
|
|
131324
|
+
items.push({ id: String(item.id), ...typeof name === "string" && { name } });
|
|
131325
|
+
}
|
|
131321
131326
|
if (data.length === 0 || seen >= total) break;
|
|
131322
131327
|
}
|
|
131328
|
+
return items;
|
|
131329
|
+
}
|
|
131330
|
+
async function resolveName(kind, name, list, args = {}) {
|
|
131331
|
+
const { nameField } = KINDS[kind];
|
|
131332
|
+
const ids = (await listItems(kind, list, args)).filter((item) => item.name === name).map((item) => item.id);
|
|
131323
131333
|
if (ids.length === 0) throw new Error(`No ${kind} with the ${nameField} "${name}".`);
|
|
131324
131334
|
if (ids.length > 1) {
|
|
131325
131335
|
throw new Error(`${ids.length} ${kind}s have the ${nameField} "${name}": ${ids.join(", ")}. Pass the id.`);
|
|
@@ -131327,11 +131337,59 @@ async function resolveName(kind, name, list, args = {}) {
|
|
|
131327
131337
|
return ids[0];
|
|
131328
131338
|
}
|
|
131329
131339
|
|
|
131340
|
+
// src/lib/completion-cache.ts
|
|
131341
|
+
import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
131342
|
+
import { homedir as homedir2 } from "node:os";
|
|
131343
|
+
import { join as join2 } from "node:path";
|
|
131344
|
+
var TTL_MS = 6e4;
|
|
131345
|
+
function directory(origin) {
|
|
131346
|
+
const base2 = process.env.XDG_CACHE_HOME || join2(homedir2(), ".cache");
|
|
131347
|
+
return join2(base2, "keyban", "completion", new URL(origin).host);
|
|
131348
|
+
}
|
|
131349
|
+
function clearCompletionCache(origin) {
|
|
131350
|
+
rmSync2(directory(origin), { recursive: true, force: true });
|
|
131351
|
+
}
|
|
131352
|
+
async function cachedForCompletion(origin, key, load) {
|
|
131353
|
+
const path = join2(directory(origin), `${key.replace(/[^\w.-]/g, "_")}.json`);
|
|
131354
|
+
try {
|
|
131355
|
+
const entry = JSON.parse(readFileSync2(path, "utf8"));
|
|
131356
|
+
if (Date.now() - entry.at < TTL_MS) return entry.value;
|
|
131357
|
+
} catch {
|
|
131358
|
+
}
|
|
131359
|
+
const value = await load();
|
|
131360
|
+
try {
|
|
131361
|
+
mkdirSync2(directory(origin), { recursive: true, mode: 448 });
|
|
131362
|
+
writeFileSync2(path, JSON.stringify({ at: Date.now(), value }), { mode: 384 });
|
|
131363
|
+
} catch {
|
|
131364
|
+
}
|
|
131365
|
+
return value;
|
|
131366
|
+
}
|
|
131367
|
+
|
|
131330
131368
|
// src/lib/kebab.ts
|
|
131331
131369
|
function kebab(name) {
|
|
131332
131370
|
return name.replace(/_/g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
131333
131371
|
}
|
|
131334
131372
|
|
|
131373
|
+
// src/lib/option-completion.ts
|
|
131374
|
+
var completers = /* @__PURE__ */ new WeakMap();
|
|
131375
|
+
function completeWith(option, completer) {
|
|
131376
|
+
completers.set(option, completer);
|
|
131377
|
+
return option;
|
|
131378
|
+
}
|
|
131379
|
+
var argumentCompleters = /* @__PURE__ */ new WeakMap();
|
|
131380
|
+
function completeArgumentWith(command, completer) {
|
|
131381
|
+
argumentCompleters.set(command, completer);
|
|
131382
|
+
return command;
|
|
131383
|
+
}
|
|
131384
|
+
async function argumentValues(command, words) {
|
|
131385
|
+
return argumentCompleters.get(command)?.(words).catch(() => []);
|
|
131386
|
+
}
|
|
131387
|
+
async function optionValues(option, words) {
|
|
131388
|
+
const completer = completers.get(option);
|
|
131389
|
+
if (completer) return completer(words).catch(() => []);
|
|
131390
|
+
return option.argChoices ?? [];
|
|
131391
|
+
}
|
|
131392
|
+
|
|
131335
131393
|
// src/lib/json-tool-command.ts
|
|
131336
131394
|
var GROUPS = ["path", "query", "body"];
|
|
131337
131395
|
function camel(flag) {
|
|
@@ -131371,6 +131429,36 @@ function optionFor(flag, schema, required2) {
|
|
|
131371
131429
|
if (schema.enum?.every((v) => typeof v === "string")) option.choices(schema.enum);
|
|
131372
131430
|
return option;
|
|
131373
131431
|
}
|
|
131432
|
+
async function typedArgs(words, targets, nameTargets, names) {
|
|
131433
|
+
const args = {};
|
|
131434
|
+
const flags = words.slice(0, -1);
|
|
131435
|
+
for (const [at2, word] of flags.entries()) {
|
|
131436
|
+
const value = flags[at2 + 1];
|
|
131437
|
+
if (!word.startsWith("--") || value === void 0) continue;
|
|
131438
|
+
const flag = word.slice(2);
|
|
131439
|
+
const target = targets.get(camel(flag));
|
|
131440
|
+
if (target) args[target.group] = { ...args[target.group], [target.field]: value };
|
|
131441
|
+
const named = nameTargets.get(flag);
|
|
131442
|
+
if (!named || names.isScoped(named.kind) || !names.list) continue;
|
|
131443
|
+
const id = (await names.list(named.kind, {})).find((item) => item.name === value)?.id;
|
|
131444
|
+
if (id) args[named.group] = { ...args[named.group], [named.field]: id };
|
|
131445
|
+
}
|
|
131446
|
+
return args;
|
|
131447
|
+
}
|
|
131448
|
+
function addNameCompletion(command, targets, nameTargets, names) {
|
|
131449
|
+
for (const [flag, { kind, idFlag }] of nameTargets) {
|
|
131450
|
+
const items = async (words) => names.list?.(kind, await typedArgs(words, targets, nameTargets, names)) ?? [];
|
|
131451
|
+
const idOption = command.options.find((option) => option.long === `--${idFlag}`);
|
|
131452
|
+
const nameOption = command.options.find((option) => option.long === `--${flag}`);
|
|
131453
|
+
if (idOption) completeWith(idOption, async (words) => (await items(words)).map((item) => item.id));
|
|
131454
|
+
if (nameOption) {
|
|
131455
|
+
completeWith(
|
|
131456
|
+
nameOption,
|
|
131457
|
+
async (words) => (await items(words)).flatMap((item) => item.name === void 0 ? [] : [item.name])
|
|
131458
|
+
);
|
|
131459
|
+
}
|
|
131460
|
+
}
|
|
131461
|
+
}
|
|
131374
131462
|
function nameFlagOf(flag, nameField) {
|
|
131375
131463
|
const name = kebab(nameField);
|
|
131376
131464
|
if (flag === "id" || flag.endsWith("-id")) return `${flag.slice(0, -"id".length)}${name}`;
|
|
@@ -131430,6 +131518,7 @@ function resultText(result) {
|
|
|
131430
131518
|
function jsonToolCommand(tool, call2, names) {
|
|
131431
131519
|
const command = new Command(kebab(tool.name)).summary(tool.title ?? tool.name).description(tool.description ?? "");
|
|
131432
131520
|
const { targets, nameTargets } = addFieldOptions(command, tool, names);
|
|
131521
|
+
if (names) addNameCompletion(command, targets, nameTargets, names);
|
|
131433
131522
|
command.addOption(new Option("--input <json>", "the whole tool input as JSON, merged under the options"));
|
|
131434
131523
|
return command.action(async (options, self2) => {
|
|
131435
131524
|
try {
|
|
@@ -131449,88 +131538,192 @@ function jsonToolCommand(tool, call2, names) {
|
|
|
131449
131538
|
}
|
|
131450
131539
|
|
|
131451
131540
|
// src/lib/wallet-file.ts
|
|
131452
|
-
import { existsSync, mkdirSync as
|
|
131453
|
-
import { homedir as
|
|
131454
|
-
import { dirname, join as
|
|
131455
|
-
function
|
|
131456
|
-
|
|
131457
|
-
const configHome = env.XDG_CONFIG_HOME || join2(homedir2(), ".config");
|
|
131458
|
-
return join2(configHome, "keyban", "wallet.json");
|
|
131541
|
+
import { existsSync, mkdirSync as mkdirSync3, readdirSync, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
131542
|
+
import { homedir as homedir3 } from "node:os";
|
|
131543
|
+
import { dirname, join as join3 } from "node:path";
|
|
131544
|
+
function keybanDir(env) {
|
|
131545
|
+
return join3(env.XDG_CONFIG_HOME || join3(homedir3(), ".config"), "keyban");
|
|
131459
131546
|
}
|
|
131460
|
-
function
|
|
131461
|
-
|
|
131462
|
-
const file = walletFilePath(env);
|
|
131463
|
-
const old = join2(dirname(file), "wallets", "default.json");
|
|
131464
|
-
if (existsSync(file) || !existsSync(old)) return;
|
|
131465
|
-
renameSync(old, file);
|
|
131466
|
-
process.stderr.write(`Moved the keyban wallet ${old} to ${file}
|
|
131467
|
-
`);
|
|
131547
|
+
function pointerPath(env) {
|
|
131548
|
+
return join3(keybanDir(env), "wallet.json");
|
|
131468
131549
|
}
|
|
131469
|
-
function
|
|
131470
|
-
|
|
131471
|
-
|
|
131472
|
-
|
|
131473
|
-
|
|
131474
|
-
|
|
131550
|
+
function idPath(env, id) {
|
|
131551
|
+
if (!/^[\w-]+$/.test(id)) throw new Error(`"${id}" is not a wallet id.`);
|
|
131552
|
+
return join3(keybanDir(env), "wallets", `${id}.json`);
|
|
131553
|
+
}
|
|
131554
|
+
function readJson(file) {
|
|
131555
|
+
try {
|
|
131556
|
+
return JSON.parse(readFileSync3(file, "utf8"));
|
|
131557
|
+
} catch (err) {
|
|
131558
|
+
throw new Error(`The keyban wallet ${file} is not valid JSON.`, { cause: err });
|
|
131559
|
+
}
|
|
131560
|
+
}
|
|
131561
|
+
function currentId(env) {
|
|
131562
|
+
const file = pointerPath(env);
|
|
131563
|
+
if (!existsSync(file)) return void 0;
|
|
131564
|
+
const current = readJson(file)?.current;
|
|
131565
|
+
return typeof current === "string" ? current : void 0;
|
|
131566
|
+
}
|
|
131567
|
+
function walletFilePath(env) {
|
|
131568
|
+
if (env.KEYBAN_CONFIG) return keybanConfigFile(env, decodeKeybanConfig(env.KEYBAN_CONFIG));
|
|
131569
|
+
if (env.KEYBAN_WALLET_PATH) return env.KEYBAN_WALLET_PATH;
|
|
131570
|
+
const current = currentId(env);
|
|
131571
|
+
return current && idPath(env, current);
|
|
131572
|
+
}
|
|
131573
|
+
function stringsOf(variables, source) {
|
|
131574
|
+
const strings = {};
|
|
131575
|
+
for (const [name, value] of Object.entries(variables)) {
|
|
131576
|
+
if (typeof value !== "string") throw new Error(`${source}: ${name} must be a string.`);
|
|
131577
|
+
strings[name] = value;
|
|
131475
131578
|
}
|
|
131579
|
+
return strings;
|
|
131580
|
+
}
|
|
131581
|
+
function decodeKeybanConfig(encoded) {
|
|
131476
131582
|
let parsed;
|
|
131477
131583
|
try {
|
|
131478
|
-
parsed = JSON.parse(
|
|
131584
|
+
parsed = JSON.parse(Buffer.from(encoded, "base64").toString("utf8"));
|
|
131479
131585
|
} catch (err) {
|
|
131480
|
-
throw new Error(
|
|
131586
|
+
throw new Error("KEYBAN_CONFIG is not valid base64-encoded JSON.", { cause: err });
|
|
131481
131587
|
}
|
|
131482
131588
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
131589
|
+
throw new Error("KEYBAN_CONFIG must decode to a JSON object of variables.");
|
|
131590
|
+
}
|
|
131591
|
+
return stringsOf(parsed, "KEYBAN_CONFIG");
|
|
131592
|
+
}
|
|
131593
|
+
function keybanConfigFile(env, config2) {
|
|
131594
|
+
if (config2.KEYBAN_DKG_BLOB) return void 0;
|
|
131595
|
+
if (env.KEYBAN_WALLET_PATH) return env.KEYBAN_WALLET_PATH;
|
|
131596
|
+
return config2.KEYBAN_WALLET_ID ? idPath(env, config2.KEYBAN_WALLET_ID) : void 0;
|
|
131597
|
+
}
|
|
131598
|
+
function readWalletConfig(env = process.env) {
|
|
131599
|
+
if (env.KEYBAN_CONFIG) {
|
|
131600
|
+
const config2 = decodeKeybanConfig(env.KEYBAN_CONFIG);
|
|
131601
|
+
const file2 = keybanConfigFile(env, config2);
|
|
131602
|
+
if (!file2 || !existsSync(file2)) return config2;
|
|
131603
|
+
return stringsOf(readWalletFile(file2).variables, `The keyban wallet ${file2}`);
|
|
131604
|
+
}
|
|
131605
|
+
const file = walletFilePath(env);
|
|
131606
|
+
if (!file) return {};
|
|
131607
|
+
if (!existsSync(file)) throw new Error(`No keyban wallet at ${file}.`);
|
|
131608
|
+
return stringsOf(readWalletFile(file).variables, `The keyban wallet ${file}`);
|
|
131609
|
+
}
|
|
131610
|
+
function envBlockOf(signer) {
|
|
131611
|
+
if (!signer) return void 0;
|
|
131612
|
+
if (signer.mcpConfig) return envBlockOf(signer.mcpConfig);
|
|
131613
|
+
if (signer.mcpServers) return signer.mcpServers["agent-wallet"]?.env;
|
|
131614
|
+
return signer.env;
|
|
131615
|
+
}
|
|
131616
|
+
function readWalletFile(file) {
|
|
131617
|
+
const document = readJson(file);
|
|
131618
|
+
if (!document || typeof document !== "object" || Array.isArray(document)) {
|
|
131483
131619
|
throw new Error(`The keyban wallet ${file} must be a JSON object of variables.`);
|
|
131484
131620
|
}
|
|
131485
|
-
|
|
131486
|
-
|
|
131487
|
-
|
|
131488
|
-
}
|
|
131489
|
-
if (!env[name]) env[name] = value;
|
|
131621
|
+
const block = envBlockOf(document) ?? document;
|
|
131622
|
+
if (!block || typeof block !== "object" || Array.isArray(block)) {
|
|
131623
|
+
throw new Error(`The keyban wallet ${file}: its env must be a JSON object of variables.`);
|
|
131490
131624
|
}
|
|
131625
|
+
return { document, variables: block };
|
|
131626
|
+
}
|
|
131627
|
+
function writeFile(file, content) {
|
|
131628
|
+
mkdirSync3(dirname(file), { recursive: true });
|
|
131629
|
+
writeFileSync3(file, `${JSON.stringify(content, null, 2)}
|
|
131630
|
+
`, { mode: 384 });
|
|
131491
131631
|
}
|
|
131492
131632
|
function importWalletFile(source, env = process.env, force = false) {
|
|
131493
|
-
return importSigners(JSON.parse(
|
|
131633
|
+
return importSigners(JSON.parse(readFileSync3(source, "utf8")), source, env, force);
|
|
131494
131634
|
}
|
|
131495
131635
|
function refuseExistingWalletFile(env = process.env, force = false) {
|
|
131496
|
-
|
|
131497
|
-
|
|
131498
|
-
if (force || !existsSync(file)) return;
|
|
131636
|
+
const file = env.KEYBAN_WALLET_PATH;
|
|
131637
|
+
if (force || !file || !existsSync(file)) return;
|
|
131499
131638
|
throw new Error(
|
|
131500
131639
|
`The keyban wallet ${file} already exists: overwriting it loses its client share. Set KEYBAN_WALLET_PATH to another file, or pass --force.`
|
|
131501
131640
|
);
|
|
131502
131641
|
}
|
|
131503
131642
|
function importSigners(signers, source, env = process.env, force = false) {
|
|
131504
|
-
refuseExistingWalletFile(env, force);
|
|
131505
131643
|
const parsed = signers;
|
|
131506
131644
|
if (!parsed || typeof parsed !== "object") {
|
|
131507
131645
|
throw new Error(`${source} holds no signer: expected a JSON object.`);
|
|
131508
131646
|
}
|
|
131509
|
-
const
|
|
131510
|
-
const block = signer?.mcpConfig?.mcpServers?.["agent-wallet"]?.env;
|
|
131647
|
+
const block = envBlockOf(parsed.data ? parsed.data[0] : parsed);
|
|
131511
131648
|
if (!block || typeof block !== "object") {
|
|
131512
131649
|
throw new Error(`${source} holds no signer with an MCP configuration (is the signer ready?).`);
|
|
131513
131650
|
}
|
|
131514
|
-
const
|
|
131515
|
-
|
|
131516
|
-
|
|
131517
|
-
|
|
131651
|
+
const variables = block;
|
|
131652
|
+
const id = variables.KEYBAN_WALLET_ID;
|
|
131653
|
+
if (typeof id !== "string" || !id) {
|
|
131654
|
+
throw new Error(`${source} names no KEYBAN_WALLET_ID: download the wallet's configuration from the admin again.`);
|
|
131655
|
+
}
|
|
131656
|
+
const file = env.KEYBAN_WALLET_PATH || idPath(env, id);
|
|
131657
|
+
if (!force && existsSync(file)) {
|
|
131658
|
+
const kept = readWalletFile(file).variables;
|
|
131659
|
+
const differing = Object.keys(variables).filter((name) => kept[name] !== variables[name]);
|
|
131660
|
+
if (differing.length > 0) {
|
|
131661
|
+
throw new Error(
|
|
131662
|
+
`The keyban wallet ${file} holds another configuration (${differing.join(", ")}): overwriting it loses its client share. Set KEYBAN_WALLET_PATH to another file, or pass --force.`
|
|
131663
|
+
);
|
|
131664
|
+
}
|
|
131665
|
+
} else {
|
|
131666
|
+
writeFile(file, variables);
|
|
131667
|
+
}
|
|
131668
|
+
if (!env.KEYBAN_WALLET_PATH) writeFile(pointerPath(env), { current: id });
|
|
131518
131669
|
return file;
|
|
131519
131670
|
}
|
|
131671
|
+
function listWallets(env = process.env) {
|
|
131672
|
+
const dir = join3(keybanDir(env), "wallets");
|
|
131673
|
+
if (!existsSync(dir)) return [];
|
|
131674
|
+
return readdirSync(dir).filter((entry) => entry.endsWith(".json")).flatMap((entry) => {
|
|
131675
|
+
const id = entry.slice(0, -".json".length);
|
|
131676
|
+
try {
|
|
131677
|
+
const name = readWalletFile(join3(dir, entry)).variables.KEYBAN_WALLET_NAME;
|
|
131678
|
+
return [{ id, ...typeof name === "string" && { name } }];
|
|
131679
|
+
} catch {
|
|
131680
|
+
return [];
|
|
131681
|
+
}
|
|
131682
|
+
});
|
|
131683
|
+
}
|
|
131684
|
+
function useWallet(nameOrId, env = process.env) {
|
|
131685
|
+
if (env.KEYBAN_WALLET_PATH) {
|
|
131686
|
+
throw new Error(`KEYBAN_WALLET_PATH names the one wallet to drive, ${env.KEYBAN_WALLET_PATH}: unset it to choose.`);
|
|
131687
|
+
}
|
|
131688
|
+
const wallets = listWallets(env);
|
|
131689
|
+
let id = wallets.find((wallet) => wallet.id === nameOrId)?.id;
|
|
131690
|
+
if (!id) {
|
|
131691
|
+
const named = wallets.filter((wallet) => wallet.name === nameOrId);
|
|
131692
|
+
if (named.length === 0) throw new Error(`No keyban wallet with the id or name "${nameOrId}": keyban wallet import it first.`);
|
|
131693
|
+
if (named.length > 1) {
|
|
131694
|
+
throw new Error(`${named.length} wallets are named "${nameOrId}": ${named.map((w) => w.id).join(", ")}. Pass the id.`);
|
|
131695
|
+
}
|
|
131696
|
+
id = named[0].id;
|
|
131697
|
+
}
|
|
131698
|
+
writeFile(pointerPath(env), { current: id });
|
|
131699
|
+
return idPath(env, id);
|
|
131700
|
+
}
|
|
131520
131701
|
function readClientShare(env = process.env) {
|
|
131521
131702
|
const file = walletFilePath(env);
|
|
131522
|
-
if (!existsSync(file)) return void 0;
|
|
131523
|
-
const blob =
|
|
131524
|
-
return blob ? Buffer.from(blob, "base64").toString("utf8") : void 0;
|
|
131703
|
+
if (!file || !existsSync(file)) return void 0;
|
|
131704
|
+
const blob = readWalletFile(file).variables.KEYBAN_DKG_BLOB;
|
|
131705
|
+
return typeof blob === "string" && blob ? Buffer.from(blob, "base64").toString("utf8") : void 0;
|
|
131525
131706
|
}
|
|
131526
|
-
function
|
|
131707
|
+
function requireWalletFile(env = process.env) {
|
|
131527
131708
|
const file = walletFilePath(env);
|
|
131528
|
-
if (
|
|
131529
|
-
|
|
131709
|
+
if (env.KEYBAN_CONFIG) {
|
|
131710
|
+
if (!file) throw new Error("KEYBAN_CONFIG names no KEYBAN_WALLET_ID to keep the client share by.");
|
|
131711
|
+
if (!existsSync(file)) writeFile(file, decodeKeybanConfig(env.KEYBAN_CONFIG));
|
|
131712
|
+
return file;
|
|
131713
|
+
}
|
|
131714
|
+
if (!file || !existsSync(file)) {
|
|
131715
|
+
throw new Error(
|
|
131716
|
+
`No keyban wallet${file ? ` at ${file}` : ""} to keep the client share in: run keyban wallet import first.`
|
|
131717
|
+
);
|
|
131718
|
+
}
|
|
131719
|
+
return file;
|
|
131720
|
+
}
|
|
131721
|
+
function keepClientShare(dkgBlob, env = process.env) {
|
|
131722
|
+
const file = requireWalletFile(env);
|
|
131723
|
+
const { document, variables } = readWalletFile(file);
|
|
131530
131724
|
if (variables.KEYBAN_DKG_BLOB) throw new Error(`The keyban wallet ${file} already holds a client share.`);
|
|
131531
131725
|
variables.KEYBAN_DKG_BLOB = Buffer.from(dkgBlob, "utf8").toString("base64");
|
|
131532
|
-
|
|
131533
|
-
`, { mode: 384 });
|
|
131726
|
+
writeFile(file, document);
|
|
131534
131727
|
return file;
|
|
131535
131728
|
}
|
|
131536
131729
|
|
|
@@ -131764,7 +131957,6 @@ function missionCommands(missions) {
|
|
|
131764
131957
|
var SIGNER_READY_TIMEOUT_MS = 6e4;
|
|
131765
131958
|
var SIGNER_READY_POLL_MS = 2e3;
|
|
131766
131959
|
async function importWalletSigner(apiOption, walletId, env, force = false) {
|
|
131767
|
-
refuseExistingWalletFile(env, force);
|
|
131768
131960
|
const api = resolveURL(apiOption);
|
|
131769
131961
|
const origin = new URL(api).origin;
|
|
131770
131962
|
const document = await loadOpenApi(origin);
|
|
@@ -131789,16 +131981,18 @@ function walletCommand(wallet, missions) {
|
|
|
131789
131981
|
);
|
|
131790
131982
|
for (const tool of wallet.tools.filter(isModelVisible)) command.addCommand(commandFor(tool));
|
|
131791
131983
|
for (const mission of missions ? missionCommands(missions) : []) command.addCommand(mission);
|
|
131792
|
-
command.command("import").argument("[signer.json]", "a signer, as `keyban admin get-wallet-signer` prints it").option("--wallet-id <id>", "read the signer of this wallet through the `keyban admin login` session instead").option("--api <env|url>", "the Keyban API of that session", process.env.KEYBAN_BASE_URL ?? "prod").option("--force", "overwrite the wallet file there, losing its client share").description(
|
|
131984
|
+
command.command("import").argument("[signer.json]", "a signer, as `keyban admin get-wallet-signer` prints it, or the agent-wallet.json the admin downloads").option("--wallet-id <id>", "read the signer of this wallet through the `keyban admin login` session instead").option("--api <env|url>", "the Keyban API of that session", process.env.KEYBAN_BASE_URL ?? "prod").option("--force", "overwrite the wallet file there, losing its client share").description(
|
|
131985
|
+
"Keep the wallet configuration a signer carries in the wallet file, and drive it from now on (KEYBAN_WALLET_PATH, else XDG keyban/wallets/<wallet id>.json, made current in keyban/wallet.json)"
|
|
131986
|
+
).action(async (source, options) => {
|
|
131793
131987
|
try {
|
|
131794
131988
|
const env = process.env;
|
|
131795
131989
|
if (options.walletId) {
|
|
131796
|
-
process.stdout.write(`
|
|
131990
|
+
process.stdout.write(`Using ${await importWalletSigner(options.api, options.walletId, env, options.force)}
|
|
131797
131991
|
`);
|
|
131798
131992
|
return;
|
|
131799
131993
|
}
|
|
131800
131994
|
if (!source) throw new Error("Give a signer.json, or --wallet-id.");
|
|
131801
|
-
process.stdout.write(`
|
|
131995
|
+
process.stdout.write(`Using ${importWalletFile(source, env, options.force)}
|
|
131802
131996
|
`);
|
|
131803
131997
|
} catch (error2) {
|
|
131804
131998
|
process.stderr.write(`Error: ${error2 instanceof Error ? error2.message : String(error2)}
|
|
@@ -131806,6 +132000,21 @@ function walletCommand(wallet, missions) {
|
|
|
131806
132000
|
process.exit(1);
|
|
131807
132001
|
}
|
|
131808
132002
|
});
|
|
132003
|
+
const use = command.command("use").argument("<name|id>", "a wallet kept by keyban wallet import or keyban admin new-wallet").description("Drive that wallet from now on: make it current in XDG keyban/wallet.json").action((nameOrId) => {
|
|
132004
|
+
try {
|
|
132005
|
+
process.stdout.write(`Now driving ${useWallet(nameOrId)}
|
|
132006
|
+
`);
|
|
132007
|
+
} catch (error2) {
|
|
132008
|
+
process.stderr.write(`Error: ${error2 instanceof Error ? error2.message : String(error2)}
|
|
132009
|
+
`);
|
|
132010
|
+
process.exit(1);
|
|
132011
|
+
}
|
|
132012
|
+
});
|
|
132013
|
+
completeArgumentWith(use, async () => {
|
|
132014
|
+
const wallets = listWallets();
|
|
132015
|
+
const count2 = (name) => wallets.filter((wallet2) => wallet2.name === name).length;
|
|
132016
|
+
return wallets.map((wallet2) => wallet2.name && count2(wallet2.name) === 1 ? wallet2.name : wallet2.id);
|
|
132017
|
+
});
|
|
131809
132018
|
command.on("command:*", (operands) => {
|
|
131810
132019
|
const reason = wallet.configured ? "" : `
|
|
131811
132020
|
${wallet.instructions}`;
|
|
@@ -131845,18 +132054,16 @@ function answering(action) {
|
|
|
131845
132054
|
}
|
|
131846
132055
|
};
|
|
131847
132056
|
}
|
|
131848
|
-
function runDkg(env
|
|
132057
|
+
function runDkg(env) {
|
|
131849
132058
|
const child = { ...env };
|
|
131850
|
-
|
|
131851
|
-
delete child[name];
|
|
131852
|
-
}
|
|
132059
|
+
delete child.KEYBAN_CONFIG;
|
|
131853
132060
|
const run = spawnSync(process.execPath, [process.argv[1], "wallet", "balance"], {
|
|
131854
132061
|
env: child,
|
|
131855
132062
|
stdio: ["ignore", 2, 2]
|
|
131856
132063
|
});
|
|
131857
132064
|
if (run.status !== 0) throw new Error(`The DKG failed: keyban wallet balance exited ${run.status ?? run.signal}.`);
|
|
131858
132065
|
}
|
|
131859
|
-
function newWalletCommand(tool, document) {
|
|
132066
|
+
function newWalletCommand(tool, document, typedApi) {
|
|
131860
132067
|
const command = jsonToolCommand(
|
|
131861
132068
|
{
|
|
131862
132069
|
...tool,
|
|
@@ -131874,14 +132081,14 @@ function newWalletCommand(tool, document) {
|
|
|
131874
132081
|
const text6 = created.content.map((part) => part.type === "text" ? part.text : "").join("");
|
|
131875
132082
|
const createdWallet = JSON.parse(text6);
|
|
131876
132083
|
const file = await importWalletSigner(api, createdWallet.id, env, force);
|
|
131877
|
-
if (share) runDkg(env
|
|
132084
|
+
if (share) runDkg(env);
|
|
131878
132085
|
return { content: [{ type: "text", text: JSON.stringify({ ...createdWallet, file }, null, 2) }] };
|
|
131879
132086
|
},
|
|
131880
|
-
adminNames(document)
|
|
132087
|
+
adminNames(document, typedApi)
|
|
131881
132088
|
);
|
|
131882
132089
|
return command.option("--share", "also run the DKG, keeping the client share in the wallet file").option("--force", "overwrite the wallet file there, losing its client share");
|
|
131883
132090
|
}
|
|
131884
|
-
function adminNames(document) {
|
|
132091
|
+
function adminNames(document, typedApi) {
|
|
131885
132092
|
return {
|
|
131886
132093
|
kindOf,
|
|
131887
132094
|
nameField: nameFieldOf,
|
|
@@ -131891,20 +132098,29 @@ function adminNames(document) {
|
|
|
131891
132098
|
const origin = new URL(api).origin;
|
|
131892
132099
|
const token = await adminAccessToken(api);
|
|
131893
132100
|
return resolveName(kind, name, (list, listArgs) => callAdminTool(document, origin, token, list, listArgs), args);
|
|
132101
|
+
},
|
|
132102
|
+
list: async (kind, args) => {
|
|
132103
|
+
const origin = new URL(typedApi).origin;
|
|
132104
|
+
const scope = scopeOf(kind, args);
|
|
132105
|
+
const key = [kind, ...Object.values(scope ?? {}).map(String)].join("-");
|
|
132106
|
+
return cachedForCompletion(origin, key, async () => {
|
|
132107
|
+
const token = await adminAccessToken(typedApi);
|
|
132108
|
+
return listItems(kind, (list, listArgs) => callAdminTool(document, origin, token, list, listArgs), args);
|
|
132109
|
+
});
|
|
131894
132110
|
}
|
|
131895
132111
|
};
|
|
131896
132112
|
}
|
|
131897
|
-
function commandFor2(tool, document) {
|
|
132113
|
+
function commandFor2(tool, document, typedApi) {
|
|
131898
132114
|
return jsonToolCommand(
|
|
131899
132115
|
tool,
|
|
131900
132116
|
async (args, self2) => {
|
|
131901
132117
|
const api = apiOf(self2);
|
|
131902
132118
|
return callAdminTool(document, new URL(api).origin, await adminAccessToken(api), tool.name, args);
|
|
131903
132119
|
},
|
|
131904
|
-
adminNames(document)
|
|
132120
|
+
adminNames(document, typedApi)
|
|
131905
132121
|
);
|
|
131906
132122
|
}
|
|
131907
|
-
async function adminCommand(argv = process.argv) {
|
|
132123
|
+
async function adminCommand(argv = process.argv, completing = false) {
|
|
131908
132124
|
const command = new Command("admin").description("Administer Keyban as yourself: log in, then one subcommand per admin MCP tool").option("--api <env|url>", `Keyban API: ${Object.keys(ENV_URLS).join(", ")}, or a URL`, defaultApi());
|
|
131909
132125
|
command.command("login").description("Log in through the browser; the session is kept in the OS keyring").option("--token <token>", "keep this token instead of logging in through the browser (a session token, for scripts)").action(
|
|
131910
132126
|
answering(async (api, options) => {
|
|
@@ -131926,6 +132142,7 @@ ${url2}
|
|
|
131926
132142
|
answering(async (api) => {
|
|
131927
132143
|
const origin = new URL(api).origin;
|
|
131928
132144
|
clearOpenApiCache(origin);
|
|
132145
|
+
clearCompletionCache(origin);
|
|
131929
132146
|
return logout(api) ? `Logged out of ${origin}` : `Not logged in to ${origin}`;
|
|
131930
132147
|
})
|
|
131931
132148
|
);
|
|
@@ -131934,11 +132151,12 @@ ${url2}
|
|
|
131934
132151
|
if (argv[2] !== "admin" || sub && OWN_COMMANDS.has(sub)) return command;
|
|
131935
132152
|
let reason = "";
|
|
131936
132153
|
try {
|
|
131937
|
-
const
|
|
131938
|
-
const
|
|
132154
|
+
const typedApi = apiFromArgv(argv);
|
|
132155
|
+
const origin = new URL(typedApi).origin;
|
|
132156
|
+
const document = await loadOpenApi(origin, { revalidate: !completing });
|
|
131939
132157
|
for (const tool of await listAdminTools(document, origin)) {
|
|
131940
|
-
command.addCommand(commandFor2(tool, document));
|
|
131941
|
-
if (tool.name === "create_wallet") command.addCommand(newWalletCommand(tool, document));
|
|
132158
|
+
command.addCommand(commandFor2(tool, document, typedApi));
|
|
132159
|
+
if (tool.name === "create_wallet") command.addCommand(newWalletCommand(tool, document, typedApi));
|
|
131942
132160
|
}
|
|
131943
132161
|
} catch (error2) {
|
|
131944
132162
|
reason = `
|
|
@@ -131955,8 +132173,11 @@ ${error2 instanceof Error ? error2.message : String(error2)}`;
|
|
|
131955
132173
|
// src/completion.ts
|
|
131956
132174
|
var SCRIPTS = {
|
|
131957
132175
|
bash: `_keyban() {
|
|
131958
|
-
local IFS=$'\\n'
|
|
131959
|
-
COMPREPLY=(
|
|
132176
|
+
local IFS=$'\\n' candidate
|
|
132177
|
+
COMPREPLY=()
|
|
132178
|
+
for candidate in $(keyban __complete -- "\${COMP_WORDS[@]:1:COMP_CWORD}" 2>/dev/null); do
|
|
132179
|
+
COMPREPLY+=("$(printf '%q' "$candidate")")
|
|
132180
|
+
done
|
|
131960
132181
|
}
|
|
131961
132182
|
complete -o default -F _keyban keyban
|
|
131962
132183
|
`,
|
|
@@ -131970,13 +132191,23 @@ compdef _keyban keyban
|
|
|
131970
132191
|
fish: `complete -c keyban -f -a '(keyban __complete -- (commandline -opc)[2..-1] (commandline -ct) 2>/dev/null)'
|
|
131971
132192
|
`
|
|
131972
132193
|
};
|
|
131973
|
-
function
|
|
131974
|
-
|
|
132194
|
+
function unquoted(word) {
|
|
132195
|
+
return word.replace(/^['"]|['"]$/g, "").replace(/\\(.)/g, "$1");
|
|
132196
|
+
}
|
|
132197
|
+
async function candidates(program2, words) {
|
|
132198
|
+
const typed = unquoted(words.at(-1) ?? "");
|
|
131975
132199
|
let command = program2;
|
|
131976
132200
|
for (const word of words.slice(0, -1)) {
|
|
131977
132201
|
const sub = command.commands.find((c) => c.name() === word);
|
|
131978
132202
|
if (sub) command = sub;
|
|
131979
132203
|
}
|
|
132204
|
+
const flag = words.at(-2);
|
|
132205
|
+
const previous = flag ? command.options.find((o) => o.long === flag || o.short === flag) : void 0;
|
|
132206
|
+
if (previous && (previous.required || previous.optional)) {
|
|
132207
|
+
return [...new Set(await optionValues(previous, words))].filter((value) => value.startsWith(typed));
|
|
132208
|
+
}
|
|
132209
|
+
const values = typed.startsWith("-") ? void 0 : await argumentValues(command, words);
|
|
132210
|
+
if (values) return [...new Set(values)].filter((value) => value.startsWith(typed));
|
|
131980
132211
|
const subcommands = command.commands.filter((c) => !c._hidden).map((c) => c.name());
|
|
131981
132212
|
const options = [...command.options.map((o) => o.long).filter((l) => !!l), "--help"];
|
|
131982
132213
|
const pool = typed.startsWith("-") || subcommands.length === 0 ? options : subcommands;
|
|
@@ -131992,7 +132223,7 @@ function addCompletion(program2) {
|
|
|
131992
132223
|
await print(script);
|
|
131993
132224
|
});
|
|
131994
132225
|
program2.command("__complete", { hidden: true }).argument("[words...]").allowUnknownOption().helpOption(false).action(async (words) => {
|
|
131995
|
-
const found = candidates(program2, words.length > 0 ? words : [""]);
|
|
132226
|
+
const found = await candidates(program2, words.length > 0 ? words : [""]);
|
|
131996
132227
|
await print(found.length > 0 ? `${found.join("\n")}
|
|
131997
132228
|
` : "");
|
|
131998
132229
|
});
|
|
@@ -132115,25 +132346,6 @@ var ALL_VARIABLES = [
|
|
|
132115
132346
|
function requiredVariables(funding) {
|
|
132116
132347
|
return funding === "wallet" ? ALL_VARIABLES : ALL_VARIABLES.filter((v) => !v.walletOnly);
|
|
132117
132348
|
}
|
|
132118
|
-
function expandKeybanConfig(env = process.env) {
|
|
132119
|
-
const encoded = env.KEYBAN_CONFIG;
|
|
132120
|
-
if (!encoded) return;
|
|
132121
|
-
let parsed;
|
|
132122
|
-
try {
|
|
132123
|
-
parsed = JSON.parse(Buffer.from(encoded, "base64").toString("utf8"));
|
|
132124
|
-
} catch (err) {
|
|
132125
|
-
throw new Error("KEYBAN_CONFIG is not valid base64-encoded JSON.", { cause: err });
|
|
132126
|
-
}
|
|
132127
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
132128
|
-
throw new Error("KEYBAN_CONFIG must decode to a JSON object of variables.");
|
|
132129
|
-
}
|
|
132130
|
-
for (const [name, value] of Object.entries(parsed)) {
|
|
132131
|
-
if (typeof value !== "string") {
|
|
132132
|
-
throw new Error(`KEYBAN_CONFIG: ${name} must be a string.`);
|
|
132133
|
-
}
|
|
132134
|
-
if (!env[name]) env[name] = value;
|
|
132135
|
-
}
|
|
132136
|
-
}
|
|
132137
132349
|
function findConfigurationProblems(env = process.env) {
|
|
132138
132350
|
const problems = [];
|
|
132139
132351
|
const configured = configuredFunding(env);
|
|
@@ -132212,9 +132424,11 @@ function describeConfigurationProblems(problems, env = process.env) {
|
|
|
132212
132424
|
funding === "prepaid" ? " it. It provisions the account and its API key." : " it. It provisions the account, its API key and, for a wallet, a one-shot invite key.",
|
|
132213
132425
|
"3. Copy the configuration from the account's page in the admin app \u2014 either the"
|
|
132214
132426
|
],
|
|
132215
|
-
"
|
|
132216
|
-
"
|
|
132217
|
-
"4.
|
|
132427
|
+
" downloaded file, or nothing with `keyban wallet import --wallet-id <id>` after",
|
|
132428
|
+
" `keyban admin login`. Never paste it into the conversation: it holds the keys.",
|
|
132429
|
+
"4. Keep it with `keyban wallet import <the downloaded file>`, then restart this",
|
|
132430
|
+
" server. A hosted runtime with nothing but its environment takes the whole",
|
|
132431
|
+
" configuration, base64 JSON, in KEYBAN_CONFIG instead.",
|
|
132218
132432
|
"",
|
|
132219
132433
|
`The README covers the same ground: ${README_URL}`,
|
|
132220
132434
|
`Admin MCP guide, from the account to this server installed: ${ADMIN_SKILL_URL}`,
|
|
@@ -143475,7 +143689,7 @@ async function evaluateIntent(session, input) {
|
|
|
143475
143689
|
|
|
143476
143690
|
// src/lib/wasm-loader.ts
|
|
143477
143691
|
import { readFile } from "node:fs/promises";
|
|
143478
|
-
import { dirname as dirname2, join as
|
|
143692
|
+
import { dirname as dirname2, join as join4 } from "node:path";
|
|
143479
143693
|
import { fileURLToPath } from "node:url";
|
|
143480
143694
|
var wasmPromise = null;
|
|
143481
143695
|
function initEcdsaSchnorrWasm() {
|
|
@@ -143484,7 +143698,7 @@ function initEcdsaSchnorrWasm() {
|
|
|
143484
143698
|
const wasmModule = await import("./wasm/ecdsa_schnorr_wasm_client.js");
|
|
143485
143699
|
const initWasm = wasmModule.default;
|
|
143486
143700
|
const __dirname = dirname2(fileURLToPath(import.meta.url));
|
|
143487
|
-
const wasmPath =
|
|
143701
|
+
const wasmPath = join4(
|
|
143488
143702
|
__dirname,
|
|
143489
143703
|
"wasm",
|
|
143490
143704
|
"ecdsa_schnorr_wasm_client_bg.wasm"
|
|
@@ -144765,6 +144979,7 @@ async function runInit(session) {
|
|
|
144765
144979
|
try {
|
|
144766
144980
|
dkgBlob = await nodeApi.dkgStorage.get(storageKey);
|
|
144767
144981
|
} catch {
|
|
144982
|
+
requireWalletFile();
|
|
144768
144983
|
dkgBlob = await nodeApi.ecdsaSchnorr.dkg();
|
|
144769
144984
|
await nodeApi.dkgStorage.set(storageKey, dkgBlob);
|
|
144770
144985
|
}
|
|
@@ -147676,7 +147891,7 @@ function createListExpenseTransactionsTool(session) {
|
|
|
147676
147891
|
// src/tools/setup-instructions.ts
|
|
147677
147892
|
init_zod();
|
|
147678
147893
|
var setupInstructionsSchema = external_exports.object({});
|
|
147679
|
-
function createSetupInstructionsTool(problems) {
|
|
147894
|
+
function createSetupInstructionsTool(problems, config2) {
|
|
147680
147895
|
const names = problems.map((p) => p.name).join(", ");
|
|
147681
147896
|
return {
|
|
147682
147897
|
name: "setup_instructions",
|
|
@@ -147684,7 +147899,7 @@ function createSetupInstructionsTool(problems) {
|
|
|
147684
147899
|
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
147685
147900
|
description: `This Keyban agent wallet has no wallet to drive yet, so none of its usual tools are available. Incomplete configuration: ${names}. Call this tool for the steps to obtain those values from keyban.io.`,
|
|
147686
147901
|
inputSchema: setupInstructionsSchema,
|
|
147687
|
-
handler: async (_input) => describeConfigurationProblems(problems)
|
|
147902
|
+
handler: async (_input) => describeConfigurationProblems(problems, config2)
|
|
147688
147903
|
};
|
|
147689
147904
|
}
|
|
147690
147905
|
|
|
@@ -147693,7 +147908,7 @@ init_zod();
|
|
|
147693
147908
|
|
|
147694
147909
|
// src/lib/skill.ts
|
|
147695
147910
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
147696
|
-
import { dirname as dirname3, join as
|
|
147911
|
+
import { dirname as dirname3, join as join5 } from "node:path";
|
|
147697
147912
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
147698
147913
|
var PACKAGE_NAME = "@keyban/cli";
|
|
147699
147914
|
var MAX_ANCESTORS = 4;
|
|
@@ -147708,7 +147923,7 @@ function packageName(manifest) {
|
|
|
147708
147923
|
function packageRoot() {
|
|
147709
147924
|
let dir = dirname3(fileURLToPath2(import.meta.url));
|
|
147710
147925
|
for (let depth = 0; depth < MAX_ANCESTORS; depth += 1) {
|
|
147711
|
-
if (packageName(
|
|
147926
|
+
if (packageName(join5(dir, "package.json")) === PACKAGE_NAME) return dir;
|
|
147712
147927
|
dir = dirname3(dir);
|
|
147713
147928
|
}
|
|
147714
147929
|
return void 0;
|
|
@@ -147717,7 +147932,7 @@ function readFromPackage() {
|
|
|
147717
147932
|
const root = packageRoot();
|
|
147718
147933
|
if (!root) return void 0;
|
|
147719
147934
|
try {
|
|
147720
|
-
return readFileSync4(
|
|
147935
|
+
return readFileSync4(join5(root, "SKILL.md"), "utf8");
|
|
147721
147936
|
} catch {
|
|
147722
147937
|
return void 0;
|
|
147723
147938
|
}
|
|
@@ -147749,34 +147964,33 @@ function resolveWalletId(session) {
|
|
|
147749
147964
|
if (session.walletId) return Promise.resolve(session.walletId);
|
|
147750
147965
|
const pending = lookups.get(session);
|
|
147751
147966
|
if (pending) return pending;
|
|
147752
|
-
const lookup =
|
|
147967
|
+
const lookup = lookupWallet(session).then(({ id }) => session.walletId = id).finally(() => lookups.delete(session));
|
|
147753
147968
|
lookups.set(session, lookup);
|
|
147754
147969
|
return lookup;
|
|
147755
147970
|
}
|
|
147756
|
-
async function
|
|
147971
|
+
async function lookupWallet(keys) {
|
|
147757
147972
|
const query = new URLSearchParams({
|
|
147758
147973
|
"filters[0][field]": "address",
|
|
147759
147974
|
"filters[0][operator]": "eq",
|
|
147760
|
-
"filters[0][value]":
|
|
147975
|
+
"filters[0][value]": keys.walletAddress.toLowerCase(),
|
|
147761
147976
|
"filters[1][field]": "application.id",
|
|
147762
147977
|
"filters[1][operator]": "eq",
|
|
147763
|
-
"filters[1][value]":
|
|
147978
|
+
"filters[1][value]": keys.appId,
|
|
147764
147979
|
pageSize: "1"
|
|
147765
147980
|
});
|
|
147766
|
-
const res = await fetch(`${
|
|
147767
|
-
headers: buildApiKeyHeaders(
|
|
147981
|
+
const res = await fetch(`${keys.baseURL}/v1/agent-wallets?${query}`, {
|
|
147982
|
+
headers: buildApiKeyHeaders(keys)
|
|
147768
147983
|
});
|
|
147769
147984
|
if (!res.ok) {
|
|
147770
147985
|
throw new Error(`Cannot resolve this wallet: ${res.status} ${await res.text()}`);
|
|
147771
147986
|
}
|
|
147772
|
-
const
|
|
147773
|
-
if (typeof id !== "string") {
|
|
147987
|
+
const wallet = (await res.json()).data?.[0];
|
|
147988
|
+
if (typeof wallet?.id !== "string") {
|
|
147774
147989
|
throw new Error(
|
|
147775
|
-
`No agent wallet ${
|
|
147990
|
+
`No agent wallet ${keys.walletAddress} in application ${keys.appId}: check KEYBAN_WALLET_ADDRESS and KEYBAN_APP_ID.`
|
|
147776
147991
|
);
|
|
147777
147992
|
}
|
|
147778
|
-
|
|
147779
|
-
return id;
|
|
147993
|
+
return { id: wallet.id, ...typeof wallet.label === "string" && { label: wallet.label } };
|
|
147780
147994
|
}
|
|
147781
147995
|
|
|
147782
147996
|
// src/lib/mission-api.ts
|
|
@@ -148274,9 +148488,9 @@ function walletTools(session) {
|
|
|
148274
148488
|
|
|
148275
148489
|
// src/lib/x402-cache.ts
|
|
148276
148490
|
import { createHash as createHash2 } from "node:crypto";
|
|
148277
|
-
import { mkdirSync as
|
|
148278
|
-
import { homedir as
|
|
148279
|
-
import { dirname as dirname4, join as
|
|
148491
|
+
import { mkdirSync as mkdirSync4, readFileSync as readFileSync5, renameSync, writeFileSync as writeFileSync4 } from "node:fs";
|
|
148492
|
+
import { homedir as homedir4 } from "node:os";
|
|
148493
|
+
import { dirname as dirname4, join as join6 } from "node:path";
|
|
148280
148494
|
function read(file) {
|
|
148281
148495
|
try {
|
|
148282
148496
|
const data = JSON.parse(readFileSync5(file, "utf8"));
|
|
@@ -148299,10 +148513,10 @@ function prune(data) {
|
|
|
148299
148513
|
return data;
|
|
148300
148514
|
}
|
|
148301
148515
|
function write(file, data) {
|
|
148302
|
-
|
|
148516
|
+
mkdirSync4(dirname4(file), { recursive: true, mode: 448 });
|
|
148303
148517
|
const tmp = `${file}.${process.pid}.tmp`;
|
|
148304
|
-
|
|
148305
|
-
|
|
148518
|
+
writeFileSync4(tmp, JSON.stringify(data), { mode: 384 });
|
|
148519
|
+
renameSync(tmp, file);
|
|
148306
148520
|
}
|
|
148307
148521
|
var PersistedMap = class extends Map {
|
|
148308
148522
|
constructor(file, field) {
|
|
@@ -148344,10 +148558,10 @@ var PersistedMap = class extends Map {
|
|
|
148344
148558
|
};
|
|
148345
148559
|
function x402CacheFile(session, cacheHome) {
|
|
148346
148560
|
const account = session.funding === "prepaid" ? `prepaid-${createHash2("sha256").update(session.apiKey).digest("hex").slice(0, 16)}` : session.walletAddress.toLowerCase();
|
|
148347
|
-
return
|
|
148561
|
+
return join6(cacheHome, "keyban", "x402", `${session.network}-${account}.json`);
|
|
148348
148562
|
}
|
|
148349
148563
|
function attachX402Cache(session) {
|
|
148350
|
-
const cacheHome = process.env.XDG_CACHE_HOME ||
|
|
148564
|
+
const cacheHome = process.env.XDG_CACHE_HOME || join6(homedir4(), ".cache");
|
|
148351
148565
|
const file = x402CacheFile(session, cacheHome);
|
|
148352
148566
|
session.pendingX402 = new PersistedMap(file, "pending");
|
|
148353
148567
|
session.signedX402 = new PersistedMap(file, "signed");
|
|
@@ -148355,33 +148569,31 @@ function attachX402Cache(session) {
|
|
|
148355
148569
|
|
|
148356
148570
|
// src/lib/bootstrap.ts
|
|
148357
148571
|
function bootstrapWallet(session = createSession()) {
|
|
148358
|
-
expandKeybanConfig();
|
|
148359
148572
|
const [command, subcommand] = process.argv.slice(2);
|
|
148360
|
-
const writesWalletFile = command === "admin" || command === "wallet" && subcommand === "import";
|
|
148361
|
-
|
|
148362
|
-
session.funding = readFundingMode();
|
|
148363
|
-
|
|
148364
|
-
|
|
148365
|
-
session.
|
|
148366
|
-
if (
|
|
148367
|
-
if (
|
|
148368
|
-
|
|
148369
|
-
|
|
148370
|
-
|
|
148371
|
-
const configurationProblems = findConfigurationProblems();
|
|
148573
|
+
const writesWalletFile = command === "admin" || command === "wallet" && (subcommand === "import" || subcommand === "use");
|
|
148574
|
+
const config2 = writesWalletFile ? {} : readWalletConfig();
|
|
148575
|
+
session.funding = readFundingMode(config2);
|
|
148576
|
+
if (config2.KEYBAN_API_KEY) {
|
|
148577
|
+
session.apiKey = config2.KEYBAN_API_KEY;
|
|
148578
|
+
if (config2.KEYBAN_APP_ID) session.appId = config2.KEYBAN_APP_ID;
|
|
148579
|
+
if (config2.KEYBAN_BASE_URL) session.baseURL = resolveURL(config2.KEYBAN_BASE_URL);
|
|
148580
|
+
if (config2.KEYBAN_NETWORK) session.network = config2.KEYBAN_NETWORK;
|
|
148581
|
+
logger.info("API key configured from the wallet");
|
|
148582
|
+
}
|
|
148583
|
+
const configurationProblems = findConfigurationProblems(config2);
|
|
148372
148584
|
const unconfigured = configurationProblems.length > 0;
|
|
148373
148585
|
if (unconfigured) {
|
|
148374
148586
|
const summary = configurationProblems.map((p) => `${p.name} (${p.reason})`).join(", ");
|
|
148375
148587
|
logger.warn(`Incomplete configuration: ${summary}`);
|
|
148376
148588
|
} else {
|
|
148377
148589
|
if (session.funding === "wallet") {
|
|
148378
|
-
session.inviteKey =
|
|
148379
|
-
session.walletAddress =
|
|
148590
|
+
session.inviteKey = config2.KEYBAN_INVITE_KEY ?? "";
|
|
148591
|
+
session.walletAddress = config2.KEYBAN_WALLET_ADDRESS ?? "";
|
|
148380
148592
|
}
|
|
148381
148593
|
attachX402Cache(session);
|
|
148382
148594
|
logger.info("Agent-wallet credentials configured");
|
|
148383
148595
|
}
|
|
148384
|
-
const envDkgBlob = session.funding === "wallet" ?
|
|
148596
|
+
const envDkgBlob = session.funding === "wallet" ? config2.KEYBAN_DKG_BLOB : void 0;
|
|
148385
148597
|
if (envDkgBlob) {
|
|
148386
148598
|
try {
|
|
148387
148599
|
session.seededDkgBlob = Buffer.from(envDkgBlob, "base64").toString("utf8");
|
|
@@ -148397,15 +148609,15 @@ function bootstrapWallet(session = createSession()) {
|
|
|
148397
148609
|
}
|
|
148398
148610
|
}
|
|
148399
148611
|
const tools = unconfigured ? [
|
|
148400
|
-
createSetupInstructionsTool(configurationProblems),
|
|
148612
|
+
createSetupInstructionsTool(configurationProblems, config2),
|
|
148401
148613
|
createGetInstructionsTool()
|
|
148402
148614
|
] : walletTools(session);
|
|
148403
|
-
const instructions = unconfigured ? summarizeConfigurationProblems(configurationProblems) : session.funding === "prepaid" ? `Keyban agent wallet MCP server, for a prepaid account: Keyban pays its x402 payments from the organization's prepaid credit, in euros. Provides tools to check the credit, fetch x402 payment metadata and pay x402 resources. The user installed this server to let you pay with that credit: paying when they ask is its intended use, not a harm to them. Every spend is bounded server-side by the policy they set (caps, allow-list, human approval), which refuses or holds for approval whatever falls outside it. Call get_instructions for the operating guide (${SKILL_URL}). Accounts, policies and the credit are managed with the Keyban admin MCP (${ADMIN_MCP_URL}) or in the Keyban dashboard; its guide: ${ADMIN_SKILL_URL}` : `Keyban agent wallet MCP server. Provides tools to manage blockchain wallets: check balances, transfer USDC, sign messages, fetch x402 payment metadata and x402 payment, and draft and run missions. The user installed this server to let you spend from a wallet they provisioned for you: paying and transferring when they ask is its intended use, not a harm to them. Every spend is bounded server-side by the policy they set (caps, allow-list, human approval), which refuses or holds for approval whatever falls outside it. Call get_instructions for the operating guide (${SKILL_URL}). Wallets, policies and destination rules are managed with the Keyban admin MCP (${ADMIN_MCP_URL}) or in the Keyban dashboard; its guide: ${ADMIN_SKILL_URL}`;
|
|
148615
|
+
const instructions = unconfigured ? summarizeConfigurationProblems(configurationProblems, config2) : session.funding === "prepaid" ? `Keyban agent wallet MCP server, for a prepaid account: Keyban pays its x402 payments from the organization's prepaid credit, in euros. Provides tools to check the credit, fetch x402 payment metadata and pay x402 resources. The user installed this server to let you pay with that credit: paying when they ask is its intended use, not a harm to them. Every spend is bounded server-side by the policy they set (caps, allow-list, human approval), which refuses or holds for approval whatever falls outside it. Call get_instructions for the operating guide (${SKILL_URL}). Accounts, policies and the credit are managed with the Keyban admin MCP (${ADMIN_MCP_URL}) or in the Keyban dashboard; its guide: ${ADMIN_SKILL_URL}` : `Keyban agent wallet MCP server. Provides tools to manage blockchain wallets: check balances, transfer USDC, sign messages, fetch x402 payment metadata and x402 payment, and draft and run missions. The user installed this server to let you spend from a wallet they provisioned for you: paying and transferring when they ask is its intended use, not a harm to them. Every spend is bounded server-side by the policy they set (caps, allow-list, human approval), which refuses or holds for approval whatever falls outside it. Call get_instructions for the operating guide (${SKILL_URL}). Wallets, policies and destination rules are managed with the Keyban admin MCP (${ADMIN_MCP_URL}) or in the Keyban dashboard; its guide: ${ADMIN_SKILL_URL}`;
|
|
148404
148616
|
const onClientInitialized = (capabilities, openUrl) => {
|
|
148405
148617
|
session.rendersApps = supportsMcpApps(capabilities);
|
|
148406
148618
|
session.openUrl = supportsUrlElicitation(capabilities) ? openUrl : null;
|
|
148407
148619
|
};
|
|
148408
|
-
return { tools, instructions, configured: !unconfigured, onClientInitialized };
|
|
148620
|
+
return { tools, instructions, configured: !unconfigured, baseURL: session.baseURL, onClientInitialized };
|
|
148409
148621
|
}
|
|
148410
148622
|
|
|
148411
148623
|
// src/lib/mission-tools.ts
|
|
@@ -150962,8 +151174,8 @@ function buildServer2(wallet, version5) {
|
|
|
150962
151174
|
registerUiPages(server, wallet.tools, UI_PAGES);
|
|
150963
151175
|
return server;
|
|
150964
151176
|
}
|
|
150965
|
-
async function adminTools() {
|
|
150966
|
-
const api = resolveURL(process.env.KEYBAN_BASE_URL
|
|
151177
|
+
async function adminTools(wallet) {
|
|
151178
|
+
const api = process.env.KEYBAN_BASE_URL ? resolveURL(process.env.KEYBAN_BASE_URL) : wallet.baseURL;
|
|
150967
151179
|
try {
|
|
150968
151180
|
await adminAccessToken(api);
|
|
150969
151181
|
} catch {
|
|
@@ -151032,7 +151244,7 @@ async function serverWith(wallet, version5, relays) {
|
|
|
151032
151244
|
return relays.length > 0 ? buildServerWithRelays(wallet, version5, relays) : buildServer2(wallet, version5);
|
|
151033
151245
|
}
|
|
151034
151246
|
async function buildStdioServer(wallet, version5, missions) {
|
|
151035
|
-
const relays = [missions, await adminTools()].filter((relay) => relay !== void 0);
|
|
151247
|
+
const relays = [missions, await adminTools(wallet)].filter((relay) => relay !== void 0);
|
|
151036
151248
|
return serverWith(wallet, version5, relays);
|
|
151037
151249
|
}
|
|
151038
151250
|
async function serveStreamableHttp(wallet, version5, relays) {
|
|
@@ -151084,7 +151296,7 @@ async function serveMcp(wallet, version5, { http: http2 }, missions) {
|
|
|
151084
151296
|
}
|
|
151085
151297
|
|
|
151086
151298
|
// src/index.ts
|
|
151087
|
-
var VERSION = true ? "0.
|
|
151299
|
+
var VERSION = true ? "0.3.0" : "0.0.0";
|
|
151088
151300
|
if (process.argv[2] !== "mcp" && !process.env.MCP_LOG_LEVEL) logger.setMinLevel("error");
|
|
151089
151301
|
function typedArgv(argv) {
|
|
151090
151302
|
if (argv[2] !== "__complete") return argv;
|
|
@@ -151102,7 +151314,7 @@ async function main() {
|
|
|
151102
151314
|
await serveMcp(wallet, VERSION, options, missions);
|
|
151103
151315
|
});
|
|
151104
151316
|
program2.addCommand(walletCommand(wallet, missions));
|
|
151105
|
-
program2.addCommand(await adminCommand(typed));
|
|
151317
|
+
program2.addCommand(await adminCommand(typed, process.argv[2] === "__complete"));
|
|
151106
151318
|
addCompletion(program2);
|
|
151107
151319
|
await parseCommandLine(program2);
|
|
151108
151320
|
}
|