@twelvehart/cursor-agents 0.1.0
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/LICENSE +21 -0
- package/README.md +306 -0
- package/bin/cursor-agents.js +3 -0
- package/dist/agents.d.ts +43 -0
- package/dist/artifacts.d.ts +8 -0
- package/dist/cli/commands/agents.d.ts +23 -0
- package/dist/cli/commands/artifacts.d.ts +3 -0
- package/dist/cli/commands/auth.d.ts +3 -0
- package/dist/cli/commands/models.d.ts +3 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +17001 -0
- package/dist/cli/output.d.ts +22 -0
- package/dist/client.d.ts +11 -0
- package/dist/errors.d.ts +20 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +14269 -0
- package/dist/schemas.d.ts +218 -0
- package/package.json +53 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare function exitCodeForError(err: unknown): number;
|
|
2
|
+
export declare function formatJson(ok: boolean, data: unknown): string;
|
|
3
|
+
export declare function printResult(data: unknown, json: boolean): void;
|
|
4
|
+
export declare function printError(err: unknown, json: boolean): void;
|
|
5
|
+
export declare function formatAgent(agent: {
|
|
6
|
+
id: string;
|
|
7
|
+
status: string;
|
|
8
|
+
source?: {
|
|
9
|
+
repository?: string;
|
|
10
|
+
};
|
|
11
|
+
summary?: string;
|
|
12
|
+
createdAt?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
}): string;
|
|
15
|
+
export declare function formatAgentList(agents: Array<{
|
|
16
|
+
id: string;
|
|
17
|
+
status: string;
|
|
18
|
+
source?: {
|
|
19
|
+
repository?: string;
|
|
20
|
+
};
|
|
21
|
+
createdAt?: string;
|
|
22
|
+
}>, nextCursor?: string): string;
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
export interface ClientOptions {
|
|
3
|
+
apiKey?: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class BaseClient {
|
|
7
|
+
private readonly apiKey;
|
|
8
|
+
private readonly baseUrl;
|
|
9
|
+
constructor(opts?: ClientOptions);
|
|
10
|
+
request<T>(path: string, schema: z.ZodType<T>, init?: RequestInit): Promise<T>;
|
|
11
|
+
}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CursorAgentsErrorDetails {
|
|
2
|
+
hint?: string;
|
|
3
|
+
suggestions?: string[];
|
|
4
|
+
suggestionsConfidence?: "high" | "low";
|
|
5
|
+
nextStep?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class CursorAgentsError extends Error {
|
|
8
|
+
readonly code: string;
|
|
9
|
+
readonly status: number;
|
|
10
|
+
readonly raw?: unknown;
|
|
11
|
+
readonly details?: CursorAgentsErrorDetails;
|
|
12
|
+
constructor(opts: {
|
|
13
|
+
code: string;
|
|
14
|
+
status: number;
|
|
15
|
+
message: string;
|
|
16
|
+
raw?: unknown;
|
|
17
|
+
details?: CursorAgentsErrorDetails;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export declare function errorCodeFromStatus(status: number): string;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AgentsAPI } from "./agents";
|
|
2
|
+
import { ArtifactsAPI } from "./artifacts";
|
|
3
|
+
import { type ClientOptions } from "./client";
|
|
4
|
+
import { type MeResponse, type ModelsResponse, type RepositoriesResponse } from "./schemas";
|
|
5
|
+
export declare const VERSION = "0.1.0";
|
|
6
|
+
export declare class CursorAgents {
|
|
7
|
+
readonly agents: AgentsAPI & {
|
|
8
|
+
artifacts: ArtifactsAPI;
|
|
9
|
+
};
|
|
10
|
+
private readonly client;
|
|
11
|
+
constructor(opts?: ClientOptions);
|
|
12
|
+
me(): Promise<MeResponse>;
|
|
13
|
+
models(): Promise<ModelsResponse>;
|
|
14
|
+
repositories(): Promise<RepositoriesResponse>;
|
|
15
|
+
}
|
|
16
|
+
export type { ClientOptions } from "./client";
|
|
17
|
+
export { CursorAgentsError } from "./errors";
|
|
18
|
+
export type { Agent, AgentStatus, Artifact, Conversation, ConversationMessage, CreateAgentRequest, CreateAgentResponse, DownloadArtifactResponse, Image, ImageDimension, ListAgentsResponse, ListArtifactsResponse, MeResponse, ModelsResponse, Prompt, RepositoriesResponse, Repository, Source, Target, } from "./schemas";
|