@proteos/sdk 0.32.1 → 0.33.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/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -39
- package/dist/index.d.ts +81 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/connector/types.ts +23 -1
- package/src/conversation/index.ts +11 -4
- package/src/conversation/types.ts +20 -0
- package/src/index.ts +1 -5
- package/src/workflow/index.ts +0 -5
- package/src/workflow/types.ts +24 -36
package/package.json
CHANGED
package/src/connector/types.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type ConnectionStatus = 'pending' | 'active' | 'error' | 'revoked'
|
|
|
7
7
|
export type ConnectionScope = 'org' | 'user'
|
|
8
8
|
|
|
9
9
|
/** How a connector authenticates. */
|
|
10
|
-
export type CredentialKind = 'oauth' | 'api_key' | 'basic' | 'bot_token'
|
|
10
|
+
export type CredentialKind = 'oauth' | 'api_key' | 'basic' | 'bot_token' | 'service_account'
|
|
11
11
|
|
|
12
12
|
export interface UserRef {
|
|
13
13
|
type: string
|
|
@@ -45,6 +45,17 @@ export interface ConnectorOAuthConfig {
|
|
|
45
45
|
client_secret_variable_key: string
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* The service-account wiring of a connector supporting the service_account
|
|
50
|
+
* kind. Like the OAuth app credentials, the SA key is an org VARIABLE —
|
|
51
|
+
* key_variable_key names the default; a connection may reference its own via
|
|
52
|
+
* settings.service_account_key_variable.
|
|
53
|
+
*/
|
|
54
|
+
export interface ConnectorServiceAccountConfig {
|
|
55
|
+
key_variable_key: string
|
|
56
|
+
scopes: string[]
|
|
57
|
+
}
|
|
58
|
+
|
|
48
59
|
/** A connector TYPE (google-calendar, a customer's vertex-tax, …). */
|
|
49
60
|
export interface Connector {
|
|
50
61
|
key: string
|
|
@@ -53,12 +64,21 @@ export interface Connector {
|
|
|
53
64
|
description?: string
|
|
54
65
|
icon?: string
|
|
55
66
|
credential_kind: CredentialKind
|
|
67
|
+
/** Every kind a connection may use; absent/empty = exactly [credential_kind]. */
|
|
68
|
+
supported_credential_kinds?: CredentialKind[]
|
|
56
69
|
oauth?: ConnectorOAuthConfig
|
|
70
|
+
service_account?: ConnectorServiceAccountConfig
|
|
57
71
|
/**
|
|
58
72
|
* COMPUTED: the broker's per-environment OAuth callback — register it as an
|
|
59
73
|
* authorized redirect URI on the provider app.
|
|
60
74
|
*/
|
|
61
75
|
oauth_redirect_uri?: string
|
|
76
|
+
/**
|
|
77
|
+
* COMPUTED: the environment ships platform-default OAuth app credentials
|
|
78
|
+
* for this connector, so the connect wizard can skip collecting them.
|
|
79
|
+
* Org variables always override the default.
|
|
80
|
+
*/
|
|
81
|
+
has_default_app_credentials?: boolean
|
|
62
82
|
config_schema?: Attribute[]
|
|
63
83
|
methods: ConnectorMethod[]
|
|
64
84
|
origin: 'pre_built' | 'custom'
|
|
@@ -79,6 +99,8 @@ export interface ConnectorConnection {
|
|
|
79
99
|
scope: ConnectionScope
|
|
80
100
|
owner?: UserRef
|
|
81
101
|
external_account_id: string
|
|
102
|
+
/** Redacted {kind, data} credential envelope — secrets are masked; use kind to tell how the connection authenticates. */
|
|
103
|
+
credentials?: { kind: CredentialKind; data?: Record<string, unknown> }
|
|
82
104
|
settings: Record<string, unknown>
|
|
83
105
|
status: ConnectionStatus
|
|
84
106
|
status_detail?: string
|
|
@@ -106,10 +106,17 @@ export interface MeetingService {
|
|
|
106
106
|
/** Make the bot leave the meeting and end the conversation (by conversation id). */
|
|
107
107
|
remove(conversationId: string): Promise<Conversation>
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
110
|
-
* transcript, overwriting any existing one
|
|
111
|
-
*
|
|
112
|
-
* conversation
|
|
109
|
+
* START regenerating this meeting conversation's markdown summary from its
|
|
110
|
+
* stored transcript, overwriting any existing one when it lands. Generation
|
|
111
|
+
* runs server-side beyond this request, so the promise resolves as soon as the
|
|
112
|
+
* conversation is CLAIMED — with `summary_status: 'processing'` and the OLD
|
|
113
|
+
* `summary` still attached. Poll `conversations.get(id)` until
|
|
114
|
+
* `summary_status` is `completed` (or `failed`) to read the new one.
|
|
115
|
+
*
|
|
116
|
+
* Rejects with `no_transcript` when the conversation has no completed
|
|
117
|
+
* transcript to summarize, `summarization_unavailable` when the environment
|
|
118
|
+
* has no generator configured, and `summary_in_progress` when a generation is
|
|
119
|
+
* already running for this conversation.
|
|
113
120
|
*/
|
|
114
121
|
summarize(conversationId: string): Promise<Conversation>
|
|
115
122
|
}
|
|
@@ -41,6 +41,7 @@ export type Channel =
|
|
|
41
41
|
export type ConnectorKey =
|
|
42
42
|
| 'slack'
|
|
43
43
|
| 'gmail'
|
|
44
|
+
| 'outlook'
|
|
44
45
|
| 'echo'
|
|
45
46
|
| 'unipile-whatsapp'
|
|
46
47
|
| 'unipile-linkedin'
|
|
@@ -73,6 +74,15 @@ export type ConnectionStatus = 'pending' | 'active' | 'error' | 'revoked'
|
|
|
73
74
|
* drafting) — hidden from the default list until the first successful send.
|
|
74
75
|
*/
|
|
75
76
|
export type ConversationStatus = 'active' | 'ended' | 'archived' | 'draft'
|
|
77
|
+
/**
|
|
78
|
+
* Generation lifecycle of a conversation's `summary`. `none` is the resting
|
|
79
|
+
* default — no summary exists and none is being produced, the state of every
|
|
80
|
+
* conversation that is not a transcript-backed meeting. `processing` is claimed
|
|
81
|
+
* for the duration of one generation run (automatic at transcript attach, or a
|
|
82
|
+
* manual `meetings.summarize()`), so any client can render "Summarizing…"
|
|
83
|
+
* without having started the run itself.
|
|
84
|
+
*/
|
|
85
|
+
export type ConversationSummaryStatus = 'none' | 'processing' | 'completed' | 'failed'
|
|
76
86
|
export type AgentListenerTriggerType = 'always' | 'mention' | 'channel' | 'keyword'
|
|
77
87
|
|
|
78
88
|
export interface UserRef {
|
|
@@ -207,6 +217,16 @@ export interface Conversation {
|
|
|
207
217
|
* conversations, editable via update(). Absent when no summary exists.
|
|
208
218
|
*/
|
|
209
219
|
summary?: string
|
|
220
|
+
/**
|
|
221
|
+
* Generation lifecycle of `summary`. Poll `conversations.get(id)` while this
|
|
222
|
+
* reads `processing` to pick up the finished summary.
|
|
223
|
+
*/
|
|
224
|
+
summary_status: ConversationSummaryStatus
|
|
225
|
+
/**
|
|
226
|
+
* When the current `processing` run was claimed; absent otherwise. Bounds the
|
|
227
|
+
* claim server-side and gives clients an elapsed time to show.
|
|
228
|
+
*/
|
|
229
|
+
summary_started_at?: string
|
|
210
230
|
status: ConversationStatus
|
|
211
231
|
/**
|
|
212
232
|
* Room directory row a room-borne thread (Slack channel conversation) lives
|
package/src/index.ts
CHANGED
|
@@ -223,6 +223,7 @@ export type {
|
|
|
223
223
|
ConversationParticipant,
|
|
224
224
|
ConversationService,
|
|
225
225
|
ConversationStatus,
|
|
226
|
+
ConversationSummaryStatus,
|
|
226
227
|
CreateAgentListenerRequest,
|
|
227
228
|
CreateConnectionRequest,
|
|
228
229
|
CreateConversationFilterRequest,
|
|
@@ -589,7 +590,6 @@ export {
|
|
|
589
590
|
} from './types/index.js'
|
|
590
591
|
export type {
|
|
591
592
|
AgentActionParams,
|
|
592
|
-
AgentKickoff,
|
|
593
593
|
BinaryRef,
|
|
594
594
|
ConnectionEndpoint,
|
|
595
595
|
CreateWorkflowRequest,
|
|
@@ -613,7 +613,6 @@ export type {
|
|
|
613
613
|
ListExecutionsOptions,
|
|
614
614
|
ListWorkflowsOptions,
|
|
615
615
|
ManualTriggerParams,
|
|
616
|
-
MessageKickoff,
|
|
617
616
|
MessageTriggerParams,
|
|
618
617
|
NodeDescriptor,
|
|
619
618
|
NodeExecution,
|
|
@@ -627,8 +626,6 @@ export type {
|
|
|
627
626
|
NodeTypeService,
|
|
628
627
|
NodeTypeStatus,
|
|
629
628
|
OnErrorPolicy,
|
|
630
|
-
OutcomeKickoff,
|
|
631
|
-
OutcomeRubric,
|
|
632
629
|
PairedItem,
|
|
633
630
|
PortSpec,
|
|
634
631
|
PropertyOption,
|
|
@@ -643,7 +640,6 @@ export type {
|
|
|
643
640
|
WebhookTriggerParams,
|
|
644
641
|
Workflow,
|
|
645
642
|
WorkflowConnection,
|
|
646
|
-
WorkflowContentBlock,
|
|
647
643
|
WorkflowExecution,
|
|
648
644
|
WorkflowGraph,
|
|
649
645
|
WorkflowNode,
|
package/src/workflow/index.ts
CHANGED
|
@@ -42,7 +42,6 @@ export type { ExecutionService } from './executions.js'
|
|
|
42
42
|
export type { NodeTypeService } from './node-types.js'
|
|
43
43
|
export type {
|
|
44
44
|
AgentActionParams,
|
|
45
|
-
AgentKickoff,
|
|
46
45
|
BinaryRef,
|
|
47
46
|
ConnectionEndpoint,
|
|
48
47
|
CreateWorkflowRequest,
|
|
@@ -66,7 +65,6 @@ export type {
|
|
|
66
65
|
ListExecutionsOptions,
|
|
67
66
|
ListWorkflowsOptions,
|
|
68
67
|
ManualTriggerParams,
|
|
69
|
-
MessageKickoff,
|
|
70
68
|
MessageTriggerParams,
|
|
71
69
|
NodeDescriptor,
|
|
72
70
|
NodeExecution,
|
|
@@ -79,8 +77,6 @@ export type {
|
|
|
79
77
|
NodeTypeKey,
|
|
80
78
|
NodeTypeStatus,
|
|
81
79
|
OnErrorPolicy,
|
|
82
|
-
OutcomeKickoff,
|
|
83
|
-
OutcomeRubric,
|
|
84
80
|
PairedItem,
|
|
85
81
|
PortSpec,
|
|
86
82
|
PropertyOption,
|
|
@@ -95,7 +91,6 @@ export type {
|
|
|
95
91
|
WebhookTriggerParams,
|
|
96
92
|
Workflow,
|
|
97
93
|
WorkflowConnection,
|
|
98
|
-
WorkflowContentBlock,
|
|
99
94
|
WorkflowExecution,
|
|
100
95
|
WorkflowGraph,
|
|
101
96
|
WorkflowNode,
|
package/src/workflow/types.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* workflow; per-node results live in append-only NodeExecution rows.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import type { Attribute } from '../meta/types.js'
|
|
16
17
|
import type { AuditFields, ListOptions, UserRef } from '../types/common.js'
|
|
17
18
|
|
|
18
19
|
// ---------------------------------------------------------------------------
|
|
@@ -163,6 +164,8 @@ export type PropertyType =
|
|
|
163
164
|
| 'fixed_collection'
|
|
164
165
|
| 'credentials_select'
|
|
165
166
|
| 'button'
|
|
167
|
+
/** Edits a platform attribute list (`Attribute[]`) via the shared attribute schema builder. */
|
|
168
|
+
| 'attribute_schema'
|
|
166
169
|
// Wave 2 (editor support lands with Phase 3):
|
|
167
170
|
| 'resource_locator'
|
|
168
171
|
| 'resource_mapper'
|
|
@@ -358,51 +361,36 @@ export interface MessageTriggerParams {
|
|
|
358
361
|
export type KickoffType = 'message' | 'outcome'
|
|
359
362
|
|
|
360
363
|
/**
|
|
361
|
-
* Where a kickoff draws its instruction text from: typed inline
|
|
362
|
-
* resolved from a reusable agent-service Prompt by key
|
|
364
|
+
* Where a kickoff slot draws its instruction text from: typed inline
|
|
365
|
+
* (`manual`) or resolved from a reusable agent-service Prompt by key
|
|
366
|
+
* (`prompt`) at run time.
|
|
363
367
|
*/
|
|
364
368
|
export type KickoffSource = 'manual' | 'prompt'
|
|
365
369
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
export interface OutcomeRubric {
|
|
381
|
-
type: 'text' | 'file'
|
|
382
|
-
content?: string
|
|
383
|
-
file_id?: string
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
export interface OutcomeKickoff {
|
|
387
|
-
/** Description and rubric are independently sourced (manual vs prompt). */
|
|
370
|
+
/**
|
|
371
|
+
* Flat, descriptor-driven parameters of the `action.agent` node (gated by
|
|
372
|
+
* display_options on `kickoff_type` / `*_source`). `output_schema` declares
|
|
373
|
+
* the node's structured output as platform attributes — the agent records it
|
|
374
|
+
* via the session-scoped `set_output` tool; `is_output_required` fails the
|
|
375
|
+
* node when the agent finishes without setting it.
|
|
376
|
+
*/
|
|
377
|
+
export interface AgentActionParams {
|
|
378
|
+
agent_key: string
|
|
379
|
+
kickoff_type: KickoffType
|
|
380
|
+
message_source?: KickoffSource
|
|
381
|
+
message_text?: string
|
|
382
|
+
message_prompt_key?: string
|
|
388
383
|
description_source?: KickoffSource
|
|
389
384
|
description?: string
|
|
390
385
|
description_prompt_key?: string
|
|
391
386
|
rubric_source?: KickoffSource
|
|
392
|
-
|
|
387
|
+
rubric_type?: 'text' | 'file'
|
|
388
|
+
rubric_content?: string
|
|
389
|
+
rubric_file_id?: string
|
|
393
390
|
rubric_prompt_key?: string
|
|
394
391
|
max_iterations?: number
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
export interface AgentKickoff {
|
|
398
|
-
type: KickoffType
|
|
399
|
-
message?: MessageKickoff
|
|
400
|
-
outcome?: OutcomeKickoff
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
export interface AgentActionParams {
|
|
404
|
-
agent_key: string
|
|
405
|
-
kickoff: AgentKickoff
|
|
392
|
+
output_schema?: Attribute[]
|
|
393
|
+
is_output_required?: boolean
|
|
406
394
|
}
|
|
407
395
|
|
|
408
396
|
// ---------------------------------------------------------------------------
|