@treasuredata/tdx 2026.4.6 → 2026.4.8
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/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/tools/work-create-item.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/access-tracker.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 a48_0x1400e3=a48_0x32f2;(function(_0x1efc18,_0x223864){const _0x98b874=a48_0x32f2,_0x561da8=_0x1efc18();while(!![]){try{const _0x56aa8d=parseInt(_0x98b874(0x197))/0x1*(-parseInt(_0x98b874(0x169))/0x2)+-parseInt(_0x98b874(0x18e))/0x3+-parseInt(_0x98b874(0x198))/0x4*(-parseInt(_0x98b874(0x18a))/0x5)+-parseInt(_0x98b874(0x19a))/0x6+parseInt(_0x98b874(0x182))/0x7+-parseInt(_0x98b874(0x180))/0x8*(-parseInt(_0x98b874(0x17f))/0x9)+-parseInt(_0x98b874(0x172))/0xa*(-parseInt(_0x98b874(0x183))/0xb);if(_0x56aa8d===_0x223864)break;else _0x561da8['push'](_0x561da8['shift']());}catch(_0x53296a){_0x561da8['push'](_0x561da8['shift']());}}}(a48_0x3abf,0xa51d7));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a48_0x32f2(_0x41d43e,_0x4b0458){_0x41d43e=_0x41d43e-0x169;const _0x3abfa8=a48_0x3abf();let _0x32f2b6=_0x3abfa8[_0x41d43e];return _0x32f2b6;}import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';function a48_0x3abf(){const _0x34f791=['765620xOYEea','\x20\x20Cause:\x20','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases','error','List\x20tables\x20in\x20a\x20database','includes','data','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','Listing\x20tables...','Database:\x20all','execute','Error:\x20','database_name','9gkMdKC','1644936GzRmsN','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','3568376EUkyZG','176tSrwjE','Note:\x20\x27','✖\x20No\x20tables\x20found','log','Database:\x20','name','verbose','10LbZtVq','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','cause','Error:\x20Pattern\x20\x27','3244557DOMCWY','length','\x27\x20across\x20all\x20databases.','\x20\x20Use:\x20tdx\x20tables\x20\x22','Site:\x20','\x27\x20is\x20ambiguous.','\x20table','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','description','5riyebY','911076lstHmc','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','238260vVorGD','database','message','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','Database\x20pattern:\x20','Table\x20pattern:\x20','239350sbEjwl','✔\x20Found\x20','Database\x20\x27','site','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','table','validate','Or\x20use\x20--in\x20flag:','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20'];a48_0x3abf=function(){return _0x34f791;};return a48_0x3abf();}export class TablesCommand extends BaseCommand{[a48_0x1400e3(0x188)]='tables';[a48_0x1400e3(0x196)]=a48_0x1400e3(0x176);async[a48_0x1400e3(0x17c)](_0x4d52a8){const _0x3def4a=a48_0x1400e3,{options:_0xf18dd9,args:_0x149fda,tdx:_0x206d6a}=_0x4d52a8;let _0x4a034f;if(_0x149fda[_0x3def4a(0x18f)]===0x0)_0x4a034f={'database':undefined,'table':undefined,'original':''};else{if(_0x149fda['length']===0x1)try{_0x4a034f=parseTableReference(_0x149fda[0x0]);if(_0x4a034f['table']&&!_0x4a034f[_0x3def4a(0x19b)]&&!_0x4a034f[_0x3def4a(0x16e)][_0x3def4a(0x177)]('*')&&!_0x4a034f[_0x3def4a(0x16e)][_0x3def4a(0x177)]('?'))return console[_0x3def4a(0x175)](_0x3def4a(0x18d)+_0x149fda[0x0]+_0x3def4a(0x193)),console[_0x3def4a(0x175)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x4a034f[_0x3def4a(0x16e)]+'\x27?'),console[_0x3def4a(0x175)](_0x3def4a(0x191)+_0x4a034f[_0x3def4a(0x16e)]+'.*\x22'),console['error'](_0x3def4a(0x171)+_0x4a034f['table']),console[_0x3def4a(0x175)]('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0x4a034f[_0x3def4a(0x16e)]),console['error'](''),console[_0x3def4a(0x175)](_0x3def4a(0x184)+_0x149fda[0x0]+_0x3def4a(0x179)+_0x4a034f['table']+_0x3def4a(0x190)),0x1;}catch(_0x282b34){return console[_0x3def4a(0x175)](_0x3def4a(0x17d)+_0x282b34[_0x3def4a(0x19c)]),0x1;}else return console['error'](_0x3def4a(0x18b)),console[_0x3def4a(0x175)](_0x3def4a(0x19d)),console[_0x3def4a(0x175)](_0x3def4a(0x181)),console[_0x3def4a(0x175)](_0x3def4a(0x16d)),console[_0x3def4a(0x175)](_0x3def4a(0x174)),console[_0x3def4a(0x175)](_0x3def4a(0x170)),console[_0x3def4a(0x175)](_0x3def4a(0x199)),0x1;}const _0x253a8e=_0xf18dd9[_0x3def4a(0x19b)];!_0x4a034f[_0x3def4a(0x19b)]&&_0x253a8e&&(_0x4a034f[_0x3def4a(0x19b)]=_0x253a8e);try{const _0x2ecc6c=_0x50d167=>_0x50d167&&(_0x50d167[_0x3def4a(0x177)]('*')||_0x50d167[_0x3def4a(0x177)]('?')),_0x3baa73=_0x2ecc6c(_0x4a034f[_0x3def4a(0x19b)]);_0xf18dd9['verbose']&&(console[_0x3def4a(0x175)](_0x3def4a(0x192)+_0xf18dd9[_0x3def4a(0x16c)]),_0x4a034f[_0x3def4a(0x19b)]?_0x3baa73?console['error'](_0x3def4a(0x19e)+_0x4a034f[_0x3def4a(0x19b)]):console[_0x3def4a(0x175)](_0x3def4a(0x187)+_0x4a034f[_0x3def4a(0x19b)]):console[_0x3def4a(0x175)](_0x3def4a(0x17b)),_0x4a034f[_0x3def4a(0x16e)]&&console[_0x3def4a(0x175)](_0x3def4a(0x19f)+_0x4a034f[_0x3def4a(0x16e)]));const _0x2cc5ab=_0x4a034f['database']&&!_0x3baa73?_0x4a034f[_0x3def4a(0x19b)]:undefined,_0x2201ed=_0x3baa73?_0x4a034f[_0x3def4a(0x19b)]:undefined,_0x4f2ea9=_0x4a034f['table'],_0x36522b=resolveLimit(_0xf18dd9['limit'],DEFAULT_LISTING_LIMIT),_0x418ebe=await withSpinner(_0x3def4a(0x17a),()=>_0x206d6a['query']['listTables'](_0x2cc5ab,_0x4f2ea9,_0x2201ed,_0x36522b),{'verbose':_0xf18dd9[_0x3def4a(0x189)]}),_0x43c519=_0x418ebe[_0x3def4a(0x178)];if(_0x43c519[_0x3def4a(0x18f)]===0x0&&_0x4a034f[_0x3def4a(0x19b)]&&!_0x3baa73)return console[_0x3def4a(0x175)](_0x3def4a(0x185)),console['error'](_0x3def4a(0x16b)+_0x4a034f[_0x3def4a(0x19b)]+_0x3def4a(0x195)),0x1;console[_0x3def4a(0x175)](_0x3def4a(0x16a)+_0x43c519[_0x3def4a(0x18f)]+_0x3def4a(0x194)+(_0x43c519['length']!==0x1?'s':''));if(isStructuredFormat(_0xf18dd9))await handleSDKOutput(_0x43c519,{..._0xf18dd9,'limit':_0x36522b});else for(const _0x25ec2e of _0x43c519){const _0x4d127b=_0x25ec2e[_0x3def4a(0x17e)]?_0x25ec2e[_0x3def4a(0x17e)]+'.':'';console[_0x3def4a(0x186)]('📋\x20'+_0x4d127b+_0x25ec2e['table_name']);}return 0x0;}catch(_0x4dc932){if(_0x4dc932 instanceof SDKError)return console[_0x3def4a(0x175)]('Error:\x20'+_0x4dc932[_0x3def4a(0x19c)]),_0x4dc932[_0x3def4a(0x18c)]&&console[_0x3def4a(0x175)](_0x3def4a(0x173)+_0x4dc932[_0x3def4a(0x18c)]),0x1;throw _0x4dc932;}}[a48_0x1400e3(0x16f)](_0x448b02){return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a49_0x2876c0=a49_0x1236;(function(_0x50e692,_0x2663ee){const _0x2f5e77=a49_0x1236,_0x2be5b2=_0x50e692();while(!![]){try{const _0x20bf8c=parseInt(_0x2f5e77(0x192))/0x1+-parseInt(_0x2f5e77(0x1a3))/0x2*(parseInt(_0x2f5e77(0x1b3))/0x3)+parseInt(_0x2f5e77(0x19d))/0x4*(parseInt(_0x2f5e77(0x19e))/0x5)+parseInt(_0x2f5e77(0x1a5))/0x6*(parseInt(_0x2f5e77(0x1a8))/0x7)+parseInt(_0x2f5e77(0x1aa))/0x8*(parseInt(_0x2f5e77(0x196))/0x9)+-parseInt(_0x2f5e77(0x198))/0xa+-parseInt(_0x2f5e77(0x1b9))/0xb;if(_0x20bf8c===_0x2663ee)break;else _0x2be5b2['push'](_0x2be5b2['shift']());}catch(_0x5e082c){_0x2be5b2['push'](_0x2be5b2['shift']());}}}(a49_0x55ad,0x5746f));function a49_0x55ad(){const _0xc95ccd=['llm_agent','Invalid\x20resource:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas\x0a','456744ENoIyU','20OThQQB','engage_workspace','default','cleared','description','1308686tqpkho','Usage:\x20tdx\x20unset\x20<resource>\x0a','6XRsePY','database','green','2472274voTAHW','Default\x20site\x20','712oKkjno','name','profile','site','message','session','length','includes','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','3XWQyKk','Default\x20profile\x20','composable_audience','error','\x0aUpdated:\x20','cas','6702366cHIiXC','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','parent_segment','570303amxjRz','log','.\x20Must\x20be\x20one\x20of:\x20','unset','47871GwfQbI','agent','2324840CTyIYn','dim'];a49_0x55ad=function(){return _0xc95ccd;};return a49_0x55ad();}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 a49_0x48e0dc from'chalk';function a49_0x1236(_0x21e723,_0x741489){_0x21e723=_0x21e723-0x190;const _0x55ade4=a49_0x55ad();let _0x12365c=_0x55ade4[_0x21e723];return _0x12365c;}import*as a49_0x264e17 from'node:path';export class UnsetCommand extends BaseCommand{[a49_0x2876c0(0x1ab)]=a49_0x2876c0(0x195);[a49_0x2876c0(0x1a2)]='Clear\x20session-level\x20or\x20default\x20context\x20values';['validate'](_0x1bc49e){const _0x1c1196=a49_0x2876c0,{args:_0x20917b,options:_0x411916}=_0x1bc49e,_0x38443c=_0x411916[_0x1c1196(0x1a0)];if(_0x20917b[_0x1c1196(0x1b0)]===0x0)return _0x1c1196(0x1a4)+_0x1c1196(0x1b2)+_0x1c1196(0x19c)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x1ba74a=_0x20917b[0x0],_0x33347e=[_0x1c1196(0x1ad),'database','parent_segment','llm_project',_0x1c1196(0x197),_0x1c1196(0x1ac),_0x1c1196(0x19f),_0x1c1196(0x1b8),_0x1c1196(0x1b5)];if(!_0x33347e[_0x1c1196(0x1b1)](_0x1ba74a))return _0x1c1196(0x19b)+_0x1ba74a+_0x1c1196(0x194)+_0x33347e['join'](',\x20');if(_0x38443c&&_0x1ba74a!==_0x1c1196(0x1ad)&&_0x1ba74a!==_0x1c1196(0x1ac))return _0x1c1196(0x190);return undefined;}async['execute'](_0x54c117){const _0x1d689f=a49_0x2876c0,{args:_0x42ffa8,options:_0x32303a}=_0x54c117,_0x44075e=_0x32303a[_0x1d689f(0x1a0)];cleanExpiredSessions();try{const _0x42dbaf=_0x42ffa8[0x0],_0x218993=a49_0x264e17['join'](getConfigDir(),'tdx.json');if(_0x44075e){if(_0x42dbaf===_0x1d689f(0x1ad))return clearDefaultSiteFromUserConfig(),console[_0x1d689f(0x193)](_0x1d689f(0x1a9)+a49_0x48e0dc[_0x1d689f(0x1a7)](_0x1d689f(0x1a1))),console[_0x1d689f(0x193)](a49_0x48e0dc[_0x1d689f(0x199)](_0x1d689f(0x1b7)+_0x218993)),0x0;if(_0x42dbaf==='profile')return clearActiveProfileFromUserConfig(),console[_0x1d689f(0x193)](_0x1d689f(0x1b4)+a49_0x48e0dc[_0x1d689f(0x1a7)](_0x1d689f(0x1a1))),console[_0x1d689f(0x193)](a49_0x48e0dc[_0x1d689f(0x199)]('\x0aUpdated:\x20'+_0x218993)),0x0;}const _0x486f54=getSessionID(_0x32303a[_0x1d689f(0x1af)]),_0x39d628={'site':_0x1d689f(0x1ad),'database':_0x1d689f(0x1a6),'parent_segment':_0x1d689f(0x191),'llm_project':'llm_project','agent':_0x1d689f(0x19a),'profile':_0x1d689f(0x1ac),'engage_workspace':'engage_workspace','cas':_0x1d689f(0x1b5),'composable_audience':_0x1d689f(0x1b5)},_0x25f756=_0x39d628[_0x42dbaf];return _0x25f756&&(clearSessionContextField(_0x25f756,_0x32303a[_0x1d689f(0x1af)]),console[_0x1d689f(0x193)]('Session\x20'+_0x42dbaf+'\x20'+a49_0x48e0dc[_0x1d689f(0x1a7)]('cleared')+'\x20'+a49_0x48e0dc[_0x1d689f(0x199)]('(session:\x20'+_0x486f54+')'))),0x0;}catch(_0x173f0a){return _0x173f0a instanceof Error&&console[_0x1d689f(0x1b6)]('Error:\x20'+_0x173f0a[_0x1d689f(0x1ae)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x2ebe46=a50_0x38bf;(function(_0x186dca,_0x36c33d){const _0x14199e=a50_0x38bf,_0x4d1afd=_0x186dca();while(!![]){try{const _0x546317=-parseInt(_0x14199e(0x1b3))/0x1*(parseInt(_0x14199e(0x1b5))/0x2)+parseInt(_0x14199e(0x1a4))/0x3*(-parseInt(_0x14199e(0x196))/0x4)+-parseInt(_0x14199e(0x1a0))/0x5+parseInt(_0x14199e(0x1a9))/0x6+parseInt(_0x14199e(0x1a1))/0x7+parseInt(_0x14199e(0x18e))/0x8+parseInt(_0x14199e(0x1b1))/0x9*(parseInt(_0x14199e(0x18d))/0xa);if(_0x546317===_0x36c33d)break;else _0x4d1afd['push'](_0x4d1afd['shift']());}catch(_0x22ad21){_0x4d1afd['push'](_0x4d1afd['shift']());}}}(a50_0x5612,0x44aeb));import{gt}from'semver';import a50_0x16f778 from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';function a50_0x38bf(_0x58f107,_0x3ba18a){_0x58f107=_0x58f107-0x188;const _0x561213=a50_0x5612();let _0x38bf83=_0x561213[_0x58f107];return _0x38bf83;}import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';function a50_0x5612(){const _0x283420=['dryRun','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','yellow','bun','72490tlaGsS','800765axMLsP','pnpm','inherit','75YpsSBK','log','global','Failed\x20to\x20run\x20','error','474012rppCKn','red','includes','name','install','Current\x20version:\x20','next','Would\x20run:','28953OeoDPh','Current\x20version:','1JrvOUh','message','1102634VAknBq','@treasuredata/tdx','yarn','latest','dim','add','Checking\x20','upgrade','460zKMWxR','4228672yRoxjP','Latest\x20version:','execPath','npm','...','Running:','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','description','3652BYAyTn','toLowerCase','join','green','Already\x20up\x20to\x20date\x20(','execute'];a50_0x5612=function(){return _0x283420;};return a50_0x5612();}const PACKAGE_NAME=a50_0x2ebe46(0x1b6);export function detectPackageManager(){const _0xe7df5f=a50_0x2ebe46,_0x4ed139=process[_0xe7df5f(0x190)][_0xe7df5f(0x197)](),_0x2a665c=process['argv'][0x1]??'';if(_0x4ed139['includes'](_0xe7df5f(0x19f))||_0x2a665c[_0xe7df5f(0x1ab)]('.bun/'))return _0xe7df5f(0x19f);if(_0x2a665c['includes'](_0xe7df5f(0x1a2)))return _0xe7df5f(0x1a2);if(_0x2a665c[_0xe7df5f(0x1ab)](_0xe7df5f(0x1b7)))return _0xe7df5f(0x1b7);return _0xe7df5f(0x191);}export function buildInstallArgs(_0x46aa43,_0x9d522a){const _0x1ee1da=a50_0x2ebe46;switch(_0x46aa43){case'yarn':return[_0x1ee1da(0x1a6),_0x1ee1da(0x18a),_0x9d522a];case _0x1ee1da(0x1a2):return['add','-g',_0x9d522a];default:return[_0x1ee1da(0x1ad),'-g',_0x9d522a];}}export class UpgradeCommand extends BaseCommand{[a50_0x2ebe46(0x1ac)]=a50_0x2ebe46(0x18c);[a50_0x2ebe46(0x195)]=a50_0x2ebe46(0x19d);async[a50_0x2ebe46(0x19b)](_0x2f701b){const _0x3e6807=a50_0x2ebe46,{options:_0x11b166,args:_0x1e1927}=_0x2f701b,_0x52eac6=!!_0x11b166[_0x3e6807(0x19c)],{next:_0x42cdd3,method:_0x2ecb37}=_0x11b166,_0x25588a=_0x42cdd3?_0x3e6807(0x1af):loadReleaseChannel(),_0xf1fe25=_0x25588a===_0x3e6807(0x1af)?'next':_0x3e6807(0x188),_0xfa326b=_0x1e1927[0x0]?String(_0x1e1927[0x0])['replace'](/^v/,''):undefined,_0xa195=getVersion();if(isDevVersion())return console[_0x3e6807(0x1a8)](a50_0x16f778[_0x3e6807(0x19e)](_0x3e6807(0x194))),console[_0x3e6807(0x1a8)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x1ae)+_0xa195)),0x1;let _0x22eecd;if(_0xfa326b)_0x22eecd=_0xfa326b,console[_0x3e6807(0x1a5)](a50_0x16f778['dim']('Current\x20version:')+'\x20'+_0xa195),console[_0x3e6807(0x1a5)](a50_0x16f778['dim']('Target\x20version:')+'\x20\x20'+a50_0x16f778['green'](_0xfa326b)),console['log']();else{console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x18b)+PACKAGE_NAME+'@'+_0xf1fe25+_0x3e6807(0x192)));try{_0x22eecd=await fetchLatestVersion(_0x25588a);}catch(_0x3044f7){return console[_0x3e6807(0x1a8)](a50_0x16f778[_0x3e6807(0x1aa)]('Failed\x20to\x20check\x20for\x20updates:\x20'+(_0x3044f7 instanceof Error?_0x3044f7[_0x3e6807(0x1b4)]:String(_0x3044f7)))),0x1;}if(!gt(_0x22eecd,_0xa195))return console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x199)](_0x3e6807(0x19a)+_0xa195+').')),0x0;console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x1b2))+'\x20'+_0xa195),console[_0x3e6807(0x1a5)](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x18f))+'\x20\x20'+a50_0x16f778[_0x3e6807(0x199)](_0x22eecd)),console[_0x3e6807(0x1a5)]();}const _0x4119c9=_0x2ecb37??detectPackageManager(),_0x242ba4=_0xfa326b?PACKAGE_NAME+'@'+_0xfa326b:PACKAGE_NAME+'@'+_0xf1fe25,_0xcf47a3=buildInstallArgs(_0x4119c9,_0x242ba4);if(_0x52eac6)return console['log'](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x1b0))),console[_0x3e6807(0x1a5)]('\x20\x20'+a50_0x16f778['cyan'](_0x4119c9+'\x20'+_0xcf47a3['join']('\x20'))),0x0;return console['log'](a50_0x16f778[_0x3e6807(0x189)](_0x3e6807(0x193))+'\x20'+_0x4119c9+'\x20'+_0xcf47a3[_0x3e6807(0x198)]('\x20')),console['log'](),new Promise(_0x57ddd1=>{const _0xfc2013=_0x3e6807,_0x1d9b0d=crossSpawn(_0x4119c9,_0xcf47a3,{'stdio':_0xfc2013(0x1a3)});_0x1d9b0d['on']('close',_0x4657bd=>{const _0x23b6e4=_0xfc2013;console[_0x23b6e4(0x1a5)](),_0x4657bd===0x0?console[_0x23b6e4(0x1a5)](a50_0x16f778[_0x23b6e4(0x199)]('Successfully\x20upgraded\x20to\x20'+_0x242ba4)):console[_0x23b6e4(0x1a8)](a50_0x16f778['red']('Upgrade\x20failed\x20(exit\x20code\x20'+_0x4657bd+').')),_0x57ddd1(_0x4657bd??0x1);}),_0x1d9b0d['on'](_0xfc2013(0x1a8),_0x19ce87=>{const _0x431677=_0xfc2013;console[_0x431677(0x1a8)](a50_0x16f778['red'](_0x431677(0x1a7)+_0x4119c9+':\x20'+_0x19ce87[_0x431677(0x1b4)])),_0x57ddd1(0x1);});});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a51_0x1be2d2=a51_0x4099;(function(_0x17c483,_0x5f18c3){const _0x4e3148=a51_0x4099,_0x5e5229=_0x17c483();while(!![]){try{const _0x6b5627=-parseInt(_0x4e3148(0x113))/0x1+parseInt(_0x4e3148(0x114))/0x2*(parseInt(_0x4e3148(0xfc))/0x3)+-parseInt(_0x4e3148(0xc9))/0x4*(-parseInt(_0x4e3148(0xd6))/0x5)+-parseInt(_0x4e3148(0xea))/0x6*(-parseInt(_0x4e3148(0xe2))/0x7)+parseInt(_0x4e3148(0x11b))/0x8*(parseInt(_0x4e3148(0xd5))/0x9)+parseInt(_0x4e3148(0x111))/0xa+-parseInt(_0x4e3148(0x101))/0xb;if(_0x6b5627===_0x5f18c3)break;else _0x5e5229['push'](_0x5e5229['shift']());}catch(_0x378b0c){_0x5e5229['push'](_0x5e5229['shift']());}}}(a51_0x1335,0x27399));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';import{GlobalContext}from'../core/global-context.js';function a51_0x4099(_0x13c085,_0x1b2775){_0x13c085=_0x13c085-0xc8;const _0x133599=a51_0x1335();let _0x409969=_0x133599[_0x13c085];return _0x409969;}function a51_0x1335(){const _0x106d6d=['dim','debug','session','stable','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','60642uFJfvn','5zbuAqo','log','resolveWorkspaceId','site','Error:\x20','Session\x20agent\x20set\x20to:\x20','join','\x0aSaved\x20to:\x20','displayWithSources','\x27\x20does\x20not\x20exist','parent_segment','execute','315896mAvSWN','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','(session:\x20','Verifying\x20workspace\x20\x27','cas','llm_project','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','36WviBQn','clear','Session\x20engage_workspace\x20set\x20to:\x20','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','database','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','Session\x20database\x20set\x20to:\x20','\x27...','name','cleared','Invalid\x20release\x20channel:\x20','agent','profile','default','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','includes','Set\x20session-level\x20context','engage_workspace','288PAXKyS','\x27\x20to\x20save\x20permanently','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Default\x20site\x20set\x20to:\x20','error','6584677GpLgzE','Session\x20llm_project\x20set\x20to:\x20','green','engage','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','code','display','tdx.json','Error:\x20Profile\x20\x27','message','Session\x20parent_segment\x20set\x20to:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','release_channel','Default\x20profile\x20set\x20to:\x20','Session\x20context\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','2606300ynFtUM','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','258593QaJIeH','5846lCaCVR','INVALID_ARGUMENT','length','composable_audience','next','tdx','validate','32eUVuUo','NOT_FOUND','Session\x20composable_audience\x20set\x20to:\x20','715628XxLFDF','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','Invalid\x20resource:\x20','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a','llm_agent','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options'];a51_0x1335=function(){return _0x106d6d;};return a51_0x1335();}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 a51_0x4149d1 from'chalk';import*as a51_0x3fae36 from'node:path';export class UseCommand extends BaseCommand{[a51_0x1be2d2(0xf2)]='use';['description']=a51_0x1be2d2(0xfa);[a51_0x1be2d2(0x11a)](_0x4cde5d){const _0x270c22=a51_0x1be2d2,{args:_0x1472d4,options:_0xe00482}=_0x4cde5d,_0x4e9e12=_0xe00482[_0x270c22(0xf7)];if(_0x1472d4['length']===0x0)return undefined;if(_0x1472d4[_0x270c22(0x116)]===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+'\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'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a'+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x270c22(0x110)+_0x270c22(0xcc)+_0x270c22(0xcf);const _0x355dad=_0x1472d4[0x0],_0x199b8d=[_0x270c22(0xd9),_0x270c22(0xee),_0x270c22(0xe0),'llm_project','agent','profile',_0x270c22(0xfb),_0x270c22(0xe6),'composable_audience',_0x270c22(0x10d)];if(!_0x199b8d[_0x270c22(0xf9)](_0x355dad))return _0x270c22(0xcb)+_0x355dad+'.\x20Must\x20be\x20one\x20of:\x20'+_0x199b8d[_0x270c22(0xdc)](',\x20');if(_0x4e9e12&&_0x355dad!=='site'&&_0x355dad!==_0x270c22(0xf6)&&_0x355dad!=='release_channel')return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';if(_0x355dad===_0x270c22(0x10d)&&!_0x4e9e12)return _0x270c22(0xed);if(_0x355dad==='release_channel'){const _0x144189=_0x1472d4[0x1];if(_0x144189!==_0x270c22(0xd3)&&_0x144189!==_0x270c22(0x118))return _0x270c22(0xf4)+_0x144189+_0x270c22(0x10c);}return undefined;}async[a51_0x1be2d2(0xe1)](_0x21ee82){const _0x37c10f=a51_0x1be2d2,{args:_0x515897,options:_0x5ab72b}=_0x21ee82,_0x190a85=_0x5ab72b[_0x37c10f(0xd1)],_0x277320=_0x5ab72b[_0x37c10f(0xeb)],_0x420231=_0x5ab72b['default'];cleanExpiredSessions();try{if(_0x277320){clearSessionContext(_0x5ab72b[_0x37c10f(0xd2)]);const _0x42abe6=getSessionID(_0x5ab72b[_0x37c10f(0xd2)]);return console[_0x37c10f(0xd7)](_0x37c10f(0x10f)+a51_0x4149d1[_0x37c10f(0x103)](_0x37c10f(0xf3))+'\x20'+a51_0x4149d1['dim'](_0x37c10f(0xe4)+_0x42abe6+')')),0x0;}if(_0x515897['length']===0x0){const _0x188c06=new GlobalContext(_0x5ab72b);return _0x190a85?_0x188c06[_0x37c10f(0xde)]():_0x188c06[_0x37c10f(0x107)](),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xf8))),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xe8))),console['log'](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0x105))),0x0;}const _0x23374b=_0x515897[0x0],_0x262e36=_0x515897[0x1],_0x501fde=a51_0x3fae36[_0x37c10f(0xdc)](getConfigDir(),_0x37c10f(0x108));if(_0x420231){if(_0x23374b===_0x37c10f(0xd9))return saveDefaultSiteToUserConfig(_0x262e36),console[_0x37c10f(0xd7)](_0x37c10f(0xff)+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xdd)+_0x501fde)),0x0;if(_0x23374b===_0x37c10f(0xf6)){if(!profileExists(_0x262e36))return console['error']('Error:\x20Profile\x20\x27'+_0x262e36+_0x37c10f(0xdf)),console[_0x37c10f(0x100)](_0x37c10f(0xce)),0x1;return saveActiveProfileToUserConfig(_0x262e36),console[_0x37c10f(0xd7)](_0x37c10f(0x10e)+a51_0x4149d1['green'](_0x262e36)),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xdd)+_0x501fde)),0x0;}if(_0x23374b===_0x37c10f(0x10d))return saveReleaseChannel(_0x262e36),console[_0x37c10f(0xd7)]('Release\x20channel\x20set\x20to:\x20'+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xdd)+_0x501fde)),_0x262e36===_0x37c10f(0x118)?(console['log'](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xd4))),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0x112)))):console[_0x37c10f(0xd7)](a51_0x4149d1['dim'](_0x37c10f(0xe3))),0x0;}if(_0x23374b===_0x37c10f(0xd9)){const _0x49039f=getSessionID(_0x5ab72b['session']);return saveSessionContext({'site':_0x262e36},_0x5ab72b[_0x37c10f(0xd2)]),console[_0x37c10f(0xd7)]('Session\x20site\x20set\x20to:\x20'+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)+'\x20'+a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xe4)+_0x49039f+')')),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xfe)+_0x262e36+_0x37c10f(0xfd))),0x0;}if(_0x23374b===_0x37c10f(0xf6)){if(!profileExists(_0x262e36))return console[_0x37c10f(0x100)](_0x37c10f(0x109)+_0x262e36+_0x37c10f(0xdf)),console[_0x37c10f(0x100)](_0x37c10f(0xce)),0x1;const _0x5d9e13=getSessionID(_0x5ab72b[_0x37c10f(0xd2)]);return saveSessionContext({'profile':_0x262e36},_0x5ab72b['session']),console[_0x37c10f(0xd7)]('Session\x20profile\x20set\x20to:\x20'+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)+'\x20'+a51_0x4149d1['dim'](_0x37c10f(0xe4)+_0x5d9e13+')')),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xef)+_0x262e36+_0x37c10f(0xfd))),0x0;}const _0x381351={},_0x2c4658=getSessionID(_0x5ab72b[_0x37c10f(0xd2)]);switch(_0x23374b){case _0x37c10f(0xee):_0x381351['database']=_0x262e36,console[_0x37c10f(0xd7)](_0x37c10f(0xf0)+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)+'\x20'+a51_0x4149d1[_0x37c10f(0xd0)]('(session:\x20'+_0x2c4658+')'));break;case _0x37c10f(0xe0):_0x381351[_0x37c10f(0xe0)]=_0x262e36,console[_0x37c10f(0xd7)](_0x37c10f(0x10b)+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)+'\x20'+a51_0x4149d1[_0x37c10f(0xd0)]('(session:\x20'+_0x2c4658+')'));break;case _0x37c10f(0xe7):_0x381351[_0x37c10f(0xe7)]=_0x262e36,console[_0x37c10f(0xd7)](_0x37c10f(0x102)+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)+'\x20'+a51_0x4149d1['dim'](_0x37c10f(0xe4)+_0x2c4658+')'));break;case _0x37c10f(0xf5):{const {projectName:_0x18c393,agentName:_0xb78aee}=parseAgentRef(_0x262e36);_0xb78aee?(_0x381351[_0x37c10f(0xe7)]=_0x18c393,_0x381351['llm_agent']=_0xb78aee,console[_0x37c10f(0xd7)](_0x37c10f(0x102)+a51_0x4149d1[_0x37c10f(0x103)](_0x18c393)+'\x20'+a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xe4)+_0x2c4658+')')),console['log'](_0x37c10f(0xdb)+a51_0x4149d1[_0x37c10f(0x103)](_0xb78aee)+'\x20'+a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xe4)+_0x2c4658+')'))):(_0x381351[_0x37c10f(0xcd)]=_0x262e36,console[_0x37c10f(0xd7)]('Session\x20agent\x20set\x20to:\x20'+a51_0x4149d1['green'](_0x262e36)+'\x20'+a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xe4)+_0x2c4658+')')));break;}case _0x37c10f(0xe6):case _0x37c10f(0x117):_0x381351['composable_audience']=_0x262e36,console[_0x37c10f(0xd7)](_0x37c10f(0xc8)+a51_0x4149d1['green'](_0x262e36)+'\x20'+a51_0x4149d1[_0x37c10f(0xd0)]('(session:\x20'+_0x2c4658+')'));break;case'engage_workspace':{try{await withSpinner(_0x37c10f(0xe5)+_0x262e36+_0x37c10f(0xf1),()=>_0x21ee82[_0x37c10f(0x119)][_0x37c10f(0x104)][_0x37c10f(0xd8)](_0x262e36));}catch(_0x4d1516){if(_0x4d1516 instanceof SDKError&&(_0x4d1516[_0x37c10f(0x106)]===ErrorCode[_0x37c10f(0x11c)]||_0x4d1516['code']===ErrorCode[_0x37c10f(0x115)]))return console[_0x37c10f(0x100)](_0x37c10f(0xda)+_0x4d1516[_0x37c10f(0x10a)]),console['error'](_0x37c10f(0xca)),0x1;throw _0x4d1516;}_0x381351[_0x37c10f(0xfb)]=_0x262e36,console[_0x37c10f(0xd7)](_0x37c10f(0xec)+a51_0x4149d1[_0x37c10f(0x103)](_0x262e36)+'\x20'+a51_0x4149d1['dim'](_0x37c10f(0xe4)+_0x2c4658+')'));break;}}return saveSessionContext(_0x381351,_0x5ab72b[_0x37c10f(0xd2)]),console[_0x37c10f(0xd7)](a51_0x4149d1[_0x37c10f(0xd0)](_0x37c10f(0xe9))),0x0;}catch(_0x565a4b){return _0x565a4b instanceof Error&&console[_0x37c10f(0x100)](_0x37c10f(0xda)+_0x565a4b[_0x37c10f(0x10a)]),0x1;}}}
|
|
1
|
+
function a51_0x28f9(_0x22d757,_0xfee6e0){_0x22d757=_0x22d757-0x8c;const _0x1708fc=a51_0x1708();let _0x28f9d1=_0x1708fc[_0x22d757];return _0x28f9d1;}const a51_0x54ea96=a51_0x28f9;(function(_0x38a92b,_0x134926){const _0x4297f2=a51_0x28f9,_0x225f8d=_0x38a92b();while(!![]){try{const _0x38c9a7=-parseInt(_0x4297f2(0xcc))/0x1*(-parseInt(_0x4297f2(0xc8))/0x2)+parseInt(_0x4297f2(0xd1))/0x3+parseInt(_0x4297f2(0x8e))/0x4*(-parseInt(_0x4297f2(0x9f))/0x5)+-parseInt(_0x4297f2(0xa2))/0x6+-parseInt(_0x4297f2(0x98))/0x7+-parseInt(_0x4297f2(0xd0))/0x8+parseInt(_0x4297f2(0xb4))/0x9;if(_0x38c9a7===_0x134926)break;else _0x225f8d['push'](_0x225f8d['shift']());}catch(_0x35908e){_0x225f8d['push'](_0x225f8d['shift']());}}}(a51_0x1708,0x744c7));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';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 a51_0x2e77e4 from'chalk';function a51_0x1708(){const _0x216f92=['Session\x20llm_project\x20set\x20to:\x20','2vuYUGk','error','database','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','811869OCziOa','llm_agent','\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','validate','6797584mDGukZ','2583828YimVXM','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','length','Session\x20context\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','green','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','Session\x20engage_workspace\x20set\x20to:\x20','Invalid\x20release\x20channel:\x20','llm_project','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','165144cNyeNu','\x27\x20to\x20save\x20permanently','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','default','code','release_channel','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','3720864QRsFNX','log','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','Set\x20session-level\x20context','includes','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','\x27\x20does\x20not\x20exist','65XsWPto','Session\x20site\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','4911576VkWAbR','message','Invalid\x20resource:\x20','use','INVALID_ARGUMENT','Error:\x20','tdx.json','join','Default\x20site\x20set\x20to:\x20','(session:\x20','Session\x20parent_segment\x20set\x20to:\x20','profile','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a','Session\x20profile\x20set\x20to:\x20','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','composable_audience','site','Session\x20database\x20set\x20to:\x20','13858002uKctcV','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','\x0aSaved\x20to:\x20','cas','\x27...','clear','Session\x20agent\x20set\x20to:\x20','agent','execute','session','Error:\x20Profile\x20\x27','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','Default\x20profile\x20set\x20to:\x20','parent_segment','next','NOT_FOUND','engage_workspace','description','display'];a51_0x1708=function(){return _0x216f92;};return a51_0x1708();}import*as a51_0x5296fe from'node:path';export class UseCommand extends BaseCommand{['name']=a51_0x54ea96(0xa5);[a51_0x54ea96(0xc5)]=a51_0x54ea96(0x9b);[a51_0x54ea96(0xcf)](_0x7e3969){const _0x4d4049=a51_0x54ea96,{args:_0x26988c,options:_0x4a235d}=_0x7e3969,_0x5b2a19=_0x4a235d[_0x4d4049(0x91)];if(_0x26988c[_0x4d4049(0xd3)]===0x0)return undefined;if(_0x26988c['length']===0x1)return'Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a'+_0x4d4049(0xce)+_0x4d4049(0xd5)+_0x4d4049(0x95)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x4d4049(0x9d)+_0x4d4049(0xae)+_0x4d4049(0xcb);const _0x100324=_0x26988c[0x0],_0x14fe98=[_0x4d4049(0xb2),_0x4d4049(0xca),_0x4d4049(0xc1),_0x4d4049(0x8c),_0x4d4049(0xbb),_0x4d4049(0xad),'engage_workspace',_0x4d4049(0xb7),'composable_audience',_0x4d4049(0x93)];if(!_0x14fe98[_0x4d4049(0x9c)](_0x100324))return _0x4d4049(0xa4)+_0x100324+_0x4d4049(0xa1)+_0x14fe98[_0x4d4049(0xa9)](',\x20');if(_0x5b2a19&&_0x100324!==_0x4d4049(0xb2)&&_0x100324!==_0x4d4049(0xad)&&_0x100324!==_0x4d4049(0x93))return _0x4d4049(0xd8);if(_0x100324===_0x4d4049(0x93)&&!_0x5b2a19)return _0x4d4049(0xd2);if(_0x100324===_0x4d4049(0x93)){const _0x1593a1=_0x26988c[0x1];if(_0x1593a1!=='stable'&&_0x1593a1!==_0x4d4049(0xc2))return _0x4d4049(0xda)+_0x1593a1+_0x4d4049(0xb0);}return undefined;}async[a51_0x54ea96(0xbc)](_0x5b07dc){const _0x378535=a51_0x54ea96,{args:_0x13fccc,options:_0x1f2d79}=_0x5b07dc,_0x59b036=_0x1f2d79['debug'],_0x33814a=_0x1f2d79[_0x378535(0xb9)],_0x5e85eb=_0x1f2d79['default'];cleanExpiredSessions();try{if(_0x33814a){clearSessionContext(_0x1f2d79[_0x378535(0xbd)]);const _0x31fa48=getSessionID(_0x1f2d79['session']);return console[_0x378535(0x99)](_0x378535(0xd4)+a51_0x2e77e4[_0x378535(0xd7)]('cleared')+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x31fa48+')')),0x0;}if(_0x13fccc[_0x378535(0xd3)]===0x0){const _0x5945b0=new GlobalContext(_0x1f2d79);return _0x59b036?_0x5945b0['displayWithSources']():_0x5945b0[_0x378535(0xc6)](),console['log'](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x8d))),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xd6))),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x97))),0x0;}const _0x1ff20a=_0x13fccc[0x0],_0x176365=_0x13fccc[0x1],_0x3b2f9e=a51_0x5296fe[_0x378535(0xa9)](getConfigDir(),_0x378535(0xa8));if(_0x5e85eb){if(_0x1ff20a===_0x378535(0xb2))return saveDefaultSiteToUserConfig(_0x176365),console[_0x378535(0x99)](_0x378535(0xaa)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)),console[_0x378535(0x99)](a51_0x2e77e4['dim'](_0x378535(0xb6)+_0x3b2f9e)),0x0;if(_0x1ff20a==='profile'){if(!profileExists(_0x176365))return console['error']('Error:\x20Profile\x20\x27'+_0x176365+_0x378535(0x9e)),console[_0x378535(0xc9)](_0x378535(0xb5)),0x1;return saveActiveProfileToUserConfig(_0x176365),console[_0x378535(0x99)](_0x378535(0xc0)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xb6)+_0x3b2f9e)),0x0;}if(_0x1ff20a===_0x378535(0x93))return saveReleaseChannel(_0x176365),console['log']('Release\x20channel\x20set\x20to:\x20'+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)),console['log'](a51_0x2e77e4[_0x378535(0x94)]('\x0aSaved\x20to:\x20'+_0x3b2f9e)),_0x176365===_0x378535(0xc2)?(console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xbf))),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)]('Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next'))):console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x90))),0x0;}if(_0x1ff20a===_0x378535(0xb2)){const _0x41bee5=getSessionID(_0x1f2d79[_0x378535(0xbd)]);return saveSessionContext({'site':_0x176365},_0x1f2d79['session']),console['log'](_0x378535(0xa0)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4['dim'](_0x378535(0xab)+_0x41bee5+')')),console[_0x378535(0x99)](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x9a)+_0x176365+_0x378535(0x8f))),0x0;}if(_0x1ff20a===_0x378535(0xad)){if(!profileExists(_0x176365))return console['error'](_0x378535(0xbe)+_0x176365+_0x378535(0x9e)),console['error'](_0x378535(0xb5)),0x1;const _0x351c01=getSessionID(_0x1f2d79[_0x378535(0xbd)]);return saveSessionContext({'profile':_0x176365},_0x1f2d79[_0x378535(0xbd)]),console[_0x378535(0x99)](_0x378535(0xaf)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x351c01+')')),console['log'](a51_0x2e77e4[_0x378535(0x94)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20'+_0x176365+_0x378535(0x8f))),0x0;}const _0x4a838a={},_0x6374b2=getSessionID(_0x1f2d79[_0x378535(0xbd)]);switch(_0x1ff20a){case'database':_0x4a838a[_0x378535(0xca)]=_0x176365,console[_0x378535(0x99)](_0x378535(0xb3)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)]('(session:\x20'+_0x6374b2+')'));break;case _0x378535(0xc1):_0x4a838a[_0x378535(0xc1)]=_0x176365,console[_0x378535(0x99)](_0x378535(0xac)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')'));break;case'llm_project':_0x4a838a['llm_project']=_0x176365,console[_0x378535(0x99)](_0x378535(0xc7)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')'));break;case _0x378535(0xbb):{const {projectName:_0x22acc6,agentName:_0xf77657}=parseAgentRef(_0x176365);_0xf77657?(_0x4a838a[_0x378535(0x8c)]=_0x22acc6,_0x4a838a[_0x378535(0xcd)]=_0xf77657,console['log'](_0x378535(0xc7)+a51_0x2e77e4[_0x378535(0xd7)](_0x22acc6)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')')),console[_0x378535(0x99)](_0x378535(0xba)+a51_0x2e77e4[_0x378535(0xd7)](_0xf77657)+'\x20'+a51_0x2e77e4[_0x378535(0x94)]('(session:\x20'+_0x6374b2+')'))):(_0x4a838a[_0x378535(0xcd)]=_0x176365,console[_0x378535(0x99)]('Session\x20agent\x20set\x20to:\x20'+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4['dim'](_0x378535(0xab)+_0x6374b2+')')));break;}case _0x378535(0xb7):case'composable_audience':_0x4a838a[_0x378535(0xb1)]=_0x176365,console[_0x378535(0x99)]('Session\x20composable_audience\x20set\x20to:\x20'+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4[_0x378535(0x94)](_0x378535(0xab)+_0x6374b2+')'));break;case'engage_workspace':{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x176365+_0x378535(0xb8),()=>_0x5b07dc['tdx']['engage']['resolveWorkspaceId'](_0x176365));}catch(_0x5124b3){if(_0x5124b3 instanceof SDKError&&(_0x5124b3[_0x378535(0x92)]===ErrorCode[_0x378535(0xc3)]||_0x5124b3[_0x378535(0x92)]===ErrorCode[_0x378535(0xa6)]))return console['error'](_0x378535(0xa7)+_0x5124b3[_0x378535(0xa3)]),console[_0x378535(0xc9)]('\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces'),0x1;throw _0x5124b3;}_0x4a838a[_0x378535(0xc4)]=_0x176365,console['log'](_0x378535(0xd9)+a51_0x2e77e4[_0x378535(0xd7)](_0x176365)+'\x20'+a51_0x2e77e4['dim']('(session:\x20'+_0x6374b2+')'));break;}}return saveSessionContext(_0x4a838a,_0x1f2d79[_0x378535(0xbd)]),console['log'](a51_0x2e77e4[_0x378535(0x94)](_0x378535(0x96))),0x0;}catch(_0x3fd77b){return _0x3fd77b instanceof Error&&console['error'](_0x378535(0xa7)+_0x3fd77b[_0x378535(0xa3)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a52_0x5ef328=a52_0x2b4e;(function(_0x28dd90,_0x394074){const _0x4abe5f=a52_0x2b4e,_0x5413c7=_0x28dd90();while(!![]){try{const _0x3f692d=-parseInt(_0x4abe5f(0x10e))/0x1+-parseInt(_0x4abe5f(0x10d))/0x2+parseInt(_0x4abe5f(0x111))/0x3+parseInt(_0x4abe5f(0x119))/0x4+-parseInt(_0x4abe5f(0x10f))/0x5*(-parseInt(_0x4abe5f(0xfd))/0x6)+parseInt(_0x4abe5f(0x113))/0x7+parseInt(_0x4abe5f(0x10b))/0x8*(-parseInt(_0x4abe5f(0xfb))/0x9);if(_0x3f692d===_0x394074)break;else _0x5413c7['push'](_0x5413c7['shift']());}catch(_0x46f453){_0x5413c7['push'](_0x5413c7['shift']());}}}(a52_0x6972,0x71b9a));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';function a52_0x6972(){const _0x1a5891=['1992PVWKSz','getCurrent','494850uAhvTL','7696LQZMhC','3184085Gycvba','Fetching\x20user\x20info...','58083OromCD','length','6226283CzGfwI','sort','list','Unknown','Show\x20current\x20user\x20information','user','499912jaYKUB','\x20(owner)','yellow','verbose','execute','message','34326flLNsB','List\x20all\x20users\x20in\x20the\x20account','6cuKWBj','Error:\x20','\x20user','localeCompare','name','dim','email','error','Listing\x20users...','data','cause','✔\x20Found\x20','description','\x20\x20Cause:\x20'];a52_0x6972=function(){return _0x1a5891;};return a52_0x6972();}import{withSpinner}from'../utils/spinner.js';import a52_0x53d555 from'chalk';function a52_0x2b4e(_0x3f6f1f,_0x1698fe){_0x3f6f1f=_0x3f6f1f-0xf6;const _0x6972f4=a52_0x6972();let _0x2b4e9a=_0x6972f4[_0x3f6f1f];return _0x2b4e9a;}export class UserCommand extends BaseCommand{[a52_0x5ef328(0x101)]=a52_0x5ef328(0x118);[a52_0x5ef328(0x109)]=a52_0x5ef328(0x117);async[a52_0x5ef328(0xf9)](_0x5996ad){const _0x3f7c66=a52_0x5ef328,{options:_0x504136,tdx:_0x2406c5}=_0x5996ad;try{const _0x2b26c0=await withSpinner(_0x3f7c66(0x110),()=>_0x2406c5[_0x3f7c66(0x118)][_0x3f7c66(0x10c)](),{'verbose':_0x504136[_0x3f7c66(0xf8)]}),_0x294615=_0x2b26c0['data'];return await handleSingleObjectOutput(_0x294615,_0x504136),0x0;}catch(_0x745955){if(_0x745955 instanceof SDKError)return console[_0x3f7c66(0x104)](_0x3f7c66(0xfe)+_0x745955[_0x3f7c66(0xfa)]),_0x745955[_0x3f7c66(0x107)]&&console[_0x3f7c66(0x104)](_0x3f7c66(0x10a)+_0x745955[_0x3f7c66(0x107)]),0x1;throw _0x745955;}}}export class UserListCommand extends BaseCommand{[a52_0x5ef328(0x101)]='user\x20list';['description']=a52_0x5ef328(0xfc);async[a52_0x5ef328(0xf9)](_0x1a9411){const _0x1d504b=a52_0x5ef328,{options:_0x4516d9,tdx:_0x1fd061}=_0x1a9411;try{const _0x2e1688=await withSpinner(_0x1d504b(0x105),()=>_0x1fd061[_0x1d504b(0x118)][_0x1d504b(0x115)](),{'verbose':_0x4516d9[_0x1d504b(0xf8)]}),_0x50dbec=_0x2e1688[_0x1d504b(0x106)];console[_0x1d504b(0x104)](_0x1d504b(0x108)+_0x50dbec[_0x1d504b(0x112)]+_0x1d504b(0xff)+(_0x50dbec[_0x1d504b(0x112)]!==0x1?'s':''));if(isStructuredFormat(_0x4516d9))await handleSDKOutput(_0x50dbec,_0x4516d9);else{const _0x4b6e47=[..._0x50dbec][_0x1d504b(0x114)]((_0x5ce0ff,_0x30f229)=>String(_0x5ce0ff[_0x1d504b(0x101)]??'')[_0x1d504b(0x100)](String(_0x30f229[_0x1d504b(0x101)]??'')));for(const _0x4121db of _0x4b6e47){const _0x1d156c=_0x4121db['account_owner']?a52_0x53d555[_0x1d504b(0xf7)](_0x1d504b(0xf6)):_0x4121db['administrator']?a52_0x53d555[_0x1d504b(0xf7)]('\x20(admin)'):'',_0x13b60b=_0x4121db[_0x1d504b(0x103)]&&_0x4121db['email']!==_0x4121db[_0x1d504b(0x101)]?a52_0x53d555[_0x1d504b(0x102)]('\x20<'+_0x4121db[_0x1d504b(0x103)]+'>'):'';console['log']('👤\x20'+(_0x4121db[_0x1d504b(0x101)]??_0x1d504b(0x116))+_0x13b60b+_0x1d156c);}}return 0x0;}catch(_0x173c82){if(_0x173c82 instanceof SDKError)return console[_0x1d504b(0x104)](_0x1d504b(0xfe)+_0x173c82[_0x1d504b(0xfa)]),_0x173c82[_0x1d504b(0x107)]&&console[_0x1d504b(0x104)](_0x1d504b(0x10a)+_0x173c82[_0x1d504b(0x107)]),0x1;throw _0x173c82;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a53_0x361bd3=a53_0x191d;(function(_0x5ee973,_0x4b2c76){const _0x17cd48=a53_0x191d,_0xd88053=_0x5ee973();while(!![]){try{const _0x4cfb13=parseInt(_0x17cd48(0x9c))/0x1*(-parseInt(_0x17cd48(0xc3))/0x2)+-parseInt(_0x17cd48(0xbe))/0x3+parseInt(_0x17cd48(0x9d))/0x4*(-parseInt(_0x17cd48(0xb4))/0x5)+parseInt(_0x17cd48(0xd1))/0x6+-parseInt(_0x17cd48(0xf2))/0x7*(-parseInt(_0x17cd48(0xcf))/0x8)+parseInt(_0x17cd48(0xed))/0x9+-parseInt(_0x17cd48(0xa5))/0xa*(parseInt(_0x17cd48(0xf8))/0xb);if(_0x4cfb13===_0x4b2c76)break;else _0xd88053['push'](_0xd88053['shift']());}catch(_0x148dd9){_0xd88053['push'](_0xd88053['shift']());}}}(a53_0x2c74,0x74330));function a53_0x2c74(){const _0x391cb6=['frontmatter','Document\x20not\x20found:\x20','has','todo','github','critical','No\x20workspace\x20found.','reduce','goals','bold','kind','underline','priority','No\x20incoming\x20backlinks','initAt','body','Created:','goal','done','Incoming','.\x20Valid:\x20','Workspace:\x20','workspacePath','cyan','yellow','945324jQeTSB','Workspace\x20initialized\x20in\x20current\x20directory','green','tags','guide','35CSFduA','\x20\x20(empty)','isArray','join','No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>','\x20\x20←\x20','11UdkYfg','resolvedKind','medium','repeat','status','values','Invalid\x20kind:\x20','getBacklinks','exit','map','\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.','\x20→\x20','dim','void','3092yOnIBO','56mpRHdk','assignee','displayText','white','red','error','slug','template','1147570VKuKVc','workflow','fileName','design_review','progress','taskCounts','path','Invalid\x20priority:\x20','\x20[[','days','planning','note','Linked\x20to\x20GitHub:\x20','trim','inherit','198030GJjPid','high','init','Tasks','readDocument','Wiki-links','all','createDocument','Links\x20for:\x20','cwd','722484myMZSt','resolveWikiLinks','round','resolvedPath','item','34UIvpGq','No\x20outgoing\x20wiki-links','review','low','log','reference','entries','name','filePath','title','length','Workspace\x20initialized:','714920akJxaH','Invalid\x20status:\x20','5320344WhoStz','flatMap','moveTask'];a53_0x2c74=function(){return _0x391cb6;};return a53_0x2c74();}import{getChalk}from'../utils/colors.js';const chalk=getChalk();function a53_0x191d(_0x5e7a7b,_0x485978){_0x5e7a7b=_0x5e7a7b-0x99;const _0x2c74a5=a53_0x2c74();let _0x191dde=_0x2c74a5[_0x5e7a7b];return _0x191dde;}import{execFileSync}from'node:child_process';import a53_0x5f46fe from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x76c761){const _0x3e1f56=a53_0x191d;if(_0x76c761[_0x3e1f56(0xba)])return{'includeStale':!![]};if(_0x76c761['days'])return{'updatedWithin':parseInt(_0x76c761[_0x3e1f56(0xae)],0xa)};return undefined;}const VALID_KINDS=new Set([a53_0x361bd3(0xc2),a53_0x361bd3(0xe5),a53_0x361bd3(0xf1),a53_0x361bd3(0xb0),a53_0x361bd3(0xc8),a53_0x361bd3(0xa6),a53_0x361bd3(0xa4)]),VALID_PRIORITIES=new Set([a53_0x361bd3(0xd9),a53_0x361bd3(0xb5),'medium',a53_0x361bd3(0xc6)]),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x10f2ec=a53_0x361bd3,_0x13aea5=resolveWorkspacePath();return!_0x13aea5&&(console['error'](chalk[_0x10f2ec(0xa1)](_0x10f2ec(0xda))+'\x20Run\x20'+chalk[_0x10f2ec(0xeb)]('tdx\x20work\x20init\x20<name>')+_0x10f2ec(0x102)),process[_0x10f2ec(0x100)](0x1)),new WorkspaceSDK(_0x13aea5);}function priorityDot(_0x183868){const _0x324155=a53_0x361bd3;switch(_0x183868){case _0x324155(0xd9):return chalk[_0x324155(0xa1)]('●');case'high':return chalk[_0x324155(0xec)]('●');case _0x324155(0xfa):return chalk['blue']('●');case _0x324155(0xc6):return chalk['gray']('●');default:return chalk['blue']('●');}}function statusColor(_0x443710){const _0x1cf8e6=a53_0x361bd3;switch(_0x443710){case _0x1cf8e6(0xe6):return chalk[_0x1cf8e6(0xef)](_0x443710);case _0x1cf8e6(0x9b):return chalk['gray'](_0x443710);case'in_progress':return chalk['cyan'](_0x443710);case _0x1cf8e6(0xc5):return chalk['magenta'](_0x443710);case _0x1cf8e6(0xaf):case _0x1cf8e6(0xa8):return chalk[_0x1cf8e6(0xec)](_0x443710);case _0x1cf8e6(0xd7):return chalk[_0x1cf8e6(0xa0)](_0x443710);case'backlog':return chalk[_0x1cf8e6(0x9a)](_0x443710);default:return _0x443710;}}export async function workSummaryAction(_0x1b0840){const _0x1d7d08=a53_0x361bd3,_0xaf51a2=getSDK(),_0x18b46c=buildStaleFilter(_0x1b0840),_0x29f162=_0xaf51a2['getSummary'](_0x18b46c);console[_0x1d7d08(0xc7)](chalk[_0x1d7d08(0xdd)](_0x1d7d08(0xe9)+_0x29f162[_0x1d7d08(0xca)])),console['log'](chalk[_0x1d7d08(0x9a)](_0x29f162[_0x1d7d08(0xab)])),console[_0x1d7d08(0xc7)]();const _0x47674a=Object[_0x1d7d08(0xfd)](_0x29f162[_0x1d7d08(0xaa)])[_0x1d7d08(0xdb)]((_0x58f5ca,_0xf1ad67)=>_0x58f5ca+_0xf1ad67,0x0);if(_0x47674a===0x0)console[_0x1d7d08(0xc7)](chalk[_0x1d7d08(0x9a)](_0x1d7d08(0xf6)));else{console[_0x1d7d08(0xc7)](chalk[_0x1d7d08(0xdd)](_0x1d7d08(0xb7)));for(const [_0x326c5c,_0x31ae87]of Object['entries'](_0x29f162[_0x1d7d08(0xaa)])){_0x31ae87>0x0&&console[_0x1d7d08(0xc7)]('\x20\x20'+statusColor(_0x326c5c)+':\x20'+_0x31ae87);}console[_0x1d7d08(0xc7)]();}if(_0x29f162[_0x1d7d08(0xdc)][_0x1d7d08(0xcd)]>0x0){console['log'](chalk['bold']('Goals'));for(const _0x21ebb8 of _0x29f162[_0x1d7d08(0xdc)]){const _0x119e10=progressBar(_0x21ebb8[_0x1d7d08(0xa9)]);console[_0x1d7d08(0xc7)]('\x20\x20'+_0x21ebb8[_0x1d7d08(0xcc)]+'\x20'+_0x119e10+'\x20'+_0x21ebb8[_0x1d7d08(0xa9)]+'%');}}}function progressBar(_0x194614){const _0x4ae955=a53_0x361bd3,_0x1a3821=0x14,_0x19b71e=Math[_0x4ae955(0xc0)](_0x194614/0x64*_0x1a3821),_0x2c800a=_0x1a3821-_0x19b71e;return chalk['green']('█'[_0x4ae955(0xfb)](_0x19b71e))+chalk[_0x4ae955(0x9a)]('░'[_0x4ae955(0xfb)](_0x2c800a));}export async function workInitAction(_0x4e9a63,_0x4eb666){const _0x552a9d=a53_0x361bd3,_0x28d4d1=_0x4e9a63||a53_0x5f46fe['basename'](process[_0x552a9d(0xbd)]());if(_0x4eb666[_0x552a9d(0xd8)]){const _0x5d549c=WorkspaceSDK['initAt'](_0x28d4d1,{'github':_0x4eb666[_0x552a9d(0xd8)]});console[_0x552a9d(0xc7)](chalk[_0x552a9d(0xef)]('Workspace\x20initialized:')+'\x20'+_0x5d549c[_0x552a9d(0xea)]),console[_0x552a9d(0xc7)](chalk[_0x552a9d(0x9a)](_0x552a9d(0xb1)+_0x4eb666[_0x552a9d(0xd8)]));}else{if(_0x4e9a63){const _0x5f8323=WorkspaceSDK[_0x552a9d(0xe2)](_0x4e9a63);console[_0x552a9d(0xc7)](chalk['green'](_0x552a9d(0xce))+'\x20'+_0x5f8323['workspacePath']);}else{const _0x13fe00=new WorkspaceSDK(process[_0x552a9d(0xbd)]());_0x13fe00[_0x552a9d(0xb6)](_0x28d4d1),console['log'](chalk[_0x552a9d(0xef)](_0x552a9d(0xee)));}}}export async function workNewAction(_0x1dac96,_0x2fbcfe){const _0x36a789=a53_0x361bd3,_0x92ef48=getSDK(),_0x59f349=_0x2fbcfe['kind']||_0x36a789(0xc2);!VALID_KINDS['has'](_0x59f349)&&(console[_0x36a789(0xa2)](chalk[_0x36a789(0xa1)](_0x36a789(0xfe)+_0x59f349+_0x36a789(0xe8)+[...VALID_KINDS][_0x36a789(0xf5)](',\x20'))),process['exit'](0x1));_0x2fbcfe[_0x36a789(0xe0)]&&!VALID_PRIORITIES['has'](_0x2fbcfe[_0x36a789(0xe0)])&&(console[_0x36a789(0xa2)](chalk[_0x36a789(0xa1)](_0x36a789(0xac)+_0x2fbcfe['priority']+_0x36a789(0xe8)+[...VALID_PRIORITIES][_0x36a789(0xf5)](',\x20'))),process['exit'](0x1));_0x2fbcfe[_0x36a789(0xfc)]&&!VALID_STATUSES[_0x36a789(0xd6)](_0x2fbcfe[_0x36a789(0xfc)])&&(console[_0x36a789(0xa2)](chalk[_0x36a789(0xa1)](_0x36a789(0xd0)+_0x2fbcfe[_0x36a789(0xfc)]+'.\x20Valid:\x20'+[...VALID_STATUSES][_0x36a789(0xf5)](',\x20'))),process['exit'](0x1));const _0x23b2cf=_0x2fbcfe[_0x36a789(0xf0)]?_0x2fbcfe[_0x36a789(0xf0)]['split'](',')[_0x36a789(0x101)](_0x57096c=>_0x57096c[_0x36a789(0xb2)]()):undefined,_0xa353ee=_0x92ef48[_0x36a789(0xbb)]({'title':_0x1dac96,'kind':_0x59f349,'tags':_0x23b2cf,'priority':_0x2fbcfe[_0x36a789(0xe0)],'body':_0x2fbcfe[_0x36a789(0xe3)],'template':_0x2fbcfe[_0x36a789(0xa4)],'status':_0x2fbcfe[_0x36a789(0xfc)],'assignee':_0x2fbcfe[_0x36a789(0x9e)]});console[_0x36a789(0xc7)](chalk[_0x36a789(0xef)](_0x36a789(0xe4))+'\x20'+_0xa353ee[_0x36a789(0xa7)]),console['log'](chalk[_0x36a789(0x9a)](_0xa353ee[_0x36a789(0xcb)]));}export async function workMoveAction(_0x573e01,_0x142ba7){const _0x2ad54e=a53_0x361bd3;!VALID_STATUSES[_0x2ad54e(0xd6)](_0x142ba7)&&(console['error'](chalk[_0x2ad54e(0xa1)]('Invalid\x20status:\x20'+_0x142ba7+_0x2ad54e(0xe8)+[...VALID_STATUSES]['join'](',\x20'))),process['exit'](0x1));const _0x208764=getSDK(),_0x1b5654=_0x208764[_0x2ad54e(0xd3)](_0x573e01,_0x142ba7);!_0x1b5654&&(console['error'](chalk['red'](_0x2ad54e(0xd5)+_0x573e01)),process['exit'](0x1));const _0x5e599d=_0x1b5654['frontmatter']['title']||_0x1b5654['fileName'];console['log'](chalk[_0x2ad54e(0xef)]('Moved:')+('\x20'+_0x5e599d+_0x2ad54e(0x99)+statusColor(_0x142ba7)));}export async function workBoardAction(_0x5f2327){const _0x4d0388=a53_0x361bd3,_0x50ea29=getSDK(),_0x3c24a0=buildStaleFilter(_0x5f2327),{grouped:_0x7b38be}=_0x50ea29['getTasksByStatus'](_0x3c24a0);for(const [_0x58499b,_0x15f5fe]of Object[_0x4d0388(0xc9)](STATUS_PHASES)){const _0x297ac7=_0x15f5fe[_0x4d0388(0xd2)](_0x26934b=>_0x7b38be[_0x26934b]||[]);console[_0x4d0388(0xc7)](chalk[_0x4d0388(0xdd)][_0x4d0388(0xdf)](_0x58499b)+chalk[_0x4d0388(0x9a)]('\x20('+_0x297ac7['length']+')'));if(_0x297ac7[_0x4d0388(0xcd)]===0x0)console[_0x4d0388(0xc7)](chalk[_0x4d0388(0x9a)](_0x4d0388(0xf3)));else for(const _0x3e49b8 of _0x297ac7){const _0xba86d4=_0x3e49b8['frontmatter'],_0x25da6e=priorityDot(_0xba86d4[_0x4d0388(0xe0)]),_0x46ab38=_0xba86d4[_0x4d0388(0xcc)]||_0x3e49b8[_0x4d0388(0xa7)],_0x5075e8=normalizeTags(_0xba86d4[_0x4d0388(0xf0)]),_0x98343e=_0x5075e8['length']?chalk['dim']('\x20['+_0x5075e8[_0x4d0388(0xf5)](',\x20')+']'):'',_0x31f35f=chalk[_0x4d0388(0x9a)]('('+_0xba86d4[_0x4d0388(0xfc)]+')');console[_0x4d0388(0xc7)]('\x20\x20'+_0x25da6e+'\x20'+_0x46ab38+'\x20'+_0x31f35f+_0x98343e);}console['log']();}}export async function workShowAction(_0x595cbf){const _0x274fab=a53_0x361bd3,_0x336495=getSDK(),_0x1fdd6b=_0x336495['readDocument'](_0x595cbf);!_0x1fdd6b&&(console[_0x274fab(0xa2)](chalk[_0x274fab(0xa1)](_0x274fab(0xd5)+_0x595cbf)),process[_0x274fab(0x100)](0x1));console[_0x274fab(0xc7)](chalk[_0x274fab(0xdd)](_0x1fdd6b[_0x274fab(0xd4)]['title']||_0x1fdd6b[_0x274fab(0xa7)])),console[_0x274fab(0xc7)](chalk[_0x274fab(0x9a)](_0x1fdd6b['filePath'])),console[_0x274fab(0xc7)]();const _0x3a4ede=_0x1fdd6b[_0x274fab(0xd4)];for(const [_0x3111b6,_0x3f8b90]of Object[_0x274fab(0xc9)](_0x3a4ede)){if(_0x3111b6===_0x274fab(0xcc))continue;if(_0x3f8b90===undefined||_0x3f8b90===null)continue;const _0x5a88bb=Array[_0x274fab(0xf4)](_0x3f8b90)?_0x3f8b90[_0x274fab(0xf5)](',\x20'):String(_0x3f8b90);console['log']('\x20\x20'+chalk['cyan'](_0x3111b6)+':\x20'+_0x5a88bb);}console[_0x274fab(0xc7)]();_0x1fdd6b[_0x274fab(0xe3)]['trim']()&&(console[_0x274fab(0xc7)](_0x1fdd6b['body'][_0x274fab(0xb2)]()),console[_0x274fab(0xc7)]());const _0x2c274d=_0x336495[_0x274fab(0xbf)](_0x1fdd6b[_0x274fab(0xe3)]);if(_0x2c274d[_0x274fab(0xcd)]>0x0){console['log'](chalk[_0x274fab(0xdd)](_0x274fab(0xb9)));for(const _0x439e49 of _0x2c274d){const _0x3fe008=_0x439e49[_0x274fab(0xc1)]?chalk['green']('✓'):chalk[_0x274fab(0xa1)]('✗'),_0x3d4e0b=_0x439e49['displayText']||_0x439e49[_0x274fab(0xa3)];console['log']('\x20\x20'+_0x3fe008+_0x274fab(0xad)+_0x3d4e0b+']]');}console[_0x274fab(0xc7)]();}const _0x36952c=_0x336495[_0x274fab(0xff)](_0x1fdd6b[_0x274fab(0xa7)]);if(_0x36952c[_0x274fab(0xcd)]>0x0){console[_0x274fab(0xc7)](chalk[_0x274fab(0xdd)]('Backlinks'));for(const _0x3d2fe6 of _0x36952c){console[_0x274fab(0xc7)](_0x274fab(0xf7)+_0x3d2fe6[_0x274fab(0xcc)]+'\x20'+chalk['dim']('('+_0x3d2fe6[_0x274fab(0xde)]+')'));}}}export async function workLinksAction(_0x10e574){const _0x4e11cb=a53_0x361bd3,_0x38b41b=getSDK(),_0x120783=_0x38b41b[_0x4e11cb(0xb8)](_0x10e574);!_0x120783&&(console['error'](chalk['red']('Document\x20not\x20found:\x20'+_0x10e574)),process[_0x4e11cb(0x100)](0x1));const _0x4e1f11=_0x120783[_0x4e11cb(0xd4)][_0x4e11cb(0xcc)]||_0x120783[_0x4e11cb(0xa7)];console[_0x4e11cb(0xc7)](chalk[_0x4e11cb(0xdd)](_0x4e11cb(0xbc)+_0x4e1f11)),console[_0x4e11cb(0xc7)]();const _0x356085=_0x38b41b[_0x4e11cb(0xbf)](_0x120783[_0x4e11cb(0xe3)]);if(_0x356085[_0x4e11cb(0xcd)]>0x0){console[_0x4e11cb(0xc7)](chalk['bold']('Outgoing'));for(const _0x395d51 of _0x356085){const _0x34caa1=_0x395d51[_0x4e11cb(0xc1)]?chalk[_0x4e11cb(0xef)]('✓'):chalk[_0x4e11cb(0xa1)]('✗'),_0x5ae91b=_0x395d51[_0x4e11cb(0x9f)]||_0x395d51[_0x4e11cb(0xa3)],_0x1d859d=_0x395d51['resolvedKind']?chalk[_0x4e11cb(0x9a)]('\x20('+_0x395d51[_0x4e11cb(0xf9)]+')'):'';console[_0x4e11cb(0xc7)]('\x20\x20'+_0x34caa1+_0x4e11cb(0xad)+_0x5ae91b+']]'+_0x1d859d);}}else console[_0x4e11cb(0xc7)](chalk['dim'](_0x4e11cb(0xc4)));console[_0x4e11cb(0xc7)]();const _0x311ba5=_0x38b41b[_0x4e11cb(0xff)](_0x120783[_0x4e11cb(0xa7)]);if(_0x311ba5[_0x4e11cb(0xcd)]>0x0){console[_0x4e11cb(0xc7)](chalk[_0x4e11cb(0xdd)](_0x4e11cb(0xe7)));for(const _0xb0f0cb of _0x311ba5){console[_0x4e11cb(0xc7)](_0x4e11cb(0xf7)+_0xb0f0cb[_0x4e11cb(0xcc)]+'\x20'+chalk['dim']('('+_0xb0f0cb[_0x4e11cb(0xde)]+')'));}}else console[_0x4e11cb(0xc7)](chalk[_0x4e11cb(0x9a)](_0x4e11cb(0xe1)));}export async function workOpenAction(_0x3f69b5){const _0x212889=a53_0x361bd3,_0x3bfcff=getSDK(),_0x317500=_0x3bfcff[_0x212889(0xb8)](_0x3f69b5);!_0x317500&&(console['error'](chalk[_0x212889(0xa1)](_0x212889(0xd5)+_0x3f69b5)),process[_0x212889(0x100)](0x1));const _0xe299c4=process.env.EDITOR||'vi';try{execFileSync(_0xe299c4,[_0x317500[_0x212889(0xcb)]],{'stdio':_0x212889(0xb3)});}catch{console[_0x212889(0xa2)](chalk['red']('Failed\x20to\x20open\x20editor:\x20'+_0xe299c4)),process[_0x212889(0x100)](0x1);}}
|
|
1
|
+
const a53_0x9211f3=a53_0x59d5;(function(_0x44e7cb,_0x300cff){const _0x126b6f=a53_0x59d5,_0x12adf1=_0x44e7cb();while(!![]){try{const _0x1f8af5=parseInt(_0x126b6f(0xf5))/0x1*(-parseInt(_0x126b6f(0xc0))/0x2)+-parseInt(_0x126b6f(0xff))/0x3+-parseInt(_0x126b6f(0xb9))/0x4*(parseInt(_0x126b6f(0xc2))/0x5)+parseInt(_0x126b6f(0xc9))/0x6+-parseInt(_0x126b6f(0x105))/0x7+-parseInt(_0x126b6f(0xf6))/0x8+parseInt(_0x126b6f(0xfa))/0x9*(parseInt(_0x126b6f(0xe4))/0xa);if(_0x1f8af5===_0x300cff)break;else _0x12adf1['push'](_0x12adf1['shift']());}catch(_0x4ed701){_0x12adf1['push'](_0x12adf1['shift']());}}}(a53_0x2bfe,0x5166b));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';import a53_0x5f1361 from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';function a53_0x59d5(_0x418758,_0x1b8f20){_0x418758=_0x418758-0xaf;const _0x2bfe9c=a53_0x2bfe();let _0x59d5d5=_0x2bfe9c[_0x418758];return _0x59d5d5;}import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x522dd3){const _0x446e8d=a53_0x59d5;if(_0x522dd3[_0x446e8d(0x113)])return{'includeStale':!![]};if(_0x522dd3[_0x446e8d(0xdb)])return{'updatedWithin':parseInt(_0x522dd3[_0x446e8d(0xdb)],0xa)};return undefined;}const VALID_KINDS=new Set([a53_0x9211f3(0xe0),a53_0x9211f3(0x10c),a53_0x9211f3(0xd0),a53_0x9211f3(0xfd),a53_0x9211f3(0x114),'workflow',a53_0x9211f3(0x103)]),VALID_PRIORITIES=new Set([a53_0x9211f3(0xc7),a53_0x9211f3(0xd6),a53_0x9211f3(0xe7),'low']),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x51b655=a53_0x9211f3,_0x2f1052=resolveWorkspacePath();return!_0x2f1052&&(console['error'](chalk[_0x51b655(0xf0)](_0x51b655(0xee))+_0x51b655(0xcd)+chalk['cyan'](_0x51b655(0xb1))+_0x51b655(0xe3)),process[_0x51b655(0xbc)](0x1)),new WorkspaceSDK(_0x2f1052);}function a53_0x2bfe(){const _0x50ca74=['No\x20outgoing\x20wiki-links','225990OYprGR','has','Created:','yellow','template','moveTask','1445465VPTHQh','split','fileName','Failed\x20to\x20open\x20editor:\x20','isArray','taskCounts','body','goal','title','low','slug','No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>','entries','join','all','reference','blue','Invalid\x20status:\x20','Workspace\x20initialized\x20in\x20current\x20directory','Wiki-links','Invalid\x20priority:\x20','void','tdx\x20work\x20init\x20<name>','getBacklinks','flatMap','magenta','\x20\x20←\x20','readDocument','workspacePath','green','12WTCDPR','gray','filePath','exit','resolvedKind','map','github','2MONLUu','Outgoing','977035LSQYdO','resolvedPath','round','\x20[[','todo','critical','goals','41742pfqiWw','Document\x20not\x20found:\x20','cwd','No\x20incoming\x20backlinks','\x20Run\x20','error','values','guide','repeat','getTasksByStatus','\x20\x20(empty)','Workspace\x20initialized:','dim','high','displayText','Backlinks','Linked\x20to\x20GitHub:\x20','reduce','days','Incoming','bold','frontmatter','in_progress','item','\x20→\x20','Moved:','\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.','276670uHXVnC','Invalid\x20kind:\x20','log','medium','status','initAt','trim','progress','.\x20Valid:\x20','length','No\x20workspace\x20found.','Goals','red','design_review','backlog','inherit','white','103612FiYNiQ','3116536OiAIVx','cyan','tags','kind','549DRoHGZ','getSummary','priority','note'];a53_0x2bfe=function(){return _0x50ca74;};return a53_0x2bfe();}function priorityDot(_0x2e46a8){const _0x402c54=a53_0x9211f3;switch(_0x2e46a8){case _0x402c54(0xc7):return chalk[_0x402c54(0xf0)]('●');case'high':return chalk[_0x402c54(0x102)]('●');case'medium':return chalk[_0x402c54(0x115)]('●');case _0x402c54(0x10e):return chalk['gray']('●');default:return chalk[_0x402c54(0x115)]('●');}}function statusColor(_0x4381e5){const _0x5019a4=a53_0x9211f3;switch(_0x4381e5){case'done':return chalk[_0x5019a4(0xb8)](_0x4381e5);case _0x5019a4(0xb0):return chalk[_0x5019a4(0xba)](_0x4381e5);case _0x5019a4(0xdf):return chalk[_0x5019a4(0xf7)](_0x4381e5);case'review':return chalk[_0x5019a4(0xb4)](_0x4381e5);case'planning':case _0x5019a4(0xf1):return chalk[_0x5019a4(0x102)](_0x4381e5);case _0x5019a4(0xc6):return chalk[_0x5019a4(0xf4)](_0x4381e5);case _0x5019a4(0xf2):return chalk[_0x5019a4(0xd5)](_0x4381e5);default:return _0x4381e5;}}export async function workSummaryAction(_0x4d0307){const _0x40b85b=a53_0x9211f3,_0x44e0c2=getSDK(),_0x2f6f48=buildStaleFilter(_0x4d0307),_0x3e1b65=_0x44e0c2[_0x40b85b(0xfb)](_0x2f6f48);console[_0x40b85b(0xe6)](chalk[_0x40b85b(0xdd)]('Workspace:\x20'+_0x3e1b65['name'])),console[_0x40b85b(0xe6)](chalk['dim'](_0x3e1b65['path'])),console[_0x40b85b(0xe6)]();const _0xf2eb41=Object[_0x40b85b(0xcf)](_0x3e1b65[_0x40b85b(0x10a)])[_0x40b85b(0xda)]((_0x407e26,_0x427dbe)=>_0x407e26+_0x427dbe,0x0);if(_0xf2eb41===0x0)console[_0x40b85b(0xe6)](chalk['dim'](_0x40b85b(0x110)));else{console[_0x40b85b(0xe6)](chalk[_0x40b85b(0xdd)]('Tasks'));for(const [_0x589f2d,_0x1a448e]of Object[_0x40b85b(0x111)](_0x3e1b65[_0x40b85b(0x10a)])){_0x1a448e>0x0&&console[_0x40b85b(0xe6)]('\x20\x20'+statusColor(_0x589f2d)+':\x20'+_0x1a448e);}console['log']();}if(_0x3e1b65[_0x40b85b(0xc8)][_0x40b85b(0xed)]>0x0){console[_0x40b85b(0xe6)](chalk[_0x40b85b(0xdd)](_0x40b85b(0xef)));for(const _0x91effb of _0x3e1b65[_0x40b85b(0xc8)]){const _0x25f86a=progressBar(_0x91effb['progress']);console[_0x40b85b(0xe6)]('\x20\x20'+_0x91effb[_0x40b85b(0x10d)]+'\x20'+_0x25f86a+'\x20'+_0x91effb[_0x40b85b(0xeb)]+'%');}}}function progressBar(_0x2cb6e8){const _0x354be6=a53_0x9211f3,_0x23b65c=0x14,_0xb31bb4=Math[_0x354be6(0xc4)](_0x2cb6e8/0x64*_0x23b65c),_0x4811f9=_0x23b65c-_0xb31bb4;return chalk['green']('█'[_0x354be6(0xd1)](_0xb31bb4))+chalk[_0x354be6(0xd5)]('░'[_0x354be6(0xd1)](_0x4811f9));}export async function workInitAction(_0x242655,_0x433825){const _0x1af539=a53_0x9211f3,_0x53a2a4=_0x242655||a53_0x5f1361['basename'](process[_0x1af539(0xcb)]());if(_0x433825[_0x1af539(0xbf)]){const _0xf9f5a6=WorkspaceSDK[_0x1af539(0xe9)](_0x53a2a4,{'github':_0x433825[_0x1af539(0xbf)]});console['log'](chalk[_0x1af539(0xb8)](_0x1af539(0xd4))+'\x20'+_0xf9f5a6[_0x1af539(0xb7)]),console[_0x1af539(0xe6)](chalk[_0x1af539(0xd5)](_0x1af539(0xd9)+_0x433825[_0x1af539(0xbf)]));}else{if(_0x242655){const _0x326b95=WorkspaceSDK[_0x1af539(0xe9)](_0x242655);console[_0x1af539(0xe6)](chalk[_0x1af539(0xb8)](_0x1af539(0xd4))+'\x20'+_0x326b95[_0x1af539(0xb7)]);}else{const _0x46691c=new WorkspaceSDK(process[_0x1af539(0xcb)]());_0x46691c['init'](_0x53a2a4),console[_0x1af539(0xe6)](chalk['green'](_0x1af539(0x117)));}}}export async function workNewAction(_0x53ec3b,_0xef9cc){const _0x341f79=a53_0x9211f3,_0x26f92d=getSDK(),_0x1fde97=_0xef9cc[_0x341f79(0xf9)]||_0x341f79(0xe0);!VALID_KINDS[_0x341f79(0x100)](_0x1fde97)&&(console['error'](chalk[_0x341f79(0xf0)](_0x341f79(0xe5)+_0x1fde97+_0x341f79(0xec)+[...VALID_KINDS][_0x341f79(0x112)](',\x20'))),process['exit'](0x1));_0xef9cc[_0x341f79(0xfc)]&&!VALID_PRIORITIES[_0x341f79(0x100)](_0xef9cc[_0x341f79(0xfc)])&&(console[_0x341f79(0xce)](chalk[_0x341f79(0xf0)](_0x341f79(0xaf)+_0xef9cc[_0x341f79(0xfc)]+'.\x20Valid:\x20'+[...VALID_PRIORITIES][_0x341f79(0x112)](',\x20'))),process[_0x341f79(0xbc)](0x1));_0xef9cc['status']&&!VALID_STATUSES[_0x341f79(0x100)](_0xef9cc[_0x341f79(0xe8)])&&(console[_0x341f79(0xce)](chalk['red'](_0x341f79(0x116)+_0xef9cc[_0x341f79(0xe8)]+_0x341f79(0xec)+[...VALID_STATUSES][_0x341f79(0x112)](',\x20'))),process[_0x341f79(0xbc)](0x1));const _0x4121e8=_0xef9cc[_0x341f79(0xf8)]?_0xef9cc[_0x341f79(0xf8)][_0x341f79(0x106)](',')[_0x341f79(0xbe)](_0x1aefc2=>_0x1aefc2[_0x341f79(0xea)]()):undefined,_0x1ecca4=_0x26f92d['createDocument']({'title':_0x53ec3b,'kind':_0x1fde97,'tags':_0x4121e8,'priority':_0xef9cc[_0x341f79(0xfc)],'body':_0xef9cc['body'],'template':_0xef9cc[_0x341f79(0x103)],'status':_0xef9cc[_0x341f79(0xe8)],'assignee':_0xef9cc['assignee']});console['log'](chalk['green'](_0x341f79(0x101))+'\x20'+_0x1ecca4[_0x341f79(0x107)]),console[_0x341f79(0xe6)](chalk[_0x341f79(0xd5)](_0x1ecca4[_0x341f79(0xbb)]));}export async function workMoveAction(_0x191883,_0x338bf5){const _0x2270ed=a53_0x9211f3;!VALID_STATUSES[_0x2270ed(0x100)](_0x338bf5)&&(console[_0x2270ed(0xce)](chalk[_0x2270ed(0xf0)]('Invalid\x20status:\x20'+_0x338bf5+'.\x20Valid:\x20'+[...VALID_STATUSES][_0x2270ed(0x112)](',\x20'))),process[_0x2270ed(0xbc)](0x1));const _0x3db2c6=getSDK(),_0x23b1cd=_0x3db2c6[_0x2270ed(0x104)](_0x191883,_0x338bf5);!_0x23b1cd&&(console[_0x2270ed(0xce)](chalk['red']('Document\x20not\x20found:\x20'+_0x191883)),process['exit'](0x1));const _0x87151c=_0x23b1cd[_0x2270ed(0xde)][_0x2270ed(0x10d)]||_0x23b1cd['fileName'];console[_0x2270ed(0xe6)](chalk[_0x2270ed(0xb8)](_0x2270ed(0xe2))+('\x20'+_0x87151c+_0x2270ed(0xe1)+statusColor(_0x338bf5)));}export async function workBoardAction(_0x5a82a6){const _0x356918=a53_0x9211f3,_0x45ca6d=getSDK(),_0x534cd7=buildStaleFilter(_0x5a82a6),{grouped:_0x83a4e}=_0x45ca6d[_0x356918(0xd2)](_0x534cd7);for(const [_0x173ce4,_0x291561]of Object['entries'](STATUS_PHASES)){const _0x4241cd=_0x291561[_0x356918(0xb3)](_0x7c2bd9=>_0x83a4e[_0x7c2bd9]||[]);console[_0x356918(0xe6)](chalk['bold']['underline'](_0x173ce4)+chalk['dim']('\x20('+_0x4241cd[_0x356918(0xed)]+')'));if(_0x4241cd['length']===0x0)console['log'](chalk[_0x356918(0xd5)](_0x356918(0xd3)));else for(const _0x1063b2 of _0x4241cd){const _0x1b31b3=_0x1063b2[_0x356918(0xde)],_0x13e8dd=priorityDot(_0x1b31b3[_0x356918(0xfc)]),_0x5cd7b6=_0x1b31b3[_0x356918(0x10d)]||_0x1063b2[_0x356918(0x107)],_0x30ee52=normalizeTags(_0x1b31b3[_0x356918(0xf8)]),_0x8d8480=_0x30ee52[_0x356918(0xed)]?chalk[_0x356918(0xd5)]('\x20['+_0x30ee52[_0x356918(0x112)](',\x20')+']'):'',_0x17ca86=chalk[_0x356918(0xd5)]('('+_0x1b31b3['status']+')');console[_0x356918(0xe6)]('\x20\x20'+_0x13e8dd+'\x20'+_0x5cd7b6+'\x20'+_0x17ca86+_0x8d8480);}console[_0x356918(0xe6)]();}}export async function workShowAction(_0x23535b){const _0x2bc918=a53_0x9211f3,_0x4b3d40=getSDK(),_0x3f0fe4=_0x4b3d40[_0x2bc918(0xb6)](_0x23535b);!_0x3f0fe4&&(console[_0x2bc918(0xce)](chalk[_0x2bc918(0xf0)]('Document\x20not\x20found:\x20'+_0x23535b)),process['exit'](0x1));console[_0x2bc918(0xe6)](chalk[_0x2bc918(0xdd)](_0x3f0fe4['frontmatter'][_0x2bc918(0x10d)]||_0x3f0fe4['fileName'])),console[_0x2bc918(0xe6)](chalk[_0x2bc918(0xd5)](_0x3f0fe4['filePath'])),console[_0x2bc918(0xe6)]();const _0x3863e6=_0x3f0fe4['frontmatter'];for(const [_0x2563da,_0xb4e61d]of Object[_0x2bc918(0x111)](_0x3863e6)){if(_0x2563da===_0x2bc918(0x10d))continue;if(_0xb4e61d===undefined||_0xb4e61d===null)continue;const _0x1b7283=Array[_0x2bc918(0x109)](_0xb4e61d)?_0xb4e61d[_0x2bc918(0x112)](',\x20'):String(_0xb4e61d);console[_0x2bc918(0xe6)]('\x20\x20'+chalk[_0x2bc918(0xf7)](_0x2563da)+':\x20'+_0x1b7283);}console['log']();_0x3f0fe4[_0x2bc918(0x10b)]['trim']()&&(console[_0x2bc918(0xe6)](_0x3f0fe4['body'][_0x2bc918(0xea)]()),console['log']());const _0x26025e=_0x4b3d40['resolveWikiLinks'](_0x3f0fe4[_0x2bc918(0x10b)]);if(_0x26025e[_0x2bc918(0xed)]>0x0){console[_0x2bc918(0xe6)](chalk['bold'](_0x2bc918(0x118)));for(const _0x1124b5 of _0x26025e){const _0x55c882=_0x1124b5[_0x2bc918(0xc3)]?chalk['green']('✓'):chalk[_0x2bc918(0xf0)]('✗'),_0x1111d8=_0x1124b5[_0x2bc918(0xd7)]||_0x1124b5[_0x2bc918(0x10f)];console[_0x2bc918(0xe6)]('\x20\x20'+_0x55c882+'\x20[['+_0x1111d8+']]');}console[_0x2bc918(0xe6)]();}const _0x52da41=_0x4b3d40[_0x2bc918(0xb2)](_0x3f0fe4[_0x2bc918(0x107)]);if(_0x52da41[_0x2bc918(0xed)]>0x0){console[_0x2bc918(0xe6)](chalk[_0x2bc918(0xdd)](_0x2bc918(0xd8)));for(const _0x2f9bc3 of _0x52da41){console['log'](_0x2bc918(0xb5)+_0x2f9bc3['title']+'\x20'+chalk[_0x2bc918(0xd5)]('('+_0x2f9bc3[_0x2bc918(0xf9)]+')'));}}}export async function workLinksAction(_0x3d532e){const _0x5e3905=a53_0x9211f3,_0x451da3=getSDK(),_0x2351cf=_0x451da3[_0x5e3905(0xb6)](_0x3d532e);!_0x2351cf&&(console[_0x5e3905(0xce)](chalk[_0x5e3905(0xf0)]('Document\x20not\x20found:\x20'+_0x3d532e)),process['exit'](0x1));const _0x287c73=_0x2351cf[_0x5e3905(0xde)]['title']||_0x2351cf[_0x5e3905(0x107)];console[_0x5e3905(0xe6)](chalk[_0x5e3905(0xdd)]('Links\x20for:\x20'+_0x287c73)),console[_0x5e3905(0xe6)]();const _0x3aba09=_0x451da3['resolveWikiLinks'](_0x2351cf['body']);if(_0x3aba09[_0x5e3905(0xed)]>0x0){console[_0x5e3905(0xe6)](chalk[_0x5e3905(0xdd)](_0x5e3905(0xc1)));for(const _0x224973 of _0x3aba09){const _0x45074b=_0x224973[_0x5e3905(0xc3)]?chalk[_0x5e3905(0xb8)]('✓'):chalk[_0x5e3905(0xf0)]('✗'),_0x4975b3=_0x224973['displayText']||_0x224973[_0x5e3905(0x10f)],_0x4fd4bd=_0x224973['resolvedKind']?chalk[_0x5e3905(0xd5)]('\x20('+_0x224973[_0x5e3905(0xbd)]+')'):'';console[_0x5e3905(0xe6)]('\x20\x20'+_0x45074b+_0x5e3905(0xc5)+_0x4975b3+']]'+_0x4fd4bd);}}else console[_0x5e3905(0xe6)](chalk['dim'](_0x5e3905(0xfe)));console[_0x5e3905(0xe6)]();const _0x12b0eb=_0x451da3['getBacklinks'](_0x2351cf['fileName']);if(_0x12b0eb[_0x5e3905(0xed)]>0x0){console['log'](chalk[_0x5e3905(0xdd)](_0x5e3905(0xdc)));for(const _0x265bf4 of _0x12b0eb){console[_0x5e3905(0xe6)](_0x5e3905(0xb5)+_0x265bf4[_0x5e3905(0x10d)]+'\x20'+chalk[_0x5e3905(0xd5)]('('+_0x265bf4[_0x5e3905(0xf9)]+')'));}}else console[_0x5e3905(0xe6)](chalk[_0x5e3905(0xd5)](_0x5e3905(0xcc)));}export async function workOpenAction(_0x24f9e1){const _0x2b3bae=a53_0x9211f3,_0x4311f8=getSDK(),_0x1b7bd8=_0x4311f8[_0x2b3bae(0xb6)](_0x24f9e1);!_0x1b7bd8&&(console[_0x2b3bae(0xce)](chalk['red'](_0x2b3bae(0xca)+_0x24f9e1)),process[_0x2b3bae(0xbc)](0x1));const _0xf94e95=process.env.EDITOR||'vi';try{execFileSync(_0xf94e95,[_0x1b7bd8[_0x2b3bae(0xbb)]],{'stdio':_0x2b3bae(0xf3)});}catch{console['error'](chalk['red'](_0x2b3bae(0x108)+_0xf94e95)),process[_0x2b3bae(0xbc)](0x1);}}
|