@volter/supercode-teams 0.2.31 → 0.2.32
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/package.json +1 -1
- package/server/store-core.mjs +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
|
|
6
6
|
"license": "MIT",
|
package/server/store-core.mjs
CHANGED
|
@@ -84,7 +84,9 @@ export function createStoreHandlers({ all, get, run, tx }) {
|
|
|
84
84
|
ordinals=all('SELECT ordinal FROM messages WHERE team_id=? AND session_id=? AND revision=? ORDER BY ordinal',[teamId,session.id,revision]).map(row=>row.ordinal);
|
|
85
85
|
}
|
|
86
86
|
const pageOrdinals=ordinals.slice(-tail),remaining=ordinals.slice(0,-tail);
|
|
87
|
-
|
|
87
|
+
// A page is a run of one revision's ordinals, read as a range: a hosted SQLite binds at most 100 variables, and a
|
|
88
|
+
// page of more messages than that, as an IN list, failed ("too many SQL variables").
|
|
89
|
+
const rows=pageOrdinals.length?all('SELECT * FROM messages WHERE team_id=? AND session_id=? AND revision=? AND ordinal>=? AND ordinal<=? ORDER BY ordinal',[teamId,session.id,revision,pageOrdinals[0],pageOrdinals[pageOrdinals.length-1]]).filter(row=>pageOrdinals.includes(row.ordinal)):[];
|
|
88
90
|
const version=get('SELECT descriptor_json FROM session_versions WHERE team_id=? AND session_id=? AND revision=?',[teamId,session.id,revision]);
|
|
89
91
|
if(!version)domainError(404,'not_found','session revision not found');
|
|
90
92
|
let descriptorJson=version.descriptor_json;
|