@tai42/api-client 16.0.1 → 17.1.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/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +1 -1
- package/dist/agents.js.map +1 -1
- package/dist/client/auth-client.d.ts +44 -2
- package/dist/client/auth-client.d.ts.map +1 -1
- package/dist/client/auth-client.js +15 -1
- package/dist/client/auth-client.js.map +1 -1
- package/dist/client/backup-client.js +1 -1
- package/dist/client/backup-client.js.map +1 -1
- package/dist/client/capabilities-client.d.ts +5 -0
- package/dist/client/capabilities-client.d.ts.map +1 -1
- package/dist/client/connectors-client.js +1 -1
- package/dist/client/connectors-client.js.map +1 -1
- package/dist/client/conversations-client.d.ts +20 -8
- package/dist/client/conversations-client.d.ts.map +1 -1
- package/dist/client/conversations-client.js +1 -1
- package/dist/client/conversations-client.js.map +1 -1
- package/dist/client/hooks-client.d.ts +1 -2
- package/dist/client/hooks-client.d.ts.map +1 -1
- package/dist/client/hooks-client.js +1 -1
- package/dist/client/hooks-client.js.map +1 -1
- package/dist/client/index.d.ts +91 -19
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/interactions-client.js +1 -1
- package/dist/client/interactions-client.js.map +1 -1
- package/dist/client/login-client.d.ts +15 -2
- package/dist/client/login-client.d.ts.map +1 -1
- package/dist/client/login-client.js +38 -4
- package/dist/client/login-client.js.map +1 -1
- package/dist/client/manifest-client.js +1 -1
- package/dist/client/manifest-client.js.map +1 -1
- package/dist/client/marketplace-client.js +1 -1
- package/dist/client/marketplace-client.js.map +1 -1
- package/dist/client/observability-client.js +1 -1
- package/dist/client/observability-client.js.map +1 -1
- package/dist/client/policy-client.js +1 -1
- package/dist/client/policy-client.js.map +1 -1
- package/dist/client/presets-client.d.ts +0 -1
- package/dist/client/presets-client.d.ts.map +1 -1
- package/dist/client/presets-client.js +1 -1
- package/dist/client/presets-client.js.map +1 -1
- package/dist/client/profiles-client.d.ts +0 -1
- package/dist/client/profiles-client.d.ts.map +1 -1
- package/dist/client/profiles-client.js +1 -1
- package/dist/client/profiles-client.js.map +1 -1
- package/dist/client/schedules-client.d.ts +0 -1
- package/dist/client/schedules-client.d.ts.map +1 -1
- package/dist/client/schedules-client.js +1 -1
- package/dist/client/schedules-client.js.map +1 -1
- package/dist/client/states-client.d.ts +0 -1
- package/dist/client/states-client.d.ts.map +1 -1
- package/dist/client/states-client.js +1 -1
- package/dist/client/states-client.js.map +1 -1
- package/dist/client/storage-client.js +1 -1
- package/dist/client/storage-client.js.map +1 -1
- package/dist/client/sub-mcp-client.js +1 -1
- package/dist/client/sub-mcp-client.js.map +1 -1
- package/dist/client/system-client.js +1 -1
- package/dist/client/system-client.js.map +1 -1
- package/dist/client/tool-extensions-client.d.ts +0 -1
- package/dist/client/tool-extensions-client.d.ts.map +1 -1
- package/dist/client/tool-extensions-client.js +1 -1
- package/dist/client/tool-extensions-client.js.map +1 -1
- package/dist/client/tool-meta-client.js +1 -1
- package/dist/client/tool-meta-client.js.map +1 -1
- package/dist/client/tools-client.d.ts +2 -2
- package/dist/client/tools-client.js +1 -1
- package/dist/client/tools-client.js.map +1 -1
- package/dist/client/trigger-links-client.d.ts +1 -1
- package/dist/client/trigger-links-client.js +1 -1
- package/dist/client/trigger-links-client.js.map +1 -1
- package/dist/client/web-entry-gate-client.js +1 -1
- package/dist/client/web-entry-gate-client.js.map +1 -1
- package/dist/errors.d.ts +11 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -1
- package/dist/generated/served-schemas.d.ts +34 -0
- package/dist/generated/served-schemas.d.ts.map +1 -1
- package/dist/generated/served-schemas.js +3 -2
- package/dist/generated/served-schemas.js.map +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/schemas/api-keys.d.ts +9 -0
- package/dist/schemas/api-keys.d.ts.map +1 -1
- package/dist/schemas/api-keys.js +7 -0
- package/dist/schemas/api-keys.js.map +1 -1
- package/dist/schemas/auth-routes.d.ts +3 -3
- package/dist/schemas/backup.d.ts.map +1 -1
- package/dist/schemas/backup.js.map +1 -1
- package/dist/schemas/capabilities.d.ts +14 -4
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +8 -4
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/connectors.js.map +1 -1
- package/dist/schemas/conversations.d.ts +58 -4
- package/dist/schemas/conversations.d.ts.map +1 -1
- package/dist/schemas/conversations.js +18 -5
- package/dist/schemas/conversations.js.map +1 -1
- package/dist/schemas/fleet.d.ts.map +1 -1
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/hooks.d.ts +2 -2
- package/dist/schemas/hooks.d.ts.map +1 -1
- package/dist/schemas/hooks.js.map +1 -1
- package/dist/schemas/index.d.ts +30 -28
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +30 -28
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/interactions.d.ts.map +1 -1
- package/dist/schemas/interactions.js.map +1 -1
- package/dist/schemas/login.d.ts +12 -5
- package/dist/schemas/login.d.ts.map +1 -1
- package/dist/schemas/login.js +11 -4
- package/dist/schemas/login.js.map +1 -1
- package/dist/schemas/manifest-mcp.d.ts.map +1 -1
- package/dist/schemas/manifest-mcp.js.map +1 -1
- package/dist/schemas/notifications.d.ts.map +1 -1
- package/dist/schemas/notifications.js.map +1 -1
- package/dist/schemas/observability.d.ts.map +1 -1
- package/dist/schemas/observability.js.map +1 -1
- package/dist/schemas/policy.d.ts.map +1 -1
- package/dist/schemas/policy.js.map +1 -1
- package/dist/schemas/presets.d.ts.map +1 -1
- package/dist/schemas/presets.js.map +1 -1
- package/dist/schemas/principals.d.ts +54 -0
- package/dist/schemas/principals.d.ts.map +1 -0
- package/dist/schemas/principals.js +34 -0
- package/dist/schemas/principals.js.map +1 -0
- package/dist/schemas/profiles.d.ts.map +1 -1
- package/dist/schemas/profiles.js.map +1 -1
- package/dist/schemas/roles.d.ts.map +1 -1
- package/dist/schemas/roles.js.map +1 -1
- package/dist/schemas/schedules.d.ts.map +1 -1
- package/dist/schemas/schedules.js.map +1 -1
- package/dist/schemas/served.d.ts +23 -1
- package/dist/schemas/served.d.ts.map +1 -1
- package/dist/schemas/served.js +1 -1
- package/dist/schemas/served.js.map +1 -1
- package/dist/schemas/settings-schema.d.ts.map +1 -1
- package/dist/schemas/settings-schema.js.map +1 -1
- package/dist/schemas/setup.d.ts +43 -0
- package/dist/schemas/setup.d.ts.map +1 -0
- package/dist/schemas/setup.js +19 -0
- package/dist/schemas/setup.js.map +1 -0
- package/dist/schemas/states.d.ts.map +1 -1
- package/dist/schemas/states.js.map +1 -1
- package/dist/schemas/system-kinds.d.ts.map +1 -1
- package/dist/schemas/system-kinds.js.map +1 -1
- package/dist/schemas/templates.d.ts.map +1 -1
- package/dist/schemas/templates.js.map +1 -1
- package/dist/schemas/tools.d.ts.map +1 -1
- package/dist/schemas/tools.js.map +1 -1
- package/dist/schemas/trigger-links.d.ts +2 -2
- package/dist/schemas/trigger-links.d.ts.map +1 -1
- package/dist/schemas/trigger-links.js.map +1 -1
- package/dist/tool-runs.d.ts +4 -4
- package/dist/tool-runs.d.ts.map +1 -1
- package/dist/tool-runs.js.map +1 -1
- package/package.json +1 -1
- package/src/agents.ts +2 -2
- package/src/client/auth-client.ts +27 -1
- package/src/client/backup-client.ts +1 -1
- package/src/client/connectors-client.ts +1 -1
- package/src/client/conversations-client.ts +1 -1
- package/src/client/hooks-client.ts +1 -1
- package/src/client/index.ts +10 -10
- package/src/client/interactions-client.ts +1 -1
- package/src/client/login-client.ts +45 -4
- package/src/client/manifest-client.ts +1 -1
- package/src/client/marketplace-client.ts +1 -1
- package/src/client/observability-client.ts +1 -1
- package/src/client/policy-client.ts +1 -1
- package/src/client/presets-client.ts +1 -1
- package/src/client/profiles-client.ts +1 -1
- package/src/client/schedules-client.ts +1 -1
- package/src/client/states-client.ts +1 -1
- package/src/client/storage-client.ts +1 -1
- package/src/client/sub-mcp-client.ts +1 -1
- package/src/client/system-client.ts +1 -1
- package/src/client/tool-extensions-client.ts +1 -1
- package/src/client/tool-meta-client.ts +1 -1
- package/src/client/tools-client.ts +1 -1
- package/src/client/trigger-links-client.ts +1 -1
- package/src/client/web-entry-gate-client.ts +1 -1
- package/src/errors.ts +16 -0
- package/src/generated/served-schemas.ts +5 -2
- package/src/index.ts +231 -226
- package/src/schemas/api-keys.ts +8 -0
- package/src/schemas/backup.ts +1 -0
- package/src/schemas/capabilities.ts +9 -4
- package/src/schemas/connectors.ts +1 -0
- package/src/schemas/conversations.ts +19 -5
- package/src/schemas/fleet.ts +1 -0
- package/src/schemas/hooks.ts +1 -0
- package/src/schemas/index.ts +30 -28
- package/src/schemas/interactions.ts +1 -0
- package/src/schemas/login.ts +11 -4
- package/src/schemas/manifest-mcp.ts +1 -0
- package/src/schemas/notifications.ts +1 -0
- package/src/schemas/observability.ts +1 -0
- package/src/schemas/policy.ts +1 -0
- package/src/schemas/presets.ts +1 -0
- package/src/schemas/principals.ts +41 -0
- package/src/schemas/profiles.ts +1 -0
- package/src/schemas/roles.ts +1 -0
- package/src/schemas/schedules.ts +1 -0
- package/src/schemas/served.ts +2 -1
- package/src/schemas/settings-schema.ts +1 -0
- package/src/schemas/setup.ts +39 -0
- package/src/schemas/states.ts +1 -0
- package/src/schemas/system-kinds.ts +1 -0
- package/src/schemas/templates.ts +1 -0
- package/src/schemas/tools.ts +1 -0
- package/src/schemas/trigger-links.ts +1 -0
- package/src/tool-runs.ts +1 -1
package/src/index.ts
CHANGED
|
@@ -5,279 +5,284 @@
|
|
|
5
5
|
* validated and every failure throws. No caching of its own — server state
|
|
6
6
|
* lives in TanStack Query in the feature packages.
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
8
|
+
export type { AgentEvent, AgentSummary, ParsedAgentEvent, UnknownAgentEvent } from './agents';
|
|
9
|
+
export { agentEventSchema, parseAgentFrame, parseAgentTranscript } from './agents';
|
|
9
10
|
export type {
|
|
11
|
+
AddUrlToScopeBody,
|
|
10
12
|
ApiClient,
|
|
11
|
-
RunToolArgs,
|
|
12
|
-
ToolAdminArgs,
|
|
13
|
-
ApiToolsListsBody,
|
|
14
|
-
StartConnectArgs,
|
|
15
13
|
ApiKeyBody,
|
|
14
|
+
ApiToolsListsBody,
|
|
16
15
|
ClaimLinkBody,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
ConversationMessageSearchQuery,
|
|
17
|
+
ConversationThreadFilters,
|
|
18
|
+
ConversationThreadMessageBody,
|
|
19
|
+
ConversationTranscriptQuery,
|
|
20
|
+
CreatePresetBody,
|
|
21
|
+
MarketplaceInstallBody,
|
|
22
|
+
MarketplaceInstallPreviewBody,
|
|
23
|
+
MarketplaceSearchQuery,
|
|
24
|
+
MarketplaceUninstallBody,
|
|
25
|
+
MetricsQuery,
|
|
26
|
+
PinRoutePublicBody,
|
|
22
27
|
RoleCreateBody,
|
|
23
28
|
RoleUpdateBody,
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
RunsQuery,
|
|
30
|
+
RunToolArgs,
|
|
26
31
|
SavePresetVersionBody,
|
|
27
|
-
|
|
28
|
-
StateDeclarationBody,
|
|
29
|
-
StateTemplateBody,
|
|
32
|
+
StartConnectArgs,
|
|
30
33
|
StateAttachmentBody,
|
|
31
|
-
|
|
34
|
+
StateDeclarationBody,
|
|
32
35
|
StatePageQuery,
|
|
33
|
-
|
|
36
|
+
StateSubjectRef,
|
|
37
|
+
StateTemplateBody,
|
|
34
38
|
StorageUploadBody,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
MarketplaceInstallBody,
|
|
43
|
-
MarketplaceInstallPreviewBody,
|
|
44
|
-
MarketplaceUninstallBody,
|
|
39
|
+
ToolAdminArgs,
|
|
40
|
+
ToolMetaPatch,
|
|
41
|
+
TopicVerifierBody,
|
|
42
|
+
TriggerLinkCreateBody,
|
|
43
|
+
ValidateConditionBody,
|
|
44
|
+
ValidatePresetBody,
|
|
45
|
+
WebEntryCodeMintBody,
|
|
45
46
|
} from './client';
|
|
46
|
-
export
|
|
47
|
-
export { apiRequest, apiText, apiDownload } from './http';
|
|
47
|
+
export { createApiClient, isSafeApiPath } from './client';
|
|
48
48
|
export {
|
|
49
|
-
ApiError,
|
|
50
|
-
ApiUnauthorizedError,
|
|
51
49
|
ApiConflictError,
|
|
50
|
+
ApiError,
|
|
52
51
|
ApiLoginFailedError,
|
|
53
52
|
ApiSchemaError,
|
|
53
|
+
ApiSetupFailedError,
|
|
54
|
+
ApiUnauthorizedError,
|
|
54
55
|
} from './errors';
|
|
55
|
-
export { SseFrameParser, readSseFrames } from './sse';
|
|
56
|
-
export type { SseFrame } from './sse';
|
|
57
|
-
export { parseAgentFrame, parseAgentTranscript, agentEventSchema } from './agents';
|
|
58
|
-
export type { AgentSummary, AgentEvent, UnknownAgentEvent, ParsedAgentEvent } from './agents';
|
|
59
|
-
export {
|
|
60
|
-
toolRunStatus,
|
|
61
|
-
toolRunSubmitResult,
|
|
62
|
-
toolRunRecord,
|
|
63
|
-
toolRunListItem,
|
|
64
|
-
toolRunList,
|
|
65
|
-
isTerminalRunStatus,
|
|
66
|
-
} from './tool-runs';
|
|
67
|
-
export type {
|
|
68
|
-
ToolRunStatus,
|
|
69
|
-
ToolRunSubmitResult,
|
|
70
|
-
ToolRunRecord,
|
|
71
|
-
ToolRunListItem,
|
|
72
|
-
SubmitToolRunArgs,
|
|
73
|
-
} from './tool-runs';
|
|
74
|
-
export {
|
|
75
|
-
summarizeFleetResult,
|
|
76
|
-
summarizeFleetFanout,
|
|
77
|
-
isFleetReportFailure,
|
|
78
|
-
failedMcpsFromReport,
|
|
79
|
-
} from './fleet-report';
|
|
80
56
|
export type {
|
|
81
|
-
|
|
57
|
+
FailedMcpEntry,
|
|
58
|
+
FleetFailureOutcome,
|
|
82
59
|
FleetReportStatus,
|
|
60
|
+
FleetReportSummary,
|
|
83
61
|
FleetWorkerFailure,
|
|
84
|
-
FleetFailureOutcome,
|
|
85
|
-
FailedMcpEntry,
|
|
86
62
|
} from './fleet-report';
|
|
87
|
-
export
|
|
63
|
+
export {
|
|
64
|
+
failedMcpsFromReport,
|
|
65
|
+
isFleetReportFailure,
|
|
66
|
+
summarizeFleetFanout,
|
|
67
|
+
summarizeFleetResult,
|
|
68
|
+
} from './fleet-report';
|
|
69
|
+
export type { ApiConfig, RequestOptions } from './http';
|
|
70
|
+
export { apiDownload, apiRequest, apiText } from './http';
|
|
88
71
|
export type {
|
|
89
|
-
|
|
90
|
-
ToolSchema,
|
|
91
|
-
ToolMediaResult,
|
|
92
|
-
ToolTagEntry,
|
|
93
|
-
AuthRoute,
|
|
94
|
-
RouteAction,
|
|
95
|
-
GrantLevel,
|
|
96
|
-
RoleGrants,
|
|
97
|
-
RoleBody,
|
|
98
|
-
RoleVersion,
|
|
99
|
-
RoleAuditEvent,
|
|
100
|
-
RoleVersions,
|
|
101
|
-
PresetRecord,
|
|
102
|
-
PresetDetail,
|
|
103
|
-
PresetBody,
|
|
104
|
-
PresetVersion,
|
|
105
|
-
PresetRenamed,
|
|
106
|
-
PresetReferees,
|
|
107
|
-
PresetValidation,
|
|
108
|
-
PresetVersionTags,
|
|
109
|
-
PresetExtensionElement,
|
|
110
|
-
StateSubject,
|
|
111
|
-
StateDeclaration,
|
|
112
|
-
StateListItem,
|
|
113
|
-
StateAttachment,
|
|
114
|
-
StateDetail,
|
|
115
|
-
StateStats,
|
|
116
|
-
TemplateJq,
|
|
117
|
-
TemplateReconcile,
|
|
118
|
-
TemplateDeclarations,
|
|
119
|
-
StateTemplateDocument,
|
|
120
|
-
StateTemplateListItem,
|
|
121
|
-
StateInjection,
|
|
122
|
-
StateUpdate,
|
|
123
|
-
StateAttach,
|
|
124
|
-
StateBinding,
|
|
125
|
-
StateRecord,
|
|
72
|
+
AnswerFormat,
|
|
126
73
|
ApplyResult,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
74
|
+
AuthCapabilities,
|
|
75
|
+
AuthRoute,
|
|
76
|
+
BackendInfo,
|
|
77
|
+
BackupDocument,
|
|
78
|
+
BackupImportReport,
|
|
79
|
+
Channels,
|
|
80
|
+
ChannelTemplate,
|
|
81
|
+
ClaimLinkCreated,
|
|
132
82
|
CompletedOrigin,
|
|
133
|
-
|
|
134
|
-
WritesPage,
|
|
135
|
-
ConsumerLink,
|
|
136
|
-
ConsumerRow,
|
|
137
|
-
StateConsumers,
|
|
138
|
-
StateAttached,
|
|
139
|
-
StateAttachmentUpdated,
|
|
140
|
-
StateDetached,
|
|
141
|
-
StateFoldReport,
|
|
142
|
-
StateRetentionPruned,
|
|
143
|
-
FolderRecord,
|
|
144
|
-
ToolMetaRecord,
|
|
145
|
-
ToolMetaOverlay,
|
|
146
|
-
PolicyBody,
|
|
147
|
-
PolicyVersion,
|
|
148
|
-
ValidateConditionResult,
|
|
149
|
-
Extension,
|
|
150
|
-
ToolExtensions,
|
|
151
|
-
ToolExtensionsApplyResult,
|
|
152
|
-
ProviderView,
|
|
83
|
+
ConnectionView,
|
|
153
84
|
ConnectorCategoryView,
|
|
154
|
-
ProviderCatalogResponse,
|
|
155
85
|
ConnectorRef,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
InteractionAnswered,
|
|
164
|
-
InteractionCancelled,
|
|
165
|
-
InteractionsPage,
|
|
166
|
-
InteractionMediaItem,
|
|
167
|
-
FormOption,
|
|
168
|
-
FormData,
|
|
169
|
-
FormPage,
|
|
170
|
-
FormPages,
|
|
171
|
-
MediaKind,
|
|
172
|
-
AnswerFormat,
|
|
173
|
-
Channels,
|
|
86
|
+
ConsumerLink,
|
|
87
|
+
ConsumerRow,
|
|
88
|
+
ConversationAnswerStatus,
|
|
89
|
+
ConversationConfigDeleted,
|
|
90
|
+
ConversationConfigs,
|
|
91
|
+
ConversationConfigWritten,
|
|
92
|
+
ConversationDeliveryStatus,
|
|
174
93
|
ConversationDoor,
|
|
175
|
-
|
|
94
|
+
ConversationFailedMessages,
|
|
95
|
+
ConversationMessage,
|
|
96
|
+
ConversationMessageSearchPage,
|
|
176
97
|
ConversationMode,
|
|
177
|
-
|
|
178
|
-
|
|
98
|
+
ConversationPersonDeleted,
|
|
99
|
+
ConversationRecordOrigin,
|
|
179
100
|
ConversationRoute,
|
|
180
|
-
ConversationRoutes,
|
|
181
101
|
ConversationRouteCreate,
|
|
182
|
-
ConversationRouteWritten,
|
|
183
102
|
ConversationRouteDeleted,
|
|
103
|
+
ConversationRoutes,
|
|
104
|
+
ConversationRouteWritten,
|
|
105
|
+
ConversationTargetKind,
|
|
184
106
|
ConversationThread,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
ConversationRecordOrigin,
|
|
188
|
-
TranscriptOrder,
|
|
189
|
-
ConversationTranscriptPage,
|
|
190
|
-
ConversationMessageSearchPage,
|
|
107
|
+
ConversationThreadDeleted,
|
|
108
|
+
ConversationThreadMessageSent,
|
|
191
109
|
ConversationThreadMode,
|
|
192
110
|
ConversationThreadModeState,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
111
|
+
ConversationThreadsPage,
|
|
112
|
+
ConversationTranscriptPage,
|
|
113
|
+
DashboardMetrics,
|
|
114
|
+
Extension,
|
|
115
|
+
FleetOutcome,
|
|
116
|
+
FleetReloadResult,
|
|
117
|
+
FleetReportFanout,
|
|
118
|
+
FleetResult,
|
|
119
|
+
FleetWorker,
|
|
120
|
+
FleetWorkerResult,
|
|
121
|
+
FleetWorkers,
|
|
122
|
+
FolderRecord,
|
|
123
|
+
FormData,
|
|
124
|
+
FormOption,
|
|
125
|
+
FormPage,
|
|
126
|
+
FormPages,
|
|
127
|
+
GrantLevel,
|
|
128
|
+
HookList,
|
|
209
129
|
HookParams,
|
|
210
130
|
HookRegister,
|
|
211
131
|
HookSubject,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
132
|
+
Interaction,
|
|
133
|
+
InteractionAnswered,
|
|
134
|
+
InteractionCancelled,
|
|
135
|
+
InteractionMediaItem,
|
|
136
|
+
InteractionsPage,
|
|
137
|
+
KindStatus,
|
|
216
138
|
LoginFormField,
|
|
217
139
|
LoginMethod,
|
|
218
140
|
LoginMethods,
|
|
219
141
|
LoginResult,
|
|
220
|
-
MeProjection,
|
|
221
|
-
RouteEntry,
|
|
222
|
-
PatternEntry,
|
|
223
|
-
SubMcpEntry,
|
|
224
|
-
SubMcpMount,
|
|
225
|
-
ClaimLinkCreated,
|
|
226
|
-
TriggerLinkCreated,
|
|
227
|
-
TriggerLinkRecord,
|
|
228
|
-
TriggerLinkList,
|
|
229
|
-
TriggerLinkDeleted,
|
|
230
142
|
LogoutResult,
|
|
231
|
-
|
|
232
|
-
BackupDocument,
|
|
233
|
-
BackupImportReport,
|
|
234
|
-
ScheduleItem,
|
|
235
|
-
StorageInfo,
|
|
236
|
-
StorageResourceStat,
|
|
237
|
-
BackendInfo,
|
|
238
|
-
WorkerKind,
|
|
239
|
-
WorkerState,
|
|
240
|
-
WorkerLastOp,
|
|
241
|
-
FleetWorker,
|
|
242
|
-
FleetWorkers,
|
|
243
|
-
FleetOutcome,
|
|
244
|
-
FleetWorkerResult,
|
|
245
|
-
FleetResult,
|
|
246
|
-
FleetReloadResult,
|
|
247
|
-
FleetReportFanout,
|
|
248
|
-
ReloadConfigResult,
|
|
249
|
-
McpReloadResult,
|
|
250
|
-
KindStatus,
|
|
251
|
-
DashboardMetrics,
|
|
252
|
-
Run,
|
|
253
|
-
RunSpan,
|
|
254
|
-
RunTrace,
|
|
255
|
-
MarketplaceItem,
|
|
256
|
-
MarketplaceDelivery,
|
|
257
|
-
MarketplaceSource,
|
|
258
|
-
MarketplaceRequiredEnvVar,
|
|
259
|
-
MarketplaceRouteDecl,
|
|
260
|
-
MarketplaceRoutesDecl,
|
|
261
|
-
MarketplaceSearchKind,
|
|
262
|
-
MarketplaceSearchGroup,
|
|
263
|
-
MarketplaceSearchRow,
|
|
264
|
-
MarketplaceSearchPage,
|
|
265
|
-
MarketplaceVersion,
|
|
266
|
-
MarketplaceLatestVersion,
|
|
143
|
+
ManifestMcpEntry,
|
|
267
144
|
MarketplaceAdvisory,
|
|
268
|
-
|
|
145
|
+
MarketplaceDelivery,
|
|
146
|
+
MarketplaceInstalled,
|
|
269
147
|
MarketplaceInstalledCompat,
|
|
270
148
|
MarketplaceInstalledPlugin,
|
|
271
|
-
|
|
272
|
-
MarketplaceInstalled,
|
|
273
|
-
MarketplaceUpgradeAllRow,
|
|
274
|
-
MarketplaceUpgradeAllResult,
|
|
149
|
+
MarketplaceInstallPreview,
|
|
275
150
|
MarketplaceInstallResult,
|
|
151
|
+
MarketplaceItem,
|
|
152
|
+
MarketplaceLatestVersion,
|
|
276
153
|
MarketplaceMountedRoute,
|
|
277
|
-
|
|
278
|
-
MarketplacePreviewItem,
|
|
154
|
+
MarketplacePluginDetail,
|
|
279
155
|
MarketplacePreviewCollision,
|
|
156
|
+
MarketplacePreviewItem,
|
|
280
157
|
MarketplacePreviewPublicRoute,
|
|
281
|
-
|
|
158
|
+
MarketplacePreviewRoute,
|
|
159
|
+
MarketplaceQuarantinedPlugin,
|
|
160
|
+
MarketplaceRequiredEnvVar,
|
|
161
|
+
MarketplaceRouteDecl,
|
|
162
|
+
MarketplaceRoutesDecl,
|
|
163
|
+
MarketplaceSearchGroup,
|
|
164
|
+
MarketplaceSearchKind,
|
|
165
|
+
MarketplaceSearchPage,
|
|
166
|
+
MarketplaceSearchRow,
|
|
167
|
+
MarketplaceSource,
|
|
282
168
|
MarketplaceUninstallResult,
|
|
169
|
+
MarketplaceUpgradeAllResult,
|
|
170
|
+
MarketplaceUpgradeAllRow,
|
|
171
|
+
MarketplaceVersion,
|
|
172
|
+
McpEnvRef,
|
|
173
|
+
McpEnvRefs,
|
|
174
|
+
McpReloadResult,
|
|
175
|
+
MediaKind,
|
|
176
|
+
MeProjection,
|
|
177
|
+
Notification,
|
|
178
|
+
Notifications,
|
|
179
|
+
OAuthCompleteResult,
|
|
180
|
+
PatternEntry,
|
|
181
|
+
PolicyBody,
|
|
182
|
+
PolicyVersion,
|
|
183
|
+
PresetBody,
|
|
184
|
+
PresetDetail,
|
|
185
|
+
PresetExtensionElement,
|
|
186
|
+
PresetRecord,
|
|
187
|
+
PresetReferees,
|
|
188
|
+
PresetRenamed,
|
|
189
|
+
PresetValidation,
|
|
190
|
+
PresetVersion,
|
|
191
|
+
PresetVersionTags,
|
|
192
|
+
Principal,
|
|
193
|
+
PrincipalRef,
|
|
194
|
+
ProviderCatalogResponse,
|
|
195
|
+
ProviderView,
|
|
196
|
+
RecordSearchPage,
|
|
197
|
+
ReloadConfigResult,
|
|
198
|
+
RoleAuditEvent,
|
|
199
|
+
RoleBody,
|
|
200
|
+
RoleGrants,
|
|
201
|
+
RoleVersion,
|
|
202
|
+
RoleVersions,
|
|
203
|
+
RouteAction,
|
|
204
|
+
RouteEntry,
|
|
205
|
+
Run,
|
|
206
|
+
RunSpan,
|
|
207
|
+
RunTrace,
|
|
208
|
+
ScheduleItem,
|
|
209
|
+
SettingsSchema,
|
|
210
|
+
SetupBody,
|
|
211
|
+
SetupResult,
|
|
212
|
+
StateAttach,
|
|
213
|
+
StateAttached,
|
|
214
|
+
StateAttachment,
|
|
215
|
+
StateAttachmentUpdated,
|
|
216
|
+
StateBinding,
|
|
217
|
+
StateConsumers,
|
|
218
|
+
StateDeclaration,
|
|
219
|
+
StateDetached,
|
|
220
|
+
StateDetail,
|
|
221
|
+
StateFoldReport,
|
|
222
|
+
StateInjection,
|
|
223
|
+
StateListItem,
|
|
224
|
+
StateRecord,
|
|
225
|
+
StateRetentionPruned,
|
|
226
|
+
StateStats,
|
|
227
|
+
StateSubject,
|
|
228
|
+
StateTemplateDocument,
|
|
229
|
+
StateTemplateListItem,
|
|
230
|
+
StateUpdate,
|
|
231
|
+
StorageInfo,
|
|
232
|
+
StorageResourceStat,
|
|
233
|
+
StudioPluginManifest,
|
|
234
|
+
SubjectPage,
|
|
235
|
+
SubjectRow,
|
|
236
|
+
SubMcpEntry,
|
|
237
|
+
SubMcpMount,
|
|
238
|
+
TargetConversationConfig,
|
|
239
|
+
TemplateDeclarations,
|
|
240
|
+
TemplatedText,
|
|
241
|
+
TemplateJq,
|
|
242
|
+
TemplateJqApplyResult,
|
|
243
|
+
TemplateJqResult,
|
|
244
|
+
TemplateReconcile,
|
|
245
|
+
TokensPayload,
|
|
246
|
+
ToolExtensions,
|
|
247
|
+
ToolExtensionsApplyResult,
|
|
248
|
+
ToolMediaResult,
|
|
249
|
+
ToolMetaOverlay,
|
|
250
|
+
ToolMetaRecord,
|
|
251
|
+
ToolSchema,
|
|
252
|
+
ToolTagEntry,
|
|
253
|
+
TranscriptOrder,
|
|
254
|
+
TriggerAuth,
|
|
255
|
+
TriggerLinkCreated,
|
|
256
|
+
TriggerLinkDeleted,
|
|
257
|
+
TriggerLinkList,
|
|
258
|
+
TriggerLinkRecord,
|
|
259
|
+
ValidateConditionResult,
|
|
260
|
+
WebEntryCode,
|
|
261
|
+
WebEntryCodeMinted,
|
|
262
|
+
WebEntryCodeRevoked,
|
|
263
|
+
WebEntryGate,
|
|
264
|
+
WebEntryGateState,
|
|
265
|
+
WorkerKind,
|
|
266
|
+
WorkerLastOp,
|
|
267
|
+
WorkerState,
|
|
268
|
+
WriteEntry,
|
|
269
|
+
WritesPage,
|
|
283
270
|
} from './schemas';
|
|
271
|
+
export * as schemas from './schemas';
|
|
272
|
+
export type { SseFrame } from './sse';
|
|
273
|
+
export { readSseFrames, SseFrameParser } from './sse';
|
|
274
|
+
export type {
|
|
275
|
+
SubmitToolRunArgs,
|
|
276
|
+
ToolRunListItem,
|
|
277
|
+
ToolRunRecord,
|
|
278
|
+
ToolRunStatus,
|
|
279
|
+
ToolRunSubmitResult,
|
|
280
|
+
} from './tool-runs';
|
|
281
|
+
export {
|
|
282
|
+
isTerminalRunStatus,
|
|
283
|
+
toolRunList,
|
|
284
|
+
toolRunListItem,
|
|
285
|
+
toolRunRecord,
|
|
286
|
+
toolRunStatus,
|
|
287
|
+
toolRunSubmitResult,
|
|
288
|
+
} from './tool-runs';
|
package/src/schemas/api-keys.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** API-key payload and mint/edit/revoke response schemas. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import { principalRef } from './principals';
|
|
3
5
|
import { templatedText } from './served';
|
|
4
6
|
import { jsonValue } from './shared';
|
|
5
7
|
|
|
@@ -13,6 +15,12 @@ export const tokensPayload = z.array(
|
|
|
13
15
|
scopes: z.array(z.string()),
|
|
14
16
|
policy_data: jsonValue,
|
|
15
17
|
condition: templatedText.nullable().optional(),
|
|
18
|
+
// The key's OWNER principal (kind + display name); `null` for a key whose
|
|
19
|
+
// principal row is absent (an orphaned restore state).
|
|
20
|
+
principal: principalRef.nullable().optional(),
|
|
21
|
+
// `true` for a key whose owning principal row is gone (an orphaned key that a
|
|
22
|
+
// backup restore left without its principal).
|
|
23
|
+
orphaned: z.boolean().optional(),
|
|
16
24
|
}),
|
|
17
25
|
);
|
|
18
26
|
export type TokensPayload = z.infer<typeof tokensPayload>;
|
package/src/schemas/backup.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** Caller capability projection and auth-capabilities schemas. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import { principalRef } from './principals';
|
|
3
5
|
import { subMcpMount } from './sub-mcp';
|
|
4
6
|
|
|
5
7
|
/** A concrete route the caller can reach, with the methods that pass its jq fence. */
|
|
@@ -31,15 +33,18 @@ export type SubMcpEntry = z.infer<typeof subMcpEntry>;
|
|
|
31
33
|
* `GET /api/auth/me` — the caller's derived capability projection: the concrete
|
|
32
34
|
* (path, method) surface, dynamic patterns, sub-MCP mounts, tools, and agents it
|
|
33
35
|
* can reach RIGHT NOW (derived server-side, never stored). `admin` is the
|
|
34
|
-
* condition-free
|
|
36
|
+
* condition-free `"*"` discriminator (a TOTAL projection); a scoped
|
|
35
37
|
* session carries `admin: false` and a jq-exact `routes` list. `owner_user_id` is
|
|
36
|
-
* the key's owner claim, `null` for
|
|
37
|
-
*
|
|
38
|
-
*
|
|
38
|
+
* the key's owner claim, `null` for a key with no owner claim. `principal` is the
|
|
39
|
+
* caller's principal (kind + display name), `null` when no principal row backs the
|
|
40
|
+
* credential. The invariant is projection ⊆ gate: every projected surface is one
|
|
41
|
+
* the server would admit, so the UI can filter on it without ever advertising a
|
|
42
|
+
* door the gate denies.
|
|
39
43
|
*/
|
|
40
44
|
export const meProjection = z.object({
|
|
41
45
|
user_id: z.string(),
|
|
42
46
|
owner_user_id: z.string().nullable(),
|
|
47
|
+
principal: principalRef.nullable().optional(),
|
|
43
48
|
admin: z.boolean(),
|
|
44
49
|
scopes: z.array(z.string()),
|
|
45
50
|
routes: z.array(routeEntry),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Conversation route, thread, transcript and config schemas. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
|
|
3
4
|
import { conversationRoute, targetConversationConfig } from './served';
|
|
4
5
|
import { pageWindow } from './shared';
|
|
5
6
|
|
|
@@ -30,7 +31,9 @@ export type ConversationMode = z.infer<typeof conversationMode>;
|
|
|
30
31
|
/**
|
|
31
32
|
* Where a record sits between intake and a terminal outcome. `failed` is the one
|
|
32
33
|
* the monitor surfaces loudly; `shed` and `silent` are terminal by design and
|
|
33
|
-
* never send.
|
|
34
|
+
* never send. `merged` and `superseded` are the overlap-policy outcomes: this
|
|
35
|
+
* record's text was carried into (`merged`) or dropped in favour of (`superseded`)
|
|
36
|
+
* a later turn, named by `successor_id`; both are terminal and never send.
|
|
34
37
|
*/
|
|
35
38
|
export const conversationDeliveryStatus = z.enum([
|
|
36
39
|
'accepted',
|
|
@@ -40,11 +43,19 @@ export const conversationDeliveryStatus = z.enum([
|
|
|
40
43
|
'failed',
|
|
41
44
|
'shed',
|
|
42
45
|
'silent',
|
|
46
|
+
'merged',
|
|
47
|
+
'superseded',
|
|
43
48
|
]);
|
|
44
49
|
export type ConversationDeliveryStatus = z.infer<typeof conversationDeliveryStatus>;
|
|
45
50
|
|
|
46
51
|
/** The nature of a turn's outcome, orthogonal to where its delivery stands. */
|
|
47
|
-
export const conversationAnswerStatus = z.enum([
|
|
52
|
+
export const conversationAnswerStatus = z.enum([
|
|
53
|
+
'answered',
|
|
54
|
+
'error',
|
|
55
|
+
'silent',
|
|
56
|
+
'merged',
|
|
57
|
+
'superseded',
|
|
58
|
+
]);
|
|
48
59
|
export type ConversationAnswerStatus = z.infer<typeof conversationAnswerStatus>;
|
|
49
60
|
|
|
50
61
|
/**
|
|
@@ -111,9 +122,11 @@ export type ConversationThreadsPage = z.infer<typeof conversationThreadsPage>;
|
|
|
111
122
|
/**
|
|
112
123
|
* One exchange: the visitor's `inbound_text` — every record answers a message, so
|
|
113
124
|
* both projections always carry it — and the agent's `answer`, plus where that
|
|
114
|
-
* answer's delivery stands.
|
|
115
|
-
*
|
|
116
|
-
* are
|
|
125
|
+
* answer's delivery stands. `successor_id` names the later turn a `merged` or
|
|
126
|
+
* `superseded` record was folded into, `null` on every other outcome. The fields
|
|
127
|
+
* after `updated_at` are ADMIN ONLY — the same door serves a caller-scoped
|
|
128
|
+
* projection that withholds them — so they are optional here and absence means
|
|
129
|
+
* "not published to this reader".
|
|
117
130
|
*/
|
|
118
131
|
export const conversationMessage = z.object({
|
|
119
132
|
message_id: z.string(),
|
|
@@ -125,6 +138,7 @@ export const conversationMessage = z.object({
|
|
|
125
138
|
inbound_text: z.string(),
|
|
126
139
|
answer_status: conversationAnswerStatus.nullable(),
|
|
127
140
|
answer: z.string().nullable(),
|
|
141
|
+
successor_id: z.string().nullable(),
|
|
128
142
|
origin: conversationRecordOrigin,
|
|
129
143
|
delivery_status: conversationDeliveryStatus,
|
|
130
144
|
created_at: z.number(),
|
package/src/schemas/fleet.ts
CHANGED