@hasna/computer 0.1.8 → 0.1.9

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.
Files changed (44) hide show
  1. package/LICENSE +4 -2
  2. package/README.md +73 -7
  3. package/dist/apps/ghostty/applescript.d.ts +36 -0
  4. package/dist/apps/ghostty/applescript.d.ts.map +1 -0
  5. package/dist/apps/ghostty/applescript.test.d.ts +2 -0
  6. package/dist/apps/ghostty/applescript.test.d.ts.map +1 -0
  7. package/dist/apps/ghostty/driver.d.ts +10 -0
  8. package/dist/apps/ghostty/driver.d.ts.map +1 -0
  9. package/dist/apps/registry.d.ts +5 -0
  10. package/dist/apps/registry.d.ts.map +1 -0
  11. package/dist/apps/registry.test.d.ts +2 -0
  12. package/dist/apps/registry.test.d.ts.map +1 -0
  13. package/dist/apps/types.d.ts +47 -0
  14. package/dist/apps/types.d.ts.map +1 -0
  15. package/dist/cli/index.js +1055 -91
  16. package/dist/cli/storage.d.ts +3 -0
  17. package/dist/cli/storage.d.ts.map +1 -0
  18. package/dist/cli/storage.test.d.ts +2 -0
  19. package/dist/cli/storage.test.d.ts.map +1 -0
  20. package/dist/db/storage-sync.d.ts +57 -0
  21. package/dist/db/storage-sync.d.ts.map +1 -0
  22. package/dist/db/storage-sync.test.d.ts +2 -0
  23. package/dist/db/storage-sync.test.d.ts.map +1 -0
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +84 -26
  27. package/dist/mcp/http.d.ts +16 -0
  28. package/dist/mcp/http.d.ts.map +1 -0
  29. package/dist/mcp/http.test.d.ts +2 -0
  30. package/dist/mcp/http.test.d.ts.map +1 -0
  31. package/dist/mcp/index.d.ts +1 -1
  32. package/dist/mcp/index.d.ts.map +1 -1
  33. package/dist/mcp/index.js +609 -262
  34. package/dist/mcp/server.d.ts +4 -0
  35. package/dist/mcp/server.d.ts.map +1 -0
  36. package/dist/server/index.js +34565 -8747
  37. package/dist/storage.d.ts +5 -0
  38. package/dist/storage.d.ts.map +1 -0
  39. package/dist/storage.js +5519 -0
  40. package/package.json +7 -2
  41. package/dist/cli/cloud.d.ts +0 -3
  42. package/dist/cli/cloud.d.ts.map +0 -1
  43. package/dist/db/cloud-sync.d.ts +0 -33
  44. package/dist/db/cloud-sync.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/computer",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Open-source computer use for AI agents — control your Mac with Anthropic or OpenAI. CLI + MCP server + REST API + Dashboard.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,6 +14,10 @@
14
14
  ".": {
15
15
  "types": "./dist/index.d.ts",
16
16
  "import": "./dist/index.js"
17
+ },
18
+ "./storage": {
19
+ "types": "./dist/storage.d.ts",
20
+ "import": "./dist/storage.js"
17
21
  }
18
22
  },
19
23
  "files": [
@@ -30,7 +34,7 @@
30
34
  "README.md"
31
35
  ],
32
36
  "scripts": {
33
- "build": "bun build src/cli/index.ts --outdir dist/cli --target bun --external @modelcontextprotocol/sdk --external ink --external react --external chalk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun && bun build src/index.ts --outdir dist --target bun && tsc --emitDeclarationOnly --outDir dist",
37
+ "build": "rm -rf dist && bun build src/cli/index.ts --outdir dist/cli --target bun --external @modelcontextprotocol/sdk --external ink --external react --external chalk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun && bun build src/index.ts src/storage.ts --outdir dist --target bun && tsc --emitDeclarationOnly --outDir dist",
34
38
  "typecheck": "tsc --noEmit",
35
39
  "test": "bun test",
36
40
  "dev:cli": "bun run src/cli/index.ts",
@@ -70,6 +74,7 @@
70
74
  "license": "Apache-2.0",
71
75
  "dependencies": {
72
76
  "@anthropic-ai/sdk": "^0.39.0",
77
+ "@hasna/events": "^0.1.3",
73
78
  "@modelcontextprotocol/sdk": "^1.12.1",
74
79
  "chalk": "^5.4.1",
75
80
  "commander": "^13.1.0",
@@ -1,3 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerCloudCommands(program: Command): void;
3
- //# sourceMappingURL=cloud.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/cli/cloud.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoF5D"}
@@ -1,33 +0,0 @@
1
- import { PgAdapterAsync } from "./remote-storage.js";
2
- export declare const CLOUD_TABLES: readonly ["sessions", "action_logs", "feedback"];
3
- type CloudTable = (typeof CLOUD_TABLES)[number];
4
- export interface SyncResult {
5
- table: string;
6
- rowsRead: number;
7
- rowsWritten: number;
8
- errors: string[];
9
- }
10
- export interface SyncMeta {
11
- table_name: string;
12
- last_synced_at: string | null;
13
- direction: "push" | "pull";
14
- }
15
- export declare function getCloudDatabaseUrl(): string | null;
16
- export declare function getCloudPg(): Promise<PgAdapterAsync>;
17
- export declare function runCloudMigrations(remote: PgAdapterAsync): Promise<void>;
18
- export declare function cloudPush(options?: {
19
- tables?: string[];
20
- }): Promise<SyncResult[]>;
21
- export declare function cloudPull(options?: {
22
- tables?: string[];
23
- }): Promise<SyncResult[]>;
24
- export declare function cloudSync(options?: {
25
- tables?: string[];
26
- }): Promise<{
27
- pull: SyncResult[];
28
- push: SyncResult[];
29
- }>;
30
- export declare function getSyncMetaAll(): SyncMeta[];
31
- export declare function resolveTables(tables?: string[]): CloudTable[];
32
- export {};
33
- //# sourceMappingURL=cloud-sync.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloud-sync.d.ts","sourceRoot":"","sources":["../../src/db/cloud-sync.ts"],"names":[],"mappings":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