daily-focus 1.2.0-dev.5 → 1.2.0-dev.8
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/README.md +12 -11
- package/SETUP.md +9 -6
- package/dist/{audit-ITRXIX6T.js → audit-DNTFZOHH.js} +6 -5
- package/dist/{chunk-AIQO2YAI.js → chunk-6SMUSPZG.js} +2 -2
- package/dist/{chunk-26JG3D5C.js → chunk-GQ3NCWRT.js} +113 -272
- package/dist/{chunk-RNE27FQY.js → chunk-KZNY45XW.js} +0 -5
- package/dist/{chunk-UY6HQLGE.js → chunk-P3E2B2SD.js} +1 -1
- package/dist/cli.js +6 -6
- package/dist/{demo-KVFAVGO7.js → demo-6Q22AAC7.js} +33 -24
- package/dist/{init-57WHZZNG.js → init-XDMAXU2S.js} +1 -9
- package/dist/{seed-VALN2TCQ.js → seed-TWT7EDXJ.js} +3 -3
- package/dist/{server-SOCS3SZJ.js → server-PIYOIUKJ.js} +336 -251
- package/dist/{service-NAAAV67B.js → service-ZUHI3VKH.js} +1 -1
- package/package.json +1 -1
- package/prompts/README.md +2 -3
- package/prompts/morning-brief-personal.md +1 -25
- package/prompts/morning-brief-work.md +8 -33
- package/public/app.js +175 -345
- package/public/style.css +12 -170
package/dist/cli.js
CHANGED
|
@@ -49,7 +49,7 @@ function shouldOpen(flag) {
|
|
|
49
49
|
return flag && process.stdout.isTTY === true && !process.env.CI;
|
|
50
50
|
}
|
|
51
51
|
async function demo(open, profile) {
|
|
52
|
-
const { demoEnv, demoIntegrations, demoProfile, writeDemoStore } = await import("./demo-
|
|
52
|
+
const { demoEnv, demoIntegrations, demoProfile, writeDemoStore } = await import("./demo-6Q22AAC7.js");
|
|
53
53
|
const chosen = demoProfile(profile);
|
|
54
54
|
const store = await mkdtemp(join(tmpdir(), "daily-focus-demo-"));
|
|
55
55
|
process.on("exit", () => rmSync(store, { recursive: true, force: true }));
|
|
@@ -65,7 +65,7 @@ async function demo(open, profile) {
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
async function start(open, onStarted, options = {}) {
|
|
68
|
-
const { runServer } = await import("./server-
|
|
68
|
+
const { runServer } = await import("./server-PIYOIUKJ.js");
|
|
69
69
|
await runServer({
|
|
70
70
|
...options,
|
|
71
71
|
onStarted: (url) => {
|
|
@@ -162,20 +162,20 @@ async function main(argv) {
|
|
|
162
162
|
}
|
|
163
163
|
return start(open);
|
|
164
164
|
case "service": {
|
|
165
|
-
const { main: service } = await import("./service-
|
|
165
|
+
const { main: service } = await import("./service-ZUHI3VKH.js");
|
|
166
166
|
process.exitCode = await service(values.remove ? ["--remove"] : []);
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
// These three are scripts that do their work as they load, and read their
|
|
170
170
|
// own flags from the command line.
|
|
171
171
|
case "init":
|
|
172
|
-
await import("./init-
|
|
172
|
+
await import("./init-XDMAXU2S.js");
|
|
173
173
|
return;
|
|
174
174
|
case "audit":
|
|
175
|
-
await import("./audit-
|
|
175
|
+
await import("./audit-DNTFZOHH.js");
|
|
176
176
|
return;
|
|
177
177
|
case "seed":
|
|
178
|
-
await import("./seed-
|
|
178
|
+
await import("./seed-TWT7EDXJ.js");
|
|
179
179
|
return;
|
|
180
180
|
case "build-calendar":
|
|
181
181
|
return buildCalendar();
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
dateFromNow,
|
|
6
6
|
sampleBrief,
|
|
7
7
|
sampleGeneratedAt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P3E2B2SD.js";
|
|
9
9
|
import {
|
|
10
10
|
PROFILES,
|
|
11
11
|
localDateKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KZNY45XW.js";
|
|
13
13
|
import "./chunk-BC2W7NND.js";
|
|
14
14
|
|
|
15
15
|
// src/demo.ts
|
|
@@ -77,7 +77,6 @@ function demoEnv(base, store, profile) {
|
|
|
77
77
|
DAILY_FOCUS_WORK_START: "",
|
|
78
78
|
DAILY_FOCUS_WORK_END: "",
|
|
79
79
|
DAILY_FOCUS_MIN_FREE_WINDOW: "",
|
|
80
|
-
DAILY_FOCUS_SESSION_MINUTES: "",
|
|
81
80
|
DAILY_FOCUS_STALE_AFTER_HOURS: ""
|
|
82
81
|
};
|
|
83
82
|
}
|
|
@@ -156,7 +155,7 @@ function demoPulls(profile, now = /* @__PURE__ */ new Date()) {
|
|
|
156
155
|
lastActivityByYou: daysAgo(now, 1),
|
|
157
156
|
lastActivityByOthers: { at: hoursAgo(now, 2), login: "chris", kind: "review" }
|
|
158
157
|
}),
|
|
159
|
-
// Waiting on reviewers: one long enough to ask, one fresh.
|
|
158
|
+
// Waiting on reviewers: one long enough to ask, one fresh, and one nudged this morning.
|
|
160
159
|
pull({
|
|
161
160
|
repo: "acme/webapp",
|
|
162
161
|
number: 3395,
|
|
@@ -175,6 +174,15 @@ function demoPulls(profile, now = /* @__PURE__ */ new Date()) {
|
|
|
175
174
|
requestedReviewers: ["dana", "eli"],
|
|
176
175
|
mergeStateStatus: "BLOCKED"
|
|
177
176
|
}),
|
|
177
|
+
pull({
|
|
178
|
+
repo: "acme/webapp",
|
|
179
|
+
number: 3405,
|
|
180
|
+
title: "Sample session replays by route",
|
|
181
|
+
createdAt: daysAgo(now, 2),
|
|
182
|
+
reviewDecision: "REVIEW_REQUIRED",
|
|
183
|
+
requestedReviewers: ["chris"],
|
|
184
|
+
mergeStateStatus: "BLOCKED"
|
|
185
|
+
}),
|
|
178
186
|
// Waiting on the merge gate: approved, and the repository's own policy check still pending.
|
|
179
187
|
pull({
|
|
180
188
|
repo: "acme/webapp",
|
|
@@ -321,12 +329,26 @@ function ticket(key, summary, workflowStatus, issueType, prs) {
|
|
|
321
329
|
allPrsClosed: prs === "closed"
|
|
322
330
|
};
|
|
323
331
|
}
|
|
324
|
-
function demoTickets() {
|
|
332
|
+
function demoTickets(now = /* @__PURE__ */ new Date()) {
|
|
325
333
|
return {
|
|
326
334
|
tickets: [
|
|
327
335
|
// Every pull request closed, and the ticket not Done.
|
|
328
336
|
ticket("PROJ-8842", "Add trace context to outgoing fetches", "In Review", "Task", "closed"),
|
|
329
|
-
|
|
337
|
+
// The same, known only from GitHub: Jira still has the pull request open.
|
|
338
|
+
{
|
|
339
|
+
...ticket("PLAT-311", "Remove the legacy beacon endpoint", "In Progress", "Task", "closed"),
|
|
340
|
+
pulls: [
|
|
341
|
+
{
|
|
342
|
+
repo: "acme/infra",
|
|
343
|
+
number: 514,
|
|
344
|
+
title: "PLAT-311: drop the /v1/beacon route",
|
|
345
|
+
url: "https://github.com/acme/infra/pull/514",
|
|
346
|
+
state: "merged",
|
|
347
|
+
closedAt: hoursAgo(now, 5)
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
fromGitHub: true
|
|
351
|
+
},
|
|
330
352
|
// A pull request open while the status says the work has not begun.
|
|
331
353
|
ticket("PROJ-8871", "Instrument long tasks on the main thread", "To Do", "Story", "open"),
|
|
332
354
|
ticket("PROJ-8877", "Document the sampling knobs", "To Do", "Task", "open"),
|
|
@@ -366,6 +388,10 @@ function demoIntegrations(profile) {
|
|
|
366
388
|
async fetch() {
|
|
367
389
|
return { tickets: world.tickets.map((entry) => ({ ...entry })), statuses: world.statuses, warnings: [] };
|
|
368
390
|
},
|
|
391
|
+
// The sample tickets already carry what GitHub would have added.
|
|
392
|
+
async linked() {
|
|
393
|
+
return { byKey: /* @__PURE__ */ new Map(), complete: true, warnings: [] };
|
|
394
|
+
},
|
|
369
395
|
async transition(_acli, key, status) {
|
|
370
396
|
const found = world.tickets.find((entry) => entry.key === key);
|
|
371
397
|
if (!found) throw new Error(`no work item ${key} in the sample data`);
|
|
@@ -551,6 +577,7 @@ function demoActions(profile, now) {
|
|
|
551
577
|
{ id: "github:pr:acme/webapp#3360", action: "note", text: "Revisit after the v6 cut", at: daysAgo(now, 1) },
|
|
552
578
|
{ id: "github:pr:acme/webapp#3360", action: "snooze", until: until(30), at: daysAgo(now, 1) },
|
|
553
579
|
{ id: "jira:PROJ-8865", action: "note", text: "Docs only \u2014 no pull request expected", at: daysAgo(now, 1) },
|
|
580
|
+
{ id: "github:pr:acme/webapp#3405", action: "nudge", at: hoursAgo(now, 3) },
|
|
554
581
|
{ id: "github:pr:acme/webapp#3430", action: "done", at: minutesAgo(now, 140) },
|
|
555
582
|
{ id: "email:thread:18f31c0d9e", action: "note", text: "Registration runs to the 28th; no rush", at: minutesAgo(now, 131) },
|
|
556
583
|
{ id: "email:thread:18f31c0d9e", action: "snooze", until: until(7), at: minutesAgo(now, 130) },
|
|
@@ -578,23 +605,6 @@ function demoActions(profile, now) {
|
|
|
578
605
|
];
|
|
579
606
|
return actions.sort((a, b) => a.at.localeCompare(b.at));
|
|
580
607
|
}
|
|
581
|
-
function demoSessions(profile, now) {
|
|
582
|
-
const session = (id, title, startMinutesAgo, actualMinutes, advancesObjective, endedBy) => ({
|
|
583
|
-
id,
|
|
584
|
-
title,
|
|
585
|
-
startedAt: minutesAgo(now, startMinutesAgo),
|
|
586
|
-
endedAt: minutesAgo(now, startMinutesAgo - actualMinutes),
|
|
587
|
-
plannedMinutes: 25,
|
|
588
|
-
actualMinutes,
|
|
589
|
-
reachedTarget: actualMinutes >= 25,
|
|
590
|
-
advancesObjective,
|
|
591
|
-
endedBy
|
|
592
|
-
});
|
|
593
|
-
return profile === "work" ? [
|
|
594
|
-
session("github:pr:acme/webapp#3402", "CI failing on your PR: Add trace context to fetch instrumentation", 190, 22, false, "away"),
|
|
595
|
-
session("gtasks:task:MTU3NDkyODkwMjE2NDcx", "Write up the staging repro steps for the checkout breakage", 150, 42, true, "user")
|
|
596
|
-
] : [session("email:thread:19a0c4e2f1", "Chase Nordvarme for the loft insulation quote", 80, 18, true, "user")];
|
|
597
|
-
}
|
|
598
608
|
function runLines(seed) {
|
|
599
609
|
const endedAt = new Date(new Date(seed.startedAt).getTime() + seed.seconds * 1e3).toISOString();
|
|
600
610
|
const lines2 = [{ event: "started", run: seed.id, cli: "codex", trigger: seed.trigger, at: seed.startedAt }];
|
|
@@ -844,7 +854,6 @@ async function writeDemoStore(store, profile, now = /* @__PURE__ */ new Date())
|
|
|
844
854
|
await writeFile(join(store, "focus.md"), FOCUS[profile], "utf8");
|
|
845
855
|
await writeFile(join(store, "sources.md"), SOURCES[profile], "utf8");
|
|
846
856
|
await writeFile(join(store, "actions.jsonl"), lines(demoActions(profile, now)), "utf8");
|
|
847
|
-
await writeFile(join(store, "sessions.jsonl"), lines(demoSessions(profile, now)), "utf8");
|
|
848
857
|
await writeFile(join(store, "agent.jsonl"), lines(demoAgentLog(profile, now)), "utf8");
|
|
849
858
|
await writeFile(join(store, "assistant.jsonl"), lines(demoAssistantLog(profile, now)), "utf8");
|
|
850
859
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-QKT2FAB5.js";
|
|
9
9
|
import {
|
|
10
10
|
loadConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KZNY45XW.js";
|
|
12
12
|
import {
|
|
13
13
|
PACKAGED,
|
|
14
14
|
command
|
|
@@ -78,15 +78,7 @@ for (const outcome of await linkStore(config)) {
|
|
|
78
78
|
section("Files you do not own");
|
|
79
79
|
kept("items.json", "the briefing agent writes it; absent reads as no brief yet");
|
|
80
80
|
kept("actions.jsonl", "the dashboard appends to it as you action things");
|
|
81
|
-
kept("sessions.jsonl", "the dashboard appends to it as you run focus sessions");
|
|
82
81
|
kept("assistant.jsonl", "the dashboard appends to it as you ask the assistant for help");
|
|
83
|
-
if (platform() !== "darwin") {
|
|
84
|
-
section("Note");
|
|
85
|
-
kept(
|
|
86
|
-
"idle detection is macOS-only",
|
|
87
|
-
"focus sessions still work; they just fall back to the two-hour backstop instead of closing when you walk away"
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
82
|
var next = [];
|
|
91
83
|
if (wroteFocus) next.push(`Edit ${config.focusFile} \u2014 say what you are trying to achieve.`);
|
|
92
84
|
if (wroteSources) next.push(`Edit ${config.sourcesFile} \u2014 say where to look.`);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sampleBrief
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P3E2B2SD.js";
|
|
4
4
|
import {
|
|
5
5
|
Store
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GQ3NCWRT.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KZNY45XW.js";
|
|
10
10
|
import {
|
|
11
11
|
command
|
|
12
12
|
} from "./chunk-BC2W7NND.js";
|