@opengeni/sdk 0.32.1 → 0.34.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 CHANGED
@@ -8,6 +8,11 @@ helpers for proxying the stream through your own API.
8
8
  Zero runtime dependencies. Needs only WHATWG `fetch` and streams, so it runs in
9
9
  Node 18+, Bun, Deno, browsers, and edge runtimes.
10
10
 
11
+ Browser clients may call the public API from any origin with an API key or
12
+ other bearer credential. Browser cookies are accepted cross-origin only from
13
+ operator-configured trusted origins; arbitrary embedding origins never receive
14
+ credentialed CORS responses.
15
+
11
16
  ## Quick start
12
17
 
13
18
  ```ts
@@ -32,6 +37,36 @@ for await (const event of client.streamEvents(workspaceId, session.id)) {
32
37
  }
33
38
  ```
34
39
 
40
+ ## Workspace artifacts
41
+
42
+ Workspace artifacts are generic, immutable HTML publications. The SDK does not
43
+ assign product types such as app, page, dashboard, or gallery. List pages are
44
+ bounded and expose both `truncated` and an opaque `nextCursor` so callers never
45
+ mistake a partial page for the complete workspace catalog.
46
+
47
+ The initial web renderer supports semantic HTML, inline CSS, CSS-only
48
+ interactions, and inline SVG. It removes JavaScript, event handlers, forms,
49
+ embeds, external URLs, and other active or navigation-capable markup before
50
+ rendering. Executable artifacts require a later, stronger isolation boundary.
51
+
52
+ ```ts
53
+ let cursor: string | undefined;
54
+ do {
55
+ const page = await client.listWorkspaceArtifacts(workspaceId, {
56
+ limit: 50,
57
+ ...(cursor ? { cursor } : {}),
58
+ });
59
+ for (const artifact of page.artifacts) console.log(artifact.title);
60
+ cursor = page.nextCursor ?? undefined;
61
+ } while (cursor);
62
+ ```
63
+
64
+ Creation and publication require a caller-supplied idempotency key. Reuse the
65
+ same key only to retry the same logical mutation. Agent-authored versions also
66
+ return the exact source session, turn, attempt, and execution generation that
67
+ published them. Version and event history are bounded; inspect
68
+ `versionsTruncated` and `eventsTruncated` on the detail response.
69
+
35
70
  Omit `firstPartyMcpTools` for the complete OpenGeni tool catalog. An explicit
36
71
  `[]` exposes no broad first-party tools; attached resources and separately
37
72
  selected `files`/`docs` MCP servers are unaffected.
@@ -0,0 +1,11 @@
1
+ import { OpenGeniClient as OpenGeniCoreClient } from "./client";
2
+ import type { CreateWorkspaceArtifactRequest, PublishWorkspaceArtifactVersionRequest, RollbackWorkspaceArtifactRequest, WorkspaceArtifactContentResponse, WorkspaceArtifactDetailResponse, WorkspaceArtifactListOptions, WorkspaceArtifactListResponse, WorkspaceArtifactMutationResponse } from "./workspace-artifacts";
3
+ /** Public SDK client. Artifact operations stay out of the console's eager core graph. */
4
+ export declare class OpenGeniClient extends OpenGeniCoreClient {
5
+ listWorkspaceArtifacts(workspaceId: string, options?: WorkspaceArtifactListOptions): Promise<WorkspaceArtifactListResponse>;
6
+ getWorkspaceArtifact(workspaceId: string, artifactId: string): Promise<WorkspaceArtifactDetailResponse>;
7
+ getWorkspaceArtifactContent(workspaceId: string, artifactId: string, versionId?: string): Promise<WorkspaceArtifactContentResponse>;
8
+ createWorkspaceArtifact(workspaceId: string, request: CreateWorkspaceArtifactRequest): Promise<WorkspaceArtifactMutationResponse>;
9
+ publishWorkspaceArtifactVersion(workspaceId: string, artifactId: string, request: PublishWorkspaceArtifactVersionRequest): Promise<WorkspaceArtifactMutationResponse>;
10
+ rollbackWorkspaceArtifact(workspaceId: string, artifactId: string, request: RollbackWorkspaceArtifactRequest): Promise<WorkspaceArtifactMutationResponse>;
11
+ }