From 7693a209708b6eca03813989ab44f60135edb7bc Mon Sep 17 00:00:00 2001 From: gavrielc Date: Mon, 27 Apr 2026 00:05:45 +0300 Subject: [PATCH] feat(setup): validate onecli api token starts with oc_ Matches the OneCLI CLI's own format expectation ("oc_... format" per `onecli auth login --help`) so a malformed token gets caught at setup time rather than at first vault call. Co-Authored-By: Claude Opus 4.7 (1M context) --- setup/lib/setup-config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup/lib/setup-config.ts b/setup/lib/setup-config.ts index 7e2873e..0a59731 100644 --- a/setup/lib/setup-config.ts +++ b/setup/lib/setup-config.ts @@ -82,7 +82,8 @@ export const CONFIG: Entry[] = [ group: 'OneCLI', type: 'string', secret: true, - placeholder: 'oat_…', + placeholder: 'oc_…', + validate: (v) => (v.startsWith('oc_') ? undefined : 'Must start with oc_'), }, { key: 'anthropicBaseUrl',