@bash0816/copilot-termux 1.0.75 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/config/copilot-termux-release-manifest.json +4 -4
- package/config/manifest.json +2 -2
- package/lib/platform-patch.js +46 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,10 +6,10 @@ Termux (Android aarch64) 向け GitHub Copilot CLI パッケージです。
|
|
|
6
6
|
|
|
7
7
|
## Status / 状態
|
|
8
8
|
|
|
9
|
-
- **@latest**: `1.0.
|
|
10
|
-
- `copilot -p`: **available** ✅(1.0.
|
|
11
|
-
- TUI (`copilot`): **available** ✅(1.0.
|
|
12
|
-
- MCP: **available** ✅(1.0.
|
|
9
|
+
- **@latest**: `1.0.77`(recommended / 推奨。1.0.65 の TUI login regression・`/update`参照先・起動時通知バナーの問題を修正済み)
|
|
10
|
+
- `copilot -p`: **available** ✅(1.0.77)
|
|
11
|
+
- TUI (`copilot`): **available** ✅(1.0.77)
|
|
12
|
+
- MCP: **available** ✅(1.0.77)
|
|
13
13
|
|
|
14
14
|
## Install / インストール
|
|
15
15
|
|
|
@@ -69,6 +69,12 @@ copilot-termux setup
|
|
|
69
69
|
- `modelHttp*`: AI モデル HTTP 呼び出し
|
|
70
70
|
- **pty.node**: Termux bionic ネイティブビルドの PTY モジュール
|
|
71
71
|
|
|
72
|
+
## Known Issues / 既知の問題
|
|
73
|
+
|
|
74
|
+
- **1.0.75+: bionic フォールバック経路でクラッシュする既知の問題があります。** glibc のセットアップが未完了/不十分な状態ではこの経路に入り、`copilot` がクラッシュして起動できません。**回避策**: `pkg install glibc-repo && pkg install glibc` を実施し、glibc modeで実行してください。
|
|
75
|
+
|
|
76
|
+
- **1.0.76のCAPI rename検知修正**(`BIONIC_SIGSEGV_STUB_GROUPS`)により、以前は該当exportが見つからずfail-safeで早期停止していたbionicフォールバック経路が、この既知のSIGSEGVそのものへ到達するようになりました。これはrename修正自体の回帰ではありません。
|
|
77
|
+
|
|
72
78
|
## License / ライセンス
|
|
73
79
|
|
|
74
80
|
- Wrapper code: GPL-3.0-only
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 1,
|
|
3
3
|
"package_name": "@bash0816/copilot-termux",
|
|
4
|
-
"copilot_version": "1.0.
|
|
5
|
-
"latest_audited_version": "1.0.
|
|
4
|
+
"copilot_version": "1.0.78",
|
|
5
|
+
"latest_audited_version": "1.0.77",
|
|
6
6
|
"latest_candidate_version": null,
|
|
7
|
-
"previous_stable_version": "1.0.
|
|
7
|
+
"previous_stable_version": "1.0.75",
|
|
8
8
|
"candidate_state": "none",
|
|
9
9
|
"canonical_package_status": "not_published",
|
|
10
10
|
"public_distribution_status": "staged",
|
|
11
11
|
"nodejs_glibc_version": "node-glibc-v24.15.0",
|
|
12
12
|
"build_run_id": null,
|
|
13
|
-
"last_updated": "2026-
|
|
13
|
+
"last_updated": "2026-08-04",
|
|
14
14
|
"manifest_url": "https://raw.githubusercontent.com/bash0816/Github-Copilot-Termux/main/packages/copilot-termux/config/copilot-termux-release-manifest.json"
|
|
15
15
|
}
|
package/config/manifest.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"wrapperVersion": "2.0.0",
|
|
3
3
|
"copilot": {
|
|
4
4
|
"package": "@github/copilot-linuxmusl-arm64",
|
|
5
|
-
"version": "1.0.
|
|
6
|
-
"integrity": "sha512-
|
|
5
|
+
"version": "1.0.78",
|
|
6
|
+
"integrity": "sha512-F/0cTMsz6ug4yiXn3RKaCAMsLR261U5Njb6G9Y/HeAI7ES/tKEo2t5SHuvgXaIH4mYiZsRvfDKdX7c0WgBX/Jg=="
|
|
7
7
|
},
|
|
8
8
|
"glibcNode": {
|
|
9
9
|
"version": "26.2.0",
|
package/lib/platform-patch.js
CHANGED
|
@@ -179,19 +179,52 @@ Module._load = function (request, parent, isMain) {
|
|
|
179
179
|
if (typeof request === 'string' &&
|
|
180
180
|
path.basename(request) === 'runtime.node') {
|
|
181
181
|
if (result.__copilotTermuxPatched) return result;
|
|
182
|
-
result.__copilotTermuxPatched = true;
|
|
183
182
|
let _nfIdSeq = 3e6;
|
|
184
183
|
const isGlibcMode = !!process.env.COPILOT_TERMUX_GLIBC_MODE;
|
|
185
184
|
if (!isGlibcMode) {
|
|
185
|
+
// MCP-BIONIC-001/CAPI-RENAME-001: preflight — 実際にexportを書き換える前に、
|
|
186
|
+
// 全bionicガードグループの存在を確認する。1グループでも全alias欠落していれば、
|
|
187
|
+
// TOKIO_PATTERN一括no-op化を含む以降の変更を一切行わずthrowする(原子性)。
|
|
188
|
+
const BIONIC_SIGSEGV_STUB_GROUPS = [
|
|
189
|
+
['capiClientRetrieveAvailableModels', 'capiClientRetrieveModelsForAuth'], // CAPI-RENAME-001: upstream 1.0.76でrename
|
|
190
|
+
['mcpClientConnectStreamableHttpWithHandlersAndOnclose'],
|
|
191
|
+
['mcpNativeHostConnect'], // MCP-BIONIC-002: bionic上でMCPサーバー接続処理が
|
|
192
|
+
// tokioワーカースレッド内でSIGSEGVするため、既存パターンと同型でクリーンなthrowに変換する
|
|
193
|
+
];
|
|
194
|
+
const _missingGroups = [];
|
|
195
|
+
const _groupTargets = [];
|
|
196
|
+
for (const group of BIONIC_SIGSEGV_STUB_GROUPS) {
|
|
197
|
+
const foundNames = group.filter(name => typeof result[name] === 'function');
|
|
198
|
+
if (foundNames.length === 0) {
|
|
199
|
+
_missingGroups.push(group.join('/'));
|
|
200
|
+
} else {
|
|
201
|
+
_groupTargets.push(foundNames);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (_missingGroups.length > 0) {
|
|
205
|
+
throw new Error(
|
|
206
|
+
`[copilot-termux] BIONIC_SIGSEGV_STUB_GROUPS target(s) not found in runtime.node: ${_missingGroups.join(', ')}. ` +
|
|
207
|
+
'This likely means upstream renamed/removed all known aliases for this guard. ' +
|
|
208
|
+
'Re-audit before releasing for bionic.'
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// preflight通過後、ここから実際にresultをin-place変更する。
|
|
186
213
|
// Rust tokio を使う関数群を no-op に差し替え。
|
|
187
214
|
// sessionStore*/sessionSqlite* は非同期 SQLite (tokio)、
|
|
188
215
|
// modelHttp*/networkFetch*/ahpRelay*/websocketResponses* は Rust HTTP (tokio)。
|
|
189
216
|
// jsonrpcServer* は拡張 JSON-RPC サーバー (ThreadsafeFunction)、
|
|
190
217
|
// lspClient* は LSP クライアント (ThreadsafeFunction)。
|
|
191
218
|
// featureFlagService* は同期 Rust のため除外(no-op にすると .handle クラッシュ)。
|
|
192
|
-
|
|
219
|
+
// TOKIO_EXCLUDED: TOKIO_PATTERNの前方一致(lspClient等)に誤って巻き込まれる同期関数の個別除外。
|
|
220
|
+
// lspClientOwnedProcessId は同期PID取得関数(1.0.76 G3レビューで発覚、実app.js内で
|
|
221
|
+
// `u=h.lspClientOwnedProcessId(d);...{handle:d,pid:u,exit:a}`という同期使用を確認済み)。
|
|
222
|
+
const TOKIO_EXCLUDED = new Set([
|
|
223
|
+
'lspClientOwnedProcessId',
|
|
224
|
+
]);
|
|
225
|
+
const TOKIO_PATTERN = /^(ahpRelay|ahpRelayAuthenticate|ahpRelayCancelTurn|ahpRelayCoerceCopilotUsage|ahpRelayCompleteInput|ahpRelayCompletions|ahpRelayConfirmToolCall|ahpRelayConnect|ahpRelayCreate|ahpRelayCreateSession|ahpRelayDispose|ahpRelayGetPlan|ahpRelayIsTurnAlreadyActiveRejection|ahpRelayListCheckpoints|ahpRelayListWorkspaceFiles|ahpRelayPendingRequiredResourcesJson|ahpRelayProjectHostSummary|ahpRelayReadCheckpoint|ahpRelayRefreshSessions|ahpRelayReleaseSession|ahpRelayRemovePendingMessage|ahpRelaySelectAgent|ahpRelaySessionDiff|ahpRelaySetMode|ahpRelaySetModel|ahpRelaySetPendingMessage|ahpRelaySetSessionApproveAll|ahpRelaySetTitle|ahpRelayStartTurn|ahpRelayStateJson|ahpRelaySubscribeSession|ahpRelayTerminalDispose|ahpRelayTerminalEnsure|ahpRelayTerminalWrite|jsonrpcServer|jsonrpcServerAddConnection|jsonrpcServerBeginShutdown|jsonrpcServerConnectionClose|jsonrpcServerConnectionNotify|jsonrpcServerConnectionNotifyAfterResponse|jsonrpcServerConnectionRequest|jsonrpcServerConnectionWrite|jsonrpcServerCreate|jsonrpcServerDispatchComplete|jsonrpcServerRegisterHookCallback|jsonrpcServerRegisterSession|jsonrpcServerRemove|jsonrpcServerRemoveSession|jsonrpcServerStartTcpListener|jsonrpcServerStopTcpListener|jsonrpcServerUnregisterHookCallback|jsonrpcServerUnregisterSessionHookCallback|lspClient|lspClientCloseDocument|lspClientCreateOwned|lspClientCreateOwnedSandboxed|lspClientDispose|lspClientEnhanceStartupErrorMessage|lspClientFindSourceFile|lspClientInitialize|lspClientInitialized|lspClientOpenDocument|lspClientOwnedProcessId|lspClientOwnedShutdown|lspClientRequest|lspClientTakeExitInfo|lspClientWaitForDiagnostics|lspClientWaitForProjectLoad|modelHttp|modelHttpCancelRequest|modelHttpRegisterCancellation|modelHttpResetNetworking|networkFetch|networkFetchGetExtraCaPems|networkFetchNextRequestId|networkFetchRequestCancel|networkFetchResetClients|sessionSqlite|sessionSqliteClose|sessionSqliteExec|sessionSqliteFileExists|sessionSqliteOpen|sessionSqliteQuery|sessionSqliteRun|sessionStore|sessionStoreBeginForgeSkillProposalGeneration|sessionStoreClose|sessionStoreCloseAll|sessionStoreCompleteForgeSkillProposalGeneration|sessionStoreDefaultPath|sessionStoreDeleteDynamicContextItem|sessionStoreEnsureSession|sessionStoreExec|sessionStoreExecuteReadOnly|sessionStoreExecuteReadOnlyAsync|sessionStoreExecuteReadOnlyWithCap|sessionStoreFailStaleGeneratingForgeSkillProposals|sessionStoreGetCheckpoints|sessionStoreGetDynamicContextBoard|sessionStoreGetDynamicContextItem|sessionStoreGetFiles|sessionStoreGetForgeSkillProposalByFingerprint|sessionStoreGetForgeSkillProposalById|sessionStoreGetForgeSkillProposalWorkspaceBefore|sessionStoreGetForgeTrajectoryEvents|sessionStoreGetForgeTrajectoryEventsForScope|sessionStoreGetMaxTurnIndex|sessionStoreGetRefs|sessionStoreGetSession|sessionStoreGetStats|sessionStoreGetTurns|sessionStoreIncrementDynamicContextCount|sessionStoreIncrementDynamicContextReadCount|sessionStoreIndexWorkspaceArtifact|sessionStoreInsertAssistantUsageEventWithRuntimeDefaults|sessionStoreInsertCheckpointWithRuntimeDefaults|sessionStoreInsertDynamicContextItem|sessionStoreInsertFileWithRuntimeDefaults|sessionStoreInsertForgeTrajectoryEventWithRuntimeDefaults|sessionStoreInsertRefWithRuntimeDefaults|sessionStoreInsertTurnWithRuntimeDefaults|sessionStoreListForgeSkillProposals|sessionStoreOpen|sessionStoreSearch|sessionStoreTrackingEventOperations|sessionStoreTrackingExtractFilePath|sessionStoreTrackingExtractForgeTrajectoryEvents|sessionStoreTrackingExtractRefsFromBash|sessionStoreTrackingExtractRefsFromMcpTool|sessionStoreTrackingExtractRepoFromMcpTool|sessionStoreTrackingFinalizePostToolUseInput|sessionStoreTrackingFlushOperations|sessionStoreTrackingForgeAgentFeatureFlagName|sessionStoreTrackingInitSessionState|sessionStoreTrackingInitialState|sessionStoreTrackingIsForgeEnabledInEnvironment|sessionStoreTrackingIsForgeTrackingEnabled|sessionStoreTrackingPostToolUsePlan|sessionStoreTransitionForgeSkillProposalStatus|sessionStoreUpsertDynamicContextItem|sessionStoreUpsertSessionWithRuntimeDefaults|websocketResponses|websocketResponsesPersistent)/;
|
|
193
226
|
for (const key of Object.keys(result)) {
|
|
194
|
-
if (TOKIO_PATTERN.test(key) && typeof result[key] === 'function') {
|
|
227
|
+
if (TOKIO_PATTERN.test(key) && !TOKIO_EXCLUDED.has(key) && typeof result[key] === 'function') {
|
|
195
228
|
result[key] = () => undefined;
|
|
196
229
|
}
|
|
197
230
|
}
|
|
@@ -199,29 +232,15 @@ Module._load = function (request, parent, isMain) {
|
|
|
199
232
|
// 実際に使われるため、no-opのままにはできない。TOKIO_PATTERNの一括no-op化で
|
|
200
233
|
// 潰された直後にJSの単調増加ID生成で上書きする。
|
|
201
234
|
result.networkFetchNextRequestId = () => 'nf-' + (++_nfIdSeq);
|
|
202
|
-
|
|
203
|
-
//
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
// tokioワーカースレッド内でSIGSEGVするため、既存パターンと同型でクリーンなthrowに変換する
|
|
209
|
-
];
|
|
210
|
-
for (const _key of BIONIC_SIGSEGV_STUBS) {
|
|
211
|
-
if (typeof result[_key] === 'function') {
|
|
212
|
-
result[_key] = () => {
|
|
213
|
-
throw new Error(`${_key} unsupported on Android bionic (native tokio disabled to avoid SIGSEGV)`);
|
|
235
|
+
|
|
236
|
+
// preflightで確認済みのグループのみスタブ化(この時点で欠落は無いことが保証されている)
|
|
237
|
+
for (const foundNames of _groupTargets) {
|
|
238
|
+
for (const name of foundNames) {
|
|
239
|
+
result[name] = () => {
|
|
240
|
+
throw new Error(`${name} unsupported on Android bionic (native tokio disabled to avoid SIGSEGV)`);
|
|
214
241
|
};
|
|
215
242
|
}
|
|
216
243
|
}
|
|
217
|
-
const _missingBionicStubs = BIONIC_SIGSEGV_STUBS.filter(_key => typeof result[_key] !== 'function');
|
|
218
|
-
if (_missingBionicStubs.length > 0) {
|
|
219
|
-
throw new Error(
|
|
220
|
-
`[copilot-termux] BIONIC_SIGSEGV_STUBS target(s) not found in runtime.node: ${_missingBionicStubs.join(', ')}. ` +
|
|
221
|
-
'This likely means upstream renamed/removed a NAPI export that this SIGSEGV guard depends on. ' +
|
|
222
|
-
'Re-audit before releasing for bionic.'
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
244
|
// git*Async: Rust tokio async functions — type-safe stubs to prevent SIGSEGV.
|
|
226
245
|
// Returns empty/null values matching what app.js callers expect.
|
|
227
246
|
const GIT_ASYNC_STUBS = {
|
|
@@ -1424,6 +1443,10 @@ Module._load = function (request, parent, isMain) {
|
|
|
1424
1443
|
// === end ifcEngine* stubs ===
|
|
1425
1444
|
}
|
|
1426
1445
|
// --- end JS model HTTP implementation ---
|
|
1446
|
+
// runtime.node に対する全パッチ処理(bionic分岐のpreflight・スタブ化・glibc共通処理)が
|
|
1447
|
+
// 成功した場合にのみマーカーを設定する(原子性: 途中でthrowした場合はここに到達しないため
|
|
1448
|
+
// マーカーは残らず、次回requireで再度preflightからやり直される)。
|
|
1449
|
+
result.__copilotTermuxPatched = true;
|
|
1427
1450
|
}
|
|
1428
1451
|
|
|
1429
1452
|
// === cli-native.node stubs (1.0.64+: color scheme fns use Rust tokio → SIGSEGV on bionic) ===
|