@dotdrelle/wiki-manager 0.6.17

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.
@@ -0,0 +1,96 @@
1
+ # agents.docker-compose.yml — external agent stack
2
+ #
3
+ # Starts cme, documents, and mailer as workspace-agnostic global services.
4
+ # All workspace paths are resolved at tool-call time via the `workspace` param.
5
+ #
6
+ # Required:
7
+ # WORKSPACES_ROOT — path to the directory containing all workspace folders
8
+ #
9
+ # Optional (defaults shown):
10
+ # AGENTS_DATA_DIR — persistent state for stateful agents (default: ./.agents-data)
11
+ # CME_MCP_PORT — 3336
12
+ # DOCUMENTS_MCP_PORT — 3337
13
+ # MAILER_MCP_PORT — 3335
14
+ # CME_MCP_AUTH_TOKEN — bearer token for cme agent (empty = no auth)
15
+ # DOCUMENTS_MCP_AUTH_TOKEN — bearer token for documents agent (empty = no auth)
16
+ # DOCUMENT_LLM_BASE_URL — https://api.openai.com/v1
17
+ # DOCUMENT_LLM_MODEL — gpt-5.4-mini
18
+ # DOCUMENT_LLM_API_KEY — OpenAI/OpenAI-compatible API key for document OCR
19
+ # DOCUMENT_LLM_TIMEOUT_SECONDS — 120
20
+ # MAILER_MCP_AUTH_TOKEN — bearer token for mailer agent (empty = no auth)
21
+ # MAILERSEND_API_KEY
22
+ # MAILERSEND_FROM_EMAIL
23
+ # MAILERSEND_FROM_NAME
24
+ #
25
+ # Set these variables in a .env file at the directory where you run wiki-workspace,
26
+ # or export them in your shell before running wiki-workspace agents up.
27
+ #
28
+ # TLS (optional, cme + documents share the same cert):
29
+ # Set MCP_SSL_CERTFILE=/certs/server.crt and MCP_SSL_KEYFILE=/certs/server.key,
30
+ # place the cert files in AGENTS_DATA_DIR/certs/, and uncomment the TLS lines below.
31
+ #
32
+ # Usage (via wiki-workspace):
33
+ # wiki-workspace agents up
34
+ # wiki-workspace agents down
35
+ # wiki-workspace agents logs
36
+ # wiki-workspace agents pull
37
+ #
38
+ # Or directly:
39
+ # WORKSPACES_ROOT=/path/to/workspaces docker compose -f agents.docker-compose.yml up -d
40
+
41
+ services:
42
+
43
+ cme:
44
+ image: dotdrelle/agent-cme:latest
45
+ ports:
46
+ - "${CME_MCP_PORT:-3336}:8080"
47
+ environment:
48
+ - MCP_AUTH_TOKEN=${CME_MCP_AUTH_TOKEN:-}
49
+ - WORKSPACES_ROOT=/workspaces
50
+ # HTTPS — uncomment and place cert files in AGENTS_DATA_DIR/certs/
51
+ #- MCP_SSL_CERTFILE=/certs/server.crt
52
+ #- MCP_SSL_KEYFILE=/certs/server.key
53
+ volumes:
54
+ - ${AGENTS_DATA_DIR:-./.agents-data}/cme:/data
55
+ - ${WORKSPACES_ROOT:?Set WORKSPACES_ROOT to the directory containing all workspace folders}:/workspaces
56
+ #- ${AGENTS_DATA_DIR:-./.agents-data}/certs:/certs:ro
57
+ restart: unless-stopped
58
+
59
+ documents:
60
+ image: dotdrelle/agent-wiki-documents:latest
61
+ ports:
62
+ - "${DOCUMENTS_MCP_PORT:-3337}:8080"
63
+ environment:
64
+ - MCP_AUTH_TOKEN=${DOCUMENTS_MCP_AUTH_TOKEN:-}
65
+ - DOCUMENT_INPUT_DIR=/documents/input
66
+ - DOCUMENT_OUTPUT_DIR=/documents/output
67
+ - WORKSPACES_ROOT=/workspaces
68
+ - DOCUMENT_MAX_UPLOAD_BYTES=${DOCUMENT_MAX_UPLOAD_BYTES:-52428800}
69
+ - DOCUMENT_LLM_BASE_URL=${DOCUMENT_LLM_BASE_URL:-https://api.openai.com/v1}
70
+ - DOCUMENT_LLM_MODEL=${DOCUMENT_LLM_MODEL:-gpt-5.4-mini}
71
+ - DOCUMENT_LLM_API_KEY=${DOCUMENT_LLM_API_KEY:-${OPENAI_API_KEY:-}}
72
+ - DOCUMENT_LLM_TIMEOUT_SECONDS=${DOCUMENT_LLM_TIMEOUT_SECONDS:-120}
73
+ # HTTPS — uncomment and place cert files in AGENTS_DATA_DIR/certs/
74
+ #- MCP_SSL_CERTFILE=/certs/server.crt
75
+ #- MCP_SSL_KEYFILE=/certs/server.key
76
+ volumes:
77
+ - ${AGENTS_DATA_DIR:-./.agents-data}/documents/input:/documents/input
78
+ - ${AGENTS_DATA_DIR:-./.agents-data}/documents/output:/documents/output
79
+ - ${WORKSPACES_ROOT:?Set WORKSPACES_ROOT to the directory containing all workspace folders}:/workspaces
80
+ #- ${AGENTS_DATA_DIR:-./.agents-data}/certs:/certs:ro
81
+ restart: unless-stopped
82
+
83
+ mailer:
84
+ image: dotdrelle/agent-mailer-api:latest
85
+ ports:
86
+ - "${MAILER_MCP_PORT:-3335}:8080"
87
+ environment:
88
+ - MAILERSEND_API_KEY=${MAILERSEND_API_KEY:-}
89
+ - MAILERSEND_FROM_EMAIL=${MAILERSEND_FROM_EMAIL:-no-reply@example.com}
90
+ - MAILERSEND_FROM_NAME=${MAILERSEND_FROM_NAME:-Mailer Agent}
91
+ - MAILERSEND_USER_AGENT=${MAILERSEND_USER_AGENT:-curl/8.7.1}
92
+ - MAILERSEND_VERIFY_SSL=${MAILERSEND_VERIFY_SSL:-true}
93
+ - MAILER_REQUIRE_CONFIRMATION=${MAILER_REQUIRE_CONFIRMATION:-true}
94
+ - MAILER_DRY_RUN=${MAILER_DRY_RUN:-false}
95
+ - MCP_AUTH_TOKEN=${MAILER_MCP_AUTH_TOKEN:-}
96
+ restart: unless-stopped
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env bun
2
+
3
+ import '@opentui/solid/preload';
4
+
5
+ function formatStartupError(err) {
6
+ const message = err instanceof Error ? err.message : String(err);
7
+ const code = err && typeof err === 'object' ? err.code : null;
8
+ if (code === 'ERR_MODULE_NOT_FOUND' || code === 'MODULE_NOT_FOUND') {
9
+ return [
10
+ `Startup error: ${message}`,
11
+ '',
12
+ 'Check that you are running this command from the wiki-manager package directory:',
13
+ ' cd llm-wiki-manager',
14
+ ' node ./bin/wiki-manager.js',
15
+ '',
16
+ 'If dependencies are missing, run:',
17
+ ' pnpm install',
18
+ ].join('\n');
19
+ }
20
+ return `Startup error: ${message}`;
21
+ }
22
+
23
+ async function main() {
24
+ const argv = process.argv.slice(2);
25
+ const interactive = process.stdout.isTTY && process.stdin.isTTY && !argv.includes('--headless') && !argv.includes('--once') && !argv.includes('--version') && !argv.includes('-v') && !argv.includes('--help') && !argv.includes('-h');
26
+ if (interactive) process.stdout.write('Starting wiki-manager…\r');
27
+ const { runCli } = await import('../src/cli/wiki-manager.js');
28
+ await runCli(argv);
29
+ }
30
+
31
+ main().catch((err) => {
32
+ console.error(formatStartupError(err));
33
+ process.exit(1);
34
+ });
package/bunfig.toml ADDED
@@ -0,0 +1 @@
1
+ preload = ["@opentui/solid/preload"]
@@ -0,0 +1,135 @@
1
+ # docker-compose.yml — llm-wiki-manager cockpit stack
2
+ #
3
+ # This compose file is driven by ./wiki-workspace. It can run:
4
+ # - one llm-wiki serve + mcp-http + production MCP set per configured workspace
5
+ #
6
+ # Typical usage:
7
+ # ./wiki-workspace config <workspace> [path]
8
+ # ./wiki-workspace up <workspace>
9
+ # ./wiki-workspace wiki <workspace> doctor
10
+ # ./wiki-workspace wiki <workspace> ingest
11
+ #
12
+ # Workspace UI / MCP endpoints use the ports declared in workspaces/<name>/.env.
13
+ # External MCP endpoints are declared in ./mcp.endpoints.json.
14
+
15
+ services:
16
+
17
+ # ── llm-wiki ──────────────────────────────────────────────────────────────
18
+
19
+ wiki:
20
+ image: dotdrelle/llm-wiki:latest
21
+ profiles: [cli]
22
+ volumes:
23
+ # Compose interpolates all services before applying profiles, so this
24
+ # cannot be a required variable without breaking cli-only commands.
25
+ - ${WIKI_WORKSPACE_PATH:-/tmp/llm-wiki-workspace-not-set}:/workspace
26
+ environment:
27
+ - WIKI_WORKSPACE_PATH=/workspace
28
+ - WIKI_CONFIG_PATH
29
+ extra_hosts:
30
+ - host.docker.internal:host-gateway
31
+
32
+ serve:
33
+ image: dotdrelle/llm-wiki:latest
34
+ labels:
35
+ wiki-manager.description: "Workspace web UI and local wiki browser."
36
+ command: serve --port 3000
37
+ stop_grace_period: 10s
38
+ volumes:
39
+ - ${WIKI_WORKSPACE_PATH:-/tmp/llm-wiki-workspace-not-set}:/workspace
40
+ - ./mcp.endpoints.json:/mcp.endpoints.json:ro
41
+ - ${AGENTS_DATA_DIR:-./.agents-data}/documents/input:/documents/input
42
+ - ${AGENTS_DATA_DIR:-./.agents-data}/documents/uploads:/documents/uploads
43
+ # TLS certificates — uncomment if WIKI_SERVE_TLS_CERT_PATH is set
44
+ #- ${WIKI_SERVE_CERTS_DIR:-./certs}:/certs:ro
45
+ environment:
46
+ - WIKI_WORKSPACE_PATH=/workspace
47
+ - WIKI_CONFIG_PATH
48
+ - WIKI_MCP_HTTP_PORT=${WIKI_MCP_PORT:-3101}
49
+ - WIKI_MCP_AUTH_TOKEN
50
+ - PRODUCTION_MCP_AUTH_TOKEN
51
+ - PRODUCTION_MCP_PORT
52
+ - CME_MCP_PORT
53
+ - DOCUMENTS_MCP_PORT
54
+ - MAILER_MCP_PORT
55
+ - CME_MCP_AUTH_TOKEN
56
+ - DOCUMENTS_MCP_AUTH_TOKEN
57
+ - MAILER_MCP_AUTH_TOKEN
58
+ - ATLASSIAN_MCP_AUTH_TOKEN
59
+ - WORKSPACE_NAME
60
+ - DOCUMENT_INPUT_DIR=/documents/input
61
+ - DOCUMENT_UPLOADS_DIR=/documents/uploads
62
+ - DOCUMENT_MAX_UPLOAD_BYTES=${DOCUMENT_MAX_UPLOAD_BYTES:-52428800}
63
+ - WIKI_MCP_PROXY_URL=http://host.docker.internal:${WIKI_MCP_PORT:-3101}/mcp
64
+ - PRODUCTION_MCP_PROXY_URL=http://host.docker.internal:${PRODUCTION_MCP_PORT:-3102}/mcp/
65
+ # HTTPS — set paths inside the container (e.g. /certs/server.crt) and uncomment the volume above
66
+ #- WIKI_SERVE_TLS_CERT_PATH=/certs/server.crt
67
+ #- WIKI_SERVE_TLS_KEY_PATH=/certs/server.key
68
+ #- WIKI_SERVE_TLS_CA_PATH=/certs/ca.crt
69
+ ports:
70
+ - '${WIKI_SERVE_PORT:-3100}:3000'
71
+ extra_hosts:
72
+ - host.docker.internal:host-gateway
73
+ restart: unless-stopped
74
+
75
+ mcp-http:
76
+ image: dotdrelle/llm-wiki:latest
77
+ labels:
78
+ wiki-manager.description: "llm-wiki MCP HTTP server for wiki tools."
79
+ command: mcp-http --host 0.0.0.0 --port 3333 --path /mcp
80
+ volumes:
81
+ - ${WIKI_WORKSPACE_PATH:-/tmp/llm-wiki-workspace-not-set}:/workspace
82
+ # TLS certificates — uncomment if WIKI_MCP_TLS_CERT_PATH is set
83
+ #- ${WIKI_MCP_CERTS_DIR:-./certs}:/certs:ro
84
+ environment:
85
+ - WIKI_WORKSPACE_PATH=/workspace
86
+ - WIKI_CONFIG_PATH
87
+ - WIKI_MCP_AUTH_TOKEN
88
+ # HTTPS — set paths inside the container (e.g. /certs/server.crt) and uncomment the volume above
89
+ - WIKI_MCP_TLS_CERT_PATH
90
+ - WIKI_MCP_TLS_KEY_PATH
91
+ - WIKI_MCP_TLS_CA_PATH
92
+ ports:
93
+ - '${WIKI_MCP_PORT:-3101}:3333'
94
+ extra_hosts:
95
+ - host.docker.internal:host-gateway
96
+ restart: unless-stopped
97
+
98
+ # ── agent-wiki-production ─────────────────────────────────────────────────
99
+
100
+ production-mcp:
101
+ image: dotdrelle/agent-wiki-production:latest
102
+ labels:
103
+ wiki-manager.description: "Production MCP server for ingest/build/export jobs."
104
+ volumes:
105
+ - ${WIKI_WORKSPACE_PATH:-/tmp/llm-wiki-workspace-not-set}:/workspace
106
+ environment:
107
+ - MCP_AUTH_TOKEN=${PRODUCTION_MCP_AUTH_TOKEN:-}
108
+ - WORKSPACE_NAME=${WORKSPACE_NAME:-workspace}
109
+ - WIKI_WORKSPACE_PATH=/workspace
110
+ - WIKI_CONFIG_PATH=${WIKI_CONFIG_PATH:-}
111
+ - PRODUCTION_ALLOWED_STEPS=${PRODUCTION_ALLOWED_STEPS:-doctor,ingest,build,export,polish,pipeline}
112
+ - PRODUCTION_REQUIRE_CONFIRMATION=${PRODUCTION_REQUIRE_CONFIRMATION:-false}
113
+ - PRODUCTION_JOBS_DIR=${PRODUCTION_JOBS_DIR:-/workspace/.wiki/production-jobs}
114
+ - PRODUCTION_LOCKS_DIR=${PRODUCTION_LOCKS_DIR:-/workspace/.wiki/production-jobs/locks}
115
+ ports:
116
+ - '${PRODUCTION_MCP_PORT:-3102}:8080'
117
+ restart: unless-stopped
118
+
119
+ x-wiki-manager:
120
+ service-aliases:
121
+ all:
122
+ targets: [serve, mcp-http, production-mcp]
123
+ description: "Full workspace service set."
124
+ ui:
125
+ targets: [serve]
126
+ description: "Alias for serve: workspace web UI."
127
+ wiki:
128
+ targets: [mcp-http]
129
+ description: "Alias for mcp-http: wiki MCP server."
130
+ mcp:
131
+ targets: [mcp-http]
132
+ description: "Alias for mcp-http: wiki MCP server."
133
+ production:
134
+ targets: [production-mcp]
135
+ description: "Alias for production-mcp: production jobs."
@@ -0,0 +1,28 @@
1
+ {
2
+ "mcpServers": {
3
+ "cme": {
4
+ "url": "http://host.docker.internal:${CME_MCP_PORT:-3336}/mcp/",
5
+ "headers": {
6
+ "Authorization": "Bearer ${CME_MCP_AUTH_TOKEN}"
7
+ }
8
+ },
9
+ "documents": {
10
+ "url": "http://host.docker.internal:${DOCUMENTS_MCP_PORT:-3337}/mcp/",
11
+ "headers": {
12
+ "Authorization": "Bearer ${DOCUMENTS_MCP_AUTH_TOKEN}"
13
+ }
14
+ },
15
+ "mailer": {
16
+ "url": "http://host.docker.internal:${MAILER_MCP_PORT:-3335}/mcp/",
17
+ "headers": {
18
+ "Authorization": "Bearer ${MAILER_MCP_AUTH_TOKEN}"
19
+ }
20
+ },
21
+ "atlassian": {
22
+ "url": "http://host.docker.internal:9000/mcp",
23
+ "headers": {
24
+ "Authorization": "Bearer ${ATLASSIAN_MCP_AUTH_TOKEN}"
25
+ }
26
+ }
27
+ }
28
+ }
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@dotdrelle/wiki-manager",
3
+ "version": "0.6.17",
4
+ "description": "Agentic shell and orchestration cockpit for llm-wiki workspaces.",
5
+ "license": "PolyForm-Noncommercial-1.0.0",
6
+ "author": "dotrelle",
7
+ "type": "module",
8
+ "bin": {
9
+ "wiki-manager": "bin/wiki-manager.js",
10
+ "wiki-workspace": "wiki-workspace"
11
+ },
12
+ "scripts": {
13
+ "start": "bun ./bin/wiki-manager.js",
14
+ "test": "node --test src/core/activity.test.js src/core/agentEvents.test.js src/core/plan.test.js src/core/mcp.test.js src/core/documentIntake.test.js",
15
+ "check": "bun ./bin/wiki-manager.js --version && bun ./bin/wiki-manager.js --help && bun ./bin/wiki-manager.js --once \"verifie le mode agent\""
16
+ },
17
+ "engines": {
18
+ "node": ">=22.0.0",
19
+ "bun": ">=1.2.0"
20
+ },
21
+ "files": [
22
+ "bin",
23
+ "src",
24
+ "wiki-workspace",
25
+ "docker-compose.yml",
26
+ "agents.docker-compose.yml",
27
+ "mcp.endpoints.example.json",
28
+ ".env.example",
29
+ "tsconfig.json",
30
+ "bunfig.toml",
31
+ "workspaces/.env.example",
32
+ "README.md",
33
+ "LICENSE"
34
+ ],
35
+ "keywords": [
36
+ "llm",
37
+ "wiki",
38
+ "agent",
39
+ "mcp",
40
+ "orchestration",
41
+ "cli"
42
+ ],
43
+ "packageManager": "pnpm@10.29.2",
44
+ "dependencies": {
45
+ "@langchain/langgraph": "^1.3.2",
46
+ "@opentui/core": "^0.3.2",
47
+ "@opentui/solid": "^0.3.2",
48
+ "marked": "^15.0.12",
49
+ "marked-terminal": "^7.3.0",
50
+ "openai": "^6.42.0",
51
+ "solid-js": "1.9.12",
52
+ "yaml": "^2.9.0"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^26.0.0"
56
+ }
57
+ }