You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix permission handler kinds in SDK docs and samples (#1133) (#1315)
* Fix permission handler kinds in SDK docs and samples (#1133)
The SDKs distinguish two permission types that look similar but mean
different things:
* PermissionDecision (present tense) is what an onPermissionRequest
handler returns: approve-once, approve-for-session,
approve-for-location, approve-permanently, reject, user-not-available,
no-result.
* PermissionResult (past tense) is what shows up in permission.completed
session events: approved, denied-by-rules,
denied-interactively-by-user, etc.
The READMEs, shared docs, and several test scenario samples were
documenting and returning past-tense PermissionResult strings from
onPermissionRequest handlers. That is wrong: those handlers must return
PermissionDecision. This change updates every handler-return reference
to use valid PermissionDecision kinds, while leaving event-payload
documentation (which is legitimately past-tense) untouched.
Files touched include the Node, Python, Go, and .NET READMEs, the .NET
PermissionRequestResult.Kind XML doc, nodejs/docs/examples.md, the
shared docs/ markdown (hooks, skills, image-input, steering-and-queueing,
custom-agents, getting-started, microsoft-agent-framework), and the
Python + TypeScript sample programs under test/scenarios/.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Return PermissionRequestResult in Python permission samples
Python permission request handlers return PermissionRequestResult objects,
not raw dictionaries. Update the docs and scenario samples that were still
using dict-shaped examples so readers and scenario runs get the intended
approve-once behavior instead of falling back to user-not-available.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments