@capybara-hq/kernel 0.1.0-rc.36 → 0.1.0-rc.37
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 +5 -5
- package/dist/admin/admin.module.d.ts +3 -3
- package/dist/admin/admin.module.js +6 -6
- package/dist/admin/audit-log.service.d.ts +51 -0
- package/dist/admin/{platform-audit.service.js → audit-log.service.js} +20 -12
- package/dist/admin/audit.controller.d.ts +18 -6
- package/dist/admin/audit.controller.js +36 -6
- package/dist/admin/audit.schemas.d.ts +9 -1
- package/dist/admin/audit.schemas.js +22 -2
- package/dist/admin/outbox-dead.controller.d.ts +4 -6
- package/dist/admin/outbox-dead.controller.js +9 -6
- package/dist/admin/outbox-dead.schemas.d.ts +16 -0
- package/dist/admin/outbox-dead.schemas.js +25 -1
- package/dist/admin/outbox-dead.service.d.ts +16 -7
- package/dist/admin/outbox-dead.service.js +34 -10
- package/dist/admin/overview.service.d.ts +3 -3
- package/dist/admin/overview.service.js +0 -1
- package/dist/agents/agent-lookup.js +2 -10
- package/dist/agents/agents.service.js +9 -20
- package/dist/agents/definition.d.ts +3 -51
- package/dist/agents/definition.js +4 -254
- package/dist/agents/org-templates.js +2 -6
- package/dist/agents/readiness.controller.d.ts +4 -12
- package/dist/agents/readiness.controller.js +4 -12
- package/dist/agents/readiness.service.d.ts +23 -11
- package/dist/agents/readiness.service.js +31 -14
- package/dist/agents/templates.d.ts +0 -6
- package/dist/agents/templates.js +8 -34
- package/dist/background/store.d.ts +2 -0
- package/dist/background/store.js +3 -1
- package/dist/background/wake-rules.js +2 -1
- package/dist/catalog/admin-catalog.controller.d.ts +1 -2
- package/dist/catalog/admin-catalog.controller.js +1 -2
- package/dist/catalog/appearance.service.js +1 -3
- package/dist/catalog/catalog-content.d.ts +1 -1
- package/dist/catalog/catalog-content.js +1 -4
- package/dist/catalog/catalog-items.js +3 -3
- package/dist/catalog/catalog-scope.service.d.ts +10 -28
- package/dist/catalog/catalog-scope.service.js +22 -73
- package/dist/catalog/cli.d.ts +0 -11
- package/dist/catalog/cli.js +0 -20
- package/dist/catalog/component-scope.service.js +0 -2
- package/dist/catalog/component-state.js +2 -2
- package/dist/catalog/install-status.d.ts +6 -0
- package/dist/catalog/install-status.js +6 -0
- package/dist/catalog/job-ids.d.ts +0 -4
- package/dist/catalog/job-ids.js +0 -4
- package/dist/catalog/marketplaces.service.d.ts +1 -1
- package/dist/catalog/org-catalog.service.d.ts +2 -0
- package/dist/catalog/org-catalog.service.js +8 -3
- package/dist/catalog/org-extension-switch.d.ts +7 -2
- package/dist/catalog/org-extension-switch.js +56 -9
- package/dist/catalog/org-plugin-uploads.d.ts +6 -15
- package/dist/catalog/org-plugin-uploads.js +9 -27
- package/dist/catalog/owned-items.js +1 -3
- package/dist/catalog/platform-import-update.js +1 -1
- package/dist/catalog/plugin-import.d.ts +15 -13
- package/dist/catalog/plugin-import.js +21 -30
- package/dist/catalog/plugin-install.d.ts +3 -43
- package/dist/catalog/plugin-install.js +8 -150
- package/dist/catalog/plugin-package.d.ts +5 -10
- package/dist/catalog/plugin-package.js +12 -33
- package/dist/catalog/plugin-upgrade.js +5 -4
- package/dist/catalog/scope-jobs.d.ts +34 -34
- package/dist/catalog/scope-jobs.js +50 -37
- package/dist/catalog/scope-orgs.d.ts +1 -1
- package/dist/catalog/scope-orgs.js +1 -2
- package/dist/catalog/scope-sync-workers.d.ts +4 -3
- package/dist/catalog/scope-sync-workers.js +18 -6
- package/dist/catalog/scope-sync.d.ts +56 -59
- package/dist/catalog/scope-sync.js +96 -166
- package/dist/catalog/unshare.d.ts +3 -4
- package/dist/catalog/unshare.js +5 -8
- package/dist/channels/job-ids.d.ts +2 -6
- package/dist/channels/job-ids.js +2 -6
- package/dist/channels/outbound.d.ts +1 -1
- package/dist/channels/outbound.js +1 -1
- package/dist/channels/supervisor.d.ts +2 -3
- package/dist/channels/supervisor.js +2 -3
- package/dist/client/client-access.service.js +1 -1
- package/dist/config/env.js +19 -1
- package/dist/config/load.d.ts +0 -6
- package/dist/config/load.js +8 -27
- package/dist/config/schema.d.ts +53 -47
- package/dist/config/schema.js +190 -40
- package/dist/conversations/attachments.service.d.ts +10 -3
- package/dist/conversations/attachments.service.js +49 -16
- package/dist/conversations/conversations.controller.d.ts +0 -39
- package/dist/conversations/conversations.controller.js +0 -39
- package/dist/conversations/events.d.ts +71 -46
- package/dist/conversations/events.js +124 -112
- package/dist/conversations/media-types.d.ts +25 -0
- package/dist/conversations/media-types.js +38 -0
- package/dist/conversations/queue.d.ts +3 -1
- package/dist/conversations/queue.service.js +9 -2
- package/dist/conversations/titles.js +6 -0
- package/dist/ctx/create-ctx.js +1 -2
- package/dist/ctx/secrets.d.ts +24 -7
- package/dist/ctx/secrets.js +97 -30
- package/dist/db/kernel-schema.d.ts +17 -6
- package/dist/errors.d.ts +5 -2
- package/dist/errors.js +5 -2
- package/dist/evals/reconstruct.d.ts +4 -17
- package/dist/evals/reconstruct.js +13 -53
- package/dist/evals/recorded-tools.d.ts +0 -27
- package/dist/evals/recorded-tools.js +2 -92
- package/dist/evals/run-replay.d.ts +1 -6
- package/dist/evals/run-replay.js +10 -17
- package/dist/evals/sets.service.d.ts +17 -5
- package/dist/evals/sets.service.js +33 -12
- package/dist/evals/snapshot.d.ts +1 -2
- package/dist/evals/snapshot.js +4 -17
- package/dist/extensions/admin-ops.d.ts +6 -1
- package/dist/extensions/admin-ops.js +17 -4
- package/dist/extensions/admin-view.d.ts +7 -4
- package/dist/extensions/admin-view.js +27 -21
- package/dist/extensions/bootstrap.js +0 -1
- package/dist/extensions/cli.js +0 -1
- package/dist/extensions/host.d.ts +2 -3
- package/dist/extensions/host.js +1 -5
- package/dist/extensions/installs.d.ts +1 -3
- package/dist/extensions/instance.d.ts +0 -2
- package/dist/extensions/instance.js +0 -3
- package/dist/extensions/org-config.d.ts +4 -4
- package/dist/extensions/org-config.js +13 -22
- package/dist/extensions/package.d.ts +6 -6
- package/dist/extensions/package.js +3 -7
- package/dist/extensions/permission-view.d.ts +2 -4
- package/dist/extensions/plugin-items.d.ts +21 -1
- package/dist/extensions/plugin-items.js +28 -0
- package/dist/extensions/sync.js +5 -10
- package/dist/extensions/unavailable.js +0 -1
- package/dist/http/api.module.js +2 -1
- package/dist/identity/audit.d.ts +0 -12
- package/dist/identity/audit.js +0 -27
- package/dist/identity/auth.controller.js +5 -9
- package/dist/identity/cookies.d.ts +4 -9
- package/dist/identity/cookies.js +8 -32
- package/dist/identity/initial-passwords.d.ts +1 -1
- package/dist/identity/initial-passwords.js +1 -2
- package/dist/identity/sessions.d.ts +0 -6
- package/dist/identity/sessions.js +0 -18
- package/dist/inbox/platform-inbox.service.d.ts +33 -1
- package/dist/inbox/platform-inbox.service.js +56 -6
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/infra/cli/master-key-rewrap.d.ts +15 -0
- package/dist/infra/cli/master-key-rewrap.js +24 -0
- package/dist/infra/config/kernel-config.service.js +0 -17
- package/dist/infra/health/health.controller.js +8 -0
- package/dist/infra/health/process-fault.d.ts +16 -0
- package/dist/infra/health/process-fault.js +49 -0
- package/dist/infra/lifecycle/process-guards.d.ts +8 -2
- package/dist/infra/lifecycle/process-guards.js +12 -3
- package/dist/infra/lifecycle/shutdown-signals.d.ts +10 -1
- package/dist/infra/lifecycle/shutdown-signals.js +28 -13
- package/dist/infra/outbox/outbox.service.d.ts +12 -9
- package/dist/infra/outbox/outbox.service.js +22 -26
- package/dist/infra/outbox/registry.d.ts +15 -7
- package/dist/infra/outbox/registry.js +39 -23
- package/dist/lifecycle/kernel-lifecycle.js +1 -7
- package/dist/models/enablement.d.ts +5 -6
- package/dist/models/enablement.js +7 -14
- package/dist/orgs/orgs.module.d.ts +2 -2
- package/dist/orgs/orgs.module.js +2 -2
- package/dist/orgs/settings.controller.d.ts +3 -2
- package/dist/orgs/settings.service.d.ts +59 -14
- package/dist/orgs/settings.service.js +102 -20
- package/dist/overrides.d.ts +3 -7
- package/dist/overrides.js +2 -4
- package/dist/packages/tgz.d.ts +0 -2
- package/dist/packages/tgz.js +0 -2
- package/dist/platform/exclusions.js +0 -5
- package/dist/platform/operation.js +1 -1
- package/dist/platform/ops/admin.ops.d.ts +2 -2
- package/dist/platform/ops/admin.ops.js +9 -6
- package/dist/platform/ops/agents.ops.js +1 -1
- package/dist/platform/ops/connectors.ops.js +46 -1
- package/dist/platform/ops/evals.ops.js +1 -64
- package/dist/platform/ops/extensions-admin.ops.js +1 -1
- package/dist/platform/ops/inbox.ops.js +16 -3
- package/dist/platform/ops/org-plugins.ops.js +1 -1
- package/dist/platform/ops/orgs.ops.d.ts +5 -3
- package/dist/platform/ops/orgs.ops.js +19 -4
- package/dist/platform/ops/outbox.ops.js +5 -5
- package/dist/roles/worker-role.d.ts +2 -3
- package/dist/roles/worker-role.js +3 -13
- package/dist/runtime/context/build.d.ts +56 -18
- package/dist/runtime/context/build.js +143 -50
- package/dist/runtime/context/compaction.d.ts +1 -3
- package/dist/runtime/context/compaction.js +42 -8
- package/dist/runtime/context/run-context.js +1 -2
- package/dist/runtime/context/skills.d.ts +27 -56
- package/dist/runtime/context/skills.js +42 -114
- package/dist/runtime/context/tool-changes.d.ts +3 -3
- package/dist/runtime/context/tool-changes.js +6 -16
- package/dist/runtime/hook-calls.d.ts +6 -6
- package/dist/runtime/hook-calls.js +7 -7
- package/dist/runtime/langgraph-loop.js +1 -0
- package/dist/runtime/maintenance.d.ts +3 -11
- package/dist/runtime/maintenance.js +5 -20
- package/dist/runtime/model-call.d.ts +5 -0
- package/dist/runtime/model-call.js +48 -36
- package/dist/runtime/providers.d.ts +33 -35
- package/dist/runtime/providers.js +64 -109
- package/dist/runtime/run-context.service.js +7 -22
- package/dist/runtime/run-deletion.d.ts +6 -0
- package/dist/runtime/run-deletion.js +39 -16
- package/dist/runtime/run-execution.js +4 -3
- package/dist/runtime/run-finish.js +2 -1
- package/dist/runtime/run-liveness.d.ts +11 -0
- package/dist/runtime/run-liveness.js +19 -0
- package/dist/runtime/run-orphan-check.job.js +2 -1
- package/dist/runtime/run-queue.js +8 -16
- package/dist/runtime/run-worker.d.ts +2 -2
- package/dist/runtime/run-worker.js +8 -6
- package/dist/runtime/subagents/definition.d.ts +16 -20
- package/dist/runtime/subagents/definition.js +27 -27
- package/dist/runtime/subagents/dispatch.d.ts +6 -2
- package/dist/runtime/subagents/dispatch.js +17 -3
- package/dist/runtime/subagents/org-agents.js +1 -2
- package/dist/runtime/subagents/preamble.d.ts +3 -2
- package/dist/runtime/subagents/preamble.js +3 -2
- package/dist/runtime/subagents/render.d.ts +1 -2
- package/dist/runtime/subagents/render.js +1 -2
- package/dist/runtime/subagents/skill-fork.d.ts +2 -4
- package/dist/runtime/subagents/template-skills.d.ts +47 -0
- package/dist/runtime/subagents/template-skills.js +76 -0
- package/dist/schedules/effective-settings.d.ts +9 -3
- package/dist/schedules/effective-settings.js +5 -4
- package/dist/schedules/fire.js +11 -0
- package/dist/schedules/scheduled-tasks.service.js +5 -0
- package/dist/schedules/unattended.d.ts +2 -0
- package/dist/schedules/unattended.js +6 -1
- package/dist/skills/agent-skills.service.js +1 -2
- package/dist/skills/catalog.d.ts +1 -3
- package/dist/skills/catalog.js +1 -3
- package/dist/skills/conversation-catalog.d.ts +1 -2
- package/dist/skills/conversation-catalog.js +1 -2
- package/dist/skills/usable.js +2 -3
- package/dist/storage/storage.service.js +9 -1
- package/dist/tools/approvals.service.js +2 -4
- package/dist/tools/builtin-names.d.ts +2 -9
- package/dist/tools/builtin-names.js +4 -13
- package/dist/tools/builtins/sandbox/bash.js +3 -3
- package/dist/tools/builtins/sandbox/common.d.ts +7 -13
- package/dist/tools/builtins/sandbox/common.js +8 -115
- package/dist/tools/builtins/sandbox/fetch-attachment.d.ts +10 -0
- package/dist/tools/builtins/sandbox/fetch-attachment.js +119 -0
- package/dist/tools/builtins/sandbox/glob.js +1 -3
- package/dist/tools/builtins/sandbox/grep.js +3 -5
- package/dist/tools/builtins/sandbox/index.d.ts +8 -5
- package/dist/tools/builtins/sandbox/index.js +10 -5
- package/dist/tools/builtins/sandbox/read.js +3 -2
- package/dist/tools/builtins/tool-search.d.ts +4 -7
- package/dist/tools/builtins/tool-search.js +6 -10
- package/dist/tools/connector-account-policies.d.ts +30 -3
- package/dist/tools/connector-account-policies.js +54 -7
- package/dist/tools/connectors.controller.d.ts +24 -11
- package/dist/tools/connectors.controller.js +35 -6
- package/dist/tools/connectors.schemas.d.ts +14 -1
- package/dist/tools/connectors.schemas.js +14 -2
- package/dist/tools/connectors.service.d.ts +22 -0
- package/dist/tools/connectors.service.js +56 -0
- package/dist/tools/drift.d.ts +1 -1
- package/dist/tools/drift.js +1 -1
- package/dist/tools/git-push-policy.d.ts +4 -1
- package/dist/tools/git-push-policy.js +3 -1
- package/dist/tools/info.d.ts +1 -7
- package/dist/tools/info.js +5 -18
- package/dist/tools/job-ids.d.ts +0 -4
- package/dist/tools/job-ids.js +1 -6
- package/dist/tools/pipeline.d.ts +4 -10
- package/dist/tools/pipeline.js +16 -62
- package/dist/tools/policy.d.ts +6 -2
- package/dist/tools/policy.js +14 -12
- package/dist/tools/registry.js +1 -5
- package/dist/ui/views.d.ts +5 -5
- package/dist/ui/views.js +10 -16
- package/package.json +3 -3
- package/src/migrations/0137_audit_org_idx.sql +5 -0
- package/src/migrations/0138_plugin_install_status_no_upgrading.sql +18 -0
- package/src/migrations/0139_retire_legacy_forms.sql +183 -0
- package/src/migrations/0140_retire_history_forms.sql +148 -0
- package/src/migrations/0141_install_ledger_promoted_rows.sql +36 -0
- package/src/migrations/0142_backfill_event_fields.sql +74 -0
- package/src/migrations/0143_backfill_model_call_fields.sql +105 -0
- package/src/migrations/0144_retire_frozen_definition_keys.sql +163 -0
- package/dist/admin/platform-audit.service.d.ts +0 -41
- package/dist/conversations/job-ids.d.ts +0 -6
- package/dist/conversations/job-ids.js +0 -6
- package/dist/extensions/job-ids.d.ts +0 -6
- package/dist/extensions/job-ids.js +0 -6
- package/dist/infra/queue/retired-schedulers.d.ts +0 -7
- package/dist/infra/queue/retired-schedulers.js +0 -9
- package/dist/orgs/job-ids.d.ts +0 -8
- package/dist/orgs/job-ids.js +0 -8
- package/dist/runtime/context/legacy-text.d.ts +0 -22
- package/dist/runtime/context/legacy-text.js +0 -37
- package/dist/runtime/job-ids.d.ts +0 -10
- package/dist/runtime/job-ids.js +0 -10
- package/dist/runtime/retired-schedulers.d.ts +0 -7
- package/dist/runtime/retired-schedulers.js +0 -31
- package/dist/storage/job-ids.d.ts +0 -6
- package/dist/storage/job-ids.js +0 -6
- package/dist/tools/legacy-data.d.ts +0 -34
- package/dist/tools/legacy-data.js +0 -76
- package/dist/tools/legacy-keys.d.ts +0 -51
- package/dist/tools/legacy-keys.js +0 -114
|
@@ -3,8 +3,8 @@ import { type ComponentRow } from "./component-state.js";
|
|
|
3
3
|
import type { PluginScope } from "./scope.js";
|
|
4
4
|
/**
|
|
5
5
|
* Narrows an org-owned plugin (row locked by the caller) whose scope is `optional` / `all` to
|
|
6
|
-
* `named` = owner + the live orgs with a live install or a switch on.
|
|
7
|
-
*
|
|
6
|
+
* `named` = owner + the live orgs with a live install or a switch on. Audits
|
|
7
|
+
* `catalog.scope_changed`; returns whether the scope changed (the caller enqueues the item's
|
|
8
8
|
* scope sync after the commit).
|
|
9
9
|
*/
|
|
10
10
|
export declare function narrowItemOnUnshare(db: KernelSchemaDb, actor: string | null, item: {
|
|
@@ -16,7 +16,6 @@ export declare function narrowItemOnUnshare(db: KernelSchemaDb, actor: string |
|
|
|
16
16
|
/**
|
|
17
17
|
* Narrows an org-owned component with its own `optional` / `all` scope (row locked by the caller)
|
|
18
18
|
* to `named` = owner + the live orgs where it is on now ({@link componentOn}). A component that
|
|
19
|
-
* follows its plugin is narrowed with the plugin.
|
|
20
|
-
* `component.scope_changed`.
|
|
19
|
+
* follows its plugin is narrowed with the plugin. Audits `component.scope_changed`.
|
|
21
20
|
*/
|
|
22
21
|
export declare function narrowComponentOnUnshare(db: KernelSchemaDb, actor: string | null, c: ComponentRow): Promise<boolean>;
|
package/dist/catalog/unshare.js
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
import { audit } from "../identity/audit.js";
|
|
8
8
|
import { componentOn, listedIn, loadScopeState, pluginFactsOf, switchOf, } from "./component-state.js";
|
|
9
|
-
|
|
9
|
+
import { LIVE_INSTALL_STATUSES } from "./install-status.js";
|
|
10
10
|
async function liveOrgIds(db) {
|
|
11
11
|
const rows = await db.selectFrom("orgs").select("id").where("deleted_at", "is", null).execute();
|
|
12
12
|
return rows.map((r) => r.id);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Narrows an org-owned plugin (row locked by the caller) whose scope is `optional` / `all` to
|
|
16
|
-
* `named` = owner + the live orgs with a live install or a switch on.
|
|
17
|
-
*
|
|
16
|
+
* `named` = owner + the live orgs with a live install or a switch on. Audits
|
|
17
|
+
* `catalog.scope_changed`; returns whether the scope changed (the caller enqueues the item's
|
|
18
18
|
* scope sync after the commit).
|
|
19
19
|
*/
|
|
20
20
|
export async function narrowItemOnUnshare(db, actor, item) {
|
|
@@ -25,7 +25,7 @@ export async function narrowItemOnUnshare(db, actor, item) {
|
|
|
25
25
|
.selectFrom("plugin_installs")
|
|
26
26
|
.select("org_id")
|
|
27
27
|
.where("item_id", "=", item.id)
|
|
28
|
-
.where("status", "in", [...
|
|
28
|
+
.where("status", "in", [...LIVE_INSTALL_STATUSES])
|
|
29
29
|
.execute();
|
|
30
30
|
const switches = await db
|
|
31
31
|
.selectFrom("catalog_item_org_switches")
|
|
@@ -43,7 +43,6 @@ export async function narrowItemOnUnshare(db, actor, item) {
|
|
|
43
43
|
.updateTable("catalog_items")
|
|
44
44
|
.set({
|
|
45
45
|
scope: "named",
|
|
46
|
-
scope_version: sql `scope_version + 1`,
|
|
47
46
|
updated_at: sql `now()`,
|
|
48
47
|
})
|
|
49
48
|
.where("id", "=", item.id)
|
|
@@ -69,8 +68,7 @@ export async function narrowItemOnUnshare(db, actor, item) {
|
|
|
69
68
|
/**
|
|
70
69
|
* Narrows an org-owned component with its own `optional` / `all` scope (row locked by the caller)
|
|
71
70
|
* to `named` = owner + the live orgs where it is on now ({@link componentOn}). A component that
|
|
72
|
-
* follows its plugin is narrowed with the plugin.
|
|
73
|
-
* `component.scope_changed`.
|
|
71
|
+
* follows its plugin is narrowed with the plugin. Audits `component.scope_changed`.
|
|
74
72
|
*/
|
|
75
73
|
export async function narrowComponentOnUnshare(db, actor, c) {
|
|
76
74
|
if (c.ownerOrgId === null || c.scopeMode !== "own" || c.scope === "named")
|
|
@@ -82,7 +80,6 @@ export async function narrowComponentOnUnshare(db, actor, c) {
|
|
|
82
80
|
.updateTable(TABLE[c.kind])
|
|
83
81
|
.set({
|
|
84
82
|
scope: "named",
|
|
85
|
-
scope_version: sql `scope_version + 1`,
|
|
86
83
|
updated_at: sql `now()`,
|
|
87
84
|
})
|
|
88
85
|
.where("id", "=", c.id)
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The channel gateway check's job name
|
|
3
|
-
*
|
|
4
|
-
* scheduler in Redis, so the worker removes it at start (`RETIRED_SCHEDULER_IDS`). A leaf module:
|
|
5
|
-
* the maintenance worker imports it without the channel providers.
|
|
2
|
+
* The channel gateway check's job name. A leaf module: the maintenance worker imports it without
|
|
3
|
+
* the channel providers.
|
|
6
4
|
*/
|
|
7
5
|
/** The gateway check's job name (`@LockedCron`). */
|
|
8
6
|
export declare const GATEWAY_CHECK_JOB = "channel-gateway-check";
|
|
9
|
-
/** The gateway check's old scheduler (every minute). */
|
|
10
|
-
export declare const GATEWAY_CHECK_SCHEDULER_ID = "channel-gateway-check-every";
|
package/dist/channels/job-ids.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The channel gateway check's job name
|
|
3
|
-
*
|
|
4
|
-
* scheduler in Redis, so the worker removes it at start (`RETIRED_SCHEDULER_IDS`). A leaf module:
|
|
5
|
-
* the maintenance worker imports it without the channel providers.
|
|
2
|
+
* The channel gateway check's job name. A leaf module: the maintenance worker imports it without
|
|
3
|
+
* the channel providers.
|
|
6
4
|
*/
|
|
7
5
|
/** The gateway check's job name (`@LockedCron`). */
|
|
8
6
|
export const GATEWAY_CHECK_JOB = "channel-gateway-check";
|
|
9
|
-
/** The gateway check's old scheduler (every minute). */
|
|
10
|
-
export const GATEWAY_CHECK_SCHEDULER_ID = "channel-gateway-check-every";
|
|
@@ -40,7 +40,7 @@ export declare const POISON_FAILURES = 3;
|
|
|
40
40
|
* the `locale` recorded on the conversation's latest `user_message` at or before `uptoSeq`, which
|
|
41
41
|
* already follows the order IM language, latest web message language, org language
|
|
42
42
|
* (`readMessageContext`). In a group thread that is whoever wrote last, i.e. the requester of the
|
|
43
|
-
* approvals and questions that follow. A message
|
|
43
|
+
* approvals and questions that follow. A message without one (a sub-agent's task): its author's
|
|
44
44
|
* language by {@link recipientLocale}; no user message at all: the conversation owner's.
|
|
45
45
|
* Read from PG, so any replica derives the same value.
|
|
46
46
|
*/
|
|
@@ -105,7 +105,7 @@ function isBusMessage(m) {
|
|
|
105
105
|
* the `locale` recorded on the conversation's latest `user_message` at or before `uptoSeq`, which
|
|
106
106
|
* already follows the order IM language, latest web message language, org language
|
|
107
107
|
* (`readMessageContext`). In a group thread that is whoever wrote last, i.e. the requester of the
|
|
108
|
-
* approvals and questions that follow. A message
|
|
108
|
+
* approvals and questions that follow. A message without one (a sub-agent's task): its author's
|
|
109
109
|
* language by {@link recipientLocale}; no user message at all: the conversation owner's.
|
|
110
110
|
* Read from PG, so any replica derives the same value.
|
|
111
111
|
*/
|
|
@@ -179,7 +179,7 @@ export declare class ChannelSupervisor {
|
|
|
179
179
|
/** 停机:停止扫描,中止全部长连接并释放租约。幂等。 */
|
|
180
180
|
stop(): Promise<void>;
|
|
181
181
|
}
|
|
182
|
-
export { GATEWAY_CHECK_JOB
|
|
182
|
+
export { GATEWAY_CHECK_JOB } from "./job-ids.js";
|
|
183
183
|
/** The period of the gateway check (`@LockedCron` every minute). */
|
|
184
184
|
export declare const GATEWAY_CHECK_EVERY_MS = 60000;
|
|
185
185
|
/**
|
|
@@ -187,8 +187,7 @@ export declare const GATEWAY_CHECK_EVERY_MS = 60000;
|
|
|
187
187
|
* {@link checkGatewayPresence}, every minute, once across replicas; a worker-role job
|
|
188
188
|
* (`WorkerModule`), as the maintenance job it replaces was. Silent for one lease TTL after this
|
|
189
189
|
* worker process built its providers (the gateways' first heartbeats; the old handler's grace also
|
|
190
|
-
* started at the worker's kernel construction).
|
|
191
|
-
* `channel-gateway-check-every` (retired at worker start).
|
|
190
|
+
* started at the worker's kernel construction).
|
|
192
191
|
*/
|
|
193
192
|
export declare class GatewayCheckJob {
|
|
194
193
|
private readonly db;
|
|
@@ -629,7 +629,7 @@ ChannelSupervisor = __decorate([
|
|
|
629
629
|
__param(9, Inject(ReplicaStatusStore))
|
|
630
630
|
], ChannelSupervisor);
|
|
631
631
|
export { ChannelSupervisor };
|
|
632
|
-
export { GATEWAY_CHECK_JOB
|
|
632
|
+
export { GATEWAY_CHECK_JOB } from "./job-ids.js";
|
|
633
633
|
/** The period of the gateway check (`@LockedCron` every minute). */
|
|
634
634
|
export const GATEWAY_CHECK_EVERY_MS = 60_000;
|
|
635
635
|
/**
|
|
@@ -637,8 +637,7 @@ export const GATEWAY_CHECK_EVERY_MS = 60_000;
|
|
|
637
637
|
* {@link checkGatewayPresence}, every minute, once across replicas; a worker-role job
|
|
638
638
|
* (`WorkerModule`), as the maintenance job it replaces was. Silent for one lease TTL after this
|
|
639
639
|
* worker process built its providers (the gateways' first heartbeats; the old handler's grace also
|
|
640
|
-
* started at the worker's kernel construction).
|
|
641
|
-
* `channel-gateway-check-every` (retired at worker start).
|
|
640
|
+
* started at the worker's kernel construction).
|
|
642
641
|
*/
|
|
643
642
|
let GatewayCheckJob = class GatewayCheckJob {
|
|
644
643
|
db;
|
|
@@ -34,7 +34,7 @@ function componentsOf(section) {
|
|
|
34
34
|
if (validateUiContributions(manifest.ui, manifest.permissions).length > 0)
|
|
35
35
|
return [];
|
|
36
36
|
return resolveUiSlots(manifest.ui)
|
|
37
|
-
.resolved.filter((r) => r.contribution.kind === "component"
|
|
37
|
+
.resolved.filter((r) => r.contribution.kind === "component")
|
|
38
38
|
.map((r) => ({ id: r.contribution.id, slot: r.slot }));
|
|
39
39
|
}
|
|
40
40
|
/** `/api/v1/client/<plugin>/<build>/<path inside dist/client/>` of a manifest key. */
|
package/dist/config/env.js
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { ConfigError } from "./types.js";
|
|
2
2
|
const PREFIX = "CAPYBARA_";
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* `CAPYBARA_*` variables that are not kernel config paths (the config source, the init container,
|
|
5
|
+
* the web app, tests and tooling). Every other `CAPYBARA_*` variable is a config path and must name
|
|
6
|
+
* a known key: the schema is strict.
|
|
7
|
+
*/
|
|
8
|
+
const IGNORED = [
|
|
9
|
+
"CAPYBARA_CONFIG_",
|
|
10
|
+
"CAPYBARA_NACOS_",
|
|
11
|
+
"CAPYBARA_INIT_ADMIN_",
|
|
12
|
+
"CAPYBARA_WEB_",
|
|
13
|
+
"CAPYBARA_TEST_",
|
|
14
|
+
"CAPYBARA_E2E_",
|
|
15
|
+
"CAPYBARA_VISUAL_",
|
|
16
|
+
"CAPYBARA_DEV_UI",
|
|
17
|
+
"CAPYBARA_KERNEL_URL",
|
|
18
|
+
"CAPYBARA_GATEWAY_",
|
|
19
|
+
"CAPYBARA_VERSION",
|
|
20
|
+
"CAPYBARA_IMAGE_PREFIX",
|
|
21
|
+
];
|
|
4
22
|
function snakeToCamel(segment) {
|
|
5
23
|
return segment.toLowerCase().replace(/_([a-z0-9])/g, (_, c) => c.toUpperCase());
|
|
6
24
|
}
|
package/dist/config/load.d.ts
CHANGED
|
@@ -6,12 +6,6 @@ export { ConfigError, type ConfigSource };
|
|
|
6
6
|
export declare function selectConfigSource(env: NodeJS.ProcessEnv): ConfigSource;
|
|
7
7
|
/** 深合并:对象递归合并,其余(含数组)由 override 整体替换。 */
|
|
8
8
|
export declare function deepMerge(base: unknown, override: unknown): unknown;
|
|
9
|
-
/**
|
|
10
|
-
* Removed sandbox keys still present in the loaded config (file, Nacos or environment), each with
|
|
11
|
-
* the setting that replaces it (auto mode hardening spec K3). The schema would strip an unknown
|
|
12
|
-
* key silently, and an ignored security key reads as a widening, so the config fails instead.
|
|
13
|
-
*/
|
|
14
|
-
export declare function removedConfigProblems(merged: unknown): string[];
|
|
15
9
|
/** 原始配置深合并环境变量覆盖(优先级最高)后校验;热更新与启动共用。错误只列路径不列值。 */
|
|
16
10
|
export declare function resolveConfig(raw: unknown, env: NodeJS.ProcessEnv): KernelConfig;
|
|
17
11
|
/** 选来源 → 深合并环境变量覆盖(优先级最高)→ 校验。 */
|
package/dist/config/load.js
CHANGED
|
@@ -63,40 +63,21 @@ export function deepMerge(base, override) {
|
|
|
63
63
|
}
|
|
64
64
|
return out;
|
|
65
65
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Removed sandbox keys still present in the loaded config (file, Nacos or environment), each with
|
|
68
|
-
* the setting that replaces it (auto mode hardening spec K3). The schema would strip an unknown
|
|
69
|
-
* key silently, and an ignored security key reads as a widening, so the config fails instead.
|
|
70
|
-
*/
|
|
71
|
-
export function removedConfigProblems(merged) {
|
|
72
|
-
const sandbox = isPlainObject(merged) ? merged.sandbox : undefined;
|
|
73
|
-
if (!isPlainObject(sandbox))
|
|
74
|
-
return [];
|
|
75
|
-
const limits = isPlainObject(sandbox.limits) ? sandbox.limits : {};
|
|
76
|
-
const out = [];
|
|
77
|
-
if (sandbox.tiers !== undefined) {
|
|
78
|
-
out.push("sandbox.tiers: removed; auto mode replaces the sandbox tiers. Set devices.autoMode (allowed | off) for the platform; each organization chooses its autoMode and its cloud network (cloudNetwork: open | allowlist) in its settings");
|
|
79
|
-
}
|
|
80
|
-
if (limits.devHosts !== undefined) {
|
|
81
|
-
out.push("sandbox.limits.devHosts: removed with the dev tier; put the hosts in sandbox.limits.allowHosts (the default allowlist) or in an organization's cloudNetwork hosts");
|
|
82
|
-
}
|
|
83
|
-
if (limits.egress === "open") {
|
|
84
|
-
out.push('sandbox.limits.egress: "open" was removed; the open public network is set by devices.autoMode (auto mode reaches public hosts) and by an organization\'s cloudNetwork; use "allowlist" or "none" here');
|
|
85
|
-
}
|
|
86
|
-
return out;
|
|
87
|
-
}
|
|
88
66
|
/** 原始配置深合并环境变量覆盖(优先级最高)后校验;热更新与启动共用。错误只列路径不列值。 */
|
|
89
67
|
export function resolveConfig(raw, env) {
|
|
90
68
|
if (!isPlainObject(raw))
|
|
91
69
|
throw new ConfigError("config file root must be a mapping");
|
|
92
70
|
const merged = deepMerge(raw, envOverrides(env));
|
|
93
|
-
const removed = removedConfigProblems(merged);
|
|
94
|
-
if (removed.length > 0) {
|
|
95
|
-
throw new ConfigError(`invalid configuration:\n${removed.map((l) => ` - ${l}`).join("\n")}`);
|
|
96
|
-
}
|
|
97
71
|
const result = KernelConfigSchema.safeParse(merged);
|
|
98
72
|
if (!result.success) {
|
|
99
|
-
|
|
73
|
+
// The schema is strict: an unknown key (a typo, or a removed setting) is an error that names
|
|
74
|
+
// its full path, never silently dropped.
|
|
75
|
+
const lines = result.error.issues.flatMap((i) => {
|
|
76
|
+
if (i.code === "unrecognized_keys") {
|
|
77
|
+
return i.keys.map((k) => ` - unknown config key ${[...i.path, k].map(String).join(".")}`);
|
|
78
|
+
}
|
|
79
|
+
return [` - ${i.path.map(String).join(".") || "(root)"}: ${i.message}`];
|
|
80
|
+
});
|
|
100
81
|
throw new ConfigError(`invalid configuration:\n${lines.join("\n")}`);
|
|
101
82
|
}
|
|
102
83
|
// Cross-section rule (the loopback exception lives under `tools`)
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -17,6 +17,20 @@ export declare const DEFAULT_MAX_COMMAND_SECONDS = 7200;
|
|
|
17
17
|
export declare const ACCESS_TOKEN_TTL_MAX_SECONDS = 3600;
|
|
18
18
|
/** `attachments.requestMediaBytes` 的上限(24 MiB):base64 后约 32 MiB,是常见供应商的请求上限。 */
|
|
19
19
|
export declare const REQUEST_MEDIA_BYTES_MAX = 25165824;
|
|
20
|
+
/**
|
|
21
|
+
* The content types accepted for chat attachments by default: the model's media types, plus the
|
|
22
|
+
* office and archive formats people hand an agent to process with code (the model only gets a
|
|
23
|
+
* reference to those). Deployments extend or narrow the list in `attachments.allowedTypes`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DEFAULT_ATTACHMENT_TYPES: readonly ["image/png", "image/jpeg", "image/gif", "image/webp", "application/pdf", "text/plain", "text/markdown", "text/csv", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/zip", "application/json"];
|
|
26
|
+
/**
|
|
27
|
+
* The default file extensions a chat attachment may carry (lower case, no dot). Source files and
|
|
28
|
+
* office documents arrive with content types that disagree across browsers and operating systems
|
|
29
|
+
* (`text/x-python`, `application/x-python`, `application/octet-stream`; a `.ts` can come as
|
|
30
|
+
* `video/mp2t`), so the extension is the reliable half of the accept rule. Executables are
|
|
31
|
+
* deliberately absent.
|
|
32
|
+
*/
|
|
33
|
+
export declare const DEFAULT_ATTACHMENT_EXTENSIONS: readonly ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "odt", "ods", "odp", "rtf", "zip", "tar", "gz", "tgz", "bz2", "xz", "7z", "txt", "md", "markdown", "rst", "tex", "adoc", "csv", "tsv", "html", "htm", "xhtml", "xml", "xsd", "xsl", "svg", "css", "scss", "sass", "less", "json", "jsonl", "yaml", "yml", "toml", "ini", "cfg", "conf", "env", "properties", "sql", "py", "pyi", "ipynb", "js", "mjs", "cjs", "jsx", "ts", "mts", "cts", "tsx", "vue", "svelte", "java", "kt", "kts", "scala", "groovy", "gradle", "go", "rs", "c", "h", "cc", "cpp", "cxx", "hpp", "cs", "fs", "vb", "rb", "php", "pl", "swift", "lua", "r", "jl", "dart", "ex", "exs", "erl", "hs", "clj", "cljs", "sh", "bash", "zsh", "fish", "ps1", "bat", "cmd", "diff", "patch", "log", "graphql", "gql", "proto", "tf", "tfvars", "mk"];
|
|
20
34
|
/**
|
|
21
35
|
* The default host list of the allowlist (`sandbox.limits.allowHosts`): the common package
|
|
22
36
|
* registries and source hosts (git clone, archive downloads, raw files, release assets). It is the
|
|
@@ -53,10 +67,10 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
53
67
|
poolMax: z.ZodDefault<z.ZodNumber>;
|
|
54
68
|
connectTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
55
69
|
idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
56
|
-
}, z.core.$
|
|
70
|
+
}, z.core.$strict>>;
|
|
57
71
|
redis: z.ZodPrefault<z.ZodObject<{
|
|
58
72
|
url: z.ZodString;
|
|
59
|
-
}, z.core.$
|
|
73
|
+
}, z.core.$strict>>;
|
|
60
74
|
masterKey: z.ZodString;
|
|
61
75
|
masterKeyPrevious: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
62
76
|
extensions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -68,44 +82,44 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
68
82
|
reloadSetupTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
69
83
|
migrationTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
70
84
|
reconcileIntervalSeconds: z.ZodDefault<z.ZodNumber>;
|
|
71
|
-
}, z.core.$
|
|
85
|
+
}, z.core.$strict>>;
|
|
72
86
|
packages: z.ZodPrefault<z.ZodObject<{
|
|
73
87
|
npmRegistry: z.ZodDefault<z.ZodURL>;
|
|
74
88
|
npmToken: z.ZodOptional<z.ZodString>;
|
|
75
89
|
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
76
|
-
}, z.core.$
|
|
90
|
+
}, z.core.$strict>>;
|
|
77
91
|
bootstrap: z.ZodPrefault<z.ZodObject<{
|
|
78
92
|
dir: z.ZodDefault<z.ZodString>;
|
|
79
|
-
}, z.core.$
|
|
93
|
+
}, z.core.$strict>>;
|
|
80
94
|
catalog: z.ZodPrefault<z.ZodObject<{
|
|
81
95
|
staleInstallMinutes: z.ZodDefault<z.ZodNumber>;
|
|
82
|
-
}, z.core.$
|
|
96
|
+
}, z.core.$strict>>;
|
|
83
97
|
marketplaces: z.ZodPrefault<z.ZodObject<{
|
|
84
98
|
official: z.ZodPrefault<z.ZodObject<{
|
|
85
99
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
86
100
|
url: z.ZodDefault<z.ZodURL>;
|
|
87
101
|
mirrors: z.ZodDefault<z.ZodArray<z.ZodURL>>;
|
|
88
|
-
}, z.core.$
|
|
102
|
+
}, z.core.$strict>>;
|
|
89
103
|
refreshIntervalMinutes: z.ZodDefault<z.ZodNumber>;
|
|
90
104
|
maxIndexBytes: z.ZodDefault<z.ZodNumber>;
|
|
91
105
|
allowInsecureLoopback: z.ZodDefault<z.ZodBoolean>;
|
|
92
106
|
allowPrivateHosts: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
93
107
|
allowedHosts: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
94
|
-
}, z.core.$
|
|
108
|
+
}, z.core.$strict>>;
|
|
95
109
|
net: z.ZodPrefault<z.ZodObject<{
|
|
96
110
|
httpsProxy: z.ZodOptional<z.ZodString>;
|
|
97
111
|
noProxy: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
98
|
-
}, z.core.$
|
|
112
|
+
}, z.core.$strict>>;
|
|
99
113
|
extensionPermissions: z.ZodDefault<z.ZodObject<{
|
|
100
114
|
autoApprove: z.ZodDefault<z.ZodBoolean>;
|
|
101
|
-
}, z.core.$
|
|
115
|
+
}, z.core.$strict>>;
|
|
102
116
|
http: z.ZodDefault<z.ZodObject<{
|
|
103
117
|
port: z.ZodDefault<z.ZodNumber>;
|
|
104
118
|
trustProxy: z.ZodDefault<z.ZodPreprocess<z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodString>]>, unknown>>;
|
|
105
119
|
replicaId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
106
120
|
swagger: z.ZodDefault<z.ZodBoolean>;
|
|
107
121
|
publicUrl: z.ZodOptional<z.ZodURL>;
|
|
108
|
-
}, z.core.$
|
|
122
|
+
}, z.core.$strict>>;
|
|
109
123
|
roles: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodEnum<{
|
|
110
124
|
api: "api";
|
|
111
125
|
gateway: "gateway";
|
|
@@ -118,7 +132,7 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
118
132
|
setupToken: z.ZodOptional<z.ZodPreprocess<z.ZodOptional<z.ZodString>, unknown>>;
|
|
119
133
|
loginSources: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
120
134
|
trustedIdentitySources: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
121
|
-
}, z.core.$
|
|
135
|
+
}, z.core.$strict>>;
|
|
122
136
|
runtime: z.ZodDefault<z.ZodObject<{
|
|
123
137
|
maxSteps: z.ZodDefault<z.ZodNumber>;
|
|
124
138
|
wakeOnBackgroundTask: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -131,7 +145,7 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
131
145
|
stalledIntervalMs: z.ZodDefault<z.ZodNumber>;
|
|
132
146
|
sseHeartbeatMs: z.ZodDefault<z.ZodNumber>;
|
|
133
147
|
sseRecheckMs: z.ZodDefault<z.ZodNumber>;
|
|
134
|
-
}, z.core.$
|
|
148
|
+
}, z.core.$strict>>;
|
|
135
149
|
tools: z.ZodDefault<z.ZodObject<{
|
|
136
150
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
137
151
|
breakerFailures: z.ZodDefault<z.ZodNumber>;
|
|
@@ -152,8 +166,8 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
152
166
|
idleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
153
167
|
maxConcurrentPerOrg: z.ZodDefault<z.ZodNumber>;
|
|
154
168
|
ticketTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
155
|
-
}, z.core.$
|
|
156
|
-
}, z.core.$
|
|
169
|
+
}, z.core.$strict>>;
|
|
170
|
+
}, z.core.$strict>>;
|
|
157
171
|
channels: z.ZodDefault<z.ZodObject<{
|
|
158
172
|
leaseTtlMs: z.ZodDefault<z.ZodNumber>;
|
|
159
173
|
scanIntervalMs: z.ZodDefault<z.ZodNumber>;
|
|
@@ -163,57 +177,49 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
163
177
|
deliveryIdleMs: z.ZodDefault<z.ZodNumber>;
|
|
164
178
|
webhookBaseUrl: z.ZodOptional<z.ZodURL>;
|
|
165
179
|
webhookMaxBodyBytes: z.ZodDefault<z.ZodNumber>;
|
|
166
|
-
}, z.core.$
|
|
180
|
+
}, z.core.$strict>>;
|
|
167
181
|
storage: z.ZodDefault<z.ZodObject<{
|
|
168
182
|
purgeDeletedOrgsAfterDays: z.ZodDefault<z.ZodNumber>;
|
|
169
|
-
}, z.core.$
|
|
183
|
+
}, z.core.$strict>>;
|
|
170
184
|
attachments: z.ZodPrefault<z.ZodObject<{
|
|
171
185
|
maxBytes: z.ZodDefault<z.ZodNumber>;
|
|
172
|
-
allowedTypes: z.ZodDefault<z.ZodArray<z.
|
|
173
|
-
|
|
174
|
-
"image/gif": "image/gif";
|
|
175
|
-
"image/jpeg": "image/jpeg";
|
|
176
|
-
"image/png": "image/png";
|
|
177
|
-
"image/webp": "image/webp";
|
|
178
|
-
"text/csv": "text/csv";
|
|
179
|
-
"text/markdown": "text/markdown";
|
|
180
|
-
"text/plain": "text/plain";
|
|
181
|
-
}>>>;
|
|
186
|
+
allowedTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
187
|
+
allowedExtensions: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
182
188
|
maxPerMessage: z.ZodDefault<z.ZodNumber>;
|
|
183
189
|
unboundTtlHours: z.ZodDefault<z.ZodNumber>;
|
|
184
190
|
requestMediaBytes: z.ZodDefault<z.ZodNumber>;
|
|
185
|
-
}, z.core.$
|
|
191
|
+
}, z.core.$strict>>;
|
|
186
192
|
subagents: z.ZodPrefault<z.ZodObject<{
|
|
187
193
|
maxDepth: z.ZodDefault<z.ZodNumber>;
|
|
188
194
|
maxConcurrentPerConversation: z.ZodDefault<z.ZodNumber>;
|
|
189
195
|
maxDispatchesPerRun: z.ZodDefault<z.ZodNumber>;
|
|
190
196
|
maxTokensPerRun: z.ZodDefault<z.ZodNumber>;
|
|
191
|
-
}, z.core.$
|
|
197
|
+
}, z.core.$strict>>;
|
|
192
198
|
skills: z.ZodPrefault<z.ZodObject<{
|
|
193
199
|
catalogBudgetChars: z.ZodDefault<z.ZodNumber>;
|
|
194
|
-
}, z.core.$
|
|
200
|
+
}, z.core.$strict>>;
|
|
195
201
|
attribution: z.ZodPrefault<z.ZodObject<{
|
|
196
202
|
commit: z.ZodOptional<z.ZodString>;
|
|
197
203
|
pr: z.ZodOptional<z.ZodString>;
|
|
198
204
|
sessionUrl: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
-
}, z.core.$
|
|
205
|
+
}, z.core.$strict>>;
|
|
200
206
|
web: z.ZodPrefault<z.ZodObject<{
|
|
201
207
|
search: z.ZodPrefault<z.ZodObject<{
|
|
202
208
|
maxResults: z.ZodDefault<z.ZodNumber>;
|
|
203
|
-
}, z.core.$
|
|
209
|
+
}, z.core.$strict>>;
|
|
204
210
|
fetch: z.ZodPrefault<z.ZodObject<{
|
|
205
211
|
maxPageChars: z.ZodDefault<z.ZodNumber>;
|
|
206
212
|
maxAnswerTokens: z.ZodDefault<z.ZodNumber>;
|
|
207
213
|
cacheSeconds: z.ZodDefault<z.ZodNumber>;
|
|
208
214
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
209
|
-
}, z.core.$
|
|
210
|
-
}, z.core.$
|
|
215
|
+
}, z.core.$strict>>;
|
|
216
|
+
}, z.core.$strict>>;
|
|
211
217
|
schedules: z.ZodPrefault<z.ZodObject<{
|
|
212
218
|
minIntervalFloorMinutes: z.ZodDefault<z.ZodNumber>;
|
|
213
219
|
maxTasksPerMemberCap: z.ZodDefault<z.ZodNumber>;
|
|
214
220
|
maxTasksPerOrgCap: z.ZodDefault<z.ZodNumber>;
|
|
215
221
|
maxRunsPerHourCap: z.ZodDefault<z.ZodNumber>;
|
|
216
|
-
}, z.core.$
|
|
222
|
+
}, z.core.$strict>>;
|
|
217
223
|
sandbox: z.ZodPrefault<z.ZodObject<{
|
|
218
224
|
image: z.ZodOptional<z.ZodString>;
|
|
219
225
|
lockWaitSeconds: z.ZodDefault<z.ZodNumber>;
|
|
@@ -223,11 +229,11 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
223
229
|
maxTasks: z.ZodDefault<z.ZodNumber>;
|
|
224
230
|
maxSeconds: z.ZodDefault<z.ZodNumber>;
|
|
225
231
|
pollSeconds: z.ZodDefault<z.ZodNumber>;
|
|
226
|
-
}, z.core.$
|
|
232
|
+
}, z.core.$strict>>;
|
|
227
233
|
review: z.ZodPrefault<z.ZodObject<{
|
|
228
234
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
229
235
|
messageTokens: z.ZodDefault<z.ZodNumber>;
|
|
230
|
-
}, z.core.$
|
|
236
|
+
}, z.core.$strict>>;
|
|
231
237
|
limits: z.ZodPrefault<z.ZodObject<{
|
|
232
238
|
cpu: z.ZodDefault<z.ZodNumber>;
|
|
233
239
|
memoryMb: z.ZodDefault<z.ZodNumber>;
|
|
@@ -245,8 +251,8 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
245
251
|
extend: "extend";
|
|
246
252
|
within: "within";
|
|
247
253
|
}>>;
|
|
248
|
-
}, z.core.$
|
|
249
|
-
}, z.core.$
|
|
254
|
+
}, z.core.$strict>>;
|
|
255
|
+
}, z.core.$strict>>;
|
|
250
256
|
devices: z.ZodPrefault<z.ZodObject<{
|
|
251
257
|
autoMode: z.ZodOptional<z.ZodEnum<{
|
|
252
258
|
allowed: "allowed";
|
|
@@ -259,8 +265,8 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
259
265
|
authCodeTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
260
266
|
pollIntervalSeconds: z.ZodDefault<z.ZodNumber>;
|
|
261
267
|
maxFrameBytes: z.ZodDefault<z.ZodNumber>;
|
|
262
|
-
}, z.core.$
|
|
263
|
-
}, z.core.$
|
|
268
|
+
}, z.core.$strict>>;
|
|
269
|
+
}, z.core.$strict>>;
|
|
264
270
|
evals: z.ZodPrefault<z.ZodObject<{
|
|
265
271
|
orgConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
266
272
|
workerConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
@@ -270,15 +276,15 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
270
276
|
maxCaseBytes: z.ZodDefault<z.ZodNumber>;
|
|
271
277
|
judgeMaxOutputTokens: z.ZodDefault<z.ZodNumber>;
|
|
272
278
|
maxConsecutiveErrors: z.ZodDefault<z.ZodNumber>;
|
|
273
|
-
}, z.core.$
|
|
279
|
+
}, z.core.$strict>>;
|
|
274
280
|
models: z.ZodPrefault<z.ZodObject<{
|
|
275
281
|
listTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
276
282
|
embedTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
277
|
-
}, z.core.$
|
|
283
|
+
}, z.core.$strict>>;
|
|
278
284
|
hooks: z.ZodPrefault<z.ZodObject<{
|
|
279
285
|
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
280
286
|
usageReportConcurrency: z.ZodDefault<z.ZodNumber>;
|
|
281
|
-
}, z.core.$
|
|
287
|
+
}, z.core.$strict>>;
|
|
282
288
|
log: z.ZodPrefault<z.ZodObject<{
|
|
283
289
|
level: z.ZodDefault<z.ZodEnum<{
|
|
284
290
|
debug: "debug";
|
|
@@ -296,7 +302,7 @@ export declare const KernelConfigSchema: z.ZodObject<{
|
|
|
296
302
|
username: z.ZodOptional<z.ZodString>;
|
|
297
303
|
password: z.ZodOptional<z.ZodString>;
|
|
298
304
|
labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
299
|
-
}, z.core.$
|
|
300
|
-
}, z.core.$
|
|
301
|
-
}, z.core.$
|
|
305
|
+
}, z.core.$strict>>;
|
|
306
|
+
}, z.core.$strict>>;
|
|
307
|
+
}, z.core.$strict>;
|
|
302
308
|
export type KernelConfig = z.infer<typeof KernelConfigSchema>;
|