@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.
Files changed (143) hide show
  1. package/DESIGN.md +593 -0
  2. package/LICENSE.rtf +28 -0
  3. package/README.md +132 -2
  4. package/THIRD-PARTY-NOTICES.md +3131 -0
  5. package/bin/node.exe +4 -0
  6. package/dist/gui-experimental.cjs +96 -0
  7. package/dist/updater/server.js +1046 -0
  8. package/install/download-source.json +3 -0
  9. package/install/runtime.js +60 -0
  10. package/node_modules/@finogeeks2026/finsafe-sdk/LICENSE.rtf +28 -0
  11. package/node_modules/@finogeeks2026/finsafe-sdk/README.md +116 -0
  12. package/node_modules/@finogeeks2026/finsafe-sdk/bin/finsafe_native.dll +0 -0
  13. package/node_modules/@finogeeks2026/finsafe-sdk/native-build.json +5 -0
  14. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/README.md +6 -0
  15. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/index.js +12 -0
  16. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/package.json +24 -0
  17. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.lib +0 -0
  18. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
  19. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/CHANGELOG.md +1183 -0
  20. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/LICENSE.txt +22 -0
  21. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/README.md +42 -0
  22. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/cnoke.cjs +816 -0
  23. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/benchmarks.md +80 -0
  24. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/callbacks.md +182 -0
  25. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/composites.md +549 -0
  26. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/contribute.md +163 -0
  27. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/index.md +46 -0
  28. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/load.md +191 -0
  29. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/migration.md +256 -0
  30. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/misc.md +76 -0
  31. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/output.md +299 -0
  32. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/pointers.md +385 -0
  33. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/primitives.md +151 -0
  34. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/start.md +110 -0
  35. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/types.md +88 -0
  36. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/unions.md +0 -0
  37. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/doc/values.md +134 -0
  38. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/index.cjs +1 -0
  39. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/index.d.ts +389 -0
  40. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/index.js +2 -0
  41. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/indirect.cjs +1 -0
  42. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/indirect.js +2 -0
  43. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/lib/native/base/base.cc +11064 -0
  44. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/lib/native/base/base.hh +5951 -0
  45. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/lib/native/base/unicode.inc +408 -0
  46. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/package.json +68 -0
  47. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/CMakeLists.txt +249 -0
  48. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/index.cjs +296 -0
  49. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/index.js +281 -0
  50. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/indirect.cjs +295 -0
  51. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/indirect.js +280 -0
  52. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/arm64.cc +1408 -0
  53. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/arm64_asm.S +216 -0
  54. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/arm64_asm.asm +181 -0
  55. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/loong64.cc +5 -0
  56. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/loong64_asm.S +200 -0
  57. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/riscv64.cc +1345 -0
  58. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/riscv64_asm.S +200 -0
  59. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64sysv.cc +1434 -0
  60. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64sysv_asm.S +224 -0
  61. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64win.cc +1086 -0
  62. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64win_asm.S +162 -0
  63. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x64win_asm.asm +189 -0
  64. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x86.cc +1185 -0
  65. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x86_asm.S +217 -0
  66. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/abi/x86_asm.asm +174 -0
  67. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/call.cc +2094 -0
  68. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/call.hh +179 -0
  69. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/errno.inc +462 -0
  70. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/ffi.cc +3009 -0
  71. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/ffi.hh +461 -0
  72. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/parser.cc +218 -0
  73. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/parser.hh +54 -0
  74. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/primitives.inc +36 -0
  75. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/static.cjs +130 -0
  76. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/static.js +133 -0
  77. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/trampolines.cjs +77 -0
  78. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/type.cc +725 -0
  79. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/type.hh +71 -0
  80. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/util.cc +1040 -0
  81. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/util.hh +493 -0
  82. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/uv.cc +214 -0
  83. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/uv.def +11 -0
  84. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/uv.hh +112 -0
  85. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/win32.cc +198 -0
  86. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/src/koffi/src/win32.hh +148 -0
  87. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/LICENSE.md +9 -0
  88. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/README.md +95 -0
  89. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/napi-inl.deprecated.h +186 -0
  90. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/napi-inl.h +7211 -0
  91. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-addon-api/napi.h +3421 -0
  92. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/LICENSE +21 -0
  93. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/README.md +95 -0
  94. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/def/js_native_api.def +125 -0
  95. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/def/node_api.def +157 -0
  96. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/js_native_api.h +591 -0
  97. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/js_native_api_types.h +210 -0
  98. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/node_api.h +265 -0
  99. package/node_modules/@finogeeks2026/finsafe-sdk/node_modules/koffi/vendor/node-api-headers/include/node_api_types.h +58 -0
  100. package/node_modules/@finogeeks2026/finsafe-sdk/package.json +36 -0
  101. package/node_modules/@finogeeks2026/finsafe-sdk/release.json +4 -0
  102. package/node_modules/@finogeeks2026/finsafe-sdk/src/native.js +85 -0
  103. package/node_modules/@finogeeks2026/finsafe-sdk/src/shell.js +20 -0
  104. package/node_modules/@finogeeks2026/finsafe-sdk/src/status.js +57 -0
  105. package/package.json +47 -4
  106. package/policy/candidate.yaml +347 -0
  107. package/release.json +4 -0
  108. package/src/activation.js +2 -0
  109. package/src/attachment.js +34 -0
  110. package/src/connector.js +91 -0
  111. package/src/contract.js +8 -0
  112. package/src/desktop-contract.js +4 -0
  113. package/src/desktop.js +25 -0
  114. package/src/gui.tsx +58 -0
  115. package/src/host.js +38 -0
  116. package/src/index.js +12 -0
  117. package/src/instance-settings.js +27 -0
  118. package/src/known-folders.js +22 -0
  119. package/src/management.js +17 -0
  120. package/src/preparation.js +18 -0
  121. package/src/presentation.js +153 -0
  122. package/src/settings.js +18 -0
  123. package/ui/feedback.cjs +45 -0
  124. package/ui/page.cjs +225 -0
  125. package/ui/state.cjs +44 -0
  126. package/updater/bootstrap.js +41 -0
  127. package/updater/common/activation.js +81 -0
  128. package/updater/common/coordinator.js +329 -0
  129. package/updater/common/download.js +57 -0
  130. package/updater/common/index.js +12 -0
  131. package/updater/common/package.js +53 -0
  132. package/updater/common/protocol.js +38 -0
  133. package/updater/common/transport.js +65 -0
  134. package/updater/coordinator.js +2 -0
  135. package/updater/launch.js +40 -0
  136. package/updater/management.js +9 -0
  137. package/updater/native.js +18 -0
  138. package/updater/operations.js +45 -0
  139. package/updater/protocol.js +1 -0
  140. package/updater/server.js +100 -0
  141. package/updater/transport.js +10 -0
  142. package/updater/windows-launch-reader.js +40 -0
  143. package/updater/windows-launch.js +96 -0
