@treasuredata/tdx 0.16.13 → 0.16.14
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.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-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.js +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/mcp-command.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-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/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +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/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.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/passthrough-server.js +1 -1
- package/dist/proxy/server.js +1 -1
- package/dist/proxy/session-cache.js +1 -1
- package/dist/proxy/sse-usage-parser.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/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.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.js +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.js +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.js +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/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.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/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x369166=a3_0x18a7;(function(_0x34c755,_0x2faee2){const _0x2084b8=a3_0x18a7,_0x14abd0=_0x34c755();while(!![]){try{const _0x5d9e34=parseInt(_0x2084b8(0xd7))/0x1+parseInt(_0x2084b8(0xd6))/0x2*(-parseInt(_0x2084b8(0xdd))/0x3)+parseInt(_0x2084b8(0xcb))/0x4+-parseInt(_0x2084b8(0xe3))/0x5+parseInt(_0x2084b8(0xdb))/0x6+-parseInt(_0x2084b8(0xc8))/0x7*(parseInt(_0x2084b8(0xe1))/0x8)+parseInt(_0x2084b8(0xce))/0x9*(parseInt(_0x2084b8(0xcc))/0xa);if(_0x5d9e34===_0x2faee2)break;else _0x14abd0['push'](_0x14abd0['shift']());}catch(_0x4fd600){_0x14abd0['push'](_0x14abd0['shift']());}}}(a3_0x4ff8,0xbdfc0));import{BaseCommand}from'./command.js';function a3_0x4ff8(){const _0x2c7fd3=['9lvEFlP','activations','verbose','data','Resolved\x20child\x20ID:\x20','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','Resolved\x20parent\x20ID:\x20','Site:\x20','196838bcFuQv','779540XJRVWe','description','cause','Resolving\x20child\x20segment\x20\x27','3063810ynVcNZ','execute','3AAEhBt','List\x20activations\x20for\x20a\x20segment','Parent\x20name:\x20','\x20activation','1310272QCUeof','error','6574130rLukvj','segment','\x27...','listActivations','name','message','21DAMHEb','Error:\x20Segment\x20name\x20is\x20required','length','1701740liSzzT','9671630WSJPRc','Error:\x20'];a3_0x4ff8=function(){return _0x2c7fd3;};return a3_0x4ff8();}import{SDKError}from'../sdk/index.js';function a3_0x18a7(_0x54ac15,_0x2d7450){_0x54ac15=_0x54ac15-0xc4;const _0x4ff819=a3_0x4ff8();let _0x18a7a8=_0x4ff819[_0x54ac15];return _0x18a7a8;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0x369166(0xc6)]=a3_0x369166(0xcf);[a3_0x369166(0xd8)]=a3_0x369166(0xde);async[a3_0x369166(0xdc)](_0x3da756){const _0x5d1d9b=a3_0x369166,{options:_0x285088,args:_0x46623a,tdx:_0x11dc54}=_0x3da756;if(_0x46623a[_0x5d1d9b(0xca)]===0x0)return console[_0x5d1d9b(0xe2)](_0x5d1d9b(0xc9)),console[_0x5d1d9b(0xe2)](_0x5d1d9b(0xd3)),0x1;try{const {parentId:_0x1e7be3,childId:_0x545f03}=parseSegmentRef(_0x46623a[0x0]);if(!_0x545f03)return console[_0x5d1d9b(0xe2)]('Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations'),console[_0x5d1d9b(0xe2)](_0x5d1d9b(0xd3)),0x1;_0x285088[_0x5d1d9b(0xd0)]&&(console['error'](_0x5d1d9b(0xd5)+_0x285088['site']),console[_0x5d1d9b(0xe2)](_0x5d1d9b(0xdf)+_0x1e7be3),console[_0x5d1d9b(0xe2)]('Child\x20name:\x20'+_0x545f03));const _0x32d76f=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x1e7be3+_0x5d1d9b(0xc4),()=>_0x11dc54[_0x5d1d9b(0xe4)]['resolveParentId'](_0x1e7be3),{'verbose':_0x285088['verbose']}),_0x3d57f3=_0x32d76f[_0x5d1d9b(0xd1)];_0x285088[_0x5d1d9b(0xd0)]&&console['error'](_0x5d1d9b(0xd4)+_0x3d57f3);const _0x58a532=await withSpinner(_0x5d1d9b(0xda)+_0x545f03+'\x27...',()=>_0x11dc54[_0x5d1d9b(0xe4)]['resolveSegmentId'](_0x3d57f3,_0x545f03),{'verbose':_0x285088[_0x5d1d9b(0xd0)]}),_0x2205b1=_0x58a532['data'];_0x285088[_0x5d1d9b(0xd0)]&&console[_0x5d1d9b(0xe2)](_0x5d1d9b(0xd2)+_0x2205b1);const _0x3daf91=await withSpinner('Listing\x20activations\x20for\x20segment\x20\x27'+_0x545f03+_0x5d1d9b(0xc4),()=>_0x11dc54[_0x5d1d9b(0xe4)][_0x5d1d9b(0xc5)](_0x3d57f3,_0x2205b1),{'verbose':_0x285088[_0x5d1d9b(0xd0)]}),_0x330262=_0x3daf91['data'];return console['error']('✔\x20Found\x20'+_0x330262['length']+_0x5d1d9b(0xe0)+(_0x330262[_0x5d1d9b(0xca)]!==0x1?'s':'')),await handleSDKOutput(_0x330262,_0x285088),0x0;}catch(_0xb8703d){if(_0xb8703d instanceof SDKError)return console['error'](_0x5d1d9b(0xcd)+_0xb8703d[_0x5d1d9b(0xc7)]),_0xb8703d[_0x5d1d9b(0xd9)]&&console['error']('\x20\x20Cause:\x20'+_0xb8703d[_0x5d1d9b(0xd9)]),0x1;throw _0xb8703d;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4_0x29d98a=a4_0x3dc0;(function(_0x5f0d19,_0x2fa80f){const _0x2b4758=a4_0x3dc0,_0x3e480d=_0x5f0d19();while(!![]){try{const _0x45fc52=parseInt(_0x2b4758(0x100))/0x1+parseInt(_0x2b4758(0x151))/0x2*(-parseInt(_0x2b4758(0xea))/0x3)+parseInt(_0x2b4758(0x13e))/0x4*(parseInt(_0x2b4758(0x14a))/0x5)+-parseInt(_0x2b4758(0x162))/0x6+parseInt(_0x2b4758(0x152))/0x7+parseInt(_0x2b4758(0x119))/0x8+parseInt(_0x2b4758(0x143))/0x9*(parseInt(_0x2b4758(0x112))/0xa);if(_0x45fc52===_0x2fa80f)break;else _0x3e480d['push'](_0x3e480d['shift']());}catch(_0x540bdb){_0x3e480d['push'](_0x3e480d['shift']());}}}(a4_0x4ecd,0x701c5));import a4_0x47fabb from'chalk';import a4_0xadaa93 from'path';import{existsSync,readFileSync}from'fs';function a4_0x3dc0(_0x4dc7d7,_0xa46091){_0x4dc7d7=_0x4dc7d7-0xd5;const _0x4ecd07=a4_0x4ecd();let _0x3dc0b7=_0x4ecd07[_0x4dc7d7];return _0x3dc0b7;}import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x1ab4be){const _0x51922e=a4_0x3dc0,_0x290b87=[];if(_0x1ab4be[_0x51922e(0x128)]!==undefined)_0x290b87[_0x51922e(0xda)](_0x1ab4be[_0x51922e(0x128)]+_0x51922e(0x103));if(_0x1ab4be['new']!==undefined&&_0x1ab4be[_0x51922e(0x10b)]>0x0)_0x290b87['push'](a4_0x47fabb[_0x51922e(0x150)](_0x1ab4be[_0x51922e(0x10b)]+_0x51922e(0x149)));if(_0x1ab4be[_0x51922e(0xf5)]!==undefined&&_0x1ab4be[_0x51922e(0xf5)]>0x0)_0x290b87[_0x51922e(0xda)](a4_0x47fabb['green'](_0x1ab4be[_0x51922e(0xf5)]+_0x51922e(0xdf)));if(_0x1ab4be['updated']!==undefined&&_0x1ab4be[_0x51922e(0x10d)]>0x0)_0x290b87[_0x51922e(0xda)](a4_0x47fabb[_0x51922e(0x146)](_0x1ab4be[_0x51922e(0x10d)]+_0x51922e(0x13a)));if(_0x1ab4be[_0x51922e(0x145)]!==undefined&&_0x1ab4be['unchanged']>0x0)_0x290b87[_0x51922e(0xda)](a4_0x47fabb[_0x51922e(0x169)](_0x1ab4be[_0x51922e(0x145)]+_0x51922e(0xd9)));if(_0x1ab4be[_0x51922e(0x104)]!==undefined&&_0x1ab4be['errors']>0x0)_0x290b87['push'](a4_0x47fabb[_0x51922e(0x123)](_0x1ab4be['errors']+_0x51922e(0x13d)));return _0x290b87['join'](',\x20');}function displayDiffs(_0x3c5c3e,_0x3ec196,_0x2d281e,_0x2c3650,_0x4f6b5b=[]){const _0x4bd368=a4_0x3dc0;for(const _0xd64b65 of _0x3c5c3e){if(_0xd64b65[_0x4bd368(0xf7)]){const _0x19d563=_0xd64b65[_0x4bd368(0x13f)]||_0xd64b65[_0x4bd368(0x135)];console[_0x4bd368(0x134)]('\x0aChanges\x20to\x20agent\x20\x27'+_0x19d563+'\x27:'),console[_0x4bd368(0x134)]('─'[_0x4bd368(0x107)](0x3c)),console[_0x4bd368(0x134)](_0xd64b65[_0x4bd368(0xf7)]),console['log']('─'[_0x4bd368(0x107)](0x3c));}}for(const _0x3f568a of _0x3ec196){_0x3f568a['diff']&&(console[_0x4bd368(0x134)](_0x4bd368(0xec)+_0x3f568a[_0x4bd368(0x135)]+'\x27:'),console['log']('─'[_0x4bd368(0x107)](0x3c)),console[_0x4bd368(0x134)](_0x3f568a[_0x4bd368(0xf7)]),console[_0x4bd368(0x134)]('─'[_0x4bd368(0x107)](0x3c)));}for(const _0x589478 of _0x2d281e){_0x589478[_0x4bd368(0xf7)]&&(console[_0x4bd368(0x134)](_0x4bd368(0x118)+_0x589478[_0x4bd368(0x135)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x4bd368(0x134)](_0x589478[_0x4bd368(0xf7)]),console['log']('─'[_0x4bd368(0x107)](0x3c)));}for(const _0x4846b4 of _0x2c3650){_0x4846b4[_0x4bd368(0xf7)]&&(console[_0x4bd368(0x134)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x4846b4['name']+'\x27:'),console[_0x4bd368(0x134)]('─'[_0x4bd368(0x107)](0x3c)),console['log'](_0x4846b4[_0x4bd368(0xf7)]),console[_0x4bd368(0x134)]('─'[_0x4bd368(0x107)](0x3c)));}for(const _0x501db9 of _0x4f6b5b){_0x501db9[_0x4bd368(0xf7)]&&(console['log']('\x0aChanges\x20to\x20integration\x20\x27'+_0x501db9['name']+'\x27:'),console['log']('─'[_0x4bd368(0x107)](0x3c)),console[_0x4bd368(0x134)](_0x501db9[_0x4bd368(0xf7)]),console[_0x4bd368(0x134)]('─'[_0x4bd368(0x107)](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']='agent:pull';[a4_0x29d98a(0xe0)]='Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files';async['execute'](_0x160e5b){const _0x4b92fb=a4_0x29d98a,{options:_0x2a784d,args:_0x465ee6,tdx:_0x8b2ae5}=_0x160e5b,_0x20f35f=_0x465ee6[0x0],_0x134960=_0x465ee6[0x1],_0x86551f=_0x2a784d[_0x4b92fb(0xf3)],_0x3151b2=_0x2a784d[_0x4b92fb(0x174)],_0x2cdd00=_0x2a784d[_0x4b92fb(0x11d)],_0x380da8=_0x2a784d['yes'],_0x431da3=_0x2a784d[_0x4b92fb(0x16e)];let _0x1f2126,_0x1570c5;const _0x393f38=findAgentConfigPath(process[_0x4b92fb(0x168)]());if(_0x20f35f){const _0x2701dc=a4_0xadaa93[_0x4b92fb(0x125)](_0x20f35f,_0x4b92fb(0x171));if(existsSync(_0x2701dc))try{const _0x271110=JSON[_0x4b92fb(0x14b)](readFileSync(_0x2701dc,'utf-8'));_0x1f2126=_0x271110['llm_project'],_0x1570c5=_0x20f35f,console['log'](a4_0x47fabb[_0x4b92fb(0xed)](_0x4b92fb(0x111)+_0x2701dc+':\x20'+_0x1f2126));}catch{_0x1f2126=_0x20f35f;}else _0x1f2126=_0x20f35f;}else{if(_0x393f38)try{const _0x35799a=JSON[_0x4b92fb(0x14b)](readFileSync(_0x393f38,'utf-8'));_0x1f2126=_0x35799a[_0x4b92fb(0x148)],_0x1570c5=a4_0xadaa93[_0x4b92fb(0x139)](_0x393f38),console['log'](a4_0x47fabb[_0x4b92fb(0xed)](_0x4b92fb(0x116)+_0x1f2126));}catch{_0x1f2126=_0x431da3;}else _0x1f2126=_0x431da3;}if(!_0x1f2126)return console[_0x4b92fb(0x134)](a4_0x47fabb[_0x4b92fb(0x146)](_0x4b92fb(0x12a))),console[_0x4b92fb(0x134)](_0x4b92fb(0x144)),console['log'](_0x4b92fb(0x15b)),console[_0x4b92fb(0x134)](_0x4b92fb(0xfd)),console[_0x4b92fb(0x134)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20#\x20Pull\x20specific\x20agent'),0x1;if(_0x134960){const {data:_0x2f8033}=await withSpinner(_0x4b92fb(0xd7)+_0x134960+'\x22\x20from\x20project\x20\x22'+_0x1f2126+_0x4b92fb(0x11b),()=>_0x8b2ae5['llm'][_0x4b92fb(0xdd)](_0x1f2126,_0x134960,_0x86551f,{'dryRun':_0x3151b2,'force':_0x2cdd00}));if(_0x3151b2)return console[_0x4b92fb(0x134)](a4_0x47fabb[_0x4b92fb(0x146)]('Dry\x20run\x20-\x20no\x20files\x20written')),console[_0x4b92fb(0x134)](_0x4b92fb(0x110)+_0x2f8033[_0x4b92fb(0x13f)]),console['log'](_0x4b92fb(0x142)+_0x2f8033[_0x4b92fb(0x141)]),_0x2f8033[_0x4b92fb(0xf7)]&&(console['log'](_0x4b92fb(0xf2)),console[_0x4b92fb(0x134)]('─'[_0x4b92fb(0x107)](0x3c)),console[_0x4b92fb(0x134)](_0x2f8033[_0x4b92fb(0xf7)]),console['log']('─'[_0x4b92fb(0x107)](0x3c))),0x0;return console[_0x4b92fb(0x134)](a4_0x47fabb[_0x4b92fb(0x150)]('Agent\x20pulled\x20successfully')),console[_0x4b92fb(0x134)]('Agent:\x20'+_0x2f8033[_0x4b92fb(0x13f)]),console[_0x4b92fb(0x134)]('Output:\x20'+_0x2f8033['outputPath']),console['log'](_0x4b92fb(0xee)+(_0x2f8033[_0x4b92fb(0x138)]?a4_0x47fabb[_0x4b92fb(0x150)]('new'):_0x2f8033[_0x4b92fb(0xf6)]?a4_0x47fabb['yellow'](_0x4b92fb(0x10d)):a4_0x47fabb['gray'](_0x4b92fb(0x145)))),0x0;}const _0x4c6a2b=_0x1570c5||_0x86551f,{data:_0x16c897}=await withSpinner('Analyzing\x20project\x20\x22'+_0x1f2126+_0x4b92fb(0x11b),()=>_0x8b2ae5[_0x4b92fb(0x12e)][_0x4b92fb(0x115)](_0x1f2126,_0x4c6a2b,{'dryRun':!![]})),_0x24da45=_0x16c897[_0x4b92fb(0x16b)]['agents']['new']+_0x16c897['counts']['knowledgeBases'][_0x4b92fb(0x10b)]+_0x16c897[_0x4b92fb(0x16b)]['textKnowledgeBases'][_0x4b92fb(0x10b)]+_0x16c897[_0x4b92fb(0x16b)]['prompts']['new']+_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0xd8)][_0x4b92fb(0x10b)],_0x12934b=_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0x117)][_0x4b92fb(0x10d)]+_0x16c897['counts']['knowledgeBases'][_0x4b92fb(0x10d)]+_0x16c897[_0x4b92fb(0x16b)]['textKnowledgeBases'][_0x4b92fb(0x10d)]+_0x16c897['counts'][_0x4b92fb(0x157)]['updated']+_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0xd8)][_0x4b92fb(0x10d)],_0x2a6c89=_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0x117)][_0x4b92fb(0x145)]+_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0x15f)]['unchanged']+_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0xe7)][_0x4b92fb(0x145)]+_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0x157)][_0x4b92fb(0x145)]+_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0xd8)][_0x4b92fb(0x145)];console[_0x4b92fb(0x134)]('\x0aPull\x20summary\x20for\x20\x27'+_0x16c897[_0x4b92fb(0x10e)]+'\x27:'),console[_0x4b92fb(0x134)]('\x20\x20'+a4_0x47fabb[_0x4b92fb(0x150)]('+\x20'+_0x24da45+'\x20new')+'\x20|\x20'+a4_0x47fabb[_0x4b92fb(0x146)]('~\x20'+_0x12934b+_0x4b92fb(0x106))+'\x20|\x20'+a4_0x47fabb[_0x4b92fb(0xed)]('=\x20'+_0x2a6c89+_0x4b92fb(0xd9))),console['log'](_0x4b92fb(0xfe)+formatCountSummary(_0x16c897[_0x4b92fb(0x16b)]['agents'])),console[_0x4b92fb(0x134)](_0x4b92fb(0x159)+formatCountSummary(_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0x15f)])),console[_0x4b92fb(0x134)](_0x4b92fb(0xff)+formatCountSummary(_0x16c897[_0x4b92fb(0x16b)]['textKnowledgeBases'])),console['log']('\x20\x20Prompts:\x20'+formatCountSummary(_0x16c897['counts']['prompts'])),console['log'](_0x4b92fb(0x11a)+formatCountSummary(_0x16c897[_0x4b92fb(0x16b)][_0x4b92fb(0xd8)])),console['log'](_0x4b92fb(0x158)+a4_0x47fabb[_0x4b92fb(0x14c)](_0x16c897[_0x4b92fb(0xfb)])),displayDiffs(_0x16c897[_0x4b92fb(0x117)],_0x16c897['knowledgeBases'],_0x16c897[_0x4b92fb(0xe7)],_0x16c897[_0x4b92fb(0x157)],_0x16c897[_0x4b92fb(0xd8)]);if(_0x3151b2)return console[_0x4b92fb(0x134)](a4_0x47fabb['yellow'](_0x4b92fb(0x12f))),0x0;if(_0x24da45===0x0&&_0x12934b===0x0)return console[_0x4b92fb(0x134)](a4_0x47fabb[_0x4b92fb(0x150)](_0x4b92fb(0x114))),saveSessionContext({'llm_project':_0x16c897[_0x4b92fb(0x10e)]},_0x2a784d['session']),console[_0x4b92fb(0x134)](a4_0x47fabb[_0x4b92fb(0x150)](_0x4b92fb(0xe6)+a4_0x47fabb['dim'](_0x4b92fb(0x148))+_0x4b92fb(0xd5)+a4_0x47fabb[_0x4b92fb(0x14c)](_0x16c897['projectName']))),0x0;if(!_0x380da8&&!_0x2cdd00){const _0x58d33e=await confirmKey(_0x4b92fb(0xe1)+(_0x24da45+_0x12934b)+'\x20files?');if(!_0x58d33e)return console[_0x4b92fb(0x134)]('Pull\x20cancelled'),0x0;}const {data:_0x57f917}=await withSpinner(_0x4b92fb(0x105),()=>_0x8b2ae5['llm'][_0x4b92fb(0x115)](_0x1f2126,_0x4c6a2b,{'force':_0x2cdd00}));return console[_0x4b92fb(0x134)](a4_0x47fabb['green'](_0x4b92fb(0x15d)+(_0x24da45+_0x12934b)+'\x20files\x20to\x20'+_0x57f917[_0x4b92fb(0xfb)])),saveSessionContext({'llm_project':_0x57f917['projectName']},_0x2a784d[_0x4b92fb(0x15e)]),console[_0x4b92fb(0x134)](a4_0x47fabb[_0x4b92fb(0x150)](_0x4b92fb(0xe6)+a4_0x47fabb['dim']('llm_project')+_0x4b92fb(0xd5)+a4_0x47fabb[_0x4b92fb(0x14c)](_0x57f917[_0x4b92fb(0x10e)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x29d98a(0x135)]=a4_0x29d98a(0x13b);[a4_0x29d98a(0xe0)]=a4_0x29d98a(0x165);async[a4_0x29d98a(0xf1)](_0x464830){const _0x5bd1c1=a4_0x29d98a,{options:_0x5f5cb4,args:_0x2b52b6,tdx:_0x49e14e}=_0x464830,_0x55404e=_0x2b52b6[0x0],_0x3ddc81=_0x5f5cb4[_0x5bd1c1(0x135)],_0x4bd4f7=_0x5f5cb4[_0x5bd1c1(0x174)],_0x16c743=_0x5f5cb4['yes'],_0x681ace=_0x5f5cb4['site'],_0xea1a00=_0x5f5cb4[_0x5bd1c1(0x16e)];let _0x2e8625;const _0x41b75a=findAgentConfigPath(process[_0x5bd1c1(0x168)]());if(_0x55404e){const _0x310657=a4_0xadaa93[_0x5bd1c1(0x125)](_0x55404e,_0x5bd1c1(0x171));existsSync(_0x310657)?(_0x2e8625=_0x55404e,console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0xed)](_0x5bd1c1(0xef)+_0x55404e))):_0x2e8625=_0x55404e;}else{if(_0x41b75a)_0x2e8625=a4_0xadaa93['dirname'](_0x41b75a),console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0xed)](_0x5bd1c1(0x10f)+_0x2e8625));else{if(_0xea1a00){const _0x547055=sanitizeForFilesystem(_0xea1a00);let _0x3b99e9=_0x547055,_0x36695c=a4_0xadaa93['join'](process['cwd'](),_0x5bd1c1(0x117),_0x547055,_0x5bd1c1(0x171));if(!existsSync(_0x36695c)){const _0x13c8f3=normalizeName(_0xea1a00),_0x5c08fa=a4_0xadaa93[_0x5bd1c1(0x125)](process[_0x5bd1c1(0x168)](),_0x5bd1c1(0x117),_0x13c8f3,_0x5bd1c1(0x171));existsSync(_0x5c08fa)&&(_0x3b99e9=_0x13c8f3,_0x36695c=_0x5c08fa);}if(existsSync(_0x36695c))_0x2e8625=a4_0xadaa93[_0x5bd1c1(0x139)](_0x36695c),console['log'](a4_0x47fabb['dim'](_0x5bd1c1(0xef)+_0x2e8625));else{const _0x75161=_0x5f5cb4[_0x5bd1c1(0x13c)];if(_0x75161)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x5bd1c1(0x16c)+_0xea1a00+_0x5bd1c1(0x137),undefined,{'helpText':_0x5bd1c1(0xfa)+'First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a'+(_0x5bd1c1(0x14f)+_0xea1a00+'\x0a')+('\x20\x20tdx\x20agent\x20clone\x20agents/'+_0x3b99e9+_0x5bd1c1(0x160)+(_0x3ddc81||'<new-name>')+_0x5bd1c1(0x12d)+_0x75161)});_0x2e8625=_0xea1a00,console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0xed)]('Using\x20context\x20project:\x20'+_0xea1a00));}}}}if(!_0x2e8625)return console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x146)](_0x5bd1c1(0x167))),console[_0x5bd1c1(0x134)](_0x5bd1c1(0x130)),console[_0x5bd1c1(0x134)](_0x5bd1c1(0x109)),console[_0x5bd1c1(0x134)]('\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)'),console[_0x5bd1c1(0x134)](_0x5bd1c1(0x127)),0x1;if(!_0x3ddc81)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x5bd1c1(0x108),undefined,{'helpText':_0x5bd1c1(0x155)});if(!_0x16c743&&!_0x4bd4f7){const _0x426890=await confirmKey(_0x5bd1c1(0x154)+_0x2e8625+_0x5bd1c1(0x121)+_0x3ddc81+'\x22?');if(!_0x426890)return console['log']('Clone\x20cancelled'),0x0;}const {data:_0x4a296d}=await withSpinner(_0x5bd1c1(0x161)+_0x2e8625+_0x5bd1c1(0x12b)+_0x3ddc81+_0x5bd1c1(0x11b),()=>_0x49e14e['llm'][_0x5bd1c1(0x15c)](_0x2e8625,_0x3ddc81,{'dryRun':_0x4bd4f7}));if(_0x4bd4f7)return console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x146)](_0x5bd1c1(0x153))),console[_0x5bd1c1(0x134)](_0x5bd1c1(0x156)+_0x4a296d['sourceProjectName']),console[_0x5bd1c1(0x134)](_0x5bd1c1(0x173)+_0x3ddc81),console['log'](_0x5bd1c1(0x133)),console[_0x5bd1c1(0x134)]('\x20\x20Agents:\x20'+_0x4a296d[_0x5bd1c1(0x16b)][_0x5bd1c1(0x117)][_0x5bd1c1(0xf5)]),console[_0x5bd1c1(0x134)](_0x5bd1c1(0x159)+_0x4a296d[_0x5bd1c1(0x16b)]['knowledgeBases'][_0x5bd1c1(0xf5)]),console[_0x5bd1c1(0x134)](_0x5bd1c1(0xe3)+_0x4a296d[_0x5bd1c1(0x16b)][_0x5bd1c1(0x157)][_0x5bd1c1(0xf5)]),0x0;const _0x203956=_0x4a296d['counts'][_0x5bd1c1(0x117)][_0x5bd1c1(0x104)]>0x0||_0x4a296d[_0x5bd1c1(0x16b)]['knowledgeBases'][_0x5bd1c1(0x104)]>0x0||_0x4a296d[_0x5bd1c1(0x16b)][_0x5bd1c1(0x157)]['errors']>0x0;_0x203956?console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x146)](_0x5bd1c1(0x10c))):console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x150)](_0x5bd1c1(0x136)));console[_0x5bd1c1(0x134)](_0x5bd1c1(0x156)+_0x4a296d['sourceProjectName']),console[_0x5bd1c1(0x134)](_0x5bd1c1(0x173)+_0x4a296d['newProjectName']),console[_0x5bd1c1(0x134)](_0x5bd1c1(0xf4)+_0x4a296d[_0x5bd1c1(0x113)]),console[_0x5bd1c1(0x134)](),console['log'](_0x5bd1c1(0xeb)),console[_0x5bd1c1(0x134)]('\x20\x20Agents:\x20'+formatCountSummary(_0x4a296d['counts'][_0x5bd1c1(0x117)])),console['log']('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4a296d[_0x5bd1c1(0x16b)][_0x5bd1c1(0x15f)])),console['log']('\x20\x20Prompts:\x20'+formatCountSummary(_0x4a296d['counts'][_0x5bd1c1(0x157)])),console['log'](_0x5bd1c1(0x11a)+formatCountSummary(_0x4a296d[_0x5bd1c1(0x16b)][_0x5bd1c1(0xd8)]));if(_0x203956){console[_0x5bd1c1(0x134)](),console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x123)](_0x5bd1c1(0x166)));for(const _0x312800 of _0x4a296d['agents']){_0x312800[_0x5bd1c1(0x16d)]==='error'&&console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x123)](_0x5bd1c1(0x11e)+_0x312800['agentName']+_0x5bd1c1(0x129)+_0x312800[_0x5bd1c1(0x131)]));}for(const _0x4c578f of _0x4a296d[_0x5bd1c1(0x15f)]){_0x4c578f[_0x5bd1c1(0x16d)]===_0x5bd1c1(0x131)&&console[_0x5bd1c1(0x134)](a4_0x47fabb['red'](_0x5bd1c1(0xe5)+_0x4c578f[_0x5bd1c1(0x135)]+_0x5bd1c1(0x129)+_0x4c578f[_0x5bd1c1(0x131)]));}for(const _0x59e6f2 of _0x4a296d[_0x5bd1c1(0x157)]){_0x59e6f2[_0x5bd1c1(0x16d)]===_0x5bd1c1(0x131)&&console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x123)]('\x20\x20Prompt\x20\x22'+_0x59e6f2['name']+'\x22:\x20'+_0x59e6f2[_0x5bd1c1(0x131)]));}for(const _0x5eb9be of _0x4a296d[_0x5bd1c1(0xd8)]){_0x5eb9be['action']===_0x5bd1c1(0x131)&&console[_0x5bd1c1(0x134)](a4_0x47fabb[_0x5bd1c1(0x123)](_0x5bd1c1(0xd6)+_0x5eb9be['name']+_0x5bd1c1(0x129)+_0x5eb9be[_0x5bd1c1(0x131)]));}return 0x1;}console['log']();const _0x1408e9=getLLMProjectUrl(_0x681ace,_0x4a296d[_0x5bd1c1(0x113)]);return console[_0x5bd1c1(0x134)](_0x5bd1c1(0xf9)+a4_0x47fabb[_0x5bd1c1(0x14c)](_0x1408e9)),0x0;}}function a4_0x4ecd(){const _0x3e7065=['reason','llm_project','\x20new','2569755KVhqXT','parse','cyan','\x27\x20to\x20create\x20the\x20folder\x20structure.','message','\x20\x20tdx\x20agent\x20pull\x20','green','19152xCKEAZ','100674gGbeMT','Dry\x20run\x20-\x20no\x20changes\x20made','Clone\x20\x22','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','Source:\x20','prompts','\x20\x20Target:\x20','\x20\x20Knowledge\x20Bases:\x20','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','cloneProject','\x0a✔\x20Pulled\x20','session','knowledgeBases','\x20--name\x20','Cloning\x20\x22','4265634iDaPIM','agentId','Chat:\x20','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','Errors:','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','cwd','gray','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','counts','Cannot\x20clone\x20from\x20context\x20project\x20\x22','action','llmProject','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','\x20successfully','tdx.json','Agent:\x20','New\x20project:\x20','dryRun','\x20resources?','\x20=\x20','\x20\x20Integration\x20\x22','Pulling\x20agent\x20\x22','integrations','\x20unchanged','push','INVALID_ARGUMENT','projectDir','pullAgent','projectId','\x20created','description','\x0aWrite\x20','Pushing\x20agent\x20from\x20\x22','\x20\x20Prompts:\x20','source','\x20\x20Knowledge\x20Base\x20\x22','✔\x20Context\x20set:\x20','textKnowledgeBases','Analyzing\x20changes\x20to\x20push...','\x0aPush\x20','51ETPNxH','Summary:','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','dim','Status:\x20','Using\x20local\x20project:\x20','site','execute','\x0aChanges:','output','New\x20project\x20ID:\x20','created','hasChanges','diff','\x0a✔\x20Pushed\x20','Project:\x20','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','outputDir','agent:push','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<local-dir>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20to\x20existing\x20local\x20directory','\x20\x20Agents:\x20','\x20\x20Text\x20Knowledge\x20Bases:\x20','411977BKlNYf','Would\x20push\x20agent:\x20','agent.yml','\x20total','errors','Writing\x20files...','\x20changed','repeat','New\x20project\x20name\x20is\x20required','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','Push\x20cancelled','new','Project\x20cloned\x20with\x20errors','updated','projectName','Using\x20current\x20project:\x20','Would\x20pull\x20agent:\x20','Using\x20project\x20from\x20','23810ZtVumk','newProjectId','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','pullProject','Using\x20project:\x20','agents','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','1560024gzILYk','\x20\x20Integrations:\x20','\x22...','\x20\x20Prompt\x20\x22','force','\x20\x20Agent\x20\x22','\x20resources\x20to\x20\x27','found','\x22\x20to\x20new\x20project\x20\x22','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','red','pushProject','join','\x20|\x20','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','total','\x22:\x20','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','\x22\x20to\x20\x22','Pushing\x20to\x20project...','\x20--profile\x20','llm','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','error','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','Would\x20clone:','log','name','Project\x20cloned\x20successfully','\x22\x20to\x20a\x20different\x20profile','isNew','dirname','\x20updated','agent:clone','profile','\x20errors','4hutQPn','agentName','\x0aProject\x20pushed\x20with\x20errors','outputPath','Output\x20path:\x20','747VszIbe','Usage:\x20tdx\x20agent\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)','unchanged','yellow'];a4_0x4ecd=function(){return _0x3e7065;};return a4_0x4ecd();}export class AgentPushCommand extends BaseCommand{['name']=a4_0x29d98a(0xfc);[a4_0x29d98a(0xe0)]=a4_0x29d98a(0x16f);async[a4_0x29d98a(0xf1)](_0x2eb985){const _0x804c0c=a4_0x29d98a,{options:_0xbff3cd,args:_0x336734,tdx:_0x8a41ba}=_0x2eb985;let _0x38107a=_0x336734[0x0]||process[_0x804c0c(0x168)]();const _0x7c3040=_0xbff3cd['dryRun'],_0x5b4ba8=_0xbff3cd[_0x804c0c(0x11d)],_0x151e02=_0xbff3cd['yes'],_0x467a31=_0xbff3cd[_0x804c0c(0xf0)],_0x1285c2=a4_0xadaa93['join'](_0x38107a,_0x804c0c(0x102)),_0x54a988=existsSync(_0x1285c2);if(_0x54a988){const {data:_0x7b4b09}=await withSpinner(_0x804c0c(0xe2)+_0x38107a+'\x22...',()=>_0x8a41ba[_0x804c0c(0x12e)]['pushAgent'](_0x38107a,{'dryRun':_0x7c3040,'force':_0x5b4ba8}));if(_0x7c3040)return console['log'](a4_0x47fabb[_0x804c0c(0x146)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x804c0c(0x134)](_0x804c0c(0x101)+_0x7b4b09[_0x804c0c(0x13f)]),0x0;if(_0x7b4b09[_0x804c0c(0x16d)]===_0x804c0c(0x131))return console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0x123)]('Failed\x20to\x20push\x20agent:\x20'+_0x7b4b09['error'])),0x1;console['log'](a4_0x47fabb['green']('Agent\x20'+_0x7b4b09[_0x804c0c(0x16d)]+_0x804c0c(0x170))),console[_0x804c0c(0x134)](_0x804c0c(0x172)+_0x7b4b09['agentName']);if(_0x7b4b09[_0x804c0c(0x163)]&&_0x7b4b09[_0x804c0c(0xde)]){const _0x57c6da=getLLMAgentChatUrl(_0x467a31,_0x7b4b09[_0x804c0c(0xde)],_0x7b4b09['agentId']);console[_0x804c0c(0x134)](_0x804c0c(0x164)+a4_0x47fabb['cyan'](_0x57c6da));}return 0x0;}const _0x578290=_0xbff3cd[_0x804c0c(0x16e)],_0x173eb7=resolveProjectFromContext(_0x38107a,_0x578290);if(_0x173eb7[_0x804c0c(0x120)])_0x38107a=_0x173eb7[_0x804c0c(0xdc)],_0x173eb7[_0x804c0c(0xe4)]==='context'&&console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0xed)](_0x804c0c(0x116)+_0x38107a));else{let _0x3214a4=_0x804c0c(0x122);_0x173eb7[_0x804c0c(0x147)]==='no_local_folder'&&(_0x3214a4=_0x173eb7[_0x804c0c(0x14e)]+_0x804c0c(0x15a)+_0x173eb7[_0x804c0c(0x16e)]+_0x804c0c(0x14d));throw new SDKError(ErrorCode[_0x804c0c(0xdb)],_0x173eb7['reason']==='no_context'?_0x173eb7[_0x804c0c(0x14e)]:'No\x20tdx.json\x20found\x20in\x20'+_0x38107a,undefined,{'helpText':_0x3214a4});}const {data:_0x1b13c7}=await withSpinner(_0x804c0c(0xe8),()=>_0x8a41ba[_0x804c0c(0x12e)][_0x804c0c(0x124)](_0x38107a,{'dryRun':!![]})),_0x334763=_0x1b13c7['counts']['agents'][_0x804c0c(0x104)]>0x0;if(_0x334763){console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0x123)]('\x0aErrors\x20found:'));for(const _0x552079 of _0x1b13c7[_0x804c0c(0x117)]){_0x552079[_0x804c0c(0x16d)]===_0x804c0c(0x131)&&console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0x123)]('\x20\x20Agent\x20\x22'+_0x552079[_0x804c0c(0x13f)]+_0x804c0c(0x129)+_0x552079['error']));}return 0x1;}const _0x1f225=_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x117)][_0x804c0c(0xf5)]+_0x1b13c7[_0x804c0c(0x16b)]['knowledgeBases'][_0x804c0c(0xf5)]+_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0xe7)][_0x804c0c(0xf5)]+_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x157)][_0x804c0c(0xf5)]+_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0xd8)][_0x804c0c(0xf5)],_0x2b886d=_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x117)][_0x804c0c(0x10d)]+_0x1b13c7['counts'][_0x804c0c(0x15f)][_0x804c0c(0x10d)]+_0x1b13c7[_0x804c0c(0x16b)]['textKnowledgeBases'][_0x804c0c(0x10d)]+_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x157)][_0x804c0c(0x10d)]+_0x1b13c7[_0x804c0c(0x16b)]['integrations'][_0x804c0c(0x10d)],_0x361863=_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x117)][_0x804c0c(0x145)]+_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x15f)][_0x804c0c(0x145)]+_0x1b13c7['counts'][_0x804c0c(0xe7)][_0x804c0c(0x145)]+_0x1b13c7['counts']['prompts']['unchanged']+_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0xd8)][_0x804c0c(0x145)];console[_0x804c0c(0x134)]('\x0aPush\x20summary\x20for\x20\x27'+_0x1b13c7[_0x804c0c(0x10e)]+'\x27:'),console['log']('\x20\x20'+a4_0x47fabb[_0x804c0c(0x150)]('+\x20'+_0x1f225+_0x804c0c(0x149))+_0x804c0c(0x126)+a4_0x47fabb[_0x804c0c(0x146)]('~\x20'+_0x2b886d+_0x804c0c(0x106))+_0x804c0c(0x126)+a4_0x47fabb[_0x804c0c(0xed)]('=\x20'+_0x361863+'\x20unchanged')),console[_0x804c0c(0x134)](_0x804c0c(0xfe)+formatCountSummary(_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x117)])),console['log'](_0x804c0c(0x159)+formatCountSummary(_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0x15f)])),console['log']('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x1b13c7[_0x804c0c(0x16b)][_0x804c0c(0xe7)])),console['log'](_0x804c0c(0xe3)+formatCountSummary(_0x1b13c7['counts']['prompts'])),console[_0x804c0c(0x134)](_0x804c0c(0x11a)+formatCountSummary(_0x1b13c7['counts'][_0x804c0c(0xd8)])),console[_0x804c0c(0x134)]('\x20\x20Source:\x20'+a4_0x47fabb[_0x804c0c(0x14c)](_0x38107a)),displayDiffs(_0x1b13c7['agents'],_0x1b13c7[_0x804c0c(0x15f)],_0x1b13c7[_0x804c0c(0xe7)],_0x1b13c7['prompts'],_0x1b13c7[_0x804c0c(0xd8)]);if(_0x7c3040)return console[_0x804c0c(0x134)](a4_0x47fabb['yellow'](_0x804c0c(0x16a))),0x0;if(_0x1f225===0x0&&_0x2b886d===0x0){console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0x150)](_0x804c0c(0x132)));const _0x4e1eb9=getLLMProjectUrl(_0x467a31,_0x1b13c7[_0x804c0c(0xde)]);return console[_0x804c0c(0x134)](_0x804c0c(0xf9)+a4_0x47fabb[_0x804c0c(0x14c)](_0x4e1eb9)),0x0;}if(!_0x151e02&&!_0x5b4ba8){const _0x10dd89=await confirmKey(_0x804c0c(0xe9)+(_0x1f225+_0x2b886d)+_0x804c0c(0x175));if(!_0x10dd89)return console['log'](_0x804c0c(0x10a)),0x0;}const {data:_0x2de9f3}=await withSpinner(_0x804c0c(0x12c),()=>_0x8a41ba['llm'][_0x804c0c(0x124)](_0x38107a,{'force':_0x5b4ba8})),_0x38ba1a=_0x2de9f3[_0x804c0c(0x16b)]['agents'][_0x804c0c(0x104)]>0x0||_0x2de9f3[_0x804c0c(0x16b)][_0x804c0c(0x15f)][_0x804c0c(0x104)]>0x0||_0x2de9f3[_0x804c0c(0x16b)][_0x804c0c(0xe7)][_0x804c0c(0x104)]>0x0||_0x2de9f3[_0x804c0c(0x16b)][_0x804c0c(0x157)][_0x804c0c(0x104)]>0x0;if(_0x38ba1a){console['log'](a4_0x47fabb[_0x804c0c(0x146)](_0x804c0c(0x140))),console['log'](),console['log'](a4_0x47fabb[_0x804c0c(0x123)](_0x804c0c(0x166)));for(const _0x39aabd of _0x2de9f3[_0x804c0c(0x117)]){_0x39aabd['action']===_0x804c0c(0x131)&&console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0x123)](_0x804c0c(0x11e)+_0x39aabd[_0x804c0c(0x13f)]+_0x804c0c(0x129)+_0x39aabd['error']));}for(const _0x1929a2 of _0x2de9f3[_0x804c0c(0x15f)]){_0x1929a2['action']==='error'&&console['log'](a4_0x47fabb[_0x804c0c(0x123)](_0x804c0c(0xe5)+_0x1929a2['name']+_0x804c0c(0x129)+_0x1929a2[_0x804c0c(0x131)]));}for(const _0x1683da of _0x2de9f3[_0x804c0c(0xe7)]){_0x1683da[_0x804c0c(0x16d)]===_0x804c0c(0x131)&&console['log'](a4_0x47fabb[_0x804c0c(0x123)]('\x20\x20Text\x20Knowledge\x20Base\x20\x22'+_0x1683da['name']+'\x22:\x20'+_0x1683da[_0x804c0c(0x131)]));}for(const _0x35a3e4 of _0x2de9f3['prompts']){_0x35a3e4[_0x804c0c(0x16d)]===_0x804c0c(0x131)&&console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0x123)](_0x804c0c(0x11c)+_0x35a3e4[_0x804c0c(0x135)]+_0x804c0c(0x129)+_0x35a3e4[_0x804c0c(0x131)]));}for(const _0x228014 of _0x2de9f3[_0x804c0c(0xd8)]){_0x228014['action']===_0x804c0c(0x131)&&console[_0x804c0c(0x134)](a4_0x47fabb[_0x804c0c(0x123)](_0x804c0c(0xd6)+_0x228014[_0x804c0c(0x135)]+_0x804c0c(0x129)+_0x228014[_0x804c0c(0x131)]));}return 0x1;}console[_0x804c0c(0x134)](a4_0x47fabb['green'](_0x804c0c(0xf8)+(_0x1f225+_0x2b886d)+_0x804c0c(0x11f)+_0x2de9f3[_0x804c0c(0x10e)]+'\x27'));const _0x1d2834=getLLMProjectUrl(_0x467a31,_0x2de9f3[_0x804c0c(0xde)]);return console[_0x804c0c(0x134)]('Project:\x20'+a4_0x47fabb[_0x804c0c(0x14c)](_0x1d2834)),0x0;}}
|
|
1
|
+
const a4_0x54bd28=a4_0x81e0;(function(_0xa8879f,_0x5de90a){const _0x507932=a4_0x81e0,_0x242d76=_0xa8879f();while(!![]){try{const _0x10fddc=-parseInt(_0x507932(0x1a6))/0x1*(parseInt(_0x507932(0x1c1))/0x2)+-parseInt(_0x507932(0x1c8))/0x3+parseInt(_0x507932(0x19a))/0x4*(parseInt(_0x507932(0x1ac))/0x5)+parseInt(_0x507932(0x190))/0x6*(-parseInt(_0x507932(0x17c))/0x7)+-parseInt(_0x507932(0x197))/0x8*(-parseInt(_0x507932(0x1f5))/0x9)+-parseInt(_0x507932(0x158))/0xa+-parseInt(_0x507932(0x1dc))/0xb*(-parseInt(_0x507932(0x182))/0xc);if(_0x10fddc===_0x5de90a)break;else _0x242d76['push'](_0x242d76['shift']());}catch(_0x4a96bd){_0x242d76['push'](_0x242d76['shift']());}}}(a4_0xb79f,0x50223));import a4_0x37639f from'chalk';import a4_0x3c5bed from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x5bc836){const _0x5b57f3=a4_0x81e0,_0x16e85b=[];if(_0x5bc836[_0x5b57f3(0x170)]!==undefined)_0x16e85b['push'](_0x5bc836['total']+_0x5b57f3(0x1bb));if(_0x5bc836[_0x5b57f3(0x151)]!==undefined&&_0x5bc836['new']>0x0)_0x16e85b[_0x5b57f3(0x18b)](a4_0x37639f[_0x5b57f3(0x19c)](_0x5bc836['new']+_0x5b57f3(0x1d2)));if(_0x5bc836[_0x5b57f3(0x176)]!==undefined&&_0x5bc836['created']>0x0)_0x16e85b['push'](a4_0x37639f[_0x5b57f3(0x19c)](_0x5bc836[_0x5b57f3(0x176)]+_0x5b57f3(0x1f6)));if(_0x5bc836[_0x5b57f3(0x17f)]!==undefined&&_0x5bc836['updated']>0x0)_0x16e85b[_0x5b57f3(0x18b)](a4_0x37639f[_0x5b57f3(0x19d)](_0x5bc836[_0x5b57f3(0x17f)]+_0x5b57f3(0x1ae)));if(_0x5bc836[_0x5b57f3(0x1b2)]!==undefined&&_0x5bc836[_0x5b57f3(0x1b2)]>0x0)_0x16e85b[_0x5b57f3(0x18b)](a4_0x37639f['gray'](_0x5bc836['unchanged']+_0x5b57f3(0x1a3)));if(_0x5bc836[_0x5b57f3(0x1c2)]!==undefined&&_0x5bc836[_0x5b57f3(0x1c2)]>0x0)_0x16e85b[_0x5b57f3(0x18b)](a4_0x37639f['red'](_0x5bc836[_0x5b57f3(0x1c2)]+_0x5b57f3(0x1ed)));return _0x16e85b['join'](',\x20');}function displayDiffs(_0x40b059,_0x413ebb,_0x5c9bb3,_0x175617,_0x4c83b7=[]){const _0xf8d47c=a4_0x81e0;for(const _0x3ebffd of _0x40b059){if(_0x3ebffd[_0xf8d47c(0x15a)]){const _0x2f96fa=_0x3ebffd[_0xf8d47c(0x19f)]||_0x3ebffd[_0xf8d47c(0x16e)];console[_0xf8d47c(0x1c4)](_0xf8d47c(0x195)+_0x2f96fa+'\x27:'),console[_0xf8d47c(0x1c4)]('─'[_0xf8d47c(0x17e)](0x3c)),console[_0xf8d47c(0x1c4)](_0x3ebffd[_0xf8d47c(0x15a)]),console['log']('─'[_0xf8d47c(0x17e)](0x3c));}}for(const _0x5d3795 of _0x413ebb){_0x5d3795['diff']&&(console['log'](_0xf8d47c(0x193)+_0x5d3795[_0xf8d47c(0x16e)]+'\x27:'),console[_0xf8d47c(0x1c4)]('─'['repeat'](0x3c)),console[_0xf8d47c(0x1c4)](_0x5d3795[_0xf8d47c(0x15a)]),console[_0xf8d47c(0x1c4)]('─'[_0xf8d47c(0x17e)](0x3c)));}for(const _0x3419b7 of _0x5c9bb3){_0x3419b7[_0xf8d47c(0x15a)]&&(console[_0xf8d47c(0x1c4)](_0xf8d47c(0x1d6)+_0x3419b7[_0xf8d47c(0x16e)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0xf8d47c(0x1c4)](_0x3419b7[_0xf8d47c(0x15a)]),console[_0xf8d47c(0x1c4)]('─'[_0xf8d47c(0x17e)](0x3c)));}for(const _0x47f235 of _0x175617){_0x47f235[_0xf8d47c(0x15a)]&&(console[_0xf8d47c(0x1c4)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x47f235['name']+'\x27:'),console[_0xf8d47c(0x1c4)]('─'[_0xf8d47c(0x17e)](0x3c)),console[_0xf8d47c(0x1c4)](_0x47f235[_0xf8d47c(0x15a)]),console[_0xf8d47c(0x1c4)]('─'[_0xf8d47c(0x17e)](0x3c)));}for(const _0x52a0f9 of _0x4c83b7){_0x52a0f9['diff']&&(console['log'](_0xf8d47c(0x1e3)+_0x52a0f9[_0xf8d47c(0x16e)]+'\x27:'),console[_0xf8d47c(0x1c4)]('─'[_0xf8d47c(0x17e)](0x3c)),console[_0xf8d47c(0x1c4)](_0x52a0f9[_0xf8d47c(0x15a)]),console[_0xf8d47c(0x1c4)]('─'['repeat'](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x54bd28(0x16e)]=a4_0x54bd28(0x1a0);[a4_0x54bd28(0x1f0)]=a4_0x54bd28(0x17d);async[a4_0x54bd28(0x169)](_0x1077a7){const _0x3e9e65=a4_0x54bd28,{options:_0x1ae33c,args:_0x3dcef2,tdx:_0x2e8da9}=_0x1077a7,_0x2e37c2=_0x3dcef2[0x0],_0x11eef1=_0x3dcef2[0x1],_0x26f627=_0x1ae33c['output'],_0x6085a6=_0x1ae33c[_0x3e9e65(0x1e9)],_0x4ee12e=_0x1ae33c['force'],_0x75dae5=_0x1ae33c[_0x3e9e65(0x15d)],_0xe8b777=_0x1ae33c[_0x3e9e65(0x1db)];let _0x259815,_0x49c200;const _0x10fed2=findAgentConfigPath(process['cwd']());if(_0x2e37c2){const _0x2a477a=a4_0x3c5bed[_0x3e9e65(0x1d0)](_0x2e37c2,'tdx.json');if(existsSync(_0x2a477a))try{const _0x599cb0=JSON['parse'](readFileSync(_0x2a477a,_0x3e9e65(0x185)));_0x259815=_0x599cb0[_0x3e9e65(0x1a8)],_0x49c200=_0x2e37c2,console[_0x3e9e65(0x1c4)](a4_0x37639f[_0x3e9e65(0x1e0)]('Using\x20project\x20from\x20'+_0x2a477a+':\x20'+_0x259815));}catch{_0x259815=_0x2e37c2;}else _0x259815=_0x2e37c2;}else{if(_0x10fed2)try{const _0x3442e0=JSON['parse'](readFileSync(_0x10fed2,_0x3e9e65(0x185)));_0x259815=_0x3442e0[_0x3e9e65(0x1a8)],_0x49c200=a4_0x3c5bed[_0x3e9e65(0x1b7)](_0x10fed2),console['log'](a4_0x37639f[_0x3e9e65(0x1e0)]('Using\x20project:\x20'+_0x259815));}catch{_0x259815=_0xe8b777;}else _0x259815=_0xe8b777;}if(!_0x259815)return console[_0x3e9e65(0x1c4)](a4_0x37639f[_0x3e9e65(0x19d)](_0x3e9e65(0x178))),console['log']('Usage:\x20tdx\x20agent\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x1e4)),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x1bc)),console[_0x3e9e65(0x1c4)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20#\x20Pull\x20specific\x20agent'),0x1;if(_0x11eef1){const {data:_0x235c8d}=await withSpinner(_0x3e9e65(0x1d5)+_0x11eef1+'\x22\x20from\x20project\x20\x22'+_0x259815+_0x3e9e65(0x188),()=>_0x2e8da9[_0x3e9e65(0x194)][_0x3e9e65(0x1e2)](_0x259815,_0x11eef1,_0x26f627,{'dryRun':_0x6085a6,'force':_0x4ee12e}));if(_0x6085a6)return console[_0x3e9e65(0x1c4)](a4_0x37639f[_0x3e9e65(0x19d)](_0x3e9e65(0x157))),console['log'](_0x3e9e65(0x173)+_0x235c8d[_0x3e9e65(0x19f)]),console[_0x3e9e65(0x1c4)]('Output\x20path:\x20'+_0x235c8d['outputPath']),_0x235c8d[_0x3e9e65(0x15a)]&&(console['log'](_0x3e9e65(0x1a7)),console['log']('─'[_0x3e9e65(0x17e)](0x3c)),console[_0x3e9e65(0x1c4)](_0x235c8d[_0x3e9e65(0x15a)]),console['log']('─'[_0x3e9e65(0x17e)](0x3c))),0x0;return console[_0x3e9e65(0x1c4)](a4_0x37639f[_0x3e9e65(0x19c)]('Agent\x20pulled\x20successfully')),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x1d7)+_0x235c8d[_0x3e9e65(0x19f)]),console[_0x3e9e65(0x1c4)]('Output:\x20'+_0x235c8d[_0x3e9e65(0x191)]),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x1af)+(_0x235c8d['isNew']?a4_0x37639f[_0x3e9e65(0x19c)](_0x3e9e65(0x151)):_0x235c8d['hasChanges']?a4_0x37639f[_0x3e9e65(0x19d)](_0x3e9e65(0x17f)):a4_0x37639f[_0x3e9e65(0x1f7)]('unchanged'))),0x0;}const _0x5170cd=_0x49c200||_0x26f627,{data:_0x3e3b85}=await withSpinner('Analyzing\x20project\x20\x22'+_0x259815+_0x3e9e65(0x188),()=>_0x2e8da9[_0x3e9e65(0x194)][_0x3e9e65(0x174)](_0x259815,_0x5170cd,{'dryRun':!![]})),_0x2f9644=_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x1ef)]['new']+_0x3e3b85['counts'][_0x3e9e65(0x1a2)][_0x3e9e65(0x151)]+_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x17a)][_0x3e9e65(0x151)]+_0x3e3b85[_0x3e9e65(0x1cf)]['prompts'][_0x3e9e65(0x151)]+_0x3e3b85['counts'][_0x3e9e65(0x199)]['new'],_0x1094ee=_0x3e3b85['counts'][_0x3e9e65(0x1ef)]['updated']+_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x1a2)]['updated']+_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x17a)][_0x3e9e65(0x17f)]+_0x3e3b85[_0x3e9e65(0x1cf)]['prompts'][_0x3e9e65(0x17f)]+_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x199)][_0x3e9e65(0x17f)],_0x2cbd41=_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x1ef)][_0x3e9e65(0x1b2)]+_0x3e3b85['counts'][_0x3e9e65(0x1a2)]['unchanged']+_0x3e3b85['counts'][_0x3e9e65(0x17a)]['unchanged']+_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x1cb)][_0x3e9e65(0x1b2)]+_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x199)][_0x3e9e65(0x1b2)];console['log'](_0x3e9e65(0x1d8)+_0x3e3b85['projectName']+'\x27:'),console['log']('\x20\x20'+a4_0x37639f['green']('+\x20'+_0x2f9644+_0x3e9e65(0x1d2))+_0x3e9e65(0x1b0)+a4_0x37639f[_0x3e9e65(0x19d)]('~\x20'+_0x1094ee+_0x3e9e65(0x1d3))+_0x3e9e65(0x1b0)+a4_0x37639f['dim']('=\x20'+_0x2cbd41+_0x3e9e65(0x1a3))),console['log'](_0x3e9e65(0x1ab)+formatCountSummary(_0x3e3b85['counts']['agents'])),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x160)+formatCountSummary(_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x1a2)])),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x196)+formatCountSummary(_0x3e3b85['counts']['textKnowledgeBases'])),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x1da)+formatCountSummary(_0x3e3b85[_0x3e9e65(0x1cf)][_0x3e9e65(0x1cb)])),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x152)+formatCountSummary(_0x3e3b85['counts'][_0x3e9e65(0x199)])),console[_0x3e9e65(0x1c4)](_0x3e9e65(0x192)+a4_0x37639f[_0x3e9e65(0x1c6)](_0x3e3b85['outputDir'])),displayDiffs(_0x3e3b85['agents'],_0x3e3b85['knowledgeBases'],_0x3e3b85[_0x3e9e65(0x17a)],_0x3e3b85['prompts'],_0x3e3b85[_0x3e9e65(0x199)]);if(_0x6085a6)return console[_0x3e9e65(0x1c4)](a4_0x37639f['yellow'](_0x3e9e65(0x1b8))),0x0;if(_0x2f9644===0x0&&_0x1094ee===0x0)return console[_0x3e9e65(0x1c4)](a4_0x37639f[_0x3e9e65(0x19c)](_0x3e9e65(0x155))),saveSessionContext({'llm_project':_0x3e3b85[_0x3e9e65(0x1f4)]},_0x1ae33c[_0x3e9e65(0x1c0)]),console['log'](a4_0x37639f[_0x3e9e65(0x19c)](_0x3e9e65(0x18f)+a4_0x37639f['dim'](_0x3e9e65(0x1a8))+_0x3e9e65(0x1de)+a4_0x37639f['cyan'](_0x3e3b85[_0x3e9e65(0x1f4)]))),0x0;if(!_0x75dae5&&!_0x4ee12e){const _0x99bc99=await confirmKey('\x0aWrite\x20'+(_0x2f9644+_0x1094ee)+_0x3e9e65(0x15f));if(!_0x99bc99)return console[_0x3e9e65(0x1c4)](_0x3e9e65(0x1c5)),0x0;}const {data:_0x44b9c7}=await withSpinner(_0x3e9e65(0x1bf),()=>_0x2e8da9[_0x3e9e65(0x194)][_0x3e9e65(0x174)](_0x259815,_0x5170cd,{'force':_0x4ee12e}));return console['log'](a4_0x37639f['green'](_0x3e9e65(0x16b)+(_0x2f9644+_0x1094ee)+_0x3e9e65(0x1f3)+_0x44b9c7['outputDir'])),saveSessionContext({'llm_project':_0x44b9c7[_0x3e9e65(0x1f4)]},_0x1ae33c[_0x3e9e65(0x1c0)]),console['log'](a4_0x37639f[_0x3e9e65(0x19c)]('✔\x20Context\x20set:\x20'+a4_0x37639f[_0x3e9e65(0x1e0)](_0x3e9e65(0x1a8))+_0x3e9e65(0x1de)+a4_0x37639f[_0x3e9e65(0x1c6)](_0x44b9c7['projectName']))),0x0;}}function a4_0x81e0(_0x985972,_0x4926a6){_0x985972=_0x985972-0x151;const _0xb79fe6=a4_0xb79f();let _0x81e015=_0xb79fe6[_0x985972];return _0x81e015;}export class AgentCloneCommand extends BaseCommand{['name']=a4_0x54bd28(0x1ba);[a4_0x54bd28(0x1f0)]=a4_0x54bd28(0x19b);async[a4_0x54bd28(0x169)](_0x2518bd){const _0x13120f=a4_0x54bd28,{options:_0xd55280,args:_0x5d3a9b,tdx:_0x3f4980}=_0x2518bd,_0x1cf4f4=_0x5d3a9b[0x0],_0x33b57b=_0xd55280[_0x13120f(0x16e)],_0x1ffe79=_0xd55280['dryRun'],_0x383819=_0xd55280['yes'],_0xae05d2=_0xd55280[_0x13120f(0x18e)],_0x48afe7=_0xd55280['llmProject'];let _0x2d315d;const _0x3c3934=findAgentConfigPath(process['cwd']());if(_0x1cf4f4){const _0x3f53d3=a4_0x3c5bed[_0x13120f(0x1d0)](_0x1cf4f4,_0x13120f(0x1d4));existsSync(_0x3f53d3)?(_0x2d315d=_0x1cf4f4,console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x1e0)](_0x13120f(0x171)+_0x1cf4f4))):_0x2d315d=_0x1cf4f4;}else{if(_0x3c3934)_0x2d315d=a4_0x3c5bed[_0x13120f(0x1b7)](_0x3c3934),console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x1e0)](_0x13120f(0x1f1)+_0x2d315d));else{if(_0x48afe7){const _0xaaadb6=sanitizeForFilesystem(_0x48afe7);let _0x506cf3=_0xaaadb6,_0x40fa4e=a4_0x3c5bed[_0x13120f(0x1d0)](process[_0x13120f(0x175)](),'agents',_0xaaadb6,_0x13120f(0x1d4));if(!existsSync(_0x40fa4e)){const _0x51276a=normalizeName(_0x48afe7),_0x55c2d5=a4_0x3c5bed[_0x13120f(0x1d0)](process['cwd'](),_0x13120f(0x1ef),_0x51276a,_0x13120f(0x1d4));existsSync(_0x55c2d5)&&(_0x506cf3=_0x51276a,_0x40fa4e=_0x55c2d5);}if(existsSync(_0x40fa4e))_0x2d315d=a4_0x3c5bed[_0x13120f(0x1b7)](_0x40fa4e),console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x1e0)](_0x13120f(0x171)+_0x2d315d));else{const _0x1cc98f=_0xd55280[_0x13120f(0x15c)];if(_0x1cc98f)throw new SDKError(ErrorCode[_0x13120f(0x167)],_0x13120f(0x1d1)+_0x48afe7+_0x13120f(0x15e),undefined,{'helpText':_0x13120f(0x1e8)+_0x13120f(0x1eb)+('\x20\x20tdx\x20agent\x20pull\x20'+_0x48afe7+'\x0a')+(_0x13120f(0x1f9)+_0x506cf3+_0x13120f(0x18c)+(_0x33b57b||_0x13120f(0x1e1))+_0x13120f(0x19e)+_0x1cc98f)});_0x2d315d=_0x48afe7,console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x1e0)](_0x13120f(0x1a9)+_0x48afe7));}}}}if(!_0x2d315d)return console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x19d)](_0x13120f(0x166))),console[_0x13120f(0x1c4)](_0x13120f(0x180)),console[_0x13120f(0x1c4)](_0x13120f(0x1e7)),console[_0x13120f(0x1c4)](_0x13120f(0x16a)),console['log'](_0x13120f(0x1ca)),0x1;if(!_0x33b57b)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x13120f(0x1b1),undefined,{'helpText':_0x13120f(0x172)});if(!_0x383819&&!_0x1ffe79){const _0x349c82=await confirmKey(_0x13120f(0x1df)+_0x2d315d+_0x13120f(0x1d9)+_0x33b57b+'\x22?');if(!_0x349c82)return console[_0x13120f(0x1c4)](_0x13120f(0x1b4)),0x0;}const {data:_0x40ea44}=await withSpinner('Cloning\x20\x22'+_0x2d315d+_0x13120f(0x181)+_0x33b57b+'\x22...',()=>_0x3f4980['llm'][_0x13120f(0x189)](_0x2d315d,_0x33b57b,{'dryRun':_0x1ffe79}));if(_0x1ffe79)return console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x19d)](_0x13120f(0x183))),console['log'](_0x13120f(0x154)+_0x40ea44[_0x13120f(0x177)]),console[_0x13120f(0x1c4)](_0x13120f(0x16c)+_0x33b57b),console['log'](_0x13120f(0x184)),console[_0x13120f(0x1c4)]('\x20\x20Agents:\x20'+_0x40ea44['counts']['agents'][_0x13120f(0x176)]),console[_0x13120f(0x1c4)](_0x13120f(0x160)+_0x40ea44[_0x13120f(0x1cf)]['knowledgeBases'][_0x13120f(0x176)]),console[_0x13120f(0x1c4)](_0x13120f(0x1da)+_0x40ea44[_0x13120f(0x1cf)][_0x13120f(0x1cb)]['created']),0x0;const _0x5ce306=_0x40ea44['counts'][_0x13120f(0x1ef)][_0x13120f(0x1c2)]>0x0||_0x40ea44[_0x13120f(0x1cf)][_0x13120f(0x1a2)][_0x13120f(0x1c2)]>0x0||_0x40ea44[_0x13120f(0x1cf)][_0x13120f(0x1cb)][_0x13120f(0x1c2)]>0x0;_0x5ce306?console['log'](a4_0x37639f['yellow'](_0x13120f(0x1aa))):console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x19c)]('Project\x20cloned\x20successfully'));console[_0x13120f(0x1c4)]('Source:\x20'+_0x40ea44[_0x13120f(0x177)]),console['log'](_0x13120f(0x16c)+_0x40ea44['newProjectName']),console[_0x13120f(0x1c4)](_0x13120f(0x1c3)+_0x40ea44['newProjectId']),console[_0x13120f(0x1c4)](),console['log'](_0x13120f(0x1dd)),console[_0x13120f(0x1c4)](_0x13120f(0x1ab)+formatCountSummary(_0x40ea44[_0x13120f(0x1cf)][_0x13120f(0x1ef)])),console[_0x13120f(0x1c4)](_0x13120f(0x160)+formatCountSummary(_0x40ea44[_0x13120f(0x1cf)][_0x13120f(0x1a2)])),console[_0x13120f(0x1c4)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x40ea44[_0x13120f(0x1cf)][_0x13120f(0x1cb)])),console[_0x13120f(0x1c4)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x40ea44[_0x13120f(0x1cf)][_0x13120f(0x199)]));if(_0x5ce306){console[_0x13120f(0x1c4)](),console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x1ea)]('Errors:'));for(const _0x401f05 of _0x40ea44['agents']){_0x401f05[_0x13120f(0x1b6)]===_0x13120f(0x198)&&console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x1ea)](_0x13120f(0x1cd)+_0x401f05['agentName']+_0x13120f(0x164)+_0x401f05[_0x13120f(0x198)]));}for(const _0x1006f5 of _0x40ea44[_0x13120f(0x1a2)]){_0x1006f5['action']===_0x13120f(0x198)&&console[_0x13120f(0x1c4)](a4_0x37639f['red'](_0x13120f(0x1c9)+_0x1006f5[_0x13120f(0x16e)]+_0x13120f(0x164)+_0x1006f5[_0x13120f(0x198)]));}for(const _0x2ea532 of _0x40ea44[_0x13120f(0x1cb)]){_0x2ea532['action']==='error'&&console[_0x13120f(0x1c4)](a4_0x37639f['red']('\x20\x20Prompt\x20\x22'+_0x2ea532[_0x13120f(0x16e)]+'\x22:\x20'+_0x2ea532[_0x13120f(0x198)]));}for(const _0x51e19b of _0x40ea44['integrations']){_0x51e19b[_0x13120f(0x1b6)]==='error'&&console[_0x13120f(0x1c4)](a4_0x37639f[_0x13120f(0x1ea)](_0x13120f(0x1f8)+_0x51e19b[_0x13120f(0x16e)]+'\x22:\x20'+_0x51e19b['error']));}return 0x1;}console[_0x13120f(0x1c4)]();const _0x504458=getLLMProjectUrl(_0xae05d2,_0x40ea44[_0x13120f(0x1cc)]);return console[_0x13120f(0x1c4)](_0x13120f(0x161)+a4_0x37639f[_0x13120f(0x1c6)](_0x504458)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']=a4_0x54bd28(0x1ee);[a4_0x54bd28(0x1f0)]=a4_0x54bd28(0x17b);async[a4_0x54bd28(0x169)](_0x9aafaa){const _0x49efe5=a4_0x54bd28,{options:_0xca23b6,args:_0x217c81,tdx:_0x55cb9d}=_0x9aafaa;let _0x51ef86=_0x217c81[0x0]||process[_0x49efe5(0x175)]();const _0x34d438=_0xca23b6['dryRun'],_0x27b15d=_0xca23b6['force'],_0x42efaf=_0xca23b6['yes'],_0x3e2c4b=_0xca23b6['site'],_0x1f9c3e=a4_0x3c5bed[_0x49efe5(0x1d0)](_0x51ef86,_0x49efe5(0x187)),_0x46556f=existsSync(_0x1f9c3e);if(_0x46556f){const {data:_0x1827f1}=await withSpinner(_0x49efe5(0x1e6)+_0x51ef86+_0x49efe5(0x188),()=>_0x55cb9d[_0x49efe5(0x194)][_0x49efe5(0x179)](_0x51ef86,{'dryRun':_0x34d438,'force':_0x27b15d}));if(_0x34d438)return console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x19d)](_0x49efe5(0x183))),console[_0x49efe5(0x1c4)](_0x49efe5(0x16d)+_0x1827f1[_0x49efe5(0x19f)]),0x0;if(_0x1827f1[_0x49efe5(0x1b6)]===_0x49efe5(0x198))return console['log'](a4_0x37639f[_0x49efe5(0x1ea)](_0x49efe5(0x163)+_0x1827f1[_0x49efe5(0x198)])),0x1;console[_0x49efe5(0x1c4)](a4_0x37639f['green']('Agent\x20'+_0x1827f1[_0x49efe5(0x1b6)]+_0x49efe5(0x18a))),console[_0x49efe5(0x1c4)](_0x49efe5(0x1d7)+_0x1827f1[_0x49efe5(0x19f)]);if(_0x1827f1[_0x49efe5(0x1ec)]&&_0x1827f1[_0x49efe5(0x1a1)]){const _0x1b8a6f=getLLMAgentChatUrl(_0x3e2c4b,_0x1827f1[_0x49efe5(0x1a1)],_0x1827f1[_0x49efe5(0x1ec)]);console[_0x49efe5(0x1c4)](_0x49efe5(0x1be)+a4_0x37639f['cyan'](_0x1b8a6f));}return 0x0;}const _0x2d07aa=_0xca23b6[_0x49efe5(0x1db)],_0xf23c94=resolveProjectFromContext(_0x51ef86,_0x2d07aa);if(_0xf23c94['found'])_0x51ef86=_0xf23c94['projectDir'],_0xf23c94[_0x49efe5(0x156)]===_0x49efe5(0x153)&&console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1e0)]('Using\x20project:\x20'+_0x51ef86));else{let _0x3b28a4=_0x49efe5(0x16f);_0xf23c94[_0x49efe5(0x1b9)]===_0x49efe5(0x18d)&&(_0x3b28a4=_0xf23c94[_0x49efe5(0x1ce)]+_0x49efe5(0x162)+_0xf23c94[_0x49efe5(0x1db)]+_0x49efe5(0x168));throw new SDKError(ErrorCode[_0x49efe5(0x167)],_0xf23c94[_0x49efe5(0x1b9)]===_0x49efe5(0x1ad)?_0xf23c94[_0x49efe5(0x1ce)]:_0x49efe5(0x1e5)+_0x51ef86,undefined,{'helpText':_0x3b28a4});}const {data:_0x18ae39}=await withSpinner(_0x49efe5(0x1b3),()=>_0x55cb9d['llm']['pushProject'](_0x51ef86,{'dryRun':!![]})),_0x4f5d6f=_0x18ae39[_0x49efe5(0x1cf)]['agents'][_0x49efe5(0x1c2)]>0x0;if(_0x4f5d6f){console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1ea)](_0x49efe5(0x186)));for(const _0x30f986 of _0x18ae39[_0x49efe5(0x1ef)]){_0x30f986[_0x49efe5(0x1b6)]===_0x49efe5(0x198)&&console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1ea)]('\x20\x20Agent\x20\x22'+_0x30f986[_0x49efe5(0x19f)]+_0x49efe5(0x164)+_0x30f986[_0x49efe5(0x198)]));}return 0x1;}const _0x16b640=_0x18ae39['counts'][_0x49efe5(0x1ef)][_0x49efe5(0x176)]+_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x1a2)]['created']+_0x18ae39[_0x49efe5(0x1cf)]['textKnowledgeBases'][_0x49efe5(0x176)]+_0x18ae39[_0x49efe5(0x1cf)]['prompts']['created']+_0x18ae39['counts'][_0x49efe5(0x199)][_0x49efe5(0x176)],_0x4a4542=_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x1ef)][_0x49efe5(0x17f)]+_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x1a2)][_0x49efe5(0x17f)]+_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x17a)][_0x49efe5(0x17f)]+_0x18ae39['counts'][_0x49efe5(0x1cb)][_0x49efe5(0x17f)]+_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x199)][_0x49efe5(0x17f)],_0x25bc44=_0x18ae39['counts'][_0x49efe5(0x1ef)][_0x49efe5(0x1b2)]+_0x18ae39['counts'][_0x49efe5(0x1a2)][_0x49efe5(0x1b2)]+_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x17a)]['unchanged']+_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x1cb)][_0x49efe5(0x1b2)]+_0x18ae39['counts'][_0x49efe5(0x199)][_0x49efe5(0x1b2)];console[_0x49efe5(0x1c4)]('\x0aPush\x20summary\x20for\x20\x27'+_0x18ae39[_0x49efe5(0x1f4)]+'\x27:'),console['log']('\x20\x20'+a4_0x37639f[_0x49efe5(0x19c)]('+\x20'+_0x16b640+'\x20new')+_0x49efe5(0x1b0)+a4_0x37639f[_0x49efe5(0x19d)]('~\x20'+_0x4a4542+_0x49efe5(0x1d3))+_0x49efe5(0x1b0)+a4_0x37639f[_0x49efe5(0x1e0)]('=\x20'+_0x25bc44+_0x49efe5(0x1a3))),console[_0x49efe5(0x1c4)](_0x49efe5(0x1ab)+formatCountSummary(_0x18ae39['counts']['agents'])),console[_0x49efe5(0x1c4)](_0x49efe5(0x160)+formatCountSummary(_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x1a2)])),console['log'](_0x49efe5(0x196)+formatCountSummary(_0x18ae39[_0x49efe5(0x1cf)][_0x49efe5(0x17a)])),console[_0x49efe5(0x1c4)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x18ae39['counts'][_0x49efe5(0x1cb)])),console[_0x49efe5(0x1c4)](_0x49efe5(0x152)+formatCountSummary(_0x18ae39[_0x49efe5(0x1cf)]['integrations'])),console[_0x49efe5(0x1c4)](_0x49efe5(0x159)+a4_0x37639f[_0x49efe5(0x1c6)](_0x51ef86)),displayDiffs(_0x18ae39[_0x49efe5(0x1ef)],_0x18ae39[_0x49efe5(0x1a2)],_0x18ae39['textKnowledgeBases'],_0x18ae39[_0x49efe5(0x1cb)],_0x18ae39[_0x49efe5(0x199)]);if(_0x34d438)return console['log'](a4_0x37639f['yellow']('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed')),0x0;if(_0x16b640===0x0&&_0x4a4542===0x0){console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x19c)]('\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date'));const _0x361159=getLLMProjectUrl(_0x3e2c4b,_0x18ae39[_0x49efe5(0x1a1)]);return console['log'](_0x49efe5(0x161)+a4_0x37639f[_0x49efe5(0x1c6)](_0x361159)),0x0;}if(!_0x42efaf&&!_0x27b15d){const _0x7e5d75=await confirmKey('\x0aPush\x20'+(_0x16b640+_0x4a4542)+_0x49efe5(0x1a4));if(!_0x7e5d75)return console[_0x49efe5(0x1c4)](_0x49efe5(0x1c7)),0x0;}const {data:_0x16f042}=await withSpinner('Pushing\x20to\x20project...',()=>_0x55cb9d['llm'][_0x49efe5(0x1b5)](_0x51ef86,{'force':_0x27b15d})),_0x2022bd=_0x16f042[_0x49efe5(0x1cf)][_0x49efe5(0x1ef)][_0x49efe5(0x1c2)]>0x0||_0x16f042[_0x49efe5(0x1cf)]['knowledgeBases'][_0x49efe5(0x1c2)]>0x0||_0x16f042['counts'][_0x49efe5(0x17a)][_0x49efe5(0x1c2)]>0x0||_0x16f042[_0x49efe5(0x1cf)][_0x49efe5(0x1cb)][_0x49efe5(0x1c2)]>0x0;if(_0x2022bd){console['log'](a4_0x37639f[_0x49efe5(0x19d)](_0x49efe5(0x165))),console['log'](),console['log'](a4_0x37639f[_0x49efe5(0x1ea)]('Errors:'));for(const _0x4774a5 of _0x16f042[_0x49efe5(0x1ef)]){_0x4774a5['action']===_0x49efe5(0x198)&&console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1ea)](_0x49efe5(0x1cd)+_0x4774a5[_0x49efe5(0x19f)]+_0x49efe5(0x164)+_0x4774a5[_0x49efe5(0x198)]));}for(const _0x21a364 of _0x16f042['knowledgeBases']){_0x21a364['action']===_0x49efe5(0x198)&&console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1ea)](_0x49efe5(0x1c9)+_0x21a364[_0x49efe5(0x16e)]+_0x49efe5(0x164)+_0x21a364['error']));}for(const _0xd32198 of _0x16f042[_0x49efe5(0x17a)]){_0xd32198['action']===_0x49efe5(0x198)&&console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1ea)](_0x49efe5(0x1bd)+_0xd32198[_0x49efe5(0x16e)]+_0x49efe5(0x164)+_0xd32198[_0x49efe5(0x198)]));}for(const _0x45243f of _0x16f042['prompts']){_0x45243f['action']==='error'&&console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1ea)](_0x49efe5(0x1a5)+_0x45243f[_0x49efe5(0x16e)]+_0x49efe5(0x164)+_0x45243f['error']));}for(const _0x582d84 of _0x16f042[_0x49efe5(0x199)]){_0x582d84[_0x49efe5(0x1b6)]===_0x49efe5(0x198)&&console[_0x49efe5(0x1c4)](a4_0x37639f[_0x49efe5(0x1ea)](_0x49efe5(0x1f8)+_0x582d84[_0x49efe5(0x16e)]+_0x49efe5(0x164)+_0x582d84[_0x49efe5(0x198)]));}return 0x1;}console[_0x49efe5(0x1c4)](a4_0x37639f['green'](_0x49efe5(0x15b)+(_0x16b640+_0x4a4542)+_0x49efe5(0x1f2)+_0x16f042[_0x49efe5(0x1f4)]+'\x27'));const _0x1ff2c2=getLLMProjectUrl(_0x3e2c4b,_0x16f042[_0x49efe5(0x1a1)]);return console[_0x49efe5(0x1c4)]('Project:\x20'+a4_0x37639f[_0x49efe5(0x1c6)](_0x1ff2c2)),0x0;}}function a4_0xb79f(){const _0x270246=['push','\x20--name\x20','no_local_folder','site','✔\x20Context\x20set:\x20','6KiUlUx','outputPath','\x20\x20Target:\x20','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','llm','\x0aChanges\x20to\x20agent\x20\x27','\x20\x20Text\x20Knowledge\x20Bases:\x20','1570168cTKgBN','error','integrations','1841804sYMcGh','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','green','yellow','\x20--profile\x20','agentName','agent:pull','projectId','knowledgeBases','\x20unchanged','\x20resources?','\x20\x20Prompt\x20\x22','82317KsBDfJ','\x0aChanges:','llm_project','Using\x20context\x20project:\x20','Project\x20cloned\x20with\x20errors','\x20\x20Agents:\x20','5YJbJyO','no_context','\x20updated','Status:\x20','\x20|\x20','New\x20project\x20name\x20is\x20required','unchanged','Analyzing\x20changes\x20to\x20push...','Clone\x20cancelled','pushProject','action','dirname','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','reason','agent:clone','\x20total','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<local-dir>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20to\x20existing\x20local\x20directory','\x20\x20Text\x20Knowledge\x20Base\x20\x22','Chat:\x20','Writing\x20files...','session','2geXIpO','errors','New\x20project\x20ID:\x20','log','Pull\x20cancelled','cyan','Push\x20cancelled','1920JLRKFD','\x20\x20Knowledge\x20Base\x20\x22','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','prompts','newProjectId','\x20\x20Agent\x20\x22','message','counts','join','Cannot\x20clone\x20from\x20context\x20project\x20\x22','\x20new','\x20changed','tdx.json','Pulling\x20agent\x20\x22','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','Agent:\x20','\x0aPull\x20summary\x20for\x20\x27','\x22\x20to\x20new\x20project\x20\x22','\x20\x20Prompts:\x20','llmProject','19118cFGfXw','Summary:','\x20=\x20','Clone\x20\x22','dim','<new-name>','pullAgent','\x0aChanges\x20to\x20integration\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','No\x20tdx.json\x20found\x20in\x20','Pushing\x20agent\x20from\x20\x22','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','dryRun','red','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','agentId','\x20errors','agent:push','agents','description','Using\x20current\x20project:\x20','\x20resources\x20to\x20\x27','\x20files\x20to\x20','projectName','27iomgqf','\x20created','gray','\x20\x20Integration\x20\x22','\x20\x20tdx\x20agent\x20clone\x20agents/','new','\x20\x20Integrations:\x20','context','Source:\x20','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','source','Dry\x20run\x20-\x20no\x20files\x20written','6063930NFdwiz','\x20\x20Source:\x20','diff','\x0a✔\x20Pushed\x20','profile','yes','\x22\x20to\x20a\x20different\x20profile','\x20files?','\x20\x20Knowledge\x20Bases:\x20','Project:\x20','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','Failed\x20to\x20push\x20agent:\x20','\x22:\x20','\x0aProject\x20pushed\x20with\x20errors','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','INVALID_ARGUMENT','\x27\x20to\x20create\x20the\x20folder\x20structure.','execute','\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)','\x0a✔\x20Pulled\x20','New\x20project:\x20','Would\x20push\x20agent:\x20','name','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','total','Using\x20local\x20project:\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','Would\x20pull\x20agent:\x20','pullProject','cwd','created','sourceProjectName','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','pushAgent','textKnowledgeBases','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','477295XpeWGF','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','repeat','updated','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\x22\x20to\x20\x22','252mLqLrc','Dry\x20run\x20-\x20no\x20changes\x20made','Would\x20clone:','utf-8','\x0aErrors\x20found:','agent.yml','\x22...','cloneProject','\x20successfully'];a4_0xb79f=function(){return _0x270246;};return a4_0xb79f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x270750=a5_0x1df3;function a5_0x38ea(){const _0x394d73=['Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','Failed:\x20\x20\x20','red','text','Project\x20path:\x20','10561944jvAMBu','4407020KTNDup','some','8UClOjY','timestamp','agentName','\x22:\x20','has','basename','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','...\x20','filter','\x20\x20Round\x20','reeval','Available\x20tags:\x20','\x20\x20Conversation:\x20','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','Cached\x20run\x20is\x20from\x20site\x20\x22','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','Passed:\x20\x20\x20','8194PnwlOY','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','Either\x20switch\x20to\x20the\x20\x22','cyan','testName','No\x20tests\x20have\x20tags\x20defined.','Test\x20Summary','size','\x20(new)','\x20-\x20','Re-evaluating...','No\x20tests\x20found\x20with\x20tags:\x20','dim','Cached\x20run\x20from:\x20','testYmlPath','✗\x20ERROR:\x20Project\x20not\x20found:\x20','status','llmProject','tags','Failed\x20Tests:','Re-evaluating\x20cached\x20test\x20run...','tests','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','table','Errors:\x20\x20\x20','found','✗\x20ERROR:\x20','agentDirs','resolveAgentId','Re-evaluation\x20Summary','llm','name','conversations','No\x20tests\x20found\x20matching:\x20','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','context','38871tPBrQb','7598885WnLApO','push','site','Conversation\x20URL:\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','tsv','eval','resolve','52750819YPEnYu','\x22,\x20but\x20current\x20site\x20is\x20\x22','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','Running\x20test:\x20','start','conversation_url','substring','toLowerCase','json','Duration:\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','log','projectName','Round\x201/','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','message','description','map','5silJUD','\x20\x20-\x20','122XgOBHM','4380753CsuQax','round','resolveProjectId','executeReeval','utf-8','Site:\x20','verbose','Test\x20','Tests\x20found:\x20','reason','agent','⚠\x20SKIPPED:\x20','\x20\x20Agent:\x20','stop','length','split','jsonl','trim','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','existsSync','not\x20found','✓\x20PASS:\x20','✗\x20FAIL:\x20','multiple_agents','ERROR','includes','no_context','\x20\x20Site:\x20','...','Evaluating\x20response...','Usage:','join','white','find','Round\x20','\x27\x20to\x20create\x20the\x20folder\x20structure.','Output\x20written\x20to:\x20','writeFileSync','Agent:\x20','404',':\x20Sending\x20user\x20input...','rounds','repeat','Using\x20agent:\x20','370SoQZpb','Run\x20\x27tdx\x20agent\x20pull\x20','Re-evaluating\x20','FAIL','toISOString','Run\x20tests\x20for\x20an\x20LLM\x20agent','\x20\x20Evaluating...\x20','green','PASS','Error:\x20No\x20previous\x20test\x20run\x20found.','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','projectDir','now','forEach','output','\x20(cached)','Available\x20tests:\x20','no_tests','Executing\x20new\x20tests...','yellow'];a5_0x38ea=function(){return _0x394d73;};return a5_0x38ea();}(function(_0x10910f,_0x1ebf30){const _0x4a1167=a5_0x1df3,_0x120ed5=_0x10910f();while(!![]){try{const _0x470242=parseInt(_0x4a1167(0x128))/0x1*(parseInt(_0x4a1167(0x182))/0x2)+parseInt(_0x4a1167(0x129))/0x3+parseInt(_0x4a1167(0x16f))/0x4*(parseInt(_0x4a1167(0x126))/0x5)+parseInt(_0x4a1167(0x16e))/0x6+-parseInt(_0x4a1167(0x1a7))/0x7*(-parseInt(_0x4a1167(0x171))/0x8)+-parseInt(_0x4a1167(0x1a6))/0x9*(parseInt(_0x4a1167(0x155))/0xa)+-parseInt(_0x4a1167(0x1af))/0xb;if(_0x470242===_0x1ebf30)break;else _0x120ed5['push'](_0x120ed5['shift']());}catch(_0x3f57c7){_0x120ed5['push'](_0x120ed5['shift']());}}}(a5_0x38ea,0xe8843));import*as a5_0x33a289 from'node:fs';import*as a5_0x110d65 from'node:path';function a5_0x1df3(_0x2e6b9e,_0x39629f){_0x2e6b9e=_0x2e6b9e-0x117;const _0x38ea1e=a5_0x38ea();let _0x1df3be=_0x38ea1e[_0x2e6b9e];return _0x1df3be;}import a5_0x336d07 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x270750(0x1a1)]='agent:test';[a5_0x270750(0x124)]=a5_0x270750(0x15a);async['execute'](_0x216ab3){const _0x3c7845=a5_0x270750,{options:_0x5bd5c5,args:_0x5059cd,tdx:_0x3907c7}=_0x216ab3,_0x3b9b2b=_0x5059cd[0x0]||'.',_0x38a605=_0x5bd5c5['dryRun'],_0x156d94=_0x5bd5c5,_0x3ba03d=_0x156d94[_0x3c7845(0x1ad)]===![],_0x3edb99=_0x156d94[_0x3c7845(0x17b)],_0x2cf943=_0x156d94[_0x3c7845(0x1a1)],_0x20aff7=_0x156d94['tags'],_0x479e59=_0x5bd5c5[_0x3c7845(0x1a9)],_0x1a6d4e=_0x156d94[_0x3c7845(0x163)];if(_0x3edb99&&_0x3ba03d)return console[_0x3c7845(0x11f)](a5_0x336d07['red'](_0x3c7845(0x183))),0x1;let _0x45f71d=_0x3c7845(0x199);if(_0x156d94[_0x3c7845(0x11c)])_0x45f71d=_0x3c7845(0x11c);else{if(_0x156d94[_0x3c7845(0x139)])_0x45f71d='jsonl';else{if(_0x156d94[_0x3c7845(0x1ac)])_0x45f71d='tsv';else{if(_0x156d94['table'])_0x45f71d='table';}}}const _0x10a2af=_0x156d94[_0x3c7845(0x193)];let _0x449e16=_0x3b9b2b;const _0x7b1843=a5_0x33a289[_0x3c7845(0x13c)](_0x3b9b2b),_0x1f179d=_0x3b9b2b==='.';if(!_0x7b1843||_0x1f179d){const _0xe7e9c0=resolveProjectFromContext(_0x3b9b2b,_0x10a2af,{'requireFile':'test.yml'});if(_0xe7e9c0[_0x3c7845(0x19b)])_0x449e16=_0xe7e9c0['projectDir'],_0xe7e9c0['source']===_0x3c7845(0x1a5)&&console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x18e)](_0x3c7845(0x154)+_0x449e16));else switch(_0xe7e9c0[_0x3c7845(0x132)]){case _0x3c7845(0x143):console[_0x3c7845(0x11f)](a5_0x336d07['yellow'](_0xe7e9c0['message'])),console[_0x3c7845(0x11f)](),console[_0x3c7845(0x11f)](_0x3c7845(0x147)),console['log']('\x20\x20tdx\x20agent\x20test\x20<path>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20from\x20path'),console[_0x3c7845(0x11f)]('\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x3c7845(0x11f)](),console[_0x3c7845(0x11f)]('Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>');return 0x1;case'no_local_folder':console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x168)](_0xe7e9c0['message'])),console[_0x3c7845(0x11f)](),console['log'](_0x3c7845(0x156)+_0xe7e9c0['llmProject']+_0x3c7845(0x14c));return 0x1;case _0x3c7845(0x140):{const _0x295028=a5_0x110d65[_0x3c7845(0x176)](_0xe7e9c0[_0x3c7845(0x160)]);console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x168)](_0x3c7845(0x180)+_0xe7e9c0[_0x3c7845(0x193)]+'\x22:'));for(const _0x38f3e4 of _0xe7e9c0[_0x3c7845(0x19d)]){console['log'](_0x3c7845(0x127)+_0x38f3e4);}return console[_0x3c7845(0x11f)](),console[_0x3c7845(0x11f)]('Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/'+_0x295028+'/<agent-name>'),0x1;}case _0x3c7845(0x166):console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x168)](_0x3c7845(0x1b1)+_0xe7e9c0[_0x3c7845(0x193)]+'\x22.')),console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x18e)](_0x3c7845(0x16d)+_0xe7e9c0['projectDir'])),console[_0x3c7845(0x11f)](),console[_0x3c7845(0x11f)](_0x3c7845(0x17e));return 0x1;}}const {definition:_0x383ce2,agentInfo:_0x497b80}=parseTestFile(_0x449e16);let _0x52bc37=_0x383ce2['tests'];if(_0x2cf943){const _0x317865=_0x2cf943['split'](',')[_0x3c7845(0x125)](_0x5ad587=>_0x5ad587[_0x3c7845(0x13a)]());_0x52bc37=_0x383ce2[_0x3c7845(0x197)][_0x3c7845(0x179)](_0x1a0fa7=>_0x317865[_0x3c7845(0x142)](_0x1a0fa7['name']));if(_0x52bc37['length']===0x0)return console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x168)](_0x3c7845(0x1a3)+_0x2cf943)),console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x18e)](_0x3c7845(0x165)+_0x383ce2[_0x3c7845(0x197)]['map'](_0x34c803=>_0x34c803[_0x3c7845(0x1a1)])['join'](',\x20'))),0x1;}if(_0x20aff7){const _0x183075=_0x20aff7[_0x3c7845(0x138)](',')[_0x3c7845(0x125)](_0x5c49e2=>_0x5c49e2[_0x3c7845(0x13a)]()[_0x3c7845(0x11b)]());_0x52bc37=_0x52bc37[_0x3c7845(0x179)](_0x5305fe=>_0x5305fe['tags']?.[_0x3c7845(0x170)](_0x4c600b=>_0x183075['includes'](_0x4c600b[_0x3c7845(0x11b)]())));if(_0x52bc37[_0x3c7845(0x137)]===0x0){console[_0x3c7845(0x11f)](a5_0x336d07['yellow'](_0x3c7845(0x18d)+_0x20aff7));const _0x2a1d2d=new Set();return _0x383ce2[_0x3c7845(0x197)][_0x3c7845(0x162)](_0x59fbd6=>_0x59fbd6[_0x3c7845(0x194)]?.[_0x3c7845(0x162)](_0xe4112e=>_0x2a1d2d['add'](_0xe4112e))),_0x2a1d2d[_0x3c7845(0x189)]>0x0?console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x18e)](_0x3c7845(0x17c)+[..._0x2a1d2d][_0x3c7845(0x148)](',\x20'))):console[_0x3c7845(0x11f)](a5_0x336d07['dim'](_0x3c7845(0x187))),0x1;}}if(_0x3edb99)return this[_0x3c7845(0x12c)](_0x216ab3,{'definition':{'tests':_0x52bc37},'agentInfo':_0x497b80,'outputFormat':_0x45f71d,'outputFile':_0x1a6d4e,'testNames':_0x2cf943});if(_0x38a605){console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x185)]('Test\x20Configuration:')),console[_0x3c7845(0x11f)](_0x3c7845(0x144)+a5_0x336d07[_0x3c7845(0x149)](_0x479e59)),console[_0x3c7845(0x11f)]('\x20\x20Project:\x20'+a5_0x336d07[_0x3c7845(0x149)](_0x497b80[_0x3c7845(0x120)])),console[_0x3c7845(0x11f)](_0x3c7845(0x135)+a5_0x336d07[_0x3c7845(0x149)](_0x497b80[_0x3c7845(0x173)])),console['log'](),console['log'](_0x3c7845(0x131)+a5_0x336d07[_0x3c7845(0x149)](_0x52bc37[_0x3c7845(0x137)]));for(let _0x190092=0x0;_0x190092<_0x52bc37[_0x3c7845(0x137)];_0x190092++){const _0x399b79=_0x52bc37[_0x190092],_0x4bca62=_0x399b79['rounds']['length']===0x1?_0x3c7845(0x12a):_0x3c7845(0x152),_0x55b16c=_0x399b79[_0x3c7845(0x194)]?.[_0x3c7845(0x137)]?'\x20['+_0x399b79['tags'][_0x3c7845(0x148)](',\x20')+']':'';console[_0x3c7845(0x11f)]('\x20\x20'+(_0x190092+0x1)+'.\x20'+a5_0x336d07[_0x3c7845(0x149)](_0x399b79[_0x3c7845(0x1a1)])+'\x20('+_0x399b79[_0x3c7845(0x152)][_0x3c7845(0x137)]+'\x20'+_0x4bca62+')'+a5_0x336d07['dim'](_0x55b16c));}return 0x0;}let _0x47d046,_0x332c13;try{_0x47d046=await _0x3907c7[_0x3c7845(0x1a0)][_0x3c7845(0x12b)](_0x497b80['projectName']);}catch(_0x10a4c0){const _0x19ce69=_0x10a4c0 instanceof Error?_0x10a4c0[_0x3c7845(0x123)]:String(_0x10a4c0);return _0x19ce69[_0x3c7845(0x142)](_0x3c7845(0x150))||_0x19ce69[_0x3c7845(0x11b)]()[_0x3c7845(0x142)]('not\x20found')?console[_0x3c7845(0x11f)](a5_0x336d07['red'](_0x3c7845(0x191)+_0x497b80[_0x3c7845(0x120)])):console[_0x3c7845(0x11f)](a5_0x336d07['red'](_0x3c7845(0x13b)+_0x497b80[_0x3c7845(0x120)]+_0x3c7845(0x174)+_0x19ce69)),0x1;}try{_0x332c13=await _0x3907c7['llm'][_0x3c7845(0x19e)](_0x497b80['agentName'],_0x47d046);}catch(_0x152624){const _0x30b2d6=_0x152624 instanceof Error?_0x152624[_0x3c7845(0x123)]:String(_0x152624);return _0x30b2d6[_0x3c7845(0x142)]('404')||_0x30b2d6[_0x3c7845(0x11b)]()['includes'](_0x3c7845(0x13d))?console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x16b)](_0x3c7845(0x1a4)+_0x497b80['agentName'])):console['log'](a5_0x336d07[_0x3c7845(0x16b)](_0x3c7845(0x1ab)+_0x497b80[_0x3c7845(0x173)]+_0x3c7845(0x174)+_0x30b2d6)),0x1;}let _0x18371b;if(!_0x3ba03d)try{_0x18371b=await setupEvaluatorAgent(_0x3907c7[_0x3c7845(0x1a0)],_0x5bd5c5[_0x3c7845(0x12f)]);}catch(_0x2454ac){const _0x2872b=_0x2454ac instanceof Error?_0x2454ac['message']:String(_0x2454ac);return console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x16b)](_0x3c7845(0x15f)+_0x2872b)),0x1;}console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x185)]('Running\x20agent\x20tests...')),console['log'](_0x3c7845(0x12e)+a5_0x336d07['white'](_0x479e59)),console['log'](_0x3c7845(0x14f)+a5_0x336d07[_0x3c7845(0x149)](_0x497b80[_0x3c7845(0x120)]+'/'+_0x497b80['agentName'])),console['log']();const _0xfff891=[],_0x2e3232=[],_0x284696=Date[_0x3c7845(0x161)]();for(let _0x36fe23=0x0;_0x36fe23<_0x52bc37['length'];_0x36fe23++){const _0x47d50f=_0x52bc37[_0x36fe23];_0x52bc37['length']>0x1?console[_0x3c7845(0x11f)](_0x3c7845(0x130)+(_0x36fe23+0x1)+'/'+_0x52bc37['length']+':\x20'+a5_0x336d07[_0x3c7845(0x149)](_0x47d50f[_0x3c7845(0x1a1)])):console['log'](_0x3c7845(0x117)+a5_0x336d07['white'](_0x47d50f[_0x3c7845(0x1a1)]));const _0x2c7cbf=createCommandSpinner(_0x3c7845(0x121)+_0x47d50f['rounds'][_0x3c7845(0x137)]+':\x20Sending\x20user\x20input...');_0x2c7cbf[_0x3c7845(0x118)]();try{const {result:_0x2359b1,conversation:_0x273ffe}=await runTest(_0x3907c7['llm'],_0x47d50f,{'agentId':_0x332c13,'projectId':_0x47d046,'site':_0x479e59,'noEval':_0x3ba03d,'evaluatorId':_0x18371b,'onRoundStart':(_0x37608c,_0x527288)=>{const _0x3b8c26=_0x3c7845;_0x2c7cbf['text']='Round\x20'+(_0x37608c+0x1)+'/'+_0x527288+_0x3b8c26(0x151);},'onRoundComplete':(_0x526449,_0x1418a0,_0xa2dee3)=>{const _0x2e5ad5=_0x3c7845,_0x18621d=formatElapsed(_0x1418a0);_0xa2dee3?console[_0x2e5ad5(0x11f)](_0x2e5ad5(0x17a)+(_0x526449+0x1)+'/'+_0x47d50f[_0x2e5ad5(0x152)][_0x2e5ad5(0x137)]+_0x2e5ad5(0x178)+a5_0x336d07[_0x2e5ad5(0x15c)]('✓')+'\x20('+_0x18621d+')'):console[_0x2e5ad5(0x11f)](_0x2e5ad5(0x17a)+(_0x526449+0x1)+'/'+_0x47d50f['rounds'][_0x2e5ad5(0x137)]+_0x2e5ad5(0x178)+a5_0x336d07['red']('✗'));},'onEvaluationStart':()=>{const _0x4d1599=_0x3c7845;_0x2c7cbf[_0x4d1599(0x16c)]=_0x4d1599(0x146);},'onEvaluationComplete':_0x3f03c4=>{const _0x70cc89=_0x3c7845,_0x560798=formatElapsed(_0x3f03c4);console[_0x70cc89(0x11f)](_0x70cc89(0x15b)+a5_0x336d07[_0x70cc89(0x15c)]('✓')+'\x20('+_0x560798+')');}});_0x2c7cbf[_0x3c7845(0x136)](),_0xfff891[_0x3c7845(0x1a8)](_0x2359b1),_0x2e3232[_0x3c7845(0x1a8)](_0x273ffe);if(_0x2359b1[_0x3c7845(0x192)]===_0x3c7845(0x15d))console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x15c)]('✓\x20PASS:\x20'+_0x2359b1[_0x3c7845(0x132)]));else _0x2359b1['status']==='FAIL'?console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x16b)]('✗\x20FAIL:\x20'+_0x2359b1['reason'])):console[_0x3c7845(0x11f)](a5_0x336d07[_0x3c7845(0x16b)](_0x3c7845(0x19c)+_0x2359b1['reason']));_0x2359b1[_0x3c7845(0x119)]&&console[_0x3c7845(0x11f)](a5_0x336d07['dim'](_0x3c7845(0x1aa)+_0x2359b1['conversation_url'])),console[_0x3c7845(0x11f)]();}catch(_0x55b074){_0x2c7cbf['stop']();const _0x4bba57=_0x55b074 instanceof Error?_0x55b074[_0x3c7845(0x123)]:String(_0x55b074);console['log'](a5_0x336d07[_0x3c7845(0x16b)](_0x3c7845(0x19c)+_0x4bba57)),console['log'](),_0xfff891[_0x3c7845(0x1a8)]({'name':_0x47d50f['name'],'status':_0x3c7845(0x141),'reason':_0x4bba57,'timestamp':new Date()[_0x3c7845(0x159)](),'duration_ms':0x0});}}const _0xe48c5d=Date[_0x3c7845(0x161)]()-_0x284696,_0x244627=_0xfff891[_0x3c7845(0x179)](_0x462774=>_0x462774['status']===_0x3c7845(0x15d))['length'],_0x5654fb=_0xfff891[_0x3c7845(0x179)](_0x5d0bc9=>_0x5d0bc9[_0x3c7845(0x192)]==='FAIL')[_0x3c7845(0x137)],_0x4e57f2=_0xfff891[_0x3c7845(0x179)](_0x6b18ce=>_0x6b18ce[_0x3c7845(0x192)]===_0x3c7845(0x141))['length'];console['log']('━'['repeat'](0x3c)),console[_0x3c7845(0x11f)](_0x3c7845(0x188)),console[_0x3c7845(0x11f)]('━'[_0x3c7845(0x153)](0x3c)),console['log']('Total:\x20\x20\x20\x20'+_0xfff891['length']),console[_0x3c7845(0x11f)](_0x3c7845(0x181)+a5_0x336d07['green'](_0x244627)),console[_0x3c7845(0x11f)]('Failed:\x20\x20\x20'+a5_0x336d07[_0x3c7845(0x16b)](_0x5654fb));_0x4e57f2>0x0&&console[_0x3c7845(0x11f)](_0x3c7845(0x19a)+a5_0x336d07[_0x3c7845(0x16b)](_0x4e57f2));console['log']('Duration:\x20'+formatElapsed(_0xe48c5d)),console[_0x3c7845(0x11f)]('━'['repeat'](0x3c));const _0x3ef547=_0xfff891[_0x3c7845(0x179)](_0x11b628=>_0x11b628['status']!==_0x3c7845(0x15d));if(_0x3ef547[_0x3c7845(0x137)]>0x0){console[_0x3c7845(0x11f)](),console['log'](_0x3c7845(0x195));for(const _0x3473b4 of _0x3ef547){const _0x3ed456=a5_0x336d07['red']('✗'),_0x2aff99=_0x3473b4[_0x3c7845(0x132)]['length']>0x32?_0x3473b4[_0x3c7845(0x132)][_0x3c7845(0x11a)](0x0,0x32)+_0x3c7845(0x145):_0x3473b4[_0x3c7845(0x132)];console[_0x3c7845(0x11f)]('\x20\x20'+_0x3ed456+'\x20'+_0x3473b4[_0x3c7845(0x1a1)]+':\x20'+_0x2aff99);}}const _0x3e4753={'summary':{'total':_0xfff891['length'],'passed':_0x244627,'failed':_0x5654fb,'errors':_0x4e57f2>0x0?_0x4e57f2:undefined,'duration_ms':_0xe48c5d},'tests':_0xfff891,'agent':{'project':_0x497b80[_0x3c7845(0x120)],'name':_0x497b80[_0x3c7845(0x173)],'site':_0x479e59},'timestamp':new Date(_0x284696)['toISOString']()};try{const _0x250632=buildCachedTestRun(_0x2e3232,{'site':_0x479e59,'projectId':_0x47d046,'projectName':_0x497b80['projectName'],'agentId':_0x332c13,'agentName':_0x497b80[_0x3c7845(0x173)],'testYmlPath':a5_0x110d65[_0x3c7845(0x1ae)](_0x497b80[_0x3c7845(0x190)])});saveLastTestRun(_0x250632);}catch{}if(_0x45f71d!==_0x3c7845(0x199)||_0x1a6d4e){const _0x5edde9=formatResults(_0x3e4753,_0x45f71d);if(_0x1a6d4e)try{a5_0x33a289[_0x3c7845(0x14e)](_0x1a6d4e,_0x5edde9,_0x3c7845(0x12d)),console[_0x3c7845(0x11f)](),console[_0x3c7845(0x11f)](a5_0x336d07['dim']('Output\x20written\x20to:\x20'+_0x1a6d4e));}catch(_0x2beb26){return console['log'](),console['log'](a5_0x336d07[_0x3c7845(0x16b)]('Error\x20writing\x20output\x20file:\x20'+_0x2beb26)),0x1;}else console[_0x3c7845(0x11f)](),console[_0x3c7845(0x11f)](_0x5edde9);}return _0x3ef547[_0x3c7845(0x137)]>0x0?0x1:0x0;}async[a5_0x270750(0x12c)](_0x57e2e2,_0x23572c){const _0x568249=a5_0x270750,{options:_0x53ff57,tdx:_0x226041}=_0x57e2e2,{definition:_0x3555b8,agentInfo:_0x5a75e1,outputFormat:_0x45fa99,outputFile:_0x5c8d74}=_0x23572c,_0x5cc146=_0x53ff57['site'],_0x39755a=loadLastTestRun();if(!_0x39755a)return console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x16b)](_0x568249(0x15e))),console['log'](a5_0x336d07['dim'](_0x568249(0x11e))),0x1;if(_0x39755a[_0x568249(0x133)][_0x568249(0x173)]!==_0x5a75e1['agentName'])return console['log'](a5_0x336d07['red']('Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22'+_0x39755a[_0x568249(0x133)][_0x568249(0x173)]+'\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22'+_0x5a75e1[_0x568249(0x173)]+'\x22.')),console['log'](a5_0x336d07[_0x568249(0x18e)](_0x568249(0x177))),0x1;const _0x52eb88=new Set(_0x39755a[_0x568249(0x1a2)]['map'](_0x2ef27e=>_0x2ef27e[_0x568249(0x186)])),_0xcbc949=_0x3555b8[_0x568249(0x197)][_0x568249(0x179)](_0x4ca894=>!_0x52eb88['has'](_0x4ca894[_0x568249(0x1a1)]));if(_0xcbc949[_0x568249(0x137)]>0x0&&_0x39755a[_0x568249(0x1a9)]!==_0x5cc146)return console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x16b)](_0x568249(0x169))),console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x18e)](_0x568249(0x17f)+_0x39755a['site']+_0x568249(0x1b0)+_0x5cc146+'\x22.')),console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x18e)](_0x568249(0x184)+_0x39755a['site']+_0x568249(0x122))),0x1;const _0x14f3d1=_0x3555b8[_0x568249(0x197)][_0x568249(0x179)](_0x10a1ab=>_0x52eb88[_0x568249(0x175)](_0x10a1ab[_0x568249(0x1a1)])),_0x373808=_0xcbc949;let _0x303281;try{_0x303281=await setupEvaluatorAgent(_0x226041['llm'],_0x53ff57[_0x568249(0x12f)]);}catch(_0x54094c){const _0x593ad8=_0x54094c instanceof Error?_0x54094c[_0x568249(0x123)]:String(_0x54094c);return console[_0x568249(0x11f)](a5_0x336d07['red'](_0x568249(0x15f)+_0x593ad8)),0x1;}console[_0x568249(0x11f)](a5_0x336d07['cyan'](_0x568249(0x196))),console['log'](_0x568249(0x18f)+a5_0x336d07['white'](_0x39755a[_0x568249(0x172)])),console['log'](_0x568249(0x14f)+a5_0x336d07['white'](_0x39755a[_0x568249(0x133)]['projectName']+'/'+_0x39755a['agent']['agentName']));_0x373808[_0x568249(0x137)]>0x0&&console['log']('New\x20tests\x20to\x20execute:\x20'+a5_0x336d07[_0x568249(0x168)](_0x373808[_0x568249(0x137)]));console[_0x568249(0x11f)]();const _0x20e2c9=[],_0xcc7ca4=Date['now'](),_0x301c03=createCommandSpinner(_0x568249(0x18c));if(_0x14f3d1['length']>0x0)try{const _0x3943dd=await reevaluateFromCache(_0x226041[_0x568249(0x1a0)],_0x39755a,{'tests':_0x14f3d1},{'evaluatorId':_0x303281,'onTestStart':(_0x2f8b9c,_0x59b1ce,_0x3a7c26)=>{const _0x55e2b6=_0x568249;_0x301c03['text']=_0x55e2b6(0x157)+(_0x59b1ce+0x1)+'/'+_0x3a7c26+':\x20'+_0x2f8b9c+_0x55e2b6(0x145);if(!_0x301c03['isSpinning'])_0x301c03[_0x55e2b6(0x118)]();},'onTestComplete':(_0x5f1078,_0x3ade71)=>{const _0x24881e=_0x568249;_0x301c03[_0x24881e(0x136)]();if(_0x3ade71['status']===_0x24881e(0x15d))console[_0x24881e(0x11f)](a5_0x336d07['green'](_0x24881e(0x13e)+_0x5f1078)+a5_0x336d07['dim']('\x20(cached)'));else _0x3ade71[_0x24881e(0x192)]===_0x24881e(0x158)?console[_0x24881e(0x11f)](a5_0x336d07[_0x24881e(0x16b)](_0x24881e(0x13f)+_0x5f1078+'\x20-\x20'+_0x3ade71['reason'])+a5_0x336d07[_0x24881e(0x18e)](_0x24881e(0x164))):console[_0x24881e(0x11f)](a5_0x336d07[_0x24881e(0x16b)](_0x24881e(0x19c)+_0x5f1078+_0x24881e(0x18b)+_0x3ade71[_0x24881e(0x132)]));_0x3ade71[_0x24881e(0x119)]&&console[_0x24881e(0x11f)](a5_0x336d07[_0x24881e(0x18e)](_0x24881e(0x17d)+_0x3ade71[_0x24881e(0x119)])),_0x20e2c9['push'](_0x3ade71);},'onTestSkipped':(_0x3b5006,_0x4cf239)=>{const _0x13d85e=_0x568249;_0x301c03[_0x13d85e(0x136)](),console['log'](a5_0x336d07[_0x13d85e(0x168)](_0x13d85e(0x134)+_0x3b5006+_0x13d85e(0x18b)+_0x4cf239));}});for(const _0x441cdf of _0x3943dd){!_0x20e2c9[_0x568249(0x14a)](_0x4dcc20=>_0x4dcc20[_0x568249(0x1a1)]===_0x441cdf[_0x568249(0x1a1)])&&_0x20e2c9[_0x568249(0x1a8)](_0x441cdf);}}catch(_0x1d1e63){_0x301c03[_0x568249(0x136)]();const _0x11d7a1=_0x1d1e63 instanceof Error?_0x1d1e63[_0x568249(0x123)]:String(_0x1d1e63);return console[_0x568249(0x11f)](a5_0x336d07['red'](_0x568249(0x198)+_0x11d7a1)),0x1;}_0x301c03['stop']();if(_0x373808[_0x568249(0x137)]>0x0){console[_0x568249(0x11f)](),console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x185)](_0x568249(0x167)));const {projectId:_0x84fd9,agentId:_0x55ee25}=_0x39755a[_0x568249(0x133)];for(const _0x587312 of _0x373808){console['log']('Running:\x20'+a5_0x336d07[_0x568249(0x149)](_0x587312[_0x568249(0x1a1)]));const _0xacd306=createCommandSpinner(_0x568249(0x121)+_0x587312[_0x568249(0x152)][_0x568249(0x137)]+_0x568249(0x151));_0xacd306[_0x568249(0x118)]();try{const {result:_0x21a4c6}=await runTest(_0x226041['llm'],_0x587312,{'agentId':_0x55ee25,'projectId':_0x84fd9,'site':_0x39755a[_0x568249(0x1a9)],'noEval':![],'evaluatorId':_0x303281,'onRoundStart':(_0x340912,_0x5ab91c)=>{const _0x5d4c3c=_0x568249;_0xacd306[_0x5d4c3c(0x16c)]=_0x5d4c3c(0x14b)+(_0x340912+0x1)+'/'+_0x5ab91c+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x3d5d85,_0x3003cf,_0x5bf98c)=>{const _0x2263a5=_0x568249,_0x4bcf82=formatElapsed(_0x3003cf);_0x5bf98c?console[_0x2263a5(0x11f)](_0x2263a5(0x17a)+(_0x3d5d85+0x1)+'/'+_0x587312[_0x2263a5(0x152)][_0x2263a5(0x137)]+_0x2263a5(0x178)+a5_0x336d07[_0x2263a5(0x15c)]('✓')+'\x20('+_0x4bcf82+')'):console[_0x2263a5(0x11f)](_0x2263a5(0x17a)+(_0x3d5d85+0x1)+'/'+_0x587312['rounds'][_0x2263a5(0x137)]+'...\x20'+a5_0x336d07[_0x2263a5(0x16b)]('✗'));},'onEvaluationStart':()=>{const _0x281e08=_0x568249;_0xacd306[_0x281e08(0x16c)]='Evaluating\x20response...';},'onEvaluationComplete':_0x120b66=>{const _0x5dcef4=_0x568249,_0x3aeec7=formatElapsed(_0x120b66);console['log'](_0x5dcef4(0x15b)+a5_0x336d07[_0x5dcef4(0x15c)]('✓')+'\x20('+_0x3aeec7+')');}});_0xacd306[_0x568249(0x136)](),_0x20e2c9[_0x568249(0x1a8)](_0x21a4c6);if(_0x21a4c6[_0x568249(0x192)]===_0x568249(0x15d))console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x15c)](_0x568249(0x13e)+_0x21a4c6[_0x568249(0x132)])+a5_0x336d07[_0x568249(0x18e)](_0x568249(0x18a)));else _0x21a4c6[_0x568249(0x192)]==='FAIL'?console[_0x568249(0x11f)](a5_0x336d07['red'](_0x568249(0x13f)+_0x21a4c6['reason'])+a5_0x336d07[_0x568249(0x18e)](_0x568249(0x18a))):console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x16b)](_0x568249(0x19c)+_0x21a4c6[_0x568249(0x132)]));_0x21a4c6[_0x568249(0x119)]&&console[_0x568249(0x11f)](a5_0x336d07['dim'](_0x568249(0x17d)+_0x21a4c6['conversation_url']));}catch(_0x22313a){_0xacd306[_0x568249(0x136)]();const _0x4412c3=_0x22313a instanceof Error?_0x22313a[_0x568249(0x123)]:String(_0x22313a);console['log'](a5_0x336d07[_0x568249(0x16b)](_0x568249(0x19c)+_0x4412c3)),_0x20e2c9[_0x568249(0x1a8)]({'name':_0x587312[_0x568249(0x1a1)],'status':_0x568249(0x141),'reason':_0x4412c3,'timestamp':new Date()[_0x568249(0x159)](),'duration_ms':0x0});}}}console[_0x568249(0x11f)]();const _0x529212=Date[_0x568249(0x161)]()-_0xcc7ca4,_0x273585=_0x20e2c9[_0x568249(0x179)](_0x11a454=>_0x11a454[_0x568249(0x192)]===_0x568249(0x15d))[_0x568249(0x137)],_0xb227d9=_0x20e2c9[_0x568249(0x179)](_0xb91397=>_0xb91397['status']==='FAIL')[_0x568249(0x137)],_0x45d1d8=_0x20e2c9[_0x568249(0x179)](_0x148269=>_0x148269[_0x568249(0x192)]===_0x568249(0x141))['length'];console[_0x568249(0x11f)]('━'['repeat'](0x3c)),console['log'](_0x568249(0x19f)),console[_0x568249(0x11f)]('━'[_0x568249(0x153)](0x3c)),console[_0x568249(0x11f)]('Total:\x20\x20\x20\x20'+_0x20e2c9['length']),console[_0x568249(0x11f)](_0x568249(0x181)+a5_0x336d07[_0x568249(0x15c)](_0x273585)),console[_0x568249(0x11f)](_0x568249(0x16a)+a5_0x336d07[_0x568249(0x16b)](_0xb227d9));_0x45d1d8>0x0&&console[_0x568249(0x11f)]('Errors:\x20\x20\x20'+a5_0x336d07[_0x568249(0x16b)](_0x45d1d8));console['log'](_0x568249(0x11d)+formatElapsed(_0x529212)),console[_0x568249(0x11f)]('━'[_0x568249(0x153)](0x3c));const _0x567388={'summary':{'total':_0x20e2c9[_0x568249(0x137)],'passed':_0x273585,'failed':_0xb227d9,'errors':_0x45d1d8>0x0?_0x45d1d8:undefined,'duration_ms':_0x529212},'tests':_0x20e2c9,'agent':{'project':_0x5a75e1[_0x568249(0x120)],'name':_0x5a75e1[_0x568249(0x173)],'site':_0x5cc146},'timestamp':new Date(_0xcc7ca4)[_0x568249(0x159)]()};if(_0x45fa99!=='table'||_0x5c8d74){const _0x11bc01=formatResults(_0x567388,_0x45fa99);if(_0x5c8d74)try{a5_0x33a289[_0x568249(0x14e)](_0x5c8d74,_0x11bc01,_0x568249(0x12d)),console[_0x568249(0x11f)](),console[_0x568249(0x11f)](a5_0x336d07[_0x568249(0x18e)](_0x568249(0x14d)+_0x5c8d74));}catch(_0x566dad){return console[_0x568249(0x11f)](),console['log'](a5_0x336d07[_0x568249(0x16b)]('Error\x20writing\x20output\x20file:\x20'+_0x566dad)),0x1;}else console[_0x568249(0x11f)](),console[_0x568249(0x11f)](_0x11bc01);}const _0x3cc9ef=_0x20e2c9[_0x568249(0x179)](_0x1a30ab=>_0x1a30ab['status']!==_0x568249(0x15d));return _0x3cc9ef[_0x568249(0x137)]>0x0?0x1:0x0;}}
|
|
1
|
+
const a5_0x2db1c7=a5_0x4a6b;(function(_0x17de74,_0x22996e){const _0x1003ee=a5_0x4a6b,_0x3b9e09=_0x17de74();while(!![]){try{const _0x541ef5=parseInt(_0x1003ee(0x81))/0x1+parseInt(_0x1003ee(0xaa))/0x2+-parseInt(_0x1003ee(0x97))/0x3*(-parseInt(_0x1003ee(0xbd))/0x4)+parseInt(_0x1003ee(0xdd))/0x5*(-parseInt(_0x1003ee(0x78))/0x6)+-parseInt(_0x1003ee(0x6f))/0x7*(parseInt(_0x1003ee(0xd2))/0x8)+-parseInt(_0x1003ee(0xa3))/0x9+parseInt(_0x1003ee(0xf2))/0xa*(parseInt(_0x1003ee(0xd5))/0xb);if(_0x541ef5===_0x22996e)break;else _0x3b9e09['push'](_0x3b9e09['shift']());}catch(_0x74926b){_0x3b9e09['push'](_0x3b9e09['shift']());}}}(a5_0x446b,0x67ad0));function a5_0x446b(){const _0x509628=['...\x20','\x20\x20Round\x20','4048947TpLffQ','\x20\x20Conversation:\x20','Executing\x20new\x20tests...','\x20-\x20','No\x20tests\x20have\x20tags\x20defined.','projectName','split','1197412ITJSTH','filter','toISOString','existsSync','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','⚠\x20SKIPPED:\x20','dim','repeat','stop','find','includes','agent:test','resolveAgentId','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','conversation_url','\x20\x20Agent:\x20','/<agent-name>','writeFileSync','timestamp','4zqnPjo','tags','start','Duration:\x20','✗\x20FAIL:\x20','404','FAIL','length','Evaluating\x20response...','Re-evaluating\x20cached\x20test\x20run...','✓\x20PASS:\x20','Test\x20Configuration:','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','\x20\x20Evaluating...\x20','llm','white','\x20(cached)','rounds','agentName','projectDir','✗\x20ERROR:\x20Project\x20not\x20found:\x20','24suSHjF','Test\x20','Using\x20agent:\x20','1529VembsD','Round\x201/','red','testName','executeReeval','context','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','Running:\x20','1394405PgmRtR','Error:\x20No\x20previous\x20test\x20run\x20found.','cyan','Output\x20written\x20to:\x20','Total:\x20\x20\x20\x20','green','Tests\x20found:\x20','test.yml','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','No\x20tests\x20found\x20matching:\x20','agentDirs','size','Running\x20test:\x20','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','\x27\x20to\x20create\x20the\x20folder\x20structure.','trim','tests','No\x20tests\x20found\x20with\x20tags:\x20','\x20\x20Site:\x20','18880WmVDjR','forEach','description','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','Error\x20writing\x20output\x20file:\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','Cached\x20run\x20is\x20from\x20site\x20\x22','llmProject','Errors:\x20\x20\x20','status','Usage:','Failed\x20Tests:','execute','isSpinning','text','Re-evaluating\x20','tsv','join','Agent:\x20','push','244741NvwUvn','name','...','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','Re-evaluating...','log','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','source','utf-8','18fSJYwd','has','map','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','\x20(new)','\x20\x20-\x20',':\x20Sending\x20user\x20input...','output','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','212465VXJHVd','conversations','not\x20found','Available\x20tags:\x20','round','Failed:\x20\x20\x20','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','table','Test\x20Summary','Re-evaluation\x20Summary','jsonl','reason','some','\x22,\x20but\x20current\x20site\x20is\x20\x22','add','toLowerCase','no_context','no_tests','site','agent','✗\x20ERROR:\x20','verbose','2227404XDrKXR','Available\x20tests:\x20','resolveProjectId','yellow','message','Passed:\x20\x20\x20','PASS','ERROR','Cached\x20run\x20from:\x20','now'];a5_0x446b=function(){return _0x509628;};return a5_0x446b();}function a5_0x4a6b(_0x5e3589,_0x36f96b){_0x5e3589=_0x5e3589-0x6c;const _0x446bdf=a5_0x446b();let _0x4a6b00=_0x446bdf[_0x5e3589];return _0x4a6b00;}import*as a5_0x5dd9e7 from'node:fs';import*as a5_0x517870 from'node:path';import a5_0x98d02a from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x2db1c7(0x70)]=a5_0x2db1c7(0xb5);[a5_0x2db1c7(0xf4)]='Run\x20tests\x20for\x20an\x20LLM\x20agent';async[a5_0x2db1c7(0xfe)](_0x6200c4){const _0x3b89e9=a5_0x2db1c7,{options:_0x34c793,args:_0x29411b,tdx:_0x19838c}=_0x6200c4,_0x494b44=_0x29411b[0x0]||'.',_0x1d6f15=_0x34c793['dryRun'],_0x49ce8b=_0x34c793,_0x10fea7=_0x49ce8b['eval']===![],_0x489646=_0x49ce8b['reeval'],_0xa09cae=_0x49ce8b[_0x3b89e9(0x70)],_0x5b7863=_0x49ce8b[_0x3b89e9(0xbe)],_0x2bb6c8=_0x34c793[_0x3b89e9(0x93)],_0x4542d1=_0x49ce8b[_0x3b89e9(0x7f)];if(_0x489646&&_0x10fea7)return console['log'](a5_0x98d02a[_0x3b89e9(0xd7)]('Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval')),0x1;let _0x330772=_0x3b89e9(0x88);if(_0x49ce8b['json'])_0x330772='json';else{if(_0x49ce8b[_0x3b89e9(0x8b)])_0x330772=_0x3b89e9(0x8b);else{if(_0x49ce8b['tsv'])_0x330772=_0x3b89e9(0x102);else{if(_0x49ce8b[_0x3b89e9(0x88)])_0x330772=_0x3b89e9(0x88);}}}const _0x810334=_0x49ce8b[_0x3b89e9(0xf9)];let _0x196a18=_0x494b44;const _0x4c2c3c=a5_0x5dd9e7[_0x3b89e9(0xad)](_0x494b44),_0x13935c=_0x494b44==='.';if(!_0x4c2c3c||_0x13935c){const _0xc697ce=resolveProjectFromContext(_0x494b44,_0x810334,{'requireFile':_0x3b89e9(0xe4)});if(_0xc697ce['found'])_0x196a18=_0xc697ce[_0x3b89e9(0xd0)],_0xc697ce[_0x3b89e9(0x76)]===_0x3b89e9(0xda)&&console['log'](a5_0x98d02a['dim'](_0x3b89e9(0xd4)+_0x196a18));else switch(_0xc697ce[_0x3b89e9(0x8c)]){case _0x3b89e9(0x91):console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0x9a)](_0xc697ce['message'])),console[_0x3b89e9(0x74)](),console['log'](_0x3b89e9(0xfc)),console[_0x3b89e9(0x74)]('\x20\x20tdx\x20agent\x20test\x20<path>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20from\x20path'),console[_0x3b89e9(0x74)]('\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x3b89e9(0x74)](),console['log'](_0x3b89e9(0xdb));return 0x1;case'no_local_folder':console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0x9a)](_0xc697ce['message'])),console[_0x3b89e9(0x74)](),console[_0x3b89e9(0x74)]('Run\x20\x27tdx\x20agent\x20pull\x20'+_0xc697ce[_0x3b89e9(0xf9)]+_0x3b89e9(0xed));return 0x1;case'multiple_agents':{const _0x29c9e0=a5_0x517870['basename'](_0xc697ce[_0x3b89e9(0xd0)]);console[_0x3b89e9(0x74)](a5_0x98d02a['yellow'](_0x3b89e9(0x80)+_0xc697ce[_0x3b89e9(0xf9)]+'\x22:'));for(const _0x1bb77f of _0xc697ce[_0x3b89e9(0xe9)]){console[_0x3b89e9(0x74)](_0x3b89e9(0x7d)+_0x1bb77f);}return console[_0x3b89e9(0x74)](),console[_0x3b89e9(0x74)](_0x3b89e9(0xae)+_0x29c9e0+_0x3b89e9(0xba)),0x1;}case _0x3b89e9(0x92):console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0x9a)](_0x3b89e9(0x87)+_0xc697ce[_0x3b89e9(0xf9)]+'\x22.')),console['log'](a5_0x98d02a[_0x3b89e9(0xb0)]('Project\x20path:\x20'+_0xc697ce[_0x3b89e9(0xd0)])),console[_0x3b89e9(0x74)](),console[_0x3b89e9(0x74)](_0x3b89e9(0x75));return 0x1;}}const {definition:_0x179dc8,agentInfo:_0x3cccba}=parseTestFile(_0x196a18);let _0x5cacce=_0x179dc8[_0x3b89e9(0xef)];if(_0xa09cae){const _0x13387e=_0xa09cae['split'](',')[_0x3b89e9(0x7a)](_0x5e236b=>_0x5e236b[_0x3b89e9(0xee)]());_0x5cacce=_0x179dc8[_0x3b89e9(0xef)]['filter'](_0x2d8ed7=>_0x13387e[_0x3b89e9(0xb4)](_0x2d8ed7['name']));if(_0x5cacce[_0x3b89e9(0xc4)]===0x0)return console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0x9a)](_0x3b89e9(0xe8)+_0xa09cae)),console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xb0)](_0x3b89e9(0x98)+_0x179dc8['tests'][_0x3b89e9(0x7a)](_0x3b60de=>_0x3b60de['name'])[_0x3b89e9(0x6c)](',\x20'))),0x1;}if(_0x5b7863){const _0x471753=_0x5b7863[_0x3b89e9(0xa9)](',')[_0x3b89e9(0x7a)](_0x5f240d=>_0x5f240d[_0x3b89e9(0xee)]()[_0x3b89e9(0x90)]());_0x5cacce=_0x5cacce[_0x3b89e9(0xab)](_0x2cc53b=>_0x2cc53b[_0x3b89e9(0xbe)]?.[_0x3b89e9(0x8d)](_0x18c99d=>_0x471753[_0x3b89e9(0xb4)](_0x18c99d[_0x3b89e9(0x90)]())));if(_0x5cacce[_0x3b89e9(0xc4)]===0x0){console['log'](a5_0x98d02a[_0x3b89e9(0x9a)](_0x3b89e9(0xf0)+_0x5b7863));const _0x17ccd5=new Set();return _0x179dc8[_0x3b89e9(0xef)][_0x3b89e9(0xf3)](_0x111a38=>_0x111a38['tags']?.['forEach'](_0x56246c=>_0x17ccd5[_0x3b89e9(0x8f)](_0x56246c))),_0x17ccd5[_0x3b89e9(0xea)]>0x0?console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xb0)](_0x3b89e9(0x84)+[..._0x17ccd5][_0x3b89e9(0x6c)](',\x20'))):console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xb0)](_0x3b89e9(0xa7))),0x1;}}if(_0x489646)return this[_0x3b89e9(0xd9)](_0x6200c4,{'definition':{'tests':_0x5cacce},'agentInfo':_0x3cccba,'outputFormat':_0x330772,'outputFile':_0x4542d1,'testNames':_0xa09cae});if(_0x1d6f15){console[_0x3b89e9(0x74)](a5_0x98d02a['cyan'](_0x3b89e9(0xc8))),console[_0x3b89e9(0x74)](_0x3b89e9(0xf1)+a5_0x98d02a[_0x3b89e9(0xcc)](_0x2bb6c8)),console[_0x3b89e9(0x74)]('\x20\x20Project:\x20'+a5_0x98d02a[_0x3b89e9(0xcc)](_0x3cccba['projectName'])),console['log'](_0x3b89e9(0xb9)+a5_0x98d02a[_0x3b89e9(0xcc)](_0x3cccba[_0x3b89e9(0xcf)])),console[_0x3b89e9(0x74)](),console['log'](_0x3b89e9(0xe3)+a5_0x98d02a[_0x3b89e9(0xcc)](_0x5cacce[_0x3b89e9(0xc4)]));for(let _0x1a8906=0x0;_0x1a8906<_0x5cacce[_0x3b89e9(0xc4)];_0x1a8906++){const _0x1efe09=_0x5cacce[_0x1a8906],_0x26e08b=_0x1efe09[_0x3b89e9(0xce)][_0x3b89e9(0xc4)]===0x1?_0x3b89e9(0x85):'rounds',_0x560309=_0x1efe09['tags']?.['length']?'\x20['+_0x1efe09[_0x3b89e9(0xbe)][_0x3b89e9(0x6c)](',\x20')+']':'';console[_0x3b89e9(0x74)]('\x20\x20'+(_0x1a8906+0x1)+'.\x20'+a5_0x98d02a[_0x3b89e9(0xcc)](_0x1efe09[_0x3b89e9(0x70)])+'\x20('+_0x1efe09[_0x3b89e9(0xce)][_0x3b89e9(0xc4)]+'\x20'+_0x26e08b+')'+a5_0x98d02a[_0x3b89e9(0xb0)](_0x560309));}return 0x0;}let _0x41e51a,_0x47618e;try{_0x41e51a=await _0x19838c['llm'][_0x3b89e9(0x99)](_0x3cccba[_0x3b89e9(0xa8)]);}catch(_0x48e0b4){const _0x293ba5=_0x48e0b4 instanceof Error?_0x48e0b4[_0x3b89e9(0x9b)]:String(_0x48e0b4);return _0x293ba5['includes'](_0x3b89e9(0xc2))||_0x293ba5[_0x3b89e9(0x90)]()['includes'](_0x3b89e9(0x83))?console[_0x3b89e9(0x74)](a5_0x98d02a['red'](_0x3b89e9(0xd1)+_0x3cccba['projectName'])):console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xd7)]('✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22'+_0x3cccba[_0x3b89e9(0xa8)]+'\x22:\x20'+_0x293ba5)),0x1;}try{_0x47618e=await _0x19838c['llm'][_0x3b89e9(0xb6)](_0x3cccba[_0x3b89e9(0xcf)],_0x41e51a);}catch(_0x379b35){const _0x591d81=_0x379b35 instanceof Error?_0x379b35[_0x3b89e9(0x9b)]:String(_0x379b35);return _0x591d81['includes'](_0x3b89e9(0xc2))||_0x591d81[_0x3b89e9(0x90)]()['includes']('not\x20found')?console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xd7)](_0x3b89e9(0x7b)+_0x3cccba[_0x3b89e9(0xcf)])):console[_0x3b89e9(0x74)](a5_0x98d02a['red'](_0x3b89e9(0xe7)+_0x3cccba[_0x3b89e9(0xcf)]+'\x22:\x20'+_0x591d81)),0x1;}let _0x52a44b;if(!_0x10fea7)try{_0x52a44b=await setupEvaluatorAgent(_0x19838c[_0x3b89e9(0xcb)],_0x34c793[_0x3b89e9(0x96)]);}catch(_0x3f9bb6){const _0x142783=_0x3f9bb6 instanceof Error?_0x3f9bb6['message']:String(_0x3f9bb6);return console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xd7)](_0x3b89e9(0xf5)+_0x142783)),0x1;}console[_0x3b89e9(0x74)](a5_0x98d02a['cyan']('Running\x20agent\x20tests...')),console['log']('Site:\x20'+a5_0x98d02a['white'](_0x2bb6c8)),console[_0x3b89e9(0x74)](_0x3b89e9(0x6d)+a5_0x98d02a[_0x3b89e9(0xcc)](_0x3cccba[_0x3b89e9(0xa8)]+'/'+_0x3cccba[_0x3b89e9(0xcf)])),console[_0x3b89e9(0x74)]();const _0xca9bab=[],_0x57b103=[],_0x426964=Date['now']();for(let _0x251db2=0x0;_0x251db2<_0x5cacce[_0x3b89e9(0xc4)];_0x251db2++){const _0x3909f7=_0x5cacce[_0x251db2];_0x5cacce[_0x3b89e9(0xc4)]>0x1?console[_0x3b89e9(0x74)](_0x3b89e9(0xd3)+(_0x251db2+0x1)+'/'+_0x5cacce[_0x3b89e9(0xc4)]+':\x20'+a5_0x98d02a['white'](_0x3909f7[_0x3b89e9(0x70)])):console[_0x3b89e9(0x74)](_0x3b89e9(0xeb)+a5_0x98d02a[_0x3b89e9(0xcc)](_0x3909f7[_0x3b89e9(0x70)]));const _0x434af1=createCommandSpinner(_0x3b89e9(0xd6)+_0x3909f7['rounds']['length']+':\x20Sending\x20user\x20input...');_0x434af1['start']();try{const {result:_0x2154d4,conversation:_0x433f36}=await runTest(_0x19838c[_0x3b89e9(0xcb)],_0x3909f7,{'agentId':_0x47618e,'projectId':_0x41e51a,'site':_0x2bb6c8,'noEval':_0x10fea7,'evaluatorId':_0x52a44b,'onRoundStart':(_0xcf3963,_0x2a94f2)=>{const _0x397218=_0x3b89e9;_0x434af1[_0x397218(0x100)]='Round\x20'+(_0xcf3963+0x1)+'/'+_0x2a94f2+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x3d8d11,_0x2bb75f,_0x54b179)=>{const _0x53d943=_0x3b89e9,_0x4d223c=formatElapsed(_0x2bb75f);_0x54b179?console['log'](_0x53d943(0xa2)+(_0x3d8d11+0x1)+'/'+_0x3909f7['rounds'][_0x53d943(0xc4)]+_0x53d943(0xa1)+a5_0x98d02a['green']('✓')+'\x20('+_0x4d223c+')'):console['log'](_0x53d943(0xa2)+(_0x3d8d11+0x1)+'/'+_0x3909f7['rounds']['length']+_0x53d943(0xa1)+a5_0x98d02a[_0x53d943(0xd7)]('✗'));},'onEvaluationStart':()=>{_0x434af1['text']='Evaluating\x20response...';},'onEvaluationComplete':_0x7cfdd1=>{const _0x1d9fab=_0x3b89e9,_0x3dfba3=formatElapsed(_0x7cfdd1);console[_0x1d9fab(0x74)](_0x1d9fab(0xca)+a5_0x98d02a[_0x1d9fab(0xe2)]('✓')+'\x20('+_0x3dfba3+')');}});_0x434af1[_0x3b89e9(0xb2)](),_0xca9bab[_0x3b89e9(0x6e)](_0x2154d4),_0x57b103[_0x3b89e9(0x6e)](_0x433f36);if(_0x2154d4['status']===_0x3b89e9(0x9d))console['log'](a5_0x98d02a[_0x3b89e9(0xe2)]('✓\x20PASS:\x20'+_0x2154d4['reason']));else _0x2154d4[_0x3b89e9(0xfb)]==='FAIL'?console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xd7)]('✗\x20FAIL:\x20'+_0x2154d4[_0x3b89e9(0x8c)])):console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xd7)]('✗\x20ERROR:\x20'+_0x2154d4[_0x3b89e9(0x8c)]));_0x2154d4['conversation_url']&&console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xb0)]('Conversation\x20URL:\x20'+_0x2154d4[_0x3b89e9(0xb8)])),console[_0x3b89e9(0x74)]();}catch(_0x358581){_0x434af1[_0x3b89e9(0xb2)]();const _0x332c00=_0x358581 instanceof Error?_0x358581['message']:String(_0x358581);console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xd7)](_0x3b89e9(0x95)+_0x332c00)),console['log'](),_0xca9bab[_0x3b89e9(0x6e)]({'name':_0x3909f7[_0x3b89e9(0x70)],'status':'ERROR','reason':_0x332c00,'timestamp':new Date()[_0x3b89e9(0xac)](),'duration_ms':0x0});}}const _0x4aea15=Date['now']()-_0x426964,_0x47e284=_0xca9bab[_0x3b89e9(0xab)](_0x10dbe8=>_0x10dbe8[_0x3b89e9(0xfb)]===_0x3b89e9(0x9d))['length'],_0x1c6857=_0xca9bab['filter'](_0x2f4a22=>_0x2f4a22['status']===_0x3b89e9(0xc3))[_0x3b89e9(0xc4)],_0x597aac=_0xca9bab['filter'](_0x5d5d32=>_0x5d5d32[_0x3b89e9(0xfb)]==='ERROR')[_0x3b89e9(0xc4)];console['log']('━'[_0x3b89e9(0xb1)](0x3c)),console[_0x3b89e9(0x74)](_0x3b89e9(0x89)),console['log']('━'[_0x3b89e9(0xb1)](0x3c)),console[_0x3b89e9(0x74)](_0x3b89e9(0xe1)+_0xca9bab[_0x3b89e9(0xc4)]),console['log'](_0x3b89e9(0x9c)+a5_0x98d02a[_0x3b89e9(0xe2)](_0x47e284)),console['log'](_0x3b89e9(0x86)+a5_0x98d02a['red'](_0x1c6857));_0x597aac>0x0&&console[_0x3b89e9(0x74)]('Errors:\x20\x20\x20'+a5_0x98d02a[_0x3b89e9(0xd7)](_0x597aac));console['log'](_0x3b89e9(0xc0)+formatElapsed(_0x4aea15)),console[_0x3b89e9(0x74)]('━'[_0x3b89e9(0xb1)](0x3c));const _0x7c6cfe=_0xca9bab[_0x3b89e9(0xab)](_0x23ca2d=>_0x23ca2d[_0x3b89e9(0xfb)]!==_0x3b89e9(0x9d));if(_0x7c6cfe['length']>0x0){console['log'](),console[_0x3b89e9(0x74)](_0x3b89e9(0xfd));for(const _0x2c2e2e of _0x7c6cfe){const _0x33d17f=a5_0x98d02a[_0x3b89e9(0xd7)]('✗'),_0x464f49=_0x2c2e2e[_0x3b89e9(0x8c)][_0x3b89e9(0xc4)]>0x32?_0x2c2e2e[_0x3b89e9(0x8c)]['substring'](0x0,0x32)+'...':_0x2c2e2e['reason'];console[_0x3b89e9(0x74)]('\x20\x20'+_0x33d17f+'\x20'+_0x2c2e2e[_0x3b89e9(0x70)]+':\x20'+_0x464f49);}}const _0x266ab6={'summary':{'total':_0xca9bab[_0x3b89e9(0xc4)],'passed':_0x47e284,'failed':_0x1c6857,'errors':_0x597aac>0x0?_0x597aac:undefined,'duration_ms':_0x4aea15},'tests':_0xca9bab,'agent':{'project':_0x3cccba[_0x3b89e9(0xa8)],'name':_0x3cccba[_0x3b89e9(0xcf)],'site':_0x2bb6c8},'timestamp':new Date(_0x426964)[_0x3b89e9(0xac)]()};try{const _0x4b5fad=buildCachedTestRun(_0x57b103,{'site':_0x2bb6c8,'projectId':_0x41e51a,'projectName':_0x3cccba[_0x3b89e9(0xa8)],'agentId':_0x47618e,'agentName':_0x3cccba[_0x3b89e9(0xcf)],'testYmlPath':a5_0x517870['resolve'](_0x3cccba['testYmlPath'])});saveLastTestRun(_0x4b5fad);}catch{}if(_0x330772!==_0x3b89e9(0x88)||_0x4542d1){const _0x45fc93=formatResults(_0x266ab6,_0x330772);if(_0x4542d1)try{a5_0x5dd9e7['writeFileSync'](_0x4542d1,_0x45fc93,'utf-8'),console['log'](),console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xb0)]('Output\x20written\x20to:\x20'+_0x4542d1));}catch(_0x344d36){return console[_0x3b89e9(0x74)](),console[_0x3b89e9(0x74)](a5_0x98d02a[_0x3b89e9(0xd7)](_0x3b89e9(0xf6)+_0x344d36)),0x1;}else console[_0x3b89e9(0x74)](),console[_0x3b89e9(0x74)](_0x45fc93);}return _0x7c6cfe[_0x3b89e9(0xc4)]>0x0?0x1:0x0;}async[a5_0x2db1c7(0xd9)](_0x503460,_0x1a0723){const _0x577257=a5_0x2db1c7,{options:_0xa55db,tdx:_0x558fae}=_0x503460,{definition:_0x2867ae,agentInfo:_0x46416b,outputFormat:_0x7d3f9,outputFile:_0x335dd4}=_0x1a0723,_0x258f70=_0xa55db['site'],_0x5792ba=loadLastTestRun();if(!_0x5792ba)return console[_0x577257(0x74)](a5_0x98d02a['red'](_0x577257(0xde))),console['log'](a5_0x98d02a['dim'](_0x577257(0xb7))),0x1;if(_0x5792ba[_0x577257(0x94)][_0x577257(0xcf)]!==_0x46416b[_0x577257(0xcf)])return console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xd7)](_0x577257(0xe6)+_0x5792ba['agent'][_0x577257(0xcf)]+_0x577257(0xf7)+_0x46416b[_0x577257(0xcf)]+'\x22.')),console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xb0)](_0x577257(0xc9))),0x1;const _0x5c98e4=new Set(_0x5792ba[_0x577257(0x82)][_0x577257(0x7a)](_0x422605=>_0x422605[_0x577257(0xd8)])),_0x155012=_0x2867ae['tests']['filter'](_0x18a2c3=>!_0x5c98e4[_0x577257(0x79)](_0x18a2c3[_0x577257(0x70)]));if(_0x155012['length']>0x0&&_0x5792ba[_0x577257(0x93)]!==_0x258f70)return console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xd7)](_0x577257(0xec))),console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xb0)](_0x577257(0xf8)+_0x5792ba[_0x577257(0x93)]+_0x577257(0x8e)+_0x258f70+'\x22.')),console['log'](a5_0x98d02a[_0x577257(0xb0)]('Either\x20switch\x20to\x20the\x20\x22'+_0x5792ba[_0x577257(0x93)]+_0x577257(0x72))),0x1;const _0x4ecfbc=_0x2867ae[_0x577257(0xef)][_0x577257(0xab)](_0x33c570=>_0x5c98e4[_0x577257(0x79)](_0x33c570[_0x577257(0x70)])),_0x2c88ff=_0x155012;let _0xd24cde;try{_0xd24cde=await setupEvaluatorAgent(_0x558fae[_0x577257(0xcb)],_0xa55db[_0x577257(0x96)]);}catch(_0x382d04){const _0x382b7a=_0x382d04 instanceof Error?_0x382d04['message']:String(_0x382d04);return console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xd7)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x382b7a)),0x1;}console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xdf)](_0x577257(0xc6))),console[_0x577257(0x74)](_0x577257(0x9f)+a5_0x98d02a['white'](_0x5792ba[_0x577257(0xbc)])),console[_0x577257(0x74)](_0x577257(0x6d)+a5_0x98d02a['white'](_0x5792ba[_0x577257(0x94)][_0x577257(0xa8)]+'/'+_0x5792ba['agent'][_0x577257(0xcf)]));_0x2c88ff[_0x577257(0xc4)]>0x0&&console['log']('New\x20tests\x20to\x20execute:\x20'+a5_0x98d02a[_0x577257(0x9a)](_0x2c88ff['length']));console[_0x577257(0x74)]();const _0x525972=[],_0x563718=Date[_0x577257(0xa0)](),_0x4a8b25=createCommandSpinner(_0x577257(0x73));if(_0x4ecfbc[_0x577257(0xc4)]>0x0)try{const _0x2a948c=await reevaluateFromCache(_0x558fae[_0x577257(0xcb)],_0x5792ba,{'tests':_0x4ecfbc},{'evaluatorId':_0xd24cde,'onTestStart':(_0x47f851,_0x3d9566,_0xbd1c0a)=>{const _0x35e41d=_0x577257;_0x4a8b25[_0x35e41d(0x100)]=_0x35e41d(0x101)+(_0x3d9566+0x1)+'/'+_0xbd1c0a+':\x20'+_0x47f851+_0x35e41d(0x71);if(!_0x4a8b25[_0x35e41d(0xff)])_0x4a8b25[_0x35e41d(0xbf)]();},'onTestComplete':(_0x3ba9ae,_0x1747a5)=>{const _0x2bdb9e=_0x577257;_0x4a8b25[_0x2bdb9e(0xb2)]();if(_0x1747a5[_0x2bdb9e(0xfb)]===_0x2bdb9e(0x9d))console[_0x2bdb9e(0x74)](a5_0x98d02a['green']('✓\x20PASS:\x20'+_0x3ba9ae)+a5_0x98d02a[_0x2bdb9e(0xb0)](_0x2bdb9e(0xcd)));else _0x1747a5[_0x2bdb9e(0xfb)]===_0x2bdb9e(0xc3)?console[_0x2bdb9e(0x74)](a5_0x98d02a[_0x2bdb9e(0xd7)](_0x2bdb9e(0xc1)+_0x3ba9ae+_0x2bdb9e(0xa6)+_0x1747a5[_0x2bdb9e(0x8c)])+a5_0x98d02a[_0x2bdb9e(0xb0)](_0x2bdb9e(0xcd))):console[_0x2bdb9e(0x74)](a5_0x98d02a[_0x2bdb9e(0xd7)](_0x2bdb9e(0x95)+_0x3ba9ae+_0x2bdb9e(0xa6)+_0x1747a5[_0x2bdb9e(0x8c)]));_0x1747a5['conversation_url']&&console[_0x2bdb9e(0x74)](a5_0x98d02a[_0x2bdb9e(0xb0)](_0x2bdb9e(0xa4)+_0x1747a5['conversation_url'])),_0x525972[_0x2bdb9e(0x6e)](_0x1747a5);},'onTestSkipped':(_0x2ad5bf,_0x4977ac)=>{const _0x297c7a=_0x577257;_0x4a8b25['stop'](),console[_0x297c7a(0x74)](a5_0x98d02a[_0x297c7a(0x9a)](_0x297c7a(0xaf)+_0x2ad5bf+_0x297c7a(0xa6)+_0x4977ac));}});for(const _0x197b72 of _0x2a948c){!_0x525972[_0x577257(0xb3)](_0x75b25f=>_0x75b25f[_0x577257(0x70)]===_0x197b72[_0x577257(0x70)])&&_0x525972['push'](_0x197b72);}}catch(_0x2e33a0){_0x4a8b25['stop']();const _0x2fcd4c=_0x2e33a0 instanceof Error?_0x2e33a0[_0x577257(0x9b)]:String(_0x2e33a0);return console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xd7)](_0x577257(0xe5)+_0x2fcd4c)),0x1;}_0x4a8b25[_0x577257(0xb2)]();if(_0x2c88ff['length']>0x0){console[_0x577257(0x74)](),console['log'](a5_0x98d02a[_0x577257(0xdf)](_0x577257(0xa5)));const {projectId:_0x45463a,agentId:_0x3f35e9}=_0x5792ba[_0x577257(0x94)];for(const _0x395ed4 of _0x2c88ff){console[_0x577257(0x74)](_0x577257(0xdc)+a5_0x98d02a[_0x577257(0xcc)](_0x395ed4[_0x577257(0x70)]));const _0x304d32=createCommandSpinner(_0x577257(0xd6)+_0x395ed4[_0x577257(0xce)]['length']+_0x577257(0x7e));_0x304d32[_0x577257(0xbf)]();try{const {result:_0x4adc26}=await runTest(_0x558fae[_0x577257(0xcb)],_0x395ed4,{'agentId':_0x3f35e9,'projectId':_0x45463a,'site':_0x5792ba['site'],'noEval':![],'evaluatorId':_0xd24cde,'onRoundStart':(_0x4f0434,_0x27aebf)=>{const _0x5d0030=_0x577257;_0x304d32['text']='Round\x20'+(_0x4f0434+0x1)+'/'+_0x27aebf+_0x5d0030(0x7e);},'onRoundComplete':(_0x38ac52,_0x9b39d0,_0x222f70)=>{const _0x369f47=_0x577257,_0x38e77d=formatElapsed(_0x9b39d0);_0x222f70?console[_0x369f47(0x74)](_0x369f47(0xa2)+(_0x38ac52+0x1)+'/'+_0x395ed4['rounds'][_0x369f47(0xc4)]+_0x369f47(0xa1)+a5_0x98d02a[_0x369f47(0xe2)]('✓')+'\x20('+_0x38e77d+')'):console[_0x369f47(0x74)](_0x369f47(0xa2)+(_0x38ac52+0x1)+'/'+_0x395ed4['rounds'][_0x369f47(0xc4)]+_0x369f47(0xa1)+a5_0x98d02a[_0x369f47(0xd7)]('✗'));},'onEvaluationStart':()=>{const _0xa6b414=_0x577257;_0x304d32['text']=_0xa6b414(0xc5);},'onEvaluationComplete':_0x572c9f=>{const _0x5be7fa=_0x577257,_0x153933=formatElapsed(_0x572c9f);console[_0x5be7fa(0x74)]('\x20\x20Evaluating...\x20'+a5_0x98d02a[_0x5be7fa(0xe2)]('✓')+'\x20('+_0x153933+')');}});_0x304d32[_0x577257(0xb2)](),_0x525972[_0x577257(0x6e)](_0x4adc26);if(_0x4adc26[_0x577257(0xfb)]===_0x577257(0x9d))console[_0x577257(0x74)](a5_0x98d02a['green'](_0x577257(0xc7)+_0x4adc26['reason'])+a5_0x98d02a[_0x577257(0xb0)]('\x20(new)'));else _0x4adc26[_0x577257(0xfb)]===_0x577257(0xc3)?console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xd7)](_0x577257(0xc1)+_0x4adc26[_0x577257(0x8c)])+a5_0x98d02a[_0x577257(0xb0)](_0x577257(0x7c))):console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xd7)](_0x577257(0x95)+_0x4adc26[_0x577257(0x8c)]));_0x4adc26[_0x577257(0xb8)]&&console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xb0)](_0x577257(0xa4)+_0x4adc26[_0x577257(0xb8)]));}catch(_0x3a87b2){_0x304d32[_0x577257(0xb2)]();const _0x7d539e=_0x3a87b2 instanceof Error?_0x3a87b2[_0x577257(0x9b)]:String(_0x3a87b2);console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xd7)](_0x577257(0x95)+_0x7d539e)),_0x525972[_0x577257(0x6e)]({'name':_0x395ed4['name'],'status':'ERROR','reason':_0x7d539e,'timestamp':new Date()[_0x577257(0xac)](),'duration_ms':0x0});}}}console[_0x577257(0x74)]();const _0x27e9ff=Date[_0x577257(0xa0)]()-_0x563718,_0x5cde0d=_0x525972[_0x577257(0xab)](_0x1ac2c3=>_0x1ac2c3[_0x577257(0xfb)]===_0x577257(0x9d))['length'],_0x35df4d=_0x525972[_0x577257(0xab)](_0xe02fa5=>_0xe02fa5[_0x577257(0xfb)]===_0x577257(0xc3))['length'],_0xf91130=_0x525972['filter'](_0x569e08=>_0x569e08[_0x577257(0xfb)]===_0x577257(0x9e))[_0x577257(0xc4)];console['log']('━'[_0x577257(0xb1)](0x3c)),console[_0x577257(0x74)](_0x577257(0x8a)),console[_0x577257(0x74)]('━'['repeat'](0x3c)),console['log'](_0x577257(0xe1)+_0x525972[_0x577257(0xc4)]),console[_0x577257(0x74)]('Passed:\x20\x20\x20'+a5_0x98d02a[_0x577257(0xe2)](_0x5cde0d)),console[_0x577257(0x74)]('Failed:\x20\x20\x20'+a5_0x98d02a[_0x577257(0xd7)](_0x35df4d));_0xf91130>0x0&&console[_0x577257(0x74)](_0x577257(0xfa)+a5_0x98d02a[_0x577257(0xd7)](_0xf91130));console[_0x577257(0x74)](_0x577257(0xc0)+formatElapsed(_0x27e9ff)),console['log']('━'[_0x577257(0xb1)](0x3c));const _0x1cd935={'summary':{'total':_0x525972[_0x577257(0xc4)],'passed':_0x5cde0d,'failed':_0x35df4d,'errors':_0xf91130>0x0?_0xf91130:undefined,'duration_ms':_0x27e9ff},'tests':_0x525972,'agent':{'project':_0x46416b[_0x577257(0xa8)],'name':_0x46416b['agentName'],'site':_0x258f70},'timestamp':new Date(_0x563718)[_0x577257(0xac)]()};if(_0x7d3f9!=='table'||_0x335dd4){const _0x512954=formatResults(_0x1cd935,_0x7d3f9);if(_0x335dd4)try{a5_0x5dd9e7[_0x577257(0xbb)](_0x335dd4,_0x512954,_0x577257(0x77)),console[_0x577257(0x74)](),console[_0x577257(0x74)](a5_0x98d02a[_0x577257(0xb0)](_0x577257(0xe0)+_0x335dd4));}catch(_0xb93f6c){return console[_0x577257(0x74)](),console['log'](a5_0x98d02a[_0x577257(0xd7)]('Error\x20writing\x20output\x20file:\x20'+_0xb93f6c)),0x1;}else console[_0x577257(0x74)](),console[_0x577257(0x74)](_0x512954);}const _0x36e118=_0x525972[_0x577257(0xab)](_0x4d916d=>_0x4d916d[_0x577257(0xfb)]!==_0x577257(0x9d));return _0x36e118[_0x577257(0xc4)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x197316=a6_0x9cbb;(function(_0x23c7b4,_0x478299){const _0x2c88ac=a6_0x9cbb,_0x58498b=_0x23c7b4();while(!![]){try{const _0x573cea=-parseInt(_0x2c88ac(0x1f4))/0x1*(parseInt(_0x2c88ac(0x1e3))/0x2)+-parseInt(_0x2c88ac(0x1c7))/0x3+parseInt(_0x2c88ac(0x1e9))/0x4*(-parseInt(_0x2c88ac(0x1ee))/0x5)+-parseInt(_0x2c88ac(0x1bb))/0x6*(-parseInt(_0x2c88ac(0x1ce))/0x7)+-parseInt(_0x2c88ac(0x1df))/0x8+-parseInt(_0x2c88ac(0x1d0))/0x9*(parseInt(_0x2c88ac(0x1f0))/0xa)+parseInt(_0x2c88ac(0x1d5))/0xb;if(_0x573cea===_0x478299)break;else _0x58498b['push'](_0x58498b['shift']());}catch(_0x13b119){_0x58498b['push'](_0x58498b['shift']());}}}(a6_0x439a,0x74872));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';function a6_0x9cbb(_0x2342d1,_0x5ee1de){_0x2342d1=_0x2342d1-0x1b4;const _0x439a4c=a6_0x439a();let _0x9cbb7=_0x439a4c[_0x2342d1];return _0x9cbb7;}const SENSITIVE_HEADERS=new Set([a6_0x197316(0x1dd),a6_0x197316(0x1c9),'cookie',a6_0x197316(0x1e7),a6_0x197316(0x1db),a6_0x197316(0x1b9),a6_0x197316(0x1ed),a6_0x197316(0x1bd)]);function a6_0x439a(){const _0x3859de=['Endpoint\x20must\x20start\x20with\x20/:\x20','verbose','Error:\x20','set-cookie','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','396YCHXVH','status','Invalid\x20API\x20type:\x20','llm-proxy','x-auth-token','42270VMEWMl','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','6902330icxqTE','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','toUpperCase','error','281pltKKs','stack','isArray','<\x20HTTP/1.1\x20','Invalid\x20HTTP\x20method:\x20','request','join','type','readBodyFromFile','name','trino','entries','x-xsrf-token','substring','4332xiEMGN','body','x-trino-user','.\x20Valid\x20types:\x20','includes','GET','cdp','Results\x20saved\x20to\x20','headers','color','keys','workflow','1261053lRYBku','method','proxy-authorization','validate','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','PATCH','file','8561ynYVix','length','9gxTgRb','llm','DELETE','startsWith','trim','22783123AgfFQC','output','\x22.\x20','Invalid\x20header\x20format:\x20\x22','site','toLowerCase','set-cookie2','message','authorization','api','3311040eEYbvk','noColor','PUT','description','822CiqaLT'];a6_0x439a=function(){return _0x3859de;};return a6_0x439a();}function isSensitiveHeader(_0x2398c0){const _0x401000=a6_0x197316;return SENSITIVE_HEADERS['has'](_0x2398c0[_0x401000(0x1da)]());}function parseHeader(_0x2fbccb){const _0x40b268=a6_0x197316,_0x481bd6=_0x2fbccb['indexOf'](':');if(_0x481bd6===-0x1)throw new Error(_0x40b268(0x1d8)+_0x2fbccb+_0x40b268(0x1d7)+_0x40b268(0x1cb));const _0x193083=_0x2fbccb[_0x40b268(0x1ba)](0x0,_0x481bd6)[_0x40b268(0x1d4)](),_0x1b195b=_0x2fbccb[_0x40b268(0x1ba)](_0x481bd6+0x1)[_0x40b268(0x1d4)]();if(!_0x193083)throw new Error('Header\x20key\x20cannot\x20be\x20empty:\x20\x22'+_0x2fbccb+'\x22');return[_0x193083,_0x1b195b];}export class ApiCommand extends BaseCommand{[a6_0x197316(0x1b6)]=a6_0x197316(0x1de);[a6_0x197316(0x1e2)]=a6_0x197316(0x1ef);[a6_0x197316(0x1ca)](_0x4bd894){const _0x32f414=a6_0x197316,{args:_0x5452fc,options:_0x5839c3}=_0x4bd894,_0x55f21f=_0x5839c3;if(_0x5452fc[_0x32f414(0x1cf)]===0x0)return _0x32f414(0x1e8);const _0x3e3730=_0x5452fc[0x0];if(!_0x3e3730[_0x32f414(0x1d3)]('/'))return _0x32f414(0x1e4)+_0x3e3730;const _0x357dde=_0x55f21f['data'],_0x486b1c=_0x55f21f['file'];if(_0x357dde&&_0x486b1c)return _0x32f414(0x1f1);const _0x51d1da=_0x55f21f[_0x32f414(0x1c8)]||_0x32f414(0x1c0),_0x2bc242=[_0x32f414(0x1c0),'POST',_0x32f414(0x1e1),_0x32f414(0x1d2),_0x32f414(0x1cc)];if(!_0x2bc242['includes'](_0x51d1da[_0x32f414(0x1f2)]()))return _0x32f414(0x1f8)+_0x51d1da+'.\x20Valid\x20methods:\x20'+_0x2bc242[_0x32f414(0x1fa)](',\x20');const _0x38f0db=_0x55f21f['type']||'td',_0x46cd5b=['td',_0x32f414(0x1c1),_0x32f414(0x1c6),_0x32f414(0x1b7),_0x32f414(0x1d1),_0x32f414(0x1ec)];if(!_0x46cd5b[_0x32f414(0x1bf)](_0x38f0db))return _0x32f414(0x1eb)+_0x38f0db+_0x32f414(0x1be)+_0x46cd5b[_0x32f414(0x1fa)](',\x20');return undefined;}async['execute'](_0x3fc6c4){const _0x1aca66=a6_0x197316,{options:_0x3b78ed,args:_0x3edd36,tdx:_0x10dc6b}=_0x3fc6c4,_0xca3640=_0x3b78ed,_0x4f7606=_0x3edd36[0x0],_0x446dac=(_0xca3640[_0x1aca66(0x1c8)]||_0x1aca66(0x1c0))[_0x1aca66(0x1f2)](),_0x5ac3cd=_0xca3640['data'],_0x5c4ec3=_0xca3640[_0x1aca66(0x1cd)],_0x49d888=_0xca3640['header'],_0x5a4401=_0xca3640[_0x1aca66(0x1b4)]||'td';try{const _0x25f5cc={};if(_0x49d888){const _0x4e0e0c=Array[_0x1aca66(0x1f6)](_0x49d888)?_0x49d888:[_0x49d888];for(const _0x587233 of _0x4e0e0c){const [_0x152d4a,_0x1a7b45]=parseHeader(_0x587233);_0x25f5cc[_0x152d4a]=_0x1a7b45;}}let _0x14d4ad;if(_0x5ac3cd)_0x14d4ad=_0x5ac3cd;else{if(_0x5c4ec3)try{_0x14d4ad=RawAPI[_0x1aca66(0x1b5)](_0x5c4ec3);}catch(_0x2fc84e){return console[_0x1aca66(0x1f3)]('Error:\x20'+(_0x2fc84e instanceof Error?_0x2fc84e[_0x1aca66(0x1dc)]:String(_0x2fc84e))),0x1;}}const _0x3c83d6={'method':_0x446dac,'apiType':_0x5a4401,'includeHeaders':_0x3b78ed[_0x1aca66(0x1e5)]};_0x14d4ad&&(_0x3c83d6[_0x1aca66(0x1bc)]=_0x14d4ad);Object[_0x1aca66(0x1c5)](_0x25f5cc)['length']>0x0&&(_0x3c83d6[_0x1aca66(0x1c3)]=_0x25f5cc);if(_0x3b78ed[_0x1aca66(0x1e5)]){const _0x4dfa4d=resolveSite(_0x3b78ed[_0x1aca66(0x1d9)]),_0x37076c=getEndpoint(_0x4dfa4d,_0x5a4401),_0xa91083=''+_0x37076c+_0x4f7606;console[_0x1aca66(0x1f3)]('>\x20'+_0x446dac+'\x20'+_0xa91083);const _0x2bf744=getAuthHeaders(_0x4dfa4d),_0xf9d61e={..._0x2bf744,..._0x25f5cc};for(const [_0x1e28a6,_0x15bd7a]of Object[_0x1aca66(0x1b8)](_0xf9d61e)){!isSensitiveHeader(_0x1e28a6)&&console[_0x1aca66(0x1f3)]('>\x20'+_0x1e28a6+':\x20'+_0x15bd7a);}_0x14d4ad&&console['error']('>'),console[_0x1aca66(0x1f3)]('');}const _0x4e6512=await _0x10dc6b[_0x1aca66(0x1de)][_0x1aca66(0x1f9)](_0x4f7606,_0x3c83d6);if(_0x3b78ed['verbose']&&_0x4e6512['headers']){console[_0x1aca66(0x1f3)](_0x1aca66(0x1f7)+_0x4e6512[_0x1aca66(0x1ea)]);for(const [_0x28f9c2,_0x376299]of Object['entries'](_0x4e6512[_0x1aca66(0x1c3)])){!isSensitiveHeader(_0x28f9c2)&&console[_0x1aca66(0x1f3)]('<\x20'+_0x28f9c2+':\x20'+_0x376299);}console[_0x1aca66(0x1f3)]('');}const _0x51805a=Boolean(_0x3b78ed[_0x1aca66(0x1d6)]),_0x57f37d={'color':_0x3b78ed[_0x1aca66(0x1c4)],'noColor':_0x3b78ed[_0x1aca66(0x1e0)]||_0x51805a&&!_0x3b78ed[_0x1aca66(0x1c4)]},_0x17f097=colorizeJSON(_0x4e6512['data'],_0x57f37d);return _0x3b78ed[_0x1aca66(0x1d6)]?(writeFileSync(_0x3b78ed[_0x1aca66(0x1d6)],_0x17f097),console[_0x1aca66(0x1f3)](_0x1aca66(0x1c2)+_0x3b78ed['output'])):console['log'](_0x17f097),0x0;}catch(_0x2f0653){return _0x2f0653 instanceof Error?(console['error']('Error:\x20'+_0x2f0653[_0x1aca66(0x1dc)]),_0x3b78ed[_0x1aca66(0x1e5)]&&_0x2f0653[_0x1aca66(0x1f5)]&&console['error']('\x0aStack\x20trace:\x0a'+_0x2f0653[_0x1aca66(0x1f5)])):console['error'](_0x1aca66(0x1e6)+String(_0x2f0653)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x3f8ae4=a7_0x1800;(function(_0x53a50e,_0x14876e){const _0x297b51=a7_0x1800,_0x1df7ff=_0x53a50e();while(!![]){try{const _0x5c121f=parseInt(_0x297b51(0x1a1))/0x1*(parseInt(_0x297b51(0x17a))/0x2)+parseInt(_0x297b51(0x185))/0x3+-parseInt(_0x297b51(0x183))/0x4*(-parseInt(_0x297b51(0x19e))/0x5)+-parseInt(_0x297b51(0x1b9))/0x6+parseInt(_0x297b51(0x192))/0x7*(parseInt(_0x297b51(0x179))/0x8)+parseInt(_0x297b51(0x184))/0x9+-parseInt(_0x297b51(0x1a0))/0xa*(parseInt(_0x297b51(0x196))/0xb);if(_0x5c121f===_0x14876e)break;else _0x1df7ff['push'](_0x1df7ff['shift']());}catch(_0x4546cb){_0x1df7ff['push'](_0x1df7ff['shift']());}}}(a7_0x3d48,0xc321a));import{BaseCommand,printAuthError}from'./command.js';function a7_0x1800(_0x506402,_0x2b5420){_0x506402=_0x506402-0x175;const _0x3d4859=a7_0x3d48();let _0x180028=_0x3d4859[_0x506402];return _0x180028;}import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{saveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';function a7_0x3d48(){const _0xa361e4=['ERROR','22sTgeKH','profile','auth:setup','getUserInfo','execute','bold','Name:\x20','site','615605aYbwjU','tdx\x20profile:\x20','14019770BSHRHY','94paZOIm','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','Setup\x20API\x20key\x20authentication\x20interactively','\x20(profile:\x20','trim','first_name','jobs','log','Site\x20name\x20cannot\x20be\x20empty','password','name','Read\x20credential\x20from\x20','Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','Enter\x20site\x20name:','✓\x20API\x20key\x20removed\x20from\x20keychain','✓\x20Profile\x20\x27','select','Select\x20your\x20Treasure\x20Data\x20site:','error','join','auth','apiKey','text','yellow','2115288QFifGv','\x20for\x20profile:\x20','No\x20credential\x20found','email','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','You\x20can\x20find\x20your\x20API\x20key\x20at:','message','Select\x20your\x20Treasure\x20Data\x20site\x20(for\x20profile:\x20','\x20(site:\x20','Setting\x20up\x20authentication\x20for\x20site:\x20','create','description','red','/app/mp/ak','232StVuwE','12472hVRhTS','customSite','System\x20keychain\x20is\x20not\x20available','status','Enter\x20your\x20TD\x20API\x20key:','last_name','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','No\x20API\x20key\x20found\x20in\x20keychain','\x20\x20tdx','4odQwsy','12489435LaYHyy','2038104VvhYIq','other','✓\x20Default\x20site\x20set\x20to\x20','us01','✗\x20Validation\x20failed:\x20','tdx:\x20auth\x20clear','\x0aSetup\x20cancelled','warn','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','Validating\x20API\x20key...','\x27\x20registered','Remove\x20API\x20key\x20from\x20system\x20keychain','tdx:\x20auth\x20setup','284676rSnCkk','auth:clear','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.'];a7_0x3d48=function(){return _0xa361e4;};return a7_0x3d48();}import{clearCredentialCache}from'../core/credential-cache.js';import{buildSiteChoices}from'../core/constants.js';import a7_0x295cda from'prompts';import{HTTPClientError}from'../sdk/client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a7_0x16d747 from'chalk';export class AuthSetupCommand extends BaseCommand{[a7_0x3f8ae4(0x1ab)]=a7_0x3f8ae4(0x198);[a7_0x3f8ae4(0x176)]=a7_0x3f8ae4(0x1a3);async['execute'](_0x8447b7){const _0x28cf35=a7_0x3f8ae4,{options:_0x1169f7}=_0x8447b7,_0x3a8641=_0x1169f7[_0x28cf35(0x197)];console[_0x28cf35(0x1a8)](a7_0x16d747['bold'](_0x28cf35(0x191)));const _0x304282=_0x1169f7[_0x28cf35(0x19d)]||_0x28cf35(0x188),{choices:_0x9bf4e0,initialIndex:_0x4c5c7c}=buildSiteChoices(_0x304282),_0x4a4b1b=_0x3a8641?_0x28cf35(0x1c1)+_0x3a8641+'):':_0x28cf35(0x1b2),_0x2e82f4=await a7_0x295cda({'type':_0x28cf35(0x1b1),'name':'site','message':_0x4a4b1b,'choices':_0x9bf4e0,'initial':_0x4c5c7c});if(!_0x2e82f4['site'])return console[_0x28cf35(0x1a8)](_0x28cf35(0x18b)),0x1;let _0x2ef00b;if(_0x2e82f4['site']===_0x28cf35(0x186)){const _0x44d636=await a7_0x295cda({'type':_0x28cf35(0x1b7),'name':'customSite','message':_0x28cf35(0x1ae),'initial':_0x28cf35(0x188),'validate':_0x2926a3=>{const _0x527dbc=_0x28cf35;if(!_0x2926a3||!_0x2926a3[_0x527dbc(0x1a5)]())return _0x527dbc(0x1a9);if(!/^[a-z0-9-]+$/['test'](_0x2926a3[_0x527dbc(0x1a5)]()))return _0x527dbc(0x1ad);return!![];}});if(!_0x44d636['customSite'])return console[_0x28cf35(0x1a8)](_0x28cf35(0x18b)),0x1;_0x2ef00b=_0x44d636[_0x28cf35(0x17b)];}else _0x2ef00b=_0x2e82f4[_0x28cf35(0x19d)];const _0x104887=resolveSite(_0x2ef00b);console['log'](_0x28cf35(0x1c3)+_0x104887),console[_0x28cf35(0x1a8)](_0x28cf35(0x1bf)),console[_0x28cf35(0x1a8)]('\x20\x20'+getConsoleUrl(_0x104887,_0x28cf35(0x178)));const _0x525c8e=await a7_0x295cda({'type':_0x28cf35(0x1aa),'name':'apiKey','message':_0x28cf35(0x17e),'validate':_0x59179a=>{const _0x14766e=_0x28cf35;if(!_0x59179a||!_0x59179a[_0x14766e(0x1a5)]())return'API\x20key\x20cannot\x20be\x20empty';return!![];}});if(!_0x525c8e[_0x28cf35(0x1b6)])return console['log'](_0x28cf35(0x18b)),0x1;const _0x148af4=_0x525c8e['apiKey'];console[_0x28cf35(0x1a8)](_0x28cf35(0x18e));try{const _0x2fc31d=TDX[_0x28cf35(0x175)]({'site':_0x104887,'apiKey':_0x148af4[_0x28cf35(0x1a5)](),'logLevel':_0x1169f7['logLevel']??LogLevel[_0x28cf35(0x195)]}),_0x387092=await _0x2fc31d[_0x28cf35(0x1a7)][_0x28cf35(0x199)]();console[_0x28cf35(0x1a8)](_0x28cf35(0x1be)+_0x387092[_0x28cf35(0x1bc)]+')');const _0x3f2eee=await isKeychainAvailable();_0x3f2eee?(await saveAPIKeyAsync(_0x148af4[_0x28cf35(0x1a5)](),_0x104887,_0x3a8641),console['log'](_0x28cf35(0x1a2)+(_0x3a8641?_0x28cf35(0x1a4)+_0x3a8641+')':''))):(console[_0x28cf35(0x18c)](a7_0x16d747[_0x28cf35(0x1b8)]('⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.')),console[_0x28cf35(0x18c)](a7_0x16d747[_0x28cf35(0x1b8)](_0x28cf35(0x180))));if(_0x3a8641){const _0x581496={'site':_0x104887};saveProfileToUserConfig(_0x3a8641,_0x581496),console[_0x28cf35(0x1a8)](_0x28cf35(0x1b0)+_0x3a8641+_0x28cf35(0x18f));}else saveDefaultSiteToUserConfig(_0x104887),console['log'](_0x28cf35(0x187)+_0x104887);const _0x26177c=_0x3a8641?'\x20--profile\x20'+_0x3a8641:'';return console[_0x28cf35(0x1a8)](),console[_0x28cf35(0x1a8)]('You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:'),console[_0x28cf35(0x1a8)](_0x28cf35(0x182)+_0x26177c+_0x28cf35(0x1bd)),console['log']('\x20\x20tdx'+_0x26177c+'\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases'),0x0;}catch(_0x42d9ee){if(_0x42d9ee instanceof HTTPClientError&&_0x42d9ee[_0x28cf35(0x17d)]===0x191)return printAuthError(_0x42d9ee),0x1;return console[_0x28cf35(0x1b3)](a7_0x16d747[_0x28cf35(0x177)](_0x28cf35(0x189)+(_0x42d9ee instanceof Error?_0x42d9ee[_0x28cf35(0x1c0)]:String(_0x42d9ee)))),console['error'](_0x28cf35(0x194)),0x1;}}}export class AuthStatusCommand extends BaseCommand{['name']=a7_0x3f8ae4(0x1b5);[a7_0x3f8ae4(0x176)]=a7_0x3f8ae4(0x18d);async[a7_0x3f8ae4(0x19a)](_0x164a36){const _0x108487=a7_0x3f8ae4,{options:_0x34e8e9,tdx:_0x1187fa}=_0x164a36,_0x62e885=_0x34e8e9['site'],_0x5cf9ef=_0x34e8e9[_0x108487(0x197)],_0x4f15a3=_0x5cf9ef?_0x5cf9ef:'N/A';console[_0x108487(0x1a8)](_0x108487(0x19f)+_0x4f15a3+_0x108487(0x1c2)+_0x62e885+')');const _0x4c8054=await resolveAPIKeyAsync(_0x62e885,_0x5cf9ef);if(_0x4c8054){const {source:_0x326251,isDeprecated:_0x2926d1}=_0x4c8054,_0x48704a=_0x108487(0x1ac)+_0x326251;console['log'](_0x2926d1?a7_0x16d747[_0x108487(0x1b8)](_0x48704a):_0x48704a);}else console[_0x108487(0x1a8)](a7_0x16d747[_0x108487(0x1b8)](_0x108487(0x1bb)));try{const _0x37c39b=await _0x1187fa[_0x108487(0x1a7)][_0x108487(0x199)]();return console[_0x108487(0x1a8)](a7_0x16d747['green']('✓\x20Authentication\x20successful\x0a')),console[_0x108487(0x1a8)]('User:\x20'+_0x37c39b[_0x108487(0x1bc)]),(_0x37c39b[_0x108487(0x1a6)]||_0x37c39b[_0x108487(0x17f)])&&console['log'](_0x108487(0x19c)+[_0x37c39b[_0x108487(0x1a6)],_0x37c39b[_0x108487(0x17f)]]['filter'](Boolean)[_0x108487(0x1b4)]('\x20')),0x0;}catch(_0x24a3a8){return _0x24a3a8 instanceof HTTPClientError&&_0x24a3a8['status']===0x191?printAuthError(_0x24a3a8,!![],_0x5cf9ef):console[_0x108487(0x1b3)](a7_0x16d747['red'](_0x108487(0x189)+(_0x24a3a8 instanceof Error?_0x24a3a8[_0x108487(0x1c0)]:String(_0x24a3a8)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a7_0x3f8ae4(0x1ab)]=a7_0x3f8ae4(0x193);[a7_0x3f8ae4(0x176)]=a7_0x3f8ae4(0x190);async['execute'](_0x114aba){const _0x53d824=a7_0x3f8ae4,{options:_0x3a3bbc}=_0x114aba,_0x44e386=_0x3a3bbc[_0x53d824(0x197)];console[_0x53d824(0x1a8)](a7_0x16d747[_0x53d824(0x19b)](_0x53d824(0x18a)));const _0x525853=await isKeychainAvailable();if(!_0x525853)return console[_0x53d824(0x1b3)](a7_0x16d747[_0x53d824(0x177)](_0x53d824(0x17c))),0x1;const _0x267ed3=await deleteKeychainAPIKey(_0x44e386);return _0x267ed3?(clearCredentialCache(),console[_0x53d824(0x1a8)](_0x53d824(0x1af)+(_0x44e386?_0x53d824(0x1a4)+_0x44e386+')':'')),0x0):(console[_0x53d824(0x1a8)](_0x53d824(0x181)+(_0x44e386?_0x53d824(0x1ba)+_0x44e386:'')),0x1);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x4c30bb=a8_0x4fea;function a8_0x4453(){const _0x147b12=['Continuing\x20chat:\x20','\x27...','Getting\x20default\x20agent...','Error:\x20','\x0aError:\x20','error','handleChatEvent','verbose','type','236rUCFqa','getDefaultAgent','execute','event','resolveAgentId','chatId','39402711FHeHFa','Resolving\x20agent\x20\x27','\x0aStack\x20trace:','write','Chat\x20session:\x20','6247330UnKUKd','code','Using\x20agent\x20from\x20','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)','304KydoNW','join','stdout','llm','agent','289924gAMwkL','cause','getOrCreateDefaultAgent','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','includes','metadata','CHAT_NOT_FOUND','\x20\x20Cause:\x20','404','log','--agent\x20flag','message','120491ANyjYS','llmAgent','9245676xjPhMD','streamChat','60495yrdyiy','stack','claude-4.5-haiku','getAgentId','data','llmProject','1286742iQxrtY','args','Using\x20cached\x20default\x20agent:\x20','validate','content'];a8_0x4453=function(){return _0x147b12;};return a8_0x4453();}(function(_0x1ae9ab,_0x57e42b){const _0x137162=a8_0x4fea,_0x453584=_0x1ae9ab();while(!![]){try{const _0x1ecc6b=parseInt(_0x137162(0xbb))/0x1+-parseInt(_0x137162(0xdd))/0x2+parseInt(_0x137162(0xb5))/0x3*(-parseInt(_0x137162(0xc9))/0x4)+-parseInt(_0x137162(0xd4))/0x5+-parseInt(_0x137162(0xb3))/0x6+parseInt(_0x137162(0xb1))/0x7*(-parseInt(_0x137162(0xd8))/0x8)+parseInt(_0x137162(0xcf))/0x9;if(_0x1ecc6b===_0x57e42b)break;else _0x453584['push'](_0x453584['shift']());}catch(_0x310f1f){_0x453584['push'](_0x453584['shift']());}}}(a8_0x4453,0xd8372));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{saveLastChatId,loadLastChatId}from'../sdk/llm/chat-cache.js';function a8_0x4fea(_0x3d88a8,_0xe7f25){_0x3d88a8=_0x3d88a8-0xab;const _0x4453b7=a8_0x4453();let _0x4feafb=_0x4453b7[_0x3d88a8];return _0x4feafb;}function handleSDKError(_0x2b73e9,_0x1a3888){const _0x939d76=a8_0x4fea;if(_0x2b73e9 instanceof SDKError)console['error'](_0x939d76(0xc3)+_0x2b73e9[_0x939d76(0xb0)]),_0x1a3888[_0x939d76(0xc7)]&&(_0x2b73e9[_0x939d76(0xde)]&&console[_0x939d76(0xc5)](_0x939d76(0xac)+_0x2b73e9[_0x939d76(0xde)]),_0x2b73e9[_0x939d76(0xb6)]&&(console[_0x939d76(0xc5)](_0x939d76(0xd1)),console['error'](_0x2b73e9[_0x939d76(0xb6)])));else throw _0x2b73e9;}export class ChatCommand extends BaseCommand{['name']='chat';['description']=a8_0x4c30bb(0xd7);[a8_0x4c30bb(0xbe)](_0x5e315f){const _0x2be35f=a8_0x4c30bb,_0xb75ce1=_0x5e315f[_0x2be35f(0xbc)][_0x2be35f(0xd9)]('\x20');if(!_0xb75ce1)return'Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options';return undefined;}async[a8_0x4c30bb(0xb4)](_0x287d18,_0x48e00e,_0x6b2b3b,_0x19b5fb,_0x34f13d){const _0x446b85=a8_0x4c30bb;for await(const _0x229a9c of _0x287d18['llm']['chat'](_0x48e00e,{'agentId':_0x6b2b3b,'chatId':_0x19b5fb})){if(_0x229a9c[_0x446b85(0xc8)]===_0x446b85(0xe2)){const _0x317fb0=_0x229a9c[_0x446b85(0xb9)][_0x446b85(0xce)];saveLastChatId(_0x317fb0),_0x34f13d&&console['error'](_0x446b85(0xd3)+_0x317fb0);}else _0x229a9c[_0x446b85(0xc8)]===_0x446b85(0xcc)&&this[_0x446b85(0xc6)](_0x229a9c[_0x446b85(0xb9)]);}}async['getAgentId'](_0x5e71a9,_0x402877,_0x1ee918,_0x448cb4,_0x375691){const _0x53e73d=a8_0x4c30bb,_0x3a8a9e=_0x402877||_0x1ee918;if(_0x3a8a9e){const {projectName:_0x5f58a4,agentName:_0xc29a88}=parseAgentRef(_0x3a8a9e),_0x1fa44d=_0xc29a88||_0x3a8a9e,_0x21fa68=_0xc29a88?_0x5f58a4:_0x448cb4;if(!_0x21fa68)throw new Error('No\x20project\x20specified.\x20Use\x20\x22Project/Agent\x22\x20format\x20or\x20set\x20project\x20with\x20\x22tdx\x20use\x20llm_project\x22');if(_0x375691){const _0x347e4e=_0x402877?_0x53e73d(0xaf):'session\x20context';console[_0x53e73d(0xc5)](_0x53e73d(0xd6)+_0x347e4e+':\x20'+_0x21fa68+'/'+_0x1fa44d);}const _0x2d4302=await withSpinner('Resolving\x20project\x20\x27'+_0x21fa68+_0x53e73d(0xc1),()=>_0x5e71a9['llm']['resolveProjectId'](_0x21fa68),{'verbose':_0x375691}),_0x56ac71=await withSpinner(_0x53e73d(0xd0)+_0x1fa44d+_0x53e73d(0xc1),()=>_0x5e71a9[_0x53e73d(0xdb)][_0x53e73d(0xcd)](_0x1fa44d,_0x2d4302['data']),{'verbose':_0x375691});return _0x56ac71[_0x53e73d(0xb9)];}else{const _0x2a8d1c=_0x5e71a9['llm'][_0x53e73d(0xca)]();if(_0x2a8d1c)return _0x375691&&console[_0x53e73d(0xc5)](_0x53e73d(0xbd)+_0x2a8d1c['name']),_0x2a8d1c['id'];const _0x217a9f=await withSpinner(_0x53e73d(0xc2),()=>_0x5e71a9[_0x53e73d(0xdb)][_0x53e73d(0xdf)](_0x53e73d(0xb7),0x0),{'verbose':_0x375691});return _0x217a9f[_0x53e73d(0xb9)]['id'];}}async[a8_0x4c30bb(0xcb)](_0x5b91e0){const _0x2c460e=a8_0x4c30bb,{options:_0x5bd5f2,args:_0x174c86,tdx:_0x3f356e}=_0x5b91e0,_0x2b4e15=_0x174c86[_0x2c460e(0xd9)]('\x20'),_0x5c63ce=_0x5bd5f2,_0x516d6b=_0x5c63ce[_0x2c460e(0xdc)],_0x4bd8e8=_0x5c63ce[_0x2c460e(0xb2)],_0x1d0af0=_0x5c63ce[_0x2c460e(0xba)],_0x36cd13=_0x5c63ce['new'];try{let _0x5c1b56,_0xfa34de;!_0x36cd13&&(_0xfa34de=loadLastChatId(),_0xfa34de&&_0x5bd5f2[_0x2c460e(0xc7)]&&console[_0x2c460e(0xc5)](_0x2c460e(0xc0)+_0xfa34de));(_0x36cd13||!_0xfa34de)&&(_0x5c1b56=await this[_0x2c460e(0xb8)](_0x3f356e,_0x516d6b,_0x4bd8e8,_0x1d0af0,_0x5bd5f2[_0x2c460e(0xc7)]));try{await this['streamChat'](_0x3f356e,_0x2b4e15,_0x5c1b56,_0xfa34de,_0x5bd5f2[_0x2c460e(0xc7)]);}catch(_0x299b59){const _0x4550f1=_0x299b59 instanceof SDKError&&_0x299b59[_0x2c460e(0xd5)]===ErrorCode[_0x2c460e(0xab)]||_0x299b59 instanceof Error&&_0x299b59[_0x2c460e(0xb0)][_0x2c460e(0xe1)](_0x2c460e(0xad));if(_0x4550f1)_0x5bd5f2['verbose']&&console[_0x2c460e(0xc5)](_0x2c460e(0xe0)),!_0x5c1b56&&(_0x5c1b56=await this[_0x2c460e(0xb8)](_0x3f356e,_0x516d6b,_0x4bd8e8,_0x1d0af0,_0x5bd5f2[_0x2c460e(0xc7)])),await this[_0x2c460e(0xb4)](_0x3f356e,_0x2b4e15,_0x5c1b56,undefined,_0x5bd5f2[_0x2c460e(0xc7)]);else throw _0x299b59;}return console[_0x2c460e(0xae)](),0x0;}catch(_0x22fc59){return console['error'](),handleSDKError(_0x22fc59,_0x5bd5f2),0x1;}}[a8_0x4c30bb(0xc6)](_0x717b60){const _0x369b14=a8_0x4c30bb;if(_0x369b14(0xbf)in _0x717b60)process[_0x369b14(0xda)][_0x369b14(0xd2)](_0x717b60['content']);else _0x369b14(0xc5)in _0x717b60&&console[_0x369b14(0xc5)](_0x369b14(0xc4)+_0x717b60[_0x369b14(0xc5)]);}}
|