- Updated 22 skill org files to use %%SKILLS_DIR%% placeholder - Modified opencortex.sh setup to replace placeholder with XDG path - Modified doctor_repair to handle placeholder replacement - Removed hardcoded absolute path
30 lines
925 B
Org Mode
30 lines
925 B
Org Mode
#+TITLE: SKILL: Tool Permissions (org-skill-tool-permissions.org)
|
|
#+AUTHOR: Agent
|
|
#+FILETAGS: :skill:security:permissions:
|
|
#+PROPERTY: header-args:lisp :tangle %%SKILLS_DIR%%/org-skill-tool-permissions.lisp
|
|
|
|
* Overview
|
|
The *Tool Permissions* skill manages the authorization levels for different cognitive tools.
|
|
|
|
* Implementation
|
|
|
|
** Permission Registry
|
|
#+begin_src lisp
|
|
(defvar *tool-permissions* (make-hash-table :test 'equal))
|
|
|
|
(defun set-tool-permission (tool-name level)
|
|
"Sets the permission level for a tool."
|
|
(setf (gethash (string-downcase (string tool-name)) *tool-permissions*) level))
|
|
|
|
(defun get-tool-permission (tool-name)
|
|
"Retrieves the permission level for a tool."
|
|
(gethash (string-downcase (string tool-name)) *tool-permissions* :ask))
|
|
#+end_src
|
|
|
|
** Skill Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-tool-permissions
|
|
:priority 600
|
|
:trigger (lambda (ctx) (declare (ignore ctx)) nil))
|
|
#+end_src
|