@opengeni/sdk 0.9.0 → 0.11.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/LICENSE +190 -0
- package/README.md +17 -0
- package/dist/index.d.ts +209 -11
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -9
- package/src/client.ts +38 -2
- package/src/index.ts +22 -0
- package/src/types.ts +223 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Cloudgeni-ai
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -163,6 +163,23 @@ Every public endpoint group has typed methods:
|
|
|
163
163
|
| API keys | `listApiKeys`, `createApiKey`, `deleteApiKey` |
|
|
164
164
|
| Billing | `getBilling`, `getBillingUsage`, `getBillingEntitlements`, `createBillingCheckout` |
|
|
165
165
|
|
|
166
|
+
### Protocol routes (deliberately not in the SDK)
|
|
167
|
+
|
|
168
|
+
Some endpoints are wire protocols for specific counterparts, not client
|
|
169
|
+
surface, and are intentionally absent from the SDK: machine-agent enrollment
|
|
170
|
+
device flow and NATS auth-callout, viewer/stream internals beyond minting,
|
|
171
|
+
OAuth/GitHub browser callbacks, Stripe webhooks, the MCP transports themselves
|
|
172
|
+
(`/v1/workspaces/:id/mcp`, `/mcp/docs` — speak MCP to those), and the install
|
|
173
|
+
script routes. If you find yourself calling one of these raw from a product,
|
|
174
|
+
reconsider — they can change with their counterpart, not with the SDK.
|
|
175
|
+
|
|
176
|
+
## Compatibility
|
|
177
|
+
|
|
178
|
+
Clients and servers are compatible within the same **major** release-train
|
|
179
|
+
version; evolution is additive within a major and both sides are tolerant
|
|
180
|
+
readers. Official server builds expose `serverVersion` on `/healthz` and
|
|
181
|
+
`/v1/config/client`. Full policy: `docs/architecture.md` §3.10.
|
|
182
|
+
|
|
166
183
|
## Proxy through your own API
|
|
167
184
|
|
|
168
185
|
Keep your OpenGeni API key on your server and re-emit the stream to your own
|
package/dist/index.d.ts
CHANGED
|
@@ -168,6 +168,82 @@ type SessionMcpServerMetadata = {
|
|
|
168
168
|
headerNames: string[];
|
|
169
169
|
credentialVersion: number;
|
|
170
170
|
};
|
|
171
|
+
type ConnectionKind = "oauth2" | "api_key" | "app_install" | "delegated";
|
|
172
|
+
type ConnectionStatus = "active" | "needs_reauth" | "revoked" | "error";
|
|
173
|
+
type McpServerConnectionRef = {
|
|
174
|
+
connectionId?: string | undefined;
|
|
175
|
+
providerDomain: string;
|
|
176
|
+
kind?: ConnectionKind | undefined;
|
|
177
|
+
scopes?: string[] | undefined;
|
|
178
|
+
resource?: string | undefined;
|
|
179
|
+
subjectScope?: "workspace" | "subject" | undefined;
|
|
180
|
+
};
|
|
181
|
+
type ConnectionMetadata = {
|
|
182
|
+
id: string;
|
|
183
|
+
accountId: string;
|
|
184
|
+
workspaceId: string;
|
|
185
|
+
subjectId: string | null;
|
|
186
|
+
providerDomain: string;
|
|
187
|
+
kind: ConnectionKind;
|
|
188
|
+
status: ConnectionStatus;
|
|
189
|
+
grantedScopes: string[];
|
|
190
|
+
expiresAt: string | null;
|
|
191
|
+
lastRefreshAt: string | null;
|
|
192
|
+
lastUsedAt: string | null;
|
|
193
|
+
lastError: string | null;
|
|
194
|
+
version: number;
|
|
195
|
+
metadata: Record<string, unknown>;
|
|
196
|
+
createdBySubjectId: string | null;
|
|
197
|
+
updatedBySubjectId: string | null;
|
|
198
|
+
createdAt: string;
|
|
199
|
+
updatedAt: string;
|
|
200
|
+
};
|
|
201
|
+
type CreateConnectionRequest = {
|
|
202
|
+
providerDomain: string;
|
|
203
|
+
kind: ConnectionKind;
|
|
204
|
+
subjectId?: string | null | undefined;
|
|
205
|
+
credential: Record<string, unknown>;
|
|
206
|
+
grantedScopes?: string[] | undefined;
|
|
207
|
+
expiresAt?: string | null | undefined;
|
|
208
|
+
metadata?: Record<string, unknown> | undefined;
|
|
209
|
+
};
|
|
210
|
+
type UpdateConnectionRequest = {
|
|
211
|
+
providerDomain?: string | undefined;
|
|
212
|
+
subjectId?: string | null | undefined;
|
|
213
|
+
kind?: ConnectionKind | undefined;
|
|
214
|
+
status?: ConnectionStatus | undefined;
|
|
215
|
+
credential?: Record<string, unknown> | undefined;
|
|
216
|
+
grantedScopes?: string[] | undefined;
|
|
217
|
+
expiresAt?: string | null | undefined;
|
|
218
|
+
metadata?: Record<string, unknown> | undefined;
|
|
219
|
+
};
|
|
220
|
+
type ConnectionResponse = {
|
|
221
|
+
connection: ConnectionMetadata;
|
|
222
|
+
};
|
|
223
|
+
type ListConnectionsResponse = {
|
|
224
|
+
connections: ConnectionMetadata[];
|
|
225
|
+
};
|
|
226
|
+
type OAuthStartRequest = {
|
|
227
|
+
providerDomain?: string | undefined;
|
|
228
|
+
mcpUrl?: string | undefined;
|
|
229
|
+
resource?: string | undefined;
|
|
230
|
+
requestedScopes?: string[] | undefined;
|
|
231
|
+
returnPath?: string | undefined;
|
|
232
|
+
connectionId?: string | undefined;
|
|
233
|
+
};
|
|
234
|
+
type OAuthStartResponse = {
|
|
235
|
+
state: string;
|
|
236
|
+
authorizationUrl: string | null;
|
|
237
|
+
expiresAt: string;
|
|
238
|
+
};
|
|
239
|
+
type IntegrationClientMetadata = {
|
|
240
|
+
client_id: string;
|
|
241
|
+
client_name: "OpenGeni";
|
|
242
|
+
redirect_uris: string[];
|
|
243
|
+
token_endpoint_auth_method: "none";
|
|
244
|
+
grant_types: Array<"authorization_code" | "refresh_token">;
|
|
245
|
+
response_types: ["code"];
|
|
246
|
+
};
|
|
171
247
|
type Session = {
|
|
172
248
|
id: string;
|
|
173
249
|
workspaceId: string;
|
|
@@ -219,7 +295,7 @@ type SessionTurn = {
|
|
|
219
295
|
createdAt: string;
|
|
220
296
|
updatedAt: string;
|
|
221
297
|
};
|
|
222
|
-
declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.status.changed", "session.requiresAction", "session.context.compacted", "session.context.cleared", "user.message", "user.interrupt", "user.approvalDecision", "turn.queued", "turn.updated", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.preempted", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "agent.updated", "sandbox.operation.started", "sandbox.operation.completed", "sandbox.operation.failed", "sandbox.command.output.delta", "artifact.created", "goal.set", "goal.updated", "goal.completed", "goal.paused", "goal.resumed", "goal.continuation", "stream.url.rotated", "stream.opened", "stream.closed", "stream.revoked", "recording.started", "recording.available", "recording.failed", "fs.changed", "git.changed", "terminal.pty.started", "terminal.pty.output.delta", "terminal.pty.exited", "session.title_set", "codex.account.switched"];
|
|
298
|
+
declare const SESSION_EVENT_TYPES: readonly ["session.created", "session.status.changed", "session.requiresAction", "session.context.compacted", "session.context.cleared", "user.message", "user.interrupt", "user.approvalDecision", "turn.queued", "turn.updated", "turn.started", "turn.completed", "turn.failed", "turn.cancelled", "turn.preempted", "agent.message.delta", "agent.message.completed", "agent.reasoning.delta", "agent.toolCall.created", "agent.toolCall.output", "tool.auth_needed", "agent.updated", "sandbox.operation.started", "sandbox.operation.completed", "sandbox.operation.failed", "sandbox.command.output.delta", "artifact.created", "goal.set", "goal.updated", "goal.completed", "goal.paused", "goal.resumed", "goal.continuation", "stream.url.rotated", "stream.opened", "stream.closed", "stream.revoked", "recording.started", "recording.available", "recording.failed", "fs.changed", "git.changed", "terminal.pty.started", "terminal.pty.output.delta", "terminal.pty.exited", "session.title_set", "codex.account.switched"];
|
|
223
299
|
type KnownSessionEventType = (typeof SESSION_EVENT_TYPES)[number];
|
|
224
300
|
/**
|
|
225
301
|
* Event types the SDK knows about today, kept open so a newer OpenGeni server
|
|
@@ -238,6 +314,17 @@ type SessionEvent = {
|
|
|
238
314
|
clientEventId?: string | null | undefined;
|
|
239
315
|
turnId?: string | null | undefined;
|
|
240
316
|
};
|
|
317
|
+
type ToolAuthNeededPayload = {
|
|
318
|
+
serverId: string;
|
|
319
|
+
toolName?: string | null | undefined;
|
|
320
|
+
providerDomain: string;
|
|
321
|
+
connectionId?: string | null | undefined;
|
|
322
|
+
reason: "missing_connection" | "expired" | "insufficient_scope" | "refresh_failed";
|
|
323
|
+
scopes?: string[] | undefined;
|
|
324
|
+
resource?: string | undefined;
|
|
325
|
+
authorizationUrl?: string | undefined;
|
|
326
|
+
subjectId?: string | null | undefined;
|
|
327
|
+
};
|
|
241
328
|
type AgentTextDeltaPayload = {
|
|
242
329
|
text: string;
|
|
243
330
|
};
|
|
@@ -638,7 +725,7 @@ type CreateSessionRequest = {
|
|
|
638
725
|
groupId: string;
|
|
639
726
|
} | undefined;
|
|
640
727
|
};
|
|
641
|
-
declare const KNOWN_PERMISSIONS: readonly ["account:read", "account:admin", "members:manage", "workspace:create", "billing:read", "billing:manage", "workspace:read", "workspace:admin", "sessions:create", "sessions:read", "sessions:control", "stream:view", "stream:control", "stream:acknowledge", "files:upload", "files:read", "files:write", "terminal:attach", "documents:manage", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "github:manage", "github:use", "api_keys:manage", "environments:manage", "environments:use", "mcp_servers:attach", "goals:manage", "enrollments:read", "enrollments:manage"];
|
|
728
|
+
declare const KNOWN_PERMISSIONS: readonly ["account:read", "account:admin", "members:manage", "workspace:create", "billing:read", "billing:manage", "workspace:read", "workspace:admin", "sessions:create", "sessions:read", "sessions:control", "stream:view", "stream:control", "stream:acknowledge", "files:upload", "files:read", "files:write", "terminal:attach", "documents:manage", "documents:search", "scheduled_tasks:manage", "scheduled_tasks:run", "github:manage", "github:use", "api_keys:manage", "connections:read", "connections:write", "environments:manage", "environments:use", "mcp_servers:attach", "toolspace:call", "goals:manage", "enrollments:read", "enrollments:manage"];
|
|
642
729
|
type KnownPermission = (typeof KNOWN_PERMISSIONS)[number];
|
|
643
730
|
/**
|
|
644
731
|
* Permissions the SDK knows about today, kept open so a newer OpenGeni server
|
|
@@ -1103,6 +1190,8 @@ type UploadFileInput = {
|
|
|
1103
1190
|
sha256?: string | undefined;
|
|
1104
1191
|
};
|
|
1105
1192
|
type DocumentStatus = "queued" | "indexing" | "ready" | "failed";
|
|
1193
|
+
type KnowledgeSourceKind = "manual_upload" | "meeting_transcript" | "repository" | "email" | "chat" | "document" | "web" | "other";
|
|
1194
|
+
type DocumentSearchMode = "hybrid" | "vector" | "keyword";
|
|
1106
1195
|
type DocumentBase = {
|
|
1107
1196
|
id: string;
|
|
1108
1197
|
workspaceId: string;
|
|
@@ -1121,6 +1210,15 @@ type Document = {
|
|
|
1121
1210
|
parser: string;
|
|
1122
1211
|
chunkCount: number;
|
|
1123
1212
|
error: string | null;
|
|
1213
|
+
sourceKind: KnowledgeSourceKind;
|
|
1214
|
+
sourceUri: string | null;
|
|
1215
|
+
sourceExternalId: string | null;
|
|
1216
|
+
sourceTitle: string | null;
|
|
1217
|
+
sourceAuthor: string | null;
|
|
1218
|
+
sourceCreatedAt: string | null;
|
|
1219
|
+
sourceUpdatedAt: string | null;
|
|
1220
|
+
sourceVersion: string | null;
|
|
1221
|
+
aclTags: string[];
|
|
1124
1222
|
createdAt: string;
|
|
1125
1223
|
updatedAt: string;
|
|
1126
1224
|
};
|
|
@@ -1133,20 +1231,101 @@ type DocumentSearchResult = {
|
|
|
1133
1231
|
title: string;
|
|
1134
1232
|
text: string;
|
|
1135
1233
|
score: number;
|
|
1234
|
+
matchType: DocumentSearchMode;
|
|
1235
|
+
vectorScore: number | null;
|
|
1236
|
+
keywordScore: number | null;
|
|
1136
1237
|
chunkIndex: number;
|
|
1137
1238
|
metadata: Record<string, unknown>;
|
|
1239
|
+
sourceKind: KnowledgeSourceKind;
|
|
1240
|
+
sourceUri: string | null;
|
|
1241
|
+
sourceExternalId: string | null;
|
|
1242
|
+
sourceTitle: string | null;
|
|
1243
|
+
sourceAuthor: string | null;
|
|
1244
|
+
sourceCreatedAt: string | null;
|
|
1245
|
+
sourceUpdatedAt: string | null;
|
|
1246
|
+
sourceVersion: string | null;
|
|
1247
|
+
aclTags: string[];
|
|
1138
1248
|
};
|
|
1139
1249
|
type CreateDocumentBaseRequest = {
|
|
1140
1250
|
name: string;
|
|
1141
1251
|
description?: string | undefined;
|
|
1142
1252
|
};
|
|
1253
|
+
type AddDocumentRequest = {
|
|
1254
|
+
fileId: string;
|
|
1255
|
+
title?: string | undefined;
|
|
1256
|
+
sourceKind?: KnowledgeSourceKind | undefined;
|
|
1257
|
+
sourceUri?: string | undefined;
|
|
1258
|
+
sourceExternalId?: string | undefined;
|
|
1259
|
+
sourceTitle?: string | undefined;
|
|
1260
|
+
sourceAuthor?: string | undefined;
|
|
1261
|
+
sourceCreatedAt?: string | undefined;
|
|
1262
|
+
sourceUpdatedAt?: string | undefined;
|
|
1263
|
+
sourceVersion?: string | undefined;
|
|
1264
|
+
aclTags?: string[] | undefined;
|
|
1265
|
+
};
|
|
1143
1266
|
type DocumentSearchRequest = {
|
|
1144
1267
|
query: string;
|
|
1268
|
+
baseIds?: string[] | undefined;
|
|
1269
|
+
mode?: DocumentSearchMode | undefined;
|
|
1270
|
+
sourceKinds?: KnowledgeSourceKind[] | undefined;
|
|
1271
|
+
aclTags?: string[] | undefined;
|
|
1145
1272
|
limit?: number | undefined;
|
|
1146
1273
|
};
|
|
1147
1274
|
type DocumentSearchResponse = {
|
|
1148
1275
|
results: DocumentSearchResult[];
|
|
1149
1276
|
};
|
|
1277
|
+
type KnowledgeMemoryStatus = "proposed" | "approved" | "rejected";
|
|
1278
|
+
type KnowledgeMemoryKind = "semantic" | "episodic" | "procedural" | "decision" | "preference";
|
|
1279
|
+
type KnowledgeSourceRef = {
|
|
1280
|
+
kind: "document_chunk" | "document" | "session_event" | "memory" | "external";
|
|
1281
|
+
id: string;
|
|
1282
|
+
uri?: string | undefined;
|
|
1283
|
+
title?: string | undefined;
|
|
1284
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1285
|
+
};
|
|
1286
|
+
type KnowledgeMemory = {
|
|
1287
|
+
id: string;
|
|
1288
|
+
workspaceId: string;
|
|
1289
|
+
status: KnowledgeMemoryStatus;
|
|
1290
|
+
kind: KnowledgeMemoryKind;
|
|
1291
|
+
scope: string;
|
|
1292
|
+
text: string;
|
|
1293
|
+
sourceRefs: KnowledgeSourceRef[];
|
|
1294
|
+
confidence: number;
|
|
1295
|
+
metadata: Record<string, unknown>;
|
|
1296
|
+
createdBySessionId: string | null;
|
|
1297
|
+
reviewedBy: string | null;
|
|
1298
|
+
reviewedAt: string | null;
|
|
1299
|
+
createdAt: string;
|
|
1300
|
+
updatedAt: string;
|
|
1301
|
+
};
|
|
1302
|
+
type CreateKnowledgeMemoryRequest = {
|
|
1303
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
1304
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
1305
|
+
scope?: string | undefined;
|
|
1306
|
+
text: string;
|
|
1307
|
+
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
1308
|
+
confidence?: number | undefined;
|
|
1309
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1310
|
+
createdBySessionId?: string | undefined;
|
|
1311
|
+
};
|
|
1312
|
+
type UpdateKnowledgeMemoryRequest = {
|
|
1313
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
1314
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
1315
|
+
scope?: string | undefined;
|
|
1316
|
+
text?: string | undefined;
|
|
1317
|
+
sourceRefs?: KnowledgeSourceRef[] | undefined;
|
|
1318
|
+
confidence?: number | undefined;
|
|
1319
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1320
|
+
reviewedBy?: string | undefined;
|
|
1321
|
+
};
|
|
1322
|
+
type KnowledgeMemorySearchRequest = {
|
|
1323
|
+
query?: string | undefined;
|
|
1324
|
+
status?: KnowledgeMemoryStatus | undefined;
|
|
1325
|
+
kind?: KnowledgeMemoryKind | undefined;
|
|
1326
|
+
scope?: string | undefined;
|
|
1327
|
+
limit?: number | undefined;
|
|
1328
|
+
};
|
|
1150
1329
|
type CapabilityPackConnectorAuthModel = "oauth2_authorization_code_pkce" | "oauth2_authorization_code" | "api_key" | "credential_ref";
|
|
1151
1330
|
type CapabilityPackConnector = {
|
|
1152
1331
|
id: string;
|
|
@@ -1283,8 +1462,10 @@ type GetPackResponse = {
|
|
|
1283
1462
|
installation: PackInstallation | null;
|
|
1284
1463
|
};
|
|
1285
1464
|
type CapabilityKind = "pack" | "mcp" | "api" | "skill" | "plugin";
|
|
1286
|
-
type CapabilitySource = "built_in" | "configured" | "public_registry" | "manual";
|
|
1465
|
+
type CapabilitySource = "built_in" | "configured" | "public_registry" | "registry" | "manual";
|
|
1287
1466
|
type CapabilityInstallationStatus = "active" | "disabled";
|
|
1467
|
+
type CapabilityCatalogAuthKind = "oauth2" | "api_key" | "none" | "unknown";
|
|
1468
|
+
type CapabilityCatalogTier = "verified" | "community";
|
|
1288
1469
|
type CapabilityRuntime = {
|
|
1289
1470
|
available: boolean;
|
|
1290
1471
|
mcpServerId?: string | undefined;
|
|
@@ -1305,6 +1486,18 @@ type CapabilityCatalogItem = {
|
|
|
1305
1486
|
endpointUrl: string | null;
|
|
1306
1487
|
installUrl: string | null;
|
|
1307
1488
|
authModel: string | null;
|
|
1489
|
+
providerDomain: string | null;
|
|
1490
|
+
surfaceType: string | null;
|
|
1491
|
+
transport: string | null;
|
|
1492
|
+
mcpUrl: string | null;
|
|
1493
|
+
authKind: CapabilityCatalogAuthKind | null;
|
|
1494
|
+
credentialFacts: Record<string, unknown>[];
|
|
1495
|
+
tier: CapabilityCatalogTier | null;
|
|
1496
|
+
provenance: string | null;
|
|
1497
|
+
logoAssetPath: string | null;
|
|
1498
|
+
importBatchId: string | null;
|
|
1499
|
+
stale: boolean;
|
|
1500
|
+
staleAt: string | null;
|
|
1308
1501
|
tools: ToolRef[];
|
|
1309
1502
|
runtime: CapabilityRuntime;
|
|
1310
1503
|
enabled: boolean;
|
|
@@ -1346,6 +1539,7 @@ type CreateCapabilityCatalogItemRequest = {
|
|
|
1346
1539
|
type EnableCapabilityRequest = {
|
|
1347
1540
|
config?: Record<string, unknown> | undefined;
|
|
1348
1541
|
metadata?: Record<string, unknown> | undefined;
|
|
1542
|
+
connectionRef?: McpServerConnectionRef | undefined;
|
|
1349
1543
|
/**
|
|
1350
1544
|
* Credential headers for remote MCP capabilities. Write-only: encrypted at
|
|
1351
1545
|
* rest, injected only into the runtime MCP client, never returned by the
|
|
@@ -1518,6 +1712,10 @@ type MachineView = {
|
|
|
1518
1712
|
os: string;
|
|
1519
1713
|
arch: string;
|
|
1520
1714
|
hasDisplay: boolean;
|
|
1715
|
+
/** Non-null only when a display exists but capture is blocked (macOS Screen
|
|
1716
|
+
* Recording / TCC not granted) — the UI can surface "display: capture not
|
|
1717
|
+
* granted". null == capture permitted OR headless. */
|
|
1718
|
+
desktopUnavailableReason?: string | null | undefined;
|
|
1521
1719
|
allowScreenControl: boolean;
|
|
1522
1720
|
sharedSessionCount: number;
|
|
1523
1721
|
lastSeenAt: string | null;
|
|
@@ -2007,9 +2205,7 @@ declare class OpenGeniClient {
|
|
|
2007
2205
|
listDocumentBases(workspaceId: string): Promise<DocumentBase[]>;
|
|
2008
2206
|
getDocumentBase(workspaceId: string, baseId: string): Promise<DocumentBase>;
|
|
2009
2207
|
/** Index an uploaded file into the base. The file must be `ready`. */
|
|
2010
|
-
addDocument(workspaceId: string, baseId: string, request:
|
|
2011
|
-
fileId: string;
|
|
2012
|
-
}): Promise<Document>;
|
|
2208
|
+
addDocument(workspaceId: string, baseId: string, request: AddDocumentRequest): Promise<Document>;
|
|
2013
2209
|
listDocuments(workspaceId: string, baseId: string): Promise<Document[]>;
|
|
2014
2210
|
/** Retry indexing for a failed document. */
|
|
2015
2211
|
reindexDocument(workspaceId: string, baseId: string, documentId: string): Promise<Document>;
|
|
@@ -2018,10 +2214,12 @@ declare class OpenGeniClient {
|
|
|
2018
2214
|
* chunks while leaving the uploaded file asset available for other uses.
|
|
2019
2215
|
*/
|
|
2020
2216
|
deleteDocument(workspaceId: string, baseId: string, documentId: string): Promise<void>;
|
|
2021
|
-
searchDocuments(workspaceId: string, baseId: string, request:
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2217
|
+
searchDocuments(workspaceId: string, baseId: string, request: Omit<DocumentSearchRequest, "baseIds">): Promise<DocumentSearchResponse>;
|
|
2218
|
+
searchKnowledge(workspaceId: string, request: DocumentSearchRequest): Promise<DocumentSearchResponse>;
|
|
2219
|
+
listKnowledgeMemories(workspaceId: string, request?: KnowledgeMemorySearchRequest): Promise<KnowledgeMemory[]>;
|
|
2220
|
+
getKnowledgeMemory(workspaceId: string, memoryId: string): Promise<KnowledgeMemory>;
|
|
2221
|
+
createKnowledgeMemory(workspaceId: string, request: CreateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
|
|
2222
|
+
updateKnowledgeMemory(workspaceId: string, memoryId: string, request: UpdateKnowledgeMemoryRequest): Promise<KnowledgeMemory>;
|
|
2025
2223
|
/** Built-in + registered packs, with the workspace's installations. */
|
|
2026
2224
|
listPacks(workspaceId: string): Promise<ListPacksResponse>;
|
|
2027
2225
|
/** Register (or replace) a workspace-scoped pack from a manifest. */
|
|
@@ -2334,4 +2532,4 @@ declare function ttydInputFrame(data: string): string;
|
|
|
2334
2532
|
/** Build a client→server RESIZE frame: "1" + JSON.stringify({ columns, rows }). */
|
|
2335
2533
|
declare function ttydResizeFrame(columns: number, rows: number): string;
|
|
2336
2534
|
|
|
2337
|
-
export { type AccessContext, type AccessGrant, type AccountGrant, type AccountRole, type AcknowledgeStreamRequest, type AcknowledgeStreamResponse, type AddWorkspaceMemberRequest, type AgentMessageCompletedPayload, type AgentTextDeltaPayload, type AgentToolCallCreatedPayload, type AgentToolCallOutputPayload, type ApiKey, type AttachViewerRequest, type AttachViewerResponse, type BillingBalance, type BillingEntitlementsResponse, type BillingMode, type BillingSummary, type BillingUsageResponse, type CapabilityCatalogItem, type CapabilityCatalogResponse, type CapabilityInstallation, type CapabilityInstallationStatus, type CapabilityKind, type CapabilityPack, type CapabilityPackConnector, type CapabilityPackConnectorAuthModel, type CapabilityPackEnvironmentSpec, type CapabilityPackKnowledge, type CapabilityPackScheduledTaskTemplate, type CapabilityPackSkill, type CapabilityPackSkillFile, type CapabilityRuntime, type CapabilitySource, type CapabilityUnavailableReason, type ClientAuthConfig, type ClientConfig, type ClientModel, type ClientSessionEventInput, type CodexAccount, type CodexAccountSwitchedPayload, type CodexAccountsResponse, type CodexConnectPoll, type CodexConnectStart, type CodexConnectionStatus, type CodexRotationSettings, type CodexUsage, type CodexUsageMap, type CodexUsagePayload, type CodexUsageWindow, type CompactSessionContextResult, type CompleteFileUploadResponse, type ComputerUseCapability, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateCapabilityCatalogItemRequest, type CreateCheckoutRequest, type CreateCheckoutResponse, type CreateDocumentBaseRequest, type CreateFileUploadRequest, type CreateFileUploadResponse, type CreateGitHubAppManifestRequest, type CreateGitHubAppManifestResponse, type CreateScheduledTaskRequest, type CreateSessionRequest, type CreateWorkspaceEnvironmentRequest, type CreateWorkspaceRequest, type DesktopConnectionState, type DesktopRfbFactory, type DesktopRfbLike, type DesktopStreamCapability, type DesktopStreamEvent, type DeviceEnrollmentApproveRequest, type DeviceEnrollmentApproveResponse, type DeviceEnrollmentDenyRequest, type DeviceEnrollmentDenyResponse, type DeviceEnrollmentLookupMachine, type DeviceEnrollmentLookupRequest, type DeviceEnrollmentLookupResponse, type DiscoverMcpCapabilitiesResponse, type Document, type DocumentBase, type DocumentSearchRequest, type DocumentSearchResponse, type DocumentSearchResult, type DocumentStatus, type EnableCapabilityRequest, type EnablePackRequest, type EnrollTokenExchangeRequest, type EnrollTokenExchangeResponse, type EnrollmentCredentials, type EnrollmentOs, type EntitlementValue, type Entitlements, type EntitlementsMode, type FetchLike, type FileAsset, type FileDownloadUrlResponse, type FileResourceRef, type FileStatus, type FileSystemCapability, type FileUploadData, type FsChangeKind, type FsChangedPayload, type FsDeleteRequest, type FsDeleteResponse, type FsEncoding, type FsListRequest, type FsListResponse, type FsMkdirRequest, type FsMkdirResponse, type FsMoveRequest, type FsMoveResponse, type FsNodeType, type FsReadRequest, type FsReadResponse, type FsTreeNode, type FsWriteRequest, type FsWriteResponse, type GetPackResponse, type GitCapability, type GitChangedPayload, type GitCommit, type GitDiffHunk, type GitDiffLine, type GitDiffLineType, type GitDiffRequest, type GitDiffResponse, type GitFileDiff, type GitFileStatus, type GitFileStatusCode, type GitHubAppInfo, type GitHubRepositoriesResponse, type GitHubRepository, type GitLogRequest, type GitLogResponse, type GitShowRequest, type GitShowResponse, type GitStatusRequest, type GitStatusResponse, type GoalSpec, KNOWN_PERMISSIONS, KNOWN_USAGE_EVENT_TYPES, type KnownPermission, type KnownSessionEventType, type KnownUsageEventType, type ListApiKeysResponse, type ListPacksResponse, type ListWorkspaceMembersResponse, type MachineKind, type MachineMetricsSeriesResponse, type MachineState, type MachineView, type MachinesResponse, type MetricSample, type MintEnrollTokenRequest, type MintEnrollTokenResponse, OpenGeniApiError, OpenGeniClient, type OpenGeniClientOptions, OpenGeniStreamError, type PackInstallation, type PackInstallationStatus, type Permission, type ProductAccessMode, type ProxySessionEventStreamOptions, type PtyCloseRequest, type PtyOpenRequest, type PtyOpenResponse, type PtyResizeRequest, type PtyWriteRequest, type ReasoningEffort, type RecordingAvailablePayload, type RecordingCapability, type RecordingCodec, type RecordingContentType, type RecordingFailedPayload, type RecordingFailedReason, type RecordingMode, type RecordingStartedPayload, type RegisterCapabilityPackRequest, type RepositoryResourceRef, type ResourceRef, SESSION_EVENT_TYPES, type SandboxBackend, type SandboxCapabilityName, type SandboxCommandOutputDeltaPayload, type SandboxOs, type ScheduledTask, type ScheduledTaskAgentConfig, type ScheduledTaskAgentConfigInput, type ScheduledTaskDayOfWeek, type ScheduledTaskOverlapPolicy, type ScheduledTaskRun, type ScheduledTaskRunMode, type ScheduledTaskRunStatus, type ScheduledTaskScheduleSpec, type ScheduledTaskStatus, type ScheduledTaskTriggerType, type SendMessageInput, type Session, type SessionCapabilities, type SessionEvent, type SessionEventStreamTransport, type SessionEventType, type SessionGoal, type SessionGoalCreatedBy, type SessionGoalStatus, type SessionMcpCredentialUpdateInput, type SessionMcpServerInput, type SessionMcpServerMetadata, type SessionStatus, type SessionStatusChangedPayload, type SessionStructuredCapabilities, type SessionTurn, type SessionTurnSource, type SessionTurnStatus, type SseMessage, type SseReStreamOptions, type SteerMessageResult, type StreamClosedPayload, type StreamConnectionState, type StreamOpenedPayload, type StreamRevokedPayload, type StreamSessionEventsOptions, type StreamUrlRotatedPayload, type SwapActiveSandboxRequest, type SwapActiveSandboxResponse, TTYD_SUBPROTOCOL, type TerminalCapability, type TerminalExecRequest, type TerminalExecResponse, type TerminalPtyExitedPayload, type TerminalPtyOutputDeltaPayload, type TerminalPtyStartedPayload, type ToolRef, TtydClientCommand, TtydServerCommand, type UpdateScheduledTaskRequest, type UpdateSessionGoalRequest, type UpdateSessionRequest, type UpdateSessionTurnRequest, type UpdateWorkspaceEnvironmentRequest, type UpdateWorkspaceMemberRequest, type UpdateWorkspaceRequest, type UploadFileInput, type UsageEvent, type UsageEventType, type UserApprovalDecisionEventInput, type UserInterruptEventInput, type UserMessageEventInput, type ViewerHeartbeatRequest, type ViewerHeartbeatResponse, type ViewerHolder, type Workspace, type WorkspaceEnvironment, type WorkspaceEnvironmentVariableMetadata, type WorkspaceMember, type WorkspaceRegisteredPack, applyUrlRotation, desktopSocketUrl, formatSseEvent, isRetryableStreamError, nextDesktopState, parseSseStream, proxySessionEventStream, resumeSequenceFromRequest, sessionEventsToSseResponse, sessionEventsToSseStream, streamSessionEvents, terminalSocketUrl, ttydAuthFrame, ttydInputFrame, ttydResizeFrame };
|
|
2535
|
+
export { type AccessContext, type AccessGrant, type AccountGrant, type AccountRole, type AcknowledgeStreamRequest, type AcknowledgeStreamResponse, type AddDocumentRequest, type AddWorkspaceMemberRequest, type AgentMessageCompletedPayload, type AgentTextDeltaPayload, type AgentToolCallCreatedPayload, type AgentToolCallOutputPayload, type ApiKey, type AttachViewerRequest, type AttachViewerResponse, type BillingBalance, type BillingEntitlementsResponse, type BillingMode, type BillingSummary, type BillingUsageResponse, type CapabilityCatalogItem, type CapabilityCatalogResponse, type CapabilityInstallation, type CapabilityInstallationStatus, type CapabilityKind, type CapabilityPack, type CapabilityPackConnector, type CapabilityPackConnectorAuthModel, type CapabilityPackEnvironmentSpec, type CapabilityPackKnowledge, type CapabilityPackScheduledTaskTemplate, type CapabilityPackSkill, type CapabilityPackSkillFile, type CapabilityRuntime, type CapabilitySource, type CapabilityUnavailableReason, type ClientAuthConfig, type ClientConfig, type ClientModel, type ClientSessionEventInput, type CodexAccount, type CodexAccountSwitchedPayload, type CodexAccountsResponse, type CodexConnectPoll, type CodexConnectStart, type CodexConnectionStatus, type CodexRotationSettings, type CodexUsage, type CodexUsageMap, type CodexUsagePayload, type CodexUsageWindow, type CompactSessionContextResult, type CompleteFileUploadResponse, type ComputerUseCapability, type ConnectionKind, type ConnectionMetadata, type ConnectionResponse, type ConnectionStatus, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateCapabilityCatalogItemRequest, type CreateCheckoutRequest, type CreateCheckoutResponse, type CreateConnectionRequest, type CreateDocumentBaseRequest, type CreateFileUploadRequest, type CreateFileUploadResponse, type CreateGitHubAppManifestRequest, type CreateGitHubAppManifestResponse, type CreateKnowledgeMemoryRequest, type CreateScheduledTaskRequest, type CreateSessionRequest, type CreateWorkspaceEnvironmentRequest, type CreateWorkspaceRequest, type DesktopConnectionState, type DesktopRfbFactory, type DesktopRfbLike, type DesktopStreamCapability, type DesktopStreamEvent, type DeviceEnrollmentApproveRequest, type DeviceEnrollmentApproveResponse, type DeviceEnrollmentDenyRequest, type DeviceEnrollmentDenyResponse, type DeviceEnrollmentLookupMachine, type DeviceEnrollmentLookupRequest, type DeviceEnrollmentLookupResponse, type DiscoverMcpCapabilitiesResponse, type Document, type DocumentBase, type DocumentSearchMode, type DocumentSearchRequest, type DocumentSearchResponse, type DocumentSearchResult, type DocumentStatus, type EnableCapabilityRequest, type EnablePackRequest, type EnrollTokenExchangeRequest, type EnrollTokenExchangeResponse, type EnrollmentCredentials, type EnrollmentOs, type EntitlementValue, type Entitlements, type EntitlementsMode, type FetchLike, type FileAsset, type FileDownloadUrlResponse, type FileResourceRef, type FileStatus, type FileSystemCapability, type FileUploadData, type FsChangeKind, type FsChangedPayload, type FsDeleteRequest, type FsDeleteResponse, type FsEncoding, type FsListRequest, type FsListResponse, type FsMkdirRequest, type FsMkdirResponse, type FsMoveRequest, type FsMoveResponse, type FsNodeType, type FsReadRequest, type FsReadResponse, type FsTreeNode, type FsWriteRequest, type FsWriteResponse, type GetPackResponse, type GitCapability, type GitChangedPayload, type GitCommit, type GitDiffHunk, type GitDiffLine, type GitDiffLineType, type GitDiffRequest, type GitDiffResponse, type GitFileDiff, type GitFileStatus, type GitFileStatusCode, type GitHubAppInfo, type GitHubRepositoriesResponse, type GitHubRepository, type GitLogRequest, type GitLogResponse, type GitShowRequest, type GitShowResponse, type GitStatusRequest, type GitStatusResponse, type GoalSpec, type IntegrationClientMetadata, KNOWN_PERMISSIONS, KNOWN_USAGE_EVENT_TYPES, type KnowledgeMemory, type KnowledgeMemoryKind, type KnowledgeMemorySearchRequest, type KnowledgeMemoryStatus, type KnowledgeSourceKind, type KnowledgeSourceRef, type KnownPermission, type KnownSessionEventType, type KnownUsageEventType, type ListApiKeysResponse, type ListConnectionsResponse, type ListPacksResponse, type ListWorkspaceMembersResponse, type MachineKind, type MachineMetricsSeriesResponse, type MachineState, type MachineView, type MachinesResponse, type McpServerConnectionRef, type MetricSample, type MintEnrollTokenRequest, type MintEnrollTokenResponse, type OAuthStartRequest, type OAuthStartResponse, OpenGeniApiError, OpenGeniClient, type OpenGeniClientOptions, OpenGeniStreamError, type PackInstallation, type PackInstallationStatus, type Permission, type ProductAccessMode, type ProxySessionEventStreamOptions, type PtyCloseRequest, type PtyOpenRequest, type PtyOpenResponse, type PtyResizeRequest, type PtyWriteRequest, type ReasoningEffort, type RecordingAvailablePayload, type RecordingCapability, type RecordingCodec, type RecordingContentType, type RecordingFailedPayload, type RecordingFailedReason, type RecordingMode, type RecordingStartedPayload, type RegisterCapabilityPackRequest, type RepositoryResourceRef, type ResourceRef, SESSION_EVENT_TYPES, type SandboxBackend, type SandboxCapabilityName, type SandboxCommandOutputDeltaPayload, type SandboxOs, type ScheduledTask, type ScheduledTaskAgentConfig, type ScheduledTaskAgentConfigInput, type ScheduledTaskDayOfWeek, type ScheduledTaskOverlapPolicy, type ScheduledTaskRun, type ScheduledTaskRunMode, type ScheduledTaskRunStatus, type ScheduledTaskScheduleSpec, type ScheduledTaskStatus, type ScheduledTaskTriggerType, type SendMessageInput, type Session, type SessionCapabilities, type SessionEvent, type SessionEventStreamTransport, type SessionEventType, type SessionGoal, type SessionGoalCreatedBy, type SessionGoalStatus, type SessionMcpCredentialUpdateInput, type SessionMcpServerInput, type SessionMcpServerMetadata, type SessionStatus, type SessionStatusChangedPayload, type SessionStructuredCapabilities, type SessionTurn, type SessionTurnSource, type SessionTurnStatus, type SseMessage, type SseReStreamOptions, type SteerMessageResult, type StreamClosedPayload, type StreamConnectionState, type StreamOpenedPayload, type StreamRevokedPayload, type StreamSessionEventsOptions, type StreamUrlRotatedPayload, type SwapActiveSandboxRequest, type SwapActiveSandboxResponse, TTYD_SUBPROTOCOL, type TerminalCapability, type TerminalExecRequest, type TerminalExecResponse, type TerminalPtyExitedPayload, type TerminalPtyOutputDeltaPayload, type TerminalPtyStartedPayload, type ToolAuthNeededPayload, type ToolRef, TtydClientCommand, TtydServerCommand, type UpdateConnectionRequest, type UpdateKnowledgeMemoryRequest, type UpdateScheduledTaskRequest, type UpdateSessionGoalRequest, type UpdateSessionRequest, type UpdateSessionTurnRequest, type UpdateWorkspaceEnvironmentRequest, type UpdateWorkspaceMemberRequest, type UpdateWorkspaceRequest, type UploadFileInput, type UsageEvent, type UsageEventType, type UserApprovalDecisionEventInput, type UserInterruptEventInput, type UserMessageEventInput, type ViewerHeartbeatRequest, type ViewerHeartbeatResponse, type ViewerHolder, type Workspace, type WorkspaceEnvironment, type WorkspaceEnvironmentVariableMetadata, type WorkspaceMember, type WorkspaceRegisteredPack, applyUrlRotation, desktopSocketUrl, formatSseEvent, isRetryableStreamError, nextDesktopState, parseSseStream, proxySessionEventStream, resumeSequenceFromRequest, sessionEventsToSseResponse, sessionEventsToSseStream, streamSessionEvents, terminalSocketUrl, ttydAuthFrame, ttydInputFrame, ttydResizeFrame };
|
package/dist/index.js
CHANGED
|
@@ -866,6 +866,28 @@ var OpenGeniClient = class {
|
|
|
866
866
|
request
|
|
867
867
|
);
|
|
868
868
|
}
|
|
869
|
+
async searchKnowledge(workspaceId, request) {
|
|
870
|
+
return await this.requestJson("POST", `/v1/workspaces/${workspaceId}/knowledge/search`, request);
|
|
871
|
+
}
|
|
872
|
+
async listKnowledgeMemories(workspaceId, request = {}) {
|
|
873
|
+
const params = new URLSearchParams();
|
|
874
|
+
if (request.query) params.set("query", request.query);
|
|
875
|
+
if (request.status) params.set("status", request.status);
|
|
876
|
+
if (request.kind) params.set("kind", request.kind);
|
|
877
|
+
if (request.scope) params.set("scope", request.scope);
|
|
878
|
+
if (request.limit) params.set("limit", String(request.limit));
|
|
879
|
+
const query = params.toString();
|
|
880
|
+
return await this.requestJson("GET", `/v1/workspaces/${workspaceId}/knowledge/memories${query ? `?${query}` : ""}`);
|
|
881
|
+
}
|
|
882
|
+
async getKnowledgeMemory(workspaceId, memoryId) {
|
|
883
|
+
return await this.requestJson("GET", `/v1/workspaces/${workspaceId}/knowledge/memories/${memoryId}`);
|
|
884
|
+
}
|
|
885
|
+
async createKnowledgeMemory(workspaceId, request) {
|
|
886
|
+
return await this.requestJson("POST", `/v1/workspaces/${workspaceId}/knowledge/memories`, request);
|
|
887
|
+
}
|
|
888
|
+
async updateKnowledgeMemory(workspaceId, memoryId, request) {
|
|
889
|
+
return await this.requestJson("PATCH", `/v1/workspaces/${workspaceId}/knowledge/memories/${memoryId}`, request);
|
|
890
|
+
}
|
|
869
891
|
// --- Capability packs ------------------------------------------------------------------
|
|
870
892
|
/** Built-in + registered packs, with the workspace's installations. */
|
|
871
893
|
async listPacks(workspaceId) {
|
|
@@ -1299,6 +1321,7 @@ var SESSION_EVENT_TYPES = [
|
|
|
1299
1321
|
"agent.reasoning.delta",
|
|
1300
1322
|
"agent.toolCall.created",
|
|
1301
1323
|
"agent.toolCall.output",
|
|
1324
|
+
"tool.auth_needed",
|
|
1302
1325
|
"agent.updated",
|
|
1303
1326
|
"sandbox.operation.started",
|
|
1304
1327
|
"sandbox.operation.completed",
|
|
@@ -1362,9 +1385,12 @@ var KNOWN_PERMISSIONS = [
|
|
|
1362
1385
|
"github:manage",
|
|
1363
1386
|
"github:use",
|
|
1364
1387
|
"api_keys:manage",
|
|
1388
|
+
"connections:read",
|
|
1389
|
+
"connections:write",
|
|
1365
1390
|
"environments:manage",
|
|
1366
1391
|
"environments:use",
|
|
1367
1392
|
"mcp_servers:attach",
|
|
1393
|
+
"toolspace:call",
|
|
1368
1394
|
"goals:manage",
|
|
1369
1395
|
"enrollments:read",
|
|
1370
1396
|
"enrollments:manage"
|