@capybara-hq/kernel 0.1.0-rc.138 → 0.1.0-rc.139

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,103 +3,103 @@
3
3
  "schemaVersion": 1,
4
4
  "marketplace": {
5
5
  "url": "https://github.com/capybara-hq/plugins.git",
6
- "commit": "d5b799da18c7ca44e3b97f9bc13dae6b61495dfd"
6
+ "commit": "ecc903f26ba0d949cc17a7f44dade2ca0316973f"
7
7
  },
8
8
  "plugins": [
9
9
  {
10
10
  "name": "openai-compatible",
11
11
  "source": "npm",
12
12
  "npm": "@capybara-hq/plugin-openai-compatible",
13
- "version": "0.1.0-rc.17",
14
- "integrity": "sha512-ly1FFSEK5uwWqs+TPGmbiGeURqTXRuUjpakcj1wEsryxgueIDe2uyj+yvyIf/jwyTU3728tmxxZmgucGh9b1Qg==",
13
+ "version": "0.1.0-rc.18",
14
+ "integrity": "sha512-u2/gp9oYXINijXSqiLdeKYoHQzTHiZM7bxt8lynrjNGxYtPzV4rwmPk3See1yOTpmJMeKqNPqavudisocZYOBA==",
15
15
  "required": false
16
16
  },
17
17
  {
18
18
  "name": "object-store-s3",
19
19
  "source": "npm",
20
20
  "npm": "@capybara-hq/plugin-object-store-s3",
21
- "version": "0.1.0-rc.13",
22
- "integrity": "sha512-J0bhmRafIoifcZsI6ESTTKClZMSN/cPLVFKfVBIjGTzhGcZobAuTY5+m+j3zMeZCQcEzirBhtF3t76KpslWTZg==",
21
+ "version": "0.1.0-rc.14",
22
+ "integrity": "sha512-SRqBeqzAIuli9kEsdFprO4wQW17mCLxXooheNei0q4UyzPZggtpRORrRCZcgixTsFuzQFP0hPonZcgx3wm0oqQ==",
23
23
  "required": true
24
24
  },
25
25
  {
26
26
  "name": "anthropic",
27
27
  "source": "npm",
28
28
  "npm": "@capybara-hq/plugin-anthropic",
29
- "version": "0.1.0-rc.13",
30
- "integrity": "sha512-9r5EWfkJl6y+MqGTk8dkX4Lz8KuJMrx7Q7o+CQUqaGkhLYZW6ZvvmXjnlpexJdSV0bomUeBpRo1nPSy54lvsNQ==",
29
+ "version": "0.1.0-rc.14",
30
+ "integrity": "sha512-Ygtv1sWffIBX2Vd6q7T71DHkwhAMDPwKEr4TUjp7cZxyUtG2oZvrlRIVxcfRVaF/OSpGrUrf47v8DLWNOwCaxQ==",
31
31
  "required": false
32
32
  },
33
33
  {
34
34
  "name": "openai",
35
35
  "source": "npm",
36
36
  "npm": "@capybara-hq/plugin-openai",
37
- "version": "0.1.0-rc.16",
38
- "integrity": "sha512-QG87aBbF+de82lTAO2H+opusoWhCZYQWU9RljYpsL766v/AivdVW2gZhLhdine60C6dNCEP7zPzeECUxHtmEGA==",
37
+ "version": "0.1.0-rc.17",
38
+ "integrity": "sha512-e5AXAERCCXP4EGLmUwtVH8KmTbTi7W+baaSz3RHY3sMmJEtGQaHcyg9BjjRCDi1/Ic6G8OURhs+SUcgHs/m13Q==",
39
39
  "required": false
40
40
  },
41
41
  {
42
42
  "name": "deepseek",
43
43
  "source": "npm",
44
44
  "npm": "@capybara-hq/plugin-deepseek",
45
- "version": "0.1.0-rc.15",
46
- "integrity": "sha512-96WxB2yo6ohakBtGH1l6unG86e3gR/8T40WNzqcN0P/tyytTkBLFu2+fLDFuHKM2SMViP3HWAwoqFSUE6yDDPQ==",
45
+ "version": "0.1.0-rc.16",
46
+ "integrity": "sha512-WDNjY/MyKp1A2Lf2TfuAucD/GdtP2FNGZRe3yQmBDXn8SMqJ7Plr876P6gL1j667rhbgGGz8w/uUBXcr+smiLg==",
47
47
  "required": false
48
48
  },
49
49
  {
50
50
  "name": "bailian",
51
51
  "source": "npm",
52
52
  "npm": "@capybara-hq/plugin-bailian",
53
- "version": "0.1.0-rc.16",
54
- "integrity": "sha512-rrDYU4ryQvFtb9XTpf5vDJ8EtGR+wtOqp3w8U+U/I4HL+LNSV8ckwtwNHC4bxhqhq3joi2KIdJQswUYkSJYLhA==",
53
+ "version": "0.1.0-rc.17",
54
+ "integrity": "sha512-76rHTjx6ri9+eWpsLDQhAK8V06+FfUdFWrSc1Br/vCF4NQ3HQlvmqwzalJxUiPtTz4UnyBmHf7UC/0N2lnmahw==",
55
55
  "required": false
56
56
  },
57
57
  {
58
58
  "name": "ark",
59
59
  "source": "npm",
60
60
  "npm": "@capybara-hq/plugin-ark",
61
- "version": "0.1.0-rc.16",
62
- "integrity": "sha512-ezWTJn2FJdsbBuWfpuoEbcxnTFlZxIQRA70nKkqf9cCeSXnZCwij2lc+6Og1qeUfSmYnFHcrXicp8RV2mmXjPw==",
61
+ "version": "0.1.0-rc.17",
62
+ "integrity": "sha512-VL6Tphbffn/6jSZaOq2m9W6Z5qglqs7qYCxrNrDRW4JeLFaQtHz6ykIqxJUvGfRQkkSsDX6VO8Gwnpj7B/kKIg==",
63
63
  "required": false
64
64
  },
65
65
  {
66
66
  "name": "connector-mcp",
67
67
  "source": "npm",
68
68
  "npm": "@capybara-hq/plugin-connector-mcp",
69
- "version": "0.1.0-rc.14",
70
- "integrity": "sha512-/dzF1Pw6V2r4lsU1pCmAlAxjVWoX2LSlJ/zVj7nwM8yje90n9+/b17UX9ZSNVXQHs/h/6FH2uearnzM0iYDYxg==",
69
+ "version": "0.1.0-rc.15",
70
+ "integrity": "sha512-BuSf3Igah93ZXWe30dx7nueuwWCPHZtgDtvtZ5EZ877+s4FfnPAufdaPqygzT2aAtD0P1mhy62+cDx67TzPNOg==",
71
71
  "required": false
72
72
  },
73
73
  {
74
74
  "name": "connector-openapi",
75
75
  "source": "npm",
76
76
  "npm": "@capybara-hq/plugin-connector-openapi",
77
- "version": "0.1.0-rc.14",
78
- "integrity": "sha512-Zt881ix9pgLQcyYl9r9HMRWld0pq2o4qi/k9L19ZmIWkDlaYavz6SZ5gocD8jYvzZPKMdA1RXu0Y/HWdYJXpXQ==",
77
+ "version": "0.1.0-rc.15",
78
+ "integrity": "sha512-PiuBDlCHtIIqlapdw5LRRhxIwgPqrsZEZuxvXg9rsBoN1Qygkh0OX2SNv2nx6wJQZ8eXnLXFFysWNaIPslFNUg==",
79
79
  "required": false
80
80
  },
81
81
  {
82
82
  "name": "jina",
83
83
  "source": "npm",
84
84
  "npm": "@capybara-hq/plugin-jina",
85
- "version": "0.1.0-rc.11",
86
- "integrity": "sha512-zmGyRObcS4aEOI1SZoHqMFbeBKvgNNVoYKYk+h69hMheYIiChe+oIXVedysxsXZisucpwzoDPRQ/un0gHIn2XA==",
85
+ "version": "0.1.0-rc.12",
86
+ "integrity": "sha512-LYE+UdX/m2YunIVxzbqj8qpHyOOjDBlaF96WbLPBuDcfNwwtHSHFCwzrjHzJhcZPKn9VF9JCdLrYWRQS4nehqQ==",
87
87
  "required": false
88
88
  },
89
89
  {
90
90
  "name": "device-docker",
91
91
  "source": "npm",
92
92
  "npm": "@capybara-hq/plugin-device-docker",
93
- "version": "0.1.0-rc.36",
94
- "integrity": "sha512-29vne4OcJDkOG0lq4AHEivdgFiAM7v+OnWhShDkLDfI0laet1jYRAglut+OqskoerOyi+gVTFGsBtid/dEuetg==",
93
+ "version": "0.1.0-rc.37",
94
+ "integrity": "sha512-eQbKWWB391h02S8ViOl9SIzHTRjEYGun7LTP/IkMWrkytwr8YR6jFEqUUTB+oYW0a4nBxjWm42gh2UJ0H+6WHw==",
95
95
  "required": false
96
96
  },
97
97
  {
98
98
  "name": "device-local",
99
99
  "source": "npm",
100
100
  "npm": "@capybara-hq/plugin-device-local",
101
- "version": "0.1.0-rc.20",
102
- "integrity": "sha512-oMR3xqkG2x+eX2XCSHmdO6yMHRQxD4oqFVZzGc56vvaUcESPl0Sz9JleMRl+RSa3EQQWcqSgtaP2z6TUcJfKzw==",
101
+ "version": "0.1.0-rc.21",
102
+ "integrity": "sha512-LPwym68E61ZUdgDziwXIpfPO9pXz9tD5aUdMZdoZF6sqea6uDrijz7djo1oCZ+yrGAZhzLBXDqEHJCT8kdRkqw==",
103
103
  "required": false,
104
104
  "scope": "all"
105
105
  },
@@ -107,16 +107,16 @@
107
107
  "name": "todo",
108
108
  "source": "npm",
109
109
  "npm": "@capybara-hq/plugin-todo",
110
- "version": "0.1.0-rc.17",
111
- "integrity": "sha512-LsvKWz3LD+XJNqiXj0RgG6JGT3mPI5ZF2VYuWE93ns0usKzkbiJZ9JlYF4sHsNzHfVhwqCi8uhfY/EOe6vA8gQ==",
110
+ "version": "0.1.0-rc.18",
111
+ "integrity": "sha512-KpIBNLiQAOM8/rRpdVwbUKMVpPwT2MZ1ygjWqTqShtD2xSKEyTJ9yo1buSADPrWTeQfqDx/YRu5+sQ/QYm5cOA==",
112
112
  "required": false
113
113
  },
