@finogeeks2026/finshield-opencode 0.0.0-stage → 0.11.50
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/DESIGN.md +593 -0
- package/LICENSE.rtf +28 -0
- package/README.md +132 -2
- package/THIRD-PARTY-NOTICES.md +3131 -0
- package/bin/node.exe +4 -0
- package/dist/gui-experimental.cjs +96 -0
- package/dist/updater/server.js +1046 -0
- package/install/download-source.json +3 -0
- package/install/runtime.js +60 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/LICENSE.rtf +28 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/README.md +116 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/bin/finsafe_native.dll +0 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/native-build.json +5 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/README.md +6 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/index.js +12 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/package.json +24 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.lib +0 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/CHANGELOG.md +1183 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/LICENSE.txt +22 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/README.md +42 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/cnoke.cjs +816 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/benchmarks.md +80 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/callbacks.md +182 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/composites.md +549 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/contribute.md +163 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/index.md +46 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/load.md +191 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/migration.md +256 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/misc.md +76 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/output.md +299 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/pointers.md +385 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/primitives.md +151 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/start.md +110 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/types.md +88 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/unions.md +0 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/values.md +134 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/index.cjs +1 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/index.d.ts +389 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/index.js +2 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/indirect.cjs +1 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/indirect.js +2 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/lib/native/base/base.cc +11064 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/lib/native/base/base.hh +5951 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/lib/native/base/unicode.inc +408 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/package.json +68 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/CMakeLists.txt +249 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/index.cjs +296 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/index.js +281 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/indirect.cjs +295 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/indirect.js +280 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/arm64.cc +1408 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/arm64_asm.S +216 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/arm64_asm.asm +181 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/loong64.cc +5 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/loong64_asm.S +200 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/riscv64.cc +1345 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/riscv64_asm.S +200 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64sysv.cc +1434 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64sysv_asm.S +224 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64win.cc +1086 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64win_asm.S +162 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64win_asm.asm +189 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x86.cc +1185 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x86_asm.S +217 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x86_asm.asm +174 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/call.cc +2094 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/call.hh +179 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/errno.inc +462 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/ffi.cc +3009 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/ffi.hh +461 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/parser.cc +218 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/parser.hh +54 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/primitives.inc +36 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/static.cjs +130 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/static.js +133 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/trampolines.cjs +77 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/type.cc +725 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/type.hh +71 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/util.cc +1040 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/util.hh +493 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/uv.cc +214 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/uv.def +11 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/uv.hh +112 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/win32.cc +198 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/win32.hh +148 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/LICENSE.md +9 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/README.md +95 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/napi-inl.h +7211 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/napi.h +3421 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/LICENSE +21 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/README.md +95 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/def/js_native_api.def +125 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/def/node_api.def +157 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/js_native_api.h +591 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/js_native_api_types.h +210 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/node_api.h +265 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/node_api_types.h +58 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/package.json +36 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/release.json +4 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/src/native.js +85 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/src/shell.js +20 -0
- package/node_modules/@finogeeks2026/finsafe-sdk/src/status.js +57 -0
- package/package.json +47 -4
- package/policy/candidate.yaml +347 -0
- package/release.json +4 -0
- package/src/activation.js +2 -0
- package/src/attachment.js +34 -0
- package/src/connector.js +91 -0
- package/src/contract.js +8 -0
- package/src/desktop-contract.js +4 -0
- package/src/desktop.js +25 -0
- package/src/gui.tsx +58 -0
- package/src/host.js +38 -0
- package/src/index.js +12 -0
- package/src/instance-settings.js +27 -0
- package/src/known-folders.js +22 -0
- package/src/management.js +17 -0
- package/src/preparation.js +18 -0
- package/src/presentation.js +153 -0
- package/src/settings.js +18 -0
- package/ui/feedback.cjs +45 -0
- package/ui/page.cjs +225 -0
- package/ui/state.cjs +44 -0
- package/updater/bootstrap.js +41 -0
- package/updater/common/activation.js +81 -0
- package/updater/common/coordinator.js +329 -0
- package/updater/common/download.js +57 -0
- package/updater/common/index.js +12 -0
- package/updater/common/package.js +53 -0
- package/updater/common/protocol.js +38 -0
- package/updater/common/transport.js +65 -0
- package/updater/coordinator.js +2 -0
- package/updater/launch.js +40 -0
- package/updater/management.js +9 -0
- package/updater/native.js +18 -0
- package/updater/operations.js +45 -0
- package/updater/protocol.js +1 -0
- package/updater/server.js +100 -0
- package/updater/transport.js +10 -0
- package/updater/windows-launch-reader.js +40 -0
- package/updater/windows-launch.js +96 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {downloadInstaller} from '../updater/common/download.js';
|
|
2
|
+
export {verifyPayload} from '../updater/common/download.js';
|
|
3
|
+
import {randomUUID} from 'node:crypto';
|
|
4
|
+
import {existsSync,mkdirSync,mkdtempSync,readFileSync,writeFileSync} from 'node:fs';
|
|
5
|
+
import {join} from 'node:path';
|
|
6
|
+
|
|
7
|
+
export const runtimeFiles=['finsafe.exe','finsafe-desktop.exe','finsafe-service.exe','finsafe-installer-actions.exe',
|
|
8
|
+
'finsafe-uninstall.exe','finsafe_runtime_pipe.dll','finsafe_electron_launch.dll','finsafe_runtime_pipe.manifest.json'];
|
|
9
|
+
|
|
10
|
+
/** Stage only verified release bytes. No setup or shared native state changes. */
|
|
11
|
+
export async function stageRuntime(destination,version,options={}) {
|
|
12
|
+
if(options.confined) throw new Error('Protected Host cannot install or prepare native FinSAFE; reopen ordinary OpenCode');
|
|
13
|
+
if(!/^\d+\.\d+\.\d+$/.test(version)) throw new Error('A stable FinSAFE version is required');
|
|
14
|
+
const name=`finshield-${version}-x64-setup.exe`;
|
|
15
|
+
const {cdnBaseUrl}=JSON.parse(readFileSync(new URL('./download-source.json',import.meta.url),'utf8'));
|
|
16
|
+
const bytes=await downloadInstaller(version,cdnBaseUrl,options);
|
|
17
|
+
mkdirSync(destination,{recursive:true});
|
|
18
|
+
const root=mkdtempSync(join(destination,version+'-'));
|
|
19
|
+
writeFileSync(join(root,name),bytes);
|
|
20
|
+
return {version,package:join(root,name)};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Run the selected full setup after admission. Native setup owns all mutations. */
|
|
24
|
+
export async function installRuntime(destination,version,options={}) {
|
|
25
|
+
if(options.confined)throw Error('Protected Host cannot install native FinSAFE');
|
|
26
|
+
if(!options.execute||!options.installation||!options.configuration||!options.candidate)
|
|
27
|
+
throw Error('OpenCode setup requires an SDK-bound target and its staged Candidate');
|
|
28
|
+
const staged=options.staged??await stageRuntime(destination,version,options);
|
|
29
|
+
if(staged.version!==version)throw Error('Staged release differs from requested native target');
|
|
30
|
+
const packagePath=staged.package;
|
|
31
|
+
const operationId=randomUUID();
|
|
32
|
+
const request={version,package:packagePath,operation_id:operationId,
|
|
33
|
+
installation:options.installation,configuration:options.configuration,
|
|
34
|
+
previousInstallation:options.previousInstallation,
|
|
35
|
+
candidate:options.candidate,
|
|
36
|
+
integration_outputs:false,self_update_enabled:false};
|
|
37
|
+
options.onRequest?.(request);
|
|
38
|
+
const result=await options.execute(request);
|
|
39
|
+
if(![0,3010,1641].includes(result.code)) {
|
|
40
|
+
const error=new Error(`Windows setup returned ${result.code}: ${result.detail || result.stderr || ''}`);
|
|
41
|
+
error.setupCode=result.code;
|
|
42
|
+
const observed=observeSetupResult({phase:'installing'},result.resultPath);
|
|
43
|
+
error.result={...observed,phase:observed.nativeSetup?observed.phase:'failed',
|
|
44
|
+
error:observed.error||error.message,nativeSetup:observed.nativeSetup??{code:result.code}};
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
return {executable:join(request.installation,'finsafe.exe'),yamlPath:join(request.configuration,'effective.yaml'),
|
|
48
|
+
configuration:request.configuration,exitCode:result.code,
|
|
49
|
+
resultPath:result.resultPath,retainedWorker:result.retainedWorker,rebootRequired:result.code!==0};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Native setup owns terminal outcomes. Reading one result does not retry setup or authorize. */
|
|
53
|
+
export function observeSetupResult(state,path) {
|
|
54
|
+
if(!path || !existsSync(path)) return state;
|
|
55
|
+
const result=JSON.parse(readFileSync(path,'utf8'));
|
|
56
|
+
if(!Number.isInteger(result.code) || !['completed','cancelled','failed','reboot-required'].includes(result.phase)) {
|
|
57
|
+
throw new Error('Invalid native setup result');
|
|
58
|
+
}
|
|
59
|
+
return {...state,...(state.phase==='installing'?{phase:result.phase,error:result.detail || undefined}:{}),nativeSetup:result};
|
|
60
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{\rtf1\ansi\deff0{\fonttbl{\f0 Microsoft YaHei;}}
|
|
2
|
+
\viewkind4\uc1\pard\f0 \fs24\b \u26234?\u23433?\u30462?\u26700?\u-26782?\u-28817?\u20214?\u-29768?\u21487?\u21327?\u-29778?\b0\fs18\par
|
|
3
|
+
\b \u26356?\u26032?\u26085?\u26399?\u-230?2026 \u24180? 10 \u26376? 11 \u26085?\b0\par
|
|
4
|
+
\b 1. \u25509?\u21463?\u21327?\u-29778?\b0\par
|
|
5
|
+
\u23433?\u-30523?\u25110?\u20351?\u29992?\u26234?\u23433?\u30462?\u-244?\u21363?\u-30616?\u31034?\u24744?\u21516?\u24847?\u26412?\u21327?\u-29778?\u12290?\u22914?\u26524?\u24744?\u19981?\u21516?\u24847?\u-244?\u-29705?\u19981?\u-30335?\u23433?\u-30523?\u25110?\u20351?\u29992?\u26412?\u-28817?\u20214?\u12290?\par
|
|
6
|
+
\b 2. \u-29768?\u21487?\u-31997?\u22260?\b0\par
|
|
7
|
+
\u28145?\u22323?\u20961?\u27888?\u26497?\u23458?\u31185?\u25216?\u26377?\u-27056?\u-29405?\u20219?\u20844?\u21496?\u25480?\u20104?\u24744?\u26377?\u-27056?\u30340?\u12289?\u-26786?\u29420?\u21344?\u30340?\u12289?\u19981?\u21487?\u-28820?\u-29783?\u30340?\u-28817?\u20214?\u20351?\u29992?\u-29768?\u21487?\u12290?\u20855?\u20307?\u20351?\u29992?\u-31997?\u22260?\u21516?\u26102?\u21463?\u-28670?\u29992?\u30340?\u-29790?\u21333?\u12289?\u-29790?\u-27131?\u21327?\u-29778?\u25110?\u20225?\u19994?\u21327?\u-29778?\u32422?\u26463?\u12290?\par
|
|
8
|
+
\u-27036?\u-26786?\u27861?\u24459?\u25110?\u20070?\u-26782?\u21327?\u-29778?\u20801?\u-29768?\u-244?\u24744?\u19981?\u24471?\u20986?\u21806?\u12289?\u20986?\u31199?\u12289?\u20877?\u20998?\u21457?\u26412?\u-28817?\u20214?\u-244?\u19981?\u24471?\u32469?\u-28729?\u-29768?\u21487?\u-29759?\u25110?\u25216?\u26415?\u-27056?\u21046?\u-244?\u20063?\u19981?\u24471?\u21024?\u-27036?\u-28817?\u20214?\u20013?\u30340?\u26435?\u21033?\u22768?\u26126?\u12290?\par
|
|
9
|
+
\b 3. \u-28817?\u20214?\u21151?\u-32515?\u19982?\u25480?\u26435?\b0\par
|
|
10
|
+
\u26234?\u23433?\u30462?\u21487?\u20197?\u25353?\u29031?\u-28339?\u32622?\u31649?\u25511? WorkBuddy \u30340?\u26435?\u-27056?\u12290?\par
|
|
11
|
+
\u22312?\u24744?\u26126?\u30830?\u25480?\u26435?\u21518?\u-244?\u26234?\u23433?\u30462?\u21487?\u-32515?\u-230?\par
|
|
12
|
+
- \u20462?\u25913?\u25991?\u20214?\u21644?\u30446?\u24405?\u-29761?\u-27154?\u26435?\u-27056?\u-229?\par
|
|
13
|
+
- \u21019?\u24314?\u25110?\u-28339?\u32622? Windows AppContainer \u-29013?\u20221?\u-229?\par
|
|
14
|
+
- \u-28339?\u32622?\u32593?\u32476?\u-28729?\u28388?\u12289?\u20195?\u29702?\u21644?\u22238?\u29615?\u-29761?\u-27154?\u26435?\u-27056?\u-229?\par
|
|
15
|
+
- \u21019?\u24314?\u25110?\u26356?\u26032?\u-29791?\u21010?\u20219?\u21153?\u-229?\par
|
|
16
|
+
- \u22312?\u26412?\u26426?\u20445?\u23384?\u-28339?\u32622?\u12289?\u25480?\u26435?\u22238?\u25191?\u12289?\u-28720?\u-30644?\u26085?\u24535?\u21644?\u23457?\u-29791?\u-29776?\u24405?\u12290?\par
|
|
17
|
+
\u-29705?\u22312?\u25480?\u26435?\u21069?\u26816?\u26597?\u-26507?\u-26782?\u26174?\u31034?\u30340?\u26435?\u-27056?\u-31997?\u22260?\u-244?\u24182?\u22312?\u30446?\u26631?\u29615?\u22659?\u20013?\u-25972?\u-29759?\u-28339?\u32622?\u12290?\par
|
|
18
|
+
\b 4. \u25968?\u25454?\u20445?\u25252?\b0\par
|
|
19
|
+
\u26234?\u23433?\u30462?\u19981?\u20250?\u20026?\u-32278?\u-29013?\u30446?\u30340?\u25910?\u-26938?\u25110?\u19978?\u20256?\u29992?\u25143?\u25968?\u25454?\u-244?\u20063?\u19981?\u20250?\u23558?\u29992?\u25143?\u25968?\u25454?\u21457?\u-28671?\u32473?\u20961?\u27888?\u26497?\u23458?\u12290?\par
|
|
20
|
+
\u26234?\u23433?\u30462?\u20165?\u25353?\u29031?\u29992?\u25143?\u-28339?\u32622?\u25191?\u-30644?\u26435?\u-27056?\u31649?\u25511?\u21644?\u24517?\u-30335?\u30340?\u32593?\u32476?\u-28820?\u21457?\u12290?\u22240?\u29992?\u25143?\u-28339?\u32622?\u20135?\u29983?\u30340?\u32593?\u32476?\u-28646?\u20449?\u21482?\u21457?\u-28671?\u21040?\u29992?\u25143?\u25351?\u23450?\u30340?\u26381?\u21153?\u12290?\u-28339?\u32622?\u12289?\u25480?\u26435?\u22238?\u25191?\u12289?\u-28720?\u-30644?\u26085?\u24535?\u21644?\u23457?\u-29791?\u-29776?\u24405?\u20445?\u23384?\u22312?\u26412?\u26426?\u12290?\par
|
|
21
|
+
\b 5. \u20445?\u-29759?\u19982?\u-29405?\u20219?\b0\par
|
|
22
|
+
\u22312?\u27861?\u24459?\u20801?\u-29768?\u30340?\u-31997?\u22260?\u20869?\u-244?\u26412?\u-28817?\u20214?\u25353?\u8220?\u29616?\u29366?\u8221?\u25552?\u20379?\u12290?\u25105?\u20204?\u19981?\u20445?\u-29759?\u-28817?\u20214?\u19981?\u20250?\u20013?\u26029?\u12289?\u27809?\u26377?\u-27367?\u-29713?\u-244?\u25110?\u-32515?\u22815?\u-27077?\u27490?\u25152?\u26377?\u23433?\u20840?\u-26418?\u-27031?\u12290?\par
|
|
23
|
+
\u23545?\u20110?\u19981?\u-32515?\u20381?\u27861?\u25490?\u-27036?\u25110?\u-27056?\u21046?\u30340?\u-29405?\u20219?\u-244?\u25353?\u29031?\u-28670?\u29992?\u27861?\u24459?\u21450?\u21452?\u26041?\u31614?\u32626?\u30340?\u20070?\u-26782?\u21327?\u-29778?\u22788?\u29702?\u12290?\par
|
|
24
|
+
\b 6. \u32456?\u27490?\u21644?\u20854?\u20182?\u26465?\u27454?\b0\par
|
|
25
|
+
\u-28707?\u21453?\u26412?\u21327?\u-29778?\u21487?\u-32515?\u23548?\u-32268?\u-29768?\u21487?\u32456?\u27490?\u12290?\u20572?\u27490?\u20351?\u29992?\u26102?\u-244?\u-29705?\u25353?\u29031?\u20135?\u21697?\u-29708?\u26126?\u-30237?\u-27036?\u26234?\u23433?\u30462?\u-28339?\u32622?\u30340?\u26435?\u-27056?\u24182?\u21368?\u-28803?\u-28817?\u20214?\u12290?\par
|
|
26
|
+
\u21452?\u26041?\u31614?\u32626?\u30340?\u20070?\u-26782?\u21327?\u-29778?\u19982?\u26412?\u21327?\u-29778?\u19981?\u19968?\u-32268?\u26102?\u-244?\u20197?\u20070?\u-26782?\u21327?\u-29778?\u20026?\u20934?\u12290?\par
|
|
27
|
+
\u-32684?\u31995?\u26041?\u24335?\u-230?contact@finogeeks.com\par
|
|
28
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# FinSAFE Node SDK
|
|
2
|
+
|
|
3
|
+
The public SDK carries `bin/finsafe_native.dll`, built by the personal edition's
|
|
4
|
+
existing CLI package from Prepare, Execution, Installer and AppSeam modules.
|
|
5
|
+
DSH and OpenCode declare this SDK as a dependency. Their archives use its
|
|
6
|
+
product DLL. The SDK owns Koffi 3.1.1 and bundles its Windows x64 native package.
|
|
7
|
+
Importing the SDK loads no DLL or Koffi native addon.
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import {createClient} from '@finogeeks2026/finsafe-sdk';
|
|
11
|
+
const call = createClient();
|
|
12
|
+
const identity = await call({module: 'prepare', request: {action: 'identity'}});
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`loadKoffi()` is the public lazy entry for existing direct Windows bindings.
|
|
16
|
+
Both this entry and `createClient()` resolve Koffi from the SDK package. Plugins
|
|
17
|
+
must not resolve it from a host or inspect the SDK's private dependency paths.
|
|
18
|
+
Windows locks a loaded native addon. On first native use, the SDK synchronously
|
|
19
|
+
copies its two dependency directories to a unique `finshield-sdk-koffi-*`
|
|
20
|
+
directory under that process's standard temporary directory, then loads from
|
|
21
|
+
there. Later calls in the same SDK module reuse the loaded instance. This
|
|
22
|
+
bounded copy is about 2.83 MB; it preserves the synchronous call API and allows
|
|
23
|
+
package removal while a Host remains alive. It is required loading work, not a
|
|
24
|
+
startup precheck. Failure is reported directly. Copies are not shared between
|
|
25
|
+
processes or used as persistent state. Native mappings last until the process
|
|
26
|
+
exits; remaining temporary files use the system's normal temporary-file cleanup.
|
|
27
|
+
The SDK adds no cleanup process, service, shared cache or locks.
|
|
28
|
+
`createClient({libraryRoot})` supports an explicit removal-safe copy of the SDK
|
|
29
|
+
library without changing dependency resolution. An optional `require` injection
|
|
30
|
+
is retained for controlled tests. The default library is this SDK's
|
|
31
|
+
`bin/finsafe_native.dll`. This is independent of the operation's installation
|
|
32
|
+
and configuration targets, which callers pass explicitly. First installation
|
|
33
|
+
uses the same product Installer operations without needing a prior full install.
|
|
34
|
+
|
|
35
|
+
Scope: native dependency ownership. Parent: plugin delivery. Input: an SDK
|
|
36
|
+
package. Output: native calls or the original loading error. The updater copies
|
|
37
|
+
the complete SDK, including bundled dependencies. No host Koffi is required.
|
|
38
|
+
|
|
39
|
+
```mermaid
|
|
40
|
+
flowchart LR
|
|
41
|
+
D[DSH plugin] --> S[Node SDK]
|
|
42
|
+
O[OpenCode plugin] --> S
|
|
43
|
+
S --> K[SDK-owned Koffi]
|
|
44
|
+
K --> L[Product DLL and existing Windows bindings]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Koffi adds two delivered packages on Windows x64: `koffi` and
|
|
48
|
+
`@koromix/koffi-win32-x64`, with no further runtime dependencies. Their installed
|
|
49
|
+
files total about 2.83 MB in 3.1.1. The SDK archive includes their MIT licenses.
|
|
50
|
+
The native component is an optional dependency for platform selection, but is
|
|
51
|
+
required when using this Windows x64 SDK. Publication verifies its presence.
|
|
52
|
+
The shared updater source owns orchestration, not dependency installation.
|
|
53
|
+
|
|
54
|
+
Named product modules are `prepare`, `execution`, `installer`, `desktop` and the explicit
|
|
55
|
+
AppSeam adapters `app_seam.dsh` and `app_seam.opencode`. Application compatibility stays in AppSeam; Core
|
|
56
|
+
never selects behavior from application identity. Product modules own native
|
|
57
|
+
handles, singletons and process lifetimes. The SDK only adapts calls and callbacks.
|
|
58
|
+
Cancel exit observation before releasing its Node callback. Native cancellation
|
|
59
|
+
waits for queued callbacks; a failed cancellation retains the callback.
|
|
60
|
+
|
|
61
|
+
Build the product DLL with `python scripts/prod/build-node-sdk.py` from the
|
|
62
|
+
repository root. Run `npm install --package-lock=false --ignore-scripts` and then `npm pack` from this
|
|
63
|
+
directory on Windows x64. Publication on another build host stages dependencies
|
|
64
|
+
with `--os=win32 --cpu=x64` before packing. Consumers install the
|
|
65
|
+
prebuilt package without Rust. Public release signs the product DLL before npm
|
|
66
|
+
packaging and publishes the SDK before exposing the dependent DSH Git package, market index
|
|
67
|
+
or npm package.
|
|
68
|
+
|
|
69
|
+
## Common HTTP status client (#1163)
|
|
70
|
+
|
|
71
|
+
DSH, OpenCode and Kilo use the package-owned SDK to call the selected shell backend's new
|
|
72
|
+
HTTP resources. The [canonical query contract](../../docs/internal/design/plugin-updater-shared.md#unified-sdk-http-status-queries-1163-2026-11-22)
|
|
73
|
+
defines authorization state, attempt-bound progress, application status, optional
|
|
74
|
+
installation/update reads and resource events. `createStatusClient` exports
|
|
75
|
+
`authorizationState`, `authorizationProgress(attempt)`, `applicationStatus(id)`,
|
|
76
|
+
`applicationInstallation(id)`, `applications`, `update` and `subscribe`.
|
|
77
|
+
Each query issues an independent HTTP request. Each subscription has its own
|
|
78
|
+
stream and cancellation. There is no query-result or pending-request cache,
|
|
79
|
+
subscription sharing, saved endpoint discovery or request replay.
|
|
80
|
+
`createAuthorizationObserver` has been removed.
|
|
81
|
+
|
|
82
|
+
```js
|
|
83
|
+
const connection = await obtainShell(selectedSettings);
|
|
84
|
+
const status = createStatusClient(connection);
|
|
85
|
+
const state = await status.authorizationState();
|
|
86
|
+
// Later queries use this connection; they do not invoke obtainShell again.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Load the complete SDK from the plugin's own dependency directory. Delivery
|
|
90
|
+
pins the packages; runtime loading does not compare package versions, DLL
|
|
91
|
+
versions or source commits. Native load errors are returned directly.
|
|
92
|
+
|
|
93
|
+
`obtainShell(settings)` is the common public launch adapter for DSH, OpenCode
|
|
94
|
+
and Kilo. Each invocation calls the native launch owner with the explicit
|
|
95
|
+
executable, Effective YAML and user environment. Shell alone decides start,
|
|
96
|
+
reuse or replacement through its existing algorithm. The SDK returns its actual
|
|
97
|
+
`origin` and authenticated `nonce`, or distinct cancellation or actual error.
|
|
98
|
+
It keeps no completed result, Promise or endpoint cache. Timeout does not kill
|
|
99
|
+
the Shell or replay the request. The native owner lets a new Shell inherit the
|
|
100
|
+
requesting updater's Job, so it ends with that session. Obtaining an existing
|
|
101
|
+
Shell does not transfer its Job or lifetime. Releasing only the request does
|
|
102
|
+
not end Shell. Accepted native authorization keeps its separate lifetime.
|
|
103
|
+
|
|
104
|
+
Background entry requests no Widget or Console display. It otherwise uses the
|
|
105
|
+
same Shell, identity, HTTP, update and Inspector behavior as foreground entry.
|
|
106
|
+
Query calls use the returned connection and neither start Shell nor fall back
|
|
107
|
+
to CLI, DLL status reads or installation discovery. The former signed-discovery
|
|
108
|
+
client and authorization observer have been deleted. The updater owns the live
|
|
109
|
+
connection for its selected target. When updater A explicitly selects B, it
|
|
110
|
+
installs B and obtains Shell B while keeping its own A SDK. FinSAFE B executes
|
|
111
|
+
B configuration and authorization. Queries for B use Shell B.
|
|
112
|
+
|
|
113
|
+
Use `python scripts/dev/verify.py --lane dsh-windows-plugin` for Node/packaging
|
|
114
|
+
checks and `--lane dsh-windows-updater` for native product fixtures. Those fixtures
|
|
115
|
+
change no installed product or authorization. SDK publication is a separate
|
|
116
|
+
release operation; this change does not publish an npm version.
|
|
Binary file
|
package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# @koromix/koffi-win32-x64
|
|
2
|
+
|
|
3
|
+
This contains the win32-x64 binaries for [Koffi](https://koffi.dev), a fast and and easy-to-use dynamic C FFI (foreign function interface) module for Node.js.
|
|
4
|
+
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> Do not install this package directly, use `npm install koffi` instead.
|
package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@koromix/koffi-win32-x64",
|
|
3
|
+
"version": "3.1.1",
|
|
4
|
+
"description": "Fast and easy-to-use dynamic C FFI (foreign function interface) for Node.js (@koromix/koffi-win32-x64)",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Niels Martignène",
|
|
7
|
+
"email": "niels.martignene@protonmail.com",
|
|
8
|
+
"url": "https://koromix.dev/"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://koffi.dev/",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Koromix/koffi"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"funding": "https://liberapay.com/Koromix",
|
|
17
|
+
"main": "./index.js",
|
|
18
|
+
"os": [
|
|
19
|
+
"win32"
|
|
20
|
+
],
|
|
21
|
+
"cpu": [
|
|
22
|
+
"x64"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
Binary file
|