@capybara-hq/kernel 0.1.0-rc.92 → 0.1.0-rc.93
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/bootstrap.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"schemaVersion": 1,
|
|
4
4
|
"marketplace": {
|
|
5
5
|
"url": "https://github.com/capybara-hq/plugins.git",
|
|
6
|
-
"commit": "
|
|
6
|
+
"commit": "a48ecd8f674cbe24c7094ab8390d7d9ef56b7d80"
|
|
7
7
|
},
|
|
8
8
|
"plugins": [
|
|
9
9
|
{
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"name": "device-local",
|
|
99
99
|
"source": "npm",
|
|
100
100
|
"npm": "@capybara-hq/plugin-device-local",
|
|
101
|
-
"version": "0.1.0-rc.
|
|
102
|
-
"integrity": "sha512-
|
|
101
|
+
"version": "0.1.0-rc.12",
|
|
102
|
+
"integrity": "sha512-ncQmaRGa48fNjFD5rHQL94yEzBKv0pTS+4vy1uoK9SMWqSJw4/NUfVHs18Li0N2X92yRUystyuGHuJ0/oD4HPA==",
|
|
103
103
|
"required": false,
|
|
104
104
|
"scope": "all"
|
|
105
105
|
},
|
|
@@ -208,7 +208,7 @@ export declare function headsToResolve(entries: readonly MarketplaceEntry[], imp
|
|
|
208
208
|
/** The host versions (an entry's `minKernel` is judged against them). */
|
|
209
209
|
export declare const HOST_VERSIONS: {
|
|
210
210
|
readonly kernel: string;
|
|
211
|
-
readonly sdk: "0.1.0-rc.
|
|
211
|
+
readonly sdk: "0.1.0-rc.76";
|
|
212
212
|
};
|
|
213
213
|
/** Whether this deployment satisfies the entry's `minKernel`. */
|
|
214
214
|
export declare const entryCompatible: (e: Pick<MarketplaceEntry, "minKernel">) => boolean;
|
|
@@ -8,7 +8,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
8
8
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
9
9
|
};
|
|
10
10
|
import { randomBytes } from "node:crypto";
|
|
11
|
-
import { DeviceAccessError, deviceServiceId, parseToolKey, ToolError, } from "@capybara-hq/plugin-sdk";
|
|
11
|
+
import { DeviceAccessError, deviceServiceFilesDigest, deviceServiceId, parseToolKey, ToolError, } from "@capybara-hq/plugin-sdk";
|
|
12
12
|
import { Inject, Injectable } from "@nestjs/common";
|
|
13
13
|
import { DeviceAccess } from "../devices/access.js";
|
|
14
14
|
import { ConversationDevices } from "../devices/conversation-devices.js";
|
|
@@ -141,8 +141,12 @@ let DeviceAccessService = class DeviceAccessService {
|
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
// race-free: the provider keeps a running service and never starts a stopped one here
|
|
144
|
+
// a service running other files (the extension was upgraded since it started) gets a start
|
|
145
|
+
// like a stopped one, reviewed below; the provider then restarts it on the spec's files
|
|
146
|
+
const digest = deviceServiceFilesDigest(providerSpec.files);
|
|
147
|
+
const current = (st) => st.state === "running" && (st.filesDigest === undefined || st.filesDigest === digest);
|
|
144
148
|
const found = await ensure(true);
|
|
145
|
-
if (found
|
|
149
|
+
if (current(found))
|
|
146
150
|
return found;
|
|
147
151
|
const reviewFacts = await this.devices.reviewFacts(call.orgId, facts.rootConversationId, call.conversationId);
|
|
148
152
|
if (reviewFacts === null || reviewFacts.deviceId !== use.deviceId)
|
|
@@ -193,11 +197,11 @@ let DeviceAccessService = class DeviceAccessService {
|
|
|
193
197
|
// another call may have started it since the first look (that call audits its own start):
|
|
194
198
|
// found running now, this call started nothing and audits nothing
|
|
195
199
|
const raced = await ensure(true);
|
|
196
|
-
if (raced
|
|
200
|
+
if (current(raced))
|
|
197
201
|
return raced;
|
|
198
202
|
const started = await ensure(false);
|
|
199
|
-
// audited only when this ensure started it: the service was stopped (no startedAt)
|
|
200
|
-
// before, and runs with a startedAt now
|
|
203
|
+
// audited only when this ensure started it: the service was stopped (no startedAt) or ran
|
|
204
|
+
// other files just before, and runs with a new startedAt now
|
|
201
205
|
if (started.state !== "running" || started.startedAt === raced.startedAt)
|
|
202
206
|
return started;
|
|
203
207
|
await audit(this.db, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capybara-hq/kernel",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.93",
|
|
4
4
|
"description": "Capybara kernel: config, database, plugin host and HTTP API of the Capybara agent platform",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"yaml": "^2.9.1",
|
|
67
67
|
"yauzl": "3.4.0",
|
|
68
68
|
"zod": "^4.6.7",
|
|
69
|
-
"@capybara-hq/plugin-sdk": "^0.1.0-rc.
|
|
69
|
+
"@capybara-hq/plugin-sdk": "^0.1.0-rc.76"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@langchain/langgraph-checkpoint-validation": "^1.2.0",
|