constructor-research-mcp 0.0.0-stage → 0.3.0
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/INSTALL.md +145 -0
- package/LICENSE +21 -0
- package/README.md +320 -2
- package/dist/api.d.ts +66 -0
- package/dist/api.js +280 -0
- package/dist/config.d.ts +47 -0
- package/dist/config.js +127 -0
- package/dist/deployment.d.ts +94 -0
- package/dist/deployment.js +1233 -0
- package/dist/files.d.ts +122 -0
- package/dist/files.js +822 -0
- package/dist/location.d.ts +17 -0
- package/dist/location.js +60 -0
- package/dist/login.d.ts +2 -0
- package/dist/login.js +25 -0
- package/dist/logs.d.ts +59 -0
- package/dist/logs.js +330 -0
- package/dist/runtime.d.ts +23 -0
- package/dist/runtime.js +238 -0
- package/dist/schemas.d.ts +232 -0
- package/dist/schemas.js +277 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +351 -0
- package/dist/session.d.ts +21 -0
- package/dist/session.js +108 -0
- package/dist/set-token.d.ts +2 -0
- package/dist/set-token.js +48 -0
- package/dist/signin.d.ts +19 -0
- package/dist/signin.js +209 -0
- package/dist/store.d.ts +85 -0
- package/dist/store.js +150 -0
- package/dist/wait.d.ts +26 -0
- package/dist/wait.js +241 -0
- package/examples/claude-hooks.json +16 -0
- package/examples/claude.mcp.json +8 -0
- package/examples/codex-hooks.json +16 -0
- package/examples/codex.toml +6 -0
- package/examples/deploy-app.json +39 -0
- package/examples/opencode-plugin.js +43 -0
- package/examples/opencode-v2.json +11 -0
- package/examples/opencode.json +9 -0
- package/package.json +60 -4
package/dist/files.d.ts
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { PlatformApi } from "./api.js";
|
|
2
|
+
import type { DeploymentEngine } from "./deployment.js";
|
|
3
|
+
interface Entry {
|
|
4
|
+
path: string;
|
|
5
|
+
type: "file" | "folder";
|
|
6
|
+
size: number;
|
|
7
|
+
modified?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Exclude patterns from a .dockerignore in the build folder: files Docker would not send
|
|
11
|
+
* to the build are not uploaded. Files with "!" exceptions are not used (we cannot express them).
|
|
12
|
+
*/
|
|
13
|
+
export declare function dockerignore(folder: string): Promise<string[]>;
|
|
14
|
+
export declare class FileManager {
|
|
15
|
+
readonly api: PlatformApi;
|
|
16
|
+
readonly engine: DeploymentEngine;
|
|
17
|
+
/** Last write per disk. Builds started right after an upload failed live. */
|
|
18
|
+
private written;
|
|
19
|
+
/**
|
|
20
|
+
* Files this process uploaded or checksummed: desk|path -> content and the server's
|
|
21
|
+
* modified time. A repeat sync trusts them while size and modified time are unchanged
|
|
22
|
+
* instead of asking the server for a checksum again.
|
|
23
|
+
*/
|
|
24
|
+
private verified;
|
|
25
|
+
constructor(api: PlatformApi, engine: DeploymentEngine);
|
|
26
|
+
/** Milliseconds a build on this disk should still wait after the last upload. */
|
|
27
|
+
settleMs(desk: string): number;
|
|
28
|
+
/** One folder level; null when the folder does not exist. */
|
|
29
|
+
private folder;
|
|
30
|
+
/** Server-side SHA-256 of a file; null when the file is missing. */
|
|
31
|
+
private checksum;
|
|
32
|
+
/** Type of a path, or null when missing. */
|
|
33
|
+
private stat;
|
|
34
|
+
private mkcol;
|
|
35
|
+
list(raw: unknown): Promise<{
|
|
36
|
+
desk_id: string;
|
|
37
|
+
path: string;
|
|
38
|
+
entries: Entry[];
|
|
39
|
+
total: number;
|
|
40
|
+
truncated: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
createFolder(raw: unknown): Promise<{
|
|
43
|
+
status: string;
|
|
44
|
+
message: string;
|
|
45
|
+
path: string;
|
|
46
|
+
created: string[];
|
|
47
|
+
}>;
|
|
48
|
+
move(raw: unknown): Promise<{
|
|
49
|
+
status: string;
|
|
50
|
+
message: string;
|
|
51
|
+
moves: {
|
|
52
|
+
from: string;
|
|
53
|
+
to: string;
|
|
54
|
+
type: string | undefined;
|
|
55
|
+
}[];
|
|
56
|
+
issues: string[];
|
|
57
|
+
moved?: undefined;
|
|
58
|
+
} | {
|
|
59
|
+
moves?: undefined;
|
|
60
|
+
status: string;
|
|
61
|
+
message: string;
|
|
62
|
+
moved: string[];
|
|
63
|
+
issues: string[];
|
|
64
|
+
}>;
|
|
65
|
+
remove(raw: unknown): Promise<{
|
|
66
|
+
status: string;
|
|
67
|
+
message: string;
|
|
68
|
+
delete: {
|
|
69
|
+
path: string;
|
|
70
|
+
type: string;
|
|
71
|
+
files?: number;
|
|
72
|
+
folders?: number;
|
|
73
|
+
truncated?: boolean;
|
|
74
|
+
}[];
|
|
75
|
+
issues: string[];
|
|
76
|
+
deleted?: undefined;
|
|
77
|
+
} | {
|
|
78
|
+
delete?: undefined;
|
|
79
|
+
status: string;
|
|
80
|
+
message: string;
|
|
81
|
+
deleted: string[];
|
|
82
|
+
issues: string[];
|
|
83
|
+
}>;
|
|
84
|
+
sync(raw: unknown): Promise<{
|
|
85
|
+
new_files: string[];
|
|
86
|
+
changed_files: string[];
|
|
87
|
+
unchanged_count: number;
|
|
88
|
+
folders_to_create: string[];
|
|
89
|
+
conflicts: string[];
|
|
90
|
+
skipped: string[];
|
|
91
|
+
status: string;
|
|
92
|
+
message: string;
|
|
93
|
+
uploaded?: undefined;
|
|
94
|
+
failed?: undefined;
|
|
95
|
+
remaining_count?: undefined;
|
|
96
|
+
} | {
|
|
97
|
+
status: string;
|
|
98
|
+
message: string;
|
|
99
|
+
uploaded: string[];
|
|
100
|
+
failed: string[];
|
|
101
|
+
conflicts: string[];
|
|
102
|
+
skipped: string[];
|
|
103
|
+
unchanged_count: number;
|
|
104
|
+
remaining_count: number;
|
|
105
|
+
}>;
|
|
106
|
+
/** Check each build's Dockerfile on its disk before a build is submitted. */
|
|
107
|
+
preflight(project: string, sources: BuildSource[]): Promise<{
|
|
108
|
+
missing: string[];
|
|
109
|
+
warnings: string[];
|
|
110
|
+
}>;
|
|
111
|
+
/** Upload to a fresh temp file, move it over the target, then verify the server checksum. */
|
|
112
|
+
private upload;
|
|
113
|
+
}
|
|
114
|
+
/** Dockerfile problems the platform will not report clearly: wrong name, missing FROM/EXPOSE, localhost use. */
|
|
115
|
+
export declare function lintDockerfile(path: string, text: string, ports: number[]): string[];
|
|
116
|
+
export interface BuildSource {
|
|
117
|
+
service: string;
|
|
118
|
+
desk_id: string;
|
|
119
|
+
dockerfile: string;
|
|
120
|
+
ports: number[];
|
|
121
|
+
}
|
|
122
|
+
export {};
|