@myagentroam/protocol 0.10.56 → 0.10.58
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.d.ts +1918 -0
- package/dist/index.js +39 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1864,6 +1864,43 @@ export const subagentLatestMessageSchema = z.object({
|
|
|
1864
1864
|
timestamp: z.string().datetime(),
|
|
1865
1865
|
truncated: z.boolean().optional()
|
|
1866
1866
|
});
|
|
1867
|
+
export const toolPresentationSchema = z.discriminatedUnion('kind', [
|
|
1868
|
+
z.object({
|
|
1869
|
+
kind: z.literal('WEB_SEARCH'),
|
|
1870
|
+
query: z.string().max(500).optional(),
|
|
1871
|
+
sourceCount: z.number().int().nonnegative().optional(),
|
|
1872
|
+
sources: z
|
|
1873
|
+
.array(z.object({
|
|
1874
|
+
url: z.string().min(1).max(8192),
|
|
1875
|
+
title: z.string().max(1000).optional(),
|
|
1876
|
+
snippet: z.string().max(2000).optional()
|
|
1877
|
+
}))
|
|
1878
|
+
.max(20)
|
|
1879
|
+
.optional()
|
|
1880
|
+
}),
|
|
1881
|
+
z.object({
|
|
1882
|
+
kind: z.literal('WEB_FETCH'),
|
|
1883
|
+
requestUrl: z.string().max(8192).optional(),
|
|
1884
|
+
url: z.string().max(8192).optional(),
|
|
1885
|
+
title: z.string().max(1000).optional(),
|
|
1886
|
+
mode: z.enum(['http', 'browser']).optional(),
|
|
1887
|
+
status: z.number().int().min(100).max(599).optional(),
|
|
1888
|
+
contentType: z.string().max(256).optional()
|
|
1889
|
+
}),
|
|
1890
|
+
z.object({
|
|
1891
|
+
kind: z.literal('SKILL'),
|
|
1892
|
+
name: z.string().max(128).optional(),
|
|
1893
|
+
description: z.string().max(2000).optional(),
|
|
1894
|
+
source: z.string().max(4096).optional()
|
|
1895
|
+
}),
|
|
1896
|
+
z.object({
|
|
1897
|
+
kind: z.literal('SLEEP'),
|
|
1898
|
+
durationMs: z.number().int().min(1).max(1800000).optional(),
|
|
1899
|
+
startedAt: z.string().datetime().optional(),
|
|
1900
|
+
elapsedMs: z.number().int().nonnegative().optional(),
|
|
1901
|
+
wakeReason: z.enum(['elapsed', 'steer', 'subagent_message']).optional()
|
|
1902
|
+
})
|
|
1903
|
+
]);
|
|
1867
1904
|
const toolCallItemSchema = conversationItemBaseSchema.extend({
|
|
1868
1905
|
kind: z.literal('tool_call'),
|
|
1869
1906
|
payload: z.object({
|
|
@@ -1876,6 +1913,7 @@ const toolCallItemSchema = conversationItemBaseSchema.extend({
|
|
|
1876
1913
|
errorCode: z.string().max(80).nullable(),
|
|
1877
1914
|
truncated: z.boolean(),
|
|
1878
1915
|
toolCategory: z.enum(['IMAGE_GENERATION']).optional(),
|
|
1916
|
+
toolPresentation: toolPresentationSchema.optional(),
|
|
1879
1917
|
subagentOperation: subagentOperationSchema.optional(),
|
|
1880
1918
|
subagentWait: z.boolean().optional(),
|
|
1881
1919
|
subagentId: z.string().min(1).max(128).nullable().optional(),
|
|
@@ -1889,6 +1927,7 @@ const toolCallItemSchema = conversationItemBaseSchema.extend({
|
|
|
1889
1927
|
const commandExecutionItemSchema = conversationItemBaseSchema.extend({
|
|
1890
1928
|
kind: z.literal('command_execution'),
|
|
1891
1929
|
payload: z.object({
|
|
1930
|
+
title: z.string().min(1).max(128).optional(),
|
|
1892
1931
|
command: z.string().max(10000),
|
|
1893
1932
|
cwd: z.string().max(4096).nullable(),
|
|
1894
1933
|
outputPreview: z.string().max(10000),
|