Skip to content

feat(wiki): add ICP service discoverability using existing APIs - #148

Merged
humandebri merged 2 commits into
mainfrom
feat/wiki-service-discoverability
Oct 16, 2026
Merged

humandebri merged 2 commits into
mainfrom
feat/wiki-service-discoverability

Conversation

@humandebri

@humandebri humandebri commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Wiki の URL だけから ICP MCP が backend canister と API の利用方法を発見できるようにします。既存の検索・読み書き API と認可を再利用します。

Changes

  • Worker に /.well-known/ic-architecture と /.well-known/ii-derivation-origin を追加。環境の canister ID を検証し、HTML・キャッシュ・ドメインリダイレクトより先に応答します。
  • canister に匿名 query get_api_doc を追加。既存 MCP と説明を共有 JSON 化し、Candid と生成済み binding を更新しました。既存 MCP の descriptor hash は維持しています。
  • 共有 JSON 単独の変更でも canister/Rust/MCP の CI が動くよう変更検出を修正しました。iOS は無関係な CI 設定変更ではスキップし、iOS ソース・iOS ジョブ・ワークフロー共通設定の変更で実行します。
  • staging の受入検証、同一 II account の principal 照合、公開順序、manifest 撤去による停止手順を記載しました。

Verification

  • Rust canister: 128 tests passed.
  • MCP: Node 111、Vitest 326、workerd authentication 82 tests passed. 既存 descriptor 契約も一致。
  • Wiki browser: 242 tests と既存の scripted checks が成功。
  • MCP/browser の型チェック、Candid 生成整合性、共有 tooling/client tests、Rust fmt、browser lint が成功。
  • Wasm release build と公開 Candid metadata の一致、browser Vite build、browser/public・Private・staging MCP Worker の dry-run が成功。
  • CI の実際の Bash 判定を使い、共有 JSON 周りの 7 パターンと iOS 起動条件の 11 パターンが成功。修正前の判定漏れ・不要起動も再現済み。main への push は従来どおり全チェックを実行します。
  • 接続済み Kinic Wiki plugin の検索・本文取得は成功。ICP plugin は未公開の manifest を取得できず入口で停止したため、今回の経路の実 principal 一致・実更新は未検証です。

Impact

公開デプロイは含みません。manifest の公開は ICP MCP への参加と運営者規約の受諾に当たるため、staging の受入検証後に別途行います。

ICP MCP は canister を直接呼びます。既存 plugin の Worker にある検索語補助・JEV reranking・URL/検索 ID 解決・結果整形は通りません。canister の公開 API は既存 plugin のツール集合より広いままですが、canister の認可や権限は変更していません。OQL や新しい content 操作 API は追加していません。

Serve the environment-specific canister manifest and canonical II seed origin
before browser redirects, HTML rendering and caching. Add a public get_api_doc
query backed by the same behavioral guidance consumed by the existing MCP,
while preserving existing tool descriptors, content APIs and authorization.

Align Candid bindings and CI dependency detection, and document staging
acceptance, principal comparison, publication order and rollback. This does
not deploy the application or route direct canister calls through JEV.
Compare the iOS job and shared workflow configuration across PR revisions instead of running iOS tests for every edit to ci.yml. Keep mobile source and main-branch push checks enabled.
@humandebri
humandebri merged commit a586bb2 into main Oct 16, 2026
15 checks passed
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