runline 0.28.0 → 0.29.0

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.
@@ -1,9 +1,9 @@
1
1
  import * as t from "typebox";
2
2
  import { assertCommentInScope, assertIssueInScope, COMMENT_FIELDS, gql, key, requireUnscoped, } from "./shared.js";
3
3
  export function registerCommentActions(rl) {
4
- rl.registerAction("issue.addComment", {
4
+ rl.registerAction("comment.create", {
5
5
  access: "write",
6
- description: "Add a comment to an issue. Pass parentId to nest as a reply.",
6
+ description: "Create a comment on an issue. Pass parentId to nest as a reply.",
7
7
  inputSchema: t.Object({
8
8
  issueId: t.String({
9
9
  description: "The issue to associate the comment with. UUID or issue identifier (e.g., 'LIN-123')",
@@ -14,7 +14,7 @@ import { registerViewActions } from "./views.js";
14
14
  import { registerWebhookActions } from "./webhooks.js";
15
15
  export default function linear(rl) {
16
16
  rl.setName("linear");
17
- rl.setVersion("0.4.0");
17
+ rl.setVersion("0.5.0");
18
18
  rl.setConnectionSchema(t.Object({
19
19
  apiKey: t.String({
20
20
  description: "Linear API key (https://linear.app/settings/account/security)",
@@ -1,5 +1,5 @@
1
1
  import * as t from "typebox";
2
- import { assertIssueInScope, buildConnArgs, COMMENT_FIELDS, ensureScopeLabelsOnCreateOrReplace, forbidScopeLabelRemoval, gql, ISSUE_FIELDS, ISSUE_LITE, issueHasScope, key, LIST_INPUT_SCHEMA, mergeIssueScopeFilter, } from "./shared.js";
2
+ import { assertIssueInScope, buildConnArgs, ensureScopeLabelsOnCreateOrReplace, forbidScopeLabelRemoval, gql, ISSUE_FIELDS, ISSUE_LITE, issueHasScope, key, LIST_INPUT_SCHEMA, mergeIssueScopeFilter, } from "./shared.js";
3
3
  /**
4
4
  * Linear's IssueUpdateInput accepts explicit null for clearable relations
5
5
  * (e.g. cycleId: null removes the issue from its cycle). Omitted = leave
@@ -342,20 +342,4 @@ export function registerIssueActions(rl) {
342
342
  return data.issueRelationCreate;
343
343
  },
344
344
  });
345
- rl.registerAction("issue.listComments", {
346
- access: "read",
347
- description: "List comments on an issue.",
348
- inputSchema: t.Object({
349
- issueId: t.String(),
350
- limit: t.Optional(t.Number()),
351
- }),
352
- async execute(input, ctx) {
353
- const { issueId, limit } = input;
354
- await assertIssueInScope(ctx, issueId);
355
- const data = await gql(key(ctx), `query($id: String!, $first: Int) {
356
- issue(id: $id) { comments(first: $first) { nodes { ${COMMENT_FIELDS} } } }
357
- }`, { id: issueId, first: limit ?? 50 });
358
- return data.issue?.comments?.nodes;
359
- },
360
- });
361
345
  }
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * OpenAI image generation for runline.
3
3
  *
4
- * Wraps the GPT Image / DALL-E line at /v1/images/generations. Generated
4
+ * Wraps the GPT Image / DALL-E line: `image.create` at
5
+ * /v1/images/generations, `image.edit` at /v1/images/edits. Generated
5
6
  * images are written to disk and the action returns their file `path`s
6
7
  * (plus the optional revised prompt) — never raw base64, which bloats the
7
8
  * agent context and is stripped before delivery. Hand each `path` to the
@@ -17,6 +18,16 @@
17
18
  import { readImageInput, SEND_FILE_NOTE, writeImageFile, } from "../../_shared/imageFile.js";
18
19
  const ENDPOINT = "https://api.openai.com/v1/images/generations";
19
20
  const EDIT_ENDPOINT = "https://api.openai.com/v1/images/edits";
21
+ /** Newest GPT Image model; override per call or via the connection. */
22
+ const DEFAULT_MODEL = "gpt-image-2";
23
+ /**
24
+ * Model precedence, shared by create and edit: the call wins, then the
25
+ * connection's `defaultModel` (or OPENAI_IMAGE_MODEL), then the newest
26
+ * model.
27
+ */
28
+ function resolveModel(explicit, config) {
29
+ return (explicit ?? config.defaultModel ?? DEFAULT_MODEL);
30
+ }
20
31
  export default function openai(rl) {
21
32
  rl.setName("openai");
22
33
  rl.setVersion("0.1.0");
@@ -30,7 +41,7 @@ export default function openai(rl) {
30
41
  defaultModel: {
31
42
  type: "string",
32
43
  required: false,
33
- description: "Default image model when a call omits `model` (e.g. gpt-image-2). Falls back to gpt-image-1.",
44
+ description: "Default image model when a call omits `model` — e.g. gpt-image-1 to pin the older line. Defaults to gpt-image-2.",
34
45
  env: "OPENAI_IMAGE_MODEL",
35
46
  },
36
47
  });
@@ -80,9 +91,7 @@ export default function openai(rl) {
80
91
  throw new Error("openai: prompt is required");
81
92
  }
82
93
  const apiKey = ctx.connection.config.apiKey;
83
- const model = p.model ??
84
- ctx.connection.config.defaultModel ??
85
- "gpt-image-1";
94
+ const model = resolveModel(p.model, ctx.connection.config);
86
95
  const body = {
87
96
  model,
88
97
  prompt: p.prompt,
@@ -187,9 +196,7 @@ export default function openai(rl) {
187
196
  throw new Error("openai: imagePath (or imagePaths) is required");
188
197
  }
189
198
  const apiKey = ctx.connection.config.apiKey;
190
- const model = p.model ??
191
- ctx.connection.config.defaultModel ??
192
- "gpt-image-1";
199
+ const model = resolveModel(p.model, ctx.connection.config);
193
200
  const form = new FormData();
194
201
  form.append("model", model);
195
202
  form.append("prompt", p.prompt);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runline",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Code mode for agents \u2014 turn any API or command into a callable action",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",