@astrosheep/keiyaku 4.5.2 → 4.5.4

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.
@@ -149,12 +149,14 @@ class TasksHandle {
149
149
  }
150
150
  compose(input) {
151
151
  const v = record(input, "compose input");
152
- closed(v, ["markdown", "namespace", "actor", "signal"], "compose input");
152
+ closed(v, ["markdown", "namespace", "actor", "signal", "plan"], "compose input");
153
153
  const markdown = text(v.markdown, "markdown");
154
154
  if (markdown === undefined)
155
155
  throw new TypeError("markdown is required");
156
+ if (v.plan !== undefined && typeof v.plan !== "boolean")
157
+ throw new TypeError("plan must be a boolean");
156
158
  const selected = namespace(v.namespace);
157
- return composeTasks(this.world, markdown, signal(v.signal), actor(v.actor), selected);
159
+ return composeTasks(this.world, markdown, signal(v.signal), actor(v.actor), selected, v.plan === true);
158
160
  }
159
161
  }
160
162
  export const Tasks = Object.freeze({
@@ -9,6 +9,11 @@ export type TaskView = Readonly<TaskDocument & {
9
9
  export declare function nukeTask(world: WorldRoot, options?: Readonly<{
10
10
  timeoutMs?: number;
11
11
  }>): Promise<void>;
12
+ export type TaskCompositionDiagnostic = Readonly<{
13
+ line: number;
14
+ reason: string;
15
+ token: string;
16
+ }>;
12
17
  export type TaskRefusal = Readonly<{
13
18
  kind: "task-missing";
14
19
  taskId: TaskId;
@@ -30,7 +35,7 @@ export type TaskRefusal = Readonly<{
30
35
  declaringTask: TaskId;
31
36
  }> | Readonly<{
32
37
  kind: "invalid-composition";
33
- diagnostic: string;
38
+ diagnostics: readonly TaskCompositionDiagnostic[];
34
39
  }>;
35
40
  export type TaskRetry = "busy" | "concurrent-modification";
36
41
  export type TaskOutcome<A> = Readonly<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrosheep/keiyaku",
3
- "version": "4.5.2",
3
+ "version": "4.5.4",
4
4
  "files": [
5
5
  "build"
6
6
  ],
@@ -76,7 +76,17 @@
76
76
  "doc": "docs",
77
77
  "test": "tests"
78
78
  },
79
- "keywords": [],
79
+ "keywords": [
80
+ "pi-package"
81
+ ],
82
+ "pi": {
83
+ "extensions": [
84
+ "./build/integrations/pi/keiyaku.ts"
85
+ ],
86
+ "skills": [
87
+ "./build/integrations/marketplace/plugins/keiyaku/skills"
88
+ ]
89
+ },
80
90
  "author": "",
81
91
  "license": "ISC",
82
92
  "publishConfig": {