i-repo 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i-repo",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
4
  "description": "Modern CLI for ConMas i-Reporter - Built for humans and AI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,12 +17,19 @@
17
17
  "generate:fixtures": "node scripts/generate-fixtures.mjs",
18
18
  "test": "vitest run",
19
19
  "test:watch": "vitest",
20
+ "check:adc": "node scripts/check-adc.mjs",
21
+ "gen:agents": "node scripts/gen-agents-md.mjs",
20
22
  "audit": "npm audit --omit=dev --audit-level=high",
21
23
  "prepublishOnly": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && npm run build"
22
24
  },
23
25
  "files": [
24
26
  "dist",
25
- "README.md"
27
+ "README.md",
28
+ "spec/gemba-adc",
29
+ "plugins",
30
+ "scripts/irepo-mcp.mjs",
31
+ "scripts/gen-agents-md.mjs",
32
+ "scripts/check-adc.mjs"
26
33
  ],
27
34
  "keywords": [
28
35
  "ireporter",
@@ -0,0 +1,58 @@
1
+ # plugins/ — i-Repo GEMBA OS 同梱プラグイン
2
+
3
+ i-Repo GEMBA OS(旧称 i-Repo Data Connector)が利用する i-repo CLI プラグインの**正本**です。
4
+ 従来は `~/.i-repo/plugins/` にしか存在せず版管理外でしたが、ここをリポジトリ内の
5
+ single source of truth とし、インストーラで各環境へ配置します。
6
+
7
+ > 構成: 各プラグインは単一ファイル実行体 + 共有ライブラリ `lib/gemba-read.js`
8
+ > (読み返し `query` の共通エンジン: envelope / 時刻3形式パース / keysetカーソル。
9
+ > ADC-1 仕様 `docs/仕様/` 参照)。インストーラが `lib/` ごと配布し、プラグインは
10
+ > `./lib/gemba-read.js` を相対 require する(write 経路は lib 非依存)。
11
+ > **プラグインを更新したら必ずインストーラを再実行すること** — アプリ/CLI が呼ぶのは
12
+ > `~/.i-repo/plugins/` のインストール済み実体であり、リポジトリ正本ではない。
13
+
14
+ ## 同梱プラグイン
15
+
16
+ | ファイル | 役割 | 由来 |
17
+ |---|---|---|
18
+ | `i-repo-archive` | 帳票スナップショット+S3 push。`--with-detail` 対応 | **i-repo CLI公式 archive のパッチ版**(`--with-detail` を追加) |
19
+ | `i-repo-mongo` | MongoDBへupsert | このプロジェクトで作成 |
20
+ | `i-repo-sqlite` | ローカルSQLiteへ蓄積 | このプロジェクトで作成 |
21
+ | `i-repo-elastic` | Elasticsearchへindex | このプロジェクトで作成 |
22
+ | `i-repo-parquet` | Parquet / Apache Iceberg へ書き出し | このプロジェクトで作成 |
23
+
24
+ > `i-repo-s3` と `i-repo-hello` は i-repo CLI 同梱のサンプルのため含めていません。
25
+ > 使い方は [../docs/プラグイン使い方集/](../docs/プラグイン使い方集/) を参照。
26
+
27
+ > ⚠️ `i-repo-archive` はCLI公式プラグインに `--with-detail`(クラスター値・objectKeyの
28
+ > manifest埋め込み)を加えたパッチ版です。CLI本体のアップデートで上書きされる可能性があるため、
29
+ > このリポジトリ版を正本とし、インストーラで配置します。本来はCLIチームへの取り込み依頼が筋
30
+ > ([../docs/CLI要望書/](../docs/CLI要望書/) 参照)。
31
+
32
+ ## インストール
33
+
34
+ ```bash
35
+ # macOS / Linux
36
+ ./plugins/install.sh
37
+
38
+ # Windows (PowerShell) — Node製プラグインの .cmd shim も生成する
39
+ powershell -ExecutionPolicy Bypass -File .\plugins\install.ps1
40
+ ```
41
+
42
+ 配置先は既定で `~/.i-repo/plugins/`(環境変数 `IREPO_PLUGIN_DIR` で変更可)。
43
+
44
+ 確認:
45
+ ```bash
46
+ i-repo plugin list # archive/mongo/sqlite/elastic/parquet が見えること
47
+ i-repo plugin verify mongo # 契約適合チェック
48
+ ```
49
+
50
+ ## 前提
51
+
52
+ - **Node.js**: mongo/sqlite/elastic/parquet/archive は Node 製。
53
+ - sqlite は `node:sqlite`(Node 22.5+)、elastic は内蔵 fetch(Node 18+)を使用。
54
+ - 各プラグインの追加依存(任意・使う配信先に応じて):
55
+ - mongo → `mongosh`
56
+ - parquet → `duckdb`(Iceberg書き込みは DuckDB 1.4+)
57
+ - archive push-s3 / s3 → `aws` CLI
58
+ - 充足状況は Connector アプリの「プラグイン」タブ、または `i-repo <plugin> --plugin-healthcheck` で確認できる。