@sideboard-ai/core 0.1.127 → 0.1.132

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.
@@ -31,12 +31,15 @@ import {
31
31
  slackTokenFor,
32
32
  syncBoardPins,
33
33
  updateSchedule
34
- } from "../chunk-DLM5LSQW.js";
34
+ } from "../chunk-SMWJAE74.js";
35
35
  import {
36
36
  listModelsForAgent,
37
37
  sideboardMcpProfile
38
- } from "../chunk-ZMUOPTKZ.js";
39
- import "../chunk-YMRT2DU6.js";
38
+ } from "../chunk-PK4PQUPU.js";
39
+ import "../chunk-LLX3OMHU.js";
40
+ import {
41
+ httpFetch
42
+ } from "../chunk-R7FGPBKL.js";
40
43
  import "../chunk-SYLTXDRF.js";
41
44
  import "../chunk-N5PM7HGQ.js";
42
45
  import "../chunk-KLBOWJ74.js";
@@ -79,30 +82,6 @@ import { z as z4 } from "zod";
79
82
  import { randomUUID as randomUUID2 } from "crypto";
80
83
  import { basename } from "path";
81
84
 
82
- // src/http/fetch.ts
83
- var injected = null;
84
- function formatFetchError(err, url) {
85
- if (!(err instanceof Error)) return `${String(err)} (${url})`;
86
- const cause = err.cause;
87
- let detail = "";
88
- if (cause instanceof Error) {
89
- const code = typeof cause.code === "string" ? cause.code : void 0;
90
- detail = code ? ` [${code}: ${cause.message}]` : ` [${cause.message}]`;
91
- } else if (cause != null) {
92
- detail = ` [${String(cause)}]`;
93
- }
94
- return `${err.message}${detail} (${url})`;
95
- }
96
- async function httpFetch(input, init) {
97
- const url = typeof input === "string" ? input : input.href;
98
- const fn = injected ?? globalThis.fetch.bind(globalThis);
99
- try {
100
- return await fn(url, init);
101
- } catch (err) {
102
- throw new Error(formatFetchError(err, url));
103
- }
104
- }
105
-
106
85
  // src/integrations/linear-oauth.ts
107
86
  import { createHash, randomBytes } from "crypto";
108
87
  import { createServer } from "http";
@@ -201,6 +180,16 @@ async function getLinearAuthToken(settings = loadAppSettings()) {
201
180
 
202
181
  // src/integrations/linear.ts
203
182
  var LINEAR_GRAPHQL = "https://api.linear.app/graphql";
183
+ var LIST_ISSUE_FIELDS = `
184
+ id
185
+ identifier
186
+ title
187
+ url
188
+ assignee { id name }
189
+ team { id key }
190
+ labels(first: 10) { nodes { name } }
191
+ cycle { name number startsAt endsAt completedAt }
192
+ `;
204
193
  var ISSUE_FIELDS = `
205
194
  id
206
195
  identifier
@@ -210,9 +199,9 @@ var ISSUE_FIELDS = `
210
199
  priority
211
200
  state { id name type }
212
201
  assignee { id name }
213
- team { id key name states { nodes { id name type } } }
214
- labels { nodes { name } }
215
- cycle { id name number startsAt endsAt completedAt }
202
+ team { id key name states(first: 50) { nodes { id name type } } }
203
+ labels(first: 50) { nodes { name } }
204
+ cycle { name number startsAt endsAt completedAt }
216
205
  `;
217
206
  var ASSIGNED_ISSUES_QUERY = `
218
207
  query SideboardAssignedIssues($first: Int!) {
@@ -224,7 +213,7 @@ query SideboardAssignedIssues($first: Int!) {
224
213
  orderBy: updatedAt
225
214
  filter: { state: { type: { nin: ["completed", "canceled"] } } }
226
215
  ) {
227
- nodes { ${ISSUE_FIELDS} }
216
+ nodes { ${LIST_ISSUE_FIELDS} }
228
217
  }
229
218
  }
230
219
  }
@@ -237,7 +226,7 @@ query SideboardTeams {
237
226
  id
238
227
  key
239
228
  name
240
- states { nodes { id name type } }
229
+ states(first: 50) { nodes { id name type } }
241
230
  }
242
231
  }
243
232
  }
@@ -1864,25 +1853,31 @@ async function startMcpServer() {
1864
1853
  }
