@c3-oss/prosa 0.8.2 → 0.9.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/bin/prosa.js +20 -4
- package/dist/bin/prosa.js.map +1 -1
- package/dist/cli/main.js +20 -4
- package/dist/cli/main.js.map +1 -1
- package/package.json +6 -6
package/dist/bin/prosa.js
CHANGED
|
@@ -32907,6 +32907,10 @@ var projectionSessionRowSchema = external_exports.object({
|
|
|
32907
32907
|
startedAt: external_exports.string().datetime().nullable().optional(),
|
|
32908
32908
|
endedAt: external_exports.string().datetime().nullable().optional(),
|
|
32909
32909
|
turnCount: external_exports.number().int().nonnegative().default(0),
|
|
32910
|
+
parentSessionId: external_exports.string().min(1).nullable().optional(),
|
|
32911
|
+
isSubagent: external_exports.boolean().nullable().optional(),
|
|
32912
|
+
agentRole: external_exports.string().nullable().optional(),
|
|
32913
|
+
agentNickname: external_exports.string().nullable().optional(),
|
|
32910
32914
|
metadata: external_exports.record(external_exports.unknown()).nullable().optional()
|
|
32911
32915
|
});
|
|
32912
32916
|
var searchDocRowSchema = external_exports.object({
|
|
@@ -32945,6 +32949,7 @@ var projectionContentBlockRowSchema = external_exports.object({
|
|
|
32945
32949
|
sequence: external_exports.number().int().nonnegative(),
|
|
32946
32950
|
kind: external_exports.string().min(1),
|
|
32947
32951
|
text: external_exports.string().nullable().optional(),
|
|
32952
|
+
tokenCount: external_exports.number().int().nonnegative().nullable().optional(),
|
|
32948
32953
|
objectId: external_exports.string().min(1).nullable().optional(),
|
|
32949
32954
|
metadata: external_exports.record(external_exports.unknown()).nullable().optional()
|
|
32950
32955
|
});
|
|
@@ -57777,6 +57782,7 @@ __name(isPreconditionFailed, "isPreconditionFailed");
|
|
|
57777
57782
|
// src/cli/sync/bundle.ts
|
|
57778
57783
|
function readSessionsForUpload(bundle) {
|
|
57779
57784
|
const rows = bundle.db.prepare(`SELECT s.session_id, s.source_tool, s.project_id, s.title, s.start_ts, s.end_ts,
|
|
57785
|
+
s.parent_session_id, s.is_subagent, s.agent_role, s.agent_nickname,
|
|
57780
57786
|
COALESCE(tc.cnt, 0) AS turn_count
|
|
57781
57787
|
FROM sessions s
|
|
57782
57788
|
LEFT JOIN (SELECT session_id, COUNT(*) AS cnt FROM turns GROUP BY session_id) tc
|
|
@@ -57790,7 +57796,11 @@ function readSessionsForUpload(bundle) {
|
|
|
57790
57796
|
title: row.title,
|
|
57791
57797
|
startedAt: row.start_ts,
|
|
57792
57798
|
endedAt: row.end_ts,
|
|
57793
|
-
turnCount: row.turn_count
|
|
57799
|
+
turnCount: row.turn_count,
|
|
57800
|
+
parentSessionId: row.parent_session_id,
|
|
57801
|
+
isSubagent: row.is_subagent === 1,
|
|
57802
|
+
agentRole: row.agent_role,
|
|
57803
|
+
agentNickname: row.agent_nickname
|
|
57794
57804
|
}));
|
|
57795
57805
|
}
|
|
57796
57806
|
__name(readSessionsForUpload, "readSessionsForUpload");
|
|
@@ -57900,10 +57910,10 @@ function readContentBlocksForUpload(bundle) {
|
|
|
57900
57910
|
sequence: row.ordinal,
|
|
57901
57911
|
kind: row.block_type,
|
|
57902
57912
|
text: row.text_inline,
|
|
57913
|
+
tokenCount: row.token_count,
|
|
57903
57914
|
objectId: row.text_object_id,
|
|
57904
57915
|
metadata: {
|
|
57905
57916
|
mimeType: row.mime_type,
|
|
57906
|
-
tokenCount: row.token_count,
|
|
57907
57917
|
isError: row.is_error === 1,
|
|
57908
57918
|
isRedacted: row.is_redacted === 1,
|
|
57909
57919
|
visibility: row.visibility
|
|
@@ -59365,11 +59375,13 @@ function readRawRecordChunk(bundle, afterId, limit) {
|
|
|
59365
59375
|
__name(readRawRecordChunk, "readRawRecordChunk");
|
|
59366
59376
|
function readSessionChunk(bundle, afterId, limit) {
|
|
59367
59377
|
const sql = afterId ? `SELECT s.session_id, s.source_tool, s.project_id, s.title, s.start_ts, s.end_ts,
|
|
59378
|
+
s.parent_session_id, s.is_subagent, s.agent_role, s.agent_nickname,
|
|
59368
59379
|
(SELECT COUNT(*) FROM turns t WHERE t.session_id = s.session_id) AS turn_count
|
|
59369
59380
|
FROM sessions s
|
|
59370
59381
|
WHERE s.session_id > ?
|
|
59371
59382
|
ORDER BY s.session_id
|
|
59372
59383
|
LIMIT ?` : `SELECT s.session_id, s.source_tool, s.project_id, s.title, s.start_ts, s.end_ts,
|
|
59384
|
+
s.parent_session_id, s.is_subagent, s.agent_role, s.agent_nickname,
|
|
59373
59385
|
(SELECT COUNT(*) FROM turns t WHERE t.session_id = s.session_id) AS turn_count
|
|
59374
59386
|
FROM sessions s
|
|
59375
59387
|
ORDER BY s.session_id
|
|
@@ -59388,7 +59400,11 @@ function readSessionChunk(bundle, afterId, limit) {
|
|
|
59388
59400
|
title: row.title,
|
|
59389
59401
|
startedAt: row.start_ts,
|
|
59390
59402
|
endedAt: row.end_ts,
|
|
59391
|
-
turnCount: row.turn_count
|
|
59403
|
+
turnCount: row.turn_count,
|
|
59404
|
+
parentSessionId: row.parent_session_id,
|
|
59405
|
+
isSubagent: row.is_subagent === 1,
|
|
59406
|
+
agentRole: row.agent_role,
|
|
59407
|
+
agentNickname: row.agent_nickname
|
|
59392
59408
|
})),
|
|
59393
59409
|
nextCursor: rows.length > 0 ? rows[rows.length - 1]?.session_id ?? null : null
|
|
59394
59410
|
};
|
|
@@ -59539,10 +59555,10 @@ function readContentBlockChunk(bundle, afterId, limit) {
|
|
|
59539
59555
|
sequence: row.ordinal,
|
|
59540
59556
|
kind: row.block_type,
|
|
59541
59557
|
text: row.text_inline,
|
|
59558
|
+
tokenCount: row.token_count,
|
|
59542
59559
|
objectId: row.text_object_id,
|
|
59543
59560
|
metadata: {
|
|
59544
59561
|
mimeType: row.mime_type,
|
|
59545
|
-
tokenCount: row.token_count,
|
|
59546
59562
|
isError: row.is_error === 1,
|
|
59547
59563
|
isRedacted: row.is_redacted === 1,
|
|
59548
59564
|
visibility: row.visibility
|