@codetreker/daynight 0.20.2 → 0.21.2
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/dist/cli/commands.js +0 -2
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/context.d.ts +0 -1
- package/dist/cli/context.js +0 -2
- package/dist/cli/context.js.map +1 -1
- package/dist/commands/completion/setup.js +4 -2
- package/dist/commands/completion/setup.js.map +1 -1
- package/dist/commands/review/command.js +2 -3
- package/dist/commands/review/command.js.map +1 -1
- package/dist/commands/review/config.js +1 -1
- package/dist/commands/review/config.js.map +1 -1
- package/dist/commands/review/configuration-guide.d.ts +3 -0
- package/dist/commands/review/configuration-guide.js +83 -0
- package/dist/commands/review/configuration-guide.js.map +1 -0
- package/dist/commands/skill/skills/using-daynight/SKILL.md +22 -20
- package/dist/commands/skill/skills/using-daynight/references/autopilot.md +8 -2
- package/dist/commands/skill/skills/using-daynight/references/create-task.md +47 -57
- package/dist/commands/skill/skills/using-daynight/references/goal.md +35 -21
- package/dist/commands/skill/skills/using-daynight/references/handbook.md +32 -19
- package/dist/commands/skill/skills/using-daynight/references/handoff.md +102 -0
- package/dist/commands/skill/skills/using-daynight/references/run-task.md +25 -20
- package/dist/commands/skill/skills/using-daynight/references/task-content.md +132 -0
- package/dist/config/server-token.d.ts +0 -1
- package/dist/config/server-token.js +0 -1
- package/dist/config/server-token.js.map +1 -1
- package/package.json +2 -2
- package/dist/cli/input.d.ts +0 -4
- package/dist/cli/input.js +0 -40
- package/dist/cli/input.js.map +0 -1
- package/dist/commands/setup/command.d.ts +0 -2
- package/dist/commands/setup/command.js +0 -28
- package/dist/commands/setup/command.js.map +0 -1
- package/dist/commands/setup/definition.d.ts +0 -2
- package/dist/commands/setup/definition.js +0 -13
- package/dist/commands/setup/definition.js.map +0 -1
- package/dist/config/setup.d.ts +0 -9
- package/dist/config/setup.js +0 -132
- package/dist/config/setup.js.map +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Task content standard
|
|
2
|
+
|
|
3
|
+
Read this reference when creating, breaking down, handing off, or executing a
|
|
4
|
+
task. An isolated executor does not inherit the originating chat, memory,
|
|
5
|
+
private worktree, temporary files, or session-only authorization. The description
|
|
6
|
+
and its readable references must together explain the current task completely.
|
|
7
|
+
Use the target repository's document and language rules.
|
|
8
|
+
|
|
9
|
+
## Six content requirements
|
|
10
|
+
|
|
11
|
+
These are content requirements, not six mandatory headings. Provide each item
|
|
12
|
+
in the description, in clearly referenced documents, or through a mixture of
|
|
13
|
+
both. Complete inline content needs no primary attachment; do not duplicate
|
|
14
|
+
complete documents or keep empty template sections.
|
|
15
|
+
|
|
16
|
+
| Content | Required information |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Objective and requirements | The concrete problem, intended outcome, and required behavior. Use requirement IDs when they help acceptance. |
|
|
19
|
+
| Scope and deliverables | This task's responsibility, outputs, constraints, and boundaries. Identify its applicable parts of shared documents. |
|
|
20
|
+
| Solution and design | The approach, decisions, and architecture constraints needed for this stage, or their actual source. A design-producing task states its inputs, questions, outputs, and confirmation gate. |
|
|
21
|
+
| Input and output contracts | Actual producers or consumers, delivery and reading locations, exchanged structure and semantics, availability, and verification. Explicitly say when there is no task-to-task exchange. |
|
|
22
|
+
| Acceptance criteria and verification | Observable completion conditions, methods, applicable success/failure/boundary cases, and the location of evidence. Requirement and acceptance IDs may establish correspondence. |
|
|
23
|
+
| Sources | Accurate source identities, applicable sections, and purpose for required content and supporting material. One source can cover several items. |
|
|
24
|
+
|
|
25
|
+
The description must identify the concrete current work and responsibility and
|
|
26
|
+
make its content sources discoverable. Judge completeness from the description
|
|
27
|
+
and the contents actually read, not heading presence or whether the description
|
|
28
|
+
repeats the documents. A bare generic problem plus unexplained links, "see the
|
|
29
|
+
previous discussion", unreadable resources, and missing decisions are insufficient.
|
|
30
|
+
|
|
31
|
+
## Content ownership and evidence
|
|
32
|
+
|
|
33
|
+
Each detailed explanation has one owner: the description, a referenced task
|
|
34
|
+
attachment, or its actual shared source. Keep shared requirements, architecture,
|
|
35
|
+
and protocols at their owning task. Record this task's user confirmations,
|
|
36
|
+
acceptance conclusions, and delivery evidence in an explicitly identified
|
|
37
|
+
location in its own description or attachments; do not leave them only in chat
|
|
38
|
+
or mix them into shared design. Rewrite the owning material coherently when its
|
|
39
|
+
facts change rather than accumulating an execution log.
|
|
40
|
+
|
|
41
|
+
For example, a description may identify an upload retry task, reference its own
|
|
42
|
+
`plan.md` for requirements R1–R3 and acceptance AC1–AC4, identify the architecture
|
|
43
|
+
task and `design/upload.md` sections for shared interfaces, and place this task's
|
|
44
|
+
acceptance evidence in `plan.md`. Those identities and paths must be real and
|
|
45
|
+
verified. A simple maintenance task can instead state the approach, contract,
|
|
46
|
+
acceptance, and evidence location inline.
|
|
47
|
+
|
|
48
|
+
## Resolve and read sources
|
|
49
|
+
|
|
50
|
+
Description-relative links and images start at the current task's attachment
|
|
51
|
+
root; references inside a Markdown attachment start at its containing directory.
|
|
52
|
+
Keep paths inside the task root and preserve case and resource identity. Confirm
|
|
53
|
+
uploaded contents before adding their links. Shared task sources identify the
|
|
54
|
+
owning task ID and content location: its description and applicable sections for
|
|
55
|
+
inline content, or the complete attachment path for an actual attachment. Name
|
|
56
|
+
the whole description when all of it applies; sections only delimit a larger
|
|
57
|
+
source and do not require invented headings. Read source task descriptions with
|
|
58
|
+
`task show --json`; list and read attachment
|
|
59
|
+
contents separately with the installed attachment commands. Repository documents
|
|
60
|
+
need accurate paths and the required verified immutable source revision. State
|
|
61
|
+
the sections, requirements, or interfaces applicable to this task when a source
|
|
62
|
+
covers more. Do not invent an attachment path for inline content, relocate or
|
|
63
|
+
copy it merely to satisfy a reference format, or invent a URL scheme, cross-task
|
|
64
|
+
relative link, or fixed service host.
|
|
65
|
+
|
|
66
|
+
Read the required source contents, including further references needed for the
|
|
67
|
+
current stage. Track already-read resource identities to avoid circular reading.
|
|
68
|
+
A reference cycle that supplies no actual required content cannot pass. Limit
|
|
69
|
+
traversal to this task's requirements; it does not authorize redesigning a Goal
|
|
70
|
+
or executing related tasks. Resolve material conflicts between the description
|
|
71
|
+
and sources or between sources before declaring the content sufficient.
|
|
72
|
+
|
|
73
|
+
Every Goal delivery task's description must directly list the architecture task
|
|
74
|
+
ID and all required architecture source locations, including indirect successors.
|
|
75
|
+
For inline architecture, name the source task's description and applicable
|
|
76
|
+
sections. For each actual required attachment document, include its full path;
|
|
77
|
+
for repository architecture, retain the owning task ID and a verified immutable
|
|
78
|
+
reference. An entry only in another task or inside an attachment is insufficient.
|
|
79
|
+
[The Goal protocol](goal.md) owns this additional source-index requirement and
|
|
80
|
+
its registration checks.
|
|
81
|
+
|
|
82
|
+
## Input and output contracts
|
|
83
|
+
|
|
84
|
+
Describe actual exchanges rather than inventing an interface to fill a template.
|
|
85
|
+
As applicable, include fields, types, requiredness, format or version, examples,
|
|
86
|
+
and the units, states, errors, and null semantics needed by consumers. APIs, CLI
|
|
87
|
+
output, files, database records, attachments, and design conclusions can all be
|
|
88
|
+
exchanged outputs. Check the relevant producer and consumer explanations for
|
|
89
|
+
consistency and distinguish their responsibilities.
|
|
90
|
+
|
|
91
|
+
For example, an upload protocol may define a required multipart `file`, a
|
|
92
|
+
10 MiB limit, a `201` response containing a UUID `id`, `name`, and byte-count
|
|
93
|
+
`size`, a nonretryable `413 file_too_large`, and a `503 temporarily_unavailable`
|
|
94
|
+
that permits user-initiated retry. Provider and consumer tasks reference the same
|
|
95
|
+
protocol and state their own delivery locations and availability.
|
|
96
|
+
|
|
97
|
+
Actual prerequisites remain in the complete `dependsOn` set and its
|
|
98
|
+
`externalDependsOn` subset. Contract source identities do not form a second
|
|
99
|
+
complete dependency list, and a source reference does not create an execution
|
|
100
|
+
dependency. Use [the handbook](handbook.md) for relationship semantics.
|
|
101
|
+
|
|
102
|
+
## Apply the current stage
|
|
103
|
+
|
|
104
|
+
| Stage | Sufficient starting content | Stage outputs |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| Requirements discussion | Known problem, outcome, scope, open questions, and user-confirmation method | Complete requirements, applicable prototype, and user confirmation |
|
|
107
|
+
| Solution or architecture discussion | Confirmed requirements, applicable prototype, design questions, and confirmation method | Design and candidate breakdown; actual registration after confirmation |
|
|
108
|
+
| Implementation or document delivery | Defined requirements and scope, delivered design and applicable prototype, contracts, and acceptance | The scoped deliverable and its delivery evidence |
|
|
109
|
+
| Independent final acceptance | Whole agreed requirements and confirmed changes, actual deliveries and evidence sources | Requirement-based conclusions, defects, and unverified items |
|
|
110
|
+
|
|
111
|
+
A stage's unfinished outputs are not prerequisites for starting that stage.
|
|
112
|
+
Preserve human confirmation as an actual completion condition where required.
|
|
113
|
+
Explicit prerequisite-produced implementation outputs may still be pending when
|
|
114
|
+
preparing a blocked task, provided the necessary design and agreed interfaces
|
|
115
|
+
already define the successor's work. Do not label future output as an existing
|
|
116
|
+
readable input. Execution still waits for real prerequisites and required inputs.
|
|
117
|
+
|
|
118
|
+
## Check sufficiency
|
|
119
|
+
|
|
120
|
+
Before reporting creation, breakdown, or handoff ready, check all six items,
|
|
121
|
+
source readability and applicability, task-specific evidence ownership, and the
|
|
122
|
+
stage's additional conditions. Unknown requirements, design choices, acceptance
|
|
123
|
+
thresholds, and interface decisions are concrete blockers, not details to invent.
|
|
124
|
+
Only organize confirmed information within existing authorization. A material
|
|
125
|
+
scope or behavior change requires user confirmation.
|
|
126
|
+
|
|
127
|
+
Task versions protect task metadata, not independently mutable attachments or
|
|
128
|
+
cross-task references. Verify mutable contents before enabling permission and
|
|
129
|
+
read the required contents again before execution. Reassess affected content
|
|
130
|
+
when it changes. A content check is not an atomic freeze or permanent
|
|
131
|
+
certification of future sources. [Handoff](handoff.md) owns permission-update
|
|
132
|
+
and read-only re-audit behavior.
|
|
@@ -10,5 +10,4 @@ export const validateTokenTransport = (serverUrl) => {
|
|
|
10
10
|
return;
|
|
11
11
|
throw new Error("serverToken requires an HTTPS server origin or loopback HTTP for development.");
|
|
12
12
|
};
|
|
13
|
-
export const parseServerTokenInput = (input) => validateServerToken(input.replace(/\r?\n$/, ""));
|
|
14
13
|
//# sourceMappingURL=server-token.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-token.js","sourceRoot":"","sources":["../../src/config/server-token.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAU,EAAE;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;IACtH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAQ,EAAE;IAChE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,WAAW,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO;IAChL,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;AACnG,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"server-token.js","sourceRoot":"","sources":["../../src/config/server-token.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAU,EAAE;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CAAC,kGAAkG,CAAC,CAAC;IACtH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAQ,EAAE;IAChE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,KAAK,WAAW,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO;IAChL,MAAM,IAAI,KAAK,CAAC,+EAA+E,CAAC,CAAC;AACnG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codetreker/daynight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "A client command toolkit for development workflows",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"vite": "8.3.4",
|
|
48
48
|
"vitest": "5.0.5"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "a473cd5917a0e137fd668e02a2de71aabc448e7c"
|
|
51
51
|
}
|
package/dist/cli/input.d.ts
DELETED
package/dist/cli/input.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { CliCancelledError } from "./cancellation.js";
|
|
2
|
-
export const readSecretStdin = async (signal, input = process.stdin) => {
|
|
3
|
-
signal.throwIfAborted();
|
|
4
|
-
if (input.isTTY === true)
|
|
5
|
-
throw new Error("--server-token-stdin requires piped input; run daynight login for interactive authentication.");
|
|
6
|
-
return new Promise((resolve, reject) => {
|
|
7
|
-
const chunks = [];
|
|
8
|
-
let bytes = 0;
|
|
9
|
-
const cleanup = () => {
|
|
10
|
-
input.pause();
|
|
11
|
-
input.off("data", data);
|
|
12
|
-
input.off("end", end);
|
|
13
|
-
input.off("error", fail);
|
|
14
|
-
signal.removeEventListener("abort", abort);
|
|
15
|
-
};
|
|
16
|
-
const fail = (cause) => { cleanup(); reject(cause); };
|
|
17
|
-
const data = (chunk) => {
|
|
18
|
-
const buffer = typeof chunk === "string" ? Buffer.from(chunk) : chunk;
|
|
19
|
-
bytes += buffer.byteLength;
|
|
20
|
-
if (bytes > 1_048_576) {
|
|
21
|
-
fail(new Error("serverToken stdin input exceeds its 1 MiB limit."));
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
chunks.push(buffer);
|
|
25
|
-
};
|
|
26
|
-
const end = () => { cleanup(); resolve(Buffer.concat(chunks).toString("utf8")); };
|
|
27
|
-
const abort = () => fail(new CliCancelledError("Setup cancelled."));
|
|
28
|
-
input.on("data", data);
|
|
29
|
-
input.once("end", end);
|
|
30
|
-
input.once("error", fail);
|
|
31
|
-
signal.addEventListener("abort", abort, { once: true });
|
|
32
|
-
if (signal.aborted)
|
|
33
|
-
abort();
|
|
34
|
-
else if (input.readableEnded)
|
|
35
|
-
end();
|
|
36
|
-
else
|
|
37
|
-
input.resume();
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=input.js.map
|
package/dist/cli/input.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/cli/input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,MAAmB,EAAE,KAAK,GAAmC,OAAO,CAAC,KAAK,EAAmB,EAAE;IACnI,MAAM,CAAC,cAAc,EAAE,CAAC;IACxB,IAAI,KAAK,CAAC,KAAK,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,+FAA+F,CAAC,CAAC;IAC3I,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,E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BAAkB,CAAC,CAAC,CAAC;QAC1E,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1B,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,IAAI,MAAM,CAAC,OAAO;YAAE,KAAK,EAAE,CAAC;aACvB,IAAI,KAAK,CAAC,aAAa;YAAE,GAAG,EAAE,CAAC;;YAC/B,KAAK,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { UsageError } from "../../cli/context.js";
|
|
2
|
-
import { parseCommand, renderCommandHelp } from "../../cli/schema.js";
|
|
3
|
-
import { configure } from "../../config/setup.js";
|
|
4
|
-
import { setupDefinition } from "./definition.js";
|
|
5
|
-
export const runSetupCommand = async (args, context) => {
|
|
6
|
-
if (args.some((argument) => /^--server-token(?:=|$)/.test(argument) || argument.startsWith("--server-token-stdin=")))
|
|
7
|
-
throw new UsageError("Pass automation tokens through --server-token-stdin; token values are not accepted as command arguments.", "daynight setup --help");
|
|
8
|
-
const tokenFlag = args.indexOf("--server-token-stdin");
|
|
9
|
-
if (tokenFlag !== -1 && args[tokenFlag + 1] !== undefined && !args[tokenFlag + 1].startsWith("-"))
|
|
10
|
-
throw new UsageError("--server-token-stdin is a boolean flag and takes no argument.", "daynight setup --help");
|
|
11
|
-
const command = parseCommand(setupDefinition, args, ["daynight", "setup"], "daynight setup --help");
|
|
12
|
-
if (command.kind !== "run") {
|
|
13
|
-
context.stdout(renderCommandHelp(command.command, command.path));
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const serverUrl = command.options.get("--server-url");
|
|
17
|
-
const serverTokenStdin = command.options.has("--server-token-stdin");
|
|
18
|
-
const remote = command.options.get("--review-repo");
|
|
19
|
-
const repositoryPath = command.options.get("--review-path");
|
|
20
|
-
if (repositoryPath !== undefined && remote === undefined)
|
|
21
|
-
throw new UsageError("--review-path requires --review-repo.", "daynight setup --help");
|
|
22
|
-
await configure(context, serverUrl === undefined && remote === undefined && !serverTokenStdin ? undefined : {
|
|
23
|
-
...(serverUrl === undefined ? {} : { serverUrl }),
|
|
24
|
-
...(serverTokenStdin ? { serverTokenStdin: true } : {}),
|
|
25
|
-
...(remote === undefined ? {} : { reviewRepository: { remote, ...(repositoryPath === undefined ? {} : { path: repositoryPath }) } }),
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/setup/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,IAAuB,EAAE,OAAmB,EAAiB,EAAE;IACnG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,0GAA0G,EAAE,uBAAuB,CAAC,CAAC;IAChR,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACvD,IAAI,SAAS,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC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,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;KACrI,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const setupDefinition = {
|
|
2
|
-
name: "setup",
|
|
3
|
-
description: "Configure review repositories and optional test server access",
|
|
4
|
-
options: [
|
|
5
|
-
{ names: ["--server-url"], description: "HTTP(S) server origin", value: { name: "url", kind: "text" } },
|
|
6
|
-
{ names: ["--server-token-stdin"], description: "Read one personal access token from piped stdin" },
|
|
7
|
-
{ names: ["--review-repo"], description: "HTTPS or SSH GitHub repository address", value: { name: "remote", kind: "text" } },
|
|
8
|
-
{ names: ["--review-path"], description: "Dedicated review clone path (requires --review-repo)", value: { name: "path", kind: "directory" } },
|
|
9
|
-
{ names: ["-h", "--help"], description: "Show this help", action: "help" },
|
|
10
|
-
],
|
|
11
|
-
details: "Without options, configure a review repository interactively.\nThe default service is https://daynight.cc; run daynight login to authenticate.\nExplicit --server-url overrides the origin for testing.\n--server-token-stdin reads one optional automation token for the effective service origin.\nChanging the server origin clears its token unless a replacement is supplied.\nReview clone paths default to repositoryRoot (default: ~/daynights).",
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=definition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/commands/setup/definition.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAsB;IAChD,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,+DAA+D;IAC5E,OAAO,EAAE;QACP,EAAE,KAAK,EAAE,CAAC,cAAc,CAAC,EAAE,WAAW,EAAE,uBAAuB,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QACvG,EAAE,KAAK,EAAE,CAAC,sBAAsB,CAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE;QACnG,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,wCAAwC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC5H,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,sDAAsD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE;QAC7I,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE;KAC3E;IACD,OAAO,EAAE,0bAA0b;CACpc,CAAC"}
|
package/dist/config/setup.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { CliContext } from "../cli/context.js";
|
|
2
|
-
import type { AddRepositoryInput } from "../commands/review/repositories.js";
|
|
3
|
-
export type SetupInput = {
|
|
4
|
-
serverUrl?: string;
|
|
5
|
-
serverTokenStdin?: boolean;
|
|
6
|
-
reviewRepository?: AddRepositoryInput;
|
|
7
|
-
};
|
|
8
|
-
export declare const configure: (context: CliContext, input?: SetupInput, suppliedSignal?: AbortSignal) => Promise<void>;
|
|
9
|
-
export declare const guideReviewConfiguration: <Result>(context: CliContext, load: () => Promise<Result>, signal?: AbortSignal) => Promise<Result>;
|
package/dist/config/setup.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { Document } from "yaml";
|
|
2
|
-
import { CliCancelledError, withCliCancellation } from "../cli/cancellation.js";
|
|
3
|
-
import { parseConfigurationDocument } from "./document.js";
|
|
4
|
-
import { MissingConfigurationFileError, isMissingConfiguration } from "./errors.js";
|
|
5
|
-
import { readConfigurationSource, updateConfigurationFile } from "./files.js";
|
|
6
|
-
import { resolveConfigurationPaths } from "./paths.js";
|
|
7
|
-
import { configuredServerUrl, normalizeServerUrl } from "./server.js";
|
|
8
|
-
import { parseServerTokenInput, validateServerToken, validateTokenTransport } from "./server-token.js";
|
|
9
|
-
const optionalSource = async (context, signal) => {
|
|
10
|
-
try {
|
|
11
|
-
return await readConfigurationSource(resolveConfigurationPaths(context.homeDirectory()), signal);
|
|
12
|
-
}
|
|
13
|
-
catch (cause) {
|
|
14
|
-
if (cause instanceof MissingConfigurationFileError)
|
|
15
|
-
return undefined;
|
|
16
|
-
throw cause;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export const configure = async (context, input, suppliedSignal) => withCliCancellation(context, async (signal) => {
|
|
20
|
-
if (input?.serverUrl !== undefined)
|
|
21
|
-
normalizeServerUrl(input.serverUrl);
|
|
22
|
-
const paths = resolveConfigurationPaths(context.homeDirectory());
|
|
23
|
-
const source = await optionalSource(context, signal);
|
|
24
|
-
const baseline = source === undefined ? {} : parseConfigurationDocument(source, paths).mapping;
|
|
25
|
-
const ask = async (question) => {
|
|
26
|
-
if (context.prompt?.isInteractive !== true)
|
|
27
|
-
throw new Error("Interactive review setup requires terminal input and stderr. Use daynight setup --review-repo <remote>.");
|
|
28
|
-
signal.throwIfAborted();
|
|
29
|
-
const answer = await context.prompt.ask(question, signal);
|
|
30
|
-
signal.throwIfAborted();
|
|
31
|
-
return answer;
|
|
32
|
-
};
|
|
33
|
-
const retry = async (question, validate) => {
|
|
34
|
-
for (;;) {
|
|
35
|
-
const answer = await ask(question);
|
|
36
|
-
try {
|
|
37
|
-
return await validate(answer);
|
|
38
|
-
}
|
|
39
|
-
catch (cause) {
|
|
40
|
-
signal.throwIfAborted();
|
|
41
|
-
if (cause instanceof CliCancelledError)
|
|
42
|
-
throw cause;
|
|
43
|
-
context.stderr(`${cause instanceof Error ? cause.message : String(cause)}\n`);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
try {
|
|
48
|
-
const server = input?.serverUrl !== undefined || input?.serverTokenStdin === true;
|
|
49
|
-
const review = input === undefined || input.reviewRepository !== undefined;
|
|
50
|
-
const serverUrl = server ? input?.serverUrl === undefined ? configuredServerUrl(baseline) : normalizeServerUrl(input.serverUrl) : undefined;
|
|
51
|
-
const sameOrigin = server && serverUrl === configuredServerUrl(baseline);
|
|
52
|
-
let serverToken;
|
|
53
|
-
if (input?.serverTokenStdin === true) {
|
|
54
|
-
validateTokenTransport(serverUrl);
|
|
55
|
-
if (context.readStdin === undefined)
|
|
56
|
-
throw new Error("serverToken stdin input is unavailable in this context.");
|
|
57
|
-
serverToken = parseServerTokenInput(await context.readStdin(signal));
|
|
58
|
-
signal.throwIfAborted();
|
|
59
|
-
}
|
|
60
|
-
if (server && serverToken === undefined && sameOrigin && Object.hasOwn(baseline, "serverToken")) {
|
|
61
|
-
validateServerToken(baseline.serverToken);
|
|
62
|
-
validateTokenTransport(serverUrl);
|
|
63
|
-
}
|
|
64
|
-
let reviewRepository = input?.reviewRepository;
|
|
65
|
-
let reviewTools;
|
|
66
|
-
let reviewPaths;
|
|
67
|
-
let reviewOptions;
|
|
68
|
-
if (review) {
|
|
69
|
-
const { validateRegistrationConfigurationSource, remoteIdentity } = await import("../commands/review/config.js");
|
|
70
|
-
reviewTools = await import("../commands/review/repositories.js");
|
|
71
|
-
reviewPaths = (await import("../commands/review/paths.js")).resolveReviewPaths(context.homeDirectory());
|
|
72
|
-
reviewOptions = { homeDirectory: context.homeDirectory(), workingDirectory: context.workingDirectory() };
|
|
73
|
-
if (source !== undefined)
|
|
74
|
-
await validateRegistrationConfigurationSource(source, reviewPaths);
|
|
75
|
-
if (reviewRepository === undefined) {
|
|
76
|
-
const remote = await retry("Review repository (HTTPS or SSH GitHub address): ", (answer) => { remoteIdentity(answer, "remote"); return answer; });
|
|
77
|
-
reviewRepository = await retry("Review clone path (blank for configured default): ", async (answer) => {
|
|
78
|
-
const candidate = answer === "" ? { remote } : { remote, path: answer };
|
|
79
|
-
await reviewTools.updateRepositoryConfiguration(source, candidate, reviewPaths, reviewOptions);
|
|
80
|
-
return candidate;
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
await reviewTools.updateRepositoryConfiguration(source, reviewRepository, reviewPaths, reviewOptions);
|
|
84
|
-
}
|
|
85
|
-
const selectedFields = [...(server ? ["serverUrl", "serverToken"] : []), ...(review ? ["repositoryRoot", "repositories"] : [])];
|
|
86
|
-
const fingerprint = (mapping) => JSON.stringify(selectedFields.map((field) => [field, Object.hasOwn(mapping, field), mapping[field]]));
|
|
87
|
-
signal.throwIfAborted();
|
|
88
|
-
await updateConfigurationFile(paths, async (currentSource) => {
|
|
89
|
-
const current = currentSource === undefined ? undefined : parseConfigurationDocument(currentSource, paths);
|
|
90
|
-
if (fingerprint(current?.mapping ?? {}) !== fingerprint(baseline))
|
|
91
|
-
throw new Error("Configuration changed during setup. Run setup again to review the current values.");
|
|
92
|
-
const document = current?.document ?? new Document({});
|
|
93
|
-
if (server) {
|
|
94
|
-
if (input?.serverUrl !== undefined)
|
|
95
|
-
document.set("serverUrl", serverUrl);
|
|
96
|
-
if (serverToken !== undefined)
|
|
97
|
-
document.set("serverToken", serverToken);
|
|
98
|
-
else if (!sameOrigin)
|
|
99
|
-
document.delete("serverToken");
|
|
100
|
-
}
|
|
101
|
-
let updatedSource = document.toString();
|
|
102
|
-
if (reviewRepository !== undefined) {
|
|
103
|
-
const result = await reviewTools.updateRepositoryConfiguration(updatedSource, reviewRepository, reviewPaths, reviewOptions);
|
|
104
|
-
if (result.source !== undefined)
|
|
105
|
-
updatedSource = result.source;
|
|
106
|
-
}
|
|
107
|
-
return { result: undefined, source: updatedSource };
|
|
108
|
-
}, signal);
|
|
109
|
-
context.stderr(`Configuration saved to ${paths.configFile}.\n`);
|
|
110
|
-
}
|
|
111
|
-
catch (cause) {
|
|
112
|
-
if (signal.aborted || cause instanceof CliCancelledError)
|
|
113
|
-
throw new CliCancelledError("Setup cancelled.", { cause: signal.aborted ? signal.reason : cause });
|
|
114
|
-
throw cause;
|
|
115
|
-
}
|
|
116
|
-
}, suppliedSignal, () => new CliCancelledError("Setup cancelled."));
|
|
117
|
-
export const guideReviewConfiguration = async (context, load, signal) => {
|
|
118
|
-
try {
|
|
119
|
-
return await load();
|
|
120
|
-
}
|
|
121
|
-
catch (cause) {
|
|
122
|
-
if (!isMissingConfiguration(cause, "repositories"))
|
|
123
|
-
throw cause;
|
|
124
|
-
if (context.prompt?.isInteractive !== true) {
|
|
125
|
-
const command = "daynight setup --review-repo <remote>";
|
|
126
|
-
throw new Error(`${cause instanceof Error ? cause.message : String(cause)} Run ${command} to configure it.`, { cause: cause instanceof MissingConfigurationFileError ? cause.cause : cause });
|
|
127
|
-
}
|
|
128
|
-
await configure(context, undefined, signal);
|
|
129
|
-
return load();
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
//# sourceMappingURL=setup.js.map
|
package/dist/config/setup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/config/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,q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