Repository navigation
feat: inspect what an upstream asks of the caller - #62
Merged
Merged
Conversation
The hook's third stage, and the case design-server-initiated.md deferred here by name: policy decides whether an upstream may elicit at all, and this decides whether *this* elicitation is acceptable. "Refuse one that asks the human for an API key" is now a passing test rather than a promise made in a design record. It is the strongest of the three stages. Ingress prevents an action; egress only withholds a disclosure, because the upstream has already acted. This one prevents too, and prevents something egress cannot reach — the client is never asked, so no model tokens are spent and no human is shown the prompt. The upstream's params ride in the envelope's arguments field rather than earning a fourth one: "what is being asked for" is the role arguments already play on the forward path, and an inspector reading an elicitation's message and requested schema is reading the same kind of thing it reads from a tool call. Docs closed the loop in both directions. security-model's reverse-direction section said the content question's answer "is the external decision hook" — it now says which stage and what refusing there does. design-server-initiated records that its deferral held. And the README's content-inspection non-goal, which has promised an external policy endpoint since v1.0, finally points at the thing it promised. Phases 3 and 4 of docs/design-decision-hook.md, which completes it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phases 3 and 4 of
docs/design-decision-hook.md, which completes it. Follows #60 and #61.The hook's third stage, and the case
design-server-initiated.mddeferred here by name. Policy decides whether an upstream may elicit at all;serverInitiateddecides whether this elicitation is acceptable. "Refuse one that asks the human for an API key" is now a passing test rather than a promise in a design record — the test drives a real upstream whose tool samples benignly and then asks for a credential, and asserts the first goes through and the second never reaches the human.It is the strongest of the three stages
ingressegressserverInitiatedThe client is never asked, so no model tokens are spent and no human sees the prompt.
The upstream's params ride in the envelope's
argumentsfield rather than earning a fourth one: "what is being asked for" is the role arguments already play on the forward path, and an inspector reading an elicitation's message and requested schema is reading the same kind of thing it reads from a tool call.The docs pass closes three loops
security-model.md's reverse-direction section said the content question's answer "is the external decision hook". It now says which stage, and what refusing there actually does.design-server-initiated.mdrecords that its deferral held — the thing it declined to build structurally exists out-of-process, as designed.Verification
make checkincluding lint,make conformance40/40, and the elicitation test above. With this, Horizon 2 item 9 is done in all four phases.🤖 Generated with Claude Code