Skip to content

feat: add CLI contract workflows#128

Merged
Microck merged 2 commits into
mainfrom
feat/cli-contract-workflows
Jun 28, 2026
Merged

feat: add CLI contract workflows#128
Microck merged 2 commits into
mainfrom
feat/cli-contract-workflows

Conversation

@Microck

@Microck Microck commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add assistant prompt contracts with built-in and file-backed validation plus one repair attempt
  • Add opt-in JSON error envelopes via --error-format json and KAGI_ERROR_FORMAT=json
  • Resolve kagi search --lens exact enabled lens names to the current numeric position
  • Add kagi extract --filter JSONL mode for stdin URL pipelines
  • Update quinn-proto in Cargo.lock to satisfy the current RustSec audit gate

Verification

@mintlify

mintlify Bot commented Jun 28, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
kagi-cli 🟡 Building Jun 28, 2026, 9:48 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@Microck Microck marked this pull request as ready for review June 28, 2026 22:05
@Microck Microck force-pushed the feat/cli-contract-workflows branch from 2b852a5 to a11313f Compare June 28, 2026 22:05
@Microck Microck enabled auto-merge June 28, 2026 22:07
@Microck Microck disabled auto-merge June 28, 2026 22:09
@Microck Microck enabled auto-merge (squash) June 28, 2026 22:09
@Microck Microck merged commit 63cea1d into main Jun 28, 2026
6 checks passed
@Microck Microck deleted the feat/cli-contract-workflows branch June 28, 2026 22:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b852a54c2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/main.rs

match kind {
"string" => Ok(AssistantContractFieldKind::String),
"number" | "integer" => Ok(AssistantContractFieldKind::Number),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce integer fields separately

When a contract file declares a required property as "type":"integer", this maps it to Number, and the later Number validation accepts any JSON number. A reply such as { "count": 1.5 } will therefore pass a contract that asked for an integer, so automations relying on contract-file validation can consume invalid shapes. Keep a distinct integer kind or validate integer types with integer-specific checks.

Useful? React with 👍 / 👎.

Comment thread src/main.rs
let lenses = execute_lens_list(&token).await?;
let matches = lenses
.iter()
.filter(|candidate| candidate.name == lens)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Filter disabled lenses before resolving names

For kagi search --lens <name>, non-numeric names are supposed to resolve to an enabled lens, but this match set includes disabled lenses. If an account has an enabled Rust Docs lens and a disabled Rust Docs lens, the command hits the ambiguous branch before the enabled check and cannot search the enabled lens by name. Filter to enabled candidates before the uniqueness check, or only treat multiple enabled matches as ambiguous.

Useful? React with 👍 / 👎.

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