@wipcomputer/memory-crystal 0.7.32 → 0.7.33
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/SKILL.md +1 -1
- package/cloud/wrangler.toml +30 -0
- package/dist/bridge.d.ts +7 -0
- package/dist/bridge.js +14 -0
- package/dist/bulk-copy.d.ts +17 -0
- package/dist/bulk-copy.js +90 -0
- package/dist/cc-hook.d.ts +8 -0
- package/dist/cc-hook.js +368 -0
- package/dist/cc-poller.d.ts +1 -0
- package/dist/cc-poller.js +550 -0
- package/dist/chunk-25LXQJ4Z.js +110 -0
- package/dist/chunk-2DRXIRQW.js +97 -0
- package/dist/chunk-2GBYLMEF.js +1385 -0
- package/dist/chunk-2ZNH5F6E.js +1281 -0
- package/dist/chunk-3G3SFYYI.js +288 -0
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/chunk-3S6TI23B.js +97 -0
- package/dist/chunk-3VFIJYS4.js +818 -0
- package/dist/chunk-437F27T6.js +97 -0
- package/dist/chunk-52QE3YI3.js +1169 -0
- package/dist/chunk-57RP3DIN.js +1205 -0
- package/dist/chunk-5HSZ4W2P.js +62 -0
- package/dist/chunk-5I7GMRDN.js +146 -0
- package/dist/chunk-645IPXW3.js +290 -0
- package/dist/chunk-7A7ELD4C.js +1205 -0
- package/dist/chunk-7FYY4GZM.js +1205 -0
- package/dist/chunk-7IUE7ODU.js +254 -0
- package/dist/chunk-7RMLKZIS.js +108 -0
- package/dist/chunk-AA3OPP4Z.js +432 -0
- package/dist/chunk-AEWLSYPH.js +72 -0
- package/dist/chunk-ASSZDR6I.js +108 -0
- package/dist/chunk-AYRJVWUC.js +1205 -0
- package/dist/chunk-CCYI5O3D.js +148 -0
- package/dist/chunk-CGIDSAJB.js +288 -0
- package/dist/chunk-D3I3ZSE2.js +411 -0
- package/dist/chunk-D3MACYZ4.js +108 -0
- package/dist/chunk-DACSKLY6.js +219 -0
- package/dist/chunk-DFQ72B7M.js +248 -0
- package/dist/chunk-DW5B4BL7.js +108 -0
- package/dist/chunk-EKSACBTJ.js +1070 -0
- package/dist/chunk-EXEZZADG.js +248 -0
- package/dist/chunk-F3Y7EL7K.js +83 -0
- package/dist/chunk-FBQWSDPC.js +1328 -0
- package/dist/chunk-FHRZNOMW.js +1205 -0
- package/dist/chunk-IM7N24MT.js +129 -0
- package/dist/chunk-IPNYIXFK.js +1178 -0
- package/dist/chunk-J7MRSZIO.js +167 -0
- package/dist/chunk-JITKI2OI.js +106 -0
- package/dist/chunk-JWZXYVET.js +1068 -0
- package/dist/chunk-KCQUXVYT.js +108 -0
- package/dist/chunk-KOQ43OX6.js +1281 -0
- package/dist/chunk-KYVWO6ZM.js +1069 -0
- package/dist/chunk-L3VHARQH.js +413 -0
- package/dist/chunk-LBWDS6BE.js +288 -0
- package/dist/chunk-LOVAHSQV.js +411 -0
- package/dist/chunk-LQOYCAGG.js +446 -0
- package/dist/chunk-LWAIPJ2W.js +146 -0
- package/dist/chunk-M5DHKW7M.js +127 -0
- package/dist/chunk-MBKCIJHM.js +1328 -0
- package/dist/chunk-MK42FMEG.js +147 -0
- package/dist/chunk-MOBMYHKL.js +1205 -0
- package/dist/chunk-MPLTNMRG.js +67 -0
- package/dist/chunk-NIJCVN3O.js +147 -0
- package/dist/chunk-NX647OM3.js +310 -0
- package/dist/chunk-NZCFSZQ7.js +1205 -0
- package/dist/chunk-O2UITJGH.js +465 -0
- package/dist/chunk-OCRA44AZ.js +108 -0
- package/dist/chunk-P3KJR66H.js +117 -0
- package/dist/chunk-PEK6JH65.js +432 -0
- package/dist/chunk-PJ6FFKEX.js +77 -0
- package/dist/chunk-PLUBBZYR.js +800 -0
- package/dist/chunk-PNKVD2UK.js +26 -0
- package/dist/chunk-PSQZURHO.js +229 -0
- package/dist/chunk-SGL6ISBJ.js +1061 -0
- package/dist/chunk-SJABZZT5.js +97 -0
- package/dist/chunk-TD3P3K32.js +1199 -0
- package/dist/chunk-TMDZJJKV.js +288 -0
- package/dist/chunk-UNHVZB5G.js +411 -0
- package/dist/chunk-VAFTWSTE.js +1061 -0
- package/dist/chunk-VNFXFQBB.js +217 -0
- package/dist/chunk-X3GVFKSJ.js +1205 -0
- package/dist/chunk-XZ3S56RQ.js +1061 -0
- package/dist/chunk-Y72C7F6O.js +148 -0
- package/dist/chunk-YLICP577.js +1205 -0
- package/dist/chunk-YX6AXLVK.js +159 -0
- package/dist/chunk-ZCQYHTNU.js +146 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1160 -0
- package/dist/cloud-crystal.js +6 -0
- package/dist/core.d.ts +252 -0
- package/dist/core.js +12 -0
- package/dist/crypto.d.ts +20 -0
- package/dist/crypto.js +27 -0
- package/dist/crystal-capture.sh +29 -0
- package/dist/crystal-serve.d.ts +4 -0
- package/dist/crystal-serve.js +252 -0
- package/dist/dev-update-SZ2Z4WCQ.js +6 -0
- package/dist/discover.d.ts +30 -0
- package/dist/discover.js +177 -0
- package/dist/doctor.d.ts +9 -0
- package/dist/doctor.js +342 -0
- package/dist/dream-weaver.d.ts +8 -0
- package/dist/dream-weaver.js +56 -0
- package/dist/file-sync.d.ts +48 -0
- package/dist/file-sync.js +18 -0
- package/dist/installer.d.ts +61 -0
- package/dist/installer.js +772 -0
- package/dist/ldm-backup.sh +116 -0
- package/dist/ldm.d.ts +50 -0
- package/dist/ldm.js +32 -0
- package/dist/llm-XXLYPIOF.js +16 -0
- package/dist/mcp-server.d.ts +1 -0
- package/dist/mcp-server.js +277 -0
- package/dist/migrate.d.ts +1 -0
- package/dist/migrate.js +89 -0
- package/dist/mirror-sync.d.ts +1 -0
- package/dist/mirror-sync.js +159 -0
- package/dist/mlx-setup-XKU67WCT.js +289 -0
- package/dist/oc-backfill.d.ts +19 -0
- package/dist/oc-backfill.js +74 -0
- package/dist/openclaw.d.ts +5 -0
- package/dist/openclaw.js +434 -0
- package/dist/pair.d.ts +4 -0
- package/dist/pair.js +75 -0
- package/dist/poller.d.ts +1 -0
- package/dist/poller.js +634 -0
- package/dist/role.d.ts +24 -0
- package/dist/role.js +13 -0
- package/dist/search-pipeline-4K4OJSSS.js +255 -0
- package/dist/search-pipeline-4PRS6LI7.js +280 -0
- package/dist/search-pipeline-7UJMXPLO.js +280 -0
- package/dist/search-pipeline-CBV25NX7.js +99 -0
- package/dist/search-pipeline-DQTRLGBH.js +74 -0
- package/dist/search-pipeline-HNG37REH.js +282 -0
- package/dist/search-pipeline-IZFPLBUB.js +280 -0
- package/dist/search-pipeline-MID6F26Q.js +73 -0
- package/dist/search-pipeline-N52JZFNN.js +282 -0
- package/dist/search-pipeline-OPB2PRQQ.js +280 -0
- package/dist/search-pipeline-VXTE5HAD.js +262 -0
- package/dist/search-pipeline-XHFKADRG.js +73 -0
- package/dist/staging.d.ts +29 -0
- package/dist/staging.js +21 -0
- package/dist/summarize.d.ts +19 -0
- package/dist/summarize.js +10 -0
- package/dist/worker-demo.js +186 -0
- package/dist/worker-mcp.js +404 -0
- package/dist/worker.js +137 -0
- package/package.json +15 -1
- package/.env.example +0 -20
- package/.publish-skill.json +0 -1
- package/CHANGELOG.md +0 -1372
- package/README-ENTERPRISE.md +0 -226
- package/RELAY.md +0 -199
- package/wrangler-demo.toml +0 -8
- package/wrangler-mcp.toml +0 -24
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// src/dev-update.ts
|
|
2
|
+
import { execSync } from "child_process";
|
|
3
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync } from "fs";
|
|
4
|
+
import { join, basename } from "path";
|
|
5
|
+
var HOME = process.env.HOME || "";
|
|
6
|
+
var STAFF_DIR = join(HOME, "Documents", "wipcomputer--mac-mini-01", "staff");
|
|
7
|
+
var CC_REPOS = join(STAFF_DIR, "Parker", "Claude Code - Mini", "repos");
|
|
8
|
+
var LESA_REPOS = join(STAFF_DIR, "L\u0113sa", "repos");
|
|
9
|
+
var DEV_UPDATES_DIR = join(CC_REPOS, "wip-dev-updates");
|
|
10
|
+
var LAST_RUN_PATH = join(HOME, ".openclaw", "memory", "dev-update-last-run.json");
|
|
11
|
+
function loadLastRun() {
|
|
12
|
+
try {
|
|
13
|
+
if (existsSync(LAST_RUN_PATH)) {
|
|
14
|
+
return JSON.parse(readFileSync(LAST_RUN_PATH, "utf-8"));
|
|
15
|
+
}
|
|
16
|
+
} catch {
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
function saveLastRun(run) {
|
|
21
|
+
const dir = join(HOME, ".openclaw", "memory");
|
|
22
|
+
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
23
|
+
writeFileSync(LAST_RUN_PATH, JSON.stringify(run, null, 2));
|
|
24
|
+
}
|
|
25
|
+
function git(repoPath, cmd) {
|
|
26
|
+
try {
|
|
27
|
+
return execSync(`git -C "${repoPath}" ${cmd}`, {
|
|
28
|
+
encoding: "utf-8",
|
|
29
|
+
timeout: 1e4,
|
|
30
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
31
|
+
}).trim();
|
|
32
|
+
} catch {
|
|
33
|
+
return "";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function scanRepo(repoPath, since) {
|
|
37
|
+
if (!existsSync(join(repoPath, ".git"))) return null;
|
|
38
|
+
const name = basename(repoPath);
|
|
39
|
+
if (name === "_third-party-repos" || name === "wip-dev-updates") return null;
|
|
40
|
+
const recentCommits = git(repoPath, `log --oneline --since="${since}"`);
|
|
41
|
+
const uncommitted = git(repoPath, "status --porcelain");
|
|
42
|
+
if (!recentCommits && !uncommitted) return null;
|
|
43
|
+
const lines = [];
|
|
44
|
+
lines.push(`# ${name}`);
|
|
45
|
+
lines.push("");
|
|
46
|
+
if (recentCommits) {
|
|
47
|
+
lines.push("## Recent Commits");
|
|
48
|
+
lines.push("");
|
|
49
|
+
lines.push("```");
|
|
50
|
+
lines.push(...recentCommits.split("\n").slice(0, 10));
|
|
51
|
+
lines.push("```");
|
|
52
|
+
lines.push("");
|
|
53
|
+
}
|
|
54
|
+
if (uncommitted) {
|
|
55
|
+
lines.push("## Uncommitted Changes");
|
|
56
|
+
lines.push("");
|
|
57
|
+
lines.push("```");
|
|
58
|
+
lines.push(...uncommitted.split("\n").slice(0, 20));
|
|
59
|
+
lines.push("```");
|
|
60
|
+
lines.push("");
|
|
61
|
+
}
|
|
62
|
+
if (recentCommits) {
|
|
63
|
+
const diffStat = git(repoPath, `diff --stat "HEAD@{${since}}" HEAD`);
|
|
64
|
+
if (diffStat) {
|
|
65
|
+
lines.push("## Files Changed");
|
|
66
|
+
lines.push("");
|
|
67
|
+
lines.push("```");
|
|
68
|
+
lines.push(...diffStat.split("\n").slice(-15));
|
|
69
|
+
lines.push("```");
|
|
70
|
+
lines.push("");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const branch = git(repoPath, "branch --show-current") || "unknown";
|
|
74
|
+
lines.push(`**Branch:** ${branch}`);
|
|
75
|
+
lines.push("");
|
|
76
|
+
return lines.join("\n");
|
|
77
|
+
}
|
|
78
|
+
function runDevUpdate(author) {
|
|
79
|
+
const lastRun = loadLastRun();
|
|
80
|
+
if (lastRun) {
|
|
81
|
+
const elapsed = Date.now() - new Date(lastRun.timestamp).getTime();
|
|
82
|
+
if (elapsed < 60 * 60 * 1e3) {
|
|
83
|
+
return { reposUpdated: 0, files: [] };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
let since = "6 hours ago";
|
|
87
|
+
if (lastRun?.timestamp) {
|
|
88
|
+
const lastDate = new Date(lastRun.timestamp);
|
|
89
|
+
const hoursAgo = Math.ceil((Date.now() - lastDate.getTime()) / (1e3 * 60 * 60));
|
|
90
|
+
since = `${Math.max(hoursAgo, 1)} hours ago`;
|
|
91
|
+
}
|
|
92
|
+
const now = /* @__PURE__ */ new Date();
|
|
93
|
+
const ts = [
|
|
94
|
+
String(now.getMonth() + 1).padStart(2, "0"),
|
|
95
|
+
String(now.getDate()).padStart(2, "0"),
|
|
96
|
+
String(now.getFullYear())
|
|
97
|
+
].join("-") + "--" + [
|
|
98
|
+
String(now.getHours()).padStart(2, "0"),
|
|
99
|
+
String(now.getMinutes()).padStart(2, "0"),
|
|
100
|
+
String(now.getSeconds()).padStart(2, "0")
|
|
101
|
+
].join("-");
|
|
102
|
+
const files = [];
|
|
103
|
+
const repoDirs = [CC_REPOS, LESA_REPOS];
|
|
104
|
+
for (const parentDir of repoDirs) {
|
|
105
|
+
if (!existsSync(parentDir)) continue;
|
|
106
|
+
let entries;
|
|
107
|
+
try {
|
|
108
|
+
entries = execSync(`ls "${parentDir}"`, { encoding: "utf-8" }).trim().split("\n");
|
|
109
|
+
} catch {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
for (const entry of entries) {
|
|
113
|
+
const repoPath = join(parentDir, entry);
|
|
114
|
+
const content = scanRepo(repoPath, since);
|
|
115
|
+
if (!content) continue;
|
|
116
|
+
const repoName = basename(repoPath);
|
|
117
|
+
const outDir = join(repoPath, "ai");
|
|
118
|
+
const outFile = join(outDir, `${now.toISOString().slice(0, 10)}--${now.toISOString().slice(11, 19).replace(/:/g, "-")}--${author}--dev-update-${repoName}.md`);
|
|
119
|
+
mkdirSync(outDir, { recursive: true });
|
|
120
|
+
const header = `*Auto-generated dev update by ${author} at ${now.toISOString().slice(0, 16).replace("T", " ")}*
|
|
121
|
+
|
|
122
|
+
`;
|
|
123
|
+
writeFileSync(outFile, content.replace(/^# .+\n/, `$&
|
|
124
|
+
${header}`));
|
|
125
|
+
files.push(`${repoName}/ai/${basename(outFile)}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (false) {
|
|
129
|
+
try {
|
|
130
|
+
execSync(
|
|
131
|
+
`cd "${DEV_UPDATES_DIR}" && git add -A && git commit -m "${author} auto-dev-update ${ts}: ${files.length} repo(s)" --no-verify && git push --quiet`,
|
|
132
|
+
{ encoding: "utf-8", timeout: 3e4, stdio: "pipe" }
|
|
133
|
+
);
|
|
134
|
+
} catch {
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
saveLastRun({
|
|
138
|
+
timestamp: now.toISOString(),
|
|
139
|
+
author,
|
|
140
|
+
reposUpdated: files.length
|
|
141
|
+
});
|
|
142
|
+
return { reposUpdated: files.length, files };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export {
|
|
146
|
+
runDevUpdate
|
|
147
|
+
};
|