@metorial-services/shuttle-client 1.0.4 → 1.0.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../src/controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAG7E,eAAO,IAAI,mBAAmB,GAAI,GAAG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmC,CAAC"}
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../../src/controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE3E,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAErD,eAAO,IAAI,mBAAmB,GAAI,GAAG,UAAU,KAAG,aAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/live.ts","../src/controller.ts"],"sourcesContent":["import { IsomorphicWs } from '@metorial/util-websocket';\nimport type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';\nimport type { ConnectionMessage } from '../../../service/src/mcp/utils/messenger';\n\nexport let createLiveConnectionClient = (opts: { endpoint: string }) => ({\n connect: (d: {\n tenantId: string;\n connectionId: string;\n onOpen?: () => void;\n onMessage?: (msg: ConnectionMessage) => void;\n onClose?: () => void;\n }) => {\n let ws = new IsomorphicWs(\n `${opts.endpoint}/${d.tenantId}/connection/${d.connectionId}/live`\n );\n\n ws.on('open', () => {\n d.onOpen?.();\n });\n\n ws.on('message', (data: string) => {\n let msg: any = JSON.parse(data);\n d.onMessage?.({\n type: msg.type,\n data: msg.data\n });\n });\n\n ws.on('close', () => {\n d.onClose?.();\n });\n\n return {\n sendMcpMessage: async (msg: JSONRPCMessage) => {\n await ws.send(\n JSON.stringify({\n type: 'mcp.message',\n data: msg\n })\n );\n },\n close: async () => {\n ws.close();\n }\n };\n }\n});\n","import { createClient } from '@lowerdeck/rpc-client';\nimport { ClientOpts } from '@lowerdeck/rpc-client/dist/shared/clientBuilder';\nimport type { ShuttleClient } from '../../../service/src/apis/controllers';\n\nexport let createShuttleClient = (o: ClientOpts) => createClient<ShuttleClient>(o);\n"],"names":["opts","connect","d","ws","IsomorphicWs","endpoint","tenantId","connectionId","on","onOpen","data","msg","JSON","parse","onMessage","type","onClose","sendMcpMessage","Promise","resolve","send","stringify","then","e","reject","close","o","createClient"],"mappings":"gHAIwC,SAACA,SAAgC,CACvEC,QAAS,SAACC,GAOR,IAAIC,EAAK,IAAIC,EAAYA,aACpBJ,EAAKK,SAAQ,IAAIH,EAAEI,wBAAuBJ,EAAEK,aAAmB,SAmBpE,OAhBAJ,EAAGK,GAAG,OAAQ,WACJ,MAARN,EAAEO,QAAFP,EAAEO,QACJ,GAEAN,EAAGK,GAAG,UAAW,SAACE,GAChB,IAAIC,EAAWC,KAAKC,MAAMH,GACf,MAAXR,EAAEY,WAAFZ,EAAEY,UAAY,CACZC,KAAMJ,EAAII,KACVL,KAAMC,EAAID,MAEd,GAEAP,EAAGK,GAAG,QAAS,WACJ,MAATN,EAAEc,SAAFd,EAAEc,SACJ,GAEO,CACLC,eAAcA,SAASN,GAAmB,IAAIO,OAAAA,QAAAC,QACtChB,EAAGiB,KACPR,KAAKS,UAAU,CACbN,KAAM,cACNL,KAAMC,MAETW,KACH,WAAA,EAAA,CAAC,MAAAC,GAAA,OAAAL,QAAAM,OAAAD,EAAA,CAAA,EACDE,MAAK,WAAA,IACQ,OAAXtB,EAAGsB,QAAQP,QAAAC,SACb,CAAC,MAAAI,GAAA,OAAAL,QAAAM,OAAAD,KAEL,EACD,8BC1CgC,SAACG,GAAa,OAAKC,EAAAA,aAA4BD,EAAE"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/live.ts","../src/controller.ts"],"sourcesContent":["import { IsomorphicWs } from '@metorial/util-websocket';\nimport type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';\nimport type { ConnectionMessage } from '../../../service/src/mcp/utils/messenger';\n\nexport let createLiveConnectionClient = (opts: { endpoint: string }) => ({\n connect: (d: {\n tenantId: string;\n connectionId: string;\n onOpen?: () => void;\n onMessage?: (msg: ConnectionMessage) => void;\n onClose?: () => void;\n }) => {\n let ws = new IsomorphicWs(\n `${opts.endpoint}/${d.tenantId}/connection/${d.connectionId}/live`\n );\n\n ws.on('open', () => {\n d.onOpen?.();\n });\n\n ws.on('message', (data: string) => {\n let msg: any = JSON.parse(data);\n d.onMessage?.({\n type: msg.type,\n data: msg.data\n });\n });\n\n ws.on('close', () => {\n d.onClose?.();\n });\n\n return {\n sendMcpMessage: async (msg: JSONRPCMessage) => {\n await ws.send(\n JSON.stringify({\n type: 'mcp.message',\n data: msg\n })\n );\n },\n close: async () => {\n ws.close();\n }\n };\n }\n});\n","import { createClient } from '@lowerdeck/rpc-client';\nimport type { ShuttleClient } from '../../../service/src/apis/controllers';\n\ntype ClientOpts = Parameters<typeof createClient>[0];\n\nexport let createShuttleClient = (o: ClientOpts): ShuttleClient =>\n createClient<ShuttleClient>(o);\n"],"names":["opts","connect","d","ws","IsomorphicWs","endpoint","tenantId","connectionId","on","onOpen","data","msg","JSON","parse","onMessage","type","onClose","sendMcpMessage","Promise","resolve","send","stringify","then","e","reject","close","o","createClient"],"mappings":"gHAIwC,SAACA,SAAgC,CACvEC,QAAS,SAACC,GAOR,IAAIC,EAAK,IAAIC,EAAYA,aACpBJ,EAAKK,SAAQ,IAAIH,EAAEI,wBAAuBJ,EAAEK,aAAmB,SAmBpE,OAhBAJ,EAAGK,GAAG,OAAQ,WACJ,MAARN,EAAEO,QAAFP,EAAEO,QACJ,GAEAN,EAAGK,GAAG,UAAW,SAACE,GAChB,IAAIC,EAAWC,KAAKC,MAAMH,GACf,MAAXR,EAAEY,WAAFZ,EAAEY,UAAY,CACZC,KAAMJ,EAAII,KACVL,KAAMC,EAAID,MAEd,GAEAP,EAAGK,GAAG,QAAS,WACJ,MAATN,EAAEc,SAAFd,EAAEc,SACJ,GAEO,CACLC,eAAcA,SAASN,GAAmB,IAAIO,OAAAA,QAAAC,QACtChB,EAAGiB,KACPR,KAAKS,UAAU,CACbN,KAAM,cACNL,KAAMC,MAETW,KACH,WAAA,EAAA,CAAC,MAAAC,GAAA,OAAAL,QAAAM,OAAAD,EAAA,CAAA,EACDE,MAAK,WAAA,IACQ,OAAXtB,EAAGsB,QAAQP,QAAAC,SACb,CAAC,MAAAI,GAAA,OAAAL,QAAAM,OAAAD,KAEL,EACD,8BCzCgC,SAACG,GAAa,OAC7CC,EAAAA,aAA4BD,EAAE"}
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface ClientOpts {
15
15
  query?: Record<string, string | undefined>;
16
16
  }) => any;
