@boboddy/sdk 0.1.13-alpha → 0.1.15-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.
Files changed (34) hide show
  1. package/dist/boboddy-config-parser.js +4 -325
  2. package/dist/client.js +7 -6
  3. package/dist/defaults/auth-file.d.ts +14 -0
  4. package/dist/defaults/base-url.d.ts +1 -0
  5. package/dist/defaults/index.d.ts +7 -0
  6. package/dist/defaults/index.js +312 -0
  7. package/dist/defaults/load-push-defaults.d.ts +21 -0
  8. package/dist/defaults/project-config.d.ts +5 -0
  9. package/dist/definitions/advancement-policies/define-advancement-policy.d.ts +4 -0
  10. package/dist/definitions/advancement-policies/fluent-rules.d.ts +82 -0
  11. package/dist/definitions/advancement-policies/index.d.ts +1 -0
  12. package/dist/definitions/advancement-policies/index.js +87 -0
  13. package/dist/definitions/pipelines/builder.d.ts +85 -0
  14. package/dist/definitions/pipelines/define-pipeline.d.ts +16 -52
  15. package/dist/definitions/pipelines/index.d.ts +2 -0
  16. package/dist/definitions/pipelines/index.js +16069 -202
  17. package/dist/definitions/pipelines/input-accessor.d.ts +25 -0
  18. package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +231 -44
  19. package/dist/definitions/steps/define-step.d.ts +17 -4
  20. package/dist/definitions/steps/index.d.ts +1 -0
  21. package/dist/definitions/steps/index.js +1616 -1586
  22. package/dist/definitions/steps/prompt-template.d.ts +16 -0
  23. package/dist/definitions/steps/step-definitions-client.d.ts +9 -3
  24. package/dist/definitions/steps/step-features.d.ts +1 -1
  25. package/dist/generated/index.d.ts +1 -1
  26. package/dist/generated/sdk.gen.d.ts +2 -2
  27. package/dist/generated/types.gen.d.ts +154 -174
  28. package/dist/index.js +1979 -1989
  29. package/dist/jsonc.js +1 -0
  30. package/dist/opencode-mcp.js +1573 -1572
  31. package/dist/push/index.d.ts +2 -0
  32. package/dist/push/index.js +16423 -0
  33. package/dist/push/push-from-directory.d.ts +21 -0
  34. package/package.json +9 -1
@@ -1,3 +1,4 @@
1
+ // @bun
1
2
  var __defProp = Object.defineProperty;
2
3
  var __returnValue = (v) => v;
