@suigar/mcp 0.1.0 → 0.2.0-beta.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/LICENSE +201 -0
  3. package/README.md +79 -110
  4. package/dist/app/index.html +181 -0
  5. package/dist/bin.mjs +3 -7
  6. package/dist/bin.mjs.map +1 -0
  7. package/dist/client.d.mts +41 -11
  8. package/dist/client.d.mts.map +1 -0
  9. package/dist/client.mjs +107 -34
  10. package/dist/client.mjs.map +1 -0
  11. package/dist/dry-run.mjs +163 -0
  12. package/dist/dry-run.mjs.map +1 -0
  13. package/dist/format.mjs +24 -0
  14. package/dist/format.mjs.map +1 -0
  15. package/dist/index.d.mts +5 -9
  16. package/dist/index.mjs +4 -8
  17. package/dist/schemas.d.mts +642 -0
  18. package/dist/schemas.d.mts.map +1 -0
  19. package/dist/schemas.mjs +113 -0
  20. package/dist/schemas.mjs.map +1 -0
  21. package/dist/server.d.mts +21 -69
  22. package/dist/server.d.mts.map +1 -0
  23. package/dist/server.mjs +172 -411
  24. package/dist/server.mjs.map +1 -0
  25. package/dist/tools.d.mts +14 -155
  26. package/dist/tools.d.mts.map +1 -0
  27. package/dist/tools.mjs +297 -553
  28. package/dist/tools.mjs.map +1 -0
  29. package/dist/types.d.mts +109 -83
  30. package/dist/types.d.mts.map +1 -0
  31. package/package.json +83 -61
  32. package/dist/bin.cjs +0 -11
  33. package/dist/bin.d.cts +0 -1
  34. package/dist/client.cjs +0 -46
  35. package/dist/client.d.cts +0 -17
  36. package/dist/coin.cjs +0 -86
  37. package/dist/coin.d.cts +0 -35
  38. package/dist/coin.d.mts +0 -35
  39. package/dist/coin.mjs +0 -86
  40. package/dist/config.cjs +0 -183
  41. package/dist/config.d.cts +0 -15
  42. package/dist/config.d.mts +0 -15
  43. package/dist/config.mjs +0 -174
  44. package/dist/index.cjs +0 -53
  45. package/dist/index.d.cts +0 -10
  46. package/dist/mcp-support.cjs +0 -62
  47. package/dist/mcp-support.d.cts +0 -16
  48. package/dist/mcp-support.d.mts +0 -16
  49. package/dist/mcp-support.mjs +0 -60
  50. package/dist/metadata.cjs +0 -51
  51. package/dist/metadata.d.cts +0 -52
  52. package/dist/metadata.d.mts +0 -52
  53. package/dist/metadata.mjs +0 -47
  54. package/dist/server.cjs +0 -433
  55. package/dist/server.d.cts +0 -73
  56. package/dist/tools.cjs +0 -617
  57. package/dist/tools.d.cts +0 -158
  58. package/dist/transactions.cjs +0 -294
  59. package/dist/transactions.d.cts +0 -40
  60. package/dist/transactions.d.mts +0 -40
  61. package/dist/transactions.mjs +0 -286
  62. package/dist/types.d.cts +0 -111
  63. package/node_modules/@suigar/currency-registry/dist/index.cjs +0 -121
  64. package/node_modules/@suigar/currency-registry/dist/index.d.cts +0 -50
  65. package/node_modules/@suigar/currency-registry/dist/index.d.mts +0 -50
  66. package/node_modules/@suigar/currency-registry/dist/index.mjs +0 -110
  67. package/node_modules/@suigar/currency-registry/package.json +0 -31
  68. package/node_modules/@suigar/game-registry/dist/index.cjs +0 -310
  69. package/node_modules/@suigar/game-registry/dist/index.d.cts +0 -65
  70. package/node_modules/@suigar/game-registry/dist/index.d.mts +0 -65
  71. package/node_modules/@suigar/game-registry/dist/index.mjs +0 -292
  72. package/node_modules/@suigar/game-registry/package.json +0 -31
  73. package/node_modules/@suigar/sui-rpc-pool/dist/index.cjs +0 -45590
  74. package/node_modules/@suigar/sui-rpc-pool/dist/index.d.cts +0 -465
  75. package/node_modules/@suigar/sui-rpc-pool/dist/index.d.mts +0 -465
  76. package/node_modules/@suigar/sui-rpc-pool/dist/index.mjs +0 -45570
  77. package/node_modules/@suigar/sui-rpc-pool/package.json +0 -31
