@interactive-inc/claude-funnel 0.37.0 → 0.39.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/README.md +7 -9
- package/dist/bin.js +300 -290
- package/dist/gateway/daemon.js +192 -192
- package/dist/index.d.ts +1855 -3399
- package/dist/index.js +393 -379
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -55,9 +55,7 @@ bun add -D @interactive-inc/claude-funnel
|
|
|
55
55
|
"channels": [
|
|
56
56
|
{
|
|
57
57
|
"name": "ops",
|
|
58
|
-
"connectors": [
|
|
59
|
-
{ "type": "slack", "name": "my-slack" }
|
|
60
|
-
]
|
|
58
|
+
"connectors": [{ "type": "slack", "name": "my-slack" }]
|
|
61
59
|
},
|
|
62
60
|
{
|
|
63
61
|
"name": "review"
|
|
@@ -351,20 +349,20 @@ funnel.channels.addConnector("inbox", {
|
|
|
351
349
|
`channels` / `profiles` / `gateway` / `listeners` / `mcp` / `claude` など全ファセットが同じインスタンスから辿れる。`gateway` はデーモンの起動・停止、`listeners` は動作中デーモンとの HTTP 会話、`claude` はエージェント起動を担う。
|
|
352
350
|
|
|
353
351
|
```ts
|
|
354
|
-
await funnel.gateway.start()
|
|
355
|
-
funnel.gateway.getStatus()
|
|
352
|
+
await funnel.gateway.start() // デーモンを別プロセスとして spawn
|
|
353
|
+
funnel.gateway.getStatus() // { running, pid, port }
|
|
356
354
|
|
|
357
355
|
await funnel.listeners.start("inbox", "my-slack")
|
|
358
356
|
await funnel.listeners.restart("inbox", "my-slack")
|
|
359
357
|
|
|
360
|
-
await funnel.claude.launch({ channel: "inbox" })
|
|
358
|
+
await funnel.claude.launch({ channel: "inbox" }) // claude を起動(.mcp.json も自動で書く)
|
|
361
359
|
```
|
|
362
360
|
|
|
363
361
|
デーモンを spawn せず、gateway をインプロセスで動かすこともできる(テストや埋め込み向け)。`onEvent` で全 broadcast イベントをインプロセスで観測できる。
|
|
364
362
|
|
|
365
363
|
```ts
|
|
366
364
|
const server = funnel.gatewayServer({ port: 9742 })
|
|
367
|
-
await server.start()
|
|
365
|
+
await server.start() // Bun.serve (HTTP + WS) + listener supervisor
|
|
368
366
|
const unsubscribe = server.onEvent(({ content, meta }) => {
|
|
369
367
|
console.log(meta?.connector, content)
|
|
370
368
|
})
|
|
@@ -379,8 +377,8 @@ unsubscribe()
|
|
|
379
377
|
`Funnel.inMemory()` は全 IO 境界(ディスク / プロセス / clock / UUID)を Memory 実装で配線済みの Funnel を返す。`props` の任意の部分集合で個々の seam を上書きできるので、実 FS や spawn に触れずにテストを書ける。
|
|
380
378
|
|
|
381
379
|
```ts
|
|
382
|
-
const funnel = Funnel.inMemory()
|
|
383
|
-
funnel.channels.add({ name: "inbox" })
|
|
380
|
+
const funnel = Funnel.inMemory() // 実ディスク / プロセス / clock / UUID に触れない
|
|
381
|
+
funnel.channels.add({ name: "inbox" }) // インメモリ store を変更する
|
|
384
382
|
```
|
|
385
383
|
|
|
386
384
|
`fnl` を支える Hono アプリ(`createCliApp` / `toRequest`)や、各コネクタの Zod スキーマ(`connectorConfigSchema`)も export している。詳細は型定義を参照。
|