12 Commits
Author SHA1 Message Date
pnokerandClaude Code b588204110 feat(cli): adopt the remaining guardian tests and auth store fix
adopts the remaining uncommitted work from the parallel session:
five new guardian test files (client-errors, device-import-template,
entity-id-guard, jwt-guard, option-hygiene) that lock in the error
taxonomy, id encoding, and cli option hygiene; an attachment file
cleaner in the agentic service; attachment controller and service
tests; a salt-type fix in the auth store; ci workflow typecheck step;
and the cli test report. 818 tests total across 37 files.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-06 21:26:15 +08:00
pnokerandClaude Code 12bde52e0c feat(cli): add alert point-profile and device import-template commands
alert point-profile fetches a single point's alert profile across its
peer cohort (the only dashboard alert endpoint not already covered by
the addgetanalysis factory). device import-template downloads the xlsx
bulk-import template shaped for a given driver and profile, writing
the binary to disk via the direct fetch seam since the json-decoding
client pipeline cannot carry spreadsheet bytes. also aligns the
package license with the repository (agpl-3.0-or-later).

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-06 13:41:19 +08:00
pnokerandClaude Code 97c5bd58e7 feat(cli): adopt the core hardening and guardian test suite
the core modules gain a proper error taxonomy (CliError with
kind/code/exitCode, classifyError for zod and commander bridges,
suppressFailureEnvelope for streaming commands), atomic config writes
(temp+fsync+rename with win32 acl tightening, lockfiles with stale
pid recovery, quarantine for corrupted files instead of silent reset),
a hardened transport client (rfc 7807 detail extraction, identity
mismatch warnings, epoch-guarded token renewal), credential store
security fixes (execfile without shell on all platforms, powershell
encodedcommand on win32, secret-tool stdin on linux), and 60 new
guardian tests covering every fix. 488 tests total.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-06 13:22:16 +08:00
pnokerandClaude Code 3699d3dda1 build(cli): bump three dev dependency versions
prettier 3.9.9, @typescript-eslint/parser 8.71.0, globals 17.13.0.
skipped the majors (typescript 7, eslint 10, chalk 6, commander 15,
js-yaml 5, ora 9, @types/node 26) for a dedicated pass.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-05 17:04:28 +08:00
pnoker 2b9c188b85 fix(cli): enforce the output contract, exit codes, and timeouts
All transport goes through one shared http seam with a 30s abort timeout and network or auth error mapping, add replaces create as the verb with a one-release alias, login and logout stop swallowing auth and network failures, the global --profile and --format options are actually honored together with the persisted output_format setting, config set validates numeric input instead of poisoning the schema and a corrupt config now warns, backs itself up and never silently reverts to defaults, paging and url parameters are validated and encoded, and the dead crypto helper is gone. The contract is pinned by a dedicated test suite.
2026-10-03 13:44:00 +08:00
pnoker 1847829415 chore(dc3-cli): enforce eslint jsdoc gate and backfill api comments
Mirror the backend checkstyle javadoc gate in eslint: exported
functions, interfaces, types and classes must carry jsdoc with
matching @param/@returns tags and descriptions. Backfill the full
cli surface so the gate starts green.
2026-09-19 17:40:39 +08:00
pnoker 5ca2cf67c4 chore(repo): complete license header coverage for typescript sources
java headers are generated and enforced by spotless licenseHeader from
the root copyright file; the typescript surfaces had no such control -
dc3-cli carried zero headers across 32 files and dc3-web was missing
one hand-written file:

- add scripts/add-license-header.mjs (shared by both packages) that
  reads the same root copyright and emits block comments for ts and
  html-comment headers for vue, with a --check mode for ci
- wire headers / headers:check npm scripts; unplugin-generated ambient
  d.ts files are exempt (the generator owns their file head)
- backfill all 32 dc3-cli sources and operation.ts / type.d.ts

verified: headers:check green on both packages, cli 67/67 tests +
build + lint, web 687/687 tests + lint + format
2026-09-19 15:37:47 +08:00
pnoker 33741fb333 build(deps): bump dc3-cli js-yaml to 4.3.2
supersedes dependabot #217 (stale develop base); js-yaml 4.3.2 carries
the security fix, verified locally with the full cli suite
2026-09-18 22:20:16 +08:00
pnoker 9482cf0be4 build(deps): bump dc3-cli vitest to 4.1.11
supersedes dependabot #216/#213 which targeted the stale develop
branch; verified locally: 67/67 tests, build and lint clean
2026-09-18 22:19:06 +08:00
pnoker 66aab58f20 build: standardize repository tooling and quality gates 2026-09-02 20:51:10 +08:00
pnoker 35e625de9a docs(design): plan console cli onboarding; restore dc3-cli package name
Revert the premature McpServer.vue change (implementation was not
requested). Record the onboarding UX contract in
token-unification-mcp-first-cli.md §4.1 instead, and rename the CLI
package back to dc3-cli per review.
2026-09-01 22:03:14 +08:00
pnoker b828719d38 feat(cli): adopt dc3-cli into the repository as a standalone module
Move the previously untracked TypeScript CLI into iot-dc3 as an
independently managed module next to dc3-web:

- pnpm workspace (pnpm@11.24.0) with esbuild build approval,
  package renamed to iot-dc3-cli, npm lockfile dropped
- add eslint flat config; lint now runs green after removing
  unused imports/vars and adding switch-case breaks in config.ts
- document CLI conventions and commands in AGENTS.md
2026-09-01 22:03:13 +08:00