@codetreker/daynight 0.31.0 → 0.37.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +237 -44
- package/config.example.yml +10 -3
- package/dist/api/client.d.ts +7 -1
- package/dist/api/client.js +117 -21
- package/dist/api/client.js.map +1 -1
- package/dist/api/json-source.d.ts +3 -0
- package/dist/api/json-source.js +113 -0
- package/dist/api/json-source.js.map +1 -0
- package/dist/api/parse.d.ts +2 -1
- package/dist/api/parse.js +16 -1
- package/dist/api/parse.js.map +1 -1
- package/dist/api/thread.d.ts +6 -0
- package/dist/api/thread.js +79 -0
- package/dist/api/thread.js.map +1 -0
- package/dist/api/types.d.ts +50 -0
- package/dist/cli/agent-cli-aliases.d.ts +21 -0
- package/dist/cli/agent-cli-aliases.js +57 -0
- package/dist/cli/agent-cli-aliases.js.map +1 -0
- package/dist/cli/application.js +17 -2
- package/dist/cli/application.js.map +1 -1
- package/dist/cli/cancellation.d.ts +1 -1
- package/dist/cli/cancellation.js.map +1 -1
- package/dist/cli/codex-agent-environment.d.ts +5 -0
- package/dist/cli/codex-agent-environment.js +28 -0
- package/dist/cli/codex-agent-environment.js.map +1 -0
- package/dist/cli/commands.js +1 -0
- package/dist/cli/commands.js.map +1 -1
- package/dist/cli/context.d.ts +9 -1
- package/dist/cli/context.js +3 -1
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/schema.d.ts +5 -1
- package/dist/cli/schema.js +10 -10
- package/dist/cli/schema.js.map +1 -1
- package/dist/commands/controller/archive-upload.d.ts +9 -0
- package/dist/commands/controller/archive-upload.js +137 -0
- package/dist/commands/controller/archive-upload.js.map +1 -0
- package/dist/commands/controller/definition.d.ts +1 -0
- package/dist/commands/controller/definition.js +9 -1
- package/dist/commands/controller/definition.js.map +1 -1
- package/dist/commands/controller/independent-archive.d.ts +7 -0
- package/dist/commands/controller/independent-archive.js +71 -0
- package/dist/commands/controller/independent-archive.js.map +1 -0
- package/dist/commands/controller/independent.js +20 -10
- package/dist/commands/controller/independent.js.map +1 -1
- package/dist/commands/controller/index.js +14 -1
- package/dist/commands/controller/index.js.map +1 -1
- package/dist/commands/controller/journal-format.js +25 -1
- package/dist/commands/controller/journal-format.js.map +1 -1
- package/dist/commands/controller/launch-ticket.js +3 -2
- package/dist/commands/controller/launch-ticket.js.map +1 -1
- package/dist/commands/controller/lifecycle-store.js +19 -7
- package/dist/commands/controller/lifecycle-store.js.map +1 -1
- package/dist/commands/controller/local-content.d.ts +2 -2
- package/dist/commands/controller/local-content.js +22 -20
- package/dist/commands/controller/local-content.js.map +1 -1
- package/dist/commands/controller/paths.d.ts +2 -0
- package/dist/commands/controller/paths.js +34 -0
- package/dist/commands/controller/paths.js.map +1 -0
- package/dist/commands/controller/pending-content.d.ts +20 -0
- package/dist/commands/controller/pending-content.js +159 -0
- package/dist/commands/controller/pending-content.js.map +1 -0
- package/dist/commands/controller/providers/codex.js +5 -1
- package/dist/commands/controller/providers/codex.js.map +1 -1
- package/dist/commands/controller/providers/projection.js +12 -0
- package/dist/commands/controller/providers/projection.js.map +1 -1
- package/dist/commands/controller/providers/types.d.ts +4 -0
- package/dist/commands/controller/resume.js +3 -2
- package/dist/commands/controller/resume.js.map +1 -1
- package/dist/commands/controller/runtime.js +11 -1
- package/dist/commands/controller/runtime.js.map +1 -1
- package/dist/commands/controller/sqlite/journal/006-pending-content.sql +12 -0
- package/dist/commands/project/definition.js +1 -1
- package/dist/commands/project/definition.js.map +1 -1
- package/dist/commands/review/definition.js +3 -3
- package/dist/commands/review/definition.js.map +1 -1
- package/dist/commands/server/runtime.d.ts +10 -1
- package/dist/commands/server/runtime.js +24 -7
- package/dist/commands/server/runtime.js.map +1 -1
- package/dist/commands/skill/read.d.ts +2 -0
- package/dist/commands/skill/read.js +36 -0
- package/dist/commands/skill/read.js.map +1 -0
- package/dist/commands/skill/skills/using-daynight/SKILL.md +4 -2
- package/dist/commands/skill/skills/using-daynight/references/authorization.md +2 -1
- package/dist/commands/skill/skills/using-daynight/references/goal.md +33 -8
- package/dist/commands/skill/skills/using-daynight/references/handbook.md +4 -1
- package/dist/commands/skill/skills/using-daynight/references/run-task.md +1 -1
- package/dist/commands/skill/skills/using-daynight/references/task-content.md +8 -4
- package/dist/commands/skill/skills/using-daynight/references/task-management.md +56 -6
- package/dist/commands/skill/skills/using-daynight/references/write-safety.md +22 -3
- package/dist/commands/skill/usage.md +237 -0
- package/dist/commands/task/command.js +26 -3
- package/dist/commands/task/command.js.map +1 -1
- package/dist/commands/task/definition.js +41 -7
- package/dist/commands/task/definition.js.map +1 -1
- package/dist/commands/task/rendering.js +4 -0
- package/dist/commands/task/rendering.js.map +1 -1
- package/dist/commands/task/thread-diagnostics.d.ts +5 -0
- package/dist/commands/task/thread-diagnostics.js +32 -0
- package/dist/commands/task/thread-diagnostics.js.map +1 -0
- package/dist/commands/task/thread-rendering.d.ts +8 -0
- package/dist/commands/task/thread-rendering.js +80 -0
- package/dist/commands/task/thread-rendering.js.map +1 -0
- package/dist/commands/task/thread.d.ts +11 -0
- package/dist/commands/task/thread.js +74 -0
- package/dist/commands/task/thread.js.map +1 -0
- package/dist/commands/worker/backends/web-process.js +5 -8
- package/dist/commands/worker/backends/web-process.js.map +1 -1
- package/dist/commands/worker/backends/web-store.d.ts +1 -0
- package/dist/commands/worker/backends/web-store.js +1 -0
- package/dist/commands/worker/backends/web-store.js.map +1 -1
- package/dist/commands/worker/backends/web.d.ts +1 -0
- package/dist/commands/worker/backends/web.js +8 -0
- package/dist/commands/worker/backends/web.js.map +1 -1
- package/dist/commands/worker/coordinator.js +14 -0
- package/dist/commands/worker/coordinator.js.map +1 -1
- package/dist/commands/worker/definition.js +2 -2
- package/dist/commands/worker/definition.js.map +1 -1
- package/dist/commands/worker/herdr/agents.d.ts +3 -0
- package/dist/commands/worker/herdr/agents.js +14 -3
- package/dist/commands/worker/herdr/agents.js.map +1 -1
- package/dist/commands/worker/herdr/arguments.d.ts +4 -0
- package/dist/commands/worker/herdr/arguments.js +17 -0
- package/dist/commands/worker/herdr/arguments.js.map +1 -1
- package/dist/commands/worker/herdr/codex-config.d.ts +8 -0
- package/dist/commands/worker/herdr/codex-config.js +75 -0
- package/dist/commands/worker/herdr/codex-config.js.map +1 -0
- package/dist/commands/worker/herdr/preflight.js +1 -18
- package/dist/commands/worker/herdr/preflight.js.map +1 -1
- package/dist/commands/worker/herdr.d.ts +4 -0
- package/dist/commands/worker/herdr.js +3 -2
- package/dist/commands/worker/herdr.js.map +1 -1
- package/dist/commands/worker/remote.js +3 -4
- package/dist/commands/worker/remote.js.map +1 -1
- package/dist/commands/worker/remove-worktree-contents.d.ts +3 -0
- package/dist/commands/worker/remove-worktree-contents.js +106 -0
- package/dist/commands/worker/remove-worktree-contents.js.map +1 -0
- package/dist/commands/worker/runtime.js +60 -4
- package/dist/commands/worker/runtime.js.map +1 -1
- package/dist/commands/worker/worktrees.js +69 -23
- package/dist/commands/worker/worktrees.js.map +1 -1
- package/dist/config/agent-cli-aliases.d.ts +5 -0
- package/dist/config/agent-cli-aliases.js +37 -0
- package/dist/config/agent-cli-aliases.js.map +1 -0
- package/dist/config/paths.d.ts +1 -1
- package/dist/config/paths.js +6 -2
- package/dist/config/paths.js.map +1 -1
- package/dist/platform/diagnostics.d.ts +5 -0
- package/dist/platform/diagnostics.js +12 -0
- package/dist/platform/diagnostics.js.map +1 -1
- package/dist/platform/sqlite-format.d.ts +1 -1
- package/dist/platform/sqlite-format.js +1 -1
- package/dist/platform/sqlite-format.js.map +1 -1
- package/dist/session/archive.d.ts +25 -0
- package/dist/session/archive.js +100 -0
- package/dist/session/archive.js.map +1 -0
- package/dist/session/codex-subagent-activity.d.ts +4 -0
- package/dist/session/codex-subagent-activity.js +13 -0
- package/dist/session/codex-subagent-activity.js.map +1 -0
- package/dist/session/v2/archive.d.ts +6 -0
- package/dist/session/v2/archive.js +163 -0
- package/dist/session/v2/archive.js.map +1 -0
- package/dist/session/v2/protocol.d.ts +19 -0
- package/dist/session/v2/protocol.js +260 -0
- package/dist/session/v2/protocol.js.map +1 -0
- package/dist/session/v2/responsibility.d.ts +3 -0
- package/dist/session/v2/responsibility.js +12 -0
- package/dist/session/v2/responsibility.js.map +1 -0
- package/dist/session/v2/types.d.ts +293 -0
- package/dist/session/v2/types.js +2 -0
- package/dist/session/v2/types.js.map +1 -0
- package/dist/session/v2/values.d.ts +59 -0
- package/dist/session/v2/values.js +201 -0
- package/dist/session/v2/values.js.map +1 -0
- package/package.json +5 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
ALTER TABLE execution ADD COLUMN archive_incomplete INTEGER NOT NULL DEFAULT 0;
|
|
2
|
+
UPDATE execution SET archive_incomplete=1 WHERE projection_gap IS NOT NULL;
|
|
3
|
+
|
|
4
|
+
CREATE TABLE content_index (
|
|
5
|
+
id TEXT PRIMARY KEY,
|
|
6
|
+
content_hash TEXT NOT NULL,
|
|
7
|
+
revision TEXT NOT NULL,
|
|
8
|
+
entry_seq TEXT NOT NULL
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
DROP TABLE projection;
|
|
12
|
+
DROP TABLE resources;
|
|
@@ -30,6 +30,6 @@ export const projectDefinition = {
|
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
32
|
options: [helpOption],
|
|
33
|
-
details: "Server: https://daynight.cc (optional serverUrl override in ~/.daynight/config.yml)\nRun daynight project <command> --help for command usage.",
|
|
33
|
+
details: "Server: https://daynight.cc (optional serverUrl override in DN_CONFIG_DIR/config.yml (default: ~/.daynight/config.yml))\nRun daynight project <command> --help for command usage.",
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/commands/project/definition.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAkB,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAA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,EAAE,CAAC;AAC7G,MAAM,UAAU,GAAkB,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;AAErH,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,oDAAoD;IACjE,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,8DAA8D;YAC3E,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;YAC1D,sBAAsB,EAAE,IAAI;YAC5B,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,yDAAyD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;gBACpI,UAAU;aACX;YACD,OAAO,EAAE,+eAA+e;SACzf;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;YACjC,OAAO,EAAE,gHAAgH;SAC1H;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,0BAA0B;YACvC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;YAChE,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;YACjC,OAAO,EAAE,oHAAoH;SAC9H;KACF;IACD,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,OAAO,EAAE,mLAAmL;CAC7L,CAAC"}
|
|
@@ -7,7 +7,7 @@ export const reviewDefinition = {
|
|
|
7
7
|
name: "run",
|
|
8
8
|
description: "Run foreground PR review until interrupted",
|
|
9
9
|
options: [helpOption],
|
|
10
|
-
details: "Run foreground PR review using ~/.daynight/config.yml until interrupted.",
|
|
10
|
+
details: "Run foreground PR review using DN_CONFIG_DIR/config.yml (default: ~/.daynight/config.yml) until interrupted.",
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
name: "list",
|
|
@@ -24,10 +24,10 @@ export const reviewDefinition = {
|
|
|
24
24
|
{ names: ["--path"], description: "Dedicated review clone path (relative to the current directory)", value: { name: "path", kind: "directory" } },
|
|
25
25
|
helpOption,
|
|
26
26
|
],
|
|
27
|
-
details: "Without --path, review.repositoryRoot (default: ~/daynights) determines the clone path.\nThe resolved absolute path is saved in ~/.daynight/config.yml.\nChanges take effect the next time daynight review run starts.",
|
|
27
|
+
details: "Without --path, review.repositoryRoot (default: ~/daynights) determines the clone path.\nThe resolved absolute path is saved in DN_CONFIG_DIR/config.yml (default: ~/.daynight/config.yml).\nChanges take effect the next time daynight review run starts.",
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
30
|
options: [helpOption],
|
|
31
|
-
details: "Configuration:
|
|
31
|
+
details: "Configuration: DN_CONFIG_DIR/config.yml (default: ~/.daynight/config.yml)\nRuntime state: DN_CONFIG_DIR (default: ~/.daynight/)\nRun daynight review <command> --help for command usage.",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/commands/review/definition.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAkB,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAE7G,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,mEAAmE;IAChF,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE,CAAC,UAAU,CAAC;YACrB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../src/commands/review/definition.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAkB,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAE7G,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,mEAAmE;IAChF,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE,CAAC,UAAU,CAAC;YACrB,OAAO,EAAE,8GAA8G;SACxH;QACD;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC,IAAI,CAAC;YACf,WAAW,EAAE,qDAAqD;YAClE,OAAO,EAAE,CAAC,UAAU,CAAC;YACrB,OAAO,EAAE,wTAAwT;SAClU;QACD;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,+DAA+D;YAC5E,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;YACtF,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,iEAAiE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE;gBACjJ,UAAU;aACX;YACD,OAAO,EAAE,4PAA4P;SACtQ;KACF;IACD,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,OAAO,EAAE,0LAA0L;CACpM,CAAC"}
|
|
@@ -6,7 +6,16 @@ export type ServerSession = {
|
|
|
6
6
|
readonly operation: Operation;
|
|
7
7
|
readonly serverUrl: string;
|
|
8
8
|
};
|
|
9
|
-
export type
|
|
9
|
+
export type ConfirmedMutationOutput = {
|
|
10
|
+
readonly kind: "confirmed-mutation";
|
|
11
|
+
readonly output: string;
|
|
12
|
+
readonly identity: {
|
|
13
|
+
readonly projectId: string;
|
|
14
|
+
readonly taskId: string;
|
|
15
|
+
readonly messageId: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type ServerCommand = (session: ServerSession) => Promise<string | void | ConfirmedMutationOutput>;
|
|
10
19
|
export type ServerCommandOptions = {
|
|
11
20
|
readonly signalEmitter?: Pick<EventEmitter, "on" | "off">;
|
|
12
21
|
readonly platform?: NodeJS.Platform;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createApiClient, createOperation } from "../../api/index.js";
|
|
2
2
|
import { resolveConfigurationPaths } from "../../config/paths.js";
|
|
3
3
|
import { loadServerConfiguration } from "../../config/server.js";
|
|
4
|
+
import { PublicDiagnosticError } from "../../platform/diagnostics.js";
|
|
4
5
|
export const runServerCommand = async (context, command, options = {}) => {
|
|
5
6
|
const cancellation = new AbortController();
|
|
6
7
|
const operation = createOperation({ signal: cancellation.signal, ...(options.operationLimits === undefined ? {} : { limits: options.operationLimits }) });
|
|
@@ -9,6 +10,8 @@ export const runServerCommand = async (context, command, options = {}) => {
|
|
|
9
10
|
const listeners = [];
|
|
10
11
|
let failed = false;
|
|
11
12
|
let failure;
|
|
13
|
+
let confirmed;
|
|
14
|
+
const confirmedFailure = (phase, cause) => new PublicDiagnosticError(`Message posted. Id: ${confirmed.identity.messageId}\nThe message is confirmed, but local ${phase} failed.`, 1, { cause });
|
|
12
15
|
try {
|
|
13
16
|
for (const signal of signals) {
|
|
14
17
|
const cancel = () => cancellation.abort(new Error(`Received ${signal}.`));
|
|
@@ -23,14 +26,26 @@ export const runServerCommand = async (context, command, options = {}) => {
|
|
|
23
26
|
operation.check();
|
|
24
27
|
const api = createApiClient({ serverUrl, serverToken, operation, ...(options.fetch === undefined ? {} : { fetch: options.fetch }) });
|
|
25
28
|
const output = await command({ api, operation, serverUrl });
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
if (typeof output === "object" && output.kind === "confirmed-mutation") {
|
|
30
|
+
confirmed = output;
|
|
31
|
+
const receipt = createOperation({ limits: { totalMs: 5_000 } });
|
|
32
|
+
try {
|
|
33
|
+
await context.stdoutBytes(Buffer.from(output.output, "utf8"), receipt.signal);
|
|
34
|
+
}
|
|
35
|
+
finally {
|
|
36
|
+
receipt.dispose();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
operation.check();
|
|
41
|
+
if (typeof output === "string")
|
|
42
|
+
context.stdout(output);
|
|
43
|
+
}
|
|
29
44
|
}
|
|
30
45
|
catch (cause) {
|
|
31
46
|
failed = true;
|
|
32
|
-
failure = cause;
|
|
33
|
-
throw
|
|
47
|
+
failure = confirmed === undefined ? cause : confirmedFailure("output", cause);
|
|
48
|
+
throw failure;
|
|
34
49
|
}
|
|
35
50
|
finally {
|
|
36
51
|
const cleanup = [];
|
|
@@ -54,8 +69,10 @@ export const runServerCommand = async (context, command, options = {}) => {
|
|
|
54
69
|
catch (cause) {
|
|
55
70
|
cleanup.push(cause);
|
|
56
71
|
}
|
|
57
|
-
if (cleanup.length !== 0)
|
|
58
|
-
|
|
72
|
+
if (cleanup.length !== 0) {
|
|
73
|
+
const cause = new AggregateError(failed ? [failure, ...cleanup] : cleanup, "Server command or cancellation cleanup failed.");
|
|
74
|
+
throw confirmed === undefined ? cause : confirmedFailure("cleanup", cause);
|
|
75
|
+
}
|
|
59
76
|
}
|
|
60
77
|
};
|
|
61
78
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/commands/server/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.js","s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AI,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC;QACtC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,KAAK,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,gDAAgD,CAAC,CAAC;YAC7H,MAAM,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { withCliCancellation } from "../../cli/cancellation.js";
|
|
4
|
+
export const runSkillRead = async (context) => {
|
|
5
|
+
const filename = path.join(context.packageDirectory, "dist/commands/skill/usage.md");
|
|
6
|
+
await withCliCancellation({}, async (signal) => {
|
|
7
|
+
let contents;
|
|
8
|
+
try {
|
|
9
|
+
contents = await readFile(filename);
|
|
10
|
+
new TextDecoder("utf-8", { fatal: true }).decode(contents);
|
|
11
|
+
}
|
|
12
|
+
catch (cause) {
|
|
13
|
+
throw new Error(`Cannot read the installed Daynight CLI usage manual ${filename}. Reinstall the npm package and try again.`, { cause });
|
|
14
|
+
}
|
|
15
|
+
signal.throwIfAborted();
|
|
16
|
+
let failure;
|
|
17
|
+
try {
|
|
18
|
+
await context.stdoutBytes(contents, signal);
|
|
19
|
+
}
|
|
20
|
+
catch (cause) {
|
|
21
|
+
failure = cause;
|
|
22
|
+
throw cause;
|
|
23
|
+
}
|
|
24
|
+
finally {
|
|
25
|
+
try {
|
|
26
|
+
await context.closeStdoutBytes?.();
|
|
27
|
+
}
|
|
28
|
+
catch (cause) {
|
|
29
|
+
if (failure !== undefined)
|
|
30
|
+
throw new AggregateError([failure, cause], "CLI usage output and stdout cleanup failed.", { cause: failure });
|
|
31
|
+
throw cause;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=read.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../../src/commands/skill/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGhE,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,OAAmB,EAAiB,EAAE;IACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,8BAA8B,CAAC,CAAC;IACrF,MAAM,mBAAmB,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAC7C,IAAI,QAAgB,CAAC;QACrB,IAAI,CAAC;YACH,QAAQ,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,uDAAuD,QAAQ,4CAA4C,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAAC,CAAC;QAC5J,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,IAAI,OAAgB,CAAC;QACrB,IAAI,CAAC;YAAC,MAAM,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAAC,CAAC;QACpD,OAAO,KAAK,EAAE,CAAC;YAAC,OAAO,GAAG,KAAK,CAAC;YAAC,MAAM,KAAK,CAAC;QAAC,CAAC;gBACvC,CAAC;YACP,IAAI,CAAC;gBAAC,MAAM,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;YAAC,CAAC;YAC3C,OAAO,KAAK,EAAE,CAAC;gBACb,IAAI,OAAO,KAAK,SAAS;oBAAE,MAAM,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,6CAA6C,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;gBACzI,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: using-daynight
|
|
3
|
-
description: Manage projects, tasks, attachments, and Goals with the Daynight CLI; create tasks, execute a specified task, or review a handoff. Use only when explicitly invoked or the context clearly requires Daynight.
|
|
3
|
+
description: Manage projects, tasks, discussion threads, attachments, and Goals with the Daynight CLI; create tasks, execute a specified task, or review a handoff. Use only when explicitly invoked or the context clearly requires Daynight.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Using Daynight
|
|
@@ -15,10 +15,11 @@ Use the `daynight` CLI to operate it and [Daynight](https://daynight.cc) to brow
|
|
|
15
15
|
| Project | A project associated with a Git repository, organizing tasks and project access. |
|
|
16
16
|
| Task | An independently tracked work item with a description, status, dependencies, execution requirements, and PR references. In this skill, "task" means this object. |
|
|
17
17
|
| Goal | A complete objective expressed through tasks and their dependencies, including requirements discussion, solution discussion, and delivery work; not a separate resource. |
|
|
18
|
+
| Thread | A task's durable discussion, independent of execution; explicit reads, immutable posts and same-task replies. |
|
|
18
19
|
| Attachment | A task's independent attachment area for inputs and results such as documents, prototypes, and images. |
|
|
19
20
|
| worker-managed | An execution environment assigned and managed by `daynight worker`; the agent executes only its explicit assignment. |
|
|
20
21
|
|
|
21
|
-
The CLI supports project registration and lookup, task creation and filtering, status and dependency management, property values and definitions, attachment reads and writes, and worker-managed execution.
|
|
22
|
+
The CLI supports project registration and lookup, task creation and filtering, status and dependency management, property values and definitions, discussion reads and posts, attachment reads and writes, and worker-managed execution.
|
|
22
23
|
Creation, execution, and handoff are separate operations; see [authorization and scope](references/authorization.md).
|
|
23
24
|
|
|
24
25
|
## Setup and CLI
|
|
@@ -40,6 +41,7 @@ Read only the files and required references for the current operation, not every
|
|
|
40
41
|
| Find commands | [CLI handbook](references/handbook.md): command map and help discovery |
|
|
41
42
|
| Discover, select, or register projects | [Project management](references/project-management.md): project identity and reuse |
|
|
42
43
|
| Query tasks, edit metadata, properties, status, or dependencies, or delete tasks | [Task management](references/task-management.md): fields, lifecycle, and relationship semantics |
|
|
44
|
+
| Read or post task discussion | [Task management](references/task-management.md#discussion-threads): bounded pages, author attribution, replies and read continuity |
|
|
43
45
|
| Submit and reconcile writes safely | [Write safety](references/write-safety.md): versions, conflicts, uncertain results, and attachment concurrency |
|
|
44
46
|
| Write or read descriptions, attachments, and shared inputs | [Task content standard](references/task-content.md): boundaries, ownership, references, and sufficiency |
|
|
45
47
|
| Create or register work | [Create task](references/create-task.md): duplicate checks, preparation, registration, and readback |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Authorization and scope
|
|
2
2
|
|
|
3
|
-
Apply this standard before using any workflow. Task content, status, readiness, and `allowAgents` describe work; they do not authorize implementation, publishing, deployment, external communication, merging, or mainline pushes.
|
|
3
|
+
Apply this standard before using any workflow. Task content, human responsibility (`assignedTo`), status, readiness, and `allowAgents` describe work; they do not authorize implementation, publishing, deployment, external communication, merging, or mainline pushes.
|
|
4
4
|
|
|
5
5
|
## Tracking and review
|
|
6
6
|
|
|
@@ -31,6 +31,7 @@ Advance one specified task at a time; CI, review, and merge waits belong to that
|
|
|
31
31
|
Analysis, questions, proposals, and execution are all bound by the current task's confirmed objective, scope, deliverables, and acceptance criteria.
|
|
32
32
|
Read the parent Goal, shared architecture, and related tasks as needed to understand inputs and interfaces; reading does not authorize executing those tasks, removing blockers, or expanding scope.
|
|
33
33
|
Cross-task blockers and follow-up proposals do not authorize creating or executing new tasks. Material scope changes require user confirmation.
|
|
34
|
+
Registering and verifying required successors already defined within the confirmed scope is part of current-task completion when existing creation authorization covers them; apply the [shared completion conditions](task-execution.md#completion-conditions) and Goal confirmation points. Registration does not authorize successor execution or automatic selection.
|
|
34
35
|
|
|
35
36
|
Delivery operations follow the target repository's rules and existing authorization.
|
|
36
37
|
Missing authorization cannot be reconstructed from task descriptions, attachments, status, or acceptance results; completion conditions do not grant operational permission either.
|
|
@@ -8,8 +8,8 @@ This file covers only stage progression and Goal-specific requirements.
|
|
|
8
8
|
|
|
9
9
|
| Stage | Starting content | Results and completion gate |
|
|
10
10
|
| --- | --- | --- |
|
|
11
|
-
| Requirements discussion | Known problem, expected outcome, scope, constraints, open questions, and completion conditions |
|
|
12
|
-
| Solution discussion |
|
|
11
|
+
| Requirements discussion | Known problem, expected outcome, scope, constraints, open questions, and completion conditions | A complete uploaded and read-back `spec.md` and applicable interactive prototypes; the user explicitly confirms the current spec and directs progression to solution discussion; the required solution task has been registered and verified. |
|
|
12
|
+
| Solution discussion | The confirmed requirements task’s `spec.md` and applicable prototypes, design questions, and completion conditions | Architecture, key decisions, and breakdown; the user confirms the solution, and actual delivery tasks have been registered and read back. |
|
|
13
13
|
| Delivery tasks | Defined responsibilities, required designs and prototypes, contracts, and acceptance criteria | Actual results meeting the [shared delivery conditions](task-execution.md#completion-conditions). |
|
|
14
14
|
| Final acceptance | Complete confirmed requirements, actual combined results, and acceptance criteria | A conclusion for the whole Goal under [final acceptance](final-acceptance.md). |
|
|
15
15
|
|
|
@@ -20,16 +20,41 @@ Discussion acceptance does not automatically add repository PR merge requirement
|
|
|
20
20
|
## From requirements to solution
|
|
21
21
|
|
|
22
22
|
First create or reuse the single requirements-discussion task, titled `[Goal]<outcome>`.
|
|
23
|
-
|
|
23
|
+
At initial registration, create only the requirements stage; do not pre-create architecture placeholders or delivery items.
|
|
24
24
|
Return for registration-only requests; when explicitly asked to start the discussion, start or resume through [ordinary execution](run-task.md).
|
|
25
25
|
|
|
26
26
|
Requirements discussion defines the problem and behavior without deciding architecture or implementing production code.
|
|
27
|
-
|
|
28
|
-
Save and read back current artifacts under the authorization rules before requesting review.
|
|
27
|
+
Its complete spec is a result of this stage, not a prerequisite for registering or starting the Goal.
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
### Complete requirements spec
|
|
30
|
+
|
|
31
|
+
The requirements task must own a complete, independently readable Markdown attachment at `spec.md`, in addition to its description.
|
|
32
|
+
Keep the description self-contained about the objective, responsibility, scope, deliverables, completion conditions, and actual spec location; do not duplicate the full spec there.
|
|
33
|
+
A complete description or a repository link does not replace this required attachment.
|
|
34
|
+
|
|
35
|
+
The spec covers the background and problem, goals and non-goals, applicable actors and scenarios, required behavior and boundaries, constraints, success and failure behavior, and observable whole-Goal acceptance criteria.
|
|
36
|
+
Address permissions, data lifecycle, platforms, and nonfunctional requirements when applicable to the objective, without empty templates or invented requirements.
|
|
37
|
+
Resolve open questions that affect required scope, behavior, or acceptance before confirmation; leave architecture choices to solution discussion.
|
|
38
|
+
For UI Goals, produce the applicable final-style interactive prototypes under the [prototype requirements for task creation](create-task.md#prepare-content), and reference their uploaded resources from the spec.
|
|
39
|
+
|
|
40
|
+
Before requesting user confirmation, upload the complete current spec and necessary resources, read back their actual contents, verify the references, and provide the requirements task ID and attachment paths.
|
|
41
|
+
Confirmation applies to that current readable spec and applicable prototypes.
|
|
42
|
+
Missing, incomplete, failed, or unreadable uploads cannot pass the requirements gate.
|
|
43
|
+
Coherently update the spec and affected description, prototypes, and references after substantive requirement changes, and obtain renewed confirmation before progression.
|
|
44
|
+
Attachments do not change the task version; follow [write safety](write-safety.md#attachments-and-multi-step-operations) rather than treating an unchanged version as proof that confirmation remains valid.
|
|
45
|
+
|
|
46
|
+
### Register the next discussion before completion
|
|
47
|
+
|
|
48
|
+
After the user confirms the current spec and directs progression to solution discussion, create or reuse the solution-discussion task while the requirements task remains `in_progress`.
|
|
49
|
+
Use the requirements task as an ordinary prerequisite; the solution task stays `todo` and blocked until that prerequisite is done.
|
|
50
|
+
Its description must directly identify the requirements task ID, the full `spec.md` attachment path, and applicable prototype resources; read those actual sources and prepare the stage brief.
|
|
51
|
+
Keep the shared spec in its owning requirements task.
|
|
52
|
+
|
|
53
|
+
Read back the solution task, its required sources, and the actual dependency graph before completing the requirements task under the [shared completion conditions](task-execution.md#completion-conditions).
|
|
54
|
+
If registration or verification fails or its result is uncertain, keep the requirements task `in_progress`, reconcile actual resources, and resume with the confirmed IDs under [write safety](write-safety.md).
|
|
55
|
+
Once the successor is verified and all requirements-stage conditions are met, complete the requirements task and verify it is done.
|
|
56
|
+
Ordinary execution may then start the solution discussion at the user's explicit direction; managed execution completes only the original assignment and returns to the controller without starting the successor.
|
|
57
|
+
If completion is uncertain, reconcile it before starting the solution task.
|
|
33
58
|
|
|
34
59
|
Solution discussion explains responsibilities, data flow, control flow, interfaces, error behavior, key decisions, verification, and the proposed breakdown.
|
|
35
60
|
Keep the current solution and breakdown in this stage's own material; do not register delivery items before confirmation.
|
|
@@ -10,6 +10,8 @@ daynight --version
|
|
|
10
10
|
daynight --help
|
|
11
11
|
daynight task --help
|
|
12
12
|
daynight task update --help
|
|
13
|
+
daynight task thread read --help
|
|
14
|
+
daynight task thread post --help
|
|
13
15
|
daynight task attachment put --help
|
|
14
16
|
```
|
|
15
17
|
|
|
@@ -26,11 +28,12 @@ Do not treat this skill's workflow names as CLI commands or infer commands from
|
|
|
26
28
|
| Query tasks | `task list`, `task ready`, `task show` | [Task management](task-management.md#task-queries) |
|
|
27
29
|
| Read task dependency graphs | `task graph <task-id>` | [Verify dependency changes](task-management.md#verify-dependency-changes) |
|
|
28
30
|
| Create tasks | `task create` | [Create task](create-task.md) |
|
|
29
|
-
| Change metadata | `task update` | [Task management](task-management.md#metadata) |
|
|
31
|
+
| Change metadata or human responsibility | `task update` (`--assigned-to`, `--clear-assigned-to`) | [Task management](task-management.md#metadata) |
|
|
30
32
|
| Read property values or definitions | `task properties` | [Properties](task-management.md#properties) |
|
|
31
33
|
| Set or remove task properties | `task set-property`, `task remove-property` | [Properties](task-management.md#properties) |
|
|
32
34
|
| Change status | `task set-status` | [Task management](task-management.md#status-and-timing) |
|
|
33
35
|
| Delete tasks | `task delete` | [Task management](task-management.md#task-deletion) |
|
|
36
|
+
| Read or post durable task discussion | `task thread read`, `task thread post` | [Discussion threads](task-management.md#discussion-threads) |
|
|
34
37
|
| Upload, list, read, or remove attachments | `task attachment put/list/read/remove` | [Task content standard](task-content.md#attachments-and-references) |
|
|
35
38
|
| Set up and manage workers | `worker` | See `daynight worker --help`; for execution within an assignment, see [managed task execution](autopilot-managed-task.md). |
|
|
36
39
|
|
|
@@ -16,7 +16,7 @@ This workflow does not select candidate tasks or advance a queue automatically.
|
|
|
16
16
|
|
|
17
17
|
## Complete or wait
|
|
18
18
|
|
|
19
|
-
Follow the shared execution rules.
|
|
19
|
+
Follow the shared execution rules, including verifying required successor registration before completion.
|
|
20
20
|
Once all completion conditions are met, reread the in-progress task, set it to done using its observed version, and confirm the service result.
|
|
21
21
|
Handle all changes and uncertain responses under [write safety](write-safety.md); ordinary completion does not include a worker claim.
|
|
22
22
|
|
|
@@ -4,15 +4,18 @@ Applies to creation, breakdown, handoff, and execution.
|
|
|
4
4
|
Descriptions and their actual references should let an independent reader understand the task without the original chat, private worktrees, or temporary files.
|
|
5
5
|
Follow the target repository's documentation and language rules.
|
|
6
6
|
|
|
7
|
-
## Task and
|
|
7
|
+
## Task, Thread and Session boundary
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
Task descriptions and attachments store effective requirements, solutions and formal results.
|
|
10
|
+
Thread stores durable participant discussion; Session stores execution content, tool activity and operating context.
|
|
11
|
+
Apply these responsibilities to descriptions, attachments and referenced material.
|
|
12
|
+
Use [Thread commands](task-management.md#discussion-threads) to read, post and reply without changing task metadata or triggering execution.
|
|
13
|
+
An accepted conclusion in discussion must be incorporated into its effective content owner; a message alone does not replace the required task material or grant operational permission.
|
|
11
14
|
|
|
12
15
|
| Store in the task | Store in the session or relevant platform |
|
|
13
16
|
| --- | --- |
|
|
14
17
|
| Objectives, requirements, scope, delivery constraints, required inputs, acceptance criteria | Execution steps, tool choices, agent assignments, operational authorization |
|
|
15
|
-
| Current requirements or architecture, accepted conclusions and essential rationale, substantive open questions | Discussion rounds
|
|
18
|
+
| Current requirements or architecture, accepted conclusions and essential rationale, substantive open questions | Discussion rounds and confirmation process in Thread; debugging history, CI/review progress and execution context in Session |
|
|
16
19
|
| Deliverables, immutable revisions, acceptance conclusions, key observations and limitations | Worktree, HEAD, claim, blocker, waiting, and recovery context |
|
|
17
20
|
|
|
18
21
|
Classify by purpose, not by filenames or words such as "plan" or "method".
|
|
@@ -35,6 +38,7 @@ The description and readable references together provide the following informati
|
|
|
35
38
|
The description must identify this task's specific work and where to find its sources.
|
|
36
39
|
When attachment delivery is not specified, complete inline content needs no primary attachment; references or a mix of inline content and references are also valid.
|
|
37
40
|
Do not duplicate complete documents.
|
|
41
|
+
The [Goal protocol](goal.md#complete-requirements-spec) requires a complete `spec.md` attachment for the requirements stage even when its description is complete.
|
|
38
42
|
The [complete delivery standard](autopilot-managed-task.md#complete-delivery-standard) governs managed tasks' attachment and separate review-file requirements; the general inline-content rule cannot waive them.
|
|
39
43
|
Generic questions, unexplained links, unreadable sources, or "see the previous discussion" are insufficient.
|
|
40
44
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Task management
|
|
2
2
|
|
|
3
|
-
Covers query scope, metadata, lifecycle, and dependency semantics.
|
|
3
|
+
Covers query scope, discussion, metadata, lifecycle, and dependency semantics.
|
|
4
4
|
See [authorization and scope](authorization.md) for operational permissions.
|
|
5
5
|
Follow [write safety](write-safety.md) for all writes.
|
|
6
6
|
Consult the relevant `--help` for arguments and field-clearing syntax.
|
|
@@ -10,10 +10,11 @@ Consult the relevant `--help` for arguments and field-clearing syntax.
|
|
|
10
10
|
| Read operation | Scope and limits |
|
|
11
11
|
| --- | --- |
|
|
12
12
|
| `task ready` | One capped page of candidate `todo` tasks whose direct prerequisites are all complete, ordered by creation, not relevance. An empty page does not rule out in-progress or blocked work. |
|
|
13
|
-
| `task list` | Traverse all matching pages. Excludes `done` by default; explicitly include completed tasks when checking for duplicates or inspecting history. |
|
|
13
|
+
| `task list` | Traverse all matching pages. Excludes `done` by default; explicitly include completed tasks when checking for duplicates or inspecting history. `--assigned-to <uuid\|me\|unassigned>` filters responsibility, and combines with the other list filters. |
|
|
14
14
|
| `task show` | A single task's full description, metadata, and exact version. Read it before operating on the selected task. |
|
|
15
15
|
| `task properties <task-id>` | The selected task's complete current property object and exact task version. |
|
|
16
16
|
| `task properties --schema` | The authenticated service's property definitions; no project or Git repository is required. |
|
|
17
|
+
| `task thread read <task-id>` | One bounded page of durable discussion, independent of task metadata and execution. |
|
|
17
18
|
| `task graph <task-id>` | The target's full bidirectionally connected component of ordinary dependencies, plus one layer of external prerequisites for those tasks. Includes all statuses without recursively expanding external tasks. |
|
|
18
19
|
|
|
19
20
|
Human-readable lists are summaries; JSON lists omit only `description`.
|
|
@@ -26,6 +27,40 @@ A candidate page or a single task cannot replace complete relationship verificat
|
|
|
26
27
|
Lists group tasks into in-progress, ready todo, blocked todo, and, when explicitly included, done.
|
|
27
28
|
These groups are not relevance rankings. See command help for filter syntax.
|
|
28
29
|
|
|
30
|
+
## Discussion threads
|
|
31
|
+
|
|
32
|
+
Use `task thread read <task-id>` for one bounded page of durable discussion,
|
|
33
|
+
independent of the current executor or Controller. The default is the latest
|
|
34
|
+
20 messages; `--count=N` accepts 1–100. Use exactly one of `--before-id` or
|
|
35
|
+
`--after-id` with a complete message UUID to read history or continue forward.
|
|
36
|
+
Pages display complete messages from old to new. A 256 KiB text limit can return
|
|
37
|
+
fewer messages than requested without truncating bodies. Thread read and post
|
|
38
|
+
accept `--project`; explicit selection does not read Task or Project first.
|
|
39
|
+
|
|
40
|
+
Readable blocks show full message/account Ids, Author, CreatedAt, optional
|
|
41
|
+
ReplyTo and Message. Agent authors include `Agent: True`; `--details` expands
|
|
42
|
+
verified claim/worker/provider attribution. A missing or empty display name
|
|
43
|
+
appears as Account with its actual account Id. There is no `--json` mode.
|
|
44
|
+
Terminal controls are visibly escaped and multiline bodies retain LF/TAB with
|
|
45
|
+
fixed indentation. More-before appears only above the page; more-after only
|
|
46
|
+
below it. Continue history from its first displayed Id, forward reads from its
|
|
47
|
+
last completely consumed Id. Empty forward reads preserve the input position.
|
|
48
|
+
|
|
49
|
+
Post with `task thread post <task-id> --body <text>`, optionally `--reply-to
|
|
50
|
+
<message-id>` and `--claim-id <active-claim-id>`. Body whitespace is preserved;
|
|
51
|
+
use `--body=-example` for dash-prefixed text. The service supplies the message
|
|
52
|
+
Id and author. Omit claim Id for an ordinary account; provide it explicitly for
|
|
53
|
+
verified Agent attribution. It is not inferred from task state or environment.
|
|
54
|
+
Messages are immutable and a reply must belong to the selected task.
|
|
55
|
+
|
|
56
|
+
Posting does not change task status, version, timestamps, properties or
|
|
57
|
+
dependencies, and does not trigger an Agent. Reading or posting discussion
|
|
58
|
+
grants no execution or delivery permission. Keep effective requirements and
|
|
59
|
+
results in their [content owners](task-content.md#task-thread-and-session-boundary).
|
|
60
|
+
Follow [Thread write safety](write-safety.md#thread-posts) for unknown outcomes.
|
|
61
|
+
A post receipt must not advance the continuously read position: after A, an
|
|
62
|
+
unseen B and a local post C must still be read using `--after-id A`.
|
|
63
|
+
|
|
29
64
|
## Metadata
|
|
30
65
|
|
|
31
66
|
`task update` cannot change status.
|
|
@@ -35,17 +70,32 @@ See the [task content standard](task-content.md) for organizing descriptions and
|
|
|
35
70
|
|
|
36
71
|
| Field | Semantics and limits |
|
|
37
72
|
| --- | --- |
|
|
38
|
-
| `allowAgents` | Permission for automatic selection. False for new tasks and cannot be enabled during creation. Enable only after an explicit [handoff](handoff.md) review.
|
|
73
|
+
| `allowAgents` | Permission for automatic selection. False for new tasks and cannot be enabled during creation. Enable only after an explicit [handoff](handoff.md) review. Omission preserves its value when assignment does not change. |
|
|
39
74
|
| `requiredPlatform` | `null`, `windows`, `linux`, or `macos`; null means unrestricted. Can be specified during creation or updates and cleared during updates. |
|
|
40
|
-
|
|
41
|
-
|
|
75
|
+
| `assignedTo` | One optional human responsible for the task, represented by a local user UUID or null. Create/update use `--assigned-to <user-uuid>`; update uses `--clear-assigned-to` to send null. These options conflict. Omission during update preserves the current value. |
|
|
76
|
+
|
|
77
|
+
A real assignee change, including first assignment or clearing, sets `allowAgents=false`
|
|
78
|
+
in the same update. A same-value assignment does not reset permission. The selected
|
|
79
|
+
new person must have project access; a retained former assignee may remain unchanged.
|
|
80
|
+
Human responsibility grants no project access or control of an existing claim.
|
|
81
|
+
Automatic acquisition requires assignment to the worker's authenticated account,
|
|
82
|
+
in addition to automatic permission and the other eligibility checks. Existing
|
|
83
|
+
claim inventory and explicit manual resume retain their execution-based authority.
|
|
84
|
+
Human responsibility is separate from the worker-managed execution assignment.
|
|
85
|
+
|
|
86
|
+
Actual changes to these fields are prohibited while `in_progress`.
|
|
42
87
|
Same-value requests preserve the version and timestamps, but stale versions still conflict.
|
|
43
|
-
Status
|
|
88
|
+
Status, worker and property operations preserve the human assignee. Other metadata
|
|
89
|
+
changes preserve all omitted fields subject to the assignment/permission rule above.
|
|
44
90
|
|
|
45
91
|
List and ready support filtering by automatic-execution permission and platform compatibility.
|
|
46
92
|
The service combines filters before pagination or candidate limits.
|
|
47
93
|
Platform compatibility includes unrestricted and exact-match tasks without changing dependency readiness.
|
|
48
94
|
Preserve filters across pages; do not locally filter a capped, unfiltered ready page.
|
|
95
|
+
Assignee filtering belongs to `list`, not `ready`; combine `--ready --assigned-to me`
|
|
96
|
+
on list when needed. `me` is bound to the successful response principal on every
|
|
97
|
+
page, including empty pages; a complete list traversal cannot change that identity.
|
|
98
|
+
No extra identity lookup is required.
|
|
49
99
|
|
|
50
100
|
Ordinary execution explicitly targeted by the user is not restricted by automatic-selection permission or platform compatibility, but must still satisfy dependency, input, and authorization requirements.
|
|
51
101
|
Automatic execution must use the actual runtime platform and recheck full task eligibility before starting.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Write safety
|
|
2
2
|
|
|
3
|
-
Applies to creation, metadata updates, property setting and removal, status changes, deletion, and attachment operations.
|
|
3
|
+
Applies to creation, metadata updates, property setting and removal, status changes, deletion, Thread posts, and attachment operations.
|
|
4
4
|
See the corresponding `--help` for command syntax.
|
|
5
5
|
|
|
6
6
|
## Decisions and versions
|
|
7
7
|
|
|
8
|
-
Before
|
|
8
|
+
Before changing task metadata or deleting a task, read the complete task, preserve the exact `version` used for the decision, and submit it through `--if-version`.
|
|
9
9
|
The version is a complete int64 decimal integer; do not round it.
|
|
10
10
|
The CLI's default pre-submission read only fetches the latest version and cannot protect an earlier decision.
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ Requests for the same status or value still check the version. `in_progress` is
|
|
|
15
15
|
## Uncertain results
|
|
16
16
|
|
|
17
17
|
A timeout, cancellation, or lost response may occur after a change takes effect; cancellation does not prove rollback.
|
|
18
|
-
|
|
18
|
+
Read the corresponding task fields, Thread pages or attachment content before deciding on another write; do not automatically retry writes.
|
|
19
19
|
|
|
20
20
|
When a creation result is uncertain, confirm it using complete fields, resource identity, and operation context; a matching title or one empty query is insufficient.
|
|
21
21
|
Preserve confirmed IDs and resume missing operations on the original resources, avoiding duplicate tasks or task chains.
|
|
@@ -24,6 +24,25 @@ If verification is impossible, report the actual error and unconfirmed items wit
|
|
|
24
24
|
Even if the expected value is readable, an unconfirmed response does not establish that this operation caused the change.
|
|
25
25
|
See [task management](task-management.md#task-deletion) and [managed task execution](autopilot-managed-task.md#complete-the-original-claim) for reconciliation specific to deletion and worker completion.
|
|
26
26
|
|
|
27
|
+
## Thread posts
|
|
28
|
+
|
|
29
|
+
A post appends one immutable message without a task version or client message
|
|
30
|
+
Id. The service generates the Id. `--claim-id` authenticates optional execution
|
|
31
|
+
attribution; it is not a submission identity and is never inferred.
|
|
32
|
+
|
|
33
|
+
A fully validated 201 response confirms the message and yields a receipt with
|
|
34
|
+
its Id. A later local output or cleanup failure retains that confirmation and
|
|
35
|
+
Id. A validated rejection, including `503 clock_not_advanced`, is a definite
|
|
36
|
+
failure. A lost response, dispatched transport failure, malformed success,
|
|
37
|
+
`503 message_outcome_unknown` or generic server failure leaves the outcome
|
|
38
|
+
unknown. The CLI never automatically repeats POST.
|
|
39
|
+
|
|
40
|
+
Keep the original body available and read normal Thread pages before deciding
|
|
41
|
+
to send again. Equal text cannot establish that the earlier request succeeded;
|
|
42
|
+
a new explicit post creates another message. Reading does not manufacture a
|
|
43
|
+
submission receipt, and a post receipt cannot advance the continuously read
|
|
44
|
+
position past other participants' unread messages.
|
|
45
|
+
|
|
27
46
|
## Attachments and multi-step operations
|
|
28
47
|
|
|
29
48
|
Attachment writes do not change the task version, status, or update time; a task version cannot protect attachments or freeze cross-task references.
|