@zapier/zapier-sdk 0.70.2 → 0.70.3
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/CHANGELOG.md +7 -0
- package/dist/experimental.cjs +54 -3
- package/dist/experimental.d.mts +4 -4
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.mjs +53 -4
- package/dist/{index-DjLMJ3w8.d.mts → index-rIzBEINC.d.mts} +62 -1
- package/dist/{index-DjLMJ3w8.d.ts → index-rIzBEINC.d.ts} +62 -1
- package/dist/index.cjs +51 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +50 -3
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +4 -4
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +2 -1
- package/dist/plugins/eventEmission/builders.d.ts.map +1 -1
- package/dist/plugins/eventEmission/builders.js +7 -2
- package/dist/plugins/eventEmission/utils.d.ts +54 -0
- package/dist/plugins/eventEmission/utils.d.ts.map +1 -1
- package/dist/plugins/eventEmission/utils.js +97 -0
- package/dist/types/telemetry-events.d.ts +7 -0
- package/dist/types/telemetry-events.d.ts.map +1 -1
- package/dist/types/telemetry-events.js +2 -0
- package/package.json +1 -1
|
@@ -3087,6 +3087,8 @@ type BaseSdkOptions = z.infer<typeof BaseSdkOptionsSchema>;
|
|
|
3087
3087
|
* These interfaces correspond to the Avro schemas:
|
|
3088
3088
|
* - application_lifecycle_event.avsc
|
|
3089
3089
|
* - error_occurred_event.avsc
|
|
3090
|
+
* - method_called_event.avsc
|
|
3091
|
+
* - cli_command_executed_event.avsc
|
|
3090
3092
|
*/
|
|
3091
3093
|
interface BaseEvent {
|
|
3092
3094
|
event_id: string;
|
|
@@ -3126,6 +3128,7 @@ interface ErrorOccurredEvent extends BaseEvent {
|
|
|
3126
3128
|
recovery_successful?: boolean | null;
|
|
3127
3129
|
environment?: string | null;
|
|
3128
3130
|
execution_time_before_error_ms?: number | null;
|
|
3131
|
+
agent?: string | null;
|
|
3129
3132
|
}
|
|
3130
3133
|
interface ApplicationLifecycleEvent extends BaseEvent {
|
|
3131
3134
|
lifecycle_event_type: "startup" | "exit" | "signal_termination" | "signup_success" | "login_success";
|
|
@@ -3153,6 +3156,9 @@ interface ApplicationLifecycleEvent extends BaseEvent {
|
|
|
3153
3156
|
is_graceful_shutdown?: boolean | null;
|
|
3154
3157
|
shutdown_duration_ms?: number | null;
|
|
3155
3158
|
active_requests_count?: number | null;
|
|
3159
|
+
stdin_is_tty?: boolean | null;
|
|
3160
|
+
stdout_is_tty?: boolean | null;
|
|
3161
|
+
agent?: string | null;
|
|
3156
3162
|
}
|
|
3157
3163
|
interface MethodCalledEvent extends BaseEvent {
|
|
3158
3164
|
method_name: string;
|
|
@@ -3182,6 +3188,7 @@ interface MethodCalledEvent extends BaseEvent {
|
|
|
3182
3188
|
is_synchronous: boolean | null;
|
|
3183
3189
|
cpu_time_ms: number | null;
|
|
3184
3190
|
memory_usage_bytes: number | null;
|
|
3191
|
+
agent: string | null;
|
|
3185
3192
|
}
|
|
3186
3193
|
|
|
3187
3194
|
/**
|
|
@@ -3324,6 +3331,60 @@ declare function getMemoryUsage(): number | null;
|
|
|
3324
3331
|
* Get CPU time in milliseconds
|
|
3325
3332
|
*/
|
|
3326
3333
|
declare function getCpuTime(): number | null;
|
|
3334
|
+
/**
|
|
3335
|
+
* Whether stdin and stdout are each attached to an interactive terminal (TTY).
|
|
3336
|
+
* Both fields resolve to null together when process is unavailable.
|
|
3337
|
+
*
|
|
3338
|
+
* Never throws — try/catch guards event emission from monkeypatched streams or
|
|
3339
|
+
* other exotic environments.
|
|
3340
|
+
*/
|
|
3341
|
+
declare function getTtyContext(): {
|
|
3342
|
+
stdin_is_tty: boolean | null;
|
|
3343
|
+
stdout_is_tty: boolean | null;
|
|
3344
|
+
};
|
|
3345
|
+
/**
|
|
3346
|
+
* Detects which AI coding agent is executing the current process by inspecting
|
|
3347
|
+
* well-known environment variables set by each agent's runtime.
|
|
3348
|
+
*
|
|
3349
|
+
* Claude Code
|
|
3350
|
+
* CLAUDECODE — set to "1" in all subprocesses spawned by Claude Code
|
|
3351
|
+
* https://code.claude.com/docs/en/env-vars
|
|
3352
|
+
*
|
|
3353
|
+
* GitHub Copilot
|
|
3354
|
+
* COPILOT_AGENT — set to "1" in VS Code agent terminal sessions
|
|
3355
|
+
* https://github.com/microsoft/vscode/pull/316267
|
|
3356
|
+
*
|
|
3357
|
+
* Cursor
|
|
3358
|
+
* CURSOR_AGENT — set to "1" by Cursor when executing terminal commands
|
|
3359
|
+
* https://cursor.com/docs/agent/tools/terminal
|
|
3360
|
+
*
|
|
3361
|
+
* Codex CLI
|
|
3362
|
+
* CODEX_SANDBOX — set to "seatbelt" (macOS) or a non-empty string (Linux/Windows)
|
|
3363
|
+
* https://github.com/openai/codex/blob/main/codex-rs/core/src/spawn.rs
|
|
3364
|
+
*
|
|
3365
|
+
* Gemini CLI
|
|
3366
|
+
* GEMINI_CLI — set to "1" in subprocesses spawned by Gemini CLI's shell tool
|
|
3367
|
+
* https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/services/shellExecutionService.ts
|
|
3368
|
+
*
|
|
3369
|
+
* Augment
|
|
3370
|
+
* AUGMENT_AGENT — set to "1" when Auggie executes shell commands via its launch-process tool
|
|
3371
|
+
* https://docs.augmentcode.com/cli/reference
|
|
3372
|
+
*
|
|
3373
|
+
* Cline
|
|
3374
|
+
* CLINE_ACTIVE — set to "true" when Cline is executing terminal commands
|
|
3375
|
+
* https://github.com/cline/cline/pull/5367
|
|
3376
|
+
*
|
|
3377
|
+
* OpenCode
|
|
3378
|
+
* OPENCODE_CLIENT — client identifier set by OpenCode (defaults to "cli")
|
|
3379
|
+
* https://anomalyco-opencode.mintlify.app/cli/overview#environment-variables
|
|
3380
|
+
*
|
|
3381
|
+
* Returns null if no known agent is detected or process is unavailable.
|
|
3382
|
+
*
|
|
3383
|
+
* Never throws: try/catch guards against exotic environments (e.g. a Proxy on
|
|
3384
|
+
* globalThis.process) where property access could unexpectedly fail. Event
|
|
3385
|
+
* emission must never cascade into a thrown exception.
|
|
3386
|
+
*/
|
|
3387
|
+
declare function getAgent(): string | null;
|
|
3327
3388
|
|
|
3328
3389
|
/**
|
|
3329
3390
|
* Removes all registered process event listeners.
|
|
@@ -15267,4 +15328,4 @@ declare const registryPlugin: (sdk: {
|
|
|
15267
15328
|
};
|
|
15268
15329
|
}) => {};
|
|
15269
15330
|
|
|
15270
|
-
export { createFunction as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type Choice as H, type ActionExecutionResult as I, type ActionField as J, type ActionFieldChoice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type NeedsRequest as Q, type ResolvedAppLocator as R, type NeedsResponse as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type Connection as V, type WatchTriggerInboxOptions as W, type ConnectionsResponse as X, type UserProfile as Y, type ZapierSdkOptions as Z, isPositional as _, type PluginMeta as a, ActionPropertySchema as a$, createPluginStack as a0, createCorePlugin as a1, addPlugin as a2, type FormattedItem as a3, type Resolver as a4, type ArrayResolver as a5, type ResolverMetadata as a6, type StaticResolver as a7, type DynamicListResolver as a8, type DynamicSearchResolver as a9, definePlugin as aA, createPluginMethod as aB, createPaginatedPluginMethod as aC, composePlugins as aD, type ActionItem as aE, type ActionTypeItem as aF, registryPlugin as aG, type RequestOptions as aH, type PollOptions as aI, createZapierApi as aJ, getOrCreateApiClient as aK, isPermanentHttpError as aL, type SseMessage as aM, type JsonSseMessage as aN, type AppItem as aO, type ConnectionItem as aP, type ActionItem$1 as aQ, type InputFieldItem as aR, type InfoFieldItem as aS, type RootFieldItem as aT, type UserProfileItem as aU, type SdkPage as aV, type PaginatedSdkFunction as aW, AppKeyPropertySchema as aX, AppPropertySchema as aY, ActionTypePropertySchema as aZ, ActionKeyPropertySchema as a_, type FieldsResolver as aa, runInMethodScope as ab, runWithTelemetryContext as ac, toSnakeCase as ad, toTitleCase as ae, batch as af, type BatchOptions as ag, buildCapabilityMessage as ah, logDeprecation as ai, resetDeprecationWarnings as aj, RelayRequestSchema as ak, RelayFetchSchema as al, createZapierSdkWithoutRegistry as am, createSdk as an, createOptionsPlugin as ao, createZapierCoreStack as ap, type FunctionRegistryEntry as aq, type FunctionDeprecation as ar, BaseSdkOptionsSchema as as, isCoreError as at, getCoreErrorCode as au, getCoreErrorCause as av, CORE_ERROR_SYMBOL as aw, CoreErrorCode as ax, type Plugin as ay, type PluginProvides as az, type Manifest as b, ZapierTimeoutError as b$, InputFieldPropertySchema as b0, ConnectionIdPropertySchema as b1, AuthenticationIdPropertySchema as b2, ConnectionPropertySchema as b3, InputsPropertySchema as b4, LimitPropertySchema as b5, OffsetPropertySchema as b6, OutputPropertySchema as b7, DebugPropertySchema as b8, ParamsPropertySchema as b9, type DebugProperty as bA, type ParamsProperty as bB, type ActionTimeoutMsProperty as bC, type TableProperty as bD, type RecordProperty as bE, type RecordsProperty as bF, type FieldsProperty as bG, type AppsProperty as bH, type TablesProperty as bI, type ConnectionsProperty as bJ, type TriggerInboxProperty as bK, type TriggerInboxNameProperty as bL, type LeaseProperty as bM, type LeaseSecondsProperty as bN, type LeaseLimitProperty as bO, type ErrorOptions as bP, ZapierError as bQ, ZapierValidationError as bR, ZapierUnknownError as bS, ZapierAuthenticationError as bT, zapierAdaptError as bU, ZapierApiError as bV, ZapierAppNotFoundError as bW, ZapierNotFoundError as bX, ZapierResourceNotFoundError as bY, ZapierConfigurationError as bZ, ZapierBundleError as b_, ActionTimeoutMsPropertySchema as ba, TablePropertySchema as bb, RecordPropertySchema as bc, RecordsPropertySchema as bd, FieldsPropertySchema as be, AppsPropertySchema as bf, TablesPropertySchema as bg, ConnectionsPropertySchema as bh, TriggerInboxPropertySchema as bi, TriggerInboxNamePropertySchema as bj, LeasePropertySchema as bk, LeaseSecondsPropertySchema as bl, LeaseLimitPropertySchema as bm, type AppKeyProperty as bn, type AppProperty as bo, type ActionTypeProperty as bp, type ActionKeyProperty as bq, type ActionProperty as br, type InputFieldProperty as bs, type ConnectionIdProperty as bt, type ConnectionProperty as bu, type AuthenticationIdProperty as bv, type InputsProperty as bw, type LimitProperty as bx, type OffsetProperty as by, type OutputProperty as bz, type UpdateManifestEntryResult as c, actionKeyResolver as c$, ZapierActionError as c0, ZapierConflictError as c1, type RateLimitInfo as c2, ZapierRateLimitError as c3, type ApprovalStatus as c4, ZapierApprovalError as c5, ZapierRelayError as c6, formatErrorMessage as c7, type ApiError as c8, ZapierSignal as c9, getActionPlugin as cA, type GetActionPluginProvides as cB, getConnectionPlugin as cC, type GetConnectionPluginProvides as cD, findFirstConnectionPlugin as cE, type FindFirstConnectionPluginProvides as cF, findUniqueConnectionPlugin as cG, type FindUniqueConnectionPluginProvides as cH, CONTEXT_CACHE_TTL_MS as cI, CONTEXT_CACHE_MAX_SIZE as cJ, runActionPlugin as cK, type RunActionPluginProvides as cL, requestPlugin as cM, type RequestPluginProvides as cN, type ManifestPluginOptions as cO, getPreferredManifestEntryKey as cP, manifestPlugin as cQ, type ManifestPluginProvides as cR, DEFAULT_CONFIG_PATH as cS, type ManifestEntry as cT, getProfilePlugin as cU, type GetProfilePluginProvides as cV, type ApiPluginOptions as cW, apiPlugin as cX, type ApiPluginProvides as cY, appKeyResolver as cZ, actionTypeResolver as c_, appsPlugin as ca, type AppsPluginProvides as cb, type ActionExecutionOptions as cc, type AppFactoryInput as cd, fetchPlugin as ce, type FetchPluginProvides as cf, listAppsPlugin as cg, type ListAppsPluginProvides as ch, listActionsPlugin as ci, type ListActionsPluginProvides as cj, listActionInputFieldsPlugin as ck, type ListActionInputFieldsPluginProvides as cl, listActionInputFieldChoicesPlugin as cm, type ListActionInputFieldChoicesPluginProvides as cn, getActionInputFieldsSchemaPlugin as co, type GetActionInputFieldsSchemaPluginProvides as cp, listConnectionsPlugin as cq, type ListConnectionsPluginProvides as cr, listClientCredentialsPlugin as cs, type ListClientCredentialsPluginProvides as ct, createClientCredentialsPlugin as cu, type CreateClientCredentialsPluginProvides as cv, deleteClientCredentialsPlugin as cw, type DeleteClientCredentialsPluginProvides as cx, getAppPlugin as cy, type GetAppPluginProvides as cz, type AddActionEntryOptions as d, type ConnectionEntry as d$, connectionIdResolver as d0, connectionIdGenericResolver as d1, inputsResolver as d2, inputsAllOptionalResolver as d3, inputFieldKeyResolver as d4, clientCredentialsNameResolver as d5, clientIdResolver as d6, tableIdResolver as d7, triggerInboxResolver as d8, workflowIdResolver as d9, type SdkEvent as dA, type AuthEvent as dB, type ApiEvent as dC, type LoadingEvent as dD, type EventCallback as dE, type Credentials as dF, type ResolvedCredentials as dG, type CredentialsObject as dH, type ClientCredentialsObject as dI, type PkceCredentialsObject as dJ, isClientCredentials as dK, isPkceCredentials as dL, isCredentialsObject as dM, isCredentialsFunction as dN, type ResolveCredentialsOptions as dO, resolveCredentialsFromEnv as dP, resolveCredentials as dQ, getBaseUrlFromCredentials as dR, getClientIdFromCredentials as dS, ClientCredentialsObjectSchema as dT, PkceCredentialsObjectSchema as dU, CredentialsObjectSchema as dV, ResolvedCredentialsSchema as dW, CredentialsFunctionSchema as dX, type CredentialsFunction as dY, CredentialsSchema as dZ, ConnectionEntrySchema as d_, durableRunIdResolver as da, workflowVersionIdResolver as db, workflowRunIdResolver as dc, triggerMessagesResolver as dd, tableRecordIdResolver as de, tableRecordIdsResolver as df, tableFieldIdsResolver as dg, tableNameResolver as dh, tableFieldsResolver as di, tableRecordsResolver as dj, tableUpdateRecordsResolver as dk, tableFiltersResolver as dl, tableSortResolver as dm, type ResolveAuthTokenOptions as dn, clearTokenCache as dp, invalidateCachedToken as dq, injectCliLogin as dr, isCliLoginAvailable as ds, getTokenFromCliLogin as dt, resolveAuthToken as du, invalidateCredentialsToken as dv, type ZapierCache as dw, type ZapierCacheEntry as dx, type ZapierCacheSetOptions as dy, createMemoryCache as dz, type AddActionEntryResult as e, getCiPlatform as e$, ConnectionsMapSchema as e0, type ConnectionsMap as e1, connectionsPlugin as e2, type ConnectionsPluginProvides as e3, ZAPIER_BASE_URL as e4, getZapierSdkService as e5, MAX_PAGE_LIMIT as e6, DEFAULT_PAGE_SIZE as e7, DEFAULT_ACTION_TIMEOUT_MS as e8, ZAPIER_MAX_NETWORK_RETRIES as e9, createTableRecordsPlugin as eA, type CreateTableRecordsPluginProvides as eB, deleteTableRecordsPlugin as eC, type DeleteTableRecordsPluginProvides as eD, updateTableRecordsPlugin as eE, type UpdateTableRecordsPluginProvides as eF, cleanupEventListeners as eG, type EventEmissionConfig as eH, eventEmissionPlugin as eI, type EventEmissionProvides as eJ, type EventContext as eK, type ApplicationLifecycleEventData as eL, type EnhancedErrorEventData as eM, type MethodCalledEventData as eN, buildApplicationLifecycleEvent as eO, buildErrorEventWithContext as eP, buildErrorEvent as eQ, createBaseEvent as eR, buildMethodCalledEvent as eS, type BaseEvent as eT, type MethodCalledEvent as eU, generateEventId as eV, getCurrentTimestamp as eW, getReleaseId as eX, getOsInfo as eY, getPlatformVersions as eZ, isCi as e_, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ea, MAX_CONCURRENCY_LIMIT as eb, parseConcurrencyEnvVar as ec, ZAPIER_MAX_CONCURRENT_REQUESTS as ed, getZapierApprovalMode as ee, getZapierDefaultApprovalMode as ef, DEFAULT_APPROVAL_TIMEOUT_MS as eg, DEFAULT_MAX_APPROVAL_RETRIES as eh, listTablesPlugin as ei, type ListTablesPluginProvides as ej, getTablePlugin as ek, type GetTablePluginProvides as el, createTablePlugin as em, type CreateTablePluginProvides as en, deleteTablePlugin as eo, type DeleteTablePluginProvides as ep, listTableFieldsPlugin as eq, type ListTableFieldsPluginProvides as er, createTableFieldsPlugin as es, type CreateTableFieldsPluginProvides as et, deleteTableFieldsPlugin as eu, type DeleteTableFieldsPluginProvides as ev, getTableRecordPlugin as ew, type GetTableRecordPluginProvides as ex, listTableRecordsPlugin as ey, type ListTableRecordsPluginProvides as ez, type ActionEntry as f, getMemoryUsage as f0, getCpuTime as f1, createZapierSdk as f2, createZapierSdkStack as f3, type ZapierSdk as f4, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type PositionalMetadata as j, type ZapierFetchInitOptions as k, type DynamicResolver as l, type ActionProxy as m, type ZapierSdkApps as n, type WithAddPlugin as o, ZapierAbortDrainSignal as p, ZapierReleaseTriggerMessageSignal as q, readManifestFromFile as r, type DrainTriggerInboxCallback as s, type DrainTriggerInboxErrorObserver as t, type ListAuthenticationsPluginProvides as u, type FindFirstAuthenticationPluginProvides as v, type FindUniqueAuthenticationPluginProvides as w, type Action as x, type App as y, type Field as z };
|
|
15331
|
+
export { createFunction as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type Choice as H, type ActionExecutionResult as I, type ActionField as J, type ActionFieldChoice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type NeedsRequest as Q, type ResolvedAppLocator as R, type NeedsResponse as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type Connection as V, type WatchTriggerInboxOptions as W, type ConnectionsResponse as X, type UserProfile as Y, type ZapierSdkOptions as Z, isPositional as _, type PluginMeta as a, ActionPropertySchema as a$, createPluginStack as a0, createCorePlugin as a1, addPlugin as a2, type FormattedItem as a3, type Resolver as a4, type ArrayResolver as a5, type ResolverMetadata as a6, type StaticResolver as a7, type DynamicListResolver as a8, type DynamicSearchResolver as a9, definePlugin as aA, createPluginMethod as aB, createPaginatedPluginMethod as aC, composePlugins as aD, type ActionItem as aE, type ActionTypeItem as aF, registryPlugin as aG, type RequestOptions as aH, type PollOptions as aI, createZapierApi as aJ, getOrCreateApiClient as aK, isPermanentHttpError as aL, type SseMessage as aM, type JsonSseMessage as aN, type AppItem as aO, type ConnectionItem as aP, type ActionItem$1 as aQ, type InputFieldItem as aR, type InfoFieldItem as aS, type RootFieldItem as aT, type UserProfileItem as aU, type SdkPage as aV, type PaginatedSdkFunction as aW, AppKeyPropertySchema as aX, AppPropertySchema as aY, ActionTypePropertySchema as aZ, ActionKeyPropertySchema as a_, type FieldsResolver as aa, runInMethodScope as ab, runWithTelemetryContext as ac, toSnakeCase as ad, toTitleCase as ae, batch as af, type BatchOptions as ag, buildCapabilityMessage as ah, logDeprecation as ai, resetDeprecationWarnings as aj, RelayRequestSchema as ak, RelayFetchSchema as al, createZapierSdkWithoutRegistry as am, createSdk as an, createOptionsPlugin as ao, createZapierCoreStack as ap, type FunctionRegistryEntry as aq, type FunctionDeprecation as ar, BaseSdkOptionsSchema as as, isCoreError as at, getCoreErrorCode as au, getCoreErrorCause as av, CORE_ERROR_SYMBOL as aw, CoreErrorCode as ax, type Plugin as ay, type PluginProvides as az, type Manifest as b, ZapierTimeoutError as b$, InputFieldPropertySchema as b0, ConnectionIdPropertySchema as b1, AuthenticationIdPropertySchema as b2, ConnectionPropertySchema as b3, InputsPropertySchema as b4, LimitPropertySchema as b5, OffsetPropertySchema as b6, OutputPropertySchema as b7, DebugPropertySchema as b8, ParamsPropertySchema as b9, type DebugProperty as bA, type ParamsProperty as bB, type ActionTimeoutMsProperty as bC, type TableProperty as bD, type RecordProperty as bE, type RecordsProperty as bF, type FieldsProperty as bG, type AppsProperty as bH, type TablesProperty as bI, type ConnectionsProperty as bJ, type TriggerInboxProperty as bK, type TriggerInboxNameProperty as bL, type LeaseProperty as bM, type LeaseSecondsProperty as bN, type LeaseLimitProperty as bO, type ErrorOptions as bP, ZapierError as bQ, ZapierValidationError as bR, ZapierUnknownError as bS, ZapierAuthenticationError as bT, zapierAdaptError as bU, ZapierApiError as bV, ZapierAppNotFoundError as bW, ZapierNotFoundError as bX, ZapierResourceNotFoundError as bY, ZapierConfigurationError as bZ, ZapierBundleError as b_, ActionTimeoutMsPropertySchema as ba, TablePropertySchema as bb, RecordPropertySchema as bc, RecordsPropertySchema as bd, FieldsPropertySchema as be, AppsPropertySchema as bf, TablesPropertySchema as bg, ConnectionsPropertySchema as bh, TriggerInboxPropertySchema as bi, TriggerInboxNamePropertySchema as bj, LeasePropertySchema as bk, LeaseSecondsPropertySchema as bl, LeaseLimitPropertySchema as bm, type AppKeyProperty as bn, type AppProperty as bo, type ActionTypeProperty as bp, type ActionKeyProperty as bq, type ActionProperty as br, type InputFieldProperty as bs, type ConnectionIdProperty as bt, type ConnectionProperty as bu, type AuthenticationIdProperty as bv, type InputsProperty as bw, type LimitProperty as bx, type OffsetProperty as by, type OutputProperty as bz, type UpdateManifestEntryResult as c, actionKeyResolver as c$, ZapierActionError as c0, ZapierConflictError as c1, type RateLimitInfo as c2, ZapierRateLimitError as c3, type ApprovalStatus as c4, ZapierApprovalError as c5, ZapierRelayError as c6, formatErrorMessage as c7, type ApiError as c8, ZapierSignal as c9, getActionPlugin as cA, type GetActionPluginProvides as cB, getConnectionPlugin as cC, type GetConnectionPluginProvides as cD, findFirstConnectionPlugin as cE, type FindFirstConnectionPluginProvides as cF, findUniqueConnectionPlugin as cG, type FindUniqueConnectionPluginProvides as cH, CONTEXT_CACHE_TTL_MS as cI, CONTEXT_CACHE_MAX_SIZE as cJ, runActionPlugin as cK, type RunActionPluginProvides as cL, requestPlugin as cM, type RequestPluginProvides as cN, type ManifestPluginOptions as cO, getPreferredManifestEntryKey as cP, manifestPlugin as cQ, type ManifestPluginProvides as cR, DEFAULT_CONFIG_PATH as cS, type ManifestEntry as cT, getProfilePlugin as cU, type GetProfilePluginProvides as cV, type ApiPluginOptions as cW, apiPlugin as cX, type ApiPluginProvides as cY, appKeyResolver as cZ, actionTypeResolver as c_, appsPlugin as ca, type AppsPluginProvides as cb, type ActionExecutionOptions as cc, type AppFactoryInput as cd, fetchPlugin as ce, type FetchPluginProvides as cf, listAppsPlugin as cg, type ListAppsPluginProvides as ch, listActionsPlugin as ci, type ListActionsPluginProvides as cj, listActionInputFieldsPlugin as ck, type ListActionInputFieldsPluginProvides as cl, listActionInputFieldChoicesPlugin as cm, type ListActionInputFieldChoicesPluginProvides as cn, getActionInputFieldsSchemaPlugin as co, type GetActionInputFieldsSchemaPluginProvides as cp, listConnectionsPlugin as cq, type ListConnectionsPluginProvides as cr, listClientCredentialsPlugin as cs, type ListClientCredentialsPluginProvides as ct, createClientCredentialsPlugin as cu, type CreateClientCredentialsPluginProvides as cv, deleteClientCredentialsPlugin as cw, type DeleteClientCredentialsPluginProvides as cx, getAppPlugin as cy, type GetAppPluginProvides as cz, type AddActionEntryOptions as d, type ConnectionEntry as d$, connectionIdResolver as d0, connectionIdGenericResolver as d1, inputsResolver as d2, inputsAllOptionalResolver as d3, inputFieldKeyResolver as d4, clientCredentialsNameResolver as d5, clientIdResolver as d6, tableIdResolver as d7, triggerInboxResolver as d8, workflowIdResolver as d9, type SdkEvent as dA, type AuthEvent as dB, type ApiEvent as dC, type LoadingEvent as dD, type EventCallback as dE, type Credentials as dF, type ResolvedCredentials as dG, type CredentialsObject as dH, type ClientCredentialsObject as dI, type PkceCredentialsObject as dJ, isClientCredentials as dK, isPkceCredentials as dL, isCredentialsObject as dM, isCredentialsFunction as dN, type ResolveCredentialsOptions as dO, resolveCredentialsFromEnv as dP, resolveCredentials as dQ, getBaseUrlFromCredentials as dR, getClientIdFromCredentials as dS, ClientCredentialsObjectSchema as dT, PkceCredentialsObjectSchema as dU, CredentialsObjectSchema as dV, ResolvedCredentialsSchema as dW, CredentialsFunctionSchema as dX, type CredentialsFunction as dY, CredentialsSchema as dZ, ConnectionEntrySchema as d_, durableRunIdResolver as da, workflowVersionIdResolver as db, workflowRunIdResolver as dc, triggerMessagesResolver as dd, tableRecordIdResolver as de, tableRecordIdsResolver as df, tableFieldIdsResolver as dg, tableNameResolver as dh, tableFieldsResolver as di, tableRecordsResolver as dj, tableUpdateRecordsResolver as dk, tableFiltersResolver as dl, tableSortResolver as dm, type ResolveAuthTokenOptions as dn, clearTokenCache as dp, invalidateCachedToken as dq, injectCliLogin as dr, isCliLoginAvailable as ds, getTokenFromCliLogin as dt, resolveAuthToken as du, invalidateCredentialsToken as dv, type ZapierCache as dw, type ZapierCacheEntry as dx, type ZapierCacheSetOptions as dy, createMemoryCache as dz, type AddActionEntryResult as e, getCiPlatform as e$, ConnectionsMapSchema as e0, type ConnectionsMap as e1, connectionsPlugin as e2, type ConnectionsPluginProvides as e3, ZAPIER_BASE_URL as e4, getZapierSdkService as e5, MAX_PAGE_LIMIT as e6, DEFAULT_PAGE_SIZE as e7, DEFAULT_ACTION_TIMEOUT_MS as e8, ZAPIER_MAX_NETWORK_RETRIES as e9, createTableRecordsPlugin as eA, type CreateTableRecordsPluginProvides as eB, deleteTableRecordsPlugin as eC, type DeleteTableRecordsPluginProvides as eD, updateTableRecordsPlugin as eE, type UpdateTableRecordsPluginProvides as eF, cleanupEventListeners as eG, type EventEmissionConfig as eH, eventEmissionPlugin as eI, type EventEmissionProvides as eJ, type EventContext as eK, type ApplicationLifecycleEventData as eL, type EnhancedErrorEventData as eM, type MethodCalledEventData as eN, buildApplicationLifecycleEvent as eO, buildErrorEventWithContext as eP, buildErrorEvent as eQ, createBaseEvent as eR, buildMethodCalledEvent as eS, type BaseEvent as eT, type MethodCalledEvent as eU, generateEventId as eV, getCurrentTimestamp as eW, getReleaseId as eX, getOsInfo as eY, getPlatformVersions as eZ, isCi as e_, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ea, MAX_CONCURRENCY_LIMIT as eb, parseConcurrencyEnvVar as ec, ZAPIER_MAX_CONCURRENT_REQUESTS as ed, getZapierApprovalMode as ee, getZapierDefaultApprovalMode as ef, DEFAULT_APPROVAL_TIMEOUT_MS as eg, DEFAULT_MAX_APPROVAL_RETRIES as eh, listTablesPlugin as ei, type ListTablesPluginProvides as ej, getTablePlugin as ek, type GetTablePluginProvides as el, createTablePlugin as em, type CreateTablePluginProvides as en, deleteTablePlugin as eo, type DeleteTablePluginProvides as ep, listTableFieldsPlugin as eq, type ListTableFieldsPluginProvides as er, createTableFieldsPlugin as es, type CreateTableFieldsPluginProvides as et, deleteTableFieldsPlugin as eu, type DeleteTableFieldsPluginProvides as ev, getTableRecordPlugin as ew, type GetTableRecordPluginProvides as ex, listTableRecordsPlugin as ey, type ListTableRecordsPluginProvides as ez, type ActionEntry as f, getMemoryUsage as f0, getCpuTime as f1, getTtyContext as f2, getAgent as f3, createZapierSdk as f4, createZapierSdkStack as f5, type ZapierSdk as f6, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type PositionalMetadata as j, type ZapierFetchInitOptions as k, type DynamicResolver as l, type ActionProxy as m, type ZapierSdkApps as n, type WithAddPlugin as o, ZapierAbortDrainSignal as p, ZapierReleaseTriggerMessageSignal as q, readManifestFromFile as r, type DrainTriggerInboxCallback as s, type DrainTriggerInboxErrorObserver as t, type ListAuthenticationsPluginProvides as u, type FindFirstAuthenticationPluginProvides as v, type FindUniqueAuthenticationPluginProvides as w, type Action as x, type App as y, type Field as z };
|
package/dist/index.cjs
CHANGED
|
@@ -6781,7 +6781,7 @@ function createSseParserStream() {
|
|
|
6781
6781
|
}
|
|
6782
6782
|
|
|
6783
6783
|
// src/sdk-version.ts
|
|
6784
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.
|
|
6784
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.3" : void 0) || "unknown";
|
|
6785
6785
|
|
|
6786
6786
|
// src/utils/open-url.ts
|
|
6787
6787
|
var nodePrefix = "node:";
|
|
@@ -9083,6 +9083,48 @@ function getCpuTime() {
|
|
|
9083
9083
|
}
|
|
9084
9084
|
return null;
|
|
9085
9085
|
}
|
|
9086
|
+
function getTtyContext() {
|
|
9087
|
+
try {
|
|
9088
|
+
const proc = globalThis.process;
|
|
9089
|
+
if (!proc) return { stdin_is_tty: null, stdout_is_tty: null };
|
|
9090
|
+
return {
|
|
9091
|
+
stdin_is_tty: proc.stdin?.isTTY === true,
|
|
9092
|
+
stdout_is_tty: proc.stdout?.isTTY === true
|
|
9093
|
+
};
|
|
9094
|
+
} catch {
|
|
9095
|
+
return { stdin_is_tty: null, stdout_is_tty: null };
|
|
9096
|
+
}
|
|
9097
|
+
}
|
|
9098
|
+
var isTruthy = (value) => {
|
|
9099
|
+
const lower = value.toLowerCase();
|
|
9100
|
+
return lower === "1" || lower === "true";
|
|
9101
|
+
};
|
|
9102
|
+
var isNonEmpty = (value) => value !== "";
|
|
9103
|
+
var agentDetectors = [
|
|
9104
|
+
{ name: "claude-code", key: "CLAUDECODE", predicate: isTruthy },
|
|
9105
|
+
{ name: "github-copilot", key: "COPILOT_AGENT", predicate: isTruthy },
|
|
9106
|
+
{ name: "cursor", key: "CURSOR_AGENT", predicate: isTruthy },
|
|
9107
|
+
{ name: "codex", key: "CODEX_SANDBOX", predicate: isNonEmpty },
|
|
9108
|
+
{ name: "gemini-cli", key: "GEMINI_CLI", predicate: isTruthy },
|
|
9109
|
+
{ name: "augment", key: "AUGMENT_AGENT", predicate: isTruthy },
|
|
9110
|
+
{ name: "cline", key: "CLINE_ACTIVE", predicate: isTruthy },
|
|
9111
|
+
{ name: "opencode", key: "OPENCODE_CLIENT", predicate: isNonEmpty }
|
|
9112
|
+
];
|
|
9113
|
+
function getAgent() {
|
|
9114
|
+
try {
|
|
9115
|
+
const env = globalThis.process?.env;
|
|
9116
|
+
if (!env) return null;
|
|
9117
|
+
for (const detector of agentDetectors) {
|
|
9118
|
+
const value = env[detector.key];
|
|
9119
|
+
if (value !== void 0 && detector.predicate(value)) {
|
|
9120
|
+
return detector.name;
|
|
9121
|
+
}
|
|
9122
|
+
}
|
|
9123
|
+
return null;
|
|
9124
|
+
} catch {
|
|
9125
|
+
return null;
|
|
9126
|
+
}
|
|
9127
|
+
}
|
|
9086
9128
|
|
|
9087
9129
|
// src/plugins/eventEmission/builders.ts
|
|
9088
9130
|
function createBaseEvent(context = {}) {
|
|
@@ -9107,6 +9149,7 @@ function buildErrorEvent(data, context = {}) {
|
|
|
9107
9149
|
app_version_id: context.app_version_id,
|
|
9108
9150
|
environment: context.environment,
|
|
9109
9151
|
...data,
|
|
9152
|
+
agent: getAgent(),
|
|
9110
9153
|
sdk_version: SDK_VERSION
|
|
9111
9154
|
};
|
|
9112
9155
|
}
|
|
@@ -9128,6 +9171,8 @@ function buildApplicationLifecycleEvent(data, context = {}) {
|
|
|
9128
9171
|
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
9129
9172
|
is_ci_environment: isCi(),
|
|
9130
9173
|
ci_platform: getCiPlatform(),
|
|
9174
|
+
...getTtyContext(),
|
|
9175
|
+
agent: getAgent(),
|
|
9131
9176
|
session_id: null,
|
|
9132
9177
|
metadata: null,
|
|
9133
9178
|
process_argv: globalThis.process?.argv || null,
|
|
@@ -9147,6 +9192,7 @@ function buildErrorEventWithContext(data, context = {}) {
|
|
|
9147
9192
|
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
9148
9193
|
execution_time_before_error_ms: executionTime,
|
|
9149
9194
|
...data,
|
|
9195
|
+
agent: getAgent(),
|
|
9150
9196
|
sdk_version: SDK_VERSION
|
|
9151
9197
|
};
|
|
9152
9198
|
}
|
|
@@ -9161,7 +9207,7 @@ function buildMethodCalledEvent(data, context = {}) {
|
|
|
9161
9207
|
error_type: data.error_type ?? null,
|
|
9162
9208
|
argument_count: data.argument_count,
|
|
9163
9209
|
is_paginated: data.is_paginated ?? false,
|
|
9164
|
-
environment: context.environment ?? (process?.env?.NODE_ENV || null),
|
|
9210
|
+
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
9165
9211
|
selected_api: data.selected_api ?? context.selected_api ?? null,
|
|
9166
9212
|
app_id: context.app_id ?? null,
|
|
9167
9213
|
app_version_id: context.app_version_id ?? null,
|
|
@@ -9179,6 +9225,7 @@ function buildMethodCalledEvent(data, context = {}) {
|
|
|
9179
9225
|
is_synchronous: false,
|
|
9180
9226
|
cpu_time_ms: null,
|
|
9181
9227
|
memory_usage_bytes: null,
|
|
9228
|
+
agent: getAgent(),
|
|
9182
9229
|
sdk_version: SDK_VERSION
|
|
9183
9230
|
};
|
|
9184
9231
|
}
|
|
@@ -9791,6 +9838,7 @@ exports.formatErrorMessage = formatErrorMessage;
|
|
|
9791
9838
|
exports.generateEventId = generateEventId;
|
|
9792
9839
|
exports.getActionInputFieldsSchemaPlugin = getActionInputFieldsSchemaPlugin;
|
|
9793
9840
|
exports.getActionPlugin = getActionPlugin;
|
|
9841
|
+
exports.getAgent = getAgent;
|
|
9794
9842
|
exports.getAppPlugin = getAppPlugin;
|
|
9795
9843
|
exports.getBaseUrlFromCredentials = getBaseUrlFromCredentials;
|
|
9796
9844
|
exports.getCiPlatform = getCiPlatform;
|
|
@@ -9810,6 +9858,7 @@ exports.getReleaseId = getReleaseId;
|
|
|
9810
9858
|
exports.getTablePlugin = getTablePlugin;
|
|
9811
9859
|
exports.getTableRecordPlugin = getTableRecordPlugin;
|
|
9812
9860
|
exports.getTokenFromCliLogin = getTokenFromCliLogin;
|
|
9861
|
+
exports.getTtyContext = getTtyContext;
|
|
9813
9862
|
exports.getZapierApprovalMode = getZapierApprovalMode;
|
|
9814
9863
|
exports.getZapierDefaultApprovalMode = getZapierDefaultApprovalMode;
|
|
9815
9864
|
exports.getZapierSdkService = getZapierSdkService;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { x as Action, f as ActionEntry, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a8 as DynamicListResolver, l as DynamicResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, E as EventEmissionContext, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, F as FieldsetItem, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, b as Manifest, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, O as OutputFormatter, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, i as PaginatedSdkResult, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, a as PluginMeta, az as PluginProvides, aI as PollOptions, j as PositionalMetadata, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, R as ResolvedAppLocator, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, W as WatchTriggerInboxOptions, o as WithAddPlugin, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, k as ZapierFetchInitOptions, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, f4 as ZapierSdk, n as ZapierSdkApps, Z as ZapierSdkOptions, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, f2 as createZapierSdk, f3 as createZapierSdkStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, g as findManifestEntry, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, r as readManifestFromFile, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-DjLMJ3w8.mjs';
|
|
1
|
+
export { x as Action, f as ActionEntry, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a8 as DynamicListResolver, l as DynamicResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, E as EventEmissionContext, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, F as FieldsetItem, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, b as Manifest, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, O as OutputFormatter, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, i as PaginatedSdkResult, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, a as PluginMeta, az as PluginProvides, aI as PollOptions, j as PositionalMetadata, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, R as ResolvedAppLocator, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, W as WatchTriggerInboxOptions, o as WithAddPlugin, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, k as ZapierFetchInitOptions, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, f6 as ZapierSdk, n as ZapierSdkApps, Z as ZapierSdkOptions, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, f4 as createZapierSdk, f5 as createZapierSdkStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, g as findManifestEntry, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, f3 as getAgent, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, f2 as getTtyContext, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, r as readManifestFromFile, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-rIzBEINC.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'zod/v4/core';
|
|
4
4
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
package/dist/index.mjs
CHANGED
|
@@ -6779,7 +6779,7 @@ function createSseParserStream() {
|
|
|
6779
6779
|
}
|
|
6780
6780
|
|
|
6781
6781
|
// src/sdk-version.ts
|
|
6782
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.
|
|
6782
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.3" : void 0) || "unknown";
|
|
6783
6783
|
|
|
6784
6784
|
// src/utils/open-url.ts
|
|
6785
6785
|
var nodePrefix = "node:";
|
|
@@ -9081,6 +9081,48 @@ function getCpuTime() {
|
|
|
9081
9081
|
}
|
|
9082
9082
|
return null;
|
|
9083
9083
|
}
|
|
9084
|
+
function getTtyContext() {
|
|
9085
|
+
try {
|
|
9086
|
+
const proc = globalThis.process;
|
|
9087
|
+
if (!proc) return { stdin_is_tty: null, stdout_is_tty: null };
|
|
9088
|
+
return {
|
|
9089
|
+
stdin_is_tty: proc.stdin?.isTTY === true,
|
|
9090
|
+
stdout_is_tty: proc.stdout?.isTTY === true
|
|
9091
|
+
};
|
|
9092
|
+
} catch {
|
|
9093
|
+
return { stdin_is_tty: null, stdout_is_tty: null };
|
|
9094
|
+
}
|
|
9095
|
+
}
|
|
9096
|
+
var isTruthy = (value) => {
|
|
9097
|
+
const lower = value.toLowerCase();
|
|
9098
|
+
return lower === "1" || lower === "true";
|
|
9099
|
+
};
|
|
9100
|
+
var isNonEmpty = (value) => value !== "";
|
|
9101
|
+
var agentDetectors = [
|
|
9102
|
+
{ name: "claude-code", key: "CLAUDECODE", predicate: isTruthy },
|
|
9103
|
+
{ name: "github-copilot", key: "COPILOT_AGENT", predicate: isTruthy },
|
|
9104
|
+
{ name: "cursor", key: "CURSOR_AGENT", predicate: isTruthy },
|
|
9105
|
+
{ name: "codex", key: "CODEX_SANDBOX", predicate: isNonEmpty },
|
|
9106
|
+
{ name: "gemini-cli", key: "GEMINI_CLI", predicate: isTruthy },
|
|
9107
|
+
{ name: "augment", key: "AUGMENT_AGENT", predicate: isTruthy },
|
|
9108
|
+
{ name: "cline", key: "CLINE_ACTIVE", predicate: isTruthy },
|
|
9109
|
+
{ name: "opencode", key: "OPENCODE_CLIENT", predicate: isNonEmpty }
|
|
9110
|
+
];
|
|
9111
|
+
function getAgent() {
|
|
9112
|
+
try {
|
|
9113
|
+
const env = globalThis.process?.env;
|
|
9114
|
+
if (!env) return null;
|
|
9115
|
+
for (const detector of agentDetectors) {
|
|
9116
|
+
const value = env[detector.key];
|
|
9117
|
+
if (value !== void 0 && detector.predicate(value)) {
|
|
9118
|
+
return detector.name;
|
|
9119
|
+
}
|
|
9120
|
+
}
|
|
9121
|
+
return null;
|
|
9122
|
+
} catch {
|
|
9123
|
+
return null;
|
|
9124
|
+
}
|
|
9125
|
+
}
|
|
9084
9126
|
|
|
9085
9127
|
// src/plugins/eventEmission/builders.ts
|
|
9086
9128
|
function createBaseEvent(context = {}) {
|
|
@@ -9105,6 +9147,7 @@ function buildErrorEvent(data, context = {}) {
|
|
|
9105
9147
|
app_version_id: context.app_version_id,
|
|
9106
9148
|
environment: context.environment,
|
|
9107
9149
|
...data,
|
|
9150
|
+
agent: getAgent(),
|
|
9108
9151
|
sdk_version: SDK_VERSION
|
|
9109
9152
|
};
|
|
9110
9153
|
}
|
|
@@ -9126,6 +9169,8 @@ function buildApplicationLifecycleEvent(data, context = {}) {
|
|
|
9126
9169
|
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
9127
9170
|
is_ci_environment: isCi(),
|
|
9128
9171
|
ci_platform: getCiPlatform(),
|
|
9172
|
+
...getTtyContext(),
|
|
9173
|
+
agent: getAgent(),
|
|
9129
9174
|
session_id: null,
|
|
9130
9175
|
metadata: null,
|
|
9131
9176
|
process_argv: globalThis.process?.argv || null,
|
|
@@ -9145,6 +9190,7 @@ function buildErrorEventWithContext(data, context = {}) {
|
|
|
9145
9190
|
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
9146
9191
|
execution_time_before_error_ms: executionTime,
|
|
9147
9192
|
...data,
|
|
9193
|
+
agent: getAgent(),
|
|
9148
9194
|
sdk_version: SDK_VERSION
|
|
9149
9195
|
};
|
|
9150
9196
|
}
|
|
@@ -9159,7 +9205,7 @@ function buildMethodCalledEvent(data, context = {}) {
|
|
|
9159
9205
|
error_type: data.error_type ?? null,
|
|
9160
9206
|
argument_count: data.argument_count,
|
|
9161
9207
|
is_paginated: data.is_paginated ?? false,
|
|
9162
|
-
environment: context.environment ?? (process?.env?.NODE_ENV || null),
|
|
9208
|
+
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
9163
9209
|
selected_api: data.selected_api ?? context.selected_api ?? null,
|
|
9164
9210
|
app_id: context.app_id ?? null,
|
|
9165
9211
|
app_version_id: context.app_version_id ?? null,
|
|
@@ -9177,6 +9223,7 @@ function buildMethodCalledEvent(data, context = {}) {
|
|
|
9177
9223
|
is_synchronous: false,
|
|
9178
9224
|
cpu_time_ms: null,
|
|
9179
9225
|
memory_usage_bytes: null,
|
|
9226
|
+
agent: getAgent(),
|
|
9180
9227
|
sdk_version: SDK_VERSION
|
|
9181
9228
|
};
|
|
9182
9229
|
}
|
|
@@ -9661,4 +9708,4 @@ var registryPlugin = definePlugin((_sdk) => {
|
|
|
9661
9708
|
return {};
|
|
9662
9709
|
});
|
|
9663
9710
|
|
|
9664
|
-
export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, CORE_ERROR_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreErrorCode, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createCorePlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierCoreStack, createZapierSdk, createZapierSdkStack, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, durableRunIdResolver, eventEmissionPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreError, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation2 as logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings2 as resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runInMethodScope, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError };
|
|
9711
|
+
export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, CORE_ERROR_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreErrorCode, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createCorePlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierCoreStack, createZapierSdk, createZapierSdkStack, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, durableRunIdResolver, eventEmissionPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreError, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation2 as logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings2 as resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runInMethodScope, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError };
|
|
@@ -64,11 +64,11 @@ export declare const ExecutionSummarySchema: z.ZodObject<{
|
|
|
64
64
|
created_at: z.ZodString;
|
|
65
65
|
summary: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
66
66
|
total_attempts: z.ZodNumber;
|
|
67
|
-
last_error: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
last_error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
68
68
|
code: z.ZodString;
|
|
69
69
|
title: z.ZodString;
|
|
70
70
|
detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
-
}, z.core.$loose
|
|
71
|
+
}, z.core.$loose>>>;
|
|
72
72
|
}, z.core.$loose>>>;
|
|
73
73
|
operations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
74
74
|
id: z.ZodString;
|
|
@@ -135,11 +135,11 @@ export declare const GetDurableRunResponseSchema: z.ZodObject<{
|
|
|
135
135
|
created_at: z.ZodString;
|
|
136
136
|
summary: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
137
137
|
total_attempts: z.ZodNumber;
|
|
138
|
-
last_error: z.ZodOptional<z.ZodObject<{
|
|
138
|
+
last_error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
139
139
|
code: z.ZodString;
|
|
140
140
|
title: z.ZodString;
|
|
141
141
|
detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
|
-
}, z.core.$loose
|
|
142
|
+
}, z.core.$loose>>>;
|
|
143
143
|
}, z.core.$loose>>>;
|
|
144
144
|
operations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
145
145
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;iBAG/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyD1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/getDurableRun/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;iBAG/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyD1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,qBAAqB;;;;;iBAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwDjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;iBAMpC,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -90,8 +90,9 @@ export const ExecutionSummarySchema = z.object({
|
|
|
90
90
|
.describe("Longer-form error detail, when provided"),
|
|
91
91
|
})
|
|
92
92
|
.passthrough()
|
|
93
|
+
.nullable()
|
|
93
94
|
.optional()
|
|
94
|
-
.describe("The most recent error
|
|
95
|
+
.describe("The most recent error; null when the execution has not errored."),
|
|
95
96
|
})
|
|
96
97
|
.passthrough()
|
|
97
98
|
.nullable()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/plugins/eventEmission/builders.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EACzB,SAAS,EACT,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,qBAAqB,EACtB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/plugins/eventEmission/builders.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EACzB,SAAS,EACT,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAkBjB,wBAAgB,eAAe,CAAC,OAAO,GAAE,YAAiB,GAAG,SAAS,CAWrE;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE,YAAiB,GACzB,kBAAkB,CAapB;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,6BAA6B,EACnC,OAAO,GAAE,YAAiB,GACzB,yBAAyB,CA4B3B;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,sBAAsB,EAC5B,OAAO,GAAE,YAAiB,GACzB,kBAAkB,CAmBpB;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,qBAAqB,EAC3B,OAAO,GAAE,YAAiB,GACzB,iBAAiB,CAiCnB"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides builder functions that auto-populate common fields and ensure
|
|
5
5
|
* schema compliance for all event types.
|
|
6
6
|
*/
|
|
7
|
-
import { generateEventId, getCurrentTimestamp, getReleaseId, getOsInfo, getPlatformVersions, getMemoryUsage, getCpuTime, isCi, getCiPlatform, } from "./utils";
|
|
7
|
+
import { generateEventId, getCurrentTimestamp, getReleaseId, getOsInfo, getPlatformVersions, getMemoryUsage, getCpuTime, isCi, getCiPlatform, getTtyContext, getAgent, } from "./utils";
|
|
8
8
|
import { SDK_VERSION } from "../../sdk-version";
|
|
9
9
|
// Create base event with auto-populated common fields
|
|
10
10
|
// Kept for backward compatibility but can be replaced with direct construction
|
|
@@ -30,6 +30,7 @@ export function buildErrorEvent(data, context = {}) {
|
|
|
30
30
|
app_version_id: context.app_version_id,
|
|
31
31
|
environment: context.environment,
|
|
32
32
|
...data,
|
|
33
|
+
agent: getAgent(),
|
|
33
34
|
sdk_version: SDK_VERSION,
|
|
34
35
|
};
|
|
35
36
|
}
|
|
@@ -51,6 +52,8 @@ export function buildApplicationLifecycleEvent(data, context = {}) {
|
|
|
51
52
|
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
52
53
|
is_ci_environment: isCi(),
|
|
53
54
|
ci_platform: getCiPlatform(),
|
|
55
|
+
...getTtyContext(),
|
|
56
|
+
agent: getAgent(),
|
|
54
57
|
session_id: null,
|
|
55
58
|
metadata: null,
|
|
56
59
|
process_argv: globalThis.process?.argv || null,
|
|
@@ -72,6 +75,7 @@ export function buildErrorEventWithContext(data, context = {}) {
|
|
|
72
75
|
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
73
76
|
execution_time_before_error_ms: executionTime,
|
|
74
77
|
...data,
|
|
78
|
+
agent: getAgent(),
|
|
75
79
|
sdk_version: SDK_VERSION,
|
|
76
80
|
};
|
|
77
81
|
}
|
|
@@ -86,7 +90,7 @@ export function buildMethodCalledEvent(data, context = {}) {
|
|
|
86
90
|
error_type: data.error_type ?? null,
|
|
87
91
|
argument_count: data.argument_count,
|
|
88
92
|
is_paginated: data.is_paginated ?? false,
|
|
89
|
-
environment: context.environment ?? (process?.env?.NODE_ENV || null),
|
|
93
|
+
environment: context.environment ?? (globalThis.process?.env?.NODE_ENV || null),
|
|
90
94
|
selected_api: data.selected_api ?? context.selected_api ?? null,
|
|
91
95
|
app_id: context.app_id ?? null,
|
|
92
96
|
app_version_id: context.app_version_id ?? null,
|
|
@@ -104,6 +108,7 @@ export function buildMethodCalledEvent(data, context = {}) {
|
|
|
104
108
|
is_synchronous: false,
|
|
105
109
|
cpu_time_ms: null,
|
|
106
110
|
memory_usage_bytes: null,
|
|
111
|
+
agent: getAgent(),
|
|
107
112
|
sdk_version: SDK_VERSION,
|
|
108
113
|
};
|
|
109
114
|
}
|
|
@@ -42,4 +42,58 @@ export declare function getMemoryUsage(): number | null;
|
|
|
42
42
|
* Get CPU time in milliseconds
|
|
43
43
|
*/
|
|
44
44
|
export declare function getCpuTime(): number | null;
|
|
45
|
+
/**
|
|
46
|
+
* Whether stdin and stdout are each attached to an interactive terminal (TTY).
|
|
47
|
+
* Both fields resolve to null together when process is unavailable.
|
|
48
|
+
*
|
|
49
|
+
* Never throws — try/catch guards event emission from monkeypatched streams or
|
|
50
|
+
* other exotic environments.
|
|
51
|
+
*/
|
|
52
|
+
export declare function getTtyContext(): {
|
|
53
|
+
stdin_is_tty: boolean | null;
|
|
54
|
+
stdout_is_tty: boolean | null;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Detects which AI coding agent is executing the current process by inspecting
|
|
58
|
+
* well-known environment variables set by each agent's runtime.
|
|
59
|
+
*
|
|
60
|
+
* Claude Code
|
|
61
|
+
* CLAUDECODE — set to "1" in all subprocesses spawned by Claude Code
|
|
62
|
+
* https://code.claude.com/docs/en/env-vars
|
|
63
|
+
*
|
|
64
|
+
* GitHub Copilot
|
|
65
|
+
* COPILOT_AGENT — set to "1" in VS Code agent terminal sessions
|
|
66
|
+
* https://github.com/microsoft/vscode/pull/316267
|
|
67
|
+
*
|
|
68
|
+
* Cursor
|
|
69
|
+
* CURSOR_AGENT — set to "1" by Cursor when executing terminal commands
|
|
70
|
+
* https://cursor.com/docs/agent/tools/terminal
|
|
71
|
+
*
|
|
72
|
+
* Codex CLI
|
|
73
|
+
* CODEX_SANDBOX — set to "seatbelt" (macOS) or a non-empty string (Linux/Windows)
|
|
74
|
+
* https://github.com/openai/codex/blob/main/codex-rs/core/src/spawn.rs
|
|
75
|
+
*
|
|
76
|
+
* Gemini CLI
|
|
77
|
+
* GEMINI_CLI — set to "1" in subprocesses spawned by Gemini CLI's shell tool
|
|
78
|
+
* https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/services/shellExecutionService.ts
|
|
79
|
+
*
|
|
80
|
+
* Augment
|
|
81
|
+
* AUGMENT_AGENT — set to "1" when Auggie executes shell commands via its launch-process tool
|
|
82
|
+
* https://docs.augmentcode.com/cli/reference
|
|
83
|
+
*
|
|
84
|
+
* Cline
|
|
85
|
+
* CLINE_ACTIVE — set to "true" when Cline is executing terminal commands
|
|
86
|
+
* https://github.com/cline/cline/pull/5367
|
|
87
|
+
*
|
|
88
|
+
* OpenCode
|
|
89
|
+
* OPENCODE_CLIENT — client identifier set by OpenCode (defaults to "cli")
|
|
90
|
+
* https://anomalyco-opencode.mintlify.app/cli/overview#environment-variables
|
|
91
|
+
*
|
|
92
|
+
* Returns null if no known agent is detected or process is unavailable.
|
|
93
|
+
*
|
|
94
|
+
* Never throws: try/catch guards against exotic environments (e.g. a Proxy on
|
|
95
|
+
* globalThis.process) where property access could unexpectedly fail. Event
|
|
96
|
+
* emission must never cascade into a thrown exception.
|
|
97
|
+
*/
|
|
98
|
+
export declare function getAgent(): string | null;
|
|
45
99
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/plugins/eventEmission/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAaA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAQnE;AAED;;GAEG;AACH,wBAAgB,IAAI,IAAI,OAAO,CAa9B;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAgB7C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAM9C;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,GAAG,IAAI,CAM1C"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/plugins/eventEmission/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAaA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAQnE;AAED;;GAEG;AACH,wBAAgB,IAAI,IAAI,OAAO,CAa9B;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAgB7C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAM9C;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,GAAG,IAAI,CAM1C;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAAI;IAC/B,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/B,CAWA;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAgBxC"}
|