@treasuredata/tdx 0.28.3 → 0.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/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/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.d.ts.map +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-utils.js.map +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-validator.js.map +1 -1
- package/dist/sdk/segment/journey-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/journey-yaml.js.map +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/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a3_0x1f56(){const _0x30c5c4=['name','resolveParentId','Listing\x20activations\x20for\x20segment\x20\x27','Resolving\x20parent\x20segment\x20\x27','resolveSegmentId','Parent\x20name:\x20','4477476CTfNkW','Child\x20name:\x20','verbose','9hwZQNT','execute','128378fBfIFa','Resolved\x20child\x20ID:\x20','length','11iXpJSP','listActivations','List\x20activations\x20for\x20a\x20segment','963AUYSos','error','Error:\x20','cause','description','5cruEtV','✔\x20Found\x20','Resolved\x20parent\x20ID:\x20','Resolving\x20child\x20segment\x20\x27','10201416UISrjE','1662720gOkwds','data','9344fmxqsY','83932qwOCiS','\x27...','547344crUPOL','segment','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','13ecFdrK'];a3_0x1f56=function(){return _0x30c5c4;};return a3_0x1f56();}const a3_0x396d41=a3_0x5a63;(function(_0x104fc1,_0x2b28f8){const _0x447083=a3_0x5a63,_0x302b8f=_0x104fc1();while(!![]){try{const _0x49bcb0=-parseInt(_0x447083(0x10b))/0x1*(-parseInt(_0x447083(0xf3))/0x2)+-parseInt(_0x447083(0xf1))/0x3*(parseInt(_0x447083(0x106))/0x4)+parseInt(_0x447083(0xfe))/0x5*(parseInt(_0x447083(0xee))/0x6)+parseInt(_0x447083(0x108))/0x7+-parseInt(_0x447083(0x105))/0x8*(parseInt(_0x447083(0xf9))/0x9)+-parseInt(_0x447083(0x103))/0xa+parseInt(_0x447083(0xf6))/0xb*(-parseInt(_0x447083(0x102))/0xc);if(_0x49bcb0===_0x2b28f8)break;else _0x302b8f['push'](_0x302b8f['shift']());}catch(_0x8dc87b){_0x302b8f['push'](_0x302b8f['shift']());}}}(a3_0x1f56,0x6efb4));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';function a3_0x5a63(_0x5865ad,_0x32f74c){_0x5865ad=_0x5865ad-0xe8;const _0x1f56e1=a3_0x1f56();let _0x5a631d=_0x1f56e1[_0x5865ad];return _0x5a631d;}import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0x396d41(0xe8)]='activations';[a3_0x396d41(0xfd)]=a3_0x396d41(0xf8);async[a3_0x396d41(0xf2)](_0x5c1bb5){const _0xcdbdc7=a3_0x396d41,{options:_0x3f612f,args:_0x1b6348,tdx:_0x5e0db2}=_0x5c1bb5;if(_0x1b6348[_0xcdbdc7(0xf5)]===0x0)return console['error']('Error:\x20Segment\x20name\x20is\x20required'),console[_0xcdbdc7(0xfa)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;try{const {parentId:_0xcc8043,childId:_0x729601}=parseSegmentRef(_0x1b6348[0x0]);if(!_0x729601)return console['error'](_0xcdbdc7(0x10a)),console[_0xcdbdc7(0xfa)]('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;_0x3f612f[_0xcdbdc7(0xf0)]&&(console['error']('Site:\x20'+_0x3f612f['site']),console[_0xcdbdc7(0xfa)](_0xcdbdc7(0xed)+_0xcc8043),console[_0xcdbdc7(0xfa)](_0xcdbdc7(0xef)+_0x729601));const _0x4968cd=await withSpinner(_0xcdbdc7(0xeb)+_0xcc8043+'\x27...',()=>_0x5e0db2['segment'][_0xcdbdc7(0xe9)](_0xcc8043),{'verbose':_0x3f612f[_0xcdbdc7(0xf0)]}),_0x3e0088=_0x4968cd[_0xcdbdc7(0x104)];_0x3f612f[_0xcdbdc7(0xf0)]&&console[_0xcdbdc7(0xfa)](_0xcdbdc7(0x100)+_0x3e0088);const _0x46df3b=await withSpinner(_0xcdbdc7(0x101)+_0x729601+'\x27...',()=>_0x5e0db2['segment'][_0xcdbdc7(0xec)](_0x3e0088,_0x729601),{'verbose':_0x3f612f[_0xcdbdc7(0xf0)]}),_0x543ec4=_0x46df3b[_0xcdbdc7(0x104)];_0x3f612f[_0xcdbdc7(0xf0)]&&console[_0xcdbdc7(0xfa)](_0xcdbdc7(0xf4)+_0x543ec4);const _0x12bda0=await withSpinner(_0xcdbdc7(0xea)+_0x729601+_0xcdbdc7(0x107),()=>_0x5e0db2[_0xcdbdc7(0x109)][_0xcdbdc7(0xf7)](_0x3e0088,_0x543ec4),{'verbose':_0x3f612f['verbose']}),_0x31a825=_0x12bda0[_0xcdbdc7(0x104)];return console[_0xcdbdc7(0xfa)](_0xcdbdc7(0xff)+_0x31a825['length']+'\x20activation'+(_0x31a825['length']!==0x1?'s':'')),await handleSDKOutput(_0x31a825,_0x3f612f),0x0;}catch(_0x3ba6e9){if(_0x3ba6e9 instanceof SDKError)return console[_0xcdbdc7(0xfa)](_0xcdbdc7(0xfb)+_0x3ba6e9['message']),_0x3ba6e9[_0xcdbdc7(0xfc)]&&console[_0xcdbdc7(0xfa)]('\x20\x20Cause:\x20'+_0x3ba6e9['cause']),0x1;throw _0x3ba6e9;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4_0x4ce58a=a4_0x5ca6;(function(_0x3a7d8a,_0xf50d09){const _0x7ae177=a4_0x5ca6,_0x3566fa=_0x3a7d8a();while(!![]){try{const _0x4c22e8=-parseInt(_0x7ae177(0x217))/0x1*(-parseInt(_0x7ae177(0x23b))/0x2)+-parseInt(_0x7ae177(0x214))/0x3*(-parseInt(_0x7ae177(0x25d))/0x4)+parseInt(_0x7ae177(0x246))/0x5+parseInt(_0x7ae177(0x21b))/0x6*(parseInt(_0x7ae177(0x235))/0x7)+parseInt(_0x7ae177(0x286))/0x8+-parseInt(_0x7ae177(0x21e))/0x9+-parseInt(_0x7ae177(0x20c))/0xa*(parseInt(_0x7ae177(0x270))/0xb);if(_0x4c22e8===_0xf50d09)break;else _0x3566fa['push'](_0x3566fa['shift']());}catch(_0x154910){_0x3566fa['push'](_0x3566fa['shift']());}}}(a4_0x223f,0x78cc3));import a4_0x4fd2b2 from'chalk';import a4_0x133c9b from'path';function a4_0x5ca6(_0x24aeab,_0x47f60a){_0x24aeab=_0x24aeab-0x1d8;const _0x223fc8=a4_0x223f();let _0x5ca697=_0x223fc8[_0x24aeab];return _0x5ca697;}import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x2e4d63){const _0x3eacad=a4_0x5ca6,_0x5ed6fa=[];if(_0x2e4d63['total']!==undefined)_0x5ed6fa['push'](_0x2e4d63[_0x3eacad(0x1db)]+_0x3eacad(0x274));if(_0x2e4d63[_0x3eacad(0x251)]!==undefined&&_0x2e4d63[_0x3eacad(0x251)]>0x0)_0x5ed6fa[_0x3eacad(0x24f)](a4_0x4fd2b2[_0x3eacad(0x261)](_0x2e4d63['new']+_0x3eacad(0x203)));if(_0x2e4d63['created']!==undefined&&_0x2e4d63[_0x3eacad(0x227)]>0x0)_0x5ed6fa[_0x3eacad(0x24f)](a4_0x4fd2b2[_0x3eacad(0x261)](_0x2e4d63[_0x3eacad(0x227)]+_0x3eacad(0x1f8)));if(_0x2e4d63[_0x3eacad(0x1de)]!==undefined&&_0x2e4d63[_0x3eacad(0x1de)]>0x0)_0x5ed6fa[_0x3eacad(0x24f)](a4_0x4fd2b2[_0x3eacad(0x27a)](_0x2e4d63['updated']+'\x20updated'));if(_0x2e4d63['unchanged']!==undefined&&_0x2e4d63[_0x3eacad(0x283)]>0x0)_0x5ed6fa[_0x3eacad(0x24f)](a4_0x4fd2b2['gray'](_0x2e4d63[_0x3eacad(0x283)]+_0x3eacad(0x226)));if(_0x2e4d63[_0x3eacad(0x229)]!==undefined&&_0x2e4d63['errors']>0x0)_0x5ed6fa[_0x3eacad(0x24f)](a4_0x4fd2b2[_0x3eacad(0x267)](_0x2e4d63['errors']+'\x20errors'));return _0x5ed6fa[_0x3eacad(0x211)](',\x20');}function displayDiffs(_0x19cdd8,_0x41e888,_0x5a6aa8,_0x540fb4,_0x94f160,_0x439020,_0x53bd63){const _0xa90bac=a4_0x5ca6;for(const _0x2f3632 of _0x19cdd8){if(_0x2f3632[_0xa90bac(0x237)]){const _0x188d25=_0x2f3632['agentName']||_0x2f3632[_0xa90bac(0x208)];console[_0xa90bac(0x1f6)](_0xa90bac(0x284)+_0x188d25+'\x27:'),console[_0xa90bac(0x1f6)]('─'[_0xa90bac(0x1fd)](0x3c)),console[_0xa90bac(0x1f6)](_0x2f3632[_0xa90bac(0x237)]),console[_0xa90bac(0x1f6)]('─'['repeat'](0x3c));}}for(const _0x32a565 of _0x41e888){_0x32a565['diff']&&(console[_0xa90bac(0x1f6)](_0xa90bac(0x1df)+_0x32a565[_0xa90bac(0x208)]+'\x27:'),console[_0xa90bac(0x1f6)]('─'['repeat'](0x3c)),console[_0xa90bac(0x1f6)](_0x32a565['diff']),console[_0xa90bac(0x1f6)]('─'[_0xa90bac(0x1fd)](0x3c)));}for(const _0x4a2101 of _0x5a6aa8){_0x4a2101[_0xa90bac(0x237)]&&(console[_0xa90bac(0x1f6)](_0xa90bac(0x288)+_0x4a2101[_0xa90bac(0x208)]+'\x27:'),console[_0xa90bac(0x1f6)]('─'[_0xa90bac(0x1fd)](0x3c)),console[_0xa90bac(0x1f6)](_0x4a2101['diff']),console[_0xa90bac(0x1f6)]('─'[_0xa90bac(0x1fd)](0x3c)));}for(const _0x1cb433 of _0x540fb4){_0x1cb433[_0xa90bac(0x237)]&&(console['log']('\x0aChanges\x20to\x20prompt\x20\x27'+_0x1cb433[_0xa90bac(0x208)]+'\x27:'),console['log']('─'['repeat'](0x3c)),console['log'](_0x1cb433[_0xa90bac(0x237)]),console[_0xa90bac(0x1f6)]('─'[_0xa90bac(0x1fd)](0x3c)));}for(const _0x3275c3 of _0x94f160){_0x3275c3[_0xa90bac(0x237)]&&(console[_0xa90bac(0x1f6)](_0xa90bac(0x218)+_0x3275c3[_0xa90bac(0x208)]+'\x27:'),console[_0xa90bac(0x1f6)]('─'[_0xa90bac(0x1fd)](0x3c)),console['log'](_0x3275c3['diff']),console[_0xa90bac(0x1f6)]('─'['repeat'](0x3c)));}for(const _0x4512d7 of _0x439020){_0x4512d7['diff']&&(console[_0xa90bac(0x1f6)]('\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27'+_0x4512d7[_0xa90bac(0x208)]+'\x27:'),console[_0xa90bac(0x1f6)]('─'[_0xa90bac(0x1fd)](0x3c)),console[_0xa90bac(0x1f6)](_0x4512d7[_0xa90bac(0x237)]),console['log']('─'['repeat'](0x3c)));}for(const _0x1549bc of _0x53bd63){_0x1549bc['diff']&&(console[_0xa90bac(0x1f6)](_0xa90bac(0x234)+_0x1549bc['name']+'\x27:'),console['log']('─'[_0xa90bac(0x1fd)](0x3c)),console[_0xa90bac(0x1f6)](_0x1549bc[_0xa90bac(0x237)]),console['log']('─'[_0xa90bac(0x1fd)](0x3c)));}}function a4_0x223f(){const _0x58e467=['11005510FZMgju','\x20\x20Text\x20Knowledge\x20Bases:\x20','counts','integrations','Cloning\x20\x22','join','Using\x20context\x20project:\x20','outputPath','1013106qzHxTs','\x20=\x20','parse','92tXzzMZ','\x0aChanges\x20to\x20integration\x20\x27','prompts','cwd','121794tYAbEN','\x20--name\x20','dryRun','5530491USFEXK','\x20\x20Prompts:\x20','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','agent:pull','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','found','Agent\x20pulled\x20successfully','error','\x20unchanged','created','gray','errors','Pushing\x20to\x20project...','Source:\x20','Agent:\x20','-\x20no\x20files\x20written','\x22\x20to\x20\x22','agent','\x20files?','llm_project','\x0aError:','textKnowledgeBases','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','147mReLTT','\x20\x20Agents:\x20','diff','New\x20project\x20name\x20is\x20required','No\x20tdx.json\x20found\x20in\x20','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)','6412NCyBcG','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x0aWrite\x20','\x22\x20from\x20project\x20\x22','\x0aPush\x20','MISSING_ARGUMENT','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','description','projectName','reason','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','4777330LqATGz','\x20changed','Pushing\x20agent\x20from\x20\x22','agent:push','\x0aProject\x20pushed\x20with\x20errors','\x22...','-\x20nothing\x20pushed','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','cloneProject','push','profile','new','agent:clone','Dry\x20run\x20-\x20no\x20changes\x20made','session','cwd-config','knowledgeBases','\x22\x20to\x20a\x20different\x20profile','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','sourceProjectName','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','Output\x20path:\x20','Chat:\x20','4KYXXzg','Analyzing\x20changes\x20to\x20push...','\x0a✔\x20Pulled\x20','context','green','Cannot\x20clone\x20from\x20context\x20project\x20\x22','dirname','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','Summary:','\x22\x20to\x20new\x20project\x20\x22','red','\x20\x20Integrations:\x20','\x20\x20Source:\x20','Agent\x20','\x20resources?','Analyzing\x20project\x20\x22','\x0aChanges:','\x20\x20tdx\x20agent\x20clone\x20agents/','\x20\x20Experimental\x20Artifacts:\x20','11yCRAGQ','\x20\x20Target:\x20','agentName','Failed\x20to\x20push\x20agent:\x20','\x20total','dim','projectId','isNew','\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','\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','yellow','\x0a✔\x20Pushed\x20','Cancelled','newProjectName','\x20resources\x20to\x20\x27','experimentalKnowledgeBases','yes','action','llm','unchanged','\x0aChanges\x20to\x20agent\x20\x27','pushProject','1563504LhvAGE','Using\x20project\x20from\x20context:\x20','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','pullProject','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','force','Project\x20cloned\x20with\x20errors','Would\x20push\x20agent:\x20','\x20\x20Knowledge\x20Bases:\x20','tdx.json','\x22:\x20','message','arg-dir','\x20\x20Knowledge\x20Base\x20\x22','New\x20project:\x20','Project\x20cloned\x20successfully','Output:\x20','\x20\x20Integration\x20\x22','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','total','Errors:','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','updated','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','cyan','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','\x20successfully','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','llmProject','\x20|\x20','<new-name>','newProjectId','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','New\x20project\x20ID:\x20','pushAgent','INVALID_ARGUMENT','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','output','agents','\x20--profile\x20','Using\x20project:\x20','execute','\x20\x20Agent\x20\x22','Dry\x20run\x20-\x20no\x20files\x20written','Using\x20project\x20from\x20','\x27\x20to\x20create\x20the\x20folder\x20structure.','log','\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','\x20created','\x0aPull\x20summary\x20for\x20\x27','Clone\x20\x22','✔\x20Context\x20set:\x20','source','repeat','\x20\x20Prompt\x20\x22','agentId','no_context','Using\x20local\x20project:\x20','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','\x20new','agent.yml','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','experimentalArtifacts','outputDir','name','\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)','Project:\x20','projectDir'];a4_0x223f=function(){return _0x58e467;};return a4_0x223f();}export class AgentPullCommand extends BaseCommand{[a4_0x4ce58a(0x208)]=a4_0x4ce58a(0x221);['description']=a4_0x4ce58a(0x1e1);async['execute'](_0x420e0d){const _0x9491b1=a4_0x4ce58a,{options:_0x22cc76,args:_0xa86c09,tdx:_0x56143e}=_0x420e0d,_0x31e8d6=_0xa86c09[0x0],_0x41d860=_0xa86c09[0x1],_0x53480e=_0x22cc76[_0x9491b1(0x1ed)],_0x3a3baa=_0x22cc76['dryRun'],_0x3442d2=_0x22cc76['force'],_0x4c667e=_0x22cc76[_0x9491b1(0x280)],_0x538528=_0x22cc76['llmProject'],_0x932bbf=_0x22cc76[_0x9491b1(0x22f)];let _0x1d1b69;if(_0x31e8d6){const _0x350842=a4_0x133c9b[_0x9491b1(0x211)](_0x31e8d6,'tdx.json');if(existsSync(_0x350842))try{const _0x203f53=JSON[_0x9491b1(0x216)](readFileSync(_0x350842,'utf-8'));_0x203f53[_0x9491b1(0x231)]&&(_0x1d1b69={'llm_project':_0x203f53[_0x9491b1(0x231)]});}catch{}}const _0x24236b=findAgentConfigPath(process[_0x9491b1(0x21a)]());let _0x4f98ea;if(_0x24236b)try{const _0x2ea98c=JSON[_0x9491b1(0x216)](readFileSync(_0x24236b,'utf-8'));_0x2ea98c[_0x9491b1(0x231)]&&(_0x4f98ea={'llm_project':_0x2ea98c[_0x9491b1(0x231)]});}catch{}const _0x39675c=resolveAgentPullArgs({'arg':_0x31e8d6,'agentNameArg':_0x41d860,'agentFlag':_0x932bbf,'contextProject':_0x538528,'argDirConfig':_0x1d1b69,'cwdConfigPath':_0x24236b||undefined,'cwdConfig':_0x4f98ea}),{projectNameOrId:_0x31dcf9,targetAgentName:_0x382e59,existingOutputDir:_0x4cc469,source:_0x7154d9}=_0x39675c;if(_0x7154d9===_0x9491b1(0x292))console['log'](a4_0x4fd2b2[_0x9491b1(0x275)](_0x9491b1(0x1f4)+a4_0x133c9b[_0x9491b1(0x211)](_0x31e8d6,_0x9491b1(0x28f))+':\x20'+_0x31dcf9));else{if(_0x7154d9===_0x9491b1(0x255))console[_0x9491b1(0x1f6)](a4_0x4fd2b2['dim'](_0x9491b1(0x1f0)+_0x31dcf9));else _0x7154d9===_0x9491b1(0x260)&&console[_0x9491b1(0x1f6)](a4_0x4fd2b2[_0x9491b1(0x275)](_0x9491b1(0x287)+_0x31dcf9));}if(!_0x31dcf9)return _0x932bbf?(console[_0x9491b1(0x1f6)](a4_0x4fd2b2['yellow'](_0x9491b1(0x1e8))),console[_0x9491b1(0x1f6)](_0x9491b1(0x205)),console['log']('Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>')):(console[_0x9491b1(0x1f6)](a4_0x4fd2b2['yellow'](_0x9491b1(0x245))),console[_0x9491b1(0x1f6)](_0x9491b1(0x23a)),console['log'](_0x9491b1(0x258)),console[_0x9491b1(0x1f6)](_0x9491b1(0x1f7)),console[_0x9491b1(0x1f6)](_0x9491b1(0x278)),console[_0x9491b1(0x1f6)](_0x9491b1(0x279))),0x1;if(_0x382e59){const {data:_0x54a5aa}=await withSpinner('Pulling\x20agent\x20\x22'+_0x382e59+_0x9491b1(0x23e)+_0x31dcf9+_0x9491b1(0x24b),()=>_0x56143e['llm']['pullAgent'](_0x31dcf9,_0x382e59,_0x53480e,{'dryRun':_0x3a3baa,'force':_0x3442d2}));if(_0x3a3baa)return console['log'](a4_0x4fd2b2[_0x9491b1(0x27a)](_0x9491b1(0x1f3))),console[_0x9491b1(0x1f6)]('Would\x20pull\x20agent:\x20'+_0x54a5aa['agentName']),console[_0x9491b1(0x1f6)](_0x9491b1(0x25b)+_0x54a5aa[_0x9491b1(0x213)]),_0x54a5aa[_0x9491b1(0x237)]&&(console[_0x9491b1(0x1f6)](_0x9491b1(0x26d)),console['log']('─'[_0x9491b1(0x1fd)](0x3c)),console['log'](_0x54a5aa[_0x9491b1(0x237)]),console[_0x9491b1(0x1f6)]('─'[_0x9491b1(0x1fd)](0x3c))),0x0;return console[_0x9491b1(0x1f6)](a4_0x4fd2b2['green'](_0x9491b1(0x224))),console[_0x9491b1(0x1f6)](_0x9491b1(0x22c)+_0x54a5aa['agentName']),console['log'](_0x9491b1(0x1d8)+_0x54a5aa[_0x9491b1(0x213)]),console[_0x9491b1(0x1f6)]('Status:\x20'+(_0x54a5aa[_0x9491b1(0x277)]?a4_0x4fd2b2[_0x9491b1(0x261)](_0x9491b1(0x251)):_0x54a5aa['hasChanges']?a4_0x4fd2b2['yellow']('updated'):a4_0x4fd2b2[_0x9491b1(0x228)](_0x9491b1(0x283)))),0x0;}const _0x12c99a=_0x4cc469||_0x53480e,{data:_0x4bf827}=await withSpinner(_0x9491b1(0x26c)+_0x31dcf9+'\x22...',()=>_0x56143e['llm'][_0x9491b1(0x289)](_0x31dcf9,_0x12c99a,{'dryRun':!![]})),_0x44456c=_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x1ee)][_0x9491b1(0x251)]+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x256)][_0x9491b1(0x251)]+_0x4bf827['counts'][_0x9491b1(0x233)][_0x9491b1(0x251)]+_0x4bf827['counts']['prompts'][_0x9491b1(0x251)]+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x20f)][_0x9491b1(0x251)]+_0x4bf827[_0x9491b1(0x20e)]['experimentalKnowledgeBases'][_0x9491b1(0x251)]+_0x4bf827['counts'][_0x9491b1(0x206)][_0x9491b1(0x251)],_0x12e074=_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x1ee)][_0x9491b1(0x1de)]+_0x4bf827['counts']['knowledgeBases'][_0x9491b1(0x1de)]+_0x4bf827[_0x9491b1(0x20e)]['textKnowledgeBases'][_0x9491b1(0x1de)]+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x219)][_0x9491b1(0x1de)]+_0x4bf827[_0x9491b1(0x20e)]['integrations'][_0x9491b1(0x1de)]+_0x4bf827[_0x9491b1(0x20e)]['experimentalKnowledgeBases'][_0x9491b1(0x1de)]+_0x4bf827['counts'][_0x9491b1(0x206)]['updated'],_0x4f6e74=_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x1ee)][_0x9491b1(0x283)]+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x256)]['unchanged']+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x233)][_0x9491b1(0x283)]+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x219)][_0x9491b1(0x283)]+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x20f)][_0x9491b1(0x283)]+_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x27f)][_0x9491b1(0x283)]+_0x4bf827[_0x9491b1(0x20e)]['experimentalArtifacts']['unchanged'];console['log'](_0x9491b1(0x1f9)+_0x4bf827[_0x9491b1(0x243)]+'\x27:'),console['log']('\x20\x20'+a4_0x4fd2b2[_0x9491b1(0x261)]('+\x20'+_0x44456c+_0x9491b1(0x203))+_0x9491b1(0x1e5)+a4_0x4fd2b2[_0x9491b1(0x27a)]('~\x20'+_0x12e074+'\x20changed')+'\x20|\x20'+a4_0x4fd2b2[_0x9491b1(0x275)]('=\x20'+_0x4f6e74+_0x9491b1(0x226))),console[_0x9491b1(0x1f6)](_0x9491b1(0x236)+formatCountSummary(_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x1ee)])),console[_0x9491b1(0x1f6)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4bf827['counts']['knowledgeBases'])),console['log'](_0x9491b1(0x20d)+formatCountSummary(_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x233)])),console[_0x9491b1(0x1f6)](_0x9491b1(0x21f)+formatCountSummary(_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x219)])),console[_0x9491b1(0x1f6)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x4bf827[_0x9491b1(0x20e)]['integrations']));const _0x3d0e4f=_0x4bf827[_0x9491b1(0x20e)]['experimentalKnowledgeBases'][_0x9491b1(0x1db)]>0x0||_0x4bf827[_0x9491b1(0x20e)][_0x9491b1(0x206)][_0x9491b1(0x1db)]>0x0;_0x3d0e4f&&(console[_0x9491b1(0x1f6)](_0x9491b1(0x1dd)+formatCountSummary(_0x4bf827[_0x9491b1(0x20e)]['experimentalKnowledgeBases'])),console[_0x9491b1(0x1f6)](_0x9491b1(0x26f)+formatCountSummary(_0x4bf827['counts'][_0x9491b1(0x206)])));console[_0x9491b1(0x1f6)](_0x9491b1(0x271)+a4_0x4fd2b2[_0x9491b1(0x1e0)](_0x4bf827['outputDir'])),displayDiffs(_0x4bf827['agents'],_0x4bf827[_0x9491b1(0x256)],_0x4bf827[_0x9491b1(0x233)],_0x4bf827[_0x9491b1(0x219)],_0x4bf827['integrations'],_0x4bf827[_0x9491b1(0x27f)],_0x4bf827[_0x9491b1(0x206)]);if(_0x3a3baa)return console[_0x9491b1(0x1f6)](a4_0x4fd2b2[_0x9491b1(0x27a)](_0x9491b1(0x1e3))),0x0;if(_0x44456c===0x0&&_0x12e074===0x0)return console['log'](a4_0x4fd2b2['green'](_0x9491b1(0x25a))),saveSessionContext({'llm_project':_0x4bf827['projectName']},_0x22cc76[_0x9491b1(0x254)]),console['log'](a4_0x4fd2b2[_0x9491b1(0x261)](_0x9491b1(0x1fb)+a4_0x4fd2b2[_0x9491b1(0x275)](_0x9491b1(0x231))+_0x9491b1(0x215)+a4_0x4fd2b2[_0x9491b1(0x1e0)](_0x4bf827[_0x9491b1(0x243)]))),0x0;if(!_0x4c667e&&!_0x3442d2){if(!isInteractive())return console[_0x9491b1(0x225)](a4_0x4fd2b2[_0x9491b1(0x267)]('\x0aError:'),_0x9491b1(0x28a)),console['error'](a4_0x4fd2b2[_0x9491b1(0x275)](_0x9491b1(0x222))),0x1;const _0xb5ba56=await confirmKey(_0x9491b1(0x23d)+(_0x44456c+_0x12e074)+_0x9491b1(0x230));if(!_0xb5ba56)return console[_0x9491b1(0x1f6)](a4_0x4fd2b2[_0x9491b1(0x27a)]('Cancelled'),_0x9491b1(0x22d)),0x1;}const {data:_0x4f894a}=await withSpinner('Writing\x20files...',()=>_0x56143e[_0x9491b1(0x282)]['pullProject'](_0x31dcf9,_0x12c99a,{'force':_0x3442d2}));return console[_0x9491b1(0x1f6)](a4_0x4fd2b2[_0x9491b1(0x261)](_0x9491b1(0x25f)+(_0x44456c+_0x12e074)+'\x20files\x20to\x20'+_0x4f894a[_0x9491b1(0x207)])),saveSessionContext({'llm_project':_0x4f894a[_0x9491b1(0x243)]},_0x22cc76[_0x9491b1(0x254)]),console[_0x9491b1(0x1f6)](a4_0x4fd2b2[_0x9491b1(0x261)]('✔\x20Context\x20set:\x20'+a4_0x4fd2b2[_0x9491b1(0x275)](_0x9491b1(0x231))+'\x20=\x20'+a4_0x4fd2b2[_0x9491b1(0x1e0)](_0x4f894a['projectName']))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x4ce58a(0x208)]=a4_0x4ce58a(0x252);['description']=a4_0x4ce58a(0x202);async['execute'](_0x309cf0){const _0x16dbbf=a4_0x4ce58a,{options:_0x168a62,args:_0x1b78e3,tdx:_0x368747}=_0x309cf0,_0xab1008=_0x1b78e3[0x0],_0x2e92c6=_0x168a62[_0x16dbbf(0x208)],_0x59e7cc=_0x168a62[_0x16dbbf(0x21d)],_0x38cf4f=_0x168a62[_0x16dbbf(0x280)],_0x37c07a=_0x168a62['site'],_0x581b61=_0x168a62[_0x16dbbf(0x1e4)];let _0x2470e5;const _0x13c78c=findAgentConfigPath(process['cwd']());if(_0xab1008){const _0x35db72=a4_0x133c9b[_0x16dbbf(0x211)](_0xab1008,'tdx.json');existsSync(_0x35db72)?(_0x2470e5=_0xab1008,console['log'](a4_0x4fd2b2['dim'](_0x16dbbf(0x201)+_0xab1008))):_0x2470e5=_0xab1008;}else{if(_0x13c78c)_0x2470e5=a4_0x133c9b['dirname'](_0x13c78c),console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x275)]('Using\x20current\x20project:\x20'+_0x2470e5));else{if(_0x581b61){const _0x1d468a=sanitizeForFilesystem(_0x581b61);let _0xc4c220=_0x1d468a,_0x59ca6a=a4_0x133c9b['join'](process['cwd'](),_0x16dbbf(0x1ee),_0x1d468a,_0x16dbbf(0x28f));if(!existsSync(_0x59ca6a)){const _0x19e99c=normalizeName(_0x581b61),_0x490350=a4_0x133c9b[_0x16dbbf(0x211)](process[_0x16dbbf(0x21a)](),_0x16dbbf(0x1ee),_0x19e99c,'tdx.json');existsSync(_0x490350)&&(_0xc4c220=_0x19e99c,_0x59ca6a=_0x490350);}if(existsSync(_0x59ca6a))_0x2470e5=a4_0x133c9b[_0x16dbbf(0x263)](_0x59ca6a),console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x275)](_0x16dbbf(0x201)+_0x2470e5));else{const _0x54703e=_0x168a62[_0x16dbbf(0x250)];if(_0x54703e)throw new SDKError(ErrorCode[_0x16dbbf(0x1eb)],_0x16dbbf(0x262)+_0x581b61+_0x16dbbf(0x257),undefined,{'helpText':_0x16dbbf(0x1da)+_0x16dbbf(0x24d)+('\x20\x20tdx\x20agent\x20pull\x20'+_0x581b61+'\x0a')+(_0x16dbbf(0x26e)+_0xc4c220+_0x16dbbf(0x21c)+(_0x2e92c6||_0x16dbbf(0x1e6))+_0x16dbbf(0x1ef)+_0x54703e)});_0x2470e5=_0x581b61,console['log'](a4_0x4fd2b2[_0x16dbbf(0x275)](_0x16dbbf(0x212)+_0x581b61));}}}}if(!_0x2470e5)return console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x27a)]('No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a')),console[_0x16dbbf(0x1f6)](_0x16dbbf(0x220)),console[_0x16dbbf(0x1f6)]('\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory'),console[_0x16dbbf(0x1f6)](_0x16dbbf(0x209)),console['log'](_0x16dbbf(0x241)),0x1;if(!_0x2e92c6)throw new SDKError(ErrorCode[_0x16dbbf(0x240)],_0x16dbbf(0x238),undefined,{'helpText':_0x16dbbf(0x264)});if(!_0x38cf4f&&!_0x59e7cc){if(!isInteractive())return console[_0x16dbbf(0x225)](a4_0x4fd2b2[_0x16dbbf(0x267)](_0x16dbbf(0x232)),_0x16dbbf(0x28a)),console[_0x16dbbf(0x225)](a4_0x4fd2b2[_0x16dbbf(0x275)](_0x16dbbf(0x222))),0x1;const _0x2e6e97=await confirmKey(_0x16dbbf(0x1fa)+_0x2470e5+_0x16dbbf(0x266)+_0x2e92c6+'\x22?');if(!_0x2e6e97)return console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x27a)]('Cancelled')),0x1;}const {data:_0x4fb576}=await withSpinner(_0x16dbbf(0x210)+_0x2470e5+_0x16dbbf(0x22e)+_0x2e92c6+_0x16dbbf(0x24b),()=>_0x368747[_0x16dbbf(0x282)][_0x16dbbf(0x24e)](_0x2470e5,_0x2e92c6,{'dryRun':_0x59e7cc}));if(_0x59e7cc){console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x27a)](_0x16dbbf(0x253))),console[_0x16dbbf(0x1f6)]('Source:\x20'+_0x4fb576[_0x16dbbf(0x259)]),console['log'](_0x16dbbf(0x294)+_0x2e92c6),console[_0x16dbbf(0x1f6)]('Would\x20clone:'),console[_0x16dbbf(0x1f6)]('\x20\x20Agents:\x20'+_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x1ee)][_0x16dbbf(0x227)]),console[_0x16dbbf(0x1f6)](_0x16dbbf(0x28e)+_0x4fb576[_0x16dbbf(0x20e)]['knowledgeBases'][_0x16dbbf(0x227)]),console['log']('\x20\x20Prompts:\x20'+_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x219)][_0x16dbbf(0x227)]);const _0x7c7c5d=_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x27f)]['created']>0x0||_0x4fb576[_0x16dbbf(0x20e)]['experimentalArtifacts'][_0x16dbbf(0x227)]>0x0;return _0x7c7c5d&&(console[_0x16dbbf(0x1f6)](_0x16dbbf(0x1dd)+_0x4fb576['counts'][_0x16dbbf(0x27f)][_0x16dbbf(0x227)]),console[_0x16dbbf(0x1f6)]('\x20\x20Experimental\x20Artifacts:\x20'+_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x206)][_0x16dbbf(0x227)])),0x0;}const _0x293d8d=_0x4fb576['counts']['agents'][_0x16dbbf(0x229)]>0x0||_0x4fb576[_0x16dbbf(0x20e)]['knowledgeBases'][_0x16dbbf(0x229)]>0x0||_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x219)][_0x16dbbf(0x229)]>0x0||_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x27f)][_0x16dbbf(0x229)]>0x0||_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x206)]['errors']>0x0;_0x293d8d?console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x27a)](_0x16dbbf(0x28c))):console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x261)](_0x16dbbf(0x295)));console[_0x16dbbf(0x1f6)](_0x16dbbf(0x22b)+_0x4fb576[_0x16dbbf(0x259)]),console[_0x16dbbf(0x1f6)](_0x16dbbf(0x294)+_0x4fb576[_0x16dbbf(0x27d)]),console[_0x16dbbf(0x1f6)](_0x16dbbf(0x1e9)+_0x4fb576[_0x16dbbf(0x1e7)]),console[_0x16dbbf(0x1f6)](),console['log'](_0x16dbbf(0x265)),console[_0x16dbbf(0x1f6)](_0x16dbbf(0x236)+formatCountSummary(_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x1ee)])),console[_0x16dbbf(0x1f6)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x256)])),console['log'](_0x16dbbf(0x21f)+formatCountSummary(_0x4fb576['counts'][_0x16dbbf(0x219)])),console[_0x16dbbf(0x1f6)](_0x16dbbf(0x268)+formatCountSummary(_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x20f)]));const _0x33df17=_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x27f)]['created']>0x0||_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x27f)][_0x16dbbf(0x1de)]>0x0||_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x27f)][_0x16dbbf(0x283)]>0x0||_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x206)][_0x16dbbf(0x227)]>0x0||_0x4fb576[_0x16dbbf(0x20e)]['experimentalArtifacts'][_0x16dbbf(0x1de)]>0x0||_0x4fb576['counts'][_0x16dbbf(0x206)]['unchanged']>0x0;_0x33df17&&(console[_0x16dbbf(0x1f6)](_0x16dbbf(0x1dd)+formatCountSummary(_0x4fb576['counts']['experimentalKnowledgeBases'])),console['log']('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x4fb576[_0x16dbbf(0x20e)][_0x16dbbf(0x206)])));if(_0x293d8d){console[_0x16dbbf(0x1f6)](),console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x267)](_0x16dbbf(0x1dc)));for(const _0x18945d of _0x4fb576[_0x16dbbf(0x1ee)]){_0x18945d[_0x16dbbf(0x281)]===_0x16dbbf(0x225)&&console[_0x16dbbf(0x1f6)](a4_0x4fd2b2['red'](_0x16dbbf(0x1f2)+_0x18945d[_0x16dbbf(0x272)]+_0x16dbbf(0x290)+_0x18945d[_0x16dbbf(0x225)]));}for(const _0x17b6b0 of _0x4fb576[_0x16dbbf(0x256)]){_0x17b6b0[_0x16dbbf(0x281)]===_0x16dbbf(0x225)&&console[_0x16dbbf(0x1f6)](a4_0x4fd2b2['red'](_0x16dbbf(0x293)+_0x17b6b0[_0x16dbbf(0x208)]+_0x16dbbf(0x290)+_0x17b6b0[_0x16dbbf(0x225)]));}for(const _0x50c87c of _0x4fb576[_0x16dbbf(0x219)]){_0x50c87c[_0x16dbbf(0x281)]===_0x16dbbf(0x225)&&console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x267)]('\x20\x20Prompt\x20\x22'+_0x50c87c[_0x16dbbf(0x208)]+_0x16dbbf(0x290)+_0x50c87c['error']));}for(const _0x2154a5 of _0x4fb576[_0x16dbbf(0x20f)]){_0x2154a5[_0x16dbbf(0x281)]===_0x16dbbf(0x225)&&console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x267)]('\x20\x20Integration\x20\x22'+_0x2154a5[_0x16dbbf(0x208)]+_0x16dbbf(0x290)+_0x2154a5[_0x16dbbf(0x225)]));}for(const _0x25794a of _0x4fb576['experimentalKnowledgeBases']){_0x25794a[_0x16dbbf(0x281)]===_0x16dbbf(0x225)&&console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x267)]('\x20\x20Experimental\x20Knowledge\x20Base\x20\x22'+_0x25794a[_0x16dbbf(0x208)]+_0x16dbbf(0x290)+_0x25794a[_0x16dbbf(0x225)]));}for(const _0x4e5f38 of _0x4fb576[_0x16dbbf(0x206)]){_0x4e5f38['action']===_0x16dbbf(0x225)&&console[_0x16dbbf(0x1f6)](a4_0x4fd2b2[_0x16dbbf(0x267)]('\x20\x20Experimental\x20Artifact\x20\x22'+_0x4e5f38[_0x16dbbf(0x208)]+'\x22:\x20'+_0x4e5f38[_0x16dbbf(0x225)]));}return 0x1;}console[_0x16dbbf(0x1f6)]();const _0x424861=getLLMProjectUrl(_0x37c07a,_0x4fb576['newProjectId']);return console[_0x16dbbf(0x1f6)]('Project:\x20'+a4_0x4fd2b2[_0x16dbbf(0x1e0)](_0x424861)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x4ce58a(0x208)]=a4_0x4ce58a(0x249);[a4_0x4ce58a(0x242)]='Push\x20local\x20agent\x20files\x20to\x20LLM\x20project';async[a4_0x4ce58a(0x1f1)](_0x14a812){const _0x32f71c=a4_0x4ce58a,{options:_0x11e9f9,args:_0x1c7dff,tdx:_0x42e702}=_0x14a812;let _0x466554=_0x1c7dff[0x0]||process[_0x32f71c(0x21a)]();const _0x5791f6=_0x11e9f9[_0x32f71c(0x21d)],_0x16d504=_0x11e9f9[_0x32f71c(0x28b)],_0x4e29de=_0x11e9f9[_0x32f71c(0x280)],_0x567d3e=_0x11e9f9['site'],_0x14b1ca=a4_0x133c9b[_0x32f71c(0x211)](_0x466554,_0x32f71c(0x204)),_0x2d4d83=existsSync(_0x14b1ca);if(_0x2d4d83){const {data:_0x5938b7}=await withSpinner(_0x32f71c(0x248)+_0x466554+_0x32f71c(0x24b),()=>_0x42e702[_0x32f71c(0x282)][_0x32f71c(0x1ea)](_0x466554,{'dryRun':_0x5791f6,'force':_0x16d504}));if(_0x5791f6)return console['log'](a4_0x4fd2b2[_0x32f71c(0x27a)](_0x32f71c(0x253))),console[_0x32f71c(0x1f6)](_0x32f71c(0x28d)+_0x5938b7[_0x32f71c(0x272)]),0x0;if(_0x5938b7[_0x32f71c(0x281)]==='error')return console[_0x32f71c(0x1f6)](a4_0x4fd2b2['red'](_0x32f71c(0x273)+_0x5938b7[_0x32f71c(0x225)])),0x1;console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x261)](_0x32f71c(0x26a)+_0x5938b7[_0x32f71c(0x281)]+_0x32f71c(0x1e2))),console[_0x32f71c(0x1f6)]('Agent:\x20'+_0x5938b7[_0x32f71c(0x272)]);if(_0x5938b7[_0x32f71c(0x1ff)]&&_0x5938b7['projectId']){const _0xea0cde=getLLMAgentChatUrl(_0x567d3e,_0x5938b7['projectId'],_0x5938b7[_0x32f71c(0x1ff)]);console[_0x32f71c(0x1f6)](_0x32f71c(0x25c)+a4_0x4fd2b2[_0x32f71c(0x1e0)](_0xea0cde));}return 0x0;}const _0x439e30=_0x11e9f9['llmProject'],_0x43b52b=resolveProjectFromContext(_0x466554,_0x439e30);if(_0x43b52b[_0x32f71c(0x223)])_0x466554=_0x43b52b[_0x32f71c(0x20b)],_0x43b52b[_0x32f71c(0x1fc)]===_0x32f71c(0x260)&&console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x275)](_0x32f71c(0x1f0)+_0x466554));else{let _0x5d5a20='Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.';_0x43b52b['reason']==='no_local_folder'&&(_0x5d5a20=_0x43b52b[_0x32f71c(0x291)]+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x43b52b[_0x32f71c(0x1e4)]+_0x32f71c(0x1f5));throw new SDKError(ErrorCode[_0x32f71c(0x1eb)],_0x43b52b[_0x32f71c(0x244)]===_0x32f71c(0x200)?_0x43b52b[_0x32f71c(0x291)]:_0x32f71c(0x239)+_0x466554,undefined,{'helpText':_0x5d5a20});}const {data:_0x766200}=await withSpinner(_0x32f71c(0x25e),()=>_0x42e702['llm'][_0x32f71c(0x285)](_0x466554,{'dryRun':!![]})),_0x3f6efd=_0x766200['counts'][_0x32f71c(0x1ee)][_0x32f71c(0x229)]>0x0;if(_0x3f6efd){console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x267)]('\x0aErrors\x20found:'));for(const _0x1eade4 of _0x766200['agents']){_0x1eade4['action']===_0x32f71c(0x225)&&console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x267)]('\x20\x20Agent\x20\x22'+_0x1eade4[_0x32f71c(0x272)]+_0x32f71c(0x290)+_0x1eade4[_0x32f71c(0x225)]));}return 0x1;}const _0x17d907=_0x766200['counts'][_0x32f71c(0x1ee)][_0x32f71c(0x227)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x256)][_0x32f71c(0x227)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x233)][_0x32f71c(0x227)]+_0x766200['counts']['prompts'][_0x32f71c(0x227)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x20f)][_0x32f71c(0x227)]+_0x766200['counts'][_0x32f71c(0x27f)][_0x32f71c(0x227)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x206)][_0x32f71c(0x227)],_0x30dc26=_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x1ee)][_0x32f71c(0x1de)]+_0x766200['counts'][_0x32f71c(0x256)][_0x32f71c(0x1de)]+_0x766200[_0x32f71c(0x20e)]['textKnowledgeBases'][_0x32f71c(0x1de)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x219)][_0x32f71c(0x1de)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x20f)][_0x32f71c(0x1de)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x27f)][_0x32f71c(0x1de)]+_0x766200['counts'][_0x32f71c(0x206)]['updated'],_0x4229e4=_0x766200['counts'][_0x32f71c(0x1ee)][_0x32f71c(0x283)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x256)][_0x32f71c(0x283)]+_0x766200[_0x32f71c(0x20e)]['textKnowledgeBases']['unchanged']+_0x766200['counts'][_0x32f71c(0x219)][_0x32f71c(0x283)]+_0x766200[_0x32f71c(0x20e)]['integrations'][_0x32f71c(0x283)]+_0x766200['counts'][_0x32f71c(0x27f)][_0x32f71c(0x283)]+_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x206)][_0x32f71c(0x283)];console['log']('\x0aPush\x20summary\x20for\x20\x27'+_0x766200[_0x32f71c(0x243)]+'\x27:'),console[_0x32f71c(0x1f6)]('\x20\x20'+a4_0x4fd2b2[_0x32f71c(0x261)]('+\x20'+_0x17d907+'\x20new')+_0x32f71c(0x1e5)+a4_0x4fd2b2['yellow']('~\x20'+_0x30dc26+_0x32f71c(0x247))+_0x32f71c(0x1e5)+a4_0x4fd2b2['dim']('=\x20'+_0x4229e4+_0x32f71c(0x226))),console[_0x32f71c(0x1f6)]('\x20\x20Agents:\x20'+formatCountSummary(_0x766200[_0x32f71c(0x20e)]['agents'])),console[_0x32f71c(0x1f6)](_0x32f71c(0x28e)+formatCountSummary(_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x256)])),console['log'](_0x32f71c(0x20d)+formatCountSummary(_0x766200[_0x32f71c(0x20e)]['textKnowledgeBases'])),console[_0x32f71c(0x1f6)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x766200['counts'][_0x32f71c(0x219)])),console[_0x32f71c(0x1f6)](_0x32f71c(0x268)+formatCountSummary(_0x766200['counts']['integrations']));const _0x150bb2=_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x27f)]['created']>0x0||_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x27f)][_0x32f71c(0x1de)]>0x0||_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x27f)][_0x32f71c(0x283)]>0x0||_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x206)][_0x32f71c(0x227)]>0x0||_0x766200['counts'][_0x32f71c(0x206)]['updated']>0x0||_0x766200[_0x32f71c(0x20e)][_0x32f71c(0x206)][_0x32f71c(0x283)]>0x0;_0x150bb2&&(console['log'](_0x32f71c(0x1dd)+formatCountSummary(_0x766200['counts'][_0x32f71c(0x27f)])),console[_0x32f71c(0x1f6)](_0x32f71c(0x26f)+formatCountSummary(_0x766200[_0x32f71c(0x20e)]['experimentalArtifacts'])));console[_0x32f71c(0x1f6)](_0x32f71c(0x269)+a4_0x4fd2b2[_0x32f71c(0x1e0)](_0x466554)),displayDiffs(_0x766200[_0x32f71c(0x1ee)],_0x766200[_0x32f71c(0x256)],_0x766200[_0x32f71c(0x233)],_0x766200[_0x32f71c(0x219)],_0x766200[_0x32f71c(0x20f)],_0x766200[_0x32f71c(0x27f)],_0x766200[_0x32f71c(0x206)]);if(_0x5791f6)return console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x27a)](_0x32f71c(0x1ec))),0x0;if(_0x17d907===0x0&&_0x30dc26===0x0){console[_0x32f71c(0x1f6)](a4_0x4fd2b2['green']('\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date'));const _0x1039d8=getLLMProjectUrl(_0x567d3e,_0x766200[_0x32f71c(0x276)]);return console[_0x32f71c(0x1f6)](_0x32f71c(0x20a)+a4_0x4fd2b2[_0x32f71c(0x1e0)](_0x1039d8)),0x0;}if(!_0x4e29de&&!_0x16d504){if(!isInteractive())return console[_0x32f71c(0x225)](a4_0x4fd2b2[_0x32f71c(0x267)](_0x32f71c(0x232)),_0x32f71c(0x28a)),console['error'](a4_0x4fd2b2['dim'](_0x32f71c(0x222))),0x1;const _0x47c5e0=await confirmKey(_0x32f71c(0x23f)+(_0x17d907+_0x30dc26)+_0x32f71c(0x26b));if(!_0x47c5e0)return console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x27a)](_0x32f71c(0x27c)),_0x32f71c(0x24c)),0x1;}const {data:_0x2dff1c}=await withSpinner(_0x32f71c(0x22a),()=>_0x42e702[_0x32f71c(0x282)][_0x32f71c(0x285)](_0x466554,{'force':_0x16d504})),_0x562ed4=_0x2dff1c['counts'][_0x32f71c(0x1ee)][_0x32f71c(0x229)]>0x0||_0x2dff1c[_0x32f71c(0x20e)][_0x32f71c(0x256)]['errors']>0x0||_0x2dff1c[_0x32f71c(0x20e)]['textKnowledgeBases'][_0x32f71c(0x229)]>0x0||_0x2dff1c[_0x32f71c(0x20e)][_0x32f71c(0x219)][_0x32f71c(0x229)]>0x0;if(_0x562ed4){console['log'](a4_0x4fd2b2[_0x32f71c(0x27a)](_0x32f71c(0x24a))),console[_0x32f71c(0x1f6)](),console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x267)](_0x32f71c(0x1dc)));for(const _0x49feed of _0x2dff1c[_0x32f71c(0x1ee)]){_0x49feed[_0x32f71c(0x281)]==='error'&&console['log'](a4_0x4fd2b2[_0x32f71c(0x267)]('\x20\x20Agent\x20\x22'+_0x49feed['agentName']+_0x32f71c(0x290)+_0x49feed['error']));}for(const _0x2b383f of _0x2dff1c[_0x32f71c(0x256)]){_0x2b383f[_0x32f71c(0x281)]===_0x32f71c(0x225)&&console[_0x32f71c(0x1f6)](a4_0x4fd2b2['red'](_0x32f71c(0x293)+_0x2b383f[_0x32f71c(0x208)]+_0x32f71c(0x290)+_0x2b383f[_0x32f71c(0x225)]));}for(const _0x588fc7 of _0x2dff1c[_0x32f71c(0x233)]){_0x588fc7['action']===_0x32f71c(0x225)&&console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x267)](_0x32f71c(0x23c)+_0x588fc7[_0x32f71c(0x208)]+_0x32f71c(0x290)+_0x588fc7[_0x32f71c(0x225)]));}for(const _0x226257 of _0x2dff1c[_0x32f71c(0x219)]){_0x226257['action']===_0x32f71c(0x225)&&console[_0x32f71c(0x1f6)](a4_0x4fd2b2[_0x32f71c(0x267)](_0x32f71c(0x1fe)+_0x226257[_0x32f71c(0x208)]+_0x32f71c(0x290)+_0x226257[_0x32f71c(0x225)]));}for(const _0x55e5f5 of _0x2dff1c[_0x32f71c(0x20f)]){_0x55e5f5[_0x32f71c(0x281)]===_0x32f71c(0x225)&&console[_0x32f71c(0x1f6)](a4_0x4fd2b2['red'](_0x32f71c(0x1d9)+_0x55e5f5[_0x32f71c(0x208)]+_0x32f71c(0x290)+_0x55e5f5['error']));}return 0x1;}console['log'](a4_0x4fd2b2[_0x32f71c(0x261)](_0x32f71c(0x27b)+(_0x17d907+_0x30dc26)+_0x32f71c(0x27e)+_0x2dff1c[_0x32f71c(0x243)]+'\x27'));const _0x47d228=getLLMProjectUrl(_0x567d3e,_0x2dff1c['projectId']);return console[_0x32f71c(0x1f6)]('Project:\x20'+a4_0x4fd2b2[_0x32f71c(0x1e0)](_0x47d228)),0x0;}}
|
|
1
|
+
const a4_0x11cca1=a4_0x20d5;function a4_0x337d(){const _0x1562a1=['\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','created','new','\x20\x20Agent\x20\x22','dryRun','\x20\x20Integrations:\x20','errors','✔\x20Context\x20set:\x20','force','Using\x20project\x20from\x20context:\x20','\x20--profile\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','unchanged','agents','\x22:\x20','Source:\x20','yellow','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x0aChanges:','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','Would\x20clone:','\x0aChanges\x20to\x20agent\x20\x27','agentId','142uxgHYz','Output\x20path:\x20','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','dim','error','\x20\x20tdx\x20agent\x20clone\x20agents/','Using\x20context\x20project:\x20','\x27\x20to\x20create\x20the\x20folder\x20structure.','utf-8','gray','outputPath','Dry\x20run\x20-\x20no\x20files\x20written','cloneProject','prompts','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','join','\x20\x20tdx\x20agent\x20pull\x20','Cancelled','agent:clone','\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','isNew','agent','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','\x0aProject\x20pushed\x20with\x20errors','cwd-config','Project\x20cloned\x20successfully','outputDir','\x20new','llmProject','name','diff','reason','\x20created','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','execute','Pulling\x20agent\x20\x22','\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','pushProject','Using\x20project\x20from\x20','Analyzing\x20project\x20\x22','\x0aError:','\x0aPull\x20summary\x20for\x20\x27','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','agent:push','2694288ANdBql','\x0aPush\x20','1973070WrPHRc','\x20\x20Prompts:\x20','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','hasChanges','context','\x20\x20Agents:\x20','Analyzing\x20changes\x20to\x20push...','red','message','newProjectId','\x22...','Status:\x20','New\x20project\x20name\x20is\x20required','466980EpDHew','Project:\x20','Errors:','Agent:\x20','experimentalKnowledgeBases','knowledgeBases','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','output','green','agent:pull','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','INVALID_ARGUMENT','Failed\x20to\x20push\x20agent:\x20','Using\x20current\x20project:\x20','Summary:','\x20=\x20','\x20\x20Prompt\x20\x22','sourceProjectName','3180tXeaCa','profile','54364MFoPpn','Chat:\x20','\x20\x20Knowledge\x20Bases:\x20','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','repeat','counts','projectName','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','1338690vLfhoo','\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project','parse','\x20\x20Knowledge\x20Base\x20\x22','description','pullAgent','source','\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\x20Text\x20Knowledge\x20Bases:\x20','\x0aErrors\x20found:','action','integrations','\x20updated','experimentalArtifacts','\x20errors','\x20resources\x20to\x20\x27','Agent\x20pulled\x20successfully','1703168FKQlOZ','Would\x20pull\x20agent:\x20','New\x20project:\x20','log','pushAgent','total','\x0aChanges\x20to\x20integration\x20\x27','tdx.json','\x20\x20Source:\x20','Project\x20cloned\x20with\x20errors','\x20\x20Experimental\x20Artifact\x20\x22','Output:\x20','arg-dir','\x20\x20Integration\x20\x22','\x0a✔\x20Pulled\x20','\x20--name\x20','found','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','site','textKnowledgeBases','75mTNtcU','Using\x20local\x20project:\x20','agent.yml','push','\x22\x20from\x20project\x20\x22','Writing\x20files...','\x20unchanged','llm','no_context','7dfNhOA','\x20|\x20','cyan','agentName','Using\x20project:\x20','\x20\x20Target:\x20','no_local_folder','session','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','MISSING_ARGUMENT','\x22\x20to\x20new\x20project\x20\x22','pullProject','Cannot\x20clone\x20from\x20context\x20project\x20\x22','Cloning\x20\x22','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','yes','projectDir','\x20\x20Experimental\x20Artifacts:\x20','updated','\x20successfully','Dry\x20run\x20-\x20no\x20changes\x20made','llm_project','\x0a✔\x20Pushed\x20','projectId','dirname','New\x20project\x20ID:\x20'];a4_0x337d=function(){return _0x1562a1;};return a4_0x337d();}(function(_0x377d0b,_0x2d4bee){const _0xa77b56=a4_0x20d5,_0x24b16f=_0x377d0b();while(!![]){try{const _0x129e1a=parseInt(_0xa77b56(0x183))/0x1*(-parseInt(_0xa77b56(0x1d2))/0x2)+parseInt(_0xa77b56(0x202))/0x3*(parseInt(_0xa77b56(0x1d4))/0x4)+-parseInt(_0xa77b56(0x1dc))/0x5+-parseInt(_0xa77b56(0x1b1))/0x6*(-parseInt(_0xa77b56(0x20b))/0x7)+-parseInt(_0xa77b56(0x1ed))/0x8+parseInt(_0xa77b56(0x1b3))/0x9+-parseInt(_0xa77b56(0x1c0))/0xa;if(_0x129e1a===_0x2d4bee)break;else _0x24b16f['push'](_0x24b16f['shift']());}catch(_0xe47665){_0x24b16f['push'](_0x24b16f['shift']());}}}(a4_0x337d,0x3e3dd));import a4_0xcb3dcc from'chalk';function a4_0x20d5(_0x39f9a5,_0x183855){_0x39f9a5=_0x39f9a5-0x183;const _0x337dbf=a4_0x337d();let _0x20d56f=_0x337dbf[_0x39f9a5];return _0x20d56f;}import a4_0x909fdc from'path';import{existsSync,readFileSync}from'fs';import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/index.js';import{withSpinner}from'../utils/spinner.js';import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function formatCountSummary(_0x17a707){const _0x466367=a4_0x20d5,_0x47675d=[];if(_0x17a707[_0x466367(0x1f2)]!==undefined)_0x47675d[_0x466367(0x205)](_0x17a707[_0x466367(0x1f2)]+'\x20total');if(_0x17a707[_0x466367(0x228)]!==undefined&&_0x17a707[_0x466367(0x228)]>0x0)_0x47675d['push'](a4_0xcb3dcc[_0x466367(0x1c8)](_0x17a707[_0x466367(0x228)]+_0x466367(0x19f)));if(_0x17a707[_0x466367(0x227)]!==undefined&&_0x17a707[_0x466367(0x227)]>0x0)_0x47675d[_0x466367(0x205)](a4_0xcb3dcc[_0x466367(0x1c8)](_0x17a707[_0x466367(0x227)]+_0x466367(0x1a4)));if(_0x17a707['updated']!==undefined&&_0x17a707['updated']>0x0)_0x47675d[_0x466367(0x205)](a4_0xcb3dcc[_0x466367(0x236)](_0x17a707['updated']+_0x466367(0x1e8)));if(_0x17a707[_0x466367(0x232)]!==undefined&&_0x17a707[_0x466367(0x232)]>0x0)_0x47675d[_0x466367(0x205)](a4_0xcb3dcc[_0x466367(0x18c)](_0x17a707['unchanged']+_0x466367(0x208)));if(_0x17a707['errors']!==undefined&&_0x17a707['errors']>0x0)_0x47675d['push'](a4_0xcb3dcc[_0x466367(0x1ba)](_0x17a707['errors']+_0x466367(0x1ea)));return _0x47675d[_0x466367(0x193)](',\x20');}function displayDiffs(_0x1efd01,_0x6bbcea,_0x393279,_0x464cca,_0x3e396e,_0x2ce197,_0x44007c){const _0x4f4834=a4_0x20d5;for(const _0x2a84c0 of _0x1efd01){if(_0x2a84c0[_0x4f4834(0x1a2)]){const _0x215dbf=_0x2a84c0[_0x4f4834(0x20e)]||_0x2a84c0[_0x4f4834(0x1a1)];console['log'](_0x4f4834(0x23b)+_0x215dbf+'\x27:'),console['log']('─'[_0x4f4834(0x1d8)](0x3c)),console['log'](_0x2a84c0[_0x4f4834(0x1a2)]),console[_0x4f4834(0x1f0)]('─'[_0x4f4834(0x1d8)](0x3c));}}for(const _0x42959a of _0x6bbcea){_0x42959a[_0x4f4834(0x1a2)]&&(console[_0x4f4834(0x1f0)]('\x0aChanges\x20to\x20knowledge\x20base\x20\x27'+_0x42959a[_0x4f4834(0x1a1)]+'\x27:'),console[_0x4f4834(0x1f0)]('─'[_0x4f4834(0x1d8)](0x3c)),console[_0x4f4834(0x1f0)](_0x42959a[_0x4f4834(0x1a2)]),console[_0x4f4834(0x1f0)]('─'[_0x4f4834(0x1d8)](0x3c)));}for(const _0x5ea6d5 of _0x393279){_0x5ea6d5['diff']&&(console[_0x4f4834(0x1f0)](_0x4f4834(0x239)+_0x5ea6d5[_0x4f4834(0x1a1)]+'\x27:'),console[_0x4f4834(0x1f0)]('─'[_0x4f4834(0x1d8)](0x3c)),console['log'](_0x5ea6d5['diff']),console['log']('─'[_0x4f4834(0x1d8)](0x3c)));}for(const _0x9bac44 of _0x464cca){_0x9bac44[_0x4f4834(0x1a2)]&&(console[_0x4f4834(0x1f0)]('\x0aChanges\x20to\x20prompt\x20\x27'+_0x9bac44[_0x4f4834(0x1a1)]+'\x27:'),console['log']('─'[_0x4f4834(0x1d8)](0x3c)),console[_0x4f4834(0x1f0)](_0x9bac44[_0x4f4834(0x1a2)]),console[_0x4f4834(0x1f0)]('─'[_0x4f4834(0x1d8)](0x3c)));}for(const _0x53e1f9 of _0x3e396e){_0x53e1f9[_0x4f4834(0x1a2)]&&(console[_0x4f4834(0x1f0)](_0x4f4834(0x1f3)+_0x53e1f9[_0x4f4834(0x1a1)]+'\x27:'),console[_0x4f4834(0x1f0)]('─'[_0x4f4834(0x1d8)](0x3c)),console[_0x4f4834(0x1f0)](_0x53e1f9[_0x4f4834(0x1a2)]),console[_0x4f4834(0x1f0)]('─'['repeat'](0x3c)));}for(const _0x5c09eb of _0x2ce197){_0x5c09eb[_0x4f4834(0x1a2)]&&(console[_0x4f4834(0x1f0)](_0x4f4834(0x225)+_0x5c09eb['name']+'\x27:'),console[_0x4f4834(0x1f0)]('─'[_0x4f4834(0x1d8)](0x3c)),console[_0x4f4834(0x1f0)](_0x5c09eb['diff']),console[_0x4f4834(0x1f0)]('─'['repeat'](0x3c)));}for(const _0x4020b7 of _0x44007c){_0x4020b7[_0x4f4834(0x1a2)]&&(console[_0x4f4834(0x1f0)]('\x0aChanges\x20to\x20experimental\x20artifact\x20\x27'+_0x4020b7[_0x4f4834(0x1a1)]+'\x27:'),console['log']('─'[_0x4f4834(0x1d8)](0x3c)),console[_0x4f4834(0x1f0)](_0x4020b7[_0x4f4834(0x1a2)]),console[_0x4f4834(0x1f0)]('─'['repeat'](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x11cca1(0x1a1)]=a4_0x11cca1(0x1c9);[a4_0x11cca1(0x1e0)]=a4_0x11cca1(0x1af);async[a4_0x11cca1(0x1a6)](_0x56ad8d){const _0x1fe002=a4_0x11cca1,{options:_0x3c9e83,args:_0x511bf1,tdx:_0xb35a00}=_0x56ad8d,_0x5466d1=_0x511bf1[0x0],_0x18553c=_0x511bf1[0x1],_0x5ee4cd=_0x3c9e83[_0x1fe002(0x1c7)],_0x368ac7=_0x3c9e83[_0x1fe002(0x22a)],_0x52ad99=_0x3c9e83[_0x1fe002(0x22e)],_0xdab032=_0x3c9e83[_0x1fe002(0x21a)],_0x1124ea=_0x3c9e83[_0x1fe002(0x1a0)],_0x588e86=_0x3c9e83[_0x1fe002(0x199)];let _0x18b022;if(_0x5466d1){const _0x5c4a28=a4_0x909fdc['join'](_0x5466d1,_0x1fe002(0x1f4));if(existsSync(_0x5c4a28))try{const _0x4ac49e=JSON[_0x1fe002(0x1de)](readFileSync(_0x5c4a28,_0x1fe002(0x18b)));_0x4ac49e[_0x1fe002(0x220)]&&(_0x18b022={'llm_project':_0x4ac49e[_0x1fe002(0x220)]});}catch{}}const _0x1f5a84=findAgentConfigPath(process['cwd']());let _0x41e133;if(_0x1f5a84)try{const _0x5b54d9=JSON[_0x1fe002(0x1de)](readFileSync(_0x1f5a84,_0x1fe002(0x18b)));_0x5b54d9[_0x1fe002(0x220)]&&(_0x41e133={'llm_project':_0x5b54d9[_0x1fe002(0x220)]});}catch{}const _0x30d358=resolveAgentPullArgs({'arg':_0x5466d1,'agentNameArg':_0x18553c,'agentFlag':_0x588e86,'contextProject':_0x1124ea,'argDirConfig':_0x18b022,'cwdConfigPath':_0x1f5a84||undefined,'cwdConfig':_0x41e133}),{projectNameOrId:_0x49ac35,targetAgentName:_0x3ce6a4,existingOutputDir:_0x5954d2,source:_0x4faad3}=_0x30d358;if(_0x4faad3===_0x1fe002(0x1f9))console['log'](a4_0xcb3dcc['dim'](_0x1fe002(0x1aa)+a4_0x909fdc[_0x1fe002(0x193)](_0x5466d1,_0x1fe002(0x1f4))+':\x20'+_0x49ac35));else{if(_0x4faad3===_0x1fe002(0x19c))console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x186)](_0x1fe002(0x20f)+_0x49ac35));else _0x4faad3===_0x1fe002(0x1b7)&&console['log'](a4_0xcb3dcc[_0x1fe002(0x186)](_0x1fe002(0x22f)+_0x49ac35));}if(!_0x49ac35)return _0x588e86?(console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x236)](_0x1fe002(0x191))),console[_0x1fe002(0x1f0)]('Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>'),console['log']('Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>')):(console[_0x1fe002(0x1f0)](a4_0xcb3dcc['yellow'](_0x1fe002(0x1db))),console['log']('Usage:\x20tdx\x20agent\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20project\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x1fe002(0x1f0)](_0x1fe002(0x1a8)),console[_0x1fe002(0x1f0)]('\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[_0x1fe002(0x1f0)](_0x1fe002(0x197)),console[_0x1fe002(0x1f0)]('\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(_0x3ce6a4){const {data:_0x16b529}=await withSpinner(_0x1fe002(0x1a7)+_0x3ce6a4+_0x1fe002(0x206)+_0x49ac35+_0x1fe002(0x1bd),()=>_0xb35a00[_0x1fe002(0x209)][_0x1fe002(0x1e1)](_0x49ac35,_0x3ce6a4,_0x5ee4cd,{'dryRun':_0x368ac7,'force':_0x52ad99}));if(_0x368ac7)return console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x236)](_0x1fe002(0x18e))),console['log'](_0x1fe002(0x1ee)+_0x16b529[_0x1fe002(0x20e)]),console[_0x1fe002(0x1f0)](_0x1fe002(0x184)+_0x16b529[_0x1fe002(0x18d)]),_0x16b529[_0x1fe002(0x1a2)]&&(console[_0x1fe002(0x1f0)](_0x1fe002(0x238)),console['log']('─'[_0x1fe002(0x1d8)](0x3c)),console[_0x1fe002(0x1f0)](_0x16b529[_0x1fe002(0x1a2)]),console[_0x1fe002(0x1f0)]('─'[_0x1fe002(0x1d8)](0x3c))),0x0;return console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x1c8)](_0x1fe002(0x1ec))),console['log'](_0x1fe002(0x1c3)+_0x16b529[_0x1fe002(0x20e)]),console['log'](_0x1fe002(0x1f8)+_0x16b529[_0x1fe002(0x18d)]),console[_0x1fe002(0x1f0)](_0x1fe002(0x1be)+(_0x16b529[_0x1fe002(0x198)]?a4_0xcb3dcc['green'](_0x1fe002(0x228)):_0x16b529[_0x1fe002(0x1b6)]?a4_0xcb3dcc['yellow']('updated'):a4_0xcb3dcc['gray'](_0x1fe002(0x232)))),0x0;}const _0x4fe0f2=_0x5954d2||_0x5ee4cd,{data:_0x176989}=await withSpinner(_0x1fe002(0x1ab)+_0x49ac35+'\x22...',()=>_0xb35a00['llm'][_0x1fe002(0x216)](_0x49ac35,_0x4fe0f2,{'dryRun':!![]})),_0x3a71a6=_0x176989[_0x1fe002(0x1d9)]['agents']['new']+_0x176989[_0x1fe002(0x1d9)]['knowledgeBases'][_0x1fe002(0x228)]+_0x176989['counts']['textKnowledgeBases']['new']+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x190)]['new']+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1e7)][_0x1fe002(0x228)]+_0x176989['counts'][_0x1fe002(0x1c4)]['new']+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1e9)]['new'],_0x566feb=_0x176989['counts'][_0x1fe002(0x233)][_0x1fe002(0x21d)]+_0x176989['counts'][_0x1fe002(0x1c5)][_0x1fe002(0x21d)]+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x201)][_0x1fe002(0x21d)]+_0x176989['counts'][_0x1fe002(0x190)][_0x1fe002(0x21d)]+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1e7)][_0x1fe002(0x21d)]+_0x176989['counts'][_0x1fe002(0x1c4)][_0x1fe002(0x21d)]+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1e9)][_0x1fe002(0x21d)],_0xc3295d=_0x176989[_0x1fe002(0x1d9)]['agents'][_0x1fe002(0x232)]+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1c5)]['unchanged']+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x201)]['unchanged']+_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x190)][_0x1fe002(0x232)]+_0x176989['counts'][_0x1fe002(0x1e7)][_0x1fe002(0x232)]+_0x176989['counts'][_0x1fe002(0x1c4)]['unchanged']+_0x176989['counts'][_0x1fe002(0x1e9)][_0x1fe002(0x232)];console[_0x1fe002(0x1f0)](_0x1fe002(0x1ad)+_0x176989[_0x1fe002(0x1da)]+'\x27:'),console['log']('\x20\x20'+a4_0xcb3dcc['green']('+\x20'+_0x3a71a6+_0x1fe002(0x19f))+'\x20|\x20'+a4_0xcb3dcc[_0x1fe002(0x236)]('~\x20'+_0x566feb+'\x20changed')+_0x1fe002(0x20c)+a4_0xcb3dcc[_0x1fe002(0x186)]('=\x20'+_0xc3295d+_0x1fe002(0x208))),console[_0x1fe002(0x1f0)](_0x1fe002(0x1b8)+formatCountSummary(_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x233)])),console[_0x1fe002(0x1f0)](_0x1fe002(0x1d6)+formatCountSummary(_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1c5)])),console['log'](_0x1fe002(0x1e4)+formatCountSummary(_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x201)])),console[_0x1fe002(0x1f0)](_0x1fe002(0x1b4)+formatCountSummary(_0x176989['counts'][_0x1fe002(0x190)])),console[_0x1fe002(0x1f0)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1e7)]));const _0x26388c=_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1c4)][_0x1fe002(0x1f2)]>0x0||_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1e9)]['total']>0x0;_0x26388c&&(console[_0x1fe002(0x1f0)](_0x1fe002(0x1ae)+formatCountSummary(_0x176989[_0x1fe002(0x1d9)]['experimentalKnowledgeBases'])),console[_0x1fe002(0x1f0)]('\x20\x20Experimental\x20Artifacts:\x20'+formatCountSummary(_0x176989[_0x1fe002(0x1d9)][_0x1fe002(0x1e9)])));console['log'](_0x1fe002(0x210)+a4_0xcb3dcc['cyan'](_0x176989[_0x1fe002(0x19e)])),displayDiffs(_0x176989[_0x1fe002(0x233)],_0x176989[_0x1fe002(0x1c5)],_0x176989[_0x1fe002(0x201)],_0x176989['prompts'],_0x176989['integrations'],_0x176989[_0x1fe002(0x1c4)],_0x176989[_0x1fe002(0x1e9)]);if(_0x368ac7)return console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x236)](_0x1fe002(0x219))),0x0;if(_0x3a71a6===0x0&&_0x566feb===0x0)return console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x1c8)](_0x1fe002(0x1a5))),saveSessionContext({'llm_project':_0x176989[_0x1fe002(0x1da)]},_0x3c9e83[_0x1fe002(0x212)]),console['log'](a4_0xcb3dcc[_0x1fe002(0x1c8)](_0x1fe002(0x22d)+a4_0xcb3dcc[_0x1fe002(0x186)](_0x1fe002(0x220))+_0x1fe002(0x1cf)+a4_0xcb3dcc['cyan'](_0x176989[_0x1fe002(0x1da)]))),0x0;if(!_0xdab032&&!_0x52ad99){if(!isInteractive())return console[_0x1fe002(0x187)](a4_0xcb3dcc[_0x1fe002(0x1ba)](_0x1fe002(0x1ac)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console[_0x1fe002(0x187)](a4_0xcb3dcc[_0x1fe002(0x186)](_0x1fe002(0x19a))),0x1;const _0x1ba43e=await confirmKey('\x0aWrite\x20'+(_0x3a71a6+_0x566feb)+'\x20files?');if(!_0x1ba43e)return console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x236)](_0x1fe002(0x195)),'-\x20no\x20files\x20written'),0x1;}const {data:_0x8d24fa}=await withSpinner(_0x1fe002(0x207),()=>_0xb35a00['llm'][_0x1fe002(0x216)](_0x49ac35,_0x4fe0f2,{'force':_0x52ad99}));return console['log'](a4_0xcb3dcc[_0x1fe002(0x1c8)](_0x1fe002(0x1fb)+(_0x3a71a6+_0x566feb)+'\x20files\x20to\x20'+_0x8d24fa[_0x1fe002(0x19e)])),saveSessionContext({'llm_project':_0x8d24fa['projectName']},_0x3c9e83[_0x1fe002(0x212)]),console[_0x1fe002(0x1f0)](a4_0xcb3dcc[_0x1fe002(0x1c8)](_0x1fe002(0x22d)+a4_0xcb3dcc['dim']('llm_project')+_0x1fe002(0x1cf)+a4_0xcb3dcc['cyan'](_0x8d24fa[_0x1fe002(0x1da)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{['name']=a4_0x11cca1(0x196);['description']=a4_0x11cca1(0x185);async[a4_0x11cca1(0x1a6)](_0x26b8d3){const _0x194468=a4_0x11cca1,{options:_0x67f519,args:_0x4e78b7,tdx:_0x109bc0}=_0x26b8d3,_0x4644d8=_0x4e78b7[0x0],_0x413009=_0x67f519['name'],_0x4e2a71=_0x67f519[_0x194468(0x22a)],_0x5ca1f7=_0x67f519[_0x194468(0x21a)],_0x2c67f1=_0x67f519[_0x194468(0x200)],_0x49a59c=_0x67f519['llmProject'];let _0x5ea773;const _0x2e4f87=findAgentConfigPath(process['cwd']());if(_0x4644d8){const _0x244c91=a4_0x909fdc['join'](_0x4644d8,_0x194468(0x1f4));existsSync(_0x244c91)?(_0x5ea773=_0x4644d8,console['log'](a4_0xcb3dcc[_0x194468(0x186)](_0x194468(0x203)+_0x4644d8))):_0x5ea773=_0x4644d8;}else{if(_0x2e4f87)_0x5ea773=a4_0x909fdc[_0x194468(0x223)](_0x2e4f87),console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x186)](_0x194468(0x1cd)+_0x5ea773));else{if(_0x49a59c){const _0x821c82=sanitizeForFilesystem(_0x49a59c);let _0x15508e=_0x821c82,_0xba9314=a4_0x909fdc[_0x194468(0x193)](process['cwd'](),_0x194468(0x233),_0x821c82,_0x194468(0x1f4));if(!existsSync(_0xba9314)){const _0x85c274=normalizeName(_0x49a59c),_0x8669d5=a4_0x909fdc[_0x194468(0x193)](process['cwd'](),_0x194468(0x233),_0x85c274,_0x194468(0x1f4));existsSync(_0x8669d5)&&(_0x15508e=_0x85c274,_0xba9314=_0x8669d5);}if(existsSync(_0xba9314))_0x5ea773=a4_0x909fdc[_0x194468(0x223)](_0xba9314),console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x186)](_0x194468(0x203)+_0x5ea773));else{const _0x5da3a7=_0x67f519[_0x194468(0x1d3)];if(_0x5da3a7)throw new SDKError(ErrorCode[_0x194468(0x1cb)],_0x194468(0x217)+_0x49a59c+'\x22\x20to\x20a\x20different\x20profile',undefined,{'helpText':'When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a'+_0x194468(0x213)+(_0x194468(0x194)+_0x49a59c+'\x0a')+(_0x194468(0x188)+_0x15508e+_0x194468(0x1fc)+(_0x413009||'<new-name>')+_0x194468(0x230)+_0x5da3a7)});_0x5ea773=_0x49a59c,console[_0x194468(0x1f0)](a4_0xcb3dcc['dim'](_0x194468(0x189)+_0x49a59c));}}}}if(!_0x5ea773)return console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x236)](_0x194468(0x1b5))),console[_0x194468(0x1f0)](_0x194468(0x1dd)),console[_0x194468(0x1f0)](_0x194468(0x1ff)),console[_0x194468(0x1f0)](_0x194468(0x1e3)),console[_0x194468(0x1f0)](_0x194468(0x1d7)),0x1;if(!_0x413009)throw new SDKError(ErrorCode[_0x194468(0x214)],_0x194468(0x1bf),undefined,{'helpText':_0x194468(0x231)});if(!_0x5ca1f7&&!_0x4e2a71){if(!isInteractive())return console[_0x194468(0x187)](a4_0xcb3dcc[_0x194468(0x1ba)](_0x194468(0x1ac)),_0x194468(0x192)),console['error'](a4_0xcb3dcc[_0x194468(0x186)](_0x194468(0x19a))),0x1;const _0x1168b3=await confirmKey('Clone\x20\x22'+_0x5ea773+_0x194468(0x215)+_0x413009+'\x22?');if(!_0x1168b3)return console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x236)](_0x194468(0x195))),0x1;}const {data:_0x2e1a17}=await withSpinner(_0x194468(0x218)+_0x5ea773+'\x22\x20to\x20\x22'+_0x413009+_0x194468(0x1bd),()=>_0x109bc0[_0x194468(0x209)][_0x194468(0x18f)](_0x5ea773,_0x413009,{'dryRun':_0x4e2a71}));if(_0x4e2a71){console[_0x194468(0x1f0)](a4_0xcb3dcc['yellow'](_0x194468(0x21f))),console[_0x194468(0x1f0)](_0x194468(0x235)+_0x2e1a17[_0x194468(0x1d1)]),console['log'](_0x194468(0x1ef)+_0x413009),console[_0x194468(0x1f0)](_0x194468(0x23a)),console[_0x194468(0x1f0)]('\x20\x20Agents:\x20'+_0x2e1a17['counts'][_0x194468(0x233)][_0x194468(0x227)]),console[_0x194468(0x1f0)]('\x20\x20Knowledge\x20Bases:\x20'+_0x2e1a17['counts'][_0x194468(0x1c5)][_0x194468(0x227)]),console[_0x194468(0x1f0)](_0x194468(0x1b4)+_0x2e1a17['counts']['prompts']['created']);const _0x50702f=_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1c4)]['created']>0x0||_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1e9)][_0x194468(0x227)]>0x0;return _0x50702f&&(console[_0x194468(0x1f0)](_0x194468(0x1ae)+_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1c4)][_0x194468(0x227)]),console[_0x194468(0x1f0)](_0x194468(0x21c)+_0x2e1a17['counts'][_0x194468(0x1e9)]['created'])),0x0;}const _0x2bcd6b=_0x2e1a17['counts'][_0x194468(0x233)][_0x194468(0x22c)]>0x0||_0x2e1a17[_0x194468(0x1d9)]['knowledgeBases']['errors']>0x0||_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x190)][_0x194468(0x22c)]>0x0||_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1c4)][_0x194468(0x22c)]>0x0||_0x2e1a17['counts'][_0x194468(0x1e9)]['errors']>0x0;_0x2bcd6b?console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x236)](_0x194468(0x1f6))):console['log'](a4_0xcb3dcc['green'](_0x194468(0x19d)));console[_0x194468(0x1f0)]('Source:\x20'+_0x2e1a17[_0x194468(0x1d1)]),console[_0x194468(0x1f0)]('New\x20project:\x20'+_0x2e1a17['newProjectName']),console[_0x194468(0x1f0)](_0x194468(0x224)+_0x2e1a17[_0x194468(0x1bc)]),console['log'](),console[_0x194468(0x1f0)](_0x194468(0x1ce)),console[_0x194468(0x1f0)](_0x194468(0x1b8)+formatCountSummary(_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x233)])),console['log'](_0x194468(0x1d6)+formatCountSummary(_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1c5)])),console[_0x194468(0x1f0)](_0x194468(0x1b4)+formatCountSummary(_0x2e1a17[_0x194468(0x1d9)]['prompts'])),console[_0x194468(0x1f0)](_0x194468(0x22b)+formatCountSummary(_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1e7)]));const _0x4f6bb3=_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1c4)][_0x194468(0x227)]>0x0||_0x2e1a17[_0x194468(0x1d9)]['experimentalKnowledgeBases'][_0x194468(0x21d)]>0x0||_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1c4)][_0x194468(0x232)]>0x0||_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1e9)]['created']>0x0||_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1e9)]['updated']>0x0||_0x2e1a17['counts'][_0x194468(0x1e9)][_0x194468(0x232)]>0x0;_0x4f6bb3&&(console[_0x194468(0x1f0)](_0x194468(0x1ae)+formatCountSummary(_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1c4)])),console[_0x194468(0x1f0)](_0x194468(0x21c)+formatCountSummary(_0x2e1a17[_0x194468(0x1d9)][_0x194468(0x1e9)])));if(_0x2bcd6b){console['log'](),console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x1ba)](_0x194468(0x1c2)));for(const _0x5003ca of _0x2e1a17['agents']){_0x5003ca[_0x194468(0x1e6)]==='error'&&console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x1ba)]('\x20\x20Agent\x20\x22'+_0x5003ca[_0x194468(0x20e)]+'\x22:\x20'+_0x5003ca['error']));}for(const _0x1570d2 of _0x2e1a17[_0x194468(0x1c5)]){_0x1570d2[_0x194468(0x1e6)]===_0x194468(0x187)&&console[_0x194468(0x1f0)](a4_0xcb3dcc['red'](_0x194468(0x1df)+_0x1570d2[_0x194468(0x1a1)]+'\x22:\x20'+_0x1570d2[_0x194468(0x187)]));}for(const _0x435406 of _0x2e1a17[_0x194468(0x190)]){_0x435406[_0x194468(0x1e6)]===_0x194468(0x187)&&console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x1ba)](_0x194468(0x1d0)+_0x435406[_0x194468(0x1a1)]+_0x194468(0x234)+_0x435406[_0x194468(0x187)]));}for(const _0x1d6b7b of _0x2e1a17[_0x194468(0x1e7)]){_0x1d6b7b[_0x194468(0x1e6)]==='error'&&console['log'](a4_0xcb3dcc[_0x194468(0x1ba)]('\x20\x20Integration\x20\x22'+_0x1d6b7b[_0x194468(0x1a1)]+_0x194468(0x234)+_0x1d6b7b[_0x194468(0x187)]));}for(const _0x58e468 of _0x2e1a17[_0x194468(0x1c4)]){_0x58e468[_0x194468(0x1e6)]===_0x194468(0x187)&&console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x1ba)]('\x20\x20Experimental\x20Knowledge\x20Base\x20\x22'+_0x58e468['name']+_0x194468(0x234)+_0x58e468[_0x194468(0x187)]));}for(const _0x2b4a7a of _0x2e1a17['experimentalArtifacts']){_0x2b4a7a['action']===_0x194468(0x187)&&console[_0x194468(0x1f0)](a4_0xcb3dcc[_0x194468(0x1ba)](_0x194468(0x1f7)+_0x2b4a7a[_0x194468(0x1a1)]+'\x22:\x20'+_0x2b4a7a[_0x194468(0x187)]));}return 0x1;}console[_0x194468(0x1f0)]();const _0xbe031e=getLLMProjectUrl(_0x2c67f1,_0x2e1a17['newProjectId']);return console[_0x194468(0x1f0)](_0x194468(0x1c1)+a4_0xcb3dcc[_0x194468(0x20d)](_0xbe031e)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']=a4_0x11cca1(0x1b0);[a4_0x11cca1(0x1e0)]=a4_0x11cca1(0x1ca);async['execute'](_0x2a74c1){const _0x1f0da7=a4_0x11cca1,{options:_0x22fa82,args:_0x130b29,tdx:_0x2998a7}=_0x2a74c1;let _0x176f22=_0x130b29[0x0]||process['cwd']();const _0x4d57b1=_0x22fa82[_0x1f0da7(0x22a)],_0x3c3b1a=_0x22fa82[_0x1f0da7(0x22e)],_0x2bb35c=_0x22fa82[_0x1f0da7(0x21a)],_0x227ff2=_0x22fa82['site'],_0x55a6f9=a4_0x909fdc[_0x1f0da7(0x193)](_0x176f22,_0x1f0da7(0x204)),_0x3989d1=existsSync(_0x55a6f9);if(_0x3989d1){const {data:_0x78d069}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x176f22+_0x1f0da7(0x1bd),()=>_0x2998a7[_0x1f0da7(0x209)][_0x1f0da7(0x1f1)](_0x176f22,{'dryRun':_0x4d57b1,'force':_0x3c3b1a}));if(_0x4d57b1)return console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x236)](_0x1f0da7(0x21f))),console['log']('Would\x20push\x20agent:\x20'+_0x78d069['agentName']),0x0;if(_0x78d069['action']===_0x1f0da7(0x187))return console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x1cc)+_0x78d069[_0x1f0da7(0x187)])),0x1;console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x1c8)]('Agent\x20'+_0x78d069['action']+_0x1f0da7(0x21e))),console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1c3)+_0x78d069[_0x1f0da7(0x20e)]);if(_0x78d069[_0x1f0da7(0x23c)]&&_0x78d069['projectId']){const _0x52c020=getLLMAgentChatUrl(_0x227ff2,_0x78d069[_0x1f0da7(0x222)],_0x78d069[_0x1f0da7(0x23c)]);console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1d5)+a4_0xcb3dcc['cyan'](_0x52c020));}return 0x0;}const _0x172c49=_0x22fa82['llmProject'],_0x43375e=resolveProjectFromContext(_0x176f22,_0x172c49);if(_0x43375e[_0x1f0da7(0x1fd)])_0x176f22=_0x43375e[_0x1f0da7(0x21b)],_0x43375e[_0x1f0da7(0x1e2)]==='context'&&console['log'](a4_0xcb3dcc[_0x1f0da7(0x186)]('Using\x20project:\x20'+_0x176f22));else{let _0x187997=_0x1f0da7(0x1fe);_0x43375e['reason']===_0x1f0da7(0x211)&&(_0x187997=_0x43375e[_0x1f0da7(0x1bb)]+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x43375e[_0x1f0da7(0x1a0)]+_0x1f0da7(0x18a));throw new SDKError(ErrorCode[_0x1f0da7(0x1cb)],_0x43375e[_0x1f0da7(0x1a3)]===_0x1f0da7(0x20a)?_0x43375e[_0x1f0da7(0x1bb)]:'No\x20tdx.json\x20found\x20in\x20'+_0x176f22,undefined,{'helpText':_0x187997});}const {data:_0x188458}=await withSpinner(_0x1f0da7(0x1b9),()=>_0x2998a7['llm'][_0x1f0da7(0x1a9)](_0x176f22,{'dryRun':!![]})),_0x5c91ce=_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x233)]['errors']>0x0;if(_0x5c91ce){console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x1e5)));for(const _0x2bd433 of _0x188458['agents']){_0x2bd433[_0x1f0da7(0x1e6)]===_0x1f0da7(0x187)&&console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x229)+_0x2bd433[_0x1f0da7(0x20e)]+_0x1f0da7(0x234)+_0x2bd433['error']));}return 0x1;}const _0x33ece3=_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x233)][_0x1f0da7(0x227)]+_0x188458['counts'][_0x1f0da7(0x1c5)][_0x1f0da7(0x227)]+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x201)][_0x1f0da7(0x227)]+_0x188458[_0x1f0da7(0x1d9)]['prompts'][_0x1f0da7(0x227)]+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x1e7)]['created']+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x1c4)]['created']+_0x188458['counts'][_0x1f0da7(0x1e9)][_0x1f0da7(0x227)],_0x25a3b5=_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x233)][_0x1f0da7(0x21d)]+_0x188458[_0x1f0da7(0x1d9)]['knowledgeBases'][_0x1f0da7(0x21d)]+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x201)][_0x1f0da7(0x21d)]+_0x188458['counts'][_0x1f0da7(0x190)][_0x1f0da7(0x21d)]+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x1e7)][_0x1f0da7(0x21d)]+_0x188458['counts'][_0x1f0da7(0x1c4)]['updated']+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x1e9)][_0x1f0da7(0x21d)],_0x238f75=_0x188458['counts'][_0x1f0da7(0x233)]['unchanged']+_0x188458[_0x1f0da7(0x1d9)]['knowledgeBases'][_0x1f0da7(0x232)]+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x201)][_0x1f0da7(0x232)]+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x190)][_0x1f0da7(0x232)]+_0x188458['counts']['integrations']['unchanged']+_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x1c4)][_0x1f0da7(0x232)]+_0x188458['counts'][_0x1f0da7(0x1e9)][_0x1f0da7(0x232)];console['log']('\x0aPush\x20summary\x20for\x20\x27'+_0x188458[_0x1f0da7(0x1da)]+'\x27:'),console['log']('\x20\x20'+a4_0xcb3dcc[_0x1f0da7(0x1c8)]('+\x20'+_0x33ece3+_0x1f0da7(0x19f))+'\x20|\x20'+a4_0xcb3dcc[_0x1f0da7(0x236)]('~\x20'+_0x25a3b5+'\x20changed')+'\x20|\x20'+a4_0xcb3dcc[_0x1f0da7(0x186)]('=\x20'+_0x238f75+'\x20unchanged')),console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1b8)+formatCountSummary(_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x233)])),console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1d6)+formatCountSummary(_0x188458['counts'][_0x1f0da7(0x1c5)])),console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1e4)+formatCountSummary(_0x188458[_0x1f0da7(0x1d9)]['textKnowledgeBases'])),console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1b4)+formatCountSummary(_0x188458[_0x1f0da7(0x1d9)]['prompts'])),console['log'](_0x1f0da7(0x22b)+formatCountSummary(_0x188458[_0x1f0da7(0x1d9)]['integrations']));const _0x1b4219=_0x188458['counts'][_0x1f0da7(0x1c4)][_0x1f0da7(0x227)]>0x0||_0x188458[_0x1f0da7(0x1d9)]['experimentalKnowledgeBases'][_0x1f0da7(0x21d)]>0x0||_0x188458['counts'][_0x1f0da7(0x1c4)][_0x1f0da7(0x232)]>0x0||_0x188458['counts'][_0x1f0da7(0x1e9)][_0x1f0da7(0x227)]>0x0||_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x1e9)][_0x1f0da7(0x21d)]>0x0||_0x188458['counts'][_0x1f0da7(0x1e9)][_0x1f0da7(0x232)]>0x0;_0x1b4219&&(console['log'](_0x1f0da7(0x1ae)+formatCountSummary(_0x188458[_0x1f0da7(0x1d9)][_0x1f0da7(0x1c4)])),console['log'](_0x1f0da7(0x21c)+formatCountSummary(_0x188458[_0x1f0da7(0x1d9)]['experimentalArtifacts'])));console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1f5)+a4_0xcb3dcc[_0x1f0da7(0x20d)](_0x176f22)),displayDiffs(_0x188458[_0x1f0da7(0x233)],_0x188458[_0x1f0da7(0x1c5)],_0x188458[_0x1f0da7(0x201)],_0x188458['prompts'],_0x188458[_0x1f0da7(0x1e7)],_0x188458[_0x1f0da7(0x1c4)],_0x188458[_0x1f0da7(0x1e9)]);if(_0x4d57b1)return console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x236)](_0x1f0da7(0x1c6))),0x0;if(_0x33ece3===0x0&&_0x25a3b5===0x0){console[_0x1f0da7(0x1f0)](a4_0xcb3dcc['green'](_0x1f0da7(0x226)));const _0x16f04b=getLLMProjectUrl(_0x227ff2,_0x188458[_0x1f0da7(0x222)]);return console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1c1)+a4_0xcb3dcc[_0x1f0da7(0x20d)](_0x16f04b)),0x0;}if(!_0x2bb35c&&!_0x3c3b1a){if(!isInteractive())return console[_0x1f0da7(0x187)](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x1ac)),_0x1f0da7(0x192)),console[_0x1f0da7(0x187)](a4_0xcb3dcc['dim'](_0x1f0da7(0x19a))),0x1;const _0x250aa0=await confirmKey(_0x1f0da7(0x1b2)+(_0x33ece3+_0x25a3b5)+'\x20resources?');if(!_0x250aa0)return console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x236)](_0x1f0da7(0x195)),'-\x20nothing\x20pushed'),0x1;}const {data:_0x5607f8}=await withSpinner('Pushing\x20to\x20project...',()=>_0x2998a7['llm'][_0x1f0da7(0x1a9)](_0x176f22,{'force':_0x3c3b1a})),_0x17fb4e=_0x5607f8['counts']['agents']['errors']>0x0||_0x5607f8[_0x1f0da7(0x1d9)][_0x1f0da7(0x1c5)][_0x1f0da7(0x22c)]>0x0||_0x5607f8[_0x1f0da7(0x1d9)]['textKnowledgeBases'][_0x1f0da7(0x22c)]>0x0||_0x5607f8[_0x1f0da7(0x1d9)][_0x1f0da7(0x190)][_0x1f0da7(0x22c)]>0x0;if(_0x17fb4e){console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x236)](_0x1f0da7(0x19b))),console['log'](),console['log'](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x1c2)));for(const _0x4bc547 of _0x5607f8[_0x1f0da7(0x233)]){_0x4bc547[_0x1f0da7(0x1e6)]===_0x1f0da7(0x187)&&console['log'](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x229)+_0x4bc547[_0x1f0da7(0x20e)]+'\x22:\x20'+_0x4bc547['error']));}for(const _0x1617f0 of _0x5607f8[_0x1f0da7(0x1c5)]){_0x1617f0[_0x1f0da7(0x1e6)]==='error'&&console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x1df)+_0x1617f0['name']+'\x22:\x20'+_0x1617f0[_0x1f0da7(0x187)]));}for(const _0x3bf86e of _0x5607f8[_0x1f0da7(0x201)]){_0x3bf86e[_0x1f0da7(0x1e6)]===_0x1f0da7(0x187)&&console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x237)+_0x3bf86e[_0x1f0da7(0x1a1)]+_0x1f0da7(0x234)+_0x3bf86e[_0x1f0da7(0x187)]));}for(const _0x1f0d2b of _0x5607f8[_0x1f0da7(0x190)]){_0x1f0d2b['action']==='error'&&console[_0x1f0da7(0x1f0)](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x1d0)+_0x1f0d2b[_0x1f0da7(0x1a1)]+_0x1f0da7(0x234)+_0x1f0d2b[_0x1f0da7(0x187)]));}for(const _0x3f96b8 of _0x5607f8[_0x1f0da7(0x1e7)]){_0x3f96b8['action']===_0x1f0da7(0x187)&&console['log'](a4_0xcb3dcc[_0x1f0da7(0x1ba)](_0x1f0da7(0x1fa)+_0x3f96b8[_0x1f0da7(0x1a1)]+_0x1f0da7(0x234)+_0x3f96b8[_0x1f0da7(0x187)]));}return 0x1;}console['log'](a4_0xcb3dcc['green'](_0x1f0da7(0x221)+(_0x33ece3+_0x25a3b5)+_0x1f0da7(0x1eb)+_0x5607f8[_0x1f0da7(0x1da)]+'\x27'));const _0x1dd703=getLLMProjectUrl(_0x227ff2,_0x5607f8[_0x1f0da7(0x222)]);return console[_0x1f0da7(0x1f0)](_0x1f0da7(0x1c1)+a4_0xcb3dcc['cyan'](_0x1dd703)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x47f9d3=a5_0x49ad;(function(_0x1c9f49,_0x39c767){const _0x5e3c3e=a5_0x49ad,_0x1b54e4=_0x1c9f49();while(!![]){try{const _0x10439c=-parseInt(_0x5e3c3e(0x21f))/0x1*(parseInt(_0x5e3c3e(0x1ce))/0x2)+parseInt(_0x5e3c3e(0x213))/0x3+parseInt(_0x5e3c3e(0x1a7))/0x4+parseInt(_0x5e3c3e(0x19a))/0x5+parseInt(_0x5e3c3e(0x205))/0x6+-parseInt(_0x5e3c3e(0x1d8))/0x7*(parseInt(_0x5e3c3e(0x201))/0x8)+-parseInt(_0x5e3c3e(0x190))/0x9;if(_0x10439c===_0x39c767)break;else _0x1b54e4['push'](_0x1b54e4['shift']());}catch(_0x290d27){_0x1b54e4['push'](_0x1b54e4['shift']());}}}(a5_0x281e,0xc0d08));import*as a5_0x167cab from'node:fs';import*as a5_0x390382 from'node:path';function a5_0x281e(){const _0x48a620=['red','Cached\x20run\x20is\x20from\x20site\x20\x22','\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)','\x20(cached)','Error\x20writing\x20output\x20file:\x20','yellow','3362256tTLTyU','start','trim','Evaluating\x20response...','Project\x20path:\x20','dryRun','has','size','/<agent-name>','description','3618585HcYXDX','repeat','reeval','Executing\x20new\x20tests...','timestamp','Passed:\x20\x20\x20','add','executeReeval','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','\x20-\x20','New\x20tests\x20to\x20execute:\x20','agentName','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','4839964ZNSfpe','Running\x20agent\x20tests...','filter','Failed\x20Tests:','includes','Cached\x20run\x20from:\x20','Errors:\x20\x20\x20','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','Available\x20tests:\x20','Duration:\x20','multiple_agents','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','verbose','no_tests','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','white','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','output','\x22:\x20','Failed:\x20\x20\x20','\x20\x20Site:\x20','status','llmProject','found','\x27\x20to\x20create\x20the\x20folder\x20structure.','find','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','✗\x20FAIL:\x20','\x20\x20Agent:\x20','⚠\x20SKIPPED:\x20','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','Usage:','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','execute','map','\x20(new)','writeFileSync','text','dim','2NoQpEt','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','isSpinning','agent:test','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','PASS','agentDirs','testName','✓\x20PASS:\x20','resolveAgentId','8607011hftRge','ERROR','not\x20found','no_context','FAIL','agent','Round\x20','testYmlPath','Re-evaluation\x20Summary',':\x20Sending\x20user\x20input...','\x20\x20Conversation:\x20','name','forEach','now','projectDir','rounds','round','...\x20','Either\x20switch\x20to\x20the\x20\x22','context','Tests\x20found:\x20','utf-8','Using\x20agent:\x20','Available\x20tags:\x20','site','No\x20tests\x20have\x20tags\x20defined.','✗\x20ERROR:\x20','Re-evaluating...','\x20\x20Project:\x20','No\x20tests\x20found\x20with\x20tags:\x20','resolveProjectId','conversations','\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','404','tsv','log','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','jsonl','projectName','tests','No\x20tests\x20found\x20matching:\x20','8rCNdsA','resolve','toISOString','Run\x20\x27tdx\x20agent\x20pull\x20','7653816hDPJZs','push','message','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','Round\x201/','...','\x22,\x20but\x20current\x20site\x20is\x20\x22','Running:\x20','stop','Conversation\x20URL:\x20','✗\x20ERROR:\x20Project\x20not\x20found:\x20','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','Run\x20tests\x20for\x20an\x20LLM\x20agent','Agent:\x20','759411cRuAZq','tags','cyan','Output\x20written\x20to:\x20','conversation_url','\x20\x20Evaluating...\x20','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','toLowerCase','length','reason','\x20\x20Round\x20','Re-evaluating\x20','1069556PatAFX','table','llm','green','split','source'];a5_0x281e=function(){return _0x48a620;};return a5_0x281e();}import a5_0x28a5ef from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';function a5_0x49ad(_0x510f2,_0x5a8229){_0x510f2=_0x510f2-0x18c;const _0x281e64=a5_0x281e();let _0x49ad17=_0x281e64[_0x510f2];return _0x49ad17;}import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{[a5_0x47f9d3(0x1e3)]=a5_0x47f9d3(0x1d1);[a5_0x47f9d3(0x199)]=a5_0x47f9d3(0x211);async[a5_0x47f9d3(0x1c8)](_0x1be806){const _0x24a035=a5_0x47f9d3,{options:_0x1534b5,args:_0x39fa35,tdx:_0x4331c8}=_0x1be806,_0x406182=_0x39fa35[0x0]||'.',_0x5285b4=_0x1534b5[_0x24a035(0x195)],_0x2a761c=_0x1534b5,_0x146035=_0x2a761c['eval']===![],_0x52e8fa=_0x2a761c[_0x24a035(0x19c)],_0xef6be7=_0x2a761c['name'],_0x495acb=_0x2a761c[_0x24a035(0x214)],_0x5f0856=_0x1534b5[_0x24a035(0x1f0)],_0x9a92f2=_0x2a761c[_0x24a035(0x1b8)];if(_0x52e8fa&&_0x146035)return console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x1ae))),0x1;let _0x1ea2ae=_0x24a035(0x220);if(_0x2a761c['json'])_0x1ea2ae='json';else{if(_0x2a761c[_0x24a035(0x1fd)])_0x1ea2ae='jsonl';else{if(_0x2a761c[_0x24a035(0x1fa)])_0x1ea2ae=_0x24a035(0x1fa);else{if(_0x2a761c['table'])_0x1ea2ae=_0x24a035(0x220);}}}const _0xc7fd9d=_0x2a761c[_0x24a035(0x1bd)];let _0x17bb7d=_0x406182;const _0x3f99ad=a5_0x167cab['existsSync'](_0x406182),_0x29c631=_0x406182==='.';if(!_0x3f99ad||_0x29c631){const _0x537f42=resolveProjectFromContext(_0x406182,_0xc7fd9d,{'requireFile':'test.yml'});if(_0x537f42[_0x24a035(0x1be)])_0x17bb7d=_0x537f42[_0x24a035(0x1e6)],_0x537f42[_0x24a035(0x224)]===_0x24a035(0x1eb)&&console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x1cd)](_0x24a035(0x1ee)+_0x17bb7d));else switch(_0x537f42['reason']){case _0x24a035(0x1db):console['log'](a5_0x28a5ef[_0x24a035(0x18f)](_0x537f42[_0x24a035(0x207)])),console[_0x24a035(0x1fb)](),console['log'](_0x24a035(0x1c6)),console[_0x24a035(0x1fb)](_0x24a035(0x1f8)),console['log'](_0x24a035(0x18c)),console['log'](),console[_0x24a035(0x1fb)](_0x24a035(0x210));return 0x1;case'no_local_folder':console['log'](a5_0x28a5ef['yellow'](_0x537f42[_0x24a035(0x207)])),console[_0x24a035(0x1fb)](),console[_0x24a035(0x1fb)](_0x24a035(0x204)+_0x537f42[_0x24a035(0x1bd)]+_0x24a035(0x1bf));return 0x1;case _0x24a035(0x1b1):{const _0x29e677=a5_0x390382['basename'](_0x537f42[_0x24a035(0x1e6)]);console['log'](a5_0x28a5ef['yellow'](_0x24a035(0x219)+_0x537f42[_0x24a035(0x1bd)]+'\x22:'));for(const _0x557708 of _0x537f42[_0x24a035(0x1d4)]){console['log']('\x20\x20-\x20'+_0x557708);}return console[_0x24a035(0x1fb)](),console['log']('Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/'+_0x29e677+_0x24a035(0x198)),0x1;}case _0x24a035(0x1b4):console['log'](a5_0x28a5ef[_0x24a035(0x18f)](_0x24a035(0x1cf)+_0x537f42['llmProject']+'\x22.')),console[_0x24a035(0x1fb)](a5_0x28a5ef['dim'](_0x24a035(0x194)+_0x537f42['projectDir'])),console[_0x24a035(0x1fb)](),console[_0x24a035(0x1fb)](_0x24a035(0x1b2));return 0x1;}}const {definition:_0x106678,agentInfo:_0x129700}=parseTestFile(_0x17bb7d);let _0x52a2f9=_0x106678[_0x24a035(0x1ff)];if(_0xef6be7){const _0x30b2e3=_0xef6be7['split'](',')[_0x24a035(0x1c9)](_0x4cc86c=>_0x4cc86c[_0x24a035(0x192)]());_0x52a2f9=_0x106678[_0x24a035(0x1ff)][_0x24a035(0x1a9)](_0x1d0531=>_0x30b2e3['includes'](_0x1d0531[_0x24a035(0x1e3)]));if(_0x52a2f9[_0x24a035(0x21b)]===0x0)return console['log'](a5_0x28a5ef[_0x24a035(0x18f)](_0x24a035(0x200)+_0xef6be7)),console['log'](a5_0x28a5ef[_0x24a035(0x1cd)](_0x24a035(0x1af)+_0x106678[_0x24a035(0x1ff)][_0x24a035(0x1c9)](_0x40ed9f=>_0x40ed9f[_0x24a035(0x1e3)])['join'](',\x20'))),0x1;}if(_0x495acb){const _0x5128a1=_0x495acb[_0x24a035(0x223)](',')[_0x24a035(0x1c9)](_0x17b5bb=>_0x17b5bb['trim']()[_0x24a035(0x21a)]());_0x52a2f9=_0x52a2f9['filter'](_0x1c5b54=>_0x1c5b54['tags']?.['some'](_0x3daaaf=>_0x5128a1[_0x24a035(0x1ab)](_0x3daaaf[_0x24a035(0x21a)]())));if(_0x52a2f9[_0x24a035(0x21b)]===0x0){console['log'](a5_0x28a5ef['yellow'](_0x24a035(0x1f5)+_0x495acb));const _0x1ea98a=new Set();return _0x106678['tests'][_0x24a035(0x1e4)](_0x10bc15=>_0x10bc15['tags']?.[_0x24a035(0x1e4)](_0x3989ad=>_0x1ea98a[_0x24a035(0x1a0)](_0x3989ad))),_0x1ea98a[_0x24a035(0x197)]>0x0?console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x1cd)](_0x24a035(0x1ef)+[..._0x1ea98a]['join'](',\x20'))):console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x1cd)](_0x24a035(0x1f1))),0x1;}}if(_0x52e8fa)return this[_0x24a035(0x1a1)](_0x1be806,{'definition':{'tests':_0x52a2f9},'agentInfo':_0x129700,'outputFormat':_0x1ea2ae,'outputFile':_0x9a92f2,'testNames':_0xef6be7});if(_0x5285b4){console['log'](a5_0x28a5ef[_0x24a035(0x215)]('Test\x20Configuration:')),console['log'](_0x24a035(0x1bb)+a5_0x28a5ef[_0x24a035(0x1b6)](_0x5f0856)),console['log'](_0x24a035(0x1f4)+a5_0x28a5ef[_0x24a035(0x1b6)](_0x129700[_0x24a035(0x1fe)])),console[_0x24a035(0x1fb)](_0x24a035(0x1c3)+a5_0x28a5ef['white'](_0x129700[_0x24a035(0x1a5)])),console[_0x24a035(0x1fb)](),console[_0x24a035(0x1fb)](_0x24a035(0x1ec)+a5_0x28a5ef['white'](_0x52a2f9[_0x24a035(0x21b)]));for(let _0x1ec49b=0x0;_0x1ec49b<_0x52a2f9[_0x24a035(0x21b)];_0x1ec49b++){const _0x155f38=_0x52a2f9[_0x1ec49b],_0x3b2096=_0x155f38[_0x24a035(0x1e7)][_0x24a035(0x21b)]===0x1?_0x24a035(0x1e8):_0x24a035(0x1e7),_0x36e116=_0x155f38[_0x24a035(0x214)]?.['length']?'\x20['+_0x155f38[_0x24a035(0x214)]['join'](',\x20')+']':'';console['log']('\x20\x20'+(_0x1ec49b+0x1)+'.\x20'+a5_0x28a5ef[_0x24a035(0x1b6)](_0x155f38[_0x24a035(0x1e3)])+'\x20('+_0x155f38['rounds'][_0x24a035(0x21b)]+'\x20'+_0x3b2096+')'+a5_0x28a5ef[_0x24a035(0x1cd)](_0x36e116));}return 0x0;}let _0x3508aa,_0x49bc4d;try{_0x3508aa=await _0x4331c8[_0x24a035(0x221)][_0x24a035(0x1f6)](_0x129700[_0x24a035(0x1fe)]);}catch(_0x2b0f36){const _0x4ea53e=_0x2b0f36 instanceof Error?_0x2b0f36[_0x24a035(0x207)]:String(_0x2b0f36);return _0x4ea53e[_0x24a035(0x1ab)](_0x24a035(0x1f9))||_0x4ea53e[_0x24a035(0x21a)]()['includes']('not\x20found')?console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x20f)+_0x129700['projectName'])):console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x1c1)+_0x129700['projectName']+'\x22:\x20'+_0x4ea53e)),0x1;}try{_0x49bc4d=await _0x4331c8['llm'][_0x24a035(0x1d7)](_0x129700['agentName'],_0x3508aa);}catch(_0x635109){const _0x3d0d0d=_0x635109 instanceof Error?_0x635109[_0x24a035(0x207)]:String(_0x635109);return _0x3d0d0d['includes'](_0x24a035(0x1f9))||_0x3d0d0d[_0x24a035(0x21a)]()[_0x24a035(0x1ab)](_0x24a035(0x1da))?console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x1fc)+_0x129700[_0x24a035(0x1a5)])):console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x1b7)+_0x129700[_0x24a035(0x1a5)]+_0x24a035(0x1b9)+_0x3d0d0d)),0x1;}let _0x23183d;if(!_0x146035)try{_0x23183d=await setupEvaluatorAgent(_0x4331c8[_0x24a035(0x221)],_0x1534b5[_0x24a035(0x1b3)]);}catch(_0x51107f){const _0x386b32=_0x51107f instanceof Error?_0x51107f['message']:String(_0x51107f);return console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x1b5)+_0x386b32)),0x1;}console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x215)](_0x24a035(0x1a8))),console[_0x24a035(0x1fb)]('Site:\x20'+a5_0x28a5ef[_0x24a035(0x1b6)](_0x5f0856)),console[_0x24a035(0x1fb)](_0x24a035(0x212)+a5_0x28a5ef[_0x24a035(0x1b6)](_0x129700['projectName']+'/'+_0x129700['agentName'])),console[_0x24a035(0x1fb)]();const _0x16ac3c=[],_0x1b288e=[],_0x54ade0=Date['now']();for(let _0x24eb85=0x0;_0x24eb85<_0x52a2f9['length'];_0x24eb85++){const _0x3f3205=_0x52a2f9[_0x24eb85];_0x52a2f9[_0x24a035(0x21b)]>0x1?console[_0x24a035(0x1fb)]('Test\x20'+(_0x24eb85+0x1)+'/'+_0x52a2f9[_0x24a035(0x21b)]+':\x20'+a5_0x28a5ef[_0x24a035(0x1b6)](_0x3f3205['name'])):console[_0x24a035(0x1fb)]('Running\x20test:\x20'+a5_0x28a5ef[_0x24a035(0x1b6)](_0x3f3205[_0x24a035(0x1e3)]));const _0x24e6d2=createCommandSpinner('Round\x201/'+_0x3f3205[_0x24a035(0x1e7)][_0x24a035(0x21b)]+_0x24a035(0x1e1));_0x24e6d2[_0x24a035(0x191)]();try{const {result:_0x15b029,conversation:_0x2ce439}=await runTest(_0x4331c8['llm'],_0x3f3205,{'agentId':_0x49bc4d,'projectId':_0x3508aa,'site':_0x5f0856,'noEval':_0x146035,'evaluatorId':_0x23183d,'onRoundStart':(_0x10b874,_0x14b2af)=>{const _0x307cfb=_0x24a035;_0x24e6d2['text']=_0x307cfb(0x1de)+(_0x10b874+0x1)+'/'+_0x14b2af+_0x307cfb(0x1e1);},'onRoundComplete':(_0x4d0a28,_0x6d165d,_0x3775a2)=>{const _0xa877a0=_0x24a035,_0x510aa7=formatElapsed(_0x6d165d);_0x3775a2?console[_0xa877a0(0x1fb)](_0xa877a0(0x21d)+(_0x4d0a28+0x1)+'/'+_0x3f3205[_0xa877a0(0x1e7)][_0xa877a0(0x21b)]+_0xa877a0(0x1e9)+a5_0x28a5ef[_0xa877a0(0x222)]('✓')+'\x20('+_0x510aa7+')'):console['log']('\x20\x20Round\x20'+(_0x4d0a28+0x1)+'/'+_0x3f3205[_0xa877a0(0x1e7)]['length']+_0xa877a0(0x1e9)+a5_0x28a5ef['red']('✗'));},'onEvaluationStart':()=>{const _0x223620=_0x24a035;_0x24e6d2[_0x223620(0x1cc)]='Evaluating\x20response...';},'onEvaluationComplete':_0x324e1d=>{const _0x427312=_0x24a035,_0x17b4f0=formatElapsed(_0x324e1d);console['log'](_0x427312(0x218)+a5_0x28a5ef[_0x427312(0x222)]('✓')+'\x20('+_0x17b4f0+')');}});_0x24e6d2[_0x24a035(0x20d)](),_0x16ac3c['push'](_0x15b029),_0x1b288e[_0x24a035(0x206)](_0x2ce439);if(_0x15b029[_0x24a035(0x1bc)]==='PASS')console['log'](a5_0x28a5ef[_0x24a035(0x222)](_0x24a035(0x1d6)+_0x15b029['reason']));else _0x15b029[_0x24a035(0x1bc)]===_0x24a035(0x1dc)?console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x1c2)+_0x15b029['reason'])):console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)](_0x24a035(0x1f2)+_0x15b029[_0x24a035(0x21c)]));_0x15b029[_0x24a035(0x217)]&&console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x1cd)](_0x24a035(0x20e)+_0x15b029[_0x24a035(0x217)])),console[_0x24a035(0x1fb)]();}catch(_0x5571e5){_0x24e6d2[_0x24a035(0x20d)]();const _0x3e6fd1=_0x5571e5 instanceof Error?_0x5571e5['message']:String(_0x5571e5);console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x225)]('✗\x20ERROR:\x20'+_0x3e6fd1)),console['log'](),_0x16ac3c[_0x24a035(0x206)]({'name':_0x3f3205[_0x24a035(0x1e3)],'status':_0x24a035(0x1d9),'reason':_0x3e6fd1,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}const _0x4892f4=Date[_0x24a035(0x1e5)]()-_0x54ade0,_0x2cf1ec=_0x16ac3c[_0x24a035(0x1a9)](_0x3c9908=>_0x3c9908[_0x24a035(0x1bc)]===_0x24a035(0x1d3))[_0x24a035(0x21b)],_0x4c9486=_0x16ac3c['filter'](_0xd27904=>_0xd27904[_0x24a035(0x1bc)]===_0x24a035(0x1dc))[_0x24a035(0x21b)],_0x5ee2c9=_0x16ac3c[_0x24a035(0x1a9)](_0x5eaf29=>_0x5eaf29[_0x24a035(0x1bc)]===_0x24a035(0x1d9))[_0x24a035(0x21b)];console[_0x24a035(0x1fb)]('━'[_0x24a035(0x19b)](0x3c)),console[_0x24a035(0x1fb)]('Test\x20Summary'),console[_0x24a035(0x1fb)]('━'[_0x24a035(0x19b)](0x3c)),console[_0x24a035(0x1fb)]('Total:\x20\x20\x20\x20'+_0x16ac3c['length']),console['log'](_0x24a035(0x19f)+a5_0x28a5ef[_0x24a035(0x222)](_0x2cf1ec)),console[_0x24a035(0x1fb)](_0x24a035(0x1ba)+a5_0x28a5ef[_0x24a035(0x225)](_0x4c9486));_0x5ee2c9>0x0&&console[_0x24a035(0x1fb)]('Errors:\x20\x20\x20'+a5_0x28a5ef['red'](_0x5ee2c9));console[_0x24a035(0x1fb)]('Duration:\x20'+formatElapsed(_0x4892f4)),console[_0x24a035(0x1fb)]('━'[_0x24a035(0x19b)](0x3c));const _0x135aa2=_0x16ac3c[_0x24a035(0x1a9)](_0x2fa054=>_0x2fa054[_0x24a035(0x1bc)]!==_0x24a035(0x1d3));if(_0x135aa2[_0x24a035(0x21b)]>0x0){console[_0x24a035(0x1fb)](),console['log'](_0x24a035(0x1aa));for(const _0x147222 of _0x135aa2){const _0x5eef91=a5_0x28a5ef[_0x24a035(0x225)]('✗'),_0x1b5580=_0x147222['reason'][_0x24a035(0x21b)]>0x32?_0x147222[_0x24a035(0x21c)]['substring'](0x0,0x32)+_0x24a035(0x20a):_0x147222[_0x24a035(0x21c)];console['log']('\x20\x20'+_0x5eef91+'\x20'+_0x147222[_0x24a035(0x1e3)]+':\x20'+_0x1b5580);}}const _0x2705f4={'summary':{'total':_0x16ac3c[_0x24a035(0x21b)],'passed':_0x2cf1ec,'failed':_0x4c9486,'errors':_0x5ee2c9>0x0?_0x5ee2c9:undefined,'duration_ms':_0x4892f4},'tests':_0x16ac3c,'agent':{'project':_0x129700[_0x24a035(0x1fe)],'name':_0x129700['agentName'],'site':_0x5f0856},'timestamp':new Date(_0x54ade0)['toISOString']()};try{const _0x5ce5c0=buildCachedTestRun(_0x1b288e,{'site':_0x5f0856,'projectId':_0x3508aa,'projectName':_0x129700[_0x24a035(0x1fe)],'agentId':_0x49bc4d,'agentName':_0x129700[_0x24a035(0x1a5)],'testYmlPath':a5_0x390382[_0x24a035(0x202)](_0x129700[_0x24a035(0x1df)])});saveLastTestRun(_0x5ce5c0);}catch{}if(_0x1ea2ae!==_0x24a035(0x220)||_0x9a92f2){const _0x4b6679=formatResults(_0x2705f4,_0x1ea2ae);if(_0x9a92f2)try{a5_0x167cab[_0x24a035(0x1cb)](_0x9a92f2,_0x4b6679,_0x24a035(0x1ed)),console[_0x24a035(0x1fb)](),console[_0x24a035(0x1fb)](a5_0x28a5ef[_0x24a035(0x1cd)]('Output\x20written\x20to:\x20'+_0x9a92f2));}catch(_0x5e301b){return console[_0x24a035(0x1fb)](),console['log'](a5_0x28a5ef[_0x24a035(0x225)]('Error\x20writing\x20output\x20file:\x20'+_0x5e301b)),0x1;}else console['log'](),console[_0x24a035(0x1fb)](_0x4b6679);}return _0x135aa2[_0x24a035(0x21b)]>0x0?0x1:0x0;}async[a5_0x47f9d3(0x1a1)](_0x11b6cb,_0x16c8a5){const _0x1fbbe0=a5_0x47f9d3,{options:_0x9261d8,tdx:_0x3beddc}=_0x11b6cb,{definition:_0x2c50d5,agentInfo:_0x2fcb58,outputFormat:_0x222146,outputFile:_0x13bd7f}=_0x16c8a5,_0x413995=_0x9261d8[_0x1fbbe0(0x1f0)],_0x11ea6f=loadLastTestRun();if(!_0x11ea6f)return console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x225)]('Error:\x20No\x20previous\x20test\x20run\x20found.')),console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x1cd)](_0x1fbbe0(0x1a2))),0x1;if(_0x11ea6f[_0x1fbbe0(0x1dd)][_0x1fbbe0(0x1a5)]!==_0x2fcb58['agentName'])return console['log'](a5_0x28a5ef[_0x1fbbe0(0x225)](_0x1fbbe0(0x1a6)+_0x11ea6f['agent'][_0x1fbbe0(0x1a5)]+'\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22'+_0x2fcb58[_0x1fbbe0(0x1a5)]+'\x22.')),console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x1cd)](_0x1fbbe0(0x208))),0x1;const _0x206b39=new Set(_0x11ea6f[_0x1fbbe0(0x1f7)][_0x1fbbe0(0x1c9)](_0x5a7e5a=>_0x5a7e5a[_0x1fbbe0(0x1d5)])),_0x85179b=_0x2c50d5[_0x1fbbe0(0x1ff)]['filter'](_0x20200c=>!_0x206b39[_0x1fbbe0(0x196)](_0x20200c[_0x1fbbe0(0x1e3)]));if(_0x85179b[_0x1fbbe0(0x21b)]>0x0&&_0x11ea6f[_0x1fbbe0(0x1f0)]!==_0x413995)return console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x225)](_0x1fbbe0(0x1c5))),console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x1cd)](_0x1fbbe0(0x226)+_0x11ea6f['site']+_0x1fbbe0(0x20b)+_0x413995+'\x22.')),console[_0x1fbbe0(0x1fb)](a5_0x28a5ef['dim'](_0x1fbbe0(0x1ea)+_0x11ea6f['site']+_0x1fbbe0(0x1c7))),0x1;const _0x21972a=_0x2c50d5[_0x1fbbe0(0x1ff)][_0x1fbbe0(0x1a9)](_0x4d5ae9=>_0x206b39['has'](_0x4d5ae9['name'])),_0x417aa9=_0x85179b;let _0x2b75ba;try{_0x2b75ba=await setupEvaluatorAgent(_0x3beddc['llm'],_0x9261d8[_0x1fbbe0(0x1b3)]);}catch(_0x5e2d28){const _0x4eb424=_0x5e2d28 instanceof Error?_0x5e2d28['message']:String(_0x5e2d28);return console['log'](a5_0x28a5ef[_0x1fbbe0(0x225)](_0x1fbbe0(0x1b5)+_0x4eb424)),0x1;}console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x215)]('Re-evaluating\x20cached\x20test\x20run...')),console[_0x1fbbe0(0x1fb)](_0x1fbbe0(0x1ac)+a5_0x28a5ef[_0x1fbbe0(0x1b6)](_0x11ea6f[_0x1fbbe0(0x19e)])),console[_0x1fbbe0(0x1fb)](_0x1fbbe0(0x212)+a5_0x28a5ef[_0x1fbbe0(0x1b6)](_0x11ea6f[_0x1fbbe0(0x1dd)][_0x1fbbe0(0x1fe)]+'/'+_0x11ea6f[_0x1fbbe0(0x1dd)][_0x1fbbe0(0x1a5)]));_0x417aa9['length']>0x0&&console['log'](_0x1fbbe0(0x1a4)+a5_0x28a5ef['yellow'](_0x417aa9[_0x1fbbe0(0x21b)]));console['log']();const _0x2a45d1=[],_0x49aced=Date['now'](),_0x184002=createCommandSpinner(_0x1fbbe0(0x1f3));if(_0x21972a[_0x1fbbe0(0x21b)]>0x0)try{const _0x5a38fc=await reevaluateFromCache(_0x3beddc[_0x1fbbe0(0x221)],_0x11ea6f,{'tests':_0x21972a},{'evaluatorId':_0x2b75ba,'onTestStart':(_0xa5e27c,_0xdbb9b5,_0x35830f)=>{const _0x13426a=_0x1fbbe0;_0x184002[_0x13426a(0x1cc)]=_0x13426a(0x21e)+(_0xdbb9b5+0x1)+'/'+_0x35830f+':\x20'+_0xa5e27c+_0x13426a(0x20a);if(!_0x184002[_0x13426a(0x1d0)])_0x184002[_0x13426a(0x191)]();},'onTestComplete':(_0x526fde,_0x52e9e8)=>{const _0x441a7b=_0x1fbbe0;_0x184002[_0x441a7b(0x20d)]();if(_0x52e9e8[_0x441a7b(0x1bc)]==='PASS')console['log'](a5_0x28a5ef[_0x441a7b(0x222)](_0x441a7b(0x1d6)+_0x526fde)+a5_0x28a5ef[_0x441a7b(0x1cd)]('\x20(cached)'));else _0x52e9e8[_0x441a7b(0x1bc)]===_0x441a7b(0x1dc)?console['log'](a5_0x28a5ef['red'](_0x441a7b(0x1c2)+_0x526fde+_0x441a7b(0x1a3)+_0x52e9e8[_0x441a7b(0x21c)])+a5_0x28a5ef[_0x441a7b(0x1cd)](_0x441a7b(0x18d))):console['log'](a5_0x28a5ef['red']('✗\x20ERROR:\x20'+_0x526fde+_0x441a7b(0x1a3)+_0x52e9e8[_0x441a7b(0x21c)]));_0x52e9e8[_0x441a7b(0x217)]&&console[_0x441a7b(0x1fb)](a5_0x28a5ef['dim'](_0x441a7b(0x1e2)+_0x52e9e8[_0x441a7b(0x217)])),_0x2a45d1[_0x441a7b(0x206)](_0x52e9e8);},'onTestSkipped':(_0x44a038,_0x1a4203)=>{const _0x3677a9=_0x1fbbe0;_0x184002[_0x3677a9(0x20d)](),console[_0x3677a9(0x1fb)](a5_0x28a5ef[_0x3677a9(0x18f)](_0x3677a9(0x1c4)+_0x44a038+_0x3677a9(0x1a3)+_0x1a4203));}});for(const _0x302f5e of _0x5a38fc){!_0x2a45d1[_0x1fbbe0(0x1c0)](_0x1afa0a=>_0x1afa0a[_0x1fbbe0(0x1e3)]===_0x302f5e[_0x1fbbe0(0x1e3)])&&_0x2a45d1[_0x1fbbe0(0x206)](_0x302f5e);}}catch(_0x5a1cd5){_0x184002[_0x1fbbe0(0x20d)]();const _0x325259=_0x5a1cd5 instanceof Error?_0x5a1cd5['message']:String(_0x5a1cd5);return console['log'](a5_0x28a5ef['red'](_0x1fbbe0(0x1d2)+_0x325259)),0x1;}_0x184002[_0x1fbbe0(0x20d)]();if(_0x417aa9['length']>0x0){console[_0x1fbbe0(0x1fb)](),console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x215)](_0x1fbbe0(0x19d)));const {projectId:_0xc89d35,agentId:_0x260d37}=_0x11ea6f[_0x1fbbe0(0x1dd)];for(const _0x145321 of _0x417aa9){console['log'](_0x1fbbe0(0x20c)+a5_0x28a5ef['white'](_0x145321[_0x1fbbe0(0x1e3)]));const _0x57616a=createCommandSpinner(_0x1fbbe0(0x209)+_0x145321[_0x1fbbe0(0x1e7)][_0x1fbbe0(0x21b)]+_0x1fbbe0(0x1e1));_0x57616a[_0x1fbbe0(0x191)]();try{const {result:_0x1438fb}=await runTest(_0x3beddc['llm'],_0x145321,{'agentId':_0x260d37,'projectId':_0xc89d35,'site':_0x11ea6f['site'],'noEval':![],'evaluatorId':_0x2b75ba,'onRoundStart':(_0x5c3101,_0x37c229)=>{const _0x10ed30=_0x1fbbe0;_0x57616a[_0x10ed30(0x1cc)]=_0x10ed30(0x1de)+(_0x5c3101+0x1)+'/'+_0x37c229+_0x10ed30(0x1e1);},'onRoundComplete':(_0x4c2685,_0x118d81,_0x558fa5)=>{const _0x8cf214=_0x1fbbe0,_0x103ac2=formatElapsed(_0x118d81);_0x558fa5?console[_0x8cf214(0x1fb)](_0x8cf214(0x21d)+(_0x4c2685+0x1)+'/'+_0x145321[_0x8cf214(0x1e7)]['length']+_0x8cf214(0x1e9)+a5_0x28a5ef[_0x8cf214(0x222)]('✓')+'\x20('+_0x103ac2+')'):console[_0x8cf214(0x1fb)](_0x8cf214(0x21d)+(_0x4c2685+0x1)+'/'+_0x145321[_0x8cf214(0x1e7)][_0x8cf214(0x21b)]+_0x8cf214(0x1e9)+a5_0x28a5ef[_0x8cf214(0x225)]('✗'));},'onEvaluationStart':()=>{const _0x47a844=_0x1fbbe0;_0x57616a[_0x47a844(0x1cc)]=_0x47a844(0x193);},'onEvaluationComplete':_0xe06c27=>{const _0x28d98e=_0x1fbbe0,_0x555462=formatElapsed(_0xe06c27);console[_0x28d98e(0x1fb)](_0x28d98e(0x218)+a5_0x28a5ef[_0x28d98e(0x222)]('✓')+'\x20('+_0x555462+')');}});_0x57616a[_0x1fbbe0(0x20d)](),_0x2a45d1['push'](_0x1438fb);if(_0x1438fb[_0x1fbbe0(0x1bc)]===_0x1fbbe0(0x1d3))console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x222)](_0x1fbbe0(0x1d6)+_0x1438fb['reason'])+a5_0x28a5ef[_0x1fbbe0(0x1cd)]('\x20(new)'));else _0x1438fb[_0x1fbbe0(0x1bc)]===_0x1fbbe0(0x1dc)?console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x225)]('✗\x20FAIL:\x20'+_0x1438fb[_0x1fbbe0(0x21c)])+a5_0x28a5ef[_0x1fbbe0(0x1cd)](_0x1fbbe0(0x1ca))):console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x225)](_0x1fbbe0(0x1f2)+_0x1438fb[_0x1fbbe0(0x21c)]));_0x1438fb[_0x1fbbe0(0x217)]&&console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x1cd)]('\x20\x20Conversation:\x20'+_0x1438fb[_0x1fbbe0(0x217)]));}catch(_0x19ca22){_0x57616a['stop']();const _0x19a6a6=_0x19ca22 instanceof Error?_0x19ca22[_0x1fbbe0(0x207)]:String(_0x19ca22);console[_0x1fbbe0(0x1fb)](a5_0x28a5ef[_0x1fbbe0(0x225)](_0x1fbbe0(0x1f2)+_0x19a6a6)),_0x2a45d1[_0x1fbbe0(0x206)]({'name':_0x145321[_0x1fbbe0(0x1e3)],'status':_0x1fbbe0(0x1d9),'reason':_0x19a6a6,'timestamp':new Date()[_0x1fbbe0(0x203)](),'duration_ms':0x0});}}}console[_0x1fbbe0(0x1fb)]();const _0x5fb0d7=Date[_0x1fbbe0(0x1e5)]()-_0x49aced,_0x149f5b=_0x2a45d1[_0x1fbbe0(0x1a9)](_0x40a5bd=>_0x40a5bd['status']===_0x1fbbe0(0x1d3))[_0x1fbbe0(0x21b)],_0x67d1a9=_0x2a45d1[_0x1fbbe0(0x1a9)](_0x48a1c5=>_0x48a1c5[_0x1fbbe0(0x1bc)]===_0x1fbbe0(0x1dc))[_0x1fbbe0(0x21b)],_0x963a9a=_0x2a45d1[_0x1fbbe0(0x1a9)](_0x4c4061=>_0x4c4061[_0x1fbbe0(0x1bc)]===_0x1fbbe0(0x1d9))['length'];console[_0x1fbbe0(0x1fb)]('━'[_0x1fbbe0(0x19b)](0x3c)),console[_0x1fbbe0(0x1fb)](_0x1fbbe0(0x1e0)),console[_0x1fbbe0(0x1fb)]('━'[_0x1fbbe0(0x19b)](0x3c)),console['log']('Total:\x20\x20\x20\x20'+_0x2a45d1['length']),console[_0x1fbbe0(0x1fb)](_0x1fbbe0(0x19f)+a5_0x28a5ef[_0x1fbbe0(0x222)](_0x149f5b)),console[_0x1fbbe0(0x1fb)]('Failed:\x20\x20\x20'+a5_0x28a5ef[_0x1fbbe0(0x225)](_0x67d1a9));_0x963a9a>0x0&&console[_0x1fbbe0(0x1fb)](_0x1fbbe0(0x1ad)+a5_0x28a5ef['red'](_0x963a9a));console[_0x1fbbe0(0x1fb)](_0x1fbbe0(0x1b0)+formatElapsed(_0x5fb0d7)),console[_0x1fbbe0(0x1fb)]('━'[_0x1fbbe0(0x19b)](0x3c));const _0x5d4092={'summary':{'total':_0x2a45d1[_0x1fbbe0(0x21b)],'passed':_0x149f5b,'failed':_0x67d1a9,'errors':_0x963a9a>0x0?_0x963a9a:undefined,'duration_ms':_0x5fb0d7},'tests':_0x2a45d1,'agent':{'project':_0x2fcb58['projectName'],'name':_0x2fcb58['agentName'],'site':_0x413995},'timestamp':new Date(_0x49aced)[_0x1fbbe0(0x203)]()};if(_0x222146!==_0x1fbbe0(0x220)||_0x13bd7f){const _0x357b49=formatResults(_0x5d4092,_0x222146);if(_0x13bd7f)try{a5_0x167cab[_0x1fbbe0(0x1cb)](_0x13bd7f,_0x357b49,'utf-8'),console[_0x1fbbe0(0x1fb)](),console['log'](a5_0x28a5ef[_0x1fbbe0(0x1cd)](_0x1fbbe0(0x216)+_0x13bd7f));}catch(_0x1100f8){return console[_0x1fbbe0(0x1fb)](),console[_0x1fbbe0(0x1fb)](a5_0x28a5ef['red'](_0x1fbbe0(0x18e)+_0x1100f8)),0x1;}else console['log'](),console[_0x1fbbe0(0x1fb)](_0x357b49);}const _0x59c867=_0x2a45d1[_0x1fbbe0(0x1a9)](_0x1c6171=>_0x1c6171[_0x1fbbe0(0x1bc)]!==_0x1fbbe0(0x1d3));return _0x59c867[_0x1fbbe0(0x21b)]>0x0?0x1:0x0;}}
|
|
1
|
+
const a5_0x4e1639=a5_0x407e;(function(_0x1852e6,_0x51554f){const _0xf2f2c5=a5_0x407e,_0x460f8c=_0x1852e6();while(!![]){try{const _0x13bd9c=parseInt(_0xf2f2c5(0xe6))/0x1+-parseInt(_0xf2f2c5(0xcc))/0x2*(parseInt(_0xf2f2c5(0x85))/0x3)+-parseInt(_0xf2f2c5(0x8c))/0x4+parseInt(_0xf2f2c5(0xdd))/0x5+parseInt(_0xf2f2c5(0xa4))/0x6*(-parseInt(_0xf2f2c5(0x6f))/0x7)+-parseInt(_0xf2f2c5(0xa6))/0x8+parseInt(_0xf2f2c5(0xf2))/0x9*(parseInt(_0xf2f2c5(0x98))/0xa);if(_0x13bd9c===_0x51554f)break;else _0x460f8c['push'](_0x460f8c['shift']());}catch(_0x83220e){_0x460f8c['push'](_0x460f8c['shift']());}}}(a5_0x2c0c,0x62fbd));function a5_0x2c0c(){const _0x53b89d=['✓\x20PASS:\x20','agentName','no_tests','stop','Evaluating\x20response...','isSpinning','Running\x20agent\x20tests...','Cached\x20run\x20is\x20from\x20site\x20\x22','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','size','FAIL','no_local_folder','...','Executing\x20new\x20tests...','forEach','Running\x20test:\x20','now','✗\x20ERROR:\x20','jsonl','red','No\x20tests\x20have\x20tags\x20defined.','log','Run\x20\x27tdx\x20agent\x20pull\x20','round','testName','\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','Error\x20writing\x20output\x20file:\x20','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','no_context','Duration:\x20','90028ruEoYi','map','\x20-\x20','projectName','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','Re-evaluating...','name','toISOString','Total:\x20\x20\x20\x20','agent','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','has','tags','PASS','split','tests','3540105BNqdIJ','basename','execute','conversation_url','Re-evaluating\x20cached\x20test\x20run...','Test\x20Configuration:','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','timestamp','635722QnYSCQ','Available\x20tags:\x20','push','site','dryRun','includes','repeat','llm','Either\x20switch\x20to\x20the\x20\x22','404','testYmlPath','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','1203480zlVkyp','substring','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','executeReeval','message','rounds','\x20\x20Agent:\x20','projectDir','Failed:\x20\x20\x20','\x20\x20Evaluating...\x20','dim','Errors:\x20\x20\x20','test.yml',':\x20Sending\x20user\x20input...','verbose','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','writeFileSync','1253kpzEWR','filter','yellow','No\x20tests\x20found\x20matching:\x20','toLowerCase','output','\x22:\x20','resolveAgentId','/<agent-name>','reason','json','Error:\x20No\x20previous\x20test\x20run\x20found.','...\x20','multiple_agents','status','green','Round\x20','No\x20tests\x20found\x20with\x20tags:\x20','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','Output\x20written\x20to:\x20','white','Usage:','33PLrhQt','find','\x20(new)','add','resolve','Site:\x20','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','1193560qMjKqK','llmProject','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','Using\x20agent:\x20','✗\x20FAIL:\x20','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','✗\x20ERROR:\x20Project\x20not\x20found:\x20','\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)','\x20(cached)','\x27\x20to\x20create\x20the\x20folder\x20structure.','agent:test','Passed:\x20\x20\x20','80ISfkgk','\x20\x20Round\x20','utf-8','ERROR','Re-evaluation\x20Summary','table','\x20\x20Conversation:\x20','text','cyan','length','start','not\x20found','20598GbNjaX','Agent:\x20','4800120RVmibu','tsv','Cached\x20run\x20from:\x20','trim','Test\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','Round\x201/','agentDirs'];a5_0x2c0c=function(){return _0x53b89d;};return a5_0x2c0c();}function a5_0x407e(_0x5ed5b8,_0x185201){_0x5ed5b8=_0x5ed5b8-0x6e;const _0x2c0c8a=a5_0x2c0c();let _0x407e32=_0x2c0c8a[_0x5ed5b8];return _0x407e32;}import*as a5_0x98918f from'node:fs';import*as a5_0x426331 from'node:path';import a5_0x4b905d from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';export class AgentTestCommand extends BaseCommand{['name']=a5_0x4e1639(0x96);['description']='Run\x20tests\x20for\x20an\x20LLM\x20agent';async[a5_0x4e1639(0xdf)](_0x218d6f){const _0x304fa2=a5_0x4e1639,{options:_0x588bc8,args:_0x127207,tdx:_0x2ffeba}=_0x218d6f,_0x13e72f=_0x127207[0x0]||'.',_0x5449bb=_0x588bc8[_0x304fa2(0xea)],_0x3bc4e6=_0x588bc8,_0x491732=_0x3bc4e6['eval']===![],_0x547b4f=_0x3bc4e6['reeval'],_0x406397=_0x3bc4e6[_0x304fa2(0xd3)],_0x47e2b5=_0x3bc4e6[_0x304fa2(0xd9)],_0x42741d=_0x588bc8['site'],_0x16e2fb=_0x3bc4e6[_0x304fa2(0x74)];if(_0x547b4f&&_0x491732)return console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xc1)](_0x304fa2(0x81))),0x1;let _0x7c2dfa=_0x304fa2(0x9d);if(_0x3bc4e6[_0x304fa2(0x79)])_0x7c2dfa='json';else{if(_0x3bc4e6[_0x304fa2(0xc0)])_0x7c2dfa='jsonl';else{if(_0x3bc4e6['tsv'])_0x7c2dfa=_0x304fa2(0xa7);else{if(_0x3bc4e6[_0x304fa2(0x9d)])_0x7c2dfa=_0x304fa2(0x9d);}}}const _0x8410cc=_0x3bc4e6['llmProject'];let _0x15ac14=_0x13e72f;const _0xb91e29=a5_0x98918f['existsSync'](_0x13e72f),_0x5de1ae=_0x13e72f==='.';if(!_0xb91e29||_0x5de1ae){const _0x3921f3=resolveProjectFromContext(_0x13e72f,_0x8410cc,{'requireFile':_0x304fa2(0xfe)});if(_0x3921f3['found'])_0x15ac14=_0x3921f3['projectDir'],_0x3921f3['source']==='context'&&console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xfc)](_0x304fa2(0x8f)+_0x15ac14));else switch(_0x3921f3['reason']){case _0x304fa2(0xca):console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0x71)](_0x3921f3[_0x304fa2(0xf6)])),console['log'](),console[_0x304fa2(0xc3)](_0x304fa2(0x84)),console[_0x304fa2(0xc3)](_0x304fa2(0xc7)),console['log'](_0x304fa2(0x93)),console[_0x304fa2(0xc3)](),console[_0x304fa2(0xc3)](_0x304fa2(0x8b));return 0x1;case _0x304fa2(0xb9):console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0x71)](_0x3921f3[_0x304fa2(0xf6)])),console[_0x304fa2(0xc3)](),console[_0x304fa2(0xc3)](_0x304fa2(0xc4)+_0x3921f3[_0x304fa2(0x8d)]+_0x304fa2(0x95));return 0x1;case _0x304fa2(0x7c):{const _0x3560e6=a5_0x426331[_0x304fa2(0xde)](_0x3921f3[_0x304fa2(0xf9)]);console[_0x304fa2(0xc3)](a5_0x4b905d['yellow'](_0x304fa2(0xd0)+_0x3921f3[_0x304fa2(0x8d)]+'\x22:'));for(const _0x2f8a43 of _0x3921f3[_0x304fa2(0xad)]){console['log']('\x20\x20-\x20'+_0x2f8a43);}return console['log'](),console[_0x304fa2(0xc3)](_0x304fa2(0xb6)+_0x3560e6+_0x304fa2(0x77)),0x1;}case _0x304fa2(0xb0):console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0x71)]('No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22'+_0x3921f3['llmProject']+'\x22.')),console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xfc)]('Project\x20path:\x20'+_0x3921f3[_0x304fa2(0xf9)])),console[_0x304fa2(0xc3)](),console[_0x304fa2(0xc3)](_0x304fa2(0xd7));return 0x1;}}const {definition:_0xd36abe,agentInfo:_0x1f43eb}=parseTestFile(_0x15ac14);let _0x126b3d=_0xd36abe[_0x304fa2(0xdc)];if(_0x406397){const _0xbd0263=_0x406397['split'](',')[_0x304fa2(0xcd)](_0x4d95ab=>_0x4d95ab['trim']());_0x126b3d=_0xd36abe[_0x304fa2(0xdc)]['filter'](_0x16e3eb=>_0xbd0263[_0x304fa2(0xeb)](_0x16e3eb[_0x304fa2(0xd3)]));if(_0x126b3d[_0x304fa2(0xa1)]===0x0)return console[_0x304fa2(0xc3)](a5_0x4b905d['yellow'](_0x304fa2(0x72)+_0x406397)),console['log'](a5_0x4b905d['dim']('Available\x20tests:\x20'+_0xd36abe[_0x304fa2(0xdc)][_0x304fa2(0xcd)](_0x5f3674=>_0x5f3674['name'])['join'](',\x20'))),0x1;}if(_0x47e2b5){const _0x2d8739=_0x47e2b5[_0x304fa2(0xdb)](',')['map'](_0xf0674=>_0xf0674[_0x304fa2(0xa9)]()[_0x304fa2(0x73)]());_0x126b3d=_0x126b3d[_0x304fa2(0x70)](_0x3e5930=>_0x3e5930[_0x304fa2(0xd9)]?.['some'](_0x4aac9f=>_0x2d8739[_0x304fa2(0xeb)](_0x4aac9f['toLowerCase']())));if(_0x126b3d['length']===0x0){console[_0x304fa2(0xc3)](a5_0x4b905d['yellow'](_0x304fa2(0x80)+_0x47e2b5));const _0x4ddca8=new Set();return _0xd36abe['tests'][_0x304fa2(0xbc)](_0x5d82e9=>_0x5d82e9[_0x304fa2(0xd9)]?.['forEach'](_0x3434f1=>_0x4ddca8[_0x304fa2(0x88)](_0x3434f1))),_0x4ddca8[_0x304fa2(0xb7)]>0x0?console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xfc)](_0x304fa2(0xe7)+[..._0x4ddca8]['join'](',\x20'))):console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xfc)](_0x304fa2(0xc2))),0x1;}}if(_0x547b4f)return this['executeReeval'](_0x218d6f,{'definition':{'tests':_0x126b3d},'agentInfo':_0x1f43eb,'outputFormat':_0x7c2dfa,'outputFile':_0x16e2fb,'testNames':_0x406397});if(_0x5449bb){console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xa0)](_0x304fa2(0xe2))),console[_0x304fa2(0xc3)]('\x20\x20Site:\x20'+a5_0x4b905d[_0x304fa2(0x83)](_0x42741d)),console[_0x304fa2(0xc3)]('\x20\x20Project:\x20'+a5_0x4b905d['white'](_0x1f43eb[_0x304fa2(0xcf)])),console[_0x304fa2(0xc3)](_0x304fa2(0xf8)+a5_0x4b905d[_0x304fa2(0x83)](_0x1f43eb[_0x304fa2(0xaf)])),console[_0x304fa2(0xc3)](),console['log']('Tests\x20found:\x20'+a5_0x4b905d[_0x304fa2(0x83)](_0x126b3d[_0x304fa2(0xa1)]));for(let _0x96db5d=0x0;_0x96db5d<_0x126b3d['length'];_0x96db5d++){const _0x1e16cf=_0x126b3d[_0x96db5d],_0x3c9aa2=_0x1e16cf[_0x304fa2(0xf7)][_0x304fa2(0xa1)]===0x1?_0x304fa2(0xc5):'rounds',_0x439816=_0x1e16cf[_0x304fa2(0xd9)]?.[_0x304fa2(0xa1)]?'\x20['+_0x1e16cf[_0x304fa2(0xd9)]['join'](',\x20')+']':'';console[_0x304fa2(0xc3)]('\x20\x20'+(_0x96db5d+0x1)+'.\x20'+a5_0x4b905d[_0x304fa2(0x83)](_0x1e16cf[_0x304fa2(0xd3)])+'\x20('+_0x1e16cf['rounds'][_0x304fa2(0xa1)]+'\x20'+_0x3c9aa2+')'+a5_0x4b905d[_0x304fa2(0xfc)](_0x439816));}return 0x0;}let _0x2c1279,_0x16bc52;try{_0x2c1279=await _0x2ffeba[_0x304fa2(0xed)]['resolveProjectId'](_0x1f43eb[_0x304fa2(0xcf)]);}catch(_0x2558a3){const _0x2b9357=_0x2558a3 instanceof Error?_0x2558a3[_0x304fa2(0xf6)]:String(_0x2558a3);return _0x2b9357[_0x304fa2(0xeb)](_0x304fa2(0xef))||_0x2b9357[_0x304fa2(0x73)]()[_0x304fa2(0xeb)](_0x304fa2(0xa3))?console['log'](a5_0x4b905d[_0x304fa2(0xc1)](_0x304fa2(0x92)+_0x1f43eb[_0x304fa2(0xcf)])):console['log'](a5_0x4b905d[_0x304fa2(0xc1)]('✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22'+_0x1f43eb[_0x304fa2(0xcf)]+_0x304fa2(0x75)+_0x2b9357)),0x1;}try{_0x16bc52=await _0x2ffeba[_0x304fa2(0xed)][_0x304fa2(0x76)](_0x1f43eb[_0x304fa2(0xaf)],_0x2c1279);}catch(_0x28880c){const _0x297591=_0x28880c instanceof Error?_0x28880c[_0x304fa2(0xf6)]:String(_0x28880c);return _0x297591[_0x304fa2(0xeb)](_0x304fa2(0xef))||_0x297591[_0x304fa2(0x73)]()[_0x304fa2(0xeb)]('not\x20found')?console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xc1)](_0x304fa2(0x91)+_0x1f43eb['agentName'])):console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xc1)](_0x304fa2(0xe4)+_0x1f43eb['agentName']+_0x304fa2(0x75)+_0x297591)),0x1;}let _0x25be47;if(!_0x491732)try{_0x25be47=await setupEvaluatorAgent(_0x2ffeba[_0x304fa2(0xed)],_0x588bc8[_0x304fa2(0x100)]);}catch(_0x4858cc){const _0x37382f=_0x4858cc instanceof Error?_0x4858cc[_0x304fa2(0xf6)]:String(_0x4858cc);return console[_0x304fa2(0xc3)](a5_0x4b905d['red']('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x37382f)),0x1;}console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xa0)](_0x304fa2(0xb4))),console['log'](_0x304fa2(0x8a)+a5_0x4b905d[_0x304fa2(0x83)](_0x42741d)),console[_0x304fa2(0xc3)](_0x304fa2(0xa5)+a5_0x4b905d[_0x304fa2(0x83)](_0x1f43eb[_0x304fa2(0xcf)]+'/'+_0x1f43eb[_0x304fa2(0xaf)])),console[_0x304fa2(0xc3)]();const _0x888e72=[],_0x3033ae=[],_0x43f04e=Date['now']();for(let _0xdd72a3=0x0;_0xdd72a3<_0x126b3d[_0x304fa2(0xa1)];_0xdd72a3++){const _0xb4dba5=_0x126b3d[_0xdd72a3];_0x126b3d[_0x304fa2(0xa1)]>0x1?console[_0x304fa2(0xc3)](_0x304fa2(0xaa)+(_0xdd72a3+0x1)+'/'+_0x126b3d[_0x304fa2(0xa1)]+':\x20'+a5_0x4b905d[_0x304fa2(0x83)](_0xb4dba5[_0x304fa2(0xd3)])):console[_0x304fa2(0xc3)](_0x304fa2(0xbd)+a5_0x4b905d[_0x304fa2(0x83)](_0xb4dba5[_0x304fa2(0xd3)]));const _0x4c80e2=createCommandSpinner(_0x304fa2(0xac)+_0xb4dba5[_0x304fa2(0xf7)][_0x304fa2(0xa1)]+':\x20Sending\x20user\x20input...');_0x4c80e2[_0x304fa2(0xa2)]();try{const {result:_0x5d2ba8,conversation:_0x28562a}=await runTest(_0x2ffeba[_0x304fa2(0xed)],_0xb4dba5,{'agentId':_0x16bc52,'projectId':_0x2c1279,'site':_0x42741d,'noEval':_0x491732,'evaluatorId':_0x25be47,'onRoundStart':(_0x53bdcc,_0x2aab92)=>{const _0x6ec75c=_0x304fa2;_0x4c80e2[_0x6ec75c(0x9f)]='Round\x20'+(_0x53bdcc+0x1)+'/'+_0x2aab92+_0x6ec75c(0xff);},'onRoundComplete':(_0x580c9c,_0x2d2e65,_0x323061)=>{const _0x2b64a3=_0x304fa2,_0x4f3a62=formatElapsed(_0x2d2e65);_0x323061?console[_0x2b64a3(0xc3)](_0x2b64a3(0x99)+(_0x580c9c+0x1)+'/'+_0xb4dba5['rounds'][_0x2b64a3(0xa1)]+'...\x20'+a5_0x4b905d[_0x2b64a3(0x7e)]('✓')+'\x20('+_0x4f3a62+')'):console[_0x2b64a3(0xc3)](_0x2b64a3(0x99)+(_0x580c9c+0x1)+'/'+_0xb4dba5[_0x2b64a3(0xf7)][_0x2b64a3(0xa1)]+_0x2b64a3(0x7b)+a5_0x4b905d[_0x2b64a3(0xc1)]('✗'));},'onEvaluationStart':()=>{const _0x551b21=_0x304fa2;_0x4c80e2[_0x551b21(0x9f)]=_0x551b21(0xb2);},'onEvaluationComplete':_0x22d312=>{const _0x508030=_0x304fa2,_0xf3e8b8=formatElapsed(_0x22d312);console[_0x508030(0xc3)](_0x508030(0xfb)+a5_0x4b905d[_0x508030(0x7e)]('✓')+'\x20('+_0xf3e8b8+')');}});_0x4c80e2[_0x304fa2(0xb1)](),_0x888e72[_0x304fa2(0xe8)](_0x5d2ba8),_0x3033ae['push'](_0x28562a);if(_0x5d2ba8['status']===_0x304fa2(0xda))console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0x7e)](_0x304fa2(0xae)+_0x5d2ba8[_0x304fa2(0x78)]));else _0x5d2ba8['status']===_0x304fa2(0xb8)?console['log'](a5_0x4b905d[_0x304fa2(0xc1)](_0x304fa2(0x90)+_0x5d2ba8[_0x304fa2(0x78)])):console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xc1)](_0x304fa2(0xbf)+_0x5d2ba8[_0x304fa2(0x78)]));_0x5d2ba8['conversation_url']&&console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xfc)]('Conversation\x20URL:\x20'+_0x5d2ba8[_0x304fa2(0xe0)])),console[_0x304fa2(0xc3)]();}catch(_0x57079d){_0x4c80e2[_0x304fa2(0xb1)]();const _0xa26af5=_0x57079d instanceof Error?_0x57079d[_0x304fa2(0xf6)]:String(_0x57079d);console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xc1)]('✗\x20ERROR:\x20'+_0xa26af5)),console[_0x304fa2(0xc3)](),_0x888e72[_0x304fa2(0xe8)]({'name':_0xb4dba5[_0x304fa2(0xd3)],'status':_0x304fa2(0x9b),'reason':_0xa26af5,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}const _0xdd75e=Date[_0x304fa2(0xbe)]()-_0x43f04e,_0x28da63=_0x888e72[_0x304fa2(0x70)](_0x5f2913=>_0x5f2913[_0x304fa2(0x7d)]===_0x304fa2(0xda))['length'],_0xd1050d=_0x888e72[_0x304fa2(0x70)](_0x2ba0fb=>_0x2ba0fb[_0x304fa2(0x7d)]===_0x304fa2(0xb8))[_0x304fa2(0xa1)],_0x262c23=_0x888e72[_0x304fa2(0x70)](_0x304613=>_0x304613[_0x304fa2(0x7d)]===_0x304fa2(0x9b))[_0x304fa2(0xa1)];console[_0x304fa2(0xc3)]('━'[_0x304fa2(0xec)](0x3c)),console[_0x304fa2(0xc3)]('Test\x20Summary'),console['log']('━'['repeat'](0x3c)),console['log'](_0x304fa2(0xd5)+_0x888e72[_0x304fa2(0xa1)]),console[_0x304fa2(0xc3)](_0x304fa2(0x97)+a5_0x4b905d[_0x304fa2(0x7e)](_0x28da63)),console['log'](_0x304fa2(0xfa)+a5_0x4b905d['red'](_0xd1050d));_0x262c23>0x0&&console[_0x304fa2(0xc3)]('Errors:\x20\x20\x20'+a5_0x4b905d['red'](_0x262c23));console[_0x304fa2(0xc3)](_0x304fa2(0xcb)+formatElapsed(_0xdd75e)),console[_0x304fa2(0xc3)]('━'['repeat'](0x3c));const _0x4d4c8f=_0x888e72[_0x304fa2(0x70)](_0x1818d5=>_0x1818d5[_0x304fa2(0x7d)]!==_0x304fa2(0xda));if(_0x4d4c8f[_0x304fa2(0xa1)]>0x0){console['log'](),console[_0x304fa2(0xc3)]('Failed\x20Tests:');for(const _0x5a2c9c of _0x4d4c8f){const _0x33497a=a5_0x4b905d[_0x304fa2(0xc1)]('✗'),_0x3ec1fe=_0x5a2c9c['reason'][_0x304fa2(0xa1)]>0x32?_0x5a2c9c[_0x304fa2(0x78)][_0x304fa2(0xf3)](0x0,0x32)+_0x304fa2(0xba):_0x5a2c9c[_0x304fa2(0x78)];console[_0x304fa2(0xc3)]('\x20\x20'+_0x33497a+'\x20'+_0x5a2c9c[_0x304fa2(0xd3)]+':\x20'+_0x3ec1fe);}}const _0x5d79c4={'summary':{'total':_0x888e72['length'],'passed':_0x28da63,'failed':_0xd1050d,'errors':_0x262c23>0x0?_0x262c23:undefined,'duration_ms':_0xdd75e},'tests':_0x888e72,'agent':{'project':_0x1f43eb['projectName'],'name':_0x1f43eb['agentName'],'site':_0x42741d},'timestamp':new Date(_0x43f04e)[_0x304fa2(0xd4)]()};try{const _0x38dee6=buildCachedTestRun(_0x3033ae,{'site':_0x42741d,'projectId':_0x2c1279,'projectName':_0x1f43eb[_0x304fa2(0xcf)],'agentId':_0x16bc52,'agentName':_0x1f43eb[_0x304fa2(0xaf)],'testYmlPath':a5_0x426331[_0x304fa2(0x89)](_0x1f43eb[_0x304fa2(0xf0)])});saveLastTestRun(_0x38dee6);}catch{}if(_0x7c2dfa!=='table'||_0x16e2fb){const _0x3d89a3=formatResults(_0x5d79c4,_0x7c2dfa);if(_0x16e2fb)try{a5_0x98918f[_0x304fa2(0x6e)](_0x16e2fb,_0x3d89a3,_0x304fa2(0x9a)),console['log'](),console[_0x304fa2(0xc3)](a5_0x4b905d[_0x304fa2(0xfc)](_0x304fa2(0x82)+_0x16e2fb));}catch(_0x1f28b6){return console[_0x304fa2(0xc3)](),console[_0x304fa2(0xc3)](a5_0x4b905d['red']('Error\x20writing\x20output\x20file:\x20'+_0x1f28b6)),0x1;}else console[_0x304fa2(0xc3)](),console['log'](_0x3d89a3);}return _0x4d4c8f['length']>0x0?0x1:0x0;}async[a5_0x4e1639(0xf5)](_0x170cb0,_0x291b7e){const _0x9c7a72=a5_0x4e1639,{options:_0x2b5d49,tdx:_0x2ae47f}=_0x170cb0,{definition:_0x2325ae,agentInfo:_0x988345,outputFormat:_0x132311,outputFile:_0x1c032f}=_0x291b7e,_0x3bfa93=_0x2b5d49[_0x9c7a72(0xe9)],_0x3e13e0=loadLastTestRun();if(!_0x3e13e0)return console[_0x9c7a72(0xc3)](a5_0x4b905d['red'](_0x9c7a72(0x7a))),console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xfc)](_0x9c7a72(0x8e))),0x1;if(_0x3e13e0[_0x9c7a72(0xd6)]['agentName']!==_0x988345[_0x9c7a72(0xaf)])return console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xc1)]('Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22'+_0x3e13e0[_0x9c7a72(0xd6)]['agentName']+_0x9c7a72(0xf4)+_0x988345[_0x9c7a72(0xaf)]+'\x22.')),console['log'](a5_0x4b905d[_0x9c7a72(0xfc)](_0x9c7a72(0xc9))),0x1;const _0x3bbd89=new Set(_0x3e13e0['conversations'][_0x9c7a72(0xcd)](_0x4600bc=>_0x4600bc[_0x9c7a72(0xc6)])),_0x2bfbc4=_0x2325ae[_0x9c7a72(0xdc)][_0x9c7a72(0x70)](_0x13bf5c=>!_0x3bbd89[_0x9c7a72(0xd8)](_0x13bf5c[_0x9c7a72(0xd3)]));if(_0x2bfbc4[_0x9c7a72(0xa1)]>0x0&&_0x3e13e0['site']!==_0x3bfa93)return console['log'](a5_0x4b905d[_0x9c7a72(0xc1)](_0x9c7a72(0xe3))),console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xfc)](_0x9c7a72(0xb5)+_0x3e13e0[_0x9c7a72(0xe9)]+_0x9c7a72(0xab)+_0x3bfa93+'\x22.')),console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xfc)](_0x9c7a72(0xee)+_0x3e13e0[_0x9c7a72(0xe9)]+_0x9c7a72(0xd1))),0x1;const _0x2b2291=_0x2325ae[_0x9c7a72(0xdc)][_0x9c7a72(0x70)](_0x4d5e62=>_0x3bbd89[_0x9c7a72(0xd8)](_0x4d5e62[_0x9c7a72(0xd3)])),_0x3fb64f=_0x2bfbc4;let _0x2490f2;try{_0x2490f2=await setupEvaluatorAgent(_0x2ae47f[_0x9c7a72(0xed)],_0x2b5d49[_0x9c7a72(0x100)]);}catch(_0x15b674){const _0x1c1804=_0x15b674 instanceof Error?_0x15b674['message']:String(_0x15b674);return console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xc1)](_0x9c7a72(0xf1)+_0x1c1804)),0x1;}console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xa0)](_0x9c7a72(0xe1))),console[_0x9c7a72(0xc3)](_0x9c7a72(0xa8)+a5_0x4b905d['white'](_0x3e13e0[_0x9c7a72(0xe5)])),console[_0x9c7a72(0xc3)](_0x9c7a72(0xa5)+a5_0x4b905d[_0x9c7a72(0x83)](_0x3e13e0['agent']['projectName']+'/'+_0x3e13e0[_0x9c7a72(0xd6)][_0x9c7a72(0xaf)]));_0x3fb64f[_0x9c7a72(0xa1)]>0x0&&console[_0x9c7a72(0xc3)]('New\x20tests\x20to\x20execute:\x20'+a5_0x4b905d[_0x9c7a72(0x71)](_0x3fb64f[_0x9c7a72(0xa1)]));console[_0x9c7a72(0xc3)]();const _0x40d8f8=[],_0x2dc1e1=Date['now'](),_0x39aaf1=createCommandSpinner(_0x9c7a72(0xd2));if(_0x2b2291[_0x9c7a72(0xa1)]>0x0)try{const _0x110d05=await reevaluateFromCache(_0x2ae47f['llm'],_0x3e13e0,{'tests':_0x2b2291},{'evaluatorId':_0x2490f2,'onTestStart':(_0xe50ae7,_0x29b50e,_0x3eca47)=>{const _0x2c8855=_0x9c7a72;_0x39aaf1[_0x2c8855(0x9f)]='Re-evaluating\x20'+(_0x29b50e+0x1)+'/'+_0x3eca47+':\x20'+_0xe50ae7+_0x2c8855(0xba);if(!_0x39aaf1[_0x2c8855(0xb3)])_0x39aaf1[_0x2c8855(0xa2)]();},'onTestComplete':(_0x4f5b7a,_0x4a1ab9)=>{const _0x2140db=_0x9c7a72;_0x39aaf1[_0x2140db(0xb1)]();if(_0x4a1ab9['status']===_0x2140db(0xda))console[_0x2140db(0xc3)](a5_0x4b905d['green'](_0x2140db(0xae)+_0x4f5b7a)+a5_0x4b905d[_0x2140db(0xfc)](_0x2140db(0x94)));else _0x4a1ab9[_0x2140db(0x7d)]===_0x2140db(0xb8)?console[_0x2140db(0xc3)](a5_0x4b905d[_0x2140db(0xc1)](_0x2140db(0x90)+_0x4f5b7a+_0x2140db(0xce)+_0x4a1ab9[_0x2140db(0x78)])+a5_0x4b905d['dim']('\x20(cached)')):console[_0x2140db(0xc3)](a5_0x4b905d[_0x2140db(0xc1)](_0x2140db(0xbf)+_0x4f5b7a+_0x2140db(0xce)+_0x4a1ab9['reason']));_0x4a1ab9[_0x2140db(0xe0)]&&console['log'](a5_0x4b905d[_0x2140db(0xfc)](_0x2140db(0x9e)+_0x4a1ab9['conversation_url'])),_0x40d8f8[_0x2140db(0xe8)](_0x4a1ab9);},'onTestSkipped':(_0x4d6892,_0x21927a)=>{const _0x5dbb1d=_0x9c7a72;_0x39aaf1['stop'](),console[_0x5dbb1d(0xc3)](a5_0x4b905d[_0x5dbb1d(0x71)]('⚠\x20SKIPPED:\x20'+_0x4d6892+'\x20-\x20'+_0x21927a));}});for(const _0x3beffe of _0x110d05){!_0x40d8f8[_0x9c7a72(0x86)](_0x58b4d0=>_0x58b4d0['name']===_0x3beffe[_0x9c7a72(0xd3)])&&_0x40d8f8['push'](_0x3beffe);}}catch(_0xaa9984){_0x39aaf1[_0x9c7a72(0xb1)]();const _0x4e7425=_0xaa9984 instanceof Error?_0xaa9984['message']:String(_0xaa9984);return console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xc1)](_0x9c7a72(0x101)+_0x4e7425)),0x1;}_0x39aaf1[_0x9c7a72(0xb1)]();if(_0x3fb64f[_0x9c7a72(0xa1)]>0x0){console['log'](),console[_0x9c7a72(0xc3)](a5_0x4b905d['cyan'](_0x9c7a72(0xbb)));const {projectId:_0xb0b6b9,agentId:_0x5794e9}=_0x3e13e0[_0x9c7a72(0xd6)];for(const _0x4b7c43 of _0x3fb64f){console[_0x9c7a72(0xc3)]('Running:\x20'+a5_0x4b905d[_0x9c7a72(0x83)](_0x4b7c43[_0x9c7a72(0xd3)]));const _0x53a057=createCommandSpinner('Round\x201/'+_0x4b7c43[_0x9c7a72(0xf7)][_0x9c7a72(0xa1)]+_0x9c7a72(0xff));_0x53a057[_0x9c7a72(0xa2)]();try{const {result:_0x358d44}=await runTest(_0x2ae47f[_0x9c7a72(0xed)],_0x4b7c43,{'agentId':_0x5794e9,'projectId':_0xb0b6b9,'site':_0x3e13e0[_0x9c7a72(0xe9)],'noEval':![],'evaluatorId':_0x2490f2,'onRoundStart':(_0x1df3b7,_0x47aeb0)=>{const _0x4ce6b6=_0x9c7a72;_0x53a057[_0x4ce6b6(0x9f)]=_0x4ce6b6(0x7f)+(_0x1df3b7+0x1)+'/'+_0x47aeb0+_0x4ce6b6(0xff);},'onRoundComplete':(_0x5dd6f1,_0x692a19,_0xbd14d2)=>{const _0x85121a=_0x9c7a72,_0x320f6f=formatElapsed(_0x692a19);_0xbd14d2?console[_0x85121a(0xc3)](_0x85121a(0x99)+(_0x5dd6f1+0x1)+'/'+_0x4b7c43[_0x85121a(0xf7)][_0x85121a(0xa1)]+_0x85121a(0x7b)+a5_0x4b905d[_0x85121a(0x7e)]('✓')+'\x20('+_0x320f6f+')'):console[_0x85121a(0xc3)](_0x85121a(0x99)+(_0x5dd6f1+0x1)+'/'+_0x4b7c43[_0x85121a(0xf7)][_0x85121a(0xa1)]+_0x85121a(0x7b)+a5_0x4b905d[_0x85121a(0xc1)]('✗'));},'onEvaluationStart':()=>{const _0x1291e8=_0x9c7a72;_0x53a057[_0x1291e8(0x9f)]='Evaluating\x20response...';},'onEvaluationComplete':_0x30a1f3=>{const _0x291d79=_0x9c7a72,_0x44f771=formatElapsed(_0x30a1f3);console['log'](_0x291d79(0xfb)+a5_0x4b905d[_0x291d79(0x7e)]('✓')+'\x20('+_0x44f771+')');}});_0x53a057[_0x9c7a72(0xb1)](),_0x40d8f8[_0x9c7a72(0xe8)](_0x358d44);if(_0x358d44[_0x9c7a72(0x7d)]===_0x9c7a72(0xda))console['log'](a5_0x4b905d[_0x9c7a72(0x7e)](_0x9c7a72(0xae)+_0x358d44[_0x9c7a72(0x78)])+a5_0x4b905d[_0x9c7a72(0xfc)](_0x9c7a72(0x87)));else _0x358d44['status']===_0x9c7a72(0xb8)?console[_0x9c7a72(0xc3)](a5_0x4b905d['red'](_0x9c7a72(0x90)+_0x358d44[_0x9c7a72(0x78)])+a5_0x4b905d['dim'](_0x9c7a72(0x87))):console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xc1)]('✗\x20ERROR:\x20'+_0x358d44[_0x9c7a72(0x78)]));_0x358d44[_0x9c7a72(0xe0)]&&console[_0x9c7a72(0xc3)](a5_0x4b905d[_0x9c7a72(0xfc)](_0x9c7a72(0x9e)+_0x358d44['conversation_url']));}catch(_0xed26bd){_0x53a057['stop']();const _0x1b61bb=_0xed26bd instanceof Error?_0xed26bd[_0x9c7a72(0xf6)]:String(_0xed26bd);console['log'](a5_0x4b905d[_0x9c7a72(0xc1)](_0x9c7a72(0xbf)+_0x1b61bb)),_0x40d8f8[_0x9c7a72(0xe8)]({'name':_0x4b7c43[_0x9c7a72(0xd3)],'status':_0x9c7a72(0x9b),'reason':_0x1b61bb,'timestamp':new Date()[_0x9c7a72(0xd4)](),'duration_ms':0x0});}}}console[_0x9c7a72(0xc3)]();const _0x32b7e4=Date[_0x9c7a72(0xbe)]()-_0x2dc1e1,_0x162627=_0x40d8f8['filter'](_0x4a1e38=>_0x4a1e38[_0x9c7a72(0x7d)]==='PASS')[_0x9c7a72(0xa1)],_0x268290=_0x40d8f8['filter'](_0xc48990=>_0xc48990[_0x9c7a72(0x7d)]===_0x9c7a72(0xb8))[_0x9c7a72(0xa1)],_0x55a82c=_0x40d8f8[_0x9c7a72(0x70)](_0x446411=>_0x446411[_0x9c7a72(0x7d)]===_0x9c7a72(0x9b))['length'];console['log']('━'[_0x9c7a72(0xec)](0x3c)),console['log'](_0x9c7a72(0x9c)),console[_0x9c7a72(0xc3)]('━'[_0x9c7a72(0xec)](0x3c)),console[_0x9c7a72(0xc3)](_0x9c7a72(0xd5)+_0x40d8f8[_0x9c7a72(0xa1)]),console['log'](_0x9c7a72(0x97)+a5_0x4b905d['green'](_0x162627)),console[_0x9c7a72(0xc3)](_0x9c7a72(0xfa)+a5_0x4b905d[_0x9c7a72(0xc1)](_0x268290));_0x55a82c>0x0&&console['log'](_0x9c7a72(0xfd)+a5_0x4b905d[_0x9c7a72(0xc1)](_0x55a82c));console[_0x9c7a72(0xc3)](_0x9c7a72(0xcb)+formatElapsed(_0x32b7e4)),console[_0x9c7a72(0xc3)]('━'[_0x9c7a72(0xec)](0x3c));const _0x5d2e03={'summary':{'total':_0x40d8f8[_0x9c7a72(0xa1)],'passed':_0x162627,'failed':_0x268290,'errors':_0x55a82c>0x0?_0x55a82c:undefined,'duration_ms':_0x32b7e4},'tests':_0x40d8f8,'agent':{'project':_0x988345[_0x9c7a72(0xcf)],'name':_0x988345[_0x9c7a72(0xaf)],'site':_0x3bfa93},'timestamp':new Date(_0x2dc1e1)[_0x9c7a72(0xd4)]()};if(_0x132311!==_0x9c7a72(0x9d)||_0x1c032f){const _0x36a5d5=formatResults(_0x5d2e03,_0x132311);if(_0x1c032f)try{a5_0x98918f[_0x9c7a72(0x6e)](_0x1c032f,_0x36a5d5,_0x9c7a72(0x9a)),console[_0x9c7a72(0xc3)](),console[_0x9c7a72(0xc3)](a5_0x4b905d['dim'](_0x9c7a72(0x82)+_0x1c032f));}catch(_0x574664){return console[_0x9c7a72(0xc3)](),console[_0x9c7a72(0xc3)](a5_0x4b905d['red'](_0x9c7a72(0xc8)+_0x574664)),0x1;}else console[_0x9c7a72(0xc3)](),console[_0x9c7a72(0xc3)](_0x36a5d5);}const _0x56ed72=_0x40d8f8['filter'](_0x25ebac=>_0x25ebac['status']!==_0x9c7a72(0xda));return _0x56ed72[_0x9c7a72(0xa1)]>0x0?0x1:0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a6_0x5774(){const _0x526299=['1989fLxErC','data','execute','100NZiSzE','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','join','body','error','3827964zdIQtq','Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list','172982UTjfyH','x-xsrf-token','entries','Endpoint\x20must\x20start\x20with\x20/:\x20','Invalid\x20API\x20type:\x20','description','output','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','GET','method','354535cZQAVu','status','.\x20Valid\x20types:\x20','PATCH','verbose','POST','request','Invalid\x20header\x20format:\x20\x22','site','llm','set-cookie','Error:\x20','header','\x22.\x20','headers','cdp','set-cookie2','keys','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','trim','proxy-authorization','Invalid\x20HTTP\x20method:\x20','message','indexOf','color','Results\x20saved\x20to\x20','type','api','substring','authorization','isArray','DELETE','stack','toUpperCase','includes','noColor','1660TTHfPh','24912syotWB','90054uTpttv','workflow','\x0aStack\x20trace:\x0a','startsWith','3706386plBHWR','x-auth-token'];a6_0x5774=function(){return _0x526299;};return a6_0x5774();}function a6_0x24fd(_0x221181,_0x57cffb){_0x221181=_0x221181-0x1b5;const _0x57740e=a6_0x5774();let _0x24fd83=_0x57740e[_0x221181];return _0x24fd83;}const a6_0x48be7d=a6_0x24fd;(function(_0x3fe4fc,_0x51aa1d){const _0x3a1bf5=a6_0x24fd,_0xf18443=_0x3fe4fc();while(!![]){try{const _0x41cf1f=-parseInt(_0x3a1bf5(0x1cc))/0x1+-parseInt(_0x3a1bf5(0x1c2))/0x2+parseInt(_0x3a1bf5(0x1f2))/0x3+parseInt(_0x3a1bf5(0x1f0))/0x4*(-parseInt(_0x3a1bf5(0x1bb))/0x5)+parseInt(_0x3a1bf5(0x1b6))/0x6+-parseInt(_0x3a1bf5(0x1c0))/0x7+-parseInt(_0x3a1bf5(0x1f1))/0x8*(-parseInt(_0x3a1bf5(0x1b8))/0x9);if(_0x41cf1f===_0x51aa1d)break;else _0xf18443['push'](_0xf18443['shift']());}catch(_0x248330){_0xf18443['push'](_0xf18443['shift']());}}}(a6_0x5774,0x52f35));import{BaseCommand}from'./command.js';import{RawAPI}from'../sdk/api.js';import{colorizeJSON}from'../utils/colors.js';import{writeFileSync}from'fs';import{getEndpoint}from'../sdk/types/index.js';import{resolveSite}from'../core/config.js';import{getAuthHeaders}from'../core/auth.js';const SENSITIVE_HEADERS=new Set([a6_0x48be7d(0x1e9),a6_0x48be7d(0x1e0),'cookie',a6_0x48be7d(0x1d6),a6_0x48be7d(0x1dc),a6_0x48be7d(0x1c3),a6_0x48be7d(0x1b7),'x-trino-user']);function isSensitiveHeader(_0x198c5b){return SENSITIVE_HEADERS['has'](_0x198c5b['toLowerCase']());}function parseHeader(_0x18e422){const _0x425761=a6_0x48be7d,_0x5cd624=_0x18e422[_0x425761(0x1e3)](':');if(_0x5cd624===-0x1)throw new Error(_0x425761(0x1d3)+_0x18e422+_0x425761(0x1d9)+_0x425761(0x1de));const _0x2b417b=_0x18e422['substring'](0x0,_0x5cd624)[_0x425761(0x1df)](),_0x39cbba=_0x18e422[_0x425761(0x1e8)](_0x5cd624+0x1)['trim']();if(!_0x2b417b)throw new Error('Header\x20key\x20cannot\x20be\x20empty:\x20\x22'+_0x18e422+'\x22');return[_0x2b417b,_0x39cbba];}export class ApiCommand extends BaseCommand{['name']=a6_0x48be7d(0x1e7);[a6_0x48be7d(0x1c7)]=a6_0x48be7d(0x1bc);['validate'](_0x5b7ef4){const _0x660a0f=a6_0x48be7d,{args:_0x59db06,options:_0x447551}=_0x5b7ef4,_0x337447=_0x447551;if(_0x59db06['length']===0x0)return _0x660a0f(0x1c1);const _0x1040d6=_0x59db06[0x0];if(!_0x1040d6[_0x660a0f(0x1b5)]('/'))return _0x660a0f(0x1c5)+_0x1040d6;const _0x2333ce=_0x337447[_0x660a0f(0x1b9)],_0x234936=_0x337447['file'];if(_0x2333ce&&_0x234936)return _0x660a0f(0x1c9);const _0x5b313c=_0x337447[_0x660a0f(0x1cb)]||'GET',_0x2ce91b=[_0x660a0f(0x1ca),_0x660a0f(0x1d1),'PUT',_0x660a0f(0x1eb),_0x660a0f(0x1cf)];if(!_0x2ce91b[_0x660a0f(0x1ee)](_0x5b313c[_0x660a0f(0x1ed)]()))return _0x660a0f(0x1e1)+_0x5b313c+'.\x20Valid\x20methods:\x20'+_0x2ce91b[_0x660a0f(0x1bd)](',\x20');const _0x2443a2=_0x337447['type']||'td',_0x5dc9c3=['td',_0x660a0f(0x1db),_0x660a0f(0x1f3),'trino',_0x660a0f(0x1d5),'llm-proxy'];if(!_0x5dc9c3['includes'](_0x2443a2))return _0x660a0f(0x1c6)+_0x2443a2+_0x660a0f(0x1ce)+_0x5dc9c3[_0x660a0f(0x1bd)](',\x20');return undefined;}async[a6_0x48be7d(0x1ba)](_0x28f1db){const _0x5bc0e1=a6_0x48be7d,{options:_0xc1527,args:_0x19b369,tdx:_0x2f945e}=_0x28f1db,_0x35b9b0=_0xc1527,_0x3878f6=_0x19b369[0x0],_0x3bb8e6=(_0x35b9b0[_0x5bc0e1(0x1cb)]||_0x5bc0e1(0x1ca))[_0x5bc0e1(0x1ed)](),_0x5376ba=_0x35b9b0[_0x5bc0e1(0x1b9)],_0x471784=_0x35b9b0['file'],_0x35122d=_0x35b9b0[_0x5bc0e1(0x1d8)],_0x144baf=_0x35b9b0[_0x5bc0e1(0x1e6)]||'td';try{const _0x22463e={};if(_0x35122d){const _0x1db7a8=Array[_0x5bc0e1(0x1ea)](_0x35122d)?_0x35122d:[_0x35122d];for(const _0x3a42c3 of _0x1db7a8){const [_0x2aa344,_0x37bb48]=parseHeader(_0x3a42c3);_0x22463e[_0x2aa344]=_0x37bb48;}}let _0x48d62b;if(_0x5376ba)_0x48d62b=_0x5376ba;else{if(_0x471784)try{_0x48d62b=RawAPI['readBodyFromFile'](_0x471784);}catch(_0x9aec40){return console[_0x5bc0e1(0x1bf)](_0x5bc0e1(0x1d7)+(_0x9aec40 instanceof Error?_0x9aec40[_0x5bc0e1(0x1e2)]:String(_0x9aec40))),0x1;}}const _0x3d5622={'method':_0x3bb8e6,'apiType':_0x144baf,'includeHeaders':_0xc1527[_0x5bc0e1(0x1d0)]};_0x48d62b&&(_0x3d5622[_0x5bc0e1(0x1be)]=_0x48d62b);Object[_0x5bc0e1(0x1dd)](_0x22463e)['length']>0x0&&(_0x3d5622['headers']=_0x22463e);if(_0xc1527[_0x5bc0e1(0x1d0)]){const _0x456688=resolveSite(_0xc1527[_0x5bc0e1(0x1d4)]),_0x146375=getEndpoint(_0x456688,_0x144baf),_0x3bce23=''+_0x146375+_0x3878f6;console[_0x5bc0e1(0x1bf)]('>\x20'+_0x3bb8e6+'\x20'+_0x3bce23);const _0x484cbc=getAuthHeaders(_0x456688),_0x2d489d={..._0x484cbc,..._0x22463e};for(const [_0x2abb1a,_0x2af929]of Object[_0x5bc0e1(0x1c4)](_0x2d489d)){!isSensitiveHeader(_0x2abb1a)&&console[_0x5bc0e1(0x1bf)]('>\x20'+_0x2abb1a+':\x20'+_0x2af929);}_0x48d62b&&console[_0x5bc0e1(0x1bf)]('>'),console[_0x5bc0e1(0x1bf)]('');}const _0x259ebb=await _0x2f945e[_0x5bc0e1(0x1e7)][_0x5bc0e1(0x1d2)](_0x3878f6,_0x3d5622);if(_0xc1527[_0x5bc0e1(0x1d0)]&&_0x259ebb[_0x5bc0e1(0x1da)]){console['error']('<\x20HTTP/1.1\x20'+_0x259ebb[_0x5bc0e1(0x1cd)]);for(const [_0x13a6f8,_0x5c1031]of Object['entries'](_0x259ebb[_0x5bc0e1(0x1da)])){!isSensitiveHeader(_0x13a6f8)&&console[_0x5bc0e1(0x1bf)]('<\x20'+_0x13a6f8+':\x20'+_0x5c1031);}console['error']('');}const _0x527887=Boolean(_0xc1527[_0x5bc0e1(0x1c8)]),_0x1e6b5d={'color':_0xc1527['color'],'noColor':_0xc1527[_0x5bc0e1(0x1ef)]||_0x527887&&!_0xc1527[_0x5bc0e1(0x1e4)]},_0x47fb9d=colorizeJSON(_0x259ebb[_0x5bc0e1(0x1b9)],_0x1e6b5d);return _0xc1527[_0x5bc0e1(0x1c8)]?(writeFileSync(_0xc1527['output'],_0x47fb9d),console['error'](_0x5bc0e1(0x1e5)+_0xc1527[_0x5bc0e1(0x1c8)])):console['log'](_0x47fb9d),0x0;}catch(_0x2e890f){return _0x2e890f instanceof Error?(console['error'](_0x5bc0e1(0x1d7)+_0x2e890f[_0x5bc0e1(0x1e2)]),_0xc1527[_0x5bc0e1(0x1d0)]&&_0x2e890f[_0x5bc0e1(0x1ec)]&&console[_0x5bc0e1(0x1bf)](_0x5bc0e1(0x1f4)+_0x2e890f[_0x5bc0e1(0x1ec)])):console[_0x5bc0e1(0x1bf)](_0x5bc0e1(0x1d7)+String(_0x2e890f)),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x5394f6=a7_0x7c40;(function(_0x54f013,_0x238e62){const _0x54b2d7=a7_0x7c40,_0xaa8d4c=_0x54f013();while(!![]){try{const _0x1bba33=-parseInt(_0x54b2d7(0x85))/0x1*(parseInt(_0x54b2d7(0xa3))/0x2)+parseInt(_0x54b2d7(0x88))/0x3*(-parseInt(_0x54b2d7(0xa8))/0x4)+parseInt(_0x54b2d7(0xa4))/0x5+parseInt(_0x54b2d7(0x76))/0x6+parseInt(_0x54b2d7(0xa0))/0x7*(-parseInt(_0x54b2d7(0x87))/0x8)+-parseInt(_0x54b2d7(0x97))/0x9+parseInt(_0x54b2d7(0x7b))/0xa;if(_0x1bba33===_0x238e62)break;else _0xaa8d4c['push'](_0xaa8d4c['shift']());}catch(_0x227ad9){_0xaa8d4c['push'](_0xaa8d4c['shift']());}}}(a7_0x19b2,0x86032));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{saveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';function a7_0x19b2(){const _0x212ecf=['1925268eJCJnt','apiKey','name','log','\x20(site:\x20','jobs','User:\x20','Setting\x20up\x20authentication\x20for\x20site:\x20','trim','yellow','No\x20API\x20key\x20found\x20in\x20keychain','auth:setup','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','site','bold','tdx:\x20auth\x20clear','✗\x20Validation\x20failed:\x20','warn','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','getUserInfo','Site\x20name\x20must\x20contain\x20only\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','3274488SwEnJn','description','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','No\x20credential\x20found','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','9894120rdqjNZ','API\x20key\x20cannot\x20be\x20empty','\x27\x20registered','\x20(profile:\x20','customSite','Name:\x20','N/A','tdx\x20profile:\x20','ERROR','text','4WBrbUW','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','14176QVgQtx','3uatfgb','auth:clear','green','email','red','\x0aSetup\x20cancelled','us01','join','filter','System\x20keychain\x20is\x20not\x20available','create','Enter\x20site\x20name:','Validating\x20API\x20key...','Site\x20name\x20cannot\x20be\x20empty','\x20--profile\x20','2138634ELGvFH','✓\x20Authentication\x20successful\x0a','other','last_name','first_name','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','\x20\x20tdx','Select\x20your\x20Treasure\x20Data\x20site\x20(for\x20profile:\x20','execute','2079DOpbXG','status','error','299432QmNEaS','4289225qdTRde','You\x20can\x20find\x20your\x20API\x20key\x20at:','select','test'];a7_0x19b2=function(){return _0x212ecf;};return a7_0x19b2();}import{getConsoleUrl}from'../sdk/client/endpoints.js';import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import{buildSiteChoices}from'../core/constants.js';import a7_0x5ed195 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_0x2d272a from'chalk';export class AuthSetupCommand extends BaseCommand{[a7_0x5394f6(0xaa)]=a7_0x5394f6(0xb3);['description']='Setup\x20API\x20key\x20authentication\x20interactively';async[a7_0x5394f6(0x9f)](_0x58a378){const _0x228d94=a7_0x5394f6,{options:_0x46e4af}=_0x58a378,_0x1a24e5=_0x46e4af['profile'];console[_0x228d94(0xab)](a7_0x2d272a[_0x228d94(0xb6)]('tdx:\x20auth\x20setup'));const _0x20301b=_0x46e4af[_0x228d94(0xb5)]||_0x228d94(0x8e),{choices:_0x5e239b,initialIndex:_0x80d527}=buildSiteChoices(_0x20301b),_0x5d018f=_0x1a24e5?_0x228d94(0x9e)+_0x1a24e5+'):':'Select\x20your\x20Treasure\x20Data\x20site:',_0x16efc9=await a7_0x5ed195({'type':_0x228d94(0xa6),'name':_0x228d94(0xb5),'message':_0x5d018f,'choices':_0x5e239b,'initial':_0x80d527});if(!_0x16efc9[_0x228d94(0xb5)])return console['log'](_0x228d94(0x8d)),0x1;let _0x26c983;if(_0x16efc9[_0x228d94(0xb5)]===_0x228d94(0x99)){const _0x49607f=await a7_0x5ed195({'type':_0x228d94(0x84),'name':_0x228d94(0x7f),'message':_0x228d94(0x93),'initial':_0x228d94(0x8e),'validate':_0x4f8e12=>{const _0x2c945c=_0x228d94;if(!_0x4f8e12||!_0x4f8e12[_0x2c945c(0xb0)]())return _0x2c945c(0x95);if(!/^[a-z0-9-]+$/[_0x2c945c(0xa7)](_0x4f8e12[_0x2c945c(0xb0)]()))return _0x2c945c(0x75);return!![];}});if(!_0x49607f['customSite'])return console[_0x228d94(0xab)](_0x228d94(0x8d)),0x1;_0x26c983=_0x49607f[_0x228d94(0x7f)];}else _0x26c983=_0x16efc9['site'];const _0x28e654=resolveSite(_0x26c983);console['log'](_0x228d94(0xaf)+_0x28e654),console[_0x228d94(0xab)](_0x228d94(0xa5)),console[_0x228d94(0xab)]('\x20\x20'+getConsoleUrl(_0x28e654,'/app/mp/ak'));const _0x4feefb=await a7_0x5ed195({'type':'password','name':'apiKey','message':'Enter\x20your\x20TD\x20API\x20key:','validate':_0x3642d4=>{const _0x433ee8=_0x228d94;if(!_0x3642d4||!_0x3642d4[_0x433ee8(0xb0)]())return _0x433ee8(0x7c);return!![];}});if(!_0x4feefb[_0x228d94(0xa9)])return console['log'](_0x228d94(0x8d)),0x1;const _0x5441e4=_0x4feefb[_0x228d94(0xa9)];console[_0x228d94(0xab)](_0x228d94(0x94));try{const _0xcf578b=TDX[_0x228d94(0x92)]({'site':_0x28e654,'apiKey':_0x5441e4[_0x228d94(0xb0)](),'logLevel':_0x46e4af['logLevel']??LogLevel[_0x228d94(0x83)]}),_0x326bce=await _0xcf578b[_0x228d94(0xad)][_0x228d94(0x74)]();console[_0x228d94(0xab)]('✓\x20API\x20key\x20is\x20valid\x20(User:\x20'+_0x326bce[_0x228d94(0x8b)]+')');const _0x2b1d80=await isKeychainAvailable();_0x2b1d80?(await saveAPIKeyAsync(_0x5441e4['trim'](),_0x28e654,_0x1a24e5),console[_0x228d94(0xab)](_0x228d94(0xb4)+(_0x1a24e5?_0x228d94(0x7e)+_0x1a24e5+')':''))):(console[_0x228d94(0x72)](a7_0x2d272a[_0x228d94(0xb1)](_0x228d94(0x78))),console[_0x228d94(0x72)](a7_0x2d272a[_0x228d94(0xb1)](_0x228d94(0x7a))));if(_0x1a24e5){const _0x4e1aa4={'site':_0x28e654};saveProfileToUserConfig(_0x1a24e5,_0x4e1aa4),console['log']('✓\x20Profile\x20\x27'+_0x1a24e5+_0x228d94(0x7d));}else saveDefaultSiteToUserConfig(_0x28e654),console['log']('✓\x20Default\x20site\x20set\x20to\x20'+_0x28e654);const _0xb4ea7b=_0x1a24e5?_0x228d94(0x96)+_0x1a24e5:'';return console[_0x228d94(0xab)](),console['log'](_0x228d94(0x86)),console['log']('\x20\x20tdx'+_0xb4ea7b+_0x228d94(0x9c)),console[_0x228d94(0xab)](_0x228d94(0x9d)+_0xb4ea7b+'\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases'),0x0;}catch(_0x1f308e){if(_0x1f308e instanceof HTTPClientError&&_0x1f308e[_0x228d94(0xa1)]===0x191)return printAuthError(_0x1f308e),0x1;return console[_0x228d94(0xa2)](a7_0x2d272a['red'](_0x228d94(0x71)+(_0x1f308e instanceof Error?_0x1f308e['message']:String(_0x1f308e)))),console[_0x228d94(0xa2)]('API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.'),0x1;}}}function a7_0x7c40(_0x2c3595,_0x5d4527){_0x2c3595=_0x2c3595-0x71;const _0x19b24d=a7_0x19b2();let _0x7c400f=_0x19b24d[_0x2c3595];return _0x7c400f;}export class AuthStatusCommand extends BaseCommand{[a7_0x5394f6(0xaa)]='auth';[a7_0x5394f6(0x77)]=a7_0x5394f6(0x73);async[a7_0x5394f6(0x9f)](_0x54b794){const _0x226b6c=a7_0x5394f6,{options:_0x2a73a3,tdx:_0x232feb}=_0x54b794,_0x385e69=_0x2a73a3[_0x226b6c(0xb5)],_0x439fa1=_0x2a73a3['profile'],_0x131b65=_0x439fa1?_0x439fa1:_0x226b6c(0x81);console['log'](_0x226b6c(0x82)+_0x131b65+_0x226b6c(0xac)+_0x385e69+')');const _0x1485cb=await resolveAPIKeyAsync(_0x385e69,_0x439fa1);if(_0x1485cb){const {source:_0x5de7b8,isDeprecated:_0x39ccb9}=_0x1485cb,_0x5eee8d='Read\x20credential\x20from\x20'+_0x5de7b8;console[_0x226b6c(0xab)](_0x39ccb9?a7_0x2d272a['yellow'](_0x5eee8d):_0x5eee8d);}else console[_0x226b6c(0xab)](a7_0x2d272a['yellow'](_0x226b6c(0x79)));try{const _0x3578c1=await _0x232feb[_0x226b6c(0xad)]['getUserInfo']();return console['log'](a7_0x2d272a[_0x226b6c(0x8a)](_0x226b6c(0x98))),console[_0x226b6c(0xab)](_0x226b6c(0xae)+_0x3578c1[_0x226b6c(0x8b)]),(_0x3578c1[_0x226b6c(0x9b)]||_0x3578c1[_0x226b6c(0x9a)])&&console[_0x226b6c(0xab)](_0x226b6c(0x80)+[_0x3578c1[_0x226b6c(0x9b)],_0x3578c1[_0x226b6c(0x9a)]][_0x226b6c(0x90)](Boolean)[_0x226b6c(0x8f)]('\x20')),0x0;}catch(_0x687343){return _0x687343 instanceof HTTPClientError&&_0x687343[_0x226b6c(0xa1)]===0x191?printAuthError(_0x687343,!![],_0x439fa1):console[_0x226b6c(0xa2)](a7_0x2d272a[_0x226b6c(0x8c)]('✗\x20Validation\x20failed:\x20'+(_0x687343 instanceof Error?_0x687343['message']:String(_0x687343)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a7_0x5394f6(0xaa)]=a7_0x5394f6(0x89);[a7_0x5394f6(0x77)]='Remove\x20API\x20key\x20from\x20system\x20keychain';async[a7_0x5394f6(0x9f)](_0x5b84c0){const _0x38f48b=a7_0x5394f6,{options:_0x3d440d}=_0x5b84c0,_0x13129d=_0x3d440d['profile'];console['log'](a7_0x2d272a[_0x38f48b(0xb6)](_0x38f48b(0xb7)));const _0x5b8386=await isKeychainAvailable();if(!_0x5b8386)return console['error'](a7_0x2d272a[_0x38f48b(0x8c)](_0x38f48b(0x91))),0x1;const _0xcd3447=await deleteKeychainAPIKey(_0x13129d);return _0xcd3447?(clearCredentialCache(),console[_0x38f48b(0xab)]('✓\x20API\x20key\x20removed\x20from\x20keychain'+(_0x13129d?_0x38f48b(0x7e)+_0x13129d+')':'')),0x0):(console['log'](_0x38f48b(0xb2)+(_0x13129d?'\x20for\x20profile:\x20'+_0x13129d:'')),0x1);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a8_0x56a7(_0x393153,_0x4d01a0){_0x393153=_0x393153-0xea;const _0x35f80e=a8_0x35f8();let _0x56a74f=_0x35f80e[_0x393153];return _0x56a74f;}const a8_0x364756=a8_0x56a7;(function(_0x4fbe04,_0x444136){const _0x3c17ad=a8_0x56a7,_0x129edc=_0x4fbe04();while(!![]){try{const _0xdbd4fc=parseInt(_0x3c17ad(0x113))/0x1+-parseInt(_0x3c17ad(0x104))/0x2*(parseInt(_0x3c17ad(0xfe))/0x3)+-parseInt(_0x3c17ad(0x12c))/0x4+-parseInt(_0x3c17ad(0xed))/0x5+parseInt(_0x3c17ad(0x128))/0x6*(parseInt(_0x3c17ad(0x105))/0x7)+-parseInt(_0x3c17ad(0x118))/0x8*(-parseInt(_0x3c17ad(0x10f))/0x9)+-parseInt(_0x3c17ad(0x102))/0xa;if(_0xdbd4fc===_0x444136)break;else _0x129edc['push'](_0x129edc['shift']());}catch(_0x2ebf6a){_0x129edc['push'](_0x129edc['shift']());}}}(a8_0x35f8,0x6312f));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';function a8_0x35f8(){const _0x19a7d4=['--agent\x20flag','216mDprWq','Resolving\x20agent\x20\x27','message','targetWebSearchTool','targetAgent','validate','args','Continuing\x20chat:\x20','execute','log','streamChat','Create\x20a\x20new\x20chat\x20session','\x27...','agentId','claude-4.5-haiku','stream','2712NNUpAw','done','Using\x20cached\x20default\x20agent:\x20','chatId','1482492NLUTyb','name','Chat\x20session:\x20','metadata','chat','code','\x20\x20Cause:\x20','slice','Error:\x20Cannot\x20use\x20--new\x20and\x20--chat-id\x20together','tool_call','write','options','session\x20context','433685XjOYjc','event','Error:\x20','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','string','context','\x0aError:\x20','stack','Agent\x20required.\x20Use\x20--agent\x20\x22Project/Agent\x22\x20or\x20set\x20agent\x20with\x20\x22tdx\x20use\x20agent\x22','getDefaultAgent','agent','tool','targetKnowledgeBase','CHAT_NOT_FOUND','resolveProjectId','handleChatEvent','stringify','68181AfOdPa','\x0aStack\x20trace:','startChat','getOrCreateDefaultAgent','4881110ZKzmTb','llmAgent','18enfTVE','11116ktMmsK','verbose','type','content','data','error','cause','llm','stdout','join','51174jeHHpp','projectId','new','llmProject','684523CTswUM','functionName','resolveAgentId','streamChatJsonl'];a8_0x35f8=function(){return _0x19a7d4;};return a8_0x35f8();}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{saveLastChatId,loadLastChatId}from'../sdk/llm/chat-cache.js';import{getLLMConversationUrl}from'../sdk/client/endpoints.js';function handleSDKError(_0x3fe09b,_0x17f02a){const _0x1d1a4a=a8_0x56a7;if(_0x3fe09b instanceof SDKError)console[_0x1d1a4a(0x10a)](_0x1d1a4a(0xef)+_0x3fe09b[_0x1d1a4a(0x11a)]),_0x17f02a[_0x1d1a4a(0x106)]&&(_0x3fe09b[_0x1d1a4a(0x10b)]&&console[_0x1d1a4a(0x10a)](_0x1d1a4a(0x132)+_0x3fe09b[_0x1d1a4a(0x10b)]),_0x3fe09b[_0x1d1a4a(0xf4)]&&(console[_0x1d1a4a(0x10a)](_0x1d1a4a(0xff)),console[_0x1d1a4a(0x10a)](_0x3fe09b[_0x1d1a4a(0xf4)])));else throw _0x3fe09b;}async function resolveAgentId(_0x30bc5f,_0x30e2b9,_0x545127,_0x431ad7,_0x5e31b2){const _0x161cb7=a8_0x56a7,_0x26c6db=_0x30e2b9||_0x545127;if(_0x26c6db){const {projectName:_0x3bb36d,agentName:_0x1bb962}=parseAgentRef(_0x26c6db),_0x35b7ba=_0x1bb962||_0x26c6db,_0x54b750=_0x1bb962?_0x3bb36d:_0x431ad7;if(!_0x54b750)throw new Error('No\x20project\x20specified.\x20Use\x20\x22Project/Agent\x22\x20format\x20or\x20set\x20project\x20with\x20\x22tdx\x20use\x20llm_project\x22');if(_0x5e31b2){const _0x162143=_0x30e2b9?_0x161cb7(0x117):_0x161cb7(0xec);console['error']('Using\x20agent\x20from\x20'+_0x162143+':\x20'+_0x54b750+'/'+_0x35b7ba);}const _0x527a2f=await withSpinner('Resolving\x20project\x20\x27'+_0x54b750+_0x161cb7(0x124),()=>_0x30bc5f[_0x161cb7(0x10c)][_0x161cb7(0xfb)](_0x54b750),{'verbose':_0x5e31b2}),_0x4ea02c=await withSpinner(_0x161cb7(0x119)+_0x35b7ba+_0x161cb7(0x124),()=>_0x30bc5f[_0x161cb7(0x10c)][_0x161cb7(0x115)](_0x35b7ba,_0x527a2f[_0x161cb7(0x109)]),{'verbose':_0x5e31b2});return _0x4ea02c['data'];}else{const _0x44f0ab=_0x30bc5f[_0x161cb7(0x10c)][_0x161cb7(0xf6)]();if(_0x44f0ab)return _0x5e31b2&&console[_0x161cb7(0x10a)](_0x161cb7(0x12a)+_0x44f0ab[_0x161cb7(0x12d)]),_0x44f0ab['id'];const _0x200c39=await withSpinner('Getting\x20default\x20agent...',()=>_0x30bc5f['llm'][_0x161cb7(0x101)](_0x161cb7(0x126),0x0),{'verbose':_0x5e31b2});return _0x200c39[_0x161cb7(0x109)]['id'];}}export class ChatCommand extends BaseCommand{[a8_0x364756(0x12d)]=a8_0x364756(0x130);['description']='Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)';[a8_0x364756(0x11d)](_0x4ad357){const _0x533d6f=a8_0x364756,_0x5e02d7=_0x4ad357[_0x533d6f(0x11e)][_0x533d6f(0x10e)]('\x20');if(!_0x5e02d7)return'Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options';return undefined;}async[a8_0x364756(0x122)](_0x4f98c9,_0x5ded15,_0x2c81ab,_0x254a5e,_0x602deb){const _0x142cac=a8_0x364756;for await(const _0xe4b04c of _0x4f98c9[_0x142cac(0x10c)][_0x142cac(0x130)](_0x5ded15,{'agentId':_0x2c81ab,'chatId':_0x254a5e})){if(_0xe4b04c[_0x142cac(0x107)]===_0x142cac(0x12f)){const _0x39ba44=_0xe4b04c['data'][_0x142cac(0x12b)];saveLastChatId(_0x39ba44),_0x602deb&&console[_0x142cac(0x10a)](_0x142cac(0x12e)+_0x39ba44);}else _0xe4b04c[_0x142cac(0x107)]===_0x142cac(0xee)&&this[_0x142cac(0xfc)](_0xe4b04c[_0x142cac(0x109)]);}}async[a8_0x364756(0x116)](_0x243856,_0x43b7c0,_0xd97eeb,_0x3021a7){const _0x1299b8=a8_0x364756,_0x1f0eb7=_0x243856[_0x1299b8(0xf2)]['site'];let _0x114a55=![];for await(const _0x3ab671 of _0x243856[_0x1299b8(0x10c)][_0x1299b8(0x130)](_0x43b7c0,{'agentId':_0xd97eeb,'chatId':_0x3021a7})){if(_0x3ab671[_0x1299b8(0x107)]===_0x1299b8(0x12f)){const _0x378997=_0x3ab671[_0x1299b8(0x109)];saveLastChatId(_0x378997['chatId']);const _0x4bb0b6=_0x378997[_0x1299b8(0x110)]&&_0x378997[_0x1299b8(0x125)]?getLLMConversationUrl(_0x1f0eb7,_0x378997[_0x1299b8(0x110)],_0x378997['agentId'],_0x378997[_0x1299b8(0x12b)]):undefined;console[_0x1299b8(0x121)](JSON[_0x1299b8(0xfd)]({'type':_0x1299b8(0x12f),'data':{'chatId':_0x378997['chatId'],'agentId':_0x378997[_0x1299b8(0x125)],'consoleUrl':_0x4bb0b6}})),_0x114a55=!![];}else{if(_0x3ab671[_0x1299b8(0x107)]===_0x1299b8(0xee)){!_0x114a55&&_0x3021a7&&(console[_0x1299b8(0x121)](JSON[_0x1299b8(0xfd)]({'type':_0x1299b8(0x12f),'data':{'chatId':_0x3021a7}})),_0x114a55=!![]);const _0x9f309b=_0x3ab671[_0x1299b8(0x109)];if(_0x1299b8(0x108)in _0x9f309b)console[_0x1299b8(0x121)](JSON[_0x1299b8(0xfd)]({'type':_0x1299b8(0x108),'data':{'content':_0x9f309b[_0x1299b8(0x108)]}}));else{if(_0x1299b8(0x135)in _0x9f309b){const _0x52ae93=_0x9f309b[_0x1299b8(0x135)];console[_0x1299b8(0x121)](JSON[_0x1299b8(0xfd)]({'type':'tool_call','data':{'id':_0x52ae93['id'],'name':_0x52ae93[_0x1299b8(0x114)],'target':_0x52ae93[_0x1299b8(0xf9)]?.[_0x1299b8(0x12d)]||_0x52ae93[_0x1299b8(0x11c)]?.[_0x1299b8(0x12d)]||_0x52ae93[_0x1299b8(0x11b)]?.[_0x1299b8(0x12d)]||_0x52ae93['targetFunction']}}));}else{if(_0x1299b8(0xf8)in _0x9f309b)console[_0x1299b8(0x121)](JSON[_0x1299b8(0xfd)]({'type':'tool_result','data':{'id':_0x9f309b['tool']['id'],'name':_0x9f309b[_0x1299b8(0xf8)][_0x1299b8(0x114)],'result':typeof _0x9f309b[_0x1299b8(0xf8)][_0x1299b8(0x108)]===_0x1299b8(0xf1)?_0x9f309b[_0x1299b8(0xf8)]['content'][_0x1299b8(0x133)](0x0,0x1f4):''}}));else _0x1299b8(0x10a)in _0x9f309b&&console[_0x1299b8(0x121)](JSON[_0x1299b8(0xfd)]({'type':_0x1299b8(0x10a),'data':{'error':_0x9f309b['error']}}));}}}}}console[_0x1299b8(0x121)](JSON[_0x1299b8(0xfd)]({'type':_0x1299b8(0x129)}));}async[a8_0x364756(0x120)](_0x417ff9){const _0x283aa0=a8_0x364756,{options:_0x2b62f9,args:_0x2c6c73,tdx:_0x16d62d}=_0x417ff9,_0x7e80ba=_0x2c6c73[_0x283aa0(0x10e)]('\x20'),_0x2d1b96=_0x2b62f9,_0x203035=_0x2d1b96['agent'],_0x3f299c=_0x2d1b96[_0x283aa0(0x103)],_0x40f006=_0x2d1b96[_0x283aa0(0x112)],_0x20805d=_0x2d1b96[_0x283aa0(0x111)],_0x2505ad=_0x2d1b96[_0x283aa0(0x12b)],_0x15f557=_0x2d1b96[_0x283aa0(0x127)];if(_0x20805d&&_0x2505ad)return console[_0x283aa0(0x10a)](_0x283aa0(0x134)),0x1;try{let _0x31ec62,_0x7dd9ad;if(_0x2505ad)_0x7dd9ad=_0x2505ad;else!_0x20805d&&(_0x7dd9ad=loadLastChatId(),_0x7dd9ad&&_0x2b62f9[_0x283aa0(0x106)]&&console[_0x283aa0(0x10a)](_0x283aa0(0x11f)+_0x7dd9ad));!_0x2505ad&&(_0x20805d||!_0x7dd9ad)&&(_0x31ec62=await resolveAgentId(_0x16d62d,_0x203035,_0x3f299c,_0x40f006,_0x2b62f9['verbose']));const _0x2fb1ce=_0x15f557?(_0x155dc8,_0x2465c7,_0x51ae11)=>this[_0x283aa0(0x116)](_0x16d62d,_0x155dc8,_0x2465c7,_0x51ae11):(_0x49c3cd,_0x1a4466,_0xd82a22)=>this[_0x283aa0(0x122)](_0x16d62d,_0x49c3cd,_0x1a4466,_0xd82a22,_0x2b62f9['verbose']);try{await _0x2fb1ce(_0x7e80ba,_0x31ec62,_0x7dd9ad);}catch(_0x45b6be){const _0x25adc7=_0x45b6be instanceof SDKError&&_0x45b6be[_0x283aa0(0x131)]===ErrorCode[_0x283aa0(0xfa)]||_0x45b6be instanceof Error&&_0x45b6be[_0x283aa0(0x11a)]['includes']('404');if(_0x25adc7&&_0x2505ad)return console[_0x283aa0(0x10a)]('Error:\x20Chat\x20session\x20\x27'+_0x2505ad+'\x27\x20not\x20found'),0x1;if(_0x25adc7)_0x2b62f9[_0x283aa0(0x106)]&&console['error'](_0x283aa0(0xf0)),!_0x31ec62&&(_0x31ec62=await resolveAgentId(_0x16d62d,_0x203035,_0x3f299c,_0x40f006,_0x2b62f9['verbose'])),await _0x2fb1ce(_0x7e80ba,_0x31ec62,undefined);else throw _0x45b6be;}return!_0x15f557&&console[_0x283aa0(0x121)](),0x0;}catch(_0x1f09e6){return console[_0x283aa0(0x10a)](),handleSDKError(_0x1f09e6,_0x2b62f9),0x1;}}[a8_0x364756(0xfc)](_0x551359){const _0x14801f=a8_0x364756;if('content'in _0x551359)process[_0x14801f(0x10d)][_0x14801f(0xea)](_0x551359['content']);else _0x14801f(0x10a)in _0x551359&&console[_0x14801f(0x10a)](_0x14801f(0xf3)+_0x551359[_0x14801f(0x10a)]);}}export class ChatCreateCommand extends BaseCommand{[a8_0x364756(0x12d)]='chat-create';['description']=a8_0x364756(0x123);[a8_0x364756(0x11d)](_0x58cabd){const _0x1acc75=a8_0x364756,_0x12adcc=_0x58cabd[_0x1acc75(0xeb)],_0xb4594f=_0x12adcc[_0x1acc75(0xf7)],_0x5cb3a0=_0x12adcc[_0x1acc75(0x103)];if(!_0xb4594f&&!_0x5cb3a0)return _0x1acc75(0xf5);return undefined;}async[a8_0x364756(0x120)](_0x439acd){const _0x3e658d=a8_0x364756,{options:_0x4108bc,tdx:_0x215cda}=_0x439acd,_0x503217=_0x4108bc,_0x130e3d=_0x503217[_0x3e658d(0xf7)],_0x244075=_0x503217[_0x3e658d(0x103)],_0x19efda=_0x503217[_0x3e658d(0x112)];try{const _0x2a2f33=await resolveAgentId(_0x215cda,_0x130e3d,_0x244075,_0x19efda,_0x4108bc[_0x3e658d(0x106)]),_0x4468bd=await _0x215cda[_0x3e658d(0x10c)][_0x3e658d(0x100)](_0x2a2f33);return saveLastChatId(_0x4468bd['id']),console[_0x3e658d(0x121)](JSON[_0x3e658d(0xfd)]({'chatId':_0x4468bd['id'],'agentId':_0x2a2f33})),0x0;}catch(_0x45dc85){return handleSDKError(_0x45dc85,_0x4108bc),0x1;}}}
|
|
1
|
+
const a8_0x16d471=a8_0x5377;(function(_0x395e9f,_0xc575e4){const _0x571937=a8_0x5377,_0x51724b=_0x395e9f();while(!![]){try{const _0x3d2a2f=-parseInt(_0x571937(0x21e))/0x1+parseInt(_0x571937(0x214))/0x2+parseInt(_0x571937(0x222))/0x3+-parseInt(_0x571937(0x211))/0x4*(-parseInt(_0x571937(0x1f5))/0x5)+-parseInt(_0x571937(0x213))/0x6+parseInt(_0x571937(0x1e8))/0x7+-parseInt(_0x571937(0x1e9))/0x8*(parseInt(_0x571937(0x1e7))/0x9);if(_0x3d2a2f===_0xc575e4)break;else _0x51724b['push'](_0x51724b['shift']());}catch(_0x26502f){_0x51724b['push'](_0x51724b['shift']());}}}(a8_0x5105,0x40fb9));import{BaseCommand}from'./command.js';import{SDKError,ErrorCode}from'../sdk/errors.js';function a8_0x5377(_0x34bb83,_0x48c918){_0x34bb83=_0x34bb83-0x1e1;const _0x51056f=a8_0x5105();let _0x5377bc=_0x51056f[_0x34bb83];return _0x5377bc;}import{withSpinner}from'../utils/spinner.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a8_0x5105(){const _0x20774c=['new','name','description','\x20\x20Cause:\x20','content','code','message','Create\x20a\x20new\x20chat\x20session','llmAgent','Getting\x20default\x20agent...','options','Resolving\x20project\x20\x27','agentId','No\x20project\x20specified.\x20Use\x20\x22Project/Agent\x22\x20format\x20or\x20set\x20project\x20with\x20\x22tdx\x20use\x20llm_project\x22','handleChatEvent','tool','streamChatJsonl','error','execute','Chat\x20session\x20not\x20found,\x20starting\x20new\x20chat...','cause','Continuing\x20chat:\x20','chatId','args','functionName','\x0aError:\x20','249296kQXWut','llm','1842846yVTeAD','843060YVCQVZ','join','stringify','log','stdout','llmProject','tool_result','tool_call','streamChat','event','124189OgXrof','targetFunction','getDefaultAgent','stack','356385oTwKxj','getOrCreateDefaultAgent','metadata','write','agent','type','verbose','data','chat-create','targetWebSearchTool','Using\x20agent\x20from\x20','validate','CHAT_NOT_FOUND','Chat\x20with\x20an\x20LLM\x20agent\x20(simplified)','18jfKtLl','2289966RYkDlg','2175632MWsVCz','Chat\x20session:\x20','session\x20context','context','Agent\x20required.\x20Use\x20--agent\x20\x22Project/Agent\x22\x20or\x20set\x20agent\x20with\x20\x22tdx\x20use\x20agent\x22','includes','--agent\x20flag','Error:\x20Chat\x20session\x20\x27','resolveProjectId','chat','string','projectId','30lKJaYF','\x27...'];a8_0x5105=function(){return _0x20774c;};return a8_0x5105();}import{saveLastChatId,loadLastChatId}from'../sdk/llm/chat-cache.js';import{getLLMConversationUrl}from'../sdk/client/endpoints.js';function handleSDKError(_0x3f554a,_0x3f6ed8){const _0x583467=a8_0x5377;if(_0x3f554a instanceof SDKError)console[_0x583467(0x208)]('Error:\x20'+_0x3f554a[_0x583467(0x1fd)]),_0x3f6ed8[_0x583467(0x228)]&&(_0x3f554a[_0x583467(0x20b)]&&console[_0x583467(0x208)](_0x583467(0x1fa)+_0x3f554a['cause']),_0x3f554a[_0x583467(0x221)]&&(console[_0x583467(0x208)]('\x0aStack\x20trace:'),console[_0x583467(0x208)](_0x3f554a['stack'])));else throw _0x3f554a;}async function resolveAgentId(_0x8fdd9b,_0x288544,_0x492b73,_0x14b562,_0x5d015c){const _0x48c3c6=a8_0x5377,_0x3416aa=_0x288544||_0x492b73;if(_0x3416aa){const {projectName:_0x1b59ab,agentName:_0x55a5ed}=parseAgentRef(_0x3416aa),_0x4f8751=_0x55a5ed||_0x3416aa,_0x611e28=_0x55a5ed?_0x1b59ab:_0x14b562;if(!_0x611e28)throw new Error(_0x48c3c6(0x204));if(_0x5d015c){const _0x7f053=_0x288544?_0x48c3c6(0x1ef):_0x48c3c6(0x1eb);console[_0x48c3c6(0x208)](_0x48c3c6(0x1e3)+_0x7f053+':\x20'+_0x611e28+'/'+_0x4f8751);}const _0x48dff9=await withSpinner(_0x48c3c6(0x202)+_0x611e28+_0x48c3c6(0x1f6),()=>_0x8fdd9b[_0x48c3c6(0x212)][_0x48c3c6(0x1f1)](_0x611e28),{'verbose':_0x5d015c}),_0x463b2c=await withSpinner('Resolving\x20agent\x20\x27'+_0x4f8751+'\x27...',()=>_0x8fdd9b[_0x48c3c6(0x212)]['resolveAgentId'](_0x4f8751,_0x48dff9[_0x48c3c6(0x229)]),{'verbose':_0x5d015c});return _0x463b2c['data'];}else{const _0x4f53be=_0x8fdd9b[_0x48c3c6(0x212)][_0x48c3c6(0x220)]();if(_0x4f53be)return _0x5d015c&&console['error']('Using\x20cached\x20default\x20agent:\x20'+_0x4f53be['name']),_0x4f53be['id'];const _0x10db00=await withSpinner(_0x48c3c6(0x200),()=>_0x8fdd9b[_0x48c3c6(0x212)][_0x48c3c6(0x223)]('claude-4.5-haiku',0x0),{'verbose':_0x5d015c});return _0x10db00[_0x48c3c6(0x229)]['id'];}}export class ChatCommand extends BaseCommand{[a8_0x16d471(0x1f8)]=a8_0x16d471(0x1f2);[a8_0x16d471(0x1f9)]=a8_0x16d471(0x1e6);[a8_0x16d471(0x1e4)](_0x1850ba){const _0x11e1b2=a8_0x16d471,_0x1ab9f0=_0x1850ba[_0x11e1b2(0x20e)]['join']('\x20');if(!_0x1ab9f0)return'Usage:\x20tdx\x20chat\x20\x22your\x20message\x22\x0a\x0aRun\x20\x27tdx\x20chat\x20--help\x27\x20for\x20more\x20options';return undefined;}async[a8_0x16d471(0x21c)](_0x50b4a7,_0x5cdc9a,_0x121cb1,_0x5e0c50,_0x5d19bb){const _0x457a1a=a8_0x16d471;for await(const _0x3db3b7 of _0x50b4a7[_0x457a1a(0x212)][_0x457a1a(0x1f2)](_0x5cdc9a,{'agentId':_0x121cb1,'chatId':_0x5e0c50})){if(_0x3db3b7['type']===_0x457a1a(0x224)){const _0x5e8343=_0x3db3b7['data']['chatId'];saveLastChatId(_0x5e8343),_0x5d19bb&&console[_0x457a1a(0x208)](_0x457a1a(0x1ea)+_0x5e8343);}else _0x3db3b7[_0x457a1a(0x227)]===_0x457a1a(0x21d)&&this[_0x457a1a(0x205)](_0x3db3b7[_0x457a1a(0x229)]);}}async[a8_0x16d471(0x207)](_0x5af078,_0x31d434,_0xb51106,_0xfa2ef7){const _0x50098a=a8_0x16d471,_0x334643=_0x5af078[_0x50098a(0x1ec)]['site'];let _0xcf3cea=![];for await(const _0x4a3f10 of _0x5af078['llm'][_0x50098a(0x1f2)](_0x31d434,{'agentId':_0xb51106,'chatId':_0xfa2ef7})){if(_0x4a3f10['type']===_0x50098a(0x224)){const _0x4a3ad9=_0x4a3f10[_0x50098a(0x229)];saveLastChatId(_0x4a3ad9['chatId']);const _0x30a3a3=_0x4a3ad9[_0x50098a(0x1f4)]&&_0x4a3ad9[_0x50098a(0x203)]?getLLMConversationUrl(_0x334643,_0x4a3ad9[_0x50098a(0x1f4)],_0x4a3ad9[_0x50098a(0x203)],_0x4a3ad9[_0x50098a(0x20d)]):undefined;console[_0x50098a(0x217)](JSON[_0x50098a(0x216)]({'type':'metadata','data':{'chatId':_0x4a3ad9['chatId'],'agentId':_0x4a3ad9['agentId'],'consoleUrl':_0x30a3a3}})),_0xcf3cea=!![];}else{if(_0x4a3f10[_0x50098a(0x227)]===_0x50098a(0x21d)){!_0xcf3cea&&_0xfa2ef7&&(console[_0x50098a(0x217)](JSON[_0x50098a(0x216)]({'type':_0x50098a(0x224),'data':{'chatId':_0xfa2ef7}})),_0xcf3cea=!![]);const _0x5e23ca=_0x4a3f10[_0x50098a(0x229)];if('content'in _0x5e23ca)console[_0x50098a(0x217)](JSON[_0x50098a(0x216)]({'type':'content','data':{'content':_0x5e23ca[_0x50098a(0x1fb)]}}));else{if(_0x50098a(0x21b)in _0x5e23ca){const _0xe0c905=_0x5e23ca[_0x50098a(0x21b)];console[_0x50098a(0x217)](JSON[_0x50098a(0x216)]({'type':_0x50098a(0x21b),'data':{'id':_0xe0c905['id'],'name':_0xe0c905[_0x50098a(0x20f)],'target':_0xe0c905['targetKnowledgeBase']?.[_0x50098a(0x1f8)]||_0xe0c905['targetAgent']?.[_0x50098a(0x1f8)]||_0xe0c905[_0x50098a(0x1e2)]?.['name']||_0xe0c905[_0x50098a(0x21f)]}}));}else{if(_0x50098a(0x206)in _0x5e23ca)console['log'](JSON[_0x50098a(0x216)]({'type':_0x50098a(0x21a),'data':{'id':_0x5e23ca[_0x50098a(0x206)]['id'],'name':_0x5e23ca[_0x50098a(0x206)][_0x50098a(0x20f)],'result':typeof _0x5e23ca['tool'][_0x50098a(0x1fb)]===_0x50098a(0x1f3)?_0x5e23ca[_0x50098a(0x206)][_0x50098a(0x1fb)]['slice'](0x0,0x1f4):''}}));else _0x50098a(0x208)in _0x5e23ca&&console[_0x50098a(0x217)](JSON['stringify']({'type':_0x50098a(0x208),'data':{'error':_0x5e23ca[_0x50098a(0x208)]}}));}}}}}console['log'](JSON[_0x50098a(0x216)]({'type':'done'}));}async['execute'](_0x2e1996){const _0x251432=a8_0x16d471,{options:_0x37fb31,args:_0x4b3231,tdx:_0x47113a}=_0x2e1996,_0x4bd800=_0x4b3231[_0x251432(0x215)]('\x20'),_0x23b51d=_0x37fb31,_0x28fb76=_0x23b51d[_0x251432(0x226)],_0x129d92=_0x23b51d[_0x251432(0x1ff)],_0x5e9ff6=_0x23b51d[_0x251432(0x219)],_0x4d511a=_0x23b51d[_0x251432(0x1f7)],_0x4f46a2=_0x23b51d[_0x251432(0x20d)],_0x2a3f62=_0x23b51d['stream'];if(_0x4d511a&&_0x4f46a2)return console['error']('Error:\x20Cannot\x20use\x20--new\x20and\x20--chat-id\x20together'),0x1;try{let _0x5551d0,_0x14c6a;if(_0x4f46a2)_0x14c6a=_0x4f46a2;else!_0x4d511a&&(_0x14c6a=loadLastChatId(),_0x14c6a&&_0x37fb31[_0x251432(0x228)]&&console['error'](_0x251432(0x20c)+_0x14c6a));!_0x4f46a2&&(_0x4d511a||!_0x14c6a)&&(_0x5551d0=await resolveAgentId(_0x47113a,_0x28fb76,_0x129d92,_0x5e9ff6,_0x37fb31[_0x251432(0x228)]));const _0x63c34=_0x2a3f62?(_0x16c48f,_0x2b57e1,_0x1c15ef)=>this[_0x251432(0x207)](_0x47113a,_0x16c48f,_0x2b57e1,_0x1c15ef):(_0x48d645,_0x529a8b,_0x3b8d0)=>this[_0x251432(0x21c)](_0x47113a,_0x48d645,_0x529a8b,_0x3b8d0,_0x37fb31['verbose']);try{await _0x63c34(_0x4bd800,_0x5551d0,_0x14c6a);}catch(_0x2bbf4e){const _0xdfdd88=_0x2bbf4e instanceof SDKError&&_0x2bbf4e[_0x251432(0x1fc)]===ErrorCode[_0x251432(0x1e5)]||_0x2bbf4e instanceof Error&&_0x2bbf4e[_0x251432(0x1fd)][_0x251432(0x1ee)]('404');if(_0xdfdd88&&_0x4f46a2)return console[_0x251432(0x208)](_0x251432(0x1f0)+_0x4f46a2+'\x27\x20not\x20found'),0x1;if(_0xdfdd88)_0x37fb31[_0x251432(0x228)]&&console['error'](_0x251432(0x20a)),!_0x5551d0&&(_0x5551d0=await resolveAgentId(_0x47113a,_0x28fb76,_0x129d92,_0x5e9ff6,_0x37fb31[_0x251432(0x228)])),await _0x63c34(_0x4bd800,_0x5551d0,undefined);else throw _0x2bbf4e;}return!_0x2a3f62&&console[_0x251432(0x217)](),0x0;}catch(_0x581008){return console['error'](),handleSDKError(_0x581008,_0x37fb31),0x1;}}[a8_0x16d471(0x205)](_0x44773b){const _0x587ab1=a8_0x16d471;if(_0x587ab1(0x1fb)in _0x44773b)process[_0x587ab1(0x218)][_0x587ab1(0x225)](_0x44773b[_0x587ab1(0x1fb)]);else _0x587ab1(0x208)in _0x44773b&&console[_0x587ab1(0x208)](_0x587ab1(0x210)+_0x44773b[_0x587ab1(0x208)]);}}export class ChatCreateCommand extends BaseCommand{[a8_0x16d471(0x1f8)]=a8_0x16d471(0x1e1);[a8_0x16d471(0x1f9)]=a8_0x16d471(0x1fe);[a8_0x16d471(0x1e4)](_0xd7c40b){const _0x321c64=a8_0x16d471,_0x2a3f9e=_0xd7c40b[_0x321c64(0x201)],_0x274cac=_0x2a3f9e[_0x321c64(0x226)],_0x33f514=_0x2a3f9e[_0x321c64(0x1ff)];if(!_0x274cac&&!_0x33f514)return _0x321c64(0x1ed);return undefined;}async[a8_0x16d471(0x209)](_0x297c63){const _0xf28474=a8_0x16d471,{options:_0x6352c9,tdx:_0x231819}=_0x297c63,_0xa858e4=_0x6352c9,_0x2859ca=_0xa858e4['agent'],_0x2985ef=_0xa858e4[_0xf28474(0x1ff)],_0x57a3e4=_0xa858e4['llmProject'];try{const _0x166594=await resolveAgentId(_0x231819,_0x2859ca,_0x2985ef,_0x57a3e4,_0x6352c9['verbose']),_0x2053e7=await _0x231819[_0xf28474(0x212)]['startChat'](_0x166594);return saveLastChatId(_0x2053e7['id']),console['log'](JSON[_0xf28474(0x216)]({'chatId':_0x2053e7['id'],'agentId':_0x166594})),0x0;}catch(_0x1e9ae4){return handleSDKError(_0x1e9ae4,_0x6352c9),0x1;}}}
|