@tempoxyz/mercator 0.0.808 → 0.0.816
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/activation.generated.js +0 -1
- package/dist/agents.js +0 -1
- package/dist/bin.js +0 -1
- package/dist/binary.js +5 -11
- package/dist/browser.d.ts +3 -0
- package/dist/browser.js +11 -0
- package/dist/claude-registrations.js +0 -1
- package/dist/claude-skills.js +0 -1
- package/dist/client-authorization.js +0 -1
- package/dist/client-capabilities.js +0 -1
- package/dist/client-endpoint.js +0 -1
- package/dist/client-metadata.generated.js +0 -1
- package/dist/client-selection.js +0 -1
- package/dist/clients.js +0 -1
- package/dist/codex-marketplace.js +0 -1
- package/dist/codex-plugin.js +0 -1
- package/dist/codex-registrations.js +0 -1
- package/dist/command-render.js +0 -1
- package/dist/command.js +0 -1
- package/dist/connection-summary.js +0 -1
- package/dist/doctor.js +0 -1
- package/dist/globe-frames.js +0 -1
- package/dist/globe.js +0 -1
- package/dist/index.d.ts +10 -5
- package/dist/index.js +19 -6
- package/dist/job.js +0 -1
- package/dist/lazy.d.ts +5 -0
- package/dist/lazy.js +10 -0
- package/dist/mcp-authorization.d.ts +1 -1
- package/dist/mcp-authorization.js +1 -2
- package/dist/mcp-client.js +0 -1
- package/dist/native-payments.js +0 -1
- package/dist/oauth-callback-page.js +0 -1
- package/dist/payment-policy.js +0 -1
- package/dist/plugin-bundle/.codex-plugin/plugin.json +14 -8
- package/dist/plugin-payload.d.ts +12 -0
- package/dist/plugin-payload.js +18 -0
- package/dist/prompt-input.js +0 -1
- package/dist/refresh.js +0 -1
- package/dist/release.js +0 -1
- package/dist/setup-confirmation.js +0 -1
- package/dist/setup-diagnostics.js +0 -1
- package/dist/setup-preferences.js +0 -1
- package/dist/setup-progress.js +0 -1
- package/dist/setup-render.js +0 -1
- package/dist/setup-telemetry.js +0 -1
- package/dist/setup-update.js +0 -1
- package/dist/setup.js +0 -1
- package/dist/submit-errors.d.ts +15 -0
- package/dist/submit-errors.js +24 -0
- package/dist/submit.d.ts +2 -15
- package/dist/submit.js +2 -25
- package/dist/suggested-queries.js +0 -1
- package/dist/terminal-style.js +0 -1
- package/dist/uninstall-render.js +0 -1
- package/dist/update.js +0 -1
- package/dist/wallet-selection.js +0 -1
- package/dist/wallet-types.d.ts +12 -0
- package/dist/wallet-types.js +13 -0
- package/dist/wallet.d.ts +3 -16
- package/dist/wallet.js +3 -25
- package/package.json +1 -2
- package/dist/activation.generated.js.map +0 -1
- package/dist/agents.js.map +0 -1
- package/dist/bin.js.map +0 -1
- package/dist/binary.js.map +0 -1
- package/dist/claude-registrations.js.map +0 -1
- package/dist/claude-skills.js.map +0 -1
- package/dist/client-authorization.js.map +0 -1
- package/dist/client-capabilities.js.map +0 -1
- package/dist/client-endpoint.js.map +0 -1
- package/dist/client-metadata.generated.js.map +0 -1
- package/dist/client-selection.js.map +0 -1
- package/dist/clients.js.map +0 -1
- package/dist/codex-marketplace.js.map +0 -1
- package/dist/codex-plugin.js.map +0 -1
- package/dist/codex-registrations.js.map +0 -1
- package/dist/command-render.js.map +0 -1
- package/dist/command.js.map +0 -1
- package/dist/connection-summary.js.map +0 -1
- package/dist/doctor.js.map +0 -1
- package/dist/globe-frames.js.map +0 -1
- package/dist/globe.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/job.js.map +0 -1
- package/dist/mcp-authorization.js.map +0 -1
- package/dist/mcp-client.js.map +0 -1
- package/dist/native-payments.js.map +0 -1
- package/dist/oauth-callback-page.js.map +0 -1
- package/dist/payment-policy.js.map +0 -1
- package/dist/plugin-bundle/assets/mercator-overview.png +0 -0
- package/dist/plugin-bundle/assets/service-network.png +0 -0
- package/dist/plugin-bundle/assets/workflow-composition.png +0 -0
- package/dist/prompt-input.js.map +0 -1
- package/dist/refresh.js.map +0 -1
- package/dist/release.js.map +0 -1
- package/dist/setup-confirmation.js.map +0 -1
- package/dist/setup-diagnostics.js.map +0 -1
- package/dist/setup-preferences.js.map +0 -1
- package/dist/setup-progress.js.map +0 -1
- package/dist/setup-render.js.map +0 -1
- package/dist/setup-telemetry.js.map +0 -1
- package/dist/setup-update.js.map +0 -1
- package/dist/setup.js.map +0 -1
- package/dist/submit.js.map +0 -1
- package/dist/suggested-queries.js.map +0 -1
- package/dist/terminal-style.js.map +0 -1
- package/dist/uninstall-render.js.map +0 -1
- package/dist/update.js.map +0 -1
- package/dist/wallet-selection.js.map +0 -1
- package/dist/wallet.js.map +0 -1
|
@@ -22,4 +22,3 @@ work, or to reason over content the user already supplied.
|
|
|
22
22
|
|
|
23
23
|
Do not skip Mercator merely because the provider or domain is unfamiliar. Search is free and is the
|
|
24
24
|
fastest way to determine whether Mercator can complete the request.`;
|
|
25
|
-
//# sourceMappingURL=activation.generated.js.map
|
package/dist/agents.js
CHANGED
package/dist/bin.js
CHANGED
package/dist/binary.js
CHANGED
|
@@ -11,12 +11,6 @@ import cursorPluginManifest from '../../../plugins/mercator/.cursor-plugin/plugi
|
|
|
11
11
|
};
|
|
12
12
|
import codexMcpConfig from '../../../plugins/mercator/.mcp.json' with { type: 'file' };
|
|
13
13
|
import favicon from '../../../plugins/mercator/assets/favicon.svg' with { type: 'file' };
|
|
14
|
-
import overview from '../../../plugins/mercator/assets/mercator-overview.png' with { type: 'file'
|
|
15
|
-
};
|
|
16
|
-
import serviceNetwork from '../../../plugins/mercator/assets/service-network.png' with { type: 'file'
|
|
17
|
-
};
|
|
18
|
-
import workflowComposition from '../../../plugins/mercator/assets/workflow-composition.png' with { type: 'file'
|
|
19
|
-
};
|
|
20
14
|
import portableMcpConfig from '../../../plugins/mercator/mcp.json' with { type: 'file' };
|
|
21
15
|
import portablePluginManifest from '../../../plugins/mercator/plugin.json' with { type: 'file'
|
|
22
16
|
};
|
|
@@ -33,6 +27,7 @@ import setupSkill from '../../../plugins/mercator/skills/mercator-setup/SKILL.md
|
|
|
33
27
|
};
|
|
34
28
|
import { installClaudeSkills } from './claude-skills.js';
|
|
35
29
|
import { inspectCodexPlugin, installCodexPlugin, run } from './index.js';
|
|
30
|
+
import { cliCodexManifest } from './plugin-payload.js';
|
|
36
31
|
/** Complete plugin payload required by default Mercator setup. */
|
|
37
32
|
const embeddedPluginFiles = [
|
|
38
33
|
{
|
|
@@ -46,6 +41,7 @@ const embeddedPluginFiles = [
|
|
|
46
41
|
{
|
|
47
42
|
source: codexPluginManifest,
|
|
48
43
|
target: '.codex-plugin/plugin.json',
|
|
44
|
+
transform: (content) => cliCodexManifest(content).manifest,
|
|
49
45
|
},
|
|
50
46
|
{
|
|
51
47
|
source: cursorPluginManifest,
|
|
@@ -62,9 +58,6 @@ const embeddedPluginFiles = [
|
|
|
62
58
|
target: 'skills/mercator/references/examples.md',
|
|
63
59
|
},
|
|
64
60
|
{ source: favicon, target: 'assets/favicon.svg' },
|
|
65
|
-
{ source: overview, target: 'assets/mercator-overview.png' },
|
|
66
|
-
{ source: serviceNetwork, target: 'assets/service-network.png' },
|
|
67
|
-
{ source: workflowComposition, target: 'assets/workflow-composition.png' },
|
|
68
61
|
{ source: setupSkill, target: 'skills/mercator-setup/SKILL.md' },
|
|
69
62
|
{ source: setupSkillMetadata, target: 'skills/mercator-setup/agents/openai.yaml' },
|
|
70
63
|
];
|
|
@@ -74,7 +67,9 @@ async function materializePluginBundle() {
|
|
|
74
67
|
for (const file of embeddedPluginFiles) {
|
|
75
68
|
const target = join(directory, file.target);
|
|
76
69
|
await mkdir(join(target, '..'), { recursive: true });
|
|
77
|
-
await writeFile(target,
|
|
70
|
+
await writeFile(target, file.transform
|
|
71
|
+
? file.transform(await readFile(file.source, 'utf8'))
|
|
72
|
+
: await readFile(file.source));
|
|
78
73
|
}
|
|
79
74
|
return directory;
|
|
80
75
|
}
|
|
@@ -94,4 +89,3 @@ finally {
|
|
|
94
89
|
if (pluginSource)
|
|
95
90
|
await rm(pluginSource, { force: true, recursive: true });
|
|
96
91
|
}
|
|
97
|
-
//# sourceMappingURL=binary.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { runInteractiveCommand } from './command.js';
|
|
2
|
+
/** Opens a trusted external URL with the operating system's default browser. */
|
|
3
|
+
export declare function openBrowserUrl(url: string, platform?: NodeJS.Platform, runCommand?: typeof runInteractiveCommand): Promise<void>;
|
package/dist/browser.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { runInteractiveCommand } from './command.js';
|
|
2
|
+
/** Opens a trusted external URL with the operating system's default browser. */
|
|
3
|
+
export async function openBrowserUrl(url, platform = process.platform, runCommand = runInteractiveCommand) {
|
|
4
|
+
if (platform === 'darwin') {
|
|
5
|
+
return runCommand('open', [url]);
|
|
6
|
+
}
|
|
7
|
+
if (platform === 'win32') {
|
|
8
|
+
return runCommand('rundll32.exe', ['url.dll,FileProtocolHandler', url]);
|
|
9
|
+
}
|
|
10
|
+
return runCommand('xdg-open', [url]);
|
|
11
|
+
}
|
package/dist/claude-skills.js
CHANGED
|
@@ -18,4 +18,3 @@ export function clientAuthorizationGuidance(client, endpoint) {
|
|
|
18
18
|
return 'In Grok, open /mcps, select Mercator, and press i to authorize. Then verify search_services and get_connection_status in Grok. For SSH sessions, the browser must reach Grok’s printed loopback callback; use local port forwarding or authorize on a browser-capable host.';
|
|
19
19
|
return 'Complete OAuth in your client, then call search_services and get_connection_status there. Registration alone does not verify payment readiness.';
|
|
20
20
|
}
|
|
21
|
-
//# sourceMappingURL=client-authorization.js.map
|
package/dist/client-endpoint.js
CHANGED
package/dist/client-selection.js
CHANGED
package/dist/clients.js
CHANGED
package/dist/codex-plugin.js
CHANGED
package/dist/command-render.js
CHANGED
package/dist/command.js
CHANGED
package/dist/doctor.js
CHANGED
package/dist/globe-frames.js
CHANGED
package/dist/globe.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Cli } from 'incur';
|
|
2
|
+
import { openBrowserUrl } from './browser.js';
|
|
2
3
|
import { inspectClaudeSkills, removeClaudeSkills } from './claude-skills.js';
|
|
3
4
|
import { setupPlan } from './clients.js';
|
|
4
5
|
import { installClaudeMarketplacePlugin, installCodexMarketplacePlugin, installGrokMarketplacePlugin } from './codex-marketplace.js';
|
|
5
6
|
import { inspectCodexPlugin, installCodexPlugin, removeCodexPlugin } from './codex-plugin.js';
|
|
6
|
-
import { diagnose } from './doctor.js';
|
|
7
|
-
import { getJob } from './job.js';
|
|
8
|
-
import { logoutMcp, runMcp } from './mcp-client.js';
|
|
9
7
|
import { hasManagedAgents } from './refresh.js';
|
|
10
8
|
import { inspectRelease } from './release.js';
|
|
11
9
|
import { type SetupDependencies } from './setup.js';
|
|
@@ -13,9 +11,16 @@ import { readSetupPreferences, removeSetupPreferences, saveSetupPreferences } fr
|
|
|
13
11
|
import { startTerminalSetupProgress } from './setup-progress.js';
|
|
14
12
|
import { createSetupTelemetry } from './setup-telemetry.js';
|
|
15
13
|
import { ensureSetupCurrent } from './setup-update.js';
|
|
16
|
-
import { submitPaidJob } from './submit.js';
|
|
17
14
|
import { fetchSuggestedQueries } from './suggested-queries.js';
|
|
18
|
-
|
|
15
|
+
declare const inspectWallet: typeof import("./wallet.js").inspectWallet;
|
|
16
|
+
declare const inspectWalletProvider: typeof import("./wallet.js").inspectWalletProvider;
|
|
17
|
+
declare const setupWallet: typeof import("./wallet.js").setupWallet;
|
|
18
|
+
declare const useWallet: typeof import("./wallet.js").useWallet;
|
|
19
|
+
declare const submitPaidJob: typeof import("./submit.js").submitPaidJob;
|
|
20
|
+
declare const diagnose: typeof import("./doctor.js").diagnose;
|
|
21
|
+
declare const logoutMcp: typeof import("./mcp-client.js").logoutMcp;
|
|
22
|
+
declare const runMcp: typeof import("./mcp-client.js").runMcp;
|
|
23
|
+
declare const getJob: typeof import("./job.js").getJob;
|
|
19
24
|
type CliDependencies = SetupDependencies & {
|
|
20
25
|
inspectClaudeSkills: typeof inspectClaudeSkills;
|
|
21
26
|
removeClaudeSkills: typeof removeClaudeSkills;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Cli, z } from 'incur';
|
|
2
2
|
import packageMetadata from '../package.json' with { type: 'json' };
|
|
3
3
|
import { installCodexAgents, removeCodexAgents } from './agents.js';
|
|
4
|
+
import { openBrowserUrl } from './browser.js';
|
|
4
5
|
import { inspectClaudeRegistrations } from './claude-registrations.js';
|
|
5
6
|
import { inspectClaudeSkills, installClaudeSkills, removeClaudeSkills, } from './claude-skills.js';
|
|
6
7
|
import { clientAuthorizationGuidance } from './client-authorization.js';
|
|
@@ -13,9 +14,7 @@ import { inspectCodexPlugin, installCodexPlugin, removeCodexPlugin, } from './co
|
|
|
13
14
|
import { inspectCodexRegistrations } from './codex-registrations.js';
|
|
14
15
|
import { runInteractiveCommand } from './command.js';
|
|
15
16
|
import { formatBrowserResult, formatClientStatus, formatDoctorResult, formatWalletBalance, formatWalletReport, } from './command-render.js';
|
|
16
|
-
import {
|
|
17
|
-
import { getJob } from './job.js';
|
|
18
|
-
import { loginMcp, logoutMcp, mcpFetch, runMcp } from './mcp-client.js';
|
|
17
|
+
import { lazy } from './lazy.js';
|
|
19
18
|
import { setupNativePayments } from './native-payments.js';
|
|
20
19
|
import { hasManagedAgents, refreshOptions } from './refresh.js';
|
|
21
20
|
import { inspectRelease } from './release.js';
|
|
@@ -27,12 +26,27 @@ import { startStderrSetupProgress, startTerminalSetupProgress, } from './setup-p
|
|
|
27
26
|
import { formatSetupResult } from './setup-render.js';
|
|
28
27
|
import { createSetupTelemetry, SetupTelemetryEvent, setupFailureCategory, } from './setup-telemetry.js';
|
|
29
28
|
import { ensureSetupCurrent } from './setup-update.js';
|
|
30
|
-
import { RemoteSubmissionError, SubmitError
|
|
29
|
+
import { RemoteSubmissionError, SubmitError } from './submit-errors.js';
|
|
31
30
|
import { fetchSuggestedQueries } from './suggested-queries.js';
|
|
32
31
|
import { supportsColor } from './terminal-style.js';
|
|
33
32
|
import { formatUninstallResult } from './uninstall-render.js';
|
|
34
33
|
import { standaloneUpdate } from './update.js';
|
|
35
|
-
import {
|
|
34
|
+
import { WalletProvider, WalletRequiredError } from './wallet-types.js';
|
|
35
|
+
// Signing and payment pull in viem, accounts, and mppx; load them only when a command needs them.
|
|
36
|
+
const loadWallet = () => import('./wallet.js');
|
|
37
|
+
const inspectWallet = lazy(loadWallet, 'inspectWallet');
|
|
38
|
+
const inspectWalletProvider = lazy(loadWallet, 'inspectWalletProvider');
|
|
39
|
+
const setupWallet = lazy(loadWallet, 'setupWallet');
|
|
40
|
+
const useWallet = lazy(loadWallet, 'useWallet');
|
|
41
|
+
const submitPaidJob = lazy(() => import('./submit.js'), 'submitPaidJob');
|
|
42
|
+
const diagnose = lazy(() => import('./doctor.js'), 'diagnose');
|
|
43
|
+
// The MCP SDK and its schema validator load only for commands that talk to the gateway.
|
|
44
|
+
const loadMcpClient = () => import('./mcp-client.js');
|
|
45
|
+
const loginMcp = lazy(loadMcpClient, 'loginMcp');
|
|
46
|
+
const logoutMcp = lazy(loadMcpClient, 'logoutMcp');
|
|
47
|
+
const mcpFetch = lazy(loadMcpClient, 'mcpFetch');
|
|
48
|
+
const runMcp = lazy(loadMcpClient, 'runMcp');
|
|
49
|
+
const getJob = lazy(() => import('./job.js'), 'getJob');
|
|
36
50
|
const DEFAULT_ENDPOINT = 'https://mercator.sh/mcp/auth';
|
|
37
51
|
/** Tempo-authenticated management page for balances, funding, and agent access. */
|
|
38
52
|
const ACCOUNT_URL = 'https://mercator.sh/account';
|
|
@@ -703,4 +717,3 @@ async function doctor(options, dependencies, progress) {
|
|
|
703
717
|
}
|
|
704
718
|
export { clientEndpoint, isProtectedMcpEndpoint } from './client-endpoint.js';
|
|
705
719
|
export { diagnose, inspectCodexPlugin, inspectWallet, inspectWalletProvider, installClaudeMarketplacePlugin, installCodexMarketplacePlugin, installCodexPlugin, installGrokMarketplacePlugin, removeCodexPlugin, setupPlan, setupWallet, useWallet, };
|
|
706
|
-
//# sourceMappingURL=index.js.map
|
package/dist/job.js
CHANGED
package/dist/lazy.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defers loading a module until one of its async functions is first called. Commands that never
|
|
3
|
+
* sign or pay therefore skip viem, accounts, and mppx entirely.
|
|
4
|
+
*/
|
|
5
|
+
export declare function lazy<Module, Name extends keyof Module>(load: () => Promise<Module>, name: Name): Module[Name];
|
package/dist/lazy.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defers loading a module until one of its async functions is first called. Commands that never
|
|
3
|
+
* sign or pay therefore skip viem, accounts, and mppx entirely.
|
|
4
|
+
*/
|
|
5
|
+
export function lazy(load, name) {
|
|
6
|
+
return (async (...args) => {
|
|
7
|
+
const module = await load();
|
|
8
|
+
return module[name](...args);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Readable, Writable } from 'node:stream';
|
|
2
|
-
import { openBrowserUrl } from './
|
|
2
|
+
import { openBrowserUrl } from './browser.js';
|
|
3
3
|
/** OAuth client name shown by Tempo Wallet during installer-assisted Grok authorization. */
|
|
4
4
|
export declare const GROK_OAUTH_CLIENT_NAME = "Grok";
|
|
5
5
|
/** Bounded bearer; explicitly named CLI sessions also receive registration and refresh state. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createHash, randomBytes } from 'node:crypto';
|
|
2
2
|
import { createServer } from 'node:http';
|
|
3
3
|
import { createInterface } from 'node:readline/promises';
|
|
4
|
+
import { openBrowserUrl } from './browser.js';
|
|
4
5
|
import { oauthCallbackPage } from './oauth-callback-page.js';
|
|
5
|
-
import { openBrowserUrl } from './wallet.js';
|
|
6
6
|
/** OAuth client name shown by Tempo Wallet during installer-assisted Grok authorization. */
|
|
7
7
|
export const GROK_OAUTH_CLIENT_NAME = 'Grok';
|
|
8
8
|
const defaultDependencies = {
|
|
@@ -300,4 +300,3 @@ function closeServer(server) {
|
|
|
300
300
|
server.closeAllConnections();
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
|
-
//# sourceMappingURL=mcp-authorization.js.map
|
package/dist/mcp-client.js
CHANGED
package/dist/native-payments.js
CHANGED
package/dist/payment-policy.js
CHANGED
|
@@ -36,4 +36,3 @@ export const MERCATOR_SWAP_TOKENS = [MERCATOR_PAYMENT_TOKENS.pathUsd];
|
|
|
36
36
|
export function mercatorDirectChargeCurrency(currency) {
|
|
37
37
|
return MERCATOR_DIRECT_CHARGE_TOKENS.find((token) => token.address.toLowerCase() === currency.toLowerCase());
|
|
38
38
|
}
|
|
39
|
-
//# sourceMappingURL=payment-policy.js.map
|
|
@@ -8,7 +8,14 @@
|
|
|
8
8
|
},
|
|
9
9
|
"homepage": "https://mercator.sh/",
|
|
10
10
|
"repository": "https://github.com/tempoxyz/mercator",
|
|
11
|
-
"keywords": [
|
|
11
|
+
"keywords": [
|
|
12
|
+
"api",
|
|
13
|
+
"current data",
|
|
14
|
+
"mercator",
|
|
15
|
+
"mcp",
|
|
16
|
+
"paid services",
|
|
17
|
+
"tempo"
|
|
18
|
+
],
|
|
12
19
|
"mcpServers": "./.mcp.json",
|
|
13
20
|
"skills": "./skills/",
|
|
14
21
|
"interface": {
|
|
@@ -17,7 +24,11 @@
|
|
|
17
24
|
"longDescription": "Connect agents to current data and paid APIs through one remote MCP server. Authorize a limited Tempo Wallet key once; no CLI or wallet key is installed in the agent VM.",
|
|
18
25
|
"developerName": "Tempo",
|
|
19
26
|
"category": "Productivity",
|
|
20
|
-
"capabilities": [
|
|
27
|
+
"capabilities": [
|
|
28
|
+
"Interactive",
|
|
29
|
+
"Read",
|
|
30
|
+
"Write"
|
|
31
|
+
],
|
|
21
32
|
"websiteURL": "https://mercator.sh/",
|
|
22
33
|
"defaultPrompt": [
|
|
23
34
|
"Compare tokenized NVDA: issuer, chains, value, dividend-adjusted price, liquidity, redemption; flag conflicts and missing data.",
|
|
@@ -26,11 +37,6 @@
|
|
|
26
37
|
],
|
|
27
38
|
"brandColor": "#1D4FFF",
|
|
28
39
|
"composerIcon": "./assets/favicon.svg",
|
|
29
|
-
"logo": "./assets/favicon.svg"
|
|
30
|
-
"screenshots": [
|
|
31
|
-
"./assets/mercator-overview.png",
|
|
32
|
-
"./assets/workflow-composition.png",
|
|
33
|
-
"./assets/service-network.png"
|
|
34
|
-
]
|
|
40
|
+
"logo": "./assets/favicon.svg"
|
|
35
41
|
}
|
|
36
42
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI installs a trimmed copy of the repository plugin. Codex marketplace screenshots are
|
|
3
|
+
* listing art (about 1.6 MB) that local installs do not need, so both the npm package and the
|
|
4
|
+
* standalone binary omit them and drop their manifest references.
|
|
5
|
+
*/
|
|
6
|
+
/** The CLI's Codex manifest and the plugin-relative files it no longer references. */
|
|
7
|
+
export type CliCodexManifest = Readonly<{
|
|
8
|
+
manifest: string;
|
|
9
|
+
omitted: readonly string[];
|
|
10
|
+
}>;
|
|
11
|
+
/** Removes screenshot references from a Codex manifest and lists the files they pointed to. */
|
|
12
|
+
export declare function cliCodexManifest(source: string): CliCodexManifest;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CLI installs a trimmed copy of the repository plugin. Codex marketplace screenshots are
|
|
3
|
+
* listing art (about 1.6 MB) that local installs do not need, so both the npm package and the
|
|
4
|
+
* standalone binary omit them and drop their manifest references.
|
|
5
|
+
*/
|
|
6
|
+
/** Removes screenshot references from a Codex manifest and lists the files they pointed to. */
|
|
7
|
+
export function cliCodexManifest(source) {
|
|
8
|
+
const parsed = JSON.parse(source);
|
|
9
|
+
const screenshots = parsed.interface?.screenshots;
|
|
10
|
+
const omitted = Array.isArray(screenshots)
|
|
11
|
+
? screenshots
|
|
12
|
+
.filter((path) => typeof path === 'string')
|
|
13
|
+
.map((path) => path.replace(/^\.\//, ''))
|
|
14
|
+
: [];
|
|
15
|
+
if (parsed.interface)
|
|
16
|
+
delete parsed.interface.screenshots;
|
|
17
|
+
return { manifest: `${JSON.stringify(parsed, null, '\t')}\n`, omitted };
|
|
18
|
+
}
|
package/dist/prompt-input.js
CHANGED
package/dist/refresh.js
CHANGED
package/dist/release.js
CHANGED
package/dist/setup-progress.js
CHANGED
package/dist/setup-render.js
CHANGED
package/dist/setup-telemetry.js
CHANGED
package/dist/setup-update.js
CHANGED
package/dist/setup.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type SubmitErrorCode = 'INVALID_HANDOFF' | 'INVALID_SPEND_LIMIT' | 'SPEND_LIMIT_EXCEEDED';
|
|
2
|
+
/** Expected submit validation failure with a stable CLI-facing code. */
|
|
3
|
+
export declare class SubmitError extends Error {
|
|
4
|
+
readonly code: SubmitErrorCode;
|
|
5
|
+
constructor(code: SubmitErrorCode, message: string);
|
|
6
|
+
}
|
|
7
|
+
/** Stable corrective failure returned by Mercator's REST submission boundary. */
|
|
8
|
+
export declare class RemoteSubmissionError extends Error {
|
|
9
|
+
readonly code: string;
|
|
10
|
+
readonly nextAction: string;
|
|
11
|
+
readonly recoverable: boolean;
|
|
12
|
+
readonly status: number;
|
|
13
|
+
constructor(code: string, message: string, nextAction: string, recoverable: boolean, status: number);
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Expected submit validation failure with a stable CLI-facing code. */
|
|
2
|
+
export class SubmitError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
constructor(code, message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.code = code;
|
|
7
|
+
this.name = 'SubmitError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** Stable corrective failure returned by Mercator's REST submission boundary. */
|
|
11
|
+
export class RemoteSubmissionError extends Error {
|
|
12
|
+
code;
|
|
13
|
+
nextAction;
|
|
14
|
+
recoverable;
|
|
15
|
+
status;
|
|
16
|
+
constructor(code, message, nextAction, recoverable, status) {
|
|
17
|
+
super(message);
|
|
18
|
+
this.code = code;
|
|
19
|
+
this.nextAction = nextAction;
|
|
20
|
+
this.recoverable = recoverable;
|
|
21
|
+
this.status = status;
|
|
22
|
+
this.name = 'RemoteSubmissionError';
|
|
23
|
+
}
|
|
24
|
+
}
|
package/dist/submit.d.ts
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
|
+
import { RemoteSubmissionError, SubmitError } from './submit-errors.js';
|
|
1
2
|
import { createPaymentProvider, createProofProvider } from './wallet.js';
|
|
3
|
+
export { RemoteSubmissionError, SubmitError };
|
|
2
4
|
/** Inputs accepted by the explicit bounded paid-job REST command. */
|
|
3
5
|
export type SubmitOptions = {
|
|
4
6
|
body: string;
|
|
5
7
|
maxSpend: string;
|
|
6
8
|
url: string;
|
|
7
9
|
};
|
|
8
|
-
type SubmitErrorCode = 'INVALID_HANDOFF' | 'INVALID_SPEND_LIMIT' | 'SPEND_LIMIT_EXCEEDED';
|
|
9
|
-
/** Expected submit validation failure with a stable CLI-facing code. */
|
|
10
|
-
export declare class SubmitError extends Error {
|
|
11
|
-
readonly code: SubmitErrorCode;
|
|
12
|
-
constructor(code: SubmitErrorCode, message: string);
|
|
13
|
-
}
|
|
14
|
-
/** Stable corrective failure returned by Mercator's REST submission boundary. */
|
|
15
|
-
export declare class RemoteSubmissionError extends Error {
|
|
16
|
-
readonly code: string;
|
|
17
|
-
readonly nextAction: string;
|
|
18
|
-
readonly recoverable: boolean;
|
|
19
|
-
readonly status: number;
|
|
20
|
-
constructor(code: string, message: string, nextAction: string, recoverable: boolean, status: number);
|
|
21
|
-
}
|
|
22
10
|
type SubmitDependencies = {
|
|
23
11
|
createPaymentProvider: typeof createPaymentProvider;
|
|
24
12
|
createProofProvider: typeof createProofProvider;
|
|
@@ -28,4 +16,3 @@ type SubmitDependencies = {
|
|
|
28
16
|
};
|
|
29
17
|
/** Executes an explicit bounded direct-charge REST submission. */
|
|
30
18
|
export declare function submitPaidJob(options: SubmitOptions, overrides?: Partial<SubmitDependencies>): Promise<unknown>;
|
|
31
|
-
export {};
|
package/dist/submit.js
CHANGED
|
@@ -1,35 +1,13 @@
|
|
|
1
1
|
import { Challenge } from 'mppx';
|
|
2
2
|
import { parseUnits } from 'viem';
|
|
3
3
|
import { MERCATOR_TEMPO_CHAIN_ID, mercatorDirectChargeCurrency, } from './payment-policy.js';
|
|
4
|
+
import { RemoteSubmissionError, SubmitError } from './submit-errors.js';
|
|
4
5
|
import { createPaymentProvider, createProofProvider } from './wallet.js';
|
|
6
|
+
export { RemoteSubmissionError, SubmitError };
|
|
5
7
|
/** Maximum wait for either Mercator jobs request. */
|
|
6
8
|
const SUBMIT_TIMEOUT_MS = 30_000;
|
|
7
9
|
/** Trusted production job endpoint and origin accepted from MCP handoffs. */
|
|
8
10
|
const SUBMIT_URL = 'https://mercator.sh/v1/jobs';
|
|
9
|
-
/** Expected submit validation failure with a stable CLI-facing code. */
|
|
10
|
-
export class SubmitError extends Error {
|
|
11
|
-
code;
|
|
12
|
-
constructor(code, message) {
|
|
13
|
-
super(message);
|
|
14
|
-
this.code = code;
|
|
15
|
-
this.name = 'SubmitError';
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
/** Stable corrective failure returned by Mercator's REST submission boundary. */
|
|
19
|
-
export class RemoteSubmissionError extends Error {
|
|
20
|
-
code;
|
|
21
|
-
nextAction;
|
|
22
|
-
recoverable;
|
|
23
|
-
status;
|
|
24
|
-
constructor(code, message, nextAction, recoverable, status) {
|
|
25
|
-
super(message);
|
|
26
|
-
this.code = code;
|
|
27
|
-
this.nextAction = nextAction;
|
|
28
|
-
this.recoverable = recoverable;
|
|
29
|
-
this.status = status;
|
|
30
|
-
this.name = 'RemoteSubmissionError';
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
11
|
/** Process-backed submission dependencies used outside tests. */
|
|
34
12
|
const defaultDependencies = {
|
|
35
13
|
createPaymentProvider,
|
|
@@ -235,4 +213,3 @@ function paymentRejected(response) {
|
|
|
235
213
|
: 'Mercator did not return a valid corrective Tempo charge challenge. This indicates a client/server payment-protocol mismatch. Run `mercator doctor`.';
|
|
236
214
|
return new Error(`Mercator rejected the payment credential (402). ${diagnostic} Then retry this command with the same idempotency key.`);
|
|
237
215
|
}
|
|
238
|
-
//# sourceMappingURL=submit.js.map
|