@scarn/sdk 0.8.20 → 0.8.22

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.
Files changed (102) hide show
  1. package/dist/auth/api-token-cache.d.ts +24 -0
  2. package/dist/auth/api-token-source.d.ts +39 -0
  3. package/dist/auth/authenticated-fetch.d.ts +10 -0
  4. package/dist/auth/index.d.ts +3 -0
  5. package/dist/auth/index.js +19 -0
  6. package/dist/automations/index.js +14 -17
  7. package/dist/{chunk-habmdf89.js → chunk-0bwsjn0b.js} +29 -29
  8. package/dist/{chunk-mzj1j0p5.js → chunk-0w13kxkr.js} +34 -31
  9. package/dist/{chunk-qgkx89eg.js → chunk-3j5wf2t5.js} +44 -43
  10. package/dist/{chunk-0y2fy5en.js → chunk-4361gxk0.js} +7 -7
  11. package/dist/{chunk-n3ywwx7n.js → chunk-52520csz.js} +15 -14
  12. package/dist/chunk-5dnfgyx8.js +159 -0
  13. package/dist/{chunk-tr3v83cn.js → chunk-5fa4arn1.js} +18 -11
  14. package/dist/{chunk-ngy1fdcx.js → chunk-631ffb6r.js} +10 -10
  15. package/dist/{chunk-01nfqm18.js → chunk-7anj08zc.js} +11 -9
  16. package/dist/{chunk-yq0sf8sb.js → chunk-7dr4kybf.js} +483 -451
  17. package/dist/chunk-7mhr5aex.js +171 -0
  18. package/dist/chunk-7rywbqzz.js +27 -0
  19. package/dist/{chunk-yf15kdte.js → chunk-9ct3xypr.js} +2636 -3864
  20. package/dist/chunk-9geh4c3v.js +1034 -0
  21. package/dist/{chunk-19brnwkp.js → chunk-9qf0eg7m.js} +19 -19
  22. package/dist/{chunk-y11p1q7r.js → chunk-aqqywy8g.js} +4 -4
  23. package/dist/chunk-bcvx11fn.js +174 -0
  24. package/dist/{chunk-z4smq8qd.js → chunk-cyfeaz43.js} +86 -86
  25. package/dist/chunk-czq37rrt.js +286 -0
  26. package/dist/chunk-ec5z8bbq.js +126 -0
  27. package/dist/{chunk-rt9tq4j6.js → chunk-h9yxx0hd.js} +7 -7
  28. package/dist/{chunk-t1dq2c2s.js → chunk-hma87efq.js} +40 -40
  29. package/dist/{chunk-5dny5jg1.js → chunk-hpv234hf.js} +11 -11
  30. package/dist/{chunk-rq5k7m33.js → chunk-k7xnsmp5.js} +182 -97
  31. package/dist/{chunk-91f5gm5z.js → chunk-kbpkpxcn.js} +22 -21
  32. package/dist/{chunk-6tra3gw8.js → chunk-kjn1knb9.js} +7 -7
  33. package/dist/{chunk-g4j5cfpc.js → chunk-p3s7cjfc.js} +17 -16
  34. package/dist/chunk-pq6hrtnb.js +49 -0
  35. package/dist/{chunk-mp2rqtcj.js → chunk-ptpy7nnm.js} +8 -8
  36. package/dist/{chunk-xqfj56m9.js → chunk-vn1rfxma.js} +8 -8
  37. package/dist/chunk-vyv8kvkv.js +113 -0
  38. package/dist/{chunk-0c60x3v8.js → chunk-xe2zgyz7.js} +35 -35
  39. package/dist/chunk-y4dwmhn2.js +14 -0
  40. package/dist/{chunk-098740f7.js → chunk-yypj3zn0.js} +8 -8
  41. package/dist/chunk-yzj1mfpr.js +1515 -0
  42. package/dist/client.d.ts +5 -1
  43. package/dist/client.js +62 -61
  44. package/dist/connectors/index.js +36 -37
  45. package/dist/contracts/artifact-markers.js +11 -12
  46. package/dist/contracts/artifacts.js +21 -23
  47. package/dist/contracts/automation-document/index.js +28 -30
  48. package/dist/contracts/pipeline-document/built-ins.d.ts +1 -1
  49. package/dist/contracts/pipeline-document/index.js +95 -97
  50. package/dist/contracts/step-artifact-submissions.js +20 -17
  51. package/dist/contracts/work-item-changes.js +8 -6
  52. package/dist/create-api-client.d.ts +11 -0
  53. package/dist/defaults/index.js +44 -884
  54. package/dist/defaults/load-push-defaults.d.ts +11 -4
  55. package/dist/defaults/project-ref.d.ts +2 -4
  56. package/dist/definitions/automations/automations-client.d.ts +2 -1
  57. package/dist/definitions/automations/index.js +6 -8
  58. package/dist/definitions/environments/environments-client.d.ts +2 -1
  59. package/dist/definitions/environments/index.js +37 -38
  60. package/dist/definitions/pipelines/index.js +12 -14
  61. package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +2 -1
  62. package/dist/definitions/steps/define-mcp.d.ts +2 -2
  63. package/dist/definitions/steps/index.js +93 -95
  64. package/dist/definitions/steps/mcp-server-config.d.ts +13 -3
  65. package/dist/definitions/steps/step-definitions-client.d.ts +20 -1
  66. package/dist/definitions/validation/index.js +17 -18
  67. package/dist/devcontainer-config-path.js +9 -11
  68. package/dist/env-vars.js +37 -39
  69. package/dist/environment.js +41 -42
  70. package/dist/eslint.js +0 -2
  71. package/dist/generated/index.d.ts +2 -2
  72. package/dist/generated/sdk.gen.d.ts +41 -1
  73. package/dist/generated/types.gen.d.ts +1801 -0
  74. package/dist/git-url/git-repo-identity.js +0 -2
  75. package/dist/health-checks.js +15 -17
  76. package/dist/index.js +364 -358
  77. package/dist/jsonc.js +7 -8
  78. package/dist/managed-connections.d.ts +16 -0
  79. package/dist/managed-connections.js +9 -0
  80. package/dist/managed-runtimes.js +9 -11
  81. package/dist/opencode-mcp.d.ts +55 -1
  82. package/dist/opencode-mcp.js +33 -28
  83. package/dist/pipelines/index.js +78 -81
  84. package/dist/push/code-step-lookup.js +9 -10
  85. package/dist/push/index.d.ts +1 -0
  86. package/dist/push/index.js +109 -79
  87. package/dist/push/push-from-directory.d.ts +9 -1
  88. package/dist/push/pushed-mcp-servers.d.ts +28 -0
  89. package/dist/repo-config.js +41 -43
  90. package/dist/resolve-environment.js +14 -15
  91. package/dist/scarn-config-parser.js +5 -6
  92. package/dist/task-plane-client.d.ts +143 -1
  93. package/package.json +11 -3
  94. package/dist/chunk-46wmsgv7.js +0 -14
  95. package/dist/chunk-a56zc4s5.js +0 -119
  96. package/dist/chunk-aemxz9r7.js +0 -107
  97. package/dist/chunk-b9ja6ss5.js +0 -275
  98. package/dist/chunk-e0pt5x0e.js +0 -167
  99. package/dist/chunk-pqtd0hr7.js +0 -96
  100. package/dist/chunk-rphfy0fj.js +0 -167
  101. package/dist/chunk-y34zsgsw.js +0 -39
  102. package/dist/chunk-y64skrwp.js +0 -17
