@capybara-hq/kernel 0.1.0-rc.31 → 0.1.0-rc.33
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/catalog/marketplaces.service.d.ts +1 -1
- package/dist/channels/inbound.d.ts +0 -25
- package/dist/channels/inbound.js +26 -1
- package/dist/channels/phrases.d.ts +28 -0
- package/dist/channels/phrases.js +28 -0
- package/dist/conversations/conversations.controller.d.ts +4 -1
- package/dist/conversations/conversations.controller.js +14 -2
- package/dist/conversations/conversations.service.d.ts +43 -3
- package/dist/conversations/conversations.service.js +93 -19
- package/dist/conversations/event-log.d.ts +3 -3
- package/dist/conversations/event-log.js +3 -3
- package/dist/conversations/events.d.ts +24 -0
- package/dist/conversations/events.js +69 -0
- package/dist/ctx/create-ctx.d.ts +26 -4
- package/dist/ctx/create-ctx.js +54 -34
- package/dist/db/kernel-schema.d.ts +20 -0
- package/dist/devices/conversation-devices.d.ts +57 -3
- package/dist/devices/conversation-devices.js +63 -11
- package/dist/devices/device-projects.service.d.ts +162 -0
- package/dist/devices/device-projects.service.js +503 -0
- package/dist/devices/devices.controller.d.ts +15 -2
- package/dist/devices/devices.controller.js +60 -3
- package/dist/devices/devices.module.js +15 -2
- package/dist/devices/devices.schemas.js +9 -1
- package/dist/devices/dto.d.ts +31 -0
- package/dist/devices/dto.js +38 -1
- package/dist/devices/working-root.d.ts +41 -0
- package/dist/devices/working-root.js +50 -0
- package/dist/errors.d.ts +39 -0
- package/dist/errors.js +39 -0
- package/dist/evals/run-replay.d.ts +9 -1
- package/dist/evals/run-replay.js +15 -1
- package/dist/extensions/permission-set.d.ts +7 -6
- package/dist/extensions/permission-set.js +9 -6
- package/dist/extensions/permission-view.d.ts +4 -4
- package/dist/extensions/permission-view.js +10 -5
- package/dist/http/app.d.ts +8 -2
- package/dist/http/app.js +12 -2
- package/dist/http/plugin-dispatch.d.ts +55 -18
- package/dist/http/plugin-dispatch.js +124 -29
- package/dist/http/plugin-route-access.d.ts +56 -0
- package/dist/http/plugin-route-access.js +192 -0
- package/dist/identity/auth.guard.d.ts +26 -12
- package/dist/identity/auth.guard.js +62 -33
- package/dist/infra/throttler/named-throttlers.d.ts +3 -0
- package/dist/infra/throttler/named-throttlers.js +16 -0
- package/dist/infra/throttler/throttler.guard.d.ts +2 -1
- package/dist/infra/throttler/throttler.guard.js +2 -1
- package/dist/kernel.module.js +3 -0
- package/dist/local-devices/local-device-provider.d.ts +37 -1
- package/dist/local-devices/local-device-provider.js +33 -0
- package/dist/local-devices/machines.d.ts +2 -1
- package/dist/local-devices/machines.js +4 -1
- package/dist/local-devices/policy-summary.js +1 -0
- package/dist/local-devices/relay.d.ts +2 -0
- package/dist/local-devices/relay.js +3 -1
- package/dist/local-devices/targets.d.ts +6 -1
- package/dist/local-devices/targets.js +14 -0
- package/dist/overrides.d.ts +7 -0
- package/dist/overrides.js +4 -0
- package/dist/platform/ops/agent-skills.ops.js +2 -1
- package/dist/platform/ops/devices.ops.d.ts +3 -1
- package/dist/platform/ops/devices.ops.js +136 -3
- package/dist/runtime/context/build.d.ts +3 -0
- package/dist/runtime/context/build.js +14 -0
- package/dist/runtime/context/compaction.js +2 -0
- package/dist/runtime/context/project-root.d.ts +43 -0
- package/dist/runtime/context/project-root.js +85 -0
- package/dist/runtime/model-call.js +25 -1
- package/dist/runtime/project/knowledge.d.ts +129 -0
- package/dist/runtime/project/knowledge.js +248 -0
- package/dist/runtime/project/knowledge.service.d.ts +85 -0
- package/dist/runtime/project/knowledge.service.js +288 -0
- package/dist/runtime/run-worker.d.ts +5 -0
- package/dist/runtime/run-worker.js +27 -6
- package/dist/runtime/runtime.module.js +7 -0
- package/dist/sandbox/review/review.service.d.ts +14 -2
- package/dist/sandbox/review/review.service.js +2 -0
- package/dist/sandbox/review/rules.d.ts +6 -4
- package/dist/sandbox/review/rules.js +185 -62
- package/dist/sandbox/review/types.d.ts +14 -0
- package/dist/sandbox/sandbox.service.d.ts +16 -1
- package/dist/sandbox/sandbox.service.js +75 -3
- package/dist/skills/catalog.d.ts +6 -1
- package/dist/skills/catalog.js +18 -4
- package/dist/skills/invoke.d.ts +64 -2
- package/dist/skills/invoke.js +214 -6
- package/dist/skills/skills.module.js +5 -0
- package/dist/tools/approvals.service.d.ts +6 -0
- package/dist/tools/builtins/sandbox/bash.js +19 -4
- package/dist/tools/builtins/sandbox/common.d.ts +36 -6
- package/dist/tools/builtins/sandbox/common.js +69 -8
- package/dist/tools/builtins/sandbox/edit.js +2 -2
- package/dist/tools/builtins/sandbox/glob.js +3 -2
- package/dist/tools/builtins/sandbox/grep.js +2 -1
- package/dist/tools/builtins/sandbox/read.js +3 -3
- package/dist/tools/builtins/sandbox/write.js +2 -2
- package/dist/tools/builtins/skill-load.d.ts +47 -2
- package/dist/tools/builtins/skill-load.js +160 -2
- package/dist/tools/pipeline.d.ts +1 -1
- package/dist/tools/pipeline.js +53 -8
- package/dist/tools/registry.d.ts +6 -0
- package/package.json +3 -3
- package/src/migrations/0133_project_root.sql +30 -0
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.33",
|
|
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": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"yaml": "^2.9.1",
|
|
66
66
|
"yauzl": "3.4.0",
|
|
67
67
|
"zod": "^4.6.7",
|
|
68
|
-
"@capybara-hq/plugin-sdk": "^0.1.0-rc.
|
|
68
|
+
"@capybara-hq/plugin-sdk": "^0.1.0-rc.24"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@langchain/langgraph-checkpoint-validation": "^1.2.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@types/ws": "^8.18.2",
|
|
75
75
|
"@types/yauzl": "3.4.0",
|
|
76
76
|
"ws": "^8.22.0",
|
|
77
|
-
"@capybara-hq/testing": "0.1.0-rc.
|
|
77
|
+
"@capybara-hq/testing": "0.1.0-rc.19"
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"build": "tsc -b"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- Project root (project root design §4.1, §4.3, §12): a device's projects live in PostgreSQL, keyed
|
|
2
|
+
-- by the device's id, the same for a local machine and a cloud device. The kernel is the only
|
|
3
|
+
-- writer; the device program keeps no project list of its own. A project's identity on its device
|
|
4
|
+
-- is its name; its path is absolute on the device. Deleted with its device row.
|
|
5
|
+
CREATE TABLE IF NOT EXISTS device_projects (
|
|
6
|
+
device_id text NOT NULL REFERENCES devices(id) ON DELETE CASCADE,
|
|
7
|
+
name text NOT NULL,
|
|
8
|
+
path text NOT NULL,
|
|
9
|
+
created_by text NOT NULL,
|
|
10
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
11
|
+
PRIMARY KEY (device_id, name)
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
-- The owner's home directory a local machine reports in its hello (`DeviceHello.home`): the base
|
|
15
|
+
-- of an auto-mode project's relative path. NULL: not reported (cloud devices have none).
|
|
16
|
+
ALTER TABLE device_machines ADD COLUMN IF NOT EXISTS home text;
|
|
17
|
+
|
|
18
|
+
-- A conversation may be bound, at creation, to one project of its device (design §4.3). The name
|
|
19
|
+
-- and the path it resolved to are both stored, so re-pointing the name later does not move an
|
|
20
|
+
-- existing conversation. NULL: free mode.
|
|
21
|
+
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS project_name text;
|
|
22
|
+
ALTER TABLE conversations ADD COLUMN IF NOT EXISTS project_path text;
|
|
23
|
+
|
|
24
|
+
-- Every sandbox tool call and every command review of a bound conversation reads the root
|
|
25
|
+
-- conversation's latest `project_root` event (its working root, design §4.3); the event is not
|
|
26
|
+
-- rewritten while nothing changes, so without this partial index the lookup scans the conversation's
|
|
27
|
+
-- events backwards. Not CONCURRENTLY, like the other index migrations (0025, 0094).
|
|
28
|
+
CREATE INDEX IF NOT EXISTS conversation_events_project_root_idx
|
|
29
|
+
ON conversation_events (conversation_id, seq)
|
|
30
|
+
WHERE type = 'project_root';
|