@dotdrelle/wiki-manager 0.15.28 → 0.15.29
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 +5 -4
- package/agents.docker-compose.override.example.yml +1 -1
- package/docker-compose.override.example.yml +2 -2
- package/mcp.endpoints.example.json +1 -1
- package/package.json +2 -2
- package/src/agent/graph.js +77 -13
- package/src/agent/graph.test.js +148 -4
- package/src/cli/wiki-manager.js +39 -6
- package/src/cli/wiki-manager.test.js +35 -0
- package/src/commands/slash.js +159 -39
- package/src/commands/slash.test.js +100 -1
- package/src/core/agentsCompose.js +79 -0
- package/src/core/agentsCompose.test.js +99 -0
- package/src/core/buildInfo.json +2 -2
- package/src/core/composeOverrides.test.js +17 -3
- package/src/core/env.js +27 -10
- package/src/core/mcp.js +1 -1
- package/src/core/startupCheck.js +64 -27
- package/src/core/startupCheck.test.js +49 -1
- package/src/core/wikiSetup.js +57 -22
- package/src/core/wikiSetup.test.js +87 -0
- package/src/orchestrator/objectiveResolver.js +24 -0
- package/src/orchestrator/objectiveResolver.test.js +27 -0
- package/src/shell/LeftPane.tsx +49 -24
- package/src/shell/repl.js +114 -21
- package/src/shell/repl.test.js +88 -17
- package/src/shell/tui.tsx +0 -1
- package/wiki-workspace +29 -12
package/wiki-workspace
CHANGED
|
@@ -17,6 +17,7 @@ WORKSPACES_DIR="${WIKI_WORKSPACES_DIR:-$DEFAULT_MANAGER_DIR/workspaces}"
|
|
|
17
17
|
MANAGER_ENV_FILE="${WIKI_MANAGER_ENV_FILE:-$DEFAULT_MANAGER_DIR/.env}"
|
|
18
18
|
MANAGER_ENDPOINTS_FILE="${WIKI_MANAGER_ENDPOINTS_FILE:-$DEFAULT_MANAGER_DIR/mcp.endpoints.json}"
|
|
19
19
|
MANAGER_STATE_DIR="$(cd "$(dirname "$MANAGER_ENV_FILE")" && pwd)"
|
|
20
|
+
MANAGER_COMPOSE_DIR="$MANAGER_STATE_DIR/.wiki/compose"
|
|
20
21
|
MANAGER_RUNTIME_DIR="$MANAGER_STATE_DIR/.wiki/runtime"
|
|
21
22
|
LEGACY_MANAGER_RUNTIME_DIR="$MANAGER_STATE_DIR/.wiki-manager"
|
|
22
23
|
if [[ ! -e "$MANAGER_RUNTIME_DIR" && -d "$LEGACY_MANAGER_RUNTIME_DIR" ]]; then
|
|
@@ -120,9 +121,9 @@ Configuration:
|
|
|
120
121
|
Runtime node: WIKI_MANAGER_NODE_BIN=/path/to/node
|
|
121
122
|
Local CA: --cacert /absolute/path/to/ca.pem (Docker must be able to read this host path)
|
|
122
123
|
|
|
123
|
-
Compose overrides (
|
|
124
|
-
docker-compose.override.yml Workspace stack
|
|
125
|
-
agents.docker-compose.override.yml Agents stack
|
|
124
|
+
Compose overrides (under .wiki/compose, created once, never regenerated):
|
|
125
|
+
.wiki/compose/docker-compose.override.yml Workspace stack
|
|
126
|
+
.wiki/compose/agents.docker-compose.override.yml Agents stack
|
|
126
127
|
Use them for proxy passthrough, extra mounts and optional agents.
|
|
127
128
|
Never edit .wiki/runtime/*.compose.yml — that is generated state, rewritten
|
|
128
129
|
on every compose command.
|
|
@@ -266,10 +267,10 @@ agents_compose() {
|
|
|
266
267
|
WORKSPACES_ROOT="$workspaces_root" AGENTS_DATA_DIR="$agents_data_dir" \
|
|
267
268
|
read_lines_into_array cacert_args cacert_compose_args "$agents_compose_file" "agents.cacert.compose.yml"
|
|
268
269
|
# User-owned override: optional external agents, proxy passthrough and
|
|
269
|
-
# any local fix live in a file the user maintains
|
|
270
|
+
# any local fix live in a file the user maintains under .wiki/compose —
|
|
270
271
|
# scaffolded once by ensure_compose_override, never overwritten afterwards.
|
|
271
272
|
local override_args=()
|
|
272
|
-
local user_override="$
|
|
273
|
+
local user_override="$MANAGER_COMPOSE_DIR/agents.docker-compose.override.yml"
|
|
273
274
|
[[ -f "$user_override" ]] && override_args+=(-f "$user_override")
|
|
274
275
|
WORKSPACES_ROOT="$workspaces_root" AGENTS_DATA_DIR="$agents_data_dir" \
|
|
275
276
|
COMPOSE_PROFILES= \
|
|
@@ -307,7 +308,7 @@ agents_compose() {
|
|
|
307
308
|
"${CME_MCP_PORT:-3336}" "${DOCUMENTS_MCP_PORT:-3337}"
|
|
308
309
|
connectors_enabled && printf ' connectors=:%s' "${CONNECTORS_MCP_PORT:-3338}"
|
|
309
310
|
printf '\n'
|
|
310
|
-
[[ ! -f "$
|
|
311
|
+
[[ ! -f "$MANAGER_COMPOSE_DIR/agents.docker-compose.override.yml" ]] || printf 'User override: %s\n' "$MANAGER_COMPOSE_DIR/agents.docker-compose.override.yml"
|
|
311
312
|
;;
|
|
312
313
|
down)
|
|
313
314
|
[[ $# -eq 0 ]] || die "agents down does not take arguments"
|
|
@@ -534,6 +535,13 @@ if (enabled === 'true') {
|
|
|
534
535
|
Authorization: 'Bearer ${CONNECTORS_MCP_AUTH_TOKEN}',
|
|
535
536
|
},
|
|
536
537
|
};
|
|
538
|
+
const connectorEndpoint = config.mcpServers.connectors;
|
|
539
|
+
connectorEndpoint.requireApproval = [
|
|
540
|
+
...new Set([
|
|
541
|
+
...(Array.isArray(connectorEndpoint.requireApproval) ? connectorEndpoint.requireApproval : []),
|
|
542
|
+
'connectors_gmail_modify',
|
|
543
|
+
]),
|
|
544
|
+
];
|
|
537
545
|
config.chatAccess.servers.connectors ??= {};
|
|
538
546
|
const connectorAccess = config.chatAccess.servers.connectors;
|
|
539
547
|
// One shape for every server: a single `allow` list. The legacy
|
|
@@ -545,6 +553,9 @@ if (enabled === 'true') {
|
|
|
545
553
|
...(Array.isArray(connectorAccess.allowActions) ? connectorAccess.allowActions : []),
|
|
546
554
|
'connectors_google_status',
|
|
547
555
|
'connectors_google_oauth_start',
|
|
556
|
+
'connectors_gmail_summary',
|
|
557
|
+
'connectors_gmail_search',
|
|
558
|
+
'connectors_gmail_labels',
|
|
548
559
|
]),
|
|
549
560
|
];
|
|
550
561
|
delete connectorAccess.allowActions;
|
|
@@ -745,10 +756,16 @@ ensure_compose_override() {
|
|
|
745
756
|
# the generated override and lose the change on the next compose command.
|
|
746
757
|
local example_name="$1"
|
|
747
758
|
local target_name="$2"
|
|
748
|
-
local target="$
|
|
759
|
+
local target="$MANAGER_COMPOSE_DIR/$target_name"
|
|
760
|
+
local legacy="$MANAGER_STATE_DIR/$target_name"
|
|
749
761
|
[[ -f "$target" ]] && return 0
|
|
762
|
+
mkdir -p "$MANAGER_COMPOSE_DIR"
|
|
763
|
+
if [[ -f "$legacy" ]]; then
|
|
764
|
+
mv "$legacy" "$target"
|
|
765
|
+
printf 'Migrated user-owned compose override: %s -> %s\n' "$legacy" "$target" >&2
|
|
766
|
+
return 0
|
|
767
|
+
fi
|
|
750
768
|
[[ -f "$ROOT_DIR/$example_name" ]] || return 0
|
|
751
|
-
mkdir -p "$MANAGER_STATE_DIR"
|
|
752
769
|
cp "$ROOT_DIR/$example_name" "$target"
|
|
753
770
|
printf 'Created %s (user-owned compose override, never regenerated)\n' "$target" >&2
|
|
754
771
|
}
|
|
@@ -889,11 +906,11 @@ compose_for_workspace() {
|
|
|
889
906
|
WIKI_MCP_PORT="$mcp_port" \
|
|
890
907
|
PRODUCTION_MCP_PORT="$prod_port" \
|
|
891
908
|
read_lines_into_array cacert_args cacert_compose_args "$ROOT_DIR/docker-compose.yml" "cacert.compose.yml"
|
|
892
|
-
# Same contract as the agents stack: a single global user-owned override
|
|
893
|
-
#
|
|
909
|
+
# Same contract as the agents stack: a single global user-owned override in
|
|
910
|
+
# .wiki/compose, merged after the packaged file and before the generated CA
|
|
894
911
|
# override so the operator can still be overruled on CA paths only.
|
|
895
912
|
local override_args=()
|
|
896
|
-
local user_override="$
|
|
913
|
+
local user_override="$MANAGER_COMPOSE_DIR/docker-compose.override.yml"
|
|
897
914
|
[[ -f "$user_override" ]] && override_args+=(-f "$user_override")
|
|
898
915
|
|
|
899
916
|
WIKI_WORKSPACE_PATH="$ws_path" \
|
|
@@ -1149,7 +1166,7 @@ config_workspace() {
|
|
|
1149
1166
|
WIKI_MCP_PORT="$mcp_port" \
|
|
1150
1167
|
read_lines_into_array cacert_args cacert_compose_args "$ROOT_DIR/docker-compose.yml" "cacert.compose.yml"
|
|
1151
1168
|
local override_args=()
|
|
1152
|
-
local user_override="$
|
|
1169
|
+
local user_override="$MANAGER_COMPOSE_DIR/docker-compose.override.yml"
|
|
1153
1170
|
[[ -f "$user_override" ]] && override_args+=(-f "$user_override")
|
|
1154
1171
|
|
|
1155
1172
|
WIKI_WORKSPACE_PATH="$target_path" \
|