greprag 5.74.16 → 5.74.18
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.
|
@@ -180,6 +180,22 @@ function crushField(content, stash, thresholdBytes = exports.DEFAULT_THRESHOLD_B
|
|
|
180
180
|
return `${crushed}\n${ccrMarker(hash)}`;
|
|
181
181
|
}
|
|
182
182
|
// ---------- Message-array walker ----------------------------------------------
|
|
183
|
+
/** Resolve the bash command string from a tool part, regardless of whether
|
|
184
|
+
* the part is a tool_use (carries .input.command) or a tool_result (may
|
|
185
|
+
* carry .name, .tool, or .toolName). Returns an empty string when the
|
|
186
|
+
* command cannot be resolved. */
|
|
187
|
+
function resolveRetrieveCommand(p) {
|
|
188
|
+
const input = p.input;
|
|
189
|
+
if (input && typeof input.command === 'string')
|
|
190
|
+
return input.command;
|
|
191
|
+
const toolName = (typeof p.name === 'string' && p.name) ||
|
|
192
|
+
(typeof p.tool === 'string' && p.tool) ||
|
|
193
|
+
(typeof p.toolName === 'string' && p.toolName);
|
|
194
|
+
// opencode may carry the full command string in .name / .tool
|
|
195
|
+
if (toolName)
|
|
196
|
+
return toolName;
|
|
197
|
+
return '';
|
|
198
|
+
}
|
|
183
199
|
/** Apply crushField to one object's string field, accounting stats and
|
|
184
200
|
* mutating in place on a real crush. When a `memo` is supplied, the heavy
|
|
185
201
|
* crushField path is skipped for content already seen this session — the
|
|
@@ -242,7 +258,19 @@ function processPart(part, stash, thresholdBytes, stats, memo) {
|
|
|
242
258
|
if (p.type === 'tool' && p.state && typeof p.state === 'object') {
|
|
243
259
|
const state = p.state;
|
|
244
260
|
if (state.status === 'completed' && typeof state.output === 'string') {
|
|
245
|
-
|
|
261
|
+
// Skip re-crushing output of greprag retrieve — the original was
|
|
262
|
+
// already stashed once; crushing it again creates an infinite
|
|
263
|
+
// marker→retrieve→same marker loop.
|
|
264
|
+
// The tool name / command may live on p.input.command (tool_use
|
|
265
|
+
// part) or on p.name / p.tool (tool_result part) depending on
|
|
266
|
+
// the opencode message format version.
|
|
267
|
+
const cmd = resolveRetrieveCommand(p);
|
|
268
|
+
if (cmd && cmd.includes('greprag retrieve')) {
|
|
269
|
+
stats.partsSkipped++;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
crushAndApply(state, 'output', stash, thresholdBytes, stats, memo);
|
|
273
|
+
}
|
|
246
274
|
}
|
|
247
275
|
}
|
|
248
276
|
}
|
|
@@ -22,18 +22,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
|
|
25
|
-
// src/opencode-plugin.ts
|
|
25
|
+
// ../greprag/packages/cli/src/opencode-plugin.ts
|
|
26
26
|
var crypto5 = __toESM(require("crypto"));
|
|
27
27
|
var fs7 = __toESM(require("fs"));
|
|
28
28
|
var os2 = __toESM(require("os"));
|
|
29
29
|
var path7 = __toESM(require("path"));
|
|
30
30
|
|
|
31
|
-
// src/opencode-plugin-helpers.ts
|
|
31
|
+
// ../greprag/packages/cli/src/opencode-plugin-helpers.ts
|
|
32
32
|
var crypto = __toESM(require("crypto"));
|
|
33
33
|
var fs = __toESM(require("fs"));
|
|
34
34
|
var path = __toESM(require("path"));
|
|
35
35
|
|
|
36
|
-
// src/proc.ts
|
|
36
|
+
// ../greprag/packages/cli/src/proc.ts
|
|
37
37
|
var import_child_process = require("child_process");
|
|
38
38
|
function safeExecSync(command, options) {
|
|
39
39
|
return (0, import_child_process.execSync)(command, { windowsHide: true, ...options });
|
|
@@ -45,7 +45,7 @@ function safeSpawn(command, argsOrOptions, maybeOptions) {
|
|
|
45
45
|
return (0, import_child_process.spawn)(command, { windowsHide: true, ...argsOrOptions });
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
// src/opencode-plugin-helpers.ts
|
|
48
|
+
// ../greprag/packages/cli/src/opencode-plugin-helpers.ts
|
|
49
49
|
var HOME = process.env.HOME || process.env.USERPROFILE || "";
|
|
50
50
|
function readAnchorFile(filePath) {
|
|
51
51
|
try {
|
|
@@ -272,7 +272,7 @@ async function buildRecapBody(apiUrl, apiKey, anchor, now = /* @__PURE__ */ new
|
|
|
272
272
|
return parts.join("\n");
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
// src/crush/crush-types.ts
|
|
275
|
+
// ../greprag/packages/cli/src/crush/crush-types.ts
|
|
276
276
|
function estimateTokens(text) {
|
|
277
277
|
return Math.ceil(text.length / 4);
|
|
278
278
|
}
|
|
@@ -292,7 +292,7 @@ function makePassthrough(content, sourceType, reason, units = 0) {
|
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
// src/crush/adaptive-sizer.ts
|
|
295
|
+
// ../greprag/packages/cli/src/crush/adaptive-sizer.ts
|
|
296
296
|
function fnv1a(s, seed) {
|
|
297
297
|
let h = (2166136261 ^ seed) >>> 0;
|
|
298
298
|
for (let i = 0; i < s.length; i++) {
|
|
@@ -394,7 +394,7 @@ function computeOptimalK(items, bias, minK, maxK) {
|
|
|
394
394
|
return Math.max(minK, Math.min(k, effectiveMax));
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
-
// src/crush/crush-keywords.ts
|
|
397
|
+
// ../greprag/packages/cli/src/crush/crush-keywords.ts
|
|
398
398
|
var ERROR_KEYWORDS = [
|
|
399
399
|
"error",
|
|
400
400
|
"exception",
|
|
@@ -467,7 +467,7 @@ function classifyImportance(line) {
|
|
|
467
467
|
return null;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
// src/crush/search-compressor.ts
|
|
470
|
+
// ../greprag/packages/cli/src/crush/search-compressor.ts
|
|
471
471
|
var DEFAULT_SEARCH_CONFIG = {
|
|
472
472
|
maxMatchesPerFile: 5,
|
|
473
473
|
alwaysKeepFirst: true,
|
|
@@ -630,7 +630,7 @@ function crushSearch(content, query = "", config = {}) {
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
|
|
633
|
-
// src/crush/log-compressor.ts
|
|
633
|
+
// ../greprag/packages/cli/src/crush/log-compressor.ts
|
|
634
634
|
var DEFAULT_LOG_CONFIG = {
|
|
635
635
|
maxErrors: 10,
|
|
636
636
|
errorContextLines: 3,
|
|
@@ -941,7 +941,7 @@ function crushLog(content, config = {}) {
|
|
|
941
941
|
};
|
|
942
942
|
}
|
|
943
943
|
|
|
944
|
-
// src/crush/json-detectors.ts
|
|
944
|
+
// ../greprag/packages/cli/src/crush/json-detectors.ts
|
|
945
945
|
function classifyArray(items) {
|
|
946
946
|
if (items.length === 0)
|
|
947
947
|
return "empty";
|
|
@@ -1101,7 +1101,7 @@ function detectErrorItems(items) {
|
|
|
1101
1101
|
return out;
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
|
-
// src/crush/json-crusher.ts
|
|
1104
|
+
// ../greprag/packages/cli/src/crush/json-crusher.ts
|
|
1105
1105
|
var DEFAULT_JSON_CONFIG = {
|
|
1106
1106
|
minItemsToAnalyze: 10,
|
|
1107
1107
|
maxItemsAfterCrush: 15,
|
|
@@ -1312,7 +1312,7 @@ function crushJson(content, config = {}) {
|
|
|
1312
1312
|
};
|
|
1313
1313
|
}
|
|
1314
1314
|
|
|
1315
|
-
// src/crush/code-compressor.ts
|
|
1315
|
+
// ../greprag/packages/cli/src/crush/code-compressor.ts
|
|
1316
1316
|
var DEFAULT_CODE_CONFIG = {
|
|
1317
1317
|
minLines: 8,
|
|
1318
1318
|
maxBodyLines: 3
|
|
@@ -1599,7 +1599,7 @@ function crushCode(content, config = {}) {
|
|
|
1599
1599
|
};
|
|
1600
1600
|
}
|
|
1601
1601
|
|
|
1602
|
-
// src/opencode-plugin-crush.ts
|
|
1602
|
+
// ../greprag/packages/cli/src/opencode-plugin-crush.ts
|
|
1603
1603
|
var CCR_MARKER_HASH_LEN = 16;
|
|
1604
1604
|
function ccrMarker(hash) {
|
|
1605
1605
|
return `<<ccr:${hash.slice(0, CCR_MARKER_HASH_LEN)}>>`;
|
|
@@ -1664,6 +1664,15 @@ function crushField(content, stash, thresholdBytes = DEFAULT_THRESHOLD_BYTES) {
|
|
|
1664
1664
|
return `${crushed}
|
|
1665
1665
|
${ccrMarker(hash)}`;
|
|
1666
1666
|
}
|
|
1667
|
+
function resolveRetrieveCommand(p) {
|
|
1668
|
+
const input = p.input;
|
|
1669
|
+
if (input && typeof input.command === "string")
|
|
1670
|
+
return input.command;
|
|
1671
|
+
const toolName = typeof p.name === "string" && p.name || typeof p.tool === "string" && p.tool || typeof p.toolName === "string" && p.toolName;
|
|
1672
|
+
if (toolName)
|
|
1673
|
+
return toolName;
|
|
1674
|
+
return "";
|
|
1675
|
+
}
|
|
1667
1676
|
function crushAndApply(obj, key, stash, thresholdBytes, stats, memo) {
|
|
1668
1677
|
const content = obj[key];
|
|
1669
1678
|
if (typeof content !== "string")
|
|
@@ -1713,7 +1722,12 @@ function processPart(part, stash, thresholdBytes, stats, memo) {
|
|
|
1713
1722
|
if (p.type === "tool" && p.state && typeof p.state === "object") {
|
|
1714
1723
|
const state = p.state;
|
|
1715
1724
|
if (state.status === "completed" && typeof state.output === "string") {
|
|
1716
|
-
|
|
1725
|
+
const cmd = resolveRetrieveCommand(p);
|
|
1726
|
+
if (cmd && cmd.includes("greprag retrieve")) {
|
|
1727
|
+
stats.partsSkipped++;
|
|
1728
|
+
} else {
|
|
1729
|
+
crushAndApply(state, "output", stash, thresholdBytes, stats, memo);
|
|
1730
|
+
}
|
|
1717
1731
|
}
|
|
1718
1732
|
}
|
|
1719
1733
|
}
|
|
@@ -1745,7 +1759,7 @@ function crushMessages(messages, opts) {
|
|
|
1745
1759
|
return stats;
|
|
1746
1760
|
}
|
|
1747
1761
|
|
|
1748
|
-
// src/commands/os-primer-reminder.ts
|
|
1762
|
+
// ../greprag/packages/cli/src/commands/os-primer-reminder.ts
|
|
1749
1763
|
function buildOsPrimer(env) {
|
|
1750
1764
|
const spawnEntry = env?.platform === "codex" ? "codex-chip-spawn" : env?.platform === "opencode" ? "chip-bootloader" : "chip-spawn";
|
|
1751
1765
|
return [
|
|
@@ -1765,7 +1779,7 @@ var osPrimerModule = {
|
|
|
1765
1779
|
reminder: () => null
|
|
1766
1780
|
};
|
|
1767
1781
|
|
|
1768
|
-
// src/session-id.ts
|
|
1782
|
+
// ../greprag/packages/cli/src/session-id.ts
|
|
1769
1783
|
function armMonitorCommand(short, ownerPid, assistant = false, mechanic = false) {
|
|
1770
1784
|
const owner = ownerPid ? ` --owner-pid ${ownerPid}` : "";
|
|
1771
1785
|
const role = mechanic ? " --mechanic" : assistant ? " --assistant" : "";
|
|
@@ -1773,7 +1787,7 @@ function armMonitorCommand(short, ownerPid, assistant = false, mechanic = false)
|
|
|
1773
1787
|
return `while true; do ${watch}; case $? in 0|64) break;; esac; sleep 1; done`;
|
|
1774
1788
|
}
|
|
1775
1789
|
|
|
1776
|
-
// src/commands/inbox-primer-reminder.ts
|
|
1790
|
+
// ../greprag/packages/cli/src/commands/inbox-primer-reminder.ts
|
|
1777
1791
|
function buildInboxPrimer(env) {
|
|
1778
1792
|
const codex = env.platform === "codex";
|
|
1779
1793
|
const opencode = env.platform === "opencode";
|
|
@@ -1811,7 +1825,7 @@ var inboxPrimerModule = {
|
|
|
1811
1825
|
reminder: () => null
|
|
1812
1826
|
};
|
|
1813
1827
|
|
|
1814
|
-
// src/commands/load-primer-reminder.ts
|
|
1828
|
+
// ../greprag/packages/cli/src/commands/load-primer-reminder.ts
|
|
1815
1829
|
var LOAD_PRIMER = [
|
|
1816
1830
|
"[greprag load \u2014 on-demand doctrine. greprag ships its own methods inside the CLI; you never need a `.md` file or a CLAUDE.md entry to use them.]",
|
|
1817
1831
|
"\u2022 `greprag load` \u2192 browse the catalog (every doctrine entry + its one-line purpose).",
|
|
@@ -1863,7 +1877,7 @@ var codexChipSpawnPointerModule = {
|
|
|
1863
1877
|
reminder: () => null
|
|
1864
1878
|
};
|
|
1865
1879
|
|
|
1866
|
-
// src/commands/email-primer-reminder.ts
|
|
1880
|
+
// ../greprag/packages/cli/src/commands/email-primer-reminder.ts
|
|
1867
1881
|
var EMAIL_PRIMER = [
|
|
1868
1882
|
"[greprag email \u2014 the agent's REAL mailbox (actual inbound + outbound SMTP), distinct from `greprag send` (internal session mesh, never real email).]",
|
|
1869
1883
|
'\u2022 SEND real mail: `greprag email send --to <addr> --subject "s" (--body "t" | --body-file <f|->)` \u2014 from your <handle>@greprag.com. Flags: --html-file (rich body) \xB7 --attach (repeatable) \xB7 --cc/--bcc \xB7 --reply-to \xB7 --from-name \xB7 --from <your-own-handle> (server rejects any address that isn\'t yours \u2014 no forging).',
|
|
@@ -1880,7 +1894,7 @@ var emailPrimerModule = {
|
|
|
1880
1894
|
reminder: () => null
|
|
1881
1895
|
};
|
|
1882
1896
|
|
|
1883
|
-
// src/commands/corpus-reminder.ts
|
|
1897
|
+
// ../greprag/packages/cli/src/commands/corpus-reminder.ts
|
|
1884
1898
|
function buildCorpusAnnounce(names) {
|
|
1885
1899
|
if (!names || names.length === 0)
|
|
1886
1900
|
return null;
|
|
@@ -1900,7 +1914,7 @@ var corpusAnnounceModule = {
|
|
|
1900
1914
|
reminder: () => null
|
|
1901
1915
|
};
|
|
1902
1916
|
|
|
1903
|
-
// src/commands/doc-pointer-reminder.ts
|
|
1917
|
+
// ../greprag/packages/cli/src/commands/doc-pointer-reminder.ts
|
|
1904
1918
|
var ANNOUNCE_CAP = 20;
|
|
1905
1919
|
function buildDocPointerAnnounce(pointers) {
|
|
1906
1920
|
if (!pointers || pointers.length === 0)
|
|
@@ -1932,7 +1946,7 @@ var docPointerAnnounceModule = {
|
|
|
1932
1946
|
reminder: () => null
|
|
1933
1947
|
};
|
|
1934
1948
|
|
|
1935
|
-
// src/commands/setup-reminder.ts
|
|
1949
|
+
// ../greprag/packages/cli/src/commands/setup-reminder.ts
|
|
1936
1950
|
function setupDetect(env) {
|
|
1937
1951
|
return env.setupWarning ? { tier: "nudge" } : { tier: "silent" };
|
|
1938
1952
|
}
|
|
@@ -1943,7 +1957,7 @@ var setupWarningModule = {
|
|
|
1943
1957
|
reminder: () => null
|
|
1944
1958
|
};
|
|
1945
1959
|
|
|
1946
|
-
// src/commands/assistant-reminder.ts
|
|
1960
|
+
// ../greprag/packages/cli/src/commands/assistant-reminder.ts
|
|
1947
1961
|
function assistantDetect(env) {
|
|
1948
1962
|
return env.assistantDoctrine ? { tier: "ambient" } : { tier: "silent" };
|
|
1949
1963
|
}
|
|
@@ -1954,7 +1968,7 @@ var assistantDoctrineModule = {
|
|
|
1954
1968
|
reminder: () => null
|
|
1955
1969
|
};
|
|
1956
1970
|
|
|
1957
|
-
// src/commands/memory-reflex.ts
|
|
1971
|
+
// ../greprag/packages/cli/src/commands/memory-reflex.ts
|
|
1958
1972
|
function buildMemoryAnnounce() {
|
|
1959
1973
|
return [
|
|
1960
1974
|
"[greprag memory \u2014 this project remembers. Every past session (decisions, bugs, what was discussed, who did what) is captured and searchable.]",
|
|
@@ -1968,7 +1982,7 @@ var memoryPrimerModule = {
|
|
|
1968
1982
|
reminder: () => null
|
|
1969
1983
|
};
|
|
1970
1984
|
|
|
1971
|
-
// src/commands/arm-reminder.ts
|
|
1985
|
+
// ../greprag/packages/cli/src/commands/arm-reminder.ts
|
|
1972
1986
|
function armDetect(env) {
|
|
1973
1987
|
if (env.armed)
|
|
1974
1988
|
return { tier: "silent" };
|
|
@@ -1998,11 +2012,11 @@ var watcherArmModule = {
|
|
|
1998
2012
|
reminder: (d, env) => buildArmReminder(d, env)
|
|
1999
2013
|
};
|
|
2000
2014
|
|
|
2001
|
-
// src/commands/state-trigger.ts
|
|
2015
|
+
// ../greprag/packages/cli/src/commands/state-trigger.ts
|
|
2002
2016
|
var STRESS_ELEVATED = 1;
|
|
2003
2017
|
var STRESS_HIGH = 2;
|
|
2004
2018
|
|
|
2005
|
-
// src/commands/friction-reminder.ts
|
|
2019
|
+
// ../greprag/packages/cli/src/commands/friction-reminder.ts
|
|
2006
2020
|
function quoteForCommand(value) {
|
|
2007
2021
|
return value.replace(/[\r\n]+/g, " ").replace(/"/g, '\\"').trim();
|
|
2008
2022
|
}
|
|
@@ -2067,7 +2081,7 @@ var mechanicFrictionModule = {
|
|
|
2067
2081
|
}
|
|
2068
2082
|
};
|
|
2069
2083
|
|
|
2070
|
-
// src/commands/coordinate-gate.ts
|
|
2084
|
+
// ../greprag/packages/cli/src/commands/coordinate-gate.ts
|
|
2071
2085
|
var RISKY_PATTERNS = [
|
|
2072
2086
|
{ kind: "merge", label: "gh pr merge", re: /^gh\s+pr\s+merge\b/ },
|
|
2073
2087
|
{ kind: "deploy", label: "wrangler deploy", re: /^(?:npx\s+)?wrangler\s+deploy\b/ },
|
|
@@ -2184,7 +2198,7 @@ function buildCoordinateDirective(trigger, peers, myShort, alias) {
|
|
|
2184
2198
|
return `COORDINATE before ${trigger.label}: ${peers.length} peer${plural} live in this repo (${list}). Ping before proceeding. Codex peers: use codex_app.list_threads and codex_app.send_message_to_thread. GrepRAG watcher/cross-harness peers: greprag send "heads up, about to ${trigger.label}" --to ${handle}@greprag.com/<8hex> --from-session ${myShort}`;
|
|
2185
2199
|
}
|
|
2186
2200
|
|
|
2187
|
-
// src/commands/collision-reminder.ts
|
|
2201
|
+
// ../greprag/packages/cli/src/commands/collision-reminder.ts
|
|
2188
2202
|
var collisionMatchModule = {
|
|
2189
2203
|
id: "collision",
|
|
2190
2204
|
source: "command",
|
|
@@ -2209,7 +2223,7 @@ var collisionMatchModule = {
|
|
|
2209
2223
|
}
|
|
2210
2224
|
};
|
|
2211
2225
|
|
|
2212
|
-
// src/commands/version-reminder.ts
|
|
2226
|
+
// ../greprag/packages/cli/src/commands/version-reminder.ts
|
|
2213
2227
|
function buildVersionAnnounce(current, latest) {
|
|
2214
2228
|
return [
|
|
2215
2229
|
`[greprag \u2014 a new release is out: v${latest} (you are on v${current}).]`,
|
|
@@ -2250,7 +2264,7 @@ var versionUpgradeModule = {
|
|
|
2250
2264
|
reminder: () => null
|
|
2251
2265
|
};
|
|
2252
2266
|
|
|
2253
|
-
// src/commands/enrichment-health-reminder.ts
|
|
2267
|
+
// ../greprag/packages/cli/src/commands/enrichment-health-reminder.ts
|
|
2254
2268
|
function buildEnrichmentHealthAnnounce(down) {
|
|
2255
2269
|
if (!down || !down.errorClass)
|
|
2256
2270
|
return null;
|
|
@@ -2269,7 +2283,7 @@ var enrichmentHealthModule = {
|
|
|
2269
2283
|
reminder: () => null
|
|
2270
2284
|
};
|
|
2271
2285
|
|
|
2272
|
-
// src/commands/skill-gain-reminder.ts
|
|
2286
|
+
// ../greprag/packages/cli/src/commands/skill-gain-reminder.ts
|
|
2273
2287
|
function buildSkillGainAnnounce(gains) {
|
|
2274
2288
|
if (!gains || gains.landed.length === 0)
|
|
2275
2289
|
return null;
|
|
@@ -2288,7 +2302,7 @@ var skillGainAnnounceModule = {
|
|
|
2288
2302
|
reminder: () => null
|
|
2289
2303
|
};
|
|
2290
2304
|
|
|
2291
|
-
// src/commands/skill-mirror-reminder.ts
|
|
2305
|
+
// ../greprag/packages/cli/src/commands/skill-mirror-reminder.ts
|
|
2292
2306
|
var SKILL_ACTIVATION_MANIFEST_MAX_CHARS = 64e3;
|
|
2293
2307
|
function renderEntry(skill) {
|
|
2294
2308
|
const description = skill.triggerDescription.trim().replace(/\r\n?/g, "\n");
|
|
@@ -2341,7 +2355,7 @@ var skillMirrorAnnounceModule = {
|
|
|
2341
2355
|
reminder: () => null
|
|
2342
2356
|
};
|
|
2343
2357
|
|
|
2344
|
-
// src/commands/procedure-reminder.ts
|
|
2358
|
+
// ../greprag/packages/cli/src/commands/procedure-reminder.ts
|
|
2345
2359
|
function buildProcedureAnnounce(lines) {
|
|
2346
2360
|
const active = (lines ?? []).map((s) => s.trim()).filter(Boolean);
|
|
2347
2361
|
if (!active.length)
|
|
@@ -2359,7 +2373,7 @@ var procedureAnnounceModule = {
|
|
|
2359
2373
|
reminder: () => null
|
|
2360
2374
|
};
|
|
2361
2375
|
|
|
2362
|
-
// src/commands/loadout-reminder.ts
|
|
2376
|
+
// ../greprag/packages/cli/src/commands/loadout-reminder.ts
|
|
2363
2377
|
function matchLoadouts(promptText, equipped) {
|
|
2364
2378
|
const prompt = (promptText || "").toLowerCase();
|
|
2365
2379
|
if (!prompt.trim() || !equipped || equipped.length === 0)
|
|
@@ -2398,7 +2412,7 @@ var loadoutRegistrarModule = {
|
|
|
2398
2412
|
reminder: (d) => buildLoadoutReminder(d.detail?.matched || [])
|
|
2399
2413
|
};
|
|
2400
2414
|
|
|
2401
|
-
// src/commands/delivery-reminder.ts
|
|
2415
|
+
// ../greprag/packages/cli/src/commands/delivery-reminder.ts
|
|
2402
2416
|
function coordinationLine(platform) {
|
|
2403
2417
|
if (platform === "codex") {
|
|
2404
2418
|
return "Codex: at the merge/deploy gate, call codex_app.list_threads unfiltered, filter to peers in the same repo, then use codex_app.send_message_to_thread once for ready or overlapping work. Delivery owner: rename this task `DEPLOY: <existing title>`; transfer the prefix on handoff; remove the prefix when delivery is done.";
|
|
@@ -2430,7 +2444,7 @@ var deliveryControlModule = {
|
|
|
2430
2444
|
reminder: () => null
|
|
2431
2445
|
};
|
|
2432
2446
|
|
|
2433
|
-
// src/commands/reminder-registry.ts
|
|
2447
|
+
// ../greprag/packages/cli/src/commands/reminder-registry.ts
|
|
2434
2448
|
var REGISTRY = [
|
|
2435
2449
|
osPrimerModule,
|
|
2436
2450
|
// grepragOS constitution — the frame every other primer hangs off; boots FIRST
|
|
@@ -2525,7 +2539,7 @@ function collectAnnounces(env, registry = REGISTRY) {
|
|
|
2525
2539
|
return out;
|
|
2526
2540
|
}
|
|
2527
2541
|
|
|
2528
|
-
// src/commands/opencode-interrupt.ts
|
|
2542
|
+
// ../greprag/packages/cli/src/commands/opencode-interrupt.ts
|
|
2529
2543
|
var opencodeRegistry = harnessModules("opencode");
|
|
2530
2544
|
var OPENCODE_QUOTA_WAITLIST_ANNOUNCE = [
|
|
2531
2545
|
"[GrepRAG quota decision rule]",
|
|
@@ -2564,11 +2578,11 @@ function getOpenCodeReminders(env) {
|
|
|
2564
2578
|
return collectReminders(env, opencodeRegistry);
|
|
2565
2579
|
}
|
|
2566
2580
|
|
|
2567
|
-
// src/procedure.ts
|
|
2581
|
+
// ../greprag/packages/cli/src/procedure.ts
|
|
2568
2582
|
var path2 = __toESM(require("path"));
|
|
2569
2583
|
var fs2 = __toESM(require("fs"));
|
|
2570
2584
|
|
|
2571
|
-
// src/delivery-lifecycle.ts
|
|
2585
|
+
// ../greprag/packages/cli/src/delivery-lifecycle.ts
|
|
2572
2586
|
var DELIVERY_LIFECYCLE_VERBS = [
|
|
2573
2587
|
"commit",
|
|
2574
2588
|
"merge",
|
|
@@ -2581,7 +2595,7 @@ function isDeliveryLifecycleVerb(verb) {
|
|
|
2581
2595
|
return DELIVERY_LIFECYCLE_SET.has((verb || "").trim().toLowerCase());
|
|
2582
2596
|
}
|
|
2583
2597
|
|
|
2584
|
-
// src/procedure.ts
|
|
2598
|
+
// ../greprag/packages/cli/src/procedure.ts
|
|
2585
2599
|
var PROCEDURE_STORE_VERSION = "2";
|
|
2586
2600
|
function stateDir() {
|
|
2587
2601
|
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
@@ -2822,10 +2836,10 @@ function activeProcedureAnnounces(store) {
|
|
|
2822
2836
|
return lines;
|
|
2823
2837
|
}
|
|
2824
2838
|
|
|
2825
|
-
// src/procedure-runtime.ts
|
|
2839
|
+
// ../greprag/packages/cli/src/procedure-runtime.ts
|
|
2826
2840
|
var crypto4 = __toESM(require("crypto"));
|
|
2827
2841
|
|
|
2828
|
-
// src/project-anchor.ts
|
|
2842
|
+
// ../greprag/packages/cli/src/project-anchor.ts
|
|
2829
2843
|
var path3 = __toESM(require("path"));
|
|
2830
2844
|
var fs3 = __toESM(require("fs"));
|
|
2831
2845
|
var crypto2 = __toESM(require("crypto"));
|
|
@@ -3007,7 +3021,7 @@ function readAnchor2(cwd) {
|
|
|
3007
3021
|
};
|
|
3008
3022
|
}
|
|
3009
3023
|
|
|
3010
|
-
// src/procedure-watch.ts
|
|
3024
|
+
// ../greprag/packages/cli/src/procedure-watch.ts
|
|
3011
3025
|
var path4 = __toESM(require("path"));
|
|
3012
3026
|
var fs4 = __toESM(require("fs"));
|
|
3013
3027
|
var TIER1_LEARN_TRIGGERS = [
|
|
@@ -3068,7 +3082,7 @@ function openWatchIfIdle(projectId, verb, phase, shadowRunId) {
|
|
|
3068
3082
|
return true;
|
|
3069
3083
|
}
|
|
3070
3084
|
|
|
3071
|
-
// src/procedure-shadow.ts
|
|
3085
|
+
// ../greprag/packages/cli/src/procedure-shadow.ts
|
|
3072
3086
|
var crypto3 = __toESM(require("crypto"));
|
|
3073
3087
|
var fs5 = __toESM(require("fs"));
|
|
3074
3088
|
var path5 = __toESM(require("path"));
|
|
@@ -3134,7 +3148,7 @@ function recordMissingLifecycleShadowTrigger(params) {
|
|
|
3134
3148
|
});
|
|
3135
3149
|
}
|
|
3136
3150
|
|
|
3137
|
-
// src/procedure-runtime.ts
|
|
3151
|
+
// ../greprag/packages/cli/src/procedure-runtime.ts
|
|
3138
3152
|
function extractLatestOpenCodeProcedurePrompt(messages) {
|
|
3139
3153
|
let userCount = 0;
|
|
3140
3154
|
let latest = null;
|
|
@@ -3220,7 +3234,7 @@ function runProcedurePromptCheck(params) {
|
|
|
3220
3234
|
}
|
|
3221
3235
|
}
|
|
3222
3236
|
|
|
3223
|
-
// src/archive/glyph-font.ts
|
|
3237
|
+
// ../greprag/packages/cli/src/archive/glyph-font.ts
|
|
3224
3238
|
var GLYPH_W = 8;
|
|
3225
3239
|
var GLYPH_H = 8;
|
|
3226
3240
|
var FIRST_CODE = 32;
|
|
@@ -3344,7 +3358,7 @@ function signatureForRows(bytes) {
|
|
|
3344
3358
|
return bytes.map((b) => (b & 255).toString(16).padStart(2, "0")).join("");
|
|
3345
3359
|
}
|
|
3346
3360
|
|
|
3347
|
-
// src/archive/png-codec.ts
|
|
3361
|
+
// ../greprag/packages/cli/src/archive/png-codec.ts
|
|
3348
3362
|
var zlib = __toESM(require("zlib"));
|
|
3349
3363
|
var PNG_SIGNATURE = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
|
|
3350
3364
|
var crcTable = null;
|
|
@@ -3486,7 +3500,7 @@ function decodePng(buf) {
|
|
|
3486
3500
|
return { width, height, pixels };
|
|
3487
3501
|
}
|
|
3488
3502
|
|
|
3489
|
-
// src/archive/page-renderer.ts
|
|
3503
|
+
// ../greprag/packages/cli/src/archive/page-renderer.ts
|
|
3490
3504
|
var PAGE_SIZE = 1568;
|
|
3491
3505
|
var CELL_W = GLYPH_W;
|
|
3492
3506
|
var CELL_H = 10;
|
|
@@ -3612,7 +3626,7 @@ function verifyRoundTrip(page) {
|
|
|
3612
3626
|
return `length mismatch: rendered ${a.length} decoded ${b.length}`;
|
|
3613
3627
|
}
|
|
3614
3628
|
|
|
3615
|
-
// src/opencode-plugin-png.ts
|
|
3629
|
+
// ../greprag/packages/cli/src/opencode-plugin-png.ts
|
|
3616
3630
|
var CCR_MARKER_HASH_LEN2 = 16;
|
|
3617
3631
|
function ccrPngMarker(hash) {
|
|
3618
3632
|
return `<<ccr:${hash.slice(0, CCR_MARKER_HASH_LEN2)}>>`;
|
|
@@ -3802,7 +3816,7 @@ function recodeMessagesToPng(messages, opts) {
|
|
|
3802
3816
|
return stats;
|
|
3803
3817
|
}
|
|
3804
3818
|
|
|
3805
|
-
// src/skill-activation-manifest.ts
|
|
3819
|
+
// ../greprag/packages/cli/src/skill-activation-manifest.ts
|
|
3806
3820
|
var fs6 = __toESM(require("fs"));
|
|
3807
3821
|
var path6 = __toESM(require("path"));
|
|
3808
3822
|
var MAX_NATIVE_SKILL_FILES = 1500;
|
|
@@ -3903,7 +3917,7 @@ function activationFromApiRows(params) {
|
|
|
3903
3917
|
return buildMirroredSkillActivation(entries, readNativeSkillNames(params));
|
|
3904
3918
|
}
|
|
3905
3919
|
|
|
3906
|
-
// src/opencode-plugin.ts
|
|
3920
|
+
// ../greprag/packages/cli/src/opencode-plugin.ts
|
|
3907
3921
|
var DEBUG_LOG_PATH = path7.join(os2.homedir(), ".greprag", "opencode-plugin-debug.log");
|
|
3908
3922
|
var _debugLogReady = false;
|
|
3909
3923
|
function dlogInit() {
|