@tomflow/chatloop-extension 0.4.30 → 0.4.31
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 +5 -1
- package/extension/manifest.json +1 -1
- package/lib/bridge.mjs +13 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -93,7 +93,11 @@ a Worker-only failed Native sync permits at most one additional fenced repair,
|
|
|
93
93
|
never a general BLOCKED retry. Two distinct genuine Form A-confirmation
|
|
94
94
|
user Turns may serve as SOFT R/P evidence in an explicitly
|
|
95
95
|
specified original Chat; this never substitutes for Context approval or Start
|
|
96
|
-
permission. IPC messages are one-shot and have durable identity checks.
|
|
96
|
+
permission. IPC messages are one-shot and have durable identity checks. CLI and Native
|
|
97
|
+
Host resolve the same private `chatloop-extension-v2-<uid>` IPC directory in
|
|
98
|
+
the fixed system temporary root (macOS `/private/tmp`, Linux `/tmp`),
|
|
99
|
+
independent of TMPDIR/TMP/TEMP. The prior namespace is retained as historical
|
|
100
|
+
receipt evidence and is never searched or replayed by this protocol.
|
|
97
101
|
|
|
98
102
|
This package's source version is read from its own `package.json`. Installed
|
|
99
103
|
Tools/Context consumers may pin a different Extension version; updating
|
package/extension/manifest.json
CHANGED
package/lib/bridge.mjs
CHANGED
|
@@ -27,7 +27,19 @@ function pathEntryExists(path){
|
|
|
27
27
|
catch(error){if(error.code==='ENOENT')return false;throw error}
|
|
28
28
|
}
|
|
29
29
|
export const configFile = () => join(homedir(), '.chat-loop', 'extension', 'config.json');
|
|
30
|
-
|
|
30
|
+
// The CLI and Chrome Native Host have independent environments. A fixed
|
|
31
|
+
// v2 namespace also fences unresolved requests from the former TMPDIR-based
|
|
32
|
+
// transport: never scan, migrate or replay those records.
|
|
33
|
+
export const tempRoot = () => {
|
|
34
|
+
const base=process.platform==='darwin'?'/private/tmp':process.platform==='linux'?'/tmp':tmpdir();
|
|
35
|
+
if(process.platform!=='win32'){
|
|
36
|
+
const st=lstatSync(base);
|
|
37
|
+
if(!st.isDirectory()||st.isSymbolicLink()||st.uid!==0
|
|
38
|
+
||!(st.mode&0o1000)||!(st.mode&0o002))
|
|
39
|
+
throw Object.assign(Error('Untrusted IPC temp root'),{code:'UNTRUSTED_STATE'});
|
|
40
|
+
}
|
|
41
|
+
return join(base,'chatloop-extension-v2-'+(process.getuid?.()??process.env.USERNAME??'user'));
|
|
42
|
+
};
|
|
31
43
|
export function privateDir(path) {
|
|
32
44
|
mkdirSync(path, {recursive:true, mode:0o700});
|
|
33
45
|
const st=lstatSync(path);
|