Skip to content

Commit 2d92f67

Browse files
committed
1 parent 5f02046 commit 2d92f67

6 files changed

Lines changed: 243 additions & 7 deletions

File tree

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require (
1010
charm.land/glamour/v2 v2.0.1
1111
charm.land/lipgloss/v2 v2.0.6
1212
github.com/basecamp/actioncable-client/go/v2 v2.0.2
13-
github.com/basecamp/hey-sdk/go v0.35.1
13+
github.com/basecamp/hey-sdk/go v0.37.0
1414
github.com/basecamp/mcp v0.2.0
1515
github.com/charmbracelet/x/ansi v0.11.10
1616
github.com/fsnotify/fsnotify v1.10.1

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuP
9191
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
9292
github.com/basecamp/actioncable-client/go/v2 v2.0.2 h1:h2Sl15gj2lI/EX5E0EUxjyYgf0LF9Gn1zqEUInSrUpc=
9393
github.com/basecamp/actioncable-client/go/v2 v2.0.2/go.mod h1:3Y0N9V5LXclT5nQWcPhq/+6rj4eKXgKAX8dx15X8yB8=
94-
github.com/basecamp/hey-sdk/go v0.35.1 h1:azrn9JoilQaQ3QDBtZb4hiROmQFUyEIWWVWFq65wSTw=
95-
github.com/basecamp/hey-sdk/go v0.35.1/go.mod h1:g4+w+Htmntp03iF9L7afzWyPVYeQzxFUYONlw9r4R+s=
94+
github.com/basecamp/hey-sdk/go v0.37.0 h1:CQsFKOuJ+6zXSkb4yp0c5fxG2lzSM5OY7Cvnv3TpgbQ=
95+
github.com/basecamp/hey-sdk/go v0.37.0/go.mod h1:g4+w+Htmntp03iF9L7afzWyPVYeQzxFUYONlw9r4R+s=
9696
github.com/basecamp/mcp v0.2.0 h1:s+8MYKGttZCqLFbvMJwJn5NBUhP9HueNesGJmS+koU0=
9797
github.com/basecamp/mcp v0.2.0/go.mod h1:1axsMWeyuLefka6qXr0gb0Nnxcjrdk3sSv6bymijRlc=
9898
github.com/basecamp/surfguard/go v0.1.0 h1:JMo+MZQEOBRqnUylzD0/jS9S42Fp+XKWMG+4LWfu/XE=
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"source": "github.com/basecamp/hey-sdk",
3-
"commit": "8edac1066c638b8f479dba20645802658c59eb26",
4-
"ref": "go/v0.35.1",
3+
"commit": "ea0558f1f1ac06854ab9dc89be36dd8d06f51526",
4+
"ref": "go/v0.37.0",
55
"files": ["behavior-model.json", "openapi.json"],
66
"synced_by": "scripts/sync-mcp-model.sh"
77
}

