@treasuredata/tdx 2026.6.0 → 2026.6.1
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/table-deleted.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/cdp-api-client.js.map +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.d.ts +8 -4
- package/dist/sdk/llm/model-factors.d.ts.map +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/llm/model-factors.js.map +1 -1
- package/dist/sdk/llm/user-settings.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/deleted-table-validation.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/cdp.d.ts +4 -3
- package/dist/sdk/types/cdp.d.ts.map +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/task-graph.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
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a48_0x1e1107=a48_0xa5b5;(function(_0x1cdbcf,_0x2b0340){const _0x3bc669=a48_0xa5b5,_0x2be54d=_0x1cdbcf();while(!![]){try{const _0x200c11=parseInt(_0x3bc669(0x105))/0x1+parseInt(_0x3bc669(0x11b))/0x2+-parseInt(_0x3bc669(0x10a))/0x3*(-parseInt(_0x3bc669(0x126))/0x4)+-parseInt(_0x3bc669(0x131))/0x5*(parseInt(_0x3bc669(0x12b))/0x6)+-parseInt(_0x3bc669(0x11a))/0x7+parseInt(_0x3bc669(0x128))/0x8*(-parseInt(_0x3bc669(0x118))/0x9)+parseInt(_0x3bc669(0x10c))/0xa*(parseInt(_0x3bc669(0x115))/0xb);if(_0x200c11===_0x2b0340)break;else _0x2be54d['push'](_0x2be54d['shift']());}catch(_0x55ffdb){_0x2be54d['push'](_0x2be54d['shift']());}}}(a48_0x4c73,0xf28b3));import a48_0x961eea from'chalk';import{BaseCommand}from'./command.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';function a48_0xa5b5(_0x433d33,_0x40bbc2){_0x433d33=_0x433d33-0x101;const _0x4c7328=a48_0x4c73();let _0xa5b50b=_0x4c7328[_0x433d33];return _0xa5b50b;}import{withSpinner}from'../utils/spinner.js';export class TableDeletedCommand extends BaseCommand{[a48_0x1e1107(0x130)]=a48_0x1e1107(0x101);[a48_0x1e1107(0x112)]=a48_0x1e1107(0x109);async[a48_0x1e1107(0x10f)](_0x559389){const _0x1f7cbe=a48_0x1e1107,{options:_0x50d11b,tdx:_0x2008b2}=_0x559389,_0x153b79=_0x50d11b,_0x55c171=_0x153b79[_0x1f7cbe(0x107)]!==undefined?Number(_0x153b79[_0x1f7cbe(0x107)]):undefined,_0x27764a=_0x153b79[_0x1f7cbe(0x110)]!==undefined?Number(_0x153b79['cursorId']):undefined;if(_0x50d11b[_0x1f7cbe(0x12a)]){console[_0x1f7cbe(0x138)]('Site:\x20'+_0x50d11b[_0x1f7cbe(0x129)]);if(_0x55c171!==undefined)console[_0x1f7cbe(0x138)](_0x1f7cbe(0x13a)+_0x55c171);if(_0x27764a!==undefined)console[_0x1f7cbe(0x138)](_0x1f7cbe(0x12e)+_0x27764a);}const _0x360f56=await withSpinner(_0x1f7cbe(0x122),()=>_0x2008b2[_0x1f7cbe(0x11f)][_0x1f7cbe(0x124)]({'pageSize':_0x55c171,'cursorId':_0x27764a}),{'verbose':_0x50d11b[_0x1f7cbe(0x12a)]}),{tables:_0x40fec2,cursor_id:_0x4f59ac}=_0x360f56[_0x1f7cbe(0x134)];console[_0x1f7cbe(0x138)]('✔\x20Found\x20'+_0x40fec2[_0x1f7cbe(0x132)]+_0x1f7cbe(0x10e)+(_0x40fec2[_0x1f7cbe(0x132)]!==0x1?'s':''));if(isStructuredFormat(_0x50d11b))return await handleSDKOutput(_0x360f56[_0x1f7cbe(0x134)],_0x50d11b),0x0;if(_0x40fec2[_0x1f7cbe(0x132)]===0x0)return console['log'](_0x1f7cbe(0x136)),0x0;for(const _0x2d7d00 of _0x40fec2){console[_0x1f7cbe(0x119)](_0x1f7cbe(0x12c)+_0x2d7d00[_0x1f7cbe(0x137)]+'.'+_0x2d7d00[_0x1f7cbe(0x130)]+'\x20'+a48_0x961eea['dim'](_0x1f7cbe(0x139)+_0x2d7d00['id']+_0x1f7cbe(0x11d)+_0x2d7d00[_0x1f7cbe(0x123)]+')'));}return _0x4f59ac!==null&&(console[_0x1f7cbe(0x138)](''),console[_0x1f7cbe(0x138)](a48_0x961eea[_0x1f7cbe(0x125)](_0x1f7cbe(0x106)+_0x4f59ac+_0x1f7cbe(0x135)))),0x0;}}function a48_0x4c73(){const _0x54f55d=['✔\x20Recovered\x20table\x20','description','database','Table\x20id:\x20','2387pdhpBs','Error:\x20table\x20id\x20is\x20required','📋\x20','18imEryB','log','10183460byTTJy','2961438xxNbPk','recoverTable',',\x20deleted\x20','Tip:\x20list\x20ids\x20with\x20`tdx\x20table\x20deleted`.','query','Site:\x20','Recover\x20a\x20deleted\x20table\x20by\x20id','Listing\x20deleted\x20tables...','deleted_at','listDeletedTables','dim','352XFuxkx','red','3176920zxIOrN','site','verbose','3760986cJbFXV','🗑\x20\x20','\x20\x20\x20type:\x20','Cursor\x20id:\x20','green','name','5teSBIm','length','created_at','data','\x20to\x20fetch\x20the\x20next\x20page.','No\x20deleted\x20tables\x20found\x20within\x20the\x207-day\x20retention\x20window','database_name','error','(id\x20','Page\x20size:\x20','table:deleted','Rename\x20to:\x20','Restore\x20into:\x20','type','124542gJCPAx','More\x20results\x20available.\x20Run\x20with\x20--cursor-id\x20','pageSize',',\x20count:\x20','List\x20recoverable\x20deleted\x20tables\x20(last\x207\x20days)','25584lzCFuW','table:recover','69750mFCtyo','Recovering\x20table\x20','\x20deleted\x20table','execute','cursorId'];a48_0x4c73=function(){return _0x54f55d;};return a48_0x4c73();}export class TableRecoverCommand extends BaseCommand{[a48_0x1e1107(0x130)]=a48_0x1e1107(0x10b);[a48_0x1e1107(0x112)]=a48_0x1e1107(0x121);async[a48_0x1e1107(0x10f)](_0x53643c){const _0x1e40c3=a48_0x1e1107,{options:_0x7180a5,args:_0x842d6e,tdx:_0x3e61f3}=_0x53643c,_0x347554=_0x842d6e[0x0];if(!_0x347554)return console[_0x1e40c3(0x138)](a48_0x961eea[_0x1e40c3(0x127)](_0x1e40c3(0x116))),console['error']('Usage:\x20tdx\x20table\x20recover\x20<id>\x20[--name\x20<name>]\x20[--database\x20<db>]'),console[_0x1e40c3(0x138)](_0x1e40c3(0x11e)),0x1;const _0x349937=Number(_0x347554),_0x15f763=_0x7180a5,_0x671d86=_0x15f763[_0x1e40c3(0x130)],_0x1bcd3b=_0x15f763[_0x1e40c3(0x113)];if(_0x7180a5[_0x1e40c3(0x12a)]){console[_0x1e40c3(0x138)](_0x1e40c3(0x120)+_0x7180a5[_0x1e40c3(0x129)]),console[_0x1e40c3(0x138)](_0x1e40c3(0x114)+_0x349937);if(_0x671d86)console[_0x1e40c3(0x138)](_0x1e40c3(0x102)+_0x671d86);if(_0x1bcd3b)console[_0x1e40c3(0x138)](_0x1e40c3(0x103)+_0x1bcd3b);}const _0x2390c4=await withSpinner(_0x1e40c3(0x10d)+_0x349937+'...',()=>_0x3e61f3[_0x1e40c3(0x11f)][_0x1e40c3(0x11c)](_0x349937,{'tableName':_0x671d86,'databaseName':_0x1bcd3b}),{'verbose':_0x7180a5['verbose']}),_0x4b46a8=_0x2390c4['data'];console[_0x1e40c3(0x138)](a48_0x961eea[_0x1e40c3(0x12f)](_0x1e40c3(0x111)+_0x349937));if(isStructuredFormat(_0x7180a5))return await handleSDKOutput(_0x4b46a8,_0x7180a5),0x0;return console[_0x1e40c3(0x119)](_0x1e40c3(0x117)+_0x4b46a8[_0x1e40c3(0x130)]),console[_0x1e40c3(0x119)](a48_0x961eea[_0x1e40c3(0x125)](_0x1e40c3(0x12d)+_0x4b46a8[_0x1e40c3(0x104)]+_0x1e40c3(0x108)+_0x4b46a8['count'])),_0x4b46a8['created_at']&&console[_0x1e40c3(0x119)](a48_0x961eea[_0x1e40c3(0x125)]('\x20\x20\x20created_at:\x20'+_0x4b46a8[_0x1e40c3(0x133)])),0x0;}}
|
package/dist/commands/tables.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x214c4e=a49_0x20bc;(function(_0x513609,_0x1edbf){const _0x3705a8=a49_0x20bc,_0x45ba82=_0x513609();while(!![]){try{const _0x3ed416=-parseInt(_0x3705a8(0x150))/0x1+parseInt(_0x3705a8(0x172))/0x2*(-parseInt(_0x3705a8(0x160))/0x3)+parseInt(_0x3705a8(0x163))/0x4+parseInt(_0x3705a8(0x174))/0x5+-parseInt(_0x3705a8(0x159))/0x6*(parseInt(_0x3705a8(0x168))/0x7)+-parseInt(_0x3705a8(0x176))/0x8+parseInt(_0x3705a8(0x165))/0x9;if(_0x3ed416===_0x1edbf)break;else _0x45ba82['push'](_0x45ba82['shift']());}catch(_0x5d0514){_0x45ba82['push'](_0x45ba82['shift']());}}}(a49_0x538a,0xe5b27));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,isStructuredFormat}from'../core/command-output.js';import{parseTableReference}from'../utils/table-ref-parser.js';import{DEFAULT_LISTING_LIMIT,resolveLimit}from'../core/constants.js';import{withSpinner}from'../utils/spinner.js';function a49_0x20bc(_0x57f210,_0x8237f0){_0x57f210=_0x57f210-0x14f;const _0x538ae3=a49_0x538a();let _0x20bc60=_0x538ae3[_0x57f210];return _0x20bc60;}function a49_0x538a(){const _0x265e23=['12515968sErEKL','description','Site:\x20','Error:\x20Pattern\x20\x27','Error:\x20','error','\x20table','\x20\x20tdx\x20tables\x20users\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20across\x20all\x20databases','\x20\x20tdx\x20tables\x20\x22mydb.*\x22\x20\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','\x20\x20tdx\x20tables\x20--in\x20mydb\x20\x20\x20\x20\x20\x20\x20->\x20all\x20tables\x20from\x20mydb','Or\x20use\x20--in\x20flag:','execute','\x20\x20Cause:\x20','data','\x20\x20Use:\x20tdx\x20tables\x20\x22','80191wzBTGj','cause','\x20\x20Or:\x20\x20tdx\x20tables\x20--in\x20','Database\x20pattern:\x20','List\x20tables\x20in\x20a\x20database','limit','validate','includes','.*\x22','6254922MVmooV','✔\x20Found\x20','\x20\x20tdx\x20tables\x20\x22mydb.users\x22\x20\x20\x20\x20->\x20table\x20\x22users\x22\x20in\x20database\x20mydb','\x27\x20may\x20not\x20exist\x20or\x20contains\x20no\x20tables','length','\x27\x20without\x20wildcards\x20would\x20search\x20for\x20tables\x20named\x20\x27','table_name','1990191TWLyKL','verbose','listTables','4948576GfLWhO','database','19860444XWxvZq','tables','Did\x20you\x20mean\x20to\x20list\x20all\x20tables\x20from\x20database\x20\x27','7YVxOCC','Database\x20\x27','database_name','message','table','\x27\x20across\x20all\x20databases.','Note:\x20\x27','log','\x27\x20is\x20ambiguous.','site','4qKPijb','Listing\x20tables...','7554735SGEepV','name'];a49_0x538a=function(){return _0x265e23;};return a49_0x538a();}export class TablesCommand extends BaseCommand{[a49_0x214c4e(0x175)]=a49_0x214c4e(0x166);[a49_0x214c4e(0x177)]=a49_0x214c4e(0x154);async[a49_0x214c4e(0x181)](_0x1cd9e3){const _0x118f7d=a49_0x214c4e,{options:_0x29a78f,args:_0x45e220,tdx:_0x3888a4}=_0x1cd9e3;let _0xdecad;if(_0x45e220[_0x118f7d(0x15d)]===0x0)_0xdecad={'database':undefined,'table':undefined,'original':''};else{if(_0x45e220[_0x118f7d(0x15d)]===0x1)try{_0xdecad=parseTableReference(_0x45e220[0x0]);if(_0xdecad['table']&&!_0xdecad[_0x118f7d(0x164)]&&!_0xdecad[_0x118f7d(0x16c)][_0x118f7d(0x157)]('*')&&!_0xdecad[_0x118f7d(0x16c)]['includes']('?'))return console[_0x118f7d(0x17b)](_0x118f7d(0x179)+_0x45e220[0x0]+_0x118f7d(0x170)),console[_0x118f7d(0x17b)](_0x118f7d(0x167)+_0xdecad[_0x118f7d(0x16c)]+'\x27?'),console[_0x118f7d(0x17b)](_0x118f7d(0x14f)+_0xdecad[_0x118f7d(0x16c)]+_0x118f7d(0x158)),console[_0x118f7d(0x17b)](_0x118f7d(0x152)+_0xdecad['table']),console['error']('\x20\x20Or:\x20\x20tdx\x20tables\x20--database\x20'+_0xdecad[_0x118f7d(0x16c)]),console[_0x118f7d(0x17b)](''),console[_0x118f7d(0x17b)](_0x118f7d(0x16e)+_0x45e220[0x0]+_0x118f7d(0x15e)+_0xdecad['table']+_0x118f7d(0x16d)),0x1;}catch(_0x42f1dd){return console['error'](_0x118f7d(0x17a)+_0x42f1dd[_0x118f7d(0x16b)]),0x1;}else return console[_0x118f7d(0x17b)]('Error:\x20Too\x20many\x20arguments.\x20Use\x20single\x20argument:'),console['error'](_0x118f7d(0x17d)),console[_0x118f7d(0x17b)](_0x118f7d(0x17e)),console[_0x118f7d(0x17b)](_0x118f7d(0x15b)),console[_0x118f7d(0x17b)]('\x20\x20tdx\x20tables\x20\x22*.user*\x22\x20\x20\x20\x20\x20\x20\x20->\x20tables\x20matching\x20user*\x20across\x20databases'),console['error'](_0x118f7d(0x180)),console[_0x118f7d(0x17b)](_0x118f7d(0x17f)),0x1;}const _0x2d2efb=_0x29a78f[_0x118f7d(0x164)];!_0xdecad[_0x118f7d(0x164)]&&_0x2d2efb&&(_0xdecad[_0x118f7d(0x164)]=_0x2d2efb);try{const _0xb6f52=_0x26bf78=>_0x26bf78&&(_0x26bf78['includes']('*')||_0x26bf78[_0x118f7d(0x157)]('?')),_0x1922b1=_0xb6f52(_0xdecad[_0x118f7d(0x164)]);_0x29a78f[_0x118f7d(0x161)]&&(console['error'](_0x118f7d(0x178)+_0x29a78f[_0x118f7d(0x171)]),_0xdecad['database']?_0x1922b1?console[_0x118f7d(0x17b)](_0x118f7d(0x153)+_0xdecad['database']):console[_0x118f7d(0x17b)]('Database:\x20'+_0xdecad['database']):console[_0x118f7d(0x17b)]('Database:\x20all'),_0xdecad['table']&&console[_0x118f7d(0x17b)]('Table\x20pattern:\x20'+_0xdecad[_0x118f7d(0x16c)]));const _0x40d812=_0xdecad[_0x118f7d(0x164)]&&!_0x1922b1?_0xdecad['database']:undefined,_0x97bd80=_0x1922b1?_0xdecad[_0x118f7d(0x164)]:undefined,_0xc5b8e3=_0xdecad[_0x118f7d(0x16c)],_0x4302e9=resolveLimit(_0x29a78f[_0x118f7d(0x155)],DEFAULT_LISTING_LIMIT),_0x4d7a98=await withSpinner(_0x118f7d(0x173),()=>_0x3888a4['query'][_0x118f7d(0x162)](_0x40d812,_0xc5b8e3,_0x97bd80,_0x4302e9),{'verbose':_0x29a78f['verbose']}),_0x9cc683=_0x4d7a98[_0x118f7d(0x183)];if(_0x9cc683['length']===0x0&&_0xdecad[_0x118f7d(0x164)]&&!_0x1922b1)return console['error']('✖\x20No\x20tables\x20found'),console[_0x118f7d(0x17b)](_0x118f7d(0x169)+_0xdecad[_0x118f7d(0x164)]+_0x118f7d(0x15c)),0x1;console['error'](_0x118f7d(0x15a)+_0x9cc683[_0x118f7d(0x15d)]+_0x118f7d(0x17c)+(_0x9cc683[_0x118f7d(0x15d)]!==0x1?'s':''));if(isStructuredFormat(_0x29a78f))await handleSDKOutput(_0x9cc683,{..._0x29a78f,'limit':_0x4302e9});else for(const _0x388fc1 of _0x9cc683){const _0x4bdb4a=_0x388fc1['database_name']?_0x388fc1[_0x118f7d(0x16a)]+'.':'';console[_0x118f7d(0x16f)]('📋\x20'+_0x4bdb4a+_0x388fc1[_0x118f7d(0x15f)]);}return 0x0;}catch(_0x543cd2){if(_0x543cd2 instanceof SDKError)return console['error'](_0x118f7d(0x17a)+_0x543cd2['message']),_0x543cd2['cause']&&console[_0x118f7d(0x17b)](_0x118f7d(0x182)+_0x543cd2[_0x118f7d(0x151)]),0x1;throw _0x543cd2;}}[a49_0x214c4e(0x156)](_0x39cad1){return undefined;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0x56998a=a50_0x7543;(function(_0x5c3195,_0x38b4f2){const _0x5d7760=a50_0x7543,_0xd5d02d=_0x5c3195();while(!![]){try{const _0x26f39a=-parseInt(_0x5d7760(0x19b))/0x1+-parseInt(_0x5d7760(0x1a4))/0x2*(-parseInt(_0x5d7760(0x17e))/0x3)+parseInt(_0x5d7760(0x17c))/0x4*(-parseInt(_0x5d7760(0x184))/0x5)+-parseInt(_0x5d7760(0x19f))/0x6*(parseInt(_0x5d7760(0x1a1))/0x7)+parseInt(_0x5d7760(0x18b))/0x8+parseInt(_0x5d7760(0x196))/0x9*(parseInt(_0x5d7760(0x19a))/0xa)+parseInt(_0x5d7760(0x172))/0xb*(-parseInt(_0x5d7760(0x179))/0xc);if(_0x26f39a===_0x38b4f2)break;else _0xd5d02d['push'](_0xd5d02d['shift']());}catch(_0x4f6e90){_0xd5d02d['push'](_0xd5d02d['shift']());}}}(a50_0x30df,0x97998));import{BaseCommand}from'./command.js';import{getSessionID,cleanExpiredSessions,clearSessionContextField}from'../core/session.js';import{clearDefaultSiteFromUserConfig,clearActiveProfileFromUserConfig}from'../core/profile.js';import{getConfigDir}from'../core/config.js';import a50_0x2a3e56 from'chalk';function a50_0x7543(_0x23f0cd,_0x307b21){_0x23f0cd=_0x23f0cd-0x172;const _0x30df9b=a50_0x30df();let _0x7543bc=_0x30df9b[_0x23f0cd];return _0x7543bc;}import*as a50_0x462a63 from'node:path';export class UnsetCommand extends BaseCommand{[a50_0x56998a(0x197)]=a50_0x56998a(0x18f);[a50_0x56998a(0x175)]=a50_0x56998a(0x17d);[a50_0x56998a(0x17a)](_0x32ebfd){const _0x5f5292=a50_0x56998a,{args:_0x49a642,options:_0x478b80}=_0x32ebfd,_0x16336a=_0x478b80['default'];if(_0x49a642[_0x5f5292(0x1a0)]===0x0)return _0x5f5292(0x195)+_0x5f5292(0x191)+_0x5f5292(0x194)+'\x0aRun\x20\x27tdx\x20unset\x20--help\x27\x20for\x20more\x20options';const _0x3682d3=_0x49a642[0x0],_0x17fb9e=['site',_0x5f5292(0x199),'parent_segment',_0x5f5292(0x187),_0x5f5292(0x192),_0x5f5292(0x193),'engage_workspace',_0x5f5292(0x18d),_0x5f5292(0x19c)];if(!_0x17fb9e[_0x5f5292(0x189)](_0x3682d3))return _0x5f5292(0x188)+_0x3682d3+_0x5f5292(0x177)+_0x17fb9e[_0x5f5292(0x1a3)](',\x20');if(_0x16336a&&_0x3682d3!==_0x5f5292(0x198)&&_0x3682d3!==_0x5f5292(0x193))return _0x5f5292(0x18c);return undefined;}async[a50_0x56998a(0x176)](_0xb03796){const _0x3401a9=a50_0x56998a,{args:_0xbf7647,options:_0xa710e}=_0xb03796,_0xb87cde=_0xa710e[_0x3401a9(0x190)];cleanExpiredSessions();try{const _0xf7482d=_0xbf7647[0x0],_0x4d8662=a50_0x462a63['join'](getConfigDir(),_0x3401a9(0x1a2));if(_0xb87cde){if(_0xf7482d===_0x3401a9(0x198))return clearDefaultSiteFromUserConfig(),console[_0x3401a9(0x185)](_0x3401a9(0x178)+a50_0x2a3e56['green']('cleared')),console[_0x3401a9(0x185)](a50_0x2a3e56[_0x3401a9(0x18a)](_0x3401a9(0x181)+_0x4d8662)),0x0;if(_0xf7482d===_0x3401a9(0x193))return clearActiveProfileFromUserConfig(),console[_0x3401a9(0x185)](_0x3401a9(0x182)+a50_0x2a3e56[_0x3401a9(0x180)](_0x3401a9(0x174))),console['log'](a50_0x2a3e56[_0x3401a9(0x18a)](_0x3401a9(0x181)+_0x4d8662)),0x0;}const _0x4841a0=getSessionID(_0xa710e[_0x3401a9(0x173)]),_0x3aedfd={'site':_0x3401a9(0x198),'database':_0x3401a9(0x199),'parent_segment':_0x3401a9(0x186),'llm_project':_0x3401a9(0x187),'agent':_0x3401a9(0x17b),'profile':_0x3401a9(0x193),'engage_workspace':'engage_workspace','cas':_0x3401a9(0x19c),'composable_audience':_0x3401a9(0x19c)},_0x3f7445=_0x3aedfd[_0xf7482d];return _0x3f7445&&(clearSessionContextField(_0x3f7445,_0xa710e[_0x3401a9(0x173)]),console['log'](_0x3401a9(0x19d)+_0xf7482d+'\x20'+a50_0x2a3e56[_0x3401a9(0x180)]('cleared')+'\x20'+a50_0x2a3e56[_0x3401a9(0x18a)](_0x3401a9(0x183)+_0x4841a0+')'))),0x0;}catch(_0x43ac68){return _0x43ac68 instanceof Error&&console[_0x3401a9(0x18e)](_0x3401a9(0x19e)+_0x43ac68[_0x3401a9(0x17f)]),0x1;}}}function a50_0x30df(){const _0x5190ac=['--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27\x20or\x20\x27profile\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','cas','error','unset','default','\x20\x20\x20\x20\x20\x20\x20tdx\x20unset\x20--default\x20<resource>\x20\x20#\x20Clear\x20default\x20from\x20config\x0a','agent','profile','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas\x0a','Usage:\x20tdx\x20unset\x20<resource>\x0a','207gLNtAV','name','site','database','458960QmOHOr','30984xCbHTk','composable_audience','Session\x20','Error:\x20','15864zCuNRe','length','1862EqrogC','tdx.json','join','6VUGWXr','69179mTCwxi','session','cleared','description','execute','.\x20Must\x20be\x20one\x20of:\x20','Default\x20site\x20','1248pOtlPD','validate','llm_agent','312qpYGZK','Clear\x20session-level\x20or\x20default\x20context\x20values','1181655SJrpZF','message','green','\x0aUpdated:\x20','Default\x20profile\x20','(session:\x20','75575rMOIfZ','log','parent_segment','llm_project','Invalid\x20resource:\x20','includes','dim','7608024lEdTVh'];a50_0x30df=function(){return _0x5190ac;};return a50_0x30df();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a51_0x143028=a51_0x4ff8;function a51_0x1a72(){const _0xbe62fb=['install','bun','execPath','global','join','name','message','Latest\x20version:','dryRun','Target\x20version:','411614WOvLgT','Would\x20run:','yarn','npm','4113592IErsUZ','Upgrade\x20is\x20not\x20available\x20for\x20development\x20versions.','228710CvpGhT','206vTvaxO','toLowerCase','includes','replace','Checking\x20','555112BGvEiG','36GWrVCp','13362uEsHaV','Current\x20version:','Current\x20version:\x20','@treasuredata/tdx','pnpm','Failed\x20to\x20run\x20','next','error','close','Running:','log','1301650NQAgIs','Successfully\x20upgraded\x20to\x20','Failed\x20to\x20check\x20for\x20updates:\x20','red','inherit','yellow','cyan','dim','Upgrade\x20tdx\x20to\x20the\x20latest\x20version','...','add','9XUJZQv','green','7687050dMADKI'];a51_0x1a72=function(){return _0xbe62fb;};return a51_0x1a72();}(function(_0x1fcdaf,_0xd0d450){const _0x2c9030=a51_0x4ff8,_0x3941ee=_0x1fcdaf();while(!![]){try{const _0xc75a74=parseInt(_0x2c9030(0xdb))/0x1+parseInt(_0x2c9030(0xe2))/0x2*(-parseInt(_0x2c9030(0xe9))/0x3)+parseInt(_0x2c9030(0xe7))/0x4+parseInt(_0x2c9030(0xe1))/0x5*(-parseInt(_0x2c9030(0xe8))/0x6)+parseInt(_0x2c9030(0xf4))/0x7+parseInt(_0x2c9030(0xdf))/0x8*(-parseInt(_0x2c9030(0xce))/0x9)+parseInt(_0x2c9030(0xd0))/0xa;if(_0xc75a74===_0xd0d450)break;else _0x3941ee['push'](_0x3941ee['shift']());}catch(_0x57d7d0){_0x3941ee['push'](_0x3941ee['shift']());}}}(a51_0x1a72,0x3ee62));import{gt}from'semver';import a51_0x52703d from'chalk';import{BaseCommand}from'./command.js';function a51_0x4ff8(_0x515294,_0x52e4e7){_0x515294=_0x515294-0xc4;const _0x1a7229=a51_0x1a72();let _0x4ff8a4=_0x1a7229[_0x515294];return _0x4ff8a4;}import{getVersion,isDevVersion}from'../core/version.js';import{loadReleaseChannel}from'../core/config.js';import{fetchLatestVersion}from'../utils/version-check.js';import{crossSpawn}from'../utils/process.js';const PACKAGE_NAME=a51_0x143028(0xec);export function detectPackageManager(){const _0x5c7825=a51_0x143028,_0x5d72a4=process[_0x5c7825(0xd3)][_0x5c7825(0xe3)](),_0x57f9cf=process['argv'][0x1]??'';if(_0x5d72a4['includes'](_0x5c7825(0xd2))||_0x57f9cf[_0x5c7825(0xe4)]('.bun/'))return'bun';if(_0x57f9cf[_0x5c7825(0xe4)](_0x5c7825(0xed)))return _0x5c7825(0xed);if(_0x57f9cf[_0x5c7825(0xe4)](_0x5c7825(0xdd)))return'yarn';return _0x5c7825(0xde);}export function buildInstallArgs(_0xdd97f,_0x53ea5f){const _0x5a7c09=a51_0x143028;switch(_0xdd97f){case _0x5a7c09(0xdd):return[_0x5a7c09(0xd4),'add',_0x53ea5f];case _0x5a7c09(0xed):return[_0x5a7c09(0xcd),'-g',_0x53ea5f];default:return[_0x5a7c09(0xd1),'-g',_0x53ea5f];}}export class UpgradeCommand extends BaseCommand{[a51_0x143028(0xd6)]='upgrade';['description']=a51_0x143028(0xcb);async['execute'](_0x591faa){const _0x51eb56=a51_0x143028,{options:_0x35b57a,args:_0x2e9720}=_0x591faa,_0x336e5f=!!_0x35b57a[_0x51eb56(0xd9)],{next:_0x581916,method:_0x5e71a2}=_0x35b57a,_0x4083de=_0x581916?'next':loadReleaseChannel(),_0x52ec0e=_0x4083de===_0x51eb56(0xef)?_0x51eb56(0xef):'latest',_0x55e006=_0x2e9720[0x0]?String(_0x2e9720[0x0])[_0x51eb56(0xe5)](/^v/,''):undefined,_0x13300d=getVersion();if(isDevVersion())return console['error'](a51_0x52703d[_0x51eb56(0xc8)](_0x51eb56(0xe0))),console['error'](a51_0x52703d[_0x51eb56(0xca)](_0x51eb56(0xeb)+_0x13300d)),0x1;let _0xf7a51e;if(_0x55e006)_0xf7a51e=_0x55e006,console[_0x51eb56(0xf3)](a51_0x52703d[_0x51eb56(0xca)]('Current\x20version:')+'\x20'+_0x13300d),console['log'](a51_0x52703d['dim'](_0x51eb56(0xda))+'\x20\x20'+a51_0x52703d[_0x51eb56(0xcf)](_0x55e006)),console['log']();else{console['log'](a51_0x52703d[_0x51eb56(0xca)](_0x51eb56(0xe6)+PACKAGE_NAME+'@'+_0x52ec0e+_0x51eb56(0xcc)));try{_0xf7a51e=await fetchLatestVersion(_0x4083de);}catch(_0x12813d){return console[_0x51eb56(0xf0)](a51_0x52703d['red'](_0x51eb56(0xc5)+(_0x12813d instanceof Error?_0x12813d[_0x51eb56(0xd7)]:String(_0x12813d)))),0x1;}if(!gt(_0xf7a51e,_0x13300d))return console[_0x51eb56(0xf3)](a51_0x52703d['green']('Already\x20up\x20to\x20date\x20('+_0x13300d+').')),0x0;console[_0x51eb56(0xf3)](a51_0x52703d['dim'](_0x51eb56(0xea))+'\x20'+_0x13300d),console['log'](a51_0x52703d[_0x51eb56(0xca)](_0x51eb56(0xd8))+'\x20\x20'+a51_0x52703d[_0x51eb56(0xcf)](_0xf7a51e)),console['log']();}const _0x2177dd=_0x5e71a2??detectPackageManager(),_0x54b102=_0x55e006?PACKAGE_NAME+'@'+_0x55e006:PACKAGE_NAME+'@'+_0x52ec0e,_0x44ed8b=buildInstallArgs(_0x2177dd,_0x54b102);if(_0x336e5f)return console[_0x51eb56(0xf3)](a51_0x52703d[_0x51eb56(0xca)](_0x51eb56(0xdc))),console[_0x51eb56(0xf3)]('\x20\x20'+a51_0x52703d[_0x51eb56(0xc9)](_0x2177dd+'\x20'+_0x44ed8b[_0x51eb56(0xd5)]('\x20'))),0x0;return console['log'](a51_0x52703d['dim'](_0x51eb56(0xf2))+'\x20'+_0x2177dd+'\x20'+_0x44ed8b[_0x51eb56(0xd5)]('\x20')),console[_0x51eb56(0xf3)](),new Promise(_0x4f7fb3=>{const _0x6298ef=_0x51eb56,_0x3d20cf=crossSpawn(_0x2177dd,_0x44ed8b,{'stdio':_0x6298ef(0xc7)});_0x3d20cf['on'](_0x6298ef(0xf1),_0x572fb5=>{const _0xa4925=_0x6298ef;console[_0xa4925(0xf3)](),_0x572fb5===0x0?console['log'](a51_0x52703d['green'](_0xa4925(0xc4)+_0x54b102)):console[_0xa4925(0xf0)](a51_0x52703d['red']('Upgrade\x20failed\x20(exit\x20code\x20'+_0x572fb5+').')),_0x4f7fb3(_0x572fb5??0x1);}),_0x3d20cf['on'](_0x6298ef(0xf0),_0x39e51c=>{const _0x26f486=_0x6298ef;console['error'](a51_0x52703d[_0x26f486(0xc6)](_0x26f486(0xee)+_0x2177dd+':\x20'+_0x39e51c[_0x26f486(0xd7)])),_0x4f7fb3(0x1);});});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a52_0x2c28d3=a52_0x2a3c;(function(_0x40dd92,_0x45db85){const _0x5e6edf=a52_0x2a3c,_0x3597ee=_0x40dd92();while(!![]){try{const _0x5155f0=-parseInt(_0x5e6edf(0xd4))/0x1+-parseInt(_0x5e6edf(0xb3))/0x2+parseInt(_0x5e6edf(0xf0))/0x3+parseInt(_0x5e6edf(0xde))/0x4+-parseInt(_0x5e6edf(0xa6))/0x5+parseInt(_0x5e6edf(0xc5))/0x6*(parseInt(_0x5e6edf(0xe6))/0x7)+-parseInt(_0x5e6edf(0xec))/0x8;if(_0x5155f0===_0x45db85)break;else _0x3597ee['push'](_0x3597ee['shift']());}catch(_0x506780){_0x3597ee['push'](_0x3597ee['shift']());}}}(a52_0x224d,0xed39b));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 a52_0x2a3c(_0x2fe66e,_0x5e4018){_0x2fe66e=_0x2fe66e-0xa2;const _0x224dd5=a52_0x224d();let _0x2a3c01=_0x224dd5[_0x2fe66e];return _0x2a3c01;}import{parseAgentRef}from'../sdk/agent/agent-ref-parser.js';import{getConfigDir,saveReleaseChannel}from'../core/config.js';import{SDKError,ErrorCode}from'../sdk/errors.js';function a52_0x224d(){const _0x842615=['length','Error:\x20Profile\x20\x27','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','clear','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles','9408bZvgSc','error','site','(session:\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','tdx.json','2978016rqsNiy','profile','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','Release\x20channel\x20set\x20to:\x20','2737959APlagq','agent','execute','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a','stable','Session\x20llm_project\x20set\x20to:\x20','cas','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','1585485joELjj','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','message','Session\x20agent\x20set\x20to:\x20','.\x20Must\x20be\x20one\x20of:\x20','Session\x20parent_segment\x20set\x20to:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>','\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--default\x20site\x20','llm_agent','\x27...','Error:\x20','2131686fxKUNd','Default\x20profile\x20set\x20to:\x20','\x27\x20to\x20save\x20permanently','Session\x20context\x20','cleared','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','Set\x20session-level\x20context','composable_audience','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Session\x20profile\x20set\x20to:\x20','code','\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','llm_project','database','validate','use','\x0aSaved\x20to:\x20','Session\x20engage_workspace\x20set\x20to:\x20','6480BojXsQ','\x27\x20does\x20not\x20exist','join','Invalid\x20resource:\x20','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','resolveWorkspaceId','name','engage_workspace','Session\x20composable_audience\x20set\x20to:\x20','Session\x20site\x20set\x20to:\x20','next','default','log','release_channel','parent_segment','1219766dnSAOJ','\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces','green','INVALID_ARGUMENT','description','\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.','includes','tdx','session','dim','6329840PWntoi','Invalid\x20release\x20channel:\x20','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides'];a52_0x224d=function(){return _0x842615;};return a52_0x224d();}import{withSpinner}from'../utils/spinner.js';import a52_0x86c764 from'chalk';import*as a52_0x435f9a from'node:path';export class UseCommand extends BaseCommand{[a52_0x2c28d3(0xcb)]=a52_0x2c28d3(0xc2);[a52_0x2c28d3(0xd8)]=a52_0x2c28d3(0xb9);[a52_0x2c28d3(0xc1)](_0x1f2ac6){const _0x261b2b=a52_0x2c28d3,{args:_0x109207,options:_0x33047a}=_0x1f2ac6,_0x12b83e=_0x33047a[_0x261b2b(0xd0)];if(_0x109207['length']===0x0)return undefined;if(_0x109207[_0x261b2b(0xe1)]===0x1)return _0x261b2b(0xa7)+_0x261b2b(0xbe)+_0x261b2b(0xea)+_0x261b2b(0xae)+'\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a'+_0x261b2b(0xe3)+_0x261b2b(0xf3)+_0x261b2b(0xee);const _0x30cf50=_0x109207[0x0],_0x23aec1=[_0x261b2b(0xe8),_0x261b2b(0xc0),_0x261b2b(0xd3),'llm_project',_0x261b2b(0xf1),_0x261b2b(0xed),_0x261b2b(0xcc),'cas',_0x261b2b(0xba),_0x261b2b(0xd2)];if(!_0x23aec1[_0x261b2b(0xda)](_0x30cf50))return _0x261b2b(0xc8)+_0x30cf50+_0x261b2b(0xaa)+_0x23aec1[_0x261b2b(0xc7)](',\x20');if(_0x12b83e&&_0x30cf50!=='site'&&_0x30cf50!=='profile'&&_0x30cf50!=='release_channel')return _0x261b2b(0xa5);if(_0x30cf50==='release_channel'&&!_0x12b83e)return'release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>';if(_0x30cf50==='release_channel'){const _0x28e741=_0x109207[0x1];if(_0x28e741!==_0x261b2b(0xa2)&&_0x28e741!==_0x261b2b(0xcf))return _0x261b2b(0xdf)+_0x28e741+'.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.';}return undefined;}async[a52_0x2c28d3(0xf2)](_0x44a43d){const _0x488f33=a52_0x2c28d3,{args:_0x1fa441,options:_0x20584c}=_0x44a43d,_0x1a757f=_0x20584c['debug'],_0x10f101=_0x20584c[_0x488f33(0xe4)],_0xc0aa3b=_0x20584c[_0x488f33(0xd0)];cleanExpiredSessions();try{if(_0x10f101){clearSessionContext(_0x20584c['session']);const _0x5ef1b5=getSessionID(_0x20584c['session']);return console[_0x488f33(0xd1)](_0x488f33(0xb6)+a52_0x86c764[_0x488f33(0xd6)](_0x488f33(0xb7))+'\x20'+a52_0x86c764[_0x488f33(0xdd)]('(session:\x20'+_0x5ef1b5+')')),0x0;}if(_0x1fa441[_0x488f33(0xe1)]===0x0){const _0x16c00e=new GlobalContext(_0x20584c);return _0x1a757f?_0x16c00e['displayWithSources']():_0x16c00e['display'](),console[_0x488f33(0xd1)](a52_0x86c764['dim'](_0x488f33(0xad))),console[_0x488f33(0xd1)](a52_0x86c764[_0x488f33(0xdd)]('Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel')),console['log'](a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xb8))),0x0;}const _0x200164=_0x1fa441[0x0],_0x363e51=_0x1fa441[0x1],_0x5d9d2e=a52_0x435f9a[_0x488f33(0xc7)](getConfigDir(),_0x488f33(0xeb));if(_0xc0aa3b){if(_0x200164===_0x488f33(0xe8))return saveDefaultSiteToUserConfig(_0x363e51),console[_0x488f33(0xd1)]('Default\x20site\x20set\x20to:\x20'+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)),console[_0x488f33(0xd1)](a52_0x86c764['dim'](_0x488f33(0xc3)+_0x5d9d2e)),0x0;if(_0x200164==='profile'){if(!profileExists(_0x363e51))return console[_0x488f33(0xe7)](_0x488f33(0xe2)+_0x363e51+'\x27\x20does\x20not\x20exist'),console['error'](_0x488f33(0xe5)),0x1;return saveActiveProfileToUserConfig(_0x363e51),console[_0x488f33(0xd1)](_0x488f33(0xb4)+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)),console['log'](a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xc3)+_0x5d9d2e)),0x0;}if(_0x200164===_0x488f33(0xd2))return saveReleaseChannel(_0x363e51),console[_0x488f33(0xd1)](_0x488f33(0xef)+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)),console[_0x488f33(0xd1)](a52_0x86c764[_0x488f33(0xdd)]('\x0aSaved\x20to:\x20'+_0x5d9d2e)),_0x363e51==='next'?(console[_0x488f33(0xd1)](a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xd9))),console[_0x488f33(0xd1)](a52_0x86c764['dim'](_0x488f33(0xbb)))):console[_0x488f33(0xd1)](a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xc9))),0x0;}if(_0x200164===_0x488f33(0xe8)){const _0x313482=getSessionID(_0x20584c['session']);return saveSessionContext({'site':_0x363e51},_0x20584c[_0x488f33(0xdc)]),console[_0x488f33(0xd1)](_0x488f33(0xce)+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)+'\x20'+a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xe9)+_0x313482+')')),console[_0x488f33(0xd1)](a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xaf)+_0x363e51+_0x488f33(0xb5))),0x0;}if(_0x200164===_0x488f33(0xed)){if(!profileExists(_0x363e51))return console[_0x488f33(0xe7)](_0x488f33(0xe2)+_0x363e51+_0x488f33(0xc6)),console['error'](_0x488f33(0xe5)),0x1;const _0x2cce0f=getSessionID(_0x20584c['session']);return saveSessionContext({'profile':_0x363e51},_0x20584c[_0x488f33(0xdc)]),console[_0x488f33(0xd1)](_0x488f33(0xbc)+a52_0x86c764['green'](_0x363e51)+'\x20'+a52_0x86c764[_0x488f33(0xdd)]('(session:\x20'+_0x2cce0f+')')),console[_0x488f33(0xd1)](a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xac)+_0x363e51+_0x488f33(0xb5))),0x0;}const _0x10e91e={},_0x4b16b0=getSessionID(_0x20584c[_0x488f33(0xdc)]);switch(_0x200164){case _0x488f33(0xc0):_0x10e91e[_0x488f33(0xc0)]=_0x363e51,console[_0x488f33(0xd1)]('Session\x20database\x20set\x20to:\x20'+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)+'\x20'+a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xe9)+_0x4b16b0+')'));break;case _0x488f33(0xd3):_0x10e91e[_0x488f33(0xd3)]=_0x363e51,console[_0x488f33(0xd1)](_0x488f33(0xab)+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)+'\x20'+a52_0x86c764['dim'](_0x488f33(0xe9)+_0x4b16b0+')'));break;case _0x488f33(0xbf):_0x10e91e[_0x488f33(0xbf)]=_0x363e51,console['log'](_0x488f33(0xa3)+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)+'\x20'+a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xe9)+_0x4b16b0+')'));break;case _0x488f33(0xf1):{const {projectName:_0x28eb6d,agentName:_0x51591e}=parseAgentRef(_0x363e51);_0x51591e?(_0x10e91e[_0x488f33(0xbf)]=_0x28eb6d,_0x10e91e[_0x488f33(0xb0)]=_0x51591e,console['log'](_0x488f33(0xa3)+a52_0x86c764[_0x488f33(0xd6)](_0x28eb6d)+'\x20'+a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xe9)+_0x4b16b0+')')),console['log']('Session\x20agent\x20set\x20to:\x20'+a52_0x86c764[_0x488f33(0xd6)](_0x51591e)+'\x20'+a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xe9)+_0x4b16b0+')'))):(_0x10e91e[_0x488f33(0xb0)]=_0x363e51,console[_0x488f33(0xd1)](_0x488f33(0xa9)+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)+'\x20'+a52_0x86c764[_0x488f33(0xdd)]('(session:\x20'+_0x4b16b0+')')));break;}case _0x488f33(0xa4):case _0x488f33(0xba):_0x10e91e[_0x488f33(0xba)]=_0x363e51,console[_0x488f33(0xd1)](_0x488f33(0xcd)+a52_0x86c764[_0x488f33(0xd6)](_0x363e51)+'\x20'+a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xe9)+_0x4b16b0+')'));break;case _0x488f33(0xcc):{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x363e51+_0x488f33(0xb1),()=>_0x44a43d[_0x488f33(0xdb)]['engage'][_0x488f33(0xca)](_0x363e51));}catch(_0x4e0869){if(_0x4e0869 instanceof SDKError&&(_0x4e0869['code']===ErrorCode['NOT_FOUND']||_0x4e0869[_0x488f33(0xbd)]===ErrorCode[_0x488f33(0xd7)]))return console['error'](_0x488f33(0xb2)+_0x4e0869['message']),console['error'](_0x488f33(0xd5)),0x1;throw _0x4e0869;}_0x10e91e[_0x488f33(0xcc)]=_0x363e51,console['log'](_0x488f33(0xc4)+a52_0x86c764['green'](_0x363e51)+'\x20'+a52_0x86c764[_0x488f33(0xdd)]('(session:\x20'+_0x4b16b0+')'));break;}}return saveSessionContext(_0x10e91e,_0x20584c[_0x488f33(0xdc)]),console[_0x488f33(0xd1)](a52_0x86c764[_0x488f33(0xdd)](_0x488f33(0xe0))),0x0;}catch(_0x29e7bc){return _0x29e7bc instanceof Error&&console[_0x488f33(0xe7)](_0x488f33(0xb2)+_0x29e7bc[_0x488f33(0xa8)]),0x1;}}}
|
|
1
|
+
const a52_0x24d5e5=a52_0x58bf;function a52_0x58bf(_0x428a04,_0x2769c3){_0x428a04=_0x428a04-0xa2;const _0x1e1beb=a52_0x1e1b();let _0x58bff3=_0x1e1beb[_0x428a04];return _0x58bff3;}(function(_0x1af16e,_0x6da517){const _0x193cf3=a52_0x58bf,_0x37998b=_0x1af16e();while(!![]){try{const _0x1fa7d9=-parseInt(_0x193cf3(0xbf))/0x1*(-parseInt(_0x193cf3(0xb2))/0x2)+-parseInt(_0x193cf3(0xcf))/0x3+parseInt(_0x193cf3(0xc0))/0x4*(-parseInt(_0x193cf3(0xc7))/0x5)+-parseInt(_0x193cf3(0xe4))/0x6+parseInt(_0x193cf3(0xa8))/0x7*(-parseInt(_0x193cf3(0xbd))/0x8)+-parseInt(_0x193cf3(0xb4))/0x9+parseInt(_0x193cf3(0xcc))/0xa;if(_0x1fa7d9===_0x6da517)break;else _0x37998b['push'](_0x37998b['shift']());}catch(_0x29bb2b){_0x37998b['push'](_0x37998b['shift']());}}}(a52_0x1e1b,0xc0406));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 a52_0x2b397b from'chalk';import*as a52_0x43d692 from'node:path';export class UseCommand extends BaseCommand{[a52_0x24d5e5(0xed)]='use';[a52_0x24d5e5(0xcd)]=a52_0x24d5e5(0xa4);[a52_0x24d5e5(0xb5)](_0x404605){const _0xf6dad9=a52_0x24d5e5,{args:_0x2f8d84,options:_0xf88e93}=_0x404605,_0x2ac84c=_0xf88e93[_0xf6dad9(0xe9)];if(_0x2f8d84[_0xf6dad9(0xc6)]===0x0)return undefined;if(_0x2f8d84[_0xf6dad9(0xc6)]===0x1)return _0xf6dad9(0xd1)+_0xf6dad9(0xd3)+_0xf6dad9(0xad)+_0xf6dad9(0xd0)+_0xf6dad9(0xd7)+_0xf6dad9(0xe2)+_0xf6dad9(0xae)+_0xf6dad9(0xe0);const _0x309dd7=_0x2f8d84[0x0],_0x3ef98f=[_0xf6dad9(0xb0),'database',_0xf6dad9(0xc9),_0xf6dad9(0xba),_0xf6dad9(0xe5),'profile','engage_workspace',_0xf6dad9(0xce),_0xf6dad9(0xc8),_0xf6dad9(0xa3)];if(!_0x3ef98f['includes'](_0x309dd7))return _0xf6dad9(0xa6)+_0x309dd7+_0xf6dad9(0xa9)+_0x3ef98f[_0xf6dad9(0xc2)](',\x20');if(_0x2ac84c&&_0x309dd7!==_0xf6dad9(0xb0)&&_0x309dd7!==_0xf6dad9(0xdd)&&_0x309dd7!==_0xf6dad9(0xa3))return _0xf6dad9(0xeb);if(_0x309dd7===_0xf6dad9(0xa3)&&!_0x2ac84c)return _0xf6dad9(0xa2);if(_0x309dd7===_0xf6dad9(0xa3)){const _0x2db335=_0x2f8d84[0x1];if(_0x2db335!==_0xf6dad9(0xbb)&&_0x2db335!==_0xf6dad9(0xbe))return _0xf6dad9(0xb9)+_0x2db335+_0xf6dad9(0xb3);}return undefined;}async[a52_0x24d5e5(0xe6)](_0x23f4f3){const _0x6c1f82=a52_0x24d5e5,{args:_0x42d677,options:_0x376d75}=_0x23f4f3,_0x61614f=_0x376d75[_0x6c1f82(0xab)],_0x292aae=_0x376d75['clear'],_0x3766a3=_0x376d75[_0x6c1f82(0xe9)];cleanExpiredSessions();try{if(_0x292aae){clearSessionContext(_0x376d75[_0x6c1f82(0xd2)]);const _0x51f767=getSessionID(_0x376d75['session']);return console[_0x6c1f82(0xcb)]('Session\x20context\x20'+a52_0x2b397b['green'](_0x6c1f82(0xaf))+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x51f767+')')),0x0;}if(_0x42d677[_0x6c1f82(0xc6)]===0x0){const _0x42d90b=new GlobalContext(_0x376d75);return _0x61614f?_0x42d90b['displayWithSources']():_0x42d90b[_0x6c1f82(0xd6)](),console[_0x6c1f82(0xcb)](a52_0x2b397b[_0x6c1f82(0xb7)]('\x0aSet\x20context:\x20tdx\x20use\x20<resource>\x20<value>')),console[_0x6c1f82(0xcb)](a52_0x2b397b['dim'](_0x6c1f82(0xa5))),console[_0x6c1f82(0xcb)](a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xd8))),0x0;}const _0x4d48f4=_0x42d677[0x0],_0x4cf258=_0x42d677[0x1],_0x36810d=a52_0x43d692[_0x6c1f82(0xc2)](getConfigDir(),_0x6c1f82(0xc4));if(_0x3766a3){if(_0x4d48f4===_0x6c1f82(0xb0))return saveDefaultSiteToUserConfig(_0x4cf258),console[_0x6c1f82(0xcb)](_0x6c1f82(0xe7)+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)),console[_0x6c1f82(0xcb)](a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xca)+_0x36810d)),0x0;if(_0x4d48f4===_0x6c1f82(0xdd)){if(!profileExists(_0x4cf258))return console[_0x6c1f82(0xa7)](_0x6c1f82(0xaa)+_0x4cf258+'\x27\x20does\x20not\x20exist'),console[_0x6c1f82(0xa7)](_0x6c1f82(0xc3)),0x1;return saveActiveProfileToUserConfig(_0x4cf258),console[_0x6c1f82(0xcb)]('Default\x20profile\x20set\x20to:\x20'+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)),console[_0x6c1f82(0xcb)](a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xca)+_0x36810d)),0x0;}if(_0x4d48f4===_0x6c1f82(0xa3))return saveReleaseChannel(_0x4cf258),console[_0x6c1f82(0xcb)]('Release\x20channel\x20set\x20to:\x20'+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)),console['log'](a52_0x2b397b['dim'](_0x6c1f82(0xca)+_0x36810d)),_0x4cf258===_0x6c1f82(0xbe)?(console[_0x6c1f82(0xcb)](a52_0x2b397b[_0x6c1f82(0xb7)]('\x0aUpdate\x20notifications\x20will\x20now\x20check\x20the\x20@next\x20channel.')),console[_0x6c1f82(0xcb)](a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xee)))):console[_0x6c1f82(0xcb)](a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xac))),0x0;}if(_0x4d48f4===_0x6c1f82(0xb0)){const _0x11d6da=getSessionID(_0x376d75[_0x6c1f82(0xd2)]);return saveSessionContext({'site':_0x4cf258},_0x376d75[_0x6c1f82(0xd2)]),console[_0x6c1f82(0xcb)]('Session\x20site\x20set\x20to:\x20'+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x11d6da+')')),console['log'](a52_0x2b397b[_0x6c1f82(0xb7)]('\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20site\x20'+_0x4cf258+_0x6c1f82(0xb6))),0x0;}if(_0x4d48f4===_0x6c1f82(0xdd)){if(!profileExists(_0x4cf258))return console[_0x6c1f82(0xa7)](_0x6c1f82(0xaa)+_0x4cf258+'\x27\x20does\x20not\x20exist'),console['error']('\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'),0x1;const _0x287d2e=getSessionID(_0x376d75[_0x6c1f82(0xd2)]);return saveSessionContext({'profile':_0x4cf258},_0x376d75[_0x6c1f82(0xd2)]),console['log'](_0x6c1f82(0xbc)+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x287d2e+')')),console[_0x6c1f82(0xcb)](a52_0x2b397b['dim'](_0x6c1f82(0xe1)+_0x4cf258+_0x6c1f82(0xb6))),0x0;}const _0x27ee38={},_0x3ff3ac=getSessionID(_0x376d75[_0x6c1f82(0xd2)]);switch(_0x4d48f4){case _0x6c1f82(0xd4):_0x27ee38[_0x6c1f82(0xd4)]=_0x4cf258,console[_0x6c1f82(0xcb)](_0x6c1f82(0xe3)+a52_0x2b397b['green'](_0x4cf258)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x3ff3ac+')'));break;case _0x6c1f82(0xc9):_0x27ee38[_0x6c1f82(0xc9)]=_0x4cf258,console[_0x6c1f82(0xcb)]('Session\x20parent_segment\x20set\x20to:\x20'+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)+'\x20'+a52_0x2b397b['dim'](_0x6c1f82(0xe8)+_0x3ff3ac+')'));break;case _0x6c1f82(0xba):_0x27ee38[_0x6c1f82(0xba)]=_0x4cf258,console[_0x6c1f82(0xcb)](_0x6c1f82(0xef)+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x3ff3ac+')'));break;case _0x6c1f82(0xe5):{const {projectName:_0xc8dac6,agentName:_0x4c54f1}=parseAgentRef(_0x4cf258);_0x4c54f1?(_0x27ee38['llm_project']=_0xc8dac6,_0x27ee38['llm_agent']=_0x4c54f1,console[_0x6c1f82(0xcb)](_0x6c1f82(0xef)+a52_0x2b397b['green'](_0xc8dac6)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x3ff3ac+')')),console[_0x6c1f82(0xcb)]('Session\x20agent\x20set\x20to:\x20'+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4c54f1)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x3ff3ac+')'))):(_0x27ee38['llm_agent']=_0x4cf258,console[_0x6c1f82(0xcb)](_0x6c1f82(0xb8)+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)+'\x20'+a52_0x2b397b['dim']('(session:\x20'+_0x3ff3ac+')')));break;}case'cas':case _0x6c1f82(0xc8):_0x27ee38['composable_audience']=_0x4cf258,console[_0x6c1f82(0xcb)](_0x6c1f82(0xda)+a52_0x2b397b['green'](_0x4cf258)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x3ff3ac+')'));break;case _0x6c1f82(0xde):{try{await withSpinner('Verifying\x20workspace\x20\x27'+_0x4cf258+_0x6c1f82(0xea),()=>_0x23f4f3[_0x6c1f82(0xc1)][_0x6c1f82(0xb1)][_0x6c1f82(0xdc)](_0x4cf258));}catch(_0x3d0780){if(_0x3d0780 instanceof SDKError&&(_0x3d0780['code']===ErrorCode[_0x6c1f82(0xc5)]||_0x3d0780[_0x6c1f82(0xdb)]===ErrorCode['INVALID_ARGUMENT']))return console[_0x6c1f82(0xa7)](_0x6c1f82(0xd5)+_0x3d0780[_0x6c1f82(0xec)]),console[_0x6c1f82(0xa7)]('\x0aUse\x20\x27tdx\x20engage\x20workspace\x20list\x27\x20to\x20see\x20available\x20workspaces'),0x1;throw _0x3d0780;}_0x27ee38[_0x6c1f82(0xde)]=_0x4cf258,console[_0x6c1f82(0xcb)]('Session\x20engage_workspace\x20set\x20to:\x20'+a52_0x2b397b[_0x6c1f82(0xdf)](_0x4cf258)+'\x20'+a52_0x2b397b[_0x6c1f82(0xb7)](_0x6c1f82(0xe8)+_0x3ff3ac+')'));break;}}return saveSessionContext(_0x27ee38,_0x376d75[_0x6c1f82(0xd2)]),console['log'](a52_0x2b397b['dim'](_0x6c1f82(0xd9))),0x0;}catch(_0xcb0896){return _0xcb0896 instanceof Error&&console[_0x6c1f82(0xa7)]('Error:\x20'+_0xcb0896['message']),0x1;}}}function a52_0x1e1b(){const _0x96e266=['tdx.json','NOT_FOUND','length','140uIacGu','composable_audience','parent_segment','\x0aSaved\x20to:\x20','log','25296550cZEPjT','description','cas','2141199GYdjYs','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20site\x20<value>\x20\x20\x20\x20\x20#\x20Save\x20default\x20site\x20to\x20config\x0a','Usage:\x20tdx\x20use\x20<resource>\x20<value>\x0a','session','\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','database','Error:\x20','display','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20profile\x20<value>\x20\x20#\x20Save\x20default\x20profile\x20to\x20config\x0a','Use\x20--default\x20with\x20site,\x20profile,\x20or\x20release_channel\x20to\x20save\x20permanently','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--clear\x27\x20to\x20clear\x20session\x20overrides','Session\x20composable_audience\x20set\x20to:\x20','code','resolveWorkspaceId','profile','engage_workspace','green','\x0aRun\x20\x27tdx\x20use\x20--help\x27\x20for\x20more\x20options','\x0aTip:\x20Use\x20\x27tdx\x20use\x20--default\x20profile\x20','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>\x20\x20#\x20Set\x20release\x20channel\x0a','Session\x20database\x20set\x20to:\x20','4981518YRgRxr','agent','execute','Default\x20site\x20set\x20to:\x20','(session:\x20','default','\x27...','--default\x20can\x20only\x20be\x20used\x20with\x20\x27site\x27,\x20\x27profile\x27,\x20or\x20\x27release_channel\x27.\x20Other\x20resources\x20are\x20session-level\x20only.','message','name','Install\x20the\x20latest\x20next\x20version:\x20npm\x20install\x20-g\x20@treasuredata/tdx@next','Session\x20llm_project\x20set\x20to:\x20','release_channel\x20requires\x20--default.\x20Usage:\x20tdx\x20use\x20--default\x20release_channel\x20<stable|next>','release_channel','Set\x20session-level\x20context','Resources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20release_channel','Invalid\x20resource:\x20','error','413FygjvF','.\x20Must\x20be\x20one\x20of:\x20','Error:\x20Profile\x20\x27','debug','\x0aUpdate\x20notifications\x20will\x20check\x20the\x20@latest\x20(stable)\x20channel.','\x20\x20\x20\x20\x20\x20\x20tdx\x20use\x20--clear\x20\x20\x20\x20\x20\x20#\x20Clear\x20session\x20context\x0a','\x0aResources:\x20site,\x20database,\x20parent_segment,\x20llm_project,\x20agent,\x20profile,\x20engage_workspace,\x20cas,\x20release_channel\x0a','cleared','site','engage','3007894DMHwUG','.\x20Must\x20be\x20\x27stable\x27\x20or\x20\x27next\x27.','1226799zzsLrd','validate','\x27\x20to\x20save\x20permanently','dim','Session\x20agent\x20set\x20to:\x20','Invalid\x20release\x20channel:\x20','llm_project','stable','Session\x20profile\x20set\x20to:\x20','57864JTdXLz','next','1bemyvT','162728dkcLTK','tdx','join','\x0aUse\x20\x27tdx\x20profiles\x27\x20to\x20see\x20available\x20profiles'];a52_0x1e1b=function(){return _0x96e266;};return a52_0x1e1b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a53_0x53ed1d=a53_0x2868;(function(_0x20df59,_0x22ec73){const _0x315d31=a53_0x2868,_0x4d5675=_0x20df59();while(!![]){try{const _0xbe2a03=parseInt(_0x315d31(0x193))/0x1*(parseInt(_0x315d31(0x1aa))/0x2)+parseInt(_0x315d31(0x1a4))/0x3+-parseInt(_0x315d31(0x1a3))/0x4*(parseInt(_0x315d31(0x1a5))/0x5)+parseInt(_0x315d31(0x1a0))/0x6*(-parseInt(_0x315d31(0x1a6))/0x7)+parseInt(_0x315d31(0x194))/0x8*(-parseInt(_0x315d31(0x1b2))/0x9)+parseInt(_0x315d31(0x1b9))/0xa*(-parseInt(_0x315d31(0x1ad))/0xb)+-parseInt(_0x315d31(0x1b7))/0xc*(-parseInt(_0x315d31(0x198))/0xd);if(_0xbe2a03===_0x22ec73)break;else _0x4d5675['push'](_0x4d5675['shift']());}catch(_0x457494){_0x4d5675['push'](_0x4d5675['shift']());}}}(a53_0x332d,0x5aff2));import{BaseCommand}from'./command.js';import{SDKError}from'../sdk/index.js';import{handleSDKOutput,handleSingleObjectOutput,isStructuredFormat}from'../core/command-output.js';import{withSpinner}from'../utils/spinner.js';import a53_0x16923d from'chalk';function a53_0x2868(_0x88e341,_0x455185){_0x88e341=_0x88e341-0x193;const _0x332d27=a53_0x332d();let _0x28681d=_0x332d27[_0x88e341];return _0x28681d;}function a53_0x332d(){const _0xd0ff98=['\x20(admin)','Show\x20current\x20user\x20information','112XQVnzF','624249tnNfyd','113615NIyQxS','483bixsvk','\x20\x20Cause:\x20','execute','email','1316386OEgKRu','Fetching\x20user\x20info...','dim','11EMZDpT','description','account_owner','length','name','23427NEZgDI','Listing\x20users...','👤\x20','localeCompare','getCurrent','24rsBpxF','\x20user','789030RRPsOv','1CCaEQM','2192EAYxbY','yellow','sort','error','7270653ZNyNCs','cause','Error:\x20','user','data','Unknown','message','log','15978HALUUC'];a53_0x332d=function(){return _0xd0ff98;};return a53_0x332d();}export class UserCommand extends BaseCommand{[a53_0x53ed1d(0x1b1)]='user';[a53_0x53ed1d(0x1ae)]=a53_0x53ed1d(0x1a2);async['execute'](_0x554664){const _0x2cbb86=a53_0x53ed1d,{options:_0x19b83e,tdx:_0x4ea14f}=_0x554664;try{const _0x5a9aad=await withSpinner(_0x2cbb86(0x1ab),()=>_0x4ea14f[_0x2cbb86(0x19b)][_0x2cbb86(0x1b6)](),{'verbose':_0x19b83e['verbose']}),_0x40ead6=_0x5a9aad[_0x2cbb86(0x19c)];return await handleSingleObjectOutput(_0x40ead6,_0x19b83e),0x0;}catch(_0x4f09de){if(_0x4f09de instanceof SDKError)return console['error'](_0x2cbb86(0x19a)+_0x4f09de['message']),_0x4f09de['cause']&&console[_0x2cbb86(0x197)](_0x2cbb86(0x1a7)+_0x4f09de[_0x2cbb86(0x199)]),0x1;throw _0x4f09de;}}}export class UserListCommand extends BaseCommand{[a53_0x53ed1d(0x1b1)]='user\x20list';['description']='List\x20all\x20users\x20in\x20the\x20account';async[a53_0x53ed1d(0x1a8)](_0x4130b5){const _0x403369=a53_0x53ed1d,{options:_0x30c4cf,tdx:_0x519f17}=_0x4130b5;try{const _0x58ab9d=await withSpinner(_0x403369(0x1b3),()=>_0x519f17[_0x403369(0x19b)]['list'](),{'verbose':_0x30c4cf['verbose']}),_0x2a79f8=_0x58ab9d['data'];console[_0x403369(0x197)]('✔\x20Found\x20'+_0x2a79f8[_0x403369(0x1b0)]+_0x403369(0x1b8)+(_0x2a79f8['length']!==0x1?'s':''));if(isStructuredFormat(_0x30c4cf))await handleSDKOutput(_0x2a79f8,_0x30c4cf);else{const _0x2003f6=[..._0x2a79f8][_0x403369(0x196)]((_0x1166bb,_0x34a74d)=>String(_0x1166bb[_0x403369(0x1b1)]??'')[_0x403369(0x1b5)](String(_0x34a74d[_0x403369(0x1b1)]??'')));for(const _0x1fb1f5 of _0x2003f6){const _0x400165=_0x1fb1f5[_0x403369(0x1af)]?a53_0x16923d['yellow']('\x20(owner)'):_0x1fb1f5['administrator']?a53_0x16923d[_0x403369(0x195)](_0x403369(0x1a1)):'',_0x1c7a2e=_0x1fb1f5[_0x403369(0x1a9)]&&_0x1fb1f5[_0x403369(0x1a9)]!==_0x1fb1f5[_0x403369(0x1b1)]?a53_0x16923d[_0x403369(0x1ac)]('\x20<'+_0x1fb1f5[_0x403369(0x1a9)]+'>'):'';console[_0x403369(0x19f)](_0x403369(0x1b4)+(_0x1fb1f5[_0x403369(0x1b1)]??_0x403369(0x19d))+_0x1c7a2e+_0x400165);}}return 0x0;}catch(_0xd5b8a4){if(_0xd5b8a4 instanceof SDKError)return console['error'](_0x403369(0x19a)+_0xd5b8a4[_0x403369(0x19e)]),_0xd5b8a4[_0x403369(0x199)]&&console[_0x403369(0x197)](_0x403369(0x1a7)+_0xd5b8a4[_0x403369(0x199)]),0x1;throw _0xd5b8a4;}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a54_0x31ad5e=a54_0x3192;(function(_0x16ab13,_0x1959dc){const _0x3c2357=a54_0x3192,_0x58c22a=_0x16ab13();while(!![]){try{const _0x3d6e82=parseInt(_0x3c2357(0xd0))/0x1*(parseInt(_0x3c2357(0xe2))/0x2)+-parseInt(_0x3c2357(0xee))/0x3+-parseInt(_0x3c2357(0x131))/0x4*(-parseInt(_0x3c2357(0xd2))/0x5)+-parseInt(_0x3c2357(0xd9))/0x6+-parseInt(_0x3c2357(0x128))/0x7*(parseInt(_0x3c2357(0x110))/0x8)+-parseInt(_0x3c2357(0x11a))/0x9*(parseInt(_0x3c2357(0x130))/0xa)+parseInt(_0x3c2357(0x103))/0xb*(-parseInt(_0x3c2357(0x137))/0xc);if(_0x3d6e82===_0x1959dc)break;else _0x58c22a['push'](_0x58c22a['shift']());}catch(_0x28de55){_0x58c22a['push'](_0x58c22a['shift']());}}}(a54_0x58d5,0x36131));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';import a54_0x198a7d from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function buildStaleFilter(_0x5c8331){const _0x41c3c1=a54_0x3192;if(_0x5c8331['all'])return{'includeStale':!![]};if(_0x5c8331[_0x41c3c1(0x118)])return{'updatedWithin':parseInt(_0x5c8331[_0x41c3c1(0x118)],0xa)};return undefined;}function a54_0x58d5(){const _0x45de9f=['workflow','cwd','Invalid\x20priority:\x20','gray','template','log','github','\x20\x20←\x20','name','No\x20incoming\x20backlinks','item','progress','high','readDocument','\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.','error','low','22HjiLWO','init','round','guide','Tasks','review','resolveWikiLinks','Links\x20for:\x20','cyan','tags','createDocument','initAt','Workspace:\x20','1224RVieFT','assignee','bold','fileName','entries','todo','\x20[[','red','days','trim','1602OGwwUQ','Invalid\x20status:\x20','Workspace\x20initialized\x20in\x20current\x20directory','workspacePath','note','resolvedPath','flatMap','values','green','getTasksByStatus','Backlinks','title','yellow','repeat','252CQLIGp','critical','Moved:','Workspace\x20initialized:','Linked\x20to\x20GitHub:\x20','status','frontmatter','getBacklinks','2220HDUjrY','24000MdjZsQ','white','slug','backlog','has','split','104892OEvLqm','displayText','Document\x20not\x20found:\x20','join','1156IXTAxr','Goals','285TYXITO','goals','length','basename','Created:','\x20→\x20','\x20Run\x20','427710etqECR','.\x20Valid:\x20','kind','inherit','Wiki-links','tdx\x20work\x20init\x20<name>','filePath','magenta','exit','102TXsYbU','Invalid\x20kind:\x20','medium','dim','body','resolvedKind','isArray','getSummary','reference','path','taskCounts','blue','137028CxqEeN','map','No\x20workspace\x20found.','priority'];a54_0x58d5=function(){return _0x45de9f;};return a54_0x58d5();}function a54_0x3192(_0x2cb2d9,_0xdb1c4d){_0x2cb2d9=_0x2cb2d9-0xd0;const _0x58d5af=a54_0x58d5();let _0x319253=_0x58d5af[_0x2cb2d9];return _0x319253;}const VALID_KINDS=new Set([a54_0x31ad5e(0xfc),'goal',a54_0x31ad5e(0x106),a54_0x31ad5e(0x11e),a54_0x31ad5e(0xea),a54_0x31ad5e(0xf2),a54_0x31ad5e(0xf6)]),VALID_PRIORITIES=new Set(['critical',a54_0x31ad5e(0xfe),a54_0x31ad5e(0xe4),a54_0x31ad5e(0x102)]),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x376158=a54_0x31ad5e,_0x18748a=resolveWorkspacePath();return!_0x18748a&&(console[_0x376158(0x101)](chalk[_0x376158(0x117)](_0x376158(0xf0))+_0x376158(0xd8)+chalk['cyan'](_0x376158(0xde))+_0x376158(0x100)),process[_0x376158(0xe1)](0x1)),new WorkspaceSDK(_0x18748a);}function priorityDot(_0x3f1135){const _0x5b5fd3=a54_0x31ad5e;switch(_0x3f1135){case _0x5b5fd3(0x129):return chalk[_0x5b5fd3(0x117)]('●');case _0x5b5fd3(0xfe):return chalk[_0x5b5fd3(0x126)]('●');case _0x5b5fd3(0xe4):return chalk[_0x5b5fd3(0xed)]('●');case _0x5b5fd3(0x102):return chalk[_0x5b5fd3(0xf5)]('●');default:return chalk[_0x5b5fd3(0xed)]('●');}}function statusColor(_0x4fed8c){const _0x365848=a54_0x31ad5e;switch(_0x4fed8c){case'done':return chalk['green'](_0x4fed8c);case'void':return chalk[_0x365848(0xf5)](_0x4fed8c);case'in_progress':return chalk[_0x365848(0x10b)](_0x4fed8c);case _0x365848(0x108):return chalk[_0x365848(0xe0)](_0x4fed8c);case'planning':case'design_review':return chalk[_0x365848(0x126)](_0x4fed8c);case _0x365848(0x115):return chalk[_0x365848(0x132)](_0x4fed8c);case _0x365848(0x134):return chalk[_0x365848(0xe5)](_0x4fed8c);default:return _0x4fed8c;}}export async function workSummaryAction(_0xc32e99){const _0x427e83=a54_0x31ad5e,_0x152baa=getSDK(),_0x1c4d51=buildStaleFilter(_0xc32e99),_0x54d88d=_0x152baa[_0x427e83(0xe9)](_0x1c4d51);console[_0x427e83(0xf7)](chalk[_0x427e83(0x112)](_0x427e83(0x10f)+_0x54d88d[_0x427e83(0xfa)])),console[_0x427e83(0xf7)](chalk[_0x427e83(0xe5)](_0x54d88d[_0x427e83(0xeb)])),console['log']();const _0x1b5a6e=Object[_0x427e83(0x121)](_0x54d88d[_0x427e83(0xec)])['reduce']((_0x4629b0,_0x148694)=>_0x4629b0+_0x148694,0x0);if(_0x1b5a6e===0x0)console[_0x427e83(0xf7)](chalk[_0x427e83(0xe5)]('No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>'));else{console[_0x427e83(0xf7)](chalk['bold'](_0x427e83(0x107)));for(const [_0x4ef7dc,_0x1feff3]of Object[_0x427e83(0x114)](_0x54d88d[_0x427e83(0xec)])){_0x1feff3>0x0&&console[_0x427e83(0xf7)]('\x20\x20'+statusColor(_0x4ef7dc)+':\x20'+_0x1feff3);}console[_0x427e83(0xf7)]();}if(_0x54d88d['goals'][_0x427e83(0xd4)]>0x0){console['log'](chalk['bold'](_0x427e83(0xd1)));for(const _0x1025c7 of _0x54d88d[_0x427e83(0xd3)]){const _0x243bb6=progressBar(_0x1025c7['progress']);console[_0x427e83(0xf7)]('\x20\x20'+_0x1025c7[_0x427e83(0x125)]+'\x20'+_0x243bb6+'\x20'+_0x1025c7[_0x427e83(0xfd)]+'%');}}}function progressBar(_0x51062f){const _0x4d99b4=a54_0x31ad5e,_0x588222=0x14,_0x5b2e46=Math[_0x4d99b4(0x105)](_0x51062f/0x64*_0x588222),_0x4959e2=_0x588222-_0x5b2e46;return chalk[_0x4d99b4(0x122)]('█'[_0x4d99b4(0x127)](_0x5b2e46))+chalk['dim']('░'['repeat'](_0x4959e2));}export async function workInitAction(_0x5e4db0,_0x3af639){const _0x602d8a=a54_0x31ad5e,_0x1c2af4=_0x5e4db0||a54_0x198a7d[_0x602d8a(0xd5)](process[_0x602d8a(0xf3)]());if(_0x3af639['github']){const _0x4c8de7=WorkspaceSDK['initAt'](_0x1c2af4,{'github':_0x3af639[_0x602d8a(0xf8)]});console['log'](chalk[_0x602d8a(0x122)](_0x602d8a(0x12b))+'\x20'+_0x4c8de7[_0x602d8a(0x11d)]),console[_0x602d8a(0xf7)](chalk[_0x602d8a(0xe5)](_0x602d8a(0x12c)+_0x3af639[_0x602d8a(0xf8)]));}else{if(_0x5e4db0){const _0x453815=WorkspaceSDK[_0x602d8a(0x10e)](_0x5e4db0);console[_0x602d8a(0xf7)](chalk[_0x602d8a(0x122)](_0x602d8a(0x12b))+'\x20'+_0x453815[_0x602d8a(0x11d)]);}else{const _0x323b6d=new WorkspaceSDK(process[_0x602d8a(0xf3)]());_0x323b6d[_0x602d8a(0x104)](_0x1c2af4),console['log'](chalk[_0x602d8a(0x122)](_0x602d8a(0x11c)));}}}export async function workNewAction(_0x2b93c5,_0x5bdd38){const _0x330ece=a54_0x31ad5e,_0x23d4e6=getSDK(),_0x3fb484=_0x5bdd38[_0x330ece(0xdb)]||_0x330ece(0xfc);!VALID_KINDS[_0x330ece(0x135)](_0x3fb484)&&(console[_0x330ece(0x101)](chalk[_0x330ece(0x117)](_0x330ece(0xe3)+_0x3fb484+_0x330ece(0xda)+[...VALID_KINDS][_0x330ece(0x13a)](',\x20'))),process['exit'](0x1));_0x5bdd38['priority']&&!VALID_PRIORITIES[_0x330ece(0x135)](_0x5bdd38[_0x330ece(0xf1)])&&(console[_0x330ece(0x101)](chalk['red'](_0x330ece(0xf4)+_0x5bdd38[_0x330ece(0xf1)]+_0x330ece(0xda)+[...VALID_PRIORITIES][_0x330ece(0x13a)](',\x20'))),process[_0x330ece(0xe1)](0x1));_0x5bdd38[_0x330ece(0x12d)]&&!VALID_STATUSES[_0x330ece(0x135)](_0x5bdd38['status'])&&(console[_0x330ece(0x101)](chalk[_0x330ece(0x117)]('Invalid\x20status:\x20'+_0x5bdd38[_0x330ece(0x12d)]+'.\x20Valid:\x20'+[...VALID_STATUSES][_0x330ece(0x13a)](',\x20'))),process[_0x330ece(0xe1)](0x1));const _0x3aa98b=_0x5bdd38['tags']?_0x5bdd38[_0x330ece(0x10c)][_0x330ece(0x136)](',')[_0x330ece(0xef)](_0x1efbc9=>_0x1efbc9[_0x330ece(0x119)]()):undefined,_0x51f73f=_0x23d4e6[_0x330ece(0x10d)]({'title':_0x2b93c5,'kind':_0x3fb484,'tags':_0x3aa98b,'priority':_0x5bdd38[_0x330ece(0xf1)],'body':_0x5bdd38['body'],'template':_0x5bdd38[_0x330ece(0xf6)],'status':_0x5bdd38['status'],'assignee':_0x5bdd38[_0x330ece(0x111)]});console[_0x330ece(0xf7)](chalk[_0x330ece(0x122)](_0x330ece(0xd6))+'\x20'+_0x51f73f['fileName']),console[_0x330ece(0xf7)](chalk[_0x330ece(0xe5)](_0x51f73f['filePath']));}export async function workMoveAction(_0xfdc49e,_0x474931){const _0x4589e0=a54_0x31ad5e;!VALID_STATUSES[_0x4589e0(0x135)](_0x474931)&&(console[_0x4589e0(0x101)](chalk[_0x4589e0(0x117)](_0x4589e0(0x11b)+_0x474931+_0x4589e0(0xda)+[...VALID_STATUSES][_0x4589e0(0x13a)](',\x20'))),process[_0x4589e0(0xe1)](0x1));const _0x5c879b=getSDK(),_0x5e7614=_0x5c879b['moveTask'](_0xfdc49e,_0x474931);!_0x5e7614&&(console['error'](chalk[_0x4589e0(0x117)](_0x4589e0(0x139)+_0xfdc49e)),process[_0x4589e0(0xe1)](0x1));const _0x262cf9=_0x5e7614[_0x4589e0(0x12e)][_0x4589e0(0x125)]||_0x5e7614[_0x4589e0(0x113)];console['log'](chalk[_0x4589e0(0x122)](_0x4589e0(0x12a))+('\x20'+_0x262cf9+_0x4589e0(0xd7)+statusColor(_0x474931)));}export async function workBoardAction(_0x32216f){const _0xb3ab23=a54_0x31ad5e,_0x2616b8=getSDK(),_0x45f69a=buildStaleFilter(_0x32216f),{grouped:_0x45a43a}=_0x2616b8[_0xb3ab23(0x123)](_0x45f69a);for(const [_0x27beee,_0x247186]of Object[_0xb3ab23(0x114)](STATUS_PHASES)){const _0x506923=_0x247186[_0xb3ab23(0x120)](_0x106616=>_0x45a43a[_0x106616]||[]);console[_0xb3ab23(0xf7)](chalk[_0xb3ab23(0x112)]['underline'](_0x27beee)+chalk['dim']('\x20('+_0x506923[_0xb3ab23(0xd4)]+')'));if(_0x506923['length']===0x0)console[_0xb3ab23(0xf7)](chalk['dim']('\x20\x20(empty)'));else for(const _0x1f351a of _0x506923){const _0x4f066b=_0x1f351a[_0xb3ab23(0x12e)],_0x111d30=priorityDot(_0x4f066b[_0xb3ab23(0xf1)]),_0x5b88f2=_0x4f066b[_0xb3ab23(0x125)]||_0x1f351a[_0xb3ab23(0x113)],_0xfd3288=normalizeTags(_0x4f066b[_0xb3ab23(0x10c)]),_0x1478cd=_0xfd3288[_0xb3ab23(0xd4)]?chalk[_0xb3ab23(0xe5)]('\x20['+_0xfd3288['join'](',\x20')+']'):'',_0x2a1f2a=chalk[_0xb3ab23(0xe5)]('('+_0x4f066b[_0xb3ab23(0x12d)]+')');console[_0xb3ab23(0xf7)]('\x20\x20'+_0x111d30+'\x20'+_0x5b88f2+'\x20'+_0x2a1f2a+_0x1478cd);}console[_0xb3ab23(0xf7)]();}}export async function workShowAction(_0x4f2432){const _0x2ae9ad=a54_0x31ad5e,_0x268523=getSDK(),_0x4caf26=_0x268523[_0x2ae9ad(0xff)](_0x4f2432);!_0x4caf26&&(console['error'](chalk['red'](_0x2ae9ad(0x139)+_0x4f2432)),process[_0x2ae9ad(0xe1)](0x1));console[_0x2ae9ad(0xf7)](chalk[_0x2ae9ad(0x112)](_0x4caf26[_0x2ae9ad(0x12e)]['title']||_0x4caf26[_0x2ae9ad(0x113)])),console[_0x2ae9ad(0xf7)](chalk[_0x2ae9ad(0xe5)](_0x4caf26[_0x2ae9ad(0xdf)])),console['log']();const _0x224feb=_0x4caf26['frontmatter'];for(const [_0x5a0a11,_0x5cdc53]of Object[_0x2ae9ad(0x114)](_0x224feb)){if(_0x5a0a11===_0x2ae9ad(0x125))continue;if(_0x5cdc53===undefined||_0x5cdc53===null)continue;const _0x30a09b=Array[_0x2ae9ad(0xe8)](_0x5cdc53)?_0x5cdc53[_0x2ae9ad(0x13a)](',\x20'):String(_0x5cdc53);console[_0x2ae9ad(0xf7)]('\x20\x20'+chalk['cyan'](_0x5a0a11)+':\x20'+_0x30a09b);}console[_0x2ae9ad(0xf7)]();_0x4caf26['body']['trim']()&&(console[_0x2ae9ad(0xf7)](_0x4caf26['body'][_0x2ae9ad(0x119)]()),console['log']());const _0x454f19=_0x268523[_0x2ae9ad(0x109)](_0x4caf26[_0x2ae9ad(0xe6)]);if(_0x454f19[_0x2ae9ad(0xd4)]>0x0){console[_0x2ae9ad(0xf7)](chalk[_0x2ae9ad(0x112)](_0x2ae9ad(0xdd)));for(const _0x17e3f3 of _0x454f19){const _0x4d38f8=_0x17e3f3['resolvedPath']?chalk['green']('✓'):chalk[_0x2ae9ad(0x117)]('✗'),_0x1ef390=_0x17e3f3[_0x2ae9ad(0x138)]||_0x17e3f3[_0x2ae9ad(0x133)];console[_0x2ae9ad(0xf7)]('\x20\x20'+_0x4d38f8+_0x2ae9ad(0x116)+_0x1ef390+']]');}console[_0x2ae9ad(0xf7)]();}const _0x38c7d1=_0x268523[_0x2ae9ad(0x12f)](_0x4caf26[_0x2ae9ad(0x113)]);if(_0x38c7d1[_0x2ae9ad(0xd4)]>0x0){console[_0x2ae9ad(0xf7)](chalk[_0x2ae9ad(0x112)](_0x2ae9ad(0x124)));for(const _0x91290c of _0x38c7d1){console[_0x2ae9ad(0xf7)](_0x2ae9ad(0xf9)+_0x91290c[_0x2ae9ad(0x125)]+'\x20'+chalk[_0x2ae9ad(0xe5)]('('+_0x91290c[_0x2ae9ad(0xdb)]+')'));}}}export async function workLinksAction(_0x3c9ac4){const _0x4de664=a54_0x31ad5e,_0x3987f6=getSDK(),_0x48b22b=_0x3987f6[_0x4de664(0xff)](_0x3c9ac4);!_0x48b22b&&(console['error'](chalk[_0x4de664(0x117)](_0x4de664(0x139)+_0x3c9ac4)),process['exit'](0x1));const _0xb923c5=_0x48b22b[_0x4de664(0x12e)]['title']||_0x48b22b[_0x4de664(0x113)];console[_0x4de664(0xf7)](chalk[_0x4de664(0x112)](_0x4de664(0x10a)+_0xb923c5)),console[_0x4de664(0xf7)]();const _0x3956bf=_0x3987f6[_0x4de664(0x109)](_0x48b22b[_0x4de664(0xe6)]);if(_0x3956bf[_0x4de664(0xd4)]>0x0){console[_0x4de664(0xf7)](chalk[_0x4de664(0x112)]('Outgoing'));for(const _0x3fa7bb of _0x3956bf){const _0x477a41=_0x3fa7bb[_0x4de664(0x11f)]?chalk[_0x4de664(0x122)]('✓'):chalk[_0x4de664(0x117)]('✗'),_0x260e67=_0x3fa7bb['displayText']||_0x3fa7bb[_0x4de664(0x133)],_0x5e9363=_0x3fa7bb['resolvedKind']?chalk['dim']('\x20('+_0x3fa7bb[_0x4de664(0xe7)]+')'):'';console[_0x4de664(0xf7)]('\x20\x20'+_0x477a41+_0x4de664(0x116)+_0x260e67+']]'+_0x5e9363);}}else console[_0x4de664(0xf7)](chalk[_0x4de664(0xe5)]('No\x20outgoing\x20wiki-links'));console[_0x4de664(0xf7)]();const _0x1dd867=_0x3987f6[_0x4de664(0x12f)](_0x48b22b[_0x4de664(0x113)]);if(_0x1dd867['length']>0x0){console[_0x4de664(0xf7)](chalk[_0x4de664(0x112)]('Incoming'));for(const _0x547f8d of _0x1dd867){console[_0x4de664(0xf7)](_0x4de664(0xf9)+_0x547f8d[_0x4de664(0x125)]+'\x20'+chalk[_0x4de664(0xe5)]('('+_0x547f8d[_0x4de664(0xdb)]+')'));}}else console[_0x4de664(0xf7)](chalk[_0x4de664(0xe5)](_0x4de664(0xfb)));}export async function workOpenAction(_0x4b7691){const _0x10db53=a54_0x31ad5e,_0x1e497f=getSDK(),_0x532f77=_0x1e497f[_0x10db53(0xff)](_0x4b7691);!_0x532f77&&(console[_0x10db53(0x101)](chalk[_0x10db53(0x117)](_0x10db53(0x139)+_0x4b7691)),process['exit'](0x1));const _0x22a8c9=process.env.EDITOR||'vi';try{execFileSync(_0x22a8c9,[_0x532f77[_0x10db53(0xdf)]],{'stdio':_0x10db53(0xdc)});}catch{console[_0x10db53(0x101)](chalk['red']('Failed\x20to\x20open\x20editor:\x20'+_0x22a8c9)),process[_0x10db53(0xe1)](0x1);}}
|
|
1
|
+
const a54_0x1b8e24=a54_0x561c;function a54_0x561c(_0xac31ca,_0x509031){_0xac31ca=_0xac31ca-0x15f;const _0x5f0eed=a54_0x5f0e();let _0x561c90=_0x5f0eed[_0xac31ca];return _0x561c90;}(function(_0x3d2e9f,_0x277ec6){const _0x5012b6=a54_0x561c,_0x32f544=_0x3d2e9f();while(!![]){try{const _0x4dfe83=parseInt(_0x5012b6(0x196))/0x1*(parseInt(_0x5012b6(0x164))/0x2)+parseInt(_0x5012b6(0x160))/0x3+-parseInt(_0x5012b6(0x1a5))/0x4+parseInt(_0x5012b6(0x1c1))/0x5+parseInt(_0x5012b6(0x177))/0x6*(parseInt(_0x5012b6(0x1a6))/0x7)+parseInt(_0x5012b6(0x1b9))/0x8*(-parseInt(_0x5012b6(0x181))/0x9)+-parseInt(_0x5012b6(0x1b3))/0xa;if(_0x4dfe83===_0x277ec6)break;else _0x32f544['push'](_0x32f544['shift']());}catch(_0x45e00d){_0x32f544['push'](_0x32f544['shift']());}}}(a54_0x5f0e,0xbf01c));import{getChalk}from'../utils/colors.js';const chalk=getChalk();import{execFileSync}from'node:child_process';import a54_0x1c8eb3 from'node:path';import{WorkspaceSDK,resolveWorkspacePath,normalizeTags}from'../sdk/workspace/index.js';import{STATUS_PHASES,ALL_STATUSES}from'../sdk/types/workspace.js';function a54_0x5f0e(){const _0x4ed158=['status','red','isArray','entries','resolveWikiLinks','2984648tNUbVA','1393CmAdWT','dim','backlog','fileName','in_progress','item','\x20\x20(empty)','assignee','path','underline','design_review','resolvedKind','name','4069110wEjFOh','workspacePath','resolvedPath','values','repeat','Wiki-links','1441864zzppkl','.\x20Valid:\x20','void','medium','high','init','Goals','goal','1008825XilCSd','error','flatMap','readDocument','gray','goals','split','note','Workspace:\x20','blue','3878838aqSQAO','tags','taskCounts','Links\x20for:\x20','24802uTPEet','low','\x20\x20←\x20','has','github','critical','filePath','Invalid\x20priority:\x20','review','\x20[[','frontmatter','Document\x20not\x20found:\x20','cyan','all','join','Incoming','white','\x20Run\x20','guide','5262tJKkbF','workflow','Tasks','createDocument','getSummary','initAt','priority','length','progress','\x20→\x20','9eZYqtF','tdx\x20work\x20init\x20<name>','planning','round','Backlinks','bold','slug','displayText','trim','green','Linked\x20to\x20GitHub:\x20','Outgoing','Invalid\x20status:\x20','template','No\x20outgoing\x20wiki-links','log','done','No\x20workspace\x20found.','exit','title','map','36DmCJEe','cwd','todo','moveTask','kind','getBacklinks','Workspace\x20initialized:','basename','body','days'];a54_0x5f0e=function(){return _0x4ed158;};return a54_0x5f0e();}function buildStaleFilter(_0x421db1){const _0x51d679=a54_0x561c;if(_0x421db1[_0x51d679(0x171)])return{'includeStale':!![]};if(_0x421db1[_0x51d679(0x19f)])return{'updatedWithin':parseInt(_0x421db1[_0x51d679(0x19f)],0xa)};return undefined;}const VALID_KINDS=new Set([a54_0x1b8e24(0x1ab),a54_0x1b8e24(0x1c0),a54_0x1b8e24(0x176),a54_0x1b8e24(0x1c8),'reference',a54_0x1b8e24(0x178),'template']),VALID_PRIORITIES=new Set(['critical',a54_0x1b8e24(0x1bd),a54_0x1b8e24(0x1bc),'low']),VALID_STATUSES=new Set(ALL_STATUSES);function getSDK(){const _0x57220a=a54_0x1b8e24,_0x5714e0=resolveWorkspacePath();return!_0x5714e0&&(console[_0x57220a(0x1c2)](chalk[_0x57220a(0x1a1)](_0x57220a(0x192))+_0x57220a(0x175)+chalk[_0x57220a(0x170)](_0x57220a(0x182))+'\x20to\x20create\x20one,\x20or\x20navigate\x20to\x20a\x20directory\x20containing\x20tdx.json.'),process['exit'](0x1)),new WorkspaceSDK(_0x5714e0);}function priorityDot(_0x480672){const _0x49ac64=a54_0x1b8e24;switch(_0x480672){case _0x49ac64(0x169):return chalk[_0x49ac64(0x1a1)]('●');case _0x49ac64(0x1bd):return chalk['yellow']('●');case _0x49ac64(0x1bc):return chalk[_0x49ac64(0x15f)]('●');case _0x49ac64(0x165):return chalk[_0x49ac64(0x1c5)]('●');default:return chalk['blue']('●');}}function statusColor(_0x14e9dd){const _0x1a007e=a54_0x1b8e24;switch(_0x14e9dd){case _0x1a007e(0x191):return chalk[_0x1a007e(0x18a)](_0x14e9dd);case _0x1a007e(0x1bb):return chalk[_0x1a007e(0x1c5)](_0x14e9dd);case _0x1a007e(0x1aa):return chalk['cyan'](_0x14e9dd);case _0x1a007e(0x16c):return chalk['magenta'](_0x14e9dd);case _0x1a007e(0x183):case _0x1a007e(0x1b0):return chalk['yellow'](_0x14e9dd);case _0x1a007e(0x198):return chalk[_0x1a007e(0x174)](_0x14e9dd);case _0x1a007e(0x1a8):return chalk[_0x1a007e(0x1a7)](_0x14e9dd);default:return _0x14e9dd;}}export async function workSummaryAction(_0x4b8e30){const _0x47f27e=a54_0x1b8e24,_0x4af756=getSDK(),_0x1d8ecf=buildStaleFilter(_0x4b8e30),_0x1fd89c=_0x4af756[_0x47f27e(0x17b)](_0x1d8ecf);console['log'](chalk[_0x47f27e(0x186)](_0x47f27e(0x1c9)+_0x1fd89c[_0x47f27e(0x1b2)])),console[_0x47f27e(0x190)](chalk[_0x47f27e(0x1a7)](_0x1fd89c[_0x47f27e(0x1ae)])),console[_0x47f27e(0x190)]();const _0x1f6e1a=Object[_0x47f27e(0x1b6)](_0x1fd89c['taskCounts'])['reduce']((_0x43e5a6,_0x290d3c)=>_0x43e5a6+_0x290d3c,0x0);if(_0x1f6e1a===0x0)console['log'](chalk[_0x47f27e(0x1a7)]('No\x20tasks\x20yet.\x20Create\x20one\x20with:\x20tdx\x20work\x20new\x20<title>'));else{console[_0x47f27e(0x190)](chalk[_0x47f27e(0x186)](_0x47f27e(0x179)));for(const [_0xc1b039,_0x8c03ab]of Object[_0x47f27e(0x1a3)](_0x1fd89c[_0x47f27e(0x162)])){_0x8c03ab>0x0&&console['log']('\x20\x20'+statusColor(_0xc1b039)+':\x20'+_0x8c03ab);}console['log']();}if(_0x1fd89c[_0x47f27e(0x1c6)][_0x47f27e(0x17e)]>0x0){console[_0x47f27e(0x190)](chalk['bold'](_0x47f27e(0x1bf)));for(const _0x29cc19 of _0x1fd89c[_0x47f27e(0x1c6)]){const _0x16d94c=progressBar(_0x29cc19['progress']);console['log']('\x20\x20'+_0x29cc19['title']+'\x20'+_0x16d94c+'\x20'+_0x29cc19[_0x47f27e(0x17f)]+'%');}}}function progressBar(_0x5a5267){const _0x1c9eb1=a54_0x1b8e24,_0x13a827=0x14,_0x4f4d31=Math[_0x1c9eb1(0x184)](_0x5a5267/0x64*_0x13a827),_0x5b2b5f=_0x13a827-_0x4f4d31;return chalk[_0x1c9eb1(0x18a)]('█'['repeat'](_0x4f4d31))+chalk[_0x1c9eb1(0x1a7)]('░'[_0x1c9eb1(0x1b7)](_0x5b2b5f));}export async function workInitAction(_0xaa4389,_0x2bc1ae){const _0x4f869c=a54_0x1b8e24,_0x35b8b8=_0xaa4389||a54_0x1c8eb3[_0x4f869c(0x19d)](process['cwd']());if(_0x2bc1ae[_0x4f869c(0x168)]){const _0x2da8bc=WorkspaceSDK[_0x4f869c(0x17c)](_0x35b8b8,{'github':_0x2bc1ae['github']});console[_0x4f869c(0x190)](chalk[_0x4f869c(0x18a)]('Workspace\x20initialized:')+'\x20'+_0x2da8bc[_0x4f869c(0x1b4)]),console[_0x4f869c(0x190)](chalk['dim'](_0x4f869c(0x18b)+_0x2bc1ae[_0x4f869c(0x168)]));}else{if(_0xaa4389){const _0x4dda29=WorkspaceSDK[_0x4f869c(0x17c)](_0xaa4389);console[_0x4f869c(0x190)](chalk[_0x4f869c(0x18a)](_0x4f869c(0x19c))+'\x20'+_0x4dda29[_0x4f869c(0x1b4)]);}else{const _0x51f39c=new WorkspaceSDK(process[_0x4f869c(0x197)]());_0x51f39c[_0x4f869c(0x1be)](_0x35b8b8),console['log'](chalk[_0x4f869c(0x18a)]('Workspace\x20initialized\x20in\x20current\x20directory'));}}}export async function workNewAction(_0x5d0d18,_0x50950f){const _0x1f7478=a54_0x1b8e24,_0x458541=getSDK(),_0x2bd0cf=_0x50950f[_0x1f7478(0x19a)]||_0x1f7478(0x1ab);!VALID_KINDS['has'](_0x2bd0cf)&&(console[_0x1f7478(0x1c2)](chalk[_0x1f7478(0x1a1)]('Invalid\x20kind:\x20'+_0x2bd0cf+_0x1f7478(0x1ba)+[...VALID_KINDS]['join'](',\x20'))),process[_0x1f7478(0x193)](0x1));_0x50950f[_0x1f7478(0x17d)]&&!VALID_PRIORITIES['has'](_0x50950f[_0x1f7478(0x17d)])&&(console[_0x1f7478(0x1c2)](chalk['red'](_0x1f7478(0x16b)+_0x50950f['priority']+'.\x20Valid:\x20'+[...VALID_PRIORITIES][_0x1f7478(0x172)](',\x20'))),process[_0x1f7478(0x193)](0x1));_0x50950f[_0x1f7478(0x1a0)]&&!VALID_STATUSES[_0x1f7478(0x167)](_0x50950f[_0x1f7478(0x1a0)])&&(console[_0x1f7478(0x1c2)](chalk[_0x1f7478(0x1a1)](_0x1f7478(0x18d)+_0x50950f['status']+_0x1f7478(0x1ba)+[...VALID_STATUSES][_0x1f7478(0x172)](',\x20'))),process[_0x1f7478(0x193)](0x1));const _0x20e3dd=_0x50950f[_0x1f7478(0x161)]?_0x50950f['tags'][_0x1f7478(0x1c7)](',')[_0x1f7478(0x195)](_0x52f439=>_0x52f439[_0x1f7478(0x189)]()):undefined,_0x1ba755=_0x458541[_0x1f7478(0x17a)]({'title':_0x5d0d18,'kind':_0x2bd0cf,'tags':_0x20e3dd,'priority':_0x50950f[_0x1f7478(0x17d)],'body':_0x50950f[_0x1f7478(0x19e)],'template':_0x50950f[_0x1f7478(0x18e)],'status':_0x50950f['status'],'assignee':_0x50950f[_0x1f7478(0x1ad)]});console[_0x1f7478(0x190)](chalk[_0x1f7478(0x18a)]('Created:')+'\x20'+_0x1ba755['fileName']),console[_0x1f7478(0x190)](chalk[_0x1f7478(0x1a7)](_0x1ba755[_0x1f7478(0x16a)]));}export async function workMoveAction(_0x5d2c24,_0x498223){const _0x568b47=a54_0x1b8e24;!VALID_STATUSES['has'](_0x498223)&&(console[_0x568b47(0x1c2)](chalk['red'](_0x568b47(0x18d)+_0x498223+_0x568b47(0x1ba)+[...VALID_STATUSES][_0x568b47(0x172)](',\x20'))),process['exit'](0x1));const _0x5a1265=getSDK(),_0x5d7e67=_0x5a1265[_0x568b47(0x199)](_0x5d2c24,_0x498223);!_0x5d7e67&&(console[_0x568b47(0x1c2)](chalk[_0x568b47(0x1a1)](_0x568b47(0x16f)+_0x5d2c24)),process[_0x568b47(0x193)](0x1));const _0x190db3=_0x5d7e67[_0x568b47(0x16e)][_0x568b47(0x194)]||_0x5d7e67[_0x568b47(0x1a9)];console[_0x568b47(0x190)](chalk[_0x568b47(0x18a)]('Moved:')+('\x20'+_0x190db3+_0x568b47(0x180)+statusColor(_0x498223)));}export async function workBoardAction(_0x44102f){const _0x19b799=a54_0x1b8e24,_0x58ea56=getSDK(),_0x2c7c0c=buildStaleFilter(_0x44102f),{grouped:_0x2ee32b}=_0x58ea56['getTasksByStatus'](_0x2c7c0c);for(const [_0x3a97f6,_0x5c0772]of Object[_0x19b799(0x1a3)](STATUS_PHASES)){const _0xda436=_0x5c0772[_0x19b799(0x1c3)](_0x527852=>_0x2ee32b[_0x527852]||[]);console[_0x19b799(0x190)](chalk[_0x19b799(0x186)][_0x19b799(0x1af)](_0x3a97f6)+chalk['dim']('\x20('+_0xda436['length']+')'));if(_0xda436[_0x19b799(0x17e)]===0x0)console['log'](chalk[_0x19b799(0x1a7)](_0x19b799(0x1ac)));else for(const _0x2c62f5 of _0xda436){const _0x2e3573=_0x2c62f5[_0x19b799(0x16e)],_0x3195e5=priorityDot(_0x2e3573[_0x19b799(0x17d)]),_0x3aafa3=_0x2e3573[_0x19b799(0x194)]||_0x2c62f5[_0x19b799(0x1a9)],_0x3df251=normalizeTags(_0x2e3573[_0x19b799(0x161)]),_0x5b2c34=_0x3df251['length']?chalk[_0x19b799(0x1a7)]('\x20['+_0x3df251['join'](',\x20')+']'):'',_0x4942c8=chalk[_0x19b799(0x1a7)]('('+_0x2e3573['status']+')');console[_0x19b799(0x190)]('\x20\x20'+_0x3195e5+'\x20'+_0x3aafa3+'\x20'+_0x4942c8+_0x5b2c34);}console[_0x19b799(0x190)]();}}export async function workShowAction(_0x242421){const _0x572105=a54_0x1b8e24,_0x2ed85f=getSDK(),_0xf9cd19=_0x2ed85f['readDocument'](_0x242421);!_0xf9cd19&&(console['error'](chalk[_0x572105(0x1a1)](_0x572105(0x16f)+_0x242421)),process['exit'](0x1));console[_0x572105(0x190)](chalk[_0x572105(0x186)](_0xf9cd19[_0x572105(0x16e)]['title']||_0xf9cd19['fileName'])),console[_0x572105(0x190)](chalk['dim'](_0xf9cd19[_0x572105(0x16a)])),console[_0x572105(0x190)]();const _0x377a28=_0xf9cd19[_0x572105(0x16e)];for(const [_0x2a9a57,_0x52998e]of Object[_0x572105(0x1a3)](_0x377a28)){if(_0x2a9a57===_0x572105(0x194))continue;if(_0x52998e===undefined||_0x52998e===null)continue;const _0x790ea=Array[_0x572105(0x1a2)](_0x52998e)?_0x52998e['join'](',\x20'):String(_0x52998e);console[_0x572105(0x190)]('\x20\x20'+chalk[_0x572105(0x170)](_0x2a9a57)+':\x20'+_0x790ea);}console[_0x572105(0x190)]();_0xf9cd19[_0x572105(0x19e)][_0x572105(0x189)]()&&(console['log'](_0xf9cd19[_0x572105(0x19e)][_0x572105(0x189)]()),console['log']());const _0x2024c6=_0x2ed85f[_0x572105(0x1a4)](_0xf9cd19['body']);if(_0x2024c6[_0x572105(0x17e)]>0x0){console['log'](chalk[_0x572105(0x186)](_0x572105(0x1b8)));for(const _0x1fb626 of _0x2024c6){const _0x190883=_0x1fb626[_0x572105(0x1b5)]?chalk[_0x572105(0x18a)]('✓'):chalk[_0x572105(0x1a1)]('✗'),_0x37dac2=_0x1fb626[_0x572105(0x188)]||_0x1fb626[_0x572105(0x187)];console[_0x572105(0x190)]('\x20\x20'+_0x190883+_0x572105(0x16d)+_0x37dac2+']]');}console['log']();}const _0x4a5e0b=_0x2ed85f[_0x572105(0x19b)](_0xf9cd19[_0x572105(0x1a9)]);if(_0x4a5e0b['length']>0x0){console[_0x572105(0x190)](chalk[_0x572105(0x186)](_0x572105(0x185)));for(const _0x3ee2b of _0x4a5e0b){console['log']('\x20\x20←\x20'+_0x3ee2b[_0x572105(0x194)]+'\x20'+chalk[_0x572105(0x1a7)]('('+_0x3ee2b[_0x572105(0x19a)]+')'));}}}export async function workLinksAction(_0x540719){const _0x16bdc1=a54_0x1b8e24,_0x3afb28=getSDK(),_0x105268=_0x3afb28[_0x16bdc1(0x1c4)](_0x540719);!_0x105268&&(console[_0x16bdc1(0x1c2)](chalk[_0x16bdc1(0x1a1)](_0x16bdc1(0x16f)+_0x540719)),process[_0x16bdc1(0x193)](0x1));const _0x5bee14=_0x105268[_0x16bdc1(0x16e)][_0x16bdc1(0x194)]||_0x105268[_0x16bdc1(0x1a9)];console[_0x16bdc1(0x190)](chalk[_0x16bdc1(0x186)](_0x16bdc1(0x163)+_0x5bee14)),console['log']();const _0x4481b7=_0x3afb28[_0x16bdc1(0x1a4)](_0x105268['body']);if(_0x4481b7[_0x16bdc1(0x17e)]>0x0){console[_0x16bdc1(0x190)](chalk[_0x16bdc1(0x186)](_0x16bdc1(0x18c)));for(const _0x2bcbe2 of _0x4481b7){const _0x57317a=_0x2bcbe2[_0x16bdc1(0x1b5)]?chalk[_0x16bdc1(0x18a)]('✓'):chalk[_0x16bdc1(0x1a1)]('✗'),_0x305749=_0x2bcbe2[_0x16bdc1(0x188)]||_0x2bcbe2[_0x16bdc1(0x187)],_0x5d7b3e=_0x2bcbe2[_0x16bdc1(0x1b1)]?chalk[_0x16bdc1(0x1a7)]('\x20('+_0x2bcbe2[_0x16bdc1(0x1b1)]+')'):'';console['log']('\x20\x20'+_0x57317a+_0x16bdc1(0x16d)+_0x305749+']]'+_0x5d7b3e);}}else console[_0x16bdc1(0x190)](chalk[_0x16bdc1(0x1a7)](_0x16bdc1(0x18f)));console['log']();const _0x45fb36=_0x3afb28[_0x16bdc1(0x19b)](_0x105268[_0x16bdc1(0x1a9)]);if(_0x45fb36['length']>0x0){console[_0x16bdc1(0x190)](chalk[_0x16bdc1(0x186)](_0x16bdc1(0x173)));for(const _0x50cae8 of _0x45fb36){console['log'](_0x16bdc1(0x166)+_0x50cae8[_0x16bdc1(0x194)]+'\x20'+chalk[_0x16bdc1(0x1a7)]('('+_0x50cae8[_0x16bdc1(0x19a)]+')'));}}else console['log'](chalk[_0x16bdc1(0x1a7)]('No\x20incoming\x20backlinks'));}export async function workOpenAction(_0x8b2598){const _0xa92954=a54_0x1b8e24,_0x31f932=getSDK(),_0x128f72=_0x31f932[_0xa92954(0x1c4)](_0x8b2598);!_0x128f72&&(console[_0xa92954(0x1c2)](chalk[_0xa92954(0x1a1)](_0xa92954(0x16f)+_0x8b2598)),process[_0xa92954(0x193)](0x1));const _0x593342=process.env.EDITOR||'vi';try{execFileSync(_0x593342,[_0x128f72[_0xa92954(0x16a)]],{'stdio':'inherit'});}catch{console[_0xa92954(0x1c2)](chalk['red']('Failed\x20to\x20open\x20editor:\x20'+_0x593342)),process[_0xa92954(0x193)](0x1);}}
|