@capybara-hq/kernel 0.1.0-rc.35 → 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.module.js +3 -0
- 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 +8 -19
- package/dist/agents/readiness.controller.js +11 -25
- package/dist/agents/readiness.service.d.ts +42 -0
- package/dist/agents/readiness.service.js +78 -0
- 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.d.ts +3 -3
- package/dist/platform/ops/agents.ops.js +7 -10
- 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
|
@@ -116,37 +116,6 @@ declare const CreateBody: z.ZodObject<{
|
|
|
116
116
|
clientMessageId: z.ZodString;
|
|
117
117
|
}, z.core.$strict>>;
|
|
118
118
|
}, z.core.$strict>;
|
|
119
|
-
/**
|
|
120
|
-
* `POST …/queue` (deprecated, behaves as `POST …/messages`): the message fields (no retry).
|
|
121
|
-
*/
|
|
122
|
-
declare const QueueBody: z.ZodObject<{
|
|
123
|
-
text: z.ZodString;
|
|
124
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
125
|
-
connectorId: z.ZodUUID;
|
|
126
|
-
uri: z.ZodString;
|
|
127
|
-
}, z.core.$strict>>>;
|
|
128
|
-
files: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
129
|
-
model: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
provider: z.ZodString;
|
|
131
|
-
model: z.ZodString;
|
|
132
|
-
}, z.core.$strict>>;
|
|
133
|
-
effort: z.ZodOptional<z.ZodEnum<{
|
|
134
|
-
high: "high";
|
|
135
|
-
low: "low";
|
|
136
|
-
max: "max";
|
|
137
|
-
medium: "medium";
|
|
138
|
-
xhigh: "xhigh";
|
|
139
|
-
}>>;
|
|
140
|
-
skill: z.ZodOptional<z.ZodObject<{
|
|
141
|
-
name: z.ZodString;
|
|
142
|
-
}, z.core.$strict>>;
|
|
143
|
-
timeZone: z.ZodOptional<z.ZodString>;
|
|
144
|
-
locale: z.ZodOptional<z.ZodEnum<{
|
|
145
|
-
en: "en";
|
|
146
|
-
zh: "zh";
|
|
147
|
-
}>>;
|
|
148
|
-
clientMessageId: z.ZodString;
|
|
149
|
-
}, z.core.$strict>;
|
|
150
119
|
/** `PATCH …/queue/:itemId`: only the text changes (the text rule is checked against the item). */
|
|
151
120
|
declare const QueueEditBody: z.ZodObject<{
|
|
152
121
|
text: z.ZodString;
|
|
@@ -295,14 +264,6 @@ export declare class ConversationsController {
|
|
|
295
264
|
paused: boolean;
|
|
296
265
|
pauseReason?: QueuePauseReason;
|
|
297
266
|
}>;
|
|
298
|
-
/**
|
|
299
|
-
* Deprecated: behaves as `POST …/messages` (202 `{ event }`): an interjection while a run is
|
|
300
|
-
* active, a new run otherwise; nothing is queued any more. Kept for older clients for one release;
|
|
301
|
-
* the leftover-item routes below keep working until the queue table is dropped (contract step).
|
|
302
|
-
*/
|
|
303
|
-
enqueue(principal: Principal, org: OrgContext, id: string, body: z.infer<typeof QueueBody>): Promise<{
|
|
304
|
-
event: ConversationEvent;
|
|
305
|
-
}>;
|
|
306
267
|
/** "Continue sending" after a pause (202). Declared before `:itemId` routes. */
|
|
307
268
|
resumeQueue(principal: Principal, org: OrgContext, id: string): Promise<Record<string, never>>;
|
|
308
269
|
editQueued(principal: Principal, org: OrgContext, id: string, itemId: string, body: z.infer<typeof QueueEditBody>): Promise<{
|
|
@@ -129,13 +129,6 @@ const CreateBody = z
|
|
|
129
129
|
.optional(),
|
|
130
130
|
})
|
|
131
131
|
.strict();
|
|
132
|
-
/**
|
|
133
|
-
* `POST …/queue` (deprecated, behaves as `POST …/messages`): the message fields (no retry).
|
|
134
|
-
*/
|
|
135
|
-
const QueueBody = MessageFields.omit({ retryOf: true })
|
|
136
|
-
.extend({ clientMessageId: z.string().min(1).max(200) })
|
|
137
|
-
.strict()
|
|
138
|
-
.refine(...textRule);
|
|
139
132
|
/** `PATCH …/queue/:itemId`: only the text changes (the text rule is checked against the item). */
|
|
140
133
|
const QueueEditBody = z.object({ text: z.string().max(100_000) }).strict();
|
|
141
134
|
class ConversationCreateBodyDto extends createZodDto(CreateBody, "ConversationCreateBody") {
|
|
@@ -164,8 +157,6 @@ class ConversationToolsQueryDto extends createZodDto(ToolsQuery, "ConversationTo
|
|
|
164
157
|
}
|
|
165
158
|
class ConversationMessageBodyDto extends createZodDto(MessageBody, "ConversationMessageBody") {
|
|
166
159
|
}
|
|
167
|
-
class ConversationQueueBodyDto extends createZodDto(QueueBody, "ConversationQueueBody") {
|
|
168
|
-
}
|
|
169
160
|
class ConversationQueueEditBodyDto extends createZodDto(QueueEditBody, "ConversationQueueEditBody") {
|
|
170
161
|
}
|
|
171
162
|
class ConversationCompactBodyDto extends createZodDto(CompactBody, "ConversationCompactBody") {
|
|
@@ -428,27 +419,6 @@ let ConversationsController = class ConversationsController {
|
|
|
428
419
|
const p = requireUser(principal);
|
|
429
420
|
return this.queue.list(org.orgId, id, p.account.id);
|
|
430
421
|
}
|
|
431
|
-
/**
|
|
432
|
-
* Deprecated: behaves as `POST …/messages` (202 `{ event }`): an interjection while a run is
|
|
433
|
-
* active, a new run otherwise; nothing is queued any more. Kept for older clients for one release;
|
|
434
|
-
* the leftover-item routes below keep working until the queue table is dropped (contract step).
|
|
435
|
-
*/
|
|
436
|
-
async enqueue(principal, org, id, body) {
|
|
437
|
-
const p = requireUser(principal);
|
|
438
|
-
return {
|
|
439
|
-
event: await this.conversations.postUserMessage(org.orgId, id, p.account.id, {
|
|
440
|
-
text: body.text,
|
|
441
|
-
clientMessageId: body.clientMessageId,
|
|
442
|
-
...(body.attachments !== undefined && { attachments: body.attachments }),
|
|
443
|
-
...(body.files !== undefined && { files: body.files }),
|
|
444
|
-
...(body.model !== undefined && { model: body.model }),
|
|
445
|
-
...(body.effort !== undefined && { effort: body.effort }),
|
|
446
|
-
...(body.skill !== undefined && { skill: body.skill }),
|
|
447
|
-
...(body.timeZone !== undefined && { timeZone: body.timeZone }),
|
|
448
|
-
...(body.locale !== undefined && { locale: body.locale }),
|
|
449
|
-
}),
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
422
|
/** "Continue sending" after a pause (202). Declared before `:itemId` routes. */
|
|
453
423
|
async resumeQueue(principal, org, id) {
|
|
454
424
|
const p = requireUser(principal);
|
|
@@ -654,15 +624,6 @@ __decorate([
|
|
|
654
624
|
__param(1, CurrentOrg()),
|
|
655
625
|
__param(2, Param("id"))
|
|
656
626
|
], ConversationsController.prototype, "listQueue", null);
|
|
657
|
-
__decorate([
|
|
658
|
-
Post(":id/queue"),
|
|
659
|
-
HttpCode(202),
|
|
660
|
-
OrgAction("agents.use"),
|
|
661
|
-
__param(0, CurrentPrincipal()),
|
|
662
|
-
__param(1, CurrentOrg()),
|
|
663
|
-
__param(2, Param("id")),
|
|
664
|
-
__param(3, ZBody(ConversationQueueBodyDto))
|
|
665
|
-
], ConversationsController.prototype, "enqueue", null);
|
|
666
627
|
__decorate([
|
|
667
628
|
Post(":id/queue/resume"),
|
|
668
629
|
HttpCode(202),
|
|
@@ -70,13 +70,11 @@ export type CommandAsk = z.infer<typeof CommandAskSchema>;
|
|
|
70
70
|
export declare const MEDIA_EXCLUDED_MAX_IDS = 50;
|
|
71
71
|
/** 一份 `skills_catalog` 快照最多的技能数(组织技能引用上限 100,余量给 agent 自己的技能)。 */
|
|
72
72
|
export declare const SKILLS_CATALOG_MAX = 1000;
|
|
73
|
-
/** The longest pinned skill body in a `skills_catalog` snapshot (the pinned total is ≤ 32768 bytes). */
|
|
74
|
-
export declare const PINNED_BODY_MAX_CHARS = 32768;
|
|
75
73
|
/** 产物名(`artifact_created.name`)是否合法:与日志 schema 同一规则(非空、≤255、不含控制字符)。 */
|
|
76
74
|
export declare const isValidArtifactName: (name: string) => boolean;
|
|
77
75
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
76
|
+
* A content block as the log carries it: plugin-sdk's `ContentBlock`, but the source of an image,
|
|
77
|
+
* document or file block may only be a `ref` (blocks written with a `base64` source are rejected).
|
|
80
78
|
*/
|
|
81
79
|
export declare const ContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
82
80
|
type: z.ZodLiteral<"text">;
|
|
@@ -122,6 +120,7 @@ export declare const ContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
122
120
|
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
123
121
|
}, z.core.$strip>;
|
|
124
122
|
name: z.ZodOptional<z.ZodString>;
|
|
123
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
125
124
|
}, z.core.$strip>, z.ZodObject<{
|
|
126
125
|
type: z.ZodLiteral<"document">;
|
|
127
126
|
mediaType: z.ZodEnum<{
|
|
@@ -135,9 +134,19 @@ export declare const ContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
135
134
|
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
136
135
|
}, z.core.$strip>;
|
|
137
136
|
name: z.ZodOptional<z.ZodString>;
|
|
137
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
139
|
+
type: z.ZodLiteral<"file">;
|
|
140
|
+
mediaType: z.ZodString;
|
|
141
|
+
source: z.ZodObject<{
|
|
142
|
+
kind: z.ZodLiteral<"ref">;
|
|
143
|
+
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
name: z.ZodOptional<z.ZodString>;
|
|
146
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
138
147
|
}, z.core.$strip>], "type">;
|
|
139
148
|
type MediaBlock = Extract<ContentBlock, {
|
|
140
|
-
type: "image" | "document";
|
|
149
|
+
type: "image" | "document" | "file";
|
|
141
150
|
}>;
|
|
142
151
|
/**
|
|
143
152
|
* 日志形状的内容块:与 plugin-sdk 的 `ContentBlock` 相同,只是媒体块的 `source` 收窄为 `ref`。
|
|
@@ -335,6 +344,7 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
335
344
|
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
336
345
|
}, z.core.$strip>;
|
|
337
346
|
name: z.ZodOptional<z.ZodString>;
|
|
347
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
338
348
|
}, z.core.$strip>, z.ZodObject<{
|
|
339
349
|
type: z.ZodLiteral<"document">;
|
|
340
350
|
mediaType: z.ZodEnum<{
|
|
@@ -348,6 +358,16 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
348
358
|
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
349
359
|
}, z.core.$strip>;
|
|
350
360
|
name: z.ZodOptional<z.ZodString>;
|
|
361
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
type: z.ZodLiteral<"file">;
|
|
364
|
+
mediaType: z.ZodString;
|
|
365
|
+
source: z.ZodObject<{
|
|
366
|
+
kind: z.ZodLiteral<"ref">;
|
|
367
|
+
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
name: z.ZodOptional<z.ZodString>;
|
|
370
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
351
371
|
}, z.core.$strip>], "type">>;
|
|
352
372
|
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
353
373
|
appId: z.ZodString;
|
|
@@ -385,6 +405,10 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
385
405
|
inline: "inline";
|
|
386
406
|
}>;
|
|
387
407
|
agentType: z.ZodOptional<z.ZodString>;
|
|
408
|
+
template: z.ZodOptional<z.ZodLiteral<true>>;
|
|
409
|
+
}, z.core.$strip>>;
|
|
410
|
+
templateSkillNotice: z.ZodOptional<z.ZodObject<{
|
|
411
|
+
name: z.ZodString;
|
|
388
412
|
}, z.core.$strip>>;
|
|
389
413
|
schedule: z.ZodOptional<z.ZodObject<{
|
|
390
414
|
taskId: z.ZodString;
|
|
@@ -403,7 +427,7 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
403
427
|
task: "task";
|
|
404
428
|
}>>;
|
|
405
429
|
narrowed: z.ZodOptional<z.ZodObject<{
|
|
406
|
-
disabledTools: z.
|
|
430
|
+
disabledTools: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
407
431
|
kind: z.ZodLiteral<"builtin">;
|
|
408
432
|
name: z.ZodString;
|
|
409
433
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -414,19 +438,15 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
414
438
|
kind: z.ZodLiteral<"connector">;
|
|
415
439
|
connectorId: z.ZodString;
|
|
416
440
|
tools: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>;
|
|
417
|
-
}, z.core.$strict>], "kind"
|
|
418
|
-
disabledSkills: z.
|
|
441
|
+
}, z.core.$strict>], "kind">>;
|
|
442
|
+
disabledSkills: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
419
443
|
kind: z.ZodLiteral<"plugin">;
|
|
420
444
|
plugin: z.ZodString;
|
|
421
445
|
skills: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>;
|
|
422
446
|
}, z.core.$strict>, z.ZodObject<{
|
|
423
447
|
kind: z.ZodLiteral<"skill">;
|
|
424
448
|
skillId: z.ZodString;
|
|
425
|
-
}, z.core.$strict>], "kind"
|
|
426
|
-
skills: z.ZodOptional<z.ZodObject<{
|
|
427
|
-
orgSkills: z.ZodArray<z.ZodString>;
|
|
428
|
-
pinned: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
429
|
-
}, z.core.$strip>>;
|
|
449
|
+
}, z.core.$strict>], "kind">>;
|
|
430
450
|
}, z.core.$strip>>;
|
|
431
451
|
}, z.core.$strip>>;
|
|
432
452
|
}, z.core.$strip>;
|
|
@@ -482,15 +502,16 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
482
502
|
summarySeq: z.ZodNullable<z.ZodNumber>;
|
|
483
503
|
systemHash: z.ZodString;
|
|
484
504
|
reminderSeqs: z.ZodArray<z.ZodNumber>;
|
|
485
|
-
maxOutputTokens: z.
|
|
486
|
-
params: z.
|
|
505
|
+
maxOutputTokens: z.ZodNumber;
|
|
506
|
+
params: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
487
507
|
droppedParams: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
488
508
|
estimatedInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
489
|
-
absorbedUpToSeq: z.
|
|
490
|
-
tools: z.
|
|
509
|
+
absorbedUpToSeq: z.ZodNumber;
|
|
510
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
491
511
|
key: z.ZodString;
|
|
492
512
|
specHash: z.ZodString;
|
|
493
|
-
}, z.core.$strip
|
|
513
|
+
}, z.core.$strip>>;
|
|
514
|
+
toolsOmitted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
494
515
|
catalog: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
495
516
|
key: z.ZodString;
|
|
496
517
|
specHash: z.ZodString;
|
|
@@ -507,6 +528,7 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
507
528
|
inline: "inline";
|
|
508
529
|
omitted: "omitted";
|
|
509
530
|
placeholder_unsupported: "placeholder_unsupported";
|
|
531
|
+
reference: "reference";
|
|
510
532
|
too_large: "too_large";
|
|
511
533
|
too_many_images: "too_many_images";
|
|
512
534
|
too_many_pages: "too_many_pages";
|
|
@@ -573,6 +595,7 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
573
595
|
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
574
596
|
}, z.core.$strip>;
|
|
575
597
|
name: z.ZodOptional<z.ZodString>;
|
|
598
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
576
599
|
}, z.core.$strip>, z.ZodObject<{
|
|
577
600
|
type: z.ZodLiteral<"document">;
|
|
578
601
|
mediaType: z.ZodEnum<{
|
|
@@ -586,6 +609,16 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
586
609
|
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
587
610
|
}, z.core.$strip>;
|
|
588
611
|
name: z.ZodOptional<z.ZodString>;
|
|
612
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
613
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
614
|
+
type: z.ZodLiteral<"file">;
|
|
615
|
+
mediaType: z.ZodString;
|
|
616
|
+
source: z.ZodObject<{
|
|
617
|
+
kind: z.ZodLiteral<"ref">;
|
|
618
|
+
attachmentId: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
619
|
+
}, z.core.$strip>;
|
|
620
|
+
name: z.ZodOptional<z.ZodString>;
|
|
621
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
589
622
|
}, z.core.$strip>], "type">>;
|
|
590
623
|
stopReason: z.ZodEnum<{
|
|
591
624
|
aborted: "aborted";
|
|
@@ -839,13 +872,13 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
839
872
|
}, z.core.$strip>, z.ZodObject<{
|
|
840
873
|
type: z.ZodLiteral<"approval_requested">;
|
|
841
874
|
payload: z.ZodObject<{
|
|
842
|
-
requestedFor: z.
|
|
843
|
-
approverRole: z.
|
|
875
|
+
requestedFor: z.ZodNullable<z.ZodString>;
|
|
876
|
+
approverRole: z.ZodNullable<z.ZodEnum<{
|
|
844
877
|
admin: "admin";
|
|
845
878
|
guest: "guest";
|
|
846
879
|
member: "member";
|
|
847
880
|
owner: "owner";
|
|
848
|
-
}
|
|
881
|
+
}>>;
|
|
849
882
|
step: z.ZodNumber;
|
|
850
883
|
callId: z.ZodString;
|
|
851
884
|
approvalId: z.ZodString;
|
|
@@ -984,13 +1017,6 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
984
1017
|
plugin: z.ZodOptional<z.ZodString>;
|
|
985
1018
|
nameOnly: z.ZodOptional<z.ZodLiteral<true>>;
|
|
986
1019
|
}, z.core.$strip>>;
|
|
987
|
-
pinned: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
988
|
-
id: z.ZodString;
|
|
989
|
-
version: z.ZodNumber;
|
|
990
|
-
name: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
|
|
991
|
-
source: z.ZodString;
|
|
992
|
-
body: z.ZodString;
|
|
993
|
-
}, z.core.$strip>>>;
|
|
994
1020
|
toolMap: z.ZodOptional<z.ZodString>;
|
|
995
1021
|
}, z.core.$strip>;
|
|
996
1022
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1063,14 +1089,6 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1063
1089
|
}, z.core.$strip>>;
|
|
1064
1090
|
}, z.core.$strip>;
|
|
1065
1091
|
definition: z.ZodObject<{
|
|
1066
|
-
skills: z.ZodOptional<z.ZodObject<{
|
|
1067
|
-
writePolicy: z.ZodOptional<z.ZodEnum<{
|
|
1068
|
-
allow: "allow";
|
|
1069
|
-
ask: "ask";
|
|
1070
|
-
}>>;
|
|
1071
|
-
orgSkills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1072
|
-
pinned: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1073
|
-
}, z.core.$strict>>;
|
|
1074
1092
|
name: z.ZodString;
|
|
1075
1093
|
description: z.ZodOptional<z.ZodString>;
|
|
1076
1094
|
avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodURL>>;
|
|
@@ -1118,6 +1136,12 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1118
1136
|
kind: z.ZodLiteral<"skill">;
|
|
1119
1137
|
skillId: z.ZodString;
|
|
1120
1138
|
}, z.core.$strict>], "kind">>>;
|
|
1139
|
+
skills: z.ZodOptional<z.ZodObject<{
|
|
1140
|
+
writePolicy: z.ZodOptional<z.ZodEnum<{
|
|
1141
|
+
allow: "allow";
|
|
1142
|
+
ask: "ask";
|
|
1143
|
+
}>>;
|
|
1144
|
+
}, z.core.$strict>>;
|
|
1121
1145
|
subagents: z.ZodOptional<z.ZodObject<{
|
|
1122
1146
|
general: z.ZodOptional<z.ZodBoolean>;
|
|
1123
1147
|
templates: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1211,13 +1235,6 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1211
1235
|
}, z.core.$strip>, z.ZodObject<{
|
|
1212
1236
|
type: z.ZodLiteral<"subagent_waiting">;
|
|
1213
1237
|
payload: z.ZodObject<{
|
|
1214
|
-
requestedFor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1215
|
-
approverRole: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1216
|
-
admin: "admin";
|
|
1217
|
-
guest: "guest";
|
|
1218
|
-
member: "member";
|
|
1219
|
-
owner: "owner";
|
|
1220
|
-
}>>>;
|
|
1221
1238
|
subagentId: z.ZodString;
|
|
1222
1239
|
childRunId: z.ZodString;
|
|
1223
1240
|
path: z.ZodArray<z.ZodString>;
|
|
@@ -1230,6 +1247,13 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1230
1247
|
questionId: z.ZodOptional<z.ZodString>;
|
|
1231
1248
|
toolKey: z.ZodString;
|
|
1232
1249
|
expiresAt: z.ZodOptional<z.ZodString>;
|
|
1250
|
+
requestedFor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1251
|
+
approverRole: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1252
|
+
admin: "admin";
|
|
1253
|
+
guest: "guest";
|
|
1254
|
+
member: "member";
|
|
1255
|
+
owner: "owner";
|
|
1256
|
+
}>>>;
|
|
1233
1257
|
}, z.core.$strip>;
|
|
1234
1258
|
}, z.core.$strip>, z.ZodObject<{
|
|
1235
1259
|
type: z.ZodLiteral<"subagent_finished">;
|
|
@@ -1322,16 +1346,16 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1322
1346
|
payload: z.ZodObject<{
|
|
1323
1347
|
coversUpToSeq: z.ZodNumber;
|
|
1324
1348
|
text: z.ZodString;
|
|
1325
|
-
savedTokens: z.
|
|
1349
|
+
savedTokens: z.ZodNumber;
|
|
1326
1350
|
openingSeqs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1327
|
-
step: z.
|
|
1351
|
+
step: z.ZodNumber;
|
|
1328
1352
|
}, z.core.$strip>;
|
|
1329
1353
|
}, z.core.$strip>, z.ZodObject<{
|
|
1330
1354
|
type: z.ZodLiteral<"compaction_failed">;
|
|
1331
1355
|
payload: z.ZodObject<{
|
|
1332
1356
|
attempt: z.ZodNumber;
|
|
1333
1357
|
reason: z.ZodString;
|
|
1334
|
-
step: z.
|
|
1358
|
+
step: z.ZodNumber;
|
|
1335
1359
|
}, z.core.$strip>;
|
|
1336
1360
|
}, z.core.$strip>, z.ZodObject<{
|
|
1337
1361
|
type: z.ZodLiteral<"run_finished">;
|
|
@@ -1358,6 +1382,7 @@ export declare const ConversationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
1358
1382
|
byAccountId: z.ZodNullable<z.ZodString>;
|
|
1359
1383
|
reason: z.ZodEnum<{
|
|
1360
1384
|
eval_stopped: "eval_stopped";
|
|
1385
|
+
org_deleted: "org_deleted";
|
|
1361
1386
|
shutdown_exhausted: "shutdown_exhausted";
|
|
1362
1387
|
user: "user";
|
|
1363
1388
|
}>;
|