clavarium-binder 0.1.2 → 0.1.3-next.1

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.
package/docs/protocol.md CHANGED
@@ -78,9 +78,17 @@ An agent at the limit is refused, and told the number.
78
78
  const k = keeper(storeDir, { sides: () => [{ dir, who }] });
79
79
  setInterval(() => k.pump(), 1000); // answer the agents
80
80
  k.act(op, args, person); // a person's change: { ok, text, data }
81
- k.due(); // records whose due time came: tell their owners
81
+ k.due(); // records whose due time came: tell their owners (below)
82
82
  k.store.onChange((line) => ...); // every change, as the log says it
83
83
 
84
+ What is due: `k.due()` gives `[{ record, list }]`, each record whose due time
85
+ came -- a date alone at 09:00, a date and time at that time, by the keeper's
86
+ clock (`now`) in its local time -- not archived, in a list not archived, in a
87
+ state not done. Each is given once per due time: the store keeps it
88
+ (`told`, in state.json), so a restart does not give it again; a due date
89
+ changed gives it again when the new time comes. Call it every minute or so,
90
+ and tell its `owners` as the application does.
91
+
84
92
  And the screen: `mount(element, { call, words, lang, people, picture, openAttached })`
85
93
  from `clavarium-binder/ui`, with `ui/binder-ui.css` and `ui/texts/*.json`.
86
94
  It gives back `refresh()`, `destroy()`, and `open(id)`: one record shown
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium-binder",
3
- "version": "0.1.2",
3
+ "version": "0.1.3-next.1",
4
4
  "description": "Clavarium Binder: lists of records kept together by people and AI agents, each with its id (a command and an MCP server for agents, a keeper and a screen for the application). No dependency.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/clavarium/clavarium-binder#readme",
package/server/binder.mjs CHANGED
@@ -23,7 +23,7 @@ import { fileURLToPath } from 'node:url';
23
23
  import { randomUUID } from 'node:crypto';
24
24
  import { createInterface } from 'node:readline';
25
25
 
26
- export const VERSION = '0.1.2';
26
+ export const VERSION = '0.1.3-next.1';
27
27
  export const FOLDER = '.binder';
28
28
  /* How long an ask waits for its answer. The keeper answers within a second or two. */
29
29
  export const WAIT_MS = 20_000;
package/ui/binder-ui.css CHANGED
@@ -37,7 +37,8 @@
37
37
  .binder-owners { display: flex; gap: .35rem; flex-wrap: wrap; }
38
38
  .binder-pop { position: relative; }
39
39
  .binder-dots { font-weight: 700; letter-spacing: .05em; padding: .4em .75em; line-height: 1.15; }
40
- .binder-menu-end { left: auto; right: 0; }
40
+ /* Opened from the end of a row: it opens leftwards (the rule after .binder-menu once put it back at left: 0, past the screen). */
41
+ .binder-menu.binder-menu-end { left: auto; right: 0; }
41
42
  .binder-primary { background: var(--binder-action); color: var(--binder-on-action) !important; border: 1px solid var(--binder-action); border-radius: 8px; padding: .45em 1em; font-weight: 600; }
42
43
  .binder-ghost { background: var(--binder-panel); border: 1px solid var(--binder-line); border-radius: 8px; padding: .45em .9em; }
43
44
  .binder-danger { background: var(--binder-danger); color: var(--binder-bg) !important; border: 0; border-radius: 8px; padding: .45em .9em; font-weight: 600; }
@@ -67,7 +68,7 @@
67
68
  .binder-pill[data-gate] { color: var(--binder-ask); border-color: var(--binder-ask); }
68
69
 
69
70
  /* As columns, one per state. */
70
- .binder-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(14rem, 1fr); gap: .8rem; overflow-x: auto; min-height: 0; padding-bottom: .3rem; }
71
+ .binder-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11.5rem, 1fr); gap: .8rem; overflow-x: auto; min-height: 0; padding-bottom: .3rem; }
71
72
  .binder-col { background: var(--binder-panel); border: 1px solid var(--binder-line); border-radius: var(--binder-radius); padding: .6rem; display: flex; flex-direction: column; gap: .5rem; }
72
73
  .binder-col h3 { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--binder-dim); display: flex; justify-content: space-between; }
73
74
  .binder-card { background: var(--binder-bg); border: 1px solid var(--binder-line); border-radius: 9px; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .3rem; cursor: pointer; }
@@ -106,7 +107,7 @@
106
107
  .binder-state[data-done] { background: color-mix(in srgb, var(--binder-ok) 16%, transparent); border-color: transparent; }
107
108
  .binder-state:disabled { opacity: 1; }
108
109
  .binder-caret { font-size: .8em; color: var(--binder-dim); }
109
- .binder-menu { position: absolute; z-index: 5; top: calc(100% + .35rem); left: 0; min-width: 12rem; display: flex; flex-direction: column; padding: .3rem; background: var(--binder-bg);
110
+ .binder-menu { position: absolute; z-index: 5; top: calc(100% + .35rem); left: 0; min-width: 12rem; max-width: calc(100vw - 2rem); display: flex; flex-direction: column; padding: .3rem; background: var(--binder-bg);
110
111
  border: 1px solid var(--binder-line); border-radius: 12px; box-shadow: 0 8px 28px rgb(0 0 0 / .18); }
111
112
  .binder-menu button { border: 0; background: transparent; text-align: left; padding: .6em .7em; border-radius: 8px; display: flex; gap: .5em; align-items: center; }
112
113
  .binder-menu button:hover, .binder-menu button:focus-visible { background: var(--binder-panel); outline: none; }