@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/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 FeedbackRequests extends HeyApiClient {
1234
- listFeedbackRequests(options) {
1235
- return (options.client ?? this.client).get({ url: "/api/projects/{projectId}/step-signals/{stepSignalId}/feedback-requests", ...options });
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
- declineFeedbackRequest(options) {
1238
- return (options.client ?? this.client).post({ url: "/api/projects/{projectId}/feedback-requests/{feedbackRequestId}/decline", ...options });
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
- _feedbackRequests;
1329
- get feedbackRequests() {
1330
- return this._feedbackRequests ??= new FeedbackRequests({ client: this.client });
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
- let effectivePrompt = config2.agentPrompt;
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 FEEDBACK_REQUEST_SIGNAL_KEY = "$boboddy_feedback_request_v1";
15839
- var FEEDBACK_REQUEST_RESULT_KEY = "$boboddy_feedbackRequests_v1";
15840
- var feedbackRequestItemSchema = exports_external.object({
15841
- question: exports_external.string().describe("The specific question to pose to a human reviewer."),
15842
- category: exports_external.string().describe('A grouping label for the feedback (e.g. "accuracy", "completeness").'),
15843
- urgency: exports_external.enum(["blocking", "clarification", "assumption", "informational"]).describe([
15844
- "How urgently a human response is needed:",
15845
- '- "blocking": cannot proceed at all without an answer.',
15846
- '- "clarification": genuinely ambiguous \u2014 unsure how to interpret, but not fully blocked.',
15847
- '- "assumption": proceeded with a guess; please verify the assumption.',
15848
- '- "informational": FYI only \u2014 agent proceeded fine and no reply is required.'
15849
- ].join(`
15850
- `)),
15851
- suggestedKey: exports_external.string().optional().describe("An optional suggested answer key for reference.")
15852
- }).describe("A single feedback request item for human review.");
15853
- var feedbackRequestsFeature = {
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
- [FEEDBACK_REQUEST_RESULT_KEY]: exports_external.array(feedbackRequestItemSchema).optional()
15942
+ [NOTIFICATION_RESULT_KEY]: exports_external.array(notificationItemSchema).optional()
15856
15943
  }),
15857
15944
  _promptAddition: [
15858
- "## Feedback Requests",
15945
+ "## User Notifications",
15859
15946
  "",
15860
- `If you encounter anything that warrants human review, populate the \`${FEEDBACK_REQUEST_RESULT_KEY}\` array.`,
15947
+ `If you need to communicate something to a human, populate the \`${NOTIFICATION_RESULT_KEY}\` array.`,
15861
15948
  "Each item must include:",
15862
- "- **question**: The specific question to pose to a human reviewer.",
15863
- '- **category**: A grouping label for the feedback (e.g. `"accuracy"`, `"completeness"`).',
15864
- "- **urgency**: How urgently a human response is needed. Must be one of:",
15865
- ' - `"blocking"`: Cannot proceed at all without an answer.',
15866
- ' - `"clarification"`: Genuinely ambiguous \u2014 unsure how to interpret, but not fully blocked.',
15867
- ' - `"assumption"`: Proceeded with a guess; please verify the assumption.',
15868
- ' - `"informational"`: FYI only \u2014 agent proceeded fine and no reply is required.',
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: FEEDBACK_REQUEST_SIGNAL_KEY,
15875
- sourcePath: FEEDBACK_REQUEST_RESULT_KEY,
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
- feedbackRequests: Object.assign(() => feedbackRequestsFeature, {
15968
+ notifications: Object.assign(() => notificationsFeature, {
15883
15969
  signal: {
15884
- key: FEEDBACK_REQUEST_SIGNAL_KEY,
15970
+ key: NOTIFICATION_SIGNAL_KEY,
15885
15971
  find(signals) {
15886
- const match = signals.find((s) => s.key === FEEDBACK_REQUEST_SIGNAL_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(feedbackRequestItemSchema).safeParse(match.valueJson);
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
- FeedbackRequests,
17085
+ NotificationRules,
17086
+ GitHubIntegrations,
16992
17087
  Features,
16993
17088
  DEFAULT_PIPELINE_ASSIGNMENT_FILENAME,
16994
17089
  Computed,