@@ -1,19 +1,20 @@
1
1
  // @bun
2
2
  import {
3
- Environments,
4
- createClient
5
- } from "./chunk-rq5k7m33.js";
3
+ Environments2,
4
+ createApiClient
5
+ } from "./chunk-k7xnsmp5.js";
6
6
  import {
7
- exports_external
8
- } from "./chunk-yf15kdte.js";
7
+ string,
8
+ object
9
+ } from "./chunk-9ct3xypr.js";
9
10
 
10
11
  // src/definitions/environments/environments-client.ts
11
- var environmentContentIssueSchema = exports_external.object({
12
- path: exports_external.string(),
13
- message: exports_external.string()
12
+ var environmentContentIssueSchema = object({
13
+ path: string(),
14
+ message: string()
14
15
  });
15
16
 
16
- class EnvironmentsApiError extends Error {
17
+ class EnvironmentsApiError2 extends Error {
17
18
  code;
18
19
  status;
19
20
  issues;
@@ -30,13 +31,13 @@ class EnvironmentsApiError extends Error {
30
31
  }
31
32
  function unwrap(result) {
32
33
  if (result.error !== undefined) {
33
- throw new EnvironmentsApiError(result.error);
34
+ throw new EnvironmentsApiError2(result.error);
34
35
  }
35
36
  return result.data;
36
37
  }
37
- function createEnvironmentsClient(baseUrl) {
38
- const client = createClient({ baseUrl });
39
- return buildEnvironmentsClient(new Environments({ client }));
38
+ function createEnvironmentsClient2(baseUrl, options) {
39
+ const client = createApiClient(baseUrl, { fetch: options?.fetch });
40
+ return buildEnvironmentsClient(new Environments2({ client }));
40
41
  }
41
42
  var buildEnvironmentsClient = (environments) => ({
42
43
  listByProjectId: async (projectId, options) => unwrap(await environments.listEnvironments({
@@ -61,4 +62,4 @@ var buildEnvironmentsClient = (environments) => ({
61
62
  }
62
63
  });
63
64
 
64
- export { EnvironmentsApiError, createEnvironmentsClient };
65
+ export { EnvironmentsApiError2, createEnvironmentsClient2 };
@@ -0,0 +1,159 @@
1
+ // @bun
2
+ import {
3
+ MAX_ENV_VARS2,
4
+ inheritEnvVarSchema2
5
+ } from "./chunk-vyv8kvkv.js";
6
+ import {
7
+ managedConnectionNameSchema2,
8
+ normalizeMcpResourceUrl2
9
+ } from "./chunk-7rywbqzz.js";
10
+ import {
11
+ string,
12
+ int,
13
+ boolean,
14
+ array,
15
+ object,
16
+ strictObject,
17
+ union,
18
+ discriminatedUnion,
19
+ record,
20
+ _enum,
21
+ literal
22
+ } from "./chunk-9ct3xypr.js";
23
+
24
+ // src/opencode-mcp.ts
25
+ var mcpConnectionAuthSchema2 = strictObject({
26
+ connection: managedConnectionNameSchema2
27
+ });
28
+ var workerVarsSchema = array(inheritEnvVarSchema2.safeExtend({ applies: literal("agent") })).max(MAX_ENV_VARS2).refine((entries) => new Set(entries.map((entry) => entry.name)).size === entries.length, { message: "MCP worker variable names must be unique" });
29
+ var nonEmptyStringSchema = string().trim().min(1);
30
+ var mcpStringMapSchema = record(string(), string());
31
+ var positiveIntSchema = int().gt(0).max(Number.MAX_SAFE_INTEGER);
32
+ var openCodeMcpTimeoutSchema2 = object({
33
+ startup: positiveIntSchema.optional(),
34
+ catalog: positiveIntSchema.optional(),
35
+ execution: positiveIntSchema.optional()
36
+ }).strict();
37
+ var openCodeMcpProtocolSchema2 = _enum([
38
+ "legacy",
39
+ "auto",
40
+ "2026-07-28"
41
+ ]);
42
+ var sharedServerFields = {
43
+ disabled: boolean().optional(),
44
+ codemode: boolean().optional(),
45
+ timeout: openCodeMcpTimeoutSchema2.optional(),
46
+ protocol: openCodeMcpProtocolSchema2.optional()
47
+ };
48
+ var openCodeMcpLocalConfigSchema2 = object({
49
+ type: literal("local"),
50
+ command: array(nonEmptyStringSchema).min(1),
51
+ cwd: string().optional(),
52
+ environment: mcpStringMapSchema.optional(),
53
+ ...sharedServerFields
54
+ }).strict();
55
+ var openCodeMcpOAuthConfigSchema2 = object({
56
+ client_id: string().optional(),
57
+ client_secret: string().optional(),
58
+ scope: string().optional(),
59
+ callback_port: positiveIntSchema.optional(),
60
+ redirect_uri: string().optional(),
61
+ auth_server_metadata_url: string().optional()
62
+ }).strict();
63
+ var openCodeMcpRemoteConfigSchema2 = object({
64
+ type: literal("remote"),
65
+ url: string(),
66
+ headers: mcpStringMapSchema.optional(),
67
+ oauth: union([openCodeMcpOAuthConfigSchema2, literal(false)]).optional(),
68
+ ...sharedServerFields
69
+ }).strict();
70
+ var openCodeMcpRefConfigSchema2 = object({
71
+ type: literal("ref"),
72
+ name: nonEmptyStringSchema.optional(),
73
+ workerVars: workerVarsSchema.optional(),
74
+ auth: mcpConnectionAuthSchema2.optional(),
75
+ ...sharedServerFields
76
+ }).strict();
77
+ var openCodeResolvedMcpServerConfigSchema2 = discriminatedUnion("type", [openCodeMcpLocalConfigSchema2, openCodeMcpRemoteConfigSchema2]);
78
+ var openCodeResolvedMcpServersSchema2 = record(string(), openCodeResolvedMcpServerConfigSchema2);
79
+ function remoteConnectionAuthIssues2(entry) {
80
+ if (entry.auth === undefined)
81
+ return [];
82
+ const { connection } = entry.auth;
83
+ const issues = [];
84
+ if (normalizeMcpResourceUrl2(entry.url) === null) {
85
+ issues.push({
86
+ path: "url",
87
+ message: `must be an absolute http(s) URL with no query string, fragment or credentials when auth is set; the ${connection} connection authenticates the server`
88
+ });
89
+ }
90
+ for (const field of ["headers", "oauth", "workerVars"]) {
91
+ if (entry[field] === undefined)
92
+ continue;
93
+ issues.push({
94
+ path: field,
95
+ message: `must be absent when auth is set; the ${connection} connection authenticates the server`
96
+ });
97
+ }
98
+ return issues;
99
+ }
100
+ function refConnectionAuthIssues2(entry) {
101
+ if (entry.auth === undefined || entry.workerVars === undefined)
102
+ return [];
103
+ return [
104
+ {
105
+ path: "workerVars",
106
+ message: `must be absent when auth is set; the ${entry.auth.connection} connection authenticates the server`
107
+ }
108
+ ];
109
+ }
110
+ var addIssues = (issues, ctx) => {
111
+ for (const issue of issues) {
112
+ ctx.addIssue({
113
+ code: "custom",
114
+ path: [issue.path],
115
+ message: issue.message
116
+ });
117
+ }
118
+ };
119
+ var openCodeMcpServerConfigSchema2 = discriminatedUnion("type", [
120
+ openCodeMcpLocalConfigSchema2.extend({
121
+ workerVars: workerVarsSchema.optional()
122
+ }),
123
+ openCodeMcpRemoteConfigSchema2.extend({
124
+ workerVars: workerVarsSchema.optional(),
125
+ auth: mcpConnectionAuthSchema2.optional()
126
+ }).superRefine((entry, ctx) => {
127
+ addIssues(remoteConnectionAuthIssues2(entry), ctx);
128
+ }),
129
+ openCodeMcpRefConfigSchema2.superRefine((entry, ctx) => {
130
+ addIssues(refConnectionAuthIssues2(entry), ctx);
131
+ })
132
+ ]);
133
+ var openCodeMcpServersSchema2 = record(string(), openCodeMcpServerConfigSchema2);
134
+ var ENV_PLACEHOLDER_PATTERN = /\{env:[A-Za-z_][A-Za-z0-9_]*\}/gu;
135
+ var ENV_PLACEHOLDER_NAME_PATTERN = /\{env:([^}]+)\}/gu;
136
+ var AUTH_SCHEME_PATTERN = /^(?:bearer|basic|token)\s+/iu;
137
+ function isEnvPlaceholderValue2(value) {
138
+ if (value.match(ENV_PLACEHOLDER_PATTERN) === null)
139
+ return false;
140
+ return value.trim().replace(AUTH_SCHEME_PATTERN, "").replace(ENV_PLACEHOLDER_PATTERN, "").trim() === "";
141
+ }
142
+ function collectEnvPlaceholderNames2(value) {
143
+ const names = new Set;
144
+ const visit = (item) => {
145
+ if (typeof item === "string") {
146
+ for (const match of item.matchAll(ENV_PLACEHOLDER_NAME_PATTERN)) {
147
+ if (match[1] !== undefined)
148
+ names.add(match[1]);
149
+ }
150
+ } else if (typeof item === "object" && item !== null) {
151
+ for (const child of Object.values(item))
152
+ visit(child);
153
+ }
154
+ };
155
+ visit(value);
156
+ return [...names].sort();
157
+ }
158
+
159
+ export { mcpConnectionAuthSchema2, openCodeMcpTimeoutSchema2, openCodeMcpProtocolSchema2, openCodeMcpLocalConfigSchema2, openCodeMcpOAuthConfigSchema2, openCodeMcpRemoteConfigSchema2, openCodeMcpRefConfigSchema2, openCodeResolvedMcpServerConfigSchema2, openCodeResolvedMcpServersSchema2, remoteConnectionAuthIssues2, refConnectionAuthIssues2, openCodeMcpServerConfigSchema2, openCodeMcpServersSchema2, isEnvPlaceholderValue2, collectEnvPlaceholderNames2 };
@@ -1,17 +1,20 @@
1
1
  // @bun
2
2
  import {
3
- ScarnClient,
4
- TaskRuns,
5
- createClient
6
- } from "./chunk-rq5k7m33.js";
3
+ TaskRuns2,
4
+ ScarnClient2,
5
+ createApiClient
6
+ } from "./chunk-k7xnsmp5.js";
7
7
  // src/task-plane-client.ts
8
8
  function unwrap(result) {
9
9
  if (result.error)
10
10
  throw new Error(JSON.stringify(result.error));
11
11
  return result.data;
12
12
  }
13
- function createTaskPlaneClient(baseUrl, options) {
14
- const client = createClient({ baseUrl, headers: options?.headers });
13
+ function createTaskPlaneClient2(baseUrl, options) {
14
+ const client = createApiClient(baseUrl, {
15
+ headers: options?.headers,
16
+ fetch: options?.fetch
17
+ });
15
18
  const requestHeaders = options?.requestHeaders;
16
19
  if (requestHeaders) {
17
20
  client.interceptors.request.use(async (request) => {
@@ -28,7 +31,7 @@ function createTaskPlaneClient(baseUrl, options) {
28
31
  return response;
29
32
  });
30
33
  }
31
- return buildTaskPlaneClient(new TaskRuns({ client }));
34
+ return buildTaskPlaneClient(new TaskRuns2({ client }));
32
35
  }
33
36
  var buildTaskPlaneClient = (taskRuns) => {
34
37
  return {
@@ -55,6 +58,10 @@ var buildTaskPlaneClient = (taskRuns) => {
55
58
  taskRunId,
56
59
  ...body
57
60
  }) => unwrap(await taskRuns.resolveTaskRunEnvironment({ path: { taskRunId }, body })),
61
+ registerTaskRunManagedLaunch: ({
62
+ taskRunId,
63
+ ...body
64
+ }) => taskRuns.registerTaskRunManagedLaunch({ path: { taskRunId }, body }),
58
65
  readTaskRunWorkItem: async ({
59
66
  taskRunId,
60
67
  ...body
@@ -130,9 +137,9 @@ var buildTaskPlaneClient = (taskRuns) => {
130
137
  };
131
138
 
132
139
  // src/client.ts
133
- function createScarnClient(baseUrl) {
134
- const client = createClient({ baseUrl });
135
- return new ScarnClient({ client });
140
+ function createScarnClient2(baseUrl, options) {
141
+ const client = createApiClient(baseUrl, { fetch: options?.fetch });
142
+ return new ScarnClient2({ client });
136
143
  }
137
144
 
138
- export { createTaskPlaneClient, createScarnClient };
145
+ export { createTaskPlaneClient2, createScarnClient2 };
@@ -1,6 +1,6 @@
1
1
  // @bun
2
2
  // src/contracts/artifact-markers.ts
3
- var ARTIFACT_MARKER_SCHEME = "artifact:";
3
+ var ARTIFACT_MARKER_SCHEME2 = "artifact:";
4
4
  var SIGNAL_REF_PREFIX = "signal/";
5
5
  var MARKER_PATTERN = /(!?)\[((?:\\.|[^\\\]\n])*)\]\((?:<artifact:((?:\\.|[^\\<>\n])*)>|artifact:((?:\\.|[^\\()\s])*))\)/g;
6
6
  var unescapeMarkerText = (value) => value.replace(/\\(.)/g, "$1");
@@ -10,11 +10,11 @@ var formatMarkerDestination = (rawRef) => {
10
10
  if (/[\n\r]/.test(rawRef)) {
11
11
  throw new Error("Artifact marker refs cannot contain line breaks.");
12
12
  }
13
- return `<${ARTIFACT_MARKER_SCHEME}${rawRef.replace(/[\\<>]/g, "\\$&")}>`;
13
+ return `<${ARTIFACT_MARKER_SCHEME2}${rawRef.replace(/[\\<>]/g, "\\$&")}>`;
14
14
  }
15
- return `${ARTIFACT_MARKER_SCHEME}${rawRef.replace(/[\\()]/g, "\\$&")}`;
15
+ return `${ARTIFACT_MARKER_SCHEME2}${rawRef.replace(/[\\()]/g, "\\$&")}`;
16
16
  };
17
- function parseArtifactMarkerRef(rawRef) {
17
+ function parseArtifactMarkerRef2(rawRef) {
18
18
  if (!rawRef.startsWith(SIGNAL_REF_PREFIX)) {
19
19
  return { type: "path", pattern: rawRef };
20
20
  }
@@ -26,18 +26,18 @@ function parseArtifactMarkerRef(rawRef) {
26
26
  signalKey: rest.slice(slash + 1)
27
27
  };
28
28
  }
29
- function formatArtifactMarkerRef(ref) {
29
+ function formatArtifactMarkerRef2(ref) {
30
30
  return ref.type === "signal" ? `${SIGNAL_REF_PREFIX}${ref.stepKey}/${ref.signalKey}` : ref.pattern;
31
31
  }
32
- function buildArtifactMarker(kind, ref, text) {
33
- const rawRef = formatArtifactMarkerRef(ref);
32
+ function buildArtifactMarker2(kind, ref, text) {
33
+ const rawRef = formatArtifactMarkerRef2(ref);
34
34
  if (rawRef.length === 0) {
35
35
  throw new Error("Artifact marker refs cannot be empty.");
36
36
  }
37
37
  const bang = kind === "embed" ? "!" : "";
38
38
  return `${bang}[${escapeMarkerText(text)}](${formatMarkerDestination(rawRef)})`;
39
39
  }
40
- function findArtifactMarkers(text) {
40
+ function findArtifactMarkers2(text) {
41
41
  const matches = [];
42
42
  for (const match of text.matchAll(MARKER_PATTERN)) {
43
43
  const [whole, bang, label, bracketedRef, bareRef] = match;
@@ -46,7 +46,7 @@ function findArtifactMarkers(text) {
46
46
  kind: bang === "!" ? "embed" : "link",
47
47
  text: unescapeMarkerText(label ?? ""),
48
48
  rawRef,
49
- ref: parseArtifactMarkerRef(rawRef),
49
+ ref: parseArtifactMarkerRef2(rawRef),
50
50
  start: match.index,
51
51
  end: match.index + whole.length
52
52
  });
@@ -54,4 +54,4 @@ function findArtifactMarkers(text) {
54
54
  return matches;
55
55
  }
56
56
 
57
- export { ARTIFACT_MARKER_SCHEME, parseArtifactMarkerRef, formatArtifactMarkerRef, buildArtifactMarker, findArtifactMarkers };
57
+ export { ARTIFACT_MARKER_SCHEME2, parseArtifactMarkerRef2, formatArtifactMarkerRef2, buildArtifactMarker2, findArtifactMarkers2 };
@@ -1,6 +1,6 @@
1
1
  // @bun
2
2
  // src/contracts/pipeline-document/built-ins.ts
3
- var BUILT_IN_ERRORS = [
3
+ var BUILT_IN_ERRORS2 = [
4
4
  "Scarn.All",
5
5
  "Scarn.StepFailed",
6
6
  "Scarn.HealthCheckFailed",
@@ -13,14 +13,16 @@ var BUILT_IN_ERRORS = [
13
13
  "Scarn.ArgsError",
14
14
  "Scarn.LogArchiveFailed",
15
15
  "Scarn.WorkItemChangesInvalid",
16
- "Scarn.WorkItemNotNative"
16
+ "Scarn.WorkItemNotNative",
17
+ "ManagedConnectionAuthorityLost",
18
+ "ManagedConnectionNotReady"
17
19
  ];
18
- var WAIT_ERRORS = [
20
+ var WAIT_ERRORS2 = [
19
21
  "Scarn.All",
20
22
  "Scarn.MaxRunsExceeded",
21
23
  "Scarn.ArgsError"
22
24
  ];
23
- function decisionResultSchema(actions) {
25
+ function decisionResultSchema2(actions) {
24
26
  const keys = [...new Set(actions.map((action) => action.key))];
25
27
  return {
26
28
  title: "DecisionResult",
@@ -33,7 +35,7 @@ function decisionResultSchema(actions) {
33
35
  additionalProperties: false
34
36
  };
35
37
  }
36
- var REPLY_RESULT_SCHEMA = {
38
+ var REPLY_RESULT_SCHEMA2 = {
37
39
  title: "ReplyResult",
38
40
  type: "object",
39
41
  properties: {
@@ -44,7 +46,7 @@ var REPLY_RESULT_SCHEMA = {
44
46
  required: ["replied", "body", "commentId"],
45
47
  additionalProperties: false
46
48
  };
47
- var CONVERSATION_RESULT_SCHEMA = {
49
+ var CONVERSATION_RESULT_SCHEMA2 = {
48
50
  title: "ConversationResult",
49
51
  type: "object",
50
52
  properties: {
@@ -54,11 +56,11 @@ var CONVERSATION_RESULT_SCHEMA = {
54
56
  required: ["conversationId", "summary"],
55
57
  additionalProperties: false
56
58
  };
57
- var REPLY_INPUT_SCHEMA = {
59
+ var REPLY_INPUT_SCHEMA2 = {
58
60
  type: "array",
59
61
  items: { type: "string" }
60
62
  };
61
- var ERROR_SCHEMA = {
63
+ var ERROR_SCHEMA2 = {
62
64
  title: "Error",
63
65
  type: "object",
64
66
  properties: {
@@ -69,4 +71,4 @@ var ERROR_SCHEMA = {
69
71
  required: ["name", "message"]
70
72
  };
71
73
 
72
- export { BUILT_IN_ERRORS, WAIT_ERRORS, decisionResultSchema, REPLY_RESULT_SCHEMA, CONVERSATION_RESULT_SCHEMA, REPLY_INPUT_SCHEMA, ERROR_SCHEMA };
74
+ export { BUILT_IN_ERRORS2, WAIT_ERRORS2, decisionResultSchema2, REPLY_RESULT_SCHEMA2, CONVERSATION_RESULT_SCHEMA2, REPLY_INPUT_SCHEMA2, ERROR_SCHEMA2 };