@boboddy/sdk 0.2.12-alpha → 0.2.13-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/definitions/steps/define-step.d.ts +21 -0
- package/dist/definitions/steps/index.js +2 -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/types.gen.d.ts +110 -5
- package/dist/health-checks.d.ts +45 -0
- package/dist/health-checks.js +14308 -0
- package/dist/index.js +2 -7
- package/dist/push/index.js +33 -1
- package/dist/step-execution-plane-client.d.ts +10 -5
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
@@ -16057,7 +16057,8 @@ ${feature._promptAddition}` : feature._promptAddition;
|
|
|
16057
16057
|
}))
|
|
16058
16058
|
],
|
|
16059
16059
|
opencodeMcpJson: config2.mcpServers ?? null,
|
|
16060
|
-
opencodePluginJson: config2.plugins ?? null
|
|
16060
|
+
opencodePluginJson: config2.plugins ?? null,
|
|
16061
|
+
healthChecksJson: config2.healthChecks ?? null
|
|
16061
16062
|
};
|
|
16062
16063
|
return spec;
|
|
16063
16064
|
}
|
|
@@ -17186,7 +17187,6 @@ var parseServices = (raw) => {
|
|
|
17186
17187
|
return [];
|
|
17187
17188
|
return Object.entries(raw).map(([name, entry]) => {
|
|
17188
17189
|
const expose = entry.expose ?? {};
|
|
17189
|
-
const healthcheck = entry.healthcheck ?? {};
|
|
17190
17190
|
const dependsOn = Array.isArray(entry.dependsOn) ? entry.dependsOn.filter((d) => typeof d === "string") : [];
|
|
17191
17191
|
return {
|
|
17192
17192
|
name,
|
|
@@ -17197,11 +17197,6 @@ var parseServices = (raw) => {
|
|
|
17197
17197
|
expose: {
|
|
17198
17198
|
targetPort: asNumber(expose.targetPort) ?? 0,
|
|
17199
17199
|
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
17200
|
}
|
|
17206
17201
|
};
|
|
17207
17202
|
});
|
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
|
}
|
|
@@ -17039,6 +17040,36 @@ function checkSignalSourcePaths(steps) {
|
|
|
17039
17040
|
}
|
|
17040
17041
|
return issues;
|
|
17041
17042
|
}
|
|
17043
|
+
function checkHealthChecks(steps) {
|
|
17044
|
+
const issues = [];
|
|
17045
|
+
for (const step of steps) {
|
|
17046
|
+
const checks3 = step.healthChecksJson ?? [];
|
|
17047
|
+
if (checks3.length === 0)
|
|
17048
|
+
continue;
|
|
17049
|
+
const mcpServerKeys = Object.keys(step.opencodeMcpJson ?? {});
|
|
17050
|
+
const mcpServerKeySet = new Set(mcpServerKeys);
|
|
17051
|
+
checks3.forEach((check2, index) => {
|
|
17052
|
+
const label = check2.name ?? check2.tool;
|
|
17053
|
+
const where = `Step "${step.key}" health check #${String(index + 1)} ("${label}")`;
|
|
17054
|
+
if (!check2.mcp)
|
|
17055
|
+
return;
|
|
17056
|
+
if (!mcpServerKeySet.has(check2.mcp)) {
|
|
17057
|
+
issues.push({
|
|
17058
|
+
check: "health-check-mcp-server",
|
|
17059
|
+
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)"}.`
|
|
17060
|
+
});
|
|
17061
|
+
}
|
|
17062
|
+
const prefix = `${check2.mcp}_`;
|
|
17063
|
+
if (check2.tool.startsWith(prefix)) {
|
|
17064
|
+
issues.push({
|
|
17065
|
+
check: "health-check-double-qualified",
|
|
17066
|
+
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)}"?`
|
|
17067
|
+
});
|
|
17068
|
+
}
|
|
17069
|
+
});
|
|
17070
|
+
}
|
|
17071
|
+
return issues;
|
|
17072
|
+
}
|
|
17042
17073
|
function routeTargets(policy) {
|
|
17043
17074
|
const keys = [];
|
|
17044
17075
|
if (policy.defaultEventType === "route" && typeof policy.defaultEventParamsJson?.["pipelineKey"] === "string") {
|
|
@@ -17158,6 +17189,7 @@ function validateDefinitionSpecs(specs, options = {}) {
|
|
|
17158
17189
|
}
|
|
17159
17190
|
return [
|
|
17160
17191
|
...checkSignalSourcePaths(specs.steps),
|
|
17192
|
+
...checkHealthChecks(specs.steps),
|
|
17161
17193
|
...checkRouteTargets(specs.pipelines, options.knownPipelineKeys ?? []),
|
|
17162
17194
|
...checkSignalBindings(specs.pipelines, stepsByKey)
|
|
17163
17195
|
];
|
|
@@ -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.13-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"
|