@treasuredata/tdx 2026.3.37 → 2026.3.38
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.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +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.d.ts +8 -2
- package/dist/commands/work-command.d.ts.map +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/work-command.js.map +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.d.ts.map +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js.map +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.d.ts +9 -7
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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/push-workflow.js.map +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.d.ts +3 -0
- package/dist/sdk/segment/types/activation-schema.d.ts.map +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js.map +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/cas.d.ts +2 -1
- package/dist/sdk/types/cas.d.ts.map +1 -1
- package/dist/sdk/types/cdp.d.ts +16 -1
- package/dist/sdk/types/cdp.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +19 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/types/workspace.js.map +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.d.ts +12 -4
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +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_0x5f5a84=a3_0x4218;(function(_0x260beb,_0x432296){const _0x16a424=a3_0x4218,_0x342817=_0x260beb();while(!![]){try{const _0x103bd4=parseInt(_0x16a424(0x81))/0x1*(parseInt(_0x16a424(0x7d))/0x2)+-parseInt(_0x16a424(0x8f))/0x3+-parseInt(_0x16a424(0x80))/0x4+-parseInt(_0x16a424(0x83))/0x5+-parseInt(_0x16a424(0x96))/0x6+-parseInt(_0x16a424(0x9a))/0x7+-parseInt(_0x16a424(0x91))/0x8*(-parseInt(_0x16a424(0x8c))/0x9);if(_0x103bd4===_0x432296)break;else _0x342817['push'](_0x342817['shift']());}catch(_0x565c3f){_0x342817['push'](_0x342817['shift']());}}}(a3_0x615a,0x8ecba));import{BaseCommand}from'./command.js';function a3_0x615a(){const _0xa9a203=['\x27...','Error:\x20Segment\x20name\x20is\x20required','910614mQIxha','Resolved\x20parent\x20ID:\x20','Child\x20name:\x20','3223304cRUDMj','2lgjMBT','Error:\x20','2036960dVhEKu','segment','\x20activation','description','cause','Site:\x20','resolveParentId','Listing\x20activations\x20for\x20segment\x20\x27','error','63XZNQGe','resolveSegmentId','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','76455NEkwtl','Resolving\x20child\x20segment\x20\x27','3541136NGRXzf','✔\x20Found\x20','data','\x20\x20Cause:\x20','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','6108954WUkFzm','Resolved\x20child\x20ID:\x20','Parent\x20name:\x20','listActivations','8171492vTjKHR','Resolving\x20parent\x20segment\x20\x27','activations','verbose','name','List\x20activations\x20for\x20a\x20segment','length'];a3_0x615a=function(){return _0xa9a203;};return a3_0x615a();}import{SDKError}from'../sdk/index.js';function a3_0x4218(_0x444c5a,_0x1e8411){_0x444c5a=_0x444c5a-0x7c;const _0x615a51=a3_0x615a();let _0x4218ab=_0x615a51[_0x444c5a];return _0x4218ab;}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_0x5f5a84(0x9e)]=a3_0x5f5a84(0x9c);[a3_0x5f5a84(0x86)]=a3_0x5f5a84(0x9f);async['execute'](_0x38bafb){const _0x5721c3=a3_0x5f5a84,{options:_0x3db479,args:_0x536046,tdx:_0x54be58}=_0x38bafb;if(_0x536046['length']===0x0)return console['error'](_0x5721c3(0x7c)),console[_0x5721c3(0x8b)](_0x5721c3(0x8e)),0x1;try{const {parentId:_0x37ede0,childId:_0x5f3d47}=parseSegmentRef(_0x536046[0x0]);if(!_0x5f3d47)return console[_0x5721c3(0x8b)](_0x5721c3(0x95)),console[_0x5721c3(0x8b)](_0x5721c3(0x8e)),0x1;_0x3db479[_0x5721c3(0x9d)]&&(console['error'](_0x5721c3(0x88)+_0x3db479['site']),console[_0x5721c3(0x8b)](_0x5721c3(0x98)+_0x37ede0),console[_0x5721c3(0x8b)](_0x5721c3(0x7f)+_0x5f3d47));const _0x59f29b=await withSpinner(_0x5721c3(0x9b)+_0x37ede0+_0x5721c3(0xa1),()=>_0x54be58[_0x5721c3(0x84)][_0x5721c3(0x89)](_0x37ede0),{'verbose':_0x3db479['verbose']}),_0x3c0055=_0x59f29b['data'];_0x3db479[_0x5721c3(0x9d)]&&console[_0x5721c3(0x8b)](_0x5721c3(0x7e)+_0x3c0055);const _0x25c555=await withSpinner(_0x5721c3(0x90)+_0x5f3d47+_0x5721c3(0xa1),()=>_0x54be58[_0x5721c3(0x84)][_0x5721c3(0x8d)](_0x3c0055,_0x5f3d47),{'verbose':_0x3db479[_0x5721c3(0x9d)]}),_0x2a7d2b=_0x25c555[_0x5721c3(0x93)];_0x3db479[_0x5721c3(0x9d)]&&console[_0x5721c3(0x8b)](_0x5721c3(0x97)+_0x2a7d2b);const _0x38be85=await withSpinner(_0x5721c3(0x8a)+_0x5f3d47+_0x5721c3(0xa1),()=>_0x54be58[_0x5721c3(0x84)][_0x5721c3(0x99)](_0x3c0055,_0x2a7d2b),{'verbose':_0x3db479[_0x5721c3(0x9d)]}),_0x47a4fc=_0x38be85['data'];return console[_0x5721c3(0x8b)](_0x5721c3(0x92)+_0x47a4fc[_0x5721c3(0xa0)]+_0x5721c3(0x85)+(_0x47a4fc['length']!==0x1?'s':'')),await handleSDKOutput(_0x47a4fc,_0x3db479),0x0;}catch(_0x182bf1){if(_0x182bf1 instanceof SDKError)return console[_0x5721c3(0x8b)](_0x5721c3(0x82)+_0x182bf1['message']),_0x182bf1[_0x5721c3(0x87)]&&console[_0x5721c3(0x8b)](_0x5721c3(0x94)+_0x182bf1[_0x5721c3(0x87)]),0x1;throw _0x182bf1;}}}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a4_0x7d8d69=a4_0x26c5;(function(_0x38a6da,_0x1fc88e){const _0x30fb35=a4_0x26c5,_0x118465=_0x38a6da();while(!![]){try{const _0x5102cb=parseInt(_0x30fb35(0x15d))/0x1+-parseInt(_0x30fb35(0xf4))/0x2*(parseInt(_0x30fb35(0x14e))/0x3)+-parseInt(_0x30fb35(0x186))/0x4*(parseInt(_0x30fb35(0x188))/0x5)+-parseInt(_0x30fb35(0xfc))/0x6+-parseInt(_0x30fb35(0x192))/0x7*(parseInt(_0x30fb35(0x12e))/0x8)+parseInt(_0x30fb35(0x14c))/0x9*(-parseInt(_0x30fb35(0x134))/0xa)+parseInt(_0x30fb35(0xe8))/0xb;if(_0x5102cb===_0x1fc88e)break;else _0x118465['push'](_0x118465['shift']());}catch(_0x4e27c8){_0x118465['push'](_0x118465['shift']());}}}(a4_0x1161,0x9bd04));import a4_0x457fb9 from'chalk';import a4_0x4141d4 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_0x26c5(_0x4aa4f1,_0x165fd1){_0x4aa4f1=_0x4aa4f1-0xdc;const _0x1161a8=a4_0x1161();let _0x26c570=_0x1161a8[_0x4aa4f1];return _0x26c570;}function formatCountSummary(_0x2a8a6a){const _0x18411b=a4_0x26c5,_0x4783e6=[];if(_0x2a8a6a['total']!==undefined)_0x4783e6[_0x18411b(0x189)](_0x2a8a6a['total']+_0x18411b(0x141));if(_0x2a8a6a[_0x18411b(0x109)]!==undefined&&_0x2a8a6a[_0x18411b(0x109)]>0x0)_0x4783e6[_0x18411b(0x189)](a4_0x457fb9[_0x18411b(0x16e)](_0x2a8a6a['new']+_0x18411b(0x169)));if(_0x2a8a6a[_0x18411b(0x114)]!==undefined&&_0x2a8a6a[_0x18411b(0x114)]>0x0)_0x4783e6['push'](a4_0x457fb9[_0x18411b(0x16e)](_0x2a8a6a[_0x18411b(0x114)]+'\x20created'));if(_0x2a8a6a['updated']!==undefined&&_0x2a8a6a[_0x18411b(0x159)]>0x0)_0x4783e6[_0x18411b(0x189)](a4_0x457fb9[_0x18411b(0x16a)](_0x2a8a6a[_0x18411b(0x159)]+'\x20updated'));if(_0x2a8a6a[_0x18411b(0x10f)]!==undefined&&_0x2a8a6a[_0x18411b(0x10f)]>0x0)_0x4783e6[_0x18411b(0x189)](a4_0x457fb9['gray'](_0x2a8a6a['unchanged']+_0x18411b(0x17e)));if(_0x2a8a6a[_0x18411b(0x105)]!==undefined&&_0x2a8a6a[_0x18411b(0x105)]>0x0)_0x4783e6['push'](a4_0x457fb9['red'](_0x2a8a6a[_0x18411b(0x105)]+_0x18411b(0xf7)));return _0x4783e6[_0x18411b(0xf5)](',\x20');}function displayDiffs(_0x122bbc,_0x3d500f,_0x5023c0,_0x3fe65e,_0x4b70b3,_0x1c578e,_0x249312){const _0x17fd86=a4_0x26c5;for(const _0x232759 of _0x122bbc){if(_0x232759['diff']){const _0x551b52=_0x232759[_0x17fd86(0x150)]||_0x232759[_0x17fd86(0x153)];console['log'](_0x17fd86(0x165)+_0x551b52+'\x27:'),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)),console['log'](_0x232759['diff']),console['log']('─'[_0x17fd86(0x176)](0x3c));}}for(const _0x1c1784 of _0x3d500f){_0x1c1784[_0x17fd86(0x13c)]&&(console['log'](_0x17fd86(0xdd)+_0x1c1784[_0x17fd86(0x153)]+'\x27:'),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)),console['log'](_0x1c1784[_0x17fd86(0x13c)]),console['log']('─'[_0x17fd86(0x176)](0x3c)));}for(const _0x12cffb of _0x5023c0){_0x12cffb[_0x17fd86(0x13c)]&&(console[_0x17fd86(0x133)](_0x17fd86(0x137)+_0x12cffb[_0x17fd86(0x153)]+'\x27:'),console[_0x17fd86(0x133)]('─'['repeat'](0x3c)),console[_0x17fd86(0x133)](_0x12cffb[_0x17fd86(0x13c)]),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)));}for(const _0x1f1ccc of _0x3fe65e){_0x1f1ccc[_0x17fd86(0x13c)]&&(console[_0x17fd86(0x133)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x1f1ccc[_0x17fd86(0x153)]+'\x27:'),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)),console[_0x17fd86(0x133)](_0x1f1ccc[_0x17fd86(0x13c)]),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)));}for(const _0x3c8bb4 of _0x4b70b3){_0x3c8bb4[_0x17fd86(0x13c)]&&(console[_0x17fd86(0x133)](_0x17fd86(0x104)+_0x3c8bb4[_0x17fd86(0x153)]+'\x27:'),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)),console['log'](_0x3c8bb4[_0x17fd86(0x13c)]),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)));}for(const _0x4742b5 of _0x1c578e){_0x4742b5[_0x17fd86(0x13c)]&&(console[_0x17fd86(0x133)](_0x17fd86(0xed)+_0x4742b5[_0x17fd86(0x153)]+'\x27:'),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)),console[_0x17fd86(0x133)](_0x4742b5[_0x17fd86(0x13c)]),console[_0x17fd86(0x133)]('─'['repeat'](0x3c)));}for(const _0xbfa8a1 of _0x249312){_0xbfa8a1[_0x17fd86(0x13c)]&&(console[_0x17fd86(0x133)](_0x17fd86(0xff)+_0xbfa8a1[_0x17fd86(0x153)]+'\x27:'),console[_0x17fd86(0x133)]('─'[_0x17fd86(0x176)](0x3c)),console[_0x17fd86(0x133)](_0xbfa8a1['diff']),console['log']('─'['repeat'](0x3c)));}}function a4_0x1161(){const _0x3358ba=['Using\x20project\x20from\x20','llmProject','\x20\x20Prompts:\x20','projectName','\x20--profile\x20','force','agent.yml','agent:push','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','agents','newProjectId','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','\x20|\x20','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','outputDir','6583816QEjFvr','llm_project','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','isNew','experimentalKnowledgeBases','log','110LvwOmi','cyan','\x0aError:','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','total','gray','✔\x20Context\x20set:\x20','prompts','diff','\x0aPull\x20summary\x20for\x20\x27','Cannot\x20clone\x20from\x20context\x20project\x20\x22','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','utf-8','\x20total','Agent:\x20','no_local_folder','Analyzing\x20project\x20\x22','\x20resources?','site','Using\x20project\x20from\x20context:\x20','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','Pulling\x20agent\x20\x22','Chat:\x20','927621oFDzUQ','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','39taQOkP','integrations','agentName','Agent\x20pulled\x20successfully','source','name','pullProject','\x20\x20Experimental\x20Artifacts:\x20','\x20\x20Text\x20Knowledge\x20Base\x20\x22','No\x20tdx.json\x20found\x20in\x20','red','updated','sourceProjectName','session','pushProject','634435DMZvfr','description','Cancelled','\x20changed','agent:clone','cloneProject','\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)','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','\x0aChanges\x20to\x20agent\x20\x27','\x20\x20Knowledge\x20Bases:\x20','dim','New\x20project\x20name\x20is\x20required','\x20new','yellow','\x22:\x20','\x0aErrors\x20found:','projectDir','green','Writing\x20files...','dirname','agentId','projectId','\x20\x20Knowledge\x20Base\x20\x22','Project:\x20','dryRun','repeat','textKnowledgeBases','Status:\x20','error','Using\x20project:\x20','arg-dir','\x0aProject\x20pushed\x20with\x20errors','\x0aWrite\x20','\x20unchanged','Errors:','Project\x20cloned\x20with\x20errors','\x22...','message','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','\x20\x20Agents:\x20','\x20\x20Experimental\x20Artifact\x20\x22','31612aUITXz','\x20\x20Integrations:\x20','555WMPJud','push','output','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','pushAgent','New\x20project:\x20','\x0aChanges:','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','cwd-config','Would\x20pull\x20agent:\x20','7SQFcAM','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','INVALID_ARGUMENT','Project\x20cloned\x20successfully','\x20resources\x20to\x20\x27','Using\x20current\x20project:\x20','\x22\x20to\x20a\x20different\x20profile','\x22\x20to\x20\x22','Using\x20local\x20project:\x20','\x0aPush\x20','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','parse','34385912OZgkng','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','context','Analyzing\x20changes\x20to\x20push...','<new-name>','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','\x20files?','experimentalArtifacts','action','MISSING_ARGUMENT','Agent\x20','\x20\x20Source:\x20','9566xrELqt','join','tdx.json','\x20errors','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','\x20\x20Target:\x20','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','-\x20no\x20files\x20written','1356402wubtwl','Failed\x20to\x20push\x20agent:\x20','counts','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','\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','agent','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','hasChanges','\x0aChanges\x20to\x20integration\x20\x27','errors','\x22\x20from\x20project\x20\x22','\x27\x20to\x20create\x20the\x20folder\x20structure.','\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','new','\x20=\x20','Clone\x20\x22','\x0a✔\x20Pushed\x20','found','\x20successfully','unchanged','yes','llm','Source:\x20','outputPath','created','knowledgeBases','\x20\x20Prompt\x20\x22','\x20\x20Text\x20Knowledge\x20Bases:\x20','\x20\x20Agent\x20\x22','\x20\x20Integration\x20\x22','cwd','reason','Would\x20clone:','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','\x20\x20tdx\x20agent\x20pull\x20'];a4_0x1161=function(){return _0x3358ba;};return a4_0x1161();}export class AgentPullCommand extends BaseCommand{['name']='agent:pull';[a4_0x7d8d69(0x15e)]=a4_0x7d8d69(0x18b);async['execute'](_0x2005d1){const _0x1aa119=a4_0x7d8d69,{options:_0x1129b7,args:_0x37c8f8,tdx:_0x219e15}=_0x2005d1,_0x2d9ebc=_0x37c8f8[0x0],_0x337615=_0x37c8f8[0x1],_0x2ae531=_0x1129b7[_0x1aa119(0x18a)],_0x3720f1=_0x1129b7['dryRun'],_0x44b159=_0x1129b7[_0x1aa119(0x124)],_0x5b87bb=_0x1129b7[_0x1aa119(0x110)],_0x1f10e4=_0x1129b7[_0x1aa119(0x120)],_0x2158ad=_0x1129b7[_0x1aa119(0x101)];let _0x5223fa;if(_0x2d9ebc){const _0x594289=a4_0x4141d4['join'](_0x2d9ebc,_0x1aa119(0xf6));if(existsSync(_0x594289))try{const _0x1a5b6e=JSON[_0x1aa119(0xe7)](readFileSync(_0x594289,_0x1aa119(0x140)));_0x1a5b6e[_0x1aa119(0x12f)]&&(_0x5223fa={'llm_project':_0x1a5b6e[_0x1aa119(0x12f)]});}catch{}}const _0x48b08a=findAgentConfigPath(process[_0x1aa119(0x11a)]());let _0xe243b;if(_0x48b08a)try{const _0x444578=JSON['parse'](readFileSync(_0x48b08a,_0x1aa119(0x140)));_0x444578[_0x1aa119(0x12f)]&&(_0xe243b={'llm_project':_0x444578[_0x1aa119(0x12f)]});}catch{}const _0x2758d2=resolveAgentPullArgs({'arg':_0x2d9ebc,'agentNameArg':_0x337615,'agentFlag':_0x2158ad,'contextProject':_0x1f10e4,'argDirConfig':_0x5223fa,'cwdConfigPath':_0x48b08a||undefined,'cwdConfig':_0xe243b}),{projectNameOrId:_0xf2fe7b,targetAgentName:_0x57208a,existingOutputDir:_0x19562c,source:_0x39b0fb}=_0x2758d2;if(_0x39b0fb===_0x1aa119(0x17b))console[_0x1aa119(0x133)](a4_0x457fb9['dim'](_0x1aa119(0x11f)+a4_0x4141d4[_0x1aa119(0xf5)](_0x2d9ebc,'tdx.json')+':\x20'+_0xf2fe7b));else{if(_0x39b0fb===_0x1aa119(0x190))console[_0x1aa119(0x133)](a4_0x457fb9['dim'](_0x1aa119(0x17a)+_0xf2fe7b));else _0x39b0fb===_0x1aa119(0xea)&&console['log'](a4_0x457fb9[_0x1aa119(0x167)](_0x1aa119(0x147)+_0xf2fe7b));}if(!_0xf2fe7b)return _0x2158ad?(console['log'](a4_0x457fb9[_0x1aa119(0x16a)](_0x1aa119(0x164))),console['log']('Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>'),console[_0x1aa119(0x133)](_0x1aa119(0x13f))):(console[_0x1aa119(0x133)](a4_0x457fb9[_0x1aa119(0x16a)](_0x1aa119(0x148))),console['log']('Usage:\x20tdx\x20agent\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x1aa119(0x133)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project'),console[_0x1aa119(0x133)]('\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'](_0x1aa119(0x108)),console['log'](_0x1aa119(0x100))),0x1;if(_0x57208a){const {data:_0xa8b32a}=await withSpinner(_0x1aa119(0x14a)+_0x57208a+_0x1aa119(0x106)+_0xf2fe7b+_0x1aa119(0x181),()=>_0x219e15['llm']['pullAgent'](_0xf2fe7b,_0x57208a,_0x2ae531,{'dryRun':_0x3720f1,'force':_0x44b159}));if(_0x3720f1)return console[_0x1aa119(0x133)](a4_0x457fb9[_0x1aa119(0x16a)]('Dry\x20run\x20-\x20no\x20files\x20written')),console['log'](_0x1aa119(0x191)+_0xa8b32a[_0x1aa119(0x150)]),console[_0x1aa119(0x133)]('Output\x20path:\x20'+_0xa8b32a[_0x1aa119(0x113)]),_0xa8b32a[_0x1aa119(0x13c)]&&(console[_0x1aa119(0x133)](_0x1aa119(0x18e)),console[_0x1aa119(0x133)]('─'[_0x1aa119(0x176)](0x3c)),console['log'](_0xa8b32a[_0x1aa119(0x13c)]),console[_0x1aa119(0x133)]('─'[_0x1aa119(0x176)](0x3c))),0x0;return console['log'](a4_0x457fb9[_0x1aa119(0x16e)](_0x1aa119(0x151))),console['log']('Agent:\x20'+_0xa8b32a[_0x1aa119(0x150)]),console[_0x1aa119(0x133)]('Output:\x20'+_0xa8b32a[_0x1aa119(0x113)]),console[_0x1aa119(0x133)](_0x1aa119(0x178)+(_0xa8b32a[_0x1aa119(0x131)]?a4_0x457fb9[_0x1aa119(0x16e)]('new'):_0xa8b32a[_0x1aa119(0x103)]?a4_0x457fb9[_0x1aa119(0x16a)]('updated'):a4_0x457fb9[_0x1aa119(0x139)]('unchanged'))),0x0;}const _0x11f2f2=_0x19562c||_0x2ae531,{data:_0x335911}=await withSpinner(_0x1aa119(0x144)+_0xf2fe7b+_0x1aa119(0x181),()=>_0x219e15[_0x1aa119(0x111)]['pullProject'](_0xf2fe7b,_0x11f2f2,{'dryRun':!![]})),_0x1c9287=_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x128)][_0x1aa119(0x109)]+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x115)][_0x1aa119(0x109)]+_0x335911[_0x1aa119(0xfe)]['textKnowledgeBases']['new']+_0x335911['counts'][_0x1aa119(0x13b)][_0x1aa119(0x109)]+_0x335911['counts']['integrations'][_0x1aa119(0x109)]+_0x335911['counts']['experimentalKnowledgeBases']['new']+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0xef)][_0x1aa119(0x109)],_0x286ffc=_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x128)][_0x1aa119(0x159)]+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x115)][_0x1aa119(0x159)]+_0x335911['counts'][_0x1aa119(0x177)][_0x1aa119(0x159)]+_0x335911['counts'][_0x1aa119(0x13b)]['updated']+_0x335911['counts'][_0x1aa119(0x14f)][_0x1aa119(0x159)]+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x132)][_0x1aa119(0x159)]+_0x335911[_0x1aa119(0xfe)]['experimentalArtifacts'][_0x1aa119(0x159)],_0x3cd051=_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x128)]['unchanged']+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x115)][_0x1aa119(0x10f)]+_0x335911[_0x1aa119(0xfe)]['textKnowledgeBases'][_0x1aa119(0x10f)]+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x13b)][_0x1aa119(0x10f)]+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x14f)][_0x1aa119(0x10f)]+_0x335911['counts'][_0x1aa119(0x132)][_0x1aa119(0x10f)]+_0x335911[_0x1aa119(0xfe)][_0x1aa119(0xef)]['unchanged'];console[_0x1aa119(0x133)](_0x1aa119(0x13d)+_0x335911[_0x1aa119(0x122)]+'\x27:'),console[_0x1aa119(0x133)]('\x20\x20'+a4_0x457fb9[_0x1aa119(0x16e)]('+\x20'+_0x1c9287+_0x1aa119(0x169))+_0x1aa119(0x12b)+a4_0x457fb9[_0x1aa119(0x16a)]('~\x20'+_0x286ffc+_0x1aa119(0x160))+_0x1aa119(0x12b)+a4_0x457fb9[_0x1aa119(0x167)]('=\x20'+_0x3cd051+'\x20unchanged')),console[_0x1aa119(0x133)](_0x1aa119(0x184)+formatCountSummary(_0x335911['counts'][_0x1aa119(0x128)])),console[_0x1aa119(0x133)](_0x1aa119(0x166)+formatCountSummary(_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x115)])),console[_0x1aa119(0x133)](_0x1aa119(0x117)+formatCountSummary(_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x177)])),console[_0x1aa119(0x133)](_0x1aa119(0x121)+formatCountSummary(_0x335911['counts'][_0x1aa119(0x13b)])),console[_0x1aa119(0x133)](_0x1aa119(0x187)+formatCountSummary(_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x14f)]));const _0x328e86=_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x132)][_0x1aa119(0x138)]>0x0||_0x335911[_0x1aa119(0xfe)][_0x1aa119(0xef)][_0x1aa119(0x138)]>0x0;_0x328e86&&(console[_0x1aa119(0x133)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x335911[_0x1aa119(0xfe)][_0x1aa119(0x132)])),console[_0x1aa119(0x133)](_0x1aa119(0x155)+formatCountSummary(_0x335911[_0x1aa119(0xfe)]['experimentalArtifacts'])));console[_0x1aa119(0x133)](_0x1aa119(0xf9)+a4_0x457fb9[_0x1aa119(0x135)](_0x335911[_0x1aa119(0x12d)])),displayDiffs(_0x335911[_0x1aa119(0x128)],_0x335911[_0x1aa119(0x115)],_0x335911[_0x1aa119(0x177)],_0x335911[_0x1aa119(0x13b)],_0x335911[_0x1aa119(0x14f)],_0x335911[_0x1aa119(0x132)],_0x335911[_0x1aa119(0xef)]);if(_0x3720f1)return console['log'](a4_0x457fb9['yellow'](_0x1aa119(0x14d))),0x0;if(_0x1c9287===0x0&&_0x286ffc===0x0)return console[_0x1aa119(0x133)](a4_0x457fb9[_0x1aa119(0x16e)](_0x1aa119(0x11d))),saveSessionContext({'llm_project':_0x335911[_0x1aa119(0x122)]},_0x1129b7[_0x1aa119(0x15b)]),console[_0x1aa119(0x133)](a4_0x457fb9['green'](_0x1aa119(0x13a)+a4_0x457fb9[_0x1aa119(0x167)](_0x1aa119(0x12f))+'\x20=\x20'+a4_0x457fb9[_0x1aa119(0x135)](_0x335911[_0x1aa119(0x122)]))),0x0;if(!_0x5b87bb&&!_0x44b159){if(!isInteractive())return console[_0x1aa119(0x179)](a4_0x457fb9[_0x1aa119(0x158)](_0x1aa119(0x136)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1aa119(0x179)](a4_0x457fb9['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x21053f=await confirmKey(_0x1aa119(0x17d)+(_0x1c9287+_0x286ffc)+_0x1aa119(0xee));if(!_0x21053f)return console[_0x1aa119(0x133)](a4_0x457fb9[_0x1aa119(0x16a)]('Cancelled'),_0x1aa119(0xfb)),0x1;}const {data:_0x4660b7}=await withSpinner(_0x1aa119(0x16f),()=>_0x219e15['llm'][_0x1aa119(0x154)](_0xf2fe7b,_0x11f2f2,{'force':_0x44b159}));return console['log'](a4_0x457fb9[_0x1aa119(0x16e)]('\x0a✔\x20Pulled\x20'+(_0x1c9287+_0x286ffc)+'\x20files\x20to\x20'+_0x4660b7[_0x1aa119(0x12d)])),saveSessionContext({'llm_project':_0x4660b7['projectName']},_0x1129b7[_0x1aa119(0x15b)]),console[_0x1aa119(0x133)](a4_0x457fb9['green'](_0x1aa119(0x13a)+a4_0x457fb9['dim'](_0x1aa119(0x12f))+_0x1aa119(0x10a)+a4_0x457fb9['cyan'](_0x4660b7[_0x1aa119(0x122)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x7d8d69(0x153)]=a4_0x7d8d69(0x161);[a4_0x7d8d69(0x15e)]=a4_0x7d8d69(0x130);async['execute'](_0x26cf89){const _0x59c615=a4_0x7d8d69,{options:_0x4c004b,args:_0x188b8e,tdx:_0x3a31d4}=_0x26cf89,_0x347532=_0x188b8e[0x0],_0x11f30d=_0x4c004b[_0x59c615(0x153)],_0x14cf09=_0x4c004b[_0x59c615(0x175)],_0x36511c=_0x4c004b[_0x59c615(0x110)],_0x55b9d7=_0x4c004b[_0x59c615(0x146)],_0x39f47f=_0x4c004b[_0x59c615(0x120)];let _0x189ef8;const _0x299e2f=findAgentConfigPath(process[_0x59c615(0x11a)]());if(_0x347532){const _0x273fa8=a4_0x4141d4[_0x59c615(0xf5)](_0x347532,_0x59c615(0xf6));existsSync(_0x273fa8)?(_0x189ef8=_0x347532,console[_0x59c615(0x133)](a4_0x457fb9[_0x59c615(0x167)](_0x59c615(0xe4)+_0x347532))):_0x189ef8=_0x347532;}else{if(_0x299e2f)_0x189ef8=a4_0x4141d4['dirname'](_0x299e2f),console['log'](a4_0x457fb9['dim'](_0x59c615(0xe1)+_0x189ef8));else{if(_0x39f47f){const _0x1ba18b=sanitizeForFilesystem(_0x39f47f);let _0x143b30=_0x1ba18b,_0x2ea73a=a4_0x4141d4[_0x59c615(0xf5)](process['cwd'](),_0x59c615(0x128),_0x1ba18b,'tdx.json');if(!existsSync(_0x2ea73a)){const _0x387b81=normalizeName(_0x39f47f),_0x2af9e=a4_0x4141d4[_0x59c615(0xf5)](process['cwd'](),_0x59c615(0x128),_0x387b81,_0x59c615(0xf6));existsSync(_0x2af9e)&&(_0x143b30=_0x387b81,_0x2ea73a=_0x2af9e);}if(existsSync(_0x2ea73a))_0x189ef8=a4_0x4141d4[_0x59c615(0x170)](_0x2ea73a),console['log'](a4_0x457fb9[_0x59c615(0x167)](_0x59c615(0xe4)+_0x189ef8));else{const _0x2ad87a=_0x4c004b['profile'];if(_0x2ad87a)throw new SDKError(ErrorCode[_0x59c615(0xde)],_0x59c615(0x13e)+_0x39f47f+_0x59c615(0xe2),undefined,{'helpText':'When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a'+_0x59c615(0xf8)+(_0x59c615(0x11e)+_0x39f47f+'\x0a')+('\x20\x20tdx\x20agent\x20clone\x20agents/'+_0x143b30+'\x20--name\x20'+(_0x11f30d||_0x59c615(0xec))+_0x59c615(0x123)+_0x2ad87a)});_0x189ef8=_0x39f47f,console[_0x59c615(0x133)](a4_0x457fb9[_0x59c615(0x167)]('Using\x20context\x20project:\x20'+_0x39f47f));}}}}if(!_0x189ef8)return console[_0x59c615(0x133)](a4_0x457fb9['yellow'](_0x59c615(0xdc))),console[_0x59c615(0x133)](_0x59c615(0x127)),console[_0x59c615(0x133)]('\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory'),console[_0x59c615(0x133)](_0x59c615(0x163)),console['log'](_0x59c615(0x149)),0x1;if(!_0x11f30d)throw new SDKError(ErrorCode[_0x59c615(0xf1)],_0x59c615(0x168),undefined,{'helpText':_0x59c615(0x18f)});if(!_0x36511c&&!_0x14cf09){if(!isInteractive())return console[_0x59c615(0x179)](a4_0x457fb9[_0x59c615(0x158)](_0x59c615(0x136)),_0x59c615(0xe9)),console['error'](a4_0x457fb9[_0x59c615(0x167)](_0x59c615(0x102))),0x1;const _0x1e3e69=await confirmKey(_0x59c615(0x10b)+_0x189ef8+'\x22\x20to\x20new\x20project\x20\x22'+_0x11f30d+'\x22?');if(!_0x1e3e69)return console[_0x59c615(0x133)](a4_0x457fb9['yellow'](_0x59c615(0x15f))),0x1;}const {data:_0x131097}=await withSpinner('Cloning\x20\x22'+_0x189ef8+_0x59c615(0xe3)+_0x11f30d+'\x22...',()=>_0x3a31d4['llm'][_0x59c615(0x162)](_0x189ef8,_0x11f30d,{'dryRun':_0x14cf09}));if(_0x14cf09){console[_0x59c615(0x133)](a4_0x457fb9[_0x59c615(0x16a)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x59c615(0x133)](_0x59c615(0x112)+_0x131097['sourceProjectName']),console[_0x59c615(0x133)](_0x59c615(0x18d)+_0x11f30d),console[_0x59c615(0x133)](_0x59c615(0x11c)),console[_0x59c615(0x133)]('\x20\x20Agents:\x20'+_0x131097[_0x59c615(0xfe)]['agents']['created']),console[_0x59c615(0x133)]('\x20\x20Knowledge\x20Bases:\x20'+_0x131097[_0x59c615(0xfe)]['knowledgeBases'][_0x59c615(0x114)]),console['log']('\x20\x20Prompts:\x20'+_0x131097[_0x59c615(0xfe)][_0x59c615(0x13b)][_0x59c615(0x114)]);const _0x5ca135=_0x131097[_0x59c615(0xfe)][_0x59c615(0x132)][_0x59c615(0x114)]>0x0||_0x131097['counts']['experimentalArtifacts'][_0x59c615(0x114)]>0x0;return _0x5ca135&&(console[_0x59c615(0x133)](_0x59c615(0x12c)+_0x131097[_0x59c615(0xfe)][_0x59c615(0x132)][_0x59c615(0x114)]),console[_0x59c615(0x133)](_0x59c615(0x155)+_0x131097[_0x59c615(0xfe)][_0x59c615(0xef)][_0x59c615(0x114)])),0x0;}const _0x22e16c=_0x131097[_0x59c615(0xfe)][_0x59c615(0x128)]['errors']>0x0||_0x131097[_0x59c615(0xfe)][_0x59c615(0x115)][_0x59c615(0x105)]>0x0||_0x131097[_0x59c615(0xfe)][_0x59c615(0x13b)][_0x59c615(0x105)]>0x0||_0x131097['counts'][_0x59c615(0x132)]['errors']>0x0||_0x131097['counts']['experimentalArtifacts'][_0x59c615(0x105)]>0x0;_0x22e16c?console[_0x59c615(0x133)](a4_0x457fb9['yellow'](_0x59c615(0x180))):console['log'](a4_0x457fb9[_0x59c615(0x16e)](_0x59c615(0xdf)));console['log'](_0x59c615(0x112)+_0x131097[_0x59c615(0x15a)]),console[_0x59c615(0x133)](_0x59c615(0x18d)+_0x131097['newProjectName']),console[_0x59c615(0x133)]('New\x20project\x20ID:\x20'+_0x131097[_0x59c615(0x129)]),console[_0x59c615(0x133)](),console[_0x59c615(0x133)]('Summary:'),console['log'](_0x59c615(0x184)+formatCountSummary(_0x131097[_0x59c615(0xfe)]['agents'])),console[_0x59c615(0x133)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x131097[_0x59c615(0xfe)][_0x59c615(0x115)])),console[_0x59c615(0x133)](_0x59c615(0x121)+formatCountSummary(_0x131097[_0x59c615(0xfe)][_0x59c615(0x13b)])),console[_0x59c615(0x133)](_0x59c615(0x187)+formatCountSummary(_0x131097[_0x59c615(0xfe)][_0x59c615(0x14f)]));const _0x48ae64=_0x131097[_0x59c615(0xfe)][_0x59c615(0x132)][_0x59c615(0x114)]>0x0||_0x131097[_0x59c615(0xfe)][_0x59c615(0x132)]['updated']>0x0||_0x131097[_0x59c615(0xfe)][_0x59c615(0x132)][_0x59c615(0x10f)]>0x0||_0x131097[_0x59c615(0xfe)]['experimentalArtifacts'][_0x59c615(0x114)]>0x0||_0x131097[_0x59c615(0xfe)][_0x59c615(0xef)][_0x59c615(0x159)]>0x0||_0x131097[_0x59c615(0xfe)]['experimentalArtifacts'][_0x59c615(0x10f)]>0x0;_0x48ae64&&(console[_0x59c615(0x133)](_0x59c615(0x12c)+formatCountSummary(_0x131097[_0x59c615(0xfe)][_0x59c615(0x132)])),console['log'](_0x59c615(0x155)+formatCountSummary(_0x131097[_0x59c615(0xfe)]['experimentalArtifacts'])));if(_0x22e16c){console[_0x59c615(0x133)](),console[_0x59c615(0x133)](a4_0x457fb9[_0x59c615(0x158)](_0x59c615(0x17f)));for(const _0xf7a577 of _0x131097[_0x59c615(0x128)]){_0xf7a577['action']===_0x59c615(0x179)&&console['log'](a4_0x457fb9['red'](_0x59c615(0x118)+_0xf7a577[_0x59c615(0x150)]+_0x59c615(0x16b)+_0xf7a577[_0x59c615(0x179)]));}for(const _0x22ac36 of _0x131097[_0x59c615(0x115)]){_0x22ac36['action']==='error'&&console[_0x59c615(0x133)](a4_0x457fb9[_0x59c615(0x158)](_0x59c615(0x173)+_0x22ac36['name']+_0x59c615(0x16b)+_0x22ac36[_0x59c615(0x179)]));}for(const _0x55c394 of _0x131097['prompts']){_0x55c394[_0x59c615(0xf0)]===_0x59c615(0x179)&&console['log'](a4_0x457fb9[_0x59c615(0x158)](_0x59c615(0x116)+_0x55c394[_0x59c615(0x153)]+_0x59c615(0x16b)+_0x55c394['error']));}for(const _0x5a1651 of _0x131097[_0x59c615(0x14f)]){_0x5a1651[_0x59c615(0xf0)]===_0x59c615(0x179)&&console[_0x59c615(0x133)](a4_0x457fb9['red'](_0x59c615(0x119)+_0x5a1651[_0x59c615(0x153)]+_0x59c615(0x16b)+_0x5a1651[_0x59c615(0x179)]));}for(const _0x5173c6 of _0x131097[_0x59c615(0x132)]){_0x5173c6['action']==='error'&&console['log'](a4_0x457fb9[_0x59c615(0x158)](_0x59c615(0xe6)+_0x5173c6[_0x59c615(0x153)]+_0x59c615(0x16b)+_0x5173c6['error']));}for(const _0x847892 of _0x131097['experimentalArtifacts']){_0x847892[_0x59c615(0xf0)]==='error'&&console[_0x59c615(0x133)](a4_0x457fb9['red'](_0x59c615(0x185)+_0x847892[_0x59c615(0x153)]+_0x59c615(0x16b)+_0x847892['error']));}return 0x1;}console[_0x59c615(0x133)]();const _0x3a57c4=getLLMProjectUrl(_0x55b9d7,_0x131097[_0x59c615(0x129)]);return console[_0x59c615(0x133)](_0x59c615(0x174)+a4_0x457fb9[_0x59c615(0x135)](_0x3a57c4)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x7d8d69(0x153)]=a4_0x7d8d69(0x126);[a4_0x7d8d69(0x15e)]=a4_0x7d8d69(0x12a);async['execute'](_0x3dbc8b){const _0x483185=a4_0x7d8d69,{options:_0x22b95b,args:_0x569d6c,tdx:_0xfb90ff}=_0x3dbc8b;let _0x4b6ab7=_0x569d6c[0x0]||process['cwd']();const _0x242cc9=_0x22b95b[_0x483185(0x175)],_0x3f617d=_0x22b95b['force'],_0x40ccf8=_0x22b95b[_0x483185(0x110)],_0x45897d=_0x22b95b[_0x483185(0x146)],_0x5e245a=a4_0x4141d4[_0x483185(0xf5)](_0x4b6ab7,_0x483185(0x125)),_0x65712e=existsSync(_0x5e245a);if(_0x65712e){const {data:_0x24ee28}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x4b6ab7+_0x483185(0x181),()=>_0xfb90ff[_0x483185(0x111)][_0x483185(0x18c)](_0x4b6ab7,{'dryRun':_0x242cc9,'force':_0x3f617d}));if(_0x242cc9)return console[_0x483185(0x133)](a4_0x457fb9['yellow']('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x483185(0x133)]('Would\x20push\x20agent:\x20'+_0x24ee28['agentName']),0x0;if(_0x24ee28[_0x483185(0xf0)]===_0x483185(0x179))return console[_0x483185(0x133)](a4_0x457fb9['red'](_0x483185(0xfd)+_0x24ee28[_0x483185(0x179)])),0x1;console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x16e)](_0x483185(0xf2)+_0x24ee28[_0x483185(0xf0)]+_0x483185(0x10e))),console[_0x483185(0x133)](_0x483185(0x142)+_0x24ee28['agentName']);if(_0x24ee28[_0x483185(0x171)]&&_0x24ee28[_0x483185(0x172)]){const _0x33db84=getLLMAgentChatUrl(_0x45897d,_0x24ee28[_0x483185(0x172)],_0x24ee28[_0x483185(0x171)]);console[_0x483185(0x133)](_0x483185(0x14b)+a4_0x457fb9[_0x483185(0x135)](_0x33db84));}return 0x0;}const _0x4f6aff=_0x22b95b[_0x483185(0x120)],_0x2b62c8=resolveProjectFromContext(_0x4b6ab7,_0x4f6aff);if(_0x2b62c8[_0x483185(0x10d)])_0x4b6ab7=_0x2b62c8[_0x483185(0x16d)],_0x2b62c8[_0x483185(0x152)]===_0x483185(0xea)&&console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x167)]('Using\x20project:\x20'+_0x4b6ab7));else{let _0x4dfeb0=_0x483185(0xfa);_0x2b62c8[_0x483185(0x11b)]===_0x483185(0x143)&&(_0x4dfeb0=_0x2b62c8[_0x483185(0x182)]+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x2b62c8['llmProject']+_0x483185(0x107));throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2b62c8[_0x483185(0x11b)]==='no_context'?_0x2b62c8['message']:_0x483185(0x157)+_0x4b6ab7,undefined,{'helpText':_0x4dfeb0});}const {data:_0x21483d}=await withSpinner(_0x483185(0xeb),()=>_0xfb90ff[_0x483185(0x111)]['pushProject'](_0x4b6ab7,{'dryRun':!![]})),_0x5928a5=_0x21483d[_0x483185(0xfe)][_0x483185(0x128)][_0x483185(0x105)]>0x0;if(_0x5928a5){console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x158)](_0x483185(0x16c)));for(const _0x313dd5 of _0x21483d[_0x483185(0x128)]){_0x313dd5[_0x483185(0xf0)]==='error'&&console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x158)](_0x483185(0x118)+_0x313dd5[_0x483185(0x150)]+_0x483185(0x16b)+_0x313dd5[_0x483185(0x179)]));}return 0x1;}const _0x52027a=_0x21483d['counts']['agents'][_0x483185(0x114)]+_0x21483d[_0x483185(0xfe)]['knowledgeBases'][_0x483185(0x114)]+_0x21483d[_0x483185(0xfe)][_0x483185(0x177)][_0x483185(0x114)]+_0x21483d['counts'][_0x483185(0x13b)][_0x483185(0x114)]+_0x21483d[_0x483185(0xfe)]['integrations'][_0x483185(0x114)]+_0x21483d[_0x483185(0xfe)]['experimentalKnowledgeBases'][_0x483185(0x114)]+_0x21483d['counts'][_0x483185(0xef)][_0x483185(0x114)],_0x29d178=_0x21483d[_0x483185(0xfe)][_0x483185(0x128)]['updated']+_0x21483d[_0x483185(0xfe)][_0x483185(0x115)][_0x483185(0x159)]+_0x21483d[_0x483185(0xfe)][_0x483185(0x177)][_0x483185(0x159)]+_0x21483d[_0x483185(0xfe)][_0x483185(0x13b)][_0x483185(0x159)]+_0x21483d[_0x483185(0xfe)][_0x483185(0x14f)]['updated']+_0x21483d['counts'][_0x483185(0x132)][_0x483185(0x159)]+_0x21483d[_0x483185(0xfe)][_0x483185(0xef)][_0x483185(0x159)],_0x1a5097=_0x21483d[_0x483185(0xfe)][_0x483185(0x128)]['unchanged']+_0x21483d[_0x483185(0xfe)][_0x483185(0x115)][_0x483185(0x10f)]+_0x21483d[_0x483185(0xfe)][_0x483185(0x177)][_0x483185(0x10f)]+_0x21483d[_0x483185(0xfe)][_0x483185(0x13b)][_0x483185(0x10f)]+_0x21483d[_0x483185(0xfe)][_0x483185(0x14f)][_0x483185(0x10f)]+_0x21483d[_0x483185(0xfe)]['experimentalKnowledgeBases'][_0x483185(0x10f)]+_0x21483d[_0x483185(0xfe)][_0x483185(0xef)][_0x483185(0x10f)];console[_0x483185(0x133)]('\x0aPush\x20summary\x20for\x20\x27'+_0x21483d[_0x483185(0x122)]+'\x27:'),console[_0x483185(0x133)]('\x20\x20'+a4_0x457fb9['green']('+\x20'+_0x52027a+_0x483185(0x169))+_0x483185(0x12b)+a4_0x457fb9['yellow']('~\x20'+_0x29d178+_0x483185(0x160))+_0x483185(0x12b)+a4_0x457fb9[_0x483185(0x167)]('=\x20'+_0x1a5097+_0x483185(0x17e))),console[_0x483185(0x133)](_0x483185(0x184)+formatCountSummary(_0x21483d[_0x483185(0xfe)]['agents'])),console[_0x483185(0x133)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x21483d['counts'][_0x483185(0x115)])),console[_0x483185(0x133)](_0x483185(0x117)+formatCountSummary(_0x21483d['counts']['textKnowledgeBases'])),console['log'](_0x483185(0x121)+formatCountSummary(_0x21483d[_0x483185(0xfe)][_0x483185(0x13b)])),console[_0x483185(0x133)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x21483d[_0x483185(0xfe)][_0x483185(0x14f)]));const _0x28f374=_0x21483d[_0x483185(0xfe)][_0x483185(0x132)][_0x483185(0x114)]>0x0||_0x21483d[_0x483185(0xfe)]['experimentalKnowledgeBases'][_0x483185(0x159)]>0x0||_0x21483d[_0x483185(0xfe)][_0x483185(0x132)]['unchanged']>0x0||_0x21483d['counts'][_0x483185(0xef)][_0x483185(0x114)]>0x0||_0x21483d[_0x483185(0xfe)][_0x483185(0xef)][_0x483185(0x159)]>0x0||_0x21483d[_0x483185(0xfe)][_0x483185(0xef)][_0x483185(0x10f)]>0x0;_0x28f374&&(console['log'](_0x483185(0x12c)+formatCountSummary(_0x21483d[_0x483185(0xfe)][_0x483185(0x132)])),console[_0x483185(0x133)](_0x483185(0x155)+formatCountSummary(_0x21483d[_0x483185(0xfe)][_0x483185(0xef)])));console['log'](_0x483185(0xf3)+a4_0x457fb9[_0x483185(0x135)](_0x4b6ab7)),displayDiffs(_0x21483d[_0x483185(0x128)],_0x21483d[_0x483185(0x115)],_0x21483d['textKnowledgeBases'],_0x21483d[_0x483185(0x13b)],_0x21483d[_0x483185(0x14f)],_0x21483d[_0x483185(0x132)],_0x21483d['experimentalArtifacts']);if(_0x242cc9)return console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x16a)](_0x483185(0x183))),0x0;if(_0x52027a===0x0&&_0x29d178===0x0){console['log'](a4_0x457fb9[_0x483185(0x16e)]('\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date'));const _0x561196=getLLMProjectUrl(_0x45897d,_0x21483d['projectId']);return console[_0x483185(0x133)](_0x483185(0x174)+a4_0x457fb9['cyan'](_0x561196)),0x0;}if(!_0x40ccf8&&!_0x3f617d){if(!isInteractive())return console['error'](a4_0x457fb9[_0x483185(0x158)]('\x0aError:'),_0x483185(0xe9)),console[_0x483185(0x179)](a4_0x457fb9['dim'](_0x483185(0x102))),0x1;const _0x465192=await confirmKey(_0x483185(0xe5)+(_0x52027a+_0x29d178)+_0x483185(0x145));if(!_0x465192)return console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x16a)](_0x483185(0x15f)),'-\x20nothing\x20pushed'),0x1;}const {data:_0x94ee07}=await withSpinner('Pushing\x20to\x20project...',()=>_0xfb90ff[_0x483185(0x111)][_0x483185(0x15c)](_0x4b6ab7,{'force':_0x3f617d})),_0x15ac68=_0x94ee07[_0x483185(0xfe)]['agents']['errors']>0x0||_0x94ee07[_0x483185(0xfe)][_0x483185(0x115)][_0x483185(0x105)]>0x0||_0x94ee07[_0x483185(0xfe)][_0x483185(0x177)][_0x483185(0x105)]>0x0||_0x94ee07[_0x483185(0xfe)][_0x483185(0x13b)][_0x483185(0x105)]>0x0;if(_0x15ac68){console[_0x483185(0x133)](a4_0x457fb9['yellow'](_0x483185(0x17c))),console[_0x483185(0x133)](),console['log'](a4_0x457fb9[_0x483185(0x158)]('Errors:'));for(const _0x50888c of _0x94ee07[_0x483185(0x128)]){_0x50888c[_0x483185(0xf0)]===_0x483185(0x179)&&console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x158)](_0x483185(0x118)+_0x50888c[_0x483185(0x150)]+'\x22:\x20'+_0x50888c[_0x483185(0x179)]));}for(const _0x4983a9 of _0x94ee07[_0x483185(0x115)]){_0x4983a9[_0x483185(0xf0)]===_0x483185(0x179)&&console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x158)](_0x483185(0x173)+_0x4983a9[_0x483185(0x153)]+_0x483185(0x16b)+_0x4983a9['error']));}for(const _0x56920e of _0x94ee07[_0x483185(0x177)]){_0x56920e[_0x483185(0xf0)]===_0x483185(0x179)&&console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x158)](_0x483185(0x156)+_0x56920e['name']+'\x22:\x20'+_0x56920e[_0x483185(0x179)]));}for(const _0xd2acc8 of _0x94ee07['prompts']){_0xd2acc8[_0x483185(0xf0)]===_0x483185(0x179)&&console[_0x483185(0x133)](a4_0x457fb9[_0x483185(0x158)]('\x20\x20Prompt\x20\x22'+_0xd2acc8[_0x483185(0x153)]+_0x483185(0x16b)+_0xd2acc8['error']));}for(const _0x1da906 of _0x94ee07[_0x483185(0x14f)]){_0x1da906['action']==='error'&&console['log'](a4_0x457fb9[_0x483185(0x158)](_0x483185(0x119)+_0x1da906[_0x483185(0x153)]+_0x483185(0x16b)+_0x1da906['error']));}return 0x1;}console['log'](a4_0x457fb9['green'](_0x483185(0x10c)+(_0x52027a+_0x29d178)+_0x483185(0xe0)+_0x94ee07['projectName']+'\x27'));const _0x38aab0=getLLMProjectUrl(_0x45897d,_0x94ee07['projectId']);return console[_0x483185(0x133)](_0x483185(0x174)+a4_0x457fb9[_0x483185(0x135)](_0x38aab0)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
function a5_0x1d38(_0x27cc2b,_0x20de6c){_0x27cc2b=_0x27cc2b-0x14f;const _0xf555ae=a5_0xf555();let _0x1d38d7=_0xf555ae[_0x27cc2b];return _0x1d38d7;}const a5_0x437b71=a5_0x1d38;function a5_0xf555(){const _0x56f563=['FAIL','Run\x20\x27tdx\x20agent\x20pull\x20','No\x20tests\x20found\x20with\x20tags:\x20','Running:\x20','⚠\x20SKIPPED:\x20','not\x20found','multiple_agents','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','testName','\x20\x20Round\x20','repeat','Running\x20agent\x20tests...','yellow','✓\x20PASS:\x20','split','description','Evaluating\x20response...','...','projectDir','jsonl','8BYgubh','PASS','status','11666910kCTOHq','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','length','start','Errors:\x20\x20\x20','testYmlPath',':\x20Sending\x20user\x20input...','\x22,\x20but\x20current\x20site\x20is\x20\x22','/<agent-name>','dim','context','green','eval','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','toISOString','rounds','\x20\x20Conversation:\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','Executing\x20new\x20tests...','8459286SKtUWm','✗\x20ERROR:\x20Project\x20not\x20found:\x20','Running\x20test:\x20','\x20\x20-\x20','conversations','red','forEach','Round\x201/','Failed\x20Tests:','table','Site:\x20','Agent:\x20','now','Error\x20writing\x20output\x20file:\x20','some','agentDirs','✗\x20FAIL:\x20','tags','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','resolveProjectId','✗\x20ERROR:\x20','join','113348vRbPjs','Run\x20tests\x20for\x20an\x20LLM\x20agent','dryRun','\x20(new)','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','json','has','log','Available\x20tests:\x20','llmProject','201509zPbvTq','push','9TCdKMB','\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)','Cached\x20run\x20from:\x20','conversation_url','\x20\x20Site:\x20','agent','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','reason','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','\x20-\x20','Re-evaluating...','tsv','map','1084795kNwKpe','includes','Output\x20written\x20to:\x20','\x22:\x20','26470236OCuAJg','executeReeval','\x20\x20Evaluating...\x20','Test\x20Configuration:','utf-8','\x20\x20Project:\x20','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','\x27\x20to\x20create\x20the\x20folder\x20structure.','basename','404','tests','toLowerCase','\x20\x20Agent:\x20','filter','resolveAgentId','\x20(cached)','Total:\x20\x20\x20\x20','text','...\x20','ERROR','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','1AKyvJF','site','agent:test','writeFileSync','stop','no_tests','round','Project\x20path:\x20','reeval','source','Using\x20agent:\x20','substring','Passed:\x20\x20\x20','12YqtTaU','New\x20tests\x20to\x20execute:\x20','trim','resolve','find','Usage:','name','isSpinning','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','message','Failed:\x20\x20\x20','Error:\x20No\x20previous\x20test\x20run\x20found.','892971OPSbaQ','cyan','Round\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','add','size','13lYJuJC','llm','projectName','Duration:\x20','152BVkwJp','Conversation\x20URL:\x20','white','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','Available\x20tags:\x20','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','agentName'];a5_0xf555=function(){return _0x56f563;};return a5_0xf555();}(function(_0x4b9eb6,_0xf606aa){const _0xcbbad3=a5_0x1d38,_0x164e34=_0x4b9eb6();while(!![]){try{const _0x16ee0f=-parseInt(_0xcbbad3(0x1cf))/0x1*(parseInt(_0xcbbad3(0x19d))/0x2)+-parseInt(_0xcbbad3(0x1e8))/0x3*(-parseInt(_0xcbbad3(0x171))/0x4)+-parseInt(_0xcbbad3(0x1b6))/0x5*(parseInt(_0xcbbad3(0x1dc))/0x6)+parseInt(_0xcbbad3(0x1a7))/0x7*(parseInt(_0xcbbad3(0x156))/0x8)+-parseInt(_0xcbbad3(0x1a9))/0x9*(parseInt(_0xcbbad3(0x174))/0xa)+-parseInt(_0xcbbad3(0x187))/0xb+-parseInt(_0xcbbad3(0x1ba))/0xc*(-parseInt(_0xcbbad3(0x152))/0xd);if(_0x16ee0f===_0xf606aa)break;else _0x164e34['push'](_0x164e34['shift']());}catch(_0x4b8964){_0x164e34['push'](_0x164e34['shift']());}}}(a5_0xf555,0xe10d3));import*as a5_0x59bfdf from'node:fs';import*as a5_0x4ac58a from'node:path';import a5_0x3033f2 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x437b71(0x1e2)]=a5_0x437b71(0x1d1);[a5_0x437b71(0x16c)]=a5_0x437b71(0x19e);async['execute'](_0x3b866c){const _0xa4c5c6=a5_0x437b71,{options:_0x2d3649,args:_0x41e064,tdx:_0x15611b}=_0x3b866c,_0x6068d5=_0x41e064[0x0]||'.',_0x2ce222=_0x2d3649[_0xa4c5c6(0x19f)],_0x3552f1=_0x2d3649,_0x2f5aa1=_0x3552f1[_0xa4c5c6(0x180)]===![],_0x2b5ee3=_0x3552f1[_0xa4c5c6(0x1d7)],_0x5277fa=_0x3552f1[_0xa4c5c6(0x1e2)],_0x16a184=_0x3552f1[_0xa4c5c6(0x198)],_0x1f4cff=_0x2d3649[_0xa4c5c6(0x1d0)],_0x1a4868=_0x3552f1['output'];if(_0x2b5ee3&&_0x2f5aa1)return console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x1af))),0x1;let _0x182cde='table';if(_0x3552f1[_0xa4c5c6(0x1a2)])_0x182cde='json';else{if(_0x3552f1['jsonl'])_0x182cde=_0xa4c5c6(0x170);else{if(_0x3552f1[_0xa4c5c6(0x1b4)])_0x182cde=_0xa4c5c6(0x1b4);else{if(_0x3552f1['table'])_0x182cde=_0xa4c5c6(0x190);}}}const _0x445616=_0x3552f1[_0xa4c5c6(0x1a6)];let _0x1ab7af=_0x6068d5;const _0x49017c=a5_0x59bfdf['existsSync'](_0x6068d5),_0x56776c=_0x6068d5==='.';if(!_0x49017c||_0x56776c){const _0x18215e=resolveProjectFromContext(_0x6068d5,_0x445616,{'requireFile':'test.yml'});if(_0x18215e['found'])_0x1ab7af=_0x18215e[_0xa4c5c6(0x16f)],_0x18215e[_0xa4c5c6(0x1d8)]===_0xa4c5c6(0x17e)&&console['log'](a5_0x3033f2[_0xa4c5c6(0x17d)](_0xa4c5c6(0x1d9)+_0x1ab7af));else switch(_0x18215e['reason']){case'no_context':console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x169)](_0x18215e[_0xa4c5c6(0x1e5)])),console['log'](),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x1e1)),console[_0xa4c5c6(0x1a4)]('\x20\x20tdx\x20agent\x20test\x20<path>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20from\x20path'),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x1aa)),console['log'](),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x199));return 0x1;case'no_local_folder':console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x169)](_0x18215e[_0xa4c5c6(0x1e5)])),console['log'](),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x15e)+_0x18215e['llmProject']+_0xa4c5c6(0x1c1));return 0x1;case _0xa4c5c6(0x163):{const _0x3637ae=a5_0x4ac58a[_0xa4c5c6(0x1c2)](_0x18215e[_0xa4c5c6(0x16f)]);console['log'](a5_0x3033f2[_0xa4c5c6(0x169)](_0xa4c5c6(0x159)+_0x18215e[_0xa4c5c6(0x1a6)]+'\x22:'));for(const _0x4596e4 of _0x18215e[_0xa4c5c6(0x196)]){console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x18a)+_0x4596e4);}return console[_0xa4c5c6(0x1a4)](),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x15b)+_0x3637ae+_0xa4c5c6(0x17c)),0x1;}case _0xa4c5c6(0x1d4):console[_0xa4c5c6(0x1a4)](a5_0x3033f2['yellow']('No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22'+_0x18215e[_0xa4c5c6(0x1a6)]+'\x22.')),console[_0xa4c5c6(0x1a4)](a5_0x3033f2['dim'](_0xa4c5c6(0x1d6)+_0x18215e[_0xa4c5c6(0x16f)])),console[_0xa4c5c6(0x1a4)](),console[_0xa4c5c6(0x1a4)]('Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.');return 0x1;}}const {definition:_0x3e6588,agentInfo:_0x1a7131}=parseTestFile(_0x1ab7af);let _0x1192e1=_0x3e6588[_0xa4c5c6(0x1c4)];if(_0x5277fa){const _0x21882b=_0x5277fa['split'](',')[_0xa4c5c6(0x1b5)](_0x4a2ce3=>_0x4a2ce3[_0xa4c5c6(0x1de)]());_0x1192e1=_0x3e6588[_0xa4c5c6(0x1c4)][_0xa4c5c6(0x1c7)](_0x43fd5f=>_0x21882b['includes'](_0x43fd5f[_0xa4c5c6(0x1e2)]));if(_0x1192e1[_0xa4c5c6(0x176)]===0x0)return console['log'](a5_0x3033f2[_0xa4c5c6(0x169)]('No\x20tests\x20found\x20matching:\x20'+_0x5277fa)),console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x17d)](_0xa4c5c6(0x1a5)+_0x3e6588[_0xa4c5c6(0x1c4)]['map'](_0x53a671=>_0x53a671[_0xa4c5c6(0x1e2)])['join'](',\x20'))),0x1;}if(_0x16a184){const _0x4c30f7=_0x16a184[_0xa4c5c6(0x16b)](',')[_0xa4c5c6(0x1b5)](_0x1f413d=>_0x1f413d[_0xa4c5c6(0x1de)]()[_0xa4c5c6(0x1c5)]());_0x1192e1=_0x1192e1[_0xa4c5c6(0x1c7)](_0x19a716=>_0x19a716[_0xa4c5c6(0x198)]?.[_0xa4c5c6(0x195)](_0x20bf3f=>_0x4c30f7[_0xa4c5c6(0x1b7)](_0x20bf3f[_0xa4c5c6(0x1c5)]())));if(_0x1192e1['length']===0x0){console['log'](a5_0x3033f2['yellow'](_0xa4c5c6(0x15f)+_0x16a184));const _0x5d449e=new Set();return _0x3e6588[_0xa4c5c6(0x1c4)][_0xa4c5c6(0x18d)](_0x48ae31=>_0x48ae31[_0xa4c5c6(0x198)]?.[_0xa4c5c6(0x18d)](_0x49ee3f=>_0x5d449e[_0xa4c5c6(0x150)](_0x49ee3f))),_0x5d449e[_0xa4c5c6(0x151)]>0x0?console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x17d)](_0xa4c5c6(0x15a)+[..._0x5d449e][_0xa4c5c6(0x19c)](',\x20'))):console['log'](a5_0x3033f2[_0xa4c5c6(0x17d)]('No\x20tests\x20have\x20tags\x20defined.')),0x1;}}if(_0x2b5ee3)return this['executeReeval'](_0x3b866c,{'definition':{'tests':_0x1192e1},'agentInfo':_0x1a7131,'outputFormat':_0x182cde,'outputFile':_0x1a4868,'testNames':_0x5277fa});if(_0x2ce222){console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x1e9)](_0xa4c5c6(0x1bd))),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x1ad)+a5_0x3033f2[_0xa4c5c6(0x158)](_0x1f4cff)),console['log'](_0xa4c5c6(0x1bf)+a5_0x3033f2[_0xa4c5c6(0x158)](_0x1a7131[_0xa4c5c6(0x154)])),console['log'](_0xa4c5c6(0x1c6)+a5_0x3033f2['white'](_0x1a7131[_0xa4c5c6(0x15c)])),console[_0xa4c5c6(0x1a4)](),console[_0xa4c5c6(0x1a4)]('Tests\x20found:\x20'+a5_0x3033f2[_0xa4c5c6(0x158)](_0x1192e1[_0xa4c5c6(0x176)]));for(let _0x1fbf4b=0x0;_0x1fbf4b<_0x1192e1['length'];_0x1fbf4b++){const _0x43c13a=_0x1192e1[_0x1fbf4b],_0x466733=_0x43c13a['rounds'][_0xa4c5c6(0x176)]===0x1?_0xa4c5c6(0x1d5):_0xa4c5c6(0x183),_0x5bb5b0=_0x43c13a['tags']?.[_0xa4c5c6(0x176)]?'\x20['+_0x43c13a['tags']['join'](',\x20')+']':'';console[_0xa4c5c6(0x1a4)]('\x20\x20'+(_0x1fbf4b+0x1)+'.\x20'+a5_0x3033f2[_0xa4c5c6(0x158)](_0x43c13a['name'])+'\x20('+_0x43c13a['rounds'][_0xa4c5c6(0x176)]+'\x20'+_0x466733+')'+a5_0x3033f2[_0xa4c5c6(0x17d)](_0x5bb5b0));}return 0x0;}let _0x2b8e00,_0x5c7d44;try{_0x2b8e00=await _0x15611b[_0xa4c5c6(0x153)][_0xa4c5c6(0x19a)](_0x1a7131[_0xa4c5c6(0x154)]);}catch(_0x240882){const _0x1ca428=_0x240882 instanceof Error?_0x240882[_0xa4c5c6(0x1e5)]:String(_0x240882);return _0x1ca428['includes'](_0xa4c5c6(0x1c3))||_0x1ca428[_0xa4c5c6(0x1c5)]()[_0xa4c5c6(0x1b7)](_0xa4c5c6(0x162))?console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x188)+_0x1a7131[_0xa4c5c6(0x154)])):console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x14f)+_0x1a7131[_0xa4c5c6(0x154)]+_0xa4c5c6(0x1b9)+_0x1ca428)),0x1;}try{_0x5c7d44=await _0x15611b['llm'][_0xa4c5c6(0x1c8)](_0x1a7131[_0xa4c5c6(0x15c)],_0x2b8e00);}catch(_0x571d21){const _0x21aa57=_0x571d21 instanceof Error?_0x571d21[_0xa4c5c6(0x1e5)]:String(_0x571d21);return _0x21aa57[_0xa4c5c6(0x1b7)](_0xa4c5c6(0x1c3))||_0x21aa57['toLowerCase']()[_0xa4c5c6(0x1b7)](_0xa4c5c6(0x162))?console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x164)+_0x1a7131[_0xa4c5c6(0x15c)])):console[_0xa4c5c6(0x1a4)](a5_0x3033f2['red'](_0xa4c5c6(0x181)+_0x1a7131['agentName']+_0xa4c5c6(0x1b9)+_0x21aa57)),0x1;}let _0x51f081;if(!_0x2f5aa1)try{_0x51f081=await setupEvaluatorAgent(_0x15611b[_0xa4c5c6(0x153)],_0x2d3649['verbose']);}catch(_0x23f7ed){const _0x7f4494=_0x23f7ed instanceof Error?_0x23f7ed[_0xa4c5c6(0x1e5)]:String(_0x23f7ed);return console[_0xa4c5c6(0x1a4)](a5_0x3033f2['red'](_0xa4c5c6(0x1e4)+_0x7f4494)),0x1;}console['log'](a5_0x3033f2[_0xa4c5c6(0x1e9)](_0xa4c5c6(0x168))),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x191)+a5_0x3033f2['white'](_0x1f4cff)),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x192)+a5_0x3033f2['white'](_0x1a7131[_0xa4c5c6(0x154)]+'/'+_0x1a7131['agentName'])),console[_0xa4c5c6(0x1a4)]();const _0x253598=[],_0xf7ba93=[],_0x38e326=Date['now']();for(let _0x445abf=0x0;_0x445abf<_0x1192e1[_0xa4c5c6(0x176)];_0x445abf++){const _0x59aae3=_0x1192e1[_0x445abf];_0x1192e1['length']>0x1?console[_0xa4c5c6(0x1a4)]('Test\x20'+(_0x445abf+0x1)+'/'+_0x1192e1[_0xa4c5c6(0x176)]+':\x20'+a5_0x3033f2['white'](_0x59aae3[_0xa4c5c6(0x1e2)])):console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x189)+a5_0x3033f2[_0xa4c5c6(0x158)](_0x59aae3[_0xa4c5c6(0x1e2)]));const _0x5b2381=createCommandSpinner(_0xa4c5c6(0x18e)+_0x59aae3[_0xa4c5c6(0x183)][_0xa4c5c6(0x176)]+_0xa4c5c6(0x17a));_0x5b2381[_0xa4c5c6(0x177)]();try{const {result:_0x2f9fa6,conversation:_0x4b4d40}=await runTest(_0x15611b[_0xa4c5c6(0x153)],_0x59aae3,{'agentId':_0x5c7d44,'projectId':_0x2b8e00,'site':_0x1f4cff,'noEval':_0x2f5aa1,'evaluatorId':_0x51f081,'onRoundStart':(_0x3187b5,_0xd28130)=>{const _0x418109=_0xa4c5c6;_0x5b2381[_0x418109(0x1cb)]=_0x418109(0x1ea)+(_0x3187b5+0x1)+'/'+_0xd28130+_0x418109(0x17a);},'onRoundComplete':(_0x391225,_0x37445c,_0x1f234a)=>{const _0x465ae8=_0xa4c5c6,_0x227522=formatElapsed(_0x37445c);_0x1f234a?console[_0x465ae8(0x1a4)](_0x465ae8(0x166)+(_0x391225+0x1)+'/'+_0x59aae3[_0x465ae8(0x183)]['length']+_0x465ae8(0x1cc)+a5_0x3033f2[_0x465ae8(0x17f)]('✓')+'\x20('+_0x227522+')'):console[_0x465ae8(0x1a4)]('\x20\x20Round\x20'+(_0x391225+0x1)+'/'+_0x59aae3[_0x465ae8(0x183)][_0x465ae8(0x176)]+_0x465ae8(0x1cc)+a5_0x3033f2[_0x465ae8(0x18c)]('✗'));},'onEvaluationStart':()=>{const _0x5139ec=_0xa4c5c6;_0x5b2381[_0x5139ec(0x1cb)]=_0x5139ec(0x16d);},'onEvaluationComplete':_0x175e5d=>{const _0x5a5e70=_0xa4c5c6,_0x2f76ae=formatElapsed(_0x175e5d);console[_0x5a5e70(0x1a4)](_0x5a5e70(0x1bc)+a5_0x3033f2[_0x5a5e70(0x17f)]('✓')+'\x20('+_0x2f76ae+')');}});_0x5b2381[_0xa4c5c6(0x1d3)](),_0x253598[_0xa4c5c6(0x1a8)](_0x2f9fa6),_0xf7ba93[_0xa4c5c6(0x1a8)](_0x4b4d40);if(_0x2f9fa6[_0xa4c5c6(0x173)]===_0xa4c5c6(0x172))console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x17f)](_0xa4c5c6(0x16a)+_0x2f9fa6[_0xa4c5c6(0x1b0)]));else _0x2f9fa6[_0xa4c5c6(0x173)]==='FAIL'?console['log'](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x197)+_0x2f9fa6[_0xa4c5c6(0x1b0)])):console['log'](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x19b)+_0x2f9fa6[_0xa4c5c6(0x1b0)]));_0x2f9fa6[_0xa4c5c6(0x1ac)]&&console['log'](a5_0x3033f2[_0xa4c5c6(0x17d)](_0xa4c5c6(0x157)+_0x2f9fa6[_0xa4c5c6(0x1ac)])),console[_0xa4c5c6(0x1a4)]();}catch(_0x5c1baf){_0x5b2381[_0xa4c5c6(0x1d3)]();const _0x356099=_0x5c1baf instanceof Error?_0x5c1baf[_0xa4c5c6(0x1e5)]:String(_0x5c1baf);console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x19b)+_0x356099)),console[_0xa4c5c6(0x1a4)](),_0x253598[_0xa4c5c6(0x1a8)]({'name':_0x59aae3[_0xa4c5c6(0x1e2)],'status':_0xa4c5c6(0x1cd),'reason':_0x356099,'timestamp':new Date()[_0xa4c5c6(0x182)](),'duration_ms':0x0});}}const _0x372665=Date['now']()-_0x38e326,_0x4ec171=_0x253598[_0xa4c5c6(0x1c7)](_0x5accd4=>_0x5accd4[_0xa4c5c6(0x173)]==='PASS')[_0xa4c5c6(0x176)],_0x2f0778=_0x253598[_0xa4c5c6(0x1c7)](_0xfb0baf=>_0xfb0baf['status']===_0xa4c5c6(0x15d))[_0xa4c5c6(0x176)],_0x23b9ad=_0x253598['filter'](_0x51694b=>_0x51694b[_0xa4c5c6(0x173)]===_0xa4c5c6(0x1cd))['length'];console[_0xa4c5c6(0x1a4)]('━'[_0xa4c5c6(0x167)](0x3c)),console['log']('Test\x20Summary'),console[_0xa4c5c6(0x1a4)]('━'['repeat'](0x3c)),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x1ca)+_0x253598[_0xa4c5c6(0x176)]),console[_0xa4c5c6(0x1a4)]('Passed:\x20\x20\x20'+a5_0x3033f2[_0xa4c5c6(0x17f)](_0x4ec171)),console[_0xa4c5c6(0x1a4)]('Failed:\x20\x20\x20'+a5_0x3033f2[_0xa4c5c6(0x18c)](_0x2f0778));_0x23b9ad>0x0&&console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x178)+a5_0x3033f2['red'](_0x23b9ad));console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x155)+formatElapsed(_0x372665)),console[_0xa4c5c6(0x1a4)]('━'[_0xa4c5c6(0x167)](0x3c));const _0x2ecf55=_0x253598['filter'](_0x50296a=>_0x50296a['status']!=='PASS');if(_0x2ecf55[_0xa4c5c6(0x176)]>0x0){console[_0xa4c5c6(0x1a4)](),console[_0xa4c5c6(0x1a4)](_0xa4c5c6(0x18f));for(const _0x25c963 of _0x2ecf55){const _0x31387d=a5_0x3033f2[_0xa4c5c6(0x18c)]('✗'),_0x2fda16=_0x25c963[_0xa4c5c6(0x1b0)][_0xa4c5c6(0x176)]>0x32?_0x25c963[_0xa4c5c6(0x1b0)][_0xa4c5c6(0x1da)](0x0,0x32)+_0xa4c5c6(0x16e):_0x25c963[_0xa4c5c6(0x1b0)];console[_0xa4c5c6(0x1a4)]('\x20\x20'+_0x31387d+'\x20'+_0x25c963[_0xa4c5c6(0x1e2)]+':\x20'+_0x2fda16);}}const _0x4b48f2={'summary':{'total':_0x253598['length'],'passed':_0x4ec171,'failed':_0x2f0778,'errors':_0x23b9ad>0x0?_0x23b9ad:undefined,'duration_ms':_0x372665},'tests':_0x253598,'agent':{'project':_0x1a7131[_0xa4c5c6(0x154)],'name':_0x1a7131[_0xa4c5c6(0x15c)],'site':_0x1f4cff},'timestamp':new Date(_0x38e326)[_0xa4c5c6(0x182)]()};try{const _0x5a146a=buildCachedTestRun(_0xf7ba93,{'site':_0x1f4cff,'projectId':_0x2b8e00,'projectName':_0x1a7131['projectName'],'agentId':_0x5c7d44,'agentName':_0x1a7131[_0xa4c5c6(0x15c)],'testYmlPath':a5_0x4ac58a[_0xa4c5c6(0x1df)](_0x1a7131[_0xa4c5c6(0x179)])});saveLastTestRun(_0x5a146a);}catch{}if(_0x182cde!==_0xa4c5c6(0x190)||_0x1a4868){const _0x3238ef=formatResults(_0x4b48f2,_0x182cde);if(_0x1a4868)try{a5_0x59bfdf[_0xa4c5c6(0x1d2)](_0x1a4868,_0x3238ef,_0xa4c5c6(0x1be)),console[_0xa4c5c6(0x1a4)](),console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x17d)]('Output\x20written\x20to:\x20'+_0x1a4868));}catch(_0x49b5eb){return console[_0xa4c5c6(0x1a4)](),console[_0xa4c5c6(0x1a4)](a5_0x3033f2[_0xa4c5c6(0x18c)](_0xa4c5c6(0x194)+_0x49b5eb)),0x1;}else console['log'](),console[_0xa4c5c6(0x1a4)](_0x3238ef);}return _0x2ecf55[_0xa4c5c6(0x176)]>0x0?0x1:0x0;}async[a5_0x437b71(0x1bb)](_0x1632da,_0x158b79){const _0x590837=a5_0x437b71,{options:_0xcc0589,tdx:_0x3b4d56}=_0x1632da,{definition:_0x52666f,agentInfo:_0x3d53e4,outputFormat:_0x13dd8f,outputFile:_0x431383}=_0x158b79,_0x517b25=_0xcc0589[_0x590837(0x1d0)],_0x3237c7=loadLastTestRun();if(!_0x3237c7)return console[_0x590837(0x1a4)](a5_0x3033f2['red'](_0x590837(0x1e7))),console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x17d)](_0x590837(0x185))),0x1;if(_0x3237c7[_0x590837(0x1ae)][_0x590837(0x15c)]!==_0x3d53e4[_0x590837(0x15c)])return console[_0x590837(0x1a4)](a5_0x3033f2['red'](_0x590837(0x1b1)+_0x3237c7['agent'][_0x590837(0x15c)]+_0x590837(0x1a1)+_0x3d53e4[_0x590837(0x15c)]+'\x22.')),console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x17d)]('Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.')),0x1;const _0x108d07=new Set(_0x3237c7[_0x590837(0x18b)][_0x590837(0x1b5)](_0x38cb5b=>_0x38cb5b[_0x590837(0x165)])),_0x48ae55=_0x52666f['tests'][_0x590837(0x1c7)](_0x1eed96=>!_0x108d07[_0x590837(0x1a3)](_0x1eed96['name']));if(_0x48ae55[_0x590837(0x176)]>0x0&&_0x3237c7[_0x590837(0x1d0)]!==_0x517b25)return console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x18c)](_0x590837(0x175))),console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x17d)]('Cached\x20run\x20is\x20from\x20site\x20\x22'+_0x3237c7[_0x590837(0x1d0)]+_0x590837(0x17b)+_0x517b25+'\x22.')),console['log'](a5_0x3033f2[_0x590837(0x17d)]('Either\x20switch\x20to\x20the\x20\x22'+_0x3237c7[_0x590837(0x1d0)]+_0x590837(0x1c0))),0x1;const _0x5cf887=_0x52666f[_0x590837(0x1c4)]['filter'](_0x4047c5=>_0x108d07[_0x590837(0x1a3)](_0x4047c5[_0x590837(0x1e2)])),_0x4fc818=_0x48ae55;let _0xbc1abc;try{_0xbc1abc=await setupEvaluatorAgent(_0x3b4d56['llm'],_0xcc0589['verbose']);}catch(_0x2b2eac){const _0x40a169=_0x2b2eac instanceof Error?_0x2b2eac['message']:String(_0x2b2eac);return console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x18c)](_0x590837(0x1e4)+_0x40a169)),0x1;}console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x1e9)]('Re-evaluating\x20cached\x20test\x20run...')),console[_0x590837(0x1a4)](_0x590837(0x1ab)+a5_0x3033f2[_0x590837(0x158)](_0x3237c7['timestamp'])),console[_0x590837(0x1a4)](_0x590837(0x192)+a5_0x3033f2[_0x590837(0x158)](_0x3237c7['agent'][_0x590837(0x154)]+'/'+_0x3237c7[_0x590837(0x1ae)]['agentName']));_0x4fc818[_0x590837(0x176)]>0x0&&console[_0x590837(0x1a4)](_0x590837(0x1dd)+a5_0x3033f2[_0x590837(0x169)](_0x4fc818[_0x590837(0x176)]));console['log']();const _0x160349=[],_0x515859=Date[_0x590837(0x193)](),_0x390730=createCommandSpinner(_0x590837(0x1b3));if(_0x5cf887[_0x590837(0x176)]>0x0)try{const _0x22afe3=await reevaluateFromCache(_0x3b4d56['llm'],_0x3237c7,{'tests':_0x5cf887},{'evaluatorId':_0xbc1abc,'onTestStart':(_0x15f284,_0x54296f,_0x2913b4)=>{const _0x1ebb51=_0x590837;_0x390730[_0x1ebb51(0x1cb)]='Re-evaluating\x20'+(_0x54296f+0x1)+'/'+_0x2913b4+':\x20'+_0x15f284+_0x1ebb51(0x16e);if(!_0x390730[_0x1ebb51(0x1e3)])_0x390730[_0x1ebb51(0x177)]();},'onTestComplete':(_0x2d200a,_0x3ccbe0)=>{const _0x203b74=_0x590837;_0x390730[_0x203b74(0x1d3)]();if(_0x3ccbe0[_0x203b74(0x173)]===_0x203b74(0x172))console[_0x203b74(0x1a4)](a5_0x3033f2[_0x203b74(0x17f)](_0x203b74(0x16a)+_0x2d200a)+a5_0x3033f2[_0x203b74(0x17d)](_0x203b74(0x1c9)));else _0x3ccbe0[_0x203b74(0x173)]==='FAIL'?console[_0x203b74(0x1a4)](a5_0x3033f2[_0x203b74(0x18c)]('✗\x20FAIL:\x20'+_0x2d200a+_0x203b74(0x1b2)+_0x3ccbe0[_0x203b74(0x1b0)])+a5_0x3033f2[_0x203b74(0x17d)](_0x203b74(0x1c9))):console['log'](a5_0x3033f2[_0x203b74(0x18c)](_0x203b74(0x19b)+_0x2d200a+_0x203b74(0x1b2)+_0x3ccbe0[_0x203b74(0x1b0)]));_0x3ccbe0[_0x203b74(0x1ac)]&&console['log'](a5_0x3033f2[_0x203b74(0x17d)](_0x203b74(0x184)+_0x3ccbe0[_0x203b74(0x1ac)])),_0x160349[_0x203b74(0x1a8)](_0x3ccbe0);},'onTestSkipped':(_0x357aee,_0x2df1fb)=>{const _0x1b14f5=_0x590837;_0x390730[_0x1b14f5(0x1d3)](),console[_0x1b14f5(0x1a4)](a5_0x3033f2[_0x1b14f5(0x169)](_0x1b14f5(0x161)+_0x357aee+_0x1b14f5(0x1b2)+_0x2df1fb));}});for(const _0x2191cc of _0x22afe3){!_0x160349[_0x590837(0x1e0)](_0x332574=>_0x332574[_0x590837(0x1e2)]===_0x2191cc[_0x590837(0x1e2)])&&_0x160349[_0x590837(0x1a8)](_0x2191cc);}}catch(_0x3f141c){_0x390730[_0x590837(0x1d3)]();const _0x42b895=_0x3f141c instanceof Error?_0x3f141c[_0x590837(0x1e5)]:String(_0x3f141c);return console[_0x590837(0x1a4)](a5_0x3033f2['red'](_0x590837(0x1ce)+_0x42b895)),0x1;}_0x390730[_0x590837(0x1d3)]();if(_0x4fc818[_0x590837(0x176)]>0x0){console[_0x590837(0x1a4)](),console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x1e9)](_0x590837(0x186)));const {projectId:_0x5c9bf3,agentId:_0x3bdae6}=_0x3237c7[_0x590837(0x1ae)];for(const _0x35fb46 of _0x4fc818){console['log'](_0x590837(0x160)+a5_0x3033f2[_0x590837(0x158)](_0x35fb46[_0x590837(0x1e2)]));const _0x7c5aed=createCommandSpinner('Round\x201/'+_0x35fb46[_0x590837(0x183)]['length']+_0x590837(0x17a));_0x7c5aed['start']();try{const {result:_0x38e7c0}=await runTest(_0x3b4d56[_0x590837(0x153)],_0x35fb46,{'agentId':_0x3bdae6,'projectId':_0x5c9bf3,'site':_0x3237c7['site'],'noEval':![],'evaluatorId':_0xbc1abc,'onRoundStart':(_0x1cde99,_0x19105e)=>{const _0x39e7e1=_0x590837;_0x7c5aed[_0x39e7e1(0x1cb)]=_0x39e7e1(0x1ea)+(_0x1cde99+0x1)+'/'+_0x19105e+_0x39e7e1(0x17a);},'onRoundComplete':(_0x213a3f,_0x4ed8cc,_0x40cc07)=>{const _0x5afa70=_0x590837,_0x9efc14=formatElapsed(_0x4ed8cc);_0x40cc07?console[_0x5afa70(0x1a4)](_0x5afa70(0x166)+(_0x213a3f+0x1)+'/'+_0x35fb46[_0x5afa70(0x183)]['length']+_0x5afa70(0x1cc)+a5_0x3033f2[_0x5afa70(0x17f)]('✓')+'\x20('+_0x9efc14+')'):console[_0x5afa70(0x1a4)]('\x20\x20Round\x20'+(_0x213a3f+0x1)+'/'+_0x35fb46[_0x5afa70(0x183)][_0x5afa70(0x176)]+_0x5afa70(0x1cc)+a5_0x3033f2[_0x5afa70(0x18c)]('✗'));},'onEvaluationStart':()=>{const _0xf58d2c=_0x590837;_0x7c5aed[_0xf58d2c(0x1cb)]=_0xf58d2c(0x16d);},'onEvaluationComplete':_0x5594d7=>{const _0x13be36=_0x590837,_0x5c62de=formatElapsed(_0x5594d7);console[_0x13be36(0x1a4)](_0x13be36(0x1bc)+a5_0x3033f2[_0x13be36(0x17f)]('✓')+'\x20('+_0x5c62de+')');}});_0x7c5aed[_0x590837(0x1d3)](),_0x160349[_0x590837(0x1a8)](_0x38e7c0);if(_0x38e7c0['status']===_0x590837(0x172))console['log'](a5_0x3033f2[_0x590837(0x17f)](_0x590837(0x16a)+_0x38e7c0[_0x590837(0x1b0)])+a5_0x3033f2[_0x590837(0x17d)](_0x590837(0x1a0)));else _0x38e7c0[_0x590837(0x173)]===_0x590837(0x15d)?console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x18c)](_0x590837(0x197)+_0x38e7c0['reason'])+a5_0x3033f2[_0x590837(0x17d)](_0x590837(0x1a0))):console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x18c)]('✗\x20ERROR:\x20'+_0x38e7c0[_0x590837(0x1b0)]));_0x38e7c0['conversation_url']&&console['log'](a5_0x3033f2[_0x590837(0x17d)](_0x590837(0x184)+_0x38e7c0[_0x590837(0x1ac)]));}catch(_0x3a2f4b){_0x7c5aed[_0x590837(0x1d3)]();const _0xc3a663=_0x3a2f4b instanceof Error?_0x3a2f4b[_0x590837(0x1e5)]:String(_0x3a2f4b);console['log'](a5_0x3033f2[_0x590837(0x18c)]('✗\x20ERROR:\x20'+_0xc3a663)),_0x160349[_0x590837(0x1a8)]({'name':_0x35fb46['name'],'status':_0x590837(0x1cd),'reason':_0xc3a663,'timestamp':new Date()[_0x590837(0x182)](),'duration_ms':0x0});}}}console['log']();const _0x347670=Date[_0x590837(0x193)]()-_0x515859,_0x3afe0d=_0x160349[_0x590837(0x1c7)](_0x1fcf57=>_0x1fcf57['status']==='PASS')['length'],_0x877cdc=_0x160349[_0x590837(0x1c7)](_0x88cb06=>_0x88cb06['status']===_0x590837(0x15d))[_0x590837(0x176)],_0x28001d=_0x160349['filter'](_0x1eccf2=>_0x1eccf2[_0x590837(0x173)]===_0x590837(0x1cd))['length'];console[_0x590837(0x1a4)]('━'[_0x590837(0x167)](0x3c)),console['log']('Re-evaluation\x20Summary'),console[_0x590837(0x1a4)]('━'['repeat'](0x3c)),console['log'](_0x590837(0x1ca)+_0x160349[_0x590837(0x176)]),console[_0x590837(0x1a4)](_0x590837(0x1db)+a5_0x3033f2['green'](_0x3afe0d)),console[_0x590837(0x1a4)](_0x590837(0x1e6)+a5_0x3033f2['red'](_0x877cdc));_0x28001d>0x0&&console[_0x590837(0x1a4)](_0x590837(0x178)+a5_0x3033f2[_0x590837(0x18c)](_0x28001d));console[_0x590837(0x1a4)](_0x590837(0x155)+formatElapsed(_0x347670)),console['log']('━'[_0x590837(0x167)](0x3c));const _0x5349c9={'summary':{'total':_0x160349[_0x590837(0x176)],'passed':_0x3afe0d,'failed':_0x877cdc,'errors':_0x28001d>0x0?_0x28001d:undefined,'duration_ms':_0x347670},'tests':_0x160349,'agent':{'project':_0x3d53e4[_0x590837(0x154)],'name':_0x3d53e4[_0x590837(0x15c)],'site':_0x517b25},'timestamp':new Date(_0x515859)[_0x590837(0x182)]()};if(_0x13dd8f!==_0x590837(0x190)||_0x431383){const _0x2a29ef=formatResults(_0x5349c9,_0x13dd8f);if(_0x431383)try{a5_0x59bfdf[_0x590837(0x1d2)](_0x431383,_0x2a29ef,_0x590837(0x1be)),console[_0x590837(0x1a4)](),console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x17d)](_0x590837(0x1b8)+_0x431383));}catch(_0xa76ee9){return console[_0x590837(0x1a4)](),console[_0x590837(0x1a4)](a5_0x3033f2[_0x590837(0x18c)](_0x590837(0x194)+_0xa76ee9)),0x1;}else console[_0x590837(0x1a4)](),console['log'](_0x2a29ef);}const _0x310346=_0x160349['filter'](_0x42cf9a=>_0x42cf9a[_0x590837(0x173)]!==_0x590837(0x172));return _0x310346[_0x590837(0x176)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x42aa9b=a6_0x2203;(function(_0x2b4adc,_0x3fcbaf){const _0x566be5=a6_0x2203,_0xb123c2=_0x2b4adc();while(!![]){try{const _0xb90134=-parseInt(_0x566be5(0x1c9))/0x1+-parseInt(_0x566be5(0x1c2))/0x2+-parseInt(_0x566be5(0x1b4))/0x3+-parseInt(_0x566be5(0x1a0))/0x4+-parseInt(_0x566be5(0x1cc))/0x5+-parseInt(_0x566be5(0x1d0))/0x6*(parseInt(_0x566be5(0x1c3))/0x7)+parseInt(_0x566be5(0x1c6))/0x8;if(_0xb90134===_0x3fcbaf)break;else _0xb123c2['push'](_0xb123c2['shift']());}catch(_0x1a5800){_0xb123c2['push'](_0xb123c2['shift']());}}}(a6_0x4c70,0xbd1ab));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';function a6_0x2203(_0x5cee6b,_0x3099ce){_0x5cee6b=_0x5cee6b-0x197;const _0x4c70d1=a6_0x4c70();let _0x2203f6=_0x4c70d1[_0x5cee6b];return _0x2203f6;}import{getAuthHeaders}from'../core/auth.js';function a6_0x4c70(){const _0x4d69b7=['error','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','Endpoint\x20must\x20start\x20with\x20/:\x20','cas','cdp','x-trino-user','Error:\x20','readBodyFromFile','cookie','5273992nfhTYK','.\x20Valid\x20methods:\x20','DELETE','request','\x22.\x20','substring','proxy-authorization','execute','file','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','POST','Invalid\x20header\x20format:\x20\x22','isArray','GET','\x0aStack\x20trace:\x0a','Invalid\x20HTTP\x20method:\x20','headers','PUT','site','description','2995893jBjxgB','entries','trino','<\x20HTTP/1.1\x20','method','type','log','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','name','x-auth-token','join','body','message','api','521570VXWHww','14FLbfnf','.\x20Valid\x20types:\x20','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','42997080KaEZzp','output','color','963684EMHSSY','x-xsrf-token','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','3040870iMxKFu','startsWith','header','set-cookie2','1350876cpjtDG','data','includes','keys','indexOf','verbose','has','workflow','trim'];a6_0x4c70=function(){return _0x4d69b7;};return a6_0x4c70();}const SENSITIVE_HEADERS=new Set(['authorization',a6_0x42aa9b(0x1a6),a6_0x42aa9b(0x19f),'set-cookie',a6_0x42aa9b(0x1cf),a6_0x42aa9b(0x1ca),a6_0x42aa9b(0x1bd),a6_0x42aa9b(0x19c)]);function isSensitiveHeader(_0x1c0582){const _0x2abccc=a6_0x42aa9b;return SENSITIVE_HEADERS[_0x2abccc(0x1d6)](_0x1c0582['toLowerCase']());}function parseHeader(_0x785b){const _0x10b4ca=a6_0x42aa9b,_0x28eec1=_0x785b[_0x10b4ca(0x1d4)](':');if(_0x28eec1===-0x1)throw new Error(_0x10b4ca(0x1ab)+_0x785b+_0x10b4ca(0x1a4)+_0x10b4ca(0x1bb));const _0x24e51d=_0x785b[_0x10b4ca(0x1a5)](0x0,_0x28eec1)[_0x10b4ca(0x1d8)](),_0x58579e=_0x785b[_0x10b4ca(0x1a5)](_0x28eec1+0x1)[_0x10b4ca(0x1d8)]();if(!_0x24e51d)throw new Error(_0x10b4ca(0x1cb)+_0x785b+'\x22');return[_0x24e51d,_0x58579e];}export class ApiCommand extends BaseCommand{[a6_0x42aa9b(0x1bc)]=a6_0x42aa9b(0x1c1);[a6_0x42aa9b(0x1b3)]=a6_0x42aa9b(0x198);['validate'](_0x1429f4){const _0x2172bf=a6_0x42aa9b,{args:_0x19f336,options:_0x57ac1c}=_0x1429f4,_0x50ff60=_0x57ac1c;if(_0x19f336['length']===0x0)return _0x2172bf(0x1a9);const _0x11f6f8=_0x19f336[0x0];if(!_0x11f6f8[_0x2172bf(0x1cd)]('/'))return _0x2172bf(0x199)+_0x11f6f8;const _0xc849d3=_0x50ff60['data'],_0x1bc0d3=_0x50ff60[_0x2172bf(0x1a8)];if(_0xc849d3&&_0x1bc0d3)return _0x2172bf(0x1c5);const _0x3f6386=_0x50ff60[_0x2172bf(0x1b8)]||_0x2172bf(0x1ad),_0xaa31a7=[_0x2172bf(0x1ad),_0x2172bf(0x1aa),_0x2172bf(0x1b1),_0x2172bf(0x1a2),'PATCH'];if(!_0xaa31a7[_0x2172bf(0x1d2)](_0x3f6386['toUpperCase']()))return _0x2172bf(0x1af)+_0x3f6386+_0x2172bf(0x1a1)+_0xaa31a7[_0x2172bf(0x1be)](',\x20');const _0x32b9ff=_0x50ff60[_0x2172bf(0x1b9)]||'td',_0x365583=['td',_0x2172bf(0x19b),_0x2172bf(0x1d7),_0x2172bf(0x1b6),'llm','llm-proxy',_0x2172bf(0x19a)];if(!_0x365583[_0x2172bf(0x1d2)](_0x32b9ff))return'Invalid\x20API\x20type:\x20'+_0x32b9ff+_0x2172bf(0x1c4)+_0x365583[_0x2172bf(0x1be)](',\x20');return undefined;}async[a6_0x42aa9b(0x1a7)](_0x21a78c){const _0x254cfb=a6_0x42aa9b,{options:_0x19fb6d,args:_0x27ceb5,tdx:_0x25a310}=_0x21a78c,_0x2758c1=_0x19fb6d,_0x3f373f=_0x27ceb5[0x0],_0x351061=(_0x2758c1[_0x254cfb(0x1b8)]||_0x254cfb(0x1ad))['toUpperCase'](),_0x58e8b0=_0x2758c1[_0x254cfb(0x1d1)],_0x4497fc=_0x2758c1['file'],_0x2a7003=_0x2758c1[_0x254cfb(0x1ce)],_0xa36c04=_0x2758c1['type']||'td';try{const _0xa17209={};if(_0x2a7003){const _0xa0129f=Array[_0x254cfb(0x1ac)](_0x2a7003)?_0x2a7003:[_0x2a7003];for(const _0x17e38d of _0xa0129f){const [_0x3b8e59,_0x31366b]=parseHeader(_0x17e38d);_0xa17209[_0x3b8e59]=_0x31366b;}}let _0x52af29;if(_0x58e8b0)_0x52af29=_0x58e8b0;else{if(_0x4497fc)try{_0x52af29=RawAPI[_0x254cfb(0x19e)](_0x4497fc);}catch(_0x1bf81a){return console[_0x254cfb(0x197)]('Error:\x20'+(_0x1bf81a instanceof Error?_0x1bf81a[_0x254cfb(0x1c0)]:String(_0x1bf81a))),0x1;}}const _0x51afb5={'method':_0x351061,'apiType':_0xa36c04,'includeHeaders':_0x19fb6d[_0x254cfb(0x1d5)]};_0x52af29&&(_0x51afb5[_0x254cfb(0x1bf)]=_0x52af29);Object[_0x254cfb(0x1d3)](_0xa17209)['length']>0x0&&(_0x51afb5[_0x254cfb(0x1b0)]=_0xa17209);if(_0x19fb6d[_0x254cfb(0x1d5)]){const _0x8f87f5=resolveSite(_0x19fb6d[_0x254cfb(0x1b2)]),_0x41d11e=getEndpoint(_0x8f87f5,_0xa36c04),_0x53d3fe=''+_0x41d11e+_0x3f373f;console[_0x254cfb(0x197)]('>\x20'+_0x351061+'\x20'+_0x53d3fe);const _0x2b5d6b=getAuthHeaders(_0x8f87f5),_0x5f220a={..._0x2b5d6b,..._0xa17209};for(const [_0x56c625,_0x3bc38b]of Object[_0x254cfb(0x1b5)](_0x5f220a)){!isSensitiveHeader(_0x56c625)&&console[_0x254cfb(0x197)]('>\x20'+_0x56c625+':\x20'+_0x3bc38b);}_0x52af29&&console['error']('>'),console[_0x254cfb(0x197)]('');}const _0x15be5a=await _0x25a310[_0x254cfb(0x1c1)][_0x254cfb(0x1a3)](_0x3f373f,_0x51afb5);if(_0x19fb6d['verbose']&&_0x15be5a[_0x254cfb(0x1b0)]){console[_0x254cfb(0x197)](_0x254cfb(0x1b7)+_0x15be5a['status']);for(const [_0xf083cb,_0x53d533]of Object[_0x254cfb(0x1b5)](_0x15be5a[_0x254cfb(0x1b0)])){!isSensitiveHeader(_0xf083cb)&&console[_0x254cfb(0x197)]('<\x20'+_0xf083cb+':\x20'+_0x53d533);}console[_0x254cfb(0x197)]('');}const _0x2ba692=Boolean(_0x19fb6d[_0x254cfb(0x1c7)]),_0x882784={'color':_0x19fb6d[_0x254cfb(0x1c8)],'noColor':_0x19fb6d['noColor']||_0x2ba692&&!_0x19fb6d[_0x254cfb(0x1c8)]},_0x29a82b=colorizeJSON(_0x15be5a[_0x254cfb(0x1d1)],_0x882784);return _0x19fb6d[_0x254cfb(0x1c7)]?(writeFileSync(_0x19fb6d[_0x254cfb(0x1c7)],_0x29a82b),console[_0x254cfb(0x197)]('Results\x20saved\x20to\x20'+_0x19fb6d[_0x254cfb(0x1c7)])):console[_0x254cfb(0x1ba)](_0x29a82b),0x0;}catch(_0x1309cb){return _0x1309cb instanceof Error?(console['error']('Error:\x20'+_0x1309cb[_0x254cfb(0x1c0)]),_0x19fb6d[_0x254cfb(0x1d5)]&&_0x1309cb['stack']&&console[_0x254cfb(0x197)](_0x254cfb(0x1ae)+_0x1309cb['stack'])):console[_0x254cfb(0x197)](_0x254cfb(0x19d)+String(_0x1309cb)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x4fb7f7=a7_0x1ef6;(function(_0x14e0de,_0x58e186){const _0x46e6f3=a7_0x1ef6,_0x52a419=_0x14e0de();while(!![]){try{const _0x3779cc=parseInt(_0x46e6f3(0x170))/0x1*(-parseInt(_0x46e6f3(0x15a))/0x2)+parseInt(_0x46e6f3(0x16e))/0x3*(-parseInt(_0x46e6f3(0x17d))/0x4)+-parseInt(_0x46e6f3(0x138))/0x5+-parseInt(_0x46e6f3(0x17c))/0x6*(-parseInt(_0x46e6f3(0x16d))/0x7)+parseInt(_0x46e6f3(0x140))/0x8+-parseInt(_0x46e6f3(0x156))/0x9+parseInt(_0x46e6f3(0x150))/0xa;if(_0x3779cc===_0x58e186)break;else _0x52a419['push'](_0x52a419['shift']());}catch(_0x4d477f){_0x52a419['push'](_0x52a419['shift']());}}}(a7_0x2df9,0x6c29f));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';import{saveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';function a7_0x2df9(){const _0x50e172=['auth:setup','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','OAuth\x20tokens','Read\x20credential\x20from\x20','email','User:\x20','Credential\x20type:\x20OAuth','oauth','N/A','2951389YHXiEd','3TpOskc','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','303480CnIjaF','No\x20credentials\x20found\x20in\x20keychain','red','create','site','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','tdx:\x20auth\x20clear','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','System\x20keychain\x20is\x20not\x20available','status','✓\x20Authentication\x20successful\x0a','us01','6mxxyWM','927232xEUciK','Remove\x20API\x20key\x20from\x20system\x20keychain','logLevel','warn','last_name','✗\x20Validation\x20failed:\x20','apikey','/app/mp/ak','API\x20key','name','execute','\x20\x20tdx','\x27\x20registered','profile','auth','API\x20key\x20cannot\x20be\x20empty','✓\x20Profile\x20\x27','password','OAuth\x20(browser\x20login)','bold','2108460OBXATB','\x20(profile:\x20','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','tdx:\x20auth\x20setup','\x20(site:\x20','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','4054608OVovjC','\x0aSetup\x20cancelled','\x20--profile\x20','filter','message','Setup\x20cancelled','getUserInfo','No\x20credential\x20found','log','join','✓\x20Default\x20site\x20set\x20to\x20','tdx\x20profile:\x20','auth:clear','method','error','trim','5388330ZvWyrS','You\x20can\x20find\x20your\x20API\x20key\x20at:','Setup\x20API\x20key\x20authentication\x20interactively','Choose\x20authentication\x20method:','description','\x20removed\x20from\x20keychain','605403zuPCNw','Validating\x20API\x20key...','Enter\x20your\x20TD\x20API\x20key:','Read\x20credential\x20from\x20keychain','2KbcnWu','apiKey','select','Name:\x20','jobs','first_name','ERROR','all','yellow','\x20and\x20'];a7_0x2df9=function(){return _0x50e172;};return a7_0x2df9();}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_0x58bc78 from'prompts';function a7_0x1ef6(_0x1ec75f,_0xeb229){_0x1ec75f=_0x1ec75f-0x12f;const _0x2df946=a7_0x2df9();let _0x1ef63f=_0x2df946[_0x1ec75f];return _0x1ef63f;}import{HTTPClientError}from'../sdk/client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a7_0x28bd11 from'chalk';export class AuthSetupCommand extends BaseCommand{[a7_0x4fb7f7(0x186)]=a7_0x4fb7f7(0x164);[a7_0x4fb7f7(0x154)]=a7_0x4fb7f7(0x152);async[a7_0x4fb7f7(0x187)](_0x59caff){const _0x244c06=a7_0x4fb7f7,{options:_0x3ed080}=_0x59caff,_0x4d3612=_0x3ed080[_0x244c06(0x131)];console['log'](a7_0x28bd11[_0x244c06(0x137)](_0x244c06(0x13d)));const _0x46c01e=_0x3ed080[_0x244c06(0x174)]||_0x244c06(0x17b),_0x343a27=await promptSiteSelection(_0x46c01e,_0x4d3612,_0x244c06(0x145));if(!_0x343a27)return 0x1;const _0x19aae9=resolveSite(_0x343a27);if(isOAuthSupported(_0x19aae9)){const _0x172405=await a7_0x58bc78({'type':_0x244c06(0x15c),'name':_0x244c06(0x14d),'message':_0x244c06(0x153),'choices':[{'title':_0x244c06(0x136),'value':_0x244c06(0x16b)},{'title':'API\x20Key','value':_0x244c06(0x183)}]});if(!_0x172405[_0x244c06(0x14d)])return console[_0x244c06(0x148)](_0x244c06(0x141)),0x1;if(_0x172405[_0x244c06(0x14d)]===_0x244c06(0x16b))return await runOAuthLoginFlow(_0x19aae9,_0x4d3612,_0x3ed080[_0x244c06(0x17f)]??LogLevel[_0x244c06(0x160)]),0x0;}console[_0x244c06(0x148)]('Setting\x20up\x20authentication\x20for\x20site:\x20'+_0x19aae9),console[_0x244c06(0x148)](_0x244c06(0x151)),console[_0x244c06(0x148)]('\x20\x20'+getConsoleUrl(_0x19aae9,_0x244c06(0x184)));const _0x27ab5e=await a7_0x58bc78({'type':_0x244c06(0x135),'name':_0x244c06(0x15b),'message':_0x244c06(0x158),'validate':_0x256ac3=>{const _0x4fe764=_0x244c06;if(!_0x256ac3||!_0x256ac3[_0x4fe764(0x14f)]())return _0x4fe764(0x133);return!![];}});if(!_0x27ab5e[_0x244c06(0x15b)])return console[_0x244c06(0x148)](_0x244c06(0x141)),0x1;const _0x55a0f0=_0x27ab5e[_0x244c06(0x15b)];console['log'](_0x244c06(0x157));try{const _0x324ed1=TDX[_0x244c06(0x173)]({'site':_0x19aae9,'apiKey':_0x55a0f0[_0x244c06(0x14f)](),'logLevel':_0x3ed080[_0x244c06(0x17f)]??LogLevel[_0x244c06(0x160)]}),_0x39fb73=await _0x324ed1[_0x244c06(0x15e)][_0x244c06(0x146)]();console['log'](_0x244c06(0x175)+_0x39fb73[_0x244c06(0x168)]+')');const _0x59162b=await isKeychainAvailable();_0x59162b?(await saveAPIKeyAsync(_0x55a0f0[_0x244c06(0x14f)](),_0x19aae9,_0x4d3612),console[_0x244c06(0x148)](_0x244c06(0x177)+(_0x4d3612?_0x244c06(0x139)+_0x4d3612+')':''))):(console[_0x244c06(0x180)](a7_0x28bd11[_0x244c06(0x162)](_0x244c06(0x13f))),console[_0x244c06(0x180)](a7_0x28bd11['yellow'](_0x244c06(0x13c))));if(_0x4d3612){const _0x5e68f4={'site':_0x19aae9};saveProfileToUserConfig(_0x4d3612,_0x5e68f4),console[_0x244c06(0x148)](_0x244c06(0x134)+_0x4d3612+_0x244c06(0x130));}else saveDefaultSiteToUserConfig(_0x19aae9),console[_0x244c06(0x148)](_0x244c06(0x14a)+_0x19aae9);const _0x43da09=_0x4d3612?_0x244c06(0x142)+_0x4d3612:'';return console['log'](),console[_0x244c06(0x148)](_0x244c06(0x16f)),console[_0x244c06(0x148)](_0x244c06(0x12f)+_0x43da09+_0x244c06(0x13b)),console[_0x244c06(0x148)](_0x244c06(0x12f)+_0x43da09+_0x244c06(0x13a)),0x0;}catch(_0x585b36){if(_0x585b36 instanceof HTTPClientError&&_0x585b36[_0x244c06(0x179)]===0x191)return printAuthError(_0x585b36),0x1;return console[_0x244c06(0x14e)](a7_0x28bd11['red'](_0x244c06(0x182)+(_0x585b36 instanceof Error?_0x585b36[_0x244c06(0x144)]:String(_0x585b36)))),console[_0x244c06(0x14e)]('API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.'),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a7_0x4fb7f7(0x186)]=a7_0x4fb7f7(0x132);[a7_0x4fb7f7(0x154)]=a7_0x4fb7f7(0x165);async[a7_0x4fb7f7(0x187)](_0x4fd342){const _0x1deebe=a7_0x4fb7f7,{options:_0x515df7,tdx:_0x3bcd1f}=_0x4fd342,_0x599239=_0x515df7[_0x1deebe(0x174)],_0x4cb81a=_0x515df7['profile'],_0x4ec2ba=_0x4cb81a?_0x4cb81a:_0x1deebe(0x16c);console[_0x1deebe(0x148)](_0x1deebe(0x14b)+_0x4ec2ba+_0x1deebe(0x13e)+_0x599239+')');const _0x156041=await getOAuthTokens(_0x4cb81a);if(_0x156041)console[_0x1deebe(0x148)](_0x1deebe(0x16a)),console[_0x1deebe(0x148)](_0x1deebe(0x159)+(_0x4cb81a?_0x1deebe(0x139)+_0x4cb81a+')':''));else{const _0x2bf491=await resolveAPIKeyAsync(_0x599239,_0x4cb81a);if(_0x2bf491){const {source:_0x5bcfde,isDeprecated:_0x14ef11}=_0x2bf491,_0x59fd23=_0x1deebe(0x167)+_0x5bcfde;console[_0x1deebe(0x148)](_0x14ef11?a7_0x28bd11['yellow'](_0x59fd23):_0x59fd23);}else console['log'](a7_0x28bd11[_0x1deebe(0x162)](_0x1deebe(0x147)));}try{const _0x255c63=await _0x3bcd1f[_0x1deebe(0x15e)]['getUserInfo']();return console[_0x1deebe(0x148)](a7_0x28bd11['green'](_0x1deebe(0x17a))),console[_0x1deebe(0x148)](_0x1deebe(0x169)+_0x255c63[_0x1deebe(0x168)]),(_0x255c63[_0x1deebe(0x15f)]||_0x255c63[_0x1deebe(0x181)])&&console[_0x1deebe(0x148)](_0x1deebe(0x15d)+[_0x255c63[_0x1deebe(0x15f)],_0x255c63['last_name']][_0x1deebe(0x143)](Boolean)[_0x1deebe(0x149)]('\x20')),0x0;}catch(_0x8455e5){return _0x8455e5 instanceof HTTPClientError&&_0x8455e5[_0x1deebe(0x179)]===0x191?printAuthError(_0x8455e5,!![],_0x4cb81a):console['error'](a7_0x28bd11['red'](_0x1deebe(0x182)+(_0x8455e5 instanceof Error?_0x8455e5[_0x1deebe(0x144)]:String(_0x8455e5)))),0x1;}}}export class AuthClearCommand extends BaseCommand{['name']=a7_0x4fb7f7(0x14c);[a7_0x4fb7f7(0x154)]=a7_0x4fb7f7(0x17e);async[a7_0x4fb7f7(0x187)](_0x421894){const _0x524b83=a7_0x4fb7f7,{options:_0xb4818d}=_0x421894,_0x527b04=_0xb4818d[_0x524b83(0x131)];console['log'](a7_0x28bd11['bold'](_0x524b83(0x176)));const _0x2fc661=await isKeychainAvailable();if(!_0x2fc661)return console[_0x524b83(0x14e)](a7_0x28bd11[_0x524b83(0x172)](_0x524b83(0x178))),0x1;const [_0x20faa8,_0xb64bc0]=await Promise[_0x524b83(0x161)]([deleteKeychainAPIKey(_0x527b04),deleteOAuthTokens(_0x527b04)]);if(_0x20faa8||_0xb64bc0){clearCredentialCache();const _0x265088=[_0x20faa8&&_0x524b83(0x185),_0xb64bc0&&_0x524b83(0x166)]['filter'](Boolean)[_0x524b83(0x149)](_0x524b83(0x163));return console[_0x524b83(0x148)]('✓\x20'+_0x265088+_0x524b83(0x155)+(_0x527b04?'\x20(profile:\x20'+_0x527b04+')':'')),0x0;}else return console[_0x524b83(0x148)](_0x524b83(0x171)+(_0x527b04?'\x20for\x20profile:\x20'+_0x527b04:'')),0x1;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x7f4a14=a8_0x4628;(function(_0x4dcda1,_0x28d7fb){const _0x299455=a8_0x4628,_0x4f9eb9=_0x4dcda1();while(!![]){try{const _0x20d4ae=-parseInt(_0x299455(0x1c0))/0x1*(-parseInt(_0x299455(0x1bf))/0x2)+parseInt(_0x299455(0x1cd))/0x3+-parseInt(_0x299455(0x1d2))/0x4*(-parseInt(_0x299455(0x1ba))/0x5)+-parseInt(_0x299455(0x1cf))/0x6+-parseInt(_0x299455(0x1b4))/0x7*(-parseInt(_0x299455(0x1ae))/0x8)+-parseInt(_0x299455(0x1d1))/0x9+parseInt(_0x299455(0x1ad))/0xa*(parseInt(_0x299455(0x1bc))/0xb);if(_0x20d4ae===_0x28d7fb)break;else _0x4f9eb9['push'](_0x4f9eb9['shift']());}catch(_0xd57178){_0x4f9eb9['push'](_0x4f9eb9['shift']());}}}(a8_0x9576,0x1acf0));import{BaseCommand}from'./command.js';import{resolveSite}from'../core/config.js';import{saveProfileToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';import{isKeychainAvailable}from'../core/keychain.js';function a8_0x9576(){const _0x21918a=['3XmvyWD','access_token','site','Authenticating\x20via\x20OAuth\x20for\x20site:\x20','OAuth\x20login\x20is\x20not\x20yet\x20available\x20for\x20site:\x20','logLevel','OAuth\x20is\x20currently\x20supported\x20on\x20dev-us01\x20and\x20dev-eu01\x20only.\x20','jobs','profile','auth:login','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','log','✓\x20Authentication\x20successful\x20(User:\x20','210894SadrWJ','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','1135008FaFGOn','tdx:\x20auth\x20login','1470150xaBZzv','173128NZrZzm','Validating\x20OAuth\x20tokens...','name','email','getUserInfo','description','/oauth/authorize','Login\x20cancelled','250XOloMl','89504iCiZUe','create','green','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','Waiting\x20for\x20authorization\x20(timeout:\x202\x20minutes)...','execute','84fwFADF','\x27\x20registered','Opening\x20browser\x20for\x20authentication...','✓\x20OAuth\x20tokens\x20saved\x20to\x20system\x20keychain','\x20(profile:\x20','\x20\x20tdx','10BiBbfT','✓\x20Profile\x20\x27','58157HUJngb','Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.','ERROR','26022xJTMCh'];a8_0x9576=function(){return _0x21918a;};return a8_0x9576();}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_0x4628(_0x4d86ac,_0x4da66c){_0x4d86ac=_0x4d86ac-0x1a8;const _0x9576ef=a8_0x9576();let _0x462812=_0x9576ef[_0x4d86ac];return _0x462812;}import{LogLevel}from'../utils/tdx-logger.js';import a8_0x55957a from'chalk';export async function runOAuthLoginFlow(_0x361e7f,_0x4796ce,_0x56c615){const _0xe511d1=a8_0x4628;if(!isOAuthSupported(_0x361e7f))throw new Error(_0xe511d1(0x1c4)+_0x361e7f+'.\x20'+_0xe511d1(0x1c6)+_0xe511d1(0x1bd));const _0x147b57=await isKeychainAvailable();if(!_0x147b57)throw new Error('System\x20keychain\x20is\x20not\x20available.\x20OAuth\x20tokens\x20cannot\x20be\x20saved.\x20'+_0xe511d1(0x1bd));const _0x229ab8=getConsoleUrl(_0x361e7f);console[_0xe511d1(0x1cb)](_0xe511d1(0x1b6)),console[_0xe511d1(0x1cb)]('\x20\x20'+_0x229ab8+_0xe511d1(0x1ab)),console[_0xe511d1(0x1cb)](_0xe511d1(0x1b2));const _0x5b01b3=await startOAuthFlow(_0x361e7f);console[_0xe511d1(0x1cb)](_0xe511d1(0x1d3));const _0xe23e13=TDX[_0xe511d1(0x1af)]({'site':_0x361e7f,'accessToken':_0x5b01b3[_0xe511d1(0x1c1)],'logLevel':_0x56c615??LogLevel[_0xe511d1(0x1be)]}),_0x14b9de=await _0xe23e13[_0xe511d1(0x1c7)][_0xe511d1(0x1a9)]();console['log'](a8_0x55957a[_0xe511d1(0x1b0)](_0xe511d1(0x1cc)+_0x14b9de[_0xe511d1(0x1a8)]+')')),await saveOAuthTokens(_0x5b01b3,_0x4796ce),console['log'](_0xe511d1(0x1b7)+(_0x4796ce?_0xe511d1(0x1b8)+_0x4796ce+')':''));if(_0x4796ce){const _0x146d18={'site':_0x361e7f};saveProfileToUserConfig(_0x4796ce,_0x146d18),console[_0xe511d1(0x1cb)](_0xe511d1(0x1bb)+_0x4796ce+_0xe511d1(0x1b5));}const _0x2c4481=_0x4796ce?'\x20--profile\x20'+_0x4796ce:'';console[_0xe511d1(0x1cb)](),console[_0xe511d1(0x1cb)](_0xe511d1(0x1ca)),console[_0xe511d1(0x1cb)](_0xe511d1(0x1b9)+_0x2c4481+_0xe511d1(0x1b1)),console['log'](_0xe511d1(0x1b9)+_0x2c4481+_0xe511d1(0x1ce));}export class AuthLoginCommand extends BaseCommand{[a8_0x7f4a14(0x1d4)]=a8_0x7f4a14(0x1c9);[a8_0x7f4a14(0x1aa)]='Login\x20via\x20OAuth\x20(opens\x20browser)';async[a8_0x7f4a14(0x1b3)](_0x41fc25){const _0x143ba9=a8_0x7f4a14,{options:_0x503838}=_0x41fc25,_0x5c463d=_0x503838[_0x143ba9(0x1c8)];console[_0x143ba9(0x1cb)](a8_0x55957a['bold'](_0x143ba9(0x1d0)));const _0x88623=_0x503838[_0x143ba9(0x1c2)]||'us01',_0x2b0cc9=await promptSiteSelection(_0x88623,_0x5c463d,_0x143ba9(0x1ac));if(!_0x2b0cc9)return 0x1;const _0x89ac86=resolveSite(_0x2b0cc9);return console[_0x143ba9(0x1cb)](_0x143ba9(0x1c3)+_0x89ac86),await runOAuthLoginFlow(_0x89ac86,_0x5c463d,_0x503838[_0x143ba9(0x1c5)]??LogLevel[_0x143ba9(0x1be)]),0x0;}}
|