@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/cli/main.js
CHANGED
|
@@ -32903,6 +32903,10 @@ var projectionSessionRowSchema = external_exports.object({
|
|
|
32903
32903
|
startedAt: external_exports.string().datetime().nullable().optional(),
|
|
32904
32904
|
endedAt: external_exports.string().datetime().nullable().optional(),
|
|
32905
32905
|
turnCount: external_exports.number().int().nonnegative().default(0),
|
|
32906
|
+
parentSessionId: external_exports.string().min(1).nullable().optional(),
|
|
32907
|
+
isSubagent: external_exports.boolean().nullable().optional(),
|
|
32908
|
+
agentRole: external_exports.string().nullable().optional(),
|
|
32909
|
+
agentNickname: external_exports.string().nullable().optional(),
|
|
32906
32910
|
metadata: external_exports.record(external_exports.unknown()).nullable().optional()
|
|
32907
32911
|
});
|
|
32908
32912
|
var searchDocRowSchema = external_exports.object({
|
|
@@ -32941,6 +32945,7 @@ var projectionContentBlockRowSchema = external_exports.object({
|
|
|
32941
32945
|
sequence: external_exports.number().int().nonnegative(),
|
|
32942
32946
|
kind: external_exports.string().min(1),
|
|
32943
32947
|
text: external_exports.string().nullable().optional(),
|
|
32948
|
+
tokenCount: external_exports.number().int().nonnegative().nullable().optional(),
|
|
32944
32949
|
objectId: external_exports.string().min(1).nullable().optional(),
|
|
32945
32950
|
metadata: external_exports.record(external_exports.unknown()).nullable().optional()
|
|
32946
32951
|
});
|
|
@@ -57773,6 +57778,7 @@ __name(isPreconditionFailed, "isPreconditionFailed");
|
|
|
57773
57778
|
// src/cli/sync/bundle.ts
|
|
57774
57779
|
function readSessionsForUpload(bundle) {
|
|
57775
57780
|
const rows = bundle.db.prepare(`SELECT s.session_id, s.source_tool, s.project_id, s.title, s.start_ts, s.end_ts,
|
|
57781
|
+
s.parent_session_id, s.is_subagent, s.agent_role, s.agent_nickname,
|
|
57776
57782
|
COALESCE(tc.cnt, 0) AS turn_count
|
|
57777
57783
|
FROM sessions s
|
|
57778
57784
|
LEFT JOIN (SELECT session_id, COUNT(*) AS cnt FROM turns GROUP BY session_id) tc
|
|
@@ -57786,7 +57792,11 @@ function readSessionsForUpload(bundle) {
|
|
|
57786
57792
|
title: row.title,
|
|
57787
57793
|
startedAt: row.start_ts,
|
|
57788
57794
|
endedAt: row.end_ts,
|
|
57789
|
-
turnCount: row.turn_count
|
|
57795
|
+
turnCount: row.turn_count,
|
|
57796
|
+
parentSessionId: row.parent_session_id,
|
|
57797
|
+
isSubagent: row.is_subagent === 1,
|
|
57798
|
+
agentRole: row.agent_role,
|
|
57799
|
+
agentNickname: row.agent_nickname
|
|
57790
57800
|
}));
|
|
57791
57801
|
}
|
|
57792
57802
|
__name(readSessionsForUpload, "readSessionsForUpload");
|
|
@@ -57896,10 +57906,10 @@ function readContentBlocksForUpload(bundle) {
|
|
|
57896
57906
|
sequence: row.ordinal,
|
|
57897
57907
|
kind: row.block_type,
|
|
57898
57908
|
text: row.text_inline,
|
|
57909
|
+
tokenCount: row.token_count,
|
|
57899
57910
|
objectId: row.text_object_id,
|
|
57900
57911
|
metadata: {
|
|
57901
57912
|
mimeType: row.mime_type,
|
|
57902
|
-
tokenCount: row.token_count,
|
|
57903
57913
|
isError: row.is_error === 1,
|
|
57904
57914
|
isRedacted: row.is_redacted === 1,
|
|
57905
57915
|
visibility: row.visibility
|
|
@@ -59361,11 +59371,13 @@ function readRawRecordChunk(bundle, afterId, limit) {
|
|
|
59361
59371
|
__name(readRawRecordChunk, "readRawRecordChunk");
|
|
59362
59372
|
function readSessionChunk(bundle, afterId, limit) {
|
|
59363
59373
|
const sql = afterId ? `SELECT s.session_id, s.source_tool, s.project_id, s.title, s.start_ts, s.end_ts,
|
|
59374
|
+
s.parent_session_id, s.is_subagent, s.agent_role, s.agent_nickname,
|
|
59364
59375
|
(SELECT COUNT(*) FROM turns t WHERE t.session_id = s.session_id) AS turn_count
|
|
59365
59376
|
FROM sessions s
|
|
59366
59377
|
WHERE s.session_id > ?
|
|
59367
59378
|
ORDER BY s.session_id
|
|
59368
59379
|
LIMIT ?` : `SELECT s.session_id, s.source_tool, s.project_id, s.title, s.start_ts, s.end_ts,
|
|
59380
|
+
s.parent_session_id, s.is_subagent, s.agent_role, s.agent_nickname,
|
|
59369
59381
|
(SELECT COUNT(*) FROM turns t WHERE t.session_id = s.session_id) AS turn_count
|
|
59370
59382
|
FROM sessions s
|
|
59371
59383
|
ORDER BY s.session_id
|
|
@@ -59384,7 +59396,11 @@ function readSessionChunk(bundle, afterId, limit) {
|
|
|
59384
59396
|
title: row.title,
|
|
59385
59397
|
startedAt: row.start_ts,
|
|
59386
59398
|
endedAt: row.end_ts,
|
|
59387
|
-
turnCount: row.turn_count
|
|
59399
|
+
turnCount: row.turn_count,
|
|
59400
|
+
parentSessionId: row.parent_session_id,
|
|
59401
|
+
isSubagent: row.is_subagent === 1,
|
|
59402
|
+
agentRole: row.agent_role,
|
|
59403
|
+
agentNickname: row.agent_nickname
|
|
59388
59404
|
})),
|
|
59389
59405
|
nextCursor: rows.length > 0 ? rows[rows.length - 1]?.session_id ?? null : null
|
|
59390
59406
|
};
|
|
@@ -59535,10 +59551,10 @@ function readContentBlockChunk(bundle, afterId, limit) {
|
|
|
59535
59551
|
sequence: row.ordinal,
|
|
59536
59552
|
kind: row.block_type,
|
|
59537
59553
|
text: row.text_inline,
|
|
59554
|
+
tokenCount: row.token_count,
|
|
59538
59555
|
objectId: row.text_object_id,
|
|
59539
59556
|
metadata: {
|
|
59540
59557
|
mimeType: row.mime_type,
|
|
59541
|
-
tokenCount: row.token_count,
|
|
59542
59558
|
isError: row.is_error === 1,
|
|
59543
59559
|
isRedacted: row.is_redacted === 1,
|
|
59544
59560
|
visibility: row.visibility
|