@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/index.js
CHANGED
|
@@ -864,15 +864,6 @@ class Api extends HeyApiClient {
|
|
|
864
864
|
"allApiAuth*8"(options) {
|
|
865
865
|
return (options?.client ?? this.client).trace({ url: "/api/auth/*", ...options });
|
|
866
866
|
}
|
|
867
|
-
getApiIntegrationsGithubInstall(options) {
|
|
868
|
-
return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
|
|
869
|
-
}
|
|
870
|
-
getApiIntegrationsGithubCallback(options) {
|
|
871
|
-
return (options?.client ?? this.client).get({ url: "/api/integrations/github/callback", ...options });
|
|
872
|
-
}
|
|
873
|
-
postApiIntegrationsGithubWebhook(options) {
|
|
874
|
-
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
875
|
-
}
|
|
876
867
|
}
|
|
877
868
|
|
|
878
869
|
class Projects extends HeyApiClient {
|
|
@@ -895,6 +886,9 @@ class Projects extends HeyApiClient {
|
|
|
895
886
|
getProject(options) {
|
|
896
887
|
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}", ...options });
|
|
897
888
|
}
|
|
889
|
+
getProjectWorkItemSignalScores(options) {
|
|
890
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/work-item-signal-scores", ...options });
|
|
891
|
+
}
|
|
898
892
|
updateProjectDefaultPipelineAssignment(options) {
|
|
899
893
|
return (options.client ?? this.client).put({
|
|
900
894
|
url: "/api/projects/{projectId}/default-pipeline-assignment",
|
|
@@ -1230,12 +1224,41 @@ class ProjectContext extends HeyApiClient {
|
|
|
1230
1224
|
}
|
|
1231
1225
|
}
|
|
1232
1226
|
|
|
1233
|
-
class
|
|
1234
|
-
|
|
1235
|
-
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/
|
|
1227
|
+
class UserNotifications extends HeyApiClient {
|
|
1228
|
+
listUserNotifications(options) {
|
|
1229
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications", ...options });
|
|
1230
|
+
}
|
|
1231
|
+
getUserNotification(options) {
|
|
1232
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notifications/{notificationId}", ...options });
|
|
1233
|
+
}
|
|
1234
|
+
dismissUserNotification(options) {
|
|
1235
|
+
return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/notifications/{notificationId}/dismiss", ...options });
|
|
1236
|
+
}
|
|
1237
|
+
respondToFeedbackRequest(options) {
|
|
1238
|
+
return (options.client ?? this.client).post({
|
|
1239
|
+
url: "/api/projects/{projectId}/notifications/{notificationId}/respond",
|
|
1240
|
+
...options,
|
|
1241
|
+
headers: {
|
|
1242
|
+
"Content-Type": "application/json",
|
|
1243
|
+
...options.headers
|
|
1244
|
+
}
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
class NotificationRules extends HeyApiClient {
|
|
1250
|
+
listNotificationRules(options) {
|
|
1251
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/notification-rules", ...options });
|
|
1236
1252
|
}
|
|
1237
|
-
|
|
1238
|
-
return (options.client ?? this.client).
|
|
1253
|
+
upsertNotificationRule(options) {
|
|
1254
|
+
return (options.client ?? this.client).put({
|
|
1255
|
+
url: "/api/projects/{projectId}/notification-rules",
|
|
1256
|
+
...options,
|
|
1257
|
+
headers: {
|
|
1258
|
+
"Content-Type": "application/json",
|
|
1259
|
+
...options.headers
|
|
1260
|
+
}
|
|
1261
|
+
});
|
|
1239
1262
|
}
|
|
1240
1263
|
}
|
|
1241
1264
|
|
|
@@ -1287,6 +1310,43 @@ class ProjectIntegrations extends HeyApiClient {
|
|
|
1287
1310
|
}
|
|
1288
1311
|
}
|
|
1289
1312
|
|
|
1313
|
+
class GitHubIntegrations extends HeyApiClient {
|
|
1314
|
+
beginGitHubAppInstall(options) {
|
|
1315
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/install", ...options });
|
|
1316
|
+
}
|
|
1317
|
+
completeGitHubAppInstall(options) {
|
|
1318
|
+
return (options?.client ?? this.client).get({ url: "/api/integrations/github/callback", ...options });
|
|
1319
|
+
}
|
|
1320
|
+
handleGitHubWebhook(options) {
|
|
1321
|
+
return (options?.client ?? this.client).post({ url: "/api/integrations/github/webhook", ...options });
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
class ProjectInvites extends HeyApiClient {
|
|
1326
|
+
getProjectInviteByToken(options) {
|
|
1327
|
+
return (options.client ?? this.client).get({ url: "/api/project-invites/{token}", ...options });
|
|
1328
|
+
}
|
|
1329
|
+
listProjectInvites(options) {
|
|
1330
|
+
return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/invites", ...options });
|
|
1331
|
+
}
|
|
1332
|
+
createProjectInvite(options) {
|
|
1333
|
+
return (options.client ?? this.client).post({
|
|
1334
|
+
url: "/api/projects/{projectId}/invites",
|
|
1335
|
+
...options,
|
|
1336
|
+
headers: {
|
|
1337
|
+
"Content-Type": "application/json",
|
|
1338
|
+
...options.headers
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
revokeProjectInvite(options) {
|
|
1343
|
+
return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/invites/{inviteId}/revoke", ...options });
|
|
1344
|
+
}
|
|
1345
|
+
acceptProjectInvite(options) {
|
|
1346
|
+
return (options.client ?? this.client).post({ url: "/api/project-invites/{token}/accept", ...options });
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1290
1350
|
class BoboddyClient extends HeyApiClient {
|
|
1291
1351
|
static __registry = new HeyApiRegistry;
|
|
1292
1352
|
constructor(args) {
|
|
@@ -1325,9 +1385,13 @@ class BoboddyClient extends HeyApiClient {
|
|
|
1325
1385
|
get projectContext() {
|
|
1326
1386
|
return this._projectContext ??= new ProjectContext({ client: this.client });
|
|
1327
1387
|
}
|
|
1328
|
-
|
|
1329
|
-
get
|
|
1330
|
-
return this.
|
|
1388
|
+
_userNotifications;
|
|
1389
|
+
get userNotifications() {
|
|
1390
|
+
return this._userNotifications ??= new UserNotifications({ client: this.client });
|
|
1391
|
+
}
|
|
1392
|
+
_notificationRules;
|
|
1393
|
+
get notificationRules() {
|
|
1394
|
+
return this._notificationRules ??= new NotificationRules({ client: this.client });
|
|
1331
1395
|
}
|
|
1332
1396
|
_stepDefinitionTemplates;
|
|
1333
1397
|
get stepDefinitionTemplates() {
|
|
@@ -1337,6 +1401,14 @@ class BoboddyClient extends HeyApiClient {
|
|
|
1337
1401
|
get projectIntegrations() {
|
|
1338
1402
|
return this._projectIntegrations ??= new ProjectIntegrations({ client: this.client });
|
|
1339
1403
|
}
|
|
1404
|
+
_gitHubIntegrations;
|
|
1405
|
+
get gitHubIntegrations() {
|
|
1406
|
+
return this._gitHubIntegrations ??= new GitHubIntegrations({ client: this.client });
|
|
1407
|
+
}
|
|
1408
|
+
_projectInvites;
|
|
1409
|
+
get projectInvites() {
|
|
1410
|
+
return this._projectInvites ??= new ProjectInvites({ client: this.client });
|
|
1411
|
+
}
|
|
1340
1412
|
}
|
|
1341
1413
|
// src/step-execution-plane-client.ts
|
|
1342
1414
|
function createStepExecutionPlaneClient(baseUrl) {
|
|
@@ -13342,6 +13414,42 @@ class JSONSchemaGenerator {
|
|
|
13342
13414
|
}
|
|
13343
13415
|
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
13344
13416
|
var exports_json_schema = {};
|
|
13417
|
+
// src/definitions/steps/prompt-template.ts
|
|
13418
|
+
function createPromptInputProxy(path = []) {
|
|
13419
|
+
const token = () => path.length ? `{{${path.join(".")}}}` : "";
|
|
13420
|
+
return new Proxy(Object.freeze({}), {
|
|
13421
|
+
get(_, key) {
|
|
13422
|
+
if (key === Symbol.toPrimitive || key === "valueOf") {
|
|
13423
|
+
return (_hint) => token();
|
|
13424
|
+
}
|
|
13425
|
+
if (key === "toString") {
|
|
13426
|
+
return () => token();
|
|
13427
|
+
}
|
|
13428
|
+
if (typeof key !== "string")
|
|
13429
|
+
return;
|
|
13430
|
+
return createPromptInputProxy([...path, key]);
|
|
13431
|
+
}
|
|
13432
|
+
});
|
|
13433
|
+
}
|
|
13434
|
+
function createPromptTemplateContext() {
|
|
13435
|
+
return {
|
|
13436
|
+
input: createPromptInputProxy(["input"]),
|
|
13437
|
+
env: createPromptInputProxy(["env"]),
|
|
13438
|
+
boboddy: {
|
|
13439
|
+
artifactsDir: createPromptInputProxy([
|
|
13440
|
+
"boboddy",
|
|
13441
|
+
"artifactsDir"
|
|
13442
|
+
])
|
|
13443
|
+
}
|
|
13444
|
+
};
|
|
13445
|
+
}
|
|
13446
|
+
function renderPromptTemplate(template, contextJson) {
|
|
13447
|
+
return template.replace(/\{\{([^}]+)\}\}/g, (_, path) => {
|
|
13448
|
+
const value = path.split(".").reduce((curr, key) => curr != null ? curr[key] : undefined, contextJson);
|
|
13449
|
+
return value != null ? String(value) : "";
|
|
13450
|
+
});
|
|
13451
|
+
}
|
|
13452
|
+
|
|
13345
13453
|
// src/definitions/steps/define-step.ts
|
|
13346
13454
|
var UNWRAP_TYPES = new Set(["optional", "nullable", "default"]);
|
|
13347
13455
|
function unwrapZodType(schema) {
|
|
@@ -13387,7 +13495,8 @@ function defineStep(config2) {
|
|
|
13387
13495
|
for (const feature of features) {
|
|
13388
13496
|
effectiveResult = effectiveResult ? effectiveResult.extend(feature._resultExtension.shape) : feature._resultExtension;
|
|
13389
13497
|
}
|
|
13390
|
-
|
|
13498
|
+
const basePrompt = typeof config2.agentPrompt === "function" ? config2.agentPrompt(createPromptTemplateContext()) : config2.agentPrompt;
|
|
13499
|
+
let effectivePrompt = basePrompt;
|
|
13391
13500
|
for (const feature of features) {
|
|
13392
13501
|
if (feature._promptAddition) {
|
|
13393
13502
|
effectivePrompt = effectivePrompt ? `${effectivePrompt}
|
|
@@ -13427,29 +13536,6 @@ ${feature._promptAddition}` : feature._promptAddition;
|
|
|
13427
13536
|
};
|
|
13428
13537
|
return spec;
|
|
13429
13538
|
}
|
|
13430
|
-
// src/definitions/steps/prompt-template.ts
|
|
13431
|
-
function createPromptInputProxy(path = []) {
|
|
13432
|
-
const token = () => path.length ? `{{${path.join(".")}}}` : "";
|
|
13433
|
-
return new Proxy(Object.freeze({}), {
|
|
13434
|
-
get(_, key) {
|
|
13435
|
-
if (key === Symbol.toPrimitive || key === "valueOf") {
|
|
13436
|
-
return (_hint) => token();
|
|
13437
|
-
}
|
|
13438
|
-
if (key === "toString") {
|
|
13439
|
-
return () => token();
|
|
13440
|
-
}
|
|
13441
|
-
if (typeof key !== "string")
|
|
13442
|
-
return;
|
|
13443
|
-
return createPromptInputProxy([...path, key]);
|
|
13444
|
-
}
|
|
13445
|
-
});
|
|
13446
|
-
}
|
|
13447
|
-
function renderPromptTemplate(template, inputJson) {
|
|
13448
|
-
return template.replace(/\{\{([^}]+)\}\}/g, (_, path) => {
|
|
13449
|
-
const value = path.split(".").reduce((curr, key) => curr != null ? curr[key] : undefined, inputJson);
|
|
13450
|
-
return value != null ? String(value) : "";
|
|
13451
|
-
});
|
|
13452
|
-
}
|
|
13453
13539
|
// src/definitions/steps/step-definitions-client.ts
|
|
13454
13540
|
function createStepDefinitionsClient(baseUrl) {
|
|
13455
13541
|
const client2 = createClient({ baseUrl });
|
|
@@ -15835,61 +15921,66 @@ function date4(params) {
|
|
|
15835
15921
|
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
15836
15922
|
config(en_default());
|
|
15837
15923
|
// src/definitions/steps/step-features.ts
|
|
15838
|
-
var
|
|
15839
|
-
var
|
|
15840
|
-
var
|
|
15841
|
-
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
"
|
|
15845
|
-
|
|
15846
|
-
|
|
15847
|
-
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
|
|
15852
|
-
|
|
15853
|
-
|
|
15924
|
+
var NOTIFICATION_SIGNAL_KEY = "$boboddy_notifications_v1";
|
|
15925
|
+
var NOTIFICATION_RESULT_KEY = "$boboddy_notifications_v1";
|
|
15926
|
+
var notificationItemSchema = exports_external.object({
|
|
15927
|
+
kind: exports_external.enum([
|
|
15928
|
+
"feedback_request",
|
|
15929
|
+
"status_update",
|
|
15930
|
+
"blocked",
|
|
15931
|
+
"result_ready",
|
|
15932
|
+
"warning"
|
|
15933
|
+
]).describe("The kind of user notification."),
|
|
15934
|
+
title: exports_external.string().describe("Short, human-readable notification title."),
|
|
15935
|
+
body: exports_external.string().describe("The notification body / details."),
|
|
15936
|
+
priority: exports_external.enum(["low", "normal", "high", "urgent"]).describe("How important this notification is for the user."),
|
|
15937
|
+
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."),
|
|
15938
|
+
payload: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe('Kind-specific structured data. For "feedback_request": { category, urgency, suggestedKey? }.')
|
|
15939
|
+
}).describe("A single user notification emitted by the agent.");
|
|
15940
|
+
var notificationsFeature = {
|
|
15854
15941
|
_resultExtension: exports_external.object({
|
|
15855
|
-
[
|
|
15942
|
+
[NOTIFICATION_RESULT_KEY]: exports_external.array(notificationItemSchema).optional()
|
|
15856
15943
|
}),
|
|
15857
15944
|
_promptAddition: [
|
|
15858
|
-
"##
|
|
15945
|
+
"## User Notifications",
|
|
15859
15946
|
"",
|
|
15860
|
-
`If you
|
|
15947
|
+
`If you need to communicate something to a human, populate the \`${NOTIFICATION_RESULT_KEY}\` array.`,
|
|
15861
15948
|
"Each item must include:",
|
|
15862
|
-
"- **
|
|
15863
|
-
|
|
15864
|
-
"- **
|
|
15865
|
-
|
|
15866
|
-
'
|
|
15867
|
-
|
|
15868
|
-
'
|
|
15869
|
-
"- **suggestedKey** *(optional)*: A suggested answer key for reference."
|
|
15949
|
+
"- **kind**: One of `feedback_request`, `status_update`, `blocked`, `result_ready`, `warning`.",
|
|
15950
|
+
"- **title**: A short, human-readable title.",
|
|
15951
|
+
"- **body**: The details of the notification.",
|
|
15952
|
+
"- **priority**: One of `low`, `normal`, `high`, `urgent`.",
|
|
15953
|
+
'- **suggestedChannels** *(optional)*: Channels you think are worth using (e.g. `["in_app", "jira_comment"]`).',
|
|
15954
|
+
" You only *suggest* channels \u2014 the platform policy decides the final delivery channels.",
|
|
15955
|
+
'- **payload** *(optional)*: Kind-specific data. For `feedback_request`, include `{ "category": string, "urgency": "blocking"|"clarification"|"assumption"|"informational", "suggestedKey"?: string }`.'
|
|
15870
15956
|
].join(`
|
|
15871
15957
|
`),
|
|
15872
15958
|
_signals: [
|
|
15873
15959
|
{
|
|
15874
|
-
key:
|
|
15875
|
-
sourcePath:
|
|
15960
|
+
key: NOTIFICATION_SIGNAL_KEY,
|
|
15961
|
+
sourcePath: NOTIFICATION_RESULT_KEY,
|
|
15876
15962
|
type: "array",
|
|
15877
15963
|
required: false
|
|
15878
15964
|
}
|
|
15879
15965
|
]
|
|
15880
15966
|
};
|
|
15881
15967
|
var Features = {
|
|
15882
|
-
|
|
15968
|
+
notifications: Object.assign(() => notificationsFeature, {
|
|
15883
15969
|
signal: {
|
|
15884
|
-
key:
|
|
15970
|
+
key: NOTIFICATION_SIGNAL_KEY,
|
|
15885
15971
|
find(signals) {
|
|
15886
|
-
const match = signals.find((s) => s.key ===
|
|
15972
|
+
const match = signals.find((s) => s.key === NOTIFICATION_SIGNAL_KEY);
|
|
15887
15973
|
if (!match)
|
|
15888
15974
|
return;
|
|
15889
|
-
const parsed = exports_external.array(
|
|
15975
|
+
const parsed = exports_external.array(notificationItemSchema).safeParse(match.valueJson);
|
|
15890
15976
|
return parsed.success ? parsed.data : undefined;
|
|
15891
15977
|
}
|
|
15892
15978
|
}
|
|
15979
|
+
}),
|
|
15980
|
+
feedbackRequests: Object.assign(() => notificationsFeature, {
|
|
15981
|
+
signal: {
|
|
15982
|
+
key: NOTIFICATION_SIGNAL_KEY
|
|
15983
|
+
}
|
|
15893
15984
|
})
|
|
15894
15985
|
};
|
|
15895
15986
|
// src/definitions/advancement-policies/define-advancement-policy.ts
|
|
@@ -16970,17 +17061,20 @@ export {
|
|
|
16970
17061
|
defaultPipelineAssignment,
|
|
16971
17062
|
createStepExecutionPlaneClient,
|
|
16972
17063
|
createStepDefinitionsClient,
|
|
17064
|
+
createPromptTemplateContext,
|
|
16973
17065
|
createPromptInputProxy,
|
|
16974
17066
|
createPipelineDefinitionsClient,
|
|
16975
17067
|
createInputAccessor,
|
|
16976
17068
|
createBoboddyClient,
|
|
16977
17069
|
buildPipelineSpec,
|
|
16978
17070
|
WorkItems,
|
|
17071
|
+
UserNotifications,
|
|
16979
17072
|
StepExecutions,
|
|
16980
17073
|
StepDefinitions,
|
|
16981
17074
|
StepDefinitionTemplates,
|
|
16982
17075
|
Rule,
|
|
16983
17076
|
Projects,
|
|
17077
|
+
ProjectInvites,
|
|
16984
17078
|
ProjectIntegrations,
|
|
16985
17079
|
ProjectContext,
|
|
16986
17080
|
PipelineStepBuilder,
|
|
@@ -16988,7 +17082,8 @@ export {
|
|
|
16988
17082
|
PipelineExecutions,
|
|
16989
17083
|
PipelineDefinitions,
|
|
16990
17084
|
PipelineBuilder,
|
|
16991
|
-
|
|
17085
|
+
NotificationRules,
|
|
17086
|
+
GitHubIntegrations,
|
|
16992
17087
|
Features,
|
|
16993
17088
|
DEFAULT_PIPELINE_ASSIGNMENT_FILENAME,
|
|
16994
17089
|
Computed,
|