feat(profile): default profile list to table format - #43
Open
guantoubaozi wants to merge 538 commits into
Open
Conversation
… lakehouse-doc in release skills sync Co-Authored-By: cz-cli <noreply@clickzetta.com>
error() and success() only set process.exitCode and write output; they do not stop execution. Add early returns so handlers don't continue with invalid state or emit duplicate output after reporting a result.
Extract dep-tasks parsing into parseDependencyTasks, which throws a HandledCliError on invalid input instead of reporting and then saving a partially-stripped config. Add early returns after validation errors so save-config and flow subcommands abort before calling the SDK.
Deleting the profile referenced by default_profile left a dangling reference. Point it at a remaining profile, or drop the key when none remain.
Store credential-derived LLM settings under the profile name instead of a hardcoded "clickzetta" key, and default default_llm to the profile name. Keeps LLM config per-profile and consistent across packages.
A non-zero start minute was ignored, so 'every N minutes from minute M' encoded as */N (from 0) instead of M/N. Emit startM/gap when startM != 0.
formatTable now renders the header and separator for empty result sets instead of falling back to pretty JSON. formatCsvCell no longer JSON-wraps number/bool/null-looking strings (CSV is typeless), quoting only the literal "NULL" string to disambiguate it from the null sentinel.
CLICKZETTA_AGENT_RUNTIME in process.env was inherited by child processes, so a nested cz-cli launched from the agent's bash tool re-entered the agent runtime. Pass it as a main() argument to scope it to the in-process call.
Launching the full-screen TUI with captured stdout (a pipe / agent bash tool) floods escape sequences and hangs. Error out and point at the non-interactive 'agent run' entry instead.
Adds a /sql slash command that executes SQL via session.shell, equivalent to `cz-cli sql`. Simple single-line queries are inlined (readable); SQL containing ' " ` $ \ or newlines is written to a temp file and run with --file to avoid shell-quoting corruption.
config aliased/routed to agent llm, colliding with the universal git config-style idiom. Remove the alias and the top-level/agent config routing; LLM management stays on llm / agent llm.
The committed skills are hand-maintained; the template/generator had drifted and was no longer the source of the shipped SKILL.md files. Drop SKILL.template.md, skill-generator.ts, and ai-guide's --generate-skill/--check-skill options; keep the command-reference output.
…nked llm entry in ai_message Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
install.sh writes a cz-agent wrapper (#!/bin/sh, exec cz-cli agent "$@") into the install dir (already on PATH), so it works in any shell and in scripts. cz-cli update re-runs install.sh, recreating it on upgrade.
Replace cz-cli agent <run/llm/session/export> command invocations with the cz-agent shortcut in the cz-cli skill and its profile-setup reference; prose mentioning "the cz-cli agent" is left unchanged.
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Adds a built-in opencode tool that forwards job performance analysis to the central-region ClickZetta MCP server (Streamable-HTTP), with service-URL->central-region MCP endpoint derivation, PAT/username-password auth headers, and unit tests. Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
…r, curl via install script) Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
MCP server renamed this tool in commit 4895be6. cz-cli was still calling the old name, causing tool-not-found errors. Co-Authored-By: cz-cli <noreply@clickzetta.com>
…splits JSON - Add JOB_TIMEOUT error classification with actionable hints - Add job cancel and job list subcommands - Refactor parseParamValueList to handle escaped quotes from shell/agent - Extract mergeTaskParamValueList for clearer param override logic - Update skill docs and tests Co-Authored-By: cz-cli <noreply@clickzetta.com>
…rmance-tool fix: rename job performance tool to match MCP server
…job-commands fix(task): recover --output-tables and add job cancel/list
…/collectType - save-config/save-schedule: read existing params and pass to saveTaskConfig to prevent backend from resetting params with auto-parsed defaults (bizdate) - save-cron: same fix - create-setup --cron: pass paramValueList to saveTaskConfig - Fix paramType: always use 'manual' for user-provided params (was 'system') - Fix collectType: use 1 to match Studio UI (was 0) Co-Authored-By: cz-cli <noreply@clickzetta.com>
fix(task): preserve params in save-config/save-cron
Add explicit trigger conditions and skip rules to avoid intercepting host project's own SQL/query toolchain. Co-Authored-By: cz-cli <noreply@clickzetta.com>
…escription docs: refine cz-cli skill trigger description
parseJdbcUrl dropped the port from the host, so a JDBC string like jdbc:clickzetta://inst.10.155.2.214:8033/ws produced service=10.155.2.214 and toServiceUrl built http://10.155.2.214/... (port 80) -> ConnectionRefused. - carry parsed.port into service (host:port), matching toServiceUrl's contract - accept all three vcluster aliases (vcluster/virtualCluster/virtualcluster) - map use_http=true to protocol=http Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
profile create had its own parseJdbcUrl copy that dropped the port and only recognized the virtualCluster alias, so `profile create --jdbc jdbc:clickzetta://inst.host:8033/ws?vcluster=DEFAULT` saved service without :8033 -> requests hit port 80 -> ConnectionRefused, even after the bug-37 fix (which only touched the connection/ parser). Delete the duplicate and reuse the already-fixed parseJdbcUrl from connection/jdbc.ts, so port preservation, all three vcluster aliases, and use_http=true work in profile create too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…xtended-properties fix(table): describe shows full table properties including __metadata
Allow a profile to authenticate via an X-ClickZetta-Token cookie header, alongside the existing PAT and username/password methods. - profile create: accept `--header Cookie=...X-ClickZetta-Token=...` as a third auth method; skip connection verification on this path since the token is supplied directly. - profile detail: mask the Cookie header value (in addition to pat and password) via maskProfileSecrets. - getExecContext: try the Cookie header first (getCookieToken), parsing the JWT payload for userId/accountId/exp and instanceId, and falling back to the portal serviceInstanceList API to resolve the instance id by name when it is absent; fall back to PAT or username/password when no cookie token is present. - Add profile-cookie-auth tests covering create-time masking, validation, and the getExecContext cookie path.
When the JDBC URL contains /api/ in the path (e.g. instance.host/api/workspace), the /api segment is now correctly appended to the service field instead of being mistakenly treated as the workspace name. Co-Authored-By: cz-cli <noreply@clickzetta.com>
Co-Authored-By: cz-cli <noreply@clickzetta.com>
…efix fix: handle /api/ path prefix in JDBC URL parsing
- Add `task integration setup/show/edit`: build the Studio integration JSON deterministically for single-table / multi-table / whole-db offline sync (single auto-creates sink table + field mapping; whole-db emits dbMirror/dynamicFlag/nameRule). - Single-table supports --write-mode (OVERWRITE|APPEND|UPSERT), --partitions and --param-value-list, mirroring studio-agent integration_task_pre_action / edit_integration_sync. - Remove the agent-driven offline quartet (create-offline-sync, offline-sync-schema, save-offline-sync, create-batch-sync) in favor of the deterministic path; keep realtime CDC / Kafka commands. - Fix instanceName (was sc.workspaceName -> sc.instanceName) in kept sync cmds; redirect deploy/execute hints to task integration. - Register task integration in inner-agent prompt (cz-cli-inner.txt) and document the offline workflow in the cz-cli skill.
Co-Authored-By: cz-cli <noreply@clickzetta.com>
…release-dep fix(release): pin ghostty-web git dependency
…Server support (clickzetta#14) * refactor: remove redundant code — extract shared helpers, deduplicate logic CDC prereq check: - Extract checkCdcPrereqs() as exported function in datasource.ts - Delete duplicate 95-line implementation from task.ts - check-cdc command now delegates to shared helper Duplicate task name check: - Extract checkDuplicateTaskName() helper in task.ts - Replace 6 identical 5-line inline blocks with single helper call Other cleanup: - Remove redundant targetDsType=1 reassignment in create/save-realtime-sync (was already initialized to 1) - Fix splitPkExclude: remove TINYINT/SMALLINT which were never in splitPkTypes - Replace 6 inline new Date().toISOString()... with formatIsoStartOfDay(undefined) Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com> * fix: integration test fixes, bug fixes, and help text improvements Bug fixes: - formatIsoStartOfDay(undefined) caused infinite recursion — now returns today's date - flow instances --instance conflicted with global --instance — renamed to --flow-instance - flow submit published:false — poll condition updated to accept deployStatus=3 (deployed with pending changes) - save-cron DDL guard: detect CREATE/DROP/ALTER TABLE in task content and block scheduling - cron-preview next_runs always empty (API returns []) — local fallback via cronNextRuns() - schedule-info on draft task gave cryptic error — now returns friendly TASK_NOT_DEPLOYED message - task search treated positional name as subcommand — changed to positional [name] - save-schedule hanging — caused by formatIsoStartOfDay infinite recursion (same root cause) - delete-folder non-empty error now lists contained tasks by name - task create validates name characters before calling API Help text improvements: - task flow: describe composite task concept (DAG of nodes) and typical workflow - All flow subcommands: add context, usage order, and cross-references - node-save --content/--file: add missing describe fields - task create --type: fix trailing quote, add FLOW explanation - task create --folder: mark as demandOption, improve description - All <task> positionals (24 instances): add "Task name or ID" describe - create-offline-sync/save-offline-sync: remove agent/MCP jargon - offline-sync-schema: remove "Agent uses output" phrasing - create-realtime-sync/create-batch-sync: remove internal type names - task start --startup-mode: translate Chinese to English - task start --config: translate Chinese values to English - task start --engine-type/--blacklist-strategy: replace circular descriptions - save-schedule --retry-unit/--timeout-unit: clarify m=minutes s=seconds - task list/list-folders --page/--page-size: add describe fields - flow node-save-config --cron/--vc/--schema: add describe fields - Confirmations unified to "Requires -y to proceed." Chinese aiMessage → English: - task execute: translate completion message - task list: translate pagination hint - task list-folders: translate pagination hint - task search: remove Chinese truncation suffix New feature (cron-adapter.ts): - cronNextRuns(): local Quartz cron calculator supporting named days/months, ranges, steps — used as fallback when API returns empty next_runs Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com> * fix: flow bind verify persistence after async write The bind API returns success before the edge is durably written to DB. Add post-bind verification: re-query DAG up to 3 times (800ms apart). If edge is missing, retry the bind call automatically. If still not confirmed after 3 attempts, return a warning instead of false success. Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com> * fix: Oracle not supported for CDC sync; add dsType whitelist to create/save-realtime-sync checkCdcPrereqs: Oracle (dsType=25) now returns ok:false with a clear "not supported" message instead of silently passing through. create-realtime-sync / save-realtime-sync: validate source dsType against the supported CDC set before proceeding. Supported sources: MySQL/TiDB/MariaDB (5,17,18,19,39), PostgreSQL/Greenplum (7,22,40,46,48), SQL Server (8), DM (26). Unsupported types (including Oracle) are rejected with UNSUPPORTED_DATASOURCE (exit code 2). Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com> * fix: Oracle/SQL Server datasource support — check-cdc, type validation, collectType datasource check-cdc: - SQL Server: replace sys.databases/sys.dm_server_services queries (inaccessible via getSampleData API) with INFORMATION_SCHEMA.TABLES filtered client-side for TABLE_SCHEMA='cdc'. If cdc schema tables exist, CDC is enabled and Agent is inferred running. - Oracle (dsType=25): now returns ok:false with explicit "not supported" message instead of silently passing through. create-realtime-sync / save-realtime-sync: - Added CDC_SUPPORTED_TYPES whitelist. Supported: MySQL/TiDB/MariaDB, PostgreSQL/Greenplum, SQL Server, DM. Oracle and others rejected with UNSUPPORTED_DATASOURCE (exit code 2). save-offline-sync: - INTEGRATION tasks now use collectType:1 (was 0 from saveTaskContent). collectType:0 caused Studio UI to treat the task as a script task, leaving field mapping switches in wrong initial state. - SQL Server: added FlinkX unsupported type check before saving. Blocked types: sql_variant, image, binary, varbinary, timestamp. text/ntext are supported (map to STRING). Error includes fix hint. offline-sync-schema: - SQL Server note updated: lists unsupported types and clarifies text/ntext map to STRING. Co-Authored-By: Claude Sonnet 4 (1M context) <noreply@anthropic.com> * fix: task list/downstream/folders display bugs, cron-preview local fallback - convertTaskFields: pass through already-snake-case fields (task_id, task_name, task_type, task_edit_state, path, location, etc.) - list-folders: map dataFolderName → name, parentFolderId → parent_id - downstream: map API fields (scheduleTaskId → task_id, cycleTaskName → task_name, cycleTaskType → task_type) - cron-preview: fall back to local cronNextRuns() when API returns empty Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: resolveNodeId — accept names via --node-id, warn on duplicates, list available nodes - resolveNodeArg: new helper that accepts number, numeric string, or node name, resolving names through resolveNodeId(). Fixes the case where --node-id 'extract' was silently dropped by yargs type:'number'. - --node-id type changed from 'number' to 'string' in all 4 flow commands (node-detail, node-save, node-save-config, remove-node). - resolveNodeId: filter all matches instead of find() first match. When multiple nodes share a name, warns on stderr with --node-id hint. When no match, lists all available node names + IDs. - All call sites simplified from if/else resolveNodeId patterns to a single resolveNodeArg() call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: schedule-info — normalize camelCase API fields to snake_case - Add SCHEDULE_INFO_FIELDS mapping with 40+ field conversions - convertScheduleInfoFields(): transform getDetail API response - Result: cron_expression, task_name, vc_code, etc. now match the convention used by task content/save-config commands Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: improve flow param, schedule-info help text clarity - flow node-save --param: note that re-save replaces ALL params - flow node-save --flow-param: explain ref=2 inheritance from parent - schedule-info: note flow tasks use 'task flow instances' instead - flow submit: mention param persistence and flow run usage - flow run --param: clarify override targets manual params (ref=0), flow-shared params (ref=2) receive flow execution value Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: add workflow guidance and cross-references to help texts High-impact improvements to reduce call retries and improve task efficiency: task create: document create→save-content→save-config→deploy workflow task flow: document full workflow: create FLOW→create-node→node-save→ node-save-config→bind→submit task deploy: note prerequisites (must have content + config) task undeploy: clarify relation to delete (must undeploy before delete) task delete: clarify draft vs published procedure task start/stop: cross-reference each other and 'task status' task list: explain state codes (10=draft, 20=published, 100=offline) task save-cron: document 7-field cron format with example datasource list: cross-reference 'datasource test' for connectivity check datasource test: explain return format and recommend before sync task creation Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: improve create-setup help — explain one-step value, add cron examples, clarify params - Title: explain it combines create+save-content+save-cron+save-config - Cross-reference 'create-realtime-sync' for CDC tasks - --type: list concrete values (SQL/PYTHON/SHELL/JDBC/FLOW) - --folder: tell user how to find IDs ('task folder-tree') - --content/--file: explain mutual exclusivity, file workflow for multi-line - --cron: full 7-field format with two examples (daily 09:30, every 5 min) - --vc: suggest using global --vcluster flag - --params: explain literal vs system param auto-detection Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: improve create-setup help + fix TS type errors - create-setup: explain one-step value, add cron format examples, clarify --content/--file/--folder/--params/--vc descriptions - Fix 5 fileDescription TS2322 type errors (unknown → string | undefined) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: fix create-setup --type description — remove FLOW (UI-only, not supported) UI_ONLY_TYPES: FLOW=500, INTEGRATION=1, REALTIME=14, DT=16, STREAMING=17, FULL_INCREMENTAL=280, MULTI_REALTIME=281, MULTI_DI=291 — none support one-step create-setup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test: add e2e regression tests for PR clickzetta#14 (display fixes, CDC, help) 29 tests covering: - task list: verify task_id/task_name/task_type/task_edit_state populated - task list-folders: verify name field not null - cron-preview: local fallback returns non-empty next_runs - datasource check-cdc: MySQL (3 checks), PG (wal check), Oracle (cdc_support=false), SQL Server (cdc+agent), Kafka (ready=true) - create-realtime-sync dsType whitelist: Kafka → UNSUPPORTED_DATASOURCE, Oracle → error - task status: edit_state in {draft, published, offline} - task content: task_id/task_name/schedule_config/studio_url all present - task search: task_id/task_name/path populated - task folder-tree: id/name defined - task stats: tasks.total + run_instances - task downstream: task_id/task_name mapped from API fields - schedule-info: snake_case field mapping verified - flow dag: returns array for FLOW tasks - help texts: workflow/prerequisites/state codes/cron examples in 10 commands Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: cron-preview — correct API field name + default time window generateInstanceTimeList expects "cron" (not "cronExpress") and requires scheduleStartTime + scheduleEndTime. The SDK was sending cronExpress without the time window, causing the API to return empty next_runs. Changed: - Field name: cronExpress → cron - Always send scheduleStartTime (default 00:00) and scheduleEndTime (default 23:59) instead of conditionally omitting them Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 (1M context) <noreply@anthropic.com>
…y guard (clickzetta#36) * fix: add missing --description option to task create-setup create-setup handler already uses argv.description when saving the task, but the yargs option was never declared — invisible in --help and inconsistent with 'task create' which documents --description. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * fix: schedule-info friendly error + REALTIME deploy guard (issues 2 & 4) Issue 2 — schedule-info external call exception: - FLOW tasks (fileType=500): detected before API call, return friendly note pointing to "task flow instances" - SQL/other tasks deployed without cron: API throws IDE-SYSTEM_EXCEPTION, now caught and returns friendly "no active schedule entry" message instead of raw TASK_ERROR Issue 4 — bare REALTIME task deploy fails with "文件参数不匹配": - fileType=14 (REALTIME) with no content configured now returns NO_SYNC_CONFIG error with clear guidance to use "create-stream-sync" - Configured REALTIME tasks (via create-stream-sync) still deploy normally Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * test: add regression tests for schedule-info errors + REALTIME deploy guard New tests (describe 15 + 16): describe "schedule-info friendly errors": - deployed task without cron → exitCode=0 + friendly note (was: TASK_ERROR) - FLOW task → exitCode=0 + "use task flow instances" note (was: TASK_ERROR) - deployed task with cron → still returns full schedule data (no regression) describe "REALTIME deploy guard": - bare REALTIME task → NO_SYNC_CONFIG at CLI layer (not backend 文件参数不匹配) - create-stream-sync configured task → deploys successfully (no regression) Also fix json() helper to skip leading Warning: lines in output. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> * fix: replace magic length<10 with explicit empty-content check The length < 10 threshold was checking whether INTEGRATION/REALTIME fileContent is an empty/placeholder value. Replace with explicit check for empty string, "null", "[]", "{}". Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4 <noreply@anthropic.com>
…lag passthrough Make the CLI self-correcting and machine-friendly for AI agents and scripts, and let the interactive /sql prompt command accept flags. CLI error handling and output (packages/cz-cli): - Add "did you mean" suggestions for mistyped top-level commands, subcommands, and flags, using a length-normalized Damerau-Levenshtein matcher (suggest.ts), surfaced in a structured error.did_you_mean field plus the human/ai_message channels. - Run the profile/LLM gate as post-validation yargs middleware so syntax errors (unknown command/option, missing argument) surface before NO_PROFILE instead of being masked by it. - Force English yargs locale so built-in messages no longer localize to the shell LANG, keeping message/ai_message stable for agents. - Split the commandGroup fail handler so a mistyped flag is matched against flag names (not subcommand names), and route its output through renderOutput so --format/--field are honored like the top-level path. - Reset inherited global --format choices for agent session list/status so --help no longer advertises unsupported formats. - Honor --format/--field in sql --batch mode instead of always raw JSON. - Emit a structured result envelope from update when machine-bound (explicit --format or non-TTY), keeping interactive output human-only. - Add next-step ai_message guidance to async commands that return an id (job status/cancel, runs stop/rerun, task flow run, analytics-agent session create) so agents know how to poll or continue. - Add suggest and robustness test suites; wire them into test:unit/test:all. Interactive TUI (packages/opencode): - Support flag passthrough in the /sql prompt command.
…bcommand errors Review fixes on top of the agent-robustness work: - command-group: resolve --format/--field from the invocation args (stashed on the yargs instance by createCli) instead of process.argv. On the same-process execute() path, process.argv belongs to the host (TUI/MCP), so usage errors in subcommand groups previously ignored the caller's --format/--field. Adds a same-process regression test that fails against the old behavior. - job status: when a job is still RUNNING, point agents at the synchronous `job result` (which blocks until completion) and clarify that status is a point-in-time snapshot, instead of instructing them to hand-roll a status poll loop. - task downstream: fix ai_message referencing the non-existent `cz-cli task upstream`; the command for a task's upstream dependencies is `cz-cli task deps`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The --instance option on `task flow instances` collided with a profile field. Rename it to --run_id to avoid the conflict. Co-authored-by: hang.su <hang.su@clickzetta.com> Co-authored-by: cz-cli <noreply@clickzetta.com>
* fix: support weekly selected-day task schedules Add Studio task contract enums, first-class CONDITION task handling, and weekly selected-day schedule payload support for standalone tasks and flow nodes. Co-Authored-By: cz-cli <noreply@clickzetta.com> * feat: add workspace parameter commands * [to #CZECO-322] feat: support flow node input/output parameter chains - SDK saveFlowNodeContent: expose inputParamValueList/outputParamValueList (previously hardcoded null) via SaveFlowNodeContentParams - task flow node-save: add --output-param (declares $[output] producer) and --input-param key=upstreamNodeName (resolves upstream node name to dependencyId via flow DAG, builds ref=0 $[output] consumer entry) - add flow-params SDK tests covering both param chains Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat: support merge task workflow Add MERGE task contracts, save-merge command, deploy guard, SDK payload fields, specs, tests, and agent docs. Co-Authored-By: cz-cli <noreply@clickzetta.com> --------- Co-authored-by: lin.zhang <lin.zhang@clickzetta.com> Co-authored-by: cz-cli <noreply@clickzetta.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: lin.zhang <lin.zhang@clickzetta.com> Co-authored-by: cz-cli <noreply@clickzetta.com>
- 新增metric命令组支持metric的增删改查、启用停用和验证 - 新增answer-builder命令组支持answer-builder的增删改查、启用停用和验证 - 新增domain joins子命令组支持join关系发现、结果查询和应用 - 实现parseJoinFlag函数解析join关系字符串格式 - 添加parseStringList函数支持JSON数组或逗号分隔字符串解析 - 补充domain joins功能的单元测试覆盖 - 更新e2e测试用例包含新增命令的profile门控验证
profile list previously defaulted to raw JSON, which is hard to read interactively. When --format is not explicitly provided, default to the table format for human readability. Explicit --format (json/pretty/etc.) and scripted/programmatic execute() callers are unaffected. Co-Authored-By: cz-cli <noreply@clickzetta.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cz-cli profile list之前默认输出原始 JSON,交互式使用时可读性差。--format时,profile list现在默认使用table格式,便于人工阅读。--format(json/pretty/csv 等)以及脚本化/编程execute()调用行为不变。实现上复用了 CLI 已有的隐藏标志
argv.format_explicit(记录用户是否显式传了--format),仅在未显式指定时回退到table,因此不影响管道/脚本消费者。Changes
packages/cz-cli/src/commands/profile.ts:profile listhandler 在未显式指定格式时默认table(一行改动)。openspec/specs/profile-management/spec.md:新增场景「未显式指定格式时默认表格展示」。packages/cz-cli/test/profile-list-default-format.test.ts:新增测试,通过真实 CLI 入口验证「默认 table」与「显式 --format json」两种行为。packages/cz-cli/test/e2e-command-surface.ts:LOCAL_COMMANDS 用例的profile list断言显式带上--format json,保持意图稳定。Test plan
bun test test/profile-list-default-format.test.ts— 2 passbun test/e2e-command-surface.ts— 8 passbun test/e2e.ts— profile list / 各输出格式全绿🤖 Generated with Claude Code