@crediolabs/policy-builder-mcp 0.5.5 → 1.0.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.
@@ -845,6 +845,19 @@ export declare const DeclarePolicyToolShape: {
845
845
  readonly contract: z.ZodOptional<z.ZodString>;
846
846
  readonly maxAmount: z.ZodOptional<z.ZodString>;
847
847
  readonly amountArgIndex: z.ZodOptional<z.ZodNumber>;
848
+ readonly amountPath: z.ZodOptional<z.ZodObject<{
849
+ argIndex: z.ZodNumber;
850
+ field: z.ZodString;
851
+ elements: z.ZodOptional<z.ZodNumber>;
852
+ }, "strip", z.ZodTypeAny, {
853
+ argIndex: number;
854
+ field: string;
855
+ elements?: number | undefined;
856
+ }, {
857
+ argIndex: number;
858
+ field: string;
859
+ elements?: number | undefined;
860
+ }>>;
848
861
  readonly recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
849
862
  readonly recipientArgIndex: z.ZodOptional<z.ZodNumber>;
850
863
  readonly allowZeroCap: z.ZodOptional<z.ZodBoolean>;
@@ -95,6 +95,13 @@ export const DeclarePolicyToolShape = {
95
95
  contract: z.string().optional(),
96
96
  maxAmount: z.string().optional(),
97
97
  amountArgIndex: z.number().int().nonnegative().optional(),
98
+ amountPath: z
99
+ .object({
100
+ argIndex: z.number().int().nonnegative(),
101
+ field: z.string().min(1),
102
+ elements: z.number().int().min(1).optional(),
103
+ })
104
+ .optional(),
98
105
  recipients: z.array(z.string()).optional(),
99
106
  recipientArgIndex: z.number().int().nonnegative().optional(),
100
107
  allowZeroCap: z.boolean().optional(),
@@ -22,7 +22,7 @@ const toCallToolResult = (res) => mcpResultFromCore(res);
22
22
  /** Build a fresh, stateless MCP server. The caller owns the returned object
23
23
  * and connects it to a single transport (stdio or Streamable HTTP). */
24
24
  export function createMcpServer() {
25
- const server = new McpServer({ name: 'policy-builder-mcp', version: '0.0.0' }, { capabilities: { tools: {} } });
25
+ const server = new McpServer({ name: 'policy-builder-mcp', version: '1.0.0' }, { capabilities: { tools: {} } });
26
26
  registerTools(server);
27
27
  return server;
28
28
  }
@@ -845,6 +845,19 @@ export declare const DeclarePolicyToolShape: {
845
845
  readonly contract: z.ZodOptional<z.ZodString>;
846
846
  readonly maxAmount: z.ZodOptional<z.ZodString>;
847
847
  readonly amountArgIndex: z.ZodOptional<z.ZodNumber>;
848
+ readonly amountPath: z.ZodOptional<z.ZodObject<{
849
+ argIndex: z.ZodNumber;
850
+ field: z.ZodString;
851
+ elements: z.ZodOptional<z.ZodNumber>;
852
+ }, "strip", z.ZodTypeAny, {
853
+ argIndex: number;
854
+ field: string;
855
+ elements?: number | undefined;
856
+ }, {
857
+ argIndex: number;
858
+ field: string;
859
+ elements?: number | undefined;
860
+ }>>;
848
861
  readonly recipients: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
849
862
  readonly recipientArgIndex: z.ZodOptional<z.ZodNumber>;
850
863
  readonly allowZeroCap: z.ZodOptional<z.ZodBoolean>;
@@ -103,6 +103,13 @@ exports.DeclarePolicyToolShape = {
103
103
  contract: zod_1.z.string().optional(),
104
104
  maxAmount: zod_1.z.string().optional(),
105
105
  amountArgIndex: zod_1.z.number().int().nonnegative().optional(),
106
+ amountPath: zod_1.z
107
+ .object({
108
+ argIndex: zod_1.z.number().int().nonnegative(),
109
+ field: zod_1.z.string().min(1),
110
+ elements: zod_1.z.number().int().min(1).optional(),
111
+ })
112
+ .optional(),
106
113
  recipients: zod_1.z.array(zod_1.z.string()).optional(),
107
114
  recipientArgIndex: zod_1.z.number().int().nonnegative().optional(),
108
115
  allowZeroCap: zod_1.z.boolean().optional(),
@@ -26,7 +26,7 @@ const toCallToolResult = (res) => (0, result_ts_1.mcpResultFromCore)(res);
26
26
  /** Build a fresh, stateless MCP server. The caller owns the returned object
27
27
  * and connects it to a single transport (stdio or Streamable HTTP). */
28
28
  function createMcpServer() {
29
- const server = new mcp_js_1.McpServer({ name: 'policy-builder-mcp', version: '0.0.0' }, { capabilities: { tools: {} } });
29
+ const server = new mcp_js_1.McpServer({ name: 'policy-builder-mcp', version: '1.0.0' }, { capabilities: { tools: {} } });
30
30
  registerTools(server);
31
31
  return server;
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crediolabs/policy-builder-mcp",
3
- "version": "0.5.5",
3
+ "version": "1.0.0",
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",
@@ -63,7 +63,7 @@
63
63
  "prepack": "bun run build"
64
64
  },
65
65
  "dependencies": {
66
- "@crediolabs/policy-synth": "0.5.4",
66
+ "@crediolabs/policy-synth": "1.0.0",
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
@@ -135,6 +135,13 @@ export const DeclarePolicyToolShape = {
135
135
  contract: z.string().optional(),
136
136
  maxAmount: z.string().optional(),
137
137
  amountArgIndex: z.number().int().nonnegative().optional(),
138
+ amountPath: z
139
+ .object({
140
+ argIndex: z.number().int().nonnegative(),
141
+ field: z.string().min(1),
142
+ elements: z.number().int().min(1).optional(),
143
+ })
144
+ .optional(),
138
145
  recipients: z.array(z.string()).optional(),
139
146
  recipientArgIndex: z.number().int().nonnegative().optional(),
140
147
  allowZeroCap: z.boolean().optional(),
package/src/server.ts CHANGED
@@ -48,7 +48,7 @@ const toCallToolResult = <T>(
48
48
  * and connects it to a single transport (stdio or Streamable HTTP). */
49
49
  export function createMcpServer(): McpServer {
50
50
  const server = new McpServer(
51
- { name: 'policy-builder-mcp', version: '0.0.0' },
51
+ { name: 'policy-builder-mcp', version: '1.0.0' },
52
52
  { capabilities: { tools: {} } }
53
53
  )
54
54
  registerTools(server)