PSF: Stabilizing workspace after crash. Valid kernel/skill fixes.

This commit is contained in:
2026-04-04 20:27:39 -04:00
parent 65a14784d3
commit 7ac10d1f95
47 changed files with 25388 additions and 3235 deletions

View File

@@ -48,8 +48,7 @@ Interfaces for the OAuth lifecycle. Source of truth is the Google Identity Platf
* Phase D: Build (Implementation)
** Token State Management
#+begin_src lisp
#+begin_src lisp :tangle ../projects/org-skill-auth-google-oauth/src/auth-google-oauth.lisp
(defvar *google-token-state* nil)
(defun auth-google-load-state ()
@@ -64,10 +63,7 @@ Interfaces for the OAuth lifecycle. Source of truth is the Google Identity Platf
(ensure-directories-exist state-file)
(with-open-file (out state-file :direction :output :if-exists :supersede)
(print *google-token-state* out))))
#+end_src
** Token Exchange (Handshake)
#+begin_src lisp
(defun auth-google-receive-code (code)
"Exchanges the manual authorization code for access and refresh tokens."
(let ((url "https://oauth2.googleapis.com/token")
@@ -89,10 +85,7 @@ Interfaces for the OAuth lifecycle. Source of truth is the Google Identity Platf
(error (c)
(kernel-log "OAUTH ERROR - Handshake failed: ~a" c)
nil))))
#+end_src
** Token Refresh
#+begin_src lisp
(defun auth-google-refresh-token ()
"Uses the refresh_token to acquire a new access_token."
(let ((refresh-token (getf *google-token-state* :refresh-token))
@@ -113,10 +106,7 @@ Interfaces for the OAuth lifecycle. Source of truth is the Google Identity Platf
(error (c)
(kernel-log "OAUTH ERROR - Refresh failed: ~a" c)
nil))))
#+end_src
** Kernel Integration
#+begin_src lisp
(defun auth-google-get-header ()
"Returns the Bearer token header, refreshing if necessary."
(unless *google-token-state* (auth-google-load-state))