@danypops/papyrus 0.45.2 → 0.45.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/handlers/tasks.ts +6 -2
- package/src/modules/tasks.ts +6 -2
package/package.json
CHANGED
package/src/handlers/tasks.ts
CHANGED
|
@@ -29,6 +29,7 @@ import type { SessionIdentity } from "../session-identity/session-identity-servi
|
|
|
29
29
|
import type { TaskExecutionPlan } from "../task/task-execution.ts";
|
|
30
30
|
import type { TaskCompletion, Tasks } from "../task/task-service.ts";
|
|
31
31
|
import {
|
|
32
|
+
booleanProp,
|
|
32
33
|
classifySessionAuthorization,
|
|
33
34
|
classifyTaskDependencyCycles,
|
|
34
35
|
classifyTaskExecutionBounds,
|
|
@@ -147,6 +148,9 @@ const readSchemaProps = {
|
|
|
147
148
|
labels: arrayProp,
|
|
148
149
|
};
|
|
149
150
|
|
|
151
|
+
/** list-only: opts into full Artifact bodies instead of the lean summarizeArtifact() default (modules/tasks.ts). */
|
|
152
|
+
const listSchemaProps = { ...readSchemaProps, full: booleanProp };
|
|
153
|
+
|
|
150
154
|
/** Same gate/checklist narrative lines the removed tool built client-side. */
|
|
151
155
|
function completionContentText(labels: Map<string, string>, result: TaskCompletion): string {
|
|
152
156
|
const gates = result.gates.map((gate) => `${gate.passed ? "✓" : "✗"} ${gate.gate.type}: ${gate.gate.target} — ${gate.output}`).join("\n");
|
|
@@ -263,9 +267,9 @@ export function registerTasksVehicleOperations(registry: VehicleRegistry, deps:
|
|
|
263
267
|
|
|
264
268
|
define(
|
|
265
269
|
"list",
|
|
266
|
-
"Lists Tasks matching an optional status/text/labels filter, scoped to project_root. project_root is required (no ambient cwd server-side).",
|
|
270
|
+
"Lists Tasks matching an optional status/text/labels filter, scoped to project_root. project_root is required (no ambient cwd server-side). Returns a lean summary (no body/extra) unless full: true is passed.",
|
|
267
271
|
"read",
|
|
268
|
-
|
|
272
|
+
listSchemaProps,
|
|
269
273
|
["project_root"],
|
|
270
274
|
(input) => {
|
|
271
275
|
const rootTaskId = resolveRootTaskId(artifacts, tasks, input.project_root as string, input.root_task_id, input.root_task_name);
|
package/src/modules/tasks.ts
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* the actual thing this module avoids importing.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
import { summarizeArtifact } from "../artifact/artifact.ts";
|
|
22
23
|
import type { ArtifactStore } from "../artifact/artifact-store.ts";
|
|
23
24
|
import type { Checklist } from "../domain/checklist.ts";
|
|
24
25
|
import type { TaskEventContext, TaskEventDirection, TaskEventFeedQuery } from "../domain/task-event.ts";
|
|
@@ -28,7 +29,7 @@ import type { SessionIdentity } from "../session-identity/session-identity-servi
|
|
|
28
29
|
import { taskContext } from "../task/task-context.ts";
|
|
29
30
|
import { projectTaskExecution } from "../task/task-execution.ts";
|
|
30
31
|
import type { TaskStatus, Tasks } from "../task/task-service.ts";
|
|
31
|
-
import { type OperationInput, optionalNumber, optionalString, optionalStringArray, string } from "./operation-input.ts";
|
|
32
|
+
import { type OperationInput, optionalBoolean, optionalNumber, optionalString, optionalStringArray, string } from "./operation-input.ts";
|
|
32
33
|
|
|
33
34
|
const MODULE_ID = "tasks";
|
|
34
35
|
|
|
@@ -146,7 +147,10 @@ export function tasksOperations(tasks: Tasks, artifacts: ArtifactStore, sessionI
|
|
|
146
147
|
eventContext(input),
|
|
147
148
|
),
|
|
148
149
|
),
|
|
149
|
-
define("tasks.list", (input: OperationInput) =>
|
|
150
|
+
define("tasks.list", (input: OperationInput) => {
|
|
151
|
+
const rows = tasks.list(taskFilter(input));
|
|
152
|
+
return optionalBoolean(input, "full") === true ? rows : rows.map(summarizeArtifact);
|
|
153
|
+
}),
|
|
150
154
|
define("tasks.graph", (input: OperationInput) => tasks.graph(taskFilter(input))),
|
|
151
155
|
define("tasks.plan", (input: OperationInput) => projectTaskExecution(tasks.graph(taskFilter(input)))),
|
|
152
156
|
define("tasks.show", (input: OperationInput) => tasks.show(string(input, "id"))),
|