@treasuredata/tdx 2026.4.8 → 2026.4.9
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.d.ts +2 -0
- package/dist/sdk/workspace/access-tracker.d.ts.map +1 -1
- package/dist/sdk/workspace/access-tracker.js +1 -1
- package/dist/sdk/workspace/access-tracker.js.map +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.d.ts +2 -0
- package/dist/sdk/workspace/index.d.ts.map +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/index.js.map +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.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.d.ts +3 -0
- package/dist/utils/process.d.ts.map +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/process.js.map +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.d.ts +10 -2
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +1 -1
- package/dist/utils/version-check.js.map +1 -1
- package/package.json +1 -1
package/dist/commands/tables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0xac2a83=a48_0x377d;(function(_0x2c3296,_0x1cd241){const _0x5d5c8d=a48_0x377d,_0x146f96=_0x2c3296();while(!![]){try{const _0x28fcea=parseInt(_0x5d5c8d(0x1e3))/0x1+-parseInt(_0x5d5c8d(0x1c2))/0x2+-parseInt(_0x5d5c8d(0x1e2))/0x3+parseInt(_0x5d5c8d(0x1de))/0x4+-parseInt(_0x5d5c8d(0x1e8))/0x5*(-parseInt(_0x5d5c8d(0x1d8))/0x6)+parseInt(_0x5d5c8d(0x1d6))/0x7+-parseInt(_0x5d5c8d(0x1c0))/0x8;if(_0x28fcea===_0x1cd241)break;else _0x146f96['push'](_0x146f96['shift']());}catch(_0x2765cc){_0x146f96['push'](_0x146f96['shift']());}}}(a48_0x2956,0x2b9e0));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';function a48_0x377d(_0x2c7c3d,_0x5c8d2e){_0x2c7c3d=_0x2c7c3d-0x1bf;const _0x29567f=a48_0x2956();let _0x377dc5=_0x29567f[_0x2c7c3d];return _0x377dc5;}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';export class TablesCommand extends BaseCommand{[a48_0xac2a83(0x1ce)]=a48_0xac2a83(0x1c9);[a48_0xac2a83(0x1df)]=a48_0xac2a83(0x1bf);async['execute'](_0x3c55a6){const _0x4b7eff=a48_0xac2a83,{options:_0x1f0ff3,args:_0x1e3a80,tdx:_0x2a5b37}=_0x3c55a6;let _0x44fceb;if(_0x1e3a80['length']===0x0)_0x44fceb={'database':undefined,'table':undefined,'original':''};else{if(_0x1e3a80[_0x4b7eff(0x1e0)]===0x1)try{_0x44fceb=parseTableReference(_0x1e3a80[0x0]);if(_0x44fceb[_0x4b7eff(0x1d2)]&&!_0x44fceb[_0x4b7eff(0x1c8)]&&!_0x44fceb[_0x4b7eff(0x1d2)][_0x4b7eff(0x1d3)]('*')&&!_0x44fceb[_0x4b7eff(0x1d2)][_0x4b7eff(0x1d3)]('?'))return console[_0x4b7eff(0x1cf)]('Error:\x20Pattern\x20\x27'+_0x1e3a80[0x0]+'\x27\x20is\x20ambiguous.'),console[_0x4b7eff(0x1cf)]('Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27'+_0x44fceb[_0x4b7eff(0x1d2)]+'\x27?'),console[_0x4b7eff(0x1cf)]('\x20\x20Use:\x20tdx\x20tables\x20\x22'+_0x44fceb[_0x4b7eff(0x1d2)]+_0x4b7eff(0x1cb)),console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1c4)+_0x44fceb['table']),console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1d9)+_0x44fceb[_0x4b7eff(0x1d2)]),console[_0x4b7eff(0x1cf)](''),console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1d1)+_0x1e3a80[0x0]+_0x4b7eff(0x1d7)+_0x44fceb[_0x4b7eff(0x1d2)]+'\x27\x20across\x20all\x20databases.'),0x1;}catch(_0x556f82){return console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1c5)+_0x556f82[_0x4b7eff(0x1d4)]),0x1;}else return console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1d5)),console['error'](_0x4b7eff(0x1dc)),console['error']('\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb'),console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1e4)),console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1cc)),console[_0x4b7eff(0x1cf)]('Or\x20use\x20--in\x20flag:'),console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1db)),0x1;}const _0x182d4a=_0x1f0ff3[_0x4b7eff(0x1c8)];!_0x44fceb[_0x4b7eff(0x1c8)]&&_0x182d4a&&(_0x44fceb[_0x4b7eff(0x1c8)]=_0x182d4a);try{const _0x221eb8=_0x3a19c5=>_0x3a19c5&&(_0x3a19c5[_0x4b7eff(0x1d3)]('*')||_0x3a19c5[_0x4b7eff(0x1d3)]('?')),_0x1318e2=_0x221eb8(_0x44fceb['database']);_0x1f0ff3['verbose']&&(console['error'](_0x4b7eff(0x1da)+_0x1f0ff3['site']),_0x44fceb[_0x4b7eff(0x1c8)]?_0x1318e2?console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1e6)+_0x44fceb['database']):console[_0x4b7eff(0x1cf)]('Database:\x20'+_0x44fceb['database']):console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1c7)),_0x44fceb[_0x4b7eff(0x1d2)]&&console['error']('Table\x20pattern:\x20'+_0x44fceb[_0x4b7eff(0x1d2)]));const _0x1825a5=_0x44fceb[_0x4b7eff(0x1c8)]&&!_0x1318e2?_0x44fceb[_0x4b7eff(0x1c8)]:undefined,_0x539d38=_0x1318e2?_0x44fceb[_0x4b7eff(0x1c8)]:undefined,_0x5adf6=_0x44fceb[_0x4b7eff(0x1d2)],_0x4d5197=resolveLimit(_0x1f0ff3[_0x4b7eff(0x1c6)],DEFAULT_LISTING_LIMIT),_0x4d82a2=await withSpinner('Listing\x20tables...',()=>_0x2a5b37['query'][_0x4b7eff(0x1dd)](_0x1825a5,_0x5adf6,_0x539d38,_0x4d5197),{'verbose':_0x1f0ff3['verbose']}),_0x5c9079=_0x4d82a2[_0x4b7eff(0x1e5)];if(_0x5c9079[_0x4b7eff(0x1e0)]===0x0&&_0x44fceb[_0x4b7eff(0x1c8)]&&!_0x1318e2)return console[_0x4b7eff(0x1cf)]('✖\x20No\x20tables\x20found'),console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1e7)+_0x44fceb[_0x4b7eff(0x1c8)]+_0x4b7eff(0x1d0)),0x1;console['error']('✔\x20Found\x20'+_0x5c9079[_0x4b7eff(0x1e0)]+'\x20table'+(_0x5c9079['length']!==0x1?'s':''));if(isStructuredFormat(_0x1f0ff3))await handleSDKOutput(_0x5c9079,{..._0x1f0ff3,'limit':_0x4d5197});else for(const _0x24f167 of _0x5c9079){const _0x48420a=_0x24f167[_0x4b7eff(0x1cd)]?_0x24f167[_0x4b7eff(0x1cd)]+'.':'';console[_0x4b7eff(0x1ca)](_0x4b7eff(0x1c3)+_0x48420a+_0x24f167[_0x4b7eff(0x1c1)]);}return 0x0;}catch(_0x223762){if(_0x223762 instanceof SDKError)return console[_0x4b7eff(0x1cf)]('Error:\x20'+_0x223762[_0x4b7eff(0x1d4)]),_0x223762['cause']&&console[_0x4b7eff(0x1cf)](_0x4b7eff(0x1e1)+_0x223762['cause']),0x1;throw _0x223762;}}['validate'](_0x5857a7){return undefined;}}function a48_0x2956(){const _0x34b88e=['database_name','name','error','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','Note:\x20\x27','table','includes','message','Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:','1463595KFdBoS','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','386718EAumVA','\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20','Site:\x20','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','listTables','289408snGbPP','description','length','\x20\x20Cause:\x20','715440lbYaYr','216114marbWh','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','data','Database\x20pattern:\x20','Database\x20\x27','5nCZmoe','List\x20tables\x20in\x20a\x20database','468560JXwYPo','table_name','172596nCMlnL','📋\x20','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','Error:\x20','limit','Database:\x20all','database','tables','log','.*\x22','\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'];a48_0x2956=function(){return _0x34b88e;};return a48_0x2956();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x3b1942=a49_0x12fc;(function(_0xfa72bd,_0x25a6ba){const _0x27bb79=a49_0x12fc,_0x6efe9d=_0xfa72bd();while(!![]){try{const _0x5cd23e=-parseInt(_0x27bb79(0x133))/0x1*(parseInt(_0x27bb79(0x114))/0x2)+parseInt(_0x27bb79(0x134))/0x3*(-parseInt(_0x27bb79(0x10f))/0x4)+parseInt(_0x27bb79(0x128))/0x5+-parseInt(_0x27bb79(0x125))/0x6+-parseInt(_0x27bb79(0x130))/0x7+-parseInt(_0x27bb79(0x10e))/0x8*(-parseInt(_0x27bb79(0x12f))/0x9)+parseInt(_0x27bb79(0x11b))/0xa;if(_0x5cd23e===_0x25a6ba)break;else _0x6efe9d['push'](_0x6efe9d['shift']());}catch(_0x5cf7a1){_0x6efe9d['push'](_0x6efe9d['shift']());}}}(a49_0x7c9e,0x53693));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';function a49_0x12fc(_0x61241,_0x3e9ebf){_0x61241=_0x61241-0x10d;const _0x7c9ef=a49_0x7c9e();let _0x12fc0c=_0x7c9ef[_0x61241];return _0x12fc0c;}function a49_0x7c9e(){const _0x2c82e9=['Clear\x20session-level\x20or\x20default\x20context\x20values','dim','cleared','Invalid\x20resource:\x20','387StLghJ','3969644QZxzBo','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','(session:\x20','270461ftSVVO','5358VCTShb','default','profile','session','length','82984HosFIb','164jLEhHu','Session\x20','agent','green','log','2fBqPSV','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas\x0a','join','name','\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options','error','Default\x20site\x20','10573300iVmeGw','site','database','engage_workspace','validate','\x0aUpdated:\x20','unset','llm_agent','composable_audience','parent_segment','2756814QstSPy','message','tdx.json','1042650GYkFER','cas','includes'];a49_0x7c9e=function(){return _0x2c82e9;};return a49_0x7c9e();}import a49_0x11dab8 from'chalk';import*as a49_0x383445 from'node:path';export class UnsetCommand extends BaseCommand{[a49_0x3b1942(0x117)]=a49_0x3b1942(0x121);['description']=a49_0x3b1942(0x12b);[a49_0x3b1942(0x11f)](_0x1f661a){const _0x4ef367=a49_0x3b1942,{args:_0x275cab,options:_0x5b99ab}=_0x1f661a,_0x1dda64=_0x5b99ab['default'];if(_0x275cab[_0x4ef367(0x10d)]===0x0)return'Usage:\x20tdx\x20unset\x20<resource>\x0a'+_0x4ef367(0x131)+_0x4ef367(0x115)+_0x4ef367(0x118);const _0x42e97d=_0x275cab[0x0],_0x5c6644=[_0x4ef367(0x11c),_0x4ef367(0x11d),'parent_segment','llm_project',_0x4ef367(0x111),'profile','engage_workspace',_0x4ef367(0x129),_0x4ef367(0x123)];if(!_0x5c6644[_0x4ef367(0x12a)](_0x42e97d))return _0x4ef367(0x12e)+_0x42e97d+'.\x20Must\x20be\x20one\x20of:\x20'+_0x5c6644[_0x4ef367(0x116)](',\x20');if(_0x1dda64&&_0x42e97d!==_0x4ef367(0x11c)&&_0x42e97d!=='profile')return'--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.';return undefined;}async['execute'](_0x22c95c){const _0x298c0c=a49_0x3b1942,{args:_0x1f9f84,options:_0x1bd6b9}=_0x22c95c,_0x4e3462=_0x1bd6b9[_0x298c0c(0x135)];cleanExpiredSessions();try{const _0x52bdd5=_0x1f9f84[0x0],_0x1be20a=a49_0x383445[_0x298c0c(0x116)](getConfigDir(),_0x298c0c(0x127));if(_0x4e3462){if(_0x52bdd5==='site')return clearDefaultSiteFromUserConfig(),console['log'](_0x298c0c(0x11a)+a49_0x11dab8[_0x298c0c(0x112)](_0x298c0c(0x12d))),console[_0x298c0c(0x113)](a49_0x11dab8[_0x298c0c(0x12c)](_0x298c0c(0x120)+_0x1be20a)),0x0;if(_0x52bdd5===_0x298c0c(0x136))return clearActiveProfileFromUserConfig(),console[_0x298c0c(0x113)]('Default\x20profile\x20'+a49_0x11dab8[_0x298c0c(0x112)](_0x298c0c(0x12d))),console[_0x298c0c(0x113)](a49_0x11dab8['dim'](_0x298c0c(0x120)+_0x1be20a)),0x0;}const _0x1ee479=getSessionID(_0x1bd6b9[_0x298c0c(0x137)]),_0x16e616={'site':_0x298c0c(0x11c),'database':'database','parent_segment':_0x298c0c(0x124),'llm_project':'llm_project','agent':_0x298c0c(0x122),'profile':_0x298c0c(0x136),'engage_workspace':_0x298c0c(0x11e),'cas':_0x298c0c(0x123),'composable_audience':_0x298c0c(0x123)},_0x13647a=_0x16e616[_0x52bdd5];return _0x13647a&&(clearSessionContextField(_0x13647a,_0x1bd6b9['session']),console[_0x298c0c(0x113)](_0x298c0c(0x110)+_0x52bdd5+'\x20'+a49_0x11dab8[_0x298c0c(0x112)]('cleared')+'\x20'+a49_0x11dab8[_0x298c0c(0x12c)](_0x298c0c(0x132)+_0x1ee479+')'))),0x0;}catch(_0x30972b){return _0x30972b instanceof Error&&console[_0x298c0c(0x119)]('Error:\x20'+_0x30972b[_0x298c0c(0x126)]),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x45f240=a50_0x4e63;(function(_0x545855,_0x16e852){const _0x4b4ff9=a50_0x4e63,_0x167085=_0x545855();while(!![]){try{const _0xa579b5=parseInt(_0x4b4ff9(0xe8))/0x1*(-parseInt(_0x4b4ff9(0xf6))/0x2)+parseInt(_0x4b4ff9(0xec))/0x3+-parseInt(_0x4b4ff9(0xee))/0x4*(-parseInt(_0x4b4ff9(0x10e))/0x5)+parseInt(_0x4b4ff9(0xe4))/0x6+-parseInt(_0x4b4ff9(0xe9))/0x7*(-parseInt(_0x4b4ff9(0x109))/0x8)+-parseInt(_0x4b4ff9(0x101))/0x9+parseInt(_0x4b4ff9(0xfa))/0xa;if(_0xa579b5===_0x16e852)break;else _0x167085['push'](_0x167085['shift']());}catch(_0x591281){_0x167085['push'](_0x167085['shift']());}}}(a50_0x26ce,0x19643));import{gt}from'semver';import a50_0x2d16ab from'chalk';import{BaseCommand}from'./command.js';import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';function a50_0x26ce(){const _0x3616af=['8jKKxZn','...','pnpm','error','description','5cuwuRz','yarn','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','dryRun','Latest\x20version:','latest','@treasuredata/tdx','.bun/','Failed\x20to\x20check\x20for\x20updates:\x20','438798PLscnf','next','Current\x20version:\x20','yellow','1CKuUQI','4914jQQntm','Running:','message','176307nubGAB','join','422108KoxaND','Current\x20version:','toLowerCase','add','bun','Checking\x20','log','argv','292834WpeZFA','cyan','name','execute','1618970QWqvsi','dim','green','Successfully\x20upgraded\x20to\x20','Already\x20up\x20to\x20date\x20(','execPath','global','1346472smhCyM','red','inherit','npm','upgrade','Would\x20run:','Target\x20version:','includes'];a50_0x26ce=function(){return _0x3616af;};return a50_0x26ce();}import{fetchLatestVersion}from'../utils/version-check.js';function a50_0x4e63(_0x2239d0,_0x34d576){_0x2239d0=_0x2239d0-0xde;const _0x26cea6=a50_0x26ce();let _0x4e6331=_0x26cea6[_0x2239d0];return _0x4e6331;}import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME=a50_0x45f240(0xe1);export function detectPackageManager(){const _0x5bca8f=a50_0x45f240,_0x56c969=process[_0x5bca8f(0xff)][_0x5bca8f(0xf0)](),_0x2add71=process[_0x5bca8f(0xf5)][0x1]??'';if(_0x56c969[_0x5bca8f(0x108)](_0x5bca8f(0xf2))||_0x2add71[_0x5bca8f(0x108)](_0x5bca8f(0xe2)))return'bun';if(_0x2add71[_0x5bca8f(0x108)](_0x5bca8f(0x10b)))return _0x5bca8f(0x10b);if(_0x2add71[_0x5bca8f(0x108)](_0x5bca8f(0x10f)))return _0x5bca8f(0x10f);return _0x5bca8f(0x104);}export function buildInstallArgs(_0xf8d9d4,_0x503497){const _0x4f846c=a50_0x45f240;switch(_0xf8d9d4){case _0x4f846c(0x10f):return[_0x4f846c(0x100),_0x4f846c(0xf1),_0x503497];case _0x4f846c(0x10b):return[_0x4f846c(0xf1),'-g',_0x503497];default:return['install','-g',_0x503497];}}export class UpgradeCommand extends BaseCommand{[a50_0x45f240(0xf8)]=a50_0x45f240(0x105);[a50_0x45f240(0x10d)]='Upgrade\x20tdx\x20to\x20the\x20latest\x20version';async[a50_0x45f240(0xf9)](_0x9b773c){const _0x41bfcd=a50_0x45f240,{options:_0x1e0cd2,args:_0x512999}=_0x9b773c,_0x20ce9f=!!_0x1e0cd2[_0x41bfcd(0xde)],{next:_0x41b624,method:_0xdbbb24}=_0x1e0cd2,_0x5e9a21=_0x41b624?'next':loadReleaseChannel(),_0x1593d2=_0x5e9a21==='next'?_0x41bfcd(0xe5):_0x41bfcd(0xe0),_0x5279d0=_0x512999[0x0]?String(_0x512999[0x0])['replace'](/^v/,''):undefined,_0x12e237=getVersion();if(isDevVersion())return console[_0x41bfcd(0x10c)](a50_0x2d16ab[_0x41bfcd(0xe7)](_0x41bfcd(0x110))),console[_0x41bfcd(0x10c)](a50_0x2d16ab[_0x41bfcd(0xfb)](_0x41bfcd(0xe6)+_0x12e237)),0x1;let _0x514c3d;if(_0x5279d0)_0x514c3d=_0x5279d0,console[_0x41bfcd(0xf4)](a50_0x2d16ab[_0x41bfcd(0xfb)](_0x41bfcd(0xef))+'\x20'+_0x12e237),console[_0x41bfcd(0xf4)](a50_0x2d16ab['dim'](_0x41bfcd(0x107))+'\x20\x20'+a50_0x2d16ab[_0x41bfcd(0xfc)](_0x5279d0)),console[_0x41bfcd(0xf4)]();else{console[_0x41bfcd(0xf4)](a50_0x2d16ab[_0x41bfcd(0xfb)](_0x41bfcd(0xf3)+PACKAGE_NAME+'@'+_0x1593d2+_0x41bfcd(0x10a)));try{_0x514c3d=await fetchLatestVersion(_0x5e9a21);}catch(_0x35bfc3){return console['error'](a50_0x2d16ab[_0x41bfcd(0x102)](_0x41bfcd(0xe3)+(_0x35bfc3 instanceof Error?_0x35bfc3[_0x41bfcd(0xeb)]:String(_0x35bfc3)))),0x1;}if(!gt(_0x514c3d,_0x12e237))return console[_0x41bfcd(0xf4)](a50_0x2d16ab[_0x41bfcd(0xfc)](_0x41bfcd(0xfe)+_0x12e237+').')),0x0;console[_0x41bfcd(0xf4)](a50_0x2d16ab[_0x41bfcd(0xfb)](_0x41bfcd(0xef))+'\x20'+_0x12e237),console[_0x41bfcd(0xf4)](a50_0x2d16ab[_0x41bfcd(0xfb)](_0x41bfcd(0xdf))+'\x20\x20'+a50_0x2d16ab[_0x41bfcd(0xfc)](_0x514c3d)),console[_0x41bfcd(0xf4)]();}const _0x15401e=_0xdbbb24??detectPackageManager(),_0x3e8e1f=_0x5279d0?PACKAGE_NAME+'@'+_0x5279d0:PACKAGE_NAME+'@'+_0x1593d2,_0x1956f0=buildInstallArgs(_0x15401e,_0x3e8e1f);if(_0x20ce9f)return console[_0x41bfcd(0xf4)](a50_0x2d16ab[_0x41bfcd(0xfb)](_0x41bfcd(0x106))),console['log']('\x20\x20'+a50_0x2d16ab[_0x41bfcd(0xf7)](_0x15401e+'\x20'+_0x1956f0[_0x41bfcd(0xed)]('\x20'))),0x0;return console[_0x41bfcd(0xf4)](a50_0x2d16ab[_0x41bfcd(0xfb)](_0x41bfcd(0xea))+'\x20'+_0x15401e+'\x20'+_0x1956f0[_0x41bfcd(0xed)]('\x20')),console[_0x41bfcd(0xf4)](),new Promise(_0x1490ec=>{const _0x4a00cb=_0x41bfcd,_0x371c45=crossSpawn(_0x15401e,_0x1956f0,{'stdio':_0x4a00cb(0x103)});_0x371c45['on']('close',_0x128c15=>{const _0x5f316a=_0x4a00cb;console[_0x5f316a(0xf4)](),_0x128c15===0x0?console[_0x5f316a(0xf4)](a50_0x2d16ab[_0x5f316a(0xfc)](_0x5f316a(0xfd)+_0x3e8e1f)):console[_0x5f316a(0x10c)](a50_0x2d16ab[_0x5f316a(0x102)]('Upgrade\x20failed\x20(exit\x20code\x20'+_0x128c15+').')),_0x1490ec(_0x128c15??0x1);}),_0x371c45['on'](_0x4a00cb(0x10c),_0x2a250c=>{const _0x4acfea=_0x4a00cb;console[_0x4acfea(0x10c)](a50_0x2d16ab[_0x4acfea(0x102)]('Failed\x20to\x20run\x20'+_0x15401e+':\x20'+_0x2a250c[_0x4acfea(0xeb)])),_0x1490ec(0x1);});});}}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a51_0x4ab9a9=a51_0x1bd1;(function(_0x9a3aac,_0x1855de){const _0xd035fb=a51_0x1bd1,_0x5e0f13=_0x9a3aac();while(!![]){try{const _0xeffdc2=parseInt(_0xd035fb(0x161))/0x1+-parseInt(_0xd035fb(0x12e))/0x2*(-parseInt(_0xd035fb(0x140))/0x3)+-parseInt(_0xd035fb(0x16a))/0x4*(parseInt(_0xd035fb(0x166))/0x5)+parseInt(_0xd035fb(0x16f))/0x6+-parseInt(_0xd035fb(0x17a))/0x7*(parseInt(_0xd035fb(0x14d))/0x8)+parseInt(_0xd035fb(0x131))/0x9*(parseInt(_0xd035fb(0x146))/0xa)+parseInt(_0xd035fb(0x154))/0xb*(-parseInt(_0xd035fb(0x14e))/0xc);if(_0xeffdc2===_0x1855de)break;else _0x5e0f13['push'](_0x5e0f13['shift']());}catch(_0x520b13){_0x5e0f13['push'](_0x5e0f13['shift']());}}}(a51_0x137f,0xcb50f));import{BaseCommand}from'./command.js';import{saveSessionContext,getSessionID,cleanExpiredSessions,clearSessionContext}from'../core/session.js';import{profileExists,saveActiveProfileToUserConfig,saveDefaultSiteToUserConfig}from'../core/profile.js';function a51_0x1bd1(_0x49b78e,_0x2d36d8){_0x49b78e=_0x49b78e-0x12b;const _0x137fca=a51_0x137f();let _0x1bd126=_0x137fca[_0x49b78e];return _0x1bd126;}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';function a51_0x137f(){const _0x352904=['\x27\x20does\x20not\x20exist','\x0aSaved\x20to:\x20','4175980WHVIoF','Session\x20llm_project\x20set\x20to:\x20','validate','parent_segment','agent','1512084SomweR','Default\x20site\x20set\x20to:\x20','default','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','error','Error:\x20Profile\x20\x27','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','join','engage_workspace','\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.','7207942pAtAXF','database','(session:\x20','\x27...','tdx.json','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','length','composable_audience','94aPBGka','Session\x20composable_audience\x20set\x20to:\x20','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','17001lyqufR','debug','use','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','Session\x20context\x20','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','execute','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','Invalid\x20release\x20channel:\x20','release_channel','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','Default\x20profile\x20set\x20to:\x20','Session\x20profile\x20set\x20to:\x20','Error:\x20','75822xgwBrv','\x27\x20to\x20save\x20permanently','dim','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','profile','message','4190xZjsFp','green','NOT_FOUND','code','clear','displayWithSources','\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','8HPqYCa','3201756xJRvGi','engage','site','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','session','Release\x20channel\x20set\x20to:\x20','33WbkRaV','cleared','cas','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','Session\x20site\x20set\x20to:\x20','next','description','llm_project','Session\x20agent\x20set\x20to:\x20','llm_agent','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','1475540EvHaNH','Session\x20parent_segment\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20','log','5FwgaFt','Verifying\x20workspace\x20\x27'];a51_0x137f=function(){return _0x352904;};return a51_0x137f();}import{withSpinner}from'../utils/spinner.js';import a51_0x55de13 from'chalk';import*as a51_0x44baec from'node:path';export class UseCommand extends BaseCommand{['name']=a51_0x4ab9a9(0x133);[a51_0x4ab9a9(0x15a)]='Set\x20session-level\x20context';[a51_0x4ab9a9(0x16c)](_0x112172){const _0x48c64f=a51_0x4ab9a9,{args:_0x42cd93,options:_0x395967}=_0x112172,_0x57fae2=_0x395967[_0x48c64f(0x171)];if(_0x42cd93[_0x48c64f(0x12c)]===0x0)return undefined;if(_0x42cd93[_0x48c64f(0x12c)]===0x1)return _0x48c64f(0x15f)+_0x48c64f(0x14c)+_0x48c64f(0x135)+_0x48c64f(0x178)+_0x48c64f(0x143)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a'+'\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a'+_0x48c64f(0x160);const _0x156abc=_0x42cd93[0x0],_0x5c6ea3=[_0x48c64f(0x150),_0x48c64f(0x17b),'parent_segment',_0x48c64f(0x15b),_0x48c64f(0x16e),_0x48c64f(0x144),_0x48c64f(0x177),_0x48c64f(0x156),_0x48c64f(0x12d),'release_channel'];if(!_0x5c6ea3['includes'](_0x156abc))return'Invalid\x20resource:\x20'+_0x156abc+_0x48c64f(0x163)+_0x5c6ea3[_0x48c64f(0x176)](',\x20');if(_0x57fae2&&_0x156abc!==_0x48c64f(0x150)&&_0x156abc!==_0x48c64f(0x144)&&_0x156abc!==_0x48c64f(0x13b))return _0x48c64f(0x139);if(_0x156abc===_0x48c64f(0x13b)&&!_0x57fae2)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x156abc===_0x48c64f(0x13b)){const _0x3950cb=_0x42cd93[0x1];if(_0x3950cb!=='stable'&&_0x3950cb!=='next')return _0x48c64f(0x13a)+_0x3950cb+_0x48c64f(0x179);}return undefined;}async[a51_0x4ab9a9(0x138)](_0x5ecf2a){const _0x145eef=a51_0x4ab9a9,{args:_0x32d61b,options:_0x769057}=_0x5ecf2a,_0x1ec41b=_0x769057[_0x145eef(0x132)],_0x3262dd=_0x769057[_0x145eef(0x14a)],_0x3425b6=_0x769057[_0x145eef(0x171)];cleanExpiredSessions();try{if(_0x3262dd){clearSessionContext(_0x769057[_0x145eef(0x152)]);const _0x1c8501=getSessionID(_0x769057[_0x145eef(0x152)]);return console[_0x145eef(0x165)](_0x145eef(0x136)+a51_0x55de13['green'](_0x145eef(0x155))+'\x20'+a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x17c)+_0x1c8501+')')),0x0;}if(_0x32d61b[_0x145eef(0x12c)]===0x0){const _0x26b189=new GlobalContext(_0x769057);return _0x1ec41b?_0x26b189[_0x145eef(0x14b)]():_0x26b189['display'](),console[_0x145eef(0x165)](a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x151))),console[_0x145eef(0x165)](a51_0x55de13['dim'](_0x145eef(0x15e))),console[_0x145eef(0x165)](a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x172))),0x0;}const _0x3490b6=_0x32d61b[0x0],_0x33b2fe=_0x32d61b[0x1],_0x4d16c5=a51_0x44baec['join'](getConfigDir(),_0x145eef(0x17e));if(_0x3425b6){if(_0x3490b6===_0x145eef(0x150))return saveDefaultSiteToUserConfig(_0x33b2fe),console[_0x145eef(0x165)](_0x145eef(0x170)+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)),console[_0x145eef(0x165)](a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x169)+_0x4d16c5)),0x0;if(_0x3490b6===_0x145eef(0x144)){if(!profileExists(_0x33b2fe))return console[_0x145eef(0x173)](_0x145eef(0x174)+_0x33b2fe+_0x145eef(0x168)),console[_0x145eef(0x173)](_0x145eef(0x13c)),0x1;return saveActiveProfileToUserConfig(_0x33b2fe),console[_0x145eef(0x165)](_0x145eef(0x13d)+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)),console[_0x145eef(0x165)](a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x169)+_0x4d16c5)),0x0;}if(_0x3490b6===_0x145eef(0x13b))return saveReleaseChannel(_0x33b2fe),console['log'](_0x145eef(0x153)+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)),console[_0x145eef(0x165)](a51_0x55de13['dim'](_0x145eef(0x169)+_0x4d16c5)),_0x33b2fe===_0x145eef(0x159)?(console[_0x145eef(0x165)](a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x130))),console[_0x145eef(0x165)](a51_0x55de13['dim'](_0x145eef(0x175)))):console[_0x145eef(0x165)](a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x157))),0x0;}if(_0x3490b6===_0x145eef(0x150)){const _0x3b53c4=getSessionID(_0x769057[_0x145eef(0x152)]);return saveSessionContext({'site':_0x33b2fe},_0x769057[_0x145eef(0x152)]),console['log'](_0x145eef(0x158)+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)+'\x20'+a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x17c)+_0x3b53c4+')')),console[_0x145eef(0x165)](a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x164)+_0x33b2fe+_0x145eef(0x141))),0x0;}if(_0x3490b6===_0x145eef(0x144)){if(!profileExists(_0x33b2fe))return console[_0x145eef(0x173)](_0x145eef(0x174)+_0x33b2fe+'\x27\x20does\x20not\x20exist'),console[_0x145eef(0x173)](_0x145eef(0x13c)),0x1;const _0x33b6cf=getSessionID(_0x769057[_0x145eef(0x152)]);return saveSessionContext({'profile':_0x33b2fe},_0x769057['session']),console[_0x145eef(0x165)](_0x145eef(0x13e)+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)+'\x20'+a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x17c)+_0x33b6cf+')')),console[_0x145eef(0x165)](a51_0x55de13['dim'](_0x145eef(0x12b)+_0x33b2fe+_0x145eef(0x141))),0x0;}const _0x1301ea={},_0x19120f=getSessionID(_0x769057[_0x145eef(0x152)]);switch(_0x3490b6){case'database':_0x1301ea[_0x145eef(0x17b)]=_0x33b2fe,console[_0x145eef(0x165)]('Session\x20database\x20set\x20to:\x20'+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)+'\x20'+a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x17c)+_0x19120f+')'));break;case'parent_segment':_0x1301ea[_0x145eef(0x16d)]=_0x33b2fe,console[_0x145eef(0x165)](_0x145eef(0x162)+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)+'\x20'+a51_0x55de13[_0x145eef(0x142)]('(session:\x20'+_0x19120f+')'));break;case _0x145eef(0x15b):_0x1301ea[_0x145eef(0x15b)]=_0x33b2fe,console[_0x145eef(0x165)]('Session\x20llm_project\x20set\x20to:\x20'+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)+'\x20'+a51_0x55de13['dim'](_0x145eef(0x17c)+_0x19120f+')'));break;case _0x145eef(0x16e):{const {projectName:_0x15841c,agentName:_0x57e3d7}=parseAgentRef(_0x33b2fe);_0x57e3d7?(_0x1301ea['llm_project']=_0x15841c,_0x1301ea[_0x145eef(0x15d)]=_0x57e3d7,console[_0x145eef(0x165)](_0x145eef(0x16b)+a51_0x55de13[_0x145eef(0x147)](_0x15841c)+'\x20'+a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x17c)+_0x19120f+')')),console[_0x145eef(0x165)](_0x145eef(0x15c)+a51_0x55de13['green'](_0x57e3d7)+'\x20'+a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x17c)+_0x19120f+')'))):(_0x1301ea[_0x145eef(0x15d)]=_0x33b2fe,console['log'](_0x145eef(0x15c)+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)+'\x20'+a51_0x55de13[_0x145eef(0x142)](_0x145eef(0x17c)+_0x19120f+')')));break;}case'cas':case _0x145eef(0x12d):_0x1301ea[_0x145eef(0x12d)]=_0x33b2fe,console[_0x145eef(0x165)](_0x145eef(0x12f)+a51_0x55de13['green'](_0x33b2fe)+'\x20'+a51_0x55de13[_0x145eef(0x142)]('(session:\x20'+_0x19120f+')'));break;case _0x145eef(0x177):{try{await withSpinner(_0x145eef(0x167)+_0x33b2fe+_0x145eef(0x17d),()=>_0x5ecf2a['tdx'][_0x145eef(0x14f)]['resolveWorkspaceId'](_0x33b2fe));}catch(_0x49e4e2){if(_0x49e4e2 instanceof SDKError&&(_0x49e4e2[_0x145eef(0x149)]===ErrorCode[_0x145eef(0x148)]||_0x49e4e2[_0x145eef(0x149)]===ErrorCode['INVALID_ARGUMENT']))return console[_0x145eef(0x173)]('Error:\x20'+_0x49e4e2[_0x145eef(0x145)]),console[_0x145eef(0x173)](_0x145eef(0x137)),0x1;throw _0x49e4e2;}_0x1301ea['engage_workspace']=_0x33b2fe,console[_0x145eef(0x165)]('Session\x20engage_workspace\x20set\x20to:\x20'+a51_0x55de13[_0x145eef(0x147)](_0x33b2fe)+'\x20'+a51_0x55de13['dim'](_0x145eef(0x17c)+_0x19120f+')'));break;}}return saveSessionContext(_0x1301ea,_0x769057[_0x145eef(0x152)]),console[_0x145eef(0x165)](a51_0x55de13['dim'](_0x145eef(0x134))),0x0;}catch(_0x44943a){return _0x44943a instanceof Error&&console[_0x145eef(0x173)](_0x145eef(0x13f)+_0x44943a['message']),0x1;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x52ea09=a52_0x1eb8;(function(_0x557451,_0x169840){const _0x8bb5ce=a52_0x1eb8,_0x448eb9=_0x557451();while(!![]){try{const _0x54a1d0=-parseInt(_0x8bb5ce(0x142))/0x1+-parseInt(_0x8bb5ce(0x154))/0x2*(-parseInt(_0x8bb5ce(0x15b))/0x3)+parseInt(_0x8bb5ce(0x144))/0x4+-parseInt(_0x8bb5ce(0x163))/0x5+-parseInt(_0x8bb5ce(0x162))/0x6*(parseInt(_0x8bb5ce(0x14c))/0x7)+-parseInt(_0x8bb5ce(0x167))/0x8+-parseInt(_0x8bb5ce(0x158))/0x9*(-parseInt(_0x8bb5ce(0x152))/0xa);if(_0x54a1d0===_0x169840)break;else _0x448eb9['push'](_0x448eb9['shift']());}catch(_0xd010c5){_0x448eb9['push'](_0x448eb9['shift']());}}}(a52_0x339f,0x63415));function a52_0x1eb8(_0x530b69,_0x12a08d){_0x530b69=_0x530b69-0x142;const _0x339f64=a52_0x339f();let _0x1eb8c6=_0x339f64[_0x530b69];return _0x1eb8c6;}import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';function a52_0x339f(){const _0x1682d0=['list','sort','821968KBVjoy','223464FDVVxl','verbose','387088Rdbhgn','execute','description','Show\x20current\x20user\x20information','Unknown','👤\x20','localeCompare','data','49bibTjP','✔\x20Found\x20','Error:\x20','yellow','cause','List\x20all\x20users\x20in\x20the\x20account','7784270QWDsxn','administrator','83770yFvbiz','Listing\x20users...','Fetching\x20user\x20info...','\x20\x20Cause:\x20','9LcBlEe','message','dim','45tRNJZX','error','name','email','length','getCurrent','user','363666fQtZjM','1732190iavdne','log'];a52_0x339f=function(){return _0x1682d0;};return a52_0x339f();}import{withSpinner}from'../utils/spinner.js';import a52_0xb73fd6 from'chalk';export class UserCommand extends BaseCommand{[a52_0x52ea09(0x15d)]='user';['description']=a52_0x52ea09(0x147);async[a52_0x52ea09(0x145)](_0x24ba0a){const _0x190c9c=a52_0x52ea09,{options:_0x25f091,tdx:_0x5f0063}=_0x24ba0a;try{const _0x50c5e9=await withSpinner(_0x190c9c(0x156),()=>_0x5f0063[_0x190c9c(0x161)][_0x190c9c(0x160)](),{'verbose':_0x25f091[_0x190c9c(0x143)]}),_0x1ab70a=_0x50c5e9['data'];return await handleSingleObjectOutput(_0x1ab70a,_0x25f091),0x0;}catch(_0x1ece8c){if(_0x1ece8c instanceof SDKError)return console[_0x190c9c(0x15c)](_0x190c9c(0x14e)+_0x1ece8c[_0x190c9c(0x159)]),_0x1ece8c[_0x190c9c(0x150)]&&console[_0x190c9c(0x15c)](_0x190c9c(0x157)+_0x1ece8c['cause']),0x1;throw _0x1ece8c;}}}export class UserListCommand extends BaseCommand{['name']='user\x20list';[a52_0x52ea09(0x146)]=a52_0x52ea09(0x151);async[a52_0x52ea09(0x145)](_0x1c6947){const _0x28992c=a52_0x52ea09,{options:_0x4e5a0e,tdx:_0x1eb37d}=_0x1c6947;try{const _0x19c537=await withSpinner(_0x28992c(0x155),()=>_0x1eb37d[_0x28992c(0x161)][_0x28992c(0x165)](),{'verbose':_0x4e5a0e[_0x28992c(0x143)]}),_0x5f2d85=_0x19c537[_0x28992c(0x14b)];console[_0x28992c(0x15c)](_0x28992c(0x14d)+_0x5f2d85[_0x28992c(0x15f)]+'\x20user'+(_0x5f2d85[_0x28992c(0x15f)]!==0x1?'s':''));if(isStructuredFormat(_0x4e5a0e))await handleSDKOutput(_0x5f2d85,_0x4e5a0e);else{const _0x2551a6=[..._0x5f2d85][_0x28992c(0x166)]((_0x48043d,_0x49e6be)=>String(_0x48043d[_0x28992c(0x15d)]??'')[_0x28992c(0x14a)](String(_0x49e6be[_0x28992c(0x15d)]??'')));for(const _0x5295b0 of _0x2551a6){const _0x32e84c=_0x5295b0['account_owner']?a52_0xb73fd6[_0x28992c(0x14f)]('\x20(owner)'):_0x5295b0[_0x28992c(0x153)]?a52_0xb73fd6[_0x28992c(0x14f)]('\x20(admin)'):'',_0xaef1a9=_0x5295b0[_0x28992c(0x15e)]&&_0x5295b0['email']!==_0x5295b0[_0x28992c(0x15d)]?a52_0xb73fd6[_0x28992c(0x15a)]('\x20<'+_0x5295b0[_0x28992c(0x15e)]+'>'):'';console[_0x28992c(0x164)](_0x28992c(0x149)+(_0x5295b0['name']??_0x28992c(0x148))+_0xaef1a9+_0x32e84c);}}return 0x0;}catch(_0x5039de){if(_0x5039de instanceof SDKError)return console[_0x28992c(0x15c)](_0x28992c(0x14e)+_0x5039de['message']),_0x5039de[_0x28992c(0x150)]&&console[_0x28992c(0x15c)](_0x28992c(0x157)+_0x5039de[_0x28992c(0x150)]),0x1;throw _0x5039de;}}}
|
|
@@ -1 +1 @@
|
|
|
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);}}
|
|
1
|
+
const a53_0x389b1e=a53_0x2528;(function(_0x11ee78,_0x592602){const _0x11f866=a53_0x2528,_0x32ee49=_0x11ee78();while(!![]){try{const _0x5d80c0=-parseInt(_0x11f866(0x1ef))/0x1*(parseInt(_0x11f866(0x215))/0x2)+parseInt(_0x11f866(0x1ca))/0x3+-parseInt(_0x11f866(0x21a))/0x4+parseInt(_0x11f866(0x205))/0x5*(parseInt(_0x11f866(0x1d4))/0x6)+-parseInt(_0x11f866(0x1db))/0x7+parseInt(_0x11f866(0x22e))/0x8*(-parseInt(_0x11f866(0x1dc))/0x9)+parseInt(_0x11f866(0x1e8))/0xa*(parseInt(_0x11f866(0x20c))/0xb);if(_0x5d80c0===_0x592602)break;else _0x32ee49['push'](_0x32ee49['shift']());}catch(_0x35ce40){_0x32ee49['push'](_0x32ee49['shift']());}}}(a53_0x5005,0x2bbb6));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';function a53_0x5005(){const _0x393f13=['resolvedPath','medium','kind','error','Workspace\x20initialized:','resolvedKind','exit','dim','isArray','reduce','has','flatMap','high','assignee','No\x20outgoing\x20wiki-links','design_review','1952owSCUJ','.\x20Valid:\x20','\x20Run\x20','Workspace:\x20','resolveWikiLinks','blue','split','885855OiBFUV','priority','No\x20incoming\x20backlinks','Workspace\x20initialized\x20in\x20current\x20directory','readDocument','Links\x20for:\x20','tags','Invalid\x20kind:\x20','\x20\x20←\x20','values','1524114ELplMa','low','frontmatter','review','underline','Invalid\x20priority:\x20','github','151529CgMpNA','792cQNymE','log','todo','backlog','moveTask','reference','Invalid\x20status:\x20','yellow','status','Created:','getTasksByStatus','repeat','10xWeRSy','fileName','days','critical','\x20\x20(empty)','progress','Document\x20not\x20found:\x20','293658EIFaKv','No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>','green','\x20[[','Moved:','entries','done','Tasks','planning','red','workspacePath','Failed\x20to\x20open\x20editor:\x20','item','trim','cyan','\x20→\x20','round','taskCounts','filePath','cwd','body','length','5RpXQYH','createDocument','Wiki-links','void','goal','No\x20workspace\x20found.','\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.','1873201XnRnui','getBacklinks','displayText','path','Linked\x20to\x20GitHub:\x20','join','slug','title','map','2mqeGen','guide','all','Incoming','bold','814768sHPQee','white','in_progress','Outgoing'];a53_0x5005=function(){return _0x393f13;};return a53_0x5005();}import a53_0x14a970 from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x52431f){const _0xe240f8=a53_0x2528;if(_0x52431f[_0xe240f8(0x217)])return{'includeStale':!![]};if(_0x52431f['days'])return{'updatedWithin':parseInt(_0x52431f[_0xe240f8(0x1ea)],0xa)};return undefined;}const VALID_KINDS=new Set([a53_0x389b1e(0x1fb),a53_0x389b1e(0x209),a53_0x389b1e(0x216),'note',a53_0x389b1e(0x1e1),'workflow','template']),VALID_PRIORITIES=new Set(['critical',a53_0x389b1e(0x22a),a53_0x389b1e(0x21f),a53_0x389b1e(0x1d5)]),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x40a202=a53_0x389b1e,_0x43bddd=resolveWorkspacePath();return!_0x43bddd&&(console[_0x40a202(0x221)](chalk['red'](_0x40a202(0x20a))+_0x40a202(0x230)+chalk[_0x40a202(0x1fd)]('tdx\x20work\x20init\x20<name>')+_0x40a202(0x20b)),process['exit'](0x1)),new WorkspaceSDK(_0x43bddd);}function priorityDot(_0x36867f){const _0x1f7839=a53_0x389b1e;switch(_0x36867f){case _0x1f7839(0x1eb):return chalk[_0x1f7839(0x1f8)]('●');case _0x1f7839(0x22a):return chalk[_0x1f7839(0x1e3)]('●');case'medium':return chalk['blue']('●');case _0x1f7839(0x1d5):return chalk['gray']('●');default:return chalk[_0x1f7839(0x1c8)]('●');}}function statusColor(_0x16aa6a){const _0x440d09=a53_0x389b1e;switch(_0x16aa6a){case _0x440d09(0x1f5):return chalk[_0x440d09(0x1f1)](_0x16aa6a);case _0x440d09(0x208):return chalk['gray'](_0x16aa6a);case _0x440d09(0x21c):return chalk['cyan'](_0x16aa6a);case _0x440d09(0x1d7):return chalk['magenta'](_0x16aa6a);case _0x440d09(0x1f7):case _0x440d09(0x22d):return chalk[_0x440d09(0x1e3)](_0x16aa6a);case _0x440d09(0x1de):return chalk[_0x440d09(0x21b)](_0x16aa6a);case _0x440d09(0x1df):return chalk[_0x440d09(0x225)](_0x16aa6a);default:return _0x16aa6a;}}export async function workSummaryAction(_0x312d8f){const _0x461859=a53_0x389b1e,_0x2ebdb4=getSDK(),_0x2adbe8=buildStaleFilter(_0x312d8f),_0x3f2a0e=_0x2ebdb4['getSummary'](_0x2adbe8);console[_0x461859(0x1dd)](chalk[_0x461859(0x219)](_0x461859(0x1c6)+_0x3f2a0e['name'])),console['log'](chalk[_0x461859(0x225)](_0x3f2a0e[_0x461859(0x20f)])),console['log']();const _0x5f1aad=Object[_0x461859(0x1d3)](_0x3f2a0e[_0x461859(0x200)])[_0x461859(0x227)]((_0xdf55b,_0x430caf)=>_0xdf55b+_0x430caf,0x0);if(_0x5f1aad===0x0)console[_0x461859(0x1dd)](chalk[_0x461859(0x225)](_0x461859(0x1f0)));else{console['log'](chalk['bold'](_0x461859(0x1f6)));for(const [_0x5d9581,_0x97c63b]of Object[_0x461859(0x1f4)](_0x3f2a0e['taskCounts'])){_0x97c63b>0x0&&console[_0x461859(0x1dd)]('\x20\x20'+statusColor(_0x5d9581)+':\x20'+_0x97c63b);}console[_0x461859(0x1dd)]();}if(_0x3f2a0e['goals'][_0x461859(0x204)]>0x0){console[_0x461859(0x1dd)](chalk[_0x461859(0x219)]('Goals'));for(const _0x2e8be9 of _0x3f2a0e['goals']){const _0x38934c=progressBar(_0x2e8be9['progress']);console['log']('\x20\x20'+_0x2e8be9['title']+'\x20'+_0x38934c+'\x20'+_0x2e8be9[_0x461859(0x1ed)]+'%');}}}function progressBar(_0x5aaa77){const _0x360fa1=a53_0x389b1e,_0x2c8898=0x14,_0x40aa95=Math[_0x360fa1(0x1ff)](_0x5aaa77/0x64*_0x2c8898),_0x52d3bb=_0x2c8898-_0x40aa95;return chalk['green']('█'[_0x360fa1(0x1e7)](_0x40aa95))+chalk[_0x360fa1(0x225)]('░'['repeat'](_0x52d3bb));}export async function workInitAction(_0x5ce6c1,_0x104348){const _0x54b620=a53_0x389b1e,_0x3da4ce=_0x5ce6c1||a53_0x14a970['basename'](process[_0x54b620(0x202)]());if(_0x104348['github']){const _0x41acf5=WorkspaceSDK['initAt'](_0x3da4ce,{'github':_0x104348[_0x54b620(0x1da)]});console[_0x54b620(0x1dd)](chalk[_0x54b620(0x1f1)](_0x54b620(0x222))+'\x20'+_0x41acf5[_0x54b620(0x1f9)]),console['log'](chalk[_0x54b620(0x225)](_0x54b620(0x210)+_0x104348[_0x54b620(0x1da)]));}else{if(_0x5ce6c1){const _0x5034d4=WorkspaceSDK['initAt'](_0x5ce6c1);console[_0x54b620(0x1dd)](chalk[_0x54b620(0x1f1)](_0x54b620(0x222))+'\x20'+_0x5034d4[_0x54b620(0x1f9)]);}else{const _0x9d2c55=new WorkspaceSDK(process[_0x54b620(0x202)]());_0x9d2c55['init'](_0x3da4ce),console['log'](chalk[_0x54b620(0x1f1)](_0x54b620(0x1cd)));}}}function a53_0x2528(_0xc7e541,_0x57ed59){_0xc7e541=_0xc7e541-0x1c6;const _0x50052a=a53_0x5005();let _0x2528ef=_0x50052a[_0xc7e541];return _0x2528ef;}export async function workNewAction(_0x2c16d4,_0x54ba2a){const _0x147af9=a53_0x389b1e,_0x12d5b6=getSDK(),_0x38c201=_0x54ba2a['kind']||_0x147af9(0x1fb);!VALID_KINDS[_0x147af9(0x228)](_0x38c201)&&(console[_0x147af9(0x221)](chalk[_0x147af9(0x1f8)](_0x147af9(0x1d1)+_0x38c201+_0x147af9(0x22f)+[...VALID_KINDS][_0x147af9(0x211)](',\x20'))),process[_0x147af9(0x224)](0x1));_0x54ba2a[_0x147af9(0x1cb)]&&!VALID_PRIORITIES['has'](_0x54ba2a[_0x147af9(0x1cb)])&&(console[_0x147af9(0x221)](chalk[_0x147af9(0x1f8)](_0x147af9(0x1d9)+_0x54ba2a[_0x147af9(0x1cb)]+_0x147af9(0x22f)+[...VALID_PRIORITIES][_0x147af9(0x211)](',\x20'))),process['exit'](0x1));_0x54ba2a['status']&&!VALID_STATUSES[_0x147af9(0x228)](_0x54ba2a[_0x147af9(0x1e4)])&&(console[_0x147af9(0x221)](chalk[_0x147af9(0x1f8)](_0x147af9(0x1e2)+_0x54ba2a[_0x147af9(0x1e4)]+_0x147af9(0x22f)+[...VALID_STATUSES][_0x147af9(0x211)](',\x20'))),process['exit'](0x1));const _0x1d4a38=_0x54ba2a[_0x147af9(0x1d0)]?_0x54ba2a[_0x147af9(0x1d0)][_0x147af9(0x1c9)](',')[_0x147af9(0x214)](_0xd19dfc=>_0xd19dfc[_0x147af9(0x1fc)]()):undefined,_0x1021c7=_0x12d5b6[_0x147af9(0x206)]({'title':_0x2c16d4,'kind':_0x38c201,'tags':_0x1d4a38,'priority':_0x54ba2a[_0x147af9(0x1cb)],'body':_0x54ba2a[_0x147af9(0x203)],'template':_0x54ba2a['template'],'status':_0x54ba2a['status'],'assignee':_0x54ba2a[_0x147af9(0x22b)]});console[_0x147af9(0x1dd)](chalk[_0x147af9(0x1f1)](_0x147af9(0x1e5))+'\x20'+_0x1021c7[_0x147af9(0x1e9)]),console['log'](chalk['dim'](_0x1021c7[_0x147af9(0x201)]));}export async function workMoveAction(_0x2eab02,_0xadf64b){const _0x470945=a53_0x389b1e;!VALID_STATUSES[_0x470945(0x228)](_0xadf64b)&&(console[_0x470945(0x221)](chalk[_0x470945(0x1f8)](_0x470945(0x1e2)+_0xadf64b+'.\x20Valid:\x20'+[...VALID_STATUSES][_0x470945(0x211)](',\x20'))),process['exit'](0x1));const _0x57af11=getSDK(),_0x4bcdfc=_0x57af11[_0x470945(0x1e0)](_0x2eab02,_0xadf64b);!_0x4bcdfc&&(console['error'](chalk[_0x470945(0x1f8)]('Document\x20not\x20found:\x20'+_0x2eab02)),process['exit'](0x1));const _0x9dfcf7=_0x4bcdfc[_0x470945(0x1d6)][_0x470945(0x213)]||_0x4bcdfc['fileName'];console[_0x470945(0x1dd)](chalk[_0x470945(0x1f1)](_0x470945(0x1f3))+('\x20'+_0x9dfcf7+_0x470945(0x1fe)+statusColor(_0xadf64b)));}export async function workBoardAction(_0x401151){const _0x1c12f9=a53_0x389b1e,_0x4fd16a=getSDK(),_0x41c5ce=buildStaleFilter(_0x401151),{grouped:_0x3847f6}=_0x4fd16a[_0x1c12f9(0x1e6)](_0x41c5ce);for(const [_0x4fed70,_0x4a4b70]of Object[_0x1c12f9(0x1f4)](STATUS_PHASES)){const _0x3344df=_0x4a4b70[_0x1c12f9(0x229)](_0x2b79c4=>_0x3847f6[_0x2b79c4]||[]);console[_0x1c12f9(0x1dd)](chalk[_0x1c12f9(0x219)][_0x1c12f9(0x1d8)](_0x4fed70)+chalk['dim']('\x20('+_0x3344df[_0x1c12f9(0x204)]+')'));if(_0x3344df[_0x1c12f9(0x204)]===0x0)console[_0x1c12f9(0x1dd)](chalk['dim'](_0x1c12f9(0x1ec)));else for(const _0x4b1482 of _0x3344df){const _0x5d2a9=_0x4b1482[_0x1c12f9(0x1d6)],_0x52a12a=priorityDot(_0x5d2a9[_0x1c12f9(0x1cb)]),_0x58193e=_0x5d2a9[_0x1c12f9(0x213)]||_0x4b1482['fileName'],_0x2f8849=normalizeTags(_0x5d2a9[_0x1c12f9(0x1d0)]),_0x26e8c6=_0x2f8849[_0x1c12f9(0x204)]?chalk[_0x1c12f9(0x225)]('\x20['+_0x2f8849[_0x1c12f9(0x211)](',\x20')+']'):'',_0x19547c=chalk[_0x1c12f9(0x225)]('('+_0x5d2a9[_0x1c12f9(0x1e4)]+')');console['log']('\x20\x20'+_0x52a12a+'\x20'+_0x58193e+'\x20'+_0x19547c+_0x26e8c6);}console[_0x1c12f9(0x1dd)]();}}export async function workShowAction(_0x12decf){const _0x155250=a53_0x389b1e,_0x196715=getSDK(),_0x28ae86=_0x196715[_0x155250(0x1ce)](_0x12decf);!_0x28ae86&&(console['error'](chalk[_0x155250(0x1f8)](_0x155250(0x1ee)+_0x12decf)),process[_0x155250(0x224)](0x1));console['log'](chalk[_0x155250(0x219)](_0x28ae86[_0x155250(0x1d6)]['title']||_0x28ae86['fileName'])),console['log'](chalk[_0x155250(0x225)](_0x28ae86['filePath'])),console['log']();const _0x1474ad=_0x28ae86[_0x155250(0x1d6)];for(const [_0x42b782,_0xdc6a32]of Object[_0x155250(0x1f4)](_0x1474ad)){if(_0x42b782==='title')continue;if(_0xdc6a32===undefined||_0xdc6a32===null)continue;const _0x3bb991=Array[_0x155250(0x226)](_0xdc6a32)?_0xdc6a32[_0x155250(0x211)](',\x20'):String(_0xdc6a32);console[_0x155250(0x1dd)]('\x20\x20'+chalk[_0x155250(0x1fd)](_0x42b782)+':\x20'+_0x3bb991);}console[_0x155250(0x1dd)]();_0x28ae86[_0x155250(0x203)][_0x155250(0x1fc)]()&&(console['log'](_0x28ae86[_0x155250(0x203)]['trim']()),console[_0x155250(0x1dd)]());const _0x4f3db6=_0x196715[_0x155250(0x1c7)](_0x28ae86['body']);if(_0x4f3db6[_0x155250(0x204)]>0x0){console[_0x155250(0x1dd)](chalk[_0x155250(0x219)](_0x155250(0x207)));for(const _0x375518 of _0x4f3db6){const _0xce3a9=_0x375518[_0x155250(0x21e)]?chalk[_0x155250(0x1f1)]('✓'):chalk[_0x155250(0x1f8)]('✗'),_0x589cc3=_0x375518[_0x155250(0x20e)]||_0x375518[_0x155250(0x212)];console[_0x155250(0x1dd)]('\x20\x20'+_0xce3a9+_0x155250(0x1f2)+_0x589cc3+']]');}console[_0x155250(0x1dd)]();}const _0x126d5a=_0x196715['getBacklinks'](_0x28ae86[_0x155250(0x1e9)]);if(_0x126d5a[_0x155250(0x204)]>0x0){console['log'](chalk[_0x155250(0x219)]('Backlinks'));for(const _0xb04fbd of _0x126d5a){console[_0x155250(0x1dd)](_0x155250(0x1d2)+_0xb04fbd[_0x155250(0x213)]+'\x20'+chalk[_0x155250(0x225)]('('+_0xb04fbd['kind']+')'));}}}export async function workLinksAction(_0x456014){const _0x16b6d5=a53_0x389b1e,_0x44131a=getSDK(),_0x1d3683=_0x44131a[_0x16b6d5(0x1ce)](_0x456014);!_0x1d3683&&(console[_0x16b6d5(0x221)](chalk['red']('Document\x20not\x20found:\x20'+_0x456014)),process[_0x16b6d5(0x224)](0x1));const _0x280790=_0x1d3683[_0x16b6d5(0x1d6)][_0x16b6d5(0x213)]||_0x1d3683[_0x16b6d5(0x1e9)];console[_0x16b6d5(0x1dd)](chalk['bold'](_0x16b6d5(0x1cf)+_0x280790)),console[_0x16b6d5(0x1dd)]();const _0x35e851=_0x44131a[_0x16b6d5(0x1c7)](_0x1d3683[_0x16b6d5(0x203)]);if(_0x35e851[_0x16b6d5(0x204)]>0x0){console[_0x16b6d5(0x1dd)](chalk[_0x16b6d5(0x219)](_0x16b6d5(0x21d)));for(const _0x30cd62 of _0x35e851){const _0x341994=_0x30cd62[_0x16b6d5(0x21e)]?chalk[_0x16b6d5(0x1f1)]('✓'):chalk[_0x16b6d5(0x1f8)]('✗'),_0x435a28=_0x30cd62['displayText']||_0x30cd62['slug'],_0x13ebe5=_0x30cd62[_0x16b6d5(0x223)]?chalk[_0x16b6d5(0x225)]('\x20('+_0x30cd62['resolvedKind']+')'):'';console[_0x16b6d5(0x1dd)]('\x20\x20'+_0x341994+'\x20[['+_0x435a28+']]'+_0x13ebe5);}}else console[_0x16b6d5(0x1dd)](chalk[_0x16b6d5(0x225)](_0x16b6d5(0x22c)));console[_0x16b6d5(0x1dd)]();const _0x49c6fa=_0x44131a[_0x16b6d5(0x20d)](_0x1d3683[_0x16b6d5(0x1e9)]);if(_0x49c6fa['length']>0x0){console[_0x16b6d5(0x1dd)](chalk[_0x16b6d5(0x219)](_0x16b6d5(0x218)));for(const _0x8a9de1 of _0x49c6fa){console[_0x16b6d5(0x1dd)](_0x16b6d5(0x1d2)+_0x8a9de1[_0x16b6d5(0x213)]+'\x20'+chalk[_0x16b6d5(0x225)]('('+_0x8a9de1[_0x16b6d5(0x220)]+')'));}}else console[_0x16b6d5(0x1dd)](chalk['dim'](_0x16b6d5(0x1cc)));}export async function workOpenAction(_0x359558){const _0x176f1e=a53_0x389b1e,_0x3ac471=getSDK(),_0x1e6630=_0x3ac471[_0x176f1e(0x1ce)](_0x359558);!_0x1e6630&&(console['error'](chalk[_0x176f1e(0x1f8)](_0x176f1e(0x1ee)+_0x359558)),process[_0x176f1e(0x224)](0x1));const _0x1fa448=process.env.EDITOR||'vi';try{execFileSync(_0x1fa448,[_0x1e6630['filePath']],{'stdio':'inherit'});}catch{console[_0x176f1e(0x221)](chalk['red'](_0x176f1e(0x1fa)+_0x1fa448)),process['exit'](0x1);}}
|