@scarn/sdk 0.8.21 → 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.
- package/dist/auth/index.js +15 -16
- package/dist/automations/index.js +14 -17
- package/dist/{chunk-6p340dd4.js → chunk-0bwsjn0b.js} +29 -29
- package/dist/{chunk-r3sbp2wn.js → chunk-0w13kxkr.js} +34 -31
- package/dist/{chunk-nkm31g10.js → chunk-3j5wf2t5.js} +44 -43
- package/dist/{chunk-0y2fy5en.js → chunk-4361gxk0.js} +7 -7
- package/dist/{chunk-8tmsvkmj.js → chunk-52520csz.js} +13 -12
- package/dist/chunk-5dnfgyx8.js +159 -0
- package/dist/{chunk-k57h6qke.js → chunk-5fa4arn1.js} +12 -8
- package/dist/{chunk-ngy1fdcx.js → chunk-631ffb6r.js} +10 -10
- package/dist/{chunk-01nfqm18.js → chunk-7anj08zc.js} +11 -9
- package/dist/{chunk-p74r4y6j.js → chunk-7dr4kybf.js} +481 -449
- package/dist/chunk-7mhr5aex.js +171 -0
- package/dist/chunk-7rywbqzz.js +27 -0
- package/dist/{chunk-xhpp6qz8.js → chunk-9ct3xypr.js} +2552 -3780
- package/dist/{chunk-azss2d1n.js → chunk-9geh4c3v.js} +153 -155
- package/dist/{chunk-8hsk6f6b.js → chunk-9qf0eg7m.js} +19 -19
- package/dist/{chunk-y11p1q7r.js → chunk-aqqywy8g.js} +4 -4
- package/dist/chunk-bcvx11fn.js +174 -0
- package/dist/{chunk-59arcerk.js → chunk-cyfeaz43.js} +86 -86
- package/dist/chunk-czq37rrt.js +286 -0
- package/dist/chunk-ec5z8bbq.js +126 -0
- package/dist/{chunk-rt9tq4j6.js → chunk-h9yxx0hd.js} +7 -7
- package/dist/{chunk-gasw078g.js → chunk-hma87efq.js} +40 -40
- package/dist/{chunk-5dny5jg1.js → chunk-hpv234hf.js} +11 -11
- package/dist/{chunk-y81cr6tp.js → chunk-k7xnsmp5.js} +158 -87
- package/dist/{chunk-zxzvketc.js → chunk-kbpkpxcn.js} +20 -19
- package/dist/{chunk-6tra3gw8.js → chunk-kjn1knb9.js} +7 -7
- package/dist/{chunk-0he2dx5n.js → chunk-p3s7cjfc.js} +15 -14
- package/dist/chunk-pq6hrtnb.js +49 -0
- package/dist/{chunk-mp2rqtcj.js → chunk-ptpy7nnm.js} +8 -8
- package/dist/{chunk-xqfj56m9.js → chunk-vn1rfxma.js} +8 -8
- package/dist/chunk-vyv8kvkv.js +113 -0
- package/dist/{chunk-h1v6w1fh.js → chunk-xe2zgyz7.js} +35 -35
- package/dist/chunk-y4dwmhn2.js +14 -0
- package/dist/{chunk-8kzaxz52.js → chunk-yypj3zn0.js} +8 -8
- package/dist/chunk-yzj1mfpr.js +1515 -0
- package/dist/client.js +62 -61
- package/dist/connectors/index.js +36 -37
- package/dist/contracts/artifact-markers.js +11 -12
- package/dist/contracts/artifacts.js +21 -23
- package/dist/contracts/automation-document/index.js +28 -30
- package/dist/contracts/pipeline-document/built-ins.d.ts +1 -1
- package/dist/contracts/pipeline-document/index.js +95 -97
- package/dist/contracts/step-artifact-submissions.js +20 -17
- package/dist/contracts/work-item-changes.js +8 -6
- package/dist/defaults/index.js +22 -23
- package/dist/definitions/automations/index.js +6 -8
- package/dist/definitions/environments/index.js +37 -38
- package/dist/definitions/pipelines/index.js +12 -14
- package/dist/definitions/steps/define-mcp.d.ts +2 -2
- package/dist/definitions/steps/index.js +93 -95
- package/dist/definitions/steps/mcp-server-config.d.ts +13 -3
- package/dist/definitions/steps/step-definitions-client.d.ts +18 -0
- package/dist/definitions/validation/index.js +17 -18
- package/dist/devcontainer-config-path.js +9 -11
- package/dist/env-vars.js +37 -39
- package/dist/environment.js +41 -42
- package/dist/eslint.js +0 -2
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/sdk.gen.d.ts +41 -1
- package/dist/generated/types.gen.d.ts +1801 -0
- package/dist/git-url/git-repo-identity.js +0 -2
- package/dist/health-checks.js +15 -17
- package/dist/index.js +364 -358
- package/dist/jsonc.js +7 -8
- package/dist/managed-connections.d.ts +16 -0
- package/dist/managed-connections.js +9 -0
- package/dist/managed-runtimes.js +9 -11
- package/dist/opencode-mcp.d.ts +55 -1
- package/dist/opencode-mcp.js +33 -28
- package/dist/pipelines/index.js +78 -81
- package/dist/push/code-step-lookup.js +9 -10
- package/dist/push/index.d.ts +1 -0
- package/dist/push/index.js +88 -59
- package/dist/push/push-from-directory.d.ts +3 -0
- package/dist/push/pushed-mcp-servers.d.ts +28 -0
- package/dist/repo-config.js +41 -43
- package/dist/resolve-environment.js +14 -15
- package/dist/scarn-config-parser.js +5 -6
- package/dist/task-plane-client.d.ts +137 -1
- package/package.json +6 -2
- package/dist/chunk-08gcnrzh.js +0 -96
- package/dist/chunk-5say64w8.js +0 -14
- package/dist/chunk-aph2js2v.js +0 -167
- package/dist/chunk-mrzn5tq4.js +0 -107
- package/dist/chunk-pwyj6qf3.js +0 -119
- package/dist/chunk-qt81x1pm.js +0 -275
- package/dist/chunk-vsp708vw.js +0 -167
- package/dist/chunk-y64skrwp.js +0 -17
- package/dist/chunk-y7ac1t9c.js +0 -39
package/dist/defaults/index.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
createApiTokenSource,
|
|
4
|
-
createAuthenticatedFetch,
|
|
5
3
|
parse,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
writeJsonFileAtomically,
|
|
5
|
+
setHomeDirForTests2,
|
|
6
|
+
resolveHomeDir2,
|
|
7
|
+
createApiTokenSource2,
|
|
8
|
+
createAuthenticatedFetch2
|
|
9
|
+
} from "../chunk-9geh4c3v.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "../chunk-
|
|
11
|
+
parseJsonc2
|
|
12
|
+
} from "../chunk-h9yxx0hd.js";
|
|
13
|
+
import"../chunk-k7xnsmp5.js";
|
|
13
14
|
import {
|
|
14
|
-
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import"../chunk-y81cr6tp.js";
|
|
17
|
-
import"../chunk-y64skrwp.js";
|
|
15
|
+
createScarnClient2
|
|
16
|
+
} from "../chunk-5fa4arn1.js";
|
|
18
17
|
|
|
19
18
|
// src/defaults/auth-file.ts
|
|
20
19
|
import { existsSync as existsSync2, lstatSync as lstatSync2, readFileSync as readFileSync2, rmSync as rmSync2 } from "fs";
|
|
@@ -23,8 +22,8 @@ import { join as join2 } from "path";
|
|
|
23
22
|
// src/defaults/legacy-config-migration.ts
|
|
24
23
|
import { existsSync, lstatSync, readFileSync, rmSync } from "fs";
|
|
25
24
|
import { join } from "path";
|
|
26
|
-
var legacyBareAuthFilePath = () => join(
|
|
27
|
-
var legacyJsonAuthFilePath = () => join(
|
|
25
|
+
var legacyBareAuthFilePath = () => join(resolveHomeDir2(), ".scarn");
|
|
26
|
+
var legacyJsonAuthFilePath = () => join(resolveHomeDir2(), ".scarn.json");
|
|
28
27
|
var isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29
28
|
function migrateLegacyConfigIfNeeded(input) {
|
|
30
29
|
if (input.authFileExists() && input.configFileExists())
|
|
@@ -60,8 +59,8 @@ function migrateLegacyConfigIfNeeded(input) {
|
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
// src/defaults/auth-file.ts
|
|
63
|
-
var authFilePath = () => join2(
|
|
64
|
-
var configFilePath = () => join2(
|
|
62
|
+
var authFilePath = () => join2(resolveHomeDir2(), ".scarn", "auth.jsonc");
|
|
63
|
+
var configFilePath = () => join2(resolveHomeDir2(), ".scarn", "config.jsonc");
|
|
65
64
|
var MIGRATION_DEFAULT_ARTIFACT_RETENTION = {
|
|
66
65
|
localMaxBytes: 2 * 1024 ** 3,
|
|
67
66
|
localMaxAgeDays: 14
|
|
@@ -157,8 +156,8 @@ import { randomUUID } from "crypto";
|
|
|
157
156
|
import { join as join3 } from "path";
|
|
158
157
|
var DEFAULT_ARTIFACT_LOCAL_MAX_BYTES = 2 * 1024 ** 3;
|
|
159
158
|
var DEFAULT_ARTIFACT_LOCAL_MAX_AGE_DAYS = 14;
|
|
160
|
-
var authFilePath2 = () => join3(
|
|
161
|
-
var configFilePath2 = () => join3(
|
|
159
|
+
var authFilePath2 = () => join3(resolveHomeDir2(), ".scarn", "auth.jsonc");
|
|
160
|
+
var configFilePath2 = () => join3(resolveHomeDir2(), ".scarn", "config.jsonc");
|
|
162
161
|
var getConfigFilePath = () => configFilePath2();
|
|
163
162
|
var defaultConfigFile = () => ({
|
|
164
163
|
artifacts: {
|
|
@@ -303,7 +302,7 @@ function isProjectConfig(value) {
|
|
|
303
302
|
async function loadProjectConfig(rootDir = process.cwd()) {
|
|
304
303
|
try {
|
|
305
304
|
const content = await readFile(getConfigPath(rootDir), "utf8");
|
|
306
|
-
const parsed =
|
|
305
|
+
const parsed = parseJsonc2(content);
|
|
307
306
|
return isProjectConfig(parsed) ? parsed : null;
|
|
308
307
|
} catch {
|
|
309
308
|
return null;
|
|
@@ -363,7 +362,7 @@ async function loadPushDefaults(opts) {
|
|
|
363
362
|
const baseUrl = resolveScarnBaseUrl();
|
|
364
363
|
const envAccessToken = process.env["SCARN_ACCESS_TOKEN"]?.trim();
|
|
365
364
|
const accessToken = envAccessToken ? envAccessToken : loadAuthProfile(baseUrl)?.accessToken;
|
|
366
|
-
const fetch = accessToken ?
|
|
365
|
+
const fetch = accessToken ? createAuthenticatedFetch2(createApiTokenSource2({ baseUrl, getSessionToken: () => accessToken })) : undefined;
|
|
367
366
|
const envProjectId = process.env["SCARN_PROJECT_ID"]?.trim();
|
|
368
367
|
if (envProjectId) {
|
|
369
368
|
return { baseUrl, projectId: envProjectId, fetch };
|
|
@@ -372,7 +371,7 @@ async function loadPushDefaults(opts) {
|
|
|
372
371
|
if (!config || !fetch) {
|
|
373
372
|
return { baseUrl, projectId: undefined, fetch };
|
|
374
373
|
}
|
|
375
|
-
const resolved = await resolveProjectRef(
|
|
374
|
+
const resolved = await resolveProjectRef(createScarnClient2(baseUrl, { fetch }), config.project, { action: "push pipelines to" });
|
|
376
375
|
return { baseUrl, projectId: resolved.id, fetch };
|
|
377
376
|
}
|
|
378
377
|
export {
|
|
@@ -393,10 +392,10 @@ export {
|
|
|
393
392
|
loadProjectConfig,
|
|
394
393
|
loadPushDefaults,
|
|
395
394
|
parseProjectRef,
|
|
396
|
-
resolveHomeDir,
|
|
395
|
+
resolveHomeDir2 as resolveHomeDir,
|
|
397
396
|
resolveProjectRef,
|
|
398
397
|
resolveScarnBaseUrl,
|
|
399
398
|
saveAuthProfile,
|
|
400
|
-
setHomeDirForTests,
|
|
399
|
+
setHomeDirForTests2 as setHomeDirForTests,
|
|
401
400
|
setTelemetryDisabled
|
|
402
401
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import"../../chunk-
|
|
7
|
-
import"../../chunk-xhpp6qz8.js";
|
|
8
|
-
import"../../chunk-y64skrwp.js";
|
|
3
|
+
AutomationsApiError2,
|
|
4
|
+
createAutomationsClient2
|
|
5
|
+
} from "../../chunk-p3s7cjfc.js";
|
|
6
|
+
import"../../chunk-k7xnsmp5.js";
|
|
9
7
|
export {
|
|
10
|
-
AutomationsApiError,
|
|
11
|
-
createAutomationsClient
|
|
8
|
+
AutomationsApiError2 as AutomationsApiError,
|
|
9
|
+
createAutomationsClient2 as createAutomationsClient
|
|
12
10
|
};
|
|
@@ -1,52 +1,51 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
containsInputToken2
|
|
4
|
+
} from "../../chunk-vyv8kvkv.js";
|
|
5
|
+
import"../../chunk-7rywbqzz.js";
|
|
6
|
+
import"../../chunk-5dnfgyx8.js";
|
|
6
7
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
normalizeEnv
|
|
12
|
-
} from "../../chunk-gasw078g.js";
|
|
8
|
+
findMissingConnectorVars2
|
|
9
|
+
} from "../../chunk-3j5wf2t5.js";
|
|
10
|
+
import"../../chunk-yypj3zn0.js";
|
|
11
|
+
import"../../chunk-y4dwmhn2.js";
|
|
13
12
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
environmentNameSchema2,
|
|
14
|
+
environmentContentSchema2
|
|
15
|
+
} from "../../chunk-bcvx11fn.js";
|
|
16
16
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
Env2,
|
|
18
|
+
normalizeEnv2,
|
|
19
|
+
Runtime2,
|
|
20
|
+
assertNoSetupVarsOnHost2,
|
|
21
|
+
compileConnectors2
|
|
22
|
+
} from "../../chunk-hma87efq.js";
|
|
22
23
|
import {
|
|
23
|
-
|
|
24
|
-
} from "../../chunk-
|
|
25
|
-
import"../../chunk-
|
|
24
|
+
isEnvironmentHandle2
|
|
25
|
+
} from "../../chunk-kjn1knb9.js";
|
|
26
|
+
import"../../chunk-k7xnsmp5.js";
|
|
26
27
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
import"../../chunk-xhpp6qz8.js";
|
|
31
|
-
import"../../chunk-y64skrwp.js";
|
|
28
|
+
EnvironmentsApiError2,
|
|
29
|
+
createEnvironmentsClient2
|
|
30
|
+
} from "../../chunk-52520csz.js";
|
|
32
31
|
|
|
33
32
|
// src/definitions/environments/define-environment.ts
|
|
34
33
|
function compileContent(owner, config) {
|
|
35
34
|
if (typeof config.vars === "function") {
|
|
36
35
|
throw new Error(`${owner}: vars must be a record; an environment is shared across steps with different inputs, so it has no function form.`);
|
|
37
36
|
}
|
|
38
|
-
const vars =
|
|
37
|
+
const vars = normalizeEnv2(config.vars);
|
|
39
38
|
const tokenVar = (vars ?? []).find((entry) => [
|
|
40
39
|
entry.source === "value" ? entry.value : undefined,
|
|
41
40
|
entry.source === "inherit" ? entry.default : undefined
|
|
42
|
-
].some((value) => value !== undefined &&
|
|
41
|
+
].some((value) => value !== undefined && containsInputToken2(value)));
|
|
43
42
|
if (tokenVar !== undefined) {
|
|
44
43
|
throw new Error(`${owner} env "${tokenVar.name}": an environment is shared across steps with different inputs, so it cannot use {{input.\u2026}} tokens. Put input-dependent vars on the step's inline environment.`);
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
const connectors =
|
|
45
|
+
assertNoSetupVarsOnHost2(vars, config.runtime, owner);
|
|
46
|
+
const connectors = compileConnectors2(config.connectors, owner);
|
|
48
47
|
assertConnectorVars(owner, connectors ?? [], vars ?? []);
|
|
49
|
-
const parsed =
|
|
48
|
+
const parsed = environmentContentSchema2.safeParse({
|
|
50
49
|
...config.description === undefined ? {} : { description: config.description },
|
|
51
50
|
...config.runtime === undefined ? {} : { runtime: config.runtime },
|
|
52
51
|
...vars === null ? {} : { vars },
|
|
@@ -57,14 +56,14 @@ function compileContent(owner, config) {
|
|
|
57
56
|
throw new Error(`${owner}: ${parsed.error.issues.map((issue) => issue.path.length > 0 ? `${issue.path.map(String).join(".")}: ${issue.message}` : issue.message).join("; ")}`);
|
|
58
57
|
}
|
|
59
58
|
function assertConnectorVars(owner, connectors, vars) {
|
|
60
|
-
const missing =
|
|
59
|
+
const missing = findMissingConnectorVars2(connectors, vars);
|
|
61
60
|
if (missing.length === 0)
|
|
62
61
|
return;
|
|
63
|
-
throw new Error(`${owner} is missing variables its connectors need: ${missing.map(({ connector, vars
|
|
62
|
+
throw new Error(`${owner} is missing variables its connectors need: ${missing.map(({ connector, vars }) => `${connector} needs ${vars.join(", ")}`).join("; ")}. Add them to the environment's vars.`);
|
|
64
63
|
}
|
|
65
64
|
function defineEnvironment(config) {
|
|
66
65
|
const owner = `Environment "${config.name}"`;
|
|
67
|
-
const name =
|
|
66
|
+
const name = environmentNameSchema2.safeParse(config.name);
|
|
68
67
|
if (!name.success) {
|
|
69
68
|
throw new Error(`${owner}: name ${name.error.issues.map((issue) => issue.message).join("; ")}`);
|
|
70
69
|
}
|
|
@@ -87,11 +86,11 @@ function defineEnvironment(config) {
|
|
|
87
86
|
});
|
|
88
87
|
}
|
|
89
88
|
export {
|
|
90
|
-
Env,
|
|
91
|
-
EnvironmentsApiError,
|
|
92
|
-
Runtime,
|
|
93
|
-
createEnvironmentsClient,
|
|
89
|
+
Env2 as Env,
|
|
90
|
+
EnvironmentsApiError2 as EnvironmentsApiError,
|
|
91
|
+
Runtime2 as Runtime,
|
|
92
|
+
createEnvironmentsClient2 as createEnvironmentsClient,
|
|
94
93
|
defineEnvironment,
|
|
95
|
-
environmentContentSchema,
|
|
96
|
-
isEnvironmentHandle
|
|
94
|
+
environmentContentSchema2 as environmentContentSchema,
|
|
95
|
+
isEnvironmentHandle2 as isEnvironmentHandle
|
|
97
96
|
};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import"../../chunk-
|
|
10
|
-
import"../../chunk-xhpp6qz8.js";
|
|
11
|
-
import"../../chunk-y64skrwp.js";
|
|
3
|
+
PipelineDefinitionsApiError2,
|
|
4
|
+
createPipelineDefinitionsClient2,
|
|
5
|
+
WORK_ITEM_TOP_LEVEL_FIELDS2,
|
|
6
|
+
WORK_ITEM_FIELDS_PATH_PREFIX2,
|
|
7
|
+
resolveWorkItemFieldPath2
|
|
8
|
+
} from "../../chunk-kbpkpxcn.js";
|
|
9
|
+
import"../../chunk-k7xnsmp5.js";
|
|
12
10
|
export {
|
|
13
|
-
PipelineDefinitionsApiError,
|
|
14
|
-
WORK_ITEM_FIELDS_PATH_PREFIX,
|
|
15
|
-
WORK_ITEM_TOP_LEVEL_FIELDS,
|
|
16
|
-
createPipelineDefinitionsClient,
|
|
17
|
-
resolveWorkItemFieldPath
|
|
11
|
+
PipelineDefinitionsApiError2 as PipelineDefinitionsApiError,
|
|
12
|
+
WORK_ITEM_FIELDS_PATH_PREFIX2 as WORK_ITEM_FIELDS_PATH_PREFIX,
|
|
13
|
+
WORK_ITEM_TOP_LEVEL_FIELDS2 as WORK_ITEM_TOP_LEVEL_FIELDS,
|
|
14
|
+
createPipelineDefinitionsClient2 as createPipelineDefinitionsClient,
|
|
15
|
+
resolveWorkItemFieldPath2 as resolveWorkItemFieldPath
|
|
18
16
|
};
|
|
@@ -67,8 +67,8 @@ export type ResolvedMcpCheck = {
|
|
|
67
67
|
export declare function isMcpHandle(value: unknown): value is McpHandle;
|
|
68
68
|
/**
|
|
69
69
|
* Defines an MCP server once, with its env vars and health checks. Throws on
|
|
70
|
-
* an invalid server field, a literal `environment`/`headers` value,
|
|
71
|
-
* invalid check or env var name
|
|
70
|
+
* an invalid server field, a literal `environment`/`headers` value, an
|
|
71
|
+
* invalid check or env var name, or env vars beside `auth`.
|
|
72
72
|
*/
|
|
73
73
|
export declare function defineMcp<TChecks extends Record<string, McpCheckInput> = Record<never, never>>(config: DefineMcpConfig<TChecks>): McpHandle<keyof TChecks & string>;
|
|
74
74
|
/**
|
|
@@ -1,102 +1,100 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Repo,
|
|
9
|
-
WorkBranch,
|
|
10
|
-
artifact,
|
|
11
|
-
assertBaseBranchFitsEnvironment,
|
|
12
|
-
codeStep,
|
|
13
|
-
compileMcps,
|
|
14
|
-
compileRepo,
|
|
15
|
-
compileStepConcurrency,
|
|
16
|
-
compileStepErrors,
|
|
17
|
-
compileStepMaxTurns,
|
|
18
|
-
compileStepRetry,
|
|
19
|
-
createStepDefinitionsClient,
|
|
20
|
-
defineMcp,
|
|
21
|
-
defineStep,
|
|
3
|
+
ARTIFACT_BRAND2,
|
|
4
|
+
ArtifactTypes2,
|
|
5
|
+
normalizeArtifactAccept2,
|
|
6
|
+
artifact2,
|
|
7
|
+
Artifact2,
|
|
22
8
|
exports_z,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
9
|
+
Repo2,
|
|
10
|
+
WorkBranch2,
|
|
11
|
+
compileRepo2,
|
|
12
|
+
assertBaseBranchFitsEnvironment2,
|
|
13
|
+
isMcpHandle2,
|
|
14
|
+
defineMcp2,
|
|
15
|
+
resolveMcpChecks2,
|
|
16
|
+
compileMcps2,
|
|
17
|
+
compileStepErrors2,
|
|
18
|
+
compileStepRetry2,
|
|
19
|
+
compileStepMaxTurns2,
|
|
20
|
+
compileStepConcurrency2,
|
|
21
|
+
toStepHandle2,
|
|
22
|
+
stepEnvironmentHandle2,
|
|
23
|
+
toStepSpec2,
|
|
24
|
+
defineStep2,
|
|
25
|
+
codeStep2,
|
|
26
|
+
createStepDefinitionsClient2,
|
|
27
|
+
grantActionValues2,
|
|
28
|
+
grantScopeValues2,
|
|
29
|
+
Features2,
|
|
30
|
+
Notify2
|
|
31
|
+
} from "../../chunk-7dr4kybf.js";
|
|
32
|
+
import"../../chunk-pq6hrtnb.js";
|
|
33
33
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} from "../../chunk-
|
|
46
|
-
import"../../chunk-
|
|
47
|
-
import"../../chunk-
|
|
48
|
-
import"../../chunk-
|
|
49
|
-
import"../../chunk-
|
|
50
|
-
import"../../chunk-
|
|
51
|
-
import"../../chunk-
|
|
52
|
-
import"../../chunk-
|
|
53
|
-
import"../../chunk-
|
|
54
|
-
import"../../chunk-
|
|
55
|
-
import"../../chunk-
|
|
56
|
-
import"../../chunk-
|
|
57
|
-
import"../../chunk-
|
|
58
|
-
import"../../chunk-
|
|
59
|
-
import"../../chunk-
|
|
60
|
-
import"../../chunk-xhpp6qz8.js";
|
|
61
|
-
import"../../chunk-y64skrwp.js";
|
|
34
|
+
createPromptInputProxy2,
|
|
35
|
+
createPromptTemplateContext2,
|
|
36
|
+
renderPromptTemplate2,
|
|
37
|
+
isSecretLookingEnvName2,
|
|
38
|
+
Env2,
|
|
39
|
+
normalizeEnv2,
|
|
40
|
+
Runtime2,
|
|
41
|
+
assertNoSetupVarsOnHost2,
|
|
42
|
+
compileConnectors2,
|
|
43
|
+
knownEnvironmentVars2,
|
|
44
|
+
compileEnvironment2
|
|
45
|
+
} from "../../chunk-hma87efq.js";
|
|
46
|
+
import"../../chunk-kjn1knb9.js";
|
|
47
|
+
import"../../chunk-vn1rfxma.js";
|
|
48
|
+
import"../../chunk-aqqywy8g.js";
|
|
49
|
+
import"../../chunk-7mhr5aex.js";
|
|
50
|
+
import"../../chunk-bcvx11fn.js";
|
|
51
|
+
import"../../chunk-yypj3zn0.js";
|
|
52
|
+
import"../../chunk-y4dwmhn2.js";
|
|
53
|
+
import"../../chunk-3j5wf2t5.js";
|
|
54
|
+
import"../../chunk-5dnfgyx8.js";
|
|
55
|
+
import"../../chunk-7rywbqzz.js";
|
|
56
|
+
import"../../chunk-vyv8kvkv.js";
|
|
57
|
+
import"../../chunk-k7xnsmp5.js";
|
|
58
|
+
import"../../chunk-631ffb6r.js";
|
|
59
|
+
import"../../chunk-9qf0eg7m.js";
|
|
62
60
|
export {
|
|
63
|
-
ARTIFACT_BRAND,
|
|
64
|
-
Artifact,
|
|
65
|
-
ArtifactTypes,
|
|
66
|
-
Env,
|
|
67
|
-
Features,
|
|
68
|
-
Notify,
|
|
69
|
-
Repo,
|
|
70
|
-
Runtime,
|
|
71
|
-
WorkBranch,
|
|
72
|
-
artifact,
|
|
73
|
-
assertBaseBranchFitsEnvironment,
|
|
74
|
-
assertNoSetupVarsOnHost,
|
|
75
|
-
codeStep,
|
|
76
|
-
compileConnectors,
|
|
77
|
-
compileEnvironment,
|
|
78
|
-
compileMcps,
|
|
79
|
-
compileRepo,
|
|
80
|
-
compileStepConcurrency,
|
|
81
|
-
compileStepErrors,
|
|
82
|
-
compileStepMaxTurns,
|
|
83
|
-
compileStepRetry,
|
|
84
|
-
createPromptInputProxy,
|
|
85
|
-
createPromptTemplateContext,
|
|
86
|
-
createStepDefinitionsClient,
|
|
87
|
-
defineMcp,
|
|
88
|
-
defineStep,
|
|
89
|
-
grantActionValues,
|
|
90
|
-
grantScopeValues,
|
|
91
|
-
isMcpHandle,
|
|
92
|
-
isSecretLookingEnvName,
|
|
93
|
-
knownEnvironmentVars,
|
|
94
|
-
normalizeArtifactAccept,
|
|
95
|
-
normalizeEnv,
|
|
96
|
-
renderPromptTemplate,
|
|
97
|
-
resolveMcpChecks,
|
|
98
|
-
stepEnvironmentHandle,
|
|
99
|
-
toStepHandle,
|
|
100
|
-
toStepSpec,
|
|
61
|
+
ARTIFACT_BRAND2 as ARTIFACT_BRAND,
|
|
62
|
+
Artifact2 as Artifact,
|
|
63
|
+
ArtifactTypes2 as ArtifactTypes,
|
|
64
|
+
Env2 as Env,
|
|
65
|
+
Features2 as Features,
|
|
66
|
+
Notify2 as Notify,
|
|
67
|
+
Repo2 as Repo,
|
|
68
|
+
Runtime2 as Runtime,
|
|
69
|
+
WorkBranch2 as WorkBranch,
|
|
70
|
+
artifact2 as artifact,
|
|
71
|
+
assertBaseBranchFitsEnvironment2 as assertBaseBranchFitsEnvironment,
|
|
72
|
+
assertNoSetupVarsOnHost2 as assertNoSetupVarsOnHost,
|
|
73
|
+
codeStep2 as codeStep,
|
|
74
|
+
compileConnectors2 as compileConnectors,
|
|
75
|
+
compileEnvironment2 as compileEnvironment,
|
|
76
|
+
compileMcps2 as compileMcps,
|
|
77
|
+
compileRepo2 as compileRepo,
|
|
78
|
+
compileStepConcurrency2 as compileStepConcurrency,
|
|
79
|
+
compileStepErrors2 as compileStepErrors,
|
|
80
|
+
compileStepMaxTurns2 as compileStepMaxTurns,
|
|
81
|
+
compileStepRetry2 as compileStepRetry,
|
|
82
|
+
createPromptInputProxy2 as createPromptInputProxy,
|
|
83
|
+
createPromptTemplateContext2 as createPromptTemplateContext,
|
|
84
|
+
createStepDefinitionsClient2 as createStepDefinitionsClient,
|
|
85
|
+
defineMcp2 as defineMcp,
|
|
86
|
+
defineStep2 as defineStep,
|
|
87
|
+
grantActionValues2 as grantActionValues,
|
|
88
|
+
grantScopeValues2 as grantScopeValues,
|
|
89
|
+
isMcpHandle2 as isMcpHandle,
|
|
90
|
+
isSecretLookingEnvName2 as isSecretLookingEnvName,
|
|
91
|
+
knownEnvironmentVars2 as knownEnvironmentVars,
|
|
92
|
+
normalizeArtifactAccept2 as normalizeArtifactAccept,
|
|
93
|
+
normalizeEnv2 as normalizeEnv,
|
|
94
|
+
renderPromptTemplate2 as renderPromptTemplate,
|
|
95
|
+
resolveMcpChecks2 as resolveMcpChecks,
|
|
96
|
+
stepEnvironmentHandle2 as stepEnvironmentHandle,
|
|
97
|
+
toStepHandle2 as toStepHandle,
|
|
98
|
+
toStepSpec2 as toStepSpec,
|
|
101
99
|
exports_z as z
|
|
102
100
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
2
|
declare const refFieldsSchema: z.ZodObject<{
|
|
3
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
4
|
+
connection: z.ZodString;
|
|
5
|
+
}, z.core.$strict>>;
|
|
3
6
|
timeout: z.ZodOptional<z.ZodObject<{
|
|
4
7
|
startup: z.ZodOptional<z.ZodInt>;
|
|
5
8
|
catalog: z.ZodOptional<z.ZodInt>;
|
|
@@ -60,12 +63,18 @@ declare const remoteFieldsSchema: z.ZodObject<{
|
|
|
60
63
|
legacy: "legacy";
|
|
61
64
|
"2026-07-28": "2026-07-28";
|
|
62
65
|
}>>;
|
|
66
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
connection: z.ZodString;
|
|
68
|
+
}, z.core.$strict>>;
|
|
63
69
|
}, z.core.$strict>;
|
|
64
70
|
/** The shared OpenCode fields a `ref` applies on top of the repo's definition. */
|
|
65
71
|
export type McpRefServerFields = z.output<typeof refFieldsSchema>;
|
|
66
72
|
/** A `local` server: `command`, `cwd?`, `environment?` and the shared fields. */
|
|
67
73
|
export type McpLocalServerFields = z.output<typeof localFieldsSchema>;
|
|
68
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* A `remote` server: `url`, `headers?`, `oauth?`, `auth?` and the shared
|
|
76
|
+
* fields.
|
|
77
|
+
*/
|
|
69
78
|
export type McpRemoteServerFields = z.output<typeof remoteFieldsSchema>;
|
|
70
79
|
export type McpServerType = "ref" | "local" | "remote";
|
|
71
80
|
/**
|
|
@@ -105,8 +114,9 @@ export declare function inferredMcpEnv(definition: McpServerDefinition): string[
|
|
|
105
114
|
/**
|
|
106
115
|
* Validates a `defineMcp` config's server half and returns it with its
|
|
107
116
|
* OpenCode fields parsed. Throws on an unknown `type`, an invalid field, a
|
|
108
|
-
* literal (non-`{env:VAR}`) `environment` or `headers` value,
|
|
109
|
-
* placeholder naming an invalid or reserved variable
|
|
117
|
+
* literal (non-`{env:VAR}`) `environment` or `headers` value, a
|
|
118
|
+
* placeholder naming an invalid or reserved variable, or an `auth` the
|
|
119
|
+
* server can't carry (see `remoteConnectionAuthIssues`).
|
|
110
120
|
*/
|
|
111
121
|
export declare function parseMcpServer(config: McpServerConfig): McpServerDefinition;
|
|
112
122
|
export {};
|
|
@@ -163,6 +163,9 @@ declare const buildStepDefinitionsClient: (stepDefinitions: StepDefinitions) =>
|
|
|
163
163
|
mcp?: string;
|
|
164
164
|
applies: "agent";
|
|
165
165
|
}>;
|
|
166
|
+
auth?: {
|
|
167
|
+
connection: string;
|
|
168
|
+
};
|
|
166
169
|
} | {
|
|
167
170
|
type: "ref";
|
|
168
171
|
name?: string;
|
|
@@ -176,6 +179,9 @@ declare const buildStepDefinitionsClient: (stepDefinitions: StepDefinitions) =>
|
|
|
176
179
|
mcp?: string;
|
|
177
180
|
applies: "agent";
|
|
178
181
|
}>;
|
|
182
|
+
auth?: {
|
|
183
|
+
connection: string;
|
|
184
|
+
};
|
|
179
185
|
disabled?: boolean;
|
|
180
186
|
codemode?: boolean;
|
|
181
187
|
timeout?: {
|
|
@@ -380,6 +386,9 @@ declare const buildStepDefinitionsClient: (stepDefinitions: StepDefinitions) =>
|
|
|
380
386
|
mcp?: string;
|
|
381
387
|
applies: "agent";
|
|
382
388
|
}>;
|
|
389
|
+
auth?: {
|
|
390
|
+
connection: string;
|
|
391
|
+
};
|
|
383
392
|
} | {
|
|
384
393
|
type: "ref";
|
|
385
394
|
name?: string;
|
|
@@ -393,6 +402,9 @@ declare const buildStepDefinitionsClient: (stepDefinitions: StepDefinitions) =>
|
|
|
393
402
|
mcp?: string;
|
|
394
403
|
applies: "agent";
|
|
395
404
|
}>;
|
|
405
|
+
auth?: {
|
|
406
|
+
connection: string;
|
|
407
|
+
};
|
|
396
408
|
disabled?: boolean;
|
|
397
409
|
codemode?: boolean;
|
|
398
410
|
timeout?: {
|
|
@@ -607,6 +619,9 @@ declare const buildStepDefinitionsClient: (stepDefinitions: StepDefinitions) =>
|
|
|
607
619
|
mcp?: string;
|
|
608
620
|
applies: "agent";
|
|
609
621
|
}>;
|
|
622
|
+
auth?: {
|
|
623
|
+
connection: string;
|
|
624
|
+
};
|
|
610
625
|
} | {
|
|
611
626
|
type: "ref";
|
|
612
627
|
name?: string;
|
|
@@ -620,6 +635,9 @@ declare const buildStepDefinitionsClient: (stepDefinitions: StepDefinitions) =>
|
|
|
620
635
|
mcp?: string;
|
|
621
636
|
applies: "agent";
|
|
622
637
|
}>;
|
|
638
|
+
auth?: {
|
|
639
|
+
connection: string;
|
|
640
|
+
};
|
|
623
641
|
disabled?: boolean;
|
|
624
642
|
codemode?: boolean;
|
|
625
643
|
timeout?: {
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import"../../chunk-
|
|
8
|
-
import"../../chunk-
|
|
9
|
-
import"../../chunk-
|
|
10
|
-
import"../../chunk-
|
|
11
|
-
import"../../chunk-
|
|
12
|
-
import"../../chunk-
|
|
13
|
-
import"../../chunk-
|
|
14
|
-
import"../../chunk-
|
|
15
|
-
import"../../chunk-
|
|
16
|
-
import"../../chunk-
|
|
17
|
-
import"../../chunk-y64skrwp.js";
|
|
3
|
+
listPaths2,
|
|
4
|
+
validateDefinitionSpecs2,
|
|
5
|
+
assertValidDefinitionSpecs2
|
|
6
|
+
} from "../../chunk-xe2zgyz7.js";
|
|
7
|
+
import"../../chunk-7mhr5aex.js";
|
|
8
|
+
import"../../chunk-bcvx11fn.js";
|
|
9
|
+
import"../../chunk-yypj3zn0.js";
|
|
10
|
+
import"../../chunk-y4dwmhn2.js";
|
|
11
|
+
import"../../chunk-3j5wf2t5.js";
|
|
12
|
+
import"../../chunk-5dnfgyx8.js";
|
|
13
|
+
import"../../chunk-7rywbqzz.js";
|
|
14
|
+
import"../../chunk-vyv8kvkv.js";
|
|
15
|
+
import"../../chunk-631ffb6r.js";
|
|
16
|
+
import"../../chunk-9qf0eg7m.js";
|
|
18
17
|
export {
|
|
19
|
-
assertValidDefinitionSpecs,
|
|
20
|
-
listPaths,
|
|
21
|
-
validateDefinitionSpecs
|
|
18
|
+
assertValidDefinitionSpecs2 as assertValidDefinitionSpecs,
|
|
19
|
+
listPaths2 as listPaths,
|
|
20
|
+
validateDefinitionSpecs2 as validateDefinitionSpecs
|
|
22
21
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import"./chunk-xhpp6qz8.js";
|
|
9
|
-
import"./chunk-y64skrwp.js";
|
|
3
|
+
MAX_DEVCONTAINER_CONFIG_PATH_LENGTH2,
|
|
4
|
+
DEVCONTAINER_CONFIG_BASENAMES2,
|
|
5
|
+
normalizeDevcontainerConfigPath2,
|
|
6
|
+
devcontainerConfigPathSchema2
|
|
7
|
+
} from "./chunk-yypj3zn0.js";
|
|
10
8
|
export {
|
|
11
|
-
DEVCONTAINER_CONFIG_BASENAMES,
|
|
12
|
-
MAX_DEVCONTAINER_CONFIG_PATH_LENGTH,
|
|
13
|
-
devcontainerConfigPathSchema,
|
|
14
|
-
normalizeDevcontainerConfigPath
|
|
9
|
+
DEVCONTAINER_CONFIG_BASENAMES2 as DEVCONTAINER_CONFIG_BASENAMES,
|
|
10
|
+
MAX_DEVCONTAINER_CONFIG_PATH_LENGTH2 as MAX_DEVCONTAINER_CONFIG_PATH_LENGTH,
|
|
11
|
+
devcontainerConfigPathSchema2 as devcontainerConfigPathSchema,
|
|
12
|
+
normalizeDevcontainerConfigPath2 as normalizeDevcontainerConfigPath
|
|
15
13
|
};
|