lark-remote 0.1.2 → 0.1.3
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.en.md +2 -5
- package/README.md +1 -4
- package/dist/bridge/index.js +9 -1
- package/dist/card/card-budget.js +1 -2
- package/dist/card/run-renderer.js +1 -0
- package/dist/card/run-state.d.ts +4 -0
- package/dist/config/codex-config.d.ts +3 -5
- package/dist/config/codex-config.js +7 -7
- package/dist/config/dir.d.ts +1 -0
- package/dist/config/dir.js +4 -0
- package/dist/config/index.d.ts +0 -10
- package/dist/config/index.js +0 -11
- package/dist/connector/index.js +28 -0
- package/dist/index.js +71 -20
- package/dist/router/config/codex.js +8 -12
- package/dist/router/index.d.ts +14 -1
- package/dist/router/index.js +276 -36
- package/dist/router/utils.d.ts +3 -0
- package/dist/router/utils.js +15 -3
- package/dist/runner/claude/runner.d.ts +0 -1
- package/dist/runner/claude/runner.js +1 -1
- package/dist/runner/codex/runner.d.ts +0 -2
- package/dist/runner/codex/runner.js +1 -1
- package/dist/runner/common/spawning-runner.d.ts +0 -1
- package/dist/runner/common/spawning-runner.js +2 -4
- package/dist/runner/kimi/runner.d.ts +0 -1
- package/dist/runner/kimi/runner.js +1 -1
- package/dist/runner/opencode/runner.d.ts +0 -2
- package/dist/runner/opencode/runner.js +1 -1
- package/dist/runner/pi/runner.d.ts +0 -1
- package/dist/runner/pi/runner.js +1 -1
- package/dist/runner/probe.d.ts +45 -0
- package/dist/runner/probe.js +87 -0
- package/dist/runner/types.d.ts +3 -0
- package/dist/session/claude/sessions.d.ts +1 -1
- package/dist/session/claude/sessions.js +77 -31
- package/dist/session/codex/rollout-reader.js +9 -0
- package/dist/session/kimi/sessions.d.ts +3 -1
- package/dist/session/kimi/sessions.js +9 -3
- package/dist/session/opencode/sessions.d.ts +0 -2
- package/dist/session/opencode/sessions.js +1 -1
- package/dist/startup-contact.d.ts +4 -2
- package/dist/startup-contact.js +7 -4
- package/package.json +39 -4
package/dist/startup-contact.js
CHANGED
|
@@ -21,7 +21,7 @@ export class StartupContactStore {
|
|
|
21
21
|
return contact.chatId || contact.userId ? contact : undefined;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
export function formatStartupHello(now = new Date(), pid = process.pid) {
|
|
24
|
+
export function formatStartupHello(now = new Date(), pid = process.pid, dev = false) {
|
|
25
25
|
const startedAt = new Intl.DateTimeFormat('zh-CN', {
|
|
26
26
|
year: 'numeric',
|
|
27
27
|
month: '2-digit',
|
|
@@ -31,9 +31,10 @@ export function formatStartupHello(now = new Date(), pid = process.pid) {
|
|
|
31
31
|
second: '2-digit',
|
|
32
32
|
hour12: false,
|
|
33
33
|
}).format(now);
|
|
34
|
-
|
|
34
|
+
const modeTag = dev ? ' 🔧 dev' : '';
|
|
35
|
+
return `lark-remote${modeTag} 已启动\n启动时间:${startedAt}\n进程号:${pid}`;
|
|
35
36
|
}
|
|
36
|
-
export async function sendStartupHello(connector, store) {
|
|
37
|
+
export async function sendStartupHello(connector, store, opts) {
|
|
37
38
|
const contact = store.getContact();
|
|
38
39
|
const recipient = contact?.chatId ?? contact?.userId;
|
|
39
40
|
if (!recipient) {
|
|
@@ -41,7 +42,9 @@ export async function sendStartupHello(connector, store) {
|
|
|
41
42
|
return;
|
|
42
43
|
}
|
|
43
44
|
try {
|
|
44
|
-
await connector.sendWithRetry(recipient, {
|
|
45
|
+
await connector.sendWithRetry(recipient, {
|
|
46
|
+
text: formatStartupHello(undefined, undefined, opts?.dev),
|
|
47
|
+
});
|
|
45
48
|
getLogger().info('[startup] hello message sent');
|
|
46
49
|
}
|
|
47
50
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lark-remote",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Feishu (Lark) private-chat bridge to local coding agents — Claude Code / Codex / opencode / pi / kimi, with live-streaming CardKit 2.0 cards",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"!dist/**/*.js.map",
|
|
19
19
|
"!dist/**/*.d.ts.map",
|
|
20
20
|
"!dist/config/codex-bundled-test-helpers.*",
|
|
21
|
-
"!dist/test-helpers.*",
|
|
22
21
|
"README.md",
|
|
23
22
|
"README.en.md",
|
|
24
23
|
"LICENSE",
|
|
25
24
|
"CHANGELOG.md"
|
|
26
25
|
],
|
|
27
26
|
"scripts": {
|
|
27
|
+
"prepare": "husky",
|
|
28
28
|
"dev": "bun src/index.ts",
|
|
29
29
|
"build": "rm -rf dist && tsc && chmod +x dist/index.js dist/cli.js",
|
|
30
30
|
"typecheck": "tsc --noEmit",
|
|
@@ -34,12 +34,35 @@
|
|
|
34
34
|
"format:check": "prettier --check 'src/**/*.ts' 'tests/**/*.ts'",
|
|
35
35
|
"test": "vitest run",
|
|
36
36
|
"test:watch": "vitest",
|
|
37
|
+
"test:bridge": "vitest run --project infra-bridge",
|
|
38
|
+
"test:card": "vitest run --project infra-card",
|
|
39
|
+
"test:connector": "vitest run --project infra-connector",
|
|
40
|
+
"test:router": "vitest run --project infra-router",
|
|
41
|
+
"test:session": "vitest run --project infra-session",
|
|
42
|
+
"test:runner": "vitest run --project infra-runner",
|
|
43
|
+
"test:config": "vitest run --project infra-config",
|
|
44
|
+
"test:order": "vitest run --project infra-order",
|
|
45
|
+
"test:misc": "vitest run --project infra-misc",
|
|
46
|
+
"test:claude": "vitest run --project agent-claude",
|
|
47
|
+
"test:codex": "vitest run --project agent-codex",
|
|
48
|
+
"test:opencode": "vitest run --project agent-opencode",
|
|
49
|
+
"test:pi": "vitest run --project agent-pi",
|
|
50
|
+
"test:kimi": "vitest run --project agent-kimi",
|
|
51
|
+
"test:bash": "vitest run --project agent-bash",
|
|
52
|
+
"test:infra": "vitest run --project 'infra-*'",
|
|
53
|
+
"test:agents": "vitest run --project 'agent-*'",
|
|
54
|
+
"test:codex-full": "vitest run --project agent-codex --project infra-runner --project infra-session",
|
|
55
|
+
"test:claude-full": "vitest run --project agent-claude --project infra-runner --project infra-session",
|
|
56
|
+
"test:opencode-full": "vitest run --project agent-opencode --project infra-runner --project infra-session",
|
|
57
|
+
"test:pi-full": "vitest run --project agent-pi --project infra-runner --project infra-session",
|
|
58
|
+
"test:kimi-full": "vitest run --project agent-kimi --project infra-runner --project infra-session",
|
|
59
|
+
"test:live": "vitest run --project live",
|
|
37
60
|
"prepublishOnly": "tsc --noEmit && vitest run && rm -rf dist && tsc && chmod +x dist/index.js dist/cli.js",
|
|
38
61
|
"prepack": "node -e \"const fs=require('fs');if(!fs.existsSync('dist/cli.js')){console.error('dist/ missing — run bun run build first');process.exit(1)}\""
|
|
39
62
|
},
|
|
40
63
|
"publishConfig": {
|
|
41
64
|
"access": "public",
|
|
42
|
-
"provenance":
|
|
65
|
+
"provenance": true
|
|
43
66
|
},
|
|
44
67
|
"keywords": [
|
|
45
68
|
"feishu",
|
|
@@ -85,9 +108,21 @@
|
|
|
85
108
|
"eslint": "^10.7.0",
|
|
86
109
|
"eslint-config-prettier": "^10.1.8",
|
|
87
110
|
"eslint-plugin-prettier": "^5.5.6",
|
|
111
|
+
"husky": "^9.1.7",
|
|
112
|
+
"lint-staged": "^17.3.0",
|
|
88
113
|
"prettier": "^3.9.5",
|
|
89
114
|
"typescript": "^6.0.0",
|
|
90
115
|
"typescript-eslint": "^8.63.0",
|
|
91
|
-
"vitest": "^4.1.
|
|
116
|
+
"vitest": "^4.1.10"
|
|
117
|
+
},
|
|
118
|
+
"lint-staged": {
|
|
119
|
+
"src/**/*.ts": [
|
|
120
|
+
"eslint --fix",
|
|
121
|
+
"prettier --write"
|
|
122
|
+
],
|
|
123
|
+
"tests/**/*.ts": [
|
|
124
|
+
"eslint --fix",
|
|
125
|
+
"prettier --write"
|
|
126
|
+
]
|
|
92
127
|
}
|
|
93
128
|
}
|