@elevasis/sdk 0.5.12 → 0.5.14
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/cli.cjs +144 -118
- package/dist/index.d.ts +19 -253
- package/dist/index.js +20 -9
- package/dist/templates.js +62 -59
- package/dist/types/worker/adapters/index.d.ts +0 -1
- package/dist/worker/index.js +47 -53
- package/package.json +1 -1
- package/reference/_navigation.md +13 -57
- package/reference/{cli/index.mdx → cli.mdx} +568 -505
- package/reference/concepts.mdx +164 -0
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +226 -0
- package/reference/deployment/index.mdx +158 -153
- package/reference/framework/agent.mdx +156 -151
- package/reference/framework/index.mdx +182 -103
- package/reference/{developer → framework}/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +326 -347
- package/reference/framework/project-structure.mdx +277 -298
- package/reference/framework/tutorial-system.mdx +222 -0
- package/reference/{getting-started/index.mdx → getting-started.mdx} +152 -148
- package/reference/index.mdx +131 -114
- package/reference/platform-tools/adapters.mdx +868 -929
- package/reference/platform-tools/index.mdx +354 -195
- package/reference/resources/index.mdx +339 -336
- package/reference/resources/patterns.mdx +355 -354
- package/reference/resources/types.mdx +207 -207
- package/reference/{roadmap/index.mdx → roadmap.mdx} +163 -147
- package/reference/{runtime/index.mdx → runtime.mdx} +173 -141
- package/reference/{troubleshooting/common-errors.mdx → troubleshooting.mdx} +223 -210
- package/dist/types/worker/adapters/trello.d.ts +0 -14
- package/reference/concepts/index.mdx +0 -203
- package/reference/deployment/command-center-ui.mdx +0 -151
- package/reference/deployment/command-view.mdx +0 -154
- package/reference/framework/documentation.mdx +0 -92
- package/reference/platform-tools/examples.mdx +0 -170
- package/reference/runtime/limits.mdx +0 -75
- package/reference/security/credentials.mdx +0 -141
package/dist/index.d.ts
CHANGED
|
@@ -2030,6 +2030,7 @@ type Database = {
|
|
|
2030
2030
|
error: string | null;
|
|
2031
2031
|
execution_id: string;
|
|
2032
2032
|
input: Json | null;
|
|
2033
|
+
last_heartbeat_at: string | null;
|
|
2033
2034
|
logs: Json | null;
|
|
2034
2035
|
organization_id: string;
|
|
2035
2036
|
origin_execution_id: string | null;
|
|
@@ -2053,6 +2054,7 @@ type Database = {
|
|
|
2053
2054
|
error?: string | null;
|
|
2054
2055
|
execution_id?: string;
|
|
2055
2056
|
input?: Json | null;
|
|
2057
|
+
last_heartbeat_at?: string | null;
|
|
2056
2058
|
logs?: Json | null;
|
|
2057
2059
|
organization_id: string;
|
|
2058
2060
|
origin_execution_id?: string | null;
|
|
@@ -2076,6 +2078,7 @@ type Database = {
|
|
|
2076
2078
|
error?: string | null;
|
|
2077
2079
|
execution_id?: string;
|
|
2078
2080
|
input?: Json | null;
|
|
2081
|
+
last_heartbeat_at?: string | null;
|
|
2079
2082
|
logs?: Json | null;
|
|
2080
2083
|
organization_id?: string;
|
|
2081
2084
|
origin_execution_id?: string | null;
|
|
@@ -2777,6 +2780,10 @@ type Database = {
|
|
|
2777
2780
|
Args: never;
|
|
2778
2781
|
Returns: string;
|
|
2779
2782
|
};
|
|
2783
|
+
detect_stalled_executions: {
|
|
2784
|
+
Args: never;
|
|
2785
|
+
Returns: undefined;
|
|
2786
|
+
};
|
|
2780
2787
|
execute_session_turn: {
|
|
2781
2788
|
Args: {
|
|
2782
2789
|
p_session_id: string;
|
|
@@ -3117,6 +3124,14 @@ declare class ResourceRegistry {
|
|
|
3117
3124
|
* @returns Remote config or null if org has no remote resources
|
|
3118
3125
|
*/
|
|
3119
3126
|
getAnyRemoteConfig(orgName: string): RemoteOrgConfig | null;
|
|
3127
|
+
/**
|
|
3128
|
+
* Get statistics about remotely-deployed resources
|
|
3129
|
+
* Used by the health endpoint for platform-wide deployment visibility.
|
|
3130
|
+
*/
|
|
3131
|
+
getRemoteStats(): {
|
|
3132
|
+
activeOrgs: number;
|
|
3133
|
+
totalResources: number;
|
|
3134
|
+
};
|
|
3120
3135
|
/**
|
|
3121
3136
|
* Get triggers for an organization
|
|
3122
3137
|
* @param organizationName - Organization name
|
|
@@ -4828,215 +4843,6 @@ interface CreateCheckoutSessionResult {
|
|
|
4828
4843
|
expiresAt: number;
|
|
4829
4844
|
}
|
|
4830
4845
|
|
|
4831
|
-
/**
|
|
4832
|
-
* Shared Trello param/result types (browser-safe)
|
|
4833
|
-
*
|
|
4834
|
-
* These types define the public interface for Trello operations -- used by both
|
|
4835
|
-
* the server-side adapter and the SDK typed wrappers. They contain zero Node.js
|
|
4836
|
-
* dependencies and are safe to import in any environment.
|
|
4837
|
-
*
|
|
4838
|
-
* Server-internal types (credentials, Zod schemas) remain in
|
|
4839
|
-
* server/adapters/trello/
|
|
4840
|
-
*/
|
|
4841
|
-
/**
|
|
4842
|
-
* Get board parameters
|
|
4843
|
-
*/
|
|
4844
|
-
interface GetBoardParams {
|
|
4845
|
-
id: string;
|
|
4846
|
-
}
|
|
4847
|
-
/**
|
|
4848
|
-
* Get board result
|
|
4849
|
-
*/
|
|
4850
|
-
interface GetBoardResult {
|
|
4851
|
-
id: string;
|
|
4852
|
-
name: string;
|
|
4853
|
-
desc: string;
|
|
4854
|
-
url: string;
|
|
4855
|
-
shortUrl: string;
|
|
4856
|
-
closed: boolean;
|
|
4857
|
-
}
|
|
4858
|
-
/**
|
|
4859
|
-
* Get lists parameters
|
|
4860
|
-
*/
|
|
4861
|
-
interface GetListsParams {
|
|
4862
|
-
boardId: string;
|
|
4863
|
-
filter?: 'all' | 'open' | 'closed';
|
|
4864
|
-
}
|
|
4865
|
-
/**
|
|
4866
|
-
* Get lists result
|
|
4867
|
-
*/
|
|
4868
|
-
interface GetListsResult {
|
|
4869
|
-
lists: Array<{
|
|
4870
|
-
id: string;
|
|
4871
|
-
name: string;
|
|
4872
|
-
closed: boolean;
|
|
4873
|
-
pos: number;
|
|
4874
|
-
idBoard: string;
|
|
4875
|
-
}>;
|
|
4876
|
-
}
|
|
4877
|
-
/**
|
|
4878
|
-
* Get cards parameters
|
|
4879
|
-
*/
|
|
4880
|
-
interface GetCardsParams {
|
|
4881
|
-
listId: string;
|
|
4882
|
-
}
|
|
4883
|
-
/**
|
|
4884
|
-
* Get cards result
|
|
4885
|
-
*/
|
|
4886
|
-
interface GetCardsResult {
|
|
4887
|
-
cards: Array<{
|
|
4888
|
-
id: string;
|
|
4889
|
-
name: string;
|
|
4890
|
-
desc: string;
|
|
4891
|
-
closed: boolean;
|
|
4892
|
-
due: string | null;
|
|
4893
|
-
url: string;
|
|
4894
|
-
shortUrl: string;
|
|
4895
|
-
idList: string;
|
|
4896
|
-
idBoard: string;
|
|
4897
|
-
}>;
|
|
4898
|
-
}
|
|
4899
|
-
/**
|
|
4900
|
-
* Create card parameters
|
|
4901
|
-
*/
|
|
4902
|
-
interface CreateCardParams {
|
|
4903
|
-
name: string;
|
|
4904
|
-
idList: string;
|
|
4905
|
-
desc?: string;
|
|
4906
|
-
pos?: 'top' | 'bottom' | number;
|
|
4907
|
-
due?: string;
|
|
4908
|
-
idMembers?: string[];
|
|
4909
|
-
idLabels?: string[];
|
|
4910
|
-
}
|
|
4911
|
-
/**
|
|
4912
|
-
* Create card result
|
|
4913
|
-
*/
|
|
4914
|
-
interface CreateCardResult {
|
|
4915
|
-
id: string;
|
|
4916
|
-
name: string;
|
|
4917
|
-
url: string;
|
|
4918
|
-
shortUrl: string;
|
|
4919
|
-
}
|
|
4920
|
-
/**
|
|
4921
|
-
* Update card parameters
|
|
4922
|
-
*/
|
|
4923
|
-
interface UpdateCardParams {
|
|
4924
|
-
id: string;
|
|
4925
|
-
name?: string;
|
|
4926
|
-
desc?: string;
|
|
4927
|
-
closed?: boolean;
|
|
4928
|
-
idList?: string;
|
|
4929
|
-
due?: string;
|
|
4930
|
-
pos?: 'top' | 'bottom' | number;
|
|
4931
|
-
idMembers?: string[];
|
|
4932
|
-
idLabels?: string[];
|
|
4933
|
-
}
|
|
4934
|
-
/**
|
|
4935
|
-
* Update card result
|
|
4936
|
-
*/
|
|
4937
|
-
interface UpdateCardResult {
|
|
4938
|
-
id: string;
|
|
4939
|
-
name: string;
|
|
4940
|
-
url: string;
|
|
4941
|
-
success: boolean;
|
|
4942
|
-
}
|
|
4943
|
-
/**
|
|
4944
|
-
* Create list parameters
|
|
4945
|
-
*
|
|
4946
|
-
* Prefixed with "Trello" to avoid collision with the Lead Service CreateListParams
|
|
4947
|
-
* exported from the same barrel (execution/index.ts).
|
|
4948
|
-
*/
|
|
4949
|
-
interface TrelloCreateListParams {
|
|
4950
|
-
name: string;
|
|
4951
|
-
idBoard: string;
|
|
4952
|
-
pos?: 'top' | 'bottom' | number;
|
|
4953
|
-
}
|
|
4954
|
-
/**
|
|
4955
|
-
* Create list result
|
|
4956
|
-
*/
|
|
4957
|
-
interface TrelloCreateListResult {
|
|
4958
|
-
id: string;
|
|
4959
|
-
name: string;
|
|
4960
|
-
closed: boolean;
|
|
4961
|
-
pos: number;
|
|
4962
|
-
idBoard: string;
|
|
4963
|
-
}
|
|
4964
|
-
/**
|
|
4965
|
-
* Create checklist parameters
|
|
4966
|
-
*/
|
|
4967
|
-
interface CreateChecklistParams {
|
|
4968
|
-
idCard: string;
|
|
4969
|
-
name: string;
|
|
4970
|
-
pos?: 'top' | 'bottom' | number;
|
|
4971
|
-
}
|
|
4972
|
-
/**
|
|
4973
|
-
* Create checklist result
|
|
4974
|
-
*/
|
|
4975
|
-
interface CreateChecklistResult {
|
|
4976
|
-
id: string;
|
|
4977
|
-
name: string;
|
|
4978
|
-
idCard: string;
|
|
4979
|
-
}
|
|
4980
|
-
/**
|
|
4981
|
-
* Add checklist item parameters
|
|
4982
|
-
*/
|
|
4983
|
-
interface AddChecklistItemParams {
|
|
4984
|
-
idChecklist: string;
|
|
4985
|
-
name: string;
|
|
4986
|
-
pos?: 'top' | 'bottom' | number;
|
|
4987
|
-
checked?: boolean;
|
|
4988
|
-
}
|
|
4989
|
-
/**
|
|
4990
|
-
* Add checklist item result
|
|
4991
|
-
*/
|
|
4992
|
-
interface AddChecklistItemResult {
|
|
4993
|
-
id: string;
|
|
4994
|
-
name: string;
|
|
4995
|
-
state: 'complete' | 'incomplete';
|
|
4996
|
-
idChecklist: string;
|
|
4997
|
-
}
|
|
4998
|
-
/**
|
|
4999
|
-
* Update checklist item parameters
|
|
5000
|
-
*/
|
|
5001
|
-
interface UpdateChecklistItemParams {
|
|
5002
|
-
idCard: string;
|
|
5003
|
-
idCheckItem: string;
|
|
5004
|
-
state?: 'complete' | 'incomplete';
|
|
5005
|
-
name?: string;
|
|
5006
|
-
pos?: 'top' | 'bottom' | number;
|
|
5007
|
-
}
|
|
5008
|
-
/**
|
|
5009
|
-
* Update checklist item result
|
|
5010
|
-
*/
|
|
5011
|
-
interface UpdateChecklistItemResult {
|
|
5012
|
-
id: string;
|
|
5013
|
-
name: string;
|
|
5014
|
-
state: 'complete' | 'incomplete';
|
|
5015
|
-
success: boolean;
|
|
5016
|
-
}
|
|
5017
|
-
/**
|
|
5018
|
-
* Get card checklists parameters
|
|
5019
|
-
*/
|
|
5020
|
-
interface GetCardChecklistsParams {
|
|
5021
|
-
idCard: string;
|
|
5022
|
-
}
|
|
5023
|
-
/**
|
|
5024
|
-
* Get card checklists result
|
|
5025
|
-
*/
|
|
5026
|
-
interface GetCardChecklistsResult {
|
|
5027
|
-
checklists: Array<{
|
|
5028
|
-
id: string;
|
|
5029
|
-
name: string;
|
|
5030
|
-
idCard: string;
|
|
5031
|
-
checkItems: Array<{
|
|
5032
|
-
id: string;
|
|
5033
|
-
name: string;
|
|
5034
|
-
state: 'complete' | 'incomplete';
|
|
5035
|
-
pos: number;
|
|
5036
|
-
}>;
|
|
5037
|
-
}>;
|
|
5038
|
-
}
|
|
5039
|
-
|
|
5040
4846
|
/**
|
|
5041
4847
|
* Tool Method Maps
|
|
5042
4848
|
*
|
|
@@ -5342,48 +5148,6 @@ type DropboxToolMap = {
|
|
|
5342
5148
|
result: CreateFolderResult;
|
|
5343
5149
|
};
|
|
5344
5150
|
};
|
|
5345
|
-
type TrelloToolMap = {
|
|
5346
|
-
getBoard: {
|
|
5347
|
-
params: GetBoardParams;
|
|
5348
|
-
result: GetBoardResult;
|
|
5349
|
-
};
|
|
5350
|
-
getLists: {
|
|
5351
|
-
params: GetListsParams;
|
|
5352
|
-
result: GetListsResult;
|
|
5353
|
-
};
|
|
5354
|
-
getCards: {
|
|
5355
|
-
params: GetCardsParams;
|
|
5356
|
-
result: GetCardsResult;
|
|
5357
|
-
};
|
|
5358
|
-
createCard: {
|
|
5359
|
-
params: CreateCardParams;
|
|
5360
|
-
result: CreateCardResult;
|
|
5361
|
-
};
|
|
5362
|
-
updateCard: {
|
|
5363
|
-
params: UpdateCardParams;
|
|
5364
|
-
result: UpdateCardResult;
|
|
5365
|
-
};
|
|
5366
|
-
createList: {
|
|
5367
|
-
params: TrelloCreateListParams;
|
|
5368
|
-
result: TrelloCreateListResult;
|
|
5369
|
-
};
|
|
5370
|
-
createChecklist: {
|
|
5371
|
-
params: CreateChecklistParams;
|
|
5372
|
-
result: CreateChecklistResult;
|
|
5373
|
-
};
|
|
5374
|
-
addChecklistItem: {
|
|
5375
|
-
params: AddChecklistItemParams;
|
|
5376
|
-
result: AddChecklistItemResult;
|
|
5377
|
-
};
|
|
5378
|
-
updateChecklistItem: {
|
|
5379
|
-
params: UpdateChecklistItemParams;
|
|
5380
|
-
result: UpdateChecklistItemResult;
|
|
5381
|
-
};
|
|
5382
|
-
getCardChecklists: {
|
|
5383
|
-
params: GetCardChecklistsParams;
|
|
5384
|
-
result: GetCardChecklistsResult;
|
|
5385
|
-
};
|
|
5386
|
-
};
|
|
5387
5151
|
type SignatureApiToolMap = {
|
|
5388
5152
|
createEnvelope: {
|
|
5389
5153
|
params: CreateEnvelopeParams;
|
|
@@ -5898,6 +5662,8 @@ interface ExecutionContext extends ExecutionMetadata {
|
|
|
5898
5662
|
logger: IExecutionLogger;
|
|
5899
5663
|
signal?: AbortSignal;
|
|
5900
5664
|
onMessageEvent?: (event: MessageEvent) => Promise<void>;
|
|
5665
|
+
/** Called per iteration to write heartbeat + check stall status. Non-fatal if it throws. */
|
|
5666
|
+
onHeartbeat?: () => Promise<void>;
|
|
5901
5667
|
aiUsageCollector?: AIUsageCollector;
|
|
5902
5668
|
metricsCollector?: MetricsCollector;
|
|
5903
5669
|
parentExecutionId?: string;
|
|
@@ -5963,7 +5729,7 @@ type ToolingErrorType = 'service_unavailable' | 'permission_denied' | 'adapter_n
|
|
|
5963
5729
|
* Note: Concrete adapter implementations are deferred until needed.
|
|
5964
5730
|
* This type provides compile-time safety and auto-completion for tool definitions.
|
|
5965
5731
|
*/
|
|
5966
|
-
type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'notion' | 'attio' | 'airtable' | '
|
|
5732
|
+
type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'notion' | 'attio' | 'airtable' | 'salesforce' | 'hubspot' | 'stripe' | 'twilio' | 'sendgrid' | 'mailgun' | 'zapier' | 'webhook' | 'apify' | 'instantly' | 'resend' | 'signature-api' | 'dropbox' | 'mailso';
|
|
5967
5733
|
|
|
5968
5734
|
/**
|
|
5969
5735
|
* Resource Registry type definitions
|
|
@@ -6369,4 +6135,4 @@ declare class ToolingError extends ExecutionError {
|
|
|
6369
6135
|
}
|
|
6370
6136
|
|
|
6371
6137
|
export { ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError };
|
|
6372
|
-
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList,
|
|
6138
|
+
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList, AddToCampaignLead, AddToCampaignParams, AddToCampaignResult, AgentConfig, AgentConstraints, AgentDefinition, AgentMemory, ApifyToolMap, AppendBlocksParams, AppendBlocksResult, AppendRowsParams, AppendRowsResult, ApprovalToolMap, AttioToolMap, BatchUpdateParams, BatchUpdateResult, BulkImportParams, BulkImportResult, CancelHitlByDealIdParams, CancelSchedulesAndHitlByEmailParams, ClearDealFieldsParams, ClearRangeParams, ClearRangeResult, CompanyFilters, ConditionalNext, ContactFilters, Contract, CreateAttributeParams, CreateAttributeResult, CreateAutoPaymentLinkParams, CreateAutoPaymentLinkResult, CreateCheckoutSessionParams, CreateCheckoutSessionResult, CreateCompanyParams, CreateContactParams, CreateEnvelopeParams, CreateEnvelopeResult, CreateFolderParams, CreateFolderResult, CreateListParams, CreateNoteParams, CreateNoteResult, CreatePageParams, CreatePageResult, CreatePaymentLinkParams, CreatePaymentLinkResult, CreateRecordParams, CreateRecordResult, CreateScheduleInput, DeleteBlocksParams, DeleteBlocksResult, DeleteDealParams, DeleteNoteParams, DeleteNoteResult, DeletePageParams, DeletePageResult, DeleteRecordParams, DeleteRecordResult, DeleteRowByValueParams, DeleteRowByValueResult, DomainDefinition, DownloadDocumentParams, DownloadDocumentResult, DropboxToolMap, ElevasConfig, EmailToolMap, EnvelopeDocument, EventTriggerConfig, ExecutionContext, ExecutionInterface, ExecutionMetadata, ExecutionToolMap, FilterExpression, FilterRowsParams, FilterRowsResult, FormField, FormFieldType, FormSchema, GetEmailsParams, GetEmailsResult, GetEnvelopeParams, GetEnvelopeResult, GetHeadersParams, GetHeadersResult, GetLastRowParams, GetLastRowResult, GetPaymentLinkParams, GetPaymentLinkResult, GetRecordParams, GetRecordResult, GetRowByValueParams, GetRowByValueResult, GetSpreadsheetMetadataParams, GetSpreadsheetMetadataResult, GmailSendEmailParams, GmailSendEmailResult, GmailToolMap, GoogleSheetsToolMap, HumanCheckpointDefinition, InstantlyToolMap, IntegrationDefinition, LLMAdapterFactory, LLMGenerateRequest, LLMGenerateResponse, LLMMessage, LLMModel, LeadToolMap, LinearNext, ListAllPagesResult, ListAttributesParams, ListAttributesResult, ListNotesParams, ListNotesResult, ListObjectsResult, ListPaymentLinksParams, ListPaymentLinksResult, MailsoToolMap, MailsoVerifyEmailParams, MailsoVerifyEmailResult, MarkProposalReviewedParams, MarkProposalSentParams, MethodEntry, ModelConfig, NextConfig, NotificationSDKInput, NotificationToolMap, NotionToolMap, OrganizationResources, PageWithChildren, PaginatedResult, PaginationParams$1 as PaginationParams, PdfToolMap, QueryRecordsParams, QueryRecordsResult, ReadPageParams, ReadPageResult, ReadSheetParams, ReadSheetResult, Recipient, RecurringScheduleConfig, RelationshipDeclaration, RelativeScheduleConfig, RemoveFromSubsequenceParams, RemoveFromSubsequenceResult, ResendGetEmailParams, ResendGetEmailResult, ResendSendEmailParams, ResendSendEmailResult, ResendToolMap, ResourceDefinition, ResourceDomain, ResourceMetricsConfig, ResourceRelationships, ResourceStatus$1 as ResourceStatus, ResourceType, RunActorParams, RunActorResult, ScheduleOriginTracking, ScheduleTarget, ScheduleTriggerConfig, SchedulerToolMap, SendReplyParams, SendReplyResult, SetContactNurtureParams, SheetInfo, SignatureApiFieldType, SignatureApiToolMap, SigningPlace, SortCriteria, StepHandler, StorageDeleteInput, StorageDeleteOutput, StorageDownloadInput, StorageDownloadOutput, StorageListInput, StorageListOutput, StorageSignedUrlInput, StorageSignedUrlOutput, StorageToolMap, StorageUploadInput, StorageUploadOutput, StripeToolMap, SyncDealStageParams, TaskSchedule, TaskScheduleConfig, Tool, ToolExecutionOptions, ToolMethodMap, ToolingErrorType, TriggerConfig, TriggerDefinition, UpdateAttributeParams, UpdateAttributeResult, UpdateBlocksParams, UpdateBlocksResult, UpdateCloseLostReasonParams, UpdateCompanyParams, UpdateContactParams, UpdateDiscoveryDataParams, UpdateFeesParams, UpdateInterestStatusParams, UpdateInterestStatusResult, UpdateListParams, UpdatePageTitleParams, UpdatePageTitleResult, UpdatePaymentLinkParams, UpdatePaymentLinkResult, UpdateProposalDataParams, UpdateRecordParams, UpdateRecordResult, UpdateRowByValueParams, UpdateRowByValueResult, UploadFileParams, UploadFileResult, UpsertCompanyParams, UpsertContactParams, UpsertDealParams, UpsertRowParams, UpsertRowResult, VoidEnvelopeParams, VoidEnvelopeResult, WebhookProviderType, WebhookTriggerConfig, WorkflowConfig, WorkflowDefinition, WorkflowStep, WriteSheetParams, WriteSheetResult };
|
package/dist/index.js
CHANGED
|
@@ -3234,6 +3234,7 @@ var ResourceRegistry = class {
|
|
|
3234
3234
|
version: def.config.version,
|
|
3235
3235
|
type: def.config.type,
|
|
3236
3236
|
status: def.config.status,
|
|
3237
|
+
domains: def.config.domains,
|
|
3237
3238
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
3238
3239
|
})).filter((resource) => !environment || resource.status === environment);
|
|
3239
3240
|
const agents = (orgResources.agents || []).map((def) => ({
|
|
@@ -3243,6 +3244,7 @@ var ResourceRegistry = class {
|
|
|
3243
3244
|
version: def.config.version,
|
|
3244
3245
|
type: def.config.type,
|
|
3245
3246
|
status: def.config.status,
|
|
3247
|
+
domains: def.config.domains,
|
|
3246
3248
|
sessionCapable: def.config.sessionCapable ?? false,
|
|
3247
3249
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
3248
3250
|
})).filter((resource) => !environment || resource.status === environment);
|
|
@@ -3289,9 +3291,7 @@ var ResourceRegistry = class {
|
|
|
3289
3291
|
const seen = /* @__PURE__ */ new Set();
|
|
3290
3292
|
for (const id of incomingIds) {
|
|
3291
3293
|
if (seen.has(id)) {
|
|
3292
|
-
throw new Error(
|
|
3293
|
-
`Duplicate resource ID '${id}' in deployment. Each resource must have a unique ID.`
|
|
3294
|
-
);
|
|
3294
|
+
throw new Error(`Duplicate resource ID '${id}' in deployment. Each resource must have a unique ID.`);
|
|
3295
3295
|
}
|
|
3296
3296
|
seen.add(id);
|
|
3297
3297
|
}
|
|
@@ -3350,12 +3350,8 @@ var ResourceRegistry = class {
|
|
|
3350
3350
|
if (remoteIds.size === 0) return;
|
|
3351
3351
|
const orgResources = this.registry[orgName];
|
|
3352
3352
|
if (!orgResources) return;
|
|
3353
|
-
orgResources.workflows = (orgResources.workflows ?? []).filter(
|
|
3354
|
-
|
|
3355
|
-
);
|
|
3356
|
-
orgResources.agents = (orgResources.agents ?? []).filter(
|
|
3357
|
-
(a) => !remoteIds.has(a.config.resourceId)
|
|
3358
|
-
);
|
|
3353
|
+
orgResources.workflows = (orgResources.workflows ?? []).filter((w) => !remoteIds.has(w.config.resourceId));
|
|
3354
|
+
orgResources.agents = (orgResources.agents ?? []).filter((a) => !remoteIds.has(a.config.resourceId));
|
|
3359
3355
|
if (orgResources.relationships) {
|
|
3360
3356
|
for (const id of remoteIds) {
|
|
3361
3357
|
delete orgResources.relationships[id];
|
|
@@ -3414,6 +3410,21 @@ var ResourceRegistry = class {
|
|
|
3414
3410
|
}
|
|
3415
3411
|
return null;
|
|
3416
3412
|
}
|
|
3413
|
+
/**
|
|
3414
|
+
* Get statistics about remotely-deployed resources
|
|
3415
|
+
* Used by the health endpoint for platform-wide deployment visibility.
|
|
3416
|
+
*/
|
|
3417
|
+
getRemoteStats() {
|
|
3418
|
+
const orgs = /* @__PURE__ */ new Set();
|
|
3419
|
+
for (const key of this.remoteResources.keys()) {
|
|
3420
|
+
const orgName = key.split("/")[0];
|
|
3421
|
+
orgs.add(orgName);
|
|
3422
|
+
}
|
|
3423
|
+
return {
|
|
3424
|
+
activeOrgs: orgs.size,
|
|
3425
|
+
totalResources: this.remoteResources.size
|
|
3426
|
+
};
|
|
3427
|
+
}
|
|
3417
3428
|
// ============================================================================
|
|
3418
3429
|
// Resource Manifest Accessors
|
|
3419
3430
|
// ============================================================================
|