@treasuredata/tdx 2026.3.33 → 2026.3.35
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.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.d.ts.map +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/api.js.map +1 -1
- package/dist/sdk/cas/cas-api-client.d.ts.map +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-api-client.js.map +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.d.ts.map +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/cdp-api-client.js.map +1 -1
- package/dist/sdk/client/delivery-api-client.d.ts.map +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js.map +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.d.ts.map +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/engage-api-client.js.map +1 -1
- package/dist/sdk/client/http-client.d.ts +7 -0
- package/dist/sdk/client/http-client.d.ts.map +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/http-client.js.map +1 -1
- package/dist/sdk/client/llm-api-client.d.ts.map +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js.map +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.d.ts.map +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/td-api-client.js.map +1 -1
- package/dist/sdk/client/trino-api-client.d.ts.map +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js.map +1 -1
- package/dist/sdk/client/workflow-client.d.ts.map +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/client/workflow-client.js.map +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.d.ts +12 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +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.d.ts.map +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/personalization.js.map +1 -1
- package/dist/sdk/policy.d.ts.map +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/policy.js.map +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.d.ts.map +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/realtime.js.map +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +1 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x155d62=a3_0x5441;function a3_0x5441(_0x4a7941,_0x823df9){_0x4a7941=_0x4a7941-0x1d7;const _0x41125a=a3_0x4112();let _0x54418b=_0x41125a[_0x4a7941];return _0x54418b;}function a3_0x4112(){const _0x1118a8=['81RfCPoq','121cqNlWt','\x27...','Resolved\x20child\x20ID:\x20','Listing\x20activations\x20for\x20segment\x20\x27','161ALallk','name','description','17893500wIHuvD','Resolving\x20parent\x20segment\x20\x27','2092452hRIaPg','114SmJFgO','1289144odfTra','error','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','cause','length','message','35020yqhjjQ','1146430Ffobbh','Parent\x20name:\x20','execute','756fsPgcA','site','List\x20activations\x20for\x20a\x20segment','verbose','activations','Error:\x20','\x20\x20Cause:\x20','347207zvZXAf','\x20activation','10202CtFwIS','segment','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','data'];a3_0x4112=function(){return _0x1118a8;};return a3_0x4112();}(function(_0x85f533,_0x357107){const _0x250274=a3_0x5441,_0x1dd164=_0x85f533();while(!![]){try{const _0x1bb3a0=parseInt(_0x250274(0x1e1))/0x1*(parseInt(_0x250274(0x1d8))/0x2)+-parseInt(_0x250274(0x1e6))/0x3+parseInt(_0x250274(0x1f2))/0x4*(-parseInt(_0x250274(0x1ee))/0x5)+-parseInt(_0x250274(0x1e7))/0x6*(-parseInt(_0x250274(0x1f9))/0x7)+-parseInt(_0x250274(0x1e8))/0x8*(-parseInt(_0x250274(0x1dc))/0x9)+parseInt(_0x250274(0x1ef))/0xa*(parseInt(_0x250274(0x1dd))/0xb)+-parseInt(_0x250274(0x1e4))/0xc;if(_0x1bb3a0===_0x357107)break;else _0x1dd164['push'](_0x1dd164['shift']());}catch(_0x2bdf1c){_0x1dd164['push'](_0x1dd164['shift']());}}}(a3_0x4112,0xeb073));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0x155d62(0x1e2)]=a3_0x155d62(0x1f6);[a3_0x155d62(0x1e3)]=a3_0x155d62(0x1f4);async[a3_0x155d62(0x1f1)](_0xbf4111){const _0x15cf57=a3_0x155d62,{options:_0x401593,args:_0x240272,tdx:_0x4bd016}=_0xbf4111;if(_0x240272[_0x15cf57(0x1ec)]===0x0)return console[_0x15cf57(0x1e9)]('Error:\x20Segment\x20name\x20is\x20required'),console['error'](_0x15cf57(0x1ea)),0x1;try{const {parentId:_0x99a7b4,childId:_0x4e92ea}=parseSegmentRef(_0x240272[0x0]);if(!_0x4e92ea)return console[_0x15cf57(0x1e9)](_0x15cf57(0x1da)),console['error'](_0x15cf57(0x1ea)),0x1;_0x401593[_0x15cf57(0x1f5)]&&(console[_0x15cf57(0x1e9)]('Site:\x20'+_0x401593[_0x15cf57(0x1f3)]),console['error'](_0x15cf57(0x1f0)+_0x99a7b4),console['error']('Child\x20name:\x20'+_0x4e92ea));const _0x160b86=await withSpinner(_0x15cf57(0x1e5)+_0x99a7b4+'\x27...',()=>_0x4bd016[_0x15cf57(0x1d9)]['resolveParentId'](_0x99a7b4),{'verbose':_0x401593[_0x15cf57(0x1f5)]}),_0x433092=_0x160b86[_0x15cf57(0x1db)];_0x401593['verbose']&&console[_0x15cf57(0x1e9)]('Resolved\x20parent\x20ID:\x20'+_0x433092);const _0x2b98e0=await withSpinner('Resolving\x20child\x20segment\x20\x27'+_0x4e92ea+_0x15cf57(0x1de),()=>_0x4bd016['segment']['resolveSegmentId'](_0x433092,_0x4e92ea),{'verbose':_0x401593[_0x15cf57(0x1f5)]}),_0x22ea4c=_0x2b98e0[_0x15cf57(0x1db)];_0x401593[_0x15cf57(0x1f5)]&&console[_0x15cf57(0x1e9)](_0x15cf57(0x1df)+_0x22ea4c);const _0x1f141a=await withSpinner(_0x15cf57(0x1e0)+_0x4e92ea+_0x15cf57(0x1de),()=>_0x4bd016['segment']['listActivations'](_0x433092,_0x22ea4c),{'verbose':_0x401593['verbose']}),_0x39c8cd=_0x1f141a[_0x15cf57(0x1db)];return console[_0x15cf57(0x1e9)]('✔\x20Found\x20'+_0x39c8cd[_0x15cf57(0x1ec)]+_0x15cf57(0x1d7)+(_0x39c8cd[_0x15cf57(0x1ec)]!==0x1?'s':'')),await handleSDKOutput(_0x39c8cd,_0x401593),0x0;}catch(_0x4ce905){if(_0x4ce905 instanceof SDKError)return console[_0x15cf57(0x1e9)](_0x15cf57(0x1f7)+_0x4ce905[_0x15cf57(0x1ed)]),_0x4ce905[_0x15cf57(0x1eb)]&&console[_0x15cf57(0x1e9)](_0x15cf57(0x1f8)+_0x4ce905['cause']),0x1;throw _0x4ce905;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4_0x510263=a4_0x1a6c;(function(_0x1f5499,_0x31da62){const _0x457bb9=a4_0x1a6c,_0x57cf1b=_0x1f5499();while(!![]){try{const _0x264ed3=-parseInt(_0x457bb9(0x189))/0x1+parseInt(_0x457bb9(0x14e))/0x2*(-parseInt(_0x457bb9(0x181))/0x3)+-parseInt(_0x457bb9(0x168))/0x4*(parseInt(_0x457bb9(0x167))/0x5)+parseInt(_0x457bb9(0x1b9))/0x6+-parseInt(_0x457bb9(0x1ce))/0x7+-parseInt(_0x457bb9(0x154))/0x8+parseInt(_0x457bb9(0x1ab))/0x9;if(_0x264ed3===_0x31da62)break;else _0x57cf1b['push'](_0x57cf1b['shift']());}catch(_0x36d1bc){_0x57cf1b['push'](_0x57cf1b['shift']());}}}(a4_0xa958,0x357f6));import a4_0x445426 from'chalk';import a4_0x136a8c from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';function a4_0x1a6c(_0x129725,_0x4aba77){_0x129725=_0x129725-0x148;const _0xa958cb=a4_0xa958();let _0x1a6cee=_0xa958cb[_0x129725];return _0x1a6cee;}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(_0x446a82){const _0x4219ec=a4_0x1a6c,_0x4e2921=[];if(_0x446a82['total']!==undefined)_0x4e2921[_0x4219ec(0x180)](_0x446a82[_0x4219ec(0x1c2)]+_0x4219ec(0x156));if(_0x446a82[_0x4219ec(0x1af)]!==undefined&&_0x446a82[_0x4219ec(0x1af)]>0x0)_0x4e2921[_0x4219ec(0x180)](a4_0x445426[_0x4219ec(0x179)](_0x446a82[_0x4219ec(0x1af)]+_0x4219ec(0x18e)));if(_0x446a82[_0x4219ec(0x174)]!==undefined&&_0x446a82['created']>0x0)_0x4e2921['push'](a4_0x445426['green'](_0x446a82['created']+_0x4219ec(0x195)));if(_0x446a82[_0x4219ec(0x18d)]!==undefined&&_0x446a82[_0x4219ec(0x18d)]>0x0)_0x4e2921[_0x4219ec(0x180)](a4_0x445426[_0x4219ec(0x1e5)](_0x446a82[_0x4219ec(0x18d)]+_0x4219ec(0x1f0)));if(_0x446a82['unchanged']!==undefined&&_0x446a82['unchanged']>0x0)_0x4e2921['push'](a4_0x445426['gray'](_0x446a82[_0x4219ec(0x15a)]+_0x4219ec(0x1b2)));if(_0x446a82[_0x4219ec(0x18f)]!==undefined&&_0x446a82[_0x4219ec(0x18f)]>0x0)_0x4e2921[_0x4219ec(0x180)](a4_0x445426[_0x4219ec(0x15e)](_0x446a82[_0x4219ec(0x18f)]+_0x4219ec(0x1a7)));return _0x4e2921[_0x4219ec(0x1a5)](',\x20');}function displayDiffs(_0x48d9b1,_0xf26a66,_0x26a3dc,_0x42282b,_0x3c7b29,_0x1e2f3b,_0x11138a){const _0x7baeea=a4_0x1a6c;for(const _0x9afd4 of _0x48d9b1){if(_0x9afd4[_0x7baeea(0x159)]){const _0x3c67bb=_0x9afd4[_0x7baeea(0x1f5)]||_0x9afd4[_0x7baeea(0x1e1)];console[_0x7baeea(0x1a1)](_0x7baeea(0x166)+_0x3c67bb+'\x27:'),console[_0x7baeea(0x1a1)]('─'['repeat'](0x3c)),console['log'](_0x9afd4[_0x7baeea(0x159)]),console[_0x7baeea(0x1a1)]('─'['repeat'](0x3c));}}for(const _0x47eb98 of _0xf26a66){_0x47eb98[_0x7baeea(0x159)]&&(console['log'](_0x7baeea(0x188)+_0x47eb98['name']+'\x27:'),console[_0x7baeea(0x1a1)]('─'[_0x7baeea(0x187)](0x3c)),console[_0x7baeea(0x1a1)](_0x47eb98[_0x7baeea(0x159)]),console[_0x7baeea(0x1a1)]('─'[_0x7baeea(0x187)](0x3c)));}for(const _0x2741c5 of _0x26a3dc){_0x2741c5[_0x7baeea(0x159)]&&(console['log'](_0x7baeea(0x1d8)+_0x2741c5['name']+'\x27:'),console['log']('─'[_0x7baeea(0x187)](0x3c)),console[_0x7baeea(0x1a1)](_0x2741c5[_0x7baeea(0x159)]),console['log']('─'[_0x7baeea(0x187)](0x3c)));}for(const _0x40586f of _0x42282b){_0x40586f[_0x7baeea(0x159)]&&(console[_0x7baeea(0x1a1)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x40586f['name']+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x7baeea(0x1a1)](_0x40586f[_0x7baeea(0x159)]),console['log']('─'[_0x7baeea(0x187)](0x3c)));}for(const _0x472d86 of _0x3c7b29){_0x472d86['diff']&&(console[_0x7baeea(0x1a1)](_0x7baeea(0x14d)+_0x472d86['name']+'\x27:'),console['log']('─'[_0x7baeea(0x187)](0x3c)),console[_0x7baeea(0x1a1)](_0x472d86[_0x7baeea(0x159)]),console[_0x7baeea(0x1a1)]('─'[_0x7baeea(0x187)](0x3c)));}for(const _0x5be350 of _0x1e2f3b){_0x5be350[_0x7baeea(0x159)]&&(console[_0x7baeea(0x1a1)](_0x7baeea(0x1ef)+_0x5be350[_0x7baeea(0x1e1)]+'\x27:'),console[_0x7baeea(0x1a1)]('─'[_0x7baeea(0x187)](0x3c)),console[_0x7baeea(0x1a1)](_0x5be350['diff']),console[_0x7baeea(0x1a1)]('─'['repeat'](0x3c)));}for(const _0x3c5652 of _0x11138a){_0x3c5652[_0x7baeea(0x159)]&&(console[_0x7baeea(0x1a1)](_0x7baeea(0x191)+_0x3c5652[_0x7baeea(0x1e1)]+'\x27:'),console[_0x7baeea(0x1a1)]('─'[_0x7baeea(0x187)](0x3c)),console['log'](_0x3c5652[_0x7baeea(0x159)]),console['log']('─'[_0x7baeea(0x187)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x510263(0x1e1)]=a4_0x510263(0x1c0);['description']='Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files';async[a4_0x510263(0x182)](_0x335a57){const _0x3dc69d=a4_0x510263,{options:_0x2ba470,args:_0x1c701e,tdx:_0x3aa443}=_0x335a57,_0xcbdd02=_0x1c701e[0x0],_0x388abd=_0x1c701e[0x1],_0x184959=_0x2ba470['output'],_0x1c46f1=_0x2ba470[_0x3dc69d(0x1e6)],_0x2cd582=_0x2ba470['force'],_0x344dfe=_0x2ba470[_0x3dc69d(0x1d5)],_0x56f7fe=_0x2ba470[_0x3dc69d(0x17a)],_0x2012e2=_0x2ba470[_0x3dc69d(0x158)];let _0x4980d8;if(_0xcbdd02){const _0x4100d0=a4_0x136a8c[_0x3dc69d(0x1a5)](_0xcbdd02,'tdx.json');if(existsSync(_0x4100d0))try{const _0x979f79=JSON['parse'](readFileSync(_0x4100d0,_0x3dc69d(0x186)));_0x979f79[_0x3dc69d(0x1de)]&&(_0x4980d8={'llm_project':_0x979f79[_0x3dc69d(0x1de)]});}catch{}}const _0x43238f=findAgentConfigPath(process[_0x3dc69d(0x169)]());let _0x1e3ccf;if(_0x43238f)try{const _0x3cdcd0=JSON['parse'](readFileSync(_0x43238f,'utf-8'));_0x3cdcd0[_0x3dc69d(0x1de)]&&(_0x1e3ccf={'llm_project':_0x3cdcd0[_0x3dc69d(0x1de)]});}catch{}const _0x20a341=resolveAgentPullArgs({'arg':_0xcbdd02,'agentNameArg':_0x388abd,'agentFlag':_0x2012e2,'contextProject':_0x56f7fe,'argDirConfig':_0x4980d8,'cwdConfigPath':_0x43238f||undefined,'cwdConfig':_0x1e3ccf}),{projectNameOrId:_0x38c312,targetAgentName:_0x432c7c,existingOutputDir:_0x69bd11,source:_0x2d1950}=_0x20a341;if(_0x2d1950==='arg-dir')console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x1c6)](_0x3dc69d(0x1d2)+a4_0x136a8c[_0x3dc69d(0x1a5)](_0xcbdd02,_0x3dc69d(0x1a9))+':\x20'+_0x38c312));else{if(_0x2d1950===_0x3dc69d(0x17c))console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x1c6)](_0x3dc69d(0x170)+_0x38c312));else _0x2d1950===_0x3dc69d(0x1ac)&&console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x1c6)](_0x3dc69d(0x150)+_0x38c312));}if(!_0x38c312)return _0x2012e2?(console['log'](a4_0x445426[_0x3dc69d(0x1e5)](_0x3dc69d(0x1bf))),console['log'](_0x3dc69d(0x16d)),console[_0x3dc69d(0x1a1)](_0x3dc69d(0x184))):(console['log'](a4_0x445426['yellow'](_0x3dc69d(0x18b))),console[_0x3dc69d(0x1a1)]('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[_0x3dc69d(0x1a1)]('\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[_0x3dc69d(0x1a1)]('\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[_0x3dc69d(0x1a1)]('\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[_0x3dc69d(0x1a1)]('\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(_0x432c7c){const {data:_0x181f22}=await withSpinner('Pulling\x20agent\x20\x22'+_0x432c7c+_0x3dc69d(0x19e)+_0x38c312+_0x3dc69d(0x18c),()=>_0x3aa443[_0x3dc69d(0x1cf)]['pullAgent'](_0x38c312,_0x432c7c,_0x184959,{'dryRun':_0x1c46f1,'force':_0x2cd582}));if(_0x1c46f1)return console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x1e5)](_0x3dc69d(0x17b))),console['log'](_0x3dc69d(0x17d)+_0x181f22[_0x3dc69d(0x1f5)]),console['log']('Output\x20path:\x20'+_0x181f22[_0x3dc69d(0x1e7)]),_0x181f22[_0x3dc69d(0x159)]&&(console['log'](_0x3dc69d(0x194)),console[_0x3dc69d(0x1a1)]('─'[_0x3dc69d(0x187)](0x3c)),console['log'](_0x181f22[_0x3dc69d(0x159)]),console[_0x3dc69d(0x1a1)]('─'[_0x3dc69d(0x187)](0x3c))),0x0;return console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x179)]('Agent\x20pulled\x20successfully')),console[_0x3dc69d(0x1a1)](_0x3dc69d(0x15d)+_0x181f22[_0x3dc69d(0x1f5)]),console[_0x3dc69d(0x1a1)]('Output:\x20'+_0x181f22[_0x3dc69d(0x1e7)]),console['log']('Status:\x20'+(_0x181f22[_0x3dc69d(0x1a6)]?a4_0x445426[_0x3dc69d(0x179)](_0x3dc69d(0x1af)):_0x181f22[_0x3dc69d(0x1d0)]?a4_0x445426['yellow']('updated'):a4_0x445426[_0x3dc69d(0x1d9)]('unchanged'))),0x0;}const _0x3f00dc=_0x69bd11||_0x184959,{data:_0x289515}=await withSpinner('Analyzing\x20project\x20\x22'+_0x38c312+_0x3dc69d(0x18c),()=>_0x3aa443[_0x3dc69d(0x1cf)][_0x3dc69d(0x173)](_0x38c312,_0x3f00dc,{'dryRun':!![]})),_0x385175=_0x289515['counts'][_0x3dc69d(0x177)]['new']+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x149)][_0x3dc69d(0x1af)]+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x1c7)]['new']+_0x289515['counts'][_0x3dc69d(0x1bc)]['new']+_0x289515['counts']['integrations'][_0x3dc69d(0x1af)]+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x151)][_0x3dc69d(0x1af)]+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x196)]['new'],_0x11fed4=_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x177)]['updated']+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x149)][_0x3dc69d(0x18d)]+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x1c7)][_0x3dc69d(0x18d)]+_0x289515['counts'][_0x3dc69d(0x1bc)]['updated']+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x1da)][_0x3dc69d(0x18d)]+_0x289515['counts']['experimentalKnowledgeBases'][_0x3dc69d(0x18d)]+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x196)][_0x3dc69d(0x18d)],_0x314105=_0x289515['counts'][_0x3dc69d(0x177)]['unchanged']+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x149)][_0x3dc69d(0x15a)]+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x1c7)][_0x3dc69d(0x15a)]+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x1bc)]['unchanged']+_0x289515['counts']['integrations']['unchanged']+_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x151)][_0x3dc69d(0x15a)]+_0x289515[_0x3dc69d(0x19a)]['experimentalArtifacts']['unchanged'];console[_0x3dc69d(0x1a1)](_0x3dc69d(0x1db)+_0x289515[_0x3dc69d(0x19f)]+'\x27:'),console['log']('\x20\x20'+a4_0x445426['green']('+\x20'+_0x385175+_0x3dc69d(0x18e))+_0x3dc69d(0x176)+a4_0x445426[_0x3dc69d(0x1e5)]('~\x20'+_0x11fed4+_0x3dc69d(0x1d4))+_0x3dc69d(0x176)+a4_0x445426[_0x3dc69d(0x1c6)]('=\x20'+_0x314105+_0x3dc69d(0x1b2))),console[_0x3dc69d(0x1a1)](_0x3dc69d(0x164)+formatCountSummary(_0x289515['counts'][_0x3dc69d(0x177)])),console[_0x3dc69d(0x1a1)](_0x3dc69d(0x1b5)+formatCountSummary(_0x289515['counts'][_0x3dc69d(0x149)])),console[_0x3dc69d(0x1a1)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x289515[_0x3dc69d(0x19a)]['textKnowledgeBases'])),console[_0x3dc69d(0x1a1)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x289515['counts']['prompts'])),console[_0x3dc69d(0x1a1)](_0x3dc69d(0x1e0)+formatCountSummary(_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x1da)]));const _0x533c70=_0x289515['counts'][_0x3dc69d(0x151)][_0x3dc69d(0x1c2)]>0x0||_0x289515['counts']['experimentalArtifacts'][_0x3dc69d(0x1c2)]>0x0;_0x533c70&&(console[_0x3dc69d(0x1a1)](_0x3dc69d(0x1ed)+formatCountSummary(_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x151)])),console[_0x3dc69d(0x1a1)]('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x289515[_0x3dc69d(0x19a)][_0x3dc69d(0x196)])));console[_0x3dc69d(0x1a1)]('\x20\x20Target:\x20'+a4_0x445426['cyan'](_0x289515[_0x3dc69d(0x16c)])),displayDiffs(_0x289515[_0x3dc69d(0x177)],_0x289515[_0x3dc69d(0x149)],_0x289515[_0x3dc69d(0x1c7)],_0x289515[_0x3dc69d(0x1bc)],_0x289515['integrations'],_0x289515[_0x3dc69d(0x151)],_0x289515[_0x3dc69d(0x196)]);if(_0x1c46f1)return console['log'](a4_0x445426[_0x3dc69d(0x1e5)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x385175===0x0&&_0x11fed4===0x0)return console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x179)]('\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date')),saveSessionContext({'llm_project':_0x289515[_0x3dc69d(0x19f)]},_0x2ba470[_0x3dc69d(0x1e4)]),console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x179)](_0x3dc69d(0x1ae)+a4_0x445426[_0x3dc69d(0x1c6)](_0x3dc69d(0x1de))+_0x3dc69d(0x1dd)+a4_0x445426[_0x3dc69d(0x14a)](_0x289515['projectName']))),0x0;if(!_0x344dfe&&!_0x2cd582){if(!isInteractive())return console[_0x3dc69d(0x163)](a4_0x445426['red'](_0x3dc69d(0x153)),_0x3dc69d(0x175)),console[_0x3dc69d(0x163)](a4_0x445426[_0x3dc69d(0x1c6)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2db189=await confirmKey('\x0aWrite\x20'+(_0x385175+_0x11fed4)+_0x3dc69d(0x1c8));if(!_0x2db189)return console[_0x3dc69d(0x1a1)](a4_0x445426[_0x3dc69d(0x1e5)](_0x3dc69d(0x199)),'-\x20no\x20files\x20written'),0x1;}const {data:_0x5ca0f1}=await withSpinner(_0x3dc69d(0x1e8),()=>_0x3aa443[_0x3dc69d(0x1cf)]['pullProject'](_0x38c312,_0x3f00dc,{'force':_0x2cd582}));return console[_0x3dc69d(0x1a1)](a4_0x445426['green']('\x0a✔\x20Pulled\x20'+(_0x385175+_0x11fed4)+'\x20files\x20to\x20'+_0x5ca0f1[_0x3dc69d(0x16c)])),saveSessionContext({'llm_project':_0x5ca0f1[_0x3dc69d(0x19f)]},_0x2ba470[_0x3dc69d(0x1e4)]),console[_0x3dc69d(0x1a1)](a4_0x445426['green'](_0x3dc69d(0x1ae)+a4_0x445426[_0x3dc69d(0x1c6)](_0x3dc69d(0x1de))+_0x3dc69d(0x1dd)+a4_0x445426[_0x3dc69d(0x14a)](_0x5ca0f1[_0x3dc69d(0x19f)]))),0x0;}}function a4_0xa958(){const _0x57b688=['reason','agentName','description','\x22\x20to\x20new\x20project\x20\x22','knowledgeBases','cyan','projectId','\x20\x20Source:\x20','\x0aChanges\x20to\x20integration\x20\x27','122HaOoeE','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','Using\x20project\x20from\x20context:\x20','experimentalKnowledgeBases','newProjectId','\x0aError:','278568uIKIiK','\x20--profile\x20','\x20total','\x20resources\x20to\x20\x27','agent','diff','unchanged','\x20\x20Integration\x20\x22','No\x20tdx.json\x20found\x20in\x20','Agent:\x20','red','\x27\x20to\x20create\x20the\x20folder\x20structure.','agent:clone','no_local_folder','found','error','\x20\x20Agents:\x20','New\x20project\x20name\x20is\x20required','\x0aChanges\x20to\x20agent\x20\x27','2990ePwMnV','1856ChnZqO','cwd','\x22\x20to\x20\x22','\x20\x20Experimental\x20Artifacts:\x20','outputDir','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','\x20resources?','\x0aPush\x20summary\x20for\x20\x27','Using\x20project:\x20','newProjectName','Errors:','pullProject','created','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20|\x20','agents','action','green','llmProject','Dry\x20run\x20-\x20no\x20files\x20written','cwd-config','Would\x20pull\x20agent:\x20','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','<new-name>','push','16662gSbysG','execute','Source:\x20','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','message','utf-8','repeat','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','436638CvLgml','INVALID_ARGUMENT','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','\x22...','updated','\x20new','errors','agentId','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','Cloning\x20\x22','\x0aChanges:','\x20created','experimentalArtifacts','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','Using\x20current\x20project:\x20','Cancelled','counts','Using\x20local\x20project:\x20','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','\x0a✔\x20Pushed\x20','\x22\x20from\x20project\x20\x22','projectName','Would\x20clone:','log','\x0aProject\x20pushed\x20with\x20errors','Using\x20context\x20project:\x20','Pushing\x20to\x20project...','join','isNew','\x20errors','\x20\x20tdx\x20agent\x20clone\x20agents/','tdx.json','source','9467973IHwSKW','context','\x20successfully','✔\x20Context\x20set:\x20','new','force','Dry\x20run\x20-\x20no\x20changes\x20made','\x20unchanged','pushProject','\x20--name\x20','\x20\x20Knowledge\x20Bases:\x20','\x20\x20Knowledge\x20Base\x20\x22','\x20\x20Prompts:\x20','New\x20project:\x20','2062590bnsGPb','agent:push','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','prompts','Project:\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','agent:pull','\x20\x20tdx\x20agent\x20pull\x20','total','MISSING_ARGUMENT','Project\x20cloned\x20with\x20errors','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','dim','textKnowledgeBases','\x20files?','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','\x0aPush\x20','Failed\x20to\x20push\x20agent:\x20','agent.yml','\x0aRun\x20\x27tdx\x20agent\x20pull\x20','622377bMnFwF','llm','hasChanges','projectDir','Using\x20project\x20from\x20','Chat:\x20','\x20changed','yes','sourceProjectName','site','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','gray','integrations','\x0aPull\x20summary\x20for\x20\x27','\x22:\x20','\x20=\x20','llm_project','\x20\x20Agent\x20\x22','\x20\x20Integrations:\x20','name','Analyzing\x20changes\x20to\x20push...','cloneProject','session','yellow','dryRun','outputPath','Writing\x20files...','Would\x20push\x20agent:\x20','-\x20nothing\x20pushed','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','\x0aErrors\x20found:','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','\x20updated','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x20\x20Prompt\x20\x22'];a4_0xa958=function(){return _0x57b688;};return a4_0xa958();}export class AgentCloneCommand extends BaseCommand{[a4_0x510263(0x1e1)]=a4_0x510263(0x160);['description']=a4_0x510263(0x19c);async[a4_0x510263(0x182)](_0x16d846){const _0x2acfae=a4_0x510263,{options:_0x1a623b,args:_0x25e6ce,tdx:_0x20dfc7}=_0x16d846,_0x1497c7=_0x25e6ce[0x0],_0x241c54=_0x1a623b['name'],_0x9b8871=_0x1a623b[_0x2acfae(0x1e6)],_0x3783a1=_0x1a623b[_0x2acfae(0x1d5)],_0x3ef4e9=_0x1a623b[_0x2acfae(0x1d7)],_0x3a8c90=_0x1a623b[_0x2acfae(0x17a)];let _0x15eced;const _0x2ffb01=findAgentConfigPath(process[_0x2acfae(0x169)]());if(_0x1497c7){const _0x12ca12=a4_0x136a8c[_0x2acfae(0x1a5)](_0x1497c7,'tdx.json');existsSync(_0x12ca12)?(_0x15eced=_0x1497c7,console[_0x2acfae(0x1a1)](a4_0x445426['dim'](_0x2acfae(0x19b)+_0x1497c7))):_0x15eced=_0x1497c7;}else{if(_0x2ffb01)_0x15eced=a4_0x136a8c['dirname'](_0x2ffb01),console[_0x2acfae(0x1a1)](a4_0x445426['dim'](_0x2acfae(0x198)+_0x15eced));else{if(_0x3a8c90){const _0x5c2e91=sanitizeForFilesystem(_0x3a8c90);let _0x45f7f8=_0x5c2e91,_0x392b69=a4_0x136a8c[_0x2acfae(0x1a5)](process['cwd'](),'agents',_0x5c2e91,_0x2acfae(0x1a9));if(!existsSync(_0x392b69)){const _0x300448=normalizeName(_0x3a8c90),_0x1bc4ad=a4_0x136a8c[_0x2acfae(0x1a5)](process[_0x2acfae(0x169)](),_0x2acfae(0x177),_0x300448,_0x2acfae(0x1a9));existsSync(_0x1bc4ad)&&(_0x45f7f8=_0x300448,_0x392b69=_0x1bc4ad);}if(existsSync(_0x392b69))_0x15eced=a4_0x136a8c['dirname'](_0x392b69),console[_0x2acfae(0x1a1)](a4_0x445426['dim'](_0x2acfae(0x19b)+_0x15eced));else{const _0x463435=_0x1a623b['profile'];if(_0x463435)throw new SDKError(ErrorCode[_0x2acfae(0x18a)],'Cannot\x20clone\x20from\x20context\x20project\x20\x22'+_0x3a8c90+'\x22\x20to\x20a\x20different\x20profile',undefined,{'helpText':_0x2acfae(0x1ee)+_0x2acfae(0x192)+(_0x2acfae(0x1c1)+_0x3a8c90+'\x0a')+(_0x2acfae(0x1a8)+_0x45f7f8+_0x2acfae(0x1b4)+(_0x241c54||_0x2acfae(0x17f))+_0x2acfae(0x155)+_0x463435)});_0x15eced=_0x3a8c90,console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x1c6)](_0x2acfae(0x1a3)+_0x3a8c90));}}}}if(!_0x15eced)return console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x1e5)](_0x2acfae(0x197))),console['log'](_0x2acfae(0x1bb)),console['log'](_0x2acfae(0x14f)),console[_0x2acfae(0x1a1)]('\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)'),console[_0x2acfae(0x1a1)]('\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>'),0x1;if(!_0x241c54)throw new SDKError(ErrorCode[_0x2acfae(0x1c3)],_0x2acfae(0x165),undefined,{'helpText':_0x2acfae(0x1be)});if(!_0x3783a1&&!_0x9b8871){if(!isInteractive())return console[_0x2acfae(0x163)](a4_0x445426[_0x2acfae(0x15e)](_0x2acfae(0x153)),_0x2acfae(0x175)),console[_0x2acfae(0x163)](a4_0x445426[_0x2acfae(0x1c6)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2e6349=await confirmKey('Clone\x20\x22'+_0x15eced+_0x2acfae(0x148)+_0x241c54+'\x22?');if(!_0x2e6349)return console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x1e5)](_0x2acfae(0x199))),0x1;}const {data:_0xe60f99}=await withSpinner(_0x2acfae(0x193)+_0x15eced+_0x2acfae(0x16a)+_0x241c54+_0x2acfae(0x18c),()=>_0x20dfc7[_0x2acfae(0x1cf)][_0x2acfae(0x1e3)](_0x15eced,_0x241c54,{'dryRun':_0x9b8871}));if(_0x9b8871){console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x1e5)](_0x2acfae(0x1b1))),console[_0x2acfae(0x1a1)](_0x2acfae(0x183)+_0xe60f99[_0x2acfae(0x1d6)]),console[_0x2acfae(0x1a1)](_0x2acfae(0x1b8)+_0x241c54),console['log'](_0x2acfae(0x1a0)),console[_0x2acfae(0x1a1)](_0x2acfae(0x164)+_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x177)][_0x2acfae(0x174)]),console[_0x2acfae(0x1a1)]('\x20\x20Knowledge\x20Bases:\x20'+_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x149)]['created']),console[_0x2acfae(0x1a1)](_0x2acfae(0x1b7)+_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x1bc)]['created']);const _0x1c7863=_0xe60f99['counts'][_0x2acfae(0x151)]['created']>0x0||_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x196)][_0x2acfae(0x174)]>0x0;return _0x1c7863&&(console[_0x2acfae(0x1a1)](_0x2acfae(0x1ed)+_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x151)][_0x2acfae(0x174)]),console['log'](_0x2acfae(0x16b)+_0xe60f99['counts'][_0x2acfae(0x196)]['created'])),0x0;}const _0xa1948b=_0xe60f99['counts']['agents'][_0x2acfae(0x18f)]>0x0||_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x149)]['errors']>0x0||_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x1bc)][_0x2acfae(0x18f)]>0x0||_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x151)][_0x2acfae(0x18f)]>0x0||_0xe60f99['counts']['experimentalArtifacts'][_0x2acfae(0x18f)]>0x0;_0xa1948b?console[_0x2acfae(0x1a1)](a4_0x445426['yellow'](_0x2acfae(0x1c4))):console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x179)]('Project\x20cloned\x20successfully'));console[_0x2acfae(0x1a1)](_0x2acfae(0x183)+_0xe60f99[_0x2acfae(0x1d6)]),console['log'](_0x2acfae(0x1b8)+_0xe60f99[_0x2acfae(0x171)]),console[_0x2acfae(0x1a1)]('New\x20project\x20ID:\x20'+_0xe60f99['newProjectId']),console[_0x2acfae(0x1a1)](),console['log']('Summary:'),console['log']('\x20\x20Agents:\x20'+formatCountSummary(_0xe60f99[_0x2acfae(0x19a)]['agents'])),console[_0x2acfae(0x1a1)](_0x2acfae(0x1b5)+formatCountSummary(_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x149)])),console[_0x2acfae(0x1a1)](_0x2acfae(0x1b7)+formatCountSummary(_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x1bc)])),console['log'](_0x2acfae(0x1e0)+formatCountSummary(_0xe60f99[_0x2acfae(0x19a)]['integrations']));const _0x1cb136=_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x151)]['created']>0x0||_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x151)][_0x2acfae(0x18d)]>0x0||_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x151)][_0x2acfae(0x15a)]>0x0||_0xe60f99[_0x2acfae(0x19a)]['experimentalArtifacts']['created']>0x0||_0xe60f99[_0x2acfae(0x19a)]['experimentalArtifacts'][_0x2acfae(0x18d)]>0x0||_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x196)][_0x2acfae(0x15a)]>0x0;_0x1cb136&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0xe60f99['counts'][_0x2acfae(0x151)])),console[_0x2acfae(0x1a1)](_0x2acfae(0x16b)+formatCountSummary(_0xe60f99[_0x2acfae(0x19a)][_0x2acfae(0x196)])));if(_0xa1948b){console[_0x2acfae(0x1a1)](),console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x15e)](_0x2acfae(0x172)));for(const _0x518f87 of _0xe60f99['agents']){_0x518f87[_0x2acfae(0x178)]===_0x2acfae(0x163)&&console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x15e)](_0x2acfae(0x1df)+_0x518f87[_0x2acfae(0x1f5)]+'\x22:\x20'+_0x518f87['error']));}for(const _0x5b8357 of _0xe60f99[_0x2acfae(0x149)]){_0x5b8357[_0x2acfae(0x178)]==='error'&&console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x15e)]('\x20\x20Knowledge\x20Base\x20\x22'+_0x5b8357[_0x2acfae(0x1e1)]+'\x22:\x20'+_0x5b8357[_0x2acfae(0x163)]));}for(const _0xb68eea of _0xe60f99['prompts']){_0xb68eea[_0x2acfae(0x178)]===_0x2acfae(0x163)&&console['log'](a4_0x445426[_0x2acfae(0x15e)](_0x2acfae(0x1f3)+_0xb68eea[_0x2acfae(0x1e1)]+_0x2acfae(0x1dc)+_0xb68eea[_0x2acfae(0x163)]));}for(const _0x4e2ab4 of _0xe60f99[_0x2acfae(0x1da)]){_0x4e2ab4[_0x2acfae(0x178)]===_0x2acfae(0x163)&&console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x15e)]('\x20\x20Integration\x20\x22'+_0x4e2ab4[_0x2acfae(0x1e1)]+_0x2acfae(0x1dc)+_0x4e2ab4[_0x2acfae(0x163)]));}for(const _0x412ba7 of _0xe60f99[_0x2acfae(0x151)]){_0x412ba7[_0x2acfae(0x178)]==='error'&&console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x15e)]('\x20\x20Experimental\x20Knowledge\x20Base\x20\x22'+_0x412ba7[_0x2acfae(0x1e1)]+_0x2acfae(0x1dc)+_0x412ba7[_0x2acfae(0x163)]));}for(const _0x3f8788 of _0xe60f99[_0x2acfae(0x196)]){_0x3f8788[_0x2acfae(0x178)]===_0x2acfae(0x163)&&console[_0x2acfae(0x1a1)](a4_0x445426[_0x2acfae(0x15e)]('\x20\x20Experimental\x20Artifact\x20\x22'+_0x3f8788[_0x2acfae(0x1e1)]+_0x2acfae(0x1dc)+_0x3f8788[_0x2acfae(0x163)]));}return 0x1;}console[_0x2acfae(0x1a1)]();const _0x56e50b=getLLMProjectUrl(_0x3ef4e9,_0xe60f99[_0x2acfae(0x152)]);return console[_0x2acfae(0x1a1)](_0x2acfae(0x1bd)+a4_0x445426[_0x2acfae(0x14a)](_0x56e50b)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']=a4_0x510263(0x1ba);[a4_0x510263(0x1f6)]=a4_0x510263(0x17e);async['execute'](_0x25a94f){const _0x450c62=a4_0x510263,{options:_0x554009,args:_0x1f8062,tdx:_0x41be47}=_0x25a94f;let _0x3ab062=_0x1f8062[0x0]||process[_0x450c62(0x169)]();const _0x1acde6=_0x554009[_0x450c62(0x1e6)],_0x30da85=_0x554009[_0x450c62(0x1b0)],_0x1c0577=_0x554009[_0x450c62(0x1d5)],_0x341779=_0x554009['site'],_0x575273=a4_0x136a8c['join'](_0x3ab062,_0x450c62(0x1cc)),_0x3a2a7e=existsSync(_0x575273);if(_0x3a2a7e){const {data:_0xf7972a}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x3ab062+_0x450c62(0x18c),()=>_0x41be47[_0x450c62(0x1cf)]['pushAgent'](_0x3ab062,{'dryRun':_0x1acde6,'force':_0x30da85}));if(_0x1acde6)return console[_0x450c62(0x1a1)](a4_0x445426['yellow'](_0x450c62(0x1b1))),console['log'](_0x450c62(0x1e9)+_0xf7972a['agentName']),0x0;if(_0xf7972a[_0x450c62(0x178)]===_0x450c62(0x163))return console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x15e)](_0x450c62(0x1cb)+_0xf7972a[_0x450c62(0x163)])),0x1;console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x179)]('Agent\x20'+_0xf7972a[_0x450c62(0x178)]+_0x450c62(0x1ad))),console[_0x450c62(0x1a1)]('Agent:\x20'+_0xf7972a[_0x450c62(0x1f5)]);if(_0xf7972a[_0x450c62(0x190)]&&_0xf7972a[_0x450c62(0x14b)]){const _0x1159a1=getLLMAgentChatUrl(_0x341779,_0xf7972a[_0x450c62(0x14b)],_0xf7972a[_0x450c62(0x190)]);console[_0x450c62(0x1a1)](_0x450c62(0x1d3)+a4_0x445426['cyan'](_0x1159a1));}return 0x0;}const _0x4b4c01=_0x554009[_0x450c62(0x17a)],_0x5d1bd9=resolveProjectFromContext(_0x3ab062,_0x4b4c01);if(_0x5d1bd9[_0x450c62(0x162)])_0x3ab062=_0x5d1bd9[_0x450c62(0x1d1)],_0x5d1bd9[_0x450c62(0x1aa)]===_0x450c62(0x1ac)&&console['log'](a4_0x445426[_0x450c62(0x1c6)](_0x450c62(0x170)+_0x3ab062));else{let _0xc77612=_0x450c62(0x1eb);_0x5d1bd9[_0x450c62(0x1f4)]===_0x450c62(0x161)&&(_0xc77612=_0x5d1bd9[_0x450c62(0x185)]+_0x450c62(0x1cd)+_0x5d1bd9[_0x450c62(0x17a)]+_0x450c62(0x15f));throw new SDKError(ErrorCode[_0x450c62(0x18a)],_0x5d1bd9[_0x450c62(0x1f4)]==='no_context'?_0x5d1bd9[_0x450c62(0x185)]:_0x450c62(0x15c)+_0x3ab062,undefined,{'helpText':_0xc77612});}const {data:_0x5ca7f0}=await withSpinner(_0x450c62(0x1e2),()=>_0x41be47[_0x450c62(0x1cf)][_0x450c62(0x1b3)](_0x3ab062,{'dryRun':!![]})),_0x357404=_0x5ca7f0['counts'][_0x450c62(0x177)][_0x450c62(0x18f)]>0x0;if(_0x357404){console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x15e)](_0x450c62(0x1ec)));for(const _0x7e054f of _0x5ca7f0[_0x450c62(0x177)]){_0x7e054f['action']===_0x450c62(0x163)&&console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x15e)](_0x450c62(0x1df)+_0x7e054f[_0x450c62(0x1f5)]+_0x450c62(0x1dc)+_0x7e054f[_0x450c62(0x163)]));}return 0x1;}const _0x1d2ae3=_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x177)][_0x450c62(0x174)]+_0x5ca7f0[_0x450c62(0x19a)]['knowledgeBases']['created']+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1c7)][_0x450c62(0x174)]+_0x5ca7f0[_0x450c62(0x19a)]['prompts'][_0x450c62(0x174)]+_0x5ca7f0[_0x450c62(0x19a)]['integrations']['created']+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x151)][_0x450c62(0x174)]+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x196)][_0x450c62(0x174)],_0x545f19=_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x177)]['updated']+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x149)][_0x450c62(0x18d)]+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1c7)][_0x450c62(0x18d)]+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1bc)]['updated']+_0x5ca7f0['counts'][_0x450c62(0x1da)][_0x450c62(0x18d)]+_0x5ca7f0[_0x450c62(0x19a)]['experimentalKnowledgeBases'][_0x450c62(0x18d)]+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x196)][_0x450c62(0x18d)],_0x2d3f5e=_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x177)]['unchanged']+_0x5ca7f0['counts'][_0x450c62(0x149)]['unchanged']+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1c7)][_0x450c62(0x15a)]+_0x5ca7f0['counts'][_0x450c62(0x1bc)]['unchanged']+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1da)]['unchanged']+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x151)]['unchanged']+_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x196)][_0x450c62(0x15a)];console[_0x450c62(0x1a1)](_0x450c62(0x16f)+_0x5ca7f0['projectName']+'\x27:'),console['log']('\x20\x20'+a4_0x445426[_0x450c62(0x179)]('+\x20'+_0x1d2ae3+_0x450c62(0x18e))+_0x450c62(0x176)+a4_0x445426[_0x450c62(0x1e5)]('~\x20'+_0x545f19+_0x450c62(0x1d4))+'\x20|\x20'+a4_0x445426[_0x450c62(0x1c6)]('=\x20'+_0x2d3f5e+'\x20unchanged')),console[_0x450c62(0x1a1)](_0x450c62(0x164)+formatCountSummary(_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x177)])),console[_0x450c62(0x1a1)](_0x450c62(0x1b5)+formatCountSummary(_0x5ca7f0['counts'][_0x450c62(0x149)])),console['log']('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1c7)])),console[_0x450c62(0x1a1)](_0x450c62(0x1b7)+formatCountSummary(_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1bc)])),console[_0x450c62(0x1a1)](_0x450c62(0x1e0)+formatCountSummary(_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x1da)]));const _0x2a2d0c=_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x151)][_0x450c62(0x174)]>0x0||_0x5ca7f0[_0x450c62(0x19a)]['experimentalKnowledgeBases']['updated']>0x0||_0x5ca7f0[_0x450c62(0x19a)]['experimentalKnowledgeBases']['unchanged']>0x0||_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x196)][_0x450c62(0x174)]>0x0||_0x5ca7f0['counts']['experimentalArtifacts']['updated']>0x0||_0x5ca7f0['counts']['experimentalArtifacts']['unchanged']>0x0;_0x2a2d0c&&(console[_0x450c62(0x1a1)](_0x450c62(0x1ed)+formatCountSummary(_0x5ca7f0['counts']['experimentalKnowledgeBases'])),console['log']('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x5ca7f0[_0x450c62(0x19a)][_0x450c62(0x196)])));console[_0x450c62(0x1a1)](_0x450c62(0x14c)+a4_0x445426['cyan'](_0x3ab062)),displayDiffs(_0x5ca7f0[_0x450c62(0x177)],_0x5ca7f0[_0x450c62(0x149)],_0x5ca7f0['textKnowledgeBases'],_0x5ca7f0['prompts'],_0x5ca7f0['integrations'],_0x5ca7f0[_0x450c62(0x151)],_0x5ca7f0[_0x450c62(0x196)]);if(_0x1acde6)return console['log'](a4_0x445426[_0x450c62(0x1e5)](_0x450c62(0x1c9))),0x0;if(_0x1d2ae3===0x0&&_0x545f19===0x0){console[_0x450c62(0x1a1)](a4_0x445426['green'](_0x450c62(0x1c5)));const _0x320fdc=getLLMProjectUrl(_0x341779,_0x5ca7f0[_0x450c62(0x14b)]);return console[_0x450c62(0x1a1)](_0x450c62(0x1bd)+a4_0x445426[_0x450c62(0x14a)](_0x320fdc)),0x0;}if(!_0x1c0577&&!_0x30da85){if(!isInteractive())return console[_0x450c62(0x163)](a4_0x445426['red'](_0x450c62(0x153)),_0x450c62(0x175)),console['error'](a4_0x445426['dim'](_0x450c62(0x1f1))),0x1;const _0x135b07=await confirmKey(_0x450c62(0x1ca)+(_0x1d2ae3+_0x545f19)+_0x450c62(0x16e));if(!_0x135b07)return console['log'](a4_0x445426[_0x450c62(0x1e5)]('Cancelled'),_0x450c62(0x1ea)),0x1;}const {data:_0x236a53}=await withSpinner(_0x450c62(0x1a4),()=>_0x41be47[_0x450c62(0x1cf)][_0x450c62(0x1b3)](_0x3ab062,{'force':_0x30da85})),_0x2bb048=_0x236a53[_0x450c62(0x19a)][_0x450c62(0x177)][_0x450c62(0x18f)]>0x0||_0x236a53[_0x450c62(0x19a)][_0x450c62(0x149)][_0x450c62(0x18f)]>0x0||_0x236a53[_0x450c62(0x19a)][_0x450c62(0x1c7)][_0x450c62(0x18f)]>0x0||_0x236a53[_0x450c62(0x19a)][_0x450c62(0x1bc)][_0x450c62(0x18f)]>0x0;if(_0x2bb048){console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x1e5)](_0x450c62(0x1a2))),console[_0x450c62(0x1a1)](),console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x15e)](_0x450c62(0x172)));for(const _0x2e41a5 of _0x236a53['agents']){_0x2e41a5[_0x450c62(0x178)]===_0x450c62(0x163)&&console[_0x450c62(0x1a1)](a4_0x445426['red'](_0x450c62(0x1df)+_0x2e41a5[_0x450c62(0x1f5)]+_0x450c62(0x1dc)+_0x2e41a5[_0x450c62(0x163)]));}for(const _0x42fb3d of _0x236a53['knowledgeBases']){_0x42fb3d[_0x450c62(0x178)]===_0x450c62(0x163)&&console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x15e)](_0x450c62(0x1b6)+_0x42fb3d['name']+_0x450c62(0x1dc)+_0x42fb3d['error']));}for(const _0x487e78 of _0x236a53[_0x450c62(0x1c7)]){_0x487e78[_0x450c62(0x178)]===_0x450c62(0x163)&&console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x15e)](_0x450c62(0x1f2)+_0x487e78['name']+'\x22:\x20'+_0x487e78[_0x450c62(0x163)]));}for(const _0x22b2ab of _0x236a53[_0x450c62(0x1bc)]){_0x22b2ab[_0x450c62(0x178)]===_0x450c62(0x163)&&console['log'](a4_0x445426['red'](_0x450c62(0x1f3)+_0x22b2ab[_0x450c62(0x1e1)]+_0x450c62(0x1dc)+_0x22b2ab[_0x450c62(0x163)]));}for(const _0x267d88 of _0x236a53[_0x450c62(0x1da)]){_0x267d88['action']==='error'&&console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x15e)](_0x450c62(0x15b)+_0x267d88[_0x450c62(0x1e1)]+_0x450c62(0x1dc)+_0x267d88[_0x450c62(0x163)]));}return 0x1;}console[_0x450c62(0x1a1)](a4_0x445426[_0x450c62(0x179)](_0x450c62(0x19d)+(_0x1d2ae3+_0x545f19)+_0x450c62(0x157)+_0x236a53[_0x450c62(0x19f)]+'\x27'));const _0x216599=getLLMProjectUrl(_0x341779,_0x236a53[_0x450c62(0x14b)]);return console[_0x450c62(0x1a1)](_0x450c62(0x1bd)+a4_0x445426[_0x450c62(0x14a)](_0x216599)),0x0;}}
|
|
1
|
+
function a4_0x5abd(){const _0xaeb4fa=['Dry\x20run\x20-\x20no\x20files\x20written','llm_project','Project\x20cloned\x20successfully','\x20|\x20','prompts','agentId','\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','\x22\x20to\x20new\x20project\x20\x22','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','dirname','\x0aPush\x20','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','Project:\x20','2456419JZzMVH','integrations','Using\x20project\x20from\x20','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','agents','INVALID_ARGUMENT','created','\x20\x20Source:\x20','agentName','Chat:\x20','projectName','170ydWZGU','cwd','Agent\x20pulled\x20successfully','\x20=\x20','Using\x20local\x20project:\x20','Pulling\x20agent\x20\x22','\x20\x20Knowledge\x20Base\x20\x22','\x20\x20tdx\x20agent\x20pull\x20','yes','agent','updated','-\x20no\x20files\x20written','cyan','Project\x20cloned\x20with\x20errors','6AMJtRL','push','Cannot\x20clone\x20from\x20context\x20project\x20\x22','<new-name>','agent:push','\x20\x20Agents:\x20','repeat','site','llm','\x20\x20Prompts:\x20','action','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','Output\x20path:\x20','counts','\x0aWrite\x20','\x22\x20from\x20project\x20\x22','Clone\x20\x22','agent.yml','\x20unchanged','name','error','3184389QdUcik','join','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','log','pullAgent','textKnowledgeBases','profile','\x0aPush\x20summary\x20for\x20\x27','dim','\x20created','experimentalArtifacts','Cancelled','total','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','source','\x20\x20Experimental\x20Artifacts:\x20','execute','\x20successfully','knowledgeBases','3183812mWpEXq','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','\x20\x20Integration\x20\x22','Status:\x20','dryRun','agent:clone','\x0aChanges:','388006COaapv','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','Summary:','\x0a✔\x20Pushed\x20','red','sourceProjectName','\x20\x20Knowledge\x20Bases:\x20','\x20\x20Prompt\x20\x22','-\x20nothing\x20pushed','2300690mDpupP','\x20\x20Text\x20Knowledge\x20Bases:\x20','experimentalKnowledgeBases','✔\x20Context\x20set:\x20','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','Failed\x20to\x20push\x20agent:\x20','Dry\x20run\x20-\x20no\x20changes\x20made','description','cloneProject','\x20updated','Using\x20project:\x20','9rOCKPX','projectDir','Source:\x20','errors','new','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','no_context','force','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','yellow','New\x20project:\x20','pullProject','found','\x20new','context','New\x20project\x20ID:\x20','tdx.json','\x20\x20Text\x20Knowledge\x20Base\x20\x22','utf-8','green','Agent:\x20','pushProject','Usage:\x20tdx\x20agent\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)','Using\x20context\x20project:\x20','\x22...','2782632KSLBZN','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','Using\x20current\x20project:\x20','\x20\x20Target:\x20','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','\x20files?','\x20\x20Agent\x20\x22','outputPath','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','diff','Errors:','\x20\x20tdx\x20agent\x20clone\x20agents/','session','\x20--name\x20','reason','agent:pull','\x20resources\x20to\x20\x27','\x0aProject\x20pushed\x20with\x20errors','Agent\x20','\x22\x20to\x20a\x20different\x20profile','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','\x20errors','Analyzing\x20changes\x20to\x20push...','pushAgent','\x20\x20Integrations:\x20','llmProject','\x27\x20to\x20create\x20the\x20folder\x20structure.','message','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','Analyzing\x20project\x20\x22','\x0aError:','Would\x20push\x20agent:\x20','cwd-config','\x0aChanges\x20to\x20agent\x20\x27','New\x20project\x20name\x20is\x20required','Cloning\x20\x22','output','\x22:\x20','unchanged','gray','Output:\x20','projectId','Writing\x20files...','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','122604GHSttW','\x20changed','newProjectId','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','parse','\x22\x20to\x20\x22','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20project','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>'];a4_0x5abd=function(){return _0xaeb4fa;};return a4_0x5abd();}const a4_0x43caca=a4_0x542d;(function(_0x109757,_0x171de1){const _0x26df80=a4_0x542d,_0x17660f=_0x109757();while(!![]){try{const _0x4f926e=parseInt(_0x26df80(0x249))/0x1+parseInt(_0x26df80(0x242))/0x2+-parseInt(_0x26df80(0x22f))/0x3+parseInt(_0x26df80(0x1ea))/0x4*(-parseInt(_0x26df80(0x20c))/0x5)+-parseInt(_0x26df80(0x21a))/0x6*(-parseInt(_0x26df80(0x201))/0x7)+parseInt(_0x26df80(0x276))/0x8+-parseInt(_0x26df80(0x25d))/0x9*(-parseInt(_0x26df80(0x252))/0xa);if(_0x4f926e===_0x171de1)break;else _0x17660f['push'](_0x17660f['shift']());}catch(_0x461e03){_0x17660f['push'](_0x17660f['shift']());}}}(a4_0x5abd,0xc490a));import a4_0x3177dc from'chalk';import a4_0xacb95 from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function a4_0x542d(_0x34b934,_0x51ff7c){_0x34b934=_0x34b934-0x1d4;const _0x5abd3a=a4_0x5abd();let _0x542d18=_0x5abd3a[_0x34b934];return _0x542d18;}function formatCountSummary(_0x1a36b6){const _0x2a8144=a4_0x542d,_0x3ab7ed=[];if(_0x1a36b6[_0x2a8144(0x23b)]!==undefined)_0x3ab7ed['push'](_0x1a36b6['total']+'\x20total');if(_0x1a36b6['new']!==undefined&&_0x1a36b6['new']>0x0)_0x3ab7ed[_0x2a8144(0x21b)](a4_0x3177dc[_0x2a8144(0x270)](_0x1a36b6[_0x2a8144(0x261)]+'\x20new'));if(_0x1a36b6['created']!==undefined&&_0x1a36b6[_0x2a8144(0x207)]>0x0)_0x3ab7ed['push'](a4_0x3177dc['green'](_0x1a36b6[_0x2a8144(0x207)]+_0x2a8144(0x238)));if(_0x1a36b6['updated']!==undefined&&_0x1a36b6[_0x2a8144(0x216)]>0x0)_0x3ab7ed[_0x2a8144(0x21b)](a4_0x3177dc[_0x2a8144(0x266)](_0x1a36b6[_0x2a8144(0x216)]+_0x2a8144(0x25b)));if(_0x1a36b6[_0x2a8144(0x1e4)]!==undefined&&_0x1a36b6[_0x2a8144(0x1e4)]>0x0)_0x3ab7ed[_0x2a8144(0x21b)](a4_0x3177dc[_0x2a8144(0x1e5)](_0x1a36b6[_0x2a8144(0x1e4)]+_0x2a8144(0x22c)));if(_0x1a36b6[_0x2a8144(0x260)]!==undefined&&_0x1a36b6[_0x2a8144(0x260)]>0x0)_0x3ab7ed['push'](a4_0x3177dc[_0x2a8144(0x24d)](_0x1a36b6[_0x2a8144(0x260)]+_0x2a8144(0x28b)));return _0x3ab7ed[_0x2a8144(0x230)](',\x20');}function displayDiffs(_0x50fcba,_0x5f2f54,_0x11be64,_0x1600fb,_0x2d7cca,_0x251488,_0x38bf7b){const _0x490de1=a4_0x542d;for(const _0x400233 of _0x50fcba){if(_0x400233[_0x490de1(0x27f)]){const _0x2968c1=_0x400233[_0x490de1(0x209)]||_0x400233[_0x490de1(0x22d)];console[_0x490de1(0x232)](_0x490de1(0x1df)+_0x2968c1+'\x27:'),console[_0x490de1(0x232)]('─'['repeat'](0x3c)),console['log'](_0x400233['diff']),console[_0x490de1(0x232)]('─'['repeat'](0x3c));}}for(const _0x1df2ca of _0x5f2f54){_0x1df2ca['diff']&&(console['log'](_0x490de1(0x1e9)+_0x1df2ca[_0x490de1(0x22d)]+'\x27:'),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)),console[_0x490de1(0x232)](_0x1df2ca['diff']),console['log']('─'[_0x490de1(0x220)](0x3c)));}for(const _0x500e55 of _0x11be64){_0x500e55[_0x490de1(0x27f)]&&(console[_0x490de1(0x232)]('\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27'+_0x500e55['name']+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x490de1(0x232)](_0x500e55[_0x490de1(0x27f)]),console[_0x490de1(0x232)]('─'['repeat'](0x3c)));}for(const _0x30f096 of _0x1600fb){_0x30f096[_0x490de1(0x27f)]&&(console[_0x490de1(0x232)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x30f096[_0x490de1(0x22d)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x490de1(0x232)](_0x30f096['diff']),console[_0x490de1(0x232)]('─'['repeat'](0x3c)));}for(const _0x244bfb of _0x2d7cca){_0x244bfb[_0x490de1(0x27f)]&&(console[_0x490de1(0x232)]('\x0aChanges\x20to\x20integration\x20\x27'+_0x244bfb['name']+'\x27:'),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)),console[_0x490de1(0x232)](_0x244bfb['diff']),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)));}for(const _0x311a83 of _0x251488){_0x311a83['diff']&&(console[_0x490de1(0x232)](_0x490de1(0x262)+_0x311a83[_0x490de1(0x22d)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console[_0x490de1(0x232)](_0x311a83[_0x490de1(0x27f)]),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)));}for(const _0x3b0305 of _0x38bf7b){_0x3b0305['diff']&&(console['log'](_0x490de1(0x27a)+_0x3b0305[_0x490de1(0x22d)]+'\x27:'),console[_0x490de1(0x232)]('─'[_0x490de1(0x220)](0x3c)),console[_0x490de1(0x232)](_0x3b0305['diff']),console['log']('─'['repeat'](0x3c)));}}export class AgentPullCommand extends BaseCommand{['name']=a4_0x43caca(0x285);['description']=a4_0x43caca(0x204);async[a4_0x43caca(0x23f)](_0x5414e0){const _0x26fd09=a4_0x43caca,{options:_0x2e8be5,args:_0x35d60a,tdx:_0x4060ff}=_0x5414e0,_0x35bc18=_0x35d60a[0x0],_0xd75ef1=_0x35d60a[0x1],_0x1326f9=_0x2e8be5[_0x26fd09(0x1e2)],_0x314430=_0x2e8be5['dryRun'],_0x4f63d5=_0x2e8be5[_0x26fd09(0x264)],_0xd7077=_0x2e8be5['yes'],_0x30a0dd=_0x2e8be5['llmProject'],_0x45786e=_0x2e8be5[_0x26fd09(0x215)];let _0x32d8f2;if(_0x35bc18){const _0x2606fa=a4_0xacb95[_0x26fd09(0x230)](_0x35bc18,'tdx.json');if(existsSync(_0x2606fa))try{const _0x50a8e0=JSON['parse'](readFileSync(_0x2606fa,_0x26fd09(0x26f)));_0x50a8e0[_0x26fd09(0x1f4)]&&(_0x32d8f2={'llm_project':_0x50a8e0[_0x26fd09(0x1f4)]});}catch{}}const _0x1f5e9f=findAgentConfigPath(process[_0x26fd09(0x20d)]());let _0x2dd19d;if(_0x1f5e9f)try{const _0x3d8e4a=JSON[_0x26fd09(0x1ee)](readFileSync(_0x1f5e9f,_0x26fd09(0x26f)));_0x3d8e4a['llm_project']&&(_0x2dd19d={'llm_project':_0x3d8e4a[_0x26fd09(0x1f4)]});}catch{}const _0x5703dc=resolveAgentPullArgs({'arg':_0x35bc18,'agentNameArg':_0xd75ef1,'agentFlag':_0x45786e,'contextProject':_0x30a0dd,'argDirConfig':_0x32d8f2,'cwdConfigPath':_0x1f5e9f||undefined,'cwdConfig':_0x2dd19d}),{projectNameOrId:_0xcfc66b,targetAgentName:_0x274fa4,existingOutputDir:_0x1ae5a1,source:_0x5a8311}=_0x5703dc;if(_0x5a8311==='arg-dir')console[_0x26fd09(0x232)](a4_0x3177dc['dim'](_0x26fd09(0x203)+a4_0xacb95[_0x26fd09(0x230)](_0x35bc18,_0x26fd09(0x26d))+':\x20'+_0xcfc66b));else{if(_0x5a8311===_0x26fd09(0x1de))console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x237)]('Using\x20project:\x20'+_0xcfc66b));else _0x5a8311===_0x26fd09(0x26b)&&console[_0x26fd09(0x232)](a4_0x3177dc['dim']('Using\x20project\x20from\x20context:\x20'+_0xcfc66b));}if(!_0xcfc66b)return _0x45786e?(console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x243))),console[_0x26fd09(0x232)]('Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>'),console[_0x26fd09(0x232)](_0x26fd09(0x256))):(console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x27e))),console[_0x26fd09(0x232)](_0x26fd09(0x273)),console[_0x26fd09(0x232)](_0x26fd09(0x1fa)),console[_0x26fd09(0x232)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<local-dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20to\x20existing\x20local\x20directory'),console['log']('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project'),console['log'](_0x26fd09(0x1f0))),0x1;if(_0x274fa4){const {data:_0x418419}=await withSpinner(_0x26fd09(0x211)+_0x274fa4+_0x26fd09(0x229)+_0xcfc66b+_0x26fd09(0x275),()=>_0x4060ff[_0x26fd09(0x222)][_0x26fd09(0x233)](_0xcfc66b,_0x274fa4,_0x1326f9,{'dryRun':_0x314430,'force':_0x4f63d5}));if(_0x314430)return console[_0x26fd09(0x232)](a4_0x3177dc['yellow'](_0x26fd09(0x1f3))),console[_0x26fd09(0x232)]('Would\x20pull\x20agent:\x20'+_0x418419[_0x26fd09(0x209)]),console[_0x26fd09(0x232)](_0x26fd09(0x226)+_0x418419[_0x26fd09(0x27d)]),_0x418419[_0x26fd09(0x27f)]&&(console['log'](_0x26fd09(0x248)),console[_0x26fd09(0x232)]('─'[_0x26fd09(0x220)](0x3c)),console[_0x26fd09(0x232)](_0x418419[_0x26fd09(0x27f)]),console['log']('─'[_0x26fd09(0x220)](0x3c))),0x0;return console[_0x26fd09(0x232)](a4_0x3177dc['green'](_0x26fd09(0x20e))),console[_0x26fd09(0x232)]('Agent:\x20'+_0x418419[_0x26fd09(0x209)]),console['log'](_0x26fd09(0x1e6)+_0x418419[_0x26fd09(0x27d)]),console[_0x26fd09(0x232)](_0x26fd09(0x245)+(_0x418419['isNew']?a4_0x3177dc['green'](_0x26fd09(0x261)):_0x418419['hasChanges']?a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x216)):a4_0x3177dc[_0x26fd09(0x1e5)]('unchanged'))),0x0;}const _0x3e2c51=_0x1ae5a1||_0x1326f9,{data:_0xe03e5f}=await withSpinner(_0x26fd09(0x1db)+_0xcfc66b+_0x26fd09(0x275),()=>_0x4060ff[_0x26fd09(0x222)][_0x26fd09(0x268)](_0xcfc66b,_0x3e2c51,{'dryRun':!![]})),_0x33e935=_0xe03e5f[_0x26fd09(0x227)]['agents'][_0x26fd09(0x261)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x241)][_0x26fd09(0x261)]+_0xe03e5f[_0x26fd09(0x227)]['textKnowledgeBases']['new']+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)]['new']+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)][_0x26fd09(0x261)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x254)][_0x26fd09(0x261)]+_0xe03e5f['counts'][_0x26fd09(0x239)][_0x26fd09(0x261)],_0x57f7ff=_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x205)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x241)][_0x26fd09(0x216)]+_0xe03e5f['counts']['textKnowledgeBases'][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x254)][_0x26fd09(0x216)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x239)][_0x26fd09(0x216)],_0x468c77=_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x205)]['unchanged']+_0xe03e5f[_0x26fd09(0x227)]['knowledgeBases'][_0x26fd09(0x1e4)]+_0xe03e5f['counts'][_0x26fd09(0x234)][_0x26fd09(0x1e4)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)][_0x26fd09(0x1e4)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)]['unchanged']+_0xe03e5f['counts']['experimentalKnowledgeBases'][_0x26fd09(0x1e4)]+_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x239)][_0x26fd09(0x1e4)];console[_0x26fd09(0x232)]('\x0aPull\x20summary\x20for\x20\x27'+_0xe03e5f[_0x26fd09(0x20b)]+'\x27:'),console[_0x26fd09(0x232)]('\x20\x20'+a4_0x3177dc[_0x26fd09(0x270)]('+\x20'+_0x33e935+_0x26fd09(0x26a))+_0x26fd09(0x1f6)+a4_0x3177dc[_0x26fd09(0x266)]('~\x20'+_0x57f7ff+_0x26fd09(0x1eb))+_0x26fd09(0x1f6)+a4_0x3177dc['dim']('=\x20'+_0x468c77+_0x26fd09(0x22c))),console[_0x26fd09(0x232)](_0x26fd09(0x21f)+formatCountSummary(_0xe03e5f['counts'][_0x26fd09(0x205)])),console[_0x26fd09(0x232)](_0x26fd09(0x24f)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x241)])),console[_0x26fd09(0x232)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x234)])),console['log'](_0x26fd09(0x223)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x1f7)])),console[_0x26fd09(0x232)](_0x26fd09(0x1d6)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x202)]));const _0xc5a876=_0xe03e5f[_0x26fd09(0x227)]['experimentalKnowledgeBases'][_0x26fd09(0x23b)]>0x0||_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x239)]['total']>0x0;_0xc5a876&&(console[_0x26fd09(0x232)](_0x26fd09(0x1f1)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)][_0x26fd09(0x254)])),console['log'](_0x26fd09(0x23e)+formatCountSummary(_0xe03e5f[_0x26fd09(0x227)]['experimentalArtifacts'])));console[_0x26fd09(0x232)](_0x26fd09(0x279)+a4_0x3177dc['cyan'](_0xe03e5f['outputDir'])),displayDiffs(_0xe03e5f[_0x26fd09(0x205)],_0xe03e5f[_0x26fd09(0x241)],_0xe03e5f['textKnowledgeBases'],_0xe03e5f[_0x26fd09(0x1f7)],_0xe03e5f[_0x26fd09(0x202)],_0xe03e5f[_0x26fd09(0x254)],_0xe03e5f[_0x26fd09(0x239)]);if(_0x314430)return console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x33e935===0x0&&_0x57f7ff===0x0)return console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x270)](_0x26fd09(0x23c))),saveSessionContext({'llm_project':_0xe03e5f[_0x26fd09(0x20b)]},_0x2e8be5[_0x26fd09(0x282)]),console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x270)](_0x26fd09(0x255)+a4_0x3177dc[_0x26fd09(0x237)]('llm_project')+_0x26fd09(0x20f)+a4_0x3177dc[_0x26fd09(0x218)](_0xe03e5f['projectName']))),0x0;if(!_0xd7077&&!_0x4f63d5){if(!isInteractive())return console[_0x26fd09(0x22e)](a4_0x3177dc[_0x26fd09(0x24d)](_0x26fd09(0x1dc)),_0x26fd09(0x277)),console[_0x26fd09(0x22e)](a4_0x3177dc[_0x26fd09(0x237)](_0x26fd09(0x265))),0x1;const _0x2c142a=await confirmKey(_0x26fd09(0x228)+(_0x33e935+_0x57f7ff)+_0x26fd09(0x27b));if(!_0x2c142a)return console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x266)](_0x26fd09(0x23a)),_0x26fd09(0x217)),0x1;}const {data:_0x22dd02}=await withSpinner(_0x26fd09(0x1e8),()=>_0x4060ff[_0x26fd09(0x222)][_0x26fd09(0x268)](_0xcfc66b,_0x3e2c51,{'force':_0x4f63d5}));return console['log'](a4_0x3177dc[_0x26fd09(0x270)]('\x0a✔\x20Pulled\x20'+(_0x33e935+_0x57f7ff)+'\x20files\x20to\x20'+_0x22dd02['outputDir'])),saveSessionContext({'llm_project':_0x22dd02[_0x26fd09(0x20b)]},_0x2e8be5[_0x26fd09(0x282)]),console[_0x26fd09(0x232)](a4_0x3177dc[_0x26fd09(0x270)]('✔\x20Context\x20set:\x20'+a4_0x3177dc[_0x26fd09(0x237)](_0x26fd09(0x1f4))+_0x26fd09(0x20f)+a4_0x3177dc[_0x26fd09(0x218)](_0x22dd02['projectName']))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x43caca(0x22d)]=a4_0x43caca(0x247);['description']='Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project';async[a4_0x43caca(0x23f)](_0x2af6bb){const _0x441a86=a4_0x43caca,{options:_0x42a654,args:_0x136dc7,tdx:_0x1480a6}=_0x2af6bb,_0x147469=_0x136dc7[0x0],_0x10f7f8=_0x42a654[_0x441a86(0x22d)],_0xef49b6=_0x42a654[_0x441a86(0x246)],_0x12e59a=_0x42a654[_0x441a86(0x214)],_0x704413=_0x42a654[_0x441a86(0x221)],_0x270872=_0x42a654['llmProject'];let _0x44e255;const _0x4f8b4b=findAgentConfigPath(process[_0x441a86(0x20d)]());if(_0x147469){const _0x5c8c26=a4_0xacb95['join'](_0x147469,_0x441a86(0x26d));existsSync(_0x5c8c26)?(_0x44e255=_0x147469,console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x210)+_0x147469))):_0x44e255=_0x147469;}else{if(_0x4f8b4b)_0x44e255=a4_0xacb95[_0x441a86(0x1fd)](_0x4f8b4b),console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x278)+_0x44e255));else{if(_0x270872){const _0x55fcf1=sanitizeForFilesystem(_0x270872);let _0x28bc75=_0x55fcf1,_0x2b3eb1=a4_0xacb95[_0x441a86(0x230)](process[_0x441a86(0x20d)](),'agents',_0x55fcf1,_0x441a86(0x26d));if(!existsSync(_0x2b3eb1)){const _0x2fd922=normalizeName(_0x270872),_0x108e98=a4_0xacb95['join'](process[_0x441a86(0x20d)](),_0x441a86(0x205),_0x2fd922,'tdx.json');existsSync(_0x108e98)&&(_0x28bc75=_0x2fd922,_0x2b3eb1=_0x108e98);}if(existsSync(_0x2b3eb1))_0x44e255=a4_0xacb95[_0x441a86(0x1fd)](_0x2b3eb1),console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x210)+_0x44e255));else{const _0xf84dc5=_0x42a654[_0x441a86(0x235)];if(_0xf84dc5)throw new SDKError(ErrorCode[_0x441a86(0x206)],_0x441a86(0x21c)+_0x270872+_0x441a86(0x289),undefined,{'helpText':_0x441a86(0x1fc)+_0x441a86(0x24a)+(_0x441a86(0x213)+_0x270872+'\x0a')+(_0x441a86(0x281)+_0x28bc75+_0x441a86(0x283)+(_0x10f7f8||_0x441a86(0x21d))+'\x20--profile\x20'+_0xf84dc5)});_0x44e255=_0x270872,console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x274)+_0x270872));}}}}if(!_0x44e255)return console[_0x441a86(0x232)](a4_0x3177dc['yellow'](_0x441a86(0x1ed))),console['log'](_0x441a86(0x28a)),console[_0x441a86(0x232)](_0x441a86(0x1da)),console[_0x441a86(0x232)](_0x441a86(0x1f9)),console[_0x441a86(0x232)]('\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>'),0x1;if(!_0x10f7f8)throw new SDKError(ErrorCode['MISSING_ARGUMENT'],_0x441a86(0x1e0),undefined,{'helpText':_0x441a86(0x1f2)});if(!_0x12e59a&&!_0xef49b6){if(!isInteractive())return console[_0x441a86(0x22e)](a4_0x3177dc[_0x441a86(0x24d)]('\x0aError:'),_0x441a86(0x277)),console[_0x441a86(0x22e)](a4_0x3177dc[_0x441a86(0x237)](_0x441a86(0x265))),0x1;const _0x566d48=await confirmKey(_0x441a86(0x22a)+_0x44e255+_0x441a86(0x1fb)+_0x10f7f8+'\x22?');if(!_0x566d48)return console['log'](a4_0x3177dc[_0x441a86(0x266)](_0x441a86(0x23a))),0x1;}const {data:_0x5465ae}=await withSpinner(_0x441a86(0x1e1)+_0x44e255+_0x441a86(0x1ef)+_0x10f7f8+_0x441a86(0x275),()=>_0x1480a6[_0x441a86(0x222)][_0x441a86(0x25a)](_0x44e255,_0x10f7f8,{'dryRun':_0xef49b6}));if(_0xef49b6){console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x266)](_0x441a86(0x258))),console['log'](_0x441a86(0x25f)+_0x5465ae[_0x441a86(0x24e)]),console[_0x441a86(0x232)](_0x441a86(0x267)+_0x10f7f8),console[_0x441a86(0x232)]('Would\x20clone:'),console['log'](_0x441a86(0x21f)+_0x5465ae[_0x441a86(0x227)][_0x441a86(0x205)][_0x441a86(0x207)]),console['log']('\x20\x20Knowledge\x20Bases:\x20'+_0x5465ae['counts'][_0x441a86(0x241)][_0x441a86(0x207)]),console['log'](_0x441a86(0x223)+_0x5465ae['counts'][_0x441a86(0x1f7)][_0x441a86(0x207)]);const _0x2264c5=_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)][_0x441a86(0x207)]>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)]['created']>0x0;return _0x2264c5&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)]['created']),console['log'](_0x441a86(0x23e)+_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)][_0x441a86(0x207)])),0x0;}const _0x10ab44=_0x5465ae['counts'][_0x441a86(0x205)][_0x441a86(0x260)]>0x0||_0x5465ae['counts'][_0x441a86(0x241)][_0x441a86(0x260)]>0x0||_0x5465ae['counts']['prompts'][_0x441a86(0x260)]>0x0||_0x5465ae['counts'][_0x441a86(0x254)][_0x441a86(0x260)]>0x0||_0x5465ae['counts'][_0x441a86(0x239)][_0x441a86(0x260)]>0x0;_0x10ab44?console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x266)](_0x441a86(0x219))):console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x270)](_0x441a86(0x1f5)));console[_0x441a86(0x232)](_0x441a86(0x25f)+_0x5465ae[_0x441a86(0x24e)]),console[_0x441a86(0x232)]('New\x20project:\x20'+_0x5465ae['newProjectName']),console[_0x441a86(0x232)](_0x441a86(0x26c)+_0x5465ae['newProjectId']),console[_0x441a86(0x232)](),console[_0x441a86(0x232)](_0x441a86(0x24b)),console[_0x441a86(0x232)]('\x20\x20Agents:\x20'+formatCountSummary(_0x5465ae[_0x441a86(0x227)]['agents'])),console['log'](_0x441a86(0x24f)+formatCountSummary(_0x5465ae[_0x441a86(0x227)][_0x441a86(0x241)])),console['log']('\x20\x20Prompts:\x20'+formatCountSummary(_0x5465ae['counts'][_0x441a86(0x1f7)])),console[_0x441a86(0x232)](_0x441a86(0x1d6)+formatCountSummary(_0x5465ae['counts'][_0x441a86(0x202)]));const _0x10a994=_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)][_0x441a86(0x207)]>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x254)][_0x441a86(0x216)]>0x0||_0x5465ae[_0x441a86(0x227)]['experimentalKnowledgeBases']['unchanged']>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)][_0x441a86(0x207)]>0x0||_0x5465ae['counts'][_0x441a86(0x239)][_0x441a86(0x216)]>0x0||_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)][_0x441a86(0x1e4)]>0x0;_0x10a994&&(console['log'](_0x441a86(0x1f1)+formatCountSummary(_0x5465ae[_0x441a86(0x227)]['experimentalKnowledgeBases'])),console['log'](_0x441a86(0x23e)+formatCountSummary(_0x5465ae[_0x441a86(0x227)][_0x441a86(0x239)])));if(_0x10ab44){console[_0x441a86(0x232)](),console[_0x441a86(0x232)](a4_0x3177dc['red'](_0x441a86(0x280)));for(const _0x5c23fd of _0x5465ae['agents']){_0x5c23fd[_0x441a86(0x224)]===_0x441a86(0x22e)&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)](_0x441a86(0x27c)+_0x5c23fd[_0x441a86(0x209)]+_0x441a86(0x1e3)+_0x5c23fd['error']));}for(const _0x42f19d of _0x5465ae[_0x441a86(0x241)]){_0x42f19d[_0x441a86(0x224)]==='error'&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)]('\x20\x20Knowledge\x20Base\x20\x22'+_0x42f19d[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x42f19d[_0x441a86(0x22e)]));}for(const _0x28025e of _0x5465ae[_0x441a86(0x1f7)]){_0x28025e[_0x441a86(0x224)]===_0x441a86(0x22e)&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)](_0x441a86(0x250)+_0x28025e[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x28025e[_0x441a86(0x22e)]));}for(const _0x9a5a0e of _0x5465ae[_0x441a86(0x202)]){_0x9a5a0e['action']===_0x441a86(0x22e)&&console['log'](a4_0x3177dc['red'](_0x441a86(0x244)+_0x9a5a0e[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x9a5a0e[_0x441a86(0x22e)]));}for(const _0x3849ca of _0x5465ae[_0x441a86(0x254)]){_0x3849ca[_0x441a86(0x224)]===_0x441a86(0x22e)&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)](_0x441a86(0x1ff)+_0x3849ca[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x3849ca['error']));}for(const _0x5e03a2 of _0x5465ae[_0x441a86(0x239)]){_0x5e03a2['action']==='error'&&console[_0x441a86(0x232)](a4_0x3177dc[_0x441a86(0x24d)]('\x20\x20Experimental\x20Artifact\x20\x22'+_0x5e03a2[_0x441a86(0x22d)]+_0x441a86(0x1e3)+_0x5e03a2[_0x441a86(0x22e)]));}return 0x1;}console['log']();const _0x130dc7=getLLMProjectUrl(_0x704413,_0x5465ae[_0x441a86(0x1ec)]);return console[_0x441a86(0x232)](_0x441a86(0x200)+a4_0x3177dc[_0x441a86(0x218)](_0x130dc7)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x43caca(0x22d)]=a4_0x43caca(0x21e);[a4_0x43caca(0x259)]='Push\x20local\x20agent\x20files\x20to\x20LLM\x20project';async[a4_0x43caca(0x23f)](_0x5addbc){const _0x4826da=a4_0x43caca,{options:_0x2d7ec2,args:_0x55e509,tdx:_0x4c672e}=_0x5addbc;let _0x73ea4f=_0x55e509[0x0]||process[_0x4826da(0x20d)]();const _0x478a88=_0x2d7ec2[_0x4826da(0x246)],_0x47078f=_0x2d7ec2[_0x4826da(0x264)],_0x188890=_0x2d7ec2[_0x4826da(0x214)],_0x2cd9a1=_0x2d7ec2['site'],_0x3d1f24=a4_0xacb95[_0x4826da(0x230)](_0x73ea4f,_0x4826da(0x22b)),_0xfc31f5=existsSync(_0x3d1f24);if(_0xfc31f5){const {data:_0x168637}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x73ea4f+_0x4826da(0x275),()=>_0x4c672e[_0x4826da(0x222)][_0x4826da(0x1d5)](_0x73ea4f,{'dryRun':_0x478a88,'force':_0x47078f}));if(_0x478a88)return console[_0x4826da(0x232)](a4_0x3177dc['yellow'](_0x4826da(0x258))),console[_0x4826da(0x232)](_0x4826da(0x1dd)+_0x168637['agentName']),0x0;if(_0x168637[_0x4826da(0x224)]===_0x4826da(0x22e))return console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x257)+_0x168637[_0x4826da(0x22e)])),0x1;console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x270)](_0x4826da(0x288)+_0x168637[_0x4826da(0x224)]+_0x4826da(0x240))),console[_0x4826da(0x232)](_0x4826da(0x271)+_0x168637[_0x4826da(0x209)]);if(_0x168637['agentId']&&_0x168637[_0x4826da(0x1e7)]){const _0x29b87e=getLLMAgentChatUrl(_0x2cd9a1,_0x168637[_0x4826da(0x1e7)],_0x168637[_0x4826da(0x1f8)]);console[_0x4826da(0x232)](_0x4826da(0x20a)+a4_0x3177dc[_0x4826da(0x218)](_0x29b87e));}return 0x0;}const _0xad9ba6=_0x2d7ec2[_0x4826da(0x1d7)],_0x3b8b66=resolveProjectFromContext(_0x73ea4f,_0xad9ba6);if(_0x3b8b66[_0x4826da(0x269)])_0x73ea4f=_0x3b8b66[_0x4826da(0x25e)],_0x3b8b66[_0x4826da(0x23d)]===_0x4826da(0x26b)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x237)](_0x4826da(0x25c)+_0x73ea4f));else{let _0x38169b='Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.';_0x3b8b66['reason']==='no_local_folder'&&(_0x38169b=_0x3b8b66['message']+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x3b8b66[_0x4826da(0x1d7)]+_0x4826da(0x1d8));throw new SDKError(ErrorCode[_0x4826da(0x206)],_0x3b8b66[_0x4826da(0x284)]===_0x4826da(0x263)?_0x3b8b66[_0x4826da(0x1d9)]:'No\x20tdx.json\x20found\x20in\x20'+_0x73ea4f,undefined,{'helpText':_0x38169b});}const {data:_0x2bd4cc}=await withSpinner(_0x4826da(0x1d4),()=>_0x4c672e[_0x4826da(0x222)][_0x4826da(0x272)](_0x73ea4f,{'dryRun':!![]})),_0x244e14=_0x2bd4cc['counts'][_0x4826da(0x205)][_0x4826da(0x260)]>0x0;if(_0x244e14){console['log'](a4_0x3177dc[_0x4826da(0x24d)]('\x0aErrors\x20found:'));for(const _0x2cbd38 of _0x2bd4cc[_0x4826da(0x205)]){_0x2cbd38[_0x4826da(0x224)]===_0x4826da(0x22e)&&console['log'](a4_0x3177dc[_0x4826da(0x24d)]('\x20\x20Agent\x20\x22'+_0x2cbd38[_0x4826da(0x209)]+'\x22:\x20'+_0x2cbd38[_0x4826da(0x22e)]));}return 0x1;}const _0x5806f6=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x207)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x207)]+_0x2bd4cc['counts'][_0x4826da(0x234)][_0x4826da(0x207)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)][_0x4826da(0x207)]+_0x2bd4cc['counts'][_0x4826da(0x202)][_0x4826da(0x207)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['created']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)]['created'],_0x570a7a=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x216)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x216)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x234)]['updated']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)]['updated']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x202)][_0x4826da(0x216)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['updated']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)][_0x4826da(0x216)],_0x554fa9=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x1e4)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x1e4)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x234)]['unchanged']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)][_0x4826da(0x1e4)]+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x202)][_0x4826da(0x1e4)]+_0x2bd4cc['counts'][_0x4826da(0x254)]['unchanged']+_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)][_0x4826da(0x1e4)];console[_0x4826da(0x232)](_0x4826da(0x236)+_0x2bd4cc[_0x4826da(0x20b)]+'\x27:'),console[_0x4826da(0x232)]('\x20\x20'+a4_0x3177dc['green']('+\x20'+_0x5806f6+'\x20new')+_0x4826da(0x1f6)+a4_0x3177dc['yellow']('~\x20'+_0x570a7a+_0x4826da(0x1eb))+'\x20|\x20'+a4_0x3177dc['dim']('=\x20'+_0x554fa9+_0x4826da(0x22c))),console[_0x4826da(0x232)]('\x20\x20Agents:\x20'+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)]['agents'])),console[_0x4826da(0x232)](_0x4826da(0x24f)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x241)])),console[_0x4826da(0x232)](_0x4826da(0x253)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x234)])),console['log'](_0x4826da(0x223)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x1f7)])),console[_0x4826da(0x232)](_0x4826da(0x1d6)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x202)]));const _0x1a13ca=_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['created']>0x0||_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)]['updated']>0x0||_0x2bd4cc['counts'][_0x4826da(0x254)][_0x4826da(0x1e4)]>0x0||_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)][_0x4826da(0x207)]>0x0||_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)]['updated']>0x0||_0x2bd4cc['counts'][_0x4826da(0x239)]['unchanged']>0x0;_0x1a13ca&&(console[_0x4826da(0x232)](_0x4826da(0x1f1)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x254)])),console[_0x4826da(0x232)](_0x4826da(0x23e)+formatCountSummary(_0x2bd4cc[_0x4826da(0x227)][_0x4826da(0x239)])));console['log'](_0x4826da(0x208)+a4_0x3177dc['cyan'](_0x73ea4f)),displayDiffs(_0x2bd4cc[_0x4826da(0x205)],_0x2bd4cc[_0x4826da(0x241)],_0x2bd4cc[_0x4826da(0x234)],_0x2bd4cc[_0x4826da(0x1f7)],_0x2bd4cc['integrations'],_0x2bd4cc[_0x4826da(0x254)],_0x2bd4cc[_0x4826da(0x239)]);if(_0x478a88)return console[_0x4826da(0x232)](a4_0x3177dc['yellow'](_0x4826da(0x231))),0x0;if(_0x5806f6===0x0&&_0x570a7a===0x0){console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x270)](_0x4826da(0x225)));const _0x39ffda=getLLMProjectUrl(_0x2cd9a1,_0x2bd4cc[_0x4826da(0x1e7)]);return console[_0x4826da(0x232)]('Project:\x20'+a4_0x3177dc[_0x4826da(0x218)](_0x39ffda)),0x0;}if(!_0x188890&&!_0x47078f){if(!isInteractive())return console[_0x4826da(0x22e)](a4_0x3177dc[_0x4826da(0x24d)]('\x0aError:'),_0x4826da(0x277)),console[_0x4826da(0x22e)](a4_0x3177dc[_0x4826da(0x237)](_0x4826da(0x265))),0x1;const _0x3aa723=await confirmKey(_0x4826da(0x1fe)+(_0x5806f6+_0x570a7a)+'\x20resources?');if(!_0x3aa723)return console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x266)](_0x4826da(0x23a)),_0x4826da(0x251)),0x1;}const {data:_0x361145}=await withSpinner('Pushing\x20to\x20project...',()=>_0x4c672e[_0x4826da(0x222)]['pushProject'](_0x73ea4f,{'force':_0x47078f})),_0x2265d2=_0x361145[_0x4826da(0x227)][_0x4826da(0x205)][_0x4826da(0x260)]>0x0||_0x361145[_0x4826da(0x227)][_0x4826da(0x241)][_0x4826da(0x260)]>0x0||_0x361145[_0x4826da(0x227)]['textKnowledgeBases']['errors']>0x0||_0x361145[_0x4826da(0x227)][_0x4826da(0x1f7)][_0x4826da(0x260)]>0x0;if(_0x2265d2){console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x266)](_0x4826da(0x287))),console[_0x4826da(0x232)](),console['log'](a4_0x3177dc[_0x4826da(0x24d)]('Errors:'));for(const _0x462b63 of _0x361145[_0x4826da(0x205)]){_0x462b63['action']==='error'&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x27c)+_0x462b63[_0x4826da(0x209)]+_0x4826da(0x1e3)+_0x462b63[_0x4826da(0x22e)]));}for(const _0x66f37a of _0x361145[_0x4826da(0x241)]){_0x66f37a[_0x4826da(0x224)]===_0x4826da(0x22e)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x212)+_0x66f37a['name']+_0x4826da(0x1e3)+_0x66f37a[_0x4826da(0x22e)]));}for(const _0xb3031f of _0x361145[_0x4826da(0x234)]){_0xb3031f[_0x4826da(0x224)]===_0x4826da(0x22e)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)](_0x4826da(0x26e)+_0xb3031f[_0x4826da(0x22d)]+_0x4826da(0x1e3)+_0xb3031f[_0x4826da(0x22e)]));}for(const _0x5953aa of _0x361145[_0x4826da(0x1f7)]){_0x5953aa['action']===_0x4826da(0x22e)&&console[_0x4826da(0x232)](a4_0x3177dc[_0x4826da(0x24d)]('\x20\x20Prompt\x20\x22'+_0x5953aa['name']+_0x4826da(0x1e3)+_0x5953aa[_0x4826da(0x22e)]));}for(const _0x2eba37 of _0x361145['integrations']){_0x2eba37[_0x4826da(0x224)]===_0x4826da(0x22e)&&console['log'](a4_0x3177dc['red'](_0x4826da(0x244)+_0x2eba37[_0x4826da(0x22d)]+'\x22:\x20'+_0x2eba37[_0x4826da(0x22e)]));}return 0x1;}console[_0x4826da(0x232)](a4_0x3177dc['green'](_0x4826da(0x24c)+(_0x5806f6+_0x570a7a)+_0x4826da(0x286)+_0x361145['projectName']+'\x27'));const _0x45b8e4=getLLMProjectUrl(_0x2cd9a1,_0x361145[_0x4826da(0x1e7)]);return console['log'](_0x4826da(0x200)+a4_0x3177dc[_0x4826da(0x218)](_0x45b8e4)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x5761d3=a5_0x2092;(function(_0xc86420,_0x2327a2){const _0x117060=a5_0x2092,_0x51902f=_0xc86420();while(!![]){try{const _0x4a7839=parseInt(_0x117060(0x137))/0x1+-parseInt(_0x117060(0x191))/0x2+-parseInt(_0x117060(0x121))/0x3+parseInt(_0x117060(0x185))/0x4+-parseInt(_0x117060(0x14a))/0x5+parseInt(_0x117060(0x136))/0x6*(-parseInt(_0x117060(0x150))/0x7)+parseInt(_0x117060(0x15a))/0x8;if(_0x4a7839===_0x2327a2)break;else _0x51902f['push'](_0x51902f['shift']());}catch(_0x2117ff){_0x51902f['push'](_0x51902f['shift']());}}}(a5_0x3eb2,0x434b5));import*as a5_0x3d2886 from'node:fs';import*as a5_0x37492f from'node:path';import a5_0x5a9672 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';function a5_0x2092(_0x1e156e,_0x52a20d){_0x1e156e=_0x1e156e-0x10e;const _0x3eb207=a5_0x3eb2();let _0x2092ec=_0x3eb207[_0x1e156e];return _0x2092ec;}import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';function a5_0x3eb2(){const _0x1db96a=['Round\x20','includes','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','join','Test\x20Configuration:','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','has','forEach','tests','find','timestamp','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','status','rounds','yellow','Round\x201/','eval','multiple_agents','Tests\x20found:\x20','agent:test','Usage:','not\x20found','FAIL','testName','json','map','Conversation\x20URL:\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','context','Error:\x20No\x20previous\x20test\x20run\x20found.','No\x20tests\x20have\x20tags\x20defined.','Executing\x20new\x20tests...','\x20\x20Evaluating...\x20','llm','772710kjUkQd','Output\x20written\x20to:\x20','conversation_url','no_local_folder','length','filter','Failed\x20Tests:','Re-evaluating\x20','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','existsSync','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','projectDir','executeReeval','Running\x20agent\x20tests...','\x20\x20Site:\x20','Run\x20\x27tdx\x20agent\x20pull\x20','Project\x20path:\x20','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','message','\x20\x20Conversation:\x20','✗\x20ERROR:\x20','18EkdCBb','360562ulLrqk','push','red','Agent:\x20','conversations','Evaluating\x20response...','Test\x20Summary','\x20-\x20','\x20\x20-\x20','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','Passed:\x20\x20\x20','PASS','No\x20tests\x20found\x20with\x20tags:\x20','substring','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','\x20\x20Project:\x20','ERROR','\x20(new)','1299325zoDijC','repeat','resolve','start','Using\x20agent:\x20',':\x20Sending\x20user\x20input...','1255625RKwhgb','agentDirs','Error\x20writing\x20output\x20file:\x20','agentName','add','dim','Cached\x20run\x20is\x20from\x20site\x20\x22','Available\x20tags:\x20','\x20\x20Agent:\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','4477520vpkWAH','name','toISOString','cyan','isSpinning','tags','reeval','output','...','\x22:\x20','✓\x20PASS:\x20','\x20\x20Round\x20','Re-evaluating...','⚠\x20SKIPPED:\x20','trim','green','size','Total:\x20\x20\x20\x20','reason','\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)','No\x20tests\x20found\x20matching:\x20','projectName','jsonl','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','Run\x20tests\x20for\x20an\x20LLM\x20agent','agent','basename','llmProject','source','split','Re-evaluating\x20cached\x20test\x20run...','\x20(cached)','404','✗\x20FAIL:\x20','verbose','text','Failed:\x20\x20\x20','Re-evaluation\x20Summary','Errors:\x20\x20\x20','Duration:\x20','tsv','round','log','1848856nvuGQu','Available\x20tests:\x20','writeFileSync','dryRun','site','Test\x20','Running\x20test:\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','stop','...\x20','table','now','102538mEwJUF','toLowerCase','found','white','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.'];a5_0x3eb2=function(){return _0x1db96a;};return a5_0x3eb2();}import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x5761d3(0x15b)]=a5_0x5761d3(0x112);['description']=a5_0x5761d3(0x172);async['execute'](_0x57882e){const _0x2cb4c6=a5_0x5761d3,{options:_0x5c9851,args:_0x1e3bd0,tdx:_0x5bb689}=_0x57882e,_0x4c9995=_0x1e3bd0[0x0]||'.',_0x526065=_0x5c9851[_0x2cb4c6(0x188)],_0x5a1b16=_0x5c9851,_0x364772=_0x5a1b16[_0x2cb4c6(0x10f)]===![],_0x44d0f2=_0x5a1b16[_0x2cb4c6(0x160)],_0x2e8fcd=_0x5a1b16[_0x2cb4c6(0x15b)],_0x46ef4e=_0x5a1b16[_0x2cb4c6(0x15f)],_0x3ebbba=_0x5c9851[_0x2cb4c6(0x189)],_0xa6d9a5=_0x5a1b16[_0x2cb4c6(0x161)];if(_0x44d0f2&&_0x364772)return console[_0x2cb4c6(0x184)](a5_0x5a9672['red'](_0x2cb4c6(0x129))),0x1;let _0x2e663a='table';if(_0x5a1b16[_0x2cb4c6(0x117)])_0x2e663a=_0x2cb4c6(0x117);else{if(_0x5a1b16['jsonl'])_0x2e663a=_0x2cb4c6(0x170);else{if(_0x5a1b16['tsv'])_0x2e663a=_0x2cb4c6(0x182);else{if(_0x5a1b16[_0x2cb4c6(0x18f)])_0x2e663a=_0x2cb4c6(0x18f);}}}const _0xc3ea2d=_0x5a1b16[_0x2cb4c6(0x175)];let _0x4440d8=_0x4c9995;const _0xd7de44=a5_0x3d2886[_0x2cb4c6(0x12a)](_0x4c9995),_0x4485ee=_0x4c9995==='.';if(!_0xd7de44||_0x4485ee){const _0x356125=resolveProjectFromContext(_0x4c9995,_0xc3ea2d,{'requireFile':'test.yml'});if(_0x356125[_0x2cb4c6(0x193)])_0x4440d8=_0x356125['projectDir'],_0x356125[_0x2cb4c6(0x176)]===_0x2cb4c6(0x11b)&&console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x155)](_0x2cb4c6(0x14e)+_0x4440d8));else switch(_0x356125[_0x2cb4c6(0x16c)]){case'no_context':console['log'](a5_0x5a9672['yellow'](_0x356125[_0x2cb4c6(0x133)])),console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x113)),console[_0x2cb4c6(0x184)]('\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[_0x2cb4c6(0x184)](_0x2cb4c6(0x16d)),console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x141));return 0x1;case _0x2cb4c6(0x124):console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x1a5)](_0x356125[_0x2cb4c6(0x133)])),console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x130)+_0x356125['llmProject']+'\x27\x20to\x20create\x20the\x20folder\x20structure.');return 0x1;case _0x2cb4c6(0x110):{const _0x2e2214=a5_0x37492f[_0x2cb4c6(0x174)](_0x356125[_0x2cb4c6(0x12c)]);console[_0x2cb4c6(0x184)](a5_0x5a9672['yellow']('Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22'+_0x356125[_0x2cb4c6(0x175)]+'\x22:'));for(const _0x305a3b of _0x356125[_0x2cb4c6(0x151)]){console[_0x2cb4c6(0x184)](_0x2cb4c6(0x13f)+_0x305a3b);}return console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x1a2)+_0x2e2214+'/<agent-name>'),0x1;}case'no_tests':console['log'](a5_0x5a9672['yellow'](_0x2cb4c6(0x140)+_0x356125[_0x2cb4c6(0x175)]+'\x22.')),console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x155)](_0x2cb4c6(0x131)+_0x356125[_0x2cb4c6(0x12c)])),console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)]('Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.');return 0x1;}}const {definition:_0x3fb918,agentInfo:_0x18324e}=parseTestFile(_0x4440d8);let _0x7f314b=_0x3fb918[_0x2cb4c6(0x19f)];if(_0x2e8fcd){const _0x31936d=_0x2e8fcd[_0x2cb4c6(0x177)](',')[_0x2cb4c6(0x118)](_0x4ffba3=>_0x4ffba3[_0x2cb4c6(0x168)]());_0x7f314b=_0x3fb918[_0x2cb4c6(0x19f)][_0x2cb4c6(0x126)](_0x5e38de=>_0x31936d[_0x2cb4c6(0x198)](_0x5e38de[_0x2cb4c6(0x15b)]));if(_0x7f314b[_0x2cb4c6(0x125)]===0x0)return console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x1a5)](_0x2cb4c6(0x16e)+_0x2e8fcd)),console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x155)](_0x2cb4c6(0x186)+_0x3fb918[_0x2cb4c6(0x19f)][_0x2cb4c6(0x118)](_0x34c8bb=>_0x34c8bb[_0x2cb4c6(0x15b)])[_0x2cb4c6(0x19a)](',\x20'))),0x1;}if(_0x46ef4e){const _0x377652=_0x46ef4e[_0x2cb4c6(0x177)](',')[_0x2cb4c6(0x118)](_0x890182=>_0x890182[_0x2cb4c6(0x168)]()[_0x2cb4c6(0x192)]());_0x7f314b=_0x7f314b[_0x2cb4c6(0x126)](_0x3e384b=>_0x3e384b[_0x2cb4c6(0x15f)]?.['some'](_0x101d29=>_0x377652[_0x2cb4c6(0x198)](_0x101d29['toLowerCase']())));if(_0x7f314b[_0x2cb4c6(0x125)]===0x0){console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x1a5)](_0x2cb4c6(0x144)+_0x46ef4e));const _0x322bc7=new Set();return _0x3fb918[_0x2cb4c6(0x19f)][_0x2cb4c6(0x19e)](_0x45c7bf=>_0x45c7bf['tags']?.['forEach'](_0x47b827=>_0x322bc7[_0x2cb4c6(0x154)](_0x47b827))),_0x322bc7[_0x2cb4c6(0x16a)]>0x0?console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x155)](_0x2cb4c6(0x157)+[..._0x322bc7][_0x2cb4c6(0x19a)](',\x20'))):console[_0x2cb4c6(0x184)](a5_0x5a9672['dim'](_0x2cb4c6(0x11d))),0x1;}}if(_0x44d0f2)return this[_0x2cb4c6(0x12d)](_0x57882e,{'definition':{'tests':_0x7f314b},'agentInfo':_0x18324e,'outputFormat':_0x2e663a,'outputFile':_0xa6d9a5,'testNames':_0x2e8fcd});if(_0x526065){console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x15d)](_0x2cb4c6(0x19b))),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x12f)+a5_0x5a9672[_0x2cb4c6(0x194)](_0x3ebbba)),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x147)+a5_0x5a9672['white'](_0x18324e['projectName'])),console['log'](_0x2cb4c6(0x158)+a5_0x5a9672[_0x2cb4c6(0x194)](_0x18324e['agentName'])),console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x111)+a5_0x5a9672['white'](_0x7f314b[_0x2cb4c6(0x125)]));for(let _0x558aec=0x0;_0x558aec<_0x7f314b[_0x2cb4c6(0x125)];_0x558aec++){const _0x149ae0=_0x7f314b[_0x558aec],_0x667743=_0x149ae0['rounds'][_0x2cb4c6(0x125)]===0x1?_0x2cb4c6(0x183):_0x2cb4c6(0x1a4),_0x51b99e=_0x149ae0[_0x2cb4c6(0x15f)]?.[_0x2cb4c6(0x125)]?'\x20['+_0x149ae0[_0x2cb4c6(0x15f)][_0x2cb4c6(0x19a)](',\x20')+']':'';console[_0x2cb4c6(0x184)]('\x20\x20'+(_0x558aec+0x1)+'.\x20'+a5_0x5a9672['white'](_0x149ae0[_0x2cb4c6(0x15b)])+'\x20('+_0x149ae0[_0x2cb4c6(0x1a4)][_0x2cb4c6(0x125)]+'\x20'+_0x667743+')'+a5_0x5a9672[_0x2cb4c6(0x155)](_0x51b99e));}return 0x0;}let _0x44b91e,_0x573078;try{_0x44b91e=await _0x5bb689[_0x2cb4c6(0x120)]['resolveProjectId'](_0x18324e[_0x2cb4c6(0x16f)]);}catch(_0x11891a){const _0x8bc621=_0x11891a instanceof Error?_0x11891a[_0x2cb4c6(0x133)]:String(_0x11891a);return _0x8bc621[_0x2cb4c6(0x198)](_0x2cb4c6(0x17a))||_0x8bc621[_0x2cb4c6(0x192)]()['includes'](_0x2cb4c6(0x114))?console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x139)]('✗\x20ERROR:\x20Project\x20not\x20found:\x20'+_0x18324e[_0x2cb4c6(0x16f)])):console[_0x2cb4c6(0x184)](a5_0x5a9672['red'](_0x2cb4c6(0x199)+_0x18324e[_0x2cb4c6(0x16f)]+_0x2cb4c6(0x163)+_0x8bc621)),0x1;}try{_0x573078=await _0x5bb689[_0x2cb4c6(0x120)]['resolveAgentId'](_0x18324e[_0x2cb4c6(0x153)],_0x44b91e);}catch(_0x20dd2b){const _0x50842f=_0x20dd2b instanceof Error?_0x20dd2b[_0x2cb4c6(0x133)]:String(_0x20dd2b);return _0x50842f[_0x2cb4c6(0x198)](_0x2cb4c6(0x17a))||_0x50842f[_0x2cb4c6(0x192)]()[_0x2cb4c6(0x198)](_0x2cb4c6(0x114))?console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x139)](_0x2cb4c6(0x132)+_0x18324e[_0x2cb4c6(0x153)])):console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x139)](_0x2cb4c6(0x146)+_0x18324e[_0x2cb4c6(0x153)]+'\x22:\x20'+_0x50842f)),0x1;}let _0x558b93;if(!_0x364772)try{_0x558b93=await setupEvaluatorAgent(_0x5bb689[_0x2cb4c6(0x120)],_0x5c9851[_0x2cb4c6(0x17c)]);}catch(_0x423918){const _0x129118=_0x423918 instanceof Error?_0x423918[_0x2cb4c6(0x133)]:String(_0x423918);return console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x139)](_0x2cb4c6(0x19c)+_0x129118)),0x1;}console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x15d)](_0x2cb4c6(0x12e))),console[_0x2cb4c6(0x184)]('Site:\x20'+a5_0x5a9672[_0x2cb4c6(0x194)](_0x3ebbba)),console['log'](_0x2cb4c6(0x13a)+a5_0x5a9672[_0x2cb4c6(0x194)](_0x18324e[_0x2cb4c6(0x16f)]+'/'+_0x18324e[_0x2cb4c6(0x153)])),console[_0x2cb4c6(0x184)]();const _0x135888=[],_0x5ac905=[],_0x3cf174=Date[_0x2cb4c6(0x190)]();for(let _0x3ac27c=0x0;_0x3ac27c<_0x7f314b[_0x2cb4c6(0x125)];_0x3ac27c++){const _0x1ae015=_0x7f314b[_0x3ac27c];_0x7f314b[_0x2cb4c6(0x125)]>0x1?console['log'](_0x2cb4c6(0x18a)+(_0x3ac27c+0x1)+'/'+_0x7f314b['length']+':\x20'+a5_0x5a9672[_0x2cb4c6(0x194)](_0x1ae015['name'])):console[_0x2cb4c6(0x184)](_0x2cb4c6(0x18b)+a5_0x5a9672[_0x2cb4c6(0x194)](_0x1ae015[_0x2cb4c6(0x15b)]));const _0x2bc988=createCommandSpinner(_0x2cb4c6(0x10e)+_0x1ae015['rounds'][_0x2cb4c6(0x125)]+_0x2cb4c6(0x14f));_0x2bc988['start']();try{const {result:_0x32b2b5,conversation:_0x5863c8}=await runTest(_0x5bb689[_0x2cb4c6(0x120)],_0x1ae015,{'agentId':_0x573078,'projectId':_0x44b91e,'site':_0x3ebbba,'noEval':_0x364772,'evaluatorId':_0x558b93,'onRoundStart':(_0x5e9de8,_0x56f2b9)=>{_0x2bc988['text']='Round\x20'+(_0x5e9de8+0x1)+'/'+_0x56f2b9+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x20b038,_0x532be5,_0x472a4f)=>{const _0x27ee6a=_0x2cb4c6,_0x58f2cf=formatElapsed(_0x532be5);_0x472a4f?console[_0x27ee6a(0x184)]('\x20\x20Round\x20'+(_0x20b038+0x1)+'/'+_0x1ae015['rounds'][_0x27ee6a(0x125)]+_0x27ee6a(0x18e)+a5_0x5a9672[_0x27ee6a(0x169)]('✓')+'\x20('+_0x58f2cf+')'):console['log']('\x20\x20Round\x20'+(_0x20b038+0x1)+'/'+_0x1ae015['rounds'][_0x27ee6a(0x125)]+_0x27ee6a(0x18e)+a5_0x5a9672['red']('✗'));},'onEvaluationStart':()=>{const _0x15089b=_0x2cb4c6;_0x2bc988[_0x15089b(0x17d)]='Evaluating\x20response...';},'onEvaluationComplete':_0x206a26=>{const _0x566c28=_0x2cb4c6,_0x4e4ab4=formatElapsed(_0x206a26);console[_0x566c28(0x184)](_0x566c28(0x11f)+a5_0x5a9672['green']('✓')+'\x20('+_0x4e4ab4+')');}});_0x2bc988[_0x2cb4c6(0x18d)](),_0x135888[_0x2cb4c6(0x138)](_0x32b2b5),_0x5ac905[_0x2cb4c6(0x138)](_0x5863c8);if(_0x32b2b5['status']==='PASS')console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x169)](_0x2cb4c6(0x164)+_0x32b2b5[_0x2cb4c6(0x16c)]));else _0x32b2b5[_0x2cb4c6(0x1a3)]===_0x2cb4c6(0x115)?console[_0x2cb4c6(0x184)](a5_0x5a9672['red'](_0x2cb4c6(0x17b)+_0x32b2b5[_0x2cb4c6(0x16c)])):console[_0x2cb4c6(0x184)](a5_0x5a9672['red'](_0x2cb4c6(0x135)+_0x32b2b5['reason']));_0x32b2b5[_0x2cb4c6(0x123)]&&console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x155)](_0x2cb4c6(0x119)+_0x32b2b5[_0x2cb4c6(0x123)])),console[_0x2cb4c6(0x184)]();}catch(_0x1e9cb4){_0x2bc988[_0x2cb4c6(0x18d)]();const _0x45c157=_0x1e9cb4 instanceof Error?_0x1e9cb4['message']:String(_0x1e9cb4);console[_0x2cb4c6(0x184)](a5_0x5a9672['red']('✗\x20ERROR:\x20'+_0x45c157)),console[_0x2cb4c6(0x184)](),_0x135888[_0x2cb4c6(0x138)]({'name':_0x1ae015[_0x2cb4c6(0x15b)],'status':_0x2cb4c6(0x148),'reason':_0x45c157,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}const _0x23416a=Date['now']()-_0x3cf174,_0x4d075b=_0x135888[_0x2cb4c6(0x126)](_0x50a1fd=>_0x50a1fd['status']===_0x2cb4c6(0x143))[_0x2cb4c6(0x125)],_0x922323=_0x135888[_0x2cb4c6(0x126)](_0x305cc4=>_0x305cc4[_0x2cb4c6(0x1a3)]==='FAIL')[_0x2cb4c6(0x125)],_0x22c5ac=_0x135888[_0x2cb4c6(0x126)](_0x1cedda=>_0x1cedda[_0x2cb4c6(0x1a3)]===_0x2cb4c6(0x148))[_0x2cb4c6(0x125)];console['log']('━'[_0x2cb4c6(0x14b)](0x3c)),console['log'](_0x2cb4c6(0x13d)),console['log']('━'[_0x2cb4c6(0x14b)](0x3c)),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x16b)+_0x135888[_0x2cb4c6(0x125)]),console['log'](_0x2cb4c6(0x142)+a5_0x5a9672[_0x2cb4c6(0x169)](_0x4d075b)),console[_0x2cb4c6(0x184)](_0x2cb4c6(0x17e)+a5_0x5a9672[_0x2cb4c6(0x139)](_0x922323));_0x22c5ac>0x0&&console[_0x2cb4c6(0x184)](_0x2cb4c6(0x180)+a5_0x5a9672[_0x2cb4c6(0x139)](_0x22c5ac));console['log'](_0x2cb4c6(0x181)+formatElapsed(_0x23416a)),console['log']('━'[_0x2cb4c6(0x14b)](0x3c));const _0x1abc8d=_0x135888['filter'](_0x22ef7e=>_0x22ef7e[_0x2cb4c6(0x1a3)]!==_0x2cb4c6(0x143));if(_0x1abc8d['length']>0x0){console[_0x2cb4c6(0x184)](),console['log'](_0x2cb4c6(0x127));for(const _0x5c7b5c of _0x1abc8d){const _0x631bc3=a5_0x5a9672[_0x2cb4c6(0x139)]('✗'),_0x39d585=_0x5c7b5c[_0x2cb4c6(0x16c)][_0x2cb4c6(0x125)]>0x32?_0x5c7b5c['reason'][_0x2cb4c6(0x145)](0x0,0x32)+'...':_0x5c7b5c[_0x2cb4c6(0x16c)];console['log']('\x20\x20'+_0x631bc3+'\x20'+_0x5c7b5c[_0x2cb4c6(0x15b)]+':\x20'+_0x39d585);}}const _0x116547={'summary':{'total':_0x135888[_0x2cb4c6(0x125)],'passed':_0x4d075b,'failed':_0x922323,'errors':_0x22c5ac>0x0?_0x22c5ac:undefined,'duration_ms':_0x23416a},'tests':_0x135888,'agent':{'project':_0x18324e['projectName'],'name':_0x18324e[_0x2cb4c6(0x153)],'site':_0x3ebbba},'timestamp':new Date(_0x3cf174)[_0x2cb4c6(0x15c)]()};try{const _0x2783ad=buildCachedTestRun(_0x5ac905,{'site':_0x3ebbba,'projectId':_0x44b91e,'projectName':_0x18324e[_0x2cb4c6(0x16f)],'agentId':_0x573078,'agentName':_0x18324e[_0x2cb4c6(0x153)],'testYmlPath':a5_0x37492f[_0x2cb4c6(0x14c)](_0x18324e['testYmlPath'])});saveLastTestRun(_0x2783ad);}catch{}if(_0x2e663a!==_0x2cb4c6(0x18f)||_0xa6d9a5){const _0x433a6d=formatResults(_0x116547,_0x2e663a);if(_0xa6d9a5)try{a5_0x3d2886['writeFileSync'](_0xa6d9a5,_0x433a6d,'utf-8'),console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x155)](_0x2cb4c6(0x122)+_0xa6d9a5));}catch(_0x1ea725){return console[_0x2cb4c6(0x184)](),console[_0x2cb4c6(0x184)](a5_0x5a9672[_0x2cb4c6(0x139)](_0x2cb4c6(0x152)+_0x1ea725)),0x1;}else console[_0x2cb4c6(0x184)](),console['log'](_0x433a6d);}return _0x1abc8d['length']>0x0?0x1:0x0;}async['executeReeval'](_0x11a3f6,_0x3e34ad){const _0x338331=a5_0x5761d3,{options:_0x5eefb1,tdx:_0x2516da}=_0x11a3f6,{definition:_0x51e198,agentInfo:_0x55a050,outputFormat:_0x8656f4,outputFile:_0x12c3b2}=_0x3e34ad,_0x216d15=_0x5eefb1[_0x338331(0x189)],_0x3878f1=loadLastTestRun();if(!_0x3878f1)return console[_0x338331(0x184)](a5_0x5a9672['red'](_0x338331(0x11c))),console[_0x338331(0x184)](a5_0x5a9672[_0x338331(0x155)](_0x338331(0x11a))),0x1;if(_0x3878f1[_0x338331(0x173)][_0x338331(0x153)]!==_0x55a050[_0x338331(0x153)])return console[_0x338331(0x184)](a5_0x5a9672[_0x338331(0x139)](_0x338331(0x12b)+_0x3878f1[_0x338331(0x173)][_0x338331(0x153)]+_0x338331(0x18c)+_0x55a050['agentName']+'\x22.')),console[_0x338331(0x184)](a5_0x5a9672['dim'](_0x338331(0x195))),0x1;const _0xaa93e7=new Set(_0x3878f1[_0x338331(0x13b)][_0x338331(0x118)](_0x2f56bb=>_0x2f56bb[_0x338331(0x116)])),_0x2fd751=_0x51e198[_0x338331(0x19f)][_0x338331(0x126)](_0x5dd52c=>!_0xaa93e7[_0x338331(0x19d)](_0x5dd52c[_0x338331(0x15b)]));if(_0x2fd751['length']>0x0&&_0x3878f1[_0x338331(0x189)]!==_0x216d15)return console['log'](a5_0x5a9672['red'](_0x338331(0x196))),console['log'](a5_0x5a9672[_0x338331(0x155)](_0x338331(0x156)+_0x3878f1[_0x338331(0x189)]+_0x338331(0x159)+_0x216d15+'\x22.')),console[_0x338331(0x184)](a5_0x5a9672[_0x338331(0x155)]('Either\x20switch\x20to\x20the\x20\x22'+_0x3878f1[_0x338331(0x189)]+'\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.')),0x1;const _0x395102=_0x51e198['tests'][_0x338331(0x126)](_0x377c3a=>_0xaa93e7[_0x338331(0x19d)](_0x377c3a['name'])),_0x5216e1=_0x2fd751;let _0x1e7d3c;try{_0x1e7d3c=await setupEvaluatorAgent(_0x2516da[_0x338331(0x120)],_0x5eefb1[_0x338331(0x17c)]);}catch(_0x2b1def){const _0x4f7718=_0x2b1def instanceof Error?_0x2b1def[_0x338331(0x133)]:String(_0x2b1def);return console['log'](a5_0x5a9672['red']('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x4f7718)),0x1;}console['log'](a5_0x5a9672[_0x338331(0x15d)](_0x338331(0x178))),console[_0x338331(0x184)]('Cached\x20run\x20from:\x20'+a5_0x5a9672[_0x338331(0x194)](_0x3878f1[_0x338331(0x1a1)])),console['log'](_0x338331(0x13a)+a5_0x5a9672[_0x338331(0x194)](_0x3878f1[_0x338331(0x173)]['projectName']+'/'+_0x3878f1['agent'][_0x338331(0x153)]));_0x5216e1[_0x338331(0x125)]>0x0&&console['log']('New\x20tests\x20to\x20execute:\x20'+a5_0x5a9672[_0x338331(0x1a5)](_0x5216e1[_0x338331(0x125)]));console[_0x338331(0x184)]();const _0x495579=[],_0x104401=Date[_0x338331(0x190)](),_0x32bbcd=createCommandSpinner(_0x338331(0x166));if(_0x395102[_0x338331(0x125)]>0x0)try{const _0x59c43b=await reevaluateFromCache(_0x2516da[_0x338331(0x120)],_0x3878f1,{'tests':_0x395102},{'evaluatorId':_0x1e7d3c,'onTestStart':(_0x31b465,_0x1693e5,_0x3b353a)=>{const _0x127c6c=_0x338331;_0x32bbcd[_0x127c6c(0x17d)]=_0x127c6c(0x128)+(_0x1693e5+0x1)+'/'+_0x3b353a+':\x20'+_0x31b465+_0x127c6c(0x162);if(!_0x32bbcd[_0x127c6c(0x15e)])_0x32bbcd[_0x127c6c(0x14d)]();},'onTestComplete':(_0x80bbc0,_0x1418c9)=>{const _0x1ba6d4=_0x338331;_0x32bbcd[_0x1ba6d4(0x18d)]();if(_0x1418c9[_0x1ba6d4(0x1a3)]===_0x1ba6d4(0x143))console['log'](a5_0x5a9672['green']('✓\x20PASS:\x20'+_0x80bbc0)+a5_0x5a9672[_0x1ba6d4(0x155)](_0x1ba6d4(0x179)));else _0x1418c9[_0x1ba6d4(0x1a3)]===_0x1ba6d4(0x115)?console[_0x1ba6d4(0x184)](a5_0x5a9672[_0x1ba6d4(0x139)](_0x1ba6d4(0x17b)+_0x80bbc0+_0x1ba6d4(0x13e)+_0x1418c9[_0x1ba6d4(0x16c)])+a5_0x5a9672[_0x1ba6d4(0x155)]('\x20(cached)')):console[_0x1ba6d4(0x184)](a5_0x5a9672[_0x1ba6d4(0x139)](_0x1ba6d4(0x135)+_0x80bbc0+_0x1ba6d4(0x13e)+_0x1418c9[_0x1ba6d4(0x16c)]));_0x1418c9[_0x1ba6d4(0x123)]&&console[_0x1ba6d4(0x184)](a5_0x5a9672[_0x1ba6d4(0x155)](_0x1ba6d4(0x134)+_0x1418c9[_0x1ba6d4(0x123)])),_0x495579[_0x1ba6d4(0x138)](_0x1418c9);},'onTestSkipped':(_0x3af71c,_0x572b1a)=>{const _0x5c26ae=_0x338331;_0x32bbcd['stop'](),console['log'](a5_0x5a9672['yellow'](_0x5c26ae(0x167)+_0x3af71c+_0x5c26ae(0x13e)+_0x572b1a));}});for(const _0x53f802 of _0x59c43b){!_0x495579[_0x338331(0x1a0)](_0x159883=>_0x159883[_0x338331(0x15b)]===_0x53f802[_0x338331(0x15b)])&&_0x495579['push'](_0x53f802);}}catch(_0x2f4fce){_0x32bbcd[_0x338331(0x18d)]();const _0x10bf32=_0x2f4fce instanceof Error?_0x2f4fce['message']:String(_0x2f4fce);return console[_0x338331(0x184)](a5_0x5a9672[_0x338331(0x139)](_0x338331(0x171)+_0x10bf32)),0x1;}_0x32bbcd[_0x338331(0x18d)]();if(_0x5216e1['length']>0x0){console[_0x338331(0x184)](),console[_0x338331(0x184)](a5_0x5a9672[_0x338331(0x15d)](_0x338331(0x11e)));const {projectId:_0x1da13f,agentId:_0x3e6aa0}=_0x3878f1['agent'];for(const _0x39e20b of _0x5216e1){console['log']('Running:\x20'+a5_0x5a9672[_0x338331(0x194)](_0x39e20b['name']));const _0x27806c=createCommandSpinner(_0x338331(0x10e)+_0x39e20b[_0x338331(0x1a4)][_0x338331(0x125)]+_0x338331(0x14f));_0x27806c[_0x338331(0x14d)]();try{const {result:_0x575a6d}=await runTest(_0x2516da[_0x338331(0x120)],_0x39e20b,{'agentId':_0x3e6aa0,'projectId':_0x1da13f,'site':_0x3878f1['site'],'noEval':![],'evaluatorId':_0x1e7d3c,'onRoundStart':(_0x5aff8b,_0x21d030)=>{const _0x14d643=_0x338331;_0x27806c[_0x14d643(0x17d)]=_0x14d643(0x197)+(_0x5aff8b+0x1)+'/'+_0x21d030+_0x14d643(0x14f);},'onRoundComplete':(_0x1c0382,_0x31836a,_0xf2b726)=>{const _0x120821=_0x338331,_0x49e111=formatElapsed(_0x31836a);_0xf2b726?console[_0x120821(0x184)](_0x120821(0x165)+(_0x1c0382+0x1)+'/'+_0x39e20b['rounds']['length']+'...\x20'+a5_0x5a9672[_0x120821(0x169)]('✓')+'\x20('+_0x49e111+')'):console[_0x120821(0x184)](_0x120821(0x165)+(_0x1c0382+0x1)+'/'+_0x39e20b[_0x120821(0x1a4)][_0x120821(0x125)]+_0x120821(0x18e)+a5_0x5a9672[_0x120821(0x139)]('✗'));},'onEvaluationStart':()=>{const _0x4f70a4=_0x338331;_0x27806c[_0x4f70a4(0x17d)]=_0x4f70a4(0x13c);},'onEvaluationComplete':_0x446688=>{const _0x85acad=_0x338331,_0x28c3cd=formatElapsed(_0x446688);console[_0x85acad(0x184)]('\x20\x20Evaluating...\x20'+a5_0x5a9672[_0x85acad(0x169)]('✓')+'\x20('+_0x28c3cd+')');}});_0x27806c['stop'](),_0x495579[_0x338331(0x138)](_0x575a6d);if(_0x575a6d[_0x338331(0x1a3)]===_0x338331(0x143))console['log'](a5_0x5a9672['green'](_0x338331(0x164)+_0x575a6d[_0x338331(0x16c)])+a5_0x5a9672['dim'](_0x338331(0x149)));else _0x575a6d[_0x338331(0x1a3)]===_0x338331(0x115)?console[_0x338331(0x184)](a5_0x5a9672['red']('✗\x20FAIL:\x20'+_0x575a6d['reason'])+a5_0x5a9672[_0x338331(0x155)](_0x338331(0x149))):console[_0x338331(0x184)](a5_0x5a9672['red'](_0x338331(0x135)+_0x575a6d['reason']));_0x575a6d[_0x338331(0x123)]&&console[_0x338331(0x184)](a5_0x5a9672[_0x338331(0x155)](_0x338331(0x134)+_0x575a6d[_0x338331(0x123)]));}catch(_0x236dc6){_0x27806c[_0x338331(0x18d)]();const _0x374dbc=_0x236dc6 instanceof Error?_0x236dc6[_0x338331(0x133)]:String(_0x236dc6);console[_0x338331(0x184)](a5_0x5a9672[_0x338331(0x139)](_0x338331(0x135)+_0x374dbc)),_0x495579[_0x338331(0x138)]({'name':_0x39e20b[_0x338331(0x15b)],'status':_0x338331(0x148),'reason':_0x374dbc,'timestamp':new Date()[_0x338331(0x15c)](),'duration_ms':0x0});}}}console[_0x338331(0x184)]();const _0x5ad5be=Date[_0x338331(0x190)]()-_0x104401,_0x15fa54=_0x495579['filter'](_0x5e1aa3=>_0x5e1aa3[_0x338331(0x1a3)]===_0x338331(0x143))[_0x338331(0x125)],_0x5f3056=_0x495579['filter'](_0x157d14=>_0x157d14[_0x338331(0x1a3)]===_0x338331(0x115))[_0x338331(0x125)],_0x297c0c=_0x495579[_0x338331(0x126)](_0x274d55=>_0x274d55['status']===_0x338331(0x148))[_0x338331(0x125)];console[_0x338331(0x184)]('━'[_0x338331(0x14b)](0x3c)),console[_0x338331(0x184)](_0x338331(0x17f)),console[_0x338331(0x184)]('━'[_0x338331(0x14b)](0x3c)),console[_0x338331(0x184)](_0x338331(0x16b)+_0x495579[_0x338331(0x125)]),console['log'](_0x338331(0x142)+a5_0x5a9672[_0x338331(0x169)](_0x15fa54)),console['log'](_0x338331(0x17e)+a5_0x5a9672['red'](_0x5f3056));_0x297c0c>0x0&&console[_0x338331(0x184)]('Errors:\x20\x20\x20'+a5_0x5a9672[_0x338331(0x139)](_0x297c0c));console[_0x338331(0x184)](_0x338331(0x181)+formatElapsed(_0x5ad5be)),console[_0x338331(0x184)]('━'[_0x338331(0x14b)](0x3c));const _0x5828e3={'summary':{'total':_0x495579['length'],'passed':_0x15fa54,'failed':_0x5f3056,'errors':_0x297c0c>0x0?_0x297c0c:undefined,'duration_ms':_0x5ad5be},'tests':_0x495579,'agent':{'project':_0x55a050[_0x338331(0x16f)],'name':_0x55a050[_0x338331(0x153)],'site':_0x216d15},'timestamp':new Date(_0x104401)['toISOString']()};if(_0x8656f4!==_0x338331(0x18f)||_0x12c3b2){const _0x173942=formatResults(_0x5828e3,_0x8656f4);if(_0x12c3b2)try{a5_0x3d2886[_0x338331(0x187)](_0x12c3b2,_0x173942,'utf-8'),console[_0x338331(0x184)](),console[_0x338331(0x184)](a5_0x5a9672['dim'](_0x338331(0x122)+_0x12c3b2));}catch(_0x10a9cd){return console[_0x338331(0x184)](),console[_0x338331(0x184)](a5_0x5a9672['red'](_0x338331(0x152)+_0x10a9cd)),0x1;}else console['log'](),console[_0x338331(0x184)](_0x173942);}const _0x430f6b=_0x495579['filter'](_0x4729d6=>_0x4729d6[_0x338331(0x1a3)]!==_0x338331(0x143));return _0x430f6b['length']>0x0?0x1:0x0;}}
|
|
1
|
+
const a5_0x1cfe9c=a5_0x2229;(function(_0x514efc,_0x56d578){const _0x4d04b3=a5_0x2229,_0x34078e=_0x514efc();while(!![]){try{const _0x381d35=parseInt(_0x4d04b3(0x178))/0x1+parseInt(_0x4d04b3(0x10d))/0x2*(parseInt(_0x4d04b3(0x19a))/0x3)+-parseInt(_0x4d04b3(0x196))/0x4+parseInt(_0x4d04b3(0x175))/0x5*(parseInt(_0x4d04b3(0x18d))/0x6)+-parseInt(_0x4d04b3(0x134))/0x7*(-parseInt(_0x4d04b3(0x121))/0x8)+-parseInt(_0x4d04b3(0x156))/0x9+-parseInt(_0x4d04b3(0x19c))/0xa;if(_0x381d35===_0x56d578)break;else _0x34078e['push'](_0x34078e['shift']());}catch(_0x2fb05c){_0x34078e['push'](_0x34078e['shift']());}}}(a5_0x4b47,0xb90f3));function a5_0x2229(_0x1d20da,_0xeda892){_0x1d20da=_0x1d20da-0x10d;const _0x4b477b=a5_0x4b47();let _0x222943=_0x4b477b[_0x1d20da];return _0x222943;}import*as a5_0x17d003 from'node:fs';import*as a5_0x1d1762 from'node:path';import a5_0x2c1082 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';function a5_0x4b47(){const _0x2bf8a9=['llmProject','Output\x20written\x20to:\x20','toISOString','round','timestamp','132izXfyw','\x20\x20Round\x20','...\x20','No\x20tests\x20found\x20matching:\x20','toLowerCase','PASS','white','Re-evaluation\x20Summary','Project\x20path:\x20','4243448UcpumD','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','Round\x201/','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','2040906OEmEta','reason','7830550aVLlnJ','Using\x20agent:\x20','404','agent:test','start','writeFileSync','output','Test\x20Summary','agentDirs','now','utf-8','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','2mWncmz','Evaluating\x20response...','test.yml','resolveAgentId','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','description','llm','execute','filter','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','push','Round\x20','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','split','Re-evaluating...','Cached\x20run\x20from:\x20','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','testName','\x20-\x20','repeat','336XYsSYI','log','\x20\x20Conversation:\x20','Either\x20switch\x20to\x20the\x20\x22','Duration:\x20','New\x20tests\x20to\x20execute:\x20','dryRun','/<agent-name>','site','testYmlPath','tsv','No\x20tests\x20found\x20with\x20tags:\x20','red','tags','FAIL','yellow','Running\x20test:\x20','stop','agent','223734NDbtBR','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','Passed:\x20\x20\x20','forEach','✗\x20ERROR:\x20','Failed\x20Tests:','length','projectDir','\x20\x20tdx\x20agent\x20test\x20<path>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20from\x20path','verbose','...',':\x20Sending\x20user\x20input...','projectName','text','executeReeval','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','join','resolveProjectId','jsonl','Site:\x20','cyan','Conversation\x20URL:\x20','Executing\x20new\x20tests...','Test\x20Configuration:','agentName','Error\x20writing\x20output\x20file:\x20','green','Cached\x20run\x20is\x20from\x20site\x20\x22','Running\x20agent\x20tests...','\x20\x20Evaluating...\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','message','trim','basename','5591088jUdxOY','\x22:\x20','Errors:\x20\x20\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','size','table','✓\x20PASS:\x20','substring','map','Re-evaluating\x20cached\x20test\x20run...','Test\x20','source','conversation_url','includes','eval','Running:\x20','dim','reeval','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','Re-evaluating\x20','not\x20found','status','Total:\x20\x20\x20\x20','no_context','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','ERROR','\x20(new)','Error:\x20No\x20previous\x20test\x20run\x20found.','\x20\x20Site:\x20','194755nhDQBY','some','⚠\x20SKIPPED:\x20','343524UkPpon','\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','json','\x20\x20Project:\x20','tests','No\x20tests\x20have\x20tags\x20defined.','rounds','name','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','find','✗\x20FAIL:\x20','Available\x20tests:\x20','context','\x20(cached)','Run\x20\x27tdx\x20agent\x20pull\x20'];a5_0x4b47=function(){return _0x2bf8a9;};return a5_0x4b47();}import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x1cfe9c(0x180)]=a5_0x1cfe9c(0x19f);[a5_0x1cfe9c(0x112)]='Run\x20tests\x20for\x20an\x20LLM\x20agent';async[a5_0x1cfe9c(0x114)](_0x2ee100){const _0x4a82ba=a5_0x1cfe9c,{options:_0xd720f6,args:_0x1e1ead,tdx:_0x22ebf1}=_0x2ee100,_0x2afe95=_0x1e1ead[0x0]||'.',_0x31efda=_0xd720f6[_0x4a82ba(0x127)],_0x4b0c37=_0xd720f6,_0x4e2198=_0x4b0c37[_0x4a82ba(0x164)]===![],_0x373d6e=_0x4b0c37[_0x4a82ba(0x167)],_0x36eefe=_0x4b0c37[_0x4a82ba(0x180)],_0x2bf5d3=_0x4b0c37[_0x4a82ba(0x12e)],_0x5d9e0a=_0xd720f6[_0x4a82ba(0x129)],_0x5e4ee8=_0x4b0c37[_0x4a82ba(0x1a2)];if(_0x373d6e&&_0x4e2198)return console[_0x4a82ba(0x122)](a5_0x2c1082['red'](_0x4a82ba(0x199))),0x1;let _0x39c320=_0x4a82ba(0x15b);if(_0x4b0c37[_0x4a82ba(0x17b)])_0x39c320=_0x4a82ba(0x17b);else{if(_0x4b0c37[_0x4a82ba(0x146)])_0x39c320=_0x4a82ba(0x146);else{if(_0x4b0c37[_0x4a82ba(0x12b)])_0x39c320=_0x4a82ba(0x12b);else{if(_0x4b0c37[_0x4a82ba(0x15b)])_0x39c320=_0x4a82ba(0x15b);}}}const _0x1cf194=_0x4b0c37[_0x4a82ba(0x188)];let _0xa7a67f=_0x2afe95;const _0x4f1abb=a5_0x17d003['existsSync'](_0x2afe95),_0xa68f7b=_0x2afe95==='.';if(!_0x4f1abb||_0xa68f7b){const _0x3b6601=resolveProjectFromContext(_0x2afe95,_0x1cf194,{'requireFile':_0x4a82ba(0x10f)});if(_0x3b6601['found'])_0xa7a67f=_0x3b6601[_0x4a82ba(0x13b)],_0x3b6601[_0x4a82ba(0x161)]===_0x4a82ba(0x185)&&console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x166)](_0x4a82ba(0x19d)+_0xa7a67f));else switch(_0x3b6601['reason']){case _0x4a82ba(0x16e):console[_0x4a82ba(0x122)](a5_0x2c1082['yellow'](_0x3b6601[_0x4a82ba(0x153)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)]('Usage:'),console[_0x4a82ba(0x122)](_0x4a82ba(0x13c)),console[_0x4a82ba(0x122)](_0x4a82ba(0x179)),console[_0x4a82ba(0x122)](),console['log'](_0x4a82ba(0x11d));return 0x1;case'no_local_folder':console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x130)](_0x3b6601[_0x4a82ba(0x153)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x4a82ba(0x187)+_0x3b6601[_0x4a82ba(0x188)]+'\x27\x20to\x20create\x20the\x20folder\x20structure.');return 0x1;case'multiple_agents':{const _0x23dbf7=a5_0x1d1762[_0x4a82ba(0x155)](_0x3b6601[_0x4a82ba(0x13b)]);console['log'](a5_0x2c1082[_0x4a82ba(0x130)](_0x4a82ba(0x116)+_0x3b6601[_0x4a82ba(0x188)]+'\x22:'));for(const _0x4598ca of _0x3b6601[_0x4a82ba(0x1a4)]){console[_0x4a82ba(0x122)]('\x20\x20-\x20'+_0x4598ca);}return console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x4a82ba(0x170)+_0x23dbf7+_0x4a82ba(0x128)),0x1;}case'no_tests':console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x130)](_0x4a82ba(0x135)+_0x3b6601[_0x4a82ba(0x188)]+'\x22.')),console[_0x4a82ba(0x122)](a5_0x2c1082['dim'](_0x4a82ba(0x195)+_0x3b6601[_0x4a82ba(0x13b)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x4a82ba(0x16f));return 0x1;}}const {definition:_0xbdb5eb,agentInfo:_0x15dda3}=parseTestFile(_0xa7a67f);let _0x1e3240=_0xbdb5eb[_0x4a82ba(0x17d)];if(_0x36eefe){const _0x389458=_0x36eefe[_0x4a82ba(0x11a)](',')[_0x4a82ba(0x15e)](_0x25c5eb=>_0x25c5eb[_0x4a82ba(0x154)]());_0x1e3240=_0xbdb5eb[_0x4a82ba(0x17d)]['filter'](_0x1217b7=>_0x389458['includes'](_0x1217b7[_0x4a82ba(0x180)]));if(_0x1e3240[_0x4a82ba(0x13a)]===0x0)return console[_0x4a82ba(0x122)](a5_0x2c1082['yellow'](_0x4a82ba(0x190)+_0x36eefe)),console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x166)](_0x4a82ba(0x184)+_0xbdb5eb['tests'][_0x4a82ba(0x15e)](_0xcc75ca=>_0xcc75ca[_0x4a82ba(0x180)])[_0x4a82ba(0x144)](',\x20'))),0x1;}if(_0x2bf5d3){const _0xf99d60=_0x2bf5d3[_0x4a82ba(0x11a)](',')[_0x4a82ba(0x15e)](_0x2c2ef6=>_0x2c2ef6[_0x4a82ba(0x154)]()[_0x4a82ba(0x191)]());_0x1e3240=_0x1e3240[_0x4a82ba(0x115)](_0x4c76cd=>_0x4c76cd[_0x4a82ba(0x12e)]?.[_0x4a82ba(0x176)](_0x2e3618=>_0xf99d60[_0x4a82ba(0x163)](_0x2e3618['toLowerCase']())));if(_0x1e3240[_0x4a82ba(0x13a)]===0x0){console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x130)](_0x4a82ba(0x12c)+_0x2bf5d3));const _0xfb9df=new Set();return _0xbdb5eb['tests'][_0x4a82ba(0x137)](_0xce629d=>_0xce629d['tags']?.[_0x4a82ba(0x137)](_0x4b2969=>_0xfb9df['add'](_0x4b2969))),_0xfb9df[_0x4a82ba(0x15a)]>0x0?console['log'](a5_0x2c1082[_0x4a82ba(0x166)]('Available\x20tags:\x20'+[..._0xfb9df][_0x4a82ba(0x144)](',\x20'))):console[_0x4a82ba(0x122)](a5_0x2c1082['dim'](_0x4a82ba(0x17e))),0x1;}}if(_0x373d6e)return this[_0x4a82ba(0x142)](_0x2ee100,{'definition':{'tests':_0x1e3240},'agentInfo':_0x15dda3,'outputFormat':_0x39c320,'outputFile':_0x5e4ee8,'testNames':_0x36eefe});if(_0x31efda){console[_0x4a82ba(0x122)](a5_0x2c1082['cyan'](_0x4a82ba(0x14b))),console['log'](_0x4a82ba(0x174)+a5_0x2c1082['white'](_0x5d9e0a)),console[_0x4a82ba(0x122)](_0x4a82ba(0x17c)+a5_0x2c1082['white'](_0x15dda3[_0x4a82ba(0x140)])),console[_0x4a82ba(0x122)]('\x20\x20Agent:\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x15dda3[_0x4a82ba(0x14c)])),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)]('Tests\x20found:\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x1e3240['length']));for(let _0x1ce670=0x0;_0x1ce670<_0x1e3240['length'];_0x1ce670++){const _0x3093d8=_0x1e3240[_0x1ce670],_0x10e2a1=_0x3093d8[_0x4a82ba(0x17f)]['length']===0x1?_0x4a82ba(0x18b):_0x4a82ba(0x17f),_0x12ec04=_0x3093d8[_0x4a82ba(0x12e)]?.['length']?'\x20['+_0x3093d8[_0x4a82ba(0x12e)][_0x4a82ba(0x144)](',\x20')+']':'';console[_0x4a82ba(0x122)]('\x20\x20'+(_0x1ce670+0x1)+'.\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x3093d8[_0x4a82ba(0x180)])+'\x20('+_0x3093d8[_0x4a82ba(0x17f)]['length']+'\x20'+_0x10e2a1+')'+a5_0x2c1082[_0x4a82ba(0x166)](_0x12ec04));}return 0x0;}let _0xd2f939,_0x1a2723;try{_0xd2f939=await _0x22ebf1[_0x4a82ba(0x113)][_0x4a82ba(0x145)](_0x15dda3[_0x4a82ba(0x140)]);}catch(_0x35a37b){const _0x3ba0f9=_0x35a37b instanceof Error?_0x35a37b[_0x4a82ba(0x153)]:String(_0x35a37b);return _0x3ba0f9[_0x4a82ba(0x163)](_0x4a82ba(0x19e))||_0x3ba0f9[_0x4a82ba(0x191)]()[_0x4a82ba(0x163)]('not\x20found')?console['log'](a5_0x2c1082[_0x4a82ba(0x12d)]('✗\x20ERROR:\x20Project\x20not\x20found:\x20'+_0x15dda3['projectName'])):console[_0x4a82ba(0x122)](a5_0x2c1082['red'](_0x4a82ba(0x169)+_0x15dda3['projectName']+'\x22:\x20'+_0x3ba0f9)),0x1;}try{_0x1a2723=await _0x22ebf1[_0x4a82ba(0x113)][_0x4a82ba(0x110)](_0x15dda3['agentName'],_0xd2f939);}catch(_0x4369c2){const _0x3def7f=_0x4369c2 instanceof Error?_0x4369c2['message']:String(_0x4369c2);return _0x3def7f[_0x4a82ba(0x163)](_0x4a82ba(0x19e))||_0x3def7f['toLowerCase']()[_0x4a82ba(0x163)](_0x4a82ba(0x16b))?console['log'](a5_0x2c1082['red'](_0x4a82ba(0x197)+_0x15dda3[_0x4a82ba(0x14c)])):console['log'](a5_0x2c1082['red'](_0x4a82ba(0x1a8)+_0x15dda3['agentName']+_0x4a82ba(0x157)+_0x3def7f)),0x1;}let _0x35fe25;if(!_0x4e2198)try{_0x35fe25=await setupEvaluatorAgent(_0x22ebf1[_0x4a82ba(0x113)],_0xd720f6[_0x4a82ba(0x13d)]);}catch(_0xf4cbc8){const _0x29fa0d=_0xf4cbc8 instanceof Error?_0xf4cbc8[_0x4a82ba(0x153)]:String(_0xf4cbc8);return console['log'](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x1a7)+_0x29fa0d)),0x1;}console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x148)](_0x4a82ba(0x150))),console[_0x4a82ba(0x122)](_0x4a82ba(0x147)+a5_0x2c1082[_0x4a82ba(0x193)](_0x5d9e0a)),console[_0x4a82ba(0x122)]('Agent:\x20'+a5_0x2c1082['white'](_0x15dda3['projectName']+'/'+_0x15dda3[_0x4a82ba(0x14c)])),console[_0x4a82ba(0x122)]();const _0x3036f8=[],_0x477b68=[],_0x4ebc89=Date[_0x4a82ba(0x1a5)]();for(let _0x3e0a52=0x0;_0x3e0a52<_0x1e3240[_0x4a82ba(0x13a)];_0x3e0a52++){const _0x102a68=_0x1e3240[_0x3e0a52];_0x1e3240[_0x4a82ba(0x13a)]>0x1?console[_0x4a82ba(0x122)](_0x4a82ba(0x160)+(_0x3e0a52+0x1)+'/'+_0x1e3240[_0x4a82ba(0x13a)]+':\x20'+a5_0x2c1082[_0x4a82ba(0x193)](_0x102a68[_0x4a82ba(0x180)])):console['log'](_0x4a82ba(0x131)+a5_0x2c1082['white'](_0x102a68[_0x4a82ba(0x180)]));const _0x5782fb=createCommandSpinner(_0x4a82ba(0x198)+_0x102a68[_0x4a82ba(0x17f)]['length']+_0x4a82ba(0x13f));_0x5782fb[_0x4a82ba(0x1a0)]();try{const {result:_0x4c82f2,conversation:_0x30140c}=await runTest(_0x22ebf1[_0x4a82ba(0x113)],_0x102a68,{'agentId':_0x1a2723,'projectId':_0xd2f939,'site':_0x5d9e0a,'noEval':_0x4e2198,'evaluatorId':_0x35fe25,'onRoundStart':(_0x45a8b0,_0x2f862d)=>{const _0x1884cf=_0x4a82ba;_0x5782fb[_0x1884cf(0x141)]=_0x1884cf(0x118)+(_0x45a8b0+0x1)+'/'+_0x2f862d+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x4bd899,_0x1e3250,_0x4c21c1)=>{const _0x485cb0=_0x4a82ba,_0x4cbf9f=formatElapsed(_0x1e3250);_0x4c21c1?console[_0x485cb0(0x122)](_0x485cb0(0x18e)+(_0x4bd899+0x1)+'/'+_0x102a68[_0x485cb0(0x17f)]['length']+_0x485cb0(0x18f)+a5_0x2c1082[_0x485cb0(0x14e)]('✓')+'\x20('+_0x4cbf9f+')'):console['log'](_0x485cb0(0x18e)+(_0x4bd899+0x1)+'/'+_0x102a68[_0x485cb0(0x17f)][_0x485cb0(0x13a)]+_0x485cb0(0x18f)+a5_0x2c1082[_0x485cb0(0x12d)]('✗'));},'onEvaluationStart':()=>{const _0x584d04=_0x4a82ba;_0x5782fb[_0x584d04(0x141)]=_0x584d04(0x10e);},'onEvaluationComplete':_0x2fe46b=>{const _0x4a6995=_0x4a82ba,_0x20e07a=formatElapsed(_0x2fe46b);console[_0x4a6995(0x122)](_0x4a6995(0x151)+a5_0x2c1082[_0x4a6995(0x14e)]('✓')+'\x20('+_0x20e07a+')');}});_0x5782fb[_0x4a82ba(0x132)](),_0x3036f8[_0x4a82ba(0x117)](_0x4c82f2),_0x477b68[_0x4a82ba(0x117)](_0x30140c);if(_0x4c82f2[_0x4a82ba(0x16c)]===_0x4a82ba(0x192))console['log'](a5_0x2c1082[_0x4a82ba(0x14e)](_0x4a82ba(0x15c)+_0x4c82f2[_0x4a82ba(0x19b)]));else _0x4c82f2[_0x4a82ba(0x16c)]===_0x4a82ba(0x12f)?console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x183)+_0x4c82f2['reason'])):console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x138)+_0x4c82f2[_0x4a82ba(0x19b)]));_0x4c82f2[_0x4a82ba(0x162)]&&console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x166)](_0x4a82ba(0x149)+_0x4c82f2[_0x4a82ba(0x162)])),console[_0x4a82ba(0x122)]();}catch(_0x55806d){_0x5782fb[_0x4a82ba(0x132)]();const _0x2d3c9c=_0x55806d instanceof Error?_0x55806d[_0x4a82ba(0x153)]:String(_0x55806d);console[_0x4a82ba(0x122)](a5_0x2c1082['red'](_0x4a82ba(0x138)+_0x2d3c9c)),console['log'](),_0x3036f8[_0x4a82ba(0x117)]({'name':_0x102a68['name'],'status':_0x4a82ba(0x171),'reason':_0x2d3c9c,'timestamp':new Date()[_0x4a82ba(0x18a)](),'duration_ms':0x0});}}const _0x8ea656=Date[_0x4a82ba(0x1a5)]()-_0x4ebc89,_0x5360f6=_0x3036f8[_0x4a82ba(0x115)](_0x5158c3=>_0x5158c3[_0x4a82ba(0x16c)]===_0x4a82ba(0x192))['length'],_0x1572bf=_0x3036f8[_0x4a82ba(0x115)](_0x543ac9=>_0x543ac9[_0x4a82ba(0x16c)]===_0x4a82ba(0x12f))[_0x4a82ba(0x13a)],_0x5f2f24=_0x3036f8['filter'](_0x352256=>_0x352256['status']==='ERROR')[_0x4a82ba(0x13a)];console['log']('━'[_0x4a82ba(0x120)](0x3c)),console[_0x4a82ba(0x122)](_0x4a82ba(0x1a3)),console[_0x4a82ba(0x122)]('━'['repeat'](0x3c)),console['log'](_0x4a82ba(0x16d)+_0x3036f8[_0x4a82ba(0x13a)]),console[_0x4a82ba(0x122)](_0x4a82ba(0x136)+a5_0x2c1082[_0x4a82ba(0x14e)](_0x5360f6)),console[_0x4a82ba(0x122)]('Failed:\x20\x20\x20'+a5_0x2c1082[_0x4a82ba(0x12d)](_0x1572bf));_0x5f2f24>0x0&&console[_0x4a82ba(0x122)]('Errors:\x20\x20\x20'+a5_0x2c1082[_0x4a82ba(0x12d)](_0x5f2f24));console[_0x4a82ba(0x122)](_0x4a82ba(0x125)+formatElapsed(_0x8ea656)),console[_0x4a82ba(0x122)]('━'[_0x4a82ba(0x120)](0x3c));const _0x33d07d=_0x3036f8[_0x4a82ba(0x115)](_0x4ad02b=>_0x4ad02b['status']!==_0x4a82ba(0x192));if(_0x33d07d['length']>0x0){console[_0x4a82ba(0x122)](),console['log'](_0x4a82ba(0x139));for(const _0x4406d9 of _0x33d07d){const _0xa36347=a5_0x2c1082[_0x4a82ba(0x12d)]('✗'),_0x94665d=_0x4406d9['reason'][_0x4a82ba(0x13a)]>0x32?_0x4406d9['reason'][_0x4a82ba(0x15d)](0x0,0x32)+'...':_0x4406d9['reason'];console['log']('\x20\x20'+_0xa36347+'\x20'+_0x4406d9['name']+':\x20'+_0x94665d);}}const _0x438e71={'summary':{'total':_0x3036f8[_0x4a82ba(0x13a)],'passed':_0x5360f6,'failed':_0x1572bf,'errors':_0x5f2f24>0x0?_0x5f2f24:undefined,'duration_ms':_0x8ea656},'tests':_0x3036f8,'agent':{'project':_0x15dda3['projectName'],'name':_0x15dda3[_0x4a82ba(0x14c)],'site':_0x5d9e0a},'timestamp':new Date(_0x4ebc89)[_0x4a82ba(0x18a)]()};try{const _0x593c46=buildCachedTestRun(_0x477b68,{'site':_0x5d9e0a,'projectId':_0xd2f939,'projectName':_0x15dda3[_0x4a82ba(0x140)],'agentId':_0x1a2723,'agentName':_0x15dda3[_0x4a82ba(0x14c)],'testYmlPath':a5_0x1d1762['resolve'](_0x15dda3[_0x4a82ba(0x12a)])});saveLastTestRun(_0x593c46);}catch{}if(_0x39c320!=='table'||_0x5e4ee8){const _0x1bd565=formatResults(_0x438e71,_0x39c320);if(_0x5e4ee8)try{a5_0x17d003[_0x4a82ba(0x1a1)](_0x5e4ee8,_0x1bd565,_0x4a82ba(0x1a6)),console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](a5_0x2c1082['dim'](_0x4a82ba(0x189)+_0x5e4ee8));}catch(_0x552b85){return console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](a5_0x2c1082[_0x4a82ba(0x12d)](_0x4a82ba(0x14d)+_0x552b85)),0x1;}else console[_0x4a82ba(0x122)](),console[_0x4a82ba(0x122)](_0x1bd565);}return _0x33d07d[_0x4a82ba(0x13a)]>0x0?0x1:0x0;}async[a5_0x1cfe9c(0x142)](_0x2c2793,_0x1b4d42){const _0x54f87b=a5_0x1cfe9c,{options:_0x195c42,tdx:_0x5295e1}=_0x2c2793,{definition:_0x1ec506,agentInfo:_0x4f4067,outputFormat:_0x14d6e7,outputFile:_0x187442}=_0x1b4d42,_0x4b3cfc=_0x195c42[_0x54f87b(0x129)],_0x5866dc=loadLastTestRun();if(!_0x5866dc)return console['log'](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x173))),console[_0x54f87b(0x122)](a5_0x2c1082['dim'](_0x54f87b(0x119))),0x1;if(_0x5866dc['agent'][_0x54f87b(0x14c)]!==_0x4f4067[_0x54f87b(0x14c)])return console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x143)+_0x5866dc[_0x54f87b(0x133)][_0x54f87b(0x14c)]+_0x54f87b(0x152)+_0x4f4067[_0x54f87b(0x14c)]+'\x22.')),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)](_0x54f87b(0x111))),0x1;const _0x5705ee=new Set(_0x5866dc['conversations']['map'](_0xddbd5e=>_0xddbd5e[_0x54f87b(0x11e)])),_0x309c12=_0x1ec506[_0x54f87b(0x17d)][_0x54f87b(0x115)](_0x30ef1b=>!_0x5705ee['has'](_0x30ef1b[_0x54f87b(0x180)]));if(_0x309c12['length']>0x0&&_0x5866dc[_0x54f87b(0x129)]!==_0x4b3cfc)return console['log'](a5_0x2c1082['red'](_0x54f87b(0x17a))),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)](_0x54f87b(0x14f)+_0x5866dc[_0x54f87b(0x129)]+_0x54f87b(0x159)+_0x4b3cfc+'\x22.')),console[_0x54f87b(0x122)](a5_0x2c1082['dim'](_0x54f87b(0x124)+_0x5866dc[_0x54f87b(0x129)]+_0x54f87b(0x168))),0x1;const _0x4d4922=_0x1ec506[_0x54f87b(0x17d)][_0x54f87b(0x115)](_0x48c204=>_0x5705ee['has'](_0x48c204['name'])),_0x3fae6e=_0x309c12;let _0x50ac59;try{_0x50ac59=await setupEvaluatorAgent(_0x5295e1['llm'],_0x195c42['verbose']);}catch(_0x3aa51b){const _0x53af59=_0x3aa51b instanceof Error?_0x3aa51b[_0x54f87b(0x153)]:String(_0x3aa51b);return console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x53af59)),0x1;}console['log'](a5_0x2c1082[_0x54f87b(0x148)](_0x54f87b(0x15f))),console[_0x54f87b(0x122)](_0x54f87b(0x11c)+a5_0x2c1082[_0x54f87b(0x193)](_0x5866dc[_0x54f87b(0x18c)])),console[_0x54f87b(0x122)]('Agent:\x20'+a5_0x2c1082[_0x54f87b(0x193)](_0x5866dc[_0x54f87b(0x133)][_0x54f87b(0x140)]+'/'+_0x5866dc[_0x54f87b(0x133)]['agentName']));_0x3fae6e[_0x54f87b(0x13a)]>0x0&&console['log'](_0x54f87b(0x126)+a5_0x2c1082[_0x54f87b(0x130)](_0x3fae6e[_0x54f87b(0x13a)]));console['log']();const _0x3c2ed8=[],_0x9151f2=Date[_0x54f87b(0x1a5)](),_0x4306c3=createCommandSpinner(_0x54f87b(0x11b));if(_0x4d4922['length']>0x0)try{const _0x16f719=await reevaluateFromCache(_0x5295e1[_0x54f87b(0x113)],_0x5866dc,{'tests':_0x4d4922},{'evaluatorId':_0x50ac59,'onTestStart':(_0xdda9d1,_0x8d048d,_0x1e7077)=>{const _0x30b798=_0x54f87b;_0x4306c3[_0x30b798(0x141)]=_0x30b798(0x16a)+(_0x8d048d+0x1)+'/'+_0x1e7077+':\x20'+_0xdda9d1+_0x30b798(0x13e);if(!_0x4306c3['isSpinning'])_0x4306c3[_0x30b798(0x1a0)]();},'onTestComplete':(_0x125343,_0x998568)=>{const _0x46b9bf=_0x54f87b;_0x4306c3[_0x46b9bf(0x132)]();if(_0x998568[_0x46b9bf(0x16c)]===_0x46b9bf(0x192))console[_0x46b9bf(0x122)](a5_0x2c1082[_0x46b9bf(0x14e)]('✓\x20PASS:\x20'+_0x125343)+a5_0x2c1082[_0x46b9bf(0x166)](_0x46b9bf(0x186)));else _0x998568[_0x46b9bf(0x16c)]==='FAIL'?console['log'](a5_0x2c1082[_0x46b9bf(0x12d)](_0x46b9bf(0x183)+_0x125343+_0x46b9bf(0x11f)+_0x998568[_0x46b9bf(0x19b)])+a5_0x2c1082[_0x46b9bf(0x166)]('\x20(cached)')):console[_0x46b9bf(0x122)](a5_0x2c1082['red']('✗\x20ERROR:\x20'+_0x125343+_0x46b9bf(0x11f)+_0x998568['reason']));_0x998568[_0x46b9bf(0x162)]&&console['log'](a5_0x2c1082[_0x46b9bf(0x166)](_0x46b9bf(0x123)+_0x998568[_0x46b9bf(0x162)])),_0x3c2ed8[_0x46b9bf(0x117)](_0x998568);},'onTestSkipped':(_0x10cff9,_0x26929b)=>{const _0x40580d=_0x54f87b;_0x4306c3['stop'](),console[_0x40580d(0x122)](a5_0x2c1082[_0x40580d(0x130)](_0x40580d(0x177)+_0x10cff9+_0x40580d(0x11f)+_0x26929b));}});for(const _0x38d210 of _0x16f719){!_0x3c2ed8[_0x54f87b(0x182)](_0x59132b=>_0x59132b['name']===_0x38d210[_0x54f87b(0x180)])&&_0x3c2ed8[_0x54f87b(0x117)](_0x38d210);}}catch(_0x58bfe8){_0x4306c3['stop']();const _0x5a46a4=_0x58bfe8 instanceof Error?_0x58bfe8[_0x54f87b(0x153)]:String(_0x58bfe8);return console['log'](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x181)+_0x5a46a4)),0x1;}_0x4306c3['stop']();if(_0x3fae6e['length']>0x0){console['log'](),console['log'](a5_0x2c1082[_0x54f87b(0x148)](_0x54f87b(0x14a)));const {projectId:_0x488aa0,agentId:_0x1751bc}=_0x5866dc['agent'];for(const _0x4fed27 of _0x3fae6e){console[_0x54f87b(0x122)](_0x54f87b(0x165)+a5_0x2c1082[_0x54f87b(0x193)](_0x4fed27[_0x54f87b(0x180)]));const _0x100cc3=createCommandSpinner(_0x54f87b(0x198)+_0x4fed27[_0x54f87b(0x17f)]['length']+_0x54f87b(0x13f));_0x100cc3[_0x54f87b(0x1a0)]();try{const {result:_0x1375e5}=await runTest(_0x5295e1[_0x54f87b(0x113)],_0x4fed27,{'agentId':_0x1751bc,'projectId':_0x488aa0,'site':_0x5866dc[_0x54f87b(0x129)],'noEval':![],'evaluatorId':_0x50ac59,'onRoundStart':(_0x271356,_0x39f878)=>{const _0x4465a4=_0x54f87b;_0x100cc3['text']='Round\x20'+(_0x271356+0x1)+'/'+_0x39f878+_0x4465a4(0x13f);},'onRoundComplete':(_0x409f80,_0x5a8c0b,_0x31b5d0)=>{const _0x1d5c3f=_0x54f87b,_0x1bba20=formatElapsed(_0x5a8c0b);_0x31b5d0?console['log'](_0x1d5c3f(0x18e)+(_0x409f80+0x1)+'/'+_0x4fed27[_0x1d5c3f(0x17f)][_0x1d5c3f(0x13a)]+_0x1d5c3f(0x18f)+a5_0x2c1082[_0x1d5c3f(0x14e)]('✓')+'\x20('+_0x1bba20+')'):console[_0x1d5c3f(0x122)](_0x1d5c3f(0x18e)+(_0x409f80+0x1)+'/'+_0x4fed27[_0x1d5c3f(0x17f)][_0x1d5c3f(0x13a)]+_0x1d5c3f(0x18f)+a5_0x2c1082[_0x1d5c3f(0x12d)]('✗'));},'onEvaluationStart':()=>{const _0x1a02a9=_0x54f87b;_0x100cc3[_0x1a02a9(0x141)]='Evaluating\x20response...';},'onEvaluationComplete':_0x28d871=>{const _0x5ad755=_0x54f87b,_0x144ec0=formatElapsed(_0x28d871);console[_0x5ad755(0x122)](_0x5ad755(0x151)+a5_0x2c1082['green']('✓')+'\x20('+_0x144ec0+')');}});_0x100cc3[_0x54f87b(0x132)](),_0x3c2ed8['push'](_0x1375e5);if(_0x1375e5['status']===_0x54f87b(0x192))console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x14e)](_0x54f87b(0x15c)+_0x1375e5[_0x54f87b(0x19b)])+a5_0x2c1082['dim'](_0x54f87b(0x172)));else _0x1375e5[_0x54f87b(0x16c)]==='FAIL'?console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)](_0x54f87b(0x183)+_0x1375e5[_0x54f87b(0x19b)])+a5_0x2c1082[_0x54f87b(0x166)]('\x20(new)')):console[_0x54f87b(0x122)](a5_0x2c1082['red']('✗\x20ERROR:\x20'+_0x1375e5[_0x54f87b(0x19b)]));_0x1375e5[_0x54f87b(0x162)]&&console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)]('\x20\x20Conversation:\x20'+_0x1375e5[_0x54f87b(0x162)]));}catch(_0x30aa46){_0x100cc3['stop']();const _0x1cc3c4=_0x30aa46 instanceof Error?_0x30aa46['message']:String(_0x30aa46);console[_0x54f87b(0x122)](a5_0x2c1082['red'](_0x54f87b(0x138)+_0x1cc3c4)),_0x3c2ed8['push']({'name':_0x4fed27['name'],'status':_0x54f87b(0x171),'reason':_0x1cc3c4,'timestamp':new Date()[_0x54f87b(0x18a)](),'duration_ms':0x0});}}}console[_0x54f87b(0x122)]();const _0x30e181=Date[_0x54f87b(0x1a5)]()-_0x9151f2,_0x5525e8=_0x3c2ed8[_0x54f87b(0x115)](_0xd176e0=>_0xd176e0[_0x54f87b(0x16c)]==='PASS')[_0x54f87b(0x13a)],_0x2577b7=_0x3c2ed8[_0x54f87b(0x115)](_0x445f5f=>_0x445f5f[_0x54f87b(0x16c)]===_0x54f87b(0x12f))['length'],_0x3c4bad=_0x3c2ed8[_0x54f87b(0x115)](_0x5269a3=>_0x5269a3[_0x54f87b(0x16c)]===_0x54f87b(0x171))['length'];console[_0x54f87b(0x122)]('━'[_0x54f87b(0x120)](0x3c)),console['log'](_0x54f87b(0x194)),console[_0x54f87b(0x122)]('━'[_0x54f87b(0x120)](0x3c)),console[_0x54f87b(0x122)](_0x54f87b(0x16d)+_0x3c2ed8['length']),console[_0x54f87b(0x122)](_0x54f87b(0x136)+a5_0x2c1082[_0x54f87b(0x14e)](_0x5525e8)),console[_0x54f87b(0x122)]('Failed:\x20\x20\x20'+a5_0x2c1082[_0x54f87b(0x12d)](_0x2577b7));_0x3c4bad>0x0&&console[_0x54f87b(0x122)](_0x54f87b(0x158)+a5_0x2c1082[_0x54f87b(0x12d)](_0x3c4bad));console[_0x54f87b(0x122)](_0x54f87b(0x125)+formatElapsed(_0x30e181)),console['log']('━'[_0x54f87b(0x120)](0x3c));const _0x146db8={'summary':{'total':_0x3c2ed8[_0x54f87b(0x13a)],'passed':_0x5525e8,'failed':_0x2577b7,'errors':_0x3c4bad>0x0?_0x3c4bad:undefined,'duration_ms':_0x30e181},'tests':_0x3c2ed8,'agent':{'project':_0x4f4067[_0x54f87b(0x140)],'name':_0x4f4067[_0x54f87b(0x14c)],'site':_0x4b3cfc},'timestamp':new Date(_0x9151f2)[_0x54f87b(0x18a)]()};if(_0x14d6e7!==_0x54f87b(0x15b)||_0x187442){const _0x4b5cc5=formatResults(_0x146db8,_0x14d6e7);if(_0x187442)try{a5_0x17d003[_0x54f87b(0x1a1)](_0x187442,_0x4b5cc5,_0x54f87b(0x1a6)),console['log'](),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x166)](_0x54f87b(0x189)+_0x187442));}catch(_0x26eea2){return console[_0x54f87b(0x122)](),console[_0x54f87b(0x122)](a5_0x2c1082[_0x54f87b(0x12d)]('Error\x20writing\x20output\x20file:\x20'+_0x26eea2)),0x1;}else console[_0x54f87b(0x122)](),console[_0x54f87b(0x122)](_0x4b5cc5);}const _0x32c0ce=_0x3c2ed8[_0x54f87b(0x115)](_0x358fb2=>_0x358fb2[_0x54f87b(0x16c)]!==_0x54f87b(0x192));return _0x32c0ce[_0x54f87b(0x13a)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x44e191=a6_0x5e6c;(function(_0x2fca3a,_0x33d60a){const _0x3b3a10=a6_0x5e6c,_0x44bded=_0x2fca3a();while(!![]){try{const _0xfd52e=parseInt(_0x3b3a10(0x1ce))/0x1+parseInt(_0x3b3a10(0x1d8))/0x2+parseInt(_0x3b3a10(0x200))/0x3*(parseInt(_0x3b3a10(0x1f8))/0x4)+parseInt(_0x3b3a10(0x1f3))/0x5+-parseInt(_0x3b3a10(0x1de))/0x6*(parseInt(_0x3b3a10(0x1c6))/0x7)+parseInt(_0x3b3a10(0x1d1))/0x8+-parseInt(_0x3b3a10(0x1d7))/0x9;if(_0xfd52e===_0x33d60a)break;else _0x44bded['push'](_0x44bded['shift']());}catch(_0x43a4e4){_0x44bded['push'](_0x44bded['shift']());}}}(a6_0xcdc7,0x55543));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';function a6_0x5e6c(_0x1e559f,_0x516984){_0x1e559f=_0x1e559f-0x1bd;const _0xcdc79b=a6_0xcdc7();let _0x5e6c67=_0xcdc79b[_0x1e559f];return _0x5e6c67;}function a6_0xcdc7(){const _0x72b574=['body','noColor','PATCH','2611195tAZHHy','validate','set-cookie','Results\x20saved\x20to\x20','keys','611516mWoBGY','status','entries','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','proxy-authorization','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','readBodyFromFile','\x0aStack\x20trace:\x0a','12OadwzY','workflow','type','message','headers','Invalid\x20header\x20format:\x20\x22','join','set-cookie2','execute','includes','api','output','llm-proxy','8827SWPNXA','toLowerCase','Invalid\x20HTTP\x20method:\x20','toUpperCase','cookie','cdp','length','trim','555622BeZxnf','data','.\x20Valid\x20types:\x20','4728832gywHcq','verbose','description','name','log','Header\x20key\x20cannot\x20be\x20empty:\x20\x22','20355588rtamFY','769962POLPET','has','color','method','Invalid\x20API\x20type:\x20','GET','258aqbuwX','.\x20Valid\x20methods:\x20','error','substring','\x22.\x20','isArray','x-auth-token','site','file','x-trino-user','PUT','indexOf','header','authorization','cas','<\x20HTTP/1.1\x20','Error:\x20','stack'];a6_0xcdc7=function(){return _0x72b574;};return a6_0xcdc7();}const SENSITIVE_HEADERS=new Set([a6_0x44e191(0x1eb),a6_0x44e191(0x1fc),a6_0x44e191(0x1ca),a6_0x44e191(0x1f5),a6_0x44e191(0x1c0),'x-xsrf-token',a6_0x44e191(0x1e4),a6_0x44e191(0x1e7)]);function isSensitiveHeader(_0x331eda){const _0x39c0ae=a6_0x44e191;return SENSITIVE_HEADERS[_0x39c0ae(0x1d9)](_0x331eda[_0x39c0ae(0x1c7)]());}function parseHeader(_0x4ce5ce){const _0x207827=a6_0x44e191,_0x2dd940=_0x4ce5ce[_0x207827(0x1e9)](':');if(_0x2dd940===-0x1)throw new Error(_0x207827(0x1be)+_0x4ce5ce+_0x207827(0x1e2)+_0x207827(0x1fd));const _0x466b84=_0x4ce5ce[_0x207827(0x1e1)](0x0,_0x2dd940)['trim'](),_0x11a909=_0x4ce5ce['substring'](_0x2dd940+0x1)[_0x207827(0x1cd)]();if(!_0x466b84)throw new Error(_0x207827(0x1d6)+_0x4ce5ce+'\x22');return[_0x466b84,_0x11a909];}export class ApiCommand extends BaseCommand{[a6_0x44e191(0x1d4)]=a6_0x44e191(0x1c3);[a6_0x44e191(0x1d3)]='Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs';[a6_0x44e191(0x1f4)](_0x28f5f5){const _0x5ce1c3=a6_0x44e191,{args:_0x53e2b2,options:_0x27032c}=_0x28f5f5,_0x435ff8=_0x27032c;if(_0x53e2b2['length']===0x0)return _0x5ce1c3(0x1fb);const _0x131ac1=_0x53e2b2[0x0];if(!_0x131ac1['startsWith']('/'))return'Endpoint\x20must\x20start\x20with\x20/:\x20'+_0x131ac1;const _0x21d35f=_0x435ff8[_0x5ce1c3(0x1cf)],_0x2bde29=_0x435ff8[_0x5ce1c3(0x1e6)];if(_0x21d35f&&_0x2bde29)return'Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.';const _0x86259b=_0x435ff8[_0x5ce1c3(0x1db)]||_0x5ce1c3(0x1dd),_0x1fb5b3=['GET','POST',_0x5ce1c3(0x1e8),'DELETE',_0x5ce1c3(0x1f2)];if(!_0x1fb5b3[_0x5ce1c3(0x1c2)](_0x86259b[_0x5ce1c3(0x1c9)]()))return _0x5ce1c3(0x1c8)+_0x86259b+_0x5ce1c3(0x1df)+_0x1fb5b3['join'](',\x20');const _0x394b94=_0x435ff8[_0x5ce1c3(0x202)]||'td',_0x406a5b=['td',_0x5ce1c3(0x1cb),_0x5ce1c3(0x201),'trino','llm',_0x5ce1c3(0x1c5),_0x5ce1c3(0x1ec)];if(!_0x406a5b[_0x5ce1c3(0x1c2)](_0x394b94))return _0x5ce1c3(0x1dc)+_0x394b94+_0x5ce1c3(0x1d0)+_0x406a5b[_0x5ce1c3(0x1bf)](',\x20');return undefined;}async[a6_0x44e191(0x1c1)](_0x5d2800){const _0x306586=a6_0x44e191,{options:_0x256a5e,args:_0x5b2381,tdx:_0x2dd5f2}=_0x5d2800,_0x442580=_0x256a5e,_0x4ae888=_0x5b2381[0x0],_0x1e5289=(_0x442580[_0x306586(0x1db)]||_0x306586(0x1dd))[_0x306586(0x1c9)](),_0x400ba0=_0x442580[_0x306586(0x1cf)],_0x578964=_0x442580[_0x306586(0x1e6)],_0x19fbcc=_0x442580[_0x306586(0x1ea)],_0x9212e7=_0x442580[_0x306586(0x202)]||'td';try{const _0x28efca={};if(_0x19fbcc){const _0x4aeefa=Array[_0x306586(0x1e3)](_0x19fbcc)?_0x19fbcc:[_0x19fbcc];for(const _0x55df10 of _0x4aeefa){const [_0x5b2c06,_0x24c08d]=parseHeader(_0x55df10);_0x28efca[_0x5b2c06]=_0x24c08d;}}let _0x47cfe5;if(_0x400ba0)_0x47cfe5=_0x400ba0;else{if(_0x578964)try{_0x47cfe5=RawAPI[_0x306586(0x1fe)](_0x578964);}catch(_0x3afb71){return console['error']('Error:\x20'+(_0x3afb71 instanceof Error?_0x3afb71['message']:String(_0x3afb71))),0x1;}}const _0x4b8e05={'method':_0x1e5289,'apiType':_0x9212e7,'includeHeaders':_0x256a5e['verbose']};_0x47cfe5&&(_0x4b8e05[_0x306586(0x1f0)]=_0x47cfe5);Object[_0x306586(0x1f7)](_0x28efca)[_0x306586(0x1cc)]>0x0&&(_0x4b8e05[_0x306586(0x1bd)]=_0x28efca);if(_0x256a5e[_0x306586(0x1d2)]){const _0x14a12f=resolveSite(_0x256a5e[_0x306586(0x1e5)]),_0x1ac51e=getEndpoint(_0x14a12f,_0x9212e7),_0x120a4c=''+_0x1ac51e+_0x4ae888;console['error']('>\x20'+_0x1e5289+'\x20'+_0x120a4c);const _0x2ab458=getAuthHeaders(_0x14a12f),_0x305d40={..._0x2ab458,..._0x28efca};for(const [_0x32c3ae,_0x3458da]of Object[_0x306586(0x1fa)](_0x305d40)){!isSensitiveHeader(_0x32c3ae)&&console[_0x306586(0x1e0)]('>\x20'+_0x32c3ae+':\x20'+_0x3458da);}_0x47cfe5&&console[_0x306586(0x1e0)]('>'),console['error']('');}const _0x79b198=await _0x2dd5f2[_0x306586(0x1c3)]['request'](_0x4ae888,_0x4b8e05);if(_0x256a5e[_0x306586(0x1d2)]&&_0x79b198[_0x306586(0x1bd)]){console['error'](_0x306586(0x1ed)+_0x79b198[_0x306586(0x1f9)]);for(const [_0x3756b0,_0x4bea1e]of Object['entries'](_0x79b198[_0x306586(0x1bd)])){!isSensitiveHeader(_0x3756b0)&&console[_0x306586(0x1e0)]('<\x20'+_0x3756b0+':\x20'+_0x4bea1e);}console[_0x306586(0x1e0)]('');}const _0x9d9d51=Boolean(_0x256a5e[_0x306586(0x1c4)]),_0x442740={'color':_0x256a5e[_0x306586(0x1da)],'noColor':_0x256a5e[_0x306586(0x1f1)]||_0x9d9d51&&!_0x256a5e['color']},_0x58b7bb=colorizeJSON(_0x79b198[_0x306586(0x1cf)],_0x442740);return _0x256a5e[_0x306586(0x1c4)]?(writeFileSync(_0x256a5e[_0x306586(0x1c4)],_0x58b7bb),console[_0x306586(0x1e0)](_0x306586(0x1f6)+_0x256a5e[_0x306586(0x1c4)])):console[_0x306586(0x1d5)](_0x58b7bb),0x0;}catch(_0x4c550c){return _0x4c550c instanceof Error?(console[_0x306586(0x1e0)](_0x306586(0x1ee)+_0x4c550c[_0x306586(0x203)]),_0x256a5e[_0x306586(0x1d2)]&&_0x4c550c[_0x306586(0x1ef)]&&console[_0x306586(0x1e0)](_0x306586(0x1ff)+_0x4c550c[_0x306586(0x1ef)])):console[_0x306586(0x1e0)](_0x306586(0x1ee)+String(_0x4c550c)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a7_0x5084e4=a7_0x1e4a;(function(_0x272d0e,_0x34424f){const _0x2efc24=a7_0x1e4a,_0x2d108c=_0x272d0e();while(!![]){try{const _0x5ba8f7=parseInt(_0x2efc24(0x1cc))/0x1+parseInt(_0x2efc24(0x1b3))/0x2*(-parseInt(_0x2efc24(0x1b1))/0x3)+-parseInt(_0x2efc24(0x1c0))/0x4*(-parseInt(_0x2efc24(0x1e1))/0x5)+-parseInt(_0x2efc24(0x1af))/0x6*(parseInt(_0x2efc24(0x1bf))/0x7)+parseInt(_0x2efc24(0x1d9))/0x8*(-parseInt(_0x2efc24(0x1aa))/0x9)+parseInt(_0x2efc24(0x1a5))/0xa+parseInt(_0x2efc24(0x1df))/0xb*(parseInt(_0x2efc24(0x1b5))/0xc);if(_0x5ba8f7===_0x34424f)break;else _0x2d108c['push'](_0x2d108c['shift']());}catch(_0x4560e1){_0x2d108c['push'](_0x2d108c['shift']());}}}(a7_0x3e0c,0xda371));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';import{saveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';function a7_0x3e0c(){const _0x5c5a07=['jobs','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','tdx\x20profile:\x20','ERROR','last_name','✓\x20Authentication\x20successful\x0a','filter','231525yQtbQx','Setting\x20up\x20authentication\x20for\x20site:\x20','\x0aSetup\x20cancelled','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','us01','\x20(profile:\x20','auth:clear','red','No\x20credentials\x20found\x20in\x20keychain','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','Remove\x20API\x20key\x20from\x20system\x20keychain','OAuth\x20(browser\x20login)','apiKey','8hdXLIe','\x20\x20tdx','green','\x20--profile\x20','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','/app/mp/ak','11sKMNWn','select','70OMWIIz','\x20and\x20','bold','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','first_name','apikey','getUserInfo','all','\x20for\x20profile:\x20','trim','profile','Read\x20credential\x20from\x20keychain','Enter\x20your\x20TD\x20API\x20key:','join','Read\x20credential\x20from\x20','Setup\x20cancelled','yellow','method','Credential\x20type:\x20OAuth','\x20(site:\x20','✗\x20Validation\x20failed:\x20','description','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','17259100qbBwEd','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','API\x20key\x20cannot\x20be\x20empty','log','✓\x20Default\x20site\x20set\x20to\x20','2442006DthJuj','auth','Validating\x20API\x20key...','message','✓\x20Profile\x20\x27','9224382HVeJLg','Setup\x20API\x20key\x20authentication\x20interactively','298413iQFzoS','warn','18FEwSnj','\x20removed\x20from\x20keychain','15893880KhQozK','execute','API\x20key','oauth','site','email','status','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','password','System\x20keychain\x20is\x20not\x20available','7piSfsl','90244jaLhxm','error','API\x20Key','logLevel','Name:\x20'];a7_0x3e0c=function(){return _0x5c5a07;};return a7_0x3e0c();}import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{deleteOAuthTokens}from'../core/oauth-keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import{isOAuthSupported}from'../core/oauth.js';import{runOAuthLoginFlow}from'./auth-login-command.js';function a7_0x1e4a(_0x20c5ba,_0x25acf8){_0x20c5ba=_0x20c5ba-0x192;const _0x3e0cd4=a7_0x3e0c();let _0x1e4aa4=_0x3e0cd4[_0x20c5ba];return _0x1e4aa4;}import{promptSiteSelection}from'../core/constants.js';import a7_0x2ec76a from'prompts';import{HTTPClientError}from'../sdk/client/http-client.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a7_0x4648be from'chalk';export class AuthSetupCommand extends BaseCommand{['name']='auth:setup';[a7_0x5084e4(0x1a3)]=a7_0x5084e4(0x1b0);async[a7_0x5084e4(0x1b6)](_0x39f033){const _0xd32f6=a7_0x5084e4,{options:_0x10c6f9}=_0x39f033,_0x3be784=_0x10c6f9[_0xd32f6(0x198)];console[_0xd32f6(0x1a8)](a7_0x4648be[_0xd32f6(0x1e3)]('tdx:\x20auth\x20setup'));const _0x4025d7=_0x10c6f9[_0xd32f6(0x1b9)]||_0xd32f6(0x1d0),_0x376180=await promptSiteSelection(_0x4025d7,_0x3be784,_0xd32f6(0x19d));if(!_0x376180)return 0x1;const _0x1cbc55=resolveSite(_0x376180);if(isOAuthSupported(_0x1cbc55)){const _0x1b4ab2=await a7_0x2ec76a({'type':_0xd32f6(0x1e0),'name':_0xd32f6(0x19f),'message':'Choose\x20authentication\x20method:','choices':[{'title':_0xd32f6(0x1d7),'value':_0xd32f6(0x1b8)},{'title':_0xd32f6(0x1c2),'value':_0xd32f6(0x193)}]});if(!_0x1b4ab2[_0xd32f6(0x19f)])return console['log'](_0xd32f6(0x1ce)),0x1;if(_0x1b4ab2[_0xd32f6(0x19f)]===_0xd32f6(0x1b8))return await runOAuthLoginFlow(_0x1cbc55,_0x3be784,_0x10c6f9['logLevel']??LogLevel['ERROR']),0x0;}console[_0xd32f6(0x1a8)](_0xd32f6(0x1cd)+_0x1cbc55),console['log']('You\x20can\x20find\x20your\x20API\x20key\x20at:'),console[_0xd32f6(0x1a8)]('\x20\x20'+getConsoleUrl(_0x1cbc55,_0xd32f6(0x1de)));const _0x3997ca=await a7_0x2ec76a({'type':_0xd32f6(0x1bd),'name':_0xd32f6(0x1d8),'message':_0xd32f6(0x19a),'validate':_0x409984=>{const _0x3fd79b=_0xd32f6;if(!_0x409984||!_0x409984['trim']())return _0x3fd79b(0x1a7);return!![];}});if(!_0x3997ca['apiKey'])return console[_0xd32f6(0x1a8)](_0xd32f6(0x1ce)),0x1;const _0x1b933c=_0x3997ca['apiKey'];console[_0xd32f6(0x1a8)](_0xd32f6(0x1ac));try{const _0x4db89b=TDX['create']({'site':_0x1cbc55,'apiKey':_0x1b933c[_0xd32f6(0x197)](),'logLevel':_0x10c6f9[_0xd32f6(0x1c3)]??LogLevel[_0xd32f6(0x1c8)]}),_0x250db7=await _0x4db89b[_0xd32f6(0x1c5)][_0xd32f6(0x194)]();console['log'](_0xd32f6(0x1a4)+_0x250db7[_0xd32f6(0x1ba)]+')');const _0x4de807=await isKeychainAvailable();_0x4de807?(await saveAPIKeyAsync(_0x1b933c[_0xd32f6(0x197)](),_0x1cbc55,_0x3be784),console[_0xd32f6(0x1a8)](_0xd32f6(0x1cf)+(_0x3be784?'\x20(profile:\x20'+_0x3be784+')':''))):(console[_0xd32f6(0x1b2)](a7_0x4648be[_0xd32f6(0x19e)](_0xd32f6(0x1dd))),console[_0xd32f6(0x1b2)](a7_0x4648be[_0xd32f6(0x19e)](_0xd32f6(0x1e5))));if(_0x3be784){const _0x435368={'site':_0x1cbc55};saveProfileToUserConfig(_0x3be784,_0x435368),console['log'](_0xd32f6(0x1ae)+_0x3be784+'\x27\x20registered');}else saveDefaultSiteToUserConfig(_0x1cbc55),console[_0xd32f6(0x1a8)](_0xd32f6(0x1a9)+_0x1cbc55);const _0x4f080b=_0x3be784?_0xd32f6(0x1dc)+_0x3be784:'';return console[_0xd32f6(0x1a8)](),console[_0xd32f6(0x1a8)](_0xd32f6(0x1e4)),console[_0xd32f6(0x1a8)](_0xd32f6(0x1da)+_0x4f080b+_0xd32f6(0x1d5)),console[_0xd32f6(0x1a8)]('\x20\x20tdx'+_0x4f080b+_0xd32f6(0x1bc)),0x0;}catch(_0x3b0824){if(_0x3b0824 instanceof HTTPClientError&&_0x3b0824[_0xd32f6(0x1bb)]===0x191)return printAuthError(_0x3b0824),0x1;return console[_0xd32f6(0x1c1)](a7_0x4648be[_0xd32f6(0x1d3)](_0xd32f6(0x1a2)+(_0x3b0824 instanceof Error?_0x3b0824[_0xd32f6(0x1ad)]:String(_0x3b0824)))),console[_0xd32f6(0x1c1)](_0xd32f6(0x1c6)),0x1;}}}export class AuthStatusCommand extends BaseCommand{['name']=a7_0x5084e4(0x1ab);['description']=a7_0x5084e4(0x1a6);async[a7_0x5084e4(0x1b6)](_0x11263e){const _0x5357d0=a7_0x5084e4,{options:_0x444e1c,tdx:_0x32b602}=_0x11263e,_0x5a4249=_0x444e1c[_0x5357d0(0x1b9)],_0x39640b=_0x444e1c[_0x5357d0(0x198)],_0x153ca8=_0x39640b?_0x39640b:'N/A';console['log'](_0x5357d0(0x1c7)+_0x153ca8+_0x5357d0(0x1a1)+_0x5a4249+')');const _0x1e545d=await getOAuthTokens(_0x39640b);if(_0x1e545d)console[_0x5357d0(0x1a8)](_0x5357d0(0x1a0)),console['log'](_0x5357d0(0x199)+(_0x39640b?_0x5357d0(0x1d1)+_0x39640b+')':''));else{const _0xdabc8f=await resolveAPIKeyAsync(_0x5a4249,_0x39640b);if(_0xdabc8f){const {source:_0xbf960c,isDeprecated:_0x527cd9}=_0xdabc8f,_0x3af36b=_0x5357d0(0x19c)+_0xbf960c;console[_0x5357d0(0x1a8)](_0x527cd9?a7_0x4648be['yellow'](_0x3af36b):_0x3af36b);}else console[_0x5357d0(0x1a8)](a7_0x4648be[_0x5357d0(0x19e)]('No\x20credential\x20found'));}try{const _0x43891f=await _0x32b602[_0x5357d0(0x1c5)][_0x5357d0(0x194)]();return console[_0x5357d0(0x1a8)](a7_0x4648be[_0x5357d0(0x1db)](_0x5357d0(0x1ca))),console['log']('User:\x20'+_0x43891f[_0x5357d0(0x1ba)]),(_0x43891f[_0x5357d0(0x192)]||_0x43891f[_0x5357d0(0x1c9)])&&console[_0x5357d0(0x1a8)](_0x5357d0(0x1c4)+[_0x43891f[_0x5357d0(0x192)],_0x43891f[_0x5357d0(0x1c9)]][_0x5357d0(0x1cb)](Boolean)[_0x5357d0(0x19b)]('\x20')),0x0;}catch(_0x93c6fe){return _0x93c6fe instanceof HTTPClientError&&_0x93c6fe[_0x5357d0(0x1bb)]===0x191?printAuthError(_0x93c6fe,!![],_0x39640b):console[_0x5357d0(0x1c1)](a7_0x4648be[_0x5357d0(0x1d3)](_0x5357d0(0x1a2)+(_0x93c6fe instanceof Error?_0x93c6fe['message']:String(_0x93c6fe)))),0x1;}}}export class AuthClearCommand extends BaseCommand{['name']=a7_0x5084e4(0x1d2);[a7_0x5084e4(0x1a3)]=a7_0x5084e4(0x1d6);async[a7_0x5084e4(0x1b6)](_0x54d162){const _0xd3acbb=a7_0x5084e4,{options:_0x2f13d4}=_0x54d162,_0x329624=_0x2f13d4[_0xd3acbb(0x198)];console[_0xd3acbb(0x1a8)](a7_0x4648be[_0xd3acbb(0x1e3)]('tdx:\x20auth\x20clear'));const _0x25d624=await isKeychainAvailable();if(!_0x25d624)return console[_0xd3acbb(0x1c1)](a7_0x4648be[_0xd3acbb(0x1d3)](_0xd3acbb(0x1be))),0x1;const [_0x12d76a,_0x220a20]=await Promise[_0xd3acbb(0x195)]([deleteKeychainAPIKey(_0x329624),deleteOAuthTokens(_0x329624)]);if(_0x12d76a||_0x220a20){clearCredentialCache();const _0xe1c51c=[_0x12d76a&&_0xd3acbb(0x1b7),_0x220a20&&'OAuth\x20tokens'][_0xd3acbb(0x1cb)](Boolean)[_0xd3acbb(0x19b)](_0xd3acbb(0x1e2));return console['log']('✓\x20'+_0xe1c51c+_0xd3acbb(0x1b4)+(_0x329624?_0xd3acbb(0x1d1)+_0x329624+')':'')),0x0;}else return console[_0xd3acbb(0x1a8)](_0xd3acbb(0x1d4)+(_0x329624?_0xd3acbb(0x196)+_0x329624:'')),0x1;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x59e4bf=a8_0xba82;function a8_0x570c(){const _0x51ac03=['Waiting\x20for\x20authorization\x20(timeout:\x202\x20minutes)...','Login\x20via\x20OAuth\x20(opens\x20browser)','bold','jobs','79389aVducB','/oauth/authorize','Opening\x20browser\x20for\x20authentication...','519726oTIUTE','33uZCqIY','logLevel','1323jJIWav','access_token','\x20(profile:\x20','execute','\x20\x20tdx','email','✓\x20Profile\x20\x27','5176egBolr','green','auth:login','tdx:\x20auth\x20login','24kIgvfR','2398908sYJjfi','Validating\x20OAuth\x20tokens...','430JyIcNX','log','getUserInfo','15fJvNpG','us01','2428316TebJWp','name','✓\x20Authentication\x20successful\x20(User:\x20','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','17264YYbQkm','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','ERROR','OAuth\x20login\x20is\x20not\x20yet\x20available\x20for\x20site:\x20','profile','174250IJKmAo','\x27\x20registered','create','description'];a8_0x570c=function(){return _0x51ac03;};return a8_0x570c();}(function(_0x253768,_0x511cf1){const _0x5a4e96=a8_0xba82,_0x32f976=_0x253768();while(!![]){try{const _0x1644da=parseInt(_0x5a4e96(0x1df))/0x1+parseInt(_0x5a4e96(0x1f4))/0x2*(-parseInt(_0x5a4e96(0x1f8))/0x3)+parseInt(_0x5a4e96(0x200))/0x4+parseInt(_0x5a4e96(0x1fe))/0x5*(-parseInt(_0x5a4e96(0x1ea))/0x6)+parseInt(_0x5a4e96(0x1ed))/0x7*(-parseInt(_0x5a4e96(0x1da))/0x8)+parseInt(_0x5a4e96(0x1e7))/0x9*(-parseInt(_0x5a4e96(0x1fb))/0xa)+-parseInt(_0x5a4e96(0x1eb))/0xb*(-parseInt(_0x5a4e96(0x1f9))/0xc);if(_0x1644da===_0x511cf1)break;else _0x32f976['push'](_0x32f976['shift']());}catch(_0x17e982){_0x32f976['push'](_0x32f976['shift']());}}}(a8_0x570c,0x4c7ec));import{BaseCommand}from'./command.js';import{resolveSite}from'../core/config.js';import{saveProfileToUserConfig}from'../core/profile.js';function a8_0xba82(_0x5ebbdf,_0x375b06){_0x5ebbdf=_0x5ebbdf-0x1d8;const _0x570ca5=a8_0x570c();let _0xba82bd=_0x570ca5[_0x5ebbdf];return _0xba82bd;}import{getConsoleUrl}from'../sdk/client/endpoints.js';import{isKeychainAvailable}from'../core/keychain.js';import{saveOAuthTokens}from'../core/oauth-keychain.js';import{startOAuthFlow,isOAuthSupported}from'../core/oauth.js';import{promptSiteSelection}from'../core/constants.js';import{TDX}from'../sdk/index.js';import{LogLevel}from'../utils/tdx-logger.js';import a8_0x18b646 from'chalk';export async function runOAuthLoginFlow(_0x3447a6,_0x46d9e3,_0x55fc6e){const _0x48eee8=a8_0xba82;if(!isOAuthSupported(_0x3447a6))throw new Error(_0x48eee8(0x1dd)+_0x3447a6+'.\x20'+'OAuth\x20is\x20currently\x20supported\x20on\x20dev-us01\x20and\x20dev-eu01\x20only.\x20'+'Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.');const _0x281505=await isKeychainAvailable();if(!_0x281505)throw new Error('System\x20keychain\x20is\x20not\x20available.\x20OAuth\x20tokens\x20cannot\x20be\x20saved.\x20'+'Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.');const _0x2b38fc=getConsoleUrl(_0x3447a6);console[_0x48eee8(0x1fc)](_0x48eee8(0x1e9)),console[_0x48eee8(0x1fc)]('\x20\x20'+_0x2b38fc+_0x48eee8(0x1e8)),console[_0x48eee8(0x1fc)](_0x48eee8(0x1e3));const _0x1f2b7a=await startOAuthFlow(_0x3447a6);console[_0x48eee8(0x1fc)](_0x48eee8(0x1fa));const _0x5d709b=TDX[_0x48eee8(0x1e1)]({'site':_0x3447a6,'accessToken':_0x1f2b7a[_0x48eee8(0x1ee)],'logLevel':_0x55fc6e??LogLevel[_0x48eee8(0x1dc)]}),_0x3e398d=await _0x5d709b[_0x48eee8(0x1e6)][_0x48eee8(0x1fd)]();console[_0x48eee8(0x1fc)](a8_0x18b646[_0x48eee8(0x1f5)](_0x48eee8(0x1d8)+_0x3e398d[_0x48eee8(0x1f2)]+')')),await saveOAuthTokens(_0x1f2b7a,_0x46d9e3),console[_0x48eee8(0x1fc)]('✓\x20OAuth\x20tokens\x20saved\x20to\x20system\x20keychain'+(_0x46d9e3?_0x48eee8(0x1ef)+_0x46d9e3+')':''));if(_0x46d9e3){const _0x151440={'site':_0x3447a6};saveProfileToUserConfig(_0x46d9e3,_0x151440),console['log'](_0x48eee8(0x1f3)+_0x46d9e3+_0x48eee8(0x1e0));}const _0x57c7c2=_0x46d9e3?'\x20--profile\x20'+_0x46d9e3:'';console['log'](),console[_0x48eee8(0x1fc)](_0x48eee8(0x1d9)),console[_0x48eee8(0x1fc)](_0x48eee8(0x1f1)+_0x57c7c2+'\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication'),console['log'](_0x48eee8(0x1f1)+_0x57c7c2+_0x48eee8(0x1db));}export class AuthLoginCommand extends BaseCommand{[a8_0x59e4bf(0x201)]=a8_0x59e4bf(0x1f6);[a8_0x59e4bf(0x1e2)]=a8_0x59e4bf(0x1e4);async[a8_0x59e4bf(0x1f0)](_0x4bb922){const _0x1c46f3=a8_0x59e4bf,{options:_0x5844f6}=_0x4bb922,_0xee5c48=_0x5844f6[_0x1c46f3(0x1de)];console[_0x1c46f3(0x1fc)](a8_0x18b646[_0x1c46f3(0x1e5)](_0x1c46f3(0x1f7)));const _0x279780=_0x5844f6['site']||_0x1c46f3(0x1ff),_0x388017=await promptSiteSelection(_0x279780,_0xee5c48,'Login\x20cancelled');if(!_0x388017)return 0x1;const _0xa49a3c=resolveSite(_0x388017);return console[_0x1c46f3(0x1fc)]('Authenticating\x20via\x20OAuth\x20for\x20site:\x20'+_0xa49a3c),await runOAuthLoginFlow(_0xa49a3c,_0xee5c48,_0x5844f6[_0x1c46f3(0x1ec)]??LogLevel[_0x1c46f3(0x1dc)]),0x0;}}
|