‎internal/mcpserver/model/behavior-model.json‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,6 +2045,24 @@
20452045
"unsigned": false,
20462046
"untrusted_content": false
20472047
},
2048+
"RestoreEntry": {
2049+
"destructive": false,
2050+
"idempotent": true,
2051+
"no_redirect": false,
2052+
"open_world": false,
2053+
"readonly": false,
2054+
"retry": {
2055+
"backoff": "exponential",
2056+
"base_delay_ms": 1000,
2057+
"max": 2,
2058+
"retry_on": [
2059+
429,
2060+
503
2061+
]
2062+
},
2063+
"unsigned": false,
2064+
"untrusted_content": false
2065+
},
20482066
"RestoreTopic": {
20492067
"destructive": false,
20502068
"idempotent": true,
@@ -2279,6 +2297,21 @@
22792297
"unsigned": false,
22802298
"untrusted_content": false
22812299
},
2300+
"UndoTopicSend": {
2301+
"destructive": false,
2302+
"idempotent": false,
2303+
"no_redirect": false,
2304+
"open_world": false,
2305+
"readonly": false,
2306+
"retry": {
2307+
"backoff": "exponential",
2308+
"base_delay_ms": 1000,
2309+
"max": 1,
2310+
"retry_on": []
2311+
},
2312+
"unsigned": false,
2313+
"untrusted_content": false
2314+
},
22822315
"UnfilePostings": {
22832316
"destructive": false,
22842317
"idempotent": true,

‎internal/mcpserver/model/openapi.json‎

Lines changed: 204 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7539,6 +7539,104 @@
75397539
"x-hey-untrusted-content": true
75407540
}
75417541
},
7542+
"/entries/{entryId}/status/active.json": {
7543+
"put": {
7544+
"description": "Restore an entry from the trash (Entries::StatusController#active): a trashed draft\nbecomes a draft again, and a trashed message that had been sent or received returns to\nits thread. An entry that is not in the trash is left as it is, so asking twice is\nharmless. HEY first delivers an entry Undo Send still holds, as its other status changes\ndo, so this is not a way to call a send back (UndoTopicSend is).\n\nThe entry alone is restored, never its topic. A draft that was the only entry of its\ntopic took the topic to the trash with it (DeleteDraft), and restoring just the entry\nleaves a draft on a trashed topic, which HEY empties from the trash with the rest:\nrestore that one with RestoreTopic, which brings back the topic and the draft together.\nThis operation is for a draft trashed out of a thread that stayed, which RestoreTopic\nleaves in the trash.\n\nHEY answers with a redirect and no body, 303 to the entry's topic. A generated client\nfollows it and reads the thread; Go's wrapper takes the redirect as the answer.\nTypeScript's client follows no redirect: there the 303 arrives as an error whose status\nis 303, and that status is the restore having gone through. A scoped token needs write,\nand send as well when the draft is scheduled to send, since a draft keeps its schedule\nin the trash.",
7545+
"operationId": "RestoreEntry",
7546+
"parameters": [
7547+
{
7548+
"name": "entryId",
7549+
"in": "path",
7550+
"schema": {
7551+
"type": "integer",
7552+
"format": "int64"
7553+
},
7554+
"required": true
7555+
},
7556+
{
7557+
"name": "filtered_account_id",
7558+
"in": "query",
7559+
"description": "Optional account filter, an id from GetIdentity's accounts[].id. Reads that filter by account narrow to that account. Omit it to leave the filter unset, and what an unfiltered request returns depends on the operation. Some operations ignore it. To choose a sending address, use an operation's explicit sender-selection fields rather than relying on this filter. GetIdentity also lists accounts the filter does not accept, and an id HEY does not recognize or cannot use for this identity can leave the filter unset instead of returning an error.",
7560+
"required": false,
7561+
"schema": {
7562+
"type": "integer",
7563+
"format": "int64"
7564+
},
7565+
"x-hey-account-scope": true
7566+
}
7567+
],
7568+
"responses": {
7569+
"200": {
7570+
"description": "RestoreEntry 200 response"
7571+
},
7572+
"401": {
7573+
"description": "UnauthorizedError 401 response",
7574+
"content": {
7575+
"application/json": {
7576+
"schema": {
7577+
"$ref": "#/components/schemas/UnauthorizedErrorResponseContent"
7578+
}
7579+
}
7580+
}
7581+
},
7582+
"403": {
7583+
"description": "ForbiddenError 403 response",
7584+
"content": {
7585+
"application/json": {
7586+
"schema": {
7587+
"$ref": "#/components/schemas/ForbiddenErrorResponseContent"
7588+
}
7589+
}
7590+
}
7591+
},
7592+
"404": {
7593+
"description": "NotFoundError 404 response",
7594+
"content": {
7595+
"application/json": {
7596+
"schema": {
7597+
"$ref": "#/components/schemas/NotFoundErrorResponseContent"
7598+
}
7599+
}
7600+
}
7601+
},
7602+
"500": {
7603+
"description": "InternalServerError 500 response",
7604+
"content": {
7605+
"application/json": {
7606+
"schema": {
7607+
"$ref": "#/components/schemas/InternalServerErrorResponseContent"
7608+
}
7609+
}
7610+
}
7611+
},
7612+
"503": {
7613+
"description": "ServiceUnavailableError 503 response",
7614+
"content": {
7615+
"application/json": {
7616+
"schema": {
7617+
"$ref": "#/components/schemas/ServiceUnavailableErrorResponseContent"
7618+
}
7619+
}
7620+
}
7621+
}
7622+
},
7623+
"tags": [
7624+
"Entries"
7625+
],
7626+
"x-hey-destructive": false,
7627+
"x-hey-open-world": false,
7628+
"x-hey-retry": {
7629+
"maxAttempts": 2,
7630+
"baseDelayMs": 1000,
7631+
"backoff": "exponential",
7632+
"retryOn": [
7633+
429,
7634+
503
7635+
]
7636+
},
7637+
"x-hey-untrusted-content": false
7638+
}
7639+
},
75427640
"/entries/{entryId}/status/spam.json": {
75437641
"put": {
75447642
"description": "Mark an entry as spam. Denies the sender when every thread from them is already spam.",
@@ -12787,6 +12885,111 @@
1278712885
"x-hey-untrusted-content": false
1278812886
}
1278912887
},
12888+
"/topics/{topicId}/undo_send.json": {
12889+
"post": {
12890+
"description": "Call back the last message the caller sent on a topic, while Undo Send still holds it\n(Topics::UndoSendsController#create). The message returns to Drafts, unsent. HEY picks\nthe message: the caller's last delayed entry on the topic, which need not be the one a\ncaller has in mind when two were sent to one thread within the delay. A reply that broke\nout into a thread of its own is called back on that thread, the one SentMessage's\ntopic_id names, and returns to the thread it answered.\n\nHEY answers a success with a redirect and no body, 303 to the draft: /messages/{entryId}/edit\nfor a new message, /topics/{topicId}?expanded_draft={entryId} for a reply. That Location\nis the only place HEY names the entry it called back. A generated client follows the\nredirect and reads the draft or its thread, which says the undo went through and not\nwhich entry it was; the Go, Rust, Kotlin and Swift conveniences send it without\nfollowing and answer the entry. TypeScript's client follows no redirect: there the 303\narrives as an error whose status is 303, and that status is the undo having gone through.\nWith nothing left to call back (the delay ran out and the message went, or none was held)\nHEY answers 400 and changes nothing. A scoped token needs write.\n\nNever sent again after a failure: a second undo calls back the next delayed entry.",
12891+
"operationId": "UndoTopicSend",
12892+
"parameters": [
12893+
{
12894+
"name": "topicId",
12895+
"in": "path",
12896+
"schema": {
12897+
"type": "integer",
12898+
"format": "int64"
12899+
},
12900+
"required": true
12901+
},
12902+
{
12903+
"name": "filtered_account_id",
12904+
"in": "query",
12905+
"description": "Optional account filter, an id from GetIdentity's accounts[].id. Reads that filter by account narrow to that account. Omit it to leave the filter unset, and what an unfiltered request returns depends on the operation. Some operations ignore it. To choose a sending address, use an operation's explicit sender-selection fields rather than relying on this filter. GetIdentity also lists accounts the filter does not accept, and an id HEY does not recognize or cannot use for this identity can leave the filter unset instead of returning an error.",
12906+
"required": false,
12907+
"schema": {
12908+
"type": "integer",
12909+
"format": "int64"
12910+
},
12911+
"x-hey-account-scope": true
12912+
}
12913+
],
12914+
"responses": {
12915+
"200": {
12916+
"description": "UndoTopicSend 200 response"
12917+
},
12918+
"400": {
12919+
"description": "BadRequestError 400 response",
12920+
"content": {
12921+
"application/json": {
12922+
"schema": {
12923+
"$ref": "#/components/schemas/BadRequestErrorResponseContent"
12924+
}
12925+
}
12926+
}
12927+
},
12928+
"401": {
12929+
"description": "UnauthorizedError 401 response",
12930+
"content": {
12931+
"application/json": {
12932+
"schema": {
12933+
"$ref": "#/components/schemas/UnauthorizedErrorResponseContent"
12934+
}
12935+
}
12936+
}
12937+
},
12938+
"403": {
12939+
"description": "ForbiddenError 403 response",
12940+
"content": {
12941+
"application/json": {
12942+
"schema": {
12943+
"$ref": "#/components/schemas/ForbiddenErrorResponseContent"
12944+
}
12945+
}
12946+
}
12947+
},
12948+
"404": {
12949+
"description": "NotFoundError 404 response",
12950+
"content": {
12951+
"application/json": {
12952+
"schema": {
12953+
"$ref": "#/components/schemas/NotFoundErrorResponseContent"
12954+
}
12955+
}
12956+
}
12957+
},
12958+
"500": {
12959+
"description": "InternalServerError 500 response",
12960+
"content": {
12961+
"application/json": {
12962+
"schema": {
12963+
"$ref": "#/components/schemas/InternalServerErrorResponseContent"
12964+
}
12965+
}
12966+
}
12967+
},
12968+
"503": {
12969+
"description": "ServiceUnavailableError 503 response",
12970+
"content": {
12971+
"application/json": {
12972+
"schema": {
12973+
"$ref": "#/components/schemas/ServiceUnavailableErrorResponseContent"
12974+
}
12975+
}
12976+
}
12977+
}
12978+
},
12979+
"tags": [
12980+
"Topics"
12981+
],
12982+
"x-hey-destructive": false,
12983+
"x-hey-open-world": false,
12984+
"x-hey-retry": {
12985+
"maxAttempts": 1,
12986+
"baseDelayMs": 1000,
12987+
"backoff": "exponential",
12988+
"retryOn": []
12989+
},
12990+
"x-hey-untrusted-content": false
12991+
}
12992+
},
1279012993
"/topics/{topicId}/workflows/{workflowId}/stagings": {
1279112994
"patch": {
1279212995
"description": "Move a staged topic to a workflow stage.",
@@ -16823,7 +17026,7 @@
1682317026
},
1682417027
"undo_action": {
1682517028
"type": "string",
16826-
"description": "Where to POST to call the message back, present only while delayed, and never for a\ntoken narrower than full scope: HEY offers such a token no Undo Send."
17029+
"description": "Where to POST to call the message back (UndoTopicSend), present only while delayed,\nand only for a token that can follow it: a scoped token is offered Undo Send when it\nholds write, approved since HEY widened write to cover it."
1682717030
},
1682817031
"undo_timeout": {
1682917032
"type": "integer",

‎nix/package.nix‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildGoModule.override { inherit go; } (finalAttrs: {
1818

1919
# To update: run `make update-nix-hash` (Docker). It rewrites this quoted
2020
# value in place, so keep it a string literal rather than lib.fakeHash.
21-
vendorHash = "sha256-ngm3ftP+/f/7zDmcEsCNgwAJQP/csujU+NkkIKuMP9M=";
21+
vendorHash = "sha256-AxzJD8qFMtwj8pvejPz3IJxd5+BfHmAWLcOYuynBz38=";
2222

2323
subPackages = [ "cmd/hey" ];
2424

0 commit comments

Comments
 (0)