114
114
  {
115
115
  "name": "skills-core",
116
116
  "source": "npm",
117
117
  "npm": "@capybara-hq/plugin-skills-core",
118
- "version": "0.1.0-rc.3",
119
- "integrity": "sha512-z4vqSFBZnh/Fh0/xHZ55Fw17cjb56i+Yfi8c5pmF5v4BTRCtEPp4416uyvisbLKBZ6oGjNMxI01UBddDXNntrg==",
118
+ "version": "0.1.0-rc.4",
119
+ "integrity": "sha512-uF/tvRQH2eje98tRj15xOkbEWMGT6MVkEXgdrlWNNtH9+/kFE27HtmHRLb9m5bwWFonlXOtxvN9sP2DBE2gGWA==",
120
120
  "required": false,
121
121
  "builtin": true
122
122
  },
@@ -124,8 +124,8 @@
124
124
  "name": "file-preview",
125
125
  "source": "npm",
126
126
  "npm": "@capybara-hq/plugin-file-preview",
127
- "version": "0.1.0-rc.6",
128
- "integrity": "sha512-CNaziqin6RbmFGNesCoBTFcCLhko6DZBmUXsh6XcAoIE7cQvQBzjO8U4SsbGwBaLCQqKiaNrCxowAi3p/2zJVA==",
127
+ "version": "0.1.0-rc.7",
128
+ "integrity": "sha512-0xIyrYnFtw04gVyqw+HxgKoDvsAVqoy+u2C3Wn6+adhCs+58q8miqMB1AGFxV6b9DSUuQT6nqzhWsBH5lLLgkA==",
129
129
  "required": false,
