@martinloop/mcp 0.5.1 → 0.5.5
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/README.md +52 -14
- package/dist/server-validation.js +2 -0
- package/dist/server.js +30 -3
- package/dist/tools/run-loop.d.ts +1 -0
- package/dist/tools/run-loop.js +25 -4
- package/dist/tools/tool-response.d.ts +9 -1
- package/dist/tools/tool-response.js +7 -5
- package/dist/tools/tool-support.js +62 -271
- package/dist/vendor/adapters/claude-cli.d.ts +9 -0
- package/dist/vendor/adapters/claude-cli.js +19 -2
- package/dist/vendor/adapters/codex-capabilities.d.ts +69 -0
- package/dist/vendor/adapters/codex-capabilities.js +265 -0
- package/dist/vendor/adapters/codex-cli.d.ts +23 -0
- package/dist/vendor/adapters/codex-cli.js +72 -0
- package/dist/vendor/adapters/codex-host.d.ts +107 -0
- package/dist/vendor/adapters/codex-host.js +595 -0
- package/dist/vendor/adapters/codex-launcher.d.ts +7 -135
- package/dist/vendor/adapters/codex-launcher.js +17 -766
- package/dist/vendor/adapters/index.d.ts +4 -2
- package/dist/vendor/adapters/index.js +4 -2
- package/dist/vendor/contracts/agent-execution.d.ts +9 -0
- package/dist/vendor/contracts/agent-execution.js +14 -0
- package/dist/vendor/contracts/index.d.ts +9 -0
- package/dist/vendor/contracts/index.js +1 -0
- package/dist/vendor/core/grounding.js +42 -7
- package/dist/vendor/core/index.d.ts +5 -2
- package/dist/vendor/core/index.js +12 -3
- package/dist/vendor/presentation/governed-plan.d.ts +33 -0
- package/dist/vendor/presentation/governed-plan.js +146 -0
- package/dist/vendor/presentation/index.d.ts +7 -0
- package/dist/vendor/presentation/index.js +7 -0
- package/dist/vendor/presentation/motion.d.ts +12 -0
- package/dist/vendor/presentation/motion.js +123 -0
- package/dist/vendor/presentation/status.d.ts +8 -0
- package/dist/vendor/presentation/status.js +11 -0
- package/dist/vendor/presentation/table.d.ts +11 -0
- package/dist/vendor/presentation/table.js +47 -0
- package/dist/vendor/presentation/text.d.ts +6 -0
- package/dist/vendor/presentation/text.js +30 -0
- package/dist/vendor/presentation/theme.d.ts +31 -0
- package/dist/vendor/presentation/theme.js +82 -0
- package/dist/vendor/presentation/verified-handoff.d.ts +15 -0
- package/dist/vendor/presentation/verified-handoff.js +151 -0
- package/package.json +3 -2
- package/server.json +2 -2
|
@@ -1,138 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface CliCommandAvailability {
|
|
3
|
-
command: string;
|
|
4
|
-
available: boolean;
|
|
5
|
-
locator: string;
|
|
6
|
-
detail: string;
|
|
7
|
-
resolvedPath?: string;
|
|
8
|
-
candidatePaths?: string[];
|
|
9
|
-
}
|
|
10
|
-
export type CodexHostPlatform = "windows" | "linux" | "wsl" | "macos";
|
|
11
|
-
export type CodexInstallKind = "missing" | "native" | "windows_shim" | "windows_mounted_path";
|
|
12
|
-
export type CodexInvocationMode = "direct" | "cmd_shell" | "powershell";
|
|
13
|
-
export interface CodexHostDiagnosis {
|
|
14
|
-
hostPlatform: CodexHostPlatform;
|
|
15
|
-
nativeInstallValid: boolean;
|
|
16
|
-
installKind: CodexInstallKind;
|
|
17
|
-
invocationMode: CodexInvocationMode;
|
|
18
|
-
sandboxMode: "workspace-write";
|
|
19
|
-
sandboxCompatible: boolean;
|
|
20
|
-
resolvedPath?: string;
|
|
21
|
-
nativeDependencyStatus?: "unknown" | "missing";
|
|
22
|
-
nativeDependencyPackage?: string;
|
|
23
|
-
warnings: string[];
|
|
24
|
-
remediation?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface CodexLaunchProbeResult {
|
|
27
|
-
ok: boolean;
|
|
28
|
-
summary: string;
|
|
29
|
-
availability: CliCommandAvailability;
|
|
30
|
-
diagnosis: CodexHostDiagnosis;
|
|
31
|
-
command: string;
|
|
32
|
-
args: string[];
|
|
33
|
-
exitCode?: number;
|
|
34
|
-
stdout?: string;
|
|
35
|
-
stderr?: string;
|
|
36
|
-
candidateProbeResults?: CodexProbeCandidateResult[];
|
|
37
|
-
}
|
|
38
|
-
export interface CodexExecArgsOptions {
|
|
39
|
-
workingDirectory: string;
|
|
40
|
-
sandbox?: "read-only" | "workspace-write" | "danger-full-access";
|
|
41
|
-
model?: string;
|
|
42
|
-
extraArgs?: string[];
|
|
43
|
-
mode?: "prompt" | "probe";
|
|
44
|
-
}
|
|
45
|
-
type SpawnSyncLike = typeof spawnSync;
|
|
1
|
+
import { type CodexExecArgsOptions } from "./codex-capabilities.js";
|
|
46
2
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
3
|
+
* Compatibility facade for callers that still populate the original
|
|
4
|
+
* `approval` profile field. Internally automation modes and approval policies
|
|
5
|
+
* remain separate capabilities, but either shape drives the same dynamic
|
|
6
|
+
* builder without restoring any hard-coded flag assumption.
|
|
49
7
|
*/
|
|
50
|
-
export interface CodexSandboxPreflightOk {
|
|
51
|
-
ok: true;
|
|
52
|
-
effectiveSandbox: "read-only" | "workspace-write";
|
|
53
|
-
capabilitySource: "probe";
|
|
54
|
-
writableRoot: string;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Outcome when the working directory cannot be written but workspace-write
|
|
58
|
-
* was requested. This is a first-class typed failure — distinct from a
|
|
59
|
-
* provider-unavailable or environment-mismatch error. No model call has
|
|
60
|
-
* been attempted when this is returned.
|
|
61
|
-
*/
|
|
62
|
-
export interface CodexSandboxPreflightReadOnly {
|
|
63
|
-
ok: false;
|
|
64
|
-
code: "provider_sandbox_read_only";
|
|
65
|
-
requestedCapability: "workspace-write";
|
|
66
|
-
detectedCapability: "read-only";
|
|
67
|
-
effectiveSandbox: "read-only";
|
|
68
|
-
affectedPath: string;
|
|
69
|
-
writableRoot: string;
|
|
70
|
-
capabilitySource: "probe";
|
|
71
|
-
remediation: string;
|
|
72
|
-
}
|
|
73
|
-
export type CodexSandboxPreflightOutcome = CodexSandboxPreflightOk | CodexSandboxPreflightReadOnly;
|
|
74
|
-
/**
|
|
75
|
-
* Probes whether the given directory is writable by the current process.
|
|
76
|
-
*
|
|
77
|
-
* Strategy: create a uniquely named temp file inside the directory, write a
|
|
78
|
-
* sentinel byte, then remove it. This is a real filesystem action — not an
|
|
79
|
-
* inference from binary metadata or launch-probe output.
|
|
80
|
-
*
|
|
81
|
-
* The probe leaves no file behind on either success or failure.
|
|
82
|
-
*
|
|
83
|
-
* Exported for unit testing with a real tmp directory.
|
|
84
|
-
*/
|
|
85
|
-
export declare function probeFilesystemWriteCapability(directory: string): {
|
|
86
|
-
writable: true;
|
|
87
|
-
} | {
|
|
88
|
-
writable: false;
|
|
89
|
-
reason: string;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Checks whether the requested sandbox mode is achievable for the given
|
|
93
|
-
* working directory. The adapter receives `requestedSandbox` from CLI/core —
|
|
94
|
-
* it does not decide the mode itself.
|
|
95
|
-
*
|
|
96
|
-
* When `requestedSandbox` is "workspace-write" and the working directory is not
|
|
97
|
-
* writable, this function returns `provider_sandbox_read_only` before any model
|
|
98
|
-
* execution is attempted.
|
|
99
|
-
*
|
|
100
|
-
* When `requestedSandbox` is "read-only" no write probe is performed; the
|
|
101
|
-
* outcome is `ok: true, effectiveSandbox: "read-only"` immediately.
|
|
102
|
-
*/
|
|
103
|
-
export declare function checkCodexSandboxPreflight(input: {
|
|
104
|
-
requestedSandbox: "read-only" | "workspace-write";
|
|
105
|
-
workingDirectory: string;
|
|
106
|
-
}): CodexSandboxPreflightOutcome;
|
|
107
|
-
export interface CodexProbeCandidateResult {
|
|
108
|
-
path: string;
|
|
109
|
-
installKind: CodexInstallKind;
|
|
110
|
-
invocationMode: CodexInvocationMode;
|
|
111
|
-
nativeInstallValid: boolean;
|
|
112
|
-
sandboxCompatible: boolean;
|
|
113
|
-
launchReady: boolean;
|
|
114
|
-
summary: string;
|
|
115
|
-
remediation?: string;
|
|
116
|
-
nativeDependencyStatus?: "unknown" | "missing";
|
|
117
|
-
nativeDependencyPackage?: string;
|
|
118
|
-
}
|
|
119
8
|
export declare function buildCodexExecArgs(options: CodexExecArgsOptions): string[];
|
|
120
|
-
export
|
|
121
|
-
|
|
122
|
-
env?: NodeJS.ProcessEnv;
|
|
123
|
-
spawnSyncImpl?: SpawnSyncLike;
|
|
124
|
-
}): CliCommandAvailability;
|
|
125
|
-
export declare function detectCodexHostPlatform(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): CodexHostPlatform;
|
|
126
|
-
export declare function diagnoseCodexHost(availability: CliCommandAvailability, options?: {
|
|
127
|
-
env?: NodeJS.ProcessEnv;
|
|
128
|
-
platform?: NodeJS.Platform;
|
|
129
|
-
}): CodexHostDiagnosis;
|
|
130
|
-
export declare function probeCodexLaunch(input: {
|
|
131
|
-
workingDirectory: string;
|
|
132
|
-
availability?: CliCommandAvailability;
|
|
133
|
-
env?: NodeJS.ProcessEnv;
|
|
134
|
-
platform?: NodeJS.Platform;
|
|
135
|
-
spawnSyncImpl?: SpawnSyncLike;
|
|
136
|
-
model?: string;
|
|
137
|
-
}): CodexLaunchProbeResult;
|
|
138
|
-
export {};
|
|
9
|
+
export { buildCodexStdin, cacheCodexCapabilityProfile, clearCodexCapabilityCacheForTests, codexWriteStrategies, probeCodexCapabilities, resolveCodexAutonomyCandidates, type CodexAutonomyResolution, type CodexApprovalCapability, type CodexCapabilityFlag, type CodexCapabilityProfile, type CodexExecArgsOptions, type CodexFlagScope, type CodexPromptTransport, type CodexSandboxCapability, type CodexWriteStrategy } from "./codex-capabilities.js";
|
|
10
|
+
export { checkCodexSandboxPreflight, detectCodexHostPlatform, diagnoseCodexHost, probeCodexLaunch, probeFilesystemWriteCapability, resolveCliCommandAvailability, type CliCommandAvailability, type CodexHostDiagnosis, type CodexHostPlatform, type CodexInstallKind, type CodexInvocationMode, type CodexLaunchProbeResult, type CodexProbeCandidateResult, type CodexSandboxPreflightOk, type CodexSandboxPreflightOutcome, type CodexSandboxPreflightReadOnly } from "./codex-host.js";
|