Huginn reads the forge for her: repo changes by others reach a live session as one organ notice, and her first line shows wear

StewardedActivity/Activity on the mind wire (ids, instants, logins, repo names, numbers, counts; no text field). The daemon answers it from
sources::forge in one 2 s read bounded on the whole read, never touching the mind; absent forge or a failed read is Refused(Unavailable).
The organ reads once at the first line (wear section) and then at most every 300 s, one notice per read, cursor in memory only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-02 23:40:18 +01:00
commit 53aeb168dc
11 changed files with 1456 additions and 28 deletions

View file

@ -157,6 +157,42 @@
"required": [
"SearchSources"
]
},
{
"description": "What others did in `repos` on the forge since the `after` cursor: the\ndaemon reads the forge and no document of the mind, and answers\n`Refused(Unavailable)` when it has no forge or the forge does not answer\nin time. The repos are the asker's to name (her stewardships); the\ninstance's own login is dropped from the answer.",
"type": "object",
"properties": {
"StewardedActivity": {
"type": "object",
"properties": {
"after": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0
},
"instance": {
"$ref": "#/$defs/Slug"
},
"repos": {
"type": "array",
"items": {
"$ref": "#/$defs/OrgRepo"
}
}
},
"required": [
"instance",
"repos"
]
}
},
"additionalProperties": false,
"required": [
"StewardedActivity"
]
}
],
"$defs": {

View file

@ -113,6 +113,18 @@
"Sources"
]
},
{
"type": "object",
"properties": {
"Activity": {
"$ref": "#/$defs/RepoActivity"
}
},
"additionalProperties": false,
"required": [
"Activity"
]
},
{
"description": "The answer did not fit one send and is being held for the client to\nfetch. Nothing in a mind produces this: the daemon's serve module does,\nin place of an answer, and the answer it stands for is the named\nMessagePack of the `HuginnMindResponse` the mind gave.",
"type": "object",
@ -1816,6 +1828,35 @@
"scope"
]
},
"OpenPr": {
"description": "A pull request open on the forge.",
"type": "object",
"properties": {
"author": {
"$ref": "#/$defs/Short"
},
"number": {
"type": "integer",
"format": "uint32",
"minimum": 0
},
"repo": {
"$ref": "#/$defs/OrgRepo"
},
"updated_at": {
"description": "Unix milliseconds.",
"type": "integer",
"format": "uint64",
"minimum": 0
}
},
"required": [
"repo",
"number",
"author",
"updated_at"
]
},
"OrgRepo": {
"description": "A GitHub repository as `Org/Repo`, at most 140 UTF-8 bytes (39 + 1 +\n100). The owner is 1 to 39 `[A-Za-z0-9-]` bytes with no leading or\ntrailing hyphen; the repo is 1 to 100 `[A-Za-z0-9._-]` bytes, is never\n`.` or `..`, and does not end in `.git`, ASCII-case-insensitively.\nIdentity is case-insensitive: `GameCult/Epiphany` and `gamecult/epiphany`\nare the same repository.",
"type": "string",
@ -4235,6 +4276,20 @@
"claims"
]
},
"PrAction": {
"description": "What a pull-request event did. The words are the forge's op names, nothing\na person wrote.",
"type": "string",
"enum": [
"Opened",
"Merged",
"Closed",
"Reopened",
"Commented",
"Approved",
"Rejected",
"AutoMerge"
]
},
"Promise": {
"description": "A promise a report makes about what it landed. Not a document and not\nresolvable: it is identified by its report's id and its label, as a\n`TargetInvariant` is by its target's. Soul measures every one (ruling\nA), and the rule that every one is measured is admission's.",
"type": "object",
@ -4282,6 +4337,135 @@
"why"
]
},
"RepoActivity": {
"description": "The answer to an activity read. `head` is the newest feed id the read saw,\nwhether or not any event survived the filter: the cursor to ask `after`\nnext. `more` says the read stopped at its page cap before reaching `after`.\n`open_prs` and `unseen` come only on a read with no `after`.",
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/$defs/RepoEvent"
}
},
"head": {
"type": "integer",
"format": "uint64",
"minimum": 0
},
"more": {
"type": "boolean"
},
"open_prs": {
"type": "array",
"items": {
"$ref": "#/$defs/OpenPr"
}
},
"unseen": {
"description": "Repos asked about that the anonymous org listing does not hold.",
"type": "array",
"items": {
"$ref": "#/$defs/OrgRepo"
}
}
},
"required": [
"head",
"events",
"more",
"open_prs",
"unseen"
]
},
"RepoChange": {
"description": "What an event was. No field carries text a person wrote: a title, a comment\nor a commit message is another person's word and has no place here.",
"oneOf": [
{
"description": "A push to the repo's default branch of `commits` commits.",
"type": "object",
"properties": {
"Pushed": {
"type": "object",
"properties": {
"commits": {
"type": "integer",
"format": "uint32",
"minimum": 0
}
},
"required": [
"commits"
]
}
},
"additionalProperties": false,
"required": [
"Pushed"
]
},
{
"type": "object",
"properties": {
"Pr": {
"type": "object",
"properties": {
"action": {
"$ref": "#/$defs/PrAction"
},
"number": {
"type": "integer",
"format": "uint32",
"minimum": 0
}
},
"required": [
"number",
"action"
]
}
},
"additionalProperties": false,
"required": [
"Pr"
]
}
]
},
"RepoEvent": {
"description": "One thing someone else did in a repo of the asker's.",
"type": "object",
"properties": {
"actor": {
"description": "The forge login that did it.",
"$ref": "#/$defs/Short"
},
"at": {
"description": "When it happened, Unix milliseconds.",
"type": "integer",
"format": "uint64",
"minimum": 0
},
"change": {
"$ref": "#/$defs/RepoChange"
},
"id": {
"description": "The forge's own monotonic feed id.",
"type": "integer",
"format": "uint64",
"minimum": 0
},
"repo": {
"$ref": "#/$defs/OrgRepo"
}
},
"required": [
"id",
"at",
"repo",
"actor",
"change"
]
},
"ReportCommit": {
"type": "object",
"properties": {