pi-codex-marketplace 1.0.2 → 1.0.3
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/package.json +1 -1
- package/src/bridge/command.ts +4 -4
- package/src/cli/index.ts +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-codex-marketplace",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Bridge Package for Codex and Claude Marketplace compatibility in Pi — 極簡 /codex-marketplace 純文字指令與 Headless CLI(add/list/install/update/disable/enable/remove/forget)、單一 Global Bridge State、當下最新安裝與即時投影",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
package/src/bridge/command.ts
CHANGED
|
@@ -46,7 +46,7 @@ import { SourceCache } from '../cache/source-cache.js';
|
|
|
46
46
|
|
|
47
47
|
export interface CommandOptions {
|
|
48
48
|
/** Optional presentation-only update progress; final result remains authoritative. */
|
|
49
|
-
onProgress?: (message: string) => void;
|
|
49
|
+
onProgress?: (message: string, kind?: 'activity' | 'result') => void;
|
|
50
50
|
statePath?: string;
|
|
51
51
|
agentDir?: string;
|
|
52
52
|
cwd?: string;
|
|
@@ -492,9 +492,9 @@ export async function runCommand(
|
|
|
492
492
|
}
|
|
493
493
|
const subcmd = rawArgs[0]?.toLowerCase();
|
|
494
494
|
|
|
495
|
-
const progress = (message: string): void => {
|
|
495
|
+
const progress = (message: string, kind: 'activity' | 'result' = 'activity'): void => {
|
|
496
496
|
// An observer must never affect acquisition or durable state.
|
|
497
|
-
try { opts.onProgress?.(message); } catch {}
|
|
497
|
+
try { opts.onProgress?.(message, kind); } catch {}
|
|
498
498
|
};
|
|
499
499
|
if (subcmd === 'update') progress('開始更新 Marketplace…');
|
|
500
500
|
|
|
@@ -971,7 +971,7 @@ export async function runCommand(
|
|
|
971
971
|
const updateLines: string[] = [];
|
|
972
972
|
const report = (line: string): void => {
|
|
973
973
|
updateLines.push(line);
|
|
974
|
-
progress(line);
|
|
974
|
+
progress(line, 'result');
|
|
975
975
|
};
|
|
976
976
|
let anyChanged = false; // 有 plugin 實際升到最新 → reload+結尾「已重新載入生效」
|
|
977
977
|
let gitAdvanced = false; // git registration 已推進到新 fingerprint → 需持久化(即使無已安裝 plugin)
|
package/src/cli/index.ts
CHANGED
|
@@ -77,7 +77,12 @@ export async function runCli(
|
|
|
77
77
|
try {
|
|
78
78
|
result = await runCommand(argv, {
|
|
79
79
|
...opts,
|
|
80
|
-
onProgress(message) {
|
|
80
|
+
onProgress(message, kind) {
|
|
81
|
+
// Result lines belong to the authoritative final summary, not both streams.
|
|
82
|
+
if (kind === 'result') {
|
|
83
|
+
opts.onProgress?.(message, kind);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
81
86
|
clearActivity();
|
|
82
87
|
writeStream(io.stderr, message);
|
|
83
88
|
if (terminal) {
|
|
@@ -89,7 +94,7 @@ export async function runCli(
|
|
|
89
94
|
}, 100);
|
|
90
95
|
timer.unref();
|
|
91
96
|
}
|
|
92
|
-
opts.onProgress?.(message);
|
|
97
|
+
opts.onProgress?.(message, kind);
|
|
93
98
|
},
|
|
94
99
|
});
|
|
95
100
|
} finally {
|