Skip to content

[codex] Unify Swift-backed Omi tool manifest - #8463

Merged
Git-on-my-level merged 9 commits into
mainfrom
codex/unify-swift-tool-manifest
Jun 27, 2026
Merged

Git-on-my-level merged 9 commits into
mainfrom
codex/unify-swift-tool-manifest

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jun 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds a canonical Omi tool manifest/projection layer for Swift-backed and adapter-owned tools.
  • Derives pi-mono OMI_TOOLS and stdio tools/list from the manifest instead of hand-maintained declarations.
  • Adds adapter availability snapshots/logs with exact advertised names/counts and explicit alias normalization.
  • Moves local /v1/local/tools metadata to a checked-in generated Swift projection with manifest-owned annotations.
  • Adds tests for adapter projections, onboarding-only tools, nested schemas, aliases, and pi-mono parity.

Notes

This follows the oracle recommendation for issue #8461: centralize metadata/projections first while preserving existing execution paths. No fake fill_cloud_connector_form tool was added.

A subagent review found one schema drift issue (check_permission_status was incorrectly made required-arg); fixed before PR.

Validation

  • cd desktop/macos/agent && npm run build
  • cd desktop/macos/agent && npx -y node@22 ./node_modules/vitest/vitest.mjs run tests/omi-tool-manifest.test.ts tests/control-tools.test.ts
  • cd desktop/macos/pi-mono-extension && npx -y node@22 --experimental-strip-types --test index.test.ts
  • cd desktop/macos && xcrun swift build -c debug --package-path Desktop

Review in cubic

@cubic-dev-ai cubic-dev-ai 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.

3 issues found across 8 files

Confidence score: 2/5

  • In desktop/macos/agent/src/runtime/omi-tool-manifest.ts, controlEntry currently drops jsonSchemaOptions from inputSchema, so tools like inspect_agent_artifacts and delegate_agent lose anyOf/allOf/if-then constraints; merging as-is can weaken validation and allow invalid inputs to pass — preserve and propagate jsonSchemaOptions in manifest generation before merging.
  • In desktop/macos/agent/src/omi-tools-stdio.ts, the new swift-tool fallback can execute manifest tools without checking stdio adapter availability, which means non-advertised tools may be invokable unexpectedly; this creates a clear behavior and exposure regression — enforce the same adapter/advertisement gating in the fallback path before merge.
  • In desktop/macos/agent/src/omi-tools-stdio.ts, snapshot-file write failures are uncaught during startup, so a filesystem error can crash the stdio server and block agent initialization; this is straightforward to de-risk — catch and handle write errors (log + continue or controlled fallback) before merging.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@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: 02d51f13c0

ℹ️ 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".

@Git-on-my-level

Copy link
Copy Markdown
Member Author

@codex review

@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: cbd2356631

ℹ️ 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".

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 4 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Review thread resolution summary

Resolved three trusted review threads. No new code changes pushed — all three were already addressed by earlier commits on this branch. Verification details below.

Thread 1 (P1) — Bundle the manifest with the pi-mono extension

Already addressed by commit cbd235663 ("Address tool manifest review feedback").

  • desktop/macos/run.sh:473 now copies omi-tool-manifest.ts into the app bundle's Contents/Resources/agent/src/runtime/
  • desktop/macos/scripts/prepare-agent-runtime.sh:185 asserts the file exists in pre-bundle validation
  • desktop/macos/agent/tests/codemagic-pi-mono-extension-ci.test.ts verifies all three manifest files (control-tool-manifest.js, control-tool-manifest.ts, omi-tool-manifest.ts) are copied

Verification: codemagic-pi-mono-extension-ci.test.ts — 3/3 passed.

Thread 2 (P2) — Require options for onboarding followups

Already addressed by commit f86e1c761 ("Address oracle manifest review feedback").

The ask_followup schema required array is now ["question", "options"] (was ["question"]), so the model cannot call it without quick-reply options.

Verification: omi-tool-manifest.test.ts — 8/8 passed (includes the ask_followup required-args assertion).

Thread 3 (P1) — request_permission schema allows notifications but Swift doesn't support it

Already addressed by commit a95c6ed3c ("Align permission request schema with Swift handler").

The notifications value was removed from the request_permission enum to match the actual Swift handler capabilities (executeRequestPermission in ChatToolExecutor.swift has no case "notifications").

Verification run

  • tests/omi-tool-manifest.test.ts — 8/8 passed
  • tests/codemagic-pi-mono-extension-ci.test.ts — 3/3 passed
  • tests/control-tools.test.ts — 41/41 passed
  • pi-mono-extension/index.test.ts — 99/99 passed
  • Swift parse of ChatToolExecutor.swift — clean

@Git-on-my-level
Git-on-my-level merged commit faf9c4f into main Jun 27, 2026
3 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/unify-swift-tool-manifest branch June 27, 2026 23:03
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