@easonwumac/computer-linker 0.1.2
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/CHANGELOG.md +230 -0
- package/LICENSE +21 -0
- package/README.md +539 -0
- package/SECURITY.md +48 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +360 -0
- package/dist/audit.d.ts +70 -0
- package/dist/audit.js +102 -0
- package/dist/capabilities.d.ts +98 -0
- package/dist/capabilities.js +718 -0
- package/dist/capability-policy.d.ts +22 -0
- package/dist/capability-policy.js +103 -0
- package/dist/chatgpt.d.ts +167 -0
- package/dist/chatgpt.js +561 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +4621 -0
- package/dist/client-smoke.d.ts +44 -0
- package/dist/client-smoke.js +639 -0
- package/dist/client.d.ts +217 -0
- package/dist/client.js +357 -0
- package/dist/codex-runs.d.ts +35 -0
- package/dist/codex-runs.js +66 -0
- package/dist/computer-contract.d.ts +33 -0
- package/dist/computer-contract.js +384 -0
- package/dist/computer-operation-registry.d.ts +45 -0
- package/dist/computer-operation-registry.js +179 -0
- package/dist/config-diagnostics.d.ts +11 -0
- package/dist/config-diagnostics.js +185 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.js +69 -0
- package/dist/history-insights.d.ts +132 -0
- package/dist/history-insights.js +457 -0
- package/dist/http-auth.d.ts +3 -0
- package/dist/http-auth.js +15 -0
- package/dist/mcp-surface.d.ts +5 -0
- package/dist/mcp-surface.js +25 -0
- package/dist/oauth-provider.d.ts +52 -0
- package/dist/oauth-provider.js +325 -0
- package/dist/package-metadata.d.ts +7 -0
- package/dist/package-metadata.js +24 -0
- package/dist/permissions.d.ts +43 -0
- package/dist/permissions.js +150 -0
- package/dist/platform-shell.d.ts +28 -0
- package/dist/platform-shell.js +124 -0
- package/dist/processes.d.ts +50 -0
- package/dist/processes.js +178 -0
- package/dist/profile.d.ts +159 -0
- package/dist/profile.js +416 -0
- package/dist/screenshot.d.ts +47 -0
- package/dist/screenshot.js +302 -0
- package/dist/search.d.ts +34 -0
- package/dist/search.js +340 -0
- package/dist/security.d.ts +10 -0
- package/dist/security.js +108 -0
- package/dist/sensitive-files.d.ts +4 -0
- package/dist/sensitive-files.js +96 -0
- package/dist/server.d.ts +9 -0
- package/dist/server.js +713 -0
- package/dist/service.d.ts +125 -0
- package/dist/service.js +486 -0
- package/dist/sessions.d.ts +26 -0
- package/dist/sessions.js +34 -0
- package/dist/tunnels.d.ts +161 -0
- package/dist/tunnels.js +1243 -0
- package/dist/workspace-operations.d.ts +170 -0
- package/dist/workspace-operations.js +3219 -0
- package/dist/workspaces.d.ts +61 -0
- package/dist/workspaces.js +353 -0
- package/docs/agent-instructions.md +65 -0
- package/docs/alpha-evidence.example.json +54 -0
- package/docs/api-compatibility.md +56 -0
- package/docs/architecture.md +561 -0
- package/docs/chatgpt-setup.md +397 -0
- package/docs/client-recipes.md +98 -0
- package/docs/client-sdk.md +163 -0
- package/docs/computer-operation-v1.schema.json +143 -0
- package/docs/manual-test-plan.md +322 -0
- package/docs/product-spec.md +911 -0
- package/docs/release-checklist.md +285 -0
- package/docs/service-mode.md +99 -0
- package/examples/minimal-mcp-client.mjs +114 -0
- package/package.json +87 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { type ChildProcess } from "node:child_process";
|
|
2
|
+
export type TunnelProviderName = "cloudflare" | "tailscale" | "openai";
|
|
3
|
+
export type TailscaleMode = "serve" | "funnel";
|
|
4
|
+
export type TunnelProviderMode = TailscaleMode | "quick-tunnel" | "secure-mcp-tunnel";
|
|
5
|
+
export interface TunnelOptions {
|
|
6
|
+
provider: TunnelProviderName;
|
|
7
|
+
localPort: number;
|
|
8
|
+
tailscaleMode?: TailscaleMode;
|
|
9
|
+
openaiTunnelId?: string;
|
|
10
|
+
openaiClientPath?: string;
|
|
11
|
+
ownerToken?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TunnelCommand {
|
|
14
|
+
provider: TunnelProviderName;
|
|
15
|
+
mode?: TunnelProviderMode;
|
|
16
|
+
command: string;
|
|
17
|
+
args: string[];
|
|
18
|
+
display: string;
|
|
19
|
+
env?: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
export interface TunnelToolStatus {
|
|
22
|
+
name: "cloudflared" | "tailscale" | "tunnel-client";
|
|
23
|
+
available: boolean;
|
|
24
|
+
version?: string;
|
|
25
|
+
status?: string;
|
|
26
|
+
error?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface TunnelDiagnostics {
|
|
29
|
+
tools: TunnelToolStatus[];
|
|
30
|
+
commands: TunnelCommand[];
|
|
31
|
+
providerContracts: TunnelProviderContract[];
|
|
32
|
+
providers: TunnelProviderStatus[];
|
|
33
|
+
publicBaseUrlConfigured: boolean;
|
|
34
|
+
publicBaseUrl?: string;
|
|
35
|
+
effectivePublicUrl?: string;
|
|
36
|
+
effectivePublicUrlSource?: "configured" | "running-tunnel";
|
|
37
|
+
}
|
|
38
|
+
export interface TunnelProviderContract {
|
|
39
|
+
provider: TunnelProviderName;
|
|
40
|
+
modes: TunnelProviderMode[];
|
|
41
|
+
commands: TunnelCommand[];
|
|
42
|
+
lifecycle: {
|
|
43
|
+
detect: true;
|
|
44
|
+
status: true;
|
|
45
|
+
expose: true;
|
|
46
|
+
getPublicUrl: true;
|
|
47
|
+
stop: true;
|
|
48
|
+
};
|
|
49
|
+
publicUrlSources: Array<"configured" | "running-tunnel">;
|
|
50
|
+
}
|
|
51
|
+
export interface TunnelProviderStatus {
|
|
52
|
+
provider: TunnelProviderName;
|
|
53
|
+
available: boolean;
|
|
54
|
+
publicUrl?: string;
|
|
55
|
+
publicUrlSource?: "configured" | "running-tunnel";
|
|
56
|
+
running: boolean;
|
|
57
|
+
runningProcessId?: string;
|
|
58
|
+
runningMode?: TunnelProviderMode;
|
|
59
|
+
status?: string;
|
|
60
|
+
error?: string;
|
|
61
|
+
commands: TunnelCommand[];
|
|
62
|
+
}
|
|
63
|
+
interface TunnelProviderStatusInput {
|
|
64
|
+
localPort: number;
|
|
65
|
+
publicBaseUrl?: string;
|
|
66
|
+
tunnels?: TunnelProcessSnapshot[];
|
|
67
|
+
openaiTunnelId?: string;
|
|
68
|
+
openaiClientPath?: string;
|
|
69
|
+
ownerToken?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface TunnelProvider {
|
|
72
|
+
name: TunnelProviderName;
|
|
73
|
+
detect(): TunnelToolStatus;
|
|
74
|
+
status(input: TunnelProviderStatusInput): TunnelProviderStatus;
|
|
75
|
+
command(options: TunnelOptions): TunnelCommand;
|
|
76
|
+
expose(options: TunnelOptions): ChildProcess;
|
|
77
|
+
getPublicUrl(input: TunnelProviderStatusInput): string | undefined;
|
|
78
|
+
stop(process: ChildProcess, signal?: NodeJS.Signals): void;
|
|
79
|
+
}
|
|
80
|
+
export declare function exposeWithTunnel(options: TunnelOptions): Promise<void>;
|
|
81
|
+
export declare function tunnelCommand(options: TunnelOptions): TunnelCommand;
|
|
82
|
+
export declare function tunnelDiagnostics(input: {
|
|
83
|
+
localPort: number;
|
|
84
|
+
publicBaseUrl?: string;
|
|
85
|
+
tunnels?: TunnelProcessSnapshot[];
|
|
86
|
+
openaiTunnelId?: string;
|
|
87
|
+
openaiClientPath?: string;
|
|
88
|
+
ownerToken?: string;
|
|
89
|
+
}): TunnelDiagnostics;
|
|
90
|
+
export declare function getTunnelProviders(): TunnelProvider[];
|
|
91
|
+
export declare function getTunnelProvider(name: TunnelProviderName): TunnelProvider;
|
|
92
|
+
export declare function tunnelProviderContracts(localPort: number): TunnelProviderContract[];
|
|
93
|
+
export interface OpenAiTunnelClientInstallInfo {
|
|
94
|
+
path: string;
|
|
95
|
+
source: "managed" | "downloaded" | "override";
|
|
96
|
+
version?: string;
|
|
97
|
+
releaseTag?: string;
|
|
98
|
+
releaseUrl?: string;
|
|
99
|
+
assetName?: string;
|
|
100
|
+
sha256?: string;
|
|
101
|
+
}
|
|
102
|
+
export declare function ensureOpenAiTunnelClientInstalled(options?: {
|
|
103
|
+
clientPath?: string;
|
|
104
|
+
}): Promise<OpenAiTunnelClientInstallInfo>;
|
|
105
|
+
export declare function openAiTunnelClientManagedPath(): string;
|
|
106
|
+
export declare function configuredOpenAiTunnelId(): string | undefined;
|
|
107
|
+
export declare function openAiTunnelHealthUrlFile(tunnelId: string): string;
|
|
108
|
+
export interface TunnelProcessSnapshot {
|
|
109
|
+
id: string;
|
|
110
|
+
provider: TunnelProviderName;
|
|
111
|
+
mode?: TunnelProviderMode;
|
|
112
|
+
localPort: number;
|
|
113
|
+
command: string;
|
|
114
|
+
args: string[];
|
|
115
|
+
display: string;
|
|
116
|
+
pid?: number;
|
|
117
|
+
startedAt: string;
|
|
118
|
+
endedAt?: string;
|
|
119
|
+
status: "running" | "exited";
|
|
120
|
+
exitCode: number | null;
|
|
121
|
+
signal?: string;
|
|
122
|
+
stdout: string;
|
|
123
|
+
stderr: string;
|
|
124
|
+
publicUrl?: string;
|
|
125
|
+
events?: TunnelRuntimeEvent[];
|
|
126
|
+
lastError?: string;
|
|
127
|
+
lastRecoveryAt?: string;
|
|
128
|
+
}
|
|
129
|
+
export type TunnelRuntimeEventKind = "process_started" | "process_exited" | "dispatcher_forwarded" | "dispatcher_acknowledged" | "mcp_upstream_error" | "controlplane_poll_failed" | "controlplane_recovered";
|
|
130
|
+
export interface TunnelRuntimeEvent {
|
|
131
|
+
timestamp: string;
|
|
132
|
+
provider: TunnelProviderName;
|
|
133
|
+
tunnelId: string;
|
|
134
|
+
localPort?: number;
|
|
135
|
+
pid?: number;
|
|
136
|
+
severity: "info" | "warn" | "error";
|
|
137
|
+
kind: TunnelRuntimeEventKind;
|
|
138
|
+
message: string;
|
|
139
|
+
detail?: string;
|
|
140
|
+
statusCode?: number;
|
|
141
|
+
status?: string;
|
|
142
|
+
rpcMethod?: string;
|
|
143
|
+
requestId?: string;
|
|
144
|
+
cmdRequestId?: string;
|
|
145
|
+
rpcRequestId?: string;
|
|
146
|
+
sessionId?: string;
|
|
147
|
+
tunnelRequestId?: string;
|
|
148
|
+
}
|
|
149
|
+
export declare function startTunnelProcess(options: TunnelOptions): TunnelProcessSnapshot;
|
|
150
|
+
export declare function stopTunnelProcess(id: string, signal?: string): Promise<TunnelProcessSnapshot>;
|
|
151
|
+
export declare function listTunnelProcesses(): TunnelProcessSnapshot[];
|
|
152
|
+
export declare function refreshTunnelPublicUrl(id: string): TunnelProcessSnapshot | undefined;
|
|
153
|
+
export declare function stopAllTunnelProcesses(signal?: string): Promise<TunnelProcessSnapshot[]>;
|
|
154
|
+
export declare function tunnelRuntimeEvents(snapshots?: TunnelProcessSnapshot[], options?: {
|
|
155
|
+
limit?: number;
|
|
156
|
+
includeInfo?: boolean;
|
|
157
|
+
}): TunnelRuntimeEvent[];
|
|
158
|
+
export declare function detectTailscalePublicUrl(): string | undefined;
|
|
159
|
+
export declare function tailscalePublicUrlFromFunnelStatus(output: string): string | undefined;
|
|
160
|
+
export declare function tailscalePublicUrlFromStatusJson(output: string): string | undefined;
|
|
161
|
+
export {};
|