@crediolabs/policy-builder-mcp 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/schemas.d.ts +2 -0
- package/dist/src/schemas.js +9 -2
- package/dist-cjs/src/schemas.d.ts +2 -0
- package/dist-cjs/src/schemas.js +9 -2
- package/package.json +3 -3
- package/src/schemas.ts +9 -2
package/dist/src/schemas.d.ts
CHANGED
|
@@ -847,6 +847,7 @@ export declare const InstallPolicyToolShape: {
|
|
|
847
847
|
readonly interpreterAddress: z.ZodOptional<z.ZodString>;
|
|
848
848
|
readonly smartAccount: z.ZodOptional<z.ZodString>;
|
|
849
849
|
readonly sourceAccount: z.ZodOptional<z.ZodString>;
|
|
850
|
+
readonly network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
|
|
850
851
|
readonly rpcUrl: z.ZodOptional<z.ZodString>;
|
|
851
852
|
readonly baseFee: z.ZodOptional<z.ZodNumber>;
|
|
852
853
|
};
|
|
@@ -856,6 +857,7 @@ export declare const RevokePolicyToolShape: {
|
|
|
856
857
|
readonly interpreterAddress: z.ZodOptional<z.ZodString>;
|
|
857
858
|
readonly smartAccount: z.ZodOptional<z.ZodString>;
|
|
858
859
|
readonly sourceAccount: z.ZodOptional<z.ZodString>;
|
|
860
|
+
readonly network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
|
|
859
861
|
readonly rpcUrl: z.ZodOptional<z.ZodString>;
|
|
860
862
|
readonly baseFee: z.ZodOptional<z.ZodNumber>;
|
|
861
863
|
};
|
package/dist/src/schemas.js
CHANGED
|
@@ -67,13 +67,20 @@ const PolicyCheckToolShape = {
|
|
|
67
67
|
export const SimulatePolicyToolShape = { ...PolicyCheckToolShape };
|
|
68
68
|
export const VerifyPolicyToolShape = { ...PolicyCheckToolShape };
|
|
69
69
|
/** Common base for `install_policy` and `revoke_policy`: smartAccount,
|
|
70
|
-
* sourceAccount, optional RPC URL, optional base fee. Both
|
|
71
|
-
* same smart-account context, so the SDK-emitted JSON Schema stays
|
|
70
|
+
* sourceAccount, target network, optional RPC URL, optional base fee. Both
|
|
71
|
+
* share the same smart-account context, so the SDK-emitted JSON Schema stays
|
|
72
72
|
* identical for those fields. The body re-validates against the strict
|
|
73
73
|
* schemas in `@crediolabs/policy-synth/run`. */
|
|
74
74
|
const SmartAccountToolShape = {
|
|
75
75
|
smartAccount: z.string().min(1).optional(),
|
|
76
76
|
sourceAccount: z.string().min(1).optional(),
|
|
77
|
+
/** Omitting this from the shape made both tools testnet-ONLY. The input
|
|
78
|
+
* schema defaults `network` to `testnet` and expects a mainnet caller to
|
|
79
|
+
* set it, but a field absent from the tool shape is STRIPPED before the
|
|
80
|
+
* body runs, so an MCP client could not reach the mainnet pin at all. The
|
|
81
|
+
* failure presented as a deliberate testnet pin rather than as a missing
|
|
82
|
+
* parameter, which sent integrators to build the install by hand. */
|
|
83
|
+
network: NetworkSchema.optional(),
|
|
77
84
|
rpcUrl: z.string().url().optional(),
|
|
78
85
|
baseFee: z.number().int().positive().optional(),
|
|
79
86
|
};
|
|
@@ -847,6 +847,7 @@ export declare const InstallPolicyToolShape: {
|
|
|
847
847
|
readonly interpreterAddress: z.ZodOptional<z.ZodString>;
|
|
848
848
|
readonly smartAccount: z.ZodOptional<z.ZodString>;
|
|
849
849
|
readonly sourceAccount: z.ZodOptional<z.ZodString>;
|
|
850
|
+
readonly network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
|
|
850
851
|
readonly rpcUrl: z.ZodOptional<z.ZodString>;
|
|
851
852
|
readonly baseFee: z.ZodOptional<z.ZodNumber>;
|
|
852
853
|
};
|
|
@@ -856,6 +857,7 @@ export declare const RevokePolicyToolShape: {
|
|
|
856
857
|
readonly interpreterAddress: z.ZodOptional<z.ZodString>;
|
|
857
858
|
readonly smartAccount: z.ZodOptional<z.ZodString>;
|
|
858
859
|
readonly sourceAccount: z.ZodOptional<z.ZodString>;
|
|
860
|
+
readonly network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
|
|
859
861
|
readonly rpcUrl: z.ZodOptional<z.ZodString>;
|
|
860
862
|
readonly baseFee: z.ZodOptional<z.ZodNumber>;
|
|
861
863
|
};
|
package/dist-cjs/src/schemas.js
CHANGED
|
@@ -75,13 +75,20 @@ const PolicyCheckToolShape = {
|
|
|
75
75
|
exports.SimulatePolicyToolShape = { ...PolicyCheckToolShape };
|
|
76
76
|
exports.VerifyPolicyToolShape = { ...PolicyCheckToolShape };
|
|
77
77
|
/** Common base for `install_policy` and `revoke_policy`: smartAccount,
|
|
78
|
-
* sourceAccount, optional RPC URL, optional base fee. Both
|
|
79
|
-
* same smart-account context, so the SDK-emitted JSON Schema stays
|
|
78
|
+
* sourceAccount, target network, optional RPC URL, optional base fee. Both
|
|
79
|
+
* share the same smart-account context, so the SDK-emitted JSON Schema stays
|
|
80
80
|
* identical for those fields. The body re-validates against the strict
|
|
81
81
|
* schemas in `@crediolabs/policy-synth/run`. */
|
|
82
82
|
const SmartAccountToolShape = {
|
|
83
83
|
smartAccount: zod_1.z.string().min(1).optional(),
|
|
84
84
|
sourceAccount: zod_1.z.string().min(1).optional(),
|
|
85
|
+
/** Omitting this from the shape made both tools testnet-ONLY. The input
|
|
86
|
+
* schema defaults `network` to `testnet` and expects a mainnet caller to
|
|
87
|
+
* set it, but a field absent from the tool shape is STRIPPED before the
|
|
88
|
+
* body runs, so an MCP client could not reach the mainnet pin at all. The
|
|
89
|
+
* failure presented as a deliberate testnet pin rather than as a missing
|
|
90
|
+
* parameter, which sent integrators to build the install by hand. */
|
|
91
|
+
network: run_1.NetworkSchema.optional(),
|
|
85
92
|
rpcUrl: zod_1.z.string().url().optional(),
|
|
86
93
|
baseFee: zod_1.z.number().int().positive().optional(),
|
|
87
94
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crediolabs/policy-builder-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "MCP server exposing the OZ policy-synth core (record_transaction + synthesize_policy) over stdio and Streamable HTTP transports.",
|
|
6
6
|
"type": "module",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"test": "bun test",
|
|
59
|
-
"build": "tsc -p tsconfig.build.json && tsc -p tsconfig.build.cjs.json && node scripts/write-cjs-package-json.cjs",
|
|
59
|
+
"build": "rm -rf dist dist-cjs && tsc -p tsconfig.build.json && tsc -p tsconfig.build.cjs.json && node scripts/write-cjs-package-json.cjs",
|
|
60
60
|
"build:esm": "tsc -p tsconfig.build.json",
|
|
61
61
|
"build:cjs": "tsc -p tsconfig.build.cjs.json && node scripts/write-cjs-package-json.cjs",
|
|
62
62
|
"prepublishOnly": "bun run build && bun test",
|
|
63
63
|
"prepack": "bun run build"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@crediolabs/policy-synth": "0.3.
|
|
66
|
+
"@crediolabs/policy-synth": "0.3.1",
|
|
67
67
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
68
68
|
"@stellar/stellar-sdk": "14.4.0",
|
|
69
69
|
"zod": "3.25.76"
|
package/src/schemas.ts
CHANGED
|
@@ -106,13 +106,20 @@ export type {
|
|
|
106
106
|
} from '@crediolabs/policy-synth/run'
|
|
107
107
|
|
|
108
108
|
/** Common base for `install_policy` and `revoke_policy`: smartAccount,
|
|
109
|
-
* sourceAccount, optional RPC URL, optional base fee. Both
|
|
110
|
-
* same smart-account context, so the SDK-emitted JSON Schema stays
|
|
109
|
+
* sourceAccount, target network, optional RPC URL, optional base fee. Both
|
|
110
|
+
* share the same smart-account context, so the SDK-emitted JSON Schema stays
|
|
111
111
|
* identical for those fields. The body re-validates against the strict
|
|
112
112
|
* schemas in `@crediolabs/policy-synth/run`. */
|
|
113
113
|
const SmartAccountToolShape = {
|
|
114
114
|
smartAccount: z.string().min(1).optional(),
|
|
115
115
|
sourceAccount: z.string().min(1).optional(),
|
|
116
|
+
/** Omitting this from the shape made both tools testnet-ONLY. The input
|
|
117
|
+
* schema defaults `network` to `testnet` and expects a mainnet caller to
|
|
118
|
+
* set it, but a field absent from the tool shape is STRIPPED before the
|
|
119
|
+
* body runs, so an MCP client could not reach the mainnet pin at all. The
|
|
120
|
+
* failure presented as a deliberate testnet pin rather than as a missing
|
|
121
|
+
* parameter, which sent integrators to build the install by hand. */
|
|
122
|
+
network: NetworkSchema.optional(),
|
|
116
123
|
rpcUrl: z.string().url().optional(),
|
|
117
124
|
baseFee: z.number().int().positive().optional(),
|
|
118
125
|
}
|