Files
passepartout/skills/org-skill-harness-monitor.org

1.9 KiB

SKILL: Harness Monitor

Overview

The Harness Monitor provides tools for inspecting the internal state and health of the OpenCortex Lisp Machine.

Implementation

(opencortex:def-cognitive-tool :harness-status \"Returns the current operational status of the OpenCortex harness, including loaded skills and telemetry.\"
  nil
  :body (lambda (args)
          (declare (ignore args))
          (format nil \"HARNESS STATUS:
- Active Skills: ~a
- Uptime: ~a seconds
- Memory Usage: ~a
- Providers: ~a\"
                  (hash-table-count opencortex:*skills-registry*)
                  (get-universal-time)
                  \"Not implemented\"
                  opencortex:*provider-cascade*)))

(opencortex:def-cognitive-tool :list-skills \"Lists all currently loaded skills and their metadata.\"
  nil
  :body (lambda (args)
          (declare (ignore args))
          (let ((output \"LOADED SKILLS:
\"))
            (maphash (lambda (name skill)
                       (setf output (concatenate 'string output
                                                 (format nil \"- ~a (Priority: ~a, Deps: ~s)~%\"
                                                         name
                                                         (opencortex:skill-priority skill)
                                                         (opencortex:skill-dependencies skill)))))
                     opencortex:*skills-registry*)
            output)))

(defskill :skill-harness-monitor
  :priority 100
  :trigger (lambda (context) t)
  :probabilistic (lambda (context) \"You are the Harness Monitor. Use your tools to provide system visibility.\")
  :deterministic (lambda (action context) action))