@zinn-dev/cli 0.46.0 → 0.47.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 +2 -2
- package/skills/zinn/SKILL.md +1 -1
- package/src/capabilities-schema.d.ts +74 -0
- package/src/capabilities-schema.js +44 -0
- package/src/capabilities.d.ts +2 -0
- package/src/capabilities.js +2 -0
- package/src/column-hint.js +2 -9
- package/src/errors.d.ts +1 -0
- package/src/errors.js +1 -0
- package/src/input.d.ts +30 -0
- package/src/input.js +18 -0
- package/src/lib.d.ts +73 -5
- package/src/lib.js +69 -13
- package/src/presentation/activity-presentation.d.ts +2 -1
- package/src/presentation/activity-presentation.js +21 -6
- package/src/presentation/color.d.ts +12 -0
- package/src/presentation/color.js +12 -0
- package/src/presentation/project-presentation.d.ts +4 -1
- package/src/presentation/project-presentation.js +18 -0
- package/src/presentation/relation-presentation.js +8 -20
- package/src/presentation/section.d.ts +7 -4
- package/src/presentation/section.js +21 -7
- package/src/presentation/task-blame-presentation.d.ts +2 -1
- package/src/presentation/task-blame-presentation.js +4 -4
- package/src/presentation/task-presentation.d.ts +12 -1
- package/src/presentation/task-presentation.js +60 -9
- package/src/result-schemas.d.ts +93 -14
- package/src/result-schemas.js +1 -0
- package/src/routes/activity-router.d.ts +1 -1
- package/src/routes/activity-router.js +15 -31
- package/src/routes/backup-router.js +2 -9
- package/src/routes/capabilities-router.js +2 -9
- package/src/routes/comment-router.d.ts +2 -6
- package/src/routes/comment-router.js +13 -61
- package/src/routes/doctor-router.js +2 -9
- package/src/routes/info-router.js +2 -9
- package/src/routes/label-router.js +6 -43
- package/src/routes/migrate-router.js +2 -9
- package/src/routes/project-router.js +14 -100
- package/src/routes/reindex-router.js +2 -9
- package/src/routes/relation-router.d.ts +10 -4
- package/src/routes/relation-router.js +7 -18
- package/src/routes/restore-router.js +2 -11
- package/src/routes/router.js +32 -11
- package/src/routes/routes.d.ts +29 -30
- package/src/routes/skill-router.js +3 -18
- package/src/routes/task-router.d.ts +28 -28
- package/src/routes/task-router.js +62 -195
- package/src/routes/whoami-router.js +2 -9
- package/src/telemetry.js +3 -4
- package/src/types.d.ts +5 -1
- package/src/views.d.ts +117 -0
- package/src/views.js +54 -0
|
@@ -7,3 +7,15 @@ export type StyleFormat = Parameters<typeof styleText>[0];
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function isColorEnabled(): boolean;
|
|
9
9
|
export declare function styleOutputText(format: StyleFormat, text: string): string;
|
|
10
|
+
/** Whether stdout is a terminal and the width it reports, which routers pass to components as props */
|
|
11
|
+
export type TerminalProps = {
|
|
12
|
+
isTerminal?: boolean;
|
|
13
|
+
terminalWidth?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function readTerminalProps(): TerminalProps;
|
|
16
|
+
/**
|
|
17
|
+
* Decoration is output that carries no information, such as a heading rule.
|
|
18
|
+
* It prints only in a terminal, so piped output keeps content alone.
|
|
19
|
+
* Color settings do not affect it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatDecoration(text: string, { isTerminal }: TerminalProps): string;
|
|
@@ -19,3 +19,15 @@ export function styleOutputText(format, text) {
|
|
|
19
19
|
}
|
|
20
20
|
return styleText(format, text, { validateStream: false });
|
|
21
21
|
}
|
|
22
|
+
export function readTerminalProps() {
|
|
23
|
+
const isTerminal = process.stdout.isTTY === true;
|
|
24
|
+
return { isTerminal, terminalWidth: isTerminal ? process.stdout.columns : undefined };
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Decoration is output that carries no information, such as a heading rule.
|
|
28
|
+
* It prints only in a terminal, so piped output keeps content alone.
|
|
29
|
+
* Color settings do not affect it.
|
|
30
|
+
*/
|
|
31
|
+
export function formatDecoration(text, { isTerminal = false }) {
|
|
32
|
+
return isTerminal ? text : "";
|
|
33
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { PresentedProject, PresentedProjectListEntry } from "../result-schemas.js";
|
|
1
|
+
import type { PresentedProject, PresentedProjectListEntry, PresentedProjectView } from "../result-schemas.js";
|
|
2
|
+
import type { TerminalProps } from "./color.js";
|
|
2
3
|
type ProjectRow = PresentedProject & {
|
|
3
4
|
taskCounts?: PresentedProjectListEntry["taskCounts"];
|
|
4
5
|
};
|
|
@@ -8,4 +9,6 @@ type ProjectRowOptions = {
|
|
|
8
9
|
};
|
|
9
10
|
export declare function presentProject(projectMatch: PresentedProject): PresentedProject;
|
|
10
11
|
export declare function formatProjectList(presentedProjects: Array<ProjectRow>, { showsDescriptionPreview, showsTaskCounts }?: ProjectRowOptions): string;
|
|
12
|
+
/** The project row followed by its description and column task count sections, each shown when it has content */
|
|
13
|
+
export declare function formatProjectDetail(presentedProject: PresentedProjectView, terminal?: TerminalProps): string;
|
|
11
14
|
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { formatColumnList } from "./column-presentation.js";
|
|
1
2
|
import { formatDescriptionPreview } from "./description-presentation.js";
|
|
2
3
|
import { formatCellSeparator, formatRows } from "./row-layout.js";
|
|
4
|
+
import { formatSection } from "./section.js";
|
|
3
5
|
export function presentProject(projectMatch) {
|
|
4
6
|
return {
|
|
5
7
|
id: projectMatch.id,
|
|
@@ -25,3 +27,19 @@ export function formatProjectList(presentedProjects, { showsDescriptionPreview =
|
|
|
25
27
|
return [{ text: presented.key }, { text: `${presented.name}${description}` }];
|
|
26
28
|
}));
|
|
27
29
|
}
|
|
30
|
+
/** The project row followed by its description and column task count sections, each shown when it has content */
|
|
31
|
+
export function formatProjectDetail(presentedProject, terminal = {}) {
|
|
32
|
+
// The full description follows as its own section, so the row leaves out the preview.
|
|
33
|
+
const sections = [formatProjectList([presentedProject], { showsDescriptionPreview: false })];
|
|
34
|
+
if (presentedProject.description != null) {
|
|
35
|
+
sections.push(formatSection("Description", presentedProject.description, terminal));
|
|
36
|
+
}
|
|
37
|
+
if (presentedProject.columns.length > 0) {
|
|
38
|
+
const columnTaskCounts = formatColumnList(presentedProject.columns, {
|
|
39
|
+
showsTaskCounts: true,
|
|
40
|
+
archivedTaskCount: presentedProject.archivedTaskCount,
|
|
41
|
+
});
|
|
42
|
+
sections.push(formatSection("Columns", columnTaskCounts, terminal));
|
|
43
|
+
}
|
|
44
|
+
return sections.join("\n\n");
|
|
45
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { relation } from "@zinn-dev/core";
|
|
2
|
+
import { views } from "../views.js";
|
|
2
3
|
import { columnNameCell, columnPlacement, createColumnBoard } from "./column-presentation.js";
|
|
3
4
|
import { formatCellSeparator, formatRows } from "./row-layout.js";
|
|
5
|
+
const relationWords = views.words.relations;
|
|
4
6
|
export function presentRelationChange(entry, source, target) {
|
|
5
7
|
return {
|
|
6
8
|
id: entry.id,
|
|
@@ -45,27 +47,13 @@ export function presentRelations(taskMatch, board = createColumnBoard()) {
|
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
function formatRelationLabel(entry) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
switch (entry.type) {
|
|
51
|
-
case "related": {
|
|
52
|
-
label = "Related to";
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
case "dependency": {
|
|
56
|
-
label = isOutgoing ? "Depends on" : "Depended on by";
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
case "subtask": {
|
|
60
|
-
label = isOutgoing ? "Parent" : "Subtask";
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
case "duplicate": {
|
|
64
|
-
label = isOutgoing ? "Duplicate of" : "Duplicated by";
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
50
|
+
if (!Object.hasOwn(relationWords, entry.type)) {
|
|
51
|
+
return entry.type;
|
|
67
52
|
}
|
|
68
|
-
|
|
53
|
+
const words = relationWords[entry.type];
|
|
54
|
+
return typeof words === "string"
|
|
55
|
+
? words
|
|
56
|
+
: words[entry.direction === "outgoing" ? "outgoing" : "incoming"];
|
|
69
57
|
}
|
|
70
58
|
export function formatRelationList(relations, options = {}) {
|
|
71
59
|
return formatRows(relations.map((entry) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { TerminalProps } from "./color.js";
|
|
2
|
+
/**
|
|
3
|
+
* A bold heading above its body.
|
|
4
|
+
* A top-level section passes `terminal`. In a terminal its heading sits in a dim rule that fills the line.
|
|
5
|
+
* Otherwise, and in a nested section, the heading ends with a colon.
|
|
6
|
+
*/
|
|
7
|
+
export declare function formatSection(heading: string, body: string, terminal?: TerminalProps): string;
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import { styleOutputText } from "./color.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { formatDecoration, styleOutputText } from "./color.js";
|
|
2
|
+
import { displayWidth } from "./text-width.js";
|
|
3
|
+
// Heading line width when a terminal reports zero or no width.
|
|
4
|
+
const FALLBACK_TERMINAL_WIDTH = 60;
|
|
5
|
+
const HEADING_RULE_CHARACTER = "-";
|
|
6
|
+
/**
|
|
7
|
+
* A bold heading above its body.
|
|
8
|
+
* A top-level section passes `terminal`. In a terminal its heading sits in a dim rule that fills the line.
|
|
9
|
+
* Otherwise, and in a nested section, the heading ends with a colon.
|
|
10
|
+
*/
|
|
11
|
+
export function formatSection(heading, body, terminal) {
|
|
12
|
+
return `${formatSectionHeading(heading, terminal)}\n${body}`;
|
|
13
|
+
}
|
|
14
|
+
function formatSectionHeading(heading, terminal) {
|
|
15
|
+
if (terminal?.isTerminal !== true) {
|
|
16
|
+
return styleOutputText("bold", `${heading}:`);
|
|
7
17
|
}
|
|
8
|
-
|
|
18
|
+
const hasTerminalWidth = terminal.terminalWidth !== undefined && terminal.terminalWidth > 0;
|
|
19
|
+
const lineWidth = hasTerminalWidth ? terminal.terminalWidth : FALLBACK_TERMINAL_WIDTH;
|
|
20
|
+
const ruleLength = lineWidth - displayWidth(heading) - " ".length;
|
|
21
|
+
const rule = ruleLength > 0 ? ` ${styleOutputText("dim", HEADING_RULE_CHARACTER.repeat(ruleLength))}` : "";
|
|
22
|
+
return `${styleOutputText("bold", heading)}${formatDecoration(rule, terminal)}`;
|
|
9
23
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PresentedRelation, PresentedTaskBlame } from "../result-schemas.js";
|
|
2
|
+
import type { TerminalProps } from "./color.js";
|
|
2
3
|
export declare function formatTaskBlame(blame: PresentedTaskBlame, options: {
|
|
3
4
|
relations: Array<PresentedRelation>;
|
|
4
5
|
columnCategory: string | null;
|
|
@@ -6,4 +7,4 @@ export declare function formatTaskBlame(blame: PresentedTaskBlame, options: {
|
|
|
6
7
|
labelColorsByName: ReadonlyMap<string, string>;
|
|
7
8
|
/** Short forms of activity IDs, which `activity view` accepts as well as full IDs. */
|
|
8
9
|
activityIdPrefixes: Map<string, string>;
|
|
9
|
-
}): string;
|
|
10
|
+
} & TerminalProps): string;
|
|
@@ -32,7 +32,7 @@ export function formatTaskBlame(blame, options) {
|
|
|
32
32
|
? "none"
|
|
33
33
|
: formatLabelNames(labelNames, options.labelColorsByName), fields.labels.attribution),
|
|
34
34
|
field("Parent", fields.parent.value?.key ?? "none", fields.parent.attribution),
|
|
35
|
-
].join("\n")),
|
|
35
|
+
].join("\n"), options),
|
|
36
36
|
];
|
|
37
37
|
if (options.relations.length > 0) {
|
|
38
38
|
const relationAttributions = new Map(blame.relations.map((entry) => [entry.id, entry.attribution]));
|
|
@@ -40,19 +40,19 @@ export function formatTaskBlame(blame, options) {
|
|
|
40
40
|
trailingCell: (entry) => ({
|
|
41
41
|
text: `[${reference(relationAttributions.get(entry.id) ?? null)}]`,
|
|
42
42
|
}),
|
|
43
|
-
})));
|
|
43
|
+
}), options));
|
|
44
44
|
}
|
|
45
45
|
if (blame.description.length > 0) {
|
|
46
46
|
content.push(formatSection("Description", formatRows(blame.description.map((line) => [
|
|
47
47
|
{ text: String(line.line) },
|
|
48
48
|
{ text: `[${reference(line.attribution)}]` },
|
|
49
49
|
{ text: line.text },
|
|
50
|
-
]))));
|
|
50
|
+
])), options));
|
|
51
51
|
}
|
|
52
52
|
if (events.size > 0) {
|
|
53
53
|
content.push(formatSection("Attribution", [...events.values()]
|
|
54
54
|
.map((event) => `${event.id}\n${formatLocalTime(event.created_at, { includesSeconds: true })}\n${formatActor(event)}`)
|
|
55
|
-
.join("\n\n")));
|
|
55
|
+
.join("\n\n"), options));
|
|
56
56
|
}
|
|
57
57
|
return content.join("\n\n");
|
|
58
58
|
}
|
|
@@ -2,6 +2,8 @@ import type { TaskSearchMatch, TaskWithKey } from "@zinn-dev/core";
|
|
|
2
2
|
import type { RowCell } from "./row-layout.js";
|
|
3
3
|
import type { PresentedTask, PresentedTaskDetail } from "../result-schemas.js";
|
|
4
4
|
import type { ColumnBoard } from "./column-presentation.js";
|
|
5
|
+
import type { PresentedActivity } from "./activity-presentation.js";
|
|
6
|
+
import type { TerminalProps } from "./color.js";
|
|
5
7
|
export declare function taskPriorityCell(priority: PresentedTask["priority"], showsFullPriority: boolean): RowCell;
|
|
6
8
|
/**
|
|
7
9
|
* `PresentedTask` carries label names and IDs, without colors.
|
|
@@ -24,5 +26,14 @@ export declare function formatTaskList(presentedTasks: Array<PresentedTask & {
|
|
|
24
26
|
labelColorsByName?: ReadonlyMap<string, string>;
|
|
25
27
|
/** Shows an expired claim too, and when each claim's lease ends */
|
|
26
28
|
showsClaimDetail?: boolean;
|
|
29
|
+
resumedExpiredClaim?: boolean;
|
|
27
30
|
}): string;
|
|
28
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The task row followed by its description, relation, comment
|
|
33
|
+
* and history sections, each shown when it has content.
|
|
34
|
+
* In a terminal, section headings sit in a rule that fills the line.
|
|
35
|
+
*/
|
|
36
|
+
export declare function formatTaskDetail(presentedTask: PresentedTaskDetail, options?: {
|
|
37
|
+
history?: Array<PresentedActivity>;
|
|
38
|
+
labelColorsByName?: ReadonlyMap<string, string>;
|
|
39
|
+
} & TerminalProps): string;
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { label, task } from "@zinn-dev/core";
|
|
2
|
+
import { views } from "../views.js";
|
|
2
3
|
import { columnNameCell, columnPlacement, createColumnBoard } from "./column-presentation.js";
|
|
3
4
|
import { labelNameCell } from "./label-presentation.js";
|
|
4
5
|
import { formatCell, formatCellSeparator, formatRows } from "./row-layout.js";
|
|
5
6
|
import { formatLocalTime } from "./time.js";
|
|
6
|
-
import { formatActorLabel } from "./activity-presentation.js";
|
|
7
|
+
import { formatActivityList, formatActorLabel } from "./activity-presentation.js";
|
|
8
|
+
import { formatCommentList } from "./comment-presentation.js";
|
|
9
|
+
import { formatRelationList } from "./relation-presentation.js";
|
|
10
|
+
import { formatSection } from "./section.js";
|
|
7
11
|
import { styleOutputText } from "./color.js";
|
|
8
12
|
const EMPTY_CELL_MARKER = "-";
|
|
9
13
|
const LABEL_NAME_SEPARATOR = ", ";
|
|
14
|
+
const priorityWords = views.words.priorities;
|
|
10
15
|
export function taskPriorityCell(priority, showsFullPriority) {
|
|
11
|
-
|
|
16
|
+
const hasNoPriority = priority == null || priority === "";
|
|
17
|
+
if (hasNoPriority) {
|
|
12
18
|
return { text: EMPTY_CELL_MARKER, style: "dim" };
|
|
13
19
|
}
|
|
20
|
+
if (Object.hasOwn(priorityWords, priority)) {
|
|
21
|
+
const { word, initial } = priorityWords[priority];
|
|
22
|
+
return { text: showsFullPriority ? word : initial };
|
|
23
|
+
}
|
|
14
24
|
const priorityInitial = priority[0].toUpperCase();
|
|
15
25
|
return { text: showsFullPriority ? `${priorityInitial}${priority.slice(1)}` : priorityInitial };
|
|
16
26
|
}
|
|
@@ -84,12 +94,15 @@ function presentClaim(claim) {
|
|
|
84
94
|
};
|
|
85
95
|
}
|
|
86
96
|
/** Who holds the claim, and when its lease ends or ended when `showsExpiry` is set */
|
|
87
|
-
function formatClaim(claim, showsExpiry) {
|
|
97
|
+
function formatClaim(claim, showsExpiry, resumedExpiredClaim = false) {
|
|
88
98
|
const holder = formatActorLabel(claim);
|
|
89
99
|
if (!showsExpiry) {
|
|
90
100
|
return `Claimed by ${holder}`;
|
|
91
101
|
}
|
|
92
102
|
const expiresAt = formatLocalTime(claim.expires_at, { includesSeconds: true });
|
|
103
|
+
if (resumedExpiredClaim) {
|
|
104
|
+
return `Resumed expired claim by ${holder} until ${expiresAt}`;
|
|
105
|
+
}
|
|
93
106
|
return claim.state === "live"
|
|
94
107
|
? `Claimed by ${holder} until ${expiresAt}`
|
|
95
108
|
: `Claim by ${holder} expired at ${expiresAt}`;
|
|
@@ -126,7 +139,7 @@ export function formatTaskList(presentedTasks, options = {}) {
|
|
|
126
139
|
const claim = presentedTask.claim;
|
|
127
140
|
const showsClaim = claim != null && (claim.state === "live" || showsClaimDetail);
|
|
128
141
|
const claimText = showsClaim
|
|
129
|
-
? `${formatCellSeparator()}${formatClaim(claim, showsClaimDetail)}`
|
|
142
|
+
? `${formatCellSeparator()}${formatClaim(claim, showsClaimDetail, options.resumedExpiredClaim)}`
|
|
130
143
|
: "";
|
|
131
144
|
const excerpts = presentedTask.matches?.map(formatSearchExcerpt).join("") ?? "";
|
|
132
145
|
return [
|
|
@@ -138,11 +151,49 @@ export function formatTaskList(presentedTasks, options = {}) {
|
|
|
138
151
|
];
|
|
139
152
|
}));
|
|
140
153
|
}
|
|
141
|
-
|
|
154
|
+
function formatTaskTimestamps(task, items) {
|
|
155
|
+
const timestamps = { createdAt: task.created_at, updatedAt: task.updated_at };
|
|
142
156
|
return formatRows([
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
157
|
+
items.map(({ role, label }) => ({
|
|
158
|
+
text: `${label}: ${formatLocalTime(timestamps[role])}`,
|
|
159
|
+
style: "dim",
|
|
160
|
+
})),
|
|
147
161
|
]);
|
|
148
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* The task row followed by its description, relation, comment
|
|
165
|
+
* and history sections, each shown when it has content.
|
|
166
|
+
* In a terminal, section headings sit in a rule that fills the line.
|
|
167
|
+
*/
|
|
168
|
+
export function formatTaskDetail(presentedTask, options = {}) {
|
|
169
|
+
const sections = views.taskDetail.sections.flatMap((section) => {
|
|
170
|
+
let content;
|
|
171
|
+
switch (section.id) {
|
|
172
|
+
case "task":
|
|
173
|
+
return [
|
|
174
|
+
formatTaskList([presentedTask], {
|
|
175
|
+
showsStatus: presentedTask.status === "Archived",
|
|
176
|
+
showsFullPriority: true,
|
|
177
|
+
showsClaimDetail: true,
|
|
178
|
+
labelColorsByName: options.labelColorsByName,
|
|
179
|
+
}),
|
|
180
|
+
];
|
|
181
|
+
case "description":
|
|
182
|
+
content = presentedTask.description;
|
|
183
|
+
break;
|
|
184
|
+
case "relations":
|
|
185
|
+
content = formatRelationList(presentedTask.relations) || null;
|
|
186
|
+
break;
|
|
187
|
+
case "comments":
|
|
188
|
+
content = formatCommentList(presentedTask.comments) || null;
|
|
189
|
+
break;
|
|
190
|
+
case "history":
|
|
191
|
+
content = formatActivityList(options.history ?? []) || null;
|
|
192
|
+
break;
|
|
193
|
+
case "times":
|
|
194
|
+
return [formatTaskTimestamps(presentedTask, section.items)];
|
|
195
|
+
}
|
|
196
|
+
return content == null ? [] : [formatSection(section.heading, content, options)];
|
|
197
|
+
});
|
|
198
|
+
return sections.join("\n\n");
|
|
199
|
+
}
|
package/src/result-schemas.d.ts
CHANGED
|
@@ -62,16 +62,16 @@ export declare const relationSchema: z.ZodObject<{
|
|
|
62
62
|
id: z.ZodString;
|
|
63
63
|
column: z.ZodString;
|
|
64
64
|
key: z.ZodString;
|
|
65
|
-
project_id: z.ZodString;
|
|
66
65
|
status: z.ZodEnum<{
|
|
67
66
|
Active: "Active";
|
|
68
67
|
Archived: "Archived";
|
|
69
68
|
}>;
|
|
69
|
+
title: z.ZodString;
|
|
70
|
+
project_id: z.ZodString;
|
|
70
71
|
column_id: z.ZodString;
|
|
71
72
|
is_first: z.ZodBoolean;
|
|
72
73
|
is_last: z.ZodBoolean;
|
|
73
74
|
column_category: z.ZodNullable<z.ZodString>;
|
|
74
|
-
title: z.ZodString;
|
|
75
75
|
}, z.core.$strict>;
|
|
76
76
|
}, z.core.$strict>;
|
|
77
77
|
export declare const relationChangeSchema: z.ZodObject<{
|
|
@@ -106,6 +106,7 @@ export declare const activitySchema: z.ZodObject<{
|
|
|
106
106
|
actor_directory: z.ZodNullable<z.ZodString>;
|
|
107
107
|
entity_type: z.ZodString;
|
|
108
108
|
entity_id: z.ZodString;
|
|
109
|
+
task_key: z.ZodNullable<z.ZodString>;
|
|
109
110
|
action: z.ZodString;
|
|
110
111
|
changes: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
|
|
111
112
|
}, z.core.$strict>;
|
|
@@ -184,16 +185,16 @@ export declare const taskDetailSchema: z.ZodObject<{
|
|
|
184
185
|
id: z.ZodString;
|
|
185
186
|
column: z.ZodString;
|
|
186
187
|
key: z.ZodString;
|
|
187
|
-
project_id: z.ZodString;
|
|
188
188
|
status: z.ZodEnum<{
|
|
189
189
|
Active: "Active";
|
|
190
190
|
Archived: "Archived";
|
|
191
191
|
}>;
|
|
192
|
+
title: z.ZodString;
|
|
193
|
+
project_id: z.ZodString;
|
|
192
194
|
column_id: z.ZodString;
|
|
193
195
|
is_first: z.ZodBoolean;
|
|
194
196
|
is_last: z.ZodBoolean;
|
|
195
197
|
column_category: z.ZodNullable<z.ZodString>;
|
|
196
|
-
title: z.ZodString;
|
|
197
198
|
}, z.core.$strict>;
|
|
198
199
|
}, z.core.$strict>>;
|
|
199
200
|
comments: z.ZodArray<z.ZodObject<{
|
|
@@ -252,16 +253,16 @@ export declare const taskDetailHistorySchema: z.ZodObject<{
|
|
|
252
253
|
id: z.ZodString;
|
|
253
254
|
column: z.ZodString;
|
|
254
255
|
key: z.ZodString;
|
|
255
|
-
project_id: z.ZodString;
|
|
256
256
|
status: z.ZodEnum<{
|
|
257
257
|
Active: "Active";
|
|
258
258
|
Archived: "Archived";
|
|
259
259
|
}>;
|
|
260
|
+
title: z.ZodString;
|
|
261
|
+
project_id: z.ZodString;
|
|
260
262
|
column_id: z.ZodString;
|
|
261
263
|
is_first: z.ZodBoolean;
|
|
262
264
|
is_last: z.ZodBoolean;
|
|
263
265
|
column_category: z.ZodNullable<z.ZodString>;
|
|
264
|
-
title: z.ZodString;
|
|
265
266
|
}, z.core.$strict>;
|
|
266
267
|
}, z.core.$strict>>;
|
|
267
268
|
comments: z.ZodArray<z.ZodObject<{
|
|
@@ -288,6 +289,7 @@ export declare const taskDetailHistorySchema: z.ZodObject<{
|
|
|
288
289
|
actor_directory: z.ZodNullable<z.ZodString>;
|
|
289
290
|
entity_type: z.ZodString;
|
|
290
291
|
entity_id: z.ZodString;
|
|
292
|
+
task_key: z.ZodNullable<z.ZodString>;
|
|
291
293
|
action: z.ZodString;
|
|
292
294
|
changes: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
|
|
293
295
|
}, z.core.$strict>>;
|
|
@@ -1058,16 +1060,16 @@ export declare const resultSchemas: {
|
|
|
1058
1060
|
id: z.ZodString;
|
|
1059
1061
|
column: z.ZodString;
|
|
1060
1062
|
key: z.ZodString;
|
|
1061
|
-
project_id: z.ZodString;
|
|
1062
1063
|
status: z.ZodEnum<{
|
|
1063
1064
|
Active: "Active";
|
|
1064
1065
|
Archived: "Archived";
|
|
1065
1066
|
}>;
|
|
1067
|
+
title: z.ZodString;
|
|
1068
|
+
project_id: z.ZodString;
|
|
1066
1069
|
column_id: z.ZodString;
|
|
1067
1070
|
is_first: z.ZodBoolean;
|
|
1068
1071
|
is_last: z.ZodBoolean;
|
|
1069
1072
|
column_category: z.ZodNullable<z.ZodString>;
|
|
1070
|
-
title: z.ZodString;
|
|
1071
1073
|
}, z.core.$strict>;
|
|
1072
1074
|
}, z.core.$strict>>;
|
|
1073
1075
|
comments: z.ZodArray<z.ZodObject<{
|
|
@@ -1297,16 +1299,16 @@ export declare const resultSchemas: {
|
|
|
1297
1299
|
id: z.ZodString;
|
|
1298
1300
|
column: z.ZodString;
|
|
1299
1301
|
key: z.ZodString;
|
|
1300
|
-
project_id: z.ZodString;
|
|
1301
1302
|
status: z.ZodEnum<{
|
|
1302
1303
|
Active: "Active";
|
|
1303
1304
|
Archived: "Archived";
|
|
1304
1305
|
}>;
|
|
1306
|
+
title: z.ZodString;
|
|
1307
|
+
project_id: z.ZodString;
|
|
1305
1308
|
column_id: z.ZodString;
|
|
1306
1309
|
is_first: z.ZodBoolean;
|
|
1307
1310
|
is_last: z.ZodBoolean;
|
|
1308
1311
|
column_category: z.ZodNullable<z.ZodString>;
|
|
1309
|
-
title: z.ZodString;
|
|
1310
1312
|
}, z.core.$strict>;
|
|
1311
1313
|
}, z.core.$strict>>;
|
|
1312
1314
|
comments: z.ZodArray<z.ZodObject<{
|
|
@@ -1333,6 +1335,7 @@ export declare const resultSchemas: {
|
|
|
1333
1335
|
actor_directory: z.ZodNullable<z.ZodString>;
|
|
1334
1336
|
entity_type: z.ZodString;
|
|
1335
1337
|
entity_id: z.ZodString;
|
|
1338
|
+
task_key: z.ZodNullable<z.ZodString>;
|
|
1336
1339
|
action: z.ZodString;
|
|
1337
1340
|
changes: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
|
|
1338
1341
|
}, z.core.$strict>>;
|
|
@@ -1424,16 +1427,16 @@ export declare const resultSchemas: {
|
|
|
1424
1427
|
id: z.ZodString;
|
|
1425
1428
|
column: z.ZodString;
|
|
1426
1429
|
key: z.ZodString;
|
|
1427
|
-
project_id: z.ZodString;
|
|
1428
1430
|
status: z.ZodEnum<{
|
|
1429
1431
|
Active: "Active";
|
|
1430
1432
|
Archived: "Archived";
|
|
1431
1433
|
}>;
|
|
1434
|
+
title: z.ZodString;
|
|
1435
|
+
project_id: z.ZodString;
|
|
1432
1436
|
column_id: z.ZodString;
|
|
1433
1437
|
is_first: z.ZodBoolean;
|
|
1434
1438
|
is_last: z.ZodBoolean;
|
|
1435
1439
|
column_category: z.ZodNullable<z.ZodString>;
|
|
1436
|
-
title: z.ZodString;
|
|
1437
1440
|
}, z.core.$strict>;
|
|
1438
1441
|
}, z.core.$strict>;
|
|
1439
1442
|
RelationList: z.ZodArray<z.ZodObject<{
|
|
@@ -1447,16 +1450,16 @@ export declare const resultSchemas: {
|
|
|
1447
1450
|
id: z.ZodString;
|
|
1448
1451
|
column: z.ZodString;
|
|
1449
1452
|
key: z.ZodString;
|
|
1450
|
-
project_id: z.ZodString;
|
|
1451
1453
|
status: z.ZodEnum<{
|
|
1452
1454
|
Active: "Active";
|
|
1453
1455
|
Archived: "Archived";
|
|
1454
1456
|
}>;
|
|
1457
|
+
title: z.ZodString;
|
|
1458
|
+
project_id: z.ZodString;
|
|
1455
1459
|
column_id: z.ZodString;
|
|
1456
1460
|
is_first: z.ZodBoolean;
|
|
1457
1461
|
is_last: z.ZodBoolean;
|
|
1458
1462
|
column_category: z.ZodNullable<z.ZodString>;
|
|
1459
|
-
title: z.ZodString;
|
|
1460
1463
|
}, z.core.$strict>;
|
|
1461
1464
|
}, z.core.$strict>>;
|
|
1462
1465
|
RelationChange: z.ZodObject<{
|
|
@@ -1600,6 +1603,7 @@ export declare const resultSchemas: {
|
|
|
1600
1603
|
actor_directory: z.ZodNullable<z.ZodString>;
|
|
1601
1604
|
entity_type: z.ZodString;
|
|
1602
1605
|
entity_id: z.ZodString;
|
|
1606
|
+
task_key: z.ZodNullable<z.ZodString>;
|
|
1603
1607
|
action: z.ZodString;
|
|
1604
1608
|
changes: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
|
|
1605
1609
|
}, z.core.$strict>;
|
|
@@ -1619,6 +1623,7 @@ export declare const resultSchemas: {
|
|
|
1619
1623
|
actor_directory: z.ZodNullable<z.ZodString>;
|
|
1620
1624
|
entity_type: z.ZodString;
|
|
1621
1625
|
entity_id: z.ZodString;
|
|
1626
|
+
task_key: z.ZodNullable<z.ZodString>;
|
|
1622
1627
|
action: z.ZodString;
|
|
1623
1628
|
changes: z.ZodNullable<z.ZodObject<{}, z.core.$loose>>;
|
|
1624
1629
|
}, z.core.$strict>>;
|
|
@@ -1946,6 +1951,7 @@ export declare const resultSchemas: {
|
|
|
1946
1951
|
string: "string";
|
|
1947
1952
|
boolean: "boolean";
|
|
1948
1953
|
}>;
|
|
1954
|
+
aliases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
1949
1955
|
short: z.ZodOptional<z.ZodString>;
|
|
1950
1956
|
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
1951
1957
|
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>>;
|
|
@@ -1991,6 +1997,7 @@ export declare const resultSchemas: {
|
|
|
1991
1997
|
string: "string";
|
|
1992
1998
|
boolean: "boolean";
|
|
1993
1999
|
}>;
|
|
2000
|
+
aliases: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
1994
2001
|
short: z.ZodOptional<z.ZodString>;
|
|
1995
2002
|
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
1996
2003
|
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodBoolean>]>>;
|
|
@@ -2097,6 +2104,78 @@ export declare const resultSchemas: {
|
|
|
2097
2104
|
exitCode: z.ZodLiteral<1>;
|
|
2098
2105
|
stream: z.ZodLiteral<"stderr">;
|
|
2099
2106
|
}, z.core.$strict>;
|
|
2107
|
+
views: z.ZodObject<{
|
|
2108
|
+
version: z.ZodLiteral<"1.0">;
|
|
2109
|
+
taskDetail: z.ZodObject<{
|
|
2110
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
2111
|
+
id: z.ZodString;
|
|
2112
|
+
rank: z.ZodNumber;
|
|
2113
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
2114
|
+
short: z.ZodOptional<z.ZodEnum<{
|
|
2115
|
+
keys: "keys";
|
|
2116
|
+
firstParagraph: "firstParagraph";
|
|
2117
|
+
countAndLatest: "countAndLatest";
|
|
2118
|
+
}>>;
|
|
2119
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2120
|
+
role: z.ZodString;
|
|
2121
|
+
rank: z.ZodNumber;
|
|
2122
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2123
|
+
}, z.core.$strict>>>;
|
|
2124
|
+
onRequest: z.ZodOptional<z.ZodBoolean>;
|
|
2125
|
+
}, z.core.$strict>>;
|
|
2126
|
+
}, z.core.$strict>;
|
|
2127
|
+
words: z.ZodObject<{
|
|
2128
|
+
relations: z.ZodObject<{
|
|
2129
|
+
dependency: z.ZodObject<{
|
|
2130
|
+
outgoing: z.ZodString;
|
|
2131
|
+
incoming: z.ZodString;
|
|
2132
|
+
}, z.core.$strict>;
|
|
2133
|
+
subtask: z.ZodObject<{
|
|
2134
|
+
outgoing: z.ZodString;
|
|
2135
|
+
incoming: z.ZodString;
|
|
2136
|
+
}, z.core.$strict>;
|
|
2137
|
+
duplicate: z.ZodObject<{
|
|
2138
|
+
outgoing: z.ZodString;
|
|
2139
|
+
incoming: z.ZodString;
|
|
2140
|
+
}, z.core.$strict>;
|
|
2141
|
+
related: z.ZodString;
|
|
2142
|
+
}, z.core.$strict>;
|
|
2143
|
+
priorities: z.ZodObject<{
|
|
2144
|
+
urgent: z.ZodObject<{
|
|
2145
|
+
word: z.ZodString;
|
|
2146
|
+
initial: z.ZodString;
|
|
2147
|
+
}, z.core.$strict>;
|
|
2148
|
+
high: z.ZodObject<{
|
|
2149
|
+
word: z.ZodString;
|
|
2150
|
+
initial: z.ZodString;
|
|
2151
|
+
}, z.core.$strict>;
|
|
2152
|
+
medium: z.ZodObject<{
|
|
2153
|
+
word: z.ZodString;
|
|
2154
|
+
initial: z.ZodString;
|
|
2155
|
+
}, z.core.$strict>;
|
|
2156
|
+
low: z.ZodObject<{
|
|
2157
|
+
word: z.ZodString;
|
|
2158
|
+
initial: z.ZodString;
|
|
2159
|
+
}, z.core.$strict>;
|
|
2160
|
+
}, z.core.$strict>;
|
|
2161
|
+
}, z.core.$strict>;
|
|
2162
|
+
glyphs: z.ZodObject<{
|
|
2163
|
+
claimHolder: z.ZodObject<{
|
|
2164
|
+
thisSession: z.ZodObject<{
|
|
2165
|
+
glyph: z.ZodString;
|
|
2166
|
+
words: z.ZodString;
|
|
2167
|
+
}, z.core.$strict>;
|
|
2168
|
+
otherHolder: z.ZodObject<{
|
|
2169
|
+
glyph: z.ZodString;
|
|
2170
|
+
words: z.ZodString;
|
|
2171
|
+
}, z.core.$strict>;
|
|
2172
|
+
unknownOwnership: z.ZodObject<{
|
|
2173
|
+
glyph: z.ZodString;
|
|
2174
|
+
words: z.ZodString;
|
|
2175
|
+
}, z.core.$strict>;
|
|
2176
|
+
}, z.core.$strict>;
|
|
2177
|
+
}, z.core.$strict>;
|
|
2178
|
+
}, z.core.$strict>;
|
|
2100
2179
|
schemas: z.ZodObject<{
|
|
2101
2180
|
$schema: z.ZodLiteral<"http://json-schema.org/draft-07/schema#">;
|
|
2102
2181
|
definitions: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
package/src/result-schemas.js
CHANGED
|
@@ -126,6 +126,7 @@ export const activitySchema = z.strictObject({
|
|
|
126
126
|
.string()
|
|
127
127
|
.describe(`Known entity types: ${activityEntityTypeSchema.options.join(", ")}. Other stored values may occur.`),
|
|
128
128
|
entity_id: z.string().describe("Stored ID of the affected entity."),
|
|
129
|
+
task_key: nullableText.describe("Key of the task identified by entity_id. Null for non-task events or when the key is unavailable."),
|
|
129
130
|
action: z
|
|
130
131
|
.string()
|
|
131
132
|
.describe(`Known actions: ${activityActionSchema.options.join(", ")}. Other stored values may occur.`),
|
|
@@ -88,7 +88,7 @@ export declare const activityRouter: {
|
|
|
88
88
|
readonly value: {
|
|
89
89
|
readonly kind: "activity-action";
|
|
90
90
|
readonly name: "action";
|
|
91
|
-
readonly choices: ("create" | "
|
|
91
|
+
readonly choices: ("create" | "claim" | "delete" | "archive" | "edit" | "move" | "order" | "unarchive" | "relation_create" | "relation_delete" | "comment_create" | "comment_edit" | "comment_delete" | "claim_take" | "claim_heartbeat" | "claim_release")[];
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
readonly changed: {
|