@sixb/server 0.1.25 → 0.2.0
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/README.md +1 -1
- package/dist/auth/public-routes.d.ts.map +1 -1
- package/dist/auth/run-token.d.ts +28 -0
- package/dist/auth/run-token.d.ts.map +1 -0
- package/dist/auth/scope.d.ts +11 -13
- package/dist/auth/scope.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4999 -4151
- package/dist/index.js.map +47 -43
- package/dist/registerRoutes.d.ts.map +1 -1
- package/dist/routes/actions.d.ts +1 -1
- package/dist/routes/agent-approval-gate.d.ts +7 -4
- package/dist/routes/agent-approval-gate.d.ts.map +1 -1
- package/dist/routes/agent-approvals.d.ts +14 -5
- package/dist/routes/agent-approvals.d.ts.map +1 -1
- package/dist/routes/agent-children.d.ts +2 -2
- package/dist/routes/agent-computers.d.ts +338 -0
- package/dist/routes/agent-computers.d.ts.map +1 -0
- package/dist/routes/agent-runners.d.ts +74 -0
- package/dist/routes/agent-runners.d.ts.map +1 -0
- package/dist/routes/agents.d.ts +250 -16
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/ai-accounting.d.ts.map +1 -1
- package/dist/routes/artifacts.d.ts +5 -28
- package/dist/routes/artifacts.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +10 -1
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/datasets.d.ts +93 -17
- package/dist/routes/datasets.d.ts.map +1 -1
- package/dist/routes/events.d.ts +1 -1
- package/dist/routes/links.d.ts +121 -81
- package/dist/routes/links.d.ts.map +1 -1
- package/dist/routes/logs.d.ts +3 -3
- package/dist/routes/objects.d.ts +149 -58
- package/dist/routes/objects.d.ts.map +1 -1
- package/dist/routes/observed-agent-threads.d.ts +25 -4
- package/dist/routes/observed-agent-threads.d.ts.map +1 -1
- package/dist/routes/pipelines.d.ts +2 -2
- package/dist/routes/pipelines.d.ts.map +1 -1
- package/dist/routes/projections.d.ts +124 -122
- package/dist/routes/projections.d.ts.map +1 -1
- package/dist/routes/rules.d.ts +2 -2
- package/dist/routes/shared-access.d.ts +2 -2
- package/dist/routes/syncs.d.ts +34 -34
- package/dist/routes/syncs.d.ts.map +1 -1
- package/dist/routes/telemetry.d.ts +0 -50
- package/dist/routes/telemetry.d.ts.map +1 -1
- package/dist/routes/users.d.ts +1 -0
- package/dist/routes/users.d.ts.map +1 -1
- package/dist/routes/webhook-runs.d.ts +1 -1
- package/dist/routes/workflows.d.ts +25 -14
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/ws/agents.d.ts +4 -1
- package/dist/routes/ws/agents.d.ts.map +1 -1
- package/dist/routes/ws/logs.d.ts +10 -10
- package/dist/schemas/actions.d.ts +3 -3
- package/dist/schemas/activity.d.ts +4 -4
- package/dist/schemas/agent-approvals.d.ts +21 -21
- package/dist/schemas/agents.d.ts +819 -88
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/ai-accounting.d.ts +1114 -6
- package/dist/schemas/ai-accounting.d.ts.map +1 -1
- package/dist/schemas/auth.d.ts +49 -2
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/datasets.d.ts +303 -60
- package/dist/schemas/datasets.d.ts.map +1 -1
- package/dist/schemas/event-payloads.d.ts +6 -6
- package/dist/schemas/events.d.ts +8 -8
- package/dist/schemas/lineage.d.ts +1272 -0
- package/dist/schemas/lineage.d.ts.map +1 -0
- package/dist/schemas/links.d.ts +4 -27
- package/dist/schemas/links.d.ts.map +1 -1
- package/dist/schemas/logs.d.ts +22 -22
- package/dist/schemas/objects.d.ts +7 -26
- package/dist/schemas/objects.d.ts.map +1 -1
- package/dist/schemas/pipelines.d.ts +12 -12
- package/dist/schemas/projections.d.ts +747 -733
- package/dist/schemas/projections.d.ts.map +1 -1
- package/dist/schemas/rules.d.ts +4 -4
- package/dist/schemas/shared-access.d.ts +2 -2
- package/dist/schemas/syncs.d.ts +24 -24
- package/dist/schemas/telemetry.d.ts +0 -13
- package/dist/schemas/telemetry.d.ts.map +1 -1
- package/dist/schemas/users.d.ts +8 -0
- package/dist/schemas/users.d.ts.map +1 -1
- package/dist/schemas/webhook-runs.d.ts +2 -2
- package/dist/schemas/workflows.d.ts +133 -44
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/utils/request-body.d.ts +5 -0
- package/dist/utils/request-body.d.ts.map +1 -1
- package/dist/utils/request-timing.d.ts +18 -0
- package/dist/utils/request-timing.d.ts.map +1 -0
- package/package.json +7 -7
- package/src/auth/public-routes.ts +0 -6
- package/src/auth/run-token.ts +327 -0
- package/src/auth/scope.ts +16 -37
- package/src/index.ts +1 -0
- package/src/registerRoutes.ts +4 -2
- package/src/routes/agent-approval-gate.ts +40 -14
- package/src/routes/agent-approvals.ts +3 -3
- package/src/routes/agent-computers.ts +348 -0
- package/src/routes/agent-runners.ts +205 -0
- package/src/routes/agents.ts +193 -26
- package/src/routes/ai-accounting.ts +149 -12
- package/src/routes/artifacts.ts +55 -11
- package/src/routes/auth.ts +24 -2
- package/src/routes/datasets.ts +60 -5
- package/src/routes/links.ts +43 -76
- package/src/routes/objects.ts +49 -42
- package/src/routes/observed-agent-threads.ts +2 -2
- package/src/routes/pipelines.ts +5 -0
- package/src/routes/syncs.ts +4 -0
- package/src/routes/telemetry.ts +1 -42
- package/src/routes/users.ts +15 -2
- package/src/routes/ws/agents.ts +10 -1
- package/src/schemas/agents.ts +131 -1
- package/src/schemas/ai-accounting.ts +78 -15
- package/src/schemas/artifacts.ts +1 -1
- package/src/schemas/auth.ts +19 -0
- package/src/schemas/datasets.ts +36 -0
- package/src/schemas/lineage.ts +115 -0
- package/src/schemas/links.ts +3 -11
- package/src/schemas/objects.ts +6 -10
- package/src/schemas/projections.ts +2 -0
- package/src/schemas/telemetry.ts +0 -6
- package/src/schemas/users.ts +6 -0
- package/src/server.ts +53 -15
- package/src/utils/request-body.ts +10 -4
- package/src/utils/request-timing.ts +136 -0
- package/dist/routes/agent-api-gateway.d.ts +0 -4
- package/dist/routes/agent-api-gateway.d.ts.map +0 -1
- package/src/routes/agent-api-gateway.ts +0 -404
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerRoutes.d.ts","sourceRoot":"","sources":["../src/registerRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"registerRoutes.d.ts","sourceRoot":"","sources":["../src/registerRoutes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAahE,OAAO,EACL,KAAK,+BAA+B,EAErC,MAAM,oCAAoC,CAAA;AA4B3C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,oBAAoB,EAAE,+BAA+B,CAAA;IAC9D,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAA;IAC3C,wEAAwE;IACxE,QAAQ,CAAC,aAAa,EAAE,4BAA4B,CAAA;CACrD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0C5F"}
|
package/dist/routes/actions.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ export declare function registerActionRoutes(app: Elysia, host: SixbHostView): E
|
|
|
185
185
|
};
|
|
186
186
|
500: {
|
|
187
187
|
error: string;
|
|
188
|
-
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
188
|
+
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
189
189
|
};
|
|
190
190
|
422: {
|
|
191
191
|
type: "validation";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SixbHostView } from "@sixb/core";
|
|
2
2
|
import { type AgentRunRecord, type WorkflowAgentNodeRunRecord } from "@sixb/core/storage";
|
|
3
|
-
import type {
|
|
4
|
-
/** What
|
|
3
|
+
import type { AgentRunRequestExecution, RequestAuthState } from "../auth/scope";
|
|
4
|
+
/** What happens to an Agent's call: it goes on to its route, or is answered here. */
|
|
5
5
|
export type AgentApiGate = {
|
|
6
6
|
readonly kind: "pass";
|
|
7
7
|
} | {
|
|
@@ -12,10 +12,13 @@ export interface AgentApiGateInput {
|
|
|
12
12
|
readonly host: SixbHostView;
|
|
13
13
|
readonly method: string;
|
|
14
14
|
readonly upstreamPath: string;
|
|
15
|
-
|
|
15
|
+
/** Read only for a call the gate may hold, so other calls' bodies stay unread. */
|
|
16
|
+
readBody(): Promise<Uint8Array | undefined>;
|
|
17
|
+
/** The request's Content-Type: the route parses the body by it, so the gate must agree. */
|
|
18
|
+
readonly contentType: string | null;
|
|
16
19
|
readonly run: AgentRunRecord | WorkflowAgentNodeRunRecord;
|
|
17
20
|
readonly agentExecution: NonNullable<RequestAuthState["agentExecution"]>;
|
|
18
|
-
readonly runExecution:
|
|
21
|
+
readonly runExecution: AgentRunRequestExecution;
|
|
19
22
|
readonly signal: AbortSignal;
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-approval-gate.d.ts","sourceRoot":"","sources":["../../src/routes/agent-approval-gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAc9C,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"agent-approval-gate.d.ts","sourceRoot":"","sources":["../../src/routes/agent-approval-gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAc9C,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,0BAA0B,EAChC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAM/E,qFAAqF;AACrF,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAA;AAE5D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,kFAAkF;IAClF,QAAQ,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAC3C,2FAA2F;IAC3F,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,0BAA0B,CAAA;IACzD,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAA;IACxE,QAAQ,CAAC,YAAY,EAAE,wBAAwB,CAAA;IAC/C,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC7B;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAetF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SixbHostView } from "@sixb/core";
|
|
2
2
|
import type { Elysia } from "elysia";
|
|
3
|
-
/** Approval modes and held calls. Session routes only, and never
|
|
3
|
+
/** Approval modes and held calls. Session routes only, and never open to run tokens. */
|
|
4
4
|
export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
5
5
|
decorator: {};
|
|
6
6
|
store: {};
|
|
@@ -140,6 +140,13 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
140
140
|
title?: string | undefined;
|
|
141
141
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
142
142
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
143
|
+
computer?: {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
folder: string;
|
|
147
|
+
online: boolean;
|
|
148
|
+
} | undefined;
|
|
149
|
+
runsOn?: "computer" | undefined;
|
|
143
150
|
sandboxState?: {
|
|
144
151
|
status: "unavailable" | "new" | "busy" | "ready" | "blocked";
|
|
145
152
|
name: string;
|
|
@@ -151,6 +158,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
151
158
|
spawnedBy: string;
|
|
152
159
|
} | undefined;
|
|
153
160
|
sandboxParams?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
161
|
+
movedAt?: string | undefined;
|
|
154
162
|
lastMessageAt?: string | undefined;
|
|
155
163
|
};
|
|
156
164
|
404: {
|
|
@@ -258,7 +266,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
258
266
|
} | {
|
|
259
267
|
error: {
|
|
260
268
|
at: string;
|
|
261
|
-
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
269
|
+
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
262
270
|
message: string;
|
|
263
271
|
retryable: boolean;
|
|
264
272
|
details?: import("../schemas/common").JsonValue | undefined;
|
|
@@ -368,7 +376,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
368
376
|
} | {
|
|
369
377
|
error: {
|
|
370
378
|
at: string;
|
|
371
|
-
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
379
|
+
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
372
380
|
message: string;
|
|
373
381
|
retryable: boolean;
|
|
374
382
|
details?: import("../schemas/common").JsonValue | undefined;
|
|
@@ -389,7 +397,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
389
397
|
attempt: number;
|
|
390
398
|
triggerMessageId: string;
|
|
391
399
|
streamId: string;
|
|
392
|
-
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
400
|
+
error?: import("@sixb/core").SixbFailure<"agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
393
401
|
requestedBy?: {
|
|
394
402
|
id: string;
|
|
395
403
|
type: "user" | "serviceAccount";
|
|
@@ -433,6 +441,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
433
441
|
} | undefined;
|
|
434
442
|
finishReason?: "error" | "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "timeout" | "interrupted" | "awaiting_approval" | "awaiting_answer" | "other" | undefined;
|
|
435
443
|
parentRunId?: string | undefined;
|
|
444
|
+
runsOn?: "computer" | undefined;
|
|
436
445
|
diagnostics?: {
|
|
437
446
|
code: "step_limit_reached" | "output_limit_reached";
|
|
438
447
|
message: string;
|
|
@@ -552,7 +561,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
552
561
|
} | {
|
|
553
562
|
error: {
|
|
554
563
|
at: string;
|
|
555
|
-
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
564
|
+
code: "action.phase_failed" | "action.read_conflict" | "action.rejected" | "action.run_in_progress" | "action.timeout" | "agent.approval_authority_lost" | "agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "connector.adapter_invalid" | "connector.authorization_invalid" | "connector.authorization_required" | "connector.configuration_invalid" | "connector.credentials_unavailable" | "connector.not_found" | "connector.operation_conflict" | "connector.operation_in_progress" | "connector.provider_failed" | "connector.provider_unavailable" | "connector.replacement_required" | "connector.revocation_pending" | "dataset.not_found" | "dataset.version_incompatible" | "dataset.version_not_found" | "dataset.version_read_inconsistent" | "event.delivery_failed" | "internal.unexpected" | "queue.enqueue_failed" | "object.not_found" | "object.unique_violation" | "pipeline.step_failed" | "projection.definition_invalid" | "projection.execution_failed" | "projection.not_found" | "projection.run_already_terminal" | "projection.run_identity_mismatch" | "runtime.cancelled" | "runtime.stopping" | "vector.model_unavailable" | "vector.response_invalid" | "vector.outcome_unknown" | "storage.unavailable" | "sync.execution_failed" | "webhook.delivery_failed" | "webhook.delivery_rejected" | "workflow.node_failed";
|
|
556
565
|
message: string;
|
|
557
566
|
retryable: boolean;
|
|
558
567
|
details?: import("../schemas/common").JsonValue | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-approvals.d.ts","sourceRoot":"","sources":["../../src/routes/agent-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,YAAY,CAAA;AAGnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA+DpC,
|
|
1
|
+
{"version":3,"file":"agent-approvals.d.ts","sourceRoot":"","sources":["../../src/routes/agent-approvals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,YAAY,CAAA;AAGnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA+DpC,wFAAwF;AACxF,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuO1E"}
|
|
@@ -90,7 +90,7 @@ export declare function registerAgentChildRoutes(app: Elysia, host: SixbHostView
|
|
|
90
90
|
attempt: number;
|
|
91
91
|
parentRunId: string;
|
|
92
92
|
streamId: string;
|
|
93
|
-
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
93
|
+
error?: import("@sixb/core").SixbFailure<"agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
94
94
|
modelId?: string | undefined;
|
|
95
95
|
startedAt?: string | undefined;
|
|
96
96
|
completedAt?: string | undefined;
|
|
@@ -153,7 +153,7 @@ export declare function registerAgentChildRoutes(app: Elysia, host: SixbHostView
|
|
|
153
153
|
logicalPath?: string | undefined;
|
|
154
154
|
};
|
|
155
155
|
}[];
|
|
156
|
-
error?: import("@sixb/core").SixbFailure<"agent.execution_failed" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
156
|
+
error?: import("@sixb/core").SixbFailure<"agent.context_limit_exceeded" | "agent.execution_failed" | "agent.step_limit_reached" | "ai.usage_limit_exceeded" | "ai.usage_limit_unavailable" | "internal.unexpected" | "runtime.cancelled"> | undefined;
|
|
157
157
|
completedAt?: string | undefined;
|
|
158
158
|
tier?: "light" | "standard" | "heavy" | undefined;
|
|
159
159
|
reasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import type { SixbHostView } from "@sixb/core";
|
|
2
|
+
import type { AgentRunSessionHost } from "@sixb/core/internal/agents";
|
|
3
|
+
import type { AgentThreadComputer, ConversationAgentRunRecord } from "@sixb/core/storage";
|
|
4
|
+
import type { Elysia } from "elysia";
|
|
5
|
+
type ComputerClaim = {
|
|
6
|
+
readonly computer: AgentThreadComputer;
|
|
7
|
+
} | {
|
|
8
|
+
readonly refused: {
|
|
9
|
+
readonly status: 400 | 403;
|
|
10
|
+
readonly error: Record<string, string>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The computer and folder claiming a computer's turn, or why the turn is not theirs: its thread
|
|
15
|
+
* runs on the claiming computer, in the folder it names. It reads as of now, for a refusal that
|
|
16
|
+
* says why; the run's start is what decides, should the thread move right after.
|
|
17
|
+
*/
|
|
18
|
+
export declare function computerClaiming(sessions: AgentRunSessionHost, run: ConversationAgentRunRecord, body: unknown): Promise<ComputerClaim>;
|
|
19
|
+
/** End the sessions no `sixb` renewed, and say so for each folder left with none. */
|
|
20
|
+
export declare function endLapsedComputerSessions(host: SixbHostView): Promise<void>;
|
|
21
|
+
export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
22
|
+
decorator: {};
|
|
23
|
+
store: {};
|
|
24
|
+
derive: {};
|
|
25
|
+
resolve: {};
|
|
26
|
+
}, {
|
|
27
|
+
typebox: {};
|
|
28
|
+
error: {};
|
|
29
|
+
}, {
|
|
30
|
+
schema: {};
|
|
31
|
+
standaloneSchema: {};
|
|
32
|
+
macro: {};
|
|
33
|
+
macroFn: {};
|
|
34
|
+
parser: {};
|
|
35
|
+
response: {};
|
|
36
|
+
}, {
|
|
37
|
+
api: {
|
|
38
|
+
"agent-threads": {
|
|
39
|
+
":threadId": {
|
|
40
|
+
computer: {
|
|
41
|
+
post: {
|
|
42
|
+
body: {
|
|
43
|
+
computer: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
folder: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
params: {
|
|
50
|
+
threadId: string;
|
|
51
|
+
};
|
|
52
|
+
query: unknown;
|
|
53
|
+
headers: unknown;
|
|
54
|
+
response: {
|
|
55
|
+
200: {
|
|
56
|
+
status: "active" | "archived";
|
|
57
|
+
projectId: string;
|
|
58
|
+
id: string;
|
|
59
|
+
kind: "conversation" | "subagent";
|
|
60
|
+
createdAt: string;
|
|
61
|
+
ownerPrincipal: {
|
|
62
|
+
id: string;
|
|
63
|
+
type: "user" | "serviceAccount" | "system";
|
|
64
|
+
};
|
|
65
|
+
owner: {
|
|
66
|
+
id: string;
|
|
67
|
+
type: "user" | "serviceAccount" | "system";
|
|
68
|
+
displayName?: string | undefined;
|
|
69
|
+
};
|
|
70
|
+
participants: {
|
|
71
|
+
principal: {
|
|
72
|
+
id: string;
|
|
73
|
+
type: "user";
|
|
74
|
+
displayName?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
addedAt: string;
|
|
77
|
+
addedBy: {
|
|
78
|
+
id: string;
|
|
79
|
+
type: "user" | "serviceAccount" | "system";
|
|
80
|
+
};
|
|
81
|
+
}[];
|
|
82
|
+
activeRunId: string | null;
|
|
83
|
+
messageCount: number;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
title?: string | undefined;
|
|
86
|
+
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
87
|
+
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
88
|
+
computer?: {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
folder: string;
|
|
92
|
+
online: boolean;
|
|
93
|
+
} | undefined;
|
|
94
|
+
runsOn?: "computer" | undefined;
|
|
95
|
+
sandboxState?: {
|
|
96
|
+
status: "unavailable" | "new" | "busy" | "ready" | "blocked";
|
|
97
|
+
name: string;
|
|
98
|
+
initialized: boolean;
|
|
99
|
+
} | undefined;
|
|
100
|
+
parent?: {
|
|
101
|
+
threadId: string;
|
|
102
|
+
key: string;
|
|
103
|
+
spawnedBy: string;
|
|
104
|
+
} | undefined;
|
|
105
|
+
sandboxParams?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
106
|
+
movedAt?: string | undefined;
|
|
107
|
+
lastMessageAt?: string | undefined;
|
|
108
|
+
};
|
|
109
|
+
404: {
|
|
110
|
+
error: string;
|
|
111
|
+
code?: string | undefined;
|
|
112
|
+
};
|
|
113
|
+
403: {
|
|
114
|
+
error: string;
|
|
115
|
+
code?: string | undefined;
|
|
116
|
+
};
|
|
117
|
+
409: {
|
|
118
|
+
error: string;
|
|
119
|
+
code?: string | undefined;
|
|
120
|
+
};
|
|
121
|
+
400: {
|
|
122
|
+
error: string;
|
|
123
|
+
code?: string | undefined;
|
|
124
|
+
};
|
|
125
|
+
501: {
|
|
126
|
+
error: string;
|
|
127
|
+
};
|
|
128
|
+
422: {
|
|
129
|
+
type: "validation";
|
|
130
|
+
on: string;
|
|
131
|
+
summary?: string;
|
|
132
|
+
message?: string;
|
|
133
|
+
found?: unknown;
|
|
134
|
+
property?: string;
|
|
135
|
+
expected?: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
} & {
|
|
144
|
+
api: {
|
|
145
|
+
"agent-threads": {
|
|
146
|
+
":threadId": {
|
|
147
|
+
computer: {
|
|
148
|
+
delete: {
|
|
149
|
+
body: unknown;
|
|
150
|
+
params: {
|
|
151
|
+
threadId: string;
|
|
152
|
+
};
|
|
153
|
+
query: unknown;
|
|
154
|
+
headers: unknown;
|
|
155
|
+
response: {
|
|
156
|
+
200: {
|
|
157
|
+
status: "active" | "archived";
|
|
158
|
+
projectId: string;
|
|
159
|
+
id: string;
|
|
160
|
+
kind: "conversation" | "subagent";
|
|
161
|
+
createdAt: string;
|
|
162
|
+
ownerPrincipal: {
|
|
163
|
+
id: string;
|
|
164
|
+
type: "user" | "serviceAccount" | "system";
|
|
165
|
+
};
|
|
166
|
+
owner: {
|
|
167
|
+
id: string;
|
|
168
|
+
type: "user" | "serviceAccount" | "system";
|
|
169
|
+
displayName?: string | undefined;
|
|
170
|
+
};
|
|
171
|
+
participants: {
|
|
172
|
+
principal: {
|
|
173
|
+
id: string;
|
|
174
|
+
type: "user";
|
|
175
|
+
displayName?: string | undefined;
|
|
176
|
+
};
|
|
177
|
+
addedAt: string;
|
|
178
|
+
addedBy: {
|
|
179
|
+
id: string;
|
|
180
|
+
type: "user" | "serviceAccount" | "system";
|
|
181
|
+
};
|
|
182
|
+
}[];
|
|
183
|
+
activeRunId: string | null;
|
|
184
|
+
messageCount: number;
|
|
185
|
+
updatedAt: string;
|
|
186
|
+
title?: string | undefined;
|
|
187
|
+
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
188
|
+
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
189
|
+
computer?: {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
folder: string;
|
|
193
|
+
online: boolean;
|
|
194
|
+
} | undefined;
|
|
195
|
+
runsOn?: "computer" | undefined;
|
|
196
|
+
sandboxState?: {
|
|
197
|
+
status: "unavailable" | "new" | "busy" | "ready" | "blocked";
|
|
198
|
+
name: string;
|
|
199
|
+
initialized: boolean;
|
|
200
|
+
} | undefined;
|
|
201
|
+
parent?: {
|
|
202
|
+
threadId: string;
|
|
203
|
+
key: string;
|
|
204
|
+
spawnedBy: string;
|
|
205
|
+
} | undefined;
|
|
206
|
+
sandboxParams?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
207
|
+
movedAt?: string | undefined;
|
|
208
|
+
lastMessageAt?: string | undefined;
|
|
209
|
+
};
|
|
210
|
+
404: {
|
|
211
|
+
error: string;
|
|
212
|
+
code?: string | undefined;
|
|
213
|
+
};
|
|
214
|
+
403: {
|
|
215
|
+
error: string;
|
|
216
|
+
code?: string | undefined;
|
|
217
|
+
};
|
|
218
|
+
409: {
|
|
219
|
+
error: string;
|
|
220
|
+
code?: string | undefined;
|
|
221
|
+
};
|
|
222
|
+
400: {
|
|
223
|
+
error: string;
|
|
224
|
+
code?: string | undefined;
|
|
225
|
+
};
|
|
226
|
+
501: {
|
|
227
|
+
error: string;
|
|
228
|
+
};
|
|
229
|
+
422: {
|
|
230
|
+
type: "validation";
|
|
231
|
+
on: string;
|
|
232
|
+
summary?: string;
|
|
233
|
+
message?: string;
|
|
234
|
+
found?: unknown;
|
|
235
|
+
property?: string;
|
|
236
|
+
expected?: string;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
} & {
|
|
245
|
+
api: {
|
|
246
|
+
"agent-computers": {
|
|
247
|
+
sessions: {
|
|
248
|
+
":sessionId": {
|
|
249
|
+
put: {
|
|
250
|
+
body: {
|
|
251
|
+
computer: {
|
|
252
|
+
id: string;
|
|
253
|
+
name: string;
|
|
254
|
+
folder: string;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
params: {
|
|
258
|
+
sessionId: string;
|
|
259
|
+
};
|
|
260
|
+
query: unknown;
|
|
261
|
+
headers: unknown;
|
|
262
|
+
response: {
|
|
263
|
+
200: {
|
|
264
|
+
expiresAt: string;
|
|
265
|
+
waiting: string[];
|
|
266
|
+
};
|
|
267
|
+
400: {
|
|
268
|
+
error: string;
|
|
269
|
+
code?: string | undefined;
|
|
270
|
+
};
|
|
271
|
+
429: {
|
|
272
|
+
error: string;
|
|
273
|
+
};
|
|
274
|
+
501: {
|
|
275
|
+
error: string;
|
|
276
|
+
};
|
|
277
|
+
422: {
|
|
278
|
+
type: "validation";
|
|
279
|
+
on: string;
|
|
280
|
+
summary?: string;
|
|
281
|
+
message?: string;
|
|
282
|
+
found?: unknown;
|
|
283
|
+
property?: string;
|
|
284
|
+
expected?: string;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
} & {
|
|
293
|
+
api: {
|
|
294
|
+
"agent-computers": {
|
|
295
|
+
sessions: {
|
|
296
|
+
":sessionId": {
|
|
297
|
+
delete: {
|
|
298
|
+
body: unknown;
|
|
299
|
+
params: {
|
|
300
|
+
sessionId: string;
|
|
301
|
+
};
|
|
302
|
+
query: unknown;
|
|
303
|
+
headers: unknown;
|
|
304
|
+
response: {
|
|
305
|
+
501: {
|
|
306
|
+
error: string;
|
|
307
|
+
};
|
|
308
|
+
204: void;
|
|
309
|
+
422: {
|
|
310
|
+
type: "validation";
|
|
311
|
+
on: string;
|
|
312
|
+
summary?: string;
|
|
313
|
+
message?: string;
|
|
314
|
+
found?: unknown;
|
|
315
|
+
property?: string;
|
|
316
|
+
expected?: string;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
}, {
|
|
325
|
+
derive: {};
|
|
326
|
+
resolve: {};
|
|
327
|
+
schema: {};
|
|
328
|
+
standaloneSchema: {};
|
|
329
|
+
response: {};
|
|
330
|
+
}, {
|
|
331
|
+
derive: {};
|
|
332
|
+
resolve: {};
|
|
333
|
+
schema: {};
|
|
334
|
+
standaloneSchema: {};
|
|
335
|
+
response: {};
|
|
336
|
+
}>;
|
|
337
|
+
export {};
|
|
338
|
+
//# sourceMappingURL=agent-computers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-computers.d.ts","sourceRoot":"","sources":["../../src/routes/agent-computers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAErE,OAAO,KAAK,EAGV,mBAAmB,EACnB,0BAA0B,EAE3B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AA6BpC,KAAK,aAAa,GACd;IAAE,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAA;CAAE,GAC1C;IACE,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CAAA;QAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KACvC,CAAA;CACF,CAAA;AAEL;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,mBAAmB,EAC7B,GAAG,EAAE,0BAA0B,EAC/B,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,aAAa,CAAC,CAoCxB;AAED,qFAAqF;AACrF,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAKjF;AAED,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4K1E"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type SixbHostView } from "@sixb/core";
|
|
2
|
+
import { type AgentRunSessionHost } from "@sixb/core/internal/agents";
|
|
3
|
+
import type { Elysia } from "elysia";
|
|
4
|
+
/** The session host the API opens a run's session against: the worker's, without the worker. */
|
|
5
|
+
export declare function agentRunSessionHost(host: SixbHostView): AgentRunSessionHost | null;
|
|
6
|
+
/**
|
|
7
|
+
* End the runs whose runner stopped renewing them, as the worker's repair pass does: a runner on
|
|
8
|
+
* a computer has no worker behind it. Several API servers may sweep at once: each run is ended
|
|
9
|
+
* once, by whichever takes it over. Computer sessions that lapsed end too. Returns the stop.
|
|
10
|
+
*/
|
|
11
|
+
export declare function startLapsedRunSweeper(host: SixbHostView): () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Answer a runner's session request before the API parses it: its runner token speaks only for its
|
|
14
|
+
* run's session, and any other route refuses it. Null for any other request.
|
|
15
|
+
*/
|
|
16
|
+
export declare function agentRunSessionHandler(host: SixbHostView): (request: Request) => Promise<Response | null>;
|
|
17
|
+
export declare function registerAgentRunnerRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
18
|
+
decorator: {};
|
|
19
|
+
store: {};
|
|
20
|
+
derive: {};
|
|
21
|
+
resolve: {};
|
|
22
|
+
}, {
|
|
23
|
+
typebox: {};
|
|
24
|
+
error: {};
|
|
25
|
+
}, {
|
|
26
|
+
schema: {};
|
|
27
|
+
standaloneSchema: {};
|
|
28
|
+
macro: {};
|
|
29
|
+
macroFn: {};
|
|
30
|
+
parser: {};
|
|
31
|
+
response: {};
|
|
32
|
+
}, {
|
|
33
|
+
api: {
|
|
34
|
+
"agent-runs": {
|
|
35
|
+
":runId": {
|
|
36
|
+
claim: {
|
|
37
|
+
post: {
|
|
38
|
+
body: unknown;
|
|
39
|
+
params: {
|
|
40
|
+
runId: string;
|
|
41
|
+
} & {};
|
|
42
|
+
query: unknown;
|
|
43
|
+
headers: unknown;
|
|
44
|
+
response: {
|
|
45
|
+
200: Response;
|
|
46
|
+
422: {
|
|
47
|
+
type: "validation";
|
|
48
|
+
on: string;
|
|
49
|
+
summary?: string;
|
|
50
|
+
message?: string;
|
|
51
|
+
found?: unknown;
|
|
52
|
+
property?: string;
|
|
53
|
+
expected?: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
derive: {};
|
|
63
|
+
resolve: {};
|
|
64
|
+
schema: {};
|
|
65
|
+
standaloneSchema: {};
|
|
66
|
+
response: {};
|
|
67
|
+
}, {
|
|
68
|
+
derive: {};
|
|
69
|
+
resolve: {};
|
|
70
|
+
schema: {};
|
|
71
|
+
standaloneSchema: {};
|
|
72
|
+
response: {};
|
|
73
|
+
}>;
|
|
74
|
+
//# sourceMappingURL=agent-runners.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-runners.d.ts","sourceRoot":"","sources":["../../src/routes/agent-runners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,YAAY,EAAoB,MAAM,YAAY,CAAA;AACjF,OAAO,EAEL,KAAK,mBAAmB,EAWzB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAUpC,gGAAgG;AAChG,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,mBAAmB,GAAG,IAAI,CAsBlF;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,IAAI,CAsBpE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,YAAY,GACjB,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAuBhD;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0ExE"}
|