@polpo-ai/sdk 0.11.0 → 0.12.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/dist/client/polpo-client.d.ts +1 -15
- package/dist/client/polpo-client.d.ts.map +1 -1
- package/dist/client/polpo-client.js +0 -68
- package/dist/client/polpo-client.js.map +1 -1
- package/dist/client/types.d.ts +2 -846
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js +1 -0
- package/dist/client/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +4 -1
package/dist/client/types.d.ts
CHANGED
|
@@ -3,116 +3,13 @@
|
|
|
3
3
|
* Intentionally decoupled from @polpo-ai/core to avoid pulling
|
|
4
4
|
* server-side dependencies (blessed, sqlite, etc.) into the client bundle.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
weight: number;
|
|
11
|
-
rubric?: Record<number, string>;
|
|
12
|
-
}
|
|
6
|
+
import type { AgentActivity, AgentConfig, AgentIdentity, AgentProcess, AgentResponsibility, ApprovalGateHandler, ApprovalRequest, ApprovalStatus, AskUserAnswer, AskUserOption, AskUserQuestion, AssessmentResult, AssessmentTrigger, CheckResult, Condition, CustomModelDef, DimensionScore, EvalDimension, ExpectedOutcome, FileEntry, LoadedSkill, LogEntry, LoopApprovalSnapshot, LoopApprovedGate, LoopConfig, LoopHookAction, LoopLifecycleHook, LoopNext, LoopPermissionEffect, LoopPermissionMatch, LoopPermissionResource, LoopPolicyEffect, LoopResumeState, LoopRunRecord, LoopStepConfig, LoopToolChoice, LoopTraceEvent, LoopTraceEventType, MetricResult, Mission, MissionCheckpoint, MissionDelay, MissionQualityGate, MissionReport, MissionStatus, ModelAllowlistEntry, ModelConfig, NotificationChannelConfig, NotificationChannelType, NotificationRule, NotificationSeverity, OutcomeType, Pipeline, PolpoConfig, PolpoSettings, PolpoState, ProjectLoopConfig, ProjectLoopHooks, ProjectLoopKind, ProjectLoopPermission, ProjectLoopPolicy, ProjectLoopRunStatus, ProjectLoopVersion, ProviderConfig, QualityMetrics, ReasoningLevel, RetryPolicy, ReviewerExploration, ReviewerMessage, ReviewerResult, ScheduleEntry, ScopedNotificationRules, SkillIndex, SkillIndexEntry, SkillInfo, SkillWithAssignment, Step, SwitchCase, Task, TaskExpectation, TaskMetric, TaskOutcome, TaskPhase, TaskResult, TaskStatus, Team, ToolCallState, WhileBlock } from "@polpo-ai/core";
|
|
7
|
+
export type { AgentActivity, AgentConfig, AgentIdentity, AgentProcess, AgentResponsibility, ApprovalGateHandler, ApprovalRequest, ApprovalStatus, AskUserAnswer, AskUserOption, AskUserQuestion, AssessmentResult, AssessmentTrigger, CheckResult, Condition, CustomModelDef, DimensionScore, EvalDimension, ExpectedOutcome, FileEntry, LoadedSkill, LogEntry, LoopApprovalSnapshot, LoopApprovedGate, LoopConfig, LoopHookAction, LoopLifecycleHook, LoopNext, LoopPermissionEffect, LoopPermissionMatch, LoopPermissionResource, LoopPolicyEffect, LoopResumeState, LoopRunRecord, LoopStepConfig, LoopToolChoice, LoopTraceEvent, LoopTraceEventType, MetricResult, Mission, MissionCheckpoint, MissionDelay, MissionQualityGate, MissionReport, MissionStatus, ModelAllowlistEntry, ModelConfig, NotificationChannelConfig, NotificationChannelType, NotificationRule, NotificationSeverity, OutcomeType, Pipeline, PolpoConfig, PolpoSettings, PolpoState, ProjectLoopConfig, ProjectLoopHooks, ProjectLoopKind, ProjectLoopPermission, ProjectLoopPolicy, ProjectLoopRunStatus, ProjectLoopVersion, ProviderConfig, QualityMetrics, ReasoningLevel, RetryPolicy, ReviewerExploration, ReviewerMessage, ReviewerResult, ScheduleEntry, ScopedNotificationRules, SkillIndex, SkillIndexEntry, SkillInfo, SkillWithAssignment, Step, SwitchCase, Task, TaskExpectation, TaskMetric, TaskOutcome, TaskPhase, TaskResult, TaskStatus, Team, ToolCallState, WhileBlock, };
|
|
13
8
|
export interface DimensionScoreEvidence {
|
|
14
9
|
file: string;
|
|
15
10
|
line: number;
|
|
16
11
|
note: string;
|
|
17
12
|
}
|
|
18
|
-
export interface DimensionScore {
|
|
19
|
-
dimension: string;
|
|
20
|
-
score: number;
|
|
21
|
-
reasoning: string;
|
|
22
|
-
weight: number;
|
|
23
|
-
evidence?: DimensionScoreEvidence[];
|
|
24
|
-
}
|
|
25
|
-
export interface TaskExpectation {
|
|
26
|
-
type: "test" | "file_exists" | "script" | "llm_review";
|
|
27
|
-
command?: string;
|
|
28
|
-
paths?: string[];
|
|
29
|
-
criteria?: string;
|
|
30
|
-
dimensions?: EvalDimension[];
|
|
31
|
-
threshold?: number;
|
|
32
|
-
confidence?: "firm" | "estimated";
|
|
33
|
-
}
|
|
34
|
-
export interface TaskMetric {
|
|
35
|
-
name: string;
|
|
36
|
-
command: string;
|
|
37
|
-
threshold: number;
|
|
38
|
-
}
|
|
39
|
-
export interface RetryPolicy {
|
|
40
|
-
escalateAfter?: number;
|
|
41
|
-
fallbackAgent?: string;
|
|
42
|
-
escalateModel?: string;
|
|
43
|
-
}
|
|
44
|
-
export type TaskPhase = "execution" | "review" | "fix" | "clarification";
|
|
45
|
-
export type OutcomeType = "file" | "text" | "url" | "json" | "media";
|
|
46
|
-
export interface TaskOutcome {
|
|
47
|
-
id: string;
|
|
48
|
-
type: OutcomeType;
|
|
49
|
-
label: string;
|
|
50
|
-
path?: string;
|
|
51
|
-
mimeType?: string;
|
|
52
|
-
size?: number;
|
|
53
|
-
text?: string;
|
|
54
|
-
url?: string;
|
|
55
|
-
data?: unknown;
|
|
56
|
-
producedBy?: string;
|
|
57
|
-
producedAt: string;
|
|
58
|
-
tags?: string[];
|
|
59
|
-
}
|
|
60
|
-
export interface ExpectedOutcome {
|
|
61
|
-
type: OutcomeType;
|
|
62
|
-
label: string;
|
|
63
|
-
description?: string;
|
|
64
|
-
path?: string;
|
|
65
|
-
mimeType?: string;
|
|
66
|
-
required?: boolean;
|
|
67
|
-
tags?: string[];
|
|
68
|
-
}
|
|
69
|
-
export interface Task {
|
|
70
|
-
id: string;
|
|
71
|
-
title: string;
|
|
72
|
-
description: string;
|
|
73
|
-
assignTo: string;
|
|
74
|
-
group?: string;
|
|
75
|
-
dependsOn: string[];
|
|
76
|
-
status: TaskStatus;
|
|
77
|
-
expectations: TaskExpectation[];
|
|
78
|
-
metrics: TaskMetric[];
|
|
79
|
-
retries: number;
|
|
80
|
-
maxRetries: number;
|
|
81
|
-
maxDuration?: number;
|
|
82
|
-
retryPolicy?: RetryPolicy;
|
|
83
|
-
result?: TaskResult;
|
|
84
|
-
phase?: TaskPhase;
|
|
85
|
-
fixAttempts?: number;
|
|
86
|
-
questionRounds?: number;
|
|
87
|
-
resolutionAttempts?: number;
|
|
88
|
-
originalDescription?: string;
|
|
89
|
-
sessionId?: string;
|
|
90
|
-
/** Absolute deadline (ISO timestamp). */
|
|
91
|
-
deadline?: string;
|
|
92
|
-
/** Priority weight for quality scoring. Default: 1.0 */
|
|
93
|
-
priority?: number;
|
|
94
|
-
expectedOutcomes?: ExpectedOutcome[];
|
|
95
|
-
outcomes?: TaskOutcome[];
|
|
96
|
-
/** Number of approval revision rounds. */
|
|
97
|
-
revisionCount?: number;
|
|
98
|
-
/** Scoped notification rules for this task. */
|
|
99
|
-
notifications?: ScopedNotificationRules;
|
|
100
|
-
/** Whether this task produces irreversible side effects. Blocks automatic retry/fix. */
|
|
101
|
-
sideEffects?: boolean;
|
|
102
|
-
/** Opaque end-user identifier (OpenAI-compat). Set at create time, propagates to runs. */
|
|
103
|
-
user?: string;
|
|
104
|
-
createdAt: string;
|
|
105
|
-
updatedAt: string;
|
|
106
|
-
}
|
|
107
|
-
export interface TaskResult {
|
|
108
|
-
exitCode: number;
|
|
109
|
-
stdout: string;
|
|
110
|
-
stderr: string;
|
|
111
|
-
duration: number;
|
|
112
|
-
assessment?: AssessmentResult;
|
|
113
|
-
/** All previous assessments (oldest first). Current assessment is always in `assessment`. */
|
|
114
|
-
assessmentHistory?: AssessmentResult[];
|
|
115
|
-
}
|
|
116
13
|
/** Stdio-based MCP server — spawns a child process */
|
|
117
14
|
export interface McpStdioServerConfig {
|
|
118
15
|
type?: "stdio";
|
|
@@ -134,167 +31,7 @@ export interface McpHttpServerConfig {
|
|
|
134
31
|
}
|
|
135
32
|
/** Union of all supported MCP server configs */
|
|
136
33
|
export type McpServerConfig = McpStdioServerConfig | McpSseServerConfig | McpHttpServerConfig;
|
|
137
|
-
/** Agent identity — who this agent is and how it behaves */
|
|
138
|
-
/** A structured responsibility area */
|
|
139
|
-
export interface AgentResponsibility {
|
|
140
|
-
area: string;
|
|
141
|
-
description: string;
|
|
142
|
-
priority?: "critical" | "high" | "medium" | "low";
|
|
143
|
-
}
|
|
144
|
-
export interface AgentIdentity {
|
|
145
|
-
displayName?: string;
|
|
146
|
-
title?: string;
|
|
147
|
-
company?: string;
|
|
148
|
-
email?: string;
|
|
149
|
-
bio?: string;
|
|
150
|
-
timezone?: string;
|
|
151
|
-
/** Avatar image path relative to project root, served via /api/v1/files/read?path=<avatar> */
|
|
152
|
-
avatar?: string;
|
|
153
|
-
/** Ready-to-use relative URL for fetching the avatar image. Read-only, set by server. */
|
|
154
|
-
avatarUrl?: string;
|
|
155
|
-
/** Responsibilities — simple strings or structured objects with area/description/priority */
|
|
156
|
-
responsibilities?: (string | AgentResponsibility)[];
|
|
157
|
-
/** Communication tone — HOW the agent communicates */
|
|
158
|
-
tone?: string;
|
|
159
|
-
/** Personality traits — WHO the agent IS as a persona */
|
|
160
|
-
personality?: string;
|
|
161
|
-
/** Social & web accounts — keys are platform names, values are handles/URLs */
|
|
162
|
-
socials?: Record<string, string>;
|
|
163
|
-
}
|
|
164
|
-
export interface Condition {
|
|
165
|
-
expression: string;
|
|
166
|
-
}
|
|
167
|
-
export interface LoopConfig {
|
|
168
|
-
name?: string;
|
|
169
|
-
systemPrompt?: string;
|
|
170
|
-
tools?: string[];
|
|
171
|
-
skills?: string[];
|
|
172
|
-
toolChoice?: LoopToolChoice;
|
|
173
|
-
model?: string;
|
|
174
|
-
reasoning?: string;
|
|
175
|
-
temperature?: number;
|
|
176
|
-
maxTurns?: number;
|
|
177
|
-
stopWhen?: Condition;
|
|
178
|
-
output?: {
|
|
179
|
-
schema?: unknown;
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
export type LoopNext = string | Array<{
|
|
183
|
-
when?: string;
|
|
184
|
-
to: string;
|
|
185
|
-
}>;
|
|
186
|
-
export type LoopToolChoice = "auto" | "none" | "required" | {
|
|
187
|
-
mode: "auto" | "none" | "required";
|
|
188
|
-
tool?: string;
|
|
189
|
-
};
|
|
190
34
|
export declare const LOOP_LIFECYCLE_HOOKS: readonly ["loop:start", "step:before", "model:before", "tool:before", "tool:after", "step:after", "loop:stop", "loop:transition", "loop:end"];
|
|
191
|
-
export type LoopLifecycleHook = typeof LOOP_LIFECYCLE_HOOKS[number];
|
|
192
|
-
export type ProjectLoopVersion = "1";
|
|
193
|
-
export type ProjectLoopKind = "graph";
|
|
194
|
-
export interface LoopHookAction {
|
|
195
|
-
tool: string;
|
|
196
|
-
input?: unknown;
|
|
197
|
-
saveAs?: string;
|
|
198
|
-
when?: string;
|
|
199
|
-
onError?: "fail" | "continue";
|
|
200
|
-
}
|
|
201
|
-
export type ProjectLoopHooks = Partial<Record<LoopLifecycleHook, LoopHookAction[]>>;
|
|
202
|
-
export type LoopPolicyEffect = "allow" | "deny" | "approval";
|
|
203
|
-
export type LoopPermissionEffect = "allow" | "deny" | "approval";
|
|
204
|
-
export type LoopPermissionResource = "loop" | "step" | "model" | "tool" | "human";
|
|
205
|
-
export interface ProjectLoopPolicy {
|
|
206
|
-
id?: string;
|
|
207
|
-
description?: string;
|
|
208
|
-
hook?: LoopLifecycleHook;
|
|
209
|
-
effect: LoopPolicyEffect;
|
|
210
|
-
when: string;
|
|
211
|
-
message?: string;
|
|
212
|
-
}
|
|
213
|
-
export interface LoopPermissionMatch {
|
|
214
|
-
loop?: string | string[];
|
|
215
|
-
step?: string | string[];
|
|
216
|
-
tool?: string | string[];
|
|
217
|
-
human?: string | string[];
|
|
218
|
-
hook?: LoopLifecycleHook | LoopLifecycleHook[];
|
|
219
|
-
}
|
|
220
|
-
export interface ProjectLoopPermission {
|
|
221
|
-
id?: string;
|
|
222
|
-
description?: string;
|
|
223
|
-
resource: LoopPermissionResource;
|
|
224
|
-
action?: string;
|
|
225
|
-
effect: LoopPermissionEffect;
|
|
226
|
-
match?: LoopPermissionMatch;
|
|
227
|
-
when?: string;
|
|
228
|
-
message?: string;
|
|
229
|
-
}
|
|
230
|
-
export type LoopTraceEventType = "loop.start" | "loop.resume" | "loop.end" | "loop.error" | "permission.result" | "policy.result" | "approval.required" | "step.start" | "step.end" | "step.skip" | "tool.call" | "tool.result" | "human.request" | "human.result" | "transition";
|
|
231
|
-
export interface LoopTraceEvent {
|
|
232
|
-
id: string;
|
|
233
|
-
type: LoopTraceEventType;
|
|
234
|
-
ts: string;
|
|
235
|
-
loop?: string;
|
|
236
|
-
step?: string;
|
|
237
|
-
tool?: string;
|
|
238
|
-
human?: string;
|
|
239
|
-
from?: string;
|
|
240
|
-
to?: string;
|
|
241
|
-
status?: "started" | "completed" | "skipped" | "failed";
|
|
242
|
-
when?: string;
|
|
243
|
-
input?: unknown;
|
|
244
|
-
output?: unknown;
|
|
245
|
-
error?: string;
|
|
246
|
-
data?: Record<string, unknown>;
|
|
247
|
-
}
|
|
248
|
-
export type ProjectLoopRunStatus = "running" | "completed" | "failed" | "awaiting_approval" | "approval_approved" | "approval_rejected" | "resuming" | "cancelled";
|
|
249
|
-
export interface LoopApprovedGate {
|
|
250
|
-
type: "policy" | "permission";
|
|
251
|
-
id: string;
|
|
252
|
-
hook: LoopLifecycleHook;
|
|
253
|
-
approvalRequestId?: string;
|
|
254
|
-
resolvedAt?: string;
|
|
255
|
-
resolvedBy?: string;
|
|
256
|
-
}
|
|
257
|
-
export interface LoopResumeState {
|
|
258
|
-
context: Record<string, unknown>;
|
|
259
|
-
steps: Step[];
|
|
260
|
-
previousNode?: string;
|
|
261
|
-
approvedGates?: LoopApprovedGate[];
|
|
262
|
-
runtime?: Record<string, unknown>;
|
|
263
|
-
attempts?: number;
|
|
264
|
-
createdAt: string;
|
|
265
|
-
updatedAt?: string;
|
|
266
|
-
}
|
|
267
|
-
export interface LoopApprovalSnapshot {
|
|
268
|
-
type?: "policy" | "permission";
|
|
269
|
-
policyId: string;
|
|
270
|
-
permissionId?: string;
|
|
271
|
-
hook: LoopLifecycleHook;
|
|
272
|
-
message?: string;
|
|
273
|
-
payload: Record<string, unknown>;
|
|
274
|
-
context: Record<string, unknown>;
|
|
275
|
-
status?: "pending" | "approved" | "rejected";
|
|
276
|
-
resolvedAt?: string;
|
|
277
|
-
resolvedBy?: string;
|
|
278
|
-
note?: string;
|
|
279
|
-
}
|
|
280
|
-
export interface LoopRunRecord {
|
|
281
|
-
id: string;
|
|
282
|
-
loopName: string;
|
|
283
|
-
agentName?: string;
|
|
284
|
-
sessionId?: string;
|
|
285
|
-
user?: string;
|
|
286
|
-
status: ProjectLoopRunStatus;
|
|
287
|
-
context: Record<string, unknown>;
|
|
288
|
-
trace: LoopTraceEvent[];
|
|
289
|
-
error?: string;
|
|
290
|
-
approvalRequestId?: string;
|
|
291
|
-
approval?: LoopApprovalSnapshot;
|
|
292
|
-
resume?: LoopResumeState;
|
|
293
|
-
metadata?: Record<string, unknown>;
|
|
294
|
-
startedAt: string;
|
|
295
|
-
updatedAt: string;
|
|
296
|
-
completedAt?: string;
|
|
297
|
-
}
|
|
298
35
|
export interface LoopRunFilters {
|
|
299
36
|
loopName?: string;
|
|
300
37
|
agentName?: string;
|
|
@@ -303,292 +40,6 @@ export interface LoopRunFilters {
|
|
|
303
40
|
status?: ProjectLoopRunStatus;
|
|
304
41
|
limit?: number;
|
|
305
42
|
}
|
|
306
|
-
export type LoopStepConfig = (LoopConfig & {
|
|
307
|
-
type?: "agent";
|
|
308
|
-
when?: string;
|
|
309
|
-
next?: LoopNext;
|
|
310
|
-
}) | {
|
|
311
|
-
type: "human";
|
|
312
|
-
when?: string;
|
|
313
|
-
output?: {
|
|
314
|
-
schema?: unknown;
|
|
315
|
-
};
|
|
316
|
-
notify?: string[];
|
|
317
|
-
next?: LoopNext;
|
|
318
|
-
} | {
|
|
319
|
-
type: "parallel";
|
|
320
|
-
when?: string;
|
|
321
|
-
branches: string[];
|
|
322
|
-
join?: "all" | "any" | number;
|
|
323
|
-
next?: LoopNext;
|
|
324
|
-
} | {
|
|
325
|
-
type: "while";
|
|
326
|
-
when?: string;
|
|
327
|
-
condition?: string;
|
|
328
|
-
until?: string;
|
|
329
|
-
body: string | string[];
|
|
330
|
-
maxIterations?: number;
|
|
331
|
-
next?: LoopNext;
|
|
332
|
-
} | {
|
|
333
|
-
type: "tool";
|
|
334
|
-
when?: string;
|
|
335
|
-
tool: string;
|
|
336
|
-
input?: unknown;
|
|
337
|
-
saveAs?: string;
|
|
338
|
-
next?: LoopNext;
|
|
339
|
-
};
|
|
340
|
-
export interface ProjectLoopConfig {
|
|
341
|
-
version?: ProjectLoopVersion;
|
|
342
|
-
kind?: ProjectLoopKind;
|
|
343
|
-
name: string;
|
|
344
|
-
description?: string;
|
|
345
|
-
metadata?: Record<string, unknown>;
|
|
346
|
-
context?: "shared";
|
|
347
|
-
hooks?: ProjectLoopHooks;
|
|
348
|
-
permissions?: ProjectLoopPermission[];
|
|
349
|
-
policies?: ProjectLoopPolicy[];
|
|
350
|
-
start: string;
|
|
351
|
-
steps: Record<string, LoopStepConfig>;
|
|
352
|
-
}
|
|
353
|
-
export interface SwitchCase {
|
|
354
|
-
when: string;
|
|
355
|
-
steps: Step[];
|
|
356
|
-
}
|
|
357
|
-
export interface WhileBlock {
|
|
358
|
-
condition?: string;
|
|
359
|
-
until?: string;
|
|
360
|
-
maxIterations?: number;
|
|
361
|
-
steps: Step[];
|
|
362
|
-
}
|
|
363
|
-
export type Step = {
|
|
364
|
-
loop: string;
|
|
365
|
-
when?: string;
|
|
366
|
-
} | {
|
|
367
|
-
tool: string;
|
|
368
|
-
input?: unknown;
|
|
369
|
-
saveAs?: string;
|
|
370
|
-
when?: string;
|
|
371
|
-
} | {
|
|
372
|
-
parallel: Step[];
|
|
373
|
-
join?: "all" | "any" | number;
|
|
374
|
-
when?: string;
|
|
375
|
-
} | {
|
|
376
|
-
switch: {
|
|
377
|
-
cases: SwitchCase[];
|
|
378
|
-
default?: {
|
|
379
|
-
steps: Step[];
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
when?: string;
|
|
383
|
-
} | {
|
|
384
|
-
while: WhileBlock;
|
|
385
|
-
when?: string;
|
|
386
|
-
} | {
|
|
387
|
-
human: string;
|
|
388
|
-
output?: {
|
|
389
|
-
schema?: unknown;
|
|
390
|
-
};
|
|
391
|
-
notify?: string[];
|
|
392
|
-
when?: string;
|
|
393
|
-
};
|
|
394
|
-
export interface Pipeline {
|
|
395
|
-
mode?: "sequential" | "parallel";
|
|
396
|
-
context?: "shared";
|
|
397
|
-
steps: Step[];
|
|
398
|
-
}
|
|
399
|
-
export interface AgentConfig {
|
|
400
|
-
name: string;
|
|
401
|
-
/** ISO timestamp of when this agent was created / added to the team. */
|
|
402
|
-
createdAt?: string;
|
|
403
|
-
role?: string;
|
|
404
|
-
model?: string;
|
|
405
|
-
allowedTools?: string[];
|
|
406
|
-
/** MCP servers to connect to. */
|
|
407
|
-
mcpServers?: Record<string, McpServerConfig>;
|
|
408
|
-
/** Filesystem sandbox — directories the agent is allowed to access.
|
|
409
|
-
* When omitted, defaults to the project workDir. */
|
|
410
|
-
allowedPaths?: string[];
|
|
411
|
-
/** Agent's identity — persona, responsibilities, communication style */
|
|
412
|
-
identity?: AgentIdentity;
|
|
413
|
-
/** Agent this one reports to — org chart hierarchy for escalation */
|
|
414
|
-
reportsTo?: string;
|
|
415
|
-
systemPrompt?: string;
|
|
416
|
-
skills?: string[];
|
|
417
|
-
maxTurns?: number;
|
|
418
|
-
/** Max concurrent tasks for this agent. Default: unlimited. */
|
|
419
|
-
maxConcurrency?: number;
|
|
420
|
-
/** Reasoning / deep thinking level for this agent's LLM calls. */
|
|
421
|
-
reasoning?: ReasoningLevel;
|
|
422
|
-
/** Runtime/environment ref for configurable loop execution. */
|
|
423
|
-
runtime?: string;
|
|
424
|
-
/** Runtime-only model tool-choice policy materialized from an active loop step. */
|
|
425
|
-
toolChoice?: LoopToolChoice;
|
|
426
|
-
/** Project-level loop names this agent can use. */
|
|
427
|
-
assignedLoops?: string[];
|
|
428
|
-
/** Default project-level loop name for this agent. */
|
|
429
|
-
defaultLoop?: string;
|
|
430
|
-
/** Legacy inline loop collection. Prefer project-level loops + assignedLoops. */
|
|
431
|
-
loops?: Record<string, LoopConfig>;
|
|
432
|
-
/** Legacy deterministic loop pipeline. */
|
|
433
|
-
pipeline?: Pipeline;
|
|
434
|
-
volatile?: boolean;
|
|
435
|
-
missionGroup?: string;
|
|
436
|
-
/** Browser profile name for persistent context (cookies, auth). Used with agent-browser --profile. */
|
|
437
|
-
browserProfile?: string;
|
|
438
|
-
/** Allowed recipient email domains for email_send. Overrides global setting. */
|
|
439
|
-
emailAllowedDomains?: string[];
|
|
440
|
-
}
|
|
441
|
-
export interface AgentActivity {
|
|
442
|
-
lastTool?: string;
|
|
443
|
-
lastFile?: string;
|
|
444
|
-
filesCreated: string[];
|
|
445
|
-
filesEdited: string[];
|
|
446
|
-
toolCalls: number;
|
|
447
|
-
totalTokens: number;
|
|
448
|
-
lastUpdate: string;
|
|
449
|
-
summary?: string;
|
|
450
|
-
sessionId?: string;
|
|
451
|
-
}
|
|
452
|
-
export interface AgentProcess {
|
|
453
|
-
agentName: string;
|
|
454
|
-
pid: number;
|
|
455
|
-
taskId: string;
|
|
456
|
-
startedAt: string;
|
|
457
|
-
alive: boolean;
|
|
458
|
-
activity: AgentActivity;
|
|
459
|
-
}
|
|
460
|
-
export interface Team {
|
|
461
|
-
name: string;
|
|
462
|
-
description?: string;
|
|
463
|
-
agents: AgentConfig[];
|
|
464
|
-
}
|
|
465
|
-
/** Serializable representation of a single message in the reviewer's conversation */
|
|
466
|
-
export interface ReviewerMessage {
|
|
467
|
-
role: "user" | "assistant" | "toolResult";
|
|
468
|
-
/** For user/assistant: text content. For toolResult: the tool output text. */
|
|
469
|
-
content: string;
|
|
470
|
-
/** Tool calls made by the assistant (if role === "assistant") */
|
|
471
|
-
toolCalls?: {
|
|
472
|
-
id: string;
|
|
473
|
-
name: string;
|
|
474
|
-
arguments: Record<string, unknown>;
|
|
475
|
-
}[];
|
|
476
|
-
/** For toolResult messages */
|
|
477
|
-
toolCallId?: string;
|
|
478
|
-
toolName?: string;
|
|
479
|
-
isError?: boolean;
|
|
480
|
-
timestamp: number;
|
|
481
|
-
}
|
|
482
|
-
/** Phase 1 exploration trace from a single reviewer */
|
|
483
|
-
export interface ReviewerExploration {
|
|
484
|
-
/** Full analysis text produced by the reviewer during exploration */
|
|
485
|
-
analysis: string;
|
|
486
|
-
/** Files read by the reviewer during exploration */
|
|
487
|
-
filesRead: string[];
|
|
488
|
-
/** Complete conversation (user prompts, assistant responses, tool calls & results) */
|
|
489
|
-
messages: ReviewerMessage[];
|
|
490
|
-
}
|
|
491
|
-
/** Individual reviewer result from llm_review multi-evaluator consensus */
|
|
492
|
-
export interface ReviewerResult {
|
|
493
|
-
index: number;
|
|
494
|
-
scores: {
|
|
495
|
-
dimension: string;
|
|
496
|
-
score: number;
|
|
497
|
-
reasoning: string;
|
|
498
|
-
evidence?: {
|
|
499
|
-
file: string;
|
|
500
|
-
line: number;
|
|
501
|
-
note: string;
|
|
502
|
-
}[];
|
|
503
|
-
}[];
|
|
504
|
-
summary: string;
|
|
505
|
-
globalScore: number;
|
|
506
|
-
/** Phase 1 exploration trace (analysis, files read, full conversation) */
|
|
507
|
-
exploration?: ReviewerExploration;
|
|
508
|
-
/** Errors from scoring strategy attempts (Phase 2 fallback chain) */
|
|
509
|
-
scoringAttemptErrors?: string[];
|
|
510
|
-
}
|
|
511
|
-
export interface CheckResult {
|
|
512
|
-
type: TaskExpectation["type"];
|
|
513
|
-
passed: boolean;
|
|
514
|
-
message: string;
|
|
515
|
-
details?: string;
|
|
516
|
-
scores?: DimensionScore[];
|
|
517
|
-
globalScore?: number;
|
|
518
|
-
/** Individual reviewer results (llm_review only) — shows how each reviewer voted */
|
|
519
|
-
reviewers?: ReviewerResult[];
|
|
520
|
-
}
|
|
521
|
-
export interface MetricResult {
|
|
522
|
-
name: string;
|
|
523
|
-
value: number;
|
|
524
|
-
threshold: number;
|
|
525
|
-
passed: boolean;
|
|
526
|
-
}
|
|
527
|
-
export type AssessmentTrigger = "initial" | "reassess" | "fix" | "retry" | "auto-correct" | "judge";
|
|
528
|
-
export interface AssessmentResult {
|
|
529
|
-
passed: boolean;
|
|
530
|
-
checks: CheckResult[];
|
|
531
|
-
metrics: MetricResult[];
|
|
532
|
-
llmReview?: string;
|
|
533
|
-
scores?: DimensionScore[];
|
|
534
|
-
globalScore?: number;
|
|
535
|
-
timestamp: string;
|
|
536
|
-
/** What triggered this assessment. */
|
|
537
|
-
trigger?: AssessmentTrigger;
|
|
538
|
-
}
|
|
539
|
-
export type MissionStatus = "draft" | "scheduled" | "recurring" | "active" | "paused" | "completed" | "failed" | "cancelled";
|
|
540
|
-
export interface Mission {
|
|
541
|
-
id: string;
|
|
542
|
-
name: string;
|
|
543
|
-
data: string;
|
|
544
|
-
prompt?: string;
|
|
545
|
-
status: MissionStatus;
|
|
546
|
-
/** Absolute deadline (ISO timestamp). */
|
|
547
|
-
deadline?: string;
|
|
548
|
-
/** Cron expression or ISO timestamp for scheduled execution. */
|
|
549
|
-
schedule?: string;
|
|
550
|
-
/** End date for recurring schedules (ISO timestamp). After this date the schedule stops. */
|
|
551
|
-
endDate?: string;
|
|
552
|
-
/** Minimum average score for the mission to pass. */
|
|
553
|
-
qualityThreshold?: number;
|
|
554
|
-
/** Mission-level scoped notification rules. */
|
|
555
|
-
notifications?: ScopedNotificationRules;
|
|
556
|
-
/** How many times this mission has been executed. */
|
|
557
|
-
executionCount?: number;
|
|
558
|
-
createdAt: string;
|
|
559
|
-
updatedAt: string;
|
|
560
|
-
}
|
|
561
|
-
/** Checkpoint defined within a mission — planned stopping point for human review.
|
|
562
|
-
* Pauses the mission when afterTasks complete; blocked tasks wait until resumed. */
|
|
563
|
-
export interface MissionCheckpoint {
|
|
564
|
-
/** Checkpoint name (unique within the mission, used in events and resume calls). */
|
|
565
|
-
name: string;
|
|
566
|
-
/** Task titles that must all complete before this checkpoint triggers. */
|
|
567
|
-
afterTasks: string[];
|
|
568
|
-
/** Task titles that are blocked until the checkpoint is resumed. */
|
|
569
|
-
blocksTasks: string[];
|
|
570
|
-
/** Optional message shown when the checkpoint activates. */
|
|
571
|
-
message?: string;
|
|
572
|
-
/** Notification channels to alert when the checkpoint is reached. */
|
|
573
|
-
notifyChannels?: string[];
|
|
574
|
-
}
|
|
575
|
-
/** Delay defined within a mission — timed wait between task groups.
|
|
576
|
-
* Unlike checkpoints (which pause until a human resumes), delays automatically
|
|
577
|
-
* resume after a specified duration elapses. */
|
|
578
|
-
export interface MissionDelay {
|
|
579
|
-
/** Delay name (unique within the mission). */
|
|
580
|
-
name: string;
|
|
581
|
-
/** Task titles that must all complete before the delay timer starts. */
|
|
582
|
-
afterTasks: string[];
|
|
583
|
-
/** Task titles that are blocked until the delay timer expires. */
|
|
584
|
-
blocksTasks: string[];
|
|
585
|
-
/** ISO 8601 duration (e.g. "PT2H" = 2 hours, "PT30M" = 30 minutes, "P1D" = 1 day). */
|
|
586
|
-
duration: string;
|
|
587
|
-
/** Optional message shown when the delay starts. */
|
|
588
|
-
message?: string;
|
|
589
|
-
/** Notification channels to alert when the delay starts / expires. */
|
|
590
|
-
notifyChannels?: string[];
|
|
591
|
-
}
|
|
592
43
|
/** Runtime state of an active delay (timer started, waiting to expire). */
|
|
593
44
|
export interface ActiveDelay {
|
|
594
45
|
/** Mission group name. */
|
|
@@ -602,86 +53,7 @@ export interface ActiveDelay {
|
|
|
602
53
|
/** ISO timestamp when the delay will expire. */
|
|
603
54
|
expiresAt: string;
|
|
604
55
|
}
|
|
605
|
-
/** Quality gate defined within a mission — automatic score-based blocking between task phases. */
|
|
606
|
-
export interface MissionQualityGate {
|
|
607
|
-
/** Gate name (unique within the mission). */
|
|
608
|
-
name: string;
|
|
609
|
-
/** Task titles whose assessment scores are evaluated. */
|
|
610
|
-
afterTasks: string[];
|
|
611
|
-
/** Task titles blocked until the gate passes. */
|
|
612
|
-
blocksTasks: string[];
|
|
613
|
-
/** Minimum average score (1-5) of afterTasks required to pass. */
|
|
614
|
-
minScore?: number;
|
|
615
|
-
/** If true, all afterTasks must be "done" (not "failed") to pass. */
|
|
616
|
-
requireAllPassed?: boolean;
|
|
617
|
-
/** Custom condition expression. */
|
|
618
|
-
condition?: string;
|
|
619
|
-
/** Notification channels for pass/fail events. */
|
|
620
|
-
notifyChannels?: string[];
|
|
621
|
-
}
|
|
622
|
-
export interface MissionReport {
|
|
623
|
-
missionId: string;
|
|
624
|
-
group: string;
|
|
625
|
-
allPassed: boolean;
|
|
626
|
-
totalDuration: number;
|
|
627
|
-
tasks: {
|
|
628
|
-
title: string;
|
|
629
|
-
status: "done" | "failed";
|
|
630
|
-
duration: number;
|
|
631
|
-
score?: number;
|
|
632
|
-
filesCreated: string[];
|
|
633
|
-
filesEdited: string[];
|
|
634
|
-
outcomes?: TaskOutcome[];
|
|
635
|
-
}[];
|
|
636
|
-
filesCreated: string[];
|
|
637
|
-
filesEdited: string[];
|
|
638
|
-
outcomes?: TaskOutcome[];
|
|
639
|
-
avgScore?: number;
|
|
640
|
-
}
|
|
641
|
-
export type NotificationSeverity = "info" | "warning" | "critical";
|
|
642
|
-
export type NotificationChannelType = "slack" | "email" | "telegram" | "whatsapp" | "webhook";
|
|
643
56
|
export type NotificationStatus = "sent" | "failed";
|
|
644
|
-
export type DmPolicy = "pairing" | "allowlist" | "open" | "disabled";
|
|
645
|
-
export interface ChannelGatewayConfig {
|
|
646
|
-
dmPolicy?: DmPolicy;
|
|
647
|
-
allowFrom?: string[];
|
|
648
|
-
enableInbound?: boolean;
|
|
649
|
-
sessionIdleMinutes?: number;
|
|
650
|
-
}
|
|
651
|
-
export interface NotificationChannelConfig {
|
|
652
|
-
type: NotificationChannelType;
|
|
653
|
-
webhookUrl?: string;
|
|
654
|
-
to?: string[];
|
|
655
|
-
provider?: string;
|
|
656
|
-
apiKey?: string;
|
|
657
|
-
botToken?: string;
|
|
658
|
-
chatId?: string;
|
|
659
|
-
profileDir?: string;
|
|
660
|
-
url?: string;
|
|
661
|
-
headers?: Record<string, string>;
|
|
662
|
-
host?: string;
|
|
663
|
-
port?: number;
|
|
664
|
-
from?: string;
|
|
665
|
-
gateway?: ChannelGatewayConfig;
|
|
666
|
-
}
|
|
667
|
-
export interface NotificationRule {
|
|
668
|
-
id: string;
|
|
669
|
-
name: string;
|
|
670
|
-
events: string[];
|
|
671
|
-
condition?: unknown;
|
|
672
|
-
channels: string[];
|
|
673
|
-
severity?: NotificationSeverity;
|
|
674
|
-
template?: string;
|
|
675
|
-
cooldownMs?: number;
|
|
676
|
-
includeOutcomes?: boolean;
|
|
677
|
-
outcomeFilter?: OutcomeType[];
|
|
678
|
-
maxAttachmentSize?: number;
|
|
679
|
-
}
|
|
680
|
-
export interface ScopedNotificationRules {
|
|
681
|
-
rules: NotificationRule[];
|
|
682
|
-
/** If true, rules are added on top of parent scope. If false (default), they replace. */
|
|
683
|
-
inherit?: boolean;
|
|
684
|
-
}
|
|
685
57
|
export interface NotificationRecord {
|
|
686
58
|
id: string;
|
|
687
59
|
timestamp: string;
|
|
@@ -715,47 +87,6 @@ export interface SendNotificationResult {
|
|
|
715
87
|
scheduledAt: string;
|
|
716
88
|
firesAt: string;
|
|
717
89
|
}
|
|
718
|
-
export type ApprovalGateHandler = "auto" | "human";
|
|
719
|
-
export type ApprovalStatus = "pending" | "approved" | "rejected" | "timeout";
|
|
720
|
-
export interface ApprovalRequest {
|
|
721
|
-
id: string;
|
|
722
|
-
gateId: string;
|
|
723
|
-
gateName: string;
|
|
724
|
-
taskId?: string;
|
|
725
|
-
missionId?: string;
|
|
726
|
-
status: ApprovalStatus;
|
|
727
|
-
payload: unknown;
|
|
728
|
-
requestedAt: string;
|
|
729
|
-
resolvedAt?: string;
|
|
730
|
-
resolvedBy?: string;
|
|
731
|
-
note?: string;
|
|
732
|
-
}
|
|
733
|
-
export interface ScheduleEntry {
|
|
734
|
-
id: string;
|
|
735
|
-
missionId: string;
|
|
736
|
-
expression: string;
|
|
737
|
-
recurring: boolean;
|
|
738
|
-
enabled: boolean;
|
|
739
|
-
lastRunAt?: string;
|
|
740
|
-
nextRunAt?: string;
|
|
741
|
-
deadlineOffsetMs?: number;
|
|
742
|
-
createdAt: string;
|
|
743
|
-
}
|
|
744
|
-
export interface QualityMetrics {
|
|
745
|
-
entityId: string;
|
|
746
|
-
entityType: "task" | "agent" | "mission";
|
|
747
|
-
totalAssessments: number;
|
|
748
|
-
passedAssessments: number;
|
|
749
|
-
avgScore?: number;
|
|
750
|
-
minScore?: number;
|
|
751
|
-
maxScore?: number;
|
|
752
|
-
dimensionScores: Record<string, number>;
|
|
753
|
-
totalRetries: number;
|
|
754
|
-
totalFixes: number;
|
|
755
|
-
deadlinesMet: number;
|
|
756
|
-
deadlinesMissed: number;
|
|
757
|
-
updatedAt: string;
|
|
758
|
-
}
|
|
759
90
|
export interface PlaybookParameter {
|
|
760
91
|
/** Parameter name — used as {{name}} in the mission playbook. */
|
|
761
92
|
name: string;
|
|
@@ -801,100 +132,6 @@ export type TemplateInfo = PlaybookInfo;
|
|
|
801
132
|
export type TemplateDefinition = PlaybookDefinition;
|
|
802
133
|
/** @deprecated Use PlaybookRunResult instead. */
|
|
803
134
|
export type TemplateRunResult = PlaybookRunResult;
|
|
804
|
-
/** Reasoning level for LLM calls. */
|
|
805
|
-
export type ReasoningLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
806
|
-
/** Primary model with ordered fallbacks. */
|
|
807
|
-
export interface ModelConfig {
|
|
808
|
-
/** Primary model spec (e.g. "anthropic/claude-opus-4-6"). */
|
|
809
|
-
primary?: string;
|
|
810
|
-
/** Ordered fallback models — tried when primary fails. */
|
|
811
|
-
fallbacks?: string[];
|
|
812
|
-
}
|
|
813
|
-
/** Model allowlist entry with optional alias and parameter overrides. */
|
|
814
|
-
export interface ModelAllowlistEntry {
|
|
815
|
-
/** Display alias for this model (e.g. "Sonnet", "GPT"). */
|
|
816
|
-
alias?: string;
|
|
817
|
-
/** Per-model parameter overrides. */
|
|
818
|
-
params?: Record<string, unknown>;
|
|
819
|
-
}
|
|
820
|
-
/** Custom model definition for non-catalog providers (Ollama, vLLM, LM Studio, etc.) */
|
|
821
|
-
export interface CustomModelDef {
|
|
822
|
-
/** Model ID used in API calls. */
|
|
823
|
-
id: string;
|
|
824
|
-
/** Human-readable name. */
|
|
825
|
-
name: string;
|
|
826
|
-
/** Whether the model supports extended thinking / reasoning. */
|
|
827
|
-
reasoning?: boolean;
|
|
828
|
-
/** Supported input types. Default: ["text"] */
|
|
829
|
-
input?: ("text" | "image")[];
|
|
830
|
-
/** Cost per million tokens. Default: all zeros (free/local). */
|
|
831
|
-
cost?: {
|
|
832
|
-
input: number;
|
|
833
|
-
output: number;
|
|
834
|
-
cacheRead: number;
|
|
835
|
-
cacheWrite: number;
|
|
836
|
-
};
|
|
837
|
-
/** Context window size in tokens. Default: 200000 */
|
|
838
|
-
contextWindow?: number;
|
|
839
|
-
/** Max output tokens. Default: 8192 */
|
|
840
|
-
maxTokens?: number;
|
|
841
|
-
}
|
|
842
|
-
export interface PolpoSettings {
|
|
843
|
-
maxRetries: number;
|
|
844
|
-
workDir: string;
|
|
845
|
-
logLevel: "quiet" | "normal" | "verbose";
|
|
846
|
-
taskTimeout?: number;
|
|
847
|
-
staleThreshold?: number;
|
|
848
|
-
defaultRetryPolicy?: RetryPolicy;
|
|
849
|
-
enableVolatileTeams?: boolean;
|
|
850
|
-
volatileCleanup?: "on_complete" | "manual";
|
|
851
|
-
maxFixAttempts?: number;
|
|
852
|
-
maxQuestionRounds?: number;
|
|
853
|
-
maxResolutionAttempts?: number;
|
|
854
|
-
autoCorrectExpectations?: boolean;
|
|
855
|
-
/** Skills to load into the orchestrator's system prompt. Resolved against the orchestrator skill pool. */
|
|
856
|
-
orchestratorSkills?: string[];
|
|
857
|
-
/** Model for orchestrator LLM calls. Can be a string or a ModelConfig with fallbacks. */
|
|
858
|
-
orchestratorModel?: string | ModelConfig;
|
|
859
|
-
imageModel?: string;
|
|
860
|
-
modelAllowlist?: Record<string, ModelAllowlistEntry>;
|
|
861
|
-
/** Global reasoning / deep thinking level. */
|
|
862
|
-
reasoning?: ReasoningLevel;
|
|
863
|
-
storage?: "file" | "sqlite";
|
|
864
|
-
maxAssessmentRetries?: number;
|
|
865
|
-
maxConcurrency?: number;
|
|
866
|
-
approvalGates?: Array<Record<string, unknown>>;
|
|
867
|
-
notifications?: Record<string, unknown>;
|
|
868
|
-
escalationPolicy?: Record<string, unknown>;
|
|
869
|
-
sla?: Record<string, unknown>;
|
|
870
|
-
enableScheduler?: boolean;
|
|
871
|
-
defaultQualityThreshold?: number;
|
|
872
|
-
emailAllowedDomains?: string[];
|
|
873
|
-
mcpToolAllowlist?: Record<string, string[]>;
|
|
874
|
-
}
|
|
875
|
-
export interface ProviderConfig {
|
|
876
|
-
baseUrl?: string;
|
|
877
|
-
/** API compatibility mode for custom endpoints. */
|
|
878
|
-
api?: "openai-completions" | "openai-responses" | "anthropic-messages";
|
|
879
|
-
/** Custom model definitions for this provider. */
|
|
880
|
-
models?: CustomModelDef[];
|
|
881
|
-
}
|
|
882
|
-
export interface PolpoConfig {
|
|
883
|
-
version: string;
|
|
884
|
-
project: string;
|
|
885
|
-
teams: Team[];
|
|
886
|
-
tasks: Omit<Task, "status" | "retries" | "result" | "createdAt" | "updatedAt">[];
|
|
887
|
-
settings: PolpoSettings;
|
|
888
|
-
providers?: Record<string, ProviderConfig>;
|
|
889
|
-
}
|
|
890
|
-
export interface PolpoState {
|
|
891
|
-
project: string;
|
|
892
|
-
teams: Team[];
|
|
893
|
-
tasks: Task[];
|
|
894
|
-
processes: AgentProcess[];
|
|
895
|
-
startedAt?: string;
|
|
896
|
-
completedAt?: string;
|
|
897
|
-
}
|
|
898
135
|
export interface AddTeamRequest {
|
|
899
136
|
name: string;
|
|
900
137
|
description?: string;
|
|
@@ -1127,16 +364,6 @@ export interface ResumeMissionResult {
|
|
|
1127
364
|
retried: number;
|
|
1128
365
|
pending: number;
|
|
1129
366
|
}
|
|
1130
|
-
export interface Attachment {
|
|
1131
|
-
id: string;
|
|
1132
|
-
sessionId?: string;
|
|
1133
|
-
messageId?: string;
|
|
1134
|
-
filename: string;
|
|
1135
|
-
mimeType: string;
|
|
1136
|
-
size: number;
|
|
1137
|
-
path: string;
|
|
1138
|
-
createdAt: string;
|
|
1139
|
-
}
|
|
1140
367
|
export interface FileRoot {
|
|
1141
368
|
id: string;
|
|
1142
369
|
name: string;
|
|
@@ -1147,13 +374,6 @@ export interface FileRoot {
|
|
|
1147
374
|
totalFiles: number;
|
|
1148
375
|
totalSize: number;
|
|
1149
376
|
}
|
|
1150
|
-
export interface FileEntry {
|
|
1151
|
-
name: string;
|
|
1152
|
-
type: "file" | "directory";
|
|
1153
|
-
size?: number;
|
|
1154
|
-
mimeType?: string;
|
|
1155
|
-
modifiedAt?: string;
|
|
1156
|
-
}
|
|
1157
377
|
export interface FilePreview {
|
|
1158
378
|
path: string;
|
|
1159
379
|
name: string;
|
|
@@ -1170,11 +390,6 @@ export interface LogSession {
|
|
|
1170
390
|
startedAt: string;
|
|
1171
391
|
entries: number;
|
|
1172
392
|
}
|
|
1173
|
-
export interface LogEntry {
|
|
1174
|
-
ts: string;
|
|
1175
|
-
event: string;
|
|
1176
|
-
data: unknown;
|
|
1177
|
-
}
|
|
1178
393
|
/** A single entry from the per-run JSONL activity log. */
|
|
1179
394
|
export interface RunActivityEntry {
|
|
1180
395
|
/** ISO timestamp (present on all entries except the header) */
|
|
@@ -1227,39 +442,6 @@ export interface TaskActivityPayload {
|
|
|
1227
442
|
/** Log entries for the resolved session (empty if sessionId is null). */
|
|
1228
443
|
entries: LogEntry[];
|
|
1229
444
|
}
|
|
1230
|
-
/** A discovered skill from the project skill pool. */
|
|
1231
|
-
export interface SkillInfo {
|
|
1232
|
-
name: string;
|
|
1233
|
-
description: string;
|
|
1234
|
-
allowedTools?: string[];
|
|
1235
|
-
/** Where this skill was discovered from. */
|
|
1236
|
-
source: "project" | "global" | "polpo" | "claude" | "home";
|
|
1237
|
-
/** Absolute path to the skill directory. */
|
|
1238
|
-
path: string;
|
|
1239
|
-
/** Freeform tags for search and filtering (from skills-index.json). */
|
|
1240
|
-
tags?: string[];
|
|
1241
|
-
/** Macro-category for grouping (from skills-index.json). */
|
|
1242
|
-
category?: string;
|
|
1243
|
-
}
|
|
1244
|
-
/** Skill with full content loaded (returned by GET /skills/:name/content). */
|
|
1245
|
-
export interface LoadedSkill extends SkillInfo {
|
|
1246
|
-
/** Full SKILL.md content (markdown body without frontmatter). */
|
|
1247
|
-
content: string;
|
|
1248
|
-
}
|
|
1249
|
-
/** Skill with agent assignment info (returned by GET /skills). */
|
|
1250
|
-
export interface SkillWithAssignment extends SkillInfo {
|
|
1251
|
-
/** Agent names that have this skill assigned. */
|
|
1252
|
-
assignedTo: string[];
|
|
1253
|
-
}
|
|
1254
|
-
/** A single entry in the skills index file (.polpo/skills-index.json). */
|
|
1255
|
-
export interface SkillIndexEntry {
|
|
1256
|
-
/** Freeform tags for search and filtering. */
|
|
1257
|
-
tags?: string[];
|
|
1258
|
-
/** Macro-category for grouping. */
|
|
1259
|
-
category?: string;
|
|
1260
|
-
}
|
|
1261
|
-
/** The full skills index: maps skill names to their index metadata. */
|
|
1262
|
-
export type SkillIndex = Record<string, SkillIndexEntry>;
|
|
1263
445
|
/** Request body for creating a new skill. */
|
|
1264
446
|
export interface CreateSkillRequest {
|
|
1265
447
|
name: string;
|
|
@@ -1444,7 +626,6 @@ export interface ChatCompletionChunkDelta {
|
|
|
1444
626
|
};
|
|
1445
627
|
}>;
|
|
1446
628
|
}
|
|
1447
|
-
export type ToolCallState = "preparing" | "calling" | "completed" | "error" | "interrupted";
|
|
1448
629
|
export interface ToolCallEvent {
|
|
1449
630
|
/** Tool call ID from the LLM */
|
|
1450
631
|
id: string;
|
|
@@ -1486,34 +667,9 @@ export interface ChatCompletionChunk {
|
|
|
1486
667
|
thinking?: string;
|
|
1487
668
|
}>;
|
|
1488
669
|
}
|
|
1489
|
-
export interface AskUserOption {
|
|
1490
|
-
label: string;
|
|
1491
|
-
description?: string;
|
|
1492
|
-
}
|
|
1493
|
-
export interface AskUserQuestion {
|
|
1494
|
-
/** Unique question key for matching answers */
|
|
1495
|
-
id: string;
|
|
1496
|
-
/** The full question text */
|
|
1497
|
-
question: string;
|
|
1498
|
-
/** Short label for compact display (max 30 chars) */
|
|
1499
|
-
header?: string;
|
|
1500
|
-
/** Pre-populated selectable options */
|
|
1501
|
-
options: AskUserOption[];
|
|
1502
|
-
/** Allow selecting multiple options (default: false) */
|
|
1503
|
-
multiple?: boolean;
|
|
1504
|
-
/** Show custom text input (default: true) */
|
|
1505
|
-
custom?: boolean;
|
|
1506
|
-
}
|
|
1507
670
|
export interface AskUserPayload {
|
|
1508
671
|
questions: AskUserQuestion[];
|
|
1509
672
|
}
|
|
1510
|
-
export interface AskUserAnswer {
|
|
1511
|
-
questionId: string;
|
|
1512
|
-
/** Labels of selected options */
|
|
1513
|
-
selected: string[];
|
|
1514
|
-
/** Custom text typed by user */
|
|
1515
|
-
customText?: string;
|
|
1516
|
-
}
|
|
1517
673
|
export interface MissionPreviewPayload {
|
|
1518
674
|
/** Proposed mission name */
|
|
1519
675
|
name: string;
|