@elevasis/sdk 0.5.11 → 0.5.13
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 +276 -298
- package/dist/index.d.ts +13 -256
- package/dist/index.js +10 -38
- package/dist/templates.js +193 -187
- package/dist/types/worker/adapters/index.d.ts +0 -1
- package/dist/worker/index.js +126 -75
- package/package.json +1 -1
- package/reference/_navigation.md +13 -57
- package/reference/concepts.mdx +203 -0
- package/reference/deployment/{command-center-ui.mdx → command-center.mdx} +229 -151
- package/reference/deployment/index.mdx +158 -153
- package/reference/framework/agent.mdx +168 -151
- package/reference/framework/index.mdx +182 -103
- package/reference/framework/memory.mdx +347 -347
- package/reference/framework/project-structure.mdx +3 -13
- package/reference/framework/tutorial-system.mdx +253 -0
- package/reference/{getting-started/index.mdx → getting-started.mdx} +6 -7
- package/reference/index.mdx +117 -114
- package/reference/platform-tools/adapters.mdx +175 -32
- package/reference/platform-tools/index.mdx +354 -195
- package/reference/resources/index.mdx +5 -0
- package/reference/{roadmap/index.mdx → roadmap.mdx} +1 -1
- package/reference/{runtime/index.mdx → runtime.mdx} +196 -141
- package/dist/types/worker/adapters/trello.d.ts +0 -14
- package/reference/concepts/index.mdx +0 -203
- 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/reference/{cli/index.mdx → cli.mdx} +0 -0
- /package/reference/{developer → framework}/interaction-guidance.mdx +0 -0
- /package/reference/{troubleshooting/common-errors.mdx → troubleshooting.mdx} +0 -0
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;
|
|
@@ -3049,9 +3056,8 @@ declare class ResourceRegistry {
|
|
|
3049
3056
|
* List all resources for an organization
|
|
3050
3057
|
* Returns ResourceDefinition metadata (not full definitions)
|
|
3051
3058
|
*
|
|
3052
|
-
*
|
|
3053
|
-
*
|
|
3054
|
-
* - Production: Returns only prod resources (filters out dev)
|
|
3059
|
+
* All resources are returned regardless of server environment.
|
|
3060
|
+
* Pass an explicit `environment` filter to get only 'dev' or 'prod' resources.
|
|
3055
3061
|
*/
|
|
3056
3062
|
listResourcesForOrganization(organizationName: string, environment?: ResourceStatus$1): ResourceList;
|
|
3057
3063
|
/**
|
|
@@ -4829,215 +4835,6 @@ interface CreateCheckoutSessionResult {
|
|
|
4829
4835
|
expiresAt: number;
|
|
4830
4836
|
}
|
|
4831
4837
|
|
|
4832
|
-
/**
|
|
4833
|
-
* Shared Trello param/result types (browser-safe)
|
|
4834
|
-
*
|
|
4835
|
-
* These types define the public interface for Trello operations -- used by both
|
|
4836
|
-
* the server-side adapter and the SDK typed wrappers. They contain zero Node.js
|
|
4837
|
-
* dependencies and are safe to import in any environment.
|
|
4838
|
-
*
|
|
4839
|
-
* Server-internal types (credentials, Zod schemas) remain in
|
|
4840
|
-
* server/adapters/trello/
|
|
4841
|
-
*/
|
|
4842
|
-
/**
|
|
4843
|
-
* Get board parameters
|
|
4844
|
-
*/
|
|
4845
|
-
interface GetBoardParams {
|
|
4846
|
-
id: string;
|
|
4847
|
-
}
|
|
4848
|
-
/**
|
|
4849
|
-
* Get board result
|
|
4850
|
-
*/
|
|
4851
|
-
interface GetBoardResult {
|
|
4852
|
-
id: string;
|
|
4853
|
-
name: string;
|
|
4854
|
-
desc: string;
|
|
4855
|
-
url: string;
|
|
4856
|
-
shortUrl: string;
|
|
4857
|
-
closed: boolean;
|
|
4858
|
-
}
|
|
4859
|
-
/**
|
|
4860
|
-
* Get lists parameters
|
|
4861
|
-
*/
|
|
4862
|
-
interface GetListsParams {
|
|
4863
|
-
boardId: string;
|
|
4864
|
-
filter?: 'all' | 'open' | 'closed';
|
|
4865
|
-
}
|
|
4866
|
-
/**
|
|
4867
|
-
* Get lists result
|
|
4868
|
-
*/
|
|
4869
|
-
interface GetListsResult {
|
|
4870
|
-
lists: Array<{
|
|
4871
|
-
id: string;
|
|
4872
|
-
name: string;
|
|
4873
|
-
closed: boolean;
|
|
4874
|
-
pos: number;
|
|
4875
|
-
idBoard: string;
|
|
4876
|
-
}>;
|
|
4877
|
-
}
|
|
4878
|
-
/**
|
|
4879
|
-
* Get cards parameters
|
|
4880
|
-
*/
|
|
4881
|
-
interface GetCardsParams {
|
|
4882
|
-
listId: string;
|
|
4883
|
-
}
|
|
4884
|
-
/**
|
|
4885
|
-
* Get cards result
|
|
4886
|
-
*/
|
|
4887
|
-
interface GetCardsResult {
|
|
4888
|
-
cards: Array<{
|
|
4889
|
-
id: string;
|
|
4890
|
-
name: string;
|
|
4891
|
-
desc: string;
|
|
4892
|
-
closed: boolean;
|
|
4893
|
-
due: string | null;
|
|
4894
|
-
url: string;
|
|
4895
|
-
shortUrl: string;
|
|
4896
|
-
idList: string;
|
|
4897
|
-
idBoard: string;
|
|
4898
|
-
}>;
|
|
4899
|
-
}
|
|
4900
|
-
/**
|
|
4901
|
-
* Create card parameters
|
|
4902
|
-
*/
|
|
4903
|
-
interface CreateCardParams {
|
|
4904
|
-
name: string;
|
|
4905
|
-
idList: string;
|
|
4906
|
-
desc?: string;
|
|
4907
|
-
pos?: 'top' | 'bottom' | number;
|
|
4908
|
-
due?: string;
|
|
4909
|
-
idMembers?: string[];
|
|
4910
|
-
idLabels?: string[];
|
|
4911
|
-
}
|
|
4912
|
-
/**
|
|
4913
|
-
* Create card result
|
|
4914
|
-
*/
|
|
4915
|
-
interface CreateCardResult {
|
|
4916
|
-
id: string;
|
|
4917
|
-
name: string;
|
|
4918
|
-
url: string;
|
|
4919
|
-
shortUrl: string;
|
|
4920
|
-
}
|
|
4921
|
-
/**
|
|
4922
|
-
* Update card parameters
|
|
4923
|
-
*/
|
|
4924
|
-
interface UpdateCardParams {
|
|
4925
|
-
id: string;
|
|
4926
|
-
name?: string;
|
|
4927
|
-
desc?: string;
|
|
4928
|
-
closed?: boolean;
|
|
4929
|
-
idList?: string;
|
|
4930
|
-
due?: string;
|
|
4931
|
-
pos?: 'top' | 'bottom' | number;
|
|
4932
|
-
idMembers?: string[];
|
|
4933
|
-
idLabels?: string[];
|
|
4934
|
-
}
|
|
4935
|
-
/**
|
|
4936
|
-
* Update card result
|
|
4937
|
-
*/
|
|
4938
|
-
interface UpdateCardResult {
|
|
4939
|
-
id: string;
|
|
4940
|
-
name: string;
|
|
4941
|
-
url: string;
|
|
4942
|
-
success: boolean;
|
|
4943
|
-
}
|
|
4944
|
-
/**
|
|
4945
|
-
* Create list parameters
|
|
4946
|
-
*
|
|
4947
|
-
* Prefixed with "Trello" to avoid collision with the Lead Service CreateListParams
|
|
4948
|
-
* exported from the same barrel (execution/index.ts).
|
|
4949
|
-
*/
|
|
4950
|
-
interface TrelloCreateListParams {
|
|
4951
|
-
name: string;
|
|
4952
|
-
idBoard: string;
|
|
4953
|
-
pos?: 'top' | 'bottom' | number;
|
|
4954
|
-
}
|
|
4955
|
-
/**
|
|
4956
|
-
* Create list result
|
|
4957
|
-
*/
|
|
4958
|
-
interface TrelloCreateListResult {
|
|
4959
|
-
id: string;
|
|
4960
|
-
name: string;
|
|
4961
|
-
closed: boolean;
|
|
4962
|
-
pos: number;
|
|
4963
|
-
idBoard: string;
|
|
4964
|
-
}
|
|
4965
|
-
/**
|
|
4966
|
-
* Create checklist parameters
|
|
4967
|
-
*/
|
|
4968
|
-
interface CreateChecklistParams {
|
|
4969
|
-
idCard: string;
|
|
4970
|
-
name: string;
|
|
4971
|
-
pos?: 'top' | 'bottom' | number;
|
|
4972
|
-
}
|
|
4973
|
-
/**
|
|
4974
|
-
* Create checklist result
|
|
4975
|
-
*/
|
|
4976
|
-
interface CreateChecklistResult {
|
|
4977
|
-
id: string;
|
|
4978
|
-
name: string;
|
|
4979
|
-
idCard: string;
|
|
4980
|
-
}
|
|
4981
|
-
/**
|
|
4982
|
-
* Add checklist item parameters
|
|
4983
|
-
*/
|
|
4984
|
-
interface AddChecklistItemParams {
|
|
4985
|
-
idChecklist: string;
|
|
4986
|
-
name: string;
|
|
4987
|
-
pos?: 'top' | 'bottom' | number;
|
|
4988
|
-
checked?: boolean;
|
|
4989
|
-
}
|
|
4990
|
-
/**
|
|
4991
|
-
* Add checklist item result
|
|
4992
|
-
*/
|
|
4993
|
-
interface AddChecklistItemResult {
|
|
4994
|
-
id: string;
|
|
4995
|
-
name: string;
|
|
4996
|
-
state: 'complete' | 'incomplete';
|
|
4997
|
-
idChecklist: string;
|
|
4998
|
-
}
|
|
4999
|
-
/**
|
|
5000
|
-
* Update checklist item parameters
|
|
5001
|
-
*/
|
|
5002
|
-
interface UpdateChecklistItemParams {
|
|
5003
|
-
idCard: string;
|
|
5004
|
-
idCheckItem: string;
|
|
5005
|
-
state?: 'complete' | 'incomplete';
|
|
5006
|
-
name?: string;
|
|
5007
|
-
pos?: 'top' | 'bottom' | number;
|
|
5008
|
-
}
|
|
5009
|
-
/**
|
|
5010
|
-
* Update checklist item result
|
|
5011
|
-
*/
|
|
5012
|
-
interface UpdateChecklistItemResult {
|
|
5013
|
-
id: string;
|
|
5014
|
-
name: string;
|
|
5015
|
-
state: 'complete' | 'incomplete';
|
|
5016
|
-
success: boolean;
|
|
5017
|
-
}
|
|
5018
|
-
/**
|
|
5019
|
-
* Get card checklists parameters
|
|
5020
|
-
*/
|
|
5021
|
-
interface GetCardChecklistsParams {
|
|
5022
|
-
idCard: string;
|
|
5023
|
-
}
|
|
5024
|
-
/**
|
|
5025
|
-
* Get card checklists result
|
|
5026
|
-
*/
|
|
5027
|
-
interface GetCardChecklistsResult {
|
|
5028
|
-
checklists: Array<{
|
|
5029
|
-
id: string;
|
|
5030
|
-
name: string;
|
|
5031
|
-
idCard: string;
|
|
5032
|
-
checkItems: Array<{
|
|
5033
|
-
id: string;
|
|
5034
|
-
name: string;
|
|
5035
|
-
state: 'complete' | 'incomplete';
|
|
5036
|
-
pos: number;
|
|
5037
|
-
}>;
|
|
5038
|
-
}>;
|
|
5039
|
-
}
|
|
5040
|
-
|
|
5041
4838
|
/**
|
|
5042
4839
|
* Tool Method Maps
|
|
5043
4840
|
*
|
|
@@ -5343,48 +5140,6 @@ type DropboxToolMap = {
|
|
|
5343
5140
|
result: CreateFolderResult;
|
|
5344
5141
|
};
|
|
5345
5142
|
};
|
|
5346
|
-
type TrelloToolMap = {
|
|
5347
|
-
getBoard: {
|
|
5348
|
-
params: GetBoardParams;
|
|
5349
|
-
result: GetBoardResult;
|
|
5350
|
-
};
|
|
5351
|
-
getLists: {
|
|
5352
|
-
params: GetListsParams;
|
|
5353
|
-
result: GetListsResult;
|
|
5354
|
-
};
|
|
5355
|
-
getCards: {
|
|
5356
|
-
params: GetCardsParams;
|
|
5357
|
-
result: GetCardsResult;
|
|
5358
|
-
};
|
|
5359
|
-
createCard: {
|
|
5360
|
-
params: CreateCardParams;
|
|
5361
|
-
result: CreateCardResult;
|
|
5362
|
-
};
|
|
5363
|
-
updateCard: {
|
|
5364
|
-
params: UpdateCardParams;
|
|
5365
|
-
result: UpdateCardResult;
|
|
5366
|
-
};
|
|
5367
|
-
createList: {
|
|
5368
|
-
params: TrelloCreateListParams;
|
|
5369
|
-
result: TrelloCreateListResult;
|
|
5370
|
-
};
|
|
5371
|
-
createChecklist: {
|
|
5372
|
-
params: CreateChecklistParams;
|
|
5373
|
-
result: CreateChecklistResult;
|
|
5374
|
-
};
|
|
5375
|
-
addChecklistItem: {
|
|
5376
|
-
params: AddChecklistItemParams;
|
|
5377
|
-
result: AddChecklistItemResult;
|
|
5378
|
-
};
|
|
5379
|
-
updateChecklistItem: {
|
|
5380
|
-
params: UpdateChecklistItemParams;
|
|
5381
|
-
result: UpdateChecklistItemResult;
|
|
5382
|
-
};
|
|
5383
|
-
getCardChecklists: {
|
|
5384
|
-
params: GetCardChecklistsParams;
|
|
5385
|
-
result: GetCardChecklistsResult;
|
|
5386
|
-
};
|
|
5387
|
-
};
|
|
5388
5143
|
type SignatureApiToolMap = {
|
|
5389
5144
|
createEnvelope: {
|
|
5390
5145
|
params: CreateEnvelopeParams;
|
|
@@ -5899,6 +5654,8 @@ interface ExecutionContext extends ExecutionMetadata {
|
|
|
5899
5654
|
logger: IExecutionLogger;
|
|
5900
5655
|
signal?: AbortSignal;
|
|
5901
5656
|
onMessageEvent?: (event: MessageEvent) => Promise<void>;
|
|
5657
|
+
/** Called per iteration to write heartbeat + check stall status. Non-fatal if it throws. */
|
|
5658
|
+
onHeartbeat?: () => Promise<void>;
|
|
5902
5659
|
aiUsageCollector?: AIUsageCollector;
|
|
5903
5660
|
metricsCollector?: MetricsCollector;
|
|
5904
5661
|
parentExecutionId?: string;
|
|
@@ -5964,7 +5721,7 @@ type ToolingErrorType = 'service_unavailable' | 'permission_denied' | 'adapter_n
|
|
|
5964
5721
|
* Note: Concrete adapter implementations are deferred until needed.
|
|
5965
5722
|
* This type provides compile-time safety and auto-completion for tool definitions.
|
|
5966
5723
|
*/
|
|
5967
|
-
type IntegrationType = 'gmail' | 'google-sheets' | 'slack' | 'github' | 'linear' | 'notion' | 'attio' | 'airtable' | '
|
|
5724
|
+
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';
|
|
5968
5725
|
|
|
5969
5726
|
/**
|
|
5970
5727
|
* Resource Registry type definitions
|
|
@@ -6370,4 +6127,4 @@ declare class ToolingError extends ExecutionError {
|
|
|
6370
6127
|
}
|
|
6371
6128
|
|
|
6372
6129
|
export { ExecutionError, RegistryValidationError, ResourceRegistry, StepType, ToolingError };
|
|
6373
|
-
export type { AbsoluteScheduleConfig, AcqCompany, AcqContact, AcqDeal, AcqList,
|
|
6130
|
+
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
|
@@ -142,18 +142,6 @@ var DOMAIN_MAP = {
|
|
|
142
142
|
[DOMAINS.DIAGNOSTIC]: DIAGNOSTIC_DOMAIN
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
// ../core/src/execution/core/server/environment.ts
|
|
146
|
-
function detectEnvironment() {
|
|
147
|
-
const env = process.env.NODE_ENV || "development";
|
|
148
|
-
if (env === "production") return "production";
|
|
149
|
-
if (env === "staging") return "staging";
|
|
150
|
-
return "development";
|
|
151
|
-
}
|
|
152
|
-
function canExecuteResource(resource, environment) {
|
|
153
|
-
const env = environment || detectEnvironment();
|
|
154
|
-
return env === "production" ? resource.status === "prod" : true;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
145
|
// ../core/src/execution/engine/base/errors.ts
|
|
158
146
|
var ExecutionError2 = class extends Error {
|
|
159
147
|
/**
|
|
@@ -3225,9 +3213,8 @@ var ResourceRegistry = class {
|
|
|
3225
3213
|
* List all resources for an organization
|
|
3226
3214
|
* Returns ResourceDefinition metadata (not full definitions)
|
|
3227
3215
|
*
|
|
3228
|
-
*
|
|
3229
|
-
*
|
|
3230
|
-
* - Production: Returns only prod resources (filters out dev)
|
|
3216
|
+
* All resources are returned regardless of server environment.
|
|
3217
|
+
* Pass an explicit `environment` filter to get only 'dev' or 'prod' resources.
|
|
3231
3218
|
*/
|
|
3232
3219
|
listResourcesForOrganization(organizationName, environment) {
|
|
3233
3220
|
const orgResources = this.registry[organizationName];
|
|
@@ -3240,7 +3227,6 @@ var ResourceRegistry = class {
|
|
|
3240
3227
|
environment
|
|
3241
3228
|
};
|
|
3242
3229
|
}
|
|
3243
|
-
const currentEnv = detectEnvironment();
|
|
3244
3230
|
const workflows = (orgResources.workflows || []).map((def) => ({
|
|
3245
3231
|
resourceId: def.config.resourceId,
|
|
3246
3232
|
name: def.config.name,
|
|
@@ -3248,13 +3234,9 @@ var ResourceRegistry = class {
|
|
|
3248
3234
|
version: def.config.version,
|
|
3249
3235
|
type: def.config.type,
|
|
3250
3236
|
status: def.config.status,
|
|
3237
|
+
domains: def.config.domains,
|
|
3251
3238
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
3252
|
-
})).filter((resource) =>
|
|
3253
|
-
if (environment) {
|
|
3254
|
-
return resource.status === environment;
|
|
3255
|
-
}
|
|
3256
|
-
return canExecuteResource(resource, currentEnv);
|
|
3257
|
-
});
|
|
3239
|
+
})).filter((resource) => !environment || resource.status === environment);
|
|
3258
3240
|
const agents = (orgResources.agents || []).map((def) => ({
|
|
3259
3241
|
resourceId: def.config.resourceId,
|
|
3260
3242
|
name: def.config.name,
|
|
@@ -3262,20 +3244,16 @@ var ResourceRegistry = class {
|
|
|
3262
3244
|
version: def.config.version,
|
|
3263
3245
|
type: def.config.type,
|
|
3264
3246
|
status: def.config.status,
|
|
3247
|
+
domains: def.config.domains,
|
|
3265
3248
|
sessionCapable: def.config.sessionCapable ?? false,
|
|
3266
3249
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
3267
|
-
})).filter((resource) =>
|
|
3268
|
-
if (environment) {
|
|
3269
|
-
return resource.status === environment;
|
|
3270
|
-
}
|
|
3271
|
-
return canExecuteResource(resource, currentEnv);
|
|
3272
|
-
});
|
|
3250
|
+
})).filter((resource) => !environment || resource.status === environment);
|
|
3273
3251
|
return {
|
|
3274
3252
|
workflows,
|
|
3275
3253
|
agents,
|
|
3276
3254
|
total: workflows.length + agents.length,
|
|
3277
3255
|
organizationName,
|
|
3278
|
-
environment
|
|
3256
|
+
environment
|
|
3279
3257
|
};
|
|
3280
3258
|
}
|
|
3281
3259
|
/**
|
|
@@ -3313,9 +3291,7 @@ var ResourceRegistry = class {
|
|
|
3313
3291
|
const seen = /* @__PURE__ */ new Set();
|
|
3314
3292
|
for (const id of incomingIds) {
|
|
3315
3293
|
if (seen.has(id)) {
|
|
3316
|
-
throw new Error(
|
|
3317
|
-
`Duplicate resource ID '${id}' in deployment. Each resource must have a unique ID.`
|
|
3318
|
-
);
|
|
3294
|
+
throw new Error(`Duplicate resource ID '${id}' in deployment. Each resource must have a unique ID.`);
|
|
3319
3295
|
}
|
|
3320
3296
|
seen.add(id);
|
|
3321
3297
|
}
|
|
@@ -3374,12 +3350,8 @@ var ResourceRegistry = class {
|
|
|
3374
3350
|
if (remoteIds.size === 0) return;
|
|
3375
3351
|
const orgResources = this.registry[orgName];
|
|
3376
3352
|
if (!orgResources) return;
|
|
3377
|
-
orgResources.workflows = (orgResources.workflows ?? []).filter(
|
|
3378
|
-
|
|
3379
|
-
);
|
|
3380
|
-
orgResources.agents = (orgResources.agents ?? []).filter(
|
|
3381
|
-
(a) => !remoteIds.has(a.config.resourceId)
|
|
3382
|
-
);
|
|
3353
|
+
orgResources.workflows = (orgResources.workflows ?? []).filter((w) => !remoteIds.has(w.config.resourceId));
|
|
3354
|
+
orgResources.agents = (orgResources.agents ?? []).filter((a) => !remoteIds.has(a.config.resourceId));
|
|
3383
3355
|
if (orgResources.relationships) {
|
|
3384
3356
|
for (const id of remoteIds) {
|
|
3385
3357
|
delete orgResources.relationships[id];
|