@graview/core 0.1.69 → 0.1.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/dist/app-places.d.ts.map +1 -1
  2. package/dist/app-places.js +11 -0
  3. package/dist/app-places.js.map +1 -1
  4. package/dist/catalog.js +1 -1
  5. package/dist/catalog.js.map +1 -1
  6. package/dist/cli/check/hidden-reads.d.ts.map +1 -1
  7. package/dist/cli/check/hidden-reads.js +7 -0
  8. package/dist/cli/check/hidden-reads.js.map +1 -1
  9. package/dist/cli/describe.d.ts.map +1 -1
  10. package/dist/cli/describe.js +8 -1
  11. package/dist/cli/describe.js.map +1 -1
  12. package/dist/cli/doctor.d.ts +1 -1
  13. package/dist/cli/doctor.d.ts.map +1 -1
  14. package/dist/cli/doctor.js +15 -2
  15. package/dist/cli/doctor.js.map +1 -1
  16. package/dist/cli/index.d.ts +1 -1
  17. package/dist/cli/index.d.ts.map +1 -1
  18. package/dist/css/fonts.d.ts +31 -0
  19. package/dist/css/fonts.d.ts.map +1 -0
  20. package/dist/css/fonts.js +62 -0
  21. package/dist/css/fonts.js.map +1 -0
  22. package/dist/css/sanitize.d.ts.map +1 -1
  23. package/dist/css/sanitize.js +77 -7
  24. package/dist/css/sanitize.js.map +1 -1
  25. package/dist/css/tables.d.ts.map +1 -1
  26. package/dist/css/tables.js +2 -0
  27. package/dist/css/tables.js.map +1 -1
  28. package/dist/css.d.ts +2 -0
  29. package/dist/css.d.ts.map +1 -1
  30. package/dist/css.js +1 -0
  31. package/dist/css.js.map +1 -1
  32. package/dist/document/act-findings.d.ts.map +1 -1
  33. package/dist/document/act-findings.js +62 -1
  34. package/dist/document/act-findings.js.map +1 -1
  35. package/dist/document/blocks.d.ts.map +1 -1
  36. package/dist/document/blocks.js +5 -1
  37. package/dist/document/blocks.js.map +1 -1
  38. package/dist/document/brand-check.d.ts +8 -1
  39. package/dist/document/brand-check.d.ts.map +1 -1
  40. package/dist/document/brand-check.js +28 -2
  41. package/dist/document/brand-check.js.map +1 -1
  42. package/dist/document/brand.d.ts.map +1 -1
  43. package/dist/document/brand.js +4 -1
  44. package/dist/document/brand.js.map +1 -1
  45. package/dist/document/compile-checked.d.ts.map +1 -1
  46. package/dist/document/compile-checked.js +2 -1
  47. package/dist/document/compile-checked.js.map +1 -1
  48. package/dist/document/compile.d.ts.map +1 -1
  49. package/dist/document/compile.js +9 -6
  50. package/dist/document/compile.js.map +1 -1
  51. package/dist/document/compiled.d.ts.map +1 -1
  52. package/dist/document/compiled.js +36 -9
  53. package/dist/document/compiled.js.map +1 -1
  54. package/dist/document/design-findings.d.ts.map +1 -1
  55. package/dist/document/design-findings.js +8 -2
  56. package/dist/document/design-findings.js.map +1 -1
  57. package/dist/document/diff.js +5 -1
  58. package/dist/document/diff.js.map +1 -1
  59. package/dist/document/edit.d.ts.map +1 -1
  60. package/dist/document/edit.js +97 -11
  61. package/dist/document/edit.js.map +1 -1
  62. package/dist/document/expr/analyze.d.ts.map +1 -1
  63. package/dist/document/expr/analyze.js +11 -3
  64. package/dist/document/expr/analyze.js.map +1 -1
  65. package/dist/document/expr/evaluate.d.ts +2 -0
  66. package/dist/document/expr/evaluate.d.ts.map +1 -1
  67. package/dist/document/expr/evaluate.js +46 -8
  68. package/dist/document/expr/evaluate.js.map +1 -1
  69. package/dist/document/expr/index.d.ts +1 -0
  70. package/dist/document/expr/index.d.ts.map +1 -1
  71. package/dist/document/expr/index.js +1 -0
  72. package/dist/document/expr/index.js.map +1 -1
  73. package/dist/document/expr/parse.d.ts.map +1 -1
  74. package/dist/document/expr/parse.js +7 -3
  75. package/dist/document/expr/parse.js.map +1 -1
  76. package/dist/document/expr/subject.d.ts +24 -0
  77. package/dist/document/expr/subject.d.ts.map +1 -0
  78. package/dist/document/expr/subject.js +21 -0
  79. package/dist/document/expr/subject.js.map +1 -0
  80. package/dist/document/expr/typing.d.ts.map +1 -1
  81. package/dist/document/expr/typing.js +6 -2
  82. package/dist/document/expr/typing.js.map +1 -1
  83. package/dist/document/guard-names.d.ts +11 -0
  84. package/dist/document/guard-names.d.ts.map +1 -0
  85. package/dist/document/guard-names.js +185 -0
  86. package/dist/document/guard-names.js.map +1 -0
  87. package/dist/document/rule-reads.d.ts.map +1 -1
  88. package/dist/document/rule-reads.js +7 -1
  89. package/dist/document/rule-reads.js.map +1 -1
  90. package/dist/document/schema.d.ts +20 -0
  91. package/dist/document/schema.d.ts.map +1 -1
  92. package/dist/document/schema.js +5 -1
  93. package/dist/document/schema.js.map +1 -1
  94. package/dist/document/template.d.ts +2 -0
  95. package/dist/document/template.d.ts.map +1 -1
  96. package/dist/document/template.js +5 -1
  97. package/dist/document/template.js.map +1 -1
  98. package/dist/document/views.d.ts.map +1 -1
  99. package/dist/document/views.js +4 -0
  100. package/dist/document/views.js.map +1 -1
  101. package/dist/document.schema.json +41 -2
  102. package/dist/field-sight.js +3 -3
  103. package/dist/field-sight.js.map +1 -1
  104. package/dist/graph/graph.d.ts +13 -0
  105. package/dist/graph/graph.d.ts.map +1 -1
  106. package/dist/graph/graph.js +13 -5
  107. package/dist/graph/graph.js.map +1 -1
  108. package/dist/history.d.ts +15 -0
  109. package/dist/history.d.ts.map +1 -1
  110. package/dist/history.js +5 -0
  111. package/dist/history.js.map +1 -1
  112. package/dist/import/rows.js +2 -2
  113. package/dist/import/rows.js.map +1 -1
  114. package/dist/index.d.ts +5 -2
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +2 -1
  117. package/dist/index.js.map +1 -1
  118. package/dist/mutations/define-mutation.d.ts +6 -0
  119. package/dist/mutations/define-mutation.d.ts.map +1 -1
  120. package/dist/mutations/define-mutation.js +23 -8
  121. package/dist/mutations/define-mutation.js.map +1 -1
  122. package/dist/mutations/keep-link.js +2 -2
  123. package/dist/mutations/keep-link.js.map +1 -1
  124. package/dist/mutations/types.d.ts +8 -0
  125. package/dist/mutations/types.d.ts.map +1 -1
  126. package/dist/ops/declines.d.ts +33 -4
  127. package/dist/ops/declines.d.ts.map +1 -1
  128. package/dist/ops/declines.js +73 -5
  129. package/dist/ops/declines.js.map +1 -1
  130. package/dist/ops/digest.d.ts +1 -1
  131. package/dist/ops/digest.d.ts.map +1 -1
  132. package/dist/ops/digest.js +4 -4
  133. package/dist/ops/digest.js.map +1 -1
  134. package/dist/ops/lineage.d.ts +16 -1
  135. package/dist/ops/lineage.d.ts.map +1 -1
  136. package/dist/ops/lineage.js +8 -1
  137. package/dist/ops/lineage.js.map +1 -1
  138. package/dist/ops/log.d.ts.map +1 -1
  139. package/dist/ops/log.js +5 -2
  140. package/dist/ops/log.js.map +1 -1
  141. package/dist/ops/tidying.d.ts +55 -0
  142. package/dist/ops/tidying.d.ts.map +1 -1
  143. package/dist/ops/tidying.js +21 -0
  144. package/dist/ops/tidying.js.map +1 -1
  145. package/dist/ops/types.d.ts +21 -0
  146. package/dist/ops/types.d.ts.map +1 -1
  147. package/dist/ops/undo.d.ts.map +1 -1
  148. package/dist/ops/undo.js +2 -1
  149. package/dist/ops/undo.js.map +1 -1
  150. package/dist/ops/withheld.d.ts.map +1 -1
  151. package/dist/ops/withheld.js +2 -1
  152. package/dist/ops/withheld.js.map +1 -1
  153. package/dist/permissions/policy.d.ts +55 -0
  154. package/dist/permissions/policy.d.ts.map +1 -1
  155. package/dist/permissions/policy.js +97 -6
  156. package/dist/permissions/policy.js.map +1 -1
  157. package/dist/permissions/sight.js +3 -3
  158. package/dist/permissions/sight.js.map +1 -1
  159. package/dist/scaffold/project.d.ts.map +1 -1
  160. package/dist/scaffold/project.js +38 -11
  161. package/dist/scaffold/project.js.map +1 -1
  162. package/dist/scaffold/ui.js +1 -1
  163. package/dist/seen.js +2 -2
  164. package/dist/seen.js.map +1 -1
  165. package/dist/store.d.ts +76 -0
  166. package/dist/store.d.ts.map +1 -1
  167. package/dist/store.js +262 -17
  168. package/dist/store.js.map +1 -1
  169. package/dist/suggestions-may-wait.d.ts +10 -0
  170. package/dist/suggestions-may-wait.d.ts.map +1 -0
  171. package/dist/suggestions-may-wait.js +16 -0
  172. package/dist/suggestions-may-wait.js.map +1 -0
  173. package/dist/theme/fonts.d.ts.map +1 -1
  174. package/dist/theme/fonts.js +2 -0
  175. package/dist/theme/fonts.js.map +1 -1
  176. package/dist/theme/types.d.ts +27 -3
  177. package/dist/theme/types.d.ts.map +1 -1
  178. package/dist/theme/types.js.map +1 -1
  179. package/dist/tidying.d.ts +50 -4
  180. package/dist/tidying.d.ts.map +1 -1
  181. package/dist/tidying.js +389 -7
  182. package/dist/tidying.js.map +1 -1
  183. package/dist/version.d.ts +1 -1
  184. package/dist/version.js +1 -1
  185. package/dist/viewer-state.d.ts +23 -0
  186. package/dist/viewer-state.d.ts.map +1 -0
  187. package/dist/viewer-state.js +2 -0
  188. package/dist/viewer-state.js.map +1 -0
  189. package/dist/views/display-options.d.ts +59 -0
  190. package/dist/views/display-options.d.ts.map +1 -0
  191. package/dist/views/display-options.js +9 -0
  192. package/dist/views/display-options.js.map +1 -0
  193. package/dist/views/types.d.ts +6 -0
  194. package/dist/views/types.d.ts.map +1 -1
  195. package/dist/who.d.ts +1 -1
  196. package/dist/who.d.ts.map +1 -1
  197. package/dist/who.js +8 -0
  198. package/dist/who.js.map +1 -1
  199. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/theme/types.ts"],"names":[],"mappings":"AAmPA,MAAM,CAAC,MAAM,UAAU,GAAwB;IAC7C,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,sBAAsB,EAAE;IACzF,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,8BAA8B,EAAE;IACtG,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,I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,EAAE,GAAG,EAAE,KAAK,EAAE,yBAAyB,EAAE;IAC7F,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,yBAAyB,EAAE;IAC9E,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC3F,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC5E,0EAA0E;IAC1E,iEAAiE;IACjE,EAAE,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE;CACrF,CAAC"}
