alineo-cli 0.3.0 → 0.4.1

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.
@@ -1,35 +0,0 @@
1
- import { i as readConfig } from "./index.mjs";
2
- import { Sandbox } from "@alineo-labs/sandbox";
3
- import { SQLiteAdapter } from "@alineo-labs/sqlite";
4
- //#region src/commands/kill.ts
5
- /**
6
- * Addressed by sandbox ID, not session name — see prompt.ts for why: names
7
- * aren't unique and a name-based ledger lookup can hand back a sandbox that
8
- * already died ungracefully. `client.connect()`'s live control-plane check
9
- * is the actual authority on whether it still exists to kill.
10
- */
11
- async function kill(sandboxId) {
12
- if (!sandboxId) throw new Error("Usage: alineo kill <sandbox-id>");
13
- const config = await readConfig();
14
- const adapter = new SQLiteAdapter(config.adapterPath);
15
- await (await new Sandbox({
16
- baseUrl: config.serverUrl,
17
- apiKey: config.apiKey,
18
- adapter,
19
- useServerProxy: config.useServerProxy
20
- }).connect(sandboxId, sandboxId)).close();
21
- console.log(`Killed sandbox ${sandboxId}`);
22
- }
23
- const killCommand = {
24
- name: "kill",
25
- group: "agent",
26
- variants: [{
27
- usage: "alineo kill <sandbox-id>",
28
- summary: "Stop a sandbox"
29
- }],
30
- run: async (argv) => {
31
- await kill(argv[0] ?? "");
32
- }
33
- };
34
- //#endregion
35
- export { killCommand };