i-repo 2.9.0 → 2.10.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/dist/plugins/describe.d.ts +6 -0
- package/package.json +6 -2
- package/plugins/README.md +34 -30
- package/plugins/i-repo-archive +499 -54
- package/plugins/i-repo-bigquery +480 -0
- package/plugins/i-repo-elastic +23 -6
- package/plugins/i-repo-mongo +66 -18
- package/plugins/i-repo-parquet +11 -5
- package/plugins/i-repo-sqlite +5 -1
- package/plugins/install.ps1 +6 -2
- package/plugins/lib/spawn.js +80 -0
- package/scripts/check-adc.mjs +29 -1
- package/scripts/check-spawn.mjs +89 -0
- package/scripts/healthcheck-smoke.mjs +84 -0
- package/scripts/irepo-mcp.mjs +103 -8
- package/spec/gemba-adc/catalog.schema.json +3 -2
- package/spec/gemba-adc/dataset.schema.json +2 -2
- package/spec/gemba-adc/spec.md +5 -3
|
@@ -111,6 +111,12 @@ export interface PluginDescribe {
|
|
|
111
111
|
capabilities?: string[];
|
|
112
112
|
/** useCases = 用途タグ (要望書v3)。capabilities と同じく開いた語彙・型のみ検証 */
|
|
113
113
|
useCases?: string[];
|
|
114
|
+
/**
|
|
115
|
+
* capabilityDetails = capabilities タグごとの詳細宣言 (開いたマップ)。
|
|
116
|
+
* 例 { "native-query": { dialect, input, readOnly, audience[] } }。
|
|
117
|
+
* verify は検証しない (capabilities は string[] のタグ列、詳細はここ)。ホストが読んで GUI 露出等を決める。
|
|
118
|
+
*/
|
|
119
|
+
capabilityDetails?: Record<string, unknown>;
|
|
114
120
|
}
|
|
115
121
|
/**
|
|
116
122
|
* plugin describe の表示行を組む。plugin/path は CLI が解決した事実 —
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "i-repo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
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,36 @@
|
|
|
1
|
-
# plugins/ —
|
|
1
|
+
# plugins/ — gemba-adc 参照プラグインの正本
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
> 構成: 各プラグインは単一ファイル実行体 + 共有ライブラリ
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
>
|
|
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/` のインストール済み実体であり、リポジトリ正本ではない。
|
|
13
14
|
|
|
14
15
|
## 同梱プラグイン
|
|
15
16
|
|
|
16
|
-
| ファイル | 役割 |
|
|
17
|
-
|
|
18
|
-
| `i-repo-
|
|
19
|
-
| `i-repo-mongo` | MongoDBへupsert |
|
|
20
|
-
| `i-repo-
|
|
21
|
-
| `i-repo-
|
|
22
|
-
| `i-repo-
|
|
17
|
+
| ファイル | 役割 | query(gemba-read) | native-query |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `i-repo-sqlite` | ローカル SQLite へ蓄積 | ✅(読み返し参照実装) | sql-select |
|
|
20
|
+
| `i-repo-mongo` | MongoDB へ upsert | ✅ | mongo-aggregation |
|
|
21
|
+
| `i-repo-elastic` | Elasticsearch へ index | ✅ + 全文検索 | es-query-dsl |
|
|
22
|
+
| `i-repo-parquet` | Parquet / Apache Iceberg へ書き出し | ✅ | — |
|
|
23
|
+
| `i-repo-bigquery` | BigQuery へ書き出し(roles: sink/read/analyze) | ✅ | — |
|
|
24
|
+
| `i-repo-archive` | 帳票スナップショット+クラウド配信/取り戻し | — | — |
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
`i-repo-archive` の配信先(`store`): `dir-bundle`(create)/ `s3-bundle`(push-s3)/ `gcs-bundle`(push-gcs)/
|
|
27
|
+
`azure-bundle`(push-azure)/ `local-bundle`(push-local)。クラウドからの取り戻し(read-only)に `pull-s3` /
|
|
28
|
+
`pull-gcs` / `pull-azure`、配信先フォルダ名は `--prefix` トークン(`{batchId}`/`{date}`/`{datetime}`/`{flow}`)で
|
|
29
|
+
自由化。`--cleanup`(破壊的)で配信後のローカル stage を掃除。Azure secret は `--sas` / `--connection-string`
|
|
30
|
+
(envVar 解決)。
|
|
26
31
|
|
|
27
|
-
>
|
|
28
|
-
>
|
|
29
|
-
> このリポジトリ版を正本とし、インストーラで配置します。本来はCLIチームへの取り込み依頼が筋
|
|
30
|
-
> ([../docs/CLI要望書/](../docs/CLI要望書/) 参照)。
|
|
32
|
+
> 詳しい契約と読み返しの使い方は [`../docs/DATA-ACCESS.md`](../docs/DATA-ACCESS.md) と
|
|
33
|
+
> [`../docs/PLUGINS.md`](../docs/PLUGINS.md) を参照。`examples/node/i-repo-sqlite-query/` に実行可能な参照例。
|
|
31
34
|
|
|
32
35
|
## インストール
|
|
33
36
|
|
|
@@ -35,7 +38,7 @@ single source of truth とし、インストーラで各環境へ配置します
|
|
|
35
38
|
# macOS / Linux
|
|
36
39
|
./plugins/install.sh
|
|
37
40
|
|
|
38
|
-
# Windows (PowerShell) — Node製プラグインの .cmd shim も生成する
|
|
41
|
+
# Windows (PowerShell) — Node 製プラグインの .cmd shim も生成する
|
|
39
42
|
powershell -ExecutionPolicy Bypass -File .\plugins\install.ps1
|
|
40
43
|
```
|
|
41
44
|
|
|
@@ -43,16 +46,17 @@ powershell -ExecutionPolicy Bypass -File .\plugins\install.ps1
|
|
|
43
46
|
|
|
44
47
|
確認:
|
|
45
48
|
```bash
|
|
46
|
-
i-repo plugin list
|
|
47
|
-
i-repo plugin verify
|
|
49
|
+
i-repo plugin list # sqlite/mongo/elastic/parquet/bigquery/archive が見えること
|
|
50
|
+
i-repo plugin verify sqlite # 契約適合チェック
|
|
48
51
|
```
|
|
49
52
|
|
|
50
53
|
## 前提
|
|
51
54
|
|
|
52
|
-
- **Node.js**:
|
|
53
|
-
- sqlite は `node:sqlite`(Node 22.5+)、elastic は内蔵 fetch
|
|
54
|
-
-
|
|
55
|
+
- **Node.js**: 全プラグインが Node 製。
|
|
56
|
+
- sqlite は `node:sqlite`(Node 22.5+)、elastic は内蔵 fetch を使用。
|
|
57
|
+
- 各プラグインの追加依存(任意・使う配信先/ストアに応じて):
|
|
55
58
|
- mongo → `mongosh`
|
|
56
|
-
- parquet → `duckdb`(Iceberg書き込みは DuckDB 1.4+)
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
+
- parquet → `duckdb`(Iceberg 書き込みは DuckDB 1.4+)
|
|
60
|
+
- bigquery → `bq`(Google Cloud SDK)
|
|
61
|
+
- archive のクラウド配信/取り戻し → `aws`(S3)/ `gcloud`・`rsync`(GCS)/ `az`(Azure Blob)
|
|
62
|
+
- 充足状況は `i-repo <plugin> --plugin-healthcheck`、または消費アプリ(GEMBA OS)の「プラグイン」タブで確認できる。
|