sneakoscope 10.5.8 → 10.5.9
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 +1 -1
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/config/skills-manifest.json +1 -1
- package/dist/core/agents/agent-orchestrator.js +10 -7
- package/dist/core/fsx.js +63 -0
- package/dist/core/version.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Sneakoscope Codex (`sks`) is an open-source local tool for the Codex CLI and Codex desktop app. It adds a macOS control center, bounded agent workflows, repository context, and evidence checks for SKS releases.
|
|
18
18
|
<!-- END SKS SEARCH VISIBILITY MARKETING -->
|
|
19
19
|
|
|
20
|
-
Current package: **SKS 10.5.
|
|
20
|
+
Current package: **SKS 10.5.9**, prepared for npm publication.
|
|
21
21
|
[Release notes](https://github.com/mandarange/Sneakoscope-Codex/releases/tag/v10.5.8)
|
|
22
22
|
· [Changelog](CHANGELOG.md). Install the latest stable release from npm.
|
|
23
23
|
|
|
@@ -663,13 +663,16 @@ export async function resolveAgentMissionPrompt(root, opts) {
|
|
|
663
663
|
readJson(path.join(dir, 'route-context.json'), null),
|
|
664
664
|
readJson(path.join(dir, 'mission.json'), null)
|
|
665
665
|
]);
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
666
|
+
const candidates = [
|
|
667
|
+
intake?.transformed_prompt,
|
|
668
|
+
routeContext?.transformed_prompt,
|
|
669
|
+
routeContext?.task,
|
|
670
|
+
routeContext?.prompt,
|
|
671
|
+
mission?.prompt,
|
|
672
|
+
direct,
|
|
673
|
+
'Native agent run'
|
|
674
|
+
];
|
|
675
|
+
return candidates.find((value) => typeof value === 'string' && value.trim().length > 0).trim();
|
|
673
676
|
}
|
|
674
677
|
function normalizeMissionHardTimeoutMs(opts = {}, route = '') {
|
|
675
678
|
const raw = Number(opts.hardTimeoutMs || opts.agentHardTimeoutMs || process.env.SKS_AGENT_HARD_TIMEOUT_MS || 0);
|
package/dist/core/fsx.js
CHANGED
|
@@ -693,9 +693,72 @@ export async function terminateProcessTree(pid, child) {
|
|
|
693
693
|
signalProcessTree(pid, 'SIGTERM', child);
|
|
694
694
|
if (await waitForProcessTreeExit(pid, 1_000))
|
|
695
695
|
return;
|
|
696
|
+
await killProcessGroupDescendants(pid);
|
|
696
697
|
signalProcessTree(pid, 'SIGKILL', child);
|
|
697
698
|
await waitForProcessTreeExit(pid, 1_500);
|
|
698
699
|
}
|
|
700
|
+
async function killProcessGroupDescendants(groupId) {
|
|
701
|
+
if (!groupId || process.platform === 'win32')
|
|
702
|
+
return;
|
|
703
|
+
const members = linuxProcessGroupMembers(groupId)
|
|
704
|
+
.filter((member) => member.pid !== groupId)
|
|
705
|
+
.sort((left, right) => right.depth - left.depth || right.pid - left.pid);
|
|
706
|
+
for (const member of members) {
|
|
707
|
+
try {
|
|
708
|
+
process.kill(member.pid, 'SIGKILL');
|
|
709
|
+
}
|
|
710
|
+
catch { }
|
|
711
|
+
}
|
|
712
|
+
if (members.length)
|
|
713
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
714
|
+
}
|
|
715
|
+
function linuxProcessGroupMembers(groupId) {
|
|
716
|
+
if (process.platform !== 'linux')
|
|
717
|
+
return [];
|
|
718
|
+
let entries;
|
|
719
|
+
try {
|
|
720
|
+
entries = fs.readdirSync('/proc');
|
|
721
|
+
}
|
|
722
|
+
catch {
|
|
723
|
+
return [];
|
|
724
|
+
}
|
|
725
|
+
const rows = [];
|
|
726
|
+
for (const entry of entries) {
|
|
727
|
+
if (!/^\d+$/.test(entry))
|
|
728
|
+
continue;
|
|
729
|
+
const stat = readLinuxProcessStat(Number(entry));
|
|
730
|
+
if (!stat || stat.pgrp !== groupId)
|
|
731
|
+
continue;
|
|
732
|
+
rows.push({ pid: stat.pid, ppid: stat.ppid });
|
|
733
|
+
}
|
|
734
|
+
const parents = new Map(rows.map((row) => [row.pid, row.ppid]));
|
|
735
|
+
return rows.map((row) => {
|
|
736
|
+
let depth = 0;
|
|
737
|
+
const seen = new Set();
|
|
738
|
+
let current = row.ppid;
|
|
739
|
+
while (parents.has(current) && !seen.has(current)) {
|
|
740
|
+
seen.add(current);
|
|
741
|
+
depth += 1;
|
|
742
|
+
current = parents.get(current);
|
|
743
|
+
}
|
|
744
|
+
return { pid: row.pid, depth };
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
function readLinuxProcessStat(pid) {
|
|
748
|
+
try {
|
|
749
|
+
const text = fs.readFileSync(`/proc/${pid}/stat`, 'utf8');
|
|
750
|
+
const close = text.lastIndexOf(')');
|
|
751
|
+
if (close < 0)
|
|
752
|
+
return null;
|
|
753
|
+
const fields = text.slice(close + 1).trim().split(/\s+/);
|
|
754
|
+
const ppid = Number(fields[1]);
|
|
755
|
+
const pgrp = Number(fields[2]);
|
|
756
|
+
return Number.isInteger(ppid) && Number.isInteger(pgrp) ? { pid, ppid, pgrp } : null;
|
|
757
|
+
}
|
|
758
|
+
catch {
|
|
759
|
+
return null;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
699
762
|
function signalProcessTree(pid, signal, child) {
|
|
700
763
|
if (pid && process.platform !== 'win32') {
|
|
701
764
|
try {
|
package/dist/core/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '10.5.
|
|
1
|
+
export const PACKAGE_VERSION = '10.5.9';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "ㅅㅋㅅ",
|
|
4
|
-
"version": "10.5.
|
|
4
|
+
"version": "10.5.9",
|
|
5
5
|
"description": "Sneakoscope Codex (`sks`) is an open-source trust layer for Codex CLI and ChatGPT Desktop. It coordinates bounded AI coding agents, records machine-verifiable evidence, preserves project memory, and blocks release claims that are not supported by current tests or artifacts. Search visibility outcomes are measured separately; SKS does not promise rankings or traffic.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
|
|
@@ -193,8 +193,8 @@
|
|
|
193
193
|
"dependencies": {
|
|
194
194
|
"@modelcontextprotocol/client": "2.3.1",
|
|
195
195
|
"@modelcontextprotocol/server": "2.3.1",
|
|
196
|
-
"@openai/codex-sdk": "0.
|
|
197
|
-
"smol-toml": "^1.9.
|
|
196
|
+
"@openai/codex-sdk": "0.163.0",
|
|
197
|
+
"smol-toml": "^1.9.1",
|
|
198
198
|
"typescript": "^6.0.3",
|
|
199
199
|
"ws": "^8.22.0"
|
|
200
200
|
},
|