3
4
  function __exportSetter(name, newValue) {
@@ -14,330 +15,8 @@ var __export = (target, all) => {
14
15
  };
15
16
 
16
17
  // src/boboddy-config-parser.ts
17
- var {access, readFile} = (() => ({}));
18
-
19
- // node:path
20
- function assertPath(path) {
21
- if (typeof path !== "string")
22
- throw TypeError("Path must be a string. Received " + JSON.stringify(path));
23
- }
24
- function normalizeStringPosix(path, allowAboveRoot) {
25
- var res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, code;
26
- for (var i = 0;i <= path.length; ++i) {
27
- if (i < path.length)
28
- code = path.charCodeAt(i);
29
- else if (code === 47)
30
- break;
31
- else
32
- code = 47;
33
- if (code === 47) {
34
- if (lastSlash === i - 1 || dots === 1)
35
- ;
36
- else if (lastSlash !== i - 1 && dots === 2) {
37
- if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
38
- if (res.length > 2) {
39
- var lastSlashIndex = res.lastIndexOf("/");
40
- if (lastSlashIndex !== res.length - 1) {
41
- if (lastSlashIndex === -1)
42
- res = "", lastSegmentLength = 0;
43
- else
44
- res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
45
- lastSlash = i, dots = 0;
46
- continue;
47
- }
48
- } else if (res.length === 2 || res.length === 1) {
49
- res = "", lastSegmentLength = 0, lastSlash = i, dots = 0;
50
- continue;
51
- }
52
- }
53
- if (allowAboveRoot) {
54
- if (res.length > 0)
55
- res += "/..";
56
- else
57
- res = "..";
58
- lastSegmentLength = 2;
59
- }
60
- } else {
61
- if (res.length > 0)
62
- res += "/" + path.slice(lastSlash + 1, i);
63
- else
64
- res = path.slice(lastSlash + 1, i);
65
- lastSegmentLength = i - lastSlash - 1;
66
- }
67
- lastSlash = i, dots = 0;
68
- } else if (code === 46 && dots !== -1)
69
- ++dots;
70
- else
71
- dots = -1;
72
- }
73
- return res;
74
- }
75
- function _format(sep, pathObject) {
76
- var dir = pathObject.dir || pathObject.root, base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
77
- if (!dir)
78
- return base;
79
- if (dir === pathObject.root)
80
- return dir + base;
81
- return dir + sep + base;
82
- }
83
- function resolve() {
84
- var resolvedPath = "", resolvedAbsolute = false, cwd;
85
- for (var i = arguments.length - 1;i >= -1 && !resolvedAbsolute; i--) {
86
- var path;
87
- if (i >= 0)
88
- path = arguments[i];
89
- else {
90
- if (cwd === undefined)
91
- cwd = process.cwd();
92
- path = cwd;
93
- }
94
- if (assertPath(path), path.length === 0)
95
- continue;
96
- resolvedPath = path + "/" + resolvedPath, resolvedAbsolute = path.charCodeAt(0) === 47;
97
- }
98
- if (resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute), resolvedAbsolute)
99
- if (resolvedPath.length > 0)
100
- return "/" + resolvedPath;
101
- else
102
- return "/";
103
- else if (resolvedPath.length > 0)
104
- return resolvedPath;
105
- else
106
- return ".";
107
- }
108
- function normalize(path) {
109
- if (assertPath(path), path.length === 0)
110
- return ".";
111
- var isAbsolute = path.charCodeAt(0) === 47, trailingSeparator = path.charCodeAt(path.length - 1) === 47;
112
- if (path = normalizeStringPosix(path, !isAbsolute), path.length === 0 && !isAbsolute)
113
- path = ".";
114
- if (path.length > 0 && trailingSeparator)
115
- path += "/";
116
- if (isAbsolute)
117
- return "/" + path;
118
- return path;
119
- }
120
- function isAbsolute(path) {
121
- return assertPath(path), path.length > 0 && path.charCodeAt(0) === 47;
122
- }
123
- function join() {
124
- if (arguments.length === 0)
125
- return ".";
126
- var joined;
127
- for (var i = 0;i < arguments.length; ++i) {
128
- var arg = arguments[i];
129
- if (assertPath(arg), arg.length > 0)
130
- if (joined === undefined)
131
- joined = arg;
132
- else
133
- joined += "/" + arg;
134
- }
135
- if (joined === undefined)
136
- return ".";
137
- return normalize(joined);
138
- }
139
- function relative(from, to) {
140
- if (assertPath(from), assertPath(to), from === to)
141
- return "";
142
- if (from = resolve(from), to = resolve(to), from === to)
143
- return "";
144
- var fromStart = 1;
145
- for (;fromStart < from.length; ++fromStart)
146
- if (from.charCodeAt(fromStart) !== 47)
147
- break;
148
- var fromEnd = from.length, fromLen = fromEnd - fromStart, toStart = 1;
149
- for (;toStart < to.length; ++toStart)
150
- if (to.charCodeAt(toStart) !== 47)
151
- break;
152
- var toEnd = to.length, toLen = toEnd - toStart, length = fromLen < toLen ? fromLen : toLen, lastCommonSep = -1, i = 0;
153
- for (;i <= length; ++i) {
154
- if (i === length) {
155
- if (toLen > length) {
156
- if (to.charCodeAt(toStart + i) === 47)
157
- return to.slice(toStart + i + 1);
158
- else if (i === 0)
159
- return to.slice(toStart + i);
160
- } else if (fromLen > length) {
161
- if (from.charCodeAt(fromStart + i) === 47)
162
- lastCommonSep = i;
163
- else if (i === 0)
164
- lastCommonSep = 0;
165
- }
166
- break;
167
- }
168
- var fromCode = from.charCodeAt(fromStart + i), toCode = to.charCodeAt(toStart + i);
169
- if (fromCode !== toCode)
170
- break;
171
- else if (fromCode === 47)
172
- lastCommonSep = i;
173
- }
174
- var out = "";
175
- for (i = fromStart + lastCommonSep + 1;i <= fromEnd; ++i)
176
- if (i === fromEnd || from.charCodeAt(i) === 47)
177
- if (out.length === 0)
178
- out += "..";
179
- else
180
- out += "/..";
181
- if (out.length > 0)
182
- return out + to.slice(toStart + lastCommonSep);
183
- else {
184
- if (toStart += lastCommonSep, to.charCodeAt(toStart) === 47)
185
- ++toStart;
186
- return to.slice(toStart);
187
- }
188
- }
189
- function _makeLong(path) {
190
- return path;
191
- }
192
- function dirname(path) {
193
- if (assertPath(path), path.length === 0)
194
- return ".";
195
- var code = path.charCodeAt(0), hasRoot = code === 47, end = -1, matchedSlash = true;
196
- for (var i = path.length - 1;i >= 1; --i)
197
- if (code = path.charCodeAt(i), code === 47) {
198
- if (!matchedSlash) {
199
- end = i;
200
- break;
201
- }
202
- } else
203
- matchedSlash = false;
204
- if (end === -1)
205
- return hasRoot ? "/" : ".";
206
- if (hasRoot && end === 1)
207
- return "//";
208
- return path.slice(0, end);
209
- }
210
- function basename(path, ext) {
211
- if (ext !== undefined && typeof ext !== "string")
212
- throw TypeError('"ext" argument must be a string');
213
- assertPath(path);
214
- var start = 0, end = -1, matchedSlash = true, i;
215
- if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
216
- if (ext.length === path.length && ext === path)
217
- return "";
218
- var extIdx = ext.length - 1, firstNonSlashEnd = -1;
219
- for (i = path.length - 1;i >= 0; --i) {
220
- var code = path.charCodeAt(i);
221
- if (code === 47) {
222
- if (!matchedSlash) {
223
- start = i + 1;
224
- break;
225
- }
226
- } else {
227
- if (firstNonSlashEnd === -1)
228
- matchedSlash = false, firstNonSlashEnd = i + 1;
229
- if (extIdx >= 0)
230
- if (code === ext.charCodeAt(extIdx)) {
231
- if (--extIdx === -1)
232
- end = i;
233
- } else
234
- extIdx = -1, end = firstNonSlashEnd;
235
- }
236
- }
237
- if (start === end)
238
- end = firstNonSlashEnd;
239
- else if (end === -1)
240
- end = path.length;
241
- return path.slice(start, end);
242
- } else {
243
- for (i = path.length - 1;i >= 0; --i)
244
- if (path.charCodeAt(i) === 47) {
245
- if (!matchedSlash) {
246
- start = i + 1;
247
- break;
248
- }
249
- } else if (end === -1)
250
- matchedSlash = false, end = i + 1;
251
- if (end === -1)
252
- return "";
253
- return path.slice(start, end);
254
- }
255
- }
256
- function extname(path) {
257
- assertPath(path);
258
- var startDot = -1, startPart = 0, end = -1, matchedSlash = true, preDotState = 0;
259
- for (var i = path.length - 1;i >= 0; --i) {
260
- var code = path.charCodeAt(i);
261
- if (code === 47) {
262
- if (!matchedSlash) {
263
- startPart = i + 1;
264
- break;
265
- }
266
- continue;
267
- }
268
- if (end === -1)
269
- matchedSlash = false, end = i + 1;
270
- if (code === 46) {
271
- if (startDot === -1)
272
- startDot = i;
273
- else if (preDotState !== 1)
274
- preDotState = 1;
275
- } else if (startDot !== -1)
276
- preDotState = -1;
277
- }
278
- if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
279
- return "";
280
- return path.slice(startDot, end);
281
- }
282
- function format(pathObject) {
283
- if (pathObject === null || typeof pathObject !== "object")
284
- throw TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
285
- return _format("/", pathObject);
286
- }
287
- function parse(path) {
288
- assertPath(path);
289
- var ret = { root: "", dir: "", base: "", ext: "", name: "" };
290
- if (path.length === 0)
291
- return ret;
292
- var code = path.charCodeAt(0), isAbsolute2 = code === 47, start;
293
- if (isAbsolute2)
294
- ret.root = "/", start = 1;
295
- else
296
- start = 0;
297
- var startDot = -1, startPart = 0, end = -1, matchedSlash = true, i = path.length - 1, preDotState = 0;
298
- for (;i >= start; --i) {
299
- if (code = path.charCodeAt(i), code === 47) {
300
- if (!matchedSlash) {
301
- startPart = i + 1;
302
- break;
303
- }
304
- continue;
305
- }
306
- if (end === -1)
307
- matchedSlash = false, end = i + 1;
308
- if (code === 46) {
309
- if (startDot === -1)
310
- startDot = i;
311
- else if (preDotState !== 1)
312
- preDotState = 1;
313
- } else if (startDot !== -1)
314
- preDotState = -1;
315
- }
316
- if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
317
- if (end !== -1)
318
- if (startPart === 0 && isAbsolute2)
319
- ret.base = ret.name = path.slice(1, end);
320
- else
321
- ret.base = ret.name = path.slice(startPart, end);
322
- } else {
323
- if (startPart === 0 && isAbsolute2)
324
- ret.name = path.slice(1, startDot), ret.base = path.slice(1, end);
325
- else
326
- ret.name = path.slice(startPart, startDot), ret.base = path.slice(startPart, end);
327
- ret.ext = path.slice(startDot, end);
328
- }
329
- if (startPart > 0)
330
- ret.dir = path.slice(0, startPart - 1);
331
- else if (isAbsolute2)
332
- ret.dir = "/";
333
- return ret;
334
- }
335
- var sep = "/";
336
- var delimiter = ":";
337
- var posix = ((p) => (p.posix = p, p))({ resolve, normalize, isAbsolute, join, relative, _makeLong, dirname, basename, extname, format, parse, sep, delimiter, win32: null, posix: null });
338
- var path_default = posix;
339
-
340
- // src/boboddy-config-parser.ts
18
+ import { access, readFile } from "fs/promises";
19
+ import path from "path";
341
20
  var BOBODDY_CONFIG_RELATIVE_PATH = ".boboddy/boboddy.jsonc";
