midsummer-sol 0.2.0 → 0.2.1
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/sol-secret-mcp.js +8 -7
- package/sol.js +536 -168
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "midsummer-sol",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Sol — agent-native version control (a new git). CLI, MCP server, and no-filesystem SDK.",
|
|
5
5
|
"bin": { "sol": "./sol.js", "sol-mcp": "./sol-mcp.js", "sol-secret-mcp": "./sol-secret-mcp.js" },
|
|
6
6
|
"main": "./index.js",
|
package/sol-secret-mcp.js
CHANGED
|
@@ -247,7 +247,7 @@ var init_sign = __esm(() => {
|
|
|
247
247
|
});
|
|
248
248
|
|
|
249
249
|
// src/bin/identity-store.ts
|
|
250
|
-
import { chmodSync as chmodSync2, existsSync as existsSync6, mkdirSync as
|
|
250
|
+
import { chmodSync as chmodSync2, existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync7, writeFileSync as writeFileSync6 } from "node:fs";
|
|
251
251
|
import { homedir as homedir2 } from "node:os";
|
|
252
252
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
253
253
|
function loadIdentity2() {
|
|
@@ -271,7 +271,7 @@ function loadVerified() {
|
|
|
271
271
|
function pinVerified(accountId, fingerprint) {
|
|
272
272
|
const all = loadVerified();
|
|
273
273
|
all[accountId] = fingerprint;
|
|
274
|
-
|
|
274
|
+
mkdirSync5(dirname2(VERIFIED_PATH2), { recursive: true });
|
|
275
275
|
writeFileSync6(VERIFIED_PATH2, JSON.stringify(all, null, 2), { mode: 384 });
|
|
276
276
|
try {
|
|
277
277
|
chmodSync2(VERIFIED_PATH2, 384);
|
|
@@ -1447,7 +1447,7 @@ function authorFingerprint(e) {
|
|
|
1447
1447
|
return e.authorKey ? fingerprintOf(e.authorKey) : undefined;
|
|
1448
1448
|
}
|
|
1449
1449
|
// src/secret/anchor.ts
|
|
1450
|
-
import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
1450
|
+
import { existsSync as existsSync3, mkdirSync as mkdirSync2, readdirSync, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
1451
1451
|
import { join as join3 } from "node:path";
|
|
1452
1452
|
init_sign();
|
|
1453
1453
|
var creatorPinPath = (solDir) => join3(envDir(solDir), "creator.pin");
|
|
@@ -1641,6 +1641,7 @@ function validateGenesisAnchor(solDir) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
return out;
|
|
1643
1643
|
}
|
|
1644
|
+
var ENVSTATE_SKIP_FILES = new Set(["journal.jsonl", "creator.pin", "head.pin"]);
|
|
1644
1645
|
// src/secret/env-state.ts
|
|
1645
1646
|
init_sign();
|
|
1646
1647
|
// src/secret/gate-derive.ts
|
|
@@ -1741,7 +1742,7 @@ function canDeclare(solDir, prior, actor, id) {
|
|
|
1741
1742
|
return { allowed: !!id, guarded: true };
|
|
1742
1743
|
}
|
|
1743
1744
|
// src/secret/model.ts
|
|
1744
|
-
import { existsSync as existsSync4, mkdirSync as
|
|
1745
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync as readdirSync2, readFileSync as readFileSync4, statSync, unlinkSync, writeFileSync as writeFileSync4 } from "node:fs";
|
|
1745
1746
|
init_sign();
|
|
1746
1747
|
var BASE_ENV = "base";
|
|
1747
1748
|
function envInitialized(solDir) {
|
|
@@ -1779,8 +1780,8 @@ function audienceFor(world, env, entryAud) {
|
|
|
1779
1780
|
return world.files[env]?.audience ?? [];
|
|
1780
1781
|
}
|
|
1781
1782
|
function ensureEnvDir(solDir) {
|
|
1782
|
-
|
|
1783
|
-
|
|
1783
|
+
mkdirSync3(envDir(solDir), { recursive: true });
|
|
1784
|
+
mkdirSync3(sealDir(solDir), { recursive: true });
|
|
1784
1785
|
}
|
|
1785
1786
|
function writeEnvFile(solDir, f) {
|
|
1786
1787
|
ensureEnvDir(solDir);
|
|
@@ -3180,7 +3181,7 @@ async function callMcpTool(ctx, name, args = {}) {
|
|
|
3180
3181
|
}
|
|
3181
3182
|
|
|
3182
3183
|
// src/bin/identity-store.ts
|
|
3183
|
-
import { chmodSync, existsSync as existsSync5, mkdirSync as
|
|
3184
|
+
import { chmodSync, existsSync as existsSync5, mkdirSync as mkdirSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "node:fs";
|
|
3184
3185
|
import { homedir } from "node:os";
|
|
3185
3186
|
import { dirname, join as join4 } from "node:path";
|
|
3186
3187
|
var IDENTITY_PATH = join4(homedir(), ".sol", "identity.json");
|