constructor-research-mcp 0.6.4 → 0.6.7-beta.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 +2 -0
- package/README.md +44 -16
- package/dist/agents.d.ts +7 -2
- package/dist/agents.js +15 -4
- package/dist/api.d.ts +12 -0
- package/dist/api.js +64 -2
- package/dist/config.d.ts +6 -0
- package/dist/config.js +5 -0
- package/dist/deployment.d.ts +12 -0
- package/dist/deployment.js +210 -22
- package/dist/desk.d.ts +6 -0
- package/dist/desk.js +14 -0
- package/dist/diagnose.d.ts +57 -0
- package/dist/diagnose.js +183 -0
- package/dist/install.js +36 -5
- package/dist/key.d.ts +3 -1
- package/dist/key.js +8 -3
- package/dist/logs.d.ts +16 -0
- package/dist/logs.js +51 -3
- package/dist/runtime.js +8 -2
- package/dist/schemas.js +1 -2
- package/dist/server.js +11 -6
- package/dist/store.d.ts +25 -0
- package/dist/text.d.ts +6 -0
- package/dist/text.js +208 -0
- package/dist/wait.d.ts +6 -3
- package/dist/wait.js +8 -16
- package/examples/codex.toml +2 -0
- package/package.json +1 -1
package/dist/wait.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ export interface WaitResult {
|
|
|
22
22
|
/** Deployments still in progress that were touched in the last two hours. */
|
|
23
23
|
export declare function active(store: StateStore): Promise<string[]>;
|
|
24
24
|
export declare function waitFor(runtime: DeploymentRuntime, ids: string[], { maxMs, staleMs, pollMs }: WaitOptions): Promise<WaitResult>;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* What the waiter prints: the same text get_deployment returns for each deployment (text.ts),
|
|
27
|
+
* so both say the same thing.
|
|
28
|
+
*/
|
|
26
29
|
export declare function summary({ results, running }: WaitResult): string;
|
|
27
30
|
declare const HOOKS: {
|
|
28
31
|
readonly codex: {
|
|
@@ -31,7 +34,7 @@ declare const HOOKS: {
|
|
|
31
34
|
readonly entry: {
|
|
32
35
|
readonly hooks: readonly [{
|
|
33
36
|
readonly type: "command";
|
|
34
|
-
readonly command:
|
|
37
|
+
readonly command: `${string} --hook codex`;
|
|
35
38
|
readonly timeout: 600;
|
|
36
39
|
readonly statusMessage: "Waiting for Constructor deployments";
|
|
37
40
|
}];
|
|
@@ -45,7 +48,7 @@ declare const HOOKS: {
|
|
|
45
48
|
readonly matcher: "mcp__constructor-research__(deploy_app|update_app|build_image|start_app|stop_app|get_deployment)";
|
|
46
49
|
readonly hooks: readonly [{
|
|
47
50
|
readonly type: "command";
|
|
48
|
-
readonly command:
|
|
51
|
+
readonly command: `${string} --hook claude-code`;
|
|
49
52
|
readonly asyncRewake: true;
|
|
50
53
|
}];
|
|
51
54
|
};
|
package/dist/wait.js
CHANGED
|
@@ -12,13 +12,14 @@ import { homedir } from "node:os";
|
|
|
12
12
|
import { mkdir } from "node:fs/promises";
|
|
13
13
|
import { realpathSync } from "node:fs";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
|
-
import { configFromEnv } from "./config.js";
|
|
15
|
+
import { CHANNEL, configFromEnv } from "./config.js";
|
|
16
16
|
import { PlatformApi } from "./api.js";
|
|
17
17
|
import { StateStore } from "./store.js";
|
|
18
18
|
import { DeploymentEngine, terminal } from "./deployment.js";
|
|
19
19
|
import { DeploymentRuntime, paused } from "./runtime.js";
|
|
20
20
|
import { FileManager } from "./files.js";
|
|
21
21
|
import { LogFollower } from "./logs.js";
|
|
22
|
+
import { deployment } from "./text.js";
|
|
22
23
|
const ok = new Set(["started", "stopped", "built"]);
|
|
23
24
|
const ID = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;
|
|
24
25
|
export const EXIT = {
|
|
@@ -87,21 +88,12 @@ export async function waitFor(runtime, ids, { maxMs, staleMs = 60000, pollMs = 5
|
|
|
87
88
|
: EXIT.done,
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* What the waiter prints: the same text get_deployment returns for each deployment (text.ts),
|
|
93
|
+
* so both say the same thing.
|
|
94
|
+
*/
|
|
91
95
|
export function summary({ results, running }) {
|
|
92
|
-
const lines = results.map((r) =>
|
|
93
|
-
const services = (r.services ?? [])
|
|
94
|
-
.map((s) => `${s.name} ${s.status ?? ""}${s.public_url ? ` ${s.public_url}` : ""}`.trim())
|
|
95
|
-
.join(", ");
|
|
96
|
-
return [
|
|
97
|
-
`Deployment ${r.deployment_id}: ${r.status}.`,
|
|
98
|
-
r.message,
|
|
99
|
-
services && `Services: ${services}.`,
|
|
100
|
-
r.next_action && `Next: ${r.next_action}`,
|
|
101
|
-
]
|
|
102
|
-
.filter(Boolean)
|
|
103
|
-
.join(" ");
|
|
104
|
-
});
|
|
96
|
+
const lines = results.map((r) => deployment(r) + "\n");
|
|
105
97
|
for (const id of running)
|
|
106
98
|
lines.push(`Deployment ${id}: still in progress. Run the wait command again to keep waiting.`);
|
|
107
99
|
return lines.join("\n");
|
|
@@ -132,7 +124,7 @@ async function claim(dir, id) {
|
|
|
132
124
|
return () => unlink(file).catch(() => { });
|
|
133
125
|
}
|
|
134
126
|
/** The hook entry each client needs, as in examples/ (claude-hooks.json, codex-hooks.json). */
|
|
135
|
-
const HOOK =
|
|
127
|
+
const HOOK = `npx -y -p constructor-research-mcp@${CHANNEL} constructor-research-wait`;
|
|
136
128
|
const HOOKS = {
|
|
137
129
|
codex: {
|
|
138
130
|
file: () => join(process.env.CODEX_HOME ?? join(homedir(), ".codex"), "hooks.json"),
|
package/examples/codex.toml
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
[mcp_servers.constructor-research]
|
|
2
2
|
command = "npx"
|
|
3
3
|
args = ["-y", "constructor-research-mcp@latest"]
|
|
4
|
+
# Inside a Constructor desk: pass the desk and its access key on (Codex passes only a few variables).
|
|
5
|
+
env_vars = ["ROLOS_PROJECT_ID", "ROLOS_DESK_ID", "ROLOS_API_SERVER", "RESEARCH_PROJECT_ID", "RESEARCH_DESK_ID", "RESEARCH_API_SERVER", "RESEARCH_ACCESS_KEY"]
|
|
4
6
|
# The first start downloads the package.
|
|
5
7
|
startup_timeout_sec = 60
|
|
6
8
|
tool_timeout_sec = 30
|