@myagentroam/protocol 0.9.62 → 0.9.65
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/LICENSE +202 -0
- package/NOTICE +4 -0
- package/dist/enterprise.d.ts +423 -0
- package/dist/enterprise.js +182 -2
- package/dist/git-identity.d.ts +505 -0
- package/dist/git-identity.js +331 -0
- package/dist/index.d.ts +21930 -0
- package/dist/index.js +2784 -2
- package/dist/mcp.d.ts +438 -0
- package/dist/mcp.js +141 -2
- package/dist/skill.d.ts +370 -0
- package/dist/skill.js +175 -2
- package/package.json +13 -5
- package/README.md +0 -9
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2784 @@
|
|
|
1
|
-
|
|
2
|
-
const _0x42f309=_0xe5ef;(function(_0x3b74a5,_0x9c275e){const _0x2ca9e4=_0xe5ef,_0x463c64=_0x3b74a5();while(!![]){try{const _0x42cf88=-parseInt(_0x2ca9e4(0x215))/(0x161f+-0x3*0x8e9+0x49d)*(-parseInt(_0x2ca9e4(0x243))/(0x2001*-0x1+0xfbd+0x1046))+-parseInt(_0x2ca9e4(0x253))/(-0x1f0*-0xd+-0x3*-0xc5f+-0x8e6*0x7)+parseInt(_0x2ca9e4(0x347))/(0x1*-0x87e+-0x3e6*-0x9+-0x1a94)+-parseInt(_0x2ca9e4(0x35f))/(0x1*0x2133+0x551+-0xdb*0x2d)+parseInt(_0x2ca9e4(0x3db))/(0x98+0x24ca*0x1+-0x31d*0xc)+-parseInt(_0x2ca9e4(0x437))/(-0x1cf7*-0x1+0x312*-0x9+0x1*-0x14e)*(parseInt(_0x2ca9e4(0x4c3))/(0x256a*-0x1+0xc7c+0x18f6))+-parseInt(_0x2ca9e4(0x2f8))/(0x1704*-0x1+-0x255+0x1962)*(-parseInt(_0x2ca9e4(0x3e5))/(-0x2654+-0x75b+0x2db9));if(_0x42cf88===_0x9c275e)break;else _0x463c64['push'](_0x463c64['shift']());}catch(_0xd3465e){_0x463c64['push'](_0x463c64['shift']());}}}(_0xc523,0x1*-0xfff34+0x29098+0x5*0x531e9));import{z}from'zod';export*from'./enterprise.js';export*from'./skill.js';export*from'./mcp.js';export const healthStatusSchema=z[_0x42f309(0x1e4)]({'status':z[_0x42f309(0x25c)]('ok')});export const NODE_PROTOCOL_VERSION=0x258e+0xa4a+0x4e*-0x9d;export const WORKBENCH_PROTOCOL_VERSION=0x1b8b+0x152c+-0x30b6;export const nodePlatformSchema=z[_0x42f309(0x448)]([_0x42f309(0x2e0),_0x42f309(0x48a)]);export const runnerAvailabilitySchema=z[_0x42f309(0x1e4)]({'available':z[_0x42f309(0x400)](),'version':z[_0x42f309(0x259)]()[_0x42f309(0x41d)]()});const nonnegativeSafeIntegerSchema=z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0x1*0x753+0x38c*-0x5+0xa69)[_0x42f309(0x2a0)](Number[_0x42f309(0x49c)]),positiveSafeIntegerSchema=z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0x206b+0x223*0x7+-0x2f5f)[_0x42f309(0x2a0)](Number[_0x42f309(0x49c)]),boundedIdentifierSchema=z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0xb5c+-0x29*-0xa4+0x2fb*-0x5)[_0x42f309(0x2a0)](0x16*0xc7+0xb92*-0x2+-0x1b*-0x3e),utf8ByteLength=_0x266d0c=>new TextEncoder()[_0x42f309(0x2ea)](_0x266d0c)[_0x42f309(0x3d6)],runtimeCredentialHttpVersionSchema=z[_0x42f309(0x448)]([_0x42f309(0x1e1),'2']);export const marAgentRuntimeCredentialCapabilitySchema=z[_0x42f309(0x1e4)]({'apiVersion':z[_0x42f309(0x25c)](0x3*0x336+-0x1e3b+0x12*0x125),'websocket':z[_0x42f309(0x400)](),'httpVersions':z[_0x42f309(0x298)](runtimeCredentialHttpVersionSchema)[_0x42f309(0x4af)](0x249b+0x2*-0xc5d+-0xbe0*0x1)[_0x42f309(0x2a0)](0x206d+-0x5d5*0x1+-0x1a96)[_0x42f309(0x225)]((_0x1dfce3,_0x7b2ce1)=>{const _0x47dc3f=_0x42f309;if(new Set(_0x1dfce3)[_0x47dc3f(0x3cf)]!==_0x1dfce3[_0x47dc3f(0x27d)])_0x7b2ce1[_0x47dc3f(0x497)]({'code':_0x47dc3f(0x2b6),'message':_0x47dc3f(0x3d7)});})})[_0x42f309(0x1f4)]();export const conversationHostingCapabilitySchema=z[_0x42f309(0x1e4)]({'state':z[_0x42f309(0x448)]([_0x42f309(0x394),_0x42f309(0x1d7),_0x42f309(0x375)]),'apiVersion':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'sandboxBackend':z[_0x42f309(0x25c)](_0x42f309(0x269))[_0x42f309(0x41d)](),'sandboxPolicyVersion':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x41d)](),'acceptsNewConversations':z[_0x42f309(0x400)](),'supportsExistingConversations':z[_0x42f309(0x400)](),'capacity':z[_0x42f309(0x448)]([_0x42f309(0x375),_0x42f309(0x308),_0x42f309(0x30c)]),'reasonCode':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,79}$/)[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x39810c,_0xf324d7)=>{const _0x4d9576=_0x42f309;if(_0x39810c[_0x4d9576(0x3f1)]===_0x4d9576(0x375)){if(_0x39810c[_0x4d9576(0x369)]!==_0x4d9576(0x269)||_0x39810c[_0x4d9576(0x2d1)]===undefined||!_0x39810c[_0x4d9576(0x428)]||_0x39810c[_0x4d9576(0x4ad)]!==undefined)_0xf324d7[_0x4d9576(0x497)]({'code':_0x4d9576(0x2b6),'message':_0x4d9576(0x338)});if(_0x39810c[_0x4d9576(0x2e6)]!==(_0x39810c[_0x4d9576(0x232)]!==_0x4d9576(0x30c)))_0xf324d7[_0x4d9576(0x497)]({'code':_0x4d9576(0x2b6),'path':[_0x4d9576(0x2e6)],'message':_0x4d9576(0x3e3)});return;}if(_0x39810c[_0x4d9576(0x2e6)]||_0x39810c[_0x4d9576(0x428)])_0xf324d7[_0x4d9576(0x497)]({'code':_0x4d9576(0x2b6),'message':_0x4d9576(0x273)});if(_0x39810c[_0x4d9576(0x3f1)]===_0x4d9576(0x1d7)&&_0x39810c[_0x4d9576(0x4ad)]===undefined)_0xf324d7[_0x4d9576(0x497)]({'code':_0x4d9576(0x2b6),'message':_0x4d9576(0x1d5)});if(_0x39810c[_0x4d9576(0x3f1)]===_0x4d9576(0x394)&&(_0x39810c[_0x4d9576(0x369)]!==undefined||_0x39810c[_0x4d9576(0x2d1)]!==undefined||_0x39810c[_0x4d9576(0x4ad)]!==undefined))_0xf324d7[_0x4d9576(0x497)]({'code':_0x4d9576(0x2b6),'message':_0x4d9576(0x4b1)});});export const conversationHostingEnableInputSchema=z[_0x42f309(0x1e4)]({'enabled':z[_0x42f309(0x25c)](!![])})[_0x42f309(0x1f4)]();export const conversationHostingDisableInputSchema=z[_0x42f309(0x1e4)]({})[_0x42f309(0x1f4)]();export const conversationHostingEnableResultSchema=z[_0x42f309(0x1e4)]({'capability':conversationHostingCapabilitySchema})[_0x42f309(0x1f4)]();export const conversationHostingStorageCapacitySchema=z[_0x42f309(0x1e4)]({'hostedStorageUsedBytes':nonnegativeSafeIntegerSchema,'filesystemTotalBytes':positiveSafeIntegerSchema,'filesystemAvailableBytes':nonnegativeSafeIntegerSchema,'filesystemUsageBasisPoints':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0x22ab+-0x1*-0x24fa+-0x47a5)[_0x42f309(0x2a0)](0x3f67*0x1+0x2a8c+0x1*-0x42e3),'capacity':z[_0x42f309(0x448)]([_0x42f309(0x375),_0x42f309(0x308),_0x42f309(0x30c)]),'acceptsNewConversations':z[_0x42f309(0x400)](),'automaticCleanupInactiveDays':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0x14*-0x1be+0x9*0x21a+-0xfef*-0x1)[_0x42f309(0x2a0)](0x1edc+-0x21f3+0x2*0x242),'measuredAt':nonnegativeSafeIntegerSchema})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x5d43fd,_0x586883)=>{const _0x49fbca=_0x42f309;if(_0x5d43fd[_0x49fbca(0x383)]>_0x5d43fd[_0x49fbca(0x33e)])_0x586883[_0x49fbca(0x497)]({'code':_0x49fbca(0x2b6),'path':[_0x49fbca(0x383)],'message':_0x49fbca(0x325)});const _0x5862f7=Number(BigInt(_0x5d43fd[_0x49fbca(0x33e)]-_0x5d43fd[_0x49fbca(0x383)])*0x2710n/BigInt(_0x5d43fd[_0x49fbca(0x33e)]));if(_0x5d43fd[_0x49fbca(0x3cd)]!==_0x5862f7)_0x586883[_0x49fbca(0x497)]({'code':_0x49fbca(0x2b6),'path':[_0x49fbca(0x3cd)],'message':_0x49fbca(0x32a)});const _0x34bfcc=_0x5d43fd[_0x49fbca(0x3cd)]>=-0x335d+0x1*-0x4343+0x9bbc?_0x49fbca(0x30c):_0x5d43fd[_0x49fbca(0x3cd)]>=0xb23+-0xb23*0x1+0x84d*0x4?_0x49fbca(0x308):_0x49fbca(0x375);if(_0x5d43fd[_0x49fbca(0x232)]!==_0x34bfcc)_0x586883[_0x49fbca(0x497)]({'code':_0x49fbca(0x2b6),'path':[_0x49fbca(0x232)],'message':_0x49fbca(0x3b5)});if(_0x5d43fd[_0x49fbca(0x2e6)]!==(_0x5d43fd[_0x49fbca(0x232)]!==_0x49fbca(0x30c)))_0x586883[_0x49fbca(0x497)]({'code':_0x49fbca(0x2b6),'path':[_0x49fbca(0x2e6)],'message':_0x49fbca(0x3b1)});});export const conversationHostingCleanupPreviewInputSchema=z[_0x42f309(0x1e4)]({'inactiveDays':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](-0x8ce+-0x1*0x1957+0x2226)[_0x42f309(0x2a0)](0x5*-0x565+0x1bcf+0x97)})[_0x42f309(0x1f4)]();export const conversationHostingCleanupExecuteInputSchema=conversationHostingCleanupPreviewInputSchema;export const conversationHostingCleanupPreviewSchema=z[_0x42f309(0x1e4)]({'inactiveDays':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0x7cf*-0x5+0xc*0x262+0x4*0x29d)[_0x42f309(0x2a0)](0x838+-0x22e4+0x1c19),'cutoffAt':nonnegativeSafeIntegerSchema,'candidateConversationCount':nonnegativeSafeIntegerSchema,'reclaimableBytes':nonnegativeSafeIntegerSchema,'measuredAt':nonnegativeSafeIntegerSchema})[_0x42f309(0x1f4)]();export const conversationHostingCleanupResultSchema=z[_0x42f309(0x1e4)]({'inactiveDays':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0x329*0xa+0xbfe+0x1*-0x2b97)[_0x42f309(0x2a0)](0x3*-0x329+-0x2430+0x2*0x178c),'cutoffAt':nonnegativeSafeIntegerSchema,'deletedConversationCount':nonnegativeSafeIntegerSchema,'releasedBytes':nonnegativeSafeIntegerSchema,'skippedConversationCount':nonnegativeSafeIntegerSchema,'completedAt':nonnegativeSafeIntegerSchema})[_0x42f309(0x1f4)]();export const runtimeCommandSchema=z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x448)]([_0x42f309(0x3e1),_0x42f309(0x328),_0x42f309(0x42e),_0x42f309(0x3a6)]),'command':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x23*-0xcd+-0x1e3b+-0x1*-0x3a43)[_0x42f309(0x2a0)](0x9cf+-0x7b+-0x2*0x46a),'available':z[_0x42f309(0x400)](),'version':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0xbbb+0xef*-0xe+0x18ce)[_0x42f309(0x2a0)](-0x1245*0x2+0x2304+-0x52*-0xb)[_0x42f309(0x41d)](),'path':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x1*-0x4bd+0x1*-0x483+-0x39)[_0x42f309(0x2a0)](-0x8*-0x401+0x1b18+-0x20*0x199)[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]();export const nodeUpgradeStatusSchema=z[_0x42f309(0x1e4)]({'state':z[_0x42f309(0x448)]([_0x42f309(0x476),_0x42f309(0x1f7),_0x42f309(0x447),_0x42f309(0x3e9)]),'targetVersion':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/u)[_0x42f309(0x41d)](),'activeRunCount':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)](),'errorCode':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x17d+0x2381+0x2203*-0x1)[_0x42f309(0x2a0)](-0x1a1d+-0xbf5+0x1331*0x2)[_0x42f309(0x41d)](),'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()});export const nodeMetadataSchema=z[_0x42f309(0x1e4)]({'platform':nodePlatformSchema[_0x42f309(0x41d)](),'architecture':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x2571+-0x2*0x137c+-0x2635*-0x2)[_0x42f309(0x2a0)](-0x2*-0x740+-0xfe6+0x36*0x9)[_0x42f309(0x41d)](),'nodeAppVersion':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x5bb+-0x23d7+0x1e1d)[_0x42f309(0x2a0)](0x112b*-0x2+0x10*0x24b+0x1*-0x1da)[_0x42f309(0x41d)](),'nodeVersion':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x513+0x9*0x1e9+0x1bb*-0x7)[_0x42f309(0x2a0)](-0x297+-0x37d+0x694)[_0x42f309(0x41d)](),'osRelease':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x134*0x7+0x18e7+-0x2053)[_0x42f309(0x41d)](),'osVersion':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0xc7*-0x1+-0x1*0x1979+0x1b40)[_0x42f309(0x41d)](),'codex':runnerAvailabilitySchema[_0x42f309(0x41d)](),'claudeCode':runnerAvailabilitySchema[_0x42f309(0x41d)](),'openCode':runnerAvailabilitySchema[_0x42f309(0x41d)](),'marAgent':runnerAvailabilitySchema[_0x42f309(0x41d)](),'runtimeCommands':z[_0x42f309(0x298)](runtimeCommandSchema)[_0x42f309(0x2a0)](-0x2709*0x1+0x17*0x18b+-0xe*-0x42)[_0x42f309(0x41d)](),'supervisedUpgrade':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'upgrade':nodeUpgradeStatusSchema[_0x42f309(0x41d)]()})[_0x42f309(0x42d)]()[_0x42f309(0x1f4)]()[_0x42f309(0x41d)]();export const nodeCapabilitiesSchema=z[_0x42f309(0x1e4)]({'platform':nodePlatformSchema,'architecture':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xa65+-0x3*-0xa67+-0x14cf)[_0x42f309(0x2a0)](-0x1*-0x10ef+-0xe7c+0x1*-0x1f3),'nodeAppVersion':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x70e+0x15*0x1d3+-0x1f40)[_0x42f309(0x2a0)](-0x1c*-0x155+0x4*-0x38c+-0x2*0xb4e)[_0x42f309(0x41d)](),'nodeVersion':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x2c*0x5c+-0x1*0xb4e+-0x481*0x1)[_0x42f309(0x2a0)](0x5d*0x35+-0x1c08+0x947),'metadata':nodeMetadataSchema,'codex':runnerAvailabilitySchema,'claudeCode':runnerAvailabilitySchema,'openCode':runnerAvailabilitySchema[_0x42f309(0x41d)](),'marAgent':runnerAvailabilitySchema[_0x42f309(0x41d)](),'conversationHosting':conversationHostingCapabilitySchema[_0x42f309(0x41d)](),'marAgentRuntimeCredentials':marAgentRuntimeCredentialCapabilitySchema[_0x42f309(0x41d)]()})[_0x42f309(0x225)]((_0x5ef46e,_0x2e1e13)=>{const _0x33ff52=_0x42f309;if(_0x5ef46e[_0x33ff52(0x28d)]!==_0x33ff52(0x48a)&&_0x5ef46e[_0x33ff52(0x271)]?.[_0x33ff52(0x3f1)]===_0x33ff52(0x375))_0x2e1e13[_0x33ff52(0x497)]({'code':_0x33ff52(0x2b6),'path':[_0x33ff52(0x271)],'message':_0x33ff52(0x2dc)});if(_0x5ef46e[_0x33ff52(0x271)]?.[_0x33ff52(0x3f1)]===_0x33ff52(0x375)&&_0x5ef46e[_0x33ff52(0x307)]?.[_0x33ff52(0x381)]!==!![])_0x2e1e13[_0x33ff52(0x497)]({'code':_0x33ff52(0x2b6),'path':[_0x33ff52(0x307)],'message':_0x33ff52(0x455)});});export const workspaceKindSchema=z[_0x42f309(0x448)]([_0x42f309(0x3c9),_0x42f309(0x49b)]);export const gitSummarySchema=z[_0x42f309(0x1e4)]({'commonDir':z[_0x42f309(0x259)](),'head':z[_0x42f309(0x259)](),'branch':z[_0x42f309(0x259)]()[_0x42f309(0x498)](),'dirty':z[_0x42f309(0x400)](),'snapshot':z[_0x42f309(0x259)]()});export const runnerNameSchema=z[_0x42f309(0x448)]([_0x42f309(0x241),_0x42f309(0x28b),_0x42f309(0x411),_0x42f309(0x404)]);export const workspaceSessionCleanupResultSchema=z[_0x42f309(0x1e4)]({'deleted':nonnegativeSafeIntegerSchema,'skipped':nonnegativeSafeIntegerSchema,'failed':nonnegativeSafeIntegerSchema,'deletedByRunner':z[_0x42f309(0x1e4)]({'codex':nonnegativeSafeIntegerSchema,'claude-code':nonnegativeSafeIntegerSchema,'opencode':nonnegativeSafeIntegerSchema,'mar-agent':nonnegativeSafeIntegerSchema})[_0x42f309(0x42d)]()[_0x42f309(0x1f4)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x2fb9c8,_0x44732d)=>{const _0x3b420a=_0x42f309,_0x11a5a2=Object[_0x3b420a(0x3c7)](_0x2fb9c8[_0x3b420a(0x218)])[_0x3b420a(0x1c7)]((_0x563514,_0x3ebc3a)=>_0x563514+(_0x3ebc3a??-0x4ff*-0x1+-0x1*-0xfa7+-0x14a6),-0x5*0x2b5+-0xe3*0xd+-0x2*-0xc88);if(_0x11a5a2!==_0x2fb9c8[_0x3b420a(0x449)])_0x44732d[_0x3b420a(0x497)]({'code':_0x3b420a(0x2b6),'path':[_0x3b420a(0x218)],'message':_0x3b420a(0x297)});});export const runnerUsageStatusSchema=z[_0x42f309(0x1e4)]({'runner':runnerNameSchema,'available':z[_0x42f309(0x400)](),'reasonCode':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1*0x22c6+0x451+0xe*0x22d)[_0x42f309(0x2a0)](0x798+-0x96b*-0x3+-0x2389)[_0x42f309(0x498)]()});export const runnerUsageWindowSchema=z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x5*0xb+0x1767+-0x4a3*0x5)[_0x42f309(0x2a0)](-0x71e*0x3+0x4f*0x75+-0xe71),'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x14b*-0x4+0x2138+0x1*-0x1c0b)[_0x42f309(0x2a0)](0x1cbb+-0x1a21+-0x21a),'usedPercentage':z[_0x42f309(0x38d)]()[_0x42f309(0x341)]()[_0x42f309(0x4af)](0x1*-0xa67+-0x130+0xb97)[_0x42f309(0x2a0)](0x277*0x2+-0x1*0x2231+0x1da7),'resetsAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()});export const runnerUsageSchema=z[_0x42f309(0x1e4)]({'runner':runnerNameSchema,'windows':z[_0x42f309(0x298)](runnerUsageWindowSchema)[_0x42f309(0x4af)](0x3*-0x796+-0x1977+0x1*0x303a)[_0x42f309(0x2a0)](0x17b*0x7+-0x1e*0x137+-0x539*-0x5),'fetchedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'cached':z[_0x42f309(0x400)]()});export const runnerControlLevelSchema=z[_0x42f309(0x448)]([_0x42f309(0x26c),_0x42f309(0x464),_0x42f309(0x300)]);export const runnerCapabilitiesSchema=z[_0x42f309(0x1e4)]({'available':z[_0x42f309(0x400)](),'version':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x2b*-0x7d+-0x11e6+-0x1*-0x2765)[_0x42f309(0x41d)](),'controlLevel':runnerControlLevelSchema,'supportsResume':z[_0x42f309(0x400)](),'supportsExternalSession':z[_0x42f309(0x400)]()});export const runnerDefinitionSchema=z[_0x42f309(0x1e4)]({'name':runnerNameSchema,'capabilities':runnerCapabilitiesSchema});export const runnerDefinitions={'codex':{'name':_0x42f309(0x241),'capabilities':{'available':![],'controlLevel':_0x42f309(0x300),'supportsResume':!![],'supportsExternalSession':!![]}},'claude-code':{'name':_0x42f309(0x28b),'capabilities':{'available':![],'controlLevel':_0x42f309(0x300),'supportsResume':!![],'supportsExternalSession':!![]}},'opencode':{'name':_0x42f309(0x411),'capabilities':{'available':![],'controlLevel':_0x42f309(0x300),'supportsResume':!![],'supportsExternalSession':!![]}},'mar-agent':{'name':_0x42f309(0x404),'capabilities':{'available':![],'controlLevel':_0x42f309(0x300),'supportsResume':!![],'supportsExternalSession':![]}}};export const marAgentModelProtocolSchema=z[_0x42f309(0x448)]([_0x42f309(0x2f3),_0x42f309(0x34f)]);export const marAgentInputCapabilitySchema=z[_0x42f309(0x448)]([_0x42f309(0x212),_0x42f309(0x418)]);export const marAgentOutputCapabilitySchema=z[_0x42f309(0x25c)](_0x42f309(0x212));export const marAgentReasoningEffortSchema=z[_0x42f309(0x448)]([_0x42f309(0x247),_0x42f309(0x1d8),_0x42f309(0x2ba),_0x42f309(0x2f5),_0x42f309(0x2a0),_0x42f309(0x40b)]);export function resolveMarAgentDefaultReasoningEffort(_0x1e6e11,_0x52ae43){const _0x50bebb=_0x42f309,_0x5ae088=marAgentReasoningEffortSchema[_0x50bebb(0x261)](_0x1e6e11);if(_0x5ae088[_0x50bebb(0x2db)]&&(_0x52ae43[_0x50bebb(0x27d)]===-0x845+0x2bd*-0x7+0x1b70||_0x52ae43[_0x50bebb(0x32c)](_0x5ae088[_0x50bebb(0x31d)])))return _0x5ae088[_0x50bebb(0x31d)];if(_0x52ae43[_0x50bebb(0x32c)](_0x50bebb(0x1d8)))return _0x50bebb(0x1d8);const _0x41f46f=marAgentReasoningEffortSchema[_0x50bebb(0x261)](_0x52ae43[0x56b+-0xa88*-0x1+-0xff3*0x1]);return _0x41f46f[_0x50bebb(0x2db)]?_0x41f46f[_0x50bebb(0x31d)]:_0x50bebb(0x1d8);}export const marAgentResponsesTransportSchema=z[_0x42f309(0x420)](_0x42f309(0x2c2),[z[_0x42f309(0x1e4)]({'transport':z[_0x42f309(0x25c)](_0x42f309(0x499))})[_0x42f309(0x1f4)](),z[_0x42f309(0x1e4)]({'transport':z[_0x42f309(0x25c)](_0x42f309(0x45c)),'httpVersion':runtimeCredentialHttpVersionSchema})[_0x42f309(0x1f4)]()]);export const runtimeCredentialTicketSchema=z[_0x42f309(0x1e4)]({'userId':positiveSafeIntegerSchema,'credentialId':boundedIdentifierSchema,'nodeId':boundedIdentifierSchema,'workspaceId':boundedIdentifierSchema,'sessionId':boundedIdentifierSchema[_0x42f309(0x41d)](),'runtimeScopeId':boundedIdentifierSchema,'allowedModelIds':z[_0x42f309(0x298)](boundedIdentifierSchema)[_0x42f309(0x4af)](-0x38a*-0x5+-0xb*0x57+-0xdf4)[_0x42f309(0x2a0)](-0x7*0x495+-0x148b+0x34de),'purpose':z[_0x42f309(0x448)]([_0x42f309(0x2f7),_0x42f309(0x451)])[_0x42f309(0x41d)](),'issuedAt':nonnegativeSafeIntegerSchema,'expiresAt':positiveSafeIntegerSchema,'nonce':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x308+0x1d8c*-0x1+0x2095*0x1)[_0x42f309(0x2a0)](-0x579+-0x109a+0x1*0x1693),'signature':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[a-f0-9]{64}$/u)})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x23b2fb,_0x45af8e)=>{const _0x2cee65=_0x42f309;if(new Set(_0x23b2fb[_0x2cee65(0x44e)])[_0x2cee65(0x3cf)]!==_0x23b2fb[_0x2cee65(0x44e)][_0x2cee65(0x27d)])_0x45af8e[_0x2cee65(0x497)]({'code':_0x2cee65(0x2b6),'path':[_0x2cee65(0x44e)],'message':_0x2cee65(0x260)});if(_0x23b2fb[_0x2cee65(0x40c)]<=_0x23b2fb[_0x2cee65(0x3ad)]||_0x23b2fb[_0x2cee65(0x40c)]-_0x23b2fb[_0x2cee65(0x3ad)]>(0x3f5*-0x4+-0x1eba+0x7*0x6aa)*(-0x1*-0x1e4d+-0x122*0x9+-0x13df)*(0x1198*0x2+-0x603+-0x1cf1)*(0x1c*-0x5e+-0x425*-0x2+0x2*0x2f3))_0x45af8e[_0x2cee65(0x497)]({'code':_0x2cee65(0x2b6),'path':[_0x2cee65(0x40c)],'message':_0x2cee65(0x4a5)});});export const runtimeCredentialResolveRequestSchema=z[_0x42f309(0x1e4)]({'ticket':runtimeCredentialTicketSchema,'modelId':boundedIdentifierSchema,'runtimeScopeId':boundedIdentifierSchema,'executionId':boundedIdentifierSchema,'reason':z[_0x42f309(0x448)]([_0x42f309(0x433),_0x42f309(0x310),_0x42f309(0x1ec)])})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x3ff94b,_0xcebd61)=>{const _0x5619bc=_0x42f309;if(_0x3ff94b[_0x5619bc(0x48d)]!==_0x3ff94b[_0x5619bc(0x3de)][_0x5619bc(0x48d)])_0xcebd61[_0x5619bc(0x497)]({'code':_0x5619bc(0x2b6),'path':[_0x5619bc(0x48d)],'message':_0x5619bc(0x25a)});if(!_0x3ff94b[_0x5619bc(0x3de)][_0x5619bc(0x44e)][_0x5619bc(0x32c)](_0x3ff94b[_0x5619bc(0x3c4)]))_0xcebd61[_0x5619bc(0x497)]({'code':_0x5619bc(0x2b6),'path':[_0x5619bc(0x3c4)],'message':_0x5619bc(0x486)});});const runtimeCredentialHeadersSchema=z[_0x42f309(0x48c)](z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x3c*0x49+0x2536+0x203*-0x1b)[_0x42f309(0x2a0)](0x826+0x1*-0x19ca+0x6c*0x2b)[_0x42f309(0x4ae)](/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/u),z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x2659*-0x1+-0xee2+-0x481*-0x9))[_0x42f309(0x225)]((_0xbf33a5,_0x1ebc91)=>{const _0x19c29f=_0x42f309,_0x1570c1=Object[_0x19c29f(0x40f)](_0xbf33a5);if(_0x1570c1[_0x19c29f(0x27d)]>-0x11c*-0x1a+-0x7e0*-0x4+-0x3c38)_0x1ebc91[_0x19c29f(0x497)]({'code':_0x19c29f(0x2b6),'message':_0x19c29f(0x3bb)});const _0x273e1a=_0x1570c1[_0x19c29f(0x1c7)]((_0x2ee1ac,[_0x57ecaf,_0x1c145b])=>_0x2ee1ac+utf8ByteLength(_0x57ecaf)+utf8ByteLength(_0x1c145b),-0x31b*-0x6+-0xb*0x32b+-0x1037*-0x1);if(_0x273e1a>-0xbe*-0xbc+0x1f3*0xb3+-0xe871*0x1)_0x1ebc91[_0x19c29f(0x497)]({'code':_0x19c29f(0x2b6),'message':_0x19c29f(0x245)});});export const resolvedRuntimeCredentialSchema=z[_0x42f309(0x1e4)]({'bearer':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2*-0xca7+0x1d2+-0x1b1f)[_0x42f309(0x2a0)](0x73f*0x1f+-0x1*-0xc4a9+0x1*-0xa54a),'headers':runtimeCredentialHeadersSchema,'socks5Url':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](-0x899+-0xb8*-0x13+0x2f1)[_0x42f309(0x469)](_0x38ba70=>new URL(_0x38ba70)[_0x42f309(0x296)]===_0x42f309(0x20b),_0x42f309(0x4cb))[_0x42f309(0x41d)](),'expiresAt':positiveSafeIntegerSchema,'revision':positiveSafeIntegerSchema})[_0x42f309(0x1f4)]();const runtimeCredentialResolveErrorSchema=z[_0x42f309(0x1e4)]({'code':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,79}$/u),'message':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x65*0xe+0x2*0x4f7+0xa1*-0x7)[_0x42f309(0x2a0)](0x85*0x1f+-0xbd7+-0x244),'recoverable':z[_0x42f309(0x400)](),'retryAfterMs':positiveSafeIntegerSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]();export const runtimeCredentialResolveResponseSchema=z[_0x42f309(0x3bd)]([z[_0x42f309(0x1e4)]({'credential':resolvedRuntimeCredentialSchema,'nextTicket':runtimeCredentialTicketSchema})[_0x42f309(0x1f4)](),z[_0x42f309(0x1e4)]({'error':runtimeCredentialResolveErrorSchema})[_0x42f309(0x1f4)]()]);const marAgentInlineApiKeyCredentialSchema=z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x3ef)),'value':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x17b4+-0x7e2+0x1f97*0x1)[_0x42f309(0x2a0)](-0x3a02+0xd5*-0x65+0xce0b)})[_0x42f309(0x1f4)]();export const marAgentModelCredentialSchema=z[_0x42f309(0x420)](_0x42f309(0x38b),[marAgentInlineApiKeyCredentialSchema,z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x47e)),'credentialId':boundedIdentifierSchema})[_0x42f309(0x1f4)]()]);const marAgentRuntimeCredentialSchema=z[_0x42f309(0x3bd)]([marAgentInlineApiKeyCredentialSchema,z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x382)),'credentialId':boundedIdentifierSchema,'ticket':runtimeCredentialTicketSchema})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x54ff54,_0x2d4fdd)=>{const _0x57f9a3=_0x42f309;if(_0x54ff54[_0x57f9a3(0x1e7)]!==_0x54ff54[_0x57f9a3(0x3de)][_0x57f9a3(0x1e7)])_0x2d4fdd[_0x57f9a3(0x497)]({'code':_0x57f9a3(0x2b6),'path':[_0x57f9a3(0x1e7)],'message':_0x57f9a3(0x34e)});})]),marAgentImageGenerationSchema=z[_0x42f309(0x1e4)]({'provider':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x359*0x7+-0x71*-0xb+0x22d*-0xd)[_0x42f309(0x2a0)](-0x3e*0x43+-0x12d6+0x14*0x1c4)[_0x42f309(0x41d)](),'config':z[_0x42f309(0x48c)](z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x16c*0x18+0x46+-0xf*0x24b)[_0x42f309(0x2a0)](-0x4a6*0x2+0x6*-0x11b+0x106e),z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1581+0x6d6+0x16ab*0x1))[_0x42f309(0x41d)](),'generateEndpoint':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](0x1*-0xd06+-0x12a7+0x7*0x5ab),'editEndpoint':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](-0x1*0x1aa7+-0x2536+0x47dd),'imageModelId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x98*-0x7+-0x1*-0x2365+-0x1f3c*0x1)[_0x42f309(0x2a0)](-0xf*-0x1e2+-0x3*0xcaa+0xac0),'httpVersion':z[_0x42f309(0x448)]([_0x42f309(0x1e1),'2']),'credential':marAgentRuntimeCredentialSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]();export const imageGenerationUrlSchema=z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](-0xa6d+-0x107b+-0x8*-0x45d)[_0x42f309(0x469)](_0x53cc03=>{const _0x5a07a2=_0x42f309;let _0x4131f0;try{_0x4131f0=new URL(_0x53cc03);}catch{return![];}return!_0x4131f0[_0x5a07a2(0x2a2)]&&!_0x4131f0[_0x5a07a2(0x462)]&&!_0x4131f0[_0x5a07a2(0x4a4)]&&!_0x4131f0[_0x5a07a2(0x38e)]&&(_0x4131f0[_0x5a07a2(0x296)]===_0x5a07a2(0x43f)||_0x4131f0[_0x5a07a2(0x296)]===_0x5a07a2(0x1fc)&&[_0x5a07a2(0x2f4),_0x5a07a2(0x2df),_0x5a07a2(0x4bc)][_0x5a07a2(0x32c)](_0x4131f0[_0x5a07a2(0x1e6)]));});export const imageGenerationConfigurationSchema=z[_0x42f309(0x420)](_0x42f309(0x256),[z[_0x42f309(0x1e4)]({'provider':z[_0x42f309(0x25c)](_0x42f309(0x2cd)),'config':z[_0x42f309(0x1e4)]({'credentialId':boundedIdentifierSchema,'modelId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x1d*0x75+-0x1267+0x1fa9)[_0x42f309(0x2a0)](-0x1df3+-0x2203*0x1+0x40f6)})[_0x42f309(0x1f4)]()})[_0x42f309(0x1f4)](),z[_0x42f309(0x1e4)]({'provider':z[_0x42f309(0x25c)](_0x42f309(0x4cc)),'config':z[_0x42f309(0x1e4)]({'url':imageGenerationUrlSchema[_0x42f309(0x41d)](),'modelId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x1f3a+0x6*-0x295+0x2eb9)[_0x42f309(0x2a0)](-0x7*0x269+-0x1364+0x2543),'apiKey':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x2597*0x1+-0x2b*0xdd+0x1*-0x77)[_0x42f309(0x2a0)](-0x128d*-0x6+0x2509+0x95f*-0x9)[_0x42f309(0x41d)](),'hasApiKey':z[_0x42f309(0x400)]()[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()})[_0x42f309(0x1f4)]()]);const imageGenerationModelFields={'id':boundedIdentifierSchema,'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1c97+-0x1*-0x1f4f+-0x1*0x3be5)[_0x42f309(0x2a0)](0x1b23*-0x1+0x1a49+0x15a),'enabled':z[_0x42f309(0x400)]()};export const imageGenerationModelSchema=z[_0x42f309(0x420)](_0x42f309(0x256),[imageGenerationConfigurationSchema[_0x42f309(0x32f)][0xa*0x28d+0x4ba+-0x1*0x1e3c][_0x42f309(0x2de)](imageGenerationModelFields),imageGenerationConfigurationSchema[_0x42f309(0x32f)][0x18f*-0xd+0x611*-0x2+-0x1a*-0x13f][_0x42f309(0x2de)](imageGenerationModelFields)]);export const imageGenerationCatalogSchema=z[_0x42f309(0x298)](imageGenerationModelSchema)[_0x42f309(0x2a0)](0x2*-0xa91+0x76*0x5+0x1ec*0xa)[_0x42f309(0x225)]((_0x3802ac,_0x3e4617)=>{const _0x585f1a=_0x42f309;if(new Set(_0x3802ac[_0x585f1a(0x27e)](_0x820cf4=>_0x820cf4['id']))[_0x585f1a(0x3cf)]!==_0x3802ac[_0x585f1a(0x27d)])_0x3e4617[_0x585f1a(0x497)]({'code':_0x585f1a(0x2b6),'message':_0x585f1a(0x3bf)});});function _0xe5ef(_0xeb156d,_0x47ae85){_0xeb156d=_0xeb156d-(0x210a+0x1a30+0x1*-0x3979);const _0x138118=_0xc523();let _0x537e50=_0x138118[_0xeb156d];if(_0xe5ef['USRWfp']===undefined){var _0x34f403=function(_0x27b17f){const _0x264074='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x43fccf='',_0x121931='';for(let _0x390fc2=0x7*0x449+0x2*-0x9e+-0x1cc3,_0x5b23f7,_0x24f099,_0x10c26b=0x607*-0x2+-0xc*-0x10+0xb4e;_0x24f099=_0x27b17f['charAt'](_0x10c26b++);~_0x24f099&&(_0x5b23f7=_0x390fc2%(-0x1763+0x1*0x753+0x126*0xe)?_0x5b23f7*(-0x1*0x8e+0xc1*0x2b+-0x1f9d)+_0x24f099:_0x24f099,_0x390fc2++%(-0xb5c+-0x29*-0xa4+0xee4*-0x1))?_0x43fccf+=String['fromCharCode'](0x16*0xc7+0xb92*-0x2+-0x1*-0x709&_0x5b23f7>>(-(0x3*0x336+-0x1e3b+0x19*0xd3)*_0x390fc2&0x249b+0x2*-0xc5d+-0xbdb*0x1)):0x206d+-0x5d5*0x1+-0x1a98){_0x24f099=_0x264074['indexOf'](_0x24f099);}for(let _0x2d0660=0x22ab+-0x1*-0x24fa+-0x47a5,_0x526a82=_0x43fccf['length'];_0x2d0660<_0x526a82;_0x2d0660++){_0x121931+='%'+('00'+_0x43fccf['charCodeAt'](_0x2d0660)['toString'](0x7ed*0x4+0x1546+0x2*-0x1a75))['slice'](-(0x14*-0x1be+0x9*0x21a+-0x550*-0x3));}return decodeURIComponent(_0x121931);};_0xe5ef['TzfBIT']=_0x34f403,_0xe5ef['nKeZxG']={},_0xe5ef['USRWfp']=!![];}const _0x15b77=_0x138118[0x1edc+-0x21f3+0x1*0x317];_0xe5ef['FfEQaP']!==_0x15b77&&(_0xe5ef['nKeZxG']={},_0xe5ef['FfEQaP']=_0x15b77);const _0x37af5d=_0xe5ef['nKeZxG'][_0xeb156d];return _0x37af5d===undefined?(_0x537e50=_0xe5ef['TzfBIT'](_0x537e50),_0xe5ef['nKeZxG'][_0xeb156d]=_0x537e50):_0x537e50=_0x37af5d,_0x537e50;}const marAgentModelShape={'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x3*0xbb5+-0x14*0x141+-0x3c34*-0x1)[_0x42f309(0x2a0)](0x1b3+-0x1d4d+-0x42*-0x6d),'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0xd60+-0x1*-0x18d1+-0xb70)[_0x42f309(0x2a0)](-0x1f3*-0xb+-0x2484+0xf93),'protocol':marAgentModelProtocolSchema,'modelId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x15df+-0x1b6*-0xb+-0x28b0)[_0x42f309(0x2a0)](0x1*0x1230+0x559+0x1689*-0x1),'contextWindowTokens':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'maxOutputTokens':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'inputCapabilities':z[_0x42f309(0x298)](marAgentInputCapabilitySchema)[_0x42f309(0x4af)](-0x6a2+-0x1*0x12f4+-0x1997*-0x1)[_0x42f309(0x2a0)](-0xc67+0x1dca+-0x3*0x5cb),'outputCapabilities':z[_0x42f309(0x4b8)]([marAgentOutputCapabilitySchema]),'reasoningEfforts':z[_0x42f309(0x298)](marAgentReasoningEffortSchema)[_0x42f309(0x2a0)](-0x1b37*0x1+0xbc9+0xf74),'defaultReasoningEffort':marAgentReasoningEffortSchema[_0x42f309(0x41d)](),'titleGeneration':z[_0x42f309(0x400)]()[_0x42f309(0x466)](![]),'codeMode':z[_0x42f309(0x400)]()[_0x42f309(0x466)](![]),'hostedWebSearch':z[_0x42f309(0x400)](),'responsesTransport':marAgentResponsesTransportSchema[_0x42f309(0x41d)](),'responsesEncoding':z[_0x42f309(0x448)]([_0x42f309(0x236),_0x42f309(0x470)])[_0x42f309(0x41d)](),'responsesPreviousResponseId':z[_0x42f309(0x400)]()[_0x42f309(0x466)](![]),'enabled':z[_0x42f309(0x400)]()};function refineMarAgentModel(_0x4d799b){const _0x3a6976=_0x42f309;return _0x4d799b[_0x3a6976(0x225)]((_0x32fff2,_0x11069a)=>{const _0x24598b=_0x3a6976;if(!_0x32fff2[_0x24598b(0x33d)][_0x24598b(0x32c)](_0x24598b(0x212)))_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'message':_0x24598b(0x456)});if(_0x32fff2[_0x24598b(0x41e)]>=_0x32fff2[_0x24598b(0x2cc)])_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'message':_0x24598b(0x32b)});if(new Set(_0x32fff2[_0x24598b(0x219)])[_0x24598b(0x3cf)]!==_0x32fff2[_0x24598b(0x219)][_0x24598b(0x27d)])_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'message':_0x24598b(0x1cf)});if(_0x32fff2[_0x24598b(0x286)]!==undefined&&_0x32fff2[_0x24598b(0x219)][_0x24598b(0x27d)]>-0x859*-0x2+0x573*0x6+-0x3164&&!_0x32fff2[_0x24598b(0x219)][_0x24598b(0x32c)](_0x32fff2[_0x24598b(0x286)]))_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'path':[_0x24598b(0x286)],'message':_0x24598b(0x26b)});if(_0x32fff2[_0x24598b(0x296)]===_0x24598b(0x34f)&&_0x32fff2[_0x24598b(0x227)])_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'message':_0x24598b(0x3c5)});if(_0x32fff2[_0x24598b(0x296)]!==_0x24598b(0x2f3)&&_0x32fff2[_0x24598b(0x3b9)]!==undefined)_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'message':_0x24598b(0x2c0)});if(_0x32fff2[_0x24598b(0x296)]!==_0x24598b(0x2f3)&&_0x32fff2[_0x24598b(0x4b0)])_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'message':_0x24598b(0x4c4)});if(_0x32fff2[_0x24598b(0x296)]!==_0x24598b(0x2f3)&&_0x32fff2[_0x24598b(0x422)]!==undefined)_0x11069a[_0x24598b(0x497)]({'code':_0x24598b(0x2b6),'message':_0x24598b(0x29b)});});}const marAgentModelSummaryShape={...marAgentModelShape,'baseUrl':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](0x151e+-0x1fd1+0x12b3),'sortOrder':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)](),'apiKeyConfigured':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'credentialType':z[_0x42f309(0x448)]([_0x42f309(0x3ef),_0x42f309(0x47e)])[_0x42f309(0x41d)](),'credentialConfigured':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'lastTestedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()[_0x42f309(0x41d)](),'lastTestStatus':z[_0x42f309(0x448)]([_0x42f309(0x406),_0x42f309(0x45d),_0x42f309(0x3e9)])[_0x42f309(0x498)]()[_0x42f309(0x41d)](),'lastTestCode':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0xc18+0x8d4+-0x394*-0x1)[_0x42f309(0x498)]()[_0x42f309(0x41d)]()};export const marAgentNodeModelSummarySchema=refineMarAgentModel(z[_0x42f309(0x1e4)](marAgentModelSummaryShape)[_0x42f309(0x1f4)]());export const marAgentModelSummarySchema=refineMarAgentModel(z[_0x42f309(0x1e4)]({...marAgentModelSummaryShape,'access':z[_0x42f309(0x448)]([_0x42f309(0x21c),_0x42f309(0x293)])})[_0x42f309(0x1f4)]());export const marAgentRuntimeModelConfigurationSchema=refineMarAgentModel(z[_0x42f309(0x1e4)]({...marAgentModelShape,'baseUrl':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](0x566*0x5+0x130a+-0x2*0x1304),'apiKey':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x256*-0xb+-0x1d1d*-0x1+-0x36ce)[_0x42f309(0x2a0)](0x7f56+-0x293f+-0x1617)[_0x42f309(0x41d)](),'credential':marAgentRuntimeCredentialSchema[_0x42f309(0x41d)](),'imageGeneration':marAgentImageGenerationSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]())[_0x42f309(0x225)]((_0x4c077d,_0x2ba4d3)=>{const _0x42ab58=_0x42f309;if(_0x4c077d[_0x42ab58(0x2b0)]===undefined===(_0x4c077d[_0x42ab58(0x2e1)]===undefined))_0x2ba4d3[_0x42ab58(0x497)]({'code':_0x42ab58(0x2b6),'message':_0x42ab58(0x2c3)});if(_0x4c077d[_0x42ab58(0x21b)]!==undefined&&_0x4c077d[_0x42ab58(0x21b)][_0x42ab58(0x2e1)]!==undefined&&(_0x4c077d[_0x42ab58(0x21b)][_0x42ab58(0x256)]===_0x42ab58(0x4cc)?_0x4c077d[_0x42ab58(0x21b)][_0x42ab58(0x2e1)][_0x42ab58(0x38b)]!==_0x42ab58(0x3ef):_0x4c077d[_0x42ab58(0x21b)][_0x42ab58(0x2e1)][_0x42ab58(0x38b)]!==_0x42ab58(0x382)||_0x4c077d[_0x42ab58(0x21b)][_0x42ab58(0x2e1)][_0x42ab58(0x3de)][_0x42ab58(0x367)]!==_0x42ab58(0x451)))_0x2ba4d3[_0x42ab58(0x497)]({'code':_0x42ab58(0x2b6),'path':[_0x42ab58(0x21b)],'message':_0x42ab58(0x23e)});});export const marAgentModelTransportTestInputSchema=z[_0x42f309(0x1e4)]({'runtimeScopeId':boundedIdentifierSchema,'executionId':boundedIdentifierSchema,'model':marAgentRuntimeModelConfigurationSchema})[_0x42f309(0x1f4)]();export const marAgentModelTransportTestResultSchema=z[_0x42f309(0x420)](_0x42f309(0x2db),[z[_0x42f309(0x1e4)]({'success':z[_0x42f309(0x25c)](!![]),'code':z[_0x42f309(0x43b)](),'message':z[_0x42f309(0x43b)](),'httpStatus':z[_0x42f309(0x43b)]()})[_0x42f309(0x1f4)](),z[_0x42f309(0x1e4)]({'success':z[_0x42f309(0x25c)](![]),'code':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0xad8*0x3+0xb9*-0x1f+-0xa20)[_0x42f309(0x2a0)](0x11e1+0x13ab*0x1+-0x253c),'message':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x1*0x8bf+0x61*0x19+-0xb9)[_0x42f309(0x2a0)](0x19a5+-0x275*0xd+0xa34),'httpStatus':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0x3*0x5bb+-0x93c+-0x791)[_0x42f309(0x2a0)](-0x1*-0x4a7+-0x1*0xbfb+0x9ab)[_0x42f309(0x498)]()})[_0x42f309(0x1f4)]()]);export const marAgentStoredModelConfigurationSchema=refineMarAgentModel(z[_0x42f309(0x1e4)]({...marAgentModelShape,'baseUrl':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](-0x88a*-0x3+0x3*-0x3ae+-0x694),'credential':marAgentModelCredentialSchema})[_0x42f309(0x1f4)]());const codexCredentialProxySummarySchema=z[_0x42f309(0x420)](_0x42f309(0x2a9),[z[_0x42f309(0x1e4)]({'configured':z[_0x42f309(0x25c)](![])})[_0x42f309(0x1f4)](),z[_0x42f309(0x1e4)]({'configured':z[_0x42f309(0x25c)](!![]),'host':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0xc07*-0x2+-0x1e3f+0x632*0x1)[_0x42f309(0x2a0)](-0x60b+-0x8bf*-0x3+-0x1335),'port':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0xd*0x241+-0xcb*-0x16+0x175f*-0x2)[_0x42f309(0x2a0)](-0x18992+0x11cd6+0x16cbb),'hasUsername':z[_0x42f309(0x400)]()})[_0x42f309(0x1f4)]()]);export const codexCredentialOwnershipSchema=z[_0x42f309(0x420)](_0x42f309(0x42f),[z[_0x42f309(0x1e4)]({'ownerType':z[_0x42f309(0x25c)](_0x42f309(0x2ee)),'ownerUserId':positiveSafeIntegerSchema})[_0x42f309(0x1f4)](),z[_0x42f309(0x1e4)]({'ownerType':z[_0x42f309(0x25c)](_0x42f309(0x436)),'ownerOrganizationId':positiveSafeIntegerSchema})[_0x42f309(0x1f4)](),z[_0x42f309(0x1e4)]({'ownerType':z[_0x42f309(0x25c)](_0x42f309(0x38a))})[_0x42f309(0x1f4)]()]);export const codexCredentialSummarySchema=z[_0x42f309(0x1e4)]({'id':boundedIdentifierSchema,'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x787+-0x6fb+0x8b*-0x1)[_0x42f309(0x2a0)](-0xb*-0xaa+0x18b5+-0x1f83),'type':z[_0x42f309(0x25c)](_0x42f309(0x31f)),'ownership':codexCredentialOwnershipSchema,'status':z[_0x42f309(0x448)]([_0x42f309(0x3f3),_0x42f309(0x357),_0x42f309(0x4a7)]),'accessTokenExpiresAt':nonnegativeSafeIntegerSchema[_0x42f309(0x498)](),'lastRefreshAt':nonnegativeSafeIntegerSchema[_0x42f309(0x498)](),'lastCheckedAt':nonnegativeSafeIntegerSchema[_0x42f309(0x498)](),'accountId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x19e9+-0x33*-0x81+-0x339b*0x1)[_0x42f309(0x2a0)](0x1bf0+-0x10*-0x172+0x13a*-0x28),'proxy':codexCredentialProxySummarySchema,'revision':positiveSafeIntegerSchema})[_0x42f309(0x1f4)]();export const codexCredentialDetailsSchema=z[_0x42f309(0x1e4)]({'credential':codexCredentialSummarySchema,'socks5Url':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](-0x7*0x1f7+-0x6fc+0x7*0x41b)[_0x42f309(0x498)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x5d1ce1,_0x4cf989)=>{const _0x27f43f=_0x42f309;if(_0x5d1ce1[_0x27f43f(0x35e)]===null){if(_0x5d1ce1[_0x27f43f(0x2e1)][_0x27f43f(0x39d)][_0x27f43f(0x2a9)])_0x4cf989[_0x27f43f(0x497)]({'code':_0x27f43f(0x2b6),'path':[_0x27f43f(0x35e)],'message':_0x27f43f(0x4a0)});return;}let _0xee16fd;try{_0xee16fd=new URL(_0x5d1ce1[_0x27f43f(0x35e)]);}catch{_0x4cf989[_0x27f43f(0x497)]({'code':_0x27f43f(0x2b6),'path':[_0x27f43f(0x35e)],'message':_0x27f43f(0x2fc)});return;}if(_0xee16fd[_0x27f43f(0x296)]!==_0x27f43f(0x20b)){_0x4cf989[_0x27f43f(0x497)]({'code':_0x27f43f(0x2b6),'path':[_0x27f43f(0x35e)],'message':_0x27f43f(0x37e)});return;}const _0x18a505=_0x5d1ce1[_0x27f43f(0x2e1)][_0x27f43f(0x39d)];if(!_0x18a505[_0x27f43f(0x2a9)]||_0x18a505[_0x27f43f(0x3b2)]!==_0xee16fd[_0x27f43f(0x1e6)]||_0x18a505[_0x27f43f(0x22d)]!==Number(_0xee16fd[_0x27f43f(0x22d)]||0x203c+0x839*0x1+-0x243d)||_0x18a505[_0x27f43f(0x28f)]!==_0xee16fd[_0x27f43f(0x2a2)][_0x27f43f(0x27d)]>0x1*0x1c42+-0x3*0x6ab+-0x841)_0x4cf989[_0x27f43f(0x497)]({'code':_0x27f43f(0x2b6),'path':[_0x27f43f(0x2e1),_0x27f43f(0x39d)],'message':_0x27f43f(0x372)});});export const codexLoginAttemptSchema=z[_0x42f309(0x1e4)]({'id':boundedIdentifierSchema,'status':z[_0x42f309(0x448)]([_0x42f309(0x402),_0x42f309(0x45d),_0x42f309(0x3e9),_0x42f309(0x228),_0x42f309(0x3e2)]),'userCode':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x19*-0xb2+0x88a+-0x52f*0x5)[_0x42f309(0x2a0)](0x3*-0x729+-0x141*0x7+0x1ec2)[_0x42f309(0x41d)](),'verificationUri':z[_0x42f309(0x259)]()[_0x42f309(0x452)]()[_0x42f309(0x2a0)](-0x11cb+0x20*-0xe7+0x36ab)[_0x42f309(0x41d)](),'expiresAt':nonnegativeSafeIntegerSchema[_0x42f309(0x41d)](),'pollIntervalMs':positiveSafeIntegerSchema[_0x42f309(0x2a0)](0x85*-0x237+-0x10f55+0x32048)[_0x42f309(0x41d)](),'credentialId':boundedIdentifierSchema[_0x42f309(0x41d)](),'code':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,79}$/u)[_0x42f309(0x41d)](),'message':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1ef2+-0x6b*0x53+0x41a4)[_0x42f309(0x2a0)](0x4ed+-0x1fa6+0x1cb9)[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x408621,_0x1d8a21)=>{const _0x2f6912=_0x42f309;if(_0x408621[_0x2f6912(0x20f)]===_0x2f6912(0x402)&&(_0x408621[_0x2f6912(0x1ef)]===undefined||_0x408621[_0x2f6912(0x481)]===undefined||_0x408621[_0x2f6912(0x40c)]===undefined||_0x408621[_0x2f6912(0x319)]===undefined))_0x1d8a21[_0x2f6912(0x497)]({'code':_0x2f6912(0x2b6),'message':_0x2f6912(0x3ca)});if(_0x408621[_0x2f6912(0x20f)]===_0x2f6912(0x45d)&&_0x408621[_0x2f6912(0x1e7)]===undefined)_0x1d8a21[_0x2f6912(0x497)]({'code':_0x2f6912(0x2b6),'message':_0x2f6912(0x3ae)});if(_0x408621[_0x2f6912(0x20f)]!==_0x2f6912(0x45d)&&_0x408621[_0x2f6912(0x1e7)]!==undefined)_0x1d8a21[_0x2f6912(0x497)]({'code':_0x2f6912(0x2b6),'path':[_0x2f6912(0x1e7)],'message':_0x2f6912(0x395)});});const codexModelCandidateSchema=z[_0x42f309(0x1e4)]({'upstreamModelId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x48c+-0x2626+-0x11*-0x283)[_0x42f309(0x2a0)](-0x3a1*-0x4+0x2429*0x1+-0x31ad),'displayName':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0xc65+0x5f*-0x1+-0xc05)[_0x42f309(0x2a0)](-0x633*0x2+-0x6db*0x1+0x1441),'description':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x2f5*-0x7+0x46f*0x7+0x122*0x5)[_0x42f309(0x41d)](),'contextWindowTokens':positiveSafeIntegerSchema[_0x42f309(0x41d)](),'maxOutputTokens':positiveSafeIntegerSchema[_0x42f309(0x41d)](),'reasoningEfforts':z[_0x42f309(0x298)](marAgentReasoningEffortSchema)[_0x42f309(0x2a0)](0xff2+0x6e9*0x1+-0x343*0x7),'defaultReasoningEffort':marAgentReasoningEffortSchema[_0x42f309(0x41d)](),'unsupportedReasoningEfforts':z[_0x42f309(0x298)](z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x18d7*0x1+0x1964+-0x323a)[_0x42f309(0x2a0)](0x1d5*-0x4+0x8d*0x17+-0x4d7))[_0x42f309(0x2a0)](0x23ea*-0x1+-0x44b*-0x7+0x5ed),'inputCapabilities':z[_0x42f309(0x298)](marAgentInputCapabilitySchema)[_0x42f309(0x4af)](0x3b*-0x81+-0xb10+0x28cc)[_0x42f309(0x2a0)](-0x5f5*-0x1+-0x25*-0xc1+-0x21d8),'hostedWebSearch':z[_0x42f309(0x400)](),'warnings':z[_0x42f309(0x298)](z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x237c+0x4bf+0x1ebe)[_0x42f309(0x2a0)](0x6fc+0x1*0x227+-0x3*0x261))[_0x42f309(0x2a0)](0x1*-0x2c2+-0x1301+0x15e3),'requiredInputs':z[_0x42f309(0x298)](z[_0x42f309(0x25c)](_0x42f309(0x2cc)))[_0x42f309(0x2a0)](-0x1a56+-0x3*0x6b9+0x2*0x1741)})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x554dbf,_0x3498ba)=>{const _0x495628=_0x42f309;if(new Set(_0x554dbf[_0x495628(0x219)])[_0x495628(0x3cf)]!==_0x554dbf[_0x495628(0x219)][_0x495628(0x27d)])_0x3498ba[_0x495628(0x497)]({'code':_0x495628(0x2b6),'message':_0x495628(0x1cf)});if(_0x554dbf[_0x495628(0x286)]!==undefined&&_0x554dbf[_0x495628(0x219)][_0x495628(0x27d)]>0x2*0xaec+0x430*0x6+-0x2ef8&&!_0x554dbf[_0x495628(0x219)][_0x495628(0x32c)](_0x554dbf[_0x495628(0x286)]))_0x3498ba[_0x495628(0x497)]({'code':_0x495628(0x2b6),'path':[_0x495628(0x286)],'message':_0x495628(0x26b)});if(new Set(_0x554dbf[_0x495628(0x252)])[_0x495628(0x3cf)]!==_0x554dbf[_0x495628(0x252)][_0x495628(0x27d)])_0x3498ba[_0x495628(0x497)]({'code':_0x495628(0x2b6),'message':_0x495628(0x2aa)});if(new Set(_0x554dbf[_0x495628(0x33d)])[_0x495628(0x3cf)]!==_0x554dbf[_0x495628(0x33d)][_0x495628(0x27d)])_0x3498ba[_0x495628(0x497)]({'code':_0x495628(0x2b6),'message':_0x495628(0x1ce)});if(new Set(_0x554dbf[_0x495628(0x34d)])[_0x495628(0x3cf)]!==_0x554dbf[_0x495628(0x34d)][_0x495628(0x27d)])_0x3498ba[_0x495628(0x497)]({'code':_0x495628(0x2b6),'message':_0x495628(0x332)});if(_0x554dbf[_0x495628(0x2cc)]!==undefined&&_0x554dbf[_0x495628(0x41e)]!==undefined&&_0x554dbf[_0x495628(0x41e)]>=_0x554dbf[_0x495628(0x2cc)])_0x3498ba[_0x495628(0x497)]({'code':_0x495628(0x2b6),'message':_0x495628(0x32b)});if(_0x554dbf[_0x495628(0x34d)][_0x495628(0x32c)](_0x495628(0x2cc))!==(_0x554dbf[_0x495628(0x2cc)]===undefined))_0x3498ba[_0x495628(0x497)]({'code':_0x495628(0x2b6),'path':[_0x495628(0x34d)],'message':_0x495628(0x345)});});export const codexModelCatalogSchema=z[_0x42f309(0x1e4)]({'catalogHash':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[a-f0-9]{64}$/u),'fetchedAt':nonnegativeSafeIntegerSchema,'models':z[_0x42f309(0x298)](codexModelCandidateSchema)[_0x42f309(0x2a0)](-0x1*-0x18d9+-0x395*0x9+-0xb3*-0xc)})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x5870c5,_0x51f20c)=>{const _0x990469=_0x42f309,_0x1f6537=_0x5870c5[_0x990469(0x460)][_0x990469(0x27e)](_0x4d44d8=>_0x4d44d8[_0x990469(0x3f7)]);if(new Set(_0x1f6537)[_0x990469(0x3cf)]!==_0x1f6537[_0x990469(0x27d)])_0x51f20c[_0x990469(0x497)]({'code':_0x990469(0x2b6),'path':[_0x990469(0x460)],'message':_0x990469(0x24e)});});const codexModelImportItemSchema=z[_0x42f309(0x1e4)]({'upstreamModelId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x2669+0x18c+-0x625*-0x6)[_0x42f309(0x2a0)](0x25bb+-0x1903+-0xbb8),'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x249e+-0x201e+-0x47f)[_0x42f309(0x2a0)](0x42+-0x5*0x2d8+0xe76)[_0x42f309(0x41d)](),'contextWindowTokens':positiveSafeIntegerSchema[_0x42f309(0x41d)](),'enabled':z[_0x42f309(0x400)]()})[_0x42f309(0x1f4)]();export const codexModelImportRequestSchema=z[_0x42f309(0x1e4)]({'catalogHash':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[a-f0-9]{64}$/u),'models':z[_0x42f309(0x298)](codexModelImportItemSchema)[_0x42f309(0x4af)](-0x23a2+-0x11*0x1a5+0x3f98)[_0x42f309(0x2a0)](0x15c4+-0x35*-0x41+-0x22f9)})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x4bfefd,_0x25ffea)=>{const _0x5c8572=_0x42f309,_0x33cbaa=_0x4bfefd[_0x5c8572(0x460)][_0x5c8572(0x27e)](_0x6c24b9=>_0x6c24b9[_0x5c8572(0x3f7)]);if(new Set(_0x33cbaa)[_0x5c8572(0x3cf)]!==_0x33cbaa[_0x5c8572(0x27d)])_0x25ffea[_0x5c8572(0x497)]({'code':_0x5c8572(0x2b6),'path':[_0x5c8572(0x460)],'message':_0x5c8572(0x24e)});});const codexModelImportResultItemSchema=z[_0x42f309(0x1e4)]({'upstreamModelId':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0xe76+-0x1*0xbcc+0x1*-0x2a9)[_0x42f309(0x2a0)](0x175a+0x150c+-0x2b66),'status':z[_0x42f309(0x448)]([_0x42f309(0x295),_0x42f309(0x4d2),_0x42f309(0x3d5),_0x42f309(0x30a)]),'modelId':boundedIdentifierSchema[_0x42f309(0x41d)](),'code':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,79}$/u)[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0xa7daab,_0x1aa88c)=>{const _0x304a87=_0x42f309;if(_0xa7daab[_0x304a87(0x20f)]===_0x304a87(0x30a)){if(_0xa7daab[_0x304a87(0x3c4)]!==undefined)_0x1aa88c[_0x304a87(0x497)]({'code':_0x304a87(0x2b6),'path':[_0x304a87(0x3c4)],'message':_0x304a87(0x283)});if(_0xa7daab[_0x304a87(0x220)]===undefined)_0x1aa88c[_0x304a87(0x497)]({'code':_0x304a87(0x2b6),'path':[_0x304a87(0x220)],'message':_0x304a87(0x3c3)});return;}if(_0xa7daab[_0x304a87(0x3c4)]===undefined)_0x1aa88c[_0x304a87(0x497)]({'code':_0x304a87(0x2b6),'path':[_0x304a87(0x3c4)],'message':_0x304a87(0x4d4)});if(_0xa7daab[_0x304a87(0x220)]!==undefined)_0x1aa88c[_0x304a87(0x497)]({'code':_0x304a87(0x2b6),'path':[_0x304a87(0x220)],'message':_0x304a87(0x46a)});});export const codexModelImportResultSchema=z[_0x42f309(0x1e4)]({'items':z[_0x42f309(0x298)](codexModelImportResultItemSchema)[_0x42f309(0x4af)](0x16bf+-0x53*0x22+-0xfa*0xc)[_0x42f309(0x2a0)](0x70*-0x13+-0x628+0xeb8)})[_0x42f309(0x1f4)]();export const agentRunStatusSchema=z[_0x42f309(0x448)]([_0x42f309(0x3a0),_0x42f309(0x421),_0x42f309(0x205),_0x42f309(0x45d),_0x42f309(0x3e9),_0x42f309(0x228),_0x42f309(0x242)]);export const recentRunSchema=z[_0x42f309(0x1e4)]({'runId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1*-0x89e+-0x4db+0xd7a)[_0x42f309(0x2a0)](0x212e+-0x16cf+-0x9df),'nodeId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x49d*0x7+0x52*-0x6a+-0x50*-0xd4)[_0x42f309(0x2a0)](0x3e6*0x8+-0x2590+0xb*0xa0),'workspaceId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1bdb*0x1+-0xf3e*-0x2+-0x2a0*0x1)[_0x42f309(0x2a0)](-0x2*-0x12b7+0x2355+-0x4843),'workspaceName':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x24*0x1a+0x1d87+-0x20af)[_0x42f309(0x41d)](),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x260*-0xd+-0x3eb*0x7+0x93*-0x6)[_0x42f309(0x2a0)](-0x52f*-0x5+0x5*0x19+-0x4*0x67a),'sessionTitle':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x2*-0x581+-0x243f+0x2f42)[_0x42f309(0x2a0)](0x7*0x210+0x3*0xb4d+-0x2fb7),'userMessage':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0xde*-0x11+0x15e9*-0x1+0x269b)[_0x42f309(0x41d)](),'runner':runnerNameSchema,'status':agentRunStatusSchema,'createdAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'startedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'completedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'sortAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'version':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()});export const recentRunProjectionSchema=recentRunSchema[_0x42f309(0x299)]({'workspaceName':!![]})[_0x42f309(0x2de)]({'userId':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()});export const recentRunProjectionMessageSchema=z[_0x42f309(0x420)](_0x42f309(0x2f1),[z[_0x42f309(0x1e4)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x313)),'run':recentRunProjectionSchema}),z[_0x42f309(0x1e4)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x1d9)),'runs':z[_0x42f309(0x298)](recentRunProjectionSchema)})]);export const workspaceQueueItemSchema=z[_0x42f309(0x1e4)]({'queueItemId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x19*0x11+0x3*0x249+-0x531)[_0x42f309(0x2a0)](0x1711+0x1fac+0x1*-0x363d),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x9fd*0x2+0x1e8b+0xd*-0xd0)[_0x42f309(0x2a0)](0x2*-0xd37+0x2262+-0x774),'workspaceId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2618+0x25bd*-0x1+0x4bd6)[_0x42f309(0x2a0)](-0x1147+-0x2*0x69d+0x1f01),'runner':runnerNameSchema,'clientMessageId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1*-0xa1f+-0x256c+0x2f8c)[_0x42f309(0x2a0)](0x39*0x20+0x5e5+0x281*-0x5),'sessionTitle':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0xca6*-0x3+-0x224+-0x6c9*-0x6),'content':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1b6b+0x1e01*0x1+-0x295)[_0x42f309(0x2a0)](0x33b9+0x19*0x3fb+-0x491c),'createdAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()});export const workspaceQueueSchema=z[_0x42f309(0x1e4)]({'version':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'paused':z[_0x42f309(0x400)](),'items':z[_0x42f309(0x298)](workspaceQueueItemSchema)});export const runEventSchema=z[_0x42f309(0x1e4)]({'runId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xa3*-0x26+-0x12d3+-0x55e)[_0x42f309(0x2a0)](0x4c0+0xad2+-0x506*0x3),'sequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'eventType':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9._-]{1,80}$/),'payload':z[_0x42f309(0x399)](),'status':agentRunStatusSchema[_0x42f309(0x41d)](),'createdAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)](),'version':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)]()});export const workbenchEventCategorySchema=z[_0x42f309(0x448)]([_0x42f309(0x2fa),_0x42f309(0x484),_0x42f309(0x264),_0x42f309(0x249),_0x42f309(0x48b),_0x42f309(0x46c),_0x42f309(0x2d5)]);export const workbenchEventSchema=z[_0x42f309(0x1e4)]({'sequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'category':workbenchEventCategorySchema,'payload':z[_0x42f309(0x399)]()});export const watchAcceptedSchema=z[_0x42f309(0x1e4)]({'accepted':z[_0x42f309(0x25c)](!![]),'watchId':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/),'nodeGeneration':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()})[_0x42f309(0x1f4)]();const watchEventIdentitySchema=z[_0x42f309(0x1e4)]({'workbenchConnectionId':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/),'watchId':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/),'nodeGeneration':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/),'nodeId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1*0xe03+0x1350+-0x54c)[_0x42f309(0x2a0)](0x2b6*-0x7+-0x22e1+0x367b)})[_0x42f309(0x1f4)](),hostedConversationWatchIdentitySchema=watchEventIdentitySchema[_0x42f309(0x2de)]({'templateId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x24e0+0x37*-0x3d+0xbe2*-0x2)[_0x42f309(0x2a0)](0x3*0xcca+0x2690+0x2*-0x2627)}),watchFailedEventSchema=watchEventIdentitySchema[_0x42f309(0x2de)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x44b)),'watchType':z[_0x42f309(0x448)]([_0x42f309(0x2d5),_0x42f309(0x484),_0x42f309(0x249)]),'workspaceId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x300+0x1f8e+-0x1c8d*0x1)[_0x42f309(0x2a0)](0xb1*0x2+-0x12a4*0x2+0x2486)[_0x42f309(0x41d)](),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2656+0x1457+0x1200)[_0x42f309(0x2a0)](0x602+0x2e5+-0x6e7)[_0x42f309(0x41d)](),'conversationId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1096+0x54+-0x10e9)[_0x42f309(0x2a0)](-0x209b+-0x1c09+0xc*0x51b)[_0x42f309(0x41d)](),'templateId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x8*0x148+-0x833*0x4+-0x67*-0x6b)[_0x42f309(0x2a0)](-0xb62+-0xc1*-0x17+-0x555)[_0x42f309(0x41d)](),'topic':z[_0x42f309(0x448)]([_0x42f309(0x2e3),_0x42f309(0x458),_0x42f309(0x23d)])[_0x42f309(0x41d)](),'code':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,127}$/),'message':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1*0x105b+0x1ce*0x1+-0x1228)[_0x42f309(0x2a0)](-0x837+-0x21e7+0x2e06)})[_0x42f309(0x225)]((_0x504f92,_0x142ac5)=>{const _0x5ad522=_0x42f309,_0x5e324d=_0x504f92[_0x5ad522(0x46e)]===_0x5ad522(0x2d5)&&_0x504f92[_0x5ad522(0x49f)]!==undefined&&_0x504f92[_0x5ad522(0x352)]===undefined&&_0x504f92[_0x5ad522(0x416)]===undefined&&_0x504f92[_0x5ad522(0x408)]===undefined||_0x504f92[_0x5ad522(0x46e)]===_0x5ad522(0x484)&&_0x504f92[_0x5ad522(0x49f)]!==undefined&&_0x504f92[_0x5ad522(0x352)]!==undefined&&_0x504f92[_0x5ad522(0x416)]===undefined&&_0x504f92[_0x5ad522(0x408)]===undefined&&_0x504f92[_0x5ad522(0x36a)]===undefined||_0x504f92[_0x5ad522(0x46e)]===_0x5ad522(0x249)&&_0x504f92[_0x5ad522(0x49f)]===undefined&&_0x504f92[_0x5ad522(0x352)]===undefined&&_0x504f92[_0x5ad522(0x416)]!==undefined&&_0x504f92[_0x5ad522(0x408)]!==undefined&&_0x504f92[_0x5ad522(0x36a)]===undefined;if(!_0x5e324d)_0x142ac5[_0x5ad522(0x497)]({'code':_0x5ad522(0x2b6),'message':_0x5ad522(0x2c5)});});export const watchEventSchema=z[_0x42f309(0x3bd)]([watchEventIdentitySchema[_0x42f309(0x2de)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x1de)),'workspaceId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x7*0x227+-0x1554+0x2466)[_0x42f309(0x2a0)](0x1*0x2c+0x2e4*-0x2+0x63c),'topic':z[_0x42f309(0x448)]([_0x42f309(0x2e3),_0x42f309(0x458),_0x42f309(0x23d)]),'revision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'snapshotSequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'payload':z[_0x42f309(0x399)]()}),watchEventIdentitySchema[_0x42f309(0x2de)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x33a)),'workspaceId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x11b9*-0x1+0x6*-0x6b+-0x2*0x79b)[_0x42f309(0x2a0)](0x225c+0x1b08+-0x3cc4*0x1),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x14b*-0x18+-0x1edf+-0xa*0x4)[_0x42f309(0x2a0)](0x56b*0x3+0x2*0x844+-0x1ec9),'revision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'snapshotSequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'payload':z[_0x42f309(0x399)]()}),watchEventIdentitySchema[_0x42f309(0x2de)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x393)),'workspaceId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x20*-0x6b+0x1*-0xb5+0xe16)[_0x42f309(0x2a0)](-0x6*-0x4c0+-0x7de*-0x4+-0x3b58),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1808+-0x17e8+-0x1*0x1f)[_0x42f309(0x2a0)](-0x135e+-0x215a*0x1+0x36b8),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'event':workbenchEventSchema}),hostedConversationWatchIdentitySchema[_0x42f309(0x2de)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x43c)),'conversationId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x218a+0x1fd1+-0x415a)[_0x42f309(0x2a0)](-0x21e7+0x20d9+0x5*0x56),'revision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'snapshotSequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'payload':z[_0x42f309(0x399)]()}),hostedConversationWatchIdentitySchema[_0x42f309(0x2de)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x44c)),'conversationId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1194+0x761*0x1+-0x4*0x63d)[_0x42f309(0x2a0)](0x20a1+-0x12c2+0x1*-0xd3f),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'event':workbenchEventSchema}),watchFailedEventSchema]);const capabilityAvailabilityBaseSchema=z[_0x42f309(0x1e4)]({'available':z[_0x42f309(0x400)](),'reasonCode':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x6f7+0x2*0x108b+0x1406*-0x2)[_0x42f309(0x2a0)](-0xc7*0x1f+-0x2*-0x8a0+-0x1*-0x729)[_0x42f309(0x498)]()});function refineCapabilityAvailability(_0x4559ac){const _0x172478=_0x42f309;return _0x4559ac[_0x172478(0x225)]((_0x3391dc,_0x4bda36)=>{const _0x292ab8=_0x172478;_0x3391dc[_0x292ab8(0x381)]&&_0x3391dc[_0x292ab8(0x4ad)]!==null&&_0x4bda36[_0x292ab8(0x497)]({'code':_0x292ab8(0x2b6),'message':_0x292ab8(0x331)}),!_0x3391dc[_0x292ab8(0x381)]&&_0x3391dc[_0x292ab8(0x4ad)]===null&&_0x4bda36[_0x292ab8(0x497)]({'code':_0x292ab8(0x2b6),'message':_0x292ab8(0x45a)});});}function capabilitySchemaWith(_0x58b96b){const _0x596aa8=_0x42f309;return refineCapabilityAvailability(capabilityAvailabilityBaseSchema[_0x596aa8(0x2de)](_0x58b96b));}export const capabilityAvailabilitySchema=refineCapabilityAvailability(capabilityAvailabilityBaseSchema);export const runnerCommandDescriptorSchema=z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2d8+0x5*-0x1ee+0xc7f)[_0x42f309(0x2a0)](0x3ba+-0x1fc2+-0xe44*-0x2),'runner':runnerNameSchema,'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x496+-0x10d0+-0x1567*-0x1)[_0x42f309(0x2a0)](0x1386+-0xf72+-0x394),'stateLabel':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x31*-0xc2+-0x2*-0xfe9+-0x44f3)[_0x42f309(0x2a0)](0xf53+0x81+-0xf54)[_0x42f309(0x41d)](),'description':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x2678+0x2*0xb70+0x118c),'inputHint':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0xecf+-0x23+-0xde4),'source':z[_0x42f309(0x448)]([_0x42f309(0x2ac),_0x42f309(0x305),_0x42f309(0x1f2),_0x42f309(0x336)]),'interaction':z[_0x42f309(0x448)]([_0x42f309(0x366),_0x42f309(0x223),_0x42f309(0x1c5),_0x42f309(0x202)]),'available':z[_0x42f309(0x400)](),'reasonCode':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x23f8*0x1+0x2*-0xf32+-0x593)[_0x42f309(0x2a0)](-0x108f+-0x15d+-0x185*-0xc)[_0x42f309(0x498)]()})[_0x42f309(0x225)]((_0x27e1ba,_0x1eae03)=>{const _0x39eee1=_0x42f309;_0x27e1ba[_0x39eee1(0x381)]&&_0x27e1ba[_0x39eee1(0x4ad)]!==null&&_0x1eae03[_0x39eee1(0x497)]({'code':_0x39eee1(0x2b6),'message':_0x39eee1(0x405)}),!_0x27e1ba[_0x39eee1(0x381)]&&_0x27e1ba[_0x39eee1(0x4ad)]===null&&_0x1eae03[_0x39eee1(0x497)]({'code':_0x39eee1(0x2b6),'message':_0x39eee1(0x1dc)});});export const runnerCommandStateSchema=z[_0x42f309(0x1e4)]({'commandId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x4e*0x1b+-0x101b+0x3f1*0x2)[_0x42f309(0x2a0)](-0x1b8c+0x1*0x251c+-0x910),'active':z[_0x42f309(0x400)](),'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xcc6+0x258a+0x841*-0x3)[_0x42f309(0x2a0)](0xe85+0x1746*0x1+-0x254b),'detail':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1012*0x2+0x959+0x18bf)[_0x42f309(0x498)](),'closable':z[_0x42f309(0x400)](),'closeInput':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x15f4+0x2591+0x5*-0xbe7)[_0x42f309(0x2a0)](-0x6111+0x1*0x1223+-0x6*-0x1a2d)[_0x42f309(0x498)](),'mission':z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x3fa)](),'objective':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xf54+-0xd64+-0x183*-0x13)[_0x42f309(0x2a0)](0x6*0x996+0x5f53+-0x4ab7),'revision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x25f),_0x42f309(0x4bf),_0x42f309(0x1c9)]),'turns':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)]()})[_0x42f309(0x41d)](),'continuation':z[_0x42f309(0x1e4)]({'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x272*-0x6+0x164*0xe+-0x4cb)[_0x42f309(0x2a0)](-0x1294+0x239d+0x3*-0x583),'prompt':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x30+-0x23bf*-0x1+-0x238e)[_0x42f309(0x2a0)](0x8562+0x409*-0x1e+-0x1073*-0x4)})[_0x42f309(0x498)]()[_0x42f309(0x41d)]()});export const runnerProfileSchema=z[_0x42f309(0x1e4)]({'runner':runnerNameSchema,'models':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x17b8*-0x1+-0x603+0x2b4*0xb)[_0x42f309(0x2a0)](0x14ae*-0x1+0x613*-0x1+0x1b41),'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x249d+-0x12f*0x1f+0x15)[_0x42f309(0x2a0)](-0x2*-0x407+-0x1*-0x69d+0x1f*-0x75),'supportedEfforts':z[_0x42f309(0x298)](z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x5*0x31a+0x10b2+-0x12f)[_0x42f309(0x2a0)](0x11a9+-0x9f9+0x22*-0x38))[_0x42f309(0x2a0)](-0xef8+-0x18a3+0x27bb*0x1),'isDefault':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'defaultEffort':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x18aa+-0x11*0xf4+-0x875)[_0x42f309(0x2a0)](0x1686+-0x3*0x174+-0x11ea)[_0x42f309(0x41d)]()})),'accessOptions':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x67*-0x16+0x1de4+-0x1509)[_0x42f309(0x2a0)](0x1*-0xad9+0x1487+-0x5e*0x19),'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x9*0x409+-0x7*0x3c7+0x1*0x3ec3)[_0x42f309(0x2a0)](-0x1*0x26e1+0x20d2+0x68f),'description':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x1ad0+-0x4*0x20b+-0x10b0)})),'commands':z[_0x42f309(0x298)](runnerCommandDescriptorSchema),'capabilities':z[_0x42f309(0x298)](z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x5*-0x23d+-0xa94+0x15c6)[_0x42f309(0x2a0)](-0x168a+0x208*-0x4+0x41*0x7a))[_0x42f309(0x2a0)](0x1*-0x15ad+-0x5d1+-0xddf*-0x2)});export const runnerDefaultConfigurationSchema=z[_0x42f309(0x1e4)]({'runner':runnerNameSchema,'model':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x12e5+0x164*0x1+0x1182)[_0x42f309(0x2a0)](0xc37+0x1d4c+-0x2903*0x1),'effort':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x2a0)](0x2e7*-0x8+0x121f+0x25*0x25),'access':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1766*0x1+0x1*-0xb5b+-0xc0a)[_0x42f309(0x2a0)](0x2547+0x6a0+-0x2b67)});export const runnerCommandExecutionSchema=z[_0x42f309(0x1e4)]({'commandId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xe40+0x24b+0x2*0x5fb)[_0x42f309(0x2a0)](0x912+0x121d*-0x2+-0x1d8*-0xf),'input':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x457+0x503*0x1+-0xaa)[_0x42f309(0x2a0)](-0x749*0x10+0xd3*0x64+0x7044)});export const serverWorkbenchCapabilitiesSchema=z[_0x42f309(0x1e4)]({'workbenchProtocolVersion':z[_0x42f309(0x25c)](WORKBENCH_PROTOCOL_VERSION),'serverVersion':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1*0x2561+-0xa36*-0x3+-0x4402)[_0x42f309(0x2a0)](-0x1a02+-0xdf6+0x2878)[_0x42f309(0x41d)](),'conversationItemVersions':z[_0x42f309(0x298)](z[_0x42f309(0x25c)](-0xfaa+-0x968+0x1913))[_0x42f309(0x4af)](0x1fda+-0x10d7+-0xf02),'supportsSessionDetailStream':z[_0x42f309(0x400)](),'supportsTerminalBrowserRelay':z[_0x42f309(0x400)](),'supportsTerminalNodeDataChannel':z[_0x42f309(0x400)](),'maxSseSubscriptionsPerUser':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x2a0)](-0x2039*0x1+-0x15*-0x37+0x1c36),'maxTerminalBrowserConnectionsPerUser':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x2a0)](0x3*0xac4+-0x1*0x94+-0x2a2*0xc)});export const nodeWorkbenchCapabilitiesSchema=z[_0x42f309(0x1e4)]({'manifestVersion':z[_0x42f309(0x25c)](0x1*0x1c90+0x9a9*0x1+0x2*-0x131c),'revision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'observedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'platform':z[_0x42f309(0x448)]([_0x42f309(0x2e0),_0x42f309(0x48a)]),'architecture':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1*0xfe+-0x2431*0x1+0x2530)[_0x42f309(0x2a0)](-0x3*0x1a0+0x51f+-0xd*-0x5),'conversation':capabilitySchemaWith({'itemVersions':z[_0x42f309(0x298)](z[_0x42f309(0x25c)](-0x1*-0x6ad+0x9b2*0x2+0x1a1*-0x10)),'supportsSessionCursor':z[_0x42f309(0x400)](),'supportsHistoryPaging':z[_0x42f309(0x400)](),'supportsItemFinalSnapshots':z[_0x42f309(0x400)](),'maxPageSize':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x2a0)](0x1890+0xe6+-0x1782)}),'runners':z[_0x42f309(0x298)](runnerProfileSchema),'files':capabilitySchemaWith({'supportsList':z[_0x42f309(0x400)](),'supportsReadRange':z[_0x42f309(0x400)](),'supportsSearch':z[_0x42f309(0x400)](),'maxDirectoryPageSize':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x2a0)](-0x1c41+0xdb1+-0x1278*-0x1),'maxReadBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'maxSearchResults':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x2a0)](0x43c8+-0x4ca3+0x2feb)}),'git':capabilitySchemaWith({'supportsCurrentChanges':z[_0x42f309(0x400)](),'supportsTurnChanges':z[_0x42f309(0x400)](),'supportsHistory':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'maxDiffBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()}),'terminal':capabilitySchemaWith({'supportsPty':z[_0x42f309(0x400)](),'supportsConPty':z[_0x42f309(0x400)](),'supportsReplay':z[_0x42f309(0x400)](),'supportsReadonlyAttach':z[_0x42f309(0x400)](),'supportsTakeover':z[_0x42f309(0x400)](),'maxTerminals':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x2a0)](0x444+-0x2c0+-0xa2*0x2),'maxReplayBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'reconnectWindowMs':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'profiles':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xe6+0xc34+-0xd19)[_0x42f309(0x2a0)](-0x2aa+0x1*0xbc5+0x1*-0x89b),'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x395*-0x3+0x76b+-0x1*0x1229)[_0x42f309(0x2a0)](0x1c22+0x267b+-0x421d),'isDefault':z[_0x42f309(0x400)]()}))})});export const sessionRuntimeCapabilitySchema=z[_0x42f309(0x448)]([_0x42f309(0x29e),_0x42f309(0x1c6),_0x42f309(0x4c8),_0x42f309(0x438),_0x42f309(0x4d1),_0x42f309(0x318),_0x42f309(0x3e4),_0x42f309(0x37c),_0x42f309(0x359),_0x42f309(0x378),_0x42f309(0x4a3),_0x42f309(0x265),_0x42f309(0x44a)]);export const sessionRuntimeCapabilitiesSchema=z[_0x42f309(0x1e4)]({'level':z[_0x42f309(0x448)]([_0x42f309(0x2b5),_0x42f309(0x3fd),_0x42f309(0x370),_0x42f309(0x1d2),_0x42f309(0x1d7)]),'capabilities':z[_0x42f309(0x298)](sessionRuntimeCapabilitySchema),'reasonCode':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1575+-0x154c+-0x2ac2*-0x1)[_0x42f309(0x2a0)](0x23*-0x101+0x6fc+-0x1*-0x1c77)[_0x42f309(0x498)]()});export const sessionActivityStateSchema=z[_0x42f309(0x448)]([_0x42f309(0x2f9),_0x42f309(0x1f3),_0x42f309(0x476),_0x42f309(0x1d7)]);export const eventCursorSchema=z[_0x42f309(0x1e4)]({'scope':z[_0x42f309(0x448)]([_0x42f309(0x4b2),_0x42f309(0x22e),_0x42f309(0x210)]),'streamId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x5*0x589+0x6*0x404+-0x4*0xcf1)[_0x42f309(0x2a0)](-0x22f4+-0x16a9+0x3a1d),'cursor':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1*-0x377+0x17a3+-0x1*0x142b)[_0x42f309(0x2a0)](-0x2445+0x233*0x2+0x23df*0x1)});const conversationItemBaseSchema=z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2ea+0x59d*-0x5+0x1efc)[_0x42f309(0x2a0)](-0x1d3a*-0x1+0xd*-0x24b+0x115),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x3a*0x8e+-0xa0a+0x2a37)[_0x42f309(0x2a0)](0x1*0x2581+-0x109*-0xd+-0x3276),'turnId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xaba+0x2*-0x4e8+-0x1*0xe9)[_0x42f309(0x2a0)](0xa2*-0x2b+-0x857+0x240d*0x1),'runId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x29*-0x9d+0x60a*-0x1+-0x131a)[_0x42f309(0x2a0)](0x1aed+-0xbf8+-0x1*0xe75)[_0x42f309(0x498)](),'parentItemId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x9*-0x295+-0x917*0x2+0x287*-0x2)[_0x42f309(0x2a0)](-0x187b+-0x1*0x641+0x7cf*0x4)[_0x42f309(0x498)](),'sourceSequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x498)](),'revision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x402),_0x42f309(0x409),_0x42f309(0x29f),_0x42f309(0x3e9),_0x42f309(0x490),_0x42f309(0x228),_0x42f309(0x242)]),'startedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'completedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'segmentId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xe8b*0x1+0x1*0x137+0xd55)[_0x42f309(0x2a0)](0x7e7*0x3+-0xe79+-0x44*0x1f)[_0x42f309(0x41d)](),'segmentIndex':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)]()});export const contextReferenceSchema=z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x448)]([_0x42f309(0x41b),_0x42f309(0x42b),_0x42f309(0x23d),_0x42f309(0x492),_0x42f309(0x248),_0x42f309(0x250),_0x42f309(0x23f)]),'referenceId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1*0x903+0x1fd5+-0x28d7)[_0x42f309(0x2a0)](-0x4*-0x1df+0x1310+0x1*-0x1a0c),'label':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x3d*-0x93+0x9ee+0xe*-0x336)[_0x42f309(0x2a0)](0x878*0x1+-0x25b1+0x1f2d),'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1*-0x623+-0x201b+0x263f)[_0x42f309(0x2a0)](-0x9ce+-0xf2a+0x8a*0x4c)[_0x42f309(0x41d)](),'startLine':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x41d)](),'endLine':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x41d)]()});export const conversationImageAttachmentSchema=z[_0x42f309(0x1e4)]({'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x85f*-0x1+-0x127e+0x1ade)[_0x42f309(0x2a0)](0x3*-0x59f+-0x24cb*0x1+0x8*0x6f5),'mime':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^image\/[A-Za-z0-9][A-Za-z0-9.+-]{0,127}$/u),'byteSize':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)](),'runId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1*-0x1475+0xf76+-0x23ea)[_0x42f309(0x2a0)](-0x1*-0x69a+-0x5*-0x607+-0x243d*0x1)[_0x42f309(0x41d)](),'imageIndex':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x1f5e2d,_0x4e64b6)=>{const _0x19b83a=_0x42f309;if(_0x1f5e2d[_0x19b83a(0x27b)]===undefined!==(_0x1f5e2d[_0x19b83a(0x3f2)]===undefined))_0x4e64b6[_0x19b83a(0x497)]({'code':_0x19b83a(0x2b6),'message':_0x19b83a(0x419)});});const assistantMessageItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x316)),'payload':z[_0x42f309(0x1e4)]({'text':z[_0x42f309(0x259)](),'format':z[_0x42f309(0x25c)](_0x42f309(0x339)),'model':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x22e*0x11+0x1ba8+0x9e6)[_0x42f309(0x498)]()})}),userMessageItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x444)),'payload':z[_0x42f309(0x1e4)]({'clientMessageId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x2225+0x6ef*-0x4+-0x668)[_0x42f309(0x2a0)](0x5*-0x42e+-0x12*0xe3+0x255c)[_0x42f309(0x498)](),'text':z[_0x42f309(0x259)](),'contexts':z[_0x42f309(0x298)](contextReferenceSchema)[_0x42f309(0x2a0)](-0x1*-0xc5+0x3*0x3b7+-0x5d5*0x2)[_0x42f309(0x466)]([]),'delivery':z[_0x42f309(0x448)]([_0x42f309(0x402),_0x42f309(0x47a),_0x42f309(0x2ff),_0x42f309(0x340),_0x42f309(0x46d)])})}),planItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x2e2)),'payload':z[_0x42f309(0x1e4)]({'explanation':z[_0x42f309(0x259)]()[_0x42f309(0x498)](),'steps':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1059+-0x29*-0x97+-0x2887)[_0x42f309(0x2a0)](0x693+-0x238f*-0x1+0x49*-0x92),'text':z[_0x42f309(0x259)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x402),_0x42f309(0x409),_0x42f309(0x29f)])}))})}),todoListItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x494)),'payload':z[_0x42f309(0x1e4)]({'items':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x23*0x92+0x36a+0xdf*0x13)[_0x42f309(0x2a0)](0x1*-0xead+-0x142+0x106f),'text':z[_0x42f309(0x259)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x402),_0x42f309(0x409),_0x42f309(0x29f)])}))})}),approvalItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x35c)),'payload':z[_0x42f309(0x1e4)]({'approvalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xf*0x18d+0x81d*-0x1+0x1f61)[_0x42f309(0x2a0)](0x6*-0x45a+-0x56f*0x6+0x3b36),'category':z[_0x42f309(0x448)]([_0x42f309(0x2a5),_0x42f309(0x279),_0x42f309(0x2d7),_0x42f309(0x2a4),_0x42f309(0x1eb)]),'reason':z[_0x42f309(0x259)]()[_0x42f309(0x498)](),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'resolvedDecision':z[_0x42f309(0x259)]()[_0x42f309(0x498)]()})}),summaryItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x41f)),'payload':z[_0x42f309(0x1e4)]({'status':agentRunStatusSchema,'durationMs':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()})}),reasoningSummaryItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x39c)),'payload':z[_0x42f309(0x1e4)]({'sections':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'index':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'text':z[_0x42f309(0x259)]()}))})});export const subagentOperationSchema=z[_0x42f309(0x448)]([_0x42f309(0x231),_0x42f309(0x37f),_0x42f309(0x4a8),_0x42f309(0x464),_0x42f309(0x26e)]);const toolCallItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x4a6)),'payload':z[_0x42f309(0x1e4)]({'namespace':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x17*-0x7f+0x1e*0x83+-0x1ac2)[_0x42f309(0x2a0)](-0x1e7c*-0x1+0x4*0x211+-0x2640),'toolName':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1*-0xc22+-0x1d13+0x2936)[_0x42f309(0x2a0)](-0x7e7+-0x55f*-0x5+-0x1*0x1274),'title':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x2383*-0x1+-0x1*0x20e3+0x4467)[_0x42f309(0x2a0)](-0x1*0x2ed+-0x244d*-0x1+-0x1f6c),'inputSummary':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1*0x1dc5+-0x3a0e+0x7ee3)[_0x42f309(0x498)](),'outputSummary':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x2a5*-0x7+-0x22b7+-0x4*-0xdd1)[_0x42f309(0x498)](),'progressLabel':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x2*0x1061+0x136d+-0x323b)[_0x42f309(0x498)](),'errorCode':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x5*-0x57d+0x2a7*-0xd+0x3e3c)[_0x42f309(0x498)](),'truncated':z[_0x42f309(0x400)](),'toolCategory':z[_0x42f309(0x448)]([_0x42f309(0x451)])[_0x42f309(0x41d)](),'subagentOperation':subagentOperationSchema[_0x42f309(0x41d)](),'subagentId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x63*-0x11+0x56*-0x2+0x74*0x10)[_0x42f309(0x2a0)](0x1b4c*0x1+0x184d+-0x3319)[_0x42f309(0x498)]()[_0x42f309(0x41d)](),'attachments':z[_0x42f309(0x298)](conversationImageAttachmentSchema)[_0x42f309(0x2a0)](-0x272*0x7+0x26a6+-0x1568)[_0x42f309(0x41d)]()})}),commandExecutionItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x401)),'payload':z[_0x42f309(0x1e4)]({'command':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0xa73+0x1*0x479+0xa*0x481),'cwd':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x533*-0x1+-0x1*0xcb6+0x21e9)[_0x42f309(0x498)](),'outputPreview':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x2086*-0x2+-0x13e*-0x28+-0x25d6*0x2),'outputRef':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x26a4+0x12cc+0x13d9)[_0x42f309(0x2a0)](0xc4*-0x30+0x585*-0x4+-0x3b54*-0x1)[_0x42f309(0x498)](),'exitCode':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x498)](),'durationMs':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'truncated':z[_0x42f309(0x400)]()})}),fileChangeItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x4b7)),'payload':z[_0x42f309(0x1e4)]({'changes':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x215c+-0x1689+-0x22a*0x5)[_0x42f309(0x2a0)](-0x441+-0xbbe+0x1fff),'change':z[_0x42f309(0x448)]([_0x42f309(0x222),_0x42f309(0x4bd),_0x42f309(0x414),_0x42f309(0x43a),_0x42f309(0x3a5),_0x42f309(0x3f5)]),'additions':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'deletions':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'diffAvailable':z[_0x42f309(0x400)]()}))})}),userInputRequestItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x45b)),'payload':z[_0x42f309(0x1e4)]({'requestId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1639+0x1*0x204a+-0x3682)[_0x42f309(0x2a0)](-0x1*0x283+-0x3*0x61d+0x155a),'questions':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xafa+0x12ae*-0x1+0x7b5*0x1)[_0x42f309(0x2a0)](0x2*0xa+0x1de8+-0x6*0x4ea),'prompt':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x8bf+0x453+0x17f4),'input':z[_0x42f309(0x448)]([_0x42f309(0x454),_0x42f309(0x25b),_0x42f309(0x32d)]),'options':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'value':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x25fd+0x1445+-0x384e),'label':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x1b5c+-0x8e*0x43+-0x1ae*-0x7),'description':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0xa25+0x1bfe+0x1*-0xdf1)[_0x42f309(0x498)]()})),'allowOther':z[_0x42f309(0x400)](),'multiSelect':z[_0x42f309(0x400)]()[_0x42f309(0x41d)]()}))})}),contextCompactionItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x1fa)),'payload':z[_0x42f309(0x1e4)]({'phase':z[_0x42f309(0x448)]([_0x42f309(0x324),_0x42f309(0x29f)]),'summary':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1264+-0x1e0b+0x577f)[_0x42f309(0x498)]()})}),warningItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x1f5)),'payload':z[_0x42f309(0x1e4)]({'code':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xc1*0x1f+0xf6+-0x12*0x15a)[_0x42f309(0x2a0)](0x1461+0x136d+-0x1e*0x151),'message':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0xb6a+0x1d8+0x646),'recoverable':z[_0x42f309(0x400)]()})}),errorItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x262)),'payload':z[_0x42f309(0x1e4)]({'code':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xc17*-0x1+-0x2014*0x1+-0x404*-0xb)[_0x42f309(0x2a0)](0x818+0x22*-0x115+0x1d02),'message':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x98*0x13+0xd3*0x24+0xc*-0x135),'httpStatus':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](0xe4f*0x2+-0x66d*0x3+0x1d*-0x4f)[_0x42f309(0x2a0)](-0x80*-0x2+0x1000+0xea9*-0x1)[_0x42f309(0x498)]()[_0x42f309(0x41d)](),'recoverable':z[_0x42f309(0x400)](),'retryAfterMs':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()})}),unknownItemSchema=conversationItemBaseSchema[_0x42f309(0x2de)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x399)),'payload':z[_0x42f309(0x1e4)]({'sourceEventType':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xe2*0x4+0xa5*-0x3c+0x5*0x871)[_0x42f309(0x2a0)](-0xd8f+-0x1*-0x9d9+0x436),'label':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x59a+0x26a2*0x1+0x24*-0xdd)})});export const conversationItemSchema=z[_0x42f309(0x420)](_0x42f309(0x2f1),[assistantMessageItemSchema,userMessageItemSchema,reasoningSummaryItemSchema,planItemSchema,todoListItemSchema,toolCallItemSchema,commandExecutionItemSchema,fileChangeItemSchema,approvalItemSchema,userInputRequestItemSchema,contextCompactionItemSchema,warningItemSchema,errorItemSchema,summaryItemSchema,unknownItemSchema]);export const conversationTurnSchema=z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2*0x117a+-0xeb9*0x2+0x4067*0x1)[_0x42f309(0x2a0)](0x4*0x824+-0xcd4+-0x133c),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xa3c+-0x1cee+0x272b*0x1)[_0x42f309(0x2a0)](0x15*-0x1b+0x5a*0x50+-0x1969),'runId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x737*-0x5+0xa2c+-0x1*0x2e3e)[_0x42f309(0x2a0)](0x1a05*-0x1+-0x201c+0x3aa1)[_0x42f309(0x498)](),'userItemId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x34*0x89+-0x1*-0x15ad+0x2*0x314)[_0x42f309(0x2a0)](-0x1331+0x1*-0x19db+-0xdc*-0x35)[_0x42f309(0x498)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x1db),_0x42f309(0x421),_0x42f309(0x4c6),_0x42f309(0x4d3),_0x42f309(0x45d),_0x42f309(0x3e9),_0x42f309(0x228),_0x42f309(0x242),_0x42f309(0x323)]),'model':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x9*-0x28d+-0x6d6*0x1+0xeb*0x21)[_0x42f309(0x498)](),'effort':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x4e9+0x1*0x137d+-0x232*0xb)[_0x42f309(0x498)](),'access':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x116e+0x1ef9+-0x459*0x3)[_0x42f309(0x498)](),'rewind':z[_0x42f309(0x1e4)]({'before':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1266+-0x205e+0x32c5*0x1)[_0x42f309(0x2a0)](0x20de+-0x30*0x20+-0x19de)[_0x42f309(0x498)](),'after':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xcca+-0x21df+0x2eaa)[_0x42f309(0x2a0)](0xa*0x11+0x9*0x7a+-0x3f4)})[_0x42f309(0x41d)](),'items':z[_0x42f309(0x298)](conversationItemSchema),'startedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'completedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()});const protocolIdSchema=z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/),stableStorageKeySchema=z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9][A-Za-z0-9_-]{7,159}$/),contentHashSchema=z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[a-f0-9]{64}$/),conversationRelativePathSchema=z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1d0a+0x376+-0xb1*0x2f)[_0x42f309(0x2a0)](-0x12a2+0x97b+-0x89*-0x2f)[_0x42f309(0x469)](_0x2f8442=>!_0x2f8442[_0x42f309(0x1cc)]('/')&&!_0x2f8442[_0x42f309(0x32c)]('\x5c')&&!_0x2f8442[_0x42f309(0x368)]('/')[_0x42f309(0x479)](_0x27966f=>_0x27966f===''||_0x27966f==='.'||_0x27966f==='..')&&!/^[A-Za-z]:/u[_0x42f309(0x46b)](_0x2f8442),_0x42f309(0x432)),uniqueProtocolIds=(_0x1f0d0a,_0x328e92,_0x3df7cd)=>{const _0x143474=_0x42f309;if(new Set(_0x1f0d0a)[_0x143474(0x3cf)]!==_0x1f0d0a[_0x143474(0x27d)])_0x328e92[_0x143474(0x497)]({'code':_0x143474(0x2b6),'path':_0x3df7cd,'message':_0x143474(0x3ab)});},BASE64_ALPHABET=_0x42f309(0x474),canonicalBase64=_0x1dfd81=>{const _0x574f98=_0x42f309;if(_0x1dfd81[_0x574f98(0x27d)]===-0xa6*-0xd+-0x77*-0x43+-0x2793)return!![];if(_0x1dfd81[_0x574f98(0x27d)]%(0x7*-0x12d+-0x265f+0x1a*0x1cb)!==-0x859+0x17bb+0x2*-0x7b1||!/^[A-Za-z0-9+/]+={0,2}$/u[_0x574f98(0x46b)](_0x1dfd81))return![];const _0x4cc1e6=_0x1dfd81[_0x574f98(0x27f)]('==')?-0x1162+-0x3f2+0x1556*0x1:_0x1dfd81[_0x574f98(0x27f)]('=')?-0x1*-0x1ebf+-0xc42+-0xe*0x152:-0x953+0x116+0x83d;if(_0x4cc1e6===-0x13ad+-0xe2*-0xb+-0x25*-0x45)return BASE64_ALPHABET[_0x574f98(0x22b)](_0x1dfd81['at'](-(0x7*0x115+0x51e+-0xcae)))%(-0xed8+-0xb3*0x2f+0x2fc5)===-0x6f*0x3+-0x1aab*-0x1+0xbf*-0x22;if(_0x4cc1e6===0xe42+-0x19*0xdc+0x1*0x73b)return BASE64_ALPHABET[_0x574f98(0x22b)](_0x1dfd81['at'](-(-0x1182+0x1*-0x188e+0x2a12)))%(0x14*0x120+-0x3d*0x4a+-0x4da)===0x16c9+-0x11d6+-0x4f3;return!![];},base64DecodedByteLength=_0x20d268=>{const _0x41f2c4=_0x42f309;if(_0x20d268[_0x41f2c4(0x27d)]===0x26*0x60+0x46d+0x1*-0x12ad)return 0x8dd*-0x1+0xa13*0x3+-0x155c;const _0x294155=_0x20d268[_0x41f2c4(0x27f)]('==')?-0xbce+0x164f+-0x1*0xa7f:_0x20d268[_0x41f2c4(0x27f)]('=')?0x1*0x22a7+0x1b4f*-0x1+-0x757:0x1294+0x95*-0x1a+0x62*-0x9;return _0x20d268[_0x41f2c4(0x27d)]*(0x1103+0x11a4*-0x1+0xa4)/(0x1*-0x21ce+0x26a4*-0x1+-0xe7e*-0x5)-_0x294155;};export const conversationTemplateStatusSchema=z[_0x42f309(0x448)]([_0x42f309(0x3f3),_0x42f309(0x355),_0x42f309(0x414)]);export const conversationTemplateVersionStatusSchema=z[_0x42f309(0x448)]([_0x42f309(0x375),_0x42f309(0x394),_0x42f309(0x1ee),_0x42f309(0x487)]);export const conversationTemplateNetworkModeSchema=z[_0x42f309(0x448)]([_0x42f309(0x3b6),_0x42f309(0x22c)]);export const conversationTemplateQuotaSchema=z[_0x42f309(0x1e4)]({'maxStorageBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'maxUploadBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x1f463f,_0x300193)=>{const _0x546d2b=_0x42f309;if(_0x1f463f[_0x546d2b(0x206)]>_0x1f463f[_0x546d2b(0x24f)])_0x300193[_0x546d2b(0x497)]({'code':_0x546d2b(0x2b6),'message':_0x546d2b(0x3a1)});});export const conversationTemplateModelReferenceSchema=z[_0x42f309(0x1e4)]({'modelId':protocolIdSchema,'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x270f+0x2303+0x40d*0x1)[_0x42f309(0x2a0)](0x13e*0x6+0xff+-0x7f3)})[_0x42f309(0x1f4)]();export const conversationTemplateDraftSchema=z[_0x42f309(0x1e4)]({'templateId':protocolIdSchema,'nodeId':protocolIdSchema,'workspaceId':protocolIdSchema,'revision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x14fd+0x1*-0x20e4+0x35e2)[_0x42f309(0x2a0)](-0x23b*0x8+0xab*-0x13+-0x5*-0x635),'description':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x14*-0x179+0x4f*-0x25+0xa39*-0x1),'icon':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x43*0x6b+0x13*0x16+-0x8*-0x34c)[_0x42f309(0x2a0)](0x5*-0x165+-0x1cd5+0x6*0x60d)[_0x42f309(0x41d)](),'allowedModels':z[_0x42f309(0x298)](conversationTemplateModelReferenceSchema)[_0x42f309(0x4af)](-0x15d1*0x1+-0x1*-0xad2+0x80*0x16)[_0x42f309(0x2a0)](-0x9a+0x6b*0x2b+0x269*-0x7),'defaultModelId':protocolIdSchema,'mcpIds':z[_0x42f309(0x298)](protocolIdSchema)[_0x42f309(0x2a0)](0x174d+-0xe00+-0x8cd),'networkMode':conversationTemplateNetworkModeSchema,'quotas':conversationTemplateQuotaSchema,'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x451d25,_0x231172)=>{const _0x27e9ea=_0x42f309;uniqueProtocolIds(_0x451d25[_0x27e9ea(0x3d9)][_0x27e9ea(0x27e)](_0x1f9efb=>_0x1f9efb[_0x27e9ea(0x3c4)]),_0x231172,[_0x27e9ea(0x3d9)]),uniqueProtocolIds(_0x451d25[_0x27e9ea(0x3af)],_0x231172,[_0x27e9ea(0x3af)]);if(!_0x451d25[_0x27e9ea(0x3d9)][_0x27e9ea(0x479)](_0x18362b=>_0x18362b[_0x27e9ea(0x3c4)]===_0x451d25[_0x27e9ea(0x1f8)]))_0x231172[_0x27e9ea(0x497)]({'code':_0x27e9ea(0x2b6),'path':[_0x27e9ea(0x1f8)],'message':_0x27e9ea(0x41a)});});export const conversationTemplateSourceInspectInputSchema=z[_0x42f309(0x1e4)]({'mode':z[_0x42f309(0x448)]([_0x42f309(0x3e6),_0x42f309(0x4ab)]),'draft':conversationTemplateDraftSchema})[_0x42f309(0x1f4)]();export const conversationTemplateMcpOptionSchema=z[_0x42f309(0x1e4)]({'id':protocolIdSchema,'serverName':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x695*-0x4+0x14c8*-0x1+-0x58b)[_0x42f309(0x2a0)](0xe5c*0x2+-0x1d05+-0x4*-0x53),'displayName':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x513*0x5+0x4*0x65f+-0x1c)[_0x42f309(0x2a0)](-0xceb*0x1+-0x2*-0x872+-0x379),'transport':z[_0x42f309(0x448)]([_0x42f309(0x4cd),_0x42f309(0x45c)]),'origin':z[_0x42f309(0x448)]([_0x42f309(0x281),_0x42f309(0x24d)])})[_0x42f309(0x1f4)]();export const conversationTemplateSourceInspectionSchema=z[_0x42f309(0x1e4)]({'valid':z[_0x42f309(0x400)](),'code':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,79}$/)[_0x42f309(0x498)](),'message':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1d4c+0x1*0x4d9+0x1874)[_0x42f309(0x2a0)](0x6a*0x23+-0x1*-0x9b3+-0x1449),'checkedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'mcpServers':z[_0x42f309(0x298)](conversationTemplateMcpOptionSchema)[_0x42f309(0x2a0)](-0x1312*-0x2+-0x1f21+0x1*-0x683)[_0x42f309(0x466)]([])})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x1cab62,_0x16a0e5)=>{const _0x1acaa7=_0x42f309;if(_0x1cab62[_0x1acaa7(0x34c)]!==(_0x1cab62[_0x1acaa7(0x220)]===null))_0x16a0e5[_0x1acaa7(0x497)]({'code':_0x1acaa7(0x2b6),'path':[_0x1acaa7(0x220)],'message':_0x1acaa7(0x47c)});uniqueProtocolIds(_0x1cab62[_0x1acaa7(0x446)][_0x1acaa7(0x27e)](_0xfd0d2a=>_0xfd0d2a['id']),_0x16a0e5,[_0x1acaa7(0x446)]);});export const conversationTemplateSummarySchema=z[_0x42f309(0x1e4)]({'id':protocolIdSchema,'nodeId':protocolIdSchema,'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1*0x322+0x8*-0x2d6+0x138f*0x1)[_0x42f309(0x2a0)](0x3b9*-0x3+0x2137+-0xe*0x18a),'description':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x2273*0x1+0x1dd1+0xc72),'icon':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1*-0x1eef+0x1*-0x2002+0x3ef2)[_0x42f309(0x2a0)](0xb1f+0x1*0x191b+-0x23ba)[_0x42f309(0x41d)](),'status':conversationTemplateStatusSchema,'currentVersionId':protocolIdSchema[_0x42f309(0x498)](),'available':z[_0x42f309(0x400)](),'createdAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x42f1a2,_0x17d88f)=>{const _0xea0bbf=_0x42f309;if(_0x42f1a2[_0xea0bbf(0x381)]&&(_0x42f1a2[_0xea0bbf(0x20f)]!==_0xea0bbf(0x3f3)||_0x42f1a2[_0xea0bbf(0x28c)]===null))_0x17d88f[_0xea0bbf(0x497)]({'code':_0xea0bbf(0x2b6),'path':[_0xea0bbf(0x381)],'message':_0xea0bbf(0x2c1)});});export const conversationTemplateVersionSchema=z[_0x42f309(0x1e4)]({'id':protocolIdSchema,'templateId':protocolIdSchema,'version':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'status':conversationTemplateVersionStatusSchema,'contentHash':contentHashSchema,'manifestHash':contentHashSchema,'mcpConfigHash':contentHashSchema,'fileCount':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'totalBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'hostPolicyVersion':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'publishedByUserId':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'publishedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]();export const conversationTemplatePublishInputSchema=z[_0x42f309(0x1e4)]({'templateId':protocolIdSchema,'draftRevision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'requestId':protocolIdSchema})[_0x42f309(0x1f4)]();export const conversationTemplatePublishRequestSchema=z[_0x42f309(0x1e4)]({'templateId':protocolIdSchema,'jobId':protocolIdSchema,'draft':conversationTemplateDraftSchema,'requestedByUserId':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x59cdb5,_0x3c0a42)=>{const _0x2757fe=_0x42f309;if(_0x59cdb5[_0x2757fe(0x408)]!==_0x59cdb5[_0x2757fe(0x353)][_0x2757fe(0x408)])_0x3c0a42[_0x2757fe(0x497)]({'code':_0x2757fe(0x2b6),'path':[_0x2757fe(0x408)],'message':_0x2757fe(0x2dd)});});export const conversationTemplatePublishStatusInputSchema=z[_0x42f309(0x1e4)]({'templateId':protocolIdSchema,'jobId':protocolIdSchema})[_0x42f309(0x1f4)]();export const conversationTemplatePublishJobSchema=z[_0x42f309(0x1e4)]({'id':protocolIdSchema,'templateId':protocolIdSchema,'draftRevision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'stage':z[_0x42f309(0x448)]([_0x42f309(0x42c),_0x42f309(0x374),_0x42f309(0x4a1),_0x42f309(0x431),_0x42f309(0x246),_0x42f309(0x209),_0x42f309(0x2ca)]),'status':z[_0x42f309(0x448)]([_0x42f309(0x3fc),_0x42f309(0x421),_0x42f309(0x45d),_0x42f309(0x3e9)]),'versionId':protocolIdSchema[_0x42f309(0x41d)](),'errorCode':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,79}$/)[_0x42f309(0x498)](),'errorSummary':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x1135*0x1+0x1*-0x207d+0x1330)[_0x42f309(0x41d)](),'createdAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x580b45,_0x513ef7)=>{const _0x6b2ff4=_0x42f309;if(_0x580b45[_0x6b2ff4(0x20f)]===_0x6b2ff4(0x45d)&&(_0x580b45[_0x6b2ff4(0x36c)]!==_0x6b2ff4(0x2ca)||_0x580b45[_0x6b2ff4(0x254)]===undefined||_0x580b45[_0x6b2ff4(0x33f)]!==null))_0x513ef7[_0x6b2ff4(0x497)]({'code':_0x6b2ff4(0x2b6),'message':_0x6b2ff4(0x491)});if(_0x580b45[_0x6b2ff4(0x20f)]===_0x6b2ff4(0x3e9)&&_0x580b45[_0x6b2ff4(0x33f)]===null)_0x513ef7[_0x6b2ff4(0x497)]({'code':_0x6b2ff4(0x2b6),'message':_0x6b2ff4(0x3be)});if(_0x580b45[_0x6b2ff4(0x20f)]!==_0x6b2ff4(0x3e9)&&_0x580b45[_0x6b2ff4(0x33f)]!==null)_0x513ef7[_0x6b2ff4(0x497)]({'code':_0x6b2ff4(0x2b6),'path':[_0x6b2ff4(0x33f)],'message':_0x6b2ff4(0x4c1)});});export const conversationTemplatePublishResultSchema=z[_0x42f309(0x1e4)]({'job':conversationTemplatePublishJobSchema,'version':conversationTemplateVersionSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x5ac388,_0x229c90)=>{const _0x1760e5=_0x42f309;if(_0x5ac388[_0x1760e5(0x3fb)][_0x1760e5(0x20f)]===_0x1760e5(0x45d)){if(_0x5ac388[_0x1760e5(0x475)]===undefined||_0x5ac388[_0x1760e5(0x475)]['id']!==_0x5ac388[_0x1760e5(0x3fb)][_0x1760e5(0x254)]||_0x5ac388[_0x1760e5(0x475)][_0x1760e5(0x408)]!==_0x5ac388[_0x1760e5(0x3fb)][_0x1760e5(0x408)]||_0x5ac388[_0x1760e5(0x475)][_0x1760e5(0x20f)]!==_0x1760e5(0x375))_0x229c90[_0x1760e5(0x497)]({'code':_0x1760e5(0x2b6),'path':[_0x1760e5(0x475)],'message':_0x1760e5(0x350)});return;}if(_0x5ac388[_0x1760e5(0x475)]!==undefined)_0x229c90[_0x1760e5(0x497)]({'code':_0x1760e5(0x2b6),'path':[_0x1760e5(0x475)],'message':_0x1760e5(0x3d4)});});export const hostedConversationStatusSchema=z[_0x42f309(0x25c)](_0x42f309(0x3f3));export const hostedConversationActivityStatusSchema=z[_0x42f309(0x448)]([_0x42f309(0x3a0),_0x42f309(0x421),_0x42f309(0x205),_0x42f309(0x476)]);export const hostedConversationActivitySchema=z[_0x42f309(0x1e4)]({'status':hostedConversationActivityStatusSchema,'version':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]();export const hostedConversationActivityProjectionSchema=z[_0x42f309(0x1e4)]({'userId':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'templateId':protocolIdSchema,'conversationId':protocolIdSchema,'activity':hostedConversationActivitySchema})[_0x42f309(0x1f4)]();export const hostedConversationActivityMessageSchema=z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x21e)),'nodeId':protocolIdSchema,'conversationId':protocolIdSchema,'activity':hostedConversationActivitySchema})[_0x42f309(0x1f4)]();const hostedConversationBaseObjectSchema=z[_0x42f309(0x1e4)]({'id':protocolIdSchema,'nodeId':protocolIdSchema,'sessionId':protocolIdSchema,'templateId':protocolIdSchema,'templateName':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x906+-0x1*0xba2+0x14a9)[_0x42f309(0x2a0)](0xc38+0x1*-0x3d9+0x193*-0x5),'activeVersionId':protocolIdSchema,'title':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x223d*-0x1+0xb3*-0x34+-0xe*-0x50b)[_0x42f309(0x2a0)](0xf86*-0x2+0x3*0xb11+-0x187),'titleSource':z[_0x42f309(0x448)]([_0x42f309(0x3c1),_0x42f309(0x267),_0x42f309(0x2fb)])[_0x42f309(0x466)](_0x42f309(0x2fb)),'pinnedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'status':hostedConversationStatusSchema,'modelId':protocolIdSchema,'createdAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'lastActivityAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]();export const hostedConversationSummarySchema=hostedConversationBaseObjectSchema[_0x42f309(0x2de)]({'activity':hostedConversationActivitySchema[_0x42f309(0x466)]({'status':_0x42f309(0x476),'version':0x0,'updatedAt':0x0})})[_0x42f309(0x1f4)]();export const hostedConversationManifestSchema=hostedConversationBaseObjectSchema[_0x42f309(0x2de)]({'userStorageKey':stableStorageKeySchema,'conversationStorageKey':stableStorageKeySchema,'clientRequestId':protocolIdSchema[_0x42f309(0x41d)](),'templateDeleted':z[_0x42f309(0x400)](),'quota':z[_0x42f309(0x1e4)]({'usedBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'maxBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()})[_0x42f309(0x1f4)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x567b94,_0x58ccaa)=>{const _0xb766c6=_0x42f309;if(_0x567b94[_0xb766c6(0x257)][_0xb766c6(0x334)]>_0x567b94[_0xb766c6(0x257)][_0xb766c6(0x311)])_0x58ccaa[_0xb766c6(0x497)]({'code':_0xb766c6(0x2b6),'path':[_0xb766c6(0x257)],'message':_0xb766c6(0x2e5)});});export const conversationFileProjectionSchema=z[_0x42f309(0x1e4)]({'id':protocolIdSchema,'conversationId':protocolIdSchema,'category':z[_0x42f309(0x448)]([_0x42f309(0x2af),_0x42f309(0x1fd)]),'relativePath':conversationRelativePathSchema,'displayName':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0xabc+0xd0d+-0x10*0x25)[_0x42f309(0x2a0)](0x149e+0x9ae+-0xe26*0x2),'mimeType':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0xaa3+0x20ec+0x45b*-0xa)[_0x42f309(0x2a0)](0x8c8+0x76*0x28+-0x1a39),'size':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'source':z[_0x42f309(0x448)]([_0x42f309(0x3b4),_0x42f309(0x44d),_0x42f309(0x335)]),'turnId':protocolIdSchema[_0x42f309(0x41d)](),'itemId':protocolIdSchema[_0x42f309(0x41d)](),'createdAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'updatedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]();export const hostedConversationSnapshotSchema=z[_0x42f309(0x1e4)]({'nodeAppVersion':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0x6e6+-0x715+0x2cc*0x5)[_0x42f309(0x2a0)](0x1873+-0xcdc+0xb17*-0x1)[_0x42f309(0x41d)](),'conversation':hostedConversationSummarySchema,'template':conversationTemplateSummarySchema,'run':z[_0x42f309(0x1e4)]({'id':protocolIdSchema,'status':agentRunStatusSchema,'startedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'completedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x498)](),'turns':z[_0x42f309(0x298)](conversationTurnSchema),'files':z[_0x42f309(0x298)](conversationFileProjectionSchema),'models':z[_0x42f309(0x298)](marAgentNodeModelSummarySchema),'error':z[_0x42f309(0x1e4)]({'code':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Z][A-Z0-9_]{0,79}$/),'message':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xbec+0x9f8+0xa7*0x3)[_0x42f309(0x2a0)](-0x10d*-0x1f+0x6ed*0x1+-0x2398)})[_0x42f309(0x1f4)]()[_0x42f309(0x498)](),'snapshotSequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x4bd02c,_0x307f46)=>{const _0x27f56e=_0x42f309;uniqueProtocolIds(_0x4bd02c[_0x27f56e(0x460)][_0x27f56e(0x27e)](_0x3f315a=>_0x3f315a['id']),_0x307f46,[_0x27f56e(0x460)]);});export const hostedConversationCreateInputSchema=z[_0x42f309(0x1e4)]({'templateId':protocolIdSchema,'clientRequestId':protocolIdSchema})[_0x42f309(0x1f4)]();export const hostedConversationListInputSchema=z[_0x42f309(0x1e4)]({'limit':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](-0xed8+-0x23dd+-0x195b*-0x2)[_0x42f309(0x2a0)](0xf*-0x1d+-0x2*0xdc6+0x1b*0x119)[_0x42f309(0x466)](-0x179b+-0x24b2+0x3c61),'cursor':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x13f3+-0x21e*-0xd+-0x364*0xe)[_0x42f309(0x2a0)](-0x8ab+0x2*-0x1369+0x377d)[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]();export const hostedConversationListPageSchema=z[_0x42f309(0x1e4)]({'items':z[_0x42f309(0x298)](hostedConversationSummarySchema)[_0x42f309(0x2a0)](0x270b+-0x791+-0x15a*0x17),'nextCursor':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1b41+-0x11b6+-0x6*0x197)[_0x42f309(0x2a0)](-0x259*0x1+0xc5*0x2e+-0x190d)[_0x42f309(0x498)]()})[_0x42f309(0x1f4)]();export const hostedConversationDirectoryPageSchema=z[_0x42f309(0x1e4)]({'items':z[_0x42f309(0x298)](hostedConversationSummarySchema),'nextCursor':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xe5a+0xbc1+-0x1a1a)[_0x42f309(0x2a0)](0x2475+-0x2400+0x1*0x78b)[_0x42f309(0x498)]()})[_0x42f309(0x1f4)]();export const hostedConversationIdInputSchema=z[_0x42f309(0x1e4)]({'conversationId':protocolIdSchema})[_0x42f309(0x1f4)]();export const hostedConversationRollbackInputSchema=hostedConversationIdInputSchema[_0x42f309(0x2de)]({'turnId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xa08+0x1*-0x163d+-0x1*-0xc36)[_0x42f309(0x2a0)](-0x3f1*0x9+0x13*-0x171+-0x1*-0x3f5c),'boundary':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x74b*-0x3+0x428+-0x682*0x4)[_0x42f309(0x2a0)](0x3f7+0x2258+-0x1*0x254f)[_0x42f309(0x498)]()})[_0x42f309(0x1f4)]();export const hostedConversationImageReadInputSchema=hostedConversationIdInputSchema[_0x42f309(0x2de)]({'runId':protocolIdSchema,'imageIndex':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()})[_0x42f309(0x1f4)]();export const hostedConversationDeleteResultSchema=z[_0x42f309(0x1e4)]({'deletedConversationId':protocolIdSchema})[_0x42f309(0x1f4)]();export const hostedConversationMessageInputSchema=z[_0x42f309(0x1e4)]({'conversationId':protocolIdSchema,'clientMessageId':protocolIdSchema,'prompt':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0xf344*0x1+0x2a121+-0x20dc5),'attachmentIds':z[_0x42f309(0x298)](protocolIdSchema)[_0x42f309(0x2a0)](0xd22+0x1f1b+-0x2c1d)[_0x42f309(0x466)]([]),'modelId':protocolIdSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x1ea542,_0x50a1f2)=>{const _0x30f234=_0x42f309;if(_0x1ea542[_0x30f234(0x1ea)][_0x30f234(0x27c)]()[_0x30f234(0x27d)]===-0x34a*-0x3+-0xdd*0x1+-0x901&&_0x1ea542[_0x30f234(0x1df)][_0x30f234(0x27d)]===0xb29*0x3+-0xe6e+-0x130d)_0x50a1f2[_0x30f234(0x497)]({'code':_0x30f234(0x2b6),'message':_0x30f234(0x1e2)});uniqueProtocolIds(_0x1ea542[_0x30f234(0x1df)],_0x50a1f2,[_0x30f234(0x1df)]);});export const hostedConversationConfigUpdateInputSchema=z[_0x42f309(0x1e4)]({'conversationId':protocolIdSchema,'modelId':protocolIdSchema})[_0x42f309(0x1f4)]();export const hostedConversationMetadataUpdateInputSchema=z[_0x42f309(0x1e4)]({'conversationId':protocolIdSchema,'title':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1*-0x11d+0x591+-0x473)[_0x42f309(0x2a0)](0x4ef*-0x3+-0x296*-0x9+-0x31*0x29)[_0x42f309(0x41d)](),'pinned':z[_0x42f309(0x400)]()[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x4a4bd9,_0x2253e6)=>{const _0x58fcdd=_0x42f309;if(_0x4a4bd9[_0x58fcdd(0x4c7)]===undefined&&_0x4a4bd9[_0x58fcdd(0x2fe)]===undefined)_0x2253e6[_0x58fcdd(0x497)]({'code':_0x58fcdd(0x2b6),'message':_0x58fcdd(0x23a)});});export const hostedConversationWatchInputSchema=z[_0x42f309(0x1e4)]({'conversationId':protocolIdSchema,'mode':z[_0x42f309(0x448)]([_0x42f309(0x266),_0x42f309(0x39a)]),'workbenchConnectionId':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/),'watchId':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/)})[_0x42f309(0x1f4)]();export const hostedConversationUnwatchInputSchema=z[_0x42f309(0x1e4)]({'conversationId':protocolIdSchema,'workbenchConnectionId':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/),'watchId':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[A-Za-z0-9_-]{8,128}$/)})[_0x42f309(0x1f4)]();const hostedConversationUploadFileSchema=z[_0x42f309(0x1e4)]({'name':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x1e3e+-0x3*-0xc3b+-0x42ee*0x1)[_0x42f309(0x2a0)](-0xc*-0x274+0xbb0+-0x2720)[_0x42f309(0x469)](_0x2f0e60=>_0x2f0e60!=='.'&&_0x2f0e60!=='..'&&!_0x2f0e60[_0x42f309(0x32c)]('/')&&!_0x2f0e60[_0x42f309(0x32c)]('\x5c')&&!_0x2f0e60[_0x42f309(0x32c)]('\x00'),_0x42f309(0x3e8)),'size':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'mimeType':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x718+-0xa79*-0x2+-0x1c09)[_0x42f309(0x2a0)](0x3d*-0x1+0x1424*-0x1+-0x9*-0x260)})[_0x42f309(0x1f4)]();export const hostedConversationFilesSchema=z[_0x42f309(0x1e4)]({'files':z[_0x42f309(0x298)](conversationFileProjectionSchema)})[_0x42f309(0x1f4)]();export const hostedConversationFileReadInputSchema=hostedConversationIdInputSchema[_0x42f309(0x2de)]({'fileId':protocolIdSchema,'offset':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x41d)](),'limit':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x4af)](-0xad*-0x5+-0x186+-0x1da)[_0x42f309(0x2a0)]((0xe8*-0x1+0x135c*0x2+-0x23d*0x10)*(0x63*0x2+0x1*-0x1b77+0x51*0x61))[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]();export const hostedConversationFileDeleteInputSchema=hostedConversationIdInputSchema[_0x42f309(0x2de)]({'fileId':protocolIdSchema})[_0x42f309(0x1f4)]();export const hostedConversationFileDeleteResultSchema=z[_0x42f309(0x1e4)]({'deletedFileId':protocolIdSchema,'files':z[_0x42f309(0x298)](conversationFileProjectionSchema)})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x4c72e0,_0x302c2f)=>{const _0x295bf9=_0x42f309;uniqueProtocolIds(_0x4c72e0[_0x295bf9(0x458)][_0x295bf9(0x27e)](_0x3219bf=>_0x3219bf['id']),_0x302c2f,[_0x295bf9(0x458)]);if(_0x4c72e0[_0x295bf9(0x458)][_0x295bf9(0x479)](_0x42cfd0=>_0x42cfd0['id']===_0x4c72e0[_0x295bf9(0x445)]))_0x302c2f[_0x295bf9(0x497)]({'code':_0x295bf9(0x2b6),'path':[_0x295bf9(0x458)],'message':_0x295bf9(0x255)});});export const hostedConversationFileReadResultSchema=z[_0x42f309(0x1e4)]({'file':conversationFileProjectionSchema,'encoding':z[_0x42f309(0x25c)](_0x42f309(0x1cb)),'content':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](Math[_0x42f309(0x2e9)]((0xf01*-0x2+-0x1*0x26b3+0x46b5)*(0x14c3+0x754+-0x371*0x7)*(-0x80*0x47+-0x2*0x447+0x2c12)/(-0x5e8+0x93*-0x2d+0x10f*0x1e))+(0x1dcf*0x1+0x9*0x37f+-0x1ea1*0x2)),'offset':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'nextOffset':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'eof':z[_0x42f309(0x400)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x487579,_0x2c1210)=>{const _0x29e64b=_0x42f309;if(!canonicalBase64(_0x487579[_0x29e64b(0x40a)]))_0x2c1210[_0x29e64b(0x497)]({'code':_0x29e64b(0x2b6),'path':[_0x29e64b(0x40a)],'message':_0x29e64b(0x31a)});if(_0x487579[_0x29e64b(0x473)]!==null&&_0x487579[_0x29e64b(0x473)]<=_0x487579[_0x29e64b(0x22a)])_0x2c1210[_0x29e64b(0x497)]({'code':_0x29e64b(0x2b6),'path':[_0x29e64b(0x473)],'message':_0x29e64b(0x342)});});export const hostedConversationUploadPreflightInputSchema=hostedConversationIdInputSchema[_0x42f309(0x2de)]({'files':z[_0x42f309(0x298)](hostedConversationUploadFileSchema)[_0x42f309(0x4af)](-0x56b+0x20fc+-0x1b90)[_0x42f309(0x2a0)](-0x1e90+-0x1ce6+0x3b96)})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x180744,_0x43b14c)=>{const _0x40d4e3=_0x42f309,_0xc6e365=_0x180744[_0x40d4e3(0x458)][_0x40d4e3(0x27e)](_0x5c4f08=>_0x5c4f08[_0x40d4e3(0x23c)][_0x40d4e3(0x461)](_0x40d4e3(0x234))[_0x40d4e3(0x2d9)]());if(new Set(_0xc6e365)[_0x40d4e3(0x3cf)]!==_0xc6e365[_0x40d4e3(0x27d)])_0x43b14c[_0x40d4e3(0x497)]({'code':_0x40d4e3(0x2b6),'path':[_0x40d4e3(0x458)],'message':_0x40d4e3(0x443)});});export const hostedConversationUploadPreflightResultSchema=z[_0x42f309(0x1e4)]({'files':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'name':hostedConversationUploadFileSchema[_0x42f309(0x376)][_0x42f309(0x23c)],'status':z[_0x42f309(0x448)]([_0x42f309(0x32e),_0x42f309(0x26a),_0x42f309(0x237),_0x42f309(0x3f9),_0x42f309(0x3ce)])})[_0x42f309(0x1f4)]())})[_0x42f309(0x1f4)]();export const hostedConversationUploadCreateInputSchema=hostedConversationUploadFileSchema[_0x42f309(0x2de)]({'conversationId':protocolIdSchema,'clientRequestId':protocolIdSchema})[_0x42f309(0x1f4)]();export const hostedConversationUploadChunkInputSchema=hostedConversationIdInputSchema[_0x42f309(0x2de)]({'uploadId':protocolIdSchema,'offset':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'dataBase64':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x197*-0x7+0x1a99+0x1*-0xf74)[_0x42f309(0x2a0)](Math[_0x42f309(0x2e9)]((0x544*0x3+0xb78+-0x1944)*(-0x1*0x1f69+-0x2*0x11a7+0x46b7)*(0x221c+-0x1df2+0x12*-0x3b)/(-0x154*-0xd+0xf47*-0x1+0x16*-0x17))+(-0x11d5+0x254f*-0x1+0x3728))[_0x42f309(0x469)](_0x2e6a77=>canonicalBase64(_0x2e6a77)&&base64DecodedByteLength(_0x2e6a77)<=(-0x1955+-0x178a+-0x9*-0x5a7)*(-0x1*0x1357+0x1071+-0x1*-0x6e6),_0x42f309(0x2ed))})[_0x42f309(0x1f4)]();export const hostedConversationUploadControlInputSchema=hostedConversationIdInputSchema[_0x42f309(0x2de)]({'uploadId':protocolIdSchema})[_0x42f309(0x1f4)]();export const hostedConversationUploadSchema=z[_0x42f309(0x1e4)]({'uploadId':protocolIdSchema,'conversationId':protocolIdSchema,'name':hostedConversationUploadFileSchema[_0x42f309(0x376)][_0x42f309(0x23c)],'mimeType':hostedConversationUploadFileSchema[_0x42f309(0x376)][_0x42f309(0x4d0)],'receivedBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'size':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x30d),_0x42f309(0x29f),_0x42f309(0x228)]),'file':conversationFileProjectionSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()[_0x42f309(0x225)]((_0x108978,_0x15bd85)=>{const _0x5d4172=_0x42f309;if(_0x108978[_0x5d4172(0x360)]>_0x108978[_0x5d4172(0x3cf)])_0x15bd85[_0x5d4172(0x497)]({'code':_0x5d4172(0x2b6),'path':[_0x5d4172(0x360)],'message':_0x5d4172(0x46f)});if(_0x108978[_0x5d4172(0x20f)]===_0x5d4172(0x29f)&&_0x108978[_0x5d4172(0x41b)]===undefined)_0x15bd85[_0x5d4172(0x497)]({'code':_0x5d4172(0x2b6),'path':[_0x5d4172(0x41b)],'message':_0x5d4172(0x1e0)});if(_0x108978[_0x5d4172(0x20f)]!==_0x5d4172(0x29f)&&_0x108978[_0x5d4172(0x41b)]!==undefined)_0x15bd85[_0x5d4172(0x497)]({'code':_0x5d4172(0x2b6),'path':[_0x5d4172(0x41b)],'message':_0x5d4172(0x29d)});});export const conversationSegmentSchema=z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x6f3+0x1362+-0x1*0xc6e)[_0x42f309(0x2a0)](-0x1f*-0x93+0x57*0x3b+0x59*-0x6a),'sessionId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x99e+0x1cd*0xc+0x1f*-0x63)[_0x42f309(0x2a0)](-0x1d5*0x13+0x22e1+0x6e),'turnId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x26e4+-0x1e54*-0x1+-0x4537)[_0x42f309(0x2a0)](-0xff3+0x5*-0x621+0x2f18),'runId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x19c9+0x23*0x8b+-0x9*-0xc1)[_0x42f309(0x2a0)](-0x1ba3*0x1+0x2056*0x1+-0x19*0x2b)[_0x42f309(0x498)](),'index':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'status':conversationTurnSchema[_0x42f309(0x376)][_0x42f309(0x20f)],'rewind':conversationTurnSchema[_0x42f309(0x376)][_0x42f309(0x430)],'items':z[_0x42f309(0x298)](conversationItemSchema),'startedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'completedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()});export const conversationSegmentPageSchema=z[_0x42f309(0x1e4)]({'unit':z[_0x42f309(0x25c)](_0x42f309(0x3cc)),'segments':z[_0x42f309(0x298)](conversationSegmentSchema),'nextCursor':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x14ce*0x1+-0x11d3+0x457*0x3)[_0x42f309(0x498)](),'snapshotSequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'source':z[_0x42f309(0x448)]([_0x42f309(0x326),_0x42f309(0x274),_0x42f309(0x2e8)]),'readAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'latestVisibleAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'deferredOlderHistory':z[_0x42f309(0x400)]()[_0x42f309(0x41d)]()});export const conversationItemDeltaSchema=z[_0x42f309(0x420)](_0x42f309(0x2f1),[z[_0x42f309(0x1e4)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x344)),'itemId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xf*-0x217+-0x1f5b*0x1+0x3eb5)[_0x42f309(0x2a0)](-0x2bb*0x7+0x1461+-0xc4),'itemRevision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'text':z[_0x42f309(0x259)]()}),z[_0x42f309(0x1e4)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x425)),'itemId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xb4+0x1*-0x12e0+-0x2f*-0x63)[_0x42f309(0x2a0)](0x81*-0xa+-0x1b37+-0x20c1*-0x1),'itemRevision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'steps':z[_0x42f309(0x298)](z[_0x42f309(0x1e4)]({'id':z[_0x42f309(0x259)](),'text':z[_0x42f309(0x259)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x402),_0x42f309(0x409),_0x42f309(0x29f)])}))}),z[_0x42f309(0x1e4)]({'kind':z[_0x42f309(0x25c)](_0x42f309(0x39b)),'itemId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xc01+0x904+-0x2*0xa82)[_0x42f309(0x2a0)](-0x1c9b+-0x2ba*-0x4+-0x3*-0x611),'itemRevision':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'label':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x2*0xef4+-0xf*-0x21+-0x1ded*-0x1)})]);export const terminalDataFrameSchema=z[_0x42f309(0x420)](_0x42f309(0x38b),[z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x39e)),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1dec*-0x1+0x15e2*-0x1+-0x809)[_0x42f309(0x2a0)](0x6a7+-0x3c2+0x1*-0x265),'afterSequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()}),z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x226)),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xe85+-0x26e5+-0x5*-0xaaf)[_0x42f309(0x2a0)](0x28*0x17+0x1a05+-0x1d1d),'rows':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x2a0)](0xa6e+0x10b1+-0x1737),'cols':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()[_0x42f309(0x2a0)](-0x5*-0x2b+-0x64f+0x960)}),z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x49a)),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x234b+-0x1*0x2301+0x49*-0x1)[_0x42f309(0x2a0)](0x1*-0x2567+0x2609+-0x22),'data':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1d*-0x116+0x2d5c*-0x8+0x1ab3*0x16)}),z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x4ac)),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1be7+-0x101*-0x5+0x3f*0x5d)[_0x42f309(0x2a0)](0x3e4*0x3+-0x1*0xb1b+-0x11),'sequence':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'data':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1e67*-0xe+-0x284f*-0x9+-0x1*0x21469)}),z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x31c)),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x25c6+-0x725*0x1+-0x23f*-0x14)[_0x42f309(0x2a0)](-0x2fe*0xb+0x3f*-0x55+0x3655*0x1)}),z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x453)),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x216e+-0x1*-0x2635+-0x4c6)[_0x42f309(0x2a0)](-0x2*-0x1288+0x24b8+-0x4*0x1252),'exitCode':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x498)]()}),z[_0x42f309(0x1e4)]({'type':z[_0x42f309(0x25c)](_0x42f309(0x262)),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x4*0x4ed+0x417*-0x9+0xdb*0x14)[_0x42f309(0x2a0)](-0x15e4+0x3*-0x408+0x4*0x89f),'code':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x9c6+-0x5cf+0x1*-0x3f6)[_0x42f309(0x2a0)](0x1*0x1393+0xbb7+-0x1efa)})]);export const terminalAttachTicketSchema=z[_0x42f309(0x1e4)]({'ticket':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x17b4+0x2534*-0x1+0xda0)[_0x42f309(0x2a0)](0x24ed+-0x5*0x305+0x6c*-0x2f),'nodeId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xf74*-0x1+-0x4fa+-0xa79)[_0x42f309(0x2a0)](0x3*0x5f8+0x21fd+-0x3365),'terminalId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1f8a+0xd*-0x232+-0x2ff)[_0x42f309(0x2a0)](-0x26c0+-0x1*0x1127+0x3867),'userSessionFingerprint':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x246c+0x97f*0x3+-0xf8*0x43)[_0x42f309(0x2a0)](0x28a+0x1fe4+-0x21ee),'issuedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'expiresAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)]()})[_0x42f309(0x225)]((_0x1a8fad,_0x2cab36)=>{const _0x49975f=_0x42f309;_0x1a8fad[_0x49975f(0x40c)]<=_0x1a8fad[_0x49975f(0x3ad)]&&_0x2cab36[_0x49975f(0x497)]({'code':_0x49975f(0x2b6),'message':_0x49975f(0x230)});});export const workspaceFileEntrySchema=z[_0x42f309(0x1e4)]({'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xc4b+0xb*0x38b+-0x3343)[_0x42f309(0x2a0)](-0xd07+-0x1f5a+0x3c61),'name':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0xd3f+-0x1*-0x19fd+-0x3*0x43f)[_0x42f309(0x2a0)](0x6df*0x4+0x203*0x5+-0x238b),'kind':z[_0x42f309(0x448)]([_0x42f309(0x30b),_0x42f309(0x3c9)]),'size':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'modifiedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()});export const workspaceFileListSchema=z[_0x42f309(0x1e4)]({'entries':z[_0x42f309(0x298)](workspaceFileEntrySchema),'nextCursor':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x19*0x25+-0x1677+0x1a15)[_0x42f309(0x2a0)](-0x2594+-0x1632+0x3fc6)[_0x42f309(0x498)](),'truncated':z[_0x42f309(0x400)]()});export const workspaceContentMatchSchema=z[_0x42f309(0x1e4)]({'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x11*-0x123+-0x23fa+-0x1ba7*-0x2)[_0x42f309(0x2a0)](0x1e2a+-0x231d+0x14f3),'line':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'column':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x48e)](),'preview':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x79b+-0x17*0x2c5+0x761*0xe)});export const workspaceContentSearchSchema=z[_0x42f309(0x1e4)]({'matches':z[_0x42f309(0x298)](workspaceContentMatchSchema)[_0x42f309(0x2a0)](0xbc*-0x1b+0xbc3*0x3+-0xead*0x1),'engine':z[_0x42f309(0x448)]([_0x42f309(0x377),_0x42f309(0x263),_0x42f309(0x303),_0x42f309(0x281)]),'truncated':z[_0x42f309(0x400)](),'skippedFiles':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()});export const workspaceFileReadSchema=z[_0x42f309(0x1e4)]({'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xf*-0x1cf+0x199*-0x3+0x2e7*0xb)[_0x42f309(0x2a0)](-0x2549+-0xe3d+0x4386),'encoding':z[_0x42f309(0x448)]([_0x42f309(0x384),_0x42f309(0x1cb)]),'size':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'content':z[_0x42f309(0x259)](),'truncated':z[_0x42f309(0x400)](),'nextOffset':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)]()});export const workspaceUploadPreflightSchema=z[_0x42f309(0x1e4)]({'name':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1*0xc7b+-0x1db5+-0x2a31*-0x1)[_0x42f309(0x2a0)](-0x1512+0x1*-0x2612+0x3d24),'status':z[_0x42f309(0x448)]([_0x42f309(0x32e),_0x42f309(0x412),_0x42f309(0x292),_0x42f309(0x26a)]),'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2*0xd4f+0x114a+0x955)[_0x42f309(0x2a0)](0x139b+0x304+-0x69f*0x1)[_0x42f309(0x498)]()});export const workspaceUploadSchema=z[_0x42f309(0x1e4)]({'uploadId':z[_0x42f309(0x259)]()[_0x42f309(0x3fa)](),'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x11e*0x3+-0x1761+0x1408)[_0x42f309(0x2a0)](0x11e6+-0x234d*0x1+-0x1*-0x2167),'receivedBytes':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'size':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()});export const workspaceChangeSchema=z[_0x42f309(0x1e4)]({'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x11*0x97+-0x13*0x3e+0xea2)[_0x42f309(0x2a0)](0x20bf+-0x804+-0x8bb),'state':z[_0x42f309(0x448)]([_0x42f309(0x2b8),_0x42f309(0x2e4),_0x42f309(0x214)]),'change':z[_0x42f309(0x448)]([_0x42f309(0x222),_0x42f309(0x4bd),_0x42f309(0x414),_0x42f309(0x43a),_0x42f309(0x3a5),_0x42f309(0x3f5)]),'additions':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'deletions':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)]()[_0x42f309(0x498)](),'binary':z[_0x42f309(0x400)](),'diffAvailable':z[_0x42f309(0x400)]()});export const workspaceGitWorktreeSummarySchema=z[_0x42f309(0x1e4)]({'directoryName':z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](-0xeca+0x64*-0x1+0x1*0xf2f)[_0x42f309(0x2a0)](0x2321*0x1+-0x5*0x4d1+-0x1*0x90c),'branch':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x1dc2+0x11b9*-0x1+-0xc08)[_0x42f309(0x2a0)](0x12*0xdf+0x46b*0x1+-0x1*0x1219)[_0x42f309(0x498)](),'head':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[0-9a-f]{40,64}$/),'current':z[_0x42f309(0x400)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x463),_0x42f309(0x417),_0x42f309(0x1d7)]),'locked':z[_0x42f309(0x400)](),'prunable':z[_0x42f309(0x400)]()})[_0x42f309(0x1f4)]();export const workspaceChangesRepositorySchema=z[_0x42f309(0x1e4)]({'repositoryPath':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x201e+0x268b+-0x331*-0x3),'repositoryName':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x7a3+0x55*-0x3e+0x1c3a*0x1)[_0x42f309(0x2a0)](-0x1591+0x1ceb*-0x1+-0xd1f*-0x4),'source':z[_0x42f309(0x448)]([_0x42f309(0x397),_0x42f309(0x403),_0x42f309(0x34b)])[_0x42f309(0x41d)](),'worktreePath':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x25d3+0x2622+-0x1*0x4e)[_0x42f309(0x2a0)](-0xc46*-0x1+0x11ae+-0x5e*0x26)[_0x42f309(0x41d)](),'physicalPath':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x2e4+-0xafb+-0x2*-0x40c)[_0x42f309(0x2a0)](0x1*-0x10fc+0x18c4+0x838*0x1)[_0x42f309(0x41d)](),'current':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'branch':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x5e*0xd+0x262c+0x28f2*-0x1)[_0x42f309(0x498)](),'head':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[0-9a-f]{40,64}$/)[_0x42f309(0x41d)](),'status':z[_0x42f309(0x448)]([_0x42f309(0x463),_0x42f309(0x417),_0x42f309(0x1d7)])[_0x42f309(0x41d)](),'locked':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'prunable':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'error':z[_0x42f309(0x47d)](()=>publicErrorSchema)[_0x42f309(0x41d)](),'changes':z[_0x42f309(0x298)](workspaceChangeSchema)})[_0x42f309(0x225)]((_0x1d1399,_0x1b6681)=>{const _0x511768=_0x42f309;if(_0x1d1399[_0x511768(0x35a)]===undefined)return;if(_0x1d1399[_0x511768(0x35a)]===_0x511768(0x403)){if(_0x1d1399[_0x511768(0x309)][_0x511768(0x27d)]===0x1*-0x19c7+0xc1*-0x19+0x2ca0||_0x1d1399[_0x511768(0x485)]!==undefined)_0x1b6681[_0x511768(0x497)]({'code':_0x511768(0x2b6),'message':_0x511768(0x2d0)});return;}if(_0x1d1399[_0x511768(0x309)][_0x511768(0x27d)]!==0x2521+0xf7*0x1d+0x1*-0x411c||_0x1d1399[_0x511768(0x3d0)]===undefined||_0x1d1399[_0x511768(0x4b3)]===undefined||_0x1d1399[_0x511768(0x20f)]===undefined||_0x1d1399[_0x511768(0x3ed)]===undefined||_0x1d1399[_0x511768(0x45e)]===undefined)_0x1b6681[_0x511768(0x497)]({'code':_0x511768(0x2b6),'message':_0x511768(0x43e)});if(_0x1d1399[_0x511768(0x35a)]===_0x511768(0x397)){if(_0x1d1399[_0x511768(0x485)]!==undefined||_0x1d1399[_0x511768(0x4b3)]!==!![])_0x1b6681[_0x511768(0x497)]({'code':_0x511768(0x2b6),'message':_0x511768(0x238)});return;}if(_0x1d1399[_0x511768(0x485)]===undefined||_0x1d1399[_0x511768(0x4b3)]!==![]||_0x1d1399[_0x511768(0x1c2)]===undefined)_0x1b6681[_0x511768(0x497)]({'code':_0x511768(0x2b6),'message':_0x511768(0x1dd)});});export const workspaceChangesSummarySchema=z[_0x42f309(0x1e4)]({'branch':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1011+-0x12cc+0x1*0x24dd)[_0x42f309(0x498)](),'changes':z[_0x42f309(0x298)](workspaceChangeSchema),'repositories':z[_0x42f309(0x298)](workspaceChangesRepositorySchema),'worktrees':z[_0x42f309(0x298)](workspaceGitWorktreeSummarySchema)[_0x42f309(0x2a0)](-0x1*0xddf+0x9cc+0x1*0x493)[_0x42f309(0x41d)](),'worktreesTruncated':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'partial':z[_0x42f309(0x400)]()[_0x42f309(0x41d)](),'errors':z[_0x42f309(0x298)](z[_0x42f309(0x47d)](()=>publicErrorSchema))[_0x42f309(0x2a0)](0x3a8*0x8+0xc09+-0x2939)[_0x42f309(0x41d)]()});export const gitHistoryRefSchema=z[_0x42f309(0x1e4)]({'name':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1*0x1db7+-0x1110+0x2ec8)[_0x42f309(0x2a0)](-0x15c8+0x17d1*-0x1+0x2f99),'displayName':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1*-0x5fb+0x933+-0x23*0x6f)[_0x42f309(0x2a0)](-0x1d6c+0x1b0d+-0x3*-0x175),'kind':z[_0x42f309(0x448)]([_0x42f309(0x2cf),_0x42f309(0x30e)]),'hash':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[0-9a-f]{40,64}$/),'current':z[_0x42f309(0x400)]()});export const gitHistoryCommitSchema=z[_0x42f309(0x1e4)]({'hash':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[0-9a-f]{40,64}$/),'parents':z[_0x42f309(0x298)](z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](/^[0-9a-f]{40,64}$/)),'subject':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x234*0x1+-0x2*0xa79+0x22be),'authorName':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0x1*0x1348+-0x1d3*0xb+0x1*0x2c9),'authorEmail':z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](0xe19+-0x10c*-0x1a+-0x37*0xb7),'committedAt':z[_0x42f309(0x38d)]()[_0x42f309(0x36e)]()[_0x42f309(0x3c6)](),'refs':z[_0x42f309(0x298)](z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x19d9+-0x423*-0x3+-0x2641)[_0x42f309(0x2a0)](0x3*0xef+0x6c4+-0x791))});export const gitHistoryFileSchema=z[_0x42f309(0x1e4)]({'path':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xd8a*0x1+0x2*0x1362+-0x1*0x344d)[_0x42f309(0x2a0)](-0x1d14+-0x23cd+-0x50e1*-0x1),'previousPath':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0x3e6+0xe1f+0x902*-0x2)[_0x42f309(0x2a0)](-0x2*-0x2dd+-0x1*-0x113e+-0x6f8)[_0x42f309(0x41d)](),'change':z[_0x42f309(0x448)]([_0x42f309(0x222),_0x42f309(0x4bd),_0x42f309(0x414),_0x42f309(0x43a),_0x42f309(0x3a5),_0x42f309(0x3f5)])});export const workbenchNodeOperationSchema=z[_0x42f309(0x448)]([_0x42f309(0x213),_0x42f309(0x28e),_0x42f309(0x3dd),_0x42f309(0x294),_0x42f309(0x389),_0x42f309(0x1f0),_0x42f309(0x315),_0x42f309(0x471),_0x42f309(0x3a9),_0x42f309(0x3c8),_0x42f309(0x378),_0x42f309(0x4a3),_0x42f309(0x265),_0x42f309(0x47f),_0x42f309(0x23b),_0x42f309(0x2ef),_0x42f309(0x314),_0x42f309(0x21a),_0x42f309(0x25d),_0x42f309(0x201),_0x42f309(0x346),_0x42f309(0x4c5),_0x42f309(0x3b7),_0x42f309(0x277),_0x42f309(0x440),_0x42f309(0x276),_0x42f309(0x3f6),_0x42f309(0x3fe),_0x42f309(0x2d4),_0x42f309(0x3a8),_0x42f309(0x427),_0x42f309(0x41c),_0x42f309(0x200),_0x42f309(0x33c),_0x42f309(0x208),_0x42f309(0x388),_0x42f309(0x2d3),_0x42f309(0x244),_0x42f309(0x306),_0x42f309(0x482),_0x42f309(0x235),_0x42f309(0x21d),_0x42f309(0x478),_0x42f309(0x387),_0x42f309(0x3ff),_0x42f309(0x221),_0x42f309(0x2f2),_0x42f309(0x1ed),_0x42f309(0x467),_0x42f309(0x40e),_0x42f309(0x4ba),_0x42f309(0x365),_0x42f309(0x439),_0x42f309(0x480),_0x42f309(0x239),_0x42f309(0x1da),_0x42f309(0x35d),_0x42f309(0x2da),_0x42f309(0x33b),_0x42f309(0x287),_0x42f309(0x364),_0x42f309(0x3d2),_0x42f309(0x2ae),_0x42f309(0x424),_0x42f309(0x38c),_0x42f309(0x3ee),_0x42f309(0x29a),_0x42f309(0x363),_0x42f309(0x4b5),_0x42f309(0x278),_0x42f309(0x302),_0x42f309(0x472),_0x42f309(0x301),_0x42f309(0x1d6),_0x42f309(0x3b8),_0x42f309(0x20a),_0x42f309(0x2c6),_0x42f309(0x320),_0x42f309(0x284),_0x42f309(0x1c8),_0x42f309(0x361),_0x42f309(0x3f4),_0x42f309(0x2d2),_0x42f309(0x4b6),_0x42f309(0x288),_0x42f309(0x2a8),_0x42f309(0x2c4),_0x42f309(0x3d3),_0x42f309(0x493),_0x42f309(0x34a),_0x42f309(0x371),_0x42f309(0x289),_0x42f309(0x429),_0x42f309(0x270),_0x42f309(0x3f8)]);export const nodeEnvelopeSchema=z[_0x42f309(0x1e4)]({'version':z[_0x42f309(0x25c)](NODE_PROTOCOL_VERSION),'id':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xd52+0xd2f+0x350*-0x8)[_0x42f309(0x2a0)](0xaba+-0x13a7+0x96d),'type':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xb53*0x1+0x1*-0x8c2+-0x29*0x10)[_0x42f309(0x2a0)](-0x17ee+-0xc5*0x1a+0x30*0xec),'replyTo':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x1b7f*0x1+0x3d*0x13+-0x16f9*-0x1)[_0x42f309(0x2a0)](0x1c1e+0xb02*0x3+0x3ca4*-0x1)[_0x42f309(0x41d)](),'payload':z[_0x42f309(0x399)]()});const PUBLIC_ERROR_CODE=/^[A-Z][A-Z0-9_]{0,127}$/u,publicErrorTextSchema=z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x38*0x1f+-0x1*-0xe3+-0x7aa)[_0x42f309(0x2a0)](0x577*-0x4+0x91e+-0x1*-0x10a6),publicErrorParameterKeySchema=z[_0x42f309(0x259)]()[_0x42f309(0x27c)]()[_0x42f309(0x4af)](0x214f+-0x1ca*0x15+0x444)[_0x42f309(0x2a0)](0x409*0x2+0x1*-0x1c3d+0x25*0x8f),publicErrorParametersSchema=z[_0x42f309(0x48c)](publicErrorParameterKeySchema,z[_0x42f309(0x3bd)]([z[_0x42f309(0x259)]()[_0x42f309(0x2a0)](-0x1ef9*0x1+-0x2667+0x4948),z[_0x42f309(0x38d)]()[_0x42f309(0x341)]()]))[_0x42f309(0x225)]((_0x583cb9,_0x50e1b0)=>{const _0x1dffb7=_0x42f309;if(Object[_0x1dffb7(0x2b4)](_0x583cb9)[_0x1dffb7(0x27d)]>0xed1+-0x7*-0x3e7+0x2a02*-0x1)_0x50e1b0[_0x1dffb7(0x497)]({'code':_0x1dffb7(0x2b6),'message':_0x1dffb7(0x36b)});});function _0xc523(){const _0x46511e=['AxmGBM90igfSBg93zwqU','zgLYzwn0B3j5','vKfmsurbveLorW','CgfYDgLHBa','ChL0Ag9U','B3DUzxjuExbL','CMv3Aw5K','u0nbtK5jtKC','CMvSyxrPDMuGCgf0AcbPCYbPBNzHBgLK','uKvrvuvtva','vgHLihn1yM1VzhvSzsbKAxnJB3zLCNKGBgLTAxqGD2fZihjLywnOzwqUifnVBwuGCMvWB3nPDg9YAwvZigfYzsbUB3qGC2HVD24U','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra','t1jhqu5jwKfusu9o','ndi2otC5DgHetLLm','DhvYBI5XDwv1zq','BM9Kzs5ZA2LSBhmUAw5ZDgfSBa','uKvoqu1fra','BNvSBa','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','vvjm','sw5JB21WBgv0zsb3B3jRDhjLzsbYzxbVC2L0B3j5ig1LDgfKyxrH','Ahr0Chm6','D29YA3nWywnLlMzPBguUCMvHza','rKLmrv9ftKnpreLor19vtLnvufbpuLrfra','vevstuLoquXFteLnsvrFuKvbq0Hfra','DxbSB2fKig5HBwvZig11C3qGyMuGDw5PCxvL','DxnLCL9TzxnZywDL','zgvSzxrLzezPBgvjza','BwnWu2vYDMvYCW','uKvbrfLFve9FuKvtvefsva','zw51Bq','zgvSzxrLza','C2vZC2LVBI5WAw4','D2f0y2GUzMfPBgvK','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','quDftLq','ywXSB3DLze1VzgvSswrZ','C2XPy2u','vvvjra','su1br0vFr0vorvjbveLptG','DxjS','zxHPDa','u0Lor0Xfx1nftevdva','y29UDMvYC2f0Aw9UigHVC3rPBMCGCMvXDwLYzxmGtufsiefNzw50','vevyvcbPBNb1DcbPCYbYzxf1AxjLza','AxmGB2zMBgLUzs4','zMLSzxm','tunq','Dw5HDMfPBgfIBguGy2fWywjPBgL0EsbYzxf1AxjLCYbYzwfZB25dB2rL','DxnLCL9PBNb1Df9Yzxf1zxn0','sfruua','u1vdq0vfreve','Chj1BMfIBgu','AxmGBM90ihb1yMXPC2HLzc4','Bw9KzwXZ','BM9YBwfSAxPL','CgfZC3DVCMq','q0Xfqu4','tuvtu0fhrq','x0XjtuLux1jfquniruq','zgvMyxvSDa','DgvYBwLUywWUyxr0ywnOlMf1DgHVCML6zq','x0zvteW','CMvMAw5L','Aw1WB3j0zwqGBw9KzwWGAgfZig5VigvYCM9Y','DgvZDa','CxvLDwu','uKvkrunuruq','D2f0y2HuExbL','CMvJzwL2zwqGyNL0zxmGzxHJzwvKihvWBg9HzcbZAxPL','teLurq','C2vZC2LVBI51BNDHDgnO','y29UDMvYC2f0Aw9UlMHVC3rPBMCUC3rVCMfNzs5PBNnWzwn0','BMv4De9MzNnLDa','qujdrevgr0HjsKTmtu5puffsu1rvvLDywvPHyMnKzwzNAgLQA2XTBM9WCxjZDhv2D3H5EJaXmJm0nty3odKRlW','DMvYC2LVBG','surmrq','u0forejpwf9qt0Xjq1LFsu5wquXjra','D29YA3nWywnLlMDPDc5JB21TAxqUzMLSzs5KAwzM','C29Tzq','qundrvburuq','x0Lox1vtrq','Aw5ZCgvJDgLVBIbJB2rLig11C3qGBwf0y2GGDMfSAwrPDhK','Bgf6Eq','q1jfrevoveLbtf9sruy','D29YA3nWywnLlNnLC3nPB25ZlMnSzwfUDxa','BM9Kzs5ZA2LSBhmUCMvTB3zL','DMvYAwzPy2f0Aw9UvxjP','D29YA3nWywnLlMDPDc5YzwzZlMXPC3q','ChvIBgLJrgv0ywLSCW','C2vZC2LVBG','D29YA3rYzwvqyxrO','Bw9KzwWGAxmGBM90igfSBg93zwqGyNKGDgHLignYzwrLBNrPywWGDgLJA2v0','uKvuquLoruq','q09ovKvsu0fusu9ox0Hpu1rjtKDFvu5bvKfjtefcteu','vgHPCYbKAxjLy3rVCNKGAxmGDhjHy2TLzcbHCYbHihn1yM1VzhvSzsWGyNv0ic5NAxrTB2r1BgvZigHHCYbUBYbJB21WBgv0zsbWyxrOigfUzcbvuKWGBwfWCgLUzY4','BgLUDxG','CNvU','CMvJB3jK','CNvUDgLTzvnJB3bLswq','Cg9ZAxrPDMu','zMfPBgvKlG','revdteLoruq','C3vJy2vZC2z1BcbWDwjSAxnOigPVyIbPCYbPBMnVBxbSzxrL','zgLMzG','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLCY51CgXVywqUChjLzMXPz2H0','Dg9KB19SAxn0','x05pvf9bvvrit1jjwKve','u0TjteXFsu5tvefmtf9srunpvKvswv9srvfvsvjfra','ywrKsxnZDwu','BNvSBgfIBgu','v0vcu09ds0vu','Aw5WDxq','r0Lux1DpuKTtuefdrq','tufyx1nbrKvFsu5uruDfuG','AxmGyNvZEs4','rvzftLrFq1vsu09sx0LovKfmsuq','D29YA3nWywnLswq','y29UzMLNDxjLzcbWCM94EsbYzxf1AxjLCYbHifnpq0TtnsbvuKW','q09qwuLorW','q09ovKvsu0fusu9ox1rftvbmqvrfx1jfvKLtsu9ox0nptKzmsunu','C2vZC2LVBI5YB2XSyMfJAW','C2vHCMnO','CNvUDgLTzsbJCMvKzw50AwfSihrPy2TLDcbSAwzLDgLTzsbPCYbPBNzHBgLK','Dg9VBf9JywXS','uKvbvvrix1jfuvvjuKve','q0foq0vm','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','y29UzMXPy3rZihDPDgGGDgHLign1CNjLBNqGC3rHDguU','rfjbrLrFvevtva','B3v0Chv0','CMvHC29Uq29Kzq','CMvNzxG','BwLU','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','zgLZywjSzwqGy29UDMvYC2f0Aw9UigHVC3rPBMCGy2fUBM90igv4Cg9ZzsbZyw5KyM94ihn0yxrL','uLvo','y3vYCMvUDa','zw5JB3vUDgvYzwqGyw4GzxjYB3iU','y29UDMvYC2f0Aw9UlNrLBxbSyxrLlNzLCNnPB24UAw5ZCgvJDa','y29UDMvYC2f0Aw9UlMHVC3rLzc5TzxrHzgf0ys51CgrHDgu','zMLSzv9JAgfUz2u','DhvWBgu','AxmGDg9VigXHCMDLlG','BM9Kzs51CgDYywrLlMnHBMnLBa','zMXHDe1HCa','oJOX','tu9esuzjruq','tufs','y29TCgXLDgvK','D2fZihzPB2XHDgvKlG','B25SEsbMywLSzwqGChvIBgLZAcbQB2jZig1HEsbOyxzLigfUigvYCM9YignVzgu','x09grKXjtKu','mtG0zvzZreHz','uMvZCg9UC2vZignVBNrPBNvHDgLVBIbYzxf1AxjLCYbszxnWB25Zzxm','CNvUBMvYlMrLzMf1BhrZlNnHDMu','v0fjveLor19jtLbvva','DgL0Bgu','DhvYBI5ZDgfYDa','AxmGAw1TDxrHyMXLlG','qvbquK9wquXFquXsrufewv9fweLtvfm','u09ds1m1ifvstcbPCYbYzxf1AxjLza','qLLururFqvjl','u1resu8','rKLmrv9ot1rFrK9vtKq','uLvox05pvf9gt1vora','BwLTzvr5Cgu','DhvYBI5PBNrLCNj1Chq','vvbeqvrfra','v0fjveLor19bufbst1zbta','Aw1WB3j0zwqGBw9KzwWGBMvLzhmGyw4Gsuq','uLvotKvsx0nptu1btKrFvu5tvvbqt1juruq','AgvHza','u0forejpwf9vtKfwquLmqujmrq','BgLTAxqGD2fZihjLywnOzwqU','ve9hr0Xf','zxzLBNrZlMXPDMu','CMvKDwnL','y29UDMvYC2f0Aw9UlMHVC3rLzc5TzxnZywDL','yMXVy2TLza','sfruufm','yMfZzty0','C3rHCNrZv2L0Aa','CMfUzg9Tvvvjra','Aw5WDxqGy2fWywjPBgL0AwvZig11C3qGyMuGDw5PCxvL','CMvHC29UAw5NigvMzM9YDhmGBxvZDcbIzsb1BMLXDwu','tgLUA2vKihDVCMT0CMvLCYbJB3vSzcbUB3qGyMuGBgLZDgvKlIbpDgHLCIbHDMfPBgfIBguGCMvWB3nPDg9YEsbJAgfUz2vZigfYzsbZDgLSBcbZAg93BI4','uLvox0Xpu1q','uKvtvu1bqKXf','x01ju01bveni','u0TjteXFsu5tvefmtf9gquLmruq','Dw5HDMfPBgfIBguGy29UDMvYC2f0Aw9UigHVC3rPBMCGCMvXDwLYzxmGysbYzwfZB24','y29UDMvYC2f0Aw9UlMHVC3rPBMCUy2XLyw51Cc5LEgvJDxrL','vu5bvKfjtefcteu','BwvKAxvT','u05bufnit1q','D29YA3nWywnLlNnRAwXSCY5PBNn0ywXS','ufjfuefssu5h','Dw5HDMfPBgfIBguGy29TBwfUzcbYzxf1AxjLCYbYzwfZB25dB2rL','sw52ywXPzcbSAw5RzwqGD29YA3rYzwuGCMvWB3nPDg9YEsb0yxjNzxq','D2f0y2GUD29YA3nWywnLlNnUyxbZAg90','yxr0ywnOBwvUDeLKCW','y29TCgXLDgvKihvWBg9HzcbYzxf1AxjLCYbHigzPBgu','ms4X','BwvZC2fNzsbYzxf1AxjLCYb0zxH0ig9Yigf0DgfJAg1LBNrZ','x1voqvzbsuXbqKXf','B2jQzwn0','q0Xj','Ag9ZDg5HBwu','y3jLzgvUDgLHBeLK','AxmGDw5RBM93BI4','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','ChjVBxb0','t1rirvi','uKvdt05orunu','DgvYBwLUywWUy2XVC2u','q09suLvqveve','DxnLCKnVzgu','D29YA3nWywnLlNDHDgnO','se9tvevex0nptLzfuLnbveLptL9ot1rFrK9vtKq','t1bftKnprevFu0vsvKvs','rvHurvjoquXFqunusvzf','C3rYAwn0','D2fYBMLUzW','v09ss1nqqunfx0LovKfmsuq','v0fjveLor19gt1jFuLvouW','zgvMyxvSDe1VzgvSswq','tuvtu0fhrv9uwvbfx1vos05pv04','y29UDgv4Df9JB21Wywn0Aw9U','x05pvf9qvujmsvniruq','Ahr0CdO','t1vuufvu','rKLmrv9ot1rFuKvhvuXbuG','x1jbvevFteLnsvrfra','D29YA3nWywnLlMzPBgvZlNvWBg9Hzc5JAhvUAW','CNvUBMvYlMnVBw1HBMqUzxHLy3v0zq','vKfmvuu','x05pvf9gt1vora','u0TjteXFsu5tvefmtf9jtLzbteLex0XjtKS','q0foq0vmteLorW','Bwf4vxbSB2fKqNL0zxm','x0jvu1K','D29YA3nWywnLlMzPBgvZlNvWBg9Hzc5JB21WBgv0zq','u0vbteve','y29UDMvYC2f0Aw9UlMHVC3rLzc5JCMvHDgu','C29JA3m1oG','vevstuLoquXFuKvqtefzx0Dbua','u1fm','vevstuLoquXFtK9ux0zpvu5e','C3rHDhvZ','v09ss1nqqunfx0fdveLwsvrz','x1rjtuvpvvq','vevyva','BM9Kzs53B3jRyMvUy2GUy2fWywjPBgL0AwvZ','vu5uuKfds0ve','mZa4mte0r0zvDxzO','reLsrunut1jzx0nvuLnpuL9jtLzbteLe','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','zgvSzxrLzej5uNvUBMvY','CMvHC29UAw5NrwzMB3j0CW','C2vZC2LVBI5JB250zxH0lNjLywq','Aw1Hz2vhzw5LCMf0Aw9U','ufvcteLd','D29YA3nWywnLlMDPDc5JB21TAxqUzMLSzxm','Ag9ZDgvKlwnVBNzLCNnHDgLVBI5Hy3rPDML0Eq','zMLSDgvY','y29Kzq','DgvYBwLUywWUB3bLBG','qureruq','su1nrurjqvrfx0fdveLptG','rKLmrv9qqvrix0vtq0fqrq','C3vWzxjszwzPBMu','CMvZAxPL','Ag9ZDgvKv2vIu2vHCMnO','q0foq0vmteve','x0vyueLsruq','B2zMC2v0','Aw5KzxHpzG','vu5srvnuuKLdveve','Cg9YDa','u0vtu0LptG','v09ss1nqqunfx1nlsuXmx1rsqunlrurFq09orKLstv9srvfvsvjfra','DgvYBwLUywWGDgLJA2v0igv4CgLYEsbTDxn0igzVBgXVDYbPC3n1yw5Jzq','u1rbuLq','y2fWywnPDhK','x1jfuvvjuKve','tKzlqW','D29YA3nWywnLlMDPDc5OAxn0B3j5lMXPC3q','u1rbtKrbuKq','ve9px0XbuKDf','sw52ywXPzcbYB290ihjLCg9ZAxrVCNKGDgfYz2v0','D29YA3nWywnLlNnRAwXSCY5PBNnWzwn0','Bwv0ywrHDgeGDxbKyxrLihjLCxvPCMvZigeGy2HHBMDL','C2vZC2LVBI5JB25MAwCUDxbKyxrL','BMfTzq','y2HHBMDLCW','Aw1Hz2uGz2vUzxjHDgLVBIbYzxf1AxjLCYbHBIbPBwfNzs1Nzw5LCMf0Aw9Uihj1BNrPBwuGDgLJA2v0','DgvYBwLUywXFC2vSzwn0Aw9U','DgLTzwqGB3v0lG','y29KzxG','su5urvjsvvburuq','neLhrNzova','D29YA3nWywnLlMnOyw5Nzs5KAwzM','CNvUDgLTzsbJCMvKzw50AwfSigHLywrLCNmGyxjLihrVBYbSyxjNzq','tufosuzfu1q','Bg93','DhvYBG','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','tM9Kzq','q1nsrG','u0TjteXFuefusf9vtLnbrKu','v09ss1nqqunf','Bw9KzwWGsurZig11C3qGyMuGDw5PCxvL','Bwf4u3rVCMfNzuj5DgvZ','BwvZC2fNzq','AgfZigv4CgLYzwqU','Dw5ZDxbWB3j0zwrszwfZB25PBMDfzMzVCNrZ','ndi5mte0nK9OuKvYua','DMvYC2LVBKLK','zgvSzxrLzcbMAwXLignHBM5VDcbYzw1HAw4GChjVAMvJDgvK','ChjVDMLKzxi','CxvVDge','v2vIu29JA2v0','C3rYAw5N','CNvUDgLTzsbZy29WzsbTDxn0ig1HDgnOihrOzsbJCMvKzw50AwfSihrPy2TLDa','tvvmveLFu0vmrunu','BgL0zxjHBa','C2vZC2LVBI5JB21Tyw5KlMv4zwn1Dgu','AxnbCNjHEq','ywn0AxzL','ywXSB3DLzcbTB2rLBcbjrhmGBxvZDcbIzsb1BMLXDwu','C2fMzvbHCNnL','zxjYB3i','r1jfua','y29UDMvYC2f0Aw9U','C2vZC2LVBI5Yzw1VDMu','Aw5PDgLHBa','qvvutW','x1rjtuvex09vva','qLvcqKXfv1jbua','su5wquXjrf9oqu1f','zgvMyxvSDcbYzwfZB25PBMCGzwzMB3j0ig11C3qGyMuGzxHWB3nLzcb3AgvUignOB2LJzxmGyxjLignVBMzPz3vYzwq','t0jtrvjwrq','q29KzxG','uKvtvu1f','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLCY51CgXVywqUy2fUy2vS','y29UDMvYC2f0Aw9Usg9ZDgLUzW','svrftv9srvzju0LptL9dt05gteLdva','zgLZywjSzwqGB3iGDw5HDMfPBgfIBguGy29UDMvYC2f0Aw9UigHVC3rPBMCGy2fUBM90ihj1BIbJB252zxjZyxrPB25Z','BMf0AxzL','AgfZigfSCMvHzhKGyMvLBIbKzwnPzgvKlG','D29YA3nWywnLlMzPBguUD3jPDgu','D29YA3nWywnLlMzPBgvZlMXPC3q','y29UDMvYC2f0Aw9UlMHVC3rPBMCUzw5HyMXL','rKLmrv9dsefor0u','su5urvjoquXFrvjst1i','CNvUswq','DhjPBq','BgvUz3rO','BwfW','zw5KC1DPDgG','x0nptKzmsunu','tK9erq','AxmGAw52ywXPzc4','yMXVy2TLzcbTB2rLBcbOyxmGBM8Gsuq','y29UDMvYC2f0Aw9UlMHVC3rLzc51BNDHDgnO','u0TjteXFvefsr0vux09grKXjtKu','zgvMyxvSDfjLyxnVBMLUz0vMzM9YDa','BM9Kzs5Ty3bZlMLUC3bLy3q','y29UDMvYC2f0Aw9UlMHVC3rLzc5PBwfNzs5YzwfK','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLCY51CgXVywqUC3rHDhvZ','D2fZigrLBMLLzc4','y2XHDwrLlwnVzgu','y3vYCMvUDfzLCNnPB25jza','CgXHDgzVCM0','CNvUBMvYlNvZywDLlNn0yxr1CW','AgfZvxnLCM5HBwu','zNjVBuvUDhjPzxm','x0LovKfmsuq','rvHju1rtx0rjuKvdve9swq','uKvtvfjjq1rfra','D29YA3nWywnLlMrPCMvJDg9YAwvZlMXPC3q','q1jfqvrfra','ChjVDg9JB2W','uNvUBMvYigrLBgv0Aw9UignVDw50CYbTDxn0igvXDwfSihrOzsbKzwXLDgvKihrVDgfS','yxjYyxK','B21PDa','y29UDMvYC2f0Aw9UlNrLBxbSyxrLlNb1yMXPC2G','uMvZCg9UC2vZigvUy29KAw5NihjLCxvPCMvZie9Wzw5bssbszxnWB25Zzxm','AxmGDw5HDxrOzw50AwnHDgvKlG','Dw5MAw5PC2HLzcb1CgXVywqGy2fUBM90igLUy2X1zguGysbMAwXL','AgLZDg9YEs5YzwfK','q09nueXfveve','Bwf4','x01ju1njtKC','DxnLCM5HBwu','r2L0','ve9pta','q09ntufora','uKvhsvnuuKfusu9ox1rps0vox0LovKfmsuq','q0fqqujjteLuwv9wrvjtsu9ox1vou1vque9sveve','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLCY5SAxn0','y29UzMLNDxjLza','Dw5ZDxbWB3j0zwqGCMvHC29UAw5NigvMzM9YDhmGBxvZDcbIzsb1BMLXDwu','x1nuquXf','q09ervHFqvbqx1nfuLzfuG','Dg9mB3DLCKnHC2u','D29YA3nWywnLlM1JChmUAw5ZCgvJDa','vvbmt0fe','yxbPs2v5','x05pvf9bteXpv0ve','tK9erv9esvnbqKXfra','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','A2v5CW','tufoquDfra','y3vZDg9T','uLbd','u1rbr0ve','qvbj','AgLNAa','vevstuLoquXFrefuqv9dsefotKvmx1voqvzbsuXbqKXf','x0zpuKjjrerftG','ChvIBgLJugfYyw1LDgvYCW','qwnJzxnZigLZigzVCMjPzgrLBI4','sLnptG','uMvZCg9UC2vZihrYyw5ZCg9YDcbYzxf1AxjLCYbpCgvUquKGuMvZCg9UC2vZ','yxzHAwXHyMXLihrLBxbSyxrLihjLCxvPCMvZigfUigfJDgL2zsbWDwjSAxnOzwqGDMvYC2LVBG','DhjHBNnWB3j0','zxHHy3rSEsbVBMuGCNvUDgLTzsbTB2rLBcbJCMvKzw50AwfSigLZihjLCxvPCMvK','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLlNjLywq','D2f0y2GGzMfPBhvYzsbPzgvUDgL0EsbKB2vZig5VDcbTyxrJAcb0AguGD2f0y2GGDhLWzq','y29UDMvYC2f0Aw9UlMHVC3rLzc5Nzxq','AxmGzgLZywjSzwqU','Dg9vChbLCKnHC2u','qxv0AgvUDgLJyxrPB24GAxmGCMvXDwLYzwqU','uKvhsvnurvjfra','v29YA3nWywnL','y29UDgv4DfDPBMrVD1rVA2vUCW','q09ervG','x0vsuK9s','te9dquW','sw52ywXPzcbZDwjTB2r1BguGCMvWB3nPDg9YEsb0yxjNzxq','C2fUzgjVEfbVBgLJEvzLCNnPB24','y29UDMvYC2f0Aw9UlMHVC3rLzc5JB25MAwCUDxbKyxrL','D29YA3nWywnLlMnOyw5NzxmUy3vYCMvUDa','D29YA3nWywnLlMzPBgvZlM11Dgf0zq','D29YA3nWywnL','vgHPCYbYzxbVC2L0B3j5ignHBM5VDcbIzsbYzwfKlIbdAgvJAYbPDhmGzgLYzwn0B3j5lcbhAxqGBwv0ywrHDgeSigfUzcbWzxjTAxnZAw9UCY4','tKvuv09ssW','AxmGBM90igf1DgHVCML6zwqU','Dg9mB2nHBgvmB3DLCKnHC2u','D29YA3nWywnLlNnRAwXSCY5NAxqTzxHJBhvKzs1YzxbHAxi','C3vJy2vZCW','y29UDMvYC2f0Aw9UigHVC3rPBMCGAxmGtgLUDxGTB25SEq','ChvIBgLZAcb0zw1WBgf0zsbTDxn0ig1HDgnOihrOzsbKCMfMDa','zxH0zw5K','mti3lJaUmc4X','D2LUzg93CW','y3jLzgvUDgLHBa','CgXHBG','C2vZC2LVBNm','vu5tvefhruq','CxvVDgeGAxmGzxHJzwvKzwq','ywnJzxb0C05LD0nVBNzLCNnHDgLVBNm','x0rju0fcteve','CNvUDgLTzq','y2vPBa','zw5JB2rL','ywXYzwfKEsbLEgLZDhmU','AxmGAw4GDxnLlG','DxbSB2fKignODw5RigLZigLUDMfSAwq','uevsu09oquW','C2vZC2LVBI50DxjUCY5SAxn0','u0TjteXFvefsr0vux0XjtuLux0vyq0vfreve','A2LUza','DgvYBwLUywWUBgLZDa','t1bftKfjx1jfu1bptLnfuW','Bg9JywXOB3n0','EgHPz2G','BgLTAxqGD2fZigv4y2vLzgvKlG','tu9eruW','ndG4ndnywe9fEM4','tufoquDfrf9bq1rjvKu','BM9Kzq','q1vtve9n','DMfSAwqGu09ds1m1ihbYB3H5ifvstcbPCYbYzxf1AxjLza','rvzftLrFq1vsu09sx0Dbua','CgLUBMvK','u1rfrvjfra','su5urvjsvvbu','y29UDMvYC2f0Aw9UlMHVC3rPBMCUy2XLyw51Cc5WCMv2Awv3','y29UDMvYC2f0Aw9UlMHVC3rPBMCUzgLZywjSzq','ue9xrvjtsevmta','q09ovKvsu0fusu9ox1rftvbmqvrfx05pvf9bvvrit1jjwKve','q0Xbvurfx0fhru5ux1nesW','D29YA3nWywnLlMnOyw5Nzs5Yzxn0B3jL','BwfYqwDLBNq','seLhsa','CMvWB3nPDg9YEvbHDgG','qKXpq0Tfra','rKLmrq','rLvmta','vvbmt0fesu5h','uKvnt1rf','CMvWBhLuBW','vu5bvvrit1jjwKve','Bwf4qNL0zxm','AxmGCMf0zsbSAw1PDgvKlG','vvbeqvrf','C2vZC2LVBI5LDMvUDhmUCMvHza','D29YA3nWywnLlNvUD2f0y2G','yxnZAxn0yw50x21LC3nHz2u','D2fZignHBMnLBgXLzc4','CNvUlMnHBMnLBa','Cg9SBeLUDgvYDMfStxm','zMLSzsbJB250zw50igLZigLUDMfSAwq','x0nmt1nfra','y2XVC2u','zgf0yq','q3jLzgvUDgLHBhmGyxjLigLUDMfSAwqU','q09ervHFt0fvveG','y29UDMvYC2f0Aw9UlMHVC3rLzc53yxrJAa','rKLmrv9trufsq0HFteLnsvrFrvHdruveruq','AM9PBG','te9tva','u1rbuLrfra','yxzHAwXHyMXLigzPBgvZExn0zw0GyNL0zxmGy2fUBM90igv4y2vLzcb0B3rHBcbIExrLCW','B2zMAwnPywW','qvbquK9wquXFrvHqsvjfra','z2L0','AxmGDw5ZDxbWB3j0zwqU','zMLSzxn5C3rLBsb1C2fNzsbKB2vZig5VDcbTyxrJAcb0B3rHBcbHBMqGyxzHAwXHyMXLigj5DgvZ','B3v0Chv0ig11C3qGyMuGC21HBgXLCIb0AgfUignVBNrLEhq','Aw5JBhvKzxm','u0HpuLrFvevyva','uKvbrfK','B3b0Aw9UCW','qw4GAw50zxjUywWGzxjYB3iGB2nJDxjYzwqU','yxzHAwXHyMXLignHCgfIAwXPDhKGy2fUBM90igHHDMuGCMvHC29Uq29Kzq','CMvXDwLYzwqGAw5WDxrZig11C3qGyMuGDw5PCxvL','zg9LCYbUB3qGBwf0y2GU','DxnLzej5DgvZ','u1Ltvevn','tufsx1jvtLrjtuu','u0TjteXFsu5tvefmtf9qqvjusufm','yxzHAwXHyMXLignVBNzLCNnHDgLVBIbOB3n0Aw5NihjLCxvPCMvZigeGAgvHBhrOEsbcDwjIBgv3CMfWigjHy2TLBMq','BwfYA2rVD24','D2f0y2GUC2vZC2LVBI5ZBMfWC2HVDa','C2TPBgWUAw5ZDgfSBc5QB2iUz2v0','D29YA3nWywnLlMzPBgvZlNvWBg9Hzc5ZDgf0Dxm','Aw5WDxrdyxbHyMLSAxrPzxm','zMLSzxn5C3rLBvrVDgfSqNL0zxm','zxjYB3jdB2rL','uvvfvuvex05fwfrFvfvstG','zMLUAxrL','BMv4DcbVzMzZzxqGBxvZDcbHzhzHBMnL','AxmGC3rHBguU','yxnZAxn0yw50x3rLEhrFyxbWzw5K','y29UDgv4Dcb3Aw5KB3CGCMvXDwLYzw1LBNqGzg9LCYbUB3qGBwf0y2GGDgHLignHDgfSB2CGDMfSDwu','CNvUBMvYlNbYB2zPBgvZlMXPC3q','ntu0mJe0ogTjAM9QCa','qvbquK9wquXFquXsrufewv9erunjreve','yxbW','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLCY51CgXVywqUy3jLyxrL','v09ss1rsruu','DMfSAwq','CMvXDwLYzwrjBNb1Dhm','y3jLzgvUDgLHBcbjrcbTDxn0ig1HDgnOihrOzsbYDw50Aw1LihrPy2TLDa','qu5usfjpueLdx01fu1nbr0vt','C3vJy2vZC2z1BcbWDwjSAxnOihjLC3vSDcbYzxf1AxjLCYbPDhmGCMvNAxn0zxjLzcb2zxjZAw9U','uLvox1nuqvrfx0LovKfmsuq','C2vZC2LVBKLK','zhjHzNq','v09ss0jftKnix1bst1rpq09mx1vou1vque9sveve','qvjdseLwruq','AxmGDw5HDMfPBgfIBguU','revhuKferuq','AxmGzM9YyMLKzgvUlG','C2vZC2LVBI5Yzw5HBwu','C291CMnL','D2fZig5VDcbMB3vUzc4','yxbWCM92ywW','D29YA3nWywnLlNnRAwXSCY5Yzw1VDMu','C29JA3m1vxjS','nta0nJK4meLTBg1Sqq','CMvJzwL2zwrcExrLCW','y29UDMvYC2f0Aw9UlMHVC3rLzc5YB2XSyMfJAW','se9tvevex0nptLzfuLnbveLptL9gsuXfx05pvf9gt1vora','y29UDMvYC2f0Aw9UlNrLBxbSyxrLlNb1yMXPC2GUC3rHDhvZ','BM9Kzs5Ty3bZlMLUC3rHBgW','BM9Kzs5ZA2LSBhmUAw5ZCgvJDa','uLvotKvsx1rfwfq','ChvYCg9Zzq','C3bSAxq','C2fUzgjVEejHy2TLBMq','Dg9WAwm','Dg9Vig1HBNKGChvIBgLJigvYCM9YihbHCMfTzxrLCNm','C3rHz2u','q0fqqujjteLuwv9tvefmrq','Aw50','txLtuuW','t0jtrvjwrv9ptKXz','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLCY51CgXVywqUy2H1BMS','ChjVEhKGC3vTBwfYEsbTDxn0ig1HDgnOihrOzsbtt0nluZuGvvjm','AxmGy2XVC2vKlG','ru5vtuvsqvrjtKC','qvzbsuXbqKXf','C2HHCgu','uKLqr1jfua','C2vZC2LVBI5YzxDPBMq','v29YA2jLBMnO','v09ss1nqqunfx1nlsuXmx0Djvf9fwenmvurfx0zbsuXfra','x0zbsuXfra','DxnLCI1PBNb1Dc5YzxnWB25K','x0XjtuLux0vyq0vfreve','u09ds1m1ihbYB3H5igLZihjLCxvPCMvK','u1rbvfvt','u1fmAxrL','yxzHAwXHyMXL','uLvoveLnrv9usunlrvq','zMLSzxn5C3rLBuf2ywLSywjSzuj5DgvZ','DxrMltG','t0f1DgG','CgfYyw1LDgvYCW','D29YA3nWywnLlMDPDc5JB21TAxqUzMLSzs5JB250zw50lNjLywq','D29YA3nWywnLlMzPBgvZlNvWBg9Hzc5Jyw5JzwW','D29YA3nWywnLlNjLBw92zq','ru5urvjquKLtrq','DhLWzq','D29YA3nWywnLlM1JChmUCMvTB3zL','BNvTyMvY','AgfZAa','x1vos05pv04','q09ovKvsu0fusu9ox1rftvbmqvrfx05pvf9gt1vora','u0TjteXFtKfnrv9dt05gteLdva','sLnptKW','D2f0y2GUC2vZC2LVBI5LDMvUDa','reLtqujmruq','B25SEsbHihn1y2nLC3nMDwWGBg9NAw4Gyxr0zw1WDcbTyxKGzxHWB3nLigeGy3jLzgvUDgLHBa','r0Lux0niqu5hrv9srvnut1jfx1voqvzbsuXbqKXf','uK9pva','AxngAw5PDgu','Dw5RBM93BG','CMvUzxC','Dg9VBf9WCM9NCMvZC19YzxbSywnL','CMvHC29UAw5Nx3n1Bw1HCNK','ChjVEhK','yxr0ywnO','uLvotKvsx1bst0zjtevFsu5wquXjra','u1rbuLrjtKC','DxbSB2fKihf1B3rHigv4y2vLzhmGC3rVCMfNzsbXDw90yq','u29TzsbZDwjTB2r1BgvZignVDwXKig5VDcbIzsbSAxn0zwqUie90AgvYigf2ywLSywjSzsbYzxbVC2L0B3j5ignOyw5NzxmGyxjLihn0AwXSihnOB3DUlG','x0fmuKvbrfLFrevdsurfra','u0forejpwf9srvnpvvjdrv9msu1jva','q09qsuve','CgLW','ufjpve9dt0XFvKvsu0LptL9vtLnvufbpuLrfra','D29YA3nWywnLlMnVBNrLBNqUC2vHCMnO','C2vZC2LVBI5TzxrHzgf0ys51CgrHDgu','q09ovKvsu0fusu9ox1rftvbmqvrfx05pvf9qvujmsvniruq','AwrLBNrPzMLLCNmGBxvZDcbIzsb1BMLXDwu','AxmGCMvXDwLYzwqU','AxnZDwvKqxq','C3vJy2vZC2z1BcbSB2DPBIbHDhrLBxb0ig5LzwrZigeGy3jLzgvUDgLHBa','BwnWswrZ','tK9erv9vtKfvveHftLrjq0furuq','y29UDMvYC2f0Aw9UigHVC3rPBMCGy3jLyxrPB24GyxzHAwXHyMLSAxr5igrVzxmGBM90ig1HDgnOignHCgfJAxr5','Ag9ZDa','x0Lntvvuqujmrq','vvnfuG','y29UDMvYC2f0Aw9UigHVC3rPBMCGy2fWywnPDhKGzg9LCYbUB3qGBwf0y2GGzMLSzxn5C3rLBsb1C2fNzq','tK9orq','BwfYlwfNzw50lM1VzgvSlNrLC3q','y29UDMvYC2f0Aw9UlMHVC3rLzc5SAxn0','CMvZCg9UC2vZvhjHBNnWB3j0','u0TjteXFq09ovevovf9jtLzbteLe','Dg9Vig1HBNKGCNvUDgLTzsbJCMvKzw50AwfSigHLywrLCNm','x1rpt19mqvjhrq','Dw5PB24','zMfPBgvKihb1yMXPC2GGAM9IihjLCxvPCMvZigfUigvYCM9YignVzgu','sw1Hz2uGBw9KzwWGsurZig11C3qGyMuGDw5PCxvLlG','x1voqvvusevoveLdqvrfra','revgqvvmva','x0rftKLfra','yMXVy2TLzcbTB2rLBcbUzwvKCYbHignVzgu','Bw9KzwXjza','qw50AhjVCgLJignVBxbHDgLIAwXPDhKGAg9ZDgvKihDLyIb1BNn1ChbVCNrLza','BM9UBMvNyxrPDMu','DMfSDwvZ','C2vZC2LVBI5WAw4UBw92zq','reLsrunut1jz','CgvUzgLUzYbSB2DPBIbHDhrLBxb0igLZigLUy29TCgXLDgu','AxmGBwLZC2LUzY4','u0vhtuvova','zMLSzxn5C3rLBvvZywDLqMfZAxnqB2LUDhm','q09orKXjq1q','C2L6zq','CgH5C2LJywXqyxrO','AxmGzNvSBc4','BM9Kzs5Ty3bZlNjLBw92zq','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLlMrLBgv0zq','Dw5MAw5PC2HLzcbWDwjSAxnOihjLC3vSDcbJyw5UB3qGAw5JBhvKzsbHihzLCNnPB24','vu5dsefor0ve','yNL0zuXLBMD0Aa','sfruucb2zxjZAw9UCYbTDxn0igjLihvUAxf1zq','u0TjteXFsu5tvefmtf9wrvjtsu9ox1vos05pv04','ywXSB3DLze1VzgvSCW','qvbquK9wquXFtK9ux0zpvu5e','nZKZndG1nMfbEhvWsa','tK9erv9ts0Lmtf9msu5lx1voqvzbsuXbqKXf','CNvUBMvYlNvZywDLlNjLywq','DgLJA2v0','y2f1C2u','tuvtu0fhrv9jtLzbteLe','BNb4','rvHqsvjfra','y29UDMvYC2f0Aw9UigHVC3rPBMCGy3jLyxrPB24GyxzHAwXHyMLSAxr5ig11C3qGBwf0y2GGy2fWywnPDhK','yxbWCM92ywWUCMvZCg9Uza','mJq3me1ny3zODW','vKfmsurbveu','x0fmuKvbrfLFrvHju1rt','DxbSB2fKig5HBwuGAxmGAw52ywXPza','rKfjteve','x0nbtKnfteXfra','x1zjt0XbveLptG','x1vou1vque9sveve','Bg9JA2vK','y29UDMvYC2f0Aw9UlNrLBxbSyxrLlNnVDxjJzs5PBNnWzwn0','su5msu5fx0fqsv9lrvK','q0fqqujjteLuwv9vtKfwquLmqujmrq','C3rHDgu','Aw1Hz2vjBMrLEa','qunusvzf','y29UDMvYC2f0Aw9UlMHVC3rLzc5PBNrLCNj1Chq','vfLqrv9dsefor0ve','D29YA3nWywnLlMzPBguUy29UDgvUDc5YzwfK','DxbZDhjLyw1nB2rLBeLK','y29UDMvYC2f0Aw9UlMHVC3rLzc5KzwXLDgu','uvvpvefFrvHdruveruq','DxvPza','AM9I','uvvfvuve','u0HbuKvex0nptLrst0W','D29YA3nWywnLlMzPBgvZlNnLyxjJAa','CNvUlMLTywDLlNjLywq','yM9VBgvHBG','y29TBwfUzf9LEgvJDxrPB24','uevoreLorW','u1vctu9evuXf','BwfYlwfNzw50','yxzHAwXHyMXLignVBw1HBMqGy2fUBM90igHHDMuGCMvHC29Uq29Kzq','vu5wrvjjrKLfra','vevstuLoquXFqvruqunix0nptKzmsunu','DgvTCgXHDgvjza','su5Fufjpr1jfu1m','y29UDgvUDa','DwX0CMe','zxHWAxjLC0f0','q09ovKvsu0fusu9ox0Hpu1rjtKDFu1rpuKfhrv9gvuXm','BM9Kzs51CgDYywrLlNjLCxvLC3q','zw50CMLLCW','vgHLic5NAxrTB2r1BgvZignVBMzPz3vYyxrPB24Gy2fUBM90igjLihjLywqGB3iGCgfYC2vKlG','B3bLBMnVzgu','rvHju1rtx0zjteu','ChvIBgLJtwvZC2fNzq','revmrvrfra','rKLmrv9ut09Ftefsr0u','y29UDMvYC2f0Aw9Uswq','reLsvfK','su1br0u','CNvUswqGyw5KigLTywDLsw5KzxGGBxvZDcbIzsbWCM92AwrLzcb0B2DLDgHLCG','zgvMyxvSDcbTB2rLBcbTDxn0igjLigfSBg93zwq','zMLSzq','D29YA3nWywnLlMzPBgvZlNvWBg9Hzc5JCMvHDgu','B3b0Aw9UywW','Bwf4t3v0Chv0vg9Rzw5Z','DhvYBL9ZDw1Tyxj5','zgLZy3jPBwLUyxrLzfvUAw9U','uLvotKLorW','CMvZCg9UC2vZrw5JB2rPBMC','u0rl','D29YA3nWywnLlM1JChmUAw5ZDgfSBa','CgXHBL9YzxbSywnL','vevstuLoquXFvu5bvKfjtefcteu','D29YA3nWywnLlMzPBgvZlNvWBg9Hzc5WCMvMBgLNAhq','C3vWCg9YDhnfEgLZDgLUz0nVBNzLCNnHDgLVBNm','y29UDMvYC2f0Aw9UlMHVC3rLzc5MAwXLCY51CgXVywqUy29TCgXLDgu'];_0xc523=function(){return _0x46511e;};return _0xc523();}export const publicErrorSchema=z[_0x42f309(0x1e4)]({'code':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](PUBLIC_ERROR_CODE),'message':publicErrorTextSchema,'details':publicErrorTextSchema[_0x42f309(0x41d)](),'parameters':publicErrorParametersSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]();export const nodeResponseErrorPayloadSchema=z[_0x42f309(0x1e4)]({'error':z[_0x42f309(0x259)]()[_0x42f309(0x4ae)](PUBLIC_ERROR_CODE),'message':publicErrorTextSchema[_0x42f309(0x41d)](),'details':publicErrorTextSchema[_0x42f309(0x41d)](),'parameters':publicErrorParametersSchema[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]();export const httpErrorResponseSchema=z[_0x42f309(0x1e4)]({'error':publicErrorSchema[_0x42f309(0x2de)]({'requestId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](-0x2e*0x3b+-0x23a6+0x2e41)[_0x42f309(0x2a0)](0x220c+-0x1faf+-0x9f*0x3),'upstreamRequestId':z[_0x42f309(0x259)]()[_0x42f309(0x4af)](0xbf*0x27+0x47*0x25+-0x275b)[_0x42f309(0x2a0)](-0xe89+0x468*0x8+-0x1437)[_0x42f309(0x41d)]()})[_0x42f309(0x1f4)]()})[_0x42f309(0x1f4)]();const ERROR_SUBJECT_WORDS={'API':_0x42f309(0x2b9),'APP':_0x42f309(0x349),'CLI':_0x42f309(0x1e5),'CODEX':_0x42f309(0x26d),'CSRF':_0x42f309(0x24b),'GIT':_0x42f309(0x2a3),'HTTP':_0x42f309(0x45c),'HTTPS':_0x42f309(0x1ca),'ID':'ID','JSON':_0x42f309(0x2bf),'JSONL':_0x42f309(0x392),'MAR':_0x42f309(0x4be),'MCP':_0x42f309(0x459),'MYSQL':_0x42f309(0x36f),'NODE':_0x42f309(0x24a),'OAUTH':_0x42f309(0x385),'RPC':_0x42f309(0x2b7),'SDK':_0x42f309(0x423),'SQL':_0x42f309(0x20d),'SQLITE':_0x42f309(0x380),'URL':_0x42f309(0x43d),'UUID':_0x42f309(0x450),'WEBSOCKET':_0x42f309(0x258),'WORKBENCH':_0x42f309(0x379),'WORKSPACE':_0x42f309(0x2cb)},FIXED_PUBLIC_ERROR_MESSAGES={'INTERNAL_ERROR':_0x42f309(0x330),'UNAUTHENTICATED':_0x42f309(0x2c9),'FORBIDDEN':_0x42f309(0x2be),'INVALID_CREDENTIALS':_0x42f309(0x31e),'GIT_SUBMODULE_MAPPING_MISSING':_0x42f309(0x489),'GIT_SUBMODULE_MAPPING_INVALID':_0x42f309(0x410),'GIT_REPOSITORY_UNREADABLE':_0x42f309(0x2d6),'GIT_SUBMODULE_DISCOVERY_FAILED':_0x42f309(0x3a2),'GIT_WORKTREE_DISCOVERY_FAILED':_0x42f309(0x1d0),'GIT_SUBMODULE_LIMIT_EXCEEDED':_0x42f309(0x434)};function publicErrorSubject(_0x28a18c){const _0x10dede=_0x42f309;return _0x28a18c[_0x10dede(0x368)]('_')[_0x10dede(0x21f)](_0x44adb4=>_0x44adb4[_0x10dede(0x27d)]>-0x53*-0x1+0x29*-0xa0+0x194d)[_0x10dede(0x27e)]((_0x44526c,_0x378ae0)=>{const _0x58d042=_0x10dede,_0x29c3f8=ERROR_SUBJECT_WORDS[_0x44526c];if(_0x29c3f8!==undefined)return _0x29c3f8;const _0x1b156f=_0x44526c[_0x58d042(0x2ad)]();return _0x378ae0===0x4d4*-0x8+-0x210c+0x6*0xbf2?''+(_0x1b156f[-0x2591*0x1+0xca5+0x74*0x37]?.[_0x58d042(0x2c8)]()??'')+_0x1b156f[_0x58d042(0x44f)](-0x6*-0xc7+-0x2*-0x68a+-0x1*0x11bd):_0x1b156f;})[_0x10dede(0x322)]('\x20');}export function publicErrorMessage(_0x2eb517){const _0x34ca75=_0x42f309,_0x5e751e=PUBLIC_ERROR_CODE[_0x34ca75(0x46b)](_0x2eb517)?_0x2eb517:_0x34ca75(0x27a),_0x3d900d=FIXED_PUBLIC_ERROR_MESSAGES[_0x5e751e];if(_0x3d900d!==undefined)return _0x3d900d;const _0x57e885=[[_0x34ca75(0x3e7),_0x34ca75(0x2eb)],[_0x34ca75(0x3a3),_0x34ca75(0x275)],[_0x34ca75(0x203),_0x34ca75(0x35b)],[_0x34ca75(0x495),_0x34ca75(0x2d8)],[_0x34ca75(0x2b1),_0x34ca75(0x42a)],[_0x34ca75(0x1fb),_0x34ca75(0x45f)],[_0x34ca75(0x37d),_0x34ca75(0x2f6)],[_0x34ca75(0x465),_0x34ca75(0x1c4)],[_0x34ca75(0x1ff),_0x34ca75(0x312)],[_0x34ca75(0x3bc),_0x34ca75(0x4b9)],[_0x34ca75(0x47b),_0x34ca75(0x2ec)],[_0x34ca75(0x1e3),_0x34ca75(0x356)],[_0x34ca75(0x3ec),_0x34ca75(0x329)],[_0x34ca75(0x3c0),_0x34ca75(0x29c)],[_0x34ca75(0x2bc),_0x34ca75(0x358)],[_0x34ca75(0x233),_0x34ca75(0x3ac)],[_0x34ca75(0x291),_0x34ca75(0x282)],[_0x34ca75(0x229),_0x34ca75(0x251)],[_0x34ca75(0x2e7),_0x34ca75(0x2c7)],[_0x34ca75(0x4c2),_0x34ca75(0x457)],[_0x34ca75(0x280),_0x34ca75(0x4aa)],[_0x34ca75(0x211),_0x34ca75(0x240)],[_0x34ca75(0x268),_0x34ca75(0x240)],[_0x34ca75(0x37b),_0x34ca75(0x48f)],[_0x34ca75(0x3ea),_0x34ca75(0x317)],[_0x34ca75(0x31b),_0x34ca75(0x373)],[_0x34ca75(0x207),_0x34ca75(0x49d)],[_0x34ca75(0x468),_0x34ca75(0x3d1)],[_0x34ca75(0x2ab),_0x34ca75(0x343)],[_0x34ca75(0x2a1),_0x34ca75(0x3cb)],[_0x34ca75(0x3b3),_0x34ca75(0x4c9)],[_0x34ca75(0x1d3),_0x34ca75(0x333)],[_0x34ca75(0x3eb),_0x34ca75(0x4c0)],[_0x34ca75(0x38f),_0x34ca75(0x1e8)],[_0x34ca75(0x3c2),_0x34ca75(0x28a)],[_0x34ca75(0x2ce),_0x34ca75(0x4b4)]];for(const [_0x4f474d,_0x2389ce]of _0x57e885){if(!_0x5e751e[_0x34ca75(0x27f)](_0x4f474d))continue;const _0x5597a8=publicErrorSubject(_0x5e751e[_0x34ca75(0x44f)](0x24cd+0x2*-0xe2c+-0x875*0x1,-_0x4f474d[_0x34ca75(0x27d)]));return _0x5597a8[_0x34ca75(0x27d)]>0x6ad+-0x1d30*-0x1+-0x23dd?_0x5597a8+'\x20'+_0x2389ce:publicErrorSubject(_0x5e751e)+'.';}return publicErrorSubject(_0x5e751e)+'.';}export function safePublicError(_0x2ca0f6,_0x394a62=_0x42f309(0x27a)){const _0x362299=_0x42f309,_0x56d2fe=publicErrorRecord(_0x2ca0f6),_0x128660=_0x2ca0f6 instanceof Error&&PUBLIC_ERROR_CODE[_0x362299(0x46b)](_0x2ca0f6[_0x362299(0x250)])?_0x2ca0f6[_0x362299(0x250)]:typeof _0x56d2fe?.[_0x362299(0x220)]===_0x362299(0x259)&&PUBLIC_ERROR_CODE[_0x362299(0x46b)](_0x56d2fe[_0x362299(0x220)])?_0x56d2fe[_0x362299(0x220)]:PUBLIC_ERROR_CODE[_0x362299(0x46b)](_0x394a62)?_0x394a62:_0x362299(0x27a),_0x240276=publicErrorMessage(_0x128660),_0xb7f9f7=boundedPublicErrorText(_0x56d2fe?.[_0x362299(0x413)]),_0x5c0861=_0xb7f9f7??_0x240276,_0xf6f795=boundedPublicErrorText(_0x56d2fe?.[_0x362299(0x483)])??(_0x2ca0f6 instanceof Error&&_0x2ca0f6[_0x362299(0x250)]!==_0x128660?boundedPublicErrorText(_0x2ca0f6[_0x362299(0x250)]):undefined)??publicErrorCauseDetails(_0x56d2fe?.[_0x362299(0x3df)]),_0x29516f=boundedPublicErrorParameters(_0x56d2fe?.[_0x362299(0x2bd)]??_0x56d2fe?.[_0x362299(0x386)]);return{'code':_0x128660,'message':_0x5c0861,..._0xf6f795===undefined?{}:{'details':_0xf6f795},..._0x29516f===undefined?{}:{'parameters':_0x29516f}};}function publicErrorRecord(_0x3d8abe){const _0xa19bcd=_0x42f309;return _0x3d8abe!==null&&typeof _0x3d8abe===_0xa19bcd(0x1e4)?_0x3d8abe:undefined;}function boundedPublicErrorText(_0x6a4aa5){const _0x481993=_0x42f309;if(typeof _0x6a4aa5!==_0x481993(0x259))return undefined;const _0x59d2ce=_0x6a4aa5[_0x481993(0x27c)]();return _0x59d2ce[_0x481993(0x27d)]===0x1*-0xd27+0x1a95+-0xd6e||_0x59d2ce[_0x481993(0x32c)]('\x00')?undefined:_0x59d2ce[_0x481993(0x44f)](-0x2*0x44d+-0x3*0xaac+0x1*0x289e,0x1*-0x5f7+-0x369+0xd48);}function publicErrorCauseDetails(_0x249901){const _0xdb8857=_0x42f309,_0x22afcd=publicErrorRecord(_0x249901);if(_0x22afcd===undefined)return undefined;return boundedPublicErrorText(_0x22afcd[_0xdb8857(0x483)])??boundedPublicErrorText(_0x22afcd[_0xdb8857(0x250)]);}function boundedPublicErrorParameters(_0x2ede41){const _0x2d7430=_0x42f309;if(_0x2ede41===null||typeof _0x2ede41!==_0x2d7430(0x1e4)||Array[_0x2d7430(0x25e)](_0x2ede41))return undefined;const _0x146a29=Object[_0x2d7430(0x40f)](_0x2ede41)[_0x2d7430(0x21f)](([_0x2f13f3])=>_0x2f13f3[_0x2d7430(0x27c)]()[_0x2d7430(0x27d)]>-0x14b4+-0x269e+0x9e3*0x6&&_0x2f13f3[_0x2d7430(0x27d)]<=0x37*0x59+-0x8ae+-0x9f1&&!_0x2f13f3[_0x2d7430(0x32c)]('\x00'))[_0x2d7430(0x4bb)](([_0x2540ae,_0x22fbff])=>{const _0x16b5b4=_0x2d7430;if(typeof _0x22fbff===_0x16b5b4(0x38d)&&Number[_0x16b5b4(0x398)](_0x22fbff))return[[_0x2540ae,_0x22fbff]];const _0x58724a=boundedPublicErrorText(_0x22fbff);return _0x58724a===undefined?[]:[[_0x2540ae,_0x58724a]];})[_0x2d7430(0x44f)](-0x2*0x3cf+0xf86+-0x7e8,0x240+0x1f62+-0x2182);return _0x146a29[_0x2d7430(0x27d)]===0x26c*-0x8+0x165b+-0x2fb?undefined:Object[_0x2d7430(0x290)](_0x146a29);}export const nodeErrorSchema=z[_0x42f309(0x1e4)]({'code':z[_0x42f309(0x448)]([_0x42f309(0x3a7),_0x42f309(0x1f9),_0x42f309(0x3e0),_0x42f309(0x3b0),_0x42f309(0x2b2),_0x42f309(0x2a6),_0x42f309(0x1f6),_0x42f309(0x4cf),_0x42f309(0x351),_0x42f309(0x1d1),_0x42f309(0x3da),_0x42f309(0x327),_0x42f309(0x348),_0x42f309(0x4ca),_0x42f309(0x354),_0x42f309(0x3f0),_0x42f309(0x2a7),_0x42f309(0x36d),_0x42f309(0x49e),_0x42f309(0x2fd),_0x42f309(0x272),_0x42f309(0x39f),_0x42f309(0x1c1),_0x42f309(0x4ce),_0x42f309(0x1fe),_0x42f309(0x415),_0x42f309(0x441),_0x42f309(0x224),_0x42f309(0x216),_0x42f309(0x321),_0x42f309(0x396),_0x42f309(0x426),_0x42f309(0x442),_0x42f309(0x20e),_0x42f309(0x407),_0x42f309(0x20c),_0x42f309(0x2bb),_0x42f309(0x285),_0x42f309(0x2f0),_0x42f309(0x391),_0x42f309(0x24c),_0x42f309(0x3ba),_0x42f309(0x337),_0x42f309(0x1d4),_0x42f309(0x3d8),_0x42f309(0x496),_0x42f309(0x204),_0x42f309(0x3dc),_0x42f309(0x37a),_0x42f309(0x22f),_0x42f309(0x488),_0x42f309(0x40d),_0x42f309(0x390),_0x42f309(0x304),_0x42f309(0x3aa),_0x42f309(0x4a2),_0x42f309(0x4a9),_0x42f309(0x1f1),_0x42f309(0x435),_0x42f309(0x1e9),_0x42f309(0x2b3),_0x42f309(0x26f),_0x42f309(0x362),_0x42f309(0x217),_0x42f309(0x1c3),_0x42f309(0x477),_0x42f309(0x3a4),_0x42f309(0x27a)])});export function createEnvelope(_0x1db568,_0x75d79e,_0x5cc595={}){const _0x3d236a=_0x42f309;return{'version':NODE_PROTOCOL_VERSION,'id':_0x5cc595['id']??crypto[_0x3d236a(0x1cd)](),'type':_0x1db568,..._0x5cc595[_0x3d236a(0x30f)]===undefined?{}:{'replyTo':_0x5cc595[_0x3d236a(0x30f)]},'payload':_0x75d79e};}
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export * from './enterprise.js';
|
|
3
|
+
export * from './skill.js';
|
|
4
|
+
export * from './mcp.js';
|
|
5
|
+
export * from './git-identity.js';
|
|
6
|
+
export const healthStatusSchema = z.object({
|
|
7
|
+
status: z.literal('ok')
|
|
8
|
+
});
|
|
9
|
+
/** The only wire protocol version understood by this build. */
|
|
10
|
+
export const NODE_PROTOCOL_VERSION = 2;
|
|
11
|
+
export const WORKBENCH_PROTOCOL_VERSION = 1;
|
|
12
|
+
export const nodePlatformSchema = z.enum(['windows', 'linux', 'macos']);
|
|
13
|
+
export const runnerAvailabilitySchema = z.object({
|
|
14
|
+
available: z.boolean(),
|
|
15
|
+
version: z.string().optional()
|
|
16
|
+
});
|
|
17
|
+
const nonnegativeSafeIntegerSchema = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
18
|
+
const positiveSafeIntegerSchema = z.number().int().min(1).max(Number.MAX_SAFE_INTEGER);
|
|
19
|
+
const boundedIdentifierSchema = z.string().trim().min(1).max(128);
|
|
20
|
+
const utf8ByteLength = (value) => new TextEncoder().encode(value).byteLength;
|
|
21
|
+
const runtimeCredentialHttpVersionSchema = z.enum(['1.1', '2']);
|
|
22
|
+
export const marAgentRuntimeCredentialCapabilitySchema = z
|
|
23
|
+
.object({
|
|
24
|
+
apiVersion: z.literal(1),
|
|
25
|
+
websocket: z.boolean(),
|
|
26
|
+
httpVersions: z
|
|
27
|
+
.array(runtimeCredentialHttpVersionSchema)
|
|
28
|
+
.min(1)
|
|
29
|
+
.max(2)
|
|
30
|
+
.superRefine((versions, context) => {
|
|
31
|
+
if (new Set(versions).size !== versions.length)
|
|
32
|
+
context.addIssue({ code: 'custom', message: 'HTTP versions must be unique' });
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
.strict();
|
|
36
|
+
export const conversationHostingCapabilitySchema = z
|
|
37
|
+
.object({
|
|
38
|
+
state: z.enum(['DISABLED', 'UNAVAILABLE', 'AVAILABLE']),
|
|
39
|
+
apiVersion: z.number().int().positive(),
|
|
40
|
+
sandboxBackend: z.literal('BUBBLEWRAP').optional(),
|
|
41
|
+
sandboxPolicyVersion: z.number().int().positive().optional(),
|
|
42
|
+
acceptsNewConversations: z.boolean(),
|
|
43
|
+
supportsExistingConversations: z.boolean(),
|
|
44
|
+
capacity: z.enum(['AVAILABLE', 'HIGH', 'FULL']),
|
|
45
|
+
reasonCode: z
|
|
46
|
+
.string()
|
|
47
|
+
.regex(/^[A-Z][A-Z0-9_]{0,79}$/)
|
|
48
|
+
.optional()
|
|
49
|
+
})
|
|
50
|
+
.strict()
|
|
51
|
+
.superRefine((capability, context) => {
|
|
52
|
+
if (capability.state === 'AVAILABLE') {
|
|
53
|
+
if (capability.sandboxBackend !== 'BUBBLEWRAP' ||
|
|
54
|
+
capability.sandboxPolicyVersion === undefined ||
|
|
55
|
+
!capability.supportsExistingConversations ||
|
|
56
|
+
capability.reasonCode !== undefined)
|
|
57
|
+
context.addIssue({
|
|
58
|
+
code: 'custom',
|
|
59
|
+
message: 'available conversation hosting requires a healthy Bubblewrap backend'
|
|
60
|
+
});
|
|
61
|
+
if (capability.acceptsNewConversations !== (capability.capacity !== 'FULL'))
|
|
62
|
+
context.addIssue({
|
|
63
|
+
code: 'custom',
|
|
64
|
+
path: ['acceptsNewConversations'],
|
|
65
|
+
message: 'conversation hosting creation availability must match capacity'
|
|
66
|
+
});
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (capability.acceptsNewConversations || capability.supportsExistingConversations)
|
|
70
|
+
context.addIssue({
|
|
71
|
+
code: 'custom',
|
|
72
|
+
message: 'disabled or unavailable conversation hosting cannot run conversations'
|
|
73
|
+
});
|
|
74
|
+
if (capability.state === 'UNAVAILABLE' && capability.reasonCode === undefined)
|
|
75
|
+
context.addIssue({
|
|
76
|
+
code: 'custom',
|
|
77
|
+
message: 'unavailable conversation hosting requires a reason'
|
|
78
|
+
});
|
|
79
|
+
if (capability.state === 'DISABLED' &&
|
|
80
|
+
(capability.sandboxBackend !== undefined ||
|
|
81
|
+
capability.sandboxPolicyVersion !== undefined ||
|
|
82
|
+
capability.reasonCode !== undefined))
|
|
83
|
+
context.addIssue({
|
|
84
|
+
code: 'custom',
|
|
85
|
+
message: 'disabled conversation hosting cannot expose sandbox state'
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
export const conversationHostingEnableInputSchema = z
|
|
89
|
+
.object({
|
|
90
|
+
enabled: z.literal(true)
|
|
91
|
+
})
|
|
92
|
+
.strict();
|
|
93
|
+
export const conversationHostingDisableInputSchema = z.object({}).strict();
|
|
94
|
+
export const conversationHostingEnableResultSchema = z
|
|
95
|
+
.object({
|
|
96
|
+
capability: conversationHostingCapabilitySchema
|
|
97
|
+
})
|
|
98
|
+
.strict();
|
|
99
|
+
export const conversationHostingStorageCapacitySchema = z
|
|
100
|
+
.object({
|
|
101
|
+
hostedStorageUsedBytes: nonnegativeSafeIntegerSchema,
|
|
102
|
+
filesystemTotalBytes: positiveSafeIntegerSchema,
|
|
103
|
+
filesystemAvailableBytes: nonnegativeSafeIntegerSchema,
|
|
104
|
+
filesystemUsageBasisPoints: z.number().int().min(0).max(10_000),
|
|
105
|
+
capacity: z.enum(['AVAILABLE', 'HIGH', 'FULL']),
|
|
106
|
+
acceptsNewConversations: z.boolean(),
|
|
107
|
+
automaticCleanupInactiveDays: z.number().int().min(1).max(365),
|
|
108
|
+
measuredAt: nonnegativeSafeIntegerSchema
|
|
109
|
+
})
|
|
110
|
+
.strict()
|
|
111
|
+
.superRefine((storage, context) => {
|
|
112
|
+
if (storage.filesystemAvailableBytes > storage.filesystemTotalBytes)
|
|
113
|
+
context.addIssue({
|
|
114
|
+
code: 'custom',
|
|
115
|
+
path: ['filesystemAvailableBytes'],
|
|
116
|
+
message: 'available filesystem bytes cannot exceed total bytes'
|
|
117
|
+
});
|
|
118
|
+
const expectedUsageBasisPoints = Number((BigInt(storage.filesystemTotalBytes - storage.filesystemAvailableBytes) * 10000n) /
|
|
119
|
+
BigInt(storage.filesystemTotalBytes));
|
|
120
|
+
if (storage.filesystemUsageBasisPoints !== expectedUsageBasisPoints)
|
|
121
|
+
context.addIssue({
|
|
122
|
+
code: 'custom',
|
|
123
|
+
path: ['filesystemUsageBasisPoints'],
|
|
124
|
+
message: 'filesystem usage does not match total and available bytes'
|
|
125
|
+
});
|
|
126
|
+
const expected = storage.filesystemUsageBasisPoints >= 9_500
|
|
127
|
+
? 'FULL'
|
|
128
|
+
: storage.filesystemUsageBasisPoints >= 8_500
|
|
129
|
+
? 'HIGH'
|
|
130
|
+
: 'AVAILABLE';
|
|
131
|
+
if (storage.capacity !== expected)
|
|
132
|
+
context.addIssue({
|
|
133
|
+
code: 'custom',
|
|
134
|
+
path: ['capacity'],
|
|
135
|
+
message: 'conversation hosting capacity does not match filesystem usage'
|
|
136
|
+
});
|
|
137
|
+
if (storage.acceptsNewConversations !== (storage.capacity !== 'FULL'))
|
|
138
|
+
context.addIssue({
|
|
139
|
+
code: 'custom',
|
|
140
|
+
path: ['acceptsNewConversations'],
|
|
141
|
+
message: 'conversation hosting creation availability does not match capacity'
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
export const conversationHostingCleanupPreviewInputSchema = z
|
|
145
|
+
.object({
|
|
146
|
+
inactiveDays: z.number().int().min(1).max(365)
|
|
147
|
+
})
|
|
148
|
+
.strict();
|
|
149
|
+
export const conversationHostingCleanupExecuteInputSchema = conversationHostingCleanupPreviewInputSchema;
|
|
150
|
+
export const conversationHostingCleanupPreviewSchema = z
|
|
151
|
+
.object({
|
|
152
|
+
inactiveDays: z.number().int().min(1).max(365),
|
|
153
|
+
cutoffAt: nonnegativeSafeIntegerSchema,
|
|
154
|
+
candidateConversationCount: nonnegativeSafeIntegerSchema,
|
|
155
|
+
reclaimableBytes: nonnegativeSafeIntegerSchema,
|
|
156
|
+
measuredAt: nonnegativeSafeIntegerSchema
|
|
157
|
+
})
|
|
158
|
+
.strict();
|
|
159
|
+
export const conversationHostingCleanupResultSchema = z
|
|
160
|
+
.object({
|
|
161
|
+
inactiveDays: z.number().int().min(1).max(365),
|
|
162
|
+
cutoffAt: nonnegativeSafeIntegerSchema,
|
|
163
|
+
deletedConversationCount: nonnegativeSafeIntegerSchema,
|
|
164
|
+
releasedBytes: nonnegativeSafeIntegerSchema,
|
|
165
|
+
skippedConversationCount: nonnegativeSafeIntegerSchema,
|
|
166
|
+
completedAt: nonnegativeSafeIntegerSchema
|
|
167
|
+
})
|
|
168
|
+
.strict();
|
|
169
|
+
export const runtimeCommandSchema = z
|
|
170
|
+
.object({
|
|
171
|
+
id: z.enum(['npx', 'git', 'python', 'pip']),
|
|
172
|
+
command: z.string().trim().min(1).max(128),
|
|
173
|
+
available: z.boolean(),
|
|
174
|
+
version: z.string().trim().min(1).max(512).optional(),
|
|
175
|
+
path: z.string().trim().min(1).max(2048).optional()
|
|
176
|
+
})
|
|
177
|
+
.strict();
|
|
178
|
+
export const nodeUpgradeStatusSchema = z.object({
|
|
179
|
+
state: z.enum(['IDLE', 'WAITING_FOR_RUNS', 'READY_TO_RESTART', 'FAILED']),
|
|
180
|
+
targetVersion: z
|
|
181
|
+
.string()
|
|
182
|
+
.regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/u)
|
|
183
|
+
.optional(),
|
|
184
|
+
activeRunCount: z.number().int().nonnegative().optional(),
|
|
185
|
+
errorCode: z.string().trim().min(1).max(80).optional(),
|
|
186
|
+
updatedAt: z.number().int().nonnegative()
|
|
187
|
+
});
|
|
188
|
+
export const nodeMetadataSchema = z
|
|
189
|
+
.object({
|
|
190
|
+
platform: nodePlatformSchema.optional(),
|
|
191
|
+
architecture: z.string().trim().min(1).max(128).optional(),
|
|
192
|
+
nodeAppVersion: z.string().trim().min(1).max(128).optional(),
|
|
193
|
+
nodeVersion: z.string().trim().min(1).max(128).optional(),
|
|
194
|
+
osRelease: z.string().max(256).optional(),
|
|
195
|
+
osVersion: z.string().max(256).optional(),
|
|
196
|
+
codex: runnerAvailabilitySchema.optional(),
|
|
197
|
+
claudeCode: runnerAvailabilitySchema.optional(),
|
|
198
|
+
openCode: runnerAvailabilitySchema.optional(),
|
|
199
|
+
marAgent: runnerAvailabilitySchema.optional(),
|
|
200
|
+
runtimeCommands: z.array(runtimeCommandSchema).max(16).optional(),
|
|
201
|
+
supervisedUpgrade: z.boolean().optional(),
|
|
202
|
+
upgrade: nodeUpgradeStatusSchema.optional()
|
|
203
|
+
})
|
|
204
|
+
.partial()
|
|
205
|
+
.strict()
|
|
206
|
+
.optional();
|
|
207
|
+
export const nodeCapabilitiesSchema = z
|
|
208
|
+
.object({
|
|
209
|
+
platform: nodePlatformSchema,
|
|
210
|
+
architecture: z.string().min(1).max(128),
|
|
211
|
+
nodeAppVersion: z.string().trim().min(1).max(128).optional(),
|
|
212
|
+
nodeVersion: z.string().min(1).max(128),
|
|
213
|
+
metadata: nodeMetadataSchema,
|
|
214
|
+
codex: runnerAvailabilitySchema,
|
|
215
|
+
claudeCode: runnerAvailabilitySchema,
|
|
216
|
+
openCode: runnerAvailabilitySchema.optional(),
|
|
217
|
+
marAgent: runnerAvailabilitySchema.optional(),
|
|
218
|
+
conversationHosting: conversationHostingCapabilitySchema.optional(),
|
|
219
|
+
marAgentRuntimeCredentials: marAgentRuntimeCredentialCapabilitySchema.optional()
|
|
220
|
+
})
|
|
221
|
+
.superRefine((capabilities, context) => {
|
|
222
|
+
if (capabilities.platform !== 'linux' &&
|
|
223
|
+
capabilities.conversationHosting?.state === 'AVAILABLE')
|
|
224
|
+
context.addIssue({
|
|
225
|
+
code: 'custom',
|
|
226
|
+
path: ['conversationHosting'],
|
|
227
|
+
message: 'conversation hosting is Linux-only'
|
|
228
|
+
});
|
|
229
|
+
if (capabilities.conversationHosting?.state === 'AVAILABLE' &&
|
|
230
|
+
capabilities.marAgent?.available !== true)
|
|
231
|
+
context.addIssue({
|
|
232
|
+
code: 'custom',
|
|
233
|
+
path: ['marAgent'],
|
|
234
|
+
message: 'conversation hosting requires MAR Agent'
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
export const workspaceKindSchema = z.enum(['DIRECTORY', 'GIT_WORKSPACE']);
|
|
238
|
+
export const gitSummarySchema = z.object({
|
|
239
|
+
commonDir: z.string(),
|
|
240
|
+
head: z.string(),
|
|
241
|
+
branch: z.string().nullable(),
|
|
242
|
+
dirty: z.boolean(),
|
|
243
|
+
snapshot: z.string()
|
|
244
|
+
});
|
|
245
|
+
/** Runner names are deliberately closed in the first implementation. */
|
|
246
|
+
export const runnerNameSchema = z.enum(['codex', 'claude-code', 'opencode', 'mar-agent']);
|
|
247
|
+
export const workspaceSessionCleanupResultSchema = z
|
|
248
|
+
.object({
|
|
249
|
+
deleted: nonnegativeSafeIntegerSchema,
|
|
250
|
+
skipped: nonnegativeSafeIntegerSchema,
|
|
251
|
+
failed: nonnegativeSafeIntegerSchema,
|
|
252
|
+
deletedByRunner: z
|
|
253
|
+
.object({
|
|
254
|
+
codex: nonnegativeSafeIntegerSchema,
|
|
255
|
+
'claude-code': nonnegativeSafeIntegerSchema,
|
|
256
|
+
opencode: nonnegativeSafeIntegerSchema,
|
|
257
|
+
'mar-agent': nonnegativeSafeIntegerSchema
|
|
258
|
+
})
|
|
259
|
+
.partial()
|
|
260
|
+
.strict()
|
|
261
|
+
})
|
|
262
|
+
.strict()
|
|
263
|
+
.superRefine((result, context) => {
|
|
264
|
+
const runnerDeleted = Object.values(result.deletedByRunner).reduce((total, count) => total + (count ?? 0), 0);
|
|
265
|
+
if (runnerDeleted !== result.deleted)
|
|
266
|
+
context.addIssue({
|
|
267
|
+
code: 'custom',
|
|
268
|
+
path: ['deletedByRunner'],
|
|
269
|
+
message: 'Runner deletion counts must equal the deleted total'
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
/** Account-level quota visibility is intentionally separate from a Runner's execution availability. */
|
|
273
|
+
export const runnerUsageStatusSchema = z.object({
|
|
274
|
+
runner: runnerNameSchema,
|
|
275
|
+
available: z.boolean(),
|
|
276
|
+
reasonCode: z.string().min(1).max(80).nullable()
|
|
277
|
+
});
|
|
278
|
+
export const runnerUsageWindowSchema = z.object({
|
|
279
|
+
id: z.string().min(1).max(80),
|
|
280
|
+
label: z.string().min(1).max(128),
|
|
281
|
+
usedPercentage: z.number().finite().min(0).max(100),
|
|
282
|
+
resetsAt: z.number().int().nonnegative().nullable()
|
|
283
|
+
});
|
|
284
|
+
export const runnerUsageSchema = z.object({
|
|
285
|
+
runner: runnerNameSchema,
|
|
286
|
+
windows: z.array(runnerUsageWindowSchema).min(1).max(8),
|
|
287
|
+
fetchedAt: z.number().int().nonnegative(),
|
|
288
|
+
cached: z.boolean()
|
|
289
|
+
});
|
|
290
|
+
/** What the runner can do in an existing native conversation. */
|
|
291
|
+
export const runnerControlLevelSchema = z.enum(['OBSERVE', 'MESSAGE', 'INTERRUPT']);
|
|
292
|
+
export const runnerCapabilitiesSchema = z.object({
|
|
293
|
+
available: z.boolean(),
|
|
294
|
+
version: z.string().max(128).optional(),
|
|
295
|
+
controlLevel: runnerControlLevelSchema,
|
|
296
|
+
supportsResume: z.boolean(),
|
|
297
|
+
supportsExternalSession: z.boolean()
|
|
298
|
+
});
|
|
299
|
+
/** Fixed runner contracts; implementations are supplied by later runner tasks. */
|
|
300
|
+
export const runnerDefinitionSchema = z.object({
|
|
301
|
+
name: runnerNameSchema,
|
|
302
|
+
capabilities: runnerCapabilitiesSchema
|
|
303
|
+
});
|
|
304
|
+
export const runnerDefinitions = {
|
|
305
|
+
codex: {
|
|
306
|
+
name: 'codex',
|
|
307
|
+
capabilities: {
|
|
308
|
+
available: false,
|
|
309
|
+
controlLevel: 'INTERRUPT',
|
|
310
|
+
supportsResume: true,
|
|
311
|
+
supportsExternalSession: true
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
'claude-code': {
|
|
315
|
+
name: 'claude-code',
|
|
316
|
+
capabilities: {
|
|
317
|
+
available: false,
|
|
318
|
+
controlLevel: 'INTERRUPT',
|
|
319
|
+
supportsResume: true,
|
|
320
|
+
supportsExternalSession: true
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
opencode: {
|
|
324
|
+
name: 'opencode',
|
|
325
|
+
capabilities: {
|
|
326
|
+
available: false,
|
|
327
|
+
controlLevel: 'INTERRUPT',
|
|
328
|
+
supportsResume: true,
|
|
329
|
+
supportsExternalSession: true
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
'mar-agent': {
|
|
333
|
+
name: 'mar-agent',
|
|
334
|
+
capabilities: {
|
|
335
|
+
available: false,
|
|
336
|
+
controlLevel: 'INTERRUPT',
|
|
337
|
+
supportsResume: true,
|
|
338
|
+
supportsExternalSession: false
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
export const marAgentModelProtocolSchema = z.enum(['OPENAI_RESPONSES', 'ANTHROPIC_MESSAGES']);
|
|
343
|
+
export const marAgentInputCapabilitySchema = z.enum(['TEXT', 'IMAGE']);
|
|
344
|
+
export const marAgentOutputCapabilitySchema = z.literal('TEXT');
|
|
345
|
+
export const marAgentReasoningEffortSchema = z.enum([
|
|
346
|
+
'low',
|
|
347
|
+
'medium',
|
|
348
|
+
'high',
|
|
349
|
+
'xhigh',
|
|
350
|
+
'max',
|
|
351
|
+
'ultra'
|
|
352
|
+
]);
|
|
353
|
+
export function resolveMarAgentDefaultReasoningEffort(value, reasoningEfforts) {
|
|
354
|
+
const parsed = marAgentReasoningEffortSchema.safeParse(value);
|
|
355
|
+
if (parsed.success && (reasoningEfforts.length === 0 || reasoningEfforts.includes(parsed.data)))
|
|
356
|
+
return parsed.data;
|
|
357
|
+
if (reasoningEfforts.includes('medium'))
|
|
358
|
+
return 'medium';
|
|
359
|
+
const first = marAgentReasoningEffortSchema.safeParse(reasoningEfforts[0]);
|
|
360
|
+
return first.success ? first.data : 'medium';
|
|
361
|
+
}
|
|
362
|
+
export const marAgentResponsesTransportSchema = z.discriminatedUnion('transport', [
|
|
363
|
+
z.object({ transport: z.literal('WEBSOCKET') }).strict(),
|
|
364
|
+
z
|
|
365
|
+
.object({
|
|
366
|
+
transport: z.literal('HTTP'),
|
|
367
|
+
httpVersion: runtimeCredentialHttpVersionSchema
|
|
368
|
+
})
|
|
369
|
+
.strict()
|
|
370
|
+
]);
|
|
371
|
+
export const runtimeCredentialTicketSchema = z
|
|
372
|
+
.object({
|
|
373
|
+
userId: positiveSafeIntegerSchema,
|
|
374
|
+
credentialId: boundedIdentifierSchema,
|
|
375
|
+
nodeId: boundedIdentifierSchema,
|
|
376
|
+
workspaceId: boundedIdentifierSchema,
|
|
377
|
+
sessionId: boundedIdentifierSchema.optional(),
|
|
378
|
+
runtimeScopeId: boundedIdentifierSchema,
|
|
379
|
+
allowedModelIds: z.array(boundedIdentifierSchema).min(1).max(64),
|
|
380
|
+
purpose: z.enum(['MODEL', 'IMAGE_GENERATION']).optional(),
|
|
381
|
+
issuedAt: nonnegativeSafeIntegerSchema,
|
|
382
|
+
expiresAt: positiveSafeIntegerSchema,
|
|
383
|
+
nonce: z.string().min(1).max(128),
|
|
384
|
+
signature: z.string().regex(/^[a-f0-9]{64}$/u)
|
|
385
|
+
})
|
|
386
|
+
.strict()
|
|
387
|
+
.superRefine((ticket, context) => {
|
|
388
|
+
if (new Set(ticket.allowedModelIds).size !== ticket.allowedModelIds.length)
|
|
389
|
+
context.addIssue({
|
|
390
|
+
code: 'custom',
|
|
391
|
+
path: ['allowedModelIds'],
|
|
392
|
+
message: 'allowed model IDs must be unique'
|
|
393
|
+
});
|
|
394
|
+
if (ticket.expiresAt <= ticket.issuedAt ||
|
|
395
|
+
ticket.expiresAt - ticket.issuedAt > 24 * 60 * 60 * 1000)
|
|
396
|
+
context.addIssue({
|
|
397
|
+
code: 'custom',
|
|
398
|
+
path: ['expiresAt'],
|
|
399
|
+
message: 'runtime credential ticket lifetime is invalid'
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
export const runtimeCredentialResolveRequestSchema = z
|
|
403
|
+
.object({
|
|
404
|
+
ticket: runtimeCredentialTicketSchema,
|
|
405
|
+
modelId: boundedIdentifierSchema,
|
|
406
|
+
runtimeScopeId: boundedIdentifierSchema,
|
|
407
|
+
executionId: boundedIdentifierSchema,
|
|
408
|
+
reason: z.enum(['REQUEST', 'UNAUTHORIZED', 'RECONNECT'])
|
|
409
|
+
})
|
|
410
|
+
.strict()
|
|
411
|
+
.superRefine((request, context) => {
|
|
412
|
+
if (request.runtimeScopeId !== request.ticket.runtimeScopeId)
|
|
413
|
+
context.addIssue({
|
|
414
|
+
code: 'custom',
|
|
415
|
+
path: ['runtimeScopeId'],
|
|
416
|
+
message: 'runtime scope must match the credential ticket'
|
|
417
|
+
});
|
|
418
|
+
if (!request.ticket.allowedModelIds.includes(request.modelId))
|
|
419
|
+
context.addIssue({
|
|
420
|
+
code: 'custom',
|
|
421
|
+
path: ['modelId'],
|
|
422
|
+
message: 'model is not allowed by the credential ticket'
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
const runtimeCredentialHeadersSchema = z
|
|
426
|
+
.record(z
|
|
427
|
+
.string()
|
|
428
|
+
.min(1)
|
|
429
|
+
.max(128)
|
|
430
|
+
.regex(/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/u), z.string().max(16_384))
|
|
431
|
+
.superRefine((headers, context) => {
|
|
432
|
+
const entries = Object.entries(headers);
|
|
433
|
+
if (entries.length > 32)
|
|
434
|
+
context.addIssue({ code: 'custom', message: 'too many runtime credential headers' });
|
|
435
|
+
const serializedSize = entries.reduce((size, [name, value]) => size + utf8ByteLength(name) + utf8ByteLength(value), 0);
|
|
436
|
+
if (serializedSize > 65_536)
|
|
437
|
+
context.addIssue({ code: 'custom', message: 'runtime credential headers are too large' });
|
|
438
|
+
});
|
|
439
|
+
export const resolvedRuntimeCredentialSchema = z
|
|
440
|
+
.object({
|
|
441
|
+
bearer: z.string().min(1).max(65_536),
|
|
442
|
+
headers: runtimeCredentialHeadersSchema,
|
|
443
|
+
socks5Url: z
|
|
444
|
+
.string()
|
|
445
|
+
.url()
|
|
446
|
+
.max(2048)
|
|
447
|
+
.refine((value) => new URL(value).protocol === 'socks5:', 'SOCKS5 URL is required')
|
|
448
|
+
.optional(),
|
|
449
|
+
expiresAt: positiveSafeIntegerSchema,
|
|
450
|
+
revision: positiveSafeIntegerSchema
|
|
451
|
+
})
|
|
452
|
+
.strict();
|
|
453
|
+
const runtimeCredentialResolveErrorSchema = z
|
|
454
|
+
.object({
|
|
455
|
+
code: z.string().regex(/^[A-Z][A-Z0-9_]{0,79}$/u),
|
|
456
|
+
message: z.string().min(1).max(512),
|
|
457
|
+
recoverable: z.boolean(),
|
|
458
|
+
retryAfterMs: positiveSafeIntegerSchema.optional()
|
|
459
|
+
})
|
|
460
|
+
.strict();
|
|
461
|
+
export const runtimeCredentialResolveResponseSchema = z.union([
|
|
462
|
+
z
|
|
463
|
+
.object({
|
|
464
|
+
credential: resolvedRuntimeCredentialSchema,
|
|
465
|
+
nextTicket: runtimeCredentialTicketSchema
|
|
466
|
+
})
|
|
467
|
+
.strict(),
|
|
468
|
+
z.object({ error: runtimeCredentialResolveErrorSchema }).strict()
|
|
469
|
+
]);
|
|
470
|
+
const marAgentInlineApiKeyCredentialSchema = z
|
|
471
|
+
.object({
|
|
472
|
+
type: z.literal('INLINE_API_KEY'),
|
|
473
|
+
value: z.string().min(1).max(16_384)
|
|
474
|
+
})
|
|
475
|
+
.strict();
|
|
476
|
+
export const marAgentModelCredentialSchema = z.discriminatedUnion('type', [
|
|
477
|
+
marAgentInlineApiKeyCredentialSchema,
|
|
478
|
+
z
|
|
479
|
+
.object({
|
|
480
|
+
type: z.literal('CREDENTIAL_REF'),
|
|
481
|
+
credentialId: boundedIdentifierSchema
|
|
482
|
+
})
|
|
483
|
+
.strict()
|
|
484
|
+
]);
|
|
485
|
+
const marAgentRuntimeCredentialSchema = z.union([
|
|
486
|
+
marAgentInlineApiKeyCredentialSchema,
|
|
487
|
+
z
|
|
488
|
+
.object({
|
|
489
|
+
type: z.literal('RUNTIME_TICKET'),
|
|
490
|
+
credentialId: boundedIdentifierSchema,
|
|
491
|
+
ticket: runtimeCredentialTicketSchema
|
|
492
|
+
})
|
|
493
|
+
.strict()
|
|
494
|
+
.superRefine((credential, context) => {
|
|
495
|
+
if (credential.credentialId !== credential.ticket.credentialId)
|
|
496
|
+
context.addIssue({
|
|
497
|
+
code: 'custom',
|
|
498
|
+
path: ['credentialId'],
|
|
499
|
+
message: 'credential ID must match the runtime ticket'
|
|
500
|
+
});
|
|
501
|
+
})
|
|
502
|
+
]);
|
|
503
|
+
const marAgentImageGenerationSchema = z
|
|
504
|
+
.object({
|
|
505
|
+
provider: z.string().trim().min(1).max(64).optional(),
|
|
506
|
+
config: z.record(z.string().min(1).max(128), z.string().max(2048)).optional(),
|
|
507
|
+
generateEndpoint: z.string().url().max(2048),
|
|
508
|
+
editEndpoint: z.string().url().max(2048),
|
|
509
|
+
imageModelId: z.string().trim().min(1).max(256),
|
|
510
|
+
httpVersion: z.enum(['1.1', '2']),
|
|
511
|
+
credential: marAgentRuntimeCredentialSchema.optional()
|
|
512
|
+
})
|
|
513
|
+
.strict();
|
|
514
|
+
export const imageGenerationUrlSchema = z
|
|
515
|
+
.string()
|
|
516
|
+
.trim()
|
|
517
|
+
.url()
|
|
518
|
+
.max(2048)
|
|
519
|
+
.refine((value) => {
|
|
520
|
+
let url;
|
|
521
|
+
try {
|
|
522
|
+
url = new URL(value);
|
|
523
|
+
}
|
|
524
|
+
catch {
|
|
525
|
+
return false;
|
|
526
|
+
}
|
|
527
|
+
return (!url.username &&
|
|
528
|
+
!url.password &&
|
|
529
|
+
!url.search &&
|
|
530
|
+
!url.hash &&
|
|
531
|
+
(url.protocol === 'https:' ||
|
|
532
|
+
(url.protocol === 'http:' && ['localhost', '127.0.0.1', '::1'].includes(url.hostname))));
|
|
533
|
+
});
|
|
534
|
+
export const imageGenerationConfigurationSchema = z.discriminatedUnion('provider', [
|
|
535
|
+
z
|
|
536
|
+
.object({
|
|
537
|
+
provider: z.literal('CODEX'),
|
|
538
|
+
config: z
|
|
539
|
+
.object({
|
|
540
|
+
credentialId: boundedIdentifierSchema,
|
|
541
|
+
modelId: z.string().trim().min(1).max(256)
|
|
542
|
+
})
|
|
543
|
+
.strict()
|
|
544
|
+
})
|
|
545
|
+
.strict(),
|
|
546
|
+
z
|
|
547
|
+
.object({
|
|
548
|
+
provider: z.literal('BYTED_ARK'),
|
|
549
|
+
config: z
|
|
550
|
+
.object({
|
|
551
|
+
url: imageGenerationUrlSchema.optional(),
|
|
552
|
+
modelId: z.string().trim().min(1).max(256),
|
|
553
|
+
apiKey: z.string().trim().min(1).max(16384).optional(),
|
|
554
|
+
hasApiKey: z.boolean().optional()
|
|
555
|
+
})
|
|
556
|
+
.strict()
|
|
557
|
+
})
|
|
558
|
+
.strict()
|
|
559
|
+
]);
|
|
560
|
+
const imageGenerationModelFields = {
|
|
561
|
+
id: boundedIdentifierSchema,
|
|
562
|
+
name: z.string().trim().min(1).max(128),
|
|
563
|
+
enabled: z.boolean()
|
|
564
|
+
};
|
|
565
|
+
export const imageGenerationModelSchema = z.discriminatedUnion('provider', [
|
|
566
|
+
imageGenerationConfigurationSchema.options[0].extend(imageGenerationModelFields),
|
|
567
|
+
imageGenerationConfigurationSchema.options[1].extend(imageGenerationModelFields)
|
|
568
|
+
]);
|
|
569
|
+
export const imageGenerationCatalogSchema = z
|
|
570
|
+
.array(imageGenerationModelSchema)
|
|
571
|
+
.max(100)
|
|
572
|
+
.superRefine((models, context) => {
|
|
573
|
+
if (new Set(models.map((model) => model.id)).size !== models.length)
|
|
574
|
+
context.addIssue({ code: 'custom', message: 'Image model IDs must be unique.' });
|
|
575
|
+
});
|
|
576
|
+
const marAgentModelShape = {
|
|
577
|
+
id: z.string().min(1).max(128),
|
|
578
|
+
name: z.string().trim().min(1).max(128),
|
|
579
|
+
protocol: marAgentModelProtocolSchema,
|
|
580
|
+
modelId: z.string().trim().min(1).max(256),
|
|
581
|
+
contextWindowTokens: z.number().int().positive(),
|
|
582
|
+
maxOutputTokens: z.number().int().positive(),
|
|
583
|
+
inputCapabilities: z.array(marAgentInputCapabilitySchema).min(1).max(2),
|
|
584
|
+
outputCapabilities: z.tuple([marAgentOutputCapabilitySchema]),
|
|
585
|
+
reasoningEfforts: z.array(marAgentReasoningEffortSchema).max(6),
|
|
586
|
+
defaultReasoningEffort: marAgentReasoningEffortSchema.optional(),
|
|
587
|
+
titleGeneration: z.boolean().default(false),
|
|
588
|
+
codeMode: z.boolean().default(false),
|
|
589
|
+
hostedWebSearch: z.boolean(),
|
|
590
|
+
responsesTransport: marAgentResponsesTransportSchema.optional(),
|
|
591
|
+
responsesEncoding: z.enum(['STANDARD', 'LITE']).optional(),
|
|
592
|
+
responsesPreviousResponseId: z.boolean().default(false),
|
|
593
|
+
enabled: z.boolean()
|
|
594
|
+
};
|
|
595
|
+
function refineMarAgentModel(schema) {
|
|
596
|
+
return schema.superRefine((value, context) => {
|
|
597
|
+
if (!value.inputCapabilities.includes('TEXT'))
|
|
598
|
+
context.addIssue({ code: 'custom', message: 'TEXT input is required' });
|
|
599
|
+
if (value.maxOutputTokens >= value.contextWindowTokens)
|
|
600
|
+
context.addIssue({ code: 'custom', message: 'output must be smaller than context' });
|
|
601
|
+
if (new Set(value.reasoningEfforts).size !== value.reasoningEfforts.length)
|
|
602
|
+
context.addIssue({ code: 'custom', message: 'reasoning efforts must be unique' });
|
|
603
|
+
if (value.defaultReasoningEffort !== undefined &&
|
|
604
|
+
value.reasoningEfforts.length > 0 &&
|
|
605
|
+
!value.reasoningEfforts.includes(value.defaultReasoningEffort))
|
|
606
|
+
context.addIssue({
|
|
607
|
+
code: 'custom',
|
|
608
|
+
path: ['defaultReasoningEffort'],
|
|
609
|
+
message: 'default reasoning effort must be exposed when choices are configured'
|
|
610
|
+
});
|
|
611
|
+
if (value.protocol === 'ANTHROPIC_MESSAGES' && value.hostedWebSearch)
|
|
612
|
+
context.addIssue({
|
|
613
|
+
code: 'custom',
|
|
614
|
+
message: 'Anthropic compatibility hosted web unsupported'
|
|
615
|
+
});
|
|
616
|
+
if (value.protocol !== 'OPENAI_RESPONSES' && value.responsesTransport !== undefined)
|
|
617
|
+
context.addIssue({
|
|
618
|
+
code: 'custom',
|
|
619
|
+
message: 'Responses transport requires OpenAI Responses'
|
|
620
|
+
});
|
|
621
|
+
if (value.protocol !== 'OPENAI_RESPONSES' && value.responsesPreviousResponseId)
|
|
622
|
+
context.addIssue({ code: 'custom', message: 'Responses continuation requires Responses' });
|
|
623
|
+
if (value.protocol !== 'OPENAI_RESPONSES' && value.responsesEncoding !== undefined)
|
|
624
|
+
context.addIssue({ code: 'custom', message: 'Responses encoding requires OpenAI Responses' });
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
const marAgentModelSummaryShape = {
|
|
628
|
+
...marAgentModelShape,
|
|
629
|
+
baseUrl: z.string().url().max(2048),
|
|
630
|
+
sortOrder: z.number().int(),
|
|
631
|
+
apiKeyConfigured: z.boolean().optional(),
|
|
632
|
+
credentialType: z.enum(['INLINE_API_KEY', 'CREDENTIAL_REF']).optional(),
|
|
633
|
+
credentialConfigured: z.boolean().optional(),
|
|
634
|
+
lastTestedAt: z.number().int().nonnegative().nullable().optional(),
|
|
635
|
+
lastTestStatus: z.enum(['UNVERIFIED', 'SUCCEEDED', 'FAILED']).nullable().optional(),
|
|
636
|
+
lastTestCode: z.string().max(80).nullable().optional()
|
|
637
|
+
};
|
|
638
|
+
export const marAgentNodeModelSummarySchema = refineMarAgentModel(z.object(marAgentModelSummaryShape).strict());
|
|
639
|
+
export const marAgentModelSummarySchema = refineMarAgentModel(z
|
|
640
|
+
.object({
|
|
641
|
+
...marAgentModelSummaryShape,
|
|
642
|
+
access: z.enum(['PUBLIC', 'RESTRICTED'])
|
|
643
|
+
})
|
|
644
|
+
.strict());
|
|
645
|
+
export const marAgentRuntimeModelConfigurationSchema = refineMarAgentModel(z
|
|
646
|
+
.object({
|
|
647
|
+
...marAgentModelShape,
|
|
648
|
+
baseUrl: z.string().url().max(2048),
|
|
649
|
+
apiKey: z.string().min(1).max(16_384).optional(),
|
|
650
|
+
credential: marAgentRuntimeCredentialSchema.optional(),
|
|
651
|
+
imageGeneration: marAgentImageGenerationSchema.optional()
|
|
652
|
+
})
|
|
653
|
+
.strict()).superRefine((configuration, context) => {
|
|
654
|
+
if ((configuration.apiKey === undefined) === (configuration.credential === undefined))
|
|
655
|
+
context.addIssue({
|
|
656
|
+
code: 'custom',
|
|
657
|
+
message: 'exactly one runtime model credential is required'
|
|
658
|
+
});
|
|
659
|
+
if (configuration.imageGeneration !== undefined &&
|
|
660
|
+
configuration.imageGeneration.credential !== undefined &&
|
|
661
|
+
(configuration.imageGeneration.provider === 'BYTED_ARK'
|
|
662
|
+
? configuration.imageGeneration.credential.type !== 'INLINE_API_KEY'
|
|
663
|
+
: configuration.imageGeneration.credential.type !== 'RUNTIME_TICKET' ||
|
|
664
|
+
configuration.imageGeneration.credential.ticket.purpose !== 'IMAGE_GENERATION'))
|
|
665
|
+
context.addIssue({
|
|
666
|
+
code: 'custom',
|
|
667
|
+
path: ['imageGeneration'],
|
|
668
|
+
message: 'image generation requires an image-generation runtime ticket'
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
export const marAgentModelTransportTestInputSchema = z
|
|
672
|
+
.object({
|
|
673
|
+
runtimeScopeId: boundedIdentifierSchema,
|
|
674
|
+
executionId: boundedIdentifierSchema,
|
|
675
|
+
model: marAgentRuntimeModelConfigurationSchema
|
|
676
|
+
})
|
|
677
|
+
.strict();
|
|
678
|
+
export const marAgentModelTransportTestResultSchema = z.discriminatedUnion('success', [
|
|
679
|
+
z
|
|
680
|
+
.object({
|
|
681
|
+
success: z.literal(true),
|
|
682
|
+
code: z.null(),
|
|
683
|
+
message: z.null(),
|
|
684
|
+
httpStatus: z.null()
|
|
685
|
+
})
|
|
686
|
+
.strict(),
|
|
687
|
+
z
|
|
688
|
+
.object({
|
|
689
|
+
success: z.literal(false),
|
|
690
|
+
code: z.string().trim().min(1).max(80),
|
|
691
|
+
message: z.string().trim().min(1).max(1_000),
|
|
692
|
+
httpStatus: z.number().int().min(100).max(599).nullable()
|
|
693
|
+
})
|
|
694
|
+
.strict()
|
|
695
|
+
]);
|
|
696
|
+
export const marAgentStoredModelConfigurationSchema = refineMarAgentModel(z
|
|
697
|
+
.object({
|
|
698
|
+
...marAgentModelShape,
|
|
699
|
+
baseUrl: z.string().url().max(2048),
|
|
700
|
+
credential: marAgentModelCredentialSchema
|
|
701
|
+
})
|
|
702
|
+
.strict());
|
|
703
|
+
const codexCredentialProxySummarySchema = z.discriminatedUnion('configured', [
|
|
704
|
+
z.object({ configured: z.literal(false) }).strict(),
|
|
705
|
+
z
|
|
706
|
+
.object({
|
|
707
|
+
configured: z.literal(true),
|
|
708
|
+
host: z.string().trim().min(1).max(253),
|
|
709
|
+
port: z.number().int().min(1).max(65_535),
|
|
710
|
+
hasUsername: z.boolean()
|
|
711
|
+
})
|
|
712
|
+
.strict()
|
|
713
|
+
]);
|
|
714
|
+
export const codexCredentialOwnershipSchema = z.discriminatedUnion('ownerType', [
|
|
715
|
+
z.object({ ownerType: z.literal('PERSONAL'), ownerUserId: positiveSafeIntegerSchema }).strict(),
|
|
716
|
+
z
|
|
717
|
+
.object({
|
|
718
|
+
ownerType: z.literal('ORGANIZATION'),
|
|
719
|
+
ownerOrganizationId: positiveSafeIntegerSchema
|
|
720
|
+
})
|
|
721
|
+
.strict(),
|
|
722
|
+
z.object({ ownerType: z.literal('ENTERPRISE') }).strict()
|
|
723
|
+
]);
|
|
724
|
+
export const codexCredentialSummarySchema = z
|
|
725
|
+
.object({
|
|
726
|
+
id: boundedIdentifierSchema,
|
|
727
|
+
name: z.string().trim().min(1).max(128),
|
|
728
|
+
type: z.literal('CODEX_OAUTH'),
|
|
729
|
+
ownership: codexCredentialOwnershipSchema,
|
|
730
|
+
status: z.enum(['ACTIVE', 'DEGRADED', 'REAUTH_REQUIRED']),
|
|
731
|
+
accessTokenExpiresAt: nonnegativeSafeIntegerSchema.nullable(),
|
|
732
|
+
lastRefreshAt: nonnegativeSafeIntegerSchema.nullable(),
|
|
733
|
+
lastCheckedAt: nonnegativeSafeIntegerSchema.nullable(),
|
|
734
|
+
accountId: z.string().trim().min(1).max(512),
|
|
735
|
+
proxy: codexCredentialProxySummarySchema,
|
|
736
|
+
revision: positiveSafeIntegerSchema
|
|
737
|
+
})
|
|
738
|
+
.strict();
|
|
739
|
+
export const codexCredentialDetailsSchema = z
|
|
740
|
+
.object({
|
|
741
|
+
credential: codexCredentialSummarySchema,
|
|
742
|
+
socks5Url: z.string().url().max(2048).nullable()
|
|
743
|
+
})
|
|
744
|
+
.strict()
|
|
745
|
+
.superRefine((details, context) => {
|
|
746
|
+
if (details.socks5Url === null) {
|
|
747
|
+
if (details.credential.proxy.configured)
|
|
748
|
+
context.addIssue({
|
|
749
|
+
code: 'custom',
|
|
750
|
+
path: ['socks5Url'],
|
|
751
|
+
message: 'configured proxy requires a SOCKS5 URL'
|
|
752
|
+
});
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
let url;
|
|
756
|
+
try {
|
|
757
|
+
url = new URL(details.socks5Url);
|
|
758
|
+
}
|
|
759
|
+
catch {
|
|
760
|
+
context.addIssue({
|
|
761
|
+
code: 'custom',
|
|
762
|
+
path: ['socks5Url'],
|
|
763
|
+
message: 'valid SOCKS5 proxy URL is required'
|
|
764
|
+
});
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
if (url.protocol !== 'socks5:') {
|
|
768
|
+
context.addIssue({
|
|
769
|
+
code: 'custom',
|
|
770
|
+
path: ['socks5Url'],
|
|
771
|
+
message: 'SOCKS5 proxy is required'
|
|
772
|
+
});
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
const proxy = details.credential.proxy;
|
|
776
|
+
if (!proxy.configured ||
|
|
777
|
+
proxy.host !== url.hostname ||
|
|
778
|
+
proxy.port !== Number(url.port || 1080) ||
|
|
779
|
+
proxy.hasUsername !== url.username.length > 0)
|
|
780
|
+
context.addIssue({
|
|
781
|
+
code: 'custom',
|
|
782
|
+
path: ['credential', 'proxy'],
|
|
783
|
+
message: 'proxy summary must match the SOCKS5 URL'
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
export const codexLoginAttemptSchema = z
|
|
787
|
+
.object({
|
|
788
|
+
id: boundedIdentifierSchema,
|
|
789
|
+
status: z.enum(['PENDING', 'SUCCEEDED', 'FAILED', 'CANCELLED', 'EXPIRED']),
|
|
790
|
+
userCode: z.string().trim().min(1).max(128).optional(),
|
|
791
|
+
verificationUri: z.string().url().max(2048).optional(),
|
|
792
|
+
expiresAt: nonnegativeSafeIntegerSchema.optional(),
|
|
793
|
+
pollIntervalMs: positiveSafeIntegerSchema.max(60_000).optional(),
|
|
794
|
+
credentialId: boundedIdentifierSchema.optional(),
|
|
795
|
+
code: z
|
|
796
|
+
.string()
|
|
797
|
+
.regex(/^[A-Z][A-Z0-9_]{0,79}$/u)
|
|
798
|
+
.optional(),
|
|
799
|
+
message: z.string().min(1).max(512).optional()
|
|
800
|
+
})
|
|
801
|
+
.strict()
|
|
802
|
+
.superRefine((attempt, context) => {
|
|
803
|
+
if (attempt.status === 'PENDING' &&
|
|
804
|
+
(attempt.userCode === undefined ||
|
|
805
|
+
attempt.verificationUri === undefined ||
|
|
806
|
+
attempt.expiresAt === undefined ||
|
|
807
|
+
attempt.pollIntervalMs === undefined))
|
|
808
|
+
context.addIssue({ code: 'custom', message: 'pending login attempt is incomplete' });
|
|
809
|
+
if (attempt.status === 'SUCCEEDED' && attempt.credentialId === undefined)
|
|
810
|
+
context.addIssue({ code: 'custom', message: 'successful login attempt needs a credential' });
|
|
811
|
+
if (attempt.status !== 'SUCCEEDED' && attempt.credentialId !== undefined)
|
|
812
|
+
context.addIssue({
|
|
813
|
+
code: 'custom',
|
|
814
|
+
path: ['credentialId'],
|
|
815
|
+
message: 'only a successful login attempt may expose a credential'
|
|
816
|
+
});
|
|
817
|
+
});
|
|
818
|
+
const codexModelCandidateSchema = z
|
|
819
|
+
.object({
|
|
820
|
+
upstreamModelId: z.string().trim().min(1).max(256),
|
|
821
|
+
displayName: z.string().trim().min(1).max(256),
|
|
822
|
+
description: z.string().max(4096).optional(),
|
|
823
|
+
contextWindowTokens: positiveSafeIntegerSchema.optional(),
|
|
824
|
+
maxOutputTokens: positiveSafeIntegerSchema.optional(),
|
|
825
|
+
reasoningEfforts: z.array(marAgentReasoningEffortSchema).max(6),
|
|
826
|
+
defaultReasoningEffort: marAgentReasoningEffortSchema.optional(),
|
|
827
|
+
unsupportedReasoningEfforts: z.array(z.string().trim().min(1).max(128)).max(16),
|
|
828
|
+
inputCapabilities: z.array(marAgentInputCapabilitySchema).min(1).max(2),
|
|
829
|
+
hostedWebSearch: z.boolean(),
|
|
830
|
+
warnings: z.array(z.string().trim().min(1).max(512)).max(32),
|
|
831
|
+
requiredInputs: z.array(z.literal('contextWindowTokens')).max(1)
|
|
832
|
+
})
|
|
833
|
+
.strict()
|
|
834
|
+
.superRefine((model, context) => {
|
|
835
|
+
if (new Set(model.reasoningEfforts).size !== model.reasoningEfforts.length)
|
|
836
|
+
context.addIssue({ code: 'custom', message: 'reasoning efforts must be unique' });
|
|
837
|
+
if (model.defaultReasoningEffort !== undefined &&
|
|
838
|
+
model.reasoningEfforts.length > 0 &&
|
|
839
|
+
!model.reasoningEfforts.includes(model.defaultReasoningEffort))
|
|
840
|
+
context.addIssue({
|
|
841
|
+
code: 'custom',
|
|
842
|
+
path: ['defaultReasoningEffort'],
|
|
843
|
+
message: 'default reasoning effort must be exposed when choices are configured'
|
|
844
|
+
});
|
|
845
|
+
if (new Set(model.unsupportedReasoningEfforts).size !== model.unsupportedReasoningEfforts.length)
|
|
846
|
+
context.addIssue({ code: 'custom', message: 'unsupported reasoning efforts must be unique' });
|
|
847
|
+
if (new Set(model.inputCapabilities).size !== model.inputCapabilities.length)
|
|
848
|
+
context.addIssue({ code: 'custom', message: 'input capabilities must be unique' });
|
|
849
|
+
if (new Set(model.requiredInputs).size !== model.requiredInputs.length)
|
|
850
|
+
context.addIssue({ code: 'custom', message: 'required inputs must be unique' });
|
|
851
|
+
if (model.contextWindowTokens !== undefined &&
|
|
852
|
+
model.maxOutputTokens !== undefined &&
|
|
853
|
+
model.maxOutputTokens >= model.contextWindowTokens)
|
|
854
|
+
context.addIssue({ code: 'custom', message: 'output must be smaller than context' });
|
|
855
|
+
if (model.requiredInputs.includes('contextWindowTokens') !==
|
|
856
|
+
(model.contextWindowTokens === undefined))
|
|
857
|
+
context.addIssue({
|
|
858
|
+
code: 'custom',
|
|
859
|
+
path: ['requiredInputs'],
|
|
860
|
+
message: 'context window requirement does not match the catalog value'
|
|
861
|
+
});
|
|
862
|
+
});
|
|
863
|
+
export const codexModelCatalogSchema = z
|
|
864
|
+
.object({
|
|
865
|
+
catalogHash: z.string().regex(/^[a-f0-9]{64}$/u),
|
|
866
|
+
fetchedAt: nonnegativeSafeIntegerSchema,
|
|
867
|
+
models: z.array(codexModelCandidateSchema).max(256)
|
|
868
|
+
})
|
|
869
|
+
.strict()
|
|
870
|
+
.superRefine((catalog, context) => {
|
|
871
|
+
const ids = catalog.models.map((model) => model.upstreamModelId);
|
|
872
|
+
if (new Set(ids).size !== ids.length)
|
|
873
|
+
context.addIssue({ code: 'custom', path: ['models'], message: 'model IDs must be unique' });
|
|
874
|
+
});
|
|
875
|
+
const codexModelImportItemSchema = z
|
|
876
|
+
.object({
|
|
877
|
+
upstreamModelId: z.string().trim().min(1).max(256),
|
|
878
|
+
name: z.string().trim().min(1).max(128).optional(),
|
|
879
|
+
contextWindowTokens: positiveSafeIntegerSchema.optional(),
|
|
880
|
+
enabled: z.boolean()
|
|
881
|
+
})
|
|
882
|
+
.strict();
|
|
883
|
+
export const codexModelImportRequestSchema = z
|
|
884
|
+
.object({
|
|
885
|
+
catalogHash: z.string().regex(/^[a-f0-9]{64}$/u),
|
|
886
|
+
models: z.array(codexModelImportItemSchema).min(1).max(64)
|
|
887
|
+
})
|
|
888
|
+
.strict()
|
|
889
|
+
.superRefine((request, context) => {
|
|
890
|
+
const ids = request.models.map((model) => model.upstreamModelId);
|
|
891
|
+
if (new Set(ids).size !== ids.length)
|
|
892
|
+
context.addIssue({ code: 'custom', path: ['models'], message: 'model IDs must be unique' });
|
|
893
|
+
});
|
|
894
|
+
const codexModelImportResultItemSchema = z
|
|
895
|
+
.object({
|
|
896
|
+
upstreamModelId: z.string().trim().min(1).max(256),
|
|
897
|
+
status: z.enum(['CREATED', 'UPDATED', 'UNCHANGED', 'BLOCKED']),
|
|
898
|
+
modelId: boundedIdentifierSchema.optional(),
|
|
899
|
+
code: z
|
|
900
|
+
.string()
|
|
901
|
+
.regex(/^[A-Z][A-Z0-9_]{0,79}$/u)
|
|
902
|
+
.optional()
|
|
903
|
+
})
|
|
904
|
+
.strict()
|
|
905
|
+
.superRefine((item, context) => {
|
|
906
|
+
if (item.status === 'BLOCKED') {
|
|
907
|
+
if (item.modelId !== undefined)
|
|
908
|
+
context.addIssue({ code: 'custom', path: ['modelId'], message: 'blocked model has no ID' });
|
|
909
|
+
if (item.code === undefined)
|
|
910
|
+
context.addIssue({ code: 'custom', path: ['code'], message: 'blocked model needs a code' });
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
if (item.modelId === undefined)
|
|
914
|
+
context.addIssue({
|
|
915
|
+
code: 'custom',
|
|
916
|
+
path: ['modelId'],
|
|
917
|
+
message: 'imported model needs an ID'
|
|
918
|
+
});
|
|
919
|
+
if (item.code !== undefined)
|
|
920
|
+
context.addIssue({ code: 'custom', path: ['code'], message: 'imported model has no error' });
|
|
921
|
+
});
|
|
922
|
+
export const codexModelImportResultSchema = z
|
|
923
|
+
.object({
|
|
924
|
+
items: z.array(codexModelImportResultItemSchema).min(1).max(64)
|
|
925
|
+
})
|
|
926
|
+
.strict();
|
|
927
|
+
export const agentRunStatusSchema = z.enum([
|
|
928
|
+
'STARTING',
|
|
929
|
+
'RUNNING',
|
|
930
|
+
'CANCELLING',
|
|
931
|
+
'SUCCEEDED',
|
|
932
|
+
'FAILED',
|
|
933
|
+
'CANCELLED',
|
|
934
|
+
'INTERRUPTED'
|
|
935
|
+
]);
|
|
936
|
+
export const recentRunSchema = z.object({
|
|
937
|
+
runId: z.string().min(1).max(128),
|
|
938
|
+
nodeId: z.string().min(1).max(128),
|
|
939
|
+
workspaceId: z.string().min(1).max(128),
|
|
940
|
+
workspaceName: z.string().max(128).optional(),
|
|
941
|
+
sessionId: z.string().min(1).max(128),
|
|
942
|
+
sessionTitle: z.string().min(1).max(160),
|
|
943
|
+
userMessage: z.string().max(500).optional(),
|
|
944
|
+
runner: runnerNameSchema,
|
|
945
|
+
status: agentRunStatusSchema,
|
|
946
|
+
createdAt: z.number().int().nonnegative(),
|
|
947
|
+
startedAt: z.number().int().nonnegative(),
|
|
948
|
+
completedAt: z.number().int().nonnegative().nullable(),
|
|
949
|
+
sortAt: z.number().int().nonnegative(),
|
|
950
|
+
updatedAt: z.number().int().nonnegative(),
|
|
951
|
+
version: z.number().int().nonnegative()
|
|
952
|
+
});
|
|
953
|
+
export const recentRunProjectionSchema = recentRunSchema
|
|
954
|
+
.omit({ workspaceName: true })
|
|
955
|
+
.extend({ userId: z.number().int().positive() });
|
|
956
|
+
export const recentRunProjectionMessageSchema = z.discriminatedUnion('kind', [
|
|
957
|
+
z.object({ kind: z.literal('UPDATE'), run: recentRunProjectionSchema }),
|
|
958
|
+
z.object({ kind: z.literal('SNAPSHOT'), runs: z.array(recentRunProjectionSchema) })
|
|
959
|
+
]);
|
|
960
|
+
/** Process-local Workspace FIFO projection; queue contents never enter SQLite. */
|
|
961
|
+
export const workspaceQueueItemSchema = z.object({
|
|
962
|
+
queueItemId: z.string().min(1).max(128),
|
|
963
|
+
sessionId: z.string().min(1).max(128),
|
|
964
|
+
workspaceId: z.string().min(1).max(128),
|
|
965
|
+
runner: runnerNameSchema,
|
|
966
|
+
clientMessageId: z.string().min(1).max(128),
|
|
967
|
+
sessionTitle: z.string().max(160),
|
|
968
|
+
content: z.string().min(1).max(20_000),
|
|
969
|
+
createdAt: z.number().int().nonnegative()
|
|
970
|
+
});
|
|
971
|
+
export const workspaceQueueSchema = z.object({
|
|
972
|
+
version: z.number().int().nonnegative(),
|
|
973
|
+
paused: z.boolean(),
|
|
974
|
+
items: z.array(workspaceQueueItemSchema)
|
|
975
|
+
});
|
|
976
|
+
export const runEventSchema = z.object({
|
|
977
|
+
runId: z.string().min(1).max(128),
|
|
978
|
+
sequence: z.number().int().positive(),
|
|
979
|
+
eventType: z.string().regex(/^[A-Za-z0-9._-]{1,80}$/),
|
|
980
|
+
payload: z.unknown(),
|
|
981
|
+
status: agentRunStatusSchema.optional(),
|
|
982
|
+
createdAt: z.number().int().nonnegative().optional(),
|
|
983
|
+
version: z.number().int().nonnegative().optional()
|
|
984
|
+
});
|
|
985
|
+
/**
|
|
986
|
+
* Node-to-Workbench asynchronous notifications. This is deliberately a
|
|
987
|
+
* small envelope: business payloads remain owned by the Node and Server only
|
|
988
|
+
* authenticates and relays them to an Admin page connection.
|
|
989
|
+
*/
|
|
990
|
+
export const workbenchEventCategorySchema = z.enum([
|
|
991
|
+
'node',
|
|
992
|
+
'session',
|
|
993
|
+
'conversation',
|
|
994
|
+
'hosted-conversation',
|
|
995
|
+
'run',
|
|
996
|
+
'queue',
|
|
997
|
+
'workspace'
|
|
998
|
+
]);
|
|
999
|
+
export const workbenchEventSchema = z.object({
|
|
1000
|
+
sequence: z.number().int().positive(),
|
|
1001
|
+
category: workbenchEventCategorySchema,
|
|
1002
|
+
payload: z.unknown()
|
|
1003
|
+
});
|
|
1004
|
+
export const watchAcceptedSchema = z
|
|
1005
|
+
.object({
|
|
1006
|
+
accepted: z.literal(true),
|
|
1007
|
+
watchId: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/),
|
|
1008
|
+
nodeGeneration: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/),
|
|
1009
|
+
expiresAt: z.number().int().positive()
|
|
1010
|
+
})
|
|
1011
|
+
.strict();
|
|
1012
|
+
const watchEventIdentitySchema = z
|
|
1013
|
+
.object({
|
|
1014
|
+
workbenchConnectionId: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/),
|
|
1015
|
+
watchId: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/),
|
|
1016
|
+
nodeGeneration: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/),
|
|
1017
|
+
nodeId: z.string().min(1).max(160)
|
|
1018
|
+
})
|
|
1019
|
+
.strict();
|
|
1020
|
+
const hostedConversationWatchIdentitySchema = watchEventIdentitySchema.extend({
|
|
1021
|
+
templateId: z.string().min(1).max(160)
|
|
1022
|
+
});
|
|
1023
|
+
const watchFailedEventSchema = watchEventIdentitySchema
|
|
1024
|
+
.extend({
|
|
1025
|
+
type: z.literal('watch.failed'),
|
|
1026
|
+
watchType: z.enum(['workspace', 'session', 'hosted-conversation']),
|
|
1027
|
+
workspaceId: z.string().min(1).max(160).optional(),
|
|
1028
|
+
sessionId: z.string().min(1).max(512).optional(),
|
|
1029
|
+
conversationId: z.string().min(1).max(160).optional(),
|
|
1030
|
+
templateId: z.string().min(1).max(160).optional(),
|
|
1031
|
+
topic: z.enum(['sessions', 'files', 'changes']).optional(),
|
|
1032
|
+
code: z.string().regex(/^[A-Z][A-Z0-9_]{0,127}$/),
|
|
1033
|
+
message: z.string().min(1).max(1000)
|
|
1034
|
+
})
|
|
1035
|
+
.superRefine((event, context) => {
|
|
1036
|
+
const valid = (event.watchType === 'workspace' &&
|
|
1037
|
+
event.workspaceId !== undefined &&
|
|
1038
|
+
event.sessionId === undefined &&
|
|
1039
|
+
event.conversationId === undefined &&
|
|
1040
|
+
event.templateId === undefined) ||
|
|
1041
|
+
(event.watchType === 'session' &&
|
|
1042
|
+
event.workspaceId !== undefined &&
|
|
1043
|
+
event.sessionId !== undefined &&
|
|
1044
|
+
event.conversationId === undefined &&
|
|
1045
|
+
event.templateId === undefined &&
|
|
1046
|
+
event.topic === undefined) ||
|
|
1047
|
+
(event.watchType === 'hosted-conversation' &&
|
|
1048
|
+
event.workspaceId === undefined &&
|
|
1049
|
+
event.sessionId === undefined &&
|
|
1050
|
+
event.conversationId !== undefined &&
|
|
1051
|
+
event.templateId !== undefined &&
|
|
1052
|
+
event.topic === undefined);
|
|
1053
|
+
if (!valid)
|
|
1054
|
+
context.addIssue({
|
|
1055
|
+
code: 'custom',
|
|
1056
|
+
message: 'watch failure identity does not match the watch type'
|
|
1057
|
+
});
|
|
1058
|
+
});
|
|
1059
|
+
export const watchEventSchema = z.union([
|
|
1060
|
+
watchEventIdentitySchema.extend({
|
|
1061
|
+
type: z.literal('watch.workspace.snapshot'),
|
|
1062
|
+
workspaceId: z.string().min(1).max(160),
|
|
1063
|
+
topic: z.enum(['sessions', 'files', 'changes']),
|
|
1064
|
+
revision: z.number().int().nonnegative(),
|
|
1065
|
+
snapshotSequence: z.number().int().positive(),
|
|
1066
|
+
expiresAt: z.number().int().positive(),
|
|
1067
|
+
payload: z.unknown()
|
|
1068
|
+
}),
|
|
1069
|
+
watchEventIdentitySchema.extend({
|
|
1070
|
+
type: z.literal('watch.session.snapshot'),
|
|
1071
|
+
workspaceId: z.string().min(1).max(160),
|
|
1072
|
+
sessionId: z.string().min(1).max(512),
|
|
1073
|
+
revision: z.number().int().nonnegative(),
|
|
1074
|
+
snapshotSequence: z.number().int().positive(),
|
|
1075
|
+
expiresAt: z.number().int().positive(),
|
|
1076
|
+
payload: z.unknown()
|
|
1077
|
+
}),
|
|
1078
|
+
watchEventIdentitySchema.extend({
|
|
1079
|
+
type: z.literal('watch.session.event'),
|
|
1080
|
+
workspaceId: z.string().min(1).max(160),
|
|
1081
|
+
sessionId: z.string().min(1).max(512),
|
|
1082
|
+
expiresAt: z.number().int().positive(),
|
|
1083
|
+
event: workbenchEventSchema
|
|
1084
|
+
}),
|
|
1085
|
+
hostedConversationWatchIdentitySchema.extend({
|
|
1086
|
+
type: z.literal('watch.hosted-conversation.snapshot'),
|
|
1087
|
+
conversationId: z.string().min(1).max(160),
|
|
1088
|
+
revision: z.number().int().nonnegative(),
|
|
1089
|
+
snapshotSequence: z.number().int().positive(),
|
|
1090
|
+
expiresAt: z.number().int().positive(),
|
|
1091
|
+
payload: z.unknown()
|
|
1092
|
+
}),
|
|
1093
|
+
hostedConversationWatchIdentitySchema.extend({
|
|
1094
|
+
type: z.literal('watch.hosted-conversation.event'),
|
|
1095
|
+
conversationId: z.string().min(1).max(160),
|
|
1096
|
+
expiresAt: z.number().int().positive(),
|
|
1097
|
+
event: workbenchEventSchema
|
|
1098
|
+
}),
|
|
1099
|
+
watchFailedEventSchema
|
|
1100
|
+
]);
|
|
1101
|
+
const capabilityAvailabilityBaseSchema = z.object({
|
|
1102
|
+
available: z.boolean(),
|
|
1103
|
+
reasonCode: z.string().min(1).max(80).nullable()
|
|
1104
|
+
});
|
|
1105
|
+
function refineCapabilityAvailability(schema) {
|
|
1106
|
+
return schema.superRefine((value, context) => {
|
|
1107
|
+
if (value.available && value.reasonCode !== null) {
|
|
1108
|
+
context.addIssue({ code: 'custom', message: 'available capability cannot have reasonCode' });
|
|
1109
|
+
}
|
|
1110
|
+
if (!value.available && value.reasonCode === null) {
|
|
1111
|
+
context.addIssue({ code: 'custom', message: 'unavailable capability requires reasonCode' });
|
|
1112
|
+
}
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
function capabilitySchemaWith(shape) {
|
|
1116
|
+
return refineCapabilityAvailability(capabilityAvailabilityBaseSchema.extend(shape));
|
|
1117
|
+
}
|
|
1118
|
+
export const capabilityAvailabilitySchema = refineCapabilityAvailability(capabilityAvailabilityBaseSchema);
|
|
1119
|
+
export const runnerCommandDescriptorSchema = z
|
|
1120
|
+
.object({
|
|
1121
|
+
id: z.string().min(1).max(128),
|
|
1122
|
+
runner: runnerNameSchema,
|
|
1123
|
+
label: z.string().min(1).max(128),
|
|
1124
|
+
stateLabel: z.string().min(1).max(128).optional(),
|
|
1125
|
+
description: z.string().max(500),
|
|
1126
|
+
/** Commands are entered exactly as the Runner documents them: `/name args`. */
|
|
1127
|
+
inputHint: z.string().max(200),
|
|
1128
|
+
source: z.enum(['CODEX_APP_SERVER', 'CLAUDE_AGENT_SDK', 'OPENCODE_SERVER', 'MAR_RUNTIME']),
|
|
1129
|
+
interaction: z.enum([
|
|
1130
|
+
'RUNNER_TEXT',
|
|
1131
|
+
'IMMEDIATE_ACTION',
|
|
1132
|
+
'DESTRUCTIVE_ACTION',
|
|
1133
|
+
'TOGGLE',
|
|
1134
|
+
'VALUE'
|
|
1135
|
+
]),
|
|
1136
|
+
available: z.boolean(),
|
|
1137
|
+
reasonCode: z.string().min(1).max(80).nullable()
|
|
1138
|
+
})
|
|
1139
|
+
.superRefine((value, context) => {
|
|
1140
|
+
if (value.available && value.reasonCode !== null) {
|
|
1141
|
+
context.addIssue({ code: 'custom', message: 'available command cannot have reasonCode' });
|
|
1142
|
+
}
|
|
1143
|
+
if (!value.available && value.reasonCode === null) {
|
|
1144
|
+
context.addIssue({ code: 'custom', message: 'unavailable command requires reasonCode' });
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1147
|
+
export const runnerCommandStateSchema = z.object({
|
|
1148
|
+
commandId: z.string().min(1).max(128),
|
|
1149
|
+
active: z.boolean(),
|
|
1150
|
+
label: z.string().min(1).max(128),
|
|
1151
|
+
detail: z.string().max(500).nullable(),
|
|
1152
|
+
closable: z.boolean(),
|
|
1153
|
+
closeInput: z.string().min(2).max(20_000).nullable(),
|
|
1154
|
+
mission: z
|
|
1155
|
+
.object({
|
|
1156
|
+
id: z.string().uuid(),
|
|
1157
|
+
objective: z.string().min(1).max(20_000),
|
|
1158
|
+
revision: z.number().int().positive(),
|
|
1159
|
+
status: z.enum(['active', 'completed', 'blocked']),
|
|
1160
|
+
turns: z.number().int().nonnegative().optional()
|
|
1161
|
+
})
|
|
1162
|
+
.optional(),
|
|
1163
|
+
/** A Node-declared, fixed continuation for a completed structured result. */
|
|
1164
|
+
continuation: z
|
|
1165
|
+
.object({
|
|
1166
|
+
label: z.string().min(1).max(128),
|
|
1167
|
+
prompt: z.string().min(1).max(20_000)
|
|
1168
|
+
})
|
|
1169
|
+
.nullable()
|
|
1170
|
+
.optional()
|
|
1171
|
+
});
|
|
1172
|
+
export const runnerProfileSchema = z.object({
|
|
1173
|
+
runner: runnerNameSchema,
|
|
1174
|
+
models: z.array(z.object({
|
|
1175
|
+
id: z.string().min(1).max(128),
|
|
1176
|
+
label: z.string().min(1).max(128),
|
|
1177
|
+
supportedEfforts: z.array(z.string().min(1).max(64)).max(32),
|
|
1178
|
+
isDefault: z.boolean().optional(),
|
|
1179
|
+
defaultEffort: z.string().min(1).max(64).optional()
|
|
1180
|
+
})),
|
|
1181
|
+
accessOptions: z.array(z.object({
|
|
1182
|
+
id: z.string().min(1).max(128),
|
|
1183
|
+
label: z.string().min(1).max(128),
|
|
1184
|
+
description: z.string().max(500)
|
|
1185
|
+
})),
|
|
1186
|
+
commands: z.array(runnerCommandDescriptorSchema),
|
|
1187
|
+
capabilities: z.array(z.string().min(1).max(80)).max(64)
|
|
1188
|
+
});
|
|
1189
|
+
/** The last explicitly chosen Composer configuration belongs to one Node Runner. */
|
|
1190
|
+
export const runnerDefaultConfigurationSchema = z.object({
|
|
1191
|
+
runner: runnerNameSchema,
|
|
1192
|
+
model: z.string().trim().min(1).max(128),
|
|
1193
|
+
/** Runners without a reasoning-variant dimension persist an empty effort value. */
|
|
1194
|
+
effort: z.string().trim().max(64),
|
|
1195
|
+
access: z.string().trim().min(1).max(128)
|
|
1196
|
+
});
|
|
1197
|
+
/** A Runner command is selected from a Node-declared profile, never guessed from `/` text. */
|
|
1198
|
+
export const runnerCommandExecutionSchema = z.object({
|
|
1199
|
+
commandId: z.string().min(1).max(128),
|
|
1200
|
+
input: z.string().min(2).max(20_000)
|
|
1201
|
+
});
|
|
1202
|
+
export const serverWorkbenchCapabilitiesSchema = z.object({
|
|
1203
|
+
workbenchProtocolVersion: z.literal(WORKBENCH_PROTOCOL_VERSION),
|
|
1204
|
+
serverVersion: z.string().trim().min(1).max(128).optional(),
|
|
1205
|
+
conversationItemVersions: z.array(z.literal(1)).min(1),
|
|
1206
|
+
supportsSessionDetailStream: z.boolean(),
|
|
1207
|
+
supportsTerminalBrowserRelay: z.boolean(),
|
|
1208
|
+
supportsTerminalNodeDataChannel: z.boolean(),
|
|
1209
|
+
maxSseSubscriptionsPerUser: z.number().int().positive().max(128),
|
|
1210
|
+
maxTerminalBrowserConnectionsPerUser: z.number().int().nonnegative().max(32)
|
|
1211
|
+
});
|
|
1212
|
+
export const nodeWorkbenchCapabilitiesSchema = z.object({
|
|
1213
|
+
manifestVersion: z.literal(1),
|
|
1214
|
+
revision: z.number().int().nonnegative(),
|
|
1215
|
+
observedAt: z.number().int().nonnegative(),
|
|
1216
|
+
platform: nodePlatformSchema,
|
|
1217
|
+
architecture: z.string().min(1).max(128),
|
|
1218
|
+
conversation: capabilitySchemaWith({
|
|
1219
|
+
itemVersions: z.array(z.literal(1)),
|
|
1220
|
+
supportsSessionCursor: z.boolean(),
|
|
1221
|
+
supportsHistoryPaging: z.boolean(),
|
|
1222
|
+
supportsItemFinalSnapshots: z.boolean(),
|
|
1223
|
+
maxPageSize: z.number().int().positive().max(500)
|
|
1224
|
+
}),
|
|
1225
|
+
runners: z.array(runnerProfileSchema),
|
|
1226
|
+
files: capabilitySchemaWith({
|
|
1227
|
+
supportsList: z.boolean(),
|
|
1228
|
+
supportsReadRange: z.boolean(),
|
|
1229
|
+
supportsSearch: z.boolean(),
|
|
1230
|
+
maxDirectoryPageSize: z.number().int().positive().max(1000),
|
|
1231
|
+
maxReadBytes: z.number().int().positive(),
|
|
1232
|
+
maxSearchResults: z.number().int().positive().max(10000)
|
|
1233
|
+
}),
|
|
1234
|
+
git: capabilitySchemaWith({
|
|
1235
|
+
supportsCurrentChanges: z.boolean(),
|
|
1236
|
+
supportsTurnChanges: z.boolean(),
|
|
1237
|
+
supportsHistory: z.boolean().optional(),
|
|
1238
|
+
maxDiffBytes: z.number().int().positive()
|
|
1239
|
+
}),
|
|
1240
|
+
terminal: capabilitySchemaWith({
|
|
1241
|
+
supportsPty: z.boolean(),
|
|
1242
|
+
supportsConPty: z.boolean(),
|
|
1243
|
+
supportsReplay: z.boolean(),
|
|
1244
|
+
supportsReadonlyAttach: z.boolean(),
|
|
1245
|
+
supportsTakeover: z.boolean(),
|
|
1246
|
+
maxTerminals: z.number().int().nonnegative().max(64),
|
|
1247
|
+
maxReplayBytes: z.number().int().nonnegative(),
|
|
1248
|
+
reconnectWindowMs: z.number().int().nonnegative(),
|
|
1249
|
+
profiles: z.array(z.object({
|
|
1250
|
+
id: z.string().min(1).max(128),
|
|
1251
|
+
label: z.string().min(1).max(128),
|
|
1252
|
+
isDefault: z.boolean()
|
|
1253
|
+
}))
|
|
1254
|
+
})
|
|
1255
|
+
});
|
|
1256
|
+
export const sessionRuntimeCapabilitySchema = z.enum([
|
|
1257
|
+
'history.read',
|
|
1258
|
+
'events.live',
|
|
1259
|
+
'turn.start',
|
|
1260
|
+
'turn.queue',
|
|
1261
|
+
'turn.interrupt',
|
|
1262
|
+
'run.cancel',
|
|
1263
|
+
'approval.respond',
|
|
1264
|
+
'user-input.respond',
|
|
1265
|
+
'session.rename',
|
|
1266
|
+
'session.rewind',
|
|
1267
|
+
'session.rollback',
|
|
1268
|
+
'session.remove',
|
|
1269
|
+
'session.pin'
|
|
1270
|
+
]);
|
|
1271
|
+
export const sessionRuntimeCapabilitiesSchema = z.object({
|
|
1272
|
+
level: z.enum(['MANAGED', 'SHARED_CONTROL', 'OBSERVE_ONLY', 'RESUMABLE', 'UNAVAILABLE']),
|
|
1273
|
+
capabilities: z.array(sessionRuntimeCapabilitySchema),
|
|
1274
|
+
reasonCode: z.string().min(1).max(80).nullable()
|
|
1275
|
+
});
|
|
1276
|
+
export const sessionActivityStateSchema = z.enum([
|
|
1277
|
+
'MANAGED_ACTIVE',
|
|
1278
|
+
'EXTERNAL_ACTIVE',
|
|
1279
|
+
'IDLE',
|
|
1280
|
+
'UNAVAILABLE'
|
|
1281
|
+
]);
|
|
1282
|
+
export const eventCursorSchema = z.object({
|
|
1283
|
+
scope: z.enum(['RUN', 'SESSION', 'WORKSPACE_ACTIVITY']),
|
|
1284
|
+
streamId: z.string().min(1).max(128),
|
|
1285
|
+
cursor: z.string().min(1).max(1024)
|
|
1286
|
+
});
|
|
1287
|
+
const conversationItemBaseSchema = z.object({
|
|
1288
|
+
id: z.string().min(1).max(128),
|
|
1289
|
+
sessionId: z.string().min(1).max(128),
|
|
1290
|
+
turnId: z.string().min(1).max(128),
|
|
1291
|
+
runId: z.string().min(1).max(128).nullable(),
|
|
1292
|
+
parentItemId: z.string().min(1).max(128).nullable(),
|
|
1293
|
+
sourceSequence: z.number().int().positive().nullable(),
|
|
1294
|
+
revision: z.number().int().nonnegative(),
|
|
1295
|
+
status: z.enum([
|
|
1296
|
+
'PENDING',
|
|
1297
|
+
'IN_PROGRESS',
|
|
1298
|
+
'COMPLETED',
|
|
1299
|
+
'FAILED',
|
|
1300
|
+
'DECLINED',
|
|
1301
|
+
'CANCELLED',
|
|
1302
|
+
'INTERRUPTED'
|
|
1303
|
+
]),
|
|
1304
|
+
startedAt: z.number().int().nonnegative().nullable(),
|
|
1305
|
+
completedAt: z.number().int().nonnegative().nullable(),
|
|
1306
|
+
segmentId: z.string().min(1).max(256).optional(),
|
|
1307
|
+
segmentIndex: z.number().int().nonnegative().optional()
|
|
1308
|
+
});
|
|
1309
|
+
export const contextReferenceSchema = z.object({
|
|
1310
|
+
type: z.enum(['file', 'directory', 'changes', 'diff', 'turn', 'message', 'terminal_selection']),
|
|
1311
|
+
referenceId: z.string().min(1).max(128),
|
|
1312
|
+
label: z.string().min(1).max(500),
|
|
1313
|
+
path: z.string().min(1).max(4096).optional(),
|
|
1314
|
+
startLine: z.number().int().positive().optional(),
|
|
1315
|
+
endLine: z.number().int().positive().optional()
|
|
1316
|
+
});
|
|
1317
|
+
export const conversationImageAttachmentSchema = z
|
|
1318
|
+
.object({
|
|
1319
|
+
name: z.string().trim().min(1).max(512),
|
|
1320
|
+
mime: z.string().regex(/^image\/[A-Za-z0-9][A-Za-z0-9.+-]{0,127}$/u),
|
|
1321
|
+
byteSize: z.number().int().nonnegative().optional(),
|
|
1322
|
+
runId: z.string().min(1).max(128).optional(),
|
|
1323
|
+
imageIndex: z.number().int().nonnegative().optional()
|
|
1324
|
+
})
|
|
1325
|
+
.strict()
|
|
1326
|
+
.superRefine((attachment, context) => {
|
|
1327
|
+
if ((attachment.runId === undefined) !== (attachment.imageIndex === undefined))
|
|
1328
|
+
context.addIssue({
|
|
1329
|
+
code: 'custom',
|
|
1330
|
+
message: 'runId and imageIndex must be provided together'
|
|
1331
|
+
});
|
|
1332
|
+
});
|
|
1333
|
+
const assistantMessageItemSchema = conversationItemBaseSchema.extend({
|
|
1334
|
+
kind: z.literal('assistant_message'),
|
|
1335
|
+
payload: z.object({
|
|
1336
|
+
text: z.string(),
|
|
1337
|
+
format: z.literal('markdown'),
|
|
1338
|
+
model: z.string().max(128).nullable()
|
|
1339
|
+
})
|
|
1340
|
+
});
|
|
1341
|
+
const userMessageItemSchema = conversationItemBaseSchema.extend({
|
|
1342
|
+
kind: z.literal('user_message'),
|
|
1343
|
+
payload: z.object({
|
|
1344
|
+
clientMessageId: z.string().min(1).max(128).nullable(),
|
|
1345
|
+
text: z.string(),
|
|
1346
|
+
contexts: z.array(contextReferenceSchema).max(64).default([]),
|
|
1347
|
+
delivery: z.enum(['PENDING', 'ACCEPTED', 'STEERED', 'QUEUED_NEXT_TURN', 'REJECTED'])
|
|
1348
|
+
})
|
|
1349
|
+
});
|
|
1350
|
+
const planItemSchema = conversationItemBaseSchema.extend({
|
|
1351
|
+
kind: z.literal('plan'),
|
|
1352
|
+
payload: z.object({
|
|
1353
|
+
explanation: z.string().nullable(),
|
|
1354
|
+
steps: z.array(z.object({
|
|
1355
|
+
id: z.string().min(1).max(128),
|
|
1356
|
+
text: z.string(),
|
|
1357
|
+
status: z.enum(['PENDING', 'IN_PROGRESS', 'COMPLETED'])
|
|
1358
|
+
}))
|
|
1359
|
+
})
|
|
1360
|
+
});
|
|
1361
|
+
const todoListItemSchema = conversationItemBaseSchema.extend({
|
|
1362
|
+
kind: z.literal('todo_list'),
|
|
1363
|
+
payload: z.object({
|
|
1364
|
+
items: z.array(z.object({
|
|
1365
|
+
id: z.string().min(1).max(128),
|
|
1366
|
+
text: z.string(),
|
|
1367
|
+
status: z.enum(['PENDING', 'IN_PROGRESS', 'COMPLETED'])
|
|
1368
|
+
}))
|
|
1369
|
+
})
|
|
1370
|
+
});
|
|
1371
|
+
const approvalItemSchema = conversationItemBaseSchema.extend({
|
|
1372
|
+
kind: z.literal('approval'),
|
|
1373
|
+
payload: z.object({
|
|
1374
|
+
approvalId: z.string().min(1).max(128),
|
|
1375
|
+
category: z.enum(['COMMAND', 'FILE_CHANGE', 'NETWORK', 'TOOL', 'OTHER']),
|
|
1376
|
+
reason: z.string().nullable(),
|
|
1377
|
+
expiresAt: z.number().int().nonnegative(),
|
|
1378
|
+
resolvedDecision: z.string().nullable()
|
|
1379
|
+
})
|
|
1380
|
+
});
|
|
1381
|
+
const summaryItemSchema = conversationItemBaseSchema.extend({
|
|
1382
|
+
kind: z.literal('turn_summary'),
|
|
1383
|
+
payload: z.object({
|
|
1384
|
+
status: agentRunStatusSchema,
|
|
1385
|
+
durationMs: z.number().int().nonnegative().nullable()
|
|
1386
|
+
})
|
|
1387
|
+
});
|
|
1388
|
+
const reasoningSummaryItemSchema = conversationItemBaseSchema.extend({
|
|
1389
|
+
kind: z.literal('reasoning_summary'),
|
|
1390
|
+
payload: z.object({
|
|
1391
|
+
sections: z.array(z.object({ index: z.number().int().nonnegative(), text: z.string() }))
|
|
1392
|
+
})
|
|
1393
|
+
});
|
|
1394
|
+
export const subagentOperationSchema = z.enum(['START', 'STATUS', 'CANCEL', 'MESSAGE', 'RESUME']);
|
|
1395
|
+
export const subagentLatestMessageSchema = z.object({
|
|
1396
|
+
itemId: z.string().min(1).max(128),
|
|
1397
|
+
turnId: z.string().min(1).max(128),
|
|
1398
|
+
phase: z.enum(['commentary', 'final_answer']),
|
|
1399
|
+
text: z
|
|
1400
|
+
.string()
|
|
1401
|
+
.refine((value) => [...value].length <= 10_000, 'Must contain at most 10000 characters'),
|
|
1402
|
+
timestamp: z.string().datetime(),
|
|
1403
|
+
truncated: z.boolean().optional()
|
|
1404
|
+
});
|
|
1405
|
+
const toolCallItemSchema = conversationItemBaseSchema.extend({
|
|
1406
|
+
kind: z.literal('tool_call'),
|
|
1407
|
+
payload: z.object({
|
|
1408
|
+
namespace: z.string().min(1).max(128),
|
|
1409
|
+
toolName: z.string().min(1).max(128),
|
|
1410
|
+
title: z.string().min(1).max(500),
|
|
1411
|
+
inputSummary: z.string().max(10000).nullable(),
|
|
1412
|
+
outputSummary: z.string().max(10000).nullable(),
|
|
1413
|
+
progressLabel: z.string().max(500).nullable(),
|
|
1414
|
+
errorCode: z.string().max(80).nullable(),
|
|
1415
|
+
truncated: z.boolean(),
|
|
1416
|
+
toolCategory: z.enum(['IMAGE_GENERATION']).optional(),
|
|
1417
|
+
subagentOperation: subagentOperationSchema.optional(),
|
|
1418
|
+
subagentId: z.string().min(1).max(128).nullable().optional(),
|
|
1419
|
+
subagentModelId: z.string().min(1).max(128).optional(),
|
|
1420
|
+
subagentModelName: z.string().min(1).max(128).optional(),
|
|
1421
|
+
subagentReasoningEffort: z.enum(['low', 'medium', 'high', 'xhigh', 'max', 'ultra']).optional(),
|
|
1422
|
+
subagentLatestMessage: subagentLatestMessageSchema.optional(),
|
|
1423
|
+
attachments: z.array(conversationImageAttachmentSchema).max(32).optional()
|
|
1424
|
+
})
|
|
1425
|
+
});
|
|
1426
|
+
const commandExecutionItemSchema = conversationItemBaseSchema.extend({
|
|
1427
|
+
kind: z.literal('command_execution'),
|
|
1428
|
+
payload: z.object({
|
|
1429
|
+
command: z.string().max(10000),
|
|
1430
|
+
cwd: z.string().max(4096).nullable(),
|
|
1431
|
+
outputPreview: z.string().max(10000),
|
|
1432
|
+
outputRef: z.string().min(1).max(128).nullable(),
|
|
1433
|
+
exitCode: z.number().int().nullable(),
|
|
1434
|
+
durationMs: z.number().int().nonnegative().nullable(),
|
|
1435
|
+
truncated: z.boolean()
|
|
1436
|
+
})
|
|
1437
|
+
});
|
|
1438
|
+
const fileChangeItemSchema = conversationItemBaseSchema.extend({
|
|
1439
|
+
kind: z.literal('file_change'),
|
|
1440
|
+
payload: z.object({
|
|
1441
|
+
changes: z.array(z.object({
|
|
1442
|
+
path: z.string().min(1).max(4096),
|
|
1443
|
+
change: z.enum(['ADDED', 'MODIFIED', 'DELETED', 'RENAMED', 'COPIED', 'TYPE_CHANGED']),
|
|
1444
|
+
additions: z.number().int().nonnegative().nullable(),
|
|
1445
|
+
deletions: z.number().int().nonnegative().nullable(),
|
|
1446
|
+
diffAvailable: z.boolean()
|
|
1447
|
+
}))
|
|
1448
|
+
})
|
|
1449
|
+
});
|
|
1450
|
+
const userInputRequestItemSchema = conversationItemBaseSchema.extend({
|
|
1451
|
+
kind: z.literal('user_input_request'),
|
|
1452
|
+
payload: z.object({
|
|
1453
|
+
requestId: z.string().min(1).max(128),
|
|
1454
|
+
questions: z.array(z.object({
|
|
1455
|
+
id: z.string().min(1).max(128),
|
|
1456
|
+
prompt: z.string().max(5000),
|
|
1457
|
+
input: z.enum(['SINGLE_SELECT', 'MULTI_SELECT', 'SHORT_TEXT']),
|
|
1458
|
+
options: z.array(z.object({
|
|
1459
|
+
value: z.string().max(500),
|
|
1460
|
+
label: z.string().max(500),
|
|
1461
|
+
description: z.string().max(1000).nullable()
|
|
1462
|
+
})),
|
|
1463
|
+
allowOther: z.boolean(),
|
|
1464
|
+
multiSelect: z.boolean().optional()
|
|
1465
|
+
}))
|
|
1466
|
+
})
|
|
1467
|
+
});
|
|
1468
|
+
const contextCompactionItemSchema = conversationItemBaseSchema.extend({
|
|
1469
|
+
kind: z.literal('context_compaction'),
|
|
1470
|
+
payload: z.object({
|
|
1471
|
+
phase: z.enum(['STARTED', 'COMPLETED']),
|
|
1472
|
+
summary: z.string().max(10000).nullable()
|
|
1473
|
+
})
|
|
1474
|
+
});
|
|
1475
|
+
const warningItemSchema = conversationItemBaseSchema.extend({
|
|
1476
|
+
kind: z.literal('warning'),
|
|
1477
|
+
payload: z.object({
|
|
1478
|
+
code: z.string().min(1).max(80),
|
|
1479
|
+
message: z.string().max(5000),
|
|
1480
|
+
recoverable: z.boolean()
|
|
1481
|
+
})
|
|
1482
|
+
});
|
|
1483
|
+
const errorItemSchema = conversationItemBaseSchema.extend({
|
|
1484
|
+
kind: z.literal('error'),
|
|
1485
|
+
payload: z.object({
|
|
1486
|
+
code: z.string().min(1).max(80),
|
|
1487
|
+
message: z.string().max(1000),
|
|
1488
|
+
httpStatus: z.number().int().min(100).max(599).nullable().optional(),
|
|
1489
|
+
recoverable: z.boolean(),
|
|
1490
|
+
retryAfterMs: z.number().int().nonnegative().nullable()
|
|
1491
|
+
})
|
|
1492
|
+
});
|
|
1493
|
+
const unknownItemSchema = conversationItemBaseSchema.extend({
|
|
1494
|
+
kind: z.literal('unknown'),
|
|
1495
|
+
payload: z.object({ sourceEventType: z.string().min(1).max(128), label: z.string().max(500) })
|
|
1496
|
+
});
|
|
1497
|
+
export const conversationItemSchema = z.discriminatedUnion('kind', [
|
|
1498
|
+
assistantMessageItemSchema,
|
|
1499
|
+
userMessageItemSchema,
|
|
1500
|
+
reasoningSummaryItemSchema,
|
|
1501
|
+
planItemSchema,
|
|
1502
|
+
todoListItemSchema,
|
|
1503
|
+
toolCallItemSchema,
|
|
1504
|
+
commandExecutionItemSchema,
|
|
1505
|
+
fileChangeItemSchema,
|
|
1506
|
+
approvalItemSchema,
|
|
1507
|
+
userInputRequestItemSchema,
|
|
1508
|
+
contextCompactionItemSchema,
|
|
1509
|
+
warningItemSchema,
|
|
1510
|
+
errorItemSchema,
|
|
1511
|
+
summaryItemSchema,
|
|
1512
|
+
unknownItemSchema
|
|
1513
|
+
]);
|
|
1514
|
+
export const conversationTurnSchema = z.object({
|
|
1515
|
+
id: z.string().min(1).max(128),
|
|
1516
|
+
sessionId: z.string().min(1).max(128),
|
|
1517
|
+
runId: z.string().min(1).max(128).nullable(),
|
|
1518
|
+
userItemId: z.string().min(1).max(128).nullable(),
|
|
1519
|
+
status: z.enum([
|
|
1520
|
+
'PREPARING',
|
|
1521
|
+
'RUNNING',
|
|
1522
|
+
'WAITING_INPUT',
|
|
1523
|
+
'WAITING_APPROVAL',
|
|
1524
|
+
'SUCCEEDED',
|
|
1525
|
+
'FAILED',
|
|
1526
|
+
'CANCELLED',
|
|
1527
|
+
'INTERRUPTED',
|
|
1528
|
+
'LOST'
|
|
1529
|
+
]),
|
|
1530
|
+
model: z.string().max(128).nullable(),
|
|
1531
|
+
effort: z.string().max(64).nullable(),
|
|
1532
|
+
access: z.string().max(128).nullable(),
|
|
1533
|
+
rewind: z
|
|
1534
|
+
.object({
|
|
1535
|
+
before: z.string().min(1).max(256).nullable(),
|
|
1536
|
+
after: z.string().min(1).max(256)
|
|
1537
|
+
})
|
|
1538
|
+
.optional(),
|
|
1539
|
+
items: z.array(conversationItemSchema),
|
|
1540
|
+
startedAt: z.number().int().nonnegative().nullable(),
|
|
1541
|
+
completedAt: z.number().int().nonnegative().nullable()
|
|
1542
|
+
});
|
|
1543
|
+
const protocolIdSchema = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/);
|
|
1544
|
+
const stableStorageKeySchema = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{7,159}$/);
|
|
1545
|
+
const contentHashSchema = z.string().regex(/^[a-f0-9]{64}$/);
|
|
1546
|
+
const conversationRelativePathSchema = z
|
|
1547
|
+
.string()
|
|
1548
|
+
.trim()
|
|
1549
|
+
.min(1)
|
|
1550
|
+
.max(4096)
|
|
1551
|
+
.refine((path) => !path.startsWith('/') &&
|
|
1552
|
+
!path.includes('\\') &&
|
|
1553
|
+
!path.split('/').some((segment) => segment === '' || segment === '.' || segment === '..') &&
|
|
1554
|
+
!/^[A-Za-z]:/u.test(path), 'relative path is invalid');
|
|
1555
|
+
const uniqueProtocolIds = (values, context, path) => {
|
|
1556
|
+
if (new Set(values).size !== values.length)
|
|
1557
|
+
context.addIssue({ code: 'custom', path, message: 'identifiers must be unique' });
|
|
1558
|
+
};
|
|
1559
|
+
const BASE64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
1560
|
+
const canonicalBase64 = (value) => {
|
|
1561
|
+
if (value.length === 0)
|
|
1562
|
+
return true;
|
|
1563
|
+
if (value.length % 4 !== 0 || !/^[A-Za-z0-9+/]+={0,2}$/u.test(value))
|
|
1564
|
+
return false;
|
|
1565
|
+
const padding = value.endsWith('==') ? 2 : value.endsWith('=') ? 1 : 0;
|
|
1566
|
+
if (padding === 2)
|
|
1567
|
+
return BASE64_ALPHABET.indexOf(value.at(-3)) % 16 === 0;
|
|
1568
|
+
if (padding === 1)
|
|
1569
|
+
return BASE64_ALPHABET.indexOf(value.at(-2)) % 4 === 0;
|
|
1570
|
+
return true;
|
|
1571
|
+
};
|
|
1572
|
+
const base64DecodedByteLength = (value) => {
|
|
1573
|
+
if (value.length === 0)
|
|
1574
|
+
return 0;
|
|
1575
|
+
const padding = value.endsWith('==') ? 2 : value.endsWith('=') ? 1 : 0;
|
|
1576
|
+
return (value.length * 3) / 4 - padding;
|
|
1577
|
+
};
|
|
1578
|
+
export const conversationTemplateStatusSchema = z.enum(['ACTIVE', 'ARCHIVED', 'DELETED']);
|
|
1579
|
+
export const conversationTemplateVersionStatusSchema = z.enum([
|
|
1580
|
+
'AVAILABLE',
|
|
1581
|
+
'DISABLED',
|
|
1582
|
+
'CORRUPTED',
|
|
1583
|
+
'RETAINED'
|
|
1584
|
+
]);
|
|
1585
|
+
export const conversationTemplateNetworkModeSchema = z.enum(['NONE', 'UNRESTRICTED']);
|
|
1586
|
+
export const conversationTemplateQuotaSchema = z
|
|
1587
|
+
.object({
|
|
1588
|
+
maxStorageBytes: z.number().int().positive(),
|
|
1589
|
+
maxUploadBytes: z.number().int().positive()
|
|
1590
|
+
})
|
|
1591
|
+
.strict()
|
|
1592
|
+
.superRefine((quota, context) => {
|
|
1593
|
+
if (quota.maxUploadBytes > quota.maxStorageBytes)
|
|
1594
|
+
context.addIssue({ code: 'custom', message: 'upload quota exceeds storage quota' });
|
|
1595
|
+
});
|
|
1596
|
+
export const conversationTemplateModelReferenceSchema = z
|
|
1597
|
+
.object({
|
|
1598
|
+
modelId: protocolIdSchema,
|
|
1599
|
+
name: z.string().trim().min(1).max(128)
|
|
1600
|
+
})
|
|
1601
|
+
.strict();
|
|
1602
|
+
export const conversationTemplateDraftSchema = z
|
|
1603
|
+
.object({
|
|
1604
|
+
templateId: protocolIdSchema,
|
|
1605
|
+
nodeId: protocolIdSchema,
|
|
1606
|
+
workspaceId: protocolIdSchema,
|
|
1607
|
+
revision: z.number().int().positive(),
|
|
1608
|
+
name: z.string().trim().min(1).max(128),
|
|
1609
|
+
description: z.string().max(2000),
|
|
1610
|
+
icon: z.string().trim().min(1).max(128).optional(),
|
|
1611
|
+
allowedModels: z.array(conversationTemplateModelReferenceSchema).min(1).max(128),
|
|
1612
|
+
defaultModelId: protocolIdSchema,
|
|
1613
|
+
mcpIds: z.array(protocolIdSchema).max(128),
|
|
1614
|
+
networkMode: conversationTemplateNetworkModeSchema,
|
|
1615
|
+
quotas: conversationTemplateQuotaSchema,
|
|
1616
|
+
updatedAt: z.number().int().nonnegative()
|
|
1617
|
+
})
|
|
1618
|
+
.strict()
|
|
1619
|
+
.superRefine((draft, context) => {
|
|
1620
|
+
uniqueProtocolIds(draft.allowedModels.map((model) => model.modelId), context, ['allowedModels']);
|
|
1621
|
+
uniqueProtocolIds(draft.mcpIds, context, ['mcpIds']);
|
|
1622
|
+
if (!draft.allowedModels.some((model) => model.modelId === draft.defaultModelId))
|
|
1623
|
+
context.addIssue({
|
|
1624
|
+
code: 'custom',
|
|
1625
|
+
path: ['defaultModelId'],
|
|
1626
|
+
message: 'default model must be allowed'
|
|
1627
|
+
});
|
|
1628
|
+
});
|
|
1629
|
+
export const conversationTemplateSourceInspectInputSchema = z
|
|
1630
|
+
.object({
|
|
1631
|
+
mode: z.enum(['VALIDATE', 'DRAFT_TEST']),
|
|
1632
|
+
draft: conversationTemplateDraftSchema
|
|
1633
|
+
})
|
|
1634
|
+
.strict();
|
|
1635
|
+
export const conversationTemplateMcpOptionSchema = z
|
|
1636
|
+
.object({
|
|
1637
|
+
id: protocolIdSchema,
|
|
1638
|
+
serverName: z.string().trim().min(1).max(255),
|
|
1639
|
+
displayName: z.string().trim().min(1).max(128),
|
|
1640
|
+
transport: z.enum(['STDIO', 'HTTP']),
|
|
1641
|
+
origin: z.enum(['NODE', 'WORKSPACE'])
|
|
1642
|
+
})
|
|
1643
|
+
.strict();
|
|
1644
|
+
export const conversationTemplateSourceInspectionSchema = z
|
|
1645
|
+
.object({
|
|
1646
|
+
valid: z.boolean(),
|
|
1647
|
+
code: z
|
|
1648
|
+
.string()
|
|
1649
|
+
.regex(/^[A-Z][A-Z0-9_]{0,79}$/)
|
|
1650
|
+
.nullable(),
|
|
1651
|
+
message: z.string().min(1).max(1000),
|
|
1652
|
+
checkedAt: z.number().int().nonnegative(),
|
|
1653
|
+
mcpServers: z.array(conversationTemplateMcpOptionSchema).max(128).default([])
|
|
1654
|
+
})
|
|
1655
|
+
.strict()
|
|
1656
|
+
.superRefine((inspection, context) => {
|
|
1657
|
+
if (inspection.valid !== (inspection.code === null))
|
|
1658
|
+
context.addIssue({
|
|
1659
|
+
code: 'custom',
|
|
1660
|
+
path: ['code'],
|
|
1661
|
+
message: 'inspection code must match validity'
|
|
1662
|
+
});
|
|
1663
|
+
uniqueProtocolIds(inspection.mcpServers.map((server) => server.id), context, ['mcpServers']);
|
|
1664
|
+
});
|
|
1665
|
+
export const conversationTemplateSummarySchema = z
|
|
1666
|
+
.object({
|
|
1667
|
+
id: protocolIdSchema,
|
|
1668
|
+
nodeId: protocolIdSchema,
|
|
1669
|
+
name: z.string().trim().min(1).max(128),
|
|
1670
|
+
description: z.string().max(2000),
|
|
1671
|
+
icon: z.string().trim().min(1).max(128).optional(),
|
|
1672
|
+
status: conversationTemplateStatusSchema,
|
|
1673
|
+
currentVersionId: protocolIdSchema.nullable(),
|
|
1674
|
+
available: z.boolean(),
|
|
1675
|
+
createdAt: z.number().int().nonnegative(),
|
|
1676
|
+
updatedAt: z.number().int().nonnegative()
|
|
1677
|
+
})
|
|
1678
|
+
.strict()
|
|
1679
|
+
.superRefine((template, context) => {
|
|
1680
|
+
if (template.available && (template.status !== 'ACTIVE' || template.currentVersionId === null))
|
|
1681
|
+
context.addIssue({
|
|
1682
|
+
code: 'custom',
|
|
1683
|
+
path: ['available'],
|
|
1684
|
+
message: 'available template requires an active published version'
|
|
1685
|
+
});
|
|
1686
|
+
});
|
|
1687
|
+
export const conversationTemplateVersionSchema = z
|
|
1688
|
+
.object({
|
|
1689
|
+
id: protocolIdSchema,
|
|
1690
|
+
templateId: protocolIdSchema,
|
|
1691
|
+
version: z.number().int().positive(),
|
|
1692
|
+
status: conversationTemplateVersionStatusSchema,
|
|
1693
|
+
contentHash: contentHashSchema,
|
|
1694
|
+
manifestHash: contentHashSchema,
|
|
1695
|
+
mcpConfigHash: contentHashSchema,
|
|
1696
|
+
fileCount: z.number().int().nonnegative(),
|
|
1697
|
+
totalBytes: z.number().int().nonnegative(),
|
|
1698
|
+
hostPolicyVersion: z.number().int().positive(),
|
|
1699
|
+
publishedByUserId: z.number().int().positive(),
|
|
1700
|
+
publishedAt: z.number().int().nonnegative()
|
|
1701
|
+
})
|
|
1702
|
+
.strict();
|
|
1703
|
+
export const conversationTemplatePublishInputSchema = z
|
|
1704
|
+
.object({
|
|
1705
|
+
templateId: protocolIdSchema,
|
|
1706
|
+
draftRevision: z.number().int().positive(),
|
|
1707
|
+
requestId: protocolIdSchema
|
|
1708
|
+
})
|
|
1709
|
+
.strict();
|
|
1710
|
+
export const conversationTemplatePublishRequestSchema = z
|
|
1711
|
+
.object({
|
|
1712
|
+
templateId: protocolIdSchema,
|
|
1713
|
+
jobId: protocolIdSchema,
|
|
1714
|
+
draft: conversationTemplateDraftSchema,
|
|
1715
|
+
requestedByUserId: z.number().int().positive()
|
|
1716
|
+
})
|
|
1717
|
+
.strict()
|
|
1718
|
+
.superRefine((request, context) => {
|
|
1719
|
+
if (request.templateId !== request.draft.templateId)
|
|
1720
|
+
context.addIssue({
|
|
1721
|
+
code: 'custom',
|
|
1722
|
+
path: ['templateId'],
|
|
1723
|
+
message: 'publish template must match the draft'
|
|
1724
|
+
});
|
|
1725
|
+
});
|
|
1726
|
+
export const conversationTemplatePublishStatusInputSchema = z
|
|
1727
|
+
.object({
|
|
1728
|
+
templateId: protocolIdSchema,
|
|
1729
|
+
jobId: protocolIdSchema
|
|
1730
|
+
})
|
|
1731
|
+
.strict();
|
|
1732
|
+
export const conversationTemplatePublishJobSchema = z
|
|
1733
|
+
.object({
|
|
1734
|
+
id: protocolIdSchema,
|
|
1735
|
+
templateId: protocolIdSchema,
|
|
1736
|
+
draftRevision: z.number().int().positive(),
|
|
1737
|
+
stage: z.enum([
|
|
1738
|
+
'VALIDATING',
|
|
1739
|
+
'ENUMERATING',
|
|
1740
|
+
'COPYING',
|
|
1741
|
+
'SCANNING',
|
|
1742
|
+
'MANIFEST',
|
|
1743
|
+
'SEALED',
|
|
1744
|
+
'REGISTERED'
|
|
1745
|
+
]),
|
|
1746
|
+
status: z.enum(['QUEUED', 'RUNNING', 'SUCCEEDED', 'FAILED']),
|
|
1747
|
+
versionId: protocolIdSchema.optional(),
|
|
1748
|
+
errorCode: z
|
|
1749
|
+
.string()
|
|
1750
|
+
.regex(/^[A-Z][A-Z0-9_]{0,79}$/)
|
|
1751
|
+
.nullable(),
|
|
1752
|
+
errorSummary: z.string().max(1000).optional(),
|
|
1753
|
+
createdAt: z.number().int().nonnegative(),
|
|
1754
|
+
updatedAt: z.number().int().nonnegative()
|
|
1755
|
+
})
|
|
1756
|
+
.strict()
|
|
1757
|
+
.superRefine((job, context) => {
|
|
1758
|
+
if (job.status === 'SUCCEEDED' &&
|
|
1759
|
+
(job.stage !== 'REGISTERED' || job.versionId === undefined || job.errorCode !== null))
|
|
1760
|
+
context.addIssue({ code: 'custom', message: 'successful publish job is incomplete' });
|
|
1761
|
+
if (job.status === 'FAILED' && job.errorCode === null)
|
|
1762
|
+
context.addIssue({ code: 'custom', message: 'failed publish job requires an error code' });
|
|
1763
|
+
if (job.status !== 'FAILED' && job.errorCode !== null)
|
|
1764
|
+
context.addIssue({
|
|
1765
|
+
code: 'custom',
|
|
1766
|
+
path: ['errorCode'],
|
|
1767
|
+
message: 'only failed publish jobs may have an error code'
|
|
1768
|
+
});
|
|
1769
|
+
});
|
|
1770
|
+
export const conversationTemplatePublishResultSchema = z
|
|
1771
|
+
.object({
|
|
1772
|
+
job: conversationTemplatePublishJobSchema,
|
|
1773
|
+
version: conversationTemplateVersionSchema.optional()
|
|
1774
|
+
})
|
|
1775
|
+
.strict()
|
|
1776
|
+
.superRefine((result, context) => {
|
|
1777
|
+
if (result.job.status === 'SUCCEEDED') {
|
|
1778
|
+
if (result.version === undefined ||
|
|
1779
|
+
result.version.id !== result.job.versionId ||
|
|
1780
|
+
result.version.templateId !== result.job.templateId ||
|
|
1781
|
+
result.version.status !== 'AVAILABLE')
|
|
1782
|
+
context.addIssue({
|
|
1783
|
+
code: 'custom',
|
|
1784
|
+
path: ['version'],
|
|
1785
|
+
message: 'successful publish result requires its registered version'
|
|
1786
|
+
});
|
|
1787
|
+
return;
|
|
1788
|
+
}
|
|
1789
|
+
if (result.version !== undefined)
|
|
1790
|
+
context.addIssue({
|
|
1791
|
+
code: 'custom',
|
|
1792
|
+
path: ['version'],
|
|
1793
|
+
message: 'unfinished publish result cannot include a version'
|
|
1794
|
+
});
|
|
1795
|
+
});
|
|
1796
|
+
export const hostedConversationStatusSchema = z.literal('ACTIVE');
|
|
1797
|
+
export const hostedConversationActivityStatusSchema = z.enum([
|
|
1798
|
+
'STARTING',
|
|
1799
|
+
'RUNNING',
|
|
1800
|
+
'CANCELLING',
|
|
1801
|
+
'IDLE'
|
|
1802
|
+
]);
|
|
1803
|
+
export const hostedConversationActivitySchema = z
|
|
1804
|
+
.object({
|
|
1805
|
+
status: hostedConversationActivityStatusSchema,
|
|
1806
|
+
version: z.number().int().nonnegative(),
|
|
1807
|
+
updatedAt: z.number().int().nonnegative()
|
|
1808
|
+
})
|
|
1809
|
+
.strict();
|
|
1810
|
+
export const hostedConversationActivityProjectionSchema = z
|
|
1811
|
+
.object({
|
|
1812
|
+
userId: z.number().int().positive(),
|
|
1813
|
+
templateId: protocolIdSchema,
|
|
1814
|
+
conversationId: protocolIdSchema,
|
|
1815
|
+
activity: hostedConversationActivitySchema
|
|
1816
|
+
})
|
|
1817
|
+
.strict();
|
|
1818
|
+
export const hostedConversationActivityMessageSchema = z
|
|
1819
|
+
.object({
|
|
1820
|
+
type: z.literal('hosted-conversation.activity'),
|
|
1821
|
+
nodeId: protocolIdSchema,
|
|
1822
|
+
conversationId: protocolIdSchema,
|
|
1823
|
+
activity: hostedConversationActivitySchema
|
|
1824
|
+
})
|
|
1825
|
+
.strict();
|
|
1826
|
+
const hostedConversationBaseObjectSchema = z
|
|
1827
|
+
.object({
|
|
1828
|
+
id: protocolIdSchema,
|
|
1829
|
+
nodeId: protocolIdSchema,
|
|
1830
|
+
sessionId: protocolIdSchema,
|
|
1831
|
+
templateId: protocolIdSchema,
|
|
1832
|
+
templateName: z.string().trim().min(1).max(128),
|
|
1833
|
+
activeVersionId: protocolIdSchema,
|
|
1834
|
+
title: z.string().trim().min(1).max(160),
|
|
1835
|
+
titleSource: z.enum(['DEFAULT', 'AUTO', 'CUSTOM']).default('CUSTOM'),
|
|
1836
|
+
pinnedAt: z.number().int().nonnegative().nullable(),
|
|
1837
|
+
status: hostedConversationStatusSchema,
|
|
1838
|
+
modelId: protocolIdSchema,
|
|
1839
|
+
createdAt: z.number().int().nonnegative(),
|
|
1840
|
+
updatedAt: z.number().int().nonnegative(),
|
|
1841
|
+
lastActivityAt: z.number().int().nonnegative()
|
|
1842
|
+
})
|
|
1843
|
+
.strict();
|
|
1844
|
+
export const hostedConversationSummarySchema = hostedConversationBaseObjectSchema
|
|
1845
|
+
.extend({
|
|
1846
|
+
activity: hostedConversationActivitySchema.default({
|
|
1847
|
+
status: 'IDLE',
|
|
1848
|
+
version: 0,
|
|
1849
|
+
updatedAt: 0
|
|
1850
|
+
})
|
|
1851
|
+
})
|
|
1852
|
+
.strict();
|
|
1853
|
+
export const hostedConversationManifestSchema = hostedConversationBaseObjectSchema
|
|
1854
|
+
.extend({
|
|
1855
|
+
userStorageKey: stableStorageKeySchema,
|
|
1856
|
+
conversationStorageKey: stableStorageKeySchema,
|
|
1857
|
+
clientRequestId: protocolIdSchema.optional(),
|
|
1858
|
+
templateDeleted: z.boolean(),
|
|
1859
|
+
quota: z
|
|
1860
|
+
.object({
|
|
1861
|
+
usedBytes: z.number().int().nonnegative(),
|
|
1862
|
+
maxBytes: z.number().int().positive()
|
|
1863
|
+
})
|
|
1864
|
+
.strict()
|
|
1865
|
+
})
|
|
1866
|
+
.strict()
|
|
1867
|
+
.superRefine((manifest, context) => {
|
|
1868
|
+
if (manifest.quota.usedBytes > manifest.quota.maxBytes)
|
|
1869
|
+
context.addIssue({ code: 'custom', path: ['quota'], message: 'quota is exceeded' });
|
|
1870
|
+
});
|
|
1871
|
+
export const conversationFileProjectionSchema = z
|
|
1872
|
+
.object({
|
|
1873
|
+
id: protocolIdSchema,
|
|
1874
|
+
conversationId: protocolIdSchema,
|
|
1875
|
+
category: z.enum(['UPLOAD', 'OUTPUT']),
|
|
1876
|
+
relativePath: conversationRelativePathSchema,
|
|
1877
|
+
displayName: z.string().trim().min(1).max(512),
|
|
1878
|
+
mimeType: z.string().trim().min(1).max(255),
|
|
1879
|
+
size: z.number().int().nonnegative(),
|
|
1880
|
+
source: z.enum(['USER', 'AGENT', 'SYSTEM']),
|
|
1881
|
+
turnId: protocolIdSchema.optional(),
|
|
1882
|
+
itemId: protocolIdSchema.optional(),
|
|
1883
|
+
createdAt: z.number().int().nonnegative(),
|
|
1884
|
+
updatedAt: z.number().int().nonnegative()
|
|
1885
|
+
})
|
|
1886
|
+
.strict();
|
|
1887
|
+
export const hostedConversationSnapshotSchema = z
|
|
1888
|
+
.object({
|
|
1889
|
+
nodeAppVersion: z.string().trim().min(1).max(128).optional(),
|
|
1890
|
+
conversation: hostedConversationSummarySchema,
|
|
1891
|
+
template: conversationTemplateSummarySchema,
|
|
1892
|
+
run: z
|
|
1893
|
+
.object({
|
|
1894
|
+
id: protocolIdSchema,
|
|
1895
|
+
status: agentRunStatusSchema,
|
|
1896
|
+
startedAt: z.number().int().nonnegative().nullable(),
|
|
1897
|
+
completedAt: z.number().int().nonnegative().nullable()
|
|
1898
|
+
})
|
|
1899
|
+
.strict()
|
|
1900
|
+
.nullable(),
|
|
1901
|
+
turns: z.array(conversationTurnSchema),
|
|
1902
|
+
files: z.array(conversationFileProjectionSchema),
|
|
1903
|
+
models: z.array(marAgentNodeModelSummarySchema),
|
|
1904
|
+
error: z
|
|
1905
|
+
.object({
|
|
1906
|
+
code: z.string().regex(/^[A-Z][A-Z0-9_]{0,79}$/),
|
|
1907
|
+
message: z.string().min(1).max(1000)
|
|
1908
|
+
})
|
|
1909
|
+
.strict()
|
|
1910
|
+
.nullable(),
|
|
1911
|
+
snapshotSequence: z.number().int().nonnegative()
|
|
1912
|
+
})
|
|
1913
|
+
.strict()
|
|
1914
|
+
.superRefine((snapshot, context) => {
|
|
1915
|
+
uniqueProtocolIds(snapshot.models.map((model) => model.id), context, ['models']);
|
|
1916
|
+
});
|
|
1917
|
+
export const hostedConversationCreateInputSchema = z
|
|
1918
|
+
.object({
|
|
1919
|
+
templateId: protocolIdSchema,
|
|
1920
|
+
clientRequestId: protocolIdSchema
|
|
1921
|
+
})
|
|
1922
|
+
.strict();
|
|
1923
|
+
export const hostedConversationListInputSchema = z
|
|
1924
|
+
.object({
|
|
1925
|
+
limit: z.number().int().min(1).max(100).default(20),
|
|
1926
|
+
cursor: z.string().min(1).max(2048).optional()
|
|
1927
|
+
})
|
|
1928
|
+
.strict();
|
|
1929
|
+
export const hostedConversationListPageSchema = z
|
|
1930
|
+
.object({
|
|
1931
|
+
items: z.array(hostedConversationSummarySchema).max(100),
|
|
1932
|
+
nextCursor: z.string().min(1).max(2048).nullable()
|
|
1933
|
+
})
|
|
1934
|
+
.strict();
|
|
1935
|
+
export const hostedConversationDirectoryPageSchema = z
|
|
1936
|
+
.object({
|
|
1937
|
+
items: z.array(hostedConversationSummarySchema),
|
|
1938
|
+
nextCursor: z.string().min(1).max(2048).nullable()
|
|
1939
|
+
})
|
|
1940
|
+
.strict();
|
|
1941
|
+
export const hostedConversationIdInputSchema = z
|
|
1942
|
+
.object({
|
|
1943
|
+
conversationId: protocolIdSchema
|
|
1944
|
+
})
|
|
1945
|
+
.strict();
|
|
1946
|
+
export const hostedConversationRollbackInputSchema = hostedConversationIdInputSchema
|
|
1947
|
+
.extend({
|
|
1948
|
+
turnId: z.string().min(1).max(128),
|
|
1949
|
+
boundary: z.string().min(1).max(256).nullable()
|
|
1950
|
+
})
|
|
1951
|
+
.strict();
|
|
1952
|
+
export const hostedConversationImageReadInputSchema = hostedConversationIdInputSchema
|
|
1953
|
+
.extend({
|
|
1954
|
+
runId: protocolIdSchema,
|
|
1955
|
+
imageIndex: z.number().int().nonnegative()
|
|
1956
|
+
})
|
|
1957
|
+
.strict();
|
|
1958
|
+
export const hostedConversationDeleteResultSchema = z
|
|
1959
|
+
.object({
|
|
1960
|
+
deletedConversationId: protocolIdSchema
|
|
1961
|
+
})
|
|
1962
|
+
.strict();
|
|
1963
|
+
export const hostedConversationMessageInputSchema = z
|
|
1964
|
+
.object({
|
|
1965
|
+
conversationId: protocolIdSchema,
|
|
1966
|
+
clientMessageId: protocolIdSchema,
|
|
1967
|
+
prompt: z.string().max(100_000),
|
|
1968
|
+
attachmentIds: z.array(protocolIdSchema).max(32).default([]),
|
|
1969
|
+
modelId: protocolIdSchema.optional()
|
|
1970
|
+
})
|
|
1971
|
+
.strict()
|
|
1972
|
+
.superRefine((input, context) => {
|
|
1973
|
+
if (input.prompt.trim().length === 0 && input.attachmentIds.length === 0)
|
|
1974
|
+
context.addIssue({ code: 'custom', message: 'message requires text or attachments' });
|
|
1975
|
+
uniqueProtocolIds(input.attachmentIds, context, ['attachmentIds']);
|
|
1976
|
+
});
|
|
1977
|
+
export const hostedConversationConfigUpdateInputSchema = z
|
|
1978
|
+
.object({
|
|
1979
|
+
conversationId: protocolIdSchema,
|
|
1980
|
+
modelId: protocolIdSchema
|
|
1981
|
+
})
|
|
1982
|
+
.strict();
|
|
1983
|
+
export const hostedConversationMetadataUpdateInputSchema = z
|
|
1984
|
+
.object({
|
|
1985
|
+
conversationId: protocolIdSchema,
|
|
1986
|
+
title: z.string().trim().min(1).max(160).optional(),
|
|
1987
|
+
pinned: z.boolean().optional()
|
|
1988
|
+
})
|
|
1989
|
+
.strict()
|
|
1990
|
+
.superRefine((input, context) => {
|
|
1991
|
+
if (input.title === undefined && input.pinned === undefined)
|
|
1992
|
+
context.addIssue({ code: 'custom', message: 'metadata update requires a change' });
|
|
1993
|
+
});
|
|
1994
|
+
export const hostedConversationWatchInputSchema = z
|
|
1995
|
+
.object({
|
|
1996
|
+
conversationId: protocolIdSchema,
|
|
1997
|
+
mode: z.enum(['initial', 'renew']),
|
|
1998
|
+
workbenchConnectionId: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/),
|
|
1999
|
+
watchId: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/)
|
|
2000
|
+
})
|
|
2001
|
+
.strict();
|
|
2002
|
+
export const hostedConversationUnwatchInputSchema = z
|
|
2003
|
+
.object({
|
|
2004
|
+
conversationId: protocolIdSchema,
|
|
2005
|
+
workbenchConnectionId: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/),
|
|
2006
|
+
watchId: z.string().regex(/^[A-Za-z0-9_-]{8,128}$/)
|
|
2007
|
+
})
|
|
2008
|
+
.strict();
|
|
2009
|
+
const hostedConversationUploadFileSchema = z
|
|
2010
|
+
.object({
|
|
2011
|
+
name: z
|
|
2012
|
+
.string()
|
|
2013
|
+
.trim()
|
|
2014
|
+
.min(1)
|
|
2015
|
+
.max(512)
|
|
2016
|
+
.refine((name) => name !== '.' &&
|
|
2017
|
+
name !== '..' &&
|
|
2018
|
+
!name.includes('/') &&
|
|
2019
|
+
!name.includes('\\') &&
|
|
2020
|
+
!name.includes('\0'), 'upload name is invalid'),
|
|
2021
|
+
size: z.number().int().nonnegative(),
|
|
2022
|
+
mimeType: z.string().trim().min(1).max(255)
|
|
2023
|
+
})
|
|
2024
|
+
.strict();
|
|
2025
|
+
export const hostedConversationFilesSchema = z
|
|
2026
|
+
.object({
|
|
2027
|
+
files: z.array(conversationFileProjectionSchema)
|
|
2028
|
+
})
|
|
2029
|
+
.strict();
|
|
2030
|
+
export const hostedConversationFileReadInputSchema = hostedConversationIdInputSchema
|
|
2031
|
+
.extend({
|
|
2032
|
+
fileId: protocolIdSchema,
|
|
2033
|
+
offset: z.number().int().nonnegative().optional(),
|
|
2034
|
+
limit: z
|
|
2035
|
+
.number()
|
|
2036
|
+
.int()
|
|
2037
|
+
.min(1)
|
|
2038
|
+
.max(512 * 1024)
|
|
2039
|
+
.optional()
|
|
2040
|
+
})
|
|
2041
|
+
.strict();
|
|
2042
|
+
export const hostedConversationFileDeleteInputSchema = hostedConversationIdInputSchema
|
|
2043
|
+
.extend({
|
|
2044
|
+
fileId: protocolIdSchema
|
|
2045
|
+
})
|
|
2046
|
+
.strict();
|
|
2047
|
+
export const hostedConversationFileDeleteResultSchema = z
|
|
2048
|
+
.object({
|
|
2049
|
+
deletedFileId: protocolIdSchema,
|
|
2050
|
+
files: z.array(conversationFileProjectionSchema)
|
|
2051
|
+
})
|
|
2052
|
+
.strict()
|
|
2053
|
+
.superRefine((result, context) => {
|
|
2054
|
+
uniqueProtocolIds(result.files.map((file) => file.id), context, ['files']);
|
|
2055
|
+
if (result.files.some((file) => file.id === result.deletedFileId))
|
|
2056
|
+
context.addIssue({
|
|
2057
|
+
code: 'custom',
|
|
2058
|
+
path: ['files'],
|
|
2059
|
+
message: 'deleted file cannot remain projected'
|
|
2060
|
+
});
|
|
2061
|
+
});
|
|
2062
|
+
export const hostedConversationFileReadResultSchema = z
|
|
2063
|
+
.object({
|
|
2064
|
+
file: conversationFileProjectionSchema,
|
|
2065
|
+
encoding: z.literal('base64'),
|
|
2066
|
+
content: z.string().max(Math.ceil((512 * 1024 * 4) / 3) + 4),
|
|
2067
|
+
offset: z.number().int().nonnegative(),
|
|
2068
|
+
nextOffset: z.number().int().nonnegative().nullable(),
|
|
2069
|
+
eof: z.boolean()
|
|
2070
|
+
})
|
|
2071
|
+
.strict()
|
|
2072
|
+
.superRefine((result, context) => {
|
|
2073
|
+
if (!canonicalBase64(result.content))
|
|
2074
|
+
context.addIssue({ code: 'custom', path: ['content'], message: 'file content is invalid' });
|
|
2075
|
+
if (result.nextOffset !== null && result.nextOffset <= result.offset)
|
|
2076
|
+
context.addIssue({
|
|
2077
|
+
code: 'custom',
|
|
2078
|
+
path: ['nextOffset'],
|
|
2079
|
+
message: 'next offset must advance'
|
|
2080
|
+
});
|
|
2081
|
+
});
|
|
2082
|
+
export const hostedConversationUploadPreflightInputSchema = hostedConversationIdInputSchema
|
|
2083
|
+
.extend({
|
|
2084
|
+
files: z.array(hostedConversationUploadFileSchema).min(1).max(32)
|
|
2085
|
+
})
|
|
2086
|
+
.strict()
|
|
2087
|
+
.superRefine((input, context) => {
|
|
2088
|
+
const normalized = input.files.map((file) => file.name.normalize('NFKC').toLocaleLowerCase());
|
|
2089
|
+
if (new Set(normalized).size !== normalized.length)
|
|
2090
|
+
context.addIssue({ code: 'custom', path: ['files'], message: 'upload names must be unique' });
|
|
2091
|
+
});
|
|
2092
|
+
export const hostedConversationUploadPreflightResultSchema = z
|
|
2093
|
+
.object({
|
|
2094
|
+
files: z.array(z
|
|
2095
|
+
.object({
|
|
2096
|
+
name: hostedConversationUploadFileSchema.shape.name,
|
|
2097
|
+
status: z.enum(['READY', 'INVALID_NAME', 'TOO_LARGE', 'QUOTA_EXCEEDED', 'CONFLICT'])
|
|
2098
|
+
})
|
|
2099
|
+
.strict())
|
|
2100
|
+
})
|
|
2101
|
+
.strict();
|
|
2102
|
+
export const hostedConversationUploadCreateInputSchema = hostedConversationUploadFileSchema
|
|
2103
|
+
.extend({
|
|
2104
|
+
conversationId: protocolIdSchema,
|
|
2105
|
+
clientRequestId: protocolIdSchema
|
|
2106
|
+
})
|
|
2107
|
+
.strict();
|
|
2108
|
+
export const hostedConversationUploadChunkInputSchema = hostedConversationIdInputSchema
|
|
2109
|
+
.extend({
|
|
2110
|
+
uploadId: protocolIdSchema,
|
|
2111
|
+
offset: z.number().int().nonnegative(),
|
|
2112
|
+
dataBase64: z
|
|
2113
|
+
.string()
|
|
2114
|
+
.min(4)
|
|
2115
|
+
.max(Math.ceil((512 * 1024 * 4) / 3) + 4)
|
|
2116
|
+
.refine((value) => canonicalBase64(value) && base64DecodedByteLength(value) <= 512 * 1024, 'upload chunk is invalid')
|
|
2117
|
+
})
|
|
2118
|
+
.strict();
|
|
2119
|
+
export const hostedConversationUploadControlInputSchema = hostedConversationIdInputSchema
|
|
2120
|
+
.extend({
|
|
2121
|
+
uploadId: protocolIdSchema
|
|
2122
|
+
})
|
|
2123
|
+
.strict();
|
|
2124
|
+
export const hostedConversationUploadSchema = z
|
|
2125
|
+
.object({
|
|
2126
|
+
uploadId: protocolIdSchema,
|
|
2127
|
+
conversationId: protocolIdSchema,
|
|
2128
|
+
name: hostedConversationUploadFileSchema.shape.name,
|
|
2129
|
+
mimeType: hostedConversationUploadFileSchema.shape.mimeType,
|
|
2130
|
+
receivedBytes: z.number().int().nonnegative(),
|
|
2131
|
+
size: z.number().int().nonnegative(),
|
|
2132
|
+
status: z.enum(['UPLOADING', 'COMPLETED', 'CANCELLED']),
|
|
2133
|
+
file: conversationFileProjectionSchema.optional()
|
|
2134
|
+
})
|
|
2135
|
+
.strict()
|
|
2136
|
+
.superRefine((upload, context) => {
|
|
2137
|
+
if (upload.receivedBytes > upload.size)
|
|
2138
|
+
context.addIssue({
|
|
2139
|
+
code: 'custom',
|
|
2140
|
+
path: ['receivedBytes'],
|
|
2141
|
+
message: 'received bytes exceed upload size'
|
|
2142
|
+
});
|
|
2143
|
+
if (upload.status === 'COMPLETED' && upload.file === undefined)
|
|
2144
|
+
context.addIssue({
|
|
2145
|
+
code: 'custom',
|
|
2146
|
+
path: ['file'],
|
|
2147
|
+
message: 'completed upload requires a file'
|
|
2148
|
+
});
|
|
2149
|
+
if (upload.status !== 'COMPLETED' && upload.file !== undefined)
|
|
2150
|
+
context.addIssue({
|
|
2151
|
+
code: 'custom',
|
|
2152
|
+
path: ['file'],
|
|
2153
|
+
message: 'unfinished upload cannot include a file'
|
|
2154
|
+
});
|
|
2155
|
+
});
|
|
2156
|
+
export const conversationSegmentSchema = z.object({
|
|
2157
|
+
id: z.string().min(1).max(256),
|
|
2158
|
+
sessionId: z.string().min(1).max(128),
|
|
2159
|
+
turnId: z.string().min(1).max(128),
|
|
2160
|
+
runId: z.string().min(1).max(128).nullable(),
|
|
2161
|
+
index: z.number().int().nonnegative(),
|
|
2162
|
+
status: conversationTurnSchema.shape.status,
|
|
2163
|
+
rewind: conversationTurnSchema.shape.rewind,
|
|
2164
|
+
items: z.array(conversationItemSchema),
|
|
2165
|
+
startedAt: z.number().int().nonnegative().nullable(),
|
|
2166
|
+
completedAt: z.number().int().nonnegative().nullable()
|
|
2167
|
+
});
|
|
2168
|
+
export const conversationSegmentPageSchema = z.object({
|
|
2169
|
+
unit: z.literal('SEGMENT'),
|
|
2170
|
+
segments: z.array(conversationSegmentSchema),
|
|
2171
|
+
nextCursor: z.string().max(4096).nullable(),
|
|
2172
|
+
snapshotSequence: z.number().int().nonnegative(),
|
|
2173
|
+
source: z.enum(['official', 'native', 'runtime']),
|
|
2174
|
+
readAt: z.number().int().nonnegative(),
|
|
2175
|
+
latestVisibleAt: z.number().int().nonnegative(),
|
|
2176
|
+
deferredOlderHistory: z.boolean().optional()
|
|
2177
|
+
});
|
|
2178
|
+
export const conversationItemDeltaSchema = z.discriminatedUnion('kind', [
|
|
2179
|
+
z.object({
|
|
2180
|
+
kind: z.literal('assistant_text_append'),
|
|
2181
|
+
itemId: z.string().min(1).max(128),
|
|
2182
|
+
itemRevision: z.number().int().nonnegative(),
|
|
2183
|
+
text: z.string()
|
|
2184
|
+
}),
|
|
2185
|
+
z.object({
|
|
2186
|
+
kind: z.literal('plan_replace'),
|
|
2187
|
+
itemId: z.string().min(1).max(128),
|
|
2188
|
+
itemRevision: z.number().int().nonnegative(),
|
|
2189
|
+
steps: z.array(z.object({
|
|
2190
|
+
id: z.string(),
|
|
2191
|
+
text: z.string(),
|
|
2192
|
+
status: z.enum(['PENDING', 'IN_PROGRESS', 'COMPLETED'])
|
|
2193
|
+
}))
|
|
2194
|
+
}),
|
|
2195
|
+
z.object({
|
|
2196
|
+
kind: z.literal('tool_progress_replace'),
|
|
2197
|
+
itemId: z.string().min(1).max(128),
|
|
2198
|
+
itemRevision: z.number().int().nonnegative(),
|
|
2199
|
+
label: z.string().max(500)
|
|
2200
|
+
})
|
|
2201
|
+
]);
|
|
2202
|
+
export const terminalDataFrameSchema = z.discriminatedUnion('type', [
|
|
2203
|
+
z.object({
|
|
2204
|
+
type: z.literal('attach'),
|
|
2205
|
+
terminalId: z.string().min(1).max(128),
|
|
2206
|
+
afterSequence: z.number().int().nonnegative()
|
|
2207
|
+
}),
|
|
2208
|
+
z.object({
|
|
2209
|
+
type: z.literal('resize'),
|
|
2210
|
+
terminalId: z.string().min(1).max(128),
|
|
2211
|
+
rows: z.number().int().positive().max(1000),
|
|
2212
|
+
cols: z.number().int().positive().max(1000)
|
|
2213
|
+
}),
|
|
2214
|
+
z.object({
|
|
2215
|
+
type: z.literal('input'),
|
|
2216
|
+
terminalId: z.string().min(1).max(128),
|
|
2217
|
+
data: z.string().max(65536)
|
|
2218
|
+
}),
|
|
2219
|
+
z.object({
|
|
2220
|
+
type: z.literal('output'),
|
|
2221
|
+
terminalId: z.string().min(1).max(128),
|
|
2222
|
+
sequence: z.number().int().positive(),
|
|
2223
|
+
data: z.string().max(65536)
|
|
2224
|
+
}),
|
|
2225
|
+
z.object({ type: z.literal('close'), terminalId: z.string().min(1).max(128) }),
|
|
2226
|
+
z.object({
|
|
2227
|
+
type: z.literal('exit'),
|
|
2228
|
+
terminalId: z.string().min(1).max(128),
|
|
2229
|
+
exitCode: z.number().int().nullable()
|
|
2230
|
+
}),
|
|
2231
|
+
z.object({
|
|
2232
|
+
type: z.literal('error'),
|
|
2233
|
+
terminalId: z.string().min(1).max(128),
|
|
2234
|
+
code: z.string().min(1).max(80)
|
|
2235
|
+
})
|
|
2236
|
+
]);
|
|
2237
|
+
export const terminalAttachTicketSchema = z
|
|
2238
|
+
.object({
|
|
2239
|
+
ticket: z.string().min(32).max(512),
|
|
2240
|
+
nodeId: z.string().min(1).max(128),
|
|
2241
|
+
terminalId: z.string().min(1).max(128),
|
|
2242
|
+
userSessionFingerprint: z.string().min(1).max(128),
|
|
2243
|
+
issuedAt: z.number().int().nonnegative(),
|
|
2244
|
+
expiresAt: z.number().int().positive()
|
|
2245
|
+
})
|
|
2246
|
+
.superRefine((value, context) => {
|
|
2247
|
+
if (value.expiresAt <= value.issuedAt) {
|
|
2248
|
+
context.addIssue({ code: 'custom', message: 'terminal ticket expiry must follow issuance' });
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
export const workspaceFileEntrySchema = z.object({
|
|
2252
|
+
path: z.string().min(1).max(4096),
|
|
2253
|
+
name: z.string().min(1).max(512),
|
|
2254
|
+
kind: z.enum(['FILE', 'DIRECTORY']),
|
|
2255
|
+
size: z.number().int().nonnegative().nullable(),
|
|
2256
|
+
modifiedAt: z.number().int().nonnegative().nullable()
|
|
2257
|
+
});
|
|
2258
|
+
export const workspaceFileListSchema = z.object({
|
|
2259
|
+
entries: z.array(workspaceFileEntrySchema),
|
|
2260
|
+
nextCursor: z.string().min(1).max(1024).nullable(),
|
|
2261
|
+
truncated: z.boolean()
|
|
2262
|
+
});
|
|
2263
|
+
export const workspaceContentMatchSchema = z.object({
|
|
2264
|
+
path: z.string().min(1).max(4096),
|
|
2265
|
+
line: z.number().int().positive(),
|
|
2266
|
+
column: z.number().int().positive(),
|
|
2267
|
+
preview: z.string().max(8192)
|
|
2268
|
+
});
|
|
2269
|
+
export const workspaceContentSearchSchema = z.object({
|
|
2270
|
+
matches: z.array(workspaceContentMatchSchema).max(200),
|
|
2271
|
+
engine: z.enum(['RIPGREP', 'GREP', 'POWERSHELL', 'NODE']),
|
|
2272
|
+
truncated: z.boolean(),
|
|
2273
|
+
skippedFiles: z.number().int().nonnegative()
|
|
2274
|
+
});
|
|
2275
|
+
export const workspaceFileReadSchema = z.object({
|
|
2276
|
+
path: z.string().min(1).max(4096),
|
|
2277
|
+
encoding: z.enum(['utf-8', 'base64']),
|
|
2278
|
+
size: z.number().int().nonnegative(),
|
|
2279
|
+
content: z.string(),
|
|
2280
|
+
truncated: z.boolean(),
|
|
2281
|
+
nextOffset: z.number().int().nonnegative().nullable()
|
|
2282
|
+
});
|
|
2283
|
+
export const workspaceUploadPreflightSchema = z.object({
|
|
2284
|
+
name: z.string().min(1).max(512),
|
|
2285
|
+
status: z.enum(['READY', 'EXISTS_FILE', 'EXISTS_DIRECTORY', 'INVALID_NAME']),
|
|
2286
|
+
path: z.string().min(1).max(4096).nullable()
|
|
2287
|
+
});
|
|
2288
|
+
export const workspaceUploadSchema = z.object({
|
|
2289
|
+
uploadId: z.string().uuid(),
|
|
2290
|
+
path: z.string().min(1).max(4096),
|
|
2291
|
+
receivedBytes: z.number().int().nonnegative(),
|
|
2292
|
+
size: z.number().int().nonnegative()
|
|
2293
|
+
});
|
|
2294
|
+
export const workspaceChangeSchema = z.object({
|
|
2295
|
+
path: z.string().min(1).max(4096),
|
|
2296
|
+
state: z.enum(['STAGED', 'UNSTAGED', 'UNTRACKED']),
|
|
2297
|
+
change: z.enum(['ADDED', 'MODIFIED', 'DELETED', 'RENAMED', 'COPIED', 'TYPE_CHANGED']),
|
|
2298
|
+
additions: z.number().int().nonnegative().nullable(),
|
|
2299
|
+
deletions: z.number().int().nonnegative().nullable(),
|
|
2300
|
+
binary: z.boolean(),
|
|
2301
|
+
diffAvailable: z.boolean()
|
|
2302
|
+
});
|
|
2303
|
+
export const workspaceGitWorktreeSummarySchema = z
|
|
2304
|
+
.object({
|
|
2305
|
+
directoryName: z.string().trim().min(1).max(512),
|
|
2306
|
+
branch: z.string().min(1).max(512).nullable(),
|
|
2307
|
+
head: z.string().regex(/^[0-9a-f]{40,64}$/),
|
|
2308
|
+
current: z.boolean(),
|
|
2309
|
+
status: z.enum(['CLEAN', 'DIRTY', 'UNAVAILABLE']),
|
|
2310
|
+
locked: z.boolean(),
|
|
2311
|
+
prunable: z.boolean()
|
|
2312
|
+
})
|
|
2313
|
+
.strict();
|
|
2314
|
+
export const workspaceChangesRepositorySchema = z
|
|
2315
|
+
.object({
|
|
2316
|
+
repositoryPath: z.string().max(4096),
|
|
2317
|
+
repositoryName: z.string().min(1).max(512),
|
|
2318
|
+
source: z.enum(['ROOT', 'SUBMODULE', 'WORKTREE']).optional(),
|
|
2319
|
+
worktreePath: z.string().min(1).max(4096).optional(),
|
|
2320
|
+
physicalPath: z.string().min(1).max(4096).optional(),
|
|
2321
|
+
current: z.boolean().optional(),
|
|
2322
|
+
branch: z.string().max(512).nullable(),
|
|
2323
|
+
head: z
|
|
2324
|
+
.string()
|
|
2325
|
+
.regex(/^[0-9a-f]{40,64}$/)
|
|
2326
|
+
.optional(),
|
|
2327
|
+
status: z.enum(['CLEAN', 'DIRTY', 'UNAVAILABLE']).optional(),
|
|
2328
|
+
locked: z.boolean().optional(),
|
|
2329
|
+
prunable: z.boolean().optional(),
|
|
2330
|
+
error: z.lazy(() => publicErrorSchema).optional(),
|
|
2331
|
+
changes: z.array(workspaceChangeSchema)
|
|
2332
|
+
})
|
|
2333
|
+
.superRefine((repository, context) => {
|
|
2334
|
+
if (repository.source === undefined)
|
|
2335
|
+
return;
|
|
2336
|
+
if (repository.source === 'SUBMODULE') {
|
|
2337
|
+
if (repository.repositoryPath.length === 0 || repository.worktreePath !== undefined)
|
|
2338
|
+
context.addIssue({ code: 'custom', message: 'Invalid submodule repository target' });
|
|
2339
|
+
return;
|
|
2340
|
+
}
|
|
2341
|
+
if (repository.repositoryPath.length !== 0 ||
|
|
2342
|
+
repository.physicalPath === undefined ||
|
|
2343
|
+
repository.current === undefined ||
|
|
2344
|
+
repository.status === undefined ||
|
|
2345
|
+
repository.locked === undefined ||
|
|
2346
|
+
repository.prunable === undefined)
|
|
2347
|
+
context.addIssue({ code: 'custom', message: 'Incomplete worktree repository metadata' });
|
|
2348
|
+
if (repository.source === 'ROOT') {
|
|
2349
|
+
if (repository.worktreePath !== undefined || repository.current !== true)
|
|
2350
|
+
context.addIssue({ code: 'custom', message: 'Invalid root repository target' });
|
|
2351
|
+
return;
|
|
2352
|
+
}
|
|
2353
|
+
if (repository.worktreePath === undefined ||
|
|
2354
|
+
repository.current !== false ||
|
|
2355
|
+
repository.head === undefined)
|
|
2356
|
+
context.addIssue({ code: 'custom', message: 'Invalid linked worktree repository target' });
|
|
2357
|
+
});
|
|
2358
|
+
export const workspaceChangesSummarySchema = z.object({
|
|
2359
|
+
branch: z.string().max(512).nullable(),
|
|
2360
|
+
changes: z.array(workspaceChangeSchema),
|
|
2361
|
+
repositories: z.array(workspaceChangesRepositorySchema),
|
|
2362
|
+
worktrees: z.array(workspaceGitWorktreeSummarySchema).max(128).optional(),
|
|
2363
|
+
worktreesTruncated: z.boolean().optional(),
|
|
2364
|
+
partial: z.boolean().optional(),
|
|
2365
|
+
errors: z
|
|
2366
|
+
.array(z.lazy(() => publicErrorSchema))
|
|
2367
|
+
.max(16)
|
|
2368
|
+
.optional()
|
|
2369
|
+
});
|
|
2370
|
+
export const gitHistoryRefSchema = z.object({
|
|
2371
|
+
name: z.string().min(1).max(512),
|
|
2372
|
+
displayName: z.string().min(1).max(512),
|
|
2373
|
+
kind: z.enum(['LOCAL', 'REMOTE']),
|
|
2374
|
+
hash: z.string().regex(/^[0-9a-f]{40,64}$/),
|
|
2375
|
+
current: z.boolean()
|
|
2376
|
+
});
|
|
2377
|
+
export const gitHistoryCommitSchema = z.object({
|
|
2378
|
+
hash: z.string().regex(/^[0-9a-f]{40,64}$/),
|
|
2379
|
+
parents: z.array(z.string().regex(/^[0-9a-f]{40,64}$/)),
|
|
2380
|
+
subject: z.string().max(4096),
|
|
2381
|
+
authorName: z.string().max(512),
|
|
2382
|
+
authorEmail: z.string().max(512),
|
|
2383
|
+
committedAt: z.number().int().nonnegative(),
|
|
2384
|
+
refs: z.array(z.string().min(1).max(512))
|
|
2385
|
+
});
|
|
2386
|
+
export const gitHistoryFileSchema = z.object({
|
|
2387
|
+
path: z.string().min(1).max(4096),
|
|
2388
|
+
previousPath: z.string().min(1).max(4096).optional(),
|
|
2389
|
+
change: z.enum(['ADDED', 'MODIFIED', 'DELETED', 'RENAMED', 'COPIED', 'TYPE_CHANGED'])
|
|
2390
|
+
});
|
|
2391
|
+
export const workbenchNodeOperationSchema = z.enum([
|
|
2392
|
+
'workspace.git.settings.get',
|
|
2393
|
+
'workspace.git.settings.update',
|
|
2394
|
+
'node.workbench.capabilities',
|
|
2395
|
+
'runner.usage.status',
|
|
2396
|
+
'runner.usage.read',
|
|
2397
|
+
'workspace.directories.list',
|
|
2398
|
+
'workspace.remove',
|
|
2399
|
+
'workspace.watch',
|
|
2400
|
+
'workspace.unwatch',
|
|
2401
|
+
'session.unwatch',
|
|
2402
|
+
'session.metadata.update',
|
|
2403
|
+
'session.pin.move',
|
|
2404
|
+
'session.rewind',
|
|
2405
|
+
'session.rollback',
|
|
2406
|
+
'session.remove',
|
|
2407
|
+
'workspace.sessions.cleanup',
|
|
2408
|
+
'session.config.update',
|
|
2409
|
+
'session.turns.list',
|
|
2410
|
+
'session.events.read',
|
|
2411
|
+
'session.context.read',
|
|
2412
|
+
'session.command.execute',
|
|
2413
|
+
'runner.command.execute',
|
|
2414
|
+
'runner.profiles.list',
|
|
2415
|
+
'runner.defaults.save',
|
|
2416
|
+
'mar-agent.model.test',
|
|
2417
|
+
'workspace.files.list',
|
|
2418
|
+
'workspace.file.read',
|
|
2419
|
+
'workspace.file.write',
|
|
2420
|
+
'workspace.file.content.read',
|
|
2421
|
+
'workspace.files.search',
|
|
2422
|
+
'workspace.files.mutate',
|
|
2423
|
+
'workspace.content.search',
|
|
2424
|
+
'workspace.files.upload.preflight',
|
|
2425
|
+
'workspace.files.upload.create',
|
|
2426
|
+
'workspace.files.upload.chunk',
|
|
2427
|
+
'workspace.files.upload.status',
|
|
2428
|
+
'workspace.files.upload.complete',
|
|
2429
|
+
'workspace.files.upload.cancel',
|
|
2430
|
+
'workspace.changes.current',
|
|
2431
|
+
'workspace.change.diff',
|
|
2432
|
+
'workspace.change.restore',
|
|
2433
|
+
'workspace.git.refs.list',
|
|
2434
|
+
'workspace.git.history.list',
|
|
2435
|
+
'workspace.git.commit.files',
|
|
2436
|
+
'workspace.git.commit.file.diff',
|
|
2437
|
+
'workspace.git.commit.file.content.read',
|
|
2438
|
+
'run.image.read',
|
|
2439
|
+
'terminal.open',
|
|
2440
|
+
'terminal.list',
|
|
2441
|
+
'terminal.close',
|
|
2442
|
+
'terminal.attach.authorize',
|
|
2443
|
+
'node.upgrade.request',
|
|
2444
|
+
'node.upgrade.cancel',
|
|
2445
|
+
'node.skills.inspect',
|
|
2446
|
+
'node.skills.install',
|
|
2447
|
+
'node.skills.remove',
|
|
2448
|
+
'workspace.skills.inspect',
|
|
2449
|
+
'workspace.skills.install',
|
|
2450
|
+
'workspace.skills.remove',
|
|
2451
|
+
'workspace.skills.git-exclude-repair',
|
|
2452
|
+
'skill.install.job.get',
|
|
2453
|
+
'node.mcps.inspect',
|
|
2454
|
+
'node.mcps.install',
|
|
2455
|
+
'node.mcps.remove',
|
|
2456
|
+
'workspace.mcps.inspect',
|
|
2457
|
+
'workspace.mcps.install',
|
|
2458
|
+
'workspace.mcps.remove',
|
|
2459
|
+
'conversation.template.source.inspect',
|
|
2460
|
+
'conversation.template.publish',
|
|
2461
|
+
'conversation.template.publish.status',
|
|
2462
|
+
'conversation.template.version.inspect',
|
|
2463
|
+
'conversation.hosting.enable',
|
|
2464
|
+
'conversation.hosting.disable',
|
|
2465
|
+
'conversation.hosting.storage.inspect',
|
|
2466
|
+
'conversation.hosting.cleanup.preview',
|
|
2467
|
+
'conversation.hosting.cleanup.execute',
|
|
2468
|
+
'conversation.hosted.list',
|
|
2469
|
+
'conversation.hosted.create',
|
|
2470
|
+
'conversation.hosted.get',
|
|
2471
|
+
'conversation.hosted.watch',
|
|
2472
|
+
'conversation.hosted.unwatch',
|
|
2473
|
+
'conversation.hosted.message',
|
|
2474
|
+
'conversation.hosted.rollback',
|
|
2475
|
+
'conversation.hosted.interrupt',
|
|
2476
|
+
'conversation.hosted.config.update',
|
|
2477
|
+
'conversation.hosted.metadata.update',
|
|
2478
|
+
'conversation.hosted.image.read',
|
|
2479
|
+
'conversation.hosted.files.list',
|
|
2480
|
+
'conversation.hosted.file.read',
|
|
2481
|
+
'conversation.hosted.file.delete',
|
|
2482
|
+
'conversation.hosted.files.upload.preflight',
|
|
2483
|
+
'conversation.hosted.files.upload.create',
|
|
2484
|
+
'conversation.hosted.files.upload.chunk',
|
|
2485
|
+
'conversation.hosted.files.upload.status',
|
|
2486
|
+
'conversation.hosted.files.upload.complete',
|
|
2487
|
+
'conversation.hosted.files.upload.cancel',
|
|
2488
|
+
'conversation.hosted.delete'
|
|
2489
|
+
]);
|
|
2490
|
+
/**
|
|
2491
|
+
* A small, explicit envelope keeps WebSocket messages independently parseable
|
|
2492
|
+
* and makes it safe to reject future message kinds without guessing payloads.
|
|
2493
|
+
*/
|
|
2494
|
+
export const nodeEnvelopeSchema = z.object({
|
|
2495
|
+
version: z.literal(NODE_PROTOCOL_VERSION),
|
|
2496
|
+
id: z.string().min(1).max(128),
|
|
2497
|
+
type: z.string().min(1).max(80),
|
|
2498
|
+
replyTo: z.string().min(1).max(128).optional(),
|
|
2499
|
+
payload: z.unknown()
|
|
2500
|
+
});
|
|
2501
|
+
const PUBLIC_ERROR_CODE = /^[A-Z][A-Z0-9_]{0,127}$/u;
|
|
2502
|
+
const publicErrorTextSchema = z.string().trim().min(1).max(1_000);
|
|
2503
|
+
const publicErrorParameterKeySchema = z.string().trim().min(1).max(128);
|
|
2504
|
+
const publicErrorParametersSchema = z
|
|
2505
|
+
.record(publicErrorParameterKeySchema, z.union([z.string().max(1_000), z.number().finite()]))
|
|
2506
|
+
.superRefine((parameters, context) => {
|
|
2507
|
+
if (Object.keys(parameters).length > 32)
|
|
2508
|
+
context.addIssue({ code: 'custom', message: 'too many public error parameters' });
|
|
2509
|
+
});
|
|
2510
|
+
export const publicErrorSchema = z
|
|
2511
|
+
.object({
|
|
2512
|
+
code: z.string().regex(PUBLIC_ERROR_CODE),
|
|
2513
|
+
message: publicErrorTextSchema,
|
|
2514
|
+
details: publicErrorTextSchema.optional(),
|
|
2515
|
+
parameters: publicErrorParametersSchema.optional()
|
|
2516
|
+
})
|
|
2517
|
+
.strict();
|
|
2518
|
+
export const nodeResponseErrorPayloadSchema = z
|
|
2519
|
+
.object({
|
|
2520
|
+
error: z.string().regex(PUBLIC_ERROR_CODE),
|
|
2521
|
+
message: publicErrorTextSchema.optional(),
|
|
2522
|
+
details: publicErrorTextSchema.optional(),
|
|
2523
|
+
parameters: publicErrorParametersSchema.optional()
|
|
2524
|
+
})
|
|
2525
|
+
.strict();
|
|
2526
|
+
export const httpErrorResponseSchema = z
|
|
2527
|
+
.object({
|
|
2528
|
+
error: publicErrorSchema
|
|
2529
|
+
.extend({
|
|
2530
|
+
requestId: z.string().min(1).max(128),
|
|
2531
|
+
upstreamRequestId: z.string().min(1).max(128).optional()
|
|
2532
|
+
})
|
|
2533
|
+
.strict()
|
|
2534
|
+
})
|
|
2535
|
+
.strict();
|
|
2536
|
+
const ERROR_SUBJECT_WORDS = {
|
|
2537
|
+
API: 'API',
|
|
2538
|
+
APP: 'app',
|
|
2539
|
+
CLI: 'CLI',
|
|
2540
|
+
CODEX: 'Codex',
|
|
2541
|
+
CSRF: 'CSRF',
|
|
2542
|
+
GIT: 'Git',
|
|
2543
|
+
HTTP: 'HTTP',
|
|
2544
|
+
HTTPS: 'HTTPS',
|
|
2545
|
+
ID: 'ID',
|
|
2546
|
+
JSON: 'JSON',
|
|
2547
|
+
JSONL: 'JSONL',
|
|
2548
|
+
MAR: 'MAR',
|
|
2549
|
+
MCP: 'MCP',
|
|
2550
|
+
MYSQL: 'MySQL',
|
|
2551
|
+
NODE: 'Node',
|
|
2552
|
+
OAUTH: 'OAuth',
|
|
2553
|
+
RPC: 'RPC',
|
|
2554
|
+
SDK: 'SDK',
|
|
2555
|
+
SQL: 'SQL',
|
|
2556
|
+
SQLITE: 'SQLite',
|
|
2557
|
+
URL: 'URL',
|
|
2558
|
+
UUID: 'UUID',
|
|
2559
|
+
WEBSOCKET: 'WebSocket',
|
|
2560
|
+
WORKBENCH: 'Workbench',
|
|
2561
|
+
WORKSPACE: 'Workspace'
|
|
2562
|
+
};
|
|
2563
|
+
const FIXED_PUBLIC_ERROR_MESSAGES = {
|
|
2564
|
+
GIT_CONFIGURATION_INVALID: 'Check the Git identity, credential fields, and unique matching scopes.',
|
|
2565
|
+
GIT_CREDENTIAL_NOT_FOUND: 'This personal Git credential no longer exists.',
|
|
2566
|
+
GIT_CONFIGURATION_NODE_UNSUPPORTED: 'Update this Node to use personal Git configuration.',
|
|
2567
|
+
GIT_CREDENTIAL_CONTEXT_EXPIRED: 'This Git credential context has expired. Start a new terminal or Agent execution.',
|
|
2568
|
+
GIT_CREDENTIAL_DIRECTORY_INVALID: 'A private directory for Git keys could not be secured on this Node.',
|
|
2569
|
+
TERMINAL_GIT_OWNER_REQUIRED: 'This terminal uses another user’s Git credentials. Open your own terminal.',
|
|
2570
|
+
GIT_ENVIRONMENT_INVALID: 'The existing Git process configuration is invalid or exceeds its supported size.',
|
|
2571
|
+
INTERNAL_ERROR: 'An internal error occurred.',
|
|
2572
|
+
UNAUTHENTICATED: 'Authentication is required.',
|
|
2573
|
+
FORBIDDEN: 'Access is forbidden.',
|
|
2574
|
+
INVALID_CREDENTIALS: 'Credentials are invalid.',
|
|
2575
|
+
GIT_SUBMODULE_MAPPING_MISSING: 'This directory is tracked as a submodule, but .gitmodules has no complete path and URL mapping.',
|
|
2576
|
+
GIT_SUBMODULE_MAPPING_INVALID: 'The .gitmodules configuration cannot be read or parsed.',
|
|
2577
|
+
GIT_REPOSITORY_UNREADABLE: 'This repository cannot be read. Check its directory, Git metadata, and permissions.',
|
|
2578
|
+
GIT_SUBMODULE_DISCOVERY_FAILED: 'Some submodules could not be listed. Other available repository changes are still shown.',
|
|
2579
|
+
GIT_WORKTREE_DISCOVERY_FAILED: 'Linked worktrees could not be listed. Other available repository changes are still shown.',
|
|
2580
|
+
GIT_SUBMODULE_LIMIT_EXCEEDED: 'The submodule discovery limit was reached. Some repositories are not shown.'
|
|
2581
|
+
};
|
|
2582
|
+
function publicErrorSubject(code) {
|
|
2583
|
+
return code
|
|
2584
|
+
.split('_')
|
|
2585
|
+
.filter((word) => word.length > 0)
|
|
2586
|
+
.map((word, index) => {
|
|
2587
|
+
const fixed = ERROR_SUBJECT_WORDS[word];
|
|
2588
|
+
if (fixed !== undefined)
|
|
2589
|
+
return fixed;
|
|
2590
|
+
const lower = word.toLowerCase();
|
|
2591
|
+
return index === 0 ? `${lower[0]?.toUpperCase() ?? ''}${lower.slice(1)}` : lower;
|
|
2592
|
+
})
|
|
2593
|
+
.join(' ');
|
|
2594
|
+
}
|
|
2595
|
+
/** Generates a readable English fallback for every stable application error code. */
|
|
2596
|
+
export function publicErrorMessage(code) {
|
|
2597
|
+
const safeCode = PUBLIC_ERROR_CODE.test(code) ? code : 'INTERNAL_ERROR';
|
|
2598
|
+
const fixed = FIXED_PUBLIC_ERROR_MESSAGES[safeCode];
|
|
2599
|
+
if (fixed !== undefined)
|
|
2600
|
+
return fixed;
|
|
2601
|
+
const endings = [
|
|
2602
|
+
['_ALREADY_EXISTS', 'already exists.'],
|
|
2603
|
+
['_ALREADY_DECIDED', 'has already been decided.'],
|
|
2604
|
+
['_NOT_FOUND', 'was not found.'],
|
|
2605
|
+
['_NOT_AUTHORIZED', 'is not authorized.'],
|
|
2606
|
+
['_NOT_ALLOWED', 'is not allowed.'],
|
|
2607
|
+
['_NOT_PUBLISHED', 'is not published.'],
|
|
2608
|
+
['_LIMIT_EXCEEDED', 'limit was exceeded.'],
|
|
2609
|
+
['_LIMIT_REACHED', 'limit was reached.'],
|
|
2610
|
+
['_RATE_LIMITED', 'is rate limited.'],
|
|
2611
|
+
['_TOO_LARGE', 'is too large.'],
|
|
2612
|
+
['_IN_USE', 'is in use.'],
|
|
2613
|
+
['_UNAVAILABLE', 'is unavailable.'],
|
|
2614
|
+
['_UNSUPPORTED', 'is unsupported.'],
|
|
2615
|
+
['_UNAUTHENTICATED', 'is unauthenticated.'],
|
|
2616
|
+
['_FORBIDDEN', 'is forbidden.'],
|
|
2617
|
+
['_REQUIRED', 'is required.'],
|
|
2618
|
+
['_INVALID', 'is invalid.'],
|
|
2619
|
+
['_EXPIRED', 'has expired.'],
|
|
2620
|
+
['_DISABLED', 'is disabled.'],
|
|
2621
|
+
['_OFFLINE', 'is offline.'],
|
|
2622
|
+
['_CONFLICT', 'conflicts with the current state.'],
|
|
2623
|
+
['_TIMEOUT', 'timed out.'],
|
|
2624
|
+
['_TIMED_OUT', 'timed out.'],
|
|
2625
|
+
['_FAILED', 'failed.'],
|
|
2626
|
+
['_CANCELLED', 'was cancelled.'],
|
|
2627
|
+
['_CLOSED', 'is closed.'],
|
|
2628
|
+
['_BUSY', 'is busy.'],
|
|
2629
|
+
['_FULL', 'is full.'],
|
|
2630
|
+
['_STALE', 'is stale.'],
|
|
2631
|
+
['_MISSING', 'is missing.'],
|
|
2632
|
+
['_IMMUTABLE', 'is immutable.'],
|
|
2633
|
+
['_MISMATCH', 'does not match.'],
|
|
2634
|
+
['_VIOLATION', 'was violated.'],
|
|
2635
|
+
['_UNKNOWN', 'is unknown.'],
|
|
2636
|
+
['_DENIED', 'was denied.'],
|
|
2637
|
+
['_ERROR', 'encountered an error.']
|
|
2638
|
+
];
|
|
2639
|
+
for (const [ending, predicate] of endings) {
|
|
2640
|
+
if (!safeCode.endsWith(ending))
|
|
2641
|
+
continue;
|
|
2642
|
+
const subject = publicErrorSubject(safeCode.slice(0, -ending.length));
|
|
2643
|
+
return subject.length > 0 ? `${subject} ${predicate}` : publicErrorSubject(safeCode) + '.';
|
|
2644
|
+
}
|
|
2645
|
+
return `${publicErrorSubject(safeCode)}.`;
|
|
2646
|
+
}
|
|
2647
|
+
/** Builds the bounded public error shape shared by Node and Server boundaries. */
|
|
2648
|
+
export function safePublicError(error, fallback = 'INTERNAL_ERROR') {
|
|
2649
|
+
const record = publicErrorRecord(error);
|
|
2650
|
+
const code = error instanceof Error && PUBLIC_ERROR_CODE.test(error.message)
|
|
2651
|
+
? error.message
|
|
2652
|
+
: typeof record?.['code'] === 'string' && PUBLIC_ERROR_CODE.test(record['code'])
|
|
2653
|
+
? record['code']
|
|
2654
|
+
: PUBLIC_ERROR_CODE.test(fallback)
|
|
2655
|
+
? fallback
|
|
2656
|
+
: 'INTERNAL_ERROR';
|
|
2657
|
+
const fallbackMessage = publicErrorMessage(code);
|
|
2658
|
+
const requestedMessage = boundedPublicErrorText(record?.['publicMessage']);
|
|
2659
|
+
const message = requestedMessage ?? fallbackMessage;
|
|
2660
|
+
const details = boundedPublicErrorText(record?.['publicDetails']) ??
|
|
2661
|
+
(error instanceof Error && error.message !== code
|
|
2662
|
+
? boundedPublicErrorText(error.message)
|
|
2663
|
+
: undefined) ??
|
|
2664
|
+
publicErrorCauseDetails(record?.['cause']);
|
|
2665
|
+
const parameters = boundedPublicErrorParameters(record?.['publicParameters'] ?? record?.['parameters']);
|
|
2666
|
+
return {
|
|
2667
|
+
code,
|
|
2668
|
+
message,
|
|
2669
|
+
...(details === undefined ? {} : { details }),
|
|
2670
|
+
...(parameters === undefined ? {} : { parameters })
|
|
2671
|
+
};
|
|
2672
|
+
}
|
|
2673
|
+
function publicErrorRecord(error) {
|
|
2674
|
+
return error !== null && typeof error === 'object'
|
|
2675
|
+
? error
|
|
2676
|
+
: undefined;
|
|
2677
|
+
}
|
|
2678
|
+
function boundedPublicErrorText(value) {
|
|
2679
|
+
if (typeof value !== 'string')
|
|
2680
|
+
return undefined;
|
|
2681
|
+
const trimmed = value.trim();
|
|
2682
|
+
return trimmed.length === 0 || trimmed.includes('\0') ? undefined : trimmed.slice(0, 1_000);
|
|
2683
|
+
}
|
|
2684
|
+
function publicErrorCauseDetails(value) {
|
|
2685
|
+
const cause = publicErrorRecord(value);
|
|
2686
|
+
if (cause === undefined)
|
|
2687
|
+
return undefined;
|
|
2688
|
+
return boundedPublicErrorText(cause['publicDetails']) ?? boundedPublicErrorText(cause['message']);
|
|
2689
|
+
}
|
|
2690
|
+
function boundedPublicErrorParameters(value) {
|
|
2691
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value))
|
|
2692
|
+
return undefined;
|
|
2693
|
+
const entries = Object.entries(value)
|
|
2694
|
+
.filter(([key]) => key.trim().length > 0 && key.length <= 128 && !key.includes('\0'))
|
|
2695
|
+
.flatMap(([key, item]) => {
|
|
2696
|
+
if (typeof item === 'number' && Number.isFinite(item))
|
|
2697
|
+
return [[key, item]];
|
|
2698
|
+
const text = boundedPublicErrorText(item);
|
|
2699
|
+
return text === undefined ? [] : [[key, text]];
|
|
2700
|
+
})
|
|
2701
|
+
.slice(0, 32);
|
|
2702
|
+
return entries.length === 0 ? undefined : Object.fromEntries(entries);
|
|
2703
|
+
}
|
|
2704
|
+
export const nodeErrorSchema = z.object({
|
|
2705
|
+
code: z.enum([
|
|
2706
|
+
'PROTOCOL_VERSION_UNSUPPORTED',
|
|
2707
|
+
'MESSAGE_TYPE_UNKNOWN',
|
|
2708
|
+
'MESSAGE_INVALID',
|
|
2709
|
+
'NODE_UNAUTHENTICATED',
|
|
2710
|
+
'NODE_DISABLED',
|
|
2711
|
+
'REGISTRATION_TOKEN_INVALID',
|
|
2712
|
+
'WORKSPACE_INVALID',
|
|
2713
|
+
'RUN_NOT_FOUND',
|
|
2714
|
+
'RUN_STATE_INVALID',
|
|
2715
|
+
'RUN_LOST',
|
|
2716
|
+
'APPROVAL_NOT_FOUND',
|
|
2717
|
+
'APPROVAL_EXPIRED',
|
|
2718
|
+
'APPROVAL_ALREADY_DECIDED',
|
|
2719
|
+
'APPROVAL_ALREADY_EXISTS',
|
|
2720
|
+
'WORKBENCH_PROTOCOL_UNSUPPORTED',
|
|
2721
|
+
'CAPABILITY_UNAVAILABLE',
|
|
2722
|
+
'CAPABILITY_VERSION_UNSUPPORTED',
|
|
2723
|
+
'CAPABILITY_STALE',
|
|
2724
|
+
'EVENT_CURSOR_INVALID',
|
|
2725
|
+
'EVENT_CURSOR_GAP',
|
|
2726
|
+
'ITEM_REVISION_CONFLICT',
|
|
2727
|
+
'RUNNER_PROFILE_INVALID',
|
|
2728
|
+
'RUNNER_COMMAND_UNSUPPORTED',
|
|
2729
|
+
'FILE_NOT_FOUND',
|
|
2730
|
+
'FILE_NOT_REGULAR',
|
|
2731
|
+
'FILE_TOO_LARGE',
|
|
2732
|
+
'FILE_ENCODING_UNSUPPORTED',
|
|
2733
|
+
'FILE_PATH_ESCAPE',
|
|
2734
|
+
'DIRECTORY_CURSOR_INVALID',
|
|
2735
|
+
'FILE_SEARCH_LIMIT_EXCEEDED',
|
|
2736
|
+
'GIT_CHANGE_RESTORE_UNAVAILABLE',
|
|
2737
|
+
'TERMINAL_UNAVAILABLE',
|
|
2738
|
+
'TERMINAL_LIMIT_REACHED',
|
|
2739
|
+
'TERMINAL_NOT_FOUND',
|
|
2740
|
+
'TERMINAL_ATTACH_CONFLICT',
|
|
2741
|
+
'TERMINAL_REPLAY_GAP',
|
|
2742
|
+
'TERMINAL_DATA_CHANNEL_UNAVAILABLE',
|
|
2743
|
+
'SKILL_TARGET_OFFLINE',
|
|
2744
|
+
'SKILL_TARGET_LIMIT_EXCEEDED',
|
|
2745
|
+
'SKILL_NAME_CONFLICT',
|
|
2746
|
+
'SKILL_PATH_UNSAFE',
|
|
2747
|
+
'SKILL_CONTENT_INVALID',
|
|
2748
|
+
'SKILL_INSTALL_PARTIAL',
|
|
2749
|
+
'SKILL_INSTALL_FAILED',
|
|
2750
|
+
'SKILL_INSTALL_VERSION_UNKNOWN',
|
|
2751
|
+
'SKILL_INSTALL_RECOVERY_REQUIRED',
|
|
2752
|
+
'SKILL_INSTALL_INVALID_LINK',
|
|
2753
|
+
'NODE_SKILL_LINK_UNAVAILABLE',
|
|
2754
|
+
'WORKSPACE_SKILL_GIT_EXCLUDE_FAILED',
|
|
2755
|
+
'WORKSPACE_SKILL_TRACKED_CONFIRM_REQUIRED',
|
|
2756
|
+
'CONVERSATION_HOSTING_UNAVAILABLE',
|
|
2757
|
+
'CONVERSATION_HOSTING_STORAGE_FULL',
|
|
2758
|
+
'CONVERSATION_TEMPLATE_NOT_FOUND',
|
|
2759
|
+
'CONVERSATION_TEMPLATE_NOT_AUTHORIZED',
|
|
2760
|
+
'CONVERSATION_TEMPLATE_NOT_PUBLISHED',
|
|
2761
|
+
'CONVERSATION_TEMPLATE_REVISION_CONFLICT',
|
|
2762
|
+
'CONVERSATION_TEMPLATE_VERSION_CORRUPTED',
|
|
2763
|
+
'HOSTED_CONVERSATION_NOT_FOUND',
|
|
2764
|
+
'HOSTED_CONVERSATION_NOT_AUTHORIZED',
|
|
2765
|
+
'HOSTED_CONVERSATION_UPGRADE_FAILED',
|
|
2766
|
+
'HOSTED_CONVERSATION_QUOTA_EXCEEDED',
|
|
2767
|
+
'HOSTED_CONVERSATION_FILE_INVALID',
|
|
2768
|
+
'HOSTED_CONVERSATION_FILE_NOT_FOUND',
|
|
2769
|
+
'HOSTED_CONVERSATION_FILE_CONFLICT',
|
|
2770
|
+
'SANDBOX_UNAVAILABLE',
|
|
2771
|
+
'SANDBOX_POLICY_INVALID',
|
|
2772
|
+
'SANDBOX_RESOURCE_LIMIT',
|
|
2773
|
+
'INTERNAL_ERROR'
|
|
2774
|
+
])
|
|
2775
|
+
});
|
|
2776
|
+
export function createEnvelope(type, payload, options = {}) {
|
|
2777
|
+
return {
|
|
2778
|
+
version: NODE_PROTOCOL_VERSION,
|
|
2779
|
+
id: options.id ?? crypto.randomUUID(),
|
|
2780
|
+
type,
|
|
2781
|
+
...(options.replyTo === undefined ? {} : { replyTo: options.replyTo }),
|
|
2782
|
+
payload
|
|
2783
|
+
};
|
|
2784
|
+
}
|