@happyvertical/smrt-gnode 0.30.0

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/AGENTS.md ADDED
@@ -0,0 +1,14 @@
1
+ # @happyvertical/smrt-gnode
2
+
3
+ Federation library for inter-gnode peer-to-peer discovery and communication.
4
+
5
+ **Status: stubs only — all methods return empty arrays/nulls. Not implemented.**
6
+
7
+ ## Planned Architecture
8
+
9
+ - `Federation`: peer discovery and exchange
10
+ - `WebFingerProtocol`: `.well-known/gnode` discovery (TODO)
11
+ - `PeerExchangeProtocol`: `/api/federation/peers` peer list exchange (TODO)
12
+ - Types: `GnodePeer`, `FederationConfig`
13
+
14
+ No SMRT models present. Library-stage only.
package/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright <2025> <Happy Vertical Corporation>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @happyvertical/smrt-gnode
2
+
3
+ Federation library for inter-gnode peer-to-peer discovery and communication.
4
+
5
+ **Status: stubs only -- not implemented. All methods return empty arrays or null.**
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pnpm add @happyvertical/smrt-gnode
11
+ ```
12
+
13
+ ## Intent
14
+
15
+ Gnodes are federated local knowledge bases. This package will provide the federation protocols needed for P2P discovery and cross-gnode communication. No SMRT models are present -- this is a library-stage package.
16
+
17
+ ## Exports
18
+
19
+ ### Classes
20
+
21
+ | Export | Status | Description |
22
+ |--------|--------|------------|
23
+ | `Federation` | Stub | Peer discovery and exchange. `discoverPeers()` and `exchangePeers()` return `[]` |
24
+ | `WebFingerProtocol` | Stub | `.well-known/gnode` discovery. `discover()` returns `null` |
25
+ | `PeerExchangeProtocol` | Stub | `/api/federation/peers` peer list exchange. `exchange()` returns `[]` |
26
+
27
+ ### Types
28
+
29
+ | Export | Description |
30
+ |--------|------------|
31
+ | `GnodePeer` | Peer descriptor: `url`, `name`, `discoveredAt`, `lastSeen?` |
32
+ | `FederationConfig` | Config: `enabled`, `discoverability`, `peers`, `autodiscovery`, `peerExchange` |
33
+ | `WebFingerResponse` | WebFinger response: `subject`, `links[]` |
34
+
35
+ ### Constants
36
+
37
+ | Export | Description |
38
+ |--------|------------|
39
+ | `version` | Package version string (`'0.1.0'`) |
40
+
41
+ ## Planned Architecture
42
+
43
+ - WebFinger-based peer discovery via `GET /.well-known/gnode`
44
+ - Peer exchange protocol via `GET /api/federation/peers`
45
+ - ActivityPub-inspired cross-gnode queries
46
+
47
+ ## Dependencies
48
+
49
+ None. Standalone stub package.
@@ -0,0 +1,46 @@
1
+ export declare class Federation {
2
+ discoverPeers(): Promise<GnodePeer[]>;
3
+ exchangePeers(_peer: GnodePeer): Promise<GnodePeer[]>;
4
+ }
5
+
6
+ export declare interface FederationConfig {
7
+ enabled: boolean;
8
+ discoverability: 'public' | 'private';
9
+ peers: string[];
10
+ autodiscovery: boolean;
11
+ peerExchange: boolean;
12
+ }
13
+
14
+ /**
15
+ * Federation utilities for gnode P2P discovery and communication
16
+ */
17
+ export declare interface GnodePeer {
18
+ url: string;
19
+ name: string;
20
+ discoveredAt: Date;
21
+ lastSeen?: Date;
22
+ }
23
+
24
+ export declare class PeerExchangeProtocol {
25
+ static exchange(_peerUrl: string): Promise<string[]>;
26
+ }
27
+
28
+ export declare const version = "0.1.0";
29
+
30
+ export declare class WebFingerProtocol {
31
+ static discover(_domain: string): Promise<WebFingerResponse | null>;
32
+ }
33
+
34
+ /**
35
+ * Federation protocols for gnode discovery and communication
36
+ */
37
+ export declare interface WebFingerResponse {
38
+ subject: string;
39
+ links: Array<{
40
+ rel: string;
41
+ type?: string;
42
+ href: string;
43
+ }>;
44
+ }
45
+
46
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ class Federation {
2
+ async discoverPeers() {
3
+ return [];
4
+ }
5
+ async exchangePeers(_peer) {
6
+ return [];
7
+ }
8
+ }
9
+ class WebFingerProtocol {
10
+ static async discover(_domain) {
11
+ return null;
12
+ }
13
+ }
14
+ class PeerExchangeProtocol {
15
+ static async exchange(_peerUrl) {
16
+ return [];
17
+ }
18
+ }
19
+ const version = "0.1.0";
20
+ export {
21
+ Federation,
22
+ PeerExchangeProtocol,
23
+ WebFingerProtocol,
24
+ version
25
+ };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/federation/index.ts","../src/protocols/index.ts","../src/index.ts"],"sourcesContent":["/**\n * Federation utilities for gnode P2P discovery and communication\n */\n\nexport interface GnodePeer {\n url: string;\n name: string;\n discoveredAt: Date;\n lastSeen?: Date;\n}\n\nexport interface FederationConfig {\n enabled: boolean;\n discoverability: 'public' | 'private';\n peers: string[];\n autodiscovery: boolean;\n peerExchange: boolean;\n}\n\nexport class Federation {\n async discoverPeers(): Promise<GnodePeer[]> {\n // TODO: Implement peer discovery via WebFinger, DNS, etc.\n return [];\n }\n\n async exchangePeers(_peer: GnodePeer): Promise<GnodePeer[]> {\n // TODO: Implement peer exchange protocol\n return [];\n }\n}\n","/**\n * Federation protocols for gnode discovery and communication\n */\n\nexport interface WebFingerResponse {\n subject: string;\n links: Array<{\n rel: string;\n type?: string;\n href: string;\n }>;\n}\n\nexport class WebFingerProtocol {\n static async discover(_domain: string): Promise<WebFingerResponse | null> {\n // TODO: Implement WebFinger discovery\n // GET https://example.com/.well-known/gnode\n return null;\n }\n}\n\nexport class PeerExchangeProtocol {\n static async exchange(_peerUrl: string): Promise<string[]> {\n // TODO: Implement peer list exchange\n // GET /api/federation/peers\n return [];\n }\n}\n","/**\n * @have/gnode - SMRT Federation Library\n *\n * Federated local knowledge bases (gnodes) with P2P discovery and protocols.\n * Built on top of @smrt/core for SMRT object federation.\n */\n\nexport * from './federation/index.js';\nexport * from './protocols/index.js';\n\nexport const version = '0.1.0';\n"],"names":[],"mappings":"AAmBO,MAAM,WAAW;AAAA,EACtB,MAAM,gBAAsC;AAE1C,WAAO,CAAA;AAAA,EACT;AAAA,EAEA,MAAM,cAAc,OAAwC;AAE1D,WAAO,CAAA;AAAA,EACT;AACF;AChBO,MAAM,kBAAkB;AAAA,EAC7B,aAAa,SAAS,SAAoD;AAGxE,WAAO;AAAA,EACT;AACF;AAEO,MAAM,qBAAqB;AAAA,EAChC,aAAa,SAAS,UAAqC;AAGzD,WAAO,CAAA;AAAA,EACT;AACF;ACjBO,MAAM,UAAU;"}
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177067165,
4
+ "packageName": "@happyvertical/smrt-gnode",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {},
7
+ "moduleType": "smrt",
8
+ "smrtDependencies": [
9
+ "@happyvertical/smrt-core"
10
+ ]
11
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "generatedAt": "2026-06-23T01:11:07.767Z",
4
+ "packageName": "@happyvertical/smrt-gnode",
5
+ "packageVersion": "0.30.0",
6
+ "sourceManifestPath": "dist/manifest.json",
7
+ "agentDocPath": "AGENTS.md",
8
+ "sourceHashes": {
9
+ "manifest": "d09376850f1702b154295859b0b6051607ba760e911db22e827578c4c4c4acce",
10
+ "packageJson": "3446a5b46d6d43da1d365d39819942b78fd806594216329f2eab2ebd9245025d",
11
+ "agents": "5e2c6b06a89d78b8d44ff45304477228895406f96f2c067e9926d8d6870ca268"
12
+ },
13
+ "exports": [
14
+ ".",
15
+ "./manifest",
16
+ "./manifest.json"
17
+ ],
18
+ "dependencies": {
19
+ "@happyvertical/ai": "catalog:",
20
+ "@happyvertical/files": "catalog:",
21
+ "@happyvertical/logger": "catalog:",
22
+ "@happyvertical/smrt-core": "workspace:*",
23
+ "@happyvertical/sql": "catalog:",
24
+ "@happyvertical/utils": "catalog:",
25
+ "@types/node": "25.0.9",
26
+ "typescript": "^5.9.3",
27
+ "vite": "7.3.1",
28
+ "vitest": "^4.0.17"
29
+ },
30
+ "smrtDependencies": [
31
+ "@happyvertical/smrt-core"
32
+ ],
33
+ "sdkDependencies": [
34
+ "@happyvertical/ai",
35
+ "@happyvertical/files",
36
+ "@happyvertical/logger",
37
+ "@happyvertical/sql",
38
+ "@happyvertical/utils"
39
+ ],
40
+ "tags": [],
41
+ "risks": [],
42
+ "objects": [],
43
+ "surfaces": [],
44
+ "prompts": [],
45
+ "relationshipsV2": {
46
+ "foreignKeyFields": 0,
47
+ "crossPackageRefFields": 0,
48
+ "junctionCollections": 0,
49
+ "hierarchicalObjects": 0,
50
+ "polymorphicAssociations": 0,
51
+ "uuidColumns": 0
52
+ },
53
+ "agentDoc": "# @happyvertical/smrt-gnode\n\nFederation library for inter-gnode peer-to-peer discovery and communication.\n\n**Status: stubs only — all methods return empty arrays/nulls. Not implemented.**\n\n## Planned Architecture\n\n- `Federation`: peer discovery and exchange\n- `WebFingerProtocol`: `.well-known/gnode` discovery (TODO)\n- `PeerExchangeProtocol`: `/api/federation/peers` peer list exchange (TODO)\n- Types: `GnodePeer`, `FederationConfig`\n\nNo SMRT models present. Library-stage only.\n"
54
+ }
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@happyvertical/smrt-gnode",
3
+ "version": "0.30.0",
4
+ "description": "SMRT federation library for building federated local knowledge bases (gnodes)",
5
+ "author": "HappyVertical",
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "files": [
10
+ "CLAUDE.md",
11
+ "dist",
12
+ "AGENTS.md"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./manifest": "./dist/manifest.json",
20
+ "./manifest.json": "./dist/manifest.json"
21
+ },
22
+ "dependencies": {
23
+ "@happyvertical/ai": "^0.74.7",
24
+ "@happyvertical/files": "^0.74.7",
25
+ "@happyvertical/logger": "^0.74.7",
26
+ "@happyvertical/sql": "^0.74.7",
27
+ "@happyvertical/utils": "^0.74.7",
28
+ "@happyvertical/smrt-core": "0.30.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "25.0.9",
32
+ "typescript": "^5.9.3",
33
+ "vite": "7.3.1",
34
+ "vitest": "^4.0.17"
35
+ },
36
+ "publishConfig": {
37
+ "registry": "https://registry.npmjs.org",
38
+ "access": "public"
39
+ },
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/happyvertical/smrt.git",
43
+ "directory": "packages/gnode"
44
+ },
45
+ "scripts": {
46
+ "pretest": "[ -f ../cli/dist/index.js ] && node ../cli/dist/index.js test --manifest-only || true",
47
+ "test": "vitest run",
48
+ "test:watch": "vitest",
49
+ "typecheck": "tsc --noEmit -p tsconfig.json",
50
+ "build": "vite build",
51
+ "build:watch": "vite build --watch",
52
+ "docs": "typedoc --plugin typedoc-plugin-markdown --out docs --entryPoints ./src/index.ts --tsconfig ./tsconfig.json --excludePrivate --excludeInternal --hideGenerator --fileExtension .md --readme none --categorizeByGroup false --includeVersion false --hidePageHeader --hidePageTitle false --outputFileStrategy modules",
53
+ "docs:watch": "typedoc --plugin typedoc-plugin-markdown --out docs --entryPoints ./src/index.ts --tsconfig ./tsconfig.json --excludePrivate --excludeInternal --hideGenerator --fileExtension .md --readme none --categorizeByGroup false --includeVersion false --hidePageHeader --hidePageTitle false --outputFileStrategy modules --watch",
54
+ "clean": "rm -rf dist",
55
+ "dev": "npm run build:watch & npm run test:watch",
56
+ "verify:pack": "node ../../scripts/verify-package-types-exports.js .",
57
+ "build:fresh": "npm run clean && npm run build && npm run verify:pack"
58
+ }
59
+ }