@logicseek/hello-cc 1.1.0-rc.3 → 1.1.0-rc.4
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/CHANGELOG.md +39 -0
- package/docs/native.md +81 -2
- package/docs/native.zh-CN.md +68 -2
- package/lib/cli/commands/native.mjs +42 -8
- package/lib/integrations/native/claude.mjs +29 -3
- package/lib/integrations/native/codex.mjs +38 -9
- package/lib/integrations/native/dsh-acp.mjs +10 -0
- package/lib/integrations/native/interactions.mjs +16 -3
- package/lib/runtime/native/client.mjs +8 -1
- package/lib/runtime/native/service.mjs +189 -28
- package/lib/runtime/native/store.mjs +28 -4
- package/lib/web/browser/core.mjs +9 -1
- package/lib/web/http-routes.mjs +1 -1
- package/lib/web/native-sessions.mjs +53 -13
- package/lib/web/ui-i18n.mjs +6 -0
- package/lib/web/ui-native.mjs +22 -2
- package/lib/web/ui-template.mjs +2 -2
- package/lib/web/ui-workspace.mjs +6 -2
- package/package.json +1 -1
- package/scripts/helpers/gc-clock-observation.mjs +33 -0
- package/scripts/native-installed-acceptance.mjs +80 -19
- package/scripts/regression.mjs +18 -2
- package/scripts/web-native-retry-checks.mjs +177 -0
- package/scripts/web-workbench-acceptance.mjs +7 -4
|
@@ -13,6 +13,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
13
13
|
import { runSessionToolsChecks } from './web-session-tools-checks.mjs';
|
|
14
14
|
import { runFilePreviewChecks } from './web-file-preview-checks.mjs';
|
|
15
15
|
import { runNativeHandoffChecks } from './web-native-handoff-checks.mjs';
|
|
16
|
+
import { createNativeRetryFault, runNativeRetryChecks, assertExpectedBrowserErrors } from './web-native-retry-checks.mjs';
|
|
16
17
|
import { createNativeFixtureRoot } from './native-fixture-root.mjs';
|
|
17
18
|
|
|
18
19
|
const args = process.argv.slice(2);
|
|
@@ -65,12 +66,12 @@ function hashes() {
|
|
|
65
66
|
for (const name of fs.readdirSync(target).sort()) walk(path.join(relative, name));
|
|
66
67
|
} else result[relative] = createHash('sha256').update(fs.readFileSync(target)).digest('hex');
|
|
67
68
|
}
|
|
68
|
-
for (const name of ['bin', 'lib', 'package.json', 'package-lock.json', 'scripts/web-workbench-acceptance.mjs', 'scripts/native-fixture-root.mjs', 'scripts/web-session-tools-checks.mjs', 'scripts/web-file-preview-checks.mjs', 'scripts/web-native-handoff-checks.mjs']) walk(name);
|
|
69
|
+
for (const name of ['bin', 'lib', 'package.json', 'package-lock.json', 'scripts/web-workbench-acceptance.mjs', 'scripts/native-fixture-root.mjs', 'scripts/web-session-tools-checks.mjs', 'scripts/web-file-preview-checks.mjs', 'scripts/web-native-handoff-checks.mjs', 'scripts/web-native-retry-checks.mjs']) walk(name);
|
|
69
70
|
return result;
|
|
70
71
|
}
|
|
71
72
|
const evidence = {
|
|
72
73
|
schemaVersion: 1, dir, packageRoot: repo, packageVersion: JSON.parse(fs.readFileSync(path.join(repo, 'package.json'), 'utf8')).version,
|
|
73
|
-
node: process.version, platform: process.platform, checks: [], screenshots: [], errors: [], console: [], cleanup: {},
|
|
74
|
+
node: process.version, platform: process.platform, checks: [], screenshots: [], errors: [], console: [], expectedErrors: [], cleanup: {},
|
|
74
75
|
sourceFiles: hashes(), browser: 'Playwright 1.62.1; isolated headless context; repeatable CI runner',
|
|
75
76
|
mode: 'Simulated native adapters; actual HTTP, SQLite, native service and browser; no models or credentials',
|
|
76
77
|
startedAt: new Date().toISOString(), success: false
|
|
@@ -84,6 +85,7 @@ function hcc(...command) {
|
|
|
84
85
|
return result.stdout;
|
|
85
86
|
}
|
|
86
87
|
const ctx = { root, dbPath: path.join(root, '.hello-cc', 'mesh.db') };
|
|
88
|
+
const retryFault = createNativeRetryFault({ dbPath: ctx.dbPath });
|
|
87
89
|
const events = createEventHelpers(), bindings = createPeerBindingStore(events), peers = createPeerHelpers({ ...events, now: () => Math.floor(Date.now() / 1000) });
|
|
88
90
|
const deps = { ...events, ...bindings, ...peers, ...createMessageStore(events), connect: () => new DatabaseSync(ctx.dbPath), detectBranch: () => '', liveProcessIdentity: pid => inspectProcessIdentity(pid).identity };
|
|
89
91
|
const adapters = new Map(), adaptersByPeer = new Map();
|
|
@@ -350,7 +352,7 @@ try{
|
|
|
350
352
|
const quotedTmux = "'" + tmux.replaceAll("'", "'\"'\"'") + "'";
|
|
351
353
|
fs.writeFileSync(path.join(bin,'tmux'),'#!/bin/sh\nexec '+quotedTmux+' -L '+socket+' "$@"\n',{mode:0o700});
|
|
352
354
|
hcc('up','--no-discover','--no-guidance');
|
|
353
|
-
service=await startNativeService(ctx,deps,{pollMs:
|
|
355
|
+
service=await startNativeService(ctx,deps,{pollMs:1000000,afterUserSubmissionMeshCommit:retryFault.afterMeshCommit,adapterFactory:async(provider,options)=>{
|
|
354
356
|
const peer=options.env.HCC_PEER;
|
|
355
357
|
const state={provider,status:'idle',sessionId:peer,turnId:null,executorId:options.executorId,capabilities:{send:true,interrupt:true,close:true,resume:true}};
|
|
356
358
|
const adapter={opens:[],snapshot:()=>structuredClone(state),capabilities:state.capabilities,async open(input={}){this.opens.push(structuredClone(input));if(input.sessionId)state.sessionId=input.sessionId;return this.snapshot();},async send(input){this.sent=(this.sent||0)+1;state.status='running';state.turnId='qa-turn';this.active=input;return{status:'queued',turnId:state.turnId};},async interrupt(){state.status='idle';state.turnId=null;},async close(){state.status='closed';},emit(value){options.onEvent({provider,sessionId:state.sessionId,turnId:'qa-turn',...value});},state};
|
|
@@ -401,8 +403,9 @@ try{
|
|
|
401
403
|
await extendedChecks(p,context);
|
|
402
404
|
await projectLifecycleChecks();
|
|
403
405
|
await runFilePreviewChecks({browser,base,token:env.HCC_WEB_TOKEN,sandbox,registerPage:p,adapters,check,shot,watch,browserInstrumentation,evidence});
|
|
406
|
+
await runNativeRetryChecks({browser,base,token:env.HCC_WEB_TOKEN,root,dbPath:ctx.dbPath,adaptersByPeer,api,service,retryFault,select,check,shot,watch,browserInstrumentation,evidence});
|
|
404
407
|
await runNativeHandoffChecks({browser,base,token:env.HCC_WEB_TOKEN,adaptersByPeer,api,service,select,check,shot,watch,browserInstrumentation,evidence,stopWeb:()=>{hcc('down');runtime=false;}});
|
|
405
|
-
assert.deepEqual(evidence.errors,[]);
|
|
408
|
+
assert.deepEqual(evidence.errors,[]);assertExpectedBrowserErrors(evidence);assert.deepEqual(hashes(),evidence.sourceFiles);check('zero unexpected browser errors and unchanged source hash during acceptance');evidence.success=true;
|
|
406
409
|
} catch (error) {
|
|
407
410
|
evidence.success = false; evidence.failure = { message: error.message, stack: error.stack };
|
|
408
411
|
console.error(error);
|