Skip to content

v3.16.0: prompt matches keep room beside pinned rules

Latest

Choose a tag to compare

@kitfunso kitfunso released this 24 Nov 09:30
· 4 commits to master since this release
e5fca1d

Added

  • Edit a held memory from the review queue. hippo quarantine edit <id> "<text>" and POST /v1/quarantine/:id/edit (admin only; a member key gets 403) approve a held memory with the admin's cleaned text. The text runs the write screen again and answers 400 when it still reads as an instruction, alone or joined to the kept lead-in or the kept tags. A held row whose own lead-in or kept tags read as an instruction answers 400 too, because an edit keeps both: reject that item instead. Clean text sent twice, or an approve after an edit, answers 409. The held row stays as delivered and is superseded by a new memory that lists it in parents, keeps the lead-in of the held row the edit read plus its artifact, trust tags and confidence tier, and sits under the original scope. One quarantine_edit audit row records {originalScope, newId}.
  • A viewer role, and one rule that maps an IdP groups claim onto it. roleFromGroups from hippo-memory/server turns a groups claim into viewer, editor (stored as member) or admin; each resolver keeps its own group lists. Pass a null fallback to refuse a caller in no mapped group; Entra drops the claim above 200 groups, so a null fallback refuses those users. Map a team-admin IdP group to editor, never admin, until team admin ships: admin covers the whole tenant. A viewer signed in through an auth resolver can read and cannot write.
  • Add-on routes take a level. AddonRoute.level is 'viewer', 'editor' or 'admin', and an unset level means 'editor'.
  • pinnedInject.promptRecallShare keeps room for prompt-matched memories. In the prompt hook (hippo context --pinned-only), pinned memories now use at most 75% of the budget left (default share 0.25, from 0 to 1). The other quarter stays free for the memories that share words with the prompt. When the pins do not fit, the strongest stay, then the newest, and each dropped pin gets a budget row in the delivery ledger. The cap reads only the budget and the share, so the pinned block stays byte-identical from prompt to prompt. With prompt recall off, the share is 0 and pins use the whole budget as before.
  • pinnedInject.sessionRulesBudget sets how many tokens hippo session-rules sends. The SessionStart hook now sends the newest rules that fit 2,000 tokens (the default), oldest first, and then one line that counts the rules it did not show. A value of 0 or below warns and reads as 2,000.

