@dotdrelle/wiki-manager 0.14.12 → 0.14.16
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/.env.example +11 -0
- package/docker-compose.yml +1 -1
- package/package.json +1 -1
- package/src/activity/activityAggregator.js +43 -13
- package/src/activity/activityAggregator.test.js +51 -2
- package/src/agent/graph.js +79 -11
- package/src/agent/graph.test.js +43 -3
- package/src/cli/wiki-manager.js +44 -3
- package/src/commands/slash.js +10 -3
- package/src/commands/slash.test.js +24 -0
- package/src/core/activity.js +4 -0
- package/src/core/activity.test.js +31 -0
- package/src/core/agentEvents.js +11 -2
- package/src/core/buildInfo.json +2 -2
- package/src/core/dockerCompose.test.js +4 -0
- package/src/core/env.js +16 -4
- package/src/core/env.test.js +3 -0
- package/src/core/mcp.js +1 -1
- package/src/core/wikiSetup.js +43 -1
- package/src/core/wikiWorkspace.test.js +20 -0
- package/src/core/workspaces.js +10 -2
- package/src/orchestrator/dependencyResolver.js +19 -1
- package/src/orchestrator/objectiveResolver.js +24 -0
- package/src/orchestrator/objectiveResolver.test.js +23 -1
- package/src/orchestrator/scheduler.test.js +22 -1
- package/src/runtime/auth.test.js +65 -1
- package/src/runtime/client.js +4 -0
- package/src/runtime/donna-contract.test.js +2 -0
- package/src/runtime/lifecycle.js +21 -12
- package/src/runtime/runner.js +130 -17
- package/src/runtime/runner.test.js +62 -1
- package/src/runtime/server.js +13 -2
- package/src/runtime/server.test.js +30 -1
- package/src/shell/FileEditorDialog.tsx +2 -2
- package/src/shell/LeftPane.tsx +60 -15
- package/src/shell/RightPane.tsx +147 -54
- package/src/shell/StartupScreen.tsx +3 -7
- package/src/shell/renderer.ts +1 -0
- package/src/shell/repl.js +7 -81
- package/src/shell/repl.test.js +128 -38
- package/src/shell/tui.tsx +59 -64
- package/src/shell/useSession.ts +45 -6
- package/wiki-workspace +36 -3
package/wiki-workspace
CHANGED
|
@@ -95,6 +95,7 @@ Commands:
|
|
|
95
95
|
agents down Stop all external agents
|
|
96
96
|
agents logs [args...] Follow external agent logs
|
|
97
97
|
agents pull Pull latest external agent images
|
|
98
|
+
agents refresh Update only external agents currently running
|
|
98
99
|
agents status Check reachability of configured MCP endpoints
|
|
99
100
|
|
|
100
101
|
runtime up Start the single host agent-runtime on Node.js 22
|
|
@@ -210,8 +211,11 @@ agents_compose() {
|
|
|
210
211
|
[[ -f "$agents_compose_file" ]] || die "agents compose file not found: $agents_compose_file"
|
|
211
212
|
|
|
212
213
|
local agents_data_dir workspaces_root
|
|
213
|
-
agents_data_dir="$(absolute_path "${AGENTS_DATA_DIR:-.agents-data}" "$DEFAULT_MANAGER_DIR")"
|
|
214
214
|
workspaces_root="$(absolute_path "$WORKSPACES_DIR" "$DEFAULT_MANAGER_DIR")"
|
|
215
|
+
# Canonical .agents-data lives next to the workspaces (same rule as the
|
|
216
|
+
# manager's resolveAgentsDataDir): the serve stack and the agents stack MUST
|
|
217
|
+
# mount the same host directory or document conversions break.
|
|
218
|
+
agents_data_dir="$(absolute_path "${AGENTS_DATA_DIR:-$workspaces_root/.agents-data}" "$DEFAULT_MANAGER_DIR")"
|
|
215
219
|
|
|
216
220
|
local compose_env_args=()
|
|
217
221
|
[[ -f "$MANAGER_ENV_FILE" ]] && compose_env_args+=(--env-file "$MANAGER_ENV_FILE")
|
|
@@ -273,6 +277,10 @@ agents_compose() {
|
|
|
273
277
|
[[ $# -eq 0 ]] || die "agents pull does not take arguments"
|
|
274
278
|
_agents_dc pull
|
|
275
279
|
;;
|
|
280
|
+
refresh)
|
|
281
|
+
[[ $# -eq 0 ]] || die "agents refresh does not take arguments"
|
|
282
|
+
refresh_running_services 'No running external agent containers to refresh' 'Refreshed running agents: %s' _agents_dc
|
|
283
|
+
;;
|
|
276
284
|
status)
|
|
277
285
|
[[ $# -eq 0 ]] || die "agents status does not take arguments"
|
|
278
286
|
if [[ ! -f "$MANAGER_ENDPOINTS_FILE" ]]; then
|
|
@@ -709,7 +717,8 @@ compose_for_workspace() {
|
|
|
709
717
|
mcp_port="$(workspace_value "$workspace" WIKI_MCP_PORT 3101)"
|
|
710
718
|
prod_port="$(workspace_value "$workspace" PRODUCTION_MCP_PORT 3102)"
|
|
711
719
|
project="$(compose_project "$workspace")"
|
|
712
|
-
|
|
720
|
+
# Same canonical rule as agents_compose: .agents-data next to the workspaces.
|
|
721
|
+
agents_data_dir="$(absolute_path "${AGENTS_DATA_DIR:-$(dirname "$ws_path")/.agents-data}" "$DEFAULT_MANAGER_DIR")"
|
|
713
722
|
|
|
714
723
|
local compose_env_args=()
|
|
715
724
|
[[ -f "$MANAGER_ENV_FILE" ]] && compose_env_args+=(--env-file "$MANAGER_ENV_FILE")
|
|
@@ -747,10 +756,30 @@ read_lines_into_array() {
|
|
|
747
756
|
eval "$array_name=()"
|
|
748
757
|
local line
|
|
749
758
|
while IFS= read -r line; do
|
|
759
|
+
[[ -n "${line//[[:space:]]/}" ]] || continue
|
|
750
760
|
eval "$array_name+=(\"\$line\")"
|
|
751
761
|
done < <("$@")
|
|
752
762
|
}
|
|
753
763
|
|
|
764
|
+
# Shared by the "agents refresh" and per-workspace "refresh" subcommands:
|
|
765
|
+
# pull and recreate only the compose services already running, skipping the
|
|
766
|
+
# rest. "$@" is the compose invocation (e.g. `_agents_dc` or
|
|
767
|
+
# `compose_for_workspace "$workspace"`) to run ps/pull/up through.
|
|
768
|
+
refresh_running_services() {
|
|
769
|
+
local no_running_msg="$1"
|
|
770
|
+
local refreshed_msg_fmt="$2"
|
|
771
|
+
shift 2
|
|
772
|
+
local running_services=()
|
|
773
|
+
read_lines_into_array running_services "$@" ps --status running --services
|
|
774
|
+
if [[ ${#running_services[@]} -eq 0 ]]; then
|
|
775
|
+
printf '%s\n' "$no_running_msg"
|
|
776
|
+
return
|
|
777
|
+
fi
|
|
778
|
+
"$@" pull "${running_services[@]}"
|
|
779
|
+
"$@" up -d "${running_services[@]}"
|
|
780
|
+
printf "$refreshed_msg_fmt\n" "${running_services[*]}"
|
|
781
|
+
}
|
|
782
|
+
|
|
754
783
|
cacert_compose_args() {
|
|
755
784
|
local compose_file="$1"
|
|
756
785
|
local override_name="$2"
|
|
@@ -920,7 +949,8 @@ config_workspace() {
|
|
|
920
949
|
[[ -f "$env_file" ]] && die "workspace already configured: $env_file"
|
|
921
950
|
|
|
922
951
|
local port_base serve_port mcp_port prod_port wiki_token prod_token agents_data_dir
|
|
923
|
-
|
|
952
|
+
# Same canonical rule as agents_compose: .agents-data next to the workspaces.
|
|
953
|
+
agents_data_dir="$(absolute_path "${AGENTS_DATA_DIR:-$(dirname "$target_path")/.agents-data}" "$DEFAULT_MANAGER_DIR")"
|
|
924
954
|
port_base="$(find_free_workspace_port_base 3100)"
|
|
925
955
|
serve_port="$port_base"
|
|
926
956
|
mcp_port=$((port_base + 1))
|
|
@@ -1069,6 +1099,9 @@ main() {
|
|
|
1069
1099
|
down)
|
|
1070
1100
|
compose_for_workspace "$workspace" down
|
|
1071
1101
|
;;
|
|
1102
|
+
refresh)
|
|
1103
|
+
refresh_running_services "No running workspace containers to refresh: $workspace" "Refreshed running workspace containers: $workspace (%s)" compose_for_workspace "$workspace"
|
|
1104
|
+
;;
|
|
1072
1105
|
logs)
|
|
1073
1106
|
local log_args=()
|
|
1074
1107
|
read_lines_into_array log_args logs_args "$@"
|