oficina / memoria Public

Clone
git clone https://amadan.net/oficina/memoria

Plain git — no account needed to clone.

Download

Download this file

1package memoria
2
3import (
4 access "amadan.net/oficina/agent-access.git"
5 "encoding/json"
6)
7
8func noteEditContracts() []access.Operation {
9 return []access.Operation{
10 {Name: "notes_get", Description: "Read a local user-authored paste note with its current revision. Imported and sibling content is not available through this operation.", Scope: "notes:read", ReadOnly: true, Idempotent: true,
11 Input: json.RawMessage(`{"type":"object","required":["team","id"],"additionalProperties":false,"properties":{"team":{"type":"string","minLength":1},"id":{"type":"integer","minimum":1}}}`),
12 Output: json.RawMessage(`{"type":"object","required":["id","title","body","revision","url"],"additionalProperties":false,"properties":{"id":{"type":"integer","minimum":1},"title":{"type":"string"},"body":{"type":"string"},"revision":{"type":"integer","minimum":1},"url":{"type":"string"}}}`)},
13 {Name: "notes_update", Description: "Replace a local paste note using its current revision. Reuse client_id only for an identical retry. Returned revision is the originally committed revision; indexed records that update's completed indexing, not the current note's index state.", Scope: "notes:write", Idempotent: true,
14 Input: json.RawMessage(`{"type":"object","required":["team","id","client_id","expected_revision","title","body"],"additionalProperties":false,"properties":{"team":{"type":"string","minLength":1},"id":{"type":"integer","minimum":1},"client_id":{"type":"string","minLength":36,"maxLength":36},"expected_revision":{"type":"integer","minimum":1},"title":{"type":"string","minLength":1,"maxLength":512},"body":{"type":"string","minLength":1,"maxLength":1048576}}}`),
15 Output: json.RawMessage(`{"type":"object","required":["id","revision","indexed","url"],"additionalProperties":false,"properties":{"id":{"type":"integer","minimum":1},"revision":{"type":"integer","minimum":1},"indexed":{"type":"boolean"},"url":{"type":"string"}}}`)},
16 }
17}
18