@boboddy/sdk 0.2.12-alpha → 0.2.14-alpha
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/boboddy-config-parser.d.ts +0 -5
- package/dist/boboddy-config-parser.js +0 -6
- package/dist/client.js +16 -0
- package/dist/definitions/pipelines/index.js +16 -0
- package/dist/definitions/steps/define-step.d.ts +21 -0
- package/dist/definitions/steps/index.js +18 -1
- package/dist/definitions/steps/step-definitions-client.d.ts +30 -0
- package/dist/definitions/validation/index.js +31 -0
- package/dist/definitions/validation/validate-definition-specs.d.ts +1 -1
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +4 -1
- package/dist/generated/types.gen.d.ts +446 -5
- package/dist/health-checks.d.ts +45 -0
- package/dist/health-checks.js +14308 -0
- package/dist/index.js +18 -7
- package/dist/push/index.js +49 -1
- package/dist/step-execution-plane-client.d.ts +10 -5
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
@@ -905,6 +905,16 @@ class Projects extends HeyApiClient {
|
|
|
905
905
|
updateProjectMemberPermissions(options) {
|
|
906
906
|
return (options.client ?? this.client).put({ url: "/api/projects/{projectId}/members/{userId}/permissions", ...options });
|
|
907
907
|
}
|
|
908
|
+
createProjectFromGitHubRepo(options) {
|
|
909
|
+
return (options.client ?? this.client).post({
|
|
910
|
+
url: "/api/projects/from-github",
|
|
911
|
+
...options,
|
|
912
|
+
headers: {
|
|
913
|
+
"Content-Type": "application/json",
|
|
914
|
+
...options.headers
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
}
|
|
908
918
|
}
|
|
909
919
|
|
|
910
920
|
class StepDefinitions extends HeyApiClient {
|
|
@@ -1407,6 +1417,12 @@ class GitHubIntegrations extends HeyApiClient {
|
|
|
1407
1417
|
handleGitHubWebhook(options) {
|
|
1408
1418
|
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
1409
1419
|
}
|
|
1420
|
+
listMyGitHubRepos(options) {
|
|
1421
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/repos", ...options });
|
|
1422
|
+
}
|
|
1423
|
+
refreshGitHubInstallationRepos(options) {
|
|
1424
|
+
return (options.client ?? this.client).post({ url: "/api/integrations/github/installations/{installationId}/refresh", ...options });
|
|
1425
|
+
}
|
|
1410
1426
|
}
|
|
1411
1427
|
|
|
1412
1428
|
class ProjectInvites extends HeyApiClient {
|
|
@@ -16057,7 +16073,8 @@ ${feature._promptAddition}` : feature._promptAddition;
|
|
|
16057
16073
|
}))
|
|
16058
16074
|
],
|
|
16059
16075
|
opencodeMcpJson: config2.mcpServers ?? null,
|
|
16060
|
-
opencodePluginJson: config2.plugins ?? null
|
|
16076
|
+
opencodePluginJson: config2.plugins ?? null,
|
|
16077
|
+
healthChecksJson: config2.healthChecks ?? null
|
|
16061
16078
|
};
|
|
16062
16079
|
return spec;
|
|
16063
16080
|
}
|
|
@@ -17186,7 +17203,6 @@ var parseServices = (raw) => {
|
|
|
17186
17203
|
return [];
|
|
17187
17204
|
return Object.entries(raw).map(([name, entry]) => {
|
|
17188
17205
|
const expose = entry.expose ?? {};
|
|
17189
|
-
const healthcheck = entry.healthcheck ?? {};
|
|
17190
17206
|
const dependsOn = Array.isArray(entry.dependsOn) ? entry.dependsOn.filter((d) => typeof d === "string") : [];
|
|
17191
17207
|
return {
|
|
17192
17208
|
name,
|
|
@@ -17197,11 +17213,6 @@ var parseServices = (raw) => {
|
|
|
17197
17213
|
expose: {
|
|
17198
17214
|
targetPort: asNumber(expose.targetPort) ?? 0,
|
|
17199
17215
|
protocol: asString(expose.protocol) ?? "http"
|
|
17200
|
-
},
|
|
17201
|
-
healthcheck: {
|
|
17202
|
-
protocol: asString(healthcheck.protocol) ?? "http",
|
|
17203
|
-
path: asString(healthcheck.path) ?? null,
|
|
17204
|
-
expectedStatus: asNumber(healthcheck.expectedStatus) ?? null
|
|
17205
17216
|
}
|
|
17206
17217
|
};
|
|
17207
17218
|
});
|
package/dist/push/index.js
CHANGED
|
@@ -12075,7 +12075,8 @@ ${feature._promptAddition}` : feature._promptAddition;
|
|
|
12075
12075
|
}))
|
|
12076
12076
|
],
|
|
12077
12077
|
opencodeMcpJson: config2.mcpServers ?? null,
|
|
12078
|
-
opencodePluginJson: config2.plugins ?? null
|
|
12078
|
+
opencodePluginJson: config2.plugins ?? null,
|
|
12079
|
+
healthChecksJson: config2.healthChecks ?? null
|
|
12079
12080
|
};
|
|
12080
12081
|
return spec;
|
|
12081
12082
|
}
|
|
@@ -12970,6 +12971,16 @@ class Projects extends HeyApiClient {
|
|
|
12970
12971
|
updateProjectMemberPermissions(options) {
|
|
12971
12972
|
return (options.client ?? this.client).put({ url: "/api/projects/{projectId}/members/{userId}/permissions", ...options });
|
|
12972
12973
|
}
|
|
12974
|
+
createProjectFromGitHubRepo(options) {
|
|
12975
|
+
return (options.client ?? this.client).post({
|
|
12976
|
+
url: "/api/projects/from-github",
|
|
12977
|
+
...options,
|
|
12978
|
+
headers: {
|
|
12979
|
+
"Content-Type": "application/json",
|
|
12980
|
+
...options.headers
|
|
12981
|
+
}
|
|
12982
|
+
});
|
|
12983
|
+
}
|
|
12973
12984
|
}
|
|
12974
12985
|
|
|
12975
12986
|
class StepDefinitions extends HeyApiClient {
|
|
@@ -13472,6 +13483,12 @@ class GitHubIntegrations extends HeyApiClient {
|
|
|
13472
13483
|
handleGitHubWebhook(options) {
|
|
13473
13484
|
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
13474
13485
|
}
|
|
13486
|
+
listMyGitHubRepos(options) {
|
|
13487
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/repos", ...options });
|
|
13488
|
+
}
|
|
13489
|
+
refreshGitHubInstallationRepos(options) {
|
|
13490
|
+
return (options.client ?? this.client).post({ url: "/api/integrations/github/installations/{installationId}/refresh", ...options });
|
|
13491
|
+
}
|
|
13475
13492
|
}
|
|
13476
13493
|
|
|
13477
13494
|
class ProjectInvites extends HeyApiClient {
|
|
@@ -17039,6 +17056,36 @@ function checkSignalSourcePaths(steps) {
|
|
|
17039
17056
|
}
|
|
17040
17057
|
return issues;
|
|
17041
17058
|
}
|
|
17059
|
+
function checkHealthChecks(steps) {
|
|
17060
|
+
const issues = [];
|
|
17061
|
+
for (const step of steps) {
|
|
17062
|
+
const checks3 = step.healthChecksJson ?? [];
|
|
17063
|
+
if (checks3.length === 0)
|
|
17064
|
+
continue;
|
|
17065
|
+
const mcpServerKeys = Object.keys(step.opencodeMcpJson ?? {});
|
|
17066
|
+
const mcpServerKeySet = new Set(mcpServerKeys);
|
|
17067
|
+
checks3.forEach((check2, index) => {
|
|
17068
|
+
const label = check2.name ?? check2.tool;
|
|
17069
|
+
const where = `Step "${step.key}" health check #${String(index + 1)} ("${label}")`;
|
|
17070
|
+
if (!check2.mcp)
|
|
17071
|
+
return;
|
|
17072
|
+
if (!mcpServerKeySet.has(check2.mcp)) {
|
|
17073
|
+
issues.push({
|
|
17074
|
+
check: "health-check-mcp-server",
|
|
17075
|
+
message: `${where} names MCP server "${check2.mcp}", but the step declares no ` + `such server in mcpServers. Declared servers: ${mcpServerKeys.length > 0 ? listPaths([...mcpServerKeys].sort()) : "(none)"}.`
|
|
17076
|
+
});
|
|
17077
|
+
}
|
|
17078
|
+
const prefix = `${check2.mcp}_`;
|
|
17079
|
+
if (check2.tool.startsWith(prefix)) {
|
|
17080
|
+
issues.push({
|
|
17081
|
+
check: "health-check-double-qualified",
|
|
17082
|
+
message: `${where} sets mcp "${check2.mcp}" and tool "${check2.tool}", which already ` + `starts with "${prefix}". When "mcp" is set, "tool" should be the bare tool ` + `name \u2014 OpenCode resolves it to "${prefix}${check2.tool}". Did you mean ` + `tool: "${check2.tool.slice(prefix.length)}"?`
|
|
17083
|
+
});
|
|
17084
|
+
}
|
|
17085
|
+
});
|
|
17086
|
+
}
|
|
17087
|
+
return issues;
|
|
17088
|
+
}
|
|
17042
17089
|
function routeTargets(policy) {
|
|
17043
17090
|
const keys = [];
|
|
17044
17091
|
if (policy.defaultEventType === "route" && typeof policy.defaultEventParamsJson?.["pipelineKey"] === "string") {
|
|
@@ -17158,6 +17205,7 @@ function validateDefinitionSpecs(specs, options = {}) {
|
|
|
17158
17205
|
}
|
|
17159
17206
|
return [
|
|
17160
17207
|
...checkSignalSourcePaths(specs.steps),
|
|
17208
|
+
...checkHealthChecks(specs.steps),
|
|
17161
17209
|
...checkRouteTargets(specs.pipelines, options.knownPipelineKeys ?? []),
|
|
17162
17210
|
...checkSignalBindings(specs.pipelines, stepsByKey)
|
|
17163
17211
|
];
|
|
@@ -122,11 +122,6 @@ declare const buildStepExecutionPlaneClient: (stepExecutions: StepExecutions) =>
|
|
|
122
122
|
targetPort: number;
|
|
123
123
|
protocol: "tcp" | "http";
|
|
124
124
|
};
|
|
125
|
-
healthcheck: {
|
|
126
|
-
protocol: "tcp" | "http";
|
|
127
|
-
path: string | unknown;
|
|
128
|
-
expectedStatus: number | unknown;
|
|
129
|
-
};
|
|
130
125
|
}>;
|
|
131
126
|
};
|
|
132
127
|
stepExecution: {
|
|
@@ -172,6 +167,16 @@ declare const buildStepExecutionPlaneClient: (stepExecutions: StepExecutions) =>
|
|
|
172
167
|
};
|
|
173
168
|
} | unknown;
|
|
174
169
|
opencodePluginJson: Array<string | Array<unknown>> | unknown;
|
|
170
|
+
healthChecksJson: Array<{
|
|
171
|
+
tool: string;
|
|
172
|
+
mcp?: string;
|
|
173
|
+
name?: string;
|
|
174
|
+
args?: {
|
|
175
|
+
[key: string]: unknown;
|
|
176
|
+
};
|
|
177
|
+
severity: "required" | "warn";
|
|
178
|
+
timeoutMs: number;
|
|
179
|
+
}> | unknown;
|
|
175
180
|
};
|
|
176
181
|
agentPrompt: {
|
|
177
182
|
sessionTitle: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@boboddy/sdk",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.14-alpha",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
"import": "./dist/opencode-plugin.js",
|
|
49
49
|
"types": "./dist/opencode-plugin.d.ts"
|
|
50
50
|
},
|
|
51
|
+
"./health-checks": {
|
|
52
|
+
"import": "./dist/health-checks.js",
|
|
53
|
+
"types": "./dist/health-checks.d.ts"
|
|
54
|
+
},
|
|
51
55
|
"./jsonc": {
|
|
52
56
|
"import": "./dist/jsonc.js",
|
|
53
57
|
"types": "./dist/jsonc.d.ts"
|