nolo-cli 0.231.0-alpha.1 → 0.240.0-alpha.3

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.
Files changed (190) hide show
  1. package/{_executeModel-7V3NSK4W.js → _executeModel-5NA4USGG.js} +56 -51
  2. package/{action-GDZDXPMB.js → action-X75O3XPH.js} +7 -4
  3. package/{addContentAction-7RO4AMRI.js → addContentAction-GVC77QSN.js} +9 -8
  4. package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-KKDVAMW3.js} +12 -11
  5. package/{agentDeleteCommand-MD76OMLN.js → agentDeleteCommand-2RFGKFAB.js} +77 -69
  6. package/{agentEmailCommands-T4TW4IBX.js → agentEmailCommands-GQCQKKOR.js} +84 -72
  7. package/{agentListCommands-4WLG32IW.js → agentListCommands-HSGLDPDQ.js} +40 -47
  8. package/{agentMachineCommands-LSDGA5WR.js → agentMachineCommands-BISF6PVV.js} +26 -22
  9. package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-O3Q25PKU.js} +2 -2
  10. package/{agentPullCommand-KHV4EELF.js → agentPullCommand-G6U2LHMW.js} +1 -1
  11. package/{agentRecordCommands-7TEX2B7Y.js → agentRecordCommands-AOXPGYAJ.js} +79 -67
  12. package/{agentRunCommand-23SMDVDW.js → agentRunCommand-AFAIP7U7.js} +85 -72
  13. package/{agentRunControl-MBG4U6SL.js → agentRunControl-VBL7UFSG.js} +1 -1
  14. package/{agentRuntimeLocal-HOXKWCYO.js → agentRuntimeLocal-T7BX2WGL.js} +24 -19
  15. package/{agentSlice-AATYVDP6.js → agentSlice-XJNKE3PG.js} +10 -9
  16. package/{appDeleteCommands-WWCC6WA5.js → appDeleteCommands-LURUSPY7.js} +27 -23
  17. package/{appDeployCommands-AU4IUN33.js → appDeployCommands-SMEW4AK2.js} +27 -23
  18. package/{appDeployStatusCommands-STUW7WXL.js → appDeployStatusCommands-VYPJTBJK.js} +27 -23
  19. package/{appGetCommands-BGTLIQ4K.js → appGetCommands-N4NI5GGJ.js} +27 -23
  20. package/{appListCommands-CUCPRUXW.js → appListCommands-5C6ONN3Z.js} +27 -23
  21. package/{authCommand-3SUYUNQV.js → authCommand-4CVBDADE.js} +15 -13
  22. package/{authCommands-BLE7ETZH.js → authCommands-EHU2BHOX.js} +7 -5
  23. package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-AYWYQVA4.js} +3 -3
  24. package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-CSDG2HYN.js} +1 -1
  25. package/{chunk-HHFGE2WF.js → chunk-2574ANSV.js} +1 -1
  26. package/chunk-2SXN7LAY.js +15 -0
  27. package/{chunk-S6FDXXZV.js → chunk-3EMIEC27.js} +1 -1
  28. package/{chunk-EXNV7CCV.js → chunk-3FBAVU2Y.js} +11 -9
  29. package/{chunk-ZH3KXFHS.js → chunk-4FIO2S7Z.js} +1 -1
  30. package/{chunk-U4FF7LRY.js → chunk-4IQVE43Z.js} +30 -26
  31. package/{chunk-VQ5N5GSV.js → chunk-4Q6HQORG.js} +1 -1
  32. package/{chunk-P2ZLUIW2.js → chunk-4X5AVCM7.js} +94 -4
  33. package/chunk-4ZCTKB27.js +31 -0
  34. package/{chunk-42OKN2LI.js → chunk-5HUO7SEX.js} +9 -107
  35. package/{chunk-QYB23WUH.js → chunk-5QZSEQSK.js} +1 -1
  36. package/{chunk-7JGMNKKG.js → chunk-6CKUO32A.js} +8 -0
  37. package/chunk-6D25V6CB.js +133 -0
  38. package/{chunk-LHN7NIQZ.js → chunk-6WOLPIPY.js} +93 -90
  39. package/{chunk-6QHKRARD.js → chunk-6WZVM33D.js} +9 -4
  40. package/{chunk-NVEYEKN3.js → chunk-7AJRJGSQ.js} +254 -359
  41. package/chunk-7NIBQ4HY.js +138 -0
  42. package/{chunk-7Z6EW7AH.js → chunk-7TTMMOKH.js} +13 -6
  43. package/{chunk-GXZ5LB7H.js → chunk-A3LUWRQK.js} +4 -4
  44. package/{chunk-4ZGPHFLE.js → chunk-A5EVA6HU.js} +2 -2
  45. package/{chunk-57TLKTVZ.js → chunk-A74QP4FI.js} +566 -104
  46. package/{chunk-3ING4D5X.js → chunk-AEQMKYZN.js} +4 -4
  47. package/{chunk-FFSPUVL5.js → chunk-AH5R7BYW.js} +6 -166
  48. package/{chunk-7FEP5USX.js → chunk-ANJRDS6U.js} +3 -3
  49. package/{chunk-YFLVRVYK.js → chunk-AVJDELEA.js} +1 -1
  50. package/{chunk-HYLRQDEE.js → chunk-B5SV4H3J.js} +6 -6
  51. package/{chunk-KUOMUZH6.js → chunk-B7DE5XJW.js} +137 -290
  52. package/chunk-BEM6LPD2.js +734 -0
  53. package/{chunk-DUUDXSLX.js → chunk-BGGAY6OK.js} +27 -3
  54. package/{chunk-YCFP57LH.js → chunk-BGGV6B5O.js} +408 -230
  55. package/{chunk-BP5ZJ6B4.js → chunk-BIABIPGW.js} +1 -1
  56. package/{chunk-TQEKUOTI.js → chunk-BXSMFPTG.js} +4 -4
  57. package/{chunk-RG2DGNL6.js → chunk-CKZPMJNU.js} +3 -3
  58. package/{chunk-WU443D7A.js → chunk-CVJRVBJL.js} +2 -2
  59. package/{chunk-BIWI5M4E.js → chunk-D374I563.js} +1 -1
  60. package/{chunk-QRGDJA4B.js → chunk-DNZ4JJ7C.js} +1 -1
  61. package/chunk-DVYAFH2Q.js +103 -0
  62. package/{chunk-FTMFO6LI.js → chunk-DXW5WDHZ.js} +4 -4
  63. package/{chunk-ZTR65O4L.js → chunk-E5KJOZWY.js} +3 -3
  64. package/{chunk-G7IUT2V3.js → chunk-EBKHA63G.js} +103 -12
  65. package/{chunk-DGYCDA6W.js → chunk-F3XI6WQP.js} +17 -10
  66. package/{chunk-M3OZRQNH.js → chunk-F6YWDVIB.js} +1 -1
  67. package/{chunk-PR2LAQAC.js → chunk-FFYE5ATM.js} +4 -4
  68. package/{chunk-6NNDUDAZ.js → chunk-FZKA3XFA.js} +11 -11
  69. package/{chunk-MNEZUL5S.js → chunk-G22P367E.js} +31 -14
  70. package/{chunk-6OQMSPB7.js → chunk-GDUC4VS2.js} +7 -7
  71. package/{chunk-R6Z5S5GA.js → chunk-GXXY2NL3.js} +16 -14
  72. package/{chunk-U2HBB7RS.js → chunk-H7ZYKHAZ.js} +27 -7
  73. package/{chunk-3U44JB3O.js → chunk-HCNOO374.js} +1 -1
  74. package/{chunk-HSSBDZLD.js → chunk-HOM6LTEW.js} +1 -1
  75. package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
  76. package/{chunk-TPG2DPN2.js → chunk-IJTXNLQE.js} +9 -9
  77. package/{chunk-ALAES342.js → chunk-IUMS6F53.js} +2 -2
  78. package/{chunk-547ENH5T.js → chunk-IUTUWIKE.js} +2 -2
  79. package/{chunk-S6K5F3KP.js → chunk-JBWXPACD.js} +1 -1
  80. package/{chunk-XAG3FWBE.js → chunk-KZPEGO6D.js} +1 -1
  81. package/{chunk-RBPUNSG5.js → chunk-LYDEFPQP.js} +18 -108
  82. package/{chunk-OWKNSIXL.js → chunk-MECDGHLK.js} +271 -66
  83. package/{chunk-FJSNBZXR.js → chunk-MM73SP4K.js} +1 -1
  84. package/{chunk-XSW4EXQV.js → chunk-MYOSN6BT.js} +2 -2
  85. package/{chunk-ZEVQHCLM.js → chunk-MYPKBJJO.js} +2 -2
  86. package/{chunk-DBUR22G5.js → chunk-N2JROHD3.js} +4 -4
  87. package/{chunk-ATEKLSLR.js → chunk-O6IPRAVV.js} +14 -9
  88. package/{chunk-PPJYZRSQ.js → chunk-OX6GNNVT.js} +6 -1
  89. package/{chunk-WFVASLQT.js → chunk-P3IZUMIC.js} +1 -1
  90. package/{chunk-FPBJM2BW.js → chunk-PGKA77TZ.js} +26 -20
  91. package/{chunk-IONGMVPY.js → chunk-PRMEU7BT.js} +229 -7
  92. package/{chunk-OJ45MEEI.js → chunk-PROOOQZ3.js} +1 -1
  93. package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
  94. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  95. package/chunk-RETQOQ4D.js +33394 -0
  96. package/{chunk-CMMI3DAT.js → chunk-RM4UMFY4.js} +33 -26
  97. package/{chunk-262R3XNN.js → chunk-S2MHR4PU.js} +151 -5
  98. package/{chunk-DEA37IUY.js → chunk-T6VROBY7.js} +2 -2
  99. package/{chunk-M4SFKP5L.js → chunk-TEMLHVGX.js} +1 -1
  100. package/{chunk-3QIYD3VM.js → chunk-TRHJ4NJB.js} +61 -792
  101. package/{chunk-OBIC6EG7.js → chunk-TWTJV35S.js} +1 -1
  102. package/{chunk-TCZ2VJZQ.js → chunk-U3G7RRXJ.js} +5 -5
  103. package/{chunk-F6Z6ZCUV.js → chunk-UFC4J7OY.js} +3 -3
  104. package/{chunk-5YMA6DDZ.js → chunk-UHW6SCVK.js} +1 -1
  105. package/{chunk-4N6G2CKP.js → chunk-ULLHVDTZ.js} +46 -1
  106. package/{chunk-XFXFPUO7.js → chunk-VM72HKW2.js} +7 -7
  107. package/{chunk-MHHLABT3.js → chunk-VREG6ANQ.js} +102 -99
  108. package/chunk-VSRISJXZ.js +107 -0
  109. package/chunk-WDWZPASX.js +29 -0
  110. package/{chunk-ILHQ2AXT.js → chunk-WRKMXMU7.js} +2 -0
  111. package/chunk-X7IA2B7R.js +166 -0
  112. package/{chunk-5ZMIIR23.js → chunk-XBAEM4RI.js} +7 -0
  113. package/{chunk-4JVNURX4.js → chunk-XS5A3EKX.js} +1 -23
  114. package/{chunk-N5Z2V73W.js → chunk-Y2MF4DCJ.js} +1 -1
  115. package/{chunk-KUDCKVYQ.js → chunk-Y5OWZQMJ.js} +28 -19
  116. package/{chunk-TI2EPRHE.js → chunk-YGCOJNFZ.js} +3 -3
  117. package/{chunk-JQZRSXS5.js → chunk-YGDYYFRX.js} +9 -13
  118. package/{chunk-X7QAIY5B.js → chunk-Z2WZAE4P.js} +128 -150
  119. package/chunk-Z6YTCDU4.js +24 -0
  120. package/{chunk-RRDRQOEC.js → chunk-ZEKUFJLW.js} +81 -66
  121. package/{chunk-EVGU5P4U.js → chunk-ZVOL2MAJ.js} +1 -1
  122. package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-U5OAVAKQ.js} +2 -2
  123. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-S42VMGB6.js} +1 -1
  124. package/{cliLocalAgentRecordReader-H3HYQRRR.js → cliLocalAgentRecordReader-HVZAQCUD.js} +29 -25
  125. package/{commandRegistry-35EMLPIZ.js → commandRegistry-TME7INFU.js} +89 -85
  126. package/{contentThunks-BCNMGA5J.js → contentThunks-U6OC4R2N.js} +23 -22
  127. package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-U7XSRVJP.js} +1 -1
  128. package/{createAgentAutomationAction-HEU4KOYF.js → createAgentAutomationAction-IP4LFN3W.js} +23 -22
  129. package/{createDialogAction-5DSL5ESZ.js → createDialogAction-IAGQJ3LH.js} +24 -23
  130. package/{createPageAction-BBZ25AFI.js → createPageAction-AZ3UIFKA.js} +24 -23
  131. package/{dbSlice-XRUZOGSU.js → dbSlice-DKKMJJYY.js} +8 -7
  132. package/{deleteFile-6URDHYRB.js → deleteFile-TQSONMVU.js} +7 -4
  133. package/{dialogCommands-6SZD4TYP.js → dialogCommands-PCDRMBWG.js} +30 -26
  134. package/dialogMessageRecord-OAV77LT7.js +7 -0
  135. package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-O35MWMOS.js} +3 -3
  136. package/{dialogSlice-QJ5PQOM3.js → dialogSlice-QAKYN4DE.js} +22 -21
  137. package/{dialogUsageCommand-W2WCSGKF.js → dialogUsageCommand-2SSLTXKO.js} +2 -2
  138. package/{docCreateCommands-25E6PGN3.js → docCreateCommands-CFQFZOAD.js} +26 -22
  139. package/{docDeleteCommands-F7ZVGEHW.js → docDeleteCommands-5CPNTIIS.js} +27 -23
  140. package/{docReadCommands-JY2E5XEN.js → docReadCommands-XQILYSAJ.js} +26 -22
  141. package/{docStore-XJ4UMU3C.js → docStore-GIVRT7TQ.js} +10 -9
  142. package/{docUpdateCommands-OZ4CUSIQ.js → docUpdateCommands-VETKSUDD.js} +26 -22
  143. package/{handleSendMessageAction-YHAOXARI.js → handleSendMessageAction-HKIW4ZNO.js} +48 -45
  144. package/{hostCredentialCreate-62AWCBQC.js → hostCredentialCreate-6VDJFNDO.js} +81 -68
  145. package/index.js +8 -8
  146. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  147. package/{localRuntimeAdapter-KNQNNHUM.js → localRuntimeAdapter-BQ4F5PZV.js} +81 -69
  148. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-WCNA4A3G.js} +4 -2
  149. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-CRNIBOOM.js} +1 -1
  150. package/{machineCommands-X2FMPSV4.js → machineCommands-K6XIGOAD.js} +77 -65
  151. package/{machineWsRunDispatch-XHTPOYVJ.js → machineWsRunDispatch-4OO7Z6UM.js} +77 -65
  152. package/mcpLocalAuthorizeCommand-ZP6ESAGE.js +106 -0
  153. package/{memberThunks-7Y3OYSJQ.js → memberThunks-PBJPZ2JU.js} +15 -10
  154. package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
  155. package/package.json +1 -1
  156. package/{projectArchive-NPQ3YOAV.js → projectArchive-G7AOQPRW.js} +24 -23
  157. package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-OPBCAONX.js} +1 -1
  158. package/{providerRegistry-ZI2KORJ7.js → providerRegistry-J2HCVTHE.js} +1 -1
  159. package/{read-TYMBGEXO.js → read-JEGPITEW.js} +6 -5
  160. package/{readDocTool-SKQVHBLO.js → readDocTool-TE3XIU4Y.js} +1 -1
  161. package/{readlineWorkspace-77PILYDH.js → readlineWorkspace-SOW5QUGZ.js} +2935 -2376
  162. package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-CX3OAH4Y.js} +14 -13
  163. package/{runAgentClientLoop-XNKAXUKU.js → runAgentClientLoop-HQJPDFGQ.js} +65 -45
  164. package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-GUH2YGMH.js} +3 -3
  165. package/{secretCommands-KZWBZIYS.js → secretCommands-NJXFVHZU.js} +2 -2
  166. package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-CGM67EEQ.js} +11 -10
  167. package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-3ABWPPXR.js} +14 -13
  168. package/{settingThunks-ZRGWVGZD.js → settingThunks-AY76OHYX.js} +176 -57
  169. package/{skillDiscovery-BHHPCUHZ.js → skillDiscovery-MDDKPTW3.js} +4 -3
  170. package/{spaceCommands-TOGSGCPS.js → spaceCommands-G63QGYQO.js} +25 -21
  171. package/{streamAgentChatTurn-IARUEZPU.js → streamAgentChatTurn-E3XH2KFD.js} +127 -85
  172. package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-G6EZRKCQ.js} +12 -11
  173. package/{tableCommands-FTAOCBTX.js → tableCommands-JI75ZHDI.js} +4 -1
  174. package/{toolApiClient-OGQEBQVX.js → toolApiClient-62UUPDUA.js} +3 -5
  175. package/{tools-5UWS65PB.js → tools-7RSX22FT.js} +41 -37
  176. package/{tuiRestart-2IL37YIB.js → tuiRestart-KAAA7TND.js} +2 -2
  177. package/{tuiSummaryLlmCaller-R4H3ZZ52.js → tuiSummaryLlmCaller-BVNHMWLR.js} +5 -5
  178. package/{updateCommands-CPATDG6J.js → updateCommands-ASK5XYPH.js} +3 -3
  179. package/{updateDialogTitleAction-G6C6XVNV.js → updateDialogTitleAction-SEWV252V.js} +23 -22
  180. package/{usageCommand-2BF74MKF.js → usageCommand-JVT5J3DC.js} +2 -2
  181. package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-IZYYUTEW.js} +3 -3
  182. package/webapi-24RZDIIQ.js +2488 -0
  183. package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-BSDIS2J5.js} +2 -2
  184. package/workContext-MM3P5GP5.js +13 -0
  185. package/workContextAccess-UZHDLBUR.js +11 -0
  186. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  187. package/chunk-ZXF6D3I6.js +0 -359
  188. package/{accountResolver-QETKNC7T.js → accountResolver-EK2S4PWF.js} +3 -3
  189. package/{localDialogRead-CCOCVGAP.js → localDialogRead-AV2VKKPG.js} +0 -0
  190. package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-YIZ7KLUP.js} +5 -5
