@hasna/sandboxes 0.1.29 → 0.1.30
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/README.md +8 -8
- package/dist/cli/index.js +130 -65
- package/dist/cli/storage.d.ts +2 -0
- package/dist/db/pg-migrations.d.ts +1 -1
- package/dist/db/storage-config.d.ts +26 -0
- package/dist/db/storage-sync.d.ts +35 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +136 -57
- package/dist/mcp/index.js +125 -60
- package/dist/mcp/storage-tools.d.ts +2 -0
- package/dist/server/index.js +126 -61
- package/dist/storage.d.ts +6 -0
- package/dist/storage.js +5654 -0
- package/package.json +6 -2
- package/dist/cli/cloud.d.ts +0 -2
- package/dist/db/cloud-config.d.ts +0 -13
- package/dist/db/cloud-sync.d.ts +0 -29
- package/dist/mcp/cloud-tools.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/sandboxes",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"author": "Andrei Hasna <andrei@hasna.com>",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,10 @@
|
|
|
28
28
|
".": {
|
|
29
29
|
"types": "./dist/index.d.ts",
|
|
30
30
|
"import": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./storage": {
|
|
33
|
+
"types": "./dist/storage.d.ts",
|
|
34
|
+
"import": "./dist/storage.js"
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
"bin": {
|
|
@@ -67,7 +71,7 @@
|
|
|
67
71
|
"access": "public"
|
|
68
72
|
},
|
|
69
73
|
"scripts": {
|
|
70
|
-
"build": "rm -rf dist && bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external @modelcontextprotocol/sdk --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && bun build src/server/index.ts --outdir dist/server --target bun --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && bun build src/index.ts --outdir dist --target bun --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && tsc --emitDeclarationOnly --outDir dist",
|
|
74
|
+
"build": "rm -rf dist && bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external @modelcontextprotocol/sdk --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && bun build src/server/index.ts --outdir dist/server --target bun --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && bun build src/index.ts src/storage.ts --outdir dist --target bun --external @e2b/code-interpreter --external @daytonaio/sdk --external modal && tsc --emitDeclarationOnly --outDir dist",
|
|
71
75
|
"typecheck": "tsc --noEmit",
|
|
72
76
|
"test": "bun test",
|
|
73
77
|
"dev:cli": "bun run src/cli/index.tsx",
|
package/dist/cli/cloud.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type CloudMode = "local" | "hybrid" | "cloud";
|
|
2
|
-
export interface CloudConfig {
|
|
3
|
-
mode: CloudMode;
|
|
4
|
-
rds: {
|
|
5
|
-
host: string;
|
|
6
|
-
port: number;
|
|
7
|
-
username: string;
|
|
8
|
-
password_env: string;
|
|
9
|
-
ssl: boolean;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare function getCloudConfig(): CloudConfig;
|
|
13
|
-
export declare function getConnectionString(dbName?: string): string;
|
package/dist/db/cloud-sync.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type Database } from "bun:sqlite";
|
|
2
|
-
import { PgAdapterAsync } from "./remote-storage.js";
|
|
3
|
-
export interface SyncResult {
|
|
4
|
-
table: string;
|
|
5
|
-
direction: "push" | "pull";
|
|
6
|
-
rowsRead: number;
|
|
7
|
-
rowsWritten: number;
|
|
8
|
-
errors: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface CloudStatus {
|
|
11
|
-
mode: string;
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
db_path: string;
|
|
14
|
-
tables: Array<{
|
|
15
|
-
table: string;
|
|
16
|
-
rows: number;
|
|
17
|
-
}>;
|
|
18
|
-
}
|
|
19
|
-
export declare const CLOUD_TABLES: readonly ["projects", "agents", "sandboxes", "sandbox_sessions", "sandbox_events", "webhooks", "templates", "snapshots", "feedback"];
|
|
20
|
-
export declare function getCloudPg(): Promise<PgAdapterAsync>;
|
|
21
|
-
export declare function runCloudMigrations(remote: PgAdapterAsync): Promise<void>;
|
|
22
|
-
export declare function getCloudStatus(db?: Database): CloudStatus;
|
|
23
|
-
export declare function pushCloudChanges(tables?: string[]): Promise<SyncResult[]>;
|
|
24
|
-
export declare function pullCloudChanges(tables?: string[]): Promise<SyncResult[]>;
|
|
25
|
-
export declare function syncCloudChanges(tables?: string[]): Promise<{
|
|
26
|
-
push: SyncResult[];
|
|
27
|
-
pull: SyncResult[];
|
|
28
|
-
}>;
|
|
29
|
-
export declare function parseCloudTables(raw?: string): string[];
|