@boboddy/sdk 0.2.1-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/client.js +64 -0
- package/dist/contracts/artifacts.d.ts +6 -0
- package/dist/contracts/artifacts.js +14297 -0
- package/dist/definitions/pipelines/index.js +28 -2
- package/dist/definitions/steps/define-step.d.ts +2 -0
- package/dist/definitions/steps/index.js +29 -2
- package/dist/definitions/steps/step-definitions-client.d.ts +3 -0
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +5 -1
- package/dist/generated/types.gen.d.ts +493 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +644 -575
- package/dist/opencode-mcp.js +2 -2
- package/dist/opencode-plugin.js +2 -2
- package/dist/push/index.js +29 -2
- package/dist/step-execution-plane-client.d.ts +39 -0
- package/package.json +5 -1
package/dist/index.js
CHANGED
|
@@ -937,6 +937,32 @@ class StepDefinitions extends HeyApiClient {
|
|
|
937
937
|
}
|
|
938
938
|
|
|
939
939
|
class StepExecutions extends HeyApiClient {
|
|
940
|
+
createArtifactUploadUrl(options) {
|
|
941
|
+
return (options.client ?? this.client).post({
|
|
942
|
+
url: "/api/step-executions/{stepExecutionId}/artifact-upload-url",
|
|
943
|
+
...options,
|
|
944
|
+
headers: {
|
|
945
|
+
"Content-Type": "application/json",
|
|
946
|
+
...options.headers
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
listStepExecutionArtifacts(options) {
|
|
951
|
+
return (options.client ?? this.client).get({ url: "/api/step-executions/{stepExecutionId}/artifacts", ...options });
|
|
952
|
+
}
|
|
953
|
+
recordStepExecutionArtifact(options) {
|
|
954
|
+
return (options.client ?? this.client).post({
|
|
955
|
+
url: "/api/step-executions/{stepExecutionId}/artifacts",
|
|
956
|
+
...options,
|
|
957
|
+
headers: {
|
|
958
|
+
"Content-Type": "application/json",
|
|
959
|
+
...options.headers
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
getArtifactDownloadUrl(options) {
|
|
964
|
+
return (options.client ?? this.client).get({ url: "/api/step-executions/{stepExecutionId}/artifacts/{artifactId}/download-url", ...options });
|
|
965
|
+
}
|
|
940
966
|
claimStepExecutions(options) {
|
|
941
967
|
return (options.client ?? this.client).post({
|
|
942
968
|
url: "/api/step-executions/claims",
|
|
@@ -1498,6 +1524,44 @@ var buildStepExecutionPlaneClient = (stepExecutions) => {
|
|
|
1498
1524
|
if (result.error)
|
|
1499
1525
|
throw new Error(JSON.stringify(result.error));
|
|
1500
1526
|
},
|
|
1527
|
+
createArtifactUploadUrl: async (stepExecutionId, body, options) => {
|
|
1528
|
+
const result = await stepExecutions.createArtifactUploadUrl({
|
|
1529
|
+
path: { stepExecutionId },
|
|
1530
|
+
body,
|
|
1531
|
+
headers: options?.headers
|
|
1532
|
+
});
|
|
1533
|
+
if (result.error)
|
|
1534
|
+
throw new Error(JSON.stringify(result.error));
|
|
1535
|
+
return result.data;
|
|
1536
|
+
},
|
|
1537
|
+
recordStepExecutionArtifact: async (stepExecutionId, body, options) => {
|
|
1538
|
+
const result = await stepExecutions.recordStepExecutionArtifact({
|
|
1539
|
+
path: { stepExecutionId },
|
|
1540
|
+
body,
|
|
1541
|
+
headers: options?.headers
|
|
1542
|
+
});
|
|
1543
|
+
if (result.error)
|
|
1544
|
+
throw new Error(JSON.stringify(result.error));
|
|
1545
|
+
return result.data;
|
|
1546
|
+
},
|
|
1547
|
+
listStepExecutionArtifacts: async (stepExecutionId, options) => {
|
|
1548
|
+
const result = await stepExecutions.listStepExecutionArtifacts({
|
|
1549
|
+
path: { stepExecutionId },
|
|
1550
|
+
headers: options?.headers
|
|
1551
|
+
});
|
|
1552
|
+
if (result.error)
|
|
1553
|
+
throw new Error(JSON.stringify(result.error));
|
|
1554
|
+
return result.data;
|
|
1555
|
+
},
|
|
1556
|
+
getArtifactDownloadUrl: async (stepExecutionId, artifactId, options) => {
|
|
1557
|
+
const result = await stepExecutions.getArtifactDownloadUrl({
|
|
1558
|
+
path: { stepExecutionId, artifactId },
|
|
1559
|
+
headers: options?.headers
|
|
1560
|
+
});
|
|
1561
|
+
if (result.error)
|
|
1562
|
+
throw new Error(JSON.stringify(result.error));
|
|
1563
|
+
return result.data;
|
|
1564
|
+
},
|
|
1501
1565
|
appendStepExecutionLogs: async (stepExecutionId, body, options) => {
|
|
1502
1566
|
const result = await stepExecutions.appendStepExecutionLogs({
|
|
1503
1567
|
path: { stepExecutionId },
|
|
@@ -1517,93 +1581,336 @@ function createBoboddyClient(baseUrl) {
|
|
|
1517
1581
|
return new BoboddyClient({ client: client2 });
|
|
1518
1582
|
}
|
|
1519
1583
|
|
|
1520
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/
|
|
1521
|
-
var
|
|
1522
|
-
__export(
|
|
1523
|
-
|
|
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,
|
|
1524
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,
|
|
1525
1605
|
treeifyError: () => treeifyError,
|
|
1606
|
+
transform: () => transform,
|
|
1607
|
+
toUpperCase: () => _toUpperCase,
|
|
1608
|
+
toLowerCase: () => _toLowerCase,
|
|
1526
1609
|
toJSONSchema: () => toJSONSchema,
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
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,
|
|
1534
1629
|
registry: () => registry,
|
|
1535
1630
|
regexes: () => exports_regexes,
|
|
1536
|
-
|
|
1631
|
+
regex: () => _regex,
|
|
1632
|
+
refine: () => refine,
|
|
1633
|
+
record: () => record,
|
|
1634
|
+
readonly: () => readonly,
|
|
1635
|
+
property: () => _property,
|
|
1636
|
+
promise: () => promise,
|
|
1537
1637
|
prettifyError: () => prettifyError,
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
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,
|
|
1541
1675
|
locales: () => exports_locales,
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
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,
|
|
1546
1700
|
globalRegistry: () => globalRegistry,
|
|
1547
|
-
|
|
1701
|
+
getErrorMap: () => getErrorMap,
|
|
1702
|
+
function: () => _function,
|
|
1703
|
+
fromJSONSchema: () => fromJSONSchema,
|
|
1548
1704
|
formatError: () => formatError,
|
|
1705
|
+
float64: () => float64,
|
|
1706
|
+
float32: () => float32,
|
|
1549
1707
|
flattenError: () => flattenError,
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
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,
|
|
1559
1726
|
config: () => config,
|
|
1727
|
+
coerce: () => exports_coerce,
|
|
1728
|
+
codec: () => codec,
|
|
1560
1729
|
clone: () => clone,
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
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
|
+
|
|
1827
|
+
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/index.js
|
|
1828
|
+
var exports_core2 = {};
|
|
1829
|
+
__export(exports_core2, {
|
|
1830
|
+
version: () => version,
|
|
1831
|
+
util: () => exports_util,
|
|
1832
|
+
treeifyError: () => treeifyError,
|
|
1833
|
+
toJSONSchema: () => toJSONSchema,
|
|
1834
|
+
toDotPath: () => toDotPath,
|
|
1835
|
+
safeParseAsync: () => safeParseAsync,
|
|
1836
|
+
safeParse: () => safeParse,
|
|
1837
|
+
safeEncodeAsync: () => safeEncodeAsync,
|
|
1838
|
+
safeEncode: () => safeEncode,
|
|
1839
|
+
safeDecodeAsync: () => safeDecodeAsync,
|
|
1840
|
+
safeDecode: () => safeDecode,
|
|
1841
|
+
registry: () => registry,
|
|
1842
|
+
regexes: () => exports_regexes,
|
|
1843
|
+
process: () => process,
|
|
1844
|
+
prettifyError: () => prettifyError,
|
|
1845
|
+
parseAsync: () => parseAsync,
|
|
1846
|
+
parse: () => parse,
|
|
1847
|
+
meta: () => meta,
|
|
1848
|
+
locales: () => exports_locales,
|
|
1849
|
+
isValidJWT: () => isValidJWT,
|
|
1850
|
+
isValidBase64URL: () => isValidBase64URL,
|
|
1851
|
+
isValidBase64: () => isValidBase64,
|
|
1852
|
+
initializeContext: () => initializeContext,
|
|
1853
|
+
globalRegistry: () => globalRegistry,
|
|
1854
|
+
globalConfig: () => globalConfig,
|
|
1855
|
+
formatError: () => formatError,
|
|
1856
|
+
flattenError: () => flattenError,
|
|
1857
|
+
finalize: () => finalize,
|
|
1858
|
+
extractDefs: () => extractDefs,
|
|
1859
|
+
encodeAsync: () => encodeAsync,
|
|
1860
|
+
encode: () => encode,
|
|
1861
|
+
describe: () => describe,
|
|
1862
|
+
decodeAsync: () => decodeAsync,
|
|
1863
|
+
decode: () => decode,
|
|
1864
|
+
createToJSONSchemaMethod: () => createToJSONSchemaMethod,
|
|
1865
|
+
createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
|
|
1866
|
+
config: () => config,
|
|
1867
|
+
clone: () => clone,
|
|
1868
|
+
_xor: () => _xor,
|
|
1869
|
+
_xid: () => _xid,
|
|
1870
|
+
_void: () => _void,
|
|
1871
|
+
_uuidv7: () => _uuidv7,
|
|
1872
|
+
_uuidv6: () => _uuidv6,
|
|
1873
|
+
_uuidv4: () => _uuidv4,
|
|
1874
|
+
_uuid: () => _uuid,
|
|
1875
|
+
_url: () => _url,
|
|
1876
|
+
_uppercase: () => _uppercase,
|
|
1877
|
+
_unknown: () => _unknown,
|
|
1878
|
+
_union: () => _union,
|
|
1879
|
+
_undefined: () => _undefined2,
|
|
1880
|
+
_ulid: () => _ulid,
|
|
1881
|
+
_uint64: () => _uint64,
|
|
1882
|
+
_uint32: () => _uint32,
|
|
1883
|
+
_tuple: () => _tuple,
|
|
1884
|
+
_trim: () => _trim,
|
|
1885
|
+
_transform: () => _transform,
|
|
1886
|
+
_toUpperCase: () => _toUpperCase,
|
|
1887
|
+
_toLowerCase: () => _toLowerCase,
|
|
1888
|
+
_templateLiteral: () => _templateLiteral,
|
|
1889
|
+
_symbol: () => _symbol,
|
|
1890
|
+
_superRefine: () => _superRefine,
|
|
1891
|
+
_success: () => _success,
|
|
1892
|
+
_stringbool: () => _stringbool,
|
|
1893
|
+
_stringFormat: () => _stringFormat,
|
|
1894
|
+
_string: () => _string,
|
|
1895
|
+
_startsWith: () => _startsWith,
|
|
1896
|
+
_slugify: () => _slugify,
|
|
1897
|
+
_size: () => _size,
|
|
1898
|
+
_set: () => _set,
|
|
1899
|
+
_safeParseAsync: () => _safeParseAsync,
|
|
1900
|
+
_safeParse: () => _safeParse,
|
|
1901
|
+
_safeEncodeAsync: () => _safeEncodeAsync,
|
|
1902
|
+
_safeEncode: () => _safeEncode,
|
|
1903
|
+
_safeDecodeAsync: () => _safeDecodeAsync,
|
|
1904
|
+
_safeDecode: () => _safeDecode,
|
|
1905
|
+
_regex: () => _regex,
|
|
1906
|
+
_refine: () => _refine,
|
|
1907
|
+
_record: () => _record,
|
|
1908
|
+
_readonly: () => _readonly,
|
|
1909
|
+
_property: () => _property,
|
|
1910
|
+
_promise: () => _promise,
|
|
1911
|
+
_positive: () => _positive,
|
|
1912
|
+
_pipe: () => _pipe,
|
|
1913
|
+
_parseAsync: () => _parseAsync,
|
|
1607
1914
|
_parse: () => _parse,
|
|
1608
1915
|
_overwrite: () => _overwrite,
|
|
1609
1916
|
_optional: () => _optional,
|
|
@@ -12738,7 +13045,7 @@ function finalize(ctx, schema) {
|
|
|
12738
13045
|
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
12739
13046
|
} else if (ctx.target === "draft-04") {
|
|
12740
13047
|
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
12741
|
-
} else if (ctx.target === "openapi-3.0") {}
|
|
13048
|
+
} else if (ctx.target === "openapi-3.0") {} else {}
|
|
12742
13049
|
if (ctx.external?.uri) {
|
|
12743
13050
|
const id = ctx.external.registry.get(schema)?.id;
|
|
12744
13051
|
if (!id)
|
|
@@ -12982,7 +13289,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
12982
13289
|
if (val === undefined) {
|
|
12983
13290
|
if (ctx.unrepresentable === "throw") {
|
|
12984
13291
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
12985
|
-
}
|
|
13292
|
+
} else {}
|
|
12986
13293
|
} else if (typeof val === "bigint") {
|
|
12987
13294
|
if (ctx.unrepresentable === "throw") {
|
|
12988
13295
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
@@ -13367,504 +13674,89 @@ function toJSONSchema(input, params) {
|
|
|
13367
13674
|
const schemas = {};
|
|
13368
13675
|
const external = {
|
|
13369
13676
|
registry: registry2,
|
|
13370
|
-
uri: params?.uri,
|
|
13371
|
-
defs
|
|
13372
|
-
};
|
|
13373
|
-
ctx2.external = external;
|
|
13374
|
-
for (const entry of registry2._idmap.entries()) {
|
|
13375
|
-
const [key, schema] = entry;
|
|
13376
|
-
extractDefs(ctx2, schema);
|
|
13377
|
-
schemas[key] = finalize(ctx2, schema);
|
|
13378
|
-
}
|
|
13379
|
-
if (Object.keys(defs).length > 0) {
|
|
13380
|
-
const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
13381
|
-
schemas.__shared = {
|
|
13382
|
-
[defsSegment]: defs
|
|
13383
|
-
};
|
|
13384
|
-
}
|
|
13385
|
-
return { schemas };
|
|
13386
|
-
}
|
|
13387
|
-
const ctx = initializeContext({ ...params, processors: allProcessors });
|
|
13388
|
-
process(input, ctx);
|
|
13389
|
-
extractDefs(ctx, input);
|
|
13390
|
-
return finalize(ctx, input);
|
|
13391
|
-
}
|
|
13392
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
|
|
13393
|
-
class JSONSchemaGenerator {
|
|
13394
|
-
get metadataRegistry() {
|
|
13395
|
-
return this.ctx.metadataRegistry;
|
|
13396
|
-
}
|
|
13397
|
-
get target() {
|
|
13398
|
-
return this.ctx.target;
|
|
13399
|
-
}
|
|
13400
|
-
get unrepresentable() {
|
|
13401
|
-
return this.ctx.unrepresentable;
|
|
13402
|
-
}
|
|
13403
|
-
get override() {
|
|
13404
|
-
return this.ctx.override;
|
|
13405
|
-
}
|
|
13406
|
-
get io() {
|
|
13407
|
-
return this.ctx.io;
|
|
13408
|
-
}
|
|
13409
|
-
get counter() {
|
|
13410
|
-
return this.ctx.counter;
|
|
13411
|
-
}
|
|
13412
|
-
set counter(value) {
|
|
13413
|
-
this.ctx.counter = value;
|
|
13414
|
-
}
|
|
13415
|
-
get seen() {
|
|
13416
|
-
return this.ctx.seen;
|
|
13417
|
-
}
|
|
13418
|
-
constructor(params) {
|
|
13419
|
-
let normalizedTarget = params?.target ?? "draft-2020-12";
|
|
13420
|
-
if (normalizedTarget === "draft-4")
|
|
13421
|
-
normalizedTarget = "draft-04";
|
|
13422
|
-
if (normalizedTarget === "draft-7")
|
|
13423
|
-
normalizedTarget = "draft-07";
|
|
13424
|
-
this.ctx = initializeContext({
|
|
13425
|
-
processors: allProcessors,
|
|
13426
|
-
target: normalizedTarget,
|
|
13427
|
-
...params?.metadata && { metadata: params.metadata },
|
|
13428
|
-
...params?.unrepresentable && { unrepresentable: params.unrepresentable },
|
|
13429
|
-
...params?.override && { override: params.override },
|
|
13430
|
-
...params?.io && { io: params.io }
|
|
13431
|
-
});
|
|
13432
|
-
}
|
|
13433
|
-
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
13434
|
-
return process(schema, this.ctx, _params);
|
|
13435
|
-
}
|
|
13436
|
-
emit(schema, _params) {
|
|
13437
|
-
if (_params) {
|
|
13438
|
-
if (_params.cycles)
|
|
13439
|
-
this.ctx.cycles = _params.cycles;
|
|
13440
|
-
if (_params.reused)
|
|
13441
|
-
this.ctx.reused = _params.reused;
|
|
13442
|
-
if (_params.external)
|
|
13443
|
-
this.ctx.external = _params.external;
|
|
13444
|
-
}
|
|
13445
|
-
extractDefs(this.ctx, schema);
|
|
13446
|
-
const result = finalize(this.ctx, schema);
|
|
13447
|
-
const { "~standard": _, ...plainResult } = result;
|
|
13448
|
-
return plainResult;
|
|
13449
|
-
}
|
|
13450
|
-
}
|
|
13451
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
13452
|
-
var exports_json_schema = {};
|
|
13453
|
-
// src/definitions/steps/prompt-template.ts
|
|
13454
|
-
function createPromptInputProxy(path = []) {
|
|
13455
|
-
const token = () => path.length ? `{{${path.join(".")}}}` : "";
|
|
13456
|
-
return new Proxy(Object.freeze({}), {
|
|
13457
|
-
get(_, key) {
|
|
13458
|
-
if (key === Symbol.toPrimitive || key === "valueOf") {
|
|
13459
|
-
return (_hint) => token();
|
|
13460
|
-
}
|
|
13461
|
-
if (key === "toString") {
|
|
13462
|
-
return () => token();
|
|
13463
|
-
}
|
|
13464
|
-
if (typeof key !== "string")
|
|
13465
|
-
return;
|
|
13466
|
-
return createPromptInputProxy([...path, key]);
|
|
13467
|
-
}
|
|
13468
|
-
});
|
|
13469
|
-
}
|
|
13470
|
-
function createPromptTemplateContext() {
|
|
13471
|
-
return {
|
|
13472
|
-
input: createPromptInputProxy(["input"]),
|
|
13473
|
-
env: createPromptInputProxy(["env"]),
|
|
13474
|
-
boboddy: {
|
|
13475
|
-
artifactsDir: createPromptInputProxy([
|
|
13476
|
-
"boboddy",
|
|
13477
|
-
"artifactsDir"
|
|
13478
|
-
])
|
|
13479
|
-
}
|
|
13480
|
-
};
|
|
13481
|
-
}
|
|
13482
|
-
function renderPromptTemplate(template, contextJson) {
|
|
13483
|
-
return template.replace(/\{\{([^}]+)\}\}/g, (_, path) => {
|
|
13484
|
-
const value = path.split(".").reduce((curr, key) => curr != null ? curr[key] : undefined, contextJson);
|
|
13485
|
-
return value != null ? String(value) : "";
|
|
13486
|
-
});
|
|
13487
|
-
}
|
|
13488
|
-
|
|
13489
|
-
// src/definitions/steps/define-step.ts
|
|
13490
|
-
function resolveZodSchemaAtPath(schema, path) {
|
|
13491
|
-
if (!schema)
|
|
13492
|
-
return;
|
|
13493
|
-
const segments = path.split(".");
|
|
13494
|
-
let current = schema;
|
|
13495
|
-
for (const segment of segments) {
|
|
13496
|
-
if (!current)
|
|
13497
|
-
return;
|
|
13498
|
-
current = unwrapZodWrappers(current);
|
|
13499
|
-
const def = current.def;
|
|
13500
|
-
if (!def || def.type !== "object" || !def.shape)
|
|
13501
|
-
return;
|
|
13502
|
-
current = def.shape[segment];
|
|
13503
|
-
}
|
|
13504
|
-
return current;
|
|
13505
|
-
}
|
|
13506
|
-
function zodTypeToSignalType(schema) {
|
|
13507
|
-
if (!schema)
|
|
13508
|
-
return;
|
|
13509
|
-
const unwrapped = unwrapZodWrappers(schema);
|
|
13510
|
-
const def = unwrapped.def;
|
|
13511
|
-
const typeName = def?.type;
|
|
13512
|
-
switch (typeName) {
|
|
13513
|
-
case "string":
|
|
13514
|
-
return "string";
|
|
13515
|
-
case "number":
|
|
13516
|
-
return "number";
|
|
13517
|
-
case "boolean":
|
|
13518
|
-
return "boolean";
|
|
13519
|
-
case "array":
|
|
13520
|
-
return "array";
|
|
13521
|
-
case "object":
|
|
13522
|
-
return "object";
|
|
13523
|
-
default:
|
|
13524
|
-
return;
|
|
13525
|
-
}
|
|
13526
|
-
}
|
|
13527
|
-
function unwrapZodWrappers(schema) {
|
|
13528
|
-
const def = schema.def;
|
|
13529
|
-
if (!def)
|
|
13530
|
-
return schema;
|
|
13531
|
-
if (def.type === "optional" || def.type === "nullable" || def.type === "default" || def.type === "catch") {
|
|
13532
|
-
if (def.innerType)
|
|
13533
|
-
return unwrapZodWrappers(def.innerType);
|
|
13534
|
-
}
|
|
13535
|
-
return schema;
|
|
13536
|
-
}
|
|
13537
|
-
function defineStep(config2) {
|
|
13538
|
-
const features = config2.features ?? [];
|
|
13539
|
-
let effectiveResult = config2.result;
|
|
13540
|
-
for (const feature of features) {
|
|
13541
|
-
effectiveResult = effectiveResult ? effectiveResult.extend(feature._resultExtension.shape) : feature._resultExtension;
|
|
13542
|
-
}
|
|
13543
|
-
const basePrompt = typeof config2.agentPrompt === "function" ? config2.agentPrompt(createPromptTemplateContext()) : config2.agentPrompt;
|
|
13544
|
-
let effectivePrompt = basePrompt;
|
|
13545
|
-
for (const feature of features) {
|
|
13546
|
-
if (feature._promptAddition) {
|
|
13547
|
-
effectivePrompt = effectivePrompt ? `${effectivePrompt}
|
|
13548
|
-
|
|
13549
|
-
${feature._promptAddition}` : feature._promptAddition;
|
|
13550
|
-
}
|
|
13551
|
-
}
|
|
13552
|
-
const featureSignals = features.flatMap((f) => f._signals);
|
|
13553
|
-
const spec = {
|
|
13554
|
-
key: config2.key,
|
|
13555
|
-
name: config2.name,
|
|
13556
|
-
description: config2.description ?? null,
|
|
13557
|
-
version: config2.version ?? 1,
|
|
13558
|
-
kind: "user_defined",
|
|
13559
|
-
status: config2.status ?? "active",
|
|
13560
|
-
prompt: effectivePrompt,
|
|
13561
|
-
inputSchemaJson: config2.additionalInput ? toJSONSchema(config2.additionalInput) : null,
|
|
13562
|
-
resultSchemaJson: effectiveResult ? toJSONSchema(effectiveResult) : null,
|
|
13563
|
-
signalExtractorDefinitions: [
|
|
13564
|
-
...(config2.signals ?? []).map((s) => ({
|
|
13565
|
-
key: s.key ?? s.sourcePath,
|
|
13566
|
-
sourcePath: s.sourcePath,
|
|
13567
|
-
type: s.type ?? zodTypeToSignalType(resolveZodSchemaAtPath(effectiveResult, s.sourcePath)) ?? "string",
|
|
13568
|
-
required: s.required ?? true,
|
|
13569
|
-
availableWhenResultStatusIn: s.availableWhenResultStatusIn ?? null
|
|
13570
|
-
})),
|
|
13571
|
-
...featureSignals.map((s) => ({
|
|
13572
|
-
key: s.key,
|
|
13573
|
-
sourcePath: s.sourcePath,
|
|
13574
|
-
type: s.type,
|
|
13575
|
-
required: s.required ?? true,
|
|
13576
|
-
availableWhenResultStatusIn: s.availableWhenResultStatusIn ?? null
|
|
13577
|
-
}))
|
|
13578
|
-
],
|
|
13579
|
-
opencodeMcpJson: config2.mcpServers ?? null,
|
|
13580
|
-
opencodePluginJson: config2.plugins ?? null
|
|
13581
|
-
};
|
|
13582
|
-
return spec;
|
|
13583
|
-
}
|
|
13584
|
-
// src/definitions/steps/step-definitions-client.ts
|
|
13585
|
-
function createStepDefinitionsClient(baseUrl) {
|
|
13586
|
-
const client2 = createClient({ baseUrl });
|
|
13587
|
-
return buildStepDefinitionsClient(new StepDefinitions({ client: client2 }));
|
|
13588
|
-
}
|
|
13589
|
-
var buildStepDefinitionsClient = (stepDefinitions) => {
|
|
13590
|
-
return {
|
|
13591
|
-
listByProjectId: async (projectId, options) => {
|
|
13592
|
-
const result = await stepDefinitions.listStepDefinitions({
|
|
13593
|
-
query: { projectId },
|
|
13594
|
-
headers: options?.headers
|
|
13595
|
-
});
|
|
13596
|
-
if (result.error)
|
|
13597
|
-
throw new Error(JSON.stringify(result.error));
|
|
13598
|
-
return result.data;
|
|
13599
|
-
},
|
|
13600
|
-
create: async (body, options) => {
|
|
13601
|
-
const result = await stepDefinitions.createStepDefinition({
|
|
13602
|
-
body,
|
|
13603
|
-
headers: options?.headers
|
|
13604
|
-
});
|
|
13605
|
-
if (result.error)
|
|
13606
|
-
throw new Error(JSON.stringify(result.error));
|
|
13607
|
-
return result.data;
|
|
13608
|
-
},
|
|
13609
|
-
upsertFromSpec: async (projectId, spec, options) => {
|
|
13610
|
-
const body = {
|
|
13611
|
-
...spec,
|
|
13612
|
-
prompt: spec.prompt ?? "",
|
|
13613
|
-
projectId
|
|
13614
|
-
};
|
|
13615
|
-
const result = await stepDefinitions.upsertStepDefinition({
|
|
13616
|
-
body,
|
|
13617
|
-
headers: options?.headers
|
|
13618
|
-
});
|
|
13619
|
-
if (result.error)
|
|
13620
|
-
throw new Error(JSON.stringify(result.error));
|
|
13621
|
-
return result.data;
|
|
13622
|
-
}
|
|
13623
|
-
};
|
|
13624
|
-
};
|
|
13625
|
-
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
13626
|
-
var exports_external = {};
|
|
13627
|
-
__export(exports_external, {
|
|
13628
|
-
xor: () => xor,
|
|
13629
|
-
xid: () => xid2,
|
|
13630
|
-
void: () => _void2,
|
|
13631
|
-
uuidv7: () => uuidv7,
|
|
13632
|
-
uuidv6: () => uuidv6,
|
|
13633
|
-
uuidv4: () => uuidv4,
|
|
13634
|
-
uuid: () => uuid2,
|
|
13635
|
-
util: () => exports_util,
|
|
13636
|
-
url: () => url,
|
|
13637
|
-
uppercase: () => _uppercase,
|
|
13638
|
-
unknown: () => unknown,
|
|
13639
|
-
union: () => union,
|
|
13640
|
-
undefined: () => _undefined3,
|
|
13641
|
-
ulid: () => ulid2,
|
|
13642
|
-
uint64: () => uint64,
|
|
13643
|
-
uint32: () => uint32,
|
|
13644
|
-
tuple: () => tuple,
|
|
13645
|
-
trim: () => _trim,
|
|
13646
|
-
treeifyError: () => treeifyError,
|
|
13647
|
-
transform: () => transform,
|
|
13648
|
-
toUpperCase: () => _toUpperCase,
|
|
13649
|
-
toLowerCase: () => _toLowerCase,
|
|
13650
|
-
toJSONSchema: () => toJSONSchema,
|
|
13651
|
-
templateLiteral: () => templateLiteral,
|
|
13652
|
-
symbol: () => symbol,
|
|
13653
|
-
superRefine: () => superRefine,
|
|
13654
|
-
success: () => success,
|
|
13655
|
-
stringbool: () => stringbool,
|
|
13656
|
-
stringFormat: () => stringFormat,
|
|
13657
|
-
string: () => string2,
|
|
13658
|
-
strictObject: () => strictObject,
|
|
13659
|
-
startsWith: () => _startsWith,
|
|
13660
|
-
slugify: () => _slugify,
|
|
13661
|
-
size: () => _size,
|
|
13662
|
-
setErrorMap: () => setErrorMap,
|
|
13663
|
-
set: () => set,
|
|
13664
|
-
safeParseAsync: () => safeParseAsync2,
|
|
13665
|
-
safeParse: () => safeParse2,
|
|
13666
|
-
safeEncodeAsync: () => safeEncodeAsync2,
|
|
13667
|
-
safeEncode: () => safeEncode2,
|
|
13668
|
-
safeDecodeAsync: () => safeDecodeAsync2,
|
|
13669
|
-
safeDecode: () => safeDecode2,
|
|
13670
|
-
registry: () => registry,
|
|
13671
|
-
regexes: () => exports_regexes,
|
|
13672
|
-
regex: () => _regex,
|
|
13673
|
-
refine: () => refine,
|
|
13674
|
-
record: () => record,
|
|
13675
|
-
readonly: () => readonly,
|
|
13676
|
-
property: () => _property,
|
|
13677
|
-
promise: () => promise,
|
|
13678
|
-
prettifyError: () => prettifyError,
|
|
13679
|
-
preprocess: () => preprocess,
|
|
13680
|
-
prefault: () => prefault,
|
|
13681
|
-
positive: () => _positive,
|
|
13682
|
-
pipe: () => pipe,
|
|
13683
|
-
partialRecord: () => partialRecord,
|
|
13684
|
-
parseAsync: () => parseAsync2,
|
|
13685
|
-
parse: () => parse3,
|
|
13686
|
-
overwrite: () => _overwrite,
|
|
13687
|
-
optional: () => optional,
|
|
13688
|
-
object: () => object,
|
|
13689
|
-
number: () => number2,
|
|
13690
|
-
nullish: () => nullish2,
|
|
13691
|
-
nullable: () => nullable,
|
|
13692
|
-
null: () => _null3,
|
|
13693
|
-
normalize: () => _normalize,
|
|
13694
|
-
nonpositive: () => _nonpositive,
|
|
13695
|
-
nonoptional: () => nonoptional,
|
|
13696
|
-
nonnegative: () => _nonnegative,
|
|
13697
|
-
never: () => never,
|
|
13698
|
-
negative: () => _negative,
|
|
13699
|
-
nativeEnum: () => nativeEnum,
|
|
13700
|
-
nanoid: () => nanoid2,
|
|
13701
|
-
nan: () => nan,
|
|
13702
|
-
multipleOf: () => _multipleOf,
|
|
13703
|
-
minSize: () => _minSize,
|
|
13704
|
-
minLength: () => _minLength,
|
|
13705
|
-
mime: () => _mime,
|
|
13706
|
-
meta: () => meta2,
|
|
13707
|
-
maxSize: () => _maxSize,
|
|
13708
|
-
maxLength: () => _maxLength,
|
|
13709
|
-
map: () => map,
|
|
13710
|
-
mac: () => mac2,
|
|
13711
|
-
lte: () => _lte,
|
|
13712
|
-
lt: () => _lt,
|
|
13713
|
-
lowercase: () => _lowercase,
|
|
13714
|
-
looseRecord: () => looseRecord,
|
|
13715
|
-
looseObject: () => looseObject,
|
|
13716
|
-
locales: () => exports_locales,
|
|
13717
|
-
literal: () => literal,
|
|
13718
|
-
length: () => _length,
|
|
13719
|
-
lazy: () => lazy,
|
|
13720
|
-
ksuid: () => ksuid2,
|
|
13721
|
-
keyof: () => keyof,
|
|
13722
|
-
jwt: () => jwt,
|
|
13723
|
-
json: () => json,
|
|
13724
|
-
iso: () => exports_iso,
|
|
13725
|
-
ipv6: () => ipv62,
|
|
13726
|
-
ipv4: () => ipv42,
|
|
13727
|
-
invertCodec: () => invertCodec,
|
|
13728
|
-
intersection: () => intersection,
|
|
13729
|
-
int64: () => int64,
|
|
13730
|
-
int32: () => int32,
|
|
13731
|
-
int: () => int,
|
|
13732
|
-
instanceof: () => _instanceof,
|
|
13733
|
-
includes: () => _includes,
|
|
13734
|
-
httpUrl: () => httpUrl,
|
|
13735
|
-
hostname: () => hostname2,
|
|
13736
|
-
hex: () => hex2,
|
|
13737
|
-
hash: () => hash,
|
|
13738
|
-
guid: () => guid2,
|
|
13739
|
-
gte: () => _gte,
|
|
13740
|
-
gt: () => _gt,
|
|
13741
|
-
globalRegistry: () => globalRegistry,
|
|
13742
|
-
getErrorMap: () => getErrorMap,
|
|
13743
|
-
function: () => _function,
|
|
13744
|
-
fromJSONSchema: () => fromJSONSchema,
|
|
13745
|
-
formatError: () => formatError,
|
|
13746
|
-
float64: () => float64,
|
|
13747
|
-
float32: () => float32,
|
|
13748
|
-
flattenError: () => flattenError,
|
|
13749
|
-
file: () => file,
|
|
13750
|
-
exactOptional: () => exactOptional,
|
|
13751
|
-
enum: () => _enum2,
|
|
13752
|
-
endsWith: () => _endsWith,
|
|
13753
|
-
encodeAsync: () => encodeAsync2,
|
|
13754
|
-
encode: () => encode2,
|
|
13755
|
-
emoji: () => emoji2,
|
|
13756
|
-
email: () => email2,
|
|
13757
|
-
e164: () => e1642,
|
|
13758
|
-
discriminatedUnion: () => discriminatedUnion,
|
|
13759
|
-
describe: () => describe2,
|
|
13760
|
-
decodeAsync: () => decodeAsync2,
|
|
13761
|
-
decode: () => decode2,
|
|
13762
|
-
date: () => date3,
|
|
13763
|
-
custom: () => custom,
|
|
13764
|
-
cuid2: () => cuid22,
|
|
13765
|
-
cuid: () => cuid3,
|
|
13766
|
-
core: () => exports_core2,
|
|
13767
|
-
config: () => config,
|
|
13768
|
-
coerce: () => exports_coerce,
|
|
13769
|
-
codec: () => codec,
|
|
13770
|
-
clone: () => clone,
|
|
13771
|
-
cidrv6: () => cidrv62,
|
|
13772
|
-
cidrv4: () => cidrv42,
|
|
13773
|
-
check: () => check,
|
|
13774
|
-
catch: () => _catch2,
|
|
13775
|
-
boolean: () => boolean2,
|
|
13776
|
-
bigint: () => bigint2,
|
|
13777
|
-
base64url: () => base64url2,
|
|
13778
|
-
base64: () => base642,
|
|
13779
|
-
array: () => array,
|
|
13780
|
-
any: () => any,
|
|
13781
|
-
_function: () => _function,
|
|
13782
|
-
_default: () => _default2,
|
|
13783
|
-
_ZodString: () => _ZodString,
|
|
13784
|
-
ZodXor: () => ZodXor,
|
|
13785
|
-
ZodXID: () => ZodXID,
|
|
13786
|
-
ZodVoid: () => ZodVoid,
|
|
13787
|
-
ZodUnknown: () => ZodUnknown,
|
|
13788
|
-
ZodUnion: () => ZodUnion,
|
|
13789
|
-
ZodUndefined: () => ZodUndefined,
|
|
13790
|
-
ZodUUID: () => ZodUUID,
|
|
13791
|
-
ZodURL: () => ZodURL,
|
|
13792
|
-
ZodULID: () => ZodULID,
|
|
13793
|
-
ZodType: () => ZodType,
|
|
13794
|
-
ZodTuple: () => ZodTuple,
|
|
13795
|
-
ZodTransform: () => ZodTransform,
|
|
13796
|
-
ZodTemplateLiteral: () => ZodTemplateLiteral,
|
|
13797
|
-
ZodSymbol: () => ZodSymbol,
|
|
13798
|
-
ZodSuccess: () => ZodSuccess,
|
|
13799
|
-
ZodStringFormat: () => ZodStringFormat,
|
|
13800
|
-
ZodString: () => ZodString,
|
|
13801
|
-
ZodSet: () => ZodSet,
|
|
13802
|
-
ZodRecord: () => ZodRecord,
|
|
13803
|
-
ZodRealError: () => ZodRealError,
|
|
13804
|
-
ZodReadonly: () => ZodReadonly,
|
|
13805
|
-
ZodPromise: () => ZodPromise,
|
|
13806
|
-
ZodPreprocess: () => ZodPreprocess,
|
|
13807
|
-
ZodPrefault: () => ZodPrefault,
|
|
13808
|
-
ZodPipe: () => ZodPipe,
|
|
13809
|
-
ZodOptional: () => ZodOptional,
|
|
13810
|
-
ZodObject: () => ZodObject,
|
|
13811
|
-
ZodNumberFormat: () => ZodNumberFormat,
|
|
13812
|
-
ZodNumber: () => ZodNumber,
|
|
13813
|
-
ZodNullable: () => ZodNullable,
|
|
13814
|
-
ZodNull: () => ZodNull,
|
|
13815
|
-
ZodNonOptional: () => ZodNonOptional,
|
|
13816
|
-
ZodNever: () => ZodNever,
|
|
13817
|
-
ZodNanoID: () => ZodNanoID,
|
|
13818
|
-
ZodNaN: () => ZodNaN,
|
|
13819
|
-
ZodMap: () => ZodMap,
|
|
13820
|
-
ZodMAC: () => ZodMAC,
|
|
13821
|
-
ZodLiteral: () => ZodLiteral,
|
|
13822
|
-
ZodLazy: () => ZodLazy,
|
|
13823
|
-
ZodKSUID: () => ZodKSUID,
|
|
13824
|
-
ZodJWT: () => ZodJWT,
|
|
13825
|
-
ZodIssueCode: () => ZodIssueCode,
|
|
13826
|
-
ZodIntersection: () => ZodIntersection,
|
|
13827
|
-
ZodISOTime: () => ZodISOTime,
|
|
13828
|
-
ZodISODuration: () => ZodISODuration,
|
|
13829
|
-
ZodISODateTime: () => ZodISODateTime,
|
|
13830
|
-
ZodISODate: () => ZodISODate,
|
|
13831
|
-
ZodIPv6: () => ZodIPv6,
|
|
13832
|
-
ZodIPv4: () => ZodIPv4,
|
|
13833
|
-
ZodGUID: () => ZodGUID,
|
|
13834
|
-
ZodFunction: () => ZodFunction,
|
|
13835
|
-
ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
|
|
13836
|
-
ZodFile: () => ZodFile,
|
|
13837
|
-
ZodExactOptional: () => ZodExactOptional,
|
|
13838
|
-
ZodError: () => ZodError,
|
|
13839
|
-
ZodEnum: () => ZodEnum,
|
|
13840
|
-
ZodEmoji: () => ZodEmoji,
|
|
13841
|
-
ZodEmail: () => ZodEmail,
|
|
13842
|
-
ZodE164: () => ZodE164,
|
|
13843
|
-
ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
|
|
13844
|
-
ZodDefault: () => ZodDefault,
|
|
13845
|
-
ZodDate: () => ZodDate,
|
|
13846
|
-
ZodCustomStringFormat: () => ZodCustomStringFormat,
|
|
13847
|
-
ZodCustom: () => ZodCustom,
|
|
13848
|
-
ZodCodec: () => ZodCodec,
|
|
13849
|
-
ZodCatch: () => ZodCatch,
|
|
13850
|
-
ZodCUID2: () => ZodCUID2,
|
|
13851
|
-
ZodCUID: () => ZodCUID,
|
|
13852
|
-
ZodCIDRv6: () => ZodCIDRv6,
|
|
13853
|
-
ZodCIDRv4: () => ZodCIDRv4,
|
|
13854
|
-
ZodBoolean: () => ZodBoolean,
|
|
13855
|
-
ZodBigIntFormat: () => ZodBigIntFormat,
|
|
13856
|
-
ZodBigInt: () => ZodBigInt,
|
|
13857
|
-
ZodBase64URL: () => ZodBase64URL,
|
|
13858
|
-
ZodBase64: () => ZodBase64,
|
|
13859
|
-
ZodArray: () => ZodArray,
|
|
13860
|
-
ZodAny: () => ZodAny,
|
|
13861
|
-
TimePrecision: () => TimePrecision,
|
|
13862
|
-
NEVER: () => NEVER,
|
|
13863
|
-
$output: () => $output,
|
|
13864
|
-
$input: () => $input,
|
|
13865
|
-
$brand: () => $brand
|
|
13866
|
-
});
|
|
13867
|
-
|
|
13677
|
+
uri: params?.uri,
|
|
13678
|
+
defs
|
|
13679
|
+
};
|
|
13680
|
+
ctx2.external = external;
|
|
13681
|
+
for (const entry of registry2._idmap.entries()) {
|
|
13682
|
+
const [key, schema] = entry;
|
|
13683
|
+
extractDefs(ctx2, schema);
|
|
13684
|
+
schemas[key] = finalize(ctx2, schema);
|
|
13685
|
+
}
|
|
13686
|
+
if (Object.keys(defs).length > 0) {
|
|
13687
|
+
const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
13688
|
+
schemas.__shared = {
|
|
13689
|
+
[defsSegment]: defs
|
|
13690
|
+
};
|
|
13691
|
+
}
|
|
13692
|
+
return { schemas };
|
|
13693
|
+
}
|
|
13694
|
+
const ctx = initializeContext({ ...params, processors: allProcessors });
|
|
13695
|
+
process(input, ctx);
|
|
13696
|
+
extractDefs(ctx, input);
|
|
13697
|
+
return finalize(ctx, input);
|
|
13698
|
+
}
|
|
13699
|
+
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
|
|
13700
|
+
class JSONSchemaGenerator {
|
|
13701
|
+
get metadataRegistry() {
|
|
13702
|
+
return this.ctx.metadataRegistry;
|
|
13703
|
+
}
|
|
13704
|
+
get target() {
|
|
13705
|
+
return this.ctx.target;
|
|
13706
|
+
}
|
|
13707
|
+
get unrepresentable() {
|
|
13708
|
+
return this.ctx.unrepresentable;
|
|
13709
|
+
}
|
|
13710
|
+
get override() {
|
|
13711
|
+
return this.ctx.override;
|
|
13712
|
+
}
|
|
13713
|
+
get io() {
|
|
13714
|
+
return this.ctx.io;
|
|
13715
|
+
}
|
|
13716
|
+
get counter() {
|
|
13717
|
+
return this.ctx.counter;
|
|
13718
|
+
}
|
|
13719
|
+
set counter(value) {
|
|
13720
|
+
this.ctx.counter = value;
|
|
13721
|
+
}
|
|
13722
|
+
get seen() {
|
|
13723
|
+
return this.ctx.seen;
|
|
13724
|
+
}
|
|
13725
|
+
constructor(params) {
|
|
13726
|
+
let normalizedTarget = params?.target ?? "draft-2020-12";
|
|
13727
|
+
if (normalizedTarget === "draft-4")
|
|
13728
|
+
normalizedTarget = "draft-04";
|
|
13729
|
+
if (normalizedTarget === "draft-7")
|
|
13730
|
+
normalizedTarget = "draft-07";
|
|
13731
|
+
this.ctx = initializeContext({
|
|
13732
|
+
processors: allProcessors,
|
|
13733
|
+
target: normalizedTarget,
|
|
13734
|
+
...params?.metadata && { metadata: params.metadata },
|
|
13735
|
+
...params?.unrepresentable && { unrepresentable: params.unrepresentable },
|
|
13736
|
+
...params?.override && { override: params.override },
|
|
13737
|
+
...params?.io && { io: params.io }
|
|
13738
|
+
});
|
|
13739
|
+
}
|
|
13740
|
+
process(schema, _params = { path: [], schemaPath: [] }) {
|
|
13741
|
+
return process(schema, this.ctx, _params);
|
|
13742
|
+
}
|
|
13743
|
+
emit(schema, _params) {
|
|
13744
|
+
if (_params) {
|
|
13745
|
+
if (_params.cycles)
|
|
13746
|
+
this.ctx.cycles = _params.cycles;
|
|
13747
|
+
if (_params.reused)
|
|
13748
|
+
this.ctx.reused = _params.reused;
|
|
13749
|
+
if (_params.external)
|
|
13750
|
+
this.ctx.external = _params.external;
|
|
13751
|
+
}
|
|
13752
|
+
extractDefs(this.ctx, schema);
|
|
13753
|
+
const result = finalize(this.ctx, schema);
|
|
13754
|
+
const { "~standard": _, ...plainResult } = result;
|
|
13755
|
+
return plainResult;
|
|
13756
|
+
}
|
|
13757
|
+
}
|
|
13758
|
+
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
13759
|
+
var exports_json_schema = {};
|
|
13868
13760
|
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
13869
13761
|
var exports_schemas2 = {};
|
|
13870
13762
|
__export(exports_schemas2, {
|
|
@@ -15965,6 +15857,182 @@ function date4(params) {
|
|
|
15965
15857
|
|
|
15966
15858
|
// ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
15967
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
|
+
};
|
|
15968
16036
|
// src/definitions/steps/step-features.ts
|
|
15969
16037
|
var NOTIFICATION_SIGNAL_KEY = "$boboddy_notifications_v1";
|
|
15970
16038
|
var NOTIFICATION_RESULT_KEY = "$boboddy_notifications_v1";
|
|
@@ -17113,6 +17181,7 @@ export {
|
|
|
17113
17181
|
createInputAccessor,
|
|
17114
17182
|
createBoboddyClient,
|
|
17115
17183
|
buildPipelineSpec,
|
|
17184
|
+
artifactKindSchema,
|
|
17116
17185
|
WorkItems,
|
|
17117
17186
|
UserNotifications,
|
|
17118
17187
|
StepExecutions,
|