shennian 0.2.78 → 0.2.83
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/scripts/wechat-rpa-win-visual.mjs +1155 -127
- package/dist/scripts/wechat-rpa-win.mjs +227 -1
- package/dist/src/agents/external-channel-instructions.js +1 -3
- package/dist/src/channels/base.d.ts +9 -2
- package/dist/src/channels/runtime.d.ts +2 -1
- package/dist/src/channels/runtime.js +16 -32
- package/dist/src/channels/secret-registry.d.ts +3 -1
- package/dist/src/channels/wechat-rpa/macos-flow.d.ts +6 -5
- package/dist/src/channels/wechat-rpa/macos-flow.js +7 -80
- package/dist/src/channels/wechat-rpa/normalizer.d.ts +5 -1
- package/dist/src/channels/wechat-rpa/normalizer.js +14 -1
- package/dist/src/channels/wechat-rpa/windows-visual-flow.d.ts +4 -0
- package/dist/src/channels/wechat-rpa/windows-visual-flow.js +13 -6
- package/dist/src/channels/wechat-rpa.d.ts +12 -5
- package/dist/src/channels/wechat-rpa.js +362 -71
- package/dist/src/commands/daemon.d.ts +12 -2
- package/dist/src/commands/daemon.js +177 -14
- package/dist/src/commands/manager.d.ts +1 -1
- package/dist/src/commands/manager.js +13 -10
- package/dist/src/index.js +64 -39
- package/dist/src/manager/runtime.js +35 -3
- package/dist/src/native-fusion/opencode-parser.js +2 -0
- package/dist/src/native-fusion/parsers.js +15 -0
- package/dist/src/native-fusion/service.js +3 -23
- package/package.json +3 -3
|
@@ -14,12 +14,6 @@ function normalizeText(text) {
|
|
|
14
14
|
function isCodexRolloutPath(filePath) {
|
|
15
15
|
return filePath.split(/[\\/]+/).includes('.codex');
|
|
16
16
|
}
|
|
17
|
-
function shouldBackfillWindowsCodex(state) {
|
|
18
|
-
return process.platform === 'win32' && state.codexWindowsPathParserFixed !== true;
|
|
19
|
-
}
|
|
20
|
-
function shouldBackfillCodexAppContextWrapper(state) {
|
|
21
|
-
return state.codexAppContextWrapperFixed !== true;
|
|
22
|
-
}
|
|
23
17
|
export class NativeSessionFusionService {
|
|
24
18
|
client;
|
|
25
19
|
timer = null;
|
|
@@ -99,8 +93,6 @@ export class NativeSessionFusionService {
|
|
|
99
93
|
this.pruneState();
|
|
100
94
|
const state = loadNativeScannerState();
|
|
101
95
|
const nextFilesState = { ...state.files };
|
|
102
|
-
const backfillWindowsCodex = shouldBackfillWindowsCodex(state);
|
|
103
|
-
const backfillCodexAppContextWrapper = shouldBackfillCodexAppContextWrapper(state);
|
|
104
96
|
const batches = [];
|
|
105
97
|
const files = [...listCodexRolloutFiles(), ...listClaudeTranscriptFiles(), ...listOpenCodeSessionFiles()];
|
|
106
98
|
for (const filePath of files) {
|
|
@@ -115,12 +107,9 @@ export class NativeSessionFusionService {
|
|
|
115
107
|
}
|
|
116
108
|
const isCodex = isCodexRolloutPath(filePath);
|
|
117
109
|
const isOpenCode = filePath.endsWith('.opencode-session.json');
|
|
118
|
-
const isCodexRepairBackfillFile = backfillCodexAppContextWrapper && isCodex && current != null;
|
|
119
110
|
const startOffset = isOpenCode && current?.mtimeMs !== stat.mtimeMs
|
|
120
|
-
?
|
|
121
|
-
:
|
|
122
|
-
? 0
|
|
123
|
-
: current?.offset ?? 0;
|
|
111
|
+
? current.offset
|
|
112
|
+
: current?.offset ?? 0;
|
|
124
113
|
const parsed = isOpenCode
|
|
125
114
|
? parseOpenCodeSessionFile(filePath, startOffset)
|
|
126
115
|
: isCodex
|
|
@@ -130,10 +119,7 @@ export class NativeSessionFusionService {
|
|
|
130
119
|
offset: parsed.nextOffset,
|
|
131
120
|
mtimeMs: stat.mtimeMs,
|
|
132
121
|
};
|
|
133
|
-
const
|
|
134
|
-
? parsed.events.filter((event) => event.repairHint === 'codex_app_context_wrapper')
|
|
135
|
-
: parsed.events;
|
|
136
|
-
for (const event of parsedEvents) {
|
|
122
|
+
for (const event of parsed.events) {
|
|
137
123
|
const claimed = this.tryClaimManagedEcho(event);
|
|
138
124
|
if (claimed) {
|
|
139
125
|
batches.push(claimed);
|
|
@@ -157,12 +143,6 @@ export class NativeSessionFusionService {
|
|
|
157
143
|
}, 60_000);
|
|
158
144
|
}
|
|
159
145
|
state.files = nextFilesState;
|
|
160
|
-
if (backfillWindowsCodex) {
|
|
161
|
-
state.codexWindowsPathParserFixed = true;
|
|
162
|
-
}
|
|
163
|
-
if (backfillCodexAppContextWrapper) {
|
|
164
|
-
state.codexAppContextWrapperFixed = true;
|
|
165
|
-
}
|
|
166
146
|
saveNativeScannerState(state);
|
|
167
147
|
}
|
|
168
148
|
tryClaimManagedEcho(event) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shennian",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.83",
|
|
4
4
|
"description": "Shennian — AI Agent Control Plane CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@mariozechner/pi-agent-core": "^0.64.0",
|
|
38
38
|
"@sinclair/typebox": "^0.34.49",
|
|
39
|
-
"@shennian/wire": "^0.1.5",
|
|
40
39
|
"chalk": "^5.4.1",
|
|
41
40
|
"commander": "^13.1.0",
|
|
42
41
|
"qrcode-terminal": "^0.12.0",
|
|
43
|
-
"ws": "^8.18.1"
|
|
42
|
+
"ws": "^8.18.1",
|
|
43
|
+
"@shennian/wire": "0.1.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^20",
|