hypha-debugger 0.1.0 → 0.1.2

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.
@@ -11,8 +11,19 @@ export interface DebuggerConfig {
11
11
  service_name?: string;
12
12
  /** Show floating debug UI overlay. Default: true */
13
13
  show_ui?: boolean;
14
- /** Service visibility. Default: "public" */
14
+ /** Service visibility. Overridden by require_token when not set explicitly. */
15
15
  visibility?: "public" | "protected" | "unlisted";
16
+ /**
17
+ * Whether remote callers must supply a JWT token. Default: true.
18
+ *
19
+ * true → visibility "protected", a 24-hour token is generated and shown
20
+ * in the instruction block. The URL alone is not enough.
21
+ *
22
+ * false → visibility "unlisted", a random 16-char hex suffix is appended
23
+ * to the service ID so the URL itself is unguessable. No token is
24
+ * needed — just keep the URL secret.
25
+ */
26
+ require_token?: boolean;
16
27
  }
17
28
  export interface DebugSession {
18
29
  /** Full service ID as registered with Hypha. */
@@ -31,12 +42,30 @@ export interface DebugSession {
31
42
  export declare class HyphaDebugger {
32
43
  private config;
33
44
  private overlay;
45
+ private cursor;
34
46
  private server;
35
47
  private serviceInfo;
36
48
  constructor(config: DebuggerConfig);
37
49
  start(): Promise<DebugSession>;
38
50
  destroy(): Promise<void>;
51
+ /**
52
+ * Generate token, build service URL, update overlay instructions, and
53
+ * return a DebugSession.
54
+ */
55
+ private updateSession;
56
+ /**
57
+ * Build a stable, predictable service URL.
58
+ * Strips the clientId prefix so the URL uses only the bare service name.
59
+ * Callers append ?_mode=last to resolve the most recent instance.
60
+ */
39
61
  private buildServiceUrl;
62
+ private getHyphaModule;
40
63
  private getConnectToServer;
64
+ private buildServiceDefinition;
65
+ private createGetSkillMd;
66
+ /** Build the instruction block for the overlay panel. */
67
+ private buildInstructionBlock;
68
+ /** Wrap a service function with logging and kwargs-to-positional-args support. */
69
+ private wrapFn;
41
70
  private summarizeArgs;
42
71
  }