botinabox 0.1.0 → 0.1.1
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/bin/botinabox.mjs +0 -0
- package/dist/index.js +6 -6
- package/package.json +10 -10
package/bin/botinabox.mjs
CHANGED
|
File without changes
|
package/dist/index.js
CHANGED
|
@@ -823,14 +823,14 @@ var SessionManager = class {
|
|
|
823
823
|
async save(agentId, channelId, peerId, params) {
|
|
824
824
|
const existing = await this._find(agentId, channelId, peerId);
|
|
825
825
|
if (existing) {
|
|
826
|
-
await this.db.update("
|
|
826
|
+
await this.db.update("messages", { id: existing["id"] }, {
|
|
827
827
|
context: JSON.stringify(params),
|
|
828
828
|
last_message_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
829
829
|
message_count: (existing["message_count"] ?? 0) + 1
|
|
830
830
|
});
|
|
831
831
|
return existing["id"];
|
|
832
832
|
} else {
|
|
833
|
-
const row = await this.db.insert("
|
|
833
|
+
const row = await this.db.insert("messages", {
|
|
834
834
|
agent_id: agentId,
|
|
835
835
|
channel: channelId,
|
|
836
836
|
peer_id: peerId,
|
|
@@ -850,7 +850,7 @@ var SessionManager = class {
|
|
|
850
850
|
async clear(agentId, channelId, peerId) {
|
|
851
851
|
const session = await this._find(agentId, channelId, peerId);
|
|
852
852
|
if (session) {
|
|
853
|
-
await this.db.delete("
|
|
853
|
+
await this.db.delete("messages", { id: session["id"] });
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
856
|
async shouldClear(session, opts) {
|
|
@@ -869,7 +869,7 @@ var SessionManager = class {
|
|
|
869
869
|
return false;
|
|
870
870
|
}
|
|
871
871
|
async _find(agentId, channelId, peerId) {
|
|
872
|
-
const rows = await this.db.query("
|
|
872
|
+
const rows = await this.db.query("messages", {
|
|
873
873
|
where: { agent_id: agentId, channel: channelId, peer_id: peerId }
|
|
874
874
|
});
|
|
875
875
|
return rows[0] ?? void 0;
|
|
@@ -1332,7 +1332,7 @@ function defineCoreTables(db) {
|
|
|
1332
1332
|
"CREATE INDEX IF NOT EXISTS idx_wakeups_agent_scheduled ON wakeups(agent_id, scheduled_at)"
|
|
1333
1333
|
]
|
|
1334
1334
|
});
|
|
1335
|
-
db.define("
|
|
1335
|
+
db.define("messages", {
|
|
1336
1336
|
columns: {
|
|
1337
1337
|
id: "TEXT PRIMARY KEY",
|
|
1338
1338
|
agent_id: "TEXT NOT NULL",
|
|
@@ -1345,7 +1345,7 @@ function defineCoreTables(db) {
|
|
|
1345
1345
|
expires_at: "TEXT"
|
|
1346
1346
|
},
|
|
1347
1347
|
tableConstraints: [
|
|
1348
|
-
"CREATE UNIQUE INDEX IF NOT EXISTS
|
|
1348
|
+
"CREATE UNIQUE INDEX IF NOT EXISTS idx_messages_agent_channel_peer ON messages(agent_id, channel, peer_id)"
|
|
1349
1349
|
]
|
|
1350
1350
|
});
|
|
1351
1351
|
db.define("skills", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "botinabox",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Bot in a Box — framework for building multi-agent bots",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"typecheck": "tsc --noEmit"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
47
|
+
"ajv": "^8.17.1",
|
|
48
|
+
"latticesql": "^0.17.1",
|
|
49
|
+
"yaml": "^2.7.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@anthropic-ai/sdk": "^0.52.0",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"typescript": "^5.7.2",
|
|
65
|
-
"vitest": "^3.0.0",
|
|
66
|
-
"tsup": "^8.3.5",
|
|
67
|
-
"@types/node": "^22.10.0",
|
|
68
|
-
"@types/better-sqlite3": "^7.6.12",
|
|
69
64
|
"@anthropic-ai/sdk": "^0.52.0",
|
|
70
|
-
"
|
|
65
|
+
"@types/better-sqlite3": "^7.6.12",
|
|
66
|
+
"@types/node": "^22.10.0",
|
|
67
|
+
"openai": "^4.104.0",
|
|
68
|
+
"tsup": "^8.3.5",
|
|
69
|
+
"typescript": "^5.7.2",
|
|
70
|
+
"vitest": "^3.0.0"
|
|
71
71
|
}
|
|
72
72
|
}
|