openfused 0.3.6 → 0.3.7

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OpenFused
2
2
 
3
- Decentralized context mesh for AI agents. Encrypted messaging, peer sync, agent registry. The protocol is files.
3
+ The file protocol for AI agent context. Encrypted, signed, peer-to-peer.
4
4
 
5
5
  ## What is this?
6
6
 
package/dist/cli.js CHANGED
@@ -8,11 +8,11 @@ import * as registry from "./registry.js";
8
8
  import { fingerprint } from "./crypto.js";
9
9
  import { resolve } from "node:path";
10
10
  import { readFile } from "node:fs/promises";
11
- const VERSION = "0.3.6";
11
+ const VERSION = "0.3.7";
12
12
  const program = new Command();
13
13
  program
14
14
  .name("openfuse")
15
- .description("Decentralized context mesh for AI agents. The protocol is files.")
15
+ .description("The file protocol for AI agent context. Encrypted, signed, peer-to-peer.")
16
16
  .version(VERSION);
17
17
  // --- init ---
18
18
  program
@@ -399,19 +399,25 @@ key
399
399
  console.log(`Key already in keyring (fingerprint: ${fp})`);
400
400
  return;
401
401
  }
402
+ const autoTrust = config.autoTrust ?? false;
402
403
  config.keyring.push({
403
404
  name,
404
405
  address: opts.address ?? "",
405
406
  signingKey,
406
407
  encryptionKey: opts.encryptionKey,
407
408
  fingerprint: fp,
408
- trusted: false,
409
+ trusted: autoTrust,
409
410
  added: new Date().toISOString(),
410
411
  });
411
412
  await store.writeConfig(config);
412
413
  console.log(`Imported key for: ${name}`);
413
414
  console.log(` Fingerprint: ${fp}`);
414
- console.log(`\nKey is NOT trusted yet. Run: openfuse key trust ${name}`);
415
+ if (autoTrust) {
416
+ console.log(` Auto-trusted (workspace mode)`);
417
+ }
418
+ else {
419
+ console.log(`\nKey is NOT trusted yet. Run: openfuse key trust ${name}`);
420
+ }
415
421
  });
416
422
  key
417
423
  .command("trust <name>")
package/dist/mcp.js CHANGED
@@ -23,7 +23,7 @@ const storeDir = process.env.OPENFUSE_DIR || process.argv[3] || ".";
23
23
  const store = new ContextStore(resolve(storeDir));
24
24
  const server = new McpServer({
25
25
  name: "openfuse",
26
- version: "0.3.6",
26
+ version: "0.3.7",
27
27
  });
28
28
  // --- Context ---
29
29
  server.tool("context_read", "Read the agent's CONTEXT.md (working memory)", async () => {
package/dist/registry.js CHANGED
@@ -44,13 +44,13 @@ export async function register(store, endpoint, registry) {
44
44
  // Discovery: try DNS TXT first (decentralized, no registry needed), fall back to Worker API.
45
45
  // DNS format: v=of1 e={endpoint} pk={pubkey} ek={agekey} fp={fingerprint}
46
46
  // Self-hosted: _openfuse.{name}.{their-domain} — user manages their own TXT records.
47
- // Our zone: _openfuse.{name}.openfused.dev — managed by the registry Worker on registration.
47
+ // Our zone: _openfuse.{name}.openfused.net — managed by the registry Worker on registration.
48
48
  export async function discover(name, registry) {
49
49
  // If name contains a dot, it's a domain — try DNS TXT directly
50
- // Otherwise try DNS at openfused.dev, then fall back to registry API
50
+ // Otherwise try DNS at openfused.net, then fall back to registry API
51
51
  const dnsNames = name.includes(".")
52
52
  ? [`_openfuse.${name}`]
53
- : [`_openfuse.${name}.openfused.dev`];
53
+ : [`_openfuse.${name}.openfused.net`];
54
54
  for (const dnsName of dnsNames) {
55
55
  const manifest = await discoverViaDns(dnsName, name);
56
56
  if (manifest)
package/dist/store.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface MeshConfig {
8
8
  peers: PeerConfig[];
9
9
  keyring: KeyringEntry[];
10
10
  trustedKeys?: string[];
11
+ autoTrust?: boolean;
11
12
  }
12
13
  export interface PeerConfig {
13
14
  id: string;
package/dist/store.js CHANGED
@@ -71,12 +71,15 @@ export class ContextStore {
71
71
  await writeFile(destPath, content);
72
72
  }
73
73
  }
74
+ // Workspaces auto-trust: all imported keys are trusted by default.
75
+ // Safe because workspaces are private — you control who joins.
74
76
  const config = {
75
77
  id,
76
78
  name,
77
79
  created: new Date().toISOString(),
78
80
  peers: [],
79
81
  keyring: [],
82
+ autoTrust: true,
80
83
  };
81
84
  await this.writeConfig(config);
82
85
  }
@@ -193,7 +196,13 @@ export class ContextStore {
193
196
  const signed = deserializeSignedMessage(raw);
194
197
  if (signed) {
195
198
  const sigValid = verifyMessage(signed);
196
- const trusted = config.keyring.some((k) => k.trusted && k.signingKey.trim() === signed.publicKey.trim());
199
+ // autoTrust (workspace mode): any key in keyring is trusted, but key must still
200
+ // be present — prevents random internet keys from appearing verified in a workspace
201
+ // that's accidentally exposed to the network.
202
+ const inKeyring = config.keyring.some((k) => k.signingKey.trim() === signed.publicKey.trim());
203
+ const trusted = config.autoTrust
204
+ ? inKeyring
205
+ : config.keyring.some((k) => k.trusted && k.signingKey.trim() === signed.publicKey.trim());
197
206
  const verified = sigValid && trusted;
198
207
  let content;
199
208
  if (signed.encrypted) {
package/dist/sync.js CHANGED
@@ -35,6 +35,9 @@ function parseUrl(url) {
35
35
  if (/[;|`$]/.test(host)) {
36
36
  throw new Error("Invalid SSH URL: host contains shell metacharacters");
37
37
  }
38
+ if (/[;|`$&(){}]/.test(path)) {
39
+ throw new Error("Invalid SSH URL: path contains shell metacharacters");
40
+ }
38
41
  return { type: "ssh", host, path };
39
42
  }
40
43
  throw new Error(`Unknown URL scheme: ${url}. Use http:// or ssh://`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openfused",
3
- "version": "0.3.6",
4
- "description": "Decentralized context mesh for AI agents. Encrypted sync, signed messaging, MCP server. The protocol is files.",
3
+ "version": "0.3.7",
4
+ "description": "The file protocol for AI agent context. Encrypted, signed, peer-to-peer.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "bin": {
@@ -47,7 +47,7 @@
47
47
  "ai",
48
48
  "agent",
49
49
  "context",
50
- "mesh",
50
+ "messaging",
51
51
  "fuse",
52
52
  "decentralized",
53
53
  "openclaw",