@interactive-inc/claude-funnel 0.4.0 → 0.7.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/README.md +105 -5
- package/lib/api.ts +54 -0
- package/lib/funnel.ts +120 -33
- package/lib/modules/channels/funnel-channels.ts +5 -0
- package/lib/modules/claude/funnel-claude.ts +21 -9
- package/lib/modules/connectors/funnel-connector-stores.ts +32 -4
- package/lib/modules/connectors/funnel-connectors.ts +6 -0
- package/lib/modules/connectors/funnel-discord-listener.ts +9 -3
- package/lib/modules/connectors/funnel-discord-store.ts +5 -1
- package/lib/modules/connectors/funnel-gh-listener.ts +14 -5
- package/lib/modules/connectors/funnel-gh-store.ts +18 -1
- package/lib/modules/connectors/funnel-schedule-listener.ts +8 -2
- package/lib/modules/connectors/funnel-schedule-store.ts +21 -4
- package/lib/modules/connectors/funnel-slack-listener.ts +8 -2
- package/lib/modules/connectors/funnel-slack-store.ts +5 -1
- package/lib/modules/connectors/migrate-legacy-connectors.ts +5 -1
- package/lib/modules/fs/funnel-file-system.ts +5 -0
- package/lib/modules/gateway/daemon.ts +10 -143
- package/lib/modules/gateway/funnel-gateway-server.ts +241 -0
- package/lib/modules/gateway/funnel-gateway.ts +49 -20
- package/lib/modules/gateway/kill-competing-slack-gateways.ts +5 -1
- package/lib/modules/id/funnel-id-generator.ts +7 -0
- package/lib/modules/id/memory-funnel-id-generator.ts +20 -0
- package/lib/modules/id/node-funnel-id-generator.ts +7 -0
- package/lib/modules/logger/funnel-logger.ts +11 -0
- package/lib/modules/logger/memory-funnel-logger.ts +28 -0
- package/lib/modules/logger/node-funnel-logger.ts +49 -0
- package/lib/modules/logger/noop-funnel-logger.ts +9 -0
- package/lib/modules/mcp/funnel-mcp.ts +5 -0
- package/lib/modules/process/funnel-process-runner.ts +5 -0
- package/lib/modules/profiles/funnel-profiles.ts +5 -0
- package/lib/modules/repos/funnel-repositories.ts +5 -0
- package/lib/modules/schedule/funnel-schedule.ts +5 -0
- package/lib/modules/time/funnel-clock.ts +15 -0
- package/lib/modules/time/memory-funnel-clock.ts +26 -0
- package/lib/modules/time/node-funnel-clock.ts +7 -0
- package/lib/routes/gateway/logs.ts +3 -1
- package/package.json +16 -5
- package/lib/modules/logger.ts +0 -26
|
@@ -3,10 +3,12 @@ import { join } from "node:path"
|
|
|
3
3
|
import { stringify } from "yaml"
|
|
4
4
|
import { z } from "zod"
|
|
5
5
|
import { factory } from "@/factory"
|
|
6
|
-
import {
|
|
6
|
+
import { NodeFunnelLogger } from "@/modules/logger/node-funnel-logger"
|
|
7
7
|
import { zValidator } from "@/modules/router/validator"
|
|
8
8
|
import { help } from "@/routes/gateway/logs.help"
|
|
9
9
|
|
|
10
|
+
const logger = new NodeFunnelLogger()
|
|
11
|
+
|
|
10
12
|
const tryParseJson = (s: string): unknown => {
|
|
11
13
|
try {
|
|
12
14
|
return JSON.parse(s)
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interactive-inc/claude-funnel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Hub CLI that routes external events (Slack / GitHub / Discord) to Claude Code agents through subscription channels over MCP.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Interactive Inc.",
|
|
7
|
-
"homepage": "https://github.com/interactive-inc/claude-funnel#readme",
|
|
7
|
+
"homepage": "https://github.com/interactive-inc/open-claude-funnel#readme",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/interactive-inc/claude-funnel.git"
|
|
10
|
+
"url": "git+https://github.com/interactive-inc/open-claude-funnel.git"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/interactive-inc/claude-funnel/issues"
|
|
13
|
+
"url": "https://github.com/interactive-inc/open-claude-funnel/issues"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"claude",
|
|
@@ -23,7 +23,18 @@
|
|
|
23
23
|
"bun"
|
|
24
24
|
],
|
|
25
25
|
"type": "module",
|
|
26
|
-
"
|
|
26
|
+
"main": "./lib/api.ts",
|
|
27
|
+
"module": "./lib/api.ts",
|
|
28
|
+
"types": "./lib/api.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./lib/api.ts",
|
|
32
|
+
"bun": "./lib/api.ts",
|
|
33
|
+
"default": "./lib/api.ts"
|
|
34
|
+
},
|
|
35
|
+
"./cli": "./lib/index.ts",
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
27
38
|
"bin": {
|
|
28
39
|
"fnl": "./lib/index.ts",
|
|
29
40
|
"funnel": "./lib/index.ts"
|
package/lib/modules/logger.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { appendFileSync, mkdirSync } from "node:fs"
|
|
2
|
-
import { dirname, join } from "node:path"
|
|
3
|
-
|
|
4
|
-
const LOG_FILE = join("/tmp/funnel", "funnel.log")
|
|
5
|
-
|
|
6
|
-
type Level = "info" | "warn" | "error"
|
|
7
|
-
|
|
8
|
-
const write = (level: Level, message: string, meta?: Record<string, unknown>) => {
|
|
9
|
-
mkdirSync(dirname(LOG_FILE), { recursive: true })
|
|
10
|
-
|
|
11
|
-
const entry = {
|
|
12
|
-
time: new Date().toISOString(),
|
|
13
|
-
level,
|
|
14
|
-
message,
|
|
15
|
-
...(meta ? { meta } : {}),
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
appendFileSync(LOG_FILE, `${JSON.stringify(entry)}\n`)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const logger = {
|
|
22
|
-
info: (message: string, meta?: Record<string, unknown>) => write("info", message, meta),
|
|
23
|
-
warn: (message: string, meta?: Record<string, unknown>) => write("warn", message, meta),
|
|
24
|
-
error: (message: string, meta?: Record<string, unknown>) => write("error", message, meta),
|
|
25
|
-
file: LOG_FILE,
|
|
26
|
-
}
|