@proteos/sdk 0.85.0 → 0.87.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/{chunk-Z773P4RO.cjs → chunk-4BBHU3XA.cjs} +36 -86
- package/dist/chunk-4BBHU3XA.cjs.map +1 -0
- package/dist/{chunk-C5642XOH.js → chunk-KX4VIMIJ.js} +36 -86
- package/dist/chunk-KX4VIMIJ.js.map +1 -0
- package/dist/index.cjs +310 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +489 -39
- package/dist/index.d.ts +489 -39
- package/dist/index.js +188 -56
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +96 -96
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.js +1 -1
- package/dist/{types-CWj1h9l0.d.cts → types-D38dRFU7.d.cts} +7 -1
- package/dist/{types-CWj1h9l0.d.ts → types-D38dRFU7.d.ts} +7 -1
- package/package.json +1 -1
- package/src/agent/index.ts +28 -0
- package/src/agent/mcp-servers.ts +0 -1
- package/src/agent/model-types.ts +23 -1
- package/src/agent/models.ts +16 -3
- package/src/agent/prompts.ts +0 -1
- package/src/agent/session-types.ts +351 -12
- package/src/agent/sessions.ts +108 -1
- package/src/agent/skills.ts +4 -2
- package/src/agent/tools.ts +0 -1
- package/src/agent/toolsets.ts +17 -0
- package/src/agent/types.ts +34 -0
- package/src/auth/shares.ts +7 -2
- package/src/auth/types.ts +12 -0
- package/src/client.ts +1 -0
- package/src/connector/index.ts +26 -7
- package/src/conversation/index.ts +8 -3
- package/src/conversation/types.ts +15 -0
- package/src/events/index.ts +8 -6
- package/src/index.ts +31 -1
- package/src/knowledge/index.ts +4 -5
- package/src/knowledge/spaces.ts +14 -0
- package/src/knowledge/types.ts +13 -0
- package/src/meta/index.ts +7 -7
- package/src/meta/layout/control-registry.json +24 -82
- package/src/meta/list-extensions.ts +1 -3
- package/src/meta/page-extensions.ts +2 -4
- package/src/meta/types.ts +10 -2
- package/src/scheduling/index.ts +105 -24
- package/src/storage/files.ts +1 -4
- package/src/types/options.ts +6 -0
- package/src/workflow/types.ts +2 -2
- package/dist/chunk-C5642XOH.js.map +0 -1
- package/dist/chunk-Z773P4RO.cjs.map +0 -1
package/src/agent/toolsets.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
} from './types.js'
|
|
11
11
|
|
|
12
12
|
const TOOLSETS_BASE_PATH = '/agents/v1/toolsets'
|
|
13
|
+
const PLATFORM_TOOLS_PATH = '/agents/v1/platform-tools'
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Service for managing Toolsets — the hardcoded platform toolsets (read-only)
|
|
@@ -29,6 +30,14 @@ export interface ToolsetService {
|
|
|
29
30
|
* @throws {ProteosError} 404.
|
|
30
31
|
*/
|
|
31
32
|
listTools(key: string): Promise<ToolsetToolSummary[]>
|
|
33
|
+
/**
|
|
34
|
+
* Lists every platform tool once, each with the platform toolset that serves
|
|
35
|
+
* it. An agent may list any of these names in its `tools` as it is: no Tool
|
|
36
|
+
* of that key is needed. A Tool the org saves under the same key replaces the
|
|
37
|
+
* platform tool for its agents. A name several toolsets serve is the first
|
|
38
|
+
* one's, in the order `list({ kind: 'platform' })` returns them.
|
|
39
|
+
*/
|
|
40
|
+
listPlatformTools(): Promise<ToolsetToolSummary[]>
|
|
32
41
|
/** Creates a custom toolset. @throws {ProteosError} 400/409. */
|
|
33
42
|
create(request: CreateToolsetRequest): Promise<Toolset>
|
|
34
43
|
/** Fully replaces a custom toolset's definition. @throws {ProteosError} 404/400. */
|
|
@@ -62,6 +71,14 @@ export class ToolsetServiceImpl implements ToolsetService {
|
|
|
62
71
|
return response.data
|
|
63
72
|
}
|
|
64
73
|
|
|
74
|
+
async listPlatformTools(): Promise<ToolsetToolSummary[]> {
|
|
75
|
+
const response = await this.client.request<{ data: ToolsetToolSummary[] }>(
|
|
76
|
+
'GET',
|
|
77
|
+
PLATFORM_TOOLS_PATH,
|
|
78
|
+
)
|
|
79
|
+
return response.data
|
|
80
|
+
}
|
|
81
|
+
|
|
65
82
|
async create(request: CreateToolsetRequest): Promise<Toolset> {
|
|
66
83
|
return this.client.request<Toolset>('POST', TOOLSETS_BASE_PATH, request)
|
|
67
84
|
}
|
package/src/agent/types.ts
CHANGED
|
@@ -44,6 +44,16 @@ export interface ModelConfig {
|
|
|
44
44
|
thinking?: boolean
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* How an agent's sessions run. `durable` runs them on a provider that keeps a
|
|
49
|
+
* turn going through restarts and gives the session a sandbox (long-running
|
|
50
|
+
* work; Anthropic Managed Agents today). `embedded` runs the loop inside the
|
|
51
|
+
* agent service: replies stream while the model writes them, and there is no
|
|
52
|
+
* sandbox. The value names the kind of runtime, not the vendor behind it, and
|
|
53
|
+
* `embedded` is about where the loop runs, not about where the chat is shown.
|
|
54
|
+
*/
|
|
55
|
+
export type AgentRuntime = 'durable' | 'embedded'
|
|
56
|
+
|
|
47
57
|
/**
|
|
48
58
|
* A configured persona: a system prompt + model config + the skills, tools,
|
|
49
59
|
* sub-agents and MCP servers it can use. All references are by key (immutable):
|
|
@@ -75,6 +85,14 @@ export interface Agent extends AuditFields {
|
|
|
75
85
|
* navigate / open_record.
|
|
76
86
|
*/
|
|
77
87
|
has_workspace: boolean
|
|
88
|
+
/**
|
|
89
|
+
* Keeps per-person memory: the agent remembers how each person likes to work
|
|
90
|
+
* and where their last session left off, as notes in that person's own
|
|
91
|
+
* (personal) knowledge space.
|
|
92
|
+
*/
|
|
93
|
+
has_memory: boolean
|
|
94
|
+
/** What runs this agent's sessions. A session keeps the runtime it was created with. */
|
|
95
|
+
runtime: AgentRuntime
|
|
78
96
|
version: number
|
|
79
97
|
}
|
|
80
98
|
|
|
@@ -92,6 +110,9 @@ export interface CreateAgentRequest {
|
|
|
92
110
|
toolsets?: string[]
|
|
93
111
|
is_org_default?: boolean
|
|
94
112
|
has_workspace?: boolean
|
|
113
|
+
has_memory?: boolean
|
|
114
|
+
/** Defaults to `durable`. */
|
|
115
|
+
runtime?: AgentRuntime
|
|
95
116
|
}
|
|
96
117
|
|
|
97
118
|
export interface UpdateAgentRequest {
|
|
@@ -107,6 +128,8 @@ export interface UpdateAgentRequest {
|
|
|
107
128
|
toolsets?: string[]
|
|
108
129
|
is_org_default?: boolean
|
|
109
130
|
has_workspace?: boolean
|
|
131
|
+
has_memory?: boolean
|
|
132
|
+
runtime?: AgentRuntime
|
|
110
133
|
}
|
|
111
134
|
|
|
112
135
|
export type ListAgentsOptions = AgentResourceListOptions
|
|
@@ -280,6 +303,11 @@ export interface Tool extends AuditFields {
|
|
|
280
303
|
kind: ToolKind
|
|
281
304
|
input_schema: Attribute[]
|
|
282
305
|
binding?: ToolBinding | null
|
|
306
|
+
/**
|
|
307
|
+
* Whether calling the tool is known to change nothing, so that its call may run
|
|
308
|
+
* alongside others. Set on platform tools the platform marks so; absent otherwise.
|
|
309
|
+
*/
|
|
310
|
+
is_read_only?: boolean
|
|
283
311
|
version: number
|
|
284
312
|
}
|
|
285
313
|
|
|
@@ -366,6 +394,12 @@ export interface ToolsetToolSummary {
|
|
|
366
394
|
name: string
|
|
367
395
|
title?: string
|
|
368
396
|
description?: string
|
|
397
|
+
/**
|
|
398
|
+
* The platform toolset that serves the tool. Set where the platform's tools
|
|
399
|
+
* are listed together (`toolsets.listPlatformTools`); absent in the list of
|
|
400
|
+
* one toolset, which the request already names.
|
|
401
|
+
*/
|
|
402
|
+
toolset?: string
|
|
369
403
|
}
|
|
370
404
|
|
|
371
405
|
// ---------------------------------------------------------------------------
|
package/src/auth/shares.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProteosClient } from '../client.js'
|
|
2
|
-
import type { PrincipalRef } from '../meta/types.js'
|
|
3
2
|
import { ProteosError } from '../errors.js'
|
|
3
|
+
import type { PrincipalRef } from '../meta/types.js'
|
|
4
4
|
import type { SharePermission, ShareRequest, ShareRow } from './types.js'
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -43,7 +43,12 @@ const PLATFORM_ENTITY_SERVICE: Readonly<Record<string, string>> = {
|
|
|
43
43
|
* the endpoint yet must fail with a clear message rather than a bare 404 that
|
|
44
44
|
* reads like the record does not exist.
|
|
45
45
|
*/
|
|
46
|
-
const SERVICES_WITH_SHARING: ReadonlySet<string> = new Set([
|
|
46
|
+
const SERVICES_WITH_SHARING: ReadonlySet<string> = new Set([
|
|
47
|
+
'/data',
|
|
48
|
+
'/knowledge',
|
|
49
|
+
'/agents',
|
|
50
|
+
'/conversations',
|
|
51
|
+
])
|
|
47
52
|
|
|
48
53
|
/** Records live in data-service; user-defined entities are the unlisted majority. */
|
|
49
54
|
const DEFAULT_SERVICE = '/data'
|
package/src/auth/types.ts
CHANGED
|
@@ -270,6 +270,14 @@ export interface Profile extends AuditFields {
|
|
|
270
270
|
default_app_slug: string
|
|
271
271
|
/** App-switcher allowlist; empty = every app in the org. */
|
|
272
272
|
app_slugs: string[]
|
|
273
|
+
/**
|
|
274
|
+
* Platform-feature allowlist: the areas (`config`, `reports`, `knowledge`,
|
|
275
|
+
* `calendar`, `conversations_own`, `conversations_all`) and Configuration
|
|
276
|
+
* parts (`config_<part>`) the profile shows; empty = every feature,
|
|
277
|
+
* `['none']` = no feature (apps only; `none` cannot be combined). Stored
|
|
278
|
+
* canonical: `conversations_all` ⇒ `conversations_own`, `config_*` ⇒ `config`.
|
|
279
|
+
*/
|
|
280
|
+
platform_features: string[]
|
|
273
281
|
}
|
|
274
282
|
|
|
275
283
|
export const ProfileSchema = AuditFieldsSchema.extend({
|
|
@@ -280,6 +288,8 @@ export const ProfileSchema = AuditFieldsSchema.extend({
|
|
|
280
288
|
module_slug: z.string(),
|
|
281
289
|
default_app_slug: z.string(),
|
|
282
290
|
app_slugs: z.array(z.string()),
|
|
291
|
+
// Optional for responses from servers that predate the column.
|
|
292
|
+
platform_features: z.array(z.string()).default([]),
|
|
283
293
|
})
|
|
284
294
|
|
|
285
295
|
export interface CreateProfileRequest {
|
|
@@ -289,6 +299,7 @@ export interface CreateProfileRequest {
|
|
|
289
299
|
module_slug?: string
|
|
290
300
|
default_app_slug?: string
|
|
291
301
|
app_slugs?: string[]
|
|
302
|
+
platform_features?: string[]
|
|
292
303
|
}
|
|
293
304
|
|
|
294
305
|
export interface UpdateProfileRequest {
|
|
@@ -297,6 +308,7 @@ export interface UpdateProfileRequest {
|
|
|
297
308
|
module_slug?: string
|
|
298
309
|
default_app_slug?: string
|
|
299
310
|
app_slugs?: string[]
|
|
311
|
+
platform_features?: string[]
|
|
300
312
|
}
|
|
301
313
|
|
|
302
314
|
export interface ListProfilesOptions extends AuthListOptions {
|
package/src/client.ts
CHANGED
package/src/connector/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ProteosClient } from '../client.js'
|
|
2
2
|
import type {
|
|
3
|
+
ConnectionTokenResponse,
|
|
3
4
|
Connector,
|
|
4
5
|
ConnectorConnection,
|
|
5
6
|
ConnectorMethod,
|
|
6
|
-
ConnectionTokenResponse,
|
|
7
7
|
CreateConnectorConnectionRequest,
|
|
8
8
|
InstallConnectorConnectionResponse,
|
|
9
9
|
InvokeMethodResponse,
|
|
@@ -54,7 +54,10 @@ class ConnectorCatalogServiceImpl implements ConnectorCatalogService {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
get(key: string): Promise<Connector> {
|
|
57
|
-
return this.client.request(
|
|
57
|
+
return this.client.request(
|
|
58
|
+
'GET',
|
|
59
|
+
`${CONNECTOR_BASE_PATH}/connectors/${encodeURIComponent(key)}`,
|
|
60
|
+
)
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
async listMethods(key: string): Promise<ConnectorMethod[]> {
|
|
@@ -86,7 +89,10 @@ class ConnectorConnectionServiceImpl implements ConnectorConnectionService {
|
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
get(id: string): Promise<ConnectorConnection> {
|
|
89
|
-
return this.client.request(
|
|
92
|
+
return this.client.request(
|
|
93
|
+
'GET',
|
|
94
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}`,
|
|
95
|
+
)
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
create(request: CreateConnectorConnectionRequest): Promise<ConnectorConnection> {
|
|
@@ -94,19 +100,32 @@ class ConnectorConnectionServiceImpl implements ConnectorConnectionService {
|
|
|
94
100
|
}
|
|
95
101
|
|
|
96
102
|
update(id: string, request: UpdateConnectorConnectionRequest): Promise<ConnectorConnection> {
|
|
97
|
-
return this.client.request(
|
|
103
|
+
return this.client.request(
|
|
104
|
+
'PATCH',
|
|
105
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}`,
|
|
106
|
+
request,
|
|
107
|
+
)
|
|
98
108
|
}
|
|
99
109
|
|
|
100
110
|
async delete(id: string): Promise<void> {
|
|
101
|
-
await this.client.request(
|
|
111
|
+
await this.client.request(
|
|
112
|
+
'DELETE',
|
|
113
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}`,
|
|
114
|
+
)
|
|
102
115
|
}
|
|
103
116
|
|
|
104
117
|
install(id: string): Promise<InstallConnectorConnectionResponse> {
|
|
105
|
-
return this.client.request(
|
|
118
|
+
return this.client.request(
|
|
119
|
+
'POST',
|
|
120
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}/install`,
|
|
121
|
+
)
|
|
106
122
|
}
|
|
107
123
|
|
|
108
124
|
token(id: string): Promise<ConnectionTokenResponse> {
|
|
109
|
-
return this.client.request(
|
|
125
|
+
return this.client.request(
|
|
126
|
+
'POST',
|
|
127
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}/token`,
|
|
128
|
+
)
|
|
110
129
|
}
|
|
111
130
|
|
|
112
131
|
async invokeMethod<T = unknown>(id: string, method: string, params: unknown = {}): Promise<T> {
|
|
@@ -124,6 +124,7 @@ import type {
|
|
|
124
124
|
ToneProfileSetup,
|
|
125
125
|
Transcription,
|
|
126
126
|
UnreadCounts,
|
|
127
|
+
UnreadCountsQuery,
|
|
127
128
|
UpdateAgentListenerRequest,
|
|
128
129
|
UpdateConnectionRequest,
|
|
129
130
|
UpdateContactGroupRequest,
|
|
@@ -785,7 +786,7 @@ export interface ConversationService {
|
|
|
785
786
|
/** Remove the marker — the conversation reads as unread again. */
|
|
786
787
|
markUnread(id: string): Promise<void>
|
|
787
788
|
/** Unread-conversation counts for the requesting user (envelope + badges). */
|
|
788
|
-
unreadCounts(): Promise<UnreadCounts>
|
|
789
|
+
unreadCounts(query?: UnreadCountsQuery): Promise<UnreadCounts>
|
|
789
790
|
}
|
|
790
791
|
|
|
791
792
|
class ConversationServiceImpl implements ConversationService {
|
|
@@ -853,8 +854,12 @@ class ConversationServiceImpl implements ConversationService {
|
|
|
853
854
|
)
|
|
854
855
|
}
|
|
855
856
|
|
|
856
|
-
unreadCounts(): Promise<UnreadCounts> {
|
|
857
|
-
return this.client.
|
|
857
|
+
unreadCounts(query?: UnreadCountsQuery): Promise<UnreadCounts> {
|
|
858
|
+
return this.client.requestWithQuery(
|
|
859
|
+
'GET',
|
|
860
|
+
`${CONVERSATION_BASE_PATH}/conversations/unread-counts`,
|
|
861
|
+
query,
|
|
862
|
+
)
|
|
858
863
|
}
|
|
859
864
|
}
|
|
860
865
|
|
|
@@ -2217,6 +2217,21 @@ export interface ListConversationsQuery extends PaginationQuery {
|
|
|
2217
2217
|
tag_key?: string
|
|
2218
2218
|
/** With `tag_key`: only conversations whose tag has this value. */
|
|
2219
2219
|
tag_value?: string
|
|
2220
|
+
/**
|
|
2221
|
+
* The hub's Mine / All axis. `own`: threads on the caller's own
|
|
2222
|
+
* connections and the org-wide ones (on a shared sending connection only
|
|
2223
|
+
* threads the caller is in), plus connection-less threads they created.
|
|
2224
|
+
* `all` (the default when omitted): everything the caller may read.
|
|
2225
|
+
*/
|
|
2226
|
+
conversation_scope?: ConversationScope
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/** `?conversation_scope=` values — see ListConversationsQuery. */
|
|
2230
|
+
export type ConversationScope = 'own' | 'all'
|
|
2231
|
+
|
|
2232
|
+
/** Unread counts follow the same Mine / All axis as the list. */
|
|
2233
|
+
export interface UnreadCountsQuery {
|
|
2234
|
+
conversation_scope?: ConversationScope
|
|
2220
2235
|
}
|
|
2221
2236
|
|
|
2222
2237
|
/**
|
package/src/events/index.ts
CHANGED
|
@@ -68,15 +68,17 @@ class TopicServiceImpl implements TopicService {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
async events(topic: string, options: ListEventsOptions = {}): Promise<PlatformEvent[]> {
|
|
71
|
-
const response = await this.client.requestWithQuery<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
)
|
|
71
|
+
const response = await this.client.requestWithQuery<
|
|
72
|
+
{ data: PlatformEvent[] },
|
|
73
|
+
ListEventsOptions
|
|
74
|
+
>('GET', `${EVENTS_BASE_PATH}/topics/${encodeURIComponent(topic)}/events`, options)
|
|
76
75
|
return response.data ?? []
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
async *tail(
|
|
78
|
+
async *tail(
|
|
79
|
+
topic: string,
|
|
80
|
+
options: TailOptions = {},
|
|
81
|
+
): AsyncGenerator<PlatformEvent, void, unknown> {
|
|
80
82
|
const path = `${EVENTS_BASE_PATH}/topics/${encodeURIComponent(topic)}/events?follow=true`
|
|
81
83
|
let body: ReadableStream<Uint8Array> | null
|
|
82
84
|
try {
|
package/src/index.ts
CHANGED
|
@@ -41,8 +41,11 @@ export type {
|
|
|
41
41
|
AgentArtifactsPayload,
|
|
42
42
|
AgentMessagePayload,
|
|
43
43
|
AgentResourceListOptions,
|
|
44
|
+
AgentRuntime,
|
|
44
45
|
AgentService,
|
|
45
46
|
AppendEventRequest,
|
|
47
|
+
AppendSpeechRequest,
|
|
48
|
+
AwaitingToolUse,
|
|
46
49
|
BooleanAnswer,
|
|
47
50
|
BooleanCriteria,
|
|
48
51
|
BooleanQuestion,
|
|
@@ -65,9 +68,13 @@ export type {
|
|
|
65
68
|
DecisionQuestions,
|
|
66
69
|
DecisionQuestionType,
|
|
67
70
|
DecisionResult,
|
|
71
|
+
DelegatedSessionUpdatedPayload,
|
|
72
|
+
DeltaBoundaryPayload,
|
|
73
|
+
DeltaEventType,
|
|
68
74
|
DependentAgent,
|
|
69
75
|
DependentSyncResult,
|
|
70
76
|
EmptyPayload,
|
|
77
|
+
EndVoiceRequest,
|
|
71
78
|
ErrorPayload,
|
|
72
79
|
EventType,
|
|
73
80
|
FileBlock,
|
|
@@ -88,7 +95,10 @@ export type {
|
|
|
88
95
|
McpServerOAuth,
|
|
89
96
|
McpServerService,
|
|
90
97
|
McpToolSummary,
|
|
98
|
+
MessageDeltaPayload,
|
|
91
99
|
ModelConfig,
|
|
100
|
+
ModelInfo,
|
|
101
|
+
ModelProviderName,
|
|
92
102
|
ModelRequestEndPayload,
|
|
93
103
|
ModelRequestStartPayload,
|
|
94
104
|
ModelService,
|
|
@@ -99,24 +109,34 @@ export type {
|
|
|
99
109
|
PromptService,
|
|
100
110
|
PromptVersion,
|
|
101
111
|
QueryBinding,
|
|
112
|
+
ReasoningDeltaPayload,
|
|
102
113
|
ReasoningPayload,
|
|
103
114
|
ResultBlock,
|
|
104
115
|
ScoreAnswer,
|
|
105
116
|
ScoreQuestion,
|
|
106
117
|
Session,
|
|
118
|
+
SessionDeltaEntry,
|
|
119
|
+
SessionDeltaFrame,
|
|
120
|
+
SessionDeltaStreamOptions,
|
|
107
121
|
SessionEvent,
|
|
108
122
|
SessionEventEnvelope,
|
|
109
123
|
SessionEventsOptions,
|
|
110
124
|
SessionIdlePayload,
|
|
125
|
+
SessionRunningPayload,
|
|
111
126
|
SessionService,
|
|
112
127
|
SessionStatus,
|
|
113
128
|
SessionStreamOptions,
|
|
129
|
+
SessionToolKind,
|
|
114
130
|
SessionUpdatedPayload,
|
|
115
131
|
Skill,
|
|
116
132
|
SkillBundle,
|
|
117
133
|
SkillService,
|
|
118
134
|
SkillVersion,
|
|
135
|
+
SpeechPayload,
|
|
136
|
+
SpeechSegment,
|
|
119
137
|
StartMcpOAuthResponse,
|
|
138
|
+
StartVoiceRequest,
|
|
139
|
+
StartVoiceResponse,
|
|
120
140
|
StopReason,
|
|
121
141
|
StructuredText,
|
|
122
142
|
TextBlock,
|
|
@@ -130,7 +150,9 @@ export type {
|
|
|
130
150
|
ToolsetKind,
|
|
131
151
|
ToolsetService,
|
|
132
152
|
ToolsetToolSummary,
|
|
153
|
+
ToolUseDeltaPayload,
|
|
133
154
|
ToolUsePayload,
|
|
155
|
+
ToolUseStartPayload,
|
|
134
156
|
Turn,
|
|
135
157
|
UpdateAgentRequest,
|
|
136
158
|
UpdateMcpServerRequest,
|
|
@@ -138,8 +160,13 @@ export type {
|
|
|
138
160
|
UpdateToolRequest,
|
|
139
161
|
UpdateToolsetRequest,
|
|
140
162
|
UserMessagePayload,
|
|
163
|
+
VoiceEndedPayload,
|
|
164
|
+
VoiceEndReason,
|
|
165
|
+
VoiceRequestPayload,
|
|
166
|
+
VoiceSession,
|
|
167
|
+
VoiceStartedPayload,
|
|
141
168
|
} from './agent/index.js'
|
|
142
|
-
export { AgentClient } from './agent/index.js'
|
|
169
|
+
export { AgentClient, isDeltaFrame } from './agent/index.js'
|
|
143
170
|
// Auth types (re-exported from auth/index.ts for convenience)
|
|
144
171
|
export type {
|
|
145
172
|
AddTeamMemberRequest,
|
|
@@ -339,6 +366,7 @@ export type {
|
|
|
339
366
|
ConversationPhase,
|
|
340
367
|
ConversationPhaseProgress,
|
|
341
368
|
ConversationPhaseStatus,
|
|
369
|
+
ConversationScope,
|
|
342
370
|
ConversationService,
|
|
343
371
|
ConversationStatus,
|
|
344
372
|
ConversationSummaryStatus,
|
|
@@ -521,6 +549,7 @@ export type {
|
|
|
521
549
|
TwilioPhoneSettings,
|
|
522
550
|
TwilioPhoneVoicemailSettings,
|
|
523
551
|
UnreadCounts,
|
|
552
|
+
UnreadCountsQuery,
|
|
524
553
|
UpdateAgentListenerRequest,
|
|
525
554
|
UpdateConnectionRequest,
|
|
526
555
|
UpdateContactGroupRequest,
|
|
@@ -737,6 +766,7 @@ export type {
|
|
|
737
766
|
SearchContentRequest,
|
|
738
767
|
SearchContentResponse,
|
|
739
768
|
SearchNodesRequest,
|
|
769
|
+
SpaceScope,
|
|
740
770
|
SpaceService,
|
|
741
771
|
UpdateLabelRequest,
|
|
742
772
|
UpdateLinkRequest,
|
package/src/knowledge/index.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { type GraphService, GraphServiceImpl } from './graph.js'
|
|
|
3
3
|
import { type LabelService, LabelServiceImpl } from './labels.js'
|
|
4
4
|
import { type LinkService, LinkServiceImpl } from './links.js'
|
|
5
5
|
import { type NodeService, NodeServiceImpl } from './nodes.js'
|
|
6
|
-
import { type SpaceService, SpaceServiceImpl } from './spaces.js'
|
|
7
6
|
import { type RecordLinkService, RecordLinkServiceImpl } from './record-links.js'
|
|
7
|
+
import { type SpaceService, SpaceServiceImpl } from './spaces.js'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Facade for the knowledge-service (graph-native knowledge base: nodes, typed
|
|
@@ -47,8 +47,8 @@ export type { GraphService } from './graph.js'
|
|
|
47
47
|
export type { LabelService } from './labels.js'
|
|
48
48
|
export type { LinkService } from './links.js'
|
|
49
49
|
export type { NodeService } from './nodes.js'
|
|
50
|
-
export type { SpaceService } from './spaces.js'
|
|
51
50
|
export type { RecordLinkService } from './record-links.js'
|
|
51
|
+
export type { SpaceService } from './spaces.js'
|
|
52
52
|
|
|
53
53
|
// Re-export types
|
|
54
54
|
export type {
|
|
@@ -96,16 +96,14 @@ export type {
|
|
|
96
96
|
SearchContentRequest,
|
|
97
97
|
SearchContentResponse,
|
|
98
98
|
SearchNodesRequest,
|
|
99
|
+
SpaceScope,
|
|
99
100
|
UpdateLabelRequest,
|
|
100
101
|
UpdateLinkRequest,
|
|
101
102
|
UpdateNodeRequest,
|
|
102
103
|
UpdateSpaceRequest,
|
|
103
104
|
WriteContentResponse,
|
|
104
105
|
} from './types.js'
|
|
105
|
-
|
|
106
106
|
// Re-export the reserved space-filter sentinel (a value, not a type).
|
|
107
|
-
export { UNASSIGNED_SPACE_SLUG } from './types.js'
|
|
108
|
-
|
|
109
107
|
// Re-export Zod schemas
|
|
110
108
|
export {
|
|
111
109
|
KnowledgeLabelSchema,
|
|
@@ -116,4 +114,5 @@ export {
|
|
|
116
114
|
KnowledgeNodeSearchResultSchema,
|
|
117
115
|
KnowledgeRecordLinkSchema,
|
|
118
116
|
NodeNeighborhoodSchema,
|
|
117
|
+
UNASSIGNED_SPACE_SLUG,
|
|
119
118
|
} from './types.js'
|
package/src/knowledge/spaces.ts
CHANGED
|
@@ -37,6 +37,13 @@ export interface SpaceService {
|
|
|
37
37
|
/** Creates a space. The slug is permanent. */
|
|
38
38
|
create(request: CreateSpaceRequest): Promise<KnowledgeSpace>
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Returns the calling user's own personal space, creating it on first use.
|
|
42
|
+
* Takes no arguments: whose space it is comes from the token. A personal
|
|
43
|
+
* space is created holding grants for its owner only.
|
|
44
|
+
*/
|
|
45
|
+
ensurePersonal(): Promise<KnowledgeSpace>
|
|
46
|
+
|
|
40
47
|
/** Updates a space's presentation. The slug cannot be changed. */
|
|
41
48
|
update(slug: string, request: UpdateSpaceRequest): Promise<KnowledgeSpace>
|
|
42
49
|
|
|
@@ -76,6 +83,13 @@ export class SpaceServiceImpl implements SpaceService {
|
|
|
76
83
|
return this.client.request<KnowledgeSpace>('POST', SPACES_BASE_PATH, request)
|
|
77
84
|
}
|
|
78
85
|
|
|
86
|
+
async ensurePersonal(): Promise<KnowledgeSpace> {
|
|
87
|
+
return this.client.request<KnowledgeSpace>(
|
|
88
|
+
'POST',
|
|
89
|
+
`${SPACES_BASE_PATH}/actions/ensure-personal`,
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
79
93
|
async update(slug: string, request: UpdateSpaceRequest): Promise<KnowledgeSpace> {
|
|
80
94
|
return this.client.request<KnowledgeSpace>('PATCH', `${SPACES_BASE_PATH}/${slug}`, request)
|
|
81
95
|
}
|
package/src/knowledge/types.ts
CHANGED
|
@@ -500,8 +500,21 @@ export interface KnowledgeSpace extends AuditFields {
|
|
|
500
500
|
description?: string | null
|
|
501
501
|
color?: string | null
|
|
502
502
|
icon?: string | null
|
|
503
|
+
/**
|
|
504
|
+
* Who the space is for: `shared` (an ordinary org space) or `personal` (one
|
|
505
|
+
* person's own space, where their assistants keep memory notes). Set at
|
|
506
|
+
* creation and never changed.
|
|
507
|
+
*/
|
|
508
|
+
scope: SpaceScope
|
|
509
|
+
/**
|
|
510
|
+
* The person a personal space belongs to; absent on a shared space. It says
|
|
511
|
+
* whose space this is — access still comes only from the space's grants.
|
|
512
|
+
*/
|
|
513
|
+
owner_user_id?: string | null
|
|
503
514
|
}
|
|
504
515
|
|
|
516
|
+
export type SpaceScope = 'shared' | 'personal'
|
|
517
|
+
|
|
505
518
|
/**
|
|
506
519
|
* The reserved filter value meaning "nodes that belong to no space at all".
|
|
507
520
|
* Deliberately not a legal slug (slugs are kebab-case), so it can never collide
|
package/src/meta/index.ts
CHANGED
|
@@ -276,11 +276,8 @@ export type {
|
|
|
276
276
|
// PageExtension types
|
|
277
277
|
PageExtension,
|
|
278
278
|
PageExtensionPlacement,
|
|
279
|
-
PageType,
|
|
280
|
-
RecordPageBinding,
|
|
281
279
|
PageMode,
|
|
282
|
-
|
|
283
|
-
TriggerPhase,
|
|
280
|
+
PageType,
|
|
284
281
|
// User attribute meta
|
|
285
282
|
PrincipalAttributeMeta,
|
|
286
283
|
PrincipalRef,
|
|
@@ -288,12 +285,15 @@ export type {
|
|
|
288
285
|
PublicAccessOperation,
|
|
289
286
|
PublicPageComponent,
|
|
290
287
|
PublicPageResponse,
|
|
288
|
+
RecordPageBinding,
|
|
291
289
|
// Relation attribute meta
|
|
292
290
|
RelationAttributeMeta,
|
|
293
291
|
SortConfig,
|
|
294
292
|
SortDirection,
|
|
295
293
|
StringAttributeMeta,
|
|
296
294
|
StringFormat,
|
|
295
|
+
TriggerPageBinding,
|
|
296
|
+
TriggerPhase,
|
|
297
297
|
UpdateAppConfigurationRequest,
|
|
298
298
|
UpdateAppRequest,
|
|
299
299
|
UpdateComponentRequest,
|
|
@@ -317,8 +317,6 @@ export type {
|
|
|
317
317
|
export {
|
|
318
318
|
AppConfigurationSchema,
|
|
319
319
|
AppHomeSchema,
|
|
320
|
-
RecordPageBindingSchema,
|
|
321
|
-
TriggerPageBindingSchema,
|
|
322
320
|
AppSchema,
|
|
323
321
|
AttributeSchema,
|
|
324
322
|
acceptsCurrentUserDefault,
|
|
@@ -353,9 +351,9 @@ export {
|
|
|
353
351
|
MenuItemType,
|
|
354
352
|
ModuleSchema,
|
|
355
353
|
OnDeleteActionSchema,
|
|
354
|
+
PAGE_ACTION_MATCH_MAX_LIMIT,
|
|
356
355
|
PAGE_EXTENSION_ANCHOR_MAIN,
|
|
357
356
|
PAGE_EXTENSION_ANCHOR_SIDE_PANEL,
|
|
358
|
-
PAGE_ACTION_MATCH_MAX_LIMIT,
|
|
359
357
|
PageActionMatchSchema,
|
|
360
358
|
PageActionSchema,
|
|
361
359
|
PageExtensionPlacementSchema,
|
|
@@ -369,8 +367,10 @@ export {
|
|
|
369
367
|
parseRelationMeta,
|
|
370
368
|
parseUserMeta,
|
|
371
369
|
platformAttributes,
|
|
370
|
+
RecordPageBindingSchema,
|
|
372
371
|
RelationAttributeMetaSchema,
|
|
373
372
|
SortConfigSchema,
|
|
373
|
+
TriggerPageBindingSchema,
|
|
374
374
|
UserAttributeMetaSchema,
|
|
375
375
|
VariableSchema,
|
|
376
376
|
} from './types.js'
|