@sema-agent/server 1.319.0 → 1.320.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/http/routes/trace-usage.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/trace/project.d.ts +1 -1
- package/dist/trace/project.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { projectEvents,
|
|
1
|
+
import { projectEvents, taskSummary, mapTraceEvent } from "../../trace/project.js";
|
|
2
2
|
import { projectArtifacts } from "../../trace/artifacts.js";
|
|
3
3
|
import { usageSummary, usageSeries, usageBreakdown } from "../../usage-analytics.js";
|
|
4
4
|
import { sleep } from "../sse-log.js";
|
|
@@ -146,7 +146,7 @@ async function handleTaskList(res, runStore, query, forceOwner) {
|
|
|
146
146
|
const rows = await runStore.listRuns({ ...(status ? { status } : {}), ...(jobId ? { jobId } : {}), ...(source ? { source } : {}), ...(owner ? { owner } : {}), ...(cursor ? { cursor } : {}), limit: limit + 1 });
|
|
147
147
|
const hasMore = rows.length > limit;
|
|
148
148
|
const page = hasMore ? rows.slice(0, limit) : rows;
|
|
149
|
-
const tasks = page.map((r) =>
|
|
149
|
+
const tasks = page.map((r) => taskSummary(r));
|
|
150
150
|
const last = page[page.length - 1];
|
|
151
151
|
const nextCursor = hasMore && last ? encodeCursor({ createdAt: last.createdAt, taskId: last.taskId }) : undefined;
|
|
152
152
|
sendJson(res, 200, { tasks, ...(nextCursor ? { nextCursor } : {}) });
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { loadConfig, type ServiceConfig } from "./config.js";
|
|
2
2
|
export { createBrain } from "./brain.js";
|
|
3
3
|
export { createSessionStore } from "./plugins/session-store.js";
|
|
4
|
+
export { createStoreBackend, type StoreBackend } from "./plugins/store-backend.js";
|
|
4
5
|
export { createTidbPool, ensureSchema, SCHEMA_STATEMENTS } from "./plugins/tidb-pool.js";
|
|
5
6
|
export { TiDBSessionStore } from "./plugins/tidb-session-store.js";
|
|
6
7
|
export { TiDBSessionStorage } from "./plugins/tidb-session-storage.js";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { loadConfig } from "./config.js";
|
|
2
2
|
export { createBrain } from "./brain.js";
|
|
3
3
|
export { createSessionStore } from "./plugins/session-store.js";
|
|
4
|
+
export { createStoreBackend } from "./plugins/store-backend.js";
|
|
4
5
|
export { createTidbPool, ensureSchema, SCHEMA_STATEMENTS } from "./plugins/tidb-pool.js";
|
|
5
6
|
export { TiDBSessionStore } from "./plugins/tidb-session-store.js";
|
|
6
7
|
export { TiDBSessionStorage } from "./plugins/tidb-session-storage.js";
|
package/dist/trace/project.d.ts
CHANGED
|
@@ -220,7 +220,7 @@ export interface TaskSummary {
|
|
|
220
220
|
label?: string;
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
export declare function
|
|
223
|
+
export declare function taskSummary(run: RunRecord, latestEventType?: string): TaskSummary;
|
|
224
224
|
export declare function normalizeRunEventType(type: string): string;
|
|
225
225
|
export declare function mapTraceEvent(type: string, seq: number, data: Record<string, unknown>): {
|
|
226
226
|
event: string;
|
package/dist/trace/project.js
CHANGED
|
@@ -281,7 +281,7 @@ export function lastStep(latestEventType, status) {
|
|
|
281
281
|
return { type: "responding" };
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
export function
|
|
284
|
+
export function taskSummary(run, latestEventType) {
|
|
285
285
|
const stats = (run.result?.stats ?? {});
|
|
286
286
|
const terminal = run.status !== "running";
|
|
287
287
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.320.0",
|
|
4
4
|
"description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|