Skip to content

feat(manifest): auth.verify names the call that checks a token; stricter URLs and fields - #3087

Merged
leemour merged 4 commits into
mainfrom
feat/cli-config-verify
Nov 17, 2026
Merged

leemour merged 4 commits into
mainfrom
feat/cli-config-verify

Conversation

@leemour

@leemour leemour commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Task

PR 5b of the source-manifest plan: a CLI built from wirecat.config.ts signs in with a real check of the token. The coordinator also asked for a fresh review of #3080 and of #3082's changes after its review; this PR applies what held up.

What

  • auth.verify: { operation, id, name? } for token and oauth2-pkce: the operation that answers whose the token is, and where its answer holds the account's id and name. cli-template's generated session start checks a token with it (Attio getV2Self, Notion's users/me).

  • recalledAccount is exported from @wirecat/cli-core/cli: the account a profile signed in to, as session start remembered it. cli-template's CRM wiring keys the store by it.

  • From the review:

    • spec.from, auth.revokeUrl and a relay redirect take an https URL with a host, without spaces, a user name or password, or a key or token in its query (these would be committed into the CLI's files);
    • hooks takes a .ts or .js module under ./, without ..;
    • the schema's output is typed against CliConfig (a typed local, not a bare cast), so the two cannot drift; parseCliConfig still returns CliConfig, as cli-template's kit expects (the parity job caught a first attempt that changed it);
    • an unknown field reads "not a field of wirecat.config", a missing one "missing";
    • the changelog says cli-core needs cli-base 0.112.0 or later (since 0.693.0).
  • Not taken: a CI check against the peer floor, and cli-template importing CLI_CATEGORIES (follow-ups).

  • From a fresh review of this PR: secret query names match whole words (?design=1, ?keyword= pass; ?accessToken= is refused); a #fragment is refused; verify.id/name must be dot paths; "missing" and "not a field" are chosen by the issue's shape, so scopes: [undefined] keeps valibot's words; ./.ts and .d.ts hooks are refused. Not changed: the typed local catches drift one way only (comment narrowed); recalledAccount joins the profile name into a path as rememberAccount already did; whether every caller checks profile names is not verified here (a follow-up).

Testing

  • src/manifest/index.test.ts: categories, crm with a source, verify, each refused URL, old and missing fields, hooks paths.
  • pnpm typecheck, lint, docs:check, check:dist, and the full suite: 12454 passed. The 2 failures, in src/services/messages-transcript-words.test.ts, pass alone (7/7).

🤖 Generated with Claude Code

leemour and others added 4 commits November 17, 2026 18:30
…ter URLs and fields

A fresh review of #3080 and of #3082's changes after its review: spec.from, auth.revokeUrl and a relay redirect
took an https URL with a user name, a key in its query, spaces or no host, all of which cli-template would commit;
hooks took any path under ./; parseCliConfig typed an unchecked source as CrmManifest; and the changelog never said
cli-core 0.693.0 needs cli-base 0.112.0. An unknown or missing field now reads as such.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…late's kit types against

A typed local, not a cast, keeps the schema and CliConfig in step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erify, key issues by shape

From a fresh review of #3087: ?design=1 was refused as a secret, #access_token=… was let through, an empty
verify id passed, and an undefined list item read "missing".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit e050489 into main Nov 17, 2026
45 checks passed
@leemour
leemour deleted the feat/cli-config-verify branch November 17, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant