create-pmos 0.593.0 → 0.595.0
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/package.json +39 -27
- package/payload/KIT-VERSION +1 -1
- package/payload/planning/evals/eval-calibration.md +1 -1
- package/payload/planning/okrs/health-budgets.md +1 -1
- package/payload/state/discoveries.md +1 -1
- package/workspace/changelog.json +38 -0
- package/workspace/fixtures/transcript-task-tools.jsonl +5 -0
- package/workspace/guide/agent-capabilities.md +2 -2
- package/workspace/guide/cli.md +1 -1
- package/workspace/guide/notes.md +2 -2
- package/workspace/guide/scheduled-tasks-and-cli.md +3 -1
- package/workspace/guide/settings-and-switches.md +20 -1
- package/workspace/lib/calendar-events.js +5 -1
- package/workspace/lib/goal-chat.js +1 -1
- package/workspace/lib/lab-cli.js +2 -2
- package/workspace/lib/live-round.js +20 -9
- package/workspace/lib/proposals.js +22 -4
- package/workspace/lib/refresh-run.js +23 -9
- package/workspace/lib/refresh.js +64 -19
- package/workspace/lib/routes-briefing-premium.js +1 -1
- package/workspace/lib/routes-lab.js +7 -3
- package/workspace/lib/schedule-cli.js +2 -2
- package/workspace/lib/schedule-logic.js +8 -2
- package/workspace/lib/transcript-steps.js +66 -17
- package/workspace/package-lock.json +2 -2
- package/workspace/package.json +1 -1
- package/workspace/public/pm/cozy-ev.css +27 -0
- package/workspace/public/pm/cozy-evmodel.js +45 -6
- package/workspace/public/pm/cozy-schedwork.js +201 -0
- package/workspace/public/pm/cozy-settings.js +12 -4
- package/workspace/public/pm/cozy-vw-mtg.css +3 -0
- package/workspace/public/pm/ini-agent.js +2 -0
- package/workspace/public/pm/ini-props.js +1 -1
- package/workspace/public/pm/ini-view.js +10 -1
- package/workspace/public/pm/premium-vw-doc.css +0 -3
- package/workspace/public/pm/small-vw.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-pmos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.595.0",
|
|
4
4
|
"description": "Scaffold the PMOS portable kit — run the PMOS product-management workflow (initiative → lane-fit spec → contract → build → three gates, with work-type lanes for features, research, maintenance, incidents, and content) entirely inside your own repo, with all state as git-versioned files. Includes `workflow-sweep`, which audits the state every board derives from and separates real defects from work you simply have not done. `create-pmos workspace` also installs + launches the local Terminal Workspace GUI. No database, no network, no telemetry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,44 @@
|
|
|
33
33
|
"audit"
|
|
34
34
|
],
|
|
35
35
|
"pmosChanges": [
|
|
36
|
+
{
|
|
37
|
+
"v": "0.595.0",
|
|
38
|
+
"at": "2026-11-18T02:36:22.728Z",
|
|
39
|
+
"f": 4,
|
|
40
|
+
"prs": [
|
|
41
|
+
{
|
|
42
|
+
"n": 1336,
|
|
43
|
+
"t": "Keep the meeting share popover's cozy fonts out of the console type check",
|
|
44
|
+
"s": "Keep the meeting share popover's cozy fonts out of the console type check",
|
|
45
|
+
"k": "fix"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"n": 1334,
|
|
49
|
+
"t": "Show a session's task list from TaskCreate/TaskUpdate",
|
|
50
|
+
"s": "Show a session's task list from TaskCreate/TaskUpdate",
|
|
51
|
+
"k": "fix"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"n": 1337,
|
|
55
|
+
"t": "Scheduled work shows how often and when next, and the PM sets it",
|
|
56
|
+
"s": "Scheduled work shows how often and when next, and the PM sets it",
|
|
57
|
+
"k": "new"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"v": "0.594.0",
|
|
63
|
+
"at": "2026-11-18T02:08:44.140Z",
|
|
64
|
+
"f": 4,
|
|
65
|
+
"prs": [
|
|
66
|
+
{
|
|
67
|
+
"n": 1335,
|
|
68
|
+
"t": "Continue the PM's kept prototype and show it under Prototype & design",
|
|
69
|
+
"s": "Continue the PM's kept prototype and show it under Prototype & design",
|
|
70
|
+
"k": "fix"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
36
74
|
{
|
|
37
75
|
"v": "0.593.0",
|
|
38
76
|
"at": "2026-11-18T01:08:15.346Z",
|
|
@@ -272,32 +310,6 @@
|
|
|
272
310
|
"k": "new"
|
|
273
311
|
}
|
|
274
312
|
]
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"v": "0.575.0",
|
|
278
|
-
"at": "2026-11-16T11:43:16.900Z",
|
|
279
|
-
"f": 4,
|
|
280
|
-
"prs": [
|
|
281
|
-
{
|
|
282
|
-
"n": 1307,
|
|
283
|
-
"t": "A live meeting's agenda as 3 to 5 topics",
|
|
284
|
-
"s": "A live meeting's agenda as 3 to 5 topics",
|
|
285
|
-
"k": "new"
|
|
286
|
-
}
|
|
287
|
-
]
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"v": "0.574.0",
|
|
291
|
-
"at": "2026-11-16T06:14:05.146Z",
|
|
292
|
-
"f": 4,
|
|
293
|
-
"prs": [
|
|
294
|
-
{
|
|
295
|
-
"n": 1306,
|
|
296
|
-
"t": "The phone chat's composer and menu button stay in place after touch scrolling",
|
|
297
|
-
"s": "The phone chat's composer and menu button stay in place after touch scrolling",
|
|
298
|
-
"k": "fix"
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
313
|
}
|
|
302
314
|
]
|
|
303
315
|
}
|
package/payload/KIT-VERSION
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Eval calibration log"
|
|
4
4
|
description: "Append-only record of every PM override of an evaluator verdict."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-18T02:36:19Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Health budgets"
|
|
4
4
|
description: "Closed registry of health-budget anchors (D59), edited only by the PM."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-18T02:36:19Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Reference
|
|
3
3
|
title: "Discoveries and friction log"
|
|
4
4
|
description: "Append-only record of what runs discovered and where the process rubbed."
|
|
5
|
-
generated: {by: process:create-pmos, at: "2026-11-
|
|
5
|
+
generated: {by: process:create-pmos, at: "2026-11-18T02:36:19Z"}
|
|
6
6
|
status: stable
|
|
7
7
|
---
|
|
8
8
|
|
package/workspace/changelog.json
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"v": "0.595.0",
|
|
4
|
+
"at": "2026-11-18T02:36:22.728Z",
|
|
5
|
+
"f": 4,
|
|
6
|
+
"prs": [
|
|
7
|
+
{
|
|
8
|
+
"n": 1336,
|
|
9
|
+
"t": "Keep the meeting share popover's cozy fonts out of the console type check",
|
|
10
|
+
"s": "Keep the meeting share popover's cozy fonts out of the console type check",
|
|
11
|
+
"k": "fix"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"n": 1334,
|
|
15
|
+
"t": "Show a session's task list from TaskCreate/TaskUpdate",
|
|
16
|
+
"s": "Show a session's task list from TaskCreate/TaskUpdate",
|
|
17
|
+
"k": "fix"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"n": 1337,
|
|
21
|
+
"t": "Scheduled work shows how often and when next, and the PM sets it",
|
|
22
|
+
"s": "Scheduled work shows how often and when next, and the PM sets it",
|
|
23
|
+
"k": "new"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"v": "0.594.0",
|
|
29
|
+
"at": "2026-11-18T02:08:44.140Z",
|
|
30
|
+
"f": 4,
|
|
31
|
+
"prs": [
|
|
32
|
+
{
|
|
33
|
+
"n": 1335,
|
|
34
|
+
"t": "Continue the PM's kept prototype and show it under Prototype & design",
|
|
35
|
+
"s": "Continue the PM's kept prototype and show it under Prototype & design",
|
|
36
|
+
"k": "fix"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
2
40
|
{
|
|
3
41
|
"v": "0.593.0",
|
|
4
42
|
"at": "2026-11-18T01:08:15.346Z",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{"parentUuid":"redacted","isSidechain":false,"message":{"model":"redacted","id":"msg_redacted","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01BbbihWtz7wBTGd7RJMKqcK","name":"TaskCreate","input":{"subject":"Read task tools in transcript-steps","description":"Sample task to capture transcript format","activeForm":"Reading task tools"},"caller":{"type":"direct"}}],"container":null,"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"input_transformations":[],"diagnostics":null,"context_management":null},"toolInputStreamMs":795,"wireToolInputs":{"toolu_01BbbihWtz7wBTGd7RJMKqcK":{"subject":"Read task tools in transcript-steps","description":"Sample task to capture transcript format","activeForm":"Reading task tools"}},"serverClassifierRequest":"d9033f24-83f8-4a76-b09d-7e249cbe86e5","apiBlockIndex":1,"requestId":"redacted","requestedModel":"redacted","promptCacheRequested":"1h","type":"assistant","uuid":"redacted","timestamp":"2026-11-18T01:34:36.493Z","advisorModel":"redacted","effort":"medium","perTurnEffort":"medium","madeBy":"model","userType":"external","entrypoint":"remote_projects","cwd":"redacted","sessionId":"redacted","version":"2.1.327","gitBranch":"redacted"}
|
|
2
|
+
{"parentUuid":"redacted","isSidechain":false,"promptId":"redacted","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01BbbihWtz7wBTGd7RJMKqcK","type":"tool_result","content":"Task #1 created successfully: Read task tools in transcript-steps"}]},"uuid":"redacted","timestamp":"2026-11-18T01:34:36.520Z","toolUseResult":{"task":{"id":"1","subject":"Read task tools in transcript-steps","description":"Sample task to capture transcript format"}},"sourceToolAssistantUUID":"cd69d7d8-babd-4368-aed7-d684da36c322","permissionDecision":{"decision":"accept","source":"config"},"userType":"external","entrypoint":"remote_projects","cwd":"redacted","sessionId":"redacted","version":"2.1.327","gitBranch":"redacted"}
|
|
3
|
+
{"parentUuid":"redacted","isSidechain":false,"message":{"model":"redacted","id":"msg_redacted","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01GbD6GBFPq5HquRTySNf94c","name":"TaskUpdate","input":{"taskId":"1","status":"in_progress"},"caller":{"type":"direct"}}],"container":null,"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"input_transformations":[],"diagnostics":null,"context_management":null},"toolInputStreamMs":351,"wireToolInputs":{"toolu_01GbD6GBFPq5HquRTySNf94c":{"taskId":"1","status":"in_progress"}},"serverClassifierRequest":"5d9e04b1-b67c-49a5-bc34-82de33755a60","apiBlockIndex":0,"requestId":"redacted","requestedModel":"redacted","promptCacheRequested":"1h","type":"assistant","uuid":"redacted","timestamp":"2026-11-18T01:34:37.520Z","advisorModel":"redacted","effort":"medium","perTurnEffort":"medium","madeBy":"model","userType":"external","entrypoint":"remote_projects","cwd":"redacted","sessionId":"redacted","version":"2.1.327","gitBranch":"redacted"}
|
|
4
|
+
{"parentUuid":"redacted","isSidechain":false,"promptId":"redacted","type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01GbD6GBFPq5HquRTySNf94c","type":"tool_result","content":"Updated task #1 status"}]},"uuid":"redacted","timestamp":"2026-11-18T01:34:37.550Z","toolUseResult":{"success":true,"taskId":"1","updatedFields":["status"],"statusChange":{"from":"pending","to":"in_progress"}},"sourceToolAssistantUUID":"6f18e661-8949-4b89-8fe8-1ea270973df2","permissionDecision":{"decision":"accept","source":"config"},"userType":"external","entrypoint":"remote_projects","cwd":"redacted","sessionId":"redacted","version":"2.1.327","gitBranch":"redacted"}
|
|
5
|
+
{"parentUuid":"redacted","isSidechain":false,"message":{"model":"redacted","id":"msg_redacted","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_redacted_bash","name":"Bash","input":{"command":"ls"},"caller":{"type":"direct"}}],"container":null,"stop_reason":"tool_use","stop_sequence":null,"stop_details":null,"input_transformations":[],"diagnostics":null,"context_management":null},"toolInputStreamMs":351,"wireToolInputs":{"toolu_01GbD6GBFPq5HquRTySNf94c":{"taskId":"1","status":"in_progress"}},"serverClassifierRequest":"5d9e04b1-b67c-49a5-bc34-82de33755a60","apiBlockIndex":0,"requestId":"redacted","requestedModel":"redacted","promptCacheRequested":"1h","type":"assistant","uuid":"redacted","timestamp":"2026-11-18T01:34:37.520Z","advisorModel":"redacted","effort":"medium","perTurnEffort":"medium","madeBy":"model","userType":"external","entrypoint":"remote_projects","cwd":"redacted","sessionId":"redacted","version":"2.1.327","gitBranch":"redacted"}
|
|
@@ -206,8 +206,8 @@ You can ask to see an idea at any moment: alone while you work on an initiative,
|
|
|
206
206
|
6. **Draw or attach an image.** Press Draw (D), sketch over the prototype, then attach the sketch. It goes with your next message. An image you attach does the same. PMOS builds from it (its layout, hierarchy and colours) unless your words say otherwise, for example "only the colours".
|
|
207
207
|
7. **Play.** Press Play to run the prototype full size through a scenario of the flow. Tap where the user would tap. A tap that misses shows where to tap. Restart and Close are above it. Ask in the chat for another scenario.
|
|
208
208
|
8. **Several versions only when you ask.** Say "show me 3 ways" (or "two options"). PMOS picks that many directions and shows them in a tray. Tap one to preview it, then keep it (✓) or close the tray (✕).
|
|
209
|
-
9. **The initiative's prototype.** The newest version made from the chat is the initiative's prototype
|
|
210
|
-
10. **The chat knows the prototype.** Every message in the initiative's chat tells PMOS which version is current, where its files are, and the one command that makes the next version. So "Improve the prototype based on the PRD" or "Rebuild A from this list" makes the next version in the Viewer. The chat never writes a loose HTML file.
|
|
209
|
+
9. **The initiative's prototype.** The newest version made from the chat is the initiative's prototype. It is the one entry under **Prototype & design** on the initiative page (above Documents), and the **Prototype** line on its Experiment card. Both open it in the Viewer. Older rounds stay in the Viewer's history, not on the page. Your edits in the Viewer are part of that version. Earlier versions stay in ‹ ›. PMOS never keeps a round by itself. A round of several ways, or one started from a terminal (a test), becomes the prototype only when you keep it with ✓ in the Viewer; the grill then runs once on it. ✕ drops a round, and you can say why.
|
|
210
|
+
10. **The chat knows the prototype.** Every message in the initiative's chat tells PMOS which version is current, where its files are, and the one command that makes the next version. So "Improve the prototype based on the PRD" or "Rebuild A from this list" makes the next version in the Viewer. When no version is current yet, the chat gets the list of recent versions with the command to continue each one (`--of <round>`), and asks you which one if it is not clear. The chat never writes a loose HTML file.
|
|
211
211
|
|
|
212
212
|
What each part does:
|
|
213
213
|
|
package/workspace/guide/cli.md
CHANGED
|
@@ -231,7 +231,7 @@ The idle lab run uses only the first three commands:
|
|
|
231
231
|
- `pmos lab page <url>`: a scan run reads one public page. PMOS refuses a private or local address and keeps the page text, so a quote can be checked.
|
|
232
232
|
- `pmos lab file <group> --json -`: a run files one result. It waits until the run ends and the proof passes.
|
|
233
233
|
- `pmos lab status`: in a run, what it filed. Outside a run, this month's idle lab runs and spend.
|
|
234
|
-
- `pmos lab round <initiative> --brief "<what to show>" [--one] [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--chat] [--ws <id>]`: a live round. With `--one`, PMOS makes one version with its flow, swimlane and copy, and shows it on the Viewer's canvas as soon as it renders; without it, PMOS starts three runs at once, one version each, side by side. With `--base B`, PMOS makes one new round of B from the brief. With `--propose`, PMOS files the ✦ ask instead, and your ✓ starts it. With `--chat`, the initiative chat started it: the chat is told when the version renders, and the version becomes the initiative's prototype (a round from a terminal without it waits for your ✓). A background lab run cannot use this command. See [The live round](agent-capabilities.md).
|
|
234
|
+
- `pmos lab round <initiative> --brief "<what to show>" [--one] [--base B] [--dirs "A: …|B: …|C: …"] [--of <round> [--from n]] [--propose] [--chat] [--ws <id>]`: a live round. With `--one`, PMOS makes one version with its flow, swimlane and copy, and shows it on the Viewer's canvas as soon as it renders; without it, PMOS starts three runs at once, one version each, side by side. With `--base B`, PMOS makes one new round of B from the brief: of the current prototype, or of the round that `--of` names (and its version n with `--from n`). With `--propose`, PMOS files the ✦ ask instead, and your ✓ starts it. With `--chat`, the initiative chat started it: the chat is told when the version renders, and the version becomes the initiative's prototype (a round from a terminal without it waits for your ✓). A background lab run cannot use this command. See [The live round](agent-capabilities.md).
|
|
235
235
|
|
|
236
236
|
### pmos outcomes: expected outcomes
|
|
237
237
|
|
package/workspace/guide/notes.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Notes: record a meeting, and present while it records"
|
|
4
4
|
description: "Record a meeting on this machine, the notes caught and checked, presenting while it records, and the Chrome extension over Google Meet."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-18
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Notes
|
|
@@ -395,7 +395,7 @@ To take notes for a calendar event, open the meeting from Your day or the calend
|
|
|
395
395
|
|
|
396
396
|
You can share a meeting note with people who do not use PMOS. They get a read-only page. Nothing is sent for you.
|
|
397
397
|
|
|
398
|
-
1. Open a meeting that has notes. Press the share icon, next to **⋯**.
|
|
398
|
+
1. Open a meeting that has notes. Press the share icon, next to **⋯**. A popover opens under it, in the same fonts and colours as the meeting page.
|
|
399
399
|
2. Under **What goes out**, PMOS turns on Summary, Decisions, Next steps and Questions. Facts mentioned and Since the last one stay off. Press a chip to change it. The transcript, the recording and the screen shots never go out.
|
|
400
400
|
3. The **✦** row tells you what PMOS kept back. Press it to see the list:
|
|
401
401
|
- **Stays inside**: your own to-dos and rules, and lines about a team or a person who was not in the meeting. Press the eye on a line to let it go out.
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Scheduled tasks"
|
|
4
4
|
description: "How scheduled tasks run a skill in a terminal session, and their limits."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-18
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Scheduled tasks
|
|
9
9
|
|
|
10
10
|
A scheduled task runs a skill at a set time. The workspace starts a terminal session in the repository and types the skill into it.
|
|
11
11
|
|
|
12
|
+
A task repeats every hour (at the minute of its time), every day, every week, every 2 weeks or every month, or runs once. Settings › Connectors › **Scheduled work** lists your tasks with their next run, and each task's page turns it on or off, changes how often it repeats and runs it now.
|
|
13
|
+
|
|
12
14
|
## Limits
|
|
13
15
|
|
|
14
16
|
A schedule fires only while the workspace server runs. If the server is stopped, the workspace skips the missed slot. It does not catch up later. A one-time task has a 15-minute grace window.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type: Guide
|
|
3
3
|
title: "Settings, switches and data freshness"
|
|
4
4
|
description: "What each section of Settings holds, every PMOS_ environment variable, and how the workspace keeps each source up to date."
|
|
5
|
-
timestamp: 2026-11-
|
|
5
|
+
timestamp: 2026-11-18
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Settings, switches and data freshness
|
|
@@ -331,6 +331,25 @@ On Home, the Board and Intelligence, the sources list is in **Settings › Conne
|
|
|
331
331
|
- A row that is well shows its name and when PMOS last read it, for example **Initiatives** · 3 h ago. A source that is old shows ↻ too, while PMOS reads it again by itself. When a read found nothing new, the row says **Checked 10:42 · same since 09:15**.
|
|
332
332
|
- PMOS's background work that failed, and Git sync when it fails, are rows of the same list. A failed read of a source is the reason on that source's row.
|
|
333
333
|
|
|
334
|
+
### Scheduled work: how often and when next
|
|
335
|
+
|
|
336
|
+
A source that PMOS reads on a schedule says how often and when it reads next on its row, for example **Calendar** · Every 30 min in working hours · next 10:00. When PMOS missed a read, because PMOS was not running or the computer slept, the row is amber and says when, for example **Read yesterday 17:31 · missed 09:00**, with ↻ to read it now. A source on time has no colour.
|
|
337
|
+
|
|
338
|
+
Press › on a row to open its page:
|
|
339
|
+
|
|
340
|
+
| Row | What it does |
|
|
341
|
+
|---|---|
|
|
342
|
+
| Active | On or off. Off: PMOS does not read it on its own. |
|
|
343
|
+
| Next run | When PMOS reads it next. |
|
|
344
|
+
| Repeats | Only when you press read, every 15 min, 30 min, hour, 2 hours or 4 hours, every day, working days, or once a week. A day-based choice has **At** (and **On** for once a week). |
|
|
345
|
+
| Working hours only | For the every-N choices: read only inside your working hours. |
|
|
346
|
+
| History | The last five runs, with the result. |
|
|
347
|
+
| ▶ | Read it now. |
|
|
348
|
+
|
|
349
|
+
On a day with 3 or more meetings, PMOS proposes ✦ **Read it more often on meeting days**: Calendar every 15 min on such days, other days as set. Nothing changes until you press ✓. **Undo** puts the old rhythm back, and ✕ hides the proposal for today.
|
|
350
|
+
|
|
351
|
+
The **Scheduled work** row under the sources lists everything that runs on a schedule: what PMOS reads, PMOS's own jobs (the day check, the initiative driver, signals) and your own scheduled tasks, each with its next run. Your own tasks can repeat every hour, every day, every week, every 2 weeks or every month.
|
|
352
|
+
|
|
334
353
|
When all is well, there is no other line. ↻ in the Connectors header is **Refresh all**. The (i) button says what PMOS reads and that it never posts. The switches for what PMOS reads on its own, and the other connectors of your Claude session, are folded into one row: open it to see them. When a source needs you, the Connectors tab has an amber dot, an amber box at the top of the other Settings sections names it, and the place menu opens Settings at Connectors. PMOS repairs the other problems by itself, so you do not see a box for them (see below).
|
|
335
354
|
|
|
336
355
|
### When a source cannot be read: PMOS repairs it first
|
|
@@ -119,4 +119,8 @@ const eventsOn = (events, day) => listOf(events).filter((e) => e.date === day);
|
|
|
119
119
|
/** Today's meetings (the Record menu): eventsOn the local day of `now`. */
|
|
120
120
|
const todayOf = (events, now = Date.now()) => eventsOn(events, localDate(now));
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
/** How many meetings the local day of `dayMs` has: timed events shorter than 12 hours (an all-day event is not a meeting). The meeting-day
|
|
123
|
+
* rhythm of Settings › Connectors reads it (lib/refresh.js `busy`, batch 31 item 2). Pure. */
|
|
124
|
+
const meetingsOn = (events, dayMs) => eventsOn(events, localDate(dayMs)).filter((e) => e.minutes > 0 && e.minutes < 720).length;
|
|
125
|
+
|
|
126
|
+
module.exports = { readAll, oneEach, asEvent, localIso, todayOf, eventsOn, listOf, menuShape, meetingsOn };
|
|
@@ -72,7 +72,7 @@ function startMessage(draft) {
|
|
|
72
72
|
JSON.stringify(draft),
|
|
73
73
|
'Do whatever the goal needs, as the PM would. Do not stop to ask for approval, feedback or a choice: pick the sensible option yourself, say in one line what you chose, and go on. Merging follows the PM\'s standing rule (merge once required CI is green).',
|
|
74
74
|
'Stop for the PM only when the work cannot go on without them: a sign-in or secret only they have, or a message that goes to other people. Then do every other open point first, and end with needs-you and exactly what you need.',
|
|
75
|
-
'Keep your to-do list (TodoWrite) as the done points, word for word, one item each. Mark the one you work on in_progress, and mark it completed the moment it is met, so the PM sees each point tick as you go.',
|
|
75
|
+
'Keep your to-do list (TodoWrite, or TaskCreate and TaskUpdate) as the done points, word for word, one item each. Mark the one you work on in_progress, and mark it completed the moment it is met, so the PM sees each point tick as you go.',
|
|
76
76
|
'At the end of each message about this goal, add a fenced pmos-goal block: {"step":"progress","state":"working|done|needs-you","met":["done points met"],"open":["done points still open"]}. Copy each done point word for word. Report done only after you checked every point.',
|
|
77
77
|
// batch 22 item 13 (Wawan, 2026-11-01): "6 of 6 met" while the report the goal asked for was only proposed
|
|
78
78
|
'A done point that names a thing to make (a report, slides, a deck, a document) is met only when that thing exists where the PM reads it, opened and checked by you. A proposal, a plan or a draft waiting for a PM press does not meet it: that point stays open, and you end with needs-you and the one press.',
|
package/workspace/lib/lab-cli.js
CHANGED
|
@@ -30,7 +30,7 @@ const USAGE = [
|
|
|
30
30
|
' pmos lab file scanned --json - { "title", "why", "claims": [{ "text", "sources": [{ "page": 1, "line": 12, "quote": "<words on that line>" }] }], "refreshed"? }',
|
|
31
31
|
' pmos lab file scan --json - the same, for a finding that fits no initiative',
|
|
32
32
|
' pmos lab status',
|
|
33
|
-
' pmos lab round <initiative> --brief "<what to show>" [--one] [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--chat] [--ws <id>]',
|
|
33
|
+
' pmos lab round <initiative> --brief "<what to show>" [--one] [--base B] [--dirs "A: …|B: …|C: …"] [--propose] [--chat] [--of <round> [--from n]] [--ws <id>]',
|
|
34
34
|
' the live round: three versions now (--one: one, with its flow, swimlane and copy; --base B: the next',
|
|
35
35
|
' version of B from the brief), each shown as soon as it renders. --propose files the ✦ ask instead',
|
|
36
36
|
'A specimen must open and render; every claim must quote what was read. What is not proven is dropped. Nothing is sent.',
|
|
@@ -139,7 +139,7 @@ async function run(argv, { say = (s) => console.log(s), env = process.env, stdin
|
|
|
139
139
|
if (base !== undefined && !/^[A-C]$/i.test(String(base))) { say('✗ --base is the key of the version to improve: A, B or C'); return 2; }
|
|
140
140
|
if (typeof call !== 'function') { say('✗ no PMOS server answers: start PMOS, then ask again'); return 1; }
|
|
141
141
|
let by = ''; try { by = require('./actor.js').fromCli({ env }).by || ''; } catch { by = ''; }
|
|
142
|
-
const body = { ini, brief: brief.trim(), ...(base ? { base: String(base).toUpperCase() } : {}), ...(typeof dirs === 'string' ? { dirs } : {}), ...(typeof ws === 'string' ? { ws } : {}), ...(typeof board === 'string' ? { board } : {}), ...(flag(args, 'propose') ? { propose: true } : {}), ...(flag(args, 'one') ? { one: true } : {}), ...(flag(args, 'chat') ? { from: 'chat' } : {}), ...(by ? { by } : {}) };
|
|
142
|
+
const body = { ini, brief: brief.trim(), ...(base ? { base: String(base).toUpperCase() } : {}), ...(typeof dirs === 'string' ? { dirs } : {}), ...(typeof ws === 'string' ? { ws } : {}), ...(typeof board === 'string' ? { board } : {}), ...(flag(args, 'propose') ? { propose: true } : {}), ...(flag(args, 'one') ? { one: true } : {}), ...(flag(args, 'chat') ? { from: 'chat' } : {}), ...(typeof flag(args, 'of') === 'string' ? { of: flag(args, 'of') } : {}), ...(typeof flag(args, 'from') === 'string' ? { fromV: Number(flag(args, 'from')) || undefined } : {}), ...(by ? { by } : {}) };
|
|
143
143
|
let r = null; try { r = await call('POST', '/api/lab/round', body); } catch { r = null; }
|
|
144
144
|
if (!r) { say('✗ no PMOS server answers: start PMOS, then ask again'); return 1; }
|
|
145
145
|
if (!r.ok) { say('✗ ' + (r.error || 'the round did not start')); return 1; }
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* first round's versions that rendered, the ones a feedback sentence may name)
|
|
43
43
|
* baseOf(P, ini, key, { from?, of? }) PURE → { of, round, file, title } | null what a feedback round on `key` builds on (start: the
|
|
44
44
|
* current version, lib/proposals.js currentOf, unless the PM said Continue from version n)
|
|
45
|
-
* contextOf(cur, { ini, ws, rt }) PURE → the line the initiative chat's agent reads before every message while a prototype exists: the
|
|
45
|
+
* contextOf(cur, { ini, ws, rt, versions }) PURE → the line the initiative chat's agent reads before every message while a prototype exists: the
|
|
46
46
|
* version, its folder and files, and the one command that makes the next version (never a loose HTML file)
|
|
47
47
|
* promptOf(o) PURE · scaffoldOf(roots) → { css, from }
|
|
48
48
|
* create(deps) → { start(input), propose(input), cancel(id, why), running(ini), status() } and the module-level shortcuts below,
|
|
@@ -92,7 +92,7 @@ const FEEDBACK_RE = /^\s*(?:(?:take|keep|go with|try|use|make)\s+)?([A-C])(?:\s*
|
|
|
92
92
|
const CHANGE_RE = /^\s*(?:please\s+|can you\s+|could you\s+|now\s+)?(change|make|add|drop|remove|move|put|use|try|lead|swap|replace|turn|show|hide|fewer|more|less|bigger|smaller|larger|instead|but|also|without|with|give|start|end|rename|call|colou?r|shorten|simplify|keep|take out|bring|flip|split|merge|stack|sort|group|open|close|round|tighten|loosen|lighten|darken|center|centre|align)\b/i;
|
|
93
93
|
// 2026-11-18 ("Improve the prototype based on the PRD" got "I can't find the rendered files"): a word that asks for work on what is there counts
|
|
94
94
|
// as a change of the prototype when the sentence names it (the prototype, a version, a screen, the layout, the design, or its letter)
|
|
95
|
-
const WORK_RE = /^\s*(?:please\s+|can you\s+|could you\s+|now\s+|ok(?:ay)?,?\s+|yes,?\s+)?(
|
|
95
|
+
const WORK_RE = /^\s*(?:please\s+|can you\s+|could you\s+|now\s+|ok(?:ay)?,?\s+|yes,?\s+)?(improv|updat|refin|rework|redo|rebuild|redesign|restyl|polish|fix|adjust|tweak|iterat|apply|continu|cover|base|follow|align|writ)\w*/i;
|
|
96
96
|
const PROTO_NOUN_RE = /\b(prototype|version|screens?|page|layout|design|mock ?up|ui|viewer|canvas|flow|swimlane|copy)\b/i;
|
|
97
97
|
const COUNT_RE = /\b(\d|two|three|a few|some|(?:a )?couple of)\s+(ways|options|versions|takes|directions|variants)\b/i;
|
|
98
98
|
const WORDS = { two: 2, three: 3, 'a few': 3, some: 3, 'couple of': 2, 'a couple of': 2 };
|
|
@@ -379,15 +379,25 @@ function saidOf(abs) {
|
|
|
379
379
|
* currentOf; rt: the runtime folder). 2026-11-18: asked to "Improve the prototype based on the PRD", the chat found no files and asked the
|
|
380
380
|
* PM for a path; asked to "Rebuild A", it tried the idle lab's `pmos lab file` and wrote a loose a2.html in its scratchpad instead of a
|
|
381
381
|
* version in the Viewer. → '' when there is no prototype. */
|
|
382
|
-
function contextOf(cur, { ini, ws = '', rt = null } = {}) {
|
|
383
|
-
if (!
|
|
384
|
-
const abs = (rt && LAB.specimenPath(rt, cur.file)) || cur.file, dir = path.dirname(abs);
|
|
382
|
+
function contextOf(cur, { ini, ws = '', rt = null, versions = [] } = {}) {
|
|
383
|
+
if (!ini) return '';
|
|
385
384
|
const wsf = ws ? ` --ws ${ws}` : '';
|
|
385
|
+
const never = 'Never write the prototype yourself, never write an HTML file in the repository, a scratchpad or elsewhere, and never use `pmos lab file`: that is for the background lab only.';
|
|
386
|
+
if (!cur || !cur.file) {
|
|
387
|
+
// no version is the prototype yet: list what exists, so "improve the prototype" continues the one the PM means, never a new file
|
|
388
|
+
const vs = (versions || []).filter((v) => v && v.file).slice(0, 6);
|
|
389
|
+
if (!vs.length) return '';
|
|
390
|
+
const at = (v) => { const a = (rt && LAB.specimenPath(rt, v.file)) || v.file; return path.dirname(a); };
|
|
391
|
+
const lines = vs.map((v, i) => `${i + 1}. ${v.n > 1 ? 'Version ' + v.n + ' of ' + v.key : v.key + (v.ways > 1 ? ' (one of ' + v.ways + ' ways)' : '')}${v.from === 'cli' ? ', started from a terminal (often a test)' : ''}: "${one(v.said || v.title, 120)}", asked as "${one(v.brief, 160)}". Files: ${at(v)}. Continue it with --base ${v.key} --of ${v.of}${v.n > 1 ? ' --from ' + v.n : ''}`);
|
|
392
|
+
return `[PMOS] This initiative has prototype versions in the Viewer, but the PM has not chosen one yet:\n${lines.join('\n')}\n`
|
|
393
|
+
+ `To change, improve or rebuild the prototype, in any words, pick the version the PM means (read its files and the brief; when the PM names a document such as the PRD, the one built from it), then run exactly: \`pmos lab round ${ini}${wsf} --base <letter> --of <round> [--from <n>] --chat --brief "<what to change, under 600 characters>"\` `
|
|
394
|
+
+ 'and say in one line which version you continue and what will change. If you cannot tell which one, ask the PM in one line, naming two at most. ' + never;
|
|
395
|
+
}
|
|
396
|
+
const abs = (rt && LAB.specimenPath(rt, cur.file)) || cur.file, dir = path.dirname(abs);
|
|
386
397
|
return `[PMOS] This initiative's prototype is Version ${cur.n} (${cur.key}${cur.said ? ': "' + one(cur.said, 140) + '"' : ''}), open in the Viewer beside this chat. `
|
|
387
398
|
+ `Its files are in ${dir}: ${path.basename(abs)} (the prototype), flow.json, lanes.json, copy.json, tweaks.json, and edits.json (the PM's own edits in the Viewer). Read them to answer questions about it. `
|
|
388
399
|
+ `To change, improve or rebuild it, in any words, run exactly: \`pmos lab round ${ini}${wsf} --base ${cur.key} --chat --brief "<what to change, with the PM's words and anything you read, under 600 characters>"\` `
|
|
389
|
-
+ `and say in one line what will change: PMOS makes Version ${cur.n + 1} in about a minute and tells you when it is in the Viewer. `
|
|
390
|
-
+ 'Never write the prototype yourself, never write an HTML file in a scratchpad or elsewhere, and never use `pmos lab file`: that is for the background lab only.';
|
|
400
|
+
+ `and say in one line what will change: PMOS makes Version ${cur.n + 1} in about a minute and tells you when it is in the Viewer. ` + never;
|
|
391
401
|
}
|
|
392
402
|
|
|
393
403
|
/* ── the proposal line of a round ── */
|
|
@@ -481,8 +491,9 @@ function create(deps) {
|
|
|
481
491
|
if (input.base) {
|
|
482
492
|
base = String(input.base).toUpperCase();
|
|
483
493
|
// the version the initiative is at now (lib/proposals.js currentOf), unless the PM said Continue from version n
|
|
484
|
-
const cur = fromV ? null : PR.currentOf(P, c.ini);
|
|
485
|
-
b = cur && cur.key === base ? baseOf(P, c.ini, base, { from: cur.n, of: cur.of }) : baseOf(P, c.ini, base, { from: fromV });
|
|
494
|
+
const cur = fromV || input.of ? null : PR.currentOf(P, c.ini);
|
|
495
|
+
b = cur && cur.key === base ? baseOf(P, c.ini, base, { from: cur.n, of: cur.of }) : baseOf(P, c.ini, base, { from: fromV, of: str(input.of) });
|
|
496
|
+
if (b && input.of && b.of !== input.of) b = null; // the round named is not on this initiative, or has no version ${base}
|
|
486
497
|
if (!b) return { ok: false, error: `there is no proven version ${base} on this initiative yet: ask for a first one` };
|
|
487
498
|
dirs = [{ key: base, title: b.title }];
|
|
488
499
|
} else {
|
|
@@ -332,15 +332,33 @@ function currentOf(F, ini) {
|
|
|
332
332
|
}
|
|
333
333
|
for (const k of F.kept || []) {
|
|
334
334
|
if (k.ini !== ini || (F.undone && F.undone.has(k.batch)) || k.by === 'agent:auto') continue;
|
|
335
|
+
const files = [];
|
|
335
336
|
for (const w of k.wrote) {
|
|
336
337
|
if (w.op !== 'doc' || w.kind !== 'prototype' || !/[?&]file=/.test(str(w.ref))) continue;
|
|
337
|
-
|
|
338
|
-
for (const id of k.ids) { const p = F.props.get(String(id)); const c = live(p) ? of(p, file, k.at) : null; if (c) out.push(c); }
|
|
338
|
+
try { files.push(decodeURIComponent(str(w.ref).split(/[?&]file=/)[1].split('&')[0])); } catch { /* not a specimen link */ }
|
|
339
339
|
}
|
|
340
|
+
// a keep that wrote no document (2026-11-18: a ✓ on a round of three kept nothing) keeps the round's first version
|
|
341
|
+
for (const id of k.ids) { const p = F.props.get(String(id)); if (!live(p)) continue; for (const file of files.length ? files : ['']) { const c = of(p, file, k.at); if (c) out.push(c); } }
|
|
340
342
|
}
|
|
341
343
|
out.sort((a, b) => String(b.at).localeCompare(String(a.at)));
|
|
342
344
|
return out[0] || null;
|
|
343
345
|
}
|
|
346
|
+
/** PURE. Every proven version of the live rounds on `ini`, newest first, at most n: { of (the round's first proposal), key, n, file, said,
|
|
347
|
+
* title, brief, from, ways (how many versions its round made), at }. The chat lists them when no version is the prototype yet, so it
|
|
348
|
+
* can continue the one the PM means (2026-11-18: the PRD round had three ways and none kept; the chat built a new one instead). */
|
|
349
|
+
function versionsOf(F, ini, n = 6) {
|
|
350
|
+
if (!F || !F.props) return [];
|
|
351
|
+
const out = [];
|
|
352
|
+
for (const p of F.props.values()) {
|
|
353
|
+
const d = p.data || {};
|
|
354
|
+
if (p.ini !== ini || !isObj(d.live)) continue;
|
|
355
|
+
const from = str(d.live.from), ways = (d.live.slots || []).length || 1;
|
|
356
|
+
if (p.group === 'prototyped') for (const s of Array.isArray(d.specimens) ? d.specimens : []) { if (isObj(s) && str(s.file)) out.push({ of: p.id, key: str(s.key), n: 1, file: s.file, said: str(s.caption), title: str(s.title), brief: str(d.live.brief), from, ways, at: p.at }); }
|
|
357
|
+
else if (p.group === 'improved' && str(d.file)) out.push({ of: str(d.of), key: str(d.base), n: Number(d.round) || 2, file: d.file, said: str(d.said), title: '', brief: str(d.changed), from, ways: 1, at: p.at });
|
|
358
|
+
}
|
|
359
|
+
out.sort((a, b) => String(b.at).localeCompare(String(a.at)) || a.key.localeCompare(b.key));
|
|
360
|
+
return out.slice(0, n);
|
|
361
|
+
}
|
|
344
362
|
/** What was kept that has no other store: the found documents, the Linked entries and the dates past stages ran. */
|
|
345
363
|
function foundOf(F, ini) {
|
|
346
364
|
const docs = [], linked = [], ran = {};
|
|
@@ -355,7 +373,7 @@ function foundOf(F, ini) {
|
|
|
355
373
|
}
|
|
356
374
|
// the initiative's prototype is the version it is at now, never an older round someone kept (2026-11-18)
|
|
357
375
|
const cur = currentOf(F, ini);
|
|
358
|
-
if (cur) docs.push({ id: 'fd-proto-' + hash(ini), title: one(`Prototype · Version ${cur.n}${cur.said || cur.title ? ': ' + (cur.said || cur.title) : ''}`, 140), source: 'PMOS, live round', at: cur.at, ref: '/api/lab/specimen?file=' + encodeURIComponent(cur.file), kind: 'prototype', claude: true, version: cur.n });
|
|
376
|
+
if (cur) docs.push({ id: 'fd-proto-' + hash(ini), title: one(`Prototype · Version ${cur.n}${cur.said || cur.title ? ': ' + (cur.said || cur.title) : ''}`, 140), source: 'PMOS, live round', at: cur.at, ref: '/api/lab/specimen?file=' + encodeURIComponent(cur.file), kind: 'prototype', claude: true, version: cur.n, round: cur.id });
|
|
359
377
|
docs.sort((a, b) => String(b.at).localeCompare(String(a.at)));
|
|
360
378
|
return docs.length || linked.length || Object.keys(ran).length ? { docs, linked, ran } : null;
|
|
361
379
|
}
|
|
@@ -548,5 +566,5 @@ function decorate(rows, F, items, o = {}) {
|
|
|
548
566
|
|
|
549
567
|
module.exports = {
|
|
550
568
|
LEDGER, GROUPS, TYPES, SOURCES, SOURCE_NAMES, RISK_DAYS, ledgerFile, read, readLines, append, fold, lessonsOf, clean, idOf, sigOf, itemSig, factsOf, tidyName, taskOf, lateOf,
|
|
551
|
-
datesOf, viewOf, foundOf, currentOf, historyOf, decorate, keptIds, newBatch, dn, isoN, md, hash, workday, staleOf, expiredSince, EXPIRE_DAYS, EXPIRE_WHY,
|
|
569
|
+
datesOf, viewOf, foundOf, currentOf, versionsOf, historyOf, decorate, keptIds, newBatch, dn, isoN, md, hash, workday, staleOf, expiredSince, EXPIRE_DAYS, EXPIRE_WHY,
|
|
552
570
|
};
|
|
@@ -91,6 +91,17 @@ function create(host) {
|
|
|
91
91
|
}
|
|
92
92
|
const win = () => { const d = (host.proactive() || {}).dayCheck || {}; return { start: d.start || '08:00', end: d.end || '18:00' }; };
|
|
93
93
|
const quiet = () => { const q = (host.proactive() || {}).quiet; return q && q.start && q.end ? q : null; };
|
|
94
|
+
// batch 31 item 2: how many meetings a day has (the meeting-day rhythm of a schedule with `busy`); none when the host cannot say
|
|
95
|
+
// The calendar files of the state dir (lib/calendar-events.js) are read at most once a minute; a host may answer instead (tests).
|
|
96
|
+
let calAt = 0, calEvents = [];
|
|
97
|
+
const busyDay = (dayMs) => {
|
|
98
|
+
try {
|
|
99
|
+
if (host.busyDay) return Number(host.busyDay(dayMs)) || 0;
|
|
100
|
+
const CE = require('./calendar-events.js'), t = now();
|
|
101
|
+
if (Math.abs(t - calAt) > 60000) { calAt = t; try { calEvents = CE.readAll(dir, { now: t }); } catch { calEvents = []; } }
|
|
102
|
+
return CE.meetingsOn(calEvents, dayMs);
|
|
103
|
+
} catch { return 0; }
|
|
104
|
+
};
|
|
94
105
|
const log = () => R.foldLog(R.readLog(dir));
|
|
95
106
|
/* self-heal (feedback batch 26 item 7): one repair record per skill source that reads a tool, in <state>/source-heal.json */
|
|
96
107
|
const healFile = () => path.join(dir, H.FILE);
|
|
@@ -109,7 +120,7 @@ function create(host) {
|
|
|
109
120
|
if (st.waiting_since || st.pending) return 'waiting';
|
|
110
121
|
const src = R.BY_ID.get(id);
|
|
111
122
|
if (src && src.run === 'skill') {
|
|
112
|
-
const slot = R.lastSlot(x.s, t, win());
|
|
123
|
+
const slot = R.lastSlot(x.s, t, win(), busyDay);
|
|
113
124
|
if (slot != null && (st.last_slot == null || slot > st.last_slot) && t - slot < 2 * 3600 * 1000) return 'due';
|
|
114
125
|
}
|
|
115
126
|
return 'ok';
|
|
@@ -297,7 +308,7 @@ function create(host) {
|
|
|
297
308
|
for (const src of R.SOURCES.filter((x) => x.run === 'skill')) {
|
|
298
309
|
const cur = R.readState(dir);
|
|
299
310
|
const st = { ...(cur[src.id] || {}), running: running(cur[src.id]) };
|
|
300
|
-
const d = R.decide(src, st, { now: t, settings: set, rules, win: win(), quiet: quiet(), runningCount: runningCount(cur), inputState: inputStateFn(set, cur, t), first });
|
|
311
|
+
const d = R.decide(src, st, { now: t, settings: set, rules, win: win(), busyDay, quiet: quiet(), runningCount: runningCount(cur), inputState: inputStateFn(set, cur, t), first });
|
|
301
312
|
if (d.act === 'none') continue;
|
|
302
313
|
const ws = (set.sources[src.id] && set.sources[src.id].ws) || (st.pending && st.pending.ws) || host.homeWs();
|
|
303
314
|
if (d.act === 'skip') {
|
|
@@ -372,7 +383,7 @@ function create(host) {
|
|
|
372
383
|
const due = [];
|
|
373
384
|
for (const src of R.SOURCES.filter((x) => x.run === 'skill' && x.group === 'tools')) {
|
|
374
385
|
const st = { ...(cur[src.id] || {}), running: running(cur[src.id]) };
|
|
375
|
-
const d = R.decide(src, st, { now: t, settings: set, rules, win: win(), quiet: quiet(), runningCount: runningCount(cur), inputState: inputStateFn(set, cur, t), first });
|
|
386
|
+
const d = R.decide(src, st, { now: t, settings: set, rules, win: win(), busyDay, quiet: quiet(), runningCount: runningCount(cur), inputState: inputStateFn(set, cur, t), first });
|
|
376
387
|
if (d.act === 'start' && AUTO.has(d.trigger) && !d.pressed) due.push({ src, d, ws: (set.sources[src.id] && set.sources[src.id].ws) || host.homeWs() });
|
|
377
388
|
}
|
|
378
389
|
const byWs = new Map();
|
|
@@ -491,8 +502,8 @@ function create(host) {
|
|
|
491
502
|
if (id === 'repo' && typeof patch.on === 'boolean') { try { host.setRepoWatch(patch.on); } catch (e) { warn('repository watch', e); } }
|
|
492
503
|
R.writeSettings(dir, set);
|
|
493
504
|
// A schedule change starts the clock from now: a slot that passed before the change is not run late.
|
|
494
|
-
if (norm && id !== 'daycheck') { const st = R.readState(dir); const sl = R.lastSlot(norm.s, now(), win()); st[id] = { ...(st[id] || {}), last_slot: sl, retry_at: null }; R.writeState(dir, st); }
|
|
495
|
-
if (patch.on === true && src.run === 'skill') { const st = R.readState(dir); const sl = R.lastSlot(cur.s, now(), win()); st[id] = { ...(st[id] || {}), last_slot: sl }; R.writeState(dir, st); }
|
|
505
|
+
if (norm && id !== 'daycheck') { const st = R.readState(dir); const sl = R.lastSlot(norm.s, now(), win(), busyDay); st[id] = { ...(st[id] || {}), last_slot: sl, retry_at: null }; R.writeState(dir, st); }
|
|
506
|
+
if (patch.on === true && src.run === 'skill') { const st = R.readState(dir); const sl = R.lastSlot(cur.s, now(), win(), busyDay); st[id] = { ...(st[id] || {}), last_slot: sl }; R.writeState(dir, st); }
|
|
496
507
|
return { ok: true, source: id };
|
|
497
508
|
}
|
|
498
509
|
function setRules(patch) {
|
|
@@ -508,7 +519,7 @@ function create(host) {
|
|
|
508
519
|
if (id === 'brief' && set.sources.tools && !set.sources.tools.on) { set.sources.tools.on = true; if (ws && !set.sources.tools.ws) set.sources.tools.ws = ws; }
|
|
509
520
|
set.migrated = true;
|
|
510
521
|
R.writeSettings(dir, set);
|
|
511
|
-
if (!was) { const st = R.readState(dir); st[id] = { ...(st[id] || {}), last_slot: R.lastSlot(cur.s, now(), win()) }; R.writeState(dir, st); }
|
|
522
|
+
if (!was) { const st = R.readState(dir); st[id] = { ...(st[id] || {}), last_slot: R.lastSlot(cur.s, now(), win(), busyDay) }; R.writeState(dir, st); }
|
|
512
523
|
return !was;
|
|
513
524
|
}
|
|
514
525
|
|
|
@@ -587,7 +598,7 @@ function create(host) {
|
|
|
587
598
|
for (const [k, v] of Object.entries(state)) view[k] = { ...v, running: running(v) };
|
|
588
599
|
let fr = []; try { fr = host.freshRows(ws) || []; } catch { fr = []; }
|
|
589
600
|
const fresh = new Map(fr.filter((x) => FRESH_OF[x.id]).map((x) => [x.id, x]));
|
|
590
|
-
return R.rowsOf({ now: t, settings: set, state: view, log: log(), fresh, win: win(), quiet: quiet(), jobSchedule: host.jobSchedule || null, ws });
|
|
601
|
+
return R.rowsOf({ now: t, settings: set, state: view, log: log(), fresh, win: win(), busyDay, quiet: quiet(), jobSchedule: host.jobSchedule || null, ws });
|
|
591
602
|
}
|
|
592
603
|
function rows(ws) { const set = settings(); return { rules: set.rules, quiet: quiet(), window: win(), rows: rowsFor(ws, set, now()) }; }
|
|
593
604
|
/** What lib/freshness.js shows as a skill's schedule, now that the schedule lives here. */
|
|
@@ -595,8 +606,11 @@ function create(host) {
|
|
|
595
606
|
const id = R.SKILL_OF.get(skill); if (!id) return null;
|
|
596
607
|
const set = settings(); const x = set.sources[id]; const st = R.readState(dir)[id] || {};
|
|
597
608
|
const l = log().lastRun(id);
|
|
598
|
-
const next = x.on ? R.nextSlot(x.s, now(), win()) : null;
|
|
599
|
-
|
|
609
|
+
const next = x.on ? R.nextSlot(x.s, now(), win(), busyDay) : null;
|
|
610
|
+
const missed = x.on ? R.missedSlot(x.s, now(), win(), { lastStart: l && l.start_at ? Date.parse(l.start_at) : NaN, running: running(st) || !!st.pending || !!st.waiting_since, busyDay,
|
|
611
|
+
handled: st.last_slot, skipped: (slot) => log().runs(id, 5).some((y) => y.result === 'skipped' && Date.parse(y.start_at) >= slot) }) : null;
|
|
612
|
+
// batch 31 item 2: `refresh` names the Settings › Connectors item page; `missed_at` turns the row line amber and shows ↻
|
|
613
|
+
return { refresh: id, cadence: x.on ? R.textOf(x.s) : 'off', time: null, day: null, next_run: next ? new Date(next).toISOString() : null, missed_at: missed ? new Date(missed).toISOString() : null,
|
|
600
614
|
last_run: l ? l.start_at : null, last_status: l ? (l.result === 'failed' ? 'fail' : l.result === 'done' ? 'ok' : 'started') : st.last_result || null,
|
|
601
615
|
checked_at: st.seen && st.seen.at ? new Date(st.seen.at).toISOString() : null,
|
|
602
616
|
same_since: st.seen && st.seen.since && st.seen.at > st.seen.since ? new Date(st.seen.since).toISOString() : null };
|