Changed

  • hippo quarantine shows a held item as pending review. The stored status stays pending, so GET /v1/quarantine is unchanged.
  • remember screens the lead-in joined to the content. A connector write whose instruction splits across the two is held, and so is a member's shared write split the same way. Any Unicode space, invisible mark (Default_Ignorable_Code_Point or Cf), control character (Cc), or Braille blank (U+2800) at the join is ignored.
  • The write screen reads every hidden mark both ways. A hidden mark or control character inside a word, between words or at the lead-in join no longer hides a phrase, whatever mix of marks the text uses: each mark reads as nothing or as a space on its own. A mark counts raw or as a character reference. A reference spelled as earlier releases read it (&# and up to 7 decimal digits or &#x and up to 6 hex digits, each with a semicolon, and the five XML names) decodes to its character. Any other spelling (no semicolon, more digits, a blank name such as &ZeroWidthSpace; or &shy;, &nbsp or &shy with no semicolon) decodes only when its character is blank or the number names no character; otherwise it stays as written, so &#46, &#124 and &#000000082; are text. A name with a semicolon that is in no table and starts with shy or nbsp decodes that prefix and keeps the rest as text (&shytions;). A reference is decoded once, a name outside those lists stays as written, a raw line break inside a phrase still ends the phrase, and a soft hyphen after a keyword syllable can flag hyphenated prose.
  • Store port: Quarantine gains an optional editQuarantined; a store without it answers 501 for an edit.
  • 501 store-port text: StoreNotPortedError now reports the '<storeKind>' store has no port for '<group>'; this code path is not ported to the store yet, so the wording fits both port groups and single methods.
  • Actor.role, ResolvedBearer.role, McpCaller.role and ScopeActor.role gain 'viewer'. ScopeActor also reaches the store-kit entry. The store port still takes admin or member only (StoreActor), as before, so an add-on store adapter never sees 'viewer'.
  • A resolver role that is missing, or outside 'admin', 'member' and 'viewer', now reads as 'viewer'. It read as 'member' before. The server logs one warning that leaves out the value. An MCP context with no role reads as 'viewer' too.
  • Widening Actor.role breaks an exhaustive switch over it at compile time. Add a 'viewer' case.
  • DELETE /v1/auth/keys/:keyId is open to a viewer. authRevoke still lets a resolver caller below admin revoke only the keys it minted.
  • Add-on routes refuse a viewer by default. Set level: 'viewer' on a route that writes nothing.
  • The request line carries role= for /v1, add-on and MCP calls.
  • The prompt hook orders matched memories with hippo recall's word ranker. The overlap gate still picks which memories match. Then rankBm25 orders them, and pinnedInject.promptRecallMaxItems cuts the list after that order. A long memory that holds most of the prompt's words now ranks above short memories that share only two. A cleared memory that rankBm25 does not return still follows, in gate order. Memories cut by the limit keep the gate-max-items reason in the delivery ledger.
  • A blank prompt counts as a prompt with no matching words. With pinnedInject.promptRecall on, the prompt hook gives a blank prompt the same pins as any other prompt and adds no recent memories, so it can reuse the pinned block. Before, a blank prompt fell back to the newest memories, and the next prompt sent the pinned block again. A hook call with no prompt field still gets the newest memories.

Security

  • Self-mint and the MCP write tools refuse a viewer. A viewer cannot mint its own member key or call hippo_remember, hippo_outcome, hippo_learn, hippo_resolve or hippo_share. A key minted while its owner was an editor keeps its role until it is revoked or expires; a viewer can revoke the keys it minted itself.
  • A member key's flagged write is held for review, and a GitHub item from an outside author is held by rule. Over HTTP and MCP, a member's remember, and over HTTP a member's supersede (MCP has no supersede tool), into a shared scope that the instruction check flags now goes to the quarantine queue instead of being stored framed. The check reads the member's tags and the lead-in as well as the content (on a supersede, the lead-in the new row keeps from the old one), so a tag or lead-in that holds an instruction holds the write. The reply carries quarantined (HTTP), Quarantined [...] (MCP), or a Quarantined [...] line naming hippo quarantine approve <id> (CLI through hippo serve with a member key in HIPPO_API_KEY). An admin releases it with hippo quarantine approve <id>. A GitHub issue, comment or pull request whose author_association is not OWNER, MEMBER or COLLABORATOR is held the same way, whatever its text. A store without the quarantine groups keeps the old frame, and a framed row's tags print inside the frame.
  • The operator's own CLI is not screened through hippo serve. A write signed with the server's local key is no longer tagged instruction-like, as a direct CLI write never was.
  • A teammate whose GitHub organization membership is private can be vouched for. Such a teammate can read as CONTRIBUTOR or NONE, so their items are held. GitHub's docs: "By default, your organization membership visibility is set to private." Either make the membership public (GitHub: "You can choose to publicize individual organization memberships on your profile."), or add the teammate's numeric GitHub user id to the new GITHUB_TRUSTED_USER_IDS (comma-separated). Get an id with gh api users/<login> --jq .id. The list takes ids, not logins, because GitHub lets anyone claim a login its owner gives up. Set it on the server, in the shell that runs hippo github backfill, and in the shell that runs hippo github dlq replay, which reads its own environment when you replay. An entry that is not a number stops hippo serve from starting and stops those two commands. The error names each bad entry by its position and never prints the entry, so a token pasted into the wrong variable stays out of the log. The list applies only to items from the configured GitHub server: github.com when GITHUB_ENTERPRISE_URL is unset, else that GHES host. An item from any other server is held by the author rule, even when its id is listed. A listed id skips only the author rule; the instruction check still holds a flagged item. Changing the list does not release items already held: approve each with hippo quarantine approve <id>.
  • Store port: ConnectorWrites gains an optional supersedeHeld. A store that implements it holds a member's flagged supersede for review. A store without it keeps that supersede framed and in its scope, as a store with no review queue does.