@ours.network/codex 1.2.0-nightly.4 → 1.2.0-nightly.6
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/.codex-plugin/plugin.json +1 -1
- package/README.md +2 -2
- package/bin/proxy.mjs +1 -17
- package/dist/hooks-runner.mjs +537 -16435
- package/dist/host-hooks.mjs +425 -0
- package/dist/monitor-mcp.mjs +0 -3
- package/dist/network-watch.mjs +0 -3
- package/dist/profile.mjs +0 -3
- package/package.json +4 -3
- package/src/hooks/runner.mjs +7 -22
- package/src/host-hooks.mjs +25 -0
- package/bin/container-launch.mjs +0 -40
- package/dist/network-proxy.mjs +0 -16782
- package/src/network-proxy.mjs +0 -308
package/README.md
CHANGED
|
@@ -67,8 +67,8 @@ local-daemon precedence remains:
|
|
|
67
67
|
5. port `3050`
|
|
68
68
|
|
|
69
69
|
All MCP, hooks, unread, and watcher calls inherit the same selected profile. Host-profile
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
tools run in the local `@ours.network/mcp` stdio server included as a plugin dependency.
|
|
71
|
+
The MCP server calls the selected daemon's authenticated HTTP API through the SDK.
|
|
72
72
|
Example:
|
|
73
73
|
|
|
74
74
|
```sh
|
package/bin/proxy.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
|
-
import { existsSync
|
|
5
|
-
import { homedir } from 'node:os';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
6
5
|
import { dirname, join } from 'node:path';
|
|
7
6
|
import { fileURLToPath } from 'node:url';
|
|
8
7
|
|
|
@@ -15,21 +14,6 @@ const here = dirname(fileURLToPath(import.meta.url));
|
|
|
15
14
|
const env = { ...process.env };
|
|
16
15
|
|
|
17
16
|
async function main() {
|
|
18
|
-
const network = await import('../dist/network-proxy.mjs');
|
|
19
|
-
const profile = network.hostProfileFromEnv(env);
|
|
20
|
-
if (profile) {
|
|
21
|
-
const configPath = env.OURS_MCP_CONFIG || join(env.HOME || homedir(), '.ours-mcp', 'config.json');
|
|
22
|
-
const hostRecordRoot = dirname(configPath);
|
|
23
|
-
if (sessionEnd) {
|
|
24
|
-
const payload = JSON.parse(readFileSync(0, 'utf8') || '{}');
|
|
25
|
-
if (typeof payload.session_id !== 'string' || !payload.session_id) throw new Error('SessionEnd requires session_id.');
|
|
26
|
-
await network.endNetworkNativeSession({ profile, nativeSessionId: payload.session_id, hostRecordRoot });
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
await network.runNetworkProxy({ profile, hostRecordRoot, env });
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
17
|
let cliPath;
|
|
34
18
|
try { cliPath = require.resolve(spec); } catch { /* try plugin cache layouts */ }
|
|
35
19
|
if (!cliPath) {
|