@@ -0,0 +1,113 @@
1
+ import { z } from "zod/v4";
2
+ import { SUPPORTED_SUI_NETWORKS } from "@suigar/sdk";
3
+ import { GAMES } from "@suigar/sdk/games";
4
+ //#region src/schemas.ts
5
+ const builderModes = [
6
+ "build",
7
+ "dry-run",
8
+ "read-only"
9
+ ];
10
+ const addressDescription = "Sui address or SuiNS name such as 0xabc..., name.sui, or sub.name.sui; required for build and dry-run modes.";
11
+ const coinTypeDescription = "Move coin type such as 0x2::sui::SUI. Defaults to the SDK-configured SUI coin type.";
12
+ const currencyAmountDescription = "Currency amount in the chosen coin, converted to base units using the configured coin decimals.";
13
+ const currencyAmountSchema = z.union([z.number().nonnegative(), z.string().regex(/^(?:\d+|\d+\.\d+|\.\d+)$/u)]);
14
+ const coinMetadataSchema = z.object({
15
+ coinType: z.string().min(1).optional(),
16
+ decimals: z.number().int().nonnegative().optional()
17
+ }).strict();
18
+ const configOverridesSchema = z.object({
19
+ packageIds: z.object({
20
+ sweetHouse: z.string().min(1).optional(),
21
+ core: z.string().min(1).optional(),
22
+ coinflip: z.string().min(1).optional(),
23
+ limbo: z.string().min(1).optional(),
24
+ plinko: z.string().min(1).optional(),
25
+ pvpCoinflip: z.string().min(1).optional(),
26
+ range: z.string().min(1).optional(),
27
+ wheel: z.string().min(1).optional()
28
+ }).strict().optional(),
29
+ registryIds: z.object({ pvpCoinflip: z.string().min(1).optional() }).strict().optional(),
30
+ coins: z.object({
31
+ sui: coinMetadataSchema.optional(),
32
+ usdc: coinMetadataSchema.optional()
33
+ }).strict().optional(),
34
+ priceInfoObjectIds: z.object({
35
+ sui: z.string().min(1).optional(),
36
+ usdc: z.string().min(1).optional()
37
+ }).strict().optional()
38
+ }).strict();
39
+ const configInputSchema = z.object({
40
+ network: z.enum(SUPPORTED_SUI_NETWORKS).default("testnet").describe("Sui network. Only mainnet and testnet are supported."),
41
+ providerUrl: z.string().url().optional().describe("Optional Sui gRPC endpoint URL."),
42
+ config: configOverridesSchema.optional().describe("SDK-style SuigarConfigOverrides."),
43
+ partner: z.string().min(1).optional().describe("Partner wallet address injected through the SDK extension.")
44
+ }).strict();
45
+ const readConfigInputSchema = configInputSchema;
46
+ const readGameMetadataInputSchema = configInputSchema.extend({
47
+ game: z.enum(GAMES).optional().describe("Optional Suigar game id to inspect."),
48
+ coinType: z.string().min(1).optional().describe(coinTypeDescription)
49
+ }).strict();
50
+ const metadataSchema = z.record(z.string(), z.union([
51
+ z.string(),
52
+ z.number(),
53
+ z.boolean()
54
+ ]));
55
+ const commonBuildInputSchema = configInputSchema.extend({
56
+ mode: z.enum(builderModes).default("build").describe("Build, dry-run, or return a read-only plan."),
57
+ owner: z.string().min(1).optional().describe(addressDescription),
58
+ coinType: z.string().min(1).optional().describe(coinTypeDescription),
59
+ metadata: metadataSchema.optional().describe("Metadata values encoded by @suigar/sdk."),
60
+ gasBudget: z.number().int().positive().optional().describe("Optional gas budget in MIST."),
61
+ useGasCoin: z.boolean().optional().describe("Allow the SUI gas coin to be used for native SUI bet coins.")
62
+ }).strict();
63
+ const stakeBuildInputSchema = commonBuildInputSchema.extend({
64
+ stake: currencyAmountSchema.optional().describe(`Logical wager. ${currencyAmountDescription}`),
65
+ cashStake: currencyAmountSchema.optional().describe(`Optional withdrawn amount. ${currencyAmountDescription}`),
66
+ betCount: z.union([z.number().int().positive(), z.string().regex(/^[1-9]\d*$/u)]).optional().describe("Optional bet count.")
67
+ }).strict();
68
+ const coinflipInputSchema = stakeBuildInputSchema.extend({ side: z.enum(["heads", "tails"]).optional().describe("Selected coinflip side.") }).strict();
69
+ const limboInputSchema = stakeBuildInputSchema.extend({ targetMultiplier: z.number().positive().optional().describe("Target multiplier.") }).strict();
70
+ const configIdInputSchema = stakeBuildInputSchema.extend({ configId: z.number().int().min(0).max(255).optional().describe("On-chain game config id.") }).strict();
71
+ const rangeInputSchema = stakeBuildInputSchema.extend({
72
+ leftPoint: z.number().optional().describe("Left range point."),
73
+ rightPoint: z.number().optional().describe("Right range point."),
74
+ outOfRange: z.boolean().optional().describe("Whether the bet targets outside the selected range.")
75
+ }).strict();
76
+ const pvpCoinflipCreateInputSchema = commonBuildInputSchema.extend({
77
+ stake: currencyAmountSchema.optional().describe(`Stake per player. ${currencyAmountDescription}`),
78
+ creatorSide: z.enum(["heads", "tails"]).optional().describe("Creator side."),
79
+ isPrivate: z.boolean().optional().describe("Whether the PvP lobby is private.")
80
+ }).strict();
81
+ const pvpCoinflipJoinInputSchema = commonBuildInputSchema.extend({
82
+ gameId: z.string().min(1).optional().describe("PvP coinflip game object id."),
83
+ coinType: z.string().min(1).optional().describe(coinTypeDescription)
84
+ }).strict();
85
+ const pvpCoinflipCancelInputSchema = commonBuildInputSchema.extend({
86
+ gameId: z.string().min(1).optional().describe("PvP coinflip game object id."),
87
+ coinType: z.string().min(1).optional().describe(coinTypeDescription)
88
+ }).strict();
89
+ const unknownJsonSchema = z.lazy(() => z.union([
90
+ z.string(),
91
+ z.number(),
92
+ z.boolean(),
93
+ z.null(),
94
+ z.array(unknownJsonSchema),
95
+ z.record(z.string(), unknownJsonSchema)
96
+ ]));
97
+ const toolOutputSchema = z.object({
98
+ mode: z.enum(builderModes).optional(),
99
+ network: z.enum(SUPPORTED_SUI_NETWORKS).optional(),
100
+ config: unknownJsonSchema.optional(),
101
+ game: unknownJsonSchema.optional(),
102
+ action: z.string().optional(),
103
+ plan: unknownJsonSchema.optional(),
104
+ summary: unknownJsonSchema.optional(),
105
+ transactionBytesBase64: z.string().optional(),
106
+ dryRun: unknownJsonSchema.optional(),
107
+ dryRunSummary: unknownJsonSchema.optional(),
108
+ errors: z.array(z.string()).optional()
109
+ }).loose();
110
+ //#endregion
111
+ export { builderModes, coinflipInputSchema, commonBuildInputSchema, configIdInputSchema, configInputSchema, configOverridesSchema, limboInputSchema, metadataSchema, pvpCoinflipCancelInputSchema, pvpCoinflipCreateInputSchema, pvpCoinflipJoinInputSchema, rangeInputSchema, readConfigInputSchema, readGameMetadataInputSchema, stakeBuildInputSchema, toolOutputSchema };
112
+
113
+ //# sourceMappingURL=schemas.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.mjs","names":[],"sources":["../src/schemas.ts"],"sourcesContent":["// Copyright (c) Suigar\n// SPDX-License-Identifier: Apache-2.0\n\nimport { z } from 'zod/v4';\nimport { SUPPORTED_SUI_NETWORKS } from '@suigar/sdk';\nimport { GAMES } from '@suigar/sdk/games';\n\nexport const builderModes = ['build', 'dry-run', 'read-only'] as const;\n\nconst addressDescription =\n\t'Sui address or SuiNS name such as 0xabc..., name.sui, or sub.name.sui; required for build and dry-run modes.';\nconst coinTypeDescription =\n\t'Move coin type such as 0x2::sui::SUI. Defaults to the SDK-configured SUI coin type.';\nconst currencyAmountDescription =\n\t'Currency amount in the chosen coin, converted to base units using the configured coin decimals.';\nconst currencyAmountSchema = z.union([\n\tz.number().nonnegative(),\n\tz.string().regex(/^(?:\\d+|\\d+\\.\\d+|\\.\\d+)$/u),\n]);\n\nconst coinMetadataSchema = z\n\t.object({\n\t\tcoinType: z.string().min(1).optional(),\n\t\tdecimals: z.number().int().nonnegative().optional(),\n\t})\n\t.strict();\n\nexport const configOverridesSchema = z\n\t.object({\n\t\tpackageIds: z\n\t\t\t.object({\n\t\t\t\tsweetHouse: z.string().min(1).optional(),\n\t\t\t\tcore: z.string().min(1).optional(),\n\t\t\t\tcoinflip: z.string().min(1).optional(),\n\t\t\t\tlimbo: z.string().min(1).optional(),\n\t\t\t\tplinko: z.string().min(1).optional(),\n\t\t\t\tpvpCoinflip: z.string().min(1).optional(),\n\t\t\t\trange: z.string().min(1).optional(),\n\t\t\t\twheel: z.string().min(1).optional(),\n\t\t\t})\n\t\t\t.strict()\n\t\t\t.optional(),\n\t\tregistryIds: z\n\t\t\t.object({\n\t\t\t\tpvpCoinflip: z.string().min(1).optional(),\n\t\t\t})\n\t\t\t.strict()\n\t\t\t.optional(),\n\t\tcoins: z\n\t\t\t.object({\n\t\t\t\tsui: coinMetadataSchema.optional(),\n\t\t\t\tusdc: coinMetadataSchema.optional(),\n\t\t\t})\n\t\t\t.strict()\n\t\t\t.optional(),\n\t\tpriceInfoObjectIds: z\n\t\t\t.object({\n\t\t\t\tsui: z.string().min(1).optional(),\n\t\t\t\tusdc: z.string().min(1).optional(),\n\t\t\t})\n\t\t\t.strict()\n\t\t\t.optional(),\n\t})\n\t.strict();\n\nexport const configInputSchema = z\n\t.object({\n\t\tnetwork: z\n\t\t\t.enum(SUPPORTED_SUI_NETWORKS)\n\t\t\t.default('testnet')\n\t\t\t.describe('Sui network. Only mainnet and testnet are supported.'),\n\t\tproviderUrl: z\n\t\t\t.string()\n\t\t\t.url()\n\t\t\t.optional()\n\t\t\t.describe('Optional Sui gRPC endpoint URL.'),\n\t\tconfig: configOverridesSchema\n\t\t\t.optional()\n\t\t\t.describe('SDK-style SuigarConfigOverrides.'),\n\t\tpartner: z\n\t\t\t.string()\n\t\t\t.min(1)\n\t\t\t.optional()\n\t\t\t.describe('Partner wallet address injected through the SDK extension.'),\n\t})\n\t.strict();\n\nexport const readConfigInputSchema = configInputSchema;\n\nexport const readGameMetadataInputSchema = configInputSchema\n\t.extend({\n\t\tgame: z\n\t\t\t.enum(GAMES)\n\t\t\t.optional()\n\t\t\t.describe('Optional Suigar game id to inspect.'),\n\t\tcoinType: z.string().min(1).optional().describe(coinTypeDescription),\n\t})\n\t.strict();\n\nexport const metadataSchema = z.record(\n\tz.string(),\n\tz.union([z.string(), z.number(), z.boolean()]),\n);\n\nexport const commonBuildInputSchema = configInputSchema\n\t.extend({\n\t\tmode: z\n\t\t\t.enum(builderModes)\n\t\t\t.default('build')\n\t\t\t.describe('Build, dry-run, or return a read-only plan.'),\n\t\towner: z.string().min(1).optional().describe(addressDescription),\n\t\tcoinType: z.string().min(1).optional().describe(coinTypeDescription),\n\t\tmetadata: metadataSchema\n\t\t\t.optional()\n\t\t\t.describe('Metadata values encoded by @suigar/sdk.'),\n\t\tgasBudget: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.positive()\n\t\t\t.optional()\n\t\t\t.describe('Optional gas budget in MIST.'),\n\t\tuseGasCoin: z\n\t\t\t.boolean()\n\t\t\t.optional()\n\t\t\t.describe('Allow the SUI gas coin to be used for native SUI bet coins.'),\n\t})\n\t.strict();\n\nexport const stakeBuildInputSchema = commonBuildInputSchema\n\t.extend({\n\t\tstake: currencyAmountSchema\n\t\t\t.optional()\n\t\t\t.describe(`Logical wager. ${currencyAmountDescription}`),\n\t\tcashStake: currencyAmountSchema\n\t\t\t.optional()\n\t\t\t.describe(`Optional withdrawn amount. ${currencyAmountDescription}`),\n\t\tbetCount: z\n\t\t\t.union([z.number().int().positive(), z.string().regex(/^[1-9]\\d*$/u)])\n\t\t\t.optional()\n\t\t\t.describe('Optional bet count.'),\n\t})\n\t.strict();\n\nexport const coinflipInputSchema = stakeBuildInputSchema\n\t.extend({\n\t\tside: z\n\t\t\t.enum(['heads', 'tails'])\n\t\t\t.optional()\n\t\t\t.describe('Selected coinflip side.'),\n\t})\n\t.strict();\n\nexport const limboInputSchema = stakeBuildInputSchema\n\t.extend({\n\t\ttargetMultiplier: z\n\t\t\t.number()\n\t\t\t.positive()\n\t\t\t.optional()\n\t\t\t.describe('Target multiplier.'),\n\t})\n\t.strict();\n\nexport const configIdInputSchema = stakeBuildInputSchema\n\t.extend({\n\t\tconfigId: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.min(0)\n\t\t\t.max(255)\n\t\t\t.optional()\n\t\t\t.describe('On-chain game config id.'),\n\t})\n\t.strict();\n\nexport const rangeInputSchema = stakeBuildInputSchema\n\t.extend({\n\t\tleftPoint: z.number().optional().describe('Left range point.'),\n\t\trightPoint: z.number().optional().describe('Right range point.'),\n\t\toutOfRange: z\n\t\t\t.boolean()\n\t\t\t.optional()\n\t\t\t.describe('Whether the bet targets outside the selected range.'),\n\t})\n\t.strict();\n\nexport const pvpCoinflipCreateInputSchema = commonBuildInputSchema\n\t.extend({\n\t\tstake: currencyAmountSchema\n\t\t\t.optional()\n\t\t\t.describe(`Stake per player. ${currencyAmountDescription}`),\n\t\tcreatorSide: z\n\t\t\t.enum(['heads', 'tails'])\n\t\t\t.optional()\n\t\t\t.describe('Creator side.'),\n\t\tisPrivate: z\n\t\t\t.boolean()\n\t\t\t.optional()\n\t\t\t.describe('Whether the PvP lobby is private.'),\n\t})\n\t.strict();\n\nexport const pvpCoinflipJoinInputSchema = commonBuildInputSchema\n\t.extend({\n\t\tgameId: z\n\t\t\t.string()\n\t\t\t.min(1)\n\t\t\t.optional()\n\t\t\t.describe('PvP coinflip game object id.'),\n\t\tcoinType: z.string().min(1).optional().describe(coinTypeDescription),\n\t})\n\t.strict();\n\nexport const pvpCoinflipCancelInputSchema = commonBuildInputSchema\n\t.extend({\n\t\tgameId: z\n\t\t\t.string()\n\t\t\t.min(1)\n\t\t\t.optional()\n\t\t\t.describe('PvP coinflip game object id.'),\n\t\tcoinType: z.string().min(1).optional().describe(coinTypeDescription),\n\t})\n\t.strict();\n\nconst unknownJsonSchema: z.ZodType<unknown> = z.lazy(() =>\n\tz.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean(),\n\t\tz.null(),\n\t\tz.array(unknownJsonSchema),\n\t\tz.record(z.string(), unknownJsonSchema),\n\t]),\n);\n\nexport const toolOutputSchema = z\n\t.object({\n\t\tmode: z.enum(builderModes).optional(),\n\t\tnetwork: z.enum(SUPPORTED_SUI_NETWORKS).optional(),\n\t\tconfig: unknownJsonSchema.optional(),\n\t\tgame: unknownJsonSchema.optional(),\n\t\taction: z.string().optional(),\n\t\tplan: unknownJsonSchema.optional(),\n\t\tsummary: unknownJsonSchema.optional(),\n\t\ttransactionBytesBase64: z.string().optional(),\n\t\tdryRun: unknownJsonSchema.optional(),\n\t\tdryRunSummary: unknownJsonSchema.optional(),\n\t\terrors: z.array(z.string()).optional(),\n\t})\n\t.loose();\n\nexport type ReadConfigInput = z.input<typeof readConfigInputSchema>;\nexport type ReadGameMetadataInput = z.input<typeof readGameMetadataInputSchema>;\nexport type CommonBuildInput = z.input<typeof commonBuildInputSchema>;\nexport type CoinflipInput = z.input<typeof coinflipInputSchema>;\nexport type LimboInput = z.input<typeof limboInputSchema>;\nexport type ConfigIdInput = z.input<typeof configIdInputSchema>;\nexport type RangeInput = z.input<typeof rangeInputSchema>;\nexport type PvpCoinflipCreateInput = z.input<\n\ttypeof pvpCoinflipCreateInputSchema\n>;\nexport type PvpCoinflipJoinInput = z.input<typeof pvpCoinflipJoinInputSchema>;\nexport type PvpCoinflipCancelInput = z.input<\n\ttypeof pvpCoinflipCancelInputSchema\n>;\n"],"mappings":";;;;AAOA,MAAa,eAAe;CAAC;CAAS;CAAW;AAAW;AAE5D,MAAM,qBACL;AACD,MAAM,sBACL;AACD,MAAM,4BACL;AACD,MAAM,uBAAuB,EAAE,MAAM,CACpC,EAAE,OAAO,CAAC,CAAC,YAAY,GACvB,EAAE,OAAO,CAAC,CAAC,MAAM,2BAA2B,CAC7C,CAAC;AAED,MAAM,qBAAqB,EACzB,OAAO;CACP,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CACrC,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS;AACnD,CAAC,CAAC,CACD,OAAO;AAET,MAAa,wBAAwB,EACnC,OAAO;CACP,YAAY,EACV,OAAO;EACP,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EACvC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EACjC,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EACrC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EAClC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EACnC,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EACxC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EAClC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CACnC,CAAC,CAAC,C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,EAAE,MAAM;CACP,EAAE,OAAO;CACT,EAAE,OAAO;CACT,EAAE,QAAQ;CACV,EAAE,KAAK;CACP,EAAE,MAAM,iBAAiB;CACzB,EAAE,OAAO,EAAE,OAAO,GAAG,iBAAiB;AACvC,CAAC,CACF;AAEA,MAAa,mBAAmB,EAC9B,OAAO;CACP,MAAM,EAAE,KAAK,YAAY,CAAC,CAAC,SAAS;CACpC,SAAS,EAAE,KAAK,sBAAsB,CAAC,CAAC,SAAS;CACjD,QAAQ,kBAAkB,SAAS;CACnC,MAAM,kBAAkB,SAAS;CACjC,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,MAAM,kBAAkB,SAAS;CACjC,SAAS,kBAAkB,SAAS;CACpC,wBAAwB,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5C,QAAQ,kBAAkB,SAAS;CACnC,eAAe,kBAAkB,SAAS;CAC1C,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;AACtC,CAAC,CAAC,CACD,MAAM"}
package/dist/server.d.mts CHANGED
@@ -1,73 +1,25 @@
1
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
 