@@ -0,0 +1,138 @@
1
+ // packages/agent-runtime/mcpConnectionSpecs.ts
2
+ var MCP_TOOL_NAMES = Object.freeze(["listMcpConnections", "listMcpTools", "callMcpTool"]);
3
+ var failure = (code) => ({ ok: false, error: { code } });
4
+ function sameMcpPlacement(a, b) {
5
+ return a.kind === b.kind && (a.kind !== "machine" || b.kind === "machine" && a.machineId === b.machineId);
6
+ }
7
+ function freezeSchema(value) {
8
+ for (const child of Object.values(value)) if (child && typeof child === "object") freezeSchema(child);
9
+ return Object.freeze(value);
10
+ }
11
+ var text = (maxLength) => ({ type: "string", minLength: 1, maxLength, pattern: "^[^\\u0000-\\u001f\\u007f]+$" });
12
+ var idSchema = { ...text(128), pattern: "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$" };
13
+ var refSchema = { ...text(128), pattern: "^[A-Za-z0-9][A-Za-z0-9_:-]{0,127}$" };
14
+ var revisionSchema = { type: "integer", minimum: 1, maximum: Number.MAX_SAFE_INTEGER };
15
+ var objectSchema = (properties, required = Object.keys(properties)) => ({ type: "object", properties, required, additionalProperties: false });
16
+ var placements = { type: "object", required: ["kind"], properties: { kind: { const: "local" } }, additionalProperties: false };
17
+ var MCP_CONNECTION_WRITE_SCHEMA = {
18
+ type: "object",
19
+ required: ["schemaVersion", "label", "enabled", "placement", "transport", "auth", "allowedToolNames", "readPolicies"],
20
+ properties: {
21
+ schemaVersion: { const: 1 },
22
+ label: { type: "string", minLength: 1, maxLength: 160, pattern: "^[^:/\\\\\\r\\n]+$" },
23
+ enabled: { type: "boolean" },
24
+ presetId: { enum: ["zoho-mail"] },
25
+ placement: placements,
26
+ allowedToolNames: { type: "array", maxItems: 256, items: text(160) },
27
+ readPolicies: { type: "array", maxItems: 256, items: { type: "object", required: ["toolName", "arguments"], properties: { toolName: text(160), arguments: { type: "object", maxProperties: 128, additionalProperties: { type: "array", maxItems: 256 } } }, additionalProperties: false } },
28
+ transport: { type: "object", required: ["kind", "endpointRef"], properties: { kind: { const: "streamable-http" }, endpointRef: refSchema }, additionalProperties: false },
29
+ auth: { oneOf: [{ type: "object", required: ["kind"], properties: { kind: { const: "oauth" } }, additionalProperties: false }, { type: "object", required: ["kind"], properties: { kind: { const: "none" } }, additionalProperties: false }, { type: "object", required: ["kind", "credentialRef"], properties: { kind: { const: "bearer" }, credentialRef: refSchema }, additionalProperties: false }] }
30
+ },
31
+ additionalProperties: false
32
+ };
33
+ var MCP_CONNECTION_UPDATE_SCHEMA = freezeSchema(objectSchema({
34
+ connectionId: idSchema,
35
+ expectedRevision: revisionSchema,
36
+ connection: MCP_CONNECTION_WRITE_SCHEMA
37
+ }));
38
+ var MCP_LIST_TOOLS_INPUT_SCHEMA = freezeSchema(objectSchema({
39
+ connectionId: idSchema,
40
+ expectedRevision: revisionSchema,
41
+ cursor: text(2048)
42
+ }, ["connectionId", "expectedRevision"]));
43
+ var MCP_CALL_TOOL_INPUT_SCHEMA = freezeSchema(objectSchema({
44
+ connectionId: idSchema,
45
+ expectedRevision: revisionSchema,
46
+ catalogRevision: idSchema,
47
+ toolName: text(256),
48
+ arguments: { type: "object", additionalProperties: {} }
49
+ }));
50
+ function isRecord(value) {
51
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
52
+ return Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null;
53
+ }
54
+ function matches(schema, value) {
55
+ if (schema.oneOf && schema.oneOf.filter((branch) => matches(branch, value)).length !== 1) return false;
56
+ if (schema.const !== void 0 && value !== schema.const) return false;
57
+ if (schema.enum && (typeof value !== "string" || !schema.enum.includes(value))) return false;
58
+ switch (schema.type) {
59
+ case "string":
60
+ return typeof value === "string" && value.length >= (schema.minLength ?? 0) && value.length <= (schema.maxLength ?? Infinity) && (!schema.pattern || new RegExp(schema.pattern, "u").test(value));
61
+ case "integer":
62
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= (schema.minimum ?? -Infinity) && value <= (schema.maximum ?? Infinity);
63
+ case "boolean":
64
+ return typeof value === "boolean";
65
+ case "array":
66
+ return Array.isArray(value) && value.length <= (schema.maxItems ?? Infinity) && value.every((item) => !schema.items || matches(schema.items, item));
67
+ case "object": {
68
+ if (!isRecord(value) || Object.keys(value).length > (schema.maxProperties ?? Infinity)) return false;
69
+ if (schema.required?.some((key) => !Object.hasOwn(value, key))) return false;
70
+ return Object.entries(value).every(([key, entry]) => {
71
+ if (schema.propertyNames && !matches(schema.propertyNames, key)) return false;
72
+ const property = schema.properties && Object.hasOwn(schema.properties, key) ? schema.properties[key] : schema.additionalProperties;
73
+ return property === void 0 || property === false ? property !== false : matches(property, entry);
74
+ });
75
+ }
76
+ default:
77
+ return true;
78
+ }
79
+ }
80
+ function isBoundedJson(value, depth = 0, budget = { nodes: 0, chars: 0 }) {
81
+ if (++budget.nodes > 1e4 || depth > 32) return false;
82
+ if (typeof value === "string") return (budget.chars += value.length) <= 262144;
83
+ if (value === null || typeof value === "boolean") return true;
84
+ if (typeof value === "number") return Number.isFinite(value);
85
+ if (!Array.isArray(value) && !isRecord(value)) return false;
86
+ return Object.entries(Object.getOwnPropertyDescriptors(value)).every(([key, descriptor]) => {
87
+ if (Array.isArray(value) && key === "length") return true;
88
+ if (["__proto__", "prototype", "constructor"].includes(key) || !Object.hasOwn(descriptor, "value")) return false;
89
+ budget.chars += key.length;
90
+ return budget.chars <= 262144 && isBoundedJson(descriptor.value, depth + 1, budget);
91
+ });
92
+ }
93
+ function parse(schema, value) {
94
+ if (!isBoundedJson(value) || !matches(schema, value)) return failure("invalid_input");
95
+ return { ok: true, value: JSON.parse(JSON.stringify(value)) };
96
+ }
97
+ function parseMcpConnectionWrite(value) {
98
+ const parsed = parse(MCP_CONNECTION_WRITE_SCHEMA, value);
99
+ if (!parsed.ok) {
100
+ if (isRecord(value) && Object.getOwnPropertyDescriptor(value, "schemaVersion")?.value !== void 0 && Object.getOwnPropertyDescriptor(value, "schemaVersion")?.value !== 1) return failure("unsupported_version");
101
+ return parsed;
102
+ }
103
+ const connection = parsed.value;
104
+ if (new Set(connection.allowedToolNames).size !== connection.allowedToolNames.length || new Set(connection.readPolicies.map((p) => p.toolName)).size !== connection.readPolicies.length || connection.readPolicies.some((p) => !connection.allowedToolNames.includes(p.toolName))) return failure("invalid_input");
105
+ return parsed;
106
+ }
107
+ function parseMcpListToolsInput(value) {
108
+ return parse(MCP_LIST_TOOLS_INPUT_SCHEMA, value);
109
+ }
110
+ function parseMcpCallToolInput(value) {
111
+ return parse(MCP_CALL_TOOL_INPUT_SCHEMA, value);
112
+ }
113
+ function toMcpConnectionSummary(connection) {
114
+ return {
115
+ schemaVersion: 1,
116
+ id: connection.id,
117
+ label: connection.label,
118
+ enabled: connection.enabled,
119
+ revision: connection.revision,
120
+ ...connection.presetId ? { presetId: connection.presetId } : {},
121
+ placement: connection.placement.kind === "machine" ? { kind: "machine", machineId: connection.placement.machineId } : { kind: connection.placement.kind },
122
+ transportKind: connection.transport.kind,
123
+ authKind: connection.auth.kind,
124
+ endpointConfigured: true,
125
+ credentialConfigured: connection.auth.kind === "bearer"
126
+ };
127
+ }
128
+
129
+ export {
130
+ MCP_TOOL_NAMES,
131
+ sameMcpPlacement,
132
+ MCP_LIST_TOOLS_INPUT_SCHEMA,
133
+ MCP_CALL_TOOL_INPUT_SCHEMA,
134
+ parseMcpConnectionWrite,
135
+ parseMcpListToolsInput,
136
+ parseMcpCallToolInput,
137
+ toMcpConnectionSummary
138
+ };
@@ -1,3 +1,7 @@
1
+ import {
2
+ googleSessionRequestToken,
3
+ isGoogleAuthoritySession
4
+ } from "./chunk-ULLHVDTZ.js";
1
5
  import {
2
6
  selectIdentityToken
3
7
  } from "./chunk-PXYBUFDB.js";
