@treasuredata/tdx 2026.3.42 → 2026.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/auth-login-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/commands/tables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x16d234=a49_0x5c76;(function(_0x1a2e20,_0x1907d7){const _0x4c0d0f=a49_0x5c76,_0x4be3bb=_0x1a2e20();while(!![]){try{const _0x3d1393=parseInt(_0x4c0d0f(0x74))/0x1*(-parseInt(_0x4c0d0f(0x82))/0x2)+-parseInt(_0x4c0d0f(0x9c))/0x3+parseInt(_0x4c0d0f(0x90))/0x4*(parseInt(_0x4c0d0f(0x78))/0x5)+parseInt(_0x4c0d0f(0x77))/0x6*(-parseInt(_0x4c0d0f(0x80))/0x7)+parseInt(_0x4c0d0f(0xa9))/0x8+-parseInt(_0x4c0d0f(0x8d))/0x9*(parseInt(_0x4c0d0f(0xa7))/0xa)+parseInt(_0x4c0d0f(0xa0))/0xb*(parseInt(_0x4c0d0f(0x98))/0xc);if(_0x3d1393===_0x1907d7)break;else _0x4be3bb['push'](_0x4be3bb['shift']());}catch(_0x5c3790){_0x4be3bb['push'](_0x4be3bb['shift']());}}}(a49_0x4fed,0x24cdd));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';function a49_0x5c76(_0x57057b,_0x1fb5e2){_0x57057b=_0x57057b-0x73;const _0x4fed3b=a49_0x4fed();let _0x5c7666=_0x4fed3b[_0x57057b];return _0x5c7666;}import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';function a49_0x4fed(){const _0xdc78d5=['tables','Database\x20pattern:\x20','11HGmGin','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Error:\x20','site','table','database_name','290STjXSa','Listing\x20tables...','1249912UufDdU','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Table\x20pattern:\x20','1elwZKE','length','error','6fqZawf','1506705oglssw','cause','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Error:\x20Pattern\x20\x27','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','query','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','description','1398376UzujbW','\x20\x20Use:\x20tdx\x20tables\x20\x22','119842PLyLUK','table_name','📋\x20','Database\x20\x27','includes','limit','\x20table','message','verbose','List\x20tables\x20in\x20a\x20database','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','69678CNgAte','\x20\x20Cause:\x20','\x27\x20is\x20ambiguous.','4ghWqrk','name','✔\x20Found\x20','Database:\x20','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Site:\x20','✖\x20No\x20tables\x20found','listTables','2648556sZRuxG','Or\x20use\x20--in\x20flag:','log','database','130011gzKrgK','validate'];a49_0x4fed=function(){return _0xdc78d5;};return a49_0x4fed();}import{withSpinner}from'../utils/spinner.js';export class TablesCommand extends BaseCommand{[a49_0x16d234(0x91)]=a49_0x16d234(0x9e);[a49_0x16d234(0x7f)]=a49_0x16d234(0x8b);async['execute'](_0x94eff6){const _0x39d745=a49_0x16d234,{options:_0x31ab6b,args:_0x12bd7e,tdx:_0x4ae90c}=_0x94eff6;let _0x4df2bd;if(_0x12bd7e['length']===0x0)_0x4df2bd={'database':undefined,'table':undefined,'original':''};else{if(_0x12bd7e['length']===0x1)try{_0x4df2bd=parseTableReference(_0x12bd7e[0x0]);if(_0x4df2bd[_0x39d745(0xa5)]&&!_0x4df2bd[_0x39d745(0x9b)]&&!_0x4df2bd[_0x39d745(0xa5)][_0x39d745(0x86)]('*')&&!_0x4df2bd[_0x39d745(0xa5)][_0x39d745(0x86)]('?'))return console[_0x39d745(0x76)](_0x39d745(0x7b)+_0x12bd7e[0x0]+_0x39d745(0x8f)),console['error'](_0x39d745(0x7e)+_0x4df2bd['table']+'\x27?'),console[_0x39d745(0x76)](_0x39d745(0x81)+_0x4df2bd[_0x39d745(0xa5)]+'.*\x22'),console[_0x39d745(0x76)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'+_0x4df2bd[_0x39d745(0xa5)]),console[_0x39d745(0x76)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x4df2bd[_0x39d745(0xa5)]),console[_0x39d745(0x76)](''),console['error']('Note:\x20\x27'+_0x12bd7e[0x0]+_0x39d745(0xaa)+_0x4df2bd['table']+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x5ac668){return console[_0x39d745(0x76)](_0x39d745(0xa3)+_0x5ac668['message']),0x1;}else return console[_0x39d745(0x76)](_0x39d745(0xa1)),console[_0x39d745(0x76)](_0x39d745(0x7c)),console[_0x39d745(0x76)](_0x39d745(0x94)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb'),console['error'](_0x39d745(0x8c)),console[_0x39d745(0x76)](_0x39d745(0x99)),console[_0x39d745(0x76)](_0x39d745(0x7a)),0x1;}const _0x351d31=_0x31ab6b['database'];!_0x4df2bd[_0x39d745(0x9b)]&&_0x351d31&&(_0x4df2bd['database']=_0x351d31);try{const _0x2c7116=_0x5bd7f2=>_0x5bd7f2&&(_0x5bd7f2['includes']('*')||_0x5bd7f2[_0x39d745(0x86)]('?')),_0x2e4d6a=_0x2c7116(_0x4df2bd[_0x39d745(0x9b)]);_0x31ab6b[_0x39d745(0x8a)]&&(console['error'](_0x39d745(0x95)+_0x31ab6b[_0x39d745(0xa4)]),_0x4df2bd[_0x39d745(0x9b)]?_0x2e4d6a?console[_0x39d745(0x76)](_0x39d745(0x9f)+_0x4df2bd[_0x39d745(0x9b)]):console[_0x39d745(0x76)](_0x39d745(0x93)+_0x4df2bd[_0x39d745(0x9b)]):console[_0x39d745(0x76)]('Database:\x20all'),_0x4df2bd[_0x39d745(0xa5)]&&console[_0x39d745(0x76)](_0x39d745(0x73)+_0x4df2bd[_0x39d745(0xa5)]));const _0xfaa281=_0x4df2bd['database']&&!_0x2e4d6a?_0x4df2bd[_0x39d745(0x9b)]:undefined,_0x38a10d=_0x2e4d6a?_0x4df2bd['database']:undefined,_0x2d0eb0=_0x4df2bd[_0x39d745(0xa5)],_0x41c155=resolveLimit(_0x31ab6b[_0x39d745(0x87)],DEFAULT_LISTING_LIMIT),_0x15fc0c=await withSpinner(_0x39d745(0xa8),()=>_0x4ae90c[_0x39d745(0x7d)][_0x39d745(0x97)](_0xfaa281,_0x2d0eb0,_0x38a10d,_0x41c155),{'verbose':_0x31ab6b['verbose']}),_0x4d614e=_0x15fc0c['data'];if(_0x4d614e[_0x39d745(0x75)]===0x0&&_0x4df2bd[_0x39d745(0x9b)]&&!_0x2e4d6a)return console[_0x39d745(0x76)](_0x39d745(0x96)),console[_0x39d745(0x76)](_0x39d745(0x85)+_0x4df2bd[_0x39d745(0x9b)]+_0x39d745(0xa2)),0x1;console[_0x39d745(0x76)](_0x39d745(0x92)+_0x4d614e[_0x39d745(0x75)]+_0x39d745(0x88)+(_0x4d614e[_0x39d745(0x75)]!==0x1?'s':''));if(isStructuredFormat(_0x31ab6b))await handleSDKOutput(_0x4d614e,{..._0x31ab6b,'limit':_0x41c155});else for(const _0xeef1f6 of _0x4d614e){const _0x1da10e=_0xeef1f6[_0x39d745(0xa6)]?_0xeef1f6[_0x39d745(0xa6)]+'.':'';console[_0x39d745(0x9a)](_0x39d745(0x84)+_0x1da10e+_0xeef1f6[_0x39d745(0x83)]);}return 0x0;}catch(_0x158871){if(_0x158871 instanceof SDKError)return console[_0x39d745(0x76)]('Error:\x20'+_0x158871[_0x39d745(0x89)]),_0x158871[_0x39d745(0x79)]&&console[_0x39d745(0x76)](_0x39d745(0x8e)+_0x158871[_0x39d745(0x79)]),0x1;throw _0x158871;}}[a49_0x16d234(0x9d)](_0x2202c4){return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a50_0x2a0b(){const _0x215c40=['623768bbZHsf','llm_project','database','cas','session','agent','engage_workspace','log','Default\x20profile\x20','152568ZnSrCr','site','2Mhpfcu','green','cleared','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','unset','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas\x0a','Default\x20site\x20','message','tdx.json','dim','parent_segment','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x0aUpdated:\x20','193040oBzYTn','Usage:\x20tdx\x20unset\x20<resource>\x0a','profile','1213710bNNIjM','name','382271rZjerG','default','llm_agent','composable_audience','length','5007230iwGpmH','2387817SkLMbI','execute','Session\x20','56gCJrpf','8gFEjGQ'];a50_0x2a0b=function(){return _0x215c40;};return a50_0x2a0b();}function a50_0x3487(_0x3b7100,_0x4ceeed){_0x3b7100=_0x3b7100-0x1cd;const _0x2a0b46=a50_0x2a0b();let _0x348766=_0x2a0b46[_0x3b7100];return _0x348766;}const a50_0x7c3e89=a50_0x3487;(function(_0x320bc7,_0x31197e){const _0x559f4a=a50_0x3487,_0x718227=_0x320bc7();while(!![]){try{const _0x5d4135=-parseInt(_0x559f4a(0x1d0))/0x1+parseInt(_0x559f4a(0x1e6))/0x2*(parseInt(_0x559f4a(0x1e4))/0x3)+-parseInt(_0x559f4a(0x1da))/0x4*(-parseInt(_0x559f4a(0x1f3))/0x5)+parseInt(_0x559f4a(0x1ce))/0x6+-parseInt(_0x559f4a(0x1d9))/0x7*(-parseInt(_0x559f4a(0x1db))/0x8)+parseInt(_0x559f4a(0x1d6))/0x9+-parseInt(_0x559f4a(0x1d5))/0xa;if(_0x5d4135===_0x31197e)break;else _0x718227['push'](_0x718227['shift']());}catch(_0x27cda9){_0x718227['push'](_0x718227['shift']());}}}(a50_0x2a0b,0x5223c));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a50_0x302f26 from'chalk';import*as a50_0x4b265e from'node:path';export class UnsetCommand extends BaseCommand{[a50_0x7c3e89(0x1cf)]=a50_0x7c3e89(0x1ea);['description']='Clear\x20session-level\x20or\x20default\x20context\x20values';['validate'](_0x300e52){const _0x5d34db=a50_0x7c3e89,{args:_0x539d62,options:_0x4fc737}=_0x300e52,_0x52c0d7=_0x4fc737['default'];if(_0x539d62[_0x5d34db(0x1d4)]===0x0)return _0x5d34db(0x1f4)+_0x5d34db(0x1e9)+_0x5d34db(0x1eb)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x3cf125=_0x539d62[0x0],_0x25fb45=[_0x5d34db(0x1e5),_0x5d34db(0x1dd),'parent_segment',_0x5d34db(0x1dc),_0x5d34db(0x1e0),_0x5d34db(0x1cd),'engage_workspace',_0x5d34db(0x1de),_0x5d34db(0x1d3)];if(!_0x25fb45['includes'](_0x3cf125))return'Invalid\x20resource:\x20'+_0x3cf125+'.\x20Must\x20be\x20one\x20of:\x20'+_0x25fb45['join'](',\x20');if(_0x52c0d7&&_0x3cf125!=='site'&&_0x3cf125!==_0x5d34db(0x1cd))return _0x5d34db(0x1f1);return undefined;}async[a50_0x7c3e89(0x1d7)](_0x5ce1f8){const _0x4ae2e3=a50_0x7c3e89,{args:_0x5525fc,options:_0x43d951}=_0x5ce1f8,_0x31ffcf=_0x43d951[_0x4ae2e3(0x1d1)];cleanExpiredSessions();try{const _0x3e3bb8=_0x5525fc[0x0],_0x315a65=a50_0x4b265e['join'](getConfigDir(),_0x4ae2e3(0x1ee));if(_0x31ffcf){if(_0x3e3bb8==='site')return clearDefaultSiteFromUserConfig(),console['log'](_0x4ae2e3(0x1ec)+a50_0x302f26[_0x4ae2e3(0x1e7)](_0x4ae2e3(0x1e8))),console[_0x4ae2e3(0x1e2)](a50_0x302f26[_0x4ae2e3(0x1ef)](_0x4ae2e3(0x1f2)+_0x315a65)),0x0;if(_0x3e3bb8===_0x4ae2e3(0x1cd))return clearActiveProfileFromUserConfig(),console[_0x4ae2e3(0x1e2)](_0x4ae2e3(0x1e3)+a50_0x302f26[_0x4ae2e3(0x1e7)](_0x4ae2e3(0x1e8))),console[_0x4ae2e3(0x1e2)](a50_0x302f26[_0x4ae2e3(0x1ef)](_0x4ae2e3(0x1f2)+_0x315a65)),0x0;}const _0x43d902=getSessionID(_0x43d951[_0x4ae2e3(0x1df)]),_0x1270ef={'site':'site','database':_0x4ae2e3(0x1dd),'parent_segment':_0x4ae2e3(0x1f0),'llm_project':'llm_project','agent':_0x4ae2e3(0x1d2),'profile':_0x4ae2e3(0x1cd),'engage_workspace':_0x4ae2e3(0x1e1),'cas':_0x4ae2e3(0x1d3),'composable_audience':_0x4ae2e3(0x1d3)},_0x5bda5b=_0x1270ef[_0x3e3bb8];return _0x5bda5b&&(clearSessionContextField(_0x5bda5b,_0x43d951[_0x4ae2e3(0x1df)]),console[_0x4ae2e3(0x1e2)](_0x4ae2e3(0x1d8)+_0x3e3bb8+'\x20'+a50_0x302f26[_0x4ae2e3(0x1e7)](_0x4ae2e3(0x1e8))+'\x20'+a50_0x302f26[_0x4ae2e3(0x1ef)]('(session:\x20'+_0x43d902+')'))),0x0;}catch(_0x1d9ae5){return _0x1d9ae5 instanceof Error&&console['error']('Error:\x20'+_0x1d9ae5[_0x4ae2e3(0x1ed)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x21d22c=a51_0x4e82;(function(_0x448afb,_0x5b4626){const _0x125578=a51_0x4e82,_0x948244=_0x448afb();while(!![]){try{const _0x12bace=-parseInt(_0x125578(0x1b3))/0x1+parseInt(_0x125578(0x1bc))/0x2+parseInt(_0x125578(0x1c0))/0x3+-parseInt(_0x125578(0x1af))/0x4*(parseInt(_0x125578(0x1ab))/0x5)+parseInt(_0x125578(0x1c2))/0x6*(-parseInt(_0x125578(0x1b1))/0x7)+-parseInt(_0x125578(0x1ca))/0x8*(-parseInt(_0x125578(0x1a7))/0x9)+parseInt(_0x125578(0x1b8))/0xa;if(_0x12bace===_0x5b4626)break;else _0x948244['push'](_0x948244['shift']());}catch(_0x47dea1){_0x948244['push'](_0x948244['shift']());}}}(a51_0x196e,0xaf3cb));import{gt}from'semver';function a51_0x196e(){const _0x1eebdb=['next','log','255124OHIVcI','npm','1530277mvQVnc','error','774381YplIgn','...','dim','.bun/','Upgrade\x20failed\x20(exit\x20code\x20','1594500xKQaPd','pnpm','yarn','bun','1851304gmFhkv','Already\x20up\x20to\x20date\x20(','Checking\x20','install','1934991wFnzEq','argv','12phwIXC','red','Latest\x20version:','green','message','includes','yellow','Successfully\x20upgraded\x20to\x20','8BcZmYp','cyan','dryRun','join','toLowerCase','execPath','Would\x20run:','replace','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','add','Failed\x20to\x20run\x20','latest','execute','upgrade','name','6385707qQSFwr','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','Current\x20version:\x20','Current\x20version:','40EFqfpZ','Target\x20version:'];a51_0x196e=function(){return _0x1eebdb;};return a51_0x196e();}import a51_0x20ee48 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';function a51_0x4e82(_0x1b5957,_0x451dfc){_0x1b5957=_0x1b5957-0x1a3;const _0x196ed9=a51_0x196e();let _0x4e8249=_0x196ed9[_0x1b5957];return _0x4e8249;}import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME='@treasuredata/tdx';export function detectPackageManager(){const _0xeaad2f=a51_0x4e82,_0x373702=process[_0xeaad2f(0x1cf)][_0xeaad2f(0x1ce)](),_0x22d886=process[_0xeaad2f(0x1c1)][0x1]??'';if(_0x373702[_0xeaad2f(0x1c7)](_0xeaad2f(0x1bb))||_0x22d886[_0xeaad2f(0x1c7)](_0xeaad2f(0x1b6)))return _0xeaad2f(0x1bb);if(_0x22d886['includes'](_0xeaad2f(0x1b9)))return _0xeaad2f(0x1b9);if(_0x22d886['includes'](_0xeaad2f(0x1ba)))return'yarn';return _0xeaad2f(0x1b0);}export function buildInstallArgs(_0x35bdab,_0x388789){const _0x3fc674=a51_0x4e82;switch(_0x35bdab){case _0x3fc674(0x1ba):return['global',_0x3fc674(0x1d3),_0x388789];case _0x3fc674(0x1b9):return[_0x3fc674(0x1d3),'-g',_0x388789];default:return[_0x3fc674(0x1bf),'-g',_0x388789];}}export class UpgradeCommand extends BaseCommand{[a51_0x21d22c(0x1a6)]=a51_0x21d22c(0x1a5);['description']=a51_0x21d22c(0x1a8);async[a51_0x21d22c(0x1a4)](_0x3c854f){const _0x2446e9=a51_0x21d22c,{options:_0x16ca83,args:_0x178784}=_0x3c854f,_0x5a1715=!!_0x16ca83[_0x2446e9(0x1cc)],{next:_0x10f9bb,method:_0x306f4d}=_0x16ca83,_0x1a3d01=_0x10f9bb?_0x2446e9(0x1ad):loadReleaseChannel(),_0x199a0b=_0x1a3d01===_0x2446e9(0x1ad)?_0x2446e9(0x1ad):_0x2446e9(0x1a3),_0x1a7996=_0x178784[0x0]?String(_0x178784[0x0])[_0x2446e9(0x1d1)](/^v/,''):undefined,_0x329e77=getVersion();if(isDevVersion())return console[_0x2446e9(0x1b2)](a51_0x20ee48[_0x2446e9(0x1c8)](_0x2446e9(0x1d2))),console[_0x2446e9(0x1b2)](a51_0x20ee48[_0x2446e9(0x1b5)](_0x2446e9(0x1a9)+_0x329e77)),0x1;let _0x354b36;if(_0x1a7996)_0x354b36=_0x1a7996,console[_0x2446e9(0x1ae)](a51_0x20ee48[_0x2446e9(0x1b5)](_0x2446e9(0x1aa))+'\x20'+_0x329e77),console['log'](a51_0x20ee48[_0x2446e9(0x1b5)](_0x2446e9(0x1ac))+'\x20\x20'+a51_0x20ee48[_0x2446e9(0x1c5)](_0x1a7996)),console[_0x2446e9(0x1ae)]();else{console['log'](a51_0x20ee48[_0x2446e9(0x1b5)](_0x2446e9(0x1be)+PACKAGE_NAME+'@'+_0x199a0b+_0x2446e9(0x1b4)));try{_0x354b36=await fetchLatestVersion(_0x1a3d01);}catch(_0x4dd554){return console[_0x2446e9(0x1b2)](a51_0x20ee48[_0x2446e9(0x1c3)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x4dd554 instanceof Error?_0x4dd554[_0x2446e9(0x1c6)]:String(_0x4dd554)))),0x1;}if(!gt(_0x354b36,_0x329e77))return console[_0x2446e9(0x1ae)](a51_0x20ee48[_0x2446e9(0x1c5)](_0x2446e9(0x1bd)+_0x329e77+').')),0x0;console[_0x2446e9(0x1ae)](a51_0x20ee48[_0x2446e9(0x1b5)](_0x2446e9(0x1aa))+'\x20'+_0x329e77),console['log'](a51_0x20ee48[_0x2446e9(0x1b5)](_0x2446e9(0x1c4))+'\x20\x20'+a51_0x20ee48[_0x2446e9(0x1c5)](_0x354b36)),console['log']();}const _0x2098dc=_0x306f4d??detectPackageManager(),_0x6ef733=_0x1a7996?PACKAGE_NAME+'@'+_0x1a7996:PACKAGE_NAME+'@'+_0x199a0b,_0xb6bfee=buildInstallArgs(_0x2098dc,_0x6ef733);if(_0x5a1715)return console[_0x2446e9(0x1ae)](a51_0x20ee48[_0x2446e9(0x1b5)](_0x2446e9(0x1d0))),console[_0x2446e9(0x1ae)]('\x20\x20'+a51_0x20ee48[_0x2446e9(0x1cb)](_0x2098dc+'\x20'+_0xb6bfee[_0x2446e9(0x1cd)]('\x20'))),0x0;return console[_0x2446e9(0x1ae)](a51_0x20ee48[_0x2446e9(0x1b5)]('Running:')+'\x20'+_0x2098dc+'\x20'+_0xb6bfee[_0x2446e9(0x1cd)]('\x20')),console[_0x2446e9(0x1ae)](),new Promise(_0x4198ad=>{const _0x861bdf=_0x2446e9,_0xbb9360=crossSpawn(_0x2098dc,_0xb6bfee,{'stdio':'inherit'});_0xbb9360['on']('close',_0x5af74b=>{const _0x2842f2=a51_0x4e82;console[_0x2842f2(0x1ae)](),_0x5af74b===0x0?console[_0x2842f2(0x1ae)](a51_0x20ee48[_0x2842f2(0x1c5)](_0x2842f2(0x1c9)+_0x6ef733)):console[_0x2842f2(0x1b2)](a51_0x20ee48[_0x2842f2(0x1c3)](_0x2842f2(0x1b7)+_0x5af74b+').')),_0x4198ad(_0x5af74b??0x1);}),_0xbb9360['on'](_0x861bdf(0x1b2),_0x6b6a94=>{const _0x40ae73=_0x861bdf;console[_0x40ae73(0x1b2)](a51_0x20ee48[_0x40ae73(0x1c3)](_0x40ae73(0x1d4)+_0x2098dc+':\x20'+_0x6b6a94[_0x40ae73(0x1c6)])),_0x4198ad(0x1);});});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a52_0x147a38=a52_0x25ff;(function(_0x5eb2ca,_0x2f1689){const _0x5c3554=a52_0x25ff,_0x3debe5=_0x5eb2ca();while(!![]){try{const _0x80377e=-parseInt(_0x5c3554(0x16d))/0x1*(-parseInt(_0x5c3554(0x19a))/0x2)+-parseInt(_0x5c3554(0x17e))/0x3+-parseInt(_0x5c3554(0x181))/0x4+parseInt(_0x5c3554(0x16f))/0x5+-parseInt(_0x5c3554(0x173))/0x6+-parseInt(_0x5c3554(0x165))/0x7+parseInt(_0x5c3554(0x1a1))/0x8*(-parseInt(_0x5c3554(0x1aa))/0x9);if(_0x80377e===_0x2f1689)break;else _0x3debe5['push'](_0x3debe5['shift']());}catch(_0x43dcb0){_0x3debe5['push'](_0x3debe5['shift']());}}}(a52_0xbb15,0xaf009));import{BaseCommand}from'./command.js';function a52_0xbb15(){const _0x1a01b8=['\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','validate','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','stable','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','NOT_FOUND','display','resolveWorkspaceId','218vrSicI','length','Session\x20engage_workspace\x20set\x20to:\x20','parent_segment','next','use','message','15784ngKKuJ','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','database','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','llm_project','Session\x20parent_segment\x20set\x20to:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a','description','747ppnsuc','code','green','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','session','agent','llm_agent','execute','join','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Set\x20session-level\x20context','engage','Session\x20profile\x20set\x20to:\x20','1892093AVWSMY','Error:\x20','release_channel','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aSaved\x20to:\x20','profile','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','11990ghgMXW','tdx.json','5676225cKsxZe','site','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','default','526146UqGsEn','log','error','tdx','engage_workspace','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','name','Invalid\x20resource:\x20','clear','Verifying\x20workspace\x20\x27','Invalid\x20release\x20channel:\x20','2542755oVHUCq','cas','Session\x20context\x20','1424048WPQQdg','Session\x20site\x20set\x20to:\x20','includes','Session\x20agent\x20set\x20to:\x20','(session:\x20','Error:\x20Profile\x20\x27','Default\x20site\x20set\x20to:\x20','\x27\x20to\x20save\x20permanently','composable_audience','dim','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','\x27\x20does\x20not\x20exist','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','Session\x20llm_project\x20set\x20to:\x20','displayWithSources'];a52_0xbb15=function(){return _0x1a01b8;};return a52_0xbb15();}import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a52_0x25ff(_0x2a5c14,_0x8f38c2){_0x2a5c14=_0x2a5c14-0x164;const _0xbb15c5=a52_0xbb15();let _0x25ff0e=_0xbb15c5[_0x2a5c14];return _0x25ff0e;}import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a52_0x4933d9 from'chalk';import*as a52_0x303ea0 from'node:path';export class UseCommand extends BaseCommand{[a52_0x147a38(0x179)]=a52_0x147a38(0x19f);[a52_0x147a38(0x1a9)]=a52_0x147a38(0x1b6);[a52_0x147a38(0x192)](_0x4ff514){const _0x4c2656=a52_0x147a38,{args:_0x5dfd48,options:_0x5853f7}=_0x4ff514,_0x503414=_0x5853f7[_0x4c2656(0x172)];if(_0x5dfd48[_0x4c2656(0x19b)]===0x0)return undefined;if(_0x5dfd48[_0x4c2656(0x19b)]===0x1)return _0x4c2656(0x178)+_0x4c2656(0x171)+_0x4c2656(0x1ad)+_0x4c2656(0x169)+_0x4c2656(0x16c)+_0x4c2656(0x193)+_0x4c2656(0x1a8)+_0x4c2656(0x1b5);const _0x26a019=_0x5dfd48[0x0],_0xf21c04=[_0x4c2656(0x170),'database','parent_segment','llm_project',_0x4c2656(0x1b0),_0x4c2656(0x16b),'engage_workspace',_0x4c2656(0x17f),_0x4c2656(0x189),'release_channel'];if(!_0xf21c04[_0x4c2656(0x183)](_0x26a019))return _0x4c2656(0x17a)+_0x26a019+'.\x20Must\x20be\x20one\x20of:\x20'+_0xf21c04[_0x4c2656(0x1b3)](',\x20');if(_0x503414&&_0x26a019!=='site'&&_0x26a019!==_0x4c2656(0x16b)&&_0x26a019!=='release_channel')return _0x4c2656(0x168);if(_0x26a019===_0x4c2656(0x167)&&!_0x503414)return _0x4c2656(0x1a4);if(_0x26a019===_0x4c2656(0x167)){const _0x192569=_0x5dfd48[0x1];if(_0x192569!==_0x4c2656(0x194)&&_0x192569!==_0x4c2656(0x19e))return _0x4c2656(0x17d)+_0x192569+_0x4c2656(0x1a7);}return undefined;}async[a52_0x147a38(0x1b2)](_0x1050d2){const _0x16d899=a52_0x147a38,{args:_0x1beeff,options:_0x2d17a8}=_0x1050d2,_0x52474c=_0x2d17a8['debug'],_0x5f1d42=_0x2d17a8[_0x16d899(0x17b)],_0x1629ae=_0x2d17a8[_0x16d899(0x172)];cleanExpiredSessions();try{if(_0x5f1d42){clearSessionContext(_0x2d17a8['session']);const _0x3a1574=getSessionID(_0x2d17a8['session']);return console[_0x16d899(0x174)](_0x16d899(0x180)+a52_0x4933d9[_0x16d899(0x1ac)]('cleared')+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x3a1574+')')),0x0;}if(_0x1beeff[_0x16d899(0x19b)]===0x0){const _0x4d8b20=new GlobalContext(_0x2d17a8);return _0x52474c?_0x4d8b20[_0x16d899(0x18f)]():_0x4d8b20[_0x16d899(0x198)](),console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x1b4))),console[_0x16d899(0x174)](a52_0x4933d9['dim'](_0x16d899(0x18d))),console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x191))),0x0;}const _0x231a9f=_0x1beeff[0x0],_0xcbca88=_0x1beeff[0x1],_0x47b873=a52_0x303ea0[_0x16d899(0x1b3)](getConfigDir(),_0x16d899(0x16e));if(_0x1629ae){if(_0x231a9f==='site')return saveDefaultSiteToUserConfig(_0xcbca88),console[_0x16d899(0x174)](_0x16d899(0x187)+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)),console[_0x16d899(0x174)](a52_0x4933d9['dim']('\x0aSaved\x20to:\x20'+_0x47b873)),0x0;if(_0x231a9f===_0x16d899(0x16b)){if(!profileExists(_0xcbca88))return console[_0x16d899(0x175)]('Error:\x20Profile\x20\x27'+_0xcbca88+_0x16d899(0x18c)),console[_0x16d899(0x175)](_0x16d899(0x196)),0x1;return saveActiveProfileToUserConfig(_0xcbca88),console[_0x16d899(0x174)]('Default\x20profile\x20set\x20to:\x20'+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)),console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)]('\x0aSaved\x20to:\x20'+_0x47b873)),0x0;}if(_0x231a9f==='release_channel')return saveReleaseChannel(_0xcbca88),console[_0x16d899(0x174)]('Release\x20channel\x20set\x20to:\x20'+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)),console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x16a)+_0x47b873)),_0xcbca88===_0x16d899(0x19e)?(console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x1a2))),console[_0x16d899(0x174)](a52_0x4933d9['dim']('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x18b))),0x0;}if(_0x231a9f===_0x16d899(0x170)){const _0x269fa9=getSessionID(_0x2d17a8['session']);return saveSessionContext({'site':_0xcbca88},_0x2d17a8[_0x16d899(0x1af)]),console[_0x16d899(0x174)](_0x16d899(0x182)+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x269fa9+')')),console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0xcbca88+'\x27\x20to\x20save\x20permanently')),0x0;}if(_0x231a9f===_0x16d899(0x16b)){if(!profileExists(_0xcbca88))return console[_0x16d899(0x175)](_0x16d899(0x186)+_0xcbca88+_0x16d899(0x18c)),console[_0x16d899(0x175)](_0x16d899(0x196)),0x1;const _0x275103=getSessionID(_0x2d17a8[_0x16d899(0x1af)]);return saveSessionContext({'profile':_0xcbca88},_0x2d17a8[_0x16d899(0x1af)]),console[_0x16d899(0x174)](_0x16d899(0x164)+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x275103+')')),console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x195)+_0xcbca88+_0x16d899(0x188))),0x0;}const _0x13f645={},_0x21d016=getSessionID(_0x2d17a8['session']);switch(_0x231a9f){case _0x16d899(0x1a3):_0x13f645[_0x16d899(0x1a3)]=_0xcbca88,console['log']('Session\x20database\x20set\x20to:\x20'+a52_0x4933d9['green'](_0xcbca88)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x21d016+')'));break;case _0x16d899(0x19d):_0x13f645[_0x16d899(0x19d)]=_0xcbca88,console[_0x16d899(0x174)](_0x16d899(0x1a6)+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x21d016+')'));break;case'llm_project':_0x13f645['llm_project']=_0xcbca88,console[_0x16d899(0x174)](_0x16d899(0x18e)+a52_0x4933d9['green'](_0xcbca88)+'\x20'+a52_0x4933d9['dim']('(session:\x20'+_0x21d016+')'));break;case _0x16d899(0x1b0):{const {projectName:_0xd6433b,agentName:_0x55c4dd}=parseAgentRef(_0xcbca88);_0x55c4dd?(_0x13f645[_0x16d899(0x1a5)]=_0xd6433b,_0x13f645[_0x16d899(0x1b1)]=_0x55c4dd,console[_0x16d899(0x174)]('Session\x20llm_project\x20set\x20to:\x20'+a52_0x4933d9[_0x16d899(0x1ac)](_0xd6433b)+'\x20'+a52_0x4933d9['dim'](_0x16d899(0x185)+_0x21d016+')')),console[_0x16d899(0x174)](_0x16d899(0x184)+a52_0x4933d9['green'](_0x55c4dd)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x21d016+')'))):(_0x13f645['llm_agent']=_0xcbca88,console[_0x16d899(0x174)]('Session\x20agent\x20set\x20to:\x20'+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x21d016+')')));break;}case'cas':case _0x16d899(0x189):_0x13f645[_0x16d899(0x189)]=_0xcbca88,console['log']('Session\x20composable_audience\x20set\x20to:\x20'+a52_0x4933d9[_0x16d899(0x1ac)](_0xcbca88)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x185)+_0x21d016+')'));break;case _0x16d899(0x177):{try{await withSpinner(_0x16d899(0x17c)+_0xcbca88+'\x27...',()=>_0x1050d2[_0x16d899(0x176)][_0x16d899(0x1b7)][_0x16d899(0x199)](_0xcbca88));}catch(_0x5bb488){if(_0x5bb488 instanceof SDKError&&(_0x5bb488['code']===ErrorCode[_0x16d899(0x197)]||_0x5bb488[_0x16d899(0x1ab)]===ErrorCode['INVALID_ARGUMENT']))return console[_0x16d899(0x175)](_0x16d899(0x166)+_0x5bb488[_0x16d899(0x1a0)]),console[_0x16d899(0x175)](_0x16d899(0x1ae)),0x1;throw _0x5bb488;}_0x13f645['engage_workspace']=_0xcbca88,console[_0x16d899(0x174)](_0x16d899(0x19c)+a52_0x4933d9['green'](_0xcbca88)+'\x20'+a52_0x4933d9[_0x16d899(0x18a)]('(session:\x20'+_0x21d016+')'));break;}}return saveSessionContext(_0x13f645,_0x2d17a8[_0x16d899(0x1af)]),console[_0x16d899(0x174)](a52_0x4933d9[_0x16d899(0x18a)](_0x16d899(0x190))),0x0;}catch(_0x4f5277){return _0x4f5277 instanceof Error&&console[_0x16d899(0x175)](_0x16d899(0x166)+_0x4f5277[_0x16d899(0x1a0)]),0x1;}}}
|
|
1
|
+
const a52_0x20def1=a52_0x482a;(function(_0x181dc9,_0x5b3445){const _0x5d28cf=a52_0x482a,_0x29548d=_0x181dc9();while(!![]){try{const _0x47c3c1=-parseInt(_0x5d28cf(0x1ec))/0x1+-parseInt(_0x5d28cf(0x1fc))/0x2*(parseInt(_0x5d28cf(0x21a))/0x3)+parseInt(_0x5d28cf(0x206))/0x4+-parseInt(_0x5d28cf(0x1d6))/0x5+parseInt(_0x5d28cf(0x1fe))/0x6*(-parseInt(_0x5d28cf(0x20d))/0x7)+-parseInt(_0x5d28cf(0x1e0))/0x8+parseInt(_0x5d28cf(0x1d5))/0x9*(parseInt(_0x5d28cf(0x1e1))/0xa);if(_0x47c3c1===_0x5b3445)break;else _0x29548d['push'](_0x29548d['shift']());}catch(_0x405561){_0x29548d['push'](_0x29548d['shift']());}}}(a52_0x371e,0xd8db5));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';function a52_0x482a(_0x265127,_0x51fbfb){_0x265127=_0x265127-0x1cf;const _0x371e33=a52_0x371e();let _0x482a67=_0x371e33[_0x265127];return _0x482a67;}import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';function a52_0x371e(){const _0x590161=['.\x20Must\x20be\x20one\x20of:\x20','27985779ojLPHY','2763490UmAwEd','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','database','Session\x20context\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','session','\x27...','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','5319560BpSSdd','10zrBEMG','Error:\x20Profile\x20\x27','default','log','engage_workspace','execute','Invalid\x20release\x20channel:\x20','next','clear','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','Session\x20parent_segment\x20set\x20to:\x20','826395VJWiEv','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','dim','includes','site','composable_audience','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20current\x20context\x0a','(session:\x20','cas','llm_project','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','release_channel','cleared','Session\x20site\x20set\x20to:\x20','tdx','4870HRybfA','tdx.json','162NNFLHl','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x27\x20to\x20save\x20permanently','message','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','displayWithSources','Session\x20agent\x20set\x20to:\x20','stable','3712692bKKyVo','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','Default\x20site\x20set\x20to:\x20','Release\x20channel\x20set\x20to:\x20','Session\x20composable_audience\x20set\x20to:\x20','NOT_FOUND','Session\x20engage_workspace\x20set\x20to:\x20','121191LurlhU','Session\x20profile\x20set\x20to:\x20','validate','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a','description','profile','green','length','Error:\x20','Set\x20session-level\x20context','display','parent_segment','join','786rnNqzA','code','Default\x20profile\x20set\x20to:\x20','agent','error','\x27\x20does\x20not\x20exist','\x0aSaved\x20to:\x20'];a52_0x371e=function(){return _0x590161;};return a52_0x371e();}import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';import{withSpinner}from'../utils/spinner.js';import a52_0x5f0739 from'chalk';import*as a52_0x3d917c from'node:path';export class UseCommand extends BaseCommand{['name']='use';[a52_0x20def1(0x211)]=a52_0x20def1(0x216);[a52_0x20def1(0x20f)](_0x631848){const _0x3b7356=a52_0x20def1,{args:_0x5d0713,options:_0x20472d}=_0x631848,_0x496cce=_0x20472d[_0x3b7356(0x1e3)];if(_0x5d0713[_0x3b7356(0x214)]===0x0)return undefined;if(_0x5d0713[_0x3b7356(0x214)]===0x1)return _0x3b7356(0x1f7)+_0x3b7356(0x1f3)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+_0x3b7356(0x1d7)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x3b7356(0x1ed)+_0x3b7356(0x210)+_0x3b7356(0x1ff);const _0x3c768b=_0x5d0713[0x0],_0x3099a5=[_0x3b7356(0x1f0),_0x3b7356(0x1d9),_0x3b7356(0x218),_0x3b7356(0x1f6),_0x3b7356(0x1d0),_0x3b7356(0x212),_0x3b7356(0x1e5),_0x3b7356(0x1f5),'composable_audience',_0x3b7356(0x1f8)];if(!_0x3099a5[_0x3b7356(0x1ef)](_0x3c768b))return'Invalid\x20resource:\x20'+_0x3c768b+_0x3b7356(0x1d4)+_0x3099a5[_0x3b7356(0x219)](',\x20');if(_0x496cce&&_0x3c768b!=='site'&&_0x3c768b!==_0x3b7356(0x212)&&_0x3c768b!==_0x3b7356(0x1f8))return _0x3b7356(0x1df);if(_0x3c768b===_0x3b7356(0x1f8)&&!_0x496cce)return _0x3b7356(0x202);if(_0x3c768b===_0x3b7356(0x1f8)){const _0xf3e9db=_0x5d0713[0x1];if(_0xf3e9db!==_0x3b7356(0x205)&&_0xf3e9db!==_0x3b7356(0x1e8))return _0x3b7356(0x1e7)+_0xf3e9db+_0x3b7356(0x1d8);}return undefined;}async[a52_0x20def1(0x1e6)](_0x3c3768){const _0x1b639c=a52_0x20def1,{args:_0x17f1af,options:_0x1d56b3}=_0x3c3768,_0x412707=_0x1d56b3['debug'],_0x495034=_0x1d56b3[_0x1b639c(0x1e9)],_0x1bfa52=_0x1d56b3[_0x1b639c(0x1e3)];cleanExpiredSessions();try{if(_0x495034){clearSessionContext(_0x1d56b3[_0x1b639c(0x1dc)]);const _0x28ff02=getSessionID(_0x1d56b3[_0x1b639c(0x1dc)]);return console[_0x1b639c(0x1e4)](_0x1b639c(0x1da)+a52_0x5f0739[_0x1b639c(0x213)](_0x1b639c(0x1f9))+'\x20'+a52_0x5f0739['dim'](_0x1b639c(0x1f4)+_0x28ff02+')')),0x0;}if(_0x17f1af[_0x1b639c(0x214)]===0x0){const _0x539261=new GlobalContext(_0x1d56b3);return _0x412707?_0x539261[_0x1b639c(0x203)]():_0x539261[_0x1b639c(0x217)](),console[_0x1b639c(0x1e4)](a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1ea))),console[_0x1b639c(0x1e4)](a52_0x5f0739[_0x1b639c(0x1ee)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console['log'](a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x207))),0x0;}const _0x18d40a=_0x17f1af[0x0],_0x426e05=_0x17f1af[0x1],_0x5938ea=a52_0x3d917c[_0x1b639c(0x219)](getConfigDir(),_0x1b639c(0x1fd));if(_0x1bfa52){if(_0x18d40a===_0x1b639c(0x1f0))return saveDefaultSiteToUserConfig(_0x426e05),console[_0x1b639c(0x1e4)](_0x1b639c(0x208)+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)),console['log'](a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1d3)+_0x5938ea)),0x0;if(_0x18d40a===_0x1b639c(0x212)){if(!profileExists(_0x426e05))return console[_0x1b639c(0x1d1)]('Error:\x20Profile\x20\x27'+_0x426e05+_0x1b639c(0x1d2)),console[_0x1b639c(0x1d1)]('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;return saveActiveProfileToUserConfig(_0x426e05),console[_0x1b639c(0x1e4)](_0x1b639c(0x1cf)+a52_0x5f0739['green'](_0x426e05)),console[_0x1b639c(0x1e4)](a52_0x5f0739[_0x1b639c(0x1ee)]('\x0aSaved\x20to:\x20'+_0x5938ea)),0x0;}if(_0x18d40a===_0x1b639c(0x1f8))return saveReleaseChannel(_0x426e05),console[_0x1b639c(0x1e4)](_0x1b639c(0x209)+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)),console['log'](a52_0x5f0739[_0x1b639c(0x1ee)]('\x0aSaved\x20to:\x20'+_0x5938ea)),_0x426e05===_0x1b639c(0x1e8)?(console[_0x1b639c(0x1e4)](a52_0x5f0739[_0x1b639c(0x1ee)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x1b639c(0x1e4)](a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1de)))):console['log'](a52_0x5f0739['dim']('\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.')),0x0;}if(_0x18d40a===_0x1b639c(0x1f0)){const _0x5135db=getSessionID(_0x1d56b3[_0x1b639c(0x1dc)]);return saveSessionContext({'site':_0x426e05},_0x1d56b3['session']),console[_0x1b639c(0x1e4)](_0x1b639c(0x1fa)+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1f4)+_0x5135db+')')),console['log'](a52_0x5f0739[_0x1b639c(0x1ee)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x426e05+_0x1b639c(0x200))),0x0;}if(_0x18d40a===_0x1b639c(0x212)){if(!profileExists(_0x426e05))return console[_0x1b639c(0x1d1)](_0x1b639c(0x1e2)+_0x426e05+_0x1b639c(0x1d2)),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x52697f=getSessionID(_0x1d56b3[_0x1b639c(0x1dc)]);return saveSessionContext({'profile':_0x426e05},_0x1d56b3['session']),console[_0x1b639c(0x1e4)](_0x1b639c(0x20e)+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1f4)+_0x52697f+')')),console[_0x1b639c(0x1e4)](a52_0x5f0739[_0x1b639c(0x1ee)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x426e05+_0x1b639c(0x200))),0x0;}const _0x754a0d={},_0x2ca3bb=getSessionID(_0x1d56b3[_0x1b639c(0x1dc)]);switch(_0x18d40a){case _0x1b639c(0x1d9):_0x754a0d['database']=_0x426e05,console[_0x1b639c(0x1e4)]('Session\x20database\x20set\x20to:\x20'+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)+'\x20'+a52_0x5f0739['dim'](_0x1b639c(0x1f4)+_0x2ca3bb+')'));break;case _0x1b639c(0x218):_0x754a0d[_0x1b639c(0x218)]=_0x426e05,console['log'](_0x1b639c(0x1eb)+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1f4)+_0x2ca3bb+')'));break;case _0x1b639c(0x1f6):_0x754a0d[_0x1b639c(0x1f6)]=_0x426e05,console[_0x1b639c(0x1e4)]('Session\x20llm_project\x20set\x20to:\x20'+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1f4)+_0x2ca3bb+')'));break;case _0x1b639c(0x1d0):{const {projectName:_0x1acc12,agentName:_0x497b6a}=parseAgentRef(_0x426e05);_0x497b6a?(_0x754a0d[_0x1b639c(0x1f6)]=_0x1acc12,_0x754a0d['llm_agent']=_0x497b6a,console[_0x1b639c(0x1e4)]('Session\x20llm_project\x20set\x20to:\x20'+a52_0x5f0739[_0x1b639c(0x213)](_0x1acc12)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1f4)+_0x2ca3bb+')')),console['log'](_0x1b639c(0x204)+a52_0x5f0739[_0x1b639c(0x213)](_0x497b6a)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)]('(session:\x20'+_0x2ca3bb+')'))):(_0x754a0d['llm_agent']=_0x426e05,console[_0x1b639c(0x1e4)](_0x1b639c(0x204)+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1f4)+_0x2ca3bb+')')));break;}case _0x1b639c(0x1f5):case _0x1b639c(0x1f1):_0x754a0d['composable_audience']=_0x426e05,console[_0x1b639c(0x1e4)](_0x1b639c(0x20a)+a52_0x5f0739[_0x1b639c(0x213)](_0x426e05)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1f4)+_0x2ca3bb+')'));break;case'engage_workspace':{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x426e05+_0x1b639c(0x1dd),()=>_0x3c3768[_0x1b639c(0x1fb)]['engage']['resolveWorkspaceId'](_0x426e05));}catch(_0x4966cd){if(_0x4966cd instanceof SDKError&&(_0x4966cd[_0x1b639c(0x21b)]===ErrorCode[_0x1b639c(0x20b)]||_0x4966cd[_0x1b639c(0x21b)]===ErrorCode['INVALID_ARGUMENT']))return console[_0x1b639c(0x1d1)](_0x1b639c(0x215)+_0x4966cd[_0x1b639c(0x201)]),console[_0x1b639c(0x1d1)](_0x1b639c(0x1f2)),0x1;throw _0x4966cd;}_0x754a0d['engage_workspace']=_0x426e05,console[_0x1b639c(0x1e4)](_0x1b639c(0x20c)+a52_0x5f0739['green'](_0x426e05)+'\x20'+a52_0x5f0739[_0x1b639c(0x1ee)]('(session:\x20'+_0x2ca3bb+')'));break;}}return saveSessionContext(_0x754a0d,_0x1d56b3[_0x1b639c(0x1dc)]),console[_0x1b639c(0x1e4)](a52_0x5f0739[_0x1b639c(0x1ee)](_0x1b639c(0x1db))),0x0;}catch(_0x5cbc21){return _0x5cbc21 instanceof Error&&console['error'](_0x1b639c(0x215)+_0x5cbc21[_0x1b639c(0x201)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a53_0x1933(_0x4f6940,_0x169b73){_0x4f6940=_0x4f6940-0x19f;const _0x5cb81f=a53_0x5cb8();let _0x1933a6=_0x5cb81f[_0x4f6940];return _0x1933a6;}const a53_0x52df2b=a53_0x1933;(function(_0x3d9278,_0x7554f){const _0x55e80b=a53_0x1933,_0x1d1a68=_0x3d9278();while(!![]){try{const _0x4c99a1=-parseInt(_0x55e80b(0x1af))/0x1*(parseInt(_0x55e80b(0x1b8))/0x2)+parseInt(_0x55e80b(0x1b7))/0x3*(-parseInt(_0x55e80b(0x1be))/0x4)+parseInt(_0x55e80b(0x1b3))/0x5*(parseInt(_0x55e80b(0x1a8))/0x6)+parseInt(_0x55e80b(0x1b4))/0x7*(-parseInt(_0x55e80b(0x1b6))/0x8)+-parseInt(_0x55e80b(0x1a4))/0x9*(-parseInt(_0x55e80b(0x1c3))/0xa)+parseInt(_0x55e80b(0x1c4))/0xb*(-parseInt(_0x55e80b(0x1a5))/0xc)+parseInt(_0x55e80b(0x1aa))/0xd*(parseInt(_0x55e80b(0x1b2))/0xe);if(_0x4c99a1===_0x7554f)break;else _0x1d1a68['push'](_0x1d1a68['shift']());}catch(_0x27fc89){_0x1d1a68['push'](_0x1d1a68['shift']());}}}(a53_0x5cb8,0x8944c));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import a53_0x4cf5a2 from'chalk';function a53_0x5cb8(){const _0x3eb112=['yellow','10sZjKXa','11721809jHfriv','Error:\x20','user','data','cause','localeCompare','Show\x20current\x20user\x20information','8970543gHpmLq','12tevppf','Unknown','Listing\x20users...','227034mAGthi','log','514813AcpiOk','execute','name','message','error','417XdLJAh','List\x20all\x20users\x20in\x20the\x20account','✔\x20Found\x20','98wRWbAL','135YWjbVp','163303vKCuTL','user\x20list','8rCUIQo','87BJWcPj','1446WRHEdq','dim','\x20user','verbose','getCurrent','👤\x20','47296NJuWjv','\x20\x20Cause:\x20','email','sort'];a53_0x5cb8=function(){return _0x3eb112;};return a53_0x5cb8();}export class UserCommand extends BaseCommand{[a53_0x52df2b(0x1ac)]='user';['description']=a53_0x52df2b(0x1a3);async[a53_0x52df2b(0x1ab)](_0x55a9f7){const _0x36418c=a53_0x52df2b,{options:_0x399156,tdx:_0x4a804c}=_0x55a9f7;try{const _0x17cec3=await withSpinner('Fetching\x20user\x20info...',()=>_0x4a804c['user'][_0x36418c(0x1bc)](),{'verbose':_0x399156[_0x36418c(0x1bb)]}),_0x460ffd=_0x17cec3[_0x36418c(0x1a0)];return await handleSingleObjectOutput(_0x460ffd,_0x399156),0x0;}catch(_0xbef11b){if(_0xbef11b instanceof SDKError)return console['error']('Error:\x20'+_0xbef11b[_0x36418c(0x1ad)]),_0xbef11b['cause']&&console['error'](_0x36418c(0x1bf)+_0xbef11b[_0x36418c(0x1a1)]),0x1;throw _0xbef11b;}}}export class UserListCommand extends BaseCommand{[a53_0x52df2b(0x1ac)]=a53_0x52df2b(0x1b5);['description']=a53_0x52df2b(0x1b0);async['execute'](_0x4399dc){const _0xebe296=a53_0x52df2b,{options:_0xb88140,tdx:_0x435bff}=_0x4399dc;try{const _0x56bef1=await withSpinner(_0xebe296(0x1a7),()=>_0x435bff[_0xebe296(0x19f)]['list'](),{'verbose':_0xb88140[_0xebe296(0x1bb)]}),_0x1735b8=_0x56bef1[_0xebe296(0x1a0)];console[_0xebe296(0x1ae)](_0xebe296(0x1b1)+_0x1735b8['length']+_0xebe296(0x1ba)+(_0x1735b8['length']!==0x1?'s':''));if(isStructuredFormat(_0xb88140))await handleSDKOutput(_0x1735b8,_0xb88140);else{const _0x1df773=[..._0x1735b8][_0xebe296(0x1c1)]((_0x2ce8eb,_0x2ee726)=>String(_0x2ce8eb['name']??'')[_0xebe296(0x1a2)](String(_0x2ee726['name']??'')));for(const _0x32c0dc of _0x1df773){const _0x141267=_0x32c0dc['account_owner']?a53_0x4cf5a2['yellow']('\x20(owner)'):_0x32c0dc['administrator']?a53_0x4cf5a2[_0xebe296(0x1c2)]('\x20(admin)'):'',_0x3395d9=_0x32c0dc['email']&&_0x32c0dc['email']!==_0x32c0dc['name']?a53_0x4cf5a2[_0xebe296(0x1b9)]('\x20<'+_0x32c0dc[_0xebe296(0x1c0)]+'>'):'';console[_0xebe296(0x1a9)](_0xebe296(0x1bd)+(_0x32c0dc[_0xebe296(0x1ac)]??_0xebe296(0x1a6))+_0x3395d9+_0x141267);}}return 0x0;}catch(_0x47cea9){if(_0x47cea9 instanceof SDKError)return console['error'](_0xebe296(0x1c5)+_0x47cea9[_0xebe296(0x1ad)]),_0x47cea9['cause']&&console['error']('\x20\x20Cause:\x20'+_0x47cea9[_0xebe296(0x1a1)]),0x1;throw _0x47cea9;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a54_0x176250=a54_0x4fb2;(function(_0x583424,_0x3ca82a){const _0x53a95f=a54_0x4fb2,_0xc2fb2b=_0x583424();while(!![]){try{const _0x28f7fa=parseInt(_0x53a95f(0x14a))/0x1*(-parseInt(_0x53a95f(0x14f))/0x2)+-parseInt(_0x53a95f(0x17a))/0x3+parseInt(_0x53a95f(0x184))/0x4*(-parseInt(_0x53a95f(0x16d))/0x5)+parseInt(_0x53a95f(0x198))/0x6*(parseInt(_0x53a95f(0x15a))/0x7)+-parseInt(_0x53a95f(0x17f))/0x8+-parseInt(_0x53a95f(0x16f))/0x9*(parseInt(_0x53a95f(0x19e))/0xa)+parseInt(_0x53a95f(0x192))/0xb*(parseInt(_0x53a95f(0x176))/0xc);if(_0x28f7fa===_0x3ca82a)break;else _0xc2fb2b['push'](_0xc2fb2b['shift']());}catch(_0x2b7229){_0xc2fb2b['push'](_0xc2fb2b['shift']());}}}(a54_0x1f56,0x1fa42));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';function a54_0x4fb2(_0x5bc703,_0x1d607b){_0x5bc703=_0x5bc703-0x145;const _0x1f56e2=a54_0x1f56();let _0x4fb2d3=_0x1f56e2[_0x5bc703];return _0x4fb2d3;}import a54_0xc62787 from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x4c53d4){const _0x247f82=a54_0x4fb2;if(_0x4c53d4[_0x247f82(0x167)])return{'includeStale':!![]};if(_0x4c53d4[_0x247f82(0x18f)])return{'updatedWithin':parseInt(_0x4c53d4[_0x247f82(0x18f)],0xa)};return undefined;}const VALID_KINDS=new Set(['item',a54_0x176250(0x156),'guide',a54_0x176250(0x191),a54_0x176250(0x165),a54_0x176250(0x172),a54_0x176250(0x164)]),VALID_PRIORITIES=new Set(['critical','high',a54_0x176250(0x1a5),a54_0x176250(0x18b)]),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0xbd69ac=a54_0x176250,_0x9b3cad=resolveWorkspacePath();return!_0x9b3cad&&(console[_0xbd69ac(0x1a9)](chalk[_0xbd69ac(0x146)](_0xbd69ac(0x148))+_0xbd69ac(0x1a1)+chalk[_0xbd69ac(0x15c)](_0xbd69ac(0x19f))+'\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.'),process[_0xbd69ac(0x182)](0x1)),new WorkspaceSDK(_0x9b3cad);}function priorityDot(_0xfa7bfe){const _0x38f629=a54_0x176250;switch(_0xfa7bfe){case'critical':return chalk[_0x38f629(0x146)]('●');case _0x38f629(0x171):return chalk[_0x38f629(0x16c)]('●');case _0x38f629(0x1a5):return chalk[_0x38f629(0x159)]('●');case _0x38f629(0x18b):return chalk[_0x38f629(0x18e)]('●');default:return chalk[_0x38f629(0x159)]('●');}}function statusColor(_0x366c99){const _0x3e0246=a54_0x176250;switch(_0x366c99){case _0x3e0246(0x1a0):return chalk[_0x3e0246(0x161)](_0x366c99);case'void':return chalk['gray'](_0x366c99);case _0x3e0246(0x16e):return chalk[_0x3e0246(0x15c)](_0x366c99);case _0x3e0246(0x16b):return chalk[_0x3e0246(0x183)](_0x366c99);case _0x3e0246(0x1aa):case _0x3e0246(0x180):return chalk[_0x3e0246(0x16c)](_0x366c99);case _0x3e0246(0x154):return chalk[_0x3e0246(0x166)](_0x366c99);case _0x3e0246(0x145):return chalk[_0x3e0246(0x194)](_0x366c99);default:return _0x366c99;}}export async function workSummaryAction(_0x2c8b1c){const _0x107cd3=a54_0x176250,_0x201bbf=getSDK(),_0x4987b8=buildStaleFilter(_0x2c8b1c),_0x6ce936=_0x201bbf[_0x107cd3(0x186)](_0x4987b8);console[_0x107cd3(0x179)](chalk[_0x107cd3(0x18a)](_0x107cd3(0x15e)+_0x6ce936[_0x107cd3(0x188)])),console['log'](chalk['dim'](_0x6ce936[_0x107cd3(0x1a2)])),console[_0x107cd3(0x179)]();const _0x4303d1=Object[_0x107cd3(0x16a)](_0x6ce936['taskCounts'])[_0x107cd3(0x175)]((_0x43aa6b,_0x3d1de9)=>_0x43aa6b+_0x3d1de9,0x0);if(_0x4303d1===0x0)console['log'](chalk[_0x107cd3(0x194)](_0x107cd3(0x158)));else{console[_0x107cd3(0x179)](chalk['bold'](_0x107cd3(0x150)));for(const [_0xbbe66,_0x22186e]of Object[_0x107cd3(0x15d)](_0x6ce936[_0x107cd3(0x157)])){_0x22186e>0x0&&console[_0x107cd3(0x179)]('\x20\x20'+statusColor(_0xbbe66)+':\x20'+_0x22186e);}console[_0x107cd3(0x179)]();}if(_0x6ce936[_0x107cd3(0x15f)][_0x107cd3(0x15b)]>0x0){console[_0x107cd3(0x179)](chalk[_0x107cd3(0x18a)]('Goals'));for(const _0x240c95 of _0x6ce936[_0x107cd3(0x15f)]){const _0x1b6d79=progressBar(_0x240c95[_0x107cd3(0x19a)]);console[_0x107cd3(0x179)]('\x20\x20'+_0x240c95[_0x107cd3(0x155)]+'\x20'+_0x1b6d79+'\x20'+_0x240c95[_0x107cd3(0x19a)]+'%');}}}function progressBar(_0x5a362b){const _0x384198=a54_0x176250,_0x152be5=0x14,_0x1a4f2a=Math['round'](_0x5a362b/0x64*_0x152be5),_0x4ec752=_0x152be5-_0x1a4f2a;return chalk[_0x384198(0x161)]('█'[_0x384198(0x1a8)](_0x1a4f2a))+chalk['dim']('░'[_0x384198(0x1a8)](_0x4ec752));}export async function workInitAction(_0x2ee564,_0x169ebd){const _0x1ccf95=a54_0x176250,_0x1df86e=_0x2ee564||a54_0xc62787[_0x1ccf95(0x1a3)](process['cwd']());if(_0x169ebd[_0x1ccf95(0x14e)]){const _0x244868=WorkspaceSDK[_0x1ccf95(0x178)](_0x1df86e,{'github':_0x169ebd[_0x1ccf95(0x14e)]});console[_0x1ccf95(0x179)](chalk[_0x1ccf95(0x161)](_0x1ccf95(0x18c))+'\x20'+_0x244868[_0x1ccf95(0x170)]),console[_0x1ccf95(0x179)](chalk['dim'](_0x1ccf95(0x19c)+_0x169ebd[_0x1ccf95(0x14e)]));}else{if(_0x2ee564){const _0xa16bd7=WorkspaceSDK[_0x1ccf95(0x178)](_0x2ee564);console[_0x1ccf95(0x179)](chalk[_0x1ccf95(0x161)]('Workspace\x20initialized:')+'\x20'+_0xa16bd7[_0x1ccf95(0x170)]);}else{const _0x4cdb6f=new WorkspaceSDK(process['cwd']());_0x4cdb6f[_0x1ccf95(0x163)](_0x1df86e),console['log'](chalk[_0x1ccf95(0x161)](_0x1ccf95(0x17e)));}}}export async function workNewAction(_0x162a23,_0x2d44d4){const _0x2be160=a54_0x176250,_0x147315=getSDK(),_0x11678b=_0x2d44d4[_0x2be160(0x199)]||'item';!VALID_KINDS['has'](_0x11678b)&&(console[_0x2be160(0x1a9)](chalk[_0x2be160(0x146)](_0x2be160(0x1a7)+_0x11678b+_0x2be160(0x147)+[...VALID_KINDS]['join'](',\x20'))),process[_0x2be160(0x182)](0x1));_0x2d44d4[_0x2be160(0x174)]&&!VALID_PRIORITIES[_0x2be160(0x17d)](_0x2d44d4[_0x2be160(0x174)])&&(console[_0x2be160(0x1a9)](chalk['red']('Invalid\x20priority:\x20'+_0x2d44d4[_0x2be160(0x174)]+_0x2be160(0x147)+[...VALID_PRIORITIES]['join'](',\x20'))),process[_0x2be160(0x182)](0x1));_0x2d44d4['status']&&!VALID_STATUSES[_0x2be160(0x17d)](_0x2d44d4['status'])&&(console[_0x2be160(0x1a9)](chalk['red'](_0x2be160(0x14c)+_0x2d44d4[_0x2be160(0x185)]+_0x2be160(0x147)+[...VALID_STATUSES][_0x2be160(0x17b)](',\x20'))),process[_0x2be160(0x182)](0x1));const _0x3a27e5=_0x2d44d4['tags']?_0x2d44d4[_0x2be160(0x168)][_0x2be160(0x19b)](',')[_0x2be160(0x152)](_0x1d511b=>_0x1d511b['trim']()):undefined,_0x21872b=_0x147315[_0x2be160(0x181)]({'title':_0x162a23,'kind':_0x11678b,'tags':_0x3a27e5,'priority':_0x2d44d4[_0x2be160(0x174)],'body':_0x2d44d4[_0x2be160(0x196)],'template':_0x2d44d4[_0x2be160(0x164)],'status':_0x2d44d4['status'],'assignee':_0x2d44d4['assignee']});console[_0x2be160(0x179)](chalk[_0x2be160(0x161)]('Created:')+'\x20'+_0x21872b[_0x2be160(0x195)]),console[_0x2be160(0x179)](chalk['dim'](_0x21872b[_0x2be160(0x1a4)]));}function a54_0x1f56(){const _0x2e40f9=['getTasksByStatus','Invalid\x20status:\x20','frontmatter','github','2306AASEsh','Tasks','getBacklinks','map','Backlinks','todo','title','goal','taskCounts','No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>','blue','1197KLVtvV','length','cyan','entries','Workspace:\x20','goals','Incoming','green','\x20[[','init','template','reference','white','all','tags','inherit','values','review','yellow','473455sHXQdF','in_progress','290097uAqYqB','workspacePath','high','workflow','displayText','priority','reduce','9039912UOYnMk','moveTask','initAt','log','305874cAvvsG','join','\x20\x20←\x20','has','Workspace\x20initialized\x20in\x20current\x20directory','1956568eEoQpd','design_review','createDocument','exit','magenta','8Ybazuc','status','getSummary','Document\x20not\x20found:\x20','name','readDocument','bold','low','Workspace\x20initialized:','trim','gray','days','Failed\x20to\x20open\x20editor:\x20','note','11apFLad','underline','dim','fileName','body','slug','5652DyMoII','kind','progress','split','Linked\x20to\x20GitHub:\x20','Moved:','30gMkfwF','tdx\x20work\x20init\x20<name>','done','\x20Run\x20','path','basename','filePath','medium','resolveWikiLinks','Invalid\x20kind:\x20','repeat','error','planning','backlog','red','.\x20Valid:\x20','No\x20workspace\x20found.','resolvedKind','132LAkaTZ'];a54_0x1f56=function(){return _0x2e40f9;};return a54_0x1f56();}export async function workMoveAction(_0x2f17e3,_0x27ae68){const _0x3f0b71=a54_0x176250;!VALID_STATUSES[_0x3f0b71(0x17d)](_0x27ae68)&&(console[_0x3f0b71(0x1a9)](chalk[_0x3f0b71(0x146)](_0x3f0b71(0x14c)+_0x27ae68+_0x3f0b71(0x147)+[...VALID_STATUSES][_0x3f0b71(0x17b)](',\x20'))),process[_0x3f0b71(0x182)](0x1));const _0x45a29b=getSDK(),_0x542421=_0x45a29b[_0x3f0b71(0x177)](_0x2f17e3,_0x27ae68);!_0x542421&&(console['error'](chalk[_0x3f0b71(0x146)](_0x3f0b71(0x187)+_0x2f17e3)),process[_0x3f0b71(0x182)](0x1));const _0x3a3bd6=_0x542421[_0x3f0b71(0x14d)][_0x3f0b71(0x155)]||_0x542421[_0x3f0b71(0x195)];console[_0x3f0b71(0x179)](chalk['green'](_0x3f0b71(0x19d))+('\x20'+_0x3a3bd6+'\x20→\x20'+statusColor(_0x27ae68)));}export async function workBoardAction(_0x3c1fab){const _0x489e9a=a54_0x176250,_0x25d399=getSDK(),_0x49e7ab=buildStaleFilter(_0x3c1fab),{grouped:_0x255c1d}=_0x25d399[_0x489e9a(0x14b)](_0x49e7ab);for(const [_0x3cc814,_0x1b4496]of Object[_0x489e9a(0x15d)](STATUS_PHASES)){const _0x442368=_0x1b4496['flatMap'](_0x4f3578=>_0x255c1d[_0x4f3578]||[]);console[_0x489e9a(0x179)](chalk[_0x489e9a(0x18a)][_0x489e9a(0x193)](_0x3cc814)+chalk[_0x489e9a(0x194)]('\x20('+_0x442368[_0x489e9a(0x15b)]+')'));if(_0x442368[_0x489e9a(0x15b)]===0x0)console['log'](chalk[_0x489e9a(0x194)]('\x20\x20(empty)'));else for(const _0x47a696 of _0x442368){const _0x3f91d0=_0x47a696[_0x489e9a(0x14d)],_0x28386d=priorityDot(_0x3f91d0[_0x489e9a(0x174)]),_0x1766fb=_0x3f91d0[_0x489e9a(0x155)]||_0x47a696['fileName'],_0x2805f7=normalizeTags(_0x3f91d0[_0x489e9a(0x168)]),_0x48a7fe=_0x2805f7[_0x489e9a(0x15b)]?chalk[_0x489e9a(0x194)]('\x20['+_0x2805f7['join'](',\x20')+']'):'',_0x2d47c2=chalk['dim']('('+_0x3f91d0[_0x489e9a(0x185)]+')');console[_0x489e9a(0x179)]('\x20\x20'+_0x28386d+'\x20'+_0x1766fb+'\x20'+_0x2d47c2+_0x48a7fe);}console[_0x489e9a(0x179)]();}}export async function workShowAction(_0x5bb8d3){const _0x466a82=a54_0x176250,_0x290e46=getSDK(),_0x123772=_0x290e46[_0x466a82(0x189)](_0x5bb8d3);!_0x123772&&(console[_0x466a82(0x1a9)](chalk['red'](_0x466a82(0x187)+_0x5bb8d3)),process[_0x466a82(0x182)](0x1));console[_0x466a82(0x179)](chalk[_0x466a82(0x18a)](_0x123772['frontmatter'][_0x466a82(0x155)]||_0x123772[_0x466a82(0x195)])),console[_0x466a82(0x179)](chalk[_0x466a82(0x194)](_0x123772['filePath'])),console[_0x466a82(0x179)]();const _0x2d2977=_0x123772['frontmatter'];for(const [_0xf9542e,_0x5b5db8]of Object[_0x466a82(0x15d)](_0x2d2977)){if(_0xf9542e===_0x466a82(0x155))continue;if(_0x5b5db8===undefined||_0x5b5db8===null)continue;const _0x5b90c8=Array['isArray'](_0x5b5db8)?_0x5b5db8[_0x466a82(0x17b)](',\x20'):String(_0x5b5db8);console[_0x466a82(0x179)]('\x20\x20'+chalk[_0x466a82(0x15c)](_0xf9542e)+':\x20'+_0x5b90c8);}console[_0x466a82(0x179)]();_0x123772[_0x466a82(0x196)][_0x466a82(0x18d)]()&&(console[_0x466a82(0x179)](_0x123772[_0x466a82(0x196)][_0x466a82(0x18d)]()),console[_0x466a82(0x179)]());const _0x4ec79d=_0x290e46[_0x466a82(0x1a6)](_0x123772[_0x466a82(0x196)]);if(_0x4ec79d[_0x466a82(0x15b)]>0x0){console['log'](chalk[_0x466a82(0x18a)]('Wiki-links'));for(const _0x315c6f of _0x4ec79d){const _0x18a915=_0x315c6f['resolvedPath']?chalk[_0x466a82(0x161)]('✓'):chalk[_0x466a82(0x146)]('✗'),_0x3adad5=_0x315c6f[_0x466a82(0x173)]||_0x315c6f['slug'];console[_0x466a82(0x179)]('\x20\x20'+_0x18a915+_0x466a82(0x162)+_0x3adad5+']]');}console[_0x466a82(0x179)]();}const _0xc52fcf=_0x290e46[_0x466a82(0x151)](_0x123772[_0x466a82(0x195)]);if(_0xc52fcf[_0x466a82(0x15b)]>0x0){console[_0x466a82(0x179)](chalk[_0x466a82(0x18a)](_0x466a82(0x153)));for(const _0x17f380 of _0xc52fcf){console['log'](_0x466a82(0x17c)+_0x17f380['title']+'\x20'+chalk[_0x466a82(0x194)]('('+_0x17f380[_0x466a82(0x199)]+')'));}}}export async function workLinksAction(_0x28d835){const _0x21c43c=a54_0x176250,_0x2ac00d=getSDK(),_0xb87b3a=_0x2ac00d[_0x21c43c(0x189)](_0x28d835);!_0xb87b3a&&(console[_0x21c43c(0x1a9)](chalk['red'](_0x21c43c(0x187)+_0x28d835)),process['exit'](0x1));const _0x23c1d4=_0xb87b3a[_0x21c43c(0x14d)]['title']||_0xb87b3a[_0x21c43c(0x195)];console['log'](chalk[_0x21c43c(0x18a)]('Links\x20for:\x20'+_0x23c1d4)),console[_0x21c43c(0x179)]();const _0x25b612=_0x2ac00d['resolveWikiLinks'](_0xb87b3a['body']);if(_0x25b612[_0x21c43c(0x15b)]>0x0){console['log'](chalk[_0x21c43c(0x18a)]('Outgoing'));for(const _0x401fbb of _0x25b612){const _0x730a4b=_0x401fbb['resolvedPath']?chalk[_0x21c43c(0x161)]('✓'):chalk['red']('✗'),_0x37e17e=_0x401fbb[_0x21c43c(0x173)]||_0x401fbb[_0x21c43c(0x197)],_0x3f32b1=_0x401fbb[_0x21c43c(0x149)]?chalk[_0x21c43c(0x194)]('\x20('+_0x401fbb[_0x21c43c(0x149)]+')'):'';console[_0x21c43c(0x179)]('\x20\x20'+_0x730a4b+_0x21c43c(0x162)+_0x37e17e+']]'+_0x3f32b1);}}else console[_0x21c43c(0x179)](chalk['dim']('No\x20outgoing\x20wiki-links'));console['log']();const _0x3af926=_0x2ac00d[_0x21c43c(0x151)](_0xb87b3a[_0x21c43c(0x195)]);if(_0x3af926['length']>0x0){console[_0x21c43c(0x179)](chalk[_0x21c43c(0x18a)](_0x21c43c(0x160)));for(const _0x2b0532 of _0x3af926){console[_0x21c43c(0x179)](_0x21c43c(0x17c)+_0x2b0532[_0x21c43c(0x155)]+'\x20'+chalk[_0x21c43c(0x194)]('('+_0x2b0532[_0x21c43c(0x199)]+')'));}}else console[_0x21c43c(0x179)](chalk[_0x21c43c(0x194)]('No\x20incoming\x20backlinks'));}export async function workOpenAction(_0x5467b5){const _0x2ef809=a54_0x176250,_0x5e2b4f=getSDK(),_0x535057=_0x5e2b4f[_0x2ef809(0x189)](_0x5467b5);!_0x535057&&(console[_0x2ef809(0x1a9)](chalk['red'](_0x2ef809(0x187)+_0x5467b5)),process['exit'](0x1));const _0x5caf1f=process.env.EDITOR||'vi';try{execFileSync(_0x5caf1f,[_0x535057[_0x2ef809(0x1a4)]],{'stdio':_0x2ef809(0x169)});}catch{console[_0x2ef809(0x1a9)](chalk[_0x2ef809(0x146)](_0x2ef809(0x190)+_0x5caf1f)),process[_0x2ef809(0x182)](0x1);}}
|
|
1
|
+
const a54_0xeaca20=a54_0x2e7e;(function(_0x10ef4c,_0x55ecf2){const _0x541ee2=a54_0x2e7e,_0xe6d5ee=_0x10ef4c();while(!![]){try{const _0x47d000=parseInt(_0x541ee2(0xfc))/0x1+-parseInt(_0x541ee2(0x12e))/0x2*(parseInt(_0x541ee2(0xe6))/0x3)+parseInt(_0x541ee2(0xfa))/0x4+-parseInt(_0x541ee2(0xf1))/0x5*(parseInt(_0x541ee2(0x122))/0x6)+-parseInt(_0x541ee2(0xfd))/0x7+-parseInt(_0x541ee2(0xcd))/0x8+parseInt(_0x541ee2(0x119))/0x9;if(_0x47d000===_0x55ecf2)break;else _0xe6d5ee['push'](_0xe6d5ee['shift']());}catch(_0x42e01c){_0xe6d5ee['push'](_0xe6d5ee['shift']());}}}(a54_0x11cf,0x69753));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';function a54_0x2e7e(_0x34ffbd,_0x2caf85){_0x34ffbd=_0x34ffbd-0xcc;const _0x11cf93=a54_0x11cf();let _0x2e7e74=_0x11cf93[_0x34ffbd];return _0x2e7e74;}import a54_0x1d5c94 from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x1131bd){const _0x4932dd=a54_0x2e7e;if(_0x1131bd[_0x4932dd(0xd1)])return{'includeStale':!![]};if(_0x1131bd[_0x4932dd(0xf3)])return{'updatedWithin':parseInt(_0x1131bd['days'],0xa)};return undefined;}const VALID_KINDS=new Set([a54_0xeaca20(0x12c),a54_0xeaca20(0x10c),a54_0xeaca20(0xda),a54_0xeaca20(0x11e),a54_0xeaca20(0x102),a54_0xeaca20(0xdc),'template']),VALID_PRIORITIES=new Set([a54_0xeaca20(0xed),'high',a54_0xeaca20(0x103),'low']),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x15dc9e=a54_0xeaca20,_0x49efe7=resolveWorkspacePath();return!_0x49efe7&&(console[_0x15dc9e(0x116)](chalk['red'](_0x15dc9e(0x129))+_0x15dc9e(0x132)+chalk[_0x15dc9e(0xeb)]('tdx\x20work\x20init\x20<name>')+_0x15dc9e(0x130)),process[_0x15dc9e(0x10e)](0x1)),new WorkspaceSDK(_0x49efe7);}function priorityDot(_0x512b8f){const _0x81d9dd=a54_0xeaca20;switch(_0x512b8f){case _0x81d9dd(0xed):return chalk['red']('●');case _0x81d9dd(0xf8):return chalk[_0x81d9dd(0x131)]('●');case'medium':return chalk[_0x81d9dd(0x126)]('●');case _0x81d9dd(0xce):return chalk[_0x81d9dd(0x117)]('●');default:return chalk['blue']('●');}}function statusColor(_0x2999f0){const _0x2f3f8c=a54_0xeaca20;switch(_0x2999f0){case _0x2f3f8c(0xd2):return chalk[_0x2f3f8c(0x12f)](_0x2999f0);case _0x2f3f8c(0xea):return chalk[_0x2f3f8c(0x117)](_0x2999f0);case'in_progress':return chalk[_0x2f3f8c(0xeb)](_0x2999f0);case'review':return chalk[_0x2f3f8c(0xd9)](_0x2999f0);case _0x2f3f8c(0xdf):case _0x2f3f8c(0x12b):return chalk[_0x2f3f8c(0x131)](_0x2999f0);case'todo':return chalk[_0x2f3f8c(0x104)](_0x2999f0);case'backlog':return chalk[_0x2f3f8c(0xe5)](_0x2999f0);default:return _0x2999f0;}}export async function workSummaryAction(_0x1bbc86){const _0x167328=a54_0xeaca20,_0x4bbce4=getSDK(),_0x459f90=buildStaleFilter(_0x1bbc86),_0xc93e59=_0x4bbce4[_0x167328(0x110)](_0x459f90);console[_0x167328(0xd4)](chalk['bold'](_0x167328(0xf4)+_0xc93e59[_0x167328(0x12d)])),console['log'](chalk[_0x167328(0xe5)](_0xc93e59[_0x167328(0x123)])),console[_0x167328(0xd4)]();const _0x46dda9=Object[_0x167328(0x121)](_0xc93e59['taskCounts'])[_0x167328(0xd5)]((_0x49229b,_0x3bf508)=>_0x49229b+_0x3bf508,0x0);if(_0x46dda9===0x0)console[_0x167328(0xd4)](chalk[_0x167328(0xe5)](_0x167328(0xd3)));else{console[_0x167328(0xd4)](chalk[_0x167328(0x127)]('Tasks'));for(const [_0x773b1c,_0x5d84c7]of Object[_0x167328(0xe8)](_0xc93e59[_0x167328(0x120)])){_0x5d84c7>0x0&&console[_0x167328(0xd4)]('\x20\x20'+statusColor(_0x773b1c)+':\x20'+_0x5d84c7);}console['log']();}if(_0xc93e59[_0x167328(0x10f)]['length']>0x0){console[_0x167328(0xd4)](chalk[_0x167328(0x127)](_0x167328(0x101)));for(const _0x602634 of _0xc93e59['goals']){const _0x32e93a=progressBar(_0x602634['progress']);console[_0x167328(0xd4)]('\x20\x20'+_0x602634[_0x167328(0x114)]+'\x20'+_0x32e93a+'\x20'+_0x602634[_0x167328(0x11c)]+'%');}}}function progressBar(_0x8f8de5){const _0x506f85=a54_0xeaca20,_0x42ccbf=0x14,_0x936cae=Math[_0x506f85(0x111)](_0x8f8de5/0x64*_0x42ccbf),_0x176007=_0x42ccbf-_0x936cae;return chalk[_0x506f85(0x12f)]('█'[_0x506f85(0xe1)](_0x936cae))+chalk['dim']('░'[_0x506f85(0xe1)](_0x176007));}export async function workInitAction(_0x33e442,_0x1d9e0d){const _0x2800e8=a54_0xeaca20,_0xef29e8=_0x33e442||a54_0x1d5c94['basename'](process['cwd']());if(_0x1d9e0d[_0x2800e8(0x11b)]){const _0x3926fd=WorkspaceSDK[_0x2800e8(0x113)](_0xef29e8,{'github':_0x1d9e0d[_0x2800e8(0x11b)]});console[_0x2800e8(0xd4)](chalk[_0x2800e8(0x12f)](_0x2800e8(0xee))+'\x20'+_0x3926fd[_0x2800e8(0x128)]),console[_0x2800e8(0xd4)](chalk[_0x2800e8(0xe5)](_0x2800e8(0x124)+_0x1d9e0d[_0x2800e8(0x11b)]));}else{if(_0x33e442){const _0xd316e7=WorkspaceSDK['initAt'](_0x33e442);console[_0x2800e8(0xd4)](chalk[_0x2800e8(0x12f)](_0x2800e8(0xee))+'\x20'+_0xd316e7['workspacePath']);}else{const _0x36f0bf=new WorkspaceSDK(process[_0x2800e8(0xf9)]());_0x36f0bf[_0x2800e8(0x107)](_0xef29e8),console[_0x2800e8(0xd4)](chalk[_0x2800e8(0x12f)]('Workspace\x20initialized\x20in\x20current\x20directory'));}}}export async function workNewAction(_0xb6d019,_0x4d4851){const _0x2f29c5=a54_0xeaca20,_0x2b9187=getSDK(),_0x884d34=_0x4d4851[_0x2f29c5(0xe0)]||_0x2f29c5(0x12c);!VALID_KINDS[_0x2f29c5(0xd6)](_0x884d34)&&(console['error'](chalk['red']('Invalid\x20kind:\x20'+_0x884d34+'.\x20Valid:\x20'+[...VALID_KINDS][_0x2f29c5(0x105)](',\x20'))),process[_0x2f29c5(0x10e)](0x1));_0x4d4851[_0x2f29c5(0x108)]&&!VALID_PRIORITIES[_0x2f29c5(0xd6)](_0x4d4851[_0x2f29c5(0x108)])&&(console[_0x2f29c5(0x116)](chalk[_0x2f29c5(0xf7)](_0x2f29c5(0x12a)+_0x4d4851[_0x2f29c5(0x108)]+_0x2f29c5(0x109)+[...VALID_PRIORITIES][_0x2f29c5(0x105)](',\x20'))),process[_0x2f29c5(0x10e)](0x1));_0x4d4851[_0x2f29c5(0x133)]&&!VALID_STATUSES[_0x2f29c5(0xd6)](_0x4d4851[_0x2f29c5(0x133)])&&(console[_0x2f29c5(0x116)](chalk[_0x2f29c5(0xf7)](_0x2f29c5(0xf0)+_0x4d4851[_0x2f29c5(0x133)]+_0x2f29c5(0x109)+[...VALID_STATUSES][_0x2f29c5(0x105)](',\x20'))),process['exit'](0x1));const _0x1ed5bc=_0x4d4851['tags']?_0x4d4851['tags'][_0x2f29c5(0x11a)](',')['map'](_0x27f79a=>_0x27f79a[_0x2f29c5(0xf2)]()):undefined,_0x5ce263=_0x2b9187['createDocument']({'title':_0xb6d019,'kind':_0x884d34,'tags':_0x1ed5bc,'priority':_0x4d4851[_0x2f29c5(0x108)],'body':_0x4d4851[_0x2f29c5(0xfe)],'template':_0x4d4851[_0x2f29c5(0x106)],'status':_0x4d4851[_0x2f29c5(0x133)],'assignee':_0x4d4851[_0x2f29c5(0xe7)]});console[_0x2f29c5(0xd4)](chalk[_0x2f29c5(0x12f)](_0x2f29c5(0xf5))+'\x20'+_0x5ce263[_0x2f29c5(0xd8)]),console['log'](chalk[_0x2f29c5(0xe5)](_0x5ce263[_0x2f29c5(0xdd)]));}export async function workMoveAction(_0x2a7232,_0x2dae21){const _0x27cb91=a54_0xeaca20;!VALID_STATUSES[_0x27cb91(0xd6)](_0x2dae21)&&(console[_0x27cb91(0x116)](chalk[_0x27cb91(0xf7)](_0x27cb91(0xf0)+_0x2dae21+_0x27cb91(0x109)+[...VALID_STATUSES]['join'](',\x20'))),process['exit'](0x1));const _0x4a326e=getSDK(),_0x56c2c7=_0x4a326e[_0x27cb91(0xf6)](_0x2a7232,_0x2dae21);!_0x56c2c7&&(console[_0x27cb91(0x116)](chalk['red']('Document\x20not\x20found:\x20'+_0x2a7232)),process['exit'](0x1));const _0x1f2145=_0x56c2c7[_0x27cb91(0xe3)][_0x27cb91(0x114)]||_0x56c2c7[_0x27cb91(0xd8)];console[_0x27cb91(0xd4)](chalk['green'](_0x27cb91(0xe2))+('\x20'+_0x1f2145+_0x27cb91(0xe9)+statusColor(_0x2dae21)));}export async function workBoardAction(_0x486c26){const _0x33780f=a54_0xeaca20,_0x2e14e4=getSDK(),_0x57ccd9=buildStaleFilter(_0x486c26),{grouped:_0x4b4387}=_0x2e14e4[_0x33780f(0x10b)](_0x57ccd9);for(const [_0x425f5c,_0x4efb03]of Object[_0x33780f(0xe8)](STATUS_PHASES)){const _0x2f16f3=_0x4efb03[_0x33780f(0xd7)](_0xcf0c82=>_0x4b4387[_0xcf0c82]||[]);console[_0x33780f(0xd4)](chalk[_0x33780f(0x127)]['underline'](_0x425f5c)+chalk[_0x33780f(0xe5)]('\x20('+_0x2f16f3[_0x33780f(0xcf)]+')'));if(_0x2f16f3[_0x33780f(0xcf)]===0x0)console[_0x33780f(0xd4)](chalk[_0x33780f(0xe5)](_0x33780f(0x115)));else for(const _0x458286 of _0x2f16f3){const _0x120131=_0x458286[_0x33780f(0xe3)],_0x41f845=priorityDot(_0x120131[_0x33780f(0x108)]),_0x84ec9a=_0x120131['title']||_0x458286[_0x33780f(0xd8)],_0x7fdb34=normalizeTags(_0x120131[_0x33780f(0xec)]),_0x29aaeb=_0x7fdb34[_0x33780f(0xcf)]?chalk['dim']('\x20['+_0x7fdb34[_0x33780f(0x105)](',\x20')+']'):'',_0x1c30f1=chalk[_0x33780f(0xe5)]('('+_0x120131['status']+')');console['log']('\x20\x20'+_0x41f845+'\x20'+_0x84ec9a+'\x20'+_0x1c30f1+_0x29aaeb);}console[_0x33780f(0xd4)]();}}export async function workShowAction(_0x246c12){const _0x22c4f3=a54_0xeaca20,_0x400071=getSDK(),_0x2ced82=_0x400071[_0x22c4f3(0x118)](_0x246c12);!_0x2ced82&&(console[_0x22c4f3(0x116)](chalk[_0x22c4f3(0xf7)](_0x22c4f3(0xef)+_0x246c12)),process['exit'](0x1));console['log'](chalk[_0x22c4f3(0x127)](_0x2ced82['frontmatter'][_0x22c4f3(0x114)]||_0x2ced82[_0x22c4f3(0xd8)])),console[_0x22c4f3(0xd4)](chalk[_0x22c4f3(0xe5)](_0x2ced82[_0x22c4f3(0xdd)])),console[_0x22c4f3(0xd4)]();const _0x2f8ddb=_0x2ced82[_0x22c4f3(0xe3)];for(const [_0x547af4,_0xb519ba]of Object[_0x22c4f3(0xe8)](_0x2f8ddb)){if(_0x547af4===_0x22c4f3(0x114))continue;if(_0xb519ba===undefined||_0xb519ba===null)continue;const _0x5ebdc9=Array['isArray'](_0xb519ba)?_0xb519ba[_0x22c4f3(0x105)](',\x20'):String(_0xb519ba);console[_0x22c4f3(0xd4)]('\x20\x20'+chalk[_0x22c4f3(0xeb)](_0x547af4)+':\x20'+_0x5ebdc9);}console[_0x22c4f3(0xd4)]();_0x2ced82[_0x22c4f3(0xfe)][_0x22c4f3(0xf2)]()&&(console[_0x22c4f3(0xd4)](_0x2ced82[_0x22c4f3(0xfe)]['trim']()),console['log']());const _0x2d262f=_0x400071[_0x22c4f3(0xd0)](_0x2ced82[_0x22c4f3(0xfe)]);if(_0x2d262f[_0x22c4f3(0xcf)]>0x0){console[_0x22c4f3(0xd4)](chalk[_0x22c4f3(0x127)](_0x22c4f3(0xff)));for(const _0x2e5faa of _0x2d262f){const _0x56b827=_0x2e5faa[_0x22c4f3(0x10a)]?chalk[_0x22c4f3(0x12f)]('✓'):chalk[_0x22c4f3(0xf7)]('✗'),_0x64eee3=_0x2e5faa[_0x22c4f3(0x100)]||_0x2e5faa['slug'];console['log']('\x20\x20'+_0x56b827+'\x20[['+_0x64eee3+']]');}console[_0x22c4f3(0xd4)]();}const _0x33702f=_0x400071[_0x22c4f3(0x10d)](_0x2ced82[_0x22c4f3(0xd8)]);if(_0x33702f[_0x22c4f3(0xcf)]>0x0){console[_0x22c4f3(0xd4)](chalk[_0x22c4f3(0x127)](_0x22c4f3(0x112)));for(const _0x3df68d of _0x33702f){console[_0x22c4f3(0xd4)]('\x20\x20←\x20'+_0x3df68d[_0x22c4f3(0x114)]+'\x20'+chalk[_0x22c4f3(0xe5)]('('+_0x3df68d[_0x22c4f3(0xe0)]+')'));}}}export async function workLinksAction(_0x476a43){const _0x573d36=a54_0xeaca20,_0x39fae5=getSDK(),_0x54ce17=_0x39fae5[_0x573d36(0x118)](_0x476a43);!_0x54ce17&&(console[_0x573d36(0x116)](chalk['red'](_0x573d36(0xef)+_0x476a43)),process['exit'](0x1));const _0x151139=_0x54ce17['frontmatter'][_0x573d36(0x114)]||_0x54ce17[_0x573d36(0xd8)];console[_0x573d36(0xd4)](chalk['bold'](_0x573d36(0xfb)+_0x151139)),console[_0x573d36(0xd4)]();const _0x5227e1=_0x39fae5[_0x573d36(0xd0)](_0x54ce17[_0x573d36(0xfe)]);if(_0x5227e1[_0x573d36(0xcf)]>0x0){console[_0x573d36(0xd4)](chalk[_0x573d36(0x127)]('Outgoing'));for(const _0x215617 of _0x5227e1){const _0x402ca3=_0x215617['resolvedPath']?chalk['green']('✓'):chalk[_0x573d36(0xf7)]('✗'),_0x18ce1f=_0x215617['displayText']||_0x215617[_0x573d36(0xde)],_0x25cfdc=_0x215617[_0x573d36(0xdb)]?chalk[_0x573d36(0xe5)]('\x20('+_0x215617['resolvedKind']+')'):'';console[_0x573d36(0xd4)]('\x20\x20'+_0x402ca3+_0x573d36(0xe4)+_0x18ce1f+']]'+_0x25cfdc);}}else console[_0x573d36(0xd4)](chalk[_0x573d36(0xe5)](_0x573d36(0x125)));console[_0x573d36(0xd4)]();const _0x293e7b=_0x39fae5[_0x573d36(0x10d)](_0x54ce17['fileName']);if(_0x293e7b[_0x573d36(0xcf)]>0x0){console['log'](chalk[_0x573d36(0x127)](_0x573d36(0x11d)));for(const _0xed8e3c of _0x293e7b){console[_0x573d36(0xd4)]('\x20\x20←\x20'+_0xed8e3c[_0x573d36(0x114)]+'\x20'+chalk[_0x573d36(0xe5)]('('+_0xed8e3c['kind']+')'));}}else console[_0x573d36(0xd4)](chalk[_0x573d36(0xe5)](_0x573d36(0x11f)));}function a54_0x11cf(){const _0x5d7001=['trim','days','Workspace:\x20','Created:','moveTask','red','high','cwd','2373472QrQcoI','Links\x20for:\x20','27766SkFLUg','2975665QJuInQ','body','Wiki-links','displayText','Goals','reference','medium','white','join','template','init','priority','.\x20Valid:\x20','resolvedPath','getTasksByStatus','goal','getBacklinks','exit','goals','getSummary','round','Backlinks','initAt','title','\x20\x20(empty)','error','gray','readDocument','12388428nUOGKi','split','github','progress','Incoming','note','No\x20incoming\x20backlinks','taskCounts','values','6jmLaoq','path','Linked\x20to\x20GitHub:\x20','No\x20outgoing\x20wiki-links','blue','bold','workspacePath','No\x20workspace\x20found.','Invalid\x20priority:\x20','design_review','item','name','4WRZFDg','green','\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.','yellow','\x20Run\x20','status','Failed\x20to\x20open\x20editor:\x20','2663856yAFOHC','low','length','resolveWikiLinks','all','done','No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>','log','reduce','has','flatMap','fileName','magenta','guide','resolvedKind','workflow','filePath','slug','planning','kind','repeat','Moved:','frontmatter','\x20[[','dim','1088313AtPhAB','assignee','entries','\x20→\x20','void','cyan','tags','critical','Workspace\x20initialized:','Document\x20not\x20found:\x20','Invalid\x20status:\x20','410260wckIhW'];a54_0x11cf=function(){return _0x5d7001;};return a54_0x11cf();}export async function workOpenAction(_0x24e050){const _0x15286f=a54_0xeaca20,_0xd0c9fe=getSDK(),_0x563ca6=_0xd0c9fe[_0x15286f(0x118)](_0x24e050);!_0x563ca6&&(console[_0x15286f(0x116)](chalk[_0x15286f(0xf7)](_0x15286f(0xef)+_0x24e050)),process[_0x15286f(0x10e)](0x1));const _0x21132d=process.env.EDITOR||'vi';try{execFileSync(_0x21132d,[_0x563ca6[_0x15286f(0xdd)]],{'stdio':'inherit'});}catch{console['error'](chalk[_0x15286f(0xf7)](_0x15286f(0xcc)+_0x21132d)),process['exit'](0x1);}}
|