@codetreker/daynight 0.8.5 → 0.8.14

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 (77) hide show
  1. package/dist/api/client.d.ts +5 -1
  2. package/dist/api/client.js +104 -24
  3. package/dist/api/client.js.map +1 -1
  4. package/dist/api/index.d.ts +1 -1
  5. package/dist/api/index.js +1 -1
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/api/parse.d.ts +4 -4
  8. package/dist/api/parse.js +28 -4
  9. package/dist/api/parse.js.map +1 -1
  10. package/dist/api/types.d.ts +23 -1
  11. package/dist/cli/byte-output-helper.d.ts +1 -0
  12. package/dist/cli/byte-output-helper.js +48 -0
  13. package/dist/cli/byte-output-helper.js.map +1 -0
  14. package/dist/cli/byte-output.d.ts +7 -0
  15. package/dist/cli/byte-output.js +199 -0
  16. package/dist/cli/byte-output.js.map +1 -0
  17. package/dist/cli/context.d.ts +2 -0
  18. package/dist/cli/context.js +15 -9
  19. package/dist/cli/context.js.map +1 -1
  20. package/dist/cli/schema.js +6 -6
  21. package/dist/cli/schema.js.map +1 -1
  22. package/dist/commands/review/adapters/copilot.d.ts +3 -0
  23. package/dist/commands/review/adapters/copilot.js +16 -7
  24. package/dist/commands/review/adapters/copilot.js.map +1 -1
  25. package/dist/commands/review/adapters/github-review-state.d.ts +21 -0
  26. package/dist/commands/review/adapters/github-review-state.js +144 -0
  27. package/dist/commands/review/adapters/github-review-state.js.map +1 -0
  28. package/dist/commands/review/adapters/github.d.ts +2 -1
  29. package/dist/commands/review/adapters/github.js +31 -4
  30. package/dist/commands/review/adapters/github.js.map +1 -1
  31. package/dist/commands/review/coordinator.js +134 -7
  32. package/dist/commands/review/coordinator.js.map +1 -1
  33. package/dist/commands/review/model.d.ts +21 -0
  34. package/dist/commands/review/publication.d.ts +14 -0
  35. package/dist/commands/review/publication.js +47 -0
  36. package/dist/commands/review/publication.js.map +1 -0
  37. package/dist/commands/review/skills/daynight-review/SKILL.md +59 -20
  38. package/dist/commands/review/store.d.ts +20 -0
  39. package/dist/commands/review/store.js +134 -5
  40. package/dist/commands/review/store.js.map +1 -1
  41. package/dist/commands/server/runtime.d.ts +1 -1
  42. package/dist/commands/server/runtime.js +8 -1
  43. package/dist/commands/server/runtime.js.map +1 -1
  44. package/dist/commands/skill/agents.d.ts +1 -1
  45. package/dist/commands/skill/agents.js +1 -1
  46. package/dist/commands/skill/agents.js.map +1 -1
  47. package/dist/commands/skill/command.js +7 -5
  48. package/dist/commands/skill/command.js.map +1 -1
  49. package/dist/commands/skill/definition.js +3 -3
  50. package/dist/commands/skill/definition.js.map +1 -1
  51. package/dist/commands/skill/install.d.ts +2 -1
  52. package/dist/commands/skill/install.js +13 -5
  53. package/dist/commands/skill/install.js.map +1 -1
  54. package/dist/commands/skill/skills/using-daynight/SKILL.md +56 -0
  55. package/dist/commands/skill/skills/using-daynight/references/autopilot.md +71 -0
  56. package/dist/commands/skill/skills/using-daynight/references/create-task.md +103 -0
  57. package/dist/commands/skill/skills/using-daynight/references/handbook.md +74 -0
  58. package/dist/commands/skill/skills/using-daynight/references/run-task.md +80 -0
  59. package/dist/commands/skill/targets.d.ts +1 -0
  60. package/dist/commands/skill/targets.js +9 -2
  61. package/dist/commands/skill/targets.js.map +1 -1
  62. package/dist/commands/task/attachment-rendering.d.ts +5 -0
  63. package/dist/commands/task/attachment-rendering.js +38 -0
  64. package/dist/commands/task/attachment-rendering.js.map +1 -0
  65. package/dist/commands/task/attachment.d.ts +6 -0
  66. package/dist/commands/task/attachment.js +91 -0
  67. package/dist/commands/task/attachment.js.map +1 -0
  68. package/dist/commands/task/command.js +26 -6
  69. package/dist/commands/task/command.js.map +1 -1
  70. package/dist/commands/task/definition.js +54 -8
  71. package/dist/commands/task/definition.js.map +1 -1
  72. package/dist/commands/task/rendering.d.ts +2 -0
  73. package/dist/commands/task/rendering.js +26 -4
  74. package/dist/commands/task/rendering.js.map +1 -1
  75. package/package.json +3 -2
  76. package/dist/commands/skill/skills/daynight/SKILL.md +0 -95
  77. package/dist/commands/skill/skills/daynight/references/commands.md +0 -155
