@treasuredata/tdx 2026.3.11 → 2026.3.13
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
|
+
const a3_0x5e1ffa=a3_0x22c1;(function(_0x16342e,_0x252526){const _0x3e7908=a3_0x22c1,_0x2224c5=_0x16342e();while(!![]){try{const _0x3474bf=parseInt(_0x3e7908(0xa8))/0x1+parseInt(_0x3e7908(0xab))/0x2+-parseInt(_0x3e7908(0xa2))/0x3*(parseInt(_0x3e7908(0x95))/0x4)+-parseInt(_0x3e7908(0xa1))/0x5*(-parseInt(_0x3e7908(0x93))/0x6)+-parseInt(_0x3e7908(0x94))/0x7+parseInt(_0x3e7908(0x9d))/0x8+-parseInt(_0x3e7908(0x90))/0x9;if(_0x3474bf===_0x252526)break;else _0x2224c5['push'](_0x2224c5['shift']());}catch(_0x21317e){_0x2224c5['push'](_0x2224c5['shift']());}}}(a3_0x14e0,0x32181));function a3_0x22c1(_0x1d42b0,_0x2fa01a){_0x1d42b0=_0x1d42b0-0x8e;const _0x14e084=a3_0x14e0();let _0x22c1de=_0x14e084[_0x1d42b0];return _0x22c1de;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0x5e1ffa(0x9c)]='activations';[a3_0x5e1ffa(0xad)]=a3_0x5e1ffa(0xa6);async['execute'](_0x2317af){const _0x51b36b=a3_0x5e1ffa,{options:_0x260e8b,args:_0x322fdb,tdx:_0x45fc98}=_0x2317af;if(_0x322fdb[_0x51b36b(0x96)]===0x0)return console[_0x51b36b(0xa5)](_0x51b36b(0xac)),console['error']('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;try{const {parentId:_0x14bf3e,childId:_0x353f6e}=parseSegmentRef(_0x322fdb[0x0]);if(!_0x353f6e)return console[_0x51b36b(0xa5)](_0x51b36b(0xa7)),console['error'](_0x51b36b(0xa3)),0x1;_0x260e8b['verbose']&&(console[_0x51b36b(0xa5)](_0x51b36b(0x91)+_0x260e8b[_0x51b36b(0x9f)]),console['error'](_0x51b36b(0x92)+_0x14bf3e),console['error'](_0x51b36b(0x8e)+_0x353f6e));const _0x59b7c1=await withSpinner(_0x51b36b(0x98)+_0x14bf3e+_0x51b36b(0x97),()=>_0x45fc98[_0x51b36b(0x9a)]['resolveParentId'](_0x14bf3e),{'verbose':_0x260e8b[_0x51b36b(0xaa)]}),_0x518881=_0x59b7c1['data'];_0x260e8b[_0x51b36b(0xaa)]&&console[_0x51b36b(0xa5)](_0x51b36b(0x9e)+_0x518881);const _0x4719f1=await withSpinner('Resolving\x20child\x20segment\x20\x27'+_0x353f6e+'\x27...',()=>_0x45fc98['segment'][_0x51b36b(0x99)](_0x518881,_0x353f6e),{'verbose':_0x260e8b[_0x51b36b(0xaa)]}),_0xd60f37=_0x4719f1[_0x51b36b(0x8f)];_0x260e8b[_0x51b36b(0xaa)]&&console[_0x51b36b(0xa5)](_0x51b36b(0xa0)+_0xd60f37);const _0x170bbe=await withSpinner(_0x51b36b(0xa4)+_0x353f6e+_0x51b36b(0x97),()=>_0x45fc98[_0x51b36b(0x9a)]['listActivations'](_0x518881,_0xd60f37),{'verbose':_0x260e8b[_0x51b36b(0xaa)]}),_0xf904af=_0x170bbe[_0x51b36b(0x8f)];return console['error'](_0x51b36b(0xa9)+_0xf904af[_0x51b36b(0x96)]+_0x51b36b(0xae)+(_0xf904af[_0x51b36b(0x96)]!==0x1?'s':'')),await handleSDKOutput(_0xf904af,_0x260e8b),0x0;}catch(_0x5452c3){if(_0x5452c3 instanceof SDKError)return console['error']('Error:\x20'+_0x5452c3['message']),_0x5452c3[_0x51b36b(0x9b)]&&console[_0x51b36b(0xa5)]('\x20\x20Cause:\x20'+_0x5452c3[_0x51b36b(0x9b)]),0x1;throw _0x5452c3;}}}function a3_0x14e0(){const _0xe33a9e=['cause','name','3180400bwjHnk','Resolved\x20parent\x20ID:\x20','site','Resolved\x20child\x20ID:\x20','67010MtMFId','3vgAdim','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','Listing\x20activations\x20for\x20segment\x20\x27','error','List\x20activations\x20for\x20a\x20segment','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','296088koHehu','✔\x20Found\x20','verbose','770702nWaYkv','Error:\x20Segment\x20name\x20is\x20required','description','\x20activation','Child\x20name:\x20','data','4794165AHPUzx','Site:\x20','Parent\x20name:\x20','102arqmTh','1367737mfebtm','1494248hQOXDu','length','\x27...','Resolving\x20parent\x20segment\x20\x27','resolveSegmentId','segment'];a3_0x14e0=function(){return _0xe33a9e;};return a3_0x14e0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a4_0x5480(){const _0x160adc=['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)','projectDir','\x20\x20Integration\x20\x22','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','Using\x20project\x20from\x20','agentId','source','yellow','Pushing\x20agent\x20from\x20\x22','\x20unchanged','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','New\x20project:\x20','Summary:','agent:clone','description','\x20changed','red','site','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','\x22:\x20','Using\x20project:\x20','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','new','cyan','errors','llm_project','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','dirname','output','green','\x0aChanges:','117298qNgnVZ','\x20\x20Text\x20Knowledge\x20Bases:\x20','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','297Hpaebv','join','\x0aChanges\x20to\x20prompt\x20\x27','experimentalKnowledgeBases','920549zwMTtB','\x20resources\x20to\x20\x27','\x20|\x20','agentName','Pulling\x20agent\x20\x22','Status:\x20','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','\x0a✔\x20Pulled\x20','push','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','textKnowledgeBases','Analyzing\x20project\x20\x22','136260cPlMFZ','llm','\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','\x20\x20Experimental\x20Artifacts:\x20','Analyzing\x20changes\x20to\x20push...','yes','projectId','Would\x20push\x20agent:\x20','\x22\x20to\x20\x22','New\x20project\x20name\x20is\x20required','Clone\x20\x22','execute','Failed\x20to\x20push\x20agent:\x20','force','newProjectId','cwd','Source:\x20','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\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\x20Experimental\x20Artifact\x20\x22','Cloning\x20\x22','Using\x20project\x20from\x20context:\x20','tdx.json','6luAzrg','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','11XdxJlh','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','\x0aPush\x20summary\x20for\x20\x27','arg-dir','-\x20no\x20files\x20written','\x20files\x20to\x20','Chat:\x20','sourceProjectName','profile','agents','knowledgeBases','gray','\x27\x20to\x20create\x20the\x20folder\x20structure.','reason','log','updated','Would\x20pull\x20agent:\x20','\x20\x20Knowledge\x20Base\x20\x22','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','Agent:\x20','Using\x20local\x20project:\x20','session','Using\x20context\x20project:\x20','outputDir','\x20\x20Text\x20Knowledge\x20Base\x20\x22','pushAgent','llmProject','INVALID_ARGUMENT','\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)','cwd-config','Using\x20current\x20project:\x20','Dry\x20run\x20-\x20no\x20files\x20written','\x20\x20Integrations:\x20','\x0aWrite\x20','pullProject','projectName','dim','unchanged','agent','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','Project:\x20','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','experimentalArtifacts','Pushing\x20to\x20project...','Agent\x20','repeat','\x20\x20Target:\x20','error','\x20=\x20','\x20--profile\x20','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','prompts','2261148tKbhkK','Project\x20cloned\x20with\x20errors','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','parse','MISSING_ARGUMENT','\x20\x20Agent\x20\x22','agent.yml','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','agent:pull','created','\x0aPush\x20','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','utf-8','3ZoQYyi','\x20\x20Agents:\x20','\x22\x20to\x20new\x20project\x20\x22','\x20updated','\x0aError:','-\x20nothing\x20pushed','found','no_local_folder','\x20\x20Knowledge\x20Bases:\x20','63582GoUSMm','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','\x20\x20Prompt\x20\x22','\x0a✔\x20Pushed\x20','✔\x20Context\x20set:\x20','cloneProject','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','\x20successfully','New\x20project\x20ID:\x20','Cancelled','Dry\x20run\x20-\x20no\x20changes\x20made','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','\x20\x20Prompts:\x20','context','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','\x20new','outputPath','Output\x20path:\x20','448955BpEDXI','total','4vjTOKw','Writing\x20files...','\x20\x20tdx\x20agent\x20pull\x20','Project\x20cloned\x20successfully','agent:push','diff','action','no_context','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','17864awRrgR','Would\x20clone:','pushProject','Output:\x20','integrations','\x0aPull\x20summary\x20for\x20\x27','dryRun','Agent\x20pulled\x20successfully','Cannot\x20clone\x20from\x20context\x20project\x20\x22','counts','message','\x22\x20from\x20project\x20\x22','name','\x22...','Errors:'];a4_0x5480=function(){return _0x160adc;};return a4_0x5480();}const a4_0x321400=a4_0xe70e;(function(_0x447803,_0x2798e8){const _0xcfebc4=a4_0xe70e,_0x3f39ed=_0x447803();while(!![]){try{const _0x197d48=parseInt(_0xcfebc4(0x1b0))/0x1*(parseInt(_0xcfebc4(0x204))/0x2)+-parseInt(_0xcfebc4(0x1b9))/0x3*(-parseInt(_0xcfebc4(0x1cd))/0x4)+-parseInt(_0xcfebc4(0x1cb))/0x5+-parseInt(_0xcfebc4(0x16b))/0x6*(-parseInt(_0xcfebc4(0x20b))/0x7)+-parseInt(_0xcfebc4(0x1d6))/0x8*(-parseInt(_0xcfebc4(0x207))/0x9)+parseInt(_0xcfebc4(0x217))/0xa*(parseInt(_0xcfebc4(0x16d))/0xb)+-parseInt(_0xcfebc4(0x1a3))/0xc;if(_0x197d48===_0x2798e8)break;else _0x3f39ed['push'](_0x3f39ed['shift']());}catch(_0x38ed98){_0x3f39ed['push'](_0x3f39ed['shift']());}}}(a4_0x5480,0x21a0f));import a4_0x48726e from'chalk';import a4_0x549855 from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x5a915c){const _0x1c1fc0=a4_0xe70e,_0x1902f8=[];if(_0x5a915c[_0x1c1fc0(0x1cc)]!==undefined)_0x1902f8[_0x1c1fc0(0x213)](_0x5a915c[_0x1c1fc0(0x1cc)]+'\x20total');if(_0x5a915c[_0x1c1fc0(0x1fb)]!==undefined&&_0x5a915c[_0x1c1fc0(0x1fb)]>0x0)_0x1902f8[_0x1c1fc0(0x213)](a4_0x48726e['green'](_0x5a915c[_0x1c1fc0(0x1fb)]+_0x1c1fc0(0x1c8)));if(_0x5a915c[_0x1c1fc0(0x1ac)]!==undefined&&_0x5a915c[_0x1c1fc0(0x1ac)]>0x0)_0x1902f8[_0x1c1fc0(0x213)](a4_0x48726e[_0x1c1fc0(0x202)](_0x5a915c['created']+'\x20created'));if(_0x5a915c[_0x1c1fc0(0x17c)]!==undefined&&_0x5a915c[_0x1c1fc0(0x17c)]>0x0)_0x1902f8[_0x1c1fc0(0x213)](a4_0x48726e[_0x1c1fc0(0x1ec)](_0x5a915c['updated']+_0x1c1fc0(0x1b3)));if(_0x5a915c[_0x1c1fc0(0x192)]!==undefined&&_0x5a915c[_0x1c1fc0(0x192)]>0x0)_0x1902f8[_0x1c1fc0(0x213)](a4_0x48726e['gray'](_0x5a915c['unchanged']+_0x1c1fc0(0x1ee)));if(_0x5a915c['errors']!==undefined&&_0x5a915c[_0x1c1fc0(0x1fd)]>0x0)_0x1902f8['push'](a4_0x48726e[_0x1c1fc0(0x1f5)](_0x5a915c[_0x1c1fc0(0x1fd)]+'\x20errors'));return _0x1902f8[_0x1c1fc0(0x208)](',\x20');}function displayDiffs(_0x27b3e3,_0x59a2df,_0x860326,_0xaf9e3f,_0x5eb2e5,_0x35b614,_0x5eefb7){const _0x17ae34=a4_0xe70e;for(const _0x26e606 of _0x27b3e3){if(_0x26e606['diff']){const _0x365c90=_0x26e606['agentName']||_0x26e606['name'];console['log']('\x0aChanges\x20to\x20agent\x20\x27'+_0x365c90+'\x27:'),console[_0x17ae34(0x17b)]('─'[_0x17ae34(0x19c)](0x3c)),console['log'](_0x26e606[_0x17ae34(0x1d2)]),console['log']('─'['repeat'](0x3c));}}for(const _0x114384 of _0x59a2df){_0x114384[_0x17ae34(0x1d2)]&&(console[_0x17ae34(0x17b)](_0x17ae34(0x1c4)+_0x114384[_0x17ae34(0x1e2)]+'\x27:'),console[_0x17ae34(0x17b)]('─'[_0x17ae34(0x19c)](0x3c)),console[_0x17ae34(0x17b)](_0x114384[_0x17ae34(0x1d2)]),console[_0x17ae34(0x17b)]('─'[_0x17ae34(0x19c)](0x3c)));}for(const _0x49be6b of _0x860326){_0x49be6b[_0x17ae34(0x1d2)]&&(console[_0x17ae34(0x17b)]('\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27'+_0x49be6b['name']+'\x27:'),console['log']('─'[_0x17ae34(0x19c)](0x3c)),console[_0x17ae34(0x17b)](_0x49be6b['diff']),console['log']('─'[_0x17ae34(0x19c)](0x3c)));}for(const _0x32a376 of _0xaf9e3f){_0x32a376[_0x17ae34(0x1d2)]&&(console[_0x17ae34(0x17b)](_0x17ae34(0x209)+_0x32a376['name']+'\x27:'),console[_0x17ae34(0x17b)]('─'['repeat'](0x3c)),console['log'](_0x32a376[_0x17ae34(0x1d2)]),console[_0x17ae34(0x17b)]('─'[_0x17ae34(0x19c)](0x3c)));}for(const _0xb797b7 of _0x5eb2e5){_0xb797b7[_0x17ae34(0x1d2)]&&(console['log']('\x0aChanges\x20to\x20integration\x20\x27'+_0xb797b7[_0x17ae34(0x1e2)]+'\x27:'),console[_0x17ae34(0x17b)]('─'[_0x17ae34(0x19c)](0x3c)),console[_0x17ae34(0x17b)](_0xb797b7[_0x17ae34(0x1d2)]),console[_0x17ae34(0x17b)]('─'[_0x17ae34(0x19c)](0x3c)));}for(const _0x4aa33b of _0x35b614){_0x4aa33b[_0x17ae34(0x1d2)]&&(console['log'](_0x17ae34(0x16e)+_0x4aa33b[_0x17ae34(0x1e2)]+'\x27:'),console[_0x17ae34(0x17b)]('─'[_0x17ae34(0x19c)](0x3c)),console['log'](_0x4aa33b[_0x17ae34(0x1d2)]),console[_0x17ae34(0x17b)]('─'['repeat'](0x3c)));}for(const _0x276274 of _0x5eefb7){_0x276274[_0x17ae34(0x1d2)]&&(console[_0x17ae34(0x17b)](_0x17ae34(0x1e8)+_0x276274['name']+'\x27:'),console['log']('─'[_0x17ae34(0x19c)](0x3c)),console[_0x17ae34(0x17b)](_0x276274[_0x17ae34(0x1d2)]),console['log']('─'[_0x17ae34(0x19c)](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']=a4_0x321400(0x1ab);[a4_0x321400(0x1f3)]=a4_0x321400(0x1d5);async[a4_0x321400(0x222)](_0x1596b9){const _0x1e523b=a4_0x321400,{options:_0x3042a2,args:_0x29273a,tdx:_0x4e6ba3}=_0x1596b9,_0x1b7863=_0x29273a[0x0],_0x548e3d=_0x29273a[0x1],_0x597b96=_0x3042a2[_0x1e523b(0x201)],_0x3b339b=_0x3042a2['dryRun'],_0x49167d=_0x3042a2[_0x1e523b(0x224)],_0x34d586=_0x3042a2[_0x1e523b(0x21c)],_0x267c20=_0x3042a2[_0x1e523b(0x187)],_0x321731=_0x3042a2[_0x1e523b(0x193)];let _0x5e0cb8;if(_0x1b7863){const _0x143882=a4_0x549855[_0x1e523b(0x208)](_0x1b7863,_0x1e523b(0x16a));if(existsSync(_0x143882))try{const _0x21fde1=JSON[_0x1e523b(0x1a6)](readFileSync(_0x143882,_0x1e523b(0x1af)));_0x21fde1[_0x1e523b(0x1fe)]&&(_0x5e0cb8={'llm_project':_0x21fde1[_0x1e523b(0x1fe)]});}catch{}}const _0x10483c=findAgentConfigPath(process[_0x1e523b(0x226)]());let _0x241f43;if(_0x10483c)try{const _0x5ac312=JSON[_0x1e523b(0x1a6)](readFileSync(_0x10483c,_0x1e523b(0x1af)));_0x5ac312['llm_project']&&(_0x241f43={'llm_project':_0x5ac312[_0x1e523b(0x1fe)]});}catch{}const _0x3bb4ed=resolveAgentPullArgs({'arg':_0x1b7863,'agentNameArg':_0x548e3d,'agentFlag':_0x321731,'contextProject':_0x267c20,'argDirConfig':_0x5e0cb8,'cwdConfigPath':_0x10483c||undefined,'cwdConfig':_0x241f43}),{projectNameOrId:_0x5dd36f,targetAgentName:_0x954ff1,existingOutputDir:_0x1d3f3b,source:_0x1825a6}=_0x3bb4ed;if(_0x1825a6===_0x1e523b(0x170))console[_0x1e523b(0x17b)](a4_0x48726e[_0x1e523b(0x191)](_0x1e523b(0x1e9)+a4_0x549855['join'](_0x1b7863,_0x1e523b(0x16a))+':\x20'+_0x5dd36f));else{if(_0x1825a6===_0x1e523b(0x18a))console[_0x1e523b(0x17b)](a4_0x48726e['dim']('Using\x20project:\x20'+_0x5dd36f));else _0x1825a6===_0x1e523b(0x1c6)&&console[_0x1e523b(0x17b)](a4_0x48726e['dim'](_0x1e523b(0x169)+_0x5dd36f));}if(!_0x5dd36f)return _0x321731?(console[_0x1e523b(0x17b)](a4_0x48726e['yellow']('The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a')),console[_0x1e523b(0x17b)]('Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>'),console['log'](_0x1e523b(0x194))):(console[_0x1e523b(0x17b)](a4_0x48726e[_0x1e523b(0x1ec)](_0x1e523b(0x211))),console[_0x1e523b(0x17b)](_0x1e523b(0x1e5)),console[_0x1e523b(0x17b)]('\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[_0x1e523b(0x17b)](_0x1e523b(0x166)),console[_0x1e523b(0x17b)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project'),console[_0x1e523b(0x17b)](_0x1e523b(0x219))),0x1;if(_0x954ff1){const {data:_0x413fcf}=await withSpinner(_0x1e523b(0x20f)+_0x954ff1+_0x1e523b(0x1e1)+_0x5dd36f+_0x1e523b(0x1e3),()=>_0x4e6ba3[_0x1e523b(0x218)]['pullAgent'](_0x5dd36f,_0x954ff1,_0x597b96,{'dryRun':_0x3b339b,'force':_0x49167d}));if(_0x3b339b)return console[_0x1e523b(0x17b)](a4_0x48726e[_0x1e523b(0x1ec)](_0x1e523b(0x18c))),console[_0x1e523b(0x17b)](_0x1e523b(0x17d)+_0x413fcf[_0x1e523b(0x20e)]),console[_0x1e523b(0x17b)](_0x1e523b(0x1ca)+_0x413fcf[_0x1e523b(0x1c9)]),_0x413fcf[_0x1e523b(0x1d2)]&&(console[_0x1e523b(0x17b)](_0x1e523b(0x203)),console[_0x1e523b(0x17b)]('─'[_0x1e523b(0x19c)](0x3c)),console[_0x1e523b(0x17b)](_0x413fcf[_0x1e523b(0x1d2)]),console['log']('─'[_0x1e523b(0x19c)](0x3c))),0x0;return console[_0x1e523b(0x17b)](a4_0x48726e['green'](_0x1e523b(0x1dd))),console['log'](_0x1e523b(0x180)+_0x413fcf[_0x1e523b(0x20e)]),console[_0x1e523b(0x17b)](_0x1e523b(0x1d9)+_0x413fcf[_0x1e523b(0x1c9)]),console[_0x1e523b(0x17b)](_0x1e523b(0x210)+(_0x413fcf['isNew']?a4_0x48726e[_0x1e523b(0x202)]('new'):_0x413fcf['hasChanges']?a4_0x48726e['yellow'](_0x1e523b(0x17c)):a4_0x48726e[_0x1e523b(0x178)](_0x1e523b(0x192)))),0x0;}const _0x108f94=_0x1d3f3b||_0x597b96,{data:_0x81c24}=await withSpinner(_0x1e523b(0x216)+_0x5dd36f+_0x1e523b(0x1e3),()=>_0x4e6ba3[_0x1e523b(0x218)][_0x1e523b(0x18f)](_0x5dd36f,_0x108f94,{'dryRun':!![]})),_0x5904a8=_0x81c24['counts'][_0x1e523b(0x176)][_0x1e523b(0x1fb)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x177)][_0x1e523b(0x1fb)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x215)][_0x1e523b(0x1fb)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x1a2)]['new']+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x1da)][_0x1e523b(0x1fb)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x20a)][_0x1e523b(0x1fb)]+_0x81c24['counts'][_0x1e523b(0x199)][_0x1e523b(0x1fb)],_0x1fe5b7=_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x176)][_0x1e523b(0x17c)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x177)][_0x1e523b(0x17c)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x215)]['updated']+_0x81c24['counts'][_0x1e523b(0x1a2)][_0x1e523b(0x17c)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x1da)][_0x1e523b(0x17c)]+_0x81c24['counts'][_0x1e523b(0x20a)]['updated']+_0x81c24['counts'][_0x1e523b(0x199)]['updated'],_0x1b0e9b=_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x176)][_0x1e523b(0x192)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x177)][_0x1e523b(0x192)]+_0x81c24['counts'][_0x1e523b(0x215)]['unchanged']+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x1a2)][_0x1e523b(0x192)]+_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x1da)][_0x1e523b(0x192)]+_0x81c24[_0x1e523b(0x1df)]['experimentalKnowledgeBases'][_0x1e523b(0x192)]+_0x81c24[_0x1e523b(0x1df)]['experimentalArtifacts'][_0x1e523b(0x192)];console['log'](_0x1e523b(0x1db)+_0x81c24['projectName']+'\x27:'),console[_0x1e523b(0x17b)]('\x20\x20'+a4_0x48726e[_0x1e523b(0x202)]('+\x20'+_0x5904a8+_0x1e523b(0x1c8))+_0x1e523b(0x20d)+a4_0x48726e[_0x1e523b(0x1ec)]('~\x20'+_0x1fe5b7+_0x1e523b(0x1f4))+_0x1e523b(0x20d)+a4_0x48726e[_0x1e523b(0x191)]('=\x20'+_0x1b0e9b+_0x1e523b(0x1ee))),console['log'](_0x1e523b(0x1b1)+formatCountSummary(_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x176)])),console[_0x1e523b(0x17b)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x177)])),console[_0x1e523b(0x17b)](_0x1e523b(0x205)+formatCountSummary(_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x215)])),console[_0x1e523b(0x17b)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x81c24['counts'][_0x1e523b(0x1a2)])),console[_0x1e523b(0x17b)](_0x1e523b(0x18d)+formatCountSummary(_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x1da)]));const _0x53f5d1=_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x20a)][_0x1e523b(0x1cc)]>0x0||_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x199)][_0x1e523b(0x1cc)]>0x0;_0x53f5d1&&(console[_0x1e523b(0x17b)](_0x1e523b(0x1aa)+formatCountSummary(_0x81c24[_0x1e523b(0x1df)][_0x1e523b(0x20a)])),console[_0x1e523b(0x17b)](_0x1e523b(0x21a)+formatCountSummary(_0x81c24[_0x1e523b(0x1df)]['experimentalArtifacts'])));console[_0x1e523b(0x17b)](_0x1e523b(0x19d)+a4_0x48726e[_0x1e523b(0x1fc)](_0x81c24[_0x1e523b(0x184)])),displayDiffs(_0x81c24[_0x1e523b(0x176)],_0x81c24[_0x1e523b(0x177)],_0x81c24[_0x1e523b(0x215)],_0x81c24[_0x1e523b(0x1a2)],_0x81c24[_0x1e523b(0x1da)],_0x81c24['experimentalKnowledgeBases'],_0x81c24[_0x1e523b(0x199)]);if(_0x3b339b)return console[_0x1e523b(0x17b)](a4_0x48726e[_0x1e523b(0x1ec)](_0x1e523b(0x1a1))),0x0;if(_0x5904a8===0x0&&_0x1fe5b7===0x0)return console[_0x1e523b(0x17b)](a4_0x48726e['green'](_0x1e523b(0x197))),saveSessionContext({'llm_project':_0x81c24['projectName']},_0x3042a2[_0x1e523b(0x182)]),console[_0x1e523b(0x17b)](a4_0x48726e['green'](_0x1e523b(0x1bd)+a4_0x48726e[_0x1e523b(0x191)]('llm_project')+_0x1e523b(0x19f)+a4_0x48726e[_0x1e523b(0x1fc)](_0x81c24['projectName']))),0x0;if(!_0x34d586&&!_0x49167d){if(!isInteractive())return console[_0x1e523b(0x19e)](a4_0x48726e[_0x1e523b(0x1f5)]('\x0aError:'),_0x1e523b(0x1ae)),console[_0x1e523b(0x19e)](a4_0x48726e[_0x1e523b(0x191)](_0x1e523b(0x1ff))),0x1;const _0x18b16e=await confirmKey(_0x1e523b(0x18e)+(_0x5904a8+_0x1fe5b7)+'\x20files?');if(!_0x18b16e)return console[_0x1e523b(0x17b)](a4_0x48726e[_0x1e523b(0x1ec)](_0x1e523b(0x1c2)),_0x1e523b(0x171)),0x1;}const {data:_0x44964a}=await withSpinner(_0x1e523b(0x1ce),()=>_0x4e6ba3[_0x1e523b(0x218)][_0x1e523b(0x18f)](_0x5dd36f,_0x108f94,{'force':_0x49167d}));return console[_0x1e523b(0x17b)](a4_0x48726e['green'](_0x1e523b(0x212)+(_0x5904a8+_0x1fe5b7)+_0x1e523b(0x172)+_0x44964a[_0x1e523b(0x184)])),saveSessionContext({'llm_project':_0x44964a[_0x1e523b(0x190)]},_0x3042a2['session']),console[_0x1e523b(0x17b)](a4_0x48726e[_0x1e523b(0x202)]('✔\x20Context\x20set:\x20'+a4_0x48726e[_0x1e523b(0x191)](_0x1e523b(0x1fe))+_0x1e523b(0x19f)+a4_0x48726e['cyan'](_0x44964a[_0x1e523b(0x190)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x321400(0x1e2)]=a4_0x321400(0x1f2);[a4_0x321400(0x1f3)]=a4_0x321400(0x214);async['execute'](_0x5767da){const _0x27f328=a4_0x321400,{options:_0x24b6a6,args:_0x57cde5,tdx:_0x453e39}=_0x5767da,_0x5eaeba=_0x57cde5[0x0],_0x5e055d=_0x24b6a6[_0x27f328(0x1e2)],_0x29ebf6=_0x24b6a6[_0x27f328(0x1dc)],_0x1aab89=_0x24b6a6[_0x27f328(0x21c)],_0x463c1e=_0x24b6a6[_0x27f328(0x1f6)],_0x59bdcb=_0x24b6a6[_0x27f328(0x187)];let _0x42757f;const _0xbe597d=findAgentConfigPath(process[_0x27f328(0x226)]());if(_0x5eaeba){const _0x4c759d=a4_0x549855[_0x27f328(0x208)](_0x5eaeba,_0x27f328(0x16a));existsSync(_0x4c759d)?(_0x42757f=_0x5eaeba,console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x191)](_0x27f328(0x181)+_0x5eaeba))):_0x42757f=_0x5eaeba;}else{if(_0xbe597d)_0x42757f=a4_0x549855[_0x27f328(0x200)](_0xbe597d),console['log'](a4_0x48726e['dim'](_0x27f328(0x18b)+_0x42757f));else{if(_0x59bdcb){const _0x4925ab=sanitizeForFilesystem(_0x59bdcb);let _0x2fb1cd=_0x4925ab,_0xfcfdac=a4_0x549855[_0x27f328(0x208)](process[_0x27f328(0x226)](),'agents',_0x4925ab,'tdx.json');if(!existsSync(_0xfcfdac)){const _0xe28c77=normalizeName(_0x59bdcb),_0x1efd44=a4_0x549855[_0x27f328(0x208)](process[_0x27f328(0x226)](),_0x27f328(0x176),_0xe28c77,_0x27f328(0x16a));existsSync(_0x1efd44)&&(_0x2fb1cd=_0xe28c77,_0xfcfdac=_0x1efd44);}if(existsSync(_0xfcfdac))_0x42757f=a4_0x549855[_0x27f328(0x200)](_0xfcfdac),console[_0x27f328(0x17b)](a4_0x48726e['dim'](_0x27f328(0x181)+_0x42757f));else{const _0x5f19a0=_0x24b6a6[_0x27f328(0x175)];if(_0x5f19a0)throw new SDKError(ErrorCode[_0x27f328(0x188)],_0x27f328(0x1de)+_0x59bdcb+'\x22\x20to\x20a\x20different\x20profile',undefined,{'helpText':_0x27f328(0x1ba)+_0x27f328(0x1fa)+(_0x27f328(0x1cf)+_0x59bdcb+'\x0a')+('\x20\x20tdx\x20agent\x20clone\x20agents/'+_0x2fb1cd+'\x20--name\x20'+(_0x5e055d||'<new-name>')+_0x27f328(0x1a0)+_0x5f19a0)});_0x42757f=_0x59bdcb,console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x191)](_0x27f328(0x183)+_0x59bdcb));}}}}if(!_0x42757f)return console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1ec)](_0x27f328(0x17f))),console[_0x27f328(0x17b)](_0x27f328(0x165)),console[_0x27f328(0x17b)](_0x27f328(0x16c)),console[_0x27f328(0x17b)](_0x27f328(0x189)),console[_0x27f328(0x17b)](_0x27f328(0x1bf)),0x1;if(!_0x5e055d)throw new SDKError(ErrorCode[_0x27f328(0x1a7)],_0x27f328(0x220),undefined,{'helpText':_0x27f328(0x198)});if(!_0x1aab89&&!_0x29ebf6){if(!isInteractive())return console[_0x27f328(0x19e)](a4_0x48726e[_0x27f328(0x1f5)](_0x27f328(0x1b4)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x27f328(0x19e)](a4_0x48726e[_0x27f328(0x191)](_0x27f328(0x1ff))),0x1;const _0x14b51c=await confirmKey(_0x27f328(0x221)+_0x42757f+_0x27f328(0x1b2)+_0x5e055d+'\x22?');if(!_0x14b51c)return console['log'](a4_0x48726e['yellow'](_0x27f328(0x1c2))),0x1;}const {data:_0x3b8f39}=await withSpinner(_0x27f328(0x168)+_0x42757f+_0x27f328(0x21f)+_0x5e055d+_0x27f328(0x1e3),()=>_0x453e39[_0x27f328(0x218)][_0x27f328(0x1be)](_0x42757f,_0x5e055d,{'dryRun':_0x29ebf6}));if(_0x29ebf6){console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1ec)](_0x27f328(0x1c3))),console[_0x27f328(0x17b)](_0x27f328(0x164)+_0x3b8f39[_0x27f328(0x174)]),console['log']('New\x20project:\x20'+_0x5e055d),console[_0x27f328(0x17b)](_0x27f328(0x1d7)),console[_0x27f328(0x17b)](_0x27f328(0x1b1)+_0x3b8f39['counts'][_0x27f328(0x176)][_0x27f328(0x1ac)]),console['log'](_0x27f328(0x1b8)+_0x3b8f39['counts'][_0x27f328(0x177)][_0x27f328(0x1ac)]),console['log'](_0x27f328(0x1c5)+_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x1a2)][_0x27f328(0x1ac)]);const _0x25a690=_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x20a)][_0x27f328(0x1ac)]>0x0||_0x3b8f39['counts'][_0x27f328(0x199)][_0x27f328(0x1ac)]>0x0;return _0x25a690&&(console[_0x27f328(0x17b)](_0x27f328(0x1aa)+_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x20a)][_0x27f328(0x1ac)]),console['log'](_0x27f328(0x21a)+_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x199)]['created'])),0x0;}const _0x3d2bae=_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x176)][_0x27f328(0x1fd)]>0x0||_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x177)][_0x27f328(0x1fd)]>0x0||_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x1a2)][_0x27f328(0x1fd)]>0x0||_0x3b8f39[_0x27f328(0x1df)]['experimentalKnowledgeBases'][_0x27f328(0x1fd)]>0x0||_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x199)][_0x27f328(0x1fd)]>0x0;_0x3d2bae?console[_0x27f328(0x17b)](a4_0x48726e['yellow'](_0x27f328(0x1a4))):console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x202)](_0x27f328(0x1d0)));console[_0x27f328(0x17b)]('Source:\x20'+_0x3b8f39['sourceProjectName']),console[_0x27f328(0x17b)](_0x27f328(0x1f0)+_0x3b8f39['newProjectName']),console[_0x27f328(0x17b)](_0x27f328(0x1c1)+_0x3b8f39[_0x27f328(0x225)]),console[_0x27f328(0x17b)](),console[_0x27f328(0x17b)](_0x27f328(0x1f1)),console[_0x27f328(0x17b)](_0x27f328(0x1b1)+formatCountSummary(_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x176)])),console[_0x27f328(0x17b)](_0x27f328(0x1b8)+formatCountSummary(_0x3b8f39['counts'][_0x27f328(0x177)])),console[_0x27f328(0x17b)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x3b8f39['counts'][_0x27f328(0x1a2)])),console[_0x27f328(0x17b)](_0x27f328(0x18d)+formatCountSummary(_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x1da)]));const _0x1b7722=_0x3b8f39[_0x27f328(0x1df)]['experimentalKnowledgeBases'][_0x27f328(0x1ac)]>0x0||_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x20a)][_0x27f328(0x17c)]>0x0||_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x20a)][_0x27f328(0x192)]>0x0||_0x3b8f39[_0x27f328(0x1df)]['experimentalArtifacts']['created']>0x0||_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x199)]['updated']>0x0||_0x3b8f39['counts'][_0x27f328(0x199)][_0x27f328(0x192)]>0x0;_0x1b7722&&(console[_0x27f328(0x17b)](_0x27f328(0x1aa)+formatCountSummary(_0x3b8f39[_0x27f328(0x1df)][_0x27f328(0x20a)])),console[_0x27f328(0x17b)](_0x27f328(0x21a)+formatCountSummary(_0x3b8f39['counts']['experimentalArtifacts'])));if(_0x3d2bae){console[_0x27f328(0x17b)](),console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1f5)]('Errors:'));for(const _0x258d54 of _0x3b8f39[_0x27f328(0x176)]){_0x258d54[_0x27f328(0x1d3)]===_0x27f328(0x19e)&&console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1f5)](_0x27f328(0x1a8)+_0x258d54[_0x27f328(0x20e)]+_0x27f328(0x1f8)+_0x258d54['error']));}for(const _0x412a19 of _0x3b8f39['knowledgeBases']){_0x412a19[_0x27f328(0x1d3)]===_0x27f328(0x19e)&&console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1f5)](_0x27f328(0x17e)+_0x412a19[_0x27f328(0x1e2)]+_0x27f328(0x1f8)+_0x412a19[_0x27f328(0x19e)]));}for(const _0x55418e of _0x3b8f39[_0x27f328(0x1a2)]){_0x55418e[_0x27f328(0x1d3)]===_0x27f328(0x19e)&&console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1f5)](_0x27f328(0x1bb)+_0x55418e['name']+_0x27f328(0x1f8)+_0x55418e[_0x27f328(0x19e)]));}for(const _0x5c2b71 of _0x3b8f39['integrations']){_0x5c2b71['action']===_0x27f328(0x19e)&&console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1f5)](_0x27f328(0x1e7)+_0x5c2b71[_0x27f328(0x1e2)]+_0x27f328(0x1f8)+_0x5c2b71['error']));}for(const _0x18d775 of _0x3b8f39['experimentalKnowledgeBases']){_0x18d775[_0x27f328(0x1d3)]===_0x27f328(0x19e)&&console[_0x27f328(0x17b)](a4_0x48726e['red'](_0x27f328(0x1c7)+_0x18d775[_0x27f328(0x1e2)]+_0x27f328(0x1f8)+_0x18d775[_0x27f328(0x19e)]));}for(const _0x476662 of _0x3b8f39[_0x27f328(0x199)]){_0x476662[_0x27f328(0x1d3)]==='error'&&console[_0x27f328(0x17b)](a4_0x48726e[_0x27f328(0x1f5)](_0x27f328(0x167)+_0x476662['name']+_0x27f328(0x1f8)+_0x476662[_0x27f328(0x19e)]));}return 0x1;}console[_0x27f328(0x17b)]();const _0x84daf9=getLLMProjectUrl(_0x463c1e,_0x3b8f39[_0x27f328(0x225)]);return console[_0x27f328(0x17b)](_0x27f328(0x196)+a4_0x48726e[_0x27f328(0x1fc)](_0x84daf9)),0x0;}}function a4_0xe70e(_0x3bf396,_0x277edc){_0x3bf396=_0x3bf396-0x164;const _0x548048=a4_0x5480();let _0xe70ee7=_0x548048[_0x3bf396];return _0xe70ee7;}export class AgentPushCommand extends BaseCommand{[a4_0x321400(0x1e2)]=a4_0x321400(0x1d1);[a4_0x321400(0x1f3)]=a4_0x321400(0x1ef);async[a4_0x321400(0x222)](_0x2a720b){const _0x1a54e3=a4_0x321400,{options:_0x3a6db8,args:_0x5dacba,tdx:_0x4fab18}=_0x2a720b;let _0x451ffb=_0x5dacba[0x0]||process['cwd']();const _0x12de37=_0x3a6db8['dryRun'],_0xa63e9b=_0x3a6db8[_0x1a54e3(0x224)],_0x191252=_0x3a6db8[_0x1a54e3(0x21c)],_0x28a9a7=_0x3a6db8['site'],_0x3bec93=a4_0x549855['join'](_0x451ffb,_0x1a54e3(0x1a9)),_0x355455=existsSync(_0x3bec93);if(_0x355455){const {data:_0x4086d6}=await withSpinner(_0x1a54e3(0x1ed)+_0x451ffb+_0x1a54e3(0x1e3),()=>_0x4fab18['llm'][_0x1a54e3(0x186)](_0x451ffb,{'dryRun':_0x12de37,'force':_0xa63e9b}));if(_0x12de37)return console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1ec)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x1a54e3(0x17b)](_0x1a54e3(0x21e)+_0x4086d6[_0x1a54e3(0x20e)]),0x0;if(_0x4086d6['action']===_0x1a54e3(0x19e))return console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1f5)](_0x1a54e3(0x223)+_0x4086d6[_0x1a54e3(0x19e)])),0x1;console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x202)](_0x1a54e3(0x19b)+_0x4086d6[_0x1a54e3(0x1d3)]+_0x1a54e3(0x1c0))),console['log']('Agent:\x20'+_0x4086d6[_0x1a54e3(0x20e)]);if(_0x4086d6[_0x1a54e3(0x1ea)]&&_0x4086d6['projectId']){const _0x8d9d4d=getLLMAgentChatUrl(_0x28a9a7,_0x4086d6[_0x1a54e3(0x21d)],_0x4086d6[_0x1a54e3(0x1ea)]);console['log'](_0x1a54e3(0x173)+a4_0x48726e[_0x1a54e3(0x1fc)](_0x8d9d4d));}return 0x0;}const _0x6cc956=_0x3a6db8[_0x1a54e3(0x187)],_0x549b31=resolveProjectFromContext(_0x451ffb,_0x6cc956);if(_0x549b31[_0x1a54e3(0x1b6)])_0x451ffb=_0x549b31[_0x1a54e3(0x1e6)],_0x549b31[_0x1a54e3(0x1eb)]===_0x1a54e3(0x1c6)&&console['log'](a4_0x48726e[_0x1a54e3(0x191)](_0x1a54e3(0x1f9)+_0x451ffb));else{let _0x49c105=_0x1a54e3(0x206);_0x549b31['reason']===_0x1a54e3(0x1b7)&&(_0x49c105=_0x549b31[_0x1a54e3(0x1e0)]+_0x1a54e3(0x1a5)+_0x549b31[_0x1a54e3(0x187)]+_0x1a54e3(0x179));throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x549b31[_0x1a54e3(0x17a)]===_0x1a54e3(0x1d4)?_0x549b31[_0x1a54e3(0x1e0)]:'No\x20tdx.json\x20found\x20in\x20'+_0x451ffb,undefined,{'helpText':_0x49c105});}const {data:_0x5d7a02}=await withSpinner(_0x1a54e3(0x21b),()=>_0x4fab18[_0x1a54e3(0x218)][_0x1a54e3(0x1d8)](_0x451ffb,{'dryRun':!![]})),_0x1e7194=_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x176)]['errors']>0x0;if(_0x1e7194){console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1f5)]('\x0aErrors\x20found:'));for(const _0x3f8a7a of _0x5d7a02[_0x1a54e3(0x176)]){_0x3f8a7a['action']==='error'&&console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1f5)](_0x1a54e3(0x1a8)+_0x3f8a7a['agentName']+_0x1a54e3(0x1f8)+_0x3f8a7a[_0x1a54e3(0x19e)]));}return 0x1;}const _0x3e1a9e=_0x5d7a02[_0x1a54e3(0x1df)]['agents']['created']+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x177)]['created']+_0x5d7a02[_0x1a54e3(0x1df)]['textKnowledgeBases']['created']+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x1a2)][_0x1a54e3(0x1ac)]+_0x5d7a02['counts'][_0x1a54e3(0x1da)][_0x1a54e3(0x1ac)]+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x20a)][_0x1a54e3(0x1ac)]+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x199)][_0x1a54e3(0x1ac)],_0x454f45=_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x176)]['updated']+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x177)]['updated']+_0x5d7a02[_0x1a54e3(0x1df)]['textKnowledgeBases'][_0x1a54e3(0x17c)]+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x1a2)][_0x1a54e3(0x17c)]+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x1da)]['updated']+_0x5d7a02['counts'][_0x1a54e3(0x20a)][_0x1a54e3(0x17c)]+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x199)]['updated'],_0xcfa50c=_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x176)]['unchanged']+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x177)]['unchanged']+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x215)][_0x1a54e3(0x192)]+_0x5d7a02[_0x1a54e3(0x1df)]['prompts'][_0x1a54e3(0x192)]+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x1da)]['unchanged']+_0x5d7a02[_0x1a54e3(0x1df)]['experimentalKnowledgeBases']['unchanged']+_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x199)][_0x1a54e3(0x192)];console[_0x1a54e3(0x17b)](_0x1a54e3(0x16f)+_0x5d7a02[_0x1a54e3(0x190)]+'\x27:'),console[_0x1a54e3(0x17b)]('\x20\x20'+a4_0x48726e[_0x1a54e3(0x202)]('+\x20'+_0x3e1a9e+'\x20new')+_0x1a54e3(0x20d)+a4_0x48726e['yellow']('~\x20'+_0x454f45+_0x1a54e3(0x1f4))+'\x20|\x20'+a4_0x48726e[_0x1a54e3(0x191)]('=\x20'+_0xcfa50c+_0x1a54e3(0x1ee))),console[_0x1a54e3(0x17b)]('\x20\x20Agents:\x20'+formatCountSummary(_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x176)])),console[_0x1a54e3(0x17b)](_0x1a54e3(0x1b8)+formatCountSummary(_0x5d7a02['counts'][_0x1a54e3(0x177)])),console[_0x1a54e3(0x17b)](_0x1a54e3(0x205)+formatCountSummary(_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x215)])),console[_0x1a54e3(0x17b)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x1a2)])),console[_0x1a54e3(0x17b)](_0x1a54e3(0x18d)+formatCountSummary(_0x5d7a02[_0x1a54e3(0x1df)]['integrations']));const _0x35875e=_0x5d7a02['counts'][_0x1a54e3(0x20a)][_0x1a54e3(0x1ac)]>0x0||_0x5d7a02['counts'][_0x1a54e3(0x20a)][_0x1a54e3(0x17c)]>0x0||_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x20a)][_0x1a54e3(0x192)]>0x0||_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x199)][_0x1a54e3(0x1ac)]>0x0||_0x5d7a02[_0x1a54e3(0x1df)]['experimentalArtifacts']['updated']>0x0||_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x199)]['unchanged']>0x0;_0x35875e&&(console[_0x1a54e3(0x17b)](_0x1a54e3(0x1aa)+formatCountSummary(_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x20a)])),console[_0x1a54e3(0x17b)](_0x1a54e3(0x21a)+formatCountSummary(_0x5d7a02[_0x1a54e3(0x1df)][_0x1a54e3(0x199)])));console[_0x1a54e3(0x17b)]('\x20\x20Source:\x20'+a4_0x48726e[_0x1a54e3(0x1fc)](_0x451ffb)),displayDiffs(_0x5d7a02[_0x1a54e3(0x176)],_0x5d7a02[_0x1a54e3(0x177)],_0x5d7a02['textKnowledgeBases'],_0x5d7a02['prompts'],_0x5d7a02[_0x1a54e3(0x1da)],_0x5d7a02[_0x1a54e3(0x20a)],_0x5d7a02['experimentalArtifacts']);if(_0x12de37)return console[_0x1a54e3(0x17b)](a4_0x48726e['yellow'](_0x1a54e3(0x1f7))),0x0;if(_0x3e1a9e===0x0&&_0x454f45===0x0){console['log'](a4_0x48726e[_0x1a54e3(0x202)](_0x1a54e3(0x195)));const _0x3c7984=getLLMProjectUrl(_0x28a9a7,_0x5d7a02[_0x1a54e3(0x21d)]);return console['log'](_0x1a54e3(0x196)+a4_0x48726e['cyan'](_0x3c7984)),0x0;}if(!_0x191252&&!_0xa63e9b){if(!isInteractive())return console[_0x1a54e3(0x19e)](a4_0x48726e['red']('\x0aError:'),_0x1a54e3(0x1ae)),console[_0x1a54e3(0x19e)](a4_0x48726e['dim'](_0x1a54e3(0x1ff))),0x1;const _0x102e5d=await confirmKey(_0x1a54e3(0x1ad)+(_0x3e1a9e+_0x454f45)+'\x20resources?');if(!_0x102e5d)return console['log'](a4_0x48726e[_0x1a54e3(0x1ec)](_0x1a54e3(0x1c2)),_0x1a54e3(0x1b5)),0x1;}const {data:_0x21ba5e}=await withSpinner(_0x1a54e3(0x19a),()=>_0x4fab18[_0x1a54e3(0x218)][_0x1a54e3(0x1d8)](_0x451ffb,{'force':_0xa63e9b})),_0x95a502=_0x21ba5e['counts'][_0x1a54e3(0x176)][_0x1a54e3(0x1fd)]>0x0||_0x21ba5e['counts'][_0x1a54e3(0x177)][_0x1a54e3(0x1fd)]>0x0||_0x21ba5e[_0x1a54e3(0x1df)][_0x1a54e3(0x215)][_0x1a54e3(0x1fd)]>0x0||_0x21ba5e[_0x1a54e3(0x1df)][_0x1a54e3(0x1a2)][_0x1a54e3(0x1fd)]>0x0;if(_0x95a502){console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1ec)]('\x0aProject\x20pushed\x20with\x20errors')),console['log'](),console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1f5)](_0x1a54e3(0x1e4)));for(const _0x101174 of _0x21ba5e[_0x1a54e3(0x176)]){_0x101174[_0x1a54e3(0x1d3)]==='error'&&console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1f5)](_0x1a54e3(0x1a8)+_0x101174[_0x1a54e3(0x20e)]+_0x1a54e3(0x1f8)+_0x101174['error']));}for(const _0x29ddc2 of _0x21ba5e['knowledgeBases']){_0x29ddc2[_0x1a54e3(0x1d3)]===_0x1a54e3(0x19e)&&console[_0x1a54e3(0x17b)](a4_0x48726e['red']('\x20\x20Knowledge\x20Base\x20\x22'+_0x29ddc2[_0x1a54e3(0x1e2)]+_0x1a54e3(0x1f8)+_0x29ddc2['error']));}for(const _0x589f8e of _0x21ba5e[_0x1a54e3(0x215)]){_0x589f8e[_0x1a54e3(0x1d3)]==='error'&&console[_0x1a54e3(0x17b)](a4_0x48726e['red'](_0x1a54e3(0x185)+_0x589f8e[_0x1a54e3(0x1e2)]+'\x22:\x20'+_0x589f8e[_0x1a54e3(0x19e)]));}for(const _0x46ccf5 of _0x21ba5e['prompts']){_0x46ccf5[_0x1a54e3(0x1d3)]===_0x1a54e3(0x19e)&&console[_0x1a54e3(0x17b)](a4_0x48726e[_0x1a54e3(0x1f5)](_0x1a54e3(0x1bb)+_0x46ccf5[_0x1a54e3(0x1e2)]+_0x1a54e3(0x1f8)+_0x46ccf5['error']));}for(const _0x470644 of _0x21ba5e[_0x1a54e3(0x1da)]){_0x470644['action']===_0x1a54e3(0x19e)&&console['log'](a4_0x48726e[_0x1a54e3(0x1f5)](_0x1a54e3(0x1e7)+_0x470644[_0x1a54e3(0x1e2)]+'\x22:\x20'+_0x470644['error']));}return 0x1;}console['log'](a4_0x48726e[_0x1a54e3(0x202)](_0x1a54e3(0x1bc)+(_0x3e1a9e+_0x454f45)+_0x1a54e3(0x20c)+_0x21ba5e[_0x1a54e3(0x190)]+'\x27'));const _0x429542=getLLMProjectUrl(_0x28a9a7,_0x21ba5e[_0x1a54e3(0x21d)]);return console[_0x1a54e3(0x17b)](_0x1a54e3(0x196)+a4_0x48726e[_0x1a54e3(0x1fc)](_0x429542)),0x0;}}
|
|
1
|
+
const a4_0x32ab7b=a4_0x2ecc;(function(_0x1cad84,_0x58f866){const _0x2bbf5c=a4_0x2ecc,_0x364a4e=_0x1cad84();while(!![]){try{const _0x1c0ea0=-parseInt(_0x2bbf5c(0x20d))/0x1*(parseInt(_0x2bbf5c(0x1fc))/0x2)+-parseInt(_0x2bbf5c(0x175))/0x3*(parseInt(_0x2bbf5c(0x1ba))/0x4)+-parseInt(_0x2bbf5c(0x1ee))/0x5*(-parseInt(_0x2bbf5c(0x1f6))/0x6)+-parseInt(_0x2bbf5c(0x1e1))/0x7+-parseInt(_0x2bbf5c(0x1a8))/0x8*(parseInt(_0x2bbf5c(0x222))/0x9)+-parseInt(_0x2bbf5c(0x1b7))/0xa*(parseInt(_0x2bbf5c(0x226))/0xb)+parseInt(_0x2bbf5c(0x20e))/0xc;if(_0x1c0ea0===_0x58f866)break;else _0x364a4e['push'](_0x364a4e['shift']());}catch(_0x1373b3){_0x364a4e['push'](_0x364a4e['shift']());}}}(a4_0xca79,0xdf8e5));import a4_0x2a6b51 from'chalk';import a4_0xa48faf from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';function a4_0x2ecc(_0x256d0f,_0x587073){_0x256d0f=_0x256d0f-0x172;const _0xca7962=a4_0xca79();let _0x2ecc74=_0xca7962[_0x256d0f];return _0x2ecc74;}function a4_0xca79(){const _0x7b8da2=['Errors:','Agent:\x20','<new-name>','hasChanges','outputPath','knowledgeBases','6EpOMZd','message','\x22\x20to\x20new\x20project\x20\x22','\x20\x20Text\x20Knowledge\x20Bases:\x20','\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','Pulling\x20agent\x20\x22','2qhadIO','join','execute','dryRun','\x0aWrite\x20','cyan','\x0aPull\x20summary\x20for\x20\x27','✔\x20Context\x20set:\x20','integrations','\x20updated','site','action','\x20\x20Knowledge\x20Base\x20\x22','pushAgent','Output\x20path:\x20','dim','newProjectName','1727014KMWKRe','67777152kAJJSc','new','\x20\x20Knowledge\x20Bases:\x20','\x22\x20from\x20project\x20\x22','experimentalKnowledgeBases','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','newProjectId','Chat:\x20','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','created','agent:clone','-\x20nothing\x20pushed','\x0aChanges\x20to\x20agent\x20\x27','projectId','total','Status:\x20','New\x20project:\x20','Project:\x20','cloneProject','1053153tQIPrr','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','cwd-config','\x20changed','4941299HlVzff','\x0aProject\x20pushed\x20with\x20errors','\x20resources?','\x22\x20to\x20a\x20different\x20profile','1169340qrATsO','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','errors','\x0aChanges\x20to\x20integration\x20\x27','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','textKnowledgeBases','\x20created','Would\x20pull\x20agent:\x20','yellow','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','gray','cwd','Agent\x20','name','Writing\x20files...','\x20\x20Target:\x20','llm_project','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','No\x20tdx.json\x20found\x20in\x20','projectName','\x0aError:','no_context','\x20new','description','Using\x20current\x20project:\x20','\x0aPush\x20','INVALID_ARGUMENT','\x20\x20Integrations:\x20','green','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','Analyzing\x20project\x20\x22','repeat','New\x20project\x20name\x20is\x20required','\x20successfully','Summary:','\x20files?','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','Would\x20push\x20agent:\x20','\x0aChanges\x20to\x20prompt\x20\x27','\x20|\x20','Cancelled','context','diff','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','\x20\x20Agents:\x20','Using\x20context\x20project:\x20','\x20=\x20','\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)','log','\x20--name\x20','error','32AxrXpd','\x20unchanged','Source:\x20','\x20\x20Prompts:\x20','Pushing\x20to\x20project...','agentName','prompts','push','Dry\x20run\x20-\x20no\x20files\x20written','Project\x20cloned\x20with\x20errors','counts','\x20--profile\x20','agentId','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20errors','10cFaVok','yes','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','8ygROHr','utf-8','pullProject','agent.yml','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','arg-dir','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','outputDir','Using\x20project\x20from\x20','agent:push','\x20\x20Experimental\x20Artifact\x20\x22','\x22\x20to\x20\x22','Using\x20project:\x20','red','session','pushProject','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','\x20\x20Integration\x20\x22','parse','llm','sourceProjectName','experimentalArtifacts','Cannot\x20clone\x20from\x20context\x20project\x20\x22','\x0a✔\x20Pushed\x20','\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','Using\x20local\x20project:\x20','agent:pull','\x20total','unchanged','Dry\x20run\x20-\x20no\x20changes\x20made','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','tdx.json','reason','\x20\x20tdx\x20agent\x20clone\x20agents/','\x20\x20Experimental\x20Artifacts:\x20','MISSING_ARGUMENT','-\x20no\x20files\x20written','\x22:\x20','11613091wsIreW','\x22...','\x20\x20Prompt\x20\x22','dirname','llmProject','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','updated','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','agents','\x0aPush\x20summary\x20for\x20\x27','Pushing\x20agent\x20from\x20\x22','force','projectDir','1752265glUVpO','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project'];a4_0xca79=function(){return _0x7b8da2;};return a4_0xca79();}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(_0x2ecc74){const _0x1045d7=a4_0x2ecc,_0x548536=[];if(_0x2ecc74[_0x1045d7(0x21d)]!==undefined)_0x548536[_0x1045d7(0x1af)](_0x2ecc74[_0x1045d7(0x21d)]+_0x1045d7(0x1d5));if(_0x2ecc74[_0x1045d7(0x20f)]!==undefined&&_0x2ecc74[_0x1045d7(0x20f)]>0x0)_0x548536[_0x1045d7(0x1af)](a4_0x2a6b51['green'](_0x2ecc74[_0x1045d7(0x20f)]+'\x20new'));if(_0x2ecc74[_0x1045d7(0x218)]!==undefined&&_0x2ecc74['created']>0x0)_0x548536['push'](a4_0x2a6b51[_0x1045d7(0x191)](_0x2ecc74[_0x1045d7(0x218)]+_0x1045d7(0x17b)));if(_0x2ecc74[_0x1045d7(0x1e7)]!==undefined&&_0x2ecc74[_0x1045d7(0x1e7)]>0x0)_0x548536[_0x1045d7(0x1af)](a4_0x2a6b51['yellow'](_0x2ecc74['updated']+_0x1045d7(0x205)));if(_0x2ecc74[_0x1045d7(0x1d6)]!==undefined&&_0x2ecc74[_0x1045d7(0x1d6)]>0x0)_0x548536[_0x1045d7(0x1af)](a4_0x2a6b51[_0x1045d7(0x17f)](_0x2ecc74[_0x1045d7(0x1d6)]+'\x20unchanged'));if(_0x2ecc74[_0x1045d7(0x177)]!==undefined&&_0x2ecc74[_0x1045d7(0x177)]>0x0)_0x548536['push'](a4_0x2a6b51[_0x1045d7(0x1c7)](_0x2ecc74[_0x1045d7(0x177)]+_0x1045d7(0x1b6)));return _0x548536[_0x1045d7(0x1fd)](',\x20');}function displayDiffs(_0x5a72b1,_0x507505,_0x1e596d,_0x19f890,_0x2f4706,_0x44794f,_0x415693){const _0x4cbb1b=a4_0x2ecc;for(const _0x1578d3 of _0x5a72b1){if(_0x1578d3['diff']){const _0x126402=_0x1578d3[_0x4cbb1b(0x1ad)]||_0x1578d3['name'];console[_0x4cbb1b(0x1a5)](_0x4cbb1b(0x21b)+_0x126402+'\x27:'),console['log']('─'[_0x4cbb1b(0x194)](0x3c)),console[_0x4cbb1b(0x1a5)](_0x1578d3[_0x4cbb1b(0x19f)]),console[_0x4cbb1b(0x1a5)]('─'['repeat'](0x3c));}}for(const _0x2cfa24 of _0x507505){_0x2cfa24[_0x4cbb1b(0x19f)]&&(console[_0x4cbb1b(0x1a5)]('\x0aChanges\x20to\x20knowledge\x20base\x20\x27'+_0x2cfa24['name']+'\x27:'),console[_0x4cbb1b(0x1a5)]('─'[_0x4cbb1b(0x194)](0x3c)),console[_0x4cbb1b(0x1a5)](_0x2cfa24['diff']),console[_0x4cbb1b(0x1a5)]('─'[_0x4cbb1b(0x194)](0x3c)));}for(const _0x3c7d73 of _0x1e596d){_0x3c7d73['diff']&&(console[_0x4cbb1b(0x1a5)](_0x4cbb1b(0x17e)+_0x3c7d73[_0x4cbb1b(0x182)]+'\x27:'),console[_0x4cbb1b(0x1a5)]('─'[_0x4cbb1b(0x194)](0x3c)),console[_0x4cbb1b(0x1a5)](_0x3c7d73[_0x4cbb1b(0x19f)]),console[_0x4cbb1b(0x1a5)]('─'['repeat'](0x3c)));}for(const _0x30025a of _0x19f890){_0x30025a[_0x4cbb1b(0x19f)]&&(console[_0x4cbb1b(0x1a5)](_0x4cbb1b(0x19b)+_0x30025a[_0x4cbb1b(0x182)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x4cbb1b(0x1a5)](_0x30025a[_0x4cbb1b(0x19f)]),console[_0x4cbb1b(0x1a5)]('─'[_0x4cbb1b(0x194)](0x3c)));}for(const _0xb3f26c of _0x2f4706){_0xb3f26c[_0x4cbb1b(0x19f)]&&(console['log'](_0x4cbb1b(0x178)+_0xb3f26c['name']+'\x27:'),console['log']('─'[_0x4cbb1b(0x194)](0x3c)),console[_0x4cbb1b(0x1a5)](_0xb3f26c[_0x4cbb1b(0x19f)]),console[_0x4cbb1b(0x1a5)]('─'['repeat'](0x3c)));}for(const _0x134c33 of _0x44794f){_0x134c33[_0x4cbb1b(0x19f)]&&(console['log'](_0x4cbb1b(0x216)+_0x134c33[_0x4cbb1b(0x182)]+'\x27:'),console[_0x4cbb1b(0x1a5)]('─'[_0x4cbb1b(0x194)](0x3c)),console[_0x4cbb1b(0x1a5)](_0x134c33[_0x4cbb1b(0x19f)]),console[_0x4cbb1b(0x1a5)]('─'['repeat'](0x3c)));}for(const _0x5f22fe of _0x415693){_0x5f22fe[_0x4cbb1b(0x19f)]&&(console[_0x4cbb1b(0x1a5)]('\x0aChanges\x20to\x20experimental\x20artifact\x20\x27'+_0x5f22fe[_0x4cbb1b(0x182)]+'\x27:'),console[_0x4cbb1b(0x1a5)]('─'[_0x4cbb1b(0x194)](0x3c)),console['log'](_0x5f22fe[_0x4cbb1b(0x19f)]),console[_0x4cbb1b(0x1a5)]('─'[_0x4cbb1b(0x194)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x32ab7b(0x182)]=a4_0x32ab7b(0x1d4);[a4_0x32ab7b(0x18c)]=a4_0x32ab7b(0x223);async[a4_0x32ab7b(0x1fe)](_0x141f2d){const _0x14a7fe=a4_0x32ab7b,{options:_0x1b9dff,args:_0x4f7a69,tdx:_0x26551f}=_0x141f2d,_0x141bef=_0x4f7a69[0x0],_0x5a2010=_0x4f7a69[0x1],_0x52950f=_0x1b9dff['output'],_0x4bf253=_0x1b9dff[_0x14a7fe(0x1ff)],_0x4c4a00=_0x1b9dff[_0x14a7fe(0x1ec)],_0x52fd54=_0x1b9dff['yes'],_0x28d81b=_0x1b9dff[_0x14a7fe(0x1e5)],_0x4e56f3=_0x1b9dff['agent'];let _0x10f45d;if(_0x141bef){const _0x295c4e=a4_0xa48faf[_0x14a7fe(0x1fd)](_0x141bef,_0x14a7fe(0x1da));if(existsSync(_0x295c4e))try{const _0x40de10=JSON[_0x14a7fe(0x1cc)](readFileSync(_0x295c4e,_0x14a7fe(0x1bb)));_0x40de10[_0x14a7fe(0x185)]&&(_0x10f45d={'llm_project':_0x40de10[_0x14a7fe(0x185)]});}catch{}}const _0x2b87ce=findAgentConfigPath(process[_0x14a7fe(0x180)]());let _0x575c01;if(_0x2b87ce)try{const _0x554168=JSON[_0x14a7fe(0x1cc)](readFileSync(_0x2b87ce,_0x14a7fe(0x1bb)));_0x554168['llm_project']&&(_0x575c01={'llm_project':_0x554168['llm_project']});}catch{}const _0x337e04=resolveAgentPullArgs({'arg':_0x141bef,'agentNameArg':_0x5a2010,'agentFlag':_0x4e56f3,'contextProject':_0x28d81b,'argDirConfig':_0x10f45d,'cwdConfigPath':_0x2b87ce||undefined,'cwdConfig':_0x575c01}),{projectNameOrId:_0x46b24d,targetAgentName:_0x57e29e,existingOutputDir:_0x3e33fe,source:_0x1cc744}=_0x337e04;if(_0x1cc744===_0x14a7fe(0x1bf))console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x20b)](_0x14a7fe(0x1c2)+a4_0xa48faf[_0x14a7fe(0x1fd)](_0x141bef,_0x14a7fe(0x1da))+':\x20'+_0x46b24d));else{if(_0x1cc744===_0x14a7fe(0x224))console['log'](a4_0x2a6b51[_0x14a7fe(0x20b)](_0x14a7fe(0x1c6)+_0x46b24d));else _0x1cc744==='context'&&console['log'](a4_0x2a6b51['dim']('Using\x20project\x20from\x20context:\x20'+_0x46b24d));}if(!_0x46b24d)return _0x4e56f3?(console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x17d)]('The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a')),console['log']('Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>'),console[_0x14a7fe(0x1a5)]('Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>')):(console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x17d)](_0x14a7fe(0x199))),console[_0x14a7fe(0x1a5)]('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)'),console['log']('\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[_0x14a7fe(0x1a5)]('\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'),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x1fa)),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x1d2))),0x1;if(_0x57e29e){const {data:_0x36e89d}=await withSpinner(_0x14a7fe(0x1fb)+_0x57e29e+_0x14a7fe(0x211)+_0x46b24d+_0x14a7fe(0x1e2),()=>_0x26551f[_0x14a7fe(0x1cd)]['pullAgent'](_0x46b24d,_0x57e29e,_0x52950f,{'dryRun':_0x4bf253,'force':_0x4c4a00}));if(_0x4bf253)return console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x17d)](_0x14a7fe(0x1b0))),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x17c)+_0x36e89d[_0x14a7fe(0x1ad)]),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x20a)+_0x36e89d[_0x14a7fe(0x1f4)]),_0x36e89d[_0x14a7fe(0x19f)]&&(console[_0x14a7fe(0x1a5)]('\x0aChanges:'),console[_0x14a7fe(0x1a5)]('─'[_0x14a7fe(0x194)](0x3c)),console['log'](_0x36e89d[_0x14a7fe(0x19f)]),console[_0x14a7fe(0x1a5)]('─'[_0x14a7fe(0x194)](0x3c))),0x0;return console[_0x14a7fe(0x1a5)](a4_0x2a6b51['green']('Agent\x20pulled\x20successfully')),console['log'](_0x14a7fe(0x1f1)+_0x36e89d[_0x14a7fe(0x1ad)]),console[_0x14a7fe(0x1a5)]('Output:\x20'+_0x36e89d[_0x14a7fe(0x1f4)]),console['log'](_0x14a7fe(0x21e)+(_0x36e89d['isNew']?a4_0x2a6b51['green'](_0x14a7fe(0x20f)):_0x36e89d[_0x14a7fe(0x1f3)]?a4_0x2a6b51[_0x14a7fe(0x17d)](_0x14a7fe(0x1e7)):a4_0x2a6b51[_0x14a7fe(0x17f)]('unchanged'))),0x0;}const _0x58065f=_0x3e33fe||_0x52950f,{data:_0x3236dc}=await withSpinner(_0x14a7fe(0x193)+_0x46b24d+_0x14a7fe(0x1e2),()=>_0x26551f[_0x14a7fe(0x1cd)][_0x14a7fe(0x1bc)](_0x46b24d,_0x58065f,{'dryRun':!![]})),_0x59ed0d=_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1e9)][_0x14a7fe(0x20f)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1f5)][_0x14a7fe(0x20f)]+_0x3236dc['counts'][_0x14a7fe(0x17a)][_0x14a7fe(0x20f)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1ae)][_0x14a7fe(0x20f)]+_0x3236dc['counts'][_0x14a7fe(0x204)][_0x14a7fe(0x20f)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x212)][_0x14a7fe(0x20f)]+_0x3236dc[_0x14a7fe(0x1b2)]['experimentalArtifacts']['new'],_0x24491d=_0x3236dc[_0x14a7fe(0x1b2)]['agents'][_0x14a7fe(0x1e7)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1f5)][_0x14a7fe(0x1e7)]+_0x3236dc['counts']['textKnowledgeBases'][_0x14a7fe(0x1e7)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1ae)][_0x14a7fe(0x1e7)]+_0x3236dc['counts'][_0x14a7fe(0x204)][_0x14a7fe(0x1e7)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x212)][_0x14a7fe(0x1e7)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1cf)][_0x14a7fe(0x1e7)],_0x4db0f9=_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1e9)]['unchanged']+_0x3236dc[_0x14a7fe(0x1b2)]['knowledgeBases'][_0x14a7fe(0x1d6)]+_0x3236dc['counts']['textKnowledgeBases'][_0x14a7fe(0x1d6)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1ae)][_0x14a7fe(0x1d6)]+_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x204)][_0x14a7fe(0x1d6)]+_0x3236dc['counts']['experimentalKnowledgeBases'][_0x14a7fe(0x1d6)]+_0x3236dc[_0x14a7fe(0x1b2)]['experimentalArtifacts'][_0x14a7fe(0x1d6)];console[_0x14a7fe(0x1a5)](_0x14a7fe(0x202)+_0x3236dc[_0x14a7fe(0x188)]+'\x27:'),console[_0x14a7fe(0x1a5)]('\x20\x20'+a4_0x2a6b51[_0x14a7fe(0x191)]('+\x20'+_0x59ed0d+'\x20new')+_0x14a7fe(0x19c)+a4_0x2a6b51[_0x14a7fe(0x17d)]('~\x20'+_0x24491d+_0x14a7fe(0x225))+_0x14a7fe(0x19c)+a4_0x2a6b51[_0x14a7fe(0x20b)]('=\x20'+_0x4db0f9+_0x14a7fe(0x1a9))),console[_0x14a7fe(0x1a5)]('\x20\x20Agents:\x20'+formatCountSummary(_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1e9)])),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x210)+formatCountSummary(_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1f5)])),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x1f9)+formatCountSummary(_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x17a)])),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x1ab)+formatCountSummary(_0x3236dc['counts'][_0x14a7fe(0x1ae)])),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x190)+formatCountSummary(_0x3236dc['counts']['integrations']));const _0x10c1a7=_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x212)]['total']>0x0||_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1cf)]['total']>0x0;_0x10c1a7&&(console[_0x14a7fe(0x1a5)](_0x14a7fe(0x1c0)+formatCountSummary(_0x3236dc['counts'][_0x14a7fe(0x212)])),console[_0x14a7fe(0x1a5)](_0x14a7fe(0x1dd)+formatCountSummary(_0x3236dc[_0x14a7fe(0x1b2)][_0x14a7fe(0x1cf)])));console[_0x14a7fe(0x1a5)](_0x14a7fe(0x184)+a4_0x2a6b51[_0x14a7fe(0x201)](_0x3236dc[_0x14a7fe(0x1c1)])),displayDiffs(_0x3236dc['agents'],_0x3236dc['knowledgeBases'],_0x3236dc[_0x14a7fe(0x17a)],_0x3236dc['prompts'],_0x3236dc[_0x14a7fe(0x204)],_0x3236dc[_0x14a7fe(0x212)],_0x3236dc[_0x14a7fe(0x1cf)]);if(_0x4bf253)return console[_0x14a7fe(0x1a5)](a4_0x2a6b51['yellow']('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x59ed0d===0x0&&_0x24491d===0x0)return console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x191)](_0x14a7fe(0x213))),saveSessionContext({'llm_project':_0x3236dc['projectName']},_0x1b9dff['session']),console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x191)]('✔\x20Context\x20set:\x20'+a4_0x2a6b51['dim'](_0x14a7fe(0x185))+_0x14a7fe(0x1a3)+a4_0x2a6b51[_0x14a7fe(0x201)](_0x3236dc[_0x14a7fe(0x188)]))),0x0;if(!_0x52fd54&&!_0x4c4a00){if(!isInteractive())return console[_0x14a7fe(0x1a7)](a4_0x2a6b51[_0x14a7fe(0x1c7)]('\x0aError:'),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x14a7fe(0x1a7)](a4_0x2a6b51[_0x14a7fe(0x20b)](_0x14a7fe(0x1b5))),0x1;const _0x3b48e5=await confirmKey(_0x14a7fe(0x200)+(_0x59ed0d+_0x24491d)+_0x14a7fe(0x198));if(!_0x3b48e5)return console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x17d)]('Cancelled'),_0x14a7fe(0x1df)),0x1;}const {data:_0x2240c4}=await withSpinner(_0x14a7fe(0x183),()=>_0x26551f[_0x14a7fe(0x1cd)]['pullProject'](_0x46b24d,_0x58065f,{'force':_0x4c4a00}));return console[_0x14a7fe(0x1a5)](a4_0x2a6b51[_0x14a7fe(0x191)]('\x0a✔\x20Pulled\x20'+(_0x59ed0d+_0x24491d)+'\x20files\x20to\x20'+_0x2240c4[_0x14a7fe(0x1c1)])),saveSessionContext({'llm_project':_0x2240c4[_0x14a7fe(0x188)]},_0x1b9dff[_0x14a7fe(0x1c8)]),console[_0x14a7fe(0x1a5)](a4_0x2a6b51['green'](_0x14a7fe(0x203)+a4_0x2a6b51[_0x14a7fe(0x20b)](_0x14a7fe(0x185))+'\x20=\x20'+a4_0x2a6b51[_0x14a7fe(0x201)](_0x2240c4[_0x14a7fe(0x188)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{['name']=a4_0x32ab7b(0x219);['description']=a4_0x32ab7b(0x1e6);async[a4_0x32ab7b(0x1fe)](_0xadd488){const _0x2390c1=a4_0x32ab7b,{options:_0x1764f3,args:_0x154608,tdx:_0x3f6256}=_0xadd488,_0x1618b3=_0x154608[0x0],_0x4f23eb=_0x1764f3[_0x2390c1(0x182)],_0x42df3f=_0x1764f3[_0x2390c1(0x1ff)],_0xe460e4=_0x1764f3[_0x2390c1(0x1b8)],_0x1377fd=_0x1764f3[_0x2390c1(0x206)],_0xf11b80=_0x1764f3[_0x2390c1(0x1e5)];let _0x2b0626;const _0x3c8ddc=findAgentConfigPath(process[_0x2390c1(0x180)]());if(_0x1618b3){const _0x318c93=a4_0xa48faf['join'](_0x1618b3,'tdx.json');existsSync(_0x318c93)?(_0x2b0626=_0x1618b3,console['log'](a4_0x2a6b51[_0x2390c1(0x20b)](_0x2390c1(0x1d3)+_0x1618b3))):_0x2b0626=_0x1618b3;}else{if(_0x3c8ddc)_0x2b0626=a4_0xa48faf[_0x2390c1(0x1e4)](_0x3c8ddc),console[_0x2390c1(0x1a5)](a4_0x2a6b51[_0x2390c1(0x20b)](_0x2390c1(0x18d)+_0x2b0626));else{if(_0xf11b80){const _0x3ddd5b=sanitizeForFilesystem(_0xf11b80);let _0x65f2dd=_0x3ddd5b,_0x3fd542=a4_0xa48faf['join'](process[_0x2390c1(0x180)](),_0x2390c1(0x1e9),_0x3ddd5b,_0x2390c1(0x1da));if(!existsSync(_0x3fd542)){const _0x4996a9=normalizeName(_0xf11b80),_0xaddd2=a4_0xa48faf['join'](process[_0x2390c1(0x180)](),_0x2390c1(0x1e9),_0x4996a9,_0x2390c1(0x1da));existsSync(_0xaddd2)&&(_0x65f2dd=_0x4996a9,_0x3fd542=_0xaddd2);}if(existsSync(_0x3fd542))_0x2b0626=a4_0xa48faf[_0x2390c1(0x1e4)](_0x3fd542),console[_0x2390c1(0x1a5)](a4_0x2a6b51['dim'](_0x2390c1(0x1d3)+_0x2b0626));else{const _0x2579dc=_0x1764f3['profile'];if(_0x2579dc)throw new SDKError(ErrorCode[_0x2390c1(0x18f)],_0x2390c1(0x1d0)+_0xf11b80+_0x2390c1(0x174),undefined,{'helpText':'When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a'+_0x2390c1(0x1ca)+('\x20\x20tdx\x20agent\x20pull\x20'+_0xf11b80+'\x0a')+(_0x2390c1(0x1dc)+_0x65f2dd+_0x2390c1(0x1a6)+(_0x4f23eb||_0x2390c1(0x1f2))+_0x2390c1(0x1b3)+_0x2579dc)});_0x2b0626=_0xf11b80,console[_0x2390c1(0x1a5)](a4_0x2a6b51['dim'](_0x2390c1(0x1a2)+_0xf11b80));}}}}if(!_0x2b0626)return console['log'](a4_0x2a6b51['yellow'](_0x2390c1(0x1a0))),console[_0x2390c1(0x1a5)](_0x2390c1(0x1e8)),console[_0x2390c1(0x1a5)](_0x2390c1(0x192)),console[_0x2390c1(0x1a5)](_0x2390c1(0x1a4)),console[_0x2390c1(0x1a5)](_0x2390c1(0x1b9)),0x1;if(!_0x4f23eb)throw new SDKError(ErrorCode[_0x2390c1(0x1de)],_0x2390c1(0x195),undefined,{'helpText':_0x2390c1(0x176)});if(!_0xe460e4&&!_0x42df3f){if(!isInteractive())return console[_0x2390c1(0x1a7)](a4_0x2a6b51['red'](_0x2390c1(0x189)),_0x2390c1(0x186)),console[_0x2390c1(0x1a7)](a4_0x2a6b51['dim'](_0x2390c1(0x1b5))),0x1;const _0xa8618e=await confirmKey('Clone\x20\x22'+_0x2b0626+_0x2390c1(0x1f8)+_0x4f23eb+'\x22?');if(!_0xa8618e)return console[_0x2390c1(0x1a5)](a4_0x2a6b51[_0x2390c1(0x17d)](_0x2390c1(0x19d))),0x1;}const {data:_0x579aaf}=await withSpinner('Cloning\x20\x22'+_0x2b0626+_0x2390c1(0x1c5)+_0x4f23eb+_0x2390c1(0x1e2),()=>_0x3f6256[_0x2390c1(0x1cd)][_0x2390c1(0x221)](_0x2b0626,_0x4f23eb,{'dryRun':_0x42df3f}));if(_0x42df3f){console['log'](a4_0x2a6b51['yellow']('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x2390c1(0x1a5)](_0x2390c1(0x1aa)+_0x579aaf[_0x2390c1(0x1ce)]),console['log'](_0x2390c1(0x21f)+_0x4f23eb),console[_0x2390c1(0x1a5)]('Would\x20clone:'),console['log']('\x20\x20Agents:\x20'+_0x579aaf[_0x2390c1(0x1b2)]['agents'][_0x2390c1(0x218)]),console['log']('\x20\x20Knowledge\x20Bases:\x20'+_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1f5)][_0x2390c1(0x218)]),console[_0x2390c1(0x1a5)](_0x2390c1(0x1ab)+_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1ae)][_0x2390c1(0x218)]);const _0x2d3bf0=_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x212)]['created']>0x0||_0x579aaf['counts'][_0x2390c1(0x1cf)]['created']>0x0;return _0x2d3bf0&&(console['log'](_0x2390c1(0x1c0)+_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x212)]['created']),console[_0x2390c1(0x1a5)]('\x20\x20Experimental\x20Artifacts:\x20'+_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1cf)][_0x2390c1(0x218)])),0x0;}const _0x1dc0f6=_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1e9)][_0x2390c1(0x177)]>0x0||_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1f5)][_0x2390c1(0x177)]>0x0||_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1ae)][_0x2390c1(0x177)]>0x0||_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x212)][_0x2390c1(0x177)]>0x0||_0x579aaf['counts'][_0x2390c1(0x1cf)][_0x2390c1(0x177)]>0x0;_0x1dc0f6?console[_0x2390c1(0x1a5)](a4_0x2a6b51['yellow'](_0x2390c1(0x1b1))):console[_0x2390c1(0x1a5)](a4_0x2a6b51['green']('Project\x20cloned\x20successfully'));console['log']('Source:\x20'+_0x579aaf['sourceProjectName']),console[_0x2390c1(0x1a5)](_0x2390c1(0x21f)+_0x579aaf[_0x2390c1(0x20c)]),console[_0x2390c1(0x1a5)]('New\x20project\x20ID:\x20'+_0x579aaf[_0x2390c1(0x214)]),console[_0x2390c1(0x1a5)](),console[_0x2390c1(0x1a5)](_0x2390c1(0x197)),console[_0x2390c1(0x1a5)](_0x2390c1(0x1a1)+formatCountSummary(_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1e9)])),console[_0x2390c1(0x1a5)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x579aaf[_0x2390c1(0x1b2)]['knowledgeBases'])),console['log'](_0x2390c1(0x1ab)+formatCountSummary(_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1ae)])),console[_0x2390c1(0x1a5)](_0x2390c1(0x190)+formatCountSummary(_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x204)]));const _0x2cf564=_0x579aaf[_0x2390c1(0x1b2)]['experimentalKnowledgeBases']['created']>0x0||_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x212)][_0x2390c1(0x1e7)]>0x0||_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x212)][_0x2390c1(0x1d6)]>0x0||_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1cf)][_0x2390c1(0x218)]>0x0||_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x1cf)][_0x2390c1(0x1e7)]>0x0||_0x579aaf[_0x2390c1(0x1b2)]['experimentalArtifacts']['unchanged']>0x0;_0x2cf564&&(console['log'](_0x2390c1(0x1c0)+formatCountSummary(_0x579aaf[_0x2390c1(0x1b2)][_0x2390c1(0x212)])),console['log'](_0x2390c1(0x1dd)+formatCountSummary(_0x579aaf[_0x2390c1(0x1b2)]['experimentalArtifacts'])));if(_0x1dc0f6){console['log'](),console['log'](a4_0x2a6b51[_0x2390c1(0x1c7)](_0x2390c1(0x1f0)));for(const _0x594f6f of _0x579aaf[_0x2390c1(0x1e9)]){_0x594f6f[_0x2390c1(0x207)]===_0x2390c1(0x1a7)&&console[_0x2390c1(0x1a5)](a4_0x2a6b51[_0x2390c1(0x1c7)]('\x20\x20Agent\x20\x22'+_0x594f6f[_0x2390c1(0x1ad)]+_0x2390c1(0x1e0)+_0x594f6f[_0x2390c1(0x1a7)]));}for(const _0x73711a of _0x579aaf['knowledgeBases']){_0x73711a[_0x2390c1(0x207)]==='error'&&console['log'](a4_0x2a6b51['red'](_0x2390c1(0x208)+_0x73711a['name']+_0x2390c1(0x1e0)+_0x73711a['error']));}for(const _0x120189 of _0x579aaf['prompts']){_0x120189[_0x2390c1(0x207)]===_0x2390c1(0x1a7)&&console[_0x2390c1(0x1a5)](a4_0x2a6b51[_0x2390c1(0x1c7)](_0x2390c1(0x1e3)+_0x120189[_0x2390c1(0x182)]+_0x2390c1(0x1e0)+_0x120189[_0x2390c1(0x1a7)]));}for(const _0x2356a5 of _0x579aaf['integrations']){_0x2356a5[_0x2390c1(0x207)]===_0x2390c1(0x1a7)&&console[_0x2390c1(0x1a5)](a4_0x2a6b51[_0x2390c1(0x1c7)](_0x2390c1(0x1cb)+_0x2356a5[_0x2390c1(0x182)]+_0x2390c1(0x1e0)+_0x2356a5[_0x2390c1(0x1a7)]));}for(const _0x3155b6 of _0x579aaf[_0x2390c1(0x212)]){_0x3155b6[_0x2390c1(0x207)]===_0x2390c1(0x1a7)&&console[_0x2390c1(0x1a5)](a4_0x2a6b51[_0x2390c1(0x1c7)](_0x2390c1(0x1be)+_0x3155b6[_0x2390c1(0x182)]+_0x2390c1(0x1e0)+_0x3155b6[_0x2390c1(0x1a7)]));}for(const _0x2952c9 of _0x579aaf[_0x2390c1(0x1cf)]){_0x2952c9[_0x2390c1(0x207)]===_0x2390c1(0x1a7)&&console[_0x2390c1(0x1a5)](a4_0x2a6b51[_0x2390c1(0x1c7)](_0x2390c1(0x1c4)+_0x2952c9[_0x2390c1(0x182)]+_0x2390c1(0x1e0)+_0x2952c9[_0x2390c1(0x1a7)]));}return 0x1;}console['log']();const _0x5ea99a=getLLMProjectUrl(_0x1377fd,_0x579aaf[_0x2390c1(0x214)]);return console[_0x2390c1(0x1a5)](_0x2390c1(0x220)+a4_0x2a6b51[_0x2390c1(0x201)](_0x5ea99a)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x32ab7b(0x182)]=a4_0x32ab7b(0x1c3);[a4_0x32ab7b(0x18c)]=a4_0x32ab7b(0x1ef);async[a4_0x32ab7b(0x1fe)](_0x40a637){const _0x33b039=a4_0x32ab7b,{options:_0x3a8730,args:_0x14b324,tdx:_0x293a1c}=_0x40a637;let _0x1657dc=_0x14b324[0x0]||process['cwd']();const _0x58bda8=_0x3a8730['dryRun'],_0x11c350=_0x3a8730[_0x33b039(0x1ec)],_0x29999f=_0x3a8730['yes'],_0x4dc9f3=_0x3a8730[_0x33b039(0x206)],_0x284465=a4_0xa48faf['join'](_0x1657dc,_0x33b039(0x1bd)),_0x27fbeb=existsSync(_0x284465);if(_0x27fbeb){const {data:_0x1033f4}=await withSpinner(_0x33b039(0x1eb)+_0x1657dc+'\x22...',()=>_0x293a1c['llm'][_0x33b039(0x209)](_0x1657dc,{'dryRun':_0x58bda8,'force':_0x11c350}));if(_0x58bda8)return console[_0x33b039(0x1a5)](a4_0x2a6b51['yellow'](_0x33b039(0x1d7))),console[_0x33b039(0x1a5)](_0x33b039(0x19a)+_0x1033f4[_0x33b039(0x1ad)]),0x0;if(_0x1033f4[_0x33b039(0x207)]===_0x33b039(0x1a7))return console[_0x33b039(0x1a5)](a4_0x2a6b51['red']('Failed\x20to\x20push\x20agent:\x20'+_0x1033f4[_0x33b039(0x1a7)])),0x1;console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x191)](_0x33b039(0x181)+_0x1033f4[_0x33b039(0x207)]+_0x33b039(0x196))),console[_0x33b039(0x1a5)](_0x33b039(0x1f1)+_0x1033f4[_0x33b039(0x1ad)]);if(_0x1033f4[_0x33b039(0x1b4)]&&_0x1033f4['projectId']){const _0x21a912=getLLMAgentChatUrl(_0x4dc9f3,_0x1033f4[_0x33b039(0x21c)],_0x1033f4[_0x33b039(0x1b4)]);console['log'](_0x33b039(0x215)+a4_0x2a6b51[_0x33b039(0x201)](_0x21a912));}return 0x0;}const _0x2560e9=_0x3a8730[_0x33b039(0x1e5)],_0xec0b7b=resolveProjectFromContext(_0x1657dc,_0x2560e9);if(_0xec0b7b['found'])_0x1657dc=_0xec0b7b[_0x33b039(0x1ed)],_0xec0b7b['source']===_0x33b039(0x19e)&&console['log'](a4_0x2a6b51[_0x33b039(0x20b)](_0x33b039(0x1c6)+_0x1657dc));else{let _0x24b676=_0x33b039(0x179);_0xec0b7b['reason']==='no_local_folder'&&(_0x24b676=_0xec0b7b[_0x33b039(0x1f7)]+_0x33b039(0x1d8)+_0xec0b7b['llmProject']+'\x27\x20to\x20create\x20the\x20folder\x20structure.');throw new SDKError(ErrorCode[_0x33b039(0x18f)],_0xec0b7b[_0x33b039(0x1db)]===_0x33b039(0x18a)?_0xec0b7b[_0x33b039(0x1f7)]:_0x33b039(0x187)+_0x1657dc,undefined,{'helpText':_0x24b676});}const {data:_0x5eea2e}=await withSpinner('Analyzing\x20changes\x20to\x20push...',()=>_0x293a1c[_0x33b039(0x1cd)]['pushProject'](_0x1657dc,{'dryRun':!![]})),_0x5ec701=_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1e9)][_0x33b039(0x177)]>0x0;if(_0x5ec701){console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x1c7)]('\x0aErrors\x20found:'));for(const _0x17fc17 of _0x5eea2e[_0x33b039(0x1e9)]){_0x17fc17[_0x33b039(0x207)]===_0x33b039(0x1a7)&&console['log'](a4_0x2a6b51['red']('\x20\x20Agent\x20\x22'+_0x17fc17[_0x33b039(0x1ad)]+'\x22:\x20'+_0x17fc17[_0x33b039(0x1a7)]));}return 0x1;}const _0x4ab97c=_0x5eea2e[_0x33b039(0x1b2)]['agents']['created']+_0x5eea2e['counts'][_0x33b039(0x1f5)][_0x33b039(0x218)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x17a)]['created']+_0x5eea2e['counts'][_0x33b039(0x1ae)][_0x33b039(0x218)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x204)][_0x33b039(0x218)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x212)][_0x33b039(0x218)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1cf)]['created'],_0x16dda3=_0x5eea2e['counts'][_0x33b039(0x1e9)]['updated']+_0x5eea2e['counts'][_0x33b039(0x1f5)][_0x33b039(0x1e7)]+_0x5eea2e['counts'][_0x33b039(0x17a)][_0x33b039(0x1e7)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1ae)][_0x33b039(0x1e7)]+_0x5eea2e[_0x33b039(0x1b2)]['integrations'][_0x33b039(0x1e7)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x212)][_0x33b039(0x1e7)]+_0x5eea2e['counts'][_0x33b039(0x1cf)][_0x33b039(0x1e7)],_0xf1d143=_0x5eea2e['counts'][_0x33b039(0x1e9)]['unchanged']+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1f5)][_0x33b039(0x1d6)]+_0x5eea2e['counts'][_0x33b039(0x17a)][_0x33b039(0x1d6)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1ae)][_0x33b039(0x1d6)]+_0x5eea2e[_0x33b039(0x1b2)]['integrations']['unchanged']+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x212)][_0x33b039(0x1d6)]+_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1cf)]['unchanged'];console['log'](_0x33b039(0x1ea)+_0x5eea2e[_0x33b039(0x188)]+'\x27:'),console[_0x33b039(0x1a5)]('\x20\x20'+a4_0x2a6b51[_0x33b039(0x191)]('+\x20'+_0x4ab97c+_0x33b039(0x18b))+_0x33b039(0x19c)+a4_0x2a6b51[_0x33b039(0x17d)]('~\x20'+_0x16dda3+'\x20changed')+_0x33b039(0x19c)+a4_0x2a6b51['dim']('=\x20'+_0xf1d143+_0x33b039(0x1a9))),console[_0x33b039(0x1a5)]('\x20\x20Agents:\x20'+formatCountSummary(_0x5eea2e['counts'][_0x33b039(0x1e9)])),console[_0x33b039(0x1a5)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x5eea2e['counts'][_0x33b039(0x1f5)])),console[_0x33b039(0x1a5)](_0x33b039(0x1f9)+formatCountSummary(_0x5eea2e[_0x33b039(0x1b2)]['textKnowledgeBases'])),console[_0x33b039(0x1a5)](_0x33b039(0x1ab)+formatCountSummary(_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1ae)])),console[_0x33b039(0x1a5)](_0x33b039(0x190)+formatCountSummary(_0x5eea2e['counts'][_0x33b039(0x204)]));const _0x920b77=_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x212)][_0x33b039(0x218)]>0x0||_0x5eea2e['counts'][_0x33b039(0x212)][_0x33b039(0x1e7)]>0x0||_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x212)][_0x33b039(0x1d6)]>0x0||_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1cf)][_0x33b039(0x218)]>0x0||_0x5eea2e[_0x33b039(0x1b2)]['experimentalArtifacts'][_0x33b039(0x1e7)]>0x0||_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1cf)][_0x33b039(0x1d6)]>0x0;_0x920b77&&(console[_0x33b039(0x1a5)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x212)])),console[_0x33b039(0x1a5)](_0x33b039(0x1dd)+formatCountSummary(_0x5eea2e[_0x33b039(0x1b2)][_0x33b039(0x1cf)])));console['log']('\x20\x20Source:\x20'+a4_0x2a6b51[_0x33b039(0x201)](_0x1657dc)),displayDiffs(_0x5eea2e[_0x33b039(0x1e9)],_0x5eea2e[_0x33b039(0x1f5)],_0x5eea2e['textKnowledgeBases'],_0x5eea2e[_0x33b039(0x1ae)],_0x5eea2e[_0x33b039(0x204)],_0x5eea2e[_0x33b039(0x212)],_0x5eea2e[_0x33b039(0x1cf)]);if(_0x58bda8)return console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x17d)](_0x33b039(0x1d9))),0x0;if(_0x4ab97c===0x0&&_0x16dda3===0x0){console[_0x33b039(0x1a5)](a4_0x2a6b51['green'](_0x33b039(0x217)));const _0x394988=getLLMProjectUrl(_0x4dc9f3,_0x5eea2e[_0x33b039(0x21c)]);return console[_0x33b039(0x1a5)](_0x33b039(0x220)+a4_0x2a6b51['cyan'](_0x394988)),0x0;}if(!_0x29999f&&!_0x11c350){if(!isInteractive())return console[_0x33b039(0x1a7)](a4_0x2a6b51[_0x33b039(0x1c7)](_0x33b039(0x189)),_0x33b039(0x186)),console['error'](a4_0x2a6b51[_0x33b039(0x20b)](_0x33b039(0x1b5))),0x1;const _0x55f147=await confirmKey(_0x33b039(0x18e)+(_0x4ab97c+_0x16dda3)+_0x33b039(0x173));if(!_0x55f147)return console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x17d)](_0x33b039(0x19d)),_0x33b039(0x21a)),0x1;}const {data:_0x29940b}=await withSpinner(_0x33b039(0x1ac),()=>_0x293a1c[_0x33b039(0x1cd)][_0x33b039(0x1c9)](_0x1657dc,{'force':_0x11c350})),_0x5ac7db=_0x29940b[_0x33b039(0x1b2)]['agents'][_0x33b039(0x177)]>0x0||_0x29940b['counts'][_0x33b039(0x1f5)][_0x33b039(0x177)]>0x0||_0x29940b[_0x33b039(0x1b2)]['textKnowledgeBases']['errors']>0x0||_0x29940b[_0x33b039(0x1b2)][_0x33b039(0x1ae)][_0x33b039(0x177)]>0x0;if(_0x5ac7db){console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x17d)](_0x33b039(0x172))),console[_0x33b039(0x1a5)](),console[_0x33b039(0x1a5)](a4_0x2a6b51['red'](_0x33b039(0x1f0)));for(const _0xe35d57 of _0x29940b[_0x33b039(0x1e9)]){_0xe35d57[_0x33b039(0x207)]==='error'&&console[_0x33b039(0x1a5)](a4_0x2a6b51['red']('\x20\x20Agent\x20\x22'+_0xe35d57['agentName']+_0x33b039(0x1e0)+_0xe35d57[_0x33b039(0x1a7)]));}for(const _0x27ea12 of _0x29940b[_0x33b039(0x1f5)]){_0x27ea12['action']===_0x33b039(0x1a7)&&console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x1c7)](_0x33b039(0x208)+_0x27ea12[_0x33b039(0x182)]+_0x33b039(0x1e0)+_0x27ea12[_0x33b039(0x1a7)]));}for(const _0x4e6a57 of _0x29940b[_0x33b039(0x17a)]){_0x4e6a57[_0x33b039(0x207)]===_0x33b039(0x1a7)&&console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x1c7)]('\x20\x20Text\x20Knowledge\x20Base\x20\x22'+_0x4e6a57['name']+'\x22:\x20'+_0x4e6a57[_0x33b039(0x1a7)]));}for(const _0x31dacc of _0x29940b[_0x33b039(0x1ae)]){_0x31dacc[_0x33b039(0x207)]===_0x33b039(0x1a7)&&console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x1c7)]('\x20\x20Prompt\x20\x22'+_0x31dacc['name']+_0x33b039(0x1e0)+_0x31dacc['error']));}for(const _0xae1120 of _0x29940b[_0x33b039(0x204)]){_0xae1120[_0x33b039(0x207)]===_0x33b039(0x1a7)&&console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x1c7)](_0x33b039(0x1cb)+_0xae1120[_0x33b039(0x182)]+_0x33b039(0x1e0)+_0xae1120[_0x33b039(0x1a7)]));}return 0x1;}console[_0x33b039(0x1a5)](a4_0x2a6b51[_0x33b039(0x191)](_0x33b039(0x1d1)+(_0x4ab97c+_0x16dda3)+'\x20resources\x20to\x20\x27'+_0x29940b[_0x33b039(0x188)]+'\x27'));const _0x4d69f0=getLLMProjectUrl(_0x4dc9f3,_0x29940b[_0x33b039(0x21c)]);return console[_0x33b039(0x1a5)](_0x33b039(0x220)+a4_0x2a6b51[_0x33b039(0x201)](_0x4d69f0)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0xb0df85=a5_0x1e4a;function a5_0x1e4a(_0x3a36b2,_0x2a904a){_0x3a36b2=_0x3a36b2-0x138;const _0x2fe819=a5_0x2fe8();let _0x1e4a4f=_0x2fe819[_0x3a36b2];return _0x1e4a4f;}(function(_0xbd2e7,_0x424a1d){const _0x209128=a5_0x1e4a,_0x5b6166=_0xbd2e7();while(!![]){try{const _0x36d920=parseInt(_0x209128(0x143))/0x1*(parseInt(_0x209128(0x1c5))/0x2)+-parseInt(_0x209128(0x14b))/0x3*(-parseInt(_0x209128(0x175))/0x4)+-parseInt(_0x209128(0x158))/0x5*(parseInt(_0x209128(0x1c6))/0x6)+-parseInt(_0x209128(0x194))/0x7+parseInt(_0x209128(0x18f))/0x8*(-parseInt(_0x209128(0x190))/0x9)+parseInt(_0x209128(0x1c3))/0xa+parseInt(_0x209128(0x183))/0xb*(parseInt(_0x209128(0x1b7))/0xc);if(_0x36d920===_0x424a1d)break;else _0x5b6166['push'](_0x5b6166['shift']());}catch(_0xb151b8){_0x5b6166['push'](_0x5b6166['shift']());}}}(a5_0x2fe8,0xe4783));import*as a5_0x1a911a from'node:fs';import*as a5_0x163c04 from'node:path';import a5_0x1f5500 from'chalk';import{BaseCommand}from'./command.js';function a5_0x2fe8(){const _0x204497=['no_local_folder','Passed:\x20\x20\x20','reeval','isSpinning','size','no_context','green','\x20\x20Round\x20','status','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','PASS','jsonl','\x20\x20Site:\x20','✗\x20ERROR:\x20','toLowerCase','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','resolve','tags','Using\x20agent:\x20','Evaluating\x20response...','agent:test','No\x20tests\x20have\x20tags\x20defined.','ERROR','table','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','Test\x20','stop','600DoqziF','start','reason','Executing\x20new\x20tests...','test.yml','log','\x22,\x20but\x20current\x20site\x20is\x20\x22','\x20\x20Conversation:\x20','\x20\x20Project:\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','Test\x20Summary','filter','...','55AKyQDf','output','found','agentDirs','length','has','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','Agent:\x20','agentName','yellow','cyan','dim','8304vGntVP','9711KWkUgv','map','...\x20','Failed:\x20\x20\x20','6749904GbZLab','multiple_agents','Available\x20tests:\x20','✓\x20PASS:\x20','context','eval','verbose','Test\x20Configuration:','tsv','Total:\x20\x20\x20\x20','json','No\x20tests\x20found\x20with\x20tags:\x20','site','writeFileSync','split','tests','404','FAIL','description','agent','red','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','not\x20found','\x27\x20to\x20create\x20the\x20folder\x20structure.','Cached\x20run\x20from:\x20','join','Cached\x20run\x20is\x20from\x20site\x20\x22','\x20-\x20','✗\x20FAIL:\x20','\x20\x20Agent:\x20','timestamp','Usage:','Available\x20tags:\x20','Re-evaluating...','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','3536868wPggqQ','toISOString','now','resolveProjectId','\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','Conversation\x20URL:\x20','text','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','No\x20tests\x20found\x20matching:\x20','Tests\x20found:\x20','add','utf-8','14886040bokSdd','\x22:\x20','1880514sQQuhF','102shbPsA','Site:\x20','push','Re-evaluation\x20Summary','Output\x20written\x20to:\x20','New\x20tests\x20to\x20execute:\x20','Run\x20\x27tdx\x20agent\x20pull\x20','Running:\x20','includes','repeat','white','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','Either\x20switch\x20to\x20the\x20\x22','\x20(new)','✗\x20ERROR:\x20Project\x20not\x20found:\x20','llm','projectName','rounds','find','1ihRaBM','Error\x20writing\x20output\x20file:\x20','Project\x20path:\x20','message','Run\x20tests\x20for\x20an\x20LLM\x20agent','Round\x201/','Round\x20','no_tests','7413WCyLwq','llmProject','Duration:\x20','projectDir','Error:\x20No\x20previous\x20test\x20run\x20found.','execute','forEach',':\x20Sending\x20user\x20input...','conversations','name','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','trim','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','368565UhwTRF','conversation_url'];a5_0x2fe8=function(){return _0x204497;};return a5_0x2fe8();}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_0xb0df85(0x154)]=a5_0xb0df85(0x16e);[a5_0xb0df85(0x1a6)]=a5_0xb0df85(0x147);async[a5_0xb0df85(0x150)](_0x1c1ced){const _0x447390=a5_0xb0df85,{options:_0x3ca6e7,args:_0x3e8562,tdx:_0x362700}=_0x1c1ced,_0x65541c=_0x3e8562[0x0]||'.',_0x18ac5d=_0x3ca6e7['dryRun'],_0x1e8f72=_0x3ca6e7,_0x202e12=_0x1e8f72[_0x447390(0x199)]===![],_0x492ff8=_0x1e8f72[_0x447390(0x15c)],_0x3437a8=_0x1e8f72['name'],_0x51fd06=_0x1e8f72[_0x447390(0x16b)],_0x3972b2=_0x3ca6e7[_0x447390(0x1a0)],_0x249c90=_0x1e8f72[_0x447390(0x184)];if(_0x492ff8&&_0x202e12)return console[_0x447390(0x17a)](a5_0x1f5500['red']('Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval')),0x1;let _0x2309b4=_0x447390(0x171);if(_0x1e8f72[_0x447390(0x19e)])_0x2309b4=_0x447390(0x19e);else{if(_0x1e8f72[_0x447390(0x165)])_0x2309b4=_0x447390(0x165);else{if(_0x1e8f72[_0x447390(0x19c)])_0x2309b4='tsv';else{if(_0x1e8f72[_0x447390(0x171)])_0x2309b4=_0x447390(0x171);}}}const _0x260b47=_0x1e8f72[_0x447390(0x14c)];let _0x2d8b35=_0x65541c;const _0x1c4296=a5_0x1a911a['existsSync'](_0x65541c),_0x57a89b=_0x65541c==='.';if(!_0x1c4296||_0x57a89b){const _0x1f57a7=resolveProjectFromContext(_0x65541c,_0x260b47,{'requireFile':_0x447390(0x179)});if(_0x1f57a7[_0x447390(0x185)])_0x2d8b35=_0x1f57a7['projectDir'],_0x1f57a7['source']===_0x447390(0x198)&&console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x18e)](_0x447390(0x16c)+_0x2d8b35));else switch(_0x1f57a7[_0x447390(0x177)]){case _0x447390(0x15f):console['log'](a5_0x1f5500[_0x447390(0x18c)](_0x1f57a7[_0x447390(0x146)])),console[_0x447390(0x17a)](),console['log'](_0x447390(0x1b3)),console[_0x447390(0x17a)](_0x447390(0x1bb)),console[_0x447390(0x17a)]('\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x447390(0x17a)](),console['log'](_0x447390(0x163));return 0x1;case _0x447390(0x15a):console['log'](a5_0x1f5500[_0x447390(0x18c)](_0x1f57a7[_0x447390(0x146)])),console[_0x447390(0x17a)](),console['log'](_0x447390(0x1cc)+_0x1f57a7[_0x447390(0x14c)]+_0x447390(0x1ab));return 0x1;case _0x447390(0x195):{const _0x5c7fcb=a5_0x163c04['basename'](_0x1f57a7['projectDir']);console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x18c)]('Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22'+_0x1f57a7[_0x447390(0x14c)]+'\x22:'));for(const _0x4e0556 of _0x1f57a7[_0x447390(0x186)]){console[_0x447390(0x17a)]('\x20\x20-\x20'+_0x4e0556);}return console[_0x447390(0x17a)](),console[_0x447390(0x17a)](_0x447390(0x169)+_0x5c7fcb+'/<agent-name>'),0x1;}case _0x447390(0x14a):console[_0x447390(0x17a)](a5_0x1f5500['yellow'](_0x447390(0x155)+_0x1f57a7[_0x447390(0x14c)]+'\x22.')),console[_0x447390(0x17a)](a5_0x1f5500['dim'](_0x447390(0x145)+_0x1f57a7[_0x447390(0x14e)])),console[_0x447390(0x17a)](),console['log']('Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.');return 0x1;}}const {definition:_0x1cf8eb,agentInfo:_0x255fd3}=parseTestFile(_0x2d8b35);let _0x1a378b=_0x1cf8eb[_0x447390(0x1a3)];if(_0x3437a8){const _0x1b1ee5=_0x3437a8[_0x447390(0x1a2)](',')[_0x447390(0x191)](_0x2663c2=>_0x2663c2[_0x447390(0x156)]());_0x1a378b=_0x1cf8eb[_0x447390(0x1a3)][_0x447390(0x181)](_0x4505a1=>_0x1b1ee5['includes'](_0x4505a1[_0x447390(0x154)]));if(_0x1a378b['length']===0x0)return console['log'](a5_0x1f5500['yellow'](_0x447390(0x1bf)+_0x3437a8)),console[_0x447390(0x17a)](a5_0x1f5500['dim'](_0x447390(0x196)+_0x1cf8eb['tests'][_0x447390(0x191)](_0x5c15f6=>_0x5c15f6[_0x447390(0x154)])[_0x447390(0x1ad)](',\x20'))),0x1;}if(_0x51fd06){const _0x103603=_0x51fd06['split'](',')[_0x447390(0x191)](_0x2c55a5=>_0x2c55a5[_0x447390(0x156)]()['toLowerCase']());_0x1a378b=_0x1a378b[_0x447390(0x181)](_0xebe82a=>_0xebe82a[_0x447390(0x16b)]?.['some'](_0xaa9417=>_0x103603['includes'](_0xaa9417[_0x447390(0x168)]())));if(_0x1a378b[_0x447390(0x187)]===0x0){console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x18c)](_0x447390(0x19f)+_0x51fd06));const _0x1cafb6=new Set();return _0x1cf8eb['tests'][_0x447390(0x151)](_0x395436=>_0x395436['tags']?.['forEach'](_0x856bcb=>_0x1cafb6[_0x447390(0x1c1)](_0x856bcb))),_0x1cafb6[_0x447390(0x15e)]>0x0?console['log'](a5_0x1f5500[_0x447390(0x18e)](_0x447390(0x1b4)+[..._0x1cafb6]['join'](',\x20'))):console['log'](a5_0x1f5500[_0x447390(0x18e)](_0x447390(0x16f))),0x1;}}if(_0x492ff8)return this['executeReeval'](_0x1c1ced,{'definition':{'tests':_0x1a378b},'agentInfo':_0x255fd3,'outputFormat':_0x2309b4,'outputFile':_0x249c90,'testNames':_0x3437a8});if(_0x18ac5d){console['log'](a5_0x1f5500[_0x447390(0x18d)](_0x447390(0x19b))),console[_0x447390(0x17a)](_0x447390(0x166)+a5_0x1f5500[_0x447390(0x13a)](_0x3972b2)),console['log'](_0x447390(0x17d)+a5_0x1f5500[_0x447390(0x13a)](_0x255fd3[_0x447390(0x140)])),console[_0x447390(0x17a)](_0x447390(0x1b1)+a5_0x1f5500['white'](_0x255fd3[_0x447390(0x18b)])),console['log'](),console['log'](_0x447390(0x1c0)+a5_0x1f5500['white'](_0x1a378b[_0x447390(0x187)]));for(let _0x2a6d77=0x0;_0x2a6d77<_0x1a378b[_0x447390(0x187)];_0x2a6d77++){const _0x36ff35=_0x1a378b[_0x2a6d77],_0x271367=_0x36ff35[_0x447390(0x141)][_0x447390(0x187)]===0x1?'round':'rounds',_0x274fa5=_0x36ff35[_0x447390(0x16b)]?.['length']?'\x20['+_0x36ff35[_0x447390(0x16b)]['join'](',\x20')+']':'';console[_0x447390(0x17a)]('\x20\x20'+(_0x2a6d77+0x1)+'.\x20'+a5_0x1f5500[_0x447390(0x13a)](_0x36ff35[_0x447390(0x154)])+'\x20('+_0x36ff35[_0x447390(0x141)][_0x447390(0x187)]+'\x20'+_0x271367+')'+a5_0x1f5500[_0x447390(0x18e)](_0x274fa5));}return 0x0;}let _0x5aeaaa,_0x6273dc;try{_0x5aeaaa=await _0x362700[_0x447390(0x13f)][_0x447390(0x1ba)](_0x255fd3['projectName']);}catch(_0x4e7124){const _0x3236fc=_0x4e7124 instanceof Error?_0x4e7124[_0x447390(0x146)]:String(_0x4e7124);return _0x3236fc[_0x447390(0x138)](_0x447390(0x1a4))||_0x3236fc[_0x447390(0x168)]()[_0x447390(0x138)](_0x447390(0x1aa))?console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)](_0x447390(0x13e)+_0x255fd3[_0x447390(0x140)])):console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)](_0x447390(0x1a9)+_0x255fd3[_0x447390(0x140)]+'\x22:\x20'+_0x3236fc)),0x1;}try{_0x6273dc=await _0x362700[_0x447390(0x13f)]['resolveAgentId'](_0x255fd3[_0x447390(0x18b)],_0x5aeaaa);}catch(_0x3d79a2){const _0x416284=_0x3d79a2 instanceof Error?_0x3d79a2[_0x447390(0x146)]:String(_0x3d79a2);return _0x416284['includes']('404')||_0x416284[_0x447390(0x168)]()[_0x447390(0x138)]('not\x20found')?console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)](_0x447390(0x1b6)+_0x255fd3[_0x447390(0x18b)])):console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)](_0x447390(0x189)+_0x255fd3[_0x447390(0x18b)]+_0x447390(0x1c4)+_0x416284)),0x1;}let _0x4486a5;if(!_0x202e12)try{_0x4486a5=await setupEvaluatorAgent(_0x362700[_0x447390(0x13f)],_0x3ca6e7[_0x447390(0x19a)]);}catch(_0x1940c0){const _0x3fc0f3=_0x1940c0 instanceof Error?_0x1940c0['message']:String(_0x1940c0);return console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x3fc0f3)),0x1;}console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x18d)]('Running\x20agent\x20tests...')),console[_0x447390(0x17a)](_0x447390(0x1c7)+a5_0x1f5500['white'](_0x3972b2)),console['log'](_0x447390(0x18a)+a5_0x1f5500[_0x447390(0x13a)](_0x255fd3['projectName']+'/'+_0x255fd3[_0x447390(0x18b)])),console[_0x447390(0x17a)]();const _0x2ac577=[],_0x421542=[],_0x11032d=Date[_0x447390(0x1b9)]();for(let _0x2854f9=0x0;_0x2854f9<_0x1a378b['length'];_0x2854f9++){const _0x224892=_0x1a378b[_0x2854f9];_0x1a378b[_0x447390(0x187)]>0x1?console[_0x447390(0x17a)](_0x447390(0x173)+(_0x2854f9+0x1)+'/'+_0x1a378b[_0x447390(0x187)]+':\x20'+a5_0x1f5500['white'](_0x224892[_0x447390(0x154)])):console['log']('Running\x20test:\x20'+a5_0x1f5500[_0x447390(0x13a)](_0x224892[_0x447390(0x154)]));const _0x211ad8=createCommandSpinner(_0x447390(0x148)+_0x224892[_0x447390(0x141)]['length']+_0x447390(0x152));_0x211ad8[_0x447390(0x176)]();try{const {result:_0xce5cc5,conversation:_0x239e3c}=await runTest(_0x362700[_0x447390(0x13f)],_0x224892,{'agentId':_0x6273dc,'projectId':_0x5aeaaa,'site':_0x3972b2,'noEval':_0x202e12,'evaluatorId':_0x4486a5,'onRoundStart':(_0x7e8822,_0x4bc2b3)=>{const _0x3cf4f5=_0x447390;_0x211ad8[_0x3cf4f5(0x1bd)]=_0x3cf4f5(0x149)+(_0x7e8822+0x1)+'/'+_0x4bc2b3+_0x3cf4f5(0x152);},'onRoundComplete':(_0x3c0025,_0x1c45af,_0x36ea84)=>{const _0x375beb=_0x447390,_0x46bb09=formatElapsed(_0x1c45af);_0x36ea84?console[_0x375beb(0x17a)](_0x375beb(0x161)+(_0x3c0025+0x1)+'/'+_0x224892['rounds'][_0x375beb(0x187)]+_0x375beb(0x192)+a5_0x1f5500[_0x375beb(0x160)]('✓')+'\x20('+_0x46bb09+')'):console[_0x375beb(0x17a)](_0x375beb(0x161)+(_0x3c0025+0x1)+'/'+_0x224892['rounds'][_0x375beb(0x187)]+_0x375beb(0x192)+a5_0x1f5500[_0x375beb(0x1a8)]('✗'));},'onEvaluationStart':()=>{const _0x3bd89e=_0x447390;_0x211ad8[_0x3bd89e(0x1bd)]=_0x3bd89e(0x16d);},'onEvaluationComplete':_0x2dc74b=>{const _0x45605a=_0x447390,_0x27a4e8=formatElapsed(_0x2dc74b);console[_0x45605a(0x17a)]('\x20\x20Evaluating...\x20'+a5_0x1f5500[_0x45605a(0x160)]('✓')+'\x20('+_0x27a4e8+')');}});_0x211ad8[_0x447390(0x174)](),_0x2ac577[_0x447390(0x1c8)](_0xce5cc5),_0x421542[_0x447390(0x1c8)](_0x239e3c);if(_0xce5cc5[_0x447390(0x162)]===_0x447390(0x164))console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x160)](_0x447390(0x197)+_0xce5cc5[_0x447390(0x177)]));else _0xce5cc5[_0x447390(0x162)]===_0x447390(0x1a5)?console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)]('✗\x20FAIL:\x20'+_0xce5cc5[_0x447390(0x177)])):console['log'](a5_0x1f5500[_0x447390(0x1a8)](_0x447390(0x167)+_0xce5cc5[_0x447390(0x177)]));_0xce5cc5[_0x447390(0x159)]&&console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x18e)](_0x447390(0x1bc)+_0xce5cc5['conversation_url'])),console[_0x447390(0x17a)]();}catch(_0x3c7493){_0x211ad8['stop']();const _0xf9f83c=_0x3c7493 instanceof Error?_0x3c7493[_0x447390(0x146)]:String(_0x3c7493);console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)]('✗\x20ERROR:\x20'+_0xf9f83c)),console[_0x447390(0x17a)](),_0x2ac577['push']({'name':_0x224892[_0x447390(0x154)],'status':_0x447390(0x170),'reason':_0xf9f83c,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}const _0x25dfe5=Date[_0x447390(0x1b9)]()-_0x11032d,_0x38a8aa=_0x2ac577[_0x447390(0x181)](_0x24c8e2=>_0x24c8e2[_0x447390(0x162)]==='PASS')[_0x447390(0x187)],_0x59034a=_0x2ac577[_0x447390(0x181)](_0x5d31c2=>_0x5d31c2[_0x447390(0x162)]===_0x447390(0x1a5))['length'],_0x4ee738=_0x2ac577[_0x447390(0x181)](_0x27b199=>_0x27b199[_0x447390(0x162)]==='ERROR')[_0x447390(0x187)];console[_0x447390(0x17a)]('━'[_0x447390(0x139)](0x3c)),console['log'](_0x447390(0x180)),console[_0x447390(0x17a)]('━'[_0x447390(0x139)](0x3c)),console['log'](_0x447390(0x19d)+_0x2ac577[_0x447390(0x187)]),console[_0x447390(0x17a)](_0x447390(0x15b)+a5_0x1f5500[_0x447390(0x160)](_0x38a8aa)),console['log'](_0x447390(0x193)+a5_0x1f5500[_0x447390(0x1a8)](_0x59034a));_0x4ee738>0x0&&console[_0x447390(0x17a)]('Errors:\x20\x20\x20'+a5_0x1f5500['red'](_0x4ee738));console[_0x447390(0x17a)](_0x447390(0x14d)+formatElapsed(_0x25dfe5)),console['log']('━'['repeat'](0x3c));const _0x31e14a=_0x2ac577[_0x447390(0x181)](_0x4a7b32=>_0x4a7b32[_0x447390(0x162)]!=='PASS');if(_0x31e14a['length']>0x0){console[_0x447390(0x17a)](),console['log']('Failed\x20Tests:');for(const _0x545113 of _0x31e14a){const _0x40f749=a5_0x1f5500['red']('✗'),_0x3b8057=_0x545113[_0x447390(0x177)][_0x447390(0x187)]>0x32?_0x545113[_0x447390(0x177)]['substring'](0x0,0x32)+'...':_0x545113[_0x447390(0x177)];console[_0x447390(0x17a)]('\x20\x20'+_0x40f749+'\x20'+_0x545113[_0x447390(0x154)]+':\x20'+_0x3b8057);}}const _0x170a6c={'summary':{'total':_0x2ac577[_0x447390(0x187)],'passed':_0x38a8aa,'failed':_0x59034a,'errors':_0x4ee738>0x0?_0x4ee738:undefined,'duration_ms':_0x25dfe5},'tests':_0x2ac577,'agent':{'project':_0x255fd3[_0x447390(0x140)],'name':_0x255fd3['agentName'],'site':_0x3972b2},'timestamp':new Date(_0x11032d)[_0x447390(0x1b8)]()};try{const _0x20a7c0=buildCachedTestRun(_0x421542,{'site':_0x3972b2,'projectId':_0x5aeaaa,'projectName':_0x255fd3[_0x447390(0x140)],'agentId':_0x6273dc,'agentName':_0x255fd3[_0x447390(0x18b)],'testYmlPath':a5_0x163c04[_0x447390(0x16a)](_0x255fd3['testYmlPath'])});saveLastTestRun(_0x20a7c0);}catch{}if(_0x2309b4!=='table'||_0x249c90){const _0x472577=formatResults(_0x170a6c,_0x2309b4);if(_0x249c90)try{a5_0x1a911a[_0x447390(0x1a1)](_0x249c90,_0x472577,_0x447390(0x1c2)),console[_0x447390(0x17a)](),console[_0x447390(0x17a)](a5_0x1f5500['dim'](_0x447390(0x1ca)+_0x249c90));}catch(_0x3ad8e2){return console[_0x447390(0x17a)](),console[_0x447390(0x17a)](a5_0x1f5500[_0x447390(0x1a8)](_0x447390(0x144)+_0x3ad8e2)),0x1;}else console[_0x447390(0x17a)](),console[_0x447390(0x17a)](_0x472577);}return _0x31e14a[_0x447390(0x187)]>0x0?0x1:0x0;}async['executeReeval'](_0x4ce18d,_0x2c3211){const _0x34468b=a5_0xb0df85,{options:_0x3d1013,tdx:_0x38193d}=_0x4ce18d,{definition:_0x54e22a,agentInfo:_0x3975dc,outputFormat:_0x31e6ce,outputFile:_0x2b9fe2}=_0x2c3211,_0x3473a2=_0x3d1013['site'],_0x420908=loadLastTestRun();if(!_0x420908)return console['log'](a5_0x1f5500[_0x34468b(0x1a8)](_0x34468b(0x14f))),console['log'](a5_0x1f5500['dim'](_0x34468b(0x17e))),0x1;if(_0x420908[_0x34468b(0x1a7)][_0x34468b(0x18b)]!==_0x3975dc[_0x34468b(0x18b)])return console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x1a8)](_0x34468b(0x17f)+_0x420908[_0x34468b(0x1a7)][_0x34468b(0x18b)]+_0x34468b(0x13b)+_0x3975dc[_0x34468b(0x18b)]+'\x22.')),console['log'](a5_0x1f5500[_0x34468b(0x18e)](_0x34468b(0x1be))),0x1;const _0x46ab01=new Set(_0x420908[_0x34468b(0x153)]['map'](_0x530e10=>_0x530e10['testName'])),_0x2c24ba=_0x54e22a[_0x34468b(0x1a3)][_0x34468b(0x181)](_0x21ef67=>!_0x46ab01[_0x34468b(0x188)](_0x21ef67['name']));if(_0x2c24ba[_0x34468b(0x187)]>0x0&&_0x420908[_0x34468b(0x1a0)]!==_0x3473a2)return console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x1a8)](_0x34468b(0x172))),console['log'](a5_0x1f5500[_0x34468b(0x18e)](_0x34468b(0x1ae)+_0x420908[_0x34468b(0x1a0)]+_0x34468b(0x17b)+_0x3473a2+'\x22.')),console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x18e)](_0x34468b(0x13c)+_0x420908['site']+'\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.')),0x1;const _0x4d75dc=_0x54e22a[_0x34468b(0x1a3)][_0x34468b(0x181)](_0x27d256=>_0x46ab01[_0x34468b(0x188)](_0x27d256['name'])),_0x1d09f7=_0x2c24ba;let _0x17536c;try{_0x17536c=await setupEvaluatorAgent(_0x38193d[_0x34468b(0x13f)],_0x3d1013['verbose']);}catch(_0x2e1d18){const _0x2bb8a4=_0x2e1d18 instanceof Error?_0x2e1d18[_0x34468b(0x146)]:String(_0x2e1d18);return console[_0x34468b(0x17a)](a5_0x1f5500['red'](_0x34468b(0x157)+_0x2bb8a4)),0x1;}console['log'](a5_0x1f5500[_0x34468b(0x18d)]('Re-evaluating\x20cached\x20test\x20run...')),console[_0x34468b(0x17a)](_0x34468b(0x1ac)+a5_0x1f5500[_0x34468b(0x13a)](_0x420908[_0x34468b(0x1b2)])),console[_0x34468b(0x17a)](_0x34468b(0x18a)+a5_0x1f5500[_0x34468b(0x13a)](_0x420908[_0x34468b(0x1a7)]['projectName']+'/'+_0x420908[_0x34468b(0x1a7)][_0x34468b(0x18b)]));_0x1d09f7[_0x34468b(0x187)]>0x0&&console[_0x34468b(0x17a)](_0x34468b(0x1cb)+a5_0x1f5500[_0x34468b(0x18c)](_0x1d09f7[_0x34468b(0x187)]));console[_0x34468b(0x17a)]();const _0x29328d=[],_0x12d404=Date[_0x34468b(0x1b9)](),_0x30cdc5=createCommandSpinner(_0x34468b(0x1b5));if(_0x4d75dc[_0x34468b(0x187)]>0x0)try{const _0x4a0646=await reevaluateFromCache(_0x38193d[_0x34468b(0x13f)],_0x420908,{'tests':_0x4d75dc},{'evaluatorId':_0x17536c,'onTestStart':(_0x2cb884,_0x540e43,_0x471d64)=>{const _0x4739c8=_0x34468b;_0x30cdc5[_0x4739c8(0x1bd)]='Re-evaluating\x20'+(_0x540e43+0x1)+'/'+_0x471d64+':\x20'+_0x2cb884+_0x4739c8(0x182);if(!_0x30cdc5[_0x4739c8(0x15d)])_0x30cdc5[_0x4739c8(0x176)]();},'onTestComplete':(_0x27d8bf,_0x289f53)=>{const _0x474c80=_0x34468b;_0x30cdc5[_0x474c80(0x174)]();if(_0x289f53[_0x474c80(0x162)]===_0x474c80(0x164))console[_0x474c80(0x17a)](a5_0x1f5500[_0x474c80(0x160)](_0x474c80(0x197)+_0x27d8bf)+a5_0x1f5500[_0x474c80(0x18e)]('\x20(cached)'));else _0x289f53[_0x474c80(0x162)]===_0x474c80(0x1a5)?console[_0x474c80(0x17a)](a5_0x1f5500[_0x474c80(0x1a8)]('✗\x20FAIL:\x20'+_0x27d8bf+_0x474c80(0x1af)+_0x289f53['reason'])+a5_0x1f5500[_0x474c80(0x18e)]('\x20(cached)')):console[_0x474c80(0x17a)](a5_0x1f5500[_0x474c80(0x1a8)](_0x474c80(0x167)+_0x27d8bf+'\x20-\x20'+_0x289f53[_0x474c80(0x177)]));_0x289f53[_0x474c80(0x159)]&&console[_0x474c80(0x17a)](a5_0x1f5500[_0x474c80(0x18e)](_0x474c80(0x17c)+_0x289f53[_0x474c80(0x159)])),_0x29328d['push'](_0x289f53);},'onTestSkipped':(_0x3b350b,_0xfe552c)=>{const _0x4b368d=_0x34468b;_0x30cdc5['stop'](),console[_0x4b368d(0x17a)](a5_0x1f5500[_0x4b368d(0x18c)]('⚠\x20SKIPPED:\x20'+_0x3b350b+_0x4b368d(0x1af)+_0xfe552c));}});for(const _0x4b4ac2 of _0x4a0646){!_0x29328d[_0x34468b(0x142)](_0x1adf60=>_0x1adf60[_0x34468b(0x154)]===_0x4b4ac2[_0x34468b(0x154)])&&_0x29328d[_0x34468b(0x1c8)](_0x4b4ac2);}}catch(_0x2b195a){_0x30cdc5[_0x34468b(0x174)]();const _0x219917=_0x2b195a instanceof Error?_0x2b195a[_0x34468b(0x146)]:String(_0x2b195a);return console[_0x34468b(0x17a)](a5_0x1f5500['red']('✗\x20ERROR:\x20Re-evaluation\x20failed:\x20'+_0x219917)),0x1;}_0x30cdc5['stop']();if(_0x1d09f7[_0x34468b(0x187)]>0x0){console['log'](),console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x18d)](_0x34468b(0x178)));const {projectId:_0x2ef814,agentId:_0x101469}=_0x420908[_0x34468b(0x1a7)];for(const _0x410dd4 of _0x1d09f7){console['log'](_0x34468b(0x1cd)+a5_0x1f5500[_0x34468b(0x13a)](_0x410dd4['name']));const _0x5153c3=createCommandSpinner(_0x34468b(0x148)+_0x410dd4[_0x34468b(0x141)][_0x34468b(0x187)]+_0x34468b(0x152));_0x5153c3[_0x34468b(0x176)]();try{const {result:_0x260c29}=await runTest(_0x38193d['llm'],_0x410dd4,{'agentId':_0x101469,'projectId':_0x2ef814,'site':_0x420908[_0x34468b(0x1a0)],'noEval':![],'evaluatorId':_0x17536c,'onRoundStart':(_0x2dd463,_0x3d688f)=>{const _0x345218=_0x34468b;_0x5153c3[_0x345218(0x1bd)]=_0x345218(0x149)+(_0x2dd463+0x1)+'/'+_0x3d688f+_0x345218(0x152);},'onRoundComplete':(_0x533624,_0x57416e,_0x51bb61)=>{const _0x407f8e=_0x34468b,_0x4963c7=formatElapsed(_0x57416e);_0x51bb61?console[_0x407f8e(0x17a)]('\x20\x20Round\x20'+(_0x533624+0x1)+'/'+_0x410dd4['rounds'][_0x407f8e(0x187)]+_0x407f8e(0x192)+a5_0x1f5500[_0x407f8e(0x160)]('✓')+'\x20('+_0x4963c7+')'):console[_0x407f8e(0x17a)]('\x20\x20Round\x20'+(_0x533624+0x1)+'/'+_0x410dd4[_0x407f8e(0x141)][_0x407f8e(0x187)]+_0x407f8e(0x192)+a5_0x1f5500[_0x407f8e(0x1a8)]('✗'));},'onEvaluationStart':()=>{const _0x2ba94d=_0x34468b;_0x5153c3[_0x2ba94d(0x1bd)]='Evaluating\x20response...';},'onEvaluationComplete':_0x7b6a07=>{const _0x166207=_0x34468b,_0x442c74=formatElapsed(_0x7b6a07);console[_0x166207(0x17a)]('\x20\x20Evaluating...\x20'+a5_0x1f5500[_0x166207(0x160)]('✓')+'\x20('+_0x442c74+')');}});_0x5153c3[_0x34468b(0x174)](),_0x29328d[_0x34468b(0x1c8)](_0x260c29);if(_0x260c29[_0x34468b(0x162)]===_0x34468b(0x164))console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x160)](_0x34468b(0x197)+_0x260c29[_0x34468b(0x177)])+a5_0x1f5500['dim']('\x20(new)'));else _0x260c29[_0x34468b(0x162)]===_0x34468b(0x1a5)?console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x1a8)](_0x34468b(0x1b0)+_0x260c29['reason'])+a5_0x1f5500[_0x34468b(0x18e)](_0x34468b(0x13d))):console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x1a8)](_0x34468b(0x167)+_0x260c29[_0x34468b(0x177)]));_0x260c29[_0x34468b(0x159)]&&console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x18e)](_0x34468b(0x17c)+_0x260c29[_0x34468b(0x159)]));}catch(_0x1f6382){_0x5153c3[_0x34468b(0x174)]();const _0x275365=_0x1f6382 instanceof Error?_0x1f6382[_0x34468b(0x146)]:String(_0x1f6382);console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x1a8)](_0x34468b(0x167)+_0x275365)),_0x29328d[_0x34468b(0x1c8)]({'name':_0x410dd4['name'],'status':_0x34468b(0x170),'reason':_0x275365,'timestamp':new Date()[_0x34468b(0x1b8)](),'duration_ms':0x0});}}}console[_0x34468b(0x17a)]();const _0x2f77b0=Date[_0x34468b(0x1b9)]()-_0x12d404,_0x5d0a7a=_0x29328d[_0x34468b(0x181)](_0x2fd522=>_0x2fd522[_0x34468b(0x162)]===_0x34468b(0x164))[_0x34468b(0x187)],_0x1add85=_0x29328d[_0x34468b(0x181)](_0x23cf31=>_0x23cf31['status']===_0x34468b(0x1a5))[_0x34468b(0x187)],_0x1ee92a=_0x29328d[_0x34468b(0x181)](_0x351b0c=>_0x351b0c[_0x34468b(0x162)]===_0x34468b(0x170))[_0x34468b(0x187)];console[_0x34468b(0x17a)]('━'['repeat'](0x3c)),console[_0x34468b(0x17a)](_0x34468b(0x1c9)),console[_0x34468b(0x17a)]('━'['repeat'](0x3c)),console[_0x34468b(0x17a)]('Total:\x20\x20\x20\x20'+_0x29328d[_0x34468b(0x187)]),console[_0x34468b(0x17a)](_0x34468b(0x15b)+a5_0x1f5500[_0x34468b(0x160)](_0x5d0a7a)),console[_0x34468b(0x17a)]('Failed:\x20\x20\x20'+a5_0x1f5500['red'](_0x1add85));_0x1ee92a>0x0&&console['log']('Errors:\x20\x20\x20'+a5_0x1f5500[_0x34468b(0x1a8)](_0x1ee92a));console[_0x34468b(0x17a)](_0x34468b(0x14d)+formatElapsed(_0x2f77b0)),console[_0x34468b(0x17a)]('━'['repeat'](0x3c));const _0x3875bf={'summary':{'total':_0x29328d[_0x34468b(0x187)],'passed':_0x5d0a7a,'failed':_0x1add85,'errors':_0x1ee92a>0x0?_0x1ee92a:undefined,'duration_ms':_0x2f77b0},'tests':_0x29328d,'agent':{'project':_0x3975dc[_0x34468b(0x140)],'name':_0x3975dc[_0x34468b(0x18b)],'site':_0x3473a2},'timestamp':new Date(_0x12d404)[_0x34468b(0x1b8)]()};if(_0x31e6ce!=='table'||_0x2b9fe2){const _0x3a220a=formatResults(_0x3875bf,_0x31e6ce);if(_0x2b9fe2)try{a5_0x1a911a[_0x34468b(0x1a1)](_0x2b9fe2,_0x3a220a,'utf-8'),console[_0x34468b(0x17a)](),console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x18e)](_0x34468b(0x1ca)+_0x2b9fe2));}catch(_0x5819cf){return console['log'](),console[_0x34468b(0x17a)](a5_0x1f5500[_0x34468b(0x1a8)](_0x34468b(0x144)+_0x5819cf)),0x1;}else console['log'](),console[_0x34468b(0x17a)](_0x3a220a);}const _0x15e7c4=_0x29328d[_0x34468b(0x181)](_0x5011c1=>_0x5011c1[_0x34468b(0x162)]!=='PASS');return _0x15e7c4[_0x34468b(0x187)]>0x0?0x1:0x0;}}
|
|
1
|
+
const a5_0x45a8d5=a5_0x1dd7;(function(_0x4b5f11,_0x107208){const _0x4ead6b=a5_0x1dd7,_0x376af4=_0x4b5f11();while(!![]){try{const _0x4d227d=-parseInt(_0x4ead6b(0xa5))/0x1*(-parseInt(_0x4ead6b(0xdc))/0x2)+parseInt(_0x4ead6b(0x111))/0x3+parseInt(_0x4ead6b(0xca))/0x4*(-parseInt(_0x4ead6b(0x107))/0x5)+-parseInt(_0x4ead6b(0xdb))/0x6*(-parseInt(_0x4ead6b(0xc6))/0x7)+parseInt(_0x4ead6b(0xa6))/0x8+-parseInt(_0x4ead6b(0xaf))/0x9*(parseInt(_0x4ead6b(0xad))/0xa)+-parseInt(_0x4ead6b(0xd4))/0xb*(parseInt(_0x4ead6b(0xd3))/0xc);if(_0x4d227d===_0x107208)break;else _0x376af4['push'](_0x376af4['shift']());}catch(_0x251904){_0x376af4['push'](_0x376af4['shift']());}}}(a5_0x175a,0x50572));import*as a5_0x5ca225 from'node:fs';import*as a5_0x2b3251 from'node:path';function a5_0x1dd7(_0x39ab5d,_0x331b45){_0x39ab5d=_0x39ab5d-0x9c;const _0x175a33=a5_0x175a();let _0x1dd70d=_0x175a33[_0x39ab5d];return _0x1dd70d;}function a5_0x175a(){const _0x4eb93b=['add','Run\x20tests\x20for\x20an\x20LLM\x20agent','\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','40qZQhGz',':\x20Sending\x20user\x20input...','406863OhjJje','executeReeval','trim','Test\x20','red','Passed:\x20\x20\x20','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','push','Error\x20writing\x20output\x20file:\x20','isSpinning','table','\x20(cached)','yellow','test.yml','\x20\x20-\x20','\x22:\x20','verbose','eval','Failed\x20Tests:','no_context','context','...\x20','Site:\x20','4589137HFZCOu','\x20\x20Agent:\x20','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','✗\x20ERROR:\x20Project\x20not\x20found:\x20','216xWxEiH','json','dryRun','llmProject','Duration:\x20','Round\x201/','toISOString','Total:\x20\x20\x20\x20','jsonl','2478936SoxyWx','55Wclwce','Cached\x20run\x20from:\x20','writeFileSync','Agent:\x20','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','join','filter','6SbWpph','9014XpoEvq','Test\x20Summary','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','site','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','repeat','PASS','Re-evaluating...','has','agent','Output\x20written\x20to:\x20','map','Evaluating\x20response...','basename','testYmlPath','dim','Re-evaluating\x20','rounds','Executing\x20new\x20tests...','utf-8','not\x20found','...','projectDir','message','Re-evaluation\x20Summary','Failed:\x20\x20\x20','now','Errors:\x20\x20\x20','✓\x20PASS:\x20','execute','round','green','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','includes','Running\x20agent\x20tests...','conversation_url','Conversation\x20URL:\x20','log','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','size','No\x20tests\x20found\x20with\x20tags:\x20','existsSync','14285LwJoSr','testName','Round\x20','No\x20tests\x20found\x20matching:\x20','some','Running\x20test:\x20','\x20\x20Project:\x20','substring','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','white','527550PfCtwT','toLowerCase','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','ERROR','start','Project\x20path:\x20','text','FAIL','llm','\x20\x20Site:\x20','status','split','Tests\x20found:\x20','Running:\x20','\x20\x20Round\x20','\x20\x20Conversation:\x20','Test\x20Configuration:','⚠\x20SKIPPED:\x20','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','description','timestamp','✗\x20ERROR:\x20','\x20-\x20','resolve','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','Either\x20switch\x20to\x20the\x20\x22','Available\x20tests:\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','reason','/<agent-name>','404','found','Available\x20tags:\x20','\x20(new)','cyan','projectName','agentName','✗\x20FAIL:\x20','stop','tsv','tests','source','no_tests','name','find','length','67asJvVV','4509280pkzkZm','tags','\x20\x20Evaluating...\x20','New\x20tests\x20to\x20execute:\x20'];a5_0x175a=function(){return _0x4eb93b;};return a5_0x175a();}import a5_0x3a3fc5 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_0x45a8d5(0xa2)]='agent:test';[a5_0x45a8d5(0x124)]=a5_0x45a8d5(0xab);async[a5_0x45a8d5(0xfa)](_0x5c6eaa){const _0x33c30c=a5_0x45a8d5,{options:_0x32d331,args:_0x35449c,tdx:_0x51d36f}=_0x5c6eaa,_0x6d926c=_0x35449c[0x0]||'.',_0x3a5344=_0x32d331[_0x33c30c(0xcc)],_0x482611=_0x32d331,_0x423c43=_0x482611[_0x33c30c(0xc0)]===![],_0x3db73b=_0x482611['reeval'],_0x2d23c2=_0x482611['name'],_0x260392=_0x482611[_0x33c30c(0xa7)],_0x365c35=_0x32d331[_0x33c30c(0xe0)],_0xf8f27d=_0x482611['output'];if(_0x3db73b&&_0x423c43)return console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)](_0x33c30c(0xd8))),0x1;let _0x339e89='table';if(_0x482611['json'])_0x339e89=_0x33c30c(0xcb);else{if(_0x482611[_0x33c30c(0xd2)])_0x339e89='jsonl';else{if(_0x482611['tsv'])_0x339e89=_0x33c30c(0x9e);else{if(_0x482611[_0x33c30c(0xb9)])_0x339e89=_0x33c30c(0xb9);}}}const _0x15fda8=_0x482611[_0x33c30c(0xcd)];let _0x58536d=_0x6d926c;const _0x2a2a47=a5_0x5ca225[_0x33c30c(0x106)](_0x6d926c),_0x451c0c=_0x6d926c==='.';if(!_0x2a2a47||_0x451c0c){const _0x35b8d9=resolveProjectFromContext(_0x6d926c,_0x15fda8,{'requireFile':_0x33c30c(0xbc)});if(_0x35b8d9[_0x33c30c(0x130)])_0x58536d=_0x35b8d9['projectDir'],_0x35b8d9[_0x33c30c(0xa0)]===_0x33c30c(0xc3)&&console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xec)]('Using\x20agent:\x20'+_0x58536d));else switch(_0x35b8d9[_0x33c30c(0x12d)]){case _0x33c30c(0xc2):console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xbb)](_0x35b8d9[_0x33c30c(0xf4)])),console[_0x33c30c(0x102)](),console[_0x33c30c(0x102)]('Usage:'),console[_0x33c30c(0x102)](_0x33c30c(0xac)),console[_0x33c30c(0x102)]('\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x33c30c(0x102)](),console[_0x33c30c(0x102)](_0x33c30c(0xc8));return 0x1;case'no_local_folder':console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xbb)](_0x35b8d9[_0x33c30c(0xf4)])),console[_0x33c30c(0x102)](),console[_0x33c30c(0x102)]('Run\x20\x27tdx\x20agent\x20pull\x20'+_0x35b8d9[_0x33c30c(0xcd)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');return 0x1;case'multiple_agents':{const _0x5bf2cb=a5_0x2b3251[_0x33c30c(0xea)](_0x35b8d9['projectDir']);console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xbb)](_0x33c30c(0x123)+_0x35b8d9[_0x33c30c(0xcd)]+'\x22:'));for(const _0x245544 of _0x35b8d9['agentDirs']){console[_0x33c30c(0x102)](_0x33c30c(0xbd)+_0x245544);}return console[_0x33c30c(0x102)](),console[_0x33c30c(0x102)](_0x33c30c(0xde)+_0x5bf2cb+_0x33c30c(0x12e)),0x1;}case _0x33c30c(0xa1):console['log'](a5_0x3a3fc5[_0x33c30c(0xbb)](_0x33c30c(0x129)+_0x35b8d9[_0x33c30c(0xcd)]+'\x22.')),console['log'](a5_0x3a3fc5[_0x33c30c(0xec)](_0x33c30c(0x116)+_0x35b8d9[_0x33c30c(0xf3)])),console[_0x33c30c(0x102)](),console['log']('Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.');return 0x1;}}const {definition:_0x1e71b5,agentInfo:_0xf8e561}=parseTestFile(_0x58536d);let _0x38ee92=_0x1e71b5[_0x33c30c(0x9f)];if(_0x2d23c2){const _0x320428=_0x2d23c2[_0x33c30c(0x11c)](',')['map'](_0x19b9be=>_0x19b9be[_0x33c30c(0xb1)]());_0x38ee92=_0x1e71b5[_0x33c30c(0x9f)]['filter'](_0xa106b4=>_0x320428[_0x33c30c(0xfe)](_0xa106b4[_0x33c30c(0xa2)]));if(_0x38ee92[_0x33c30c(0xa4)]===0x0)return console['log'](a5_0x3a3fc5[_0x33c30c(0xbb)](_0x33c30c(0x10a)+_0x2d23c2)),console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xec)](_0x33c30c(0x12b)+_0x1e71b5[_0x33c30c(0x9f)][_0x33c30c(0xe8)](_0x4e7763=>_0x4e7763[_0x33c30c(0xa2)])['join'](',\x20'))),0x1;}if(_0x260392){const _0x6c6f6a=_0x260392[_0x33c30c(0x11c)](',')[_0x33c30c(0xe8)](_0x45fd1c=>_0x45fd1c[_0x33c30c(0xb1)]()['toLowerCase']());_0x38ee92=_0x38ee92[_0x33c30c(0xda)](_0x331f42=>_0x331f42[_0x33c30c(0xa7)]?.[_0x33c30c(0x10b)](_0x4ccba3=>_0x6c6f6a[_0x33c30c(0xfe)](_0x4ccba3[_0x33c30c(0x112)]())));if(_0x38ee92[_0x33c30c(0xa4)]===0x0){console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xbb)](_0x33c30c(0x105)+_0x260392));const _0x4390ca=new Set();return _0x1e71b5[_0x33c30c(0x9f)]['forEach'](_0x38d504=>_0x38d504[_0x33c30c(0xa7)]?.['forEach'](_0x1c37bf=>_0x4390ca[_0x33c30c(0xaa)](_0x1c37bf))),_0x4390ca[_0x33c30c(0x104)]>0x0?console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xec)](_0x33c30c(0x131)+[..._0x4390ca][_0x33c30c(0xd9)](',\x20'))):console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xec)]('No\x20tests\x20have\x20tags\x20defined.')),0x1;}}if(_0x3db73b)return this['executeReeval'](_0x5c6eaa,{'definition':{'tests':_0x38ee92},'agentInfo':_0xf8e561,'outputFormat':_0x339e89,'outputFile':_0xf8f27d,'testNames':_0x2d23c2});if(_0x3a5344){console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0x133)](_0x33c30c(0x121))),console['log'](_0x33c30c(0x11a)+a5_0x3a3fc5[_0x33c30c(0x110)](_0x365c35)),console[_0x33c30c(0x102)](_0x33c30c(0x10d)+a5_0x3a3fc5[_0x33c30c(0x110)](_0xf8e561[_0x33c30c(0x134)])),console[_0x33c30c(0x102)](_0x33c30c(0xc7)+a5_0x3a3fc5[_0x33c30c(0x110)](_0xf8e561[_0x33c30c(0x135)])),console[_0x33c30c(0x102)](),console[_0x33c30c(0x102)](_0x33c30c(0x11d)+a5_0x3a3fc5[_0x33c30c(0x110)](_0x38ee92[_0x33c30c(0xa4)]));for(let _0x442a09=0x0;_0x442a09<_0x38ee92[_0x33c30c(0xa4)];_0x442a09++){const _0x2f5001=_0x38ee92[_0x442a09],_0x5f5d80=_0x2f5001[_0x33c30c(0xee)][_0x33c30c(0xa4)]===0x1?_0x33c30c(0xfb):_0x33c30c(0xee),_0x4a8beb=_0x2f5001[_0x33c30c(0xa7)]?.['length']?'\x20['+_0x2f5001['tags'][_0x33c30c(0xd9)](',\x20')+']':'';console['log']('\x20\x20'+(_0x442a09+0x1)+'.\x20'+a5_0x3a3fc5['white'](_0x2f5001[_0x33c30c(0xa2)])+'\x20('+_0x2f5001['rounds']['length']+'\x20'+_0x5f5d80+')'+a5_0x3a3fc5[_0x33c30c(0xec)](_0x4a8beb));}return 0x0;}let _0x5ef393,_0x4c559c;try{_0x5ef393=await _0x51d36f[_0x33c30c(0x119)]['resolveProjectId'](_0xf8e561[_0x33c30c(0x134)]);}catch(_0x22aa2c){const _0x4dc193=_0x22aa2c instanceof Error?_0x22aa2c[_0x33c30c(0xf4)]:String(_0x22aa2c);return _0x4dc193[_0x33c30c(0xfe)](_0x33c30c(0x12f))||_0x4dc193[_0x33c30c(0x112)]()[_0x33c30c(0xfe)](_0x33c30c(0xf1))?console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)](_0x33c30c(0xc9)+_0xf8e561['projectName'])):console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)]('✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22'+_0xf8e561['projectName']+_0x33c30c(0xbe)+_0x4dc193)),0x1;}try{_0x4c559c=await _0x51d36f['llm']['resolveAgentId'](_0xf8e561[_0x33c30c(0x135)],_0x5ef393);}catch(_0x4a8541){const _0x3ac1fb=_0x4a8541 instanceof Error?_0x4a8541[_0x33c30c(0xf4)]:String(_0x4a8541);return _0x3ac1fb[_0x33c30c(0xfe)](_0x33c30c(0x12f))||_0x3ac1fb[_0x33c30c(0x112)]()[_0x33c30c(0xfe)](_0x33c30c(0xf1))?console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)]('✗\x20ERROR:\x20Agent\x20not\x20found:\x20'+_0xf8e561[_0x33c30c(0x135)])):console['log'](a5_0x3a3fc5[_0x33c30c(0xb3)](_0x33c30c(0x103)+_0xf8e561['agentName']+_0x33c30c(0xbe)+_0x3ac1fb)),0x1;}let _0x584747;if(!_0x423c43)try{_0x584747=await setupEvaluatorAgent(_0x51d36f[_0x33c30c(0x119)],_0x32d331['verbose']);}catch(_0x4aef6b){const _0x45def7=_0x4aef6b instanceof Error?_0x4aef6b['message']:String(_0x4aef6b);return console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)](_0x33c30c(0x10f)+_0x45def7)),0x1;}console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0x133)](_0x33c30c(0xff))),console['log'](_0x33c30c(0xc5)+a5_0x3a3fc5[_0x33c30c(0x110)](_0x365c35)),console[_0x33c30c(0x102)](_0x33c30c(0xd7)+a5_0x3a3fc5[_0x33c30c(0x110)](_0xf8e561[_0x33c30c(0x134)]+'/'+_0xf8e561[_0x33c30c(0x135)])),console[_0x33c30c(0x102)]();const _0x561a1a=[],_0x4898f5=[],_0x4e6207=Date[_0x33c30c(0xf7)]();for(let _0x2e2610=0x0;_0x2e2610<_0x38ee92[_0x33c30c(0xa4)];_0x2e2610++){const _0x1f69f0=_0x38ee92[_0x2e2610];_0x38ee92[_0x33c30c(0xa4)]>0x1?console['log'](_0x33c30c(0xb2)+(_0x2e2610+0x1)+'/'+_0x38ee92['length']+':\x20'+a5_0x3a3fc5[_0x33c30c(0x110)](_0x1f69f0[_0x33c30c(0xa2)])):console[_0x33c30c(0x102)](_0x33c30c(0x10c)+a5_0x3a3fc5['white'](_0x1f69f0['name']));const _0x462a08=createCommandSpinner(_0x33c30c(0xcf)+_0x1f69f0[_0x33c30c(0xee)][_0x33c30c(0xa4)]+_0x33c30c(0xae));_0x462a08[_0x33c30c(0x115)]();try{const {result:_0x4f8c07,conversation:_0x596c4e}=await runTest(_0x51d36f[_0x33c30c(0x119)],_0x1f69f0,{'agentId':_0x4c559c,'projectId':_0x5ef393,'site':_0x365c35,'noEval':_0x423c43,'evaluatorId':_0x584747,'onRoundStart':(_0x3327ad,_0x3ea42a)=>{const _0x1fda4b=_0x33c30c;_0x462a08['text']=_0x1fda4b(0x109)+(_0x3327ad+0x1)+'/'+_0x3ea42a+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x330cac,_0x1e11ac,_0x2905ab)=>{const _0x49d52a=_0x33c30c,_0x545bd8=formatElapsed(_0x1e11ac);_0x2905ab?console[_0x49d52a(0x102)](_0x49d52a(0x11f)+(_0x330cac+0x1)+'/'+_0x1f69f0['rounds'][_0x49d52a(0xa4)]+'...\x20'+a5_0x3a3fc5[_0x49d52a(0xfc)]('✓')+'\x20('+_0x545bd8+')'):console['log'](_0x49d52a(0x11f)+(_0x330cac+0x1)+'/'+_0x1f69f0[_0x49d52a(0xee)]['length']+_0x49d52a(0xc4)+a5_0x3a3fc5[_0x49d52a(0xb3)]('✗'));},'onEvaluationStart':()=>{const _0x437668=_0x33c30c;_0x462a08['text']=_0x437668(0xe9);},'onEvaluationComplete':_0x84d558=>{const _0x126f43=_0x33c30c,_0x5e7d14=formatElapsed(_0x84d558);console['log']('\x20\x20Evaluating...\x20'+a5_0x3a3fc5[_0x126f43(0xfc)]('✓')+'\x20('+_0x5e7d14+')');}});_0x462a08[_0x33c30c(0x9d)](),_0x561a1a[_0x33c30c(0xb6)](_0x4f8c07),_0x4898f5['push'](_0x596c4e);if(_0x4f8c07['status']===_0x33c30c(0xe3))console['log'](a5_0x3a3fc5['green'](_0x33c30c(0xf9)+_0x4f8c07['reason']));else _0x4f8c07[_0x33c30c(0x11b)]===_0x33c30c(0x118)?console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)](_0x33c30c(0x9c)+_0x4f8c07['reason'])):console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)]('✗\x20ERROR:\x20'+_0x4f8c07[_0x33c30c(0x12d)]));_0x4f8c07[_0x33c30c(0x100)]&&console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xec)](_0x33c30c(0x101)+_0x4f8c07[_0x33c30c(0x100)])),console[_0x33c30c(0x102)]();}catch(_0x5dc35b){_0x462a08[_0x33c30c(0x9d)]();const _0x5c3937=_0x5dc35b instanceof Error?_0x5dc35b[_0x33c30c(0xf4)]:String(_0x5dc35b);console[_0x33c30c(0x102)](a5_0x3a3fc5['red']('✗\x20ERROR:\x20'+_0x5c3937)),console[_0x33c30c(0x102)](),_0x561a1a['push']({'name':_0x1f69f0[_0x33c30c(0xa2)],'status':'ERROR','reason':_0x5c3937,'timestamp':new Date()[_0x33c30c(0xd0)](),'duration_ms':0x0});}}const _0x456aa1=Date[_0x33c30c(0xf7)]()-_0x4e6207,_0x18dd1a=_0x561a1a[_0x33c30c(0xda)](_0x507176=>_0x507176[_0x33c30c(0x11b)]===_0x33c30c(0xe3))['length'],_0x322f39=_0x561a1a[_0x33c30c(0xda)](_0x25a73a=>_0x25a73a[_0x33c30c(0x11b)]===_0x33c30c(0x118))['length'],_0x2fbe98=_0x561a1a[_0x33c30c(0xda)](_0x36a749=>_0x36a749[_0x33c30c(0x11b)]===_0x33c30c(0x114))['length'];console[_0x33c30c(0x102)]('━'[_0x33c30c(0xe2)](0x3c)),console[_0x33c30c(0x102)](_0x33c30c(0xdd)),console[_0x33c30c(0x102)]('━'[_0x33c30c(0xe2)](0x3c)),console['log'](_0x33c30c(0xd1)+_0x561a1a[_0x33c30c(0xa4)]),console[_0x33c30c(0x102)]('Passed:\x20\x20\x20'+a5_0x3a3fc5[_0x33c30c(0xfc)](_0x18dd1a)),console[_0x33c30c(0x102)](_0x33c30c(0xf6)+a5_0x3a3fc5[_0x33c30c(0xb3)](_0x322f39));_0x2fbe98>0x0&&console['log'](_0x33c30c(0xf8)+a5_0x3a3fc5[_0x33c30c(0xb3)](_0x2fbe98));console['log'](_0x33c30c(0xce)+formatElapsed(_0x456aa1)),console['log']('━'[_0x33c30c(0xe2)](0x3c));const _0x3187d3=_0x561a1a[_0x33c30c(0xda)](_0x5e230d=>_0x5e230d[_0x33c30c(0x11b)]!==_0x33c30c(0xe3));if(_0x3187d3[_0x33c30c(0xa4)]>0x0){console['log'](),console['log'](_0x33c30c(0xc1));for(const _0x527063 of _0x3187d3){const _0xe2a838=a5_0x3a3fc5[_0x33c30c(0xb3)]('✗'),_0x57ae14=_0x527063[_0x33c30c(0x12d)][_0x33c30c(0xa4)]>0x32?_0x527063[_0x33c30c(0x12d)][_0x33c30c(0x10e)](0x0,0x32)+'...':_0x527063[_0x33c30c(0x12d)];console[_0x33c30c(0x102)]('\x20\x20'+_0xe2a838+'\x20'+_0x527063['name']+':\x20'+_0x57ae14);}}const _0x26bf6c={'summary':{'total':_0x561a1a[_0x33c30c(0xa4)],'passed':_0x18dd1a,'failed':_0x322f39,'errors':_0x2fbe98>0x0?_0x2fbe98:undefined,'duration_ms':_0x456aa1},'tests':_0x561a1a,'agent':{'project':_0xf8e561[_0x33c30c(0x134)],'name':_0xf8e561[_0x33c30c(0x135)],'site':_0x365c35},'timestamp':new Date(_0x4e6207)[_0x33c30c(0xd0)]()};try{const _0x213cb7=buildCachedTestRun(_0x4898f5,{'site':_0x365c35,'projectId':_0x5ef393,'projectName':_0xf8e561[_0x33c30c(0x134)],'agentId':_0x4c559c,'agentName':_0xf8e561[_0x33c30c(0x135)],'testYmlPath':a5_0x2b3251[_0x33c30c(0x128)](_0xf8e561[_0x33c30c(0xeb)])});saveLastTestRun(_0x213cb7);}catch{}if(_0x339e89!==_0x33c30c(0xb9)||_0xf8f27d){const _0x3b7e47=formatResults(_0x26bf6c,_0x339e89);if(_0xf8f27d)try{a5_0x5ca225[_0x33c30c(0xd6)](_0xf8f27d,_0x3b7e47,'utf-8'),console['log'](),console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xec)]('Output\x20written\x20to:\x20'+_0xf8f27d));}catch(_0x120b61){return console[_0x33c30c(0x102)](),console[_0x33c30c(0x102)](a5_0x3a3fc5[_0x33c30c(0xb3)](_0x33c30c(0xb7)+_0x120b61)),0x1;}else console[_0x33c30c(0x102)](),console[_0x33c30c(0x102)](_0x3b7e47);}return _0x3187d3[_0x33c30c(0xa4)]>0x0?0x1:0x0;}async[a5_0x45a8d5(0xb0)](_0x3cb9c7,_0x1dfbe7){const _0x340f6d=a5_0x45a8d5,{options:_0x188d53,tdx:_0x59285e}=_0x3cb9c7,{definition:_0x4a55a8,agentInfo:_0x54533b,outputFormat:_0x3528da,outputFile:_0xb9ca9d}=_0x1dfbe7,_0x5af4f3=_0x188d53['site'],_0x4ef744=loadLastTestRun();if(!_0x4ef744)return console[_0x340f6d(0x102)](a5_0x3a3fc5['red']('Error:\x20No\x20previous\x20test\x20run\x20found.')),console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xec)](_0x340f6d(0x113))),0x1;if(_0x4ef744['agent'][_0x340f6d(0x135)]!==_0x54533b[_0x340f6d(0x135)])return console[_0x340f6d(0x102)](a5_0x3a3fc5['red']('Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22'+_0x4ef744[_0x340f6d(0xe6)]['agentName']+_0x340f6d(0xfd)+_0x54533b[_0x340f6d(0x135)]+'\x22.')),console[_0x340f6d(0x102)](a5_0x3a3fc5['dim'](_0x340f6d(0xdf))),0x1;const _0x2c1397=new Set(_0x4ef744['conversations'][_0x340f6d(0xe8)](_0x2cbda4=>_0x2cbda4[_0x340f6d(0x108)])),_0x2672f8=_0x4a55a8[_0x340f6d(0x9f)][_0x340f6d(0xda)](_0x17cf40=>!_0x2c1397[_0x340f6d(0xe5)](_0x17cf40[_0x340f6d(0xa2)]));if(_0x2672f8['length']>0x0&&_0x4ef744[_0x340f6d(0xe0)]!==_0x5af4f3)return console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xb3)](_0x340f6d(0xb5))),console['log'](a5_0x3a3fc5[_0x340f6d(0xec)]('Cached\x20run\x20is\x20from\x20site\x20\x22'+_0x4ef744[_0x340f6d(0xe0)]+_0x340f6d(0x12c)+_0x5af4f3+'\x22.')),console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xec)](_0x340f6d(0x12a)+_0x4ef744[_0x340f6d(0xe0)]+_0x340f6d(0xe1))),0x1;const _0x270fda=_0x4a55a8[_0x340f6d(0x9f)]['filter'](_0x30ee25=>_0x2c1397[_0x340f6d(0xe5)](_0x30ee25[_0x340f6d(0xa2)])),_0x3cb80e=_0x2672f8;let _0x488082;try{_0x488082=await setupEvaluatorAgent(_0x59285e[_0x340f6d(0x119)],_0x188d53[_0x340f6d(0xbf)]);}catch(_0x41d6f8){const _0x4e6901=_0x41d6f8 instanceof Error?_0x41d6f8[_0x340f6d(0xf4)]:String(_0x41d6f8);return console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xb3)](_0x340f6d(0x10f)+_0x4e6901)),0x1;}console[_0x340f6d(0x102)](a5_0x3a3fc5['cyan']('Re-evaluating\x20cached\x20test\x20run...')),console['log'](_0x340f6d(0xd5)+a5_0x3a3fc5['white'](_0x4ef744[_0x340f6d(0x125)])),console[_0x340f6d(0x102)](_0x340f6d(0xd7)+a5_0x3a3fc5['white'](_0x4ef744[_0x340f6d(0xe6)][_0x340f6d(0x134)]+'/'+_0x4ef744[_0x340f6d(0xe6)][_0x340f6d(0x135)]));_0x3cb80e[_0x340f6d(0xa4)]>0x0&&console[_0x340f6d(0x102)](_0x340f6d(0xa9)+a5_0x3a3fc5[_0x340f6d(0xbb)](_0x3cb80e['length']));console[_0x340f6d(0x102)]();const _0x2b34f3=[],_0x4d9d84=Date['now'](),_0x330624=createCommandSpinner(_0x340f6d(0xe4));if(_0x270fda[_0x340f6d(0xa4)]>0x0)try{const _0x5cea73=await reevaluateFromCache(_0x59285e['llm'],_0x4ef744,{'tests':_0x270fda},{'evaluatorId':_0x488082,'onTestStart':(_0x5d5e2a,_0x425e87,_0x1341ef)=>{const _0x58458b=_0x340f6d;_0x330624[_0x58458b(0x117)]=_0x58458b(0xed)+(_0x425e87+0x1)+'/'+_0x1341ef+':\x20'+_0x5d5e2a+_0x58458b(0xf2);if(!_0x330624[_0x58458b(0xb8)])_0x330624[_0x58458b(0x115)]();},'onTestComplete':(_0x533ae7,_0x43e920)=>{const _0x55ce6f=_0x340f6d;_0x330624[_0x55ce6f(0x9d)]();if(_0x43e920[_0x55ce6f(0x11b)]===_0x55ce6f(0xe3))console[_0x55ce6f(0x102)](a5_0x3a3fc5[_0x55ce6f(0xfc)]('✓\x20PASS:\x20'+_0x533ae7)+a5_0x3a3fc5[_0x55ce6f(0xec)](_0x55ce6f(0xba)));else _0x43e920[_0x55ce6f(0x11b)]==='FAIL'?console[_0x55ce6f(0x102)](a5_0x3a3fc5['red']('✗\x20FAIL:\x20'+_0x533ae7+_0x55ce6f(0x127)+_0x43e920[_0x55ce6f(0x12d)])+a5_0x3a3fc5[_0x55ce6f(0xec)]('\x20(cached)')):console[_0x55ce6f(0x102)](a5_0x3a3fc5[_0x55ce6f(0xb3)]('✗\x20ERROR:\x20'+_0x533ae7+_0x55ce6f(0x127)+_0x43e920[_0x55ce6f(0x12d)]));_0x43e920['conversation_url']&&console['log'](a5_0x3a3fc5[_0x55ce6f(0xec)](_0x55ce6f(0x120)+_0x43e920[_0x55ce6f(0x100)])),_0x2b34f3[_0x55ce6f(0xb6)](_0x43e920);},'onTestSkipped':(_0x421317,_0x23cce0)=>{const _0x4cc5e1=_0x340f6d;_0x330624[_0x4cc5e1(0x9d)](),console['log'](a5_0x3a3fc5['yellow'](_0x4cc5e1(0x122)+_0x421317+_0x4cc5e1(0x127)+_0x23cce0));}});for(const _0x554777 of _0x5cea73){!_0x2b34f3[_0x340f6d(0xa3)](_0x27d042=>_0x27d042[_0x340f6d(0xa2)]===_0x554777[_0x340f6d(0xa2)])&&_0x2b34f3[_0x340f6d(0xb6)](_0x554777);}}catch(_0x1daf17){_0x330624[_0x340f6d(0x9d)]();const _0x2e5cf8=_0x1daf17 instanceof Error?_0x1daf17[_0x340f6d(0xf4)]:String(_0x1daf17);return console['log'](a5_0x3a3fc5[_0x340f6d(0xb3)]('✗\x20ERROR:\x20Re-evaluation\x20failed:\x20'+_0x2e5cf8)),0x1;}_0x330624[_0x340f6d(0x9d)]();if(_0x3cb80e[_0x340f6d(0xa4)]>0x0){console[_0x340f6d(0x102)](),console[_0x340f6d(0x102)](a5_0x3a3fc5['cyan'](_0x340f6d(0xef)));const {projectId:_0xddda61,agentId:_0x35b030}=_0x4ef744[_0x340f6d(0xe6)];for(const _0x109b9b of _0x3cb80e){console[_0x340f6d(0x102)](_0x340f6d(0x11e)+a5_0x3a3fc5[_0x340f6d(0x110)](_0x109b9b['name']));const _0xb7f4f9=createCommandSpinner(_0x340f6d(0xcf)+_0x109b9b[_0x340f6d(0xee)][_0x340f6d(0xa4)]+_0x340f6d(0xae));_0xb7f4f9[_0x340f6d(0x115)]();try{const {result:_0x1edd92}=await runTest(_0x59285e['llm'],_0x109b9b,{'agentId':_0x35b030,'projectId':_0xddda61,'site':_0x4ef744[_0x340f6d(0xe0)],'noEval':![],'evaluatorId':_0x488082,'onRoundStart':(_0x2904d3,_0x13241f)=>{const _0x454f5d=_0x340f6d;_0xb7f4f9[_0x454f5d(0x117)]='Round\x20'+(_0x2904d3+0x1)+'/'+_0x13241f+_0x454f5d(0xae);},'onRoundComplete':(_0x6ee397,_0x3c4cba,_0x2084a5)=>{const _0x28c4a3=_0x340f6d,_0x163c42=formatElapsed(_0x3c4cba);_0x2084a5?console['log']('\x20\x20Round\x20'+(_0x6ee397+0x1)+'/'+_0x109b9b[_0x28c4a3(0xee)][_0x28c4a3(0xa4)]+_0x28c4a3(0xc4)+a5_0x3a3fc5[_0x28c4a3(0xfc)]('✓')+'\x20('+_0x163c42+')'):console['log'](_0x28c4a3(0x11f)+(_0x6ee397+0x1)+'/'+_0x109b9b['rounds'][_0x28c4a3(0xa4)]+_0x28c4a3(0xc4)+a5_0x3a3fc5[_0x28c4a3(0xb3)]('✗'));},'onEvaluationStart':()=>{const _0x357f08=_0x340f6d;_0xb7f4f9['text']=_0x357f08(0xe9);},'onEvaluationComplete':_0x563cef=>{const _0x56516b=_0x340f6d,_0x569af6=formatElapsed(_0x563cef);console[_0x56516b(0x102)](_0x56516b(0xa8)+a5_0x3a3fc5['green']('✓')+'\x20('+_0x569af6+')');}});_0xb7f4f9[_0x340f6d(0x9d)](),_0x2b34f3[_0x340f6d(0xb6)](_0x1edd92);if(_0x1edd92[_0x340f6d(0x11b)]==='PASS')console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xfc)](_0x340f6d(0xf9)+_0x1edd92[_0x340f6d(0x12d)])+a5_0x3a3fc5[_0x340f6d(0xec)](_0x340f6d(0x132)));else _0x1edd92['status']==='FAIL'?console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xb3)](_0x340f6d(0x9c)+_0x1edd92[_0x340f6d(0x12d)])+a5_0x3a3fc5[_0x340f6d(0xec)](_0x340f6d(0x132))):console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xb3)](_0x340f6d(0x126)+_0x1edd92[_0x340f6d(0x12d)]));_0x1edd92[_0x340f6d(0x100)]&&console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xec)](_0x340f6d(0x120)+_0x1edd92[_0x340f6d(0x100)]));}catch(_0x3c881b){_0xb7f4f9[_0x340f6d(0x9d)]();const _0x5c2113=_0x3c881b instanceof Error?_0x3c881b[_0x340f6d(0xf4)]:String(_0x3c881b);console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xb3)](_0x340f6d(0x126)+_0x5c2113)),_0x2b34f3[_0x340f6d(0xb6)]({'name':_0x109b9b[_0x340f6d(0xa2)],'status':_0x340f6d(0x114),'reason':_0x5c2113,'timestamp':new Date()[_0x340f6d(0xd0)](),'duration_ms':0x0});}}}console[_0x340f6d(0x102)]();const _0x2a6208=Date['now']()-_0x4d9d84,_0x28c2c1=_0x2b34f3['filter'](_0x9fc06b=>_0x9fc06b['status']===_0x340f6d(0xe3))[_0x340f6d(0xa4)],_0x58fa95=_0x2b34f3['filter'](_0xbd820d=>_0xbd820d[_0x340f6d(0x11b)]===_0x340f6d(0x118))[_0x340f6d(0xa4)],_0x526896=_0x2b34f3[_0x340f6d(0xda)](_0xde0bfd=>_0xde0bfd[_0x340f6d(0x11b)]===_0x340f6d(0x114))[_0x340f6d(0xa4)];console[_0x340f6d(0x102)]('━'[_0x340f6d(0xe2)](0x3c)),console[_0x340f6d(0x102)](_0x340f6d(0xf5)),console[_0x340f6d(0x102)]('━'[_0x340f6d(0xe2)](0x3c)),console[_0x340f6d(0x102)](_0x340f6d(0xd1)+_0x2b34f3[_0x340f6d(0xa4)]),console[_0x340f6d(0x102)](_0x340f6d(0xb4)+a5_0x3a3fc5[_0x340f6d(0xfc)](_0x28c2c1)),console[_0x340f6d(0x102)](_0x340f6d(0xf6)+a5_0x3a3fc5[_0x340f6d(0xb3)](_0x58fa95));_0x526896>0x0&&console['log'](_0x340f6d(0xf8)+a5_0x3a3fc5[_0x340f6d(0xb3)](_0x526896));console['log'](_0x340f6d(0xce)+formatElapsed(_0x2a6208)),console[_0x340f6d(0x102)]('━'[_0x340f6d(0xe2)](0x3c));const _0x1b1e39={'summary':{'total':_0x2b34f3[_0x340f6d(0xa4)],'passed':_0x28c2c1,'failed':_0x58fa95,'errors':_0x526896>0x0?_0x526896:undefined,'duration_ms':_0x2a6208},'tests':_0x2b34f3,'agent':{'project':_0x54533b[_0x340f6d(0x134)],'name':_0x54533b[_0x340f6d(0x135)],'site':_0x5af4f3},'timestamp':new Date(_0x4d9d84)[_0x340f6d(0xd0)]()};if(_0x3528da!==_0x340f6d(0xb9)||_0xb9ca9d){const _0x315236=formatResults(_0x1b1e39,_0x3528da);if(_0xb9ca9d)try{a5_0x5ca225[_0x340f6d(0xd6)](_0xb9ca9d,_0x315236,_0x340f6d(0xf0)),console[_0x340f6d(0x102)](),console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xec)](_0x340f6d(0xe7)+_0xb9ca9d));}catch(_0x48a398){return console[_0x340f6d(0x102)](),console[_0x340f6d(0x102)](a5_0x3a3fc5[_0x340f6d(0xb3)](_0x340f6d(0xb7)+_0x48a398)),0x1;}else console[_0x340f6d(0x102)](),console[_0x340f6d(0x102)](_0x315236);}const _0x2a70a8=_0x2b34f3[_0x340f6d(0xda)](_0x597220=>_0x597220[_0x340f6d(0x11b)]!==_0x340f6d(0xe3));return _0x2a70a8['length']>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x1f84c2=a6_0x521f;(function(_0x37ec79,_0x1693ca){const _0x26235a=a6_0x521f,_0x36528b=_0x37ec79();while(!![]){try{const _0x1d833c=-parseInt(_0x26235a(0x176))/0x1*(-parseInt(_0x26235a(0x19c))/0x2)+parseInt(_0x26235a(0x1a1))/0x3+-parseInt(_0x26235a(0x199))/0x4*(-parseInt(_0x26235a(0x192))/0x5)+-parseInt(_0x26235a(0x174))/0x6*(-parseInt(_0x26235a(0x17b))/0x7)+parseInt(_0x26235a(0x1a8))/0x8+parseInt(_0x26235a(0x1ac))/0x9+parseInt(_0x26235a(0x1a0))/0xa*(-parseInt(_0x26235a(0x18f))/0xb);if(_0x1d833c===_0x1693ca)break;else _0x36528b['push'](_0x36528b['shift']());}catch(_0x1c7611){_0x36528b['push'](_0x36528b['shift']());}}}(a6_0x4b0d,0x421b9));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';function a6_0x4b0d(){const _0x18e28e=['toUpperCase','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','error','readBodyFromFile','noColor','x-auth-token','headers','PATCH','authorization','\x0aStack\x20trace:\x0a','status','message','set-cookie','log','workflow','set-cookie2','length','validate','verbose','55WsKyLa','method','api','15wAcVdW','entries','<\x20HTTP/1.1\x20','DELETE','.\x20Valid\x20types:\x20','output','startsWith','125468issGBj','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Error:\x20','6aLzqwJ','trim','body','color','1393190tJIdPZ','432789vUrPbP','Invalid\x20API\x20type:\x20','trino','GET','header','proxy-authorization','description','1900744UmXvLp','indexOf','stack','includes','46512eLjgWz','data','execute','llm','Results\x20saved\x20to\x20','PUT','cookie','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','.\x20Valid\x20methods:\x20','keys','Invalid\x20HTTP\x20method:\x20','substring','POST','5154ArLVkj','join','65588NAXUlf','request','x-trino-user','has','cdp','2359xUiSUB'];a6_0x4b0d=function(){return _0x18e28e;};return a6_0x4b0d();}function a6_0x521f(_0x291cad,_0x451df4){_0x291cad=_0x291cad-0x168;const _0x4b0d50=a6_0x4b0d();let _0x521fa9=_0x4b0d50[_0x291cad];return _0x521fa9;}import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a6_0x1f84c2(0x184),a6_0x1f84c2(0x1a6),a6_0x1f84c2(0x16d),a6_0x1f84c2(0x188),a6_0x1f84c2(0x18b),'x-xsrf-token',a6_0x1f84c2(0x181),a6_0x1f84c2(0x178)]);function isSensitiveHeader(_0x3b1956){const _0x623b1a=a6_0x1f84c2;return SENSITIVE_HEADERS[_0x623b1a(0x179)](_0x3b1956['toLowerCase']());}function parseHeader(_0x371844){const _0x50d4d9=a6_0x1f84c2,_0x5c0d9d=_0x371844[_0x50d4d9(0x1a9)](':');if(_0x5c0d9d===-0x1)throw new Error('Invalid\x20header\x20format:\x20\x22'+_0x371844+'\x22.\x20'+'Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22');const _0x12a46d=_0x371844[_0x50d4d9(0x172)](0x0,_0x5c0d9d)[_0x50d4d9(0x19d)](),_0x260532=_0x371844[_0x50d4d9(0x172)](_0x5c0d9d+0x1)[_0x50d4d9(0x19d)]();if(!_0x12a46d)throw new Error(_0x50d4d9(0x16e)+_0x371844+'\x22');return[_0x12a46d,_0x260532];}export class ApiCommand extends BaseCommand{['name']=a6_0x1f84c2(0x191);[a6_0x1f84c2(0x1a7)]=a6_0x1f84c2(0x19a);[a6_0x1f84c2(0x18d)](_0x3aca87){const _0x237d24=a6_0x1f84c2,{args:_0x5c7c03,options:_0x3e70c4}=_0x3aca87,_0x8e739=_0x3e70c4;if(_0x5c7c03[_0x237d24(0x18c)]===0x0)return _0x237d24(0x17d);const _0x2ba84d=_0x5c7c03[0x0];if(!_0x2ba84d[_0x237d24(0x198)]('/'))return'Endpoint\x20must\x20start\x20with\x20/:\x20'+_0x2ba84d;const _0x1ba80d=_0x8e739['data'],_0x391242=_0x8e739['file'];if(_0x1ba80d&&_0x391242)return'Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.';const _0x1ec4ba=_0x8e739[_0x237d24(0x190)]||'GET',_0x5b3c66=[_0x237d24(0x1a4),_0x237d24(0x173),_0x237d24(0x16c),_0x237d24(0x195),_0x237d24(0x183)];if(!_0x5b3c66[_0x237d24(0x1ab)](_0x1ec4ba[_0x237d24(0x17c)]()))return _0x237d24(0x171)+_0x1ec4ba+_0x237d24(0x16f)+_0x5b3c66[_0x237d24(0x175)](',\x20');const _0x294f12=_0x8e739['type']||'td',_0x446ade=['td',_0x237d24(0x17a),_0x237d24(0x18a),_0x237d24(0x1a3),_0x237d24(0x16a),'llm-proxy'];if(!_0x446ade[_0x237d24(0x1ab)](_0x294f12))return _0x237d24(0x1a2)+_0x294f12+_0x237d24(0x196)+_0x446ade['join'](',\x20');return undefined;}async[a6_0x1f84c2(0x169)](_0x21ebbe){const _0x219131=a6_0x1f84c2,{options:_0x487a82,args:_0x3476cb,tdx:_0x1713c6}=_0x21ebbe,_0x364452=_0x487a82,_0x483084=_0x3476cb[0x0],_0x37f4d2=(_0x364452[_0x219131(0x190)]||_0x219131(0x1a4))['toUpperCase'](),_0x583069=_0x364452['data'],_0x455754=_0x364452['file'],_0x477020=_0x364452[_0x219131(0x1a5)],_0x1dac6c=_0x364452['type']||'td';try{const _0x381755={};if(_0x477020){const _0x3bfa5c=Array['isArray'](_0x477020)?_0x477020:[_0x477020];for(const _0x2e1b4c of _0x3bfa5c){const [_0x109ccb,_0x29f40d]=parseHeader(_0x2e1b4c);_0x381755[_0x109ccb]=_0x29f40d;}}let _0xc787d3;if(_0x583069)_0xc787d3=_0x583069;else{if(_0x455754)try{_0xc787d3=RawAPI[_0x219131(0x17f)](_0x455754);}catch(_0x43968d){return console[_0x219131(0x17e)](_0x219131(0x19b)+(_0x43968d instanceof Error?_0x43968d[_0x219131(0x187)]:String(_0x43968d))),0x1;}}const _0xfa6db={'method':_0x37f4d2,'apiType':_0x1dac6c,'includeHeaders':_0x487a82[_0x219131(0x18e)]};_0xc787d3&&(_0xfa6db[_0x219131(0x19e)]=_0xc787d3);Object[_0x219131(0x170)](_0x381755)['length']>0x0&&(_0xfa6db[_0x219131(0x182)]=_0x381755);if(_0x487a82[_0x219131(0x18e)]){const _0x2c0516=resolveSite(_0x487a82['site']),_0x3377d1=getEndpoint(_0x2c0516,_0x1dac6c),_0x1062ee=''+_0x3377d1+_0x483084;console[_0x219131(0x17e)]('>\x20'+_0x37f4d2+'\x20'+_0x1062ee);const _0x39cf9d=getAuthHeaders(_0x2c0516),_0x3e6137={..._0x39cf9d,..._0x381755};for(const [_0x3b0124,_0xedf2a7]of Object[_0x219131(0x193)](_0x3e6137)){!isSensitiveHeader(_0x3b0124)&&console[_0x219131(0x17e)]('>\x20'+_0x3b0124+':\x20'+_0xedf2a7);}_0xc787d3&&console[_0x219131(0x17e)]('>'),console['error']('');}const _0x3613e1=await _0x1713c6[_0x219131(0x191)][_0x219131(0x177)](_0x483084,_0xfa6db);if(_0x487a82['verbose']&&_0x3613e1[_0x219131(0x182)]){console[_0x219131(0x17e)](_0x219131(0x194)+_0x3613e1[_0x219131(0x186)]);for(const [_0x50fbb5,_0x3472ad]of Object[_0x219131(0x193)](_0x3613e1[_0x219131(0x182)])){!isSensitiveHeader(_0x50fbb5)&&console[_0x219131(0x17e)]('<\x20'+_0x50fbb5+':\x20'+_0x3472ad);}console[_0x219131(0x17e)]('');}const _0x827c89=Boolean(_0x487a82[_0x219131(0x197)]),_0x2104dc={'color':_0x487a82['color'],'noColor':_0x487a82[_0x219131(0x180)]||_0x827c89&&!_0x487a82[_0x219131(0x19f)]},_0x403f63=colorizeJSON(_0x3613e1[_0x219131(0x168)],_0x2104dc);return _0x487a82[_0x219131(0x197)]?(writeFileSync(_0x487a82[_0x219131(0x197)],_0x403f63),console[_0x219131(0x17e)](_0x219131(0x16b)+_0x487a82[_0x219131(0x197)])):console[_0x219131(0x189)](_0x403f63),0x0;}catch(_0xea517){return _0xea517 instanceof Error?(console['error'](_0x219131(0x19b)+_0xea517['message']),_0x487a82[_0x219131(0x18e)]&&_0xea517[_0x219131(0x1aa)]&&console[_0x219131(0x17e)](_0x219131(0x185)+_0xea517[_0x219131(0x1aa)])):console[_0x219131(0x17e)](_0x219131(0x19b)+String(_0xea517)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x1725ea=a7_0x57b0;(function(_0x590001,_0x1843c8){const _0x2e928f=a7_0x57b0,_0x2b57d4=_0x590001();while(!![]){try{const _0x511591=parseInt(_0x2e928f(0x1dd))/0x1*(parseInt(_0x2e928f(0x1c1))/0x2)+parseInt(_0x2e928f(0x1b6))/0x3*(parseInt(_0x2e928f(0x1b2))/0x4)+-parseInt(_0x2e928f(0x1e0))/0x5*(parseInt(_0x2e928f(0x1c3))/0x6)+-parseInt(_0x2e928f(0x1de))/0x7*(-parseInt(_0x2e928f(0x1c7))/0x8)+parseInt(_0x2e928f(0x1f8))/0x9+parseInt(_0x2e928f(0x1be))/0xa*(parseInt(_0x2e928f(0x1f1))/0xb)+-parseInt(_0x2e928f(0x1c8))/0xc;if(_0x511591===_0x1843c8)break;else _0x2b57d4['push'](_0x2b57d4['shift']());}catch(_0x289b8a){_0x2b57d4['push'](_0x2b57d4['shift']());}}}(a7_0x42e5,0x60e89));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';function a7_0x42e5(){const _0x3ea7a9=['auth:setup','467515JKEBQS','API\x20Key','✓\x20Default\x20site\x20set\x20to\x20','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','tdx:\x20auth\x20clear','✓\x20Profile\x20\x27','jobs','\x27\x20registered','message','OAuth\x20tokens','logLevel','oauth','create','API\x20key','filter','apiKey','auth','198GVeuFN','Setup\x20cancelled','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','No\x20credential\x20found','last_name','\x20for\x20profile:\x20','Read\x20credential\x20from\x20keychain','4539366AwtxWP','\x20\x20tdx','apikey','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','tdx\x20profile:\x20','yellow','Read\x20credential\x20from\x20','bold','Validating\x20API\x20key...','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','profile','name','getUserInfo','1036752QfdsIx','OAuth\x20(browser\x20login)','Setup\x20API\x20key\x20authentication\x20interactively','us01','3EchUbj','select','status','/app/mp/ak','red','\x20(profile:\x20','log','✓\x20Authentication\x20successful\x0a','333640CXPyZX','all','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','344746oioEob','error','18FhUzYI','email','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','Setting\x20up\x20authentication\x20for\x20site:\x20','88VSrnBu','15132072VbpTDD','site','\x20and\x20','join','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','You\x20can\x20find\x20your\x20API\x20key\x20at:','ERROR','password','API\x20key\x20cannot\x20be\x20empty','execute','\x20--profile\x20','\x20removed\x20from\x20keychain','\x0aSetup\x20cancelled','✗\x20Validation\x20failed:\x20','method','trim','Credential\x20type:\x20OAuth','warn','description','\x20(site:\x20','first_name','2STjfvF','146104eTgsEf'];a7_0x42e5=function(){return _0x3ea7a9;};return a7_0x42e5();}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_0x429a4d from'prompts';import{HTTPClientError}from'../sdk/client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a7_0x2162f6 from'chalk';export class AuthSetupCommand extends BaseCommand{[a7_0x1725ea(0x1b0)]=a7_0x1725ea(0x1df);[a7_0x1725ea(0x1da)]=a7_0x1725ea(0x1b4);async['execute'](_0x44dc39){const _0x257703=a7_0x1725ea,{options:_0x2e74f7}=_0x44dc39,_0x2913e3=_0x2e74f7[_0x257703(0x1af)];console[_0x257703(0x1bc)](a7_0x2162f6[_0x257703(0x1ac)]('tdx:\x20auth\x20setup'));const _0x186cb1=_0x2e74f7['site']||_0x257703(0x1b5),_0xaa193f=await promptSiteSelection(_0x186cb1,_0x2913e3,_0x257703(0x1f2));if(!_0xaa193f)return 0x1;const _0x500a97=resolveSite(_0xaa193f);if(isOAuthSupported(_0x500a97)){const _0x5962ff=await a7_0x429a4d({'type':_0x257703(0x1b7),'name':'method','message':'Choose\x20authentication\x20method:','choices':[{'title':_0x257703(0x1b3),'value':'oauth'},{'title':_0x257703(0x1e1),'value':_0x257703(0x1a7)}]});if(!_0x5962ff[_0x257703(0x1d6)])return console[_0x257703(0x1bc)](_0x257703(0x1d4)),0x1;if(_0x5962ff['method']===_0x257703(0x1eb))return await runOAuthLoginFlow(_0x500a97,_0x2913e3,_0x2e74f7[_0x257703(0x1ea)]??LogLevel[_0x257703(0x1ce)]),0x0;}console[_0x257703(0x1bc)](_0x257703(0x1c6)+_0x500a97),console[_0x257703(0x1bc)](_0x257703(0x1cd)),console[_0x257703(0x1bc)]('\x20\x20'+getConsoleUrl(_0x500a97,_0x257703(0x1b9)));const _0x29ea80=await a7_0x429a4d({'type':_0x257703(0x1cf),'name':_0x257703(0x1ef),'message':'Enter\x20your\x20TD\x20API\x20key:','validate':_0x21ccfb=>{const _0x537459=_0x257703;if(!_0x21ccfb||!_0x21ccfb[_0x537459(0x1d7)]())return _0x537459(0x1d0);return!![];}});if(!_0x29ea80[_0x257703(0x1ef)])return console[_0x257703(0x1bc)](_0x257703(0x1d4)),0x1;const _0x531184=_0x29ea80[_0x257703(0x1ef)];console[_0x257703(0x1bc)](_0x257703(0x1ad));try{const _0x15b140=TDX[_0x257703(0x1ec)]({'site':_0x500a97,'apiKey':_0x531184[_0x257703(0x1d7)](),'logLevel':_0x2e74f7['logLevel']??LogLevel[_0x257703(0x1ce)]}),_0x2bb137=await _0x15b140[_0x257703(0x1e6)][_0x257703(0x1b1)]();console[_0x257703(0x1bc)](_0x257703(0x1c5)+_0x2bb137[_0x257703(0x1c4)]+')');const _0x3d11eb=await isKeychainAvailable();_0x3d11eb?(await saveAPIKeyAsync(_0x531184[_0x257703(0x1d7)](),_0x500a97,_0x2913e3),console[_0x257703(0x1bc)]('✓\x20API\x20key\x20saved\x20to\x20system\x20keychain'+(_0x2913e3?_0x257703(0x1bb)+_0x2913e3+')':''))):(console['warn'](a7_0x2162f6[_0x257703(0x1aa)](_0x257703(0x1a8))),console[_0x257703(0x1d9)](a7_0x2162f6['yellow']('\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.')));if(_0x2913e3){const _0x2e0b47={'site':_0x500a97};saveProfileToUserConfig(_0x2913e3,_0x2e0b47),console['log'](_0x257703(0x1e5)+_0x2913e3+_0x257703(0x1e7));}else saveDefaultSiteToUserConfig(_0x500a97),console[_0x257703(0x1bc)](_0x257703(0x1e2)+_0x500a97);const _0x2c97d6=_0x2913e3?_0x257703(0x1d2)+_0x2913e3:'';return console[_0x257703(0x1bc)](),console[_0x257703(0x1bc)](_0x257703(0x1ae)),console['log'](_0x257703(0x1a6)+_0x2c97d6+_0x257703(0x1c0)),console[_0x257703(0x1bc)](_0x257703(0x1a6)+_0x2c97d6+_0x257703(0x1f3)),0x0;}catch(_0x4cf917){if(_0x4cf917 instanceof HTTPClientError&&_0x4cf917[_0x257703(0x1b8)]===0x191)return printAuthError(_0x4cf917),0x1;return console[_0x257703(0x1c2)](a7_0x2162f6[_0x257703(0x1ba)](_0x257703(0x1d5)+(_0x4cf917 instanceof Error?_0x4cf917['message']:String(_0x4cf917)))),console[_0x257703(0x1c2)](_0x257703(0x1e3)),0x1;}}}function a7_0x57b0(_0x286c0e,_0x528077){_0x286c0e=_0x286c0e-0x1a6;const _0x42e5fa=a7_0x42e5();let _0x57b05f=_0x42e5fa[_0x286c0e];return _0x57b05f;}export class AuthStatusCommand extends BaseCommand{[a7_0x1725ea(0x1b0)]=a7_0x1725ea(0x1f0);['description']=a7_0x1725ea(0x1cc);async[a7_0x1725ea(0x1d1)](_0x4f80fd){const _0x10ef46=a7_0x1725ea,{options:_0x3e9493,tdx:_0x3bdb0e}=_0x4f80fd,_0x94268=_0x3e9493[_0x10ef46(0x1c9)],_0x1b8d96=_0x3e9493[_0x10ef46(0x1af)],_0x1de91f=_0x1b8d96?_0x1b8d96:'N/A';console['log'](_0x10ef46(0x1a9)+_0x1de91f+_0x10ef46(0x1db)+_0x94268+')');const _0x17241b=await getOAuthTokens(_0x1b8d96);if(_0x17241b)console[_0x10ef46(0x1bc)](_0x10ef46(0x1d8)),console[_0x10ef46(0x1bc)](_0x10ef46(0x1f7)+(_0x1b8d96?_0x10ef46(0x1bb)+_0x1b8d96+')':''));else{const _0x55e5c7=await resolveAPIKeyAsync(_0x94268,_0x1b8d96);if(_0x55e5c7){const {source:_0x3755dd,isDeprecated:_0x5ca6d8}=_0x55e5c7,_0x55ca30=_0x10ef46(0x1ab)+_0x3755dd;console[_0x10ef46(0x1bc)](_0x5ca6d8?a7_0x2162f6[_0x10ef46(0x1aa)](_0x55ca30):_0x55ca30);}else console[_0x10ef46(0x1bc)](a7_0x2162f6[_0x10ef46(0x1aa)](_0x10ef46(0x1f4)));}try{const _0x1bc08b=await _0x3bdb0e[_0x10ef46(0x1e6)][_0x10ef46(0x1b1)]();return console['log'](a7_0x2162f6['green'](_0x10ef46(0x1bd))),console[_0x10ef46(0x1bc)]('User:\x20'+_0x1bc08b[_0x10ef46(0x1c4)]),(_0x1bc08b['first_name']||_0x1bc08b[_0x10ef46(0x1f5)])&&console[_0x10ef46(0x1bc)]('Name:\x20'+[_0x1bc08b[_0x10ef46(0x1dc)],_0x1bc08b[_0x10ef46(0x1f5)]]['filter'](Boolean)[_0x10ef46(0x1cb)]('\x20')),0x0;}catch(_0x1181f6){return _0x1181f6 instanceof HTTPClientError&&_0x1181f6[_0x10ef46(0x1b8)]===0x191?printAuthError(_0x1181f6,!![],_0x1b8d96):console[_0x10ef46(0x1c2)](a7_0x2162f6[_0x10ef46(0x1ba)]('✗\x20Validation\x20failed:\x20'+(_0x1181f6 instanceof Error?_0x1181f6[_0x10ef46(0x1e8)]:String(_0x1181f6)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a7_0x1725ea(0x1b0)]='auth:clear';['description']='Remove\x20API\x20key\x20from\x20system\x20keychain';async[a7_0x1725ea(0x1d1)](_0x229a26){const _0x3dab33=a7_0x1725ea,{options:_0x2fcaec}=_0x229a26,_0x432265=_0x2fcaec[_0x3dab33(0x1af)];console[_0x3dab33(0x1bc)](a7_0x2162f6['bold'](_0x3dab33(0x1e4)));const _0x3a6d7f=await isKeychainAvailable();if(!_0x3a6d7f)return console[_0x3dab33(0x1c2)](a7_0x2162f6[_0x3dab33(0x1ba)]('System\x20keychain\x20is\x20not\x20available')),0x1;const [_0x59f6e1,_0x38ba48]=await Promise[_0x3dab33(0x1bf)]([deleteKeychainAPIKey(_0x432265),deleteOAuthTokens(_0x432265)]);if(_0x59f6e1||_0x38ba48){clearCredentialCache();const _0x26eea5=[_0x59f6e1&&_0x3dab33(0x1ed),_0x38ba48&&_0x3dab33(0x1e9)][_0x3dab33(0x1ee)](Boolean)['join'](_0x3dab33(0x1ca));return console[_0x3dab33(0x1bc)]('✓\x20'+_0x26eea5+_0x3dab33(0x1d3)+(_0x432265?_0x3dab33(0x1bb)+_0x432265+')':'')),0x0;}else return console[_0x3dab33(0x1bc)]('No\x20credentials\x20found\x20in\x20keychain'+(_0x432265?_0x3dab33(0x1f6)+_0x432265:'')),0x1;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a8_0x1f47(_0x2f04c4,_0x169c5e){_0x2f04c4=_0x2f04c4-0x184;const _0x2c7a15=a8_0x2c7a();let _0x1f4768=_0x2c7a15[_0x2f04c4];return _0x1f4768;}const a8_0x3a761d=a8_0x1f47;(function(_0x50ef60,_0x48c85d){const _0x4ccc7b=a8_0x1f47,_0x742c6e=_0x50ef60();while(!![]){try{const _0x2c90c6=-parseInt(_0x4ccc7b(0x1a7))/0x1+-parseInt(_0x4ccc7b(0x1a3))/0x2+parseInt(_0x4ccc7b(0x199))/0x3*(-parseInt(_0x4ccc7b(0x18b))/0x4)+-parseInt(_0x4ccc7b(0x197))/0x5*(-parseInt(_0x4ccc7b(0x18a))/0x6)+-parseInt(_0x4ccc7b(0x184))/0x7+parseInt(_0x4ccc7b(0x195))/0x8+-parseInt(_0x4ccc7b(0x185))/0x9*(-parseInt(_0x4ccc7b(0x19f))/0xa);if(_0x2c90c6===_0x48c85d)break;else _0x742c6e['push'](_0x742c6e['shift']());}catch(_0x6e1ded){_0x742c6e['push'](_0x742c6e['shift']());}}}(a8_0x2c7a,0xb1b4c));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';function a8_0x2c7a(){const _0x6fbd56=['Authenticating\x20via\x20OAuth\x20for\x20site:\x20','execute','10450632rwpCEa','name','1271320OPGjNc','jobs','1161fwQVHK','Login\x20via\x20OAuth\x20(opens\x20browser)','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','green','log','\x20(profile:\x20','2370QkjuQr','\x20\x20tdx','create','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','1578840WYpOsg','bold','✓\x20OAuth\x20tokens\x20saved\x20to\x20system\x20keychain','System\x20keychain\x20is\x20not\x20available.\x20OAuth\x20tokens\x20cannot\x20be\x20saved.\x20','1345491gTRAmi','2599576Eqmzun','56205qtUzFQ','tdx:\x20auth\x20login','ERROR','getUserInfo','access_token','12GzkYXs','628zPEEEn','auth:login','✓\x20Profile\x20\x27','email','logLevel','✓\x20Authentication\x20successful\x20(User:\x20','Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.','/oauth/authorize'];a8_0x2c7a=function(){return _0x6fbd56;};return a8_0x2c7a();}import{saveOAuthTokens}from'../core/oauth-keychain.js';import{startOAuthFlow,isOAuthSupported}from'../core/oauth.js';import{promptSiteSelection}from'../core/constants.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a8_0xbda35f from'chalk';export async function runOAuthLoginFlow(_0xb91e86,_0x1b2bb9,_0x1ce3c1){const _0x55cb26=a8_0x1f47;if(!isOAuthSupported(_0xb91e86))throw new Error('OAuth\x20login\x20is\x20not\x20yet\x20available\x20for\x20site:\x20'+_0xb91e86+'.\x20'+'OAuth\x20is\x20currently\x20supported\x20on\x20dev-us01\x20and\x20dev-eu01\x20only.\x20'+_0x55cb26(0x191));const _0xc4c693=await isKeychainAvailable();if(!_0xc4c693)throw new Error(_0x55cb26(0x1a6)+_0x55cb26(0x191));const _0x531fa3=getConsoleUrl(_0xb91e86);console[_0x55cb26(0x19d)]('Opening\x20browser\x20for\x20authentication...'),console['log']('\x20\x20'+_0x531fa3+_0x55cb26(0x192)),console['log']('Waiting\x20for\x20authorization\x20(timeout:\x202\x20minutes)...');const _0x1372b5=await startOAuthFlow(_0xb91e86);console[_0x55cb26(0x19d)]('Validating\x20OAuth\x20tokens...');const _0x2939c5=TDX[_0x55cb26(0x1a1)]({'site':_0xb91e86,'accessToken':_0x1372b5[_0x55cb26(0x189)],'logLevel':_0x1ce3c1??LogLevel[_0x55cb26(0x187)]}),_0x240bf0=await _0x2939c5[_0x55cb26(0x198)][_0x55cb26(0x188)]();console[_0x55cb26(0x19d)](a8_0xbda35f[_0x55cb26(0x19c)](_0x55cb26(0x190)+_0x240bf0[_0x55cb26(0x18e)]+')')),await saveOAuthTokens(_0x1372b5,_0x1b2bb9),console['log'](_0x55cb26(0x1a5)+(_0x1b2bb9?_0x55cb26(0x19e)+_0x1b2bb9+')':''));if(_0x1b2bb9){const _0x3aed8a={'site':_0xb91e86};saveProfileToUserConfig(_0x1b2bb9,_0x3aed8a),console['log'](_0x55cb26(0x18d)+_0x1b2bb9+'\x27\x20registered');}const _0x4535fe=_0x1b2bb9?'\x20--profile\x20'+_0x1b2bb9:'';console[_0x55cb26(0x19d)](),console[_0x55cb26(0x19d)](_0x55cb26(0x1a2)),console[_0x55cb26(0x19d)](_0x55cb26(0x1a0)+_0x4535fe+'\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication'),console[_0x55cb26(0x19d)](_0x55cb26(0x1a0)+_0x4535fe+_0x55cb26(0x19b));}export class AuthLoginCommand extends BaseCommand{[a8_0x3a761d(0x196)]=a8_0x3a761d(0x18c);['description']=a8_0x3a761d(0x19a);async[a8_0x3a761d(0x194)](_0x3878c5){const _0x23667f=a8_0x3a761d,{options:_0x585ee2}=_0x3878c5,_0x5eaede=_0x585ee2['profile'];console[_0x23667f(0x19d)](a8_0xbda35f[_0x23667f(0x1a4)](_0x23667f(0x186)));const _0xa816fe=_0x585ee2['site']||'us01',_0x2d97ba=await promptSiteSelection(_0xa816fe,_0x5eaede,'Login\x20cancelled');if(!_0x2d97ba)return 0x1;const _0x1b7faa=resolveSite(_0x2d97ba);return console['log'](_0x23667f(0x193)+_0x1b7faa),await runOAuthLoginFlow(_0x1b7faa,_0x5eaede,_0x585ee2[_0x23667f(0x18f)]??LogLevel[_0x23667f(0x187)]),0x0;}}
|