@hasna/computer 0.1.1 → 0.1.3
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/dashboard/dist/assets/index-6UXnbsOB.js +40 -0
- package/dashboard/dist/assets/index-CwAxlYtY.css +1 -0
- package/dashboard/dist/index.html +13 -0
- package/dist/agent/loop.d.ts.map +1 -1
- package/dist/cli/index.js +442 -15
- package/dist/db/agents.d.ts +26 -0
- package/dist/db/agents.d.ts.map +1 -0
- package/dist/db/index.d.ts +1 -0
- package/dist/db/index.d.ts.map +1 -1
- package/dist/drivers/mac/accessibility.d.ts +33 -0
- package/dist/drivers/mac/accessibility.d.ts.map +1 -0
- package/dist/drivers/mac/index.d.ts +7 -1
- package/dist/drivers/mac/index.d.ts.map +1 -1
- package/dist/drivers/mac/screenshot.d.ts +1 -1
- package/dist/drivers/mac/screenshot.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +371 -36
- package/dist/lib/integrations.d.ts +30 -0
- package/dist/lib/integrations.d.ts.map +1 -0
- package/dist/lib/terminal-image.d.ts +29 -0
- package/dist/lib/terminal-image.d.ts.map +1 -0
- package/dist/mcp/index.js +347 -36
- package/dist/server/index.js +182 -36
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/helpers/accessibility +0 -0
- package/helpers/accessibility.swift +161 -0
- package/package.json +3 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional integrations with other @hasna/* packages.
|
|
3
|
+
* Each integration is a no-op if the dependency is not installed.
|
|
4
|
+
*/
|
|
5
|
+
import type { Session, ActionLog } from "../types/index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Try to save a computer use session as a recording in open-recordings.
|
|
8
|
+
* No-op if @hasna/recordings is not installed.
|
|
9
|
+
*/
|
|
10
|
+
export declare function saveToRecordings(session: Session, logs: ActionLog[]): Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Try to register a computer use session in open-sessions.
|
|
13
|
+
* No-op if @hasna/sessions is not installed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerWithSessions(session: Session): Promise<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* Try to push action logs to open-logs.
|
|
18
|
+
* No-op if @hasna/logs is not installed.
|
|
19
|
+
*/
|
|
20
|
+
export declare function pushToLogs(session: Session, logs: ActionLog[]): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Run all integrations after a session completes.
|
|
23
|
+
* Returns which integrations succeeded.
|
|
24
|
+
*/
|
|
25
|
+
export declare function runPostSessionIntegrations(session: Session, logs: ActionLog[]): Promise<{
|
|
26
|
+
recordings: boolean;
|
|
27
|
+
sessions: boolean;
|
|
28
|
+
logs: boolean;
|
|
29
|
+
}>;
|
|
30
|
+
//# sourceMappingURL=integrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/lib/integrations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CA8B5F;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAuB7E;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,SAAS,EAAE,GAChB,OAAO,CAAC;IAAE,UAAU,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAOpE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline image display for terminals that support it.
|
|
3
|
+
* Supports iTerm2 (OSC 1337) and Kitty (graphics protocol).
|
|
4
|
+
* Falls back to a text placeholder when unsupported.
|
|
5
|
+
*/
|
|
6
|
+
/** Detected terminal protocol */
|
|
7
|
+
export type TerminalProtocol = "iterm2" | "kitty" | "none";
|
|
8
|
+
/** Detect which image protocol the terminal supports */
|
|
9
|
+
export declare function detectProtocol(): TerminalProtocol;
|
|
10
|
+
/**
|
|
11
|
+
* Render a base64 PNG image inline in the terminal.
|
|
12
|
+
* Returns the escape sequence string, or empty string if unsupported.
|
|
13
|
+
*
|
|
14
|
+
* @param base64 - Base64-encoded PNG data
|
|
15
|
+
* @param opts - Display options
|
|
16
|
+
*/
|
|
17
|
+
export declare function renderInlineImage(base64: string, opts?: {
|
|
18
|
+
/** Max width in terminal columns (default: 40) */
|
|
19
|
+
width?: number;
|
|
20
|
+
/** Max height in terminal rows (default: 15) */
|
|
21
|
+
height?: number;
|
|
22
|
+
/** Whether to preserve aspect ratio (default: true) */
|
|
23
|
+
preserveAspectRatio?: boolean;
|
|
24
|
+
}): string;
|
|
25
|
+
/**
|
|
26
|
+
* Check if the terminal supports inline images.
|
|
27
|
+
*/
|
|
28
|
+
export declare function supportsInlineImages(): boolean;
|
|
29
|
+
//# sourceMappingURL=terminal-image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-image.d.ts","sourceRoot":"","sources":["../../src/lib/terminal-image.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3D,wDAAwD;AACxD,wBAAgB,cAAc,IAAI,gBAAgB,CAWjD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE;IACL,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,GACA,MAAM,CAaR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C"}
|