@calltelemetry/openclaw-linear 0.8.0 → 0.8.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.
@@ -150,6 +150,12 @@ export async function runClaude(
150
150
  const env = { ...process.env };
151
151
  delete env.CLAUDECODE;
152
152
 
153
+ // Pass Anthropic API key if configured (plugin config takes precedence over env)
154
+ const claudeApiKey = pluginConfig?.claudeApiKey as string | undefined;
155
+ if (claudeApiKey) {
156
+ env.ANTHROPIC_API_KEY = claudeApiKey;
157
+ }
158
+
153
159
  const child = spawn(CLAUDE_BIN, args, {
154
160
  stdio: ["ignore", "pipe", "pipe"],
155
161
  cwd: workingDir,
@@ -203,8 +203,8 @@ describe("resolveCodingBackend", () => {
203
203
  expect(resolveCodingBackend(config)).toBe("gemini");
204
204
  });
205
205
 
206
- it("falls back to claude when no config provided", () => {
207
- expect(resolveCodingBackend({})).toBe("claude");
208
- expect(resolveCodingBackend({}, "anyAgent")).toBe("claude");
206
+ it("falls back to codex when no config provided", () => {
207
+ expect(resolveCodingBackend({})).toBe("codex");
208
+ expect(resolveCodingBackend({}, "anyAgent")).toBe("codex");
209
209
  });
210
210
  });
@@ -88,7 +88,7 @@ function resolveAlias(aliasMap: Map<string, CodingBackend>, input: string): Codi
88
88
  * Priority:
89
89
  * 1. Per-agent override: config.agentCodingTools[agentId]
90
90
  * 2. Global default: config.codingTool
91
- * 3. Hardcoded fallback: "claude"
91
+ * 3. Hardcoded fallback: "codex"
92
92
  */
93
93
  export function resolveCodingBackend(
94
94
  config: CodingToolsConfig,
@@ -104,7 +104,7 @@ export function resolveCodingBackend(
104
104
  const global = config.codingTool;
105
105
  if (global && global in BACKEND_RUNNERS) return global as CodingBackend;
106
106
 
107
- return "claude";
107
+ return "codex";
108
108
  }
109
109
 
110
110
  /**
@@ -30,7 +30,7 @@ function makeIssue(overrides: Partial<ProjectIssue> & { identifier: string; titl
30
30
  id: overrides.id ?? overrides.identifier.toLowerCase().replace("-", "_"),
31
31
  identifier: overrides.identifier,
32
32
  title: overrides.title,
33
- description: "description" in overrides ? overrides.description : "A sufficiently long description that is at least fifty characters for validation",
33
+ description: "description" in overrides ? overrides.description : "As a user, I want this feature so that I can be productive. Given I am logged in, When I click the button, Then the action completes.",
34
34
  estimate: "estimate" in overrides ? overrides.estimate : 3,
35
35
  priority: "priority" in overrides ? overrides.priority : 2,
36
36
  labels: overrides.labels ?? { nodes: [] },
@@ -8,7 +8,7 @@
8
8
  * before/after calling runAgent(). Tools read from this module-level context
9
9
  * at execution time (same pattern as active-session.ts).
10
10
  */
11
- import type { AnyAgentTool } from "openclaw/plugin-sdk";
11
+ import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk";
12
12
  import { jsonResult } from "openclaw/plugin-sdk";
13
13
  import type { LinearAgentApi } from "../api/linear-api.js";
14
14
 
@@ -20,6 +20,8 @@ export interface PlannerToolContext {
20
20
  linearApi: LinearAgentApi;
21
21
  projectId: string;
22
22
  teamId: string;
23
+ api: OpenClawPluginApi;
24
+ pluginConfig?: Record<string, unknown>;
23
25
  }
24
26
 
25
27
  // ---------------------------------------------------------------------------
@@ -151,6 +153,12 @@ export function auditPlan(issues: ProjectIssue[]): AuditResult {
151
153
  if (!issue.priority || issue.priority === 0) {
152
154
  problems.push(`${issue.identifier} "${issue.title}": missing priority`);
153
155
  }
156
+
157
+ // Acceptance criteria check (warning, not failure)
158
+ const acMarkers = /\b(given|when|then|as a|i want|so that|acceptance criteria|uat|test scenario)\b/i;
159
+ if (issue.description && !acMarkers.test(issue.description)) {
160
+ warnings.push(`${issue.identifier} "${issue.title}": no acceptance criteria or test scenarios found in description`);
161
+ }
154
162
  }
155
163
  }
156
164
 
@@ -262,7 +270,7 @@ export function createPlannerTools(): AnyAgentTool[] {
262
270
  type: "object",
263
271
  properties: {
264
272
  title: { type: "string", description: "Issue title" },
265
- description: { type: "string", description: "Issue description with acceptance criteria (min 50 chars)" },
273
+ description: { type: "string", description: "Issue description including: user story (As a...), acceptance criteria (Given/When/Then), and at least one UAT test scenario (min 50 chars)" },
266
274
  parentIdentifier: { type: "string", description: "Parent issue identifier (e.g. PROJ-2) to create as sub-issue" },
267
275
  isEpic: { type: "boolean", description: "Mark as epic (high-level feature area)" },
268
276
  priority: { type: "number", description: "Priority: 1=Urgent, 2=High, 3=Medium, 4=Low" },