playit-reversed 0.1.0-beta.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.
@@ -0,0 +1,25 @@
1
+ import type { Agent, PlayItOptions } from "./types";
2
+ /**
3
+ * PlayIt.gg API client
4
+ *
5
+ * This is an internal client used by the CLI for fetching data.
6
+ * Users should use the generated `playit` object instead.
7
+ */
8
+ export declare class PlayIt<TAgentId extends string = string, TAgentName extends string = string> {
9
+ private baseUrl;
10
+ private authorizationToken;
11
+ private $fetch;
12
+ private constructor();
13
+ /**
14
+ * Create a new PlayIt client instance
15
+ *
16
+ * @internal This is used by the CLI. Users should use the generated `playit` object.
17
+ */
18
+ static create<TAgentId extends string = string, TAgentName extends string = string>(options?: PlayItOptions & {
19
+ _skipCodegenCheck?: boolean;
20
+ }): PlayIt<TAgentId, TAgentName>;
21
+ /**
22
+ * Fetch all agents from the API
23
+ */
24
+ fetchAgents(): Promise<Agent[]>;
25
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Code Generation Script
3
+ *
4
+ * Generates TypeScript types from cached data.
5
+ * Run this after fetching agents to get type-safe IDs.
6
+ *
7
+ * Usage: bun run src/codegen.ts
8
+ */
9
+ export {};
@@ -0,0 +1,15 @@
1
+ export declare class CodegenRequiredError extends Error {
2
+ constructor();
3
+ }
4
+ /**
5
+ * Check if codegen has been run
6
+ */
7
+ export declare function isCodegenComplete(): boolean;
8
+ /**
9
+ * Throw an error if codegen hasn't been run
10
+ */
11
+ export declare function requireCodegen(): void;
12
+ /**
13
+ * Assert codegen is complete (call this at module load time)
14
+ */
15
+ export declare function assertCodegen(): void;
@@ -0,0 +1,6 @@
1
+ import "dotenv/config";
2
+ export { PlayIt } from "./client";
3
+ export { PlayIt as default } from "./client";
4
+ export type { Agent, Tunnel, PlayItOptions } from "./types";
5
+ export { parseAgentsHtml } from "./parsers";
6
+ export { requireCodegen, isCodegenComplete, CodegenRequiredError } from "./guard";