1865
1854
  server.tool(
1866
1855
  "present_artifact",
1867
- "Show an HTML, SVG, markdown, or React document in Sideboard\u2019s Claude-style side column (desktop). Use instead of claude.ai\u2019s artifact tool \u2014 pass the full document content. Do not also emit the same document as a chat html/markdown fence. Prefer type=html for interactive pages. For type=react, pass a single component module that `export default`s a component (JSX/TSX ok) \u2014 Sideboard bootstraps React/ReactDOM/Babel and renders it; only `react`/`react-dom` imports are available, no other npm packages.",
1856
+ "Show a document or live log in Sideboard\u2019s side column. For html/svg/markdown/react, pass the FULL document and do not also fence that same body in chat. For type=log, pass only NEW lines (same artifact_id appends). Prefer type=log for long-running job output \u2014 do not resend HTML. type=react is a single default-export component (JSX/TSX); only react/react-dom imports.",
1868
1857
  {
1869
1858
  title: z4.string().describe("Short title shown in the artifact pane header"),
1870
- type: z4.enum(["html", "svg", "markdown", "react"]).describe(
1871
- "Artifact kind \u2014 html opens an iframe preview; react transpiles and renders a default-exported component in a sandboxed iframe"
1859
+ type: z4.enum(["html", "svg", "markdown", "react", "log"]).describe(
1860
+ "html/svg/markdown/react replace the pane. log appends content to the same artifact_id (new lines only)."
1872
1861
  ),
1873
1862
  content: z4.string().describe(
1874
- "Full document body (complete HTML page, SVG markup, markdown, or a React component module with a default export)"
1863
+ "html/svg/markdown/react: full document. log: only the new lines since the last call (empty is ok for a status-only update)."
1875
1864
  ),
1876
- artifact_id: z4.string().optional().describe("Stable id when updating the same artifact across turns")
1865
+ artifact_id: z4.string().optional().describe("Stable id. Required for type=log so later calls append to the same pane."),
1866
+ status: z4.enum(["running", "ok", "failed", "idle"]).optional().describe("Log header pill: running (working), ok (done), failed, idle"),
1867
+ phase: z4.string().optional().describe("Log subtitle (Signing, Notarizing, \u2026)"),
1868
+ mode: z4.enum(["append", "replace"]).optional().describe("log only: append (default) or replace the buffer")
1877
1869
  },
1878
- async ({ title, type, artifact_id }) => {
1870
+ async ({ title, type, artifact_id, status, phase, mode }) => {
1879
1871
  const id = artifact_id?.trim() || `artifact_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
1880
1872
  const payload = {
1881
1873
  ok: true,
1882
1874
  artifact_id: id,
1883
1875
  title,
1884
1876
  type,
1885
- message: "Artifact accepted. Sideboard desktop opens it in the side column beside chat."
1877
+ status,
1878
+ phase,
1879
+ mode: type === "log" ? mode ?? "append" : void 0,
1880
+ message: type === "log" ? "Log accepted. Same artifact_id appends; send only new lines next time." : "Artifact accepted. Sideboard desktop opens it in the side column beside chat."
1886
1881
  };
1887
1882
  return { content: [{ type: "text", text: JSON.stringify(payload) }] };
1888
1883
  }
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {
4
+ brightsyAccessTokenNeedsRefresh,
5
+ ensureBrightsyLocalConfigFresh,
6
+ refreshBrightsyAccessToken
7
+ } from "./chunk-R7FGPBKL.js";
8
+ export {
9
+ brightsyAccessTokenNeedsRefresh,
10
+ ensureBrightsyLocalConfigFresh,
11
+ refreshBrightsyAccessToken
12
+ };
@@ -0,0 +1,10 @@
1
+ import {
2
+ brightsyAccessTokenNeedsRefresh,
3
+ ensureBrightsyLocalConfigFresh,
4
+ refreshBrightsyAccessToken
5
+ } from "./chunk-AQESMTCZ.js";
6
+ export {
7
+ brightsyAccessTokenNeedsRefresh,
8
+ ensureBrightsyLocalConfigFresh,
9
+ refreshBrightsyAccessToken
10
+ };
@@ -4,15 +4,16 @@ import {
4
4
  isPidAlive,
5
5
  startOrchestration,
6
6
  waitForPidExit
7
- } from "./chunk-T7KJQJAX.js";
8
- import "./chunk-NV73AO7Q.js";
9
- import "./chunk-EKIDHL2T.js";
7
+ } from "./chunk-VFXZTSAD.js";
8
+ import "./chunk-MGYCQAZ6.js";
9
+ import "./chunk-SIPDL62B.js";
10
+ import "./chunk-AQESMTCZ.js";
10
11
  import "./chunk-VE22NWBD.js";
11
12
  import "./chunk-HULESWLI.js";
12
13
  import "./chunk-HZPO3SSZ.js";
13
14
  import "./chunk-QTUESPAW.js";
14
15
  import "./chunk-AXQ4ZWHK.js";
15
- import "./chunk-IUJOI7KK.js";
16
+ import "./chunk-FSCQXMGI.js";
16
17
  import "./chunk-DCOZABNT.js";
17
18
  import "./chunk-UDQI3N47.js";
18
19
  import "./chunk-FKOIHGKV.js";
@@ -6,9 +6,10 @@ import {
6
6
  isPidAlive,
7
7
  startOrchestration,
8
8
  waitForPidExit
9
- } from "./chunk-DLM5LSQW.js";
10
- import "./chunk-ZMUOPTKZ.js";
11
- import "./chunk-YMRT2DU6.js";
9
+ } from "./chunk-SMWJAE74.js";
10
+ import "./chunk-PK4PQUPU.js";
11
+ import "./chunk-LLX3OMHU.js";
12
+ import "./chunk-R7FGPBKL.js";
12
13
  import "./chunk-SYLTXDRF.js";
13
14
  import "./chunk-N5PM7HGQ.js";
14
15
  import "./chunk-KLBOWJ74.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.127",
3
+ "version": "0.1.132",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",