@tomradex/night-shift 0.0.0-stage → 0.27.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/LICENSE +204 -0
- package/dist/brief.d.ts +41 -0
- package/dist/edit.d.ts +24 -0
- package/dist/found.d.ts +28 -0
- package/dist/index.d.ts +7 -0
- package/dist/plan.d.ts +56 -0
- package/dist/rules.d.ts +219 -0
- package/dist/runtime.js +1 -0
- package/dist/service.d.ts +291 -0
- package/dist/words.d.ts +140 -0
- package/dist/work-rules.d.ts +73 -0
- package/package.json +44 -4
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
Copyright 2026 Haoyuan Tang
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Apache License
|
|
5
|
+
Version 2.0, January 2004
|
|
6
|
+
http://www.apache.org/licenses/
|
|
7
|
+
|
|
8
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
9
|
+
|
|
10
|
+
1. Definitions.
|
|
11
|
+
|
|
12
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
13
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
14
|
+
|
|
15
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
16
|
+
the copyright owner that is granting the License.
|
|
17
|
+
|
|
18
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
19
|
+
other entities that control, are controlled by, or are under common
|
|
20
|
+
control with that entity. For the purposes of this definition,
|
|
21
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
22
|
+
direction or management of such entity, whether by contract or
|
|
23
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
24
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
25
|
+
|
|
26
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
27
|
+
exercising permissions granted by this License.
|
|
28
|
+
|
|
29
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
30
|
+
including but not limited to software source code, documentation
|
|
31
|
+
source, and configuration files.
|
|
32
|
+
|
|
33
|
+
"Object" form shall mean any form resulting from mechanical
|
|
34
|
+
transformation or translation of a Source form, including but
|
|
35
|
+
not limited to compiled object code, generated documentation,
|
|
36
|
+
and conversions to other media types.
|
|
37
|
+
|
|
38
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
39
|
+
Object form, made available under the License, as indicated by a
|
|
40
|
+
copyright notice that is included in or attached to the work
|
|
41
|
+
(an example is provided in the Appendix below).
|
|
42
|
+
|
|
43
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
44
|
+
form, that is based on (or derived from) the Work and for which the
|
|
45
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
46
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
47
|
+
of this License, Derivative Works shall not include works that remain
|
|
48
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
49
|
+
the Work and Derivative Works thereof.
|
|
50
|
+
|
|
51
|
+
"Contribution" shall mean any work of authorship, including
|
|
52
|
+
the original version of the Work and any modifications or additions
|
|
53
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
54
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
55
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
56
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
57
|
+
means any form of electronic, verbal, or written communication sent
|
|
58
|
+
to the Licensor or its representatives, including but not limited to
|
|
59
|
+
communication on electronic mailing lists, source code control systems,
|
|
60
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
61
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
62
|
+
excluding communication that is conspicuously marked or otherwise
|
|
63
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
64
|
+
|
|
65
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
66
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
67
|
+
subsequently incorporated within the Work.
|
|
68
|
+
|
|
69
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
70
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
71
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
72
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
73
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
74
|
+
Work and such Derivative Works in Source or Object form.
|
|
75
|
+
|
|
76
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
(except as stated in this section) patent license to make, have made,
|
|
80
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
81
|
+
where such license applies only to those patent claims licensable
|
|
82
|
+
by such Contributor that are necessarily infringed by their
|
|
83
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
84
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
85
|
+
institute patent litigation against any entity (including a
|
|
86
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
87
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
88
|
+
or contributory patent infringement, then any patent licenses
|
|
89
|
+
granted to You under this License for that Work shall terminate
|
|
90
|
+
as of the date such litigation is filed.
|
|
91
|
+
|
|
92
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
93
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
94
|
+
modifications, and in Source or Object form, provided that You
|
|
95
|
+
meet the following conditions:
|
|
96
|
+
|
|
97
|
+
(a) You must give any other recipients of the Work or
|
|
98
|
+
Derivative Works a copy of this License; and
|
|
99
|
+
|
|
100
|
+
(b) You must cause any modified files to carry prominent notices
|
|
101
|
+
stating that You changed the files; and
|
|
102
|
+
|
|
103
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
104
|
+
that You distribute, all copyright, patent, trademark, and
|
|
105
|
+
attribution notices from the Source form of the Work,
|
|
106
|
+
excluding those notices that do not pertain to any part of
|
|
107
|
+
the Derivative Works; and
|
|
108
|
+
|
|
109
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
110
|
+
distribution, then any Derivative Works that You distribute must
|
|
111
|
+
include a readable copy of the attribution notices contained
|
|
112
|
+
within such NOTICE file, excluding those notices that do not
|
|
113
|
+
pertain to any part of the Derivative Works, in at least one
|
|
114
|
+
of the following places: within a NOTICE text file distributed
|
|
115
|
+
as part of the Derivative Works; within the Source form or
|
|
116
|
+
documentation, if provided along with the Derivative Works; or,
|
|
117
|
+
within a display generated by the Derivative Works, if and
|
|
118
|
+
wherever such third-party notices normally appear. The contents
|
|
119
|
+
of the NOTICE file are for informational purposes only and
|
|
120
|
+
do not modify the License. You may add Your own attribution
|
|
121
|
+
notices within Derivative Works that You distribute, alongside
|
|
122
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
123
|
+
that such additional attribution notices cannot be construed
|
|
124
|
+
as modifying the License.
|
|
125
|
+
|
|
126
|
+
You may add Your own copyright statement to Your modifications and
|
|
127
|
+
may provide additional or different license terms and conditions
|
|
128
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
129
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
130
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
131
|
+
the conditions stated in this License.
|
|
132
|
+
|
|
133
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
134
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
135
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
136
|
+
this License, without any additional terms or conditions.
|
|
137
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
138
|
+
the terms of any separate license agreement you may have executed
|
|
139
|
+
with Licensor regarding such Contributions.
|
|
140
|
+
|
|
141
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
142
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
143
|
+
except as required for reasonable and customary use in describing the
|
|
144
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
145
|
+
|
|
146
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
147
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
148
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
149
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
150
|
+
implied, including, without limitation, any warranties or conditions
|
|
151
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
152
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
153
|
+
appropriateness of using or redistributing the Work and assume any
|
|
154
|
+
risks associated with Your exercise of permissions under this License.
|
|
155
|
+
|
|
156
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
157
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
158
|
+
unless required by applicable law (such as deliberate and grossly
|
|
159
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
160
|
+
liable to You for damages, including any direct, indirect, special,
|
|
161
|
+
incidental, or consequential damages of any character arising as a
|
|
162
|
+
result of this License or out of the use or inability to use the
|
|
163
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
164
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
165
|
+
other commercial damages or losses), even if such Contributor
|
|
166
|
+
has been advised of the possibility of such damages.
|
|
167
|
+
|
|
168
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
169
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
170
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
171
|
+
or other liability obligations and/or rights consistent with this
|
|
172
|
+
License. However, in accepting such obligations, You may act only
|
|
173
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
174
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
175
|
+
defend, and hold each Contributor harmless for any liability
|
|
176
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
177
|
+
of your accepting any such warranty or additional liability.
|
|
178
|
+
|
|
179
|
+
END OF TERMS AND CONDITIONS
|
|
180
|
+
|
|
181
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
182
|
+
|
|
183
|
+
To apply the Apache License to your work, attach the following
|
|
184
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
185
|
+
replaced with your own identifying information. (Don't include
|
|
186
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
187
|
+
comment syntax for the file format. We also recommend that a
|
|
188
|
+
file or class name and description of purpose be included on the
|
|
189
|
+
same "printed page" as the copyright notice for easier
|
|
190
|
+
identification within third-party archives.
|
|
191
|
+
|
|
192
|
+
Copyright [yyyy] [name of copyright owner]
|
|
193
|
+
|
|
194
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
|
+
you may not use this file except in compliance with the License.
|
|
196
|
+
You may obtain a copy of the License at
|
|
197
|
+
|
|
198
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
199
|
+
|
|
200
|
+
Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
202
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
See the License for the specific language governing permissions and
|
|
204
|
+
limitations under the License.
|
package/dist/brief.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { NightShiftView } from "./service.js";
|
|
3
|
+
import type { BriefWords } from "./words.js";
|
|
4
|
+
export declare const Judgement: z.ZodPreprocess<z.ZodObject<{
|
|
5
|
+
criteria: z.ZodArray<z.ZodObject<{
|
|
6
|
+
text: z.ZodString;
|
|
7
|
+
met: z.ZodEnum<{
|
|
8
|
+
unknown: "unknown";
|
|
9
|
+
yes: "yes";
|
|
10
|
+
no: "no";
|
|
11
|
+
}>;
|
|
12
|
+
evidence: z.ZodString;
|
|
13
|
+
}, z.core.$strip>>;
|
|
14
|
+
outOfScope: z.ZodArray<z.ZodString>;
|
|
15
|
+
unverified: z.ZodArray<z.ZodString>;
|
|
16
|
+
risk: z.ZodEnum<{
|
|
17
|
+
low: "low";
|
|
18
|
+
medium: "medium";
|
|
19
|
+
high: "high";
|
|
20
|
+
}>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
export type Judgement = z.output<typeof Judgement>;
|
|
23
|
+
/** What the morning report knows of one delivered ticket: git's word, and the model's when one was asked. */
|
|
24
|
+
export interface Delivery {
|
|
25
|
+
prUrl: string | null;
|
|
26
|
+
stat: string | null;
|
|
27
|
+
lines: number | null;
|
|
28
|
+
judgement: Judgement | null;
|
|
29
|
+
}
|
|
30
|
+
export declare const judgeSystem: (language: string) => string;
|
|
31
|
+
export declare const judgeUser: (ticket: {
|
|
32
|
+
key: string;
|
|
33
|
+
title: string;
|
|
34
|
+
body: string | null;
|
|
35
|
+
}, said: string | null, diff: {
|
|
36
|
+
stat: string;
|
|
37
|
+
patch: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
/** The report itself: plain Markdown, and every section is left out when it has nothing to say. */
|
|
40
|
+
export declare function renderBrief(shift: NightShiftView, deliveries: Map<string, Delivery>, w: BriefWords, dateLabel: string): string;
|
|
41
|
+
//# sourceMappingURL=brief.d.ts.map
|
package/dist/edit.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { NightShift, NodeConfig, ShiftStep, ShiftTicket } from "./rules.js";
|
|
2
|
+
/** A change to a run's plan, already checked once: a pass applies it, so nothing else writes the run. */
|
|
3
|
+
export interface ShiftEdit {
|
|
4
|
+
add: ShiftTicket[];
|
|
5
|
+
/** `stop` is the person's word to end an agent at work; without it, only a ticket not begun leaves. */
|
|
6
|
+
remove: {
|
|
7
|
+
itemId: string;
|
|
8
|
+
stop: boolean;
|
|
9
|
+
}[];
|
|
10
|
+
/** A node's config by ticket id; null clears it back to the run's. */
|
|
11
|
+
nodes: Record<string, NodeConfig | null>;
|
|
12
|
+
}
|
|
13
|
+
/** Why a ticket cannot leave as asked; null when it can. What is settled stays, as the run's history. */
|
|
14
|
+
export declare function cannotRemove(ticket: Pick<ShiftTicket, "state">, stop: boolean): "settled" | "working" | null;
|
|
15
|
+
/**
|
|
16
|
+
* The change as the run stands when a pass reaches it. The run may have moved on since it was checked:
|
|
17
|
+
* a ticket that has started since is left alone and said so, never stopped on a word about a ticket not begun.
|
|
18
|
+
*/
|
|
19
|
+
export declare function applyEdit(shift: NightShift, edit: ShiftEdit, now: number): {
|
|
20
|
+
shift: NightShift;
|
|
21
|
+
steps: ShiftStep[];
|
|
22
|
+
stopping: ShiftTicket[];
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=edit.d.ts.map
|
package/dist/found.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Item } from "@tomradex/domain";
|
|
3
|
+
import type { NightShift, ShiftTicket } from "./rules.js";
|
|
4
|
+
export declare const DEFAULT_MAX_INSERTS = 3;
|
|
5
|
+
/** A reply it mangles is a no: nothing joins a run that nobody clearly decided on. */
|
|
6
|
+
export declare const Triage: z.ZodObject<{
|
|
7
|
+
decision: z.ZodCatch<z.ZodEnum<{
|
|
8
|
+
now: "now";
|
|
9
|
+
later: "later";
|
|
10
|
+
}>>;
|
|
11
|
+
why: z.ZodCatch<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type Triage = z.infer<typeof Triage>;
|
|
14
|
+
/** What a ticket's agent is told, so that what it finds neither goes unsaid nor widens its own ticket. */
|
|
15
|
+
export declare const reportLine: (key: string) => string;
|
|
16
|
+
export declare const triageSystem: (language: string) => string;
|
|
17
|
+
export declare const triageUser: (finding: {
|
|
18
|
+
title: string;
|
|
19
|
+
body: string;
|
|
20
|
+
}, from: Pick<ShiftTicket, "key" | "title">, shift: NightShift, brief: string | null) => string;
|
|
21
|
+
export type NotInserted = "off" | "limit" | "nested" | "halted" | "not-coding";
|
|
22
|
+
/**
|
|
23
|
+
* Whether a finding can join the run at all, before any model is asked. The model only ever says no to what these
|
|
24
|
+
* allow: a run stopping takes nothing on, a ticket that was itself added adds nothing, and the limit is the person's.
|
|
25
|
+
*/
|
|
26
|
+
export declare function insertGate(shift: NightShift, from: Pick<ShiftTicket, "origin">, workType: Item["workType"], arriving: number): NotInserted | null;
|
|
27
|
+
export declare const insertedTicket: (item: Item, from: Pick<ShiftTicket, "itemId" | "key">, why: string, config: Pick<ShiftTicket, "config" | "configFrom">) => ShiftTicket;
|
|
28
|
+
//# sourceMappingURL=found.d.ts.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { NightShifts, NightShifts as default, NightShiftConfig, NightShiftEdit, NightShiftInput, MAX_HOURS, MIGRATIONS, TABLES, type NightShiftStepView, type ShiftProposal, type NightShiftView, type NightShiftTicketView, type StepNotice } from "./service.js";
|
|
2
|
+
export { MAX_STEPS, advance, failTicket, isStuck, settingsFor, stepsBetween, type Action, type Halt, type NightShift, type NodeConfig, type SessionFacts, type ShiftFinding, type ShiftNotify, type ShiftStep, type StepKind, type ShiftSettings, type ShiftTicket, type TicketFacts, type TicketState, type Why } from "./rules.js";
|
|
3
|
+
export { applyEdit, cannotRemove, type ShiftEdit } from "./edit.js";
|
|
4
|
+
export { PlanReply, planCandidates, planSystem, planUser, readPlan, type PlanEdge, type PlanNode, type ShiftPlan } from "./plan.js";
|
|
5
|
+
export { WorkRule, WorkRules, ruleConfig, ruleFor } from "./work-rules.js";
|
|
6
|
+
export { DEFAULT_MAX_INSERTS, Triage, insertGate, insertedTicket, reportLine, triageSystem, triageUser } from "./found.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/plan.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Item } from "@tomradex/domain";
|
|
3
|
+
/** What a model may say; a reply it mangles costs the part it mangled, not the plan. */
|
|
4
|
+
export declare const PlanReply: z.ZodObject<{
|
|
5
|
+
summary: z.ZodCatch<z.ZodString>;
|
|
6
|
+
suggested: z.ZodCatch<z.ZodArray<z.ZodString>>;
|
|
7
|
+
excluded: z.ZodCatch<z.ZodArray<z.ZodObject<{
|
|
8
|
+
key: z.ZodString;
|
|
9
|
+
why: z.ZodCatch<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>>>;
|
|
11
|
+
dependencies: z.ZodCatch<z.ZodArray<z.ZodObject<{
|
|
12
|
+
before: z.ZodString;
|
|
13
|
+
after: z.ZodString;
|
|
14
|
+
why: z.ZodCatch<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>>>;
|
|
16
|
+
concurrency: z.ZodCatch<z.ZodNullable<z.ZodNumber>>;
|
|
17
|
+
concurrencyWhy: z.ZodCatch<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type PlanReply = z.infer<typeof PlanReply>;
|
|
20
|
+
export interface PlanNode {
|
|
21
|
+
itemId: string;
|
|
22
|
+
key: string;
|
|
23
|
+
suggested: boolean;
|
|
24
|
+
/** Why it is left out, when something says so. */
|
|
25
|
+
why: string | null;
|
|
26
|
+
}
|
|
27
|
+
/** A dependency the model thinks is missing: nothing is written unless the person takes it. */
|
|
28
|
+
export interface PlanEdge {
|
|
29
|
+
from: string;
|
|
30
|
+
to: string;
|
|
31
|
+
fromKey: string;
|
|
32
|
+
toKey: string;
|
|
33
|
+
why: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ShiftPlan {
|
|
36
|
+
/** False: read from the backlog alone, because no model answered. */
|
|
37
|
+
analyzed: boolean;
|
|
38
|
+
/** What stopped the analysis, in the person's language. */
|
|
39
|
+
why: string | null;
|
|
40
|
+
summary: string | null;
|
|
41
|
+
/** How many the model would run at once; null when it did not say. The person's limit still caps it. */
|
|
42
|
+
concurrency: number | null;
|
|
43
|
+
concurrencyWhy: string | null;
|
|
44
|
+
nodes: PlanNode[];
|
|
45
|
+
proposed: PlanEdge[];
|
|
46
|
+
}
|
|
47
|
+
export declare const planCandidates: (items: Item[]) => Item[];
|
|
48
|
+
export declare const planSystem: (language: string) => string;
|
|
49
|
+
export declare const planUser: (items: Item[], brief: string | null) => string;
|
|
50
|
+
/**
|
|
51
|
+
* The plan the person sees. A model's word only ever narrows what its facts allow: general work never runs unattended,
|
|
52
|
+
* a key it made up is dropped, and a dependency that repeats one or would close a loop is not offered. Without a reply
|
|
53
|
+
* the plan is the backlog's own: the coding tickets in To Do.
|
|
54
|
+
*/
|
|
55
|
+
export declare function readPlan(items: Item[], reply: PlanReply | null, notCoding: string, why?: string | null): ShiftPlan;
|
|
56
|
+
//# sourceMappingURL=plan.d.ts.map
|
package/dist/rules.d.ts
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import type { ItemStatus } from "@tomradex/domain";
|
|
2
|
+
/** Where a shift's agents work: a terminal pane the person can watch, or a background session in the assistant panel. */
|
|
3
|
+
export type ShiftMode = "terminal" | "run";
|
|
4
|
+
export interface ShiftSettings {
|
|
5
|
+
mode: ShiftMode;
|
|
6
|
+
engine?: string;
|
|
7
|
+
options?: Record<string, unknown>;
|
|
8
|
+
/** Background sessions only: a terminal agent runs as its own command says. */
|
|
9
|
+
permissionMode?: string;
|
|
10
|
+
concurrency: number;
|
|
11
|
+
maxMinutes: number;
|
|
12
|
+
/** Null sets no limit. Counts only what engines report, which terminal agents do not. */
|
|
13
|
+
maxUsd: number | null;
|
|
14
|
+
/** Failures in a row, with nothing delivered between them, before no new ticket starts. */
|
|
15
|
+
maxFailures: number;
|
|
16
|
+
autoMerge: boolean;
|
|
17
|
+
/** The computer stays awake while the shift goes. */
|
|
18
|
+
keepAwake: boolean;
|
|
19
|
+
/** The morning report asks the worker model about each delivery; off, it says only what git says. */
|
|
20
|
+
judge: boolean;
|
|
21
|
+
/** Absent on a run from before there was a choice. */
|
|
22
|
+
notify?: ShiftNotify;
|
|
23
|
+
/** How many tickets found along the way may join the run; 0 or absent takes none. */
|
|
24
|
+
maxInserts?: number;
|
|
25
|
+
/** Absent on a run from before there was a choice: it waits. */
|
|
26
|
+
whenLimited?: WhenLimited;
|
|
27
|
+
}
|
|
28
|
+
/** When an agent runs out of quota: go on with the next agent that can, or wait for this one. */
|
|
29
|
+
export type WhenLimited = "switch" | "wait";
|
|
30
|
+
/** What stopped an agent: a limit a clock lifts, or an account nothing is left in. */
|
|
31
|
+
export type LimitCause = "limit" | "balance";
|
|
32
|
+
/** One move of a ticket from one agent to another. */
|
|
33
|
+
export interface EngineSwitch {
|
|
34
|
+
from: string;
|
|
35
|
+
to: string;
|
|
36
|
+
cause: LimitCause;
|
|
37
|
+
at: number;
|
|
38
|
+
}
|
|
39
|
+
/** Every step, or only what stops a ticket; the end is always told. */
|
|
40
|
+
export type ShiftNotify = "steps" | "stuck";
|
|
41
|
+
/** What one node of the plan does differently from the run; a field left out goes as the run goes. */
|
|
42
|
+
export interface NodeConfig {
|
|
43
|
+
mode?: ShiftMode;
|
|
44
|
+
engine?: string;
|
|
45
|
+
options?: Record<string, unknown>;
|
|
46
|
+
permissionMode?: string;
|
|
47
|
+
autoMerge?: boolean;
|
|
48
|
+
whenLimited?: WhenLimited;
|
|
49
|
+
}
|
|
50
|
+
export type TicketState = "queued" | "running" | "limited" | "needs-you" | "delivered" | "done" | "failed" | "skipped";
|
|
51
|
+
export type Halt = "stopped" | "deadline" | "budget" | "failures";
|
|
52
|
+
export type Why = {
|
|
53
|
+
kind: "waits-merge" | "waits-upstream" | "upstream-stuck" | "waits-outside" | "waits-elsewhere";
|
|
54
|
+
keys: string[];
|
|
55
|
+
} | {
|
|
56
|
+
kind: "halted";
|
|
57
|
+
halt: Halt;
|
|
58
|
+
} | {
|
|
59
|
+
kind: "asked" | "error" | "gate" | "merge-refused" | "merge-conflict" | "blocked";
|
|
60
|
+
text: string;
|
|
61
|
+
} | {
|
|
62
|
+
kind: "found";
|
|
63
|
+
fromKey: string;
|
|
64
|
+
text: string;
|
|
65
|
+
} | {
|
|
66
|
+
kind: "switched";
|
|
67
|
+
from: string;
|
|
68
|
+
to: string;
|
|
69
|
+
cause: LimitCause;
|
|
70
|
+
} | {
|
|
71
|
+
kind: "no-engine";
|
|
72
|
+
engine: string;
|
|
73
|
+
} | {
|
|
74
|
+
kind: "stopped" | "ended" | "never-started" | "checks-failed" | "checks-unknown" | "checks-timeout" | "resumes-spent" | "stalled" | "overtime" | "conflict-unresolved" | "removed" | "edit-late";
|
|
75
|
+
};
|
|
76
|
+
export interface ShiftTicket {
|
|
77
|
+
itemId: string;
|
|
78
|
+
key: string;
|
|
79
|
+
title: string;
|
|
80
|
+
state: TicketState;
|
|
81
|
+
why: Why | null;
|
|
82
|
+
threadId: string | null;
|
|
83
|
+
branch: string | null;
|
|
84
|
+
startedAt: number | null;
|
|
85
|
+
/** The last time Tomrade set its agent going: a session that has not spoken since is not yet judged. */
|
|
86
|
+
nudgedAt: number | null;
|
|
87
|
+
resumes: number;
|
|
88
|
+
limitedUntil: number | null;
|
|
89
|
+
merge: "none" | "waiting" | "merged" | "refused";
|
|
90
|
+
mergeAt: number | null;
|
|
91
|
+
mergeWaits: number;
|
|
92
|
+
/** Its agent has been sent back once to resolve a conflict with the default branch. */
|
|
93
|
+
conflictRetried: boolean;
|
|
94
|
+
config?: NodeConfig;
|
|
95
|
+
/** Where `config` came from: the person's hand on this node, or a work rule by name. */
|
|
96
|
+
configFrom?: {
|
|
97
|
+
kind: "manual";
|
|
98
|
+
} | {
|
|
99
|
+
kind: "rule";
|
|
100
|
+
name: string;
|
|
101
|
+
};
|
|
102
|
+
/** The agent its config named could not run, so it went as the run goes. */
|
|
103
|
+
engineLost?: string;
|
|
104
|
+
/** It was not on the plan: an agent found it, and the worker model said to do it now. */
|
|
105
|
+
origin?: {
|
|
106
|
+
fromId: string;
|
|
107
|
+
fromKey: string;
|
|
108
|
+
why: string;
|
|
109
|
+
};
|
|
110
|
+
/** The person added it to a run already going, at this moment. */
|
|
111
|
+
joinedAt?: number;
|
|
112
|
+
/** What stopped it, while it is limited. `noEngine`: no other agent could take it, so it waits this one out. */
|
|
113
|
+
limit?: {
|
|
114
|
+
cause: LimitCause;
|
|
115
|
+
noEngine?: boolean;
|
|
116
|
+
};
|
|
117
|
+
/** Oldest first; the last `to` is the agent it goes on with. */
|
|
118
|
+
switches?: EngineSwitch[];
|
|
119
|
+
/** Its agent's last word while it worked, for whoever takes over: a stop writes over the session's own. */
|
|
120
|
+
said?: string;
|
|
121
|
+
}
|
|
122
|
+
/** A problem an agent reported that did not join the run. */
|
|
123
|
+
export interface ShiftFinding {
|
|
124
|
+
itemId: string;
|
|
125
|
+
key: string;
|
|
126
|
+
title: string;
|
|
127
|
+
fromKey: string;
|
|
128
|
+
why: string;
|
|
129
|
+
/** It was already on the backlog, so nothing new was filed. */
|
|
130
|
+
duplicate: boolean;
|
|
131
|
+
}
|
|
132
|
+
/** One thing that happened on the plan, kept with the run. */
|
|
133
|
+
export interface ShiftStep {
|
|
134
|
+
at: number;
|
|
135
|
+
kind: StepKind;
|
|
136
|
+
itemId: string;
|
|
137
|
+
key: string;
|
|
138
|
+
title: string;
|
|
139
|
+
why: Why | null;
|
|
140
|
+
}
|
|
141
|
+
export type StepKind = "started" | "limited" | "delivered" | "merged" | "refused" | "needs-you" | "failed" | "skipped" | "inserted" | "found" | "duplicate" | "joined" | "removed" | "reconfigured" | "edit-refused" | "switched";
|
|
142
|
+
export interface NightShift {
|
|
143
|
+
id: string;
|
|
144
|
+
projectId: string;
|
|
145
|
+
settings: ShiftSettings;
|
|
146
|
+
tickets: ShiftTicket[];
|
|
147
|
+
status: "running" | "ended";
|
|
148
|
+
/** Why no new ticket starts; null while it goes on, and for a shift that simply finished. */
|
|
149
|
+
halt: Halt | null;
|
|
150
|
+
startedAt: number;
|
|
151
|
+
deadlineAt: number;
|
|
152
|
+
endedAt: number | null;
|
|
153
|
+
failStreak: number;
|
|
154
|
+
spentUsd: number;
|
|
155
|
+
/** The morning report, in the project's Files, once it is written. */
|
|
156
|
+
briefPath: string | null;
|
|
157
|
+
/** Oldest first; absent on a run from before there were any. */
|
|
158
|
+
steps?: ShiftStep[];
|
|
159
|
+
found?: ShiftFinding[];
|
|
160
|
+
}
|
|
161
|
+
export interface SessionFacts {
|
|
162
|
+
state: "running" | "waiting" | "idle" | "error" | "ended" | "lost";
|
|
163
|
+
engine: string;
|
|
164
|
+
headless: boolean;
|
|
165
|
+
blocked: boolean;
|
|
166
|
+
asks: boolean;
|
|
167
|
+
summary: string | null;
|
|
168
|
+
lastEventAt: number | null;
|
|
169
|
+
}
|
|
170
|
+
export interface TicketFacts {
|
|
171
|
+
status: ItemStatus | null;
|
|
172
|
+
/** Tickets that must land first, still open. */
|
|
173
|
+
blockers: {
|
|
174
|
+
itemId: string;
|
|
175
|
+
key: string; /** Outside the run and already at work there: Doing or Verifying. */
|
|
176
|
+
elsewhere?: boolean;
|
|
177
|
+
}[];
|
|
178
|
+
session: SessionFacts | null;
|
|
179
|
+
parkedUntil: number | null;
|
|
180
|
+
interrupted: boolean;
|
|
181
|
+
/** Its session stopped because the agent's account has nothing left. */
|
|
182
|
+
outOfBalance: boolean;
|
|
183
|
+
}
|
|
184
|
+
export type Action = {
|
|
185
|
+
kind: "start" | "continue" | "merge" | "switch";
|
|
186
|
+
itemId: string;
|
|
187
|
+
};
|
|
188
|
+
export type TicketSettings = Pick<ShiftSettings, "mode" | "engine" | "options" | "permissionMode" | "autoMerge" | "whenLimited">;
|
|
189
|
+
/** How one ticket goes: its own config over the run's, and the agent it moved to over both. Options and permissions belong to an engine, so another engine does not inherit them. */
|
|
190
|
+
export declare function settingsFor(settings: ShiftSettings, ticket: Pick<ShiftTicket, "config" | "switches">): TicketSettings;
|
|
191
|
+
/** Every agent this ticket has stopped on, so that it never goes round them again. */
|
|
192
|
+
export declare const triedEngines: (t: Pick<ShiftTicket, "switches">, current: string) => string[];
|
|
193
|
+
/** No agent is left to take it: a limit can still be waited out, a spent balance is the person's. */
|
|
194
|
+
export declare function outOfEngines(t: ShiftTicket, engine: string): ShiftTicket;
|
|
195
|
+
/** What the agent taking over is told, in both modes: a terminal one has seen nothing of the ticket. */
|
|
196
|
+
export declare const takeOverLine: (from: string, cause: LimitCause, said: string | undefined) => string;
|
|
197
|
+
export declare const MAX_RESUMES = 5;
|
|
198
|
+
/** Two minutes between looks at a pull request's checks, for an hour and a half. */
|
|
199
|
+
export declare const MERGE_WAIT_MS: number;
|
|
200
|
+
export declare const MERGE_WAITS = 45;
|
|
201
|
+
export declare const START_GRACE_MS = 60000;
|
|
202
|
+
export declare const NEVER_STARTED_MS: number;
|
|
203
|
+
/** A terminal agent this long without a word holds a place the next ticket could use; it may yet speak up and count again. */
|
|
204
|
+
export declare const STALL_MS: number;
|
|
205
|
+
/** How long past its deadline a shift waits for what is still at work before it stops watching. */
|
|
206
|
+
export declare const OVERTIME_MS: number;
|
|
207
|
+
/** The whole of a shift's judgement: what the world now says of each ticket, and what to do next. */
|
|
208
|
+
export declare function advance(shift: NightShift, factsOf: (itemId: string) => TicketFacts, now: number): {
|
|
209
|
+
shift: NightShift;
|
|
210
|
+
actions: Action[];
|
|
211
|
+
};
|
|
212
|
+
/** A run keeps its last steps: enough to read back, and no more than its row should carry. */
|
|
213
|
+
export declare const MAX_STEPS = 300;
|
|
214
|
+
export declare const isStuck: (kind: StepKind) => boolean;
|
|
215
|
+
/** What changed between two looks at a run, once each: a state a ticket stays in says nothing new. */
|
|
216
|
+
export declare function stepsBetween(before: NightShift, after: NightShift, at: number): ShiftStep[];
|
|
217
|
+
/** What Tomrade tried for a ticket did not take: it counts against the shift like any other failure. */
|
|
218
|
+
export declare function failTicket(shift: NightShift, itemId: string, why: Why): NightShift;
|
|
219
|
+
//# sourceMappingURL=rules.d.ts.map
|
package/dist/runtime.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
throw new Error("@tomradex/night-shift is Tomrade's own code: a full-mode plugin gets the running app's copy, so load the plugin in Tomrade");
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { Context, Service } from "cordis";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { type ShiftPlan } from "./plan.js";
|
|
4
|
+
import { type NightShift, type ShiftFinding, type ShiftStep, type ShiftTicket, type TicketState } from "./rules.js";
|
|
5
|
+
import { type WorkRule } from "./work-rules.js";
|
|
6
|
+
/** "Until it is done" still ends: a run nothing can finish must not stay open for good. */
|
|
7
|
+
export declare const MAX_HOURS = 72;
|
|
8
|
+
export declare const NightShiftInput: z.ZodObject<{
|
|
9
|
+
itemIds: z.ZodArray<z.ZodString>;
|
|
10
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
terminal: "terminal";
|
|
12
|
+
run: "run";
|
|
13
|
+
}>>;
|
|
14
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
15
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16
|
+
permissionMode: z.ZodOptional<z.ZodString>;
|
|
17
|
+
concurrency: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
maxMinutes: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
maxUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
20
|
+
maxFailures: z.ZodDefault<z.ZodNumber>;
|
|
21
|
+
autoMerge: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
keepAwake: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
judge: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
+
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
25
|
+
from: z.ZodString;
|
|
26
|
+
to: z.ZodString;
|
|
27
|
+
}, z.core.$strip>>>;
|
|
28
|
+
notify: z.ZodDefault<z.ZodEnum<{
|
|
29
|
+
steps: "steps";
|
|
30
|
+
stuck: "stuck";
|
|
31
|
+
}>>;
|
|
32
|
+
maxInserts: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
whenLimited: z.ZodDefault<z.ZodEnum<{
|
|
34
|
+
switch: "switch";
|
|
35
|
+
wait: "wait";
|
|
36
|
+
}>>;
|
|
37
|
+
nodes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
38
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
terminal: "terminal";
|
|
40
|
+
run: "run";
|
|
41
|
+
}>>;
|
|
42
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
43
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
44
|
+
permissionMode: z.ZodOptional<z.ZodString>;
|
|
45
|
+
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
whenLimited: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
switch: "switch";
|
|
48
|
+
wait: "wait";
|
|
49
|
+
}>>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type NightShiftInput = z.input<typeof NightShiftInput>;
|
|
53
|
+
/** A change to a run going now. `stop` must be said: it ends an agent at work. */
|
|
54
|
+
export declare const NightShiftEdit: z.ZodObject<{
|
|
55
|
+
add: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
56
|
+
remove: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
57
|
+
itemId: z.ZodString;
|
|
58
|
+
stop: z.ZodDefault<z.ZodBoolean>;
|
|
59
|
+
}, z.core.$strip>>>;
|
|
60
|
+
nodes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodObject<{
|
|
61
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
terminal: "terminal";
|
|
63
|
+
run: "run";
|
|
64
|
+
}>>;
|
|
65
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
66
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
67
|
+
permissionMode: z.ZodOptional<z.ZodString>;
|
|
68
|
+
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
whenLimited: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
switch: "switch";
|
|
71
|
+
wait: "wait";
|
|
72
|
+
}>>;
|
|
73
|
+
}, z.core.$strip>>>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type NightShiftEdit = z.input<typeof NightShiftEdit>;
|
|
76
|
+
/**
|
|
77
|
+
* A run an agent asked for, waiting on the person. It holds exactly what was shown to them, so a yes
|
|
78
|
+
* can start nothing else; another ask replaces it, and it lapses by itself. Nothing an agent can call answers it.
|
|
79
|
+
*/
|
|
80
|
+
export interface ShiftProposal {
|
|
81
|
+
id: string;
|
|
82
|
+
projectId: string;
|
|
83
|
+
tickets: {
|
|
84
|
+
itemId: string;
|
|
85
|
+
key: string;
|
|
86
|
+
title: string;
|
|
87
|
+
}[];
|
|
88
|
+
/** Where it runs, the agent, its permissions and its limits, in the person's language. */
|
|
89
|
+
config: string[];
|
|
90
|
+
/** All of it as one message, for a chat. */
|
|
91
|
+
text: string;
|
|
92
|
+
expiresAt: number;
|
|
93
|
+
}
|
|
94
|
+
export interface NightShiftTicketView extends ShiftTicket {
|
|
95
|
+
/** Why it stands where it does, in the person's language. */
|
|
96
|
+
note: string | null;
|
|
97
|
+
}
|
|
98
|
+
export interface NightShiftStepView extends ShiftStep {
|
|
99
|
+
/** Why it came to this, in the person's language. */
|
|
100
|
+
note: string | null;
|
|
101
|
+
}
|
|
102
|
+
/** One step, said for a chat: it names the ticket, so it goes only to the person's own direct chat. */
|
|
103
|
+
export interface StepNotice {
|
|
104
|
+
key: string;
|
|
105
|
+
title: string;
|
|
106
|
+
body: string;
|
|
107
|
+
}
|
|
108
|
+
export interface NightShiftView extends Omit<NightShift, "tickets" | "steps" | "found"> {
|
|
109
|
+
tickets: NightShiftTicketView[];
|
|
110
|
+
steps: NightShiftStepView[];
|
|
111
|
+
found: ShiftFinding[];
|
|
112
|
+
counts: Record<TicketState, number>;
|
|
113
|
+
/** Whether `spentUsd` is the whole of it: terminal agents, and some engines, report no cost. */
|
|
114
|
+
costKnown: boolean;
|
|
115
|
+
}
|
|
116
|
+
declare module "cordis" {
|
|
117
|
+
interface Context {
|
|
118
|
+
nightShift: NightShifts;
|
|
119
|
+
}
|
|
120
|
+
interface Events {
|
|
121
|
+
"nightShift/changed"(projectId: string): void;
|
|
122
|
+
/** A run waits on the person's yes; `answer` is theirs alone, so it goes only where a person presses it. */
|
|
123
|
+
"nightShift/proposed"(proposal: ShiftProposal, ask: {
|
|
124
|
+
title: string;
|
|
125
|
+
yes: string;
|
|
126
|
+
no: string;
|
|
127
|
+
answer(yes: boolean): string;
|
|
128
|
+
}): void;
|
|
129
|
+
"nightShift/ended"(shift: NightShiftView): void;
|
|
130
|
+
/** The morning report is written: words for a phone or a chat, which carry no code. */
|
|
131
|
+
"nightShift/briefed"(shift: NightShiftView, notice: {
|
|
132
|
+
title: string;
|
|
133
|
+
body: string;
|
|
134
|
+
}): void;
|
|
135
|
+
/** Steps worth telling, and, when one stopped a ticket, words for a phone: numbers only, since a phone's message passes through someone else's service. */
|
|
136
|
+
"nightShift/step"(shift: NightShiftView, notices: StepNotice[], stuck: {
|
|
137
|
+
title: string;
|
|
138
|
+
body: string;
|
|
139
|
+
} | null): void;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
declare module "@tomradex/ipc" {
|
|
143
|
+
interface Channels {
|
|
144
|
+
"nightShift.current": (projectId: string) => NightShiftView | null;
|
|
145
|
+
"nightShift.list": (projectId: string, limit?: number) => NightShiftView[];
|
|
146
|
+
/** `fresh` asks the model even though nothing it would be shown has changed. */
|
|
147
|
+
"nightShift.plan": (projectId: string, fresh?: boolean) => ShiftPlan;
|
|
148
|
+
"nightShift.rules": (projectId: string) => WorkRule[];
|
|
149
|
+
"nightShift.setRules": (projectId: string, rules: WorkRule[]) => WorkRule[];
|
|
150
|
+
/** Which rule each open ticket falls under, by ticket id. */
|
|
151
|
+
"nightShift.ruleMatches": (projectId: string) => Record<string, string>;
|
|
152
|
+
"nightShift.start": (projectId: string, input: NightShiftInput) => NightShiftView;
|
|
153
|
+
"nightShift.stop": (projectId: string, id: string) => NightShiftView;
|
|
154
|
+
"nightShift.edit": (projectId: string, id: string, edit: NightShiftEdit) => NightShiftView;
|
|
155
|
+
"nightShift.proposal": (projectId: string) => ShiftProposal | null;
|
|
156
|
+
/** The person's answer. It is never a tool: an agent must not be able to give it. */
|
|
157
|
+
"nightShift.decide": (projectId: string, id: string, yes: boolean) => NightShiftView | null;
|
|
158
|
+
}
|
|
159
|
+
interface Broadcasts {
|
|
160
|
+
"nightShift.changed": (projectId: string) => void;
|
|
161
|
+
"nightShift.step": (projectId: string, notices: StepNotice[]) => void;
|
|
162
|
+
"nightShift.proposed": (projectId: string) => void;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
export declare const MIGRATIONS: {
|
|
166
|
+
version: number;
|
|
167
|
+
up: string;
|
|
168
|
+
}[];
|
|
169
|
+
/** A shift runs on the machine it was started on: its agents and worktrees are here, and a second machine must not run it again. */
|
|
170
|
+
export declare const TABLES: {
|
|
171
|
+
readonly plugin_nightshift_shifts: {
|
|
172
|
+
readonly project: "project_id";
|
|
173
|
+
readonly export: false;
|
|
174
|
+
};
|
|
175
|
+
readonly plugin_nightshift_rules: {
|
|
176
|
+
readonly project: "project_id";
|
|
177
|
+
readonly export: {
|
|
178
|
+
readonly order: "project_id";
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
export declare const NightShiftConfig: z.ZodPreprocess<z.ZodObject<{
|
|
183
|
+
tickMs: z.ZodDefault<z.ZodNumber>;
|
|
184
|
+
settleMs: z.ZodDefault<z.ZodNumber>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
export type NightShiftConfig = z.output<typeof NightShiftConfig>;
|
|
187
|
+
export declare class NightShifts extends Service {
|
|
188
|
+
readonly config: NightShiftConfig;
|
|
189
|
+
static provide: string;
|
|
190
|
+
static inject: string[];
|
|
191
|
+
static Config: z.ZodPreprocess<z.ZodObject<{
|
|
192
|
+
tickMs: z.ZodDefault<z.ZodNumber>;
|
|
193
|
+
settleMs: z.ZodDefault<z.ZodNumber>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
195
|
+
private readonly home;
|
|
196
|
+
private ticking;
|
|
197
|
+
private again;
|
|
198
|
+
private settling;
|
|
199
|
+
/** Projects with a shift going: a session's every word need not touch the database to learn there is none. */
|
|
200
|
+
private readonly going;
|
|
201
|
+
private readonly arrivals;
|
|
202
|
+
private readonly proposals;
|
|
203
|
+
/** Each project's last plan and what the model was shown for it; a failed one is not kept. */
|
|
204
|
+
private readonly plans;
|
|
205
|
+
constructor(ctx: Context, config: NightShiftConfig);
|
|
206
|
+
[Service.init](): void;
|
|
207
|
+
private locale;
|
|
208
|
+
private rows;
|
|
209
|
+
private running;
|
|
210
|
+
private save;
|
|
211
|
+
private note;
|
|
212
|
+
private engineTitle;
|
|
213
|
+
private view;
|
|
214
|
+
current(projectId: string): NightShiftView | null;
|
|
215
|
+
list(projectId: string, limit?: number): NightShiftView[];
|
|
216
|
+
/** The project's work rules, in the order they are tried. */
|
|
217
|
+
rules(projectId: string): WorkRule[];
|
|
218
|
+
setRules(projectId: string, rules: WorkRule[]): WorkRule[];
|
|
219
|
+
ruleMatches(projectId: string): Record<string, string>;
|
|
220
|
+
/** The person's starting point for a run. It always answers: with no model, or a model that fails, it is the backlog's own facts. */
|
|
221
|
+
plan(projectId: string, fresh?: boolean): Promise<ShiftPlan>;
|
|
222
|
+
private askPlan;
|
|
223
|
+
/** As in a conversation, the default engine does a run's thinking; one that runs on Tomrade's profiles leaves it to the worker. */
|
|
224
|
+
private defaultAgent;
|
|
225
|
+
start(projectId: string, input: NightShiftInput, now?: number): NightShiftView;
|
|
226
|
+
/**
|
|
227
|
+
* An agent found something outside its ticket. A ticket is filed unless the backlog already has it; whether it joins
|
|
228
|
+
* the run is for the limits and then the worker model, never the agent that found it. Anything less than a clear yes stays in the backlog.
|
|
229
|
+
*/
|
|
230
|
+
report(projectId: string, fromKey: string, input: {
|
|
231
|
+
title: string;
|
|
232
|
+
body: string;
|
|
233
|
+
workType?: "coding" | "general";
|
|
234
|
+
}): Promise<{
|
|
235
|
+
outcome: "inserted" | "later" | "duplicate";
|
|
236
|
+
key: string;
|
|
237
|
+
why: string;
|
|
238
|
+
}>;
|
|
239
|
+
private duplicateOf;
|
|
240
|
+
/** Lets what was reported since the last pass into the run, and says so. */
|
|
241
|
+
private arrive;
|
|
242
|
+
/** Whether a shift going anywhere wants the computer kept awake. */
|
|
243
|
+
wantsAwake(): boolean;
|
|
244
|
+
/** A run in the words the person answers: which tickets, and everything that decides how they go. */
|
|
245
|
+
private describe;
|
|
246
|
+
/** Checks what `start` would, so an ask that cannot run says so now. */
|
|
247
|
+
private checked;
|
|
248
|
+
/** The run an agent asked for, put to the person. It replaces any earlier ask, whose yes no longer counts. */
|
|
249
|
+
propose(projectId: string, input: NightShiftInput, now?: number): ShiftProposal;
|
|
250
|
+
proposal(projectId: string): ShiftProposal | null;
|
|
251
|
+
private dropProposal;
|
|
252
|
+
/** The person's answer to the ask they were shown, and only that one. */
|
|
253
|
+
decide(projectId: string, id: string, yes: boolean, now?: number): NightShiftView | null;
|
|
254
|
+
/** A ticket as a run takes it, or why it cannot, in the person's language. */
|
|
255
|
+
private take;
|
|
256
|
+
/**
|
|
257
|
+
* The person changes a run while it goes. All of it is checked here, so a refusal changes nothing, and it reaches
|
|
258
|
+
* the run through the next pass, so it cannot race one. Whatever moved in between is left as it stands, and said.
|
|
259
|
+
*/
|
|
260
|
+
edit(projectId: string, id: string, input: NightShiftEdit): NightShiftView;
|
|
261
|
+
/** It ends with what it did: the worktree and the branch stay as they are. */
|
|
262
|
+
private stopAgent;
|
|
263
|
+
/** No new ticket starts; what is at work finishes. */
|
|
264
|
+
stop(projectId: string, id: string): NightShiftView;
|
|
265
|
+
private kick;
|
|
266
|
+
private factsOf;
|
|
267
|
+
private sessionFacts;
|
|
268
|
+
/** Every project's shift, one pass each; a change while one runs asks for another. */
|
|
269
|
+
tick(now?: number): Promise<void>;
|
|
270
|
+
private pass;
|
|
271
|
+
/** Tickets a run never reached are counted in the report; one message each would say nothing more. */
|
|
272
|
+
private tell;
|
|
273
|
+
/** One model call per delivery, all at once and within one deadline, and a report that stands without any of them. */
|
|
274
|
+
private deliveries;
|
|
275
|
+
/** Writes the morning report into the project's Files and tells the person; returns where it went. */
|
|
276
|
+
brief(shift: NightShift): Promise<string | null>;
|
|
277
|
+
private act;
|
|
278
|
+
/**
|
|
279
|
+
* The agent stopped on quota, so the next one takes the ticket where it stands: the same thread, branch and worktree,
|
|
280
|
+
* with a session of its own. A ticket no agent is left for stays as `outOfEngines` says.
|
|
281
|
+
*/
|
|
282
|
+
private switchEngine;
|
|
283
|
+
private launch;
|
|
284
|
+
/** How to start or go on with a ticket. An agent its config names that cannot run costs the node its config, not the ticket. */
|
|
285
|
+
private how;
|
|
286
|
+
private merge;
|
|
287
|
+
/** One trip back to its agent, in the place the shift runs; what depends on the ticket keeps waiting meanwhile. */
|
|
288
|
+
private resolveConflict;
|
|
289
|
+
private registerTools;
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=service.d.ts.map
|
package/dist/words.d.ts
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export type BriefWords = ReturnType<typeof NIGHT_SHIFT_WORDS>;
|
|
2
|
+
export declare const NIGHT_SHIFT_WORDS: import("@tomradex/domain").WordBook<{
|
|
3
|
+
readonly waitsMerge: "Waits for {{keys}} to be merged";
|
|
4
|
+
readonly waitsUpstream: "Waits for {{keys}}";
|
|
5
|
+
readonly upstreamStuck: "Blocked by {{keys}}, which did not get through";
|
|
6
|
+
readonly waitsOutside: "Waits for {{keys}}, outside this run";
|
|
7
|
+
readonly waitsElsewhere: "Waits for {{keys}}, at work outside this run; starts once it lands";
|
|
8
|
+
readonly haltedStopped: "Not started: the run was stopped";
|
|
9
|
+
readonly haltedDeadline: "Not started: the run ran out of time";
|
|
10
|
+
readonly haltedBudget: "Not started: the spending limit was reached";
|
|
11
|
+
readonly haltedFailures: "Not started: too many failures in a row";
|
|
12
|
+
readonly asked: "Needs your answer: {{text}}";
|
|
13
|
+
readonly askedBare: "Needs your answer";
|
|
14
|
+
readonly stopped: "The agent stopped without delivering";
|
|
15
|
+
readonly error: "Stopped: {{text}}";
|
|
16
|
+
readonly errorBare: "Stopped on an error";
|
|
17
|
+
readonly ended: "The session ended without delivering";
|
|
18
|
+
readonly neverStarted: "The session never started";
|
|
19
|
+
readonly gate: "Could not start: {{text}}";
|
|
20
|
+
readonly blocked: "Needs you: {{text}}";
|
|
21
|
+
readonly blockedBare: "Needs you";
|
|
22
|
+
readonly mergeRefused: "Not merged: {{text}}";
|
|
23
|
+
readonly mergeConflict: "Not merged, it conflicts: {{text}}";
|
|
24
|
+
readonly checksFailed: "Not merged: its checks failed";
|
|
25
|
+
readonly checksUnknown: "Not merged: its checks could not be read";
|
|
26
|
+
readonly checksTimeout: "Not merged: its checks did not finish in time";
|
|
27
|
+
readonly resumesSpent: "Gave up after going on five times";
|
|
28
|
+
readonly stalled: "The agent has gone quiet";
|
|
29
|
+
readonly overtime: "Still at work when the run ended";
|
|
30
|
+
readonly conflictUnresolved: "Its agent could not resolve the conflict";
|
|
31
|
+
readonly askStart: "Start an auto run of {{n}} tickets?";
|
|
32
|
+
readonly whereTerminal: "in terminal panes";
|
|
33
|
+
readonly whereRun: "in background sessions";
|
|
34
|
+
readonly configAgent: "Agent: {{agent}}";
|
|
35
|
+
readonly configAgentDefault: "as Start last went";
|
|
36
|
+
readonly configPermission: "Permissions: {{mode}}";
|
|
37
|
+
readonly configLimits: "up to {{at}} at a time for {{hours}} hours";
|
|
38
|
+
readonly configMerge: "merges each one whose checks pass";
|
|
39
|
+
readonly configNoMerge: "merges nothing";
|
|
40
|
+
readonly configBudget: "stops at ${{amount}}";
|
|
41
|
+
readonly proposalGone: "That request has lapsed or been replaced, so nothing started";
|
|
42
|
+
readonly proposalStarted: "Auto run started";
|
|
43
|
+
readonly proposalDeclined: "Not started";
|
|
44
|
+
readonly proposalTitle: "An agent asks to start an auto run";
|
|
45
|
+
readonly askYes: "Start it";
|
|
46
|
+
readonly askNo: "Don't";
|
|
47
|
+
readonly commandTitle: "Start an auto run…";
|
|
48
|
+
readonly commandGroup: "Coding";
|
|
49
|
+
readonly statusTitle: "Open the auto run";
|
|
50
|
+
readonly statusText: "Auto run {{done}}/{{total}}";
|
|
51
|
+
readonly statusNeedsYou: "{{n}} need you";
|
|
52
|
+
readonly folder: "Auto runs";
|
|
53
|
+
readonly title: "Auto run, {{date}}";
|
|
54
|
+
readonly sumDelivered: "{{n}} to review";
|
|
55
|
+
readonly sumMerged: "{{n}} merged";
|
|
56
|
+
readonly sumNeedsYou: "{{n}} need you";
|
|
57
|
+
readonly sumFailed: "{{n}} failed";
|
|
58
|
+
readonly sumSkipped: "{{n}} not started";
|
|
59
|
+
readonly sumTook: "{{minutes}} min";
|
|
60
|
+
readonly sumSpent: "{{amount}} spent";
|
|
61
|
+
readonly sumSpentPartly: "{{amount}} spent, as far as reported";
|
|
62
|
+
readonly sumNoCost: "no cost reported";
|
|
63
|
+
readonly haltStopped: "It was stopped before it finished.";
|
|
64
|
+
readonly haltDeadline: "It ran out of time.";
|
|
65
|
+
readonly haltBudget: "It reached the spending limit.";
|
|
66
|
+
readonly haltFailures: "It stopped after too many failures in a row.";
|
|
67
|
+
readonly reviewFirst: "Review in this order";
|
|
68
|
+
readonly needsYou: "Needs you";
|
|
69
|
+
readonly needsYouNext: "Open each ticket's session to answer or go on.";
|
|
70
|
+
readonly failed: "Failed";
|
|
71
|
+
readonly failedNext: "Read why on the ticket, then start it again.";
|
|
72
|
+
readonly skipped: "Not started";
|
|
73
|
+
readonly details: "Ticket by ticket";
|
|
74
|
+
readonly pullRequest: "Pull request";
|
|
75
|
+
readonly notJudged: "Not judged: read from git only.";
|
|
76
|
+
readonly riskLabel: "Worth a look";
|
|
77
|
+
readonly riskHigh: "closely";
|
|
78
|
+
readonly riskMedium: "as usual";
|
|
79
|
+
readonly riskLow: "lightly";
|
|
80
|
+
readonly criteria: "Acceptance";
|
|
81
|
+
readonly noCriteria: "The ticket states no acceptance criteria.";
|
|
82
|
+
readonly noEvidence: "no evidence";
|
|
83
|
+
readonly outOfScope: "Beyond what the ticket asked";
|
|
84
|
+
readonly unverified: "Not shown to work";
|
|
85
|
+
readonly notifyTitle: "Your auto run is done";
|
|
86
|
+
readonly notifyBody: "{{review}} to review, {{merged}} merged, {{attention}} need you";
|
|
87
|
+
readonly notCoding: "Not coding work: it needs a person";
|
|
88
|
+
readonly planNoEngine: "No agent or model is available, so this plan comes from the tickets alone.";
|
|
89
|
+
readonly planFailed: "The analysis failed, so this plan comes from the tickets alone: {{detail}}";
|
|
90
|
+
readonly ruleSkipped: "Left out by the rule “{{name}}”";
|
|
91
|
+
readonly engineLost: "{{engine}} could not run, so this went as the run does";
|
|
92
|
+
readonly switchedLimit: "{{from}} hit its usage limit, so {{to}} took over";
|
|
93
|
+
readonly switchedBalance: "{{from}} ran out of balance, so {{to}} took over";
|
|
94
|
+
readonly noEngine: "{{engine}} ran out of balance and no other agent could take over";
|
|
95
|
+
readonly noEngineWaits: "No other agent could take over, so this waits for the limit to lift";
|
|
96
|
+
readonly step_started: "Started";
|
|
97
|
+
readonly step_limited: "Waiting for a usage limit";
|
|
98
|
+
readonly step_delivered: "Delivered";
|
|
99
|
+
readonly step_merged: "Merged";
|
|
100
|
+
readonly step_refused: "Not merged";
|
|
101
|
+
readonly "step_needs-you": "Needs you";
|
|
102
|
+
readonly step_failed: "Failed";
|
|
103
|
+
readonly step_skipped: "Not started";
|
|
104
|
+
readonly step_inserted: "Added to the plan";
|
|
105
|
+
readonly step_found: "Left in the backlog";
|
|
106
|
+
readonly step_duplicate: "Already on the backlog";
|
|
107
|
+
readonly step_joined: "You added it to the plan";
|
|
108
|
+
readonly step_removed: "You took it off the plan";
|
|
109
|
+
readonly step_reconfigured: "You changed its settings";
|
|
110
|
+
readonly "step_edit-refused": "Your change did not apply";
|
|
111
|
+
readonly removed: "You took it off the plan. What its agent wrote stays on its branch";
|
|
112
|
+
readonly editLate: "It had moved on before the change arrived";
|
|
113
|
+
readonly editEnded: "This auto run has ended, so its plan can no longer change";
|
|
114
|
+
readonly editHalted: "This auto run is finishing, so its plan can no longer change";
|
|
115
|
+
readonly editRefused: "Nothing was changed: {{problems}}";
|
|
116
|
+
readonly takeGone: "no ticket {{id}}";
|
|
117
|
+
readonly takeEpic: "{{key}} is an epic";
|
|
118
|
+
readonly takeStatus: "{{key}} is {{status}}";
|
|
119
|
+
readonly takeBusy: "{{key}} has an agent on it already";
|
|
120
|
+
readonly takeInRun: "{{key}} is already in this run";
|
|
121
|
+
readonly removeWorking: "{{key}} has an agent at work";
|
|
122
|
+
readonly removeSettled: "{{key}} is finished, so it stays as this run's history";
|
|
123
|
+
readonly nodeBegun: "{{key}} has already started";
|
|
124
|
+
readonly step_switched: "Changed agent";
|
|
125
|
+
readonly stuckTitle: "Your auto run needs you";
|
|
126
|
+
readonly stuckBody: "{{attention}} need you, {{done}} of {{total}} delivered";
|
|
127
|
+
readonly foundFrom: "Found in {{key}}: {{text}}";
|
|
128
|
+
readonly foundBody: "Found by the agent working on {{key}} during an auto run.";
|
|
129
|
+
readonly foundDuplicate: "It is already on the backlog";
|
|
130
|
+
readonly notInserted_off: "This run adds nothing to its plan";
|
|
131
|
+
readonly notInserted_limit: "This run has added as many tickets as it may";
|
|
132
|
+
readonly notInserted_nested: "Found by a ticket that was itself added, so it waits for a person";
|
|
133
|
+
readonly notInserted_halted: "The run is stopping";
|
|
134
|
+
readonly "notInserted_not-coding": "It is not coding work";
|
|
135
|
+
readonly notInserted_noModel: "Nothing could judge it, so it waits for a person";
|
|
136
|
+
readonly notInserted_declined: "It was judged to be for later";
|
|
137
|
+
readonly insertedSection: "Added along the way";
|
|
138
|
+
readonly foundSection: "Found and left for you";
|
|
139
|
+
}>;
|
|
140
|
+
//# sourceMappingURL=words.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Item } from "@tomradex/domain";
|
|
3
|
+
import type { NodeConfig } from "./rules.js";
|
|
4
|
+
export declare const RuleWhen: z.ZodObject<{
|
|
5
|
+
label: z.ZodOptional<z.ZodString>;
|
|
6
|
+
workType: z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
coding: "coding";
|
|
8
|
+
general: "general";
|
|
9
|
+
}>>;
|
|
10
|
+
minPriority: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
titleHas: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const RuleThen: z.ZodObject<{
|
|
14
|
+
skip: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
terminal: "terminal";
|
|
17
|
+
run: "run";
|
|
18
|
+
}>>;
|
|
19
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
20
|
+
permissionMode: z.ZodOptional<z.ZodString>;
|
|
21
|
+
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare const WorkRule: z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
when: z.ZodObject<{
|
|
27
|
+
label: z.ZodOptional<z.ZodString>;
|
|
28
|
+
workType: z.ZodOptional<z.ZodEnum<{
|
|
29
|
+
coding: "coding";
|
|
30
|
+
general: "general";
|
|
31
|
+
}>>;
|
|
32
|
+
minPriority: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
titleHas: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
then: z.ZodObject<{
|
|
36
|
+
skip: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
terminal: "terminal";
|
|
39
|
+
run: "run";
|
|
40
|
+
}>>;
|
|
41
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
42
|
+
permissionMode: z.ZodOptional<z.ZodString>;
|
|
43
|
+
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type WorkRule = z.infer<typeof WorkRule>;
|
|
47
|
+
export declare const WorkRules: z.ZodArray<z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
when: z.ZodObject<{
|
|
51
|
+
label: z.ZodOptional<z.ZodString>;
|
|
52
|
+
workType: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
coding: "coding";
|
|
54
|
+
general: "general";
|
|
55
|
+
}>>;
|
|
56
|
+
minPriority: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
titleHas: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
then: z.ZodObject<{
|
|
60
|
+
skip: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
terminal: "terminal";
|
|
63
|
+
run: "run";
|
|
64
|
+
}>>;
|
|
65
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
66
|
+
permissionMode: z.ZodOptional<z.ZodString>;
|
|
67
|
+
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
/** Rules run top to bottom and the first that matches is the one: their order is how the person ranks them. */
|
|
71
|
+
export declare const ruleFor: (rules: readonly WorkRule[], item: Item) => WorkRule | null;
|
|
72
|
+
export declare function ruleConfig(rule: WorkRule): NodeConfig;
|
|
73
|
+
//# sourceMappingURL=work-rules.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomradex/night-shift",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.27.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"author": "Haoyuan Tang",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"description": "Auto run: the agent plans a batch of tickets on the dependency graph, then works through it in terminal panes or background sessions, within limits the person set — declarations for full-mode plugins; Tomrade provides the code at run time",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"tomrade",
|
|
16
|
+
"tomrade-plugin",
|
|
17
|
+
"types"
|
|
18
|
+
],
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/runtime.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@tomradex/agent": "0.27.0",
|
|
31
|
+
"@tomradex/alerts": "0.27.0",
|
|
32
|
+
"@tomradex/code-link": "0.27.0",
|
|
33
|
+
"@tomradex/contracts": "0.27.0",
|
|
34
|
+
"@tomradex/contributions": "0.27.0",
|
|
35
|
+
"@tomradex/db": "0.27.0",
|
|
36
|
+
"@tomradex/domain": "0.2.33",
|
|
37
|
+
"@tomradex/files": "0.27.0",
|
|
38
|
+
"@tomradex/ipc": "0.27.0",
|
|
39
|
+
"@tomradex/items": "0.27.0",
|
|
40
|
+
"@tomradex/llm": "0.27.0",
|
|
41
|
+
"@tomradex/settings": "0.27.0",
|
|
42
|
+
"@tomradex/tools": "0.27.0",
|
|
43
|
+
"cordis": "4.0.0-rc.8",
|
|
44
|
+
"zod": "^4.4.3"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/README.md
DELETED