@treasuredata/tdx 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.d.ts.map +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-command.js.map +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/llm-proxy.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-push-command.js.map +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.d.ts +37 -0
- package/dist/commands/workflow-command.d.ts.map +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/commands/workflow-command.js.map +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/proxy/anthropic-adapter.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/context-signature.js +1 -1
- package/dist/proxy/conversation-utils.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.d.ts +19 -3
- package/dist/sdk/journey.d.ts.map +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/journey.js.map +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-aliases.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.d.ts.map +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/pull-workflow.js.map +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.d.ts +1 -1
- package/dist/sdk/workflow/index.d.ts.map +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/index.js.map +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/port.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/commands/tables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a35_0x375d5f=a35_0x4242;(function(_0x4adfbe,_0x36d155){const _0x163564=a35_0x4242,_0x59ab95=_0x4adfbe();while(!![]){try{const _0x13b0ef=parseInt(_0x163564(0x1dd))/0x1+parseInt(_0x163564(0x1e3))/0x2+-parseInt(_0x163564(0x1f4))/0x3*(-parseInt(_0x163564(0x1e2))/0x4)+parseInt(_0x163564(0x1e9))/0x5+-parseInt(_0x163564(0x1f2))/0x6+parseInt(_0x163564(0x1f5))/0x7*(parseInt(_0x163564(0x1fe))/0x8)+-parseInt(_0x163564(0x1e4))/0x9;if(_0x13b0ef===_0x36d155)break;else _0x59ab95['push'](_0x59ab95['shift']());}catch(_0x4c87ae){_0x59ab95['push'](_0x59ab95['shift']());}}}(a35_0x2e1f,0xbf911));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a35_0x4242(_0x1d8229,_0x5d877c){_0x1d8229=_0x1d8229-0x1d4;const _0x2e1f53=a35_0x2e1f();let _0x424242=_0x2e1f53[_0x1d8229];return _0x424242;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a35_0x375d5f(0x1f0)]=a35_0x375d5f(0x1ee);[a35_0x375d5f(0x1d7)]=a35_0x375d5f(0x1fd);async[a35_0x375d5f(0x1ff)](_0x319786){const _0x2832db=a35_0x375d5f,{options:_0x274b16,args:_0x4d3225,tdx:_0x3dcfff}=_0x319786;let _0x309b12;if(_0x4d3225[_0x2832db(0x1df)]===0x0)_0x309b12={'database':undefined,'table':undefined,'original':''};else{if(_0x4d3225[_0x2832db(0x1df)]===0x1)try{_0x309b12=parseTableReference(_0x4d3225[0x0]);if(_0x309b12['table']&&!_0x309b12['database']&&!_0x309b12[_0x2832db(0x201)]['includes']('*')&&!_0x309b12[_0x2832db(0x201)][_0x2832db(0x1db)]('?'))return console['error'](_0x2832db(0x1d5)+_0x4d3225[0x0]+_0x2832db(0x1eb)),console[_0x2832db(0x1e7)](_0x2832db(0x1d4)+_0x309b12['table']+'\x27?'),console[_0x2832db(0x1e7)](_0x2832db(0x1da)+_0x309b12[_0x2832db(0x201)]+_0x2832db(0x1d9)),console[_0x2832db(0x1e7)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x309b12[_0x2832db(0x201)]),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x309b12[_0x2832db(0x201)]),console[_0x2832db(0x1e7)](''),console['error']('Note:\x20\x27'+_0x4d3225[0x0]+_0x2832db(0x203)+_0x309b12[_0x2832db(0x201)]+_0x2832db(0x204)),0x1;}catch(_0x109f71){return console['error']('Error:\x20'+_0x109f71[_0x2832db(0x1fa)]),0x1;}else return console[_0x2832db(0x1e7)](_0x2832db(0x1ec)),console[_0x2832db(0x1e7)]('\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases'),console[_0x2832db(0x1e7)](_0x2832db(0x1f9)),console[_0x2832db(0x1e7)](_0x2832db(0x1fc)),console['error'](_0x2832db(0x1f3)),console['error']('Or\x20use\x20--in\x20flag:'),console[_0x2832db(0x1e7)](_0x2832db(0x1d6)),0x1;}const _0x3b0639=_0x274b16[_0x2832db(0x1ef)];!_0x309b12[_0x2832db(0x1ef)]&&_0x3b0639&&(_0x309b12[_0x2832db(0x1ef)]=_0x3b0639);try{const _0x1973a1=_0x30dd27=>_0x30dd27&&(_0x30dd27[_0x2832db(0x1db)]('*')||_0x30dd27[_0x2832db(0x1db)]('?')),_0x468e62=_0x1973a1(_0x309b12[_0x2832db(0x1ef)]);_0x274b16[_0x2832db(0x1dc)]&&(console[_0x2832db(0x1e7)](_0x2832db(0x1f6)+_0x274b16['site']),_0x309b12[_0x2832db(0x1ef)]?_0x468e62?console[_0x2832db(0x1e7)](_0x2832db(0x1e0)+_0x309b12[_0x2832db(0x1ef)]):console[_0x2832db(0x1e7)](_0x2832db(0x1de)+_0x309b12[_0x2832db(0x1ef)]):console[_0x2832db(0x1e7)](_0x2832db(0x1fb)),_0x309b12['table']&&console['error'](_0x2832db(0x202)+_0x309b12[_0x2832db(0x201)]));const _0x1419c1=_0x309b12[_0x2832db(0x1ef)]&&!_0x468e62?_0x309b12[_0x2832db(0x1ef)]:undefined,_0x511a6a=_0x468e62?_0x309b12[_0x2832db(0x1ef)]:undefined,_0x50d25e=_0x309b12['table'],_0x1b4ca5=resolveLimit(_0x274b16['limit'],DEFAULT_LISTING_LIMIT),_0x50775b=await withSpinner('Listing\x20tables...',()=>_0x3dcfff[_0x2832db(0x1e1)][_0x2832db(0x1d8)](_0x1419c1,_0x50d25e,_0x511a6a,_0x1b4ca5),{'verbose':_0x274b16['verbose']}),_0x3f766e=_0x50775b[_0x2832db(0x1f8)];if(_0x3f766e[_0x2832db(0x1df)]===0x0&&_0x309b12['database']&&!_0x468e62)return console[_0x2832db(0x1e7)](_0x2832db(0x200)),console[_0x2832db(0x1e7)](_0x2832db(0x1f7)+_0x309b12[_0x2832db(0x1ef)]+'\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables'),0x1;return console[_0x2832db(0x1e7)](_0x2832db(0x1e5)+_0x3f766e[_0x2832db(0x1df)]+_0x2832db(0x1e8)+(_0x3f766e[_0x2832db(0x1df)]!==0x1?'s':'')),await handleSDKOutput(_0x3f766e,{..._0x274b16,'limit':_0x1b4ca5}),0x0;}catch(_0x31b6e7){if(_0x31b6e7 instanceof SDKError)return console['error'](_0x2832db(0x1f1)+_0x31b6e7[_0x2832db(0x1fa)]),_0x31b6e7[_0x2832db(0x1ed)]&&console[_0x2832db(0x1e7)](_0x2832db(0x1e6)+_0x31b6e7[_0x2832db(0x1ed)]),0x1;throw _0x31b6e7;}}[a35_0x375d5f(0x1ea)](_0x1647ce){return undefined;}}function a35_0x2e1f(){const _0x8c0d13=['\x20table','6050530cOCLjI','validate','\x27\x20is\x20ambiguous.','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','cause','tables','database','name','Error:\x20','4099608Ttxjls','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','30CbGxlk','4039399phgBkT','Site:\x20','Database\x20\x27','data','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','message','Database:\x20all','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','List\x20tables\x20in\x20a\x20database','16qzMjWn','execute','✖\x20No\x20tables\x20found','table','Table\x20pattern:\x20','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','\x27\x20across\x20all\x20databases.','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','Error:\x20Pattern\x20\x27','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','description','listTables','.*\x22','\x20\x20Use:\x20tdx\x20tables\x20\x22','includes','verbose','1471301YgtRTO','Database:\x20','length','Database\x20pattern:\x20','query','402000VAtwSx','2150790irBPvm','40031919bzCbDl','✔\x20Found\x20','\x20\x20Cause:\x20','error'];a35_0x2e1f=function(){return _0x8c0d13;};return a35_0x2e1f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a36_0x288b29=a36_0x34ef;(function(_0x1c44c6,_0x518297){const _0x122417=a36_0x34ef,_0x2749c8=_0x1c44c6();while(!![]){try{const _0x13dc06=-parseInt(_0x122417(0x79))/0x1*(-parseInt(_0x122417(0x8b))/0x2)+-parseInt(_0x122417(0x85))/0x3*(parseInt(_0x122417(0x98))/0x4)+parseInt(_0x122417(0x8c))/0x5*(parseInt(_0x122417(0x7b))/0x6)+-parseInt(_0x122417(0x9c))/0x7+parseInt(_0x122417(0x7f))/0x8+-parseInt(_0x122417(0x90))/0x9+-parseInt(_0x122417(0x78))/0xa;if(_0x13dc06===_0x518297)break;else _0x2749c8['push'](_0x2749c8['shift']());}catch(_0x328831){_0x2749c8['push'](_0x2749c8['shift']());}}}(a36_0x2314,0x41286));import{BaseCommand}from'./command.js';import{saveSessionContext,getCurrentSessionPID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists}from'../core/profile.js';function a36_0x34ef(_0x1aef44,_0x3cf50d){_0x1aef44=_0x1aef44-0x6f;const _0x2314b7=a36_0x2314();let _0x34ef9d=_0x2314b7[_0x1aef44];return _0x34ef9d;}import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import a36_0x2155d8 from'chalk';function a36_0x2314(){const _0x3a135e=['2895976jHBUGk','clear','debug','toString','(session:\x20','display','8250ziVKwB','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','llm_agent','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','agent','988esMLgY','2251745FSbaQg','session','profile','Session\x20engage_workspace\x20set\x20to:\x20','3969054KEXwtE','Error:\x20','parent_segment','.\x20Must\x20be\x20one\x20of:\x20','includes','Session\x20parent_segment\x20set\x20to:\x20','engage_workspace','llm_project','164bNALVa','\x0aResources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace\x0a','database','execute','367297srfDaD','cleared','displayWithSources','Error:\x20Profile\x20\x27','green','\x27\x20does\x20not\x20exist','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','dim','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','error','2331630ekplEh','595qKNYtb','Session\x20database\x20set\x20to:\x20','6asPaUT','length','log','Session\x20context\x20'];a36_0x2314=function(){return _0x3a135e;};return a36_0x2314();}export class UseCommand extends BaseCommand{['name']='use';['description']='Set\x20session-level\x20context';['validate'](_0x1ef579){const _0x11cc66=a36_0x34ef,{args:_0x2d2a8c}=_0x1ef579;if(_0x2d2a8c[_0x11cc66(0x7c)]===0x0)return undefined;if(_0x2d2a8c[_0x11cc66(0x7c)]===0x1)return _0x11cc66(0x76)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+_0x11cc66(0x99)+_0x11cc66(0x88);const _0x22a493=_0x2d2a8c[0x0],_0x217d00=[_0x11cc66(0x9a),'parent_segment',_0x11cc66(0x97),_0x11cc66(0x8a),_0x11cc66(0x8e),'engage_workspace'];if(!_0x217d00[_0x11cc66(0x94)](_0x22a493))return'Invalid\x20resource:\x20'+_0x22a493+_0x11cc66(0x93)+_0x217d00['join'](',\x20');return undefined;}async[a36_0x288b29(0x9b)](_0x43ec3a){const _0x31b954=a36_0x288b29,{args:_0x11003e,options:_0x2bf9df}=_0x43ec3a,_0xaf8785=_0x2bf9df[_0x31b954(0x81)],_0x37c4d8=_0x2bf9df[_0x31b954(0x80)];cleanExpiredSessions();try{if(_0x37c4d8){clearSessionContext(_0x2bf9df[_0x31b954(0x8d)]);const _0x4a7a19=_0x2bf9df[_0x31b954(0x8d)]||getCurrentSessionPID()[_0x31b954(0x82)]();return console[_0x31b954(0x7d)](_0x31b954(0x7e)+a36_0x2155d8[_0x31b954(0x72)](_0x31b954(0x6f))+'\x20'+a36_0x2155d8[_0x31b954(0x75)](_0x31b954(0x83)+_0x4a7a19+')')),0x0;}if(_0x11003e['length']===0x0){const _0x217ae2=new GlobalContext(_0x2bf9df);return _0xaf8785?_0x217ae2[_0x31b954(0x70)]():_0x217ae2[_0x31b954(0x84)](),console[_0x31b954(0x7d)](a36_0x2155d8[_0x31b954(0x75)](_0x31b954(0x89))),console[_0x31b954(0x7d)](a36_0x2155d8['dim']('Resources:\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace')),0x0;}const _0x3f40fb=_0x11003e[0x0],_0x2d62a8=_0x11003e[0x1];if(_0x3f40fb===_0x31b954(0x8e)){if(!profileExists(_0x2d62a8))return console['error'](_0x31b954(0x71)+_0x2d62a8+_0x31b954(0x73)),console[_0x31b954(0x77)](_0x31b954(0x86)),0x1;const _0x5de9eb=_0x2bf9df[_0x31b954(0x8d)]||getCurrentSessionPID()['toString']();return saveSessionContext({'profile':_0x2d62a8},_0x2bf9df['session']),console[_0x31b954(0x7d)]('Session\x20profile\x20set\x20to:\x20'+a36_0x2155d8['green'](_0x2d62a8)+'\x20'+a36_0x2155d8['dim']('(session:\x20'+_0x5de9eb+')')),console['log'](a36_0x2155d8[_0x31b954(0x75)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides')),0x0;}const _0x1bd099={},_0x1758ee=_0x2bf9df[_0x31b954(0x8d)]||getCurrentSessionPID()['toString']();switch(_0x3f40fb){case _0x31b954(0x9a):_0x1bd099['database']=_0x2d62a8,console[_0x31b954(0x7d)](_0x31b954(0x7a)+a36_0x2155d8[_0x31b954(0x72)](_0x2d62a8)+'\x20'+a36_0x2155d8[_0x31b954(0x75)](_0x31b954(0x83)+_0x1758ee+')'));break;case _0x31b954(0x92):_0x1bd099[_0x31b954(0x92)]=_0x2d62a8,console[_0x31b954(0x7d)](_0x31b954(0x95)+a36_0x2155d8[_0x31b954(0x72)](_0x2d62a8)+'\x20'+a36_0x2155d8['dim'](_0x31b954(0x83)+_0x1758ee+')'));break;case _0x31b954(0x97):_0x1bd099[_0x31b954(0x97)]=_0x2d62a8,console['log']('Session\x20llm_project\x20set\x20to:\x20'+a36_0x2155d8[_0x31b954(0x72)](_0x2d62a8)+'\x20'+a36_0x2155d8[_0x31b954(0x75)](_0x31b954(0x83)+_0x1758ee+')'));break;case'agent':{const {projectName:_0x447210,agentName:_0x39d1b0}=parseAgentRef(_0x2d62a8);_0x39d1b0?(_0x1bd099[_0x31b954(0x97)]=_0x447210,_0x1bd099[_0x31b954(0x87)]=_0x39d1b0,console[_0x31b954(0x7d)]('Session\x20llm_project\x20set\x20to:\x20'+a36_0x2155d8[_0x31b954(0x72)](_0x447210)+'\x20'+a36_0x2155d8[_0x31b954(0x75)](_0x31b954(0x83)+_0x1758ee+')')),console['log']('Session\x20agent\x20set\x20to:\x20'+a36_0x2155d8[_0x31b954(0x72)](_0x39d1b0)+'\x20'+a36_0x2155d8[_0x31b954(0x75)](_0x31b954(0x83)+_0x1758ee+')'))):(_0x1bd099['llm_agent']=_0x2d62a8,console[_0x31b954(0x7d)]('Session\x20agent\x20set\x20to:\x20'+a36_0x2155d8[_0x31b954(0x72)](_0x2d62a8)+'\x20'+a36_0x2155d8['dim'](_0x31b954(0x83)+_0x1758ee+')')));break;}case _0x31b954(0x96):_0x1bd099[_0x31b954(0x96)]=_0x2d62a8,console['log'](_0x31b954(0x8f)+a36_0x2155d8[_0x31b954(0x72)](_0x2d62a8)+'\x20'+a36_0x2155d8[_0x31b954(0x75)]('(session:\x20'+_0x1758ee+')'));break;}return saveSessionContext(_0x1bd099,_0x2bf9df[_0x31b954(0x8d)]),console[_0x31b954(0x7d)](a36_0x2155d8[_0x31b954(0x75)](_0x31b954(0x74))),0x0;}catch(_0x4455a0){return _0x4455a0 instanceof Error&&console[_0x31b954(0x77)](_0x31b954(0x91)+_0x4455a0['message']),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a37_0x5d1b5a=a37_0x1a13;(function(_0x361bfe,_0x4695b4){const _0x21a6ab=a37_0x1a13,_0x4fe92b=_0x361bfe();while(!![]){try{const _0x3fdd1b=parseInt(_0x21a6ab(0xa4))/0x1*(parseInt(_0x21a6ab(0xa2))/0x2)+-parseInt(_0x21a6ab(0xb6))/0x3+parseInt(_0x21a6ab(0xbd))/0x4+-parseInt(_0x21a6ab(0xa3))/0x5+-parseInt(_0x21a6ab(0xae))/0x6*(parseInt(_0x21a6ab(0xb3))/0x7)+-parseInt(_0x21a6ab(0xb2))/0x8*(parseInt(_0x21a6ab(0xbc))/0x9)+-parseInt(_0x21a6ab(0xba))/0xa*(-parseInt(_0x21a6ab(0xa5))/0xb);if(_0x3fdd1b===_0x4695b4)break;else _0x4fe92b['push'](_0x4fe92b['shift']());}catch(_0x45444c){_0x4fe92b['push'](_0x4fe92b['shift']());}}}(a37_0x762a,0x6252d));import{BaseCommand}from'./command.js';function a37_0x762a(){const _0x3cba4d=['list','data','message','90KcrIhm','length','123867nZuyZQ','3083080fUyFsb','✔\x20Found\x20','8894KiURLZ','83035dHcamP','39mPIOjw','939917pRDQUC','\x20user','verbose','Show\x20current\x20user\x20information','Listing\x20users...','cause','execute','error','name','6zjiAYq','getCurrent','List\x20all\x20users\x20in\x20the\x20account','user','152bMxCNA','3276791jlggJL','Fetching\x20user\x20info...','Error:\x20','1692828IVuBxw'];a37_0x762a=function(){return _0x3cba4d;};return a37_0x762a();}import{SDKError}from'../sdk/index.js';function a37_0x1a13(_0x267872,_0x2464b6){_0x267872=_0x267872-0xa2;const _0x762af=a37_0x762a();let _0x1a135c=_0x762af[_0x267872];return _0x1a135c;}import{handleSDKOutput,handleSingleObjectOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';export class UserCommand extends BaseCommand{[a37_0x5d1b5a(0xad)]=a37_0x5d1b5a(0xb1);['description']=a37_0x5d1b5a(0xa8);async[a37_0x5d1b5a(0xab)](_0x5dd7ec){const _0x34f722=a37_0x5d1b5a,{options:_0x2948fe,tdx:_0x4734e4}=_0x5dd7ec;try{const _0x3001b4=await withSpinner(_0x34f722(0xb4),()=>_0x4734e4[_0x34f722(0xb1)][_0x34f722(0xaf)](),{'verbose':_0x2948fe[_0x34f722(0xa7)]}),_0xae6632=_0x3001b4[_0x34f722(0xb8)];return await handleSingleObjectOutput(_0xae6632,_0x2948fe),0x0;}catch(_0x7c449b){if(_0x7c449b instanceof SDKError)return console[_0x34f722(0xac)](_0x34f722(0xb5)+_0x7c449b[_0x34f722(0xb9)]),_0x7c449b[_0x34f722(0xaa)]&&console[_0x34f722(0xac)]('\x20\x20Cause:\x20'+_0x7c449b['cause']),0x1;throw _0x7c449b;}}}export class UserListCommand extends BaseCommand{['name']='user\x20list';['description']=a37_0x5d1b5a(0xb0);async[a37_0x5d1b5a(0xab)](_0x53f697){const _0x5c3599=a37_0x5d1b5a,{options:_0x2717f9,tdx:_0x397f4b}=_0x53f697;try{const _0x448efa=await withSpinner(_0x5c3599(0xa9),()=>_0x397f4b['user'][_0x5c3599(0xb7)](),{'verbose':_0x2717f9[_0x5c3599(0xa7)]}),_0x3e4e2a=_0x448efa[_0x5c3599(0xb8)];return console[_0x5c3599(0xac)](_0x5c3599(0xbe)+_0x3e4e2a[_0x5c3599(0xbb)]+_0x5c3599(0xa6)+(_0x3e4e2a[_0x5c3599(0xbb)]!==0x1?'s':'')),await handleSDKOutput(_0x3e4e2a,_0x2717f9),0x0;}catch(_0x481de1){if(_0x481de1 instanceof SDKError)return console[_0x5c3599(0xac)](_0x5c3599(0xb5)+_0x481de1[_0x5c3599(0xb9)]),_0x481de1[_0x5c3599(0xaa)]&&console[_0x5c3599(0xac)]('\x20\x20Cause:\x20'+_0x481de1[_0x5c3599(0xaa)]),0x1;throw _0x481de1;}}}
|
|
@@ -70,6 +70,19 @@ export declare class WorkflowSessionsCommand extends WorkflowBaseCommand {
|
|
|
70
70
|
readonly name = "workflow:sessions";
|
|
71
71
|
readonly description = "List workflow execution sessions";
|
|
72
72
|
execute(context: CommandContext): Promise<number>;
|
|
73
|
+
/**
|
|
74
|
+
* Render sessions in timeline format with dates and durations
|
|
75
|
+
*/
|
|
76
|
+
private renderSessionsTimeline;
|
|
77
|
+
/**
|
|
78
|
+
* Interactive navigation for sessions - show selector with timeline rows as choices
|
|
79
|
+
*/
|
|
80
|
+
private navigateSessionsInteractive;
|
|
81
|
+
/**
|
|
82
|
+
* Generate timeline rows for interactive selector
|
|
83
|
+
* Returns structured data that can be used both for display and selection
|
|
84
|
+
*/
|
|
85
|
+
private generateSessionTimelineRows;
|
|
73
86
|
}
|
|
74
87
|
/**
|
|
75
88
|
* Workflow attempts command
|
|
@@ -210,4 +223,28 @@ export declare class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand {
|
|
|
210
223
|
readonly description = "Delete a secret from a workflow project";
|
|
211
224
|
execute(context: CommandContext): Promise<number>;
|
|
212
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Workflow timeline command
|
|
228
|
+
*/
|
|
229
|
+
export declare class WorkflowTimelineCommand extends WorkflowBaseCommand {
|
|
230
|
+
readonly name = "workflow:timeline";
|
|
231
|
+
readonly description = "Show task execution timeline for a workflow attempt";
|
|
232
|
+
execute(context: CommandContext): Promise<number>;
|
|
233
|
+
/**
|
|
234
|
+
* Render timeline once
|
|
235
|
+
*/
|
|
236
|
+
private renderSingleTimeline;
|
|
237
|
+
/**
|
|
238
|
+
* Poll timeline for live updates
|
|
239
|
+
*/
|
|
240
|
+
private pollTimeline;
|
|
241
|
+
/**
|
|
242
|
+
* Render timeline as ASCII Gantt chart
|
|
243
|
+
*/
|
|
244
|
+
private renderTimeline;
|
|
245
|
+
/**
|
|
246
|
+
* Build timeline data for JSON output
|
|
247
|
+
*/
|
|
248
|
+
private buildTimelineData;
|
|
249
|
+
}
|
|
213
250
|
//# sourceMappingURL=workflow-command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-command.d.ts","sourceRoot":"","sources":["../../src/commands/workflow-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-command.d.ts","sourceRoot":"","sources":["../../src/commands/workflow-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAOhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAkD,MAAM,uBAAuB,CAAC;AAuBnH;;GAEG;AACH,8BAAsB,mBAAoB,SAAQ,WAAW;IAC3D;;;;;;OAMG;IACH,SAAS,CAAC,cAAc,CACtB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,aAAa,EACtB,QAAQ,SAAI,GACX,MAAM,GAAG,SAAS;IAIrB;;;OAGG;IACH,SAAS,CAAC,cAAc,CACtB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,aAAa,EACtB,QAAQ,SAAI,GACX,MAAM,GAAG,IAAI;IAUhB;;;OAGG;IACH,SAAS,CAAC,2BAA2B,CACnC,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,aAAa,GACrB;QAAE,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,IAAI;IAgB/E;;;OAGG;IACH,SAAS,CAAC,iBAAiB,CACzB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,aAAa,EACtB,QAAQ,SAAI,GACX,MAAM,GAAG,SAAS;IAiBrB;;;OAGG;cACa,sBAAsB,CACpC,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,EAC1B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;CAYjB;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,mDAAmD;IAEjE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAkCxD;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,gCAAgC;IAE9C,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA+CxD;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,mBAAmB;IAC/D,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,WAAW,oBAAoB;IAElC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAoDxD;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,sCAAsC;IAEpD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IA4GvD;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA+K9B;;OAEG;YACW,2BAA2B;IA+GzC;;;OAGG;IACH,OAAO,CAAC,2BAA2B;CA8CpC;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,4BAA4B;IAE1C,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAyExD;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IACrD,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,mCAAmC;IAEjD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAyDxD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,WAAW,+BAA+B;IAE7C,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA8BxD;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,sCAAsC;IAEpD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA2ExD;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,4BAA4B;IAE1C,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAuCxD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,WAAW,gCAAgC;IAE9C,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA4GxD;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,mBAAmB;IACzD,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,WAAW,0BAA0B;IAExC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAoHxD;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,kDAAkD;IAEhE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAmCxD;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,mBAAmB;IAC5D,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,WAAW,6DAA6D;IAE3E,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAkExD;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,2CAA2C;IAEzD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAiGxD;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,mBAAmB;IAC1D,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,WAAW,kDAAkD;IAEhE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAwGxD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB;IAC3D,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,WAAW,oDAAoD;IAElE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAmGxD;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC,WAAW,gDAAgD;IAE9D,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAqCxD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAa3E;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,IAAI,2BAA2B;IACxC,QAAQ,CAAC,WAAW,6CAA6C;IAE3D,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAqBxD;AAED;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB;IAChE,QAAQ,CAAC,IAAI,0BAA0B;IACvC,QAAQ,CAAC,WAAW,yCAAyC;IAEvD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CA0DxD;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,mBAAmB;IACnE,QAAQ,CAAC,IAAI,6BAA6B;IAC1C,QAAQ,CAAC,WAAW,6CAA6C;IAE3D,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAwDxD;AAsWD;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,yDAAyD;IAEvE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAmMvD;;OAEG;YACW,oBAAoB;IAgClC;;OAEG;YACW,YAAY;IAwD1B;;OAEG;IACH,OAAO,CAAC,cAAc;IAuHtB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CA4C1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a38_0x2f1d07=a38_0x32de;(function(_0xf6ad25,_0x532c0b){const _0x32d9ec=a38_0x32de,_0x42db89=_0xf6ad25();while(!![]){try{const _0x3a25f1=parseInt(_0x32d9ec(0x22e))/0x1+parseInt(_0x32d9ec(0x225))/0x2*(-parseInt(_0x32d9ec(0x143))/0x3)+parseInt(_0x32d9ec(0x17a))/0x4+parseInt(_0x32d9ec(0x1ba))/0x5*(-parseInt(_0x32d9ec(0x1aa))/0x6)+-parseInt(_0x32d9ec(0x16e))/0x7+parseInt(_0x32d9ec(0x1d3))/0x8*(parseInt(_0x32d9ec(0x216))/0x9)+parseInt(_0x32d9ec(0x104))/0xa*(parseInt(_0x32d9ec(0x112))/0xb);if(_0x3a25f1===_0x532c0b)break;else _0x42db89['push'](_0x42db89['shift']());}catch(_0x46b6f6){_0x42db89['push'](_0x42db89['shift']());}}}(a38_0x201a,0x73076));function a38_0x32de(_0x26aac7,_0x3e1805){_0x26aac7=_0x26aac7-0x100;const _0x201a45=a38_0x201a();let _0x32de19=_0x201a45[_0x26aac7];return _0x32de19;}import a38_0x3a8e01 from'chalk';import{existsSync}from'fs';import a38_0x37abe7 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a38_0x41838f from'prompts';function getAttemptStatusDisplay(_0x32f461){const _0x1155c3=a38_0x32de;if(!_0x32f461)return{'icon':'⏳','text':''};const {done:_0x6f65ac,success:_0x593f9f,cancelRequested:_0x20f7f4}=_0x32f461;if(!_0x6f65ac)return _0x20f7f4?{'icon':'🛑','text':a38_0x3a8e01['yellow']('canceling')}:{'icon':'🔄','text':a38_0x3a8e01[_0x1155c3(0x171)](_0x1155c3(0x15a))};if(_0x593f9f)return{'icon':'✅','text':a38_0x3a8e01[_0x1155c3(0x1d1)](_0x1155c3(0x1c8))};return{'icon':'❌','text':a38_0x3a8e01[_0x1155c3(0x16b)]('error')};}export class WorkflowBaseCommand extends BaseCommand{[a38_0x2f1d07(0x15f)](_0x4f77cb,_0x2c026b,_0x47ae23=0x0){const _0x21b693=a38_0x2f1d07;return _0x4f77cb[_0x47ae23]||_0x2c026b[_0x21b693(0x1ed)];}[a38_0x2f1d07(0x16d)](_0x29a888,_0x5af43b,_0x4cae51=0x0){const _0x127f90=a38_0x2f1d07,_0x3aa250=this[_0x127f90(0x15f)](_0x29a888,_0x5af43b,_0x4cae51);if(!_0x3aa250)return console['error'](a38_0x3a8e01['red']('Error:'),'Project\x20name\x20is\x20required'),console[_0x127f90(0x1bf)](a38_0x3a8e01[_0x127f90(0x237)](_0x127f90(0x1e6))),null;return _0x3aa250;}[a38_0x2f1d07(0x114)](_0x3d2e1e,_0x1b9eec){const _0x304b4c=a38_0x2f1d07;if(_0x3d2e1e[0x0]){const _0x322a71=_0x3d2e1e[0x0][_0x304b4c(0x212)]('.');if(_0x322a71['length']===0x1)return{'projectName':_0x322a71[0x0],'workflowName':undefined};else return _0x322a71[_0x304b4c(0x17c)]===0x2?{'projectName':_0x322a71[0x0],'workflowName':_0x322a71[0x1]}:(console['error'](a38_0x3a8e01[_0x304b4c(0x16b)]('Error:'),_0x304b4c(0x178)),null);}return{'projectName':_0x1b9eec[_0x304b4c(0x1ed)],'workflowName':undefined};}[a38_0x2f1d07(0x188)](_0x35ff70,_0x156d18,_0x43673a=0x0){const _0x392a7e=a38_0x2f1d07;if(_0x35ff70[_0x43673a])return _0x35ff70[_0x43673a];if(_0x156d18['workflowProject']){const _0x2ec057=a38_0x37abe7['join'](process['cwd'](),_0x392a7e(0x138),_0x156d18['workflowProject']);if(existsSync(a38_0x37abe7['join'](_0x2ec057,_0x392a7e(0x147))))return _0x2ec057;}return undefined;}async[a38_0x2f1d07(0x151)](_0x4fb1b7,_0x2297a6,_0x1fbc77){const _0x830c7b=a38_0x2f1d07;try{const _0x2caccb=await _0x4fb1b7[_0x830c7b(0x166)][_0x830c7b(0x138)](_0x2297a6,{'limit':0x1});if(_0x2caccb['length']>0x0){const _0xf1974f=_0x2caccb[0x0]['id'],_0x45877c=getWorkflowUrl(_0x1fbc77,_0xf1974f);console[_0x830c7b(0x1bf)](_0x830c7b(0x1e8)+a38_0x3a8e01['cyan'](_0x45877c));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x1a1);[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x221);async[a38_0x2f1d07(0x1a7)](_0xee3ac1){const _0x32c1de=a38_0x2f1d07,{options:_0x33cd2e,args:_0x2caeb5,tdx:_0x5cb707}=_0xee3ac1,_0x5867c2=_0x2caeb5[0x0],_0x3529de=_0x33cd2e[_0x32c1de(0x1cd)];if(_0x3529de)return saveSessionContext({'workflow_project':undefined},_0x33cd2e['session']),console['log'](a38_0x3a8e01['green'](_0x32c1de(0x233))),0x0;if(!_0x5867c2)return console[_0x32c1de(0x1bf)](a38_0x3a8e01[_0x32c1de(0x16b)](_0x32c1de(0x196)),_0x32c1de(0x19b)),console['error'](a38_0x3a8e01[_0x32c1de(0x237)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console[_0x32c1de(0x1bf)](a38_0x3a8e01[_0x32c1de(0x237)](_0x32c1de(0x1d6))),0x1;const _0x4d3ff4=await withSpinner(_0x32c1de(0x206)+_0x5867c2+_0x32c1de(0x187),()=>_0x5cb707['workflow'][_0x32c1de(0x217)](_0x5867c2),{'verbose':_0x33cd2e[_0x32c1de(0x219)]}),{name:_0x19285a}=_0x4d3ff4[_0x32c1de(0x1ab)];return saveSessionContext({'workflow_project':_0x19285a},_0x33cd2e[_0x32c1de(0x1f7)]),console['log'](a38_0x3a8e01[_0x32c1de(0x1d1)](_0x32c1de(0x231)+a38_0x3a8e01[_0x32c1de(0x214)](_0x19285a))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x21e);['description']=a38_0x2f1d07(0x155);async[a38_0x2f1d07(0x1a7)](_0x4acd27){const _0x40a3cb=a38_0x2f1d07,{options:_0x434016,args:_0x3189c0,tdx:_0x4d02c7}=_0x4acd27,_0x42b51f=_0x3189c0[0x0];_0x434016[_0x40a3cb(0x219)]&&_0x42b51f&&console[_0x40a3cb(0x1bf)](_0x40a3cb(0x1f3)+_0x42b51f);const _0x20cec8=await withSpinner(_0x40a3cb(0x1d8),()=>_0x4d02c7[_0x40a3cb(0x166)][_0x40a3cb(0x1a2)](_0x42b51f,{'limit':_0x434016[_0x40a3cb(0x1c7)]}),{'verbose':_0x434016['verbose']});let _0x25fcc1=_0x20cec8['data'];_0x25fcc1[_0x40a3cb(0x157)]((_0x17f782,_0x98281)=>_0x17f782[_0x40a3cb(0x1fb)]['localeCompare'](_0x98281[_0x40a3cb(0x1fb)]));const _0x45d85d=_0x434016[_0x40a3cb(0x1c7)]||0x64,_0x2748a8=_0x25fcc1[_0x40a3cb(0x17c)]>=_0x45d85d?a38_0x3a8e01[_0x40a3cb(0x237)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x40a3cb(0x1bf)](_0x40a3cb(0x1be)+_0x25fcc1[_0x40a3cb(0x17c)]+_0x40a3cb(0x14f)+(_0x25fcc1[_0x40a3cb(0x17c)]!==0x1?'s':'')+_0x2748a8);if(_0x434016[_0x40a3cb(0x172)]===_0x40a3cb(0x180)||_0x434016[_0x40a3cb(0x172)]===_0x40a3cb(0x13f)||_0x434016['format']===_0x40a3cb(0x215))await handleSDKOutput(_0x25fcc1,_0x434016);else{if(_0x25fcc1[_0x40a3cb(0x17c)]===0x0)_0x42b51f?console['log'](_0x40a3cb(0x176)+_0x42b51f):console[_0x40a3cb(0x10a)](_0x40a3cb(0x1f0));else{const _0x4a11c5=_0x25fcc1[_0x40a3cb(0x179)](_0x388e5f=>{const _0xe756e2=_0x40a3cb,_0x1424bf=_0x388e5f[_0xe756e2(0x10e)]?.['some'](_0x129172=>_0x129172[_0xe756e2(0x164)]===_0xe756e2(0x21f)),_0x5c2975=_0x1424bf?a38_0x3a8e01[_0xe756e2(0x237)](_0xe756e2(0x162)):'';return _0xe756e2(0x194)+_0x388e5f['name']+_0x5c2975;});await writeOutput(_0x4a11c5[_0x40a3cb(0x185)]('\x0a'),_0x434016[_0x40a3cb(0x103)],_0x40a3cb(0x1a3));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x101);[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x1dd);async[a38_0x2f1d07(0x1a7)](_0x19b812){const _0x3014bb=a38_0x2f1d07,{options:_0x17001e,args:_0x4538c7,tdx:_0x2e037c}=_0x19b812,_0x5c2d3a=this[_0x3014bb(0x15f)](_0x4538c7,_0x17001e);_0x17001e[_0x3014bb(0x219)]&&_0x5c2d3a&&console[_0x3014bb(0x1bf)](_0x3014bb(0x1bb)+_0x5c2d3a);const _0x191082=await withSpinner(_0x3014bb(0x223),()=>_0x2e037c[_0x3014bb(0x166)]['workflows'](_0x5c2d3a,{'limit':_0x17001e['limit']}),{'verbose':_0x17001e[_0x3014bb(0x219)]});let _0x2ee899=_0x191082[_0x3014bb(0x1ab)];_0x2ee899[_0x3014bb(0x157)]((_0x1f1f25,_0x2c522a)=>{const _0x2262ad=_0x3014bb,_0x41aaee=_0x1f1f25['name'][_0x2262ad(0x20f)](_0x2c522a[_0x2262ad(0x1fb)]);if(_0x41aaee!==0x0)return _0x41aaee;return(_0x1f1f25[_0x2262ad(0x205)]?.[_0x2262ad(0x1fb)]||'')[_0x2262ad(0x20f)](_0x2c522a[_0x2262ad(0x205)]?.['name']||'');});const _0x157cac=_0x17001e[_0x3014bb(0x1c7)]||0x64,_0x12b343=_0x2ee899[_0x3014bb(0x17c)]>=_0x157cac?a38_0x3a8e01[_0x3014bb(0x237)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error'](_0x3014bb(0x1be)+_0x2ee899['length']+_0x3014bb(0x1b0)+(_0x2ee899[_0x3014bb(0x17c)]!==0x1?'s':'')+_0x12b343);if(_0x17001e['format']===_0x3014bb(0x180)||_0x17001e['format']==='jsonl'||_0x17001e[_0x3014bb(0x172)]===_0x3014bb(0x215))await handleSDKOutput(_0x2ee899,_0x17001e);else{if(_0x2ee899[_0x3014bb(0x17c)]===0x0)_0x5c2d3a?console['log']('No\x20workflows\x20found\x20in\x20project:\x20'+_0x5c2d3a):console[_0x3014bb(0x10a)]('No\x20workflows\x20found');else{const _0x507ae5=_0x17001e[_0x3014bb(0x213)],_0x40ef14=_0x2ee899[_0x3014bb(0x179)](_0x18db89=>{const _0x265771=_0x3014bb,_0x3b342a=a38_0x3a8e01[_0x265771(0x237)]('#'+_0x18db89['id']),_0x1080a0=hyperlink(_0x3b342a,getWorkflowUrl(_0x507ae5,_0x18db89['id'])),_0x507a81=_0x18db89[_0x265771(0x205)]?.[_0x265771(0x1fb)]?a38_0x3a8e01[_0x265771(0x237)]('\x20('+_0x18db89['project'][_0x265771(0x1fb)]+')'):'';return _0x265771(0x102)+_0x1080a0+'\x20'+_0x18db89['name']+_0x507a81;});await writeOutput(_0x40ef14[_0x3014bb(0x185)]('\x0a'),_0x17001e['output'],_0x3014bb(0x1a3));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x1fe);[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x1a8);async[a38_0x2f1d07(0x1a7)](_0x4c4bd1){const _0x2ac010=a38_0x2f1d07,{options:_0x49b948,args:_0x1ad134,tdx:_0x466074}=_0x4c4bd1,_0x589465=this['parseProjectWorkflowPattern'](_0x1ad134,_0x49b948);if(!_0x589465)return 0x1;const {projectName:_0x10964c,workflowName:_0x1d9219}=_0x589465;if(_0x49b948[_0x2ac010(0x219)]){if(_0x10964c&&_0x1d9219)console[_0x2ac010(0x1bf)](_0x2ac010(0x177)+_0x10964c+'.'+_0x1d9219);else _0x10964c&&console[_0x2ac010(0x1bf)](_0x2ac010(0x10b)+_0x10964c);const _0x1339dc=_0x49b948[_0x2ac010(0x208)];_0x1339dc&&console[_0x2ac010(0x1bf)](_0x2ac010(0x139)+_0x1339dc);}const _0x44ff87=await withSpinner(_0x2ac010(0x167),()=>_0x466074[_0x2ac010(0x166)]['sessions']({'projectName':_0x10964c,'workflowName':_0x1d9219,'status':_0x49b948[_0x2ac010(0x208)],'fromTime':_0x49b948[_0x2ac010(0x11f)],'toTime':_0x49b948['to'],'limit':_0x49b948['limit']}),{'verbose':_0x49b948[_0x2ac010(0x219)]}),_0x2fa5e6=_0x44ff87[_0x2ac010(0x1ab)];_0x2fa5e6[_0x2ac010(0x157)]((_0x4b8b85,_0x531bd3)=>{const _0x50ac7a=_0x2ac010,_0x51e89a=_0x4b8b85['sessionTime']||'',_0x4d8102=_0x531bd3[_0x50ac7a(0x142)]||'';return _0x4d8102[_0x50ac7a(0x20f)](_0x51e89a);});const _0x3f39de=_0x49b948['limit']||0x64,_0x4aa322=_0x2fa5e6['length']>=_0x3f39de?a38_0x3a8e01[_0x2ac010(0x237)](_0x2ac010(0x14a)):'';console['error']('✔\x20Found\x20'+_0x2fa5e6[_0x2ac010(0x17c)]+'\x20session'+(_0x2fa5e6[_0x2ac010(0x17c)]!==0x1?'s':'')+_0x4aa322);if(_0x49b948['format']==='json'||_0x49b948['format']===_0x2ac010(0x13f)||_0x49b948[_0x2ac010(0x172)]===_0x2ac010(0x215))await handleSDKOutput(_0x2fa5e6,_0x49b948);else{if(_0x2fa5e6['length']===0x0){if(_0x10964c&&_0x1d9219)console[_0x2ac010(0x10a)](_0x2ac010(0x160)+_0x10964c+'.'+_0x1d9219);else _0x10964c?console[_0x2ac010(0x10a)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x10964c):console[_0x2ac010(0x10a)](_0x2ac010(0x1e1));}else{const _0x1cd846=_0x49b948[_0x2ac010(0x213)],_0x264c88=_0x2fa5e6[_0x2ac010(0x179)](_0x4e7e01=>{const _0x395a3a=_0x2ac010,_0xc62d42=a38_0x3a8e01[_0x395a3a(0x237)]('#'+_0x4e7e01['id']),_0x4e9940=_0x4e7e01[_0x395a3a(0x205)]?.['id'],_0x3c82a9=_0x4e9940?hyperlink(_0xc62d42,getWorkflowSessionUrl(_0x1cd846,_0x4e9940,_0x4e7e01['id'])):_0xc62d42,{icon:_0x56055e,text:_0x287215}=getAttemptStatusDisplay(_0x4e7e01[_0x395a3a(0x13b)]),_0x1b6961=(_0x4e7e01[_0x395a3a(0x205)]?.[_0x395a3a(0x1fb)]||'?')+'.'+(_0x4e7e01[_0x395a3a(0x166)]?.[_0x395a3a(0x1fb)]||'?'),_0x18a0c3=_0x4e7e01[_0x395a3a(0x142)]?a38_0x3a8e01[_0x395a3a(0x237)](_0x4e7e01['sessionTime']):'';return(_0x3c82a9+'\x20'+_0x56055e+(_0x287215?'\x20'+_0x287215:'')+'\x20'+_0x1b6961+'\x20'+_0x18a0c3)[_0x395a3a(0x144)]();});await writeOutput(_0x264c88[_0x2ac010(0x185)]('\x0a'),_0x49b948[_0x2ac010(0x103)],'list');}}return 0x0;}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]='workflow:attempts';[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x210);async[a38_0x2f1d07(0x1a7)](_0x51d514){const _0x54e635=a38_0x2f1d07,{options:_0x23af10,args:_0x877d11,tdx:_0x277835}=_0x51d514,_0x47faeb=this['parseProjectWorkflowPattern'](_0x877d11,_0x23af10);if(!_0x47faeb)return 0x1;const {projectName:_0x2566e6,workflowName:_0x427a2d}=_0x47faeb,_0x58d44e=_0x23af10['includeRetried'];if(_0x23af10[_0x54e635(0x219)]){if(_0x2566e6&&_0x427a2d)console[_0x54e635(0x1bf)]('Filter:\x20'+_0x2566e6+'.'+_0x427a2d);else _0x2566e6&&console['error'](_0x54e635(0x10b)+_0x2566e6);_0x58d44e&&console[_0x54e635(0x1bf)](_0x54e635(0x1fc));}const _0x141b6a=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x277835[_0x54e635(0x166)][_0x54e635(0x20b)]({'projectName':_0x2566e6,'workflowName':_0x427a2d,'includeRetried':_0x58d44e,'limit':_0x23af10[_0x54e635(0x1c7)]}),{'verbose':_0x23af10[_0x54e635(0x219)]}),_0x24aa22=_0x141b6a[_0x54e635(0x1ab)],_0x3b35ad=_0x23af10[_0x54e635(0x1c7)]||0x64,_0x2cdcfb=_0x24aa22[_0x54e635(0x17c)]>=_0x3b35ad?a38_0x3a8e01[_0x54e635(0x237)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x54e635(0x1bf)](_0x54e635(0x1be)+_0x24aa22[_0x54e635(0x17c)]+'\x20attempt'+(_0x24aa22[_0x54e635(0x17c)]!==0x1?'s':'')+_0x2cdcfb);if(_0x23af10[_0x54e635(0x172)]===_0x54e635(0x180)||_0x23af10[_0x54e635(0x172)]===_0x54e635(0x13f)||_0x23af10['format']===_0x54e635(0x215))await handleSDKOutput(_0x24aa22,_0x23af10);else{if(_0x24aa22[_0x54e635(0x17c)]===0x0){if(_0x2566e6&&_0x427a2d)console['log'](_0x54e635(0x156)+_0x2566e6+'.'+_0x427a2d);else _0x2566e6?console[_0x54e635(0x10a)]('No\x20attempts\x20found\x20in\x20project:\x20'+_0x2566e6):console['log']('No\x20attempts\x20found');}else{const _0xc5ed82=_0x23af10[_0x54e635(0x213)],_0x42b7f9=_0x24aa22['map'](_0xf13dee=>{const _0x252bab=_0x54e635,_0x5680d6=a38_0x3a8e01[_0x252bab(0x237)]('#'+_0xf13dee['id']),_0x59e0b4=_0xf13dee[_0x252bab(0x205)]?.['id'],_0xc3212d=_0xf13dee[_0x252bab(0x115)]||_0xf13dee[_0x252bab(0x197)],_0x180b96=_0x59e0b4&&_0xc3212d?hyperlink(_0x5680d6,getWorkflowAttemptUrl(_0xc5ed82,_0x59e0b4,_0xc3212d,_0xf13dee['id'])):_0x5680d6,{icon:_0x111840,text:_0x548214}=getAttemptStatusDisplay(_0xf13dee),_0x519a11=(_0xf13dee[_0x252bab(0x205)]?.[_0x252bab(0x1fb)]||'?')+'.'+(_0xf13dee[_0x252bab(0x166)]?.['name']||'?'),_0x3bb9f2=_0xf13dee[_0x252bab(0x142)]?a38_0x3a8e01[_0x252bab(0x237)](_0xf13dee[_0x252bab(0x142)]):'';return(_0x180b96+'\x20'+_0x111840+(_0x548214?'\x20'+_0x548214:'')+'\x20'+_0x519a11+'\x20'+_0x3bb9f2)[_0x252bab(0x144)]();});await writeOutput(_0x42b7f9[_0x54e635(0x185)]('\x0a'),_0x23af10[_0x54e635(0x103)],_0x54e635(0x1a3));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x1b1);['description']=a38_0x2f1d07(0x169);async[a38_0x2f1d07(0x1a7)](_0x2549b5){const _0x371f03=a38_0x2f1d07,{options:_0x42631c,args:_0x13d085,tdx:_0x309814}=_0x2549b5,_0x1bea42=_0x13d085[0x0];if(!_0x1bea42)return console[_0x371f03(0x1bf)](_0x371f03(0x1e0)),0x1;_0x42631c[_0x371f03(0x219)]&&console['error'](_0x371f03(0x13e)+_0x1bea42);const _0x3b1dd8=await withSpinner('Getting\x20attempt\x20details...',()=>_0x309814['workflow'][_0x371f03(0x222)](_0x1bea42),{'verbose':_0x42631c[_0x371f03(0x219)]}),_0x404fa4=_0x3b1dd8[_0x371f03(0x1ab)];let _0xcf6a83;!_0x404fa4[_0x371f03(0x19d)]?_0xcf6a83=_0x404fa4['cancelRequested']?_0x371f03(0x132):'running':_0xcf6a83=_0x404fa4['success']?_0x371f03(0x1c8):_0x371f03(0x1bf);let _0x1deca8;if(_0x404fa4[_0x371f03(0x137)]&&_0x404fa4[_0x371f03(0x133)]){const _0x2ccd4a=new Date(_0x404fa4[_0x371f03(0x137)])['getTime'](),_0x3f2e63=new Date(_0x404fa4['finishedAt'])[_0x371f03(0x152)]();_0x1deca8=Math[_0x371f03(0x22d)]((_0x3f2e63-_0x2ccd4a)/0x3e8);}const _0x49a765={'attempt_id':_0x404fa4['id'],'status':_0xcf6a83,..._0x404fa4[_0x371f03(0x109)]!==undefined&&{'index':_0x404fa4['index']},..._0x404fa4[_0x371f03(0x205)]&&{'project':_0x404fa4['project'][_0x371f03(0x1fb)]},..._0x404fa4[_0x371f03(0x166)]&&{'workflow':_0x404fa4[_0x371f03(0x166)]['name']},..._0x404fa4['sessionId']&&{'session_id':_0x404fa4['sessionId']},..._0x404fa4[_0x371f03(0x142)]&&{'session_time':_0x404fa4[_0x371f03(0x142)]},..._0x404fa4[_0x371f03(0x1a0)]&&{'retry_attempt':_0x404fa4[_0x371f03(0x1a0)]},..._0x1deca8!==undefined&&{'duration_sec':_0x1deca8},..._0x404fa4[_0x371f03(0x137)]&&{'created_at':_0x404fa4[_0x371f03(0x137)]},..._0x404fa4[_0x371f03(0x133)]&&{'finished_at':_0x404fa4[_0x371f03(0x133)]},...Object['keys'](_0x404fa4[_0x371f03(0x1fd)])[_0x371f03(0x17c)]>0x0&&{'params':_0x404fa4['params']}};return await handleSingleObjectOutput(_0x49a765,_0x42631c),0x0;}}export class WorkflowTasksCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x108);['description']=a38_0x2f1d07(0x1c9);async[a38_0x2f1d07(0x1a7)](_0x59d30a){const _0x1870c3=a38_0x2f1d07,{options:_0xc65297,args:_0x494b0a,tdx:_0x4f401f}=_0x59d30a,_0x51a987=_0x494b0a[0x0];if(!_0x51a987)return console[_0x1870c3(0x1bf)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;const _0x174174=_0xc65297[_0x1870c3(0x1cc)];_0xc65297[_0x1870c3(0x219)]&&(console[_0x1870c3(0x1bf)](_0x1870c3(0x13e)+_0x51a987),_0x174174&&console[_0x1870c3(0x1bf)]('Including\x20subtasks:\x20yes'));const _0x258e67=await withSpinner(_0x1870c3(0x173),()=>_0x4f401f[_0x1870c3(0x166)][_0x1870c3(0x193)](_0x51a987,_0x174174||![]),{'verbose':_0xc65297[_0x1870c3(0x219)]}),_0xc0e93d=_0x258e67[_0x1870c3(0x1ab)];return console['error'](_0x1870c3(0x1be)+_0xc0e93d[_0x1870c3(0x17c)]+'\x20task'+(_0xc0e93d[_0x1870c3(0x17c)]!==0x1?'s':'')),await handleSDKOutput(_0xc0e93d,_0xc65297),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x18f);[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x1d5);async[a38_0x2f1d07(0x1a7)](_0x1683a0){const _0xf95d2c=a38_0x2f1d07,{options:_0x50232c,args:_0x104fdc,tdx:_0x53342a}=_0x1683a0,_0x321b8f=_0x104fdc[0x0];let _0x16bd1c=_0x104fdc[0x1];if(!_0x321b8f)return console[_0xf95d2c(0x1bf)](_0xf95d2c(0x1e0)),0x1;_0x50232c[_0xf95d2c(0x219)]&&(console['error'](_0xf95d2c(0x13e)+_0x321b8f),_0x16bd1c&&console[_0xf95d2c(0x1bf)](_0xf95d2c(0x12d)+_0x16bd1c));const _0x25bc63=await withSpinner('Fetching\x20log\x20files...',()=>_0x53342a[_0xf95d2c(0x166)][_0xf95d2c(0x184)](_0x321b8f,_0x16bd1c),{'verbose':_0x50232c['verbose']}),_0x549266=_0x25bc63[_0xf95d2c(0x1ab)];if(_0x549266[_0xf95d2c(0x17c)]===0x0)return console['error'](_0xf95d2c(0x207)),0x0;if(!_0x16bd1c&&(_0x50232c['json']||_0x50232c[_0xf95d2c(0x172)]))return await handleSDKOutput(_0x549266,_0x50232c),0x0;if(!_0x16bd1c){const _0x1f793c=_0x549266[_0xf95d2c(0x179)](_0x3520ee=>({'title':_0x3520ee[_0xf95d2c(0x117)]+'\x20('+formatBytes(_0x3520ee['fileSize'])+')','value':_0x3520ee['taskName']})),_0x4b5d9c=await a38_0x41838f({'type':_0xf95d2c(0x20e),'name':'task','message':_0xf95d2c(0x123),'choices':_0x1f793c});if(!_0x4b5d9c[_0xf95d2c(0x1cf)])return console[_0xf95d2c(0x1bf)](_0xf95d2c(0x111)),0x0;_0x16bd1c=_0x4b5d9c[_0xf95d2c(0x1cf)];}const _0x4f66bc=await withSpinner(_0xf95d2c(0x18d),()=>_0x53342a[_0xf95d2c(0x166)][_0xf95d2c(0x128)](_0x321b8f,_0x16bd1c),{'verbose':_0x50232c[_0xf95d2c(0x219)]}),_0x2557b4=_0x4f66bc['data'];return _0x2557b4?console['log'](_0x2557b4):console['error']('No\x20log\x20content\x20found'),0x0;}}export class WorkflowKillCommand extends BaseCommand{['name']='workflow:kill';[a38_0x2f1d07(0x14c)]='Kill\x20a\x20running\x20attempt';async['execute'](_0x19ed11){const _0x493bf3=a38_0x2f1d07,{options:_0x20333e,args:_0x22bb15,tdx:_0x1bc972}=_0x19ed11,_0x18936f=_0x22bb15[0x0];if(!_0x18936f)return console['error'](_0x493bf3(0x1e0)),0x1;const _0x594b2d=_0x20333e[_0x493bf3(0x14e)];_0x20333e[_0x493bf3(0x219)]&&(console[_0x493bf3(0x1bf)](_0x493bf3(0x13e)+_0x18936f),_0x594b2d&&console[_0x493bf3(0x1bf)](_0x493bf3(0x1cb)+_0x594b2d));if(!_0x20333e[_0x493bf3(0x14b)]){const _0x240125=await confirmKey(_0x493bf3(0x1c4)+_0x18936f+'?');if(!_0x240125)return console['error'](_0x493bf3(0x111)),0x0;}const _0x5b44cf=await withSpinner('Killing\x20attempt...',()=>_0x1bc972[_0x493bf3(0x166)][_0x493bf3(0x1bd)](_0x18936f,_0x594b2d),{'verbose':_0x20333e[_0x493bf3(0x219)]}),_0x52ce47=_0x5b44cf['data'];return console['error']('✔\x20'+_0x52ce47),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]='workflow:retry';[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x1e9);async[a38_0x2f1d07(0x1a7)](_0x3ff829){const _0x5a7a39=a38_0x2f1d07,{options:_0x307625,args:_0x36d3d1,tdx:_0x4dcbff}=_0x3ff829,_0x1cbb71=_0x36d3d1[0x0];if(!_0x1cbb71)return console[_0x5a7a39(0x1bf)](_0x5a7a39(0x170)),console[_0x5a7a39(0x1bf)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;let _0x86fe5b=![],_0x40ea02=_0x1cbb71;if(_0x1cbb71[_0x5a7a39(0x12b)](_0x5a7a39(0x13d)))_0x86fe5b=!![],_0x40ea02=_0x1cbb71[_0x5a7a39(0x1c6)](0x8);else{if(_0x1cbb71[_0x5a7a39(0x12b)](_0x5a7a39(0x232)))_0x86fe5b=![],_0x40ea02=_0x1cbb71[_0x5a7a39(0x1c6)](0x8);else return console[_0x5a7a39(0x1bf)](_0x5a7a39(0x149)),console[_0x5a7a39(0x1bf)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x1dff9e=_0x307625['fromTask'],_0x416976=_0x307625[_0x5a7a39(0x1b9)],_0x21f704=_0x307625['params'],_0x170e0b=_0x307625[_0x5a7a39(0x19f)];_0x307625[_0x5a7a39(0x219)]&&(console['error'](_0x5a7a39(0x202)+(_0x86fe5b?'session':_0x5a7a39(0x222))+'\x20'+_0x40ea02),_0x1dff9e&&console[_0x5a7a39(0x1bf)](_0x5a7a39(0x200)+_0x1dff9e),_0x416976&&console[_0x5a7a39(0x1bf)](_0x5a7a39(0x1ac)+_0x416976),_0x21f704&&console[_0x5a7a39(0x1bf)]('Params:\x20'+_0x21f704),_0x170e0b&&console[_0x5a7a39(0x1bf)](_0x5a7a39(0x11a)));let _0x4e70c6;if(_0x21f704)try{if(_0x21f704['startsWith']('@')){const _0x408b05=await import(_0x5a7a39(0x161)),_0x49b3b0=_0x21f704['substring'](0x1),_0x1d78d4=await _0x408b05[_0x5a7a39(0x230)](_0x49b3b0,_0x5a7a39(0x154));_0x4e70c6=JSON['parse'](_0x1d78d4);}else _0x4e70c6=JSON[_0x5a7a39(0x1a9)](_0x21f704);}catch{return console[_0x5a7a39(0x1bf)]('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x307625[_0x5a7a39(0x14b)]){const _0x13e671=await confirmKey(_0x5a7a39(0x1ef)+(_0x86fe5b?_0x5a7a39(0x1f7):'attempt')+'\x20'+_0x40ea02+'?');if(!_0x13e671)return console['error'](_0x5a7a39(0x111)),0x0;}let _0x3f022b;_0x86fe5b?_0x3f022b=await withSpinner('Retrying\x20session...',()=>_0x4dcbff['workflow'][_0x5a7a39(0x1ae)](_0x40ea02,{'fromTask':_0x1dff9e,'retryParams':_0x4e70c6}),{'verbose':_0x307625[_0x5a7a39(0x219)]}):_0x3f022b=await withSpinner(_0x5a7a39(0x122),()=>_0x4dcbff['workflow'][_0x5a7a39(0x211)](_0x40ea02,{'resumeFrom':_0x416976,'retryParams':_0x4e70c6,'force':_0x170e0b}),{'verbose':_0x307625[_0x5a7a39(0x219)]});const _0xc29f32=_0x3f022b['data'];return console[_0x5a7a39(0x1bf)](_0x5a7a39(0x1dc)),console[_0x5a7a39(0x1bf)](_0x5a7a39(0x146)+_0xc29f32['attemptId']),console[_0x5a7a39(0x1bf)]('\x20\x20Session\x20ID:\x20'+_0xc29f32[_0x5a7a39(0x197)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{['name']=a38_0x2f1d07(0x1f2);[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x1d7);async[a38_0x2f1d07(0x1a7)](_0x16c479){const _0x2e5024=a38_0x2f1d07,{options:_0x1554b7,args:_0x1070ff,tdx:_0x512392}=_0x16c479;let _0x4e0c96=_0x1070ff[0x0];if(!_0x4e0c96){const _0x50dd79=this[_0x2e5024(0x15f)]([],_0x1554b7),_0x20aabf=await withSpinner('Loading\x20workflows...',()=>_0x512392[_0x2e5024(0x166)]['workflows'](_0x50dd79,{'limit':_0x1554b7[_0x2e5024(0x1c7)]}),{'verbose':_0x1554b7[_0x2e5024(0x219)]}),_0x51e8d7=_0x20aabf[_0x2e5024(0x1ab)];if(_0x51e8d7[_0x2e5024(0x17c)]===0x0)return console[_0x2e5024(0x1bf)](_0x2e5024(0x1b8)),!_0x50dd79&&console[_0x2e5024(0x1bf)](a38_0x3a8e01[_0x2e5024(0x237)](_0x2e5024(0x1e6))),0x1;const _0x5f06c0=_0x51e8d7[_0x2e5024(0x179)](_0x33ef67=>({'title':_0x33ef67[_0x2e5024(0x205)]?.['name']+'.'+_0x33ef67[_0x2e5024(0x1fb)],'value':_0x33ef67[_0x2e5024(0x205)]?.[_0x2e5024(0x1fb)]+'.'+_0x33ef67[_0x2e5024(0x1fb)],'description':_0x33ef67[_0x2e5024(0x12c)]?_0x2e5024(0x12f)+_0x33ef67[_0x2e5024(0x12c)]:undefined})),_0x363e6e=await a38_0x41838f({'type':'select','name':_0x2e5024(0x166),'message':_0x2e5024(0x1a4),'choices':_0x5f06c0});if(!_0x363e6e[_0x2e5024(0x166)])return 0x1;_0x4e0c96=_0x363e6e[_0x2e5024(0x166)];}if(!_0x4e0c96[_0x2e5024(0x1af)]('.')){const _0x7f5c90=this[_0x2e5024(0x15f)]([],_0x1554b7);if(_0x7f5c90)_0x4e0c96=_0x7f5c90+'.'+_0x4e0c96;else return console[_0x2e5024(0x1bf)](a38_0x3a8e01[_0x2e5024(0x16b)](_0x2e5024(0x196)),_0x2e5024(0x18b)),console[_0x2e5024(0x1bf)](a38_0x3a8e01['dim'](_0x2e5024(0x1e6))),0x1;}const _0x1bd4f6=_0x1554b7[_0x2e5024(0x204)],_0x3c2833=_0x1554b7['sessionTime'],_0x33e7bc={};if(_0x1bd4f6&&Array['isArray'](_0x1bd4f6))for(const _0x26b5c2 of _0x1bd4f6){const _0x3a918e=_0x26b5c2['indexOf']('=');if(_0x3a918e===-0x1)return console[_0x2e5024(0x1bf)](_0x2e5024(0x21c)+_0x26b5c2),console[_0x2e5024(0x1bf)](_0x2e5024(0x125)),0x1;const _0x516fe2=_0x26b5c2[_0x2e5024(0x1c6)](0x0,_0x3a918e),_0x387a35=_0x26b5c2['substring'](_0x3a918e+0x1);try{_0x33e7bc[_0x516fe2]=JSON[_0x2e5024(0x1a9)](_0x387a35);}catch{_0x33e7bc[_0x516fe2]=_0x387a35;}}_0x1554b7['verbose']&&(console[_0x2e5024(0x1bf)]('Workflow:\x20'+_0x4e0c96),Object[_0x2e5024(0x11c)](_0x33e7bc)[_0x2e5024(0x17c)]>0x0&&console[_0x2e5024(0x1bf)](_0x2e5024(0x10d)+JSON[_0x2e5024(0x1c3)](_0x33e7bc)),_0x3c2833&&console[_0x2e5024(0x1bf)]('Session\x20time:\x20'+_0x3c2833));const _0x396f98=await withSpinner(_0x2e5024(0x100),()=>_0x512392['workflow'][_0x2e5024(0x18c)](_0x4e0c96,_0x33e7bc,{'sessionTime':_0x3c2833}),{'verbose':_0x1554b7['verbose']}),_0x2d4bd8=_0x396f98[_0x2e5024(0x1ab)];console['error']('✔\x20Workflow\x20run\x20started'),console[_0x2e5024(0x1bf)]('\x20\x20Attempt\x20ID:\x20'+_0x2d4bd8['id']),console['error'](_0x2e5024(0x1e5)+_0x2d4bd8[_0x2e5024(0x197)]),console[_0x2e5024(0x1bf)]('\x20\x20Project:\x20'+_0x2d4bd8[_0x2e5024(0x205)]?.[_0x2e5024(0x1fb)]),console[_0x2e5024(0x1bf)](_0x2e5024(0x21a)+_0x2d4bd8[_0x2e5024(0x166)]?.['name']);if(_0x2d4bd8[_0x2e5024(0x205)]?.['id']&&_0x2d4bd8[_0x2e5024(0x197)]&&_0x2d4bd8['id']){const _0x2e07ed=_0x1554b7['site'],_0x40ca32=getConsoleUrl(_0x2e07ed,_0x2e5024(0x22b)+_0x2d4bd8[_0x2e5024(0x205)]['id']+'/sessions/'+_0x2d4bd8[_0x2e5024(0x197)]+_0x2e5024(0x1a5)+_0x2d4bd8['id']);console['error'](_0x2e5024(0x1e8)+a38_0x3a8e01['cyan'](_0x40ca32));}return 0x0;}}function a38_0x201a(){const _0x4cab19=['workflows','Status:\x20','delete','lastAttempt','deleted','session:','Attempt\x20ID:\x20','jsonl','\x20\x20Source:\x20','relative','sessionTime','33ukanrz','trimEnd','Pushing\x20project...','\x20\x20New\x20attempt\x20ID:\x20','tdx.json','Invalid\x20format:\x20','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','\x20(use\x20--limit\x20to\x20show\x20more)','yes','description','✔\x20Push\x20complete','reason','\x20project','Analyzing\x20changes...','showWorkflowConsoleUrl','getTime','targetDir','utf-8','List\x20all\x20workflow\x20projects','No\x20attempts\x20found\x20for:\x20','sort','\x20\x20Target:\x20','\x22\x20to\x20new\x20project\x20\x22','running','workflow:secrets:set','\x0aDry\x20run\x20-\x20no\x20project\x20created','executePushProject','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','resolveProject','No\x20sessions\x20found\x20for:\x20','fs/promises','\x20(system)','dryRun','key','deleteSecret','workflow','Listing\x20workflow\x20sessions...','\x20\x20Session\x20context\x20set\x20to:\x20','Show\x20specific\x20attempt\x20details','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','red','newProjectName','requireProject','1354143oKqqRq','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','blue','format','Getting\x20attempt\x20tasks...','✔\x20Pull\x20complete','listSecrets','No\x20projects\x20match\x20pattern:\x20','Filter:\x20','Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow','map','9116PWBwiG','Dry\x20run:\x20yes','length','Output\x20directory:\x20','new','download','json','projectId','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','Validation:\x20skipped','logFiles','join','indexOf','\x27...','resolveProjectDir','pullProject','Updating\x20','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','run','Downloading\x20logs...','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','workflow:logs','modified','changes','projectName','tasks','📁\x20','Error:\x20Secret\x20key\x20is\x20required','Error:','sessionId','path','\x22\x20with\x20new\x20revision?','List\x20secret\x20keys\x20for\x20a\x20workflow\x20project','Project\x20name\x20is\x20required','message','done','\x0a⚠\x20Project\x20\x22','force','retryAttemptName','workflow:use','projects','list','Select\x20a\x20workflow\x20to\x20run','/attempt/','newProjectId','execute','List\x20workflow\x20execution\x20sessions','parse','418164FkHgOu','data','Resume\x20from:\x20','type','retrySession','includes','\x20workflow','workflow:attempt','Key\x20cannot\x20be\x20empty','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','Project\x20name:\x20','\x20\x20Changes:\x20','sourceDir','\x20\x20Project\x20ID:\x20','No\x20workflows\x20found','resumeFrom','60ihjbYp','Project\x20filter:\x20','Project:\x20','kill','✔\x20Found\x20','error','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','Key:\x20','workflow:delete','stringify','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','Download\x20workflow\x20project\x20from\x20Treasure\x20Data','substring','limit','success','Show\x20tasks\x20for\x20an\x20attempt','Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>','Reason:\x20','includeSubtasks','clear','cwd','task','New\x20project\x20name:\x20','green','Setting\x20secret...','8NMVGaa','targetExists','Show\x20logs\x20for\x20a\x20workflow\x20attempt','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context','Start\x20a\x20workflow\x20run','Listing\x20workflow\x20projects...','hasChanges','Project\x20directory:\x20','Deleting\x20project\x20','✔\x20Retry\x20started','List\x20workflows','summary','setSecret','Error:\x20Attempt\x20ID\x20is\x20required','No\x20sessions\x20found','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','preparePushProject','sourceProjectName','\x20\x20Session\x20ID:\x20','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','\x20modified','\x20\x20Console:\x20','Retry\x20a\x20session\x20or\x20attempt','Pushing\x20workflow\x20project...','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','...','workflowProject','✔\x20Project\x20updated','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','No\x20workflow\x20projects\x20found','Source\x20project:\x20','workflow:run','Pattern:\x20','workflow:secrets:delete','executeCloneProject','\x20\x20Location:\x20','session','Listing\x20secrets...','diff','skipValidation','name','Include\x20retried:\x20yes','params','workflow:sessions','\x20\x20Revision:\x20','From\x20task:\x20','filesExtracted','Target:\x20','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','param','project','Resolving\x20project\x20\x27','No\x20log\x20files\x20found\x20for\x20this\x20attempt','status','✔\x20Secret\x20\x27','\x20deleted','attempts','stat','Source\x20directory:\x20','select','localeCompare','List\x20workflow\x20attempts','retryAttempt','split','site','cyan','table','7786206HMwulI','resolveProjectId','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','verbose','\x20\x20Workflow:\x20','---\x20','Error:\x20Invalid\x20parameter\x20format:\x20','\x0aClone\x20\x22','workflow:projects','sys','Downloading\x20project\x20','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','attempt','Listing\x20workflows...','Error:\x20KEY=VALUE\x20is\x20required','110674xWswdJ','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','Source:\x20','\x22?\x20This\x20cannot\x20be\x20undone.','Pull\x20workflow\x20project\x20to\x20local\x20folder','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','/app/workflows/','\x0aDry\x20run\x20-\x20nothing\x20pushed','round','184478DqLEcO','workflow:upload','readFile','✔\x20Workflow\x20project\x20set\x20to:\x20','attempt:','✔\x20Workflow\x20project\x20context\x20cleared.','\x0aPush\x20these\x20changes?','\x20is\x20not\x20a\x20directory','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','dim','Error:\x20','.\x20Expected\x20format:\x20KEY=VALUE','existingProjectId','Starting\x20workflow\x20run...','workflow:workflows','📋\x20','output','310zMHgqG','prepareCloneProject','✔\x20Pushed\x20','✔\x20New\x20project:\x20','workflow:tasks','index','log','Filter:\x20project=','Cloning\x20to\x20','Parameters:\x20','metadata','\x0a✔\x20Already\x20up\x20to\x20date','Target\x20directory:\x20','Cancelled','375331mbaIBf','\x22\x20already\x20exists\x20(ID:\x20','parseProjectWorkflowPattern','session_id','\x20new','taskName','isNewProject','fileCount','Force:\x20yes','workflow:secrets:list','keys','Source\x20directory\x20is\x20required','Error:\x20Project\x20name\x20is\x20required','from','isDirectory','basename','Retrying\x20attempt...','Select\x20a\x20task\x20to\x20view\x20logs:','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Expected\x20format:\x20--param\x20key=value','Revision:\x20','✔\x20Project:\x20','logs','✔\x20Downloaded\x20','Writing\x20files...','startsWith','revision','Task\x20name:\x20','Files\x20to\x20upload:\x20','revision:\x20','\x0aDry\x20run\x20-\x20no\x20files\x20written','yellow','canceling','finishedAt','workflow:download','unchanged','Deleting\x20secret...','createdAt'];a38_0x201a=function(){return _0x4cab19;};return a38_0x201a();}export class WorkflowDownloadCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x134);['description']=a38_0x2f1d07(0x1c5);async[a38_0x2f1d07(0x1a7)](_0x13f6a0){const _0x175cb6=a38_0x2f1d07,{options:_0x3d3277,args:_0x3c222f,tdx:_0x79c948}=_0x13f6a0,_0x4d43e3=_0x3c222f[0x0],_0x3349b3=_0x3c222f[0x1]||'.';if(!_0x4d43e3)return console[_0x175cb6(0x1bf)](_0x175cb6(0x11e)),console[_0x175cb6(0x1bf)](_0x175cb6(0x22a)),0x1;const _0x3ad1a4=_0x3d3277[_0x175cb6(0x12c)];_0x3d3277[_0x175cb6(0x219)]&&(console[_0x175cb6(0x1bf)](_0x175cb6(0x1bc)+_0x4d43e3),console['error'](_0x175cb6(0x17d)+_0x3349b3),_0x3ad1a4&&console[_0x175cb6(0x1bf)](_0x175cb6(0x126)+_0x3ad1a4));const _0x5b4aa5=await withSpinner(_0x175cb6(0x220)+_0x4d43e3+_0x175cb6(0x1ec),()=>_0x79c948[_0x175cb6(0x166)][_0x175cb6(0x17f)](_0x4d43e3,_0x3349b3,{'revision':_0x3ad1a4}),{'verbose':_0x3d3277[_0x175cb6(0x219)]}),_0x132514=_0x5b4aa5[_0x175cb6(0x1ab)];return console[_0x175cb6(0x1bf)](_0x175cb6(0x129)+_0x132514[_0x175cb6(0x192)]),console[_0x175cb6(0x1bf)](_0x175cb6(0x1ff)+_0x132514[_0x175cb6(0x12c)]),console[_0x175cb6(0x1bf)]('\x20\x20Files\x20extracted:\x20'+_0x132514[_0x175cb6(0x201)]),console[_0x175cb6(0x1bf)](_0x175cb6(0x1f6)+_0x3349b3+'/'+_0x132514[_0x175cb6(0x192)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x22f);[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x16f);async['execute'](_0x38cdf7){const _0x2bbf7e=a38_0x2f1d07,{options:_0x229b80,args:_0x30bb2a,tdx:_0x4ef4ea}=_0x38cdf7;let _0x1e70e1='.',_0x11008f=_0x229b80['name'];if(_0x30bb2a[0x0]){const {promises:_0x4fdbb5}=await import('fs');try{const _0x24bf9a=await _0x4fdbb5[_0x2bbf7e(0x20c)](_0x30bb2a[0x0]);if(_0x24bf9a[_0x2bbf7e(0x120)]())_0x1e70e1=_0x30bb2a[0x0];else return console['error'](_0x2bbf7e(0x238)+_0x30bb2a[0x0]+_0x2bbf7e(0x235)),0x1;}catch{_0x11008f=_0x30bb2a[0x0],_0x1e70e1='.';}}const _0x480ccf=_0x229b80[_0x2bbf7e(0x12c)],_0x2c9005=_0x229b80[_0x2bbf7e(0x1fa)];_0x229b80[_0x2bbf7e(0x219)]&&(console[_0x2bbf7e(0x1bf)](_0x2bbf7e(0x1da)+_0x1e70e1),_0x11008f&&console[_0x2bbf7e(0x1bf)](_0x2bbf7e(0x1b4)+_0x11008f),_0x480ccf&&console['error'](_0x2bbf7e(0x126)+_0x480ccf),_0x2c9005&&console[_0x2bbf7e(0x1bf)](_0x2bbf7e(0x183)));const _0x15ebd7=await withSpinner(_0x2bbf7e(0x1ea),()=>_0x4ef4ea[_0x2bbf7e(0x166)]['push'](_0x1e70e1,{'projectName':_0x11008f,'revision':_0x480ccf,'skipValidation':_0x2c9005}),{'verbose':_0x229b80['verbose']}),_0x14465a=_0x15ebd7[_0x2bbf7e(0x1ab)];return console[_0x2bbf7e(0x1bf)](_0x2bbf7e(0x106)+_0x14465a[_0x2bbf7e(0x192)]),console['error'](_0x2bbf7e(0x1b7)+_0x14465a[_0x2bbf7e(0x181)]),console[_0x2bbf7e(0x1bf)](_0x2bbf7e(0x1ff)+_0x14465a[_0x2bbf7e(0x12c)]),await this[_0x2bbf7e(0x151)](_0x4ef4ea,_0x14465a[_0x2bbf7e(0x192)],_0x229b80[_0x2bbf7e(0x213)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a38_0x2f1d07(0x1fb)]='workflow:pull';['description']=a38_0x2f1d07(0x229);async[a38_0x2f1d07(0x1a7)](_0x3faa46){const _0x49f79a=a38_0x2f1d07,{options:_0x26880f,args:_0xd92459,tdx:_0x31d048}=_0x3faa46,_0x52184c=_0xd92459[0x0],_0x56f572=_0xd92459[0x1];if(!_0x52184c)return console[_0x49f79a(0x1bf)](a38_0x3a8e01['red']('Error:'),_0x49f79a(0x19b)),console[_0x49f79a(0x1bf)](a38_0x3a8e01['dim'](_0x49f79a(0x182))),0x1;const _0xbe2023=_0x26880f[_0x49f79a(0x12c)];_0x26880f[_0x49f79a(0x219)]&&(console[_0x49f79a(0x1bf)](_0x49f79a(0x1bc)+_0x52184c),_0x56f572&&console[_0x49f79a(0x1bf)](_0x49f79a(0x110)+_0x56f572),_0xbe2023&&console[_0x49f79a(0x1bf)](_0x49f79a(0x126)+_0xbe2023),_0x26880f['dryRun']&&console[_0x49f79a(0x1bf)](_0x49f79a(0x17b)));const _0x2cb94f=await withSpinner('Pulling\x20project\x20'+_0x52184c+_0x49f79a(0x1ec),()=>_0x31d048[_0x49f79a(0x166)][_0x49f79a(0x189)](_0x52184c,{'targetDir':_0x56f572,'revision':_0xbe2023}),{'verbose':_0x26880f[_0x49f79a(0x219)]}),_0x1e056f=_0x2cb94f['data'];_0x1e056f[_0x49f79a(0x118)]?console[_0x49f79a(0x1bf)](_0x49f79a(0x107)+_0x1e056f[_0x49f79a(0x192)]):console[_0x49f79a(0x1bf)]('✔\x20Project:\x20'+_0x1e056f[_0x49f79a(0x192)]);console[_0x49f79a(0x1bf)](_0x49f79a(0x1ff)+_0x1e056f['revision']),console[_0x49f79a(0x1bf)](_0x49f79a(0x158)+(a38_0x37abe7[_0x49f79a(0x141)](process[_0x49f79a(0x1ce)](),_0x1e056f[_0x49f79a(0x153)])||'.')),console[_0x49f79a(0x1bf)]('\x20\x20Changes:\x20'+a38_0x3a8e01['green']('+'+_0x1e056f[_0x49f79a(0x1de)][_0x49f79a(0x17e)]+_0x49f79a(0x116))+',\x20'+(a38_0x3a8e01[_0x49f79a(0x131)]('~'+_0x1e056f[_0x49f79a(0x1de)][_0x49f79a(0x190)]+_0x49f79a(0x1e7))+',\x20')+(a38_0x3a8e01[_0x49f79a(0x16b)]('-'+_0x1e056f['summary'][_0x49f79a(0x13c)]+_0x49f79a(0x20a))+',\x20')+(''+a38_0x3a8e01['dim'](_0x1e056f[_0x49f79a(0x1de)][_0x49f79a(0x135)]+'\x20unchanged')));for(const _0x4b1bf3 of _0x1e056f[_0x49f79a(0x191)]){_0x4b1bf3['type']===_0x49f79a(0x190)&&_0x4b1bf3['diff']&&(console[_0x49f79a(0x1bf)]('\x0a'+a38_0x3a8e01['cyan']('---\x20'+_0x4b1bf3[_0x49f79a(0x198)])),console[_0x49f79a(0x1bf)](_0x4b1bf3[_0x49f79a(0x1f9)]));}if(!_0x1e056f['hasChanges'])return saveSessionContext({'workflow_project':_0x1e056f[_0x49f79a(0x192)]},_0x26880f['session']),console[_0x49f79a(0x1bf)](a38_0x3a8e01['green'](_0x49f79a(0x10f))),console[_0x49f79a(0x1bf)](a38_0x3a8e01[_0x49f79a(0x237)](_0x49f79a(0x168)+_0x1e056f[_0x49f79a(0x192)])),0x0;if(_0x26880f[_0x49f79a(0x163)])return console['error'](a38_0x3a8e01[_0x49f79a(0x131)](_0x49f79a(0x130))),0x0;if(!_0x26880f['yes']){const _0x2fa6a3=await confirmKey('\x0aApply\x20these\x20changes?');if(!_0x2fa6a3)return console[_0x49f79a(0x1bf)](_0x49f79a(0x111)),0x0;}await withSpinner(_0x49f79a(0x12a),()=>_0x31d048[_0x49f79a(0x166)]['applyPullProject'](_0x1e056f,{'revision':_0xbe2023}),{'verbose':_0x26880f[_0x49f79a(0x219)]}),saveSessionContext({'workflow_project':_0x1e056f['projectName']},_0x26880f['session']),console[_0x49f79a(0x1bf)](a38_0x3a8e01[_0x49f79a(0x1d1)](_0x49f79a(0x174)));const _0x203ed3=a38_0x37abe7[_0x49f79a(0x141)](process[_0x49f79a(0x1ce)](),_0x1e056f['targetDir'])||'.';return console[_0x49f79a(0x1bf)](a38_0x3a8e01[_0x49f79a(0x237)](_0x49f79a(0x1f6)+_0x203ed3)),console[_0x49f79a(0x1bf)](a38_0x3a8e01[_0x49f79a(0x237)]('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x1e056f[_0x49f79a(0x192)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]='workflow:push';[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x18e);async[a38_0x2f1d07(0x1a7)](_0xfb3776){const _0x2b3b63=a38_0x2f1d07,{options:_0xfffcbc,args:_0x9578f1,tdx:_0x337e6f}=_0xfb3776,_0x3955a1=this[_0x2b3b63(0x188)](_0x9578f1,_0xfffcbc),_0x3573e6=_0xfffcbc[_0x2b3b63(0x12c)],_0x13f0f1=_0xfffcbc[_0x2b3b63(0x1fa)];_0xfffcbc['verbose']&&(_0x3955a1&&console['error'](_0x2b3b63(0x20d)+_0x3955a1),_0x3573e6&&console[_0x2b3b63(0x1bf)]('Revision:\x20'+_0x3573e6),_0xfffcbc[_0x2b3b63(0x163)]&&console[_0x2b3b63(0x1bf)]('Dry\x20run:\x20yes'),_0x13f0f1&&console[_0x2b3b63(0x1bf)](_0x2b3b63(0x183)));let _0x49587b;try{_0x49587b=await withSpinner(_0x2b3b63(0x150),()=>_0x337e6f[_0x2b3b63(0x166)][_0x2b3b63(0x1e3)]({'sourceDir':_0x3955a1,'revision':_0x3573e6,'skipValidation':_0x13f0f1}),{'verbose':_0xfffcbc[_0x2b3b63(0x219)]});}catch(_0x16a45c){if(_0x16a45c instanceof Error&&_0x16a45c[_0x2b3b63(0x19c)]['includes']('No\x20workflow\x20tdx.json\x20found'))return console[_0x2b3b63(0x1bf)](a38_0x3a8e01[_0x2b3b63(0x16b)](_0x2b3b63(0x196)),_0x2b3b63(0x15e)),_0xfffcbc[_0x2b3b63(0x1ed)]?console[_0x2b3b63(0x1bf)](a38_0x3a8e01['dim']('Tip:\x20cd\x20to\x20workflows/'+_0xfffcbc[_0x2b3b63(0x1ed)]+'/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20'+_0xfffcbc[_0x2b3b63(0x1ed)]+'\x27')):console[_0x2b3b63(0x1bf)](a38_0x3a8e01[_0x2b3b63(0x237)]('Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.')),0x1;throw _0x16a45c;}const _0x280b8a=_0x49587b['data'];console['error'](_0x2b3b63(0x127)+_0x280b8a[_0x2b3b63(0x192)]),console[_0x2b3b63(0x1bf)](_0x2b3b63(0x140)+_0x280b8a[_0x2b3b63(0x1b6)]),console[_0x2b3b63(0x1bf)]('\x20\x20Revision:\x20'+_0x280b8a['revision']),console[_0x2b3b63(0x1bf)](_0x2b3b63(0x1b5)+a38_0x3a8e01[_0x2b3b63(0x1d1)]('+'+_0x280b8a[_0x2b3b63(0x1de)][_0x2b3b63(0x17e)]+'\x20new')+',\x20'+(a38_0x3a8e01['yellow']('~'+_0x280b8a['summary'][_0x2b3b63(0x190)]+_0x2b3b63(0x1e7))+',\x20')+(a38_0x3a8e01['red']('-'+_0x280b8a['summary'][_0x2b3b63(0x13c)]+_0x2b3b63(0x20a))+',\x20')+(''+a38_0x3a8e01['dim'](_0x280b8a[_0x2b3b63(0x1de)]['unchanged']+'\x20unchanged')));for(const _0x854546 of _0x280b8a[_0x2b3b63(0x191)]){_0x854546[_0x2b3b63(0x1ad)]===_0x2b3b63(0x190)&&_0x854546[_0x2b3b63(0x1f9)]&&(console[_0x2b3b63(0x1bf)]('\x0a'+a38_0x3a8e01['cyan'](_0x2b3b63(0x21b)+_0x854546[_0x2b3b63(0x198)])),console['error'](_0x854546[_0x2b3b63(0x1f9)]));}if(!_0x280b8a[_0x2b3b63(0x1d9)])return console[_0x2b3b63(0x1bf)](a38_0x3a8e01[_0x2b3b63(0x1d1)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this['showWorkflowConsoleUrl'](_0x337e6f,_0x280b8a[_0x2b3b63(0x192)],_0xfffcbc[_0x2b3b63(0x213)]),0x0;if(_0xfffcbc['dryRun'])return console[_0x2b3b63(0x1bf)](a38_0x3a8e01['yellow'](_0x2b3b63(0x22c))),0x0;if(!_0xfffcbc['yes']){const _0x39b3d5=await confirmKey(_0x2b3b63(0x234));if(!_0x39b3d5)return console['error'](_0x2b3b63(0x111)),0x0;}const _0x21eb81=await withSpinner(_0x2b3b63(0x145),()=>_0x337e6f[_0x2b3b63(0x166)][_0x2b3b63(0x15d)](_0x280b8a),{'verbose':_0xfffcbc[_0x2b3b63(0x219)]}),_0x33dc23=_0x21eb81[_0x2b3b63(0x1ab)];return console[_0x2b3b63(0x1bf)](a38_0x3a8e01[_0x2b3b63(0x1d1)](_0x2b3b63(0x14d))),console[_0x2b3b63(0x1bf)]('\x20\x20Project\x20ID:\x20'+_0x33dc23['projectId']),console[_0x2b3b63(0x1bf)]('\x20\x20Revision:\x20'+_0x33dc23[_0x2b3b63(0x12c)]),await this[_0x2b3b63(0x151)](_0x337e6f,_0x33dc23[_0x2b3b63(0x192)],_0xfffcbc['site']),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]='workflow:clone';[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x203);async[a38_0x2f1d07(0x1a7)](_0x2c5ecd){const _0x5e430f=a38_0x2f1d07,{options:_0x3618ec,args:_0x58e0fe,tdx:_0x29d568}=_0x2c5ecd,_0x5ddbce=this[_0x5e430f(0x188)](_0x58e0fe,_0x3618ec),_0x4a4800=_0x3618ec['name'],_0x3857a0=_0x3618ec[_0x5e430f(0x12c)],_0x55a04a=_0x3618ec[_0x5e430f(0x1fa)];if(!_0x5ddbce)return console[_0x5e430f(0x1bf)](a38_0x3a8e01[_0x5e430f(0x16b)](_0x5e430f(0x196)),_0x5e430f(0x11d)),console[_0x5e430f(0x1bf)](a38_0x3a8e01[_0x5e430f(0x237)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),console[_0x5e430f(0x1bf)](a38_0x3a8e01['dim'](_0x5e430f(0x1eb))),0x1;if(!_0x4a4800)return console[_0x5e430f(0x1bf)](a38_0x3a8e01['red']('Error:'),_0x5e430f(0x1b3)),console[_0x5e430f(0x1bf)](a38_0x3a8e01[_0x5e430f(0x237)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x3618ec[_0x5e430f(0x219)]&&(console[_0x5e430f(0x1bf)](_0x5e430f(0x20d)+_0x5ddbce),console[_0x5e430f(0x1bf)]('New\x20project\x20name:\x20'+_0x4a4800),_0x3857a0&&console['error'](_0x5e430f(0x126)+_0x3857a0),_0x3618ec[_0x5e430f(0x163)]&&console[_0x5e430f(0x1bf)]('Dry\x20run:\x20yes'),_0x55a04a&&console[_0x5e430f(0x1bf)](_0x5e430f(0x183)));const _0x33ccce=await withSpinner('Analyzing\x20project...',()=>_0x29d568[_0x5e430f(0x166)][_0x5e430f(0x105)](_0x5ddbce,_0x4a4800,{'revision':_0x3857a0,'skipValidation':_0x55a04a}),{'verbose':_0x3618ec[_0x5e430f(0x219)]}),_0x47c302=_0x33ccce['data'];console[_0x5e430f(0x1bf)](_0x5e430f(0x227)+_0x47c302['sourceDir']);_0x47c302['sourceProjectName']&&console[_0x5e430f(0x1bf)](_0x5e430f(0x1f1)+_0x47c302['sourceProjectName']);console['error'](_0x5e430f(0x1d0)+_0x47c302[_0x5e430f(0x16c)]),console[_0x5e430f(0x1bf)](_0x5e430f(0x126)+_0x47c302[_0x5e430f(0x12c)]),console['error'](_0x5e430f(0x12e)+_0x47c302[_0x5e430f(0x119)]);_0x47c302[_0x5e430f(0x1d4)]&&(console[_0x5e430f(0x1bf)](a38_0x3a8e01['yellow'](_0x5e430f(0x19e)+_0x47c302['newProjectName']+_0x5e430f(0x113)+_0x47c302[_0x5e430f(0x23a)]+')')),console[_0x5e430f(0x1bf)](a38_0x3a8e01['yellow']('\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.')));if(_0x3618ec[_0x5e430f(0x163)])return console[_0x5e430f(0x1bf)](a38_0x3a8e01[_0x5e430f(0x131)](_0x5e430f(0x15c))),0x0;if(!_0x3618ec[_0x5e430f(0x14b)]){const _0x540fd0=_0x47c302[_0x5e430f(0x1e4)]||a38_0x37abe7[_0x5e430f(0x121)](_0x5ddbce),_0x59aa6c=_0x47c302[_0x5e430f(0x1d4)]?'\x0aUpdate\x20existing\x20project\x20\x22'+_0x4a4800+_0x5e430f(0x199):_0x5e430f(0x21d)+_0x540fd0+_0x5e430f(0x159)+_0x4a4800+'\x22?',_0x6e516b=await confirmKey(_0x59aa6c);if(!_0x6e516b)return console[_0x5e430f(0x1bf)](_0x5e430f(0x111)),0x0;}const _0x29bdc3=await withSpinner(_0x47c302['targetExists']?_0x5e430f(0x18a)+_0x4a4800+_0x5e430f(0x1ec):_0x5e430f(0x10c)+_0x4a4800+'...',()=>_0x29d568['workflow'][_0x5e430f(0x1f5)](_0x47c302),{'verbose':_0x3618ec[_0x5e430f(0x219)]}),_0x37b44e=_0x29bdc3[_0x5e430f(0x1ab)];return console[_0x5e430f(0x1bf)](a38_0x3a8e01[_0x5e430f(0x1d1)](_0x47c302[_0x5e430f(0x1d4)]?_0x5e430f(0x1ee):'✔\x20Clone\x20complete')),console['error']('\x20\x20Project:\x20'+_0x37b44e[_0x5e430f(0x16c)]),console[_0x5e430f(0x1bf)]('\x20\x20Project\x20ID:\x20'+_0x37b44e[_0x5e430f(0x1a6)]),console[_0x5e430f(0x1bf)](_0x5e430f(0x1ff)+_0x37b44e[_0x5e430f(0x12c)]),await this['showWorkflowConsoleUrl'](_0x29d568,_0x37b44e[_0x5e430f(0x16c)],_0x3618ec[_0x5e430f(0x213)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{['name']=a38_0x2f1d07(0x1c2);['description']=a38_0x2f1d07(0x236);async[a38_0x2f1d07(0x1a7)](_0x3587cf){const _0x25c773=a38_0x2f1d07,{options:_0xa0782b,args:_0x499cc2,tdx:_0x29dcc5}=_0x3587cf,_0x420fb2=_0x499cc2[0x0];if(!_0x420fb2)return console['error'](_0x25c773(0x1e2)),console[_0x25c773(0x1bf)]('Usage:\x20workflow:delete\x20<project-name-or-id>'),0x1;_0xa0782b['verbose']&&console[_0x25c773(0x1bf)](_0x25c773(0x1bc)+_0x420fb2);if(!_0xa0782b[_0x25c773(0x14b)]){const _0x2814c6=await confirmKey('Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22'+_0x420fb2+_0x25c773(0x228));if(!_0x2814c6)return console[_0x25c773(0x1bf)](_0x25c773(0x111)),0x0;}const _0x14a7d0=await withSpinner(_0x25c773(0x1db)+_0x420fb2+_0x25c773(0x1ec),()=>_0x29dcc5[_0x25c773(0x166)][_0x25c773(0x13a)](_0x420fb2),{'verbose':_0xa0782b['verbose']}),_0x5d58e4=_0x14a7d0[_0x25c773(0x1ab)];return console[_0x25c773(0x1bf)]('✔\x20Deleted\x20project\x20'+_0x5d58e4[_0x25c773(0x192)]),console['error'](_0x25c773(0x1b7)+_0x5d58e4[_0x25c773(0x181)]),0x0;}}export function parseKeyValue(_0x2c2525){const _0x1e55cb=a38_0x2f1d07,_0x56d8d3=_0x2c2525[_0x1e55cb(0x186)]('=');if(_0x56d8d3===-0x1)throw new Error(_0x1e55cb(0x148)+_0x2c2525+_0x1e55cb(0x239));const _0x2ec9c3=_0x2c2525[_0x1e55cb(0x1c6)](0x0,_0x56d8d3),_0x1f12a7=_0x2c2525[_0x1e55cb(0x1c6)](_0x56d8d3+0x1);if(!_0x2ec9c3)throw new Error(_0x1e55cb(0x1b2));return{'key':_0x2ec9c3,'value':_0x1f12a7};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x11b);[a38_0x2f1d07(0x14c)]=a38_0x2f1d07(0x19a);async[a38_0x2f1d07(0x1a7)](_0x4621c4){const _0x3e8ebc=a38_0x2f1d07,{options:_0x502316,args:_0x569fb6,tdx:_0x6be009}=_0x4621c4,_0x559c95=this[_0x3e8ebc(0x16d)](_0x569fb6,_0x502316);if(!_0x559c95)return 0x1;_0x502316[_0x3e8ebc(0x219)]&&console[_0x3e8ebc(0x1bf)]('Project:\x20'+_0x559c95);const _0x55c7a2=await withSpinner(_0x3e8ebc(0x1f8),()=>_0x6be009['workflow'][_0x3e8ebc(0x175)](_0x559c95),{'verbose':_0x502316[_0x3e8ebc(0x219)]}),{secrets:_0x1ce422}=_0x55c7a2['data'];return console[_0x3e8ebc(0x1bf)](_0x3e8ebc(0x1be)+_0x1ce422['length']+'\x20secret'+(_0x1ce422['length']!==0x1?'s':'')),await handleSDKOutput(_0x1ce422,_0x502316),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{['name']=a38_0x2f1d07(0x15b);['description']=a38_0x2f1d07(0x218);async[a38_0x2f1d07(0x1a7)](_0x394d8a){const _0x2faff9=a38_0x2f1d07,{options:_0x2bd692,args:_0x260c41,tdx:_0x1de054}=_0x394d8a;let _0x49d351,_0x2a5d78;if(_0x260c41['length']>=0x2)_0x49d351=_0x260c41[0x0],_0x2a5d78=_0x260c41[0x1];else{if(_0x260c41[_0x2faff9(0x17c)]===0x1&&_0x2bd692[_0x2faff9(0x1ed)])_0x49d351=_0x2bd692['workflowProject'],_0x2a5d78=_0x260c41[0x0];else return _0x260c41[_0x2faff9(0x17c)]===0x1?(console[_0x2faff9(0x1bf)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x2faff9(0x1bf)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console[_0x2faff9(0x1bf)](_0x2faff9(0x224)),console[_0x2faff9(0x1bf)](_0x2faff9(0x1c0)),0x1);}let _0x16329e,_0xbaa6e1;try{({key:_0x16329e,value:_0xbaa6e1}=parseKeyValue(_0x2a5d78));}catch(_0x111ef9){return _0x111ef9 instanceof Error&&console[_0x2faff9(0x1bf)](a38_0x3a8e01[_0x2faff9(0x16b)](_0x2faff9(0x196)),_0x111ef9[_0x2faff9(0x19c)]),0x1;}_0x2bd692[_0x2faff9(0x219)]&&(console[_0x2faff9(0x1bf)](_0x2faff9(0x1bc)+_0x49d351),console[_0x2faff9(0x1bf)](_0x2faff9(0x1c1)+_0x16329e));const _0x26576e=await withSpinner(_0x2faff9(0x1d2),()=>_0x1de054[_0x2faff9(0x166)][_0x2faff9(0x1df)](_0x49d351,_0x16329e,_0xbaa6e1),{'verbose':_0x2bd692[_0x2faff9(0x219)]}),_0x317679=_0x26576e['data'];return console[_0x2faff9(0x1bf)](_0x2faff9(0x209)+_0x317679[_0x2faff9(0x164)]+'\x27\x20has\x20been\x20set\x20for\x20project\x20\x27'+_0x317679[_0x2faff9(0x192)]+'\x27'),(_0x2bd692[_0x2faff9(0x180)]||_0x2bd692[_0x2faff9(0x13f)])&&await handleSingleObjectOutput(_0x317679,_0x2bd692),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{[a38_0x2f1d07(0x1fb)]=a38_0x2f1d07(0x1f4);['description']=a38_0x2f1d07(0x226);async[a38_0x2f1d07(0x1a7)](_0x371e58){const _0x1c254e=a38_0x2f1d07,{options:_0x555f0a,args:_0x27b604,tdx:_0x3e489e}=_0x371e58;let _0x549ccf,_0x39552d;if(_0x27b604[_0x1c254e(0x17c)]>=0x2)_0x549ccf=_0x27b604[0x0],_0x39552d=_0x27b604[0x1];else{if(_0x27b604[_0x1c254e(0x17c)]===0x1&&_0x555f0a[_0x1c254e(0x1ed)])_0x549ccf=_0x555f0a[_0x1c254e(0x1ed)],_0x39552d=_0x27b604[0x0];else return _0x27b604[_0x1c254e(0x17c)]===0x1?(console['error'](_0x1c254e(0x11e)),console['error'](_0x1c254e(0x1e6)),0x1):(console[_0x1c254e(0x1bf)](_0x1c254e(0x195)),console[_0x1c254e(0x1bf)](_0x1c254e(0x1ca)),0x1);}_0x555f0a[_0x1c254e(0x219)]&&(console[_0x1c254e(0x1bf)](_0x1c254e(0x1bc)+_0x549ccf),console[_0x1c254e(0x1bf)]('Key:\x20'+_0x39552d));if(!_0x555f0a['yes']){const _0x11f73f=await confirmKey(_0x1c254e(0x16a)+_0x39552d+'\x27\x20from\x20project\x20\x27'+_0x549ccf+'\x27?');if(!_0x11f73f)return console['error']('Cancelled'),0x0;}const _0x1a5f74=await withSpinner(_0x1c254e(0x136),()=>_0x3e489e['workflow'][_0x1c254e(0x165)](_0x549ccf,_0x39552d),{'verbose':_0x555f0a[_0x1c254e(0x219)]}),_0x2c2dd8=_0x1a5f74[_0x1c254e(0x1ab)];return console['error'](_0x1c254e(0x209)+_0x2c2dd8[_0x1c254e(0x164)]+_0x1c254e(0x124)+_0x2c2dd8['projectName']+'\x27'),(_0x555f0a['json']||_0x555f0a[_0x1c254e(0x13f)])&&await handleSingleObjectOutput(_0x2c2dd8,_0x555f0a),0x0;}}
|
|
1
|
+
const a38_0x3dc27b=a38_0xa343;(function(_0x46d9ab,_0x5efa91){const _0x590d99=a38_0xa343,_0x38b4c6=_0x46d9ab();while(!![]){try{const _0x284399=-parseInt(_0x590d99(0x143))/0x1*(parseInt(_0x590d99(0x198))/0x2)+-parseInt(_0x590d99(0x9e))/0x3*(-parseInt(_0x590d99(0x23f))/0x4)+-parseInt(_0x590d99(0x1df))/0x5*(-parseInt(_0x590d99(0x118))/0x6)+-parseInt(_0x590d99(0x1a2))/0x7+parseInt(_0x590d99(0x1ca))/0x8+parseInt(_0x590d99(0xb9))/0x9*(parseInt(_0x590d99(0x1a5))/0xa)+parseInt(_0x590d99(0xa3))/0xb*(-parseInt(_0x590d99(0x193))/0xc);if(_0x284399===_0x5efa91)break;else _0x38b4c6['push'](_0x38b4c6['shift']());}catch(_0x4e7ee9){_0x38b4c6['push'](_0x38b4c6['shift']());}}}(a38_0x3456,0xe0510));import a38_0x4e5599 from'chalk';import{existsSync}from'fs';function a38_0xa343(_0x9def2d,_0x3dc05a){_0x9def2d=_0x9def2d-0x9e;const _0x3456ab=a38_0x3456();let _0xa343e4=_0x3456ab[_0x9def2d];return _0xa343e4;}import a38_0x514e72 from'path';import{BaseCommand}from'./command.js';import{handleSDKOutput,handleSingleObjectOutput,writeOutput}from'../core/command-output.js';import{saveSessionContext}from'../core/session.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey}from'../utils/prompt.js';import{formatBytes,hyperlink}from'../sdk/util/formatters.js';import{stringWidth}from'../utils/string-utils.js';import{getWorkflowUrl,getConsoleUrl,getWorkflowSessionUrl,getWorkflowAttemptUrl}from'../sdk/client/endpoints.js';import a38_0x1916d9 from'prompts';function getAttemptStatusDisplay(_0x55a65e){const _0x20fccb=a38_0xa343;if(!_0x55a65e)return{'icon':'⏳','text':''};const {done:_0x1e1f6b,success:_0x1f3895,cancelRequested:_0x426e50}=_0x55a65e;if(!_0x1e1f6b)return _0x426e50?{'icon':'🛑','text':a38_0x4e5599[_0x20fccb(0x1d6)](_0x20fccb(0x186))}:{'icon':'🔄','text':a38_0x4e5599[_0x20fccb(0xc7)](_0x20fccb(0xbf))};if(_0x1f3895)return{'icon':'✅','text':a38_0x4e5599['green'](_0x20fccb(0xd6))};return{'icon':'❌','text':a38_0x4e5599[_0x20fccb(0x1a1)](_0x20fccb(0xfa))};}export class WorkflowBaseCommand extends BaseCommand{[a38_0x3dc27b(0x1fa)](_0x28877b,_0x4f7155,_0x33cf87=0x0){return _0x28877b[_0x33cf87]||_0x4f7155['workflowProject'];}['requireProject'](_0x344f1c,_0x277d5c,_0x3aae39=0x0){const _0x417682=a38_0x3dc27b,_0x45babb=this['resolveProject'](_0x344f1c,_0x277d5c,_0x3aae39);if(!_0x45babb)return console[_0x417682(0xfa)](a38_0x4e5599[_0x417682(0x1a1)]('Error:'),_0x417682(0xdf)),console[_0x417682(0xfa)](a38_0x4e5599[_0x417682(0x18c)](_0x417682(0x18d))),null;return _0x45babb;}[a38_0x3dc27b(0x1be)](_0x10ad99,_0x5d0579){const _0x3f88f0=a38_0x3dc27b;if(_0x10ad99[0x0]){const _0x33f81c=_0x10ad99[0x0][_0x3f88f0(0x1cf)]('.');if(_0x33f81c[_0x3f88f0(0x1f2)]===0x1)return{'projectName':_0x33f81c[0x0],'workflowName':undefined};else return _0x33f81c[_0x3f88f0(0x1f2)]===0x2?{'projectName':_0x33f81c[0x0],'workflowName':_0x33f81c[0x1]}:(console[_0x3f88f0(0xfa)](a38_0x4e5599[_0x3f88f0(0x1a1)](_0x3f88f0(0xbe)),'Invalid\x20pattern.\x20Use\x20format:\x20project\x20or\x20project.workflow'),null);}return{'projectName':_0x5d0579[_0x3f88f0(0x22b)],'workflowName':undefined};}[a38_0x3dc27b(0x202)](_0x2ea5e4,_0x141590,_0x3a5c28=0x0){const _0x29765c=a38_0x3dc27b;if(_0x2ea5e4[_0x3a5c28])return _0x2ea5e4[_0x3a5c28];if(_0x141590[_0x29765c(0x22b)]){const _0x76ed96=a38_0x514e72[_0x29765c(0x1d4)](process['cwd'](),'workflows',_0x141590[_0x29765c(0x22b)]);if(existsSync(a38_0x514e72['join'](_0x76ed96,'tdx.json')))return _0x76ed96;}return undefined;}async[a38_0x3dc27b(0x107)](_0x25e856,_0xa4363f,_0xe322b5){const _0x581fad=a38_0x3dc27b;try{const _0x31b163=await _0x25e856[_0x581fad(0xa1)][_0x581fad(0x21c)](_0xa4363f,{'limit':0x1});if(_0x31b163['length']>0x0){const _0x55ec8e=_0x31b163[0x0]['id'],_0x343c2d=getWorkflowUrl(_0xe322b5,_0x55ec8e);console[_0x581fad(0xfa)](_0x581fad(0x1f0)+a38_0x4e5599[_0x581fad(0x12d)](_0x343c2d));}}catch{}}}export class WorkflowUseCommand extends BaseCommand{['name']='workflow:use';[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x21a);async['execute'](_0x2d0c4d){const _0x23da29=a38_0x3dc27b,{options:_0x1dd032,args:_0x5bfd04,tdx:_0xe1b646}=_0x2d0c4d,_0x2820c9=_0x5bfd04[0x0],_0x306ef7=_0x1dd032['clear'];if(_0x306ef7)return saveSessionContext({'workflow_project':undefined},_0x1dd032['session']),console[_0x23da29(0x184)](a38_0x4e5599[_0x23da29(0x11a)](_0x23da29(0xef))),0x0;if(!_0x2820c9)return console[_0x23da29(0xfa)](a38_0x4e5599['red'](_0x23da29(0xbe)),_0x23da29(0xdf)),console[_0x23da29(0xfa)](a38_0x4e5599[_0x23da29(0x18c)]('Usage:\x20tdx\x20wf\x20use\x20<project>')),console['error'](a38_0x4e5599[_0x23da29(0x18c)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20use\x20--clear\x20\x20\x20\x20#\x20Clear\x20context')),0x1;const _0x58a97e=await withSpinner(_0x23da29(0x158)+_0x2820c9+_0x23da29(0xf6),()=>_0xe1b646[_0x23da29(0xa1)][_0x23da29(0x20e)](_0x2820c9),{'verbose':_0x1dd032[_0x23da29(0x12f)]}),{name:_0x377fe}=_0x58a97e[_0x23da29(0x15a)];return saveSessionContext({'workflow_project':_0x377fe},_0x1dd032[_0x23da29(0xf4)]),console['log'](a38_0x4e5599['green'](_0x23da29(0xea)+a38_0x4e5599[_0x23da29(0x12d)](_0x377fe))),0x0;}}export class WorkflowProjectsCommand extends BaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x236);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x113);async['execute'](_0x3ece0b){const _0x2fddf4=a38_0x3dc27b,{options:_0x1f2ddd,args:_0x27aba2,tdx:_0x413f7e}=_0x3ece0b,_0x465eea=_0x27aba2[0x0];_0x1f2ddd['verbose']&&_0x465eea&&console[_0x2fddf4(0xfa)](_0x2fddf4(0x1d2)+_0x465eea);const _0x2aefaf=await withSpinner(_0x2fddf4(0xb3),()=>_0x413f7e[_0x2fddf4(0xa1)]['projects'](_0x465eea,{'limit':_0x1f2ddd[_0x2fddf4(0x121)]}),{'verbose':_0x1f2ddd['verbose']});let _0x11aaa4=_0x2aefaf[_0x2fddf4(0x15a)];_0x11aaa4[_0x2fddf4(0x223)]((_0x21f5f3,_0x327ea8)=>_0x21f5f3[_0x2fddf4(0x159)]['localeCompare'](_0x327ea8['name']));const _0x1e03aa=_0x1f2ddd[_0x2fddf4(0x121)]||0x64,_0x367e87=_0x11aaa4[_0x2fddf4(0x1f2)]>=_0x1e03aa?a38_0x4e5599['dim']('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console[_0x2fddf4(0xfa)](_0x2fddf4(0xd5)+_0x11aaa4[_0x2fddf4(0x1f2)]+_0x2fddf4(0xd3)+(_0x11aaa4[_0x2fddf4(0x1f2)]!==0x1?'s':'')+_0x367e87);if(_0x1f2ddd['format']===_0x2fddf4(0x130)||_0x1f2ddd[_0x2fddf4(0x1b0)]===_0x2fddf4(0x241)||_0x1f2ddd[_0x2fddf4(0x1b0)]===_0x2fddf4(0xfe))await handleSDKOutput(_0x11aaa4,_0x1f2ddd);else{if(_0x11aaa4[_0x2fddf4(0x1f2)]===0x0)_0x465eea?console[_0x2fddf4(0x184)](_0x2fddf4(0x15d)+_0x465eea):console[_0x2fddf4(0x184)]('No\x20workflow\x20projects\x20found');else{const _0x5bd7e2=_0x11aaa4[_0x2fddf4(0x142)](_0x4e3d73=>{const _0xfe2ec1=_0x2fddf4,_0x29c142=_0x4e3d73['metadata']?.[_0xfe2ec1(0x103)](_0x7e2d5=>_0x7e2d5[_0xfe2ec1(0x21f)]===_0xfe2ec1(0x106)),_0x188b07=_0x29c142?a38_0x4e5599[_0xfe2ec1(0x18c)]('\x20(system)'):'';return'📁\x20'+_0x4e3d73[_0xfe2ec1(0x159)]+_0x188b07;});await writeOutput(_0x5bd7e2[_0x2fddf4(0x1d4)]('\x0a'),_0x1f2ddd[_0x2fddf4(0x1f6)],_0x2fddf4(0xe2));}}return 0x0;}}export class WorkflowWorkflowsCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x19a);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x243);async[a38_0x3dc27b(0x10e)](_0x1b6482){const _0x21cdb5=a38_0x3dc27b,{options:_0x2e79cf,args:_0x2003f5,tdx:_0x20403f}=_0x1b6482,_0x13e907=this[_0x21cdb5(0x1fa)](_0x2003f5,_0x2e79cf);_0x2e79cf[_0x21cdb5(0x12f)]&&_0x13e907&&console[_0x21cdb5(0xfa)](_0x21cdb5(0x217)+_0x13e907);const _0x2b0881=await withSpinner(_0x21cdb5(0x1ad),()=>_0x20403f[_0x21cdb5(0xa1)][_0x21cdb5(0x21c)](_0x13e907,{'limit':_0x2e79cf['limit']}),{'verbose':_0x2e79cf[_0x21cdb5(0x12f)]});let _0x10b869=_0x2b0881['data'];_0x10b869[_0x21cdb5(0x223)]((_0x37acbf,_0x32bf77)=>{const _0xff87c7=_0x21cdb5,_0x14568f=_0x37acbf[_0xff87c7(0x159)][_0xff87c7(0x173)](_0x32bf77['name']);if(_0x14568f!==0x0)return _0x14568f;return(_0x37acbf[_0xff87c7(0x218)]?.['name']||'')[_0xff87c7(0x173)](_0x32bf77[_0xff87c7(0x218)]?.[_0xff87c7(0x159)]||'');});const _0x505741=_0x2e79cf[_0x21cdb5(0x121)]||0x64,_0xec85a8=_0x10b869['length']>=_0x505741?a38_0x4e5599[_0x21cdb5(0x18c)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error'](_0x21cdb5(0xd5)+_0x10b869['length']+'\x20workflow'+(_0x10b869[_0x21cdb5(0x1f2)]!==0x1?'s':'')+_0xec85a8);if(_0x2e79cf[_0x21cdb5(0x1b0)]===_0x21cdb5(0x130)||_0x2e79cf[_0x21cdb5(0x1b0)]===_0x21cdb5(0x241)||_0x2e79cf[_0x21cdb5(0x1b0)]===_0x21cdb5(0xfe))await handleSDKOutput(_0x10b869,_0x2e79cf);else{if(_0x10b869[_0x21cdb5(0x1f2)]===0x0)_0x13e907?console[_0x21cdb5(0x184)](_0x21cdb5(0x138)+_0x13e907):console[_0x21cdb5(0x184)](_0x21cdb5(0x12c));else{const _0xd32f23=_0x2e79cf[_0x21cdb5(0x1fe)],_0x357967=_0x10b869[_0x21cdb5(0x142)](_0x59c2ed=>{const _0x458da3=_0x21cdb5,_0x3e2a5a=a38_0x4e5599[_0x458da3(0x18c)]('#'+_0x59c2ed['id']),_0x46ff68=hyperlink(_0x3e2a5a,getWorkflowUrl(_0xd32f23,_0x59c2ed['id'])),_0x4570bf=_0x59c2ed['project']?.[_0x458da3(0x159)]?a38_0x4e5599[_0x458da3(0x18c)]('\x20('+_0x59c2ed['project'][_0x458da3(0x159)]+')'):'';return _0x458da3(0x156)+_0x46ff68+'\x20'+_0x59c2ed['name']+_0x4570bf;});await writeOutput(_0x357967[_0x21cdb5(0x1d4)]('\x0a'),_0x2e79cf[_0x21cdb5(0x1f6)],_0x21cdb5(0xe2));}}return 0x0;}}export class WorkflowSessionsCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]='workflow:sessions';[a38_0x3dc27b(0x144)]='List\x20workflow\x20execution\x20sessions';async[a38_0x3dc27b(0x10e)](_0x28b65a){const _0x1cd8be=a38_0x3dc27b,{options:_0x39d66c,args:_0x1f043d,tdx:_0x35c35c}=_0x28b65a,_0x222b0b=this[_0x1cd8be(0x1be)](_0x1f043d,_0x39d66c);if(!_0x222b0b)return 0x1;const {projectName:_0x5e6213,workflowName:_0x3b6938}=_0x222b0b;if(_0x39d66c[_0x1cd8be(0x12f)]){if(_0x5e6213&&_0x3b6938)console[_0x1cd8be(0xfa)](_0x1cd8be(0x17d)+_0x5e6213+'.'+_0x3b6938);else _0x5e6213&&console[_0x1cd8be(0xfa)](_0x1cd8be(0x220)+_0x5e6213);const _0x4b445f=_0x39d66c['status'];_0x4b445f&&console['error']('Status:\x20'+_0x4b445f);}let _0x18ab69=0x28;if(process[_0x1cd8be(0x115)]['isTTY']&&!_0x39d66c['output']&&!_0x39d66c[_0x1cd8be(0x1b0)]){const _0x2dff1=process['stdout'][_0x1cd8be(0x23a)]||0x28;_0x18ab69=Math[_0x1cd8be(0x1d7)](0x14,Math[_0x1cd8be(0x1c1)](_0x2dff1*0x2/0x3));}const _0x59a1f2=_0x39d66c['limit']||_0x18ab69,_0x562b0e=await withSpinner(_0x1cd8be(0xc6),()=>_0x35c35c[_0x1cd8be(0xa1)][_0x1cd8be(0x23b)]({'projectName':_0x5e6213,'workflowName':_0x3b6938,'status':_0x39d66c[_0x1cd8be(0x167)],'fromTime':_0x39d66c[_0x1cd8be(0x211)],'toTime':_0x39d66c['to'],'limit':_0x59a1f2}),{'verbose':_0x39d66c['verbose']}),_0x1828af=_0x562b0e[_0x1cd8be(0x15a)];_0x1828af['sort']((_0x2d7b37,_0x2c4f20)=>{const _0x2795b6=_0x1cd8be,_0x3fdd13=_0x2d7b37[_0x2795b6(0x1e4)]||'',_0x121cfc=_0x2c4f20[_0x2795b6(0x1e4)]||'';return _0x121cfc['localeCompare'](_0x3fdd13);});_0x1828af[_0x1cd8be(0x1f2)]>=_0x59a1f2?console[_0x1cd8be(0xfa)](_0x1cd8be(0x145)+_0x1828af[_0x1cd8be(0x1f2)]+_0x1cd8be(0xfb)+a38_0x4e5599[_0x1cd8be(0x18c)]('(use\x20--limit\x20to\x20see\x20more)')):console[_0x1cd8be(0xfa)]('✔\x20Found\x20'+_0x1828af['length']+_0x1cd8be(0xb4)+(_0x1828af[_0x1cd8be(0x1f2)]!==0x1?'s':''));if(_0x39d66c[_0x1cd8be(0x1b0)]===_0x1cd8be(0x130)||_0x39d66c[_0x1cd8be(0x1b0)]===_0x1cd8be(0x241)||_0x39d66c[_0x1cd8be(0x1b0)]===_0x1cd8be(0xfe))await handleSDKOutput(_0x1828af,_0x39d66c);else{if(!process['stdout'][_0x1cd8be(0x18b)]||_0x39d66c[_0x1cd8be(0x1f6)]){if(_0x1828af[_0x1cd8be(0x1f2)]===0x0){if(_0x5e6213&&_0x3b6938)console[_0x1cd8be(0x184)](_0x1cd8be(0x129)+_0x5e6213+'.'+_0x3b6938);else _0x5e6213?console[_0x1cd8be(0x184)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x5e6213):console[_0x1cd8be(0x184)](_0x1cd8be(0x13b));}else{const _0x2d0cc8=_0x39d66c[_0x1cd8be(0x1fe)],_0x37e784=this[_0x1cd8be(0x1d9)](_0x1828af,_0x2d0cc8);_0x39d66c[_0x1cd8be(0x1f6)]?await writeOutput(_0x37e784,_0x39d66c[_0x1cd8be(0x1f6)],_0x1cd8be(0xe2)):console[_0x1cd8be(0x184)](_0x37e784);}!_0x5e6213&&(console[_0x1cd8be(0xfa)](''),console[_0x1cd8be(0xfa)](a38_0x4e5599[_0x1cd8be(0x18c)](_0x1cd8be(0x19c))),console[_0x1cd8be(0xfa)](a38_0x4e5599[_0x1cd8be(0x18c)](_0x1cd8be(0x1de))+'or'+a38_0x4e5599['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));}else{if(_0x1828af[_0x1cd8be(0x1f2)]===0x0){if(_0x5e6213&&_0x3b6938)console['log'](_0x1cd8be(0x129)+_0x5e6213+'.'+_0x3b6938);else _0x5e6213?console[_0x1cd8be(0x184)]('No\x20sessions\x20found\x20in\x20project:\x20'+_0x5e6213):console[_0x1cd8be(0x184)]('No\x20sessions\x20found');}else await this[_0x1cd8be(0x1ba)](_0x1828af,_0x28b65a,_0x5e6213);}}return 0x0;}[a38_0x3dc27b(0x1d9)](_0x25b53c,_0x10fc46){const _0x30036b=a38_0x3dc27b,_0x327f38=[],_0x4940dd=new Map();let _0x2ae125=Infinity,_0x2304ab=-Infinity;for(const _0x913173 of _0x25b53c){if(_0x913173[_0x30036b(0x189)]?.[_0x30036b(0x1ee)]){const _0x24a47d=new Date(_0x913173[_0x30036b(0x189)][_0x30036b(0x1ee)])[_0x30036b(0x1eb)](),_0x398918=_0x913173[_0x30036b(0x189)][_0x30036b(0x242)]?new Date(_0x913173[_0x30036b(0x189)][_0x30036b(0x242)])[_0x30036b(0x1eb)]():Date[_0x30036b(0x1e5)](),_0x53a77a=_0x913173[_0x30036b(0x218)]?.['name']||_0x30036b(0x19f);!_0x4940dd[_0x30036b(0x139)](_0x53a77a)&&_0x4940dd[_0x30036b(0xfd)](_0x53a77a,[]),_0x4940dd[_0x30036b(0x195)](_0x53a77a)['push']({'session':_0x913173,'startTime':_0x24a47d,'endTime':_0x398918,'duration':_0x398918-_0x24a47d}),_0x2ae125=Math['min'](_0x2ae125,_0x24a47d),_0x2304ab=Math['max'](_0x2304ab,_0x398918);}}if(_0x4940dd[_0x30036b(0x215)]===0x0)return'No\x20sessions\x20with\x20timing\x20information';const _0x970b7d=process['stdout'][_0x30036b(0x150)]||0x78,_0x3e12e1=0x1e,_0x359a46=0x32,_0x29b633=0x4,_0x363dfc=Math['min'](_0x359a46,Math[_0x30036b(0x1d7)](_0x3e12e1,Math[_0x30036b(0x1c1)](_0x970b7d*0.3))),_0x16a822=_0x970b7d-_0x363dfc-TIMELINE_CONFIG[_0x30036b(0x213)]-0x3-_0x29b633,_0x15c71c=_0x2304ab-_0x2ae125,_0x1bae80=_0x15c71c/_0x363dfc,_0x5266ce=renderTimeAxis({'startTime':_0x2ae125,'endTime':_0x2304ab,'durationMs':_0x15c71c,'msPerChar':_0x1bae80},_0x363dfc),_0x28bedf=[];for(const _0x289bc0 of _0x4940dd['values']()){_0x28bedf[_0x30036b(0x133)](..._0x289bc0);}_0x28bedf[_0x30036b(0x223)]((_0x16fc82,_0x168ec3)=>_0x168ec3['startTime']-_0x16fc82[_0x30036b(0xee)]);const _0x13512b=new Date(_0x2ae125),_0x2e39a4=formatDate(_0x13512b),_0x3d784d=_0x29b633+TIMELINE_CONFIG[_0x30036b(0x224)]+TIMELINE_CONFIG[_0x30036b(0x235)]+_0x16a822,_0x11bd0e='\x20'['repeat'](_0x3d784d-_0x2e39a4[_0x30036b(0x1f2)]),_0x82b145=_0x11bd0e+a38_0x4e5599[_0x30036b(0x18c)](_0x2e39a4)+'\x20'+_0x5266ce;_0x327f38[_0x30036b(0x133)](_0x82b145);const _0x47410c=0x16;let _0x1d8a79=0x0;for(const _0x1eb82c of _0x28bedf){const _0x32a05f=_0x1eb82c[_0x30036b(0xf4)][_0x30036b(0x218)]?.['name']||'?',_0x3644f4=Math['min'](stringWidth(_0x32a05f),_0x47410c);_0x1d8a79=Math[_0x30036b(0x1d7)](_0x1d8a79,_0x3644f4);}for(const _0x31e568 of _0x28bedf){const {session:_0x14f189,startTime:_0x40c71d,endTime:_0x4627b9,duration:_0x5f20c4}=_0x31e568,_0x444c42=_0x14f189[_0x30036b(0x218)]?.['id'],_0x3eb701=_0x14f189['id'],_0x4dbade=_0x14f189[_0x30036b(0x218)]?.[_0x30036b(0x159)]||'?',_0x38879c=_0x14f189[_0x30036b(0xa1)]?.['name']||'?';let _0x51daa8,_0x3d7fdb;if(_0x14f189[_0x30036b(0x189)]){const _0x4a6792=_0x14f189[_0x30036b(0x189)];!_0x4a6792['done']?(_0x51daa8=_0x4a6792[_0x30036b(0x112)]?'🛑':'🔄',_0x3d7fdb=_0x4a6792['cancelRequested']?a38_0x4e5599[_0x30036b(0x1d6)]:a38_0x4e5599[_0x30036b(0xc7)]):(_0x51daa8=_0x4a6792[_0x30036b(0xd6)]?'✅':'❌',_0x3d7fdb=_0x4a6792[_0x30036b(0xd6)]?a38_0x4e5599[_0x30036b(0x11a)]:a38_0x4e5599[_0x30036b(0x1a1)]);}else _0x51daa8='⏳',_0x3d7fdb=a38_0x4e5599[_0x30036b(0x18c)];const _0x2f70fd='#'+_0x3eb701,_0x3c6a16=_0x444c42?hyperlink(_0x2f70fd,getWorkflowSessionUrl(_0x10fc46,_0x444c42,_0x3eb701)):_0x2f70fd;let _0x312212=_0x4dbade;stringWidth(_0x4dbade)>_0x47410c&&(_0x312212=_0x4dbade[_0x30036b(0x228)](0x0,_0x47410c-0x1)+'…');const _0xec2f14=a38_0x4e5599[_0x30036b(0x18c)](_0x312212),_0x289961=stringWidth(_0x312212),_0x2cca34='\x20'[_0x30036b(0x1ac)](_0x1d8a79-stringWidth(_0x312212)+0x2),_0x3af4b9='('+formatElapsed(_0x5f20c4)+')',_0x15cf8b=stringWidth(_0x3af4b9),_0x48d352=stringWidth(_0x2f70fd),_0x2b0da5=_0x48d352+0x1+_0x289961+_0x2cca34[_0x30036b(0x1f2)],_0x55c589=_0x16a822-_0x2b0da5-_0x15cf8b-0x1-0x8;let _0x4eaa17=_0x38879c;stringWidth(_0x4eaa17)>_0x55c589&&(_0x4eaa17=_0x4eaa17[_0x30036b(0x228)](0x0,_0x55c589-0x1)+'…');const _0x9121b0=_0x3c6a16+'\x20'+_0xec2f14+_0x2cca34+_0x4eaa17,_0x37a6eb=stringWidth(_0x9121b0),_0x2481e2=_0x16a822-_0x37a6eb-_0x15cf8b,_0x3e46d7=_0x9121b0+'\x20'[_0x30036b(0x1ac)](Math[_0x30036b(0x1d7)](0x1,_0x2481e2))+a38_0x4e5599[_0x30036b(0x18c)](_0x3af4b9),_0x1ef19c=Math['floor']((_0x40c71d-_0x2ae125)/_0x1bae80),_0x3131ad=Math['floor']((_0x4627b9-_0x2ae125)/_0x1bae80),_0x35ccfb=Math[_0x30036b(0x1d7)](_0x1ef19c+0x1,_0x3131ad),_0x1da71b=new Array(_0x363dfc)[_0x30036b(0x13a)]('\x20');for(let _0x4e1a16=_0x1ef19c;_0x4e1a16<Math['min'](_0x35ccfb,_0x363dfc);_0x4e1a16++){_0x1da71b[_0x4e1a16]='─';}const _0xb2f2ec=_0x1da71b[_0x30036b(0x142)](_0x8f5fbb=>_0x8f5fbb==='\x20'?'\x20':_0x3d7fdb(_0x8f5fbb))[_0x30036b(0x1d4)]('');_0x327f38['push'](_0x51daa8+'\x20'+_0x3e46d7+'│'+_0xb2f2ec+'│');}return _0x327f38[_0x30036b(0x1d4)]('\x0a');}async[a38_0x3dc27b(0x1ba)](_0x5d259a,_0x3e1b1a,_0x5c6613){const _0x4f4ca5=a38_0x3dc27b,{options:_0x57623a,tdx:_0x294c18}=_0x3e1b1a,_0x2ab858=_0x57623a['site'],{timelineRows:_0xb1a262,timeAxisHeader:_0x422511}=this[_0x4f4ca5(0x233)](_0x5d259a,_0x2ab858),_0x5b6b16=_0xb1a262['filter'](_0x31f92e=>_0x31f92e[_0x4f4ca5(0x1c8)]);if(_0x5b6b16[_0x4f4ca5(0x1f2)]===0x0){const _0x4245aa=this['renderSessionsTimeline'](_0x5d259a,_0x2ab858);console[_0x4f4ca5(0x184)](_0x4245aa);!_0x5c6613&&(console[_0x4f4ca5(0xfa)](''),console['error'](a38_0x4e5599[_0x4f4ca5(0x18c)](_0x4f4ca5(0x19c))),console[_0x4f4ca5(0xfa)](a38_0x4e5599[_0x4f4ca5(0x18c)](_0x4f4ca5(0x1de))+'or'+a38_0x4e5599['dim']('\x20\x20tdx\x20wf\x20use\x20<project>')));return;}_0x422511&&console[_0x4f4ca5(0x184)](_0x422511);const _0x268d2f=_0xb1a262['filter'](_0x3945c5=>_0x3945c5['attemptId'])[_0x4f4ca5(0x142)](_0x190992=>({'title':_0x190992[_0x4f4ca5(0xe4)],'value':_0x190992[_0x4f4ca5(0x1c8)]})),_0x4d144a=process[_0x4f4ca5(0x115)]['rows']||0x3c,_0x16f8dd=Math['max'](0x28,Math[_0x4f4ca5(0x1c1)](_0x4d144a*0x2/0x3)),_0xf38cec=await a38_0x1916d9({'type':'autocomplete','name':'attemptId','message':_0x4f4ca5(0x101),'choices':_0x268d2f,'initial':-0x1,'limit':_0x16f8dd,'clearFirst':!![],'fallback':{'title':_0x4f4ca5(0x164),'value':null},'suggest':(_0x23ffa6,_0x31ea69)=>{const _0x1f823d=_0x4f4ca5;if(!_0x23ffa6)return Promise[_0x1f823d(0x194)](_0x31ea69);const _0x2b1562=_0x31ea69['filter'](_0x39c80e=>{const _0x973685=_0x1f823d,_0x3216e0=_0x39c80e;return _0x3216e0[_0x973685(0x1a9)][_0x973685(0x1d3)]()[_0x973685(0xdd)](_0x23ffa6[_0x973685(0x1d3)]());});return Promise[_0x1f823d(0x194)](_0x2b1562);}}),_0x5710dd=()=>{const _0x167bdf=_0x4f4ca5;process[_0x167bdf(0x115)][_0x167bdf(0x168)](_0x167bdf(0x1e6)),process[_0x167bdf(0x115)][_0x167bdf(0x168)]('\x1b[1A\x1b[2K'),process[_0x167bdf(0x115)][_0x167bdf(0x168)](_0x167bdf(0x1e6));},_0x43c71e=_0xf38cec&&_0xf38cec['attemptId']&&_0xf38cec[_0x4f4ca5(0x1c8)]!==null&&_0xf38cec[_0x4f4ca5(0x1c8)][_0x4f4ca5(0xb2)]()!=='';if(!_0x43c71e){_0x5710dd(),console[_0x4f4ca5(0x184)](a38_0x4e5599[_0x4f4ca5(0x18c)]('Cancelled'));return;}_0x5710dd();const _0x7b1d76=_0x5d259a[_0x4f4ca5(0x1dc)](_0x56295e=>_0x56295e[_0x4f4ca5(0x189)]?.['id']===_0xf38cec[_0x4f4ca5(0x1c8)]);if(_0x7b1d76){const _0x215721=_0x7b1d76[_0x4f4ca5(0x218)]?.['name']||'?',_0x59fe5d=_0x7b1d76[_0x4f4ca5(0xa1)]?.[_0x4f4ca5(0x159)]||'?';console['log'](_0x4f4ca5(0x185)+a38_0x4e5599['dim'](_0x215721)+_0x4f4ca5(0x100)+a38_0x4e5599[_0x4f4ca5(0x18c)](_0x59fe5d));}const _0x508ccd=new WorkflowTimelineCommand();await _0x508ccd['execute']({'args':[],'options':{..._0x57623a,'attemptId':_0xf38cec[_0x4f4ca5(0x1c8)]},'tdx':_0x294c18});}['generateSessionTimelineRows'](_0x209ef7,_0x476473){const _0x4f2adb=a38_0x3dc27b,_0x881979=new Map();for(const _0x226f7a of _0x209ef7){_0x226f7a['id']&&_0x226f7a[_0x4f2adb(0x189)]?.['id']&&_0x881979[_0x4f2adb(0xfd)](_0x226f7a['id'],_0x226f7a[_0x4f2adb(0x189)]['id']);}const _0x5dedaa=[];let _0x194a3d='';const _0x510ed8=this[_0x4f2adb(0x1d9)](_0x209ef7,_0x476473),_0x5d2be9=_0x510ed8['split']('\x0a');for(const _0x2dad69 of _0x5d2be9){if(_0x2dad69[_0x4f2adb(0x23d)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20')||_0x2dad69[_0x4f2adb(0x1fc)](/^\s+\d{4}-\d{2}-\d{2}/))_0x194a3d=_0x2dad69;else{if(_0x2dad69[_0x4f2adb(0x1fc)](/^[✅❌🔄🛑⏳]/)){const _0x468903=_0x2dad69['match'](/#(\d+)/),_0xce0716=_0x468903?_0x468903[0x1]:null,_0x11c84a=_0xce0716?_0x881979[_0x4f2adb(0x195)](_0xce0716)||null:null,_0x1cfbbc=_0x209ef7[_0x4f2adb(0x1dc)](_0x15626a=>_0x15626a['id']===_0xce0716),_0xbdb9d9=_0x1cfbbc?.[_0x4f2adb(0x218)]?.[_0x4f2adb(0x159)]||'';_0x5dedaa['push']({'displayLine':_0x2dad69,'attemptId':_0x11c84a,'projectName':_0xbdb9d9});}}}return{'timelineRows':_0x5dedaa,'timeAxisHeader':_0x194a3d};}}export class WorkflowAttemptsCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]='workflow:attempts';[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x116);async[a38_0x3dc27b(0x10e)](_0x4e4cb6){const _0x43b469=a38_0x3dc27b,{options:_0x5e6bec,args:_0x341ae2,tdx:_0x360938}=_0x4e4cb6,_0x22792a=this[_0x43b469(0x1be)](_0x341ae2,_0x5e6bec);if(!_0x22792a)return 0x1;const {projectName:_0x5db421,workflowName:_0x4d3844}=_0x22792a,_0x5cacaa=_0x5e6bec[_0x43b469(0xdc)];if(_0x5e6bec[_0x43b469(0x12f)]){if(_0x5db421&&_0x4d3844)console[_0x43b469(0xfa)](_0x43b469(0x17d)+_0x5db421+'.'+_0x4d3844);else _0x5db421&&console['error'](_0x43b469(0x220)+_0x5db421);_0x5cacaa&&console[_0x43b469(0xfa)](_0x43b469(0xbd));}const _0x2901c3=await withSpinner('Listing\x20workflow\x20attempts...',()=>_0x360938['workflow'][_0x43b469(0x1b7)]({'projectName':_0x5db421,'workflowName':_0x4d3844,'includeRetried':_0x5cacaa,'limit':_0x5e6bec['limit']}),{'verbose':_0x5e6bec[_0x43b469(0x12f)]}),_0x2ae089=_0x2901c3[_0x43b469(0x15a)],_0xb91121=_0x5e6bec[_0x43b469(0x121)]||0x64,_0xdc876c=_0x2ae089[_0x43b469(0x1f2)]>=_0xb91121?a38_0x4e5599[_0x43b469(0x18c)]('\x20(use\x20--limit\x20to\x20show\x20more)'):'';console['error']('✔\x20Found\x20'+_0x2ae089[_0x43b469(0x1f2)]+'\x20attempt'+(_0x2ae089[_0x43b469(0x1f2)]!==0x1?'s':'')+_0xdc876c);if(_0x5e6bec[_0x43b469(0x1b0)]==='json'||_0x5e6bec[_0x43b469(0x1b0)]==='jsonl'||_0x5e6bec['format']===_0x43b469(0xfe))await handleSDKOutput(_0x2ae089,_0x5e6bec);else{if(_0x2ae089[_0x43b469(0x1f2)]===0x0){if(_0x5db421&&_0x4d3844)console['log']('No\x20attempts\x20found\x20for:\x20'+_0x5db421+'.'+_0x4d3844);else _0x5db421?console['log']('No\x20attempts\x20found\x20in\x20project:\x20'+_0x5db421):console[_0x43b469(0x184)](_0x43b469(0xb6));}else{const _0x5d5c4b=_0x5e6bec[_0x43b469(0x1fe)],_0x3ec1e7=_0x2ae089[_0x43b469(0x142)](_0xdb7cb4=>{const _0x31fa0f=_0x43b469,_0x7b2a91=a38_0x4e5599['dim']('#'+_0xdb7cb4['id']),_0x5363ee=_0xdb7cb4[_0x31fa0f(0x218)]?.['id'],_0x171738=_0xdb7cb4[_0x31fa0f(0xe7)]||_0xdb7cb4[_0x31fa0f(0x14b)],_0x535c14=_0x5363ee&&_0x171738?hyperlink(_0x7b2a91,getWorkflowAttemptUrl(_0x5d5c4b,_0x5363ee,_0x171738,_0xdb7cb4['id'])):_0x7b2a91,{icon:_0x3052aa,text:_0x19dc60}=getAttemptStatusDisplay(_0xdb7cb4),_0x25c512=(_0xdb7cb4[_0x31fa0f(0x218)]?.[_0x31fa0f(0x159)]||'?')+'.'+(_0xdb7cb4[_0x31fa0f(0xa1)]?.['name']||'?'),_0x39b976=_0xdb7cb4[_0x31fa0f(0x1e4)]?a38_0x4e5599[_0x31fa0f(0x18c)](_0xdb7cb4[_0x31fa0f(0x1e4)]):'';return(_0x535c14+'\x20'+_0x3052aa+(_0x19dc60?'\x20'+_0x19dc60:'')+'\x20'+_0x25c512+'\x20'+_0x39b976)['trimEnd']();});await writeOutput(_0x3ec1e7['join']('\x0a'),_0x5e6bec[_0x43b469(0x1f6)],_0x43b469(0xe2));}}return 0x0;}}export class WorkflowAttemptCommand extends BaseCommand{['name']=a38_0x3dc27b(0xa5);['description']=a38_0x3dc27b(0x157);async[a38_0x3dc27b(0x10e)](_0x2ff38a){const _0x9ce56e=a38_0x3dc27b,{options:_0x5e47d6,args:_0x2566cf,tdx:_0x456a5d}=_0x2ff38a,_0x48dc4b=_0x2566cf[0x0];if(!_0x48dc4b)return console[_0x9ce56e(0xfa)]('Error:\x20Attempt\x20ID\x20is\x20required'),0x1;_0x5e47d6[_0x9ce56e(0x12f)]&&console[_0x9ce56e(0xfa)](_0x9ce56e(0x126)+_0x48dc4b);const _0x6728ca=await withSpinner(_0x9ce56e(0x132),()=>_0x456a5d[_0x9ce56e(0xa1)][_0x9ce56e(0x1fd)](_0x48dc4b),{'verbose':_0x5e47d6[_0x9ce56e(0x12f)]}),_0x526c04=_0x6728ca[_0x9ce56e(0x15a)];let _0x40a176;!_0x526c04[_0x9ce56e(0x1c9)]?_0x40a176=_0x526c04[_0x9ce56e(0x112)]?_0x9ce56e(0x186):_0x9ce56e(0xbf):_0x40a176=_0x526c04[_0x9ce56e(0xd6)]?'success':'error';let _0x1d46c3;if(_0x526c04[_0x9ce56e(0x1ee)]&&_0x526c04[_0x9ce56e(0x242)]){const _0x2ee395=new Date(_0x526c04[_0x9ce56e(0x1ee)])['getTime'](),_0x22ff13=new Date(_0x526c04[_0x9ce56e(0x242)])[_0x9ce56e(0x1eb)]();_0x1d46c3=Math['round']((_0x22ff13-_0x2ee395)/0x3e8);}const _0x4262d1={'attempt_id':_0x526c04['id'],'status':_0x40a176,..._0x526c04['index']!==undefined&&{'index':_0x526c04[_0x9ce56e(0xf2)]},..._0x526c04['project']&&{'project':_0x526c04['project'][_0x9ce56e(0x159)]},..._0x526c04[_0x9ce56e(0xa1)]&&{'workflow':_0x526c04[_0x9ce56e(0xa1)][_0x9ce56e(0x159)]},..._0x526c04[_0x9ce56e(0x14b)]&&{'session_id':_0x526c04[_0x9ce56e(0x14b)]},..._0x526c04[_0x9ce56e(0x1e4)]&&{'session_time':_0x526c04[_0x9ce56e(0x1e4)]},..._0x526c04[_0x9ce56e(0x1cc)]&&{'retry_attempt':_0x526c04[_0x9ce56e(0x1cc)]},..._0x1d46c3!==undefined&&{'duration_sec':_0x1d46c3},..._0x526c04[_0x9ce56e(0x1ee)]&&{'created_at':_0x526c04['createdAt']},..._0x526c04[_0x9ce56e(0x242)]&&{'finished_at':_0x526c04['finishedAt']},...Object[_0x9ce56e(0x1d1)](_0x526c04[_0x9ce56e(0x187)])['length']>0x0&&{'params':_0x526c04[_0x9ce56e(0x187)]}};return await handleSingleObjectOutput(_0x4262d1,_0x5e47d6),0x0;}}export class WorkflowTasksCommand extends BaseCommand{['name']=a38_0x3dc27b(0xb8);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x199);async['execute'](_0x3c1834){const _0x5e0d8b=a38_0x3dc27b,{options:_0x4c051a,args:_0x2299ce,tdx:_0x1ec1e6}=_0x3c1834,_0xb9bfd3=_0x2299ce[0x0];if(!_0xb9bfd3)return console[_0x5e0d8b(0xfa)](_0x5e0d8b(0x16f)),0x1;const _0x37f719=_0x4c051a[_0x5e0d8b(0x18a)];_0x4c051a[_0x5e0d8b(0x12f)]&&(console[_0x5e0d8b(0xfa)]('Attempt\x20ID:\x20'+_0xb9bfd3),_0x37f719&&console[_0x5e0d8b(0xfa)](_0x5e0d8b(0x154)));const _0x5921c5=await withSpinner(_0x5e0d8b(0x1ab),()=>_0x1ec1e6['workflow']['tasks'](_0xb9bfd3,_0x37f719||![]),{'verbose':_0x4c051a[_0x5e0d8b(0x12f)]}),_0x51573d=_0x5921c5['data'];return console[_0x5e0d8b(0xfa)](_0x5e0d8b(0xd5)+_0x51573d[_0x5e0d8b(0x1f2)]+_0x5e0d8b(0x14e)+(_0x51573d[_0x5e0d8b(0x1f2)]!==0x1?'s':'')),await handleSDKOutput(_0x51573d,_0x4c051a),0x0;}}export class WorkflowLogsCommand extends BaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x160);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0xf8);async['execute'](_0x46c4fe){const _0x463350=a38_0x3dc27b,{options:_0x4dd845,args:_0x5db9ca,tdx:_0x52770a}=_0x46c4fe,_0xd4c0dc=_0x5db9ca[0x0];let _0x5006b3=_0x5db9ca[0x1];if(!_0xd4c0dc)return console['error'](_0x463350(0x16f)),0x1;_0x4dd845[_0x463350(0x12f)]&&(console['error'](_0x463350(0x126)+_0xd4c0dc),_0x5006b3&&console[_0x463350(0xfa)](_0x463350(0x171)+_0x5006b3));const _0x1f1db8=await withSpinner(_0x463350(0xb1),()=>_0x52770a[_0x463350(0xa1)][_0x463350(0x1c3)](_0xd4c0dc,_0x5006b3),{'verbose':_0x4dd845[_0x463350(0x12f)]}),_0x194eaf=_0x1f1db8[_0x463350(0x15a)];if(_0x194eaf[_0x463350(0x1f2)]===0x0)return console[_0x463350(0xfa)](_0x463350(0x123)),0x0;if(!_0x5006b3&&(_0x4dd845[_0x463350(0x130)]||_0x4dd845[_0x463350(0x1b0)]))return await handleSDKOutput(_0x194eaf,_0x4dd845),0x0;if(!_0x5006b3){const _0x4360c7=_0x194eaf[_0x463350(0x142)](_0x278d29=>({'title':_0x278d29['taskName']+'\x20('+formatBytes(_0x278d29[_0x463350(0xec)])+')','value':_0x278d29[_0x463350(0x1b5)]})),_0x3cd857=await a38_0x1916d9({'type':_0x463350(0x15e),'name':_0x463350(0xda),'message':_0x463350(0xc0),'choices':_0x4360c7});if(!_0x3cd857['task'])return console[_0x463350(0xfa)](_0x463350(0x18e)),0x0;_0x5006b3=_0x3cd857[_0x463350(0xda)];}const _0x392c7b=await withSpinner(_0x463350(0x1cb),()=>_0x52770a[_0x463350(0xa1)][_0x463350(0x188)](_0xd4c0dc,_0x5006b3),{'verbose':_0x4dd845['verbose']}),_0x4bc9c3=_0x392c7b[_0x463350(0x15a)];return _0x4bc9c3?console[_0x463350(0x184)](_0x4bc9c3):console['error'](_0x463350(0x109)),0x0;}}export class WorkflowKillCommand extends BaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x131);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x1da);async['execute'](_0x127dd1){const _0x9860fa=a38_0x3dc27b,{options:_0x3f85f7,args:_0x3f70f5,tdx:_0x5b8c18}=_0x127dd1,_0x1a25e2=_0x3f70f5[0x0];if(!_0x1a25e2)return console[_0x9860fa(0xfa)](_0x9860fa(0x16f)),0x1;const _0x3d2772=_0x3f85f7[_0x9860fa(0x1bc)];_0x3f85f7[_0x9860fa(0x12f)]&&(console[_0x9860fa(0xfa)](_0x9860fa(0x126)+_0x1a25e2),_0x3d2772&&console[_0x9860fa(0xfa)]('Reason:\x20'+_0x3d2772));if(!_0x3f85f7['yes']){const _0x2ee9dd=await confirmKey(_0x9860fa(0x16b)+_0x1a25e2+'?');if(!_0x2ee9dd)return console[_0x9860fa(0xfa)](_0x9860fa(0x18e)),0x0;}const _0x275420=await withSpinner(_0x9860fa(0xd8),()=>_0x5b8c18[_0x9860fa(0xa1)][_0x9860fa(0x124)](_0x1a25e2,_0x3d2772),{'verbose':_0x3f85f7[_0x9860fa(0x12f)]}),_0x2c0194=_0x275420['data'];return console[_0x9860fa(0xfa)]('✔\x20'+_0x2c0194),0x0;}}export class WorkflowRetryCommand extends BaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0xed);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x1bd);async[a38_0x3dc27b(0x10e)](_0x19b439){const _0x1835ba=a38_0x3dc27b,{options:_0x549e23,args:_0x5f0243,tdx:_0x18fd92}=_0x19b439,_0x227803=_0x5f0243[0x0];if(!_0x227803)return console[_0x1835ba(0xfa)](_0x1835ba(0x245)),console[_0x1835ba(0xfa)](_0x1835ba(0x105)),0x1;let _0x58d47b=![],_0x3986=_0x227803;if(_0x227803['startsWith']('session:'))_0x58d47b=!![],_0x3986=_0x227803[_0x1835ba(0x204)](0x8);else{if(_0x227803['startsWith']('attempt:'))_0x58d47b=![],_0x3986=_0x227803['substring'](0x8);else return console['error'](_0x1835ba(0x206)),console[_0x1835ba(0xfa)]('Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>'),0x1;}const _0x53d0b0=_0x549e23[_0x1835ba(0xc4)],_0x2a3a70=_0x549e23[_0x1835ba(0x1bf)],_0x339529=_0x549e23['params'],_0x1634c9=_0x549e23[_0x1835ba(0xe3)];_0x549e23[_0x1835ba(0x12f)]&&(console['error'](_0x1835ba(0x155)+(_0x58d47b?_0x1835ba(0xf4):_0x1835ba(0x1fd))+'\x20'+_0x3986),_0x53d0b0&&console[_0x1835ba(0xfa)](_0x1835ba(0x174)+_0x53d0b0),_0x2a3a70&&console[_0x1835ba(0xfa)](_0x1835ba(0x191)+_0x2a3a70),_0x339529&&console[_0x1835ba(0xfa)](_0x1835ba(0x21b)+_0x339529),_0x1634c9&&console[_0x1835ba(0xfa)](_0x1835ba(0x179)));let _0x261392;if(_0x339529)try{if(_0x339529[_0x1835ba(0x23d)]('@')){const _0x2bd8ae=await import(_0x1835ba(0xa4)),_0x4fdf98=_0x339529['substring'](0x1),_0x573e33=await _0x2bd8ae[_0x1835ba(0x22a)](_0x4fdf98,_0x1835ba(0x247));_0x261392=JSON[_0x1835ba(0xe8)](_0x573e33);}else _0x261392=JSON['parse'](_0x339529);}catch{return console['error']('Error:\x20Invalid\x20JSON\x20in\x20--params'),0x1;}if(!_0x549e23[_0x1835ba(0x1db)]){const _0x2c895f=await confirmKey(_0x1835ba(0x19b)+(_0x58d47b?_0x1835ba(0xf4):'attempt')+'\x20'+_0x3986+'?');if(!_0x2c895f)return console[_0x1835ba(0xfa)](_0x1835ba(0x18e)),0x0;}let _0x556d3e;_0x58d47b?_0x556d3e=await withSpinner(_0x1835ba(0x1f4),()=>_0x18fd92[_0x1835ba(0xa1)][_0x1835ba(0x1b9)](_0x3986,{'fromTask':_0x53d0b0,'retryParams':_0x261392}),{'verbose':_0x549e23[_0x1835ba(0x12f)]}):_0x556d3e=await withSpinner(_0x1835ba(0x1f3),()=>_0x18fd92[_0x1835ba(0xa1)][_0x1835ba(0x1e8)](_0x3986,{'resumeFrom':_0x2a3a70,'retryParams':_0x261392,'force':_0x1634c9}),{'verbose':_0x549e23[_0x1835ba(0x12f)]});const _0x3808d0=_0x556d3e[_0x1835ba(0x15a)];return console[_0x1835ba(0xfa)]('✔\x20Retry\x20started'),console[_0x1835ba(0xfa)](_0x1835ba(0x1e0)+_0x3808d0['attemptId']),console[_0x1835ba(0xfa)](_0x1835ba(0x246)+_0x3808d0[_0x1835ba(0x14b)]),0x0;}}export class WorkflowRunCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0xe0);['description']='Start\x20a\x20workflow\x20run';async[a38_0x3dc27b(0x10e)](_0x1b6090){const _0x2e7384=a38_0x3dc27b,{options:_0x46081c,args:_0x1cbd08,tdx:_0x1f9ca6}=_0x1b6090;let _0x57ba11=_0x1cbd08[0x0];if(!_0x57ba11){const _0x245ac4=this[_0x2e7384(0x1fa)]([],_0x46081c),_0x3c4551=await withSpinner(_0x2e7384(0x136),()=>_0x1f9ca6[_0x2e7384(0xa1)][_0x2e7384(0x21c)](_0x245ac4,{'limit':_0x46081c['limit']}),{'verbose':_0x46081c['verbose']}),_0x13f347=_0x3c4551[_0x2e7384(0x15a)];if(_0x13f347[_0x2e7384(0x1f2)]===0x0)return console[_0x2e7384(0xfa)](_0x2e7384(0x12c)),!_0x245ac4&&console[_0x2e7384(0xfa)](a38_0x4e5599['dim']('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;const _0x35373f=_0x13f347[_0x2e7384(0x142)](_0x22a5d6=>({'title':_0x22a5d6['project']?.[_0x2e7384(0x159)]+'.'+_0x22a5d6['name'],'value':_0x22a5d6[_0x2e7384(0x218)]?.['name']+'.'+_0x22a5d6[_0x2e7384(0x159)],'description':_0x22a5d6[_0x2e7384(0xe9)]?_0x2e7384(0x1f7)+_0x22a5d6['revision']:undefined})),_0x265419=await a38_0x1916d9({'type':_0x2e7384(0x15e),'name':_0x2e7384(0xa1),'message':_0x2e7384(0x20c),'choices':_0x35373f});if(!_0x265419[_0x2e7384(0xa1)])return 0x1;_0x57ba11=_0x265419[_0x2e7384(0xa1)];}if(!_0x57ba11[_0x2e7384(0xdd)]('.')){const _0x4d551c=this['resolveProject']([],_0x46081c);if(_0x4d551c)_0x57ba11=_0x4d551c+'.'+_0x57ba11;else return console['error'](a38_0x4e5599[_0x2e7384(0x1a1)](_0x2e7384(0xbe)),_0x2e7384(0x16d)),console[_0x2e7384(0xfa)](a38_0x4e5599[_0x2e7384(0x18c)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>')),0x1;}const _0xd9f895=_0x46081c['param'],_0x121a7e=_0x46081c[_0x2e7384(0x1e4)],_0x49aca9={};if(_0xd9f895&&Array[_0x2e7384(0x11d)](_0xd9f895))for(const _0x876870 of _0xd9f895){const _0x2bf432=_0x876870[_0x2e7384(0x1c7)]('=');if(_0x2bf432===-0x1)return console[_0x2e7384(0xfa)](_0x2e7384(0x20d)+_0x876870),console[_0x2e7384(0xfa)](_0x2e7384(0x1dd)),0x1;const _0xa011d=_0x876870[_0x2e7384(0x204)](0x0,_0x2bf432),_0x135416=_0x876870[_0x2e7384(0x204)](_0x2bf432+0x1);try{_0x49aca9[_0xa011d]=JSON['parse'](_0x135416);}catch{_0x49aca9[_0xa011d]=_0x135416;}}_0x46081c[_0x2e7384(0x12f)]&&(console[_0x2e7384(0xfa)](_0x2e7384(0x1e2)+_0x57ba11),Object[_0x2e7384(0x1d1)](_0x49aca9)[_0x2e7384(0x1f2)]>0x0&&console[_0x2e7384(0xfa)]('Parameters:\x20'+JSON['stringify'](_0x49aca9)),_0x121a7e&&console[_0x2e7384(0xfa)](_0x2e7384(0x178)+_0x121a7e));const _0x2eb608=await withSpinner(_0x2e7384(0x1ce),()=>_0x1f9ca6[_0x2e7384(0xa1)]['run'](_0x57ba11,_0x49aca9,{'sessionTime':_0x121a7e}),{'verbose':_0x46081c[_0x2e7384(0x12f)]}),_0x4f22b8=_0x2eb608[_0x2e7384(0x15a)];console[_0x2e7384(0xfa)](_0x2e7384(0xc1)),console['error'](_0x2e7384(0x1f1)+_0x4f22b8['id']),console[_0x2e7384(0xfa)](_0x2e7384(0x246)+_0x4f22b8[_0x2e7384(0x14b)]),console['error'](_0x2e7384(0x237)+_0x4f22b8['project']?.['name']),console['error']('\x20\x20Workflow:\x20'+_0x4f22b8[_0x2e7384(0xa1)]?.[_0x2e7384(0x159)]);if(_0x4f22b8[_0x2e7384(0x218)]?.['id']&&_0x4f22b8[_0x2e7384(0x14b)]&&_0x4f22b8['id']){const _0x2b8d9e=_0x46081c[_0x2e7384(0x1fe)],_0x3d1186=getConsoleUrl(_0x2b8d9e,_0x2e7384(0x114)+_0x4f22b8['project']['id']+_0x2e7384(0x14c)+_0x4f22b8['sessionId']+_0x2e7384(0x23c)+_0x4f22b8['id']);console[_0x2e7384(0xfa)](_0x2e7384(0x1f0)+a38_0x4e5599[_0x2e7384(0x12d)](_0x3d1186));}return 0x0;}}export class WorkflowDownloadCommand extends BaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x1cd);[a38_0x3dc27b(0x144)]='Download\x20workflow\x20project\x20from\x20Treasure\x20Data';async[a38_0x3dc27b(0x10e)](_0x50cb81){const _0x53506a=a38_0x3dc27b,{options:_0x52f20e,args:_0x4ff590,tdx:_0x21597f}=_0x50cb81,_0x1ca063=_0x4ff590[0x0],_0x4384b6=_0x4ff590[0x1]||'.';if(!_0x1ca063)return console['error'](_0x53506a(0x1ed)),console[_0x53506a(0xfa)](_0x53506a(0x1ae)),0x1;const _0x1217d3=_0x52f20e[_0x53506a(0xe9)];_0x52f20e['verbose']&&(console['error'](_0x53506a(0x185)+_0x1ca063),console[_0x53506a(0xfa)](_0x53506a(0x192)+_0x4384b6),_0x1217d3&&console['error']('Revision:\x20'+_0x1217d3));const _0x5b5a72=await withSpinner(_0x53506a(0xbc)+_0x1ca063+_0x53506a(0xae),()=>_0x21597f[_0x53506a(0xa1)][_0x53506a(0x1c0)](_0x1ca063,_0x4384b6,{'revision':_0x1217d3}),{'verbose':_0x52f20e[_0x53506a(0x12f)]}),_0x72399f=_0x5b5a72[_0x53506a(0x15a)];return console[_0x53506a(0xfa)](_0x53506a(0x108)+_0x72399f[_0x53506a(0x172)]),console['error'](_0x53506a(0x11c)+_0x72399f[_0x53506a(0xe9)]),console[_0x53506a(0xfa)](_0x53506a(0x1b4)+_0x72399f[_0x53506a(0x12a)]),console[_0x53506a(0xfa)](_0x53506a(0xa2)+_0x4384b6+'/'+_0x72399f[_0x53506a(0x172)]),0x0;}}export class WorkflowUploadCommand extends WorkflowBaseCommand{['name']=a38_0x3dc27b(0x146);['description']=a38_0x3dc27b(0x1af);async['execute'](_0x1a92aa){const _0x23d6c3=a38_0x3dc27b,{options:_0x1a6d0c,args:_0x418a2e,tdx:_0x32072f}=_0x1a92aa;let _0x2478ba='.',_0x52b1d4=_0x1a6d0c[_0x23d6c3(0x159)];if(_0x418a2e[0x0]){const {promises:_0x3341cb}=await import('fs');try{const _0x171d78=await _0x3341cb[_0x23d6c3(0x216)](_0x418a2e[0x0]);if(_0x171d78[_0x23d6c3(0x128)]())_0x2478ba=_0x418a2e[0x0];else return console[_0x23d6c3(0xfa)](_0x23d6c3(0x1b3)+_0x418a2e[0x0]+_0x23d6c3(0xaf)),0x1;}catch{_0x52b1d4=_0x418a2e[0x0],_0x2478ba='.';}}const _0x36ff15=_0x1a6d0c[_0x23d6c3(0xe9)],_0x349fdd=_0x1a6d0c[_0x23d6c3(0xc9)];_0x1a6d0c['verbose']&&(console[_0x23d6c3(0xfa)](_0x23d6c3(0x1a0)+_0x2478ba),_0x52b1d4&&console[_0x23d6c3(0xfa)]('Project\x20name:\x20'+_0x52b1d4),_0x36ff15&&console['error'](_0x23d6c3(0xcc)+_0x36ff15),_0x349fdd&&console['error'](_0x23d6c3(0xab)));const _0x473472=await withSpinner('Pushing\x20workflow\x20project...',()=>_0x32072f['workflow'][_0x23d6c3(0x133)](_0x2478ba,{'projectName':_0x52b1d4,'revision':_0x36ff15,'skipValidation':_0x349fdd}),{'verbose':_0x1a6d0c[_0x23d6c3(0x12f)]}),_0xa34b67=_0x473472['data'];return console[_0x23d6c3(0xfa)](_0x23d6c3(0x1e7)+_0xa34b67[_0x23d6c3(0x172)]),console[_0x23d6c3(0xfa)]('\x20\x20Project\x20ID:\x20'+_0xa34b67[_0x23d6c3(0x15f)]),console[_0x23d6c3(0xfa)](_0x23d6c3(0x11c)+_0xa34b67[_0x23d6c3(0xe9)]),await this[_0x23d6c3(0x107)](_0x32072f,_0xa34b67['projectName'],_0x1a6d0c[_0x23d6c3(0x1fe)]),0x0;}}export class WorkflowPullCommand extends BaseCommand{[a38_0x3dc27b(0x159)]='workflow:pull';[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0xde);async[a38_0x3dc27b(0x10e)](_0x292c77){const _0x44311b=a38_0x3dc27b,{options:_0xaff301,args:_0x45ed66,tdx:_0x2458b4}=_0x292c77,_0x752e1a=_0x45ed66[0x0],_0xcd8ce9=_0x45ed66[0x1];if(!_0x752e1a)return console[_0x44311b(0xfa)](a38_0x4e5599['red'](_0x44311b(0xbe)),_0x44311b(0xdf)),console['error'](a38_0x4e5599[_0x44311b(0x18c)](_0x44311b(0x1f5))),0x1;const _0x5aea9e=_0xaff301[_0x44311b(0xe9)];_0xaff301['verbose']&&(console['error'](_0x44311b(0x185)+_0x752e1a),_0xcd8ce9&&console[_0x44311b(0xfa)](_0x44311b(0x15c)+_0xcd8ce9),_0x5aea9e&&console[_0x44311b(0xfa)](_0x44311b(0xcc)+_0x5aea9e),_0xaff301['dryRun']&&console['error'](_0x44311b(0x248)));const _0x1b3921=await withSpinner(_0x44311b(0x1b6)+_0x752e1a+_0x44311b(0xae),()=>_0x2458b4[_0x44311b(0xa1)][_0x44311b(0x190)](_0x752e1a,{'targetDir':_0xcd8ce9,'revision':_0x5aea9e}),{'verbose':_0xaff301['verbose']}),_0x84afa3=_0x1b3921['data'];_0x84afa3[_0x44311b(0x196)]?console['error']('✔\x20New\x20project:\x20'+_0x84afa3[_0x44311b(0x172)]):console[_0x44311b(0xfa)](_0x44311b(0x162)+_0x84afa3[_0x44311b(0x172)]);console['error'](_0x44311b(0x11c)+_0x84afa3[_0x44311b(0xe9)]),console['error']('\x20\x20Target:\x20'+(a38_0x514e72[_0x44311b(0x1b8)](process[_0x44311b(0x17b)](),_0x84afa3['targetDir'])||'.')),console['error']('\x20\x20Changes:\x20'+a38_0x4e5599[_0x44311b(0x11a)]('+'+_0x84afa3[_0x44311b(0xbb)]['new']+'\x20new')+',\x20'+(a38_0x4e5599[_0x44311b(0x1d6)]('~'+_0x84afa3[_0x44311b(0xbb)][_0x44311b(0x19e)]+_0x44311b(0x120))+',\x20')+(a38_0x4e5599['red']('-'+_0x84afa3[_0x44311b(0xbb)][_0x44311b(0xc2)]+_0x44311b(0x111))+',\x20')+(''+a38_0x4e5599['dim'](_0x84afa3['summary']['unchanged']+_0x44311b(0x209))));for(const _0x4663a0 of _0x84afa3[_0x44311b(0xe5)]){_0x4663a0[_0x44311b(0xa9)]===_0x44311b(0x19e)&&_0x4663a0[_0x44311b(0x22e)]&&(console[_0x44311b(0xfa)]('\x0a'+a38_0x4e5599[_0x44311b(0x12d)]('---\x20'+_0x4663a0[_0x44311b(0xb5)])),console[_0x44311b(0xfa)](_0x4663a0[_0x44311b(0x22e)]));}if(!_0x84afa3[_0x44311b(0x15b)])return saveSessionContext({'workflow_project':_0x84afa3[_0x44311b(0x172)]},_0xaff301['session']),console[_0x44311b(0xfa)](a38_0x4e5599['green'](_0x44311b(0x11f))),console[_0x44311b(0xfa)](a38_0x4e5599[_0x44311b(0x18c)](_0x44311b(0x227)+_0x84afa3[_0x44311b(0x172)])),0x0;if(_0xaff301[_0x44311b(0x17a)])return console[_0x44311b(0xfa)](a38_0x4e5599[_0x44311b(0x1d6)]('\x0aDry\x20run\x20-\x20no\x20files\x20written')),0x0;if(!_0xaff301[_0x44311b(0x1db)]){const _0x3ffa74=await confirmKey(_0x44311b(0x238));if(!_0x3ffa74)return console['error'](_0x44311b(0x18e)),0x0;}await withSpinner('Writing\x20files...',()=>_0x2458b4[_0x44311b(0xa1)][_0x44311b(0x19d)](_0x84afa3,{'revision':_0x5aea9e}),{'verbose':_0xaff301['verbose']}),saveSessionContext({'workflow_project':_0x84afa3[_0x44311b(0x172)]},_0xaff301[_0x44311b(0xf4)]),console[_0x44311b(0xfa)](a38_0x4e5599[_0x44311b(0x11a)](_0x44311b(0x240)));const _0x290b46=a38_0x514e72[_0x44311b(0x1b8)](process[_0x44311b(0x17b)](),_0x84afa3['targetDir'])||'.';return console[_0x44311b(0xfa)](a38_0x4e5599[_0x44311b(0x18c)](_0x44311b(0xa2)+_0x290b46)),console['error'](a38_0x4e5599['dim']('\x20\x20Session\x20context\x20set\x20to:\x20'+_0x84afa3[_0x44311b(0x172)])),0x0;}}export class WorkflowPushCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]='workflow:push';['description']=a38_0x3dc27b(0x176);async[a38_0x3dc27b(0x10e)](_0x50c2b5){const _0x52f621=a38_0x3dc27b,{options:_0x21776b,args:_0x40b118,tdx:_0x560b70}=_0x50c2b5,_0x38f121=this[_0x52f621(0x202)](_0x40b118,_0x21776b),_0x3c3e85=_0x21776b[_0x52f621(0xe9)],_0x14342d=_0x21776b[_0x52f621(0xc9)];_0x21776b[_0x52f621(0x12f)]&&(_0x38f121&&console['error']('Source\x20directory:\x20'+_0x38f121),_0x3c3e85&&console[_0x52f621(0xfa)](_0x52f621(0xcc)+_0x3c3e85),_0x21776b[_0x52f621(0x17a)]&&console[_0x52f621(0xfa)]('Dry\x20run:\x20yes'),_0x14342d&&console['error'](_0x52f621(0xab)));let _0x49c547;try{_0x49c547=await withSpinner(_0x52f621(0x212),()=>_0x560b70[_0x52f621(0xa1)]['preparePushProject']({'sourceDir':_0x38f121,'revision':_0x3c3e85,'skipValidation':_0x14342d}),{'verbose':_0x21776b[_0x52f621(0x12f)]});}catch(_0x5c4d90){if(_0x5c4d90 instanceof Error&&_0x5c4d90[_0x52f621(0x1fb)][_0x52f621(0xdd)](_0x52f621(0x231)))return console[_0x52f621(0xfa)](a38_0x4e5599[_0x52f621(0x1a1)]('Error:'),_0x52f621(0xd7)),_0x21776b[_0x52f621(0x22b)]?console[_0x52f621(0xfa)](a38_0x4e5599[_0x52f621(0x18c)](_0x52f621(0x1c6)+_0x21776b[_0x52f621(0x22b)]+_0x52f621(0x222)+_0x21776b[_0x52f621(0x22b)]+'\x27')):console[_0x52f621(0xfa)](a38_0x4e5599['dim'](_0x52f621(0xff))),0x1;throw _0x5c4d90;}const _0x1cf401=_0x49c547['data'];console['error'](_0x52f621(0x162)+_0x1cf401['projectName']),console[_0x52f621(0xfa)](_0x52f621(0x1d8)+_0x1cf401[_0x52f621(0x1a8)]),console[_0x52f621(0xfa)](_0x52f621(0x11c)+_0x1cf401[_0x52f621(0xe9)]),console[_0x52f621(0xfa)](_0x52f621(0x1b1)+a38_0x4e5599[_0x52f621(0x11a)]('+'+_0x1cf401[_0x52f621(0xbb)][_0x52f621(0xad)]+_0x52f621(0x177))+',\x20'+(a38_0x4e5599['yellow']('~'+_0x1cf401['summary'][_0x52f621(0x19e)]+_0x52f621(0x120))+',\x20')+(a38_0x4e5599[_0x52f621(0x1a1)]('-'+_0x1cf401[_0x52f621(0xbb)][_0x52f621(0xc2)]+_0x52f621(0x111))+',\x20')+(''+a38_0x4e5599[_0x52f621(0x18c)](_0x1cf401[_0x52f621(0xbb)][_0x52f621(0x208)]+_0x52f621(0x209))));for(const _0x4cdd8e of _0x1cf401['changes']){_0x4cdd8e[_0x52f621(0xa9)]===_0x52f621(0x19e)&&_0x4cdd8e[_0x52f621(0x22e)]&&(console['error']('\x0a'+a38_0x4e5599[_0x52f621(0x12d)](_0x52f621(0x203)+_0x4cdd8e[_0x52f621(0xb5)])),console['error'](_0x4cdd8e[_0x52f621(0x22e)]));}if(!_0x1cf401['hasChanges'])return console[_0x52f621(0xfa)](a38_0x4e5599[_0x52f621(0x11a)]('\x0a✔\x20No\x20changes\x20to\x20push')),await this[_0x52f621(0x107)](_0x560b70,_0x1cf401[_0x52f621(0x172)],_0x21776b['site']),0x0;if(_0x21776b[_0x52f621(0x17a)])return console[_0x52f621(0xfa)](a38_0x4e5599[_0x52f621(0x1d6)](_0x52f621(0x163))),0x0;if(!_0x21776b[_0x52f621(0x1db)]){const _0x24480f=await confirmKey('\x0aPush\x20these\x20changes?');if(!_0x24480f)return console[_0x52f621(0xfa)](_0x52f621(0x18e)),0x0;}const _0x31ca98=await withSpinner('Pushing\x20project...',()=>_0x560b70[_0x52f621(0xa1)][_0x52f621(0xd2)](_0x1cf401),{'verbose':_0x21776b['verbose']}),_0x25835a=_0x31ca98[_0x52f621(0x15a)];return console[_0x52f621(0xfa)](a38_0x4e5599['green']('✔\x20Push\x20complete')),console['error'](_0x52f621(0x110)+_0x25835a['projectId']),console[_0x52f621(0xfa)](_0x52f621(0x11c)+_0x25835a[_0x52f621(0xe9)]),await this[_0x52f621(0x107)](_0x560b70,_0x25835a[_0x52f621(0x172)],_0x21776b[_0x52f621(0x1fe)]),0x0;}}export class WorkflowCloneCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x229);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0xf9);async[a38_0x3dc27b(0x10e)](_0x556f8e){const _0x4b3b30=a38_0x3dc27b,{options:_0x38f4cb,args:_0x16a81b,tdx:_0xc74420}=_0x556f8e,_0x59387b=this['resolveProjectDir'](_0x16a81b,_0x38f4cb),_0x333582=_0x38f4cb[_0x4b3b30(0x159)],_0x5d6005=_0x38f4cb[_0x4b3b30(0xe9)],_0x56be68=_0x38f4cb[_0x4b3b30(0xc9)];if(!_0x59387b)return console[_0x4b3b30(0xfa)](a38_0x4e5599[_0x4b3b30(0x1a1)](_0x4b3b30(0xbe)),_0x4b3b30(0x1c5)),console[_0x4b3b30(0xfa)](a38_0x4e5599[_0x4b3b30(0x18c)](_0x4b3b30(0x21e))),console['error'](a38_0x4e5599[_0x4b3b30(0x18c)](_0x4b3b30(0x169))),0x1;if(!_0x333582)return console['error'](a38_0x4e5599[_0x4b3b30(0x1a1)](_0x4b3b30(0xbe)),_0x4b3b30(0x200)),console['error'](a38_0x4e5599[_0x4b3b30(0x18c)]('Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>')),0x1;_0x38f4cb[_0x4b3b30(0x12f)]&&(console[_0x4b3b30(0xfa)]('Source\x20directory:\x20'+_0x59387b),console['error'](_0x4b3b30(0xe1)+_0x333582),_0x5d6005&&console[_0x4b3b30(0xfa)]('Revision:\x20'+_0x5d6005),_0x38f4cb['dryRun']&&console[_0x4b3b30(0xfa)](_0x4b3b30(0x248)),_0x56be68&&console['error'](_0x4b3b30(0xab)));const _0x4b8390=await withSpinner('Analyzing\x20project...',()=>_0xc74420[_0x4b3b30(0xa1)]['prepareCloneProject'](_0x59387b,_0x333582,{'revision':_0x5d6005,'skipValidation':_0x56be68}),{'verbose':_0x38f4cb[_0x4b3b30(0x12f)]}),_0x5121b6=_0x4b8390[_0x4b3b30(0x15a)];console[_0x4b3b30(0xfa)](_0x4b3b30(0xf0)+_0x5121b6[_0x4b3b30(0x1a8)]);_0x5121b6['sourceProjectName']&&console[_0x4b3b30(0xfa)](_0x4b3b30(0x181)+_0x5121b6[_0x4b3b30(0x17c)]);console[_0x4b3b30(0xfa)](_0x4b3b30(0xe1)+_0x5121b6['newProjectName']),console['error'](_0x4b3b30(0xcc)+_0x5121b6[_0x4b3b30(0xe9)]),console[_0x4b3b30(0xfa)]('Files\x20to\x20upload:\x20'+_0x5121b6[_0x4b3b30(0xba)]);_0x5121b6[_0x4b3b30(0xcf)]&&(console['error'](a38_0x4e5599[_0x4b3b30(0x1d6)]('\x0a⚠\x20Project\x20\x22'+_0x5121b6[_0x4b3b30(0x226)]+_0x4b3b30(0x137)+_0x5121b6[_0x4b3b30(0x1a4)]+')')),console['error'](a38_0x4e5599[_0x4b3b30(0x1d6)](_0x4b3b30(0x151))));if(_0x38f4cb[_0x4b3b30(0x17a)])return console[_0x4b3b30(0xfa)](a38_0x4e5599[_0x4b3b30(0x1d6)](_0x4b3b30(0x234))),0x0;if(!_0x38f4cb['yes']){const _0x124dc3=_0x5121b6[_0x4b3b30(0x17c)]||a38_0x514e72[_0x4b3b30(0x20a)](_0x59387b),_0x539efb=_0x5121b6['targetExists']?_0x4b3b30(0xf7)+_0x333582+'\x22\x20with\x20new\x20revision?':_0x4b3b30(0x197)+_0x124dc3+_0x4b3b30(0x1bb)+_0x333582+'\x22?',_0x29324e=await confirmKey(_0x539efb);if(!_0x29324e)return console[_0x4b3b30(0xfa)](_0x4b3b30(0x18e)),0x0;}const _0x57143b=await withSpinner(_0x5121b6['targetExists']?_0x4b3b30(0xa7)+_0x333582+'...':'Cloning\x20to\x20'+_0x333582+_0x4b3b30(0xae),()=>_0xc74420[_0x4b3b30(0xa1)]['executeCloneProject'](_0x5121b6),{'verbose':_0x38f4cb[_0x4b3b30(0x12f)]}),_0x3b333b=_0x57143b[_0x4b3b30(0x15a)];return console[_0x4b3b30(0xfa)](a38_0x4e5599[_0x4b3b30(0x11a)](_0x5121b6['targetExists']?_0x4b3b30(0x1a7):'✔\x20Clone\x20complete')),console['error'](_0x4b3b30(0x237)+_0x3b333b[_0x4b3b30(0x226)]),console[_0x4b3b30(0xfa)](_0x4b3b30(0x110)+_0x3b333b[_0x4b3b30(0x147)]),console[_0x4b3b30(0xfa)](_0x4b3b30(0x11c)+_0x3b333b[_0x4b3b30(0xe9)]),await this[_0x4b3b30(0x107)](_0xc74420,_0x3b333b['newProjectName'],_0x38f4cb[_0x4b3b30(0x1fe)]),0x0;}}export class WorkflowDeleteCommand extends BaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x119);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x14d);async['execute'](_0x2844ff){const _0x2c78b9=a38_0x3dc27b,{options:_0x3b416f,args:_0x26c949,tdx:_0x4a7c47}=_0x2844ff,_0x40aa4d=_0x26c949[0x0];if(!_0x40aa4d)return console[_0x2c78b9(0xfa)](_0x2c78b9(0x1f9)),console[_0x2c78b9(0xfa)](_0x2c78b9(0x135)),0x1;_0x3b416f[_0x2c78b9(0x12f)]&&console['error'](_0x2c78b9(0x185)+_0x40aa4d);if(!_0x3b416f['yes']){const _0x4fde9c=await confirmKey(_0x2c78b9(0x214)+_0x40aa4d+_0x2c78b9(0x117));if(!_0x4fde9c)return console[_0x2c78b9(0xfa)](_0x2c78b9(0x18e)),0x0;}const _0x1d4412=await withSpinner(_0x2c78b9(0x207)+_0x40aa4d+_0x2c78b9(0xae),()=>_0x4a7c47[_0x2c78b9(0xa1)][_0x2c78b9(0xf5)](_0x40aa4d),{'verbose':_0x3b416f[_0x2c78b9(0x12f)]}),_0x46793c=_0x1d4412[_0x2c78b9(0x15a)];return console[_0x2c78b9(0xfa)](_0x2c78b9(0x249)+_0x46793c['projectName']),console[_0x2c78b9(0xfa)](_0x2c78b9(0x110)+_0x46793c[_0x2c78b9(0x15f)]),0x0;}}export function parseKeyValue(_0x41208e){const _0x4517ac=a38_0x3dc27b,_0x18a200=_0x41208e[_0x4517ac(0x1c7)]('=');if(_0x18a200===-0x1)throw new Error(_0x4517ac(0x1f8)+_0x41208e+_0x4517ac(0xa8));const _0x4bc6e8=_0x41208e[_0x4517ac(0x204)](0x0,_0x18a200),_0x2957ff=_0x41208e[_0x4517ac(0x204)](_0x18a200+0x1);if(!_0x4bc6e8)throw new Error('Key\x20cannot\x20be\x20empty');return{'key':_0x4bc6e8,'value':_0x2957ff};}export class WorkflowSecretsListCommand extends WorkflowBaseCommand{['name']=a38_0x3dc27b(0x16a);[a38_0x3dc27b(0x144)]='List\x20secret\x20keys\x20for\x20a\x20workflow\x20project';async[a38_0x3dc27b(0x10e)](_0x371701){const _0x16e6d3=a38_0x3dc27b,{options:_0x311326,args:_0x17c239,tdx:_0x5cc174}=_0x371701,_0x5ec8b8=this[_0x16e6d3(0x12e)](_0x17c239,_0x311326);if(!_0x5ec8b8)return 0x1;_0x311326[_0x16e6d3(0x12f)]&&console[_0x16e6d3(0xfa)]('Project:\x20'+_0x5ec8b8);const _0x574a59=await withSpinner(_0x16e6d3(0x149),()=>_0x5cc174['workflow']['listSecrets'](_0x5ec8b8),{'verbose':_0x311326[_0x16e6d3(0x12f)]}),{secrets:_0x2e630f}=_0x574a59[_0x16e6d3(0x15a)];return console[_0x16e6d3(0xfa)](_0x16e6d3(0xd5)+_0x2e630f[_0x16e6d3(0x1f2)]+_0x16e6d3(0x175)+(_0x2e630f[_0x16e6d3(0x1f2)]!==0x1?'s':'')),await handleSDKOutput(_0x2e630f,_0x311326),0x0;}}export class WorkflowSecretsSetCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x1b2);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0xd4);async['execute'](_0x479857){const _0x363208=a38_0x3dc27b,{options:_0x3d083e,args:_0xcc966e,tdx:_0x44bba0}=_0x479857;let _0xb399ca,_0x1b9039;if(_0xcc966e['length']>=0x2)_0xb399ca=_0xcc966e[0x0],_0x1b9039=_0xcc966e[0x1];else{if(_0xcc966e[_0x363208(0x1f2)]===0x1&&_0x3d083e[_0x363208(0x22b)])_0xb399ca=_0x3d083e[_0x363208(0x22b)],_0x1b9039=_0xcc966e[0x0];else return _0xcc966e['length']===0x1?(console[_0x363208(0xfa)](_0x363208(0x1ed)),console[_0x363208(0xfa)](_0x363208(0x18d)),0x1):(console[_0x363208(0xfa)](_0x363208(0x1ea)),console[_0x363208(0xfa)](_0x363208(0xd1)),0x1);}let _0x8d4a07,_0x2583fe;try{({key:_0x8d4a07,value:_0x2583fe}=parseKeyValue(_0x1b9039));}catch(_0x2a5a71){return _0x2a5a71 instanceof Error&&console['error'](a38_0x4e5599['red']('Error:'),_0x2a5a71['message']),0x1;}_0x3d083e['verbose']&&(console['error'](_0x363208(0x185)+_0xb399ca),console['error']('Key:\x20'+_0x8d4a07));const _0xa403bc=await withSpinner(_0x363208(0xb0),()=>_0x44bba0[_0x363208(0xa1)][_0x363208(0x122)](_0xb399ca,_0x8d4a07,_0x2583fe),{'verbose':_0x3d083e[_0x363208(0x12f)]}),_0x3f07ff=_0xa403bc[_0x363208(0x15a)];return console[_0x363208(0xfa)]('✔\x20Secret\x20\x27'+_0x3f07ff[_0x363208(0x21f)]+_0x363208(0xac)+_0x3f07ff[_0x363208(0x172)]+'\x27'),(_0x3d083e[_0x363208(0x130)]||_0x3d083e[_0x363208(0x241)])&&await handleSingleObjectOutput(_0x3f07ff,_0x3d083e),0x0;}}export class WorkflowSecretsDeleteCommand extends WorkflowBaseCommand{['name']=a38_0x3dc27b(0x1ef);[a38_0x3dc27b(0x144)]=a38_0x3dc27b(0x9f);async[a38_0x3dc27b(0x10e)](_0xb569e1){const _0x1fd8b2=a38_0x3dc27b,{options:_0x2f72c1,args:_0x224063,tdx:_0x3196f9}=_0xb569e1;let _0x2e069d,_0x12ffbc;if(_0x224063[_0x1fd8b2(0x1f2)]>=0x2)_0x2e069d=_0x224063[0x0],_0x12ffbc=_0x224063[0x1];else{if(_0x224063[_0x1fd8b2(0x1f2)]===0x1&&_0x2f72c1['workflowProject'])_0x2e069d=_0x2f72c1[_0x1fd8b2(0x22b)],_0x12ffbc=_0x224063[0x0];else return _0x224063[_0x1fd8b2(0x1f2)]===0x1?(console[_0x1fd8b2(0xfa)]('Error:\x20Project\x20name\x20is\x20required'),console[_0x1fd8b2(0xfa)]('Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>'),0x1):(console['error'](_0x1fd8b2(0xeb)),console['error']('Usage:\x20wf\x20secrets\x20delete\x20[project]\x20<key>'),0x1);}_0x2f72c1[_0x1fd8b2(0x12f)]&&(console[_0x1fd8b2(0xfa)]('Project:\x20'+_0x2e069d),console['error'](_0x1fd8b2(0x165)+_0x12ffbc));if(!_0x2f72c1[_0x1fd8b2(0x1db)]){const _0xda20ca=await confirmKey(_0x1fd8b2(0x12b)+_0x12ffbc+_0x1fd8b2(0x1a3)+_0x2e069d+'\x27?');if(!_0xda20ca)return console[_0x1fd8b2(0xfa)](_0x1fd8b2(0x18e)),0x0;}const _0x18e100=await withSpinner(_0x1fd8b2(0xe6),()=>_0x3196f9[_0x1fd8b2(0xa1)][_0x1fd8b2(0x17e)](_0x2e069d,_0x12ffbc),{'verbose':_0x2f72c1['verbose']}),_0x39808d=_0x18e100[_0x1fd8b2(0x15a)];return console['error'](_0x1fd8b2(0xc8)+_0x39808d[_0x1fd8b2(0x21f)]+_0x1fd8b2(0x20b)+_0x39808d[_0x1fd8b2(0x172)]+'\x27'),(_0x2f72c1[_0x1fd8b2(0x130)]||_0x2f72c1[_0x1fd8b2(0x241)])&&await handleSingleObjectOutput(_0x39808d,_0x2f72c1),0x0;}}const TIMELINE_CONFIG={'TASK_NAME_WIDTH':0x28,'ICON_WIDTH':0x2,'ICON_SPACING':0x1,'GUTTER':0x5,'MIN_TIMELINE_WIDTH':0x28,'MAX_TIMELINE_WIDTH':0x50,'LABEL_MIN_SPACING':0x2,'POLL_INTERVAL_MS':0x7d0,'MAX_POLL_TIME_MS':0x36ee80,'MAX_POLL_ITERATIONS':0x708,'MAX_TASKS_DISPLAY':0x64,'MIN_LABEL_COUNT':0x3,'MAX_LABEL_COUNT':0x6,'LABEL_WIDTH_DIVISOR':0xf};function a38_0x3456(){const _0x2ae05a=['New\x20project\x20name:\x20','list','force','displayLine','changes','Deleting\x20secret...','session_id','parse','revision','✔\x20Workflow\x20project\x20set\x20to:\x20','Error:\x20Secret\x20key\x20is\x20required','fileSize','workflow:retry','startTime','✔\x20Workflow\x20project\x20context\x20cleared.','Source:\x20','Warning:','index','pollTimeline','session','delete','\x27...','\x0aUpdate\x20existing\x20project\x20\x22','Show\x20logs\x20for\x20a\x20workflow\x20attempt','Clone\x20a\x20workflow\x20project\x20to\x20a\x20new\x20project\x20name','error','\x20sessions\x20','LABEL_MIN_SPACING','set','table','Run\x20\x27tdx\x20wf\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure.',',\x20Workflow:\x20','Select\x20a\x20session\x20to\x20view\x20task\x20timeline\x20(Esc\x20to\x20exit,\x20type\x20to\x20filter)','state','some','Latest\x20session\x20has\x20no\x20attempt','Usage:\x20workflow\x20retry\x20session:<id>\x20or\x20workflow\x20retry\x20attempt:<id>','sys','showWorkflowConsoleUrl','✔\x20Downloaded\x20','No\x20log\x20content\x20found','duration','TASK_NAME_WIDTH','\x20of\x20','POLL_INTERVAL_MS','execute','context','\x20\x20Project\x20ID:\x20','\x20deleted','cancelRequested','List\x20all\x20workflow\x20projects','/app/workflows/','stdout','List\x20workflow\x20attempts','\x22?\x20This\x20cannot\x20be\x20undone.','342NxhSHg','workflow:delete','green','renderSingleTimeline','\x20\x20Revision:\x20','isArray','replace','\x0a✔\x20Already\x20up\x20to\x20date','\x20modified','limit','setSecret','No\x20log\x20files\x20found\x20for\x20this\x20attempt','kill','Project\x20not\x20set.\x20Use\x20format:\x20project.workflow\x20or\x20set\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Attempt\x20ID:\x20','\x0a✔\x20Attempt\x20complete','isDirectory','No\x20sessions\x20found\x20for:\x20','filesExtracted','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20secret\x20\x27','No\x20workflows\x20found','cyan','requireProject','verbose','json','workflow:kill','Getting\x20attempt\x20details...','push','renderTimeline','Usage:\x20workflow:delete\x20<project-name-or-id>','Loading\x20workflows...','\x22\x20already\x20exists\x20(ID:\x20','No\x20workflows\x20found\x20in\x20project:\x20','has','fill','No\x20sessions\x20found','pending','MAX_LABEL_COUNT','startedAt','getFullYear','padStart','\x20-\x20','map','489sFICIl','description','✔\x20Showing\x20','workflow:upload','newProjectId','toISOString','Listing\x20secrets...','getHours','sessionId','/sessions/','Delete\x20workflow\x20project\x20from\x20Treasure\x20Data','\x20task','tdx\x20wf\x20attempt\x20','columns','\x20\x20This\x20will\x20create\x20a\x20new\x20revision\x20of\x20the\x20existing\x20project.','min','\x0aFailed\x20to\x20fetch\x20attempt\x20data','Including\x20subtasks:\x20yes','Target:\x20','📋\x20','Show\x20specific\x20attempt\x20details','Resolving\x20project\x20\x27','name','data','hasChanges','Target\x20directory:\x20','No\x20projects\x20match\x20pattern:\x20','select','projectId','workflow:logs','group_error','✔\x20Project:\x20','\x0aDry\x20run\x20-\x20nothing\x20pushed','No\x20matching\x20sessions\x20found','Key:\x20','start','status','write','\x20\x20\x20\x20\x20\x20\x20tdx\x20wf\x20clone\x20--name\x20<new-project-name>\x20\x20#\x20Use\x20session\x20context','workflow:secrets:list','Are\x20you\x20sure\x20you\x20want\x20to\x20kill\x20attempt\x20','text','Workflow\x20must\x20be\x20specified\x20as\x20\x22project.workflow\x22\x20format','getDate','Error:\x20Attempt\x20ID\x20is\x20required','end','Task\x20name:\x20','projectName','localeCompare','From\x20task:\x20','\x20secret','Push\x20local\x20workflow\x20changes\x20to\x20Treasure\x20Data','\x20new','Session\x20time:\x20','Force:\x20yes','dryRun','cwd','sourceProjectName','Filter:\x20','deleteSecret','Failed\x20to\x20fetch\x20attempt\x20data','MAX_TASKS_DISPLAY','Source\x20project:\x20','No\x20sessions\x20found\x20in\x20project:\x20','\x20has\x20no\x20attempts','log','Project:\x20','canceling','params','logs','lastAttempt','includeSubtasks','isTTY','dim','Tip:\x20Set\x20a\x20default\x20project\x20with:\x20tdx\x20wf\x20use\x20<project>','Cancelled','🔄\x20','pullProject','Resume\x20from:\x20','Output\x20directory:\x20','8100meDUPJ','resolve','get','isNewProject','\x0aClone\x20\x22','7358LStyUi','Show\x20tasks\x20for\x20an\x20attempt','workflow:workflows','Are\x20you\x20sure\x20you\x20want\x20to\x20retry\x20','💡\x20Tip:\x20Narrow\x20down\x20results\x20by\x20specifying\x20a\x20project:','applyPullProject','modified','(unknown)','Project\x20directory:\x20','red','5231765rvmHgH','\x27\x20from\x20project\x20\x27','existingProjectId','403230VEUlAX','icon','✔\x20Project\x20updated','sourceDir','title','durationMs','Getting\x20attempt\x20tasks...','repeat','Listing\x20workflows...','Usage:\x20workflow:download\x20<project-name>\x20[output-dir]','Upload\x20workflow\x20project\x20to\x20Treasure\x20Data\x20(digdag-style)','format','\x20\x20Changes:\x20','workflow:secrets:set','Error:\x20','\x20\x20Files\x20extracted:\x20','taskName','Pulling\x20project\x20','attempts','relative','retrySession','navigateSessionsInteractive','\x22\x20to\x20new\x20project\x20\x22','reason','Retry\x20a\x20session\x20or\x20attempt','parseProjectWorkflowPattern','resumeFrom','download','floor','MAX_TIMELINE_WIDTH','logFiles','filter','Source\x20directory\x20is\x20required','Tip:\x20cd\x20to\x20workflows/','indexOf','attemptId','done','1976408HivjSj','Downloading\x20logs...','retryAttemptName','workflow:download','Starting\x20workflow\x20run...','split','\x0a⚠\x20Maximum\x20polling\x20time\x20reached','keys','Pattern:\x20','toLowerCase','join','MIN_LABEL_COUNT','yellow','max','\x20\x20Source:\x20','renderSessionsTimeline','Kill\x20a\x20running\x20attempt','yes','find','Expected\x20format:\x20--param\x20key=value','\x20\x20\x20tdx\x20wf\x20sessions\x20<project>\x20\x20','22255iAivhB','\x20\x20New\x20attempt\x20ID:\x20','all','Workflow:\x20','\x20to\x20see\x20detailed\x20logs','sessionTime','now','\x1b[1A\x1b[2K','✔\x20Pushed\x20','retryAttempt','total','Error:\x20KEY=VALUE\x20is\x20required','getTime','workflowName','Error:\x20Project\x20name\x20is\x20required','createdAt','workflow:secrets:delete','\x20\x20Console:\x20','\x20\x20Attempt\x20ID:\x20','length','Retrying\x20attempt...','Retrying\x20session...','Usage:\x20tdx\x20wf\x20pull\x20<project>\x20[target-dir]','output','revision:\x20','Invalid\x20format:\x20','Error:\x20Project\x20name\x20or\x20ID\x20is\x20required','resolveProject','message','match','attempt','site','Both\x20--attempt-id\x20and\x20--session-id\x20provided,\x20using\x20--attempt-id','--name\x20is\x20required\x20to\x20specify\x20the\x20new\x20project\x20name','LABEL_WIDTH_DIVISOR','resolveProjectDir','---\x20','substring','workflow:timeline','Error:\x20Target\x20must\x20be\x20prefixed\x20with\x20\x22session:\x22\x20or\x20\x22attempt:\x22','Deleting\x20project\x20','unchanged','\x20unchanged','basename','\x27\x20has\x20been\x20deleted\x20from\x20project\x20\x27','Select\x20a\x20workflow\x20to\x20run','Error:\x20Invalid\x20parameter\x20format:\x20','resolveProjectId','Attempt:\x20','follow','from','Analyzing\x20changes...','GUTTER','Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20project\x20\x22','size','stat','Project\x20filter:\x20','project','No\x20tasks\x20found\x20(attempt\x20may\x20be\x20queued)','Set\x20default\x20workflow\x20project\x20for\x20this\x20session','Params:\x20','workflows','\x20logs','Usage:\x20tdx\x20wf\x20clone\x20<source-dir>\x20--name\x20<new-project-name>','key','Filter:\x20project=','Tip:\x20Run\x20a\x20workflow\x20first\x20with:\x20tdx\x20wf\x20run\x20<project>.<workflow>','/\x20or\x20run\x20\x27tdx\x20wf\x20pull\x20','sort','ICON_WIDTH','window','newProjectName','\x20\x20Session\x20context\x20set\x20to:\x20','slice','workflow:clone','readFile','workflowProject','msPerChar','getMinutes','diff','⚠\x20Showing\x20first\x20','MAX_POLL_ITERATIONS','No\x20workflow\x20tdx.json\x20found','updatedAt','generateSessionTimelineRows','\x0aDry\x20run\x20-\x20no\x20project\x20created','ICON_SPACING','workflow:projects','\x20\x20Project:\x20','\x0aApply\x20these\x20changes?','unknown','rows','sessions','/attempt/','startsWith','splice','10848DfdKNr','✔\x20Pull\x20complete','jsonl','finishedAt','List\x20workflows','Using\x20attempt\x20','Error:\x20Session\x20ID\x20or\x20attempt\x20ID\x20is\x20required','\x20\x20Session\x20ID:\x20','utf-8','Dry\x20run:\x20yes','✔\x20Deleted\x20project\x20','1773ZWLlhK','Delete\x20a\x20secret\x20from\x20a\x20workflow\x20project','No\x20workflow\x20sessions\x20found','workflow','\x20\x20Location:\x20','2123pDfOeQ','fs/promises','workflow:attempt','getMonth','Updating\x20','.\x20Expected\x20format:\x20KEY=VALUE','type','💡\x20Tip:\x20Use\x20','Validation:\x20skipped','\x27\x20has\x20been\x20set\x20for\x20project\x20\x27','new','...','\x20is\x20not\x20a\x20directory','Setting\x20secret...','Fetching\x20log\x20files...','trim','Listing\x20workflow\x20projects...','\x20session','path','No\x20attempts\x20found','Session\x20','workflow:tasks','333rPbQFd','fileCount','summary','Downloading\x20project\x20','Include\x20retried:\x20yes','Error:','running','Select\x20a\x20task\x20to\x20view\x20logs:','✔\x20Workflow\x20run\x20started','deleted','Session\x20not\x20found:\x20','fromTask','planned','Listing\x20workflow\x20sessions...','blue','✔\x20Secret\x20\x27','skipValidation','Select\x20a\x20session\x20to\x20view\x20timeline:','\x0aPolling...\x20(','Revision:\x20','\x20tasks','fullName','targetExists','tasks','Usage:\x20wf\x20secrets\x20set\x20[project]\x20KEY=VALUE','executePushProject','\x20project','Set\x20a\x20secret\x20for\x20a\x20workflow\x20project','✔\x20Found\x20','success','No\x20tdx.json\x20found\x20in\x20current\x20directory\x20or\x20parents','Killing\x20attempt...','Loading\x20sessions...','task','buildTimelineData','includeRetried','includes','Pull\x20workflow\x20project\x20to\x20local\x20folder','Project\x20name\x20is\x20required','workflow:run'];a38_0x3456=function(){return _0x2ae05a;};return a38_0x3456();}function formatElapsed(_0x523530){const _0x502ecb=a38_0x3dc27b,_0x3c0d9c=Math[_0x502ecb(0x1c1)](_0x523530/0x3e8),_0x3162d2=Math[_0x502ecb(0x1c1)](_0x3c0d9c/0x3c),_0x178deb=Math[_0x502ecb(0x1c1)](_0x3162d2/0x3c),_0xd1aeeb=Math[_0x502ecb(0x1c1)](_0x178deb/0x18);if(_0xd1aeeb>0x0){const _0xa8b431=_0x178deb%0x18;return _0xa8b431>0x0?_0xd1aeeb+'d\x20'+_0xa8b431+'h':_0xd1aeeb+'d';}else{if(_0x178deb>0x0){const _0x714a91=_0x3162d2%0x3c;return _0x714a91>0x0?_0x178deb+'h\x20'+_0x714a91+'m':_0x178deb+'h';}else{if(_0x3162d2>0x0){const _0x2d675e=_0x3c0d9c%0x3c;return _0x2d675e>0x0?_0x3162d2+'m\x20'+_0x2d675e+'s':_0x3162d2+'m';}else return _0x3c0d9c+'s';}}}function formatTimestamp(_0x555012,_0x5713b8){const _0x3b3936=a38_0x3dc27b,_0x579653=new Date(_0x555012),_0x1afa2e=String(_0x579653[_0x3b3936(0x14a)]())[_0x3b3936(0x140)](0x2,'0'),_0x2ad721=String(_0x579653[_0x3b3936(0x22d)]())[_0x3b3936(0x140)](0x2,'0'),_0x1ef371=_0x1afa2e+':'+_0x2ad721,_0x13667b=_0x579653[_0x3b3936(0x13f)]()===_0x5713b8['getFullYear']()&&_0x579653['getMonth']()===_0x5713b8[_0x3b3936(0xa6)]()&&_0x579653[_0x3b3936(0x16e)]()===_0x5713b8[_0x3b3936(0x16e)]();if(_0x13667b)return _0x1ef371;else{const _0xc9c604=String(_0x579653['getMonth']()+0x1)[_0x3b3936(0x140)](0x2,'0'),_0x28c669=String(_0x579653[_0x3b3936(0x16e)]())['padStart'](0x2,'0');return _0xc9c604+'-'+_0x28c669+'\x20'+_0x1ef371;}}function formatDate(_0x5a4965){const _0x1f93e9=a38_0x3dc27b,_0x5a81b6=_0x5a4965[_0x1f93e9(0x13f)](),_0x4a8f98=String(_0x5a4965[_0x1f93e9(0xa6)]()+0x1)['padStart'](0x2,'0'),_0x3c2eca=String(_0x5a4965[_0x1f93e9(0x16e)]())[_0x1f93e9(0x140)](0x2,'0');return _0x5a81b6+'-'+_0x4a8f98+'-'+_0x3c2eca;}function getTaskStateIcon(_0x210983){const _0x102408={'success':'✅','error':'❌','group_error':'❌','running':'🔄','blocked':'🛑','planned':'⏳','canceled':'🚫','canceling':'🛑'};return _0x102408[_0x210983]||'⚪';}function getBarChar(_0x551e49){return _0x551e49==='error'||_0x551e49==='group_error'?'×':'─';}function getBarColor(_0x472ed2){const _0x4ae063=a38_0x3dc27b,_0x10f201={'success':a38_0x4e5599['green'],'error':a38_0x4e5599[_0x4ae063(0x1a1)],'group_error':a38_0x4e5599[_0x4ae063(0x1a1)],'running':a38_0x4e5599[_0x4ae063(0xc7)],'blocked':a38_0x4e5599[_0x4ae063(0x1d6)],'planned':a38_0x4e5599[_0x4ae063(0x18c)],'canceling':a38_0x4e5599[_0x4ae063(0x1d6)]};return _0x10f201[_0x472ed2]||a38_0x4e5599['white'];}function parseTaskName(_0x3d5e3d){const _0x2df10c=a38_0x3dc27b;let _0x4a2459=_0x3d5e3d[_0x2df10c(0x11e)](/^\++/,'');const _0x45c27b=_0x4a2459['split']('+'),_0x5d528f=_0x45c27b[_0x2df10c(0x1f2)]>0x1?_0x45c27b[_0x2df10c(0x1f2)]-0x2:0x0,_0x2c8a9d=_0x45c27b[_0x45c27b[_0x2df10c(0x1f2)]-0x1]||_0x4a2459;return{'level':_0x5d528f,'name':'+'+_0x2c8a9d};}function truncateTaskName(_0xe8eb30,_0x851622){const _0x449367=a38_0x3dc27b,_0x196339=stringWidth(_0xe8eb30);if(_0x196339<=_0x851622)return _0xe8eb30;let _0x671af0=_0xe8eb30;while(stringWidth(_0x671af0+'…')>_0x851622&&_0x671af0[_0x449367(0x1f2)]>0x0){_0x671af0=_0x671af0[_0x449367(0x228)](0x0,-0x1);}return _0x671af0+'…';}function calculateTimeScale(_0x153207,_0x2bea06){const _0x1ecbb9=a38_0x3dc27b;return{'startTime':_0x153207[_0x1ecbb9(0x166)],'endTime':_0x153207[_0x1ecbb9(0x170)],'durationMs':_0x153207['duration'],'msPerChar':_0x153207[_0x1ecbb9(0x10a)]/_0x2bea06};}function timeToPosition(_0x1a68d5,_0xda10f4,_0x45ac3d){const _0x11a857=a38_0x3dc27b,_0x33af60=_0x1a68d5-_0xda10f4[_0x11a857(0xee)],_0x39fccb=Math[_0x11a857(0x1c1)](_0x33af60/_0xda10f4[_0x11a857(0x22c)]);return Math[_0x11a857(0x1d7)](0x0,Math[_0x11a857(0x152)](_0x39fccb,_0x45ac3d));}function renderTimeAxis(_0x2fdf54,_0xe87bbb){const _0x11e925=a38_0x3dc27b,_0xf0c29a=Math[_0x11e925(0x152)](TIMELINE_CONFIG[_0x11e925(0x13d)],Math[_0x11e925(0x1d7)](TIMELINE_CONFIG[_0x11e925(0x1d5)],Math[_0x11e925(0x1c1)](_0xe87bbb/TIMELINE_CONFIG[_0x11e925(0x201)]))),_0x2e792f=_0x2fdf54[_0x11e925(0x1aa)]/(_0xf0c29a-0x1),_0x3a56c1=new Date(_0x2fdf54[_0x11e925(0xee)]),_0x5e4285=[];for(let _0x4af032=0x0;_0x4af032<_0xf0c29a;_0x4af032++){const _0x1edcf4=_0x2fdf54[_0x11e925(0xee)]+_0x4af032*_0x2e792f,_0x28d53e=timeToPosition(_0x1edcf4,_0x2fdf54,_0xe87bbb),_0x3762e0=formatTimestamp(_0x1edcf4,_0x3a56c1);_0x5e4285[_0x11e925(0x133)]({'pos':_0x28d53e,'text':_0x3762e0});}const _0x99755c=new Array(_0xe87bbb)['fill']('\x20');let _0xa851e1=-0x1;for(const {pos:_0x4747e9,text:_0x3e6028}of _0x5e4285){let _0x379b44=Math[_0x11e925(0x1d7)](0x0,_0x4747e9-Math[_0x11e925(0x1c1)](_0x3e6028[_0x11e925(0x1f2)]/0x2));_0x379b44<=_0xa851e1+TIMELINE_CONFIG[_0x11e925(0xfc)]&&(_0x379b44=_0xa851e1+TIMELINE_CONFIG['LABEL_MIN_SPACING']+0x1);_0x379b44+_0x3e6028[_0x11e925(0x1f2)]>_0xe87bbb&&(_0x379b44=_0xe87bbb-_0x3e6028['length']);if(_0x379b44>=0x0&&_0x379b44+_0x3e6028[_0x11e925(0x1f2)]<=_0xe87bbb&&_0x379b44>_0xa851e1){for(let _0x1d100a=0x0;_0x1d100a<_0x3e6028[_0x11e925(0x1f2)];_0x1d100a++){_0x99755c[_0x379b44+_0x1d100a]=_0x3e6028[_0x1d100a];}_0xa851e1=_0x379b44+_0x3e6028['length']-0x1;}}return _0x99755c[_0x11e925(0x1d4)]('');}function renderTaskRow(_0x3cbf16,_0x2e6e83,_0x113228,_0x50bc8e){const _0x489049=a38_0x3dc27b,{level:_0x4415e4,name:_0x1a8cd1}=parseTaskName(_0x3cbf16[_0x489049(0x159)]),_0x21c476='\x20'[_0x489049(0x1ac)](_0x4415e4),_0x391cae=_0x3cbf16['window']?'('+formatElapsed(_0x3cbf16[_0x489049(0x225)][_0x489049(0x10a)])+')':'',_0x152940=stringWidth(_0x391cae),_0x383095=_0x4415e4*0x1,_0x27e580=_0x50bc8e-_0x383095-_0x152940-0x1,_0x41960d=truncateTaskName(_0x1a8cd1,_0x27e580),_0x1e22ed=_0x21c476+_0x41960d,_0x5c7e36=stringWidth(_0x1e22ed),_0x55bd57=_0x50bc8e-_0x5c7e36-_0x152940,_0x27ab1d=_0x1e22ed+'\x20'['repeat'](Math['max'](0x1,_0x55bd57))+a38_0x4e5599[_0x489049(0x18c)](_0x391cae),_0x539020=getTaskStateIcon(_0x3cbf16[_0x489049(0x102)]),_0x148332=new Array(_0x113228)['fill']('\x20');if(_0x3cbf16['window']){const _0x245c39=timeToPosition(_0x3cbf16[_0x489049(0x225)][_0x489049(0x166)],_0x2e6e83,_0x113228),_0xec93b7=timeToPosition(_0x3cbf16[_0x489049(0x225)]['end'],_0x2e6e83,_0x113228),_0x5ad9d9=getBarChar(_0x3cbf16['state']),_0x2ed9d2=Math[_0x489049(0x1d7)](_0x245c39+0x1,_0xec93b7);for(let _0x561be8=_0x245c39;_0x561be8<Math[_0x489049(0x152)](_0x2ed9d2,_0x113228);_0x561be8++){_0x148332[_0x561be8]=_0x5ad9d9;}}const _0x246e1c=getBarColor(_0x3cbf16[_0x489049(0x102)]),_0x1fe838=_0x148332[_0x489049(0x142)](_0x1a8c53=>_0x1a8c53==='\x20'?'\x20':_0x246e1c(_0x1a8c53))[_0x489049(0x1d4)]('');return _0x539020+'\x20'+_0x27ab1d+'│'+_0x1fe838+'│';}function calculateStats(_0x52210c){const _0xb31897=a38_0x3dc27b,_0x27e60b={'total':_0x52210c['length'],'success':0x0,'error':0x0,'running':0x0,'pending':0x0};for(const _0x444848 of _0x52210c){if(_0x444848['state']===_0xb31897(0xd6))_0x27e60b['success']++;else{if(_0x444848['state']==='error'||_0x444848['state']===_0xb31897(0x161))_0x27e60b[_0xb31897(0xfa)]++;else _0x444848[_0xb31897(0x102)]===_0xb31897(0xbf)?_0x27e60b[_0xb31897(0xbf)]++:_0x27e60b[_0xb31897(0x13c)]++;}}return _0x27e60b;}function formatStats(_0x194904){const _0x57ae5d=a38_0x3dc27b;return['Total:\x20'+_0x194904[_0x57ae5d(0x1e9)],'✅\x20'+_0x194904[_0x57ae5d(0xd6)],'❌\x20'+_0x194904[_0x57ae5d(0xfa)],_0x57ae5d(0x18f)+_0x194904[_0x57ae5d(0xbf)],'⏳\x20'+_0x194904[_0x57ae5d(0x13c)]]['join']('\x20\x20');}export class WorkflowTimelineCommand extends WorkflowBaseCommand{[a38_0x3dc27b(0x159)]=a38_0x3dc27b(0x205);[a38_0x3dc27b(0x144)]='Show\x20task\x20execution\x20timeline\x20for\x20a\x20workflow\x20attempt';async[a38_0x3dc27b(0x10e)](_0x2b517b){const _0x1cd028=a38_0x3dc27b,{options:_0x306126,args:_0xcae8d1,tdx:_0x163d7d}=_0x2b517b;let _0x184e18,_0x24d08a,_0xade2fd=![];if(_0xcae8d1[0x0]){if(_0xcae8d1[0x0][_0x1cd028(0xdd)]('.')){const _0x49d7c8=this[_0x1cd028(0x1be)](_0xcae8d1,_0x306126);if(!_0x49d7c8)return 0x1;_0x184e18=_0x49d7c8[_0x1cd028(0x172)],_0x24d08a=_0x49d7c8['workflowName'];}else{_0x24d08a=_0xcae8d1[0x0],_0x184e18=_0x306126[_0x1cd028(0x22b)];if(!_0x184e18)return console[_0x1cd028(0xfa)](a38_0x4e5599[_0x1cd028(0x1a1)]('Error:'),_0x1cd028(0x125)),0x1;_0xade2fd=!![];}}else{const _0xaff4d9=this[_0x1cd028(0x1be)](_0xcae8d1,_0x306126);if(!_0xaff4d9)return 0x1;_0x184e18=_0xaff4d9['projectName'],_0x24d08a=_0xaff4d9[_0x1cd028(0x1ec)];}if(_0x306126['verbose']){if(_0x184e18&&_0x24d08a)console[_0x1cd028(0xfa)]('Filter:\x20'+_0x184e18+'.'+_0x24d08a);else _0x184e18&&console[_0x1cd028(0xfa)](_0x1cd028(0x220)+_0x184e18);}const _0x571bcc=_0x306126[_0x1cd028(0x1c8)],_0x1430bd=_0x306126[_0x1cd028(0x14b)];if(_0x571bcc){_0x1430bd&&console[_0x1cd028(0xfa)](a38_0x4e5599[_0x1cd028(0x1d6)](_0x1cd028(0xf1)),_0x1cd028(0x1ff));const _0x1c6aa5=_0x306126[_0x1cd028(0x210)];return _0x1c6aa5?await this[_0x1cd028(0xf3)](_0x2b517b,_0x571bcc):await this[_0x1cd028(0x11b)](_0x2b517b,_0x571bcc,_0x306126),0x0;}if(_0x1430bd){const _0x12149c=await withSpinner('Loading\x20session...',()=>_0x163d7d['workflow'][_0x1cd028(0x23b)]({'projectName':_0x184e18,'workflowName':_0x24d08a,'limit':0x64}),{'verbose':_0x306126['verbose']}),_0x41e9bb=_0x12149c[_0x1cd028(0x15a)][_0x1cd028(0x1dc)](_0x369adf=>_0x369adf['id']===_0x1430bd);if(!_0x41e9bb)return console['error'](a38_0x4e5599[_0x1cd028(0x1a1)]('Error:'),_0x1cd028(0xc3)+_0x1430bd),0x1;if(!_0x41e9bb[_0x1cd028(0x189)]?.['id'])return console[_0x1cd028(0xfa)](a38_0x4e5599[_0x1cd028(0x1a1)](_0x1cd028(0xbe)),_0x1cd028(0xb7)+_0x1430bd+_0x1cd028(0x183)),0x1;const _0x9fa727=_0x41e9bb[_0x1cd028(0x189)]['id'];_0x306126['verbose']&&console[_0x1cd028(0xfa)](_0x1cd028(0x244)+_0x9fa727+'\x20from\x20session\x20'+_0x1430bd);const _0x2952a4=_0x306126['follow'];return _0x2952a4?await this[_0x1cd028(0xf3)](_0x2b517b,_0x9fa727):await this[_0x1cd028(0x11b)](_0x2b517b,_0x9fa727,_0x306126),0x0;}const _0x447888=await withSpinner(_0x1cd028(0xd9),()=>_0x163d7d[_0x1cd028(0xa1)]['sessions']({'projectName':_0x184e18,'workflowName':_0x24d08a,'limit':_0x306126['limit']||0x32}),{'verbose':_0x306126[_0x1cd028(0x12f)]}),_0x4b1387=_0x447888[_0x1cd028(0x15a)];if(_0x4b1387[_0x1cd028(0x1f2)]===0x0){if(_0x184e18&&_0x24d08a)console['error'](_0x1cd028(0x129)+_0x184e18+'.'+_0x24d08a);else _0x184e18?console['error'](_0x1cd028(0x182)+_0x184e18):(console['error'](_0x1cd028(0xa0)),console[_0x1cd028(0xfa)](a38_0x4e5599[_0x1cd028(0x18c)](_0x1cd028(0x221))));return 0x0;}_0x4b1387['sort']((_0x3d73e2,_0x4f1477)=>{const _0x1b8ada=_0x1cd028,_0x3b4e79=_0x3d73e2[_0x1b8ada(0x1e4)]||'',_0x4b05d8=_0x4f1477[_0x1b8ada(0x1e4)]||'';return _0x4b05d8[_0x1b8ada(0x173)](_0x3b4e79);});if(_0x306126[_0x1cd028(0x130)]||_0x306126[_0x1cd028(0x241)])return await handleSDKOutput(_0x4b1387,_0x306126),0x0;let _0x454d1b;if(_0xade2fd){const _0x4fb0a4=_0x4b1387[0x0];if(!_0x4fb0a4[_0x1cd028(0x189)]?.['id'])return console[_0x1cd028(0xfa)](_0x1cd028(0x104)),0x0;_0x454d1b=_0x4fb0a4[_0x1cd028(0x189)]['id'],_0x306126['verbose']&&console[_0x1cd028(0xfa)]('Auto-selected\x20latest\x20session:\x20'+_0x4fb0a4[_0x1cd028(0x1e4)]);}else{const _0x2b2eec=_0x4b1387[_0x1cd028(0x142)](_0x3d2ec8=>{const _0x5af1db=_0x1cd028,_0x5cb487=getAttemptStatusDisplay(_0x3d2ec8[_0x5af1db(0x189)]);return{'title':_0x3d2ec8[_0x5af1db(0x218)]?.['name']+'.'+_0x3d2ec8['workflow']?.[_0x5af1db(0x159)]+_0x5af1db(0x141)+_0x3d2ec8[_0x5af1db(0x1e4)]+'\x20'+_0x5cb487[_0x5af1db(0x1a6)],'value':_0x3d2ec8['lastAttempt']?.['id']||'','description':_0x5cb487[_0x5af1db(0x16c)]};}),_0x4b7cc0=await a38_0x1916d9({'type':_0x1cd028(0x15e),'name':_0x1cd028(0x1c8),'message':_0x1cd028(0xca),'choices':_0x2b2eec[_0x1cd028(0x1c4)](_0x672d04=>_0x672d04['value']!=='')});if(!_0x4b7cc0['attemptId'])return 0x0;_0x454d1b=_0x4b7cc0['attemptId'];}const _0x389b26=_0x306126[_0x1cd028(0x210)];return _0x389b26?await this[_0x1cd028(0xf3)](_0x2b517b,_0x454d1b):await this[_0x1cd028(0x11b)](_0x2b517b,_0x454d1b,_0x306126),0x0;}async[a38_0x3dc27b(0x11b)](_0x27492c,_0x193688,_0x45dd92){const _0x52aa06=a38_0x3dc27b,{tdx:_0x537d08}=_0x27492c;let _0x7c33c3,_0x157992;try{[_0x7c33c3,_0x157992]=await Promise[_0x52aa06(0x1e1)]([_0x537d08[_0x52aa06(0xa1)][_0x52aa06(0x1fd)](_0x193688),_0x537d08[_0x52aa06(0xa1)][_0x52aa06(0xd0)](_0x193688,![])]);}catch(_0x3c685f){console[_0x52aa06(0xfa)](a38_0x4e5599['red'](_0x52aa06(0x17f)));_0x45dd92[_0x52aa06(0x12f)]&&console[_0x52aa06(0xfa)](_0x3c685f);throw _0x3c685f;}if(_0x45dd92[_0x52aa06(0x130)]||_0x45dd92[_0x52aa06(0x241)]){const _0x101fc3=this['buildTimelineData'](_0x7c33c3,_0x157992);await handleSDKOutput([_0x101fc3],_0x45dd92);return;}const _0x27db84=_0x537d08[_0x52aa06(0x10f)][_0x52aa06(0x1fe)],_0x339758=this[_0x52aa06(0x134)](_0x7c33c3,_0x157992,_0x27db84);console[_0x52aa06(0x184)](_0x339758);}async[a38_0x3dc27b(0xf3)](_0x1acf28,_0x2dac2e){const _0x14e623=a38_0x3dc27b,{tdx:_0x5a9185}=_0x1acf28,_0x3dbc08=TIMELINE_CONFIG[_0x14e623(0x10d)],_0x265f08=TIMELINE_CONFIG[_0x14e623(0x230)];let _0xde80cc=0x0;while(_0xde80cc<_0x265f08){process[_0x14e623(0x115)][_0x14e623(0x18b)]&&process[_0x14e623(0x115)][_0x14e623(0x168)]('\x1bc');let _0x28a25b,_0x45a6ba;try{[_0x28a25b,_0x45a6ba]=await Promise[_0x14e623(0x1e1)]([_0x5a9185[_0x14e623(0xa1)]['attempt'](_0x2dac2e),_0x5a9185[_0x14e623(0xa1)][_0x14e623(0xd0)](_0x2dac2e,![])]);}catch(_0xedc902){console[_0x14e623(0xfa)](a38_0x4e5599[_0x14e623(0x1a1)](_0x14e623(0x153)));_0xde80cc>0x0&&console['error'](a38_0x4e5599[_0x14e623(0x18c)]('Last\x20successful\x20update\x20was\x20at\x20iteration\x20'+_0xde80cc));throw _0xedc902;}const _0x52700f=_0x5a9185[_0x14e623(0x10f)][_0x14e623(0x1fe)],_0x4915b4=this[_0x14e623(0x134)](_0x28a25b,_0x45a6ba,_0x52700f);console['log'](_0x4915b4);const _0x504f99=_0x28a25b[_0x14e623(0x1c9)]&&_0x45a6ba['every'](_0x31814a=>_0x31814a[_0x14e623(0x102)]!==_0x14e623(0xbf)&&_0x31814a[_0x14e623(0x102)]!=='planned');if(_0x504f99){console['error'](a38_0x4e5599[_0x14e623(0x11a)](_0x14e623(0x127)));break;}console[_0x14e623(0xfa)](a38_0x4e5599[_0x14e623(0x18c)](_0x14e623(0xcb)+_0xde80cc*0x2+'s\x20elapsed,\x20Ctrl+C\x20to\x20exit)')),await new Promise(_0x1426ec=>setTimeout(_0x1426ec,_0x3dbc08)),_0xde80cc++;}_0xde80cc>=_0x265f08&&console[_0x14e623(0xfa)](a38_0x4e5599[_0x14e623(0x1d6)](_0x14e623(0x1d0)));}[a38_0x3dc27b(0x134)](_0x1569c4,_0x2b9a27,_0x40315a){const _0x29f51d=a38_0x3dc27b,_0x428913=[],_0x583313=TIMELINE_CONFIG[_0x29f51d(0x10b)],_0x19561a=0x5,_0x313348=process[_0x29f51d(0x115)]['columns']||0x78,_0x4c224f=_0x313348-_0x583313-_0x19561a,_0x2c6e54=Math['max'](TIMELINE_CONFIG['MIN_TIMELINE_WIDTH'],Math[_0x29f51d(0x152)](_0x4c224f,TIMELINE_CONFIG[_0x29f51d(0x1c2)])),_0x464e3e=new Date(_0x1569c4[_0x29f51d(0x1ee)])[_0x29f51d(0x1eb)](),_0x28d6cb=_0x1569c4['finishedAt']?new Date(_0x1569c4[_0x29f51d(0x242)])[_0x29f51d(0x1eb)]():Date['now'](),_0x3712f8={'start':_0x464e3e,'end':_0x28d6cb,'duration':_0x28d6cb-_0x464e3e},_0x53a481=new Map(),_0x193728=[];for(const _0x106b41 of _0x2b9a27){if(_0x106b41['startedAt']){const _0x3294f3=new Date(_0x106b41['startedAt'])[_0x29f51d(0x1eb)](),_0x276c82=_0x106b41[_0x29f51d(0x232)]?new Date(_0x106b41[_0x29f51d(0x232)])['getTime']():Date[_0x29f51d(0x1e5)](),_0x3f0f49={'start':_0x3294f3,'end':_0x276c82,'duration':_0x276c82-_0x3294f3};_0x53a481[_0x29f51d(0xfd)](_0x106b41['id'],_0x3f0f49),_0x193728[_0x29f51d(0x133)]({'name':_0x106b41['fullName'],'state':_0x106b41[_0x29f51d(0x102)]||_0x29f51d(0x239),'window':_0x3f0f49});}else _0x193728['push']({'name':_0x106b41[_0x29f51d(0xce)],'state':_0x106b41[_0x29f51d(0x102)]||_0x29f51d(0xc5),'window':undefined});}_0x193728['sort']((_0x4ae434,_0x5e1d19)=>{const _0x4d3758=_0x29f51d;if(!_0x4ae434[_0x4d3758(0x225)])return 0x1;if(!_0x5e1d19[_0x4d3758(0x225)])return-0x1;return _0x4ae434[_0x4d3758(0x225)]['start']-_0x5e1d19['window']['start'];});const _0x248817=_0x193728[_0x29f51d(0x1f2)],_0x5caa18=_0x248817>TIMELINE_CONFIG[_0x29f51d(0x180)];_0x5caa18&&_0x193728[_0x29f51d(0x23e)](TIMELINE_CONFIG['MAX_TASKS_DISPLAY']);const _0x3d2487=calculateTimeScale(_0x3712f8,_0x2c6e54),_0x826fe6=_0x1569c4[_0x29f51d(0x1c9)]?_0x1569c4[_0x29f51d(0xd6)]?a38_0x4e5599[_0x29f51d(0x11a)](_0x29f51d(0xd6)):a38_0x4e5599[_0x29f51d(0x1a1)](_0x29f51d(0xfa)):a38_0x4e5599[_0x29f51d(0xc7)](_0x29f51d(0xbf)),_0x3ef4c5=_0x1569c4['project']?.['id'],_0x52cd4a=_0x1569c4['sessionId'];let _0x4a855c;if(_0x3ef4c5&&_0x52cd4a){const _0x33ffef=getWorkflowAttemptUrl(_0x40315a,_0x3ef4c5,_0x52cd4a,_0x1569c4['id']);_0x4a855c=hyperlink(a38_0x4e5599[_0x29f51d(0x18c)](_0x1569c4['id']),_0x33ffef);}else _0x4a855c=a38_0x4e5599[_0x29f51d(0x18c)](_0x1569c4['id']);_0x428913[_0x29f51d(0x133)](_0x29f51d(0x20f)+_0x4a855c+_0x29f51d(0x141)+_0x826fe6+_0x29f51d(0x141)+formatElapsed(_0x3712f8['duration']));if(_0x193728[_0x29f51d(0x1f2)]>0x0){const _0x100abb=renderTimeAxis(_0x3d2487,_0x2c6e54),_0x55ca0d=new Date(_0x3712f8[_0x29f51d(0x166)]),_0x5df0a9=formatDate(_0x55ca0d),_0x3487b4=TIMELINE_CONFIG[_0x29f51d(0x224)]+TIMELINE_CONFIG[_0x29f51d(0x235)]+_0x583313,_0x5b0690=_0x5df0a9[_0x29f51d(0x140)](_0x3487b4),_0x5b216c=a38_0x4e5599[_0x29f51d(0x18c)](_0x5b0690);_0x428913['push'](_0x5b216c+'\x20'+_0x100abb);for(const _0x5da74e of _0x193728){_0x428913[_0x29f51d(0x133)](renderTaskRow(_0x5da74e,_0x3d2487,_0x2c6e54,_0x583313));}const _0x24ad09=calculateStats(_0x193728);_0x428913[_0x29f51d(0x133)](formatStats(_0x24ad09)),_0x5caa18&&_0x428913[_0x29f51d(0x133)](a38_0x4e5599['yellow'](_0x29f51d(0x22f)+TIMELINE_CONFIG[_0x29f51d(0x180)]+_0x29f51d(0x10c)+_0x248817+_0x29f51d(0xcd))),_0x428913[_0x29f51d(0x133)](''),_0x428913[_0x29f51d(0x133)](a38_0x4e5599['dim'](_0x29f51d(0xaa))+(_0x29f51d(0x14f)+_0x1569c4['id']+_0x29f51d(0x21d))+a38_0x4e5599['dim'](_0x29f51d(0x1e3)));}else _0x428913[_0x29f51d(0x133)](_0x29f51d(0x219));return _0x428913[_0x29f51d(0x1d4)]('\x0a');}[a38_0x3dc27b(0xdb)](_0xe5215,_0x1997c6){const _0x2738b6=a38_0x3dc27b,_0x39420d=new Date(_0xe5215['createdAt'])[_0x2738b6(0x1eb)](),_0x53768f=_0xe5215[_0x2738b6(0x242)]?new Date(_0xe5215[_0x2738b6(0x242)])['getTime']():Date[_0x2738b6(0x1e5)](),_0x3086c1=_0x53768f-_0x39420d,_0x57fa93=[];for(const _0x528b1c of _0x1997c6){if(_0x528b1c[_0x2738b6(0x13e)]){const _0xe7ec0=new Date(_0x528b1c[_0x2738b6(0x13e)])[_0x2738b6(0x1eb)](),_0x13cfc5=_0x528b1c[_0x2738b6(0x232)]?new Date(_0x528b1c['updatedAt'])[_0x2738b6(0x1eb)]():Date[_0x2738b6(0x1e5)]();_0x57fa93[_0x2738b6(0x133)]({'name':_0x528b1c[_0x2738b6(0xce)],'state':_0x528b1c[_0x2738b6(0x102)]||_0x2738b6(0x239),'window':{'start':_0xe7ec0,'end':_0x13cfc5,'duration':_0x13cfc5-_0xe7ec0}});}else _0x57fa93['push']({'name':_0x528b1c['fullName'],'state':_0x528b1c[_0x2738b6(0x102)]||'planned','window':undefined});}const _0x50e7df=calculateStats(_0x57fa93);return{'attempt':{'id':_0xe5215['id'],'status':_0xe5215['done']?_0xe5215[_0x2738b6(0xd6)]?'success':'error':_0x2738b6(0xbf),'createdAt':_0xe5215[_0x2738b6(0x1ee)],'finishedAt':_0xe5215[_0x2738b6(0x242)],'duration_ms':_0x3086c1},'tasks':_0x57fa93[_0x2738b6(0x142)](_0x2809e0=>({'name':_0x2809e0[_0x2738b6(0x159)],'state':_0x2809e0[_0x2738b6(0x102)],'startedAt':_0x2809e0[_0x2738b6(0x225)]?new Date(_0x2809e0[_0x2738b6(0x225)]['start'])[_0x2738b6(0x148)]():null,'updatedAt':_0x2809e0[_0x2738b6(0x225)]?new Date(_0x2809e0[_0x2738b6(0x225)][_0x2738b6(0x170)])['toISOString']():null,'duration_ms':_0x2809e0['window']?.['duration']||null})),'stats':_0x50e7df};}}
|