@sixb/server 0.1.26 → 0.2.1
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2495 -1845
- package/dist/index.js.map +29 -27
- package/dist/routes/actions.d.ts +1 -1
- package/dist/routes/agent-approvals.d.ts +11 -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 +214 -10
- package/dist/routes/agent-computers.d.ts.map +1 -1
- package/dist/routes/agent-runners.d.ts +1 -1
- package/dist/routes/agent-runners.d.ts.map +1 -1
- package/dist/routes/agents.d.ts +230 -24
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/ai-accounting.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +9 -0
- 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 +23 -5
- package/dist/routes/observed-agent-threads.d.ts.map +1 -1
- package/dist/routes/pipelines.d.ts +2 -2
- package/dist/routes/projections.d.ts +122 -122
- package/dist/routes/rules.d.ts +2 -2
- package/dist/routes/telemetry.d.ts +0 -50
- package/dist/routes/telemetry.d.ts.map +1 -1
- package/dist/routes/webhook-runs.d.ts +1 -1
- package/dist/routes/workflows.d.ts +21 -10
- 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 +760 -107
- 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 +47 -0
- 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 +733 -733
- package/dist/schemas/rules.d.ts +4 -4
- package/dist/schemas/telemetry.d.ts +0 -13
- package/dist/schemas/telemetry.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 +4 -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/index.ts +1 -0
- package/src/routes/agent-approvals.ts +2 -2
- package/src/routes/agent-computers.ts +309 -87
- package/src/routes/agent-runners.ts +30 -6
- package/src/routes/agents.ts +187 -25
- package/src/routes/ai-accounting.ts +149 -12
- package/src/routes/auth.ts +24 -2
- package/src/routes/datasets.ts +55 -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/telemetry.ts +1 -42
- package/src/routes/ws/agents.ts +10 -1
- package/src/schemas/agents.ts +121 -6
- package/src/schemas/ai-accounting.ts +78 -15
- 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/telemetry.ts +0 -6
- package/src/server.ts +18 -2
- package/src/utils/request-body.ts +10 -4
- package/src/utils/request-timing.ts +136 -0
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";
|
|
@@ -140,6 +140,12 @@ 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;
|
|
143
149
|
runsOn?: "computer" | undefined;
|
|
144
150
|
sandboxState?: {
|
|
145
151
|
status: "unavailable" | "new" | "busy" | "ready" | "blocked";
|
|
@@ -152,7 +158,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
152
158
|
spawnedBy: string;
|
|
153
159
|
} | undefined;
|
|
154
160
|
sandboxParams?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
155
|
-
|
|
161
|
+
movedAt?: string | undefined;
|
|
156
162
|
lastMessageAt?: string | undefined;
|
|
157
163
|
};
|
|
158
164
|
404: {
|
|
@@ -260,7 +266,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
260
266
|
} | {
|
|
261
267
|
error: {
|
|
262
268
|
at: string;
|
|
263
|
-
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";
|
|
264
270
|
message: string;
|
|
265
271
|
retryable: boolean;
|
|
266
272
|
details?: import("../schemas/common").JsonValue | undefined;
|
|
@@ -370,7 +376,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
370
376
|
} | {
|
|
371
377
|
error: {
|
|
372
378
|
at: string;
|
|
373
|
-
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";
|
|
374
380
|
message: string;
|
|
375
381
|
retryable: boolean;
|
|
376
382
|
details?: import("../schemas/common").JsonValue | undefined;
|
|
@@ -391,7 +397,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
391
397
|
attempt: number;
|
|
392
398
|
triggerMessageId: string;
|
|
393
399
|
streamId: string;
|
|
394
|
-
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;
|
|
395
401
|
requestedBy?: {
|
|
396
402
|
id: string;
|
|
397
403
|
type: "user" | "serviceAccount";
|
|
@@ -555,7 +561,7 @@ export declare function registerAgentApprovalRoutes(app: Elysia, host: SixbHostV
|
|
|
555
561
|
} | {
|
|
556
562
|
error: {
|
|
557
563
|
at: string;
|
|
558
|
-
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";
|
|
559
565
|
message: string;
|
|
560
566
|
retryable: boolean;
|
|
561
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,wFAAwF;AACxF,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY
|
|
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" | {
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SixbHostView } from "@sixb/core";
|
|
2
2
|
import type { AgentRunSessionHost } from "@sixb/core/internal/agents";
|
|
3
|
-
import type { ConversationAgentRunRecord } from "@sixb/core/storage";
|
|
3
|
+
import type { AgentThreadComputer, ConversationAgentRunRecord } from "@sixb/core/storage";
|
|
4
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
|
+
};
|
|
5
13
|
/**
|
|
6
|
-
*
|
|
7
|
-
* runs
|
|
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.
|
|
8
17
|
*/
|
|
9
|
-
export declare function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} | null>;
|
|
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>;
|
|
13
21
|
export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostView): Elysia<"", {
|
|
14
22
|
decorator: {};
|
|
15
23
|
store: {};
|
|
@@ -32,8 +40,113 @@ export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostV
|
|
|
32
40
|
computer: {
|
|
33
41
|
post: {
|
|
34
42
|
body: {
|
|
35
|
-
|
|
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
|
+
};
|
|
36
137
|
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
} & {
|
|
144
|
+
api: {
|
|
145
|
+
"agent-threads": {
|
|
146
|
+
":threadId": {
|
|
147
|
+
computer: {
|
|
148
|
+
delete: {
|
|
149
|
+
body: unknown;
|
|
37
150
|
params: {
|
|
38
151
|
threadId: string;
|
|
39
152
|
};
|
|
@@ -73,6 +186,12 @@ export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostV
|
|
|
73
186
|
title?: string | undefined;
|
|
74
187
|
approvalMode?: "manual" | "accept-edits" | "auto" | undefined;
|
|
75
188
|
approvalModeSource?: "default" | "thread" | "fallback" | "run" | undefined;
|
|
189
|
+
computer?: {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
folder: string;
|
|
193
|
+
online: boolean;
|
|
194
|
+
} | undefined;
|
|
76
195
|
runsOn?: "computer" | undefined;
|
|
77
196
|
sandboxState?: {
|
|
78
197
|
status: "unavailable" | "new" | "busy" | "ready" | "blocked";
|
|
@@ -85,7 +204,7 @@ export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostV
|
|
|
85
204
|
spawnedBy: string;
|
|
86
205
|
} | undefined;
|
|
87
206
|
sandboxParams?: Record<string, import("../schemas/common").JsonValue> | undefined;
|
|
88
|
-
|
|
207
|
+
movedAt?: string | undefined;
|
|
89
208
|
lastMessageAt?: string | undefined;
|
|
90
209
|
};
|
|
91
210
|
404: {
|
|
@@ -96,6 +215,10 @@ export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostV
|
|
|
96
215
|
error: string;
|
|
97
216
|
code?: string | undefined;
|
|
98
217
|
};
|
|
218
|
+
409: {
|
|
219
|
+
error: string;
|
|
220
|
+
code?: string | undefined;
|
|
221
|
+
};
|
|
99
222
|
400: {
|
|
100
223
|
error: string;
|
|
101
224
|
code?: string | undefined;
|
|
@@ -118,6 +241,86 @@ export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostV
|
|
|
118
241
|
};
|
|
119
242
|
};
|
|
120
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
|
+
};
|
|
121
324
|
}, {
|
|
122
325
|
derive: {};
|
|
123
326
|
resolve: {};
|
|
@@ -131,4 +334,5 @@ export declare function registerAgentComputerRoutes(app: Elysia, host: SixbHostV
|
|
|
131
334
|
standaloneSchema: {};
|
|
132
335
|
response: {};
|
|
133
336
|
}>;
|
|
337
|
+
export {};
|
|
134
338
|
//# sourceMappingURL=agent-computers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-computers.d.ts","sourceRoot":"","sources":["../../src/routes/agent-computers.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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"}
|
|
@@ -6,7 +6,7 @@ export declare function agentRunSessionHost(host: SixbHostView): AgentRunSession
|
|
|
6
6
|
/**
|
|
7
7
|
* End the runs whose runner stopped renewing them, as the worker's repair pass does: a runner on
|
|
8
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. Returns the stop.
|
|
9
|
+
* once, by whichever takes it over. Computer sessions that lapsed end too. Returns the stop.
|
|
10
10
|
*/
|
|
11
11
|
export declare function startLapsedRunSweeper(host: SixbHostView): () => void;
|
|
12
12
|
/**
|
|
@@ -1 +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;
|
|
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"}
|