@treasuredata/tdx 2026.3.28 → 2026.3.29
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/auth-login-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/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-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/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-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/schedule-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/upgrade-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/oauth-keychain.js +1 -1
- package/dist/core/oauth.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/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.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/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-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/oauth-refresh.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/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.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-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.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-validator.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-recovery.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/segment-validator.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/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.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/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.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/file-reader.js +1 -1
- package/dist/utils/github-releases.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/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_0xb729f7=a3_0x4ecd;function a3_0x40a7(){const _0x1a5d9=['3261444rxJMWu','execute','\x20activation','Resolved\x20child\x20ID:\x20','error','✔\x20Found\x20','data','186848fZHdIZ','resolveParentId','1169272oMrJmT','18bCLlIP','resolveSegmentId','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','Error:\x20Segment\x20name\x20is\x20required','\x27...','segment','name','Child\x20name:\x20','cause','length','4231444TXBqgM','Resolving\x20parent\x20segment\x20\x27','Site:\x20','66940riflIq','description','Resolving\x20child\x20segment\x20\x27','listActivations','12rfIBJq','message','1181013iJowmG','verbose','Error:\x20','14025bUMTkb','\x20\x20Cause:\x20'];a3_0x40a7=function(){return _0x1a5d9;};return a3_0x40a7();}(function(_0x6dc56b,_0x10b500){const _0x61a3ac=a3_0x4ecd,_0xd50bff=_0x6dc56b();while(!![]){try{const _0x3f96e9=parseInt(_0x61a3ac(0xc1))/0x1*(-parseInt(_0x61a3ac(0xde))/0x2)+-parseInt(_0x61a3ac(0xe0))/0x3+-parseInt(_0x61a3ac(0xca))/0x4+-parseInt(_0x61a3ac(0xda))/0x5+parseInt(_0x61a3ac(0xc3))/0x6+parseInt(_0x61a3ac(0xd7))/0x7+-parseInt(_0x61a3ac(0xcc))/0x8*(parseInt(_0x61a3ac(0xcd))/0x9);if(_0x3f96e9===_0x10b500)break;else _0xd50bff['push'](_0xd50bff['shift']());}catch(_0x493e1d){_0xd50bff['push'](_0xd50bff['shift']());}}}(a3_0x40a7,0x4d983));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a3_0x4ecd(_0x5b8321,_0x181e0a){_0x5b8321=_0x5b8321-0xbf;const _0x40a7f6=a3_0x40a7();let _0x4ecd84=_0x40a7f6[_0x5b8321];return _0x4ecd84;}import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0xb729f7(0xd3)]='activations';[a3_0xb729f7(0xdb)]='List\x20activations\x20for\x20a\x20segment';async[a3_0xb729f7(0xc4)](_0x2d3b08){const _0x3dd7ab=a3_0xb729f7,{options:_0x4d8e1c,args:_0x5313d2,tdx:_0x140840}=_0x2d3b08;if(_0x5313d2[_0x3dd7ab(0xd6)]===0x0)return console[_0x3dd7ab(0xc7)](_0x3dd7ab(0xd0)),console[_0x3dd7ab(0xc7)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;try{const {parentId:_0x2fa9bb,childId:_0x3eb851}=parseSegmentRef(_0x5313d2[0x0]);if(!_0x3eb851)return console[_0x3dd7ab(0xc7)]('Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations'),console['error'](_0x3dd7ab(0xcf)),0x1;_0x4d8e1c[_0x3dd7ab(0xbf)]&&(console[_0x3dd7ab(0xc7)](_0x3dd7ab(0xd9)+_0x4d8e1c['site']),console[_0x3dd7ab(0xc7)]('Parent\x20name:\x20'+_0x2fa9bb),console[_0x3dd7ab(0xc7)](_0x3dd7ab(0xd4)+_0x3eb851));const _0x3c874f=await withSpinner(_0x3dd7ab(0xd8)+_0x2fa9bb+_0x3dd7ab(0xd1),()=>_0x140840[_0x3dd7ab(0xd2)][_0x3dd7ab(0xcb)](_0x2fa9bb),{'verbose':_0x4d8e1c[_0x3dd7ab(0xbf)]}),_0x4e1b9b=_0x3c874f['data'];_0x4d8e1c['verbose']&&console['error']('Resolved\x20parent\x20ID:\x20'+_0x4e1b9b);const _0x5bf8dd=await withSpinner(_0x3dd7ab(0xdc)+_0x3eb851+'\x27...',()=>_0x140840[_0x3dd7ab(0xd2)][_0x3dd7ab(0xce)](_0x4e1b9b,_0x3eb851),{'verbose':_0x4d8e1c[_0x3dd7ab(0xbf)]}),_0x10f4d9=_0x5bf8dd[_0x3dd7ab(0xc9)];_0x4d8e1c['verbose']&&console[_0x3dd7ab(0xc7)](_0x3dd7ab(0xc6)+_0x10f4d9);const _0x5d3f7a=await withSpinner('Listing\x20activations\x20for\x20segment\x20\x27'+_0x3eb851+_0x3dd7ab(0xd1),()=>_0x140840[_0x3dd7ab(0xd2)][_0x3dd7ab(0xdd)](_0x4e1b9b,_0x10f4d9),{'verbose':_0x4d8e1c[_0x3dd7ab(0xbf)]}),_0x5ca305=_0x5d3f7a['data'];return console[_0x3dd7ab(0xc7)](_0x3dd7ab(0xc8)+_0x5ca305[_0x3dd7ab(0xd6)]+_0x3dd7ab(0xc5)+(_0x5ca305[_0x3dd7ab(0xd6)]!==0x1?'s':'')),await handleSDKOutput(_0x5ca305,_0x4d8e1c),0x0;}catch(_0x522c01){if(_0x522c01 instanceof SDKError)return console[_0x3dd7ab(0xc7)](_0x3dd7ab(0xc0)+_0x522c01[_0x3dd7ab(0xdf)]),_0x522c01[_0x3dd7ab(0xd5)]&&console[_0x3dd7ab(0xc7)](_0x3dd7ab(0xc2)+_0x522c01[_0x3dd7ab(0xd5)]),0x1;throw _0x522c01;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4_0x5c2a22=a4_0x2a41;function a4_0x2a41(_0x36de48,_0x126ee4){_0x36de48=_0x36de48-0x96;const _0x160342=a4_0x1603();let _0x2a4149=_0x160342[_0x36de48];return _0x2a4149;}(function(_0x387935,_0x2f5cc2){const _0x4a2edb=a4_0x2a41,_0x535eb3=_0x387935();while(!![]){try{const _0x563b9e=parseInt(_0x4a2edb(0xb9))/0x1*(-parseInt(_0x4a2edb(0x140))/0x2)+-parseInt(_0x4a2edb(0x142))/0x3+-parseInt(_0x4a2edb(0xc7))/0x4+-parseInt(_0x4a2edb(0x120))/0x5*(parseInt(_0x4a2edb(0xe6))/0x6)+-parseInt(_0x4a2edb(0xf3))/0x7*(parseInt(_0x4a2edb(0x97))/0x8)+-parseInt(_0x4a2edb(0x96))/0x9+parseInt(_0x4a2edb(0xdd))/0xa*(parseInt(_0x4a2edb(0x117))/0xb);if(_0x563b9e===_0x2f5cc2)break;else _0x535eb3['push'](_0x535eb3['shift']());}catch(_0x43737d){_0x535eb3['push'](_0x535eb3['shift']());}}}(a4_0x1603,0x41bd0));import a4_0x4cef50 from'chalk';import a4_0x4fc3a8 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,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}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(_0x25cb9a){const _0x35a90f=a4_0x2a41,_0x32a31a=[];if(_0x25cb9a[_0x35a90f(0xbf)]!==undefined)_0x32a31a[_0x35a90f(0xd2)](_0x25cb9a[_0x35a90f(0xbf)]+_0x35a90f(0xbe));if(_0x25cb9a[_0x35a90f(0x100)]!==undefined&&_0x25cb9a['new']>0x0)_0x32a31a[_0x35a90f(0xd2)](a4_0x4cef50[_0x35a90f(0xed)](_0x25cb9a['new']+_0x35a90f(0x9c)));if(_0x25cb9a[_0x35a90f(0xeb)]!==undefined&&_0x25cb9a[_0x35a90f(0xeb)]>0x0)_0x32a31a[_0x35a90f(0xd2)](a4_0x4cef50['green'](_0x25cb9a[_0x35a90f(0xeb)]+_0x35a90f(0x122)));if(_0x25cb9a[_0x35a90f(0xb0)]!==undefined&&_0x25cb9a[_0x35a90f(0xb0)]>0x0)_0x32a31a[_0x35a90f(0xd2)](a4_0x4cef50['yellow'](_0x25cb9a[_0x35a90f(0xb0)]+_0x35a90f(0xec)));if(_0x25cb9a['unchanged']!==undefined&&_0x25cb9a['unchanged']>0x0)_0x32a31a[_0x35a90f(0xd2)](a4_0x4cef50[_0x35a90f(0x113)](_0x25cb9a[_0x35a90f(0x13f)]+_0x35a90f(0xa2)));if(_0x25cb9a['errors']!==undefined&&_0x25cb9a[_0x35a90f(0x139)]>0x0)_0x32a31a[_0x35a90f(0xd2)](a4_0x4cef50['red'](_0x25cb9a['errors']+_0x35a90f(0xd1)));return _0x32a31a[_0x35a90f(0x9a)](',\x20');}function displayDiffs(_0x3c2e53,_0x1d41f5,_0x235632,_0x3e691d,_0x29ae17,_0x5884bf,_0x5ce4d1){const _0x21f6ce=a4_0x2a41;for(const _0x2c1489 of _0x3c2e53){if(_0x2c1489[_0x21f6ce(0x132)]){const _0x15fedd=_0x2c1489[_0x21f6ce(0x123)]||_0x2c1489[_0x21f6ce(0xf9)];console['log'](_0x21f6ce(0x125)+_0x15fedd+'\x27:'),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)),console['log'](_0x2c1489[_0x21f6ce(0x132)]),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c));}}for(const _0xa0dcdd of _0x1d41f5){_0xa0dcdd[_0x21f6ce(0x132)]&&(console[_0x21f6ce(0xc0)](_0x21f6ce(0xb1)+_0xa0dcdd[_0x21f6ce(0xf9)]+'\x27:'),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)),console['log'](_0xa0dcdd[_0x21f6ce(0x132)]),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)));}for(const _0x5797c1 of _0x235632){_0x5797c1[_0x21f6ce(0x132)]&&(console[_0x21f6ce(0xc0)](_0x21f6ce(0xf8)+_0x5797c1[_0x21f6ce(0xf9)]+'\x27:'),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)),console[_0x21f6ce(0xc0)](_0x5797c1[_0x21f6ce(0x132)]),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)));}for(const _0x108afb of _0x3e691d){_0x108afb[_0x21f6ce(0x132)]&&(console[_0x21f6ce(0xc0)](_0x21f6ce(0xae)+_0x108afb[_0x21f6ce(0xf9)]+'\x27:'),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)),console['log'](_0x108afb[_0x21f6ce(0x132)]),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)));}for(const _0x194a32 of _0x29ae17){_0x194a32[_0x21f6ce(0x132)]&&(console[_0x21f6ce(0xc0)](_0x21f6ce(0xcf)+_0x194a32[_0x21f6ce(0xf9)]+'\x27:'),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)),console[_0x21f6ce(0xc0)](_0x194a32[_0x21f6ce(0x132)]),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)));}for(const _0x28ec6c of _0x5884bf){_0x28ec6c[_0x21f6ce(0x132)]&&(console['log'](_0x21f6ce(0x134)+_0x28ec6c[_0x21f6ce(0xf9)]+'\x27:'),console['log']('─'[_0x21f6ce(0xad)](0x3c)),console[_0x21f6ce(0xc0)](_0x28ec6c[_0x21f6ce(0x132)]),console['log']('─'[_0x21f6ce(0xad)](0x3c)));}for(const _0x1dc11e of _0x5ce4d1){_0x1dc11e[_0x21f6ce(0x132)]&&(console['log'](_0x21f6ce(0x146)+_0x1dc11e['name']+'\x27:'),console[_0x21f6ce(0xc0)]('─'['repeat'](0x3c)),console[_0x21f6ce(0xc0)](_0x1dc11e[_0x21f6ce(0x132)]),console[_0x21f6ce(0xc0)]('─'[_0x21f6ce(0xad)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x5c2a22(0xf9)]=a4_0x5c2a22(0xb5);[a4_0x5c2a22(0x141)]=a4_0x5c2a22(0x101);async[a4_0x5c2a22(0x9b)](_0xc96a13){const _0x208e5d=a4_0x5c2a22,{options:_0x4ba1c1,args:_0x4b89f8,tdx:_0x250b84}=_0xc96a13,_0xf37da3=_0x4b89f8[0x0],_0x3c8a2b=_0x4b89f8[0x1],_0x238bcb=_0x4ba1c1[_0x208e5d(0xa0)],_0xe3baa4=_0x4ba1c1[_0x208e5d(0xb4)],_0x54c695=_0x4ba1c1['force'],_0x153582=_0x4ba1c1[_0x208e5d(0xe5)],_0x4d34c2=_0x4ba1c1[_0x208e5d(0xd3)],_0x2779e7=_0x4ba1c1[_0x208e5d(0xde)];let _0x3a83eb;if(_0xf37da3){const _0x5ba4a9=a4_0x4fc3a8['join'](_0xf37da3,_0x208e5d(0xba));if(existsSync(_0x5ba4a9))try{const _0x27cfd6=JSON['parse'](readFileSync(_0x5ba4a9,_0x208e5d(0xef)));_0x27cfd6[_0x208e5d(0xd7)]&&(_0x3a83eb={'llm_project':_0x27cfd6['llm_project']});}catch{}}const _0x2ed98c=findAgentConfigPath(process[_0x208e5d(0x112)]());let _0x1186bb;if(_0x2ed98c)try{const _0x1c51e5=JSON['parse'](readFileSync(_0x2ed98c,_0x208e5d(0xef)));_0x1c51e5[_0x208e5d(0xd7)]&&(_0x1186bb={'llm_project':_0x1c51e5['llm_project']});}catch{}const _0x527071=resolveAgentPullArgs({'arg':_0xf37da3,'agentNameArg':_0x3c8a2b,'agentFlag':_0x2779e7,'contextProject':_0x4d34c2,'argDirConfig':_0x3a83eb,'cwdConfigPath':_0x2ed98c||undefined,'cwdConfig':_0x1186bb}),{projectNameOrId:_0x1350a0,targetAgentName:_0x2a4bef,existingOutputDir:_0x25919e,source:_0x3d4e8f}=_0x527071;if(_0x3d4e8f===_0x208e5d(0x9e))console[_0x208e5d(0xc0)](a4_0x4cef50['dim'](_0x208e5d(0xa5)+a4_0x4fc3a8['join'](_0xf37da3,'tdx.json')+':\x20'+_0x1350a0));else{if(_0x3d4e8f===_0x208e5d(0x111))console[_0x208e5d(0xc0)](a4_0x4cef50[_0x208e5d(0xda)](_0x208e5d(0xe4)+_0x1350a0));else _0x3d4e8f===_0x208e5d(0x130)&&console[_0x208e5d(0xc0)](a4_0x4cef50[_0x208e5d(0xda)]('Using\x20project\x20from\x20context:\x20'+_0x1350a0));}if(!_0x1350a0)return _0x2779e7?(console[_0x208e5d(0xc0)](a4_0x4cef50['yellow'](_0x208e5d(0xfe))),console['log'](_0x208e5d(0xa4)),console[_0x208e5d(0xc0)](_0x208e5d(0xc6))):(console[_0x208e5d(0xc0)](a4_0x4cef50['yellow']('llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a')),console[_0x208e5d(0xc0)](_0x208e5d(0xee)),console[_0x208e5d(0xc0)](_0x208e5d(0x10b)),console['log'](_0x208e5d(0x119)),console[_0x208e5d(0xc0)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project'),console['log'](_0x208e5d(0x9f))),0x1;if(_0x2a4bef){const {data:_0x3e6d25}=await withSpinner(_0x208e5d(0xf4)+_0x2a4bef+'\x22\x20from\x20project\x20\x22'+_0x1350a0+'\x22...',()=>_0x250b84[_0x208e5d(0xd9)]['pullAgent'](_0x1350a0,_0x2a4bef,_0x238bcb,{'dryRun':_0xe3baa4,'force':_0x54c695}));if(_0xe3baa4)return console[_0x208e5d(0xc0)](a4_0x4cef50['yellow']('Dry\x20run\x20-\x20no\x20files\x20written')),console[_0x208e5d(0xc0)](_0x208e5d(0x12e)+_0x3e6d25[_0x208e5d(0x123)]),console[_0x208e5d(0xc0)](_0x208e5d(0x107)+_0x3e6d25[_0x208e5d(0xff)]),_0x3e6d25[_0x208e5d(0x132)]&&(console[_0x208e5d(0xc0)](_0x208e5d(0x127)),console[_0x208e5d(0xc0)]('─'['repeat'](0x3c)),console['log'](_0x3e6d25[_0x208e5d(0x132)]),console[_0x208e5d(0xc0)]('─'[_0x208e5d(0xad)](0x3c))),0x0;return console[_0x208e5d(0xc0)](a4_0x4cef50[_0x208e5d(0xed)](_0x208e5d(0x118))),console['log'](_0x208e5d(0x105)+_0x3e6d25[_0x208e5d(0x123)]),console[_0x208e5d(0xc0)]('Output:\x20'+_0x3e6d25[_0x208e5d(0xff)]),console[_0x208e5d(0xc0)](_0x208e5d(0x136)+(_0x3e6d25[_0x208e5d(0x135)]?a4_0x4cef50['green'](_0x208e5d(0x100)):_0x3e6d25[_0x208e5d(0x115)]?a4_0x4cef50[_0x208e5d(0x114)](_0x208e5d(0xb0)):a4_0x4cef50['gray']('unchanged'))),0x0;}const _0xb38fc8=_0x25919e||_0x238bcb,{data:_0x2ae40a}=await withSpinner(_0x208e5d(0x12b)+_0x1350a0+'\x22...',()=>_0x250b84[_0x208e5d(0xd9)][_0x208e5d(0x13d)](_0x1350a0,_0xb38fc8,{'dryRun':!![]})),_0x4769a1=_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd6)][_0x208e5d(0x100)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xf2)]['new']+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0x10a)][_0x208e5d(0x100)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd0)][_0x208e5d(0x100)]+_0x2ae40a['counts'][_0x208e5d(0xd8)][_0x208e5d(0x100)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xb6)][_0x208e5d(0x100)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0x13e)][_0x208e5d(0x100)],_0x388ca3=_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd6)][_0x208e5d(0xb0)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xf2)]['updated']+_0x2ae40a[_0x208e5d(0x98)]['textKnowledgeBases'][_0x208e5d(0xb0)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd0)][_0x208e5d(0xb0)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd8)][_0x208e5d(0xb0)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xb6)]['updated']+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0x13e)][_0x208e5d(0xb0)],_0x399d17=_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd6)][_0x208e5d(0x13f)]+_0x2ae40a['counts'][_0x208e5d(0xf2)]['unchanged']+_0x2ae40a['counts']['textKnowledgeBases'][_0x208e5d(0x13f)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd0)][_0x208e5d(0x13f)]+_0x2ae40a[_0x208e5d(0x98)]['integrations'][_0x208e5d(0x13f)]+_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xb6)][_0x208e5d(0x13f)]+_0x2ae40a[_0x208e5d(0x98)]['experimentalArtifacts']['unchanged'];console[_0x208e5d(0xc0)](_0x208e5d(0xc3)+_0x2ae40a[_0x208e5d(0x124)]+'\x27:'),console[_0x208e5d(0xc0)]('\x20\x20'+a4_0x4cef50[_0x208e5d(0xed)]('+\x20'+_0x4769a1+'\x20new')+_0x208e5d(0x11b)+a4_0x4cef50['yellow']('~\x20'+_0x388ca3+'\x20changed')+_0x208e5d(0x11b)+a4_0x4cef50[_0x208e5d(0xda)]('=\x20'+_0x399d17+'\x20unchanged')),console[_0x208e5d(0xc0)](_0x208e5d(0xdc)+formatCountSummary(_0x2ae40a[_0x208e5d(0x98)]['agents'])),console[_0x208e5d(0xc0)](_0x208e5d(0x10c)+formatCountSummary(_0x2ae40a[_0x208e5d(0x98)]['knowledgeBases'])),console[_0x208e5d(0xc0)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x2ae40a[_0x208e5d(0x98)]['textKnowledgeBases'])),console[_0x208e5d(0xc0)](_0x208e5d(0xf6)+formatCountSummary(_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xd0)])),console[_0x208e5d(0xc0)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x2ae40a['counts'][_0x208e5d(0xd8)]));const _0xc596b9=_0x2ae40a['counts'][_0x208e5d(0xb6)][_0x208e5d(0xbf)]>0x0||_0x2ae40a['counts'][_0x208e5d(0x13e)][_0x208e5d(0xbf)]>0x0;_0xc596b9&&(console[_0x208e5d(0xc0)](_0x208e5d(0xc5)+formatCountSummary(_0x2ae40a[_0x208e5d(0x98)][_0x208e5d(0xb6)])),console[_0x208e5d(0xc0)](_0x208e5d(0xb7)+formatCountSummary(_0x2ae40a['counts'][_0x208e5d(0x13e)])));console[_0x208e5d(0xc0)]('\x20\x20Target:\x20'+a4_0x4cef50[_0x208e5d(0xe3)](_0x2ae40a[_0x208e5d(0xe8)])),displayDiffs(_0x2ae40a['agents'],_0x2ae40a[_0x208e5d(0xf2)],_0x2ae40a[_0x208e5d(0x10a)],_0x2ae40a['prompts'],_0x2ae40a[_0x208e5d(0xd8)],_0x2ae40a['experimentalKnowledgeBases'],_0x2ae40a['experimentalArtifacts']);if(_0xe3baa4)return console[_0x208e5d(0xc0)](a4_0x4cef50[_0x208e5d(0x114)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x4769a1===0x0&&_0x388ca3===0x0)return console['log'](a4_0x4cef50[_0x208e5d(0xed)]('\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'llm_project':_0x2ae40a[_0x208e5d(0x124)]},_0x4ba1c1[_0x208e5d(0x11c)]),console['log'](a4_0x4cef50[_0x208e5d(0xed)](_0x208e5d(0x11a)+a4_0x4cef50['dim'](_0x208e5d(0xd7))+_0x208e5d(0x128)+a4_0x4cef50[_0x208e5d(0xe3)](_0x2ae40a[_0x208e5d(0x124)]))),0x0;if(!_0x153582&&!_0x54c695){if(!isInteractive())return console[_0x208e5d(0xca)](a4_0x4cef50[_0x208e5d(0x110)](_0x208e5d(0x138)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x208e5d(0xca)](a4_0x4cef50[_0x208e5d(0xda)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2f9b79=await confirmKey(_0x208e5d(0xa7)+(_0x4769a1+_0x388ca3)+'\x20files?');if(!_0x2f9b79)return console[_0x208e5d(0xc0)](a4_0x4cef50[_0x208e5d(0x114)](_0x208e5d(0xd5)),_0x208e5d(0xc2)),0x1;}const {data:_0x358816}=await withSpinner('Writing\x20files...',()=>_0x250b84['llm']['pullProject'](_0x1350a0,_0xb38fc8,{'force':_0x54c695}));return console['log'](a4_0x4cef50['green'](_0x208e5d(0xfd)+(_0x4769a1+_0x388ca3)+_0x208e5d(0x11f)+_0x358816['outputDir'])),saveSessionContext({'llm_project':_0x358816['projectName']},_0x4ba1c1[_0x208e5d(0x11c)]),console[_0x208e5d(0xc0)](a4_0x4cef50[_0x208e5d(0xed)](_0x208e5d(0x11a)+a4_0x4cef50[_0x208e5d(0xda)](_0x208e5d(0xd7))+_0x208e5d(0x128)+a4_0x4cef50[_0x208e5d(0xe3)](_0x358816[_0x208e5d(0x124)]))),0x0;}}function a4_0x1603(){const _0x593548=['1200rYzNqZ','agent','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','New\x20project\x20name\x20is\x20required','reason','cyan','Using\x20project:\x20','yes','870FHWPnj','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','outputDir','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','\x20\x20Agent\x20\x22','created','\x20updated','green','Usage:\x20tdx\x20agent\x20pull\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#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)','utf-8','\x20\x20Experimental\x20Artifact\x20\x22','Would\x20push\x20agent:\x20','knowledgeBases','7XApXMZ','Pulling\x20agent\x20\x22','MISSING_ARGUMENT','\x20\x20Prompts:\x20','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','name','\x20resources?','agent:push','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','\x0a✔\x20Pulled\x20','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','outputPath','new','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x0a✔\x20Pushed\x20','\x20successfully','Agent:\x20','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','Output\x20path:\x20','\x20\x20Integrations:\x20','newProjectName','textKnowledgeBases','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','\x20\x20Knowledge\x20Bases:\x20','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','Would\x20clone:','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','red','cwd-config','cwd','gray','yellow','hasChanges','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','118393IupeZH','Agent\x20pulled\x20successfully','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<local-dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20to\x20existing\x20local\x20directory','✔\x20Context\x20set:\x20','\x20|\x20','session','\x22\x20to\x20\x22','\x20\x20Knowledge\x20Base\x20\x22','\x20files\x20to\x20','3905BMUYND','\x22:\x20','\x20created','agentName','projectName','\x0aChanges\x20to\x20agent\x20\x27','Cloning\x20\x22','\x0aChanges:','\x20=\x20','Pushing\x20agent\x20from\x20\x22','\x20\x20Text\x20Knowledge\x20Bases:\x20','Analyzing\x20project\x20\x22','Project\x20cloned\x20successfully','\x0aErrors\x20found:','Would\x20pull\x20agent:\x20','Agent\x20','context','source','diff','\x20--name\x20','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','isNew','Status:\x20','action','\x0aError:','errors','pushAgent','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','\x20resources\x20to\x20\x27','pullProject','experimentalArtifacts','unchanged','4978mgjWRS','description','41166OUKtEY','dirname','\x22\x20to\x20a\x20different\x20profile','no_local_folder','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','Dry\x20run\x20-\x20no\x20changes\x20made','Errors:','\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)','Source:\x20','\x20--profile\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','message','4374873PnvwJm','308616cAmmCI','counts','Using\x20current\x20project:\x20','join','execute','\x20new','Clone\x20\x22','arg-dir','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20project','output','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','\x20unchanged','Project\x20cloned\x20with\x20errors','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','Using\x20project\x20from\x20','\x20\x20Prompt\x20\x22','\x0aWrite\x20','\x20\x20tdx\x20agent\x20clone\x20agents/','Pushing\x20to\x20project...','\x0aPush\x20','\x22\x20to\x20new\x20project\x20\x22','no_context','repeat','\x0aChanges\x20to\x20prompt\x20\x27','agent.yml','updated','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','newProjectId','Project:\x20','dryRun','agent:pull','experimentalKnowledgeBases','\x20\x20Experimental\x20Artifacts:\x20','\x20\x20tdx\x20agent\x20pull\x20','137QiLdeN','tdx.json','INVALID_ARGUMENT','\x22...','found','\x20total','total','log','Using\x20local\x20project:\x20','-\x20no\x20files\x20written','\x0aPull\x20summary\x20for\x20\x27','Cannot\x20clone\x20from\x20context\x20project\x20\x22','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','118648krGGfN','\x20\x20Integration\x20\x22','New\x20project\x20ID:\x20','error','force','\x20\x20Source:\x20','projectDir','sourceProjectName','\x0aChanges\x20to\x20integration\x20\x27','prompts','\x20errors','push','llmProject','projectId','Cancelled','agents','llm_project','integrations','llm','dim','site','\x20\x20Agents:\x20'];a4_0x1603=function(){return _0x593548;};return a4_0x1603();}export class AgentCloneCommand extends BaseCommand{['name']='agent:clone';[a4_0x5c2a22(0x141)]=a4_0x5c2a22(0x13b);async[a4_0x5c2a22(0x9b)](_0x4820ca){const _0x1b7063=a4_0x5c2a22,{options:_0x11bd00,args:_0x3c0fb8,tdx:_0x17e42b}=_0x4820ca,_0x340404=_0x3c0fb8[0x0],_0xb20605=_0x11bd00[_0x1b7063(0xf9)],_0x192705=_0x11bd00['dryRun'],_0x413348=_0x11bd00[_0x1b7063(0xe5)],_0x3ed7a4=_0x11bd00['site'],_0x5a1bf2=_0x11bd00[_0x1b7063(0xd3)];let _0x472edb;const _0x1f5b63=findAgentConfigPath(process[_0x1b7063(0x112)]());if(_0x340404){const _0x2c55cd=a4_0x4fc3a8[_0x1b7063(0x9a)](_0x340404,_0x1b7063(0xba));existsSync(_0x2c55cd)?(_0x472edb=_0x340404,console[_0x1b7063(0xc0)](a4_0x4cef50['dim'](_0x1b7063(0xc1)+_0x340404))):_0x472edb=_0x340404;}else{if(_0x1f5b63)_0x472edb=a4_0x4fc3a8[_0x1b7063(0x143)](_0x1f5b63),console[_0x1b7063(0xc0)](a4_0x4cef50['dim'](_0x1b7063(0x99)+_0x472edb));else{if(_0x5a1bf2){const _0x14876a=sanitizeForFilesystem(_0x5a1bf2);let _0x5a5247=_0x14876a,_0x3709eb=a4_0x4fc3a8[_0x1b7063(0x9a)](process[_0x1b7063(0x112)](),_0x1b7063(0xd6),_0x14876a,_0x1b7063(0xba));if(!existsSync(_0x3709eb)){const _0x39678d=normalizeName(_0x5a1bf2),_0x47f908=a4_0x4fc3a8[_0x1b7063(0x9a)](process['cwd'](),_0x1b7063(0xd6),_0x39678d,_0x1b7063(0xba));existsSync(_0x47f908)&&(_0x5a5247=_0x39678d,_0x3709eb=_0x47f908);}if(existsSync(_0x3709eb))_0x472edb=a4_0x4fc3a8['dirname'](_0x3709eb),console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0xda)](_0x1b7063(0xc1)+_0x472edb));else{const _0x400ab3=_0x11bd00['profile'];if(_0x400ab3)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1b7063(0xc4)+_0x5a1bf2+_0x1b7063(0x144),undefined,{'helpText':_0x1b7063(0x10d)+_0x1b7063(0xdf)+(_0x1b7063(0xb8)+_0x5a1bf2+'\x0a')+(_0x1b7063(0xa8)+_0x5a5247+_0x1b7063(0x133)+(_0xb20605||'<new-name>')+_0x1b7063(0x14b)+_0x400ab3)});_0x472edb=_0x5a1bf2,console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0xda)]('Using\x20context\x20project:\x20'+_0x5a1bf2));}}}}if(!_0x472edb)return console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x114)](_0x1b7063(0x106))),console[_0x1b7063(0xc0)]('\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project'),console['log'](_0x1b7063(0xe9)),console[_0x1b7063(0xc0)](_0x1b7063(0x149)),console[_0x1b7063(0xc0)](_0x1b7063(0xe7)),0x1;if(!_0xb20605)throw new SDKError(ErrorCode[_0x1b7063(0xf5)],_0x1b7063(0xe1),undefined,{'helpText':_0x1b7063(0xe0)});if(!_0x413348&&!_0x192705){if(!isInteractive())return console[_0x1b7063(0xca)](a4_0x4cef50['red'](_0x1b7063(0x138)),_0x1b7063(0x14c)),console['error'](a4_0x4cef50[_0x1b7063(0xda)](_0x1b7063(0x102))),0x1;const _0x2f2543=await confirmKey(_0x1b7063(0x9d)+_0x472edb+_0x1b7063(0xab)+_0xb20605+'\x22?');if(!_0x2f2543)return console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x114)]('Cancelled')),0x1;}const {data:_0x41db4d}=await withSpinner(_0x1b7063(0x126)+_0x472edb+_0x1b7063(0x11d)+_0xb20605+_0x1b7063(0xbc),()=>_0x17e42b[_0x1b7063(0xd9)]['cloneProject'](_0x472edb,_0xb20605,{'dryRun':_0x192705}));if(_0x192705){console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x114)](_0x1b7063(0x147))),console['log'](_0x1b7063(0x14a)+_0x41db4d[_0x1b7063(0xce)]),console[_0x1b7063(0xc0)]('New\x20project:\x20'+_0xb20605),console[_0x1b7063(0xc0)](_0x1b7063(0x10e)),console['log'](_0x1b7063(0xdc)+_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xd6)][_0x1b7063(0xeb)]),console[_0x1b7063(0xc0)](_0x1b7063(0x10c)+_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xf2)][_0x1b7063(0xeb)]),console[_0x1b7063(0xc0)]('\x20\x20Prompts:\x20'+_0x41db4d['counts'][_0x1b7063(0xd0)][_0x1b7063(0xeb)]);const _0x1c6d35=_0x41db4d[_0x1b7063(0x98)]['experimentalKnowledgeBases'][_0x1b7063(0xeb)]>0x0||_0x41db4d[_0x1b7063(0x98)]['experimentalArtifacts'][_0x1b7063(0xeb)]>0x0;return _0x1c6d35&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+_0x41db4d['counts']['experimentalKnowledgeBases']['created']),console[_0x1b7063(0xc0)](_0x1b7063(0xb7)+_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0x13e)][_0x1b7063(0xeb)])),0x0;}const _0x1a9ec2=_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xd6)][_0x1b7063(0x139)]>0x0||_0x41db4d['counts']['knowledgeBases'][_0x1b7063(0x139)]>0x0||_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xd0)]['errors']>0x0||_0x41db4d[_0x1b7063(0x98)]['experimentalKnowledgeBases']['errors']>0x0||_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0x13e)][_0x1b7063(0x139)]>0x0;_0x1a9ec2?console[_0x1b7063(0xc0)](a4_0x4cef50['yellow'](_0x1b7063(0xa3))):console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0xed)](_0x1b7063(0x12c)));console[_0x1b7063(0xc0)](_0x1b7063(0x14a)+_0x41db4d[_0x1b7063(0xce)]),console[_0x1b7063(0xc0)]('New\x20project:\x20'+_0x41db4d[_0x1b7063(0x109)]),console[_0x1b7063(0xc0)](_0x1b7063(0xc9)+_0x41db4d[_0x1b7063(0xb2)]),console[_0x1b7063(0xc0)](),console['log']('Summary:'),console[_0x1b7063(0xc0)](_0x1b7063(0xdc)+formatCountSummary(_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xd6)])),console['log']('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x41db4d['counts'][_0x1b7063(0xf2)])),console[_0x1b7063(0xc0)](_0x1b7063(0xf6)+formatCountSummary(_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xd0)])),console[_0x1b7063(0xc0)](_0x1b7063(0x108)+formatCountSummary(_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xd8)]));const _0x1c1fec=_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xb6)]['created']>0x0||_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0xb6)][_0x1b7063(0xb0)]>0x0||_0x41db4d['counts'][_0x1b7063(0xb6)][_0x1b7063(0x13f)]>0x0||_0x41db4d['counts'][_0x1b7063(0x13e)][_0x1b7063(0xeb)]>0x0||_0x41db4d['counts'][_0x1b7063(0x13e)][_0x1b7063(0xb0)]>0x0||_0x41db4d['counts'][_0x1b7063(0x13e)]['unchanged']>0x0;_0x1c1fec&&(console[_0x1b7063(0xc0)](_0x1b7063(0xc5)+formatCountSummary(_0x41db4d['counts']['experimentalKnowledgeBases'])),console[_0x1b7063(0xc0)](_0x1b7063(0xb7)+formatCountSummary(_0x41db4d[_0x1b7063(0x98)][_0x1b7063(0x13e)])));if(_0x1a9ec2){console[_0x1b7063(0xc0)](),console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x110)](_0x1b7063(0x148)));for(const _0xbc42 of _0x41db4d['agents']){_0xbc42['action']===_0x1b7063(0xca)&&console['log'](a4_0x4cef50[_0x1b7063(0x110)](_0x1b7063(0xea)+_0xbc42[_0x1b7063(0x123)]+_0x1b7063(0x121)+_0xbc42[_0x1b7063(0xca)]));}for(const _0x36a81 of _0x41db4d[_0x1b7063(0xf2)]){_0x36a81[_0x1b7063(0x137)]===_0x1b7063(0xca)&&console[_0x1b7063(0xc0)](a4_0x4cef50['red'](_0x1b7063(0x11e)+_0x36a81[_0x1b7063(0xf9)]+_0x1b7063(0x121)+_0x36a81[_0x1b7063(0xca)]));}for(const _0x5b2065 of _0x41db4d[_0x1b7063(0xd0)]){_0x5b2065['action']===_0x1b7063(0xca)&&console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x110)](_0x1b7063(0xa6)+_0x5b2065[_0x1b7063(0xf9)]+_0x1b7063(0x121)+_0x5b2065[_0x1b7063(0xca)]));}for(const _0x1920ba of _0x41db4d['integrations']){_0x1920ba[_0x1b7063(0x137)]===_0x1b7063(0xca)&&console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x110)](_0x1b7063(0xc8)+_0x1920ba['name']+_0x1b7063(0x121)+_0x1920ba[_0x1b7063(0xca)]));}for(const _0x313b30 of _0x41db4d[_0x1b7063(0xb6)]){_0x313b30[_0x1b7063(0x137)]===_0x1b7063(0xca)&&console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x110)](_0x1b7063(0xa1)+_0x313b30[_0x1b7063(0xf9)]+_0x1b7063(0x121)+_0x313b30[_0x1b7063(0xca)]));}for(const _0x54940d of _0x41db4d['experimentalArtifacts']){_0x54940d[_0x1b7063(0x137)]===_0x1b7063(0xca)&&console[_0x1b7063(0xc0)](a4_0x4cef50[_0x1b7063(0x110)](_0x1b7063(0xf0)+_0x54940d[_0x1b7063(0xf9)]+_0x1b7063(0x121)+_0x54940d['error']));}return 0x1;}console[_0x1b7063(0xc0)]();const _0x1f05f1=getLLMProjectUrl(_0x3ed7a4,_0x41db4d[_0x1b7063(0xb2)]);return console[_0x1b7063(0xc0)](_0x1b7063(0xb3)+a4_0x4cef50['cyan'](_0x1f05f1)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']=a4_0x5c2a22(0xfb);[a4_0x5c2a22(0x141)]=a4_0x5c2a22(0x116);async[a4_0x5c2a22(0x9b)](_0xadaebf){const _0x3e8396=a4_0x5c2a22,{options:_0x2b55a8,args:_0x36e506,tdx:_0x5d0c92}=_0xadaebf;let _0x13ab57=_0x36e506[0x0]||process[_0x3e8396(0x112)]();const _0x11f0f0=_0x2b55a8[_0x3e8396(0xb4)],_0xd1e2d8=_0x2b55a8[_0x3e8396(0xcb)],_0x4e8931=_0x2b55a8[_0x3e8396(0xe5)],_0x1814c9=_0x2b55a8[_0x3e8396(0xdb)],_0x2811a2=a4_0x4fc3a8[_0x3e8396(0x9a)](_0x13ab57,_0x3e8396(0xaf)),_0x526a13=existsSync(_0x2811a2);if(_0x526a13){const {data:_0x13b0f1}=await withSpinner(_0x3e8396(0x129)+_0x13ab57+'\x22...',()=>_0x5d0c92[_0x3e8396(0xd9)][_0x3e8396(0x13a)](_0x13ab57,{'dryRun':_0x11f0f0,'force':_0xd1e2d8}));if(_0x11f0f0)return console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x114)](_0x3e8396(0x147))),console[_0x3e8396(0xc0)](_0x3e8396(0xf1)+_0x13b0f1[_0x3e8396(0x123)]),0x0;if(_0x13b0f1[_0x3e8396(0x137)]===_0x3e8396(0xca))return console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x110)]('Failed\x20to\x20push\x20agent:\x20'+_0x13b0f1[_0x3e8396(0xca)])),0x1;console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0xed)](_0x3e8396(0x12f)+_0x13b0f1[_0x3e8396(0x137)]+_0x3e8396(0x104))),console['log']('Agent:\x20'+_0x13b0f1['agentName']);if(_0x13b0f1['agentId']&&_0x13b0f1[_0x3e8396(0xd4)]){const _0xc244b3=getLLMAgentChatUrl(_0x1814c9,_0x13b0f1[_0x3e8396(0xd4)],_0x13b0f1['agentId']);console['log']('Chat:\x20'+a4_0x4cef50[_0x3e8396(0xe3)](_0xc244b3));}return 0x0;}const _0x344fa7=_0x2b55a8['llmProject'],_0x194b64=resolveProjectFromContext(_0x13ab57,_0x344fa7);if(_0x194b64[_0x3e8396(0xbd)])_0x13ab57=_0x194b64[_0x3e8396(0xcd)],_0x194b64[_0x3e8396(0x131)]===_0x3e8396(0x130)&&console[_0x3e8396(0xc0)](a4_0x4cef50['dim'](_0x3e8396(0xe4)+_0x13ab57));else{let _0x27f27e=_0x3e8396(0xf7);_0x194b64[_0x3e8396(0xe2)]===_0x3e8396(0x145)&&(_0x27f27e=_0x194b64['message']+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x194b64[_0x3e8396(0xd3)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');throw new SDKError(ErrorCode[_0x3e8396(0xbb)],_0x194b64[_0x3e8396(0xe2)]===_0x3e8396(0xac)?_0x194b64[_0x3e8396(0x14d)]:'No\x20tdx.json\x20found\x20in\x20'+_0x13ab57,undefined,{'helpText':_0x27f27e});}const {data:_0x5c5a87}=await withSpinner('Analyzing\x20changes\x20to\x20push...',()=>_0x5d0c92[_0x3e8396(0xd9)]['pushProject'](_0x13ab57,{'dryRun':!![]})),_0x20ea5c=_0x5c5a87[_0x3e8396(0x98)]['agents']['errors']>0x0;if(_0x20ea5c){console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x110)](_0x3e8396(0x12d)));for(const _0x44cf8c of _0x5c5a87[_0x3e8396(0xd6)]){_0x44cf8c[_0x3e8396(0x137)]===_0x3e8396(0xca)&&console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x110)](_0x3e8396(0xea)+_0x44cf8c[_0x3e8396(0x123)]+_0x3e8396(0x121)+_0x44cf8c[_0x3e8396(0xca)]));}return 0x1;}const _0x25da59=_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd6)]['created']+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xf2)]['created']+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0x10a)][_0x3e8396(0xeb)]+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd0)]['created']+_0x5c5a87[_0x3e8396(0x98)]['integrations']['created']+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xb6)][_0x3e8396(0xeb)]+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0x13e)][_0x3e8396(0xeb)],_0x2f5d4f=_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd6)][_0x3e8396(0xb0)]+_0x5c5a87[_0x3e8396(0x98)]['knowledgeBases'][_0x3e8396(0xb0)]+_0x5c5a87[_0x3e8396(0x98)]['textKnowledgeBases'][_0x3e8396(0xb0)]+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd0)][_0x3e8396(0xb0)]+_0x5c5a87['counts'][_0x3e8396(0xd8)][_0x3e8396(0xb0)]+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xb6)][_0x3e8396(0xb0)]+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0x13e)][_0x3e8396(0xb0)],_0x5bcee6=_0x5c5a87[_0x3e8396(0x98)]['agents'][_0x3e8396(0x13f)]+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xf2)][_0x3e8396(0x13f)]+_0x5c5a87[_0x3e8396(0x98)]['textKnowledgeBases']['unchanged']+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd0)][_0x3e8396(0x13f)]+_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd8)][_0x3e8396(0x13f)]+_0x5c5a87[_0x3e8396(0x98)]['experimentalKnowledgeBases'][_0x3e8396(0x13f)]+_0x5c5a87[_0x3e8396(0x98)]['experimentalArtifacts'][_0x3e8396(0x13f)];console[_0x3e8396(0xc0)]('\x0aPush\x20summary\x20for\x20\x27'+_0x5c5a87[_0x3e8396(0x124)]+'\x27:'),console[_0x3e8396(0xc0)]('\x20\x20'+a4_0x4cef50[_0x3e8396(0xed)]('+\x20'+_0x25da59+_0x3e8396(0x9c))+'\x20|\x20'+a4_0x4cef50[_0x3e8396(0x114)]('~\x20'+_0x2f5d4f+'\x20changed')+_0x3e8396(0x11b)+a4_0x4cef50[_0x3e8396(0xda)]('=\x20'+_0x5bcee6+_0x3e8396(0xa2))),console[_0x3e8396(0xc0)](_0x3e8396(0xdc)+formatCountSummary(_0x5c5a87[_0x3e8396(0x98)]['agents'])),console[_0x3e8396(0xc0)](_0x3e8396(0x10c)+formatCountSummary(_0x5c5a87['counts']['knowledgeBases'])),console[_0x3e8396(0xc0)](_0x3e8396(0x12a)+formatCountSummary(_0x5c5a87['counts']['textKnowledgeBases'])),console[_0x3e8396(0xc0)](_0x3e8396(0xf6)+formatCountSummary(_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd0)])),console[_0x3e8396(0xc0)](_0x3e8396(0x108)+formatCountSummary(_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xd8)]));const _0x195569=_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0xb6)]['created']>0x0||_0x5c5a87[_0x3e8396(0x98)]['experimentalKnowledgeBases'][_0x3e8396(0xb0)]>0x0||_0x5c5a87['counts'][_0x3e8396(0xb6)][_0x3e8396(0x13f)]>0x0||_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0x13e)][_0x3e8396(0xeb)]>0x0||_0x5c5a87[_0x3e8396(0x98)]['experimentalArtifacts']['updated']>0x0||_0x5c5a87[_0x3e8396(0x98)]['experimentalArtifacts']['unchanged']>0x0;_0x195569&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x5c5a87['counts'][_0x3e8396(0xb6)])),console['log'](_0x3e8396(0xb7)+formatCountSummary(_0x5c5a87[_0x3e8396(0x98)][_0x3e8396(0x13e)])));console[_0x3e8396(0xc0)](_0x3e8396(0xcc)+a4_0x4cef50[_0x3e8396(0xe3)](_0x13ab57)),displayDiffs(_0x5c5a87[_0x3e8396(0xd6)],_0x5c5a87[_0x3e8396(0xf2)],_0x5c5a87[_0x3e8396(0x10a)],_0x5c5a87['prompts'],_0x5c5a87[_0x3e8396(0xd8)],_0x5c5a87[_0x3e8396(0xb6)],_0x5c5a87[_0x3e8396(0x13e)]);if(_0x11f0f0)return console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x114)](_0x3e8396(0x10f))),0x0;if(_0x25da59===0x0&&_0x2f5d4f===0x0){console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0xed)](_0x3e8396(0xfc)));const _0x4e7d4f=getLLMProjectUrl(_0x1814c9,_0x5c5a87[_0x3e8396(0xd4)]);return console[_0x3e8396(0xc0)](_0x3e8396(0xb3)+a4_0x4cef50[_0x3e8396(0xe3)](_0x4e7d4f)),0x0;}if(!_0x4e8931&&!_0xd1e2d8){if(!isInteractive())return console['error'](a4_0x4cef50[_0x3e8396(0x110)](_0x3e8396(0x138)),_0x3e8396(0x14c)),console[_0x3e8396(0xca)](a4_0x4cef50['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x35fcde=await confirmKey(_0x3e8396(0xaa)+(_0x25da59+_0x2f5d4f)+_0x3e8396(0xfa));if(!_0x35fcde)return console['log'](a4_0x4cef50['yellow']('Cancelled'),'-\x20nothing\x20pushed'),0x1;}const {data:_0x201a58}=await withSpinner(_0x3e8396(0xa9),()=>_0x5d0c92[_0x3e8396(0xd9)]['pushProject'](_0x13ab57,{'force':_0xd1e2d8})),_0x465ea3=_0x201a58[_0x3e8396(0x98)][_0x3e8396(0xd6)]['errors']>0x0||_0x201a58[_0x3e8396(0x98)][_0x3e8396(0xf2)][_0x3e8396(0x139)]>0x0||_0x201a58[_0x3e8396(0x98)][_0x3e8396(0x10a)][_0x3e8396(0x139)]>0x0||_0x201a58[_0x3e8396(0x98)][_0x3e8396(0xd0)]['errors']>0x0;if(_0x465ea3){console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x114)]('\x0aProject\x20pushed\x20with\x20errors')),console[_0x3e8396(0xc0)](),console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x110)](_0x3e8396(0x148)));for(const _0xe48435 of _0x201a58[_0x3e8396(0xd6)]){_0xe48435[_0x3e8396(0x137)]===_0x3e8396(0xca)&&console[_0x3e8396(0xc0)](a4_0x4cef50['red']('\x20\x20Agent\x20\x22'+_0xe48435[_0x3e8396(0x123)]+'\x22:\x20'+_0xe48435[_0x3e8396(0xca)]));}for(const _0x6a18a6 of _0x201a58[_0x3e8396(0xf2)]){_0x6a18a6[_0x3e8396(0x137)]===_0x3e8396(0xca)&&console['log'](a4_0x4cef50[_0x3e8396(0x110)](_0x3e8396(0x11e)+_0x6a18a6['name']+_0x3e8396(0x121)+_0x6a18a6[_0x3e8396(0xca)]));}for(const _0x20c490 of _0x201a58['textKnowledgeBases']){_0x20c490[_0x3e8396(0x137)]===_0x3e8396(0xca)&&console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x110)]('\x20\x20Text\x20Knowledge\x20Base\x20\x22'+_0x20c490[_0x3e8396(0xf9)]+'\x22:\x20'+_0x20c490[_0x3e8396(0xca)]));}for(const _0x475a8c of _0x201a58[_0x3e8396(0xd0)]){_0x475a8c[_0x3e8396(0x137)]===_0x3e8396(0xca)&&console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x110)]('\x20\x20Prompt\x20\x22'+_0x475a8c[_0x3e8396(0xf9)]+_0x3e8396(0x121)+_0x475a8c[_0x3e8396(0xca)]));}for(const _0xd7dd7d of _0x201a58['integrations']){_0xd7dd7d['action']===_0x3e8396(0xca)&&console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0x110)](_0x3e8396(0xc8)+_0xd7dd7d[_0x3e8396(0xf9)]+_0x3e8396(0x121)+_0xd7dd7d[_0x3e8396(0xca)]));}return 0x1;}console[_0x3e8396(0xc0)](a4_0x4cef50[_0x3e8396(0xed)](_0x3e8396(0x103)+(_0x25da59+_0x2f5d4f)+_0x3e8396(0x13c)+_0x201a58['projectName']+'\x27'));const _0xa58931=getLLMProjectUrl(_0x1814c9,_0x201a58[_0x3e8396(0xd4)]);return console[_0x3e8396(0xc0)](_0x3e8396(0xb3)+a4_0x4cef50[_0x3e8396(0xe3)](_0xa58931)),0x0;}}
|
|
1
|
+
const a4_0x150f60=a4_0x2e06;(function(_0x3a1149,_0x15485e){const _0xd8c864=a4_0x2e06,_0x19ba71=_0x3a1149();while(!![]){try{const _0x9df016=parseInt(_0xd8c864(0x18b))/0x1*(-parseInt(_0xd8c864(0x16f))/0x2)+parseInt(_0xd8c864(0x159))/0x3+-parseInt(_0xd8c864(0x128))/0x4+parseInt(_0xd8c864(0x151))/0x5*(-parseInt(_0xd8c864(0x190))/0x6)+parseInt(_0xd8c864(0x1ce))/0x7+parseInt(_0xd8c864(0x1d5))/0x8+parseInt(_0xd8c864(0x15d))/0x9*(-parseInt(_0xd8c864(0x1dc))/0xa);if(_0x9df016===_0x15485e)break;else _0x19ba71['push'](_0x19ba71['shift']());}catch(_0x3bbb29){_0x19ba71['push'](_0x19ba71['shift']());}}}(a4_0xef3b,0x2c83c));import a4_0x5c10dc from'chalk';import a4_0x1df191 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';function a4_0xef3b(){const _0x5800bc=['\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','Agent\x20','yellow','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','push','\x0a✔\x20Pulled\x20','textKnowledgeBases','error','\x20\x20Integrations:\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','No\x20tdx.json\x20found\x20in\x20','Using\x20context\x20project:\x20','\x0aChanges\x20to\x20integration\x20\x27','\x20\x20Target:\x20','updated','hasChanges','log','llmProject','-\x20no\x20files\x20written','Agent:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<local-dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20to\x20existing\x20local\x20directory','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\x20created','green','diff','Output\x20path:\x20','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','yes','MISSING_ARGUMENT','name','counts','Summary:','119980MrSfAG','\x22...','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x0aChanges\x20to\x20agent\x20\x27','INVALID_ARGUMENT','\x20\x20Prompts:\x20','agent:clone','projectDir','582270EhdkOa','pushProject','\x20\x20tdx\x20agent\x20pull\x20','\x20\x20Source:\x20','737883sKyFRl','\x22\x20to\x20\x22','Using\x20local\x20project:\x20','outputPath','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','agent.yml','projectName','\x20\x20Integration\x20\x22','utf-8','Pushing\x20agent\x20from\x20\x22','Using\x20current\x20project:\x20','agents','execute','\x20successfully','cyan','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','created','<new-name>','599802fWjwuK','\x20updated','Pushing\x20to\x20project...','cwd','Would\x20pull\x20agent:\x20','Using\x20project:\x20','dim','knowledgeBases','parse','errors','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Dry\x20run\x20-\x20no\x20changes\x20made','Clone\x20\x22','\x20|\x20','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','outputDir','agent:pull','session','pushAgent','experimentalArtifacts','\x20\x20tdx\x20agent\x20clone\x20agents/','Using\x20project\x20from\x20','\x20unchanged','Errors:','agentId','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','new','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','1jJRdDH','\x0aPush\x20','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','Dry\x20run\x20-\x20no\x20files\x20written','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','60jWORdp','\x20\x20Agents:\x20','Project:\x20','arg-dir','\x20files\x20to\x20','dirname','\x20files?','\x20new','Project\x20cloned\x20with\x20errors','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project','sourceProjectName','newProjectId','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','force','action','Agent\x20pulled\x20successfully','dryRun','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20project','\x20resources?','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','prompts','unchanged','join','\x0a✔\x20Pushed\x20','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','✔\x20Context\x20set:\x20','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','Cannot\x20clone\x20from\x20context\x20project\x20\x22','New\x20project:\x20','source','Cancelled','Usage:\x20tdx\x20agent\x20pull\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#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)','experimentalKnowledgeBases','pullProject','\x20changed','message','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','integrations','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','Project\x20cloned\x20successfully','\x20\x20Text\x20Knowledge\x20Bases:\x20','\x27\x20to\x20create\x20the\x20folder\x20structure.','\x20\x20Agent\x20\x22','New\x20project\x20name\x20is\x20required','pullAgent','tdx.json','Analyzing\x20changes\x20to\x20push...','\x0aWrite\x20','output','\x20errors','cloneProject','\x0aChanges:','agent','\x0aChanges\x20to\x20prompt\x20\x27','repeat','red','newProjectName','\x20\x20Knowledge\x20Bases:\x20','\x20\x20Experimental\x20Artifacts:\x20','llm_project','reason','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','1778672XdWYnf','total','Status:\x20','context','New\x20project\x20ID:\x20','gray','llm','2872984PmjZRo','Would\x20push\x20agent:\x20','no_local_folder','description','Source:\x20','Output:\x20','\x20=\x20','10BfLeVF','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','\x22:\x20','\x20\x20Knowledge\x20Base\x20\x22','\x20--name\x20','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','Writing\x20files...','12516KPhvtx','\x22\x20to\x20a\x20different\x20profile','agentName','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','projectId','\x0aProject\x20pushed\x20with\x20errors','\x20total','site','\x0aError:'];a4_0xef3b=function(){return _0x5800bc;};return a4_0xef3b();}function a4_0x2e06(_0x5927d5,_0x8f2648){_0x5927d5=_0x5927d5-0x123;const _0xef3bcb=a4_0xef3b();let _0x2e063f=_0xef3bcb[_0x5927d5];return _0x2e063f;}import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}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(_0x673161){const _0x20723d=a4_0x2e06,_0x4616c8=[];if(_0x673161[_0x20723d(0x1cf)]!==undefined)_0x4616c8[_0x20723d(0x135)](_0x673161[_0x20723d(0x1cf)]+_0x20723d(0x12e));if(_0x673161[_0x20723d(0x189)]!==undefined&&_0x673161[_0x20723d(0x189)]>0x0)_0x4616c8['push'](a4_0x5c10dc['green'](_0x673161[_0x20723d(0x189)]+_0x20723d(0x197)));if(_0x673161['created']!==undefined&&_0x673161[_0x20723d(0x16d)]>0x0)_0x4616c8['push'](a4_0x5c10dc[_0x20723d(0x148)](_0x673161['created']+_0x20723d(0x147)));if(_0x673161['updated']!==undefined&&_0x673161[_0x20723d(0x13f)]>0x0)_0x4616c8[_0x20723d(0x135)](a4_0x5c10dc['yellow'](_0x673161[_0x20723d(0x13f)]+_0x20723d(0x170)));if(_0x673161[_0x20723d(0x1a5)]!==undefined&&_0x673161[_0x20723d(0x1a5)]>0x0)_0x4616c8['push'](a4_0x5c10dc['gray'](_0x673161[_0x20723d(0x1a5)]+_0x20723d(0x185)));if(_0x673161['errors']!==undefined&&_0x673161[_0x20723d(0x178)]>0x0)_0x4616c8['push'](a4_0x5c10dc[_0x20723d(0x1c7)](_0x673161['errors']+_0x20723d(0x1c1)));return _0x4616c8[_0x20723d(0x1a6)](',\x20');}function displayDiffs(_0x523e50,_0x2e15a2,_0x1591d8,_0xb96966,_0x30f46b,_0x3a3875,_0x5cf586){const _0x3278f3=a4_0x2e06;for(const _0x26a70b of _0x523e50){if(_0x26a70b[_0x3278f3(0x149)]){const _0x22b8ac=_0x26a70b[_0x3278f3(0x12a)]||_0x26a70b[_0x3278f3(0x14e)];console[_0x3278f3(0x141)](_0x3278f3(0x154)+_0x22b8ac+'\x27:'),console[_0x3278f3(0x141)]('─'[_0x3278f3(0x1c6)](0x3c)),console[_0x3278f3(0x141)](_0x26a70b[_0x3278f3(0x149)]),console['log']('─'[_0x3278f3(0x1c6)](0x3c));}}for(const _0x1dc7ba of _0x2e15a2){_0x1dc7ba['diff']&&(console[_0x3278f3(0x141)](_0x3278f3(0x134)+_0x1dc7ba[_0x3278f3(0x14e)]+'\x27:'),console['log']('─'[_0x3278f3(0x1c6)](0x3c)),console[_0x3278f3(0x141)](_0x1dc7ba[_0x3278f3(0x149)]),console['log']('─'[_0x3278f3(0x1c6)](0x3c)));}for(const _0x653b8b of _0x1591d8){_0x653b8b[_0x3278f3(0x149)]&&(console[_0x3278f3(0x141)](_0x3278f3(0x1a3)+_0x653b8b[_0x3278f3(0x14e)]+'\x27:'),console[_0x3278f3(0x141)]('─'[_0x3278f3(0x1c6)](0x3c)),console[_0x3278f3(0x141)](_0x653b8b[_0x3278f3(0x149)]),console[_0x3278f3(0x141)]('─'['repeat'](0x3c)));}for(const _0x5f23a1 of _0xb96966){_0x5f23a1[_0x3278f3(0x149)]&&(console['log'](_0x3278f3(0x1c5)+_0x5f23a1[_0x3278f3(0x14e)]+'\x27:'),console['log']('─'[_0x3278f3(0x1c6)](0x3c)),console[_0x3278f3(0x141)](_0x5f23a1['diff']),console['log']('─'['repeat'](0x3c)));}for(const _0x2b5ea5 of _0x30f46b){_0x2b5ea5[_0x3278f3(0x149)]&&(console['log'](_0x3278f3(0x13d)+_0x2b5ea5[_0x3278f3(0x14e)]+'\x27:'),console[_0x3278f3(0x141)]('─'[_0x3278f3(0x1c6)](0x3c)),console[_0x3278f3(0x141)](_0x2b5ea5[_0x3278f3(0x149)]),console[_0x3278f3(0x141)]('─'['repeat'](0x3c)));}for(const _0x4b57b0 of _0x3a3875){_0x4b57b0[_0x3278f3(0x149)]&&(console[_0x3278f3(0x141)]('\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27'+_0x4b57b0[_0x3278f3(0x14e)]+'\x27:'),console[_0x3278f3(0x141)]('─'[_0x3278f3(0x1c6)](0x3c)),console['log'](_0x4b57b0[_0x3278f3(0x149)]),console[_0x3278f3(0x141)]('─'[_0x3278f3(0x1c6)](0x3c)));}for(const _0x45050a of _0x5cf586){_0x45050a[_0x3278f3(0x149)]&&(console[_0x3278f3(0x141)]('\x0aChanges\x20to\x20experimental\x20artifact\x20\x27'+_0x45050a['name']+'\x27:'),console['log']('─'[_0x3278f3(0x1c6)](0x3c)),console[_0x3278f3(0x141)](_0x45050a['diff']),console[_0x3278f3(0x141)]('─'[_0x3278f3(0x1c6)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x150f60(0x14e)]=a4_0x150f60(0x17f);['description']=a4_0x150f60(0x1b6);async[a4_0x150f60(0x169)](_0x55699a){const _0x5d61d5=a4_0x150f60,{options:_0x42ae5d,args:_0x4b29e8,tdx:_0x4cf83d}=_0x55699a,_0x57f5b1=_0x4b29e8[0x0],_0x4d9cdb=_0x4b29e8[0x1],_0x1bcc21=_0x42ae5d[_0x5d61d5(0x1c0)],_0x1fe289=_0x42ae5d['dryRun'],_0x558399=_0x42ae5d[_0x5d61d5(0x19d)],_0xc27a0a=_0x42ae5d[_0x5d61d5(0x14c)],_0x48a367=_0x42ae5d[_0x5d61d5(0x142)],_0x163f68=_0x42ae5d[_0x5d61d5(0x1c4)];let _0x1d8185;if(_0x57f5b1){const _0x12c117=a4_0x1df191['join'](_0x57f5b1,_0x5d61d5(0x1bd));if(existsSync(_0x12c117))try{const _0x311f3a=JSON['parse'](readFileSync(_0x12c117,_0x5d61d5(0x165)));_0x311f3a[_0x5d61d5(0x1cb)]&&(_0x1d8185={'llm_project':_0x311f3a[_0x5d61d5(0x1cb)]});}catch{}}const _0x2a59ef=findAgentConfigPath(process[_0x5d61d5(0x172)]());let _0x2db52c;if(_0x2a59ef)try{const _0x1bf02e=JSON[_0x5d61d5(0x177)](readFileSync(_0x2a59ef,_0x5d61d5(0x165)));_0x1bf02e[_0x5d61d5(0x1cb)]&&(_0x2db52c={'llm_project':_0x1bf02e[_0x5d61d5(0x1cb)]});}catch{}const _0x5030be=resolveAgentPullArgs({'arg':_0x57f5b1,'agentNameArg':_0x4d9cdb,'agentFlag':_0x163f68,'contextProject':_0x48a367,'argDirConfig':_0x1d8185,'cwdConfigPath':_0x2a59ef||undefined,'cwdConfig':_0x2db52c}),{projectNameOrId:_0x413faa,targetAgentName:_0x56d887,existingOutputDir:_0x5be13d,source:_0x29cec2}=_0x5030be;if(_0x29cec2===_0x5d61d5(0x193))console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x175)](_0x5d61d5(0x184)+a4_0x1df191[_0x5d61d5(0x1a6)](_0x57f5b1,'tdx.json')+':\x20'+_0x413faa));else{if(_0x29cec2==='cwd-config')console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x175)](_0x5d61d5(0x174)+_0x413faa));else _0x29cec2===_0x5d61d5(0x1d1)&&console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x175)]('Using\x20project\x20from\x20context:\x20'+_0x413faa));}if(!_0x413faa)return _0x163f68?(console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x133)](_0x5d61d5(0x12b))),console[_0x5d61d5(0x141)](_0x5d61d5(0x1a8)),console[_0x5d61d5(0x141)](_0x5d61d5(0x1aa))):(console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x133)](_0x5d61d5(0x188))),console[_0x5d61d5(0x141)](_0x5d61d5(0x1af)),console[_0x5d61d5(0x141)](_0x5d61d5(0x16c)),console[_0x5d61d5(0x141)](_0x5d61d5(0x145)),console['log'](_0x5d61d5(0x199)),console[_0x5d61d5(0x141)](_0x5d61d5(0x1a1))),0x1;if(_0x56d887){const {data:_0x42b335}=await withSpinner('Pulling\x20agent\x20\x22'+_0x56d887+'\x22\x20from\x20project\x20\x22'+_0x413faa+_0x5d61d5(0x152),()=>_0x4cf83d['llm'][_0x5d61d5(0x1bc)](_0x413faa,_0x56d887,_0x1bcc21,{'dryRun':_0x1fe289,'force':_0x558399}));if(_0x1fe289)return console['log'](a4_0x5c10dc[_0x5d61d5(0x133)](_0x5d61d5(0x18e))),console[_0x5d61d5(0x141)](_0x5d61d5(0x173)+_0x42b335[_0x5d61d5(0x12a)]),console[_0x5d61d5(0x141)](_0x5d61d5(0x14a)+_0x42b335[_0x5d61d5(0x160)]),_0x42b335[_0x5d61d5(0x149)]&&(console[_0x5d61d5(0x141)](_0x5d61d5(0x1c3)),console[_0x5d61d5(0x141)]('─'[_0x5d61d5(0x1c6)](0x3c)),console[_0x5d61d5(0x141)](_0x42b335[_0x5d61d5(0x149)]),console['log']('─'['repeat'](0x3c))),0x0;return console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x148)](_0x5d61d5(0x19f))),console['log'](_0x5d61d5(0x144)+_0x42b335[_0x5d61d5(0x12a)]),console[_0x5d61d5(0x141)](_0x5d61d5(0x1da)+_0x42b335[_0x5d61d5(0x160)]),console[_0x5d61d5(0x141)](_0x5d61d5(0x1d0)+(_0x42b335['isNew']?a4_0x5c10dc[_0x5d61d5(0x148)](_0x5d61d5(0x189)):_0x42b335[_0x5d61d5(0x140)]?a4_0x5c10dc['yellow'](_0x5d61d5(0x13f)):a4_0x5c10dc[_0x5d61d5(0x1d3)](_0x5d61d5(0x1a5)))),0x0;}const _0x56f155=_0x5be13d||_0x1bcc21,{data:_0x5ba55d}=await withSpinner('Analyzing\x20project\x20\x22'+_0x413faa+_0x5d61d5(0x152),()=>_0x4cf83d[_0x5d61d5(0x1d4)][_0x5d61d5(0x1b1)](_0x413faa,_0x56f155,{'dryRun':!![]})),_0x59c970=_0x5ba55d[_0x5d61d5(0x14f)]['agents']['new']+_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x176)]['new']+_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x137)]['new']+_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x1a4)][_0x5d61d5(0x189)]+_0x5ba55d['counts'][_0x5d61d5(0x1b5)][_0x5d61d5(0x189)]+_0x5ba55d['counts'][_0x5d61d5(0x1b0)][_0x5d61d5(0x189)]+_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x182)]['new'],_0xccfa87=_0x5ba55d['counts'][_0x5d61d5(0x168)][_0x5d61d5(0x13f)]+_0x5ba55d[_0x5d61d5(0x14f)]['knowledgeBases']['updated']+_0x5ba55d[_0x5d61d5(0x14f)]['textKnowledgeBases'][_0x5d61d5(0x13f)]+_0x5ba55d['counts'][_0x5d61d5(0x1a4)][_0x5d61d5(0x13f)]+_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x1b5)][_0x5d61d5(0x13f)]+_0x5ba55d[_0x5d61d5(0x14f)]['experimentalKnowledgeBases'][_0x5d61d5(0x13f)]+_0x5ba55d[_0x5d61d5(0x14f)]['experimentalArtifacts']['updated'],_0x48d6d0=_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x168)][_0x5d61d5(0x1a5)]+_0x5ba55d[_0x5d61d5(0x14f)]['knowledgeBases'][_0x5d61d5(0x1a5)]+_0x5ba55d['counts']['textKnowledgeBases'][_0x5d61d5(0x1a5)]+_0x5ba55d['counts'][_0x5d61d5(0x1a4)][_0x5d61d5(0x1a5)]+_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x1b5)]['unchanged']+_0x5ba55d['counts'][_0x5d61d5(0x1b0)][_0x5d61d5(0x1a5)]+_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x182)][_0x5d61d5(0x1a5)];console[_0x5d61d5(0x141)]('\x0aPull\x20summary\x20for\x20\x27'+_0x5ba55d[_0x5d61d5(0x163)]+'\x27:'),console['log']('\x20\x20'+a4_0x5c10dc['green']('+\x20'+_0x59c970+_0x5d61d5(0x197))+_0x5d61d5(0x17c)+a4_0x5c10dc[_0x5d61d5(0x133)]('~\x20'+_0xccfa87+_0x5d61d5(0x1b2))+_0x5d61d5(0x17c)+a4_0x5c10dc['dim']('=\x20'+_0x48d6d0+_0x5d61d5(0x185))),console[_0x5d61d5(0x141)](_0x5d61d5(0x191)+formatCountSummary(_0x5ba55d['counts']['agents'])),console['log']('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x5ba55d['counts']['knowledgeBases'])),console['log'](_0x5d61d5(0x1b8)+formatCountSummary(_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x137)])),console[_0x5d61d5(0x141)](_0x5d61d5(0x156)+formatCountSummary(_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x1a4)])),console['log'](_0x5d61d5(0x139)+formatCountSummary(_0x5ba55d['counts']['integrations']));const _0x5b8da5=_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x1b0)][_0x5d61d5(0x1cf)]>0x0||_0x5ba55d[_0x5d61d5(0x14f)]['experimentalArtifacts']['total']>0x0;_0x5b8da5&&(console['log'](_0x5d61d5(0x18f)+formatCountSummary(_0x5ba55d[_0x5d61d5(0x14f)][_0x5d61d5(0x1b0)])),console[_0x5d61d5(0x141)](_0x5d61d5(0x1ca)+formatCountSummary(_0x5ba55d['counts']['experimentalArtifacts'])));console[_0x5d61d5(0x141)](_0x5d61d5(0x13e)+a4_0x5c10dc[_0x5d61d5(0x16b)](_0x5ba55d[_0x5d61d5(0x17e)])),displayDiffs(_0x5ba55d[_0x5d61d5(0x168)],_0x5ba55d[_0x5d61d5(0x176)],_0x5ba55d[_0x5d61d5(0x137)],_0x5ba55d[_0x5d61d5(0x1a4)],_0x5ba55d['integrations'],_0x5ba55d['experimentalKnowledgeBases'],_0x5ba55d['experimentalArtifacts']);if(_0x1fe289)return console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x133)](_0x5d61d5(0x131))),0x0;if(_0x59c970===0x0&&_0xccfa87===0x0)return console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x148)](_0x5d61d5(0x14b))),saveSessionContext({'llm_project':_0x5ba55d['projectName']},_0x42ae5d[_0x5d61d5(0x180)]),console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x148)](_0x5d61d5(0x1a9)+a4_0x5c10dc[_0x5d61d5(0x175)](_0x5d61d5(0x1cb))+_0x5d61d5(0x1db)+a4_0x5c10dc[_0x5d61d5(0x16b)](_0x5ba55d[_0x5d61d5(0x163)]))),0x0;if(!_0xc27a0a&&!_0x558399){if(!isInteractive())return console['error'](a4_0x5c10dc[_0x5d61d5(0x1c7)]('\x0aError:'),_0x5d61d5(0x179)),console[_0x5d61d5(0x138)](a4_0x5c10dc[_0x5d61d5(0x175)](_0x5d61d5(0x1cd))),0x1;const _0xcdb5ee=await confirmKey(_0x5d61d5(0x1bf)+(_0x59c970+_0xccfa87)+_0x5d61d5(0x196));if(!_0xcdb5ee)return console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x133)](_0x5d61d5(0x1ae)),_0x5d61d5(0x143)),0x1;}const {data:_0x4dcbc1}=await withSpinner(_0x5d61d5(0x127),()=>_0x4cf83d[_0x5d61d5(0x1d4)][_0x5d61d5(0x1b1)](_0x413faa,_0x56f155,{'force':_0x558399}));return console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x148)](_0x5d61d5(0x136)+(_0x59c970+_0xccfa87)+_0x5d61d5(0x194)+_0x4dcbc1[_0x5d61d5(0x17e)])),saveSessionContext({'llm_project':_0x4dcbc1[_0x5d61d5(0x163)]},_0x42ae5d[_0x5d61d5(0x180)]),console[_0x5d61d5(0x141)](a4_0x5c10dc[_0x5d61d5(0x148)](_0x5d61d5(0x1a9)+a4_0x5c10dc[_0x5d61d5(0x175)](_0x5d61d5(0x1cb))+_0x5d61d5(0x1db)+a4_0x5c10dc[_0x5d61d5(0x16b)](_0x4dcbc1[_0x5d61d5(0x163)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x150f60(0x14e)]=a4_0x150f60(0x157);['description']='Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project';async[a4_0x150f60(0x169)](_0x86d43d){const _0x2a3405=a4_0x150f60,{options:_0x1fd14f,args:_0x4f6b19,tdx:_0x406cf9}=_0x86d43d,_0x58c239=_0x4f6b19[0x0],_0x3d41cf=_0x1fd14f[_0x2a3405(0x14e)],_0x461df7=_0x1fd14f[_0x2a3405(0x1a0)],_0x1656c1=_0x1fd14f[_0x2a3405(0x14c)],_0xe46107=_0x1fd14f[_0x2a3405(0x12f)],_0x5f1b57=_0x1fd14f['llmProject'];let _0x2add9d;const _0x1e4f30=findAgentConfigPath(process[_0x2a3405(0x172)]());if(_0x58c239){const _0x4999e3=a4_0x1df191[_0x2a3405(0x1a6)](_0x58c239,'tdx.json');existsSync(_0x4999e3)?(_0x2add9d=_0x58c239,console['log'](a4_0x5c10dc[_0x2a3405(0x175)](_0x2a3405(0x15f)+_0x58c239))):_0x2add9d=_0x58c239;}else{if(_0x1e4f30)_0x2add9d=a4_0x1df191['dirname'](_0x1e4f30),console['log'](a4_0x5c10dc['dim'](_0x2a3405(0x167)+_0x2add9d));else{if(_0x5f1b57){const _0x5bed2d=sanitizeForFilesystem(_0x5f1b57);let _0x555afd=_0x5bed2d,_0x502382=a4_0x1df191[_0x2a3405(0x1a6)](process[_0x2a3405(0x172)](),'agents',_0x5bed2d,'tdx.json');if(!existsSync(_0x502382)){const _0x14346d=normalizeName(_0x5f1b57),_0x44068d=a4_0x1df191[_0x2a3405(0x1a6)](process['cwd'](),'agents',_0x14346d,_0x2a3405(0x1bd));existsSync(_0x44068d)&&(_0x555afd=_0x14346d,_0x502382=_0x44068d);}if(existsSync(_0x502382))_0x2add9d=a4_0x1df191[_0x2a3405(0x195)](_0x502382),console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x175)]('Using\x20local\x20project:\x20'+_0x2add9d));else{const _0x3a6b20=_0x1fd14f['profile'];if(_0x3a6b20)throw new SDKError(ErrorCode[_0x2a3405(0x155)],_0x2a3405(0x1ab)+_0x5f1b57+_0x2a3405(0x129),undefined,{'helpText':_0x2a3405(0x126)+_0x2a3405(0x161)+(_0x2a3405(0x15b)+_0x5f1b57+'\x0a')+(_0x2a3405(0x183)+_0x555afd+_0x2a3405(0x125)+(_0x3d41cf||_0x2a3405(0x16e))+'\x20--profile\x20'+_0x3a6b20)});_0x2add9d=_0x5f1b57,console[_0x2a3405(0x141)](a4_0x5c10dc['dim'](_0x2a3405(0x13c)+_0x5f1b57));}}}}if(!_0x2add9d)return console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x133)](_0x2a3405(0x18d))),console[_0x2a3405(0x141)](_0x2a3405(0x146)),console[_0x2a3405(0x141)](_0x2a3405(0x1dd)),console[_0x2a3405(0x141)]('\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[_0x2a3405(0x141)]('\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>'),0x1;if(!_0x3d41cf)throw new SDKError(ErrorCode[_0x2a3405(0x14d)],_0x2a3405(0x1bb),undefined,{'helpText':_0x2a3405(0x13a)});if(!_0x1656c1&&!_0x461df7){if(!isInteractive())return console[_0x2a3405(0x138)](a4_0x5c10dc['red'](_0x2a3405(0x130)),_0x2a3405(0x179)),console[_0x2a3405(0x138)](a4_0x5c10dc['dim'](_0x2a3405(0x1cd))),0x1;const _0x54be16=await confirmKey(_0x2a3405(0x17b)+_0x2add9d+'\x22\x20to\x20new\x20project\x20\x22'+_0x3d41cf+'\x22?');if(!_0x54be16)return console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x133)](_0x2a3405(0x1ae))),0x1;}const {data:_0x3e55f1}=await withSpinner('Cloning\x20\x22'+_0x2add9d+_0x2a3405(0x15e)+_0x3d41cf+'\x22...',()=>_0x406cf9[_0x2a3405(0x1d4)][_0x2a3405(0x1c2)](_0x2add9d,_0x3d41cf,{'dryRun':_0x461df7}));if(_0x461df7){console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x133)](_0x2a3405(0x17a))),console[_0x2a3405(0x141)]('Source:\x20'+_0x3e55f1[_0x2a3405(0x19a)]),console['log'](_0x2a3405(0x1ac)+_0x3d41cf),console[_0x2a3405(0x141)]('Would\x20clone:'),console['log'](_0x2a3405(0x191)+_0x3e55f1[_0x2a3405(0x14f)]['agents']['created']),console[_0x2a3405(0x141)](_0x2a3405(0x1c9)+_0x3e55f1[_0x2a3405(0x14f)]['knowledgeBases'][_0x2a3405(0x16d)]),console['log']('\x20\x20Prompts:\x20'+_0x3e55f1[_0x2a3405(0x14f)]['prompts'][_0x2a3405(0x16d)]);const _0x5da87e=_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x1b0)][_0x2a3405(0x16d)]>0x0||_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x182)]['created']>0x0;return _0x5da87e&&(console[_0x2a3405(0x141)](_0x2a3405(0x18f)+_0x3e55f1[_0x2a3405(0x14f)]['experimentalKnowledgeBases'][_0x2a3405(0x16d)]),console['log'](_0x2a3405(0x1ca)+_0x3e55f1['counts'][_0x2a3405(0x182)]['created'])),0x0;}const _0x5ae92a=_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x168)][_0x2a3405(0x178)]>0x0||_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x176)][_0x2a3405(0x178)]>0x0||_0x3e55f1[_0x2a3405(0x14f)]['prompts'][_0x2a3405(0x178)]>0x0||_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x1b0)][_0x2a3405(0x178)]>0x0||_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x182)][_0x2a3405(0x178)]>0x0;_0x5ae92a?console['log'](a4_0x5c10dc['yellow'](_0x2a3405(0x198))):console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x148)](_0x2a3405(0x1b7)));console['log'](_0x2a3405(0x1d9)+_0x3e55f1[_0x2a3405(0x19a)]),console[_0x2a3405(0x141)](_0x2a3405(0x1ac)+_0x3e55f1[_0x2a3405(0x1c8)]),console[_0x2a3405(0x141)](_0x2a3405(0x1d2)+_0x3e55f1[_0x2a3405(0x19b)]),console[_0x2a3405(0x141)](),console['log'](_0x2a3405(0x150)),console['log'](_0x2a3405(0x191)+formatCountSummary(_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x168)])),console[_0x2a3405(0x141)](_0x2a3405(0x1c9)+formatCountSummary(_0x3e55f1['counts'][_0x2a3405(0x176)])),console[_0x2a3405(0x141)](_0x2a3405(0x156)+formatCountSummary(_0x3e55f1['counts'][_0x2a3405(0x1a4)])),console[_0x2a3405(0x141)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x1b5)]));const _0x5678c1=_0x3e55f1['counts'][_0x2a3405(0x1b0)][_0x2a3405(0x16d)]>0x0||_0x3e55f1[_0x2a3405(0x14f)]['experimentalKnowledgeBases'][_0x2a3405(0x13f)]>0x0||_0x3e55f1[_0x2a3405(0x14f)]['experimentalKnowledgeBases'][_0x2a3405(0x1a5)]>0x0||_0x3e55f1['counts'][_0x2a3405(0x182)][_0x2a3405(0x16d)]>0x0||_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x182)][_0x2a3405(0x13f)]>0x0||_0x3e55f1[_0x2a3405(0x14f)][_0x2a3405(0x182)]['unchanged']>0x0;_0x5678c1&&(console[_0x2a3405(0x141)](_0x2a3405(0x18f)+formatCountSummary(_0x3e55f1[_0x2a3405(0x14f)]['experimentalKnowledgeBases'])),console['log'](_0x2a3405(0x1ca)+formatCountSummary(_0x3e55f1['counts'][_0x2a3405(0x182)])));if(_0x5ae92a){console[_0x2a3405(0x141)](),console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x1c7)](_0x2a3405(0x186)));for(const _0x5ca45e of _0x3e55f1[_0x2a3405(0x168)]){_0x5ca45e['action']===_0x2a3405(0x138)&&console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x1c7)](_0x2a3405(0x1ba)+_0x5ca45e[_0x2a3405(0x12a)]+_0x2a3405(0x123)+_0x5ca45e[_0x2a3405(0x138)]));}for(const _0x2f92a7 of _0x3e55f1[_0x2a3405(0x176)]){_0x2f92a7[_0x2a3405(0x19e)]===_0x2a3405(0x138)&&console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x1c7)](_0x2a3405(0x124)+_0x2f92a7['name']+_0x2a3405(0x123)+_0x2f92a7['error']));}for(const _0x2a242b of _0x3e55f1[_0x2a3405(0x1a4)]){_0x2a242b[_0x2a3405(0x19e)]===_0x2a3405(0x138)&&console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x1c7)]('\x20\x20Prompt\x20\x22'+_0x2a242b[_0x2a3405(0x14e)]+_0x2a3405(0x123)+_0x2a242b['error']));}for(const _0x44f2c3 of _0x3e55f1[_0x2a3405(0x1b5)]){_0x44f2c3['action']===_0x2a3405(0x138)&&console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x1c7)](_0x2a3405(0x164)+_0x44f2c3['name']+'\x22:\x20'+_0x44f2c3[_0x2a3405(0x138)]));}for(const _0x483599 of _0x3e55f1[_0x2a3405(0x1b0)]){_0x483599[_0x2a3405(0x19e)]==='error'&&console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x1c7)]('\x20\x20Experimental\x20Knowledge\x20Base\x20\x22'+_0x483599[_0x2a3405(0x14e)]+_0x2a3405(0x123)+_0x483599[_0x2a3405(0x138)]));}for(const _0x5c8304 of _0x3e55f1[_0x2a3405(0x182)]){_0x5c8304[_0x2a3405(0x19e)]===_0x2a3405(0x138)&&console[_0x2a3405(0x141)](a4_0x5c10dc[_0x2a3405(0x1c7)]('\x20\x20Experimental\x20Artifact\x20\x22'+_0x5c8304[_0x2a3405(0x14e)]+'\x22:\x20'+_0x5c8304['error']));}return 0x1;}console[_0x2a3405(0x141)]();const _0x5060f8=getLLMProjectUrl(_0xe46107,_0x3e55f1['newProjectId']);return console[_0x2a3405(0x141)](_0x2a3405(0x192)+a4_0x5c10dc[_0x2a3405(0x16b)](_0x5060f8)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x150f60(0x14e)]='agent:push';[a4_0x150f60(0x1d8)]=a4_0x150f60(0x18a);async['execute'](_0x4494ba){const _0x424273=a4_0x150f60,{options:_0x126740,args:_0x3fdb45,tdx:_0x30af1d}=_0x4494ba;let _0x592686=_0x3fdb45[0x0]||process[_0x424273(0x172)]();const _0x595573=_0x126740[_0x424273(0x1a0)],_0x57e96c=_0x126740[_0x424273(0x19d)],_0x331a3e=_0x126740[_0x424273(0x14c)],_0x54ce39=_0x126740[_0x424273(0x12f)],_0x96a35a=a4_0x1df191[_0x424273(0x1a6)](_0x592686,_0x424273(0x162)),_0x385758=existsSync(_0x96a35a);if(_0x385758){const {data:_0xa1cd49}=await withSpinner(_0x424273(0x166)+_0x592686+_0x424273(0x152),()=>_0x30af1d[_0x424273(0x1d4)][_0x424273(0x181)](_0x592686,{'dryRun':_0x595573,'force':_0x57e96c}));if(_0x595573)return console['log'](a4_0x5c10dc[_0x424273(0x133)](_0x424273(0x17a))),console[_0x424273(0x141)](_0x424273(0x1d6)+_0xa1cd49[_0x424273(0x12a)]),0x0;if(_0xa1cd49[_0x424273(0x19e)]===_0x424273(0x138))return console['log'](a4_0x5c10dc[_0x424273(0x1c7)]('Failed\x20to\x20push\x20agent:\x20'+_0xa1cd49[_0x424273(0x138)])),0x1;console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x148)](_0x424273(0x132)+_0xa1cd49[_0x424273(0x19e)]+_0x424273(0x16a))),console['log'](_0x424273(0x144)+_0xa1cd49[_0x424273(0x12a)]);if(_0xa1cd49[_0x424273(0x187)]&&_0xa1cd49[_0x424273(0x12c)]){const _0x5577ff=getLLMAgentChatUrl(_0x54ce39,_0xa1cd49[_0x424273(0x12c)],_0xa1cd49[_0x424273(0x187)]);console[_0x424273(0x141)]('Chat:\x20'+a4_0x5c10dc[_0x424273(0x16b)](_0x5577ff));}return 0x0;}const _0x561e18=_0x126740[_0x424273(0x142)],_0x45853d=resolveProjectFromContext(_0x592686,_0x561e18);if(_0x45853d['found'])_0x592686=_0x45853d[_0x424273(0x158)],_0x45853d[_0x424273(0x1ad)]===_0x424273(0x1d1)&&console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x175)](_0x424273(0x174)+_0x592686));else{let _0x4abeb0=_0x424273(0x17d);_0x45853d[_0x424273(0x1cc)]===_0x424273(0x1d7)&&(_0x4abeb0=_0x45853d['message']+_0x424273(0x19c)+_0x45853d[_0x424273(0x142)]+_0x424273(0x1b9));throw new SDKError(ErrorCode[_0x424273(0x155)],_0x45853d[_0x424273(0x1cc)]==='no_context'?_0x45853d[_0x424273(0x1b3)]:_0x424273(0x13b)+_0x592686,undefined,{'helpText':_0x4abeb0});}const {data:_0x14f269}=await withSpinner(_0x424273(0x1be),()=>_0x30af1d['llm'][_0x424273(0x15a)](_0x592686,{'dryRun':!![]})),_0x217edd=_0x14f269['counts'][_0x424273(0x168)][_0x424273(0x178)]>0x0;if(_0x217edd){console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x1c7)]('\x0aErrors\x20found:'));for(const _0x31ac2a of _0x14f269[_0x424273(0x168)]){_0x31ac2a[_0x424273(0x19e)]===_0x424273(0x138)&&console['log'](a4_0x5c10dc[_0x424273(0x1c7)](_0x424273(0x1ba)+_0x31ac2a[_0x424273(0x12a)]+'\x22:\x20'+_0x31ac2a['error']));}return 0x1;}const _0x1d864e=_0x14f269['counts'][_0x424273(0x168)]['created']+_0x14f269[_0x424273(0x14f)]['knowledgeBases'][_0x424273(0x16d)]+_0x14f269[_0x424273(0x14f)][_0x424273(0x137)][_0x424273(0x16d)]+_0x14f269[_0x424273(0x14f)]['prompts']['created']+_0x14f269[_0x424273(0x14f)][_0x424273(0x1b5)]['created']+_0x14f269[_0x424273(0x14f)][_0x424273(0x1b0)][_0x424273(0x16d)]+_0x14f269[_0x424273(0x14f)][_0x424273(0x182)]['created'],_0x2fb15e=_0x14f269[_0x424273(0x14f)][_0x424273(0x168)][_0x424273(0x13f)]+_0x14f269[_0x424273(0x14f)][_0x424273(0x176)][_0x424273(0x13f)]+_0x14f269[_0x424273(0x14f)]['textKnowledgeBases']['updated']+_0x14f269[_0x424273(0x14f)][_0x424273(0x1a4)]['updated']+_0x14f269[_0x424273(0x14f)][_0x424273(0x1b5)][_0x424273(0x13f)]+_0x14f269[_0x424273(0x14f)]['experimentalKnowledgeBases']['updated']+_0x14f269[_0x424273(0x14f)][_0x424273(0x182)]['updated'],_0x217908=_0x14f269['counts'][_0x424273(0x168)]['unchanged']+_0x14f269[_0x424273(0x14f)][_0x424273(0x176)]['unchanged']+_0x14f269[_0x424273(0x14f)][_0x424273(0x137)]['unchanged']+_0x14f269[_0x424273(0x14f)]['prompts'][_0x424273(0x1a5)]+_0x14f269[_0x424273(0x14f)][_0x424273(0x1b5)][_0x424273(0x1a5)]+_0x14f269[_0x424273(0x14f)][_0x424273(0x1b0)][_0x424273(0x1a5)]+_0x14f269[_0x424273(0x14f)][_0x424273(0x182)][_0x424273(0x1a5)];console[_0x424273(0x141)]('\x0aPush\x20summary\x20for\x20\x27'+_0x14f269[_0x424273(0x163)]+'\x27:'),console[_0x424273(0x141)]('\x20\x20'+a4_0x5c10dc[_0x424273(0x148)]('+\x20'+_0x1d864e+_0x424273(0x197))+_0x424273(0x17c)+a4_0x5c10dc[_0x424273(0x133)]('~\x20'+_0x2fb15e+'\x20changed')+_0x424273(0x17c)+a4_0x5c10dc[_0x424273(0x175)]('=\x20'+_0x217908+_0x424273(0x185))),console[_0x424273(0x141)](_0x424273(0x191)+formatCountSummary(_0x14f269[_0x424273(0x14f)][_0x424273(0x168)])),console['log']('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x14f269[_0x424273(0x14f)][_0x424273(0x176)])),console['log']('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x14f269[_0x424273(0x14f)][_0x424273(0x137)])),console[_0x424273(0x141)](_0x424273(0x156)+formatCountSummary(_0x14f269[_0x424273(0x14f)][_0x424273(0x1a4)])),console['log'](_0x424273(0x139)+formatCountSummary(_0x14f269[_0x424273(0x14f)]['integrations']));const _0x24bdaa=_0x14f269[_0x424273(0x14f)][_0x424273(0x1b0)][_0x424273(0x16d)]>0x0||_0x14f269[_0x424273(0x14f)][_0x424273(0x1b0)][_0x424273(0x13f)]>0x0||_0x14f269[_0x424273(0x14f)][_0x424273(0x1b0)][_0x424273(0x1a5)]>0x0||_0x14f269[_0x424273(0x14f)][_0x424273(0x182)][_0x424273(0x16d)]>0x0||_0x14f269['counts']['experimentalArtifacts']['updated']>0x0||_0x14f269[_0x424273(0x14f)][_0x424273(0x182)][_0x424273(0x1a5)]>0x0;_0x24bdaa&&(console[_0x424273(0x141)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x14f269[_0x424273(0x14f)]['experimentalKnowledgeBases'])),console[_0x424273(0x141)](_0x424273(0x1ca)+formatCountSummary(_0x14f269[_0x424273(0x14f)][_0x424273(0x182)])));console['log'](_0x424273(0x15c)+a4_0x5c10dc[_0x424273(0x16b)](_0x592686)),displayDiffs(_0x14f269[_0x424273(0x168)],_0x14f269[_0x424273(0x176)],_0x14f269[_0x424273(0x137)],_0x14f269[_0x424273(0x1a4)],_0x14f269[_0x424273(0x1b5)],_0x14f269['experimentalKnowledgeBases'],_0x14f269['experimentalArtifacts']);if(_0x595573)return console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x133)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed')),0x0;if(_0x1d864e===0x0&&_0x2fb15e===0x0){console[_0x424273(0x141)](a4_0x5c10dc['green'](_0x424273(0x1b4)));const _0x3baf0a=getLLMProjectUrl(_0x54ce39,_0x14f269['projectId']);return console[_0x424273(0x141)](_0x424273(0x192)+a4_0x5c10dc[_0x424273(0x16b)](_0x3baf0a)),0x0;}if(!_0x331a3e&&!_0x57e96c){if(!isInteractive())return console['error'](a4_0x5c10dc[_0x424273(0x1c7)]('\x0aError:'),_0x424273(0x179)),console['error'](a4_0x5c10dc[_0x424273(0x175)](_0x424273(0x1cd))),0x1;const _0x5226d0=await confirmKey(_0x424273(0x18c)+(_0x1d864e+_0x2fb15e)+_0x424273(0x1a2));if(!_0x5226d0)return console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x133)](_0x424273(0x1ae)),'-\x20nothing\x20pushed'),0x1;}const {data:_0x20cba4}=await withSpinner(_0x424273(0x171),()=>_0x30af1d['llm'][_0x424273(0x15a)](_0x592686,{'force':_0x57e96c})),_0x1dda06=_0x20cba4[_0x424273(0x14f)][_0x424273(0x168)][_0x424273(0x178)]>0x0||_0x20cba4[_0x424273(0x14f)][_0x424273(0x176)][_0x424273(0x178)]>0x0||_0x20cba4[_0x424273(0x14f)][_0x424273(0x137)][_0x424273(0x178)]>0x0||_0x20cba4[_0x424273(0x14f)]['prompts'][_0x424273(0x178)]>0x0;if(_0x1dda06){console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x133)](_0x424273(0x12d))),console[_0x424273(0x141)](),console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x1c7)]('Errors:'));for(const _0x311c5b of _0x20cba4[_0x424273(0x168)]){_0x311c5b[_0x424273(0x19e)]===_0x424273(0x138)&&console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x1c7)]('\x20\x20Agent\x20\x22'+_0x311c5b[_0x424273(0x12a)]+_0x424273(0x123)+_0x311c5b[_0x424273(0x138)]));}for(const _0x8e39dd of _0x20cba4[_0x424273(0x176)]){_0x8e39dd[_0x424273(0x19e)]==='error'&&console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x1c7)](_0x424273(0x124)+_0x8e39dd[_0x424273(0x14e)]+_0x424273(0x123)+_0x8e39dd[_0x424273(0x138)]));}for(const _0xac6764 of _0x20cba4[_0x424273(0x137)]){_0xac6764[_0x424273(0x19e)]===_0x424273(0x138)&&console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x1c7)](_0x424273(0x153)+_0xac6764['name']+_0x424273(0x123)+_0xac6764[_0x424273(0x138)]));}for(const _0x2dfde6 of _0x20cba4[_0x424273(0x1a4)]){_0x2dfde6[_0x424273(0x19e)]===_0x424273(0x138)&&console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x1c7)]('\x20\x20Prompt\x20\x22'+_0x2dfde6[_0x424273(0x14e)]+_0x424273(0x123)+_0x2dfde6['error']));}for(const _0x1cbd65 of _0x20cba4[_0x424273(0x1b5)]){_0x1cbd65['action']===_0x424273(0x138)&&console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x1c7)](_0x424273(0x164)+_0x1cbd65[_0x424273(0x14e)]+_0x424273(0x123)+_0x1cbd65['error']));}return 0x1;}console[_0x424273(0x141)](a4_0x5c10dc[_0x424273(0x148)](_0x424273(0x1a7)+(_0x1d864e+_0x2fb15e)+'\x20resources\x20to\x20\x27'+_0x20cba4[_0x424273(0x163)]+'\x27'));const _0x488e02=getLLMProjectUrl(_0x54ce39,_0x20cba4[_0x424273(0x12c)]);return console['log'](_0x424273(0x192)+a4_0x5c10dc[_0x424273(0x16b)](_0x488e02)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x5c6f56=a5_0x3b66;function a5_0xf5d0(){const _0x5dacff=['description','json','status','Round\x20',':\x20Sending\x20user\x20input...','toLowerCase','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','llmProject','conversations','green','Round\x201/','Errors:\x20\x20\x20','\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)','2IKkADy','agentName','timestamp','Using\x20agent:\x20','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','Total:\x20\x20\x20\x20','\x20-\x20','\x20\x20Evaluating...\x20','/<agent-name>','\x20\x20Conversation:\x20','✗\x20ERROR:\x20Project\x20not\x20found:\x20','projectDir','toISOString','resolve','name','message','Conversation\x20URL:\x20','round','4900036quSopT','Usage:','...\x20','includes','resolveAgentId','Duration:\x20','Running\x20agent\x20tests...','Cached\x20run\x20from:\x20','tags','jsonl','length','337472RyHoLa','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','existsSync','Error\x20writing\x20output\x20file:\x20','has','\x22:\x20','white','...','Test\x20Summary','site','Test\x20Configuration:','some','writeFileSync','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','conversation_url','execute','basename','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','log','\x27\x20to\x20create\x20the\x20folder\x20structure.','Tests\x20found:\x20','Re-evaluation\x20Summary','Output\x20written\x20to:\x20','red','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','map','\x20\x20Round\x20','agent:test','test.yml','\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','testName','output','Available\x20tags:\x20','no_tests','ERROR','projectName','no_local_folder','FAIL','Executing\x20new\x20tests...','\x20(new)','found','Re-evaluating...','forEach','resolveProjectId','start','\x20(cached)','utf-8','Evaluating\x20response...','tsv','tests','Test\x20','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','reason','42835thqjmB','find','not\x20found','Running:\x20','Run\x20tests\x20for\x20an\x20LLM\x20agent','Failed:\x20\x20\x20','context','rounds','repeat','11302128zYKExr','Run\x20\x27tdx\x20agent\x20pull\x20','Running\x20test:\x20','No\x20tests\x20found\x20with\x20tags:\x20','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','354PItwQA','Error:\x20No\x20previous\x20test\x20run\x20found.','executeReeval','✗\x20ERROR:\x20','split','text','push','size','Re-evaluating\x20cached\x20test\x20run...','11459952jRvfcP','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','PASS','table','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','stop','isSpinning','2874927xIvwDA','trim','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','llm','Passed:\x20\x20\x20','5560527xgKrko','\x20\x20Site:\x20','filter','Project\x20path:\x20','No\x20tests\x20have\x20tags\x20defined.','⚠\x20SKIPPED:\x20','✓\x20PASS:\x20','multiple_agents','404','yellow','\x20\x20Project:\x20','Agent:\x20','dim','✗\x20FAIL:\x20','agent','agentDirs','now','cyan'];a5_0xf5d0=function(){return _0x5dacff;};return a5_0xf5d0();}(function(_0x4f0f33,_0x46abde){const _0x266eb3=a5_0x3b66,_0x6deaf9=_0x4f0f33();while(!![]){try{const _0x48c836=-parseInt(_0x266eb3(0x163))/0x1+parseInt(_0x266eb3(0x146))/0x2*(parseInt(_0x266eb3(0x1b8))/0x3)+parseInt(_0x266eb3(0x158))/0x4+-parseInt(_0x266eb3(0x199))/0x5*(parseInt(_0x266eb3(0x1a7))/0x6)+-parseInt(_0x266eb3(0x1bd))/0x7+parseInt(_0x266eb3(0x1b0))/0x8+-parseInt(_0x266eb3(0x1a2))/0x9;if(_0x48c836===_0x46abde)break;else _0x6deaf9['push'](_0x6deaf9['shift']());}catch(_0x107a4d){_0x6deaf9['push'](_0x6deaf9['shift']());}}}(a5_0xf5d0,0xb072e));import*as a5_0x362934 from'node:fs';import*as a5_0x444c23 from'node:path';function a5_0x3b66(_0x20eff4,_0x57ccf6){_0x20eff4=_0x20eff4-0x13c;const _0xf5d073=a5_0xf5d0();let _0x3b66e2=_0xf5d073[_0x20eff4];return _0x3b66e2;}import a5_0x156914 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_0x5c6f56(0x154)]=a5_0x5c6f56(0x17f);[a5_0x5c6f56(0x1cf)]=a5_0x5c6f56(0x19d);async[a5_0x5c6f56(0x173)](_0x4c4913){const _0x1ee8d7=a5_0x5c6f56,{options:_0x3a87f5,args:_0x548d7a,tdx:_0x1e6396}=_0x4c4913,_0x2b627f=_0x548d7a[0x0]||'.',_0x19ebee=_0x3a87f5['dryRun'],_0x38c40a=_0x3a87f5,_0x486648=_0x38c40a['eval']===![],_0x3360ab=_0x38c40a['reeval'],_0x516502=_0x38c40a[_0x1ee8d7(0x154)],_0x8af142=_0x38c40a[_0x1ee8d7(0x160)],_0x174dd3=_0x3a87f5[_0x1ee8d7(0x16c)],_0x43614f=_0x38c40a[_0x1ee8d7(0x183)];if(_0x3360ab&&_0x486648)return console['log'](a5_0x156914[_0x1ee8d7(0x17b)](_0x1ee8d7(0x170))),0x1;let _0x1a7aaa='table';if(_0x38c40a[_0x1ee8d7(0x1d0)])_0x1a7aaa='json';else{if(_0x38c40a[_0x1ee8d7(0x161)])_0x1a7aaa=_0x1ee8d7(0x161);else{if(_0x38c40a[_0x1ee8d7(0x194)])_0x1a7aaa=_0x1ee8d7(0x194);else{if(_0x38c40a[_0x1ee8d7(0x1b3)])_0x1a7aaa='table';}}}const _0x3d929b=_0x38c40a[_0x1ee8d7(0x140)];let _0x38c3f8=_0x2b627f;const _0x41a92e=a5_0x362934[_0x1ee8d7(0x165)](_0x2b627f),_0x15da1d=_0x2b627f==='.';if(!_0x41a92e||_0x15da1d){const _0x374587=resolveProjectFromContext(_0x2b627f,_0x3d929b,{'requireFile':_0x1ee8d7(0x180)});if(_0x374587[_0x1ee8d7(0x18c)])_0x38c3f8=_0x374587[_0x1ee8d7(0x151)],_0x374587['source']===_0x1ee8d7(0x19f)&&console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c9)](_0x1ee8d7(0x149)+_0x38c3f8));else switch(_0x374587[_0x1ee8d7(0x198)]){case'no_context':console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c6)](_0x374587[_0x1ee8d7(0x155)])),console[_0x1ee8d7(0x176)](),console['log'](_0x1ee8d7(0x159)),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x181)),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x145)),console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x1b1));return 0x1;case _0x1ee8d7(0x188):console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c6)](_0x374587[_0x1ee8d7(0x155)])),console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x1a3)+_0x374587['llmProject']+_0x1ee8d7(0x177));return 0x1;case _0x1ee8d7(0x1c4):{const _0x769157=a5_0x444c23[_0x1ee8d7(0x174)](_0x374587['projectDir']);console['log'](a5_0x156914[_0x1ee8d7(0x1c6)](_0x1ee8d7(0x164)+_0x374587[_0x1ee8d7(0x140)]+'\x22:'));for(const _0x129604 of _0x374587[_0x1ee8d7(0x1cc)]){console[_0x1ee8d7(0x176)]('\x20\x20-\x20'+_0x129604);}return console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)]('Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/'+_0x769157+_0x1ee8d7(0x14e)),0x1;}case _0x1ee8d7(0x185):console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c6)](_0x1ee8d7(0x13f)+_0x374587[_0x1ee8d7(0x140)]+'\x22.')),console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c9)](_0x1ee8d7(0x1c0)+_0x374587[_0x1ee8d7(0x151)])),console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x197));return 0x1;}}const {definition:_0x2ad207,agentInfo:_0x5eb5db}=parseTestFile(_0x38c3f8);let _0x3e36b6=_0x2ad207['tests'];if(_0x516502){const _0xe41f2d=_0x516502['split'](',')['map'](_0x5a5de4=>_0x5a5de4[_0x1ee8d7(0x1b9)]());_0x3e36b6=_0x2ad207[_0x1ee8d7(0x195)][_0x1ee8d7(0x1bf)](_0x16f064=>_0xe41f2d[_0x1ee8d7(0x15b)](_0x16f064[_0x1ee8d7(0x154)]));if(_0x3e36b6[_0x1ee8d7(0x162)]===0x0)return console['log'](a5_0x156914[_0x1ee8d7(0x1c6)]('No\x20tests\x20found\x20matching:\x20'+_0x516502)),console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c9)]('Available\x20tests:\x20'+_0x2ad207[_0x1ee8d7(0x195)][_0x1ee8d7(0x17d)](_0x1a1650=>_0x1a1650[_0x1ee8d7(0x154)])['join'](',\x20'))),0x1;}if(_0x8af142){const _0x1ea559=_0x8af142[_0x1ee8d7(0x1ab)](',')[_0x1ee8d7(0x17d)](_0x50351c=>_0x50351c['trim']()[_0x1ee8d7(0x13e)]());_0x3e36b6=_0x3e36b6[_0x1ee8d7(0x1bf)](_0x48020b=>_0x48020b[_0x1ee8d7(0x160)]?.[_0x1ee8d7(0x16e)](_0x4acfa3=>_0x1ea559['includes'](_0x4acfa3[_0x1ee8d7(0x13e)]())));if(_0x3e36b6[_0x1ee8d7(0x162)]===0x0){console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c6)](_0x1ee8d7(0x1a5)+_0x8af142));const _0x531d4d=new Set();return _0x2ad207[_0x1ee8d7(0x195)][_0x1ee8d7(0x18e)](_0x1a6bd8=>_0x1a6bd8[_0x1ee8d7(0x160)]?.[_0x1ee8d7(0x18e)](_0x20dca9=>_0x531d4d['add'](_0x20dca9))),_0x531d4d[_0x1ee8d7(0x1ae)]>0x0?console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c9)](_0x1ee8d7(0x184)+[..._0x531d4d]['join'](',\x20'))):console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c9)](_0x1ee8d7(0x1c1))),0x1;}}if(_0x3360ab)return this[_0x1ee8d7(0x1a9)](_0x4c4913,{'definition':{'tests':_0x3e36b6},'agentInfo':_0x5eb5db,'outputFormat':_0x1a7aaa,'outputFile':_0x43614f,'testNames':_0x516502});if(_0x19ebee){console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1ce)](_0x1ee8d7(0x16d))),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x1be)+a5_0x156914[_0x1ee8d7(0x169)](_0x174dd3)),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x1c7)+a5_0x156914[_0x1ee8d7(0x169)](_0x5eb5db[_0x1ee8d7(0x187)])),console['log']('\x20\x20Agent:\x20'+a5_0x156914['white'](_0x5eb5db[_0x1ee8d7(0x147)])),console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x178)+a5_0x156914[_0x1ee8d7(0x169)](_0x3e36b6[_0x1ee8d7(0x162)]));for(let _0x4226fc=0x0;_0x4226fc<_0x3e36b6[_0x1ee8d7(0x162)];_0x4226fc++){const _0x1a1e42=_0x3e36b6[_0x4226fc],_0x1102d8=_0x1a1e42[_0x1ee8d7(0x1a0)]['length']===0x1?_0x1ee8d7(0x157):_0x1ee8d7(0x1a0),_0x26a7e9=_0x1a1e42[_0x1ee8d7(0x160)]?.[_0x1ee8d7(0x162)]?'\x20['+_0x1a1e42[_0x1ee8d7(0x160)]['join'](',\x20')+']':'';console[_0x1ee8d7(0x176)]('\x20\x20'+(_0x4226fc+0x1)+'.\x20'+a5_0x156914[_0x1ee8d7(0x169)](_0x1a1e42[_0x1ee8d7(0x154)])+'\x20('+_0x1a1e42['rounds'][_0x1ee8d7(0x162)]+'\x20'+_0x1102d8+')'+a5_0x156914['dim'](_0x26a7e9));}return 0x0;}let _0x2af4a9,_0xf8b550;try{_0x2af4a9=await _0x1e6396[_0x1ee8d7(0x1bb)][_0x1ee8d7(0x18f)](_0x5eb5db[_0x1ee8d7(0x187)]);}catch(_0x7fab91){const _0x5ba0df=_0x7fab91 instanceof Error?_0x7fab91[_0x1ee8d7(0x155)]:String(_0x7fab91);return _0x5ba0df['includes'](_0x1ee8d7(0x1c5))||_0x5ba0df[_0x1ee8d7(0x13e)]()['includes'](_0x1ee8d7(0x19b))?console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x17b)](_0x1ee8d7(0x150)+_0x5eb5db[_0x1ee8d7(0x187)])):console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x17b)]('✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22'+_0x5eb5db[_0x1ee8d7(0x187)]+_0x1ee8d7(0x168)+_0x5ba0df)),0x1;}try{_0xf8b550=await _0x1e6396[_0x1ee8d7(0x1bb)][_0x1ee8d7(0x15c)](_0x5eb5db[_0x1ee8d7(0x147)],_0x2af4a9);}catch(_0x319751){const _0x40ce9f=_0x319751 instanceof Error?_0x319751[_0x1ee8d7(0x155)]:String(_0x319751);return _0x40ce9f[_0x1ee8d7(0x15b)](_0x1ee8d7(0x1c5))||_0x40ce9f[_0x1ee8d7(0x13e)]()['includes'](_0x1ee8d7(0x19b))?console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x17b)](_0x1ee8d7(0x175)+_0x5eb5db[_0x1ee8d7(0x147)])):console['log'](a5_0x156914[_0x1ee8d7(0x17b)](_0x1ee8d7(0x1ba)+_0x5eb5db[_0x1ee8d7(0x147)]+_0x1ee8d7(0x168)+_0x40ce9f)),0x1;}let _0x572c09;if(!_0x486648)try{_0x572c09=await setupEvaluatorAgent(_0x1e6396['llm'],_0x3a87f5['verbose']);}catch(_0xe4675d){const _0x547243=_0xe4675d instanceof Error?_0xe4675d[_0x1ee8d7(0x155)]:String(_0xe4675d);return console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x17b)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x547243)),0x1;}console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1ce)](_0x1ee8d7(0x15e))),console['log']('Site:\x20'+a5_0x156914[_0x1ee8d7(0x169)](_0x174dd3)),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x1c8)+a5_0x156914['white'](_0x5eb5db[_0x1ee8d7(0x187)]+'/'+_0x5eb5db[_0x1ee8d7(0x147)])),console['log']();const _0x5ec3ef=[],_0x2ed3c1=[],_0x5c40dd=Date[_0x1ee8d7(0x1cd)]();for(let _0x386a84=0x0;_0x386a84<_0x3e36b6['length'];_0x386a84++){const _0x3cfca3=_0x3e36b6[_0x386a84];_0x3e36b6['length']>0x1?console[_0x1ee8d7(0x176)](_0x1ee8d7(0x196)+(_0x386a84+0x1)+'/'+_0x3e36b6['length']+':\x20'+a5_0x156914[_0x1ee8d7(0x169)](_0x3cfca3[_0x1ee8d7(0x154)])):console[_0x1ee8d7(0x176)](_0x1ee8d7(0x1a4)+a5_0x156914[_0x1ee8d7(0x169)](_0x3cfca3['name']));const _0x28a1cf=createCommandSpinner(_0x1ee8d7(0x143)+_0x3cfca3['rounds'][_0x1ee8d7(0x162)]+_0x1ee8d7(0x13d));_0x28a1cf[_0x1ee8d7(0x190)]();try{const {result:_0x595b24,conversation:_0x58e26c}=await runTest(_0x1e6396[_0x1ee8d7(0x1bb)],_0x3cfca3,{'agentId':_0xf8b550,'projectId':_0x2af4a9,'site':_0x174dd3,'noEval':_0x486648,'evaluatorId':_0x572c09,'onRoundStart':(_0x4369be,_0x18ee46)=>{const _0x49f3c3=_0x1ee8d7;_0x28a1cf['text']=_0x49f3c3(0x13c)+(_0x4369be+0x1)+'/'+_0x18ee46+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x2a758c,_0x4e4284,_0x2a2dae)=>{const _0x2b396d=_0x1ee8d7,_0x4288fb=formatElapsed(_0x4e4284);_0x2a2dae?console[_0x2b396d(0x176)](_0x2b396d(0x17e)+(_0x2a758c+0x1)+'/'+_0x3cfca3[_0x2b396d(0x1a0)][_0x2b396d(0x162)]+'...\x20'+a5_0x156914[_0x2b396d(0x142)]('✓')+'\x20('+_0x4288fb+')'):console[_0x2b396d(0x176)](_0x2b396d(0x17e)+(_0x2a758c+0x1)+'/'+_0x3cfca3[_0x2b396d(0x1a0)][_0x2b396d(0x162)]+'...\x20'+a5_0x156914[_0x2b396d(0x17b)]('✗'));},'onEvaluationStart':()=>{const _0x132dd4=_0x1ee8d7;_0x28a1cf['text']=_0x132dd4(0x193);},'onEvaluationComplete':_0x162c38=>{const _0x50b8c1=_0x1ee8d7,_0x1fc824=formatElapsed(_0x162c38);console['log']('\x20\x20Evaluating...\x20'+a5_0x156914[_0x50b8c1(0x142)]('✓')+'\x20('+_0x1fc824+')');}});_0x28a1cf['stop'](),_0x5ec3ef[_0x1ee8d7(0x1ad)](_0x595b24),_0x2ed3c1[_0x1ee8d7(0x1ad)](_0x58e26c);if(_0x595b24[_0x1ee8d7(0x1d1)]===_0x1ee8d7(0x1b2))console[_0x1ee8d7(0x176)](a5_0x156914['green'](_0x1ee8d7(0x1c3)+_0x595b24['reason']));else _0x595b24[_0x1ee8d7(0x1d1)]===_0x1ee8d7(0x189)?console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x17b)](_0x1ee8d7(0x1ca)+_0x595b24['reason'])):console['log'](a5_0x156914[_0x1ee8d7(0x17b)]('✗\x20ERROR:\x20'+_0x595b24[_0x1ee8d7(0x198)]));_0x595b24[_0x1ee8d7(0x172)]&&console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x1c9)](_0x1ee8d7(0x156)+_0x595b24[_0x1ee8d7(0x172)])),console[_0x1ee8d7(0x176)]();}catch(_0x28ffff){_0x28a1cf[_0x1ee8d7(0x1b6)]();const _0x2df2f3=_0x28ffff instanceof Error?_0x28ffff[_0x1ee8d7(0x155)]:String(_0x28ffff);console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x17b)](_0x1ee8d7(0x1aa)+_0x2df2f3)),console[_0x1ee8d7(0x176)](),_0x5ec3ef[_0x1ee8d7(0x1ad)]({'name':_0x3cfca3[_0x1ee8d7(0x154)],'status':_0x1ee8d7(0x186),'reason':_0x2df2f3,'timestamp':new Date()[_0x1ee8d7(0x152)](),'duration_ms':0x0});}}const _0xd6b5dc=Date['now']()-_0x5c40dd,_0x369625=_0x5ec3ef[_0x1ee8d7(0x1bf)](_0x29c268=>_0x29c268[_0x1ee8d7(0x1d1)]==='PASS')[_0x1ee8d7(0x162)],_0x4756f7=_0x5ec3ef[_0x1ee8d7(0x1bf)](_0x5a17c0=>_0x5a17c0[_0x1ee8d7(0x1d1)]===_0x1ee8d7(0x189))['length'],_0x2e9c2e=_0x5ec3ef[_0x1ee8d7(0x1bf)](_0x2a8b57=>_0x2a8b57[_0x1ee8d7(0x1d1)]===_0x1ee8d7(0x186))[_0x1ee8d7(0x162)];console[_0x1ee8d7(0x176)]('━'[_0x1ee8d7(0x1a1)](0x3c)),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x16b)),console[_0x1ee8d7(0x176)]('━'['repeat'](0x3c)),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x14b)+_0x5ec3ef[_0x1ee8d7(0x162)]),console['log'](_0x1ee8d7(0x1bc)+a5_0x156914[_0x1ee8d7(0x142)](_0x369625)),console[_0x1ee8d7(0x176)](_0x1ee8d7(0x19e)+a5_0x156914[_0x1ee8d7(0x17b)](_0x4756f7));_0x2e9c2e>0x0&&console['log'](_0x1ee8d7(0x144)+a5_0x156914['red'](_0x2e9c2e));console[_0x1ee8d7(0x176)](_0x1ee8d7(0x15d)+formatElapsed(_0xd6b5dc)),console[_0x1ee8d7(0x176)]('━'[_0x1ee8d7(0x1a1)](0x3c));const _0x281574=_0x5ec3ef[_0x1ee8d7(0x1bf)](_0x3b419a=>_0x3b419a[_0x1ee8d7(0x1d1)]!==_0x1ee8d7(0x1b2));if(_0x281574[_0x1ee8d7(0x162)]>0x0){console[_0x1ee8d7(0x176)](),console['log']('Failed\x20Tests:');for(const _0x13857c of _0x281574){const _0x10ba69=a5_0x156914['red']('✗'),_0x27cd77=_0x13857c[_0x1ee8d7(0x198)][_0x1ee8d7(0x162)]>0x32?_0x13857c['reason']['substring'](0x0,0x32)+_0x1ee8d7(0x16a):_0x13857c['reason'];console['log']('\x20\x20'+_0x10ba69+'\x20'+_0x13857c[_0x1ee8d7(0x154)]+':\x20'+_0x27cd77);}}const _0x24d349={'summary':{'total':_0x5ec3ef[_0x1ee8d7(0x162)],'passed':_0x369625,'failed':_0x4756f7,'errors':_0x2e9c2e>0x0?_0x2e9c2e:undefined,'duration_ms':_0xd6b5dc},'tests':_0x5ec3ef,'agent':{'project':_0x5eb5db['projectName'],'name':_0x5eb5db['agentName'],'site':_0x174dd3},'timestamp':new Date(_0x5c40dd)[_0x1ee8d7(0x152)]()};try{const _0x384967=buildCachedTestRun(_0x2ed3c1,{'site':_0x174dd3,'projectId':_0x2af4a9,'projectName':_0x5eb5db[_0x1ee8d7(0x187)],'agentId':_0xf8b550,'agentName':_0x5eb5db[_0x1ee8d7(0x147)],'testYmlPath':a5_0x444c23[_0x1ee8d7(0x153)](_0x5eb5db['testYmlPath'])});saveLastTestRun(_0x384967);}catch{}if(_0x1a7aaa!==_0x1ee8d7(0x1b3)||_0x43614f){const _0x4c7cc8=formatResults(_0x24d349,_0x1a7aaa);if(_0x43614f)try{a5_0x362934['writeFileSync'](_0x43614f,_0x4c7cc8,_0x1ee8d7(0x192)),console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)](a5_0x156914['dim'](_0x1ee8d7(0x17a)+_0x43614f));}catch(_0x46938b){return console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)](a5_0x156914[_0x1ee8d7(0x17b)](_0x1ee8d7(0x166)+_0x46938b)),0x1;}else console[_0x1ee8d7(0x176)](),console[_0x1ee8d7(0x176)](_0x4c7cc8);}return _0x281574[_0x1ee8d7(0x162)]>0x0?0x1:0x0;}async[a5_0x5c6f56(0x1a9)](_0x324d21,_0x86412d){const _0x1469b4=a5_0x5c6f56,{options:_0x34844a,tdx:_0x2433cb}=_0x324d21,{definition:_0x29f553,agentInfo:_0x20f334,outputFormat:_0x542bf3,outputFile:_0x5ea39a}=_0x86412d,_0xdf4ef9=_0x34844a[_0x1469b4(0x16c)],_0xd8d9c6=loadLastTestRun();if(!_0xd8d9c6)return console[_0x1469b4(0x176)](a5_0x156914['red'](_0x1469b4(0x1a8))),console[_0x1469b4(0x176)](a5_0x156914[_0x1469b4(0x1c9)](_0x1469b4(0x17c))),0x1;if(_0xd8d9c6['agent'][_0x1469b4(0x147)]!==_0x20f334[_0x1469b4(0x147)])return console['log'](a5_0x156914[_0x1469b4(0x17b)](_0x1469b4(0x1a6)+_0xd8d9c6[_0x1469b4(0x1cb)][_0x1469b4(0x147)]+_0x1469b4(0x1b4)+_0x20f334[_0x1469b4(0x147)]+'\x22.')),console[_0x1469b4(0x176)](a5_0x156914['dim'](_0x1469b4(0x171))),0x1;const _0x30609f=new Set(_0xd8d9c6[_0x1469b4(0x141)]['map'](_0x1de62d=>_0x1de62d[_0x1469b4(0x182)])),_0x1a3bd9=_0x29f553[_0x1469b4(0x195)][_0x1469b4(0x1bf)](_0x4f9898=>!_0x30609f[_0x1469b4(0x167)](_0x4f9898[_0x1469b4(0x154)]));if(_0x1a3bd9[_0x1469b4(0x162)]>0x0&&_0xd8d9c6[_0x1469b4(0x16c)]!==_0xdf4ef9)return console['log'](a5_0x156914['red'](_0x1469b4(0x14a))),console['log'](a5_0x156914[_0x1469b4(0x1c9)]('Cached\x20run\x20is\x20from\x20site\x20\x22'+_0xd8d9c6['site']+'\x22,\x20but\x20current\x20site\x20is\x20\x22'+_0xdf4ef9+'\x22.')),console[_0x1469b4(0x176)](a5_0x156914['dim']('Either\x20switch\x20to\x20the\x20\x22'+_0xd8d9c6['site']+_0x1469b4(0x1b5))),0x1;const _0x5b6ffd=_0x29f553['tests']['filter'](_0x192077=>_0x30609f[_0x1469b4(0x167)](_0x192077[_0x1469b4(0x154)])),_0x228c38=_0x1a3bd9;let _0x10e25a;try{_0x10e25a=await setupEvaluatorAgent(_0x2433cb[_0x1469b4(0x1bb)],_0x34844a['verbose']);}catch(_0x4050c9){const _0x5949ce=_0x4050c9 instanceof Error?_0x4050c9['message']:String(_0x4050c9);return console[_0x1469b4(0x176)](a5_0x156914[_0x1469b4(0x17b)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x5949ce)),0x1;}console['log'](a5_0x156914['cyan'](_0x1469b4(0x1af))),console['log'](_0x1469b4(0x15f)+a5_0x156914[_0x1469b4(0x169)](_0xd8d9c6[_0x1469b4(0x148)])),console[_0x1469b4(0x176)](_0x1469b4(0x1c8)+a5_0x156914[_0x1469b4(0x169)](_0xd8d9c6['agent']['projectName']+'/'+_0xd8d9c6['agent'][_0x1469b4(0x147)]));_0x228c38['length']>0x0&&console[_0x1469b4(0x176)]('New\x20tests\x20to\x20execute:\x20'+a5_0x156914[_0x1469b4(0x1c6)](_0x228c38['length']));console['log']();const _0x13687e=[],_0x3b27e5=Date[_0x1469b4(0x1cd)](),_0x39fdf5=createCommandSpinner(_0x1469b4(0x18d));if(_0x5b6ffd[_0x1469b4(0x162)]>0x0)try{const _0x335c37=await reevaluateFromCache(_0x2433cb[_0x1469b4(0x1bb)],_0xd8d9c6,{'tests':_0x5b6ffd},{'evaluatorId':_0x10e25a,'onTestStart':(_0x2e4015,_0x5bd6bc,_0x211189)=>{const _0x534917=_0x1469b4;_0x39fdf5['text']='Re-evaluating\x20'+(_0x5bd6bc+0x1)+'/'+_0x211189+':\x20'+_0x2e4015+_0x534917(0x16a);if(!_0x39fdf5[_0x534917(0x1b7)])_0x39fdf5['start']();},'onTestComplete':(_0x176cd1,_0x477f6f)=>{const _0x1b0c2d=_0x1469b4;_0x39fdf5[_0x1b0c2d(0x1b6)]();if(_0x477f6f[_0x1b0c2d(0x1d1)]===_0x1b0c2d(0x1b2))console[_0x1b0c2d(0x176)](a5_0x156914[_0x1b0c2d(0x142)]('✓\x20PASS:\x20'+_0x176cd1)+a5_0x156914[_0x1b0c2d(0x1c9)](_0x1b0c2d(0x191)));else _0x477f6f[_0x1b0c2d(0x1d1)]===_0x1b0c2d(0x189)?console[_0x1b0c2d(0x176)](a5_0x156914[_0x1b0c2d(0x17b)](_0x1b0c2d(0x1ca)+_0x176cd1+_0x1b0c2d(0x14c)+_0x477f6f[_0x1b0c2d(0x198)])+a5_0x156914[_0x1b0c2d(0x1c9)](_0x1b0c2d(0x191))):console[_0x1b0c2d(0x176)](a5_0x156914[_0x1b0c2d(0x17b)](_0x1b0c2d(0x1aa)+_0x176cd1+_0x1b0c2d(0x14c)+_0x477f6f['reason']));_0x477f6f[_0x1b0c2d(0x172)]&&console['log'](a5_0x156914['dim'](_0x1b0c2d(0x14f)+_0x477f6f[_0x1b0c2d(0x172)])),_0x13687e[_0x1b0c2d(0x1ad)](_0x477f6f);},'onTestSkipped':(_0x2f7b19,_0x10e678)=>{const _0x213c00=_0x1469b4;_0x39fdf5[_0x213c00(0x1b6)](),console[_0x213c00(0x176)](a5_0x156914[_0x213c00(0x1c6)](_0x213c00(0x1c2)+_0x2f7b19+_0x213c00(0x14c)+_0x10e678));}});for(const _0x493b75 of _0x335c37){!_0x13687e[_0x1469b4(0x19a)](_0xa9c713=>_0xa9c713[_0x1469b4(0x154)]===_0x493b75['name'])&&_0x13687e[_0x1469b4(0x1ad)](_0x493b75);}}catch(_0x119d49){_0x39fdf5[_0x1469b4(0x1b6)]();const _0x52e56a=_0x119d49 instanceof Error?_0x119d49[_0x1469b4(0x155)]:String(_0x119d49);return console[_0x1469b4(0x176)](a5_0x156914['red']('✗\x20ERROR:\x20Re-evaluation\x20failed:\x20'+_0x52e56a)),0x1;}_0x39fdf5[_0x1469b4(0x1b6)]();if(_0x228c38[_0x1469b4(0x162)]>0x0){console[_0x1469b4(0x176)](),console['log'](a5_0x156914[_0x1469b4(0x1ce)](_0x1469b4(0x18a)));const {projectId:_0xe0fffe,agentId:_0x527876}=_0xd8d9c6[_0x1469b4(0x1cb)];for(const _0x257d6b of _0x228c38){console['log'](_0x1469b4(0x19c)+a5_0x156914[_0x1469b4(0x169)](_0x257d6b['name']));const _0x42a0e2=createCommandSpinner(_0x1469b4(0x143)+_0x257d6b['rounds'][_0x1469b4(0x162)]+_0x1469b4(0x13d));_0x42a0e2['start']();try{const {result:_0x4f2998}=await runTest(_0x2433cb['llm'],_0x257d6b,{'agentId':_0x527876,'projectId':_0xe0fffe,'site':_0xd8d9c6[_0x1469b4(0x16c)],'noEval':![],'evaluatorId':_0x10e25a,'onRoundStart':(_0x28157a,_0x89edf9)=>{const _0x1efce2=_0x1469b4;_0x42a0e2[_0x1efce2(0x1ac)]=_0x1efce2(0x13c)+(_0x28157a+0x1)+'/'+_0x89edf9+_0x1efce2(0x13d);},'onRoundComplete':(_0x2bae53,_0x5c6509,_0x41c5f3)=>{const _0x5bcb3c=_0x1469b4,_0x4b2ab5=formatElapsed(_0x5c6509);_0x41c5f3?console['log'](_0x5bcb3c(0x17e)+(_0x2bae53+0x1)+'/'+_0x257d6b[_0x5bcb3c(0x1a0)][_0x5bcb3c(0x162)]+_0x5bcb3c(0x15a)+a5_0x156914[_0x5bcb3c(0x142)]('✓')+'\x20('+_0x4b2ab5+')'):console[_0x5bcb3c(0x176)](_0x5bcb3c(0x17e)+(_0x2bae53+0x1)+'/'+_0x257d6b[_0x5bcb3c(0x1a0)][_0x5bcb3c(0x162)]+'...\x20'+a5_0x156914[_0x5bcb3c(0x17b)]('✗'));},'onEvaluationStart':()=>{_0x42a0e2['text']='Evaluating\x20response...';},'onEvaluationComplete':_0x284c1e=>{const _0x4d51a0=_0x1469b4,_0x4d1679=formatElapsed(_0x284c1e);console[_0x4d51a0(0x176)](_0x4d51a0(0x14d)+a5_0x156914[_0x4d51a0(0x142)]('✓')+'\x20('+_0x4d1679+')');}});_0x42a0e2[_0x1469b4(0x1b6)](),_0x13687e[_0x1469b4(0x1ad)](_0x4f2998);if(_0x4f2998['status']===_0x1469b4(0x1b2))console[_0x1469b4(0x176)](a5_0x156914[_0x1469b4(0x142)](_0x1469b4(0x1c3)+_0x4f2998[_0x1469b4(0x198)])+a5_0x156914[_0x1469b4(0x1c9)](_0x1469b4(0x18b)));else _0x4f2998[_0x1469b4(0x1d1)]===_0x1469b4(0x189)?console['log'](a5_0x156914[_0x1469b4(0x17b)](_0x1469b4(0x1ca)+_0x4f2998[_0x1469b4(0x198)])+a5_0x156914[_0x1469b4(0x1c9)]('\x20(new)')):console[_0x1469b4(0x176)](a5_0x156914[_0x1469b4(0x17b)](_0x1469b4(0x1aa)+_0x4f2998['reason']));_0x4f2998[_0x1469b4(0x172)]&&console['log'](a5_0x156914['dim'](_0x1469b4(0x14f)+_0x4f2998[_0x1469b4(0x172)]));}catch(_0x131be3){_0x42a0e2['stop']();const _0x2d8478=_0x131be3 instanceof Error?_0x131be3[_0x1469b4(0x155)]:String(_0x131be3);console[_0x1469b4(0x176)](a5_0x156914[_0x1469b4(0x17b)](_0x1469b4(0x1aa)+_0x2d8478)),_0x13687e[_0x1469b4(0x1ad)]({'name':_0x257d6b[_0x1469b4(0x154)],'status':_0x1469b4(0x186),'reason':_0x2d8478,'timestamp':new Date()[_0x1469b4(0x152)](),'duration_ms':0x0});}}}console[_0x1469b4(0x176)]();const _0x245cd5=Date[_0x1469b4(0x1cd)]()-_0x3b27e5,_0x1ea1e5=_0x13687e[_0x1469b4(0x1bf)](_0xf1cd71=>_0xf1cd71['status']===_0x1469b4(0x1b2))['length'],_0x49017f=_0x13687e['filter'](_0x33a189=>_0x33a189['status']==='FAIL')[_0x1469b4(0x162)],_0x1dfe78=_0x13687e[_0x1469b4(0x1bf)](_0x219dd8=>_0x219dd8[_0x1469b4(0x1d1)]===_0x1469b4(0x186))[_0x1469b4(0x162)];console['log']('━'[_0x1469b4(0x1a1)](0x3c)),console[_0x1469b4(0x176)](_0x1469b4(0x179)),console[_0x1469b4(0x176)]('━'['repeat'](0x3c)),console[_0x1469b4(0x176)](_0x1469b4(0x14b)+_0x13687e[_0x1469b4(0x162)]),console[_0x1469b4(0x176)](_0x1469b4(0x1bc)+a5_0x156914['green'](_0x1ea1e5)),console[_0x1469b4(0x176)](_0x1469b4(0x19e)+a5_0x156914['red'](_0x49017f));_0x1dfe78>0x0&&console[_0x1469b4(0x176)]('Errors:\x20\x20\x20'+a5_0x156914[_0x1469b4(0x17b)](_0x1dfe78));console[_0x1469b4(0x176)](_0x1469b4(0x15d)+formatElapsed(_0x245cd5)),console[_0x1469b4(0x176)]('━'[_0x1469b4(0x1a1)](0x3c));const _0x361f8f={'summary':{'total':_0x13687e['length'],'passed':_0x1ea1e5,'failed':_0x49017f,'errors':_0x1dfe78>0x0?_0x1dfe78:undefined,'duration_ms':_0x245cd5},'tests':_0x13687e,'agent':{'project':_0x20f334[_0x1469b4(0x187)],'name':_0x20f334[_0x1469b4(0x147)],'site':_0xdf4ef9},'timestamp':new Date(_0x3b27e5)[_0x1469b4(0x152)]()};if(_0x542bf3!=='table'||_0x5ea39a){const _0x113449=formatResults(_0x361f8f,_0x542bf3);if(_0x5ea39a)try{a5_0x362934[_0x1469b4(0x16f)](_0x5ea39a,_0x113449,_0x1469b4(0x192)),console[_0x1469b4(0x176)](),console[_0x1469b4(0x176)](a5_0x156914[_0x1469b4(0x1c9)](_0x1469b4(0x17a)+_0x5ea39a));}catch(_0x50def4){return console[_0x1469b4(0x176)](),console[_0x1469b4(0x176)](a5_0x156914[_0x1469b4(0x17b)](_0x1469b4(0x166)+_0x50def4)),0x1;}else console['log'](),console[_0x1469b4(0x176)](_0x113449);}const _0x3e6743=_0x13687e[_0x1469b4(0x1bf)](_0x12b761=>_0x12b761[_0x1469b4(0x1d1)]!==_0x1469b4(0x1b2));return _0x3e6743[_0x1469b4(0x162)]>0x0?0x1:0x0;}}
|
|
1
|
+
const a5_0x2953bf=a5_0x3dd2;(function(_0x17ea45,_0x2ebb2b){const _0xf3d512=a5_0x3dd2,_0x1d200d=_0x17ea45();while(!![]){try{const _0xee40ad=parseInt(_0xf3d512(0x218))/0x1*(-parseInt(_0xf3d512(0x225))/0x2)+-parseInt(_0xf3d512(0x231))/0x3*(parseInt(_0xf3d512(0x1d7))/0x4)+-parseInt(_0xf3d512(0x1f4))/0x5*(-parseInt(_0xf3d512(0x1cf))/0x6)+parseInt(_0xf3d512(0x237))/0x7+parseInt(_0xf3d512(0x1d5))/0x8+-parseInt(_0xf3d512(0x1f2))/0x9+-parseInt(_0xf3d512(0x22c))/0xa*(parseInt(_0xf3d512(0x23a))/0xb);if(_0xee40ad===_0x2ebb2b)break;else _0x1d200d['push'](_0x1d200d['shift']());}catch(_0x1c02ba){_0x1d200d['push'](_0x1d200d['shift']());}}}(a5_0x57df,0x81e00));import*as a5_0x47fc09 from'node:fs';import*as a5_0x46291d from'node:path';function a5_0x57df(){const _0x1d8ae4=['status','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','name','resolve','context','basename','red','includes','✓\x20PASS:\x20','...\x20','conversation_url','llmProject','json','table','testYmlPath','Cached\x20run\x20from:\x20','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','\x20(cached)','Error\x20writing\x20output\x20file:\x20','\x20\x20Evaluating...\x20','Passed:\x20\x20\x20','✗\x20ERROR:\x20Project\x20not\x20found:\x20','Project\x20path:\x20','\x20-\x20','...','ERROR','resolveAgentId','existsSync','filter','cyan','FAIL','\x22:\x20','found','no_context','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','now','message','177534GrBeAK','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','tsv','conversations','\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)','✗\x20ERROR:\x20','5595832jDREsK','eval','68HBuCdG','Conversation\x20URL:\x20','toLowerCase','length','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','dim','execute','stop','no_tests','testName','Running\x20test:\x20','404','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','agentName','has','Evaluating\x20response...','Re-evaluating...','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','llm','repeat','\x20\x20Agent:\x20',':\x20Sending\x20user\x20input...','/<agent-name>','size','tags','\x20\x20Round\x20','PASS','6090822WtAqZL','text','150zLkTFb','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','Test\x20','Run\x20tests\x20for\x20an\x20LLM\x20agent','projectDir','✗\x20FAIL:\x20','Tests\x20found:\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','\x20(new)','reeval','Test\x20Configuration:','agent:test','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','rounds','agent','timestamp','round','Run\x20\x27tdx\x20agent\x20pull\x20','test.yml','Round\x20','writeFileSync','Cached\x20run\x20is\x20from\x20site\x20\x22','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','jsonl','Re-evaluation\x20Summary','Executing\x20new\x20tests...','\x20\x20Project:\x20','start','Running:\x20','output','Agent:\x20','push','\x20\x20Conversation:\x20','tests','\x20\x20Site:\x20','Site:\x20','1862xlPURU','forEach','Either\x20switch\x20to\x20the\x20\x22','map','Failed\x20Tests:','toISOString','Errors:\x20\x20\x20','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','Output\x20written\x20to:\x20','white','log','Running\x20agent\x20tests...','split','54tdfKkt','not\x20found','join','Duration:\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','\x22,\x20but\x20current\x20site\x20is\x20\x22','verbose','3747510vokTGQ','No\x20tests\x20found\x20matching:\x20','New\x20tests\x20to\x20execute:\x20','⚠\x20SKIPPED:\x20','No\x20tests\x20have\x20tags\x20defined.','15612SefljF','yellow','Failed:\x20\x20\x20','add','\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','Round\x201/','945490EFilsp','site','utf-8','11wTCtPC','green','Re-evaluating\x20','Total:\x20\x20\x20\x20','executeReeval','projectName','Using\x20agent:\x20','reason'];a5_0x57df=function(){return _0x1d8ae4;};return a5_0x57df();}import a5_0xf9e0d5 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';function a5_0x3dd2(_0x2851e7,_0x23b723){_0x2851e7=_0x2851e7-0x1c3;const _0x57df41=a5_0x57df();let _0x3dd2cf=_0x57df41[_0x2851e7];return _0x3dd2cf;}export class AgentTestCommand extends BaseCommand{['name']=a5_0x2953bf(0x1ff);['description']=a5_0x2953bf(0x1f7);async[a5_0x2953bf(0x1dd)](_0x977772){const _0x3a62b0=a5_0x2953bf,{options:_0x1829ce,args:_0x1957ab,tdx:_0x2aa328}=_0x977772,_0x23d909=_0x1957ab[0x0]||'.',_0x3505ed=_0x1829ce['dryRun'],_0x13a50a=_0x1829ce,_0x95155a=_0x13a50a[_0x3a62b0(0x1d6)]===![],_0x191aa9=_0x13a50a[_0x3a62b0(0x1fd)],_0x2db77b=_0x13a50a[_0x3a62b0(0x244)],_0x1f95ca=_0x13a50a[_0x3a62b0(0x1ef)],_0xd8d34c=_0x1829ce[_0x3a62b0(0x238)],_0x444805=_0x13a50a[_0x3a62b0(0x211)];if(_0x191aa9&&_0x95155a)return console['log'](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x1e8))),0x1;let _0x11df7d=_0x3a62b0(0x24f);if(_0x13a50a[_0x3a62b0(0x24e)])_0x11df7d=_0x3a62b0(0x24e);else{if(_0x13a50a['jsonl'])_0x11df7d=_0x3a62b0(0x20b);else{if(_0x13a50a[_0x3a62b0(0x1d1)])_0x11df7d=_0x3a62b0(0x1d1);else{if(_0x13a50a[_0x3a62b0(0x24f)])_0x11df7d=_0x3a62b0(0x24f);}}}const _0x76cbfd=_0x13a50a[_0x3a62b0(0x24d)];let _0x3dba63=_0x23d909;const _0x2ec65a=a5_0x47fc09[_0x3a62b0(0x1c5)](_0x23d909),_0x1305b8=_0x23d909==='.';if(!_0x2ec65a||_0x1305b8){const _0x4620fb=resolveProjectFromContext(_0x23d909,_0x76cbfd,{'requireFile':_0x3a62b0(0x206)});if(_0x4620fb[_0x3a62b0(0x1ca)])_0x3dba63=_0x4620fb[_0x3a62b0(0x1f8)],_0x4620fb['source']===_0x3a62b0(0x246)&&console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x1dc)](_0x3a62b0(0x240)+_0x3dba63));else switch(_0x4620fb['reason']){case _0x3a62b0(0x1cb):console[_0x3a62b0(0x222)](a5_0xf9e0d5['yellow'](_0x4620fb['message'])),console['log'](),console[_0x3a62b0(0x222)]('Usage:'),console['log'](_0x3a62b0(0x235)),console[_0x3a62b0(0x222)](_0x3a62b0(0x1d3)),console[_0x3a62b0(0x222)](),console[_0x3a62b0(0x222)](_0x3a62b0(0x243));return 0x1;case'no_local_folder':console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x232)](_0x4620fb[_0x3a62b0(0x1ce)])),console[_0x3a62b0(0x222)](),console[_0x3a62b0(0x222)](_0x3a62b0(0x205)+_0x4620fb[_0x3a62b0(0x24d)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');return 0x1;case'multiple_agents':{const _0x44e159=a5_0x46291d[_0x3a62b0(0x247)](_0x4620fb['projectDir']);console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x232)](_0x3a62b0(0x1f5)+_0x4620fb[_0x3a62b0(0x24d)]+'\x22:'));for(const _0x274c1b of _0x4620fb['agentDirs']){console[_0x3a62b0(0x222)]('\x20\x20-\x20'+_0x274c1b);}return console[_0x3a62b0(0x222)](),console[_0x3a62b0(0x222)](_0x3a62b0(0x21f)+_0x44e159+_0x3a62b0(0x1ed)),0x1;}case _0x3a62b0(0x1df):console['log'](a5_0xf9e0d5[_0x3a62b0(0x232)](_0x3a62b0(0x20a)+_0x4620fb[_0x3a62b0(0x24d)]+'\x22.')),console[_0x3a62b0(0x222)](a5_0xf9e0d5['dim'](_0x3a62b0(0x259)+_0x4620fb[_0x3a62b0(0x1f8)])),console[_0x3a62b0(0x222)](),console[_0x3a62b0(0x222)]('Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.');return 0x1;}}const {definition:_0x5eb08c,agentInfo:_0x904a01}=parseTestFile(_0x3dba63);let _0x55f6cd=_0x5eb08c[_0x3a62b0(0x215)];if(_0x2db77b){const _0x1aaf96=_0x2db77b[_0x3a62b0(0x224)](',')[_0x3a62b0(0x21b)](_0x5198fd=>_0x5198fd['trim']());_0x55f6cd=_0x5eb08c[_0x3a62b0(0x215)]['filter'](_0x21cf61=>_0x1aaf96['includes'](_0x21cf61[_0x3a62b0(0x244)]));if(_0x55f6cd['length']===0x0)return console[_0x3a62b0(0x222)](a5_0xf9e0d5['yellow'](_0x3a62b0(0x22d)+_0x2db77b)),console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x1dc)]('Available\x20tests:\x20'+_0x5eb08c['tests']['map'](_0x25cc60=>_0x25cc60['name'])[_0x3a62b0(0x227)](',\x20'))),0x1;}if(_0x1f95ca){const _0x59e41f=_0x1f95ca['split'](',')['map'](_0x4c044a=>_0x4c044a['trim']()[_0x3a62b0(0x1d9)]());_0x55f6cd=_0x55f6cd[_0x3a62b0(0x1c6)](_0x48847b=>_0x48847b[_0x3a62b0(0x1ef)]?.['some'](_0x5a7266=>_0x59e41f['includes'](_0x5a7266[_0x3a62b0(0x1d9)]())));if(_0x55f6cd[_0x3a62b0(0x1da)]===0x0){console['log'](a5_0xf9e0d5['yellow']('No\x20tests\x20found\x20with\x20tags:\x20'+_0x1f95ca));const _0x45a8b5=new Set();return _0x5eb08c[_0x3a62b0(0x215)][_0x3a62b0(0x219)](_0x596df8=>_0x596df8[_0x3a62b0(0x1ef)]?.['forEach'](_0x21f47e=>_0x45a8b5[_0x3a62b0(0x234)](_0x21f47e))),_0x45a8b5[_0x3a62b0(0x1ee)]>0x0?console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x1dc)]('Available\x20tags:\x20'+[..._0x45a8b5][_0x3a62b0(0x227)](',\x20'))):console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x1dc)](_0x3a62b0(0x230))),0x1;}}if(_0x191aa9)return this['executeReeval'](_0x977772,{'definition':{'tests':_0x55f6cd},'agentInfo':_0x904a01,'outputFormat':_0x11df7d,'outputFile':_0x444805,'testNames':_0x2db77b});if(_0x3505ed){console[_0x3a62b0(0x222)](a5_0xf9e0d5['cyan'](_0x3a62b0(0x1fe))),console[_0x3a62b0(0x222)](_0x3a62b0(0x216)+a5_0xf9e0d5[_0x3a62b0(0x221)](_0xd8d34c)),console[_0x3a62b0(0x222)](_0x3a62b0(0x20e)+a5_0xf9e0d5[_0x3a62b0(0x221)](_0x904a01[_0x3a62b0(0x23f)])),console[_0x3a62b0(0x222)](_0x3a62b0(0x1eb)+a5_0xf9e0d5[_0x3a62b0(0x221)](_0x904a01[_0x3a62b0(0x1e4)])),console[_0x3a62b0(0x222)](),console['log'](_0x3a62b0(0x1fa)+a5_0xf9e0d5[_0x3a62b0(0x221)](_0x55f6cd[_0x3a62b0(0x1da)]));for(let _0x3ec889=0x0;_0x3ec889<_0x55f6cd[_0x3a62b0(0x1da)];_0x3ec889++){const _0x57f31c=_0x55f6cd[_0x3ec889],_0x33dc25=_0x57f31c[_0x3a62b0(0x201)]['length']===0x1?_0x3a62b0(0x204):_0x3a62b0(0x201),_0x43a152=_0x57f31c[_0x3a62b0(0x1ef)]?.[_0x3a62b0(0x1da)]?'\x20['+_0x57f31c[_0x3a62b0(0x1ef)]['join'](',\x20')+']':'';console['log']('\x20\x20'+(_0x3ec889+0x1)+'.\x20'+a5_0xf9e0d5['white'](_0x57f31c[_0x3a62b0(0x244)])+'\x20('+_0x57f31c[_0x3a62b0(0x201)]['length']+'\x20'+_0x33dc25+')'+a5_0xf9e0d5[_0x3a62b0(0x1dc)](_0x43a152));}return 0x0;}let _0x25aaec,_0x4bbdbc;try{_0x25aaec=await _0x2aa328[_0x3a62b0(0x1e9)]['resolveProjectId'](_0x904a01['projectName']);}catch(_0x2a4d26){const _0x493980=_0x2a4d26 instanceof Error?_0x2a4d26[_0x3a62b0(0x1ce)]:String(_0x2a4d26);return _0x493980[_0x3a62b0(0x249)](_0x3a62b0(0x1e2))||_0x493980[_0x3a62b0(0x1d9)]()['includes'](_0x3a62b0(0x226))?console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x258)+_0x904a01[_0x3a62b0(0x23f)])):console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x229)+_0x904a01['projectName']+'\x22:\x20'+_0x493980)),0x1;}try{_0x4bbdbc=await _0x2aa328[_0x3a62b0(0x1e9)][_0x3a62b0(0x1c4)](_0x904a01[_0x3a62b0(0x1e4)],_0x25aaec);}catch(_0x48f78b){const _0x132092=_0x48f78b instanceof Error?_0x48f78b[_0x3a62b0(0x1ce)]:String(_0x48f78b);return _0x132092[_0x3a62b0(0x249)](_0x3a62b0(0x1e2))||_0x132092[_0x3a62b0(0x1d9)]()[_0x3a62b0(0x249)](_0x3a62b0(0x226))?console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x1cc)+_0x904a01[_0x3a62b0(0x1e4)])):console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x253)+_0x904a01[_0x3a62b0(0x1e4)]+_0x3a62b0(0x1c9)+_0x132092)),0x1;}let _0x586340;if(!_0x95155a)try{_0x586340=await setupEvaluatorAgent(_0x2aa328[_0x3a62b0(0x1e9)],_0x1829ce[_0x3a62b0(0x22b)]);}catch(_0x425556){const _0x1111e9=_0x425556 instanceof Error?_0x425556[_0x3a62b0(0x1ce)]:String(_0x425556);return console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x252)+_0x1111e9)),0x1;}console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x1c7)](_0x3a62b0(0x223))),console[_0x3a62b0(0x222)](_0x3a62b0(0x217)+a5_0xf9e0d5[_0x3a62b0(0x221)](_0xd8d34c)),console[_0x3a62b0(0x222)]('Agent:\x20'+a5_0xf9e0d5[_0x3a62b0(0x221)](_0x904a01[_0x3a62b0(0x23f)]+'/'+_0x904a01['agentName'])),console[_0x3a62b0(0x222)]();const _0x20072f=[],_0x4fb6fd=[],_0x3b633a=Date['now']();for(let _0x508e3b=0x0;_0x508e3b<_0x55f6cd[_0x3a62b0(0x1da)];_0x508e3b++){const _0x3abd0b=_0x55f6cd[_0x508e3b];_0x55f6cd['length']>0x1?console[_0x3a62b0(0x222)](_0x3a62b0(0x1f6)+(_0x508e3b+0x1)+'/'+_0x55f6cd[_0x3a62b0(0x1da)]+':\x20'+a5_0xf9e0d5[_0x3a62b0(0x221)](_0x3abd0b[_0x3a62b0(0x244)])):console[_0x3a62b0(0x222)](_0x3a62b0(0x1e1)+a5_0xf9e0d5[_0x3a62b0(0x221)](_0x3abd0b['name']));const _0x5854d3=createCommandSpinner(_0x3a62b0(0x236)+_0x3abd0b['rounds'][_0x3a62b0(0x1da)]+_0x3a62b0(0x1ec));_0x5854d3[_0x3a62b0(0x20f)]();try{const {result:_0x1ca414,conversation:_0x4552cd}=await runTest(_0x2aa328['llm'],_0x3abd0b,{'agentId':_0x4bbdbc,'projectId':_0x25aaec,'site':_0xd8d34c,'noEval':_0x95155a,'evaluatorId':_0x586340,'onRoundStart':(_0x37cf29,_0x1cee49)=>{const _0x33ef4a=_0x3a62b0;_0x5854d3['text']=_0x33ef4a(0x207)+(_0x37cf29+0x1)+'/'+_0x1cee49+_0x33ef4a(0x1ec);},'onRoundComplete':(_0x461046,_0x403351,_0x1a59eb)=>{const _0x45f562=_0x3a62b0,_0x23b6d7=formatElapsed(_0x403351);_0x1a59eb?console['log'](_0x45f562(0x1f0)+(_0x461046+0x1)+'/'+_0x3abd0b[_0x45f562(0x201)][_0x45f562(0x1da)]+_0x45f562(0x24b)+a5_0xf9e0d5['green']('✓')+'\x20('+_0x23b6d7+')'):console[_0x45f562(0x222)](_0x45f562(0x1f0)+(_0x461046+0x1)+'/'+_0x3abd0b[_0x45f562(0x201)]['length']+_0x45f562(0x24b)+a5_0xf9e0d5[_0x45f562(0x248)]('✗'));},'onEvaluationStart':()=>{const _0x23d033=_0x3a62b0;_0x5854d3[_0x23d033(0x1f3)]=_0x23d033(0x1e6);},'onEvaluationComplete':_0x4f209b=>{const _0x1a52ea=_0x3a62b0,_0x204a31=formatElapsed(_0x4f209b);console[_0x1a52ea(0x222)](_0x1a52ea(0x256)+a5_0xf9e0d5[_0x1a52ea(0x23b)]('✓')+'\x20('+_0x204a31+')');}});_0x5854d3[_0x3a62b0(0x1de)](),_0x20072f[_0x3a62b0(0x213)](_0x1ca414),_0x4fb6fd[_0x3a62b0(0x213)](_0x4552cd);if(_0x1ca414[_0x3a62b0(0x242)]===_0x3a62b0(0x1f1))console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x23b)](_0x3a62b0(0x24a)+_0x1ca414[_0x3a62b0(0x241)]));else _0x1ca414[_0x3a62b0(0x242)]===_0x3a62b0(0x1c8)?console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x1f9)+_0x1ca414[_0x3a62b0(0x241)])):console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x1d4)+_0x1ca414[_0x3a62b0(0x241)]));_0x1ca414[_0x3a62b0(0x24c)]&&console[_0x3a62b0(0x222)](a5_0xf9e0d5[_0x3a62b0(0x1dc)](_0x3a62b0(0x1d8)+_0x1ca414[_0x3a62b0(0x24c)])),console['log']();}catch(_0xe57db4){_0x5854d3[_0x3a62b0(0x1de)]();const _0x99d3cf=_0xe57db4 instanceof Error?_0xe57db4[_0x3a62b0(0x1ce)]:String(_0xe57db4);console['log'](a5_0xf9e0d5[_0x3a62b0(0x248)](_0x3a62b0(0x1d4)+_0x99d3cf)),console[_0x3a62b0(0x222)](),_0x20072f['push']({'name':_0x3abd0b['name'],'status':_0x3a62b0(0x1c3),'reason':_0x99d3cf,'timestamp':new Date()[_0x3a62b0(0x21d)](),'duration_ms':0x0});}}const _0x1992dd=Date[_0x3a62b0(0x1cd)]()-_0x3b633a,_0x2f0ff1=_0x20072f[_0x3a62b0(0x1c6)](_0x2acc5c=>_0x2acc5c[_0x3a62b0(0x242)]===_0x3a62b0(0x1f1))[_0x3a62b0(0x1da)],_0x59abda=_0x20072f['filter'](_0x2a6de3=>_0x2a6de3['status']==='FAIL')['length'],_0x416e83=_0x20072f[_0x3a62b0(0x1c6)](_0x47a589=>_0x47a589[_0x3a62b0(0x242)]===_0x3a62b0(0x1c3))['length'];console[_0x3a62b0(0x222)]('━'[_0x3a62b0(0x1ea)](0x3c)),console[_0x3a62b0(0x222)]('Test\x20Summary'),console[_0x3a62b0(0x222)]('━'[_0x3a62b0(0x1ea)](0x3c)),console[_0x3a62b0(0x222)](_0x3a62b0(0x23d)+_0x20072f[_0x3a62b0(0x1da)]),console['log'](_0x3a62b0(0x257)+a5_0xf9e0d5[_0x3a62b0(0x23b)](_0x2f0ff1)),console[_0x3a62b0(0x222)](_0x3a62b0(0x233)+a5_0xf9e0d5[_0x3a62b0(0x248)](_0x59abda));_0x416e83>0x0&&console[_0x3a62b0(0x222)](_0x3a62b0(0x21e)+a5_0xf9e0d5[_0x3a62b0(0x248)](_0x416e83));console['log'](_0x3a62b0(0x228)+formatElapsed(_0x1992dd)),console[_0x3a62b0(0x222)]('━'[_0x3a62b0(0x1ea)](0x3c));const _0x1d0d5e=_0x20072f['filter'](_0x3a2f15=>_0x3a2f15[_0x3a62b0(0x242)]!==_0x3a62b0(0x1f1));if(_0x1d0d5e[_0x3a62b0(0x1da)]>0x0){console['log'](),console['log'](_0x3a62b0(0x21c));for(const _0x5f519a of _0x1d0d5e){const _0x246101=a5_0xf9e0d5[_0x3a62b0(0x248)]('✗'),_0x51f124=_0x5f519a['reason'][_0x3a62b0(0x1da)]>0x32?_0x5f519a[_0x3a62b0(0x241)]['substring'](0x0,0x32)+_0x3a62b0(0x25b):_0x5f519a['reason'];console[_0x3a62b0(0x222)]('\x20\x20'+_0x246101+'\x20'+_0x5f519a[_0x3a62b0(0x244)]+':\x20'+_0x51f124);}}const _0x32f69={'summary':{'total':_0x20072f[_0x3a62b0(0x1da)],'passed':_0x2f0ff1,'failed':_0x59abda,'errors':_0x416e83>0x0?_0x416e83:undefined,'duration_ms':_0x1992dd},'tests':_0x20072f,'agent':{'project':_0x904a01['projectName'],'name':_0x904a01[_0x3a62b0(0x1e4)],'site':_0xd8d34c},'timestamp':new Date(_0x3b633a)[_0x3a62b0(0x21d)]()};try{const _0x2110da=buildCachedTestRun(_0x4fb6fd,{'site':_0xd8d34c,'projectId':_0x25aaec,'projectName':_0x904a01[_0x3a62b0(0x23f)],'agentId':_0x4bbdbc,'agentName':_0x904a01['agentName'],'testYmlPath':a5_0x46291d[_0x3a62b0(0x245)](_0x904a01[_0x3a62b0(0x250)])});saveLastTestRun(_0x2110da);}catch{}if(_0x11df7d!==_0x3a62b0(0x24f)||_0x444805){const _0x9a77eb=formatResults(_0x32f69,_0x11df7d);if(_0x444805)try{a5_0x47fc09[_0x3a62b0(0x208)](_0x444805,_0x9a77eb,_0x3a62b0(0x239)),console[_0x3a62b0(0x222)](),console['log'](a5_0xf9e0d5['dim'](_0x3a62b0(0x220)+_0x444805));}catch(_0x2b69cc){return console['log'](),console[_0x3a62b0(0x222)](a5_0xf9e0d5['red']('Error\x20writing\x20output\x20file:\x20'+_0x2b69cc)),0x1;}else console[_0x3a62b0(0x222)](),console[_0x3a62b0(0x222)](_0x9a77eb);}return _0x1d0d5e[_0x3a62b0(0x1da)]>0x0?0x1:0x0;}async[a5_0x2953bf(0x23e)](_0x5796c6,_0xb56818){const _0x553228=a5_0x2953bf,{options:_0x47f881,tdx:_0x2fc7f0}=_0x5796c6,{definition:_0x52acd9,agentInfo:_0x1a64d6,outputFormat:_0x235333,outputFile:_0x128d7a}=_0xb56818,_0x2ec1bc=_0x47f881[_0x553228(0x238)],_0x1a2fbf=loadLastTestRun();if(!_0x1a2fbf)return console['log'](a5_0xf9e0d5['red']('Error:\x20No\x20previous\x20test\x20run\x20found.')),console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x1dc)](_0x553228(0x1e3))),0x1;if(_0x1a2fbf['agent'][_0x553228(0x1e4)]!==_0x1a64d6[_0x553228(0x1e4)])return console['log'](a5_0xf9e0d5['red'](_0x553228(0x1db)+_0x1a2fbf['agent'][_0x553228(0x1e4)]+_0x553228(0x1fb)+_0x1a64d6[_0x553228(0x1e4)]+'\x22.')),console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x1dc)](_0x553228(0x200))),0x1;const _0x23915c=new Set(_0x1a2fbf[_0x553228(0x1d2)][_0x553228(0x21b)](_0x1901fd=>_0x1901fd[_0x553228(0x1e0)])),_0xfda62d=_0x52acd9[_0x553228(0x215)][_0x553228(0x1c6)](_0x38decd=>!_0x23915c[_0x553228(0x1e5)](_0x38decd[_0x553228(0x244)]));if(_0xfda62d[_0x553228(0x1da)]>0x0&&_0x1a2fbf[_0x553228(0x238)]!==_0x2ec1bc)return console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x248)]('Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.')),console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x1dc)](_0x553228(0x209)+_0x1a2fbf[_0x553228(0x238)]+_0x553228(0x22a)+_0x2ec1bc+'\x22.')),console[_0x553228(0x222)](a5_0xf9e0d5['dim'](_0x553228(0x21a)+_0x1a2fbf[_0x553228(0x238)]+'\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.')),0x1;const _0x15e5d2=_0x52acd9[_0x553228(0x215)]['filter'](_0x334db1=>_0x23915c[_0x553228(0x1e5)](_0x334db1[_0x553228(0x244)])),_0x330697=_0xfda62d;let _0x3d186d;try{_0x3d186d=await setupEvaluatorAgent(_0x2fc7f0[_0x553228(0x1e9)],_0x47f881[_0x553228(0x22b)]);}catch(_0x33fa0f){const _0x219086=_0x33fa0f instanceof Error?_0x33fa0f['message']:String(_0x33fa0f);return console[_0x553228(0x222)](a5_0xf9e0d5['red'](_0x553228(0x252)+_0x219086)),0x1;}console['log'](a5_0xf9e0d5[_0x553228(0x1c7)]('Re-evaluating\x20cached\x20test\x20run...')),console[_0x553228(0x222)](_0x553228(0x251)+a5_0xf9e0d5[_0x553228(0x221)](_0x1a2fbf[_0x553228(0x203)])),console[_0x553228(0x222)](_0x553228(0x212)+a5_0xf9e0d5[_0x553228(0x221)](_0x1a2fbf[_0x553228(0x202)][_0x553228(0x23f)]+'/'+_0x1a2fbf[_0x553228(0x202)][_0x553228(0x1e4)]));_0x330697[_0x553228(0x1da)]>0x0&&console[_0x553228(0x222)](_0x553228(0x22e)+a5_0xf9e0d5[_0x553228(0x232)](_0x330697[_0x553228(0x1da)]));console[_0x553228(0x222)]();const _0x5ae37b=[],_0x148530=Date[_0x553228(0x1cd)](),_0x4e6508=createCommandSpinner(_0x553228(0x1e7));if(_0x15e5d2[_0x553228(0x1da)]>0x0)try{const _0x534174=await reevaluateFromCache(_0x2fc7f0['llm'],_0x1a2fbf,{'tests':_0x15e5d2},{'evaluatorId':_0x3d186d,'onTestStart':(_0x2d0d4c,_0x2dc60d,_0x31b420)=>{const _0x221a08=_0x553228;_0x4e6508['text']=_0x221a08(0x23c)+(_0x2dc60d+0x1)+'/'+_0x31b420+':\x20'+_0x2d0d4c+_0x221a08(0x25b);if(!_0x4e6508['isSpinning'])_0x4e6508[_0x221a08(0x20f)]();},'onTestComplete':(_0x38d5cc,_0x1cec43)=>{const _0x37fcb5=_0x553228;_0x4e6508['stop']();if(_0x1cec43[_0x37fcb5(0x242)]===_0x37fcb5(0x1f1))console[_0x37fcb5(0x222)](a5_0xf9e0d5['green'](_0x37fcb5(0x24a)+_0x38d5cc)+a5_0xf9e0d5[_0x37fcb5(0x1dc)](_0x37fcb5(0x254)));else _0x1cec43[_0x37fcb5(0x242)]===_0x37fcb5(0x1c8)?console[_0x37fcb5(0x222)](a5_0xf9e0d5[_0x37fcb5(0x248)](_0x37fcb5(0x1f9)+_0x38d5cc+_0x37fcb5(0x25a)+_0x1cec43[_0x37fcb5(0x241)])+a5_0xf9e0d5[_0x37fcb5(0x1dc)]('\x20(cached)')):console[_0x37fcb5(0x222)](a5_0xf9e0d5[_0x37fcb5(0x248)](_0x37fcb5(0x1d4)+_0x38d5cc+_0x37fcb5(0x25a)+_0x1cec43[_0x37fcb5(0x241)]));_0x1cec43['conversation_url']&&console[_0x37fcb5(0x222)](a5_0xf9e0d5[_0x37fcb5(0x1dc)](_0x37fcb5(0x214)+_0x1cec43[_0x37fcb5(0x24c)])),_0x5ae37b[_0x37fcb5(0x213)](_0x1cec43);},'onTestSkipped':(_0x2b5f4e,_0x4b32fe)=>{const _0x77d709=_0x553228;_0x4e6508['stop'](),console['log'](a5_0xf9e0d5[_0x77d709(0x232)](_0x77d709(0x22f)+_0x2b5f4e+_0x77d709(0x25a)+_0x4b32fe));}});for(const _0x17b9f5 of _0x534174){!_0x5ae37b['find'](_0x38215c=>_0x38215c['name']===_0x17b9f5[_0x553228(0x244)])&&_0x5ae37b[_0x553228(0x213)](_0x17b9f5);}}catch(_0x4546d1){_0x4e6508['stop']();const _0x541f54=_0x4546d1 instanceof Error?_0x4546d1[_0x553228(0x1ce)]:String(_0x4546d1);return console['log'](a5_0xf9e0d5[_0x553228(0x248)](_0x553228(0x1d0)+_0x541f54)),0x1;}_0x4e6508[_0x553228(0x1de)]();if(_0x330697[_0x553228(0x1da)]>0x0){console[_0x553228(0x222)](),console[_0x553228(0x222)](a5_0xf9e0d5['cyan'](_0x553228(0x20d)));const {projectId:_0x76dae8,agentId:_0x1cfba8}=_0x1a2fbf[_0x553228(0x202)];for(const _0x22f674 of _0x330697){console[_0x553228(0x222)](_0x553228(0x210)+a5_0xf9e0d5[_0x553228(0x221)](_0x22f674[_0x553228(0x244)]));const _0xc36ba4=createCommandSpinner(_0x553228(0x236)+_0x22f674[_0x553228(0x201)][_0x553228(0x1da)]+':\x20Sending\x20user\x20input...');_0xc36ba4['start']();try{const {result:_0x149a69}=await runTest(_0x2fc7f0[_0x553228(0x1e9)],_0x22f674,{'agentId':_0x1cfba8,'projectId':_0x76dae8,'site':_0x1a2fbf[_0x553228(0x238)],'noEval':![],'evaluatorId':_0x3d186d,'onRoundStart':(_0x4139a6,_0x12acbe)=>{const _0x22a189=_0x553228;_0xc36ba4[_0x22a189(0x1f3)]='Round\x20'+(_0x4139a6+0x1)+'/'+_0x12acbe+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x48933c,_0x5f43ea,_0x4890ed)=>{const _0x3becba=_0x553228,_0x5318ce=formatElapsed(_0x5f43ea);_0x4890ed?console[_0x3becba(0x222)](_0x3becba(0x1f0)+(_0x48933c+0x1)+'/'+_0x22f674[_0x3becba(0x201)][_0x3becba(0x1da)]+'...\x20'+a5_0xf9e0d5[_0x3becba(0x23b)]('✓')+'\x20('+_0x5318ce+')'):console[_0x3becba(0x222)](_0x3becba(0x1f0)+(_0x48933c+0x1)+'/'+_0x22f674[_0x3becba(0x201)][_0x3becba(0x1da)]+_0x3becba(0x24b)+a5_0xf9e0d5['red']('✗'));},'onEvaluationStart':()=>{const _0x1eec89=_0x553228;_0xc36ba4[_0x1eec89(0x1f3)]=_0x1eec89(0x1e6);},'onEvaluationComplete':_0x38569c=>{const _0x3bf347=_0x553228,_0x359802=formatElapsed(_0x38569c);console[_0x3bf347(0x222)](_0x3bf347(0x256)+a5_0xf9e0d5['green']('✓')+'\x20('+_0x359802+')');}});_0xc36ba4[_0x553228(0x1de)](),_0x5ae37b[_0x553228(0x213)](_0x149a69);if(_0x149a69[_0x553228(0x242)]===_0x553228(0x1f1))console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x23b)](_0x553228(0x24a)+_0x149a69['reason'])+a5_0xf9e0d5[_0x553228(0x1dc)](_0x553228(0x1fc)));else _0x149a69[_0x553228(0x242)]===_0x553228(0x1c8)?console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x248)]('✗\x20FAIL:\x20'+_0x149a69[_0x553228(0x241)])+a5_0xf9e0d5[_0x553228(0x1dc)](_0x553228(0x1fc))):console['log'](a5_0xf9e0d5[_0x553228(0x248)](_0x553228(0x1d4)+_0x149a69['reason']));_0x149a69[_0x553228(0x24c)]&&console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x1dc)](_0x553228(0x214)+_0x149a69[_0x553228(0x24c)]));}catch(_0x4c3aea){_0xc36ba4[_0x553228(0x1de)]();const _0x503f04=_0x4c3aea instanceof Error?_0x4c3aea[_0x553228(0x1ce)]:String(_0x4c3aea);console[_0x553228(0x222)](a5_0xf9e0d5['red'](_0x553228(0x1d4)+_0x503f04)),_0x5ae37b[_0x553228(0x213)]({'name':_0x22f674[_0x553228(0x244)],'status':_0x553228(0x1c3),'reason':_0x503f04,'timestamp':new Date()[_0x553228(0x21d)](),'duration_ms':0x0});}}}console[_0x553228(0x222)]();const _0x33de0c=Date['now']()-_0x148530,_0x4434a8=_0x5ae37b[_0x553228(0x1c6)](_0x23ec93=>_0x23ec93[_0x553228(0x242)]===_0x553228(0x1f1))[_0x553228(0x1da)],_0x9e50b2=_0x5ae37b['filter'](_0x3233d9=>_0x3233d9[_0x553228(0x242)]===_0x553228(0x1c8))[_0x553228(0x1da)],_0x34e6c9=_0x5ae37b[_0x553228(0x1c6)](_0xc6feee=>_0xc6feee[_0x553228(0x242)]===_0x553228(0x1c3))[_0x553228(0x1da)];console['log']('━'[_0x553228(0x1ea)](0x3c)),console['log'](_0x553228(0x20c)),console[_0x553228(0x222)]('━'[_0x553228(0x1ea)](0x3c)),console['log'](_0x553228(0x23d)+_0x5ae37b[_0x553228(0x1da)]),console['log'](_0x553228(0x257)+a5_0xf9e0d5[_0x553228(0x23b)](_0x4434a8)),console[_0x553228(0x222)]('Failed:\x20\x20\x20'+a5_0xf9e0d5[_0x553228(0x248)](_0x9e50b2));_0x34e6c9>0x0&&console[_0x553228(0x222)]('Errors:\x20\x20\x20'+a5_0xf9e0d5[_0x553228(0x248)](_0x34e6c9));console['log'](_0x553228(0x228)+formatElapsed(_0x33de0c)),console['log']('━'[_0x553228(0x1ea)](0x3c));const _0x3c9469={'summary':{'total':_0x5ae37b[_0x553228(0x1da)],'passed':_0x4434a8,'failed':_0x9e50b2,'errors':_0x34e6c9>0x0?_0x34e6c9:undefined,'duration_ms':_0x33de0c},'tests':_0x5ae37b,'agent':{'project':_0x1a64d6[_0x553228(0x23f)],'name':_0x1a64d6[_0x553228(0x1e4)],'site':_0x2ec1bc},'timestamp':new Date(_0x148530)[_0x553228(0x21d)]()};if(_0x235333!=='table'||_0x128d7a){const _0x266e51=formatResults(_0x3c9469,_0x235333);if(_0x128d7a)try{a5_0x47fc09[_0x553228(0x208)](_0x128d7a,_0x266e51,'utf-8'),console[_0x553228(0x222)](),console['log'](a5_0xf9e0d5[_0x553228(0x1dc)](_0x553228(0x220)+_0x128d7a));}catch(_0x2383db){return console[_0x553228(0x222)](),console[_0x553228(0x222)](a5_0xf9e0d5[_0x553228(0x248)](_0x553228(0x255)+_0x2383db)),0x1;}else console['log'](),console[_0x553228(0x222)](_0x266e51);}const _0x4ce779=_0x5ae37b[_0x553228(0x1c6)](_0xa541f2=>_0xa541f2['status']!=='PASS');return _0x4ce779[_0x553228(0x1da)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x1ffbe7=a6_0x1fa7;function a6_0x1fa7(_0x23e32e,_0x58aba9){_0x23e32e=_0x23e32e-0x6c;const _0x50fd2e=a6_0x50fd();let _0x1fa710=_0x50fd2e[_0x23e32e];return _0x1fa710;}(function(_0x4f8a28,_0x1931bb){const _0x616ac1=a6_0x1fa7,_0x59ab80=_0x4f8a28();while(!![]){try{const _0x2cd27b=-parseInt(_0x616ac1(0x71))/0x1+parseInt(_0x616ac1(0x77))/0x2+-parseInt(_0x616ac1(0x7b))/0x3*(parseInt(_0x616ac1(0x86))/0x4)+parseInt(_0x616ac1(0x82))/0x5*(-parseInt(_0x616ac1(0x75))/0x6)+parseInt(_0x616ac1(0xaa))/0x7*(parseInt(_0x616ac1(0xa7))/0x8)+-parseInt(_0x616ac1(0x81))/0x9+parseInt(_0x616ac1(0x8c))/0xa;if(_0x2cd27b===_0x1931bb)break;else _0x59ab80['push'](_0x59ab80['shift']());}catch(_0x24f8f7){_0x59ab80['push'](_0x59ab80['shift']());}}}(a6_0x50fd,0x88a7c));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';const SENSITIVE_HEADERS=new Set([a6_0x1ffbe7(0x8f),'proxy-authorization',a6_0x1ffbe7(0x83),'set-cookie',a6_0x1ffbe7(0xa2),a6_0x1ffbe7(0x78),a6_0x1ffbe7(0x7a),a6_0x1ffbe7(0x79)]);function isSensitiveHeader(_0x348493){const _0x56550e=a6_0x1ffbe7;return SENSITIVE_HEADERS[_0x56550e(0xb0)](_0x348493[_0x56550e(0xae)]());}function parseHeader(_0x41d32b){const _0x526a22=a6_0x1ffbe7,_0x2edd4c=_0x41d32b[_0x526a22(0xa8)](':');if(_0x2edd4c===-0x1)throw new Error(_0x526a22(0x91)+_0x41d32b+_0x526a22(0xa3)+_0x526a22(0x96));const _0x5a7d27=_0x41d32b[_0x526a22(0xab)](0x0,_0x2edd4c)[_0x526a22(0xa5)](),_0x2baa70=_0x41d32b[_0x526a22(0xab)](_0x2edd4c+0x1)[_0x526a22(0xa5)]();if(!_0x5a7d27)throw new Error(_0x526a22(0x93)+_0x41d32b+'\x22');return[_0x5a7d27,_0x2baa70];}function a6_0x50fd(){const _0x36fa12=['x-xsrf-token','x-trino-user','x-auth-token','84663prkVAc','GET','readBodyFromFile','Invalid\x20API\x20type:\x20','headers','stack','3900600PQbGyZ','133220lIrZts','cookie','type','validate','28PmxhRS','status','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','includes','length','toUpperCase','18123120mPiLoP','output','.\x20Valid\x20methods:\x20','authorization','entries','Invalid\x20header\x20format:\x20\x22','Endpoint\x20must\x20start\x20with\x20/:\x20','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','.\x20Valid\x20types:\x20','Results\x20saved\x20to\x20','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','method','color','execute','llm','file','trino','error','data','PATCH','<\x20HTTP/1.1\x20','startsWith','set-cookie2','\x22.\x20','Invalid\x20HTTP\x20method:\x20','trim','workflow','992likYdD','indexOf','llm-proxy','10759mfQOsV','substring','keys','api','toLowerCase','log','has','cdp','Error:\x20','site','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','join','115397ABLFzq','request','PUT','verbose','174kGWrdc','header','151720tjYKqI'];a6_0x50fd=function(){return _0x36fa12;};return a6_0x50fd();}export class ApiCommand extends BaseCommand{['name']=a6_0x1ffbe7(0xad);['description']=a6_0x1ffbe7(0x6f);[a6_0x1ffbe7(0x85)](_0x1d0da4){const _0x50da2c=a6_0x1ffbe7,{args:_0x14596a,options:_0x4ec5aa}=_0x1d0da4,_0x50f5d4=_0x4ec5aa;if(_0x14596a[_0x50da2c(0x8a)]===0x0)return'Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list';const _0x2bc73e=_0x14596a[0x0];if(!_0x2bc73e[_0x50da2c(0xa1)]('/'))return _0x50da2c(0x92)+_0x2bc73e;const _0x2d4f9a=_0x50f5d4[_0x50da2c(0x9e)],_0x23da54=_0x50f5d4[_0x50da2c(0x9b)];if(_0x2d4f9a&&_0x23da54)return _0x50da2c(0x88);const _0x5a3204=_0x50f5d4[_0x50da2c(0x97)]||_0x50da2c(0x7c),_0x18df07=[_0x50da2c(0x7c),'POST',_0x50da2c(0x73),'DELETE',_0x50da2c(0x9f)];if(!_0x18df07[_0x50da2c(0x89)](_0x5a3204[_0x50da2c(0x8b)]()))return _0x50da2c(0xa4)+_0x5a3204+_0x50da2c(0x8e)+_0x18df07[_0x50da2c(0x70)](',\x20');const _0x26b875=_0x50f5d4['type']||'td',_0x6fe775=['td',_0x50da2c(0x6c),_0x50da2c(0xa6),_0x50da2c(0x9c),_0x50da2c(0x9a),_0x50da2c(0xa9)];if(!_0x6fe775[_0x50da2c(0x89)](_0x26b875))return _0x50da2c(0x7e)+_0x26b875+_0x50da2c(0x94)+_0x6fe775['join'](',\x20');return undefined;}async[a6_0x1ffbe7(0x99)](_0x4c1e6f){const _0x54fe9=a6_0x1ffbe7,{options:_0x5fae8c,args:_0x53cd2d,tdx:_0x6693e2}=_0x4c1e6f,_0x82801e=_0x5fae8c,_0x5a3cc2=_0x53cd2d[0x0],_0x240257=(_0x82801e[_0x54fe9(0x97)]||_0x54fe9(0x7c))[_0x54fe9(0x8b)](),_0x174d4f=_0x82801e[_0x54fe9(0x9e)],_0x153782=_0x82801e[_0x54fe9(0x9b)],_0x31f62b=_0x82801e[_0x54fe9(0x76)],_0x529a01=_0x82801e[_0x54fe9(0x84)]||'td';try{const _0x5f2060={};if(_0x31f62b){const _0x44a56d=Array['isArray'](_0x31f62b)?_0x31f62b:[_0x31f62b];for(const _0x3205a0 of _0x44a56d){const [_0x3d033b,_0x5e4595]=parseHeader(_0x3205a0);_0x5f2060[_0x3d033b]=_0x5e4595;}}let _0xc9de15;if(_0x174d4f)_0xc9de15=_0x174d4f;else{if(_0x153782)try{_0xc9de15=RawAPI[_0x54fe9(0x7d)](_0x153782);}catch(_0x1dc19b){return console[_0x54fe9(0x9d)]('Error:\x20'+(_0x1dc19b instanceof Error?_0x1dc19b['message']:String(_0x1dc19b))),0x1;}}const _0x229da5={'method':_0x240257,'apiType':_0x529a01,'includeHeaders':_0x5fae8c[_0x54fe9(0x74)]};_0xc9de15&&(_0x229da5['body']=_0xc9de15);Object[_0x54fe9(0xac)](_0x5f2060)['length']>0x0&&(_0x229da5[_0x54fe9(0x7f)]=_0x5f2060);if(_0x5fae8c[_0x54fe9(0x74)]){const _0x4080e4=resolveSite(_0x5fae8c[_0x54fe9(0x6e)]),_0x6f215c=getEndpoint(_0x4080e4,_0x529a01),_0x512771=''+_0x6f215c+_0x5a3cc2;console[_0x54fe9(0x9d)]('>\x20'+_0x240257+'\x20'+_0x512771);const _0x4ae070=getAuthHeaders(_0x4080e4),_0x128bf3={..._0x4ae070,..._0x5f2060};for(const [_0x1a0bf1,_0x332b76]of Object[_0x54fe9(0x90)](_0x128bf3)){!isSensitiveHeader(_0x1a0bf1)&&console[_0x54fe9(0x9d)]('>\x20'+_0x1a0bf1+':\x20'+_0x332b76);}_0xc9de15&&console['error']('>'),console[_0x54fe9(0x9d)]('');}const _0x5e08b8=await _0x6693e2[_0x54fe9(0xad)][_0x54fe9(0x72)](_0x5a3cc2,_0x229da5);if(_0x5fae8c[_0x54fe9(0x74)]&&_0x5e08b8[_0x54fe9(0x7f)]){console[_0x54fe9(0x9d)](_0x54fe9(0xa0)+_0x5e08b8[_0x54fe9(0x87)]);for(const [_0x5be709,_0x5d6a2c]of Object[_0x54fe9(0x90)](_0x5e08b8[_0x54fe9(0x7f)])){!isSensitiveHeader(_0x5be709)&&console[_0x54fe9(0x9d)]('<\x20'+_0x5be709+':\x20'+_0x5d6a2c);}console[_0x54fe9(0x9d)]('');}const _0x20f6ae=Boolean(_0x5fae8c[_0x54fe9(0x8d)]),_0x444488={'color':_0x5fae8c[_0x54fe9(0x98)],'noColor':_0x5fae8c['noColor']||_0x20f6ae&&!_0x5fae8c[_0x54fe9(0x98)]},_0x108e57=colorizeJSON(_0x5e08b8[_0x54fe9(0x9e)],_0x444488);return _0x5fae8c[_0x54fe9(0x8d)]?(writeFileSync(_0x5fae8c['output'],_0x108e57),console[_0x54fe9(0x9d)](_0x54fe9(0x95)+_0x5fae8c[_0x54fe9(0x8d)])):console[_0x54fe9(0xaf)](_0x108e57),0x0;}catch(_0x40827f){return _0x40827f instanceof Error?(console[_0x54fe9(0x9d)](_0x54fe9(0x6d)+_0x40827f['message']),_0x5fae8c[_0x54fe9(0x74)]&&_0x40827f[_0x54fe9(0x80)]&&console['error']('\x0aStack\x20trace:\x0a'+_0x40827f[_0x54fe9(0x80)])):console[_0x54fe9(0x9d)]('Error:\x20'+String(_0x40827f)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x331faf=a7_0x25b1;(function(_0x1e3d0e,_0x41c024){const _0x475806=a7_0x25b1,_0x43a8d5=_0x1e3d0e();while(!![]){try{const _0x5845e6=parseInt(_0x475806(0xbd))/0x1+parseInt(_0x475806(0xb5))/0x2*(-parseInt(_0x475806(0x9a))/0x3)+parseInt(_0x475806(0x94))/0x4+-parseInt(_0x475806(0xa3))/0x5*(parseInt(_0x475806(0xcf))/0x6)+parseInt(_0x475806(0xcb))/0x7*(-parseInt(_0x475806(0xad))/0x8)+-parseInt(_0x475806(0xc4))/0x9*(parseInt(_0x475806(0xa4))/0xa)+parseInt(_0x475806(0xc6))/0xb*(parseInt(_0x475806(0xd1))/0xc);if(_0x5845e6===_0x41c024)break;else _0x43a8d5['push'](_0x43a8d5['shift']());}catch(_0x40fbed){_0x43a8d5['push'](_0x43a8d5['shift']());}}}(a7_0x3c56,0x9702b));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';function a7_0x25b1(_0xc098b0,_0x4a7463){_0xc098b0=_0xc098b0-0x81;const _0x3c56f0=a7_0x3c56();let _0x25b178=_0x3c56f0[_0xc098b0];return _0x25b178;}import{saveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{deleteOAuthTokens}from'../core/oauth-keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import{isOAuthSupported}from'../core/oauth.js';import{runOAuthLoginFlow}from'./auth-login-command.js';import{promptSiteSelection}from'../core/constants.js';import a7_0x43b301 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_0x334d3d from'chalk';export class AuthSetupCommand extends BaseCommand{['name']=a7_0x331faf(0xb4);[a7_0x331faf(0x9f)]='Setup\x20API\x20key\x20authentication\x20interactively';async[a7_0x331faf(0xd0)](_0x5b86a5){const _0x4ec9a3=a7_0x331faf,{options:_0x184269}=_0x5b86a5,_0x31e6c7=_0x184269[_0x4ec9a3(0x98)];console[_0x4ec9a3(0xae)](a7_0x334d3d[_0x4ec9a3(0x93)](_0x4ec9a3(0xc7)));const _0x4a170c=_0x184269[_0x4ec9a3(0xb3)]||_0x4ec9a3(0xa1),_0x1ae82e=await promptSiteSelection(_0x4a170c,_0x31e6c7,_0x4ec9a3(0xb1));if(!_0x1ae82e)return 0x1;const _0xaff597=resolveSite(_0x1ae82e);if(isOAuthSupported(_0xaff597)){const _0xe77a6=await a7_0x43b301({'type':_0x4ec9a3(0x81),'name':_0x4ec9a3(0x91),'message':_0x4ec9a3(0xc8),'choices':[{'title':'OAuth\x20(browser\x20login)','value':_0x4ec9a3(0xbf)},{'title':'API\x20Key','value':_0x4ec9a3(0xa5)}]});if(!_0xe77a6[_0x4ec9a3(0x91)])return console[_0x4ec9a3(0xae)](_0x4ec9a3(0x86)),0x1;if(_0xe77a6[_0x4ec9a3(0x91)]===_0x4ec9a3(0xbf))return await runOAuthLoginFlow(_0xaff597,_0x31e6c7,_0x184269[_0x4ec9a3(0xaf)]??LogLevel[_0x4ec9a3(0xb0)]),0x0;}console['log'](_0x4ec9a3(0xa8)+_0xaff597),console[_0x4ec9a3(0xae)](_0x4ec9a3(0x83)),console[_0x4ec9a3(0xae)]('\x20\x20'+getConsoleUrl(_0xaff597,_0x4ec9a3(0xca)));const _0x1b11b4=await a7_0x43b301({'type':_0x4ec9a3(0xc5),'name':_0x4ec9a3(0xac),'message':_0x4ec9a3(0xa9),'validate':_0x4be146=>{const _0x13370b=_0x4ec9a3;if(!_0x4be146||!_0x4be146[_0x13370b(0xc1)]())return _0x13370b(0x89);return!![];}});if(!_0x1b11b4[_0x4ec9a3(0xac)])return console[_0x4ec9a3(0xae)]('\x0aSetup\x20cancelled'),0x1;const _0x101e39=_0x1b11b4[_0x4ec9a3(0xac)];console[_0x4ec9a3(0xae)]('Validating\x20API\x20key...');try{const _0x3d71e0=TDX[_0x4ec9a3(0x96)]({'site':_0xaff597,'apiKey':_0x101e39[_0x4ec9a3(0xc1)](),'logLevel':_0x184269['logLevel']??LogLevel[_0x4ec9a3(0xb0)]}),_0x2154d3=await _0x3d71e0[_0x4ec9a3(0x8b)][_0x4ec9a3(0x9c)]();console[_0x4ec9a3(0xae)]('✓\x20API\x20key\x20is\x20valid\x20(User:\x20'+_0x2154d3[_0x4ec9a3(0xcd)]+')');const _0x58be9e=await isKeychainAvailable();_0x58be9e?(await saveAPIKeyAsync(_0x101e39[_0x4ec9a3(0xc1)](),_0xaff597,_0x31e6c7),console[_0x4ec9a3(0xae)](_0x4ec9a3(0xc9)+(_0x31e6c7?_0x4ec9a3(0x9d)+_0x31e6c7+')':''))):(console[_0x4ec9a3(0x8c)](a7_0x334d3d[_0x4ec9a3(0x8e)](_0x4ec9a3(0x99))),console[_0x4ec9a3(0x8c)](a7_0x334d3d['yellow'](_0x4ec9a3(0xc2))));if(_0x31e6c7){const _0x53345f={'site':_0xaff597};saveProfileToUserConfig(_0x31e6c7,_0x53345f),console[_0x4ec9a3(0xae)]('✓\x20Profile\x20\x27'+_0x31e6c7+'\x27\x20registered');}else saveDefaultSiteToUserConfig(_0xaff597),console[_0x4ec9a3(0xae)](_0x4ec9a3(0xba)+_0xaff597);const _0x2d23e8=_0x31e6c7?_0x4ec9a3(0xbe)+_0x31e6c7:'';return console[_0x4ec9a3(0xae)](),console[_0x4ec9a3(0xae)](_0x4ec9a3(0x85)),console[_0x4ec9a3(0xae)](_0x4ec9a3(0x8d)+_0x2d23e8+'\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication'),console[_0x4ec9a3(0xae)](_0x4ec9a3(0x8d)+_0x2d23e8+_0x4ec9a3(0x84)),0x0;}catch(_0x420ec0){if(_0x420ec0 instanceof HTTPClientError&&_0x420ec0['status']===0x191)return printAuthError(_0x420ec0),0x1;return console[_0x4ec9a3(0x92)](a7_0x334d3d[_0x4ec9a3(0xa0)](_0x4ec9a3(0x8f)+(_0x420ec0 instanceof Error?_0x420ec0[_0x4ec9a3(0xa6)]:String(_0x420ec0)))),console[_0x4ec9a3(0x92)]('API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.'),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a7_0x331faf(0xa7)]=a7_0x331faf(0x90);[a7_0x331faf(0x9f)]=a7_0x331faf(0x9b);async['execute'](_0x3d1539){const _0x52e7e4=a7_0x331faf,{options:_0x25a316,tdx:_0xa0ae4f}=_0x3d1539,_0x14cdf3=_0x25a316[_0x52e7e4(0xb3)],_0x31b091=_0x25a316[_0x52e7e4(0x98)],_0x262467=_0x31b091?_0x31b091:'N/A';console[_0x52e7e4(0xae)](_0x52e7e4(0xaa)+_0x262467+_0x52e7e4(0xbb)+_0x14cdf3+')');const _0x506f5d=await getOAuthTokens(_0x31b091);if(_0x506f5d)console[_0x52e7e4(0xae)]('Credential\x20type:\x20OAuth'),console[_0x52e7e4(0xae)](_0x52e7e4(0xb2)+(_0x31b091?_0x52e7e4(0x9d)+_0x31b091+')':''));else{const _0x53e352=await resolveAPIKeyAsync(_0x14cdf3,_0x31b091);if(_0x53e352){const {source:_0x2da38a,isDeprecated:_0x298993}=_0x53e352,_0x41f32f=_0x52e7e4(0xb8)+_0x2da38a;console['log'](_0x298993?a7_0x334d3d[_0x52e7e4(0x8e)](_0x41f32f):_0x41f32f);}else console[_0x52e7e4(0xae)](a7_0x334d3d[_0x52e7e4(0x8e)]('No\x20credential\x20found'));}try{const _0x1afa4e=await _0xa0ae4f['jobs']['getUserInfo']();return console[_0x52e7e4(0xae)](a7_0x334d3d['green'](_0x52e7e4(0xa2))),console[_0x52e7e4(0xae)](_0x52e7e4(0x9e)+_0x1afa4e['email']),(_0x1afa4e['first_name']||_0x1afa4e[_0x52e7e4(0x87)])&&console['log']('Name:\x20'+[_0x1afa4e[_0x52e7e4(0xce)],_0x1afa4e[_0x52e7e4(0x87)]][_0x52e7e4(0xbc)](Boolean)[_0x52e7e4(0xb7)]('\x20')),0x0;}catch(_0x5736c8){return _0x5736c8 instanceof HTTPClientError&&_0x5736c8[_0x52e7e4(0x8a)]===0x191?printAuthError(_0x5736c8,!![],_0x31b091):console[_0x52e7e4(0x92)](a7_0x334d3d[_0x52e7e4(0xa0)](_0x52e7e4(0x8f)+(_0x5736c8 instanceof Error?_0x5736c8[_0x52e7e4(0xa6)]:String(_0x5736c8)))),0x1;}}}function a7_0x3c56(){const _0x33b77a=['status','jobs','warn','\x20\x20tdx','yellow','✗\x20Validation\x20failed:\x20','auth','method','error','bold','1668228srrhNy','tdx:\x20auth\x20clear','create','OAuth\x20tokens','profile','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','3PAZRMW','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','getUserInfo','\x20(profile:\x20','User:\x20','description','red','us01','✓\x20Authentication\x20successful\x0a','2330vwbhQD','10VAqtDt','apikey','message','name','Setting\x20up\x20authentication\x20for\x20site:\x20','Enter\x20your\x20TD\x20API\x20key:','tdx\x20profile:\x20','all','apiKey','2032FFLFCH','log','logLevel','ERROR','Setup\x20cancelled','Read\x20credential\x20from\x20keychain','site','auth:setup','814844ZmQNXl','API\x20key','join','Read\x20credential\x20from\x20','\x20for\x20profile:\x20','✓\x20Default\x20site\x20set\x20to\x20','\x20(site:\x20','filter','550848dfMMNX','\x20--profile\x20','oauth','\x20and\x20','trim','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','auth:clear','4680846vrcWeX','password','154KugAcd','tdx:\x20auth\x20setup','Choose\x20authentication\x20method:','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','/app/mp/ak','21651ArAKIV','System\x20keychain\x20is\x20not\x20available','email','first_name','5454DwKtyv','execute','1532028jDGdnZ','select','\x20removed\x20from\x20keychain','You\x20can\x20find\x20your\x20API\x20key\x20at:','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','\x0aSetup\x20cancelled','last_name','No\x20credentials\x20found\x20in\x20keychain','API\x20key\x20cannot\x20be\x20empty'];a7_0x3c56=function(){return _0x33b77a;};return a7_0x3c56();}export class AuthClearCommand extends BaseCommand{[a7_0x331faf(0xa7)]=a7_0x331faf(0xc3);[a7_0x331faf(0x9f)]='Remove\x20API\x20key\x20from\x20system\x20keychain';async[a7_0x331faf(0xd0)](_0x5f0831){const _0xc5d65e=a7_0x331faf,{options:_0x491d56}=_0x5f0831,_0x2115db=_0x491d56[_0xc5d65e(0x98)];console['log'](a7_0x334d3d[_0xc5d65e(0x93)](_0xc5d65e(0x95)));const _0x4d44f=await isKeychainAvailable();if(!_0x4d44f)return console['error'](a7_0x334d3d[_0xc5d65e(0xa0)](_0xc5d65e(0xcc))),0x1;const [_0x5ed12b,_0x5bf7a1]=await Promise[_0xc5d65e(0xab)]([deleteKeychainAPIKey(_0x2115db),deleteOAuthTokens(_0x2115db)]);if(_0x5ed12b||_0x5bf7a1){clearCredentialCache();const _0x45d115=[_0x5ed12b&&_0xc5d65e(0xb6),_0x5bf7a1&&_0xc5d65e(0x97)][_0xc5d65e(0xbc)](Boolean)[_0xc5d65e(0xb7)](_0xc5d65e(0xc0));return console[_0xc5d65e(0xae)]('✓\x20'+_0x45d115+_0xc5d65e(0x82)+(_0x2115db?_0xc5d65e(0x9d)+_0x2115db+')':'')),0x0;}else return console[_0xc5d65e(0xae)](_0xc5d65e(0x88)+(_0x2115db?_0xc5d65e(0xb9)+_0x2115db:'')),0x1;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x1f3c3c=a8_0x2858;function a8_0x2858(_0x47448c,_0x169e8c){_0x47448c=_0x47448c-0xae;const _0x187f98=a8_0x187f();let _0x28581b=_0x187f98[_0x47448c];return _0x28581b;}(function(_0x5dbde3,_0x4c0bec){const _0x5fe41f=a8_0x2858,_0x5dcc39=_0x5dbde3();while(!![]){try{const _0x552c05=-parseInt(_0x5fe41f(0xcc))/0x1*(parseInt(_0x5fe41f(0xc9))/0x2)+-parseInt(_0x5fe41f(0xb8))/0x3+parseInt(_0x5fe41f(0xbb))/0x4*(-parseInt(_0x5fe41f(0xc0))/0x5)+parseInt(_0x5fe41f(0xd1))/0x6+parseInt(_0x5fe41f(0xc7))/0x7*(-parseInt(_0x5fe41f(0xd5))/0x8)+-parseInt(_0x5fe41f(0xc8))/0x9*(-parseInt(_0x5fe41f(0xb6))/0xa)+parseInt(_0x5fe41f(0xcd))/0xb*(parseInt(_0x5fe41f(0xc4))/0xc);if(_0x552c05===_0x4c0bec)break;else _0x5dcc39['push'](_0x5dcc39['shift']());}catch(_0x5c2c6d){_0x5dcc39['push'](_0x5dcc39['shift']());}}}(a8_0x187f,0xedce2));import{BaseCommand}from'./command.js';import{resolveSite}from'../core/config.js';import{saveProfileToUserConfig}from'../core/profile.js';function a8_0x187f(){const _0x569aa2=['\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','Opening\x20browser\x20for\x20authentication...','20wgOagK','\x27\x20registered','543696YMhEDi','Authenticating\x20via\x20OAuth\x20for\x20site:\x20','ERROR','2859016bJkfMx','System\x20keychain\x20is\x20not\x20available.\x20OAuth\x20tokens\x20cannot\x20be\x20saved.\x20','log','auth:login','name','5oZEmQw','Login\x20via\x20OAuth\x20(opens\x20browser)','logLevel','site','372WPOIWP','✓\x20Profile\x20\x27','Login\x20cancelled','1337DcCMst','2767518WNgLzE','1574YxPpzl','email','us01','671dNyKoW','892903FxwMod','✓\x20Authentication\x20successful\x20(User:\x20','OAuth\x20login\x20is\x20not\x20yet\x20available\x20for\x20site:\x20','bold','1870242gVIwsT','\x20\x20tdx','green','getUserInfo','43768LpyVQs','jobs','execute','Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.','Validating\x20OAuth\x20tokens...','description','OAuth\x20is\x20currently\x20supported\x20on\x20dev-us01\x20and\x20dev-eu01\x20only.\x20','profile'];a8_0x187f=function(){return _0x569aa2;};return a8_0x187f();}import{getConsoleUrl}from'../sdk/client/endpoints.js';import{isKeychainAvailable}from'../core/keychain.js';import{saveOAuthTokens}from'../core/oauth-keychain.js';import{startOAuthFlow,isOAuthSupported}from'../core/oauth.js';import{promptSiteSelection}from'../core/constants.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a8_0x555dcd from'chalk';export async function runOAuthLoginFlow(_0x24b386,_0x1c182e,_0x38c2a8){const _0x3d7c8a=a8_0x2858;if(!isOAuthSupported(_0x24b386))throw new Error(_0x3d7c8a(0xcf)+_0x24b386+'.\x20'+_0x3d7c8a(0xb2)+'Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.');const _0x1bd3c3=await isKeychainAvailable();if(!_0x1bd3c3)throw new Error(_0x3d7c8a(0xbc)+_0x3d7c8a(0xaf));const _0x5af53e=getConsoleUrl(_0x24b386);console[_0x3d7c8a(0xbd)](_0x3d7c8a(0xb5)),console[_0x3d7c8a(0xbd)]('\x20\x20'+_0x5af53e+'/oauth/authorize'),console[_0x3d7c8a(0xbd)]('Waiting\x20for\x20authorization\x20(timeout:\x202\x20minutes)...');const _0xd395fa=await startOAuthFlow(_0x24b386);console[_0x3d7c8a(0xbd)](_0x3d7c8a(0xb0));const _0x419403=TDX['create']({'site':_0x24b386,'accessToken':_0xd395fa['access_token'],'logLevel':_0x38c2a8??LogLevel['ERROR']}),_0x53e490=await _0x419403[_0x3d7c8a(0xd6)][_0x3d7c8a(0xd4)]();console[_0x3d7c8a(0xbd)](a8_0x555dcd[_0x3d7c8a(0xd3)](_0x3d7c8a(0xce)+_0x53e490[_0x3d7c8a(0xca)]+')')),await saveOAuthTokens(_0xd395fa,_0x1c182e),console[_0x3d7c8a(0xbd)]('✓\x20OAuth\x20tokens\x20saved\x20to\x20system\x20keychain'+(_0x1c182e?'\x20(profile:\x20'+_0x1c182e+')':''));if(_0x1c182e){const _0x1edb63={'site':_0x24b386};saveProfileToUserConfig(_0x1c182e,_0x1edb63),console[_0x3d7c8a(0xbd)](_0x3d7c8a(0xc5)+_0x1c182e+_0x3d7c8a(0xb7));}const _0x4ae729=_0x1c182e?'\x20--profile\x20'+_0x1c182e:'';console['log'](),console[_0x3d7c8a(0xbd)]('You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:'),console[_0x3d7c8a(0xbd)](_0x3d7c8a(0xd2)+_0x4ae729+'\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication'),console['log'](_0x3d7c8a(0xd2)+_0x4ae729+_0x3d7c8a(0xb4));}export class AuthLoginCommand extends BaseCommand{[a8_0x1f3c3c(0xbf)]=a8_0x1f3c3c(0xbe);[a8_0x1f3c3c(0xb1)]=a8_0x1f3c3c(0xc1);async[a8_0x1f3c3c(0xae)](_0x24239d){const _0x567f09=a8_0x1f3c3c,{options:_0x3c86fd}=_0x24239d,_0x5d14c8=_0x3c86fd[_0x567f09(0xb3)];console['log'](a8_0x555dcd[_0x567f09(0xd0)]('tdx:\x20auth\x20login'));const _0x634efe=_0x3c86fd[_0x567f09(0xc3)]||_0x567f09(0xcb),_0x5bc40b=await promptSiteSelection(_0x634efe,_0x5d14c8,_0x567f09(0xc6));if(!_0x5bc40b)return 0x1;const _0xd3343a=resolveSite(_0x5bc40b);return console[_0x567f09(0xbd)](_0x567f09(0xb9)+_0xd3343a),await runOAuthLoginFlow(_0xd3343a,_0x5d14c8,_0x3c86fd[_0x567f09(0xc2)]??LogLevel[_0x567f09(0xba)]),0x0;}}
|