@treasuredata/tdx 2026.3.12 → 2026.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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/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/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
|
+
function a3_0x2f92(){const _0x399940=['List\x20activations\x20for\x20a\x20segment','\x20\x20Cause:\x20','✔\x20Found\x20','5325939UdcaSF','execute','Listing\x20activations\x20for\x20segment\x20\x27','6534FDVool','2SKtKDN','message','3718568QsVcJs','1149872EGKaQc','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','697760QzZNSt','Resolved\x20child\x20ID:\x20','data','2513CQDUaa','10GNkwER','cause','listActivations','segment','error','Resolving\x20child\x20segment\x20\x27','\x20activation','activations','Error:\x20Segment\x20name\x20is\x20required','verbose','Resolved\x20parent\x20ID:\x20','description','site','resolveSegmentId','name','518781Gourkr','length','\x27...','Parent\x20name:\x20','Child\x20name:\x20','Resolving\x20parent\x20segment\x20\x27','95481khbiDV'];a3_0x2f92=function(){return _0x399940;};return a3_0x2f92();}const a3_0x4d28e6=a3_0x1b10;(function(_0x549c65,_0x2a594b){const _0x24f714=a3_0x1b10,_0x1b3a66=_0x549c65();while(!![]){try{const _0x707b23=-parseInt(_0x24f714(0x129))/0x1*(parseInt(_0x24f714(0x131))/0x2)+-parseInt(_0x24f714(0x123))/0x3+-parseInt(_0x24f714(0x134))/0x4+parseInt(_0x24f714(0x136))/0x5+parseInt(_0x24f714(0x130))/0x6*(-parseInt(_0x24f714(0x139))/0x7)+parseInt(_0x24f714(0x133))/0x8+-parseInt(_0x24f714(0x12d))/0x9*(-parseInt(_0x24f714(0x13a))/0xa);if(_0x707b23===_0x2a594b)break;else _0x1b3a66['push'](_0x1b3a66['shift']());}catch(_0x365728){_0x1b3a66['push'](_0x1b3a66['shift']());}}}(a3_0x2f92,0x3cde5));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';function a3_0x1b10(_0x13948a,_0x32fa78){_0x13948a=_0x13948a-0x123;const _0x2f9281=a3_0x2f92();let _0x1b104a=_0x2f9281[_0x13948a];return _0x1b104a;}import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0x4d28e6(0x148)]=a3_0x4d28e6(0x141);[a3_0x4d28e6(0x145)]=a3_0x4d28e6(0x12a);async[a3_0x4d28e6(0x12e)](_0x393192){const _0x5901ec=a3_0x4d28e6,{options:_0xd567cb,args:_0x3cc7dd,tdx:_0x2ca83c}=_0x393192;if(_0x3cc7dd['length']===0x0)return console[_0x5901ec(0x13e)](_0x5901ec(0x142)),console[_0x5901ec(0x13e)](_0x5901ec(0x135)),0x1;try{const {parentId:_0x18d33f,childId:_0x38c459}=parseSegmentRef(_0x3cc7dd[0x0]);if(!_0x38c459)return console['error']('Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations'),console['error']('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;_0xd567cb[_0x5901ec(0x143)]&&(console['error']('Site:\x20'+_0xd567cb[_0x5901ec(0x146)]),console['error'](_0x5901ec(0x126)+_0x18d33f),console[_0x5901ec(0x13e)](_0x5901ec(0x127)+_0x38c459));const _0x1f3e0f=await withSpinner(_0x5901ec(0x128)+_0x18d33f+_0x5901ec(0x125),()=>_0x2ca83c['segment']['resolveParentId'](_0x18d33f),{'verbose':_0xd567cb[_0x5901ec(0x143)]}),_0x1e63fb=_0x1f3e0f[_0x5901ec(0x138)];_0xd567cb[_0x5901ec(0x143)]&&console[_0x5901ec(0x13e)](_0x5901ec(0x144)+_0x1e63fb);const _0x922807=await withSpinner(_0x5901ec(0x13f)+_0x38c459+'\x27...',()=>_0x2ca83c[_0x5901ec(0x13d)][_0x5901ec(0x147)](_0x1e63fb,_0x38c459),{'verbose':_0xd567cb[_0x5901ec(0x143)]}),_0x3bc7a5=_0x922807[_0x5901ec(0x138)];_0xd567cb[_0x5901ec(0x143)]&&console[_0x5901ec(0x13e)](_0x5901ec(0x137)+_0x3bc7a5);const _0x2bf9f2=await withSpinner(_0x5901ec(0x12f)+_0x38c459+'\x27...',()=>_0x2ca83c[_0x5901ec(0x13d)][_0x5901ec(0x13c)](_0x1e63fb,_0x3bc7a5),{'verbose':_0xd567cb['verbose']}),_0x40f270=_0x2bf9f2['data'];return console[_0x5901ec(0x13e)](_0x5901ec(0x12c)+_0x40f270[_0x5901ec(0x124)]+_0x5901ec(0x140)+(_0x40f270[_0x5901ec(0x124)]!==0x1?'s':'')),await handleSDKOutput(_0x40f270,_0xd567cb),0x0;}catch(_0x3a4588){if(_0x3a4588 instanceof SDKError)return console[_0x5901ec(0x13e)]('Error:\x20'+_0x3a4588[_0x5901ec(0x132)]),_0x3a4588[_0x5901ec(0x13b)]&&console[_0x5901ec(0x13e)](_0x5901ec(0x12b)+_0x3a4588['cause']),0x1;throw _0x3a4588;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4_0x468322=a4_0x4f28;(function(_0x41f446,_0x5c5771){const _0x595e90=a4_0x4f28,_0x13a419=_0x41f446();while(!![]){try{const _0x4d5503=parseInt(_0x595e90(0x1eb))/0x1*(-parseInt(_0x595e90(0x1a9))/0x2)+-parseInt(_0x595e90(0x19c))/0x3*(-parseInt(_0x595e90(0x1cc))/0x4)+parseInt(_0x595e90(0x236))/0x5+parseInt(_0x595e90(0x234))/0x6*(-parseInt(_0x595e90(0x1e0))/0x7)+-parseInt(_0x595e90(0x204))/0x8+-parseInt(_0x595e90(0x22c))/0x9+parseInt(_0x595e90(0x1c5))/0xa*(parseInt(_0x595e90(0x1ff))/0xb);if(_0x4d5503===_0x5c5771)break;else _0x13a419['push'](_0x13a419['shift']());}catch(_0x1b148d){_0x13a419['push'](_0x13a419['shift']());}}}(a4_0x4e19,0x5a5ba));import a4_0x47f33c from'chalk';import a4_0x1a16d8 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_0x4f28(_0x49d73f,_0x22f73e){_0x49d73f=_0x49d73f-0x179;const _0x4e19d8=a4_0x4e19();let _0x4f2875=_0x4e19d8[_0x49d73f];return _0x4f2875;}import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';function a4_0x4e19(){const _0x354204=['Cannot\x20clone\x20from\x20context\x20project\x20\x22','✔\x20Context\x20set:\x20','Agent\x20','\x0aChanges:','Summary:','agent','prompts','\x20changed','cwd-config','\x0aPull\x20summary\x20for\x20\x27','\x0aError:','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','Would\x20pull\x20agent:\x20','Output\x20path:\x20','cyan','found','outputPath','Agent\x20pulled\x20successfully','\x20|\x20','execute','projectId','2692017JpsHNH','Cancelled','\x0aProject\x20pushed\x20with\x20errors','hasChanges','MISSING_ARGUMENT','action','\x20\x20Target:\x20','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','37626OxaOwH','Pushing\x20to\x20project...','1838410UIFLPA','yes','cloneProject','knowledgeBases','agentId','\x20\x20Integration\x20\x22','Pulling\x20agent\x20\x22','push','New\x20project\x20name\x20is\x20required','profile','\x20\x20Experimental\x20Artifacts:\x20','Agent:\x20','\x0aChanges\x20to\x20prompt\x20\x27','\x27\x20to\x20create\x20the\x20folder\x20structure.','Source:\x20','New\x20project:\x20','\x20\x20Agent\x20\x22','name','\x20=\x20','<new-name>','agents','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','\x20\x20Knowledge\x20Bases:\x20','parse','\x22...','\x20\x20Knowledge\x20Base\x20\x22','projectName','llmProject','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','\x0a✔\x20Pushed\x20','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','outputDir','Errors:','isNew','\x20files?','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','site','18aIJyYj','\x0a✔\x20Pulled\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\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','agent:clone','\x20errors','diff','llm_project','Chat:\x20','\x20files\x20to\x20','pullAgent','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','-\x20nothing\x20pushed','4GmsZbW','New\x20project\x20ID:\x20','Using\x20project\x20from\x20','No\x20tdx.json\x20found\x20in\x20','\x20unchanged','yellow','\x20\x20Prompts:\x20','\x20successfully','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)','log','\x0aChanges\x20to\x20agent\x20\x27','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','\x20--profile\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','Status:\x20','integrations','\x22\x20to\x20new\x20project\x20\x22','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','reason','\x20\x20Text\x20Knowledge\x20Bases:\x20','created','\x20\x20Agents:\x20','\x20\x20Integrations:\x20','Analyzing\x20project\x20\x22','experimentalKnowledgeBases','INVALID_ARGUMENT','textKnowledgeBases','20krFcmY','\x20\x20Prompt\x20\x22','Project\x20cloned\x20successfully','\x20\x20Text\x20Knowledge\x20Base\x20\x22','arg-dir','red','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','148848hXwyRQ','unchanged','description','\x22:\x20','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','Using\x20local\x20project:\x20','counts','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','\x20\x20tdx\x20agent\x20pull\x20','gray','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','\x20created','agentName','updated','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','Failed\x20to\x20push\x20agent:\x20','green','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','dryRun','Project:\x20','665IgWDqi','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','error','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','Clone\x20\x22','cwd','Using\x20project:\x20','Dry\x20run\x20-\x20no\x20files\x20written','Would\x20clone:','\x22\x20from\x20project\x20\x22','\x0aWrite\x20','310809LjrfeG','force','pushProject','tdx.json','source','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','dim','agent.yml','join','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','dirname','errors','\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\x20Source:\x20','new','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','\x0aPush\x20summary\x20for\x20\x27','pullProject','\x20new','10642610HzkNmf','total','repeat','Using\x20current\x20project:\x20','agent:pull','5115136gqCYAE','no_context','Project\x20cloned\x20with\x20errors','Would\x20push\x20agent:\x20','experimentalArtifacts','\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','sourceProjectName','\x0aChanges\x20to\x20integration\x20\x27','-\x20no\x20files\x20written','llm','newProjectId','output','\x22\x20to\x20\x22','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','Using\x20project\x20from\x20context:\x20','Using\x20context\x20project:\x20','agent:push','session','\x20\x20tdx\x20agent\x20clone\x20agents/'];a4_0x4e19=function(){return _0x354204;};return a4_0x4e19();}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(_0x5b7f57){const _0x134a11=a4_0x4f28,_0x339dc6=[];if(_0x5b7f57['total']!==undefined)_0x339dc6[_0x134a11(0x17e)](_0x5b7f57['total']+'\x20total');if(_0x5b7f57[_0x134a11(0x1f9)]!==undefined&&_0x5b7f57['new']>0x0)_0x339dc6['push'](a4_0x47f33c['green'](_0x5b7f57[_0x134a11(0x1f9)]+_0x134a11(0x1fe)));if(_0x5b7f57[_0x134a11(0x1be)]!==undefined&&_0x5b7f57[_0x134a11(0x1be)]>0x0)_0x339dc6[_0x134a11(0x17e)](a4_0x47f33c['green'](_0x5b7f57[_0x134a11(0x1be)]+_0x134a11(0x1d7)));if(_0x5b7f57[_0x134a11(0x1d9)]!==undefined&&_0x5b7f57[_0x134a11(0x1d9)]>0x0)_0x339dc6[_0x134a11(0x17e)](a4_0x47f33c[_0x134a11(0x1ae)](_0x5b7f57[_0x134a11(0x1d9)]+'\x20updated'));if(_0x5b7f57['unchanged']!==undefined&&_0x5b7f57[_0x134a11(0x1cd)]>0x0)_0x339dc6[_0x134a11(0x17e)](a4_0x47f33c[_0x134a11(0x1d5)](_0x5b7f57[_0x134a11(0x1cd)]+_0x134a11(0x1ad)));if(_0x5b7f57[_0x134a11(0x1f6)]!==undefined&&_0x5b7f57[_0x134a11(0x1f6)]>0x0)_0x339dc6['push'](a4_0x47f33c[_0x134a11(0x1ca)](_0x5b7f57[_0x134a11(0x1f6)]+_0x134a11(0x1a1)));return _0x339dc6[_0x134a11(0x1f3)](',\x20');}function displayDiffs(_0x49cb71,_0x1c927e,_0x8a992,_0x68265d,_0x4fae26,_0x3e90c0,_0x5ea0d9){const _0x3d036f=a4_0x4f28;for(const _0x5a4b9b of _0x49cb71){if(_0x5a4b9b[_0x3d036f(0x1a2)]){const _0x1be630=_0x5a4b9b['agentName']||_0x5a4b9b[_0x3d036f(0x188)];console[_0x3d036f(0x1b2)](_0x3d036f(0x1b3)+_0x1be630+'\x27:'),console[_0x3d036f(0x1b2)]('─'[_0x3d036f(0x201)](0x3c)),console['log'](_0x5a4b9b[_0x3d036f(0x1a2)]),console['log']('─'['repeat'](0x3c));}}for(const _0x36bafa of _0x1c927e){_0x36bafa['diff']&&(console[_0x3d036f(0x1b2)](_0x3d036f(0x193)+_0x36bafa[_0x3d036f(0x188)]+'\x27:'),console['log']('─'[_0x3d036f(0x201)](0x3c)),console[_0x3d036f(0x1b2)](_0x36bafa[_0x3d036f(0x1a2)]),console['log']('─'[_0x3d036f(0x201)](0x3c)));}for(const _0x246289 of _0x8a992){_0x246289[_0x3d036f(0x1a2)]&&(console['log'](_0x3d036f(0x1f4)+_0x246289[_0x3d036f(0x188)]+'\x27:'),console['log']('─'[_0x3d036f(0x201)](0x3c)),console[_0x3d036f(0x1b2)](_0x246289[_0x3d036f(0x1a2)]),console[_0x3d036f(0x1b2)]('─'['repeat'](0x3c)));}for(const _0x185b9e of _0x68265d){_0x185b9e['diff']&&(console[_0x3d036f(0x1b2)](_0x3d036f(0x183)+_0x185b9e[_0x3d036f(0x188)]+'\x27:'),console[_0x3d036f(0x1b2)]('─'['repeat'](0x3c)),console[_0x3d036f(0x1b2)](_0x185b9e['diff']),console[_0x3d036f(0x1b2)]('─'[_0x3d036f(0x201)](0x3c)));}for(const _0x3e2d16 of _0x4fae26){_0x3e2d16[_0x3d036f(0x1a2)]&&(console['log'](_0x3d036f(0x20b)+_0x3e2d16['name']+'\x27:'),console[_0x3d036f(0x1b2)]('─'[_0x3d036f(0x201)](0x3c)),console[_0x3d036f(0x1b2)](_0x3e2d16[_0x3d036f(0x1a2)]),console[_0x3d036f(0x1b2)]('─'[_0x3d036f(0x201)](0x3c)));}for(const _0x23494f of _0x3e90c0){_0x23494f[_0x3d036f(0x1a2)]&&(console[_0x3d036f(0x1b2)](_0x3d036f(0x195)+_0x23494f['name']+'\x27:'),console['log']('─'[_0x3d036f(0x201)](0x3c)),console[_0x3d036f(0x1b2)](_0x23494f['diff']),console[_0x3d036f(0x1b2)]('─'[_0x3d036f(0x201)](0x3c)));}for(const _0x1c3146 of _0x5ea0d9){_0x1c3146[_0x3d036f(0x1a2)]&&(console[_0x3d036f(0x1b2)]('\x0aChanges\x20to\x20experimental\x20artifact\x20\x27'+_0x1c3146['name']+'\x27:'),console[_0x3d036f(0x1b2)]('─'['repeat'](0x3c)),console[_0x3d036f(0x1b2)](_0x1c3146[_0x3d036f(0x1a2)]),console['log']('─'['repeat'](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']=a4_0x468322(0x203);[a4_0x468322(0x1ce)]=a4_0x468322(0x1cb);async['execute'](_0x4c3f01){const _0x33ec46=a4_0x468322,{options:_0x3801cf,args:_0x23cf12,tdx:_0x15b246}=_0x4c3f01,_0x542ce5=_0x23cf12[0x0],_0x25660e=_0x23cf12[0x1],_0x30b30c=_0x3801cf[_0x33ec46(0x20f)],_0x1f7461=_0x3801cf[_0x33ec46(0x1de)],_0x408db7=_0x3801cf[_0x33ec46(0x1ec)],_0x493ac1=_0x3801cf[_0x33ec46(0x237)],_0xb4cd9f=_0x3801cf['llmProject'],_0x38dffd=_0x3801cf[_0x33ec46(0x21c)];let _0x30151f;if(_0x542ce5){const _0x314578=a4_0x1a16d8[_0x33ec46(0x1f3)](_0x542ce5,'tdx.json');if(existsSync(_0x314578))try{const _0x2b4878=JSON['parse'](readFileSync(_0x314578,'utf-8'));_0x2b4878[_0x33ec46(0x1a3)]&&(_0x30151f={'llm_project':_0x2b4878[_0x33ec46(0x1a3)]});}catch{}}const _0x19120b=findAgentConfigPath(process[_0x33ec46(0x1e5)]());let _0x26a01a;if(_0x19120b)try{const _0x3aca7f=JSON[_0x33ec46(0x18e)](readFileSync(_0x19120b,'utf-8'));_0x3aca7f[_0x33ec46(0x1a3)]&&(_0x26a01a={'llm_project':_0x3aca7f['llm_project']});}catch{}const _0xf78d9c=resolveAgentPullArgs({'arg':_0x542ce5,'agentNameArg':_0x25660e,'agentFlag':_0x38dffd,'contextProject':_0xb4cd9f,'argDirConfig':_0x30151f,'cwdConfigPath':_0x19120b||undefined,'cwdConfig':_0x26a01a}),{projectNameOrId:_0x434f84,targetAgentName:_0x68dcae,existingOutputDir:_0x39e48c,source:_0x2687fa}=_0xf78d9c;if(_0x2687fa===_0x33ec46(0x1c9))console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1f1)](_0x33ec46(0x1ab)+a4_0x1a16d8[_0x33ec46(0x1f3)](_0x542ce5,_0x33ec46(0x1ee))+':\x20'+_0x434f84));else{if(_0x2687fa===_0x33ec46(0x21f))console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1f1)]('Using\x20project:\x20'+_0x434f84));else _0x2687fa==='context'&&console['log'](a4_0x47f33c['dim'](_0x33ec46(0x212)+_0x434f84));}if(!_0x434f84)return _0x38dffd?(console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1ae)](_0x33ec46(0x1fa))),console[_0x33ec46(0x1b2)](_0x33ec46(0x19a)),console[_0x33ec46(0x1b2)](_0x33ec46(0x1d0))):(console[_0x33ec46(0x1b2)](a4_0x47f33c['yellow'](_0x33ec46(0x1d3))),console[_0x33ec46(0x1b2)](_0x33ec46(0x1b1)),console[_0x33ec46(0x1b2)](_0x33ec46(0x209)),console[_0x33ec46(0x1b2)](_0x33ec46(0x1f7)),console[_0x33ec46(0x1b2)](_0x33ec46(0x19f)),console[_0x33ec46(0x1b2)]('\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')),0x1;if(_0x68dcae){const {data:_0x265a84}=await withSpinner(_0x33ec46(0x17d)+_0x68dcae+_0x33ec46(0x1e9)+_0x434f84+_0x33ec46(0x18f),()=>_0x15b246[_0x33ec46(0x20d)][_0x33ec46(0x1a6)](_0x434f84,_0x68dcae,_0x30b30c,{'dryRun':_0x1f7461,'force':_0x408db7}));if(_0x1f7461)return console[_0x33ec46(0x1b2)](a4_0x47f33c['yellow'](_0x33ec46(0x1e7))),console[_0x33ec46(0x1b2)](_0x33ec46(0x223)+_0x265a84[_0x33ec46(0x1d8)]),console[_0x33ec46(0x1b2)](_0x33ec46(0x224)+_0x265a84[_0x33ec46(0x227)]),_0x265a84[_0x33ec46(0x1a2)]&&(console[_0x33ec46(0x1b2)](_0x33ec46(0x21a)),console['log']('─'['repeat'](0x3c)),console[_0x33ec46(0x1b2)](_0x265a84[_0x33ec46(0x1a2)]),console[_0x33ec46(0x1b2)]('─'[_0x33ec46(0x201)](0x3c))),0x0;return console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1dc)](_0x33ec46(0x228))),console[_0x33ec46(0x1b2)](_0x33ec46(0x182)+_0x265a84[_0x33ec46(0x1d8)]),console[_0x33ec46(0x1b2)]('Output:\x20'+_0x265a84[_0x33ec46(0x227)]),console['log'](_0x33ec46(0x1b8)+(_0x265a84[_0x33ec46(0x198)]?a4_0x47f33c['green'](_0x33ec46(0x1f9)):_0x265a84[_0x33ec46(0x22f)]?a4_0x47f33c[_0x33ec46(0x1ae)](_0x33ec46(0x1d9)):a4_0x47f33c[_0x33ec46(0x1d5)](_0x33ec46(0x1cd)))),0x0;}const _0x3e8db9=_0x39e48c||_0x30b30c,{data:_0x25e8b1}=await withSpinner(_0x33ec46(0x1c1)+_0x434f84+'\x22...',()=>_0x15b246[_0x33ec46(0x20d)][_0x33ec46(0x1fd)](_0x434f84,_0x3e8db9,{'dryRun':!![]})),_0x2807a9=_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x18b)]['new']+_0x25e8b1['counts']['knowledgeBases'][_0x33ec46(0x1f9)]+_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x1c4)][_0x33ec46(0x1f9)]+_0x25e8b1['counts'][_0x33ec46(0x21d)]['new']+_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x1b9)][_0x33ec46(0x1f9)]+_0x25e8b1['counts'][_0x33ec46(0x1c2)][_0x33ec46(0x1f9)]+_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x208)][_0x33ec46(0x1f9)],_0xbc69ef=_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x18b)]['updated']+_0x25e8b1['counts'][_0x33ec46(0x17a)]['updated']+_0x25e8b1[_0x33ec46(0x1d2)]['textKnowledgeBases'][_0x33ec46(0x1d9)]+_0x25e8b1[_0x33ec46(0x1d2)]['prompts'][_0x33ec46(0x1d9)]+_0x25e8b1[_0x33ec46(0x1d2)]['integrations']['updated']+_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x1c2)][_0x33ec46(0x1d9)]+_0x25e8b1[_0x33ec46(0x1d2)]['experimentalArtifacts'][_0x33ec46(0x1d9)],_0x1428b4=_0x25e8b1['counts'][_0x33ec46(0x18b)]['unchanged']+_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x17a)][_0x33ec46(0x1cd)]+_0x25e8b1['counts']['textKnowledgeBases'][_0x33ec46(0x1cd)]+_0x25e8b1[_0x33ec46(0x1d2)]['prompts'][_0x33ec46(0x1cd)]+_0x25e8b1['counts']['integrations'][_0x33ec46(0x1cd)]+_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x1c2)]['unchanged']+_0x25e8b1[_0x33ec46(0x1d2)]['experimentalArtifacts'][_0x33ec46(0x1cd)];console[_0x33ec46(0x1b2)](_0x33ec46(0x220)+_0x25e8b1[_0x33ec46(0x191)]+'\x27:'),console[_0x33ec46(0x1b2)]('\x20\x20'+a4_0x47f33c[_0x33ec46(0x1dc)]('+\x20'+_0x2807a9+_0x33ec46(0x1fe))+_0x33ec46(0x229)+a4_0x47f33c[_0x33ec46(0x1ae)]('~\x20'+_0xbc69ef+_0x33ec46(0x21e))+_0x33ec46(0x229)+a4_0x47f33c[_0x33ec46(0x1f1)]('=\x20'+_0x1428b4+'\x20unchanged')),console[_0x33ec46(0x1b2)](_0x33ec46(0x1bf)+formatCountSummary(_0x25e8b1[_0x33ec46(0x1d2)]['agents'])),console[_0x33ec46(0x1b2)](_0x33ec46(0x18d)+formatCountSummary(_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x17a)])),console[_0x33ec46(0x1b2)](_0x33ec46(0x1bd)+formatCountSummary(_0x25e8b1['counts']['textKnowledgeBases'])),console[_0x33ec46(0x1b2)](_0x33ec46(0x1af)+formatCountSummary(_0x25e8b1[_0x33ec46(0x1d2)]['prompts'])),console[_0x33ec46(0x1b2)](_0x33ec46(0x1c0)+formatCountSummary(_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x1b9)]));const _0x409888=_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x1c2)][_0x33ec46(0x200)]>0x0||_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x208)][_0x33ec46(0x200)]>0x0;_0x409888&&(console[_0x33ec46(0x1b2)](_0x33ec46(0x222)+formatCountSummary(_0x25e8b1['counts'][_0x33ec46(0x1c2)])),console['log'](_0x33ec46(0x181)+formatCountSummary(_0x25e8b1[_0x33ec46(0x1d2)][_0x33ec46(0x208)])));console[_0x33ec46(0x1b2)](_0x33ec46(0x232)+a4_0x47f33c[_0x33ec46(0x225)](_0x25e8b1[_0x33ec46(0x196)])),displayDiffs(_0x25e8b1[_0x33ec46(0x18b)],_0x25e8b1[_0x33ec46(0x17a)],_0x25e8b1['textKnowledgeBases'],_0x25e8b1['prompts'],_0x25e8b1[_0x33ec46(0x1b9)],_0x25e8b1['experimentalKnowledgeBases'],_0x25e8b1[_0x33ec46(0x208)]);if(_0x1f7461)return console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1ae)](_0x33ec46(0x1a7))),0x0;if(_0x2807a9===0x0&&_0xbc69ef===0x0)return console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1dc)](_0x33ec46(0x233))),saveSessionContext({'llm_project':_0x25e8b1['projectName']},_0x3801cf[_0x33ec46(0x215)]),console[_0x33ec46(0x1b2)](a4_0x47f33c['green']('✔\x20Context\x20set:\x20'+a4_0x47f33c['dim'](_0x33ec46(0x1a3))+'\x20=\x20'+a4_0x47f33c[_0x33ec46(0x225)](_0x25e8b1['projectName']))),0x0;if(!_0x493ac1&&!_0x408db7){if(!isInteractive())return console['error'](a4_0x47f33c[_0x33ec46(0x1ca)]('\x0aError:'),_0x33ec46(0x19e)),console[_0x33ec46(0x1e2)](a4_0x47f33c[_0x33ec46(0x1f1)](_0x33ec46(0x1b7))),0x1;const _0x1d074e=await confirmKey(_0x33ec46(0x1ea)+(_0x2807a9+_0xbc69ef)+_0x33ec46(0x199));if(!_0x1d074e)return console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1ae)](_0x33ec46(0x22d)),_0x33ec46(0x20c)),0x1;}const {data:_0x36cef7}=await withSpinner('Writing\x20files...',()=>_0x15b246['llm'][_0x33ec46(0x1fd)](_0x434f84,_0x3e8db9,{'force':_0x408db7}));return console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1dc)](_0x33ec46(0x19d)+(_0x2807a9+_0xbc69ef)+_0x33ec46(0x1a5)+_0x36cef7[_0x33ec46(0x196)])),saveSessionContext({'llm_project':_0x36cef7[_0x33ec46(0x191)]},_0x3801cf[_0x33ec46(0x215)]),console[_0x33ec46(0x1b2)](a4_0x47f33c[_0x33ec46(0x1dc)](_0x33ec46(0x218)+a4_0x47f33c[_0x33ec46(0x1f1)](_0x33ec46(0x1a3))+_0x33ec46(0x189)+a4_0x47f33c[_0x33ec46(0x225)](_0x36cef7[_0x33ec46(0x191)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{['name']=a4_0x468322(0x1a0);[a4_0x468322(0x1ce)]=a4_0x468322(0x1e1);async[a4_0x468322(0x22a)](_0x3b24c9){const _0x3d012a=a4_0x468322,{options:_0x10b17d,args:_0x1f9fb0,tdx:_0x302bdb}=_0x3b24c9,_0x2e9765=_0x1f9fb0[0x0],_0x50ca4f=_0x10b17d[_0x3d012a(0x188)],_0x1dc194=_0x10b17d[_0x3d012a(0x1de)],_0x1e464c=_0x10b17d[_0x3d012a(0x237)],_0x332e3a=_0x10b17d[_0x3d012a(0x19b)],_0xf6bbb2=_0x10b17d[_0x3d012a(0x192)];let _0x54a641;const _0x77c670=findAgentConfigPath(process[_0x3d012a(0x1e5)]());if(_0x2e9765){const _0xe3b4d5=a4_0x1a16d8[_0x3d012a(0x1f3)](_0x2e9765,_0x3d012a(0x1ee));existsSync(_0xe3b4d5)?(_0x54a641=_0x2e9765,console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1f1)]('Using\x20local\x20project:\x20'+_0x2e9765))):_0x54a641=_0x2e9765;}else{if(_0x77c670)_0x54a641=a4_0x1a16d8[_0x3d012a(0x1f5)](_0x77c670),console[_0x3d012a(0x1b2)](a4_0x47f33c['dim'](_0x3d012a(0x202)+_0x54a641));else{if(_0xf6bbb2){const _0xdab222=sanitizeForFilesystem(_0xf6bbb2);let _0x28033e=_0xdab222,_0x16e7dd=a4_0x1a16d8['join'](process['cwd'](),_0x3d012a(0x18b),_0xdab222,_0x3d012a(0x1ee));if(!existsSync(_0x16e7dd)){const _0x180265=normalizeName(_0xf6bbb2),_0x231e58=a4_0x1a16d8[_0x3d012a(0x1f3)](process[_0x3d012a(0x1e5)](),_0x3d012a(0x18b),_0x180265,_0x3d012a(0x1ee));existsSync(_0x231e58)&&(_0x28033e=_0x180265,_0x16e7dd=_0x231e58);}if(existsSync(_0x16e7dd))_0x54a641=a4_0x1a16d8[_0x3d012a(0x1f5)](_0x16e7dd),console['log'](a4_0x47f33c['dim'](_0x3d012a(0x1d1)+_0x54a641));else{const _0x284357=_0x10b17d[_0x3d012a(0x180)];if(_0x284357)throw new SDKError(ErrorCode[_0x3d012a(0x1c3)],_0x3d012a(0x217)+_0xf6bbb2+'\x22\x20to\x20a\x20different\x20profile',undefined,{'helpText':_0x3d012a(0x1bb)+_0x3d012a(0x1d6)+(_0x3d012a(0x1d4)+_0xf6bbb2+'\x0a')+(_0x3d012a(0x216)+_0x28033e+'\x20--name\x20'+(_0x50ca4f||_0x3d012a(0x18a))+_0x3d012a(0x1b6)+_0x284357)});_0x54a641=_0xf6bbb2,console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1f1)](_0x3d012a(0x213)+_0xf6bbb2));}}}}if(!_0x54a641)return console['log'](a4_0x47f33c[_0x3d012a(0x1ae)]('No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a')),console[_0x3d012a(0x1b2)]('\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project'),console[_0x3d012a(0x1b2)](_0x3d012a(0x1da)),console['log']('\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['log'](_0x3d012a(0x1dd)),0x1;if(!_0x50ca4f)throw new SDKError(ErrorCode[_0x3d012a(0x230)],_0x3d012a(0x17f),undefined,{'helpText':_0x3d012a(0x1b4)});if(!_0x1e464c&&!_0x1dc194){if(!isInteractive())return console[_0x3d012a(0x1e2)](a4_0x47f33c['red'](_0x3d012a(0x221)),_0x3d012a(0x19e)),console['error'](a4_0x47f33c[_0x3d012a(0x1f1)](_0x3d012a(0x1b7))),0x1;const _0x374066=await confirmKey(_0x3d012a(0x1e4)+_0x54a641+_0x3d012a(0x1ba)+_0x50ca4f+'\x22?');if(!_0x374066)return console[_0x3d012a(0x1b2)](a4_0x47f33c['yellow'](_0x3d012a(0x22d))),0x1;}const {data:_0x5b7cf2}=await withSpinner('Cloning\x20\x22'+_0x54a641+_0x3d012a(0x210)+_0x50ca4f+'\x22...',()=>_0x302bdb[_0x3d012a(0x20d)][_0x3d012a(0x179)](_0x54a641,_0x50ca4f,{'dryRun':_0x1dc194}));if(_0x1dc194){console['log'](a4_0x47f33c[_0x3d012a(0x1ae)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x3d012a(0x1b2)](_0x3d012a(0x185)+_0x5b7cf2[_0x3d012a(0x20a)]),console[_0x3d012a(0x1b2)](_0x3d012a(0x186)+_0x50ca4f),console[_0x3d012a(0x1b2)](_0x3d012a(0x1e8)),console['log'](_0x3d012a(0x1bf)+_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x18b)][_0x3d012a(0x1be)]),console['log'](_0x3d012a(0x18d)+_0x5b7cf2['counts'][_0x3d012a(0x17a)][_0x3d012a(0x1be)]),console[_0x3d012a(0x1b2)](_0x3d012a(0x1af)+_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x21d)][_0x3d012a(0x1be)]);const _0x44f455=_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x1c2)][_0x3d012a(0x1be)]>0x0||_0x5b7cf2[_0x3d012a(0x1d2)]['experimentalArtifacts'][_0x3d012a(0x1be)]>0x0;return _0x44f455&&(console['log'](_0x3d012a(0x222)+_0x5b7cf2['counts']['experimentalKnowledgeBases'][_0x3d012a(0x1be)]),console[_0x3d012a(0x1b2)](_0x3d012a(0x181)+_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x208)][_0x3d012a(0x1be)])),0x0;}const _0x471128=_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x18b)]['errors']>0x0||_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x17a)][_0x3d012a(0x1f6)]>0x0||_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x21d)][_0x3d012a(0x1f6)]>0x0||_0x5b7cf2['counts'][_0x3d012a(0x1c2)][_0x3d012a(0x1f6)]>0x0||_0x5b7cf2['counts'][_0x3d012a(0x208)][_0x3d012a(0x1f6)]>0x0;_0x471128?console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1ae)](_0x3d012a(0x206))):console['log'](a4_0x47f33c[_0x3d012a(0x1dc)](_0x3d012a(0x1c7)));console[_0x3d012a(0x1b2)](_0x3d012a(0x185)+_0x5b7cf2[_0x3d012a(0x20a)]),console[_0x3d012a(0x1b2)](_0x3d012a(0x186)+_0x5b7cf2['newProjectName']),console[_0x3d012a(0x1b2)](_0x3d012a(0x1aa)+_0x5b7cf2[_0x3d012a(0x20e)]),console['log'](),console[_0x3d012a(0x1b2)](_0x3d012a(0x21b)),console[_0x3d012a(0x1b2)]('\x20\x20Agents:\x20'+formatCountSummary(_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x18b)])),console['log'](_0x3d012a(0x18d)+formatCountSummary(_0x5b7cf2['counts']['knowledgeBases'])),console[_0x3d012a(0x1b2)](_0x3d012a(0x1af)+formatCountSummary(_0x5b7cf2['counts']['prompts'])),console[_0x3d012a(0x1b2)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x5b7cf2['counts']['integrations']));const _0x5cb32f=_0x5b7cf2[_0x3d012a(0x1d2)]['experimentalKnowledgeBases'][_0x3d012a(0x1be)]>0x0||_0x5b7cf2['counts']['experimentalKnowledgeBases']['updated']>0x0||_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x1c2)][_0x3d012a(0x1cd)]>0x0||_0x5b7cf2['counts'][_0x3d012a(0x208)][_0x3d012a(0x1be)]>0x0||_0x5b7cf2[_0x3d012a(0x1d2)]['experimentalArtifacts'][_0x3d012a(0x1d9)]>0x0||_0x5b7cf2[_0x3d012a(0x1d2)][_0x3d012a(0x208)][_0x3d012a(0x1cd)]>0x0;_0x5cb32f&&(console['log'](_0x3d012a(0x222)+formatCountSummary(_0x5b7cf2['counts'][_0x3d012a(0x1c2)])),console['log'](_0x3d012a(0x181)+formatCountSummary(_0x5b7cf2['counts'][_0x3d012a(0x208)])));if(_0x471128){console['log'](),console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1ca)](_0x3d012a(0x197)));for(const _0x20ee18 of _0x5b7cf2[_0x3d012a(0x18b)]){_0x20ee18[_0x3d012a(0x231)]===_0x3d012a(0x1e2)&&console['log'](a4_0x47f33c[_0x3d012a(0x1ca)](_0x3d012a(0x187)+_0x20ee18[_0x3d012a(0x1d8)]+_0x3d012a(0x1cf)+_0x20ee18[_0x3d012a(0x1e2)]));}for(const _0x190ffe of _0x5b7cf2['knowledgeBases']){_0x190ffe[_0x3d012a(0x231)]===_0x3d012a(0x1e2)&&console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1ca)](_0x3d012a(0x190)+_0x190ffe[_0x3d012a(0x188)]+_0x3d012a(0x1cf)+_0x190ffe[_0x3d012a(0x1e2)]));}for(const _0x4a1fe0 of _0x5b7cf2['prompts']){_0x4a1fe0[_0x3d012a(0x231)]===_0x3d012a(0x1e2)&&console['log'](a4_0x47f33c[_0x3d012a(0x1ca)]('\x20\x20Prompt\x20\x22'+_0x4a1fe0['name']+_0x3d012a(0x1cf)+_0x4a1fe0[_0x3d012a(0x1e2)]));}for(const _0x541d15 of _0x5b7cf2[_0x3d012a(0x1b9)]){_0x541d15[_0x3d012a(0x231)]===_0x3d012a(0x1e2)&&console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1ca)](_0x3d012a(0x17c)+_0x541d15['name']+_0x3d012a(0x1cf)+_0x541d15[_0x3d012a(0x1e2)]));}for(const _0x32a584 of _0x5b7cf2[_0x3d012a(0x1c2)]){_0x32a584['action']===_0x3d012a(0x1e2)&&console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1ca)](_0x3d012a(0x211)+_0x32a584['name']+'\x22:\x20'+_0x32a584[_0x3d012a(0x1e2)]));}for(const _0x27545c of _0x5b7cf2[_0x3d012a(0x208)]){_0x27545c['action']===_0x3d012a(0x1e2)&&console[_0x3d012a(0x1b2)](a4_0x47f33c[_0x3d012a(0x1ca)]('\x20\x20Experimental\x20Artifact\x20\x22'+_0x27545c[_0x3d012a(0x188)]+'\x22:\x20'+_0x27545c[_0x3d012a(0x1e2)]));}return 0x1;}console[_0x3d012a(0x1b2)]();const _0x94a397=getLLMProjectUrl(_0x332e3a,_0x5b7cf2[_0x3d012a(0x20e)]);return console['log'](_0x3d012a(0x1df)+a4_0x47f33c[_0x3d012a(0x225)](_0x94a397)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x468322(0x188)]=a4_0x468322(0x214);[a4_0x468322(0x1ce)]=a4_0x468322(0x18c);async[a4_0x468322(0x22a)](_0xfc529c){const _0x4eed85=a4_0x468322,{options:_0x3d5c7b,args:_0x132866,tdx:_0x1a1f63}=_0xfc529c;let _0x4050ac=_0x132866[0x0]||process[_0x4eed85(0x1e5)]();const _0x1f8578=_0x3d5c7b[_0x4eed85(0x1de)],_0x284782=_0x3d5c7b[_0x4eed85(0x1ec)],_0x465cf2=_0x3d5c7b[_0x4eed85(0x237)],_0x2c76cb=_0x3d5c7b[_0x4eed85(0x19b)],_0x142a7b=a4_0x1a16d8[_0x4eed85(0x1f3)](_0x4050ac,_0x4eed85(0x1f2)),_0x3cfdc1=existsSync(_0x142a7b);if(_0x3cfdc1){const {data:_0x184926}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x4050ac+'\x22...',()=>_0x1a1f63['llm']['pushAgent'](_0x4050ac,{'dryRun':_0x1f8578,'force':_0x284782}));if(_0x1f8578)return console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ae)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x4eed85(0x1b2)](_0x4eed85(0x207)+_0x184926[_0x4eed85(0x1d8)]),0x0;if(_0x184926[_0x4eed85(0x231)]===_0x4eed85(0x1e2))return console['log'](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x1db)+_0x184926[_0x4eed85(0x1e2)])),0x1;console['log'](a4_0x47f33c['green'](_0x4eed85(0x219)+_0x184926[_0x4eed85(0x231)]+_0x4eed85(0x1b0))),console['log'](_0x4eed85(0x182)+_0x184926[_0x4eed85(0x1d8)]);if(_0x184926[_0x4eed85(0x17b)]&&_0x184926[_0x4eed85(0x22b)]){const _0xa38a8=getLLMAgentChatUrl(_0x2c76cb,_0x184926[_0x4eed85(0x22b)],_0x184926['agentId']);console[_0x4eed85(0x1b2)](_0x4eed85(0x1a4)+a4_0x47f33c['cyan'](_0xa38a8));}return 0x0;}const _0x5beeda=_0x3d5c7b[_0x4eed85(0x192)],_0x26e0e9=resolveProjectFromContext(_0x4050ac,_0x5beeda);if(_0x26e0e9[_0x4eed85(0x226)])_0x4050ac=_0x26e0e9['projectDir'],_0x26e0e9[_0x4eed85(0x1ef)]==='context'&&console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1f1)](_0x4eed85(0x1e6)+_0x4050ac));else{let _0x267214=_0x4eed85(0x1fb);_0x26e0e9[_0x4eed85(0x1bc)]==='no_local_folder'&&(_0x267214=_0x26e0e9['message']+_0x4eed85(0x1e3)+_0x26e0e9['llmProject']+_0x4eed85(0x184));throw new SDKError(ErrorCode[_0x4eed85(0x1c3)],_0x26e0e9[_0x4eed85(0x1bc)]===_0x4eed85(0x205)?_0x26e0e9['message']:_0x4eed85(0x1ac)+_0x4050ac,undefined,{'helpText':_0x267214});}const {data:_0x3e07a7}=await withSpinner('Analyzing\x20changes\x20to\x20push...',()=>_0x1a1f63['llm'][_0x4eed85(0x1ed)](_0x4050ac,{'dryRun':!![]})),_0x436ebe=_0x3e07a7['counts'][_0x4eed85(0x18b)]['errors']>0x0;if(_0x436ebe){console['log'](a4_0x47f33c[_0x4eed85(0x1ca)]('\x0aErrors\x20found:'));for(const _0x109032 of _0x3e07a7[_0x4eed85(0x18b)]){_0x109032[_0x4eed85(0x231)]===_0x4eed85(0x1e2)&&console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x187)+_0x109032[_0x4eed85(0x1d8)]+_0x4eed85(0x1cf)+_0x109032[_0x4eed85(0x1e2)]));}return 0x1;}const _0x2cc85f=_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x18b)]['created']+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x17a)]['created']+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1c4)][_0x4eed85(0x1be)]+_0x3e07a7['counts']['prompts'][_0x4eed85(0x1be)]+_0x3e07a7[_0x4eed85(0x1d2)]['integrations'][_0x4eed85(0x1be)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1c2)][_0x4eed85(0x1be)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x208)][_0x4eed85(0x1be)],_0x10b001=_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x18b)][_0x4eed85(0x1d9)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x17a)][_0x4eed85(0x1d9)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1c4)]['updated']+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x21d)][_0x4eed85(0x1d9)]+_0x3e07a7['counts'][_0x4eed85(0x1b9)][_0x4eed85(0x1d9)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1c2)]['updated']+_0x3e07a7['counts'][_0x4eed85(0x208)][_0x4eed85(0x1d9)],_0x5d691d=_0x3e07a7['counts']['agents'][_0x4eed85(0x1cd)]+_0x3e07a7[_0x4eed85(0x1d2)]['knowledgeBases'][_0x4eed85(0x1cd)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1c4)][_0x4eed85(0x1cd)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x21d)][_0x4eed85(0x1cd)]+_0x3e07a7['counts'][_0x4eed85(0x1b9)][_0x4eed85(0x1cd)]+_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1c2)][_0x4eed85(0x1cd)]+_0x3e07a7['counts']['experimentalArtifacts']['unchanged'];console['log'](_0x4eed85(0x1fc)+_0x3e07a7[_0x4eed85(0x191)]+'\x27:'),console[_0x4eed85(0x1b2)]('\x20\x20'+a4_0x47f33c[_0x4eed85(0x1dc)]('+\x20'+_0x2cc85f+_0x4eed85(0x1fe))+_0x4eed85(0x229)+a4_0x47f33c[_0x4eed85(0x1ae)]('~\x20'+_0x10b001+'\x20changed')+_0x4eed85(0x229)+a4_0x47f33c['dim']('=\x20'+_0x5d691d+_0x4eed85(0x1ad))),console[_0x4eed85(0x1b2)](_0x4eed85(0x1bf)+formatCountSummary(_0x3e07a7['counts'][_0x4eed85(0x18b)])),console[_0x4eed85(0x1b2)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x3e07a7[_0x4eed85(0x1d2)]['knowledgeBases'])),console[_0x4eed85(0x1b2)](_0x4eed85(0x1bd)+formatCountSummary(_0x3e07a7['counts'][_0x4eed85(0x1c4)])),console[_0x4eed85(0x1b2)](_0x4eed85(0x1af)+formatCountSummary(_0x3e07a7['counts']['prompts'])),console[_0x4eed85(0x1b2)](_0x4eed85(0x1c0)+formatCountSummary(_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1b9)]));const _0x32b001=_0x3e07a7['counts']['experimentalKnowledgeBases'][_0x4eed85(0x1be)]>0x0||_0x3e07a7['counts'][_0x4eed85(0x1c2)][_0x4eed85(0x1d9)]>0x0||_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x1c2)][_0x4eed85(0x1cd)]>0x0||_0x3e07a7['counts'][_0x4eed85(0x208)][_0x4eed85(0x1be)]>0x0||_0x3e07a7['counts'][_0x4eed85(0x208)][_0x4eed85(0x1d9)]>0x0||_0x3e07a7['counts']['experimentalArtifacts']['unchanged']>0x0;_0x32b001&&(console['log'](_0x4eed85(0x222)+formatCountSummary(_0x3e07a7['counts'][_0x4eed85(0x1c2)])),console['log'](_0x4eed85(0x181)+formatCountSummary(_0x3e07a7[_0x4eed85(0x1d2)][_0x4eed85(0x208)])));console[_0x4eed85(0x1b2)](_0x4eed85(0x1f8)+a4_0x47f33c[_0x4eed85(0x225)](_0x4050ac)),displayDiffs(_0x3e07a7[_0x4eed85(0x18b)],_0x3e07a7[_0x4eed85(0x17a)],_0x3e07a7[_0x4eed85(0x1c4)],_0x3e07a7[_0x4eed85(0x21d)],_0x3e07a7['integrations'],_0x3e07a7[_0x4eed85(0x1c2)],_0x3e07a7[_0x4eed85(0x208)]);if(_0x1f8578)return console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ae)](_0x4eed85(0x1b5))),0x0;if(_0x2cc85f===0x0&&_0x10b001===0x0){console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1dc)](_0x4eed85(0x1f0)));const _0xbed347=getLLMProjectUrl(_0x2c76cb,_0x3e07a7[_0x4eed85(0x22b)]);return console[_0x4eed85(0x1b2)](_0x4eed85(0x1df)+a4_0x47f33c[_0x4eed85(0x225)](_0xbed347)),0x0;}if(!_0x465cf2&&!_0x284782){if(!isInteractive())return console[_0x4eed85(0x1e2)](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x221)),_0x4eed85(0x19e)),console[_0x4eed85(0x1e2)](a4_0x47f33c['dim'](_0x4eed85(0x1b7))),0x1;const _0x285c23=await confirmKey('\x0aPush\x20'+(_0x2cc85f+_0x10b001)+'\x20resources?');if(!_0x285c23)return console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ae)](_0x4eed85(0x22d)),_0x4eed85(0x1a8)),0x1;}const {data:_0x4fd1be}=await withSpinner(_0x4eed85(0x235),()=>_0x1a1f63[_0x4eed85(0x20d)][_0x4eed85(0x1ed)](_0x4050ac,{'force':_0x284782})),_0x30e22f=_0x4fd1be[_0x4eed85(0x1d2)][_0x4eed85(0x18b)][_0x4eed85(0x1f6)]>0x0||_0x4fd1be[_0x4eed85(0x1d2)][_0x4eed85(0x17a)]['errors']>0x0||_0x4fd1be[_0x4eed85(0x1d2)][_0x4eed85(0x1c4)][_0x4eed85(0x1f6)]>0x0||_0x4fd1be['counts'][_0x4eed85(0x21d)]['errors']>0x0;if(_0x30e22f){console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ae)](_0x4eed85(0x22e))),console[_0x4eed85(0x1b2)](),console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x197)));for(const _0x3372bf of _0x4fd1be[_0x4eed85(0x18b)]){_0x3372bf[_0x4eed85(0x231)]===_0x4eed85(0x1e2)&&console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x187)+_0x3372bf['agentName']+_0x4eed85(0x1cf)+_0x3372bf[_0x4eed85(0x1e2)]));}for(const _0x55d95e of _0x4fd1be['knowledgeBases']){_0x55d95e[_0x4eed85(0x231)]===_0x4eed85(0x1e2)&&console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x190)+_0x55d95e['name']+_0x4eed85(0x1cf)+_0x55d95e[_0x4eed85(0x1e2)]));}for(const _0x4aae82 of _0x4fd1be[_0x4eed85(0x1c4)]){_0x4aae82[_0x4eed85(0x231)]===_0x4eed85(0x1e2)&&console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x1c8)+_0x4aae82[_0x4eed85(0x188)]+_0x4eed85(0x1cf)+_0x4aae82[_0x4eed85(0x1e2)]));}for(const _0x15582a of _0x4fd1be[_0x4eed85(0x21d)]){_0x15582a[_0x4eed85(0x231)]===_0x4eed85(0x1e2)&&console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ca)](_0x4eed85(0x1c6)+_0x15582a[_0x4eed85(0x188)]+_0x4eed85(0x1cf)+_0x15582a[_0x4eed85(0x1e2)]));}for(const _0x90e45d of _0x4fd1be[_0x4eed85(0x1b9)]){_0x90e45d[_0x4eed85(0x231)]===_0x4eed85(0x1e2)&&console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1ca)]('\x20\x20Integration\x20\x22'+_0x90e45d[_0x4eed85(0x188)]+_0x4eed85(0x1cf)+_0x90e45d[_0x4eed85(0x1e2)]));}return 0x1;}console[_0x4eed85(0x1b2)](a4_0x47f33c[_0x4eed85(0x1dc)](_0x4eed85(0x194)+(_0x2cc85f+_0x10b001)+'\x20resources\x20to\x20\x27'+_0x4fd1be[_0x4eed85(0x191)]+'\x27'));const _0x20b54a=getLLMProjectUrl(_0x2c76cb,_0x4fd1be['projectId']);return console[_0x4eed85(0x1b2)](_0x4eed85(0x1df)+a4_0x47f33c[_0x4eed85(0x225)](_0x20b54a)),0x0;}}
|
|
1
|
+
const a4_0x2ab4e6=a4_0x41fe;(function(_0x35b745,_0x5d7af1){const _0x3926c5=a4_0x41fe,_0xa112a7=_0x35b745();while(!![]){try{const _0x5cfc3f=-parseInt(_0x3926c5(0x19f))/0x1*(-parseInt(_0x3926c5(0x22b))/0x2)+-parseInt(_0x3926c5(0x242))/0x3*(-parseInt(_0x3926c5(0x1e7))/0x4)+parseInt(_0x3926c5(0x1ea))/0x5*(-parseInt(_0x3926c5(0x22d))/0x6)+parseInt(_0x3926c5(0x1af))/0x7+parseInt(_0x3926c5(0x230))/0x8*(-parseInt(_0x3926c5(0x22e))/0x9)+parseInt(_0x3926c5(0x1b7))/0xa*(parseInt(_0x3926c5(0x1bd))/0xb)+-parseInt(_0x3926c5(0x23a))/0xc;if(_0x5cfc3f===_0x5d7af1)break;else _0xa112a7['push'](_0xa112a7['shift']());}catch(_0xf702a8){_0xa112a7['push'](_0xa112a7['shift']());}}}(a4_0x346b,0x9603d));import a4_0x56c742 from'chalk';import a4_0x1af98c 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';function a4_0x346b(){const _0xeda3c5=['created','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x0aErrors\x20found:','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','\x20created','outputDir','\x20updated','push','\x22...','Using\x20local\x20project:\x20','errors','yes','Dry\x20run\x20-\x20no\x20files\x20written','\x20\x20Agent\x20\x22','agentName','\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)','prompts','\x0aChanges\x20to\x20agent\x20\x27','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','reason','Cancelled','\x20\x20Agents:\x20','\x20\x20tdx\x20agent\x20clone\x20agents/','Pulling\x20agent\x20\x22','Would\x20pull\x20agent:\x20','newProjectName','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','projectName','total','Clone\x20\x22','pushProject','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','counts','New\x20project:\x20','MISSING_ARGUMENT','\x20\x20Knowledge\x20Base\x20\x22','experimentalArtifacts','repeat','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','projectDir','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','\x20\x20Prompts:\x20','agentId','Dry\x20run\x20-\x20no\x20changes\x20made','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','Project:\x20','Project\x20cloned\x20with\x20errors','parse','\x20\x20Knowledge\x20Bases:\x20','-\x20no\x20files\x20written','\x0aWrite\x20','dim','experimentalKnowledgeBases','580WGpukR','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','308634hrPxtr','24237rrTaqc','✔\x20Context\x20set:\x20','488FNQRSh','yellow','\x20\x20Target:\x20','action','error','hasChanges','no_context','tdx.json','Using\x20project:\x20','\x20\x20Experimental\x20Artifacts:\x20','14027460GBXHlw','llm_project','\x20total','agent:clone','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','red','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','3ksalXG','integrations','execute','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','Using\x20current\x20project:\x20','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','agent','source','Project\x20cloned\x20successfully','site','\x20\x20Source:\x20','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','pushAgent','green','Source:\x20','llmProject','message','projectId','\x0aChanges:','utf-8','457eAudnv','\x20unchanged','Would\x20push\x20agent:\x20','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','Agent:\x20','gray','llm','\x22\x20from\x20project\x20\x22','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','Cannot\x20clone\x20from\x20context\x20project\x20\x22','\x20successfully','\x22\x20to\x20\x22','\x0aPull\x20summary\x20for\x20\x27','description','Pushing\x20agent\x20from\x20\x22','6572475hwsRUW','agents','\x20resources\x20to\x20\x27','New\x20project\x20name\x20is\x20required','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','log','context','\x20changed','70wZAMSO','\x0aPush\x20','\x0a✔\x20Pushed\x20','INVALID_ARGUMENT','\x22:\x20','\x20=\x20','1415898BSkgnk','\x0aChanges\x20to\x20prompt\x20\x27','unchanged','cyan','\x20new','pullAgent','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','\x0aPush\x20summary\x20for\x20\x27','Using\x20context\x20project:\x20','-\x20nothing\x20pushed','\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','agent:pull','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','Analyzing\x20project\x20\x22','new','textKnowledgeBases','newProjectId','session','\x20\x20Experimental\x20Artifact\x20\x22','\x20|\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','profile','\x20\x20Prompt\x20\x22','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)','diff','\x20\x20Integration\x20\x22','Agent\x20pulled\x20successfully','sourceProjectName','dirname','dryRun','\x0aChanges\x20to\x20integration\x20\x27','force','name','Output\x20path:\x20','Would\x20clone:','updated','join','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','No\x20tdx.json\x20found\x20in\x20','<new-name>','Agent\x20','1341124KuiIMT','\x20\x20Integrations:\x20','\x20errors','35OnFkju','Status:\x20','Cloning\x20\x22','cwd','knowledgeBases','pullProject','\x20resources?','\x27\x20to\x20create\x20the\x20folder\x20structure.','Output:\x20','cwd-config','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Errors:'];a4_0x346b=function(){return _0xeda3c5;};return a4_0x346b();}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';function a4_0x41fe(_0x4b037b,_0xaeace8){_0x4b037b=_0x4b037b-0x194;const _0x346bff=a4_0x346b();let _0x41fea4=_0x346bff[_0x4b037b];return _0x41fea4;}import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x1cfe98){const _0x238a43=a4_0x41fe,_0x2676c2=[];if(_0x1cfe98[_0x238a43(0x212)]!==undefined)_0x2676c2[_0x238a43(0x1fd)](_0x1cfe98[_0x238a43(0x212)]+_0x238a43(0x23c));if(_0x1cfe98[_0x238a43(0x1cc)]!==undefined&&_0x1cfe98[_0x238a43(0x1cc)]>0x0)_0x2676c2[_0x238a43(0x1fd)](a4_0x56c742[_0x238a43(0x198)](_0x1cfe98[_0x238a43(0x1cc)]+_0x238a43(0x1c1)));if(_0x1cfe98[_0x238a43(0x1f6)]!==undefined&&_0x1cfe98[_0x238a43(0x1f6)]>0x0)_0x2676c2[_0x238a43(0x1fd)](a4_0x56c742[_0x238a43(0x198)](_0x1cfe98[_0x238a43(0x1f6)]+_0x238a43(0x1fa)));if(_0x1cfe98['updated']!==undefined&&_0x1cfe98['updated']>0x0)_0x2676c2[_0x238a43(0x1fd)](a4_0x56c742[_0x238a43(0x231)](_0x1cfe98[_0x238a43(0x1e1)]+_0x238a43(0x1fc)));if(_0x1cfe98[_0x238a43(0x1bf)]!==undefined&&_0x1cfe98[_0x238a43(0x1bf)]>0x0)_0x2676c2[_0x238a43(0x1fd)](a4_0x56c742[_0x238a43(0x1a4)](_0x1cfe98[_0x238a43(0x1bf)]+_0x238a43(0x1a0)));if(_0x1cfe98[_0x238a43(0x200)]!==undefined&&_0x1cfe98[_0x238a43(0x200)]>0x0)_0x2676c2[_0x238a43(0x1fd)](a4_0x56c742[_0x238a43(0x23f)](_0x1cfe98['errors']+_0x238a43(0x1e9)));return _0x2676c2['join'](',\x20');}function displayDiffs(_0x596569,_0x59ed71,_0x36acbc,_0x2ebb3a,_0x5f2926,_0x3f6bf2,_0x3c31bc){const _0x249fc8=a4_0x41fe;for(const _0x491c17 of _0x596569){if(_0x491c17[_0x249fc8(0x1d6)]){const _0x4cdece=_0x491c17[_0x249fc8(0x204)]||_0x491c17['name'];console[_0x249fc8(0x1b4)](_0x249fc8(0x207)+_0x4cdece+'\x27:'),console[_0x249fc8(0x1b4)]('─'[_0x249fc8(0x21b)](0x3c)),console['log'](_0x491c17[_0x249fc8(0x1d6)]),console[_0x249fc8(0x1b4)]('─'['repeat'](0x3c));}}for(const _0x43d518 of _0x59ed71){_0x43d518['diff']&&(console['log']('\x0aChanges\x20to\x20knowledge\x20base\x20\x27'+_0x43d518[_0x249fc8(0x1de)]+'\x27:'),console[_0x249fc8(0x1b4)]('─'['repeat'](0x3c)),console[_0x249fc8(0x1b4)](_0x43d518[_0x249fc8(0x1d6)]),console[_0x249fc8(0x1b4)]('─'['repeat'](0x3c)));}for(const _0x55b04b of _0x36acbc){_0x55b04b['diff']&&(console[_0x249fc8(0x1b4)](_0x249fc8(0x240)+_0x55b04b['name']+'\x27:'),console['log']('─'[_0x249fc8(0x21b)](0x3c)),console[_0x249fc8(0x1b4)](_0x55b04b[_0x249fc8(0x1d6)]),console[_0x249fc8(0x1b4)]('─'['repeat'](0x3c)));}for(const _0x2b9917 of _0x2ebb3a){_0x2b9917[_0x249fc8(0x1d6)]&&(console[_0x249fc8(0x1b4)](_0x249fc8(0x1be)+_0x2b9917['name']+'\x27:'),console[_0x249fc8(0x1b4)]('─'[_0x249fc8(0x21b)](0x3c)),console[_0x249fc8(0x1b4)](_0x2b9917[_0x249fc8(0x1d6)]),console[_0x249fc8(0x1b4)]('─'['repeat'](0x3c)));}for(const _0x35760a of _0x5f2926){_0x35760a[_0x249fc8(0x1d6)]&&(console[_0x249fc8(0x1b4)](_0x249fc8(0x1dc)+_0x35760a[_0x249fc8(0x1de)]+'\x27:'),console[_0x249fc8(0x1b4)]('─'[_0x249fc8(0x21b)](0x3c)),console[_0x249fc8(0x1b4)](_0x35760a[_0x249fc8(0x1d6)]),console['log']('─'[_0x249fc8(0x21b)](0x3c)));}for(const _0x155302 of _0x3f6bf2){_0x155302[_0x249fc8(0x1d6)]&&(console['log']('\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27'+_0x155302[_0x249fc8(0x1de)]+'\x27:'),console[_0x249fc8(0x1b4)]('─'[_0x249fc8(0x21b)](0x3c)),console[_0x249fc8(0x1b4)](_0x155302['diff']),console[_0x249fc8(0x1b4)]('─'['repeat'](0x3c)));}for(const _0x10ff04 of _0x3c31bc){_0x10ff04[_0x249fc8(0x1d6)]&&(console[_0x249fc8(0x1b4)](_0x249fc8(0x1a2)+_0x10ff04[_0x249fc8(0x1de)]+'\x27:'),console[_0x249fc8(0x1b4)]('─'['repeat'](0x3c)),console[_0x249fc8(0x1b4)](_0x10ff04[_0x249fc8(0x1d6)]),console[_0x249fc8(0x1b4)]('─'[_0x249fc8(0x21b)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x2ab4e6(0x1de)]=a4_0x2ab4e6(0x1c9);['description']='Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files';async['execute'](_0x15879a){const _0x337f06=a4_0x2ab4e6,{options:_0x3c54d5,args:_0x34d96b,tdx:_0x4bcb37}=_0x15879a,_0x557b52=_0x34d96b[0x0],_0x3cb794=_0x34d96b[0x1],_0x3fe671=_0x3c54d5['output'],_0x17cf90=_0x3c54d5[_0x337f06(0x1db)],_0x30b045=_0x3c54d5['force'],_0x3f7761=_0x3c54d5[_0x337f06(0x201)],_0x23d9aa=_0x3c54d5[_0x337f06(0x19a)],_0x500ba2=_0x3c54d5[_0x337f06(0x248)];let _0x31cef4;if(_0x557b52){const _0x21637f=a4_0x1af98c[_0x337f06(0x1e2)](_0x557b52,_0x337f06(0x237));if(existsSync(_0x21637f))try{const _0x527eb6=JSON[_0x337f06(0x225)](readFileSync(_0x21637f,_0x337f06(0x19e)));_0x527eb6[_0x337f06(0x23b)]&&(_0x31cef4={'llm_project':_0x527eb6[_0x337f06(0x23b)]});}catch{}}const _0x10cc5e=findAgentConfigPath(process[_0x337f06(0x1ed)]());let _0x5d6fb;if(_0x10cc5e)try{const _0x112fbf=JSON[_0x337f06(0x225)](readFileSync(_0x10cc5e,_0x337f06(0x19e)));_0x112fbf[_0x337f06(0x23b)]&&(_0x5d6fb={'llm_project':_0x112fbf[_0x337f06(0x23b)]});}catch{}const _0x3b1ba0=resolveAgentPullArgs({'arg':_0x557b52,'agentNameArg':_0x3cb794,'agentFlag':_0x500ba2,'contextProject':_0x23d9aa,'argDirConfig':_0x31cef4,'cwdConfigPath':_0x10cc5e||undefined,'cwdConfig':_0x5d6fb}),{projectNameOrId:_0x3c80ef,targetAgentName:_0xb2b658,existingOutputDir:_0x48f5a1,source:_0x4bd8e9}=_0x3b1ba0;if(_0x4bd8e9==='arg-dir')console[_0x337f06(0x1b4)](a4_0x56c742[_0x337f06(0x229)]('Using\x20project\x20from\x20'+a4_0x1af98c[_0x337f06(0x1e2)](_0x557b52,_0x337f06(0x237))+':\x20'+_0x3c80ef));else{if(_0x4bd8e9===_0x337f06(0x1f3))console[_0x337f06(0x1b4)](a4_0x56c742[_0x337f06(0x229)](_0x337f06(0x238)+_0x3c80ef));else _0x4bd8e9===_0x337f06(0x1b5)&&console[_0x337f06(0x1b4)](a4_0x56c742[_0x337f06(0x229)]('Using\x20project\x20from\x20context:\x20'+_0x3c80ef));}if(!_0x3c80ef)return _0x500ba2?(console[_0x337f06(0x1b4)](a4_0x56c742[_0x337f06(0x231)](_0x337f06(0x1c3))),console[_0x337f06(0x1b4)](_0x337f06(0x21e)),console[_0x337f06(0x1b4)](_0x337f06(0x1c4))):(console[_0x337f06(0x1b4)](a4_0x56c742['yellow'](_0x337f06(0x1b3))),console[_0x337f06(0x1b4)](_0x337f06(0x1d5)),console[_0x337f06(0x1b4)]('\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'),console[_0x337f06(0x1b4)](_0x337f06(0x1d2)),console[_0x337f06(0x1b4)](_0x337f06(0x1c8)),console['log']('\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')),0x1;if(_0xb2b658){const {data:_0x29bd4e}=await withSpinner(_0x337f06(0x20d)+_0xb2b658+_0x337f06(0x1a6)+_0x3c80ef+_0x337f06(0x1fe),()=>_0x4bcb37[_0x337f06(0x1a5)][_0x337f06(0x1c2)](_0x3c80ef,_0xb2b658,_0x3fe671,{'dryRun':_0x17cf90,'force':_0x30b045}));if(_0x17cf90)return console[_0x337f06(0x1b4)](a4_0x56c742['yellow'](_0x337f06(0x202))),console['log'](_0x337f06(0x20e)+_0x29bd4e[_0x337f06(0x204)]),console['log'](_0x337f06(0x1df)+_0x29bd4e['outputPath']),_0x29bd4e[_0x337f06(0x1d6)]&&(console[_0x337f06(0x1b4)](_0x337f06(0x19d)),console['log']('─'[_0x337f06(0x21b)](0x3c)),console['log'](_0x29bd4e['diff']),console['log']('─'[_0x337f06(0x21b)](0x3c))),0x0;return console['log'](a4_0x56c742[_0x337f06(0x198)](_0x337f06(0x1d8))),console[_0x337f06(0x1b4)]('Agent:\x20'+_0x29bd4e[_0x337f06(0x204)]),console[_0x337f06(0x1b4)](_0x337f06(0x1f2)+_0x29bd4e['outputPath']),console['log'](_0x337f06(0x1eb)+(_0x29bd4e['isNew']?a4_0x56c742['green'](_0x337f06(0x1cc)):_0x29bd4e[_0x337f06(0x235)]?a4_0x56c742[_0x337f06(0x231)](_0x337f06(0x1e1)):a4_0x56c742['gray'](_0x337f06(0x1bf)))),0x0;}const _0x32ff6f=_0x48f5a1||_0x3fe671,{data:_0x92d3a0}=await withSpinner(_0x337f06(0x1cb)+_0x3c80ef+'\x22...',()=>_0x4bcb37['llm'][_0x337f06(0x1ef)](_0x3c80ef,_0x32ff6f,{'dryRun':!![]})),_0x532742=_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x1b0)][_0x337f06(0x1cc)]+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x1ee)][_0x337f06(0x1cc)]+_0x92d3a0[_0x337f06(0x216)]['textKnowledgeBases'][_0x337f06(0x1cc)]+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x206)][_0x337f06(0x1cc)]+_0x92d3a0['counts'][_0x337f06(0x243)][_0x337f06(0x1cc)]+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x22a)][_0x337f06(0x1cc)]+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x21a)][_0x337f06(0x1cc)],_0x1de07c=_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x1b0)][_0x337f06(0x1e1)]+_0x92d3a0['counts']['knowledgeBases']['updated']+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x1cd)][_0x337f06(0x1e1)]+_0x92d3a0[_0x337f06(0x216)]['prompts'][_0x337f06(0x1e1)]+_0x92d3a0[_0x337f06(0x216)]['integrations'][_0x337f06(0x1e1)]+_0x92d3a0['counts'][_0x337f06(0x22a)]['updated']+_0x92d3a0[_0x337f06(0x216)]['experimentalArtifacts'][_0x337f06(0x1e1)],_0x111c27=_0x92d3a0[_0x337f06(0x216)]['agents'][_0x337f06(0x1bf)]+_0x92d3a0[_0x337f06(0x216)]['knowledgeBases'][_0x337f06(0x1bf)]+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x1cd)][_0x337f06(0x1bf)]+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x206)]['unchanged']+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x243)][_0x337f06(0x1bf)]+_0x92d3a0['counts'][_0x337f06(0x22a)][_0x337f06(0x1bf)]+_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x21a)]['unchanged'];console[_0x337f06(0x1b4)](_0x337f06(0x1ac)+_0x92d3a0['projectName']+'\x27:'),console[_0x337f06(0x1b4)]('\x20\x20'+a4_0x56c742['green']('+\x20'+_0x532742+_0x337f06(0x1c1))+_0x337f06(0x1d1)+a4_0x56c742['yellow']('~\x20'+_0x1de07c+_0x337f06(0x1b6))+'\x20|\x20'+a4_0x56c742[_0x337f06(0x229)]('=\x20'+_0x111c27+_0x337f06(0x1a0))),console['log'](_0x337f06(0x20b)+formatCountSummary(_0x92d3a0['counts'][_0x337f06(0x1b0)])),console['log'](_0x337f06(0x226)+formatCountSummary(_0x92d3a0['counts'][_0x337f06(0x1ee)])),console[_0x337f06(0x1b4)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x1cd)])),console[_0x337f06(0x1b4)](_0x337f06(0x21f)+formatCountSummary(_0x92d3a0[_0x337f06(0x216)]['prompts'])),console['log'](_0x337f06(0x1e8)+formatCountSummary(_0x92d3a0[_0x337f06(0x216)]['integrations']));const _0x412bfa=_0x92d3a0[_0x337f06(0x216)]['experimentalKnowledgeBases'][_0x337f06(0x212)]>0x0||_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x21a)]['total']>0x0;_0x412bfa&&(console[_0x337f06(0x1b4)](_0x337f06(0x241)+formatCountSummary(_0x92d3a0[_0x337f06(0x216)][_0x337f06(0x22a)])),console['log']('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x92d3a0[_0x337f06(0x216)]['experimentalArtifacts'])));console[_0x337f06(0x1b4)](_0x337f06(0x232)+a4_0x56c742[_0x337f06(0x1c0)](_0x92d3a0[_0x337f06(0x1fb)])),displayDiffs(_0x92d3a0[_0x337f06(0x1b0)],_0x92d3a0[_0x337f06(0x1ee)],_0x92d3a0[_0x337f06(0x1cd)],_0x92d3a0['prompts'],_0x92d3a0['integrations'],_0x92d3a0[_0x337f06(0x22a)],_0x92d3a0['experimentalArtifacts']);if(_0x17cf90)return console['log'](a4_0x56c742[_0x337f06(0x231)](_0x337f06(0x1a8))),0x0;if(_0x532742===0x0&&_0x1de07c===0x0)return console[_0x337f06(0x1b4)](a4_0x56c742[_0x337f06(0x198)](_0x337f06(0x210))),saveSessionContext({'llm_project':_0x92d3a0['projectName']},_0x3c54d5[_0x337f06(0x1cf)]),console['log'](a4_0x56c742[_0x337f06(0x198)](_0x337f06(0x22f)+a4_0x56c742[_0x337f06(0x229)]('llm_project')+_0x337f06(0x1bc)+a4_0x56c742[_0x337f06(0x1c0)](_0x92d3a0['projectName']))),0x0;if(!_0x3f7761&&!_0x30b045){if(!isInteractive())return console['error'](a4_0x56c742['red']('\x0aError:'),_0x337f06(0x1f4)),console[_0x337f06(0x234)](a4_0x56c742['dim'](_0x337f06(0x215))),0x1;const _0x3c4b41=await confirmKey(_0x337f06(0x228)+(_0x532742+_0x1de07c)+'\x20files?');if(!_0x3c4b41)return console['log'](a4_0x56c742[_0x337f06(0x231)](_0x337f06(0x20a)),_0x337f06(0x227)),0x1;}const {data:_0x5d973a}=await withSpinner('Writing\x20files...',()=>_0x4bcb37[_0x337f06(0x1a5)][_0x337f06(0x1ef)](_0x3c80ef,_0x32ff6f,{'force':_0x30b045}));return console[_0x337f06(0x1b4)](a4_0x56c742['green']('\x0a✔\x20Pulled\x20'+(_0x532742+_0x1de07c)+'\x20files\x20to\x20'+_0x5d973a[_0x337f06(0x1fb)])),saveSessionContext({'llm_project':_0x5d973a[_0x337f06(0x211)]},_0x3c54d5[_0x337f06(0x1cf)]),console['log'](a4_0x56c742['green']('✔\x20Context\x20set:\x20'+a4_0x56c742[_0x337f06(0x229)](_0x337f06(0x23b))+'\x20=\x20'+a4_0x56c742[_0x337f06(0x1c0)](_0x5d973a[_0x337f06(0x211)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{['name']=a4_0x2ab4e6(0x23d);['description']='Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project';async[a4_0x2ab4e6(0x244)](_0x281670){const _0x17b04a=a4_0x2ab4e6,{options:_0x1d16d3,args:_0x5330a3,tdx:_0x4f94cd}=_0x281670,_0x41e8dd=_0x5330a3[0x0],_0x4966aa=_0x1d16d3[_0x17b04a(0x1de)],_0xab7299=_0x1d16d3[_0x17b04a(0x1db)],_0x5540c6=_0x1d16d3[_0x17b04a(0x201)],_0x14c2a3=_0x1d16d3[_0x17b04a(0x194)],_0x2b4a07=_0x1d16d3[_0x17b04a(0x19a)];let _0x1cfe2c;const _0x5b996f=findAgentConfigPath(process[_0x17b04a(0x1ed)]());if(_0x41e8dd){const _0x173d52=a4_0x1af98c[_0x17b04a(0x1e2)](_0x41e8dd,'tdx.json');existsSync(_0x173d52)?(_0x1cfe2c=_0x41e8dd,console[_0x17b04a(0x1b4)](a4_0x56c742['dim'](_0x17b04a(0x1ff)+_0x41e8dd))):_0x1cfe2c=_0x41e8dd;}else{if(_0x5b996f)_0x1cfe2c=a4_0x1af98c['dirname'](_0x5b996f),console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x229)](_0x17b04a(0x246)+_0x1cfe2c));else{if(_0x2b4a07){const _0x1db3cd=sanitizeForFilesystem(_0x2b4a07);let _0x5b1a0c=_0x1db3cd,_0x56adb5=a4_0x1af98c['join'](process['cwd'](),_0x17b04a(0x1b0),_0x1db3cd,_0x17b04a(0x237));if(!existsSync(_0x56adb5)){const _0x4bdaa3=normalizeName(_0x2b4a07),_0x43bb09=a4_0x1af98c[_0x17b04a(0x1e2)](process[_0x17b04a(0x1ed)](),_0x17b04a(0x1b0),_0x4bdaa3,_0x17b04a(0x237));existsSync(_0x43bb09)&&(_0x5b1a0c=_0x4bdaa3,_0x56adb5=_0x43bb09);}if(existsSync(_0x56adb5))_0x1cfe2c=a4_0x1af98c[_0x17b04a(0x1da)](_0x56adb5),console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x229)](_0x17b04a(0x1ff)+_0x1cfe2c));else{const _0x3f5066=_0x1d16d3[_0x17b04a(0x1d3)];if(_0x3f5066)throw new SDKError(ErrorCode[_0x17b04a(0x1ba)],_0x17b04a(0x1a9)+_0x2b4a07+'\x22\x20to\x20a\x20different\x20profile',undefined,{'helpText':_0x17b04a(0x208)+_0x17b04a(0x245)+('\x20\x20tdx\x20agent\x20pull\x20'+_0x2b4a07+'\x0a')+(_0x17b04a(0x20c)+_0x5b1a0c+'\x20--name\x20'+(_0x4966aa||_0x17b04a(0x1e5))+'\x20--profile\x20'+_0x3f5066)});_0x1cfe2c=_0x2b4a07,console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x229)](_0x17b04a(0x1c6)+_0x2b4a07));}}}}if(!_0x1cfe2c)return console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x231)](_0x17b04a(0x1ca))),console[_0x17b04a(0x1b4)](_0x17b04a(0x1a7)),console[_0x17b04a(0x1b4)](_0x17b04a(0x21c)),console[_0x17b04a(0x1b4)](_0x17b04a(0x205)),console[_0x17b04a(0x1b4)](_0x17b04a(0x196)),0x1;if(!_0x4966aa)throw new SDKError(ErrorCode[_0x17b04a(0x218)],_0x17b04a(0x1b2),undefined,{'helpText':_0x17b04a(0x1e3)});if(!_0x5540c6&&!_0xab7299){if(!isInteractive())return console[_0x17b04a(0x234)](a4_0x56c742[_0x17b04a(0x23f)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x17b04a(0x234)](a4_0x56c742[_0x17b04a(0x229)](_0x17b04a(0x215))),0x1;const _0x3f3b7f=await confirmKey(_0x17b04a(0x213)+_0x1cfe2c+'\x22\x20to\x20new\x20project\x20\x22'+_0x4966aa+'\x22?');if(!_0x3f3b7f)return console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x231)](_0x17b04a(0x20a))),0x1;}const {data:_0x4fcafc}=await withSpinner(_0x17b04a(0x1ec)+_0x1cfe2c+_0x17b04a(0x1ab)+_0x4966aa+_0x17b04a(0x1fe),()=>_0x4f94cd['llm']['cloneProject'](_0x1cfe2c,_0x4966aa,{'dryRun':_0xab7299}));if(_0xab7299){console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x231)](_0x17b04a(0x221))),console[_0x17b04a(0x1b4)](_0x17b04a(0x199)+_0x4fcafc[_0x17b04a(0x1d9)]),console[_0x17b04a(0x1b4)](_0x17b04a(0x217)+_0x4966aa),console[_0x17b04a(0x1b4)](_0x17b04a(0x1e0)),console[_0x17b04a(0x1b4)]('\x20\x20Agents:\x20'+_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x1b0)][_0x17b04a(0x1f6)]),console[_0x17b04a(0x1b4)]('\x20\x20Knowledge\x20Bases:\x20'+_0x4fcafc['counts'][_0x17b04a(0x1ee)]['created']),console[_0x17b04a(0x1b4)](_0x17b04a(0x21f)+_0x4fcafc[_0x17b04a(0x216)]['prompts'][_0x17b04a(0x1f6)]);const _0xb3fdbe=_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x22a)]['created']>0x0||_0x4fcafc[_0x17b04a(0x216)]['experimentalArtifacts'][_0x17b04a(0x1f6)]>0x0;return _0xb3fdbe&&(console[_0x17b04a(0x1b4)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x22a)][_0x17b04a(0x1f6)]),console['log'](_0x17b04a(0x239)+_0x4fcafc['counts']['experimentalArtifacts'][_0x17b04a(0x1f6)])),0x0;}const _0x3353e6=_0x4fcafc['counts'][_0x17b04a(0x1b0)][_0x17b04a(0x200)]>0x0||_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x1ee)][_0x17b04a(0x200)]>0x0||_0x4fcafc[_0x17b04a(0x216)]['prompts']['errors']>0x0||_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x22a)]['errors']>0x0||_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x21a)][_0x17b04a(0x200)]>0x0;_0x3353e6?console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x231)](_0x17b04a(0x224))):console['log'](a4_0x56c742[_0x17b04a(0x198)](_0x17b04a(0x24a)));console[_0x17b04a(0x1b4)](_0x17b04a(0x199)+_0x4fcafc[_0x17b04a(0x1d9)]),console['log'](_0x17b04a(0x217)+_0x4fcafc[_0x17b04a(0x20f)]),console[_0x17b04a(0x1b4)]('New\x20project\x20ID:\x20'+_0x4fcafc['newProjectId']),console[_0x17b04a(0x1b4)](),console[_0x17b04a(0x1b4)]('Summary:'),console[_0x17b04a(0x1b4)]('\x20\x20Agents:\x20'+formatCountSummary(_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x1b0)])),console[_0x17b04a(0x1b4)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4fcafc[_0x17b04a(0x216)]['knowledgeBases'])),console[_0x17b04a(0x1b4)](_0x17b04a(0x21f)+formatCountSummary(_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x206)])),console[_0x17b04a(0x1b4)](_0x17b04a(0x1e8)+formatCountSummary(_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x243)]));const _0x1822db=_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x22a)][_0x17b04a(0x1f6)]>0x0||_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x22a)][_0x17b04a(0x1e1)]>0x0||_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x22a)][_0x17b04a(0x1bf)]>0x0||_0x4fcafc['counts'][_0x17b04a(0x21a)][_0x17b04a(0x1f6)]>0x0||_0x4fcafc[_0x17b04a(0x216)]['experimentalArtifacts']['updated']>0x0||_0x4fcafc['counts'][_0x17b04a(0x21a)][_0x17b04a(0x1bf)]>0x0;_0x1822db&&(console[_0x17b04a(0x1b4)](_0x17b04a(0x241)+formatCountSummary(_0x4fcafc[_0x17b04a(0x216)]['experimentalKnowledgeBases'])),console[_0x17b04a(0x1b4)](_0x17b04a(0x239)+formatCountSummary(_0x4fcafc[_0x17b04a(0x216)][_0x17b04a(0x21a)])));if(_0x3353e6){console[_0x17b04a(0x1b4)](),console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x23f)]('Errors:'));for(const _0x218923 of _0x4fcafc[_0x17b04a(0x1b0)]){_0x218923[_0x17b04a(0x233)]===_0x17b04a(0x234)&&console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x23f)]('\x20\x20Agent\x20\x22'+_0x218923['agentName']+'\x22:\x20'+_0x218923[_0x17b04a(0x234)]));}for(const _0x619ff9 of _0x4fcafc[_0x17b04a(0x1ee)]){_0x619ff9[_0x17b04a(0x233)]==='error'&&console['log'](a4_0x56c742[_0x17b04a(0x23f)](_0x17b04a(0x219)+_0x619ff9['name']+_0x17b04a(0x1bb)+_0x619ff9[_0x17b04a(0x234)]));}for(const _0x511673 of _0x4fcafc[_0x17b04a(0x206)]){_0x511673[_0x17b04a(0x233)]===_0x17b04a(0x234)&&console[_0x17b04a(0x1b4)](a4_0x56c742['red'](_0x17b04a(0x1d4)+_0x511673['name']+_0x17b04a(0x1bb)+_0x511673['error']));}for(const _0x48a8af of _0x4fcafc[_0x17b04a(0x243)]){_0x48a8af[_0x17b04a(0x233)]===_0x17b04a(0x234)&&console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x23f)](_0x17b04a(0x1d7)+_0x48a8af['name']+_0x17b04a(0x1bb)+_0x48a8af[_0x17b04a(0x234)]));}for(const _0x14d459 of _0x4fcafc[_0x17b04a(0x22a)]){_0x14d459[_0x17b04a(0x233)]==='error'&&console[_0x17b04a(0x1b4)](a4_0x56c742['red']('\x20\x20Experimental\x20Knowledge\x20Base\x20\x22'+_0x14d459[_0x17b04a(0x1de)]+_0x17b04a(0x1bb)+_0x14d459['error']));}for(const _0x2f2bad of _0x4fcafc[_0x17b04a(0x21a)]){_0x2f2bad[_0x17b04a(0x233)]==='error'&&console[_0x17b04a(0x1b4)](a4_0x56c742[_0x17b04a(0x23f)](_0x17b04a(0x1d0)+_0x2f2bad[_0x17b04a(0x1de)]+_0x17b04a(0x1bb)+_0x2f2bad[_0x17b04a(0x234)]));}return 0x1;}console[_0x17b04a(0x1b4)]();const _0x34178d=getLLMProjectUrl(_0x14c2a3,_0x4fcafc[_0x17b04a(0x1ce)]);return console[_0x17b04a(0x1b4)](_0x17b04a(0x223)+a4_0x56c742[_0x17b04a(0x1c0)](_0x34178d)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x2ab4e6(0x1de)]='agent:push';[a4_0x2ab4e6(0x1ad)]=a4_0x2ab4e6(0x22c);async['execute'](_0x57ca53){const _0x20908f=a4_0x2ab4e6,{options:_0x18ca9a,args:_0x536db2,tdx:_0xc277e9}=_0x57ca53;let _0x7f95f3=_0x536db2[0x0]||process['cwd']();const _0x4d9c07=_0x18ca9a['dryRun'],_0x1037e7=_0x18ca9a[_0x20908f(0x1dd)],_0x4487d9=_0x18ca9a[_0x20908f(0x201)],_0x550731=_0x18ca9a[_0x20908f(0x194)],_0x1eb8ed=a4_0x1af98c[_0x20908f(0x1e2)](_0x7f95f3,'agent.yml'),_0x1dea10=existsSync(_0x1eb8ed);if(_0x1dea10){const {data:_0x5168ff}=await withSpinner(_0x20908f(0x1ae)+_0x7f95f3+_0x20908f(0x1fe),()=>_0xc277e9[_0x20908f(0x1a5)][_0x20908f(0x197)](_0x7f95f3,{'dryRun':_0x4d9c07,'force':_0x1037e7}));if(_0x4d9c07)return console['log'](a4_0x56c742[_0x20908f(0x231)](_0x20908f(0x221))),console[_0x20908f(0x1b4)](_0x20908f(0x1a1)+_0x5168ff['agentName']),0x0;if(_0x5168ff[_0x20908f(0x233)]===_0x20908f(0x234))return console['log'](a4_0x56c742[_0x20908f(0x23f)]('Failed\x20to\x20push\x20agent:\x20'+_0x5168ff['error'])),0x1;console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x198)](_0x20908f(0x1e6)+_0x5168ff[_0x20908f(0x233)]+_0x20908f(0x1aa))),console[_0x20908f(0x1b4)](_0x20908f(0x1a3)+_0x5168ff[_0x20908f(0x204)]);if(_0x5168ff[_0x20908f(0x220)]&&_0x5168ff[_0x20908f(0x19c)]){const _0xe9a0cc=getLLMAgentChatUrl(_0x550731,_0x5168ff['projectId'],_0x5168ff[_0x20908f(0x220)]);console[_0x20908f(0x1b4)]('Chat:\x20'+a4_0x56c742['cyan'](_0xe9a0cc));}return 0x0;}const _0x5a084f=_0x18ca9a[_0x20908f(0x19a)],_0x11a657=resolveProjectFromContext(_0x7f95f3,_0x5a084f);if(_0x11a657['found'])_0x7f95f3=_0x11a657[_0x20908f(0x21d)],_0x11a657[_0x20908f(0x249)]==='context'&&console[_0x20908f(0x1b4)](a4_0x56c742['dim']('Using\x20project:\x20'+_0x7f95f3));else{let _0x2588f3=_0x20908f(0x23e);_0x11a657[_0x20908f(0x209)]==='no_local_folder'&&(_0x2588f3=_0x11a657[_0x20908f(0x19b)]+_0x20908f(0x247)+_0x11a657[_0x20908f(0x19a)]+_0x20908f(0x1f1));throw new SDKError(ErrorCode[_0x20908f(0x1ba)],_0x11a657['reason']===_0x20908f(0x236)?_0x11a657[_0x20908f(0x19b)]:_0x20908f(0x1e4)+_0x7f95f3,undefined,{'helpText':_0x2588f3});}const {data:_0x4eb584}=await withSpinner('Analyzing\x20changes\x20to\x20push...',()=>_0xc277e9[_0x20908f(0x1a5)][_0x20908f(0x214)](_0x7f95f3,{'dryRun':!![]})),_0x1226c0=_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1b0)][_0x20908f(0x200)]>0x0;if(_0x1226c0){console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x23f)](_0x20908f(0x1f8)));for(const _0xfd04f5 of _0x4eb584['agents']){_0xfd04f5[_0x20908f(0x233)]===_0x20908f(0x234)&&console['log'](a4_0x56c742[_0x20908f(0x23f)](_0x20908f(0x203)+_0xfd04f5['agentName']+_0x20908f(0x1bb)+_0xfd04f5[_0x20908f(0x234)]));}return 0x1;}const _0x18eae7=_0x4eb584[_0x20908f(0x216)]['agents'][_0x20908f(0x1f6)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1ee)][_0x20908f(0x1f6)]+_0x4eb584['counts'][_0x20908f(0x1cd)][_0x20908f(0x1f6)]+_0x4eb584['counts']['prompts'][_0x20908f(0x1f6)]+_0x4eb584[_0x20908f(0x216)]['integrations']['created']+_0x4eb584['counts'][_0x20908f(0x22a)]['created']+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x21a)][_0x20908f(0x1f6)],_0x2e6e9d=_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1b0)][_0x20908f(0x1e1)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1ee)][_0x20908f(0x1e1)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1cd)][_0x20908f(0x1e1)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x206)]['updated']+_0x4eb584['counts'][_0x20908f(0x243)]['updated']+_0x4eb584['counts'][_0x20908f(0x22a)][_0x20908f(0x1e1)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x21a)]['updated'],_0x27be13=_0x4eb584['counts']['agents'][_0x20908f(0x1bf)]+_0x4eb584[_0x20908f(0x216)]['knowledgeBases'][_0x20908f(0x1bf)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1cd)][_0x20908f(0x1bf)]+_0x4eb584[_0x20908f(0x216)]['prompts'][_0x20908f(0x1bf)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x243)][_0x20908f(0x1bf)]+_0x4eb584['counts'][_0x20908f(0x22a)][_0x20908f(0x1bf)]+_0x4eb584[_0x20908f(0x216)][_0x20908f(0x21a)]['unchanged'];console['log'](_0x20908f(0x1c5)+_0x4eb584[_0x20908f(0x211)]+'\x27:'),console[_0x20908f(0x1b4)]('\x20\x20'+a4_0x56c742['green']('+\x20'+_0x18eae7+_0x20908f(0x1c1))+_0x20908f(0x1d1)+a4_0x56c742[_0x20908f(0x231)]('~\x20'+_0x2e6e9d+_0x20908f(0x1b6))+_0x20908f(0x1d1)+a4_0x56c742[_0x20908f(0x229)]('=\x20'+_0x27be13+_0x20908f(0x1a0))),console[_0x20908f(0x1b4)](_0x20908f(0x20b)+formatCountSummary(_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1b0)])),console[_0x20908f(0x1b4)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1ee)])),console[_0x20908f(0x1b4)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4eb584[_0x20908f(0x216)][_0x20908f(0x1cd)])),console[_0x20908f(0x1b4)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x4eb584['counts']['prompts'])),console['log']('\x20\x20Integrations:\x20'+formatCountSummary(_0x4eb584['counts'][_0x20908f(0x243)]));const _0x291f4f=_0x4eb584[_0x20908f(0x216)][_0x20908f(0x22a)]['created']>0x0||_0x4eb584[_0x20908f(0x216)][_0x20908f(0x22a)]['updated']>0x0||_0x4eb584['counts']['experimentalKnowledgeBases'][_0x20908f(0x1bf)]>0x0||_0x4eb584[_0x20908f(0x216)][_0x20908f(0x21a)][_0x20908f(0x1f6)]>0x0||_0x4eb584[_0x20908f(0x216)]['experimentalArtifacts'][_0x20908f(0x1e1)]>0x0||_0x4eb584['counts']['experimentalArtifacts'][_0x20908f(0x1bf)]>0x0;_0x291f4f&&(console[_0x20908f(0x1b4)](_0x20908f(0x241)+formatCountSummary(_0x4eb584[_0x20908f(0x216)][_0x20908f(0x22a)])),console[_0x20908f(0x1b4)]('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x4eb584['counts'][_0x20908f(0x21a)])));console['log'](_0x20908f(0x195)+a4_0x56c742[_0x20908f(0x1c0)](_0x7f95f3)),displayDiffs(_0x4eb584[_0x20908f(0x1b0)],_0x4eb584['knowledgeBases'],_0x4eb584[_0x20908f(0x1cd)],_0x4eb584[_0x20908f(0x206)],_0x4eb584[_0x20908f(0x243)],_0x4eb584['experimentalKnowledgeBases'],_0x4eb584[_0x20908f(0x21a)]);if(_0x4d9c07)return console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x231)](_0x20908f(0x222))),0x0;if(_0x18eae7===0x0&&_0x2e6e9d===0x0){console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x198)](_0x20908f(0x1f9)));const _0x53237d=getLLMProjectUrl(_0x550731,_0x4eb584[_0x20908f(0x19c)]);return console[_0x20908f(0x1b4)](_0x20908f(0x223)+a4_0x56c742[_0x20908f(0x1c0)](_0x53237d)),0x0;}if(!_0x4487d9&&!_0x1037e7){if(!isInteractive())return console[_0x20908f(0x234)](a4_0x56c742[_0x20908f(0x23f)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x20908f(0x234)](a4_0x56c742[_0x20908f(0x229)](_0x20908f(0x215))),0x1;const _0x5b2d4c=await confirmKey(_0x20908f(0x1b8)+(_0x18eae7+_0x2e6e9d)+_0x20908f(0x1f0));if(!_0x5b2d4c)return console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x231)](_0x20908f(0x20a)),_0x20908f(0x1c7)),0x1;}const {data:_0x24f270}=await withSpinner('Pushing\x20to\x20project...',()=>_0xc277e9['llm'][_0x20908f(0x214)](_0x7f95f3,{'force':_0x1037e7})),_0x12f951=_0x24f270['counts'][_0x20908f(0x1b0)][_0x20908f(0x200)]>0x0||_0x24f270[_0x20908f(0x216)]['knowledgeBases'][_0x20908f(0x200)]>0x0||_0x24f270[_0x20908f(0x216)][_0x20908f(0x1cd)]['errors']>0x0||_0x24f270[_0x20908f(0x216)][_0x20908f(0x206)][_0x20908f(0x200)]>0x0;if(_0x12f951){console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x231)]('\x0aProject\x20pushed\x20with\x20errors')),console[_0x20908f(0x1b4)](),console['log'](a4_0x56c742[_0x20908f(0x23f)](_0x20908f(0x1f5)));for(const _0x2c0362 of _0x24f270[_0x20908f(0x1b0)]){_0x2c0362['action']===_0x20908f(0x234)&&console[_0x20908f(0x1b4)](a4_0x56c742['red'](_0x20908f(0x203)+_0x2c0362[_0x20908f(0x204)]+_0x20908f(0x1bb)+_0x2c0362['error']));}for(const _0x4b7e75 of _0x24f270[_0x20908f(0x1ee)]){_0x4b7e75['action']===_0x20908f(0x234)&&console[_0x20908f(0x1b4)](a4_0x56c742['red']('\x20\x20Knowledge\x20Base\x20\x22'+_0x4b7e75[_0x20908f(0x1de)]+'\x22:\x20'+_0x4b7e75[_0x20908f(0x234)]));}for(const _0x2e902d of _0x24f270['textKnowledgeBases']){_0x2e902d[_0x20908f(0x233)]===_0x20908f(0x234)&&console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x23f)](_0x20908f(0x1f7)+_0x2e902d['name']+'\x22:\x20'+_0x2e902d[_0x20908f(0x234)]));}for(const _0xabc859 of _0x24f270['prompts']){_0xabc859['action']===_0x20908f(0x234)&&console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x23f)](_0x20908f(0x1d4)+_0xabc859[_0x20908f(0x1de)]+_0x20908f(0x1bb)+_0xabc859[_0x20908f(0x234)]));}for(const _0x502f0f of _0x24f270[_0x20908f(0x243)]){_0x502f0f[_0x20908f(0x233)]===_0x20908f(0x234)&&console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x23f)](_0x20908f(0x1d7)+_0x502f0f[_0x20908f(0x1de)]+_0x20908f(0x1bb)+_0x502f0f['error']));}return 0x1;}console[_0x20908f(0x1b4)](a4_0x56c742[_0x20908f(0x198)](_0x20908f(0x1b9)+(_0x18eae7+_0x2e6e9d)+_0x20908f(0x1b1)+_0x24f270['projectName']+'\x27'));const _0x465cba=getLLMProjectUrl(_0x550731,_0x24f270[_0x20908f(0x19c)]);return console[_0x20908f(0x1b4)](_0x20908f(0x223)+a4_0x56c742[_0x20908f(0x1c0)](_0x465cba)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x51fdad=a5_0x5bb5;(function(_0x3b14ec,_0x86328b){const _0x5b32dd=a5_0x5bb5,_0xacc89=_0x3b14ec();while(!![]){try{const _0x4647d6=-parseInt(_0x5b32dd(0xf2))/0x1*(parseInt(_0x5b32dd(0x12c))/0x2)+-parseInt(_0x5b32dd(0x124))/0x3+-parseInt(_0x5b32dd(0xef))/0x4*(-parseInt(_0x5b32dd(0xee))/0x5)+-parseInt(_0x5b32dd(0x142))/0x6*(-parseInt(_0x5b32dd(0xec))/0x7)+parseInt(_0x5b32dd(0x138))/0x8+parseInt(_0x5b32dd(0x149))/0x9*(parseInt(_0x5b32dd(0xd4))/0xa)+-parseInt(_0x5b32dd(0x13a))/0xb*(parseInt(_0x5b32dd(0xf6))/0xc);if(_0x4647d6===_0x86328b)break;else _0xacc89['push'](_0xacc89['shift']());}catch(_0x1d83fa){_0xacc89['push'](_0xacc89['shift']());}}}(a5_0x4120,0xd1972));import*as a5_0x368b4c from'node:fs';function a5_0x4120(){const _0x138bb8=['site','\x20\x20Agent:\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','toLowerCase','add','tsv','found','Duration:\x20','No\x20tests\x20found\x20matching:\x20','ERROR','Error\x20writing\x20output\x20file:\x20','executeReeval','context','message','tags','2248056lGiJWD','no_context','toISOString','\x27\x20to\x20create\x20the\x20folder\x20structure.','table','New\x20tests\x20to\x20execute:\x20','round','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','196474kcPupx','\x20\x20Site:\x20','name','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','\x20-\x20','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','Running\x20agent\x20tests...','eval','reason','push','includes','4152024jeWlRC','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','286DGWhae','red','Re-evaluating\x20','✗\x20FAIL:\x20','join','Round\x20','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','\x20\x20Round\x20','84ppMsuJ','trim','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','dim','forEach','conversation_url','resolve','99LMlbcr','Project\x20path:\x20','\x20(new)','Re-evaluation\x20Summary','repeat','Run\x20tests\x20for\x20an\x20LLM\x20agent','writeFileSync','white','Output\x20written\x20to:\x20','isSpinning','resolveAgentId','Total:\x20\x20\x20\x20','agentName','\x20\x20Project:\x20','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','...','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','log','rounds','jsonl','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','Failed\x20Tests:','\x20\x20Conversation:\x20','Using\x20agent:\x20','description','Test\x20','FAIL','start','Re-evaluating\x20cached\x20test\x20run...','existsSync','no_tests','source','Passed:\x20\x20\x20','\x22:\x20','\x20\x20-\x20','green','Usage:','filter','597500YUJQVI','not\x20found','cyan','Failed:\x20\x20\x20','Tests\x20found:\x20','...\x20','Running:\x20','404','now','Round\x201/','No\x20tests\x20found\x20with\x20tags:\x20','text','Executing\x20new\x20tests...','size','✗\x20ERROR:\x20','Evaluating\x20response...','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','Either\x20switch\x20to\x20the\x20\x22','projectName','multiple_agents','projectDir','\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)','llmProject','Conversation\x20URL:\x20','396347zNeEPE','Test\x20Summary','5sbBwFJ','5186728zelPpz','status','agent:test','1VDaVyu','\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','\x20(cached)','Run\x20\x27tdx\x20agent\x20pull\x20','719796lHPsLx','Error:\x20No\x20previous\x20test\x20run\x20found.','stop','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','⚠\x20SKIPPED:\x20','some','agent','Errors:\x20\x20\x20','has','llm','✗\x20ERROR:\x20Project\x20not\x20found:\x20','utf-8','tests','Available\x20tags:\x20','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','Available\x20tests:\x20','/<agent-name>','map','find','PASS','length','\x20\x20Evaluating...\x20','yellow','output','Site:\x20',':\x20Sending\x20user\x20input...','No\x20tests\x20have\x20tags\x20defined.','reeval','timestamp','Agent:\x20','Cached\x20run\x20is\x20from\x20site\x20\x22'];a5_0x4120=function(){return _0x138bb8;};return a5_0x4120();}import*as a5_0x19d0ef from'node:path';import a5_0x5114ff from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';function a5_0x5bb5(_0x216a1b,_0x2aef58){_0x216a1b=_0x216a1b-0xb1;const _0x412017=a5_0x4120();let _0x5bb595=_0x412017[_0x216a1b];return _0x5bb595;}import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x51fdad(0x12e)]=a5_0x51fdad(0xf1);[a5_0x51fdad(0xc6)]=a5_0x51fdad(0xb3);async['execute'](_0x2d1b2c){const _0x7cf6d7=a5_0x51fdad,{options:_0x9aa1e,args:_0x1a7a64,tdx:_0x23f152}=_0x2d1b2c,_0x11265d=_0x1a7a64[0x0]||'.',_0x50ac11=_0x9aa1e['dryRun'],_0x50b2d6=_0x9aa1e,_0x1440a8=_0x50b2d6[_0x7cf6d7(0x134)]===![],_0x5e64b5=_0x50b2d6[_0x7cf6d7(0x111)],_0x343c3b=_0x50b2d6[_0x7cf6d7(0x12e)],_0x427d6c=_0x50b2d6[_0x7cf6d7(0x123)],_0x4e7836=_0x9aa1e[_0x7cf6d7(0x115)],_0x269fd1=_0x50b2d6[_0x7cf6d7(0x10d)];if(_0x5e64b5&&_0x1440a8)return console['log'](a5_0x5114ff[_0x7cf6d7(0x13b)](_0x7cf6d7(0xe4))),0x1;let _0x5375ef=_0x7cf6d7(0x128);if(_0x50b2d6['json'])_0x5375ef='json';else{if(_0x50b2d6[_0x7cf6d7(0xc1)])_0x5375ef=_0x7cf6d7(0xc1);else{if(_0x50b2d6['tsv'])_0x5375ef=_0x7cf6d7(0x11a);else{if(_0x50b2d6[_0x7cf6d7(0x128)])_0x5375ef=_0x7cf6d7(0x128);}}}const _0x22117e=_0x50b2d6[_0x7cf6d7(0xea)];let _0x58e311=_0x11265d;const _0x1c5ba5=a5_0x368b4c[_0x7cf6d7(0xcb)](_0x11265d),_0x306d10=_0x11265d==='.';if(!_0x1c5ba5||_0x306d10){const _0x16fa9f=resolveProjectFromContext(_0x11265d,_0x22117e,{'requireFile':'test.yml'});if(_0x16fa9f[_0x7cf6d7(0x11b)])_0x58e311=_0x16fa9f[_0x7cf6d7(0xe8)],_0x16fa9f[_0x7cf6d7(0xcd)]===_0x7cf6d7(0x121)&&console['log'](a5_0x5114ff[_0x7cf6d7(0x145)](_0x7cf6d7(0xc5)+_0x58e311));else switch(_0x16fa9f[_0x7cf6d7(0x135)]){case _0x7cf6d7(0x125):console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x10c)](_0x16fa9f[_0x7cf6d7(0x122)])),console[_0x7cf6d7(0xbf)](),console['log'](_0x7cf6d7(0xd2)),console[_0x7cf6d7(0xbf)](_0x7cf6d7(0xf3)),console['log'](_0x7cf6d7(0xe9)),console[_0x7cf6d7(0xbf)](),console['log'](_0x7cf6d7(0xbe));return 0x1;case'no_local_folder':console['log'](a5_0x5114ff[_0x7cf6d7(0x10c)](_0x16fa9f['message'])),console['log'](),console['log'](_0x7cf6d7(0xf5)+_0x16fa9f[_0x7cf6d7(0xea)]+_0x7cf6d7(0x127));return 0x1;case _0x7cf6d7(0xe7):{const _0x8f911f=a5_0x19d0ef['basename'](_0x16fa9f['projectDir']);console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x10c)](_0x7cf6d7(0x12f)+_0x16fa9f[_0x7cf6d7(0xea)]+'\x22:'));for(const _0xfba7 of _0x16fa9f['agentDirs']){console[_0x7cf6d7(0xbf)](_0x7cf6d7(0xd0)+_0xfba7);}return console['log'](),console[_0x7cf6d7(0xbf)](_0x7cf6d7(0x131)+_0x8f911f+_0x7cf6d7(0x106)),0x1;}case _0x7cf6d7(0xcc):console['log'](a5_0x5114ff['yellow']('No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22'+_0x16fa9f[_0x7cf6d7(0xea)]+'\x22.')),console['log'](a5_0x5114ff[_0x7cf6d7(0x145)](_0x7cf6d7(0x14a)+_0x16fa9f['projectDir'])),console[_0x7cf6d7(0xbf)](),console[_0x7cf6d7(0xbf)]('Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.');return 0x1;}}const {definition:_0x9b9ee6,agentInfo:_0x424eb1}=parseTestFile(_0x58e311);let _0x1e830f=_0x9b9ee6[_0x7cf6d7(0x102)];if(_0x343c3b){const _0xe4a4c2=_0x343c3b['split'](',')[_0x7cf6d7(0x107)](_0x168edf=>_0x168edf[_0x7cf6d7(0x143)]());_0x1e830f=_0x9b9ee6['tests'][_0x7cf6d7(0xd3)](_0x3f1729=>_0xe4a4c2[_0x7cf6d7(0x137)](_0x3f1729[_0x7cf6d7(0x12e)]));if(_0x1e830f['length']===0x0)return console['log'](a5_0x5114ff['yellow'](_0x7cf6d7(0x11d)+_0x343c3b)),console[_0x7cf6d7(0xbf)](a5_0x5114ff['dim'](_0x7cf6d7(0x105)+_0x9b9ee6[_0x7cf6d7(0x102)][_0x7cf6d7(0x107)](_0x2d89e8=>_0x2d89e8[_0x7cf6d7(0x12e)])[_0x7cf6d7(0x13e)](',\x20'))),0x1;}if(_0x427d6c){const _0x546dd9=_0x427d6c['split'](',')[_0x7cf6d7(0x107)](_0x48a601=>_0x48a601[_0x7cf6d7(0x143)]()['toLowerCase']());_0x1e830f=_0x1e830f[_0x7cf6d7(0xd3)](_0x3c64b3=>_0x3c64b3[_0x7cf6d7(0x123)]?.[_0x7cf6d7(0xfb)](_0x19fc7b=>_0x546dd9[_0x7cf6d7(0x137)](_0x19fc7b[_0x7cf6d7(0x118)]())));if(_0x1e830f['length']===0x0){console['log'](a5_0x5114ff[_0x7cf6d7(0x10c)](_0x7cf6d7(0xde)+_0x427d6c));const _0xa41230=new Set();return _0x9b9ee6[_0x7cf6d7(0x102)][_0x7cf6d7(0x146)](_0x2e1450=>_0x2e1450[_0x7cf6d7(0x123)]?.['forEach'](_0xbe9797=>_0xa41230[_0x7cf6d7(0x119)](_0xbe9797))),_0xa41230[_0x7cf6d7(0xe1)]>0x0?console['log'](a5_0x5114ff[_0x7cf6d7(0x145)](_0x7cf6d7(0x103)+[..._0xa41230][_0x7cf6d7(0x13e)](',\x20'))):console[_0x7cf6d7(0xbf)](a5_0x5114ff['dim'](_0x7cf6d7(0x110))),0x1;}}if(_0x5e64b5)return this[_0x7cf6d7(0x120)](_0x2d1b2c,{'definition':{'tests':_0x1e830f},'agentInfo':_0x424eb1,'outputFormat':_0x5375ef,'outputFile':_0x269fd1,'testNames':_0x343c3b});if(_0x50ac11){console['log'](a5_0x5114ff[_0x7cf6d7(0xd6)]('Test\x20Configuration:')),console['log'](_0x7cf6d7(0x12d)+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x4e7836)),console['log'](_0x7cf6d7(0xbb)+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x424eb1[_0x7cf6d7(0xe6)])),console[_0x7cf6d7(0xbf)](_0x7cf6d7(0x116)+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x424eb1[_0x7cf6d7(0xba)])),console[_0x7cf6d7(0xbf)](),console['log'](_0x7cf6d7(0xd8)+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x1e830f['length']));for(let _0xf2c20e=0x0;_0xf2c20e<_0x1e830f[_0x7cf6d7(0x10a)];_0xf2c20e++){const _0x575c83=_0x1e830f[_0xf2c20e],_0x590efb=_0x575c83['rounds'][_0x7cf6d7(0x10a)]===0x1?_0x7cf6d7(0x12a):_0x7cf6d7(0xc0),_0x392d67=_0x575c83['tags']?.['length']?'\x20['+_0x575c83[_0x7cf6d7(0x123)]['join'](',\x20')+']':'';console[_0x7cf6d7(0xbf)]('\x20\x20'+(_0xf2c20e+0x1)+'.\x20'+a5_0x5114ff['white'](_0x575c83[_0x7cf6d7(0x12e)])+'\x20('+_0x575c83[_0x7cf6d7(0xc0)][_0x7cf6d7(0x10a)]+'\x20'+_0x590efb+')'+a5_0x5114ff[_0x7cf6d7(0x145)](_0x392d67));}return 0x0;}let _0x8d8b94,_0x46246d;try{_0x8d8b94=await _0x23f152['llm']['resolveProjectId'](_0x424eb1['projectName']);}catch(_0xc6f10d){const _0x589e67=_0xc6f10d instanceof Error?_0xc6f10d[_0x7cf6d7(0x122)]:String(_0xc6f10d);return _0x589e67['includes']('404')||_0x589e67[_0x7cf6d7(0x118)]()[_0x7cf6d7(0x137)](_0x7cf6d7(0xd5))?console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x13b)](_0x7cf6d7(0x100)+_0x424eb1['projectName'])):console['log'](a5_0x5114ff[_0x7cf6d7(0x13b)](_0x7cf6d7(0xf9)+_0x424eb1['projectName']+_0x7cf6d7(0xcf)+_0x589e67)),0x1;}try{_0x46246d=await _0x23f152[_0x7cf6d7(0xff)][_0x7cf6d7(0xb8)](_0x424eb1[_0x7cf6d7(0xba)],_0x8d8b94);}catch(_0xd9ebec){const _0xc4fd6e=_0xd9ebec instanceof Error?_0xd9ebec['message']:String(_0xd9ebec);return _0xc4fd6e[_0x7cf6d7(0x137)](_0x7cf6d7(0xdb))||_0xc4fd6e[_0x7cf6d7(0x118)]()[_0x7cf6d7(0x137)](_0x7cf6d7(0xd5))?console[_0x7cf6d7(0xbf)](a5_0x5114ff['red'](_0x7cf6d7(0x12b)+_0x424eb1['agentName'])):console['log'](a5_0x5114ff['red']('✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22'+_0x424eb1[_0x7cf6d7(0xba)]+_0x7cf6d7(0xcf)+_0xc4fd6e)),0x1;}let _0x1948dd;if(!_0x1440a8)try{_0x1948dd=await setupEvaluatorAgent(_0x23f152[_0x7cf6d7(0xff)],_0x9aa1e['verbose']);}catch(_0x56bd15){const _0x488882=_0x56bd15 instanceof Error?_0x56bd15['message']:String(_0x56bd15);return console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x13b)](_0x7cf6d7(0x139)+_0x488882)),0x1;}console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0xd6)](_0x7cf6d7(0x133))),console[_0x7cf6d7(0xbf)](_0x7cf6d7(0x10e)+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x4e7836)),console['log'](_0x7cf6d7(0x113)+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x424eb1[_0x7cf6d7(0xe6)]+'/'+_0x424eb1[_0x7cf6d7(0xba)])),console[_0x7cf6d7(0xbf)]();const _0x706691=[],_0x5f2feb=[],_0x859823=Date[_0x7cf6d7(0xdc)]();for(let _0x4d3fd3=0x0;_0x4d3fd3<_0x1e830f[_0x7cf6d7(0x10a)];_0x4d3fd3++){const _0x17708b=_0x1e830f[_0x4d3fd3];_0x1e830f[_0x7cf6d7(0x10a)]>0x1?console[_0x7cf6d7(0xbf)](_0x7cf6d7(0xc7)+(_0x4d3fd3+0x1)+'/'+_0x1e830f[_0x7cf6d7(0x10a)]+':\x20'+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x17708b['name'])):console[_0x7cf6d7(0xbf)]('Running\x20test:\x20'+a5_0x5114ff[_0x7cf6d7(0xb5)](_0x17708b[_0x7cf6d7(0x12e)]));const _0x26f7b7=createCommandSpinner(_0x7cf6d7(0xdd)+_0x17708b[_0x7cf6d7(0xc0)][_0x7cf6d7(0x10a)]+_0x7cf6d7(0x10f));_0x26f7b7[_0x7cf6d7(0xc9)]();try{const {result:_0x4187e9,conversation:_0x208010}=await runTest(_0x23f152[_0x7cf6d7(0xff)],_0x17708b,{'agentId':_0x46246d,'projectId':_0x8d8b94,'site':_0x4e7836,'noEval':_0x1440a8,'evaluatorId':_0x1948dd,'onRoundStart':(_0x37b7b3,_0x2d1a7a)=>{const _0x3dcbd5=_0x7cf6d7;_0x26f7b7['text']=_0x3dcbd5(0x13f)+(_0x37b7b3+0x1)+'/'+_0x2d1a7a+_0x3dcbd5(0x10f);},'onRoundComplete':(_0x179f9f,_0x27a706,_0x3cfb3a)=>{const _0x5103e7=_0x7cf6d7,_0x1e6dbc=formatElapsed(_0x27a706);_0x3cfb3a?console[_0x5103e7(0xbf)](_0x5103e7(0x141)+(_0x179f9f+0x1)+'/'+_0x17708b[_0x5103e7(0xc0)][_0x5103e7(0x10a)]+_0x5103e7(0xd9)+a5_0x5114ff[_0x5103e7(0xd1)]('✓')+'\x20('+_0x1e6dbc+')'):console['log'](_0x5103e7(0x141)+(_0x179f9f+0x1)+'/'+_0x17708b[_0x5103e7(0xc0)][_0x5103e7(0x10a)]+_0x5103e7(0xd9)+a5_0x5114ff['red']('✗'));},'onEvaluationStart':()=>{const _0x52f23c=_0x7cf6d7;_0x26f7b7['text']=_0x52f23c(0xe3);},'onEvaluationComplete':_0x40edd1=>{const _0x551137=_0x7cf6d7,_0x366905=formatElapsed(_0x40edd1);console[_0x551137(0xbf)]('\x20\x20Evaluating...\x20'+a5_0x5114ff[_0x551137(0xd1)]('✓')+'\x20('+_0x366905+')');}});_0x26f7b7[_0x7cf6d7(0xf8)](),_0x706691[_0x7cf6d7(0x136)](_0x4187e9),_0x5f2feb['push'](_0x208010);if(_0x4187e9['status']===_0x7cf6d7(0x109))console[_0x7cf6d7(0xbf)](a5_0x5114ff['green']('✓\x20PASS:\x20'+_0x4187e9[_0x7cf6d7(0x135)]));else _0x4187e9['status']===_0x7cf6d7(0xc8)?console[_0x7cf6d7(0xbf)](a5_0x5114ff['red'](_0x7cf6d7(0x13d)+_0x4187e9['reason'])):console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x13b)](_0x7cf6d7(0xe2)+_0x4187e9[_0x7cf6d7(0x135)]));_0x4187e9[_0x7cf6d7(0x147)]&&console['log'](a5_0x5114ff[_0x7cf6d7(0x145)](_0x7cf6d7(0xeb)+_0x4187e9[_0x7cf6d7(0x147)])),console['log']();}catch(_0x29335f){_0x26f7b7[_0x7cf6d7(0xf8)]();const _0x352107=_0x29335f instanceof Error?_0x29335f[_0x7cf6d7(0x122)]:String(_0x29335f);console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x13b)](_0x7cf6d7(0xe2)+_0x352107)),console[_0x7cf6d7(0xbf)](),_0x706691[_0x7cf6d7(0x136)]({'name':_0x17708b[_0x7cf6d7(0x12e)],'status':_0x7cf6d7(0x11e),'reason':_0x352107,'timestamp':new Date()[_0x7cf6d7(0x126)](),'duration_ms':0x0});}}const _0x288ea4=Date[_0x7cf6d7(0xdc)]()-_0x859823,_0x3e912c=_0x706691[_0x7cf6d7(0xd3)](_0x136902=>_0x136902[_0x7cf6d7(0xf0)]===_0x7cf6d7(0x109))[_0x7cf6d7(0x10a)],_0x4d97aa=_0x706691[_0x7cf6d7(0xd3)](_0x28906f=>_0x28906f['status']===_0x7cf6d7(0xc8))[_0x7cf6d7(0x10a)],_0xae72c4=_0x706691[_0x7cf6d7(0xd3)](_0x12d437=>_0x12d437[_0x7cf6d7(0xf0)]===_0x7cf6d7(0x11e))['length'];console[_0x7cf6d7(0xbf)]('━'[_0x7cf6d7(0xb2)](0x3c)),console['log'](_0x7cf6d7(0xed)),console['log']('━'['repeat'](0x3c)),console[_0x7cf6d7(0xbf)](_0x7cf6d7(0xb9)+_0x706691['length']),console['log'](_0x7cf6d7(0xce)+a5_0x5114ff[_0x7cf6d7(0xd1)](_0x3e912c)),console[_0x7cf6d7(0xbf)]('Failed:\x20\x20\x20'+a5_0x5114ff['red'](_0x4d97aa));_0xae72c4>0x0&&console[_0x7cf6d7(0xbf)](_0x7cf6d7(0xfd)+a5_0x5114ff[_0x7cf6d7(0x13b)](_0xae72c4));console['log'](_0x7cf6d7(0x11c)+formatElapsed(_0x288ea4)),console[_0x7cf6d7(0xbf)]('━'[_0x7cf6d7(0xb2)](0x3c));const _0x2381f5=_0x706691[_0x7cf6d7(0xd3)](_0x2a89fc=>_0x2a89fc[_0x7cf6d7(0xf0)]!==_0x7cf6d7(0x109));if(_0x2381f5[_0x7cf6d7(0x10a)]>0x0){console[_0x7cf6d7(0xbf)](),console[_0x7cf6d7(0xbf)](_0x7cf6d7(0xc3));for(const _0x32ad0c of _0x2381f5){const _0x5e15c2=a5_0x5114ff['red']('✗'),_0x1cd833=_0x32ad0c[_0x7cf6d7(0x135)]['length']>0x32?_0x32ad0c[_0x7cf6d7(0x135)]['substring'](0x0,0x32)+_0x7cf6d7(0xbd):_0x32ad0c[_0x7cf6d7(0x135)];console[_0x7cf6d7(0xbf)]('\x20\x20'+_0x5e15c2+'\x20'+_0x32ad0c['name']+':\x20'+_0x1cd833);}}const _0x517bc3={'summary':{'total':_0x706691[_0x7cf6d7(0x10a)],'passed':_0x3e912c,'failed':_0x4d97aa,'errors':_0xae72c4>0x0?_0xae72c4:undefined,'duration_ms':_0x288ea4},'tests':_0x706691,'agent':{'project':_0x424eb1[_0x7cf6d7(0xe6)],'name':_0x424eb1[_0x7cf6d7(0xba)],'site':_0x4e7836},'timestamp':new Date(_0x859823)[_0x7cf6d7(0x126)]()};try{const _0x3f8d85=buildCachedTestRun(_0x5f2feb,{'site':_0x4e7836,'projectId':_0x8d8b94,'projectName':_0x424eb1[_0x7cf6d7(0xe6)],'agentId':_0x46246d,'agentName':_0x424eb1['agentName'],'testYmlPath':a5_0x19d0ef[_0x7cf6d7(0x148)](_0x424eb1['testYmlPath'])});saveLastTestRun(_0x3f8d85);}catch{}if(_0x5375ef!==_0x7cf6d7(0x128)||_0x269fd1){const _0x416a6a=formatResults(_0x517bc3,_0x5375ef);if(_0x269fd1)try{a5_0x368b4c[_0x7cf6d7(0xb4)](_0x269fd1,_0x416a6a,_0x7cf6d7(0x101)),console[_0x7cf6d7(0xbf)](),console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x145)](_0x7cf6d7(0xb6)+_0x269fd1));}catch(_0x83aa99){return console[_0x7cf6d7(0xbf)](),console[_0x7cf6d7(0xbf)](a5_0x5114ff[_0x7cf6d7(0x13b)](_0x7cf6d7(0x11f)+_0x83aa99)),0x1;}else console[_0x7cf6d7(0xbf)](),console[_0x7cf6d7(0xbf)](_0x416a6a);}return _0x2381f5[_0x7cf6d7(0x10a)]>0x0?0x1:0x0;}async[a5_0x51fdad(0x120)](_0x5aeda8,_0x492c05){const _0x4f7a22=a5_0x51fdad,{options:_0x109dd7,tdx:_0xd2652}=_0x5aeda8,{definition:_0x2bb14a,agentInfo:_0x4b998a,outputFormat:_0x5e503c,outputFile:_0x475252}=_0x492c05,_0x5b0ceb=_0x109dd7[_0x4f7a22(0x115)],_0x25ace0=loadLastTestRun();if(!_0x25ace0)return console[_0x4f7a22(0xbf)](a5_0x5114ff['red'](_0x4f7a22(0xf7))),console['log'](a5_0x5114ff[_0x4f7a22(0x145)](_0x4f7a22(0x132))),0x1;if(_0x25ace0['agent'][_0x4f7a22(0xba)]!==_0x4b998a[_0x4f7a22(0xba)])return console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x13b)](_0x4f7a22(0x140)+_0x25ace0[_0x4f7a22(0xfc)]['agentName']+_0x4f7a22(0x144)+_0x4b998a[_0x4f7a22(0xba)]+'\x22.')),console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x145)](_0x4f7a22(0xbc))),0x1;const _0x5577f4=new Set(_0x25ace0['conversations'][_0x4f7a22(0x107)](_0x265869=>_0x265869['testName'])),_0x42385a=_0x2bb14a[_0x4f7a22(0x102)]['filter'](_0x44130c=>!_0x5577f4[_0x4f7a22(0xfe)](_0x44130c[_0x4f7a22(0x12e)]));if(_0x42385a[_0x4f7a22(0x10a)]>0x0&&_0x25ace0[_0x4f7a22(0x115)]!==_0x5b0ceb)return console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x13b)]('Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.')),console[_0x4f7a22(0xbf)](a5_0x5114ff['dim'](_0x4f7a22(0x114)+_0x25ace0[_0x4f7a22(0x115)]+_0x4f7a22(0x117)+_0x5b0ceb+'\x22.')),console[_0x4f7a22(0xbf)](a5_0x5114ff['dim'](_0x4f7a22(0xe5)+_0x25ace0['site']+_0x4f7a22(0x104))),0x1;const _0x1ce20f=_0x2bb14a[_0x4f7a22(0x102)][_0x4f7a22(0xd3)](_0x4f1e49=>_0x5577f4[_0x4f7a22(0xfe)](_0x4f1e49['name'])),_0x11d6dd=_0x42385a;let _0x4e4f32;try{_0x4e4f32=await setupEvaluatorAgent(_0xd2652['llm'],_0x109dd7['verbose']);}catch(_0x4b73fb){const _0x19d3ad=_0x4b73fb instanceof Error?_0x4b73fb[_0x4f7a22(0x122)]:String(_0x4b73fb);return console['log'](a5_0x5114ff['red']('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x19d3ad)),0x1;}console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0xd6)](_0x4f7a22(0xca))),console[_0x4f7a22(0xbf)]('Cached\x20run\x20from:\x20'+a5_0x5114ff[_0x4f7a22(0xb5)](_0x25ace0[_0x4f7a22(0x112)])),console[_0x4f7a22(0xbf)](_0x4f7a22(0x113)+a5_0x5114ff[_0x4f7a22(0xb5)](_0x25ace0[_0x4f7a22(0xfc)][_0x4f7a22(0xe6)]+'/'+_0x25ace0[_0x4f7a22(0xfc)][_0x4f7a22(0xba)]));_0x11d6dd[_0x4f7a22(0x10a)]>0x0&&console[_0x4f7a22(0xbf)](_0x4f7a22(0x129)+a5_0x5114ff[_0x4f7a22(0x10c)](_0x11d6dd[_0x4f7a22(0x10a)]));console[_0x4f7a22(0xbf)]();const _0x4b4b3c=[],_0x20de4d=Date['now'](),_0x274f11=createCommandSpinner('Re-evaluating...');if(_0x1ce20f[_0x4f7a22(0x10a)]>0x0)try{const _0x40ba2f=await reevaluateFromCache(_0xd2652[_0x4f7a22(0xff)],_0x25ace0,{'tests':_0x1ce20f},{'evaluatorId':_0x4e4f32,'onTestStart':(_0x4ba5f4,_0x5e992c,_0x289b32)=>{const _0x2c67f7=_0x4f7a22;_0x274f11[_0x2c67f7(0xdf)]=_0x2c67f7(0x13c)+(_0x5e992c+0x1)+'/'+_0x289b32+':\x20'+_0x4ba5f4+_0x2c67f7(0xbd);if(!_0x274f11[_0x2c67f7(0xb7)])_0x274f11[_0x2c67f7(0xc9)]();},'onTestComplete':(_0x481d7b,_0xdad91e)=>{const _0x9dc638=_0x4f7a22;_0x274f11[_0x9dc638(0xf8)]();if(_0xdad91e['status']===_0x9dc638(0x109))console[_0x9dc638(0xbf)](a5_0x5114ff[_0x9dc638(0xd1)]('✓\x20PASS:\x20'+_0x481d7b)+a5_0x5114ff['dim'](_0x9dc638(0xf4)));else _0xdad91e[_0x9dc638(0xf0)]===_0x9dc638(0xc8)?console[_0x9dc638(0xbf)](a5_0x5114ff[_0x9dc638(0x13b)]('✗\x20FAIL:\x20'+_0x481d7b+'\x20-\x20'+_0xdad91e[_0x9dc638(0x135)])+a5_0x5114ff[_0x9dc638(0x145)]('\x20(cached)')):console[_0x9dc638(0xbf)](a5_0x5114ff[_0x9dc638(0x13b)]('✗\x20ERROR:\x20'+_0x481d7b+_0x9dc638(0x130)+_0xdad91e[_0x9dc638(0x135)]));_0xdad91e['conversation_url']&&console[_0x9dc638(0xbf)](a5_0x5114ff[_0x9dc638(0x145)](_0x9dc638(0xc4)+_0xdad91e['conversation_url'])),_0x4b4b3c[_0x9dc638(0x136)](_0xdad91e);},'onTestSkipped':(_0x24e4e7,_0x1c65e5)=>{const _0x7e019=_0x4f7a22;_0x274f11[_0x7e019(0xf8)](),console[_0x7e019(0xbf)](a5_0x5114ff['yellow'](_0x7e019(0xfa)+_0x24e4e7+_0x7e019(0x130)+_0x1c65e5));}});for(const _0x5e21a7 of _0x40ba2f){!_0x4b4b3c[_0x4f7a22(0x108)](_0x365378=>_0x365378[_0x4f7a22(0x12e)]===_0x5e21a7['name'])&&_0x4b4b3c[_0x4f7a22(0x136)](_0x5e21a7);}}catch(_0x3f5c65){_0x274f11[_0x4f7a22(0xf8)]();const _0x56a791=_0x3f5c65 instanceof Error?_0x3f5c65['message']:String(_0x3f5c65);return console['log'](a5_0x5114ff[_0x4f7a22(0x13b)](_0x4f7a22(0xc2)+_0x56a791)),0x1;}_0x274f11['stop']();if(_0x11d6dd[_0x4f7a22(0x10a)]>0x0){console[_0x4f7a22(0xbf)](),console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0xd6)](_0x4f7a22(0xe0)));const {projectId:_0x28de2a,agentId:_0x3303a2}=_0x25ace0[_0x4f7a22(0xfc)];for(const _0x46d543 of _0x11d6dd){console[_0x4f7a22(0xbf)](_0x4f7a22(0xda)+a5_0x5114ff['white'](_0x46d543[_0x4f7a22(0x12e)]));const _0xbe8443=createCommandSpinner('Round\x201/'+_0x46d543[_0x4f7a22(0xc0)][_0x4f7a22(0x10a)]+':\x20Sending\x20user\x20input...');_0xbe8443[_0x4f7a22(0xc9)]();try{const {result:_0x2e1ad1}=await runTest(_0xd2652[_0x4f7a22(0xff)],_0x46d543,{'agentId':_0x3303a2,'projectId':_0x28de2a,'site':_0x25ace0[_0x4f7a22(0x115)],'noEval':![],'evaluatorId':_0x4e4f32,'onRoundStart':(_0x4f4c99,_0x2d2f92)=>{const _0x247c50=_0x4f7a22;_0xbe8443[_0x247c50(0xdf)]=_0x247c50(0x13f)+(_0x4f4c99+0x1)+'/'+_0x2d2f92+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x25c116,_0x25b1c9,_0x4ac7d0)=>{const _0x481c11=_0x4f7a22,_0x41e1ab=formatElapsed(_0x25b1c9);_0x4ac7d0?console[_0x481c11(0xbf)](_0x481c11(0x141)+(_0x25c116+0x1)+'/'+_0x46d543[_0x481c11(0xc0)][_0x481c11(0x10a)]+_0x481c11(0xd9)+a5_0x5114ff[_0x481c11(0xd1)]('✓')+'\x20('+_0x41e1ab+')'):console[_0x481c11(0xbf)]('\x20\x20Round\x20'+(_0x25c116+0x1)+'/'+_0x46d543[_0x481c11(0xc0)][_0x481c11(0x10a)]+'...\x20'+a5_0x5114ff[_0x481c11(0x13b)]('✗'));},'onEvaluationStart':()=>{const _0x3a60cb=_0x4f7a22;_0xbe8443[_0x3a60cb(0xdf)]=_0x3a60cb(0xe3);},'onEvaluationComplete':_0x47190e=>{const _0x26a73f=_0x4f7a22,_0x10f174=formatElapsed(_0x47190e);console[_0x26a73f(0xbf)](_0x26a73f(0x10b)+a5_0x5114ff[_0x26a73f(0xd1)]('✓')+'\x20('+_0x10f174+')');}});_0xbe8443[_0x4f7a22(0xf8)](),_0x4b4b3c[_0x4f7a22(0x136)](_0x2e1ad1);if(_0x2e1ad1['status']===_0x4f7a22(0x109))console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0xd1)]('✓\x20PASS:\x20'+_0x2e1ad1['reason'])+a5_0x5114ff[_0x4f7a22(0x145)](_0x4f7a22(0x14b)));else _0x2e1ad1['status']===_0x4f7a22(0xc8)?console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x13b)](_0x4f7a22(0x13d)+_0x2e1ad1[_0x4f7a22(0x135)])+a5_0x5114ff[_0x4f7a22(0x145)](_0x4f7a22(0x14b))):console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x13b)]('✗\x20ERROR:\x20'+_0x2e1ad1[_0x4f7a22(0x135)]));_0x2e1ad1[_0x4f7a22(0x147)]&&console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x145)](_0x4f7a22(0xc4)+_0x2e1ad1[_0x4f7a22(0x147)]));}catch(_0x8d314c){_0xbe8443[_0x4f7a22(0xf8)]();const _0x284868=_0x8d314c instanceof Error?_0x8d314c[_0x4f7a22(0x122)]:String(_0x8d314c);console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x13b)](_0x4f7a22(0xe2)+_0x284868)),_0x4b4b3c['push']({'name':_0x46d543[_0x4f7a22(0x12e)],'status':_0x4f7a22(0x11e),'reason':_0x284868,'timestamp':new Date()[_0x4f7a22(0x126)](),'duration_ms':0x0});}}}console[_0x4f7a22(0xbf)]();const _0x9c7f77=Date[_0x4f7a22(0xdc)]()-_0x20de4d,_0x3e12a2=_0x4b4b3c[_0x4f7a22(0xd3)](_0x414ec1=>_0x414ec1[_0x4f7a22(0xf0)]===_0x4f7a22(0x109))['length'],_0x49c6a9=_0x4b4b3c[_0x4f7a22(0xd3)](_0x274903=>_0x274903[_0x4f7a22(0xf0)]===_0x4f7a22(0xc8))['length'],_0x35df72=_0x4b4b3c['filter'](_0x4c8e85=>_0x4c8e85[_0x4f7a22(0xf0)]===_0x4f7a22(0x11e))[_0x4f7a22(0x10a)];console[_0x4f7a22(0xbf)]('━'[_0x4f7a22(0xb2)](0x3c)),console[_0x4f7a22(0xbf)](_0x4f7a22(0xb1)),console[_0x4f7a22(0xbf)]('━'['repeat'](0x3c)),console[_0x4f7a22(0xbf)](_0x4f7a22(0xb9)+_0x4b4b3c['length']),console[_0x4f7a22(0xbf)](_0x4f7a22(0xce)+a5_0x5114ff[_0x4f7a22(0xd1)](_0x3e12a2)),console[_0x4f7a22(0xbf)](_0x4f7a22(0xd7)+a5_0x5114ff[_0x4f7a22(0x13b)](_0x49c6a9));_0x35df72>0x0&&console[_0x4f7a22(0xbf)]('Errors:\x20\x20\x20'+a5_0x5114ff[_0x4f7a22(0x13b)](_0x35df72));console[_0x4f7a22(0xbf)](_0x4f7a22(0x11c)+formatElapsed(_0x9c7f77)),console[_0x4f7a22(0xbf)]('━'['repeat'](0x3c));const _0xe7ce85={'summary':{'total':_0x4b4b3c[_0x4f7a22(0x10a)],'passed':_0x3e12a2,'failed':_0x49c6a9,'errors':_0x35df72>0x0?_0x35df72:undefined,'duration_ms':_0x9c7f77},'tests':_0x4b4b3c,'agent':{'project':_0x4b998a[_0x4f7a22(0xe6)],'name':_0x4b998a[_0x4f7a22(0xba)],'site':_0x5b0ceb},'timestamp':new Date(_0x20de4d)[_0x4f7a22(0x126)]()};if(_0x5e503c!=='table'||_0x475252){const _0x35211b=formatResults(_0xe7ce85,_0x5e503c);if(_0x475252)try{a5_0x368b4c['writeFileSync'](_0x475252,_0x35211b,_0x4f7a22(0x101)),console[_0x4f7a22(0xbf)](),console['log'](a5_0x5114ff[_0x4f7a22(0x145)](_0x4f7a22(0xb6)+_0x475252));}catch(_0x4e5fc2){return console[_0x4f7a22(0xbf)](),console[_0x4f7a22(0xbf)](a5_0x5114ff[_0x4f7a22(0x13b)]('Error\x20writing\x20output\x20file:\x20'+_0x4e5fc2)),0x1;}else console['log'](),console[_0x4f7a22(0xbf)](_0x35211b);}const _0x51a0ad=_0x4b4b3c['filter'](_0x50ee84=>_0x50ee84['status']!==_0x4f7a22(0x109));return _0x51a0ad[_0x4f7a22(0x10a)]>0x0?0x1:0x0;}}
|
|
1
|
+
function a5_0x1f62(_0x356485,_0x308b74){_0x356485=_0x356485-0xce;const _0x2850f7=a5_0x2850();let _0x1f6228=_0x2850f7[_0x356485];return _0x1f6228;}const a5_0x4c3f92=a5_0x1f62;(function(_0x210390,_0x42e423){const _0x224f4d=a5_0x1f62,_0x2f8bf5=_0x210390();while(!![]){try{const _0xf0e0ba=-parseInt(_0x224f4d(0xef))/0x1*(-parseInt(_0x224f4d(0xfd))/0x2)+parseInt(_0x224f4d(0x10b))/0x3*(-parseInt(_0x224f4d(0x11d))/0x4)+parseInt(_0x224f4d(0x11b))/0x5+-parseInt(_0x224f4d(0x11e))/0x6*(-parseInt(_0x224f4d(0x151))/0x7)+parseInt(_0x224f4d(0x140))/0x8+-parseInt(_0x224f4d(0x11f))/0x9+-parseInt(_0x224f4d(0x13f))/0xa;if(_0xf0e0ba===_0x42e423)break;else _0x2f8bf5['push'](_0x2f8bf5['shift']());}catch(_0x144c8d){_0x2f8bf5['push'](_0x2f8bf5['shift']());}}}(a5_0x2850,0x43622));import*as a5_0x2409c8 from'node:fs';function a5_0x2850(){const _0x3ea0ab=['\x27\x20to\x20create\x20the\x20folder\x20structure.','timestamp','Executing\x20new\x20tests...','Output\x20written\x20to:\x20','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','Failed:\x20\x20\x20','not\x20found','Re-evaluating\x20cached\x20test\x20run...','/<agent-name>','404','resolveAgentId','48tKdBZQ','No\x20tests\x20found\x20with\x20tags:\x20','has','site','\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:\x20Failed\x20to\x20resolve\x20project\x20\x22','Available\x20tags:\x20','Cached\x20run\x20from:\x20','Passed:\x20\x20\x20','multiple_agents','⚠\x20SKIPPED:\x20','repeat','green','Conversation\x20URL:\x20','toISOString','Test\x20Summary','1862980WCvxgz','llmProject','100536ixNzgb','66dWMJAH','2585052YmuJrb','dim','Re-evaluation\x20Summary','Available\x20tests:\x20','Running\x20test:\x20','executeReeval','ERROR','\x22,\x20but\x20current\x20site\x20is\x20\x22','tests','...\x20','yellow','Using\x20agent:\x20','Agent:\x20','Total:\x20\x20\x20\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','found','filter','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','projectName','utf-8','size','llm','Round\x20','✗\x20FAIL:\x20','Tests\x20found:\x20','Running:\x20','✗\x20ERROR:\x20','projectDir','Evaluating\x20response...','isSpinning','test.yml','basename','5037780cOjWcq','3184624HHssfQ','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','Cached\x20run\x20is\x20from\x20site\x20\x22','now','message','agent:test','\x20\x20Evaluating...\x20','red','Test\x20','includes','\x20-\x20','\x20\x20Round\x20','join','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','...','Round\x201/','✓\x20PASS:\x20','308987ZHwzrE','Duration:\x20','testYmlPath','trim','push','no_context','PASS','agent','stop','reason','cyan','forEach','tags','\x20\x20Agent:\x20','FAIL','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','resolveProjectId','length','agentName','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','\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','Test\x20Configuration:','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','Error\x20writing\x20output\x20file:\x20','No\x20tests\x20have\x20tags\x20defined.','Error:\x20No\x20previous\x20test\x20run\x20found.','resolve','some','Failed\x20Tests:','no_local_folder','name','existsSync','toLowerCase','white','json','rounds','Usage:','status','\x20\x20Conversation:\x20','no_tests','round','Re-evaluating...','execute','writeFileSync','conversation_url','verbose','conversations','split','map',':\x20Sending\x20user\x20input...','143BmClzR','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','text','table','dryRun','log','✗\x20ERROR:\x20Project\x20not\x20found:\x20','\x20\x20Site:\x20','find','\x20(cached)','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','\x22:\x20','Errors:\x20\x20\x20','tsv','2978SawqZh','Run\x20tests\x20for\x20an\x20LLM\x20agent','add'];a5_0x2850=function(){return _0x3ea0ab;};return a5_0x2850();}import*as a5_0x33fba1 from'node:path';import a5_0x32dbc7 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_0x4c3f92(0xdb)]=a5_0x4c3f92(0x145);['description']=a5_0x4c3f92(0xfe);async[a5_0x4c3f92(0xe7)](_0x20d885){const _0x4d3273=a5_0x4c3f92,{options:_0x17fcf1,args:_0x5180e8,tdx:_0x1c2fb2}=_0x20d885,_0x353759=_0x5180e8[0x0]||'.',_0x5c7238=_0x17fcf1[_0x4d3273(0xf3)],_0x24cd39=_0x17fcf1,_0x51af2d=_0x24cd39['eval']===![],_0x254e80=_0x24cd39['reeval'],_0x27e16d=_0x24cd39['name'],_0x135227=_0x24cd39[_0x4d3273(0x15d)],_0x33e7a6=_0x17fcf1[_0x4d3273(0x10e)],_0x5bf1e0=_0x24cd39['output'];if(_0x254e80&&_0x51af2d)return console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x147)](_0x4d3273(0xd2))),0x1;let _0x2d1b4c=_0x4d3273(0xf2);if(_0x24cd39[_0x4d3273(0xdf)])_0x2d1b4c=_0x4d3273(0xdf);else{if(_0x24cd39['jsonl'])_0x2d1b4c='jsonl';else{if(_0x24cd39[_0x4d3273(0xfc)])_0x2d1b4c='tsv';else{if(_0x24cd39[_0x4d3273(0xf2)])_0x2d1b4c=_0x4d3273(0xf2);}}}const _0x42fecf=_0x24cd39[_0x4d3273(0x11c)];let _0x583050=_0x353759;const _0x219635=a5_0x2409c8[_0x4d3273(0xdc)](_0x353759),_0x53357e=_0x353759==='.';if(!_0x219635||_0x53357e){const _0x439862=resolveProjectFromContext(_0x353759,_0x42fecf,{'requireFile':_0x4d3273(0x13d)});if(_0x439862[_0x4d3273(0x12e)])_0x583050=_0x439862['projectDir'],_0x439862['source']==='context'&&console[_0x4d3273(0xf4)](a5_0x32dbc7['dim'](_0x4d3273(0x12a)+_0x583050));else switch(_0x439862[_0x4d3273(0x15a)]){case _0x4d3273(0x156):console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x129)](_0x439862[_0x4d3273(0x144)])),console[_0x4d3273(0xf4)](),console[_0x4d3273(0xf4)](_0x4d3273(0xe1)),console[_0x4d3273(0xf4)](_0x4d3273(0xd0)),console['log'](_0x4d3273(0x10f)),console[_0x4d3273(0xf4)](),console[_0x4d3273(0xf4)](_0x4d3273(0x14d));return 0x1;case _0x4d3273(0xda):console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x129)](_0x439862['message'])),console[_0x4d3273(0xf4)](),console[_0x4d3273(0xf4)]('Run\x20\x27tdx\x20agent\x20pull\x20'+_0x439862[_0x4d3273(0x11c)]+_0x4d3273(0x100));return 0x1;case _0x4d3273(0x114):{const _0x400440=a5_0x33fba1[_0x4d3273(0x13e)](_0x439862[_0x4d3273(0x13a)]);console[_0x4d3273(0xf4)](a5_0x32dbc7['yellow'](_0x4d3273(0xf0)+_0x439862[_0x4d3273(0x11c)]+'\x22:'));for(const _0x39250d of _0x439862['agentDirs']){console[_0x4d3273(0xf4)]('\x20\x20-\x20'+_0x39250d);}return console[_0x4d3273(0xf4)](),console['log']('Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/'+_0x400440+_0x4d3273(0x108)),0x1;}case _0x4d3273(0xe4):console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x129)]('No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22'+_0x439862['llmProject']+'\x22.')),console['log'](a5_0x32dbc7['dim']('Project\x20path:\x20'+_0x439862['projectDir'])),console['log'](),console[_0x4d3273(0xf4)](_0x4d3273(0x104));return 0x1;}}const {definition:_0x2a0952,agentInfo:_0x5c646e}=parseTestFile(_0x583050);let _0x39b4a3=_0x2a0952[_0x4d3273(0x127)];if(_0x27e16d){const _0x43c098=_0x27e16d['split'](',')[_0x4d3273(0xed)](_0x1e4456=>_0x1e4456[_0x4d3273(0x154)]());_0x39b4a3=_0x2a0952[_0x4d3273(0x127)][_0x4d3273(0x12f)](_0x563404=>_0x43c098[_0x4d3273(0x149)](_0x563404[_0x4d3273(0xdb)]));if(_0x39b4a3[_0x4d3273(0x163)]===0x0)return console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x129)]('No\x20tests\x20found\x20matching:\x20'+_0x27e16d)),console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x120)](_0x4d3273(0x122)+_0x2a0952[_0x4d3273(0x127)][_0x4d3273(0xed)](_0x275c13=>_0x275c13[_0x4d3273(0xdb)])[_0x4d3273(0x14c)](',\x20'))),0x1;}if(_0x135227){const _0x656d1b=_0x135227[_0x4d3273(0xec)](',')[_0x4d3273(0xed)](_0x38c2da=>_0x38c2da[_0x4d3273(0x154)]()[_0x4d3273(0xdd)]());_0x39b4a3=_0x39b4a3['filter'](_0x1f220d=>_0x1f220d[_0x4d3273(0x15d)]?.[_0x4d3273(0xd8)](_0x1308f4=>_0x656d1b[_0x4d3273(0x149)](_0x1308f4[_0x4d3273(0xdd)]())));if(_0x39b4a3[_0x4d3273(0x163)]===0x0){console['log'](a5_0x32dbc7['yellow'](_0x4d3273(0x10c)+_0x135227));const _0x15e6ee=new Set();return _0x2a0952[_0x4d3273(0x127)][_0x4d3273(0x15c)](_0x5867f6=>_0x5867f6['tags']?.[_0x4d3273(0x15c)](_0x224818=>_0x15e6ee[_0x4d3273(0xff)](_0x224818))),_0x15e6ee[_0x4d3273(0x133)]>0x0?console['log'](a5_0x32dbc7[_0x4d3273(0x120)](_0x4d3273(0x111)+[..._0x15e6ee][_0x4d3273(0x14c)](',\x20'))):console[_0x4d3273(0xf4)](a5_0x32dbc7['dim'](_0x4d3273(0xd5))),0x1;}}if(_0x254e80)return this['executeReeval'](_0x20d885,{'definition':{'tests':_0x39b4a3},'agentInfo':_0x5c646e,'outputFormat':_0x2d1b4c,'outputFile':_0x5bf1e0,'testNames':_0x27e16d});if(_0x5c7238){console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x15b)](_0x4d3273(0xd1))),console[_0x4d3273(0xf4)](_0x4d3273(0xf6)+a5_0x32dbc7[_0x4d3273(0xde)](_0x33e7a6)),console[_0x4d3273(0xf4)]('\x20\x20Project:\x20'+a5_0x32dbc7[_0x4d3273(0xde)](_0x5c646e[_0x4d3273(0x131)])),console[_0x4d3273(0xf4)](_0x4d3273(0x15e)+a5_0x32dbc7['white'](_0x5c646e[_0x4d3273(0xce)])),console['log'](),console[_0x4d3273(0xf4)](_0x4d3273(0x137)+a5_0x32dbc7[_0x4d3273(0xde)](_0x39b4a3[_0x4d3273(0x163)]));for(let _0x2e6d83=0x0;_0x2e6d83<_0x39b4a3['length'];_0x2e6d83++){const _0xd60e3a=_0x39b4a3[_0x2e6d83],_0x52f9a6=_0xd60e3a[_0x4d3273(0xe0)]['length']===0x1?_0x4d3273(0xe5):_0x4d3273(0xe0),_0x44cc8f=_0xd60e3a[_0x4d3273(0x15d)]?.['length']?'\x20['+_0xd60e3a[_0x4d3273(0x15d)][_0x4d3273(0x14c)](',\x20')+']':'';console[_0x4d3273(0xf4)]('\x20\x20'+(_0x2e6d83+0x1)+'.\x20'+a5_0x32dbc7['white'](_0xd60e3a[_0x4d3273(0xdb)])+'\x20('+_0xd60e3a[_0x4d3273(0xe0)][_0x4d3273(0x163)]+'\x20'+_0x52f9a6+')'+a5_0x32dbc7['dim'](_0x44cc8f));}return 0x0;}let _0x4de48e,_0x1ad11c;try{_0x4de48e=await _0x1c2fb2[_0x4d3273(0x134)][_0x4d3273(0x162)](_0x5c646e[_0x4d3273(0x131)]);}catch(_0x1a3099){const _0x13d9d8=_0x1a3099 instanceof Error?_0x1a3099[_0x4d3273(0x144)]:String(_0x1a3099);return _0x13d9d8[_0x4d3273(0x149)](_0x4d3273(0x109))||_0x13d9d8[_0x4d3273(0xdd)]()['includes'](_0x4d3273(0x106))?console['log'](a5_0x32dbc7[_0x4d3273(0x147)](_0x4d3273(0xf5)+_0x5c646e[_0x4d3273(0x131)])):console['log'](a5_0x32dbc7[_0x4d3273(0x147)](_0x4d3273(0x110)+_0x5c646e[_0x4d3273(0x131)]+'\x22:\x20'+_0x13d9d8)),0x1;}try{_0x1ad11c=await _0x1c2fb2[_0x4d3273(0x134)][_0x4d3273(0x10a)](_0x5c646e[_0x4d3273(0xce)],_0x4de48e);}catch(_0x214ab4){const _0x1e0df0=_0x214ab4 instanceof Error?_0x214ab4[_0x4d3273(0x144)]:String(_0x214ab4);return _0x1e0df0[_0x4d3273(0x149)](_0x4d3273(0x109))||_0x1e0df0[_0x4d3273(0xdd)]()[_0x4d3273(0x149)](_0x4d3273(0x106))?console['log'](a5_0x32dbc7['red'](_0x4d3273(0xf9)+_0x5c646e['agentName'])):console['log'](a5_0x32dbc7[_0x4d3273(0x147)]('✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22'+_0x5c646e[_0x4d3273(0xce)]+_0x4d3273(0xfa)+_0x1e0df0)),0x1;}let _0x48615b;if(!_0x51af2d)try{_0x48615b=await setupEvaluatorAgent(_0x1c2fb2[_0x4d3273(0x134)],_0x17fcf1['verbose']);}catch(_0x1fe0d8){const _0x1e1c1d=_0x1fe0d8 instanceof Error?_0x1fe0d8['message']:String(_0x1fe0d8);return console['log'](a5_0x32dbc7[_0x4d3273(0x147)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x1e1c1d)),0x1;}console[_0x4d3273(0xf4)](a5_0x32dbc7['cyan']('Running\x20agent\x20tests...')),console[_0x4d3273(0xf4)]('Site:\x20'+a5_0x32dbc7['white'](_0x33e7a6)),console['log'](_0x4d3273(0x12b)+a5_0x32dbc7[_0x4d3273(0xde)](_0x5c646e[_0x4d3273(0x131)]+'/'+_0x5c646e['agentName'])),console[_0x4d3273(0xf4)]();const _0x24c6ca=[],_0x32c501=[],_0xfae68d=Date[_0x4d3273(0x143)]();for(let _0x338f5a=0x0;_0x338f5a<_0x39b4a3[_0x4d3273(0x163)];_0x338f5a++){const _0x1f959c=_0x39b4a3[_0x338f5a];_0x39b4a3[_0x4d3273(0x163)]>0x1?console['log'](_0x4d3273(0x148)+(_0x338f5a+0x1)+'/'+_0x39b4a3[_0x4d3273(0x163)]+':\x20'+a5_0x32dbc7[_0x4d3273(0xde)](_0x1f959c['name'])):console[_0x4d3273(0xf4)](_0x4d3273(0x123)+a5_0x32dbc7[_0x4d3273(0xde)](_0x1f959c[_0x4d3273(0xdb)]));const _0x14d97a=createCommandSpinner('Round\x201/'+_0x1f959c['rounds']['length']+':\x20Sending\x20user\x20input...');_0x14d97a['start']();try{const {result:_0x4e1455,conversation:_0x7a945a}=await runTest(_0x1c2fb2['llm'],_0x1f959c,{'agentId':_0x1ad11c,'projectId':_0x4de48e,'site':_0x33e7a6,'noEval':_0x51af2d,'evaluatorId':_0x48615b,'onRoundStart':(_0x9e1aca,_0x176fab)=>{const _0x53e833=_0x4d3273;_0x14d97a['text']=_0x53e833(0x135)+(_0x9e1aca+0x1)+'/'+_0x176fab+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x3f4922,_0x5623db,_0x17740c)=>{const _0xc00c2d=_0x4d3273,_0x2da8be=formatElapsed(_0x5623db);_0x17740c?console[_0xc00c2d(0xf4)](_0xc00c2d(0x14b)+(_0x3f4922+0x1)+'/'+_0x1f959c[_0xc00c2d(0xe0)]['length']+'...\x20'+a5_0x32dbc7[_0xc00c2d(0x117)]('✓')+'\x20('+_0x2da8be+')'):console[_0xc00c2d(0xf4)](_0xc00c2d(0x14b)+(_0x3f4922+0x1)+'/'+_0x1f959c['rounds'][_0xc00c2d(0x163)]+'...\x20'+a5_0x32dbc7[_0xc00c2d(0x147)]('✗'));},'onEvaluationStart':()=>{const _0x5dadbc=_0x4d3273;_0x14d97a[_0x5dadbc(0xf1)]=_0x5dadbc(0x13b);},'onEvaluationComplete':_0x1a4a06=>{const _0x3da8b4=_0x4d3273,_0x557afc=formatElapsed(_0x1a4a06);console[_0x3da8b4(0xf4)]('\x20\x20Evaluating...\x20'+a5_0x32dbc7['green']('✓')+'\x20('+_0x557afc+')');}});_0x14d97a['stop'](),_0x24c6ca[_0x4d3273(0x155)](_0x4e1455),_0x32c501['push'](_0x7a945a);if(_0x4e1455[_0x4d3273(0xe2)]==='PASS')console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x117)]('✓\x20PASS:\x20'+_0x4e1455[_0x4d3273(0x15a)]));else _0x4e1455[_0x4d3273(0xe2)]===_0x4d3273(0x15f)?console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x147)](_0x4d3273(0x136)+_0x4e1455['reason'])):console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x147)]('✗\x20ERROR:\x20'+_0x4e1455[_0x4d3273(0x15a)]));_0x4e1455[_0x4d3273(0xe9)]&&console['log'](a5_0x32dbc7[_0x4d3273(0x120)](_0x4d3273(0x118)+_0x4e1455[_0x4d3273(0xe9)])),console[_0x4d3273(0xf4)]();}catch(_0x54d8c9){_0x14d97a['stop']();const _0x17a6e4=_0x54d8c9 instanceof Error?_0x54d8c9[_0x4d3273(0x144)]:String(_0x54d8c9);console['log'](a5_0x32dbc7['red'](_0x4d3273(0x139)+_0x17a6e4)),console['log'](),_0x24c6ca[_0x4d3273(0x155)]({'name':_0x1f959c[_0x4d3273(0xdb)],'status':_0x4d3273(0x125),'reason':_0x17a6e4,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}const _0x2cc9eb=Date[_0x4d3273(0x143)]()-_0xfae68d,_0x528457=_0x24c6ca[_0x4d3273(0x12f)](_0x340fba=>_0x340fba[_0x4d3273(0xe2)]==='PASS')[_0x4d3273(0x163)],_0x27c9ee=_0x24c6ca['filter'](_0x3af547=>_0x3af547[_0x4d3273(0xe2)]===_0x4d3273(0x15f))[_0x4d3273(0x163)],_0x2e7fd2=_0x24c6ca[_0x4d3273(0x12f)](_0x1a353e=>_0x1a353e['status']===_0x4d3273(0x125))[_0x4d3273(0x163)];console[_0x4d3273(0xf4)]('━'[_0x4d3273(0x116)](0x3c)),console['log'](_0x4d3273(0x11a)),console[_0x4d3273(0xf4)]('━'[_0x4d3273(0x116)](0x3c)),console[_0x4d3273(0xf4)](_0x4d3273(0x12c)+_0x24c6ca[_0x4d3273(0x163)]),console[_0x4d3273(0xf4)](_0x4d3273(0x113)+a5_0x32dbc7[_0x4d3273(0x117)](_0x528457)),console[_0x4d3273(0xf4)]('Failed:\x20\x20\x20'+a5_0x32dbc7[_0x4d3273(0x147)](_0x27c9ee));_0x2e7fd2>0x0&&console['log'](_0x4d3273(0xfb)+a5_0x32dbc7[_0x4d3273(0x147)](_0x2e7fd2));console[_0x4d3273(0xf4)]('Duration:\x20'+formatElapsed(_0x2cc9eb)),console[_0x4d3273(0xf4)]('━'[_0x4d3273(0x116)](0x3c));const _0x350ed2=_0x24c6ca[_0x4d3273(0x12f)](_0x11b988=>_0x11b988[_0x4d3273(0xe2)]!=='PASS');if(_0x350ed2[_0x4d3273(0x163)]>0x0){console['log'](),console['log'](_0x4d3273(0xd9));for(const _0x3e337f of _0x350ed2){const _0x504c0c=a5_0x32dbc7['red']('✗'),_0x5831fa=_0x3e337f[_0x4d3273(0x15a)][_0x4d3273(0x163)]>0x32?_0x3e337f[_0x4d3273(0x15a)]['substring'](0x0,0x32)+_0x4d3273(0x14e):_0x3e337f[_0x4d3273(0x15a)];console['log']('\x20\x20'+_0x504c0c+'\x20'+_0x3e337f[_0x4d3273(0xdb)]+':\x20'+_0x5831fa);}}const _0x53d6f2={'summary':{'total':_0x24c6ca[_0x4d3273(0x163)],'passed':_0x528457,'failed':_0x27c9ee,'errors':_0x2e7fd2>0x0?_0x2e7fd2:undefined,'duration_ms':_0x2cc9eb},'tests':_0x24c6ca,'agent':{'project':_0x5c646e[_0x4d3273(0x131)],'name':_0x5c646e[_0x4d3273(0xce)],'site':_0x33e7a6},'timestamp':new Date(_0xfae68d)[_0x4d3273(0x119)]()};try{const _0x1ee2d3=buildCachedTestRun(_0x32c501,{'site':_0x33e7a6,'projectId':_0x4de48e,'projectName':_0x5c646e[_0x4d3273(0x131)],'agentId':_0x1ad11c,'agentName':_0x5c646e[_0x4d3273(0xce)],'testYmlPath':a5_0x33fba1[_0x4d3273(0xd7)](_0x5c646e[_0x4d3273(0x153)])});saveLastTestRun(_0x1ee2d3);}catch{}if(_0x2d1b4c!==_0x4d3273(0xf2)||_0x5bf1e0){const _0x59b50d=formatResults(_0x53d6f2,_0x2d1b4c);if(_0x5bf1e0)try{a5_0x2409c8[_0x4d3273(0xe8)](_0x5bf1e0,_0x59b50d,_0x4d3273(0x132)),console[_0x4d3273(0xf4)](),console[_0x4d3273(0xf4)](a5_0x32dbc7[_0x4d3273(0x120)](_0x4d3273(0x103)+_0x5bf1e0));}catch(_0x30fac9){return console[_0x4d3273(0xf4)](),console[_0x4d3273(0xf4)](a5_0x32dbc7['red'](_0x4d3273(0xd4)+_0x30fac9)),0x1;}else console[_0x4d3273(0xf4)](),console['log'](_0x59b50d);}return _0x350ed2[_0x4d3273(0x163)]>0x0?0x1:0x0;}async[a5_0x4c3f92(0x124)](_0x5d54e9,_0x5bebf1){const _0x122f0b=a5_0x4c3f92,{options:_0x47a628,tdx:_0x463749}=_0x5d54e9,{definition:_0x4c8a57,agentInfo:_0x2f8f49,outputFormat:_0xd3002b,outputFile:_0x4d9f9a}=_0x5bebf1,_0x168af8=_0x47a628[_0x122f0b(0x10e)],_0x155f9b=loadLastTestRun();if(!_0x155f9b)return console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x147)](_0x122f0b(0xd6))),console['log'](a5_0x32dbc7['dim'](_0x122f0b(0x12d))),0x1;if(_0x155f9b[_0x122f0b(0x158)][_0x122f0b(0xce)]!==_0x2f8f49[_0x122f0b(0xce)])return console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x147)]('Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22'+_0x155f9b['agent']['agentName']+_0x122f0b(0x161)+_0x2f8f49[_0x122f0b(0xce)]+'\x22.')),console[_0x122f0b(0xf4)](a5_0x32dbc7['dim'](_0x122f0b(0x130))),0x1;const _0x2e4738=new Set(_0x155f9b[_0x122f0b(0xeb)][_0x122f0b(0xed)](_0x4124bc=>_0x4124bc['testName'])),_0x4f0feb=_0x4c8a57[_0x122f0b(0x127)][_0x122f0b(0x12f)](_0x4c5f27=>!_0x2e4738[_0x122f0b(0x10d)](_0x4c5f27[_0x122f0b(0xdb)]));if(_0x4f0feb[_0x122f0b(0x163)]>0x0&&_0x155f9b['site']!==_0x168af8)return console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x147)](_0x122f0b(0xcf))),console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x120)](_0x122f0b(0x142)+_0x155f9b['site']+_0x122f0b(0x126)+_0x168af8+'\x22.')),console['log'](a5_0x32dbc7[_0x122f0b(0x120)]('Either\x20switch\x20to\x20the\x20\x22'+_0x155f9b['site']+_0x122f0b(0xd3))),0x1;const _0x1f37b3=_0x4c8a57['tests'][_0x122f0b(0x12f)](_0x674928=>_0x2e4738['has'](_0x674928[_0x122f0b(0xdb)])),_0x1201fc=_0x4f0feb;let _0x18af52;try{_0x18af52=await setupEvaluatorAgent(_0x463749['llm'],_0x47a628[_0x122f0b(0xea)]);}catch(_0x1ea328){const _0x4e86de=_0x1ea328 instanceof Error?_0x1ea328['message']:String(_0x1ea328);return console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x147)](_0x122f0b(0x160)+_0x4e86de)),0x1;}console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x15b)](_0x122f0b(0x107))),console[_0x122f0b(0xf4)](_0x122f0b(0x112)+a5_0x32dbc7[_0x122f0b(0xde)](_0x155f9b[_0x122f0b(0x101)])),console['log'](_0x122f0b(0x12b)+a5_0x32dbc7['white'](_0x155f9b[_0x122f0b(0x158)][_0x122f0b(0x131)]+'/'+_0x155f9b[_0x122f0b(0x158)][_0x122f0b(0xce)]));_0x1201fc['length']>0x0&&console[_0x122f0b(0xf4)]('New\x20tests\x20to\x20execute:\x20'+a5_0x32dbc7[_0x122f0b(0x129)](_0x1201fc[_0x122f0b(0x163)]));console['log']();const _0x17b289=[],_0x20af69=Date['now'](),_0x4af60b=createCommandSpinner(_0x122f0b(0xe6));if(_0x1f37b3[_0x122f0b(0x163)]>0x0)try{const _0x19f898=await reevaluateFromCache(_0x463749[_0x122f0b(0x134)],_0x155f9b,{'tests':_0x1f37b3},{'evaluatorId':_0x18af52,'onTestStart':(_0x498a2a,_0x525095,_0x339545)=>{const _0x57d0b7=_0x122f0b;_0x4af60b[_0x57d0b7(0xf1)]='Re-evaluating\x20'+(_0x525095+0x1)+'/'+_0x339545+':\x20'+_0x498a2a+_0x57d0b7(0x14e);if(!_0x4af60b[_0x57d0b7(0x13c)])_0x4af60b['start']();},'onTestComplete':(_0x262958,_0x117b9d)=>{const _0x59ba9d=_0x122f0b;_0x4af60b['stop']();if(_0x117b9d['status']===_0x59ba9d(0x157))console[_0x59ba9d(0xf4)](a5_0x32dbc7[_0x59ba9d(0x117)]('✓\x20PASS:\x20'+_0x262958)+a5_0x32dbc7['dim'](_0x59ba9d(0xf8)));else _0x117b9d['status']===_0x59ba9d(0x15f)?console[_0x59ba9d(0xf4)](a5_0x32dbc7['red'](_0x59ba9d(0x136)+_0x262958+_0x59ba9d(0x14a)+_0x117b9d[_0x59ba9d(0x15a)])+a5_0x32dbc7['dim'](_0x59ba9d(0xf8))):console[_0x59ba9d(0xf4)](a5_0x32dbc7['red']('✗\x20ERROR:\x20'+_0x262958+'\x20-\x20'+_0x117b9d[_0x59ba9d(0x15a)]));_0x117b9d['conversation_url']&&console[_0x59ba9d(0xf4)](a5_0x32dbc7['dim'](_0x59ba9d(0xe3)+_0x117b9d[_0x59ba9d(0xe9)])),_0x17b289[_0x59ba9d(0x155)](_0x117b9d);},'onTestSkipped':(_0x13491d,_0x4a06c5)=>{const _0x138db7=_0x122f0b;_0x4af60b['stop'](),console['log'](a5_0x32dbc7['yellow'](_0x138db7(0x115)+_0x13491d+_0x138db7(0x14a)+_0x4a06c5));}});for(const _0x1eaf9a of _0x19f898){!_0x17b289[_0x122f0b(0xf7)](_0x21c94f=>_0x21c94f['name']===_0x1eaf9a[_0x122f0b(0xdb)])&&_0x17b289[_0x122f0b(0x155)](_0x1eaf9a);}}catch(_0x5b5af0){_0x4af60b['stop']();const _0x4c4149=_0x5b5af0 instanceof Error?_0x5b5af0[_0x122f0b(0x144)]:String(_0x5b5af0);return console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x147)](_0x122f0b(0x141)+_0x4c4149)),0x1;}_0x4af60b[_0x122f0b(0x159)]();if(_0x1201fc['length']>0x0){console['log'](),console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x15b)](_0x122f0b(0x102)));const {projectId:_0x387f37,agentId:_0x3f26af}=_0x155f9b['agent'];for(const _0x410137 of _0x1201fc){console[_0x122f0b(0xf4)](_0x122f0b(0x138)+a5_0x32dbc7[_0x122f0b(0xde)](_0x410137['name']));const _0x5a2b56=createCommandSpinner(_0x122f0b(0x14f)+_0x410137[_0x122f0b(0xe0)]['length']+':\x20Sending\x20user\x20input...');_0x5a2b56['start']();try{const {result:_0x5e7aab}=await runTest(_0x463749['llm'],_0x410137,{'agentId':_0x3f26af,'projectId':_0x387f37,'site':_0x155f9b[_0x122f0b(0x10e)],'noEval':![],'evaluatorId':_0x18af52,'onRoundStart':(_0xaaef2f,_0x1dfc24)=>{const _0x4ae78a=_0x122f0b;_0x5a2b56['text']=_0x4ae78a(0x135)+(_0xaaef2f+0x1)+'/'+_0x1dfc24+_0x4ae78a(0xee);},'onRoundComplete':(_0x2047c8,_0xa05eb4,_0x3af40b)=>{const _0x5b341a=_0x122f0b,_0x2d669b=formatElapsed(_0xa05eb4);_0x3af40b?console[_0x5b341a(0xf4)]('\x20\x20Round\x20'+(_0x2047c8+0x1)+'/'+_0x410137[_0x5b341a(0xe0)]['length']+'...\x20'+a5_0x32dbc7[_0x5b341a(0x117)]('✓')+'\x20('+_0x2d669b+')'):console[_0x5b341a(0xf4)](_0x5b341a(0x14b)+(_0x2047c8+0x1)+'/'+_0x410137[_0x5b341a(0xe0)][_0x5b341a(0x163)]+_0x5b341a(0x128)+a5_0x32dbc7[_0x5b341a(0x147)]('✗'));},'onEvaluationStart':()=>{const _0x44257c=_0x122f0b;_0x5a2b56[_0x44257c(0xf1)]='Evaluating\x20response...';},'onEvaluationComplete':_0x4083a7=>{const _0x1bffb1=_0x122f0b,_0x464cff=formatElapsed(_0x4083a7);console[_0x1bffb1(0xf4)](_0x1bffb1(0x146)+a5_0x32dbc7[_0x1bffb1(0x117)]('✓')+'\x20('+_0x464cff+')');}});_0x5a2b56[_0x122f0b(0x159)](),_0x17b289[_0x122f0b(0x155)](_0x5e7aab);if(_0x5e7aab['status']===_0x122f0b(0x157))console['log'](a5_0x32dbc7[_0x122f0b(0x117)](_0x122f0b(0x150)+_0x5e7aab[_0x122f0b(0x15a)])+a5_0x32dbc7[_0x122f0b(0x120)]('\x20(new)'));else _0x5e7aab[_0x122f0b(0xe2)]===_0x122f0b(0x15f)?console[_0x122f0b(0xf4)](a5_0x32dbc7['red'](_0x122f0b(0x136)+_0x5e7aab['reason'])+a5_0x32dbc7[_0x122f0b(0x120)]('\x20(new)')):console[_0x122f0b(0xf4)](a5_0x32dbc7['red']('✗\x20ERROR:\x20'+_0x5e7aab[_0x122f0b(0x15a)]));_0x5e7aab[_0x122f0b(0xe9)]&&console['log'](a5_0x32dbc7[_0x122f0b(0x120)](_0x122f0b(0xe3)+_0x5e7aab[_0x122f0b(0xe9)]));}catch(_0x289a45){_0x5a2b56['stop']();const _0x27b772=_0x289a45 instanceof Error?_0x289a45[_0x122f0b(0x144)]:String(_0x289a45);console['log'](a5_0x32dbc7[_0x122f0b(0x147)]('✗\x20ERROR:\x20'+_0x27b772)),_0x17b289[_0x122f0b(0x155)]({'name':_0x410137[_0x122f0b(0xdb)],'status':'ERROR','reason':_0x27b772,'timestamp':new Date()[_0x122f0b(0x119)](),'duration_ms':0x0});}}}console[_0x122f0b(0xf4)]();const _0x864804=Date['now']()-_0x20af69,_0x4c6f52=_0x17b289[_0x122f0b(0x12f)](_0x5d5ab4=>_0x5d5ab4['status']==='PASS')[_0x122f0b(0x163)],_0x5035ec=_0x17b289['filter'](_0x122442=>_0x122442['status']==='FAIL')['length'],_0xfa3165=_0x17b289['filter'](_0x43c14b=>_0x43c14b[_0x122f0b(0xe2)]==='ERROR')['length'];console[_0x122f0b(0xf4)]('━'[_0x122f0b(0x116)](0x3c)),console[_0x122f0b(0xf4)](_0x122f0b(0x121)),console[_0x122f0b(0xf4)]('━'['repeat'](0x3c)),console['log'](_0x122f0b(0x12c)+_0x17b289[_0x122f0b(0x163)]),console[_0x122f0b(0xf4)]('Passed:\x20\x20\x20'+a5_0x32dbc7['green'](_0x4c6f52)),console[_0x122f0b(0xf4)](_0x122f0b(0x105)+a5_0x32dbc7[_0x122f0b(0x147)](_0x5035ec));_0xfa3165>0x0&&console[_0x122f0b(0xf4)](_0x122f0b(0xfb)+a5_0x32dbc7[_0x122f0b(0x147)](_0xfa3165));console[_0x122f0b(0xf4)](_0x122f0b(0x152)+formatElapsed(_0x864804)),console[_0x122f0b(0xf4)]('━'[_0x122f0b(0x116)](0x3c));const _0x16fbe5={'summary':{'total':_0x17b289[_0x122f0b(0x163)],'passed':_0x4c6f52,'failed':_0x5035ec,'errors':_0xfa3165>0x0?_0xfa3165:undefined,'duration_ms':_0x864804},'tests':_0x17b289,'agent':{'project':_0x2f8f49[_0x122f0b(0x131)],'name':_0x2f8f49[_0x122f0b(0xce)],'site':_0x168af8},'timestamp':new Date(_0x20af69)[_0x122f0b(0x119)]()};if(_0xd3002b!==_0x122f0b(0xf2)||_0x4d9f9a){const _0x126fc6=formatResults(_0x16fbe5,_0xd3002b);if(_0x4d9f9a)try{a5_0x2409c8[_0x122f0b(0xe8)](_0x4d9f9a,_0x126fc6,_0x122f0b(0x132)),console[_0x122f0b(0xf4)](),console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x120)](_0x122f0b(0x103)+_0x4d9f9a));}catch(_0x67c098){return console[_0x122f0b(0xf4)](),console[_0x122f0b(0xf4)](a5_0x32dbc7[_0x122f0b(0x147)](_0x122f0b(0xd4)+_0x67c098)),0x1;}else console[_0x122f0b(0xf4)](),console[_0x122f0b(0xf4)](_0x126fc6);}const _0x32a6d7=_0x17b289[_0x122f0b(0x12f)](_0x3a30c7=>_0x3a30c7['status']!==_0x122f0b(0x157));return _0x32a6d7['length']>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x39c2c6=a6_0x3335;(function(_0x37d326,_0x14ddab){const _0xc232e6=a6_0x3335,_0x1b5c18=_0x37d326();while(!![]){try{const _0x5f309d=-parseInt(_0xc232e6(0x19c))/0x1+parseInt(_0xc232e6(0x168))/0x2+-parseInt(_0xc232e6(0x177))/0x3*(-parseInt(_0xc232e6(0x167))/0x4)+-parseInt(_0xc232e6(0x17b))/0x5+parseInt(_0xc232e6(0x176))/0x6*(-parseInt(_0xc232e6(0x17d))/0x7)+-parseInt(_0xc232e6(0x173))/0x8*(parseInt(_0xc232e6(0x193))/0x9)+parseInt(_0xc232e6(0x165))/0xa;if(_0x5f309d===_0x14ddab)break;else _0x1b5c18['push'](_0x1b5c18['shift']());}catch(_0x406dca){_0x1b5c18['push'](_0x1b5c18['shift']());}}}(a6_0x2807,0x7c1e4));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';function a6_0x2807(){const _0x4ce357=['startsWith','includes','api','Results\x20saved\x20to\x20','site','request','Invalid\x20API\x20type:\x20','Endpoint\x20must\x20start\x20with\x20/:\x20','workflow','keys','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','error','type','verbose','set-cookie','set-cookie2','readBodyFromFile','827829NzvRZP','proxy-authorization','x-auth-token','llm-proxy','file','noColor','headers','log','execute','267253juAEjk','Invalid\x20header\x20format:\x20\x22','authorization','Invalid\x20HTTP\x20method:\x20','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','toUpperCase','trim','color','llm','message','body','toLowerCase','1467130bfEpDB','stack','44fXaMLi','1223502gnoYtp','GET','validate','<\x20HTTP/1.1\x20','\x22.\x20','method','Error:\x20','PATCH','isArray','output','\x0aStack\x20trace:\x0a','8jDYWeS','description','status','79812gDiiXX','169833nqtUpb','has','length','data','173455bjavxW','substring','252vzDiUU','join','entries','x-trino-user','POST'];a6_0x2807=function(){return _0x4ce357;};return a6_0x2807();}import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a6_0x39c2c6(0x19e),a6_0x39c2c6(0x194),'cookie',a6_0x39c2c6(0x190),a6_0x39c2c6(0x191),'x-xsrf-token',a6_0x39c2c6(0x195),a6_0x39c2c6(0x180)]);function a6_0x3335(_0x232f47,_0x2f3521){_0x232f47=_0x232f47-0x163;const _0x280749=a6_0x2807();let _0x333529=_0x280749[_0x232f47];return _0x333529;}function isSensitiveHeader(_0x324dc4){const _0x29810b=a6_0x39c2c6;return SENSITIVE_HEADERS[_0x29810b(0x178)](_0x324dc4[_0x29810b(0x164)]());}function parseHeader(_0x23bd78){const _0x43e384=a6_0x39c2c6,_0x23b418=_0x23bd78['indexOf'](':');if(_0x23b418===-0x1)throw new Error(_0x43e384(0x19d)+_0x23bd78+_0x43e384(0x16c)+_0x43e384(0x1a0));const _0x230ce4=_0x23bd78['substring'](0x0,_0x23b418)[_0x43e384(0x1a2)](),_0x590f69=_0x23bd78[_0x43e384(0x17c)](_0x23b418+0x1)['trim']();if(!_0x230ce4)throw new Error('Header\x20key\x20cannot\x20be\x20empty:\x20\x22'+_0x23bd78+'\x22');return[_0x230ce4,_0x590f69];}export class ApiCommand extends BaseCommand{['name']=a6_0x39c2c6(0x184);[a6_0x39c2c6(0x174)]='Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs';[a6_0x39c2c6(0x16a)](_0xbeead1){const _0x2cf113=a6_0x39c2c6,{args:_0xca9fd8,options:_0xefd88c}=_0xbeead1,_0xb85296=_0xefd88c;if(_0xca9fd8[_0x2cf113(0x179)]===0x0)return'Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list';const _0x3cbb51=_0xca9fd8[0x0];if(!_0x3cbb51[_0x2cf113(0x182)]('/'))return _0x2cf113(0x189)+_0x3cbb51;const _0x13eafe=_0xb85296[_0x2cf113(0x17a)],_0x11589b=_0xb85296[_0x2cf113(0x197)];if(_0x13eafe&&_0x11589b)return _0x2cf113(0x18c);const _0x2cc984=_0xb85296[_0x2cf113(0x16d)]||_0x2cf113(0x169),_0x2d062e=[_0x2cf113(0x169),_0x2cf113(0x181),'PUT','DELETE',_0x2cf113(0x16f)];if(!_0x2d062e[_0x2cf113(0x183)](_0x2cc984['toUpperCase']()))return _0x2cf113(0x19f)+_0x2cc984+'.\x20Valid\x20methods:\x20'+_0x2d062e[_0x2cf113(0x17e)](',\x20');const _0x17e9f5=_0xb85296[_0x2cf113(0x18e)]||'td',_0x315a25=['td','cdp',_0x2cf113(0x18a),'trino',_0x2cf113(0x1a4),_0x2cf113(0x196)];if(!_0x315a25[_0x2cf113(0x183)](_0x17e9f5))return _0x2cf113(0x188)+_0x17e9f5+'.\x20Valid\x20types:\x20'+_0x315a25[_0x2cf113(0x17e)](',\x20');return undefined;}async[a6_0x39c2c6(0x19b)](_0x36b29b){const _0x1e7456=a6_0x39c2c6,{options:_0xc0a1c3,args:_0x1f002d,tdx:_0xd47c93}=_0x36b29b,_0xad0dd6=_0xc0a1c3,_0x262440=_0x1f002d[0x0],_0x38b2df=(_0xad0dd6[_0x1e7456(0x16d)]||'GET')[_0x1e7456(0x1a1)](),_0xa5e5a1=_0xad0dd6[_0x1e7456(0x17a)],_0x135f98=_0xad0dd6['file'],_0x13e1d8=_0xad0dd6['header'],_0x33da4a=_0xad0dd6[_0x1e7456(0x18e)]||'td';try{const _0x62f8a8={};if(_0x13e1d8){const _0x4c2a6e=Array[_0x1e7456(0x170)](_0x13e1d8)?_0x13e1d8:[_0x13e1d8];for(const _0x404bc1 of _0x4c2a6e){const [_0x5530ce,_0x4cd2f6]=parseHeader(_0x404bc1);_0x62f8a8[_0x5530ce]=_0x4cd2f6;}}let _0x55a2b2;if(_0xa5e5a1)_0x55a2b2=_0xa5e5a1;else{if(_0x135f98)try{_0x55a2b2=RawAPI[_0x1e7456(0x192)](_0x135f98);}catch(_0x130ad8){return console[_0x1e7456(0x18d)](_0x1e7456(0x16e)+(_0x130ad8 instanceof Error?_0x130ad8[_0x1e7456(0x1a5)]:String(_0x130ad8))),0x1;}}const _0x178e9b={'method':_0x38b2df,'apiType':_0x33da4a,'includeHeaders':_0xc0a1c3[_0x1e7456(0x18f)]};_0x55a2b2&&(_0x178e9b[_0x1e7456(0x163)]=_0x55a2b2);Object[_0x1e7456(0x18b)](_0x62f8a8)['length']>0x0&&(_0x178e9b[_0x1e7456(0x199)]=_0x62f8a8);if(_0xc0a1c3['verbose']){const _0x4d83d9=resolveSite(_0xc0a1c3[_0x1e7456(0x186)]),_0x378bea=getEndpoint(_0x4d83d9,_0x33da4a),_0x501629=''+_0x378bea+_0x262440;console['error']('>\x20'+_0x38b2df+'\x20'+_0x501629);const _0x3fa77b=getAuthHeaders(_0x4d83d9),_0x280ac5={..._0x3fa77b,..._0x62f8a8};for(const [_0x42d4b3,_0x48a6c1]of Object[_0x1e7456(0x17f)](_0x280ac5)){!isSensitiveHeader(_0x42d4b3)&&console['error']('>\x20'+_0x42d4b3+':\x20'+_0x48a6c1);}_0x55a2b2&&console[_0x1e7456(0x18d)]('>'),console['error']('');}const _0x196a12=await _0xd47c93[_0x1e7456(0x184)][_0x1e7456(0x187)](_0x262440,_0x178e9b);if(_0xc0a1c3['verbose']&&_0x196a12[_0x1e7456(0x199)]){console['error'](_0x1e7456(0x16b)+_0x196a12[_0x1e7456(0x175)]);for(const [_0x4f37fb,_0x381526]of Object[_0x1e7456(0x17f)](_0x196a12[_0x1e7456(0x199)])){!isSensitiveHeader(_0x4f37fb)&&console[_0x1e7456(0x18d)]('<\x20'+_0x4f37fb+':\x20'+_0x381526);}console[_0x1e7456(0x18d)]('');}const _0x2a168a=Boolean(_0xc0a1c3[_0x1e7456(0x171)]),_0x83c9f2={'color':_0xc0a1c3[_0x1e7456(0x1a3)],'noColor':_0xc0a1c3[_0x1e7456(0x198)]||_0x2a168a&&!_0xc0a1c3[_0x1e7456(0x1a3)]},_0x3a0f53=colorizeJSON(_0x196a12['data'],_0x83c9f2);return _0xc0a1c3['output']?(writeFileSync(_0xc0a1c3['output'],_0x3a0f53),console['error'](_0x1e7456(0x185)+_0xc0a1c3[_0x1e7456(0x171)])):console[_0x1e7456(0x19a)](_0x3a0f53),0x0;}catch(_0x18bfb4){return _0x18bfb4 instanceof Error?(console['error']('Error:\x20'+_0x18bfb4['message']),_0xc0a1c3[_0x1e7456(0x18f)]&&_0x18bfb4[_0x1e7456(0x166)]&&console[_0x1e7456(0x18d)](_0x1e7456(0x172)+_0x18bfb4[_0x1e7456(0x166)])):console[_0x1e7456(0x18d)]('Error:\x20'+String(_0x18bfb4)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x12de54=a7_0x2f70;(function(_0x257fe7,_0x2c3bf1){const _0x72531d=a7_0x2f70,_0x20e7a2=_0x257fe7();while(!![]){try{const _0x3d1d5f=-parseInt(_0x72531d(0x154))/0x1+parseInt(_0x72531d(0x157))/0x2+parseInt(_0x72531d(0x14d))/0x3*(parseInt(_0x72531d(0x15a))/0x4)+parseInt(_0x72531d(0x120))/0x5*(parseInt(_0x72531d(0x134))/0x6)+parseInt(_0x72531d(0x11d))/0x7+parseInt(_0x72531d(0x11b))/0x8*(parseInt(_0x72531d(0x12b))/0x9)+-parseInt(_0x72531d(0x130))/0xa*(parseInt(_0x72531d(0x15c))/0xb);if(_0x3d1d5f===_0x2c3bf1)break;else _0x20e7a2['push'](_0x20e7a2['shift']());}catch(_0x199724){_0x20e7a2['push'](_0x20e7a2['shift']());}}}(a7_0x5d04,0x44aa7));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';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_0x3af851 from'prompts';import{HTTPClientError}from'../sdk/client/http-client.js';import{TDX}from'../sdk/index.js';function a7_0x5d04(){const _0x45cf19=['profile','10EPTwsc','✓\x20Authentication\x20successful\x0a','us01','all','1068Foqlaa','No\x20credential\x20found','\x20\x20tdx','✗\x20Validation\x20failed:\x20','User:\x20','Name:\x20','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','\x20for\x20profile:\x20','log','Remove\x20API\x20key\x20from\x20system\x20keychain','API\x20Key','logLevel','API\x20key\x20cannot\x20be\x20empty','oauth','API\x20key','Setting\x20up\x20authentication\x20for\x20site:\x20','warn','join','tdx:\x20auth\x20setup','N/A','\x20and\x20','error','method','password','auth','479949XiraAb','email','✓\x20Profile\x20\x27','filter','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','✓\x20Default\x20site\x20set\x20to\x20','356764RjFTbt','tdx:\x20auth\x20clear','Read\x20credential\x20from\x20','345148yJtXcB','\x20removed\x20from\x20keychain','auth:clear','12UfMdCy','execute','5608119vAGmoy','status','yellow','green','Choose\x20authentication\x20method:','\x20(site:\x20','first_name','System\x20keychain\x20is\x20not\x20available','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','OAuth\x20tokens','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','\x0aSetup\x20cancelled','last_name','site','trim','568ouYYdf','/app/mp/ak','391958pDOGQL','description','\x27\x20registered','11545ZVgicZ','Validating\x20API\x20key...','\x20(profile:\x20','message','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','Setup\x20cancelled','bold','apiKey','ERROR','tdx\x20profile:\x20','red','3591HEZdHi','Credential\x20type:\x20OAuth','create','name'];a7_0x5d04=function(){return _0x45cf19;};return a7_0x5d04();}import{LogLevel}from'../utils/tdx-logger.js';import a7_0x3eb7f from'chalk';export class AuthSetupCommand extends BaseCommand{['name']='auth:setup';[a7_0x12de54(0x11e)]='Setup\x20API\x20key\x20authentication\x20interactively';async[a7_0x12de54(0x15b)](_0x15ef31){const _0x241bce=a7_0x12de54,{options:_0x45ab42}=_0x15ef31,_0x65142b=_0x45ab42[_0x241bce(0x12f)];console['log'](a7_0x3eb7f['bold'](_0x241bce(0x146)));const _0x4ed1c9=_0x45ab42[_0x241bce(0x119)]||_0x241bce(0x132),_0x4761d7=await promptSiteSelection(_0x4ed1c9,_0x65142b,_0x241bce(0x125));if(!_0x4761d7)return 0x1;const _0x493b83=resolveSite(_0x4761d7);if(isOAuthSupported(_0x493b83)){const _0x3670ba=await a7_0x3af851({'type':'select','name':_0x241bce(0x14a),'message':_0x241bce(0x160),'choices':[{'title':'OAuth\x20(browser\x20login)','value':_0x241bce(0x141)},{'title':_0x241bce(0x13e),'value':'apikey'}]});if(!_0x3670ba['method'])return console[_0x241bce(0x13c)]('\x0aSetup\x20cancelled'),0x1;if(_0x3670ba[_0x241bce(0x14a)]===_0x241bce(0x141))return await runOAuthLoginFlow(_0x493b83,_0x65142b,_0x45ab42['logLevel']??LogLevel[_0x241bce(0x128)]),0x0;}console[_0x241bce(0x13c)](_0x241bce(0x143)+_0x493b83),console[_0x241bce(0x13c)]('You\x20can\x20find\x20your\x20API\x20key\x20at:'),console[_0x241bce(0x13c)]('\x20\x20'+getConsoleUrl(_0x493b83,_0x241bce(0x11c)));const _0xf353de=await a7_0x3af851({'type':_0x241bce(0x14b),'name':'apiKey','message':'Enter\x20your\x20TD\x20API\x20key:','validate':_0x64708e=>{const _0x280bbf=_0x241bce;if(!_0x64708e||!_0x64708e[_0x280bbf(0x11a)]())return _0x280bbf(0x140);return!![];}});if(!_0xf353de[_0x241bce(0x127)])return console['log'](_0x241bce(0x117)),0x1;const _0x39d77b=_0xf353de[_0x241bce(0x127)];console[_0x241bce(0x13c)](_0x241bce(0x121));try{const _0x346e6d=TDX[_0x241bce(0x12d)]({'site':_0x493b83,'apiKey':_0x39d77b[_0x241bce(0x11a)](),'logLevel':_0x45ab42[_0x241bce(0x13f)]??LogLevel[_0x241bce(0x128)]}),_0x3a5e9d=await _0x346e6d['jobs']['getUserInfo']();console[_0x241bce(0x13c)](_0x241bce(0x124)+_0x3a5e9d[_0x241bce(0x14e)]+')');const _0x19592b=await isKeychainAvailable();_0x19592b?(await saveAPIKeyAsync(_0x39d77b[_0x241bce(0x11a)](),_0x493b83,_0x65142b),console[_0x241bce(0x13c)]('✓\x20API\x20key\x20saved\x20to\x20system\x20keychain'+(_0x65142b?_0x241bce(0x122)+_0x65142b+')':''))):(console[_0x241bce(0x144)](a7_0x3eb7f[_0x241bce(0x15e)]('⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.')),console[_0x241bce(0x144)](a7_0x3eb7f[_0x241bce(0x15e)](_0x241bce(0x164))));if(_0x65142b){const _0xb67919={'site':_0x493b83};saveProfileToUserConfig(_0x65142b,_0xb67919),console[_0x241bce(0x13c)](_0x241bce(0x14f)+_0x65142b+_0x241bce(0x11f));}else saveDefaultSiteToUserConfig(_0x493b83),console[_0x241bce(0x13c)](_0x241bce(0x153)+_0x493b83);const _0x376f84=_0x65142b?'\x20--profile\x20'+_0x65142b:'';return console[_0x241bce(0x13c)](),console[_0x241bce(0x13c)](_0x241bce(0x166)),console[_0x241bce(0x13c)](_0x241bce(0x136)+_0x376f84+'\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication'),console[_0x241bce(0x13c)](_0x241bce(0x136)+_0x376f84+_0x241bce(0x13a)),0x0;}catch(_0x6bdb30){if(_0x6bdb30 instanceof HTTPClientError&&_0x6bdb30[_0x241bce(0x15d)]===0x191)return printAuthError(_0x6bdb30),0x1;return console['error'](a7_0x3eb7f[_0x241bce(0x12a)](_0x241bce(0x137)+(_0x6bdb30 instanceof Error?_0x6bdb30[_0x241bce(0x123)]:String(_0x6bdb30)))),console[_0x241bce(0x149)](_0x241bce(0x151)),0x1;}}}function a7_0x2f70(_0x4fd399,_0x5be565){_0x4fd399=_0x4fd399-0x117;const _0x5d049a=a7_0x5d04();let _0x2f70fc=_0x5d049a[_0x4fd399];return _0x2f70fc;}export class AuthStatusCommand extends BaseCommand{[a7_0x12de54(0x12e)]=a7_0x12de54(0x14c);['description']=a7_0x12de54(0x152);async[a7_0x12de54(0x15b)](_0x2a3206){const _0xa0a947=a7_0x12de54,{options:_0x32e27e,tdx:_0xa65b1d}=_0x2a3206,_0x1927d7=_0x32e27e[_0xa0a947(0x119)],_0x55d830=_0x32e27e['profile'],_0x1e260c=_0x55d830?_0x55d830:_0xa0a947(0x147);console[_0xa0a947(0x13c)](_0xa0a947(0x129)+_0x1e260c+_0xa0a947(0x161)+_0x1927d7+')');const _0x2fd8a0=await getOAuthTokens(_0x55d830);if(_0x2fd8a0)console['log'](_0xa0a947(0x12c)),console[_0xa0a947(0x13c)]('Read\x20credential\x20from\x20keychain'+(_0x55d830?_0xa0a947(0x122)+_0x55d830+')':''));else{const _0x58028b=await resolveAPIKeyAsync(_0x1927d7,_0x55d830);if(_0x58028b){const {source:_0x50fbaa,isDeprecated:_0x41bedb}=_0x58028b,_0x1fb036=_0xa0a947(0x156)+_0x50fbaa;console['log'](_0x41bedb?a7_0x3eb7f['yellow'](_0x1fb036):_0x1fb036);}else console['log'](a7_0x3eb7f[_0xa0a947(0x15e)](_0xa0a947(0x135)));}try{const _0x23605d=await _0xa65b1d['jobs']['getUserInfo']();return console[_0xa0a947(0x13c)](a7_0x3eb7f[_0xa0a947(0x15f)](_0xa0a947(0x131))),console[_0xa0a947(0x13c)](_0xa0a947(0x138)+_0x23605d[_0xa0a947(0x14e)]),(_0x23605d['first_name']||_0x23605d[_0xa0a947(0x118)])&&console[_0xa0a947(0x13c)](_0xa0a947(0x139)+[_0x23605d[_0xa0a947(0x162)],_0x23605d['last_name']][_0xa0a947(0x150)](Boolean)['join']('\x20')),0x0;}catch(_0x29760b){return _0x29760b instanceof HTTPClientError&&_0x29760b[_0xa0a947(0x15d)]===0x191?printAuthError(_0x29760b,!![],_0x55d830):console[_0xa0a947(0x149)](a7_0x3eb7f[_0xa0a947(0x12a)](_0xa0a947(0x137)+(_0x29760b instanceof Error?_0x29760b['message']:String(_0x29760b)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a7_0x12de54(0x12e)]=a7_0x12de54(0x159);[a7_0x12de54(0x11e)]=a7_0x12de54(0x13d);async[a7_0x12de54(0x15b)](_0x4bf57f){const _0x358358=a7_0x12de54,{options:_0xf9cb3c}=_0x4bf57f,_0x39a944=_0xf9cb3c['profile'];console[_0x358358(0x13c)](a7_0x3eb7f[_0x358358(0x126)](_0x358358(0x155)));const _0x2974f0=await isKeychainAvailable();if(!_0x2974f0)return console['error'](a7_0x3eb7f[_0x358358(0x12a)](_0x358358(0x163))),0x1;const [_0x456594,_0x4192f0]=await Promise[_0x358358(0x133)]([deleteKeychainAPIKey(_0x39a944),deleteOAuthTokens(_0x39a944)]);if(_0x456594||_0x4192f0){clearCredentialCache();const _0x2acb63=[_0x456594&&_0x358358(0x142),_0x4192f0&&_0x358358(0x165)][_0x358358(0x150)](Boolean)[_0x358358(0x145)](_0x358358(0x148));return console[_0x358358(0x13c)]('✓\x20'+_0x2acb63+_0x358358(0x158)+(_0x39a944?_0x358358(0x122)+_0x39a944+')':'')),0x0;}else return console[_0x358358(0x13c)]('No\x20credentials\x20found\x20in\x20keychain'+(_0x39a944?_0x358358(0x13b)+_0x39a944:'')),0x1;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x59135d=a8_0x1ae2;(function(_0x455c6e,_0x39fc46){const _0x790d9c=a8_0x1ae2,_0x19e10d=_0x455c6e();while(!![]){try{const _0x446627=parseInt(_0x790d9c(0x1be))/0x1*(-parseInt(_0x790d9c(0x1cc))/0x2)+-parseInt(_0x790d9c(0x1b3))/0x3*(-parseInt(_0x790d9c(0x1b6))/0x4)+-parseInt(_0x790d9c(0x1c6))/0x5+parseInt(_0x790d9c(0x1c8))/0x6*(-parseInt(_0x790d9c(0x1d4))/0x7)+-parseInt(_0x790d9c(0x1ce))/0x8+parseInt(_0x790d9c(0x1ab))/0x9+-parseInt(_0x790d9c(0x1aa))/0xa*(-parseInt(_0x790d9c(0x1b2))/0xb);if(_0x446627===_0x39fc46)break;else _0x19e10d['push'](_0x19e10d['shift']());}catch(_0x4d84ec){_0x19e10d['push'](_0x19e10d['shift']());}}}(a8_0x52af,0x201db));function a8_0x52af(){const _0x5ef67d=['✓\x20Authentication\x20successful\x20(User:\x20','784454wwllLb','6qPMEUI','auth:login','Opening\x20browser\x20for\x20authentication...','179292sdwUtL','Authenticating\x20via\x20OAuth\x20for\x20site:\x20','tdx:\x20auth\x20login','execute','jobs','Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.','us01','\x20--profile\x20','205vDQClv','✓\x20OAuth\x20tokens\x20saved\x20to\x20system\x20keychain','System\x20keychain\x20is\x20not\x20available.\x20OAuth\x20tokens\x20cannot\x20be\x20saved.\x20','Login\x20via\x20OAuth\x20(opens\x20browser)','OAuth\x20is\x20currently\x20supported\x20on\x20dev-us01\x20and\x20dev-eu01\x20only.\x20','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','getUserInfo','\x27\x20registered','900660RjcQqr','/oauth/authorize','12WloNYz','site','\x20\x20tdx','description','1238oDhCDG','bold','2058592yDFGNI','create','OAuth\x20login\x20is\x20not\x20yet\x20available\x20for\x20site:\x20','\x20(profile:\x20','✓\x20Profile\x20\x27','green','563416DZljVn','80SvvrNY','1770444GwLGpE','access_token','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','log','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','profile'];a8_0x52af=function(){return _0x5ef67d;};return a8_0x52af();}import{BaseCommand}from'./command.js';import{resolveSite}from'../core/config.js';import{saveProfileToUserConfig}from'../core/profile.js';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';function a8_0x1ae2(_0x15de5f,_0x461ca7){_0x15de5f=_0x15de5f-0x1aa;const _0x52afd5=a8_0x52af();let _0x1ae226=_0x52afd5[_0x15de5f];return _0x1ae226;}import{promptSiteSelection}from'../core/constants.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a8_0x5593d0 from'chalk';export async function runOAuthLoginFlow(_0x3cb723,_0x175349,_0x98fadb){const _0x1147d2=a8_0x1ae2;if(!isOAuthSupported(_0x3cb723))throw new Error(_0x1147d2(0x1d0)+_0x3cb723+'.\x20'+_0x1147d2(0x1c2)+_0x1147d2(0x1bb));const _0x3532b1=await isKeychainAvailable();if(!_0x3532b1)throw new Error(_0x1147d2(0x1c0)+_0x1147d2(0x1bb));const _0x40f3a=getConsoleUrl(_0x3cb723);console[_0x1147d2(0x1ae)](_0x1147d2(0x1b5)),console['log']('\x20\x20'+_0x40f3a+_0x1147d2(0x1c7)),console[_0x1147d2(0x1ae)]('Waiting\x20for\x20authorization\x20(timeout:\x202\x20minutes)...');const _0x9e2179=await startOAuthFlow(_0x3cb723);console[_0x1147d2(0x1ae)]('Validating\x20OAuth\x20tokens...');const _0x225318=TDX[_0x1147d2(0x1cf)]({'site':_0x3cb723,'accessToken':_0x9e2179[_0x1147d2(0x1ac)],'logLevel':_0x98fadb??LogLevel['ERROR']}),_0x1ec277=await _0x225318[_0x1147d2(0x1ba)][_0x1147d2(0x1c4)]();console[_0x1147d2(0x1ae)](a8_0x5593d0[_0x1147d2(0x1d3)](_0x1147d2(0x1b1)+_0x1ec277['email']+')')),await saveOAuthTokens(_0x9e2179,_0x175349),console[_0x1147d2(0x1ae)](_0x1147d2(0x1bf)+(_0x175349?_0x1147d2(0x1d1)+_0x175349+')':''));if(_0x175349){const _0x3cec83={'site':_0x3cb723};saveProfileToUserConfig(_0x175349,_0x3cec83),console[_0x1147d2(0x1ae)](_0x1147d2(0x1d2)+_0x175349+_0x1147d2(0x1c5));}const _0x5bf280=_0x175349?_0x1147d2(0x1bd)+_0x175349:'';console[_0x1147d2(0x1ae)](),console[_0x1147d2(0x1ae)](_0x1147d2(0x1c3)),console[_0x1147d2(0x1ae)]('\x20\x20tdx'+_0x5bf280+_0x1147d2(0x1ad)),console[_0x1147d2(0x1ae)](_0x1147d2(0x1ca)+_0x5bf280+_0x1147d2(0x1af));}export class AuthLoginCommand extends BaseCommand{['name']=a8_0x59135d(0x1b4);[a8_0x59135d(0x1cb)]=a8_0x59135d(0x1c1);async[a8_0x59135d(0x1b9)](_0x292327){const _0x266996=a8_0x59135d,{options:_0x165a70}=_0x292327,_0x45ad97=_0x165a70[_0x266996(0x1b0)];console[_0x266996(0x1ae)](a8_0x5593d0[_0x266996(0x1cd)](_0x266996(0x1b8)));const _0x572016=_0x165a70[_0x266996(0x1c9)]||_0x266996(0x1bc),_0x1eba29=await promptSiteSelection(_0x572016,_0x45ad97,'Login\x20cancelled');if(!_0x1eba29)return 0x1;const _0x588818=resolveSite(_0x1eba29);return console[_0x266996(0x1ae)](_0x266996(0x1b7)+_0x588818),await runOAuthLoginFlow(_0x588818,_0x45ad97,_0x165a70['logLevel']??LogLevel['ERROR']),0x0;}}
|