agent-dev-env 0.1.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/dist/assets/bridge/bridge.js +202 -0
- package/dist/assets/guest/guest-agent-mac.js +586 -0
- package/dist/assets/guest/guest-agent-ubuntu.js +481 -0
- package/dist/assets/guest/guest-agent-windows.js +466 -0
- package/dist/assets/images/mac/CHANGELOG.md +265 -0
- package/dist/assets/images/mac/README.md +63 -0
- package/dist/assets/images/mac/sandbox.pkr.hcl +468 -0
- package/dist/assets/images/mac/vars/sandbox-macos-tahoe.pkrvars.hcl +39 -0
- package/dist/assets/images/ubuntu-arm64-vmware/CHANGELOG.md +239 -0
- package/dist/assets/images/ubuntu-arm64-vmware/README.md +177 -0
- package/dist/assets/images/ubuntu-arm64-vmware/autoinstall/meta-data +2 -0
- package/dist/assets/images/ubuntu-arm64-vmware/autoinstall/user-data +34 -0
- package/dist/assets/images/ubuntu-arm64-vmware/sandbox.pkr.hcl +776 -0
- package/dist/assets/images/ubuntu-arm64-vmware/vars/sandbox-ubuntu-24-04-arm64-vmware.pkrvars.hcl +71 -0
- package/dist/assets/images/windows-arm64-qemu/CHANGELOG.md +209 -0
- package/dist/assets/images/windows-arm64-qemu/README.md +142 -0
- package/dist/assets/images/windows-arm64-qemu/autounattend.xml +325 -0
- package/dist/assets/images/windows-arm64-qemu/qemu-with-tpm.sh +170 -0
- package/dist/assets/images/windows-arm64-qemu/sandbox.pkr.hcl +1012 -0
- package/dist/assets/images/windows-arm64-qemu/vars/sandbox-windows-11-arm64-qemu.pkrvars.hcl +83 -0
- package/dist/assets/images/windows-arm64-vmware/CHANGELOG.md +270 -0
- package/dist/assets/images/windows-arm64-vmware/README.md +171 -0
- package/dist/assets/images/windows-arm64-vmware/autounattend.xml +311 -0
- package/dist/assets/images/windows-arm64-vmware/sandbox.pkr.hcl +1036 -0
- package/dist/assets/images/windows-arm64-vmware/vars/sandbox-windows-11-arm64-vmware.pkrvars.hcl +83 -0
- package/dist/assets/rules/agent-rules-linux.md +68 -0
- package/dist/assets/rules/agent-rules.md +71 -0
- package/dist/assets/watchdog/watch-build-ocr.swift +40 -0
- package/dist/assets/watchdog/watch-build.py +275 -0
- package/dist/cli.js +52 -0
- package/dist/commands/delete.js +179 -0
- package/dist/commands/doctor.js +165 -0
- package/dist/commands/list.js +38 -0
- package/dist/commands/not-yet.js +15 -0
- package/dist/commands/register.js +150 -0
- package/dist/commands/run.js +65 -0
- package/dist/commands/status.js +142 -0
- package/dist/commands/stop.js +186 -0
- package/dist/commands/sync.js +98 -0
- package/dist/lib/exec.js +250 -0
- package/dist/lib/ghcr.js +82 -0
- package/dist/lib/git.js +100 -0
- package/dist/lib/logger.js +87 -0
- package/dist/lib/network.js +63 -0
- package/dist/lib/paths.js +116 -0
- package/dist/lib/platform.js +87 -0
- package/dist/lib/prompt.js +66 -0
- package/dist/lib/qemu.js +373 -0
- package/dist/lib/regex.js +9 -0
- package/dist/lib/ssh.js +230 -0
- package/dist/lib/tart.js +210 -0
- package/dist/lib/template.js +35 -0
- package/dist/lib/vars.js +99 -0
- package/dist/lib/vmrun.js +334 -0
- package/dist/lifecycle/build-macos.js +23 -0
- package/dist/lifecycle/build-qemu.js +204 -0
- package/dist/lifecycle/build-shared.js +355 -0
- package/dist/lifecycle/build-ubuntu.js +184 -0
- package/dist/lifecycle/build-watchdog.js +146 -0
- package/dist/lifecycle/build-windows-vmware.js +112 -0
- package/dist/lifecycle/build.js +55 -0
- package/dist/lifecycle/catalog.js +165 -0
- package/dist/lifecycle/deploy.js +161 -0
- package/dist/lifecycle/tag.js +77 -0
- package/dist/lifecycle/watch-build.js +64 -0
- package/dist/runners/bridges.js +153 -0
- package/dist/runners/framework.js +66 -0
- package/dist/runners/macos-bridges.js +143 -0
- package/dist/runners/macos-guest.js +76 -0
- package/dist/runners/macos-rules.js +77 -0
- package/dist/runners/macos-summary.js +145 -0
- package/dist/runners/macos.js +258 -0
- package/dist/runners/openchamber.js +60 -0
- package/dist/runners/options.js +56 -0
- package/dist/runners/qemu-image.js +183 -0
- package/dist/runners/rules.js +49 -0
- package/dist/runners/ubuntu-bridges.js +154 -0
- package/dist/runners/ubuntu-guest.js +136 -0
- package/dist/runners/ubuntu-image.js +26 -0
- package/dist/runners/ubuntu-rules.js +86 -0
- package/dist/runners/ubuntu-shared.js +65 -0
- package/dist/runners/ubuntu-summary.js +141 -0
- package/dist/runners/ubuntu.js +117 -0
- package/dist/runners/vmware-common.js +158 -0
- package/dist/runners/vmware-image.js +242 -0
- package/dist/runners/windows-autologon.js +119 -0
- package/dist/runners/windows-bridges.js +136 -0
- package/dist/runners/windows-guest.js +213 -0
- package/dist/runners/windows-image.js +23 -0
- package/dist/runners/windows-qemu-summary.js +85 -0
- package/dist/runners/windows-qemu.js +189 -0
- package/dist/runners/windows-shared.js +68 -0
- package/dist/runners/windows-summary.js +104 -0
- package/dist/runners/windows.js +96 -0
- package/dist/settings/common.js +107 -0
- package/dist/settings/macos-copy.js +223 -0
- package/dist/settings/macos.js +41 -0
- package/dist/settings/ubuntu-copy.js +223 -0
- package/dist/settings/ubuntu.js +68 -0
- package/package.json +52 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// settings/ubuntu-copy.ts — the IO half of the Ubuntu user-settings
|
|
2
|
+
// copy: stage the host settings into the guest's layout, tar them
|
|
3
|
+
// locally (--no-xattrs, AppleDouble stripped), move the archive over
|
|
4
|
+
// SFTP and unpack with ssh exec (the legacy scp + settings_ssh flow, now
|
|
5
|
+
// ssh2). The marker-gated `ensure` flow and the on-demand `sync` flow
|
|
6
|
+
// mirror settings/macos-copy.ts — only the transport differs.
|
|
7
|
+
//
|
|
8
|
+
// The guest-side unpack needs the user's password for `sudo -S` (the
|
|
9
|
+
// image up to this release shipped root-owned ~/.local); callers hold
|
|
10
|
+
// the credentials and pass the password through.
|
|
11
|
+
import { cpSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync, } from 'node:fs';
|
|
12
|
+
import { homedir, tmpdir } from 'node:os';
|
|
13
|
+
import { dirname, join } from 'node:path';
|
|
14
|
+
import { run } from '../lib/exec.js';
|
|
15
|
+
import { logger } from '../lib/logger.js';
|
|
16
|
+
import { confirm } from '../lib/prompt.js';
|
|
17
|
+
import { sanitizeGitconfig } from './common.js';
|
|
18
|
+
import { collectSettingsFiles, guestSettingsCheckScript, guestSettingsMarkerScript, guestUnpackScript, GUEST_HOME, mapGuestPath, openchamberRestartCommand, SETTINGS_VERSION, } from './ubuntu.js';
|
|
19
|
+
/** True when the guest already has settings of the current version
|
|
20
|
+
* (numeric marker compare, like the shell's `-ge`).
|
|
21
|
+
*
|
|
22
|
+
* @param session - The connected guest session.
|
|
23
|
+
* @returns True when the marker is current.
|
|
24
|
+
*/
|
|
25
|
+
async function guestSettingsUpToDate(session) {
|
|
26
|
+
const res = await session.exec(`sh -s ${SETTINGS_VERSION}`, {
|
|
27
|
+
input: guestSettingsCheckScript(),
|
|
28
|
+
});
|
|
29
|
+
return res.code === 0;
|
|
30
|
+
}
|
|
31
|
+
/** @internal — copies one host file into the staged guest tree.
|
|
32
|
+
*
|
|
33
|
+
* @param home - The host home directory.
|
|
34
|
+
* @param tree - The staging tree root.
|
|
35
|
+
* @param file - The path relative to home (host layout).
|
|
36
|
+
* @returns True when staged.
|
|
37
|
+
*/
|
|
38
|
+
function stageFile(home, tree, file) {
|
|
39
|
+
const target = join(tree, mapGuestPath(file));
|
|
40
|
+
try {
|
|
41
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
42
|
+
cpSync(join(home, file), target, { recursive: true, preserveTimestamps: true });
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
logger.warn(`could not stage ${file} — continuing.`);
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** @internal — sanitizes the host .gitconfig into the tree (host home →
|
|
51
|
+
* guest home, mode preserved); falls back to shipping it as-is.
|
|
52
|
+
*
|
|
53
|
+
* @param home - The host home directory.
|
|
54
|
+
* @param tree - The staging tree root.
|
|
55
|
+
* @returns True when staged.
|
|
56
|
+
*/
|
|
57
|
+
function stageGitconfig(home, tree) {
|
|
58
|
+
const source = join(home, '.gitconfig');
|
|
59
|
+
const target = join(tree, '.gitconfig');
|
|
60
|
+
try {
|
|
61
|
+
const sanitized = sanitizeGitconfig(readFileSync(source, 'utf8'), home, GUEST_HOME);
|
|
62
|
+
const { mode } = statSync(source);
|
|
63
|
+
writeFileSync(target, sanitized, { mode: mode & 0o777 });
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
logger.warn('could not sanitize .gitconfig — shipping it as-is.');
|
|
68
|
+
return stageFile(home, tree, '.gitconfig');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** @internal — removes AppleDouble companions and .DS_Store from the
|
|
72
|
+
* staged tree (legacy junk Linux does not need; packed, they made some
|
|
73
|
+
* guests' tar abort). */
|
|
74
|
+
function stripAppleDouble(dir) {
|
|
75
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
76
|
+
const full = join(dir, entry.name);
|
|
77
|
+
if (entry.isDirectory()) {
|
|
78
|
+
stripAppleDouble(full);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
if (entry.name.startsWith('._') || entry.name === '.DS_Store') {
|
|
82
|
+
rmSync(full, { force: true });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** Copies the settings into the guest: staged tree → tar.gz → sftp →
|
|
87
|
+
* unpack + cleanup, then the version marker (the legacy dance, with the
|
|
88
|
+
* password piped into sudo -S for the root-owned ~/.local fix).
|
|
89
|
+
*
|
|
90
|
+
* @param session - The connected guest session.
|
|
91
|
+
* @param files - The settings paths (relative to the host home).
|
|
92
|
+
* @param home - The host home directory.
|
|
93
|
+
* @param password - The guest user's password (sudo -S).
|
|
94
|
+
* @throws Error when the pack, upload, unpack or marker write fails.
|
|
95
|
+
*/
|
|
96
|
+
async function copySettingsToGuest(session, files, home, password) {
|
|
97
|
+
const staging = mkdtempSync(join(tmpdir(), 'agent-dev-env-settings.'));
|
|
98
|
+
try {
|
|
99
|
+
const tree = join(staging, 'tree');
|
|
100
|
+
mkdirSync(tree, { recursive: true });
|
|
101
|
+
let copied = 0;
|
|
102
|
+
for (const file of files) {
|
|
103
|
+
if (file === '.gitconfig') {
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (stageFile(home, tree, file)) {
|
|
107
|
+
copied += 1;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (files.includes('.gitconfig') && stageGitconfig(home, tree)) {
|
|
111
|
+
copied += 1;
|
|
112
|
+
}
|
|
113
|
+
if (copied === 0) {
|
|
114
|
+
throw new Error('nothing was staged — no settings to copy.');
|
|
115
|
+
}
|
|
116
|
+
stripAppleDouble(tree);
|
|
117
|
+
const archive = join(staging, 'settings.tar.gz');
|
|
118
|
+
const pack = await run('tar', ['--no-xattrs', '-czf', archive, '-C', tree, '.']);
|
|
119
|
+
if (pack.code !== 0) {
|
|
120
|
+
throw new Error('could not pack the staged settings.');
|
|
121
|
+
}
|
|
122
|
+
await session.sftpWrite('/tmp/agent-sandbox-settings.tar.gz', readFileSync(archive));
|
|
123
|
+
const unpack = await session.exec(guestUnpackScript(password));
|
|
124
|
+
if (unpack.code !== 0) {
|
|
125
|
+
throw new Error(`could not unpack the settings in the guest:\n${unpack.stderr.trim()}`);
|
|
126
|
+
}
|
|
127
|
+
const marker = await session.exec(`sh -s ${SETTINGS_VERSION}`, {
|
|
128
|
+
input: guestSettingsMarkerScript(),
|
|
129
|
+
});
|
|
130
|
+
if (marker.code !== 0) {
|
|
131
|
+
throw new Error('settings were copied, but the version marker could not be written — ' +
|
|
132
|
+
'they will be offered again on the next run.');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
finally {
|
|
136
|
+
rmSync(staging, { recursive: true, force: true });
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/** Restarts OpenChamber so a fresh settings copy takes effect (the
|
|
140
|
+
* systemd user service; non-fatal — warns on failure like the shell).
|
|
141
|
+
*
|
|
142
|
+
* @param session - The connected guest session.
|
|
143
|
+
* @returns True when restarted.
|
|
144
|
+
*/
|
|
145
|
+
export async function restartOpenchamber(session) {
|
|
146
|
+
const res = await session.exec(openchamberRestartCommand());
|
|
147
|
+
if (res.code !== 0) {
|
|
148
|
+
logger.warn('could not restart OpenChamber — it will pick up the new settings on its next start.');
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
logger.ok('Restarted OpenChamber so it picks up the new user settings.');
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
/** Prints the file list and asks the standard confirmation.
|
|
155
|
+
*
|
|
156
|
+
* @param home - The host home directory (display paths).
|
|
157
|
+
* @param files - The settings paths.
|
|
158
|
+
* @param yes - Skip the confirmation.
|
|
159
|
+
* @returns True when the user confirmed.
|
|
160
|
+
*/
|
|
161
|
+
async function confirmSettingsCopy(home, files, yes) {
|
|
162
|
+
logger.info("Found on the host — will copy into the guest's home directory:");
|
|
163
|
+
for (const file of files) {
|
|
164
|
+
logger.info(` ${join(home, file)}`);
|
|
165
|
+
}
|
|
166
|
+
if (yes) {
|
|
167
|
+
return true;
|
|
168
|
+
}
|
|
169
|
+
return confirm('Copy these user settings into the guest?', { default: 'y' });
|
|
170
|
+
}
|
|
171
|
+
/** The run step: marker-gated copy (offered once per settings version).
|
|
172
|
+
*
|
|
173
|
+
* @param session - The connected guest session.
|
|
174
|
+
* @param home - The host home directory.
|
|
175
|
+
* @param yes - Skip confirmations.
|
|
176
|
+
* @param password - The guest user's password (sudo -S).
|
|
177
|
+
* @returns The step outcome (see SettingsState).
|
|
178
|
+
*/
|
|
179
|
+
export async function ensureUserSettings(session, home = homedir(), yes = false, password = '') {
|
|
180
|
+
if (await guestSettingsUpToDate(session)) {
|
|
181
|
+
logger.ok(`User settings are already in the guest (version ${SETTINGS_VERSION}) — skipping.`);
|
|
182
|
+
return 'uptodate';
|
|
183
|
+
}
|
|
184
|
+
const files = collectSettingsFiles(home);
|
|
185
|
+
if (files.length === 0) {
|
|
186
|
+
logger.info('No user settings found on the host (opencode config and auth, ' +
|
|
187
|
+
'OpenCodeReview config, Copilot config, VS Code config and extensions, ' +
|
|
188
|
+
'~/.ssh, ~/.gitconfig) — nothing to copy.');
|
|
189
|
+
return 'none';
|
|
190
|
+
}
|
|
191
|
+
if (!(await confirmSettingsCopy(home, files, yes))) {
|
|
192
|
+
logger.info('Skipped — re-run `agent-dev-env run` to copy them later.');
|
|
193
|
+
return 'declined';
|
|
194
|
+
}
|
|
195
|
+
await copySettingsToGuest(session, files, home, password);
|
|
196
|
+
logger.ok(`Copied ${files.length} item(s) into the guest.`);
|
|
197
|
+
return 'copied';
|
|
198
|
+
}
|
|
199
|
+
/** The `sync` flow: always copies (no marker gate) + restarts OpenChamber.
|
|
200
|
+
*
|
|
201
|
+
* @param session - The connected guest session.
|
|
202
|
+
* @param home - The host home directory.
|
|
203
|
+
* @param yes - Skip confirmations.
|
|
204
|
+
* @param password - The guest user's password (sudo -S).
|
|
205
|
+
* @returns The outcome (copied | none | declined | failed).
|
|
206
|
+
*/
|
|
207
|
+
export async function syncUserSettings(session, home = homedir(), yes = false, password = '') {
|
|
208
|
+
const files = collectSettingsFiles(home);
|
|
209
|
+
if (files.length === 0) {
|
|
210
|
+
logger.info('No user settings found on the host (opencode config and auth, ' +
|
|
211
|
+
'OpenCodeReview config, Copilot config, VS Code config and extensions, ' +
|
|
212
|
+
'~/.ssh, ~/.gitconfig) — nothing to copy.');
|
|
213
|
+
return 'none';
|
|
214
|
+
}
|
|
215
|
+
if (!(await confirmSettingsCopy(home, files, yes))) {
|
|
216
|
+
logger.info('Skipped — re-run `agent-dev-env sync` to copy them later.');
|
|
217
|
+
return 'declined';
|
|
218
|
+
}
|
|
219
|
+
await copySettingsToGuest(session, files, home, password);
|
|
220
|
+
logger.ok(`Copied ${files.length} item(s) into the guest (version ${SETTINGS_VERSION}).`);
|
|
221
|
+
await restartOpenchamber(session);
|
|
222
|
+
return 'copied';
|
|
223
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// settings/ubuntu.ts — the Ubuntu user-settings copy: the pure builders
|
|
2
|
+
// (version, guest home, host→guest path mapping) — port of
|
|
3
|
+
// scripts/lib/ubuntu-vmware/settings.sh, with the marker moved to the
|
|
4
|
+
// green-field `~/.config/agent-dev-env/` path (AGENTS.md conventions).
|
|
5
|
+
//
|
|
6
|
+
// The IO half (stage tree → tar.gz → sftp → unpack over ssh2) lives in
|
|
7
|
+
// ubuntu-copy.ts; this module stays free of process spawning so the
|
|
8
|
+
// mapping is unit-testable. The candidate file set, the marker scripts
|
|
9
|
+
// and the .gitconfig sanitization are shared with macOS (common.ts) —
|
|
10
|
+
// the two backends differ in version, guest home and transport only.
|
|
11
|
+
export { collectSettingsFiles, guestSettingsCheckScript, guestSettingsMarkerScript, } from './common.js';
|
|
12
|
+
/** Version of the settings copy. Bump when the file set or the copy logic
|
|
13
|
+
* changes: guests whose marker is older are offered the copy again. */
|
|
14
|
+
export const SETTINGS_VERSION = 3;
|
|
15
|
+
/** The sandbox user in the Ubuntu base image — fixed, so host home paths
|
|
16
|
+
* are rewritten to it when the settings are copied (see sanitize). */
|
|
17
|
+
export const GUEST_HOME = '/home/admin';
|
|
18
|
+
/** Maps a host (macOS) settings path to the guest (Linux) layout. Two
|
|
19
|
+
* paths move on Linux:
|
|
20
|
+
* - the VS Code user config (macOS `Library/Application Support/Code/
|
|
21
|
+
* User/`) lands in `~/.config/Code/User/`,
|
|
22
|
+
* - the mcp-compress-router settings (also under Library/Application
|
|
23
|
+
* Support/) land in `~/.local/share/mcp-compress-router/` — its Linux
|
|
24
|
+
* XDG *data* dir, the only place it reads mcp.json/.jsonc from.
|
|
25
|
+
* Everything else keeps the same relative path.
|
|
26
|
+
*
|
|
27
|
+
* @param hostPath - The path relative to the host $HOME.
|
|
28
|
+
* @returns The path relative to the guest home.
|
|
29
|
+
*/
|
|
30
|
+
export function mapGuestPath(hostPath) {
|
|
31
|
+
const codeUser = 'Library/Application Support/Code/User/';
|
|
32
|
+
if (hostPath.startsWith(codeUser)) {
|
|
33
|
+
return `.config/Code/User/${hostPath.slice(codeUser.length)}`;
|
|
34
|
+
}
|
|
35
|
+
if (hostPath.startsWith('Library/Application Support/mcp-compress-router')) {
|
|
36
|
+
return '.local/share/mcp-compress-router';
|
|
37
|
+
}
|
|
38
|
+
return hostPath;
|
|
39
|
+
}
|
|
40
|
+
/** The guest-side settings unpack + cleanup — `sh -c` over ssh exec.
|
|
41
|
+
* Runs with the user's password piped into `sudo -S` (legacy flow: the
|
|
42
|
+
* image up to this release shipped root-owned ~/.local).
|
|
43
|
+
*
|
|
44
|
+
* @param password - The guest user's password (sudo -S input).
|
|
45
|
+
* @returns The script text.
|
|
46
|
+
*/
|
|
47
|
+
export function guestUnpackScript(password) {
|
|
48
|
+
return [
|
|
49
|
+
'printf "%s\\n" "' +
|
|
50
|
+
password +
|
|
51
|
+
'" | sudo -S chown -R "$USER:$USER" "$HOME/.local" 2>/dev/null || true',
|
|
52
|
+
'tar -C "$HOME" -xzf /tmp/agent-sandbox-settings.tar.gz || exit 1',
|
|
53
|
+
'rm -rf "$HOME/.config/mcp-compress-router" 2>/dev/null || true',
|
|
54
|
+
'find "$HOME/.local" "$HOME/.config" "$HOME/.copilot" "$HOME/.opencodereview" "$HOME/.ssh" ' +
|
|
55
|
+
'-name "._*" -delete 2>/dev/null || true',
|
|
56
|
+
'chmod 700 "$HOME/.ssh" 2>/dev/null || true',
|
|
57
|
+
'rm -f /tmp/agent-sandbox-settings.tar.gz',
|
|
58
|
+
'',
|
|
59
|
+
].join('\n');
|
|
60
|
+
}
|
|
61
|
+
/** The guest-side OpenChamber restart (the systemd user service; the
|
|
62
|
+
* login-shell PATH comes from /etc/profile.d at boot).
|
|
63
|
+
*
|
|
64
|
+
* @returns The script text.
|
|
65
|
+
*/
|
|
66
|
+
export function openchamberRestartCommand() {
|
|
67
|
+
return 'export XDG_RUNTIME_DIR="/run/user/$(id -u)"; systemctl --user restart agent-sandbox-openchamber';
|
|
68
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-dev-env",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Sandbox VM runner and image lifecycle CLI for developer agent sandboxes (macOS, Windows, Ubuntu image recipes).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Andrey Meshkov <am@adguard.com>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/ameshkov/agent-sandbox.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/ameshkov/agent-sandbox#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ameshkov/agent-sandbox/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"bin": {
|
|
20
|
+
"agent-dev-env": "dist/cli.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=26"
|
|
27
|
+
},
|
|
28
|
+
"os": [
|
|
29
|
+
"darwin"
|
|
30
|
+
],
|
|
31
|
+
"cpu": [
|
|
32
|
+
"arm64"
|
|
33
|
+
],
|
|
34
|
+
"keywords": [
|
|
35
|
+
"sandbox",
|
|
36
|
+
"vm",
|
|
37
|
+
"virtual-machine",
|
|
38
|
+
"tart",
|
|
39
|
+
"vmware",
|
|
40
|
+
"qemu",
|
|
41
|
+
"packer",
|
|
42
|
+
"developer-environment",
|
|
43
|
+
"cli"
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"commander": "15.0.0",
|
|
47
|
+
"ssh2": "1.17.0"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"typecheck": "tsc -p tsconfig.app.json --noEmit && tsc -p tsconfig.test.json"
|
|
51
|
+
}
|
|
52
|
+
}
|