@forwardimpact/guide 0.1.11 → 0.1.13
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/bin/fit-guide.js +73 -5
- package/package.json +2 -1
package/bin/fit-guide.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Conversational agent interface for the Guide knowledge platform.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
*
|
|
9
|
-
* echo "Tell me about the company" |
|
|
8
|
+
* npx fit-guide
|
|
9
|
+
* echo "Tell me about the company" | npx fit-guide
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { resolve } from "path";
|
|
@@ -24,7 +24,7 @@ Usage:
|
|
|
24
24
|
|
|
25
25
|
Options:
|
|
26
26
|
--data=<path> Path to framework data directory
|
|
27
|
-
--init Generate secrets and
|
|
27
|
+
--init Generate secrets, .env, and config/config.json
|
|
28
28
|
--help, -h Show this help message
|
|
29
29
|
--version, -v Show version
|
|
30
30
|
|
|
@@ -67,9 +67,77 @@ if (process.argv.includes("--init")) {
|
|
|
67
67
|
await updateEnvFile("JWT_SECRET", jwtSecret);
|
|
68
68
|
await updateEnvFile("JWT_ANON_KEY", jwtAnonKey);
|
|
69
69
|
|
|
70
|
+
// Assign unique ports so services don't all bind to the default 3000
|
|
71
|
+
const serviceUrls = {
|
|
72
|
+
SERVICE_AGENT_URL: "grpc://localhost:3002",
|
|
73
|
+
SERVICE_MEMORY_URL: "grpc://localhost:3003",
|
|
74
|
+
SERVICE_LLM_URL: "grpc://localhost:3004",
|
|
75
|
+
SERVICE_VECTOR_URL: "grpc://localhost:3005",
|
|
76
|
+
SERVICE_GRAPH_URL: "grpc://localhost:3006",
|
|
77
|
+
SERVICE_TOOL_URL: "grpc://localhost:3007",
|
|
78
|
+
SERVICE_TRACE_URL: "grpc://localhost:3008",
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
for (const [key, url] of Object.entries(serviceUrls)) {
|
|
82
|
+
await updateEnvFile(key, url);
|
|
83
|
+
}
|
|
84
|
+
|
|
70
85
|
console.log("SERVICE_SECRET was updated in .env");
|
|
71
86
|
console.log("JWT_SECRET is set in .env");
|
|
72
87
|
console.log("JWT_ANON_KEY was updated in .env");
|
|
88
|
+
console.log("Service URLs written to .env (ports 3002–3008).");
|
|
89
|
+
|
|
90
|
+
// Generate config/config.json with minimal service tree
|
|
91
|
+
const configDir = resolve("config");
|
|
92
|
+
const configPath = resolve("config", "config.json");
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
await fs.access(configPath);
|
|
96
|
+
console.log("config/config.json already exists, skipping.");
|
|
97
|
+
} catch {
|
|
98
|
+
await fs.mkdir(configDir, { recursive: true });
|
|
99
|
+
|
|
100
|
+
const config = {
|
|
101
|
+
init: {
|
|
102
|
+
log_dir: "data/logs",
|
|
103
|
+
shutdown_timeout: 3000,
|
|
104
|
+
services: [
|
|
105
|
+
{
|
|
106
|
+
name: "trace",
|
|
107
|
+
command: "node -e \"import('@forwardimpact/svctrace/server.js')\"",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "vector",
|
|
111
|
+
command: "node -e \"import('@forwardimpact/svcvector/server.js')\"",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "graph",
|
|
115
|
+
command: "node -e \"import('@forwardimpact/svcgraph/server.js')\"",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "llm",
|
|
119
|
+
command: "node -e \"import('@forwardimpact/svcllm/server.js')\"",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "memory",
|
|
123
|
+
command: "node -e \"import('@forwardimpact/svcmemory/server.js')\"",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "tool",
|
|
127
|
+
command: "node -e \"import('@forwardimpact/svctool/server.js')\"",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "agent",
|
|
131
|
+
command: "node -e \"import('@forwardimpact/svcagent/server.js')\"",
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
await fs.writeFile(configPath, JSON.stringify(config, null, 2) + "\n");
|
|
138
|
+
console.log("config/config.json created with service configuration.");
|
|
139
|
+
}
|
|
140
|
+
|
|
73
141
|
process.exit(0);
|
|
74
142
|
}
|
|
75
143
|
|
|
@@ -85,7 +153,7 @@ services must be available:
|
|
|
85
153
|
To get started:
|
|
86
154
|
|
|
87
155
|
1. Run: npx fit-guide --init
|
|
88
|
-
2. Start the service stack
|
|
156
|
+
2. Start the service stack: npx fit-rc start
|
|
89
157
|
3. Run: npx fit-guide
|
|
90
158
|
|
|
91
159
|
Documentation: https://www.forwardimpact.team/guide
|
|
@@ -203,7 +271,7 @@ Error: ${err.message}
|
|
|
203
271
|
Ensure all required services are running:
|
|
204
272
|
agent, llm, memory, graph, vector, tool, trace, web
|
|
205
273
|
|
|
206
|
-
|
|
274
|
+
Start the service stack: npx fit-rc start
|
|
207
275
|
Documentation: https://www.forwardimpact.team/guide`);
|
|
208
276
|
process.exit(1);
|
|
209
277
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forwardimpact/guide",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Conversational agent for engineering framework guidance — How do I find my bearing?",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "D. Olsson <hi@senzilla.io>",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@forwardimpact/libcodegen": "^0.1.32",
|
|
37
|
+
"@forwardimpact/librc": "^0.1.16",
|
|
37
38
|
"@forwardimpact/libconfig": "^0.1.58",
|
|
38
39
|
"@forwardimpact/libsecret": "^0.1.7",
|
|
39
40
|
"@forwardimpact/librepl": "^0.1.0",
|