@opengeni/api-router 2.10.0-canary.1 → 2.10.0-canary.3
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/dist/app.js +1 -1
- package/dist/{chunk-3VUEFGWS.js → chunk-CZGPIPDA.js} +43 -3
- package/dist/chunk-CZGPIPDA.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/mcp/scheduled-task-view.d.ts +3 -3
- package/package.json +19 -19
- package/src/app.ts +5 -0
- package/src/mcp/server.ts +6 -1
- package/src/routes/workspaces.ts +36 -0
- package/dist/chunk-3VUEFGWS.js.map +0 -1
package/dist/app.js
CHANGED
|
@@ -25045,7 +25045,9 @@ function registerWorkspaceOrchestrationTools(server, deps, grant, can, callerSes
|
|
|
25045
25045
|
),
|
|
25046
25046
|
instructions: z43.string().min(1).max(SESSION_INSTRUCTIONS_MAX_CHARACTERS).optional(),
|
|
25047
25047
|
goal: z43.unknown().optional(),
|
|
25048
|
-
resources: z43.array(z43.unknown()).optional()
|
|
25048
|
+
resources: z43.array(z43.unknown()).optional().describe(
|
|
25049
|
+
"Omit to inherit parent repositories only. Files are never inherited automatically; explicitly include file resources to attach them. An empty array inherits no resources."
|
|
25050
|
+
),
|
|
25049
25051
|
tools: z43.array(z43.unknown()).optional(),
|
|
25050
25052
|
mcpServers: z43.array(z43.unknown()).optional(),
|
|
25051
25053
|
variableSetId: z43.string().uuid().optional(),
|
|
@@ -56926,6 +56928,8 @@ function socialHttpException(error) {
|
|
|
56926
56928
|
}
|
|
56927
56929
|
|
|
56928
56930
|
// src/routes/workspaces.ts
|
|
56931
|
+
import { SessionControlConflictError as SessionControlConflictError2, WorkspacePauseTimerInputError } from "@opengeni/db";
|
|
56932
|
+
import { WorkspacePauseTimerRequest } from "@opengeni/contracts";
|
|
56929
56933
|
import { createHash as createHash18 } from "crypto";
|
|
56930
56934
|
import {
|
|
56931
56935
|
AddWorkspaceMemberRequest,
|
|
@@ -57016,7 +57020,8 @@ import { requireLimit as requireLimit9 } from "@opengeni/core";
|
|
|
57016
57020
|
import {
|
|
57017
57021
|
assertWorkspaceMemberRemovable,
|
|
57018
57022
|
assertWorkspaceMemberUpdateAllowed,
|
|
57019
|
-
controlHumanWorkspace
|
|
57023
|
+
controlHumanWorkspace,
|
|
57024
|
+
controlHumanWorkspaceTimer
|
|
57020
57025
|
} from "@opengeni/core";
|
|
57021
57026
|
|
|
57022
57027
|
// src/workspace-deletion.ts
|
|
@@ -57775,6 +57780,36 @@ function registerWorkspaceRoutes(app, deps) {
|
|
|
57775
57780
|
});
|
|
57776
57781
|
return c.json(policy);
|
|
57777
57782
|
});
|
|
57783
|
+
app.post("/v1/workspaces/:workspaceId/pause-timer", async (c) => {
|
|
57784
|
+
const workspaceId = c.req.param("workspaceId");
|
|
57785
|
+
const grant = await requireAccessGrant32(c, deps, workspaceId, "workspace:admin");
|
|
57786
|
+
if (workspaceControlUtf8Bytes2(grant.subjectId) > WORKSPACE_CONTROL_ACTOR_MAX_BYTES2) {
|
|
57787
|
+
throw new HTTPException60(400, { message: "workspace-control actor is too large" });
|
|
57788
|
+
}
|
|
57789
|
+
const parsed = WorkspacePauseTimerRequest.safeParse(await c.req.json().catch(() => null));
|
|
57790
|
+
if (!parsed.success) throw new HTTPException60(400, { message: "Invalid pause timer" });
|
|
57791
|
+
try {
|
|
57792
|
+
await controlHumanWorkspaceTimer(
|
|
57793
|
+
{
|
|
57794
|
+
db: deps.db,
|
|
57795
|
+
bus: deps.bus,
|
|
57796
|
+
workflowClient: deps.workflowClient,
|
|
57797
|
+
...deps.schedulePromptPostCommit ? { schedulePromptPostCommit: deps.schedulePromptPostCommit } : {}
|
|
57798
|
+
},
|
|
57799
|
+
{ accountId: grant.accountId, workspaceId, subjectId: grant.subjectId },
|
|
57800
|
+
parsed.data
|
|
57801
|
+
);
|
|
57802
|
+
} catch (error) {
|
|
57803
|
+
if (error instanceof SessionControlConflictError2)
|
|
57804
|
+
throw new HTTPException60(409, {
|
|
57805
|
+
message: "Workspace changed. Reopen the timer and try again."
|
|
57806
|
+
});
|
|
57807
|
+
if (error instanceof WorkspacePauseTimerInputError)
|
|
57808
|
+
throw new HTTPException60(400, { message: error.message });
|
|
57809
|
+
throw error;
|
|
57810
|
+
}
|
|
57811
|
+
return c.json({ ok: true });
|
|
57812
|
+
});
|
|
57778
57813
|
app.post("/v1/workspaces/:workspaceId/inference-control", async (c) => {
|
|
57779
57814
|
const workspaceId = c.req.param("workspaceId");
|
|
57780
57815
|
const grant = await requireAccessGrant32(c, deps, workspaceId, "workspace:admin");
|
|
@@ -70302,6 +70337,7 @@ function createAppComposition(deps) {
|
|
|
70302
70337
|
} : {}
|
|
70303
70338
|
},
|
|
70304
70339
|
productAccessMode: deps.settings.productAccessMode,
|
|
70340
|
+
billingMode: deps.settings.billingMode,
|
|
70305
70341
|
managedAuthSessionSetMode: deps.settings.managedAuthSessionSetMode,
|
|
70306
70342
|
auth: clientAuthConfig(deps.settings),
|
|
70307
70343
|
analytics: clientAnalyticsConfig(deps.settings),
|
|
@@ -71250,6 +71286,10 @@ var routeLabelPatterns = [
|
|
|
71250
71286
|
pattern: /^\/v1\/workspaces\/[^/]+\/inference-control$/,
|
|
71251
71287
|
label: "/v1/workspaces/:workspaceId/inference-control"
|
|
71252
71288
|
},
|
|
71289
|
+
{
|
|
71290
|
+
pattern: /^\/v1\/workspaces\/[^/]+\/pause-timer$/,
|
|
71291
|
+
label: "/v1/workspaces/:workspaceId/pause-timer"
|
|
71292
|
+
},
|
|
71253
71293
|
{
|
|
71254
71294
|
pattern: /^\/v1\/workspaces\/[^/]+\/sessions\/[^/]+\/fs\/(list|list-batch|read|write|delete|move|mkdir)$/,
|
|
71255
71295
|
label: "/v1/workspaces/:workspaceId/sessions/:id/fs/:operation"
|
|
@@ -71850,4 +71890,4 @@ export {
|
|
|
71850
71890
|
withDefaultEnabledCapabilityMcpTools,
|
|
71851
71891
|
workflowIdForSession4 as workflowIdForSession
|
|
71852
71892
|
};
|
|
71853
|
-
//# sourceMappingURL=chunk-
|
|
71893
|
+
//# sourceMappingURL=chunk-CZGPIPDA.js.map
|