@treasuredata/tdx 2026.3.48 → 2026.3.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.d.ts +22 -0
- package/dist/commands/auth-command.d.ts.map +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-command.js.map +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.d.ts +5 -5
- package/dist/commands/profile-command.d.ts.map +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profile-command.js.map +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.d.ts +6 -4
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.d.ts +12 -8
- package/dist/core/oauth.d.ts.map +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/oauth.js.map +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.d.ts.map +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/mcp/utils.js.map +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts +8 -0
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts.map +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/index.js.map +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.d.ts +29 -0
- package/dist/sdk/types/workspace.d.ts.map +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.d.ts +4 -1
- package/dist/sdk/workspace/git.d.ts.map +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/git.js.map +1 -1
- package/dist/sdk/workspace/index.d.ts +8 -15
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.d.ts +3 -13
- package/dist/sdk/workspace/weekly.d.ts.map +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/weekly.js.map +1 -1
- package/dist/sdk/workspace/wikilinks.d.ts +15 -0
- package/dist/sdk/workspace/wikilinks.d.ts.map +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/sdk/workspace/wikilinks.js.map +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
- package/dist/commands/auth-login-command.d.ts +0 -29
- package/dist/commands/auth-login-command.d.ts.map +0 -1
- package/dist/commands/auth-login-command.js +0 -1
- package/dist/commands/auth-login-command.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0xdba3e5=a3_0x303d;(function(_0x18b775,_0x15cd32){const _0xd2f38e=a3_0x303d,_0x2313d7=_0x18b775();while(!![]){try{const _0xb655b0=parseInt(_0xd2f38e(0x10f))/0x1+parseInt(_0xd2f38e(0x130))/0x2+-parseInt(_0xd2f38e(0x118))/0x3*(-parseInt(_0xd2f38e(0x12c))/0x4)+-parseInt(_0xd2f38e(0x128))/0x5*(parseInt(_0xd2f38e(0x11a))/0x6)+parseInt(_0xd2f38e(0x132))/0x7+-parseInt(_0xd2f38e(0x119))/0x8+-parseInt(_0xd2f38e(0x131))/0x9*(parseInt(_0xd2f38e(0x121))/0xa);if(_0xb655b0===_0x15cd32)break;else _0x2313d7['push'](_0x2313d7['shift']());}catch(_0x26518d){_0x2313d7['push'](_0x2313d7['shift']());}}}(a3_0xa191,0xf2776));function a3_0xa191(){const _0x5530cc=['5160YDaint','Site:\x20','\x20activation','error','3519056MjfiUK','5670171lmSGyM','1956283aGWMxn','Resolved\x20child\x20ID:\x20','1712549wUADar','activations','Error:\x20','message','Child\x20name:\x20','\x27...','segment','name','Error:\x20Child\x20segment\x20name\x20is\x20required\x20for\x20activations','2571CKQoCK','15434280EDdhqg','34014YMNYYj','length','site','execute','\x20\x20Cause:\x20','Parent\x20name:\x20','resolveSegmentId','20QvxEFO','listActivations','Error:\x20Segment\x20name\x20is\x20required','resolveParentId','Resolved\x20parent\x20ID:\x20','description','verbose','595SMcwMU','cause','Usage:\x20tdx\x20activations\x20<parent_name/child_name>','data'];a3_0xa191=function(){return _0x5530cc;};return a3_0xa191();}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a3_0x303d(_0x128f39,_0x1e08be){_0x128f39=_0x128f39-0x10f;const _0xa1910b=a3_0xa191();let _0x303d3e=_0xa1910b[_0x128f39];return _0x303d3e;}import{handleSDKOutput}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import{parseSegmentRef}from'../sdk/segment/segment-ref-parser.js';export class ActivationsCommand extends BaseCommand{[a3_0xdba3e5(0x116)]=a3_0xdba3e5(0x110);[a3_0xdba3e5(0x126)]='List\x20activations\x20for\x20a\x20segment';async[a3_0xdba3e5(0x11d)](_0x1b23c9){const _0x1ff40f=a3_0xdba3e5,{options:_0x2d45ee,args:_0x282ac9,tdx:_0xbdecb0}=_0x1b23c9;if(_0x282ac9[_0x1ff40f(0x11b)]===0x0)return console[_0x1ff40f(0x12f)](_0x1ff40f(0x123)),console[_0x1ff40f(0x12f)](_0x1ff40f(0x12a)),0x1;try{const {parentId:_0x3fd696,childId:_0x529b01}=parseSegmentRef(_0x282ac9[0x0]);if(!_0x529b01)return console['error'](_0x1ff40f(0x117)),console['error']('Usage:\x20tdx\x20activations\x20<parent_name/child_name>'),0x1;_0x2d45ee[_0x1ff40f(0x127)]&&(console[_0x1ff40f(0x12f)](_0x1ff40f(0x12d)+_0x2d45ee[_0x1ff40f(0x11c)]),console[_0x1ff40f(0x12f)](_0x1ff40f(0x11f)+_0x3fd696),console[_0x1ff40f(0x12f)](_0x1ff40f(0x113)+_0x529b01));const _0x27c9c4=await withSpinner('Resolving\x20parent\x20segment\x20\x27'+_0x3fd696+_0x1ff40f(0x114),()=>_0xbdecb0[_0x1ff40f(0x115)][_0x1ff40f(0x124)](_0x3fd696),{'verbose':_0x2d45ee[_0x1ff40f(0x127)]}),_0x244e50=_0x27c9c4[_0x1ff40f(0x12b)];_0x2d45ee[_0x1ff40f(0x127)]&&console[_0x1ff40f(0x12f)](_0x1ff40f(0x125)+_0x244e50);const _0x1d012f=await withSpinner('Resolving\x20child\x20segment\x20\x27'+_0x529b01+_0x1ff40f(0x114),()=>_0xbdecb0['segment'][_0x1ff40f(0x120)](_0x244e50,_0x529b01),{'verbose':_0x2d45ee[_0x1ff40f(0x127)]}),_0xe31b36=_0x1d012f[_0x1ff40f(0x12b)];_0x2d45ee[_0x1ff40f(0x127)]&&console[_0x1ff40f(0x12f)](_0x1ff40f(0x133)+_0xe31b36);const _0x329477=await withSpinner('Listing\x20activations\x20for\x20segment\x20\x27'+_0x529b01+'\x27...',()=>_0xbdecb0[_0x1ff40f(0x115)][_0x1ff40f(0x122)](_0x244e50,_0xe31b36),{'verbose':_0x2d45ee[_0x1ff40f(0x127)]}),_0x2a5f42=_0x329477[_0x1ff40f(0x12b)];return console[_0x1ff40f(0x12f)]('✔\x20Found\x20'+_0x2a5f42[_0x1ff40f(0x11b)]+_0x1ff40f(0x12e)+(_0x2a5f42[_0x1ff40f(0x11b)]!==0x1?'s':'')),await handleSDKOutput(_0x2a5f42,_0x2d45ee),0x0;}catch(_0x3a396d){if(_0x3a396d instanceof SDKError)return console[_0x1ff40f(0x12f)](_0x1ff40f(0x111)+_0x3a396d[_0x1ff40f(0x112)]),_0x3a396d['cause']&&console[_0x1ff40f(0x12f)](_0x1ff40f(0x11e)+_0x3a396d[_0x1ff40f(0x129)]),0x1;throw _0x3a396d;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a4_0x12e97b=a4_0xaade;(function(_0x2d41f1,_0x13c605){const _0x9de96=a4_0xaade,_0x1d9a5e=_0x2d41f1();while(!![]){try{const _0x33a4d1=parseInt(_0x9de96(0x93))/0x1+parseInt(_0x9de96(0x71))/0x2+-parseInt(_0x9de96(0xde))/0x3+-parseInt(_0x9de96(0x9e))/0x4+parseInt(_0x9de96(0xce))/0x5+-parseInt(_0x9de96(0xa6))/0x6+parseInt(_0x9de96(0xb6))/0x7*(parseInt(_0x9de96(0xca))/0x8);if(_0x33a4d1===_0x13c605)break;else _0x1d9a5e['push'](_0x1d9a5e['shift']());}catch(_0x31e96e){_0x1d9a5e['push'](_0x1d9a5e['shift']());}}}(a4_0x2e89,0x8c01d));function a4_0x2e89(){const _0x537693=['Status:\x20','Cloning\x20\x22','experimentalArtifacts','\x20resources?','1032820WrxuJT','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x0a✔\x20Pushed\x20','experimentalKnowledgeBases','agentId','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','agents','no_local_folder','\x20changed','Push\x20local\x20agent\x20files\x20to\x20LLM\x20project','3825564WyFNZy','<new-name>','log','\x20--name\x20','reason','yes','parse','repeat','1873518YMRIPr','\x20resources\x20to\x20\x27','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','Writing\x20files...','New\x20project:\x20','Pushing\x20to\x20project...','counts','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','\x0aError:','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','cloneProject','Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project','diff','Using\x20local\x20project:\x20','Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation','✔\x20Context\x20set:\x20','7XqhdpX','Pulling\x20agent\x20\x22','\x0aWrite\x20','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','\x22\x20to\x20new\x20project\x20\x22','pushProject','Analyzing\x20changes\x20to\x20push...','\x0aErrors\x20found:','llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a','\x20\x20Knowledge\x20Base\x20\x22','\x20files\x20to\x20','newProjectId','\x20\x20Target:\x20','cyan','profile','\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date','Cannot\x20clone\x20from\x20context\x20project\x20\x22','Dry\x20run\x20-\x20no\x20files\x20written','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','\x20\x20Prompts:\x20','725528MTnYhE','Errors:','Analyzing\x20project\x20\x22','dryRun','3401420cpFFAV','execute','Using\x20project\x20from\x20','error','MISSING_ARGUMENT','\x22:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20<agent>\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20project','red','\x20successfully','projectId','\x22\x20to\x20a\x20different\x20profile','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','site','Project\x20cloned\x20successfully','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','description','2609352auvPHp','pullProject','\x20\x20Knowledge\x20Bases:\x20','Pushing\x20agent\x20from\x20\x22','output','Chat:\x20','Using\x20project:\x20','outputPath','cwd','new','no_context','projectDir','Project\x20cloned\x20with\x20errors','Source:\x20','llmProject','Project:\x20','agent:clone','projectName','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','\x0a[Dry\x20run]\x20No\x20files\x20were\x20written','errors','\x20errors','\x0a✔\x20Pulled\x20','push','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','unchanged','Agent\x20','arg-dir','Failed\x20to\x20push\x20agent:\x20','Using\x20current\x20project:\x20','\x22...','\x27\x20to\x20create\x20the\x20folder\x20structure.','context','-\x20no\x20files\x20written','\x20files?','prompts','utf-8','\x20\x20Integrations:\x20','\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27','INVALID_ARGUMENT','sourceProjectName','dirname','\x20\x20Text\x20Knowledge\x20Bases:\x20','created','pushAgent','agent:pull','dim','\x20\x20Agent\x20\x22','\x20\x20Integration\x20\x22','\x20\x20Source:\x20','Using\x20context\x20project:\x20','updated','\x20created','yellow','gray','New\x20project\x20ID:\x20','Output:\x20','action','textKnowledgeBases','First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a','\x0aChanges\x20to\x20prompt\x20\x27','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','knowledgeBases','agent.yml','llm','Agent\x20pulled\x20successfully','Output\x20path:\x20','total','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','\x20\x20Experimental\x20Artifact\x20\x22','1816204xZTQfE','\x20\x20Prompt\x20\x22','name','\x20\x20Experimental\x20Artifacts:\x20','-\x20nothing\x20pushed','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','message','Dry\x20run\x20-\x20no\x20changes\x20made','tdx.json','\x20new','\x22\x20to\x20\x22','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','agentName','llm_project','found','integrations','agent:push','Cancelled','\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20all\x20agents\x20from\x20project','green','join','\x20\x20Agents:\x20','session','New\x20project\x20name\x20is\x20required','Agent:\x20','\x20|\x20','\x20unchanged','pullAgent','No\x20tdx.json\x20found\x20in\x20','\x0aPull\x20summary\x20for\x20\x27'];a4_0x2e89=function(){return _0x537693;};return a4_0x2e89();}import a4_0xe386e3 from'chalk';import a4_0x19ba0a 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';function a4_0xaade(_0x229fde,_0xfc16e2){_0x229fde=_0x229fde-0x6d;const _0x2e89a7=a4_0x2e89();let _0xaade02=_0x2e89a7[_0x229fde];return _0xaade02;}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(_0x4ec4ee){const _0x526dd8=a4_0xaade,_0x567e3f=[];if(_0x4ec4ee[_0x526dd8(0x6d)]!==undefined)_0x567e3f[_0x526dd8(0xf5)](_0x4ec4ee[_0x526dd8(0x6d)]+'\x20total');if(_0x4ec4ee[_0x526dd8(0xe7)]!==undefined&&_0x4ec4ee[_0x526dd8(0xe7)]>0x0)_0x567e3f[_0x526dd8(0xf5)](a4_0xe386e3['green'](_0x4ec4ee[_0x526dd8(0xe7)]+_0x526dd8(0x7a)));if(_0x4ec4ee['created']!==undefined&&_0x4ec4ee['created']>0x0)_0x567e3f['push'](a4_0xe386e3[_0x526dd8(0x84)](_0x4ec4ee[_0x526dd8(0x10a)]+_0x526dd8(0x113)));if(_0x4ec4ee[_0x526dd8(0x112)]!==undefined&&_0x4ec4ee[_0x526dd8(0x112)]>0x0)_0x567e3f['push'](a4_0xe386e3['yellow'](_0x4ec4ee[_0x526dd8(0x112)]+'\x20updated'));if(_0x4ec4ee[_0x526dd8(0xf8)]!==undefined&&_0x4ec4ee[_0x526dd8(0xf8)]>0x0)_0x567e3f[_0x526dd8(0xf5)](a4_0xe386e3[_0x526dd8(0x115)](_0x4ec4ee['unchanged']+_0x526dd8(0x8b)));if(_0x4ec4ee[_0x526dd8(0xf2)]!==undefined&&_0x4ec4ee['errors']>0x0)_0x567e3f['push'](a4_0xe386e3[_0x526dd8(0xd5)](_0x4ec4ee[_0x526dd8(0xf2)]+_0x526dd8(0xf3)));return _0x567e3f[_0x526dd8(0x85)](',\x20');}function displayDiffs(_0x219f5b,_0x3580d3,_0x330bd3,_0x4ed97c,_0x498498,_0x12fbe5,_0x113a51){const _0x16f2f0=a4_0xaade;for(const _0x49fdf2 of _0x219f5b){if(_0x49fdf2[_0x16f2f0(0xb2)]){const _0x2d1a6a=_0x49fdf2[_0x16f2f0(0x7d)]||_0x49fdf2[_0x16f2f0(0x73)];console[_0x16f2f0(0xa0)]('\x0aChanges\x20to\x20agent\x20\x27'+_0x2d1a6a+'\x27:'),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)),console['log'](_0x49fdf2['diff']),console['log']('─'[_0x16f2f0(0xa5)](0x3c));}}for(const _0x7143be of _0x3580d3){_0x7143be[_0x16f2f0(0xb2)]&&(console['log'](_0x16f2f0(0x11c)+_0x7143be[_0x16f2f0(0x73)]+'\x27:'),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)),console[_0x16f2f0(0xa0)](_0x7143be['diff']),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)));}for(const _0x5eb11b of _0x330bd3){_0x5eb11b[_0x16f2f0(0xb2)]&&(console[_0x16f2f0(0xa0)](_0x16f2f0(0x6e)+_0x5eb11b[_0x16f2f0(0x73)]+'\x27:'),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)),console[_0x16f2f0(0xa0)](_0x5eb11b[_0x16f2f0(0xb2)]),console['log']('─'['repeat'](0x3c)));}for(const _0x3b0f74 of _0x4ed97c){_0x3b0f74['diff']&&(console[_0x16f2f0(0xa0)](_0x16f2f0(0x11b)+_0x3b0f74[_0x16f2f0(0x73)]+'\x27:'),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)),console[_0x16f2f0(0xa0)](_0x3b0f74[_0x16f2f0(0xb2)]),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)));}for(const _0x353676 of _0x498498){_0x353676[_0x16f2f0(0xb2)]&&(console['log']('\x0aChanges\x20to\x20integration\x20\x27'+_0x353676[_0x16f2f0(0x73)]+'\x27:'),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)),console[_0x16f2f0(0xa0)](_0x353676['diff']),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)));}for(const _0x532a7f of _0x12fbe5){_0x532a7f[_0x16f2f0(0xb2)]&&(console[_0x16f2f0(0xa0)](_0x16f2f0(0x105)+_0x532a7f[_0x16f2f0(0x73)]+'\x27:'),console[_0x16f2f0(0xa0)]('─'[_0x16f2f0(0xa5)](0x3c)),console[_0x16f2f0(0xa0)](_0x532a7f['diff']),console['log']('─'[_0x16f2f0(0xa5)](0x3c)));}for(const _0x58404e of _0x113a51){_0x58404e[_0x16f2f0(0xb2)]&&(console[_0x16f2f0(0xa0)](_0x16f2f0(0x94)+_0x58404e[_0x16f2f0(0x73)]+'\x27:'),console[_0x16f2f0(0xa0)]('─'['repeat'](0x3c)),console[_0x16f2f0(0xa0)](_0x58404e[_0x16f2f0(0xb2)]),console[_0x16f2f0(0xa0)]('─'['repeat'](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x12e97b(0x73)]=a4_0x12e97b(0x10c);[a4_0x12e97b(0xdd)]=a4_0x12e97b(0xaf);async['execute'](_0x232af7){const _0x1b0df1=a4_0x12e97b,{options:_0xe72865,args:_0xfbf111,tdx:_0x145a29}=_0x232af7,_0x1405fb=_0xfbf111[0x0],_0x262c81=_0xfbf111[0x1],_0x59f102=_0xe72865[_0x1b0df1(0xe2)],_0x2437d6=_0xe72865[_0x1b0df1(0xcd)],_0x403d1f=_0xe72865['force'],_0x38c06c=_0xe72865[_0x1b0df1(0xa3)],_0x2496b6=_0xe72865[_0x1b0df1(0xec)],_0x4f3ef7=_0xe72865['agent'];let _0x4e0c44;if(_0x1405fb){const _0x2406f1=a4_0x19ba0a[_0x1b0df1(0x85)](_0x1405fb,_0x1b0df1(0x79));if(existsSync(_0x2406f1))try{const _0x4d37e7=JSON[_0x1b0df1(0xa4)](readFileSync(_0x2406f1,_0x1b0df1(0x103)));_0x4d37e7[_0x1b0df1(0x7e)]&&(_0x4e0c44={'llm_project':_0x4d37e7[_0x1b0df1(0x7e)]});}catch{}}const _0x3a40b0=findAgentConfigPath(process[_0x1b0df1(0xe6)]());let _0x1dbd07;if(_0x3a40b0)try{const _0x548bf6=JSON['parse'](readFileSync(_0x3a40b0,_0x1b0df1(0x103)));_0x548bf6['llm_project']&&(_0x1dbd07={'llm_project':_0x548bf6[_0x1b0df1(0x7e)]});}catch{}const _0x42bab9=resolveAgentPullArgs({'arg':_0x1405fb,'agentNameArg':_0x262c81,'agentFlag':_0x4f3ef7,'contextProject':_0x2496b6,'argDirConfig':_0x4e0c44,'cwdConfigPath':_0x3a40b0||undefined,'cwdConfig':_0x1dbd07}),{projectNameOrId:_0x5a93ec,targetAgentName:_0x110497,existingOutputDir:_0x37c1fd,source:_0xfd97d1}=_0x42bab9;if(_0xfd97d1===_0x1b0df1(0xfa))console[_0x1b0df1(0xa0)](a4_0xe386e3[_0x1b0df1(0x10d)](_0x1b0df1(0xd0)+a4_0x19ba0a['join'](_0x1405fb,_0x1b0df1(0x79))+':\x20'+_0x5a93ec));else{if(_0xfd97d1==='cwd-config')console[_0x1b0df1(0xa0)](a4_0xe386e3['dim'](_0x1b0df1(0xe4)+_0x5a93ec));else _0xfd97d1==='context'&&console[_0x1b0df1(0xa0)](a4_0xe386e3[_0x1b0df1(0x10d)]('Using\x20project\x20from\x20context:\x20'+_0x5a93ec));}if(!_0x5a93ec)return _0x4f3ef7?(console[_0x1b0df1(0xa0)](a4_0xe386e3[_0x1b0df1(0x114)](_0x1b0df1(0x6f))),console[_0x1b0df1(0xa0)](_0x1b0df1(0x7c)),console['log'](_0x1b0df1(0xdc))):(console[_0x1b0df1(0xa0)](a4_0xe386e3['yellow'](_0x1b0df1(0xbe))),console[_0x1b0df1(0xa0)]('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[_0x1b0df1(0xa0)](_0x1b0df1(0x83)),console[_0x1b0df1(0xa0)]('\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[_0x1b0df1(0xa0)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project'),console['log'](_0x1b0df1(0xd4))),0x1;if(_0x110497){const {data:_0x4aee94}=await withSpinner(_0x1b0df1(0xb7)+_0x110497+'\x22\x20from\x20project\x20\x22'+_0x5a93ec+_0x1b0df1(0xfd),()=>_0x145a29[_0x1b0df1(0x11f)][_0x1b0df1(0x8c)](_0x5a93ec,_0x110497,_0x59f102,{'dryRun':_0x2437d6,'force':_0x403d1f}));if(_0x2437d6)return console['log'](a4_0xe386e3['yellow'](_0x1b0df1(0xc7))),console[_0x1b0df1(0xa0)]('Would\x20pull\x20agent:\x20'+_0x4aee94[_0x1b0df1(0x7d)]),console[_0x1b0df1(0xa0)](_0x1b0df1(0x121)+_0x4aee94[_0x1b0df1(0xe5)]),_0x4aee94[_0x1b0df1(0xb2)]&&(console['log']('\x0aChanges:'),console['log']('─'['repeat'](0x3c)),console[_0x1b0df1(0xa0)](_0x4aee94[_0x1b0df1(0xb2)]),console['log']('─'['repeat'](0x3c))),0x0;return console[_0x1b0df1(0xa0)](a4_0xe386e3[_0x1b0df1(0x84)](_0x1b0df1(0x120))),console[_0x1b0df1(0xa0)](_0x1b0df1(0x89)+_0x4aee94[_0x1b0df1(0x7d)]),console[_0x1b0df1(0xa0)](_0x1b0df1(0x117)+_0x4aee94[_0x1b0df1(0xe5)]),console[_0x1b0df1(0xa0)](_0x1b0df1(0x8f)+(_0x4aee94['isNew']?a4_0xe386e3[_0x1b0df1(0x84)](_0x1b0df1(0xe7)):_0x4aee94['hasChanges']?a4_0xe386e3[_0x1b0df1(0x114)](_0x1b0df1(0x112)):a4_0xe386e3[_0x1b0df1(0x115)]('unchanged'))),0x0;}const _0x2e8d20=_0x37c1fd||_0x59f102,{data:_0x3efc3d}=await withSpinner(_0x1b0df1(0xcc)+_0x5a93ec+_0x1b0df1(0xfd),()=>_0x145a29[_0x1b0df1(0x11f)]['pullProject'](_0x5a93ec,_0x2e8d20,{'dryRun':!![]})),_0x5455d8=_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x9a)]['new']+_0x3efc3d[_0x1b0df1(0xac)]['knowledgeBases']['new']+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x119)][_0x1b0df1(0xe7)]+_0x3efc3d[_0x1b0df1(0xac)]['prompts'][_0x1b0df1(0xe7)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x80)][_0x1b0df1(0xe7)]+_0x3efc3d[_0x1b0df1(0xac)]['experimentalKnowledgeBases'][_0x1b0df1(0xe7)]+_0x3efc3d[_0x1b0df1(0xac)]['experimentalArtifacts'][_0x1b0df1(0xe7)],_0x40ee8a=_0x3efc3d['counts'][_0x1b0df1(0x9a)][_0x1b0df1(0x112)]+_0x3efc3d['counts'][_0x1b0df1(0x11d)]['updated']+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x119)][_0x1b0df1(0x112)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x102)][_0x1b0df1(0x112)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x80)][_0x1b0df1(0x112)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x97)][_0x1b0df1(0x112)]+_0x3efc3d[_0x1b0df1(0xac)]['experimentalArtifacts'][_0x1b0df1(0x112)],_0x36b230=_0x3efc3d['counts'][_0x1b0df1(0x9a)][_0x1b0df1(0xf8)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x11d)][_0x1b0df1(0xf8)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x119)][_0x1b0df1(0xf8)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x102)]['unchanged']+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x80)][_0x1b0df1(0xf8)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x97)][_0x1b0df1(0xf8)]+_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x91)][_0x1b0df1(0xf8)];console[_0x1b0df1(0xa0)](_0x1b0df1(0x8e)+_0x3efc3d[_0x1b0df1(0xef)]+'\x27:'),console[_0x1b0df1(0xa0)]('\x20\x20'+a4_0xe386e3[_0x1b0df1(0x84)]('+\x20'+_0x5455d8+_0x1b0df1(0x7a))+_0x1b0df1(0x8a)+a4_0xe386e3['yellow']('~\x20'+_0x40ee8a+_0x1b0df1(0x9c))+_0x1b0df1(0x8a)+a4_0xe386e3[_0x1b0df1(0x10d)]('=\x20'+_0x36b230+_0x1b0df1(0x8b))),console[_0x1b0df1(0xa0)](_0x1b0df1(0x86)+formatCountSummary(_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x9a)])),console[_0x1b0df1(0xa0)](_0x1b0df1(0xe0)+formatCountSummary(_0x3efc3d[_0x1b0df1(0xac)]['knowledgeBases'])),console[_0x1b0df1(0xa0)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x119)])),console[_0x1b0df1(0xa0)](_0x1b0df1(0xc9)+formatCountSummary(_0x3efc3d['counts']['prompts'])),console[_0x1b0df1(0xa0)](_0x1b0df1(0x104)+formatCountSummary(_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x80)]));const _0x22ae0f=_0x3efc3d['counts'][_0x1b0df1(0x97)]['total']>0x0||_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x91)][_0x1b0df1(0x6d)]>0x0;_0x22ae0f&&(console[_0x1b0df1(0xa0)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x97)])),console[_0x1b0df1(0xa0)](_0x1b0df1(0x74)+formatCountSummary(_0x3efc3d[_0x1b0df1(0xac)][_0x1b0df1(0x91)])));console[_0x1b0df1(0xa0)](_0x1b0df1(0xc2)+a4_0xe386e3[_0x1b0df1(0xc3)](_0x3efc3d['outputDir'])),displayDiffs(_0x3efc3d['agents'],_0x3efc3d[_0x1b0df1(0x11d)],_0x3efc3d['textKnowledgeBases'],_0x3efc3d['prompts'],_0x3efc3d[_0x1b0df1(0x80)],_0x3efc3d[_0x1b0df1(0x97)],_0x3efc3d[_0x1b0df1(0x91)]);if(_0x2437d6)return console[_0x1b0df1(0xa0)](a4_0xe386e3['yellow'](_0x1b0df1(0xf1))),0x0;if(_0x5455d8===0x0&&_0x40ee8a===0x0)return console['log'](a4_0xe386e3[_0x1b0df1(0x84)](_0x1b0df1(0xd9))),saveSessionContext({'llm_project':_0x3efc3d[_0x1b0df1(0xef)]},_0xe72865[_0x1b0df1(0x87)]),console[_0x1b0df1(0xa0)](a4_0xe386e3[_0x1b0df1(0x84)](_0x1b0df1(0xb5)+a4_0xe386e3[_0x1b0df1(0x10d)](_0x1b0df1(0x7e))+'\x20=\x20'+a4_0xe386e3[_0x1b0df1(0xc3)](_0x3efc3d['projectName']))),0x0;if(!_0x38c06c&&!_0x403d1f){if(!isInteractive())return console[_0x1b0df1(0xd1)](a4_0xe386e3[_0x1b0df1(0xd5)]('\x0aError:'),_0x1b0df1(0x76)),console[_0x1b0df1(0xd1)](a4_0xe386e3[_0x1b0df1(0x10d)](_0x1b0df1(0xb4))),0x1;const _0x4a799c=await confirmKey(_0x1b0df1(0xb8)+(_0x5455d8+_0x40ee8a)+_0x1b0df1(0x101));if(!_0x4a799c)return console[_0x1b0df1(0xa0)](a4_0xe386e3[_0x1b0df1(0x114)]('Cancelled'),_0x1b0df1(0x100)),0x1;}const {data:_0x26a506}=await withSpinner(_0x1b0df1(0xa9),()=>_0x145a29[_0x1b0df1(0x11f)][_0x1b0df1(0xdf)](_0x5a93ec,_0x2e8d20,{'force':_0x403d1f}));return console[_0x1b0df1(0xa0)](a4_0xe386e3[_0x1b0df1(0x84)](_0x1b0df1(0xf4)+(_0x5455d8+_0x40ee8a)+_0x1b0df1(0xc0)+_0x26a506['outputDir'])),saveSessionContext({'llm_project':_0x26a506[_0x1b0df1(0xef)]},_0xe72865[_0x1b0df1(0x87)]),console['log'](a4_0xe386e3[_0x1b0df1(0x84)]('✔\x20Context\x20set:\x20'+a4_0xe386e3['dim'](_0x1b0df1(0x7e))+'\x20=\x20'+a4_0xe386e3[_0x1b0df1(0xc3)](_0x26a506[_0x1b0df1(0xef)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x12e97b(0x73)]=a4_0x12e97b(0xee);['description']=a4_0x12e97b(0xb1);async[a4_0x12e97b(0xcf)](_0x4a5765){const _0x36b489=a4_0x12e97b,{options:_0x235ebf,args:_0xb0cb51,tdx:_0x50f076}=_0x4a5765,_0x4a4231=_0xb0cb51[0x0],_0x45e30a=_0x235ebf[_0x36b489(0x73)],_0x58445b=_0x235ebf['dryRun'],_0x2d9900=_0x235ebf[_0x36b489(0xa3)],_0x42441b=_0x235ebf[_0x36b489(0xda)],_0x462cc7=_0x235ebf[_0x36b489(0xec)];let _0x4d0c2d;const _0x3161ae=findAgentConfigPath(process[_0x36b489(0xe6)]());if(_0x4a4231){const _0x29774e=a4_0x19ba0a[_0x36b489(0x85)](_0x4a4231,_0x36b489(0x79));existsSync(_0x29774e)?(_0x4d0c2d=_0x4a4231,console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0x10d)](_0x36b489(0xb3)+_0x4a4231))):_0x4d0c2d=_0x4a4231;}else{if(_0x3161ae)_0x4d0c2d=a4_0x19ba0a[_0x36b489(0x108)](_0x3161ae),console[_0x36b489(0xa0)](a4_0xe386e3['dim'](_0x36b489(0xfc)+_0x4d0c2d));else{if(_0x462cc7){const _0xa050dd=sanitizeForFilesystem(_0x462cc7);let _0x3ab61c=_0xa050dd,_0x22a9fe=a4_0x19ba0a['join'](process[_0x36b489(0xe6)](),'agents',_0xa050dd,_0x36b489(0x79));if(!existsSync(_0x22a9fe)){const _0x2e224c=normalizeName(_0x462cc7),_0x3aebe7=a4_0x19ba0a[_0x36b489(0x85)](process[_0x36b489(0xe6)](),'agents',_0x2e224c,_0x36b489(0x79));existsSync(_0x3aebe7)&&(_0x3ab61c=_0x2e224c,_0x22a9fe=_0x3aebe7);}if(existsSync(_0x22a9fe))_0x4d0c2d=a4_0x19ba0a[_0x36b489(0x108)](_0x22a9fe),console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0x10d)](_0x36b489(0xb3)+_0x4d0c2d));else{const _0x18340b=_0x235ebf[_0x36b489(0xc4)];if(_0x18340b)throw new SDKError(ErrorCode[_0x36b489(0x106)],_0x36b489(0xc6)+_0x462cc7+_0x36b489(0xd8),undefined,{'helpText':_0x36b489(0xad)+_0x36b489(0x11a)+('\x20\x20tdx\x20agent\x20pull\x20'+_0x462cc7+'\x0a')+('\x20\x20tdx\x20agent\x20clone\x20agents/'+_0x3ab61c+_0x36b489(0xa1)+(_0x45e30a||_0x36b489(0x9f))+'\x20--profile\x20'+_0x18340b)});_0x4d0c2d=_0x462cc7,console[_0x36b489(0xa0)](a4_0xe386e3['dim'](_0x36b489(0x111)+_0x462cc7));}}}}if(!_0x4d0c2d)return console['log'](a4_0xe386e3[_0x36b489(0x114)](_0x36b489(0xa8))),console[_0x36b489(0xa0)]('\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project'),console[_0x36b489(0xa0)]('\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory'),console[_0x36b489(0xa0)]('\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)'),console[_0x36b489(0xa0)](_0x36b489(0xc8)),0x1;if(!_0x45e30a)throw new SDKError(ErrorCode[_0x36b489(0xd2)],_0x36b489(0x88),undefined,{'helpText':_0x36b489(0xb9)});if(!_0x2d9900&&!_0x58445b){if(!isInteractive())return console['error'](a4_0xe386e3['red'](_0x36b489(0xae)),_0x36b489(0x76)),console[_0x36b489(0xd1)](a4_0xe386e3[_0x36b489(0x10d)](_0x36b489(0xb4))),0x1;const _0x4e736a=await confirmKey('Clone\x20\x22'+_0x4d0c2d+_0x36b489(0xba)+_0x45e30a+'\x22?');if(!_0x4e736a)return console['log'](a4_0xe386e3[_0x36b489(0x114)](_0x36b489(0x82))),0x1;}const {data:_0x17fce6}=await withSpinner(_0x36b489(0x90)+_0x4d0c2d+_0x36b489(0x7b)+_0x45e30a+_0x36b489(0xfd),()=>_0x50f076[_0x36b489(0x11f)][_0x36b489(0xb0)](_0x4d0c2d,_0x45e30a,{'dryRun':_0x58445b}));if(_0x58445b){console['log'](a4_0xe386e3[_0x36b489(0x114)]('Dry\x20run\x20-\x20no\x20changes\x20made')),console[_0x36b489(0xa0)](_0x36b489(0xeb)+_0x17fce6[_0x36b489(0x107)]),console[_0x36b489(0xa0)](_0x36b489(0xaa)+_0x45e30a),console[_0x36b489(0xa0)]('Would\x20clone:'),console[_0x36b489(0xa0)](_0x36b489(0x86)+_0x17fce6['counts'][_0x36b489(0x9a)][_0x36b489(0x10a)]),console[_0x36b489(0xa0)](_0x36b489(0xe0)+_0x17fce6[_0x36b489(0xac)]['knowledgeBases'][_0x36b489(0x10a)]),console[_0x36b489(0xa0)](_0x36b489(0xc9)+_0x17fce6[_0x36b489(0xac)]['prompts'][_0x36b489(0x10a)]);const _0x95c4a=_0x17fce6[_0x36b489(0xac)][_0x36b489(0x97)][_0x36b489(0x10a)]>0x0||_0x17fce6['counts'][_0x36b489(0x91)]['created']>0x0;return _0x95c4a&&(console[_0x36b489(0xa0)](_0x36b489(0xf6)+_0x17fce6['counts']['experimentalKnowledgeBases'][_0x36b489(0x10a)]),console['log'](_0x36b489(0x74)+_0x17fce6['counts'][_0x36b489(0x91)][_0x36b489(0x10a)])),0x0;}const _0x2a6f13=_0x17fce6[_0x36b489(0xac)]['agents'][_0x36b489(0xf2)]>0x0||_0x17fce6[_0x36b489(0xac)]['knowledgeBases']['errors']>0x0||_0x17fce6[_0x36b489(0xac)][_0x36b489(0x102)][_0x36b489(0xf2)]>0x0||_0x17fce6[_0x36b489(0xac)][_0x36b489(0x97)][_0x36b489(0xf2)]>0x0||_0x17fce6[_0x36b489(0xac)][_0x36b489(0x91)][_0x36b489(0xf2)]>0x0;_0x2a6f13?console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0x114)](_0x36b489(0xea))):console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0x84)](_0x36b489(0xdb)));console[_0x36b489(0xa0)](_0x36b489(0xeb)+_0x17fce6[_0x36b489(0x107)]),console[_0x36b489(0xa0)](_0x36b489(0xaa)+_0x17fce6['newProjectName']),console[_0x36b489(0xa0)](_0x36b489(0x116)+_0x17fce6['newProjectId']),console[_0x36b489(0xa0)](),console[_0x36b489(0xa0)]('Summary:'),console[_0x36b489(0xa0)](_0x36b489(0x86)+formatCountSummary(_0x17fce6[_0x36b489(0xac)][_0x36b489(0x9a)])),console[_0x36b489(0xa0)](_0x36b489(0xe0)+formatCountSummary(_0x17fce6[_0x36b489(0xac)][_0x36b489(0x11d)])),console['log'](_0x36b489(0xc9)+formatCountSummary(_0x17fce6[_0x36b489(0xac)][_0x36b489(0x102)])),console[_0x36b489(0xa0)]('\x20\x20Integrations:\x20'+formatCountSummary(_0x17fce6['counts'][_0x36b489(0x80)]));const _0x1526b8=_0x17fce6[_0x36b489(0xac)][_0x36b489(0x97)][_0x36b489(0x10a)]>0x0||_0x17fce6['counts'][_0x36b489(0x97)]['updated']>0x0||_0x17fce6[_0x36b489(0xac)][_0x36b489(0x97)][_0x36b489(0xf8)]>0x0||_0x17fce6['counts'][_0x36b489(0x91)]['created']>0x0||_0x17fce6[_0x36b489(0xac)][_0x36b489(0x91)][_0x36b489(0x112)]>0x0||_0x17fce6[_0x36b489(0xac)][_0x36b489(0x91)][_0x36b489(0xf8)]>0x0;_0x1526b8&&(console['log']('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x17fce6[_0x36b489(0xac)][_0x36b489(0x97)])),console[_0x36b489(0xa0)](_0x36b489(0x74)+formatCountSummary(_0x17fce6['counts']['experimentalArtifacts'])));if(_0x2a6f13){console['log'](),console[_0x36b489(0xa0)](a4_0xe386e3['red'](_0x36b489(0xcb)));for(const _0x408640 of _0x17fce6[_0x36b489(0x9a)]){_0x408640[_0x36b489(0x118)]===_0x36b489(0xd1)&&console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0xd5)](_0x36b489(0x10e)+_0x408640[_0x36b489(0x7d)]+'\x22:\x20'+_0x408640['error']));}for(const _0xef19fa of _0x17fce6['knowledgeBases']){_0xef19fa[_0x36b489(0x118)]===_0x36b489(0xd1)&&console[_0x36b489(0xa0)](a4_0xe386e3['red'](_0x36b489(0xbf)+_0xef19fa['name']+'\x22:\x20'+_0xef19fa[_0x36b489(0xd1)]));}for(const _0x41aa5a of _0x17fce6['prompts']){_0x41aa5a['action']===_0x36b489(0xd1)&&console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0xd5)](_0x36b489(0x72)+_0x41aa5a[_0x36b489(0x73)]+_0x36b489(0xd3)+_0x41aa5a[_0x36b489(0xd1)]));}for(const _0x296406 of _0x17fce6[_0x36b489(0x80)]){_0x296406[_0x36b489(0x118)]==='error'&&console['log'](a4_0xe386e3[_0x36b489(0xd5)](_0x36b489(0x10f)+_0x296406[_0x36b489(0x73)]+_0x36b489(0xd3)+_0x296406['error']));}for(const _0x25eafe of _0x17fce6[_0x36b489(0x97)]){_0x25eafe['action']===_0x36b489(0xd1)&&console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0xd5)](_0x36b489(0x99)+_0x25eafe[_0x36b489(0x73)]+_0x36b489(0xd3)+_0x25eafe[_0x36b489(0xd1)]));}for(const _0x33e840 of _0x17fce6[_0x36b489(0x91)]){_0x33e840[_0x36b489(0x118)]==='error'&&console[_0x36b489(0xa0)](a4_0xe386e3[_0x36b489(0xd5)](_0x36b489(0x70)+_0x33e840[_0x36b489(0x73)]+'\x22:\x20'+_0x33e840[_0x36b489(0xd1)]));}return 0x1;}console[_0x36b489(0xa0)]();const _0x474c46=getLLMProjectUrl(_0x42441b,_0x17fce6[_0x36b489(0xc1)]);return console[_0x36b489(0xa0)](_0x36b489(0xed)+a4_0xe386e3[_0x36b489(0xc3)](_0x474c46)),0x0;}}export class AgentPushCommand extends BaseCommand{['name']=a4_0x12e97b(0x81);['description']=a4_0x12e97b(0x9d);async['execute'](_0x3487dd){const _0x12d336=a4_0x12e97b,{options:_0x52286f,args:_0x4f6a34,tdx:_0x4e09d4}=_0x3487dd;let _0x2f9e58=_0x4f6a34[0x0]||process[_0x12d336(0xe6)]();const _0x51bde3=_0x52286f[_0x12d336(0xcd)],_0x246466=_0x52286f['force'],_0x5c8465=_0x52286f[_0x12d336(0xa3)],_0x43ac4b=_0x52286f[_0x12d336(0xda)],_0x547cd8=a4_0x19ba0a[_0x12d336(0x85)](_0x2f9e58,_0x12d336(0x11e)),_0x3538ad=existsSync(_0x547cd8);if(_0x3538ad){const {data:_0x3208b4}=await withSpinner(_0x12d336(0xe1)+_0x2f9e58+_0x12d336(0xfd),()=>_0x4e09d4[_0x12d336(0x11f)][_0x12d336(0x10b)](_0x2f9e58,{'dryRun':_0x51bde3,'force':_0x246466}));if(_0x51bde3)return console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0x114)](_0x12d336(0x78))),console['log']('Would\x20push\x20agent:\x20'+_0x3208b4[_0x12d336(0x7d)]),0x0;if(_0x3208b4['action']===_0x12d336(0xd1))return console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0xd5)](_0x12d336(0xfb)+_0x3208b4[_0x12d336(0xd1)])),0x1;console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0x84)](_0x12d336(0xf9)+_0x3208b4['action']+_0x12d336(0xd6))),console['log'](_0x12d336(0x89)+_0x3208b4[_0x12d336(0x7d)]);if(_0x3208b4[_0x12d336(0x98)]&&_0x3208b4[_0x12d336(0xd7)]){const _0x2d11ee=getLLMAgentChatUrl(_0x43ac4b,_0x3208b4[_0x12d336(0xd7)],_0x3208b4[_0x12d336(0x98)]);console[_0x12d336(0xa0)](_0x12d336(0xe3)+a4_0xe386e3['cyan'](_0x2d11ee));}return 0x0;}const _0x3ff6f3=_0x52286f['llmProject'],_0x13b97d=resolveProjectFromContext(_0x2f9e58,_0x3ff6f3);if(_0x13b97d[_0x12d336(0x7f)])_0x2f9e58=_0x13b97d[_0x12d336(0xe9)],_0x13b97d['source']===_0x12d336(0xff)&&console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0x10d)](_0x12d336(0xe4)+_0x2f9e58));else{let _0x35c013=_0x12d336(0xf0);_0x13b97d[_0x12d336(0xa2)]===_0x12d336(0x9b)&&(_0x35c013=_0x13b97d[_0x12d336(0x77)]+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x13b97d[_0x12d336(0xec)]+_0x12d336(0xfe));throw new SDKError(ErrorCode[_0x12d336(0x106)],_0x13b97d[_0x12d336(0xa2)]===_0x12d336(0xe8)?_0x13b97d['message']:_0x12d336(0x8d)+_0x2f9e58,undefined,{'helpText':_0x35c013});}const {data:_0x361b04}=await withSpinner(_0x12d336(0xbc),()=>_0x4e09d4['llm'][_0x12d336(0xbb)](_0x2f9e58,{'dryRun':!![]})),_0x16bdd0=_0x361b04[_0x12d336(0xac)][_0x12d336(0x9a)][_0x12d336(0xf2)]>0x0;if(_0x16bdd0){console['log'](a4_0xe386e3[_0x12d336(0xd5)](_0x12d336(0xbd)));for(const _0x193901 of _0x361b04[_0x12d336(0x9a)]){_0x193901[_0x12d336(0x118)]===_0x12d336(0xd1)&&console[_0x12d336(0xa0)](a4_0xe386e3['red'](_0x12d336(0x10e)+_0x193901['agentName']+'\x22:\x20'+_0x193901['error']));}return 0x1;}const _0x4fcaec=_0x361b04[_0x12d336(0xac)][_0x12d336(0x9a)][_0x12d336(0x10a)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x11d)][_0x12d336(0x10a)]+_0x361b04['counts'][_0x12d336(0x119)][_0x12d336(0x10a)]+_0x361b04['counts'][_0x12d336(0x102)][_0x12d336(0x10a)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x80)][_0x12d336(0x10a)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x97)]['created']+_0x361b04[_0x12d336(0xac)][_0x12d336(0x91)][_0x12d336(0x10a)],_0x273874=_0x361b04[_0x12d336(0xac)][_0x12d336(0x9a)][_0x12d336(0x112)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x11d)][_0x12d336(0x112)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x119)][_0x12d336(0x112)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x102)][_0x12d336(0x112)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x80)][_0x12d336(0x112)]+_0x361b04['counts'][_0x12d336(0x97)]['updated']+_0x361b04[_0x12d336(0xac)]['experimentalArtifacts'][_0x12d336(0x112)],_0x356a36=_0x361b04[_0x12d336(0xac)]['agents']['unchanged']+_0x361b04['counts'][_0x12d336(0x11d)]['unchanged']+_0x361b04[_0x12d336(0xac)][_0x12d336(0x119)][_0x12d336(0xf8)]+_0x361b04['counts'][_0x12d336(0x102)][_0x12d336(0xf8)]+_0x361b04[_0x12d336(0xac)][_0x12d336(0x80)][_0x12d336(0xf8)]+_0x361b04['counts']['experimentalKnowledgeBases']['unchanged']+_0x361b04[_0x12d336(0xac)]['experimentalArtifacts'][_0x12d336(0xf8)];console['log']('\x0aPush\x20summary\x20for\x20\x27'+_0x361b04['projectName']+'\x27:'),console[_0x12d336(0xa0)]('\x20\x20'+a4_0xe386e3[_0x12d336(0x84)]('+\x20'+_0x4fcaec+'\x20new')+_0x12d336(0x8a)+a4_0xe386e3['yellow']('~\x20'+_0x273874+_0x12d336(0x9c))+_0x12d336(0x8a)+a4_0xe386e3[_0x12d336(0x10d)]('=\x20'+_0x356a36+'\x20unchanged')),console[_0x12d336(0xa0)](_0x12d336(0x86)+formatCountSummary(_0x361b04[_0x12d336(0xac)]['agents'])),console[_0x12d336(0xa0)](_0x12d336(0xe0)+formatCountSummary(_0x361b04[_0x12d336(0xac)][_0x12d336(0x11d)])),console['log'](_0x12d336(0x109)+formatCountSummary(_0x361b04[_0x12d336(0xac)][_0x12d336(0x119)])),console['log'](_0x12d336(0xc9)+formatCountSummary(_0x361b04[_0x12d336(0xac)]['prompts'])),console[_0x12d336(0xa0)](_0x12d336(0x104)+formatCountSummary(_0x361b04[_0x12d336(0xac)][_0x12d336(0x80)]));const _0x5071b0=_0x361b04[_0x12d336(0xac)][_0x12d336(0x97)]['created']>0x0||_0x361b04[_0x12d336(0xac)][_0x12d336(0x97)]['updated']>0x0||_0x361b04[_0x12d336(0xac)][_0x12d336(0x97)]['unchanged']>0x0||_0x361b04['counts'][_0x12d336(0x91)][_0x12d336(0x10a)]>0x0||_0x361b04['counts']['experimentalArtifacts'][_0x12d336(0x112)]>0x0||_0x361b04[_0x12d336(0xac)][_0x12d336(0x91)][_0x12d336(0xf8)]>0x0;_0x5071b0&&(console[_0x12d336(0xa0)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x361b04[_0x12d336(0xac)][_0x12d336(0x97)])),console[_0x12d336(0xa0)](_0x12d336(0x74)+formatCountSummary(_0x361b04[_0x12d336(0xac)][_0x12d336(0x91)])));console[_0x12d336(0xa0)](_0x12d336(0x110)+a4_0xe386e3[_0x12d336(0xc3)](_0x2f9e58)),displayDiffs(_0x361b04['agents'],_0x361b04[_0x12d336(0x11d)],_0x361b04[_0x12d336(0x119)],_0x361b04[_0x12d336(0x102)],_0x361b04[_0x12d336(0x80)],_0x361b04['experimentalKnowledgeBases'],_0x361b04[_0x12d336(0x91)]);if(_0x51bde3)return console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0x114)](_0x12d336(0xf7))),0x0;if(_0x4fcaec===0x0&&_0x273874===0x0){console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0x84)](_0x12d336(0xc5)));const _0x2a4a62=getLLMProjectUrl(_0x43ac4b,_0x361b04[_0x12d336(0xd7)]);return console[_0x12d336(0xa0)]('Project:\x20'+a4_0xe386e3[_0x12d336(0xc3)](_0x2a4a62)),0x0;}if(!_0x5c8465&&!_0x246466){if(!isInteractive())return console[_0x12d336(0xd1)](a4_0xe386e3[_0x12d336(0xd5)]('\x0aError:'),_0x12d336(0x76)),console[_0x12d336(0xd1)](a4_0xe386e3[_0x12d336(0x10d)](_0x12d336(0xb4))),0x1;const _0x41dbfb=await confirmKey('\x0aPush\x20'+(_0x4fcaec+_0x273874)+_0x12d336(0x92));if(!_0x41dbfb)return console[_0x12d336(0xa0)](a4_0xe386e3['yellow'](_0x12d336(0x82)),_0x12d336(0x75)),0x1;}const {data:_0x450361}=await withSpinner(_0x12d336(0xab),()=>_0x4e09d4[_0x12d336(0x11f)]['pushProject'](_0x2f9e58,{'force':_0x246466})),_0x19590b=_0x450361['counts'][_0x12d336(0x9a)][_0x12d336(0xf2)]>0x0||_0x450361['counts'][_0x12d336(0x11d)][_0x12d336(0xf2)]>0x0||_0x450361['counts']['textKnowledgeBases']['errors']>0x0||_0x450361[_0x12d336(0xac)][_0x12d336(0x102)][_0x12d336(0xf2)]>0x0;if(_0x19590b){console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0x114)]('\x0aProject\x20pushed\x20with\x20errors')),console['log'](),console['log'](a4_0xe386e3[_0x12d336(0xd5)](_0x12d336(0xcb)));for(const _0x22f056 of _0x450361[_0x12d336(0x9a)]){_0x22f056[_0x12d336(0x118)]==='error'&&console[_0x12d336(0xa0)](a4_0xe386e3['red'](_0x12d336(0x10e)+_0x22f056[_0x12d336(0x7d)]+'\x22:\x20'+_0x22f056[_0x12d336(0xd1)]));}for(const _0x2b9857 of _0x450361[_0x12d336(0x11d)]){_0x2b9857[_0x12d336(0x118)]==='error'&&console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0xd5)](_0x12d336(0xbf)+_0x2b9857['name']+_0x12d336(0xd3)+_0x2b9857[_0x12d336(0xd1)]));}for(const _0x2ba5be of _0x450361[_0x12d336(0x119)]){_0x2ba5be[_0x12d336(0x118)]===_0x12d336(0xd1)&&console['log'](a4_0xe386e3[_0x12d336(0xd5)](_0x12d336(0x95)+_0x2ba5be[_0x12d336(0x73)]+'\x22:\x20'+_0x2ba5be[_0x12d336(0xd1)]));}for(const _0x412288 of _0x450361[_0x12d336(0x102)]){_0x412288[_0x12d336(0x118)]===_0x12d336(0xd1)&&console['log'](a4_0xe386e3[_0x12d336(0xd5)]('\x20\x20Prompt\x20\x22'+_0x412288[_0x12d336(0x73)]+_0x12d336(0xd3)+_0x412288[_0x12d336(0xd1)]));}for(const _0x35335c of _0x450361['integrations']){_0x35335c['action']===_0x12d336(0xd1)&&console[_0x12d336(0xa0)](a4_0xe386e3[_0x12d336(0xd5)](_0x12d336(0x10f)+_0x35335c['name']+'\x22:\x20'+_0x35335c[_0x12d336(0xd1)]));}return 0x1;}console[_0x12d336(0xa0)](a4_0xe386e3['green'](_0x12d336(0x96)+(_0x4fcaec+_0x273874)+_0x12d336(0xa7)+_0x450361['projectName']+'\x27'));const _0x330339=getLLMProjectUrl(_0x43ac4b,_0x450361[_0x12d336(0xd7)]);return console['log'](_0x12d336(0xed)+a4_0xe386e3[_0x12d336(0xc3)](_0x330339)),0x0;}}
|
|
1
|
+
const a4_0x2c3b5c=a4_0x3363;(function(_0x9781f,_0x250ae1){const _0x358100=a4_0x3363,_0x2b9cfa=_0x9781f();while(!![]){try{const _0x120ff5=parseInt(_0x358100(0x150))/0x1+-parseInt(_0x358100(0x175))/0x2+parseInt(_0x358100(0x145))/0x3*(parseInt(_0x358100(0x1bc))/0x4)+-parseInt(_0x358100(0x1d2))/0x5+parseInt(_0x358100(0x136))/0x6+parseInt(_0x358100(0x1b9))/0x7*(parseInt(_0x358100(0x141))/0x8)+-parseInt(_0x358100(0x17b))/0x9*(parseInt(_0x358100(0x1d1))/0xa);if(_0x120ff5===_0x250ae1)break;else _0x2b9cfa['push'](_0x2b9cfa['shift']());}catch(_0xed7a07){_0x2b9cfa['push'](_0x2b9cfa['shift']());}}}(a4_0x5079,0x75bdb));import a4_0x4fff68 from'chalk';import a4_0x5d88db 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';function a4_0x3363(_0x4f24ff,_0x2d6148){_0x4f24ff=_0x4f24ff-0x128;const _0x50798a=a4_0x5079();let _0x3363e4=_0x50798a[_0x4f24ff];return _0x3363e4;}import{confirmKey,isInteractive}from'../utils/prompt.js';import{findAgentConfigPath,resolveProjectFromContext,resolveAgentPullArgs}from'../sdk/agent/agent-config.js';import{saveSessionContext}from'../core/session.js';import{sanitizeForFilesystem,normalizeName}from'../sdk/agent/agent-yaml.js';import{getLLMProjectUrl,getLLMAgentChatUrl}from'../sdk/client/endpoints.js';function a4_0x5079(){const _0x1a3ad9=['gray','Output:\x20','agent','New\x20project\x20name\x20is\x20required','\x20\x20Agents:\x20','sourceProjectName','Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode','\x20\x20Integrations:\x20','The\x20--agent\x20flag\x20requires\x20llm_project\x20context\x20or\x20a\x20project\x20argument.\x0a','red','\x0a✔\x20Pushed\x20','2731278XeOayH','name','Agent:\x20','Pulling\x20agent\x20\x22','-\x20nothing\x20pushed','Would\x20pull\x20agent:\x20','repeat','Using\x20context\x20project:\x20','\x20files?','Set\x20context:\x20\x20tdx\x20use\x20llm_project\x20<name>','Chat:\x20','2164912zLJPnh','\x20\x20Text\x20Knowledge\x20Base\x20\x22','\x0aWrite\x20','\x20\x20Experimental\x20Artifacts:\x20','1642083wIktRc','arg-dir','total','\x0aChanges\x20to\x20text\x20knowledge\x20base\x20\x27','utf-8','agent.yml','\x20\x20Integration\x20\x22','\x20resources?','\x22\x20to\x20a\x20different\x20profile','\x0aPush\x20','\x20total','867383OfYpQv','push','execute','Or\x20specify:\x20\x20\x20tdx\x20agent\x20pull\x20<project>\x20--agent\x20<name>','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)','session','\x20created','MISSING_ARGUMENT','dryRun','\x0a✔\x20Pulled\x20','log','\x20files\x20to\x20','cloneProject','\x20resources\x20to\x20\x27','Errors:','profile','\x20|\x20','force','Cloning\x20\x22','\x20--name\x20','\x0aError:','-\x20no\x20files\x20written','Dry\x20run\x20-\x20no\x20changes\x20made','outputDir','Agent\x20','agents','No\x20source\x20project\x20specified.\x20Use\x20one\x20of:\x0a','\x0aChanges\x20to\x20agent\x20\x27','\x0aChanges\x20to\x20prompt\x20\x27','action','no_local_folder','prompts','\x20\x20Prompts:\x20','\x0aChanges:','\x20=\x20','\x20errors','green','831060FudGay','isNew','site','no_context','llmProject','\x20\x20Knowledge\x20Base\x20\x22','5413257cXzOaF','reason','parse','Using\x20local\x20project:\x20','join','Dry\x20run\x20-\x20no\x20files\x20written','cwd-config','Analyzing\x20changes\x20to\x20push...','integrations','Pushing\x20to\x20project...','new','When\x20using\x20--profile,\x20you\x20must\x20specify\x20a\x20local\x20directory\x20as\x20source.\x0a','unchanged','experimentalKnowledgeBases','Summary:','Usage:\x20tdx\x20agent\x20clone\x20[source]\x20--name\x20<new-name>','Pull\x20agents\x20from\x20LLM\x20project\x20to\x20local\x20files','agentId','message','outputPath','description','\x20\x20Agent\x20\x22','updated','\x20\x20Experimental\x20Knowledge\x20Bases:\x20','\x0aErrors\x20found:','llm','Using\x20project\x20from\x20context:\x20','Cannot\x20clone\x20from\x20context\x20project\x20\x22','\x20\x20Knowledge\x20Bases:\x20','Status:\x20','dim','\x20\x20Experimental\x20Knowledge\x20Base\x20\x22','agent:push','\x0a[Dry\x20run]\x20No\x20changes\x20were\x20pushed','tdx.json','\x0a✔\x20All\x20files\x20are\x20up\x20to\x20date','No\x20tdx.json\x20found\x20in\x20','output','created','\x0aSet\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','Cancelled','newProjectName','cwd','Project\x20cloned\x20with\x20errors','\x20successfully','Run\x20\x27tdx\x20agent\x20pull\x20<project>\x27\x20first\x20to\x20create\x20the\x20folder\x20structure,\x20or\x20specify\x20an\x20agent\x20directory\x20with\x20agent.yml.','\x22...','\x20unchanged','\x20\x20Target:\x20','\x0aPush\x20summary\x20for\x20\x27','Output\x20path:\x20','yellow','\x22:\x20','Would\x20clone:','Project:\x20','\x20\x20tdx\x20agent\x20clone\x20--name\x20<new-name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Clone\x20from\x20context\x20(llm_project)','Source:\x20','\x20changed','errors','agent:clone','projectId','✔\x20Context\x20set:\x20','7OHqXps','\x20new','\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','4CLjVXM','\x20\x20Text\x20Knowledge\x20Bases:\x20','Writing\x20files...','\x20--profile\x20','newProjectId','\x27\x20to\x20create\x20the\x20folder\x20structure.','agentName','counts','hasChanges','textKnowledgeBases','Failed\x20to\x20push\x20agent:\x20','context','pullProject','\x0aChanges\x20to\x20knowledge\x20base\x20\x27','llm_project','INVALID_ARGUMENT','experimentalArtifacts','Using\x20project:\x20','\x20\x20Experimental\x20Artifact\x20\x22','pushProject','New\x20project:\x20','10YjFOQi','3206505CQQvrD','New\x20project\x20ID:\x20','\x0aChanges\x20to\x20experimental\x20artifact\x20\x27','diff','Would\x20push\x20agent:\x20','Project\x20cloned\x20successfully','knowledgeBases','<new-name>','\x20\x20Prompt\x20\x22','dirname','cyan','yes','error','Analyzing\x20project\x20\x22','\x20\x20tdx\x20agent\x20clone\x20<local-dir>\x20--name\x20<new-name>\x20\x20#\x20Clone\x20from\x20local\x20directory','projectName'];a4_0x5079=function(){return _0x1a3ad9;};return a4_0x5079();}function formatCountSummary(_0x433e95){const _0x1adc4f=a4_0x3363,_0x4cd03e=[];if(_0x433e95[_0x1adc4f(0x147)]!==undefined)_0x4cd03e[_0x1adc4f(0x151)](_0x433e95[_0x1adc4f(0x147)]+_0x1adc4f(0x14f));if(_0x433e95[_0x1adc4f(0x185)]!==undefined&&_0x433e95['new']>0x0)_0x4cd03e['push'](a4_0x4fff68['green'](_0x433e95['new']+_0x1adc4f(0x1ba)));if(_0x433e95[_0x1adc4f(0x1a1)]!==undefined&&_0x433e95[_0x1adc4f(0x1a1)]>0x0)_0x4cd03e[_0x1adc4f(0x151)](a4_0x4fff68['green'](_0x433e95[_0x1adc4f(0x1a1)]+_0x1adc4f(0x156)));if(_0x433e95[_0x1adc4f(0x191)]!==undefined&&_0x433e95[_0x1adc4f(0x191)]>0x0)_0x4cd03e[_0x1adc4f(0x151)](a4_0x4fff68[_0x1adc4f(0x1ae)](_0x433e95[_0x1adc4f(0x191)]+'\x20updated'));if(_0x433e95[_0x1adc4f(0x187)]!==undefined&&_0x433e95[_0x1adc4f(0x187)]>0x0)_0x4cd03e[_0x1adc4f(0x151)](a4_0x4fff68[_0x1adc4f(0x12b)](_0x433e95[_0x1adc4f(0x187)]+_0x1adc4f(0x1aa)));if(_0x433e95[_0x1adc4f(0x1b5)]!==undefined&&_0x433e95['errors']>0x0)_0x4cd03e[_0x1adc4f(0x151)](a4_0x4fff68[_0x1adc4f(0x134)](_0x433e95['errors']+_0x1adc4f(0x173)));return _0x4cd03e[_0x1adc4f(0x17f)](',\x20');}function displayDiffs(_0x93acb6,_0x273c10,_0x14513c,_0x16bc57,_0x4a90c2,_0x15636b,_0x4c5810){const _0x2d1526=a4_0x3363;for(const _0x3f3f81 of _0x93acb6){if(_0x3f3f81[_0x2d1526(0x1d5)]){const _0x1ef09d=_0x3f3f81['agentName']||_0x3f3f81[_0x2d1526(0x137)];console['log'](_0x2d1526(0x16b)+_0x1ef09d+'\x27:'),console[_0x2d1526(0x15a)]('─'['repeat'](0x3c)),console[_0x2d1526(0x15a)](_0x3f3f81[_0x2d1526(0x1d5)]),console['log']('─'[_0x2d1526(0x13c)](0x3c));}}for(const _0xd1498f of _0x273c10){_0xd1498f[_0x2d1526(0x1d5)]&&(console[_0x2d1526(0x15a)](_0x2d1526(0x1c9)+_0xd1498f[_0x2d1526(0x137)]+'\x27:'),console[_0x2d1526(0x15a)]('─'[_0x2d1526(0x13c)](0x3c)),console[_0x2d1526(0x15a)](_0xd1498f[_0x2d1526(0x1d5)]),console['log']('─'[_0x2d1526(0x13c)](0x3c)));}for(const _0x257963 of _0x14513c){_0x257963[_0x2d1526(0x1d5)]&&(console[_0x2d1526(0x15a)](_0x2d1526(0x148)+_0x257963[_0x2d1526(0x137)]+'\x27:'),console[_0x2d1526(0x15a)]('─'[_0x2d1526(0x13c)](0x3c)),console['log'](_0x257963[_0x2d1526(0x1d5)]),console['log']('─'[_0x2d1526(0x13c)](0x3c)));}for(const _0x5481c4 of _0x16bc57){_0x5481c4[_0x2d1526(0x1d5)]&&(console[_0x2d1526(0x15a)](_0x2d1526(0x16c)+_0x5481c4['name']+'\x27:'),console[_0x2d1526(0x15a)]('─'[_0x2d1526(0x13c)](0x3c)),console[_0x2d1526(0x15a)](_0x5481c4['diff']),console['log']('─'['repeat'](0x3c)));}for(const _0x19df26 of _0x4a90c2){_0x19df26['diff']&&(console[_0x2d1526(0x15a)]('\x0aChanges\x20to\x20integration\x20\x27'+_0x19df26['name']+'\x27:'),console['log']('─'['repeat'](0x3c)),console['log'](_0x19df26['diff']),console['log']('─'[_0x2d1526(0x13c)](0x3c)));}for(const _0x2f6987 of _0x15636b){_0x2f6987[_0x2d1526(0x1d5)]&&(console['log']('\x0aChanges\x20to\x20experimental\x20knowledge\x20base\x20\x27'+_0x2f6987[_0x2d1526(0x137)]+'\x27:'),console[_0x2d1526(0x15a)]('─'[_0x2d1526(0x13c)](0x3c)),console[_0x2d1526(0x15a)](_0x2f6987[_0x2d1526(0x1d5)]),console['log']('─'[_0x2d1526(0x13c)](0x3c)));}for(const _0x3800e6 of _0x4c5810){_0x3800e6[_0x2d1526(0x1d5)]&&(console['log'](_0x2d1526(0x1d4)+_0x3800e6[_0x2d1526(0x137)]+'\x27:'),console[_0x2d1526(0x15a)]('─'['repeat'](0x3c)),console[_0x2d1526(0x15a)](_0x3800e6['diff']),console[_0x2d1526(0x15a)]('─'[_0x2d1526(0x13c)](0x3c)));}}export class AgentPullCommand extends BaseCommand{[a4_0x2c3b5c(0x137)]='agent:pull';[a4_0x2c3b5c(0x18f)]=a4_0x2c3b5c(0x18b);async[a4_0x2c3b5c(0x152)](_0x8b81e5){const _0x1500a3=a4_0x2c3b5c,{options:_0x4d9808,args:_0x2ad236,tdx:_0x47b749}=_0x8b81e5,_0x194235=_0x2ad236[0x0],_0x4b7697=_0x2ad236[0x1],_0x10c551=_0x4d9808[_0x1500a3(0x1a0)],_0x47688d=_0x4d9808[_0x1500a3(0x158)],_0x2ca510=_0x4d9808[_0x1500a3(0x161)],_0x2c9e21=_0x4d9808[_0x1500a3(0x1dd)],_0x4f6132=_0x4d9808[_0x1500a3(0x179)],_0xe9f94a=_0x4d9808[_0x1500a3(0x12d)];let _0x59cc01;if(_0x194235){const _0x27ccf1=a4_0x5d88db[_0x1500a3(0x17f)](_0x194235,_0x1500a3(0x19d));if(existsSync(_0x27ccf1))try{const _0x313374=JSON[_0x1500a3(0x17d)](readFileSync(_0x27ccf1,'utf-8'));_0x313374[_0x1500a3(0x1ca)]&&(_0x59cc01={'llm_project':_0x313374[_0x1500a3(0x1ca)]});}catch{}}const _0x2dabfb=findAgentConfigPath(process[_0x1500a3(0x1a5)]());let _0xfb0ed;if(_0x2dabfb)try{const _0x227113=JSON['parse'](readFileSync(_0x2dabfb,_0x1500a3(0x149)));_0x227113[_0x1500a3(0x1ca)]&&(_0xfb0ed={'llm_project':_0x227113['llm_project']});}catch{}const _0x21a83f=resolveAgentPullArgs({'arg':_0x194235,'agentNameArg':_0x4b7697,'agentFlag':_0xe9f94a,'contextProject':_0x4f6132,'argDirConfig':_0x59cc01,'cwdConfigPath':_0x2dabfb||undefined,'cwdConfig':_0xfb0ed}),{projectNameOrId:_0x16395c,targetAgentName:_0x2454b6,existingOutputDir:_0x5cc5c8,source:_0x505327}=_0x21a83f;if(_0x505327===_0x1500a3(0x146))console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x199)]('Using\x20project\x20from\x20'+a4_0x5d88db['join'](_0x194235,'tdx.json')+':\x20'+_0x16395c));else{if(_0x505327===_0x1500a3(0x181))console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x199)](_0x1500a3(0x1cd)+_0x16395c));else _0x505327===_0x1500a3(0x1c7)&&console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x199)](_0x1500a3(0x195)+_0x16395c));}if(!_0x16395c)return _0xe9f94a?(console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x1ae)](_0x1500a3(0x133))),console[_0x1500a3(0x15a)](_0x1500a3(0x13f)),console['log'](_0x1500a3(0x153))):(console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x1ae)]('llm_project\x20is\x20not\x20set.\x20Use\x20`tdx\x20use\x20llm_project\x20<name>`\x20to\x20set\x20it.\x0a')),console[_0x1500a3(0x15a)](_0x1500a3(0x154)),console[_0x1500a3(0x15a)](_0x1500a3(0x1bb)),console['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'),console[_0x1500a3(0x15a)]('\x20\x20\x20\x20\x20\x20\x20tdx\x20agent\x20pull\x20--agent\x20<name>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Pull\x20specific\x20agent\x20from\x20context\x20project'),console[_0x1500a3(0x15a)]('\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(_0x2454b6){const {data:_0x4d330c}=await withSpinner(_0x1500a3(0x139)+_0x2454b6+'\x22\x20from\x20project\x20\x22'+_0x16395c+_0x1500a3(0x1a9),()=>_0x47b749[_0x1500a3(0x194)]['pullAgent'](_0x16395c,_0x2454b6,_0x10c551,{'dryRun':_0x47688d,'force':_0x2ca510}));if(_0x47688d)return console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x1ae)](_0x1500a3(0x180))),console['log'](_0x1500a3(0x13b)+_0x4d330c['agentName']),console[_0x1500a3(0x15a)](_0x1500a3(0x1ad)+_0x4d330c[_0x1500a3(0x18e)]),_0x4d330c[_0x1500a3(0x1d5)]&&(console[_0x1500a3(0x15a)](_0x1500a3(0x171)),console[_0x1500a3(0x15a)]('─'[_0x1500a3(0x13c)](0x3c)),console[_0x1500a3(0x15a)](_0x4d330c[_0x1500a3(0x1d5)]),console[_0x1500a3(0x15a)]('─'[_0x1500a3(0x13c)](0x3c))),0x0;return console[_0x1500a3(0x15a)](a4_0x4fff68['green']('Agent\x20pulled\x20successfully')),console[_0x1500a3(0x15a)](_0x1500a3(0x138)+_0x4d330c[_0x1500a3(0x1c2)]),console[_0x1500a3(0x15a)](_0x1500a3(0x12c)+_0x4d330c[_0x1500a3(0x18e)]),console['log'](_0x1500a3(0x198)+(_0x4d330c[_0x1500a3(0x176)]?a4_0x4fff68[_0x1500a3(0x174)](_0x1500a3(0x185)):_0x4d330c[_0x1500a3(0x1c4)]?a4_0x4fff68[_0x1500a3(0x1ae)](_0x1500a3(0x191)):a4_0x4fff68[_0x1500a3(0x12b)](_0x1500a3(0x187)))),0x0;}const _0x57aca9=_0x5cc5c8||_0x10c551,{data:_0xcd4054}=await withSpinner(_0x1500a3(0x128)+_0x16395c+_0x1500a3(0x1a9),()=>_0x47b749['llm']['pullProject'](_0x16395c,_0x57aca9,{'dryRun':!![]})),_0x461dd2=_0xcd4054['counts'][_0x1500a3(0x169)][_0x1500a3(0x185)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x1d8)][_0x1500a3(0x185)]+_0xcd4054['counts']['textKnowledgeBases'][_0x1500a3(0x185)]+_0xcd4054['counts'][_0x1500a3(0x16f)][_0x1500a3(0x185)]+_0xcd4054['counts']['integrations'][_0x1500a3(0x185)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x188)]['new']+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x1cc)][_0x1500a3(0x185)],_0x4abb9e=_0xcd4054['counts'][_0x1500a3(0x169)][_0x1500a3(0x191)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x1d8)][_0x1500a3(0x191)]+_0xcd4054['counts'][_0x1500a3(0x1c5)]['updated']+_0xcd4054['counts'][_0x1500a3(0x16f)]['updated']+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x183)][_0x1500a3(0x191)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x188)][_0x1500a3(0x191)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x1cc)][_0x1500a3(0x191)],_0x279ff1=_0xcd4054['counts'][_0x1500a3(0x169)][_0x1500a3(0x187)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x1d8)]['unchanged']+_0xcd4054['counts']['textKnowledgeBases'][_0x1500a3(0x187)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x16f)][_0x1500a3(0x187)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x183)][_0x1500a3(0x187)]+_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x188)][_0x1500a3(0x187)]+_0xcd4054[_0x1500a3(0x1c3)]['experimentalArtifacts'][_0x1500a3(0x187)];console[_0x1500a3(0x15a)]('\x0aPull\x20summary\x20for\x20\x27'+_0xcd4054[_0x1500a3(0x12a)]+'\x27:'),console['log']('\x20\x20'+a4_0x4fff68[_0x1500a3(0x174)]('+\x20'+_0x461dd2+_0x1500a3(0x1ba))+_0x1500a3(0x160)+a4_0x4fff68[_0x1500a3(0x1ae)]('~\x20'+_0x4abb9e+_0x1500a3(0x1b4))+'\x20|\x20'+a4_0x4fff68[_0x1500a3(0x199)]('=\x20'+_0x279ff1+_0x1500a3(0x1aa))),console[_0x1500a3(0x15a)]('\x20\x20Agents:\x20'+formatCountSummary(_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x169)])),console['log'](_0x1500a3(0x197)+formatCountSummary(_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x1d8)])),console[_0x1500a3(0x15a)]('\x20\x20Text\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0xcd4054[_0x1500a3(0x1c3)]['textKnowledgeBases'])),console['log'](_0x1500a3(0x170)+formatCountSummary(_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x16f)])),console[_0x1500a3(0x15a)](_0x1500a3(0x132)+formatCountSummary(_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x183)]));const _0x519bc3=_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x188)]['total']>0x0||_0xcd4054['counts'][_0x1500a3(0x1cc)][_0x1500a3(0x147)]>0x0;_0x519bc3&&(console['log'](_0x1500a3(0x192)+formatCountSummary(_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x188)])),console[_0x1500a3(0x15a)](_0x1500a3(0x144)+formatCountSummary(_0xcd4054[_0x1500a3(0x1c3)][_0x1500a3(0x1cc)])));console['log'](_0x1500a3(0x1ab)+a4_0x4fff68[_0x1500a3(0x1dc)](_0xcd4054[_0x1500a3(0x167)])),displayDiffs(_0xcd4054['agents'],_0xcd4054[_0x1500a3(0x1d8)],_0xcd4054[_0x1500a3(0x1c5)],_0xcd4054['prompts'],_0xcd4054[_0x1500a3(0x183)],_0xcd4054['experimentalKnowledgeBases'],_0xcd4054[_0x1500a3(0x1cc)]);if(_0x47688d)return console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x1ae)]('\x0a[Dry\x20run]\x20No\x20files\x20were\x20written')),0x0;if(_0x461dd2===0x0&&_0x4abb9e===0x0)return console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x174)](_0x1500a3(0x19e))),saveSessionContext({'llm_project':_0xcd4054[_0x1500a3(0x12a)]},_0x4d9808[_0x1500a3(0x155)]),console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x174)]('✔\x20Context\x20set:\x20'+a4_0x4fff68[_0x1500a3(0x199)](_0x1500a3(0x1ca))+_0x1500a3(0x172)+a4_0x4fff68[_0x1500a3(0x1dc)](_0xcd4054['projectName']))),0x0;if(!_0x2c9e21&&!_0x2ca510){if(!isInteractive())return console[_0x1500a3(0x1de)](a4_0x4fff68[_0x1500a3(0x134)](_0x1500a3(0x164)),_0x1500a3(0x131)),console[_0x1500a3(0x1de)](a4_0x4fff68[_0x1500a3(0x199)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x2b844a=await confirmKey(_0x1500a3(0x143)+(_0x461dd2+_0x4abb9e)+_0x1500a3(0x13e));if(!_0x2b844a)return console[_0x1500a3(0x15a)](a4_0x4fff68['yellow']('Cancelled'),_0x1500a3(0x165)),0x1;}const {data:_0x11a049}=await withSpinner(_0x1500a3(0x1be),()=>_0x47b749[_0x1500a3(0x194)][_0x1500a3(0x1c8)](_0x16395c,_0x57aca9,{'force':_0x2ca510}));return console['log'](a4_0x4fff68[_0x1500a3(0x174)](_0x1500a3(0x159)+(_0x461dd2+_0x4abb9e)+_0x1500a3(0x15b)+_0x11a049[_0x1500a3(0x167)])),saveSessionContext({'llm_project':_0x11a049['projectName']},_0x4d9808[_0x1500a3(0x155)]),console[_0x1500a3(0x15a)](a4_0x4fff68[_0x1500a3(0x174)](_0x1500a3(0x1b8)+a4_0x4fff68[_0x1500a3(0x199)](_0x1500a3(0x1ca))+_0x1500a3(0x172)+a4_0x4fff68[_0x1500a3(0x1dc)](_0x11a049[_0x1500a3(0x12a)]))),0x0;}}export class AgentCloneCommand extends BaseCommand{[a4_0x2c3b5c(0x137)]=a4_0x2c3b5c(0x1b6);[a4_0x2c3b5c(0x18f)]='Clone\x20an\x20LLM\x20project\x20to\x20a\x20new\x20project';async['execute'](_0x20f75a){const _0x4eb52d=a4_0x2c3b5c,{options:_0x469c32,args:_0x582c68,tdx:_0x15bd29}=_0x20f75a,_0x3e746d=_0x582c68[0x0],_0x2c7767=_0x469c32['name'],_0x41fc1e=_0x469c32['dryRun'],_0xd02c67=_0x469c32[_0x4eb52d(0x1dd)],_0x53b54c=_0x469c32[_0x4eb52d(0x177)],_0x30bef5=_0x469c32['llmProject'];let _0x3f540f;const _0xc149d=findAgentConfigPath(process['cwd']());if(_0x3e746d){const _0x591da8=a4_0x5d88db[_0x4eb52d(0x17f)](_0x3e746d,_0x4eb52d(0x19d));existsSync(_0x591da8)?(_0x3f540f=_0x3e746d,console[_0x4eb52d(0x15a)](a4_0x4fff68['dim']('Using\x20local\x20project:\x20'+_0x3e746d))):_0x3f540f=_0x3e746d;}else{if(_0xc149d)_0x3f540f=a4_0x5d88db['dirname'](_0xc149d),console['log'](a4_0x4fff68[_0x4eb52d(0x199)]('Using\x20current\x20project:\x20'+_0x3f540f));else{if(_0x30bef5){const _0x373aed=sanitizeForFilesystem(_0x30bef5);let _0x3e60cd=_0x373aed,_0x4e5ce8=a4_0x5d88db[_0x4eb52d(0x17f)](process[_0x4eb52d(0x1a5)](),_0x4eb52d(0x169),_0x373aed,_0x4eb52d(0x19d));if(!existsSync(_0x4e5ce8)){const _0x3fe380=normalizeName(_0x30bef5),_0x1a0660=a4_0x5d88db['join'](process[_0x4eb52d(0x1a5)](),'agents',_0x3fe380,_0x4eb52d(0x19d));existsSync(_0x1a0660)&&(_0x3e60cd=_0x3fe380,_0x4e5ce8=_0x1a0660);}if(existsSync(_0x4e5ce8))_0x3f540f=a4_0x5d88db[_0x4eb52d(0x1db)](_0x4e5ce8),console['log'](a4_0x4fff68[_0x4eb52d(0x199)](_0x4eb52d(0x17e)+_0x3f540f));else{const _0x49e872=_0x469c32[_0x4eb52d(0x15f)];if(_0x49e872)throw new SDKError(ErrorCode[_0x4eb52d(0x1cb)],_0x4eb52d(0x196)+_0x30bef5+_0x4eb52d(0x14d),undefined,{'helpText':_0x4eb52d(0x186)+'First\x20pull\x20the\x20project\x20locally,\x20then\x20clone\x20from\x20the\x20local\x20files:\x0a'+('\x20\x20tdx\x20agent\x20pull\x20'+_0x30bef5+'\x0a')+('\x20\x20tdx\x20agent\x20clone\x20agents/'+_0x3e60cd+_0x4eb52d(0x163)+(_0x2c7767||_0x4eb52d(0x1d9))+_0x4eb52d(0x1bf)+_0x49e872)});_0x3f540f=_0x30bef5,console['log'](a4_0x4fff68['dim'](_0x4eb52d(0x13d)+_0x30bef5));}}}}if(!_0x3f540f)return console['log'](a4_0x4fff68['yellow'](_0x4eb52d(0x16a))),console['log']('\x20\x20tdx\x20agent\x20clone\x20<project>\x20--name\x20<new-name>\x20\x20\x20\x20#\x20Clone\x20from\x20remote\x20project'),console['log'](_0x4eb52d(0x129)),console[_0x4eb52d(0x15a)](_0x4eb52d(0x1b2)),console[_0x4eb52d(0x15a)](_0x4eb52d(0x1a2)),0x1;if(!_0x2c7767)throw new SDKError(ErrorCode[_0x4eb52d(0x157)],_0x4eb52d(0x12e),undefined,{'helpText':_0x4eb52d(0x18a)});if(!_0xd02c67&&!_0x41fc1e){if(!isInteractive())return console[_0x4eb52d(0x1de)](a4_0x4fff68[_0x4eb52d(0x134)](_0x4eb52d(0x164)),'Confirmation\x20required\x20but\x20running\x20in\x20non-interactive\x20mode'),console['error'](a4_0x4fff68['dim']('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0x4eac71=await confirmKey('Clone\x20\x22'+_0x3f540f+'\x22\x20to\x20new\x20project\x20\x22'+_0x2c7767+'\x22?');if(!_0x4eac71)return console[_0x4eb52d(0x15a)](a4_0x4fff68['yellow'](_0x4eb52d(0x1a3))),0x1;}const {data:_0x26ceab}=await withSpinner(_0x4eb52d(0x162)+_0x3f540f+'\x22\x20to\x20\x22'+_0x2c7767+_0x4eb52d(0x1a9),()=>_0x15bd29[_0x4eb52d(0x194)][_0x4eb52d(0x15c)](_0x3f540f,_0x2c7767,{'dryRun':_0x41fc1e}));if(_0x41fc1e){console[_0x4eb52d(0x15a)](a4_0x4fff68[_0x4eb52d(0x1ae)](_0x4eb52d(0x166))),console['log'](_0x4eb52d(0x1b3)+_0x26ceab['sourceProjectName']),console[_0x4eb52d(0x15a)](_0x4eb52d(0x1d0)+_0x2c7767),console[_0x4eb52d(0x15a)](_0x4eb52d(0x1b0)),console[_0x4eb52d(0x15a)](_0x4eb52d(0x12f)+_0x26ceab['counts']['agents'][_0x4eb52d(0x1a1)]),console[_0x4eb52d(0x15a)](_0x4eb52d(0x197)+_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x1d8)][_0x4eb52d(0x1a1)]),console[_0x4eb52d(0x15a)](_0x4eb52d(0x170)+_0x26ceab['counts'][_0x4eb52d(0x16f)][_0x4eb52d(0x1a1)]);const _0x24eaaa=_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x188)][_0x4eb52d(0x1a1)]>0x0||_0x26ceab[_0x4eb52d(0x1c3)]['experimentalArtifacts']['created']>0x0;return _0x24eaaa&&(console[_0x4eb52d(0x15a)](_0x4eb52d(0x192)+_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x188)][_0x4eb52d(0x1a1)]),console['log'](_0x4eb52d(0x144)+_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x1cc)][_0x4eb52d(0x1a1)])),0x0;}const _0x3f9711=_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x169)][_0x4eb52d(0x1b5)]>0x0||_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x1d8)][_0x4eb52d(0x1b5)]>0x0||_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x16f)]['errors']>0x0||_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x188)][_0x4eb52d(0x1b5)]>0x0||_0x26ceab['counts']['experimentalArtifacts']['errors']>0x0;_0x3f9711?console[_0x4eb52d(0x15a)](a4_0x4fff68[_0x4eb52d(0x1ae)](_0x4eb52d(0x1a6))):console['log'](a4_0x4fff68[_0x4eb52d(0x174)](_0x4eb52d(0x1d7)));console[_0x4eb52d(0x15a)](_0x4eb52d(0x1b3)+_0x26ceab[_0x4eb52d(0x130)]),console['log']('New\x20project:\x20'+_0x26ceab[_0x4eb52d(0x1a4)]),console[_0x4eb52d(0x15a)](_0x4eb52d(0x1d3)+_0x26ceab[_0x4eb52d(0x1c0)]),console[_0x4eb52d(0x15a)](),console[_0x4eb52d(0x15a)](_0x4eb52d(0x189)),console[_0x4eb52d(0x15a)]('\x20\x20Agents:\x20'+formatCountSummary(_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x169)])),console[_0x4eb52d(0x15a)]('\x20\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x1d8)])),console[_0x4eb52d(0x15a)](_0x4eb52d(0x170)+formatCountSummary(_0x26ceab[_0x4eb52d(0x1c3)]['prompts'])),console[_0x4eb52d(0x15a)](_0x4eb52d(0x132)+formatCountSummary(_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x183)]));const _0x1d2504=_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x188)][_0x4eb52d(0x1a1)]>0x0||_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x188)][_0x4eb52d(0x191)]>0x0||_0x26ceab['counts']['experimentalKnowledgeBases'][_0x4eb52d(0x187)]>0x0||_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x1cc)][_0x4eb52d(0x1a1)]>0x0||_0x26ceab['counts'][_0x4eb52d(0x1cc)][_0x4eb52d(0x191)]>0x0||_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x1cc)][_0x4eb52d(0x187)]>0x0;_0x1d2504&&(console[_0x4eb52d(0x15a)]('\x20\x20Experimental\x20Knowledge\x20Bases:\x20'+formatCountSummary(_0x26ceab[_0x4eb52d(0x1c3)][_0x4eb52d(0x188)])),console[_0x4eb52d(0x15a)](_0x4eb52d(0x144)+formatCountSummary(_0x26ceab[_0x4eb52d(0x1c3)]['experimentalArtifacts'])));if(_0x3f9711){console[_0x4eb52d(0x15a)](),console[_0x4eb52d(0x15a)](a4_0x4fff68[_0x4eb52d(0x134)]('Errors:'));for(const _0xa2a7b3 of _0x26ceab[_0x4eb52d(0x169)]){_0xa2a7b3[_0x4eb52d(0x16d)]===_0x4eb52d(0x1de)&&console['log'](a4_0x4fff68[_0x4eb52d(0x134)]('\x20\x20Agent\x20\x22'+_0xa2a7b3[_0x4eb52d(0x1c2)]+'\x22:\x20'+_0xa2a7b3[_0x4eb52d(0x1de)]));}for(const _0x9b67a8 of _0x26ceab[_0x4eb52d(0x1d8)]){_0x9b67a8['action']===_0x4eb52d(0x1de)&&console[_0x4eb52d(0x15a)](a4_0x4fff68[_0x4eb52d(0x134)]('\x20\x20Knowledge\x20Base\x20\x22'+_0x9b67a8[_0x4eb52d(0x137)]+_0x4eb52d(0x1af)+_0x9b67a8[_0x4eb52d(0x1de)]));}for(const _0x24cfaa of _0x26ceab[_0x4eb52d(0x16f)]){_0x24cfaa[_0x4eb52d(0x16d)]===_0x4eb52d(0x1de)&&console[_0x4eb52d(0x15a)](a4_0x4fff68[_0x4eb52d(0x134)](_0x4eb52d(0x1da)+_0x24cfaa[_0x4eb52d(0x137)]+_0x4eb52d(0x1af)+_0x24cfaa[_0x4eb52d(0x1de)]));}for(const _0x4fabfe of _0x26ceab[_0x4eb52d(0x183)]){_0x4fabfe[_0x4eb52d(0x16d)]===_0x4eb52d(0x1de)&&console[_0x4eb52d(0x15a)](a4_0x4fff68[_0x4eb52d(0x134)](_0x4eb52d(0x14b)+_0x4fabfe['name']+_0x4eb52d(0x1af)+_0x4fabfe['error']));}for(const _0x8ab0ba of _0x26ceab[_0x4eb52d(0x188)]){_0x8ab0ba[_0x4eb52d(0x16d)]===_0x4eb52d(0x1de)&&console['log'](a4_0x4fff68[_0x4eb52d(0x134)](_0x4eb52d(0x19a)+_0x8ab0ba['name']+'\x22:\x20'+_0x8ab0ba[_0x4eb52d(0x1de)]));}for(const _0x18fda7 of _0x26ceab[_0x4eb52d(0x1cc)]){_0x18fda7[_0x4eb52d(0x16d)]===_0x4eb52d(0x1de)&&console[_0x4eb52d(0x15a)](a4_0x4fff68['red'](_0x4eb52d(0x1ce)+_0x18fda7['name']+_0x4eb52d(0x1af)+_0x18fda7[_0x4eb52d(0x1de)]));}return 0x1;}console[_0x4eb52d(0x15a)]();const _0x53744d=getLLMProjectUrl(_0x53b54c,_0x26ceab['newProjectId']);return console[_0x4eb52d(0x15a)](_0x4eb52d(0x1b1)+a4_0x4fff68[_0x4eb52d(0x1dc)](_0x53744d)),0x0;}}export class AgentPushCommand extends BaseCommand{[a4_0x2c3b5c(0x137)]=a4_0x2c3b5c(0x19b);[a4_0x2c3b5c(0x18f)]='Push\x20local\x20agent\x20files\x20to\x20LLM\x20project';async[a4_0x2c3b5c(0x152)](_0x1d6707){const _0x4797a8=a4_0x2c3b5c,{options:_0x5bbca3,args:_0x4f8a52,tdx:_0x28dc17}=_0x1d6707;let _0x519c66=_0x4f8a52[0x0]||process[_0x4797a8(0x1a5)]();const _0x24a3f2=_0x5bbca3[_0x4797a8(0x158)],_0x4aa7f3=_0x5bbca3[_0x4797a8(0x161)],_0x3bade8=_0x5bbca3[_0x4797a8(0x1dd)],_0x475966=_0x5bbca3['site'],_0x4209cf=a4_0x5d88db[_0x4797a8(0x17f)](_0x519c66,_0x4797a8(0x14a)),_0x1d1c2c=existsSync(_0x4209cf);if(_0x1d1c2c){const {data:_0x199e70}=await withSpinner('Pushing\x20agent\x20from\x20\x22'+_0x519c66+_0x4797a8(0x1a9),()=>_0x28dc17[_0x4797a8(0x194)]['pushAgent'](_0x519c66,{'dryRun':_0x24a3f2,'force':_0x4aa7f3}));if(_0x24a3f2)return console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x1ae)](_0x4797a8(0x166))),console[_0x4797a8(0x15a)](_0x4797a8(0x1d6)+_0x199e70[_0x4797a8(0x1c2)]),0x0;if(_0x199e70['action']===_0x4797a8(0x1de))return console['log'](a4_0x4fff68['red'](_0x4797a8(0x1c6)+_0x199e70['error'])),0x1;console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x174)](_0x4797a8(0x168)+_0x199e70[_0x4797a8(0x16d)]+_0x4797a8(0x1a7))),console[_0x4797a8(0x15a)](_0x4797a8(0x138)+_0x199e70[_0x4797a8(0x1c2)]);if(_0x199e70[_0x4797a8(0x18c)]&&_0x199e70[_0x4797a8(0x1b7)]){const _0xeed1f5=getLLMAgentChatUrl(_0x475966,_0x199e70[_0x4797a8(0x1b7)],_0x199e70[_0x4797a8(0x18c)]);console[_0x4797a8(0x15a)](_0x4797a8(0x140)+a4_0x4fff68['cyan'](_0xeed1f5));}return 0x0;}const _0x44f6ea=_0x5bbca3[_0x4797a8(0x179)],_0x1eddd6=resolveProjectFromContext(_0x519c66,_0x44f6ea);if(_0x1eddd6['found'])_0x519c66=_0x1eddd6['projectDir'],_0x1eddd6['source']===_0x4797a8(0x1c7)&&console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x199)](_0x4797a8(0x1cd)+_0x519c66));else{let _0x2428c2=_0x4797a8(0x1a8);_0x1eddd6[_0x4797a8(0x17c)]===_0x4797a8(0x16e)&&(_0x2428c2=_0x1eddd6[_0x4797a8(0x18d)]+'\x0aRun\x20\x27tdx\x20agent\x20pull\x20'+_0x1eddd6[_0x4797a8(0x179)]+_0x4797a8(0x1c1));throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x1eddd6[_0x4797a8(0x17c)]===_0x4797a8(0x178)?_0x1eddd6[_0x4797a8(0x18d)]:_0x4797a8(0x19f)+_0x519c66,undefined,{'helpText':_0x2428c2});}const {data:_0x3d0e83}=await withSpinner(_0x4797a8(0x182),()=>_0x28dc17[_0x4797a8(0x194)][_0x4797a8(0x1cf)](_0x519c66,{'dryRun':!![]})),_0x50a123=_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x169)][_0x4797a8(0x1b5)]>0x0;if(_0x50a123){console[_0x4797a8(0x15a)](a4_0x4fff68['red'](_0x4797a8(0x193)));for(const _0x37d1f7 of _0x3d0e83[_0x4797a8(0x169)]){_0x37d1f7[_0x4797a8(0x16d)]===_0x4797a8(0x1de)&&console['log'](a4_0x4fff68[_0x4797a8(0x134)](_0x4797a8(0x190)+_0x37d1f7[_0x4797a8(0x1c2)]+_0x4797a8(0x1af)+_0x37d1f7[_0x4797a8(0x1de)]));}return 0x1;}const _0x17527b=_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x169)][_0x4797a8(0x1a1)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1d8)][_0x4797a8(0x1a1)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1c5)]['created']+_0x3d0e83['counts'][_0x4797a8(0x16f)][_0x4797a8(0x1a1)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x183)][_0x4797a8(0x1a1)]+_0x3d0e83[_0x4797a8(0x1c3)]['experimentalKnowledgeBases'][_0x4797a8(0x1a1)]+_0x3d0e83[_0x4797a8(0x1c3)]['experimentalArtifacts']['created'],_0x3a4eba=_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x169)][_0x4797a8(0x191)]+_0x3d0e83['counts'][_0x4797a8(0x1d8)]['updated']+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1c5)][_0x4797a8(0x191)]+_0x3d0e83[_0x4797a8(0x1c3)]['prompts'][_0x4797a8(0x191)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x183)]['updated']+_0x3d0e83['counts'][_0x4797a8(0x188)][_0x4797a8(0x191)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1cc)][_0x4797a8(0x191)],_0x45f6ce=_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x169)][_0x4797a8(0x187)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1d8)][_0x4797a8(0x187)]+_0x3d0e83[_0x4797a8(0x1c3)]['textKnowledgeBases'][_0x4797a8(0x187)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x16f)]['unchanged']+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x183)][_0x4797a8(0x187)]+_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x188)][_0x4797a8(0x187)]+_0x3d0e83['counts'][_0x4797a8(0x1cc)][_0x4797a8(0x187)];console[_0x4797a8(0x15a)](_0x4797a8(0x1ac)+_0x3d0e83[_0x4797a8(0x12a)]+'\x27:'),console['log']('\x20\x20'+a4_0x4fff68['green']('+\x20'+_0x17527b+_0x4797a8(0x1ba))+_0x4797a8(0x160)+a4_0x4fff68[_0x4797a8(0x1ae)]('~\x20'+_0x3a4eba+_0x4797a8(0x1b4))+_0x4797a8(0x160)+a4_0x4fff68[_0x4797a8(0x199)]('=\x20'+_0x45f6ce+'\x20unchanged')),console[_0x4797a8(0x15a)](_0x4797a8(0x12f)+formatCountSummary(_0x3d0e83['counts']['agents'])),console[_0x4797a8(0x15a)](_0x4797a8(0x197)+formatCountSummary(_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1d8)])),console[_0x4797a8(0x15a)](_0x4797a8(0x1bd)+formatCountSummary(_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1c5)])),console[_0x4797a8(0x15a)]('\x20\x20Prompts:\x20'+formatCountSummary(_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x16f)])),console[_0x4797a8(0x15a)](_0x4797a8(0x132)+formatCountSummary(_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x183)]));const _0x19aea4=_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x188)]['created']>0x0||_0x3d0e83[_0x4797a8(0x1c3)]['experimentalKnowledgeBases'][_0x4797a8(0x191)]>0x0||_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x188)][_0x4797a8(0x187)]>0x0||_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1cc)][_0x4797a8(0x1a1)]>0x0||_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1cc)]['updated']>0x0||_0x3d0e83[_0x4797a8(0x1c3)]['experimentalArtifacts'][_0x4797a8(0x187)]>0x0;_0x19aea4&&(console[_0x4797a8(0x15a)](_0x4797a8(0x192)+formatCountSummary(_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x188)])),console[_0x4797a8(0x15a)](_0x4797a8(0x144)+formatCountSummary(_0x3d0e83[_0x4797a8(0x1c3)][_0x4797a8(0x1cc)])));console['log']('\x20\x20Source:\x20'+a4_0x4fff68[_0x4797a8(0x1dc)](_0x519c66)),displayDiffs(_0x3d0e83['agents'],_0x3d0e83[_0x4797a8(0x1d8)],_0x3d0e83['textKnowledgeBases'],_0x3d0e83[_0x4797a8(0x16f)],_0x3d0e83[_0x4797a8(0x183)],_0x3d0e83['experimentalKnowledgeBases'],_0x3d0e83[_0x4797a8(0x1cc)]);if(_0x24a3f2)return console['log'](a4_0x4fff68[_0x4797a8(0x1ae)](_0x4797a8(0x19c))),0x0;if(_0x17527b===0x0&&_0x3a4eba===0x0){console['log'](a4_0x4fff68['green']('\x0a✔\x20All\x20resources\x20are\x20up\x20to\x20date'));const _0x489be5=getLLMProjectUrl(_0x475966,_0x3d0e83[_0x4797a8(0x1b7)]);return console['log'](_0x4797a8(0x1b1)+a4_0x4fff68['cyan'](_0x489be5)),0x0;}if(!_0x3bade8&&!_0x4aa7f3){if(!isInteractive())return console[_0x4797a8(0x1de)](a4_0x4fff68[_0x4797a8(0x134)](_0x4797a8(0x164)),_0x4797a8(0x131)),console[_0x4797a8(0x1de)](a4_0x4fff68[_0x4797a8(0x199)]('Use\x20-y\x20or\x20--yes\x20flag\x20to\x20apply\x20changes\x20without\x20confirmation')),0x1;const _0xb6e3a9=await confirmKey(_0x4797a8(0x14e)+(_0x17527b+_0x3a4eba)+_0x4797a8(0x14c));if(!_0xb6e3a9)return console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x1ae)](_0x4797a8(0x1a3)),_0x4797a8(0x13a)),0x1;}const {data:_0xcc6353}=await withSpinner(_0x4797a8(0x184),()=>_0x28dc17[_0x4797a8(0x194)][_0x4797a8(0x1cf)](_0x519c66,{'force':_0x4aa7f3})),_0x36cf8b=_0xcc6353[_0x4797a8(0x1c3)][_0x4797a8(0x169)]['errors']>0x0||_0xcc6353[_0x4797a8(0x1c3)][_0x4797a8(0x1d8)][_0x4797a8(0x1b5)]>0x0||_0xcc6353[_0x4797a8(0x1c3)]['textKnowledgeBases'][_0x4797a8(0x1b5)]>0x0||_0xcc6353[_0x4797a8(0x1c3)][_0x4797a8(0x16f)][_0x4797a8(0x1b5)]>0x0;if(_0x36cf8b){console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x1ae)]('\x0aProject\x20pushed\x20with\x20errors')),console[_0x4797a8(0x15a)](),console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x134)](_0x4797a8(0x15e)));for(const _0x4ae449 of _0xcc6353['agents']){_0x4ae449[_0x4797a8(0x16d)]===_0x4797a8(0x1de)&&console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x134)](_0x4797a8(0x190)+_0x4ae449[_0x4797a8(0x1c2)]+_0x4797a8(0x1af)+_0x4ae449[_0x4797a8(0x1de)]));}for(const _0x3718ef of _0xcc6353[_0x4797a8(0x1d8)]){_0x3718ef[_0x4797a8(0x16d)]===_0x4797a8(0x1de)&&console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x134)](_0x4797a8(0x17a)+_0x3718ef[_0x4797a8(0x137)]+_0x4797a8(0x1af)+_0x3718ef[_0x4797a8(0x1de)]));}for(const _0x13ad28 of _0xcc6353[_0x4797a8(0x1c5)]){_0x13ad28[_0x4797a8(0x16d)]===_0x4797a8(0x1de)&&console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x134)](_0x4797a8(0x142)+_0x13ad28[_0x4797a8(0x137)]+'\x22:\x20'+_0x13ad28['error']));}for(const _0x18d4c3 of _0xcc6353[_0x4797a8(0x16f)]){_0x18d4c3['action']===_0x4797a8(0x1de)&&console[_0x4797a8(0x15a)](a4_0x4fff68[_0x4797a8(0x134)](_0x4797a8(0x1da)+_0x18d4c3[_0x4797a8(0x137)]+_0x4797a8(0x1af)+_0x18d4c3[_0x4797a8(0x1de)]));}for(const _0x3338bc of _0xcc6353['integrations']){_0x3338bc[_0x4797a8(0x16d)]===_0x4797a8(0x1de)&&console['log'](a4_0x4fff68['red']('\x20\x20Integration\x20\x22'+_0x3338bc[_0x4797a8(0x137)]+_0x4797a8(0x1af)+_0x3338bc[_0x4797a8(0x1de)]));}return 0x1;}console['log'](a4_0x4fff68['green'](_0x4797a8(0x135)+(_0x17527b+_0x3a4eba)+_0x4797a8(0x15d)+_0xcc6353[_0x4797a8(0x12a)]+'\x27'));const _0x50a5e7=getLLMProjectUrl(_0x475966,_0xcc6353['projectId']);return console[_0x4797a8(0x15a)](_0x4797a8(0x1b1)+a4_0x4fff68[_0x4797a8(0x1dc)](_0x50a5e7)),0x0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a5_0x4d9149=a5_0x2250;(function(_0x5b1496,_0x3582c1){const _0x4ad5c8=a5_0x2250,_0x4caa96=_0x5b1496();while(!![]){try{const _0x5814a3=-parseInt(_0x4ad5c8(0xad))/0x1*(parseInt(_0x4ad5c8(0x12d))/0x2)+parseInt(_0x4ad5c8(0x121))/0x3+-parseInt(_0x4ad5c8(0xac))/0x4+parseInt(_0x4ad5c8(0x116))/0x5+-parseInt(_0x4ad5c8(0xd0))/0x6*(-parseInt(_0x4ad5c8(0xc6))/0x7)+parseInt(_0x4ad5c8(0xb5))/0x8*(-parseInt(_0x4ad5c8(0xbb))/0x9)+-parseInt(_0x4ad5c8(0xfe))/0xa*(parseInt(_0x4ad5c8(0x118))/0xb);if(_0x5814a3===_0x3582c1)break;else _0x4caa96['push'](_0x4caa96['shift']());}catch(_0x1a46cb){_0x4caa96['push'](_0x4caa96['shift']());}}}(a5_0x59a7,0x90f2e));import*as a5_0x2a0ea7 from'node:fs';import*as a5_0x602c30 from'node:path';import a5_0x457e06 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';function a5_0x2250(_0xfecfae,_0x14bed3){_0xfecfae=_0xfecfae-0x96;const _0x59a747=a5_0x59a7();let _0x225067=_0x59a747[_0xfecfae];return _0x225067;}import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';function a5_0x59a7(){const _0x2ba277=['trim','\x20-\x20','stop','text','428525veKmJP','Re-evaluating\x20cached\x20test\x20run...','143ROeVyp','\x22:\x20','resolveAgentId','writeFileSync','no_context','now','\x20\x20Conversation:\x20','Error\x20writing\x20output\x20file:\x20','basename','2958777aswGIy','agentName','Site:\x20','\x20\x20Project:\x20','Re-evaluating\x20','split','ERROR',':\x20Sending\x20user\x20input...','name','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','Usage:','2LqRyei','Using\x20agent:\x20','Tests\x20found:\x20','Test\x20','testYmlPath','start','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','\x20\x20Agent:\x20','not\x20found','Running:\x20','filter','has','Either\x20switch\x20to\x20the\x20\x22','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','\x20(cached)','tests','Running\x20agent\x20tests...','Agent:\x20','agentDirs','llm','\x20(new)','Run\x20\x27tdx\x20agent\x20pull\x20','cyan','conversation_url','execute','1268596wpnGQZ','265803kkseXx','Project\x20path:\x20','green','\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','map','Failed:\x20\x20\x20','No\x20tests\x20found\x20with\x20tags:\x20','repeat','5808FyATyq','No\x20tests\x20found\x20matching:\x20','join','\x27\x20to\x20create\x20the\x20folder\x20structure.','404','executeReeval','9567TCgQHc','agent:test','find','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','site','agent','log','\x20\x20-\x20','Re-evaluation\x20Summary','toLowerCase','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','8044505RgJjYG','table','Round\x201/','multiple_agents','llmProject','test.yml','reason','Cached\x20run\x20from:\x20','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','json','6HjWgfv','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','Running\x20test:\x20','Test\x20Summary','/<agent-name>','substring','✓\x20PASS:\x20','no_local_folder','yellow','white','output','Duration:\x20','includes','tags','existsSync','Executing\x20new\x20tests...','✗\x20FAIL:\x20','Passed:\x20\x20\x20','verbose','tsv','message','source','forEach','Evaluating\x20response...','projectDir','projectName','toISOString','resolve','FAIL','Failed\x20Tests:','Cached\x20run\x20is\x20from\x20site\x20\x22','Errors:\x20\x20\x20','length','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','New\x20tests\x20to\x20execute:\x20','jsonl','Conversation\x20URL:\x20','isSpinning','push','\x20\x20Evaluating...\x20','Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22','Run\x20tests\x20for\x20an\x20LLM\x20agent','No\x20tests\x20have\x20tags\x20defined.','Available\x20tests:\x20','description','Re-evaluating...','209830XRJKrv','...\x20','rounds','status','\x20\x20Site:\x20','PASS','Total:\x20\x20\x20\x20','\x20\x20Round\x20','red','Available\x20tags:\x20','Output\x20written\x20to:\x20','Round\x20','\x22,\x20but\x20current\x20site\x20is\x20\x22','✗\x20ERROR:\x20','dim','utf-8','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','eval','round'];a5_0x59a7=function(){return _0x2ba277;};return a5_0x59a7();}export class AgentTestCommand extends BaseCommand{[a5_0x4d9149(0x129)]=a5_0x4d9149(0xbc);[a5_0x4d9149(0xfc)]=a5_0x4d9149(0xf9);async[a5_0x4d9149(0xab)](_0x52cc63){const _0x142c15=a5_0x4d9149,{options:_0x585633,args:_0x4bafb4,tdx:_0x55bebc}=_0x52cc63,_0x4f0047=_0x4bafb4[0x0]||'.',_0x3c54b0=_0x585633['dryRun'],_0x204383=_0x585633,_0x4ebd8c=_0x204383[_0x142c15(0x110)]===![],_0x55ba2d=_0x204383['reeval'],_0x5aec43=_0x204383[_0x142c15(0x129)],_0x35d2ae=_0x204383[_0x142c15(0xdd)],_0x2e3f90=_0x585633[_0x142c15(0xbf)],_0x1e7957=_0x204383[_0x142c15(0xda)];if(_0x55ba2d&&_0x4ebd8c)return console['log'](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0x12a))),0x1;let _0x4da016=_0x142c15(0xc7);if(_0x204383[_0x142c15(0xcf)])_0x4da016=_0x142c15(0xcf);else{if(_0x204383[_0x142c15(0xf3)])_0x4da016=_0x142c15(0xf3);else{if(_0x204383['tsv'])_0x4da016=_0x142c15(0xe3);else{if(_0x204383['table'])_0x4da016='table';}}}const _0x49f11e=_0x204383[_0x142c15(0xca)];let _0x4e131c=_0x4f0047;const _0x1a3994=a5_0x2a0ea7[_0x142c15(0xde)](_0x4f0047),_0x3220d9=_0x4f0047==='.';if(!_0x1a3994||_0x3220d9){const _0x4a77a5=resolveProjectFromContext(_0x4f0047,_0x49f11e,{'requireFile':_0x142c15(0xcb)});if(_0x4a77a5['found'])_0x4e131c=_0x4a77a5[_0x142c15(0xe8)],_0x4a77a5[_0x142c15(0xe5)]==='context'&&console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x10c)](_0x142c15(0x12e)+_0x4e131c));else switch(_0x4a77a5[_0x142c15(0xcc)]){case _0x142c15(0x11c):console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0xd8)](_0x4a77a5[_0x142c15(0xe4)])),console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)](_0x142c15(0x12c)),console[_0x142c15(0xc1)](_0x142c15(0xb0)),console['log']('\x20\x20tdx\x20agent\x20test\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Run\x20tests\x20(requires\x20context\x20or\x20tdx.json)'),console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)](_0x142c15(0x10f));return 0x1;case _0x142c15(0xd7):console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0xd8)](_0x4a77a5[_0x142c15(0xe4)])),console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)](_0x142c15(0xa8)+_0x4a77a5[_0x142c15(0xca)]+_0x142c15(0xb8));return 0x1;case _0x142c15(0xc9):{const _0x1e1a92=a5_0x602c30[_0x142c15(0x120)](_0x4a77a5['projectDir']);console[_0x142c15(0xc1)](a5_0x457e06['yellow']('Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22'+_0x4a77a5[_0x142c15(0xca)]+'\x22:'));for(const _0x3e5851 of _0x4a77a5[_0x142c15(0xa5)]){console['log'](_0x142c15(0xc2)+_0x3e5851);}return console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)](_0x142c15(0xbe)+_0x1e1a92+_0x142c15(0xd4)),0x1;}case'no_tests':console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0xd8)](_0x142c15(0x99)+_0x4a77a5[_0x142c15(0xca)]+'\x22.')),console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x10c)](_0x142c15(0xae)+_0x4a77a5['projectDir'])),console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)]('Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.');return 0x1;}}const {definition:_0x461865,agentInfo:_0x104008}=parseTestFile(_0x4e131c);let _0x43049c=_0x461865[_0x142c15(0xa2)];if(_0x5aec43){const _0x30f7d0=_0x5aec43[_0x142c15(0x126)](',')[_0x142c15(0xb1)](_0x12a902=>_0x12a902['trim']());_0x43049c=_0x461865['tests'][_0x142c15(0x9d)](_0x3dcb51=>_0x30f7d0['includes'](_0x3dcb51[_0x142c15(0x129)]));if(_0x43049c['length']===0x0)return console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0xd8)](_0x142c15(0xb6)+_0x5aec43)),console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x10c)](_0x142c15(0xfb)+_0x461865[_0x142c15(0xa2)][_0x142c15(0xb1)](_0xd7c21d=>_0xd7c21d[_0x142c15(0x129)])[_0x142c15(0xb7)](',\x20'))),0x1;}if(_0x35d2ae){const _0x4686bc=_0x35d2ae[_0x142c15(0x126)](',')['map'](_0x70897e=>_0x70897e[_0x142c15(0x112)]()[_0x142c15(0xc4)]());_0x43049c=_0x43049c[_0x142c15(0x9d)](_0x8ba3e1=>_0x8ba3e1[_0x142c15(0xdd)]?.['some'](_0x165252=>_0x4686bc[_0x142c15(0xdc)](_0x165252[_0x142c15(0xc4)]())));if(_0x43049c[_0x142c15(0xf0)]===0x0){console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0xd8)](_0x142c15(0xb3)+_0x35d2ae));const _0x4068be=new Set();return _0x461865[_0x142c15(0xa2)][_0x142c15(0xe6)](_0x33d908=>_0x33d908[_0x142c15(0xdd)]?.[_0x142c15(0xe6)](_0x1fc74f=>_0x4068be['add'](_0x1fc74f))),_0x4068be['size']>0x0?console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x10c)](_0x142c15(0x107)+[..._0x4068be][_0x142c15(0xb7)](',\x20'))):console['log'](a5_0x457e06['dim'](_0x142c15(0xfa))),0x1;}}if(_0x55ba2d)return this['executeReeval'](_0x52cc63,{'definition':{'tests':_0x43049c},'agentInfo':_0x104008,'outputFormat':_0x4da016,'outputFile':_0x1e7957,'testNames':_0x5aec43});if(_0x3c54b0){console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0xa9)]('Test\x20Configuration:')),console['log'](_0x142c15(0x102)+a5_0x457e06['white'](_0x2e3f90)),console[_0x142c15(0xc1)](_0x142c15(0x124)+a5_0x457e06[_0x142c15(0xd9)](_0x104008[_0x142c15(0xe9)])),console[_0x142c15(0xc1)](_0x142c15(0x9a)+a5_0x457e06[_0x142c15(0xd9)](_0x104008['agentName'])),console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)](_0x142c15(0x12f)+a5_0x457e06[_0x142c15(0xd9)](_0x43049c[_0x142c15(0xf0)]));for(let _0x48fe90=0x0;_0x48fe90<_0x43049c[_0x142c15(0xf0)];_0x48fe90++){const _0x5869a5=_0x43049c[_0x48fe90],_0x564133=_0x5869a5[_0x142c15(0x100)][_0x142c15(0xf0)]===0x1?_0x142c15(0x111):_0x142c15(0x100),_0x15313f=_0x5869a5[_0x142c15(0xdd)]?.[_0x142c15(0xf0)]?'\x20['+_0x5869a5[_0x142c15(0xdd)][_0x142c15(0xb7)](',\x20')+']':'';console[_0x142c15(0xc1)]('\x20\x20'+(_0x48fe90+0x1)+'.\x20'+a5_0x457e06['white'](_0x5869a5['name'])+'\x20('+_0x5869a5[_0x142c15(0x100)][_0x142c15(0xf0)]+'\x20'+_0x564133+')'+a5_0x457e06[_0x142c15(0x10c)](_0x15313f));}return 0x0;}let _0x3ed238,_0x27fb1c;try{_0x3ed238=await _0x55bebc[_0x142c15(0xa6)]['resolveProjectId'](_0x104008[_0x142c15(0xe9)]);}catch(_0x3a9417){const _0x5afd34=_0x3a9417 instanceof Error?_0x3a9417[_0x142c15(0xe4)]:String(_0x3a9417);return _0x5afd34[_0x142c15(0xdc)](_0x142c15(0xb9))||_0x5afd34[_0x142c15(0xc4)]()[_0x142c15(0xdc)](_0x142c15(0x9b))?console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x106)]('✗\x20ERROR:\x20Project\x20not\x20found:\x20'+_0x104008[_0x142c15(0xe9)])):console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0xf1)+_0x104008['projectName']+_0x142c15(0x119)+_0x5afd34)),0x1;}try{_0x27fb1c=await _0x55bebc[_0x142c15(0xa6)][_0x142c15(0x11a)](_0x104008[_0x142c15(0x122)],_0x3ed238);}catch(_0x32087f){const _0x3c4e4a=_0x32087f instanceof Error?_0x32087f[_0x142c15(0xe4)]:String(_0x32087f);return _0x3c4e4a['includes']('404')||_0x3c4e4a['toLowerCase']()[_0x142c15(0xdc)]('not\x20found')?console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0xd1)+_0x104008['agentName'])):console['log'](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0x10e)+_0x104008[_0x142c15(0x122)]+_0x142c15(0x119)+_0x3c4e4a)),0x1;}let _0x39ef43;if(!_0x4ebd8c)try{_0x39ef43=await setupEvaluatorAgent(_0x55bebc[_0x142c15(0xa6)],_0x585633[_0x142c15(0xe2)]);}catch(_0x11d5de){const _0x3a6b3e=_0x11d5de instanceof Error?_0x11d5de['message']:String(_0x11d5de);return console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x106)]('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x3a6b3e)),0x1;}console[_0x142c15(0xc1)](a5_0x457e06['cyan'](_0x142c15(0xa3))),console[_0x142c15(0xc1)](_0x142c15(0x123)+a5_0x457e06['white'](_0x2e3f90)),console['log'](_0x142c15(0xa4)+a5_0x457e06[_0x142c15(0xd9)](_0x104008['projectName']+'/'+_0x104008[_0x142c15(0x122)])),console[_0x142c15(0xc1)]();const _0x9ba13b=[],_0x34f9ac=[],_0x47b0b6=Date[_0x142c15(0x11d)]();for(let _0x4b1d25=0x0;_0x4b1d25<_0x43049c['length'];_0x4b1d25++){const _0x3cc739=_0x43049c[_0x4b1d25];_0x43049c[_0x142c15(0xf0)]>0x1?console[_0x142c15(0xc1)](_0x142c15(0x96)+(_0x4b1d25+0x1)+'/'+_0x43049c[_0x142c15(0xf0)]+':\x20'+a5_0x457e06[_0x142c15(0xd9)](_0x3cc739['name'])):console[_0x142c15(0xc1)](_0x142c15(0xd2)+a5_0x457e06[_0x142c15(0xd9)](_0x3cc739['name']));const _0x5e3995=createCommandSpinner(_0x142c15(0xc8)+_0x3cc739[_0x142c15(0x100)][_0x142c15(0xf0)]+_0x142c15(0x128));_0x5e3995['start']();try{const {result:_0x88a8b8,conversation:_0x174b76}=await runTest(_0x55bebc[_0x142c15(0xa6)],_0x3cc739,{'agentId':_0x27fb1c,'projectId':_0x3ed238,'site':_0x2e3f90,'noEval':_0x4ebd8c,'evaluatorId':_0x39ef43,'onRoundStart':(_0x539fee,_0x53a696)=>{const _0x52f4e5=_0x142c15;_0x5e3995[_0x52f4e5(0x115)]='Round\x20'+(_0x539fee+0x1)+'/'+_0x53a696+_0x52f4e5(0x128);},'onRoundComplete':(_0x515363,_0xf1a096,_0x5c92c8)=>{const _0x26b705=_0x142c15,_0x3768b6=formatElapsed(_0xf1a096);_0x5c92c8?console['log'](_0x26b705(0x105)+(_0x515363+0x1)+'/'+_0x3cc739['rounds'][_0x26b705(0xf0)]+_0x26b705(0xff)+a5_0x457e06[_0x26b705(0xaf)]('✓')+'\x20('+_0x3768b6+')'):console[_0x26b705(0xc1)](_0x26b705(0x105)+(_0x515363+0x1)+'/'+_0x3cc739[_0x26b705(0x100)][_0x26b705(0xf0)]+'...\x20'+a5_0x457e06[_0x26b705(0x106)]('✗'));},'onEvaluationStart':()=>{const _0x3ed81b=_0x142c15;_0x5e3995[_0x3ed81b(0x115)]=_0x3ed81b(0xe7);},'onEvaluationComplete':_0x1fa997=>{const _0x17a0da=_0x142c15,_0x4be4f6=formatElapsed(_0x1fa997);console[_0x17a0da(0xc1)](_0x17a0da(0xf7)+a5_0x457e06[_0x17a0da(0xaf)]('✓')+'\x20('+_0x4be4f6+')');}});_0x5e3995[_0x142c15(0x114)](),_0x9ba13b[_0x142c15(0xf6)](_0x88a8b8),_0x34f9ac[_0x142c15(0xf6)](_0x174b76);if(_0x88a8b8[_0x142c15(0x101)]===_0x142c15(0x103))console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0xaf)](_0x142c15(0xd6)+_0x88a8b8['reason']));else _0x88a8b8[_0x142c15(0x101)]===_0x142c15(0xec)?console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0xe0)+_0x88a8b8[_0x142c15(0xcc)])):console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0x10b)+_0x88a8b8['reason']));_0x88a8b8[_0x142c15(0xaa)]&&console['log'](a5_0x457e06[_0x142c15(0x10c)](_0x142c15(0xf4)+_0x88a8b8['conversation_url'])),console['log']();}catch(_0x9773b9){_0x5e3995[_0x142c15(0x114)]();const _0x2727f6=_0x9773b9 instanceof Error?_0x9773b9[_0x142c15(0xe4)]:String(_0x9773b9);console['log'](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0x10b)+_0x2727f6)),console[_0x142c15(0xc1)](),_0x9ba13b[_0x142c15(0xf6)]({'name':_0x3cc739[_0x142c15(0x129)],'status':_0x142c15(0x127),'reason':_0x2727f6,'timestamp':new Date()[_0x142c15(0xea)](),'duration_ms':0x0});}}const _0x5749db=Date[_0x142c15(0x11d)]()-_0x47b0b6,_0x48e27a=_0x9ba13b[_0x142c15(0x9d)](_0x298ee5=>_0x298ee5[_0x142c15(0x101)]===_0x142c15(0x103))['length'],_0x5ac1e2=_0x9ba13b['filter'](_0x3a61bc=>_0x3a61bc[_0x142c15(0x101)]===_0x142c15(0xec))[_0x142c15(0xf0)],_0x5a57c1=_0x9ba13b[_0x142c15(0x9d)](_0x80e8d3=>_0x80e8d3['status']==='ERROR')['length'];console[_0x142c15(0xc1)]('━'[_0x142c15(0xb4)](0x3c)),console['log'](_0x142c15(0xd3)),console[_0x142c15(0xc1)]('━'[_0x142c15(0xb4)](0x3c)),console[_0x142c15(0xc1)](_0x142c15(0x104)+_0x9ba13b[_0x142c15(0xf0)]),console['log'](_0x142c15(0xe1)+a5_0x457e06[_0x142c15(0xaf)](_0x48e27a)),console[_0x142c15(0xc1)](_0x142c15(0xb2)+a5_0x457e06[_0x142c15(0x106)](_0x5ac1e2));_0x5a57c1>0x0&&console[_0x142c15(0xc1)]('Errors:\x20\x20\x20'+a5_0x457e06[_0x142c15(0x106)](_0x5a57c1));console[_0x142c15(0xc1)](_0x142c15(0xdb)+formatElapsed(_0x5749db)),console[_0x142c15(0xc1)]('━'['repeat'](0x3c));const _0x2ca359=_0x9ba13b['filter'](_0x29d47c=>_0x29d47c[_0x142c15(0x101)]!=='PASS');if(_0x2ca359[_0x142c15(0xf0)]>0x0){console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)](_0x142c15(0xed));for(const _0x392683 of _0x2ca359){const _0x378c82=a5_0x457e06[_0x142c15(0x106)]('✗'),_0x4549a0=_0x392683['reason'][_0x142c15(0xf0)]>0x32?_0x392683[_0x142c15(0xcc)][_0x142c15(0xd5)](0x0,0x32)+'...':_0x392683['reason'];console[_0x142c15(0xc1)]('\x20\x20'+_0x378c82+'\x20'+_0x392683['name']+':\x20'+_0x4549a0);}}const _0x43ef23={'summary':{'total':_0x9ba13b[_0x142c15(0xf0)],'passed':_0x48e27a,'failed':_0x5ac1e2,'errors':_0x5a57c1>0x0?_0x5a57c1:undefined,'duration_ms':_0x5749db},'tests':_0x9ba13b,'agent':{'project':_0x104008[_0x142c15(0xe9)],'name':_0x104008['agentName'],'site':_0x2e3f90},'timestamp':new Date(_0x47b0b6)[_0x142c15(0xea)]()};try{const _0x254077=buildCachedTestRun(_0x34f9ac,{'site':_0x2e3f90,'projectId':_0x3ed238,'projectName':_0x104008['projectName'],'agentId':_0x27fb1c,'agentName':_0x104008[_0x142c15(0x122)],'testYmlPath':a5_0x602c30[_0x142c15(0xeb)](_0x104008[_0x142c15(0x97)])});saveLastTestRun(_0x254077);}catch{}if(_0x4da016!=='table'||_0x1e7957){const _0x5a1d98=formatResults(_0x43ef23,_0x4da016);if(_0x1e7957)try{a5_0x2a0ea7[_0x142c15(0x11b)](_0x1e7957,_0x5a1d98,_0x142c15(0x10d)),console['log'](),console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x10c)](_0x142c15(0x108)+_0x1e7957));}catch(_0x286f98){return console[_0x142c15(0xc1)](),console[_0x142c15(0xc1)](a5_0x457e06[_0x142c15(0x106)](_0x142c15(0x11f)+_0x286f98)),0x1;}else console['log'](),console[_0x142c15(0xc1)](_0x5a1d98);}return _0x2ca359['length']>0x0?0x1:0x0;}async[a5_0x4d9149(0xba)](_0x8c2182,_0x5498c6){const _0x139800=a5_0x4d9149,{options:_0x576f1f,tdx:_0x906091}=_0x8c2182,{definition:_0x334262,agentInfo:_0x26d0bd,outputFormat:_0x2499e7,outputFile:_0x328748}=_0x5498c6,_0x51e921=_0x576f1f['site'],_0x476592=loadLastTestRun();if(!_0x476592)return console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x106)]('Error:\x20No\x20previous\x20test\x20run\x20found.')),console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x10c)]('Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.')),0x1;if(_0x476592[_0x139800(0xc0)][_0x139800(0x122)]!==_0x26d0bd[_0x139800(0x122)])return console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x106)](_0x139800(0xf8)+_0x476592['agent'][_0x139800(0x122)]+_0x139800(0xce)+_0x26d0bd[_0x139800(0x122)]+'\x22.')),console[_0x139800(0xc1)](a5_0x457e06['dim'](_0x139800(0xa0))),0x1;const _0x14cb52=new Set(_0x476592['conversations'][_0x139800(0xb1)](_0x137fe9=>_0x137fe9['testName'])),_0x227169=_0x334262[_0x139800(0xa2)]['filter'](_0x3eaee0=>!_0x14cb52[_0x139800(0x9e)](_0x3eaee0[_0x139800(0x129)]));if(_0x227169[_0x139800(0xf0)]>0x0&&_0x476592[_0x139800(0xbf)]!==_0x51e921)return console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x106)](_0x139800(0xc5))),console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x10c)](_0x139800(0xee)+_0x476592[_0x139800(0xbf)]+_0x139800(0x10a)+_0x51e921+'\x22.')),console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x10c)](_0x139800(0x9f)+_0x476592[_0x139800(0xbf)]+'\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.')),0x1;const _0x4a1b34=_0x334262[_0x139800(0xa2)][_0x139800(0x9d)](_0x2e6679=>_0x14cb52[_0x139800(0x9e)](_0x2e6679[_0x139800(0x129)])),_0x41cea7=_0x227169;let _0x51326a;try{_0x51326a=await setupEvaluatorAgent(_0x906091[_0x139800(0xa6)],_0x576f1f[_0x139800(0xe2)]);}catch(_0x3f18c7){const _0x3d5e48=_0x3f18c7 instanceof Error?_0x3f18c7['message']:String(_0x3f18c7);return console[_0x139800(0xc1)](a5_0x457e06['red']('✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20'+_0x3d5e48)),0x1;}console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0xa9)](_0x139800(0x117))),console[_0x139800(0xc1)](_0x139800(0xcd)+a5_0x457e06[_0x139800(0xd9)](_0x476592['timestamp'])),console['log']('Agent:\x20'+a5_0x457e06[_0x139800(0xd9)](_0x476592[_0x139800(0xc0)][_0x139800(0xe9)]+'/'+_0x476592[_0x139800(0xc0)][_0x139800(0x122)]));_0x41cea7[_0x139800(0xf0)]>0x0&&console[_0x139800(0xc1)](_0x139800(0xf2)+a5_0x457e06[_0x139800(0xd8)](_0x41cea7['length']));console[_0x139800(0xc1)]();const _0x31b207=[],_0x41ef13=Date[_0x139800(0x11d)](),_0x93126b=createCommandSpinner(_0x139800(0xfd));if(_0x4a1b34[_0x139800(0xf0)]>0x0)try{const _0x2099c0=await reevaluateFromCache(_0x906091[_0x139800(0xa6)],_0x476592,{'tests':_0x4a1b34},{'evaluatorId':_0x51326a,'onTestStart':(_0x29493d,_0x47bb10,_0x29fb9f)=>{const _0x2366cc=_0x139800;_0x93126b[_0x2366cc(0x115)]=_0x2366cc(0x125)+(_0x47bb10+0x1)+'/'+_0x29fb9f+':\x20'+_0x29493d+'...';if(!_0x93126b[_0x2366cc(0xf5)])_0x93126b[_0x2366cc(0x98)]();},'onTestComplete':(_0x258507,_0x24de1e)=>{const _0x5e3171=_0x139800;_0x93126b[_0x5e3171(0x114)]();if(_0x24de1e['status']===_0x5e3171(0x103))console[_0x5e3171(0xc1)](a5_0x457e06[_0x5e3171(0xaf)]('✓\x20PASS:\x20'+_0x258507)+a5_0x457e06[_0x5e3171(0x10c)](_0x5e3171(0xa1)));else _0x24de1e[_0x5e3171(0x101)]===_0x5e3171(0xec)?console[_0x5e3171(0xc1)](a5_0x457e06[_0x5e3171(0x106)](_0x5e3171(0xe0)+_0x258507+_0x5e3171(0x113)+_0x24de1e['reason'])+a5_0x457e06[_0x5e3171(0x10c)](_0x5e3171(0xa1))):console[_0x5e3171(0xc1)](a5_0x457e06[_0x5e3171(0x106)](_0x5e3171(0x10b)+_0x258507+_0x5e3171(0x113)+_0x24de1e[_0x5e3171(0xcc)]));_0x24de1e[_0x5e3171(0xaa)]&&console[_0x5e3171(0xc1)](a5_0x457e06[_0x5e3171(0x10c)](_0x5e3171(0x11e)+_0x24de1e[_0x5e3171(0xaa)])),_0x31b207[_0x5e3171(0xf6)](_0x24de1e);},'onTestSkipped':(_0x4230a6,_0x3c09be)=>{const _0x23e63=_0x139800;_0x93126b[_0x23e63(0x114)](),console[_0x23e63(0xc1)](a5_0x457e06[_0x23e63(0xd8)]('⚠\x20SKIPPED:\x20'+_0x4230a6+'\x20-\x20'+_0x3c09be));}});for(const _0x27f02d of _0x2099c0){!_0x31b207[_0x139800(0xbd)](_0x3ea5d4=>_0x3ea5d4['name']===_0x27f02d[_0x139800(0x129)])&&_0x31b207[_0x139800(0xf6)](_0x27f02d);}}catch(_0x7b3710){_0x93126b[_0x139800(0x114)]();const _0xcf9415=_0x7b3710 instanceof Error?_0x7b3710['message']:String(_0x7b3710);return console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x106)](_0x139800(0x12b)+_0xcf9415)),0x1;}_0x93126b[_0x139800(0x114)]();if(_0x41cea7['length']>0x0){console[_0x139800(0xc1)](),console['log'](a5_0x457e06[_0x139800(0xa9)](_0x139800(0xdf)));const {projectId:_0x3d7320,agentId:_0x9ba9b1}=_0x476592[_0x139800(0xc0)];for(const _0x1b4958 of _0x41cea7){console[_0x139800(0xc1)](_0x139800(0x9c)+a5_0x457e06[_0x139800(0xd9)](_0x1b4958['name']));const _0x18d6fa=createCommandSpinner('Round\x201/'+_0x1b4958[_0x139800(0x100)][_0x139800(0xf0)]+_0x139800(0x128));_0x18d6fa[_0x139800(0x98)]();try{const {result:_0x90ab8}=await runTest(_0x906091[_0x139800(0xa6)],_0x1b4958,{'agentId':_0x9ba9b1,'projectId':_0x3d7320,'site':_0x476592[_0x139800(0xbf)],'noEval':![],'evaluatorId':_0x51326a,'onRoundStart':(_0x2adbb0,_0x2ac96f)=>{const _0x267bdf=_0x139800;_0x18d6fa[_0x267bdf(0x115)]=_0x267bdf(0x109)+(_0x2adbb0+0x1)+'/'+_0x2ac96f+':\x20Sending\x20user\x20input...';},'onRoundComplete':(_0x453dd6,_0x47d6c1,_0x50c99e)=>{const _0x5359a4=_0x139800,_0x28b993=formatElapsed(_0x47d6c1);_0x50c99e?console['log'](_0x5359a4(0x105)+(_0x453dd6+0x1)+'/'+_0x1b4958[_0x5359a4(0x100)][_0x5359a4(0xf0)]+_0x5359a4(0xff)+a5_0x457e06[_0x5359a4(0xaf)]('✓')+'\x20('+_0x28b993+')'):console['log'](_0x5359a4(0x105)+(_0x453dd6+0x1)+'/'+_0x1b4958[_0x5359a4(0x100)][_0x5359a4(0xf0)]+'...\x20'+a5_0x457e06[_0x5359a4(0x106)]('✗'));},'onEvaluationStart':()=>{const _0x30647b=_0x139800;_0x18d6fa['text']=_0x30647b(0xe7);},'onEvaluationComplete':_0x2f9b48=>{const _0xdfc9b3=_0x139800,_0x1d470a=formatElapsed(_0x2f9b48);console[_0xdfc9b3(0xc1)](_0xdfc9b3(0xf7)+a5_0x457e06['green']('✓')+'\x20('+_0x1d470a+')');}});_0x18d6fa[_0x139800(0x114)](),_0x31b207[_0x139800(0xf6)](_0x90ab8);if(_0x90ab8[_0x139800(0x101)]===_0x139800(0x103))console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0xaf)]('✓\x20PASS:\x20'+_0x90ab8[_0x139800(0xcc)])+a5_0x457e06[_0x139800(0x10c)](_0x139800(0xa7)));else _0x90ab8[_0x139800(0x101)]===_0x139800(0xec)?console['log'](a5_0x457e06['red'](_0x139800(0xe0)+_0x90ab8['reason'])+a5_0x457e06[_0x139800(0x10c)](_0x139800(0xa7))):console[_0x139800(0xc1)](a5_0x457e06['red'](_0x139800(0x10b)+_0x90ab8[_0x139800(0xcc)]));_0x90ab8['conversation_url']&&console['log'](a5_0x457e06[_0x139800(0x10c)]('\x20\x20Conversation:\x20'+_0x90ab8[_0x139800(0xaa)]));}catch(_0x5e78cf){_0x18d6fa[_0x139800(0x114)]();const _0x1679f3=_0x5e78cf instanceof Error?_0x5e78cf[_0x139800(0xe4)]:String(_0x5e78cf);console[_0x139800(0xc1)](a5_0x457e06['red'](_0x139800(0x10b)+_0x1679f3)),_0x31b207[_0x139800(0xf6)]({'name':_0x1b4958[_0x139800(0x129)],'status':_0x139800(0x127),'reason':_0x1679f3,'timestamp':new Date()[_0x139800(0xea)](),'duration_ms':0x0});}}}console[_0x139800(0xc1)]();const _0x8b8711=Date[_0x139800(0x11d)]()-_0x41ef13,_0x4732ca=_0x31b207['filter'](_0x45c841=>_0x45c841['status']==='PASS')[_0x139800(0xf0)],_0x5aeed8=_0x31b207[_0x139800(0x9d)](_0x3305a9=>_0x3305a9[_0x139800(0x101)]==='FAIL')[_0x139800(0xf0)],_0xa53951=_0x31b207[_0x139800(0x9d)](_0x449040=>_0x449040['status']===_0x139800(0x127))[_0x139800(0xf0)];console['log']('━'[_0x139800(0xb4)](0x3c)),console[_0x139800(0xc1)](_0x139800(0xc3)),console[_0x139800(0xc1)]('━'[_0x139800(0xb4)](0x3c)),console['log'](_0x139800(0x104)+_0x31b207['length']),console[_0x139800(0xc1)](_0x139800(0xe1)+a5_0x457e06[_0x139800(0xaf)](_0x4732ca)),console[_0x139800(0xc1)](_0x139800(0xb2)+a5_0x457e06[_0x139800(0x106)](_0x5aeed8));_0xa53951>0x0&&console[_0x139800(0xc1)](_0x139800(0xef)+a5_0x457e06[_0x139800(0x106)](_0xa53951));console[_0x139800(0xc1)](_0x139800(0xdb)+formatElapsed(_0x8b8711)),console[_0x139800(0xc1)]('━'[_0x139800(0xb4)](0x3c));const _0x137de1={'summary':{'total':_0x31b207[_0x139800(0xf0)],'passed':_0x4732ca,'failed':_0x5aeed8,'errors':_0xa53951>0x0?_0xa53951:undefined,'duration_ms':_0x8b8711},'tests':_0x31b207,'agent':{'project':_0x26d0bd[_0x139800(0xe9)],'name':_0x26d0bd[_0x139800(0x122)],'site':_0x51e921},'timestamp':new Date(_0x41ef13)[_0x139800(0xea)]()};if(_0x2499e7!==_0x139800(0xc7)||_0x328748){const _0x415e24=formatResults(_0x137de1,_0x2499e7);if(_0x328748)try{a5_0x2a0ea7[_0x139800(0x11b)](_0x328748,_0x415e24,_0x139800(0x10d)),console[_0x139800(0xc1)](),console[_0x139800(0xc1)](a5_0x457e06[_0x139800(0x10c)](_0x139800(0x108)+_0x328748));}catch(_0x20cb10){return console[_0x139800(0xc1)](),console['log'](a5_0x457e06[_0x139800(0x106)]('Error\x20writing\x20output\x20file:\x20'+_0x20cb10)),0x1;}else console[_0x139800(0xc1)](),console[_0x139800(0xc1)](_0x415e24);}const _0xf4adac=_0x31b207[_0x139800(0x9d)](_0x36c54e=>_0x36c54e[_0x139800(0x101)]!==_0x139800(0x103));return _0xf4adac['length']>0x0?0x1:0x0;}}
|
|
1
|
+
const a5_0x31f577=a5_0x1da7;(function(_0x518d2a,_0x54269f){const _0x3e2674=a5_0x1da7,_0x2565ce=_0x518d2a();while(!![]){try{const _0x5cd317=-parseInt(_0x3e2674(0x146))/0x1*(-parseInt(_0x3e2674(0x13d))/0x2)+-parseInt(_0x3e2674(0x1ba))/0x3+-parseInt(_0x3e2674(0x18f))/0x4*(-parseInt(_0x3e2674(0x169))/0x5)+-parseInt(_0x3e2674(0x18a))/0x6*(-parseInt(_0x3e2674(0x14b))/0x7)+parseInt(_0x3e2674(0x142))/0x8*(parseInt(_0x3e2674(0x1ab))/0x9)+parseInt(_0x3e2674(0x159))/0xa*(-parseInt(_0x3e2674(0x1b6))/0xb)+-parseInt(_0x3e2674(0x186))/0xc*(parseInt(_0x3e2674(0x148))/0xd);if(_0x5cd317===_0x54269f)break;else _0x2565ce['push'](_0x2565ce['shift']());}catch(_0x5eeab1){_0x2565ce['push'](_0x2565ce['shift']());}}}(a5_0x48b9,0x1dc6c));import*as a5_0x14274d from'node:fs';import*as a5_0x3196a1 from'node:path';import a5_0x1a22a7 from'chalk';import{BaseCommand}from'./command.js';import{parseTestFile,runTest,formatResults,setupEvaluatorAgent,loadLastTestRun,saveLastTestRun,buildCachedTestRun,reevaluateFromCache}from'../sdk/agent/test/index.js';import{resolveProjectFromContext}from'../sdk/agent/agent-config.js';import{createCommandSpinner,formatElapsed}from'../utils/spinner.js';function a5_0x1da7(_0x505abe,_0xc386c8){_0x505abe=_0x505abe-0x11c;const _0x48b978=a5_0x48b9();let _0x1da707=_0x48b978[_0x505abe];return _0x1da707;}export class AgentTestCommand extends BaseCommand{[a5_0x31f577(0x145)]='agent:test';['description']=a5_0x31f577(0x19b);async[a5_0x31f577(0x17b)](_0x515a03){const _0x4db6b0=a5_0x31f577,{options:_0x3b8db4,args:_0x787eb8,tdx:_0x118b62}=_0x515a03,_0x3c3dae=_0x787eb8[0x0]||'.',_0x4a1e71=_0x3b8db4['dryRun'],_0x28e841=_0x3b8db4,_0x40bfc0=_0x28e841[_0x4db6b0(0x189)]===![],_0x4fd5d6=_0x28e841[_0x4db6b0(0x163)],_0x319dc0=_0x28e841[_0x4db6b0(0x145)],_0x3774eb=_0x28e841[_0x4db6b0(0x14c)],_0x1fd3a5=_0x3b8db4[_0x4db6b0(0x14d)],_0x47f7f8=_0x28e841['output'];if(_0x4fd5d6&&_0x40bfc0)return console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x129))),0x1;let _0x5a3f3c=_0x4db6b0(0x151);if(_0x28e841['json'])_0x5a3f3c=_0x4db6b0(0x193);else{if(_0x28e841[_0x4db6b0(0x187)])_0x5a3f3c=_0x4db6b0(0x187);else{if(_0x28e841[_0x4db6b0(0x149)])_0x5a3f3c=_0x4db6b0(0x149);else{if(_0x28e841[_0x4db6b0(0x151)])_0x5a3f3c=_0x4db6b0(0x151);}}}const _0x254115=_0x28e841[_0x4db6b0(0x120)];let _0xb5375a=_0x3c3dae;const _0xeb812f=a5_0x14274d[_0x4db6b0(0x15d)](_0x3c3dae),_0x5e3eeb=_0x3c3dae==='.';if(!_0xeb812f||_0x5e3eeb){const _0xc589d8=resolveProjectFromContext(_0x3c3dae,_0x254115,{'requireFile':'test.yml'});if(_0xc589d8[_0x4db6b0(0x162)])_0xb5375a=_0xc589d8[_0x4db6b0(0x176)],_0xc589d8[_0x4db6b0(0x14a)]==='context'&&console['log'](a5_0x1a22a7[_0x4db6b0(0x14e)](_0x4db6b0(0x175)+_0xb5375a));else switch(_0xc589d8['reason']){case'no_context':console['log'](a5_0x1a22a7['yellow'](_0xc589d8[_0x4db6b0(0x1b4)])),console['log'](),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x12d)),console['log'](_0x4db6b0(0x19e)),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x17f)),console[_0x4db6b0(0x1a8)](),console['log'](_0x4db6b0(0x1ac));return 0x1;case'no_local_folder':console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x14f)](_0xc589d8['message'])),console[_0x4db6b0(0x1a8)](),console['log'](_0x4db6b0(0x17a)+_0xc589d8[_0x4db6b0(0x120)]+_0x4db6b0(0x160));return 0x1;case _0x4db6b0(0x1aa):{const _0x389d48=a5_0x3196a1['basename'](_0xc589d8['projectDir']);console['log'](a5_0x1a22a7[_0x4db6b0(0x14f)](_0x4db6b0(0x11e)+_0xc589d8[_0x4db6b0(0x120)]+'\x22:'));for(const _0x5831d8 of _0xc589d8[_0x4db6b0(0x1b9)]){console[_0x4db6b0(0x1a8)](_0x4db6b0(0x15e)+_0x5831d8);}return console['log'](),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x181)+_0x389d48+_0x4db6b0(0x126)),0x1;}case _0x4db6b0(0x1b8):console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x14f)](_0x4db6b0(0x121)+_0xc589d8['llmProject']+'\x22.')),console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x14e)](_0x4db6b0(0x192)+_0xc589d8[_0x4db6b0(0x176)])),console[_0x4db6b0(0x1a8)](),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x196));return 0x1;}}const {definition:_0x194e0f,agentInfo:_0xa77617}=parseTestFile(_0xb5375a);let _0x33819e=_0x194e0f[_0x4db6b0(0x141)];if(_0x319dc0){const _0x3f4e26=_0x319dc0[_0x4db6b0(0x133)](',')[_0x4db6b0(0x184)](_0x121e4c=>_0x121e4c[_0x4db6b0(0x185)]());_0x33819e=_0x194e0f[_0x4db6b0(0x141)][_0x4db6b0(0x131)](_0x97f646=>_0x3f4e26[_0x4db6b0(0x123)](_0x97f646[_0x4db6b0(0x145)]));if(_0x33819e['length']===0x0)return console[_0x4db6b0(0x1a8)](a5_0x1a22a7['yellow'](_0x4db6b0(0x132)+_0x319dc0)),console['log'](a5_0x1a22a7[_0x4db6b0(0x14e)](_0x4db6b0(0x180)+_0x194e0f['tests'][_0x4db6b0(0x184)](_0x3371b6=>_0x3371b6[_0x4db6b0(0x145)])[_0x4db6b0(0x18b)](',\x20'))),0x1;}if(_0x3774eb){const _0x64c230=_0x3774eb[_0x4db6b0(0x133)](',')['map'](_0x4cf3e5=>_0x4cf3e5[_0x4db6b0(0x185)]()['toLowerCase']());_0x33819e=_0x33819e[_0x4db6b0(0x131)](_0x50aef7=>_0x50aef7[_0x4db6b0(0x14c)]?.[_0x4db6b0(0x166)](_0x4232f4=>_0x64c230[_0x4db6b0(0x123)](_0x4232f4[_0x4db6b0(0x19d)]())));if(_0x33819e[_0x4db6b0(0x137)]===0x0){console['log'](a5_0x1a22a7['yellow'](_0x4db6b0(0x1a3)+_0x3774eb));const _0x51fd1b=new Set();return _0x194e0f[_0x4db6b0(0x141)][_0x4db6b0(0x155)](_0x264e87=>_0x264e87[_0x4db6b0(0x14c)]?.[_0x4db6b0(0x155)](_0x45ebd7=>_0x51fd1b[_0x4db6b0(0x16e)](_0x45ebd7))),_0x51fd1b[_0x4db6b0(0x190)]>0x0?console['log'](a5_0x1a22a7[_0x4db6b0(0x14e)](_0x4db6b0(0x1a4)+[..._0x51fd1b][_0x4db6b0(0x18b)](',\x20'))):console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x14e)](_0x4db6b0(0x13e))),0x1;}}if(_0x4fd5d6)return this[_0x4db6b0(0x198)](_0x515a03,{'definition':{'tests':_0x33819e},'agentInfo':_0xa77617,'outputFormat':_0x5a3f3c,'outputFile':_0x47f7f8,'testNames':_0x319dc0});if(_0x4a1e71){console[_0x4db6b0(0x1a8)](a5_0x1a22a7['cyan']('Test\x20Configuration:')),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x128)+a5_0x1a22a7['white'](_0x1fd3a5)),console[_0x4db6b0(0x1a8)]('\x20\x20Project:\x20'+a5_0x1a22a7[_0x4db6b0(0x152)](_0xa77617[_0x4db6b0(0x1b5)])),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x182)+a5_0x1a22a7[_0x4db6b0(0x152)](_0xa77617['agentName'])),console[_0x4db6b0(0x1a8)](),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x154)+a5_0x1a22a7[_0x4db6b0(0x152)](_0x33819e[_0x4db6b0(0x137)]));for(let _0x20d914=0x0;_0x20d914<_0x33819e[_0x4db6b0(0x137)];_0x20d914++){const _0x34c01e=_0x33819e[_0x20d914],_0x3f1708=_0x34c01e['rounds'][_0x4db6b0(0x137)]===0x1?_0x4db6b0(0x135):_0x4db6b0(0x13a),_0x55293e=_0x34c01e[_0x4db6b0(0x14c)]?.[_0x4db6b0(0x137)]?'\x20['+_0x34c01e[_0x4db6b0(0x14c)][_0x4db6b0(0x18b)](',\x20')+']':'';console[_0x4db6b0(0x1a8)]('\x20\x20'+(_0x20d914+0x1)+'.\x20'+a5_0x1a22a7['white'](_0x34c01e[_0x4db6b0(0x145)])+'\x20('+_0x34c01e['rounds'][_0x4db6b0(0x137)]+'\x20'+_0x3f1708+')'+a5_0x1a22a7[_0x4db6b0(0x14e)](_0x55293e));}return 0x0;}let _0x123a09,_0x27eb54;try{_0x123a09=await _0x118b62['llm']['resolveProjectId'](_0xa77617[_0x4db6b0(0x1b5)]);}catch(_0x394c18){const _0x3dae00=_0x394c18 instanceof Error?_0x394c18[_0x4db6b0(0x1b4)]:String(_0x394c18);return _0x3dae00[_0x4db6b0(0x123)]('404')||_0x3dae00[_0x4db6b0(0x19d)]()['includes'](_0x4db6b0(0x1ad))?console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x18d)+_0xa77617[_0x4db6b0(0x1b5)])):console['log'](a5_0x1a22a7['red'](_0x4db6b0(0x15f)+_0xa77617[_0x4db6b0(0x1b5)]+_0x4db6b0(0x157)+_0x3dae00)),0x1;}try{_0x27eb54=await _0x118b62['llm'][_0x4db6b0(0x12f)](_0xa77617[_0x4db6b0(0x17d)],_0x123a09);}catch(_0x5e93be){const _0x49d4b4=_0x5e93be instanceof Error?_0x5e93be['message']:String(_0x5e93be);return _0x49d4b4[_0x4db6b0(0x123)](_0x4db6b0(0x1bc))||_0x49d4b4[_0x4db6b0(0x19d)]()[_0x4db6b0(0x123)](_0x4db6b0(0x1ad))?console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x168)+_0xa77617[_0x4db6b0(0x17d)])):console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x197)+_0xa77617[_0x4db6b0(0x17d)]+'\x22:\x20'+_0x49d4b4)),0x1;}let _0x111914;if(!_0x40bfc0)try{_0x111914=await setupEvaluatorAgent(_0x118b62[_0x4db6b0(0x1af)],_0x3b8db4[_0x4db6b0(0x11f)]);}catch(_0x47d5e1){const _0x57adc2=_0x47d5e1 instanceof Error?_0x47d5e1[_0x4db6b0(0x1b4)]:String(_0x47d5e1);return console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x1a5)+_0x57adc2)),0x1;}console['log'](a5_0x1a22a7['cyan'](_0x4db6b0(0x1a1))),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x18e)+a5_0x1a22a7[_0x4db6b0(0x152)](_0x1fd3a5)),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x16c)+a5_0x1a22a7[_0x4db6b0(0x152)](_0xa77617[_0x4db6b0(0x1b5)]+'/'+_0xa77617[_0x4db6b0(0x17d)])),console[_0x4db6b0(0x1a8)]();const _0x3efa8c=[],_0x568eb8=[],_0x102f8d=Date['now']();for(let _0x407d59=0x0;_0x407d59<_0x33819e[_0x4db6b0(0x137)];_0x407d59++){const _0x30fe06=_0x33819e[_0x407d59];_0x33819e[_0x4db6b0(0x137)]>0x1?console['log'](_0x4db6b0(0x194)+(_0x407d59+0x1)+'/'+_0x33819e['length']+':\x20'+a5_0x1a22a7[_0x4db6b0(0x152)](_0x30fe06['name'])):console[_0x4db6b0(0x1a8)](_0x4db6b0(0x172)+a5_0x1a22a7[_0x4db6b0(0x152)](_0x30fe06['name']));const _0x406e37=createCommandSpinner(_0x4db6b0(0x1bb)+_0x30fe06[_0x4db6b0(0x13a)]['length']+_0x4db6b0(0x140));_0x406e37[_0x4db6b0(0x179)]();try{const {result:_0x2c2d99,conversation:_0x5978d7}=await runTest(_0x118b62['llm'],_0x30fe06,{'agentId':_0x27eb54,'projectId':_0x123a09,'site':_0x1fd3a5,'noEval':_0x40bfc0,'evaluatorId':_0x111914,'onRoundStart':(_0x9e5ff,_0x2a436c)=>{const _0x2460f2=_0x4db6b0;_0x406e37[_0x2460f2(0x191)]='Round\x20'+(_0x9e5ff+0x1)+'/'+_0x2a436c+_0x2460f2(0x140);},'onRoundComplete':(_0x8636e9,_0x5588e3,_0x26a157)=>{const _0x200f90=_0x4db6b0,_0x3ebb31=formatElapsed(_0x5588e3);_0x26a157?console['log'](_0x200f90(0x1b3)+(_0x8636e9+0x1)+'/'+_0x30fe06[_0x200f90(0x13a)][_0x200f90(0x137)]+'...\x20'+a5_0x1a22a7[_0x200f90(0x12e)]('✓')+'\x20('+_0x3ebb31+')'):console['log'](_0x200f90(0x1b3)+(_0x8636e9+0x1)+'/'+_0x30fe06[_0x200f90(0x13a)][_0x200f90(0x137)]+_0x200f90(0x153)+a5_0x1a22a7[_0x200f90(0x17c)]('✗'));},'onEvaluationStart':()=>{const _0x36b1c2=_0x4db6b0;_0x406e37[_0x36b1c2(0x191)]=_0x36b1c2(0x16a);},'onEvaluationComplete':_0x28d276=>{const _0x3e7555=_0x4db6b0,_0x4fc1d7=formatElapsed(_0x28d276);console[_0x3e7555(0x1a8)](_0x3e7555(0x183)+a5_0x1a22a7[_0x3e7555(0x12e)]('✓')+'\x20('+_0x4fc1d7+')');}});_0x406e37[_0x4db6b0(0x125)](),_0x3efa8c[_0x4db6b0(0x164)](_0x2c2d99),_0x568eb8[_0x4db6b0(0x164)](_0x5978d7);if(_0x2c2d99['status']===_0x4db6b0(0x1b1))console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x12e)]('✓\x20PASS:\x20'+_0x2c2d99[_0x4db6b0(0x11c)]));else _0x2c2d99[_0x4db6b0(0x15c)]==='FAIL'?console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x15b)+_0x2c2d99[_0x4db6b0(0x11c)])):console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x178)+_0x2c2d99['reason']));_0x2c2d99[_0x4db6b0(0x122)]&&console[_0x4db6b0(0x1a8)](a5_0x1a22a7['dim'](_0x4db6b0(0x1a2)+_0x2c2d99['conversation_url'])),console['log']();}catch(_0x51cd20){_0x406e37['stop']();const _0x1cb6fe=_0x51cd20 instanceof Error?_0x51cd20[_0x4db6b0(0x1b4)]:String(_0x51cd20);console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x178)+_0x1cb6fe)),console[_0x4db6b0(0x1a8)](),_0x3efa8c[_0x4db6b0(0x164)]({'name':_0x30fe06[_0x4db6b0(0x145)],'status':'ERROR','reason':_0x1cb6fe,'timestamp':new Date()[_0x4db6b0(0x12b)](),'duration_ms':0x0});}}const _0x19d8df=Date['now']()-_0x102f8d,_0x5f1206=_0x3efa8c[_0x4db6b0(0x131)](_0x14c7fd=>_0x14c7fd[_0x4db6b0(0x15c)]===_0x4db6b0(0x1b1))[_0x4db6b0(0x137)],_0x45d544=_0x3efa8c[_0x4db6b0(0x131)](_0x4e9321=>_0x4e9321['status']==='FAIL')[_0x4db6b0(0x137)],_0x38e8d1=_0x3efa8c['filter'](_0x3ee54c=>_0x3ee54c[_0x4db6b0(0x15c)]===_0x4db6b0(0x161))[_0x4db6b0(0x137)];console[_0x4db6b0(0x1a8)]('━'[_0x4db6b0(0x150)](0x3c)),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x1b7)),console[_0x4db6b0(0x1a8)]('━'[_0x4db6b0(0x150)](0x3c)),console[_0x4db6b0(0x1a8)]('Total:\x20\x20\x20\x20'+_0x3efa8c[_0x4db6b0(0x137)]),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x13f)+a5_0x1a22a7['green'](_0x5f1206)),console[_0x4db6b0(0x1a8)](_0x4db6b0(0x1a9)+a5_0x1a22a7['red'](_0x45d544));_0x38e8d1>0x0&&console[_0x4db6b0(0x1a8)](_0x4db6b0(0x199)+a5_0x1a22a7[_0x4db6b0(0x17c)](_0x38e8d1));console[_0x4db6b0(0x1a8)](_0x4db6b0(0x1b0)+formatElapsed(_0x19d8df)),console[_0x4db6b0(0x1a8)]('━'[_0x4db6b0(0x150)](0x3c));const _0x375c1e=_0x3efa8c[_0x4db6b0(0x131)](_0xfc5866=>_0xfc5866[_0x4db6b0(0x15c)]!==_0x4db6b0(0x1b1));if(_0x375c1e['length']>0x0){console[_0x4db6b0(0x1a8)](),console[_0x4db6b0(0x1a8)]('Failed\x20Tests:');for(const _0x4bc1a0 of _0x375c1e){const _0x1003f7=a5_0x1a22a7[_0x4db6b0(0x17c)]('✗'),_0x144827=_0x4bc1a0['reason'][_0x4db6b0(0x137)]>0x32?_0x4bc1a0[_0x4db6b0(0x11c)]['substring'](0x0,0x32)+_0x4db6b0(0x19c):_0x4bc1a0[_0x4db6b0(0x11c)];console['log']('\x20\x20'+_0x1003f7+'\x20'+_0x4bc1a0[_0x4db6b0(0x145)]+':\x20'+_0x144827);}}const _0xea1e29={'summary':{'total':_0x3efa8c[_0x4db6b0(0x137)],'passed':_0x5f1206,'failed':_0x45d544,'errors':_0x38e8d1>0x0?_0x38e8d1:undefined,'duration_ms':_0x19d8df},'tests':_0x3efa8c,'agent':{'project':_0xa77617['projectName'],'name':_0xa77617[_0x4db6b0(0x17d)],'site':_0x1fd3a5},'timestamp':new Date(_0x102f8d)[_0x4db6b0(0x12b)]()};try{const _0x145897=buildCachedTestRun(_0x568eb8,{'site':_0x1fd3a5,'projectId':_0x123a09,'projectName':_0xa77617[_0x4db6b0(0x1b5)],'agentId':_0x27eb54,'agentName':_0xa77617[_0x4db6b0(0x17d)],'testYmlPath':a5_0x3196a1[_0x4db6b0(0x170)](_0xa77617[_0x4db6b0(0x167)])});saveLastTestRun(_0x145897);}catch{}if(_0x5a3f3c!==_0x4db6b0(0x151)||_0x47f7f8){const _0x18ed51=formatResults(_0xea1e29,_0x5a3f3c);if(_0x47f7f8)try{a5_0x14274d[_0x4db6b0(0x174)](_0x47f7f8,_0x18ed51,_0x4db6b0(0x16d)),console['log'](),console['log'](a5_0x1a22a7['dim'](_0x4db6b0(0x1b2)+_0x47f7f8));}catch(_0x572aa2){return console[_0x4db6b0(0x1a8)](),console[_0x4db6b0(0x1a8)](a5_0x1a22a7[_0x4db6b0(0x17c)](_0x4db6b0(0x19a)+_0x572aa2)),0x1;}else console[_0x4db6b0(0x1a8)](),console['log'](_0x18ed51);}return _0x375c1e[_0x4db6b0(0x137)]>0x0?0x1:0x0;}async[a5_0x31f577(0x198)](_0x31de02,_0x5e3a7e){const _0x2f0ff0=a5_0x31f577,{options:_0x29e425,tdx:_0x43fec3}=_0x31de02,{definition:_0x3d6e55,agentInfo:_0x442293,outputFormat:_0x8ad558,outputFile:_0x2d3971}=_0x5e3a7e,_0x116f97=_0x29e425['site'],_0x5b0a2a=loadLastTestRun();if(!_0x5b0a2a)return console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x17c)](_0x2f0ff0(0x19f))),console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x14e)](_0x2f0ff0(0x18c))),0x1;if(_0x5b0a2a['agent']['agentName']!==_0x442293[_0x2f0ff0(0x17d)])return console['log'](a5_0x1a22a7[_0x2f0ff0(0x17c)]('Error:\x20Cached\x20run\x20is\x20for\x20agent\x20\x22'+_0x5b0a2a[_0x2f0ff0(0x134)][_0x2f0ff0(0x17d)]+_0x2f0ff0(0x130)+_0x442293[_0x2f0ff0(0x17d)]+'\x22.')),console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x14e)](_0x2f0ff0(0x195))),0x1;const _0x3a6199=new Set(_0x5b0a2a[_0x2f0ff0(0x16f)][_0x2f0ff0(0x184)](_0x495f0b=>_0x495f0b[_0x2f0ff0(0x138)])),_0x55c182=_0x3d6e55[_0x2f0ff0(0x141)][_0x2f0ff0(0x131)](_0x353e00=>!_0x3a6199[_0x2f0ff0(0x12c)](_0x353e00[_0x2f0ff0(0x145)]));if(_0x55c182[_0x2f0ff0(0x137)]>0x0&&_0x5b0a2a['site']!==_0x116f97)return console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x17c)](_0x2f0ff0(0x136))),console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x14e)](_0x2f0ff0(0x1a7)+_0x5b0a2a[_0x2f0ff0(0x14d)]+'\x22,\x20but\x20current\x20site\x20is\x20\x22'+_0x116f97+'\x22.')),console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x14e)](_0x2f0ff0(0x11d)+_0x5b0a2a[_0x2f0ff0(0x14d)]+_0x2f0ff0(0x15a))),0x1;const _0x35c14f=_0x3d6e55[_0x2f0ff0(0x141)][_0x2f0ff0(0x131)](_0xe84d24=>_0x3a6199[_0x2f0ff0(0x12c)](_0xe84d24[_0x2f0ff0(0x145)])),_0x176bb1=_0x55c182;let _0x269d89;try{_0x269d89=await setupEvaluatorAgent(_0x43fec3[_0x2f0ff0(0x1af)],_0x29e425['verbose']);}catch(_0x26a5c1){const _0x4ac923=_0x26a5c1 instanceof Error?_0x26a5c1[_0x2f0ff0(0x1b4)]:String(_0x26a5c1);return console['log'](a5_0x1a22a7[_0x2f0ff0(0x17c)](_0x2f0ff0(0x1a5)+_0x4ac923)),0x1;}console[_0x2f0ff0(0x1a8)](a5_0x1a22a7['cyan'](_0x2f0ff0(0x147))),console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x16b)+a5_0x1a22a7['white'](_0x5b0a2a['timestamp'])),console[_0x2f0ff0(0x1a8)]('Agent:\x20'+a5_0x1a22a7[_0x2f0ff0(0x152)](_0x5b0a2a['agent'][_0x2f0ff0(0x1b5)]+'/'+_0x5b0a2a[_0x2f0ff0(0x134)][_0x2f0ff0(0x17d)]));_0x176bb1[_0x2f0ff0(0x137)]>0x0&&console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x1a0)+a5_0x1a22a7[_0x2f0ff0(0x14f)](_0x176bb1[_0x2f0ff0(0x137)]));console['log']();const _0x2012ab=[],_0x44ca7f=Date[_0x2f0ff0(0x127)](),_0x21ac28=createCommandSpinner(_0x2f0ff0(0x124));if(_0x35c14f[_0x2f0ff0(0x137)]>0x0)try{const _0x627a52=await reevaluateFromCache(_0x43fec3[_0x2f0ff0(0x1af)],_0x5b0a2a,{'tests':_0x35c14f},{'evaluatorId':_0x269d89,'onTestStart':(_0x1843a4,_0x59b888,_0x7aa4e4)=>{const _0x281b56=_0x2f0ff0;_0x21ac28['text']=_0x281b56(0x1a6)+(_0x59b888+0x1)+'/'+_0x7aa4e4+':\x20'+_0x1843a4+'...';if(!_0x21ac28[_0x281b56(0x17e)])_0x21ac28[_0x281b56(0x179)]();},'onTestComplete':(_0x4f457a,_0x2b4071)=>{const _0x4cc11f=_0x2f0ff0;_0x21ac28[_0x4cc11f(0x125)]();if(_0x2b4071[_0x4cc11f(0x15c)]==='PASS')console[_0x4cc11f(0x1a8)](a5_0x1a22a7[_0x4cc11f(0x12e)](_0x4cc11f(0x143)+_0x4f457a)+a5_0x1a22a7[_0x4cc11f(0x14e)](_0x4cc11f(0x173)));else _0x2b4071[_0x4cc11f(0x15c)]===_0x4cc11f(0x1ae)?console[_0x4cc11f(0x1a8)](a5_0x1a22a7[_0x4cc11f(0x17c)](_0x4cc11f(0x15b)+_0x4f457a+_0x4cc11f(0x156)+_0x2b4071[_0x4cc11f(0x11c)])+a5_0x1a22a7[_0x4cc11f(0x14e)](_0x4cc11f(0x173))):console[_0x4cc11f(0x1a8)](a5_0x1a22a7[_0x4cc11f(0x17c)](_0x4cc11f(0x178)+_0x4f457a+_0x4cc11f(0x156)+_0x2b4071[_0x4cc11f(0x11c)]));_0x2b4071[_0x4cc11f(0x122)]&&console[_0x4cc11f(0x1a8)](a5_0x1a22a7[_0x4cc11f(0x14e)](_0x4cc11f(0x165)+_0x2b4071[_0x4cc11f(0x122)])),_0x2012ab[_0x4cc11f(0x164)](_0x2b4071);},'onTestSkipped':(_0x1bf500,_0x3348c8)=>{const _0x4ca682=_0x2f0ff0;_0x21ac28[_0x4ca682(0x125)](),console[_0x4ca682(0x1a8)](a5_0x1a22a7[_0x4ca682(0x14f)]('⚠\x20SKIPPED:\x20'+_0x1bf500+'\x20-\x20'+_0x3348c8));}});for(const _0x30b459 of _0x627a52){!_0x2012ab[_0x2f0ff0(0x13b)](_0x3b86e4=>_0x3b86e4[_0x2f0ff0(0x145)]===_0x30b459[_0x2f0ff0(0x145)])&&_0x2012ab[_0x2f0ff0(0x164)](_0x30b459);}}catch(_0x8a3726){_0x21ac28[_0x2f0ff0(0x125)]();const _0x29f929=_0x8a3726 instanceof Error?_0x8a3726['message']:String(_0x8a3726);return console[_0x2f0ff0(0x1a8)](a5_0x1a22a7['red'](_0x2f0ff0(0x139)+_0x29f929)),0x1;}_0x21ac28[_0x2f0ff0(0x125)]();if(_0x176bb1['length']>0x0){console[_0x2f0ff0(0x1a8)](),console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x12a)](_0x2f0ff0(0x144)));const {projectId:_0x4f580b,agentId:_0x5a145a}=_0x5b0a2a['agent'];for(const _0x485ff6 of _0x176bb1){console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x158)+a5_0x1a22a7['white'](_0x485ff6[_0x2f0ff0(0x145)]));const _0x4ea004=createCommandSpinner(_0x2f0ff0(0x1bb)+_0x485ff6[_0x2f0ff0(0x13a)][_0x2f0ff0(0x137)]+_0x2f0ff0(0x140));_0x4ea004[_0x2f0ff0(0x179)]();try{const {result:_0x2759de}=await runTest(_0x43fec3['llm'],_0x485ff6,{'agentId':_0x5a145a,'projectId':_0x4f580b,'site':_0x5b0a2a[_0x2f0ff0(0x14d)],'noEval':![],'evaluatorId':_0x269d89,'onRoundStart':(_0x1513e2,_0x120eb7)=>{const _0x4843f9=_0x2f0ff0;_0x4ea004[_0x4843f9(0x191)]=_0x4843f9(0x188)+(_0x1513e2+0x1)+'/'+_0x120eb7+_0x4843f9(0x140);},'onRoundComplete':(_0x35f615,_0x1d3e8c,_0x10654c)=>{const _0x500d3c=_0x2f0ff0,_0x52b497=formatElapsed(_0x1d3e8c);_0x10654c?console[_0x500d3c(0x1a8)](_0x500d3c(0x1b3)+(_0x35f615+0x1)+'/'+_0x485ff6[_0x500d3c(0x13a)][_0x500d3c(0x137)]+_0x500d3c(0x153)+a5_0x1a22a7[_0x500d3c(0x12e)]('✓')+'\x20('+_0x52b497+')'):console['log'](_0x500d3c(0x1b3)+(_0x35f615+0x1)+'/'+_0x485ff6[_0x500d3c(0x13a)][_0x500d3c(0x137)]+_0x500d3c(0x153)+a5_0x1a22a7[_0x500d3c(0x17c)]('✗'));},'onEvaluationStart':()=>{const _0x5b7af5=_0x2f0ff0;_0x4ea004['text']=_0x5b7af5(0x16a);},'onEvaluationComplete':_0x1628c4=>{const _0x3b6d51=_0x2f0ff0,_0x3270a1=formatElapsed(_0x1628c4);console['log'](_0x3b6d51(0x183)+a5_0x1a22a7[_0x3b6d51(0x12e)]('✓')+'\x20('+_0x3270a1+')');}});_0x4ea004[_0x2f0ff0(0x125)](),_0x2012ab[_0x2f0ff0(0x164)](_0x2759de);if(_0x2759de['status']===_0x2f0ff0(0x1b1))console['log'](a5_0x1a22a7[_0x2f0ff0(0x12e)](_0x2f0ff0(0x143)+_0x2759de[_0x2f0ff0(0x11c)])+a5_0x1a22a7['dim']('\x20(new)'));else _0x2759de[_0x2f0ff0(0x15c)]===_0x2f0ff0(0x1ae)?console[_0x2f0ff0(0x1a8)](a5_0x1a22a7['red'](_0x2f0ff0(0x15b)+_0x2759de[_0x2f0ff0(0x11c)])+a5_0x1a22a7[_0x2f0ff0(0x14e)](_0x2f0ff0(0x13c))):console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x17c)](_0x2f0ff0(0x178)+_0x2759de[_0x2f0ff0(0x11c)]));_0x2759de[_0x2f0ff0(0x122)]&&console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x14e)](_0x2f0ff0(0x165)+_0x2759de[_0x2f0ff0(0x122)]));}catch(_0x5e4b78){_0x4ea004['stop']();const _0xae533b=_0x5e4b78 instanceof Error?_0x5e4b78[_0x2f0ff0(0x1b4)]:String(_0x5e4b78);console[_0x2f0ff0(0x1a8)](a5_0x1a22a7['red']('✗\x20ERROR:\x20'+_0xae533b)),_0x2012ab[_0x2f0ff0(0x164)]({'name':_0x485ff6[_0x2f0ff0(0x145)],'status':_0x2f0ff0(0x161),'reason':_0xae533b,'timestamp':new Date()['toISOString'](),'duration_ms':0x0});}}}console[_0x2f0ff0(0x1a8)]();const _0x1ef1aa=Date['now']()-_0x44ca7f,_0x3bf078=_0x2012ab[_0x2f0ff0(0x131)](_0x4241f8=>_0x4241f8['status']===_0x2f0ff0(0x1b1))['length'],_0x432076=_0x2012ab['filter'](_0x3bbf22=>_0x3bbf22['status']==='FAIL')['length'],_0x513f5c=_0x2012ab[_0x2f0ff0(0x131)](_0x3eba4f=>_0x3eba4f[_0x2f0ff0(0x15c)]===_0x2f0ff0(0x161))['length'];console[_0x2f0ff0(0x1a8)]('━'['repeat'](0x3c)),console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x177)),console[_0x2f0ff0(0x1a8)]('━'[_0x2f0ff0(0x150)](0x3c)),console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x171)+_0x2012ab[_0x2f0ff0(0x137)]),console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x13f)+a5_0x1a22a7[_0x2f0ff0(0x12e)](_0x3bf078)),console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x1a9)+a5_0x1a22a7[_0x2f0ff0(0x17c)](_0x432076));_0x513f5c>0x0&&console['log'](_0x2f0ff0(0x199)+a5_0x1a22a7[_0x2f0ff0(0x17c)](_0x513f5c));console[_0x2f0ff0(0x1a8)](_0x2f0ff0(0x1b0)+formatElapsed(_0x1ef1aa)),console[_0x2f0ff0(0x1a8)]('━'[_0x2f0ff0(0x150)](0x3c));const _0x3c4c74={'summary':{'total':_0x2012ab[_0x2f0ff0(0x137)],'passed':_0x3bf078,'failed':_0x432076,'errors':_0x513f5c>0x0?_0x513f5c:undefined,'duration_ms':_0x1ef1aa},'tests':_0x2012ab,'agent':{'project':_0x442293[_0x2f0ff0(0x1b5)],'name':_0x442293[_0x2f0ff0(0x17d)],'site':_0x116f97},'timestamp':new Date(_0x44ca7f)[_0x2f0ff0(0x12b)]()};if(_0x8ad558!==_0x2f0ff0(0x151)||_0x2d3971){const _0x5c481e=formatResults(_0x3c4c74,_0x8ad558);if(_0x2d3971)try{a5_0x14274d[_0x2f0ff0(0x174)](_0x2d3971,_0x5c481e,'utf-8'),console[_0x2f0ff0(0x1a8)](),console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x14e)]('Output\x20written\x20to:\x20'+_0x2d3971));}catch(_0x174cd4){return console['log'](),console[_0x2f0ff0(0x1a8)](a5_0x1a22a7[_0x2f0ff0(0x17c)](_0x2f0ff0(0x19a)+_0x174cd4)),0x1;}else console['log'](),console[_0x2f0ff0(0x1a8)](_0x5c481e);}const _0x3d158e=_0x2012ab[_0x2f0ff0(0x131)](_0x5164bf=>_0x5164bf[_0x2f0ff0(0x15c)]!==_0x2f0ff0(0x1b1));return _0x3d158e[_0x2f0ff0(0x137)]>0x0?0x1:0x0;}}function a5_0x48b9(){const _0x37de61=['agentName','isSpinning','\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)','Available\x20tests:\x20','Specify\x20an\x20agent:\x20tdx\x20agent\x20test\x20agents/','\x20\x20Agent:\x20','\x20\x20Evaluating...\x20','map','trim','12tbBngL','jsonl','Round\x20','eval','288axVznM','join','Run\x20`tdx\x20agent\x20test`\x20first\x20to\x20generate\x20conversations.','✗\x20ERROR:\x20Project\x20not\x20found:\x20','Site:\x20','28HvMvzu','size','text','Project\x20path:\x20','json','Test\x20','Run\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20conversations\x20for\x20this\x20agent.','Create\x20a\x20test.yml\x20in\x20an\x20agent\x20directory\x20to\x20run\x20evaluations.','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20agent\x20\x22','executeReeval','Errors:\x20\x20\x20','Error\x20writing\x20output\x20file:\x20','Run\x20tests\x20for\x20an\x20LLM\x20agent','...','toLowerCase','\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:\x20No\x20previous\x20test\x20run\x20found.','New\x20tests\x20to\x20execute:\x20','Running\x20agent\x20tests...','Conversation\x20URL:\x20','No\x20tests\x20found\x20with\x20tags:\x20','Available\x20tags:\x20','✗\x20ERROR:\x20Failed\x20to\x20set\x20up\x20evaluator:\x20','Re-evaluating\x20','Cached\x20run\x20is\x20from\x20site\x20\x22','log','Failed:\x20\x20\x20','multiple_agents','9HPkbrP','Set\x20context\x20with:\x20tdx\x20use\x20llm_project\x20<name>','not\x20found','FAIL','llm','Duration:\x20','PASS','Output\x20written\x20to:\x20','\x20\x20Round\x20','message','projectName','231aWOgYV','Test\x20Summary','no_tests','agentDirs','50682NvveWl','Round\x201/','404','reason','Either\x20switch\x20to\x20the\x20\x22','Multiple\x20agents\x20with\x20tests\x20found\x20in\x20project\x20\x22','verbose','llmProject','No\x20test.yml\x20found\x20in\x20any\x20agent\x20under\x20project\x20\x22','conversation_url','includes','Re-evaluating...','stop','/<agent-name>','now','\x20\x20Site:\x20','Error:\x20Cannot\x20use\x20--reeval\x20with\x20--no-eval','cyan','toISOString','has','Usage:','green','resolveAgentId','\x22,\x20but\x20test.yml\x20is\x20for\x20agent\x20\x22','filter','No\x20tests\x20found\x20matching:\x20','split','agent','round','Error:\x20Cannot\x20execute\x20new\x20tests\x20-\x20site\x20mismatch.','length','testName','✗\x20ERROR:\x20Re-evaluation\x20failed:\x20','rounds','find','\x20(new)','1756weTpxe','No\x20tests\x20have\x20tags\x20defined.','Passed:\x20\x20\x20',':\x20Sending\x20user\x20input...','tests','1540408nEHfzW','✓\x20PASS:\x20','Executing\x20new\x20tests...','name','121OKLMdc','Re-evaluating\x20cached\x20test\x20run...','3959319VhYmpO','tsv','source','20888baXRbo','tags','site','dim','yellow','repeat','table','white','...\x20','Tests\x20found:\x20','forEach','\x20-\x20','\x22:\x20','Running:\x20','101190baXktU','\x22\x20site\x20or\x20run\x20a\x20fresh\x20`tdx\x20agent\x20test`\x20to\x20generate\x20new\x20cache.','✗\x20FAIL:\x20','status','existsSync','\x20\x20-\x20','✗\x20ERROR:\x20Failed\x20to\x20resolve\x20project\x20\x22','\x27\x20to\x20create\x20the\x20folder\x20structure.','ERROR','found','reeval','push','\x20\x20Conversation:\x20','some','testYmlPath','✗\x20ERROR:\x20Agent\x20not\x20found:\x20','152785tKUUFh','Evaluating\x20response...','Cached\x20run\x20from:\x20','Agent:\x20','utf-8','add','conversations','resolve','Total:\x20\x20\x20\x20','Running\x20test:\x20','\x20(cached)','writeFileSync','Using\x20agent:\x20','projectDir','Re-evaluation\x20Summary','✗\x20ERROR:\x20','start','Run\x20\x27tdx\x20agent\x20pull\x20','execute','red'];a5_0x48b9=function(){return _0x37de61;};return a5_0x48b9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a6_0x2e9e(_0x3c001b,_0x2271dd){_0x3c001b=_0x3c001b-0x15d;const _0x3f661b=a6_0x3f66();let _0x2e9eb2=_0x3f661b[_0x3c001b];return _0x2e9eb2;}const a6_0x2eacb0=a6_0x2e9e;(function(_0x1fbaf1,_0x53451b){const _0x5b79c9=a6_0x2e9e,_0x5e36db=_0x1fbaf1();while(!![]){try{const _0x58246e=-parseInt(_0x5b79c9(0x178))/0x1+-parseInt(_0x5b79c9(0x17f))/0x2+parseInt(_0x5b79c9(0x181))/0x3+-parseInt(_0x5b79c9(0x176))/0x4*(parseInt(_0x5b79c9(0x168))/0x5)+-parseInt(_0x5b79c9(0x184))/0x6+parseInt(_0x5b79c9(0x16f))/0x7*(parseInt(_0x5b79c9(0x195))/0x8)+parseInt(_0x5b79c9(0x199))/0x9;if(_0x58246e===_0x53451b)break;else _0x5e36db['push'](_0x5e36db['shift']());}catch(_0x48a6c9){_0x5e36db['push'](_0x5e36db['shift']());}}}(a6_0x3f66,0xce28e));import{BaseCommand}from'./command.js';function a6_0x3f66(){const _0x5e9819=['join','name','3305PdnyYq','Invalid\x20header\x20format:\x20\x22','trim','status','Invalid\x20API\x20type:\x20','site','api','122234jyPSBS','Cannot\x20use\x20both\x20--data\x20and\x20--file\x20options.\x20Choose\x20one.','output','toUpperCase','data','readBodyFromFile','message','5980AYTGZO','Results\x20saved\x20to\x20','943728wvWbBu','keys','entries','error','toLowerCase','x-trino-user','.\x20Valid\x20types:\x20','2672228xfGpbS','indexOf','4629786NwVYYW','file','Make\x20raw\x20HTTP\x20requests\x20to\x20TD\x20APIs','9600558sHiOPs','stack','description','.\x20Valid\x20methods:\x20','llm','length','body','substring','\x0aStack\x20trace:\x0a','cdp','GET','set-cookie','Invalid\x20HTTP\x20method:\x20','startsWith','POST','Expected\x20format:\x20\x22Key:\x20Value\x22\x20or\x20\x22Key:Value\x22','includes','88mMirWB','Endpoint\x20must\x20start\x20with\x20/:\x20','Error:\x20','has','35794944kzDJqm','cookie','headers','isArray','cas','execute','request','type','authorization','trino','color','<\x20HTTP/1.1\x20','llm-proxy','PUT','verbose','log','method'];a6_0x3f66=function(){return _0x5e9819;};return a6_0x3f66();}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_0x2eacb0(0x15d),'proxy-authorization',a6_0x2eacb0(0x19a),a6_0x2eacb0(0x18f),'set-cookie2','x-xsrf-token','x-auth-token',a6_0x2eacb0(0x17d)]);function isSensitiveHeader(_0xe238ea){const _0x49e6d7=a6_0x2eacb0;return SENSITIVE_HEADERS[_0x49e6d7(0x198)](_0xe238ea[_0x49e6d7(0x17c)]());}function parseHeader(_0xc11a6e){const _0x450fa3=a6_0x2eacb0,_0x2a9f8a=_0xc11a6e[_0x450fa3(0x180)](':');if(_0x2a9f8a===-0x1)throw new Error(_0x450fa3(0x169)+_0xc11a6e+'\x22.\x20'+_0x450fa3(0x193));const _0x408633=_0xc11a6e['substring'](0x0,_0x2a9f8a)['trim'](),_0x1ce39a=_0xc11a6e[_0x450fa3(0x18b)](_0x2a9f8a+0x1)[_0x450fa3(0x16a)]();if(!_0x408633)throw new Error('Header\x20key\x20cannot\x20be\x20empty:\x20\x22'+_0xc11a6e+'\x22');return[_0x408633,_0x1ce39a];}export class ApiCommand extends BaseCommand{[a6_0x2eacb0(0x167)]=a6_0x2eacb0(0x16e);[a6_0x2eacb0(0x186)]=a6_0x2eacb0(0x183);['validate'](_0x48d1c6){const _0x36de99=a6_0x2eacb0,{args:_0x53320,options:_0x51d588}=_0x48d1c6,_0x4911fd=_0x51d588;if(_0x53320[_0x36de99(0x189)]===0x0)return'Endpoint\x20is\x20required.\x20Example:\x20tdx\x20api\x20/v3/database/list';const _0x1603ec=_0x53320[0x0];if(!_0x1603ec[_0x36de99(0x191)]('/'))return _0x36de99(0x196)+_0x1603ec;const _0x4f4444=_0x4911fd['data'],_0x2b4ece=_0x4911fd[_0x36de99(0x182)];if(_0x4f4444&&_0x2b4ece)return _0x36de99(0x170);const _0x4b8af0=_0x4911fd[_0x36de99(0x165)]||_0x36de99(0x18e),_0x32bed6=[_0x36de99(0x18e),_0x36de99(0x192),_0x36de99(0x162),'DELETE','PATCH'];if(!_0x32bed6['includes'](_0x4b8af0[_0x36de99(0x172)]()))return _0x36de99(0x190)+_0x4b8af0+_0x36de99(0x187)+_0x32bed6[_0x36de99(0x166)](',\x20');const _0x278570=_0x4911fd[_0x36de99(0x1a0)]||'td',_0x579233=['td',_0x36de99(0x18d),'workflow',_0x36de99(0x15e),_0x36de99(0x188),_0x36de99(0x161),_0x36de99(0x19d)];if(!_0x579233[_0x36de99(0x194)](_0x278570))return _0x36de99(0x16c)+_0x278570+_0x36de99(0x17e)+_0x579233['join'](',\x20');return undefined;}async[a6_0x2eacb0(0x19e)](_0x55d068){const _0x1d7888=a6_0x2eacb0,{options:_0x1a4e7c,args:_0x2eebd4,tdx:_0x1b2118}=_0x55d068,_0x35619f=_0x1a4e7c,_0x830b44=_0x2eebd4[0x0],_0x1cdbaa=(_0x35619f[_0x1d7888(0x165)]||_0x1d7888(0x18e))['toUpperCase'](),_0x3d6d27=_0x35619f[_0x1d7888(0x173)],_0x29e504=_0x35619f['file'],_0x21f30f=_0x35619f['header'],_0x22b77a=_0x35619f[_0x1d7888(0x1a0)]||'td';try{const _0x3897de={};if(_0x21f30f){const _0x1df4b3=Array[_0x1d7888(0x19c)](_0x21f30f)?_0x21f30f:[_0x21f30f];for(const _0x25a90a of _0x1df4b3){const [_0x9e8d03,_0x2ceeb6]=parseHeader(_0x25a90a);_0x3897de[_0x9e8d03]=_0x2ceeb6;}}let _0x321b24;if(_0x3d6d27)_0x321b24=_0x3d6d27;else{if(_0x29e504)try{_0x321b24=RawAPI[_0x1d7888(0x174)](_0x29e504);}catch(_0x4e89e8){return console[_0x1d7888(0x17b)](_0x1d7888(0x197)+(_0x4e89e8 instanceof Error?_0x4e89e8[_0x1d7888(0x175)]:String(_0x4e89e8))),0x1;}}const _0x585426={'method':_0x1cdbaa,'apiType':_0x22b77a,'includeHeaders':_0x1a4e7c[_0x1d7888(0x163)]};_0x321b24&&(_0x585426[_0x1d7888(0x18a)]=_0x321b24);Object[_0x1d7888(0x179)](_0x3897de)[_0x1d7888(0x189)]>0x0&&(_0x585426['headers']=_0x3897de);if(_0x1a4e7c[_0x1d7888(0x163)]){const _0x3f6c8f=resolveSite(_0x1a4e7c[_0x1d7888(0x16d)]),_0x479fa1=getEndpoint(_0x3f6c8f,_0x22b77a),_0x29920b=''+_0x479fa1+_0x830b44;console[_0x1d7888(0x17b)]('>\x20'+_0x1cdbaa+'\x20'+_0x29920b);const _0x441fc3=getAuthHeaders(_0x3f6c8f),_0x3daaf4={..._0x441fc3,..._0x3897de};for(const [_0x26d9bf,_0x36f059]of Object[_0x1d7888(0x17a)](_0x3daaf4)){!isSensitiveHeader(_0x26d9bf)&&console[_0x1d7888(0x17b)]('>\x20'+_0x26d9bf+':\x20'+_0x36f059);}_0x321b24&&console[_0x1d7888(0x17b)]('>'),console[_0x1d7888(0x17b)]('');}const _0x1cad96=await _0x1b2118[_0x1d7888(0x16e)][_0x1d7888(0x19f)](_0x830b44,_0x585426);if(_0x1a4e7c[_0x1d7888(0x163)]&&_0x1cad96[_0x1d7888(0x19b)]){console[_0x1d7888(0x17b)](_0x1d7888(0x160)+_0x1cad96[_0x1d7888(0x16b)]);for(const [_0x457878,_0x387b6f]of Object[_0x1d7888(0x17a)](_0x1cad96['headers'])){!isSensitiveHeader(_0x457878)&&console['error']('<\x20'+_0x457878+':\x20'+_0x387b6f);}console[_0x1d7888(0x17b)]('');}const _0x3789a6=Boolean(_0x1a4e7c['output']),_0xd1324e={'color':_0x1a4e7c[_0x1d7888(0x15f)],'noColor':_0x1a4e7c['noColor']||_0x3789a6&&!_0x1a4e7c[_0x1d7888(0x15f)]},_0x185bc5=colorizeJSON(_0x1cad96['data'],_0xd1324e);return _0x1a4e7c[_0x1d7888(0x171)]?(writeFileSync(_0x1a4e7c[_0x1d7888(0x171)],_0x185bc5),console[_0x1d7888(0x17b)](_0x1d7888(0x177)+_0x1a4e7c[_0x1d7888(0x171)])):console[_0x1d7888(0x164)](_0x185bc5),0x0;}catch(_0x34305c){return _0x34305c instanceof Error?(console[_0x1d7888(0x17b)](_0x1d7888(0x197)+_0x34305c[_0x1d7888(0x175)]),_0x1a4e7c[_0x1d7888(0x163)]&&_0x34305c['stack']&&console[_0x1d7888(0x17b)](_0x1d7888(0x18c)+_0x34305c[_0x1d7888(0x185)])):console[_0x1d7888(0x17b)](_0x1d7888(0x197)+String(_0x34305c)),0x1;}}}
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
* Auth command - Setup and manage authentication
|
|
3
3
|
*/
|
|
4
4
|
import { BaseCommand, type CommandContext } from './command.js';
|
|
5
|
+
import type { GlobalOptions, TDSite } from '../sdk/types/index.js';
|
|
6
|
+
import { LogLevel } from '../utils/tdx-logger.js';
|
|
7
|
+
export interface OAuthCommandOptions extends GlobalOptions {
|
|
8
|
+
accountName?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Run the OAuth login flow (shared helper for CLI commands)
|
|
12
|
+
*
|
|
13
|
+
* Throws on failure — callers should let errors bubble to BaseCommand.run().
|
|
14
|
+
*
|
|
15
|
+
* @param site - TD site to authenticate against
|
|
16
|
+
* @param profile - Optional profile name
|
|
17
|
+
* @param logLevel - Log level for validation request
|
|
18
|
+
*/
|
|
19
|
+
export declare function runOAuthLoginFlow(site: TDSite, profile?: string, logLevel?: LogLevel, options?: {
|
|
20
|
+
accountName?: string;
|
|
21
|
+
}): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Prompt the user to choose between OAuth (browser) and API key authentication.
|
|
24
|
+
* Returns the selected method or null if cancelled.
|
|
25
|
+
*/
|
|
26
|
+
export declare function promptAuthMethod(): Promise<'oauth' | 'apikey' | null>;
|
|
5
27
|
/**
|
|
6
28
|
* Auth setup command - Interactive API key configuration
|
|
7
29
|
* Usage: tdx auth setup
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-command.d.ts","sourceRoot":"","sources":["../../src/commands/auth-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAkB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-command.d.ts","sourceRoot":"","sources":["../../src/commands/auth-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAkB,MAAM,cAAc,CAAC;AAGhF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAenE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,QAAQ,EACnB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,OAAO,CAAC,IAAI,CAAC,CA4Ef;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,CAmB3E;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,gDAAgD;IAE9D,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAuHxD;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,WAAW,qDAAqD;IAEnE,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAmDxD;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,yCAAyC;IAEvD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;CAgCxD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a7_0x62d6ff=a7_0xc351;(function(_0x4432f1,_0x347fb5){const _0x29558d=a7_0xc351,_0x318838=_0x4432f1();while(!![]){try{const _0x4a6a2e=-parseInt(_0x29558d(0x10d))/0x1+parseInt(_0x29558d(0x12f))/0x2*(-parseInt(_0x29558d(0x11a))/0x3)+-parseInt(_0x29558d(0x126))/0x4*(-parseInt(_0x29558d(0xfd))/0x5)+-parseInt(_0x29558d(0x130))/0x6+parseInt(_0x29558d(0x10e))/0x7+-parseInt(_0x29558d(0x106))/0x8*(parseInt(_0x29558d(0xfa))/0x9)+-parseInt(_0x29558d(0x125))/0xa*(-parseInt(_0x29558d(0x13a))/0xb);if(_0x4a6a2e===_0x347fb5)break;else _0x318838['push'](_0x318838['shift']());}catch(_0x10cfa5){_0x318838['push'](_0x318838['shift']());}}}(a7_0x1874,0xd40e1));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens}from'../core/oauth-keychain.js';import{saveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';function a7_0x1874(){const _0x365fc0=['OAuth\x20tokens','select','User:\x20','getUserInfo','auth:setup','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','us01','936138eJkAjF','2162262vcNDBc','Credential\x20type:\x20OAuth','API\x20key\x20cannot\x20be\x20empty','✓\x20API\x20key\x20saved\x20to\x20system\x20keychain','\x20\x20tdx','System\x20keychain\x20is\x20not\x20available','email','status','\x20for\x20profile:\x20','✓\x20Authentication\x20successful\x0a','32564037crmogF','tdx:\x20auth\x20clear','ERROR','message','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','Remove\x20API\x20key\x20from\x20system\x20keychain','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','first_name','join','apikey','error','✓\x20Default\x20site\x20set\x20to\x20','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','description','\x20removed\x20from\x20keychain','✗\x20Validation\x20failed:\x20','Setting\x20up\x20authentication\x20for\x20site:\x20','OAuth\x20(browser\x20login)','tdx:\x20auth\x20setup','5716926bGFPia','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','all','5oJnbKQ','Choose\x20authentication\x20method:','\x20--profile\x20','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','logLevel','Name:\x20','warn','API\x20key','execute','16MwXngc','method','auth','trim','yellow','/app/mp/ak','tdx\x20profile:\x20','741629aGAWkx','10324818CHoZhJ','✓\x20Profile\x20\x27','oauth','site','Enter\x20your\x20TD\x20API\x20key:','Read\x20credential\x20from\x20','red','You\x20can\x20find\x20your\x20API\x20key\x20at:','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','N/A','name','jobs','9CuxWWd','bold','log','profile','\x0aSetup\x20cancelled','password','filter','last_name','No\x20credential\x20found','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','apiKey','10wdHMXI','839508EaaeoM','\x20(profile:\x20'];a7_0x1874=function(){return _0x365fc0;};return a7_0x1874();}function a7_0xc351(_0x5baed8,_0x40cb87){_0x5baed8=_0x5baed8-0xec;const _0x18745b=a7_0x1874();let _0xc351c7=_0x18745b[_0x5baed8];return _0xc351c7;}import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{deleteOAuthTokens}from'../core/oauth-keychain.js';import{clearCredentialCache}from'../core/credential-cache.js';import{isOAuthSupported}from'../core/oauth.js';import{runOAuthLoginFlow}from'./auth-login-command.js';import{promptSiteSelection}from'../core/constants.js';import a7_0x4883be 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_0x4c8a50 from'chalk';export class AuthSetupCommand extends BaseCommand{[a7_0x62d6ff(0x118)]=a7_0x62d6ff(0x12c);[a7_0x62d6ff(0xf4)]='Setup\x20API\x20key\x20authentication\x20interactively';async[a7_0x62d6ff(0x105)](_0x2d058e){const _0xd59fce=a7_0x62d6ff,{options:_0x9b52eb}=_0x2d058e,_0x396983=_0x9b52eb[_0xd59fce(0x11d)];console[_0xd59fce(0x11c)](a7_0x4c8a50[_0xd59fce(0x11b)](_0xd59fce(0xf9)));const _0x1ff4de=_0x9b52eb[_0xd59fce(0x111)]||_0xd59fce(0x12e),_0x2d1845=await promptSiteSelection(_0x1ff4de,_0x396983,'Setup\x20cancelled');if(!_0x2d1845)return 0x1;const _0x352f6c=resolveSite(_0x2d1845);if(isOAuthSupported(_0x352f6c)){const _0x5b6a22=await a7_0x4883be({'type':_0xd59fce(0x129),'name':'method','message':_0xd59fce(0xfe),'choices':[{'title':_0xd59fce(0xf8),'value':'oauth'},{'title':'API\x20Key','value':_0xd59fce(0xf0)}]});if(!_0x5b6a22[_0xd59fce(0x107)])return console[_0xd59fce(0x11c)](_0xd59fce(0x11e)),0x1;if(_0x5b6a22[_0xd59fce(0x107)]===_0xd59fce(0x110))return await runOAuthLoginFlow(_0x352f6c,_0x396983,_0x9b52eb[_0xd59fce(0x101)]??LogLevel[_0xd59fce(0x13c)]),0x0;}console[_0xd59fce(0x11c)](_0xd59fce(0xf7)+_0x352f6c),console[_0xd59fce(0x11c)](_0xd59fce(0x115)),console[_0xd59fce(0x11c)]('\x20\x20'+getConsoleUrl(_0x352f6c,_0xd59fce(0x10b)));const _0x1b379a=await a7_0x4883be({'type':_0xd59fce(0x11f),'name':_0xd59fce(0x124),'message':_0xd59fce(0x112),'validate':_0x1eccea=>{const _0x3e2c38=_0xd59fce;if(!_0x1eccea||!_0x1eccea[_0x3e2c38(0x109)]())return _0x3e2c38(0x132);return!![];}});if(!_0x1b379a[_0xd59fce(0x124)])return console[_0xd59fce(0x11c)](_0xd59fce(0x11e)),0x1;const _0x23ae0a=_0x1b379a[_0xd59fce(0x124)];console['log']('Validating\x20API\x20key...');try{const _0x486b98=TDX['create']({'site':_0x352f6c,'apiKey':_0x23ae0a[_0xd59fce(0x109)](),'logLevel':_0x9b52eb[_0xd59fce(0x101)]??LogLevel['ERROR']}),_0x69157e=await _0x486b98[_0xd59fce(0x119)]['getUserInfo']();console['log'](_0xd59fce(0xfb)+_0x69157e[_0xd59fce(0x136)]+')');const _0x1bc397=await isKeychainAvailable();_0x1bc397?(await saveAPIKeyAsync(_0x23ae0a['trim'](),_0x352f6c,_0x396983),console[_0xd59fce(0x11c)](_0xd59fce(0x133)+(_0x396983?_0xd59fce(0x127)+_0x396983+')':''))):(console['warn'](a7_0x4c8a50[_0xd59fce(0x10a)](_0xd59fce(0x100))),console[_0xd59fce(0x103)](a7_0x4c8a50[_0xd59fce(0x10a)](_0xd59fce(0x116))));if(_0x396983){const _0x568108={'site':_0x352f6c};saveProfileToUserConfig(_0x396983,_0x568108),console[_0xd59fce(0x11c)](_0xd59fce(0x10f)+_0x396983+'\x27\x20registered');}else saveDefaultSiteToUserConfig(_0x352f6c),console['log'](_0xd59fce(0xf2)+_0x352f6c);const _0x580b0e=_0x396983?_0xd59fce(0xff)+_0x396983:'';return console[_0xd59fce(0x11c)](),console[_0xd59fce(0x11c)](_0xd59fce(0xf3)),console[_0xd59fce(0x11c)](_0xd59fce(0x134)+_0x580b0e+_0xd59fce(0x12d)),console[_0xd59fce(0x11c)](_0xd59fce(0x134)+_0x580b0e+_0xd59fce(0x13e)),0x0;}catch(_0x1692e7){if(_0x1692e7 instanceof HTTPClientError&&_0x1692e7[_0xd59fce(0x137)]===0x191)return printAuthError(_0x1692e7),0x1;return console[_0xd59fce(0xf1)](a7_0x4c8a50[_0xd59fce(0x114)]('✗\x20Validation\x20failed:\x20'+(_0x1692e7 instanceof Error?_0x1692e7['message']:String(_0x1692e7)))),console[_0xd59fce(0xf1)](_0xd59fce(0xed)),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a7_0x62d6ff(0x118)]=a7_0x62d6ff(0x108);[a7_0x62d6ff(0xf4)]=a7_0x62d6ff(0x123);async['execute'](_0x5e9957){const _0x2cd580=a7_0x62d6ff,{options:_0x4b5262,tdx:_0x21652d}=_0x5e9957,_0x335f40=_0x4b5262[_0x2cd580(0x111)],_0x4f5fa6=_0x4b5262['profile'],_0x33bb4e=_0x4f5fa6?_0x4f5fa6:_0x2cd580(0x117);console[_0x2cd580(0x11c)](_0x2cd580(0x10c)+_0x33bb4e+'\x20(site:\x20'+_0x335f40+')');const _0x585908=await getOAuthTokens(_0x4f5fa6);if(_0x585908)console[_0x2cd580(0x11c)](_0x2cd580(0x131)),console[_0x2cd580(0x11c)]('Read\x20credential\x20from\x20keychain'+(_0x4f5fa6?_0x2cd580(0x127)+_0x4f5fa6+')':''));else{const _0x2664f8=await resolveAPIKeyAsync(_0x335f40,_0x4f5fa6);if(_0x2664f8){const {source:_0x5c2515,isDeprecated:_0x24983e}=_0x2664f8,_0x33299b=_0x2cd580(0x113)+_0x5c2515;console[_0x2cd580(0x11c)](_0x24983e?a7_0x4c8a50[_0x2cd580(0x10a)](_0x33299b):_0x33299b);}else console[_0x2cd580(0x11c)](a7_0x4c8a50['yellow'](_0x2cd580(0x122)));}try{const _0xf69e0b=await _0x21652d[_0x2cd580(0x119)][_0x2cd580(0x12b)]();return console['log'](a7_0x4c8a50['green'](_0x2cd580(0x139))),console[_0x2cd580(0x11c)](_0x2cd580(0x12a)+_0xf69e0b[_0x2cd580(0x136)]),(_0xf69e0b[_0x2cd580(0xee)]||_0xf69e0b[_0x2cd580(0x121)])&&console[_0x2cd580(0x11c)](_0x2cd580(0x102)+[_0xf69e0b[_0x2cd580(0xee)],_0xf69e0b['last_name']]['filter'](Boolean)['join']('\x20')),0x0;}catch(_0x240120){return _0x240120 instanceof HTTPClientError&&_0x240120[_0x2cd580(0x137)]===0x191?printAuthError(_0x240120,!![],_0x4f5fa6):console[_0x2cd580(0xf1)](a7_0x4c8a50[_0x2cd580(0x114)](_0x2cd580(0xf6)+(_0x240120 instanceof Error?_0x240120[_0x2cd580(0x13d)]:String(_0x240120)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a7_0x62d6ff(0x118)]='auth:clear';[a7_0x62d6ff(0xf4)]=a7_0x62d6ff(0xec);async[a7_0x62d6ff(0x105)](_0x41df7a){const _0xbc79bb=a7_0x62d6ff,{options:_0x5a5c81}=_0x41df7a,_0x1ef7e2=_0x5a5c81[_0xbc79bb(0x11d)];console[_0xbc79bb(0x11c)](a7_0x4c8a50[_0xbc79bb(0x11b)](_0xbc79bb(0x13b)));const _0x4585e5=await isKeychainAvailable();if(!_0x4585e5)return console[_0xbc79bb(0xf1)](a7_0x4c8a50['red'](_0xbc79bb(0x135))),0x1;const [_0x42caf1,_0x42b831]=await Promise[_0xbc79bb(0xfc)]([deleteKeychainAPIKey(_0x1ef7e2),deleteOAuthTokens(_0x1ef7e2)]);if(_0x42caf1||_0x42b831){clearCredentialCache();const _0x235816=[_0x42caf1&&_0xbc79bb(0x104),_0x42b831&&_0xbc79bb(0x128)][_0xbc79bb(0x120)](Boolean)[_0xbc79bb(0xef)]('\x20and\x20');return console['log']('✓\x20'+_0x235816+_0xbc79bb(0xf5)+(_0x1ef7e2?'\x20(profile:\x20'+_0x1ef7e2+')':'')),0x0;}else return console['log']('No\x20credentials\x20found\x20in\x20keychain'+(_0x1ef7e2?_0xbc79bb(0x138)+_0x1ef7e2:'')),0x1;}}
|
|
1
|
+
const a7_0x3a27f4=a7_0x151b;(function(_0x2c8370,_0x25dc92){const _0x1cb3e9=a7_0x151b,_0xc31936=_0x2c8370();while(!![]){try{const _0x5116cd=-parseInt(_0x1cb3e9(0x1eb))/0x1*(parseInt(_0x1cb3e9(0x208))/0x2)+-parseInt(_0x1cb3e9(0x21c))/0x3+-parseInt(_0x1cb3e9(0x1c5))/0x4*(parseInt(_0x1cb3e9(0x1fc))/0x5)+-parseInt(_0x1cb3e9(0x222))/0x6*(parseInt(_0x1cb3e9(0x1f3))/0x7)+-parseInt(_0x1cb3e9(0x1cc))/0x8*(parseInt(_0x1cb3e9(0x1d7))/0x9)+parseInt(_0x1cb3e9(0x205))/0xa*(-parseInt(_0x1cb3e9(0x1e3))/0xb)+parseInt(_0x1cb3e9(0x223))/0xc;if(_0x5116cd===_0x25dc92)break;else _0xc31936['push'](_0xc31936['shift']());}catch(_0x31c2df){_0xc31936['push'](_0xc31936['shift']());}}}(a7_0x1acf,0xed162));import{BaseCommand,printAuthError}from'./command.js';import{saveAPIKeyAsync,resolveSite,resolveAPIKeyAsync}from'../core/config.js';import{getOAuthTokens,saveOAuthTokens}from'../core/oauth-keychain.js';import{saveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{getConsoleUrl}from'../sdk/client/endpoints.js';function a7_0x1acf(){const _0x1eb75a=['\x20for\x20profile:\x20','auth:setup','\x20--profile\x20','jobs','\x20(site:\x20','N/A','method','accountName','error','User:\x20','first_name','apiKey','create','Setup\x20cancelled','No\x20credentials\x20found\x20in\x20keychain','ERROR','logLevel','green','No\x20credential\x20found','5819028ctvGMl','Name:\x20','last_name','System\x20keychain\x20is\x20not\x20available.\x20OAuth\x20tokens\x20cannot\x20be\x20saved.\x20','Read\x20credential\x20from\x20','\x27\x20registered','37290HBZOzT','77104140nzYHQu','System\x20keychain\x20is\x20not\x20available','⚠\x20System\x20keychain\x20not\x20available.\x20API\x20key\x20not\x20saved.','✗\x20Validation\x20failed:\x20','warn','status','all','\x20\x20\x20\x202.\x20Or\x20use\x20a\x20different\x20browser\x20profile\x20to\x20avoid\x20cached\x20sessions','cyan','4nXQLRP','email','execute','Remove\x20API\x20key\x20from\x20system\x20keychain','red','auth:clear','Opening\x20browser\x20for\x20authentication...','16yorxCd','bold','API\x20key\x20cannot\x20be\x20empty','✓\x20Profile\x20\x27','Use\x20\x22tdx\x20auth\x20setup\x22\x20with\x20an\x20API\x20key\x20instead.','\x20\x20Set\x20TDX_API_KEY\x20environment\x20variable\x20for\x20authentication.','API\x20key','join','message','API\x20key\x20was\x20not\x20saved.\x20Please\x20try\x20again.','yellow','477306AvGrGz','account_id','You\x20can\x20now\x20use\x20tdx\x20commands.\x20Try:','\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases','OAuth\x20tokens','tdx:\x20auth\x20setup','description','Waiting\x20for\x20authorization\x20(timeout:\x202\x20minutes)...','getUserInfo','name','log','Account\x20name\x20for\x20SSO\x20(press\x20Enter\x20to\x20skip):','3890029HsZnZm','filter','\x20auth\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Verify\x20authentication','Show\x20authentication\x20status\x20and\x20validate\x20API\x20key','Opens\x20your\x20browser\x20to\x20sign\x20in\x20with\x20SSO','select','/app/mp/ak','✓\x20API\x20key\x20is\x20valid\x20(User:\x20','2WBhzDB','trim','\x20\x20user_id:','You\x20can\x20find\x20your\x20API\x20key\x20at:','\x20and\x20','\x20\x20\x20\x201.\x20Run:\x20tdx\x20auth\x20setup\x20--account-name\x20<name>','Enter\x20your\x20TD\x20API\x20key:','tdx\x20profile:\x20','343Vwswym','✓\x20Signed\x20in\x20successfully','✓\x20Authentication\x20successful\x0a','/oauth/authorize','access_token','For\x20scripts\x20or\x20headless\x20servers','\x20(profile:\x20','profile','\x20\x20tdx','2786095VztlPc','\x20removed\x20from\x20keychain','\x0aSetup\x20cancelled','auth','oauth','/users/initiate_sso\x20(account:\x20','Validating\x20API\x20key...','Setting\x20up\x20authentication\x20for\x20site:\x20','site','50WPoOlu','✓\x20OAuth\x20tokens\x20saved\x20to\x20system\x20keychain','dim','778546GsHktf'];a7_0x1acf=function(){return _0x1eb75a;};return a7_0x1acf();}import{deleteKeychainAPIKey,isKeychainAvailable}from'../core/keychain.js';import{deleteOAuthTokens}from'../core/oauth-keychain.js';function a7_0x151b(_0xe78d8e,_0x1dc5a3){_0xe78d8e=_0xe78d8e-0x1c2;const _0x1acfff=a7_0x1acf();let _0x151bcc=_0x1acfff[_0xe78d8e];return _0x151bcc;}import{clearCredentialCache}from'../core/credential-cache.js';import{startOAuthFlow}from'../core/oauth.js';import{promptSiteSelection}from'../core/constants.js';import a7_0x1c3ea2 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_0x296e95 from'chalk';export async function runOAuthLoginFlow(_0x26795f,_0x969444,_0x389e25,_0x286567){const _0x76107=a7_0x151b,_0x5c91d9=await isKeychainAvailable();if(!_0x5c91d9)throw new Error(_0x76107(0x21f)+_0x76107(0x1d0));let _0x2c6cbf=_0x286567?.[_0x76107(0x210)];if(!_0x2c6cbf){const _0x27943b=await a7_0x1c3ea2({'type':'text','name':_0x76107(0x210),'message':_0x76107(0x1e2)});if(_0x27943b['accountName']===undefined)throw new Error(_0x76107(0x216));_0x2c6cbf=_0x27943b[_0x76107(0x210)]['trim']()||undefined;}const _0x31d377=getConsoleUrl(_0x26795f);console[_0x76107(0x1e1)](_0x76107(0x1cb));_0x2c6cbf?console[_0x76107(0x1e1)]('\x20\x20'+_0x31d377+_0x76107(0x201)+_0x2c6cbf+')'):console[_0x76107(0x1e1)]('\x20\x20'+_0x31d377+_0x76107(0x1f6));console['log'](_0x76107(0x1de));const _0x4da0ad=await startOAuthFlow(_0x26795f,{'accountName':_0x2c6cbf});console[_0x76107(0x1e1)]('Validating\x20OAuth\x20tokens...');const _0x1e4c2b=TDX[_0x76107(0x215)]({'site':_0x26795f,'accessToken':_0x4da0ad[_0x76107(0x1f7)],'logLevel':_0x389e25??LogLevel[_0x76107(0x218)]}),_0x43cf2b=await _0x1e4c2b[_0x76107(0x20c)][_0x76107(0x1df)]();console[_0x76107(0x1e1)](a7_0x296e95[_0x76107(0x21a)](_0x76107(0x1f4))),console['log']('\x20\x20'+a7_0x296e95[_0x76107(0x1c4)](_0x26795f+':'+_0x43cf2b[_0x76107(0x1d8)])+_0x76107(0x1ed)+_0x43cf2b['id']+'\x20\x20('+_0x43cf2b[_0x76107(0x1c6)]+')');!_0x2c6cbf&&(console[_0x76107(0x1e1)](a7_0x296e95[_0x76107(0x207)]('\x20\x20If\x20this\x20is\x20not\x20the\x20expected\x20account:')),console[_0x76107(0x1e1)](a7_0x296e95['dim'](_0x76107(0x1f0))),console['log'](a7_0x296e95[_0x76107(0x207)](_0x76107(0x1c3))));await saveOAuthTokens(_0x4da0ad,_0x969444),console[_0x76107(0x1e1)](_0x76107(0x206)+(_0x969444?'\x20(profile:\x20'+_0x969444+')':''));if(_0x969444){const _0x3262c0={'site':_0x26795f};saveProfileToUserConfig(_0x969444,_0x3262c0),console[_0x76107(0x1e1)](_0x76107(0x1cf)+_0x969444+_0x76107(0x221));}else saveDefaultSiteToUserConfig(_0x26795f),console[_0x76107(0x1e1)]('✓\x20Default\x20site\x20set\x20to\x20'+_0x26795f);const _0x490d8e=_0x969444?'\x20--profile\x20'+_0x969444:'';console[_0x76107(0x1e1)](),console[_0x76107(0x1e1)](_0x76107(0x1d9)),console[_0x76107(0x1e1)](_0x76107(0x1fb)+_0x490d8e+_0x76107(0x1e5)),console[_0x76107(0x1e1)](_0x76107(0x1fb)+_0x490d8e+'\x20databases\x20\x20\x20\x20\x20-\x20List\x20databases');}export async function promptAuthMethod(){const _0x20ae20=a7_0x151b,_0x372064=await a7_0x1c3ea2({'type':_0x20ae20(0x1e8),'name':_0x20ae20(0x20f),'message':'Choose\x20how\x20to\x20sign\x20in:','choices':[{'title':'Sign\x20in\x20with\x20browser\x20(recommended)','description':_0x20ae20(0x1e7),'value':_0x20ae20(0x200)},{'title':'Use\x20an\x20API\x20key','description':_0x20ae20(0x1f8),'value':'apikey'}]});return _0x372064[_0x20ae20(0x20f)]||null;}export class AuthSetupCommand extends BaseCommand{[a7_0x3a27f4(0x1e0)]=a7_0x3a27f4(0x20a);['description']='Setup\x20API\x20key\x20authentication\x20interactively';async[a7_0x3a27f4(0x1c7)](_0x876c83){const _0x3338a4=a7_0x3a27f4,{options:_0x49dffe}=_0x876c83,_0x46cfe7=_0x49dffe['profile'];console[_0x3338a4(0x1e1)](a7_0x296e95[_0x3338a4(0x1cd)](_0x3338a4(0x1dc)));const _0x32c92d=_0x49dffe[_0x3338a4(0x204)]||'us01',_0x1c18eb=await promptSiteSelection(_0x32c92d,_0x46cfe7,_0x3338a4(0x216));if(!_0x1c18eb)return 0x1;const _0x48f450=resolveSite(_0x1c18eb),_0x109ad9=await promptAuthMethod();if(!_0x109ad9)return console['log'](_0x3338a4(0x1fe)),0x1;if(_0x109ad9===_0x3338a4(0x200)){const {accountName:_0x40067a}=_0x49dffe;return await runOAuthLoginFlow(_0x48f450,_0x46cfe7,_0x49dffe[_0x3338a4(0x219)]??LogLevel[_0x3338a4(0x218)],{'accountName':_0x40067a}),0x0;}console[_0x3338a4(0x1e1)](_0x3338a4(0x203)+_0x48f450),console[_0x3338a4(0x1e1)](_0x3338a4(0x1ee)),console['log']('\x20\x20'+getConsoleUrl(_0x48f450,_0x3338a4(0x1e9)));const _0x2add1f=await a7_0x1c3ea2({'type':'password','name':_0x3338a4(0x214),'message':_0x3338a4(0x1f1),'validate':_0x1a1275=>{const _0x30b88b=_0x3338a4;if(!_0x1a1275||!_0x1a1275['trim']())return _0x30b88b(0x1ce);return!![];}});if(!_0x2add1f['apiKey'])return console['log'](_0x3338a4(0x1fe)),0x1;const _0xddbb33=_0x2add1f[_0x3338a4(0x214)];console[_0x3338a4(0x1e1)](_0x3338a4(0x202));try{const _0x36af76=TDX['create']({'site':_0x48f450,'apiKey':_0xddbb33[_0x3338a4(0x1ec)](),'logLevel':_0x49dffe[_0x3338a4(0x219)]??LogLevel[_0x3338a4(0x218)]}),_0x2e0999=await _0x36af76[_0x3338a4(0x20c)]['getUserInfo']();console['log'](_0x3338a4(0x1ea)+_0x2e0999[_0x3338a4(0x1c6)]+')');const _0x39aa98=await isKeychainAvailable();_0x39aa98?(await saveAPIKeyAsync(_0xddbb33[_0x3338a4(0x1ec)](),_0x48f450,_0x46cfe7),console[_0x3338a4(0x1e1)]('✓\x20API\x20key\x20saved\x20to\x20system\x20keychain'+(_0x46cfe7?_0x3338a4(0x1f9)+_0x46cfe7+')':''))):(console['warn'](a7_0x296e95[_0x3338a4(0x1d6)](_0x3338a4(0x225))),console[_0x3338a4(0x227)](a7_0x296e95[_0x3338a4(0x1d6)](_0x3338a4(0x1d1))));if(_0x46cfe7){const _0x483b96={'site':_0x48f450};saveProfileToUserConfig(_0x46cfe7,_0x483b96),console[_0x3338a4(0x1e1)](_0x3338a4(0x1cf)+_0x46cfe7+_0x3338a4(0x221));}else saveDefaultSiteToUserConfig(_0x48f450),console[_0x3338a4(0x1e1)]('✓\x20Default\x20site\x20set\x20to\x20'+_0x48f450);const _0x2fbbfb=_0x46cfe7?_0x3338a4(0x20b)+_0x46cfe7:'';return console[_0x3338a4(0x1e1)](),console[_0x3338a4(0x1e1)](_0x3338a4(0x1d9)),console['log'](_0x3338a4(0x1fb)+_0x2fbbfb+_0x3338a4(0x1e5)),console[_0x3338a4(0x1e1)]('\x20\x20tdx'+_0x2fbbfb+_0x3338a4(0x1da)),0x0;}catch(_0x4f7b17){if(_0x4f7b17 instanceof HTTPClientError&&_0x4f7b17[_0x3338a4(0x228)]===0x191)return printAuthError(_0x4f7b17),0x1;return console[_0x3338a4(0x211)](a7_0x296e95[_0x3338a4(0x1c9)]('✗\x20Validation\x20failed:\x20'+(_0x4f7b17 instanceof Error?_0x4f7b17['message']:String(_0x4f7b17)))),console['error'](_0x3338a4(0x1d5)),0x1;}}}export class AuthStatusCommand extends BaseCommand{[a7_0x3a27f4(0x1e0)]=a7_0x3a27f4(0x1ff);[a7_0x3a27f4(0x1dd)]=a7_0x3a27f4(0x1e6);async[a7_0x3a27f4(0x1c7)](_0x3b975e){const _0x1f4031=a7_0x3a27f4,{options:_0x11a71e,tdx:_0x5d276f}=_0x3b975e,_0x7a3ecf=_0x11a71e[_0x1f4031(0x204)],_0x102073=_0x11a71e[_0x1f4031(0x1fa)],_0x2b4f5a=_0x102073?_0x102073:_0x1f4031(0x20e);console[_0x1f4031(0x1e1)](_0x1f4031(0x1f2)+_0x2b4f5a+_0x1f4031(0x20d)+_0x7a3ecf+')');const _0x87b18b=await getOAuthTokens(_0x102073);if(_0x87b18b)console['log']('Credential\x20type:\x20OAuth'),console[_0x1f4031(0x1e1)]('Read\x20credential\x20from\x20keychain'+(_0x102073?_0x1f4031(0x1f9)+_0x102073+')':''));else{const _0x240a30=await resolveAPIKeyAsync(_0x7a3ecf,_0x102073);if(_0x240a30){const {source:_0x59de57,isDeprecated:_0x4f8e42}=_0x240a30,_0x4814c2=_0x1f4031(0x220)+_0x59de57;console[_0x1f4031(0x1e1)](_0x4f8e42?a7_0x296e95['yellow'](_0x4814c2):_0x4814c2);}else console[_0x1f4031(0x1e1)](a7_0x296e95['yellow'](_0x1f4031(0x21b)));}try{const _0x3e6c20=await _0x5d276f['jobs'][_0x1f4031(0x1df)]();return console['log'](a7_0x296e95[_0x1f4031(0x21a)](_0x1f4031(0x1f5))),console[_0x1f4031(0x1e1)](_0x1f4031(0x212)+_0x3e6c20[_0x1f4031(0x1c6)]),(_0x3e6c20[_0x1f4031(0x213)]||_0x3e6c20[_0x1f4031(0x21e)])&&console[_0x1f4031(0x1e1)](_0x1f4031(0x21d)+[_0x3e6c20[_0x1f4031(0x213)],_0x3e6c20[_0x1f4031(0x21e)]][_0x1f4031(0x1e4)](Boolean)[_0x1f4031(0x1d3)]('\x20')),0x0;}catch(_0x3270ea){return _0x3270ea instanceof HTTPClientError&&_0x3270ea['status']===0x191?printAuthError(_0x3270ea,!![],_0x102073):console[_0x1f4031(0x211)](a7_0x296e95[_0x1f4031(0x1c9)](_0x1f4031(0x226)+(_0x3270ea instanceof Error?_0x3270ea[_0x1f4031(0x1d4)]:String(_0x3270ea)))),0x1;}}}export class AuthClearCommand extends BaseCommand{[a7_0x3a27f4(0x1e0)]=a7_0x3a27f4(0x1ca);['description']=a7_0x3a27f4(0x1c8);async['execute'](_0x5805b6){const _0x1c30d0=a7_0x3a27f4,{options:_0x5ee698}=_0x5805b6,_0x4a198d=_0x5ee698['profile'];console[_0x1c30d0(0x1e1)](a7_0x296e95[_0x1c30d0(0x1cd)]('tdx:\x20auth\x20clear'));const _0x11c4ee=await isKeychainAvailable();if(!_0x11c4ee)return console[_0x1c30d0(0x211)](a7_0x296e95[_0x1c30d0(0x1c9)](_0x1c30d0(0x224))),0x1;const [_0x562838,_0x841975]=await Promise[_0x1c30d0(0x1c2)]([deleteKeychainAPIKey(_0x4a198d),deleteOAuthTokens(_0x4a198d)]);if(_0x562838||_0x841975){clearCredentialCache();const _0x28641=[_0x562838&&_0x1c30d0(0x1d2),_0x841975&&_0x1c30d0(0x1db)][_0x1c30d0(0x1e4)](Boolean)[_0x1c30d0(0x1d3)](_0x1c30d0(0x1ef));return console[_0x1c30d0(0x1e1)]('✓\x20'+_0x28641+_0x1c30d0(0x1fd)+(_0x4a198d?_0x1c30d0(0x1f9)+_0x4a198d+')':'')),0x0;}else return console[_0x1c30d0(0x1e1)](_0x1c30d0(0x217)+(_0x4a198d?_0x1c30d0(0x209)+_0x4a198d:'')),0x1;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-command.js","sourceRoot":"","sources":["../../src/commands/auth-command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAuB,cAAc,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EACL,uBAAuB,EACvB,2BAA2B,GAE5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC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