@@ -2191,17 +2195,17 @@ var logRequestFailure = (level, message) => {
2191
2195
  console.error(message);
2192
2196
  };
2193
2197
  var noloRequest = async (server, config, state, signal) => {
2194
- const headers = config.headers || {
2195
- "Content-Type": "application/json"
2196
- };
2198
+ const headers = { ...config.headers || { "Content-Type": "application/json" } };
2197
2199
  const token = selectIdentityToken(state) ?? null;
2198
- if (token) {
2199
- headers["Authorization"] = `Bearer ${token}`;
2200
+ const requestToken = googleSessionRequestToken(token ?? void 0, server);
2201
+ if (requestToken) {
2202
+ headers["Authorization"] = `Bearer ${requestToken}`;
2200
2203
  }
2201
2204
  return fetch(server + config.url, {
2202
2205
  method: config.method || "GET",
2203
2206
  headers,
2204
2207
  body: config.body,
2208
+ ...isGoogleAuthoritySession(token) ? { credentials: "omit", redirect: "error" } : {},
2205
2209
  signal,
2206
2210
  // 传递 AbortSignal
2207
2211
  ...config.keepalive ? { keepalive: true } : {}
@@ -2302,7 +2306,9 @@ var xhrUploadRequest = (url, formData, state, onProgress, signal) => new Promise
2302
2306
  });
2303
2307
  var noloUploadRequest = async (server, uploadConfig, state, signal, onProgress) => {
2304
2308
  const { file, metadata, customKey, userId } = uploadConfig;
2309
+ const googleSession = isGoogleAuthoritySession(selectIdentityToken(state));
2305
2310
  try {
2311
+ googleSessionRequestToken(selectIdentityToken(state) ?? void 0, server);
2306
2312
  const isReactNative = typeof navigator !== "undefined" && navigator.product === "ReactNative";
2307
2313
  const isRNFile = (f) => f && typeof f.uri === "string" && typeof f.name === "string" && typeof f.type === "string";
2308
2314
  if (isReactNative && isRNFile(file)) {
@@ -2328,7 +2334,7 @@ var noloUploadRequest = async (server, uploadConfig, state, signal, onProgress)
2328
2334
  if (userId) {
2329
2335
  formData.append("userId", userId);
2330
2336
  }
2331
- if (onProgress && typeof XMLHttpRequest !== "undefined") {
2337
+ if (onProgress && !googleSession && typeof XMLHttpRequest !== "undefined") {
2332
2338
  const result = await xhrUploadRequest(
2333
2339
  server + `${API_ENDPOINTS.DATABASE}/upload`,
2334
2340
  formData,
@@ -2361,6 +2367,7 @@ var noloUploadRequest = async (server, uploadConfig, state, signal, onProgress)
2361
2367
  `Upload request failed for ${customKey} on ${server}: HTTP ${response.status}`
2362
2368
  );
2363
2369
  }
2370
+ if (response.ok && googleSession && onProgress) onProgress(file.size, file.size);
2364
2371
  return response.ok;
2365
2372
  } catch (error) {
2366
2373
  if (!isAbortError(error)) {
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-TUSTONB3.js";
4
4
  import {
5
5
  getReadableCliDb
6
- } from "./chunk-YFLVRVYK.js";
6
+ } from "./chunk-AVJDELEA.js";
7
7
  import {
8
8
  clearCliLocalRuntimePreparedAgentCache
9
- } from "./chunk-NVEYEKN3.js";
9
+ } from "./chunk-7AJRJGSQ.js";
10
10
  import {
11
11
  readCredentialAvailability
12
12
  } from "./chunk-WWTSEBDF.js";
@@ -25,7 +25,7 @@ import {
25
25
  resolveAgentRecordFromHybridStore,
26
26
  sanitizeAgentRecordForCliOutput,
27
27
  writeAgentRecord
28
- } from "./chunk-TQEKUOTI.js";
28
+ } from "./chunk-BXSMFPTG.js";
29
29
  import {
30
30
  resolveCliAgentKeyInput
31
31
  } from "./chunk-BR3GT6MR.js";
@@ -256,7 +256,7 @@ async function runAgentCreateCommand(args, deps = {}) {
256
256
  let verifyResult;
257
257
  if (parsed.verify) {
258
258
  try {
259
- const { verifyCustomProvider } = await import("./agentProviderCommands-STI3DQ6A.js");
259
+ const { verifyCustomProvider } = await import("./agentProviderCommands-O3Q25PKU.js");
260
260
  const rec = built.nextRecord;
261
261
  const verifyCredentialRef = typeof rec.credentialRef === "string" && rec.credentialRef.trim() ? rec.credentialRef.trim() : "";
262
262
  if (verifyCredentialRef) {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-R6Z5S5GA.js";
4
+ } from "./chunk-GXXY2NL3.js";
5
5
  import {
6
6
  fetchFromClientDb
7
- } from "./chunk-4N6G2CKP.js";
7
+ } from "./chunk-ULLHVDTZ.js";
8
8
  import {
9
9
  selectIdentityToken
10
10
  } from "./chunk-PXYBUFDB.js";