@boboddy/sdk 0.2.3-alpha → 0.2.4-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
@@ -1581,6 +1581,249 @@ function createBoboddyClient(baseUrl) {
1581
1581
  return new BoboddyClient({ client: client2 });
1582
1582
  }
1583
1583
 
1584
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
1585
+ var exports_external = {};
1586
+ __export(exports_external, {
1587
+ xor: () => xor,
1588
+ xid: () => xid2,
1589
+ void: () => _void2,
1590
+ uuidv7: () => uuidv7,
1591
+ uuidv6: () => uuidv6,
1592
+ uuidv4: () => uuidv4,
1593
+ uuid: () => uuid2,
1594
+ util: () => exports_util,
1595
+ url: () => url,
1596
+ uppercase: () => _uppercase,
1597
+ unknown: () => unknown,
1598
+ union: () => union,
1599
+ undefined: () => _undefined3,
1600
+ ulid: () => ulid2,
1601
+ uint64: () => uint64,
1602
+ uint32: () => uint32,
1603
+ tuple: () => tuple,
1604
+ trim: () => _trim,
1605
+ treeifyError: () => treeifyError,
1606
+ transform: () => transform,
1607
+ toUpperCase: () => _toUpperCase,
1608
+ toLowerCase: () => _toLowerCase,
1609
+ toJSONSchema: () => toJSONSchema,
1610
+ templateLiteral: () => templateLiteral,
1611
+ symbol: () => symbol,
1612
+ superRefine: () => superRefine,
1613
+ success: () => success,
1614
+ stringbool: () => stringbool,
1615
+ stringFormat: () => stringFormat,
1616
+ string: () => string2,
1617
+ strictObject: () => strictObject,
1618
+ startsWith: () => _startsWith,
1619
+ slugify: () => _slugify,
1620
+ size: () => _size,
1621
+ setErrorMap: () => setErrorMap,
1622
+ set: () => set,
1623
+ safeParseAsync: () => safeParseAsync2,
1624
+ safeParse: () => safeParse2,
1625
+ safeEncodeAsync: () => safeEncodeAsync2,
1626
+ safeEncode: () => safeEncode2,
1627
+ safeDecodeAsync: () => safeDecodeAsync2,
1628
+ safeDecode: () => safeDecode2,
1629
+ registry: () => registry,
1630
+ regexes: () => exports_regexes,
1631
+ regex: () => _regex,
1632
+ refine: () => refine,
1633
+ record: () => record,
1634
+ readonly: () => readonly,
1635
+ property: () => _property,
1636
+ promise: () => promise,
1637
+ prettifyError: () => prettifyError,
1638
+ preprocess: () => preprocess,
1639
+ prefault: () => prefault,
1640
+ positive: () => _positive,
1641
+ pipe: () => pipe,
1642
+ partialRecord: () => partialRecord,
1643
+ parseAsync: () => parseAsync2,
1644
+ parse: () => parse3,
1645
+ overwrite: () => _overwrite,
1646
+ optional: () => optional,
1647
+ object: () => object,
1648
+ number: () => number2,
1649
+ nullish: () => nullish2,
1650
+ nullable: () => nullable,
1651
+ null: () => _null3,
1652
+ normalize: () => _normalize,
1653
+ nonpositive: () => _nonpositive,
1654
+ nonoptional: () => nonoptional,
1655
+ nonnegative: () => _nonnegative,
1656
+ never: () => never,
1657
+ negative: () => _negative,
1658
+ nativeEnum: () => nativeEnum,
1659
+ nanoid: () => nanoid2,
1660
+ nan: () => nan,
1661
+ multipleOf: () => _multipleOf,
1662
+ minSize: () => _minSize,
1663
+ minLength: () => _minLength,
1664
+ mime: () => _mime,
1665
+ meta: () => meta2,
1666
+ maxSize: () => _maxSize,
1667
+ maxLength: () => _maxLength,
1668
+ map: () => map,
1669
+ mac: () => mac2,
1670
+ lte: () => _lte,
1671
+ lt: () => _lt,
1672
+ lowercase: () => _lowercase,
1673
+ looseRecord: () => looseRecord,
1674
+ looseObject: () => looseObject,
1675
+ locales: () => exports_locales,
1676
+ literal: () => literal,
1677
+ length: () => _length,
1678
+ lazy: () => lazy,
1679
+ ksuid: () => ksuid2,
1680
+ keyof: () => keyof,
1681
+ jwt: () => jwt,
1682
+ json: () => json,
1683
+ iso: () => exports_iso,
1684
+ ipv6: () => ipv62,
1685
+ ipv4: () => ipv42,
1686
+ invertCodec: () => invertCodec,
1687
+ intersection: () => intersection,
1688
+ int64: () => int64,
1689
+ int32: () => int32,
1690
+ int: () => int,
1691
+ instanceof: () => _instanceof,
1692
+ includes: () => _includes,
1693
+ httpUrl: () => httpUrl,
1694
+ hostname: () => hostname2,
1695
+ hex: () => hex2,
1696
+ hash: () => hash,
1697
+ guid: () => guid2,
1698
+ gte: () => _gte,
1699
+ gt: () => _gt,
1700
+ globalRegistry: () => globalRegistry,
1701
+ getErrorMap: () => getErrorMap,
1702
+ function: () => _function,
1703
+ fromJSONSchema: () => fromJSONSchema,
1704
+ formatError: () => formatError,
1705
+ float64: () => float64,
1706
+ float32: () => float32,
1707
+ flattenError: () => flattenError,
1708
+ file: () => file,
1709
+ exactOptional: () => exactOptional,
1710
+ enum: () => _enum2,
1711
+ endsWith: () => _endsWith,
1712
+ encodeAsync: () => encodeAsync2,
1713
+ encode: () => encode2,
1714
+ emoji: () => emoji2,
1715
+ email: () => email2,
1716
+ e164: () => e1642,
1717
+ discriminatedUnion: () => discriminatedUnion,
1718
+ describe: () => describe2,
1719
+ decodeAsync: () => decodeAsync2,
1720
+ decode: () => decode2,
1721
+ date: () => date3,
1722
+ custom: () => custom,
1723
+ cuid2: () => cuid22,
1724
+ cuid: () => cuid3,
1725
+ core: () => exports_core2,
1726
+ config: () => config,
1727
+ coerce: () => exports_coerce,
1728
+ codec: () => codec,
1729
+ clone: () => clone,
1730
+ cidrv6: () => cidrv62,
1731
+ cidrv4: () => cidrv42,
1732
+ check: () => check,
1733
+ catch: () => _catch2,
1734
+ boolean: () => boolean2,
1735
+ bigint: () => bigint2,
1736
+ base64url: () => base64url2,
1737
+ base64: () => base642,
1738
+ array: () => array,
1739
+ any: () => any,
1740
+ _function: () => _function,
1741
+ _default: () => _default2,
1742
+ _ZodString: () => _ZodString,
1743
+ ZodXor: () => ZodXor,
1744
+ ZodXID: () => ZodXID,
1745
+ ZodVoid: () => ZodVoid,
1746
+ ZodUnknown: () => ZodUnknown,
1747
+ ZodUnion: () => ZodUnion,
1748
+ ZodUndefined: () => ZodUndefined,
1749
+ ZodUUID: () => ZodUUID,
1750
+ ZodURL: () => ZodURL,
1751
+ ZodULID: () => ZodULID,
1752
+ ZodType: () => ZodType,
1753
+ ZodTuple: () => ZodTuple,
1754
+ ZodTransform: () => ZodTransform,
1755
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
1756
+ ZodSymbol: () => ZodSymbol,
1757
+ ZodSuccess: () => ZodSuccess,
1758
+ ZodStringFormat: () => ZodStringFormat,
1759
+ ZodString: () => ZodString,
1760
+ ZodSet: () => ZodSet,
1761
+ ZodRecord: () => ZodRecord,
1762
+ ZodRealError: () => ZodRealError,
1763
+ ZodReadonly: () => ZodReadonly,
1764
+ ZodPromise: () => ZodPromise,
1765
+ ZodPreprocess: () => ZodPreprocess,
1766
+ ZodPrefault: () => ZodPrefault,
1767
+ ZodPipe: () => ZodPipe,
1768
+ ZodOptional: () => ZodOptional,
1769
+ ZodObject: () => ZodObject,
1770
+ ZodNumberFormat: () => ZodNumberFormat,
1771
+ ZodNumber: () => ZodNumber,
1772
+ ZodNullable: () => ZodNullable,
1773
+ ZodNull: () => ZodNull,
1774
+ ZodNonOptional: () => ZodNonOptional,
1775
+ ZodNever: () => ZodNever,
1776
+ ZodNanoID: () => ZodNanoID,
1777
+ ZodNaN: () => ZodNaN,
1778
+ ZodMap: () => ZodMap,
1779
+ ZodMAC: () => ZodMAC,
1780
+ ZodLiteral: () => ZodLiteral,
1781
+ ZodLazy: () => ZodLazy,
1782
+ ZodKSUID: () => ZodKSUID,
1783
+ ZodJWT: () => ZodJWT,
1784
+ ZodIssueCode: () => ZodIssueCode,
1785
+ ZodIntersection: () => ZodIntersection,
1786
+ ZodISOTime: () => ZodISOTime,
1787
+ ZodISODuration: () => ZodISODuration,
1788
+ ZodISODateTime: () => ZodISODateTime,
1789
+ ZodISODate: () => ZodISODate,
1790
+ ZodIPv6: () => ZodIPv6,
1791
+ ZodIPv4: () => ZodIPv4,
1792
+ ZodGUID: () => ZodGUID,
1793
+ ZodFunction: () => ZodFunction,
1794
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
1795
+ ZodFile: () => ZodFile,
1796
+ ZodExactOptional: () => ZodExactOptional,
1797
+ ZodError: () => ZodError,
1798
+ ZodEnum: () => ZodEnum,
1799
+ ZodEmoji: () => ZodEmoji,
1800
+ ZodEmail: () => ZodEmail,
1801
+ ZodE164: () => ZodE164,
1802
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
1803
+ ZodDefault: () => ZodDefault,
1804
+ ZodDate: () => ZodDate,
1805
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
1806
+ ZodCustom: () => ZodCustom,
1807
+ ZodCodec: () => ZodCodec,
1808
+ ZodCatch: () => ZodCatch,
1809
+ ZodCUID2: () => ZodCUID2,
1810
+ ZodCUID: () => ZodCUID,
1811
+ ZodCIDRv6: () => ZodCIDRv6,
1812
+ ZodCIDRv4: () => ZodCIDRv4,
1813
+ ZodBoolean: () => ZodBoolean,
1814
+ ZodBigIntFormat: () => ZodBigIntFormat,
1815
+ ZodBigInt: () => ZodBigInt,
1816
+ ZodBase64URL: () => ZodBase64URL,
1817
+ ZodBase64: () => ZodBase64,
1818
+ ZodArray: () => ZodArray,
1819
+ ZodAny: () => ZodAny,
1820
+ TimePrecision: () => TimePrecision,
1821
+ NEVER: () => NEVER,
1822
+ $output: () => $output,
1823
+ $input: () => $input,
1824
+ $brand: () => $brand
1825
+ });
1826
+
1584
1827
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/index.js
1585
1828
  var exports_core2 = {};