3
3
  //#region src/server.d.ts
4
- declare const createSuigarMcpServer: () => Server<{
5
- method: string;
6
- params?: {
7
- [x: string]: unknown;
8
- _meta?: {
9
- [x: string]: unknown;
10
- progressToken?: string | number | undefined;
11
- "io.modelcontextprotocol/related-task"?: {
12
- taskId: string;
13
- } | undefined;
14
- } | undefined;
15
- } | undefined;
16
- }, {
17
- method: string;
18
- params?: {
19
- [x: string]: unknown;
20
- _meta?: {
21
- [x: string]: unknown;
22
- progressToken?: string | number | undefined;
23
- "io.modelcontextprotocol/related-task"?: {
24
- taskId: string;
25
- } | undefined;
26
- } | undefined;
27
- } | undefined;
28
- }, {
29
- [x: string]: unknown;
30
- _meta?: {
31
- [x: string]: unknown;
32
- progressToken?: string | number | undefined;
33
- "io.modelcontextprotocol/related-task"?: {
34
- taskId: string;
35
- } | undefined;
36
- } | undefined;
4
+ declare const SUIGAR_MCP_APP_RESOURCE_URI = "ui://suigar/transaction-inspector.html";
5
+ declare const readSuigarMcpAppHtml: () => Promise<any>;
6
+ declare const createSuigarMcpAppResourceResult: () => Promise<{
7
+ contents: {
8
+ uri: string;
9
+ mimeType: string;
10
+ text: any;
11
+ _meta: {
12
+ ui: {
13
+ csp: {
14
+ connectDomains: never[];
15
+ resourceDomains: never[];
16
+ };
17
+ };
18
+ };
19
+ }[];
37
20
  }>;
38
- declare const startSuigarMcpServer: () => Promise<Server<{
39
- method: string;
40
- params?: {
41
- [x: string]: unknown;
42
- _meta?: {
43
- [x: string]: unknown;
44
- progressToken?: string | number | undefined;
45
- "io.modelcontextprotocol/related-task"?: {
46
- taskId: string;
47
- } | undefined;
48
- } | undefined;
49
- } | undefined;
50
- }, {
51
- method: string;
52
- params?: {
53
- [x: string]: unknown;
54
- _meta?: {
55
- [x: string]: unknown;
56
- progressToken?: string | number | undefined;
57
- "io.modelcontextprotocol/related-task"?: {
58
- taskId: string;
59
- } | undefined;
60
- } | undefined;
61
- } | undefined;
62
- }, {
63
- [x: string]: unknown;
64
- _meta?: {
65
- [x: string]: unknown;
66
- progressToken?: string | number | undefined;
67
- "io.modelcontextprotocol/related-task"?: {
68
- taskId: string;
69
- } | undefined;
70
- } | undefined;
71
- }>>;
21
+ declare const createSuigarMcpServer: () => McpServer;
22
+ declare const startSuigarMcpServer: () => Promise<void>;
72
23
  //#endregion
73
- export { createSuigarMcpServer, startSuigarMcpServer };
24
+ export { SUIGAR_MCP_APP_RESOURCE_URI, createSuigarMcpAppResourceResult, createSuigarMcpServer, readSuigarMcpAppHtml, startSuigarMcpServer };
25
+ //# sourceMappingURL=server.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.mts","names":[],"sources":["../src/server.ts"],"mappings":";;;cAsCa,2BAAA;AAAA,cA6CA,oBAAA,QAAoB,OAAA;AAAA,cAapB,gCAAA,QAAgC,OAAA;;;;;;;;;;;;;;;cAkBhC,qBAAA,QAAqB,SA8NjC;AAAA,cAEY,oBAAA,QAAoB,OAAA"}