@ottocode/server 0.1.261 → 0.1.263
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ottocode/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.263",
|
|
4
4
|
"description": "HTTP API server for ottocode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"typecheck": "tsc --noEmit"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@ottocode/database": "0.1.
|
|
65
|
-
"@ottocode/sdk": "0.1.
|
|
64
|
+
"@ottocode/database": "0.1.263",
|
|
65
|
+
"@ottocode/sdk": "0.1.263",
|
|
66
66
|
"@hono/zod-openapi": "^1.1.5",
|
|
67
67
|
"ai-sdk-ollama": "^3.8.3",
|
|
68
68
|
"drizzle-orm": "^0.44.5",
|
|
@@ -131,6 +131,23 @@ export async function listSessions({
|
|
|
131
131
|
.limit(limit);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
type UpdateSessionAgentInput = {
|
|
135
|
+
db: DB;
|
|
136
|
+
sessionId: string;
|
|
137
|
+
agent: string;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export async function updateSessionAgent({
|
|
141
|
+
db,
|
|
142
|
+
sessionId,
|
|
143
|
+
agent,
|
|
144
|
+
}: UpdateSessionAgentInput): Promise<void> {
|
|
145
|
+
await db
|
|
146
|
+
.update(sessions)
|
|
147
|
+
.set({ agent, lastActiveAt: Date.now() })
|
|
148
|
+
.where(eq(sessions.id, sessionId));
|
|
149
|
+
}
|
|
150
|
+
|
|
134
151
|
export type SessionHistoryMessage = MessageRow & {
|
|
135
152
|
parts: MessagePartRow[];
|
|
136
153
|
};
|