1586
1829
  __export(exports_core2, {
@@ -12802,7 +13045,7 @@ function finalize(ctx, schema) {
12802
13045
  result.$schema = "http://json-schema.org/draft-07/schema#";
12803
13046
  } else if (ctx.target === "draft-04") {
12804
13047
  result.$schema = "http://json-schema.org/draft-04/schema#";
12805
- } else if (ctx.target === "openapi-3.0") {}
13048
+ } else if (ctx.target === "openapi-3.0") {} else {}
12806
13049
  if (ctx.external?.uri) {
12807
13050
  const id = ctx.external.registry.get(schema)?.id;
12808
13051
  if (!id)
@@ -13046,7 +13289,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
13046
13289
  if (val === undefined) {
13047
13290
  if (ctx.unrepresentable === "throw") {
13048
13291
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
13049
- }
13292
+ } else {}
13050
13293
  } else if (typeof val === "bigint") {
13051
13294
  if (ctx.unrepresentable === "throw") {
13052
13295
  throw new Error("BigInt literals cannot be represented in JSON Schema");
@@ -13514,421 +13757,6 @@ class JSONSchemaGenerator {
13514
13757
  }
13515
13758
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
13516
13759
  var exports_json_schema = {};
13517
- // src/definitions/steps/prompt-template.ts
13518
- function createPromptInputProxy(path = []) {
13519
- const token = () => path.length ? `{{${path.join(".")}}}` : "";
13520
- return new Proxy(Object.freeze({}), {
13521
- get(_, key) {
13522
- if (key === Symbol.toPrimitive || key === "valueOf") {
13523
- return (_hint) => token();
13524
- }
13525
- if (key === "toString") {
13526
- return () => token();
13527
- }
13528
- if (typeof key !== "string")
13529
- return;
13530
- return createPromptInputProxy([...path, key]);
13531
- }
13532
- });
13533
- }
13534
- function createPromptTemplateContext() {
13535
- return {
13536
- input: createPromptInputProxy(["input"]),
13537
- env: createPromptInputProxy(["env"]),
13538
- boboddy: {
13539
- artifactsDir: createPromptInputProxy([
13540
- "boboddy",
13541
- "artifactsDir"
13542
- ])
13543
- }
13544
- };
13545
- }
13546
- function renderPromptTemplate(template, contextJson) {
13547
- return template.replace(/\{\{([^}]+)\}\}/g, (_, path) => {
13548
- const value = path.split(".").reduce((curr, key) => curr != null ? curr[key] : undefined, contextJson);
13549
- return value != null ? String(value) : "";
13550
- });
13551
- }
13552
-
13553
- // src/definitions/steps/define-step.ts
13554
- function resolveZodSchemaAtPath(schema, path) {
13555
- if (!schema)
13556
- return;
13557
- const segments = path.split(".");
13558
- let current = schema;
13559
- for (const segment of segments) {
13560
- if (!current)
13561
- return;
13562
- current = unwrapZodWrappers(current);
13563
- const def = current.def;
13564
- if (!def || def.type !== "object" || !def.shape)
13565
- return;
13566
- current = def.shape[segment];
13567
- }
13568
- return current;
13569
- }
13570
- function zodTypeToSignalType(schema) {
13571
- if (!schema)
13572
- return;
13573
- const unwrapped = unwrapZodWrappers(schema);
13574
- const def = unwrapped.def;
13575
- const typeName = def?.type;
13576
- switch (typeName) {
13577
- case "string":
13578
- return "string";
13579
- case "number":
13580
- return "number";
13581
- case "boolean":
13582
- return "boolean";
13583
- case "array":
13584
- return "array";
13585
- case "object":
13586
- return "object";
13587
- default:
13588
- return;
13589
- }
13590
- }
13591
- function unwrapZodWrappers(schema) {
13592
- const def = schema.def;
13593
- if (!def)
13594
- return schema;
13595
- if (def.type === "optional" || def.type === "nullable" || def.type === "default" || def.type === "catch") {
13596
- if (def.innerType)
13597
- return unwrapZodWrappers(def.innerType);
13598
- }
13599
- return schema;
13600
- }
13601
- function defineStep(config2) {
13602
- const features = config2.features ?? [];
13603
- let effectiveResult = config2.result;
13604
- for (const feature of features) {
13605
- effectiveResult = effectiveResult ? effectiveResult.extend(feature._resultExtension.shape) : feature._resultExtension;
13606
- }
13607
- const basePrompt = typeof config2.agentPrompt === "function" ? config2.agentPrompt(createPromptTemplateContext()) : config2.agentPrompt;
13608
- let effectivePrompt = basePrompt;
13609
- for (const feature of features) {
13610
- if (feature._promptAddition) {
13611
- effectivePrompt = effectivePrompt ? `${effectivePrompt}
13612
-
13613
- ${feature._promptAddition}` : feature._promptAddition;
13614
- }
13615
- }
13616
- const featureSignals = features.flatMap((f) => f._signals);
13617
- const spec = {
13618
- key: config2.key,
13619
- name: config2.name,
13620
- description: config2.description ?? null,
13621
- version: config2.version ?? 1,
13622
- kind: "user_defined",
13623
- status: config2.status ?? "active",
13624
- prompt: effectivePrompt,
13625
- inputSchemaJson: config2.additionalInput ? toJSONSchema(config2.additionalInput) : null,
13626
- resultSchemaJson: effectiveResult ? toJSONSchema(effectiveResult) : null,
13627
- signalExtractorDefinitions: [
13628
- ...(config2.signals ?? []).map((s) => ({
13629
- key: s.key ?? s.sourcePath,
13630
- sourcePath: s.sourcePath,
13631
- type: s.type ?? zodTypeToSignalType(resolveZodSchemaAtPath(effectiveResult, s.sourcePath)) ?? "string",
13632
- required: s.required ?? true,
13633
- availableWhenResultStatusIn: s.availableWhenResultStatusIn ?? null
13634
- })),
13635
- ...featureSignals.map((s) => ({
13636
- key: s.key,
13637
- sourcePath: s.sourcePath,
13638
- type: s.type,
13639
- required: s.required ?? true,
13640
- availableWhenResultStatusIn: s.availableWhenResultStatusIn ?? null
13641
- }))
13642
- ],
13643
- opencodeMcpJson: config2.mcpServers ?? null,
13644
- opencodePluginJson: config2.plugins ?? null
13645
- };
13646
- return spec;
13647
- }
13648
- // src/definitions/steps/step-definitions-client.ts
13649
- function createStepDefinitionsClient(baseUrl) {
13650
- const client2 = createClient({ baseUrl });
13651
- return buildStepDefinitionsClient(new StepDefinitions({ client: client2 }));
13652
- }
13653
- var buildStepDefinitionsClient = (stepDefinitions) => {
13654
- return {
13655
- listByProjectId: async (projectId, options) => {
13656
- const result = await stepDefinitions.listStepDefinitions({
13657
- query: { projectId },
13658
- headers: options?.headers
13659
- });
13660
- if (result.error)
13661
- throw new Error(JSON.stringify(result.error));
13662
- return result.data;
13663
- },
13664
- create: async (body, options) => {
13665
- const result = await stepDefinitions.createStepDefinition({
13666
- body,
13667
- headers: options?.headers
13668
- });
13669
- if (result.error)
13670
- throw new Error(JSON.stringify(result.error));
13671
- return result.data;
13672
- },
13673
- upsertFromSpec: async (projectId, spec, options) => {
13674
- const body = {
13675
- ...spec,
13676
- prompt: spec.prompt ?? "",
13677
- projectId
13678
- };
13679
- const result = await stepDefinitions.upsertStepDefinition({
13680
- body,
13681
- headers: options?.headers
13682
- });
13683
- if (result.error)
13684
- throw new Error(JSON.stringify(result.error));
13685
- return result.data;
13686
- }
13687
- };
13688
- };
13689
- // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
13690
- var exports_external = {};
13691
- __export(exports_external, {
13692
- xor: () => xor,
13693
- xid: () => xid2,
13694
- void: () => _void2,
13695
- uuidv7: () => uuidv7,
13696
- uuidv6: () => uuidv6,
13697
- uuidv4: () => uuidv4,
13698
- uuid: () => uuid2,
13699
- util: () => exports_util,
13700
- url: () => url,
13701
- uppercase: () => _uppercase,
13702
- unknown: () => unknown,
13703
- union: () => union,
13704
- undefined: () => _undefined3,
13705
- ulid: () => ulid2,
13706
- uint64: () => uint64,
13707
- uint32: () => uint32,
13708
- tuple: () => tuple,
13709
- trim: () => _trim,
13710
- treeifyError: () => treeifyError,
13711
- transform: () => transform,
13712
- toUpperCase: () => _toUpperCase,
13713
- toLowerCase: () => _toLowerCase,
13714
- toJSONSchema: () => toJSONSchema,
13715
- templateLiteral: () => templateLiteral,
13716
- symbol: () => symbol,
13717
- superRefine: () => superRefine,
13718
- success: () => success,
13719
- stringbool: () => stringbool,
13720
- stringFormat: () => stringFormat,
13721
- string: () => string2,
13722
- strictObject: () => strictObject,
13723
- startsWith: () => _startsWith,
13724
- slugify: () => _slugify,
13725
- size: () => _size,
13726
- setErrorMap: () => setErrorMap,
13727
- set: () => set,
13728
- safeParseAsync: () => safeParseAsync2,
13729
- safeParse: () => safeParse2,
13730
- safeEncodeAsync: () => safeEncodeAsync2,
13731
- safeEncode: () => safeEncode2,
13732
- safeDecodeAsync: () => safeDecodeAsync2,
13733
- safeDecode: () => safeDecode2,
13734
- registry: () => registry,
13735
- regexes: () => exports_regexes,
13736
- regex: () => _regex,
13737
- refine: () => refine,
13738
- record: () => record,
13739
- readonly: () => readonly,
13740
- property: () => _property,
13741
- promise: () => promise,
13742
- prettifyError: () => prettifyError,
13743
- preprocess: () => preprocess,
13744
- prefault: () => prefault,
13745
- positive: () => _positive,
13746
- pipe: () => pipe,
13747
- partialRecord: () => partialRecord,
13748
- parseAsync: () => parseAsync2,
13749
- parse: () => parse3,
13750
- overwrite: () => _overwrite,
13751
- optional: () => optional,
13752
- object: () => object,
13753
- number: () => number2,
13754
- nullish: () => nullish2,
13755
- nullable: () => nullable,
13756
- null: () => _null3,
13757
- normalize: () => _normalize,
13758
- nonpositive: () => _nonpositive,
13759
- nonoptional: () => nonoptional,
13760
- nonnegative: () => _nonnegative,
13761
- never: () => never,
13762
- negative: () => _negative,
13763
- nativeEnum: () => nativeEnum,
13764
- nanoid: () => nanoid2,
13765
- nan: () => nan,
13766
- multipleOf: () => _multipleOf,
13767
- minSize: () => _minSize,
13768
- minLength: () => _minLength,
13769
- mime: () => _mime,
13770
- meta: () => meta2,
13771
- maxSize: () => _maxSize,
13772
- maxLength: () => _maxLength,
13773
- map: () => map,
13774
- mac: () => mac2,
13775
- lte: () => _lte,
13776
- lt: () => _lt,
13777
- lowercase: () => _lowercase,
13778
- looseRecord: () => looseRecord,
13779
- looseObject: () => looseObject,
13780
- locales: () => exports_locales,
13781
- literal: () => literal,
13782
- length: () => _length,
13783
- lazy: () => lazy,
13784
- ksuid: () => ksuid2,
13785
- keyof: () => keyof,
13786
- jwt: () => jwt,
13787
- json: () => json,
13788
- iso: () => exports_iso,
13789
- ipv6: () => ipv62,
13790
- ipv4: () => ipv42,
13791
- invertCodec: () => invertCodec,
13792
- intersection: () => intersection,
13793
- int64: () => int64,
13794
- int32: () => int32,
13795
- int: () => int,
13796
- instanceof: () => _instanceof,
13797
- includes: () => _includes,
13798
- httpUrl: () => httpUrl,
13799
- hostname: () => hostname2,
13800
- hex: () => hex2,
13801
- hash: () => hash,
13802
- guid: () => guid2,
13803
- gte: () => _gte,
13804
- gt: () => _gt,
13805
- globalRegistry: () => globalRegistry,
13806
- getErrorMap: () => getErrorMap,
13807
- function: () => _function,
13808
- fromJSONSchema: () => fromJSONSchema,
13809
- formatError: () => formatError,
13810
- float64: () => float64,
13811
- float32: () => float32,
13812
- flattenError: () => flattenError,
13813
- file: () => file,
13814
- exactOptional: () => exactOptional,
13815
- enum: () => _enum2,
13816
- endsWith: () => _endsWith,
13817
- encodeAsync: () => encodeAsync2,
13818
- encode: () => encode2,
13819
- emoji: () => emoji2,
13820
- email: () => email2,
13821
- e164: () => e1642,
13822
- discriminatedUnion: () => discriminatedUnion,
13823
- describe: () => describe2,
13824
- decodeAsync: () => decodeAsync2,
13825
- decode: () => decode2,
13826
- date: () => date3,
13827
- custom: () => custom,
13828
- cuid2: () => cuid22,
13829
- cuid: () => cuid3,
13830
- core: () => exports_core2,
13831
- config: () => config,
13832
- coerce: () => exports_coerce,
13833
- codec: () => codec,
13834
- clone: () => clone,
13835
- cidrv6: () => cidrv62,
13836
- cidrv4: () => cidrv42,
13837
- check: () => check,
13838
- catch: () => _catch2,
13839
- boolean: () => boolean2,
13840
- bigint: () => bigint2,
13841
- base64url: () => base64url2,
13842
- base64: () => base642,
13843
- array: () => array,
13844
- any: () => any,
13845
- _function: () => _function,
13846
- _default: () => _default2,
13847
- _ZodString: () => _ZodString,
13848
- ZodXor: () => ZodXor,
13849
- ZodXID: () => ZodXID,
13850
- ZodVoid: () => ZodVoid,
13851
- ZodUnknown: () => ZodUnknown,
13852
- ZodUnion: () => ZodUnion,
13853
- ZodUndefined: () => ZodUndefined,
13854
- ZodUUID: () => ZodUUID,
13855
- ZodURL: () => ZodURL,
13856
- ZodULID: () => ZodULID,
13857
- ZodType: () => ZodType,
13858
- ZodTuple: () => ZodTuple,
13859
- ZodTransform: () => ZodTransform,
13860
- ZodTemplateLiteral: () => ZodTemplateLiteral,
13861
- ZodSymbol: () => ZodSymbol,
13862
- ZodSuccess: () => ZodSuccess,
13863
- ZodStringFormat: () => ZodStringFormat,
13864
- ZodString: () => ZodString,
13865
- ZodSet: () => ZodSet,
13866
- ZodRecord: () => ZodRecord,
13867
- ZodRealError: () => ZodRealError,
13868
- ZodReadonly: () => ZodReadonly,
13869
- ZodPromise: () => ZodPromise,
13870
- ZodPreprocess: () => ZodPreprocess,
13871
- ZodPrefault: () => ZodPrefault,
13872
- ZodPipe: () => ZodPipe,
13873
- ZodOptional: () => ZodOptional,
13874
- ZodObject: () => ZodObject,
13875
- ZodNumberFormat: () => ZodNumberFormat,
13876
- ZodNumber: () => ZodNumber,
13877
- ZodNullable: () => ZodNullable,
13878
- ZodNull: () => ZodNull,
13879
- ZodNonOptional: () => ZodNonOptional,
13880
- ZodNever: () => ZodNever,
13881
- ZodNanoID: () => ZodNanoID,
13882
- ZodNaN: () => ZodNaN,
13883
- ZodMap: () => ZodMap,
13884
- ZodMAC: () => ZodMAC,
13885
- ZodLiteral: () => ZodLiteral,
13886
- ZodLazy: () => ZodLazy,
13887
- ZodKSUID: () => ZodKSUID,
13888
- ZodJWT: () => ZodJWT,
13889
- ZodIssueCode: () => ZodIssueCode,
13890
- ZodIntersection: () => ZodIntersection,
13891
- ZodISOTime: () => ZodISOTime,
13892
- ZodISODuration: () => ZodISODuration,
13893
- ZodISODateTime: () => ZodISODateTime,
13894
- ZodISODate: () => ZodISODate,
13895
- ZodIPv6: () => ZodIPv6,
13896
- ZodIPv4: () => ZodIPv4,
13897
- ZodGUID: () => ZodGUID,
13898
- ZodFunction: () => ZodFunction,
13899
- ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
13900
- ZodFile: () => ZodFile,
13901
- ZodExactOptional: () => ZodExactOptional,
13902
- ZodError: () => ZodError,
13903
- ZodEnum: () => ZodEnum,
13904
- ZodEmoji: () => ZodEmoji,
13905
- ZodEmail: () => ZodEmail,
13906
- ZodE164: () => ZodE164,
13907
- ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
13908
- ZodDefault: () => ZodDefault,
13909
- ZodDate: () => ZodDate,
13910
- ZodCustomStringFormat: () => ZodCustomStringFormat,
13911
- ZodCustom: () => ZodCustom,
13912
- ZodCodec: () => ZodCodec,
13913
- ZodCatch: () => ZodCatch,
13914
- ZodCUID2: () => ZodCUID2,
13915
- ZodCUID: () => ZodCUID,
13916
- ZodCIDRv6: () => ZodCIDRv6,
13917
- ZodCIDRv4: () => ZodCIDRv4,
13918
- ZodBoolean: () => ZodBoolean,
13919
- ZodBigIntFormat: () => ZodBigIntFormat,
13920
- ZodBigInt: () => ZodBigInt,
13921
- ZodBase64URL: () => ZodBase64URL,
13922
- ZodBase64: () => ZodBase64,
13923
- ZodArray: () => ZodArray,
13924
- ZodAny: () => ZodAny,
13925
- TimePrecision: () => TimePrecision,
13926
- NEVER: () => NEVER,
13927
- $output: () => $output,
13928
- $input: () => $input,
13929
- $brand: () => $brand
13930
- });
13931
-
13932
13760
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
13933
13761
  var exports_schemas2 = {};
13934
13762
  __export(exports_schemas2, {
@@ -16029,6 +15857,182 @@ function date4(params) {
16029
15857
 
16030
15858
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
16031
15859
  config(en_default());
15860
+ // src/contracts/artifacts.ts
15861
+ var artifactKindSchema = exports_external.enum(["generic", "playwright-trace"]);
15862
+
15863
+ // src/definitions/steps/prompt-template.ts
15864
+ function createPromptInputProxy(path = []) {
15865
+ const token = () => path.length ? `{{${path.join(".")}}}` : "";
15866
+ return new Proxy(Object.freeze({}), {
15867
+ get(_, key) {
15868
+ if (key === Symbol.toPrimitive || key === "valueOf") {
15869
+ return (_hint) => token();
15870
+ }
15871
+ if (key === "toString") {
15872
+ return () => token();
15873
+ }
15874
+ if (typeof key !== "string")
15875
+ return;
15876
+ return createPromptInputProxy([...path, key]);
15877
+ }
15878
+ });
15879
+ }
15880
+ function createPromptTemplateContext() {
15881
+ return {
15882
+ input: createPromptInputProxy(["input"]),
15883
+ env: createPromptInputProxy(["env"]),
15884
+ boboddy: {
15885
+ artifactsDir: createPromptInputProxy([
15886
+ "boboddy",
15887
+ "artifactsDir"
15888
+ ])
15889
+ }
15890
+ };
15891
+ }
15892
+ function renderPromptTemplate(template, contextJson) {
15893
+ return template.replace(/\{\{([^}]+)\}\}/g, (_, path) => {
15894
+ const value = path.split(".").reduce((curr, key) => curr != null ? curr[key] : undefined, contextJson);
15895
+ return value != null ? String(value) : "";
15896
+ });
15897
+ }
15898
+
15899
+ // src/definitions/steps/define-step.ts
15900
+ function resolveZodSchemaAtPath(schema, path) {
15901
+ if (!schema)
15902
+ return;
15903
+ const segments = path.split(".");
15904
+ let current = schema;
15905
+ for (const segment of segments) {
15906
+ if (!current)
15907
+ return;
15908
+ current = unwrapZodWrappers(current);
15909
+ const def = current.def;
15910
+ if (!def || def.type !== "object" || !def.shape)
15911
+ return;
15912
+ current = def.shape[segment];
15913
+ }
15914
+ return current;
15915
+ }
15916
+ function zodTypeToSignalType(schema) {
15917
+ if (!schema)
15918
+ return;
15919
+ const unwrapped = unwrapZodWrappers(schema);
15920
+ const def = unwrapped.def;
15921
+ const typeName = def?.type;
15922
+ switch (typeName) {
15923
+ case "string":
15924
+ return "string";
15925
+ case "number":
15926
+ return "number";
15927
+ case "boolean":
15928
+ return "boolean";
15929
+ case "array":
15930
+ return "array";
15931
+ case "object":
15932
+ return "object";
15933
+ default:
15934
+ return;
15935
+ }
15936
+ }
15937
+ function unwrapZodWrappers(schema) {
15938
+ const def = schema.def;
15939
+ if (!def)
15940
+ return schema;
15941
+ if (def.type === "optional" || def.type === "nullable" || def.type === "default" || def.type === "catch") {
15942
+ if (def.innerType)
15943
+ return unwrapZodWrappers(def.innerType);
15944
+ }
15945
+ return schema;
15946
+ }
15947
+ function defineStep(config2) {
15948
+ const features = config2.features ?? [];
15949
+ let effectiveResult = config2.result;
15950
+ for (const feature of features) {
15951
+ effectiveResult = effectiveResult ? effectiveResult.extend(feature._resultExtension.shape) : feature._resultExtension;
15952
+ }
15953
+ const basePrompt = typeof config2.agentPrompt === "function" ? config2.agentPrompt(createPromptTemplateContext()) : config2.agentPrompt;
15954
+ let effectivePrompt = basePrompt;
15955
+ for (const feature of features) {
15956
+ if (feature._promptAddition) {
15957
+ effectivePrompt = effectivePrompt ? `${effectivePrompt}
15958
+
15959
+ ${feature._promptAddition}` : feature._promptAddition;
15960
+ }
15961
+ }
15962
+ const featureSignals = features.flatMap((f) => f._signals);
15963
+ const spec = {
15964
+ key: config2.key,
15965
+ name: config2.name,
15966
+ description: config2.description ?? null,
15967
+ version: config2.version ?? 1,
15968
+ kind: "user_defined",
15969
+ status: config2.status ?? "active",
15970
+ executionMode: config2.executionMode,
15971
+ prompt: effectivePrompt,
15972
+ inputSchemaJson: config2.additionalInput ? toJSONSchema(config2.additionalInput) : null,
15973
+ resultSchemaJson: effectiveResult ? toJSONSchema(effectiveResult) : null,
15974
+ signalExtractorDefinitions: [
15975
+ ...(config2.signals ?? []).map((s) => ({
15976
+ key: s.key ?? s.sourcePath,
15977
+ sourcePath: s.sourcePath,
15978
+ type: s.type ?? zodTypeToSignalType(resolveZodSchemaAtPath(effectiveResult, s.sourcePath)) ?? "string",
15979
+ required: s.required ?? true,
15980
+ availableWhenResultStatusIn: s.availableWhenResultStatusIn ?? null
15981
+ })),
15982
+ ...featureSignals.map((s) => ({
15983
+ key: s.key,
15984
+ sourcePath: s.sourcePath,
15985
+ type: s.type,
15986
+ required: s.required ?? true,
15987
+ availableWhenResultStatusIn: s.availableWhenResultStatusIn ?? null
15988
+ }))
15989
+ ],
15990
+ opencodeMcpJson: config2.mcpServers ?? null,
15991
+ opencodePluginJson: config2.plugins ?? null
15992
+ };
15993
+ return spec;
15994
+ }
15995
+ // src/definitions/steps/step-definitions-client.ts
15996
+ function createStepDefinitionsClient(baseUrl) {
15997
+ const client2 = createClient({ baseUrl });
15998
+ return buildStepDefinitionsClient(new StepDefinitions({ client: client2 }));
15999
+ }
16000
+ var buildStepDefinitionsClient = (stepDefinitions) => {
16001
+ return {
16002
+ listByProjectId: async (projectId, options) => {
16003
+ const result = await stepDefinitions.listStepDefinitions({
16004
+ query: { projectId },
16005
+ headers: options?.headers
16006
+ });
16007
+ if (result.error)
16008
+ throw new Error(JSON.stringify(result.error));
16009
+ return result.data;
16010
+ },
16011
+ create: async (body, options) => {
16012
+ const result = await stepDefinitions.createStepDefinition({
16013
+ body,
16014
+ headers: options?.headers
16015
+ });
16016
+ if (result.error)
16017
+ throw new Error(JSON.stringify(result.error));
16018
+ return result.data;
16019
+ },
16020
+ upsertFromSpec: async (projectId, spec, options) => {
16021
+ const body = {
16022
+ ...spec,
16023
+ prompt: spec.prompt ?? "",
16024
+ projectId
16025
+ };
16026
+ const result = await stepDefinitions.upsertStepDefinition({
16027
+ body,
16028
+ headers: options?.headers
16029
+ });
16030
+ if (result.error)
16031
+ throw new Error(JSON.stringify(result.error));
16032
+ return result.data;
16033
+ }
16034
+ };
16035
+ };
16032
16036
  // src/definitions/steps/step-features.ts
16033
16037
  var NOTIFICATION_SIGNAL_KEY = "$boboddy_notifications_v1";
16034
16038
  var NOTIFICATION_RESULT_KEY = "$boboddy_notifications_v1";
@@ -17177,6 +17181,7 @@ export {
17177
17181
  createInputAccessor,
17178
17182
  createBoboddyClient,
17179
17183
  buildPipelineSpec,
17184
+ artifactKindSchema,
17180
17185
  WorkItems,
17181
17186
  UserNotifications,
17182
17187
  StepExecutions,