vibe-coding-master 0.4.34 → 0.4.35
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 +16 -16
- package/dist/backend/api/gateway-routes.js +0 -3
- package/dist/backend/gateway/channels/lark-registration.js +3 -3
- package/dist/backend/gateway/gateway-service.js +17 -88
- package/dist/backend/gateway/gateway-settings-service.js +1 -6
- package/dist-frontend/assets/{index-B0hNcYoB.js → index-XvzXPPEy.js} +42 -42
- package/dist-frontend/index.html +1 -1
- package/docs/gateway-design.md +41 -39
- package/docs/product-design.md +20 -17
- package/package.json +1 -1
package/dist-frontend/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>VibeCodingMaster</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-XvzXPPEy.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-CuNHDIFw.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/docs/gateway-design.md
CHANGED
|
@@ -16,25 +16,26 @@ Supported gateway channels:
|
|
|
16
16
|
|
|
17
17
|
## Product Definition
|
|
18
18
|
|
|
19
|
-
VCM Gateway is a mobile conversation bridge between
|
|
20
|
-
|
|
21
|
-
collaboration feature.
|
|
19
|
+
VCM Gateway is a mobile conversation bridge between chat clients and one
|
|
20
|
+
desktop VCM instance. It is not a remote terminal.
|
|
22
21
|
|
|
23
22
|
Product rules:
|
|
24
23
|
|
|
25
24
|
- Weixin supports DM only.
|
|
26
25
|
- Lark accepts direct messages and group messages only when the bot is
|
|
27
26
|
mentioned.
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
27
|
+
- Weixin binds one mobile chat identity to one desktop VCM instance.
|
|
28
|
+
- Lark does not require pairing. Any chat that can DM the bot or @mention it can
|
|
29
|
+
control Gateway; the most recent active Lark chat becomes the PM reply target.
|
|
30
|
+
- The active chat is not project-specific and not task-specific.
|
|
31
|
+
- The active chat can manage every project and task available to that desktop
|
|
31
32
|
VCM instance.
|
|
32
33
|
- Gateway user messages talk only to the `project-manager` role.
|
|
33
34
|
- Gateway never sends directly to `architect`, `coder`, or `reviewer`.
|
|
34
35
|
- When the desktop UI has a current task selected, Gateway should adopt that
|
|
35
36
|
project/task context automatically instead of requiring `/tasks` and
|
|
36
37
|
`/use-task` first.
|
|
37
|
-
- After
|
|
38
|
+
- After channel setup succeeds, VCM keeps a channel connection even when Gateway is
|
|
38
39
|
disabled. Disabled Gateway accepts only `/help`, `/start`, `/status`,
|
|
39
40
|
`/projects`, and `/tasks`.
|
|
40
41
|
- VCM stores the latest PM reply for each task in local Gateway state. When
|
|
@@ -43,54 +44,54 @@ Product rules:
|
|
|
43
44
|
- Gateway does not change the desktop `Pause alert sound` preference. The
|
|
44
45
|
desktop pause dialog remains a fixed local UI signal, and Gateway is the
|
|
45
46
|
mobile notification path.
|
|
46
|
-
- Gateway may push PM replies to the
|
|
47
|
+
- Gateway may push PM replies to the active mobile chat whenever it is enabled,
|
|
47
48
|
even when the PM turn was started from the desktop UI rather than from the
|
|
48
49
|
mobile chat.
|
|
49
50
|
- When translation is enabled, Chinese input is translated to English before it
|
|
50
51
|
is sent to PM.
|
|
51
52
|
- The prompt sent to PM does not include the original Chinese text.
|
|
52
|
-
- There is no allowed-user list.
|
|
53
|
+
- There is no allowed-user list. Weixin is a bound identity model; Lark is a
|
|
54
|
+
trusted-chat bot model.
|
|
53
55
|
|
|
54
56
|
The short product sentence is:
|
|
55
57
|
|
|
56
58
|
```text
|
|
57
|
-
One
|
|
59
|
+
One active mobile chat controls one desktop VCM; the chat can select project/task context,
|
|
58
60
|
pull the connected base repository, create and initialize a task through the
|
|
59
61
|
saved launch template, send ordinary messages to the current task's PM, receive
|
|
60
62
|
translated PM replies, and close completed tasks while gateway is enabled; when
|
|
61
|
-
gateway is disabled, the
|
|
63
|
+
gateway is disabled, the active chat can still run `/start` and read-only status
|
|
62
64
|
commands.
|
|
63
65
|
```
|
|
64
66
|
|
|
65
67
|
## Binding Model
|
|
66
68
|
|
|
67
|
-
The
|
|
69
|
+
The control target is the desktop VCM instance.
|
|
68
70
|
|
|
69
71
|
```text
|
|
70
|
-
Weixin DM or Lark
|
|
72
|
+
Weixin DM or Lark chat
|
|
71
73
|
<-> desktop VCM instance
|
|
72
74
|
```
|
|
73
75
|
|
|
74
|
-
The gateway stores channel credentials and
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
generated by desktop VCM. VCM does not support manual Lark App ID/App Secret
|
|
79
|
-
configuration.
|
|
76
|
+
The gateway stores channel credentials and active chat metadata in app-local
|
|
77
|
+
state. Weixin stores the iLink bot account token from QR login. Lark QR setup
|
|
78
|
+
creates/configures the bot app and stores App ID/App Secret locally. VCM does
|
|
79
|
+
not support manual Lark App ID/App Secret configuration.
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
Weixin accepts messages from the bound identity. Lark accepts messages from any
|
|
82
|
+
chat that can reach the bot, and each accepted message updates the active Lark
|
|
83
|
+
chat used for PM reply push.
|
|
84
84
|
|
|
85
|
-
Changing phones or
|
|
85
|
+
Changing Weixin phones or accounts is a rebind operation. Lark active chat
|
|
86
|
+
changes automatically whenever another reachable Lark chat messages the bot:
|
|
86
87
|
|
|
87
88
|
```text
|
|
88
|
-
desktop settings -> disable gateway or reset binding -> QR login
|
|
89
|
+
desktop settings -> disable gateway or reset binding -> QR login again
|
|
89
90
|
```
|
|
90
91
|
|
|
91
92
|
## Mobile Context
|
|
92
93
|
|
|
93
|
-
Because
|
|
94
|
+
Because Gateway controls a desktop VCM instance, it needs a current mobile
|
|
94
95
|
context:
|
|
95
96
|
|
|
96
97
|
```text
|
|
@@ -136,7 +137,7 @@ MVP commands:
|
|
|
136
137
|
Plain text that does not start with `/` is treated as a PM message for the
|
|
137
138
|
current task only when Gateway is enabled.
|
|
138
139
|
|
|
139
|
-
When Gateway is disabled but still
|
|
140
|
+
When Gateway is disabled but the channel is still connected, only this subset is accepted:
|
|
140
141
|
|
|
141
142
|
```text
|
|
142
143
|
/help
|
|
@@ -146,7 +147,7 @@ When Gateway is disabled but still bound, only this subset is accepted:
|
|
|
146
147
|
/tasks
|
|
147
148
|
```
|
|
148
149
|
|
|
149
|
-
`/start` enables Gateway from the
|
|
150
|
+
`/start` enables Gateway from the active mobile chat. If there is a current task
|
|
150
151
|
and VCM has cached a latest PM reply for that task, `/start` includes that reply
|
|
151
152
|
in the command response. All plain text, task-changing commands,
|
|
152
153
|
project-changing commands, translation toggles, and repository pull commands
|
|
@@ -197,7 +198,7 @@ end to end from mobile.
|
|
|
197
198
|
```text
|
|
198
199
|
Tencent iLink getupdates
|
|
199
200
|
-> weixin-ilink channel
|
|
200
|
-
-> verify bound DM identity
|
|
201
|
+
-> verify bound DM identity for Weixin, or update active chat for Lark
|
|
201
202
|
-> dedupe message id
|
|
202
203
|
-> parse text / command
|
|
203
204
|
-> if command: execute gateway command and reply
|
|
@@ -483,7 +484,7 @@ Inbound message handling:
|
|
|
483
484
|
it, but MVP should treat non-text input as unsupported unless text is present.
|
|
484
485
|
- Use `message_id`, then `client_id`, then sender/time fallback for dedupe.
|
|
485
486
|
- Persist `get_updates_buf` after each successful poll response.
|
|
486
|
-
- Persist latest `context_token` per
|
|
487
|
+
- Persist latest `context_token` per active user/chat and reuse it for replies.
|
|
487
488
|
|
|
488
489
|
## Local State
|
|
489
490
|
|
|
@@ -578,8 +579,7 @@ Responsibilities:
|
|
|
578
579
|
- `weixin-ilink-channel`: implement the generic adapter with Weixin iLink QR
|
|
579
580
|
login, long polling, send text, and token expiration detection.
|
|
580
581
|
- `lark-channel`: implement the generic adapter with Lark WebSocket event
|
|
581
|
-
delivery, text send, chat id routing, mention filtering for groups
|
|
582
|
-
pairing-code binding.
|
|
582
|
+
delivery, text send, chat id routing, and mention filtering for groups.
|
|
583
583
|
- `lark-registration`: implement QR setup (`init`, `begin`, `poll`) against
|
|
584
584
|
Lark account registration, then save the returned App ID/App Secret locally.
|
|
585
585
|
- `gateway-command-parser`: parse `/help`, `/status`, `/projects`,
|
|
@@ -590,7 +590,7 @@ Responsibilities:
|
|
|
590
590
|
submission, PM Stop reply push, and error backoff. It must depend on the
|
|
591
591
|
channel registry and generic adapter types, not Weixin/iLink-specific types.
|
|
592
592
|
- `gateway-routes`: desktop UI settings, QR login start/status, Lark QR setup,
|
|
593
|
-
|
|
593
|
+
enable/disable, rebind, and gateway status.
|
|
594
594
|
|
|
595
595
|
Service dependencies:
|
|
596
596
|
|
|
@@ -618,11 +618,11 @@ Add a Gateway section to the sidebar settings area or a dedicated modal:
|
|
|
618
618
|
```text
|
|
619
619
|
Gateway: off / on
|
|
620
620
|
Channel: Weixin iLink / Lark
|
|
621
|
-
|
|
621
|
+
Active chat: none / active
|
|
622
622
|
Translation: off / on
|
|
623
623
|
Current project
|
|
624
624
|
Current task
|
|
625
|
-
QR login / Lark QR setup /
|
|
625
|
+
QR login / Lark QR setup / Rebind
|
|
626
626
|
Last poll status
|
|
627
627
|
Last message status
|
|
628
628
|
```
|
|
@@ -633,9 +633,8 @@ The user should be able to:
|
|
|
633
633
|
- select the gateway channel
|
|
634
634
|
- start Weixin QR login
|
|
635
635
|
- start Lark QR setup
|
|
636
|
-
-
|
|
637
|
-
-
|
|
638
|
-
- reset binding
|
|
636
|
+
- see whether the phone or Lark chat is active
|
|
637
|
+
- reset binding or channel setup
|
|
639
638
|
- inspect the current gateway project/task context
|
|
640
639
|
- toggle gateway translation
|
|
641
640
|
- inspect recent gateway errors
|
|
@@ -676,14 +675,15 @@ Validation:
|
|
|
676
675
|
|
|
677
676
|
- Implement `/help`, `/start`, `/retry`, `/status`, `/projects`,
|
|
678
677
|
`/use-project`, `/tasks`, `/use-task`, `/translate on`, and `/translate off`.
|
|
679
|
-
- Implement bound identity check.
|
|
678
|
+
- Implement Weixin bound identity check and Lark latest-active-chat updates.
|
|
680
679
|
- Implement persistent inbound message dedupe.
|
|
681
680
|
- Reply with short command results through iLink.
|
|
682
681
|
|
|
683
682
|
Validation:
|
|
684
683
|
|
|
685
684
|
- Parser tests for known commands and invalid commands.
|
|
686
|
-
- Gateway service tests for ignored unbound users
|
|
685
|
+
- Gateway service tests for ignored unbound Weixin users, Lark active chat
|
|
686
|
+
updates, and deduped messages.
|
|
687
687
|
|
|
688
688
|
### Phase 4: Task Lifecycle Commands
|
|
689
689
|
|
|
@@ -792,6 +792,8 @@ Gateway MVP is complete when:
|
|
|
792
792
|
|
|
793
793
|
- Desktop VCM can enable/disable Weixin iLink gateway.
|
|
794
794
|
- Desktop VCM can QR-bind one Weixin DM identity.
|
|
795
|
+
- Desktop VCM can use the most recent active Lark DM or group @mention as the
|
|
796
|
+
Gateway reply target.
|
|
795
797
|
- Bound phone can send `/status` and receive current VCM status.
|
|
796
798
|
- Bound phone can list and select current project/task context.
|
|
797
799
|
- Bound phone can run `/pull-current` to update the connected base repository
|
package/docs/product-design.md
CHANGED
|
@@ -741,36 +741,38 @@ Gateway product rules:
|
|
|
741
741
|
|
|
742
742
|
- Weixin is DM only; Lark can receive group messages only when the bot is
|
|
743
743
|
mentioned.
|
|
744
|
-
-
|
|
745
|
-
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
-
|
|
744
|
+
- Weixin binds one mobile chat identity to one desktop VCM instance.
|
|
745
|
+
- Lark accepts any DM or group @mention that can reach the bot, and the most
|
|
746
|
+
recent active Lark chat becomes the PM reply target.
|
|
747
|
+
- The active mobile chat is not tied to one project or one task.
|
|
748
|
+
- The active mobile chat can select among the projects and tasks available to
|
|
749
|
+
the desktop VCM instance.
|
|
750
|
+
- After setup succeeds, VCM keeps a Gateway channel connection even when
|
|
749
751
|
Gateway is off; only `/help`, `/start`, `/status`, `/projects`, and `/tasks`
|
|
750
|
-
are accepted in that state. `/start` turns Gateway on from the
|
|
751
|
-
chat
|
|
752
|
+
are accepted in that state. `/start` turns Gateway on from the active mobile
|
|
753
|
+
chat.
|
|
752
754
|
- VCM caches the latest PM reply per task locally. When `/start` turns Gateway
|
|
753
755
|
on and the current task has a cached PM reply, the response includes that
|
|
754
756
|
latest PM reply so the mobile user can resume with context.
|
|
755
757
|
- Plain mobile text is sent only to the current task's `project-manager`.
|
|
756
758
|
- Gateway never sends directly to `architect`, `coder`, or `reviewer`.
|
|
757
|
-
- Gateway can push PM assistant replies to the
|
|
759
|
+
- Gateway can push PM assistant replies to the active mobile chat whenever
|
|
758
760
|
gateway is enabled, even if that PM turn was started from desktop VCM.
|
|
759
761
|
- When gateway translation is enabled, mobile input is translated to English
|
|
760
762
|
before PM receives it, and PM English replies are translated before the mobile
|
|
761
763
|
chat receives them.
|
|
762
764
|
- If PM reply translation fails or times out, Gateway sends a translation
|
|
763
|
-
failure notice instead of the English source. The
|
|
765
|
+
failure notice instead of the English source. The active mobile chat can send
|
|
764
766
|
`/retry` to retry the latest failed output translation kept in memory.
|
|
765
767
|
- The PM prompt does not include the original Chinese text.
|
|
766
|
-
- There is no multi-user allowlist.
|
|
767
|
-
|
|
768
|
+
- There is no multi-user allowlist. Weixin is a bound identity model; Lark is a
|
|
769
|
+
trusted-chat bot model.
|
|
768
770
|
|
|
769
771
|
The Weixin channel uses Tencent iLink QR login, `getupdates` long polling, and
|
|
770
772
|
`sendmessage` text replies. The Lark channel uses QR setup to create/configure a
|
|
771
773
|
bot app, stores the resulting App ID/App Secret locally, then uses WebSocket
|
|
772
|
-
event delivery
|
|
773
|
-
|
|
774
|
+
event delivery. Gateway details and implementation plan live in
|
|
775
|
+
`docs/gateway-design.md`.
|
|
774
776
|
|
|
775
777
|
## 15. Local State
|
|
776
778
|
|
|
@@ -795,8 +797,8 @@ Gateway state and audit logs:
|
|
|
795
797
|
<vcmDataDir>/gateway/audit.jsonl
|
|
796
798
|
```
|
|
797
799
|
|
|
798
|
-
Gateway credentials, iLink tokens,
|
|
799
|
-
and audit logs live under `vcmDataDir`. VCM resolves `vcmDataDir` from
|
|
800
|
+
Gateway credentials, iLink tokens, active chat metadata, cursors, context
|
|
801
|
+
tokens, and audit logs live under `vcmDataDir`. VCM resolves `vcmDataDir` from
|
|
800
802
|
`VCM_DATA_DIR`; if it is unset or empty, VCM uses `~/.vcm`.
|
|
801
803
|
|
|
802
804
|
Repository-level VCM state:
|
|
@@ -881,8 +883,9 @@ VCM V1 is successful when:
|
|
|
881
883
|
- Round completion detection waits for the final role in a chained conversation and can alert with prompt plus sound.
|
|
882
884
|
- Translation settings save to `<vcmDataDir>/settings.json`.
|
|
883
885
|
- Translation reads Claude transcript JSONL reliably after start, resume, and restart.
|
|
884
|
-
- Gateway can bind one Weixin DM identity
|
|
885
|
-
translated plain text to PM, and push translated PM replies back to
|
|
886
|
+
- Gateway can bind one Weixin DM identity or use the most recent active Lark
|
|
887
|
+
chat, send translated plain text to PM, and push translated PM replies back to
|
|
888
|
+
the active mobile chat.
|
|
886
889
|
- Terminal and translation panel have equal, stable reading space.
|
|
887
890
|
- Harness install/update preserves user content outside VCM managed blocks.
|
|
888
891
|
- Completed tasks can cleanly remove their worktree and VCM task metadata without affecting other tasks.
|