@perstack/api-client 0.0.6 → 0.0.8
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/v1/index.d.ts +39 -522
- package/dist/v1/index.js +8 -19
- package/dist/v1/index.js.map +1 -1
- package/package.json +1 -1
package/dist/v1/index.d.ts
CHANGED
|
@@ -1745,371 +1745,18 @@ declare function updateExpertJob(input: UpdateExpertJobInput, client: ApiV1Clien
|
|
|
1745
1745
|
declare const createCheckpointInput: z.ZodObject<{
|
|
1746
1746
|
expertJobId: z.ZodCUID2;
|
|
1747
1747
|
checkpoint: z.ZodObject<{
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
}
|
|
1759
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1760
|
-
type: z.ZodLiteral<"think">;
|
|
1761
|
-
thought: z.ZodString;
|
|
1762
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1763
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1764
|
-
type: z.ZodLiteral<"todo">;
|
|
1765
|
-
newTodos: z.ZodArray<z.ZodString>;
|
|
1766
|
-
completedTodos: z.ZodArray<z.ZodNumber>;
|
|
1767
|
-
todos: z.ZodArray<z.ZodObject<{
|
|
1768
|
-
id: z.ZodNumber;
|
|
1769
|
-
title: z.ZodString;
|
|
1770
|
-
completed: z.ZodBoolean;
|
|
1771
|
-
}, z.core.$strip>>;
|
|
1772
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1773
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1774
|
-
type: z.ZodLiteral<"readImageFile">;
|
|
1775
|
-
path: z.ZodString;
|
|
1776
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
1777
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
1778
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1779
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1780
|
-
type: z.ZodLiteral<"readPdfFile">;
|
|
1781
|
-
path: z.ZodString;
|
|
1782
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
1783
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
1784
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1785
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1786
|
-
type: z.ZodLiteral<"readTextFile">;
|
|
1787
|
-
path: z.ZodString;
|
|
1788
|
-
content: z.ZodString;
|
|
1789
|
-
from: z.ZodOptional<z.ZodNumber>;
|
|
1790
|
-
to: z.ZodOptional<z.ZodNumber>;
|
|
1791
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1792
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1793
|
-
type: z.ZodLiteral<"editTextFile">;
|
|
1794
|
-
path: z.ZodString;
|
|
1795
|
-
newText: z.ZodOptional<z.ZodString>;
|
|
1796
|
-
oldText: z.ZodOptional<z.ZodString>;
|
|
1797
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1798
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1799
|
-
type: z.ZodLiteral<"appendTextFile">;
|
|
1800
|
-
path: z.ZodString;
|
|
1801
|
-
text: z.ZodString;
|
|
1802
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1803
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1804
|
-
type: z.ZodLiteral<"deleteFile">;
|
|
1805
|
-
path: z.ZodString;
|
|
1806
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1807
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1808
|
-
type: z.ZodLiteral<"moveFile">;
|
|
1809
|
-
source: z.ZodString;
|
|
1810
|
-
destination: z.ZodString;
|
|
1811
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1812
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1813
|
-
type: z.ZodLiteral<"getFileInfo">;
|
|
1814
|
-
path: z.ZodString;
|
|
1815
|
-
exists: z.ZodBoolean;
|
|
1816
|
-
absolutePath: z.ZodString;
|
|
1817
|
-
name: z.ZodString;
|
|
1818
|
-
directory: z.ZodString;
|
|
1819
|
-
extension: z.ZodOptional<z.ZodString>;
|
|
1820
|
-
mimeType: z.ZodOptional<z.ZodString>;
|
|
1821
|
-
size: z.ZodNumber;
|
|
1822
|
-
sizeFormatted: z.ZodString;
|
|
1823
|
-
created: z.ZodDate;
|
|
1824
|
-
modified: z.ZodDate;
|
|
1825
|
-
accessed: z.ZodDate;
|
|
1826
|
-
permissions: z.ZodObject<{
|
|
1827
|
-
readable: z.ZodBoolean;
|
|
1828
|
-
writable: z.ZodBoolean;
|
|
1829
|
-
executable: z.ZodBoolean;
|
|
1830
|
-
}, z.core.$strip>;
|
|
1831
|
-
workspaceItem: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1832
|
-
id: z.ZodCUID2;
|
|
1833
|
-
owner: z.ZodUnion<readonly [z.ZodLiteral<"user">, z.ZodLiteral<"expert">]>;
|
|
1834
|
-
lifecycle: z.ZodUnion<readonly [z.ZodLiteral<"application">, z.ZodLiteral<"expertJob">]>;
|
|
1835
|
-
permission: z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">]>;
|
|
1836
|
-
path: z.ZodString;
|
|
1837
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1838
|
-
updatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1839
|
-
type: z.ZodLiteral<"workspaceItemDirectory">;
|
|
1840
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1841
|
-
id: z.ZodCUID2;
|
|
1842
|
-
owner: z.ZodUnion<readonly [z.ZodLiteral<"user">, z.ZodLiteral<"expert">]>;
|
|
1843
|
-
lifecycle: z.ZodUnion<readonly [z.ZodLiteral<"application">, z.ZodLiteral<"expertJob">]>;
|
|
1844
|
-
permission: z.ZodUnion<readonly [z.ZodLiteral<"readOnly">, z.ZodLiteral<"readWrite">]>;
|
|
1845
|
-
path: z.ZodString;
|
|
1846
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1847
|
-
updatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1848
|
-
type: z.ZodLiteral<"workspaceItemFile">;
|
|
1849
|
-
key: z.ZodString;
|
|
1850
|
-
mimeType: z.ZodString;
|
|
1851
|
-
size: z.ZodNumber;
|
|
1852
|
-
}, z.core.$strip>], "type">>;
|
|
1853
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1854
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1855
|
-
type: z.ZodLiteral<"writeTextFile">;
|
|
1856
|
-
path: z.ZodString;
|
|
1857
|
-
text: z.ZodString;
|
|
1858
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1859
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1860
|
-
type: z.ZodLiteral<"createDirectory">;
|
|
1861
|
-
path: z.ZodString;
|
|
1862
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1863
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1864
|
-
type: z.ZodLiteral<"listDirectory">;
|
|
1865
|
-
path: z.ZodString;
|
|
1866
|
-
items: z.ZodArray<z.ZodObject<{
|
|
1867
|
-
name: z.ZodString;
|
|
1868
|
-
path: z.ZodString;
|
|
1869
|
-
type: z.ZodUnion<readonly [z.ZodLiteral<"directory">, z.ZodLiteral<"file">]>;
|
|
1870
|
-
size: z.ZodNumber;
|
|
1871
|
-
modified: z.ZodDate;
|
|
1872
|
-
}, z.core.$strip>>;
|
|
1873
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1874
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1875
|
-
type: z.ZodLiteral<"testUrl">;
|
|
1876
|
-
results: z.ZodArray<z.ZodObject<{
|
|
1877
|
-
url: z.ZodString;
|
|
1878
|
-
status: z.ZodNumber;
|
|
1879
|
-
title: z.ZodString;
|
|
1880
|
-
description: z.ZodString;
|
|
1881
|
-
}, z.core.$strip>>;
|
|
1882
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1883
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1884
|
-
type: z.ZodLiteral<"delegate">;
|
|
1885
|
-
delegateTo: z.ZodObject<{
|
|
1886
|
-
id: z.ZodCUID2;
|
|
1887
|
-
key: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
1888
|
-
name: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
1889
|
-
minRuntimeVersion: z.ZodEnum<{
|
|
1890
|
-
"v1.0": "v1.0";
|
|
1891
|
-
}>;
|
|
1892
|
-
description: z.ZodString;
|
|
1893
|
-
owner: z.ZodObject<{
|
|
1894
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1895
|
-
organizationId: z.ZodCUID2;
|
|
1896
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1897
|
-
}, z.core.$strip>;
|
|
1898
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1899
|
-
updatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1900
|
-
type: z.ZodLiteral<"expertDigest">;
|
|
1901
|
-
version: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
1902
|
-
tags: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
1903
|
-
}, z.core.$strip>;
|
|
1904
|
-
query: z.ZodString;
|
|
1905
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1906
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1907
|
-
type: z.ZodLiteral<"generalTool">;
|
|
1908
|
-
skillName: z.ZodString;
|
|
1909
|
-
toolName: z.ZodString;
|
|
1910
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1911
|
-
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1912
|
-
id: z.ZodString;
|
|
1913
|
-
type: z.ZodLiteral<"textPart">;
|
|
1914
|
-
text: z.ZodString;
|
|
1915
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1916
|
-
id: z.ZodString;
|
|
1917
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
1918
|
-
url: z.ZodURL;
|
|
1919
|
-
mimeType: z.ZodString;
|
|
1920
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1921
|
-
id: z.ZodString;
|
|
1922
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
1923
|
-
encodedData: z.ZodString;
|
|
1924
|
-
mimeType: z.ZodString;
|
|
1925
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1926
|
-
id: z.ZodString;
|
|
1927
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
1928
|
-
data: z.ZodString;
|
|
1929
|
-
mimeType: z.ZodString;
|
|
1930
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1931
|
-
id: z.ZodString;
|
|
1932
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
1933
|
-
url: z.ZodString;
|
|
1934
|
-
mimeType: z.ZodString;
|
|
1935
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1936
|
-
id: z.ZodString;
|
|
1937
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
1938
|
-
encodedData: z.ZodString;
|
|
1939
|
-
mimeType: z.ZodString;
|
|
1940
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1941
|
-
id: z.ZodString;
|
|
1942
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
1943
|
-
data: z.ZodString;
|
|
1944
|
-
mimeType: z.ZodString;
|
|
1945
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1946
|
-
id: z.ZodString;
|
|
1947
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
1948
|
-
toolCallId: z.ZodString;
|
|
1949
|
-
toolName: z.ZodString;
|
|
1950
|
-
args: z.ZodUnknown;
|
|
1951
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1952
|
-
id: z.ZodString;
|
|
1953
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
1954
|
-
toolCallId: z.ZodString;
|
|
1955
|
-
toolName: z.ZodString;
|
|
1956
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1957
|
-
id: z.ZodString;
|
|
1958
|
-
type: z.ZodLiteral<"textPart">;
|
|
1959
|
-
text: z.ZodString;
|
|
1960
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1961
|
-
id: z.ZodString;
|
|
1962
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
1963
|
-
encodedData: z.ZodString;
|
|
1964
|
-
mimeType: z.ZodString;
|
|
1965
|
-
}, z.core.$strip>]>>;
|
|
1966
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
1967
|
-
}, z.core.$strip>], "type">>;
|
|
1968
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
1969
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1970
|
-
type: z.ZodLiteral<"error">;
|
|
1971
|
-
}, z.core.$strip>], "type">;
|
|
1972
|
-
expertJobId: z.ZodCUID2;
|
|
1748
|
+
id: z.ZodString;
|
|
1749
|
+
runId: z.ZodString;
|
|
1750
|
+
status: z.ZodEnum<{
|
|
1751
|
+
init: "init";
|
|
1752
|
+
proceeding: "proceeding";
|
|
1753
|
+
completed: "completed";
|
|
1754
|
+
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
1755
|
+
stoppedByDelegate: "stoppedByDelegate";
|
|
1756
|
+
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
1757
|
+
stoppedByError: "stoppedByError";
|
|
1758
|
+
}>;
|
|
1973
1759
|
stepNumber: z.ZodNumber;
|
|
1974
|
-
status: z.ZodUnion<readonly [z.ZodLiteral<"init">, z.ZodLiteral<"proceeding">, z.ZodLiteral<"completed">, z.ZodLiteral<"stoppedByInteractiveTool">, z.ZodLiteral<"stoppedByDelegate">, z.ZodLiteral<"stoppedByExceededMaxSteps">, z.ZodLiteral<"stoppedByError">]>;
|
|
1975
|
-
expert: z.ZodObject<{
|
|
1976
|
-
id: z.ZodCUID2;
|
|
1977
|
-
key: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
1978
|
-
name: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
1979
|
-
minRuntimeVersion: z.ZodEnum<{
|
|
1980
|
-
"v1.0": "v1.0";
|
|
1981
|
-
}>;
|
|
1982
|
-
description: z.ZodString;
|
|
1983
|
-
owner: z.ZodObject<{
|
|
1984
|
-
name: z.ZodOptional<z.ZodString>;
|
|
1985
|
-
organizationId: z.ZodCUID2;
|
|
1986
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1987
|
-
}, z.core.$strip>;
|
|
1988
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1989
|
-
updatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
1990
|
-
type: z.ZodLiteral<"expertDigest">;
|
|
1991
|
-
version: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
1992
|
-
tags: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
1993
|
-
}, z.core.$strip>;
|
|
1994
|
-
skillName: z.ZodOptional<z.ZodString>;
|
|
1995
|
-
toolName: z.ZodOptional<z.ZodString>;
|
|
1996
|
-
delegateTo: z.ZodOptional<z.ZodObject<{
|
|
1997
|
-
expert: z.ZodObject<{
|
|
1998
|
-
id: z.ZodCUID2;
|
|
1999
|
-
key: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
2000
|
-
name: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
2001
|
-
minRuntimeVersion: z.ZodEnum<{
|
|
2002
|
-
"v1.0": "v1.0";
|
|
2003
|
-
}>;
|
|
2004
|
-
description: z.ZodString;
|
|
2005
|
-
owner: z.ZodObject<{
|
|
2006
|
-
name: z.ZodOptional<z.ZodString>;
|
|
2007
|
-
organizationId: z.ZodCUID2;
|
|
2008
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
2009
|
-
}, z.core.$strip>;
|
|
2010
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
2011
|
-
updatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
2012
|
-
type: z.ZodLiteral<"expertDigest">;
|
|
2013
|
-
version: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
2014
|
-
tags: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
2015
|
-
}, z.core.$strip>;
|
|
2016
|
-
toolCallId: z.ZodString;
|
|
2017
|
-
toolName: z.ZodString;
|
|
2018
|
-
}, z.core.$strip>>;
|
|
2019
|
-
delegatedBy: z.ZodOptional<z.ZodObject<{
|
|
2020
|
-
expert: z.ZodObject<{
|
|
2021
|
-
id: z.ZodCUID2;
|
|
2022
|
-
key: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
2023
|
-
name: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>;
|
|
2024
|
-
minRuntimeVersion: z.ZodEnum<{
|
|
2025
|
-
"v1.0": "v1.0";
|
|
2026
|
-
}>;
|
|
2027
|
-
description: z.ZodString;
|
|
2028
|
-
owner: z.ZodObject<{
|
|
2029
|
-
name: z.ZodOptional<z.ZodString>;
|
|
2030
|
-
organizationId: z.ZodCUID2;
|
|
2031
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
2032
|
-
}, z.core.$strip>;
|
|
2033
|
-
createdAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
2034
|
-
updatedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
2035
|
-
type: z.ZodLiteral<"expertDigest">;
|
|
2036
|
-
version: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
2037
|
-
tags: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodString>, z.ZodString>, z.ZodString>>;
|
|
2038
|
-
}, z.core.$strip>;
|
|
2039
|
-
toolCallId: z.ZodString;
|
|
2040
|
-
toolName: z.ZodString;
|
|
2041
|
-
checkpointId: z.ZodCUID2;
|
|
2042
|
-
}, z.core.$strip>>;
|
|
2043
|
-
inputMessages: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2044
|
-
id: z.ZodString;
|
|
2045
|
-
type: z.ZodLiteral<"instructionMessage">;
|
|
2046
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
2047
|
-
id: z.ZodString;
|
|
2048
|
-
type: z.ZodLiteral<"textPart">;
|
|
2049
|
-
text: z.ZodString;
|
|
2050
|
-
}, z.core.$strip>>;
|
|
2051
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
2052
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2053
|
-
id: z.ZodString;
|
|
2054
|
-
type: z.ZodLiteral<"userMessage">;
|
|
2055
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2056
|
-
id: z.ZodString;
|
|
2057
|
-
type: z.ZodLiteral<"textPart">;
|
|
2058
|
-
text: z.ZodString;
|
|
2059
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2060
|
-
id: z.ZodString;
|
|
2061
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
2062
|
-
url: z.ZodURL;
|
|
2063
|
-
mimeType: z.ZodString;
|
|
2064
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2065
|
-
id: z.ZodString;
|
|
2066
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
2067
|
-
encodedData: z.ZodString;
|
|
2068
|
-
mimeType: z.ZodString;
|
|
2069
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2070
|
-
id: z.ZodString;
|
|
2071
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
2072
|
-
data: z.ZodString;
|
|
2073
|
-
mimeType: z.ZodString;
|
|
2074
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2075
|
-
id: z.ZodString;
|
|
2076
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
2077
|
-
url: z.ZodString;
|
|
2078
|
-
mimeType: z.ZodString;
|
|
2079
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2080
|
-
id: z.ZodString;
|
|
2081
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
2082
|
-
encodedData: z.ZodString;
|
|
2083
|
-
mimeType: z.ZodString;
|
|
2084
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2085
|
-
id: z.ZodString;
|
|
2086
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
2087
|
-
data: z.ZodString;
|
|
2088
|
-
mimeType: z.ZodString;
|
|
2089
|
-
}, z.core.$strip>]>>;
|
|
2090
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
2091
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2092
|
-
id: z.ZodString;
|
|
2093
|
-
type: z.ZodLiteral<"toolMessage">;
|
|
2094
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
2095
|
-
id: z.ZodString;
|
|
2096
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
2097
|
-
toolCallId: z.ZodString;
|
|
2098
|
-
toolName: z.ZodString;
|
|
2099
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2100
|
-
id: z.ZodString;
|
|
2101
|
-
type: z.ZodLiteral<"textPart">;
|
|
2102
|
-
text: z.ZodString;
|
|
2103
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2104
|
-
id: z.ZodString;
|
|
2105
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
2106
|
-
encodedData: z.ZodString;
|
|
2107
|
-
mimeType: z.ZodString;
|
|
2108
|
-
}, z.core.$strip>]>>;
|
|
2109
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
2110
|
-
}, z.core.$strip>>;
|
|
2111
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
2112
|
-
}, z.core.$strip>]>>>;
|
|
2113
1760
|
messages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2114
1761
|
id: z.ZodString;
|
|
2115
1762
|
type: z.ZodLiteral<"instructionMessage">;
|
|
@@ -2195,158 +1842,30 @@ declare const createCheckpointInput: z.ZodObject<{
|
|
|
2195
1842
|
}, z.core.$strip>>;
|
|
2196
1843
|
cache: z.ZodOptional<z.ZodBoolean>;
|
|
2197
1844
|
}, z.core.$strip>]>>;
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2211
|
-
id: z.ZodString;
|
|
2212
|
-
type: z.ZodLiteral<"textPart">;
|
|
2213
|
-
text: z.ZodString;
|
|
2214
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2215
|
-
id: z.ZodString;
|
|
2216
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
2217
|
-
url: z.ZodURL;
|
|
2218
|
-
mimeType: z.ZodString;
|
|
2219
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2220
|
-
id: z.ZodString;
|
|
2221
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
2222
|
-
encodedData: z.ZodString;
|
|
2223
|
-
mimeType: z.ZodString;
|
|
2224
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2225
|
-
id: z.ZodString;
|
|
2226
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
2227
|
-
data: z.ZodString;
|
|
2228
|
-
mimeType: z.ZodString;
|
|
2229
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2230
|
-
id: z.ZodString;
|
|
2231
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
2232
|
-
url: z.ZodString;
|
|
2233
|
-
mimeType: z.ZodString;
|
|
2234
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2235
|
-
id: z.ZodString;
|
|
2236
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
2237
|
-
encodedData: z.ZodString;
|
|
2238
|
-
mimeType: z.ZodString;
|
|
2239
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2240
|
-
id: z.ZodString;
|
|
2241
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
2242
|
-
data: z.ZodString;
|
|
2243
|
-
mimeType: z.ZodString;
|
|
2244
|
-
}, z.core.$strip>]>>;
|
|
2245
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
2246
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2247
|
-
id: z.ZodString;
|
|
2248
|
-
type: z.ZodLiteral<"expertMessage">;
|
|
2249
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2250
|
-
id: z.ZodString;
|
|
2251
|
-
type: z.ZodLiteral<"textPart">;
|
|
2252
|
-
text: z.ZodString;
|
|
2253
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2254
|
-
id: z.ZodString;
|
|
2255
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
2256
|
-
toolCallId: z.ZodString;
|
|
2257
|
-
toolName: z.ZodString;
|
|
2258
|
-
args: z.ZodUnknown;
|
|
2259
|
-
}, z.core.$strip>]>>;
|
|
2260
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
2261
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2262
|
-
id: z.ZodString;
|
|
2263
|
-
type: z.ZodLiteral<"toolMessage">;
|
|
2264
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
2265
|
-
id: z.ZodString;
|
|
2266
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
2267
|
-
toolCallId: z.ZodString;
|
|
2268
|
-
toolName: z.ZodString;
|
|
2269
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2270
|
-
id: z.ZodString;
|
|
2271
|
-
type: z.ZodLiteral<"textPart">;
|
|
2272
|
-
text: z.ZodString;
|
|
2273
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2274
|
-
id: z.ZodString;
|
|
2275
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
2276
|
-
encodedData: z.ZodString;
|
|
2277
|
-
mimeType: z.ZodString;
|
|
2278
|
-
}, z.core.$strip>]>>;
|
|
2279
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
2280
|
-
}, z.core.$strip>>;
|
|
2281
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
2282
|
-
}, z.core.$strip>]>>;
|
|
2283
|
-
toolCall: z.ZodOptional<z.ZodObject<{
|
|
2284
|
-
id: z.ZodString;
|
|
2285
|
-
skillName: z.ZodString;
|
|
1845
|
+
expert: z.ZodObject<{
|
|
1846
|
+
key: z.ZodString;
|
|
1847
|
+
name: z.ZodString;
|
|
1848
|
+
version: z.ZodString;
|
|
1849
|
+
}, z.core.$strip>;
|
|
1850
|
+
delegateTo: z.ZodOptional<z.ZodObject<{
|
|
1851
|
+
expert: z.ZodObject<{
|
|
1852
|
+
key: z.ZodString;
|
|
1853
|
+
name: z.ZodString;
|
|
1854
|
+
version: z.ZodString;
|
|
1855
|
+
}, z.core.$strip>;
|
|
1856
|
+
toolCallId: z.ZodString;
|
|
2286
1857
|
toolName: z.ZodString;
|
|
2287
|
-
|
|
1858
|
+
query: z.ZodString;
|
|
2288
1859
|
}, z.core.$strip>>;
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
1860
|
+
delegatedBy: z.ZodOptional<z.ZodObject<{
|
|
1861
|
+
expert: z.ZodObject<{
|
|
1862
|
+
key: z.ZodString;
|
|
1863
|
+
name: z.ZodString;
|
|
1864
|
+
version: z.ZodString;
|
|
1865
|
+
}, z.core.$strip>;
|
|
1866
|
+
toolCallId: z.ZodString;
|
|
2292
1867
|
toolName: z.ZodString;
|
|
2293
|
-
|
|
2294
|
-
id: z.ZodString;
|
|
2295
|
-
type: z.ZodLiteral<"textPart">;
|
|
2296
|
-
text: z.ZodString;
|
|
2297
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2298
|
-
id: z.ZodString;
|
|
2299
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
2300
|
-
url: z.ZodURL;
|
|
2301
|
-
mimeType: z.ZodString;
|
|
2302
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2303
|
-
id: z.ZodString;
|
|
2304
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
2305
|
-
encodedData: z.ZodString;
|
|
2306
|
-
mimeType: z.ZodString;
|
|
2307
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2308
|
-
id: z.ZodString;
|
|
2309
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
2310
|
-
data: z.ZodString;
|
|
2311
|
-
mimeType: z.ZodString;
|
|
2312
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2313
|
-
id: z.ZodString;
|
|
2314
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
2315
|
-
url: z.ZodString;
|
|
2316
|
-
mimeType: z.ZodString;
|
|
2317
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2318
|
-
id: z.ZodString;
|
|
2319
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
2320
|
-
encodedData: z.ZodString;
|
|
2321
|
-
mimeType: z.ZodString;
|
|
2322
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2323
|
-
id: z.ZodString;
|
|
2324
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
2325
|
-
data: z.ZodString;
|
|
2326
|
-
mimeType: z.ZodString;
|
|
2327
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2328
|
-
id: z.ZodString;
|
|
2329
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
2330
|
-
toolCallId: z.ZodString;
|
|
2331
|
-
toolName: z.ZodString;
|
|
2332
|
-
args: z.ZodUnknown;
|
|
2333
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2334
|
-
id: z.ZodString;
|
|
2335
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
2336
|
-
toolCallId: z.ZodString;
|
|
2337
|
-
toolName: z.ZodString;
|
|
2338
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
2339
|
-
id: z.ZodString;
|
|
2340
|
-
type: z.ZodLiteral<"textPart">;
|
|
2341
|
-
text: z.ZodString;
|
|
2342
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2343
|
-
id: z.ZodString;
|
|
2344
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
2345
|
-
encodedData: z.ZodString;
|
|
2346
|
-
mimeType: z.ZodString;
|
|
2347
|
-
}, z.core.$strip>]>>;
|
|
2348
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
2349
|
-
}, z.core.$strip>], "type">>;
|
|
1868
|
+
checkpointId: z.ZodString;
|
|
2350
1869
|
}, z.core.$strip>>;
|
|
2351
1870
|
usage: z.ZodObject<{
|
|
2352
1871
|
inputTokens: z.ZodNumber;
|
|
@@ -2355,10 +1874,8 @@ declare const createCheckpointInput: z.ZodObject<{
|
|
|
2355
1874
|
totalTokens: z.ZodNumber;
|
|
2356
1875
|
cachedInputTokens: z.ZodNumber;
|
|
2357
1876
|
}, z.core.$strip>;
|
|
2358
|
-
contextWindow: z.ZodNumber
|
|
2359
|
-
contextWindowUsage: z.ZodNumber
|
|
2360
|
-
startedAt: z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>;
|
|
2361
|
-
finishedAt: z.ZodOptional<z.ZodPipe<z.ZodISODateTime, z.ZodTransform<Date, string>>>;
|
|
1877
|
+
contextWindow: z.ZodOptional<z.ZodNumber>;
|
|
1878
|
+
contextWindowUsage: z.ZodOptional<z.ZodNumber>;
|
|
2362
1879
|
}, z.core.$strip>;
|
|
2363
1880
|
step: z.ZodObject<{
|
|
2364
1881
|
stepNumber: z.ZodNumber;
|
|
@@ -2592,8 +2109,8 @@ declare const createCheckpointInput: z.ZodObject<{
|
|
|
2592
2109
|
totalTokens: z.ZodNumber;
|
|
2593
2110
|
cachedInputTokens: z.ZodNumber;
|
|
2594
2111
|
}, z.core.$strip>;
|
|
2595
|
-
startedAt: z.
|
|
2596
|
-
finishedAt: z.ZodOptional<z.
|
|
2112
|
+
startedAt: z.ZodNumber;
|
|
2113
|
+
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
2597
2114
|
}, z.core.$strip>;
|
|
2598
2115
|
}, z.core.$strip>;
|
|
2599
2116
|
type CreateCheckpointInput = z.input<typeof createCheckpointInput>;
|
|
@@ -2686,7 +2203,7 @@ declare function getStudioExpert(input: GetStudioExpertInput, client: ApiV1Clien
|
|
|
2686
2203
|
expert: ApiStudioExpert;
|
|
2687
2204
|
}>;
|
|
2688
2205
|
/**
|
|
2689
|
-
* Retrieve studio experts
|
|
2206
|
+
* Retrieve multiple studio experts
|
|
2690
2207
|
*/
|
|
2691
2208
|
declare const getStudioExpertsInput: z.ZodObject<{
|
|
2692
2209
|
take: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
|
|
@@ -2697,7 +2214,7 @@ declare const getStudioExpertsInput: z.ZodObject<{
|
|
|
2697
2214
|
}, z.core.$strip>;
|
|
2698
2215
|
type GetStudioExpertsInput = z.input<typeof getStudioExpertsInput>;
|
|
2699
2216
|
declare function getStudioExperts(input: GetStudioExpertsInput, client: ApiV1Client): Promise<{
|
|
2700
|
-
experts:
|
|
2217
|
+
experts: ApiExpertDigest[];
|
|
2701
2218
|
total: number;
|
|
2702
2219
|
take: number;
|
|
2703
2220
|
skip: number;
|
|
@@ -3352,7 +2869,7 @@ declare class ApiV1Client {
|
|
|
3352
2869
|
expert: ApiStudioExpert;
|
|
3353
2870
|
}>;
|
|
3354
2871
|
getMany: (input: GetStudioExpertsInput) => Promise<{
|
|
3355
|
-
experts:
|
|
2872
|
+
experts: ApiExpertDigest[];
|
|
3356
2873
|
total: number;
|
|
3357
2874
|
take: number;
|
|
3358
2875
|
skip: number;
|
package/dist/v1/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { maxOrganizationNameLength, organizationNameRegex, maxSkillNameLength, packageWithVersionRegex, maxEnvNameLength, envNameRegex, maxSkillToolNameLength, maxSkillRuleLength, maxSkillDescriptionLength, maxSkillEndpointLength, urlSafeRegex, maxSkillInputJsonSchemaLength, maxExpertVersionTagLength, tagNameRegex, expertVersionRegex, maxExpertDescriptionLength, maxExpertNameLength, expertNameRegex, maxExpertKeyLength, expertKeyRegex, maxExpertInstructionLength, messagePartSchema, usageSchema, toolResultSchema, toolCallSchema, messageSchema, instructionMessageSchema, userMessageSchema, toolMessageSchema, maxCheckpointToolCallIdLength } from '@perstack/core';
|
|
2
|
+
import { maxOrganizationNameLength, organizationNameRegex, maxSkillNameLength, packageWithVersionRegex, maxEnvNameLength, envNameRegex, maxSkillToolNameLength, maxSkillRuleLength, maxSkillDescriptionLength, maxSkillEndpointLength, urlSafeRegex, maxSkillInputJsonSchemaLength, maxExpertVersionTagLength, tagNameRegex, expertVersionRegex, maxExpertDescriptionLength, maxExpertNameLength, expertNameRegex, maxExpertKeyLength, expertKeyRegex, maxExpertInstructionLength, messagePartSchema, usageSchema, toolResultSchema, toolCallSchema, messageSchema, instructionMessageSchema, userMessageSchema, toolMessageSchema, maxCheckpointToolCallIdLength, stepSchema, checkpointSchema } from '@perstack/core';
|
|
3
3
|
|
|
4
4
|
// v1/api-error.ts
|
|
5
5
|
var ApiError = class extends Error {
|
|
@@ -216,8 +216,8 @@ async function getRegistryExpert(input, client) {
|
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
218
|
var getRegistryExpertsInput = z.object({
|
|
219
|
-
take: z.union([z.number(), z.string().transform((value) => Number.parseInt(value))]).optional(),
|
|
220
|
-
skip: z.union([z.number(), z.string().transform((value) => Number.parseInt(value))]).optional(),
|
|
219
|
+
take: z.union([z.number(), z.string().transform((value) => Number.parseInt(value, 10))]).optional(),
|
|
220
|
+
skip: z.union([z.number(), z.string().transform((value) => Number.parseInt(value, 10))]).optional(),
|
|
221
221
|
sort: z.string().optional(),
|
|
222
222
|
order: z.string().optional(),
|
|
223
223
|
filter: z.string().optional(),
|
|
@@ -787,19 +787,8 @@ async function updateExpertJob(input, client) {
|
|
|
787
787
|
}
|
|
788
788
|
var createCheckpointInput = z.object({
|
|
789
789
|
expertJobId: apiExpertJobSchema.shape.id,
|
|
790
|
-
checkpoint:
|
|
791
|
-
step:
|
|
792
|
-
stepNumber: z.number(),
|
|
793
|
-
inputMessages: z.optional(
|
|
794
|
-
z.array(z.union([instructionMessageSchema, userMessageSchema, toolMessageSchema]))
|
|
795
|
-
),
|
|
796
|
-
newMessages: z.array(messageSchema),
|
|
797
|
-
toolCall: z.optional(toolCallSchema),
|
|
798
|
-
toolResult: z.optional(toolResultSchema),
|
|
799
|
-
usage: usageSchema,
|
|
800
|
-
startedAt: z.date(),
|
|
801
|
-
finishedAt: z.optional(z.date())
|
|
802
|
-
})
|
|
790
|
+
checkpoint: checkpointSchema,
|
|
791
|
+
step: stepSchema
|
|
803
792
|
});
|
|
804
793
|
var createCheckpointResponseSchema = z.object({
|
|
805
794
|
data: z.object({
|
|
@@ -946,15 +935,15 @@ async function getStudioExpert(input, client) {
|
|
|
946
935
|
};
|
|
947
936
|
}
|
|
948
937
|
var getStudioExpertsInput = z.object({
|
|
949
|
-
take: z.union([z.number(), z.string().transform((value) => Number.parseInt(value))]).optional(),
|
|
950
|
-
skip: z.union([z.number(), z.string().transform((value) => Number.parseInt(value))]).optional(),
|
|
938
|
+
take: z.union([z.number(), z.string().transform((value) => Number.parseInt(value, 10))]).optional(),
|
|
939
|
+
skip: z.union([z.number(), z.string().transform((value) => Number.parseInt(value, 10))]).optional(),
|
|
951
940
|
sort: z.string().optional(),
|
|
952
941
|
order: z.string().optional(),
|
|
953
942
|
filter: z.string().optional()
|
|
954
943
|
});
|
|
955
944
|
var getStudioExpertsResponseSchema = z.object({
|
|
956
945
|
data: z.object({
|
|
957
|
-
experts: z.array(
|
|
946
|
+
experts: z.array(apiExpertDigestSchema)
|
|
958
947
|
}),
|
|
959
948
|
meta: z.object({
|
|
960
949
|
total: z.number(),
|