indelible-mcp 4.9.2 → 4.9.4
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/package.json +1 -1
- package/src/index.js +201 -84
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __export = (target, all) => {
|
|
|
14
14
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
// lib/crypto.js
|
|
17
|
+
// mcp-server/lib/crypto.js
|
|
18
18
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, pbkdf2Sync } from "crypto";
|
|
19
19
|
function deriveKey(wif) {
|
|
20
20
|
return createHash("sha256").update(wif).digest();
|
|
@@ -69,11 +69,11 @@ function decryptWif(encryptedObj, pin) {
|
|
|
69
69
|
return decrypted;
|
|
70
70
|
}
|
|
71
71
|
var init_crypto = __esm({
|
|
72
|
-
"lib/crypto.js"() {
|
|
72
|
+
"mcp-server/lib/crypto.js"() {
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
// lib/config.customer.js
|
|
76
|
+
// mcp-server/lib/config.customer.js
|
|
77
77
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
|
|
78
78
|
import { homedir } from "node:os";
|
|
79
79
|
import { join } from "node:path";
|
|
@@ -124,7 +124,7 @@ async function getWif() {
|
|
|
124
124
|
}
|
|
125
125
|
var CONFIG_DIR, CONFIG_FILE, _cachedWif;
|
|
126
126
|
var init_config_customer = __esm({
|
|
127
|
-
"lib/config.customer.js"() {
|
|
127
|
+
"mcp-server/lib/config.customer.js"() {
|
|
128
128
|
init_crypto();
|
|
129
129
|
CONFIG_DIR = join(homedir(), ".indelible");
|
|
130
130
|
CONFIG_FILE = join(CONFIG_DIR, "config.json");
|
|
@@ -132,7 +132,7 @@ var init_config_customer = __esm({
|
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
-
// lib/spv.js
|
|
135
|
+
// mcp-server/lib/spv.js
|
|
136
136
|
import { Transaction, P2PKH, PrivateKey, SatoshisPerKilobyte, LockingScript, OP } from "@bsv/sdk";
|
|
137
137
|
import { Transaction as Transaction2, P2PKH as P2PKH2, PrivateKey as PrivateKey2, SatoshisPerKilobyte as SatoshisPerKilobyte2, LockingScript as LockingScript2, OP as OP2 } from "@bsv/sdk";
|
|
138
138
|
async function getBridges() {
|
|
@@ -545,7 +545,7 @@ async function buildPaymentTx(wif, utxos, payToAddress, satoshis) {
|
|
|
545
545
|
}
|
|
546
546
|
var SEED_BRIDGES, OLD_BRIDGE_IPS, bridgeHealth, HEALTH_CHECK_INTERVAL, MAX_FAILURES, migrationDone, _stickyBridge, STICKY_WINDOW_MS;
|
|
547
547
|
var init_spv = __esm({
|
|
548
|
-
"lib/spv.js"() {
|
|
548
|
+
"mcp-server/lib/spv.js"() {
|
|
549
549
|
init_config_customer();
|
|
550
550
|
SEED_BRIDGES = [
|
|
551
551
|
{ url: "http://144.202.48.217:9333", name: "bridge-alpha" },
|
|
@@ -573,7 +573,7 @@ var init_spv = __esm({
|
|
|
573
573
|
}
|
|
574
574
|
});
|
|
575
575
|
|
|
576
|
-
// lib/utxo-cache.js
|
|
576
|
+
// mcp-server/lib/utxo-cache.js
|
|
577
577
|
import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, existsSync as existsSync2, mkdirSync as mkdirSync2 } from "fs";
|
|
578
578
|
import { join as join2 } from "path";
|
|
579
579
|
import { homedir as homedir2 } from "os";
|
|
@@ -624,13 +624,13 @@ function invalidate(address) {
|
|
|
624
624
|
}
|
|
625
625
|
var DIR, CACHE_PATH;
|
|
626
626
|
var init_utxo_cache = __esm({
|
|
627
|
-
"lib/utxo-cache.js"() {
|
|
627
|
+
"mcp-server/lib/utxo-cache.js"() {
|
|
628
628
|
DIR = join2(homedir2(), ".indelible");
|
|
629
629
|
CACHE_PATH = process.env.INDELIBLE_UTXO_CACHE || join2(DIR, "utxo-cache.json");
|
|
630
630
|
}
|
|
631
631
|
});
|
|
632
632
|
|
|
633
|
-
// lib/summary.js
|
|
633
|
+
// mcp-server/lib/summary.js
|
|
634
634
|
import { createCipheriv as createCipheriv2, createDecipheriv as createDecipheriv2, randomBytes as randomBytes2 } from "crypto";
|
|
635
635
|
function encryptSummary(plaintext, wif, txId) {
|
|
636
636
|
if (!txId || typeof txId !== "string" || !TXID_REGEX.test(txId)) {
|
|
@@ -679,7 +679,7 @@ function decryptSummaryOrLock(summary_enc, wif, expectedTxId) {
|
|
|
679
679
|
}
|
|
680
680
|
var TXID_REGEX, LOCK_PLACEHOLDER;
|
|
681
681
|
var init_summary = __esm({
|
|
682
|
-
"lib/summary.js"() {
|
|
682
|
+
"mcp-server/lib/summary.js"() {
|
|
683
683
|
init_crypto();
|
|
684
684
|
TXID_REGEX = /^[0-9a-f]{64}$/i;
|
|
685
685
|
LOCK_PLACEHOLDER = {
|
|
@@ -692,7 +692,7 @@ var init_summary = __esm({
|
|
|
692
692
|
}
|
|
693
693
|
});
|
|
694
694
|
|
|
695
|
-
// lib/wallet-brc100.js
|
|
695
|
+
// mcp-server/lib/wallet-brc100.js
|
|
696
696
|
import { PrivateKey as PrivateKey3, CompletedProtoWallet, AuthFetch } from "@bsv/sdk";
|
|
697
697
|
function createAuthClient(wif) {
|
|
698
698
|
if (!wif) throw new Error("createAuthClient: wif required");
|
|
@@ -712,13 +712,13 @@ function createAuthClient(wif) {
|
|
|
712
712
|
}
|
|
713
713
|
var cached, cachedWif;
|
|
714
714
|
var init_wallet_brc100 = __esm({
|
|
715
|
-
"lib/wallet-brc100.js"() {
|
|
715
|
+
"mcp-server/lib/wallet-brc100.js"() {
|
|
716
716
|
cached = null;
|
|
717
717
|
cachedWif = null;
|
|
718
718
|
}
|
|
719
719
|
});
|
|
720
720
|
|
|
721
|
-
// lib/api-client.js
|
|
721
|
+
// mcp-server/lib/api-client.js
|
|
722
722
|
var api_client_exports = {};
|
|
723
723
|
__export(api_client_exports, {
|
|
724
724
|
buildReceipt: () => buildReceipt,
|
|
@@ -1100,7 +1100,7 @@ async function checkConnection() {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
var DEFAULT_API_URL, TIER2_CACHE_TTL_MS, TIER2_BACKOFF_TTL_MS, TIER2_BACKOFF_THRESHOLD, tier2Cache, tier2TransientFailures;
|
|
1102
1102
|
var init_api_client = __esm({
|
|
1103
|
-
"lib/api-client.js"() {
|
|
1103
|
+
"mcp-server/lib/api-client.js"() {
|
|
1104
1104
|
init_config_customer();
|
|
1105
1105
|
init_spv();
|
|
1106
1106
|
init_utxo_cache();
|
|
@@ -1115,7 +1115,7 @@ var init_api_client = __esm({
|
|
|
1115
1115
|
}
|
|
1116
1116
|
});
|
|
1117
1117
|
|
|
1118
|
-
// lib/share.js
|
|
1118
|
+
// mcp-server/lib/share.js
|
|
1119
1119
|
import { createCipheriv as createCipheriv3, createDecipheriv as createDecipheriv3, createHash as createHash2, randomBytes as randomBytes3, hkdfSync } from "node:crypto";
|
|
1120
1120
|
import { PrivateKey as PrivateKey5, PublicKey, Signature, ProtoWallet } from "@bsv/sdk";
|
|
1121
1121
|
function isValidP2PKH(addr) {
|
|
@@ -1415,7 +1415,7 @@ async function unwrapRecoveryV3(wrapHex, wallet, keyID, ownerPubkeyHex) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
var HKDF_INFO, TXID_REGEX2, P2PKH_REGEX, CANONICAL_FIELDS, SELF_WRAP_TXID, ENCRYPT_PROTOCOL_ID_V2;
|
|
1417
1417
|
var init_share = __esm({
|
|
1418
|
-
"lib/share.js"() {
|
|
1418
|
+
"mcp-server/lib/share.js"() {
|
|
1419
1419
|
HKDF_INFO = "indelible-share-v1";
|
|
1420
1420
|
TXID_REGEX2 = /^[0-9a-f]{64}$/i;
|
|
1421
1421
|
P2PKH_REGEX = /^1[1-9A-HJ-NP-Za-km-z]{25,34}$/;
|
|
@@ -1433,7 +1433,7 @@ var init_share = __esm({
|
|
|
1433
1433
|
}
|
|
1434
1434
|
});
|
|
1435
1435
|
|
|
1436
|
-
// lib/save-log.js
|
|
1436
|
+
// mcp-server/lib/save-log.js
|
|
1437
1437
|
import { appendFileSync, readFileSync as readFileSync3, writeFileSync as writeFileSync3, existsSync as existsSync3, mkdirSync as mkdirSync3 } from "fs";
|
|
1438
1438
|
import { join as join3 } from "path";
|
|
1439
1439
|
import { homedir as homedir3 } from "os";
|
|
@@ -1470,13 +1470,13 @@ function appendReceipt(receipt, meta = {}) {
|
|
|
1470
1470
|
}
|
|
1471
1471
|
var DIR2, LOG;
|
|
1472
1472
|
var init_save_log = __esm({
|
|
1473
|
-
"lib/save-log.js"() {
|
|
1473
|
+
"mcp-server/lib/save-log.js"() {
|
|
1474
1474
|
DIR2 = join3(homedir3(), ".indelible");
|
|
1475
1475
|
LOG = join3(DIR2, "save-log.jsonl");
|
|
1476
1476
|
}
|
|
1477
1477
|
});
|
|
1478
1478
|
|
|
1479
|
-
// lib/advisory/index.customer.js
|
|
1479
|
+
// mcp-server/lib/advisory/index.customer.js
|
|
1480
1480
|
function extractAnchors() {
|
|
1481
1481
|
return null;
|
|
1482
1482
|
}
|
|
@@ -1521,11 +1521,11 @@ async function pollInfraEmotions() {
|
|
|
1521
1521
|
return null;
|
|
1522
1522
|
}
|
|
1523
1523
|
var init_index_customer = __esm({
|
|
1524
|
-
"lib/advisory/index.customer.js"() {
|
|
1524
|
+
"mcp-server/lib/advisory/index.customer.js"() {
|
|
1525
1525
|
}
|
|
1526
1526
|
});
|
|
1527
1527
|
|
|
1528
|
-
// build/wall-stub.js
|
|
1528
|
+
// mcp-server/build/wall-stub.js
|
|
1529
1529
|
var wall_stub_exports = {};
|
|
1530
1530
|
__export(wall_stub_exports, {
|
|
1531
1531
|
adversarialReview: () => adversarialReview,
|
|
@@ -1546,7 +1546,7 @@ __export(wall_stub_exports, {
|
|
|
1546
1546
|
});
|
|
1547
1547
|
var asyncEmpty, calibrate, adversarialReview, bookkeeperAudit, quartermasterBrief, treasuryStatus, checkAsRyan, auditChainGoalState2, buildAndWriteFederationChat, readRecentEvents, dispatchCloneCheck, cloneCheck2, logAgentVerdict2, escalateVerdict, announce, wall_stub_default;
|
|
1548
1548
|
var init_wall_stub = __esm({
|
|
1549
|
-
"build/wall-stub.js"() {
|
|
1549
|
+
"mcp-server/build/wall-stub.js"() {
|
|
1550
1550
|
asyncEmpty = async () => ({});
|
|
1551
1551
|
calibrate = asyncEmpty;
|
|
1552
1552
|
adversarialReview = asyncEmpty;
|
|
@@ -1569,7 +1569,7 @@ var init_wall_stub = __esm({
|
|
|
1569
1569
|
}
|
|
1570
1570
|
});
|
|
1571
1571
|
|
|
1572
|
-
// tools/save_style.js
|
|
1572
|
+
// mcp-server/tools/save_style.js
|
|
1573
1573
|
import { readFile as readFile3 } from "fs/promises";
|
|
1574
1574
|
import { existsSync as existsSync6 } from "fs";
|
|
1575
1575
|
function stripCoreRules(rulesText) {
|
|
@@ -1665,7 +1665,7 @@ async function saveStyleFromFile(filePath, styleName, description) {
|
|
|
1665
1665
|
}
|
|
1666
1666
|
var CORE_RULES_MARKER, CORE_RULES;
|
|
1667
1667
|
var init_save_style = __esm({
|
|
1668
|
-
"tools/save_style.js"() {
|
|
1668
|
+
"mcp-server/tools/save_style.js"() {
|
|
1669
1669
|
init_config_customer();
|
|
1670
1670
|
init_crypto();
|
|
1671
1671
|
init_spv();
|
|
@@ -1729,7 +1729,7 @@ Handbooks live in the project root \u2014 check MEMORY.md for paths.
|
|
|
1729
1729
|
}
|
|
1730
1730
|
});
|
|
1731
1731
|
|
|
1732
|
-
// tools/load_style.js
|
|
1732
|
+
// mcp-server/tools/load_style.js
|
|
1733
1733
|
import { Transaction as Transaction4 } from "@bsv/sdk";
|
|
1734
1734
|
import { writeFileSync as writeFileSync4 } from "fs";
|
|
1735
1735
|
import { join as join6 } from "path";
|
|
@@ -1836,7 +1836,7 @@ async function loadStyle(txId) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
var SYNCABLE_FIELDS, API_TIMEOUT_MS;
|
|
1838
1838
|
var init_load_style = __esm({
|
|
1839
|
-
"tools/load_style.js"() {
|
|
1839
|
+
"mcp-server/tools/load_style.js"() {
|
|
1840
1840
|
init_config_customer();
|
|
1841
1841
|
init_crypto();
|
|
1842
1842
|
init_spv();
|
|
@@ -1846,7 +1846,7 @@ var init_load_style = __esm({
|
|
|
1846
1846
|
}
|
|
1847
1847
|
});
|
|
1848
1848
|
|
|
1849
|
-
//
|
|
1849
|
+
// scripts/lib/claim-status.mjs
|
|
1850
1850
|
import { hostname } from "os";
|
|
1851
1851
|
function pidAlive(pid) {
|
|
1852
1852
|
try {
|
|
@@ -1885,12 +1885,12 @@ function claimStatus(g) {
|
|
|
1885
1885
|
}
|
|
1886
1886
|
var CLAIM_STALE_MS;
|
|
1887
1887
|
var init_claim_status = __esm({
|
|
1888
|
-
"
|
|
1888
|
+
"scripts/lib/claim-status.mjs"() {
|
|
1889
1889
|
CLAIM_STALE_MS = 30 * 60 * 1e3;
|
|
1890
1890
|
}
|
|
1891
1891
|
});
|
|
1892
1892
|
|
|
1893
|
-
// lib/tenant-paths.js
|
|
1893
|
+
// mcp-server/lib/tenant-paths.js
|
|
1894
1894
|
import { homedir as homedir7 } from "os";
|
|
1895
1895
|
import { join as join7 } from "path";
|
|
1896
1896
|
function base(tenantId) {
|
|
@@ -1907,14 +1907,14 @@ function base(tenantId) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
var goalsDir, goalsPath, innerStatePath;
|
|
1909
1909
|
var init_tenant_paths = __esm({
|
|
1910
|
-
"lib/tenant-paths.js"() {
|
|
1910
|
+
"mcp-server/lib/tenant-paths.js"() {
|
|
1911
1911
|
goalsDir = (t) => base(t);
|
|
1912
1912
|
goalsPath = (t) => join7(base(t), "goals.json");
|
|
1913
1913
|
innerStatePath = (t) => join7(base(t), "inner-state.json");
|
|
1914
1914
|
}
|
|
1915
1915
|
});
|
|
1916
1916
|
|
|
1917
|
-
// tools/goals.js
|
|
1917
|
+
// mcp-server/tools/goals.js
|
|
1918
1918
|
import { readFileSync as readFileSync5, writeFileSync as writeFileSync5, existsSync as existsSync7, mkdirSync as mkdirSync4, unlinkSync, openSync, closeSync, renameSync } from "fs";
|
|
1919
1919
|
import { join as join8 } from "path";
|
|
1920
1920
|
import { homedir as homedir8, hostname as hostname2 } from "os";
|
|
@@ -2352,7 +2352,7 @@ async function _manageGoal({ action, goal_id, title, intent, priority, owner, ne
|
|
|
2352
2352
|
}
|
|
2353
2353
|
var GOALS_DIR, GOALS_PATH, CURRENT_FOCUS_PATH, GOALS_LOCK, LOCK_STALE_MS, LOCK_POLL_MS, LOCK_MAX_TRIES, LEAKED_TAG_RE, LEAK_BOUNDARY_RE;
|
|
2354
2354
|
var init_goals = __esm({
|
|
2355
|
-
"tools/goals.js"() {
|
|
2355
|
+
"mcp-server/tools/goals.js"() {
|
|
2356
2356
|
init_index_customer();
|
|
2357
2357
|
init_claim_status();
|
|
2358
2358
|
init_tenant_paths();
|
|
@@ -2368,7 +2368,7 @@ var init_goals = __esm({
|
|
|
2368
2368
|
}
|
|
2369
2369
|
});
|
|
2370
2370
|
|
|
2371
|
-
// tools/inner_state.js
|
|
2371
|
+
// mcp-server/tools/inner_state.js
|
|
2372
2372
|
import { readFileSync as readFileSync6, writeFileSync as writeFileSync6, existsSync as existsSync8, mkdirSync as mkdirSync5 } from "fs";
|
|
2373
2373
|
function ensureDir3() {
|
|
2374
2374
|
const dir = base("");
|
|
@@ -2671,7 +2671,7 @@ async function updateInnerState({ observed, source, preoccupations, open_loops,
|
|
|
2671
2671
|
}
|
|
2672
2672
|
var STATE_PATH, BASELINE, MAX_DELTA, SMOOTHING, BASELINE_PULL;
|
|
2673
2673
|
var init_inner_state = __esm({
|
|
2674
|
-
"tools/inner_state.js"() {
|
|
2674
|
+
"mcp-server/tools/inner_state.js"() {
|
|
2675
2675
|
init_index_customer();
|
|
2676
2676
|
init_tenant_paths();
|
|
2677
2677
|
STATE_PATH = innerStatePath("");
|
|
@@ -2689,7 +2689,7 @@ var init_inner_state = __esm({
|
|
|
2689
2689
|
}
|
|
2690
2690
|
});
|
|
2691
2691
|
|
|
2692
|
-
// tools/load_context.js
|
|
2692
|
+
// mcp-server/tools/load_context.js
|
|
2693
2693
|
import { gunzipSync } from "zlib";
|
|
2694
2694
|
import { existsSync as existsSync9, createReadStream as createReadStream2 } from "fs";
|
|
2695
2695
|
import { createInterface as createInterface2 } from "readline";
|
|
@@ -3255,7 +3255,7 @@ async function loadContext(numSessions = 5, pagination = null, opts = {}) {
|
|
|
3255
3255
|
}
|
|
3256
3256
|
var RECENT_MESSAGES_FULL, OLDER_MESSAGES_SUMMARIZED;
|
|
3257
3257
|
var init_load_context = __esm({
|
|
3258
|
-
"tools/load_context.js"() {
|
|
3258
|
+
"mcp-server/tools/load_context.js"() {
|
|
3259
3259
|
init_config_customer();
|
|
3260
3260
|
init_crypto();
|
|
3261
3261
|
init_summary();
|
|
@@ -3271,7 +3271,7 @@ var init_load_context = __esm({
|
|
|
3271
3271
|
}
|
|
3272
3272
|
});
|
|
3273
3273
|
|
|
3274
|
-
// lib/file-lock.js
|
|
3274
|
+
// mcp-server/lib/file-lock.js
|
|
3275
3275
|
import { openSync as openSync2, writeFileSync as writeFileSync7, closeSync as closeSync2, readFileSync as readFileSync8, unlinkSync as unlinkSync2, renameSync as renameSync2 } from "fs";
|
|
3276
3276
|
function pidAlive2(pid) {
|
|
3277
3277
|
if (!Number.isInteger(pid)) return false;
|
|
@@ -3318,11 +3318,11 @@ async function withFileLock(lockPath, fn, { staleMs = 5e3, pollMs = 50, maxTries
|
|
|
3318
3318
|
}
|
|
3319
3319
|
}
|
|
3320
3320
|
var init_file_lock = __esm({
|
|
3321
|
-
"lib/file-lock.js"() {
|
|
3321
|
+
"mcp-server/lib/file-lock.js"() {
|
|
3322
3322
|
}
|
|
3323
3323
|
});
|
|
3324
3324
|
|
|
3325
|
-
// lib/semantic/manifest.js
|
|
3325
|
+
// mcp-server/lib/semantic/manifest.js
|
|
3326
3326
|
var manifest_exports = {};
|
|
3327
3327
|
__export(manifest_exports, {
|
|
3328
3328
|
DIM: () => DIM,
|
|
@@ -3354,7 +3354,7 @@ function packPresent(profile = PROFILE) {
|
|
|
3354
3354
|
}
|
|
3355
3355
|
var MODEL_VER, DIM, QUERY_PREFIX, MAX_TOKENS, PROFILE, PACK_FILES;
|
|
3356
3356
|
var init_manifest = __esm({
|
|
3357
|
-
"lib/semantic/manifest.js"() {
|
|
3357
|
+
"mcp-server/lib/semantic/manifest.js"() {
|
|
3358
3358
|
MODEL_VER = "bge-small-en-v1.5-int8@6c9c6101";
|
|
3359
3359
|
DIM = 384;
|
|
3360
3360
|
QUERY_PREFIX = "Represent this sentence for searching relevant passages: ";
|
|
@@ -3399,7 +3399,7 @@ var init_manifest = __esm({
|
|
|
3399
3399
|
}
|
|
3400
3400
|
});
|
|
3401
3401
|
|
|
3402
|
-
// lib/semantic/tokenizer.js
|
|
3402
|
+
// mcp-server/lib/semantic/tokenizer.js
|
|
3403
3403
|
import { readFileSync as readFileSync9 } from "fs";
|
|
3404
3404
|
import { join as join13 } from "path";
|
|
3405
3405
|
function isPunct(cp, ch) {
|
|
@@ -3420,7 +3420,7 @@ function getTokenizer(profileDir = packDir()) {
|
|
|
3420
3420
|
}
|
|
3421
3421
|
var WordPieceTokenizer, _singleton;
|
|
3422
3422
|
var init_tokenizer = __esm({
|
|
3423
|
-
"lib/semantic/tokenizer.js"() {
|
|
3423
|
+
"mcp-server/lib/semantic/tokenizer.js"() {
|
|
3424
3424
|
init_manifest();
|
|
3425
3425
|
WordPieceTokenizer = class {
|
|
3426
3426
|
/** @param {string} tokenizerJsonPath absolute path to the pack's tokenizer.json */
|
|
@@ -3522,7 +3522,7 @@ var init_tokenizer = __esm({
|
|
|
3522
3522
|
}
|
|
3523
3523
|
});
|
|
3524
3524
|
|
|
3525
|
-
// lib/semantic/embedder.js
|
|
3525
|
+
// mcp-server/lib/semantic/embedder.js
|
|
3526
3526
|
var embedder_exports = {};
|
|
3527
3527
|
__export(embedder_exports, {
|
|
3528
3528
|
DIM: () => DIM,
|
|
@@ -3610,7 +3610,7 @@ async function embedPassages(texts) {
|
|
|
3610
3610
|
}
|
|
3611
3611
|
var _loading, _engine;
|
|
3612
3612
|
var init_embedder = __esm({
|
|
3613
|
-
"lib/semantic/embedder.js"() {
|
|
3613
|
+
"mcp-server/lib/semantic/embedder.js"() {
|
|
3614
3614
|
init_manifest();
|
|
3615
3615
|
init_tokenizer();
|
|
3616
3616
|
_loading = null;
|
|
@@ -3618,7 +3618,7 @@ var init_embedder = __esm({
|
|
|
3618
3618
|
}
|
|
3619
3619
|
});
|
|
3620
3620
|
|
|
3621
|
-
// lib/semantic/vec-store.js
|
|
3621
|
+
// mcp-server/lib/semantic/vec-store.js
|
|
3622
3622
|
var vec_store_exports = {};
|
|
3623
3623
|
__export(vec_store_exports, {
|
|
3624
3624
|
CHUNK_CHARS: () => CHUNK_CHARS,
|
|
@@ -3771,7 +3771,7 @@ async function rebuildVectorSidecar(address, { maxEmbed = 300, onProgress = null
|
|
|
3771
3771
|
}
|
|
3772
3772
|
var INDEX_DIR, embedsPath, embedsLock, CHUNK_CHARS, MAX_CHUNKS, _cache;
|
|
3773
3773
|
var init_vec_store = __esm({
|
|
3774
|
-
"lib/semantic/vec-store.js"() {
|
|
3774
|
+
"mcp-server/lib/semantic/vec-store.js"() {
|
|
3775
3775
|
init_file_lock();
|
|
3776
3776
|
init_manifest();
|
|
3777
3777
|
INDEX_DIR = join15(homedir12(), ".indelible", "recall-index");
|
|
@@ -3783,7 +3783,7 @@ var init_vec_store = __esm({
|
|
|
3783
3783
|
}
|
|
3784
3784
|
});
|
|
3785
3785
|
|
|
3786
|
-
// lib/recall-index.js
|
|
3786
|
+
// mcp-server/lib/recall-index.js
|
|
3787
3787
|
var recall_index_exports = {};
|
|
3788
3788
|
__export(recall_index_exports, {
|
|
3789
3789
|
buildIndexWindow: () => buildIndexWindow,
|
|
@@ -4074,7 +4074,7 @@ function indexStatus(address) {
|
|
|
4074
4074
|
}
|
|
4075
4075
|
var ROOT, INDEX_DIR2, GAPS_DIR, indexPath, indexLock, gapsPath, gapsLock, withTimeout, isGenericSummary, MIN_SEMANTIC_CHARS, SUBSTANTIAL_CHARS;
|
|
4076
4076
|
var init_recall_index = __esm({
|
|
4077
|
-
"lib/recall-index.js"() {
|
|
4077
|
+
"mcp-server/lib/recall-index.js"() {
|
|
4078
4078
|
init_file_lock();
|
|
4079
4079
|
init_spv();
|
|
4080
4080
|
init_load_context();
|
|
@@ -4092,7 +4092,7 @@ var init_recall_index = __esm({
|
|
|
4092
4092
|
}
|
|
4093
4093
|
});
|
|
4094
4094
|
|
|
4095
|
-
// lib/semantic/fetch-pack.js
|
|
4095
|
+
// mcp-server/lib/semantic/fetch-pack.js
|
|
4096
4096
|
var fetch_pack_exports = {};
|
|
4097
4097
|
__export(fetch_pack_exports, {
|
|
4098
4098
|
fetchPack: () => fetchPack
|
|
@@ -4156,7 +4156,7 @@ async function fetchPack({ profile = PROFILE, timeoutMs = 3e5, onProgress = null
|
|
|
4156
4156
|
}
|
|
4157
4157
|
var PackError;
|
|
4158
4158
|
var init_fetch_pack = __esm({
|
|
4159
|
-
"lib/semantic/fetch-pack.js"() {
|
|
4159
|
+
"mcp-server/lib/semantic/fetch-pack.js"() {
|
|
4160
4160
|
init_manifest();
|
|
4161
4161
|
PackError = class extends Error {
|
|
4162
4162
|
constructor(code, message) {
|
|
@@ -4167,7 +4167,58 @@ var init_fetch_pack = __esm({
|
|
|
4167
4167
|
}
|
|
4168
4168
|
});
|
|
4169
4169
|
|
|
4170
|
-
//
|
|
4170
|
+
// mcp-server/lib/timecard.js
|
|
4171
|
+
var timecard_exports = {};
|
|
4172
|
+
__export(timecard_exports, {
|
|
4173
|
+
buildTimeCard: () => buildTimeCard,
|
|
4174
|
+
partOfDay: () => partOfDay,
|
|
4175
|
+
phraseDelta: () => phraseDelta,
|
|
4176
|
+
tempoPhrase: () => tempoPhrase
|
|
4177
|
+
});
|
|
4178
|
+
function phraseDelta(ms) {
|
|
4179
|
+
if (!Number.isFinite(ms)) return null;
|
|
4180
|
+
if (ms < 0) ms = 0;
|
|
4181
|
+
if (ms < 6e5) return "just now";
|
|
4182
|
+
if (ms < 54e5) return `~${Math.round(ms / 6e4)}m ago`;
|
|
4183
|
+
if (ms < 648e5) return `~${Math.round(ms / 36e5)}h ago`;
|
|
4184
|
+
if (ms < 1296e5) return "yesterday";
|
|
4185
|
+
if (ms < 12096e5) return `${Math.round(ms / 864e5)} days ago`;
|
|
4186
|
+
if (ms < 5184e6) return `${Math.round(ms / 6048e5)} weeks ago`;
|
|
4187
|
+
return `${Math.floor(ms / 2592e6)} months ago`;
|
|
4188
|
+
}
|
|
4189
|
+
function tempoPhrase(recent7, avgPerWeek) {
|
|
4190
|
+
if (!Number.isFinite(recent7)) return null;
|
|
4191
|
+
if (recent7 === 0) return "quiet";
|
|
4192
|
+
if (avgPerWeek > 0 && recent7 >= avgPerWeek * 1.5) return "fast stretch";
|
|
4193
|
+
if (avgPerWeek > 0 && recent7 <= avgPerWeek * 0.5) return "quiet";
|
|
4194
|
+
return "steady";
|
|
4195
|
+
}
|
|
4196
|
+
function partOfDay(hour) {
|
|
4197
|
+
if (hour < 5) return "late night";
|
|
4198
|
+
if (hour < 12) return "morning";
|
|
4199
|
+
if (hour < 17) return "afternoon";
|
|
4200
|
+
if (hour < 21) return "evening";
|
|
4201
|
+
return "night";
|
|
4202
|
+
}
|
|
4203
|
+
function buildTimeCard(f = {}) {
|
|
4204
|
+
const lines = [`\u23F1 TIME CARD \u2014 generated ${f.generated || "(clock unavailable)"} (real clock, machine-read)`];
|
|
4205
|
+
if (f.nowLabel) lines.push(`\u2022 Now: ${f.nowLabel}.`);
|
|
4206
|
+
if (f.lastSeen) lines.push(`\u2022 Last session: ${f.lastSeen}.`);
|
|
4207
|
+
if (f.lastCommit) lines.push(`\u2022 Last commit: ${f.lastCommit}.`);
|
|
4208
|
+
lines.push("\u2022 This session: just started (turn 1).");
|
|
4209
|
+
if (f.focusLine) lines.push(`\u2022 ${f.focusLine}.`);
|
|
4210
|
+
if (f.oldestOpen) lines.push(`\u2022 ${f.oldestOpen}.`);
|
|
4211
|
+
if (f.tempo) lines.push(`\u2022 Tempo: ${f.tempo}.`);
|
|
4212
|
+
lines.push("");
|
|
4213
|
+
lines.push("Internalize this Time Card. When the conversation touches when / how-long / how-recent, answer from it, not from a guess.");
|
|
4214
|
+
return lines.join("\n");
|
|
4215
|
+
}
|
|
4216
|
+
var init_timecard = __esm({
|
|
4217
|
+
"mcp-server/lib/timecard.js"() {
|
|
4218
|
+
}
|
|
4219
|
+
});
|
|
4220
|
+
|
|
4221
|
+
// cli-sandbox/src/index.js
|
|
4171
4222
|
init_config_customer();
|
|
4172
4223
|
import { createInterface as createInterface3 } from "node:readline";
|
|
4173
4224
|
import { execSync as execSync2 } from "node:child_process";
|
|
@@ -4176,7 +4227,7 @@ import { join as join19, dirname as dirname5, resolve as resolve2 } from "node:p
|
|
|
4176
4227
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
4177
4228
|
import { readFileSync as readFileSync15, writeFileSync as writeFileSync8, existsSync as existsSync19, mkdirSync as mkdirSync9, readdirSync, statSync as statSync4 } from "node:fs";
|
|
4178
4229
|
|
|
4179
|
-
// lib/guardrails-run.js
|
|
4230
|
+
// mcp-server/lib/guardrails-run.js
|
|
4180
4231
|
function contextFromInput(input) {
|
|
4181
4232
|
const tool = input?.tool_name;
|
|
4182
4233
|
const ti = input?.tool_input || {};
|
|
@@ -4202,7 +4253,7 @@ function runRules(input, rules) {
|
|
|
4202
4253
|
return null;
|
|
4203
4254
|
}
|
|
4204
4255
|
|
|
4205
|
-
// lib/guardrails.customer.js
|
|
4256
|
+
// mcp-server/lib/guardrails.customer.js
|
|
4206
4257
|
var RULES = [
|
|
4207
4258
|
{
|
|
4208
4259
|
// Reading a private key or seed into the chat sends it to the model and into
|
|
@@ -4244,7 +4295,7 @@ function evaluate(input) {
|
|
|
4244
4295
|
return runRules(input, RULES);
|
|
4245
4296
|
}
|
|
4246
4297
|
|
|
4247
|
-
// tools/setup_wallet.js
|
|
4298
|
+
// mcp-server/tools/setup_wallet.js
|
|
4248
4299
|
init_config_customer();
|
|
4249
4300
|
init_crypto();
|
|
4250
4301
|
init_api_client();
|
|
@@ -4340,7 +4391,7 @@ async function setupWallet(apiUrl = DEFAULT_API_URL2, importWif, pin) {
|
|
|
4340
4391
|
};
|
|
4341
4392
|
}
|
|
4342
4393
|
|
|
4343
|
-
// tools/save_session.js
|
|
4394
|
+
// mcp-server/tools/save_session.js
|
|
4344
4395
|
init_config_customer();
|
|
4345
4396
|
init_crypto();
|
|
4346
4397
|
init_share();
|
|
@@ -4355,10 +4406,10 @@ import { dirname, join as join5 } from "path";
|
|
|
4355
4406
|
import { homedir as homedir5 } from "os";
|
|
4356
4407
|
import { PrivateKey as PrivateKey6 } from "@bsv/sdk";
|
|
4357
4408
|
|
|
4358
|
-
// lib/witness.js
|
|
4409
|
+
// mcp-server/lib/witness.js
|
|
4359
4410
|
init_index_customer();
|
|
4360
4411
|
|
|
4361
|
-
// lib/redact.js
|
|
4412
|
+
// mcp-server/lib/redact.js
|
|
4362
4413
|
import { createHash as createHash3 } from "node:crypto";
|
|
4363
4414
|
var B58_ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
|
|
4364
4415
|
function base58Decode(str) {
|
|
@@ -4489,7 +4540,7 @@ function redactSession(session) {
|
|
|
4489
4540
|
return changed;
|
|
4490
4541
|
}
|
|
4491
4542
|
|
|
4492
|
-
// lib/witness.js
|
|
4543
|
+
// mcp-server/lib/witness.js
|
|
4493
4544
|
var MAX_SESSION_BYTES = 9 * 1024 * 1024;
|
|
4494
4545
|
var MAX_FILE_BYTES = 100 * 1024 * 1024;
|
|
4495
4546
|
var WARN_FILE_BYTES = 10 * 1024 * 1024;
|
|
@@ -4772,10 +4823,10 @@ function isBypassed(opts = {}) {
|
|
|
4772
4823
|
return false;
|
|
4773
4824
|
}
|
|
4774
4825
|
|
|
4775
|
-
// tools/save_session.js
|
|
4826
|
+
// mcp-server/tools/save_session.js
|
|
4776
4827
|
init_index_customer();
|
|
4777
4828
|
|
|
4778
|
-
// tools/save_file.js
|
|
4829
|
+
// mcp-server/tools/save_file.js
|
|
4779
4830
|
init_config_customer();
|
|
4780
4831
|
init_crypto();
|
|
4781
4832
|
init_api_client();
|
|
@@ -5043,13 +5094,13 @@ ${formatSaveReceipt(receipt)}`
|
|
|
5043
5094
|
}
|
|
5044
5095
|
}
|
|
5045
5096
|
|
|
5046
|
-
// lib/transcript-path.js
|
|
5097
|
+
// mcp-server/lib/transcript-path.js
|
|
5047
5098
|
import { resolve } from "path";
|
|
5048
5099
|
function canonicalTranscriptKey(p) {
|
|
5049
5100
|
return p && typeof p === "string" ? resolve(p) : p;
|
|
5050
5101
|
}
|
|
5051
5102
|
|
|
5052
|
-
// tools/save_session.js
|
|
5103
|
+
// mcp-server/tools/save_session.js
|
|
5053
5104
|
init_index_customer();
|
|
5054
5105
|
init_index_customer();
|
|
5055
5106
|
var PLANS_DIR = join5(homedir5(), ".claude", "plans");
|
|
@@ -6043,10 +6094,10 @@ ${formatSaveReceipt(result.receipt)}`
|
|
|
6043
6094
|
}
|
|
6044
6095
|
}
|
|
6045
6096
|
|
|
6046
|
-
//
|
|
6097
|
+
// cli-sandbox/src/index.js
|
|
6047
6098
|
init_load_context();
|
|
6048
6099
|
|
|
6049
|
-
// tools/save_project.js
|
|
6100
|
+
// mcp-server/tools/save_project.js
|
|
6050
6101
|
init_config_customer();
|
|
6051
6102
|
init_crypto();
|
|
6052
6103
|
init_spv();
|
|
@@ -6215,7 +6266,7 @@ ${formatSaveReceipt(receipt)}`
|
|
|
6215
6266
|
}
|
|
6216
6267
|
}
|
|
6217
6268
|
|
|
6218
|
-
// tools/load_file.js
|
|
6269
|
+
// mcp-server/tools/load_file.js
|
|
6219
6270
|
init_config_customer();
|
|
6220
6271
|
init_crypto();
|
|
6221
6272
|
init_share();
|
|
@@ -6405,7 +6456,7 @@ async function loadFile(txId, options = {}) {
|
|
|
6405
6456
|
};
|
|
6406
6457
|
}
|
|
6407
6458
|
|
|
6408
|
-
// tools/load_project.js
|
|
6459
|
+
// mcp-server/tools/load_project.js
|
|
6409
6460
|
init_config_customer();
|
|
6410
6461
|
init_crypto();
|
|
6411
6462
|
init_share();
|
|
@@ -6584,11 +6635,11 @@ async function loadProject(txId, options = {}) {
|
|
|
6584
6635
|
};
|
|
6585
6636
|
}
|
|
6586
6637
|
|
|
6587
|
-
//
|
|
6638
|
+
// cli-sandbox/src/index.js
|
|
6588
6639
|
init_save_style();
|
|
6589
6640
|
init_load_style();
|
|
6590
6641
|
|
|
6591
|
-
// tools/update_vault_index.js
|
|
6642
|
+
// mcp-server/tools/update_vault_index.js
|
|
6592
6643
|
init_config_customer();
|
|
6593
6644
|
init_crypto();
|
|
6594
6645
|
init_spv();
|
|
@@ -6658,7 +6709,7 @@ ${formatSaveReceipt(receipt)}`
|
|
|
6658
6709
|
}
|
|
6659
6710
|
}
|
|
6660
6711
|
|
|
6661
|
-
// tools/diary_connect.js
|
|
6712
|
+
// mcp-server/tools/diary_connect.js
|
|
6662
6713
|
init_config_customer();
|
|
6663
6714
|
init_api_client();
|
|
6664
6715
|
async function diaryConnect({ apiKey, model, name }) {
|
|
@@ -6706,11 +6757,11 @@ async function diaryConnect({ apiKey, model, name }) {
|
|
|
6706
6757
|
};
|
|
6707
6758
|
}
|
|
6708
6759
|
|
|
6709
|
-
// tools/diary_chat.js
|
|
6760
|
+
// mcp-server/tools/diary_chat.js
|
|
6710
6761
|
init_config_customer();
|
|
6711
6762
|
init_api_client();
|
|
6712
6763
|
|
|
6713
|
-
// tools/diary_save.js
|
|
6764
|
+
// mcp-server/tools/diary_save.js
|
|
6714
6765
|
init_config_customer();
|
|
6715
6766
|
init_crypto();
|
|
6716
6767
|
init_api_client();
|
|
@@ -6812,7 +6863,7 @@ async function diarySave({ messages, summary }) {
|
|
|
6812
6863
|
return saveCompanionExchange({ messages, summary, type: "diary", trigger: "interactive" });
|
|
6813
6864
|
}
|
|
6814
6865
|
|
|
6815
|
-
// tools/diary_recall.js
|
|
6866
|
+
// mcp-server/tools/diary_recall.js
|
|
6816
6867
|
init_config_customer();
|
|
6817
6868
|
init_recall_index();
|
|
6818
6869
|
init_load_context();
|
|
@@ -6876,7 +6927,7 @@ async function diaryRecall({ from_date = null, to_date = null, query = null, dep
|
|
|
6876
6927
|
};
|
|
6877
6928
|
}
|
|
6878
6929
|
|
|
6879
|
-
// tools/diary_chat.js
|
|
6930
|
+
// mcp-server/tools/diary_chat.js
|
|
6880
6931
|
async function diaryChat({ message, context, systemPrompt }) {
|
|
6881
6932
|
if (!message) {
|
|
6882
6933
|
return {
|
|
@@ -7027,7 +7078,7 @@ ${context}` });
|
|
|
7027
7078
|
}
|
|
7028
7079
|
}
|
|
7029
7080
|
|
|
7030
|
-
// tools/x402_fetch.js
|
|
7081
|
+
// mcp-server/tools/x402_fetch.js
|
|
7031
7082
|
init_config_customer();
|
|
7032
7083
|
init_spv();
|
|
7033
7084
|
init_utxo_cache();
|
|
@@ -7162,7 +7213,7 @@ async function x402Fetch({ url, method = "GET", headers = {}, body, maxSats }) {
|
|
|
7162
7213
|
};
|
|
7163
7214
|
}
|
|
7164
7215
|
|
|
7165
|
-
//
|
|
7216
|
+
// cli-sandbox/src/index.js
|
|
7166
7217
|
init_goals();
|
|
7167
7218
|
init_inner_state();
|
|
7168
7219
|
init_wall_stub();
|
|
@@ -7172,7 +7223,7 @@ init_wall_stub();
|
|
|
7172
7223
|
init_wall_stub();
|
|
7173
7224
|
init_wall_stub();
|
|
7174
7225
|
|
|
7175
|
-
// tools/save_goals_to_chain.js
|
|
7226
|
+
// mcp-server/tools/save_goals_to_chain.js
|
|
7176
7227
|
import { readFileSync as readFileSync13, existsSync as existsSync16 } from "fs";
|
|
7177
7228
|
init_spv();
|
|
7178
7229
|
init_utxo_cache();
|
|
@@ -7274,7 +7325,7 @@ Web Goals tab should reflect these on next refresh (chain scan).`
|
|
|
7274
7325
|
};
|
|
7275
7326
|
}
|
|
7276
7327
|
|
|
7277
|
-
// tools/recall_context.js
|
|
7328
|
+
// mcp-server/tools/recall_context.js
|
|
7278
7329
|
init_config_customer();
|
|
7279
7330
|
init_recall_index();
|
|
7280
7331
|
init_load_context();
|
|
@@ -7342,7 +7393,7 @@ async function recallContext({ from_date = null, to_date = null, query = null, d
|
|
|
7342
7393
|
};
|
|
7343
7394
|
}
|
|
7344
7395
|
|
|
7345
|
-
// tools/report_bug.js
|
|
7396
|
+
// mcp-server/tools/report_bug.js
|
|
7346
7397
|
import { readFileSync as readFileSync14, existsSync as existsSync17 } from "fs";
|
|
7347
7398
|
import { join as join17, dirname as dirname4 } from "path";
|
|
7348
7399
|
import { homedir as homedir14 } from "os";
|
|
@@ -7452,7 +7503,7 @@ async function reportBug(args2 = {}, mcpVersion) {
|
|
|
7452
7503
|
}
|
|
7453
7504
|
}
|
|
7454
7505
|
|
|
7455
|
-
// tools/share_session.js
|
|
7506
|
+
// mcp-server/tools/share_session.js
|
|
7456
7507
|
init_config_customer();
|
|
7457
7508
|
init_spv();
|
|
7458
7509
|
init_api_client();
|
|
@@ -7672,7 +7723,7 @@ function pushDataChunk2(data) {
|
|
|
7672
7723
|
return { op, data };
|
|
7673
7724
|
}
|
|
7674
7725
|
|
|
7675
|
-
// tools/load_shared.js
|
|
7726
|
+
// mcp-server/tools/load_shared.js
|
|
7676
7727
|
async function loadShared(opts = {}) {
|
|
7677
7728
|
globalThis.__pathACallCount = (globalThis.__pathACallCount || 0) + 1;
|
|
7678
7729
|
return {
|
|
@@ -7681,7 +7732,7 @@ async function loadShared(opts = {}) {
|
|
|
7681
7732
|
};
|
|
7682
7733
|
}
|
|
7683
7734
|
|
|
7684
|
-
//
|
|
7735
|
+
// cli-sandbox/src/index.js
|
|
7685
7736
|
init_wall_stub();
|
|
7686
7737
|
init_wall_stub();
|
|
7687
7738
|
init_wall_stub();
|
|
@@ -7989,7 +8040,7 @@ Commands:
|
|
|
7989
8040
|
}
|
|
7990
8041
|
function printHelp() {
|
|
7991
8042
|
console.log(`
|
|
7992
|
-
Indelible MCP \u2014 Blockchain memory for Claude Code (v4.9.
|
|
8043
|
+
Indelible MCP \u2014 Blockchain memory for Claude Code (v4.9.4)
|
|
7993
8044
|
|
|
7994
8045
|
Setup:
|
|
7995
8046
|
indelible-mcp setup --wif=KEY --pin=PIN Import and encrypt your private key
|
|
@@ -8036,13 +8087,76 @@ Get your key: Sign in at indelible.one \u2192 Settings \u2192 Private Key
|
|
|
8036
8087
|
Learn more: https://indelible.one
|
|
8037
8088
|
`);
|
|
8038
8089
|
}
|
|
8090
|
+
function findNewestTranscript() {
|
|
8091
|
+
const projectsDir = join19(homedir15(), ".claude", "projects");
|
|
8092
|
+
if (!existsSync19(projectsDir)) return null;
|
|
8093
|
+
let newestTime = 0;
|
|
8094
|
+
let newest = null;
|
|
8095
|
+
try {
|
|
8096
|
+
for (const project of readdirSync(projectsDir)) {
|
|
8097
|
+
const projectPath = join19(projectsDir, project);
|
|
8098
|
+
try {
|
|
8099
|
+
if (!statSync4(projectPath).isDirectory()) continue;
|
|
8100
|
+
for (const file of readdirSync(projectPath)) {
|
|
8101
|
+
if (!file.endsWith(".jsonl")) continue;
|
|
8102
|
+
const p = join19(projectPath, file);
|
|
8103
|
+
const t = statSync4(p).mtimeMs;
|
|
8104
|
+
if (t > newestTime) {
|
|
8105
|
+
newestTime = t;
|
|
8106
|
+
newest = p;
|
|
8107
|
+
}
|
|
8108
|
+
}
|
|
8109
|
+
} catch {
|
|
8110
|
+
}
|
|
8111
|
+
}
|
|
8112
|
+
} catch {
|
|
8113
|
+
}
|
|
8114
|
+
return newest;
|
|
8115
|
+
}
|
|
8116
|
+
async function printTimeCard() {
|
|
8117
|
+
try {
|
|
8118
|
+
const { phraseDelta: phraseDelta2, partOfDay: partOfDay2, buildTimeCard: buildTimeCard2, tempoPhrase: tempoPhrase2 } = await Promise.resolve().then(() => (init_timecard(), timecard_exports));
|
|
8119
|
+
const now = /* @__PURE__ */ new Date();
|
|
8120
|
+
const f = {
|
|
8121
|
+
generated: now.toLocaleString("en-US", { month: "2-digit", day: "2-digit", year: "numeric", hour: "2-digit", minute: "2-digit", hour12: false }),
|
|
8122
|
+
nowLabel: `${now.toLocaleDateString("en-US", { weekday: "long" })} ${partOfDay2(now.getHours())}, ${now.toLocaleDateString("en-US", { month: "long", day: "numeric" })}`
|
|
8123
|
+
};
|
|
8124
|
+
try {
|
|
8125
|
+
const t = findNewestTranscript();
|
|
8126
|
+
if (t) f.lastSeen = phraseDelta2(Date.now() - statSync4(t).mtimeMs);
|
|
8127
|
+
} catch {
|
|
8128
|
+
}
|
|
8129
|
+
try {
|
|
8130
|
+
const gPath = join19(homedir15(), ".indelible", "goals.json");
|
|
8131
|
+
if (existsSync19(gPath)) {
|
|
8132
|
+
const g = JSON.parse(readFileSync15(gPath, "utf8"));
|
|
8133
|
+
const active = (g.goals || []).filter((x) => x.status === "active");
|
|
8134
|
+
if (active.length) {
|
|
8135
|
+
const oldest = active.reduce((a, b) => new Date(a.created_at) < new Date(b.created_at) ? a : b);
|
|
8136
|
+
const days = Math.floor((Date.now() - new Date(oldest.created_at)) / 864e5);
|
|
8137
|
+
if (Number.isFinite(days) && days >= 0) f.oldestOpen = `Goal "${(oldest.title || "").slice(0, 40)}": open ${days} days, longest live thread`;
|
|
8138
|
+
}
|
|
8139
|
+
const done = g.completed || [];
|
|
8140
|
+
const wk = done.filter((x) => x.completed_at && Date.now() - new Date(x.completed_at) < 7 * 864e5).length;
|
|
8141
|
+
const mo = done.filter((x) => x.completed_at && Date.now() - new Date(x.completed_at) < 28 * 864e5).length;
|
|
8142
|
+
const tempo = tempoPhrase2(wk, mo / 4);
|
|
8143
|
+
if (tempo) f.tempo = `${wk} goal${wk === 1 ? "" : "s"} closed this week \u2014 ${tempo}`;
|
|
8144
|
+
}
|
|
8145
|
+
} catch {
|
|
8146
|
+
}
|
|
8147
|
+
process.stdout.write(buildTimeCard2(f) + "\n\n");
|
|
8148
|
+
} catch {
|
|
8149
|
+
}
|
|
8150
|
+
}
|
|
8039
8151
|
async function runPreCompactSave() {
|
|
8040
8152
|
let trigger = "auto";
|
|
8153
|
+
let transcriptPath = null;
|
|
8041
8154
|
try {
|
|
8042
8155
|
const stdin = await readStdin();
|
|
8043
8156
|
if (stdin) {
|
|
8044
8157
|
const meta = JSON.parse(stdin);
|
|
8045
8158
|
trigger = meta.trigger || "auto";
|
|
8159
|
+
transcriptPath = meta.transcript_path || null;
|
|
8046
8160
|
}
|
|
8047
8161
|
} catch {
|
|
8048
8162
|
}
|
|
@@ -8051,7 +8165,8 @@ async function runPreCompactSave() {
|
|
|
8051
8165
|
process.stderr.write("Indelible: MCP disabled, skipping save\n");
|
|
8052
8166
|
process.exit(0);
|
|
8053
8167
|
}
|
|
8054
|
-
const
|
|
8168
|
+
const target = transcriptPath && existsSync19(transcriptPath) ? transcriptPath : findNewestTranscript() || CONTEXT_FILE2;
|
|
8169
|
+
const result = await saveSession(target, `Auto-save before ${trigger} compaction`);
|
|
8055
8170
|
if (result.success) {
|
|
8056
8171
|
process.stderr.write(`Indelible: Saved ${result.newMessages} messages (${result.saveType}) tx:${result.txId?.slice(0, 12)}...
|
|
8057
8172
|
`);
|
|
@@ -8090,6 +8205,7 @@ function findMemoryDir() {
|
|
|
8090
8205
|
return newestProject ? join19(newestProject, "memory") : null;
|
|
8091
8206
|
}
|
|
8092
8207
|
async function runPostCompactRestore() {
|
|
8208
|
+
await printTimeCard();
|
|
8093
8209
|
const config = await loadConfig();
|
|
8094
8210
|
if (!config?.mcp_enabled && config?.mcp_enabled !== void 0) {
|
|
8095
8211
|
process.stderr.write("Indelible: MCP disabled, skipping restore\n");
|
|
@@ -8209,7 +8325,7 @@ function readStdin() {
|
|
|
8209
8325
|
}
|
|
8210
8326
|
var SERVER_INFO = {
|
|
8211
8327
|
name: "indelible",
|
|
8212
|
-
version: "4.9.
|
|
8328
|
+
version: "4.9.4",
|
|
8213
8329
|
description: "Blockchain-backed memory and code storage for Claude Code"
|
|
8214
8330
|
};
|
|
8215
8331
|
var TOOLS = [
|
|
@@ -8979,6 +9095,7 @@ if (args[0] === "hook") {
|
|
|
8979
9095
|
});
|
|
8980
9096
|
} else if (args[1] === "session-start") {
|
|
8981
9097
|
(async () => {
|
|
9098
|
+
await printTimeCard();
|
|
8982
9099
|
const config = await loadConfig();
|
|
8983
9100
|
if (!config?.style_txid) {
|
|
8984
9101
|
process.exit(0);
|