@proagentstore/cli 0.4.9 → 0.4.11

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.
@@ -88,6 +88,14 @@ export class LocalRunner {
88
88
  const normalized = normalizeCreateTaskRequest(request);
89
89
  validateTaskInput(normalized.type, normalized.input);
90
90
  const now = new Date().toISOString();
91
+ // Optional card presentation for the console kanban (only set when provided).
92
+ const card = {};
93
+ if (normalized.title)
94
+ card.title = normalized.title;
95
+ if (normalized.subtitle)
96
+ card.subtitle = normalized.subtitle;
97
+ if (normalized.description)
98
+ card.description = normalized.description;
91
99
  // Agent-driven applications are steered by the remote Workflow brain via the
92
100
  // /browser/* endpoints — the runner never auto-executes them. The task exists
93
101
  // for the console board, the activity trace, and takeover keying.
@@ -97,6 +105,7 @@ export class LocalRunner {
97
105
  type: normalized.type,
98
106
  status: "running",
99
107
  input: normalized.input,
108
+ ...card,
100
109
  requiresApproval: false,
101
110
  createdAt: now,
102
111
  updatedAt: now,
@@ -111,6 +120,7 @@ export class LocalRunner {
111
120
  type: normalized.type,
112
121
  status: requiresApproval ? "needs_approval" : "queued",
113
122
  input: normalized.input,
123
+ ...card,
114
124
  requiresApproval,
115
125
  approval: requiresApproval
116
126
  ? {
@@ -1067,9 +1077,13 @@ function normalizeCreateTaskRequest(request) {
1067
1077
  if (!isRecord(request) || typeof request.type !== "string" || !request.type.trim()) {
1068
1078
  throw new RunnerInputError("task type required");
1069
1079
  }
1080
+ const str = (v, max) => (typeof v === "string" ? v.trim().slice(0, max) : "");
1070
1081
  return {
1071
1082
  type: request.type.trim().slice(0, 120),
1072
1083
  input: isRecord(request.input) ? request.input : {},
1084
+ title: str(request.title, 200),
1085
+ subtitle: str(request.subtitle, 200),
1086
+ description: str(request.description, 500),
1073
1087
  requiresApproval: request.requiresApproval === true,
1074
1088
  approvalPrompt: typeof request.approvalPrompt === "string"
1075
1089
  ? request.approvalPrompt.trim().slice(0, 500)
@@ -44,6 +44,14 @@ export class RunnerStore {
44
44
  const now = new Date().toISOString();
45
45
  let expired = 0;
46
46
  for (const task of data.tasks) {
47
+ // Job-application tasks are driven by a DURABLE Cloudflare Workflow, not this
48
+ // runner process — they survive a runner restart (relay reconnect / crash) and
49
+ // the workflow owns their lifecycle. Expiring them here would flip a LIVE apply
50
+ // to "failed", which re-mirrors to the board, resurrects the Retry button, and
51
+ // slips past the API single-flight guard → a second concurrent apply on the one
52
+ // browser page. Mirrors the API carve-out in expireOrphanedRuntimeTasks.
53
+ if (task.type === "job.apply_agent")
54
+ continue;
47
55
  if (task.status === "needs_human" || task.status === "running") {
48
56
  task.status = "failed";
49
57
  task.error =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proagentstore/cli",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "description": "CLI for creating, publishing, and running ProAgentStore agents",
5
5
  "license": "MIT",
6
6
  "type": "module",