@boboddy/sdk 0.1.44-alpha → 0.2.1-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/client.js +97 -18
- package/dist/defaults/index.js +3 -3
- package/dist/definitions/pipelines/builder-helpers.d.ts +69 -0
- package/dist/definitions/pipelines/builder.d.ts +4 -57
- package/dist/definitions/pipelines/index.js +168 -101
- package/dist/definitions/steps/index.js +155 -75
- package/dist/definitions/steps/step-features.d.ts +34 -10
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/sdk.gen.d.ts +29 -9
- package/dist/generated/types.gen.d.ts +2267 -1318
- package/dist/index.js +252 -158
- package/dist/opencode-mcp.js +2 -2
- package/dist/opencode-plugin.js +2 -2
- package/dist/push/index.js +245 -159
- package/dist/step-execution-plane-client.d.ts +11 -0
- package/package.json +1 -1
|
@@ -11478,7 +11478,7 @@ function finalize(ctx, schema) {
|
|
|
11478
11478
|
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
11479
11479
|
} else if (ctx.target === "draft-04") {
|
|
11480
11480
|
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
11481
|
-
} else if (ctx.target === "openapi-3.0") {}
|
|
11481
|
+
} else if (ctx.target === "openapi-3.0") {}
|
|
11482
11482
|
if (ctx.external?.uri) {
|
|
11483
11483
|
const id = ctx.external.registry.get(schema)?.id;
|
|
11484
11484
|
if (!id)
|
|
@@ -11722,7 +11722,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
11722
11722
|
if (val === undefined) {
|
|
11723
11723
|
if (ctx.unrepresentable === "throw") {
|
|
11724
11724
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
11725
|
-
}
|
|
11725
|
+
}
|
|
11726
11726
|
} else if (typeof val === "bigint") {
|
|
11727
11727
|
if (ctx.unrepresentable === "throw") {
|
|
11728
11728
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
@@ -14643,6 +14643,82 @@ function materializeAccessor(accessor) {
|
|
|
14643
14643
|
};
|
|
14644
14644
|
}
|
|
14645
14645
|
|
|
14646
|
+
// src/definitions/pipelines/builder-helpers.ts
|
|
14647
|
+
var WORK_ITEM_ACCESSOR = Object.freeze({
|
|
14648
|
+
title: Object.freeze({ source: "work_item", field: "title" }),
|
|
14649
|
+
description: Object.freeze({
|
|
14650
|
+
source: "work_item",
|
|
14651
|
+
field: "description"
|
|
14652
|
+
}),
|
|
14653
|
+
field: (fieldName) => Object.freeze({ source: "work_item", field: `fields.${fieldName}` })
|
|
14654
|
+
});
|
|
14655
|
+
var WORK_ITEM_FIELD_BINDINGS = {
|
|
14656
|
+
workItemTitle: { source: "work_item", field: "title" },
|
|
14657
|
+
workItemDescription: { source: "work_item", field: "description" }
|
|
14658
|
+
};
|
|
14659
|
+
function makeStepInputCtx(inputSchema) {
|
|
14660
|
+
const baseAccessor = createInputAccessor(inputSchema);
|
|
14661
|
+
const input = new Proxy(baseAccessor, {
|
|
14662
|
+
get(target, prop) {
|
|
14663
|
+
if (typeof prop === "string" && prop in WORK_ITEM_FIELD_BINDINGS) {
|
|
14664
|
+
return WORK_ITEM_FIELD_BINDINGS[prop];
|
|
14665
|
+
}
|
|
14666
|
+
return target[prop];
|
|
14667
|
+
}
|
|
14668
|
+
});
|
|
14669
|
+
return {
|
|
14670
|
+
input,
|
|
14671
|
+
signal(step, key) {
|
|
14672
|
+
return { source: "step_signal", step, signalKey: key };
|
|
14673
|
+
},
|
|
14674
|
+
output(step) {
|
|
14675
|
+
return { source: "step_output", step };
|
|
14676
|
+
},
|
|
14677
|
+
literal: literal2
|
|
14678
|
+
};
|
|
14679
|
+
}
|
|
14680
|
+
function literal2(value) {
|
|
14681
|
+
return { source: "literal", value };
|
|
14682
|
+
}
|
|
14683
|
+
function normalizeInputMapping(mapping) {
|
|
14684
|
+
if (!mapping)
|
|
14685
|
+
return;
|
|
14686
|
+
const out = {};
|
|
14687
|
+
for (const [key, value] of Object.entries(mapping)) {
|
|
14688
|
+
if (value === undefined)
|
|
14689
|
+
continue;
|
|
14690
|
+
out[key] = isInputAccessor(value) ? materializeAccessor(value) : value;
|
|
14691
|
+
}
|
|
14692
|
+
return out;
|
|
14693
|
+
}
|
|
14694
|
+
function resolveAdditionalStepInputBindings(label, definition) {
|
|
14695
|
+
if (!definition) {
|
|
14696
|
+
return {};
|
|
14697
|
+
}
|
|
14698
|
+
const raw = definition.bindings({
|
|
14699
|
+
workItemField: (fieldName) => ({
|
|
14700
|
+
source: "work_item",
|
|
14701
|
+
field: `fields.${fieldName}`
|
|
14702
|
+
}),
|
|
14703
|
+
literal: literal2
|
|
14704
|
+
});
|
|
14705
|
+
if (definition.schema instanceof exports_external.ZodObject) {
|
|
14706
|
+
const validKeys = new Set(Object.keys(definition.schema.shape));
|
|
14707
|
+
const unknown2 = Object.keys(raw).filter((key) => !validKeys.has(key));
|
|
14708
|
+
if (unknown2.length > 0) {
|
|
14709
|
+
throw new Error(`${label}.bindings returned key${unknown2.length > 1 ? "s" : ""} not in schema: ${unknown2.map((key) => `"${key}"`).join(", ")}`);
|
|
14710
|
+
}
|
|
14711
|
+
}
|
|
14712
|
+
return normalizeInputMapping(raw) ?? {};
|
|
14713
|
+
}
|
|
14714
|
+
function mergeStepBindings(pipelineBindings, explicitBindings) {
|
|
14715
|
+
const merged = {
|
|
14716
|
+
...pipelineBindings,
|
|
14717
|
+
...explicitBindings ?? {}
|
|
14718
|
+
};
|
|
14719
|
+
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
14720
|
+
}
|
|
14721
|
+
|
|
14646
14722
|
// src/definitions/pipelines/builder.ts
|
|
14647
14723
|
class PipelineStepAdvancementBuilder {
|
|
14648
14724
|
inputSchema;
|
|
@@ -14659,6 +14735,8 @@ class PipelineStepAdvancementBuilder {
|
|
|
14659
14735
|
}
|
|
14660
14736
|
advance(callback) {
|
|
14661
14737
|
const last = this.steps.at(-1);
|
|
14738
|
+
if (!last)
|
|
14739
|
+
throw new Error("Internal error: no steps available");
|
|
14662
14740
|
const ctx = makeAdvanceCtx();
|
|
14663
14741
|
const result = callback(ctx);
|
|
14664
14742
|
const policy = {
|
|
@@ -14755,80 +14833,6 @@ class PipelineBuilder {
|
|
|
14755
14833
|
return new PipelineStepAdvancementBuilder(this.inputSchema, this.meta, this.steps, this.pipelineInputBindings, this.pipelineStepInputBindings);
|
|
14756
14834
|
}
|
|
14757
14835
|
}
|
|
14758
|
-
var WORK_ITEM_ACCESSOR = Object.freeze({
|
|
14759
|
-
title: Object.freeze({ source: "work_item", field: "title" }),
|
|
14760
|
-
description: Object.freeze({
|
|
14761
|
-
source: "work_item",
|
|
14762
|
-
field: "description"
|
|
14763
|
-
}),
|
|
14764
|
-
field: (fieldName) => Object.freeze({ source: "work_item", field: `fields.${fieldName}` })
|
|
14765
|
-
});
|
|
14766
|
-
var WORK_ITEM_FIELD_BINDINGS = {
|
|
14767
|
-
workItemTitle: { source: "work_item", field: "title" },
|
|
14768
|
-
workItemDescription: { source: "work_item", field: "description" }
|
|
14769
|
-
};
|
|
14770
|
-
function makeStepInputCtx(inputSchema) {
|
|
14771
|
-
const baseAccessor = createInputAccessor(inputSchema);
|
|
14772
|
-
const input = new Proxy(baseAccessor, {
|
|
14773
|
-
get(target, prop) {
|
|
14774
|
-
if (typeof prop === "string" && prop in WORK_ITEM_FIELD_BINDINGS) {
|
|
14775
|
-
return WORK_ITEM_FIELD_BINDINGS[prop];
|
|
14776
|
-
}
|
|
14777
|
-
return target[prop];
|
|
14778
|
-
}
|
|
14779
|
-
});
|
|
14780
|
-
return {
|
|
14781
|
-
input,
|
|
14782
|
-
signal(step, key) {
|
|
14783
|
-
return { source: "step_signal", step, signalKey: key };
|
|
14784
|
-
},
|
|
14785
|
-
output(step) {
|
|
14786
|
-
return { source: "step_output", step };
|
|
14787
|
-
},
|
|
14788
|
-
literal: literal2
|
|
14789
|
-
};
|
|
14790
|
-
}
|
|
14791
|
-
function literal2(value) {
|
|
14792
|
-
return { source: "literal", value };
|
|
14793
|
-
}
|
|
14794
|
-
function normalizeInputMapping(mapping) {
|
|
14795
|
-
if (!mapping)
|
|
14796
|
-
return;
|
|
14797
|
-
const out = {};
|
|
14798
|
-
for (const [key, value] of Object.entries(mapping)) {
|
|
14799
|
-
if (value === undefined)
|
|
14800
|
-
continue;
|
|
14801
|
-
out[key] = isInputAccessor(value) ? materializeAccessor(value) : value;
|
|
14802
|
-
}
|
|
14803
|
-
return out;
|
|
14804
|
-
}
|
|
14805
|
-
function resolveAdditionalStepInputBindings(label, definition) {
|
|
14806
|
-
if (!definition) {
|
|
14807
|
-
return {};
|
|
14808
|
-
}
|
|
14809
|
-
const raw = definition.bindings({
|
|
14810
|
-
workItemField: (fieldName) => ({
|
|
14811
|
-
source: "work_item",
|
|
14812
|
-
field: `fields.${fieldName}`
|
|
14813
|
-
}),
|
|
14814
|
-
literal: literal2
|
|
14815
|
-
});
|
|
14816
|
-
if (definition.schema instanceof exports_external.ZodObject) {
|
|
14817
|
-
const validKeys = new Set(Object.keys(definition.schema.shape));
|
|
14818
|
-
const unknown2 = Object.keys(raw).filter((key) => !validKeys.has(key));
|
|
14819
|
-
if (unknown2.length > 0) {
|
|
14820
|
-
throw new Error(`${label}.bindings returned key${unknown2.length > 1 ? "s" : ""} not in schema: ${unknown2.map((key) => `"${key}"`).join(", ")}`);
|
|
14821
|
-
}
|
|
14822
|
-
}
|
|
14823
|
-
return normalizeInputMapping(raw) ?? {};
|
|
14824
|
-
}
|
|
14825
|
-
function mergeStepBindings(pipelineBindings, explicitBindings) {
|
|
14826
|
-
const merged = {
|
|
14827
|
-
...pipelineBindings,
|
|
14828
|
-
...explicitBindings ?? {}
|
|
14829
|
-
};
|
|
14830
|
-
return Object.keys(merged).length > 0 ? merged : undefined;
|
|
14831
|
-
}
|
|
14832
14836
|
function pipeline(meta3) {
|
|
14833
14837
|
return new PipelineBuilder(meta3);
|
|
14834
14838
|
}
|
|
@@ -15682,15 +15686,6 @@ class Api extends HeyApiClient {
|
|
|
15682
15686
|
"allApiAuth*8"(options) {
|
|
15683
15687
|
return (options?.client ?? this.client).trace({ url: "/api/auth/*", ...options });
|
|
15684
15688
|
}
|
|
15685
|
-
getApiIntegrationsGithubInstall(options) {
|
|
15686
|
-
return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
|
|
15687
|
-
}
|
|
15688
|
-
getApiIntegrationsGithubCallback(options) {
|
|
15689
|
-
return (options?.client ?? this.client).get({ url: "/api/integrations/github/callback", ...options });
|
|
15690
|
-
}
|
|
15691
|
-
postApiIntegrationsGithubWebhook(options) {
|
|
15692
|
-
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
15693
|
-
}
|
|
15694
15689
|
}
|
|
15695
15690
|
|
|
15696
15691
|
class Projects extends HeyApiClient {
|
|
@@ -15836,6 +15831,22 @@ class StepExecutions extends HeyApiClient {
|
|
|
15836
15831
|
getStepExecution(options) {
|
|
15837
15832
|
return (options.client ?? this.client).get({ url: "/api/step-executions/{stepExecutionId}", ...options });
|
|
15838
15833
|
}
|
|
15834
|
+
readStepExecutionLogs(options) {
|
|
15835
|
+
return (options.client ?? this.client).get({ url: "/api/step-executions/{stepExecutionId}/logs", ...options });
|
|
15836
|
+
}
|
|
15837
|
+
appendStepExecutionLogs(options) {
|
|
15838
|
+
return (options.client ?? this.client).post({
|
|
15839
|
+
url: "/api/step-executions/{stepExecutionId}/logs",
|
|
15840
|
+
...options,
|
|
15841
|
+
headers: {
|
|
15842
|
+
"Content-Type": "application/json",
|
|
15843
|
+
...options.headers
|
|
15844
|
+
}
|
|
15845
|
+
});
|
|
15846
|
+
}
|
|
15847
|
+
getStepExecutionLogArchive(options) {
|
|
15848
|
+
return (options.client ?? this.client).get({ url: "/api/step-executions/{stepExecutionId}/logs/archive", ...options });
|
|
15849
|
+
}
|
|
15839
15850
|
}
|
|
15840
15851
|
|
|
15841
15852
|
class PipelineDefinitions extends HeyApiClient {
|
|
@@ -16051,12 +16062,41 @@ class ProjectContext extends HeyApiClient {
|
|
|
16051
16062
|
}
|
|
16052
16063
|
}
|
|
16053
16064
|
|
|
16054
|
-
class
|
|
16055
|
-
|
|
16056
|
-
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/
|
|
16065
|
+
class UserNotifications extends HeyApiClient {
|
|
16066
|
+
listUserNotifications(options) {
|
|
16067
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications", ...options });
|
|
16068
|
+
}
|
|
16069
|
+
getUserNotification(options) {
|
|
16070
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications/{notificationId}", ...options });
|
|
16071
|
+
}
|
|
16072
|
+
dismissUserNotification(options) {
|
|
16073
|
+
return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/notifications/{notificationId}/dismiss", ...options });
|
|
16074
|
+
}
|
|
16075
|
+
respondToFeedbackRequest(options) {
|
|
16076
|
+
return (options.client ?? this.client).post({
|
|
16077
|
+
url: "/api/projects/{projectId}/notifications/{notificationId}/respond",
|
|
16078
|
+
...options,
|
|
16079
|
+
headers: {
|
|
16080
|
+
"Content-Type": "application/json",
|
|
16081
|
+
...options.headers
|
|
16082
|
+
}
|
|
16083
|
+
});
|
|
16084
|
+
}
|
|
16085
|
+
}
|
|
16086
|
+
|
|
16087
|
+
class NotificationRules extends HeyApiClient {
|
|
16088
|
+
listNotificationRules(options) {
|
|
16089
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notification-rules", ...options });
|
|
16057
16090
|
}
|
|
16058
|
-
|
|
16059
|
-
return (options.client ?? this.client).
|
|
16091
|
+
upsertNotificationRule(options) {
|
|
16092
|
+
return (options.client ?? this.client).put({
|
|
16093
|
+
url: "/api/projects/{projectId}/notification-rules",
|
|
16094
|
+
...options,
|
|
16095
|
+
headers: {
|
|
16096
|
+
"Content-Type": "application/json",
|
|
16097
|
+
...options.headers
|
|
16098
|
+
}
|
|
16099
|
+
});
|
|
16060
16100
|
}
|
|
16061
16101
|
}
|
|
16062
16102
|
|
|
@@ -16108,6 +16148,18 @@ class ProjectIntegrations extends HeyApiClient {
|
|
|
16108
16148
|
}
|
|
16109
16149
|
}
|
|
16110
16150
|
|
|
16151
|
+
class GitHubIntegrations extends HeyApiClient {
|
|
16152
|
+
beginGitHubAppInstall(options) {
|
|
16153
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
|
|
16154
|
+
}
|
|
16155
|
+
completeGitHubAppInstall(options) {
|
|
16156
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/callback", ...options });
|
|
16157
|
+
}
|
|
16158
|
+
handleGitHubWebhook(options) {
|
|
16159
|
+
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
16160
|
+
}
|
|
16161
|
+
}
|
|
16162
|
+
|
|
16111
16163
|
class ProjectInvites extends HeyApiClient {
|
|
16112
16164
|
getProjectInviteByToken(options) {
|
|
16113
16165
|
return (options.client ?? this.client).get({ url: "/api/project-invites/{token}", ...options });
|
|
@@ -16133,6 +16185,12 @@ class ProjectInvites extends HeyApiClient {
|
|
|
16133
16185
|
}
|
|
16134
16186
|
}
|
|
16135
16187
|
|
|
16188
|
+
class Billing extends HeyApiClient {
|
|
16189
|
+
getOrgUsage(options) {
|
|
16190
|
+
return (options.client ?? this.client).get({ url: "/api/orgs/{orgId}/usage", ...options });
|
|
16191
|
+
}
|
|
16192
|
+
}
|
|
16193
|
+
|
|
16136
16194
|
class BoboddyClient extends HeyApiClient {
|
|
16137
16195
|
static __registry = new HeyApiRegistry;
|
|
16138
16196
|
constructor(args) {
|
|
@@ -16171,9 +16229,13 @@ class BoboddyClient extends HeyApiClient {
|
|
|
16171
16229
|
get projectContext() {
|
|
16172
16230
|
return this._projectContext ??= new ProjectContext({ client: this.client });
|
|
16173
16231
|
}
|
|
16174
|
-
|
|
16175
|
-
get
|
|
16176
|
-
return this.
|
|
16232
|
+
_userNotifications;
|
|
16233
|
+
get userNotifications() {
|
|
16234
|
+
return this._userNotifications ??= new UserNotifications({ client: this.client });
|
|
16235
|
+
}
|
|
16236
|
+
_notificationRules;
|
|
16237
|
+
get notificationRules() {
|
|
16238
|
+
return this._notificationRules ??= new NotificationRules({ client: this.client });
|
|
16177
16239
|
}
|
|
16178
16240
|
_stepDefinitionTemplates;
|
|
16179
16241
|
get stepDefinitionTemplates() {
|
|
@@ -16183,10 +16245,18 @@ class BoboddyClient extends HeyApiClient {
|
|
|
16183
16245
|
get projectIntegrations() {
|
|
16184
16246
|
return this._projectIntegrations ??= new ProjectIntegrations({ client: this.client });
|
|
16185
16247
|
}
|
|
16248
|
+
_gitHubIntegrations;
|
|
16249
|
+
get gitHubIntegrations() {
|
|
16250
|
+
return this._gitHubIntegrations ??= new GitHubIntegrations({ client: this.client });
|
|
16251
|
+
}
|
|
16186
16252
|
_projectInvites;
|
|
16187
16253
|
get projectInvites() {
|
|
16188
16254
|
return this._projectInvites ??= new ProjectInvites({ client: this.client });
|
|
16189
16255
|
}
|
|
16256
|
+
_billing;
|
|
16257
|
+
get billing() {
|
|
16258
|
+
return this._billing ??= new Billing({ client: this.client });
|
|
16259
|
+
}
|
|
16190
16260
|
}
|
|
16191
16261
|
|
|
16192
16262
|
// src/definitions/pipelines/pipeline-definitions-client.ts
|
|
@@ -16203,7 +16273,7 @@ var buildPipelineDefinitionsClient = (pipelineDefinitions) => {
|
|
|
16203
16273
|
});
|
|
16204
16274
|
if (result.error)
|
|
16205
16275
|
throw new Error(JSON.stringify(result.error));
|
|
16206
|
-
return result.data
|
|
16276
|
+
return result.data;
|
|
16207
16277
|
},
|
|
16208
16278
|
upsertFromSpec: async (projectId, spec, stepDefs, options) => {
|
|
16209
16279
|
const stepDefMap = new Map;
|
|
@@ -16283,7 +16353,7 @@ function makeFieldRef(fact, path) {
|
|
|
16283
16353
|
};
|
|
16284
16354
|
}
|
|
16285
16355
|
function makeAssign(pipeline2) {
|
|
16286
|
-
if (typeof pipeline2 !== "object" ||
|
|
16356
|
+
if (typeof pipeline2 !== "object" || typeof pipeline2["key"] !== "string" || !Array.isArray(pipeline2["steps"])) {
|
|
16287
16357
|
throw new Error("assign() requires a pipeline spec produced by pipeline().build(). " + "Pass the default-exported value from a pipeline definition file.");
|
|
16288
16358
|
}
|
|
16289
16359
|
return { _tag: "assign", pipeline: pipeline2 };
|
|
@@ -16332,13 +16402,10 @@ function serializeConditionNode(condition) {
|
|
|
16332
16402
|
value: condition.value
|
|
16333
16403
|
};
|
|
16334
16404
|
}
|
|
16335
|
-
if (condition.
|
|
16336
|
-
|
|
16337
|
-
return { all: condition.conditions.map(serializeConditionNode) };
|
|
16338
|
-
}
|
|
16339
|
-
return { any: condition.conditions.map(serializeConditionNode) };
|
|
16405
|
+
if (condition.mode === "all") {
|
|
16406
|
+
return { all: condition.conditions.map(serializeConditionNode) };
|
|
16340
16407
|
}
|
|
16341
|
-
|
|
16408
|
+
return { any: condition.conditions.map(serializeConditionNode) };
|
|
16342
16409
|
}
|
|
16343
16410
|
function serializeOutcome(outcome) {
|
|
16344
16411
|
if (outcome._tag === "skip")
|