gm-skill 2.0.2293 → 2.0.2294
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/gm-plugkit/package.json +1 -1
- package/gm.json +1 -1
- package/package.json +1 -1
- package/scripts/wipe-org-gm-dirs.mjs +65 -0
package/gm-plugkit/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2294",
|
|
4
4
|
"description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform wasm, verifies SHA256, and launches agentplug-runner (the native wasm host) as the spool watcher daemon.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/gm.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2294",
|
|
4
4
|
"description": "Canonical universal harness — AI-native software engineering via skill-driven orchestration; bootstraps plugkit for task execution and session isolation. Install in any AI coding agent host.",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { execFileSync, execSync } from "node:child_process";
|
|
3
|
+
import { existsSync, rmSync, mkdtempSync } from "node:fs";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
|
|
7
|
+
const ORG = "AnEntrypoint";
|
|
8
|
+
const DRY_RUN = process.argv.includes("--dry-run");
|
|
9
|
+
const SKIP_SELF = "gm";
|
|
10
|
+
|
|
11
|
+
function gh(args) {
|
|
12
|
+
return execFileSync("gh", args, { encoding: "utf8" });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function listActiveRepos() {
|
|
16
|
+
const out = gh(["repo", "list", ORG, "--limit", "500", "--json", "name,isArchived,defaultBranchRef"]);
|
|
17
|
+
const repos = JSON.parse(out);
|
|
18
|
+
return repos.filter(r => !r.isArchived && r.name !== SKIP_SELF);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function cloneShallow(repo, dir) {
|
|
22
|
+
execFileSync("git", ["clone", "--depth", "1", "--filter=blob:none", `https://github.com/${ORG}/${repo}.git`, dir], { stdio: "pipe", timeout: 300_000 });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function hasGmDir(dir) {
|
|
26
|
+
return existsSync(join(dir, ".gm"));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function wipeAndPush(repo, dir) {
|
|
30
|
+
execSync("git rm -rf --quiet .gm", { cwd: dir });
|
|
31
|
+
execFileSync("git", ["commit", "-m", "chore: remove vendored .gm/ state (org-wide gm cleanup)"], { cwd: dir, stdio: "pipe" });
|
|
32
|
+
if (!DRY_RUN) {
|
|
33
|
+
execFileSync("git", ["push", "origin", "HEAD"], { cwd: dir, stdio: "pipe" });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function main() {
|
|
38
|
+
const repos = listActiveRepos();
|
|
39
|
+
const results = [];
|
|
40
|
+
for (const repo of repos) {
|
|
41
|
+
const dir = mkdtempSync(join(tmpdir(), `gm-wipe-${repo.name}-`));
|
|
42
|
+
try {
|
|
43
|
+
cloneShallow(repo.name, dir);
|
|
44
|
+
if (!hasGmDir(dir)) {
|
|
45
|
+
results.push({ repo: repo.name, action: "skipped-no-gm-dir" });
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
wipeAndPush(repo.name, dir);
|
|
49
|
+
results.push({ repo: repo.name, action: DRY_RUN ? "would-wipe" : "wiped" });
|
|
50
|
+
} catch (e) {
|
|
51
|
+
results.push({ repo: repo.name, action: "error", detail: String(e.message || e).slice(0, 300) });
|
|
52
|
+
} finally {
|
|
53
|
+
rmSync(dir, { recursive: true, force: true });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const summary = {
|
|
57
|
+
total_repos_scanned: repos.length,
|
|
58
|
+
wiped: results.filter(r => r.action === "wiped" || r.action === "would-wipe").length,
|
|
59
|
+
skipped: results.filter(r => r.action === "skipped-no-gm-dir").length,
|
|
60
|
+
errors: results.filter(r => r.action === "error"),
|
|
61
|
+
};
|
|
62
|
+
console.log(JSON.stringify({ summary, results }, null, 2));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
main();
|