130
130
  "builtin": true
131
131
  }
@@ -284,7 +284,6 @@ export interface DeploymentSettingsTable {
284
284
  export interface ExtensionOrgConfigsTable {
285
285
  plugin: string;
286
286
  org_id: string;
287
- enabled: Generated<boolean>;
288
287
  updated_by: string | null;
289
288
  updated_at: Ts;
290
289
  }
@@ -2209,7 +2208,6 @@ export interface KernelDatabase {
2209
2208
  bootstrap_run_started: BootstrapRunStartedTable;
2210
2209
  org_notices: OrgNoticesTable;
2211
2210
  platform_notices: PlatformNoticesTable;
2212
- plugin_scope_sync_failures: PluginScopeSyncFailuresTable;
2213
2211
  plugin_effect_work: PluginEffectWorkTable;
2214
2212
  extension_client_builds: ExtensionClientBuildsTable;
2215
2213
  extension_client_reports: ExtensionClientReportsTable;
@@ -2301,19 +2299,6 @@ export interface PlatformNoticesTable {
2301
2299
  * dependencies a platform update added to a live install.
2302
2300
  */
2303
2301
  export type ScopeSyncOp = "install" | "update" | "uninstall" | "dependencies";
2304
- /**
2305
- * 0083: an open failure of the plugin scope sync for one (item, org): its last attempt failed; the
2306
- * next sync of the pair that does not fail deletes the row.
2307
- */
2308
- export interface PluginScopeSyncFailuresTable {
2309
- item_id: string;
2310
- org_id: string;
2311
- op: ScopeSyncOp;
2312
- /** The `ApiError` code, else `internal`. */
2313
- code: string;
2314
- message: string;
2315
- failed_at: Ts;
2316
- }
2317
2302
  /** The latest owed or settled generation of a plugin's effects in one org. */
2318
2303
  export interface PluginEffectWorkTable {
2319
2304
  item_id: string;
@@ -1,5 +1,5 @@
1
1
  import { sql } from "kysely";
2
- // PostgreSQL 17 after 0231. Re-review the ownership map before updating this fingerprint.
2
+ // PostgreSQL 17 after 0232. Re-review the ownership map before updating this fingerprint.
3
3
  // It includes relation/column identities and ordered PK, UNIQUE and inbound/outbound FK
4
4
  // columns and actions, including FKs from outside the kernel schema.
5
5
  export async function orgCatalogDrift(db) {
@@ -30,5 +30,5 @@ WITH catalog AS (
30
30
  )
31
31
  SELECT md5(string_agg(entry, chr(10) ORDER BY entry COLLATE "C")) AS fingerprint FROM catalog
32
32
  `.execute(db);
33
- return rows[0]?.fingerprint === "b1f087cb2ef17b0d3f1a53f4f3099ef6" ? undefined : "schema-drift";
33
+ return rows[0]?.fingerprint === "d14c7d273dd0ffd58e26d01d3ceb95a4" ? undefined : "schema-drift";
34
34
  }
@@ -47,7 +47,6 @@ export const rowRules = [
47
47
  rule("org_tool_policies", "org_id, tool_key"),
48
48
  rule("platform_sealed_reveals", "id"),
49
49
  rule("plugin_install_components", "install_id, kind, ref", "install_id IN (SELECT id FROM capybara.plugin_installs WHERE org_id = (SELECT id FROM subject))"),
50
- rule("plugin_scope_sync_failures", "item_id, org_id"),
51
50
  rule("plugin_effect_work", "item_id, org_id"),
52
51
  rule("questions", "id"),
53
52
  rule("retention_work", "id"),
@@ -169,7 +168,6 @@ export const childReferences = {
169
168
  ["platform_skills", "child.catalog_item_id = parent.id"],
170
169
  ["platform_themes", "child.catalog_item_id = parent.id"],
171
170
  ["plugin_installs", "child.item_id = parent.id"],
172
- ["plugin_scope_sync_failures", "child.item_id = parent.id"],
173
171
  ["plugin_effect_work", "child.item_id = parent.id"],
174
172
  ["skill_versions", "child.catalog_item_id = parent.id"],
175
173
  ["skills", "child.catalog_item_id = parent.id"],
@@ -167,7 +167,6 @@ export declare function extensionOrgCountsQuery(db: KernelSchemaDb, names: reado
167
167
  plugin_import_staging: import("../db/kernel-schema.js").PluginImportStagingTable;
168
168
  plugin_install_components: import("../db/kernel-schema.js").PluginInstallComponentsTable;
169
169
  plugin_installs: import("../db/kernel-schema.js").PluginInstallsTable;
170
- plugin_scope_sync_failures: import("../db/kernel-schema.js").PluginScopeSyncFailuresTable;
171
170
  push_preferences: import("../db/kernel-schema.js").PushPreferencesTable;
172
171
  push_registrations: import("../db/kernel-schema.js").PushRegistrationsTable;
173
172
  questions: import("../db/kernel-schema.js").QuestionsTable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/kernel",
3
- "version": "0.1.0-rc.138",
3
+ "version": "0.1.0-rc.139",
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": {
@@ -0,0 +1,49 @@
1
+ SET LOCAL lock_timeout = '5s';
2
+ SET LOCAL capybara.scope = 'platform';
3
+
4
+ -- Hold the checked tables through commit so a writer cannot race the contract checks.
5
+ LOCK TABLE extension_org_configs IN ACCESS EXCLUSIVE MODE;
6
+ LOCK TABLE outbox, plugin_install_components IN SHARE MODE;
7
+
8
+ -- capybara:allow-destructive the contract needs conditional assertions with operator-facing errors before either drop
9
+ DO $$
10
+ DECLARE
11
+ switches_cutover timestamptz;
12
+ effects_cutover timestamptz;
13
+ BEGIN
14
+ SELECT applied_at INTO STRICT switches_cutover FROM _migrations
15
+ WHERE name = '0228_extension_org_switches.sql';
16
+ SELECT applied_at INTO STRICT effects_cutover FROM _migrations
17
+ WHERE name = '0231_plugin_effect_work.sql';
18
+
19
+ IF EXISTS (SELECT 1 FROM extension_org_configs WHERE updated_at >= switches_cutover) THEN
20
+ RAISE EXCEPTION '0232 blocked: extension_org_configs was written after 0228'
21
+ USING HINT = 'Stop legacy writers and reconcile these switches before retrying. See the plugin schema contract upgrade guide.';
22
+ END IF;
23
+
24
+ -- 0231 clears these artifacts in a same-init upgrade. Between releases they detect old writers.
25
+ IF EXISTS (SELECT 1 FROM outbox WHERE queue = 'cap-kernel-plugin-scope') THEN
26
+ RAISE EXCEPTION '0232 blocked: cap-kernel-plugin-scope work remains in the outbox'
27
+ USING HINT = 'Stop legacy writers and reconcile the remaining work before retrying.';
28
+ END IF;
29
+
30
+ IF EXISTS (SELECT 1 FROM plugin_install_components WHERE kind = 'extension') THEN
31
+ RAISE EXCEPTION '0232 blocked: plugin_install_components still has legacy extension rows'
32
+ USING HINT = 'Stop legacy writers and reconcile the remaining extension ownership before retrying.';
33
+ END IF;
34
+
35
+ IF to_regclass('capybara.plugin_scope_sync_failures') IS NOT NULL THEN
36
+ LOCK TABLE plugin_scope_sync_failures IN ACCESS EXCLUSIVE MODE;
37
+ IF EXISTS (SELECT 1 FROM plugin_scope_sync_failures WHERE failed_at >= effects_cutover) THEN
38
+ RAISE EXCEPTION '0232 blocked: plugin_scope_sync_failures was written after 0231'
39
+ USING HINT = 'Stop legacy writers and reconcile the unconverted failures before retrying.';
40
+ END IF;
41
+ END IF;
42
+ END
43
+ $$;
44
+
45
+ -- capybara:allow-destructive 0228 converted eligible switches and the guard rejects later legacy writes; keep row metadata and policy
46
+ ALTER TABLE extension_org_configs DROP COLUMN IF EXISTS enabled;
47
+
48
+ -- capybara:allow-destructive 0231 converted failure state to the effects ledger; the guard rejects failure snapshots written after the conversion
49
+ DROP TABLE IF EXISTS plugin_scope_sync_failures;