本文へ移動
cccskills
無料GitHub で公開

ipc-driver-development

Use when designing, implementing, reviewing, or debugging onetcli IPC database drivers, driver.json manifests, extension-protocol wire methods, schema metadata, DDL builders, import/export, packaging, or cross-language driver runtimes.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navopスター 1,936(GitHub 1,936 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(6)

  • SKILL.md9.6 KB
  • agents/openai.yaml213 B
  • references/language-patterns.md4.2 KB
  • references/manifest.md14.0 KB
  • references/protocol.md12.5 KB
  • references/testing-packaging.md4.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

IPC Driver Development

Overview

Build onetcli IPC database drivers from the host contract outward: driver.json declares the surface, extension-protocol defines wire JSON, and the driver routes each declared method to real database behavior.

Keep the driver language-agnostic unless the repository already provides a stronger local pattern. Rust can use extension-driver; other languages must still implement the same JSON-RPC methods, response shapes, and packaging contract.

Workflow

  1. Inspect the existing driver and host contract before editing. In this repo, use extensions/ipc/duckdb as the concrete reference; in the host repo, use crates/extension-protocol and crates/db/src/ipc.
  2. Design or update driver.json first. Declare only methods that the binary actually handles, set dialect/capabilities so the host knows which generic features are safe to expose, and set top-level category metadata when the driver belongs in a non-default UI group.
  3. Split routing into control-plane and connection-scoped methods. Keep init, conn/test, conn/open, and pure DDL builders independent of a live connection when possible; route query, metadata, transaction, import/export, and cursor methods through the opened connection.
  4. Implement metadata from database catalog truth, not UI labels, connection names, or hardcoded defaults. If the database has a current catalog/database function, query it and use that value consistently.
  5. Prefer explicit NotSupported / method-not-found behavior for missing methods. This lets the host use fallback behavior such as dialect.compatible_database_type.
  6. For special connection lifecycle needs, declare them in driver.json.connection before changing host manager logic. The host should consume plugin lifecycle metadata, not hardcode driver ids.
  7. For UI grouping such as domestic databases, declare top-level manifest metadata such as "category": "domestic_database". Do not make the host classify external drivers by concrete ids like dm, kingbase, or gbase8s; unclassified external drivers must remain in the normal database group.
  8. Add protocol-level tests before broad packaging work. Verify request JSON, response JSON, error codes, cancellation, fallback behavior, and lifecycle policy parsing.
  9. Build and package with the repository scripts, then verify the archive contains driver.json, binary, locales, and expected entry command.

Reference Routing

Load only the relevant reference file:

TaskRead
Wire method names, params, response shapes, routingreferences/protocol.md
driver.json, capabilities, dialect SQL contract, connection lifecycle, compatible fallbackreferences/manifest.md
Rust, Node.js, Python, or other runtime implementation choicesreferences/language-patterns.md
Tests, build, package, release checksreferences/testing-packaging.md

Required Guardrails

  • Treat driver.json.methods as a contract. If a method is listed, the binary must route it or intentionally return a typed unsupported error.
  • Treat schema/object_view as the custom object-panel table contract. Declare it only when the driver can return {title, columns, rows} for the views it owns; return typed not-supported/method-not-found for unsupported views so the host can fall back to legacy metadata rendering.
  • Treat table/column comment support as three independent checkpoints, required in every IPC driver that declares relational-table schema, not just the one currently under test: schema/objects returns schema + comment, schema/columns returns comment, and DDL builders emit COMMENT ON TABLE / COMMENT ON COLUMN for both create and alter (including newly-added columns, with rollback, IS '' clearing, and single-quote escaping). Missing any one silently breaks designer comment echo or produces "No changes detected" when only a comment changes. Do not hardcode comment behavior in the host for one driver — the host only consumes driver output. See references/protocol.md § Table / Column Comment Support and § Every-Driver Audit.
  • Treat driver.json.dialect as the host-side SQL generation contract. It controls external plugin identifier quoting, pagination, boolean literals, explain fallback, and compatible DDL fallback.
  • Treat driver.json.connection as the host-side physical connection lifecycle contract. Single-file/single-connection engines must announce that policy there; do not special-case names such as duckdb in ConnectionManager or IPC connection code.
  • Treat top-level driver.json.category as the host-side external driver grouping contract. Use "domestic_database" for国产数据库 drivers that should appear in the 国产数据库 sidebar group; omit it for ordinary external database drivers.
  • Keep catalog/schema semantics database-specific. For default catalogs, treat host compatibility aliases such as main only as filters; do not return fixed strings when the database exposes current catalog metadata.
  • Include system schemas such as information_schema and pg_catalog when the target database exposes them and the host asks for schema objects. Filter only for a clear product reason.
  • DDL builder methods produce SQL text only. They must not execute DDL.
  • ddl/build* may be called as connectionless pure methods or routed through a connection with an injected conn_id; accept both when the builder does not require live state.
  • Use structured JSON serializers/parsers for params and results. Avoid stringly-typed JSON construction except in narrow tests.
  • For compatible syntax fallback, set dialect.compatible_database_type to an existing host DatabaseType only when the driver's SQL semantics are close enough for host-generated DDL.

Common Mistakes

MistakeCorrection
Hardcoding a default catalog such as mainQuery current database/catalog metadata and map legacy aliases only during filtering.
Declaring future methods in driver.jsonAdd methods only after routing and tests exist, or the host will call broken paths.
Hardcoding single-file locking behavior in the host for one driver idDeclare connection.single_file, single_connection, close_on_release, and path_fields in the manifest so the plugin reports lifecycle policy.
Hardcoding 国产数据库 ids in the host UIDeclare "category": "domestic_database" at the top level of each matching external driver manifest.
Returning table names without schema/catalog contextPreserve database, schema, and object names as distinct fields.
schema/objects returns name/kind/comment but omits schemaHost can only fall back to table-name matching; table comment echo breaks or misattributes when tables share names across schemas. Return the real schema for every object.
schema/columns drops the comment columnColumn comments never echo in the table designer. Map the catalog's comment/remarks value into ColumnInfo.comment.
DDL builder generates comments only in create_table, or gates them behind a never-enabled capability switchEditing only a comment yields no change statements ("No changes detected", empty SQL preview). Add a comment diff to ddl/build_alter_table and enable the driver's comment capability.
DDL alter comments skip newly-added columnsA column added via to_spec (absent from from_spec) with a non-empty comment still needs a COMMENT ON COLUMN after ALTER TABLE ... ADD; skipping fromColumn == null loses the comment in preview.
Fixing comment/schema only in one driver or only in the hostThe same issue reappears for every other database. Implement all three checkpoints per-driver; host stringCell(cols, 3)/stringCell(cols, 5) compatibility is only a fallback, not the implementation.
Metadata SQL references a catalog column that is not in the query contextReferencing a column from a catalog table that the query never joins (e.g. tabid without the join) fails with 字段 (tabid) 不在查询的任何表中. Qualify every referenced column to an aliased FROM/JOIN target.
Extending protocol structs without updating explicit Rust struct literalsAfter adding a field such as ObjectInfo.schema, every Rust driver that constructs ObjectInfo { ... } explicitly must add it; the protocol update will otherwise break all Rust drivers at compile time.
Declaring schema/object_view without dispatch/testsAdd a connection-scoped route, init/manifest declaration, and tests for at least one rendered view shape.
Treating information_schema as a normal user schema bugInclude it when the backend supports it; qualify queries correctly.
Mixing SQL generation with executionKeep DDL builders pure and let the host decide preview/execution timing.
Assuming Rust-only implementationReuse Rust SDKs when in Rust; otherwise implement the same JSON-RPC contract in the chosen language.

Minimal Verification

Before claiming an IPC driver change is complete, run the narrowest checks that prove it:

cargo test -p <driver_package> -- --nocapture
node --test tests/scripts.test.mjs
cargo fmt --all --check

For package changes:

HOST_TRIPLE="$(rustc -vV | sed -n 's/^host: //p')"
cargo build --release -p <driver_package> --target "$HOST_TRIPLE"
bash scripts/package-driver.sh <driver-id> "$HOST_TRIPLE" artifacts <version>
bash scripts/verify-package.sh "artifacts/<driver-id>-driver-${HOST_TRIPLE}.tar.gz"

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Use when implementing, debugging, packaging, or host-enabling onetcli WASM connection importers such as DBeaver, Navicat, Navicat Lite, Termius, connection-import.wit components, wasm32-wasip2 importers, composite extension manifests, local importer visibility, or connection import UI freezes.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

gpui

無料

GPUI framework knowledge covering actions/keybindings, async/background tasks, context management (App/Window/Context<T>/AsyncApp), custom elements (low-level Element trait), entity state management, event system, focus handling, global state, layout/styling (flexbox/CSS-like), and testing. Use when working with any GPUI framework concept, building GPUI applications, or needing guidance on GPUI-specific APIs and patterns.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

How to use the gpui-component UI library in GPUI applications, and the normative Design and Coding Guides that govern it. Use when building UIs with gpui-component components (Button, Input, Select, Dialog, Tabs, Sidebar, List, Table, etc.), setting up the library, handling component state or theming, finding the right component for a UI need, and also when designing layouts, spacing, visual hierarchy, or interaction states, writing interface copy, or making application architecture, state-ownership, or public API decisions.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

navop

無料

Use terminal commands to discover and operate resources exposed by a running Navop desktop application through its host-authoritative Public MCP runtime.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

Use when working in the Navop repository on CHANGELOG.md, version-tag preparation, GitHub Releases, or R2 updater release notes, especially when bilingual Chinese and English notes must be generated, reviewed, synchronized, published, or verified.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

Create new GPUI components. Use when building components, writing UI elements, or creating new component implementations.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

feigeCode のスキルをすべて見る

このスキルの問題を報告する