@elevasis/core 0.11.2 → 0.13.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.d.ts +2 -1
- package/dist/index.js +8 -1
- package/dist/organization-model/index.d.ts +2 -1
- package/dist/organization-model/index.js +8 -1
- package/dist/test-utils/index.d.ts +27 -15
- package/dist/test-utils/index.js +25 -0
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +27 -270
- package/src/auth/multi-tenancy/credentials/__tests__/encryption.test.ts +217 -216
- package/src/auth/multi-tenancy/credentials/server/encryption.ts +69 -39
- package/src/auth/multi-tenancy/credentials/server/kek-loader.ts +37 -0
- package/src/auth/multi-tenancy/index.ts +3 -0
- package/src/auth/multi-tenancy/invitations/api-schemas.ts +104 -107
- package/src/auth/multi-tenancy/memberships/api-schemas.ts +6 -5
- package/src/auth/multi-tenancy/memberships/membership.ts +130 -138
- package/src/auth/multi-tenancy/permissions.ts +12 -5
- package/src/auth/multi-tenancy/role-management/api-schemas.ts +78 -0
- package/src/auth/multi-tenancy/role-management/index.ts +16 -0
- package/src/business/acquisition/activity-events.ts +142 -0
- package/src/business/acquisition/api-schemas.ts +694 -689
- package/src/business/acquisition/derive-actions.ts +90 -0
- package/src/business/acquisition/index.ts +111 -109
- package/src/execution/engine/index.ts +434 -434
- package/src/execution/engine/tools/integration/server/adapters/apify/__tests__/apify-run-actor.integration.test.ts +298 -293
- package/src/execution/engine/tools/integration/server/adapters/attio/__tests__/attio-crud.integration.test.ts +0 -1
- package/src/execution/engine/tools/integration/service.test.ts +214 -0
- package/src/execution/engine/tools/integration/service.ts +169 -161
- package/src/execution/engine/tools/lead-service-types.ts +882 -879
- package/src/execution/engine/tools/registry.ts +699 -700
- package/src/execution/engine/tools/tool-maps.ts +777 -780
- package/src/integrations/credentials/__tests__/api-schemas.test.ts +420 -496
- package/src/integrations/credentials/api-schemas.ts +127 -143
- package/src/integrations/webhook-endpoints/__tests__/api-schemas.test.ts +327 -318
- package/src/integrations/webhook-endpoints/api-schemas.ts +103 -102
- package/src/integrations/webhook-endpoints/types.ts +58 -51
- package/src/operations/activities/api-schemas.ts +80 -79
- package/src/operations/activities/types.ts +64 -63
- package/src/organization-model/contracts.ts +1 -0
- package/src/organization-model/defaults.ts +6 -0
- package/src/organization-model/domains/navigation.ts +37 -23
- package/src/organization-model/organization-graph.mdx +2 -2
- package/src/organization-model/published.ts +2 -1
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +27 -270
- package/src/scaffold-registry/__tests__/index.test.ts +72 -7
- package/src/scaffold-registry/index.ts +163 -29
- package/src/scaffold-registry/schema.ts +68 -62
- package/src/server.ts +281 -272
- package/src/supabase/database.types.ts +16 -10
- package/src/test-utils/rls/RLSTestContext.ts +585 -553
package/src/server.ts
CHANGED
|
@@ -1,272 +1,281 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Server-only exports for @repo/core
|
|
3
|
-
*
|
|
4
|
-
* WARNING: DO NOT import in browser/frontend code
|
|
5
|
-
* This module uses Node.js APIs (crypto, process.env) and server-side libraries
|
|
6
|
-
*
|
|
7
|
-
* For browser-safe imports, use '@repo/core' instead
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// Credential management (uses Node.js crypto)
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
export {
|
|
52
|
-
export {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export {
|
|
60
|
-
export {
|
|
61
|
-
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} from './execution/engine/tools/integration/server/adapters/
|
|
68
|
-
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
//
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
} from './execution/engine/tools/integration/server/adapters/
|
|
128
|
-
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
} from './
|
|
177
|
-
|
|
178
|
-
//
|
|
179
|
-
export {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
//
|
|
195
|
-
export {
|
|
196
|
-
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
//
|
|
209
|
-
export {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
//
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Server-only exports for @repo/core
|
|
3
|
+
*
|
|
4
|
+
* WARNING: DO NOT import in browser/frontend code
|
|
5
|
+
* This module uses Node.js APIs (crypto, process.env) and server-side libraries
|
|
6
|
+
*
|
|
7
|
+
* For browser-safe imports, use '@repo/core' instead
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// Credential management (uses Node.js crypto)
|
|
11
|
+
export {
|
|
12
|
+
encryptCredential,
|
|
13
|
+
decryptCredential,
|
|
14
|
+
setKek,
|
|
15
|
+
clearKeks,
|
|
16
|
+
CURRENT_KEY_ID,
|
|
17
|
+
LEGACY_KEY_ID
|
|
18
|
+
} from './auth/multi-tenancy/credentials/server/encryption'
|
|
19
|
+
|
|
20
|
+
export { loadCredentialKEKs } from './auth/multi-tenancy/credentials/server/kek-loader'
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
prepareCredentialForInsert,
|
|
24
|
+
decryptCredentialValue,
|
|
25
|
+
transformToMetadata,
|
|
26
|
+
type CreateCredentialParams,
|
|
27
|
+
type CredentialMetadata
|
|
28
|
+
} from './auth/multi-tenancy/credentials/server/service'
|
|
29
|
+
|
|
30
|
+
// Session management (uses Supabase service client)
|
|
31
|
+
export { SessionManager } from './operations/sessions/server/manager'
|
|
32
|
+
export { Session } from './operations/sessions/server/session'
|
|
33
|
+
export type {
|
|
34
|
+
SessionTurnResult,
|
|
35
|
+
CreateSessionParams,
|
|
36
|
+
ListSessionsFilters,
|
|
37
|
+
SessionRow,
|
|
38
|
+
SessionInsert
|
|
39
|
+
} from './operations/sessions/types'
|
|
40
|
+
|
|
41
|
+
// Multi-tenancy WorkOS types and transforms (server-only)
|
|
42
|
+
export * from './auth/multi-tenancy/organizations/server'
|
|
43
|
+
export * from './auth/multi-tenancy/users/server'
|
|
44
|
+
export * from './auth/multi-tenancy/memberships/server'
|
|
45
|
+
export * from './auth/multi-tenancy/invitations/server'
|
|
46
|
+
|
|
47
|
+
// Note: Browser-safe and Supabase types are re-exported from /server subdirectories
|
|
48
|
+
// No additional re-exports needed here to avoid conflicts
|
|
49
|
+
|
|
50
|
+
// Supabase client (service role with process.env credentials - lazy initialization)
|
|
51
|
+
export { getSupabaseClient, supabaseClient } from './supabase/server/client'
|
|
52
|
+
export type { SupabaseClient, Database, Tables, TablesInsert, TablesUpdate, Json } from './supabase'
|
|
53
|
+
|
|
54
|
+
// OAuth credentials and token refresh (uses process.env for client credentials)
|
|
55
|
+
export { getOAuthCredentials } from './integrations/oauth/server/credentials'
|
|
56
|
+
export { refreshOAuthTokenIfExpired, forceRefreshOAuthToken } from './integrations/oauth/server/refresh'
|
|
57
|
+
|
|
58
|
+
// Integration adapters (uses Node.js SDKs - googleapis, @slack/web-api)
|
|
59
|
+
export { GmailAdapter } from './execution/engine/tools/integration/server/adapters/gmail/gmail-adapter'
|
|
60
|
+
export { AttioAdapter } from './execution/engine/tools/integration/server/adapters/attio'
|
|
61
|
+
export { GoogleSheetsAdapter } from './execution/engine/tools/integration/server/adapters/google-sheets'
|
|
62
|
+
export { ApifyAdapter } from './execution/engine/tools/integration/server/adapters/apify'
|
|
63
|
+
export { InstantlyAdapter } from './execution/engine/tools/integration/server/adapters/instantly'
|
|
64
|
+
export { ResendAdapter } from './execution/engine/tools/integration/server/adapters/resend'
|
|
65
|
+
export { AnymailfinderAdapter } from './execution/engine/tools/integration/server/adapters/anymailfinder'
|
|
66
|
+
export { TombaAdapter } from './execution/engine/tools/integration/server/adapters/tomba'
|
|
67
|
+
export { MillionVerifierAdapter } from './execution/engine/tools/integration/server/adapters/millionverifier'
|
|
68
|
+
export { StripeAdapter } from './execution/engine/tools/integration/server/adapters/stripe'
|
|
69
|
+
export { SignatureApiAdapter } from './execution/engine/tools/integration/server/adapters/signature-api'
|
|
70
|
+
export { DropboxAdapter } from './execution/engine/tools/integration/server/adapters/dropbox'
|
|
71
|
+
|
|
72
|
+
// Integration Tool Factories (server-only - uses adapters above)
|
|
73
|
+
export {
|
|
74
|
+
createGmailSendEmailTool,
|
|
75
|
+
createGmailSendEmailToolNamed
|
|
76
|
+
} from './execution/engine/tools/integration/server/adapters/gmail/gmail-tools'
|
|
77
|
+
export {
|
|
78
|
+
createAttioCreateRecordTool,
|
|
79
|
+
createAttioUpdateRecordTool,
|
|
80
|
+
createAttioListRecordsTool,
|
|
81
|
+
createAttioGetRecordTool,
|
|
82
|
+
createAttioDeleteRecordTool,
|
|
83
|
+
createAttioToolNamed,
|
|
84
|
+
// Schema operations
|
|
85
|
+
createAttioListObjectsTool,
|
|
86
|
+
createAttioListAttributesTool,
|
|
87
|
+
createAttioCreateAttributeTool,
|
|
88
|
+
createAttioUpdateAttributeTool,
|
|
89
|
+
// Note operations
|
|
90
|
+
createAttioCreateNoteTool
|
|
91
|
+
} from './execution/engine/tools/integration/server/adapters/attio'
|
|
92
|
+
export {
|
|
93
|
+
// Core methods
|
|
94
|
+
createGoogleSheetsReadTool,
|
|
95
|
+
createGoogleSheetsWriteTool,
|
|
96
|
+
createGoogleSheetsAppendTool,
|
|
97
|
+
createGoogleSheetsClearTool,
|
|
98
|
+
createGoogleSheetsMetadataTool,
|
|
99
|
+
createGoogleSheetsBatchUpdateTool,
|
|
100
|
+
// Workflow-friendly methods
|
|
101
|
+
createGoogleSheetsGetHeadersTool,
|
|
102
|
+
createGoogleSheetsGetLastRowTool,
|
|
103
|
+
createGoogleSheetsFindRowTool,
|
|
104
|
+
createGoogleSheetsUpdateRowTool,
|
|
105
|
+
createGoogleSheetsUpsertRowTool,
|
|
106
|
+
createGoogleSheetsFilterRowsTool,
|
|
107
|
+
createGoogleSheetsDeleteRowTool
|
|
108
|
+
} from './execution/engine/tools/integration/server/adapters/google-sheets'
|
|
109
|
+
export { createApifyRunActorTool } from './execution/engine/tools/integration/server/adapters/apify'
|
|
110
|
+
export {
|
|
111
|
+
createInstantlySendReplyTool,
|
|
112
|
+
createInstantlyRemoveFromSubsequenceTool,
|
|
113
|
+
createInstantlyGetEmailsTool,
|
|
114
|
+
createInstantlyUpdateInterestStatusTool,
|
|
115
|
+
createInstantlyAddToCampaignTool
|
|
116
|
+
} from './execution/engine/tools/integration/server/adapters/instantly'
|
|
117
|
+
export {
|
|
118
|
+
createResendSendEmailTool,
|
|
119
|
+
createResendGetEmailTool,
|
|
120
|
+
createResendSendEmailToolNamed
|
|
121
|
+
} from './execution/engine/tools/integration/server/adapters/resend'
|
|
122
|
+
export {
|
|
123
|
+
createAnymailfinderFindCompanyEmailTool,
|
|
124
|
+
createAnymailfinderFindPersonEmailTool,
|
|
125
|
+
createAnymailfinderFindDecisionMakerEmailTool,
|
|
126
|
+
createAnymailfinderVerifyEmailTool
|
|
127
|
+
} from './execution/engine/tools/integration/server/adapters/anymailfinder'
|
|
128
|
+
export {
|
|
129
|
+
createTombaEmailFinderTool,
|
|
130
|
+
createTombaDomainSearchTool,
|
|
131
|
+
createTombaEmailVerifierTool
|
|
132
|
+
} from './execution/engine/tools/integration/server/adapters/tomba'
|
|
133
|
+
export {
|
|
134
|
+
createMillionVerifierVerifyEmailTool,
|
|
135
|
+
createMillionVerifierCheckCreditsTool
|
|
136
|
+
} from './execution/engine/tools/integration/server/adapters/millionverifier'
|
|
137
|
+
export {
|
|
138
|
+
createDropboxUploadTool,
|
|
139
|
+
createDropboxCreateFolderTool
|
|
140
|
+
} from './execution/engine/tools/integration/server/adapters/dropbox'
|
|
141
|
+
export {
|
|
142
|
+
createStripeCreatePaymentLinkTool,
|
|
143
|
+
createStripeGetPaymentLinkTool,
|
|
144
|
+
createStripeUpdatePaymentLinkTool,
|
|
145
|
+
createStripeListPaymentLinksTool,
|
|
146
|
+
createStripeCheckoutSessionTool,
|
|
147
|
+
createStripeAutoPaymentLinkTool
|
|
148
|
+
} from './execution/engine/tools/integration/server/adapters/stripe'
|
|
149
|
+
|
|
150
|
+
// Resend fetch functions (low-level API for platform email service)
|
|
151
|
+
export { sendEmail as sendResendEmail } from './execution/engine/tools/integration/server/adapters/resend/fetch/send-email/index'
|
|
152
|
+
export type {
|
|
153
|
+
ResendCredentials,
|
|
154
|
+
SendEmailParams as ResendSendEmailParams,
|
|
155
|
+
SendEmailResult as ResendSendEmailResult
|
|
156
|
+
} from './execution/engine/tools/integration/server/adapters/resend/fetch/utils/types'
|
|
157
|
+
|
|
158
|
+
// Resend email configuration (high-level sender config for workflows)
|
|
159
|
+
export type { ResendEmailConfig } from './execution/engine/tools/integration/server/adapters/resend/types'
|
|
160
|
+
|
|
161
|
+
// SignatureAPI types (for eSignature envelope operations)
|
|
162
|
+
export type {
|
|
163
|
+
SignatureApiCredentials,
|
|
164
|
+
CreateEnvelopeParams,
|
|
165
|
+
CreateEnvelopeResult,
|
|
166
|
+
VoidEnvelopeParams,
|
|
167
|
+
VoidEnvelopeResult,
|
|
168
|
+
DownloadDocumentParams,
|
|
169
|
+
DownloadDocumentResult,
|
|
170
|
+
EnvelopeDocument,
|
|
171
|
+
Recipient,
|
|
172
|
+
SigningPlace
|
|
173
|
+
} from './execution/engine/tools/integration/server/adapters/signature-api'
|
|
174
|
+
|
|
175
|
+
// Execution validators (uses process.env for environment detection)
|
|
176
|
+
export { detectEnvironment, canExecuteResource, type Environment } from './execution/core/server/environment'
|
|
177
|
+
|
|
178
|
+
// HMAC token utilities (uses Node.js crypto - server-only)
|
|
179
|
+
export { generateHmacToken, verifyHmacToken, generateBrochureUrl } from './platform/utils/server/hmac'
|
|
180
|
+
export {
|
|
181
|
+
generateUnsubscribeToken,
|
|
182
|
+
verifyUnsubscribeToken,
|
|
183
|
+
generateUnsubscribeUrl,
|
|
184
|
+
generateUnsubscribeHeaders
|
|
185
|
+
} from './platform/utils/server/unsubscribe'
|
|
186
|
+
|
|
187
|
+
// Better Stack error logging (uses @sentry/node - server-only)
|
|
188
|
+
export {
|
|
189
|
+
bslogExternalServiceError,
|
|
190
|
+
bslogExecutionFailure,
|
|
191
|
+
isSystemError
|
|
192
|
+
} from './platform/utils/server/betterstack-logger'
|
|
193
|
+
|
|
194
|
+
// LLM Adapters (uses betterstack-logger - server-only)
|
|
195
|
+
export { OpenAIAdapter, isOpenAIModel, type OpenAIAdapterConfig } from './execution/engine/llm/adapters/server/openai'
|
|
196
|
+
export {
|
|
197
|
+
OpenRouterAdapter,
|
|
198
|
+
isOpenRouterModel,
|
|
199
|
+
type OpenRouterAdapterConfig
|
|
200
|
+
} from './execution/engine/llm/adapters/server/openrouter'
|
|
201
|
+
export { createLLMAdapter } from './execution/engine/llm/adapters/server/adapter-factory'
|
|
202
|
+
|
|
203
|
+
// Browser-safe adapters (also exported from server for convenience)
|
|
204
|
+
export { UniversalLLMAdapter } from './execution/engine/llm/adapters/universal-adapter'
|
|
205
|
+
export { MockAdapter, isMockModel } from './execution/engine/llm/adapters/mock-adapter'
|
|
206
|
+
export { configureCircuitBreakerAlerts } from './execution/engine/llm/adapters/circuit-breaker'
|
|
207
|
+
|
|
208
|
+
// LLM Tool factory (uses server-only adapters)
|
|
209
|
+
export { createLLMCallTool, type LLMCallToolConfig } from './execution/engine/tools/llm/server'
|
|
210
|
+
|
|
211
|
+
// Workflow step helper (uses server-only adapters)
|
|
212
|
+
export { llmCall, type LLMCallOptions } from './execution/engine/workflow/helpers/server'
|
|
213
|
+
|
|
214
|
+
// Retained server-side resource invocation service types live under @repo/core/execution.
|
|
215
|
+
// Deployed SDK workers use platform.call() -> dispatcher for nested execution.
|
|
216
|
+
|
|
217
|
+
// Resilience utilities (timeout, circuit breaker, infrastructure errors)
|
|
218
|
+
export {
|
|
219
|
+
// Existing
|
|
220
|
+
withTimeout,
|
|
221
|
+
SERVICE_TIMEOUTS,
|
|
222
|
+
createCircuitBreaker,
|
|
223
|
+
CircuitState,
|
|
224
|
+
ServiceTimeoutError,
|
|
225
|
+
ServiceUnavailableError,
|
|
226
|
+
isInfrastructureError,
|
|
227
|
+
type CircuitBreaker,
|
|
228
|
+
type CircuitBreakerConfig,
|
|
229
|
+
// Rate limiting
|
|
230
|
+
InMemoryRateLimiter,
|
|
231
|
+
createRateLimiter,
|
|
232
|
+
// Retry logic
|
|
233
|
+
withRetry,
|
|
234
|
+
calculateRetryDelay,
|
|
235
|
+
sleep,
|
|
236
|
+
DEFAULT_RETRY_POLICY,
|
|
237
|
+
// HTTP error mapping
|
|
238
|
+
createHttpError,
|
|
239
|
+
mapHttpStatusToErrorType,
|
|
240
|
+
type RateLimiter,
|
|
241
|
+
type RetryPolicy,
|
|
242
|
+
type HttpErrorContext,
|
|
243
|
+
type ErrorParser
|
|
244
|
+
} from './platform/resilience'
|
|
245
|
+
|
|
246
|
+
// Acquisition Platform Tools (lead database)
|
|
247
|
+
export {
|
|
248
|
+
// List tools
|
|
249
|
+
createAcqListCreateTool,
|
|
250
|
+
createAcqListUpdateTool,
|
|
251
|
+
createAcqListDeleteTool,
|
|
252
|
+
createAcqListListTool,
|
|
253
|
+
// Company tools
|
|
254
|
+
createAcqCompanyCreateTool,
|
|
255
|
+
createAcqCompanyUpdateTool,
|
|
256
|
+
createAcqCompanyUpsertTool,
|
|
257
|
+
createAcqCompanyGetTool,
|
|
258
|
+
createAcqCompanyListTool,
|
|
259
|
+
createAcqCompanyDeleteTool,
|
|
260
|
+
// Contact tools
|
|
261
|
+
createAcqContactCreateTool,
|
|
262
|
+
createAcqContactUpdateTool,
|
|
263
|
+
createAcqContactUpsertTool,
|
|
264
|
+
createAcqContactGetTool,
|
|
265
|
+
createAcqContactListTool,
|
|
266
|
+
createAcqContactDeleteTool,
|
|
267
|
+
createAcqContactBulkImportTool
|
|
268
|
+
} from './execution/engine/tools/platform/acquisition'
|
|
269
|
+
|
|
270
|
+
// PDF Tool (server-only - uses React-PDF renderToBuffer)
|
|
271
|
+
export {
|
|
272
|
+
createPdfRenderTool,
|
|
273
|
+
type PdfRenderInput,
|
|
274
|
+
type PdfRenderOutput,
|
|
275
|
+
type PdfToolConfig,
|
|
276
|
+
PdfRenderInputSchema,
|
|
277
|
+
PdfRenderOutputSchema
|
|
278
|
+
} from './execution/engine/tools/platform/pdf'
|
|
279
|
+
|
|
280
|
+
// PDF Document types (for constructing documents programmatically)
|
|
281
|
+
export type { PDFDocument, ContentBlock, Page as PDFPage } from './business/pdf/types'
|