package/dist/tidying.d.ts CHANGED
@@ -4,14 +4,14 @@ import { type Lineage } from "./ops/lineage.js";
4
4
  import type { Policy } from "./permissions/types.js";
5
5
  import type { AnyMutationDefinition } from "./mutations/types.js";
6
6
  import { type Dismissal, type Suggestion } from "./ops/suggestions.js";
7
- import { type Decline } from "./ops/tidying.js";
7
+ import { type Decline, type ServedStops } from "./ops/tidying.js";
8
8
  import type { Author, Operation, Via } from "./ops/types.js";
9
9
  import type { Principal } from "./permissions/types.js";
10
10
  import type { AnySchema } from "./schema/schema.js";
11
11
  import type { ApplyOptions, ApplyResult, Store } from "./store.js";
12
- export { tidyingOf, tidyingRefusal } from "./ops/tidying.js";
13
- export { declinedIn, declinesIn, keptDeclines, meaningKey, suggestionKey } from "./ops/declines.js";
14
- export type { Decline, KeptDecline } from "./ops/tidying.js";
12
+ export { isTidyingActor, tidyingOf, tidyingRefusal } from "./ops/tidying.js";
13
+ export { declinedIn, declinesIn, keptDeclines, meaningKey, stoppedIn, suggestionKey, suggestionKind } from "./ops/declines.js";
14
+ export type { Decline, KeptDecline, KeptStop, ServedStops } from "./ops/tidying.js";
15
15
  export type { ActMeanings } from "./ops/tidying.js";
