@tempoxyz/mercator 0.0.417 → 0.0.420

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.
@@ -0,0 +1,5 @@
1
+ import { type ClientId } from './clients.js';
2
+ /** Identifies the hosted-wallet route without treating arbitrary subpaths as protected. */
3
+ export declare function isProtectedMcpEndpoint(endpoint: string): boolean;
4
+ /** Preserves runtime-native MPP clients that do not implement hosted-wallet OAuth. */
5
+ export declare function clientEndpoint(client: ClientId, endpoint: string): string;
@@ -0,0 +1,16 @@
1
+ import { Client } from './clients.js';
2
+ /** Identifies the hosted-wallet route without treating arbitrary subpaths as protected. */
3
+ export function isProtectedMcpEndpoint(endpoint) {
4
+ return new URL(endpoint).pathname.replace(/\/$/, '') === '/mcp/auth';
5
+ }
6
+ /** Preserves runtime-native MPP clients that do not implement hosted-wallet OAuth. */
7
+ export function clientEndpoint(client, endpoint) {
8
+ if (isProtectedMcpEndpoint(endpoint) &&
9
+ (client === Client.OpenClaw || client === Client.Hermes)) {
10
+ const legacy = new URL(endpoint);
11
+ legacy.pathname = '/mcp';
12
+ return legacy.href;
13
+ }
14
+ return endpoint;
15
+ }
16
+ //# sourceMappingURL=client-endpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-endpoint.js","sourceRoot":"","sources":["../src/client-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,cAAc,CAAA;AAEpD,2FAA2F;AAC3F,MAAM,UAAU,sBAAsB,CAAC,QAAgB;IACtD,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,WAAW,CAAA;AACrE,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,cAAc,CAAC,MAAgB,EAAE,QAAgB;IAChE,IACC,sBAAsB,CAAC,QAAQ,CAAC;QAChC,CAAC,MAAM,KAAK,MAAM,CAAC,QAAQ,IAAI,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,EACvD,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;QAChC,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAA;QACxB,OAAO,MAAM,CAAC,IAAI,CAAA;IACnB,CAAC;IACD,OAAO,QAAQ,CAAA;AAChB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,49 +1,27 @@
1
1
  import { Cli } from 'incur';
2
- import { installCodexAgents, removeCodexAgents } from './agents.js';
3
2
  import { claimMach } from './claim.js';
4
- import { selectSetupClients } from './client-selection.js';
5
- import { type ClientId, configurationState, installedClients, mergeConfigFile, protectGrokConfig, removeConfigFile, setupPlan } from './clients.js';
3
+ import { setupPlan } from './clients.js';
6
4
  import { installClaudeMarketplacePlugin, installCodexMarketplacePlugin, installGrokMarketplacePlugin, removeCodexMarketplacePlugin } from './codex-marketplace.js';
7
5
  import { inspectCodexPlugin, installCodexPlugin, removeCodexPlugin } from './codex-plugin.js';
8
- import { runInteractiveCommand } from './command.js';
9
6
  import { diagnose } from './doctor.js';
10
7
  import { fundMach } from './fund.js';
11
8
  import { getJob } from './job.js';
12
- import { authorizeMcpClient } from './mcp-authorization.js';
13
- import { setupNativePayments } from './native-payments.js';
14
- import { confirmSetup } from './setup-confirmation.js';
9
+ import { type SetupDependencies } from './setup.js';
15
10
  import { startTerminalSetupProgress } from './setup-progress.js';
16
11
  import { createSetupTelemetry } from './setup-telemetry.js';
17
12
  import { submitPaidJob } from './submit.js';
18
13
  import { inspectWallet, inspectWalletProvider, openBrowserUrl, openFundingPage, setupWallet, useWallet } from './wallet.js';
19
- type CliDependencies = {
14
+ type CliDependencies = SetupDependencies & {
20
15
  claimMach: typeof claimMach;
21
- confirmSetup: typeof confirmSetup;
22
- configurationState: typeof configurationState;
23
16
  createSetupTelemetry: typeof createSetupTelemetry;
24
- diagnose: typeof diagnose;
25
17
  fundMach: typeof fundMach;
26
18
  getJob: typeof getJob;
27
19
  inspectCodexPlugin: typeof inspectCodexPlugin;
28
- installCodexAgents: typeof installCodexAgents;
29
- installClaudeMarketplacePlugin: typeof installClaudeMarketplacePlugin;
30
- installCodexPlugin: typeof installCodexPlugin;
31
- installGrokMarketplacePlugin: typeof installGrokMarketplacePlugin;
32
- authorizeMcpClient: typeof authorizeMcpClient;
33
20
  inspectWallet: typeof inspectWallet;
34
21
  inspectWalletProvider: typeof inspectWalletProvider;
35
- installedClients: typeof installedClients;
36
- mergeConfigFile: typeof mergeConfigFile;
37
- removeCodexAgents: typeof removeCodexAgents;
38
- removeCodexMarketplacePlugin: typeof removeCodexMarketplacePlugin;
39
22
  removeCodexPlugin: typeof removeCodexPlugin;
40
- removeConfigFile: typeof removeConfigFile;
41
23
  openBrowserUrl: typeof openBrowserUrl;
42
24
  openFundingPage: typeof openFundingPage;
43
- protectGrokConfig: typeof protectGrokConfig;
44
- runCommand: typeof runInteractiveCommand;
45
- setupNativePayments: typeof setupNativePayments;
46
- selectSetupClients: typeof selectSetupClients;
47
25
  startSetupProgress: typeof startTerminalSetupProgress;
48
26
  submitPaidJob: typeof submitPaidJob;
49
27
  setupWallet: typeof setupWallet;
@@ -151,8 +129,5 @@ export declare function createMercatorCli(overrides?: Partial<CliDependencies>):
151
129
  }, undefined, undefined, undefined, "mercator">;
152
130
  /** Runs the CLI and returns its exit code without terminating the current process. */
153
131
  export declare function run(argv: string[], overrides?: Partial<CliDependencies>): Promise<number>;
154
- /** Identifies the hosted-wallet route without treating arbitrary subpaths as protected. */
155
- export declare function isProtectedMcpEndpoint(endpoint: string): boolean;
156
- /** Preserves runtime-native MPP clients that do not implement hosted-wallet OAuth. */
157
- export declare function clientEndpoint(client: ClientId, endpoint: string): string;
132
+ export { clientEndpoint, isProtectedMcpEndpoint } from './client-endpoint.js';
158
133
  export { diagnose, inspectCodexPlugin, inspectWallet, inspectWalletProvider, installClaudeMarketplacePlugin, installCodexMarketplacePlugin, installCodexPlugin, installGrokMarketplacePlugin, openFundingPage, removeCodexMarketplacePlugin, removeCodexPlugin, setupPlan, setupWallet, useWallet, };