i-repo 2.9.1 → 2.10.1

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.9.1",
3
+ "version": "2.10.1",
4
4
  "description": "Modern CLI for ConMas i-Reporter - Built for humans and AI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,6 +18,8 @@
18
18
  "test": "vitest run",
19
19
  "test:watch": "vitest",
20
20
  "check:adc": "node scripts/check-adc.mjs",
21
+ "check:spawn": "node scripts/check-spawn.mjs",
22
+ "healthcheck:smoke": "node scripts/healthcheck-smoke.mjs",
21
23
  "gen:agents": "node scripts/gen-agents-md.mjs",
22
24
  "audit": "npm audit --omit=dev --audit-level=high",
23
25
  "prepublishOnly": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && npm run build"
@@ -29,7 +31,9 @@
29
31
  "plugins",
30
32
  "scripts/irepo-mcp.mjs",
31
33
  "scripts/gen-agents-md.mjs",
32
- "scripts/check-adc.mjs"
34
+ "scripts/check-adc.mjs",
35
+ "scripts/check-spawn.mjs",
36
+ "scripts/healthcheck-smoke.mjs"
33
37
  ],
34
38
  "keywords": [
35
39
  "ireporter",
package/plugins/README.md CHANGED
@@ -1,33 +1,41 @@
1
- # plugins/ — i-Repo GEMBA OS 同梱プラグイン
1
+ # plugins/ — gemba-adc 参照プラグインの正本
2
2
 
3
- i-Repo GEMBA OS(旧称 i-Repo Data Connector)が利用する i-repo CLI プラグインの**正本**です。
4
- 従来は `~/.i-repo/plugins/` にしか存在せず版管理外でしたが、ここをリポジトリ内の
5
- single source of truth とし、インストーラで各環境へ配置します。
3
+ `gemba-adc/1.0`(読み返し契約。仕様は [`../spec/gemba-adc/`](../spec/gemba-adc/))の**参照実装プラグインの正本**です。
4
+ i-repo CLI リポジトリ内の single source of truth とし、インストーラで各環境へ配置します。
5
+ i-Repo GEMBA OS をはじめとする消費者は、これらを npm 依存(`node_modules/i-repo/plugins/`)として取り込みます。
6
6
 
7
- > 構成: 各プラグインは単一ファイル実行体 + 共有ライブラリ `lib/gemba-read.js`
8
- > (読み返し `query` の共通エンジン: envelope / 時刻3形式パース / keysetカーソル。
9
- > ADC-1 仕様 `docs/仕様/` 参照)。インストーラが `lib/` ごと配布し、プラグインは
10
- > `./lib/gemba-read.js` を相対 require する(write 経路は lib 非依存)。
7
+ > 構成: 各プラグインは単一ファイル実行体 + 共有ライブラリ
8
+ > - `lib/gemba-read.js` … 読み返し `query` の共通エンジン(envelope / 時刻3形式パース / keyset カーソル。ADC-1 §3)。
9
+ > - `lib/spawn.js` … 外部 CLI(mongosh / duckdb / bq 等)を spawn する共通層(Windows の `.cmd` ラップ・孫プロセス kill・メタ文字拒否)。`mongo` / `parquet` / `bigquery` が使用。
10
+ >
11
+ > インストーラが `lib/` ごと配布し、プラグインは `./lib/...` を相対 require する(write 経路は lib 非依存)。
11
12
  > **プラグインを更新したら必ずインストーラを再実行すること** — アプリ/CLI が呼ぶのは
12
13
  > `~/.i-repo/plugins/` のインストール済み実体であり、リポジトリ正本ではない。
14
+ >
15
+ > **実体を変えたら必ず `--plugin-schema` の `version` を上げること。** 下流の消費者(i-Repo GEMBA OS 等)は
16
+ > この実体を**公開ミラーへ再配布**し、その更新検知を `version` + SHA256 で行う。版番据え置きのまま中身だけ
17
+ > 変えると、消費アプリが「更新あり」を検知できず旧版を配り続ける(過去に mongo で版番据え置きの実体差分、
18
+ > archive で再配布漏れによる版ズレが起きた)。npm 公開後、消費側は依存を上げてミラーを再同期する必要がある。
13
19
 
14
20
  ## 同梱プラグイン
15
21
 
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 へ書き出し | このプロジェクトで作成 |
22
+ | ファイル | 役割 | query(gemba-read) | native-query |
23
+ |---|---|---|---|
24
+ | `i-repo-sqlite` | ローカル SQLite へ蓄積 | ✅(読み返し参照実装) | sql-select |
25
+ | `i-repo-mongo` | MongoDB upsert | | mongo-aggregation |
26
+ | `i-repo-elastic` | Elasticsearch へ index | + 全文検索 | es-query-dsl |
27
+ | `i-repo-parquet` | Parquet / Apache Iceberg へ書き出し | | — |
28
+ | `i-repo-bigquery` | BigQuery へ書き出し(roles: sink/read/analyze) | | |
29
+ | `i-repo-archive` | 帳票スナップショット+クラウド配信/取り戻し | — | — |
23
30
 
24
- > `i-repo-s3` `i-repo-hello` は i-repo CLI 同梱のサンプルのため含めていません。
25
- > 使い方は [../docs/プラグイン使い方集/](../docs/プラグイン使い方集/) を参照。
31
+ `i-repo-archive` の配信先(`store`): `dir-bundle`(create)/ `s3-bundle`(push-s3)/ `gcs-bundle`(push-gcs)/
32
+ `azure-bundle`(push-azure)/ `local-bundle`(push-local)。クラウドからの取り戻し(read-only)に `pull-s3` /
33
+ `pull-gcs` / `pull-azure`、配信先フォルダ名は `--prefix` トークン(`{batchId}`/`{date}`/`{datetime}`/`{flow}`)で
34
+ 自由化。`--cleanup`(破壊的)で配信後のローカル stage を掃除。Azure secret は `--sas` / `--connection-string`
35
+ (envVar 解決)。
26
36
 
27
- > ⚠️ `i-repo-archive` はCLI公式プラグインに `--with-detail`(クラスター値・objectKeyの
28
- > manifest埋め込み)を加えたパッチ版です。CLI本体のアップデートで上書きされる可能性があるため、
29
- > このリポジトリ版を正本とし、インストーラで配置します。本来はCLIチームへの取り込み依頼が筋
30
- > ([../docs/CLI要望書/](../docs/CLI要望書/) 参照)。
37
+ > 詳しい契約と読み返しの使い方は [`../docs/DATA-ACCESS.md`](../docs/DATA-ACCESS.md)
38
+ > [`../docs/PLUGINS.md`](../docs/PLUGINS.md) を参照。`examples/node/i-repo-sqlite-query/` に実行可能な参照例。
31
39
 
32
40
  ## インストール
33
41
 
@@ -35,7 +43,7 @@ single source of truth とし、インストーラで各環境へ配置します
35
43
  # macOS / Linux
36
44
  ./plugins/install.sh
37
45
 
38
- # Windows (PowerShell) — Node製プラグインの .cmd shim も生成する
46
+ # Windows (PowerShell) — Node 製プラグインの .cmd shim も生成する
39
47
  powershell -ExecutionPolicy Bypass -File .\plugins\install.ps1
40
48
  ```
41
49
 
@@ -43,16 +51,17 @@ powershell -ExecutionPolicy Bypass -File .\plugins\install.ps1
43
51
 
44
52
  確認:
45
53
  ```bash
46
- i-repo plugin list # archive/mongo/sqlite/elastic/parquet が見えること
47
- i-repo plugin verify mongo # 契約適合チェック
54
+ i-repo plugin list # sqlite/mongo/elastic/parquet/bigquery/archive が見えること
55
+ i-repo plugin verify sqlite # 契約適合チェック
48
56
  ```
49
57
 
50
58
  ## 前提
51
59
 
52
- - **Node.js**: mongo/sqlite/elastic/parquet/archive Node 製。
53
- - sqlite は `node:sqlite`(Node 22.5+)、elastic は内蔵 fetch(Node 18+)を使用。
54
- - 各プラグインの追加依存(任意・使う配信先に応じて):
60
+ - **Node.js**: 全プラグインが Node 製。
61
+ - sqlite は `node:sqlite`(Node 22.5+)、elastic は内蔵 fetch を使用。
62
+ - 各プラグインの追加依存(任意・使う配信先/ストアに応じて):
55
63
  - mongo → `mongosh`
56
- - parquet → `duckdb`(Iceberg書き込みは DuckDB 1.4+)
57
- - archive push-s3 / s3 → `aws` CLI
58
- - 充足状況は Connector アプリの「プラグイン」タブ、または `i-repo <plugin> --plugin-healthcheck` で確認できる。
64
+ - parquet → `duckdb`(Iceberg 書き込みは DuckDB 1.4+)
65
+ - bigquery → `bq`(Google Cloud SDK)
66
+ - archive のクラウド配信/取り戻し `aws`(S3)/ `gcloud`・`rsync`(GCS)/ `az`(Azure Blob)
67
+ - 充足状況は `i-repo <plugin> --plugin-healthcheck`、または消費アプリ(GEMBA OS)の「プラグイン」タブで確認できる。