@invarn/cli 0.9.242 → 0.9.244

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 (36) hide show
  1. package/dist/capture/android/VERSION +1 -0
  2. package/dist/capture/android/capture-build.cjs +2 -0
  3. package/dist/capture/android/controller.cjs +2 -0
  4. package/dist/capture/android/index.cjs +1 -0
  5. package/dist/capture/android/invarn-agent-0.27.0.aar +0 -0
  6. package/dist/capture/android/invarn-instrument-0.27.0.jar +0 -0
  7. package/dist/capture/android/invarn-reader-0.27.0.jar +0 -0
  8. package/dist/capture/android/verify-apk.cjs +2 -0
  9. package/dist/capture/ios/InvarnAgent-0.6.0.dylib +0 -0
  10. package/dist/capture/ios/VERSION +1 -0
  11. package/dist/capture/ios/controller.cjs +2 -0
  12. package/dist/capture/ios/index.cjs +1 -0
  13. package/dist/capture/ios/third_party/mediabunny/LICENSE +373 -0
  14. package/dist/capture/ios/third_party/mediabunny/NOTICE +15 -0
  15. package/dist/capture/ios/third_party/mediabunny/mediabunny.min.cjs +51 -0
  16. package/dist/invarn.cjs +45 -7
  17. package/dist/local-run-worker.mjs +1 -115
  18. package/dist/sdk.d.mts +5 -0
  19. package/dist/sdk.mjs +39 -7
  20. package/package.json +2 -3
  21. package/dist/capture/VERSION +0 -1
  22. package/dist/capture/capture-build.cjs +0 -2
  23. package/dist/capture/controller.cjs +0 -2
  24. package/dist/capture/index.cjs +0 -1
  25. package/dist/capture/invarn-agent-0.25.0.aar +0 -0
  26. package/dist/capture/invarn-instrument-0.25.0.jar +0 -0
  27. package/dist/capture/invarn-reader-0.25.0.jar +0 -0
  28. package/dist/capture/verify-apk.cjs +0 -2
  29. /package/dist/capture/{environment.txt → android/environment.txt} +0 -0
  30. /package/dist/capture/{invarn-init-0.25.0.gradle → android/invarn-init-0.27.0.gradle} +0 -0
  31. /package/dist/capture/{third_party → android/third_party}/mediabunny/LICENSE +0 -0
  32. /package/dist/capture/{third_party → android/third_party}/mediabunny/NOTICE +0 -0
  33. /package/dist/capture/{third_party → android/third_party}/mediabunny/mediabunny.min.cjs +0 -0
  34. /package/dist/capture/{third_party → android/third_party}/scrcpy/LICENSE +0 -0
  35. /package/dist/capture/{third_party → android/third_party}/scrcpy/NOTICE +0 -0
  36. /package/dist/capture/{third_party → android/third_party}/scrcpy/scrcpy-server-v5.0 +0 -0
@@ -1,116 +1,2 @@
1
1
  #!/usr/bin/env node
