@boboddy/sdk 0.1.43-alpha → 0.1.45-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 +93 -18
- package/dist/definitions/pipelines/index.js +89 -17
- package/dist/definitions/steps/define-step.d.ts +2 -1
- package/dist/definitions/steps/index.js +166 -74
- package/dist/definitions/steps/prompt-template.d.ts +10 -2
- package/dist/definitions/steps/step-features.d.ts +32 -8
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/sdk.gen.d.ts +31 -9
- package/dist/generated/types.gen.d.ts +1452 -323
- package/dist/index.js +170 -75
- package/dist/push/index.js +165 -74
- package/dist/step-execution-plane-client.d.ts +1 -0
- package/package.json +1 -1
package/dist/push/index.js
CHANGED
|
@@ -11947,6 +11947,42 @@ class JSONSchemaGenerator {
|
|
|
11947
11947
|
}
|
|
11948
11948
|
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
11949
11949
|
var exports_json_schema = {};
|
|
11950
|
+
// src/definitions/steps/prompt-template.ts
|
|
11951
|
+
function createPromptInputProxy(path = []) {
|
|
11952
|
+
const token = () => path.length ? `{{${path.join(".")}}}` : "";
|
|
11953
|
+
return new Proxy(Object.freeze({}), {
|
|
11954
|
+
get(_, key) {
|
|
11955
|
+
if (key === Symbol.toPrimitive || key === "valueOf") {
|
|
11956
|
+
return (_hint) => token();
|
|
11957
|
+
}
|
|
11958
|
+
if (key === "toString") {
|
|
11959
|
+
return () => token();
|
|
11960
|
+
}
|
|
11961
|
+
if (typeof key !== "string")
|
|
11962
|
+
return;
|
|
11963
|
+
return createPromptInputProxy([...path, key]);
|
|
11964
|
+
}
|
|
11965
|
+
});
|
|
11966
|
+
}
|
|
11967
|
+
function createPromptTemplateContext() {
|
|
11968
|
+
return {
|
|
11969
|
+
input: createPromptInputProxy(["input"]),
|
|
11970
|
+
env: createPromptInputProxy(["env"]),
|
|
11971
|
+
boboddy: {
|
|
11972
|
+
artifactsDir: createPromptInputProxy([
|
|
11973
|
+
"boboddy",
|
|
11974
|
+
"artifactsDir"
|
|
11975
|
+
])
|
|
11976
|
+
}
|
|
11977
|
+
};
|
|
11978
|
+
}
|
|
11979
|
+
function renderPromptTemplate(template, contextJson) {
|
|
11980
|
+
return template.replace(/\{\{([^}]+)\}\}/g, (_, path) => {
|
|
11981
|
+
const value = path.split(".").reduce((curr, key) => curr != null ? curr[key] : undefined, contextJson);
|
|
11982
|
+
return value != null ? String(value) : "";
|
|
11983
|
+
});
|
|
11984
|
+
}
|
|
11985
|
+
|
|
11950
11986
|
// src/definitions/steps/define-step.ts
|
|
11951
11987
|
var UNWRAP_TYPES = new Set(["optional", "nullable", "default"]);
|
|
11952
11988
|
function unwrapZodType(schema) {
|
|
@@ -11992,7 +12028,8 @@ function defineStep(config2) {
|
|
|
11992
12028
|
for (const feature of features) {
|
|
11993
12029
|
effectiveResult = effectiveResult ? effectiveResult.extend(feature._resultExtension.shape) : feature._resultExtension;
|
|
11994
12030
|
}
|
|
11995
|
-
|
|
12031
|
+
const basePrompt = typeof config2.agentPrompt === "function" ? config2.agentPrompt(createPromptTemplateContext()) : config2.agentPrompt;
|
|
12032
|
+
let effectivePrompt = basePrompt;
|
|
11996
12033
|
for (const feature of features) {
|
|
11997
12034
|
if (feature._promptAddition) {
|
|
11998
12035
|
effectivePrompt = effectivePrompt ? `${effectivePrompt}
|
|
@@ -12032,29 +12069,6 @@ ${feature._promptAddition}` : feature._promptAddition;
|
|
|
12032
12069
|
};
|
|
12033
12070
|
return spec;
|
|
12034
12071
|
}
|
|
12035
|
-
// src/definitions/steps/prompt-template.ts
|
|
12036
|
-
function createPromptInputProxy(path = []) {
|
|
12037
|
-
const token = () => path.length ? `{{${path.join(".")}}}` : "";
|
|
12038
|
-
return new Proxy(Object.freeze({}), {
|
|
12039
|
-
get(_, key) {
|
|
12040
|
-
if (key === Symbol.toPrimitive || key === "valueOf") {
|
|
12041
|
-
return (_hint) => token();
|
|
12042
|
-
}
|
|
12043
|
-
if (key === "toString") {
|
|
12044
|
-
return () => token();
|
|
12045
|
-
}
|
|
12046
|
-
if (typeof key !== "string")
|
|
12047
|
-
return;
|
|
12048
|
-
return createPromptInputProxy([...path, key]);
|
|
12049
|
-
}
|
|
12050
|
-
});
|
|
12051
|
-
}
|
|
12052
|
-
function renderPromptTemplate(template, inputJson) {
|
|
12053
|
-
return template.replace(/\{\{([^}]+)\}\}/g, (_, path) => {
|
|
12054
|
-
const value = path.split(".").reduce((curr, key) => curr != null ? curr[key] : undefined, inputJson);
|
|
12055
|
-
return value != null ? String(value) : "";
|
|
12056
|
-
});
|
|
12057
|
-
}
|
|
12058
12072
|
// src/generated/core/bodySerializer.gen.ts
|
|
12059
12073
|
var jsonBodySerializer = {
|
|
12060
12074
|
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
|
|
@@ -12905,15 +12919,6 @@ class Api extends HeyApiClient {
|
|
|
12905
12919
|
"allApiAuth*8"(options) {
|
|
12906
12920
|
return (options?.client ?? this.client).trace({ url: "/api/auth/*", ...options });
|
|
12907
12921
|
}
|
|
12908
|
-
getApiIntegrationsGithubInstall(options) {
|
|
12909
|
-
return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
|
|
12910
|
-
}
|
|
12911
|
-
getApiIntegrationsGithubCallback(options) {
|
|
12912
|
-
return (options?.client ?? this.client).get({ url: "/api/integrations/github/callback", ...options });
|
|
12913
|
-
}
|
|
12914
|
-
postApiIntegrationsGithubWebhook(options) {
|
|
12915
|
-
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
12916
|
-
}
|
|
12917
12922
|
}
|
|
12918
12923
|
|
|
12919
12924
|
class Projects extends HeyApiClient {
|
|
@@ -12936,6 +12941,9 @@ class Projects extends HeyApiClient {
|
|
|
12936
12941
|
getProject(options) {
|
|
12937
12942
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}", ...options });
|
|
12938
12943
|
}
|
|
12944
|
+
getProjectWorkItemSignalScores(options) {
|
|
12945
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/work-item-signal-scores", ...options });
|
|
12946
|
+
}
|
|
12939
12947
|
updateProjectDefaultPipelineAssignment(options) {
|
|
12940
12948
|
return (options.client ?? this.client).put({
|
|
12941
12949
|
url: "/api/projects/{projectId}/default-pipeline-assignment",
|
|
@@ -13271,12 +13279,41 @@ class ProjectContext extends HeyApiClient {
|
|
|
13271
13279
|
}
|
|
13272
13280
|
}
|
|
13273
13281
|
|
|
13274
|
-
class
|
|
13275
|
-
|
|
13276
|
-
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/
|
|
13282
|
+
class UserNotifications extends HeyApiClient {
|
|
13283
|
+
listUserNotifications(options) {
|
|
13284
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications", ...options });
|
|
13285
|
+
}
|
|
13286
|
+
getUserNotification(options) {
|
|
13287
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications/{notificationId}", ...options });
|
|
13288
|
+
}
|
|
13289
|
+
dismissUserNotification(options) {
|
|
13290
|
+
return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/notifications/{notificationId}/dismiss", ...options });
|
|
13291
|
+
}
|
|
13292
|
+
respondToFeedbackRequest(options) {
|
|
13293
|
+
return (options.client ?? this.client).post({
|
|
13294
|
+
url: "/api/projects/{projectId}/notifications/{notificationId}/respond",
|
|
13295
|
+
...options,
|
|
13296
|
+
headers: {
|
|
13297
|
+
"Content-Type": "application/json",
|
|
13298
|
+
...options.headers
|
|
13299
|
+
}
|
|
13300
|
+
});
|
|
13301
|
+
}
|
|
13302
|
+
}
|
|
13303
|
+
|
|
13304
|
+
class NotificationRules extends HeyApiClient {
|
|
13305
|
+
listNotificationRules(options) {
|
|
13306
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notification-rules", ...options });
|
|
13277
13307
|
}
|
|
13278
|
-
|
|
13279
|
-
return (options.client ?? this.client).
|
|
13308
|
+
upsertNotificationRule(options) {
|
|
13309
|
+
return (options.client ?? this.client).put({
|
|
13310
|
+
url: "/api/projects/{projectId}/notification-rules",
|
|
13311
|
+
...options,
|
|
13312
|
+
headers: {
|
|
13313
|
+
"Content-Type": "application/json",
|
|
13314
|
+
...options.headers
|
|
13315
|
+
}
|
|
13316
|
+
});
|
|
13280
13317
|
}
|
|
13281
13318
|
}
|
|
13282
13319
|
|
|
@@ -13328,6 +13365,43 @@ class ProjectIntegrations extends HeyApiClient {
|
|
|
13328
13365
|
}
|
|
13329
13366
|
}
|
|
13330
13367
|
|
|
13368
|
+
class GitHubIntegrations extends HeyApiClient {
|
|
13369
|
+
beginGitHubAppInstall(options) {
|
|
13370
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
|
|
13371
|
+
}
|
|
13372
|
+
completeGitHubAppInstall(options) {
|
|
13373
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/callback", ...options });
|
|
13374
|
+
}
|
|
13375
|
+
handleGitHubWebhook(options) {
|
|
13376
|
+
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
13377
|
+
}
|
|
13378
|
+
}
|
|
13379
|
+
|
|
13380
|
+
class ProjectInvites extends HeyApiClient {
|
|
13381
|
+
getProjectInviteByToken(options) {
|
|
13382
|
+
return (options.client ?? this.client).get({ url: "/api/project-invites/{token}", ...options });
|
|
13383
|
+
}
|
|
13384
|
+
listProjectInvites(options) {
|
|
13385
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/invites", ...options });
|
|
13386
|
+
}
|
|
13387
|
+
createProjectInvite(options) {
|
|
13388
|
+
return (options.client ?? this.client).post({
|
|
13389
|
+
url: "/api/projects/{projectId}/invites",
|
|
13390
|
+
...options,
|
|
13391
|
+
headers: {
|
|
13392
|
+
"Content-Type": "application/json",
|
|
13393
|
+
...options.headers
|
|
13394
|
+
}
|
|
13395
|
+
});
|
|
13396
|
+
}
|
|
13397
|
+
revokeProjectInvite(options) {
|
|
13398
|
+
return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/invites/{inviteId}/revoke", ...options });
|
|
13399
|
+
}
|
|
13400
|
+
acceptProjectInvite(options) {
|
|
13401
|
+
return (options.client ?? this.client).post({ url: "/api/project-invites/{token}/accept", ...options });
|
|
13402
|
+
}
|
|
13403
|
+
}
|
|
13404
|
+
|
|
13331
13405
|
class BoboddyClient extends HeyApiClient {
|
|
13332
13406
|
static __registry = new HeyApiRegistry;
|
|
13333
13407
|
constructor(args) {
|
|
@@ -13366,9 +13440,13 @@ class BoboddyClient extends HeyApiClient {
|
|
|
13366
13440
|
get projectContext() {
|
|
13367
13441
|
return this._projectContext ??= new ProjectContext({ client: this.client });
|
|
13368
13442
|
}
|
|
13369
|
-
|
|
13370
|
-
get
|
|
13371
|
-
return this.
|
|
13443
|
+
_userNotifications;
|
|
13444
|
+
get userNotifications() {
|
|
13445
|
+
return this._userNotifications ??= new UserNotifications({ client: this.client });
|
|
13446
|
+
}
|
|
13447
|
+
_notificationRules;
|
|
13448
|
+
get notificationRules() {
|
|
13449
|
+
return this._notificationRules ??= new NotificationRules({ client: this.client });
|
|
13372
13450
|
}
|
|
13373
13451
|
_stepDefinitionTemplates;
|
|
13374
13452
|
get stepDefinitionTemplates() {
|
|
@@ -13378,6 +13456,14 @@ class BoboddyClient extends HeyApiClient {
|
|
|
13378
13456
|
get projectIntegrations() {
|
|
13379
13457
|
return this._projectIntegrations ??= new ProjectIntegrations({ client: this.client });
|
|
13380
13458
|
}
|
|
13459
|
+
_gitHubIntegrations;
|
|
13460
|
+
get gitHubIntegrations() {
|
|
13461
|
+
return this._gitHubIntegrations ??= new GitHubIntegrations({ client: this.client });
|
|
13462
|
+
}
|
|
13463
|
+
_projectInvites;
|
|
13464
|
+
get projectInvites() {
|
|
13465
|
+
return this._projectInvites ??= new ProjectInvites({ client: this.client });
|
|
13466
|
+
}
|
|
13381
13467
|
}
|
|
13382
13468
|
|
|
13383
13469
|
// src/definitions/steps/step-definitions-client.ts
|
|
@@ -15765,61 +15851,66 @@ function date4(params) {
|
|
|
15765
15851
|
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
15766
15852
|
config(en_default());
|
|
15767
15853
|
// src/definitions/steps/step-features.ts
|
|
15768
|
-
var
|
|
15769
|
-
var
|
|
15770
|
-
var
|
|
15771
|
-
|
|
15772
|
-
|
|
15773
|
-
|
|
15774
|
-
"
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15854
|
+
var NOTIFICATION_SIGNAL_KEY = "$boboddy_notifications_v1";
|
|
15855
|
+
var NOTIFICATION_RESULT_KEY = "$boboddy_notifications_v1";
|
|
15856
|
+
var notificationItemSchema = exports_external.object({
|
|
15857
|
+
kind: exports_external.enum([
|
|
15858
|
+
"feedback_request",
|
|
15859
|
+
"status_update",
|
|
15860
|
+
"blocked",
|
|
15861
|
+
"result_ready",
|
|
15862
|
+
"warning"
|
|
15863
|
+
]).describe("The kind of user notification."),
|
|
15864
|
+
title: exports_external.string().describe("Short, human-readable notification title."),
|
|
15865
|
+
body: exports_external.string().describe("The notification body / details."),
|
|
15866
|
+
priority: exports_external.enum(["low", "normal", "high", "urgent"]).describe("How important this notification is for the user."),
|
|
15867
|
+
suggestedChannels: exports_external.array(exports_external.enum(["in_app", "jira_comment", "email", "slack"])).optional().describe("Channels the agent thinks are worth using. The platform policy decides the final channels."),
|
|
15868
|
+
payload: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe('Kind-specific structured data. For "feedback_request": { category, urgency, suggestedKey? }.')
|
|
15869
|
+
}).describe("A single user notification emitted by the agent.");
|
|
15870
|
+
var notificationsFeature = {
|
|
15784
15871
|
_resultExtension: exports_external.object({
|
|
15785
|
-
[
|
|
15872
|
+
[NOTIFICATION_RESULT_KEY]: exports_external.array(notificationItemSchema).optional()
|
|
15786
15873
|
}),
|
|
15787
15874
|
_promptAddition: [
|
|
15788
|
-
"##
|
|
15875
|
+
"## User Notifications",
|
|
15789
15876
|
"",
|
|
15790
|
-
`If you
|
|
15877
|
+
`If you need to communicate something to a human, populate the \`${NOTIFICATION_RESULT_KEY}\` array.`,
|
|
15791
15878
|
"Each item must include:",
|
|
15792
|
-
"- **
|
|
15793
|
-
|
|
15794
|
-
"- **
|
|
15795
|
-
|
|
15796
|
-
'
|
|
15797
|
-
|
|
15798
|
-
'
|
|
15799
|
-
"- **suggestedKey** *(optional)*: A suggested answer key for reference."
|
|
15879
|
+
"- **kind**: One of `feedback_request`, `status_update`, `blocked`, `result_ready`, `warning`.",
|
|
15880
|
+
"- **title**: A short, human-readable title.",
|
|
15881
|
+
"- **body**: The details of the notification.",
|
|
15882
|
+
"- **priority**: One of `low`, `normal`, `high`, `urgent`.",
|
|
15883
|
+
'- **suggestedChannels** *(optional)*: Channels you think are worth using (e.g. `["in_app", "jira_comment"]`).',
|
|
15884
|
+
" You only *suggest* channels \u2014 the platform policy decides the final delivery channels.",
|
|
15885
|
+
'- **payload** *(optional)*: Kind-specific data. For `feedback_request`, include `{ "category": string, "urgency": "blocking"|"clarification"|"assumption"|"informational", "suggestedKey"?: string }`.'
|
|
15800
15886
|
].join(`
|
|
15801
15887
|
`),
|
|
15802
15888
|
_signals: [
|
|
15803
15889
|
{
|
|
15804
|
-
key:
|
|
15805
|
-
sourcePath:
|
|
15890
|
+
key: NOTIFICATION_SIGNAL_KEY,
|
|
15891
|
+
sourcePath: NOTIFICATION_RESULT_KEY,
|
|
15806
15892
|
type: "array",
|
|
15807
15893
|
required: false
|
|
15808
15894
|
}
|
|
15809
15895
|
]
|
|
15810
15896
|
};
|
|
15811
15897
|
var Features = {
|
|
15812
|
-
|
|
15898
|
+
notifications: Object.assign(() => notificationsFeature, {
|
|
15813
15899
|
signal: {
|
|
15814
|
-
key:
|
|
15900
|
+
key: NOTIFICATION_SIGNAL_KEY,
|
|
15815
15901
|
find(signals) {
|
|
15816
|
-
const match = signals.find((s) => s.key ===
|
|
15902
|
+
const match = signals.find((s) => s.key === NOTIFICATION_SIGNAL_KEY);
|
|
15817
15903
|
if (!match)
|
|
15818
15904
|
return;
|
|
15819
|
-
const parsed = exports_external.array(
|
|
15905
|
+
const parsed = exports_external.array(notificationItemSchema).safeParse(match.valueJson);
|
|
15820
15906
|
return parsed.success ? parsed.data : undefined;
|
|
15821
15907
|
}
|
|
15822
15908
|
}
|
|
15909
|
+
}),
|
|
15910
|
+
feedbackRequests: Object.assign(() => notificationsFeature, {
|
|
15911
|
+
signal: {
|
|
15912
|
+
key: NOTIFICATION_SIGNAL_KEY
|
|
15913
|
+
}
|
|
15823
15914
|
})
|
|
15824
15915
|
};
|
|
15825
15916
|
// src/definitions/advancement-policies/define-advancement-policy.ts
|
|
@@ -172,6 +172,7 @@ declare const buildStepExecutionPlaneClient: (stepExecutions: StepExecutions) =>
|
|
|
172
172
|
agentPrompt: {
|
|
173
173
|
sessionTitle: string;
|
|
174
174
|
promptText: string;
|
|
175
|
+
stepInstructionsPlaceholder: string;
|
|
175
176
|
};
|
|
176
177
|
}>;
|
|
177
178
|
completeStepExecution: (stepExecutionId: string, body: {
|