@treasuredata/tdx 2026.3.35 → 2026.3.37
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/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-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/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.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/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.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_0x409031=a3_0xf6c1;(function(_0x1c8f8c,_0x320cf6){const _0x31eacd=a3_0xf6c1,_0x5b7e51=_0x1c8f8c();while(!![]){try{const _0x160657=parseInt(_0x31eacd(0xc1))/0x1*(-parseInt(_0x31eacd(0xc4))/0x2)+parseInt(_0x31eacd(0xc2))/0x3+-parseInt(_0x31eacd(0xb9))/0x4*(-parseInt(_0x31eacd(0xb0))/0x5)+parseInt(_0x31eacd(0xac))/0x6*(-parseInt(_0x31eacd(0xc7))/0x7)+-parseInt(_0x31eacd(0xa9))/0x8+parseInt(_0x31eacd(0xbd))/0x9*(parseInt(_0x31eacd(0xa7))/0xa)+parseInt(_0x31eacd(0xc6))/0xb*(-parseInt(_0x31eacd(0xba))/0xc);if(_0x160657===_0x320cf6)break;else _0x5b7e51['push'](_0x5b7e51['shift']());}catch(_0x2d6bb2){_0x5b7e51['push'](_0x5b7e51['shift']());}}}(a3_0x3515,0xc0596));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a3_0xf6c1(_0x4a463d,_0x513d22){_0x4a463d=_0x4a463d-0xa5;const _0x3515ec=a3_0x3515();let _0xf6c189=_0x3515ec[_0x4a463d];return _0xf6c189;}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_0x409031(0xb7)]=a3_0x409031(0xbc);[a3_0x409031(0xca)]='List\x20activations\x20for\x20a\x20segment';async[a3_0x409031(0xbf)](_0x134f22){const _0x3fb2bd=a3_0x409031,{options:_0x40a564,args:_0x5a63b8,tdx:_0x186b29}=_0x134f22;if(_0x5a63b8[_0x3fb2bd(0xae)]===0x0)return console['error'](_0x3fb2bd(0xbe)),console['error']('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;try{const {parentId:_0x26c96b,childId:_0x32510e}=parseSegmentRef(_0x5a63b8[0x0]);if(!_0x32510e)return console[_0x3fb2bd(0xaf)](_0x3fb2bd(0xb1)),console['error'](_0x3fb2bd(0xc9)),0x1;_0x40a564[_0x3fb2bd(0xab)]&&(console[_0x3fb2bd(0xaf)](_0x3fb2bd(0xc5)+_0x40a564[_0x3fb2bd(0xaa)]),console[_0x3fb2bd(0xaf)]('Parent\x20name:\x20'+_0x26c96b),console[_0x3fb2bd(0xaf)](_0x3fb2bd(0xb6)+_0x32510e));const _0x4b6946=await withSpinner(_0x3fb2bd(0xb4)+_0x26c96b+_0x3fb2bd(0xb8),()=>_0x186b29[_0x3fb2bd(0xbb)][_0x3fb2bd(0xc3)](_0x26c96b),{'verbose':_0x40a564['verbose']}),_0x5509e4=_0x4b6946[_0x3fb2bd(0xc0)];_0x40a564[_0x3fb2bd(0xab)]&&console[_0x3fb2bd(0xaf)](_0x3fb2bd(0xa5)+_0x5509e4);const _0x22232c=await withSpinner('Resolving\x20child\x20segment\x20\x27'+_0x32510e+'\x27...',()=>_0x186b29['segment']['resolveSegmentId'](_0x5509e4,_0x32510e),{'verbose':_0x40a564['verbose']}),_0x5ab60f=_0x22232c[_0x3fb2bd(0xc0)];_0x40a564[_0x3fb2bd(0xab)]&&console[_0x3fb2bd(0xaf)](_0x3fb2bd(0xa6)+_0x5ab60f);const _0x7735a2=await withSpinner('Listing\x20activations\x20for\x20segment\x20\x27'+_0x32510e+_0x3fb2bd(0xb8),()=>_0x186b29[_0x3fb2bd(0xbb)][_0x3fb2bd(0xb3)](_0x5509e4,_0x5ab60f),{'verbose':_0x40a564['verbose']}),_0x4848fe=_0x7735a2[_0x3fb2bd(0xc0)];return console[_0x3fb2bd(0xaf)](_0x3fb2bd(0xb5)+_0x4848fe[_0x3fb2bd(0xae)]+_0x3fb2bd(0xa8)+(_0x4848fe[_0x3fb2bd(0xae)]!==0x1?'s':'')),await handleSDKOutput(_0x4848fe,_0x40a564),0x0;}catch(_0x50b982){if(_0x50b982 instanceof SDKError)return console['error'](_0x3fb2bd(0xad)+_0x50b982['message']),_0x50b982[_0x3fb2bd(0xc8)]&&console[_0x3fb2bd(0xaf)](_0x3fb2bd(0xb2)+_0x50b982['cause']),0x1;throw _0x50b982;}}}function a3_0x3515(){const _0x3120ea=['92ZMumWR','Site:\x20','116633uygMJE','7DKPXIW','cause','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','description','Resolved\x20parent\x20ID:\x20','Resolved\x20child\x20ID:\x20','90tzWcZf','\x20activation','1207280NDnjDp','site','verbose','6111594zfzwzV','Error:\x20','length','error','5586165HLlUuz','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','\x20\x20Cause:\x20','listActivations','Resolving\x20parent\x20segment\x20\x27','✔\x20Found\x20','Child\x20name:\x20','name','\x27...','4EsLquW','924zmZFQt','segment','activations','872631QPNkZN','Error:\x20Segment\x20name\x20is\x20required','execute','data','15998OcqmAu','4559538xCJATR','resolveParentId'];a3_0x3515=function(){return _0x3120ea;};return a3_0x3515();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a4_0x5abd(){const _0xaeb4fa=['Dry\x20run\x20-\x20no\x20files\x20written','llm_project','Project\x20cloned\x20successfully','\x20|\x20','prompts','agentId','\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)','\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','\x22\x20to\x20new\x20project\x20\x22','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','dirname','\x0aPush\x20','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','Project:\x20','2456419JZzMVH','integrations','Using\x20project\x20from\x20','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','agents','INVALID_ARGUMENT','created','\x20\x20Source:\x20','agentName','Chat:\x20','projectName','170ydWZGU','cwd','Agent\x20pulled\x20successfully','\x20=\x20','Using\x20local\x20project:\x20','Pulling\x20agent\x20\x22','\x20\x20Knowledge\x20Base\x20\x22','\x20\x20tdx\x20agent\x20pull\x20','yes','agent','updated','-\x20no\x20files\x20written','cyan','Project\x20cloned\x20with\x20errors','6AMJtRL','push','Cannot\x20clone\x20from\x20context\x20project\x20\x22','<new-name>','agent:push','\x20\x20Agents:\x20','repeat','site','llm','\x20\x20Prompts:\x20','action','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','Output\x20path:\x20','counts','\x0aWrite\x20','\x22\x20from\x20project\x20\x22','Clone\x20\x22','agent.yml','\x20unchanged','name','error','3184389QdUcik','join','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','log','pullAgent','textKnowledgeBases','profile','\x0aPush\x20summary\x20for\x20\x27','dim','\x20created','experimentalArtifacts','Cancelled','total','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','source','\x20\x20Experimental\x20Artifacts:\x20','execute','\x20successfully','knowledgeBases','3183812mWpEXq','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','\x20\x20Integration\x20\x22','Status:\x20','dryRun','agent:clone','\x0aChanges:','388006COaapv','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','Summary:','\x0a✔\x20Pushed\x20','red','sourceProjectName','\x20\x20Knowledge\x20Bases:\x20','\x20\x20Prompt\x20\x22','-\x20nothing\x20pushed','2300690mDpupP','\x20\x20Text\x20Knowledge\x20Bases:\x20','experimentalKnowledgeBases','✔\x20Context\x20set:\x20','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','Failed\x20to\x20push\x20agent:\x20','Dry\x20run\x20-\x20no\x20changes\x20made','description','cloneProject','\x20updated','Using\x20project:\x20','9rOCKPX','projectDir','Source:\x20','errors','new','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','no_context','force','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','yellow','New\x20project:\x20','pullProject','found','\x20new','context','New\x20project\x20ID:\x20','tdx.json','\x20\x20Text\x20Knowledge\x20Base\x20\x22','utf-8','green','Agent:\x20','pushProject','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)','Using\x20context\x20project:\x20','\x22...','2782632KSLBZN','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Using\x20current\x20project:\x20','\x20\x20Target:\x20','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','\x20files?','\x20\x20Agent\x20\x22','outputPath','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','diff','Errors:','\x20\x20tdx\x20agent\x20clone\x20agents/','session','\x20--name\x20','reason','agent:pull','\x20resources\x20to\x20\x27','\x0aProject\x20pushed\x20with\x20errors','Agent\x20','\x22\x20to\x20a\x20different\x20profile','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\x20errors','Analyzing\x20changes\x20to\x20push...','pushAgent','\x20\x20Integrations:\x20','llmProject','\x27\x20to\x20create\x20the\x20folder\x20structure.','message','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','Analyzing\x20project\x20\x22','\x0aError:','Would\x20push\x20agent:\x20','cwd-config','\x0aChanges\x20to\x20agent\x20\x27','New\x20project\x20name\x20is\x20required','Cloning\x20\x22','output','\x22:\x20','unchanged','gray','Output:\x20','projectId','Writing\x20files...','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','122604GHSttW','\x20changed','newProjectId','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','parse','\x22\x20to\x20\x22','\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\x20Knowledge\x20Bases:\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>'];a4_0x5abd=function(){return _0xaeb4fa;};return a4_0x5abd();}const a4_0x43caca=a4_0x542d;(function(_0x109757,_0x171de1){const _0x26df80=a4_0x542d,_0x17660f=_0x109757();while(!![]){try{const _0x4f926e=parseInt(_0x26df80(0x249))/0x1+parseInt(_0x26df80(0x242))/0x2+-parseInt(_0x26df80(0x22f))/0x3+parseInt(_0x26df80(0x1ea))/0x4*(-parseInt(_0x26df80(0x20c))/0x5)+-parseInt(_0x26df80(0x21a))/0x6*(-parseInt(_0x26df80(0x201))/0x7)+parseInt(_0x26df80(0x276))/0x8+-parseInt(_0x26df80(0x25d))/0x9*(-parseInt(_0x26df80(0x252))/0xa);if(_0x4f926e===_0x171de1)break;else _0x17660f['push'](_0x17660f['shift']());}catch(_0x461e03){_0x17660f['push'](_0x17660f['shift']());}}}(a4_0x5abd,0xc490a));import a4_0x3177dc from'chalk';import a4_0xacb95 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 a4_0x542d(_0x34b934,_0x51ff7c){_0x34b934=_0x34b934-0x1d4;const _0x5abd3a=a4_0x5abd();let _0x542d18=_0x5abd3a[_0x34b934];return _0x542d18;}function formatCountSummary(_0x1a36b6){const _0x2a8144=a4_0x542d,_0x3ab7ed=[];if(_0x1a36b6[_0x2a8144(0x23b)]!==undefined)_0x3ab7ed['push'](_0x1a36b6['total']+'\x20total');if(_0x1a36b6['new']!==undefined&&_0x1a36b6['new']>0x0)_0x3ab7ed[_0x2a8144(0x21b)](a4_0x3177dc[_0x2a8144(0x270)](_0x1a36b6[_0x2a8144(0x261)]+'\x20new'));if(_0x1a36b6['created']!==undefined&&_0x1a36b6[_0x2a8144(0x207)]>0x0)_0x3ab7ed['push'](a4_0x3177dc['green'](_0x1a36b6[_0x2a8144(0x207)]+_0x2a8144(0x238)));if(_0x1a36b6['updated']!==undefined&&_0x1a36b6[_0x2a8144(0x216)]>0x0)_0x3ab7ed[_0x2a8144(0x21b)](a4_0x3177dc[_0x2a8144(0x266)](_0x1a36b6[_0x2a8144(0x216)]+_0x2a8144(0x25b)));if(_0x1a36b6[_0x2a8144(0x1e4)]!==undefined&&_0x1a36b6[_0x2a8144(0x1e4)]>0x0)_0x3ab7ed[_0x2a8144(0x21b)](a4_0x3177dc[_0x2a8144(0x1e5)](_0x1a36b6[_0x2a8144(0x1e4)]+_0x2a8144(0x22c)));if(_0x1a36b6[_0x2a8144(0x260)]!==undefined&&_0x1a36b6[_0x2a8144(0x260)]>0x0)_0x3ab7ed['push'](a4_0x3177dc[_0x2a8144(0x24d)](_0x1a36b6[_0x2a8144(0x260)]+_0x2a8144(0x28b)));return _0x3ab7ed[_0x2a8144(0x230)](',\x20');}function displayDiffs(_0x50fcba,_0x5f2f54,_0x11be64,_0x1600fb,_0x2d7cca,_0x251488,_0x38bf7b){const _0x490de1=a4_0x542d;for(const _0x400233 of _0x50fcba){if(_0x400233[_0x490de1(0x27f)]){const _0x2968c1=_0x400233[_0x490de1(0x209)]||_0x400233[_0x490de1(0x22d)];console[_0x490de1(0x232)](_0x490de1(0x1df)+_0x2968c1+'\x27:'),console[_0x490de1(0x232)]('─'['repeat'](0x3c)),console['log'](_0x400233['diff']),console[_0x490de1(0x232)]('─'['repeat'](0x3c));}}for(const _0x1df2ca of _0x5f2f54){_0x1df2ca['diff']&&(console['log'](_0x490de1(0x1e9)+_0x1df2ca[_0x490de1(0x22d)]+'\x27:'),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)),console[_0x490de1(0x232)](_0x1df2ca['diff']),console['log']('─'[_0x490de1(0x220)](0x3c)));}for(const _0x500e55 of _0x11be64){_0x500e55[_0x490de1(0x27f)]&&(console[_0x490de1(0x232)]('\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27'+_0x500e55['name']+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x490de1(0x232)](_0x500e55[_0x490de1(0x27f)]),console[_0x490de1(0x232)]('─'['repeat'](0x3c)));}for(const _0x30f096 of _0x1600fb){_0x30f096[_0x490de1(0x27f)]&&(console[_0x490de1(0x232)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x30f096[_0x490de1(0x22d)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x490de1(0x232)](_0x30f096['diff']),console[_0x490de1(0x232)]('─'['repeat'](0x3c)));}for(const _0x244bfb of _0x2d7cca){_0x244bfb[_0x490de1(0x27f)]&&(console[_0x490de1(0x232)]('\x0aChanges\x20to\x20integration\x20\x27'+_0x244bfb['name']+'\x27:'),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)),console[_0x490de1(0x232)](_0x244bfb['diff']),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)));}for(const _0x311a83 of _0x251488){_0x311a83['diff']&&(console[_0x490de1(0x232)](_0x490de1(0x262)+_0x311a83[_0x490de1(0x22d)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x490de1(0x232)](_0x311a83[_0x490de1(0x27f)]),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)));}for(const _0x3b0305 of _0x38bf7b){_0x3b0305['diff']&&(console['log'](_0x490de1(0x27a)+_0x3b0305[_0x490de1(0x22d)]+'\x27:'),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)),console[_0x490de1(0x232)](_0x3b0305['diff']),console['log']('─'['repeat'](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']=a4_0x43caca(0x285);['description']=a4_0x43caca(0x204);async[a4_0x43caca(0x23f)](_0x5414e0){const _0x26fd09=a4_0x43caca,{options:_0x2e8be5,args:_0x35d60a,tdx:_0x4060ff}=_0x5414e0,_0x35bc18=_0x35d60a[0x0],_0xd75ef1=_0x35d60a[0x1],_0x1326f9=_0x2e8be5[_0x26fd09(0x1e2)],_0x314430=_0x2e8be5['dryRun'],_0x4f63d5=_0x2e8be5[_0x26fd09(0x264)],_0xd7077=_0x2e8be5['yes'],_0x30a0dd=_0x2e8be5['llmProject'],_0x45786e=_0x2e8be5[_0x26fd09(0x215)];let _0x32d8f2;if(_0x35bc18){const _0x2606fa=a4_0xacb95[_0x26fd09(0x230)](_0x35bc18,'tdx.json');if(existsSync(_0x2606fa))try{const _0x50a8e0=JSON['parse'](readFileSync(_0x2606fa,_0x26fd09(0x26f)));_0x50a8e0[_0x26fd09(0x1f4)]&&(_0x32d8f2={'llm_project':_0x50a8e0[_0x26fd09(0x1f4)]});}catch{}}const _0x1f5e9f=findAgentConfigPath(process[_0x26fd09(0x20d)]());let _0x2dd19d;if(_0x1f5e9f)try{const _0x3d8e4a=JSON[_0x26fd09(0x1ee)](readFileSync(_0x1f5e9f,_0x26fd09(0x26f)));_0x3d8e4a['llm_project']&&(_0x2dd19d={'llm_project':_0x3d8e4a[_0x26fd09(0x1f4)]});}catch{}const _0x5703dc=resolveAgentPullArgs({'arg':_0x35bc18,'agentNameArg':_0xd75ef1,'agentFlag':_0x45786e,'contextProject':_0x30a0dd,'argDirConfig':_0x32d8f2,'cwdConfigPath':_0x1f5e9f||undefined,'cwdConfig':_0x2dd19d}),{projectNameOrId:_0xcfc66b,targetAgentName:_0x274fa4,existingOutputDir:_0x1ae5a1,source:_0x5a8311}=_0x5703dc;if(_0x5a8311==='arg-dir')console[_0x26fd09(0x232)](a4_0x3177dc['dim'](_0x26fd09(0x203)+a4_0xacb95[_0x26fd09(0x230)](_0x35bc18,_0x26fd09(0x26d))+':\x20'+_0xcfc66b));else{if(_0x5a8311===_0x26fd09(0x1de))console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x237)]('Using\x20project:\x20'+_0xcfc66b));else _0x5a8311===_0x26fd09(0x26b)&&console[_0x26fd09(0x232)](a4_0x3177dc['dim']('Using\x20project\x20from\x20context:\x20'+_0xcfc66b));}if(!_0xcfc66b)return _0x45786e?(console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x243))),console[_0x26fd09(0x232)]('Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>'),console[_0x26fd09(0x232)](_0x26fd09(0x256))):(console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x27e))),console[_0x26fd09(0x232)](_0x26fd09(0x273)),console[_0x26fd09(0x232)](_0x26fd09(0x1fa)),console[_0x26fd09(0x232)]('\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['log']('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project'),console['log'](_0x26fd09(0x1f0))),0x1;if(_0x274fa4){const {data:_0x418419}=await withSpinner(_0x26fd09(0x211)+_0x274fa4+_0x26fd09(0x229)+_0xcfc66b+_0x26fd09(0x275),()=>_0x4060ff[_0x26fd09(0x222)][_0x26fd09(0x233)](_0xcfc66b,_0x274fa4,_0x1326f9,{'dryRun':_0x314430,'force':_0x4f63d5}));if(_0x314430)return console[_0x26fd09(0x232)](a4_0x3177dc['yellow'](_0x26fd09(0x1f3))),console[_0x26fd09(0x232)]('Would\x20pull\x20agent:\x20'+_0x418419[_0x26fd09(0x209)]),console[_0x26fd09(0x232)](_0x26fd09(0x226)+_0x418419[_0x26fd09(0x27d)]),_0x418419[_0x26fd09(0x27f)]&&(console['log'](_0x26fd09(0x248)),console[_0x26fd09(0x232)]('─'[_0x26fd09(0x220)](0x3c)),console[_0x26fd09(0x232)](_0x418419[_0x26fd09(0x27f)]),console['log']('─'[_0x26fd09(0x220)](0x3c))),0x0;return console[_0x26fd09(0x232)](a4_0x3177dc['green'](_0x26fd09(0x20e))),console[_0x26fd09(0x232)]('Agent:\x20'+_0x418419[_0x26fd09(0x209)]),console['log'](_0x26fd09(0x1e6)+_0x418419[_0x26fd09(0x27d)]),console[_0x26fd09(0x232)](_0x26fd09(0x245)+(_0x418419['isNew']?a4_0x3177dc['green'](_0x26fd09(0x261)):_0x418419['hasChanges']?a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x216)):a4_0x3177dc[_0x26fd09(0x1e5)]('unchanged'))),0x0;}const _0x3e2c51=_0x1ae5a1||_0x1326f9,{data:_0xe03e5f}=await withSpinner(_0x26fd09(0x1db)+_0xcfc66b+_0x26fd09(0x275),()=>_0x4060ff[_0x26fd09(0x222)][_0x26fd09(0x268)](_0xcfc66b,_0x3e2c51,{'dryRun':!![]})),_0x33e935=_0xe03e5f[_0x26fd09(0x227)]['agents'][_0x26fd09(0x261)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x241)][_0x26fd09(0x261)]+_0xe03e5f[_0x26fd09(0x227)]['textKnowledgeBases']['new']+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)]['new']+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)][_0x26fd09(0x261)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x254)][_0x26fd09(0x261)]+_0xe03e5f['counts'][_0x26fd09(0x239)][_0x26fd09(0x261)],_0x57f7ff=_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x205)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x241)][_0x26fd09(0x216)]+_0xe03e5f['counts']['textKnowledgeBases'][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x254)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x239)][_0x26fd09(0x216)],_0x468c77=_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x205)]['unchanged']+_0xe03e5f[_0x26fd09(0x227)]['knowledgeBases'][_0x26fd09(0x1e4)]+_0xe03e5f['counts'][_0x26fd09(0x234)][_0x26fd09(0x1e4)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)][_0x26fd09(0x1e4)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)]['unchanged']+_0xe03e5f['counts']['experimentalKnowledgeBases'][_0x26fd09(0x1e4)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x239)][_0x26fd09(0x1e4)];console[_0x26fd09(0x232)]('\x0aPull\x20summary\x20for\x20\x27'+_0xe03e5f[_0x26fd09(0x20b)]+'\x27:'),console[_0x26fd09(0x232)]('\x20\x20'+a4_0x3177dc[_0x26fd09(0x270)]('+\x20'+_0x33e935+_0x26fd09(0x26a))+_0x26fd09(0x1f6)+a4_0x3177dc[_0x26fd09(0x266)]('~\x20'+_0x57f7ff+_0x26fd09(0x1eb))+_0x26fd09(0x1f6)+a4_0x3177dc['dim']('=\x20'+_0x468c77+_0x26fd09(0x22c))),console[_0x26fd09(0x232)](_0x26fd09(0x21f)+formatCountSummary(_0xe03e5f['counts'][_0x26fd09(0x205)])),console[_0x26fd09(0x232)](_0x26fd09(0x24f)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x241)])),console[_0x26fd09(0x232)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x234)])),console['log'](_0x26fd09(0x223)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)])),console[_0x26fd09(0x232)](_0x26fd09(0x1d6)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)]));const _0xc5a876=_0xe03e5f[_0x26fd09(0x227)]['experimentalKnowledgeBases'][_0x26fd09(0x23b)]>0x0||_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x239)]['total']>0x0;_0xc5a876&&(console[_0x26fd09(0x232)](_0x26fd09(0x1f1)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x254)])),console['log'](_0x26fd09(0x23e)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)]['experimentalArtifacts'])));console[_0x26fd09(0x232)](_0x26fd09(0x279)+a4_0x3177dc['cyan'](_0xe03e5f['outputDir'])),displayDiffs(_0xe03e5f[_0x26fd09(0x205)],_0xe03e5f[_0x26fd09(0x241)],_0xe03e5f['textKnowledgeBases'],_0xe03e5f[_0x26fd09(0x1f7)],_0xe03e5f[_0x26fd09(0x202)],_0xe03e5f[_0x26fd09(0x254)],_0xe03e5f[_0x26fd09(0x239)]);if(_0x314430)return console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x33e935===0x0&&_0x57f7ff===0x0)return console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x270)](_0x26fd09(0x23c))),saveSessionContext({'llm_project':_0xe03e5f[_0x26fd09(0x20b)]},_0x2e8be5[_0x26fd09(0x282)]),console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x270)](_0x26fd09(0x255)+a4_0x3177dc[_0x26fd09(0x237)]('llm_project')+_0x26fd09(0x20f)+a4_0x3177dc[_0x26fd09(0x218)](_0xe03e5f['projectName']))),0x0;if(!_0xd7077&&!_0x4f63d5){if(!isInteractive())return console[_0x26fd09(0x22e)](a4_0x3177dc[_0x26fd09(0x24d)](_0x26fd09(0x1dc)),_0x26fd09(0x277)),console[_0x26fd09(0x22e)](a4_0x3177dc[_0x26fd09(0x237)](_0x26fd09(0x265))),0x1;const _0x2c142a=await confirmKey(_0x26fd09(0x228)+(_0x33e935+_0x57f7ff)+_0x26fd09(0x27b));if(!_0x2c142a)return console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x23a)),_0x26fd09(0x217)),0x1;}const {data:_0x22dd02}=await withSpinner(_0x26fd09(0x1e8),()=>_0x4060ff[_0x26fd09(0x222)][_0x26fd09(0x268)](_0xcfc66b,_0x3e2c51,{'force':_0x4f63d5}));return console['log'](a4_0x3177dc[_0x26fd09(0x270)]('\x0a✔\x20Pulled\x20'+(_0x33e935+_0x57f7ff)+'\x20files\x20to\x20'+_0x22dd02['outputDir'])),saveSessionContext({'llm_project':_0x22dd02[_0x26fd09(0x20b)]},_0x2e8be5[_0x26fd09(0x282)]),console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x270)]('✔\x20Context\x20set:\x20'+a4_0x3177dc[_0x26fd09(0x237)](_0x26fd09(0x1f4))+_0x26fd09(0x20f)+a4_0x3177dc[_0x26fd09(0x218)](_0x22dd02['projectName']))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x43caca(0x22d)]=a4_0x43caca(0x247);['description']='Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project';async[a4_0x43caca(0x23f)](_0x2af6bb){const _0x441a86=a4_0x43caca,{options:_0x42a654,args:_0x136dc7,tdx:_0x1480a6}=_0x2af6bb,_0x147469=_0x136dc7[0x0],_0x10f7f8=_0x42a654[_0x441a86(0x22d)],_0xef49b6=_0x42a654[_0x441a86(0x246)],_0x12e59a=_0x42a654[_0x441a86(0x214)],_0x704413=_0x42a654[_0x441a86(0x221)],_0x270872=_0x42a654['llmProject'];let _0x44e255;const _0x4f8b4b=findAgentConfigPath(process[_0x441a86(0x20d)]());if(_0x147469){const _0x5c8c26=a4_0xacb95['join'](_0x147469,_0x441a86(0x26d));existsSync(_0x5c8c26)?(_0x44e255=_0x147469,console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x210)+_0x147469))):_0x44e255=_0x147469;}else{if(_0x4f8b4b)_0x44e255=a4_0xacb95[_0x441a86(0x1fd)](_0x4f8b4b),console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x278)+_0x44e255));else{if(_0x270872){const _0x55fcf1=sanitizeForFilesystem(_0x270872);let _0x28bc75=_0x55fcf1,_0x2b3eb1=a4_0xacb95[_0x441a86(0x230)](process[_0x441a86(0x20d)](),'agents',_0x55fcf1,_0x441a86(0x26d));if(!existsSync(_0x2b3eb1)){const _0x2fd922=normalizeName(_0x270872),_0x108e98=a4_0xacb95['join'](process[_0x441a86(0x20d)](),_0x441a86(0x205),_0x2fd922,'tdx.json');existsSync(_0x108e98)&&(_0x28bc75=_0x2fd922,_0x2b3eb1=_0x108e98);}if(existsSync(_0x2b3eb1))_0x44e255=a4_0xacb95[_0x441a86(0x1fd)](_0x2b3eb1),console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x210)+_0x44e255));else{const _0xf84dc5=_0x42a654[_0x441a86(0x235)];if(_0xf84dc5)throw new SDKError(ErrorCode[_0x441a86(0x206)],_0x441a86(0x21c)+_0x270872+_0x441a86(0x289),undefined,{'helpText':_0x441a86(0x1fc)+_0x441a86(0x24a)+(_0x441a86(0x213)+_0x270872+'\x0a')+(_0x441a86(0x281)+_0x28bc75+_0x441a86(0x283)+(_0x10f7f8||_0x441a86(0x21d))+'\x20--profile\x20'+_0xf84dc5)});_0x44e255=_0x270872,console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x274)+_0x270872));}}}}if(!_0x44e255)return console[_0x441a86(0x232)](a4_0x3177dc['yellow'](_0x441a86(0x1ed))),console['log'](_0x441a86(0x28a)),console[_0x441a86(0x232)](_0x441a86(0x1da)),console[_0x441a86(0x232)](_0x441a86(0x1f9)),console[_0x441a86(0x232)]('\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>'),0x1;if(!_0x10f7f8)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x441a86(0x1e0),undefined,{'helpText':_0x441a86(0x1f2)});if(!_0x12e59a&&!_0xef49b6){if(!isInteractive())return console[_0x441a86(0x22e)](a4_0x3177dc[_0x441a86(0x24d)]('\x0aError:'),_0x441a86(0x277)),console[_0x441a86(0x22e)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x265))),0x1;const _0x566d48=await confirmKey(_0x441a86(0x22a)+_0x44e255+_0x441a86(0x1fb)+_0x10f7f8+'\x22?');if(!_0x566d48)return console['log'](a4_0x3177dc[_0x441a86(0x266)](_0x441a86(0x23a))),0x1;}const {data:_0x5465ae}=await withSpinner(_0x441a86(0x1e1)+_0x44e255+_0x441a86(0x1ef)+_0x10f7f8+_0x441a86(0x275),()=>_0x1480a6[_0x441a86(0x222)][_0x441a86(0x25a)](_0x44e255,_0x10f7f8,{'dryRun':_0xef49b6}));if(_0xef49b6){console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x266)](_0x441a86(0x258))),console['log'](_0x441a86(0x25f)+_0x5465ae[_0x441a86(0x24e)]),console[_0x441a86(0x232)](_0x441a86(0x267)+_0x10f7f8),console[_0x441a86(0x232)]('Would\x20clone:'),console['log'](_0x441a86(0x21f)+_0x5465ae[_0x441a86(0x227)][_0x441a86(0x205)][_0x441a86(0x207)]),console['log']('\x20\x20Knowledge\x20Bases:\x20'+_0x5465ae['counts'][_0x441a86(0x241)][_0x441a86(0x207)]),console['log'](_0x441a86(0x223)+_0x5465ae['counts'][_0x441a86(0x1f7)][_0x441a86(0x207)]);const _0x2264c5=_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)][_0x441a86(0x207)]>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)]['created']>0x0;return _0x2264c5&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)]['created']),console['log'](_0x441a86(0x23e)+_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)][_0x441a86(0x207)])),0x0;}const _0x10ab44=_0x5465ae['counts'][_0x441a86(0x205)][_0x441a86(0x260)]>0x0||_0x5465ae['counts'][_0x441a86(0x241)][_0x441a86(0x260)]>0x0||_0x5465ae['counts']['prompts'][_0x441a86(0x260)]>0x0||_0x5465ae['counts'][_0x441a86(0x254)][_0x441a86(0x260)]>0x0||_0x5465ae['counts'][_0x441a86(0x239)][_0x441a86(0x260)]>0x0;_0x10ab44?console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x266)](_0x441a86(0x219))):console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x270)](_0x441a86(0x1f5)));console[_0x441a86(0x232)](_0x441a86(0x25f)+_0x5465ae[_0x441a86(0x24e)]),console[_0x441a86(0x232)]('New\x20project:\x20'+_0x5465ae['newProjectName']),console[_0x441a86(0x232)](_0x441a86(0x26c)+_0x5465ae['newProjectId']),console[_0x441a86(0x232)](),console[_0x441a86(0x232)](_0x441a86(0x24b)),console[_0x441a86(0x232)]('\x20\x20Agents:\x20'+formatCountSummary(_0x5465ae[_0x441a86(0x227)]['agents'])),console['log'](_0x441a86(0x24f)+formatCountSummary(_0x5465ae[_0x441a86(0x227)][_0x441a86(0x241)])),console['log']('\x20\x20Prompts:\x20'+formatCountSummary(_0x5465ae['counts'][_0x441a86(0x1f7)])),console[_0x441a86(0x232)](_0x441a86(0x1d6)+formatCountSummary(_0x5465ae['counts'][_0x441a86(0x202)]));const _0x10a994=_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)][_0x441a86(0x207)]>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)][_0x441a86(0x216)]>0x0||_0x5465ae[_0x441a86(0x227)]['experimentalKnowledgeBases']['unchanged']>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)][_0x441a86(0x207)]>0x0||_0x5465ae['counts'][_0x441a86(0x239)][_0x441a86(0x216)]>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)][_0x441a86(0x1e4)]>0x0;_0x10a994&&(console['log'](_0x441a86(0x1f1)+formatCountSummary(_0x5465ae[_0x441a86(0x227)]['experimentalKnowledgeBases'])),console['log'](_0x441a86(0x23e)+formatCountSummary(_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)])));if(_0x10ab44){console[_0x441a86(0x232)](),console[_0x441a86(0x232)](a4_0x3177dc['red'](_0x441a86(0x280)));for(const _0x5c23fd of _0x5465ae['agents']){_0x5c23fd[_0x441a86(0x224)]===_0x441a86(0x22e)&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)](_0x441a86(0x27c)+_0x5c23fd[_0x441a86(0x209)]+_0x441a86(0x1e3)+_0x5c23fd['error']));}for(const _0x42f19d of _0x5465ae[_0x441a86(0x241)]){_0x42f19d[_0x441a86(0x224)]==='error'&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)]('\x20\x20Knowledge\x20Base\x20\x22'+_0x42f19d[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x42f19d[_0x441a86(0x22e)]));}for(const _0x28025e of _0x5465ae[_0x441a86(0x1f7)]){_0x28025e[_0x441a86(0x224)]===_0x441a86(0x22e)&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)](_0x441a86(0x250)+_0x28025e[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x28025e[_0x441a86(0x22e)]));}for(const _0x9a5a0e of _0x5465ae[_0x441a86(0x202)]){_0x9a5a0e['action']===_0x441a86(0x22e)&&console['log'](a4_0x3177dc['red'](_0x441a86(0x244)+_0x9a5a0e[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x9a5a0e[_0x441a86(0x22e)]));}for(const _0x3849ca of _0x5465ae[_0x441a86(0x254)]){_0x3849ca[_0x441a86(0x224)]===_0x441a86(0x22e)&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)](_0x441a86(0x1ff)+_0x3849ca[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x3849ca['error']));}for(const _0x5e03a2 of _0x5465ae[_0x441a86(0x239)]){_0x5e03a2['action']==='error'&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)]('\x20\x20Experimental\x20Artifact\x20\x22'+_0x5e03a2[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x5e03a2[_0x441a86(0x22e)]));}return 0x1;}console['log']();const _0x130dc7=getLLMProjectUrl(_0x704413,_0x5465ae[_0x441a86(0x1ec)]);return console[_0x441a86(0x232)](_0x441a86(0x200)+a4_0x3177dc[_0x441a86(0x218)](_0x130dc7)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x43caca(0x22d)]=a4_0x43caca(0x21e);[a4_0x43caca(0x259)]='Push\x20local\x20agent\x20files\x20to\x20LLM\x20project';async[a4_0x43caca(0x23f)](_0x5addbc){const _0x4826da=a4_0x43caca,{options:_0x2d7ec2,args:_0x55e509,tdx:_0x4c672e}=_0x5addbc;let _0x73ea4f=_0x55e509[0x0]||process[_0x4826da(0x20d)]();const _0x478a88=_0x2d7ec2[_0x4826da(0x246)],_0x47078f=_0x2d7ec2[_0x4826da(0x264)],_0x188890=_0x2d7ec2[_0x4826da(0x214)],_0x2cd9a1=_0x2d7ec2['site'],_0x3d1f24=a4_0xacb95[_0x4826da(0x230)](_0x73ea4f,_0x4826da(0x22b)),_0xfc31f5=existsSync(_0x3d1f24);if(_0xfc31f5){const {data:_0x168637}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x73ea4f+_0x4826da(0x275),()=>_0x4c672e[_0x4826da(0x222)][_0x4826da(0x1d5)](_0x73ea4f,{'dryRun':_0x478a88,'force':_0x47078f}));if(_0x478a88)return console[_0x4826da(0x232)](a4_0x3177dc['yellow'](_0x4826da(0x258))),console[_0x4826da(0x232)](_0x4826da(0x1dd)+_0x168637['agentName']),0x0;if(_0x168637[_0x4826da(0x224)]===_0x4826da(0x22e))return console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x257)+_0x168637[_0x4826da(0x22e)])),0x1;console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x270)](_0x4826da(0x288)+_0x168637[_0x4826da(0x224)]+_0x4826da(0x240))),console[_0x4826da(0x232)](_0x4826da(0x271)+_0x168637[_0x4826da(0x209)]);if(_0x168637['agentId']&&_0x168637[_0x4826da(0x1e7)]){const _0x29b87e=getLLMAgentChatUrl(_0x2cd9a1,_0x168637[_0x4826da(0x1e7)],_0x168637[_0x4826da(0x1f8)]);console[_0x4826da(0x232)](_0x4826da(0x20a)+a4_0x3177dc[_0x4826da(0x218)](_0x29b87e));}return 0x0;}const _0xad9ba6=_0x2d7ec2[_0x4826da(0x1d7)],_0x3b8b66=resolveProjectFromContext(_0x73ea4f,_0xad9ba6);if(_0x3b8b66[_0x4826da(0x269)])_0x73ea4f=_0x3b8b66[_0x4826da(0x25e)],_0x3b8b66[_0x4826da(0x23d)]===_0x4826da(0x26b)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x237)](_0x4826da(0x25c)+_0x73ea4f));else{let _0x38169b='Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.';_0x3b8b66['reason']==='no_local_folder'&&(_0x38169b=_0x3b8b66['message']+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x3b8b66[_0x4826da(0x1d7)]+_0x4826da(0x1d8));throw new SDKError(ErrorCode[_0x4826da(0x206)],_0x3b8b66[_0x4826da(0x284)]===_0x4826da(0x263)?_0x3b8b66[_0x4826da(0x1d9)]:'No\x20tdx.json\x20found\x20in\x20'+_0x73ea4f,undefined,{'helpText':_0x38169b});}const {data:_0x2bd4cc}=await withSpinner(_0x4826da(0x1d4),()=>_0x4c672e[_0x4826da(0x222)][_0x4826da(0x272)](_0x73ea4f,{'dryRun':!![]})),_0x244e14=_0x2bd4cc['counts'][_0x4826da(0x205)][_0x4826da(0x260)]>0x0;if(_0x244e14){console['log'](a4_0x3177dc[_0x4826da(0x24d)]('\x0aErrors\x20found:'));for(const _0x2cbd38 of _0x2bd4cc[_0x4826da(0x205)]){_0x2cbd38[_0x4826da(0x224)]===_0x4826da(0x22e)&&console['log'](a4_0x3177dc[_0x4826da(0x24d)]('\x20\x20Agent\x20\x22'+_0x2cbd38[_0x4826da(0x209)]+'\x22:\x20'+_0x2cbd38[_0x4826da(0x22e)]));}return 0x1;}const _0x5806f6=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x207)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x207)]+_0x2bd4cc['counts'][_0x4826da(0x234)][_0x4826da(0x207)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)][_0x4826da(0x207)]+_0x2bd4cc['counts'][_0x4826da(0x202)][_0x4826da(0x207)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['created']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)]['created'],_0x570a7a=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x216)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x216)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x234)]['updated']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)]['updated']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x202)][_0x4826da(0x216)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['updated']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)][_0x4826da(0x216)],_0x554fa9=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x1e4)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x1e4)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x234)]['unchanged']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)][_0x4826da(0x1e4)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x202)][_0x4826da(0x1e4)]+_0x2bd4cc['counts'][_0x4826da(0x254)]['unchanged']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)][_0x4826da(0x1e4)];console[_0x4826da(0x232)](_0x4826da(0x236)+_0x2bd4cc[_0x4826da(0x20b)]+'\x27:'),console[_0x4826da(0x232)]('\x20\x20'+a4_0x3177dc['green']('+\x20'+_0x5806f6+'\x20new')+_0x4826da(0x1f6)+a4_0x3177dc['yellow']('~\x20'+_0x570a7a+_0x4826da(0x1eb))+'\x20|\x20'+a4_0x3177dc['dim']('=\x20'+_0x554fa9+_0x4826da(0x22c))),console[_0x4826da(0x232)]('\x20\x20Agents:\x20'+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)]['agents'])),console[_0x4826da(0x232)](_0x4826da(0x24f)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)])),console[_0x4826da(0x232)](_0x4826da(0x253)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x234)])),console['log'](_0x4826da(0x223)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)])),console[_0x4826da(0x232)](_0x4826da(0x1d6)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x202)]));const _0x1a13ca=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['created']>0x0||_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['updated']>0x0||_0x2bd4cc['counts'][_0x4826da(0x254)][_0x4826da(0x1e4)]>0x0||_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)][_0x4826da(0x207)]>0x0||_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)]['updated']>0x0||_0x2bd4cc['counts'][_0x4826da(0x239)]['unchanged']>0x0;_0x1a13ca&&(console[_0x4826da(0x232)](_0x4826da(0x1f1)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)])),console[_0x4826da(0x232)](_0x4826da(0x23e)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)])));console['log'](_0x4826da(0x208)+a4_0x3177dc['cyan'](_0x73ea4f)),displayDiffs(_0x2bd4cc[_0x4826da(0x205)],_0x2bd4cc[_0x4826da(0x241)],_0x2bd4cc[_0x4826da(0x234)],_0x2bd4cc[_0x4826da(0x1f7)],_0x2bd4cc['integrations'],_0x2bd4cc[_0x4826da(0x254)],_0x2bd4cc[_0x4826da(0x239)]);if(_0x478a88)return console[_0x4826da(0x232)](a4_0x3177dc['yellow'](_0x4826da(0x231))),0x0;if(_0x5806f6===0x0&&_0x570a7a===0x0){console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x270)](_0x4826da(0x225)));const _0x39ffda=getLLMProjectUrl(_0x2cd9a1,_0x2bd4cc[_0x4826da(0x1e7)]);return console[_0x4826da(0x232)]('Project:\x20'+a4_0x3177dc[_0x4826da(0x218)](_0x39ffda)),0x0;}if(!_0x188890&&!_0x47078f){if(!isInteractive())return console[_0x4826da(0x22e)](a4_0x3177dc[_0x4826da(0x24d)]('\x0aError:'),_0x4826da(0x277)),console[_0x4826da(0x22e)](a4_0x3177dc[_0x4826da(0x237)](_0x4826da(0x265))),0x1;const _0x3aa723=await confirmKey(_0x4826da(0x1fe)+(_0x5806f6+_0x570a7a)+'\x20resources?');if(!_0x3aa723)return console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x266)](_0x4826da(0x23a)),_0x4826da(0x251)),0x1;}const {data:_0x361145}=await withSpinner('Pushing\x20to\x20project...',()=>_0x4c672e[_0x4826da(0x222)]['pushProject'](_0x73ea4f,{'force':_0x47078f})),_0x2265d2=_0x361145[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x260)]>0x0||_0x361145[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x260)]>0x0||_0x361145[_0x4826da(0x227)]['textKnowledgeBases']['errors']>0x0||_0x361145[_0x4826da(0x227)][_0x4826da(0x1f7)][_0x4826da(0x260)]>0x0;if(_0x2265d2){console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x266)](_0x4826da(0x287))),console[_0x4826da(0x232)](),console['log'](a4_0x3177dc[_0x4826da(0x24d)]('Errors:'));for(const _0x462b63 of _0x361145[_0x4826da(0x205)]){_0x462b63['action']==='error'&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x27c)+_0x462b63[_0x4826da(0x209)]+_0x4826da(0x1e3)+_0x462b63[_0x4826da(0x22e)]));}for(const _0x66f37a of _0x361145[_0x4826da(0x241)]){_0x66f37a[_0x4826da(0x224)]===_0x4826da(0x22e)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x212)+_0x66f37a['name']+_0x4826da(0x1e3)+_0x66f37a[_0x4826da(0x22e)]));}for(const _0xb3031f of _0x361145[_0x4826da(0x234)]){_0xb3031f[_0x4826da(0x224)]===_0x4826da(0x22e)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x26e)+_0xb3031f[_0x4826da(0x22d)]+_0x4826da(0x1e3)+_0xb3031f[_0x4826da(0x22e)]));}for(const _0x5953aa of _0x361145[_0x4826da(0x1f7)]){_0x5953aa['action']===_0x4826da(0x22e)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)]('\x20\x20Prompt\x20\x22'+_0x5953aa['name']+_0x4826da(0x1e3)+_0x5953aa[_0x4826da(0x22e)]));}for(const _0x2eba37 of _0x361145['integrations']){_0x2eba37[_0x4826da(0x224)]===_0x4826da(0x22e)&&console['log'](a4_0x3177dc['red'](_0x4826da(0x244)+_0x2eba37[_0x4826da(0x22d)]+'\x22:\x20'+_0x2eba37[_0x4826da(0x22e)]));}return 0x1;}console[_0x4826da(0x232)](a4_0x3177dc['green'](_0x4826da(0x24c)+(_0x5806f6+_0x570a7a)+_0x4826da(0x286)+_0x361145['projectName']+'\x27'));const _0x45b8e4=getLLMProjectUrl(_0x2cd9a1,_0x361145[_0x4826da(0x1e7)]);return console['log'](_0x4826da(0x200)+a4_0x3177dc[_0x4826da(0x218)](_0x45b8e4)),0x0;}}
|
|
1
|
+
const a4_0x1b5248=a4_0x164f;(function(_0x4002bc,_0x1768b8){const _0x4cd8ea=a4_0x164f,_0x443e52=_0x4002bc();while(!![]){try{const _0x28e4b1=parseInt(_0x4cd8ea(0x20c))/0x1*(-parseInt(_0x4cd8ea(0x1f1))/0x2)+parseInt(_0x4cd8ea(0x1f8))/0x3+-parseInt(_0x4cd8ea(0x239))/0x4+-parseInt(_0x4cd8ea(0x212))/0x5+-parseInt(_0x4cd8ea(0x1cb))/0x6+parseInt(_0x4cd8ea(0x201))/0x7*(-parseInt(_0x4cd8ea(0x1fa))/0x8)+parseInt(_0x4cd8ea(0x1f2))/0x9*(parseInt(_0x4cd8ea(0x234))/0xa);if(_0x28e4b1===_0x1768b8)break;else _0x443e52['push'](_0x443e52['shift']());}catch(_0x2e1e3c){_0x443e52['push'](_0x443e52['shift']());}}}(a4_0x1088,0x7c99a));function a4_0x1088(){const _0x3e53f8=['\x20\x20Knowledge\x20Bases:\x20','output','\x20\x20Prompt\x20\x22','New\x20project:\x20','Pushing\x20agent\x20from\x20\x22','\x0aWrite\x20','textKnowledgeBases','experimentalKnowledgeBases','total','\x20resources?','\x0aPush\x20summary\x20for\x20\x27','\x20\x20Text\x20Knowledge\x20Bases:\x20','\x20resources\x20to\x20\x27','Cannot\x20clone\x20from\x20context\x20project\x20\x22','prompts','isNew','force','\x0aChanges\x20to\x20agent\x20\x27','message','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20\x20tdx\x20agent\x20pull\x20','\x0a✔\x20Pulled\x20','errors','profile','agentId','\x22\x20to\x20a\x20different\x20profile','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','Writing\x20files...','New\x20project\x20name\x20is\x20required','\x20\x20Prompts:\x20','cloneProject','Chat:\x20','Analyzing\x20changes\x20to\x20push...','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','tdx.json','reason','-\x20nothing\x20pushed','llm_project','\x0aChanges\x20to\x20integration\x20\x27','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','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)','-\x20no\x20files\x20written','\x0aError:','unchanged','no_local_folder','\x0aProject\x20pushed\x20with\x20errors','Would\x20pull\x20agent:\x20','action','\x20\x20Agents:\x20','Project:\x20','outputDir','join','knowledgeBases','diff','2724084JzYgCW','\x20\x20Agent\x20\x22','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','\x20files?','\x20changed','pushAgent','experimentalArtifacts','Project\x20cloned\x20with\x20errors','\x20\x20Source:\x20','error','Agent\x20pulled\x20successfully','\x20unchanged','\x20\x20Experimental\x20Artifacts:\x20','\x20new','✔\x20Context\x20set:\x20','Errors:','pushProject','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','Using\x20context\x20project:\x20','gray','Dry\x20run\x20-\x20no\x20files\x20written','\x22:\x20','push','llmProject','MISSING_ARGUMENT','\x20\x20Knowledge\x20Base\x20\x22','\x22...','Failed\x20to\x20push\x20agent:\x20','llm','agent:clone','site','\x20\x20Text\x20Knowledge\x20Base\x20\x22','Cloning\x20\x22','Pulling\x20agent\x20\x22','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','Output\x20path:\x20','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','127114XtjvSq','81tThykQ','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','created','Using\x20project\x20from\x20','No\x20tdx.json\x20found\x20in\x20','Cancelled','1568901LCeITW','red','22272PGyMVC','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','\x20--name\x20','dryRun','Status:\x20','\x20=\x20','\x20total','2485aUhaCJ','pullAgent','context','\x20successfully','New\x20project\x20ID:\x20','projectName','agentName','agents','execute','newProjectId','INVALID_ARGUMENT','12yLADDW','\x20updated','arg-dir','Pushing\x20to\x20project...','Output:\x20','newProjectName','4227210RruIzC','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','\x20--profile\x20','Agent\x20','name','dim','updated','\x20\x20Target:\x20','projectId','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Clone\x20\x22','projectDir','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','\x22\x20to\x20new\x20project\x20\x22','counts','cwd','sourceProjectName','Using\x20current\x20project:\x20','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\x20\x20Integration\x20\x22','\x20\x20Integrations:\x20','Using\x20project\x20from\x20context:\x20','no_context','agent:push','\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','repeat','cyan','integrations','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','Using\x20project:\x20','outputPath','description','\x0aChanges:','\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)','3402450dibqYT','Source:\x20','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','session','pullProject','97400OFUFaw','\x20\x20Experimental\x20Artifact\x20\x22','agent.yml','Using\x20local\x20project:\x20','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','\x22\x20to\x20\x22','\x20created','yellow','Would\x20clone:','utf-8','\x0aErrors\x20found:','Would\x20push\x20agent:\x20','\x20|\x20','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','\x0aPush\x20','log','new','yes','\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','green','\x20errors','\x0aPull\x20summary\x20for\x20\x27'];a4_0x1088=function(){return _0x3e53f8;};return a4_0x1088();}import a4_0x30a017 from'chalk';import a4_0x27fc33 from'path';import{existsSync,readFileSync}from'fs';function a4_0x164f(_0x5c1609,_0x29de97){_0x5c1609=_0x5c1609-0x195;const _0x1088d0=a4_0x1088();let _0x164f1e=_0x1088d0[_0x5c1609];return _0x164f1e;}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(_0x46eca8){const _0x51d16e=a4_0x164f,_0x540463=[];if(_0x46eca8[_0x51d16e(0x19d)]!==undefined)_0x540463['push'](_0x46eca8[_0x51d16e(0x19d)]+_0x51d16e(0x200));if(_0x46eca8[_0x51d16e(0x249)]!==undefined&&_0x46eca8[_0x51d16e(0x249)]>0x0)_0x540463[_0x51d16e(0x1e1)](a4_0x30a017['green'](_0x46eca8[_0x51d16e(0x249)]+_0x51d16e(0x1d8)));if(_0x46eca8['created']!==undefined&&_0x46eca8[_0x51d16e(0x1f4)]>0x0)_0x540463[_0x51d16e(0x1e1)](a4_0x30a017['green'](_0x46eca8[_0x51d16e(0x1f4)]+_0x51d16e(0x23f)));if(_0x46eca8[_0x51d16e(0x218)]!==undefined&&_0x46eca8['updated']>0x0)_0x540463[_0x51d16e(0x1e1)](a4_0x30a017[_0x51d16e(0x240)](_0x46eca8['updated']+_0x51d16e(0x20d)));if(_0x46eca8['unchanged']!==undefined&&_0x46eca8[_0x51d16e(0x1c0)]>0x0)_0x540463[_0x51d16e(0x1e1)](a4_0x30a017[_0x51d16e(0x1de)](_0x46eca8[_0x51d16e(0x1c0)]+_0x51d16e(0x1d6)));if(_0x46eca8[_0x51d16e(0x1ab)]!==undefined&&_0x46eca8['errors']>0x0)_0x540463[_0x51d16e(0x1e1)](a4_0x30a017['red'](_0x46eca8[_0x51d16e(0x1ab)]+_0x51d16e(0x24d)));return _0x540463[_0x51d16e(0x1c8)](',\x20');}function displayDiffs(_0x149ef5,_0x5b1390,_0x1e593c,_0x2cab6a,_0x38dba3,_0x221c9e,_0x509457){const _0x31ca4c=a4_0x164f;for(const _0xc78617 of _0x149ef5){if(_0xc78617[_0x31ca4c(0x1ca)]){const _0x292ade=_0xc78617[_0x31ca4c(0x207)]||_0xc78617[_0x31ca4c(0x216)];console[_0x31ca4c(0x248)](_0x31ca4c(0x1a6)+_0x292ade+'\x27:'),console[_0x31ca4c(0x248)]('─'[_0x31ca4c(0x22b)](0x3c)),console[_0x31ca4c(0x248)](_0xc78617['diff']),console[_0x31ca4c(0x248)]('─'[_0x31ca4c(0x22b)](0x3c));}}for(const _0x37ba43 of _0x5b1390){_0x37ba43[_0x31ca4c(0x1ca)]&&(console['log'](_0x31ca4c(0x246)+_0x37ba43[_0x31ca4c(0x216)]+'\x27:'),console['log']('─'[_0x31ca4c(0x22b)](0x3c)),console[_0x31ca4c(0x248)](_0x37ba43['diff']),console['log']('─'['repeat'](0x3c)));}for(const _0x25ef95 of _0x1e593c){_0x25ef95['diff']&&(console[_0x31ca4c(0x248)](_0x31ca4c(0x1f0)+_0x25ef95[_0x31ca4c(0x216)]+'\x27:'),console[_0x31ca4c(0x248)]('─'[_0x31ca4c(0x22b)](0x3c)),console['log'](_0x25ef95[_0x31ca4c(0x1ca)]),console[_0x31ca4c(0x248)]('─'['repeat'](0x3c)));}for(const _0x4b170b of _0x2cab6a){_0x4b170b[_0x31ca4c(0x1ca)]&&(console[_0x31ca4c(0x248)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x4b170b[_0x31ca4c(0x216)]+'\x27:'),console[_0x31ca4c(0x248)]('─'[_0x31ca4c(0x22b)](0x3c)),console['log'](_0x4b170b['diff']),console[_0x31ca4c(0x248)]('─'['repeat'](0x3c)));}for(const _0x64e41b of _0x38dba3){_0x64e41b[_0x31ca4c(0x1ca)]&&(console[_0x31ca4c(0x248)](_0x31ca4c(0x1bb)+_0x64e41b[_0x31ca4c(0x216)]+'\x27:'),console[_0x31ca4c(0x248)]('─'[_0x31ca4c(0x22b)](0x3c)),console[_0x31ca4c(0x248)](_0x64e41b[_0x31ca4c(0x1ca)]),console[_0x31ca4c(0x248)]('─'[_0x31ca4c(0x22b)](0x3c)));}for(const _0x325fdc of _0x221c9e){_0x325fdc['diff']&&(console[_0x31ca4c(0x248)]('\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27'+_0x325fdc[_0x31ca4c(0x216)]+'\x27:'),console[_0x31ca4c(0x248)]('─'['repeat'](0x3c)),console[_0x31ca4c(0x248)](_0x325fdc[_0x31ca4c(0x1ca)]),console[_0x31ca4c(0x248)]('─'[_0x31ca4c(0x22b)](0x3c)));}for(const _0x45602f of _0x509457){_0x45602f[_0x31ca4c(0x1ca)]&&(console[_0x31ca4c(0x248)]('\x0aChanges\x20to\x20experimental\x20artifact\x20\x27'+_0x45602f['name']+'\x27:'),console[_0x31ca4c(0x248)]('─'['repeat'](0x3c)),console[_0x31ca4c(0x248)](_0x45602f[_0x31ca4c(0x1ca)]),console['log']('─'[_0x31ca4c(0x22b)](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']='agent:pull';['description']='Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files';async[a4_0x1b5248(0x209)](_0x502ef8){const _0x1263b1=a4_0x1b5248,{options:_0x450f02,args:_0x32e4e7,tdx:_0x45efba}=_0x502ef8,_0xb2586=_0x32e4e7[0x0],_0x5afa32=_0x32e4e7[0x1],_0x4e6f81=_0x450f02[_0x1263b1(0x196)],_0x21b230=_0x450f02[_0x1263b1(0x1fd)],_0x534842=_0x450f02[_0x1263b1(0x1a5)],_0x3aec86=_0x450f02[_0x1263b1(0x24a)],_0x47914d=_0x450f02[_0x1263b1(0x1e2)],_0x49c96b=_0x450f02['agent'];let _0x3fd22b;if(_0xb2586){const _0x250d5e=a4_0x27fc33[_0x1263b1(0x1c8)](_0xb2586,_0x1263b1(0x1b7));if(existsSync(_0x250d5e))try{const _0x3da4cc=JSON['parse'](readFileSync(_0x250d5e,'utf-8'));_0x3da4cc['llm_project']&&(_0x3fd22b={'llm_project':_0x3da4cc[_0x1263b1(0x1ba)]});}catch{}}const _0x16a2eb=findAgentConfigPath(process['cwd']());let _0x1a76cc;if(_0x16a2eb)try{const _0x422b8d=JSON['parse'](readFileSync(_0x16a2eb,_0x1263b1(0x242)));_0x422b8d[_0x1263b1(0x1ba)]&&(_0x1a76cc={'llm_project':_0x422b8d[_0x1263b1(0x1ba)]});}catch{}const _0x34db2f=resolveAgentPullArgs({'arg':_0xb2586,'agentNameArg':_0x5afa32,'agentFlag':_0x49c96b,'contextProject':_0x47914d,'argDirConfig':_0x3fd22b,'cwdConfigPath':_0x16a2eb||undefined,'cwdConfig':_0x1a76cc}),{projectNameOrId:_0x2227eb,targetAgentName:_0x3884f3,existingOutputDir:_0x415d47,source:_0x3ae08e}=_0x34db2f;if(_0x3ae08e===_0x1263b1(0x20e))console[_0x1263b1(0x248)](a4_0x30a017['dim'](_0x1263b1(0x1f5)+a4_0x27fc33[_0x1263b1(0x1c8)](_0xb2586,_0x1263b1(0x1b7))+':\x20'+_0x2227eb));else{if(_0x3ae08e==='cwd-config')console['log'](a4_0x30a017['dim'](_0x1263b1(0x22f)+_0x2227eb));else _0x3ae08e===_0x1263b1(0x203)&&console[_0x1263b1(0x248)](a4_0x30a017[_0x1263b1(0x217)](_0x1263b1(0x227)+_0x2227eb));}if(!_0x2227eb)return _0x49c96b?(console[_0x1263b1(0x248)](a4_0x30a017[_0x1263b1(0x240)](_0x1263b1(0x236))),console[_0x1263b1(0x248)](_0x1263b1(0x1cd)),console[_0x1263b1(0x248)](_0x1263b1(0x1ed))):(console[_0x1263b1(0x248)](a4_0x30a017[_0x1263b1(0x240)](_0x1263b1(0x1bc))),console[_0x1263b1(0x248)](_0x1263b1(0x1bd)),console[_0x1263b1(0x248)](_0x1263b1(0x24b)),console[_0x1263b1(0x248)](_0x1263b1(0x22a)),console[_0x1263b1(0x248)]('\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[_0x1263b1(0x248)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20project')),0x1;if(_0x3884f3){const {data:_0xc02a1}=await withSpinner(_0x1263b1(0x1ec)+_0x3884f3+'\x22\x20from\x20project\x20\x22'+_0x2227eb+_0x1263b1(0x1e5),()=>_0x45efba[_0x1263b1(0x1e7)][_0x1263b1(0x202)](_0x2227eb,_0x3884f3,_0x4e6f81,{'dryRun':_0x21b230,'force':_0x534842}));if(_0x21b230)return console[_0x1263b1(0x248)](a4_0x30a017['yellow'](_0x1263b1(0x1df))),console['log'](_0x1263b1(0x1c3)+_0xc02a1[_0x1263b1(0x207)]),console['log'](_0x1263b1(0x1ef)+_0xc02a1[_0x1263b1(0x230)]),_0xc02a1[_0x1263b1(0x1ca)]&&(console[_0x1263b1(0x248)](_0x1263b1(0x232)),console[_0x1263b1(0x248)]('─'[_0x1263b1(0x22b)](0x3c)),console['log'](_0xc02a1['diff']),console[_0x1263b1(0x248)]('─'['repeat'](0x3c))),0x0;return console['log'](a4_0x30a017['green'](_0x1263b1(0x1d5))),console['log']('Agent:\x20'+_0xc02a1[_0x1263b1(0x207)]),console[_0x1263b1(0x248)](_0x1263b1(0x210)+_0xc02a1['outputPath']),console[_0x1263b1(0x248)](_0x1263b1(0x1fe)+(_0xc02a1[_0x1263b1(0x1a4)]?a4_0x30a017['green'](_0x1263b1(0x249)):_0xc02a1['hasChanges']?a4_0x30a017[_0x1263b1(0x240)](_0x1263b1(0x218)):a4_0x30a017['gray'](_0x1263b1(0x1c0)))),0x0;}const _0x45d87c=_0x415d47||_0x4e6f81,{data:_0x4d73b6}=await withSpinner('Analyzing\x20project\x20\x22'+_0x2227eb+_0x1263b1(0x1e5),()=>_0x45efba[_0x1263b1(0x1e7)][_0x1263b1(0x238)](_0x2227eb,_0x45d87c,{'dryRun':!![]})),_0x2e32fd=_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x208)][_0x1263b1(0x249)]+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1c9)][_0x1263b1(0x249)]+_0x4d73b6['counts']['textKnowledgeBases']['new']+_0x4d73b6[_0x1263b1(0x220)]['prompts'][_0x1263b1(0x249)]+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x22d)][_0x1263b1(0x249)]+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x19c)]['new']+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1d1)][_0x1263b1(0x249)],_0x2da48d=_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x208)]['updated']+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1c9)]['updated']+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x19b)][_0x1263b1(0x218)]+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1a3)][_0x1263b1(0x218)]+_0x4d73b6['counts'][_0x1263b1(0x22d)][_0x1263b1(0x218)]+_0x4d73b6[_0x1263b1(0x220)]['experimentalKnowledgeBases'][_0x1263b1(0x218)]+_0x4d73b6[_0x1263b1(0x220)]['experimentalArtifacts']['updated'],_0x5bdcc1=_0x4d73b6['counts'][_0x1263b1(0x208)]['unchanged']+_0x4d73b6['counts'][_0x1263b1(0x1c9)]['unchanged']+_0x4d73b6['counts'][_0x1263b1(0x19b)]['unchanged']+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1a3)][_0x1263b1(0x1c0)]+_0x4d73b6['counts'][_0x1263b1(0x22d)][_0x1263b1(0x1c0)]+_0x4d73b6[_0x1263b1(0x220)]['experimentalKnowledgeBases'][_0x1263b1(0x1c0)]+_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1d1)][_0x1263b1(0x1c0)];console['log'](_0x1263b1(0x24e)+_0x4d73b6[_0x1263b1(0x206)]+'\x27:'),console[_0x1263b1(0x248)]('\x20\x20'+a4_0x30a017[_0x1263b1(0x24c)]('+\x20'+_0x2e32fd+_0x1263b1(0x1d8))+_0x1263b1(0x245)+a4_0x30a017['yellow']('~\x20'+_0x2da48d+'\x20changed')+'\x20|\x20'+a4_0x30a017['dim']('=\x20'+_0x5bdcc1+'\x20unchanged')),console['log'](_0x1263b1(0x1c5)+formatCountSummary(_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x208)])),console[_0x1263b1(0x248)](_0x1263b1(0x195)+formatCountSummary(_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1c9)])),console[_0x1263b1(0x248)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x19b)])),console['log'](_0x1263b1(0x1b2)+formatCountSummary(_0x4d73b6['counts'][_0x1263b1(0x1a3)])),console['log'](_0x1263b1(0x226)+formatCountSummary(_0x4d73b6[_0x1263b1(0x220)]['integrations']));const _0x29a438=_0x4d73b6['counts'][_0x1263b1(0x19c)]['total']>0x0||_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1d1)]['total']>0x0;_0x29a438&&(console[_0x1263b1(0x248)](_0x1263b1(0x213)+formatCountSummary(_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x19c)])),console[_0x1263b1(0x248)](_0x1263b1(0x1d7)+formatCountSummary(_0x4d73b6[_0x1263b1(0x220)][_0x1263b1(0x1d1)])));console['log'](_0x1263b1(0x219)+a4_0x30a017[_0x1263b1(0x22c)](_0x4d73b6[_0x1263b1(0x1c7)])),displayDiffs(_0x4d73b6[_0x1263b1(0x208)],_0x4d73b6[_0x1263b1(0x1c9)],_0x4d73b6['textKnowledgeBases'],_0x4d73b6[_0x1263b1(0x1a3)],_0x4d73b6[_0x1263b1(0x22d)],_0x4d73b6[_0x1263b1(0x19c)],_0x4d73b6[_0x1263b1(0x1d1)]);if(_0x21b230)return console[_0x1263b1(0x248)](a4_0x30a017[_0x1263b1(0x240)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x2e32fd===0x0&&_0x2da48d===0x0)return console['log'](a4_0x30a017[_0x1263b1(0x24c)]('\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'llm_project':_0x4d73b6[_0x1263b1(0x206)]},_0x450f02[_0x1263b1(0x237)]),console[_0x1263b1(0x248)](a4_0x30a017[_0x1263b1(0x24c)](_0x1263b1(0x1d9)+a4_0x30a017['dim'](_0x1263b1(0x1ba))+'\x20=\x20'+a4_0x30a017[_0x1263b1(0x22c)](_0x4d73b6[_0x1263b1(0x206)]))),0x0;if(!_0x3aec86&&!_0x534842){if(!isInteractive())return console['error'](a4_0x30a017['red'](_0x1263b1(0x1bf)),_0x1263b1(0x21b)),console[_0x1263b1(0x1d4)](a4_0x30a017[_0x1263b1(0x217)](_0x1263b1(0x1a8))),0x1;const _0x129003=await confirmKey(_0x1263b1(0x19a)+(_0x2e32fd+_0x2da48d)+_0x1263b1(0x1ce));if(!_0x129003)return console[_0x1263b1(0x248)](a4_0x30a017[_0x1263b1(0x240)](_0x1263b1(0x1f7)),_0x1263b1(0x1be)),0x1;}const {data:_0xb5a8f0}=await withSpinner(_0x1263b1(0x1b0),()=>_0x45efba[_0x1263b1(0x1e7)][_0x1263b1(0x238)](_0x2227eb,_0x45d87c,{'force':_0x534842}));return console['log'](a4_0x30a017['green'](_0x1263b1(0x1aa)+(_0x2e32fd+_0x2da48d)+'\x20files\x20to\x20'+_0xb5a8f0[_0x1263b1(0x1c7)])),saveSessionContext({'llm_project':_0xb5a8f0[_0x1263b1(0x206)]},_0x450f02[_0x1263b1(0x237)]),console[_0x1263b1(0x248)](a4_0x30a017[_0x1263b1(0x24c)](_0x1263b1(0x1d9)+a4_0x30a017[_0x1263b1(0x217)](_0x1263b1(0x1ba))+_0x1263b1(0x1ff)+a4_0x30a017[_0x1263b1(0x22c)](_0xb5a8f0['projectName']))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x1b5248(0x216)]=a4_0x1b5248(0x1e8);[a4_0x1b5248(0x231)]=a4_0x1b5248(0x22e);async['execute'](_0xcb2227){const _0x4c4061=a4_0x1b5248,{options:_0x3424c8,args:_0x374159,tdx:_0x4a222c}=_0xcb2227,_0x287dcf=_0x374159[0x0],_0xb94cbf=_0x3424c8[_0x4c4061(0x216)],_0x1b0e0e=_0x3424c8['dryRun'],_0x2b56c8=_0x3424c8[_0x4c4061(0x24a)],_0x49ef3a=_0x3424c8[_0x4c4061(0x1e9)],_0x13dc95=_0x3424c8['llmProject'];let _0x250fdf;const _0x123eff=findAgentConfigPath(process[_0x4c4061(0x221)]());if(_0x287dcf){const _0x56865d=a4_0x27fc33[_0x4c4061(0x1c8)](_0x287dcf,_0x4c4061(0x1b7));existsSync(_0x56865d)?(_0x250fdf=_0x287dcf,console[_0x4c4061(0x248)](a4_0x30a017['dim'](_0x4c4061(0x23c)+_0x287dcf))):_0x250fdf=_0x287dcf;}else{if(_0x123eff)_0x250fdf=a4_0x27fc33['dirname'](_0x123eff),console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x217)](_0x4c4061(0x223)+_0x250fdf));else{if(_0x13dc95){const _0xf371b3=sanitizeForFilesystem(_0x13dc95);let _0x184738=_0xf371b3,_0x34c7d0=a4_0x27fc33[_0x4c4061(0x1c8)](process['cwd'](),_0x4c4061(0x208),_0xf371b3,_0x4c4061(0x1b7));if(!existsSync(_0x34c7d0)){const _0x23ad7f=normalizeName(_0x13dc95),_0x49834c=a4_0x27fc33[_0x4c4061(0x1c8)](process[_0x4c4061(0x221)](),_0x4c4061(0x208),_0x23ad7f,_0x4c4061(0x1b7));existsSync(_0x49834c)&&(_0x184738=_0x23ad7f,_0x34c7d0=_0x49834c);}if(existsSync(_0x34c7d0))_0x250fdf=a4_0x27fc33['dirname'](_0x34c7d0),console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x217)]('Using\x20local\x20project:\x20'+_0x250fdf));else{const _0x115c2c=_0x3424c8[_0x4c4061(0x1ac)];if(_0x115c2c)throw new SDKError(ErrorCode[_0x4c4061(0x20b)],_0x4c4061(0x1a2)+_0x13dc95+_0x4c4061(0x1ae),undefined,{'helpText':_0x4c4061(0x1dc)+_0x4c4061(0x1f3)+(_0x4c4061(0x1a9)+_0x13dc95+'\x0a')+('\x20\x20tdx\x20agent\x20clone\x20agents/'+_0x184738+_0x4c4061(0x1fc)+(_0xb94cbf||'<new-name>')+_0x4c4061(0x214)+_0x115c2c)});_0x250fdf=_0x13dc95,console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x217)](_0x4c4061(0x1dd)+_0x13dc95));}}}}if(!_0x250fdf)return console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x240)]('No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a')),console[_0x4c4061(0x248)](_0x4c4061(0x224)),console[_0x4c4061(0x248)](_0x4c4061(0x1af)),console['log'](_0x4c4061(0x233)),console[_0x4c4061(0x248)](_0x4c4061(0x1fb)),0x1;if(!_0xb94cbf)throw new SDKError(ErrorCode[_0x4c4061(0x1e3)],_0x4c4061(0x1b1),undefined,{'helpText':'Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>'});if(!_0x2b56c8&&!_0x1b0e0e){if(!isInteractive())return console[_0x4c4061(0x1d4)](a4_0x30a017[_0x4c4061(0x1f9)](_0x4c4061(0x1bf)),_0x4c4061(0x21b)),console['error'](a4_0x30a017[_0x4c4061(0x217)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x15a910=await confirmKey(_0x4c4061(0x21c)+_0x250fdf+_0x4c4061(0x21f)+_0xb94cbf+'\x22?');if(!_0x15a910)return console['log'](a4_0x30a017[_0x4c4061(0x240)](_0x4c4061(0x1f7))),0x1;}const {data:_0x5436f8}=await withSpinner(_0x4c4061(0x1eb)+_0x250fdf+_0x4c4061(0x23e)+_0xb94cbf+'\x22...',()=>_0x4a222c[_0x4c4061(0x1e7)][_0x4c4061(0x1b3)](_0x250fdf,_0xb94cbf,{'dryRun':_0x1b0e0e}));if(_0x1b0e0e){console['log'](a4_0x30a017[_0x4c4061(0x240)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x4c4061(0x248)](_0x4c4061(0x235)+_0x5436f8[_0x4c4061(0x222)]),console['log'](_0x4c4061(0x198)+_0xb94cbf),console[_0x4c4061(0x248)](_0x4c4061(0x241)),console[_0x4c4061(0x248)](_0x4c4061(0x1c5)+_0x5436f8['counts'][_0x4c4061(0x208)][_0x4c4061(0x1f4)]),console[_0x4c4061(0x248)](_0x4c4061(0x195)+_0x5436f8['counts'][_0x4c4061(0x1c9)][_0x4c4061(0x1f4)]),console['log'](_0x4c4061(0x1b2)+_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1a3)][_0x4c4061(0x1f4)]);const _0x1b24a4=_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x19c)][_0x4c4061(0x1f4)]>0x0||_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1d1)][_0x4c4061(0x1f4)]>0x0;return _0x1b24a4&&(console['log'](_0x4c4061(0x213)+_0x5436f8[_0x4c4061(0x220)]['experimentalKnowledgeBases']['created']),console['log'](_0x4c4061(0x1d7)+_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1d1)]['created'])),0x0;}const _0x2697a2=_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x208)][_0x4c4061(0x1ab)]>0x0||_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1c9)][_0x4c4061(0x1ab)]>0x0||_0x5436f8['counts'][_0x4c4061(0x1a3)][_0x4c4061(0x1ab)]>0x0||_0x5436f8['counts'][_0x4c4061(0x19c)]['errors']>0x0||_0x5436f8[_0x4c4061(0x220)]['experimentalArtifacts'][_0x4c4061(0x1ab)]>0x0;_0x2697a2?console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x240)](_0x4c4061(0x1d2))):console[_0x4c4061(0x248)](a4_0x30a017['green']('Project\x20cloned\x20successfully'));console['log'](_0x4c4061(0x235)+_0x5436f8[_0x4c4061(0x222)]),console[_0x4c4061(0x248)](_0x4c4061(0x198)+_0x5436f8[_0x4c4061(0x211)]),console[_0x4c4061(0x248)](_0x4c4061(0x205)+_0x5436f8[_0x4c4061(0x20a)]),console[_0x4c4061(0x248)](),console[_0x4c4061(0x248)]('Summary:'),console[_0x4c4061(0x248)](_0x4c4061(0x1c5)+formatCountSummary(_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x208)])),console[_0x4c4061(0x248)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1c9)])),console[_0x4c4061(0x248)](_0x4c4061(0x1b2)+formatCountSummary(_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1a3)])),console[_0x4c4061(0x248)](_0x4c4061(0x226)+formatCountSummary(_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x22d)]));const _0x23de76=_0x5436f8[_0x4c4061(0x220)]['experimentalKnowledgeBases'][_0x4c4061(0x1f4)]>0x0||_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x19c)]['updated']>0x0||_0x5436f8[_0x4c4061(0x220)]['experimentalKnowledgeBases'][_0x4c4061(0x1c0)]>0x0||_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1d1)][_0x4c4061(0x1f4)]>0x0||_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1d1)][_0x4c4061(0x218)]>0x0||_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1d1)][_0x4c4061(0x1c0)]>0x0;_0x23de76&&(console[_0x4c4061(0x248)](_0x4c4061(0x213)+formatCountSummary(_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x19c)])),console[_0x4c4061(0x248)]('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x5436f8[_0x4c4061(0x220)][_0x4c4061(0x1d1)])));if(_0x2697a2){console[_0x4c4061(0x248)](),console['log'](a4_0x30a017['red'](_0x4c4061(0x1da)));for(const _0x16aba0 of _0x5436f8[_0x4c4061(0x208)]){_0x16aba0[_0x4c4061(0x1c4)]==='error'&&console[_0x4c4061(0x248)](a4_0x30a017['red'](_0x4c4061(0x1cc)+_0x16aba0['agentName']+_0x4c4061(0x1e0)+_0x16aba0[_0x4c4061(0x1d4)]));}for(const _0x5d2c56 of _0x5436f8[_0x4c4061(0x1c9)]){_0x5d2c56[_0x4c4061(0x1c4)]==='error'&&console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x1f9)](_0x4c4061(0x1e4)+_0x5d2c56[_0x4c4061(0x216)]+_0x4c4061(0x1e0)+_0x5d2c56[_0x4c4061(0x1d4)]));}for(const _0x5ba6a2 of _0x5436f8[_0x4c4061(0x1a3)]){_0x5ba6a2[_0x4c4061(0x1c4)]==='error'&&console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x1f9)](_0x4c4061(0x197)+_0x5ba6a2[_0x4c4061(0x216)]+_0x4c4061(0x1e0)+_0x5ba6a2[_0x4c4061(0x1d4)]));}for(const _0x285554 of _0x5436f8['integrations']){_0x285554['action']===_0x4c4061(0x1d4)&&console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x1f9)](_0x4c4061(0x225)+_0x285554[_0x4c4061(0x216)]+'\x22:\x20'+_0x285554[_0x4c4061(0x1d4)]));}for(const _0x25d7e0 of _0x5436f8[_0x4c4061(0x19c)]){_0x25d7e0['action']===_0x4c4061(0x1d4)&&console[_0x4c4061(0x248)](a4_0x30a017[_0x4c4061(0x1f9)]('\x20\x20Experimental\x20Knowledge\x20Base\x20\x22'+_0x25d7e0[_0x4c4061(0x216)]+_0x4c4061(0x1e0)+_0x25d7e0[_0x4c4061(0x1d4)]));}for(const _0x2e0cfc of _0x5436f8['experimentalArtifacts']){_0x2e0cfc[_0x4c4061(0x1c4)]===_0x4c4061(0x1d4)&&console[_0x4c4061(0x248)](a4_0x30a017['red'](_0x4c4061(0x23a)+_0x2e0cfc['name']+'\x22:\x20'+_0x2e0cfc[_0x4c4061(0x1d4)]));}return 0x1;}console[_0x4c4061(0x248)]();const _0x566a30=getLLMProjectUrl(_0x49ef3a,_0x5436f8[_0x4c4061(0x20a)]);return console[_0x4c4061(0x248)](_0x4c4061(0x1c6)+a4_0x30a017['cyan'](_0x566a30)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']=a4_0x1b5248(0x229);[a4_0x1b5248(0x231)]=a4_0x1b5248(0x21e);async[a4_0x1b5248(0x209)](_0x2860f9){const _0x50f4c3=a4_0x1b5248,{options:_0x552aa9,args:_0x26bd35,tdx:_0xf07f7d}=_0x2860f9;let _0x5a4da8=_0x26bd35[0x0]||process[_0x50f4c3(0x221)]();const _0x343690=_0x552aa9['dryRun'],_0x1e7df1=_0x552aa9[_0x50f4c3(0x1a5)],_0x2b9344=_0x552aa9[_0x50f4c3(0x24a)],_0x5f1650=_0x552aa9[_0x50f4c3(0x1e9)],_0x6e07f7=a4_0x27fc33['join'](_0x5a4da8,_0x50f4c3(0x23b)),_0x20c48b=existsSync(_0x6e07f7);if(_0x20c48b){const {data:_0x3f8d77}=await withSpinner(_0x50f4c3(0x199)+_0x5a4da8+_0x50f4c3(0x1e5),()=>_0xf07f7d[_0x50f4c3(0x1e7)][_0x50f4c3(0x1d0)](_0x5a4da8,{'dryRun':_0x343690,'force':_0x1e7df1}));if(_0x343690)return console['log'](a4_0x30a017[_0x50f4c3(0x240)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x50f4c3(0x248)](_0x50f4c3(0x244)+_0x3f8d77[_0x50f4c3(0x207)]),0x0;if(_0x3f8d77[_0x50f4c3(0x1c4)]===_0x50f4c3(0x1d4))return console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x1f9)](_0x50f4c3(0x1e6)+_0x3f8d77[_0x50f4c3(0x1d4)])),0x1;console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x24c)](_0x50f4c3(0x215)+_0x3f8d77[_0x50f4c3(0x1c4)]+_0x50f4c3(0x204))),console[_0x50f4c3(0x248)]('Agent:\x20'+_0x3f8d77['agentName']);if(_0x3f8d77[_0x50f4c3(0x1ad)]&&_0x3f8d77[_0x50f4c3(0x21a)]){const _0x338190=getLLMAgentChatUrl(_0x5f1650,_0x3f8d77[_0x50f4c3(0x21a)],_0x3f8d77[_0x50f4c3(0x1ad)]);console[_0x50f4c3(0x248)](_0x50f4c3(0x1b4)+a4_0x30a017[_0x50f4c3(0x22c)](_0x338190));}return 0x0;}const _0x406619=_0x552aa9[_0x50f4c3(0x1e2)],_0x8bdd51=resolveProjectFromContext(_0x5a4da8,_0x406619);if(_0x8bdd51['found'])_0x5a4da8=_0x8bdd51[_0x50f4c3(0x21d)],_0x8bdd51['source']==='context'&&console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x217)](_0x50f4c3(0x22f)+_0x5a4da8));else{let _0x265d2d=_0x50f4c3(0x23d);_0x8bdd51[_0x50f4c3(0x1b8)]===_0x50f4c3(0x1c1)&&(_0x265d2d=_0x8bdd51[_0x50f4c3(0x1a7)]+_0x50f4c3(0x1b6)+_0x8bdd51[_0x50f4c3(0x1e2)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');throw new SDKError(ErrorCode[_0x50f4c3(0x20b)],_0x8bdd51[_0x50f4c3(0x1b8)]===_0x50f4c3(0x228)?_0x8bdd51['message']:_0x50f4c3(0x1f6)+_0x5a4da8,undefined,{'helpText':_0x265d2d});}const {data:_0x113d40}=await withSpinner(_0x50f4c3(0x1b5),()=>_0xf07f7d[_0x50f4c3(0x1e7)]['pushProject'](_0x5a4da8,{'dryRun':!![]})),_0x45f9f8=_0x113d40[_0x50f4c3(0x220)]['agents']['errors']>0x0;if(_0x45f9f8){console['log'](a4_0x30a017['red'](_0x50f4c3(0x243)));for(const _0x5f47d8 of _0x113d40['agents']){_0x5f47d8['action']===_0x50f4c3(0x1d4)&&console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x1f9)](_0x50f4c3(0x1cc)+_0x5f47d8[_0x50f4c3(0x207)]+_0x50f4c3(0x1e0)+_0x5f47d8['error']));}return 0x1;}const _0x4610aa=_0x113d40['counts'][_0x50f4c3(0x208)]['created']+_0x113d40['counts']['knowledgeBases']['created']+_0x113d40[_0x50f4c3(0x220)]['textKnowledgeBases'][_0x50f4c3(0x1f4)]+_0x113d40[_0x50f4c3(0x220)]['prompts']['created']+_0x113d40[_0x50f4c3(0x220)]['integrations'][_0x50f4c3(0x1f4)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x19c)][_0x50f4c3(0x1f4)]+_0x113d40[_0x50f4c3(0x220)]['experimentalArtifacts'][_0x50f4c3(0x1f4)],_0x2d5d8a=_0x113d40[_0x50f4c3(0x220)]['agents'][_0x50f4c3(0x218)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1c9)][_0x50f4c3(0x218)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x19b)][_0x50f4c3(0x218)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1a3)][_0x50f4c3(0x218)]+_0x113d40['counts']['integrations'][_0x50f4c3(0x218)]+_0x113d40[_0x50f4c3(0x220)]['experimentalKnowledgeBases'][_0x50f4c3(0x218)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1d1)]['updated'],_0x20eda6=_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x208)][_0x50f4c3(0x1c0)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1c9)]['unchanged']+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x19b)][_0x50f4c3(0x1c0)]+_0x113d40['counts'][_0x50f4c3(0x1a3)][_0x50f4c3(0x1c0)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x22d)]['unchanged']+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x19c)][_0x50f4c3(0x1c0)]+_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1d1)][_0x50f4c3(0x1c0)];console[_0x50f4c3(0x248)](_0x50f4c3(0x19f)+_0x113d40[_0x50f4c3(0x206)]+'\x27:'),console['log']('\x20\x20'+a4_0x30a017[_0x50f4c3(0x24c)]('+\x20'+_0x4610aa+_0x50f4c3(0x1d8))+'\x20|\x20'+a4_0x30a017[_0x50f4c3(0x240)]('~\x20'+_0x2d5d8a+_0x50f4c3(0x1cf))+_0x50f4c3(0x245)+a4_0x30a017[_0x50f4c3(0x217)]('=\x20'+_0x20eda6+_0x50f4c3(0x1d6))),console['log']('\x20\x20Agents:\x20'+formatCountSummary(_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x208)])),console[_0x50f4c3(0x248)](_0x50f4c3(0x195)+formatCountSummary(_0x113d40[_0x50f4c3(0x220)]['knowledgeBases'])),console['log'](_0x50f4c3(0x1a0)+formatCountSummary(_0x113d40[_0x50f4c3(0x220)]['textKnowledgeBases'])),console['log'](_0x50f4c3(0x1b2)+formatCountSummary(_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1a3)])),console[_0x50f4c3(0x248)](_0x50f4c3(0x226)+formatCountSummary(_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x22d)]));const _0x4deff8=_0x113d40['counts']['experimentalKnowledgeBases'][_0x50f4c3(0x1f4)]>0x0||_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x19c)][_0x50f4c3(0x218)]>0x0||_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x19c)]['unchanged']>0x0||_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1d1)][_0x50f4c3(0x1f4)]>0x0||_0x113d40['counts'][_0x50f4c3(0x1d1)][_0x50f4c3(0x218)]>0x0||_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1d1)]['unchanged']>0x0;_0x4deff8&&(console['log'](_0x50f4c3(0x213)+formatCountSummary(_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x19c)])),console[_0x50f4c3(0x248)](_0x50f4c3(0x1d7)+formatCountSummary(_0x113d40[_0x50f4c3(0x220)][_0x50f4c3(0x1d1)])));console[_0x50f4c3(0x248)](_0x50f4c3(0x1d3)+a4_0x30a017['cyan'](_0x5a4da8)),displayDiffs(_0x113d40[_0x50f4c3(0x208)],_0x113d40[_0x50f4c3(0x1c9)],_0x113d40[_0x50f4c3(0x19b)],_0x113d40[_0x50f4c3(0x1a3)],_0x113d40[_0x50f4c3(0x22d)],_0x113d40['experimentalKnowledgeBases'],_0x113d40['experimentalArtifacts']);if(_0x343690)return console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x240)]('\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed')),0x0;if(_0x4610aa===0x0&&_0x2d5d8a===0x0){console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x24c)](_0x50f4c3(0x1ee)));const _0x1c088b=getLLMProjectUrl(_0x5f1650,_0x113d40[_0x50f4c3(0x21a)]);return console[_0x50f4c3(0x248)](_0x50f4c3(0x1c6)+a4_0x30a017['cyan'](_0x1c088b)),0x0;}if(!_0x2b9344&&!_0x1e7df1){if(!isInteractive())return console[_0x50f4c3(0x1d4)](a4_0x30a017['red'](_0x50f4c3(0x1bf)),_0x50f4c3(0x21b)),console[_0x50f4c3(0x1d4)](a4_0x30a017[_0x50f4c3(0x217)](_0x50f4c3(0x1a8))),0x1;const _0x389f22=await confirmKey(_0x50f4c3(0x247)+(_0x4610aa+_0x2d5d8a)+_0x50f4c3(0x19e));if(!_0x389f22)return console[_0x50f4c3(0x248)](a4_0x30a017['yellow']('Cancelled'),_0x50f4c3(0x1b9)),0x1;}const {data:_0x45aeee}=await withSpinner(_0x50f4c3(0x20f),()=>_0xf07f7d['llm'][_0x50f4c3(0x1db)](_0x5a4da8,{'force':_0x1e7df1})),_0x899f9e=_0x45aeee[_0x50f4c3(0x220)][_0x50f4c3(0x208)][_0x50f4c3(0x1ab)]>0x0||_0x45aeee['counts'][_0x50f4c3(0x1c9)][_0x50f4c3(0x1ab)]>0x0||_0x45aeee[_0x50f4c3(0x220)][_0x50f4c3(0x19b)]['errors']>0x0||_0x45aeee[_0x50f4c3(0x220)][_0x50f4c3(0x1a3)][_0x50f4c3(0x1ab)]>0x0;if(_0x899f9e){console[_0x50f4c3(0x248)](a4_0x30a017['yellow'](_0x50f4c3(0x1c2))),console['log'](),console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x1f9)](_0x50f4c3(0x1da)));for(const _0x3a8b39 of _0x45aeee[_0x50f4c3(0x208)]){_0x3a8b39[_0x50f4c3(0x1c4)]===_0x50f4c3(0x1d4)&&console['log'](a4_0x30a017[_0x50f4c3(0x1f9)](_0x50f4c3(0x1cc)+_0x3a8b39['agentName']+'\x22:\x20'+_0x3a8b39[_0x50f4c3(0x1d4)]));}for(const _0x5d4102 of _0x45aeee[_0x50f4c3(0x1c9)]){_0x5d4102['action']==='error'&&console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x1f9)](_0x50f4c3(0x1e4)+_0x5d4102[_0x50f4c3(0x216)]+_0x50f4c3(0x1e0)+_0x5d4102['error']));}for(const _0x263940 of _0x45aeee[_0x50f4c3(0x19b)]){_0x263940[_0x50f4c3(0x1c4)]===_0x50f4c3(0x1d4)&&console['log'](a4_0x30a017[_0x50f4c3(0x1f9)](_0x50f4c3(0x1ea)+_0x263940[_0x50f4c3(0x216)]+_0x50f4c3(0x1e0)+_0x263940[_0x50f4c3(0x1d4)]));}for(const _0x558b71 of _0x45aeee[_0x50f4c3(0x1a3)]){_0x558b71[_0x50f4c3(0x1c4)]==='error'&&console[_0x50f4c3(0x248)](a4_0x30a017['red'](_0x50f4c3(0x197)+_0x558b71[_0x50f4c3(0x216)]+'\x22:\x20'+_0x558b71['error']));}for(const _0xf35aa2 of _0x45aeee['integrations']){_0xf35aa2[_0x50f4c3(0x1c4)]===_0x50f4c3(0x1d4)&&console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x1f9)]('\x20\x20Integration\x20\x22'+_0xf35aa2[_0x50f4c3(0x216)]+_0x50f4c3(0x1e0)+_0xf35aa2[_0x50f4c3(0x1d4)]));}return 0x1;}console[_0x50f4c3(0x248)](a4_0x30a017[_0x50f4c3(0x24c)]('\x0a✔\x20Pushed\x20'+(_0x4610aa+_0x2d5d8a)+_0x50f4c3(0x1a1)+_0x45aeee['projectName']+'\x27'));const _0x4e475f=getLLMProjectUrl(_0x5f1650,_0x45aeee[_0x50f4c3(0x21a)]);return console[_0x50f4c3(0x248)](_0x50f4c3(0x1c6)+a4_0x30a017[_0x50f4c3(0x22c)](_0x4e475f)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x1cfe9c=a5_0x2229;(function(_0x514efc,_0x56d578){const _0x4d04b3=a5_0x2229,_0x34078e=_0x514efc();while(!![]){try{const _0x381d35=parseInt(_0x4d04b3(0x178))/0x1+parseInt(_0x4d04b3(0x10d))/0x2*(parseInt(_0x4d04b3(0x19a))/0x3)+-parseInt(_0x4d04b3(0x196))/0x4+parseInt(_0x4d04b3(0x175))/0x5*(parseInt(_0x4d04b3(0x18d))/0x6)+-parseInt(_0x4d04b3(0x134))/0x7*(-parseInt(_0x4d04b3(0x121))/0x8)+-parseInt(_0x4d04b3(0x156))/0x9+-parseInt(_0x4d04b3(0x19c))/0xa;if(_0x381d35===_0x56d578)break;else _0x34078e['push'](_0x34078e['shift']());}catch(_0x2fb05c){_0x34078e['push'](_0x34078e['shift']());}}}(a5_0x4b47,0xb90f3));function a5_0x2229(_0x1d20da,_0xeda892){_0x1d20da=_0x1d20da-0x10d;const _0x4b477b=a5_0x4b47();let _0x222943=_0x4b477b[_0x1d20da];return _0x222943;}import*as a5_0x17d003 from'node:fs';import*as a5_0x1d1762 from'node:path';import a5_0x2c1082 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';function a5_0x4b47(){const _0x2bf8a9=['llmProject','Output\x20written\x20to:\x20','toISOString','round','timestamp','132izXfyw','\x20\x20Round\x20','...\x20','No\x20tests\x20found\x20matching:\x20','toLowerCase','PASS','white','Re-evaluation\x20Summary','Project\x20path:\x20','4243448UcpumD','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','Round\x201/','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','2040906OEmEta','reason','7830550aVLlnJ','Using\x20agent:\x20','404','agent:test','start','writeFileSync','output','Test\x20Summary','agentDirs','now','utf-8','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','2mWncmz','Evaluating\x20response...','test.yml','resolveAgentId','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','description','llm','execute','filter','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','push','Round\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','split','Re-evaluating...','Cached\x20run\x20from:\x20','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','testName','\x20-\x20','repeat','336XYsSYI','log','\x20\x20Conversation:\x20','Either\x20switch\x20to\x20the\x20\x22','Duration:\x20','New\x20tests\x20to\x20execute:\x20','dryRun','/<agent-name>','site','testYmlPath','tsv','No\x20tests\x20found\x20with\x20tags:\x20','red','tags','FAIL','yellow','Running\x20test:\x20','stop','agent','223734NDbtBR','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','Passed:\x20\x20\x20','forEach','✗\x20ERROR:\x20','Failed\x20Tests:','length','projectDir','\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','verbose','...',':\x20Sending\x20user\x20input...','projectName','text','executeReeval','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','join','resolveProjectId','jsonl','Site:\x20','cyan','Conversation\x20URL:\x20','Executing\x20new\x20tests...','Test\x20Configuration:','agentName','Error\x20writing\x20output\x20file:\x20','green','Cached\x20run\x20is\x20from\x20site\x20\x22','Running\x20agent\x20tests...','\x20\x20Evaluating...\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','message','trim','basename','5591088jUdxOY','\x22:\x20','Errors:\x20\x20\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','size','table','✓\x20PASS:\x20','substring','map','Re-evaluating\x20cached\x20test\x20run...','Test\x20','source','conversation_url','includes','eval','Running:\x20','dim','reeval','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','Re-evaluating\x20','not\x20found','status','Total:\x20\x20\x20\x20','no_context','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','ERROR','\x20(new)','Error:\x20No\x20previous\x20test\x20run\x20found.','\x20\x20Site:\x20','194755nhDQBY','some','⚠\x20SKIPPED:\x20','343524UkPpon','\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)','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','json','\x20\x20Project:\x20','tests','No\x20tests\x20have\x20tags\x20defined.','rounds','name','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','find','✗\x20FAIL:\x20','Available\x20tests:\x20','context','\x20(cached)','Run\x20\x27tdx\x20agent\x20pull\x20'];a5_0x4b47=function(){return _0x2bf8a9;};return a5_0x4b47();}import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x1cfe9c(0x180)]=a5_0x1cfe9c(0x19f);[a5_0x1cfe9c(0x112)]='Run\x20tests\x20for\x20an\x20LLM\x20agent';async[a5_0x1cfe9c(0x114)](_0x2ee100){const _0x4a82ba=a5_0x1cfe9c,{options:_0xd720f6,args:_0x1e1ead,tdx:_0x22ebf1}=_0x2ee100,_0x2afe95=_0x1e1ead[0x0]||'.',_0x31efda=_0xd720f6[_0x4a82ba(0x127)],_0x4b0c37=_0xd720f6,_0x4e2198=_0x4b0c37[_0x4a82ba(0x164)]===![],_0x373d6e=_0x4b0c37[_0x4a82ba(0x167)],_0x36eefe=_0x4b0c37[_0x4a82ba(0x180)],_0x2bf5d3=_0x4b0c37[_0x4a82ba(0x12e)],_0x5d9e0a=_0xd720f6[_0x4a82ba(0x129)],_0x5e4ee8=_0x4b0c37[_0x4a82ba(0x1a2)];if(_0x373d6e&&_0x4e2198)return console[_0x4a82ba(0x122)](a5_0x2c1082['red'](_0x4a82ba(0x199))),0x1;let _0x39c320=_0x4a82ba(0x15b);if(_0x4b0c37[_0x4a82ba(0x17b)])_0x39c320=_0x4a82ba(0x17b);else{if(_0x4b0c37[_0x4a82ba(0x146)])_0x39c320=_0x4a82ba(0x146);else{if(_0x4b0c37[_0x4a82ba(0x12b)])_0x39c320=_0x4a82ba(0x12b);else{if(_0x4b0c37[_0x4a82ba(0x15b)])_0x39c320=_0x4a82ba(0x15b);}}}const _0x1cf194=_0x4b0c37[_0x4a82ba(0x188)];let _0xa7a67f=_0x2afe95;const _0x4f1abb=a5_0x17d003['existsSync'](_0x2afe95),_0xa68f7b=_0x2afe95==='.';if(!_0x4f1abb||_0xa68f7b){const _0x3b6601=resolveProjectFromContext(_0x2afe95,_0x1cf194,{'requireFile':_0x4a82ba(0x10f)});if(_0x3b6601['found'])_0xa7a67f=_0x3b6601[_0x4a82ba(0x13b)],_0x3b6601[_0x4a82ba(0x161)]===_0x4a82ba(0x185)&&console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x166)](_0x4a82ba(0x19d)+_0xa7a67f));else switch(_0x3b6601['reason']){case _0x4a82ba(0x16e):console[_0x4a82ba(0x122)](a5_0x2c1082['yellow'](_0x3b6601[_0x4a82ba(0x153)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)]('Usage:'),console[_0x4a82ba(0x122)](_0x4a82ba(0x13c)),console[_0x4a82ba(0x122)](_0x4a82ba(0x179)),console[_0x4a82ba(0x122)](),console['log'](_0x4a82ba(0x11d));return 0x1;case'no_local_folder':console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x130)](_0x3b6601[_0x4a82ba(0x153)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x4a82ba(0x187)+_0x3b6601[_0x4a82ba(0x188)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');return 0x1;case'multiple_agents':{const _0x23dbf7=a5_0x1d1762[_0x4a82ba(0x155)](_0x3b6601[_0x4a82ba(0x13b)]);console['log'](a5_0x2c1082[_0x4a82ba(0x130)](_0x4a82ba(0x116)+_0x3b6601[_0x4a82ba(0x188)]+'\x22:'));for(const _0x4598ca of _0x3b6601[_0x4a82ba(0x1a4)]){console[_0x4a82ba(0x122)]('\x20\x20-\x20'+_0x4598ca);}return console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x4a82ba(0x170)+_0x23dbf7+_0x4a82ba(0x128)),0x1;}case'no_tests':console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x130)](_0x4a82ba(0x135)+_0x3b6601[_0x4a82ba(0x188)]+'\x22.')),console[_0x4a82ba(0x122)](a5_0x2c1082['dim'](_0x4a82ba(0x195)+_0x3b6601[_0x4a82ba(0x13b)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x4a82ba(0x16f));return 0x1;}}const {definition:_0xbdb5eb,agentInfo:_0x15dda3}=parseTestFile(_0xa7a67f);let _0x1e3240=_0xbdb5eb[_0x4a82ba(0x17d)];if(_0x36eefe){const _0x389458=_0x36eefe[_0x4a82ba(0x11a)](',')[_0x4a82ba(0x15e)](_0x25c5eb=>_0x25c5eb[_0x4a82ba(0x154)]());_0x1e3240=_0xbdb5eb[_0x4a82ba(0x17d)]['filter'](_0x1217b7=>_0x389458['includes'](_0x1217b7[_0x4a82ba(0x180)]));if(_0x1e3240[_0x4a82ba(0x13a)]===0x0)return console[_0x4a82ba(0x122)](a5_0x2c1082['yellow'](_0x4a82ba(0x190)+_0x36eefe)),console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x166)](_0x4a82ba(0x184)+_0xbdb5eb['tests'][_0x4a82ba(0x15e)](_0xcc75ca=>_0xcc75ca[_0x4a82ba(0x180)])[_0x4a82ba(0x144)](',\x20'))),0x1;}if(_0x2bf5d3){const _0xf99d60=_0x2bf5d3[_0x4a82ba(0x11a)](',')[_0x4a82ba(0x15e)](_0x2c2ef6=>_0x2c2ef6[_0x4a82ba(0x154)]()[_0x4a82ba(0x191)]());_0x1e3240=_0x1e3240[_0x4a82ba(0x115)](_0x4c76cd=>_0x4c76cd[_0x4a82ba(0x12e)]?.[_0x4a82ba(0x176)](_0x2e3618=>_0xf99d60[_0x4a82ba(0x163)](_0x2e3618['toLowerCase']())));if(_0x1e3240[_0x4a82ba(0x13a)]===0x0){console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x130)](_0x4a82ba(0x12c)+_0x2bf5d3));const _0xfb9df=new Set();return _0xbdb5eb['tests'][_0x4a82ba(0x137)](_0xce629d=>_0xce629d['tags']?.[_0x4a82ba(0x137)](_0x4b2969=>_0xfb9df['add'](_0x4b2969))),_0xfb9df[_0x4a82ba(0x15a)]>0x0?console['log'](a5_0x2c1082[_0x4a82ba(0x166)]('Available\x20tags:\x20'+[..._0xfb9df][_0x4a82ba(0x144)](',\x20'))):console[_0x4a82ba(0x122)](a5_0x2c1082['dim'](_0x4a82ba(0x17e))),0x1;}}if(_0x373d6e)return this[_0x4a82ba(0x142)](_0x2ee100,{'definition':{'tests':_0x1e3240},'agentInfo':_0x15dda3,'outputFormat':_0x39c320,'outputFile':_0x5e4ee8,'testNames':_0x36eefe});if(_0x31efda){console[_0x4a82ba(0x122)](a5_0x2c1082['cyan'](_0x4a82ba(0x14b))),console['log'](_0x4a82ba(0x174)+a5_0x2c1082['white'](_0x5d9e0a)),console[_0x4a82ba(0x122)](_0x4a82ba(0x17c)+a5_0x2c1082['white'](_0x15dda3[_0x4a82ba(0x140)])),console[_0x4a82ba(0x122)]('\x20\x20Agent:\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x15dda3[_0x4a82ba(0x14c)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)]('Tests\x20found:\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x1e3240['length']));for(let _0x1ce670=0x0;_0x1ce670<_0x1e3240['length'];_0x1ce670++){const _0x3093d8=_0x1e3240[_0x1ce670],_0x10e2a1=_0x3093d8[_0x4a82ba(0x17f)]['length']===0x1?_0x4a82ba(0x18b):_0x4a82ba(0x17f),_0x12ec04=_0x3093d8[_0x4a82ba(0x12e)]?.['length']?'\x20['+_0x3093d8[_0x4a82ba(0x12e)][_0x4a82ba(0x144)](',\x20')+']':'';console[_0x4a82ba(0x122)]('\x20\x20'+(_0x1ce670+0x1)+'.\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x3093d8[_0x4a82ba(0x180)])+'\x20('+_0x3093d8[_0x4a82ba(0x17f)]['length']+'\x20'+_0x10e2a1+')'+a5_0x2c1082[_0x4a82ba(0x166)](_0x12ec04));}return 0x0;}let _0xd2f939,_0x1a2723;try{_0xd2f939=await _0x22ebf1[_0x4a82ba(0x113)][_0x4a82ba(0x145)](_0x15dda3[_0x4a82ba(0x140)]);}catch(_0x35a37b){const _0x3ba0f9=_0x35a37b instanceof Error?_0x35a37b[_0x4a82ba(0x153)]:String(_0x35a37b);return _0x3ba0f9[_0x4a82ba(0x163)](_0x4a82ba(0x19e))||_0x3ba0f9[_0x4a82ba(0x191)]()[_0x4a82ba(0x163)]('not\x20found')?console['log'](a5_0x2c1082[_0x4a82ba(0x12d)]('✗\x20ERROR:\x20Project\x20not\x20found:\x20'+_0x15dda3['projectName'])):console[_0x4a82ba(0x122)](a5_0x2c1082['red'](_0x4a82ba(0x169)+_0x15dda3['projectName']+'\x22:\x20'+_0x3ba0f9)),0x1;}try{_0x1a2723=await _0x22ebf1[_0x4a82ba(0x113)][_0x4a82ba(0x110)](_0x15dda3['agentName'],_0xd2f939);}catch(_0x4369c2){const _0x3def7f=_0x4369c2 instanceof Error?_0x4369c2['message']:String(_0x4369c2);return _0x3def7f[_0x4a82ba(0x163)](_0x4a82ba(0x19e))||_0x3def7f['toLowerCase']()[_0x4a82ba(0x163)](_0x4a82ba(0x16b))?console['log'](a5_0x2c1082['red'](_0x4a82ba(0x197)+_0x15dda3[_0x4a82ba(0x14c)])):console['log'](a5_0x2c1082['red'](_0x4a82ba(0x1a8)+_0x15dda3['agentName']+_0x4a82ba(0x157)+_0x3def7f)),0x1;}let _0x35fe25;if(!_0x4e2198)try{_0x35fe25=await setupEvaluatorAgent(_0x22ebf1[_0x4a82ba(0x113)],_0xd720f6[_0x4a82ba(0x13d)]);}catch(_0xf4cbc8){const _0x29fa0d=_0xf4cbc8 instanceof Error?_0xf4cbc8[_0x4a82ba(0x153)]:String(_0xf4cbc8);return console['log'](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x1a7)+_0x29fa0d)),0x1;}console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x148)](_0x4a82ba(0x150))),console[_0x4a82ba(0x122)](_0x4a82ba(0x147)+a5_0x2c1082[_0x4a82ba(0x193)](_0x5d9e0a)),console[_0x4a82ba(0x122)]('Agent:\x20'+a5_0x2c1082['white'](_0x15dda3['projectName']+'/'+_0x15dda3[_0x4a82ba(0x14c)])),console[_0x4a82ba(0x122)]();const _0x3036f8=[],_0x477b68=[],_0x4ebc89=Date[_0x4a82ba(0x1a5)]();for(let _0x3e0a52=0x0;_0x3e0a52<_0x1e3240[_0x4a82ba(0x13a)];_0x3e0a52++){const _0x102a68=_0x1e3240[_0x3e0a52];_0x1e3240[_0x4a82ba(0x13a)]>0x1?console[_0x4a82ba(0x122)](_0x4a82ba(0x160)+(_0x3e0a52+0x1)+'/'+_0x1e3240[_0x4a82ba(0x13a)]+':\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x102a68[_0x4a82ba(0x180)])):console['log'](_0x4a82ba(0x131)+a5_0x2c1082['white'](_0x102a68[_0x4a82ba(0x180)]));const _0x5782fb=createCommandSpinner(_0x4a82ba(0x198)+_0x102a68[_0x4a82ba(0x17f)]['length']+_0x4a82ba(0x13f));_0x5782fb[_0x4a82ba(0x1a0)]();try{const {result:_0x4c82f2,conversation:_0x30140c}=await runTest(_0x22ebf1[_0x4a82ba(0x113)],_0x102a68,{'agentId':_0x1a2723,'projectId':_0xd2f939,'site':_0x5d9e0a,'noEval':_0x4e2198,'evaluatorId':_0x35fe25,'onRoundStart':(_0x45a8b0,_0x2f862d)=>{const _0x1884cf=_0x4a82ba;_0x5782fb[_0x1884cf(0x141)]=_0x1884cf(0x118)+(_0x45a8b0+0x1)+'/'+_0x2f862d+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x4bd899,_0x1e3250,_0x4c21c1)=>{const _0x485cb0=_0x4a82ba,_0x4cbf9f=formatElapsed(_0x1e3250);_0x4c21c1?console[_0x485cb0(0x122)](_0x485cb0(0x18e)+(_0x4bd899+0x1)+'/'+_0x102a68[_0x485cb0(0x17f)]['length']+_0x485cb0(0x18f)+a5_0x2c1082[_0x485cb0(0x14e)]('✓')+'\x20('+_0x4cbf9f+')'):console['log'](_0x485cb0(0x18e)+(_0x4bd899+0x1)+'/'+_0x102a68[_0x485cb0(0x17f)][_0x485cb0(0x13a)]+_0x485cb0(0x18f)+a5_0x2c1082[_0x485cb0(0x12d)]('✗'));},'onEvaluationStart':()=>{const _0x584d04=_0x4a82ba;_0x5782fb[_0x584d04(0x141)]=_0x584d04(0x10e);},'onEvaluationComplete':_0x2fe46b=>{const _0x4a6995=_0x4a82ba,_0x20e07a=formatElapsed(_0x2fe46b);console[_0x4a6995(0x122)](_0x4a6995(0x151)+a5_0x2c1082[_0x4a6995(0x14e)]('✓')+'\x20('+_0x20e07a+')');}});_0x5782fb[_0x4a82ba(0x132)](),_0x3036f8[_0x4a82ba(0x117)](_0x4c82f2),_0x477b68[_0x4a82ba(0x117)](_0x30140c);if(_0x4c82f2[_0x4a82ba(0x16c)]===_0x4a82ba(0x192))console['log'](a5_0x2c1082[_0x4a82ba(0x14e)](_0x4a82ba(0x15c)+_0x4c82f2[_0x4a82ba(0x19b)]));else _0x4c82f2[_0x4a82ba(0x16c)]===_0x4a82ba(0x12f)?console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x183)+_0x4c82f2['reason'])):console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x138)+_0x4c82f2[_0x4a82ba(0x19b)]));_0x4c82f2[_0x4a82ba(0x162)]&&console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x166)](_0x4a82ba(0x149)+_0x4c82f2[_0x4a82ba(0x162)])),console[_0x4a82ba(0x122)]();}catch(_0x55806d){_0x5782fb[_0x4a82ba(0x132)]();const _0x2d3c9c=_0x55806d instanceof Error?_0x55806d[_0x4a82ba(0x153)]:String(_0x55806d);console[_0x4a82ba(0x122)](a5_0x2c1082['red'](_0x4a82ba(0x138)+_0x2d3c9c)),console['log'](),_0x3036f8[_0x4a82ba(0x117)]({'name':_0x102a68['name'],'status':_0x4a82ba(0x171),'reason':_0x2d3c9c,'timestamp':new Date()[_0x4a82ba(0x18a)](),'duration_ms':0x0});}}const _0x8ea656=Date[_0x4a82ba(0x1a5)]()-_0x4ebc89,_0x5360f6=_0x3036f8[_0x4a82ba(0x115)](_0x5158c3=>_0x5158c3[_0x4a82ba(0x16c)]===_0x4a82ba(0x192))['length'],_0x1572bf=_0x3036f8[_0x4a82ba(0x115)](_0x543ac9=>_0x543ac9[_0x4a82ba(0x16c)]===_0x4a82ba(0x12f))[_0x4a82ba(0x13a)],_0x5f2f24=_0x3036f8['filter'](_0x352256=>_0x352256['status']==='ERROR')[_0x4a82ba(0x13a)];console['log']('━'[_0x4a82ba(0x120)](0x3c)),console[_0x4a82ba(0x122)](_0x4a82ba(0x1a3)),console[_0x4a82ba(0x122)]('━'['repeat'](0x3c)),console['log'](_0x4a82ba(0x16d)+_0x3036f8[_0x4a82ba(0x13a)]),console[_0x4a82ba(0x122)](_0x4a82ba(0x136)+a5_0x2c1082[_0x4a82ba(0x14e)](_0x5360f6)),console[_0x4a82ba(0x122)]('Failed:\x20\x20\x20'+a5_0x2c1082[_0x4a82ba(0x12d)](_0x1572bf));_0x5f2f24>0x0&&console[_0x4a82ba(0x122)]('Errors:\x20\x20\x20'+a5_0x2c1082[_0x4a82ba(0x12d)](_0x5f2f24));console[_0x4a82ba(0x122)](_0x4a82ba(0x125)+formatElapsed(_0x8ea656)),console[_0x4a82ba(0x122)]('━'[_0x4a82ba(0x120)](0x3c));const _0x33d07d=_0x3036f8[_0x4a82ba(0x115)](_0x4ad02b=>_0x4ad02b['status']!==_0x4a82ba(0x192));if(_0x33d07d['length']>0x0){console[_0x4a82ba(0x122)](),console['log'](_0x4a82ba(0x139));for(const _0x4406d9 of _0x33d07d){const _0xa36347=a5_0x2c1082[_0x4a82ba(0x12d)]('✗'),_0x94665d=_0x4406d9['reason'][_0x4a82ba(0x13a)]>0x32?_0x4406d9['reason'][_0x4a82ba(0x15d)](0x0,0x32)+'...':_0x4406d9['reason'];console['log']('\x20\x20'+_0xa36347+'\x20'+_0x4406d9['name']+':\x20'+_0x94665d);}}const _0x438e71={'summary':{'total':_0x3036f8[_0x4a82ba(0x13a)],'passed':_0x5360f6,'failed':_0x1572bf,'errors':_0x5f2f24>0x0?_0x5f2f24:undefined,'duration_ms':_0x8ea656},'tests':_0x3036f8,'agent':{'project':_0x15dda3['projectName'],'name':_0x15dda3[_0x4a82ba(0x14c)],'site':_0x5d9e0a},'timestamp':new Date(_0x4ebc89)[_0x4a82ba(0x18a)]()};try{const _0x593c46=buildCachedTestRun(_0x477b68,{'site':_0x5d9e0a,'projectId':_0xd2f939,'projectName':_0x15dda3[_0x4a82ba(0x140)],'agentId':_0x1a2723,'agentName':_0x15dda3[_0x4a82ba(0x14c)],'testYmlPath':a5_0x1d1762['resolve'](_0x15dda3[_0x4a82ba(0x12a)])});saveLastTestRun(_0x593c46);}catch{}if(_0x39c320!=='table'||_0x5e4ee8){const _0x1bd565=formatResults(_0x438e71,_0x39c320);if(_0x5e4ee8)try{a5_0x17d003[_0x4a82ba(0x1a1)](_0x5e4ee8,_0x1bd565,_0x4a82ba(0x1a6)),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](a5_0x2c1082['dim'](_0x4a82ba(0x189)+_0x5e4ee8));}catch(_0x552b85){return console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x14d)+_0x552b85)),0x1;}else console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x1bd565);}return _0x33d07d[_0x4a82ba(0x13a)]>0x0?0x1:0x0;}async[a5_0x1cfe9c(0x142)](_0x2c2793,_0x1b4d42){const _0x54f87b=a5_0x1cfe9c,{options:_0x195c42,tdx:_0x5295e1}=_0x2c2793,{definition:_0x1ec506,agentInfo:_0x4f4067,outputFormat:_0x14d6e7,outputFile:_0x187442}=_0x1b4d42,_0x4b3cfc=_0x195c42[_0x54f87b(0x129)],_0x5866dc=loadLastTestRun();if(!_0x5866dc)return console['log'](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x173))),console[_0x54f87b(0x122)](a5_0x2c1082['dim'](_0x54f87b(0x119))),0x1;if(_0x5866dc['agent'][_0x54f87b(0x14c)]!==_0x4f4067[_0x54f87b(0x14c)])return console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x143)+_0x5866dc[_0x54f87b(0x133)][_0x54f87b(0x14c)]+_0x54f87b(0x152)+_0x4f4067[_0x54f87b(0x14c)]+'\x22.')),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)](_0x54f87b(0x111))),0x1;const _0x5705ee=new Set(_0x5866dc['conversations']['map'](_0xddbd5e=>_0xddbd5e[_0x54f87b(0x11e)])),_0x309c12=_0x1ec506[_0x54f87b(0x17d)][_0x54f87b(0x115)](_0x30ef1b=>!_0x5705ee['has'](_0x30ef1b[_0x54f87b(0x180)]));if(_0x309c12['length']>0x0&&_0x5866dc[_0x54f87b(0x129)]!==_0x4b3cfc)return console['log'](a5_0x2c1082['red'](_0x54f87b(0x17a))),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)](_0x54f87b(0x14f)+_0x5866dc[_0x54f87b(0x129)]+_0x54f87b(0x159)+_0x4b3cfc+'\x22.')),console[_0x54f87b(0x122)](a5_0x2c1082['dim'](_0x54f87b(0x124)+_0x5866dc[_0x54f87b(0x129)]+_0x54f87b(0x168))),0x1;const _0x4d4922=_0x1ec506[_0x54f87b(0x17d)][_0x54f87b(0x115)](_0x48c204=>_0x5705ee['has'](_0x48c204['name'])),_0x3fae6e=_0x309c12;let _0x50ac59;try{_0x50ac59=await setupEvaluatorAgent(_0x5295e1['llm'],_0x195c42['verbose']);}catch(_0x3aa51b){const _0x53af59=_0x3aa51b instanceof Error?_0x3aa51b[_0x54f87b(0x153)]:String(_0x3aa51b);return console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x53af59)),0x1;}console['log'](a5_0x2c1082[_0x54f87b(0x148)](_0x54f87b(0x15f))),console[_0x54f87b(0x122)](_0x54f87b(0x11c)+a5_0x2c1082[_0x54f87b(0x193)](_0x5866dc[_0x54f87b(0x18c)])),console[_0x54f87b(0x122)]('Agent:\x20'+a5_0x2c1082[_0x54f87b(0x193)](_0x5866dc[_0x54f87b(0x133)][_0x54f87b(0x140)]+'/'+_0x5866dc[_0x54f87b(0x133)]['agentName']));_0x3fae6e[_0x54f87b(0x13a)]>0x0&&console['log'](_0x54f87b(0x126)+a5_0x2c1082[_0x54f87b(0x130)](_0x3fae6e[_0x54f87b(0x13a)]));console['log']();const _0x3c2ed8=[],_0x9151f2=Date[_0x54f87b(0x1a5)](),_0x4306c3=createCommandSpinner(_0x54f87b(0x11b));if(_0x4d4922['length']>0x0)try{const _0x16f719=await reevaluateFromCache(_0x5295e1[_0x54f87b(0x113)],_0x5866dc,{'tests':_0x4d4922},{'evaluatorId':_0x50ac59,'onTestStart':(_0xdda9d1,_0x8d048d,_0x1e7077)=>{const _0x30b798=_0x54f87b;_0x4306c3[_0x30b798(0x141)]=_0x30b798(0x16a)+(_0x8d048d+0x1)+'/'+_0x1e7077+':\x20'+_0xdda9d1+_0x30b798(0x13e);if(!_0x4306c3['isSpinning'])_0x4306c3[_0x30b798(0x1a0)]();},'onTestComplete':(_0x125343,_0x998568)=>{const _0x46b9bf=_0x54f87b;_0x4306c3[_0x46b9bf(0x132)]();if(_0x998568[_0x46b9bf(0x16c)]===_0x46b9bf(0x192))console[_0x46b9bf(0x122)](a5_0x2c1082[_0x46b9bf(0x14e)]('✓\x20PASS:\x20'+_0x125343)+a5_0x2c1082[_0x46b9bf(0x166)](_0x46b9bf(0x186)));else _0x998568[_0x46b9bf(0x16c)]==='FAIL'?console['log'](a5_0x2c1082[_0x46b9bf(0x12d)](_0x46b9bf(0x183)+_0x125343+_0x46b9bf(0x11f)+_0x998568[_0x46b9bf(0x19b)])+a5_0x2c1082[_0x46b9bf(0x166)]('\x20(cached)')):console[_0x46b9bf(0x122)](a5_0x2c1082['red']('✗\x20ERROR:\x20'+_0x125343+_0x46b9bf(0x11f)+_0x998568['reason']));_0x998568[_0x46b9bf(0x162)]&&console['log'](a5_0x2c1082[_0x46b9bf(0x166)](_0x46b9bf(0x123)+_0x998568[_0x46b9bf(0x162)])),_0x3c2ed8[_0x46b9bf(0x117)](_0x998568);},'onTestSkipped':(_0x10cff9,_0x26929b)=>{const _0x40580d=_0x54f87b;_0x4306c3['stop'](),console[_0x40580d(0x122)](a5_0x2c1082[_0x40580d(0x130)](_0x40580d(0x177)+_0x10cff9+_0x40580d(0x11f)+_0x26929b));}});for(const _0x38d210 of _0x16f719){!_0x3c2ed8[_0x54f87b(0x182)](_0x59132b=>_0x59132b['name']===_0x38d210[_0x54f87b(0x180)])&&_0x3c2ed8[_0x54f87b(0x117)](_0x38d210);}}catch(_0x58bfe8){_0x4306c3['stop']();const _0x5a46a4=_0x58bfe8 instanceof Error?_0x58bfe8[_0x54f87b(0x153)]:String(_0x58bfe8);return console['log'](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x181)+_0x5a46a4)),0x1;}_0x4306c3['stop']();if(_0x3fae6e['length']>0x0){console['log'](),console['log'](a5_0x2c1082[_0x54f87b(0x148)](_0x54f87b(0x14a)));const {projectId:_0x488aa0,agentId:_0x1751bc}=_0x5866dc['agent'];for(const _0x4fed27 of _0x3fae6e){console[_0x54f87b(0x122)](_0x54f87b(0x165)+a5_0x2c1082[_0x54f87b(0x193)](_0x4fed27[_0x54f87b(0x180)]));const _0x100cc3=createCommandSpinner(_0x54f87b(0x198)+_0x4fed27[_0x54f87b(0x17f)]['length']+_0x54f87b(0x13f));_0x100cc3[_0x54f87b(0x1a0)]();try{const {result:_0x1375e5}=await runTest(_0x5295e1[_0x54f87b(0x113)],_0x4fed27,{'agentId':_0x1751bc,'projectId':_0x488aa0,'site':_0x5866dc[_0x54f87b(0x129)],'noEval':![],'evaluatorId':_0x50ac59,'onRoundStart':(_0x271356,_0x39f878)=>{const _0x4465a4=_0x54f87b;_0x100cc3['text']='Round\x20'+(_0x271356+0x1)+'/'+_0x39f878+_0x4465a4(0x13f);},'onRoundComplete':(_0x409f80,_0x5a8c0b,_0x31b5d0)=>{const _0x1d5c3f=_0x54f87b,_0x1bba20=formatElapsed(_0x5a8c0b);_0x31b5d0?console['log'](_0x1d5c3f(0x18e)+(_0x409f80+0x1)+'/'+_0x4fed27[_0x1d5c3f(0x17f)][_0x1d5c3f(0x13a)]+_0x1d5c3f(0x18f)+a5_0x2c1082[_0x1d5c3f(0x14e)]('✓')+'\x20('+_0x1bba20+')'):console[_0x1d5c3f(0x122)](_0x1d5c3f(0x18e)+(_0x409f80+0x1)+'/'+_0x4fed27[_0x1d5c3f(0x17f)][_0x1d5c3f(0x13a)]+_0x1d5c3f(0x18f)+a5_0x2c1082[_0x1d5c3f(0x12d)]('✗'));},'onEvaluationStart':()=>{const _0x1a02a9=_0x54f87b;_0x100cc3[_0x1a02a9(0x141)]='Evaluating\x20response...';},'onEvaluationComplete':_0x28d871=>{const _0x5ad755=_0x54f87b,_0x144ec0=formatElapsed(_0x28d871);console[_0x5ad755(0x122)](_0x5ad755(0x151)+a5_0x2c1082['green']('✓')+'\x20('+_0x144ec0+')');}});_0x100cc3[_0x54f87b(0x132)](),_0x3c2ed8['push'](_0x1375e5);if(_0x1375e5['status']===_0x54f87b(0x192))console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x14e)](_0x54f87b(0x15c)+_0x1375e5[_0x54f87b(0x19b)])+a5_0x2c1082['dim'](_0x54f87b(0x172)));else _0x1375e5[_0x54f87b(0x16c)]==='FAIL'?console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x183)+_0x1375e5[_0x54f87b(0x19b)])+a5_0x2c1082[_0x54f87b(0x166)]('\x20(new)')):console[_0x54f87b(0x122)](a5_0x2c1082['red']('✗\x20ERROR:\x20'+_0x1375e5[_0x54f87b(0x19b)]));_0x1375e5[_0x54f87b(0x162)]&&console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)]('\x20\x20Conversation:\x20'+_0x1375e5[_0x54f87b(0x162)]));}catch(_0x30aa46){_0x100cc3['stop']();const _0x1cc3c4=_0x30aa46 instanceof Error?_0x30aa46['message']:String(_0x30aa46);console[_0x54f87b(0x122)](a5_0x2c1082['red'](_0x54f87b(0x138)+_0x1cc3c4)),_0x3c2ed8['push']({'name':_0x4fed27['name'],'status':_0x54f87b(0x171),'reason':_0x1cc3c4,'timestamp':new Date()[_0x54f87b(0x18a)](),'duration_ms':0x0});}}}console[_0x54f87b(0x122)]();const _0x30e181=Date[_0x54f87b(0x1a5)]()-_0x9151f2,_0x5525e8=_0x3c2ed8[_0x54f87b(0x115)](_0xd176e0=>_0xd176e0[_0x54f87b(0x16c)]==='PASS')[_0x54f87b(0x13a)],_0x2577b7=_0x3c2ed8[_0x54f87b(0x115)](_0x445f5f=>_0x445f5f[_0x54f87b(0x16c)]===_0x54f87b(0x12f))['length'],_0x3c4bad=_0x3c2ed8[_0x54f87b(0x115)](_0x5269a3=>_0x5269a3[_0x54f87b(0x16c)]===_0x54f87b(0x171))['length'];console[_0x54f87b(0x122)]('━'[_0x54f87b(0x120)](0x3c)),console['log'](_0x54f87b(0x194)),console[_0x54f87b(0x122)]('━'[_0x54f87b(0x120)](0x3c)),console[_0x54f87b(0x122)](_0x54f87b(0x16d)+_0x3c2ed8['length']),console[_0x54f87b(0x122)](_0x54f87b(0x136)+a5_0x2c1082[_0x54f87b(0x14e)](_0x5525e8)),console[_0x54f87b(0x122)]('Failed:\x20\x20\x20'+a5_0x2c1082[_0x54f87b(0x12d)](_0x2577b7));_0x3c4bad>0x0&&console[_0x54f87b(0x122)](_0x54f87b(0x158)+a5_0x2c1082[_0x54f87b(0x12d)](_0x3c4bad));console[_0x54f87b(0x122)](_0x54f87b(0x125)+formatElapsed(_0x30e181)),console['log']('━'[_0x54f87b(0x120)](0x3c));const _0x146db8={'summary':{'total':_0x3c2ed8[_0x54f87b(0x13a)],'passed':_0x5525e8,'failed':_0x2577b7,'errors':_0x3c4bad>0x0?_0x3c4bad:undefined,'duration_ms':_0x30e181},'tests':_0x3c2ed8,'agent':{'project':_0x4f4067[_0x54f87b(0x140)],'name':_0x4f4067[_0x54f87b(0x14c)],'site':_0x4b3cfc},'timestamp':new Date(_0x9151f2)[_0x54f87b(0x18a)]()};if(_0x14d6e7!==_0x54f87b(0x15b)||_0x187442){const _0x4b5cc5=formatResults(_0x146db8,_0x14d6e7);if(_0x187442)try{a5_0x17d003[_0x54f87b(0x1a1)](_0x187442,_0x4b5cc5,_0x54f87b(0x1a6)),console['log'](),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)](_0x54f87b(0x189)+_0x187442));}catch(_0x26eea2){return console[_0x54f87b(0x122)](),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)]('Error\x20writing\x20output\x20file:\x20'+_0x26eea2)),0x1;}else console[_0x54f87b(0x122)](),console[_0x54f87b(0x122)](_0x4b5cc5);}const _0x32c0ce=_0x3c2ed8[_0x54f87b(0x115)](_0x358fb2=>_0x358fb2[_0x54f87b(0x16c)]!==_0x54f87b(0x192));return _0x32c0ce[_0x54f87b(0x13a)]>0x0?0x1:0x0;}}
|
|
1
|
+
const a5_0x3e5468=a5_0xa540;(function(_0x2c07f6,_0x52a4b7){const _0xc6924=a5_0xa540,_0x41ff59=_0x2c07f6();while(!![]){try{const _0x5abad9=parseInt(_0xc6924(0x211))/0x1+-parseInt(_0xc6924(0x22f))/0x2*(-parseInt(_0xc6924(0x1f9))/0x3)+-parseInt(_0xc6924(0x203))/0x4+parseInt(_0xc6924(0x1cc))/0x5+-parseInt(_0xc6924(0x234))/0x6+-parseInt(_0xc6924(0x225))/0x7+parseInt(_0xc6924(0x202))/0x8;if(_0x5abad9===_0x52a4b7)break;else _0x41ff59['push'](_0x41ff59['shift']());}catch(_0x344cc8){_0x41ff59['push'](_0x41ff59['shift']());}}}(a5_0xdde3,0xb1fe3));import*as a5_0x61f3f8 from'node:fs';import*as a5_0x2ddc07 from'node:path';function a5_0xa540(_0x4e0a7f,_0x503f16){_0x4e0a7f=_0x4e0a7f-0x1a9;const _0xdde3c3=a5_0xdde3();let _0xa54003=_0xdde3c3[_0x4e0a7f];return _0xa54003;}import a5_0x1ae528 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';function a5_0xdde3(){const _0xe8db2e=['Re-evaluating...','green','404','9785132hrYRIF','multiple_agents','tsv','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','\x20(new)','rounds','tags','Usage:','Passed:\x20\x20\x20','51478qvycwK','message','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','No\x20tests\x20found\x20with\x20tags:\x20','white','348066NJFwWs','llmProject','...','log','includes','Run\x20tests\x20for\x20an\x20LLM\x20agent','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','stop','✗\x20ERROR:\x20Project\x20not\x20found:\x20','✗\x20FAIL:\x20','start','not\x20found','\x20(cached)','Running:\x20','join','round','executeReeval','ERROR','no_context','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','⚠\x20SKIPPED:\x20','Running\x20agent\x20tests...','Cached\x20run\x20from:\x20','toISOString','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','toLowerCase','substring','Re-evaluating\x20cached\x20test\x20run...',':\x20Sending\x20user\x20input...','New\x20tests\x20to\x20execute:\x20','Tests\x20found:\x20','\x22:\x20','reason','timestamp','jsonl','\x20\x20Project:\x20','Duration:\x20','Evaluating\x20response...','testYmlPath','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','Output\x20written\x20to:\x20','FAIL','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','writeFileSync','✗\x20ERROR:\x20','text','852325AFLykt','length','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','status','testName','red','Failed:\x20\x20\x20','push','Agent:\x20','✓\x20PASS:\x20','dryRun','\x20\x20Evaluating...\x20','Executing\x20new\x20tests...','Available\x20tests:\x20','projectDir','/<agent-name>','execute','Round\x20','Round\x201/','No\x20tests\x20have\x20tags\x20defined.','projectName','Available\x20tags:\x20','context','\x22,\x20but\x20current\x20site\x20is\x20\x22','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','table','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','some','name','output','filter','llm','\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)','cyan','test.yml','PASS','resolveProjectId','source','\x20\x20Round\x20','\x20\x20Site:\x20','Run\x20\x27tdx\x20agent\x20pull\x20','\x20\x20Conversation:\x20','conversations','now','102wuGjqX','\x20\x20-\x20','Re-evaluation\x20Summary','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','yellow','Site:\x20','forEach','dim','trim','8644928aWiDhH','565036PiIgFr','...\x20','repeat','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','Total:\x20\x20\x20\x20','eval','Test\x20Summary','found','Error\x20writing\x20output\x20file:\x20','isSpinning','reeval','Test\x20','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','map','199998tiKyuo','agent','no_tests','has','\x20-\x20','site','Either\x20switch\x20to\x20the\x20\x22','\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','agentDirs','split','\x20\x20Agent:\x20','conversation_url','verbose','utf-8','tests','Conversation\x20URL:\x20','agentName'];a5_0xdde3=function(){return _0xe8db2e;};return a5_0xdde3();}export class AgentTestCommand extends BaseCommand{[a5_0x3e5468(0x1e9)]='agent:test';['description']=a5_0x3e5468(0x239);async[a5_0x3e5468(0x1dd)](_0x81b9b5){const _0x9f3741=a5_0x3e5468,{options:_0x8c886f,args:_0x4b8353,tdx:_0x14169c}=_0x81b9b5,_0x53fc85=_0x4b8353[0x0]||'.',_0x2f8aad=_0x8c886f[_0x9f3741(0x1d7)],_0x362e1c=_0x8c886f,_0x397ed0=_0x362e1c[_0x9f3741(0x208)]===![],_0x2bdeb3=_0x362e1c[_0x9f3741(0x20d)],_0x7107e2=_0x362e1c['name'],_0x3efbd4=_0x362e1c[_0x9f3741(0x22c)],_0x1940df=_0x8c886f['site'],_0x5df971=_0x362e1c[_0x9f3741(0x1ea)];if(_0x2bdeb3&&_0x397ed0)return console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1d2)](_0x9f3741(0x1e7))),0x1;let _0x47efa2=_0x9f3741(0x1e6);if(_0x362e1c['json'])_0x47efa2='json';else{if(_0x362e1c['jsonl'])_0x47efa2=_0x9f3741(0x1c0);else{if(_0x362e1c[_0x9f3741(0x227)])_0x47efa2=_0x9f3741(0x227);else{if(_0x362e1c[_0x9f3741(0x1e6)])_0x47efa2=_0x9f3741(0x1e6);}}}const _0x27da61=_0x362e1c[_0x9f3741(0x235)];let _0x585284=_0x53fc85;const _0x5da5f6=a5_0x61f3f8['existsSync'](_0x53fc85),_0x111615=_0x53fc85==='.';if(!_0x5da5f6||_0x111615){const _0x3446ba=resolveProjectFromContext(_0x53fc85,_0x27da61,{'requireFile':_0x9f3741(0x1ef)});if(_0x3446ba[_0x9f3741(0x20a)])_0x585284=_0x3446ba['projectDir'],_0x3446ba[_0x9f3741(0x1f2)]===_0x9f3741(0x1e3)&&console['log'](a5_0x1ae528[_0x9f3741(0x200)]('Using\x20agent:\x20'+_0x585284));else switch(_0x3446ba[_0x9f3741(0x1be)]){case _0x9f3741(0x1b0):console['log'](a5_0x1ae528[_0x9f3741(0x1fd)](_0x3446ba[_0x9f3741(0x230)])),console[_0x9f3741(0x237)](),console[_0x9f3741(0x237)](_0x9f3741(0x22d)),console[_0x9f3741(0x237)](_0x9f3741(0x218)),console[_0x9f3741(0x237)](_0x9f3741(0x1ed)),console[_0x9f3741(0x237)](),console[_0x9f3741(0x237)]('Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>');return 0x1;case'no_local_folder':console['log'](a5_0x1ae528[_0x9f3741(0x1fd)](_0x3446ba[_0x9f3741(0x230)])),console[_0x9f3741(0x237)](),console[_0x9f3741(0x237)](_0x9f3741(0x1f5)+_0x3446ba[_0x9f3741(0x235)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');return 0x1;case _0x9f3741(0x226):{const _0x3aa2d6=a5_0x2ddc07['basename'](_0x3446ba['projectDir']);console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1fd)](_0x9f3741(0x206)+_0x3446ba[_0x9f3741(0x235)]+'\x22:'));for(const _0x54ef64 of _0x3446ba[_0x9f3741(0x219)]){console[_0x9f3741(0x237)](_0x9f3741(0x1fa)+_0x54ef64);}return console[_0x9f3741(0x237)](),console['log'](_0x9f3741(0x228)+_0x3aa2d6+_0x9f3741(0x1dc)),0x1;}case _0x9f3741(0x213):console[_0x9f3741(0x237)](a5_0x1ae528['yellow'](_0x9f3741(0x23a)+_0x3446ba['llmProject']+'\x22.')),console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x200)]('Project\x20path:\x20'+_0x3446ba[_0x9f3741(0x1db)])),console[_0x9f3741(0x237)](),console[_0x9f3741(0x237)](_0x9f3741(0x1c5));return 0x1;}}const {definition:_0x340eef,agentInfo:_0x4b916c}=parseTestFile(_0x585284);let _0x33f218=_0x340eef[_0x9f3741(0x21f)];if(_0x7107e2){const _0x3263b0=_0x7107e2['split'](',')['map'](_0x5f2d48=>_0x5f2d48[_0x9f3741(0x201)]());_0x33f218=_0x340eef['tests'][_0x9f3741(0x1eb)](_0x3840d3=>_0x3263b0[_0x9f3741(0x238)](_0x3840d3[_0x9f3741(0x1e9)]));if(_0x33f218[_0x9f3741(0x1cd)]===0x0)return console['log'](a5_0x1ae528['yellow']('No\x20tests\x20found\x20matching:\x20'+_0x7107e2)),console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x200)](_0x9f3741(0x1da)+_0x340eef[_0x9f3741(0x21f)][_0x9f3741(0x210)](_0x40d5d2=>_0x40d5d2[_0x9f3741(0x1e9)])[_0x9f3741(0x1ac)](',\x20'))),0x1;}if(_0x3efbd4){const _0x254ce0=_0x3efbd4[_0x9f3741(0x21a)](',')[_0x9f3741(0x210)](_0x5aee6a=>_0x5aee6a[_0x9f3741(0x201)]()[_0x9f3741(0x1b7)]());_0x33f218=_0x33f218[_0x9f3741(0x1eb)](_0x165285=>_0x165285[_0x9f3741(0x22c)]?.[_0x9f3741(0x1e8)](_0x1d0461=>_0x254ce0['includes'](_0x1d0461[_0x9f3741(0x1b7)]())));if(_0x33f218[_0x9f3741(0x1cd)]===0x0){console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1fd)](_0x9f3741(0x232)+_0x3efbd4));const _0x12ed79=new Set();return _0x340eef['tests']['forEach'](_0x3dec32=>_0x3dec32[_0x9f3741(0x22c)]?.[_0x9f3741(0x1ff)](_0x34b370=>_0x12ed79['add'](_0x34b370))),_0x12ed79['size']>0x0?console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x200)](_0x9f3741(0x1e2)+[..._0x12ed79][_0x9f3741(0x1ac)](',\x20'))):console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x200)](_0x9f3741(0x1e0))),0x1;}}if(_0x2bdeb3)return this[_0x9f3741(0x1ae)](_0x81b9b5,{'definition':{'tests':_0x33f218},'agentInfo':_0x4b916c,'outputFormat':_0x47efa2,'outputFile':_0x5df971,'testNames':_0x7107e2});if(_0x2f8aad){console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1ee)]('Test\x20Configuration:')),console[_0x9f3741(0x237)](_0x9f3741(0x1f4)+a5_0x1ae528[_0x9f3741(0x233)](_0x1940df)),console[_0x9f3741(0x237)](_0x9f3741(0x1c1)+a5_0x1ae528[_0x9f3741(0x233)](_0x4b916c['projectName'])),console['log'](_0x9f3741(0x21b)+a5_0x1ae528['white'](_0x4b916c[_0x9f3741(0x221)])),console[_0x9f3741(0x237)](),console[_0x9f3741(0x237)](_0x9f3741(0x1bc)+a5_0x1ae528[_0x9f3741(0x233)](_0x33f218[_0x9f3741(0x1cd)]));for(let _0x53d678=0x0;_0x53d678<_0x33f218['length'];_0x53d678++){const _0x51d9c5=_0x33f218[_0x53d678],_0x3e4249=_0x51d9c5[_0x9f3741(0x22b)][_0x9f3741(0x1cd)]===0x1?_0x9f3741(0x1ad):'rounds',_0x369f6e=_0x51d9c5[_0x9f3741(0x22c)]?.[_0x9f3741(0x1cd)]?'\x20['+_0x51d9c5[_0x9f3741(0x22c)][_0x9f3741(0x1ac)](',\x20')+']':'';console[_0x9f3741(0x237)]('\x20\x20'+(_0x53d678+0x1)+'.\x20'+a5_0x1ae528['white'](_0x51d9c5[_0x9f3741(0x1e9)])+'\x20('+_0x51d9c5[_0x9f3741(0x22b)][_0x9f3741(0x1cd)]+'\x20'+_0x3e4249+')'+a5_0x1ae528[_0x9f3741(0x200)](_0x369f6e));}return 0x0;}let _0x4afc7d,_0xbdd9ed;try{_0x4afc7d=await _0x14169c[_0x9f3741(0x1ec)][_0x9f3741(0x1f1)](_0x4b916c[_0x9f3741(0x1e1)]);}catch(_0x43b889){const _0xd0b3a4=_0x43b889 instanceof Error?_0x43b889[_0x9f3741(0x230)]:String(_0x43b889);return _0xd0b3a4[_0x9f3741(0x238)](_0x9f3741(0x224))||_0xd0b3a4['toLowerCase']()[_0x9f3741(0x238)](_0x9f3741(0x1a9))?console['log'](a5_0x1ae528['red'](_0x9f3741(0x23c)+_0x4b916c[_0x9f3741(0x1e1)])):console['log'](a5_0x1ae528[_0x9f3741(0x1d2)](_0x9f3741(0x1e5)+_0x4b916c['projectName']+'\x22:\x20'+_0xd0b3a4)),0x1;}try{_0xbdd9ed=await _0x14169c[_0x9f3741(0x1ec)]['resolveAgentId'](_0x4b916c[_0x9f3741(0x221)],_0x4afc7d);}catch(_0x3f3841){const _0x165863=_0x3f3841 instanceof Error?_0x3f3841[_0x9f3741(0x230)]:String(_0x3f3841);return _0x165863['includes'](_0x9f3741(0x224))||_0x165863[_0x9f3741(0x1b7)]()[_0x9f3741(0x238)]('not\x20found')?console['log'](a5_0x1ae528['red'](_0x9f3741(0x229)+_0x4b916c[_0x9f3741(0x221)])):console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1d2)](_0x9f3741(0x1fc)+_0x4b916c['agentName']+_0x9f3741(0x1bd)+_0x165863)),0x1;}let _0x1d0e61;if(!_0x397ed0)try{_0x1d0e61=await setupEvaluatorAgent(_0x14169c[_0x9f3741(0x1ec)],_0x8c886f[_0x9f3741(0x21d)]);}catch(_0xda45d2){const _0x54c40a=_0xda45d2 instanceof Error?_0xda45d2[_0x9f3741(0x230)]:String(_0xda45d2);return console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1d2)](_0x9f3741(0x1ce)+_0x54c40a)),0x1;}console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1ee)](_0x9f3741(0x1b3))),console[_0x9f3741(0x237)](_0x9f3741(0x1fe)+a5_0x1ae528[_0x9f3741(0x233)](_0x1940df)),console[_0x9f3741(0x237)](_0x9f3741(0x1d5)+a5_0x1ae528['white'](_0x4b916c[_0x9f3741(0x1e1)]+'/'+_0x4b916c[_0x9f3741(0x221)])),console[_0x9f3741(0x237)]();const _0xeeb2b2=[],_0x471ef1=[],_0x1c8b6e=Date['now']();for(let _0x111cf0=0x0;_0x111cf0<_0x33f218['length'];_0x111cf0++){const _0x147791=_0x33f218[_0x111cf0];_0x33f218['length']>0x1?console[_0x9f3741(0x237)](_0x9f3741(0x20e)+(_0x111cf0+0x1)+'/'+_0x33f218['length']+':\x20'+a5_0x1ae528['white'](_0x147791[_0x9f3741(0x1e9)])):console[_0x9f3741(0x237)]('Running\x20test:\x20'+a5_0x1ae528[_0x9f3741(0x233)](_0x147791[_0x9f3741(0x1e9)]));const _0x1e15e3=createCommandSpinner(_0x9f3741(0x1df)+_0x147791[_0x9f3741(0x22b)]['length']+_0x9f3741(0x1ba));_0x1e15e3[_0x9f3741(0x23e)]();try{const {result:_0xf3ca2f,conversation:_0x75eb96}=await runTest(_0x14169c[_0x9f3741(0x1ec)],_0x147791,{'agentId':_0xbdd9ed,'projectId':_0x4afc7d,'site':_0x1940df,'noEval':_0x397ed0,'evaluatorId':_0x1d0e61,'onRoundStart':(_0x553fa1,_0x1b6ed9)=>{const _0x51a8e2=_0x9f3741;_0x1e15e3[_0x51a8e2(0x1cb)]=_0x51a8e2(0x1de)+(_0x553fa1+0x1)+'/'+_0x1b6ed9+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x42d3a2,_0x566bff,_0x4eda18)=>{const _0x41cabc=_0x9f3741,_0x4df814=formatElapsed(_0x566bff);_0x4eda18?console[_0x41cabc(0x237)]('\x20\x20Round\x20'+(_0x42d3a2+0x1)+'/'+_0x147791[_0x41cabc(0x22b)]['length']+_0x41cabc(0x204)+a5_0x1ae528[_0x41cabc(0x223)]('✓')+'\x20('+_0x4df814+')'):console[_0x41cabc(0x237)](_0x41cabc(0x1f3)+(_0x42d3a2+0x1)+'/'+_0x147791[_0x41cabc(0x22b)][_0x41cabc(0x1cd)]+_0x41cabc(0x204)+a5_0x1ae528['red']('✗'));},'onEvaluationStart':()=>{const _0x123d7a=_0x9f3741;_0x1e15e3[_0x123d7a(0x1cb)]=_0x123d7a(0x1c3);},'onEvaluationComplete':_0x2cecdb=>{const _0x382d39=_0x9f3741,_0x52570a=formatElapsed(_0x2cecdb);console[_0x382d39(0x237)](_0x382d39(0x1d8)+a5_0x1ae528[_0x382d39(0x223)]('✓')+'\x20('+_0x52570a+')');}});_0x1e15e3[_0x9f3741(0x23b)](),_0xeeb2b2[_0x9f3741(0x1d4)](_0xf3ca2f),_0x471ef1[_0x9f3741(0x1d4)](_0x75eb96);if(_0xf3ca2f[_0x9f3741(0x1d0)]==='PASS')console['log'](a5_0x1ae528[_0x9f3741(0x223)](_0x9f3741(0x1d6)+_0xf3ca2f[_0x9f3741(0x1be)]));else _0xf3ca2f[_0x9f3741(0x1d0)]==='FAIL'?console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1d2)]('✗\x20FAIL:\x20'+_0xf3ca2f[_0x9f3741(0x1be)])):console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1d2)](_0x9f3741(0x1ca)+_0xf3ca2f[_0x9f3741(0x1be)]));_0xf3ca2f[_0x9f3741(0x21c)]&&console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x200)](_0x9f3741(0x220)+_0xf3ca2f[_0x9f3741(0x21c)])),console[_0x9f3741(0x237)]();}catch(_0x2ee059){_0x1e15e3[_0x9f3741(0x23b)]();const _0x8da214=_0x2ee059 instanceof Error?_0x2ee059[_0x9f3741(0x230)]:String(_0x2ee059);console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x1d2)](_0x9f3741(0x1ca)+_0x8da214)),console[_0x9f3741(0x237)](),_0xeeb2b2[_0x9f3741(0x1d4)]({'name':_0x147791[_0x9f3741(0x1e9)],'status':'ERROR','reason':_0x8da214,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}const _0x570e2e=Date[_0x9f3741(0x1f8)]()-_0x1c8b6e,_0xd35662=_0xeeb2b2[_0x9f3741(0x1eb)](_0x15d36c=>_0x15d36c[_0x9f3741(0x1d0)]==='PASS')[_0x9f3741(0x1cd)],_0x5b0157=_0xeeb2b2[_0x9f3741(0x1eb)](_0x462ea0=>_0x462ea0[_0x9f3741(0x1d0)]===_0x9f3741(0x1c7))[_0x9f3741(0x1cd)],_0x128245=_0xeeb2b2[_0x9f3741(0x1eb)](_0x58918a=>_0x58918a['status']===_0x9f3741(0x1af))['length'];console[_0x9f3741(0x237)]('━'['repeat'](0x3c)),console[_0x9f3741(0x237)](_0x9f3741(0x209)),console[_0x9f3741(0x237)]('━'[_0x9f3741(0x205)](0x3c)),console['log'](_0x9f3741(0x207)+_0xeeb2b2[_0x9f3741(0x1cd)]),console[_0x9f3741(0x237)](_0x9f3741(0x22e)+a5_0x1ae528[_0x9f3741(0x223)](_0xd35662)),console[_0x9f3741(0x237)](_0x9f3741(0x1d3)+a5_0x1ae528[_0x9f3741(0x1d2)](_0x5b0157));_0x128245>0x0&&console[_0x9f3741(0x237)]('Errors:\x20\x20\x20'+a5_0x1ae528[_0x9f3741(0x1d2)](_0x128245));console[_0x9f3741(0x237)](_0x9f3741(0x1c2)+formatElapsed(_0x570e2e)),console[_0x9f3741(0x237)]('━'[_0x9f3741(0x205)](0x3c));const _0x32c3af=_0xeeb2b2[_0x9f3741(0x1eb)](_0x124410=>_0x124410[_0x9f3741(0x1d0)]!=='PASS');if(_0x32c3af[_0x9f3741(0x1cd)]>0x0){console[_0x9f3741(0x237)](),console[_0x9f3741(0x237)]('Failed\x20Tests:');for(const _0x1c2bbb of _0x32c3af){const _0x327213=a5_0x1ae528[_0x9f3741(0x1d2)]('✗'),_0x22325e=_0x1c2bbb[_0x9f3741(0x1be)][_0x9f3741(0x1cd)]>0x32?_0x1c2bbb['reason'][_0x9f3741(0x1b8)](0x0,0x32)+_0x9f3741(0x236):_0x1c2bbb['reason'];console[_0x9f3741(0x237)]('\x20\x20'+_0x327213+'\x20'+_0x1c2bbb[_0x9f3741(0x1e9)]+':\x20'+_0x22325e);}}const _0x41f192={'summary':{'total':_0xeeb2b2[_0x9f3741(0x1cd)],'passed':_0xd35662,'failed':_0x5b0157,'errors':_0x128245>0x0?_0x128245:undefined,'duration_ms':_0x570e2e},'tests':_0xeeb2b2,'agent':{'project':_0x4b916c[_0x9f3741(0x1e1)],'name':_0x4b916c[_0x9f3741(0x221)],'site':_0x1940df},'timestamp':new Date(_0x1c8b6e)[_0x9f3741(0x1b5)]()};try{const _0x3d2ffc=buildCachedTestRun(_0x471ef1,{'site':_0x1940df,'projectId':_0x4afc7d,'projectName':_0x4b916c[_0x9f3741(0x1e1)],'agentId':_0xbdd9ed,'agentName':_0x4b916c[_0x9f3741(0x221)],'testYmlPath':a5_0x2ddc07['resolve'](_0x4b916c[_0x9f3741(0x1c4)])});saveLastTestRun(_0x3d2ffc);}catch{}if(_0x47efa2!==_0x9f3741(0x1e6)||_0x5df971){const _0x2bee0f=formatResults(_0x41f192,_0x47efa2);if(_0x5df971)try{a5_0x61f3f8['writeFileSync'](_0x5df971,_0x2bee0f,_0x9f3741(0x21e)),console[_0x9f3741(0x237)](),console[_0x9f3741(0x237)](a5_0x1ae528[_0x9f3741(0x200)](_0x9f3741(0x1c6)+_0x5df971));}catch(_0x1b101b){return console[_0x9f3741(0x237)](),console['log'](a5_0x1ae528[_0x9f3741(0x1d2)](_0x9f3741(0x20b)+_0x1b101b)),0x1;}else console['log'](),console['log'](_0x2bee0f);}return _0x32c3af['length']>0x0?0x1:0x0;}async[a5_0x3e5468(0x1ae)](_0x11ce46,_0x2412d2){const _0x4addd4=a5_0x3e5468,{options:_0x56b639,tdx:_0x4ceafa}=_0x11ce46,{definition:_0x2ce365,agentInfo:_0x4fa2ba,outputFormat:_0x1b4b11,outputFile:_0x328f13}=_0x2412d2,_0x2a726f=_0x56b639[_0x4addd4(0x216)],_0x5a990e=loadLastTestRun();if(!_0x5a990e)return console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x1d2)]('Error:\x20No\x20previous\x20test\x20run\x20found.')),console['log'](a5_0x1ae528[_0x4addd4(0x200)](_0x4addd4(0x1c8))),0x1;if(_0x5a990e['agent']['agentName']!==_0x4fa2ba[_0x4addd4(0x221)])return console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x1d2)](_0x4addd4(0x231)+_0x5a990e[_0x4addd4(0x212)]['agentName']+'\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22'+_0x4fa2ba['agentName']+'\x22.')),console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x200)](_0x4addd4(0x20f))),0x1;const _0x5879d4=new Set(_0x5a990e[_0x4addd4(0x1f7)]['map'](_0x33b6c5=>_0x33b6c5[_0x4addd4(0x1d1)])),_0x493fcf=_0x2ce365[_0x4addd4(0x21f)][_0x4addd4(0x1eb)](_0x2b6476=>!_0x5879d4[_0x4addd4(0x214)](_0x2b6476['name']));if(_0x493fcf['length']>0x0&&_0x5a990e['site']!==_0x2a726f)return console['log'](a5_0x1ae528[_0x4addd4(0x1d2)](_0x4addd4(0x1b1))),console['log'](a5_0x1ae528[_0x4addd4(0x200)]('Cached\x20run\x20is\x20from\x20site\x20\x22'+_0x5a990e['site']+_0x4addd4(0x1e4)+_0x2a726f+'\x22.')),console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x200)](_0x4addd4(0x217)+_0x5a990e[_0x4addd4(0x216)]+_0x4addd4(0x1cf))),0x1;const _0x4c649f=_0x2ce365[_0x4addd4(0x21f)][_0x4addd4(0x1eb)](_0x58c2ce=>_0x5879d4[_0x4addd4(0x214)](_0x58c2ce[_0x4addd4(0x1e9)])),_0x5189ce=_0x493fcf;let _0x2ba1f4;try{_0x2ba1f4=await setupEvaluatorAgent(_0x4ceafa[_0x4addd4(0x1ec)],_0x56b639[_0x4addd4(0x21d)]);}catch(_0x3ec9e7){const _0x45dd53=_0x3ec9e7 instanceof Error?_0x3ec9e7[_0x4addd4(0x230)]:String(_0x3ec9e7);return console['log'](a5_0x1ae528[_0x4addd4(0x1d2)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x45dd53)),0x1;}console['log'](a5_0x1ae528[_0x4addd4(0x1ee)](_0x4addd4(0x1b9))),console[_0x4addd4(0x237)](_0x4addd4(0x1b4)+a5_0x1ae528[_0x4addd4(0x233)](_0x5a990e[_0x4addd4(0x1bf)])),console[_0x4addd4(0x237)](_0x4addd4(0x1d5)+a5_0x1ae528[_0x4addd4(0x233)](_0x5a990e[_0x4addd4(0x212)][_0x4addd4(0x1e1)]+'/'+_0x5a990e[_0x4addd4(0x212)][_0x4addd4(0x221)]));_0x5189ce['length']>0x0&&console[_0x4addd4(0x237)](_0x4addd4(0x1bb)+a5_0x1ae528['yellow'](_0x5189ce['length']));console[_0x4addd4(0x237)]();const _0x2bf330=[],_0x3db3a0=Date[_0x4addd4(0x1f8)](),_0x54750f=createCommandSpinner(_0x4addd4(0x222));if(_0x4c649f[_0x4addd4(0x1cd)]>0x0)try{const _0x44f860=await reevaluateFromCache(_0x4ceafa[_0x4addd4(0x1ec)],_0x5a990e,{'tests':_0x4c649f},{'evaluatorId':_0x2ba1f4,'onTestStart':(_0x2452fa,_0x2e5f81,_0x1a75b1)=>{const _0x4a44e8=_0x4addd4;_0x54750f['text']='Re-evaluating\x20'+(_0x2e5f81+0x1)+'/'+_0x1a75b1+':\x20'+_0x2452fa+_0x4a44e8(0x236);if(!_0x54750f[_0x4a44e8(0x20c)])_0x54750f[_0x4a44e8(0x23e)]();},'onTestComplete':(_0x37226a,_0x4dbce9)=>{const _0x476cee=_0x4addd4;_0x54750f['stop']();if(_0x4dbce9[_0x476cee(0x1d0)]===_0x476cee(0x1f0))console[_0x476cee(0x237)](a5_0x1ae528[_0x476cee(0x223)]('✓\x20PASS:\x20'+_0x37226a)+a5_0x1ae528['dim'](_0x476cee(0x1aa)));else _0x4dbce9['status']===_0x476cee(0x1c7)?console[_0x476cee(0x237)](a5_0x1ae528['red']('✗\x20FAIL:\x20'+_0x37226a+'\x20-\x20'+_0x4dbce9[_0x476cee(0x1be)])+a5_0x1ae528[_0x476cee(0x200)]('\x20(cached)')):console['log'](a5_0x1ae528[_0x476cee(0x1d2)]('✗\x20ERROR:\x20'+_0x37226a+_0x476cee(0x215)+_0x4dbce9[_0x476cee(0x1be)]));_0x4dbce9[_0x476cee(0x21c)]&&console[_0x476cee(0x237)](a5_0x1ae528[_0x476cee(0x200)](_0x476cee(0x1f6)+_0x4dbce9[_0x476cee(0x21c)])),_0x2bf330['push'](_0x4dbce9);},'onTestSkipped':(_0x2bb90b,_0x2a3920)=>{const _0xe4ad2=_0x4addd4;_0x54750f['stop'](),console[_0xe4ad2(0x237)](a5_0x1ae528[_0xe4ad2(0x1fd)](_0xe4ad2(0x1b2)+_0x2bb90b+_0xe4ad2(0x215)+_0x2a3920));}});for(const _0x5447ab of _0x44f860){!_0x2bf330['find'](_0x2a5edb=>_0x2a5edb['name']===_0x5447ab['name'])&&_0x2bf330[_0x4addd4(0x1d4)](_0x5447ab);}}catch(_0x512843){_0x54750f[_0x4addd4(0x23b)]();const _0x3af8a5=_0x512843 instanceof Error?_0x512843[_0x4addd4(0x230)]:String(_0x512843);return console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x1d2)](_0x4addd4(0x1b6)+_0x3af8a5)),0x1;}_0x54750f[_0x4addd4(0x23b)]();if(_0x5189ce['length']>0x0){console[_0x4addd4(0x237)](),console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x1ee)](_0x4addd4(0x1d9)));const {projectId:_0x49e6c8,agentId:_0xbe886e}=_0x5a990e['agent'];for(const _0x39a168 of _0x5189ce){console['log'](_0x4addd4(0x1ab)+a5_0x1ae528[_0x4addd4(0x233)](_0x39a168[_0x4addd4(0x1e9)]));const _0x4b0417=createCommandSpinner(_0x4addd4(0x1df)+_0x39a168[_0x4addd4(0x22b)][_0x4addd4(0x1cd)]+_0x4addd4(0x1ba));_0x4b0417['start']();try{const {result:_0x18c700}=await runTest(_0x4ceafa[_0x4addd4(0x1ec)],_0x39a168,{'agentId':_0xbe886e,'projectId':_0x49e6c8,'site':_0x5a990e['site'],'noEval':![],'evaluatorId':_0x2ba1f4,'onRoundStart':(_0x447e61,_0x211ac4)=>{const _0xd9c00c=_0x4addd4;_0x4b0417[_0xd9c00c(0x1cb)]=_0xd9c00c(0x1de)+(_0x447e61+0x1)+'/'+_0x211ac4+_0xd9c00c(0x1ba);},'onRoundComplete':(_0x361349,_0x5cbfeb,_0x1f2445)=>{const _0x21097c=_0x4addd4,_0x583b83=formatElapsed(_0x5cbfeb);_0x1f2445?console[_0x21097c(0x237)](_0x21097c(0x1f3)+(_0x361349+0x1)+'/'+_0x39a168['rounds'][_0x21097c(0x1cd)]+'...\x20'+a5_0x1ae528[_0x21097c(0x223)]('✓')+'\x20('+_0x583b83+')'):console['log'](_0x21097c(0x1f3)+(_0x361349+0x1)+'/'+_0x39a168['rounds'][_0x21097c(0x1cd)]+_0x21097c(0x204)+a5_0x1ae528[_0x21097c(0x1d2)]('✗'));},'onEvaluationStart':()=>{const _0x3343ae=_0x4addd4;_0x4b0417[_0x3343ae(0x1cb)]=_0x3343ae(0x1c3);},'onEvaluationComplete':_0x412b45=>{const _0x3a9933=_0x4addd4,_0x40f575=formatElapsed(_0x412b45);console[_0x3a9933(0x237)](_0x3a9933(0x1d8)+a5_0x1ae528[_0x3a9933(0x223)]('✓')+'\x20('+_0x40f575+')');}});_0x4b0417[_0x4addd4(0x23b)](),_0x2bf330['push'](_0x18c700);if(_0x18c700['status']==='PASS')console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x223)]('✓\x20PASS:\x20'+_0x18c700[_0x4addd4(0x1be)])+a5_0x1ae528[_0x4addd4(0x200)](_0x4addd4(0x22a)));else _0x18c700[_0x4addd4(0x1d0)]==='FAIL'?console['log'](a5_0x1ae528['red'](_0x4addd4(0x23d)+_0x18c700['reason'])+a5_0x1ae528[_0x4addd4(0x200)](_0x4addd4(0x22a))):console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x1d2)](_0x4addd4(0x1ca)+_0x18c700[_0x4addd4(0x1be)]));_0x18c700[_0x4addd4(0x21c)]&&console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x200)](_0x4addd4(0x1f6)+_0x18c700['conversation_url']));}catch(_0x569d8c){_0x4b0417[_0x4addd4(0x23b)]();const _0x592a6c=_0x569d8c instanceof Error?_0x569d8c[_0x4addd4(0x230)]:String(_0x569d8c);console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x1d2)](_0x4addd4(0x1ca)+_0x592a6c)),_0x2bf330[_0x4addd4(0x1d4)]({'name':_0x39a168['name'],'status':_0x4addd4(0x1af),'reason':_0x592a6c,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}}console['log']();const _0x27552f=Date[_0x4addd4(0x1f8)]()-_0x3db3a0,_0x3f1d6b=_0x2bf330[_0x4addd4(0x1eb)](_0x833f1d=>_0x833f1d[_0x4addd4(0x1d0)]===_0x4addd4(0x1f0))['length'],_0x5f23ce=_0x2bf330['filter'](_0xf08baf=>_0xf08baf[_0x4addd4(0x1d0)]==='FAIL')['length'],_0x408985=_0x2bf330['filter'](_0x1ac553=>_0x1ac553[_0x4addd4(0x1d0)]==='ERROR')[_0x4addd4(0x1cd)];console[_0x4addd4(0x237)]('━'['repeat'](0x3c)),console[_0x4addd4(0x237)](_0x4addd4(0x1fb)),console[_0x4addd4(0x237)]('━'[_0x4addd4(0x205)](0x3c)),console['log'](_0x4addd4(0x207)+_0x2bf330['length']),console[_0x4addd4(0x237)]('Passed:\x20\x20\x20'+a5_0x1ae528[_0x4addd4(0x223)](_0x3f1d6b)),console[_0x4addd4(0x237)](_0x4addd4(0x1d3)+a5_0x1ae528[_0x4addd4(0x1d2)](_0x5f23ce));_0x408985>0x0&&console[_0x4addd4(0x237)]('Errors:\x20\x20\x20'+a5_0x1ae528[_0x4addd4(0x1d2)](_0x408985));console[_0x4addd4(0x237)](_0x4addd4(0x1c2)+formatElapsed(_0x27552f)),console['log']('━'[_0x4addd4(0x205)](0x3c));const _0x3489f3={'summary':{'total':_0x2bf330['length'],'passed':_0x3f1d6b,'failed':_0x5f23ce,'errors':_0x408985>0x0?_0x408985:undefined,'duration_ms':_0x27552f},'tests':_0x2bf330,'agent':{'project':_0x4fa2ba[_0x4addd4(0x1e1)],'name':_0x4fa2ba['agentName'],'site':_0x2a726f},'timestamp':new Date(_0x3db3a0)[_0x4addd4(0x1b5)]()};if(_0x1b4b11!==_0x4addd4(0x1e6)||_0x328f13){const _0x5bcc53=formatResults(_0x3489f3,_0x1b4b11);if(_0x328f13)try{a5_0x61f3f8[_0x4addd4(0x1c9)](_0x328f13,_0x5bcc53,'utf-8'),console[_0x4addd4(0x237)](),console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x200)](_0x4addd4(0x1c6)+_0x328f13));}catch(_0x47e77a){return console[_0x4addd4(0x237)](),console[_0x4addd4(0x237)](a5_0x1ae528[_0x4addd4(0x1d2)](_0x4addd4(0x20b)+_0x47e77a)),0x1;}else console[_0x4addd4(0x237)](),console[_0x4addd4(0x237)](_0x5bcc53);}const _0x39a666=_0x2bf330['filter'](_0x55b0f6=>_0x55b0f6[_0x4addd4(0x1d0)]!==_0x4addd4(0x1f0));return _0x39a666[_0x4addd4(0x1cd)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x1c179f=a6_0x2abc;(function(_0x1b0fa3,_0x333f71){const _0x414cc7=a6_0x2abc,_0x33d8d7=_0x1b0fa3();while(!![]){try{const _0x5a1473=parseInt(_0x414cc7(0x1c9))/0x1*(-parseInt(_0x414cc7(0x1cc))/0x2)+parseInt(_0x414cc7(0x1d2))/0x3+parseInt(_0x414cc7(0x1e8))/0x4*(parseInt(_0x414cc7(0x1ed))/0x5)+-parseInt(_0x414cc7(0x1ee))/0x6*(-parseInt(_0x414cc7(0x1dd))/0x7)+-parseInt(_0x414cc7(0x1f2))/0x8*(parseInt(_0x414cc7(0x1d7))/0x9)+-parseInt(_0x414cc7(0x1c4))/0xa*(parseInt(_0x414cc7(0x1cb))/0xb)+parseInt(_0x414cc7(0x1d0))/0xc;if(_0x5a1473===_0x333f71)break;else _0x33d8d7['push'](_0x33d8d7['shift']());}catch(_0x3ca774){_0x33d8d7['push'](_0x33d8d7['shift']());}}}(a6_0xace0,0xa0951));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a6_0x1c179f(0x1ea),a6_0x1c179f(0x1f0),a6_0x1c179f(0x1af),a6_0x1c179f(0x1f3),'set-cookie2','x-xsrf-token','x-auth-token','x-trino-user']);function a6_0xace0(){const _0x14ae16=['6426dphPzx','data','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','startsWith','.\x20Valid\x20methods:\x20','keys','7rHINti','log','trino','validate','readBodyFromFile','workflow','DELETE','cdp','POST','body','api','4AaovUX','\x0aStack\x20trace:\x0a','authorization','isArray','Results\x20saved\x20to\x20','1663565CLsKHw','1943454uOBier','includes','proxy-authorization','llm','13544SKTpPe','set-cookie','toUpperCase','noColor','Invalid\x20header\x20format:\x20\x22','cookie','Invalid\x20API\x20type:\x20','error','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','has','output','name','Invalid\x20HTTP\x20method:\x20','status','GET','entries','trim','execute','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','indexOf','method','request','description','length','llm-proxy','cas','10KgxoBv','PATCH','substring','join','headers','176zdXXOW','.\x20Valid\x20types:\x20','3660437mxQBGl','3314bgjuGU','site','toLowerCase','verbose','21346260sQAnbG','file','166407cPQKUp','<\x20HTTP/1.1\x20','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','type','Endpoint\x20must\x20start\x20with\x20/:\x20'];a6_0xace0=function(){return _0x14ae16;};return a6_0xace0();}function isSensitiveHeader(_0x434f44){const _0x3b67e8=a6_0x1c179f;return SENSITIVE_HEADERS[_0x3b67e8(0x1b3)](_0x434f44[_0x3b67e8(0x1ce)]());}function a6_0x2abc(_0xb2ab5,_0x133def){_0xb2ab5=_0xb2ab5-0x1ac;const _0xace093=a6_0xace0();let _0x2abc3e=_0xace093[_0xb2ab5];return _0x2abc3e;}function parseHeader(_0x1e63d7){const _0x25eb30=a6_0x1c179f,_0x2dfd4c=_0x1e63d7[_0x25eb30(0x1bd)](':');if(_0x2dfd4c===-0x1)throw new Error(_0x25eb30(0x1ae)+_0x1e63d7+'\x22.\x20'+_0x25eb30(0x1bc));const _0x2888df=_0x1e63d7[_0x25eb30(0x1c6)](0x0,_0x2dfd4c)[_0x25eb30(0x1ba)](),_0x50d092=_0x1e63d7[_0x25eb30(0x1c6)](_0x2dfd4c+0x1)[_0x25eb30(0x1ba)]();if(!_0x2888df)throw new Error(_0x25eb30(0x1b2)+_0x1e63d7+'\x22');return[_0x2888df,_0x50d092];}export class ApiCommand extends BaseCommand{[a6_0x1c179f(0x1b5)]=a6_0x1c179f(0x1e7);[a6_0x1c179f(0x1c0)]=a6_0x1c179f(0x1d4);[a6_0x1c179f(0x1e0)](_0x553768){const _0x240216=a6_0x1c179f,{args:_0x44332f,options:_0x39e59a}=_0x553768,_0x55ac88=_0x39e59a;if(_0x44332f[_0x240216(0x1c1)]===0x0)return _0x240216(0x1d9);const _0x5a47a7=_0x44332f[0x0];if(!_0x5a47a7[_0x240216(0x1da)]('/'))return _0x240216(0x1d6)+_0x5a47a7;const _0x44ea7e=_0x55ac88['data'],_0x430a97=_0x55ac88[_0x240216(0x1d1)];if(_0x44ea7e&&_0x430a97)return'Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.';const _0x31ddfb=_0x55ac88[_0x240216(0x1be)]||_0x240216(0x1b8),_0x55bf26=[_0x240216(0x1b8),_0x240216(0x1e5),'PUT',_0x240216(0x1e3),_0x240216(0x1c5)];if(!_0x55bf26[_0x240216(0x1ef)](_0x31ddfb[_0x240216(0x1ac)]()))return _0x240216(0x1b6)+_0x31ddfb+_0x240216(0x1db)+_0x55bf26[_0x240216(0x1c7)](',\x20');const _0x14e6ce=_0x55ac88['type']||'td',_0x462861=['td',_0x240216(0x1e4),_0x240216(0x1e2),_0x240216(0x1df),_0x240216(0x1f1),_0x240216(0x1c2),_0x240216(0x1c3)];if(!_0x462861[_0x240216(0x1ef)](_0x14e6ce))return _0x240216(0x1b0)+_0x14e6ce+_0x240216(0x1ca)+_0x462861['join'](',\x20');return undefined;}async[a6_0x1c179f(0x1bb)](_0x4ab56d){const _0x4051ea=a6_0x1c179f,{options:_0x2be5e5,args:_0x1b826a,tdx:_0x4c5d83}=_0x4ab56d,_0x1fa3d7=_0x2be5e5,_0x1192bb=_0x1b826a[0x0],_0x2b8c16=(_0x1fa3d7['method']||_0x4051ea(0x1b8))[_0x4051ea(0x1ac)](),_0x2f25b3=_0x1fa3d7[_0x4051ea(0x1d8)],_0x1a0699=_0x1fa3d7['file'],_0x4a4b01=_0x1fa3d7['header'],_0xe59e2d=_0x1fa3d7[_0x4051ea(0x1d5)]||'td';try{const _0x3462e2={};if(_0x4a4b01){const _0x13c1d2=Array[_0x4051ea(0x1eb)](_0x4a4b01)?_0x4a4b01:[_0x4a4b01];for(const _0x385f15 of _0x13c1d2){const [_0x1b9bb,_0x5d819c]=parseHeader(_0x385f15);_0x3462e2[_0x1b9bb]=_0x5d819c;}}let _0x56a5f6;if(_0x2f25b3)_0x56a5f6=_0x2f25b3;else{if(_0x1a0699)try{_0x56a5f6=RawAPI[_0x4051ea(0x1e1)](_0x1a0699);}catch(_0x4de23b){return console[_0x4051ea(0x1b1)]('Error:\x20'+(_0x4de23b instanceof Error?_0x4de23b['message']:String(_0x4de23b))),0x1;}}const _0x1d7bf0={'method':_0x2b8c16,'apiType':_0xe59e2d,'includeHeaders':_0x2be5e5[_0x4051ea(0x1cf)]};_0x56a5f6&&(_0x1d7bf0[_0x4051ea(0x1e6)]=_0x56a5f6);Object[_0x4051ea(0x1dc)](_0x3462e2)[_0x4051ea(0x1c1)]>0x0&&(_0x1d7bf0[_0x4051ea(0x1c8)]=_0x3462e2);if(_0x2be5e5['verbose']){const _0x5e1741=resolveSite(_0x2be5e5[_0x4051ea(0x1cd)]),_0x40f91c=getEndpoint(_0x5e1741,_0xe59e2d),_0x37b7a0=''+_0x40f91c+_0x1192bb;console[_0x4051ea(0x1b1)]('>\x20'+_0x2b8c16+'\x20'+_0x37b7a0);const _0x1845fd=getAuthHeaders(_0x5e1741),_0x496886={..._0x1845fd,..._0x3462e2};for(const [_0x10ab59,_0x4dbbbb]of Object[_0x4051ea(0x1b9)](_0x496886)){!isSensitiveHeader(_0x10ab59)&&console[_0x4051ea(0x1b1)]('>\x20'+_0x10ab59+':\x20'+_0x4dbbbb);}_0x56a5f6&&console['error']('>'),console[_0x4051ea(0x1b1)]('');}const _0x254b83=await _0x4c5d83['api'][_0x4051ea(0x1bf)](_0x1192bb,_0x1d7bf0);if(_0x2be5e5['verbose']&&_0x254b83['headers']){console[_0x4051ea(0x1b1)](_0x4051ea(0x1d3)+_0x254b83[_0x4051ea(0x1b7)]);for(const [_0x3b17a2,_0x7d425e]of Object[_0x4051ea(0x1b9)](_0x254b83['headers'])){!isSensitiveHeader(_0x3b17a2)&&console[_0x4051ea(0x1b1)]('<\x20'+_0x3b17a2+':\x20'+_0x7d425e);}console[_0x4051ea(0x1b1)]('');}const _0x1885d2=Boolean(_0x2be5e5[_0x4051ea(0x1b4)]),_0x3a76f4={'color':_0x2be5e5['color'],'noColor':_0x2be5e5[_0x4051ea(0x1ad)]||_0x1885d2&&!_0x2be5e5['color']},_0x3e3324=colorizeJSON(_0x254b83[_0x4051ea(0x1d8)],_0x3a76f4);return _0x2be5e5['output']?(writeFileSync(_0x2be5e5[_0x4051ea(0x1b4)],_0x3e3324),console['error'](_0x4051ea(0x1ec)+_0x2be5e5[_0x4051ea(0x1b4)])):console[_0x4051ea(0x1de)](_0x3e3324),0x0;}catch(_0x4258cc){return _0x4258cc instanceof Error?(console[_0x4051ea(0x1b1)]('Error:\x20'+_0x4258cc['message']),_0x2be5e5['verbose']&&_0x4258cc['stack']&&console[_0x4051ea(0x1b1)](_0x4051ea(0x1e9)+_0x4258cc['stack'])):console[_0x4051ea(0x1b1)]('Error:\x20'+String(_0x4258cc)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x4e9ffb=a7_0x5cc8;(function(_0x5a3db8,_0x53c917){const _0x307b53=a7_0x5cc8,_0x3ebae8=_0x5a3db8();while(!![]){try{const _0x387ee4=parseInt(_0x307b53(0x153))/0x1+-parseInt(_0x307b53(0x144))/0x2+-parseInt(_0x307b53(0x12f))/0x3+-parseInt(_0x307b53(0x134))/0x4*(-parseInt(_0x307b53(0x11e))/0x5)+-parseInt(_0x307b53(0x11b))/0x6+-parseInt(_0x307b53(0x12a))/0x7*(parseInt(_0x307b53(0x151))/0x8)+-parseInt(_0x307b53(0x125))/0x9*(-parseInt(_0x307b53(0x141))/0xa);if(_0x387ee4===_0x53c917)break;else _0x3ebae8['push'](_0x3ebae8['shift']());}catch(_0x566665){_0x3ebae8['push'](_0x3ebae8['shift']());}}}(a7_0xf15a,0xf2bec));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';function a7_0x5cc8(_0x3a6ea9,_0x485a2f){_0x3a6ea9=_0x3a6ea9-0x10b;const _0xf15a18=a7_0xf15a();let _0x5cc88e=_0xf15a18[_0x3a6ea9];return _0x5cc88e;}import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{deleteOAuthTokens}from'../core/oauth-keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import{isOAuthSupported}from'../core/oauth.js';import{runOAuthLoginFlow}from'./auth-login-command.js';import{promptSiteSelection}from'../core/constants.js';import a7_0x4232ab 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_0x53de96 from'chalk';export class AuthSetupCommand extends BaseCommand{[a7_0x4e9ffb(0x119)]=a7_0x4e9ffb(0x127);[a7_0x4e9ffb(0x11c)]=a7_0x4e9ffb(0x148);async['execute'](_0x57b09e){const _0x4a8cf1=a7_0x4e9ffb,{options:_0x52b467}=_0x57b09e,_0x319ffc=_0x52b467[_0x4a8cf1(0x137)];console[_0x4a8cf1(0x10e)](a7_0x53de96['bold'](_0x4a8cf1(0x120)));const _0x275a14=_0x52b467[_0x4a8cf1(0x154)]||'us01',_0x39996a=await promptSiteSelection(_0x275a14,_0x319ffc,'Setup\x20cancelled');if(!_0x39996a)return 0x1;const _0x259579=resolveSite(_0x39996a);if(isOAuthSupported(_0x259579)){const _0x55838c=await a7_0x4232ab({'type':_0x4a8cf1(0x138),'name':_0x4a8cf1(0x124),'message':'Choose\x20authentication\x20method:','choices':[{'title':_0x4a8cf1(0x131),'value':_0x4a8cf1(0x115)},{'title':_0x4a8cf1(0x156),'value':_0x4a8cf1(0x112)}]});if(!_0x55838c['method'])return console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x12c)),0x1;if(_0x55838c[_0x4a8cf1(0x124)]==='oauth')return await runOAuthLoginFlow(_0x259579,_0x319ffc,_0x52b467[_0x4a8cf1(0x143)]??LogLevel[_0x4a8cf1(0x133)]),0x0;}console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x12d)+_0x259579),console[_0x4a8cf1(0x10e)]('You\x20can\x20find\x20your\x20API\x20key\x20at:'),console['log']('\x20\x20'+getConsoleUrl(_0x259579,_0x4a8cf1(0x136)));const _0x554fc5=await a7_0x4232ab({'type':_0x4a8cf1(0x114),'name':_0x4a8cf1(0x12b),'message':'Enter\x20your\x20TD\x20API\x20key:','validate':_0x46b1a2=>{const _0x106abf=_0x4a8cf1;if(!_0x46b1a2||!_0x46b1a2[_0x106abf(0x10c)]())return _0x106abf(0x146);return!![];}});if(!_0x554fc5[_0x4a8cf1(0x12b)])return console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x12c)),0x1;const _0x43be0b=_0x554fc5[_0x4a8cf1(0x12b)];console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x142));try{const _0x43f2a9=TDX[_0x4a8cf1(0x116)]({'site':_0x259579,'apiKey':_0x43be0b[_0x4a8cf1(0x10c)](),'logLevel':_0x52b467[_0x4a8cf1(0x143)]??LogLevel[_0x4a8cf1(0x133)]}),_0x440a34=await _0x43f2a9['jobs'][_0x4a8cf1(0x145)]();console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x129)+_0x440a34['email']+')');const _0x4fc848=await isKeychainAvailable();_0x4fc848?(await saveAPIKeyAsync(_0x43be0b['trim'](),_0x259579,_0x319ffc),console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x10b)+(_0x319ffc?_0x4a8cf1(0x147)+_0x319ffc+')':''))):(console[_0x4a8cf1(0x126)](a7_0x53de96[_0x4a8cf1(0x111)](_0x4a8cf1(0x13b))),console[_0x4a8cf1(0x126)](a7_0x53de96['yellow']('\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.')));if(_0x319ffc){const _0x1aa422={'site':_0x259579};saveProfileToUserConfig(_0x319ffc,_0x1aa422),console[_0x4a8cf1(0x10e)]('✓\x20Profile\x20\x27'+_0x319ffc+_0x4a8cf1(0x121));}else saveDefaultSiteToUserConfig(_0x259579),console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x10d)+_0x259579);const _0xb992f=_0x319ffc?_0x4a8cf1(0x14f)+_0x319ffc:'';return console['log'](),console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x110)),console['log'](_0x4a8cf1(0x150)+_0xb992f+_0x4a8cf1(0x14b)),console[_0x4a8cf1(0x10e)](_0x4a8cf1(0x150)+_0xb992f+'\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases'),0x0;}catch(_0x517287){if(_0x517287 instanceof HTTPClientError&&_0x517287[_0x4a8cf1(0x14c)]===0x191)return printAuthError(_0x517287),0x1;return console[_0x4a8cf1(0x158)](a7_0x53de96[_0x4a8cf1(0x122)](_0x4a8cf1(0x140)+(_0x517287 instanceof Error?_0x517287[_0x4a8cf1(0x117)]:String(_0x517287)))),console[_0x4a8cf1(0x158)](_0x4a8cf1(0x12e)),0x1;}}}export class AuthStatusCommand extends BaseCommand{['name']=a7_0x4e9ffb(0x11a);['description']=a7_0x4e9ffb(0x159);async['execute'](_0x5ac0b2){const _0x23d59d=a7_0x4e9ffb,{options:_0x29aea8,tdx:_0x20abe0}=_0x5ac0b2,_0x2e4b73=_0x29aea8[_0x23d59d(0x154)],_0x11dc13=_0x29aea8[_0x23d59d(0x137)],_0x3945d2=_0x11dc13?_0x11dc13:_0x23d59d(0x14a);console[_0x23d59d(0x10e)](_0x23d59d(0x11d)+_0x3945d2+_0x23d59d(0x135)+_0x2e4b73+')');const _0x5acbdd=await getOAuthTokens(_0x11dc13);if(_0x5acbdd)console[_0x23d59d(0x10e)]('Credential\x20type:\x20OAuth'),console[_0x23d59d(0x10e)]('Read\x20credential\x20from\x20keychain'+(_0x11dc13?_0x23d59d(0x147)+_0x11dc13+')':''));else{const _0x2a872a=await resolveAPIKeyAsync(_0x2e4b73,_0x11dc13);if(_0x2a872a){const {source:_0x2ed289,isDeprecated:_0xca7415}=_0x2a872a,_0x27a901='Read\x20credential\x20from\x20'+_0x2ed289;console[_0x23d59d(0x10e)](_0xca7415?a7_0x53de96[_0x23d59d(0x111)](_0x27a901):_0x27a901);}else console[_0x23d59d(0x10e)](a7_0x53de96[_0x23d59d(0x111)](_0x23d59d(0x14d)));}try{const _0x5ceafc=await _0x20abe0[_0x23d59d(0x128)][_0x23d59d(0x145)]();return console[_0x23d59d(0x10e)](a7_0x53de96[_0x23d59d(0x139)](_0x23d59d(0x123))),console[_0x23d59d(0x10e)](_0x23d59d(0x157)+_0x5ceafc[_0x23d59d(0x130)]),(_0x5ceafc[_0x23d59d(0x11f)]||_0x5ceafc['last_name'])&&console[_0x23d59d(0x10e)](_0x23d59d(0x113)+[_0x5ceafc['first_name'],_0x5ceafc[_0x23d59d(0x13f)]][_0x23d59d(0x13c)](Boolean)[_0x23d59d(0x132)]('\x20')),0x0;}catch(_0x50afa4){return _0x50afa4 instanceof HTTPClientError&&_0x50afa4[_0x23d59d(0x14c)]===0x191?printAuthError(_0x50afa4,!![],_0x11dc13):console[_0x23d59d(0x158)](a7_0x53de96[_0x23d59d(0x122)]('✗\x20Validation\x20failed:\x20'+(_0x50afa4 instanceof Error?_0x50afa4[_0x23d59d(0x117)]:String(_0x50afa4)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a7_0x4e9ffb(0x119)]=a7_0x4e9ffb(0x155);[a7_0x4e9ffb(0x11c)]=a7_0x4e9ffb(0x14e);async[a7_0x4e9ffb(0x10f)](_0x216583){const _0xb0d5ae=a7_0x4e9ffb,{options:_0x310248}=_0x216583,_0x3adff6=_0x310248['profile'];console[_0xb0d5ae(0x10e)](a7_0x53de96['bold']('tdx:\x20auth\x20clear'));const _0x424d37=await isKeychainAvailable();if(!_0x424d37)return console[_0xb0d5ae(0x158)](a7_0x53de96[_0xb0d5ae(0x122)](_0xb0d5ae(0x13a))),0x1;const [_0x17f548,_0x4aad1e]=await Promise[_0xb0d5ae(0x149)]([deleteKeychainAPIKey(_0x3adff6),deleteOAuthTokens(_0x3adff6)]);if(_0x17f548||_0x4aad1e){clearCredentialCache();const _0x30105c=[_0x17f548&&_0xb0d5ae(0x13e),_0x4aad1e&&'OAuth\x20tokens']['filter'](Boolean)['join'](_0xb0d5ae(0x118));return console[_0xb0d5ae(0x10e)]('✓\x20'+_0x30105c+_0xb0d5ae(0x13d)+(_0x3adff6?_0xb0d5ae(0x147)+_0x3adff6+')':'')),0x0;}else return console[_0xb0d5ae(0x10e)]('No\x20credentials\x20found\x20in\x20keychain'+(_0x3adff6?_0xb0d5ae(0x152)+_0x3adff6:'')),0x1;}}function a7_0xf15a(){const _0x43e034=['✗\x20Validation\x20failed:\x20','2860710sZBrel','Validating\x20API\x20key...','logLevel','1988758vltlmY','getUserInfo','API\x20key\x20cannot\x20be\x20empty','\x20(profile:\x20','Setup\x20API\x20key\x20authentication\x20interactively','all','N/A','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','status','No\x20credential\x20found','Remove\x20API\x20key\x20from\x20system\x20keychain','\x20--profile\x20','\x20\x20tdx','1192656OWPsEn','\x20for\x20profile:\x20','153647zXionj','site','auth:clear','API\x20Key','User:\x20','error','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','trim','✓\x20Default\x20site\x20set\x20to\x20','log','execute','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','yellow','apikey','Name:\x20','password','oauth','create','message','\x20and\x20','name','auth','1056966nvKdpM','description','tdx\x20profile:\x20','85IyWqZY','first_name','tdx:\x20auth\x20setup','\x27\x20registered','red','✓\x20Authentication\x20successful\x0a','method','81QhoJKC','warn','auth:setup','jobs','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','63srccXb','apiKey','\x0aSetup\x20cancelled','Setting\x20up\x20authentication\x20for\x20site:\x20','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','3049803GUAYJi','email','OAuth\x20(browser\x20login)','join','ERROR','422324zpLZry','\x20(site:\x20','/app/mp/ak','profile','select','green','System\x20keychain\x20is\x20not\x20available','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','filter','\x20removed\x20from\x20keychain','API\x20key','last_name'];a7_0xf15a=function(){return _0x43e034;};return a7_0xf15a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x56d19c=a8_0x246d;(function(_0x1d9584,_0x1448a4){const _0x3b5b8a=a8_0x246d,_0x1f1c33=_0x1d9584();while(!![]){try{const _0x3a4c1e=parseInt(_0x3b5b8a(0x1f6))/0x1*(parseInt(_0x3b5b8a(0x1fc))/0x2)+parseInt(_0x3b5b8a(0x1f5))/0x3*(-parseInt(_0x3b5b8a(0x21a))/0x4)+parseInt(_0x3b5b8a(0x208))/0x5*(-parseInt(_0x3b5b8a(0x217))/0x6)+-parseInt(_0x3b5b8a(0x1ff))/0x7+-parseInt(_0x3b5b8a(0x212))/0x8+parseInt(_0x3b5b8a(0x209))/0x9+parseInt(_0x3b5b8a(0x20f))/0xa*(parseInt(_0x3b5b8a(0x219))/0xb);if(_0x3a4c1e===_0x1448a4)break;else _0x1f1c33['push'](_0x1f1c33['shift']());}catch(_0x2d414c){_0x1f1c33['push'](_0x1f1c33['shift']());}}}(a8_0x5616,0x55754));import{BaseCommand}from'./command.js';import{resolveSite}from'../core/config.js';function a8_0x5616(){const _0x4b6a0d=['logLevel','Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.','green','Login\x20via\x20OAuth\x20(opens\x20browser)','execute','10MOETNC','1470915hVbIMG','✓\x20Profile\x20\x27','auth:login','✓\x20Authentication\x20successful\x20(User:\x20','✓\x20OAuth\x20tokens\x20saved\x20to\x20system\x20keychain','site','10607880dWGlGT','tdx:\x20auth\x20login','\x27\x20registered','1533368GlOumS','OAuth\x20login\x20is\x20not\x20yet\x20available\x20for\x20site:\x20','us01','access_token','\x20\x20tdx','2016348oauuSE','log','11ROCPoB','8852FjRjFD','email','Authenticating\x20via\x20OAuth\x20for\x20site:\x20','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','258IbiDDe','16mKRnQs','Waiting\x20for\x20authorization\x20(timeout:\x202\x20minutes)...','\x20(profile:\x20','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','create','description','72626uRzMPn','\x20--profile\x20','/oauth/authorize','2807630JdkmCN','Opening\x20browser\x20for\x20authentication...','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','ERROR'];a8_0x5616=function(){return _0x4b6a0d;};return a8_0x5616();}import{saveProfileToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{isKeychainAvailable}from'../core/keychain.js';import{saveOAuthTokens}from'../core/oauth-keychain.js';import{startOAuthFlow,isOAuthSupported}from'../core/oauth.js';import{promptSiteSelection}from'../core/constants.js';import{TDX}from'../sdk/index.js';function a8_0x246d(_0xea2b4d,_0x3edda7){_0xea2b4d=_0xea2b4d-0x1f2;const _0x5616fd=a8_0x5616();let _0x246d72=_0x5616fd[_0xea2b4d];return _0x246d72;}import{LogLevel}from'../utils/tdx-logger.js';import a8_0x3bef8d from'chalk';export async function runOAuthLoginFlow(_0x52fdad,_0x412a97,_0x2e32ae){const _0x12bf87=a8_0x246d;if(!isOAuthSupported(_0x52fdad))throw new Error(_0x12bf87(0x213)+_0x52fdad+'.\x20'+'OAuth\x20is\x20currently\x20supported\x20on\x20dev-us01\x20and\x20dev-eu01\x20only.\x20'+_0x12bf87(0x204));const _0x29474e=await isKeychainAvailable();if(!_0x29474e)throw new Error('System\x20keychain\x20is\x20not\x20available.\x20OAuth\x20tokens\x20cannot\x20be\x20saved.\x20'+_0x12bf87(0x204));const _0x7fdee9=getConsoleUrl(_0x52fdad);console[_0x12bf87(0x218)](_0x12bf87(0x200)),console[_0x12bf87(0x218)]('\x20\x20'+_0x7fdee9+_0x12bf87(0x1fe)),console[_0x12bf87(0x218)](_0x12bf87(0x1f7));const _0x368948=await startOAuthFlow(_0x52fdad);console[_0x12bf87(0x218)]('Validating\x20OAuth\x20tokens...');const _0xb4009e=TDX[_0x12bf87(0x1fa)]({'site':_0x52fdad,'accessToken':_0x368948[_0x12bf87(0x215)],'logLevel':_0x2e32ae??LogLevel[_0x12bf87(0x202)]}),_0x4e4300=await _0xb4009e['jobs']['getUserInfo']();console[_0x12bf87(0x218)](a8_0x3bef8d[_0x12bf87(0x205)](_0x12bf87(0x20c)+_0x4e4300[_0x12bf87(0x1f2)]+')')),await saveOAuthTokens(_0x368948,_0x412a97),console['log'](_0x12bf87(0x20d)+(_0x412a97?_0x12bf87(0x1f8)+_0x412a97+')':''));if(_0x412a97){const _0x35fd5b={'site':_0x52fdad};saveProfileToUserConfig(_0x412a97,_0x35fd5b),console[_0x12bf87(0x218)](_0x12bf87(0x20a)+_0x412a97+_0x12bf87(0x211));}const _0x1142ee=_0x412a97?_0x12bf87(0x1fd)+_0x412a97:'';console[_0x12bf87(0x218)](),console['log'](_0x12bf87(0x201)),console['log']('\x20\x20tdx'+_0x1142ee+_0x12bf87(0x1f9)),console[_0x12bf87(0x218)](_0x12bf87(0x216)+_0x1142ee+_0x12bf87(0x1f4));}export class AuthLoginCommand extends BaseCommand{['name']=a8_0x56d19c(0x20b);[a8_0x56d19c(0x1fb)]=a8_0x56d19c(0x206);async[a8_0x56d19c(0x207)](_0x57137a){const _0x17bec5=a8_0x56d19c,{options:_0x357f37}=_0x57137a,_0x4ed82f=_0x357f37['profile'];console[_0x17bec5(0x218)](a8_0x3bef8d['bold'](_0x17bec5(0x210)));const _0x41567d=_0x357f37[_0x17bec5(0x20e)]||_0x17bec5(0x214),_0x2bc543=await promptSiteSelection(_0x41567d,_0x4ed82f,'Login\x20cancelled');if(!_0x2bc543)return 0x1;const _0x577bea=resolveSite(_0x2bc543);return console[_0x17bec5(0x218)](_0x17bec5(0x1f3)+_0x577bea),await runOAuthLoginFlow(_0x577bea,_0x4ed82f,_0x357f37[_0x17bec5(0x203)]??LogLevel['ERROR']),0x0;}}
|