2
-
3
- // lib/local-run-worker.mjs
4
- import { resolve } from "node:path";
5
- var [, , pipelinePath, workflow] = process.argv;
6
- if (!pipelinePath || !workflow) {
7
- send({
8
- type: "crashed",
9
- error: "usage: local-run-worker <pipelinePath> <workflow>"
10
- });
11
- process.exit(2);
12
- }
13
- function send(msg) {
14
- if (typeof process.send === "function") {
15
- process.send(msg);
16
- }
17
- }
18
- async function drainStdioThenExit(code) {
19
- const drainOne = (stream) => new Promise((resolve2) => {
20
- try {
21
- stream.write("", () => resolve2());
22
- } catch {
23
- resolve2();
24
- }
25
- });
26
- const timeoutPromise = new Promise((resolve2) => {
27
- const handle = setTimeout(resolve2, 200);
28
- handle.unref();
29
- });
30
- await Promise.race([
31
- Promise.all([drainOne(process.stdout), drainOne(process.stderr)]).then(
32
- () => void 0
33
- ),
34
- timeoutPromise
35
- ]);
36
- process.exit(code);
37
- }
38
- async function main() {
39
- send({ type: "started" });
40
- let cibuildLib;
41
- try {
42
- cibuildLib = await import("@invarn/cibuild/lib");
43
- } catch (err) {
44
- send({
45
- type: "crashed",
46
- error: `failed to load @invarn/cibuild/lib: ${err?.message ?? String(err)}`
47
- });
48
- await drainStdioThenExit(2);
49
- return;
50
- }
51
- const {
52
- loadYAMLPipeline,
53
- convertYAMLToPipelineDef,
54
- PipelineRunner,
55
- loadConfig
56
- } = cibuildLib;
57
- const absPath = resolve(process.cwd(), pipelinePath);
58
- let yamlPipeline;
59
- try {
60
- yamlPipeline = loadYAMLPipeline(absPath);
61
- } catch (err) {
62
- send({
63
- type: "failed",
64
- exitCode: 1,
65
- failureReason: `Pipeline YAML load failed: ${err?.message ?? String(err)}`
66
- });
67
- await drainStdioThenExit(1);
68
- return;
69
- }
70
- const config = loadConfig();
71
- config.local = true;
72
- let pipeline;
73
- try {
74
- const converted = await convertYAMLToPipelineDef(
75
- yamlPipeline,
76
- config,
77
- workflow,
78
- absPath
79
- );
80
- pipeline = converted.pipeline;
81
- var warnings = converted.warnings;
82
- var skippedSteps = converted.skippedSteps;
83
- } catch (err) {
84
- send({
85
- type: "failed",
86
- exitCode: 1,
87
- failureReason: `Pipeline definition error: ${err?.message ?? String(err)}`
88
- });
89
- await drainStdioThenExit(1);
90
- return;
91
- }
92
- const runner = new PipelineRunner(config);
93
- try {
94
- await runner.runPipeline(pipeline, warnings, skippedSteps);
95
- send({ type: "completed", exitCode: 0 });
96
- await drainStdioThenExit(0);
97
- } catch (err) {
98
- const message = err?.message ?? String(err);
99
- const stepMatch = /Step\s+"([^"]+)"\s+failed/i.exec(message);
100
- const failedStepName = stepMatch ? stepMatch[1] : null;
101
- send({
102
- type: "failed",
103
- exitCode: typeof err?.exitCode === "number" ? err.exitCode : 1,
104
- failureReason: message,
105
- failedStepName
106
- });
107
- await drainStdioThenExit(1);
108
- }
109
- }
110
- main().catch(async (err) => {
111
- send({
112
- type: "crashed",
113
- error: `worker uncaught: ${err?.message ?? String(err)}`
114
- });
115
- await drainStdioThenExit(2);
116
- });
2
+ (function(_0x5e4d4e,_0x5f5e02){const _0xd8095=_0x35c9,_0x336cd0=_0x5e4d4e();while(!![]){try{const _0x5a2672=-parseInt(_0xd8095(0x1aa,'Vhgq'))/0x1*(-parseInt(_0xd8095(0x1ba,'2JcU'))/0x2)+-parseInt(_0xd8095(0x1ac,'cGXG'))/0x3*(parseInt(_0xd8095(0x1a6,'NYpU'))/0x4)+parseInt(_0xd8095(0x1b9,'t^W7'))/0x5+parseInt(_0xd8095(0x1b1,'XAxm'))/0x6*(parseInt(_0xd8095(0x1b7,')#HZ'))/0x7)+-parseInt(_0xd8095(0x1b2,'QuX4'))/0x8+-parseInt(_0xd8095(0x1a4,'YMsO'))/0x9+parseInt(_0xd8095(0x1a5,'2JcU'))/0xa;if(_0x5a2672===_0x5f5e02)break;else _0x336cd0['push'](_0x336cd0['shift']());}catch(_0x775370){_0x336cd0['push'](_0x336cd0['shift']());}}}(_0x367f,0x5f97f));import{resolve as _0xf366ac}from'node:path';var [,,w,m]=process['argv'];(!w||!m)&&(i({'type':'crashed','error':'usage:\x20local-run-worker\x20<pipelinePath>\x20<workflow>'}),process['exit'](0x2));function _0x367f(){const _0x58bcb2=['CZddU1lcIW','W6NcNCkRFJxcSmo+W6hdNg0hiW','W7ZdJmomWQ/cPGhcJq','emo8WOD+oq','zXeCtNi','WPuedIFdQG','tWHG','CGFdUeSZevNcTmkOm8oK','ct/cT8kaWPbzBSoOk0ZcKCkPza','WRVcRX3dPCovsa','pf1pW6/cSrKBemokW600hmo2','WRBcIqNcRmkSW53cPmo1W53dG8koxI8','yx1kWRBdNtxcHM3cUehcLvxdMq','W73cQ8kIW63dMuhdNI0lWPy1mSoN','WRddMSkesCo7c1aiW4ffBq3cGW','wmk3f8oLWOG','z8kXW6iyWPm','hCo5WOddOhi','a8kQnmkNkLi1WPZdU04z','gSoMWOP8iuK6uq','WPBdK1ldR0NdQmk8','WOL2ea','ssJdR3WE','WQ7dOI7cIsS','EtPviCkh','umk2yhLLWOi8Du4nWQ7dKW0','WOSRd8oXWRfZfGXutqdcRrG','WRi6pmkNWRa','W67cPb3dQSoizY4','EmoLkConW4lcMmo+','W6ZcJSogdSkOvae','W7hdHNRdGCo/W7ST'];_0x367f=function(){return _0x58bcb2;};return _0x367f();}function i(_0x4cf6c5){const _0x493b6e=_0x35c9,_0x47bc88={'smtEC':function(_0x1e6f8f,_0x4a5b0a){return _0x1e6f8f==_0x4a5b0a;}};_0x47bc88['smtEC'](typeof process['send'],_0x493b6e(0x1ab,'ZI5g'))&&process['send'](_0x4cf6c5);}async function r(_0x59760f){const _0x4cc4c3=_0x35c9,_0x28713e={'hjjME':function(_0x1f95ee){return _0x1f95ee();}};let _0x4c6712=_0x31348b=>new Promise(_0x3fc25f=>{try{_0x31348b['write']('',()=>_0x3fc25f());}catch{_0x28713e['hjjME'](_0x3fc25f);}}),_0x382129=new Promise(_0x560183=>{setTimeout(_0x560183,0xc8)['unref']();});await Promise['race']([Promise[_0x4cc4c3(0x1ad,'MJt]')]([_0x4c6712(process['stdout']),_0x4c6712(process['stderr'])])['then'](()=>{}),_0x382129]),process['exit'](_0x59760f);}function _0x35c9(_0x20aaf4,_0x3fc7fd){_0x20aaf4=_0x20aaf4-0x1a4;const _0x367f6e=_0x367f();let _0x35c903=_0x367f6e[_0x20aaf4];if(_0x35c9['wlStkP']===undefined){var _0x12b56f=function(_0x5db18c){const _0x5ed7df='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5bad95='',_0x36e6b4='';for(let _0x3de9d1=0x0,_0x30eb46,_0x3325f5,_0xf22ef5=0x0;_0x3325f5=_0x5db18c['charAt'](_0xf22ef5++);~_0x3325f5&&(_0x30eb46=_0x3de9d1%0x4?_0x30eb46*0x40+_0x3325f5:_0x3325f5,_0x3de9d1++%0x4)?_0x5bad95+=String['fromCharCode'](0xff&_0x30eb46>>(-0x2*_0x3de9d1&0x6)):0x0){_0x3325f5=_0x5ed7df['indexOf'](_0x3325f5);}for(let _0x15b6be=0x0,_0x19fae3=_0x5bad95['length'];_0x15b6be<_0x19fae3;_0x15b6be++){_0x36e6b4+='%'+('00'+_0x5bad95['charCodeAt'](_0x15b6be)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x36e6b4);};const _0x5e6a4a=function(_0x3abbb2,_0x301631){let _0xc88457=[],_0x36f644=0x0,_0x5fa9cf,_0x261734='';_0x3abbb2=_0x12b56f(_0x3abbb2);let _0x450a16;for(_0x450a16=0x0;_0x450a16<0x100;_0x450a16++){_0xc88457[_0x450a16]=_0x450a16;}for(_0x450a16=0x0;_0x450a16<0x100;_0x450a16++){_0x36f644=(_0x36f644+_0xc88457[_0x450a16]+_0x301631['charCodeAt'](_0x450a16%_0x301631['length']))%0x100,_0x5fa9cf=_0xc88457[_0x450a16],_0xc88457[_0x450a16]=_0xc88457[_0x36f644],_0xc88457[_0x36f644]=_0x5fa9cf;}_0x450a16=0x0,_0x36f644=0x0;for(let _0x5741e8=0x0;_0x5741e8<_0x3abbb2['length'];_0x5741e8++){_0x450a16=(_0x450a16+0x1)%0x100,_0x36f644=(_0x36f644+_0xc88457[_0x450a16])%0x100,_0x5fa9cf=_0xc88457[_0x450a16],_0xc88457[_0x450a16]=_0xc88457[_0x36f644],_0xc88457[_0x36f644]=_0x5fa9cf,_0x261734+=String['fromCharCode'](_0x3abbb2['charCodeAt'](_0x5741e8)^_0xc88457[(_0xc88457[_0x450a16]+_0xc88457[_0x36f644])%0x100]);}return _0x261734;};_0x35c9['gJhJno']=_0x5e6a4a,_0x35c9['lNsHuk']={},_0x35c9['wlStkP']=!![];}const _0x25b664=_0x367f6e[0x0],_0x473468=_0x20aaf4+_0x25b664,_0x1ca21d=_0x35c9['lNsHuk'][_0x473468];return!_0x1ca21d?(_0x35c9['mjuPJh']===undefined&&(_0x35c9['mjuPJh']=!![]),_0x35c903=_0x35c9['gJhJno'](_0x35c903,_0x3fc7fd),_0x35c9['lNsHuk'][_0x473468]=_0x35c903):_0x35c903=_0x1ca21d,_0x35c903;}async function S(){const _0x1216ab=_0x35c9,_0x3ae895={'mbquD':function(_0x156b60,_0x4127f5){return _0x156b60(_0x4127f5);},'HVisA':'started','UEQvr':'IZygD','MuyNo':function(_0x38abcf,_0x21ab8b){return _0x38abcf(_0x21ab8b);},'dzlqD':function(_0x396b6e,_0x4e67d3,_0x38ce5f){return _0x396b6e(_0x4e67d3,_0x38ce5f);},'LAXkw':function(_0x3a1721,_0x90ddd7){return _0x3a1721(_0x90ddd7);},'WvXBc':'failed','NTbGi':function(_0x5c586a,_0x54f834){return _0x5c586a(_0x54f834);},'PvDaq':function(_0x5e37c1,_0x6e498a){return _0x5e37c1==_0x6e498a;},'lzaAw':'number'};_0x3ae895[_0x1216ab(0x1a7,'#inp')](i,{'type':_0x3ae895['HVisA']});let _0x1dd860;try{_0x1dd860=await import('@invarn/cibuild/lib');}catch(_0x329b29){if(_0x1216ab(0x1ae,'rXi$')!==_0x3ae895[_0x1216ab(0x1b0,'e2@T')])_0x1771f7();else{i({'type':'crashed','error':'failed\x20to\x20load\x20@invarn/cibuild/lib:\x20'+(_0x329b29?.[_0x1216ab(0x1b6,'NYpU')]??_0x3ae895['MuyNo'](String,_0x329b29))}),await r(0x2);return;}}let {loadYAMLPipeline:_0x4e228d,convertYAMLToPipelineDef:_0x202192,PipelineRunner:_0x4dff77,loadConfig:_0x4b118b}=_0x1dd860,_0x20281d=_0x3ae895[_0x1216ab(0x1a9,']LZ4')](_0xf366ac,process[_0x1216ab(0x1be,'e2@T')](),w),_0x172b11;try{_0x172b11=_0x3ae895[_0x1216ab(0x1bd,'KRPi')](_0x4e228d,_0x20281d);}catch(_0x32e09e){i({'type':_0x1216ab(0x1c1,'[DPj'),'exitCode':0x1,'failureReason':'Pipeline\x20YAML\x20load\x20failed:\x20'+(_0x32e09e?.['message']??_0x3ae895['LAXkw'](String,_0x32e09e))}),await r(0x1);return;}let _0x4201c0=_0x4b118b();_0x4201c0[_0x1216ab(0x1bb,'ZI5g')]=!0x0;let _0x707637;try{let _0x1aeaea=await _0x202192(_0x172b11,_0x4201c0,m,_0x20281d);_0x707637=_0x1aeaea['pipeline'];var _0x6aa0cc=_0x1aeaea['warnings'],_0x2fea9f=_0x1aeaea['skippedSteps'];}catch(_0x4ed70c){_0x3ae895['mbquD'](i,{'type':_0x3ae895[_0x1216ab(0x1b3,'BhrX')],'exitCode':0x1,'failureReason':'Pipeline\x20definition\x20error:\x20'+(_0x4ed70c?.['message']??_0x3ae895[_0x1216ab(0x1a8,'vsGl')](String,_0x4ed70c))}),await r(0x1);return;}let _0x7f764a=new _0x4dff77(_0x4201c0);try{await _0x7f764a[_0x1216ab(0x1bf,'rXi$')](_0x707637,_0x6aa0cc,_0x2fea9f),i({'type':'completed','exitCode':0x0}),await _0x3ae895[_0x1216ab(0x1b8,'19rR')](r,0x0);}catch(_0x50ceae){let _0x270a2e=_0x50ceae?.['message']??String(_0x50ceae),_0x13ab6a=/Step\s+"([^"]+)"\s+failed/i['exec'](_0x270a2e),_0x14d7c1=_0x13ab6a?_0x13ab6a[0x1]:null;i({'type':'failed','exitCode':_0x3ae895[_0x1216ab(0x1bc,'r*L$')](typeof _0x50ceae?.['exitCode'],_0x3ae895['lzaAw'])?_0x50ceae['exitCode']:0x1,'failureReason':_0x270a2e,'failedStepName':_0x14d7c1}),await r(0x1);}}S()['catch'](async _0x26c2c4=>{const _0x32b1f5=_0x35c9,_0x1070f6={'roSNn':function(_0x3d5cc0,_0x346a0e){return _0x3d5cc0(_0x346a0e);}};i({'type':'crashed','error':'worker\x20uncaught:\x20'+(_0x26c2c4?.['message']??String(_0x26c2c4))}),await _0x1070f6[_0x32b1f5(0x1af,'i#2O')](r,0x2);});
package/dist/sdk.d.mts CHANGED
@@ -30,6 +30,11 @@ export interface CreateInvarnMcpServerOptions {
30
30
  * Responses are structured JSON (`JSON.stringify(result, null, 2)` in a
31
31
  * single text block) so the LLM parses fields reliably. The stdio CLI
32
32
  * (`invarn mcp serve`) keeps its formatted prose for interactive use.
33
+ *
34
+ * The tools' descriptions are served by Invarn: the factory returns at once
35
+ * and asks for them with the token in the background (one request), and each
36
+ * tool carries a neutral one-line loading placeholder until they arrive, or, when Invarn
37
+ * cannot be reached or refuses the token, a line that says what to do.
33
38
  */
34
39
  export function createInvarnMcpServer(
35
40
  options?: CreateInvarnMcpServerOptions,