@todoist/automations-cli 2.1.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
collectSkillStatus,
|
|
8
8
|
getInstaller,
|
|
9
9
|
updateAllInstalledSkills
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BAXDCDIS.js";
|
|
11
11
|
|
|
12
12
|
// ../../node_modules/jsonify/lib/parse.js
|
|
13
13
|
var require_parse = __commonJS({
|
|
@@ -8553,7 +8553,7 @@ import { fileURLToPath } from "node:url";
|
|
|
8553
8553
|
// package.json
|
|
8554
8554
|
var package_default = {
|
|
8555
8555
|
name: "@todoist/automations-cli",
|
|
8556
|
-
version: "2.
|
|
8556
|
+
version: "2.3.0",
|
|
8557
8557
|
description: "Command-line client for Todoist Automations",
|
|
8558
8558
|
type: "module",
|
|
8559
8559
|
bin: {
|
|
@@ -29589,7 +29589,8 @@ var RequiredConnectorSchema = external_exports.object({
|
|
|
29589
29589
|
connectorIconUrl: external_exports.string().nullable(),
|
|
29590
29590
|
requiredTypes: external_exports.array(external_exports.enum(CONNECTION_TYPES)),
|
|
29591
29591
|
requiresConnection: external_exports.boolean(),
|
|
29592
|
-
isSystem: external_exports.boolean().optional()
|
|
29592
|
+
isSystem: external_exports.boolean().optional(),
|
|
29593
|
+
isPermanent: external_exports.boolean().optional()
|
|
29593
29594
|
});
|
|
29594
29595
|
var AutomationConnectionSchema = external_exports.object({
|
|
29595
29596
|
connectorId: external_exports.string(),
|
|
@@ -29870,6 +29871,39 @@ var AutomationDraftConnectionsClient = class extends BaseClient {
|
|
|
29870
29871
|
}
|
|
29871
29872
|
};
|
|
29872
29873
|
|
|
29874
|
+
// ../../packages/sdk/dist/core/dist/esm/schemas/automation-loop-review.schema.js
|
|
29875
|
+
var automationLoopFindingSchema = external_exports.object({
|
|
29876
|
+
triggerIndex: external_exports.int().nonnegative(),
|
|
29877
|
+
stepIds: external_exports.array(external_exports.string().min(1).max(100)).min(1).max(20),
|
|
29878
|
+
feedbackPath: external_exports.string().min(1).max(1500),
|
|
29879
|
+
evidence: external_exports.string().min(1).max(1500),
|
|
29880
|
+
uncertainty: external_exports.string().max(1e3),
|
|
29881
|
+
suggestedCorrection: external_exports.string().min(1).max(1500)
|
|
29882
|
+
});
|
|
29883
|
+
var automationLoopReviewSchema = external_exports.discriminatedUnion("state", [
|
|
29884
|
+
external_exports.object({
|
|
29885
|
+
state: external_exports.literal("not-applicable"),
|
|
29886
|
+
fingerprint: external_exports.string().min(1)
|
|
29887
|
+
}),
|
|
29888
|
+
external_exports.object({
|
|
29889
|
+
state: external_exports.literal("reviewed"),
|
|
29890
|
+
fingerprint: external_exports.string().min(1),
|
|
29891
|
+
findings: external_exports.array(automationLoopFindingSchema).max(8),
|
|
29892
|
+
limitations: external_exports.array(external_exports.string().min(1).max(1e3)).max(8)
|
|
29893
|
+
}),
|
|
29894
|
+
external_exports.object({
|
|
29895
|
+
state: external_exports.literal("unavailable"),
|
|
29896
|
+
fingerprint: external_exports.string().min(1),
|
|
29897
|
+
reason: external_exports.enum([
|
|
29898
|
+
"incomplete",
|
|
29899
|
+
"input-limit",
|
|
29900
|
+
"definitions",
|
|
29901
|
+
"provider",
|
|
29902
|
+
"revision-changed"
|
|
29903
|
+
])
|
|
29904
|
+
})
|
|
29905
|
+
]);
|
|
29906
|
+
|
|
29873
29907
|
// ../../packages/sdk/dist/core/dist/esm/schemas/shared.schema.js
|
|
29874
29908
|
var RolloutCompatibleNullableStringSchema = external_exports.string().nullish().transform((value) => value ?? null);
|
|
29875
29909
|
|
|
@@ -29974,30 +30008,101 @@ var ReadUsageSummaryResponseSchema = external_exports.object({
|
|
|
29974
30008
|
|
|
29975
30009
|
// ../../packages/sdk/dist/core/dist/esm/types/failure-category.types.js
|
|
29976
30010
|
var FAILURE_CATEGORY_REGISTRY = {
|
|
29977
|
-
|
|
29978
|
-
|
|
29979
|
-
|
|
29980
|
-
|
|
29981
|
-
|
|
29982
|
-
|
|
29983
|
-
|
|
29984
|
-
|
|
29985
|
-
|
|
29986
|
-
|
|
29987
|
-
|
|
29988
|
-
|
|
29989
|
-
|
|
29990
|
-
|
|
29991
|
-
|
|
29992
|
-
|
|
29993
|
-
|
|
29994
|
-
|
|
29995
|
-
|
|
29996
|
-
|
|
29997
|
-
|
|
29998
|
-
|
|
30011
|
+
ai_quota_exceeded: {
|
|
30012
|
+
reliabilityLabel: "AI usage quota exceeded",
|
|
30013
|
+
countsAgainstReliability: false
|
|
30014
|
+
},
|
|
30015
|
+
mcp_upstream_unavailable: {
|
|
30016
|
+
reliabilityLabel: "Mcp Upstream Unavailable",
|
|
30017
|
+
countsAgainstReliability: true
|
|
30018
|
+
},
|
|
30019
|
+
mcp_client_missing: {
|
|
30020
|
+
reliabilityLabel: "Mcp Client Missing",
|
|
30021
|
+
countsAgainstReliability: true
|
|
30022
|
+
},
|
|
30023
|
+
mcp_tool_missing: {
|
|
30024
|
+
reliabilityLabel: "Mcp Tool Missing",
|
|
30025
|
+
countsAgainstReliability: true
|
|
30026
|
+
},
|
|
30027
|
+
mcp_tool_call_failed: {
|
|
30028
|
+
reliabilityLabel: "Mcp Tool Call Failed",
|
|
30029
|
+
countsAgainstReliability: true
|
|
30030
|
+
},
|
|
30031
|
+
llm_schema_validation: {
|
|
30032
|
+
reliabilityLabel: "Llm Schema Validation",
|
|
30033
|
+
countsAgainstReliability: true
|
|
30034
|
+
},
|
|
30035
|
+
llm_empty_response: {
|
|
30036
|
+
reliabilityLabel: "Llm Empty Response",
|
|
30037
|
+
countsAgainstReliability: true
|
|
30038
|
+
},
|
|
30039
|
+
llm_provider_error: {
|
|
30040
|
+
reliabilityLabel: "Llm Provider Error",
|
|
30041
|
+
countsAgainstReliability: true
|
|
30042
|
+
},
|
|
30043
|
+
prompt_too_large: {
|
|
30044
|
+
reliabilityLabel: "Prompt Too Large",
|
|
30045
|
+
countsAgainstReliability: true
|
|
30046
|
+
},
|
|
30047
|
+
json_parse_error: {
|
|
30048
|
+
reliabilityLabel: "Json Parse Error",
|
|
30049
|
+
countsAgainstReliability: true
|
|
30050
|
+
},
|
|
30051
|
+
code_execution_error: {
|
|
30052
|
+
reliabilityLabel: "Code Execution Error",
|
|
30053
|
+
countsAgainstReliability: true
|
|
30054
|
+
},
|
|
30055
|
+
code_generation_error: {
|
|
30056
|
+
reliabilityLabel: "Code Generation Error",
|
|
30057
|
+
countsAgainstReliability: true
|
|
30058
|
+
},
|
|
30059
|
+
step_execution_error: {
|
|
30060
|
+
reliabilityLabel: "Step Execution Error",
|
|
30061
|
+
countsAgainstReliability: true
|
|
30062
|
+
},
|
|
30063
|
+
step_failure_pattern: {
|
|
30064
|
+
reliabilityLabel: "Step Failure Pattern",
|
|
30065
|
+
countsAgainstReliability: true
|
|
30066
|
+
},
|
|
30067
|
+
schema_validation: {
|
|
30068
|
+
reliabilityLabel: "Schema Validation",
|
|
30069
|
+
countsAgainstReliability: true
|
|
30070
|
+
},
|
|
30071
|
+
template_variable_error: {
|
|
30072
|
+
reliabilityLabel: "Template Variable Error",
|
|
30073
|
+
countsAgainstReliability: true
|
|
30074
|
+
},
|
|
30075
|
+
invalid_configuration: {
|
|
30076
|
+
reliabilityLabel: "Invalid Configuration",
|
|
30077
|
+
countsAgainstReliability: true
|
|
30078
|
+
},
|
|
30079
|
+
invalid_manifest: {
|
|
30080
|
+
reliabilityLabel: "Invalid Manifest",
|
|
30081
|
+
countsAgainstReliability: true
|
|
30082
|
+
},
|
|
30083
|
+
automation_not_found: {
|
|
30084
|
+
reliabilityLabel: "Automation Not Found",
|
|
30085
|
+
countsAgainstReliability: true
|
|
30086
|
+
},
|
|
30087
|
+
timeout: {
|
|
30088
|
+
reliabilityLabel: "Timeout",
|
|
30089
|
+
countsAgainstReliability: true
|
|
30090
|
+
},
|
|
30091
|
+
runtime_error: {
|
|
30092
|
+
reliabilityLabel: "Runtime Error",
|
|
30093
|
+
countsAgainstReliability: true
|
|
30094
|
+
},
|
|
30095
|
+
billing_unavailable: {
|
|
30096
|
+
reliabilityLabel: "Billing Unavailable",
|
|
30097
|
+
countsAgainstReliability: true
|
|
30098
|
+
},
|
|
30099
|
+
unknown: {
|
|
30100
|
+
reliabilityLabel: "Unknown",
|
|
30101
|
+
countsAgainstReliability: true
|
|
30102
|
+
}
|
|
29999
30103
|
};
|
|
30000
30104
|
var FAILURE_CATEGORIES = Object.keys(FAILURE_CATEGORY_REGISTRY);
|
|
30105
|
+
Object.freeze(FAILURE_CATEGORIES.filter((category) => !FAILURE_CATEGORY_REGISTRY[category].countsAgainstReliability));
|
|
30001
30106
|
var SKIP_CATEGORIES = USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS;
|
|
30002
30107
|
|
|
30003
30108
|
// ../../packages/sdk/dist/core/dist/esm/schemas/query-param.schema.js
|
|
@@ -30566,7 +30671,8 @@ var automationSchema = external_exports.object({
|
|
|
30566
30671
|
workspaceId: external_exports.string().nullable(),
|
|
30567
30672
|
visibility: external_exports.enum(AUTOMATION_VISIBILITIES),
|
|
30568
30673
|
isOwner: external_exports.boolean(),
|
|
30569
|
-
disabledReason: external_exports.enum(AUTOMATION_DISABLED_REASONS).nullable()
|
|
30674
|
+
disabledReason: external_exports.enum(AUTOMATION_DISABLED_REASONS).nullable(),
|
|
30675
|
+
loopReview: automationLoopReviewSchema.optional()
|
|
30570
30676
|
});
|
|
30571
30677
|
var automationListResponseSchema = external_exports.object({
|
|
30572
30678
|
data: external_exports.array(automationSchema),
|
|
@@ -30621,6 +30727,7 @@ var ConnectorSchema = external_exports.object({
|
|
|
30621
30727
|
capabilities: ConnectorCapabilitiesSchema,
|
|
30622
30728
|
requiresConnection: external_exports.boolean(),
|
|
30623
30729
|
isSystem: external_exports.boolean().optional(),
|
|
30730
|
+
isPermanent: external_exports.boolean().optional(),
|
|
30624
30731
|
isManaged: external_exports.boolean().optional(),
|
|
30625
30732
|
connectsViaCli: external_exports.boolean().optional(),
|
|
30626
30733
|
mcpServerUrlInput: McpServerUrlInputSchema.optional()
|
|
@@ -30712,7 +30819,8 @@ var automationDraftSchema = external_exports.object({
|
|
|
30712
30819
|
var automationDraftValidationSchema = external_exports.object({
|
|
30713
30820
|
state: external_exports.enum(["incomplete", "ready"]),
|
|
30714
30821
|
issues: external_exports.array(external_exports.string()),
|
|
30715
|
-
modified: external_exports.boolean()
|
|
30822
|
+
modified: external_exports.boolean(),
|
|
30823
|
+
loopReview: automationLoopReviewSchema.optional()
|
|
30716
30824
|
});
|
|
30717
30825
|
var automationDraftWithValidationSchema = automationDraftValidationSchema.extend({ draft: automationDraftSchema });
|
|
30718
30826
|
var automationDraftListResponseSchema = external_exports.object({
|
|
@@ -30721,7 +30829,10 @@ var automationDraftListResponseSchema = external_exports.object({
|
|
|
30721
30829
|
});
|
|
30722
30830
|
var listAutomationDraftsQuerySchema = CursorPaginationSchema.extend({ conversationId: external_exports.string().min(1).optional() });
|
|
30723
30831
|
external_exports.object({ enabled: external_exports.boolean().optional() }).meta({ id: "FinalizeAutomationDraftRequest" });
|
|
30724
|
-
var finalizeAutomationDraftResponseSchema = external_exports.object({
|
|
30832
|
+
var finalizeAutomationDraftResponseSchema = external_exports.object({
|
|
30833
|
+
automation: automationSchema,
|
|
30834
|
+
loopReview: automationLoopReviewSchema.optional()
|
|
30835
|
+
});
|
|
30725
30836
|
var draftTestTriggerSelectorSchema = external_exports.union([external_exports.object({ index: external_exports.int().min(0) }), external_exports.object({ event: external_exports.string().min(1) })]);
|
|
30726
30837
|
var testAutomationDraftRequestSchema = external_exports.object({
|
|
30727
30838
|
trigger: draftTestTriggerSelectorSchema.optional(),
|
|
@@ -31056,17 +31167,28 @@ var automationExecutionResultSchema = external_exports.discriminatedUnion("statu
|
|
|
31056
31167
|
|
|
31057
31168
|
// ../../packages/sdk/dist/core/dist/esm/schemas/sample-automation.schema.js
|
|
31058
31169
|
var sampleAutomationInstructionsSchema = external_exports.string().nullable();
|
|
31170
|
+
var sampleAutomationSharedBySchema = external_exports.object({
|
|
31171
|
+
name: external_exports.string().min(1).max(100),
|
|
31172
|
+
imageId: external_exports.string().nullable()
|
|
31173
|
+
});
|
|
31059
31174
|
var sampleAutomationSchema = external_exports.object({
|
|
31060
31175
|
id: external_exports.string(),
|
|
31061
31176
|
manifest: manifestSchema,
|
|
31062
31177
|
connectorDetails: external_exports.array(connectorDetailsSchema),
|
|
31063
31178
|
isOneClickInstallEnabled: external_exports.boolean().default(false),
|
|
31064
|
-
staffPick: external_exports.boolean().default(false)
|
|
31179
|
+
staffPick: external_exports.boolean().default(false),
|
|
31180
|
+
sharedBy: sampleAutomationSharedBySchema.nullable().optional()
|
|
31065
31181
|
});
|
|
31066
31182
|
var sampleAutomationsSchema = external_exports.array(sampleAutomationSchema);
|
|
31067
31183
|
var sampleAutomationDetailSchema = sampleAutomationSchema.extend({ instructions: sampleAutomationInstructionsSchema });
|
|
31068
31184
|
var SAMPLE_AUTOMATION_NOT_FOUND_CODE = "sample_automation_not_found";
|
|
31069
31185
|
|
|
31186
|
+
// ../../packages/sdk/dist/core/dist/esm/schemas/sample-automation-idea.schema.js
|
|
31187
|
+
var shareAutomationIdeaResponseSchema = external_exports.object({
|
|
31188
|
+
id: external_exports.string(),
|
|
31189
|
+
createdAt: external_exports.string().datetime()
|
|
31190
|
+
});
|
|
31191
|
+
|
|
31070
31192
|
// ../../packages/sdk/dist/clients/automations/endpoints.js
|
|
31071
31193
|
var root4 = "/automations";
|
|
31072
31194
|
var automationsEndpoints = {
|
|
@@ -31075,6 +31197,7 @@ var automationsEndpoints = {
|
|
|
31075
31197
|
metadata: (id) => `${root4}/${encodeURIComponent(id)}/metadata`,
|
|
31076
31198
|
schedule: (id) => `${root4}/${encodeURIComponent(id)}/schedule`,
|
|
31077
31199
|
duplicate: (id) => `${root4}/${encodeURIComponent(id)}/duplicate`,
|
|
31200
|
+
shareIdea: (id) => `${root4}/${encodeURIComponent(id)}/share-idea`,
|
|
31078
31201
|
draft: (id) => `${root4}/${encodeURIComponent(id)}/draft`,
|
|
31079
31202
|
trigger: (id) => `${root4}/${encodeURIComponent(id)}/trigger`,
|
|
31080
31203
|
test: (id) => `${root4}/${encodeURIComponent(id)}/test`,
|
|
@@ -31166,6 +31289,15 @@ var AutomationsClient = class extends BaseClient {
|
|
|
31166
31289
|
});
|
|
31167
31290
|
return automationDraftWithValidationSchema.parse(data);
|
|
31168
31291
|
}
|
|
31292
|
+
async shareIdea(id, options) {
|
|
31293
|
+
const parsedId = IdSchema.parse(id);
|
|
31294
|
+
const data = await this.request({
|
|
31295
|
+
method: "POST",
|
|
31296
|
+
path: automationsEndpoints.shareIdea(parsedId),
|
|
31297
|
+
options
|
|
31298
|
+
});
|
|
31299
|
+
return shareAutomationIdeaResponseSchema.parse(data);
|
|
31300
|
+
}
|
|
31169
31301
|
async createDraft(id, options) {
|
|
31170
31302
|
const parsedId = IdSchema.parse(id);
|
|
31171
31303
|
const data = await this.request({
|
|
@@ -31665,6 +31797,7 @@ var workspaceAutomationsEndpoints = {
|
|
|
31665
31797
|
trigger: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/trigger`,
|
|
31666
31798
|
draft: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/draft`,
|
|
31667
31799
|
duplicate: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/duplicate`,
|
|
31800
|
+
shareIdea: (workspaceId, id) => `${root8(workspaceId)}/${encodeURIComponent(id)}/share-idea`,
|
|
31668
31801
|
sampleInstall: (workspaceId, sampleAutomationId) => `${sample2(workspaceId, sampleAutomationId)}/install`,
|
|
31669
31802
|
sampleDraft: (workspaceId, sampleAutomationId) => `${sample2(workspaceId, sampleAutomationId)}/draft`
|
|
31670
31803
|
};
|
|
@@ -31774,6 +31907,14 @@ var WorkspaceAutomationsClient = class extends BaseClient {
|
|
|
31774
31907
|
});
|
|
31775
31908
|
return automationDraftWithValidationSchema.parse(data);
|
|
31776
31909
|
}
|
|
31910
|
+
async shareIdea(workspaceId, id, options) {
|
|
31911
|
+
const data = await this.request({
|
|
31912
|
+
method: "POST",
|
|
31913
|
+
path: workspaceAutomationsEndpoints.shareIdea(IdSchema.parse(workspaceId), IdSchema.parse(id)),
|
|
31914
|
+
options
|
|
31915
|
+
});
|
|
31916
|
+
return shareAutomationIdeaResponseSchema.parse(data);
|
|
31917
|
+
}
|
|
31777
31918
|
async createDraft(workspaceId, id, options) {
|
|
31778
31919
|
const data = await this.request({
|
|
31779
31920
|
method: "POST",
|
|
@@ -31969,7 +32110,8 @@ var connectionsEndpoints = {
|
|
|
31969
32110
|
dependentAutomations: (connectorId) => `${root11}/${encodeURIComponent(connectorId)}/automations`,
|
|
31970
32111
|
create: (connectorId, capability) => `${root11}/${encodeURIComponent(connectorId)}/${encodeURIComponent(capability)}`,
|
|
31971
32112
|
localOAuth: (connectorId, capability) => `${root11}/${encodeURIComponent(connectorId)}/${encodeURIComponent(capability)}/local-oauth`,
|
|
31972
|
-
checkManifest: `${root11}/check-manifest
|
|
32113
|
+
checkManifest: `${root11}/check-manifest`,
|
|
32114
|
+
ensurePermanent: `${root11}/ensure-permanent`
|
|
31973
32115
|
};
|
|
31974
32116
|
|
|
31975
32117
|
// ../../packages/sdk/dist/clients/connections/connections-client.js
|
|
@@ -32079,6 +32221,13 @@ var ConnectionsClient = class extends BaseClient {
|
|
|
32079
32221
|
});
|
|
32080
32222
|
return ManifestConnectionCheckResultSchema.parse(data);
|
|
32081
32223
|
}
|
|
32224
|
+
async ensurePermanent(options) {
|
|
32225
|
+
await this.request({
|
|
32226
|
+
method: "POST",
|
|
32227
|
+
path: connectionsEndpoints.ensurePermanent,
|
|
32228
|
+
options
|
|
32229
|
+
});
|
|
32230
|
+
}
|
|
32082
32231
|
};
|
|
32083
32232
|
|
|
32084
32233
|
// ../../packages/sdk/dist/clients/connectors/endpoints.js
|
|
@@ -32749,6 +32898,7 @@ var UsageBillingClient = class extends BaseClient {
|
|
|
32749
32898
|
var WEBHOOK_EVENT_TYPES = [
|
|
32750
32899
|
"automation:run:started",
|
|
32751
32900
|
"automation:run:finished",
|
|
32901
|
+
"automation:run:input_required",
|
|
32752
32902
|
"automation:created",
|
|
32753
32903
|
"automation:updated",
|
|
32754
32904
|
"automation:deleted",
|
|
@@ -32848,6 +32998,24 @@ var AutomationRunFinishedEventSchema = external_exports.object({
|
|
|
32848
32998
|
data: AutomationRunFinishedDataSchema
|
|
32849
32999
|
});
|
|
32850
33000
|
|
|
33001
|
+
// ../../packages/sdk/dist/core/dist/esm/schemas/webhook-events/automation-run-input-required.event.js
|
|
33002
|
+
var AutomationRunInputRequiredDataSchema = external_exports.object({
|
|
33003
|
+
automationRunId: external_exports.string(),
|
|
33004
|
+
automationId: external_exports.string(),
|
|
33005
|
+
stepId: external_exports.string(),
|
|
33006
|
+
notificationId: external_exports.string(),
|
|
33007
|
+
message: external_exports.string(),
|
|
33008
|
+
details: external_exports.string().nullable(),
|
|
33009
|
+
options: external_exports.array(PromptOptionSchema),
|
|
33010
|
+
askedAt: external_exports.iso.datetime(),
|
|
33011
|
+
expiresAt: external_exports.iso.datetime().nullable()
|
|
33012
|
+
});
|
|
33013
|
+
var AutomationRunInputRequiredEventSchema = external_exports.object({
|
|
33014
|
+
type: external_exports.literal("automation:run:input_required"),
|
|
33015
|
+
timestamp: external_exports.iso.datetime(),
|
|
33016
|
+
data: AutomationRunInputRequiredDataSchema
|
|
33017
|
+
});
|
|
33018
|
+
|
|
32851
33019
|
// ../../packages/sdk/dist/core/dist/esm/schemas/webhook-events/automation-run-started.event.js
|
|
32852
33020
|
var AutomationRunStartedDataSchema = external_exports.object({
|
|
32853
33021
|
automationRunId: external_exports.string(),
|
|
@@ -32900,6 +33068,7 @@ var WEBHOOK_EVENT_SUBSCRIPTION_DESCRIPTION_MAX_LENGTH = 200;
|
|
|
32900
33068
|
external_exports.discriminatedUnion("type", [
|
|
32901
33069
|
AutomationRunStartedEventSchema,
|
|
32902
33070
|
AutomationRunFinishedEventSchema,
|
|
33071
|
+
AutomationRunInputRequiredEventSchema,
|
|
32903
33072
|
AutomationCreatedEventSchema,
|
|
32904
33073
|
AutomationUpdatedEventSchema,
|
|
32905
33074
|
AutomationDeletedEventSchema,
|
|
@@ -34530,6 +34699,7 @@ async function publishDraft(draftApi, { draftId, confirmed, submittedManifest })
|
|
|
34530
34699
|
action: "published",
|
|
34531
34700
|
summary,
|
|
34532
34701
|
automation: published.automation,
|
|
34702
|
+
...published.loopReview ? { loopReview: published.loopReview } : {},
|
|
34533
34703
|
verification: {
|
|
34534
34704
|
status: "unavailable",
|
|
34535
34705
|
reason: getErrorMessage(error62)
|
|
@@ -34545,7 +34715,8 @@ async function publishDraft(draftApi, { draftId, confirmed, submittedManifest })
|
|
|
34545
34715
|
return {
|
|
34546
34716
|
action: "published",
|
|
34547
34717
|
summary,
|
|
34548
|
-
automation,
|
|
34718
|
+
automation: published.automation,
|
|
34719
|
+
...published.loopReview ? { loopReview: published.loopReview } : {},
|
|
34549
34720
|
verification: isDeepEqual(expected, actual) ? {
|
|
34550
34721
|
status: "matched",
|
|
34551
34722
|
against
|
|
@@ -34565,6 +34736,7 @@ async function previewPublish(draftApi, draftId, submittedManifest) {
|
|
|
34565
34736
|
const diff = published ? diffManifests(normaliseManifest(published.manifest), savedDraft) : null;
|
|
34566
34737
|
return {
|
|
34567
34738
|
summary: {
|
|
34739
|
+
...detail.loopReview ? { loopReview: detail.loopReview } : {},
|
|
34568
34740
|
draftId,
|
|
34569
34741
|
name: readManifestName(draft.partialManifest),
|
|
34570
34742
|
scope: draft.workspaceId === null ? { kind: "personal" } : {
|
|
@@ -35530,30 +35702,68 @@ var ReadUsageSummaryResponseSchema2 = external_exports.object({
|
|
|
35530
35702
|
|
|
35531
35703
|
// ../../packages/core/dist/esm/types/failure-category.types.js
|
|
35532
35704
|
var FAILURE_CATEGORY_REGISTRY2 = {
|
|
35533
|
-
|
|
35534
|
-
|
|
35535
|
-
|
|
35536
|
-
|
|
35537
|
-
|
|
35538
|
-
|
|
35539
|
-
|
|
35540
|
-
|
|
35541
|
-
|
|
35542
|
-
|
|
35543
|
-
|
|
35544
|
-
|
|
35545
|
-
|
|
35546
|
-
|
|
35547
|
-
|
|
35548
|
-
|
|
35549
|
-
|
|
35550
|
-
|
|
35551
|
-
|
|
35552
|
-
|
|
35553
|
-
|
|
35554
|
-
|
|
35705
|
+
ai_quota_exceeded: {
|
|
35706
|
+
reliabilityLabel: "AI usage quota exceeded",
|
|
35707
|
+
countsAgainstReliability: false
|
|
35708
|
+
},
|
|
35709
|
+
mcp_upstream_unavailable: {
|
|
35710
|
+
reliabilityLabel: "Mcp Upstream Unavailable",
|
|
35711
|
+
countsAgainstReliability: true
|
|
35712
|
+
},
|
|
35713
|
+
mcp_client_missing: { reliabilityLabel: "Mcp Client Missing", countsAgainstReliability: true },
|
|
35714
|
+
mcp_tool_missing: { reliabilityLabel: "Mcp Tool Missing", countsAgainstReliability: true },
|
|
35715
|
+
mcp_tool_call_failed: {
|
|
35716
|
+
reliabilityLabel: "Mcp Tool Call Failed",
|
|
35717
|
+
countsAgainstReliability: true
|
|
35718
|
+
},
|
|
35719
|
+
llm_schema_validation: {
|
|
35720
|
+
reliabilityLabel: "Llm Schema Validation",
|
|
35721
|
+
countsAgainstReliability: true
|
|
35722
|
+
},
|
|
35723
|
+
llm_empty_response: { reliabilityLabel: "Llm Empty Response", countsAgainstReliability: true },
|
|
35724
|
+
llm_provider_error: { reliabilityLabel: "Llm Provider Error", countsAgainstReliability: true },
|
|
35725
|
+
prompt_too_large: { reliabilityLabel: "Prompt Too Large", countsAgainstReliability: true },
|
|
35726
|
+
json_parse_error: { reliabilityLabel: "Json Parse Error", countsAgainstReliability: true },
|
|
35727
|
+
code_execution_error: {
|
|
35728
|
+
reliabilityLabel: "Code Execution Error",
|
|
35729
|
+
countsAgainstReliability: true
|
|
35730
|
+
},
|
|
35731
|
+
code_generation_error: {
|
|
35732
|
+
reliabilityLabel: "Code Generation Error",
|
|
35733
|
+
countsAgainstReliability: true
|
|
35734
|
+
},
|
|
35735
|
+
step_execution_error: {
|
|
35736
|
+
reliabilityLabel: "Step Execution Error",
|
|
35737
|
+
countsAgainstReliability: true
|
|
35738
|
+
},
|
|
35739
|
+
step_failure_pattern: {
|
|
35740
|
+
reliabilityLabel: "Step Failure Pattern",
|
|
35741
|
+
countsAgainstReliability: true
|
|
35742
|
+
},
|
|
35743
|
+
schema_validation: { reliabilityLabel: "Schema Validation", countsAgainstReliability: true },
|
|
35744
|
+
template_variable_error: {
|
|
35745
|
+
reliabilityLabel: "Template Variable Error",
|
|
35746
|
+
countsAgainstReliability: true
|
|
35747
|
+
},
|
|
35748
|
+
invalid_configuration: {
|
|
35749
|
+
reliabilityLabel: "Invalid Configuration",
|
|
35750
|
+
countsAgainstReliability: true
|
|
35751
|
+
},
|
|
35752
|
+
invalid_manifest: { reliabilityLabel: "Invalid Manifest", countsAgainstReliability: true },
|
|
35753
|
+
automation_not_found: {
|
|
35754
|
+
reliabilityLabel: "Automation Not Found",
|
|
35755
|
+
countsAgainstReliability: true
|
|
35756
|
+
},
|
|
35757
|
+
timeout: { reliabilityLabel: "Timeout", countsAgainstReliability: true },
|
|
35758
|
+
runtime_error: { reliabilityLabel: "Runtime Error", countsAgainstReliability: true },
|
|
35759
|
+
billing_unavailable: {
|
|
35760
|
+
reliabilityLabel: "Billing Unavailable",
|
|
35761
|
+
countsAgainstReliability: true
|
|
35762
|
+
},
|
|
35763
|
+
unknown: { reliabilityLabel: "Unknown", countsAgainstReliability: true }
|
|
35555
35764
|
};
|
|
35556
35765
|
var FAILURE_CATEGORIES2 = Object.keys(FAILURE_CATEGORY_REGISTRY2);
|
|
35766
|
+
var RELIABILITY_EXCLUDED_FAILURE_CATEGORIES = Object.freeze(FAILURE_CATEGORIES2.filter((category) => !FAILURE_CATEGORY_REGISTRY2[category].countsAgainstReliability));
|
|
35557
35767
|
var SKIP_CATEGORIES2 = USAGE_BILLING_AUTHORIZATION_DENIAL_REASONS2;
|
|
35558
35768
|
function isSkipCategory(category) {
|
|
35559
35769
|
return SKIP_CATEGORIES2.includes(category);
|
|
@@ -36664,6 +36874,12 @@ var ConnectorSchema2 = external_exports.object({
|
|
|
36664
36874
|
* independent from whether a third-party connector requires account setup.
|
|
36665
36875
|
*/
|
|
36666
36876
|
isSystem: external_exports.boolean().optional(),
|
|
36877
|
+
/**
|
|
36878
|
+
* Whether the connector is always connected to the signed-in user's own
|
|
36879
|
+
* account, with one connection per capability that can't be removed.
|
|
36880
|
+
* Unlike `isSystem`, it still runs on a connection.
|
|
36881
|
+
*/
|
|
36882
|
+
isPermanent: external_exports.boolean().optional(),
|
|
36667
36883
|
/**
|
|
36668
36884
|
* Managed connectors (e.g. WhatsApp) share a single linked identity across
|
|
36669
36885
|
* connection types — one onboarding covers both action and trigger uses.
|
|
@@ -38116,6 +38332,7 @@ var PublishDraftOutputSchema = external_exports.union([external_exports.object({
|
|
|
38116
38332
|
draftId: external_exports.string().min(1),
|
|
38117
38333
|
action: CompleteAutomationDraftActionSchema,
|
|
38118
38334
|
automationId: external_exports.string().min(1),
|
|
38335
|
+
loopReview: automationLoopReviewSchema.optional(),
|
|
38119
38336
|
previewArtifact: automationPreviewArtifactSchema.optional()
|
|
38120
38337
|
}), external_exports.object({
|
|
38121
38338
|
success: external_exports.literal(false),
|
|
@@ -38123,6 +38340,7 @@ var PublishDraftOutputSchema = external_exports.union([external_exports.object({
|
|
|
38123
38340
|
instructions: external_exports.string().min(1),
|
|
38124
38341
|
draftId: external_exports.string().min(1),
|
|
38125
38342
|
action: CompleteAutomationDraftActionSchema.optional(),
|
|
38343
|
+
loopReview: automationLoopReviewSchema.optional(),
|
|
38126
38344
|
previewArtifact: automationPreviewArtifactSchema.optional()
|
|
38127
38345
|
})]);
|
|
38128
38346
|
external_exports.object({
|
|
@@ -38541,22 +38759,25 @@ function classifyChatTurnFailure(error62) {
|
|
|
38541
38759
|
|
|
38542
38760
|
// ../../packages/sdk/dist/chat-turn/transport.js
|
|
38543
38761
|
import { DefaultChatTransport, readUIMessageStream } from "ai";
|
|
38762
|
+
function getChatTurnUrl(apiRoot, workspaceId) {
|
|
38763
|
+
return workspaceId ? `${apiRoot}/workspaces/${encodeURIComponent(workspaceId)}/chat` : `${apiRoot}/chat`;
|
|
38764
|
+
}
|
|
38544
38765
|
var ChatTurnTransport = class {
|
|
38545
38766
|
transport;
|
|
38546
38767
|
constructor({ token, baseUrl, headers, fetch: fetch2 }) {
|
|
38547
38768
|
const apiRoot = `${baseUrl.replace(/\/+$/, "")}/v1`;
|
|
38548
38769
|
this.transport = new DefaultChatTransport({
|
|
38549
|
-
api:
|
|
38770
|
+
api: getChatTurnUrl(apiRoot, null),
|
|
38550
38771
|
headers: {
|
|
38551
38772
|
Authorization: `Bearer ${token}`,
|
|
38552
38773
|
...headers
|
|
38553
38774
|
},
|
|
38554
38775
|
credentials: "include",
|
|
38555
38776
|
fetch: fetch2,
|
|
38556
|
-
prepareSendMessagesRequest({ messages, body
|
|
38777
|
+
prepareSendMessagesRequest({ messages, body }) {
|
|
38557
38778
|
const { workspaceId, ...rest } = body ?? {};
|
|
38558
38779
|
return {
|
|
38559
|
-
api:
|
|
38780
|
+
api: getChatTurnUrl(apiRoot, workspaceId),
|
|
38560
38781
|
body: {
|
|
38561
38782
|
...rest,
|
|
38562
38783
|
message: messages.at(-1)
|
|
@@ -42092,6 +42313,7 @@ function formatDraftPublish(result) {
|
|
|
42092
42313
|
return [
|
|
42093
42314
|
`Published draft ${summary.draftId} as automation ${automation.id} (${how}).`,
|
|
42094
42315
|
...describeVerification(verification),
|
|
42316
|
+
...describeLoopReview(result.loopReview),
|
|
42095
42317
|
`Open: ${result.url}`,
|
|
42096
42318
|
...describeQuestionDelivery(summary.questions)
|
|
42097
42319
|
].join("\n");
|
|
@@ -42126,6 +42348,7 @@ function summarizeDraftPublish(result) {
|
|
|
42126
42348
|
}
|
|
42127
42349
|
function describePublishSummary(summary) {
|
|
42128
42350
|
const lines = [
|
|
42351
|
+
...describeLoopReview(summary.loopReview),
|
|
42129
42352
|
`Draft: ${summary.name} (${summary.draftId})`,
|
|
42130
42353
|
summary.scope.kind === "personal" ? "Scope: personal" : `Scope: workspace ${summary.scope.workspaceId} (${describeVisibility2(summary)})`,
|
|
42131
42354
|
summary.target.kind === "new" ? "Action: create a new automation" : `Action: update automation ${summary.target.automationId}`,
|
|
@@ -42145,6 +42368,17 @@ function describePublishSummary(summary) {
|
|
|
42145
42368
|
}
|
|
42146
42369
|
return lines;
|
|
42147
42370
|
}
|
|
42371
|
+
function describeLoopReview(review) {
|
|
42372
|
+
if (review?.state === "unavailable")
|
|
42373
|
+
return ["Warning: loop review is unavailable; no safety conclusion was reached."];
|
|
42374
|
+
if (review?.state !== "reviewed") return [];
|
|
42375
|
+
return [
|
|
42376
|
+
...review.findings.map(
|
|
42377
|
+
(finding) => `Loop warning: ${finding.feedbackPath}. ${finding.suggestedCorrection}`
|
|
42378
|
+
),
|
|
42379
|
+
...review.limitations.map((limitation) => `Loop review limitation: ${limitation}`)
|
|
42380
|
+
];
|
|
42381
|
+
}
|
|
42148
42382
|
function describeVisibility2(summary) {
|
|
42149
42383
|
if (summary.scope.kind !== "workspace") return "";
|
|
42150
42384
|
const visibility = summary.scope.visibility === "workspace" ? "visible to the workspace" : "private";
|