hypha-debugger 0.1.0 → 0.1.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,9 +1,7 @@
1
1
  /**
2
2
  * Arbitrary JavaScript execution service.
3
3
  */
4
- export declare function executeScript(code: string, options?: {
5
- timeout_ms?: number;
6
- }): Promise<{
4
+ export declare function executeScript(code: string, timeout_ms?: number): Promise<{
7
5
  result: any;
8
6
  type: string;
9
7
  } | {
@@ -1,15 +1,25 @@
1
- /**
2
- * Page information service.
3
- */
4
- import { type PageInfo } from "../utils/env.js";
5
- export declare function getPageInfo(): PageInfo;
1
+ export declare function getPageInfo(include_logs?: boolean, log_limit?: number, log_level?: string): any;
6
2
  export declare namespace getPageInfo {
7
3
  var __schema__: {
8
4
  name: string;
9
5
  description: string;
10
6
  parameters: {
11
7
  type: string;
12
- properties: {};
8
+ properties: {
9
+ include_logs: {
10
+ type: string;
11
+ description: string;
12
+ };
13
+ log_limit: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ log_level: {
18
+ type: string;
19
+ description: string;
20
+ enum: string[];
21
+ };
22
+ };
13
23
  };
14
24
  };
15
25
  }
@@ -9,10 +9,7 @@ interface ReactComponentInfo {
9
9
  key: string | null;
10
10
  children: ReactComponentInfo[];
11
11
  }
12
- export declare function getReactTree(options?: {
13
- selector?: string;
14
- max_depth?: number;
15
- }): ReactComponentInfo | {
12
+ export declare function getReactTree(selector?: string, max_depth?: number): ReactComponentInfo | {
16
13
  error: string;
17
14
  };
18
15
  export declare namespace getReactTree {
@@ -1,11 +1,4 @@
1
- export declare function takeScreenshot(options?: {
2
- selector?: string;
3
- format?: "png" | "jpeg";
4
- quality?: number;
5
- scale?: number;
6
- max_width?: number;
7
- max_height?: number;
8
- }): Promise<{
1
+ export declare function takeScreenshot(selector?: string, format?: "png" | "jpeg", quality?: number, scale?: number, max_width?: number, max_height?: number): Promise<{
9
2
  data: string;
10
3
  format: string;
11
4
  width: number;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Dynamic SKILL.md generation following the agentskills.io specification.
3
+ * Generates documentation from registered service function schemas.
4
+ */
5
+ interface SchemaProperty {
6
+ type?: string;
7
+ description?: string;
8
+ enum?: string[];
9
+ items?: {
10
+ type: string;
11
+ };
12
+ }
13
+ interface FunctionSchema {
14
+ name: string;
15
+ description: string;
16
+ parameters: {
17
+ type: string;
18
+ properties: Record<string, SchemaProperty>;
19
+ required?: string[];
20
+ };
21
+ }
22
+ /**
23
+ * Generate a SKILL.md document from a service definition.
24
+ * Excludes credentials (service URL, token) — those are provided separately.
25
+ */
26
+ export declare function generateSkillMd(serviceFunctions: Record<string, {
27
+ __schema__?: FunctionSchema;
28
+ }>, serviceUrl: string): string;
29
+ export {};
@@ -21,8 +21,8 @@ export declare class DebugOverlay {
21
21
  toggle(): void;
22
22
  setStatus(status: "connected" | "disconnected" | "error"): void;
23
23
  setInfo(info: Record<string, string>): void;
24
- /** Show the service URL with a copy button. */
25
- setServiceUrl(url: string, token: string): void;
24
+ /** Show the instruction block with a copy-all button. */
25
+ setInstructions(instructions: string): void;
26
26
  addLog(message: string, type?: "call" | "result" | "error"): void;
27
27
  destroy(): void;
28
28
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Scoped CSS for the debug overlay, injected into Shadow DOM.
3
3
  */
4
- export declare const overlayStyles = "\n :host {\n all: initial;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n }\n\n * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n\n .debugger-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: #4a90d9;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);\n transition: transform 0.15s, background 0.15s;\n user-select: none;\n font-size: 18px;\n line-height: 1;\n }\n\n .debugger-icon:hover {\n transform: scale(1.1);\n background: #357abd;\n }\n\n .debugger-icon.connected {\n background: #27ae60;\n }\n\n .debugger-icon.error {\n background: #e74c3c;\n }\n\n .debugger-panel {\n display: none;\n width: 320px;\n max-height: 420px;\n background: #1e1e2e;\n color: #cdd6f4;\n border-radius: 8px;\n border: 1px solid #45475a;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);\n overflow: hidden;\n flex-direction: column;\n position: absolute;\n bottom: 50px;\n right: 0;\n font-size: 13px;\n }\n\n .debugger-panel.open {\n display: flex;\n }\n\n .panel-header {\n background: #313244;\n padding: 8px 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: default;\n border-bottom: 1px solid #45475a;\n font-weight: 600;\n font-size: 12px;\n letter-spacing: 0.3px;\n text-transform: uppercase;\n color: #a6adc8;\n }\n\n .panel-header .title {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .panel-header .close-btn {\n cursor: pointer;\n color: #6c7086;\n font-size: 16px;\n line-height: 1;\n padding: 2px 4px;\n border-radius: 3px;\n }\n\n .panel-header .close-btn:hover {\n color: #cdd6f4;\n background: #45475a;\n }\n\n .status-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n display: inline-block;\n background: #6c7086;\n }\n\n .status-dot.connected {\n background: #a6e3a1;\n }\n\n .status-dot.error {\n background: #f38ba8;\n }\n\n .panel-body {\n padding: 10px 12px;\n overflow-y: auto;\n flex: 1;\n max-height: 340px;\n }\n\n .info-row {\n display: flex;\n justify-content: space-between;\n padding: 4px 0;\n border-bottom: 1px solid #313244;\n font-size: 12px;\n }\n\n .info-row .label {\n color: #6c7086;\n }\n\n .info-row .value {\n color: #cdd6f4;\n text-align: right;\n word-break: break-all;\n max-width: 180px;\n font-family: 'SF Mono', Monaco, Consolas, monospace;\n font-size: 11px;\n }\n\n .url-section {\n margin-top: 8px;\n padding-top: 6px;\n border-top: 1px solid #313244;\n }\n\n .url-label {\n font-size: 11px;\n color: #6c7086;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 3px;\n }\n\n .url-row {\n display: flex;\n align-items: center;\n gap: 4px;\n background: #313244;\n border-radius: 3px;\n padding: 4px 6px;\n }\n\n .url-text {\n flex: 1;\n font-family: 'SF Mono', Monaco, Consolas, monospace;\n font-size: 10px;\n color: #89b4fa;\n word-break: break-all;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n\n .copy-btn {\n background: #45475a;\n color: #cdd6f4;\n border: none;\n border-radius: 3px;\n padding: 2px 8px;\n font-size: 10px;\n cursor: pointer;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .copy-btn:hover {\n background: #585b70;\n }\n\n .log-section {\n margin-top: 8px;\n }\n\n .log-title {\n font-size: 11px;\n color: #6c7086;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 4px;\n }\n\n .log-entry {\n font-family: 'SF Mono', Monaco, Consolas, monospace;\n font-size: 11px;\n padding: 3px 6px;\n border-radius: 3px;\n background: #313244;\n margin-bottom: 2px;\n color: #a6adc8;\n word-break: break-all;\n }\n\n .log-entry.call {\n border-left: 2px solid #89b4fa;\n }\n\n .log-entry.result {\n border-left: 2px solid #a6e3a1;\n }\n\n .log-entry.error {\n border-left: 2px solid #f38ba8;\n color: #f38ba8;\n }\n";
4
+ export declare const overlayStyles = "\n :host {\n all: initial;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n }\n\n * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n\n .debugger-icon {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background: #4a90d9;\n color: white;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);\n transition: transform 0.15s, background 0.15s;\n user-select: none;\n font-size: 18px;\n line-height: 1;\n }\n\n .debugger-icon:hover {\n transform: scale(1.1);\n background: #357abd;\n }\n\n .debugger-icon.connected {\n background: #27ae60;\n }\n\n .debugger-icon.error {\n background: #e74c3c;\n }\n\n .debugger-panel {\n display: none;\n width: 380px;\n max-height: 520px;\n background: #1e1e2e;\n color: #cdd6f4;\n border-radius: 8px;\n border: 1px solid #45475a;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);\n overflow: hidden;\n flex-direction: column;\n position: absolute;\n bottom: 50px;\n right: 0;\n font-size: 13px;\n }\n\n .debugger-panel.open {\n display: flex;\n }\n\n .panel-header {\n background: #313244;\n padding: 8px 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: default;\n border-bottom: 1px solid #45475a;\n font-weight: 600;\n font-size: 12px;\n letter-spacing: 0.3px;\n text-transform: uppercase;\n color: #a6adc8;\n }\n\n .panel-header .title {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .panel-header .close-btn {\n cursor: pointer;\n color: #6c7086;\n font-size: 16px;\n line-height: 1;\n padding: 2px 4px;\n border-radius: 3px;\n }\n\n .panel-header .close-btn:hover {\n color: #cdd6f4;\n background: #45475a;\n }\n\n .status-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n display: inline-block;\n background: #6c7086;\n }\n\n .status-dot.connected {\n background: #a6e3a1;\n }\n\n .status-dot.error {\n background: #f38ba8;\n }\n\n .panel-body {\n padding: 10px 12px;\n overflow-y: auto;\n flex: 1;\n max-height: 440px;\n }\n\n .info-row {\n display: flex;\n justify-content: space-between;\n padding: 4px 0;\n border-bottom: 1px solid #313244;\n font-size: 12px;\n }\n\n .info-row .label {\n color: #6c7086;\n }\n\n .info-row .value {\n color: #cdd6f4;\n text-align: right;\n word-break: break-all;\n max-width: 180px;\n font-family: 'SF Mono', Monaco, Consolas, monospace;\n font-size: 11px;\n }\n\n .instructions-section {\n margin-top: 8px;\n padding-top: 6px;\n border-top: 1px solid #313244;\n }\n\n .instructions-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n }\n\n .url-label {\n font-size: 11px;\n color: #6c7086;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 3px;\n }\n\n .instructions-block {\n font-family: 'SF Mono', Monaco, Consolas, monospace;\n font-size: 10px;\n color: #a6e3a1;\n background: #11111b;\n border: 1px solid #313244;\n border-radius: 4px;\n padding: 8px;\n white-space: pre-wrap;\n word-break: break-all;\n max-height: 200px;\n overflow-y: auto;\n line-height: 1.5;\n }\n\n .copy-btn {\n background: #45475a;\n color: #cdd6f4;\n border: none;\n border-radius: 3px;\n padding: 2px 8px;\n font-size: 10px;\n cursor: pointer;\n white-space: nowrap;\n flex-shrink: 0;\n }\n\n .copy-btn:hover {\n background: #585b70;\n }\n\n .log-section {\n margin-top: 8px;\n }\n\n .log-title {\n font-size: 11px;\n color: #6c7086;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 4px;\n }\n\n .log-entry {\n font-family: 'SF Mono', Monaco, Consolas, monospace;\n font-size: 11px;\n padding: 3px 6px;\n border-radius: 3px;\n background: #313244;\n margin-bottom: 2px;\n color: #a6adc8;\n word-break: break-all;\n }\n\n .log-entry.call {\n border-left: 2px solid #89b4fa;\n }\n\n .log-entry.result {\n border-left: 2px solid #a6e3a1;\n }\n\n .log-entry.error {\n border-left: 2px solid #f38ba8;\n color: #f38ba8;\n }\n";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypha-debugger",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Injectable debugger for web pages and AI agents, powered by Hypha RPC",
5
5
  "type": "module",
6
6
  "main": "dist/hypha-debugger.js",