@opengeni/sdk 7.0.0 → 7.1.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/dist/artifacts.js +4 -4
- package/dist/browser.js +3 -3
- package/dist/chat/index.js +5 -5
- package/dist/{chunk-7S2MZ65L.js → chunk-6NEPJ7NC.js} +5 -5
- package/dist/{chunk-P7OFNKCH.js → chunk-LSO66LQA.js} +1 -1
- package/dist/chunk-LSO66LQA.js.map +1 -0
- package/dist/{chunk-N76DIO4E.js → chunk-MG4QFBKR.js} +2 -2
- package/dist/{chunk-RCVWE6UR.js → chunk-X6Y2JCAN.js} +2 -2
- package/dist/{chunk-7ESHQLTB.js → chunk-Y7DRKEFZ.js} +7 -6
- package/dist/{chunk-7ESHQLTB.js.map → chunk-Y7DRKEFZ.js.map} +1 -1
- package/dist/{chunk-MXQX4M36.js → chunk-YHF66FWZ.js} +2 -2
- package/dist/{chunk-L3MYVTPO.js → chunk-ZN6WWXAX.js} +2 -2
- package/dist/client.d.ts +1 -0
- package/dist/codex-realtime-controller.js +1 -1
- package/dist/core.js +6 -6
- package/dist/document-authority.js +3 -3
- package/dist/editable-artifacts.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +63 -45
- package/dist/index.js.map +1 -1
- package/dist/realtime.js +5 -5
- package/dist/site-browser-runtime.gen.d.ts +1 -1
- package/dist/site-document.js +1 -1
- package/dist/site-document.js.map +1 -1
- package/dist/site.js +3 -3
- package/dist/tool-display-metadata.d.ts +3 -0
- package/dist/types.d.ts +3 -2
- package/package.json +2 -2
- package/src/client.ts +2 -1
- package/src/index.ts +2 -0
- package/src/site-browser-runtime.gen.ts +1 -1
- package/src/tool-display-metadata.ts +19 -0
- package/src/types.ts +14 -1
- package/dist/chunk-P7OFNKCH.js.map +0 -1
- /package/dist/{chunk-7S2MZ65L.js.map → chunk-6NEPJ7NC.js.map} +0 -0
- /package/dist/{chunk-N76DIO4E.js.map → chunk-MG4QFBKR.js.map} +0 -0
- /package/dist/{chunk-RCVWE6UR.js.map → chunk-X6Y2JCAN.js.map} +0 -0
- /package/dist/{chunk-MXQX4M36.js.map → chunk-YHF66FWZ.js.map} +0 -0
- /package/dist/{chunk-L3MYVTPO.js.map → chunk-ZN6WWXAX.js.map} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ToolDisplayMetadata } from "@opengeni/contracts";
|
|
2
|
+
|
|
3
|
+
/** Browser/native-safe event projection; do not import server schema runtimes. */
|
|
4
|
+
export function parseToolDisplayMetadata(value: unknown): ToolDisplayMetadata | undefined {
|
|
5
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return undefined;
|
|
6
|
+
const item = value as Record<string, unknown>;
|
|
7
|
+
if (Object.keys(item).some((key) => !["toolName", "title", "accountLabel"].includes(key)))
|
|
8
|
+
return undefined;
|
|
9
|
+
const text = (v: unknown, max: number): v is string =>
|
|
10
|
+
typeof v === "string" && v.length > 0 && v.length <= max;
|
|
11
|
+
if (!text(item.toolName, 512) || /[\u0000-\u001f\u007f]/u.test(item.toolName)) return undefined;
|
|
12
|
+
if (item.title !== undefined && !text(item.title, 512)) return undefined;
|
|
13
|
+
if (item.accountLabel !== undefined && !text(item.accountLabel, 1024)) return undefined;
|
|
14
|
+
return {
|
|
15
|
+
toolName: item.toolName,
|
|
16
|
+
...(item.title !== undefined ? { title: item.title as string } : {}),
|
|
17
|
+
...(item.accountLabel !== undefined ? { accountLabel: item.accountLabel as string } : {}),
|
|
18
|
+
};
|
|
19
|
+
}
|
package/src/types.ts
CHANGED
|
@@ -1378,6 +1378,7 @@ export type SessionBackgroundCommand = {
|
|
|
1378
1378
|
provider: "managed" | "connected_machine";
|
|
1379
1379
|
state: "running" | "stopping" | "exited" | "lost";
|
|
1380
1380
|
commandPreview: string;
|
|
1381
|
+
commandText?: string | undefined;
|
|
1381
1382
|
cancelRequestedAt: string | null;
|
|
1382
1383
|
exitCode: number | null;
|
|
1383
1384
|
settlementReason: string | null;
|
|
@@ -3145,6 +3146,7 @@ export type FirstPartyMcpToolName =
|
|
|
3145
3146
|
| "run_on"
|
|
3146
3147
|
| "sandbox_provision"
|
|
3147
3148
|
| "connected_machine_remove"
|
|
3149
|
+
| "connected_machine_enroll_token"
|
|
3148
3150
|
| "project_list"
|
|
3149
3151
|
| "project_get"
|
|
3150
3152
|
| "project_create"
|
|
@@ -7787,7 +7789,18 @@ export type MachineState =
|
|
|
7787
7789
|
| "display_unavailable"
|
|
7788
7790
|
| "enrolling";
|
|
7789
7791
|
|
|
7790
|
-
export type MachineKind =
|
|
7792
|
+
export type MachineKind =
|
|
7793
|
+
| "docker"
|
|
7794
|
+
| "modal"
|
|
7795
|
+
| "local"
|
|
7796
|
+
| "daytona"
|
|
7797
|
+
| "runloop"
|
|
7798
|
+
| "e2b"
|
|
7799
|
+
| "blaxel"
|
|
7800
|
+
| "cloudflare"
|
|
7801
|
+
| "vercel"
|
|
7802
|
+
| "selfhosted"
|
|
7803
|
+
| "opensandbox";
|
|
7791
7804
|
|
|
7792
7805
|
export type MachineConnectionAuthority = {
|
|
7793
7806
|
state: "not_applicable" | "unclaimed" | "active" | "expired";
|