@agimon-ai/po-sandbox 0.0.0-alpha.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/LICENSE +21 -0
- package/README.md +170 -0
- package/dist/apiContracts.cjs +17 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +53 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +13 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/cockpitHarness.cjs +600 -0
- package/dist/cockpitHarness.cjs.map +1 -0
- package/dist/cockpitHarness.d.mts +41 -0
- package/dist/cockpitHarness.d.mts.map +1 -0
- package/dist/cockpitHarness.mjs +594 -0
- package/dist/cockpitHarness.mjs.map +1 -0
- package/dist/extensionService-CoqM-IE1.cjs +25 -0
- package/dist/extensionService-CoqM-IE1.cjs.map +1 -0
- package/dist/extensionService-FmuCugPK.mjs +20 -0
- package/dist/extensionService-FmuCugPK.mjs.map +1 -0
- package/dist/extensions/mcp.cjs +26 -0
- package/dist/extensions/mcp.cjs.map +1 -0
- package/dist/extensions/mcp.d.mts +5 -0
- package/dist/extensions/mcp.d.mts.map +1 -0
- package/dist/extensions/mcp.mjs +21 -0
- package/dist/extensions/mcp.mjs.map +1 -0
- package/dist/extensions/server.cjs +476 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +466 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.mts +22 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/sandboxBridge-77zC5pQR.mjs +13 -0
- package/dist/sandboxBridge-77zC5pQR.mjs.map +1 -0
- package/dist/sandboxBridge-Db6DubLC.cjs +81 -0
- package/dist/sandboxBridge-Db6DubLC.cjs.map +1 -0
- package/llms.txt +11 -0
- package/package.json +117 -0
- package/src/prompts/po-use-sandbox/SKILL.md +14 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
const BROKER_SOCKET_ENV = "PO_BROKER_SOCKET";
|
|
23
|
+
const BROKER_ADDRESS_ENV = "PO_BROKER_ADDRESS";
|
|
24
|
+
/** Hostname the engine maps to the host, used when the broker listens on TCP. */
|
|
25
|
+
const BROKER_HOST_GATEWAY = "host.docker.internal";
|
|
26
|
+
const BROKER_PORT_ENV = "PO_BROKER_PORT";
|
|
27
|
+
const BROKER_PROVIDERS_ENV = "PO_BROKER_PROVIDERS";
|
|
28
|
+
/** Fixed inside the container, which has its own loopback namespace. */
|
|
29
|
+
const BROKER_CONTAINER_PORT = 8317;
|
|
30
|
+
const BROKER_SOCKET_CONTAINER_PATH = "/run/po/broker.sock";
|
|
31
|
+
//#endregion
|
|
32
|
+
Object.defineProperty(exports, "BROKER_ADDRESS_ENV", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function() {
|
|
35
|
+
return BROKER_ADDRESS_ENV;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "BROKER_CONTAINER_PORT", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function() {
|
|
41
|
+
return BROKER_CONTAINER_PORT;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "BROKER_HOST_GATEWAY", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function() {
|
|
47
|
+
return BROKER_HOST_GATEWAY;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "BROKER_PORT_ENV", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function() {
|
|
53
|
+
return BROKER_PORT_ENV;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "BROKER_PROVIDERS_ENV", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function() {
|
|
59
|
+
return BROKER_PROVIDERS_ENV;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "BROKER_SOCKET_CONTAINER_PATH", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function() {
|
|
65
|
+
return BROKER_SOCKET_CONTAINER_PATH;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "BROKER_SOCKET_ENV", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function() {
|
|
71
|
+
return BROKER_SOCKET_ENV;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "__toESM", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function() {
|
|
77
|
+
return __toESM;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=sandboxBridge-Db6DubLC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sandboxBridge-Db6DubLC.cjs","names":[],"sources":["../src/services/sandboxBridge/index.ts"],"sourcesContent":["export const BRIDGE_FILE_NAME = 'sandbox-bridge.mjs';\nexport const BRIDGE_CONTAINER_PATH = `/opt/po/${BRIDGE_FILE_NAME}`;\nexport const BROKER_SOCKET_ENV = 'PO_BROKER_SOCKET';\nexport const BROKER_ADDRESS_ENV = 'PO_BROKER_ADDRESS';\n/** Hostname the engine maps to the host, used when the broker listens on TCP. */\nexport const BROKER_HOST_GATEWAY = 'host.docker.internal';\nexport const BROKER_PORT_ENV = 'PO_BROKER_PORT';\nexport const BROKER_PROVIDERS_ENV = 'PO_BROKER_PROVIDERS';\n/** Fixed inside the container, which has its own loopback namespace. */\nexport const BROKER_CONTAINER_PORT = 8317;\nexport const BROKER_SOCKET_CONTAINER_PATH = '/run/po/broker.sock';\n\n/**\n * Container-side forwarder from loopback TCP to the mounted broker socket.\n *\n * Provider SDKs issue ordinary HTTP through Node's global fetch, which cannot\n * address a unix socket, and on a virtual machine backed engine cannot reach\n * one at all. Forwarding raw bytes leaves every SDK unmodified whichever way\n * the broker listens. Wrapping the launcher rather than running as a separate\n * service ties the listener's lifetime to the session without an init process.\n */\nexport function sandboxBridgeSource(): string {\n return [\n \"import { spawn } from 'node:child_process';\",\n \"import net from 'node:net';\",\n '',\n `const socketPath = process.env.${BROKER_SOCKET_ENV};`,\n `const address = process.env.${BROKER_ADDRESS_ENV};`,\n `const port = Number(process.env.${BROKER_PORT_ENV});`,\n 'const [command, ...args] = process.argv.slice(2);',\n '',\n 'function startChild(whenDone) {',\n \" const child = spawn(command, args, { stdio: 'inherit' });\",\n \" child.on('exit', (code, signal) => whenDone(code ?? (signal ? 1 : 0)));\",\n \" child.on('error', (error) => {\",\n ' process.stderr.write(`[po] sandbox bridge: ${error.message}\\\\n`);',\n ' whenDone(127);',\n ' });',\n '}',\n '',\n 'function dialBroker() {',\n ' if (socketPath) return net.connect(socketPath);',\n \" const separator = address.lastIndexOf(':');\",\n ' return net.connect(Number(address.slice(separator + 1)), address.slice(0, separator));',\n '}',\n '',\n 'if ((!socketPath && !address) || !Number.isInteger(port)) {',\n ' startChild((code) => {',\n ' process.exitCode = code;',\n ' });',\n '} else {',\n ' const server = net.createServer((client) => {',\n ' const upstream = dialBroker();',\n \" client.on('error', () => upstream.destroy());\",\n \" upstream.on('error', () => client.destroy());\",\n ' client.pipe(upstream);',\n ' upstream.pipe(client);',\n ' });',\n \" server.listen(port, '127.0.0.1', () => {\",\n ' startChild((code) => {',\n ' server.close();',\n ' process.exitCode = code;',\n ' });',\n ' });',\n '}',\n '',\n ].join('\\n');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,MAAa,oBAAoB;AACjC,MAAa,qBAAqB;;AAElC,MAAa,sBAAsB;AACnC,MAAa,kBAAkB;AAC/B,MAAa,uBAAuB;;AAEpC,MAAa,wBAAwB;AACrC,MAAa,+BAA+B"}
|
package/llms.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @agimon-ai/po-sandbox
|
|
2
|
+
|
|
3
|
+
Package-owned guidance for Container sandbox for Po launches: the agent, extensions, and tools run inside Docker or Podman while the terminal stays on the host
|
|
4
|
+
|
|
5
|
+
## How to use
|
|
6
|
+
|
|
7
|
+
- [Use Sandbox](./src/prompts/po-use-sandbox/SKILL.md): Run the package command and follow its package-specific usage guidance.
|
|
8
|
+
|
|
9
|
+
## Resources
|
|
10
|
+
|
|
11
|
+
- [Package README](./README.md): Installation, development commands, Pi entrypoint, and extension-specific usage.
|
package/package.json
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agimon-ai/po-sandbox",
|
|
3
|
+
"version": "0.0.0-alpha.0",
|
|
4
|
+
"description": "Container sandbox for Po launches: the agent, extensions, and tools run inside Docker or Podman while the terminal stays on the host",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"coding-agent",
|
|
8
|
+
"container-sandbox",
|
|
9
|
+
"developer-tools",
|
|
10
|
+
"pi-coding-agent",
|
|
11
|
+
"pi-extension",
|
|
12
|
+
"pi-package",
|
|
13
|
+
"po",
|
|
14
|
+
"typescript"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://agimon.ai",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/AgiFlow/po/issues"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Vuong Ngo",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/AgiFlow/po.git",
|
|
25
|
+
"directory": "layers/sandbox/po-sandbox"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"src/prompts",
|
|
30
|
+
"llms.txt",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE",
|
|
33
|
+
"package.json"
|
|
34
|
+
],
|
|
35
|
+
"type": "module",
|
|
36
|
+
"main": "./dist/index.cjs",
|
|
37
|
+
"module": "./dist/index.mjs",
|
|
38
|
+
"types": "./dist/index.d.mts",
|
|
39
|
+
"jsnext:main": "./dist/index.mjs",
|
|
40
|
+
"exports": {
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./dist/index.d.mts",
|
|
43
|
+
"import": "./dist/index.mjs",
|
|
44
|
+
"require": "./dist/index.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./apiContracts": {
|
|
47
|
+
"types": "./dist/apiContracts.d.mts",
|
|
48
|
+
"import": "./dist/apiContracts.mjs",
|
|
49
|
+
"require": "./dist/apiContracts.cjs"
|
|
50
|
+
},
|
|
51
|
+
"./cockpitHarness": {
|
|
52
|
+
"types": "./dist/cockpitHarness.d.mts",
|
|
53
|
+
"import": "./dist/cockpitHarness.mjs",
|
|
54
|
+
"require": "./dist/cockpitHarness.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./extensions/server": {
|
|
57
|
+
"types": "./dist/extensions/server.d.mts",
|
|
58
|
+
"import": "./dist/extensions/server.mjs",
|
|
59
|
+
"require": "./dist/extensions/server.cjs"
|
|
60
|
+
},
|
|
61
|
+
"./package.json": "./package.json"
|
|
62
|
+
},
|
|
63
|
+
"publishConfig": {
|
|
64
|
+
"access": "public"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@agimon-ai/po-core": "0.0.0-alpha.0",
|
|
68
|
+
"@deepseek-ai/cordis": "4.0.4"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@agimon-ai/po-build": "0.0.0-alpha.0",
|
|
72
|
+
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.0-alpha.0",
|
|
73
|
+
"@earendil-works/pi-coding-agent": "1.0.2",
|
|
74
|
+
"@types/node": "26.6.4",
|
|
75
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
76
|
+
"tsdown": "0.23.0",
|
|
77
|
+
"typescript": "7.0.2",
|
|
78
|
+
"vitest": "5.0.3"
|
|
79
|
+
},
|
|
80
|
+
"peerDependencies": {
|
|
81
|
+
"@earendil-works/pi-coding-agent": "1.0.2"
|
|
82
|
+
},
|
|
83
|
+
"peerDependenciesMeta": {
|
|
84
|
+
"@earendil-works/pi-coding-agent": {
|
|
85
|
+
"optional": true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"engines": {
|
|
89
|
+
"node": ">=24"
|
|
90
|
+
},
|
|
91
|
+
"poMcp": {
|
|
92
|
+
"entry": "./generated/mcp.ts",
|
|
93
|
+
"dist": "./dist/extensions/mcp.mjs",
|
|
94
|
+
"scopes": [
|
|
95
|
+
"session"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"poServer": {
|
|
99
|
+
"entry": "./generated/server.ts",
|
|
100
|
+
"dist": "./dist/extensions/server.mjs",
|
|
101
|
+
"scopes": [
|
|
102
|
+
"session"
|
|
103
|
+
],
|
|
104
|
+
"contracts": {
|
|
105
|
+
"entry": "./src/exports/apiContracts.ts",
|
|
106
|
+
"dist": "./dist/apiContracts.mjs"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"scripts": {
|
|
110
|
+
"build": "tsdown && pnpm build:mcp",
|
|
111
|
+
"build:mcp": "tsdown --config tsdown.mcp.config.ts",
|
|
112
|
+
"test": "vitest --run",
|
|
113
|
+
"typecheck": "tsc --noEmit",
|
|
114
|
+
"lint": "oxlint . && oxfmt . --check",
|
|
115
|
+
"fixcode": "oxlint . --fix && oxfmt ."
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: po-use-sandbox
|
|
3
|
+
description: 'Use @agimon-ai/po-sandbox: Container sandbox for Po launches: the agent, extensions, and tools run inside Docker or Podman while the terminal stays on the host'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Use Sandbox
|
|
7
|
+
|
|
8
|
+
Read the package [README](../../../README.md) for its exact installation, command, configuration, and behavior.
|
|
9
|
+
|
|
10
|
+
## Guidance
|
|
11
|
+
|
|
12
|
+
- Use `/doom-sandbox` as the package's primary Pi entrypoint.
|
|
13
|
+
- Treat the package README and its linked resources as the source of truth for package-specific behavior.
|
|
14
|
+
- Do not require Po Help for runtime activation. Help only makes this package guidance discoverable while the minor mode is active.
|