Skip to content
57 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Artifacts contracts: folios, their four kinds, dashboard datasets, folio events and the artifacts scopes are typed and validated the same in TypeScript and Rust, with nothing using them yet1{
2 "about": "Cases both folio validators must agree on: folios.ts (newFolioError, folioAccessChangeError, folioAgentEditError, folioIdFrom) and crates/contracts/src/folios.rs. error null is valid; \"*\" is any error (a malformed input, which each side words its own way).",
3 "new_folio": [
4 { "input": { "kind": "doc" }, "error": null },
5 { "input": { "kind": "slides", "title": "Q4 roadmap", "space_id": "spc_1", "content": { "markdown": "<!-- slide: title -->\n# Q4" } }, "error": null },
6 { "input": { "kind": "dashboard", "content": { "spec": { "tiles": [] } }, "share_with": [{ "principal": "team:platform", "role": "view" }] }, "error": null },
7 { "input": { "kind": "design", "template_id": "tpl_1" }, "error": null },
8 { "input": { "kind": "doc", "content": { "spec": {} } }, "error": "A doc starts from markdown." },
9 { "input": { "kind": "design", "content": { "markdown": "# no" } }, "error": "A design starts from a spec." },
10 { "input": { "kind": "doc", "content": { "markdown": "# Hi" }, "template_id": "tpl_1" }, "error": "Start from a template or from content, not both." },
11 { "input": { "kind": "doc", "share_with": [{ "principal": "everyone", "role": "view" }] }, "error": "everyone is not user:, agent: or team: and an id." },
12 { "input": { "kind": "doc", "title": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, "error": "A title is at most 200 characters." },
13 { "input": { "kind": "spreadsheet" }, "error": "*" },
14 { "input": { "kind": "doc", "share_with": [{ "principal": "user:usr_1", "role": "owner" }] }, "error": "*" }
15 ],
16 "access_change": [
17 { "change": { "op": "grant", "principal": "user:usr_1", "role": "edit" }, "error": null },
18 { "change": { "op": "grant", "principal": "agent:agt_1", "role": "comment", "notify": "Have a look" }, "error": null },
19 { "change": { "op": "revoke", "principal": "team:design" }, "error": null },
20 { "change": { "op": "general", "access": "workspace", "role": "view" }, "error": null },
21 { "change": { "op": "general", "access": "none", "role": null }, "error": null },
22 { "change": { "op": "inherit", "inherit": false }, "error": null },
23 { "change": { "op": "agent_mode", "agent_mode": null }, "error": null },
24 { "change": { "op": "grant", "principal": "usr_1", "role": "edit" }, "error": "usr_1 is not user:, agent: or team: and an id." },
25 { "change": { "op": "general", "access": "link", "role": "manage" }, "error": "General access gives view, comment or edit, never full access." },
26 { "change": { "op": "general", "access": "none", "role": "view" }, "error": "Restricted takes no role." },
27 { "change": { "op": "general", "access": "workspace", "role": null }, "error": "Everyone in the workspace needs a role." },
28 { "change": { "op": "publish" }, "error": "*" },
29 { "change": { "op": "agent_mode", "agent_mode": "always" }, "error": "*" }
30 ],
31 "agent_edit": [
32 { "edit": { "kind": "doc", "target": { "kind": "append" }, "markdown": "More." }, "error": null },
33 { "edit": { "kind": "doc", "target": { "kind": "section", "heading": "Pricing" }, "markdown": "## Pricing\n…", "note": "Updated prices", "marks_current": true }, "error": null },
34 { "edit": { "kind": "slides", "ops": [{ "op": "set_theme", "theme": "night", "accent": null }] }, "error": null },
35 { "edit": { "kind": "dashboard", "ops": [{ "op": "delete_tiles", "ids": ["t1"] }], "suggest_only": true }, "error": null },
36 { "edit": "replace everything", "error": "An edit is an object." },
37 { "edit": { "kind": "sheet", "ops": [] }, "error": "There is no kind of artifact called sheet." },
38 { "edit": { "ops": [] }, "error": "There is no kind of artifact called undefined." },
39 { "edit": { "kind": "doc", "target": { "kind": "append" }, "markdown": "x", "note": 5 }, "error": "note is text." },
40 { "edit": { "kind": "doc", "target": { "kind": "append" } }, "error": "A doc edit has markdown." },
41 { "edit": { "kind": "doc", "markdown": "x", "target": { "kind": "append" }, "ops": [] }, "error": "A doc edit has a target and markdown, not ops." },
42 { "edit": { "kind": "doc", "markdown": "x" }, "error": "A doc edit has a target." },
43 { "edit": { "kind": "doc", "markdown": "x", "target": { "kind": "section" } }, "error": "A section target names its heading." },
44 { "edit": { "kind": "doc", "markdown": "x", "target": { "kind": "blocks", "from_block": "a" } }, "error": "A blocks target names from_block and to_block." },
45 { "edit": { "kind": "doc", "markdown": "x", "target": { "kind": "line" } }, "error": "A doc edit's target is append, document, section or blocks." },
46 { "edit": { "kind": "slides", "markdown": "# x" }, "error": "A deck edit has ops, not a target and markdown." },
47 { "edit": { "kind": "design", "ops": [] }, "error": "A design edit has a list of ops." },
48 { "edit": { "kind": "dashboard", "ops": ["delete everything"] }, "error": "Each op is an object with an op." }
49 ],
50 "folio_ids": [
51 { "segment": "q4-roadmap-fol_01jb2k7x9hfq0b3zj0f5s2m8ra", "id": "fol_01jb2k7x9hfq0b3zj0f5s2m8ra" },
52 { "segment": "fol_01jb2k7x9hfq0b3zj0f5s2m8ra", "id": "fol_01jb2k7x9hfq0b3zj0f5s2m8ra" },
53 { "segment": "q4-roadmap-pag_01jb2k7x9hfq0b3zj0f5s2m8ra", "id": null },
54 { "segment": "fol_01jb2k7x9hfq0b3zj0f5s2m8rI", "id": null },
55 { "segment": "templates", "id": null }
56 ]
57}