17
17
  }
18
+ declare let createClient: <T extends object>(clientOpts: ClientOpts) => T;
18
19
  export interface ValidationError {
19
20
  code: string;
20
21
  message: string;
@@ -242,7 +243,7 @@ declare const ServerRemoteProtocol: {
242
243
  readonly streamable_http: "streamable_http";
243
244
  };
244
245
  export type ServerRemoteProtocol = (typeof ServerRemoteProtocol)[keyof typeof ServerRemoteProtocol];
245
- export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
246
+ declare let rootController: {
246
247
  tenant: {
247
248
  upsert: Handler<UndefinedIsOptional<{
248
249
  name: string;
@@ -805,7 +806,7 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
805
806
  type: ServerType;
806
807
  name: string;
807
808
  description: string | null;
808
- currentVersionId: string | undefined;
809
+ currentVersionId: string | null;
809
810
  draft: {
810
811
  repositoryTag: {
811
812
  object: string;
@@ -957,7 +958,7 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
957
958
  type: ServerType;
958
959
  name: string;
959
960
  description: string | null;
960
- currentVersionId: string | undefined;
961
+ currentVersionId: string | null;
961
962
  draft: {
962
963
  repositoryTag: {
963
964
  object: string;
@@ -1138,7 +1139,7 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
1138
1139
  type: ServerType;
1139
1140
  name: string;
1140
1141
  description: string | null;
1141
- currentVersionId: string | undefined;
1142
+ currentVersionId: string | null;
1142
1143
  draft: {
1143
1144
  repositoryTag: {
1144
1145
  object: string;
@@ -1389,7 +1390,7 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
1389
1390
  type: ServerType;
1390
1391
  name: string;
1391
1392
  description: string | null;
1392
- currentVersionId: string | undefined;
1393
+ currentVersionId: string | null;
1393
1394
  draft: {
1394
1395
  repositoryTag: {
1395
1396
  object: string;
@@ -2504,7 +2505,24 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
2504
2505
  identifier: string;
2505
2506
  functionBayTenantId: string | null;
2506
2507
  } | null;
2507
- serverVersion: never;
2508
+ serverVersion: {
2509
+ oid: bigint;
2510
+ id: string;
2511
+ serverOid: bigint;
2512
+ createdAt: Date;
2513
+ tenantOid: bigint | null;
2514
+ updatedAt: Date;
2515
+ identifier: string;
2516
+ isCurrent: boolean;
2517
+ configSchema: PrismaJson.ServerConfigSchema;
2518
+ configTransformer: string;
2519
+ remoteUrl: string | null;
2520
+ remoteProtocol: ServerRemoteProtocol | null;
2521
+ repositoryTagOid: bigint | null;
2522
+ repositoryVersionOid: bigint | null;
2523
+ functionServerOid: bigint | null;
2524
+ deploymentOid: bigint;
2525
+ } | null;
2508
2526
  functionServer: {
2509
2527
  oid: bigint;
2510
2528
  id: string;
@@ -2603,7 +2621,24 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
2603
2621
  identifier: string;
2604
2622
  functionBayTenantId: string | null;
2605
2623
  } | null;
2606
- serverVersion: never;
2624
+ serverVersion: {
2625
+ oid: bigint;
2626
+ id: string;
2627
+ serverOid: bigint;
2628
+ createdAt: Date;
2629
+ tenantOid: bigint | null;
2630
+ updatedAt: Date;
2631
+ identifier: string;
2632
+ isCurrent: boolean;
2633
+ configSchema: PrismaJson.ServerConfigSchema;
2634
+ configTransformer: string;
2635
+ remoteUrl: string | null;
2636
+ remoteProtocol: ServerRemoteProtocol | null;
2637
+ repositoryTagOid: bigint | null;
2638
+ repositoryVersionOid: bigint | null;
2639
+ functionServerOid: bigint | null;
2640
+ deploymentOid: bigint;
2641
+ } | null;
2607
2642
  functionServer: {
2608
2643
  oid: bigint;
2609
2644
  id: string;
@@ -3997,6 +4032,7 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
3997
4032
  serverCredentialsId: string | undefined;
3998
4033
  serverId: string;
3999
4034
  redirectUrl: string;
4035
+ callbackUrlOverride: string | undefined;
4000
4036
  input: UndefinedIsOptional<{}> | undefined;
4001
4037
  }>, {
4002
4038
  object: string;
@@ -4548,6 +4584,7 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
4548
4584
  credentialsOid: bigint;
4549
4585
  authConfigValue: PrismaJson.ServerOAuthSetupAuthConfig;
4550
4586
  redirectUri: string;
4587
+ callbackUrlOverride: string | null;
4551
4588
  authConfigOid: bigint | null;
4552
4589
  remoteOAuthConnectionSetupOid: bigint | null;
4553
4590
  delegatedOAuthConnectionSetupOid: bigint | null;
@@ -5230,8 +5267,42 @@ export declare let createShuttleClient: (o: ClientOpts) => InferClient<{
5230
5267
  rules: PrismaJson.NetworkingRulesetList;
5231
5268
  };
5232
5269
  }>;
5270
+ getMany: Handler<UndefinedIsOptional<{
5271
+ tenantId: string;
5272
+ networkingRulesetIds: string[];
5273
+ }>, {
5274
+ object: string;
5275
+ id: string;
5276
+ status: NetworkingRuleStatus;
5277
+ name: string;
5278
+ description: string | null;
5279
+ defaultAction: "accept" | "deny";
5280
+ rules: {
5281
+ action: "accept" | "deny";
5282
+ protocol?: "tcp" | "udp" | "icmp";
5283
+ destination?: string;
5284
+ portRange?: {
5285
+ start: number;
5286
+ end: number;
5287
+ };
5288
+ }[];
5289
+ tenantId: string;
5290
+ createdAt: Date;
5291
+ }[], {
5292
+ tenant: {
5293
+ name: string;
5294
+ oid: bigint;
5295
+ id: string;
5296
+ createdAt: Date;
5297
+ identifier: string;
5298
+ functionBayTenantId: string | null;
5299
+ };
5300
+ }>;
5233
5301
  };
5234
- }>;
5302
+ };
5303
+ export type ShuttleClient = InferClient<typeof rootController>;
5304
+ type ClientOpts$1 = Parameters<typeof createClient>[0];
5305
+ export declare let createShuttleClient: (o: ClientOpts$1) => ShuttleClient;
5235
5306
  export type ConnectionMessage = {
5236
5307
  type: "mcp.message";
5237
5308
  data: JSONRPCMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.js","sources":["../src/controller.ts","../src/live.ts"],"sourcesContent":["import { createClient } from '@lowerdeck/rpc-client';\nimport { ClientOpts } from '@lowerdeck/rpc-client/dist/shared/clientBuilder';\nimport type { ShuttleClient } from '../../../service/src/apis/controllers';\n\nexport let createShuttleClient = (o: ClientOpts) => createClient<ShuttleClient>(o);\n","import { IsomorphicWs } from '@metorial/util-websocket';\nimport type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';\nimport type { ConnectionMessage } from '../../../service/src/mcp/utils/messenger';\n\nexport let createLiveConnectionClient = (opts: { endpoint: string }) => ({\n connect: (d: {\n tenantId: string;\n connectionId: string;\n onOpen?: () => void;\n onMessage?: (msg: ConnectionMessage) => void;\n onClose?: () => void;\n }) => {\n let ws = new IsomorphicWs(\n `${opts.endpoint}/${d.tenantId}/connection/${d.connectionId}/live`\n );\n\n ws.on('open', () => {\n d.onOpen?.();\n });\n\n ws.on('message', (data: string) => {\n let msg: any = JSON.parse(data);\n d.onMessage?.({\n type: msg.type,\n data: msg.data\n });\n });\n\n ws.on('close', () => {\n d.onClose?.();\n });\n\n return {\n sendMcpMessage: async (msg: JSONRPCMessage) => {\n await ws.send(\n JSON.stringify({\n type: 'mcp.message',\n data: msg\n })\n );\n },\n close: async () => {\n ws.close();\n }\n };\n }\n});\n"],"names":["createShuttleClient","o","createClient","createLiveConnectionClient","opts","connect","d","ws","IsomorphicWs","endpoint","tenantId","connectionId","on","onOpen","data","msg","JSON","parse","onMessage","type","onClose","sendMcpMessage","Promise","resolve","send","stringify","then","e","reject","close"],"mappings":"6GAIW,IAAAA,EAAsB,SAACC,GAAa,OAAKC,EAA4BD,EAAE,ECAvEE,EAA6B,SAACC,SAAgC,CACvEC,QAAS,SAACC,GAOR,IAAIC,EAAK,IAAIC,EACRJ,EAAKK,SAAQ,IAAIH,EAAEI,wBAAuBJ,EAAEK,aAAmB,SAmBpE,OAhBAJ,EAAGK,GAAG,OAAQ,WACJ,MAARN,EAAEO,QAAFP,EAAEO,QACJ,GAEAN,EAAGK,GAAG,UAAW,SAACE,GAChB,IAAIC,EAAWC,KAAKC,MAAMH,GACf,MAAXR,EAAEY,WAAFZ,EAAEY,UAAY,CACZC,KAAMJ,EAAII,KACVL,KAAMC,EAAID,MAEd,GAEAP,EAAGK,GAAG,QAAS,WACJ,MAATN,EAAEc,SAAFd,EAAEc,SACJ,GAEO,CACLC,eAAcA,SAASN,GAAmB,IAAIO,OAAAA,QAAAC,QACtChB,EAAGiB,KACPR,KAAKS,UAAU,CACbN,KAAM,cACNL,KAAMC,MAETW,KACH,WAAA,EAAA,CAAC,MAAAC,GAAA,OAAAL,QAAAM,OAAAD,EAAA,CAAA,EACDE,MAAK,WAAA,IACQ,OAAXtB,EAAGsB,QAAQP,QAAAC,SACb,CAAC,MAAAI,GAAA,OAAAL,QAAAM,OAAAD,KAEL,EACD"}
1
+ {"version":3,"file":"index.module.js","sources":["../src/controller.ts","../src/live.ts"],"sourcesContent":["import { createClient } from '@lowerdeck/rpc-client';\nimport type { ShuttleClient } from '../../../service/src/apis/controllers';\n\ntype ClientOpts = Parameters<typeof createClient>[0];\n\nexport let createShuttleClient = (o: ClientOpts): ShuttleClient =>\n createClient<ShuttleClient>(o);\n","import { IsomorphicWs } from '@metorial/util-websocket';\nimport type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';\nimport type { ConnectionMessage } from '../../../service/src/mcp/utils/messenger';\n\nexport let createLiveConnectionClient = (opts: { endpoint: string }) => ({\n connect: (d: {\n tenantId: string;\n connectionId: string;\n onOpen?: () => void;\n onMessage?: (msg: ConnectionMessage) => void;\n onClose?: () => void;\n }) => {\n let ws = new IsomorphicWs(\n `${opts.endpoint}/${d.tenantId}/connection/${d.connectionId}/live`\n );\n\n ws.on('open', () => {\n d.onOpen?.();\n });\n\n ws.on('message', (data: string) => {\n let msg: any = JSON.parse(data);\n d.onMessage?.({\n type: msg.type,\n data: msg.data\n });\n });\n\n ws.on('close', () => {\n d.onClose?.();\n });\n\n return {\n sendMcpMessage: async (msg: JSONRPCMessage) => {\n await ws.send(\n JSON.stringify({\n type: 'mcp.message',\n data: msg\n })\n );\n },\n close: async () => {\n ws.close();\n }\n };\n }\n});\n"],"names":["createShuttleClient","o","createClient","createLiveConnectionClient","opts","connect","d","ws","IsomorphicWs","endpoint","tenantId","connectionId","on","onOpen","data","msg","JSON","parse","onMessage","type","onClose","sendMcpMessage","Promise","resolve","send","stringify","then","e","reject","close"],"mappings":"6GAKW,IAAAA,EAAsB,SAACC,GAAa,OAC7CC,EAA4BD,EAAE,ECFrBE,EAA6B,SAACC,SAAgC,CACvEC,QAAS,SAACC,GAOR,IAAIC,EAAK,IAAIC,EACRJ,EAAKK,SAAQ,IAAIH,EAAEI,wBAAuBJ,EAAEK,aAAmB,SAmBpE,OAhBAJ,EAAGK,GAAG,OAAQ,WACJ,MAARN,EAAEO,QAAFP,EAAEO,QACJ,GAEAN,EAAGK,GAAG,UAAW,SAACE,GAChB,IAAIC,EAAWC,KAAKC,MAAMH,GACf,MAAXR,EAAEY,WAAFZ,EAAEY,UAAY,CACZC,KAAMJ,EAAII,KACVL,KAAMC,EAAID,MAEd,GAEAP,EAAGK,GAAG,QAAS,WACJ,MAATN,EAAEc,SAAFd,EAAEc,SACJ,GAEO,CACLC,eAAcA,SAASN,GAAmB,IAAIO,OAAAA,QAAAC,QACtChB,EAAGiB,KACPR,KAAKS,UAAU,CACbN,KAAM,cACNL,KAAMC,MAETW,KACH,WAAA,EAAA,CAAC,MAAAC,GAAA,OAAAL,QAAAM,OAAAD,EAAA,CAAA,EACDE,MAAK,WAAA,IACQ,OAAXtB,EAAGsB,QAAQP,QAAAC,SACb,CAAC,MAAAI,GAAA,OAAAL,QAAAM,OAAAD,KAEL,EACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/live.ts","../src/controller.ts"],"sourcesContent":["import { IsomorphicWs } from '@metorial/util-websocket';\nimport type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';\nimport type { ConnectionMessage } from '../../../service/src/mcp/utils/messenger';\n\nexport let createLiveConnectionClient = (opts: { endpoint: string }) => ({\n connect: (d: {\n tenantId: string;\n connectionId: string;\n onOpen?: () => void;\n onMessage?: (msg: ConnectionMessage) => void;\n onClose?: () => void;\n }) => {\n let ws = new IsomorphicWs(\n `${opts.endpoint}/${d.tenantId}/connection/${d.connectionId}/live`\n );\n\n ws.on('open', () => {\n d.onOpen?.();\n });\n\n ws.on('message', (data: string) => {\n let msg: any = JSON.parse(data);\n d.onMessage?.({\n type: msg.type,\n data: msg.data\n });\n });\n\n ws.on('close', () => {\n d.onClose?.();\n });\n\n return {\n sendMcpMessage: async (msg: JSONRPCMessage) => {\n await ws.send(\n JSON.stringify({\n type: 'mcp.message',\n data: msg\n })\n );\n },\n close: async () => {\n ws.close();\n }\n };\n }\n});\n","import { createClient } from '@lowerdeck/rpc-client';\nimport { ClientOpts } from '@lowerdeck/rpc-client/dist/shared/clientBuilder';\nimport type { ShuttleClient } from '../../../service/src/apis/controllers';\n\nexport let createShuttleClient = (o: ClientOpts) => createClient<ShuttleClient>(o);\n"],"names":["opts","connect","d","ws","IsomorphicWs","endpoint","tenantId","connectionId","on","onOpen","data","msg","JSON","parse","onMessage","type","onClose","sendMcpMessage","Promise","resolve","send","stringify","then","e","reject","close","o","createClient"],"mappings":"4ZAIwC,SAACA,SAAgC,CACvEC,QAAS,SAACC,GAOR,IAAIC,EAAK,IAAIC,EAAYA,aACpBJ,EAAKK,SAAQ,IAAIH,EAAEI,wBAAuBJ,EAAEK,aAAmB,SAmBpE,OAhBAJ,EAAGK,GAAG,OAAQ,WACJ,MAARN,EAAEO,QAAFP,EAAEO,QACJ,GAEAN,EAAGK,GAAG,UAAW,SAACE,GAChB,IAAIC,EAAWC,KAAKC,MAAMH,GACf,MAAXR,EAAEY,WAAFZ,EAAEY,UAAY,CACZC,KAAMJ,EAAII,KACVL,KAAMC,EAAID,MAEd,GAEAP,EAAGK,GAAG,QAAS,WACJ,MAATN,EAAEc,SAAFd,EAAEc,SACJ,GAEO,CACLC,eAAcA,SAASN,GAAmB,IAAIO,OAAAA,QAAAC,QACtChB,EAAGiB,KACPR,KAAKS,UAAU,CACbN,KAAM,cACNL,KAAMC,MAETW,KACH,WAAA,EAAA,CAAC,MAAAC,GAAA,OAAAL,QAAAM,OAAAD,EAAA,CAAA,EACDE,MAAK,WAAA,IACQ,OAAXtB,EAAGsB,QAAQP,QAAAC,SACb,CAAC,MAAAI,GAAA,OAAAL,QAAAM,OAAAD,KAEL,EACD,wBC1CgC,SAACG,GAAa,OAAKC,EAAAA,aAA4BD,EAAE"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/live.ts","../src/controller.ts"],"sourcesContent":["import { IsomorphicWs } from '@metorial/util-websocket';\nimport type { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';\nimport type { ConnectionMessage } from '../../../service/src/mcp/utils/messenger';\n\nexport let createLiveConnectionClient = (opts: { endpoint: string }) => ({\n connect: (d: {\n tenantId: string;\n connectionId: string;\n onOpen?: () => void;\n onMessage?: (msg: ConnectionMessage) => void;\n onClose?: () => void;\n }) => {\n let ws = new IsomorphicWs(\n `${opts.endpoint}/${d.tenantId}/connection/${d.connectionId}/live`\n );\n\n ws.on('open', () => {\n d.onOpen?.();\n });\n\n ws.on('message', (data: string) => {\n let msg: any = JSON.parse(data);\n d.onMessage?.({\n type: msg.type,\n data: msg.data\n });\n });\n\n ws.on('close', () => {\n d.onClose?.();\n });\n\n return {\n sendMcpMessage: async (msg: JSONRPCMessage) => {\n await ws.send(\n JSON.stringify({\n type: 'mcp.message',\n data: msg\n })\n );\n },\n close: async () => {\n ws.close();\n }\n };\n }\n});\n","import { createClient } from '@lowerdeck/rpc-client';\nimport type { ShuttleClient } from '../../../service/src/apis/controllers';\n\ntype ClientOpts = Parameters<typeof createClient>[0];\n\nexport let createShuttleClient = (o: ClientOpts): ShuttleClient =>\n createClient<ShuttleClient>(o);\n"],"names":["opts","connect","d","ws","IsomorphicWs","endpoint","tenantId","connectionId","on","onOpen","data","msg","JSON","parse","onMessage","type","onClose","sendMcpMessage","Promise","resolve","send","stringify","then","e","reject","close","o","createClient"],"mappings":"4ZAIwC,SAACA,SAAgC,CACvEC,QAAS,SAACC,GAOR,IAAIC,EAAK,IAAIC,EAAYA,aACpBJ,EAAKK,SAAQ,IAAIH,EAAEI,wBAAuBJ,EAAEK,aAAmB,SAmBpE,OAhBAJ,EAAGK,GAAG,OAAQ,WACJ,MAARN,EAAEO,QAAFP,EAAEO,QACJ,GAEAN,EAAGK,GAAG,UAAW,SAACE,GAChB,IAAIC,EAAWC,KAAKC,MAAMH,GACf,MAAXR,EAAEY,WAAFZ,EAAEY,UAAY,CACZC,KAAMJ,EAAII,KACVL,KAAMC,EAAID,MAEd,GAEAP,EAAGK,GAAG,QAAS,WACJ,MAATN,EAAEc,SAAFd,EAAEc,SACJ,GAEO,CACLC,eAAcA,SAASN,GAAmB,IAAIO,OAAAA,QAAAC,QACtChB,EAAGiB,KACPR,KAAKS,UAAU,CACbN,KAAM,cACNL,KAAMC,MAETW,KACH,WAAA,EAAA,CAAC,MAAAC,GAAA,OAAAL,QAAAM,OAAAD,EAAA,CAAA,EACDE,MAAK,WAAA,IACQ,OAAXtB,EAAGsB,QAAQP,QAAAC,SACb,CAAC,MAAAI,GAAA,OAAAL,QAAAM,OAAAD,KAEL,EACD,wBCzCgC,SAACG,GAAa,OAC7CC,EAAAA,aAA4BD,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metorial-services/shuttle-client",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/controller.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { createClient } from '@lowerdeck/rpc-client';
2
- import { ClientOpts } from '@lowerdeck/rpc-client/dist/shared/clientBuilder';
3
2
  import type { ShuttleClient } from '../../../service/src/apis/controllers';
4
3
 
5
- export let createShuttleClient = (o: ClientOpts) => createClient<ShuttleClient>(o);
4
+ type ClientOpts = Parameters<typeof createClient>[0];
5
+
6
+ export let createShuttleClient = (o: ClientOpts): ShuttleClient =>
7
+ createClient<ShuttleClient>(o);