claude-code-controller 0.3.0 → 0.5.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/README.md +285 -302
- package/dist/api/index.cjs +518 -54
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +36 -8
- package/dist/api/index.d.ts +36 -8
- package/dist/api/index.js +518 -54
- package/dist/api/index.js.map +1 -1
- package/dist/{controller-CqCBbQYK.d.cts → claude-CSXlMCvP.d.cts} +271 -4
- package/dist/{controller-CqCBbQYK.d.ts → claude-CSXlMCvP.d.ts} +271 -4
- package/dist/index.cjs +475 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +472 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/api/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import { C as ClaudeCodeController,
|
|
2
|
+
import { C as ClaudeCodeController, j as PermissionPreset, E as TaskStatus, a as LogLevel, d as AgentType } from '../claude-CSXlMCvP.cjs';
|
|
3
3
|
import 'node:events';
|
|
4
4
|
|
|
5
5
|
interface PendingApproval {
|
|
@@ -40,10 +40,34 @@ declare class ActionTracker {
|
|
|
40
40
|
clear(): void;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
interface AskBody {
|
|
44
|
+
/** The prompt to send to the agent. */
|
|
45
|
+
prompt: string;
|
|
46
|
+
/** Model to use. */
|
|
47
|
+
model?: string;
|
|
48
|
+
/** Anthropic API key. Maps to ANTHROPIC_AUTH_TOKEN. */
|
|
49
|
+
apiKey?: string;
|
|
50
|
+
/** API base URL. Maps to ANTHROPIC_BASE_URL. */
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
/** Request timeout in ms. Maps to API_TIMEOUT_MS. */
|
|
53
|
+
timeout?: number;
|
|
54
|
+
/** Working directory. */
|
|
55
|
+
cwd?: string;
|
|
56
|
+
/** Permission preset. Default: "full". */
|
|
57
|
+
permissions?: PermissionPreset;
|
|
58
|
+
/** Additional env vars. */
|
|
59
|
+
env?: Record<string, string>;
|
|
60
|
+
}
|
|
43
61
|
interface InitSessionBody {
|
|
44
62
|
teamName?: string;
|
|
45
63
|
cwd?: string;
|
|
46
64
|
claudeBinary?: string;
|
|
65
|
+
/** Anthropic API key. Maps to ANTHROPIC_AUTH_TOKEN. */
|
|
66
|
+
apiKey?: string;
|
|
67
|
+
/** API base URL. Maps to ANTHROPIC_BASE_URL. */
|
|
68
|
+
baseUrl?: string;
|
|
69
|
+
/** Request timeout in ms. Maps to API_TIMEOUT_MS. */
|
|
70
|
+
timeout?: number;
|
|
47
71
|
env?: Record<string, string>;
|
|
48
72
|
logLevel?: LogLevel;
|
|
49
73
|
}
|
|
@@ -52,7 +76,14 @@ interface SpawnAgentBody {
|
|
|
52
76
|
type?: AgentType;
|
|
53
77
|
model?: string;
|
|
54
78
|
cwd?: string;
|
|
55
|
-
|
|
79
|
+
/** Permission preset or raw tool list. */
|
|
80
|
+
permissions?: PermissionPreset | string[];
|
|
81
|
+
/** Anthropic API key. Maps to ANTHROPIC_AUTH_TOKEN. */
|
|
82
|
+
apiKey?: string;
|
|
83
|
+
/** API base URL. Maps to ANTHROPIC_BASE_URL. */
|
|
84
|
+
baseUrl?: string;
|
|
85
|
+
/** Request timeout in ms. Maps to API_TIMEOUT_MS. */
|
|
86
|
+
timeout?: number;
|
|
56
87
|
env?: Record<string, string>;
|
|
57
88
|
}
|
|
58
89
|
interface SendMessageBody {
|
|
@@ -63,15 +94,12 @@ interface BroadcastBody {
|
|
|
63
94
|
message: string;
|
|
64
95
|
summary?: string;
|
|
65
96
|
}
|
|
66
|
-
interface
|
|
97
|
+
interface ApproveBody {
|
|
67
98
|
requestId: string;
|
|
99
|
+
type: "plan" | "permission";
|
|
68
100
|
approve?: boolean;
|
|
69
101
|
feedback?: string;
|
|
70
102
|
}
|
|
71
|
-
interface ApprovePermissionBody {
|
|
72
|
-
requestId: string;
|
|
73
|
-
approve?: boolean;
|
|
74
|
-
}
|
|
75
103
|
interface CreateTaskBody {
|
|
76
104
|
subject: string;
|
|
77
105
|
description: string;
|
|
@@ -170,4 +198,4 @@ interface CreateApiOptions {
|
|
|
170
198
|
*/
|
|
171
199
|
declare function createApi(controller?: ClaudeCodeController | null, options?: CreateApiOptions): Hono;
|
|
172
200
|
|
|
173
|
-
export { ActionTracker, type ActionsResponse, type AgentResponse, type ApiError, type
|
|
201
|
+
export { ActionTracker, type ActionsResponse, type AgentResponse, type ApiError, type ApproveBody, type AskBody, type AssignTaskBody, type BroadcastBody, type CreateApiOptions, type CreateTaskBody, type HealthResponse, type IdleAgent, type InitSessionBody, type PendingApproval, type SendMessageBody, type SessionResponse, type SpawnAgentBody, type UnassignedTask, type UpdateTaskBody, createApi };
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from 'hono';
|
|
2
|
-
import { C as ClaudeCodeController,
|
|
2
|
+
import { C as ClaudeCodeController, j as PermissionPreset, E as TaskStatus, a as LogLevel, d as AgentType } from '../claude-CSXlMCvP.js';
|
|
3
3
|
import 'node:events';
|
|
4
4
|
|
|
5
5
|
interface PendingApproval {
|
|
@@ -40,10 +40,34 @@ declare class ActionTracker {
|
|
|
40
40
|
clear(): void;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
interface AskBody {
|
|
44
|
+
/** The prompt to send to the agent. */
|
|
45
|
+
prompt: string;
|
|
46
|
+
/** Model to use. */
|
|
47
|
+
model?: string;
|
|
48
|
+
/** Anthropic API key. Maps to ANTHROPIC_AUTH_TOKEN. */
|
|
49
|
+
apiKey?: string;
|
|
50
|
+
/** API base URL. Maps to ANTHROPIC_BASE_URL. */
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
/** Request timeout in ms. Maps to API_TIMEOUT_MS. */
|
|
53
|
+
timeout?: number;
|
|
54
|
+
/** Working directory. */
|
|
55
|
+
cwd?: string;
|
|
56
|
+
/** Permission preset. Default: "full". */
|
|
57
|
+
permissions?: PermissionPreset;
|
|
58
|
+
/** Additional env vars. */
|
|
59
|
+
env?: Record<string, string>;
|
|
60
|
+
}
|
|
43
61
|
interface InitSessionBody {
|
|
44
62
|
teamName?: string;
|
|
45
63
|
cwd?: string;
|
|
46
64
|
claudeBinary?: string;
|
|
65
|
+
/** Anthropic API key. Maps to ANTHROPIC_AUTH_TOKEN. */
|
|
66
|
+
apiKey?: string;
|
|
67
|
+
/** API base URL. Maps to ANTHROPIC_BASE_URL. */
|
|
68
|
+
baseUrl?: string;
|
|
69
|
+
/** Request timeout in ms. Maps to API_TIMEOUT_MS. */
|
|
70
|
+
timeout?: number;
|
|
47
71
|
env?: Record<string, string>;
|
|
48
72
|
logLevel?: LogLevel;
|
|
49
73
|
}
|
|
@@ -52,7 +76,14 @@ interface SpawnAgentBody {
|
|
|
52
76
|
type?: AgentType;
|
|
53
77
|
model?: string;
|
|
54
78
|
cwd?: string;
|
|
55
|
-
|
|
79
|
+
/** Permission preset or raw tool list. */
|
|
80
|
+
permissions?: PermissionPreset | string[];
|
|
81
|
+
/** Anthropic API key. Maps to ANTHROPIC_AUTH_TOKEN. */
|
|
82
|
+
apiKey?: string;
|
|
83
|
+
/** API base URL. Maps to ANTHROPIC_BASE_URL. */
|
|
84
|
+
baseUrl?: string;
|
|
85
|
+
/** Request timeout in ms. Maps to API_TIMEOUT_MS. */
|
|
86
|
+
timeout?: number;
|
|
56
87
|
env?: Record<string, string>;
|
|
57
88
|
}
|
|
58
89
|
interface SendMessageBody {
|
|
@@ -63,15 +94,12 @@ interface BroadcastBody {
|
|
|
63
94
|
message: string;
|
|
64
95
|
summary?: string;
|
|
65
96
|
}
|
|
66
|
-
interface
|
|
97
|
+
interface ApproveBody {
|
|
67
98
|
requestId: string;
|
|
99
|
+
type: "plan" | "permission";
|
|
68
100
|
approve?: boolean;
|
|
69
101
|
feedback?: string;
|
|
70
102
|
}
|
|
71
|
-
interface ApprovePermissionBody {
|
|
72
|
-
requestId: string;
|
|
73
|
-
approve?: boolean;
|
|
74
|
-
}
|
|
75
103
|
interface CreateTaskBody {
|
|
76
104
|
subject: string;
|
|
77
105
|
description: string;
|
|
@@ -170,4 +198,4 @@ interface CreateApiOptions {
|
|
|
170
198
|
*/
|
|
171
199
|
declare function createApi(controller?: ClaudeCodeController | null, options?: CreateApiOptions): Hono;
|
|
172
200
|
|
|
173
|
-
export { ActionTracker, type ActionsResponse, type AgentResponse, type ApiError, type
|
|
201
|
+
export { ActionTracker, type ActionsResponse, type AgentResponse, type ApiError, type ApproveBody, type AskBody, type AssignTaskBody, type BroadcastBody, type CreateApiOptions, type CreateTaskBody, type HealthResponse, type IdleAgent, type InitSessionBody, type PendingApproval, type SendMessageBody, type SessionResponse, type SpawnAgentBody, type UnassignedTask, type UpdateTaskBody, createApi };
|