@@ -1,21 +1,42 @@
1
1
  import { stringifyApiJson } from "../../api/json.js";
2
2
  import { terminalText } from "../../platform/terminal.js";
3
3
  const identifiers = (values) => values.length === 0 ? "none" : values.map(terminalText).join(", ");
4
- export const renderTask = (task) => [
4
+ const taskIdentity = (task) => [
5
5
  `ID: ${terminalText(task.id)}`,
6
6
  `Project: ${terminalText(task.projectId)}`,
7
7
  `Title: ${terminalText(task.title)}`,
8
- `Description: ${terminalText(task.description)}`,
9
- `Status: ${terminalText(task.status)}`,
10
- `Version: ${task.version}`,
8
+ ];
9
+ const taskPullRequests = (task) => [
10
+ `Pull requests: ${task.properties.pullRequests.length}`,
11
+ ...task.properties.pullRequests.flatMap((pullRequest, index) => [
12
+ ` ${index + 1}. Title: ${terminalText(pullRequest.title)}`,
13
+ ` URL: ${terminalText(pullRequest.url)}`,
14
+ ]),
15
+ ];
16
+ const taskDependencies = (task) => [
11
17
  `Ready: ${task.ready}`,
12
18
  `Depends on: ${identifiers(task.dependsOn)}`,
13
19
  `Blocked by: ${identifiers(task.blockedBy)}`,
20
+ ];
21
+ export const renderTask = (task) => [
22
+ ...taskIdentity(task),
23
+ `Description: ${terminalText(task.description)}`,
24
+ ...taskPullRequests(task),
25
+ `Status: ${terminalText(task.status)}`,
26
+ `Version: ${task.version}`,
27
+ ...taskDependencies(task),
14
28
  `Created: ${terminalText(task.createdAt)}`,
15
29
  `Updated: ${terminalText(task.updatedAt)}`,
16
30
  "",
17
31
  ].join("\n");
18
32
  export const renderTaskList = (tasks) => tasks.length === 0 ? "No tasks.\n" : tasks.map(renderTask).join("\n");
33
+ export const renderTaskSummaryList = (tasks) => tasks.length === 0 ? "No tasks.\n" : tasks.map((task) => [
34
+ ...taskIdentity(task),
35
+ ...taskPullRequests(task),
36
+ `Status: ${terminalText(task.status)}`,
37
+ ...taskDependencies(task),
38
+ "",
39
+ ].join("\n")).join("\n");
19
40
  const renderGraphTask = (task) => [
20
41
  `ID: ${terminalText(task.id)}`,
21
42
  `Title preview: ${terminalText(task.titlePreview)}`,
@@ -46,4 +67,5 @@ export const renderTaskGraph = (graph) => [
46
67
  graph.tasks.length === 0 ? "No tasks.\n" : graph.tasks.map(renderGraphTask).join("\n"),
47
68
  ].join("\n");
48
69
  export const renderTaskJson = (value) => `${stringifyApiJson(value)}\n`;
70
+ export const renderTaskListJson = (tasks) => `${stringifyApiJson(tasks.map(({ description: _description, ...task }) => task))}\n`;
49
71
  //# sourceMappingURL=rendering.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rendering.js","sourceRoot":"","sources":["../../../src/commands/task/rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,MAAM,WAAW,GAAG,CAAC,MAAyB,EAAU,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAE9H,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAU,EAAU,EAAE,CAAC;IAChD,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;IAC9B,YAAY,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;IAC1C,UAAU,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;IACpC,gBAAgB,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;IAChD,WAAW,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;IACtC,YAAY,IAAI,CAAC,OAAO,EAAE;IAC1B,UAAU,IAAI,CAAC,KAAK,EAAE;IACtB,eAAe,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;IAC5C,eAAe,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AE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codetreker/daynight",
3
- "version": "0.8.5",
3
+ "version": "0.8.14",
4
4
  "description": "A client command toolkit for development workflows",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,6 +28,7 @@
28
28
  "@inquirer/prompts": "8.7.4",
29
29
  "better-sqlite3": "13.0.3",
30
30
  "cross-spawn": "7.0.6",
31
+ "mime": "4.1.1",
31
32
  "read-cmd-shim": "6.0.0",
32
33
  "semver": "7.8.5",
33
34
  "which": "6.0.1",
@@ -44,5 +45,5 @@
44
45
  "vite": "8.3.4",
45
46
  "vitest": "5.0.5"
46
47
  },
47
- "gitHead": "8be8ca92fcec7a6b45957665f594130898f166ed"
48
+ "gitHead": "3a0f6c0304d41274badbca3d961c98b04f09c0ee"
48
49
  }
