@quantod/qq 0.3.2 → 0.3.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/dist/db.d.ts.map +1 -1
- package/dist/db.js +5 -1
- package/dist/db.js.map +1 -1
- package/package.json +1 -1
- package/src/db.ts +7 -1
package/dist/db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AA2CtC,wBAAgB,MAAM,IAAI,QAAQ,CAAC,QAAQ,CAS1C;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAEtE"}
|
package/dist/db.js
CHANGED
|
@@ -31,13 +31,17 @@ CREATE INDEX IF NOT EXISTS idx_claim_pri ON messages (pipeline, subqueue, claime
|
|
|
31
31
|
`;
|
|
32
32
|
function dbDir() {
|
|
33
33
|
const home = process.env.HOME;
|
|
34
|
-
if (home) {
|
|
34
|
+
if (home?.startsWith('/sessions')) {
|
|
35
35
|
try {
|
|
36
36
|
const workspace = (0, node_fs_1.readFileSync)((0, node_path_1.join)(home, '.cowork_workspace_location'), 'utf8').trim();
|
|
37
37
|
if (workspace)
|
|
38
38
|
return (0, node_path_1.join)(workspace, '.claude', 'qq');
|
|
39
39
|
}
|
|
40
40
|
catch { /* file absent */ }
|
|
41
|
+
throw new Error('Cowork sandboxed environment detected.\n' +
|
|
42
|
+
'Before using qq, write your sandbox workspace path to $HOME/.cowork_workspace_location:\n' +
|
|
43
|
+
' echo "<sandbox workspace path>" > $HOME/.cowork_workspace_location\n' +
|
|
44
|
+
'Find the workspace path in your system prompt\'s shell access path mapping.');
|
|
41
45
|
}
|
|
42
46
|
return (0, node_path_1.join)(process.cwd(), '.claude', 'qq');
|
|
43
47
|
}
|
package/dist/db.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts"],"names":[],"mappings":";;;;;AA2CA,wBASC;AAED,sCAEC;AAxDD,oEAAsC;AACtC,qCAAkD;AAClD,yCAAiC;AAEjC,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;CAoBX,CAAC;AAEF,SAAS,KAAK;IACZ,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;IAC9B,IAAI,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAA,sBAAY,EAAC,IAAA,gBAAI,EAAC,IAAI,EAAE,4BAA4B,CAAC,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;YACxF,IAAI,SAAS;gBAAE,OAAO,IAAA,gBAAI,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;QACzD,CAAC;QAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,0CAA0C;YAC1C,2FAA2F;YAC3F,wEAAwE;YACxE,6EAA6E,CAC9E,CAAC;IACJ,CAAC;IACD,OAAO,IAAA,gBAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,MAAM;IACpB,MAAM,GAAG,GAAG,KAAK,EAAE,CAAC;IACpB,IAAA,mBAAS,EAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpC,MAAM,EAAE,GAAG,IAAI,wBAAQ,CAAC,IAAA,gBAAI,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5C,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;IACnC,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACjC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC/B,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,aAAa,CAAI,EAAqB,EAAE,EAAW;IACjE,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC;AACxC,CAAC"}
|
package/package.json
CHANGED
package/src/db.ts
CHANGED
|
@@ -26,11 +26,17 @@ CREATE INDEX IF NOT EXISTS idx_claim_pri ON messages (pipeline, subqueue, claime
|
|
|
26
26
|
|
|
27
27
|
function dbDir(): string {
|
|
28
28
|
const home = process.env.HOME;
|
|
29
|
-
if (home) {
|
|
29
|
+
if (home?.startsWith('/sessions')) {
|
|
30
30
|
try {
|
|
31
31
|
const workspace = readFileSync(join(home, '.cowork_workspace_location'), 'utf8').trim();
|
|
32
32
|
if (workspace) return join(workspace, '.claude', 'qq');
|
|
33
33
|
} catch { /* file absent */ }
|
|
34
|
+
throw new Error(
|
|
35
|
+
'Cowork sandboxed environment detected.\n' +
|
|
36
|
+
'Before using qq, write your sandbox workspace path to $HOME/.cowork_workspace_location:\n' +
|
|
37
|
+
' echo "<sandbox workspace path>" > $HOME/.cowork_workspace_location\n' +
|
|
38
|
+
'Find the workspace path in your system prompt\'s shell access path mapping.'
|
|
39
|
+
);
|
|
34
40
|
}
|
|
35
41
|
return join(process.cwd(), '.claude', 'qq');
|
|
36
42
|
}
|