@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/enterprise.js
CHANGED
|
@@ -1,2 +1,182 @@
|
|
|
1
|
-
|
|
2
|
-
const _0x5bee5=_0x1fea;(function(_0xa29cc,_0x314c71){const _0x18e469=_0x1fea,_0x3955fb=_0xa29cc();while(!![]){try{const _0x3ffeb7=-parseInt(_0x18e469(0x155))/(-0x509*0x1+0x1c4+-0x346*-0x1)+-parseInt(_0x18e469(0x175))/(-0x4*-0x245+-0x18d*-0x7+-0x13ed)+parseInt(_0x18e469(0x196))/(0x115f*0x1+0x4f+0x1*-0x11ab)*(-parseInt(_0x18e469(0x16e))/(-0x6*-0x89+0x2*-0x1127+0x1*0x1f1c))+parseInt(_0x18e469(0x192))/(0x130+0x2c5*-0x3+0x724)+parseInt(_0x18e469(0x15a))/(0x263a+0x1*0x1c97+-0x42cb)*(parseInt(_0x18e469(0x18a))/(-0x7c9*-0x3+0x11e1+-0x1*0x2935))+parseInt(_0x18e469(0x164))/(-0x1*0x19b8+0x25b7+-0x1*0xbf7)*(parseInt(_0x18e469(0x19c))/(-0x1757+-0x6*-0x40+0x15e0))+-parseInt(_0x18e469(0x157))/(-0xb*0x61+-0x946*0x2+0x16c1)*(-parseInt(_0x18e469(0x15d))/(-0x12e6+-0x1d86+0x3077));if(_0x3ffeb7===_0x314c71)break;else _0x3955fb['push'](_0x3955fb['shift']());}catch(_0x16ea67){_0x3955fb['push'](_0x3955fb['shift']());}}}(_0x1bf3,-0x478b6+0x8f9a*0x8+0x44440));import{z}from'zod';function _0x1fea(_0x340415,_0x9ff7cd){_0x340415=_0x340415-(-0x1f58+0xf6d+0x1130);const _0x2e098d=_0x1bf3();let _0x3a300e=_0x2e098d[_0x340415];if(_0x1fea['pEtrVF']===undefined){var _0x52d957=function(_0x4e98cc){const _0x357dd2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5338cd='',_0xeaa3f='';for(let _0x390cbf=0xd31*-0x1+0x20d1+-0x13a0,_0x542d96,_0x526358,_0x4dd525=0x25c5*-0x1+-0x90f+-0x3e7*-0xc;_0x526358=_0x4e98cc['charAt'](_0x4dd525++);~_0x526358&&(_0x542d96=_0x390cbf%(-0x2*0x11d1+0x1910+-0xa96*-0x1)?_0x542d96*(-0x26ab+-0x20fe+-0x29*-0x1c1)+_0x526358:_0x526358,_0x390cbf++%(-0x1cc1+-0x202a+0x13*0x335))?_0x5338cd+=String['fromCharCode'](0x4da+0x115f+-0x153a&_0x542d96>>(-(-0x13e+0xb4*0x9+-0x514)*_0x390cbf&-0xd*-0x2b4+-0x6a7*-0x1+-0x29c5)):0x30*-0x4f+-0x7*0x2b3+-0x21b5*-0x1){_0x526358=_0x357dd2['indexOf'](_0x526358);}for(let _0xa68531=0x1b33+0x26*0x35+0x2f*-0xbf,_0x3ad8b5=_0x5338cd['length'];_0xa68531<_0x3ad8b5;_0xa68531++){_0xeaa3f+='%'+('00'+_0x5338cd['charCodeAt'](_0xa68531)['toString'](-0x14*0x16e+-0x2c8*-0xd+-0x780))['slice'](-(-0x1*-0x101f+0xfe*-0xc+-0x167*0x3));}return decodeURIComponent(_0xeaa3f);};_0x1fea['DyFKBM']=_0x52d957,_0x1fea['DUZuOT']={},_0x1fea['pEtrVF']=!![];}const _0x26b83c=_0x2e098d[-0xd53+-0x6d3*0x2+-0x1*-0x1af9];_0x1fea['wcNDjy']!==_0x26b83c&&(_0x1fea['DUZuOT']={},_0x1fea['wcNDjy']=_0x26b83c);const _0x43c694=_0x1fea['DUZuOT'][_0x340415];return _0x43c694===undefined?(_0x3a300e=_0x1fea['DyFKBM'](_0x3a300e),_0x1fea['DUZuOT'][_0x340415]=_0x3a300e):_0x3a300e=_0x43c694,_0x3a300e;}function _0x1bf3(){const _0x4a1fc=['DxjS','CMvNzxG','u1rfrvi','CMvZB3vYy2vuExbL','C3rYAwn0','uKvrvuLsruq','ru5urvjquKLtrq','v09ss1nqqunf','mJeYntjZC2Xit0y','CMvJB3jK','u0vora','BNvTyMvY','ru5urvjquKLtrv9guK9Aru4','rurjvf9rvuvvrq','Bw9KzwXjza','Cg9ZAxrPDMu','mta2mdC4nxzsr3Lcsa','Aw50','rKfjteve','ru5urvjquKLtrv9wquXjra','oxbIsgHlBa','vvnfuG','Bwf4','tu9eruW','t1jhx1nvqLrsruu','u1vdq0vtuW','ow1uDwfTAa','y2XPzw50x3nLy3jLDf9WB3n0','BM9KzuLK','B3DUzxjuExbL','u1Ltvevn','uvvfvuu','BM9UBMvNyxrPDMu','BgL0zxjHBa','z3jHBNrty29Wzu9Yz2fUAxPHDgLVBKLK','ywrKsxnZDwu','B3b0Aw9UywW','Dw5PB24','y2XPzw50x3nLy3jLDf9QC29U','uevsu09oquW','zgLZy3jPBwLUyxrLzfvUAw9U','B2jQzwn0','zxH0zw5K','vevnueXbveu','DgfYz2v0t3jNyw5PEMf0Aw9Uswq','yM9VBgvHBG','DgfYz2v0vhLWzq','uKvtvu1fx1fvrvvf','C3rYAw5N','mteZnJG1vLnovfHq','CMvZB3vYy2uGAwrLBNrPzMLLCNmGBxvZDcbTyxrJAcbYzxnVDxjJzvr5Cgu','mtKXmtb6wwjcB3u','BNvSBgfIBgu','DgfYz2v0t3jNyw5PEMf0Aw9UswqGBxvZDcbTyxrJAcb0yxjNzxruExbL','ndaYtgjTuLno','tuvnqKvs','t0fvveGY','mtm0mLbJseftsq','reLtqujmruq','uLvox05pvW','C3vWzxjszwzPBMu','D29YA3nWywnLswq','BwLU','z3jHBNrbDxrOB3jPDhK','mtqYnJa0mfrxyw11wa','BNvSBa','z3jHBNqGC2nVCguGBxvZDcbTyxrJAcbHDxrOB3jPDhK','u1vque9sveve','rvHfq1vurv9rvuvvrq','uefvu0vFuvvfvuu','DgfYz2v0vxnLCKLKig11C3qGBwf0y2GGDgfYz2v0vhLWzq','tKvxx1nfu1njt04','uKvpuKrfuL9rvuvvrq','DhjPBq','ntCXnZu2B0L4Cg9t','zw51Bq','qurnsu4','t1jhx0fetuLo','yxjYyxK','tK9erq','y2XPzw50x3nLy3jLDf9IyxnPyW','nZu5nMTzvwfXAW','vvnfuL9jtLbvvf9srvnqt05trq','q09oveLovuu','y3vZDg9T','r1jbtLrfrf9srvnpvvjdrq','t1jhqu5jwKfusu9o','revosuve','DgvTCgXHDgvjza','DgfYz2v0vxnLCKLK','revmrvrfx1fvrvvf','ueftu1DpuKq','zgvMyxvSDa','uKvqtefdrv9dvvjsru5u'];_0x1bf3=function(){return _0x4a1fc;};return _0x1bf3();}export const editionSchema=z[_0x5bee5(0x16f)]([_0x5bee5(0x14b),_0x5bee5(0x188)]);export const licenseStateSchema=z[_0x5bee5(0x16f)]([_0x5bee5(0x14b),_0x5bee5(0x195),_0x5bee5(0x18e)]);export const userRoleSchema=z[_0x5bee5(0x16f)]([_0x5bee5(0x170),_0x5bee5(0x171),_0x5bee5(0x15b)]);export const permissionScopeSchema=z[_0x5bee5(0x16f)]([_0x5bee5(0x188),_0x5bee5(0x19a),_0x5bee5(0x14b),_0x5bee5(0x179)]);export const enterpriseCapabilitySchema=z[_0x5bee5(0x14d)]({'edition':editionSchema,'licenseState':licenseStateSchema,'role':userRoleSchema[_0x5bee5(0x158)](),'organizationId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()[_0x5bee5(0x158)](),'managementWritable':z[_0x5bee5(0x151)]()})[_0x5bee5(0x186)]();export const organizationSchema=z[_0x5bee5(0x14d)]({'id':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)](),'name':z[_0x5bee5(0x154)]()[_0x5bee5(0x16d)]()[_0x5bee5(0x162)](-0xf7+0x25c5*-0x1+0x26bd)[_0x5bee5(0x198)](0x17ba+0x1*-0x1f0f+0x7d5),'parentOrganizationId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()[_0x5bee5(0x158)](),'createdAt':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x1a2)](),'updatedAt':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x1a2)]()})[_0x5bee5(0x186)]();export const resourceOwnershipSchema=z[_0x5bee5(0x14c)](_0x5bee5(0x19f),[z[_0x5bee5(0x14d)]({'ownerType':z[_0x5bee5(0x145)](_0x5bee5(0x14b)),'ownerUserId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()})[_0x5bee5(0x186)](),z[_0x5bee5(0x14d)]({'ownerType':z[_0x5bee5(0x145)](_0x5bee5(0x17a)),'ownerOrganizationId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()})[_0x5bee5(0x186)]()]);export const resourceGrantSchema=z[_0x5bee5(0x14d)]({'id':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0x1332+0x216+0x111d)[_0x5bee5(0x198)](-0x3b*0x67+-0x118b+0x29c8),'resourceType':z[_0x5bee5(0x16f)]([_0x5bee5(0x173),_0x5bee5(0x189),_0x5bee5(0x199),_0x5bee5(0x14f)]),'nodeId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x4*-0xad+0x7*-0x355+0x1a08)[_0x5bee5(0x198)](-0x225b+-0x1d37*0x1+0x2009*0x2)[_0x5bee5(0x148)](),'workspaceId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x1eea*-0x1+0x2324+-0x439*0x1)[_0x5bee5(0x198)](-0x1780+0x30*-0x4f+-0x17*-0x1b0)[_0x5bee5(0x148)](),'modelId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x2*0x9bf+-0x2471+0x23*0x7c)[_0x5bee5(0x198)](0x1831+0xb*0x112+-0x2377)[_0x5bee5(0x148)](),'templateId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x2040+-0x6*0x494+-0x1*0x4c7)[_0x5bee5(0x198)](-0x1511*-0x1+0x1730+-0x2bc1)[_0x5bee5(0x148)](),'targetType':z[_0x5bee5(0x16f)]([_0x5bee5(0x197),_0x5bee5(0x17a),_0x5bee5(0x188)]),'targetUserId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()[_0x5bee5(0x148)](),'targetOrganizationId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()[_0x5bee5(0x148)](),'grantAuthority':z[_0x5bee5(0x16f)]([_0x5bee5(0x188),_0x5bee5(0x19a)]),'grantScopeOrganizationId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()[_0x5bee5(0x148)](),'createdByUserId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)](),'createdAt':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x1a2)]()})[_0x5bee5(0x186)]()[_0x5bee5(0x160)]((_0x4d8553,_0x2d8e2b)=>{const _0x500148=_0x5bee5,_0x591b46=_0x4d8553[_0x500148(0x185)]===_0x500148(0x173)&&_0x4d8553[_0x500148(0x19e)]!==undefined&&_0x4d8553[_0x500148(0x161)]===undefined&&_0x4d8553[_0x500148(0x190)]===undefined&&_0x4d8553[_0x500148(0x17c)]===undefined||_0x4d8553[_0x500148(0x185)]===_0x500148(0x189)&&_0x4d8553[_0x500148(0x19e)]!==undefined&&_0x4d8553[_0x500148(0x161)]!==undefined&&_0x4d8553[_0x500148(0x190)]===undefined&&_0x4d8553[_0x500148(0x17c)]===undefined||_0x4d8553[_0x500148(0x185)]===_0x500148(0x199)&&_0x4d8553[_0x500148(0x19e)]===undefined&&_0x4d8553[_0x500148(0x161)]===undefined&&_0x4d8553[_0x500148(0x190)]!==undefined&&_0x4d8553[_0x500148(0x17c)]===undefined||_0x4d8553[_0x500148(0x185)]===_0x500148(0x14f)&&_0x4d8553[_0x500148(0x19e)]===undefined&&_0x4d8553[_0x500148(0x161)]===undefined&&_0x4d8553[_0x500148(0x190)]===undefined&&_0x4d8553[_0x500148(0x17c)]!==undefined;!_0x591b46&&_0x2d8e2b[_0x500148(0x147)]({'code':_0x500148(0x178),'message':_0x500148(0x156)}),_0x4d8553[_0x500148(0x152)]===_0x500148(0x197)!==(_0x4d8553[_0x500148(0x17d)]!==undefined)&&_0x2d8e2b[_0x500148(0x147)]({'code':_0x500148(0x178),'message':_0x500148(0x16a)}),_0x4d8553[_0x500148(0x152)]===_0x500148(0x17a)!==(_0x4d8553[_0x500148(0x150)]!==undefined)&&_0x2d8e2b[_0x500148(0x147)]({'code':_0x500148(0x178),'message':_0x500148(0x159)}),_0x4d8553[_0x500148(0x163)]===_0x500148(0x19a)!==(_0x4d8553[_0x500148(0x146)]!==undefined)&&_0x2d8e2b[_0x500148(0x147)]({'code':_0x500148(0x178),'message':_0x500148(0x166)});});const jsonPointerSchema=z[_0x5bee5(0x154)]()[_0x5bee5(0x183)](/^(?:|(?:\/(?:[^~/]|~[01])*)+)$/),requiredJsonPointerSchema=jsonPointerSchema[_0x5bee5(0x162)](-0x1195+-0x1*-0x1bd3+-0xa3d*0x1);export const oauthProviderInputSchema=z[_0x5bee5(0x14d)]({'providerKey':z[_0x5bee5(0x154)]()[_0x5bee5(0x183)](/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/),'name':z[_0x5bee5(0x154)]()[_0x5bee5(0x16d)]()[_0x5bee5(0x162)](-0x1*0x15a+0x2de*0x3+-0x73f)[_0x5bee5(0x198)](0x1d1d*0x1+0x221*-0x12+0x9b5),'clientId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0xea*0xa+0xf01*0x2+0x38f*-0xb)[_0x5bee5(0x198)](0x1*0x14c6+-0x50e+-0xdb8),'clientSecret':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0xdc+0x1*-0x126b+0x2*0x9a4)[_0x5bee5(0x198)](-0x13c*-0x2+0x1*0x5bf+0x7c9)[_0x5bee5(0x148)](),'authorizationEndpoint':z[_0x5bee5(0x154)]()[_0x5bee5(0x182)](),'tokenEndpoint':z[_0x5bee5(0x154)]()[_0x5bee5(0x182)](),'userinfoEndpoint':z[_0x5bee5(0x154)]()[_0x5bee5(0x182)](),'scopes':z[_0x5bee5(0x172)](z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0x160b+0x1d0f*-0x1+-0x26f*-0x15)[_0x5bee5(0x198)](0x232c*0x1+-0x1*0x1927+-0x985))[_0x5bee5(0x198)](-0x1093*0x1+-0x184c+-0x1*-0x28ff),'pkceMode':z[_0x5bee5(0x16f)]([_0x5bee5(0x187),_0x5bee5(0x167),_0x5bee5(0x15e)]),'tokenAuthMethod':z[_0x5bee5(0x16f)]([_0x5bee5(0x174),_0x5bee5(0x19d),_0x5bee5(0x14a)]),'autoProvisioningEnabled':z[_0x5bee5(0x151)]()[_0x5bee5(0x180)](![]),'mappings':z[_0x5bee5(0x14d)]({'externalUserId':requiredJsonPointerSchema,'email':jsonPointerSchema[_0x5bee5(0x148)](),'displayName':jsonPointerSchema[_0x5bee5(0x148)]()})[_0x5bee5(0x186)]()})[_0x5bee5(0x186)]();export const auditConversationInputModeSchema=z[_0x5bee5(0x16f)]([_0x5bee5(0x16b),_0x5bee5(0x18c),_0x5bee5(0x177),_0x5bee5(0x184),_0x5bee5(0x1a1),_0x5bee5(0x181),_0x5bee5(0x15f),_0x5bee5(0x176),_0x5bee5(0x18f),_0x5bee5(0x17e),_0x5bee5(0x16c),_0x5bee5(0x168),_0x5bee5(0x169),_0x5bee5(0x153)]);export const auditEventSchema=z[_0x5bee5(0x14d)]({'id':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x647+0x89a+0x10*-0xee)[_0x5bee5(0x198)](0x22cf+-0x44*-0x26+-0x2c67),'eventType':z[_0x5bee5(0x154)]()[_0x5bee5(0x183)](/^[a-z0-9_.-]{1,80}$/),'occurredAt':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x1a2)](),'result':z[_0x5bee5(0x16f)]([_0x5bee5(0x19b),_0x5bee5(0x17b),_0x5bee5(0x194)]),'errorCode':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0xd35+0x1565+-0x224a)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'actorUserId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'actorUsername':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](-0x847+0x1*-0x841+0x1108)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'authenticationMethod':z[_0x5bee5(0x16f)]([_0x5bee5(0x17f),_0x5bee5(0x15c),_0x5bee5(0x1a0)]),'providerId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x1bca+0x1ed0*-0x1+0x386)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'requestId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x15fd*0x1+0x1316+0x1*-0x2893)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'operationId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x11c4+0x59*0x18+-0xb*0x254)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'sessionPublicId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](-0xc*0x1b3+0x24ca+-0xfe6)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'targetType':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x658*-0x2+-0x2236+-0x2*-0x179b)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'targetId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](-0x1*0x11be+-0x2e6*-0x3+0x98c)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'targetName':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](-0x49*0x73+-0x125d*0x2+-0x7*-0xa13)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'organizationId':z[_0x5bee5(0x18d)]()[_0x5bee5(0x193)]()[_0x5bee5(0x191)]()[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'nodeId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x2cc*0x1+-0x1600+-0x184*-0xd)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'workspaceId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x32*0x3d+-0x79*-0x13+-0xe3*0x17)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'agentSessionId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](-0x113e*0x2+-0x1d*0x20+0x269c)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'runId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](-0x15*-0x199+0x1d20+0xb*-0x5a7)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'clientMessageId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x1*0xeb5+-0x4*0x20d+0x1d*-0x35)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'queueItemId':z[_0x5bee5(0x154)]()[_0x5bee5(0x198)](0x1841+0x977*-0x1+-0xe4a)[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'inputMode':auditConversationInputModeSchema[_0x5bee5(0x158)]()[_0x5bee5(0x148)](),'hasConversationPayload':z[_0x5bee5(0x151)]()[_0x5bee5(0x148)](),'metadata':z[_0x5bee5(0x18b)](z[_0x5bee5(0x154)](),z[_0x5bee5(0x149)]([z[_0x5bee5(0x154)](),z[_0x5bee5(0x18d)](),z[_0x5bee5(0x151)](),z[_0x5bee5(0x165)]()]))[_0x5bee5(0x148)]()})[_0x5bee5(0x186)]();export const auditConversationReceiptSchema=z[_0x5bee5(0x14d)]({'sessionId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x1c27*0x1+-0x1*-0xe3+0x1d09*-0x1)[_0x5bee5(0x198)](0x1*0x1933+-0x141+-0x1772),'conversationTitle':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x17b4+0xc74+-0x2427)[_0x5bee5(0x198)](-0x246b+-0x2681*0x1+-0x4bec*-0x1)[_0x5bee5(0x148)](),'runId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0x1b7*0xf+0x91f+0x6d*0x27)[_0x5bee5(0x198)](0x11d2+-0x5*-0x758+0x2*-0x1b05)[_0x5bee5(0x148)](),'queueItemId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0x1540+-0xd9*0x1b+-0x1*-0x2c24)[_0x5bee5(0x198)](0x12db+0x1a8f+0x2cea*-0x1)[_0x5bee5(0x148)](),'inputMode':auditConversationInputModeSchema})[_0x5bee5(0x186)]();export const auditConversationPayloadSchema=z[_0x5bee5(0x14d)]({'conversationId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0x21a9+-0x33a*0x1+-0x626*-0x6)[_0x5bee5(0x198)](-0x12c8*-0x1+0x241c+0x1*-0x3664)[_0x5bee5(0x148)](),'conversationTitle':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0x3c2+0x631+0x1*-0x26e)[_0x5bee5(0x198)](0x13b0+0x20ad+-0x335d),'userMessage':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](0x1174*0x2+0x23ae+-0x4695)[_0x5bee5(0x198)](-0x1*-0x7db5+-0x4563+0x15ce),'queueItemId':z[_0x5bee5(0x154)]()[_0x5bee5(0x162)](-0xe59+-0x1*-0x18e5+-0xa8b)[_0x5bee5(0x198)](0x1af7+0x110f+-0x2b86)[_0x5bee5(0x148)]()})[_0x5bee5(0x186)]();export const auditEventDetailSchema=auditEventSchema[_0x5bee5(0x14e)]({'conversationPayload':auditConversationPayloadSchema[_0x5bee5(0x148)]()})[_0x5bee5(0x186)]();
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const editionSchema = z.enum(['PERSONAL', 'ENTERPRISE']);
|
|
3
|
+
export const licenseStateSchema = z.enum(['PERSONAL', 'ENTERPRISE_VALID', 'ENTERPRISE_FROZEN']);
|
|
4
|
+
export const userRoleSchema = z.enum(['ADMIN', 'ORG_ADMIN', 'MEMBER']);
|
|
5
|
+
export const permissionScopeSchema = z.enum([
|
|
6
|
+
'ENTERPRISE',
|
|
7
|
+
'ORG_SUBTREE',
|
|
8
|
+
'PERSONAL',
|
|
9
|
+
'GRANTED_RESOURCE'
|
|
10
|
+
]);
|
|
11
|
+
export const enterpriseCapabilitySchema = z
|
|
12
|
+
.object({
|
|
13
|
+
edition: editionSchema,
|
|
14
|
+
licenseState: licenseStateSchema,
|
|
15
|
+
role: userRoleSchema.nullable(),
|
|
16
|
+
organizationId: z.number().int().positive().nullable(),
|
|
17
|
+
managementWritable: z.boolean()
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
export const organizationSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
id: z.number().int().positive(),
|
|
23
|
+
name: z.string().trim().min(1).max(128),
|
|
24
|
+
parentOrganizationId: z.number().int().positive().nullable(),
|
|
25
|
+
createdAt: z.number().int().nonnegative(),
|
|
26
|
+
updatedAt: z.number().int().nonnegative()
|
|
27
|
+
})
|
|
28
|
+
.strict();
|
|
29
|
+
export const resourceOwnershipSchema = z.discriminatedUnion('ownerType', [
|
|
30
|
+
z.object({ ownerType: z.literal('PERSONAL'), ownerUserId: z.number().int().positive() }).strict(),
|
|
31
|
+
z
|
|
32
|
+
.object({
|
|
33
|
+
ownerType: z.literal('ORGANIZATION'),
|
|
34
|
+
ownerOrganizationId: z.number().int().positive()
|
|
35
|
+
})
|
|
36
|
+
.strict()
|
|
37
|
+
]);
|
|
38
|
+
export const resourceGrantSchema = z
|
|
39
|
+
.object({
|
|
40
|
+
id: z.string().min(1).max(128),
|
|
41
|
+
resourceType: z.enum(['NODE', 'WORKSPACE', 'MODEL', 'TEMPLATE']),
|
|
42
|
+
nodeId: z.string().min(1).max(128).optional(),
|
|
43
|
+
workspaceId: z.string().min(1).max(128).optional(),
|
|
44
|
+
modelId: z.string().min(1).max(128).optional(),
|
|
45
|
+
templateId: z.string().min(1).max(128).optional(),
|
|
46
|
+
targetType: z.enum(['USER', 'ORGANIZATION', 'ENTERPRISE']),
|
|
47
|
+
targetUserId: z.number().int().positive().optional(),
|
|
48
|
+
targetOrganizationId: z.number().int().positive().optional(),
|
|
49
|
+
grantAuthority: z.enum(['ENTERPRISE', 'ORG_SUBTREE']),
|
|
50
|
+
grantScopeOrganizationId: z.number().int().positive().optional(),
|
|
51
|
+
createdByUserId: z.number().int().positive(),
|
|
52
|
+
createdAt: z.number().int().nonnegative()
|
|
53
|
+
})
|
|
54
|
+
.strict()
|
|
55
|
+
.superRefine((grant, context) => {
|
|
56
|
+
const validResource = (grant.resourceType === 'NODE' &&
|
|
57
|
+
grant.nodeId !== undefined &&
|
|
58
|
+
grant.workspaceId === undefined &&
|
|
59
|
+
grant.modelId === undefined &&
|
|
60
|
+
grant.templateId === undefined) ||
|
|
61
|
+
(grant.resourceType === 'WORKSPACE' &&
|
|
62
|
+
grant.nodeId !== undefined &&
|
|
63
|
+
grant.workspaceId !== undefined &&
|
|
64
|
+
grant.modelId === undefined &&
|
|
65
|
+
grant.templateId === undefined) ||
|
|
66
|
+
(grant.resourceType === 'MODEL' &&
|
|
67
|
+
grant.nodeId === undefined &&
|
|
68
|
+
grant.workspaceId === undefined &&
|
|
69
|
+
grant.modelId !== undefined &&
|
|
70
|
+
grant.templateId === undefined) ||
|
|
71
|
+
(grant.resourceType === 'TEMPLATE' &&
|
|
72
|
+
grant.nodeId === undefined &&
|
|
73
|
+
grant.workspaceId === undefined &&
|
|
74
|
+
grant.modelId === undefined &&
|
|
75
|
+
grant.templateId !== undefined);
|
|
76
|
+
if (!validResource) {
|
|
77
|
+
context.addIssue({ code: 'custom', message: 'resource identifiers must match resourceType' });
|
|
78
|
+
}
|
|
79
|
+
if ((grant.targetType === 'USER') !== (grant.targetUserId !== undefined)) {
|
|
80
|
+
context.addIssue({ code: 'custom', message: 'targetUserId must match targetType' });
|
|
81
|
+
}
|
|
82
|
+
if ((grant.targetType === 'ORGANIZATION') !== (grant.targetOrganizationId !== undefined)) {
|
|
83
|
+
context.addIssue({ code: 'custom', message: 'targetOrganizationId must match targetType' });
|
|
84
|
+
}
|
|
85
|
+
if ((grant.grantAuthority === 'ORG_SUBTREE') !==
|
|
86
|
+
(grant.grantScopeOrganizationId !== undefined)) {
|
|
87
|
+
context.addIssue({ code: 'custom', message: 'grant scope must match authority' });
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
const jsonPointerSchema = z.string().regex(/^(?:|(?:\/(?:[^~/]|~[01])*)+)$/);
|
|
91
|
+
const requiredJsonPointerSchema = jsonPointerSchema.min(1);
|
|
92
|
+
export const oauthProviderInputSchema = z
|
|
93
|
+
.object({
|
|
94
|
+
providerKey: z.string().regex(/^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/),
|
|
95
|
+
name: z.string().trim().min(1).max(128),
|
|
96
|
+
clientId: z.string().min(1).max(512),
|
|
97
|
+
clientSecret: z.string().min(1).max(4096).optional(),
|
|
98
|
+
authorizationEndpoint: z.string().url(),
|
|
99
|
+
tokenEndpoint: z.string().url(),
|
|
100
|
+
userinfoEndpoint: z.string().url(),
|
|
101
|
+
scopes: z.array(z.string().min(1).max(128)).max(32),
|
|
102
|
+
pkceMode: z.enum(['REQUIRED', 'SUPPORTED', 'DISABLED']),
|
|
103
|
+
tokenAuthMethod: z.enum(['client_secret_basic', 'client_secret_post', 'client_secret_json']),
|
|
104
|
+
autoProvisioningEnabled: z.boolean().default(false),
|
|
105
|
+
mappings: z
|
|
106
|
+
.object({
|
|
107
|
+
externalUserId: requiredJsonPointerSchema,
|
|
108
|
+
email: jsonPointerSchema.optional(),
|
|
109
|
+
displayName: jsonPointerSchema.optional()
|
|
110
|
+
})
|
|
111
|
+
.strict()
|
|
112
|
+
})
|
|
113
|
+
.strict();
|
|
114
|
+
export const auditConversationInputModeSchema = z.enum([
|
|
115
|
+
'NEW_SESSION',
|
|
116
|
+
'SEND',
|
|
117
|
+
'CONTINUE',
|
|
118
|
+
'STEER',
|
|
119
|
+
'QUEUE',
|
|
120
|
+
'REPLACE_CURRENT',
|
|
121
|
+
'RUN_NOW',
|
|
122
|
+
'USER_INPUT_RESPONSE',
|
|
123
|
+
'EDIT_QUEUE',
|
|
124
|
+
'DELETE_QUEUE',
|
|
125
|
+
'REORDER_QUEUE',
|
|
126
|
+
'EXECUTE_QUEUE',
|
|
127
|
+
'PAUSE_QUEUE',
|
|
128
|
+
'RESUME_QUEUE'
|
|
129
|
+
]);
|
|
130
|
+
export const auditEventSchema = z
|
|
131
|
+
.object({
|
|
132
|
+
id: z.string().min(1).max(128),
|
|
133
|
+
eventType: z.string().regex(/^[a-z0-9_.-]{1,80}$/),
|
|
134
|
+
occurredAt: z.number().int().nonnegative(),
|
|
135
|
+
result: z.enum(['SUCCESS', 'DENIED', 'FAILED']),
|
|
136
|
+
errorCode: z.string().max(80).nullable().optional(),
|
|
137
|
+
actorUserId: z.number().int().positive().nullable().optional(),
|
|
138
|
+
actorUsername: z.string().max(128).nullable().optional(),
|
|
139
|
+
authenticationMethod: z.enum(['PASSWORD', 'OAUTH2', 'SYSTEM']),
|
|
140
|
+
providerId: z.string().max(128).nullable().optional(),
|
|
141
|
+
requestId: z.string().max(128).nullable().optional(),
|
|
142
|
+
operationId: z.string().max(128).nullable().optional(),
|
|
143
|
+
sessionPublicId: z.string().max(128).nullable().optional(),
|
|
144
|
+
targetType: z.string().max(80).nullable().optional(),
|
|
145
|
+
targetId: z.string().max(128).nullable().optional(),
|
|
146
|
+
targetName: z.string().max(256).nullable().optional(),
|
|
147
|
+
organizationId: z.number().int().positive().nullable().optional(),
|
|
148
|
+
nodeId: z.string().max(128).nullable().optional(),
|
|
149
|
+
workspaceId: z.string().max(128).nullable().optional(),
|
|
150
|
+
agentSessionId: z.string().max(128).nullable().optional(),
|
|
151
|
+
runId: z.string().max(128).nullable().optional(),
|
|
152
|
+
clientMessageId: z.string().max(128).nullable().optional(),
|
|
153
|
+
queueItemId: z.string().max(128).nullable().optional(),
|
|
154
|
+
inputMode: auditConversationInputModeSchema.nullable().optional(),
|
|
155
|
+
hasConversationPayload: z.boolean().optional(),
|
|
156
|
+
metadata: z
|
|
157
|
+
.record(z.string(), z.union([z.string(), z.number(), z.boolean(), z.null()]))
|
|
158
|
+
.optional()
|
|
159
|
+
})
|
|
160
|
+
.strict();
|
|
161
|
+
export const auditConversationReceiptSchema = z
|
|
162
|
+
.object({
|
|
163
|
+
sessionId: z.string().min(1).max(128),
|
|
164
|
+
conversationTitle: z.string().min(1).max(256).optional(),
|
|
165
|
+
runId: z.string().min(1).max(128).optional(),
|
|
166
|
+
queueItemId: z.string().min(1).max(128).optional(),
|
|
167
|
+
inputMode: auditConversationInputModeSchema
|
|
168
|
+
})
|
|
169
|
+
.strict();
|
|
170
|
+
export const auditConversationPayloadSchema = z
|
|
171
|
+
.object({
|
|
172
|
+
conversationId: z.string().min(1).max(128).optional(),
|
|
173
|
+
conversationTitle: z.string().min(1).max(256),
|
|
174
|
+
userMessage: z.string().min(1).max(20_000),
|
|
175
|
+
queueItemId: z.string().min(1).max(128).optional()
|
|
176
|
+
})
|
|
177
|
+
.strict();
|
|
178
|
+
export const auditEventDetailSchema = auditEventSchema
|
|
179
|
+
.extend({
|
|
180
|
+
conversationPayload: auditConversationPayloadSchema.optional()
|
|
181
|
+
})
|
|
182
|
+
.strict();
|