package/DESIGN.md ADDED
@@ -0,0 +1,593 @@
1
+ # OpenCode Windows plugin architecture
2
+
3
+ ## Separate startup decision revision (2026-11-23)
4
+
5
+ The owner-agreed [shared startup decision design](../../../docs/internal/design/plugin-startup-decision.md)
6
+ separates the immediate Keep/Wrap decision from input reads, Host replacement,
7
+ background preparation and page observation. Page/status attachment must not
8
+ initiate startup, and observation must not wait for `activation.start()` or
9
+ authorization completion. Shared source separates these operations. Main's initial
10
+ plugin setup supplies startup intent and endpoint reattachment is observation-only;
11
+ distinguishing same-Main plugin reload from actual startup remains an explicit
12
+ adapter gap in the shared design. Retain the two-condition policy, existing
13
+ AppSeam handoff and manual reopen. Installed-product acceptance is pending.
14
+
15
+ ## Independent runs (2026-11-23)
16
+
17
+ The owner-approved [independent-run contract](../../../docs/internal/design/plugin-updater-shared.md#independent-plugin-runs-2026-11-23)
18
+ supersedes plugin-level startup and completed-task caches below. Every setup
19
+ owns its attachment. Every explicit Shell invocation executes the existing
20
+ Shell entry; instance acquisition belongs to Shell. OpenCode uses DSH's shared
21
+ authorization-based launch decision without its own `startupReady` wrapper.
22
+ An absent program keeps startup ordinary; management then installs and
23
+ authorizes the requested release. Each new management run reads actual state.
24
+
25
+ ## Startup and handoff simplification (2026-11-23)
26
+
27
+ The owner-approved [OpenCode startup revision](../../../docs/internal/design/opencode-personal-app-seam.md#startup-and-handoff-simplification-2026-11-23)
28
+ is authoritative. Startup uses the selected AC and authorization completion;
29
+ retained handoff matches only PID and creation time. It passes the actual bound
30
+ Host executable and service registration without a guessed staging path,
31
+ fixed-version, file-hash or duplicate complete-preparation gate. Existing
32
+ transport authentication, Core admission and operation-result handling remain.
33
+
34
+
35
+ ## Manual reopen revision (2026-11-22)
36
+
37
+ The [shared manual reopen contract](../../../docs/internal/design/plugin-updater-shared.md#manual-reopen-revision-2026-11-22)
38
+ supersedes running Restart and updater reuse in this document. Running preparation
39
+ offers Exit OpenCode and Later. Exit stops Main and launches no replacement.
40
+ The next normal start loads the installed plugin. Each ordinary acquisition
41
+ terminates an existing updater Job and creates a fresh updater. Shell owns its
42
+ existing instance-acquisition algorithm; the plugin does not retain a resident
43
+ Shell handle or startup-result cache. Protected Hosts only attach
44
+ to this session's updater. Startup Keep/Wrap remains.
45
+
46
+ Status: implemented technical validation; remaining acceptance gaps are in the
47
+ [verification record](docs/verification.md). Owner clarification: 2026-11-17.
48
+
49
+ The 2026-11-21 [retained-Main Host handoff](docs/retained-main-host-handoff.md)
50
+ records the retained-Main implementation and source experiments. Its
51
+ [no-rollback revision](docs/retained-main-host-handoff.md#registration-ownership-and-no-rollback)
52
+ and the [shared current-state revision](../../../docs/internal/design/plugin-updater-shared.md#current-state-decision-revision)
53
+ are approved in [#1159](https://github.com/Geeksfino/finsafe/issues/1159);
54
+ source implements those revisions; native acceptance is pending. The owner
55
+ approved the minimal OpenCode page alignment below on 2026-11-22. This later
56
+ approval extends the DSH observation rules to OpenCode presentation only.
57
+
58
+ ## SDK HTTP query revision (#1163, 2026-11-22)
59
+
60
+ Status: source implemented. The owner selected focused unit checks only; the PR records the tested commit and results. Follow the
61
+ [canonical SDK HTTP query contract](../../../docs/internal/design/plugin-updater-shared.md#unified-sdk-http-status-queries-1163-2026-11-22).
62
+ The independent ordinary updater uses its package-owned SDK to query the selected
63
+ FinShield shell backend's new HTTP resources. Replace OpenCode's authorization
64
+ query subprocess and duplicate query cache. Migrate all consumers and remove old
65
+ HTTP aliases, authorization state/progress CLI entries and dead query code/tests.
66
+ Do not introduce direct DLL status queries or a CLI fallback.
67
+
68
+ The GUI and server Host retain their native RPC and existing updater management
69
+ channel. The current Host token remains the protection fact; HTTP application
70
+ status does not prove this Host or Main's business connection. No protected-Host
71
+ loopback permission or ordinary-process creation right is added. HTTP observation
72
+ failures retain their actual causes. The independent-run revision above handles
73
+ an absent executable during startup as Keep, followed by installation. Neither
74
+ result proves the current Host's token. A status read starts no backend and
75
+ needs no visible Widget/Console.
76
+
77
+ Keep explicit external/shared selection read-only, actual Main/Host attachment,
78
+ native command submission, no rollback and protected-session close/reopen limits.
79
+ Executing external FinShield must also match the plugin release. Read-only HTTP
80
+ observation binds to the selected instance, independently of the SDK release.
81
+ Present active A and prepared B separately until #1163 activation completes.
82
+ Existing implementation/preview evidence does not verify this migration.
83
+
84
+ ## Plugin independence
85
+
86
+ Formal Windows builds use `dev/build_release.py` to stage the package, install
87
+ locked development dependencies, build the GUI and updater, and bundle the
88
+ source-matched public SDK. The shared public-plugin renderer supplies the release
89
+ CDN base. Both the full Actions release and the local Windows release publish
90
+ this built package after the matching native release and SDK.
91
+ Native installation uses the shared verified download in `updater/common/download.js`:
92
+ CDN and the same version's public GitHub Release start together; the first
93
+ verified result wins and cancels the other source. Local npm preview overrides
94
+ only its staged package's CDN base.
95
+
96
+ Local preview delivery uses the plugin-owned [npm preview workflow](docs/local-npm.md).
97
+ It stages package copies and serves immutable artifacts over loopback. This
98
+ development tool changes no sandbox or platform capability; the platform matrix
99
+ needs no additional change for the delivery tool.
100
+
101
+ OpenCode uses its own application adapter and the declared product SDK.
102
+
103
+ The Node updater flow is owned by `integrations/common/windows` and delivered
104
+ in this plugin's archive. OpenCode declares the FinSAFE Node SDK for native
105
+ calls and has its own application adapter, Candidate, runtime namespace and UI. The
106
+ SDK carries the personal-edition product DLL. The plugin package carries no
107
+ Rust build or private DLL.
108
+
109
+ ### Installation dependencies
110
+
111
+ OpenCode Desktop 2.3.0 supplies the server plugin SDK through its Bun runtime
112
+ module loader and the GUI shared modules through its GUI host. Keep
113
+ `@opencode/plugin` in development dependencies only. An isolated npm 11.19.1
114
+ installation on 2026-11-21 showed that an optional SDK peer still makes npm
115
+ query the host's peer dependency tree, including Electron, Vite and Playwright.
116
+ Omit that installation peer as well as the regular SDK dependency. The existing
117
+ development SDK remains pinned to 2.3.0; the runtime launch path does not
118
+ reject other versions before calling their actual interfaces. Other releases
119
+ still need compatibility acceptance.
120
+
121
+ The official GUI preset builds React and React DOM into the delivered page.
122
+ Keep those packages and build tools in development dependencies. There is no
123
+ direct runtime import requiring a separate `@opencode/client` installation.
124
+ Only the FinSAFE Node SDK remains a regular dependency. That SDK owns and
125
+ bundles Koffi 3.1.1 with its Windows x64 native component, using npm's bundled
126
+ dependency contract. Existing direct Windows bindings use its public
127
+ `loadKoffi` entry. The independent updater copies the complete SDK. It requires
128
+ no separate Koffi copy and resolves no native dependency from OpenCode.
129
+ The plugin still includes Node for its independent process because OpenCode's
130
+ compiled Bun backend does not supply that runtime. The GUI uses OpenCode's
131
+ declared shared modules; React/React DOM are built into the page.
132
+
133
+ Preview publication rejects an SDK archive without the Windows x64 addon.
134
+ Delivery verification must load the SDK and Koffi from a fresh npm consumer.
135
+ The earlier `.1` preview omitted the native package; `.2` bundled it directly
136
+ in the plugin. Later previews use the SDK-owned layout for both DSH and OpenCode.
137
+
138
+ Inspected on 2026-11-21: OpenCode
139
+ [2.3.0 runtime loader](https://github.com/anomalyco/opencode/blob/v2.3.0/packages/plugin/src/runtime.ts),
140
+ [GUI build contract](https://opencode.ai/docs/build/plugins/gui/#build-the-bundle),
141
+ and npm [optional peer behavior](https://docs.npmjs.com/cli/v11/configuring-npm/package-json/#peerdependenciesmeta).
142
+ The general OpenCode example declares the SDK as a regular dependency; this
143
+ host-specific package instead uses the verified host module contract to avoid
144
+ installing a second SDK copy.
145
+
146
+ Third-party comparison, 2026-11-21: the published
147
+ [`@rizal72/oc-notify` 0.1.2](https://github.com/rizal72/opencode-plugins/blob/main/plugins/oc-notify/package.json)
148
+ and [`@rizal72/oc-plugin-updates` 0.1.9](https://github.com/rizal72/opencode-plugins/blob/main/plugins/oc-plugin-updates/package.json)
149
+ ship a prebuilt GUI and declare neither regular nor peer dependencies. Their
150
+ development workspace installs the SDK. By comparison,
151
+ [`@slkiser/opencode-quota` 6.3.0](https://github.com/slkiser/opencode-quota/blob/main/package.json)
152
+ retains a required SDK peer. These examples establish multiple packaging
153
+ patterns, not a universal zero-dependency rule. FinShield uses the first pattern
154
+ for its host APIs and retains its own native support. A local-registry consumer
155
+ of the revision 5 archive installed in 5.46 seconds with 136 delivered files;
156
+ the npm install phase took 1.76 seconds. Its request log contained only local
157
+ FinShield package/SDK requests, and the bundled Windows Koffi loaded correctly.
158
+ A second owned consumer with an empty npm cache took 9.20 seconds end to end;
159
+ the install phase took 2.45 seconds. The archive fetch/extraction took 2.23
160
+ seconds for the plugin and 0.10 seconds for the SDK, with no public requests.
161
+ These measurements use npm 11.19.1, not the OpenCode plugin-add command, and
162
+ do not establish a general installation-time guarantee.
163
+
164
+ ## Components
165
+
166
+ The user action is called "Enable protection" / "开启防护". It switches the
167
+ execution environment and interrupts running tasks while retaining the window.
168
+ Do not call it a page refresh or a full OpenCode restart. Internal operation
169
+ names remain unchanged. A protected session with a prepared update still uses
170
+ the existing close-and-reopen instruction while live protected-version
171
+ replacement is unsupported; its text must not promise that the window stays open.
172
+
173
+ Page content follows the two current observations defined in the
174
+ [page observation contract](#page-observation-alignment-2026-11-22).
175
+ `starting` and unknown phases supply no authorization fact. Keep the current
176
+ Host observation visible independently of target work or observation errors.
177
+
178
+ The sidebar entry is registered after the first startup decision. The existing
179
+ native receipt check still selects Keep or Wrap; the page does not read receipt
180
+ files or make that decision. An outgoing Host waiting in Wrap does not publish
181
+ the entry. The protected Host can publish it from its actual token observation;
182
+ an ordinary Keep session publishes it when preparation, readiness or an error is
183
+ known. Once registered, status/connection changes do not withdraw it. Before a
184
+ local client exists, the existing status loop waits for its next iteration
185
+ instead of manufacturing a failed preparation result. This delays only the
186
+ plugin contribution; OpenCode startup and backend admission remain unchanged.
187
+ If the first observation says startup is pending, a later RPC transport error
188
+ during Host replacement is not treated as a native authorization result. A
189
+ native failure response, which includes its current-protection observation,
190
+ still exposes the error page. The one-time registration is local to that GUI
191
+ instance and is removed by the normal plugin lifecycle; nothing is persisted.
192
+
193
+ The owner-approved layout (2026-11-21) keeps the existing two-column protection
194
+ summary, as shown in the [approved reference](../../../windows/prototypes/assets/opencode-plugin-layout-2026-11-21.png).
195
+ Only a confirmed package update adds an "Install update" button at the
196
+ top right, above the status card. The existing automatic package checks and
197
+ native update notice supply that state. Installing disables the same action;
198
+ success or a later current-version result removes it. The page has no manual
199
+ "Check for updates" control. Update work still requires an explicit user action
200
+ and uses OpenCode's existing package API.
201
+
202
+ The footer contains exactly three plain links in one row: "How FinShield
203
+ protects you", "FinShield website", and "Feedback". The first opens the
204
+ owner-selected https://safety.finaios.ai/ in a separate window. English and
205
+ Chinese labels use the same destination. The error section keeps the actual
206
+ failure but does not duplicate the feedback link.
207
+
208
+ Scope: component connections. Parent: OpenCode integration. Inputs: desktop
209
+ business requests and fixed plugin management requests. Output: native service
210
+ results and observed protection. Management does not proxy session traffic.
211
+
212
+ ```mermaid
213
+ flowchart LR
214
+ M[OpenCode Main] <-->|Native business channel| H[OpenCode Host]
215
+ P[OpenCode protection page] <-->|Native SDK RPC| A[OpenCode plugin entry]
216
+ A <-->|Authenticated local pipe| U[OpenCode updater]
217
+ U -->|Explicit installation and configuration| S[FinSAFE Node SDK]
218
+ S --> F[Product Installer and Prepare]
219
+ S --> A1[OpenCode AppSeam]
220
+ A1 -->|AppContainer execution| H
221
+ ```
222
+
223
+ The page and updater coordinate explicit management requests. The SDK calls the
224
+ OpenCode AppSeam adapter for verified bindings. The adapter delegates fixed
225
+ setup and authorization operations to their product owners. The updater keeps
226
+ the existing installer Job and uses the shared Desktop authorization transport,
227
+ including acknowledgment, terminal result and retained-worker handoff.
228
+
229
+ ## Page observation alignment (2026-11-22)
230
+
231
+ Owner-approved scope: apply the confirmed DSH presentation rules in the existing
232
+ OpenCode page. Keep its layout, sidebar registration and flicker correction,
233
+ package update entry, native toast, and native launch and authorization flows.
234
+ Use OpenCode-owned source; DSH is the design reference, not a runtime import.
235
+ Platform capabilities are unchanged, so the feature matrix remains accurate.
236
+ Source implements this alignment; owned verification is recorded below.
237
+ Installed-product acceptance remains pending.
238
+
239
+ Scope: protection page observations. Parent: OpenCode GUI plugin. Inputs: the
240
+ current Host's actual AppContainer observation and the selected target's current
241
+ preparation/authorization task and result. Output: page content and existing
242
+ permitted actions. Read and command errors retain their actual causes.
243
+ Observation submits no installation, authorization, handoff or recovery.
244
+
245
+ ```mermaid
246
+ flowchart LR
247
+ H[Current Host AppContainer observation] --> P[Render OpenCode protection page]
248
+ U[Current target preparation and authorization result] --> P
249
+ P --> V[Page content and existing permitted actions]
250
+ ```
251
+
252
+ | Current facts | Display |
253
+ | --- | --- |
254
+ | Actual download, installation, authorization or handoff in progress | Show that operation and progress, with current Host protection separately. Authorization wording requires an actual authorization operation. |
255
+ | Prepared target with a pending permitted switch | Show ready and Enable protection. Keep Main and the existing action capability checks. |
256
+ | Protected Host with a prepared update and `restartAllowed:false` | Show the ready update and the existing close-and-reopen instruction; offer no live switch. |
257
+ | No active operation or pending switch; actual Host is in AppContainer | Show protection enabled. Actual operation errors remain visible separately. |
258
+ | A required observation is unavailable | Show loading for that information. Keep any independently obtained current fact. |
259
+ | Task, token or whole-RPC observation fails | Show the actual cause. A read failure proves neither lack of protection nor incomplete authorization. |
260
+
261
+ For a protected ready update without a permitted live switch, show the
262
+ close-and-reopen instruction once in the page summary. Do not repeat it in
263
+ the switch warning or a second status paragraph. Keep the existing collapsed
264
+ help and actual current-release display. This does not add a restart capability
265
+ or change the existing notification policy.
266
+
267
+ The Host status boundary retains token and task observations independently.
268
+ A failed token read removes protection fields derived from that failed read,
269
+ while successful task information remains available. A task read error does
270
+ not erase a successful actual Host observation. A whole-RPC failure supplies
271
+ an error and no fabricated protection or task phase.
272
+
273
+ The page stores received observations without rewriting their business phase.
274
+ Keep request-in-flight, page visibility and Later/notice state for their UI
275
+ purpose. Enable protection or Later request errors are separate UI errors;
276
+ After acknowledgment, keep submission disabled until a fresh observation arrives;
277
+ an observation started before acknowledgment cannot release it.
278
+ they do not change a prepared target into failed preparation. `starting` and
279
+ `running` are not a second page business state. Existing updater task phases
280
+ remain owned by updater. Preserve the existing read schedule and operations.
281
+ OpenCode uses the shared activation's request-error propagation option so a
282
+ status or Enable RPC rejection reaches these existing observation and command
283
+ boundaries. It must not become a sticky failed task inside activation. Other
284
+ adapters retain their existing default error policy. This adds no reconnect,
285
+ retry, preparation request or status read outside the existing schedule.
286
+
287
+ Before implementation, add regressions for unknown/starting observations,
288
+ actual work plus AC, ordinary ready, protected ready update, idle AC, partial
289
+ observation errors, whole-RPC failure, and Enable protection/Later RPC errors
290
+ with an already-ready target. Check both content and actions. Existing sidebar
291
+ flicker, one-time registration, package-update and Main-retention tests remain
292
+ required. Owned tests do not establish installed native desktop acceptance.
293
+
294
+ ### Verification for this alignment
295
+
296
+ Local source: `63f38e4c0a4c49f538cb64e14233cff8a34ab8e0` plus the working-tree
297
+ change, checked on 2026-11-22 (Asia/Shanghai). Tests were added before their fixes.
298
+ The first run failed on fabricated authorization/protection, command errors
299
+ rewriting ready observations, and loss of independent token/task information.
300
+ Additional real Host-path regressions first reproduced sticky failed status
301
+ after status/Enable RPC errors; they now observe the actual ready result on
302
+ the next existing read without submitting new work.
303
+ The next independent review found untranslated optional second-line keys in
304
+ download/install headings. A regression first reproduced the visible key;
305
+ four empty localized values corrected it without changing layout or logic.
306
+
307
+ | Verification | Result |
308
+ | --- | --- |
309
+ | Common updater, OpenCode presentation/attachment/management, DSH default activation/startup compatibility | Final focused run: 136 passed; 0 failed, including both languages' download/install headings |
310
+ | `windows-plugin-common` | Passed, including shared delivery and default DSH behavior |
311
+ | `file-cell-opencode-plugin-unit` | Before the final heading correction, build passed and 77 of 78 Node tests passed. The unchanged manifest SDK requirement 0.11.19 differs from workspace SDK 0.11.24; this version assertion is the sole failure. The lane is failed, not passed. The heading-only correction is covered by the final focused run, build and page checks |
312
+ | Unit verification planner remainder | 4 Python tests passed; run separately because the unit lane stops at its Node failure |
313
+ | `file-cell-opencode-plugin-page` | Passed with owned Edge/Host substitutes: sidebar, locale/theme/state rendering, three footer widths, conditional package update and existing actions |
314
+ | `acceptance-hygiene`, `planner-tests`, `docs`, `docs-layout` | Passed |
315
+ | `file-cell-opencode-plugin-native` | Owned Main-exit/absent-Installer fixtures passed; native product implementation was unchanged |
316
+ | Installed desktop and policy acceptance | Not run: no declared disposable OpenCode host/options/evidence or compatible `FINSAFE_OPENCODE_POLICY_CLI` |
317
+
318
+ The exact selection is in `target/opencode-page-scope-plan.txt`; it has no
319
+ missing file declarations. Local red/green and final output are in
320
+ `target/opencode-page-*.log`. Existing SDK version, installed configuration,
321
+ authorization, native launch and DSH page work were not changed by this alignment.
322
+
323
+ ## Startup through AppSeam
324
+
325
+ Scope: plugin launch steps. Parent: updater management. Inputs: ordinary
326
+ OpenCode instance and selected authorized FinSAFE Effective. Output: the same
327
+ Main and a verified AppContainer Host, or the actual handoff error.
328
+
329
+ ```mermaid
330
+ flowchart LR
331
+ O[Ordinary Host binds the OpenCode updater] --> N[AppSeam replaces Host and retains Main]
332
+ N --> R[Native recovery reconnects Main and management reattaches]
333
+ N -->|Failure| E[Report the AppSeam error]
334
+ ```
335
+
336
+ Plugin setup registers Promise-based management handlers and returns without
337
+ awaiting updater completion. Pending and failed management remain visible in
338
+ status. The desktop startup path does not wait for installation, authorization,
339
+ a page, download or a management connection.
340
+
341
+ The updater calls the fixed SDK `replace_host` operation. It runs the selected
342
+ `finsafe app launch opencode --retain-main PID:CREATED --replace-host PID:CREATED`
343
+ with the selected Effective and Desktop image. The
344
+ [personal AppSeam workflow](../../../docs/internal/design/opencode-personal-app-seam.md)
345
+ starts Core and verifies the new protected Host before shared verified-target
346
+ replacement stops only the pinned old Host. It retains the existing
347
+ Main and never creates or terminates Main in this mode. The shared Shell has
348
+ its own native lifetime outside the updater Job. The launcher
349
+ runs outside the updater Job. Main's native disconnected-stream recovery adopts
350
+ the new native service registration. The SDK verifies returned process ancestry,
351
+ Main identity, native registration and the Host's actual AppContainer token.
352
+
353
+ Host readiness is not connection confirmation. The reactive sidecar reference
354
+ triggers plugin-owned Main IPC after connection; Main resends attachment through
355
+ its current `ctx.client`, after `server.info()` confirms the business Host PID.
356
+ The updater waits up to 45 seconds for that exact protected binding before
357
+ reporting handoff completion. Main exit stays observable during that wait.
358
+ The new Host's actual token supplies protection status.
359
+ The public SDK has no native reconnect method. OpenCode owns native service
360
+ publication and recovery, including its ability to start an ordinary Host.
361
+ FinShield verifies the current token and never reports an ordinary Host as
362
+ protected. The owner withdrew the requirement to control later native recovery.
363
+ On failure, release only this attempt's resources and report the actual error;
364
+ do not restore registration or relaunch the previous Host/Main. New-Host readiness
365
+ must precede old-Host termination. The canonical
366
+ [no-rollback contract](docs/retained-main-host-handoff.md#registration-ownership-and-no-rollback)
367
+ replaces registration backup/restoration. Source removes the rollback owner;
368
+ native failure acceptance remains pending.
369
+ Closing the page or releasing the binding leaves the protected session running.
370
+ Apply an update to an already protected session after closing and reopening it.
371
+ An existing updater must advertise `retainedMainHost`; older full-launch updaters
372
+ require an OpenCode restart. Delivery requires the matching SDK and product CLI.
373
+
374
+ ## Shared updater extraction contract
375
+
376
+ Owner-approved extraction, 2026-11-20. Source implementation is complete;
377
+ installed-product acceptance is pending.
378
+ The [shared updater design](../../../docs/internal/design/plugin-updater-shared.md)
379
+ defines the common owner and adapter contract. The OpenCode attachment flow below
380
+ is implemented by this plugin and its AppSeam adapter.
381
+ Use the existing DSH updater flow as the shared baseline, including independent
382
+ process creation, Job ownership, authenticated Host communication, startup
383
+ acquisition, Keep/Wrap, running preparation and replacement lifetime handoff.
384
+ `integrations/common/windows` owns the common Node implementation. Each plugin supplies its own
385
+ AppSeam adapter and keeps its application-specific package inputs.
386
+
387
+ The application adapter supplies the activation phase when its host can identify
388
+ it. An absent or unknown phase selects the existing startup flow. This is an
389
+ explicit default and does not establish that the application is actually
390
+ starting. DSH retains its current synchronous `appReady` sample and running
391
+ operation completion gate. OpenCode uses the startup default while its supported
392
+ host API supplies no equivalent phase signal; `OPENCODE_CLIENT` identifies a
393
+ client source and must not determine the activation phase.
394
+
395
+ Activation routes through the canonical
396
+ [shared activation flow](../../../docs/internal/design/plugin-updater-shared.md#current-state-decision-revision).
397
+ Observe the current Host's actual token. Protected Hosts connect to the existing
398
+ updater without Startup decision; connection failure does not bootstrap an
399
+ ordinary updater. An ordinary Host uses adapter phase: running bypasses Startup
400
+ decision, while absent or unknown selects it. OpenCode has no reliable phase
401
+ signal and retains that startup default, even for a visible window.
402
+
403
+ OpenCode updater starts its native Main-exit observation before serving Hello.
404
+ A validated Hello therefore confirms that the updater owns its verified Main
405
+ lifetime. Release the caller's bootstrap cleanup handle at that point, before
406
+ requesting Startup admission, which can replace and disconnect the caller Host.
407
+ An admission connection loss cannot stop that Main-owned updater. A failure
408
+ before validated Hello still stops the unaccepted bootstrap. The shared
409
+ transport keeps other adapters' existing cleanup boundary by default.
410
+
411
+ ```mermaid
412
+ flowchart LR
413
+ B[Bootstrap updater] --> H[Validate Hello with Main observation active]
414
+ H --> R[Release bootstrap cleanup handle]
415
+ R --> A[Request Startup decision]
416
+ A --> K[Keep or replace current Host]
417
+ H -->|Validation fails| S[Stop unaccepted bootstrap]
418
+ ```
419
+
420
+ Activation and attachment transport failures carry their actual error without
421
+ a preparation phase. Only updater task results can report failed preparation.
422
+ Keep the independently observed Host protection when management is unavailable.
423
+
424
+ Do not infer phase from updater existence, unchanged Main, earlier Keep/Wrap,
425
+ completed work, `mainRetained`, `session.keep` or equivalent history records.
426
+ Keep belongs to one activation. Preparation completion offers the existing
427
+ confirmed switch; it does not repeat Startup decision. Status and Later do not
428
+ submit preparation or replacement. User Restart executes the already-presented
429
+ selected target without another Startup decision.
430
+
431
+ The shared owner retains applicable accepted work and native results. Review
432
+ `beginAssessment`, `session.items`, task `satisfied` and `restartPolicy` together:
433
+ completed protection belongs to its verified Host. It cannot transfer `protected`
434
+ or `restartPolicy:never` to a new ordinary Host. Reassess on verified attachment
435
+ and existing preparation-result events through existing bindings; add no parallel
436
+ identity store, polling or status-time recovery.
437
+
438
+ Before runtime changes, add regressions through activation, bind, ensure and
439
+ status. Cover startup readiness independently of earlier Keep/Wrap, completed
440
+ handoff result reuse, duplicate attachments joining accepted work, and Main exit
441
+ during replacement. DSH retains `appReady` and Loader/`settled` gates. Unit and
442
+ installed acceptance must be recorded separately; native acceptance is pending.
443
+
444
+ ## OpenCode desktop reattachment
445
+
446
+ OpenCode's server plugin can survive desktop closure in the ordinary native
447
+ background service. Each desktop activation must attach management again.
448
+ Use the supported GUI `main` entry for this desktop-lifetime notification.
449
+ Its setup returns independently of the asynchronous attachment. The server
450
+ entry registers the management RPC before accepting attachment work. Window
451
+ page setup observes the resulting state.
452
+
453
+ AppSeam retains the explicitly supplied Main and Host by PID and creation time.
454
+ It does not infer Main from Host's original parent or require a staging path,
455
+ Desktop version, bundled Host hash, image name or command-line shape. The native
456
+ management transport still authenticates its peers. Actual selected AC tokens
457
+ supply protection; native operations retain their original errors.
458
+
459
+ Each activation or verified new-Host attachment acquires or reuses updater and
460
+ establishes its verified binding. Duplicate attachment of the same activation to
461
+ the same live Host can reuse that activation. A different Host under the same
462
+ Main requires its own verified attachment and actual token observation; unchanged
463
+ Main alone does not permit reuse. A new Main gets its own verified lifetime owner.
464
+ Superseded connections and terminal failures are released with their activation.
465
+ Join applicable installation, authorization or replacement already accepted without
466
+ duplicate submission. Preserve ready actions and Later dismissal while applicable,
467
+ and reassess applicability on new-Host attachment. Do not transfer the previous
468
+ Host's completed protection or never-restart policy to a new ordinary Host.
469
+
470
+ OpenCode Host replacement retains the same verified Main and keeps updater alive
471
+ through the shared lifecycle contract. Old Host exit is not Main exit. The
472
+ reactive sidecar endpoint change reattaches the existing Main even when OpenCode
473
+ reuses the unchanged GUI bundle and does not run Main setup again. AppSeam remains
474
+ responsible for the application's native launch command and readiness evidence.
475
+ A protected current Host exposes its native replacement limitation through
476
+ `restartAllowed:false`; its prepared update explains the required desktop
477
+ close/reopen. Direct Restart also enforces that capability.
478
+
479
+ ## Available package updates
480
+
481
+ Owner-approved revision, 2026-11-23, #1170. OpenCode owns package installation
482
+ and plugin loading. Only the loaded plugin supplies the native target version.
483
+ This revision supersedes the earlier OpenCode install-only update sequence in
484
+ the shared manual reopen contract. DSH keeps its existing sequence.
485
+
486
+ Scope: one OpenCode package update. Parent: plugin management. Inputs: the
487
+ configured package source and the user's update action. Outputs: actual package,
488
+ loading and native preparation results. Errors remain with their stage. Normal
489
+ startup and the current Host's protection do not depend on update completion.
490
+
491
+ ```mermaid
492
+ flowchart LR
493
+ C[OpenCode checks the installed FinShield package] -->|New version available| N[FinShield shows an update notification]
494
+ N -->|User selects Update| U[OpenCode updates the package]
495
+ U --> L[OpenCode loads the new plugin]
496
+ L --> P[Loaded plugin synchronizes FinShield]
497
+ P --> R[Show actual results and manual reopen instructions]
498
+ ```
499
+
500
+ DSH lets its host manage the package update. OpenCode uses the built-in server's
501
+ plugin inventory, check and update APIs for the same responsibility. FinShield
502
+ checks its configured package on launch, periodically and on request from its
503
+ settings page. A notification offers Update or Later. The host applies the
504
+ configured source and version rules. Checking does not change the package or
505
+ touch the native installation. Update starts only after user confirmation.
506
+
507
+ The old plugin finishes after `plugin.update()` returns. It does not read
508
+ `plugin.list()` to infer the native target or submit native installation.
509
+ Package completion is not plugin activation. If OpenCode does not load the new
510
+ plugin in this session, the user closes and reopens manually first. Loading
511
+ failures retain the host's error; no native task for the unloaded plugin starts.
512
+
513
+ The loaded server module reads its package version V once. Management
514
+ `version()` returns `{version: V}` without starting or waiting for an updater or
515
+ Host attachment. Status also reports this module version, independently of old
516
+ Host feedback. Host management objects are shared only within the same immutable
517
+ release, so B cannot inherit A's activation closure or SDK. Desktop attachment
518
+ uses the existing verified Main and Host inputs.
519
+
520
+ Parent node: `Loaded plugin synchronizes FinShield`. Inputs: the loaded package,
521
+ its delivered SDK, explicit roots and the existing updater channel. Output: the
522
+ native preparation task for V, or its original error. Plugin registration does
523
+ not wait for native installation or authorization.
524
+
525
+ ```mermaid
526
+ flowchart LR
527
+ V[Loaded module supplies its own version V] --> B[Bind using its SDK and explicit roots]
528
+ B --> E[Submit existing ensure operation for V]
529
+ E --> M[Existing updater installs and authorizes FinShield V]
530
+ M --> R[Report preparation result and manual reopen requirement]
531
+ ```
532
+
533
+ In a protected session, B connects to the existing ordinary A updater. That
534
+ updater keeps its own A runtime and SDK while executing the B installation and
535
+ authorization task. Its own version is not the target. No updater replacement,
536
+ SDK hot replacement, new ordinary process or version-negotiation flow is added.
537
+ Normal ordinary startup still creates a fresh updater through the existing
538
+ acquisition operation. `manageInstallation:false` remains read-only.
539
+
540
+ Existing `ensure` handles same-version state and full preparation. The
541
+ install-only acknowledgment is not completion or authorization success.
542
+ The page distinguishes package completion, the loaded server module version,
543
+ native work and its errors, and current Host protection. Window-local handoff
544
+ data keeps only the package notice; it does not select the native release.
545
+ Exit stops OpenCode without relaunching it. If a reopen was needed to load B,
546
+ another reopen can still be needed to activate prepared FinShield B.
547
+
548
+ V is passed unchanged to settings and management. Stable releases use the same
549
+ three-part version for plugin, bundled SDK and FinShield. Local suffixes are
550
+ not stripped to claim alignment: the existing stable-only native delivery
551
+ contract reports its error until a separate suffixed-release contract is
552
+ defined. Complete package staging and explicit version roots remain unchanged;
553
+ OpenCode cache generations are never scanned for a target.
554
+
555
+ ## Configuration and removal
556
+
557
+ The product owns `windows/config/opencode-plugin/manifest.yaml`. Resolve
558
+ generates the packaged `policy/candidate.yaml` from the OpenCode base, Windows
559
+ mandatory rules and the existing OpenCode compatibility source.
560
+ Native versions are separate children of `opencode-plugin-versions`. The read-only
561
+ install rule covers their stable parent. Resolve/Materialize must produce equal
562
+ authorization inputs for a version-directory change. Actual native upgrade
563
+ receipt reuse still requires installed acceptance.
564
+
565
+ During setup, a byte-for-byte match for the original prototype Candidate
566
+ selects the bundled formal Candidate for the new version. Staging keeps edited
567
+ Candidates and leaves the active installation's configuration in place.
568
+
569
+ Development selects existing `finsafe.shared` with `manageInstallation:false`.
570
+ Its configuration and authorization remain unchanged. Native management requires
571
+ the plugin's own domain, `finshield.opencode`, for product setup or authorization.
572
+ The package's requested native release never selects an external runtime update.
573
+
574
+ OpenCode's Extensions switch controls GUI only. Native negative-ID configuration
575
+ controls server loading. Removing the package entry releases its management
576
+ binding; the current protected Host, runtime, configuration and authorization
577
+ remain. Native uninstall is rejected before dispatch. No native uninstall driver
578
+ or implementation is part of this plugin.
579
+
580
+ ## Design references and local ownership
581
+
582
+ | Reference | OpenCode-owned implementation |
583
+ | --- | --- |
584
+ | DSH independent updater lifecycle | `updater/coordinator.js`, `src/activation.js` |
585
+ | DSH fixed management transport pattern | `updater/protocol.js`, `updater/native.js`, OpenCode AppSeam |
586
+ | DSH installer/authorization orchestration pattern | `install/`, `src/preparation.js`, `updater/operations.js` |
587
+ | DSH page interaction pattern | `ui/`, `src/gui.tsx`, `src/presentation.js` |
588
+ | OpenCode Desktop/SDK 2.3.0 native contract | `src/index.js`, `updater/launch.js`, OpenCode AppSeam |
589
+
590
+ Inspected OpenCode source: `v2.3.0`, commit
591
+ `a6b15d33daf6ab7d35569f6d711fdb630b9f04e7`, MIT. Native service registration,
592
+ Promise RPC, GUI SettingsPage and Back to app follow that pinned contract.
593
+ No desktop patch, extra server choice or session proxy is introduced.
package/LICENSE.rtf ADDED
@@ -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
+ }