@prismshadow/penguin-server 0.1.4 → 0.1.5
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/api/types.d.ts +73 -20
- package/dist/index.js +728 -241
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/web-dist/assets/index-Da8gVBDc.css +1 -0
- package/web-dist/assets/{index-7gbWDtby.js → index-DibOt1-H.js} +1 -1
- package/web-dist/assets/index-nay7sGjx.js +171 -0
- package/web-dist/index.html +2 -2
- package/web-dist/assets/index-Bnva9EYm.js +0 -102
- package/web-dist/assets/index-DMcMNwnl.css +0 -1
package/dist/api/types.d.ts
CHANGED
|
@@ -116,6 +116,13 @@ interface ProjectCreateRequest {
|
|
|
116
116
|
interface ProjectCreateResponse {
|
|
117
117
|
project: ProjectSummary;
|
|
118
118
|
}
|
|
119
|
+
interface ProjectUpdateRequest {
|
|
120
|
+
/** New display name. The projectId itself is immutable — only this label can change. */
|
|
121
|
+
name: string;
|
|
122
|
+
}
|
|
123
|
+
interface ProjectUpdateResponse {
|
|
124
|
+
project: ProjectSummary;
|
|
125
|
+
}
|
|
119
126
|
interface MemberInfo {
|
|
120
127
|
userId: string;
|
|
121
128
|
role: ProjectRole;
|
|
@@ -511,7 +518,7 @@ interface MessagesResponse {
|
|
|
511
518
|
live?: MessagesLiveTail;
|
|
512
519
|
}
|
|
513
520
|
/**
|
|
514
|
-
* A single Prompt's input parts: text
|
|
521
|
+
* A single Prompt's input parts: text, image (data: / http(s) URL), or an uploaded file.
|
|
515
522
|
* Docs: /docs/server-api § "Session-Level Endpoints".
|
|
516
523
|
*/
|
|
517
524
|
type TaskInputPart = {
|
|
@@ -520,6 +527,19 @@ type TaskInputPart = {
|
|
|
520
527
|
} | {
|
|
521
528
|
type: "image_url";
|
|
522
529
|
imageUrl: string;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* File attachment (the composer's "+" menu): `dataUrl` is a base64 `data:` URL of the
|
|
533
|
+
* file's bytes, capped at 10MB each (413 `file_too_large` beyond that; the request as a
|
|
534
|
+
* whole still has to fit the global 20MB body limit). The server writes it into the
|
|
535
|
+
* Session scratchpad under a sanitized name and appends an `[attached file: <path>]` line
|
|
536
|
+
* to the message text — the bytes never enter the conversation, the model opens the file
|
|
537
|
+
* by path. `fileName` is the original name (no path separators, no `..`).
|
|
538
|
+
*/
|
|
539
|
+
| {
|
|
540
|
+
type: "file";
|
|
541
|
+
fileName: string;
|
|
542
|
+
dataUrl: string;
|
|
523
543
|
};
|
|
524
544
|
interface TaskCreateRequest {
|
|
525
545
|
input: TaskInputPart[];
|
|
@@ -573,8 +593,16 @@ interface TaskCreateResponse {
|
|
|
573
593
|
* task POST).
|
|
574
594
|
*/
|
|
575
595
|
interface SteerRequest {
|
|
576
|
-
/**
|
|
596
|
+
/** Message text (trimmed server-side); may be empty when `images` carries the message. */
|
|
577
597
|
text: string;
|
|
598
|
+
/**
|
|
599
|
+
* Images sent with the steering message (`data:` or http(s) URLs, same rule as
|
|
600
|
+
* `TaskInputPart.image_url`): delivered as user image messages right behind the
|
|
601
|
+
* `[user_steering]` text. A model without vision receives them as scratchpad path lines
|
|
602
|
+
* instead, exactly as it would a Prompt's images. At least one of `text` / `images` must
|
|
603
|
+
* be non-empty.
|
|
604
|
+
*/
|
|
605
|
+
images?: string[];
|
|
578
606
|
}
|
|
579
607
|
interface ApprovalDecisionRequest {
|
|
580
608
|
decision: "allow" | "deny";
|
|
@@ -989,9 +1017,20 @@ interface UsageErrors {
|
|
|
989
1017
|
unexpected: number;
|
|
990
1018
|
/** The most frequent source · code (null when there are no errors). */
|
|
991
1019
|
topCode: UsageErrorCount | null;
|
|
992
|
-
/** Most recent N items (reverse chronological)
|
|
1020
|
+
/** Most recent N items (reverse chronological) — the first page; older ones come from `GET /usage/errors`. */
|
|
993
1021
|
recent: UsageErrorItem[];
|
|
994
1022
|
}
|
|
1023
|
+
/**
|
|
1024
|
+
* GET /api/projects/:projectId/usage/errors — one page of the error detail table, newest
|
|
1025
|
+
* first. The dashboard response above already carries the first page; this exists so
|
|
1026
|
+
* "show me earlier ones" does not have to refetch the whole aggregate. It takes the same
|
|
1027
|
+
* date/agent filter as the dashboard, so a page never widens what the summary counted.
|
|
1028
|
+
*/
|
|
1029
|
+
interface UsageErrorsPage {
|
|
1030
|
+
items: UsageErrorItem[];
|
|
1031
|
+
/** Filtered row count, so the caller knows when it has reached the end. */
|
|
1032
|
+
total: number;
|
|
1033
|
+
}
|
|
995
1034
|
interface UsageResponse {
|
|
996
1035
|
summary: {
|
|
997
1036
|
today: UsageBucket;
|
|
@@ -1079,21 +1118,22 @@ interface AgentImportResponse {
|
|
|
1079
1118
|
/** Raw result of a single run (a scoreboard per-case runs[] entry). */
|
|
1080
1119
|
interface BenchmarkRunScore {
|
|
1081
1120
|
score: number;
|
|
1082
|
-
cost
|
|
1083
|
-
|
|
1121
|
+
/** Run cost, or null when unavailable. */
|
|
1122
|
+
cost: number | null;
|
|
1123
|
+
durationMs: number;
|
|
1084
1124
|
/** Id of the Session under test in this run (links to Trace). */
|
|
1085
|
-
sessionId
|
|
1125
|
+
sessionId: string;
|
|
1086
1126
|
}
|
|
1087
1127
|
interface BenchmarkCaseScore {
|
|
1088
1128
|
case: string;
|
|
1089
|
-
/**
|
|
1129
|
+
/** Model-written average of this Case's Run scores, on the fixed 0..100 scale. */
|
|
1090
1130
|
score: number;
|
|
1091
|
-
cost
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
|
|
1095
|
-
/** Raw results per
|
|
1096
|
-
runs
|
|
1131
|
+
/** Model-written average of known Run costs; null when every Run cost is unknown. */
|
|
1132
|
+
cost: number | null;
|
|
1133
|
+
/** Model-written average of Run durations, rounded to an integer. */
|
|
1134
|
+
durationMs: number;
|
|
1135
|
+
/** Raw results per Run. */
|
|
1136
|
+
runs: BenchmarkRunScore[];
|
|
1097
1137
|
}
|
|
1098
1138
|
interface BenchmarkEvaluation {
|
|
1099
1139
|
/** Evaluation timestamp (ISO 8601). */
|
|
@@ -1103,15 +1143,19 @@ interface BenchmarkEvaluation {
|
|
|
1103
1143
|
/** Evaluation summary body: how the score was derived, what optimizations were made to the Agent this round (required when generating, tolerated as unset when displaying). */
|
|
1104
1144
|
summary?: string;
|
|
1105
1145
|
/** Model actually used for this evaluation round (upstream id, paired with provider; the chart series is split by model). */
|
|
1106
|
-
modelId
|
|
1146
|
+
modelId: string;
|
|
1107
1147
|
/** Provider group for `modelId`. */
|
|
1108
|
-
provider
|
|
1148
|
+
provider: string;
|
|
1149
|
+
/** Thinking level read from the unchanged Target Agent configuration. */
|
|
1150
|
+
thinkingLevel: string;
|
|
1109
1151
|
/** Agent State version number under test. */
|
|
1110
|
-
version
|
|
1111
|
-
/**
|
|
1152
|
+
version: number;
|
|
1153
|
+
/** Model-written average of Case scores, on the fixed 0..100 scale. */
|
|
1112
1154
|
score: number;
|
|
1113
|
-
cost
|
|
1114
|
-
|
|
1155
|
+
/** Model-written average of known Case costs; null when every Case cost is unknown. */
|
|
1156
|
+
cost: number | null;
|
|
1157
|
+
/** Model-written average of Case durations, rounded to an integer. */
|
|
1158
|
+
durationMs: number;
|
|
1115
1159
|
cases: BenchmarkCaseScore[];
|
|
1116
1160
|
}
|
|
1117
1161
|
interface BenchmarkSummary {
|
|
@@ -1130,6 +1174,15 @@ interface BenchmarkSummary {
|
|
|
1130
1174
|
interface BenchmarksResponse {
|
|
1131
1175
|
benchmarks: BenchmarkSummary[];
|
|
1132
1176
|
}
|
|
1177
|
+
/** Public Benchmark Case metadata. Rubric and Gold content are never included. */
|
|
1178
|
+
interface BenchmarkCaseSummary {
|
|
1179
|
+
id: string;
|
|
1180
|
+
/** First Markdown heading with an optional leading "Case N:" removed; falls back to id. */
|
|
1181
|
+
title: string;
|
|
1182
|
+
}
|
|
1183
|
+
interface BenchmarkCasesResponse {
|
|
1184
|
+
cases: BenchmarkCaseSummary[];
|
|
1185
|
+
}
|
|
1133
1186
|
interface SkillMetadataItem {
|
|
1134
1187
|
/** Skill directory name (the identity key for install / uninstall / Prompt addressing). */
|
|
1135
1188
|
name: string;
|
|
@@ -1212,4 +1265,4 @@ interface UpdateRunResponse {
|
|
|
1212
1265
|
needsRestart: boolean;
|
|
1213
1266
|
}
|
|
1214
1267
|
|
|
1215
|
-
export type { AdminPasswordResetRequest, AdminUserCreateRequest, AdminUserCreateResponse, AdminUsersResponse, AgentCompactionConfigDto, AgentConfigDto, AgentConfigResponse, AgentConfigUpdateRequest, AgentCreateRequest, AgentCreateResponse, AgentImportRequest, AgentImportResponse, AgentModelConfigDto, AgentSkillsResponse, AgentSummary, AgentTraceDateGroup, AgentTraceFileRef, AgentTraceSessionGroup, AgentTracesResponse, AgentsResponse, ApprovalDecisionRequest, ApprovalMode, AuthLoginRequest, AuthResponse, BenchmarkCaseScore, BenchmarkEvaluation, BenchmarkRunScore, BenchmarkSummary, BenchmarksResponse, CredentialInfo, DirEntryInfo, DirListResponse, ErrorBody, FilesStatRequest, FilesStatResponse, GoalResponse, GoalServerEvent, GoalStateView, MeResponse, MemberAddRequest, MemberAddResponse, MemberInfo, MembersResponse, MessagesLiveTail, MessagesResponse, ModelInfo, ModelPricingDto, ModelRefDto, ModelTestRequest, ModelTestResponse, ModelUpdateEntry, ModelsResponse, ModelsUpdateRequest, PasswordChangeRequest, PrefsResponse, ProjectCreateRequest, ProjectCreateResponse, ProjectRole, ProjectSummary, ProjectsResponse, RequestSpan, RetryNowResponse, ScheduleItem, ScheduleServerEvent, ScheduleStatus, ScheduleUpsertRequest, SchedulesResponse, ServerEvent, SessionCategory, SessionCategoryCounts, SessionCreateRequest, SessionCreateResponse, SessionInfo, SessionPatchRequest, SessionResponse, SessionSource, SessionStatus, SessionTracesResponse, SessionsResponse, SkillGroupItem, SkillInstallRequest, SkillLibraryResponse, SkillMetadataItem, SteerRequest, TaskCreateRequest, TaskCreateResponse, TaskInputPart, ToolCallSpan, TraceAnalysisResponse, TraceEventsResponse, TraceFileInfo, TraceImportRequest, TraceImportResponse, TraceModelSegment, TraceTaskStats, TraceToolSpan, UiPrefs, UpdateCheckResponse, UpdateRunResponse, UsageAgentCount, UsageBucket, UsageErrorCount, UsageErrorItem, UsageErrors, UsageGroupBy, UsageGroupRow, UsageResponse, UsageSuccessRate, UsageTrendPoint, UsageTrendPointInTrace, UserInfo, VaultEntryInfo, VaultEntryUpdate, VaultResponse, VaultUpdateRequest, VersionResponse, WorkspaceFileEntry, WorkspaceFilesResponse };
|
|
1268
|
+
export type { AdminPasswordResetRequest, AdminUserCreateRequest, AdminUserCreateResponse, AdminUsersResponse, AgentCompactionConfigDto, AgentConfigDto, AgentConfigResponse, AgentConfigUpdateRequest, AgentCreateRequest, AgentCreateResponse, AgentImportRequest, AgentImportResponse, AgentModelConfigDto, AgentSkillsResponse, AgentSummary, AgentTraceDateGroup, AgentTraceFileRef, AgentTraceSessionGroup, AgentTracesResponse, AgentsResponse, ApprovalDecisionRequest, ApprovalMode, AuthLoginRequest, AuthResponse, BenchmarkCaseScore, BenchmarkCaseSummary, BenchmarkCasesResponse, BenchmarkEvaluation, BenchmarkRunScore, BenchmarkSummary, BenchmarksResponse, CredentialInfo, DirEntryInfo, DirListResponse, ErrorBody, FilesStatRequest, FilesStatResponse, GoalResponse, GoalServerEvent, GoalStateView, MeResponse, MemberAddRequest, MemberAddResponse, MemberInfo, MembersResponse, MessagesLiveTail, MessagesResponse, ModelInfo, ModelPricingDto, ModelRefDto, ModelTestRequest, ModelTestResponse, ModelUpdateEntry, ModelsResponse, ModelsUpdateRequest, PasswordChangeRequest, PrefsResponse, ProjectCreateRequest, ProjectCreateResponse, ProjectRole, ProjectSummary, ProjectUpdateRequest, ProjectUpdateResponse, ProjectsResponse, RequestSpan, RetryNowResponse, ScheduleItem, ScheduleServerEvent, ScheduleStatus, ScheduleUpsertRequest, SchedulesResponse, ServerEvent, SessionCategory, SessionCategoryCounts, SessionCreateRequest, SessionCreateResponse, SessionInfo, SessionPatchRequest, SessionResponse, SessionSource, SessionStatus, SessionTracesResponse, SessionsResponse, SkillGroupItem, SkillInstallRequest, SkillLibraryResponse, SkillMetadataItem, SteerRequest, TaskCreateRequest, TaskCreateResponse, TaskInputPart, ToolCallSpan, TraceAnalysisResponse, TraceEventsResponse, TraceFileInfo, TraceImportRequest, TraceImportResponse, TraceModelSegment, TraceTaskStats, TraceToolSpan, UiPrefs, UpdateCheckResponse, UpdateRunResponse, UsageAgentCount, UsageBucket, UsageErrorCount, UsageErrorItem, UsageErrors, UsageErrorsPage, UsageGroupBy, UsageGroupRow, UsageResponse, UsageSuccessRate, UsageTrendPoint, UsageTrendPointInTrace, UserInfo, VaultEntryInfo, VaultEntryUpdate, VaultResponse, VaultUpdateRequest, VersionResponse, WorkspaceFileEntry, WorkspaceFilesResponse };
|