342
21
  var stripJsoncComments = (content) => {
343
22
  let result = "";
@@ -489,7 +168,7 @@ var parseServices = (raw) => {
489
168
  });
490
169
  };
491
170
  async function parseBoboddyConfig(workspacePath) {
492
- const filePath = path_default.join(workspacePath, BOBODDY_CONFIG_RELATIVE_PATH);
171
+ const filePath = path.join(workspacePath, BOBODDY_CONFIG_RELATIVE_PATH);
493
172
  const exists = await access(filePath).then(() => true).catch(() => false);
494
173
  if (!exists) {
495
174
  return { found: false };
package/dist/client.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @bun
1
2
  var __defProp = Object.defineProperty;
2
3
  var __returnValue = (v) => v;
3
4
  function __exportSetter(name, newValue) {
@@ -240,7 +241,7 @@ var serializePrimitiveParam = ({
240
241
  return "";
241
242
  }
242
243
  if (typeof value === "object") {
243
- throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");
244
+ throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");
244
245
  }
245
246
  return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
246
247
  };
@@ -913,12 +914,9 @@ class StepDefinitions extends HeyApiClient {
913
914
  }
914
915
  });
915
916
  }
916
- getStepDefinition(options) {
917
- return (options.client ?? this.client).get({ url: "/api/step-definitions/{stepDefinitionId}", ...options });
918
- }
919
- updateStepDefinition(options) {
917
+ upsertStepDefinition(options) {
920
918
  return (options.client ?? this.client).put({
921
- url: "/api/step-definitions/{stepDefinitionId}",
919
+ url: "/api/step-definitions",
922
920
  ...options,
923
921
  headers: {
924
922
  "Content-Type": "application/json",
@@ -926,6 +924,9 @@ class StepDefinitions extends HeyApiClient {
926
924
  }
927
925
  });
928
926
  }
927
+ getStepDefinition(options) {
928
+ return (options.client ?? this.client).get({ url: "/api/step-definitions/{stepDefinitionId}", ...options });
929
+ }
929
930
  archiveStepDefinition(options) {
930
931
  return (options.client ?? this.client).put({ url: "/api/step-definitions/{stepDefinitionId}/archive", ...options });
931
932
  }
@@ -0,0 +1,14 @@
1
+ export interface AuthProfile {
2
+ accessToken: string;
3
+ userId?: string;
4
+ email?: string;
5
+ name?: string;
6
+ }
7
+ export interface AuthFile {
8
+ profiles: Record<string, AuthProfile>;
9
+ }
10
+ export declare const getAuthFilePath: () => string;
11
+ export declare const loadAuthFile: () => AuthFile;
12
+ export declare const loadAuthProfile: (baseUrl: string) => AuthProfile | null;
13
+ export declare const saveAuthProfile: (baseUrl: string, profile: AuthProfile) => void;
14
+ export declare const deleteAuthProfile: (baseUrl: string) => void;
@@ -0,0 +1 @@
1
+ export declare const resolveBoboddyBaseUrl: (value?: string | null) => string;
@@ -0,0 +1,7 @@
1
+ export { deleteAuthProfile, getAuthFilePath, loadAuthFile, loadAuthProfile, saveAuthProfile, } from "./auth-file";
2
+ export type { AuthFile, AuthProfile } from "./auth-file";
3
+ export { resolveBoboddyBaseUrl } from "./base-url";
4
+ export { loadProjectConfig, PROJECT_CONFIG_RELATIVE_PATH, } from "./project-config";
5
+ export type { ProjectConfig } from "./project-config";
6
+ export { loadPushDefaults } from "./load-push-defaults";
7
+ export type { LoadPushDefaultsOptions, PushDefaults, } from "./load-push-defaults";