@codetreker/daynight 0.22.1 → 0.24.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/README.md +307 -334
- package/config.example.yml +8 -4
- package/dist/api/client.d.ts +2 -2
- package/dist/api/client.js +10 -7
- package/dist/api/client.js.map +1 -1
- package/dist/api/types.d.ts +1 -8
- package/dist/cli/prompts.d.ts +1 -0
- package/dist/commands/auth/credentials.js +1 -1
- package/dist/commands/auth/credentials.js.map +1 -1
- package/dist/commands/review/config.js +0 -9
- package/dist/commands/review/config.js.map +1 -1
- package/dist/commands/review/configuration-guide.js +3 -2
- package/dist/commands/review/configuration-guide.js.map +1 -1
- package/dist/commands/review/repositories.js +11 -4
- package/dist/commands/review/repositories.js.map +1 -1
- package/dist/commands/skill/skills/using-daynight/references/execute-task-in-managed.md +6 -5
- package/dist/commands/skill/skills/using-daynight/references/handbook.md +1 -1
- package/dist/commands/skill/skills/using-daynight/references/handoff.md +1 -1
- package/dist/commands/worker/cleanup.d.ts +8 -2
- package/dist/commands/worker/cleanup.js +44 -160
- package/dist/commands/worker/cleanup.js.map +1 -1
- package/dist/commands/worker/config.d.ts +3 -3
- package/dist/commands/worker/config.js +0 -6
- package/dist/commands/worker/config.js.map +1 -1
- package/dist/commands/worker/control.d.ts +11 -18
- package/dist/commands/worker/control.js +75 -132
- package/dist/commands/worker/control.js.map +1 -1
- package/dist/commands/worker/coordinator.d.ts +10 -8
- package/dist/commands/worker/coordinator.js +311 -473
- package/dist/commands/worker/coordinator.js.map +1 -1
- package/dist/commands/worker/definition.js +9 -17
- package/dist/commands/worker/definition.js.map +1 -1
- package/dist/commands/worker/diagnostics.js +2 -3
- package/dist/commands/worker/diagnostics.js.map +1 -1
- package/dist/commands/worker/execution.d.ts +35 -10
- package/dist/commands/worker/execution.js +92 -283
- package/dist/commands/worker/execution.js.map +1 -1
- package/dist/commands/worker/herdr/agents.d.ts +12 -91
- package/dist/commands/worker/herdr/agents.js +111 -358
- package/dist/commands/worker/herdr/agents.js.map +1 -1
- package/dist/commands/worker/herdr/preflight.d.ts +21 -9
- package/dist/commands/worker/herdr/preflight.js +118 -124
- package/dist/commands/worker/herdr/preflight.js.map +1 -1
- package/dist/commands/worker/herdr.d.ts +7 -63
- package/dist/commands/worker/herdr.js.map +1 -1
- package/dist/commands/worker/identity.js +2 -2
- package/dist/commands/worker/identity.js.map +1 -1
- package/dist/commands/worker/index.d.ts +1 -0
- package/dist/commands/worker/index.js +6 -13
- package/dist/commands/worker/index.js.map +1 -1
- package/dist/commands/worker/prompts.d.ts +10 -3
- package/dist/commands/worker/prompts.js +21 -32
- package/dist/commands/worker/prompts.js.map +1 -1
- package/dist/commands/worker/remote.d.ts +2 -3
- package/dist/commands/worker/remote.js +1 -6
- package/dist/commands/worker/remote.js.map +1 -1
- package/dist/commands/worker/repositories.d.ts +20 -3
- package/dist/commands/worker/repositories.js +100 -21
- package/dist/commands/worker/repositories.js.map +1 -1
- package/dist/commands/worker/runtime.js +112 -217
- package/dist/commands/worker/runtime.js.map +1 -1
- package/dist/commands/worker/setup-environment.d.ts +31 -0
- package/dist/commands/worker/setup-environment.js +146 -0
- package/dist/commands/worker/setup-environment.js.map +1 -0
- package/dist/commands/worker/setup.d.ts +11 -0
- package/dist/commands/worker/setup.js +113 -0
- package/dist/commands/worker/setup.js.map +1 -0
- package/dist/commands/worker/store.d.ts +12 -114
- package/dist/commands/worker/store.js +92 -817
- package/dist/commands/worker/store.js.map +1 -1
- package/dist/commands/worker/types.d.ts +10 -114
- package/dist/commands/worker/worktrees.d.ts +9 -9
- package/dist/commands/worker/worktrees.js +77 -37
- package/dist/commands/worker/worktrees.js.map +1 -1
- package/dist/config/document.d.ts +0 -1
- package/dist/config/document.js +1 -14
- package/dist/config/document.js.map +1 -1
- package/dist/config/files.d.ts +7 -1
- package/dist/config/files.js +4 -1
- package/dist/config/files.js.map +1 -1
- package/dist/config/ownership.d.ts +12 -0
- package/dist/config/ownership.js +39 -0
- package/dist/config/ownership.js.map +1 -0
- package/package.json +2 -2
|
@@ -20,22 +20,11 @@ export type HerdrTaskBinding = {
|
|
|
20
20
|
paneId: string;
|
|
21
21
|
terminalId: string;
|
|
22
22
|
};
|
|
23
|
-
export type
|
|
23
|
+
export type HerdrPendingStop = {
|
|
24
|
+
context: HerdrExecutionOwner & {
|
|
25
|
+
cwd: string;
|
|
26
|
+
};
|
|
24
27
|
binding: HerdrTaskBinding;
|
|
25
|
-
ownerLabel: string;
|
|
26
|
-
environment: HerdrWorkspaceEnvironment;
|
|
27
|
-
};
|
|
28
|
-
export type HerdrPreparedWorkspace = {
|
|
29
|
-
binding: HerdrTaskBinding;
|
|
30
|
-
workspaceEvidence: HerdrWorkspaceEvidence | null;
|
|
31
|
-
};
|
|
32
|
-
export type HerdrLaunchEvidence = {
|
|
33
|
-
binding: HerdrTaskBinding;
|
|
34
|
-
ownerLabel: string;
|
|
35
|
-
agent: WorkerAgent;
|
|
36
|
-
argv: readonly string[];
|
|
37
|
-
referenceBaseline: "empty";
|
|
38
|
-
workspaceEvidence: HerdrWorkspaceEvidence;
|
|
39
28
|
};
|
|
40
29
|
export type HerdrNativeReference = {
|
|
41
30
|
source: string;
|
|
@@ -53,16 +42,6 @@ export type HerdrAgentObservation = {
|
|
|
53
42
|
stateChangeSeq: number | null;
|
|
54
43
|
completionSeq: number | null;
|
|
55
44
|
};
|
|
56
|
-
export type HerdrStopObservation = {
|
|
57
|
-
binding: HerdrTaskBinding;
|
|
58
|
-
ownerLabel: string;
|
|
59
|
-
agent: WorkerAgent;
|
|
60
|
-
nativeSessionId: string | null;
|
|
61
|
-
shellPid: number;
|
|
62
|
-
processIds: readonly number[];
|
|
63
|
-
nativeProcessIds: readonly number[] | null;
|
|
64
|
-
observedAt: number;
|
|
65
|
-
};
|
|
66
45
|
export type HerdrOwnedWorkspace = {
|
|
67
46
|
owner: HerdrExecutionOwner;
|
|
68
47
|
workspaceId: string;
|
|
@@ -89,17 +68,15 @@ export type HerdrWorkspaceEnvironment = Readonly<{
|
|
|
89
68
|
XDG_CONFIG_HOME: string;
|
|
90
69
|
XDG_STATE_HOME: string;
|
|
91
70
|
}>;
|
|
92
|
-
export declare const herdrExecutionLabel: (context:
|
|
93
|
-
export declare const herdrExecutionAgentName: (context:
|
|
71
|
+
export declare const herdrExecutionLabel: (context: HerdrExecutionOwner) => string;
|
|
72
|
+
export declare const herdrExecutionAgentName: (context: HerdrExecutionOwner) => string;
|
|
94
73
|
export declare const parseHerdrExecutionLabel: (label: string) => HerdrExecutionOwner | null;
|
|
95
74
|
export declare class HerdrAgentActionError extends Error {
|
|
96
75
|
readonly action: string;
|
|
97
76
|
readonly submission: "not-submitted" | "rejected" | "unknown";
|
|
98
77
|
readonly promptSubmission: "not-submitted" | "submitted" | "unknown" | null;
|
|
99
|
-
readonly launchEvidence: HerdrLaunchEvidence | null;
|
|
100
78
|
constructor(message: string, action: string, submission: "not-submitted" | "rejected" | "unknown", options?: ErrorOptions & {
|
|
101
79
|
promptSubmission?: "not-submitted" | "submitted" | "unknown";
|
|
102
|
-
launchEvidence?: HerdrLaunchEvidence;
|
|
103
80
|
});
|
|
104
81
|
}
|
|
105
82
|
export declare const createHerdrAgentManager: (options: {
|
|
@@ -110,77 +87,21 @@ export declare const createHerdrAgentManager: (options: {
|
|
|
110
87
|
processExecuting?: (pid: number) => Promise<boolean>;
|
|
111
88
|
pollIntervalMs?: number;
|
|
112
89
|
}) => {
|
|
90
|
+
pendingStops: () => readonly HerdrPendingStop[];
|
|
113
91
|
listResources: (operation: Operation) => Promise<HerdrOwnedWorkspace[]>;
|
|
114
|
-
prepareWorkspace: (context: HerdrExecutionContext, operation: Operation) => Promise<
|
|
92
|
+
prepareWorkspace: (context: HerdrExecutionContext, operation: Operation) => Promise<HerdrTaskBinding>;
|
|
115
93
|
observe: (context: HerdrExecutionContext, binding: HerdrTaskBinding, operation: Operation) => Promise<HerdrAgentObservation>;
|
|
116
94
|
start: (context: HerdrExecutionContext, binding: HerdrTaskBinding, input: {
|
|
117
95
|
configuration: HerdrAgentConfiguration;
|
|
118
96
|
prompt: string;
|
|
119
97
|
resumeSessionId?: string;
|
|
120
|
-
|
|
121
|
-
launchEvidence?: HerdrLaunchEvidence;
|
|
122
|
-
workspaceEvidence?: HerdrWorkspaceEvidence | null;
|
|
123
|
-
}, operation: Operation) => Promise<{
|
|
124
|
-
kind: "rebind-required";
|
|
125
|
-
reason: "retained-native-reference" | "unverified-launch" | "unverified-workspace-environment";
|
|
126
|
-
observation: HerdrAgentObservation;
|
|
127
|
-
promptSubmission: "not-submitted";
|
|
128
|
-
launchEvidence: null;
|
|
129
|
-
} | {
|
|
130
|
-
kind: "reconnected";
|
|
131
|
-
observation: HerdrAgentObservation;
|
|
132
|
-
promptSubmission: "not-submitted";
|
|
133
|
-
launchEvidence: null;
|
|
134
|
-
} | {
|
|
135
|
-
kind: "waiting";
|
|
136
|
-
observation: HerdrAgentObservation;
|
|
137
|
-
promptSubmission: "not-submitted";
|
|
138
|
-
launchEvidence: HerdrLaunchEvidence | null;
|
|
139
|
-
} | {
|
|
140
|
-
kind: "started";
|
|
141
|
-
observation: HerdrAgentObservation;
|
|
142
|
-
promptSubmission: "submitted";
|
|
143
|
-
launchEvidence: HerdrLaunchEvidence | null;
|
|
144
|
-
} | {
|
|
145
|
-
kind: "waiting";
|
|
146
|
-
observation: HerdrAgentObservation;
|
|
147
|
-
promptSubmission: "submitted";
|
|
148
|
-
launchEvidence: HerdrLaunchEvidence | null;
|
|
149
|
-
}>;
|
|
98
|
+
}, operation: Operation) => Promise<HerdrAgentObservation>;
|
|
150
99
|
submitPrompt: (context: HerdrExecutionContext, binding: HerdrTaskBinding, prompt: string, operation: Operation) => Promise<{
|
|
151
100
|
submission: "submitted";
|
|
152
101
|
observation: HerdrAgentObservation;
|
|
153
102
|
}>;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
observation: HerdrAgentObservation;
|
|
158
|
-
}>;
|
|
159
|
-
confirmEmptyPane: (context: HerdrExecutionContext, binding: HerdrTaskBinding, operation: Operation) => Promise<{
|
|
160
|
-
noNativeProcess: true;
|
|
161
|
-
}>;
|
|
162
|
-
confirmStopped: (context: HerdrExecutionContext, binding: HerdrTaskBinding, evidence: HerdrStopObservation, operation: Operation) => Promise<{
|
|
163
|
-
agentStopped: true;
|
|
164
|
-
}>;
|
|
165
|
-
confirmMissingWorkspaceStopped: (context: HerdrExecutionContext, originalBinding: HerdrTaskBinding, evidence: HerdrStopObservation, operation: Operation) => Promise<{
|
|
166
|
-
agentStopped: true;
|
|
167
|
-
}>;
|
|
168
|
-
confirmRestoredStop: (context: HerdrExecutionContext, originalBinding: HerdrTaskBinding, restoredBinding: HerdrTaskBinding, evidence: HerdrStopObservation, operation: Operation) => Promise<{
|
|
169
|
-
agentStopped: true;
|
|
170
|
-
binding: HerdrTaskBinding;
|
|
171
|
-
}>;
|
|
172
|
-
confirmReplacedStop: (context: HerdrExecutionContext, originalBinding: HerdrTaskBinding, replacementBinding: HerdrTaskBinding, evidence: HerdrStopObservation, operation: Operation) => Promise<{
|
|
173
|
-
agentStopped: true;
|
|
174
|
-
binding: HerdrTaskBinding;
|
|
175
|
-
}>;
|
|
176
|
-
forceStop: (context: HerdrExecutionContext, binding: HerdrTaskBinding, evidence: HerdrStopObservation, operation: Operation) => Promise<{
|
|
177
|
-
agentStopped: true;
|
|
178
|
-
originalPaneClosed: true;
|
|
179
|
-
}>;
|
|
180
|
-
closeWorkspace: (context: HerdrExecutionContext, binding: HerdrTaskBinding, proof: {
|
|
181
|
-
agentStopped: true;
|
|
182
|
-
}, operation: Operation) => Promise<{
|
|
183
|
-
workspaceClosed: true;
|
|
184
|
-
}>;
|
|
103
|
+
stopAndClose: (context: HerdrExecutionOwner & {
|
|
104
|
+
cwd: string;
|
|
105
|
+
}, binding: HerdrTaskBinding, operation: Operation) => Promise<void>;
|
|
185
106
|
};
|
|
186
107
|
export type HerdrAgentManager = ReturnType<typeof createHerdrAgentManager>;
|