16
16
  export { isDismissed, suggestionsIn, takenIn, tallyOf, votesIn } from "./ops/suggestions.js";
17
17
  export type { Dismissal, DismissalStore, Suggestion, SuggestionItem, SuggestionTally, WaitingOptions } from "./ops/suggestions.js";
@@ -65,6 +65,37 @@ export declare function suggest<S extends AnySchema>(store: Store<S>, calls: rea
65
65
  * out for them alone.
66
66
  */
67
67
  export declare function suggestions<S extends AnySchema>(store: Store<S>, principal?: Principal, options?: SuggestionsOptions): readonly Suggestion[];
68
+ /**
69
+ * THE STOP THAT ANSWERS THESE CALLS, every one of them, or undefined (`stoppedIn`):
70
+ * what the app's own tidying actor asks before it suggests (`dream`, `suggest`).
71
+ * Not `declined`: a workflow or a chat agent asking that is told nothing of a stop.
72
+ */
73
+ export declare function stoppedKind(store: Pick<Store<AnySchema>, "log">, calls: readonly MutationCall[]): Decline | undefined;
74
+ /** A kind of thing a person said not to suggest, as `stoppedSuggestions` lists it. */
75
+ export interface StoppedSuggestions {
76
+ /** The batch of the decline that said so: `store.undo` of it lets that kind be suggested again, even after a checkpoint archived it. */
77
+ readonly batch: string;
78
+ /** What was stopped, in the words it was stopped with. */
79
+ readonly words: string;
80
+ }
81
+ /**
82
+ * WHAT PEOPLE SAID NOT TO SUGGEST, and still stands (Roadmap
83
+ * f-inbox-needs-you-first), each with the batch to take back, so a person who
84
+ * changes their mind long after Activity has moved on has a way back. Read as
85
+ * `principal` may, when one is named, or as the seat a seat's view is of: an
86
+ * op withheld from them is not listed, and neither is a stop a checkpoint
87
+ * keeps that names what they may not see. A page served by a host holds only
88
+ * a tail of the log and no checkpoint: what the host says of the rest
89
+ * (`Store.stopsServed`, `servedStops`) is listed with it.
90
+ */
91
+ export declare function stoppedSuggestions<S extends AnySchema>(store: Store<S>, principal?: Principal): readonly StoppedSuggestions[];
92
+ /**
93
+ * WHAT A HOST TELLS A SEAT OF THE STOPS STANDING (`stops` and `stoppedKinds` on
94
+ * the wire's state and welcome): each it may lift and may be told of, and of the
95
+ * rest, only the kinds of suggestions it is served, so its tray and its bell
96
+ * agree with the store. Undefined where there is nothing to say.
97
+ */
98
+ export declare function servedStops<S extends AnySchema>(store: Store<S>, principal: Principal): ServedStops | undefined;
68
99
  /**
69
100
  * WHETHER THIS SEAT MAY DECIDE A SUGGESTION (Roadmap f-suggestion-votes):
70
101
  * the store would let them make its change — every call of it permitted
@@ -123,6 +154,21 @@ export declare function proposalWords(schema: AnySchema, graph: {
123
154
  * to the app's own actor from now on. Undone, it waits again.
124
155
  */
125
156
  export declare function declineSuggestion<S extends AnySchema>(store: Store<S>, id: string, options?: ApplyOptions): SuggestionAnswer<S>;
157
+ /** What a suggestion's kinds are, in words: "changes to the note of tasks", "“in chapter” links". */
158
+ export declare function suggestionKindWords<S extends AnySchema>(store: Store<S>, suggestion: Pick<Suggestion, "calls">): string;
159
+ /** Whether this seat may say "Don't suggest this kind of thing" of this suggestion: what the store would answer (`stopRefusal`). */
160
+ export declare function mayStopSuggesting<S extends AnySchema>(store: Store<S>, suggestion: Pick<Suggestion, "calls" | "author" | "lineage">, principal?: Principal): boolean;
161
+ /**
162
+ * "DON'T SUGGEST THIS KIND OF THING" (Roadmap f-inbox-needs-you-first): a
163
+ * decline of this suggestion that answers its kind as well
164
+ * (`suggestionKind`). Whatever else the app's own tidying actor has waiting of
165
+ * that kind leaves every tray with it, and it is refused that kind from now on
166
+ * (`stoppedKind`), kept in the log, and by a checkpoint, as every decline is.
167
+ * A workflow and a chat agent are told nothing of it. Undone, all of it waits
168
+ * again and the actor may suggest it. The store judges who may say so
169
+ * (`mayStopSuggesting`), and says the kind in its words.
170
+ */
171
+ export declare function stopSuggesting<S extends AnySchema>(store: Store<S>, id: string, options?: ApplyOptions): ApplyResult<S>;
126
172
  /**
127
173
  * WITHDRAW A SUGGESTION ITS MAKER NO LONGER STANDS BY (Roadmap
128
174
  * f-withdraw-own-suggestions):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ROPOSE_CHANGES } from "./mutations/propose-changes.js";
38
38
  import { permittedMutations, proposes, subjectKinds } from "./permissions/policy.js";
39
39
  import { expired, suggestionsIn, votesIn } from "./ops/suggestions.js";
40
- import { DECLINES, isAutomated } from "./ops/tidying.js";
41
- import { declinedIn, declinesIn, keptDeclines, meaningKey } from "./ops/declines.js";
40
+ import { DECLINES, isAutomated, isStopOp, isTidyingActor } from "./ops/tidying.js";
41
+ import { declinedIn, declinesIn, isLiftOp, KIND_MARK, keptDeclines, meaningKey, stoppedIn, suggestionKind } from "./ops/declines.js";
42
42
  import { seatOf } from "./seat-of.js";
43
43
  import { EMPTY_DIFF } from "./graph/diff.js";
44
44
  import { ARCHIVED } from "./graph/archived.js";
45
- import { nounOf, pluralOf } from "./schema/define-node.js";
46
- export { tidyingOf, tidyingRefusal } from "./ops/tidying.js";
47
- export { declinedIn, declinesIn, keptDeclines, meaningKey, suggestionKey } from "./ops/declines.js";
45
+ import { nameInPassing } from "./capital.js";
46
+ import { namesUnseen } from "./ops/withheld.js";
47
+ import { actingAs, permits as permitsOf, profileOf } from "./permissions/policy.js";
48
+ import { seatLens } from "./seen.js";
49
+ import { fieldInPassing, nounOf, pluralOf } from "./schema/define-node.js";
50
+ import { humanizeField } from "./schema/humanize.js";
51
+ import { derivedActOf } from "./mutations/derived-names.js";
52
+ import { spellingOf } from "./mutations/act-spelling.js";
53
+ export { isTidyingActor, tidyingOf, tidyingRefusal } from "./ops/tidying.js";
54
+ export { declinedIn, declinesIn, keptDeclines, meaningKey, stoppedIn, suggestionKey, suggestionKind } from "./ops/declines.js";
48
55
  export { isDismissed, suggestionsIn, takenIn, tallyOf, votesIn } from "./ops/suggestions.js";
49
56
  export { advisoryVoterOf, SIGN_IN_TO_VOTE, signedOutSeat } from "./mutations/vote-suggestion.js";
50
57
  export { digestWords, foldDigests, isSuggestionBatch, typedRowWords } from "./ops/digest.js";
@@ -55,7 +62,212 @@ export { LEFT_ALONE } from "./graph/archived.js";
55
62
  * checkpoint it begins at, and a checkpoint keeps them (`Epoch.declines`).
56
63
  */
57
64
  DECLINES.declined = declinedIn;
58
- DECLINES.kept = (ops, meanings, kept) => keptDeclines(declinesIn(ops, meanings, kept));
65
+ DECLINES.kept = (ops, meanings, kept) => keptDeclines(declinesIn(ops, meanings, kept), ops, meanings);
66
+ DECLINES.stopped = stoppedIn;
67
+ /*
68
+ * A STOP LIFTED BEHIND A CHECKPOINT undoes an op the log no longer holds, so the
69
+ * log cannot vouch for it. What the checkpoint kept of it can: told to the seat
70
+ * that lifted it, and to a seat it names nothing kept from.
71
+ */
72
+ DECLINES.liftTold = (op, seeing) => {
73
+ const lens = seeing;
74
+ const log = lens.timeline?.log;
75
+ if (!log?.get || !isLiftOp(op, (id) => log.get(id) !== undefined))
76
+ return false;
77
+ if (lens.actor !== undefined && actingAs(op.author).id === lens.actor)
78
+ return true;
79
+ const stop = Object.values(log.horizonEpoch?.()?.declines ?? {}).find((one) => one.id === op.undoes)?.stop;
80
+ return stop !== undefined && !callsNameKept(stop.calls, lens);
81
+ };
82
+ /**
83
+ * WHETHER CALLS NAME WHAT IS KEPT FROM A SEAT, as `redact` would judge the op that
84
+ * held them: any string at any depth that is a record it may not see, and any
85
+ * field its sight keeps of the record they are about.
86
+ */
87
+ function callsNameKept(calls, lens) {
88
+ return calls.some((call) => {
89
+ const args = (call.args ?? {});
90
+ if (namesUnseen(args, lens.sees))
91
+ return true;
92
+ const id = args["id"];
93
+ const kind = typeof id === "string" ? lens.kindOf(id) : undefined;
94
+ const kept = kind && lens.kept?.({ id: id, kind });
95
+ return kept ? Object.keys(args).some((key) => key !== "id" && kept(key)) : false;
96
+ });
97
+ }
98
+ DECLINES.lift = (store, ids, options, author) => {
99
+ const whole = store;
100
+ const stop = keptStopOf(whole, ids);
101
+ return stop && liftKept(whole, stop, options, author);
102
+ };
103
+ DECLINES.liftRefusal = (store, ids, author) => {
104
+ const whole = store;
105
+ const stop = keptStopOf(whole, ids);
106
+ if (!stop)
107
+ return undefined;
108
+ const refusal = keptLiftRefusal(whole, stop, author);
109
+ return refusal ? { refusal } : {};
110
+ };
111
+ /*
112
+ * THE LIFTING OF A STOP BEHIND A CHECKPOINT has nothing left to put back: a
113
+ * person stops the kind again, the next time it is suggested. And lifting a
114
+ * stop, or putting one back, is whoever may decide what it was about: what it
115
+ * took back changed nothing, so nothing else would ask.
116
+ */
117
+ DECLINES.undoRefusal = (store, ops, author) => {
118
+ const whole = store;
119
+ for (const target of ops) {
120
+ if (isLiftOp(target, (id) => whole.log.get(id) !== undefined))
121
+ return { mutation: "undo", wouldNeed: [], message: `"${target.intent}" cannot be taken back: it may be suggested again now, and can be stopped again then.` };
122
+ let root = target;
123
+ let stops = false;
124
+ for (let at = target; at !== undefined; at = at.undoes === undefined ? undefined : whole.log.get(at.undoes)) {
125
+ root = at;
126
+ stops ||= isStopOp(at, at.undoes === undefined ? undefined : whole.log.get(at.undoes));
127
+ }
128
+ if (!stops)
129
+ continue;
130
+ // Its suggestion gone to the archive, what the checkpoint kept of the stop says what it was; with neither, nothing can vouch for this seat.
131
+ const calls = root.suggests ?? Object.values(whole.log.horizonEpoch()?.declines ?? {}).find((one) => one.id === target.id || one.id === root.id)?.stop?.calls;
132
+ const why = calls ? liftRefusal(whole, calls, author) : author.kind === "system" ? undefined : { mutation: "undo", wouldNeed: [], message: "Only somebody who may make these changes can let them be suggested again." };
133
+ if (why)
134
+ return why;
135
+ }
136
+ return undefined;
137
+ };
138
+ /** What is worked out once for each graph tick: a tray asks it of every row, again on every draw. */
139
+ const TICKS = new WeakMap();
140
+ function onceATick(whole, key, work) {
141
+ let tick = TICKS.get(whole);
142
+ if (tick?.length !== whole.log.length)
143
+ TICKS.set(whole, (tick = { length: whole.log.length, held: new Map() }));
144
+ if (!tick.held.has(key))
145
+ tick.held.set(key, work());
146
+ return tick.held.get(key);
147
+ }
148
+ /** A seat, as what it may do and see is keyed by: two profiles of one account are two seats. */
149
+ const seatKey = (who) => JSON.stringify([who.kind, who.id, who.roles, who.onBehalfOf?.id, who.onBehalfOf?.roles, who.shared, profileOf(who)?.id]);
150
+ /** An id no record has, for asking what a grant says of any record of a kind. */
151
+ const NO_RECORD = "\u0000no-such-record";
152
+ /** What a derived act that takes a record out or folds it away is: riding the making of a kind, it reaches only what the seat made. */
153
+ const UNMAKES = new Set(["remove", "archive", "unarchive", "merge"]);
154
+ /**
155
+ * WHETHER THIS SEAT'S GRANTS REACH ANY RECORD OF A KIND, read from the policy
156
+ * rather than the records: the same `permits` the act asks, about a record that
157
+ * is nobody's, on the kind, its far end nobody's either. A grant limited to a
158
+ * seat's own record, its own end of a link or what it made says no; one over the
159
+ * kind says yes, whichever kinds it is drawn on (the store, asked of an id it does
160
+ * not hold, says no kind, which a grant drawn by kind refuses).
161
+ */
162
+ function grantsReachAny(whole, call, kind, who) {
163
+ const store = keptOf(whole);
164
+ const act = store.mutations.get(call.name);
165
+ if (!act?.subject)
166
+ return true;
167
+ return permitsOf(store.policy, who, call.name, kind, store.viaOf(act, call, who), NO_RECORD, {}, () => [NO_RECORD], act.derived ? () => undefined : undefined, act.derived !== undefined && UNMAKES.has(act.derived.act)).ok;
168
+ }
169
+ /**
170
+ * WHETHER THIS SEAT MAY DECIDE THESE CALLS' KINDS, on every record of them: a
171
+ * stop speaks for a kind. Mostly the policy answers: a grant that does not reach
172
+ * any record refuses at once, including a seat that happens to hold every record
173
+ * there is today. What the policy cannot say, the records do, walked once a graph
174
+ * tick for each kind and seat: where this seat's sight keeps records from it, and
175
+ * an act that carries a value across a link, judged on each far record.
176
+ */
177
+ function decidesKinds(whole, calls, author) {
178
+ const store = keptOf(whole);
179
+ const meanings = store.actMeanings();
180
+ const seat = seatKey(author);
181
+ return calls.every((call) => {
182
+ if (!whole.permits(call, author).ok)
183
+ return false;
184
+ return onceATick(whole, `decides|${seat}|${suggestionKind(call, meanings)}`, () => {
185
+ const act = store.mutations.get(call.name) ?? store.mutations.get(spellingOf(call.name));
186
+ const subject = act?.subject;
187
+ if (!subject)
188
+ return true;
189
+ const kinds = subject.kinds === "*" ? [undefined] : [subject.kinds].flat();
190
+ if (!kinds.every((kind) => grantsReachAny(whole, call, kind, author)))
191
+ return false;
192
+ const walk = act.writesLinked !== undefined || seatLens(whole, author).hides?.() !== false;
193
+ if (!walk)
194
+ return true;
195
+ return kinds.every((kind) => (kind === undefined ? [] : whole.graph.nodesOfKind(kind, { archived: "all" })).every((node) => whole.permits({ ...call, args: { ...call.args, [subject.arg]: node.id } }, author).ok));
196
+ });
197
+ });
198
+ }
199
+ /** Why this seat may not lift a stop of these calls, or nothing: whoever may make them may. */
200
+ function liftRefusal(whole, calls, author) {
201
+ if (decidesKinds(whole, calls, author))
202
+ return undefined;
203
+ return { mutation: "undo", wouldNeed: [], message: "Only somebody who may make these changes can let them be suggested again." };
204
+ }
205
+ /** Why this seat may not lift a stop only a checkpoint keeps, or nothing: as any stop, and it may not be one the seat is kept from. */
206
+ function keptLiftRefusal(whole, kept, author) {
207
+ const lens = seatLens(whole, author);
208
+ if (lens.hides?.() !== false && callsNameKept(kept.stop.calls, lens))
209
+ return { mutation: "undo", wouldNeed: [], message: "Only somebody who may make these changes can let them be suggested again." };
210
+ return liftRefusal(whole, kept.stop.calls, author);
211
+ }
212
+ /** The stop a checkpoint alone keeps, when these batches are that one stop's: its op has gone to the archive, so the log cannot be asked. */
213
+ function keptStopOf(whole, ids) {
214
+ if (ids.length !== 1)
215
+ return undefined;
216
+ const served = whole.stopsServed?.stops.find((one) => one.batch === ids[0]);
217
+ // The host says this seat may lift it; the page's own log does not hold it. The host judges the undo.
218
+ if (served && !whole.log.all().some((op) => op.batch === served.batch))
219
+ return { id: `served:${served.batch}`, at: "", author: { kind: "system" }, stop: { batch: served.batch, words: served.words, calls: [] } };
220
+ const declines = whole.log.horizonEpoch()?.declines;
221
+ if (!declines)
222
+ return undefined;
223
+ const lifted = new Set(whole.log.all().flatMap((op) => (op.undoes !== undefined ? [op.undoes] : [])));
224
+ return Object.values(declines).find((one) => one.stop?.batch === ids[0] && !lifted.has(one.id) && whole.log.get(one.id) === undefined);
225
+ }
226
+ /**
227
+ * A STOP LIFTED AFTER ITS OP WAS ARCHIVED: an op that changes nothing and
228
+ * undoes the archived one (`lineage.liftedStop`), which `declinesIn` reads as
229
+ * no longer standing, so a client's ordinary undo of the batch it was told does
230
+ * it, and the next checkpoint leaves it out.
231
+ */
232
+ function liftKept(whole, kept, options, author) {
233
+ const store = keptOf(whole);
234
+ const refused = keptLiftRefusal(whole, kept, author);
235
+ if (refused)
236
+ store.refuse(refused, author.id, true);
237
+ const before = whole.violations();
238
+ const op = {
239
+ id: store.nextId(),
240
+ seq: whole.log.length,
241
+ batch: options.batch ?? store.mintBatch("undo"),
242
+ author,
243
+ intent: `Undo: ${kept.stop.words}`,
244
+ ...given("batchIntent", options.intent),
245
+ mutation: null,
246
+ primitives: [],
247
+ reads: [],
248
+ writes: [],
249
+ at: store.now(),
250
+ undoes: kept.id,
251
+ ...given("via", options.via),
252
+ lineage: { basis: "A person let this kind of thing be suggested again", liftedStop: true },
253
+ };
254
+ whole.log.append(op);
255
+ if (whole.stopsServed)
256
+ whole.stopsServed = { ...whole.stopsServed, stops: whole.stopsServed.stops.filter((one) => one.batch !== kept.stop.batch) };
257
+ whole.notify(EMPTY_DIFF, [op]);
258
+ return { batch: op.batch, ops: [op], diff: EMPTY_DIFF, primitives: [], reads: [], writes: [], intent: op.intent, ...store.moved(before, before), violationsAfter: before };
259
+ }
260
+ DECLINES.stopRefusal = (store, targets, author) => {
261
+ const whole = store;
262
+ if (targets.length === 0 || targets.some((op) => !op.suggests))
263
+ return "Only a suggestion can be answered with not suggesting that kind of thing.";
264
+ for (const op of targets) {
265
+ const why = stopRefusal(whole, op.suggests, op.author, op.lineage, author);
266
+ if (why)
267
+ return why;
268
+ }
269
+ return undefined;
270
+ };
59
271
  const keptOf = (store) => store;
60
272
  const given = (key, value) => (value === undefined ? {} : { [key]: value });
61
273
  /**
@@ -87,6 +299,9 @@ export function suggest(store, calls, options) {
87
299
  if (waiting)
88
300
  return whole.log.get(waiting.id);
89
301
  kept.refuseDeclined(calls, author);
302
+ // What a person said not to suggest is said to the app's own tidying actor, not a workflow they set going or a chat agent (`isTidyingActor`).
303
+ if (isTidyingActor(author))
304
+ kept.refuseStopped(calls, author, true);
90
305
  const rehearsal = kept.rehearsal();
91
306
  rehearsal.suggesting = true;
92
307
  const planned = rehearsal.applying(calls, { author, lineage, ...given("via", options.via) });
@@ -133,7 +348,104 @@ export function suggestions(store, principal, options = {}) {
133
348
  const who = principal ?? seat?.principal;
134
349
  // A seat that sees everything is handed the store itself.
135
350
  const ops = (who !== undefined ? whole.seenBy(who) : whole).log.all();
136
- return suggestionsIn(ops, (id) => whole.graph.has(id), { now: keptOf(whole).now(), dismissed: options.dismissed, voter: who });
351
+ const waiting = suggestionsIn(ops, (id) => whole.graph.has(id), { now: keptOf(whole).now(), dismissed: options.dismissed, voter: who });
352
+ // Of a kind a person said not to suggest: gone from every tray, and back if that is undone. A person's proposal is a person's, and still waits.
353
+ const stops = new Set(stoppedKindsOf(whole).keys());
354
+ for (const kind of whole.stopsServed?.kinds ?? [])
355
+ stops.add(kind);
356
+ for (const one of servedStanding(whole))
357
+ for (const kind of one.kinds)
358
+ stops.add(kind);
359
+ if (stops.size === 0)
360
+ return waiting;
361
+ const meanings = keptOf(whole).actMeanings();
362
+ return waiting.filter((one) => !isTidyingActor(one.author) || isProposal(one) || !one.calls.every((call) => stops.has(suggestionKind(call, meanings))));
363
+ }
364
+ /**
365
+ * THE STOP THAT ANSWERS THESE CALLS, every one of them, or undefined (`stoppedIn`):
366
+ * what the app's own tidying actor asks before it suggests (`dream`, `suggest`).
367
+ * Not `declined`: a workflow or a chat agent asking that is told nothing of a stop.
368
+ */
369
+ export function stoppedKind(store, calls) {
370
+ const kept = store;
371
+ return stoppedIn(store.log.all(), calls, typeof kept.actMeanings === "function" ? kept.actMeanings() : undefined, store.log.horizonEpoch()?.declines);
372
+ }
373
+ /** What the host said of stops, less any the log now holds as taken back: it said so before that landed. */
374
+ function servedStanding(whole) {
375
+ const said = whole.stopsServed?.stops ?? [];
376
+ if (said.length === 0)
377
+ return said;
378
+ const undone = whole.log.undoneIds();
379
+ return said.filter((one) => !whole.log.all().some((op) => op.batch === one.batch && undone.has(op.id)));
380
+ }
381
+ /** The kinds of thing people said not to suggest that still stand, each with the decline that said so; looked for only where a log or its checkpoint holds any. */
382
+ function stoppedKindsOf(whole) {
383
+ const ops = whole.log.all();
384
+ const kept = whole.log.horizonEpoch()?.declines;
385
+ if (!ops.some((op) => op.lineage?.stopsKind === true) && !Object.keys(kept ?? {}).some((key) => key.startsWith(KIND_MARK)))
386
+ return new Map();
387
+ return new Map([...declinesIn(ops, keptOf(whole).actMeanings(), kept)].filter(([key]) => key.startsWith(KIND_MARK)));
388
+ }
389
+ /**
390
+ * WHAT PEOPLE SAID NOT TO SUGGEST, and still stands (Roadmap
391
+ * f-inbox-needs-you-first), each with the batch to take back, so a person who
392
+ * changes their mind long after Activity has moved on has a way back. Read as
393
+ * `principal` may, when one is named, or as the seat a seat's view is of: an
394
+ * op withheld from them is not listed, and neither is a stop a checkpoint
395
+ * keeps that names what they may not see. A page served by a host holds only
396
+ * a tail of the log and no checkpoint: what the host says of the rest
397
+ * (`Store.stopsServed`, `servedStops`) is listed with it.
398
+ */
399
+ export function stoppedSuggestions(store, principal) {
400
+ const seat = seatOf(store);
401
+ const whole = seat?.store ?? store;
402
+ const who = principal ?? seat?.principal;
403
+ const seen = who !== undefined ? whole.seenBy(who) : whole;
404
+ const shown = new Map(seen.log.all().map((op) => [op.id, op]));
405
+ const found = new Map();
406
+ for (const decline of stoppedKindsOf(whole).values()) {
407
+ const { stop } = decline;
408
+ if (stop) {
409
+ if (who === undefined || !callsNameKept(stop.calls, seatLens(whole, who)))
410
+ found.set(stop.batch, { batch: stop.batch, words: stop.words });
411
+ continue;
412
+ }
413
+ const op = shown.get(decline.id);
414
+ if (op?.batch !== undefined && !op.withheld)
415
+ found.set(op.batch, { batch: op.batch, words: op.batchIntent ?? op.intent });
416
+ }
417
+ for (const one of servedStanding(whole))
418
+ found.set(one.batch, { batch: one.batch, words: one.words });
419
+ return [...found.values()];
420
+ }
421
+ /**
422
+ * WHAT A HOST TELLS A SEAT OF THE STOPS STANDING (`stops` and `stoppedKinds` on
423
+ * the wire's state and welcome): each it may lift and may be told of, and of the
424
+ * rest, only the kinds of suggestions it is served, so its tray and its bell
425
+ * agree with the store. Undefined where there is nothing to say.
426
+ */
427
+ export function servedStops(store, principal) {
428
+ const whole = store;
429
+ return onceATick(whole, `served|${seatKey(principal)}`, () => servedStopsNow(whole, principal));
430
+ }
431
+ function servedStopsNow(whole, principal) {
432
+ const standing = stoppedKindsOf(whole);
433
+ if (standing.size === 0)
434
+ return undefined;
435
+ const told = new Map(stoppedSuggestions(whole, principal).filter((one) => whole.mayUndo(one.batch, principal).ok).map((one) => [one.batch, { ...one, kinds: [] }]));
436
+ const seen = whole.seenBy(principal);
437
+ const meanings = keptOf(whole).actMeanings();
438
+ const held = new Set(suggestionsIn(seen.log.all(), () => true, { now: keptOf(whole).now() }).flatMap((one) => one.calls.map((call) => suggestionKind(call, meanings))));
439
+ const kinds = new Set();
440
+ for (const [kind, decline] of standing) {
441
+ const batch = decline.stop?.batch ?? decline.batch;
442
+ const one = batch === undefined ? undefined : told.get(batch);
443
+ if (one)
444
+ one.kinds.push(kind);
445
+ else if (held.has(kind))
446
+ kinds.add(kind);
447
+ }
448
+ return told.size > 0 || kinds.size > 0 ? { stops: [...told.values()], kinds: [...kinds] } : undefined;
137
449
  }
138
450
  /**
139
451
  * WHETHER THIS SEAT MAY DECIDE A SUGGESTION (Roadmap f-suggestion-votes):
@@ -246,6 +558,76 @@ export function declineSuggestion(store, id, options = {}) {
246
558
  const answered = isProposal(suggestion) && options.intent === undefined ? { intent: `Declined ${possessive(proposerName(suggestion))} proposal: ${suggestion.intent}` } : {};
247
559
  return whole.undo(suggestion.batch, { ...options, ...answered, author });
248
560
  }
561
+ /** What one call is, as a kind of thing, in words: no record's name, since a kind is about none. */
562
+ function kindSaid(store, call, meanings) {
563
+ const act = meanings.act(call.name);
564
+ const relation = act?.derived?.relation ?? (act?.connects?.length === 1 ? act.connects[0] : undefined);
565
+ if (relation !== undefined)
566
+ return `\u201c${nameInPassing(humanizeField(relation))}\u201d links`;
567
+ const derived = derivedActOf(spellingOf(act?.name ?? call.name));
568
+ const definition = derived && store.schema.tryDefinition(derived.kind);
569
+ if (derived && definition) {
570
+ const plural = pluralOf(store.schema, derived.kind).toLowerCase();
571
+ if (derived.act === "edit") {
572
+ const fields = Object.keys(call.args ?? {}).filter((key) => key !== "id").map((field) => fieldInPassing(definition, field));
573
+ return `changes to the ${fields.length > 0 ? fields.join(" and ") : "details"} of ${plural}`;
574
+ }
575
+ const doing = { archive: `setting ${plural} aside`, unarchive: `bringing ${plural} back`, remove: `removing ${plural}`, merge: `merging ${plural}` };
576
+ if (doing[derived.act])
577
+ return doing[derived.act];
578
+ }
579
+ return `\u201c${act?.title ?? humanizeField(spellingOf(call.name))}\u201d`;
580
+ }
581
+ /** What a suggestion's kinds are, in words: "changes to the note of tasks", "“in chapter” links". */
582
+ export function suggestionKindWords(store, suggestion) {
583
+ const whole = (seatOf(store)?.store ?? store);
584
+ const meanings = keptOf(whole).actMeanings();
585
+ return [...new Set(suggestion.calls.map((call) => kindSaid(whole, call, meanings)))].join(", ");
586
+ }
587
+ /**
588
+ * WHY THIS SEAT MAY NOT STOP THESE CALLS' KINDS, or undefined when it may: a
589
+ * stop is said to the app's own tidying actor, of its own suggestions, by
590
+ * whoever may decide every suggestion of those kinds now waiting. A seat that
591
+ * may edit its own record does not get to silence that kind on everyone's.
592
+ */
593
+ function stopRefusal(whole, calls, suggestedBy, lineage, author) {
594
+ if (lineage?.proposedBy !== undefined)
595
+ return "A person proposed this: decline it, and they may propose again.";
596
+ if (!isTidyingActor(suggestedBy))
597
+ return "Only what the app's own actor suggests can be stopped this way: decline this one.";
598
+ const meanings = keptOf(whole).actMeanings();
599
+ const kinds = [...new Set(calls.map((call) => suggestionKind(call, meanings)))].sort();
600
+ const refused = onceATick(whole, `stops|${seatKey(author)}|${kinds.join("|")}`, () => {
601
+ const these = new Set(kinds);
602
+ const waiting = onceATick(whole, "waiting", () => suggestions(whole)).filter((one) => isTidyingActor(one.author) && !isProposal(one) && one.calls.some((call) => these.has(suggestionKind(call, meanings))));
603
+ return !(decidesKinds(whole, calls, author) && waiting.every((one) => mayDecide(whole, one, author)));
604
+ });
605
+ if (!refused)
606
+ return undefined;
607
+ return "Only somebody who may decide every suggestion of this kind can say not to suggest it.";
608
+ }
609
+ /** Whether this seat may say "Don't suggest this kind of thing" of this suggestion: what the store would answer (`stopRefusal`). */
610
+ export function mayStopSuggesting(store, suggestion, principal) {
611
+ const whole = (seatOf(store)?.store ?? store);
612
+ return stopRefusal(whole, suggestion.calls, suggestion.author, suggestion.lineage, (principal ?? keptOf(whole).by)) === undefined;
613
+ }
614
+ /**
615
+ * "DON'T SUGGEST THIS KIND OF THING" (Roadmap f-inbox-needs-you-first): a
616
+ * decline of this suggestion that answers its kind as well
617
+ * (`suggestionKind`). Whatever else the app's own tidying actor has waiting of
618
+ * that kind leaves every tray with it, and it is refused that kind from now on
619
+ * (`stoppedKind`), kept in the log, and by a checkpoint, as every decline is.
620
+ * A workflow and a chat agent are told nothing of it. Undone, all of it waits
621
+ * again and the actor may suggest it. The store judges who may say so
622
+ * (`mayStopSuggesting`), and says the kind in its words.
623
+ */
624
+ export function stopSuggesting(store, id, options = {}) {
625
+ const whole = seatOf(store)?.store ?? store;
626
+ const author = options.author ?? keptOf(whole).by;
627
+ const suggestion = waitingFor(whole, id, author);
628
+ const intent = options.intent ?? `Stopped suggesting ${suggestionKindWords(whole, suggestion)}`;
629
+ return whole.undo(suggestion.batch, { ...options, author, intent, lineage: { basis: "A person said not to suggest this kind of thing", stopsKind: true } });
630
+ }
249
631
  /**
250
632
  * WITHDRAW A SUGGESTION ITS MAKER NO LONGER STANDS BY (Roadmap
251
633
  * f-withdraw-own-suggestions): an undo of it by whoever suggested it — the