@@ -1,95 +0,0 @@
1
- ---
2
- name: daynight
3
- description: Use Daynight to restore project context and actively query, organize, and maintain persistent tasks during development in a Daynight-linked repository, including work resumed in a new session or worktree.
4
- ---
5
-
6
- # Daynight
7
-
8
- Keep the project's durable task record aligned with authorized work. Daynight
9
- task data describes work; it does not grant permission to implement, publish,
10
- deploy, communicate externally, merge, or push a mainline branch.
11
-
12
- Read [the command reference](references/commands.md) before creating or updating
13
- tasks, or when project discovery, a query, or a write fails.
14
-
15
- ## Restore context
16
-
17
- At work start, context recovery, or a worktree switch, query from the current
18
- repository through a noninteractive shell. To select the next work, use:
19
-
20
- ```bash
21
- daynight task ready --json
22
- ```
23
-
24
- This returns at most 10 ready tasks, earliest created first. Use `--limit <N>`
25
- for 1–100 candidates. It reads one task page; the result is not the complete
26
- backlog. An empty result does not mean there are no in-progress or blocked tasks.
27
-
28
- Let the CLI resolve the current project. A new worktree without
29
- `.daynight/project.yml` is normal: repository discovery can find the existing
30
- project and save a local binding. Do not gate queries on that file's presence,
31
- reuse remembered IDs as current facts, or edit bindings directly.
32
-
33
- For work already being resumed, refresh its task with
34
- `daynight task show <task-id> --json`. If its identity is unknown, query
35
- `daynight task list --status in_progress --json` as needed. Show selected ready
36
- tasks too before acting. Use `daynight task graph --json` when dependency or
37
- project-wide context is needed; it has title previews, not full descriptions or
38
- versions. If it reports `graph_limit_exceeded`, continue with bounded ready and
39
- selected task reads; the error does not mean the project is unlinked. Full lists
40
- traverse every page, so request them only when a complete inventory is needed.
41
-
42
- If configuration, discovery, or a service request fails, preserve its actual
43
- cause. Follow the CLI's setup guidance or obtain an explicit project selection
44
- when needed; do not guess a server, choose among ambiguous projects, or create a
45
- project merely to make task recovery succeed.
46
-
47
- ## Maintain useful tasks
48
-
49
- Reuse an existing task whose scope matches the authorized work. Create durable
50
- tasks for independently understandable outcomes that need cross-session
51
- tracking, delivery verification, or handoff. Keep transient command steps in
52
- the agent's own execution plan. Repository requirements and design documents
53
- continue to own their full specifications.
54
-
55
- Write an outcome-focused title and a coherent description containing scope,
56
- acceptance, necessary decisions, current progress, blockers, and next action.
57
- Rewrite that description as the work changes; do not accumulate a running log.
58
- Express real prerequisites with dependencies.
59
-
60
- Start authorized work by setting `in_progress`. The only states are `todo`,
61
- `in_progress`, and `done`; readiness means a todo task's direct prerequisites are
62
- done. Neither readiness nor `in_progress` is an exclusive claim, lock, lease, or
63
- ownership guarantee. Coordinate concurrent work using observed task facts and
64
- the project's existing communication rules.
65
-
66
- Before changing any field, read the complete task and pass that exact observed
67
- version as `--if-version`. Preserve the full int64 decimal value. A conflict
68
- requires rereading and reconsidering the intended change, not replaying it with
69
- a newer version. Descriptions and dependency sets are complete replacements;
70
- the command reference explains clearing and omitted fields.
71
-
72
- Only report a write as successful after service confirmation. When a result is
73
- unconfirmed, reconcile it with service reads before taking another write action;
74
- do not blindly resend a create or update.
75
-
76
- ## Verify delivery before completion
77
-
78
- Development tasks, and design or documentation tasks delivered through PRs,
79
- remain `in_progress` until the hosting platform confirms that **all necessary
80
- delivery PRs are merged** and the task's acceptance criteria are satisfied.
81
- Code completion, an open PR, approved review, or passing CI does not meet this
82
- condition. Record PR URLs, outstanding checks, and waiting items while delivery
83
- is pending.
84
-
85
- Before setting `done`, query the platform's actual merge state for every required
86
- PR and retain its PR URL and merge commit reference in the task description.
87
- Then reread the task and update with its observed version. Missing merge
88
- visibility, a missing permission, or an unmet merge check keeps the task
89
- `in_progress`; the completion rule grants no merge authority. Tasks with no
90
- development or PR delivery path use their stated acceptance criteria.
91
-
92
- After confirmed completion, query `daynight task ready --json` to see which
93
- dependent tasks became available. A ready successor still needs authorization within the
94
- current scope before work starts. Refresh task facts at these semantic
95
- checkpoints; do not reload the full project on every conversational turn.
@@ -1,155 +0,0 @@
1
- # Daynight commands
2
-
3
- Use the installed `daynight` CLI. Run `daynight <group> <command> --help` when the
4
- installed version's usage is needed. Query results are service facts; do not use
5
- private API calls or manually edit `.daynight/project.yml`.
6
-
7
- ## Project discovery and reads
8
-
9
- ```bash
10
- daynight task ready --json
11
- daynight task ready --limit 20 --json
12
- daynight task show <task-id> --json
13
- daynight task list --status in_progress --json
14
- daynight task graph --json
15
- daynight task list --ready --json
16
- daynight project list --json
17
- daynight project show <project-id> --json
18
- ```
19
-
20
- Without `--project`, task commands resolve the current worktree's Git origin and
21
- verify its binding against the configured service. A unique discovery may write
22
- the ignored binding and update the root `.gitignore`. A missing binding is not a
23
- reason to skip discovery, including in a fresh linked worktree. No match,
24
- ambiguous matches, invalid binding, missing configuration, and network failure
25
- are different outcomes: report the actual diagnostic. Do not automatically
26
- create a project or change an existing association. The CLI's setup guidance
27
- owns service configuration.
28
-
29
- All task commands accept `--project <project-id>` for an explicitly established
30
- target; it applies to that invocation and bypasses repository binding discovery.
31
- Do not silently substitute a remembered project ID after discovery fails. Use
32
- project list/show to inspect candidates when an explicit selection is needed.
33
-
34
- `task ready` returns the first N ready tasks in `createdAt`, then ID ascending
35
- order. `--limit` defaults to 10 and accepts decimal integers in 1–100. It requests
36
- one task page without following its cursor and returns a full-task array of at
37
- most N elements. It accepts `--project` and `--json`, with no status or cursor
38
- option. A result with N tasks can have more candidates beyond it. An empty array
39
- means no ready work was found, not that the project has no tasks. `ready` means
40
- `todo` with every direct dependency done; it provides no ownership or priority.
41
-
42
- Use ready for routine work selection and show for the selected task or a known
43
- task being resumed. When its identity is unknown, query in-progress work as
44
- needed. `task list`, including `task list --ready`, reads every page and returns
45
- a complete array; reserve it for a complete inventory. List filters combine
46
- with AND. Task counts are bounded by ready, but full titles/descriptions and
47
- project discovery can still produce substantial output or additional requests.
48
-
49
- Use the graph when an overall dependency view is needed. It is one complete
50
- snapshot containing project metadata, summary, task IDs, title previews, status,
51
- readiness, and dependency/blocking IDs. It omits full descriptions and versions.
52
- `graph_limit_exceeded` reports the service's 1,000-node / 5,000-edge bound; no
53
- partial graph is returned. Continue with bounded ready and selected task reads.
54
- Other graph failures retain their own cause.
55
-
56
- ## Create and update
57
-
58
- In these examples, replace IDs with observed UUIDs and `observed-version` with
59
- the exact decimal version from the task details used to decide the update.
60
-
61
- ```bash
62
- daynight task create --title "Deliver sign-in" --description "Scope, acceptance, and handoff context"
63
- daynight task create --title "Deliver the sign-in page" --depends-on <task-id>
64
- daynight task update <task-id> --status in_progress --if-version <observed-version>
65
- daynight task update <task-id> --description "Complete revised task description" --if-version <observed-version>
66
- daynight task update <task-id> --depends-on <task-a> --depends-on <task-b> --if-version <observed-version>
67
- daynight task update <task-id> --clear-dependencies --if-version <observed-version>
68
- daynight task update <task-id> --description= --if-version <observed-version>
69
- ```
70
-
71
- Create starts in `todo`. Create and update do **not** accept `--json`; their
72
- success output contains the confirmed resource, including its ID and version.
73
- Read it before planning the next mutation. Only ready, list, show, and graph task
74
- queries accept `--json`.
75
-
76
- An update must change at least one of title, description, status, or dependencies.
77
- Omitted fields remain unchanged. A provided description replaces the entire
78
- description; `--description=` or `--description ""` clears it. Repeated
79
- `--depends-on` supplies the **complete** replacement set, not additions; retain
80
- each still-required dependency. Values are individual UUIDs, not CSV. Use
81
- `--clear-dependencies` to empty the set; it conflicts with `--depends-on`.
82
- Text options accept `--option=value`; use that form when a value starts with a
83
- dash. Preserve server validation errors rather than silently altering inputs.
84
-
85
- ## Preserve the version read with the task
86
-
87
- Every update based on task content must use that read's `--if-version`. Omitting
88
- it makes the CLI read a newer version immediately before submission, which does
89
- not protect a decision based on older content. Read once, decide from those
90
- details, and submit that version. After another mutation, obtain or use the
91
- confirmed resulting resource before deciding the next update.
92
-
93
- Versions are JSON numbers in `1..9223372036854775807`. Preserve the original
94
- decimal digits; ordinary JavaScript numeric decoding can round them. Copy the
95
- raw decimal token or use a lossless JSON decoder. Node.js 24 can retain the raw
96
- token through the reviver's `context.source`, for example:
97
-
98
- ```js
99
- const task = JSON.parse(rawTaskJson, (key, value, context) =>
100
- key === "version" && typeof value === "number" ? context.source : value,
101
- );
102
- const observedVersion = task.version; // Decimal string for --if-version.
103
- ```
104
-
105
- On `version_conflict`, show the task again, understand the concurrent change,
106
- and reconsider the proposed fields against the new facts. Do not merely replace
107
- the version and replay the old update. A dependency refusal likewise needs its
108
- reported prerequisite, cross-project reference, or cycle addressed within the
109
- authorized scope. Setting `in_progress` never atomically claims the task.
110
-
111
- ## Unconfirmed writes and failures
112
-
113
- The CLI does not retry failed writes automatically. Preserve error codes,
114
- request IDs, task IDs, and actual service diagnostics. A confirmed service
115
- refusal is a failed operation. A lost response, timeout, cancellation, or other
116
- unconfirmed result may have left a write applied: do not report success or
117
- blindly resend it.
118
-
119
- For an unconfirmed update, show the known task and compare its complete current
120
- fields with the intended change. If the intended state is present, report the
121
- observed state without claiming proof of which writer produced it. If it is
122
- absent or has changed, reconcile the facts and decide what remains necessary;
123
- any later update needs the exact version read for that decision.
124
-
125
- For an unconfirmed create, list tasks in the established project and inspect
126
- plausible matches with show. Match the intended title, full description,
127
- dependencies, and operation context; title alone is not a unique identity. A
128
- unique matching candidate must have its identity established before treating it
129
- as the created task. With zero candidates, multiple candidates, or unresolved
130
- identity, keep the create unconfirmed and explain the minimum needed
131
- reconciliation. Do not create again merely because a read returned no match.
132
-
133
- ## Completion and dependencies
134
-
135
- For development and PR-delivered design/documentation tasks, inspect the hosting
136
- platform for every necessary delivery PR. Each must be confirmed merged and all
137
- acceptance criteria satisfied before this update is valid:
138
-
139
- ```bash
140
- daynight task update <task-id> --status done --description "Complete task description, acceptance evidence, PR URLs, and merge commit references" --if-version <observed-version>
141
- ```
142
-
143
- Use a fresh task read for this decision. Keep the complete relevant description
144
- when adding delivery references. If a PR remains open, even with passing CI and
145
- approved review, retain `in_progress` and record the PR plus remaining checks or
146
- waiting items. If merge visibility is unavailable, keep completion unconfirmed
147
- and retain `in_progress`. Use the repository host's native client or API to
148
- verify merge facts; do not assume a particular hosting service. Do not merge
149
- without the applicable authorization. Nondevelopment tasks with no PR delivery
150
- path use their explicit acceptance criteria.
151
-
152
- After the service confirms `done`, query `daynight task ready --json` to inspect
153
- newly available successors. Query the graph when overall dependency context is
154
- needed. Pending or unconfirmed completion must not be presented as having
155
- unblocked a dependent task.