@dotdrelle/wiki-manager 0.15.70 → 0.15.72

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.
Files changed (38) hide show
  1. package/README.md +24 -21
  2. package/agents.docker-compose.yml +5 -1
  3. package/package.json +1 -1
  4. package/src/activity/activityAggregator.test.js +2 -2
  5. package/src/agent/graph.js +1 -0
  6. package/src/cli/wiki-manager.js +1 -1
  7. package/src/cli/wiki-manager.test.js +16 -16
  8. package/src/commands/slash.js +24 -5
  9. package/src/core/agentEvents.js +134 -26
  10. package/src/core/agentEvents.test.js +43 -1
  11. package/src/core/buildInfo.json +2 -2
  12. package/src/core/commandFailure.test.js +2 -2
  13. package/src/core/currentArtifact.test.js +5 -5
  14. package/src/core/mcp.js +1 -1
  15. package/src/core/mcp.test.js +1 -1
  16. package/src/core/otherWorkspacesRunning.test.js +6 -6
  17. package/src/core/runtimeLog.js +80 -1
  18. package/src/core/runtimeLog.test.js +47 -19
  19. package/src/core/skillInvocation.test.js +1 -1
  20. package/src/core/wikiSetup.js +25 -0
  21. package/src/core/wikiSetup.test.js +35 -0
  22. package/src/core/wikirc.test.js +6 -6
  23. package/src/core/workspaceInherit.test.js +14 -14
  24. package/src/orchestrator/agentRegistry.test.js +6 -6
  25. package/src/orchestrator/dispatcher.js +70 -26
  26. package/src/orchestrator/dispatcher.test.js +46 -3
  27. package/src/orchestrator/providers/deepAgentsProvider.test.js +2 -2
  28. package/src/orchestrator/providers/runtimeProviders.js +58 -5
  29. package/src/orchestrator/providers/runtimeProviders.test.js +23 -0
  30. package/src/orchestrator/scheduler.test.js +4 -4
  31. package/src/runtime/delegation.test.js +11 -11
  32. package/src/runtime/runner.test.js +7 -7
  33. package/src/runtime/server.test.js +2 -2
  34. package/src/runtime/store.test.js +8 -5
  35. package/src/runtime/workspaceIsolation.test.js +26 -26
  36. package/src/shell/RightPane.tsx +14 -2
  37. package/src/shell/repl.js +24 -2
  38. package/wiki-workspace +34 -0
package/wiki-workspace CHANGED
@@ -343,6 +343,24 @@ agents_compose() {
343
343
  if [[ -n "$CACERT_PATH" ]]; then
344
344
  up_args+=(--force-recreate)
345
345
  fi
346
+ # Same lifecycle as the 7788 runtime: an agentic gateway already serving
347
+ # on the port is REUSED — a container started over it cannot bind, and
348
+ # the whole `up` would fail. Reuse applies only when the serving process
349
+ # is EXTERNAL to this compose project (a native runner): if the compose
350
+ # gateway container is the one running, the normal `up` leaves it alone.
351
+ # Only an EXPLICIT `agents up gateway` asks for the container; then a
352
+ # bind conflict is the honest answer.
353
+ local gateway_scale=()
354
+ local requested_list="${only_services[*]:-}"
355
+ local gateway_container_running=false
356
+ if _agents_dc ps --format '{{.Service}}' 2>/dev/null | grep -qx 'gateway'; then
357
+ gateway_container_running=true
358
+ fi
359
+ if gateway_enabled && ! $gateway_container_running && ! [[ " $requested_list " == *" gateway "* ]] && gateway_serving; then
360
+ printf 'Agentic gateway: already serving on :%s — reusing the existing runner (no container started).\n' "${GATEWAY_PORT:-7789}"
361
+ gateway_scale=(--scale gateway=0)
362
+ fi
363
+ up_args+=(${gateway_scale[@]+"${gateway_scale[@]}"})
346
364
  up_args+=(${only_services[@]+"${only_services[@]}"})
347
365
  _agents_dc "${up_args[@]}"
348
366
  printf 'Workspaces root: %s\n' "$workspaces_root"
@@ -574,6 +592,22 @@ gateway_enabled() {
574
592
  esac
575
593
  }
576
594
 
595
+ # Same lifecycle discipline as the 7788 runtime: an agentic gateway ALREADY
596
+ # serving on the port is REUSED, never shadowed by a container that cannot
597
+ # bind. A native `node bin/wiki-agentic-gateway.js` answers without auth
598
+ # (dev); a token-configured gateway (the container, or a native one with
599
+ # GATEWAY_AUTH_TOKEN) answers only to the Bearer — probe both.
600
+ gateway_serving() {
601
+ local port="${GATEWAY_PORT:-7789}"
602
+ local token url
603
+ url="http://localhost:${port}/health"
604
+ token="$(env_value "$MANAGER_ENV_FILE" GATEWAY_AUTH_TOKEN "")"
605
+ if [[ -n "$token" ]]; then
606
+ curl -fsS -m 3 -H "Authorization: Bearer $token" "$url" >/dev/null 2>&1 && return 0
607
+ fi
608
+ curl -fsS -m 3 "$url" >/dev/null 2>&1
609
+ }
610
+
577
611
  ensure_endpoints_file() {
578
612
  # Without mcp.endpoints.json the shell never connects to the agents it
579
613
  # just started (and `agents status` refuses to run). Seed it from the