@phenx-inc/ctlsurf 0.12.1 → 0.13.1
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.
- package/out/headless/index.mjs +25 -19
- package/out/headless/index.mjs.map +2 -2
- package/out/main/index.js +30 -18
- package/out/renderer/assets/{cssMode-D7r66wvO.js → cssMode-KhYyY-BM.js} +3 -3
- package/out/renderer/assets/{freemarker2-jSWJIjPG.js → freemarker2-BFsSgcWk.js} +1 -1
- package/out/renderer/assets/{handlebars-BnFyz5RH.js → handlebars-Be6_aBsm.js} +1 -1
- package/out/renderer/assets/{html-Bl5UFavp.js → html-G8mvsyfc.js} +1 -1
- package/out/renderer/assets/{htmlMode-D4VByBT6.js → htmlMode-Cfd5VCjw.js} +3 -3
- package/out/renderer/assets/{index-Cc_TqOCL.css → index-Bi_MjBqs.css} +116 -8
- package/out/renderer/assets/{index-DxhW1emk.js → index-MqgBcJzy.js} +259 -87
- package/out/renderer/assets/{javascript-CMN1OmwG.js → javascript-XyDWi6dC.js} +2 -2
- package/out/renderer/assets/{jsonMode-CJ5AYSPV.js → jsonMode-DZT5gBVW.js} +3 -3
- package/out/renderer/assets/{liquid-BGMIDTEm.js → liquid-BuajCNJ9.js} +1 -1
- package/out/renderer/assets/{lspLanguageFeatures-DGifVYB5.js → lspLanguageFeatures-BYkg2Yc-.js} +1 -1
- package/out/renderer/assets/{mdx-B2Z7R10Q.js → mdx-D0Qx2GMS.js} +1 -1
- package/out/renderer/assets/{python-LMDMSSdn.js → python-ChncNy6S.js} +1 -1
- package/out/renderer/assets/{razor-BZSrziPu.js → razor-C6MUtfaS.js} +1 -1
- package/out/renderer/assets/{tsMode-DF9m6_3n.js → tsMode-C2aMdzdU.js} +1 -1
- package/out/renderer/assets/{typescript-rZeCMf0a.js → typescript-CB71AtAT.js} +1 -1
- package/out/renderer/assets/{xml-fNSZ-7so.js → xml-tHS1Ec9w.js} +1 -1
- package/out/renderer/assets/{yaml-1wxIuvzh.js → yaml-CZcp5ueF.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/package.json +1 -1
- package/src/main/index.ts +9 -0
- package/src/main/orchestrator.ts +1 -1
- package/src/main/ticketStore.ts +26 -20
- package/src/renderer/App.tsx +14 -2
- package/src/renderer/components/CtlsurfPanel.tsx +169 -35
- package/src/renderer/components/TerminalPanel.tsx +7 -21
- package/src/renderer/components/TicketPanel.tsx +80 -24
- package/src/renderer/styles.css +116 -8
package/out/headless/index.mjs
CHANGED
|
@@ -5471,7 +5471,7 @@ var require_package = __commonJS({
|
|
|
5471
5471
|
"package.json"(exports, module) {
|
|
5472
5472
|
module.exports = {
|
|
5473
5473
|
name: "@phenx-inc/ctlsurf",
|
|
5474
|
-
version: "0.
|
|
5474
|
+
version: "0.13.1",
|
|
5475
5475
|
description: "Agent-agnostic terminal and desktop app for ctlsurf \u2014 run Claude Code, Codex, or any coding agent with live session logging and remote control",
|
|
5476
5476
|
main: "out/main/index.js",
|
|
5477
5477
|
bin: {
|
|
@@ -7261,7 +7261,10 @@ function findPageByTitle2(pages, title) {
|
|
|
7261
7261
|
}
|
|
7262
7262
|
var TicketStore = class {
|
|
7263
7263
|
api;
|
|
7264
|
-
|
|
7264
|
+
// Per-cwd cache of the resolved Tickets datastore: the block (the datastore
|
|
7265
|
+
// element) and the Agent Datastore page it lives on. Both ids are handed to
|
|
7266
|
+
// the coding agent so it can read/update tickets via the ctlsurf MCP tools.
|
|
7267
|
+
dsCache = /* @__PURE__ */ new Map();
|
|
7265
7268
|
constructor(api) {
|
|
7266
7269
|
this.api = api;
|
|
7267
7270
|
}
|
|
@@ -7270,11 +7273,11 @@ var TicketStore = class {
|
|
|
7270
7273
|
const title = input.title?.trim();
|
|
7271
7274
|
if (!title) return { ok: false, error: "Title is required" };
|
|
7272
7275
|
try {
|
|
7273
|
-
const
|
|
7274
|
-
if (!
|
|
7276
|
+
const ds = await this.ensureDatastore(cwd, true);
|
|
7277
|
+
if (!ds) {
|
|
7275
7278
|
return { ok: false, error: "No ctlsurf project found for this folder" };
|
|
7276
7279
|
}
|
|
7277
|
-
await this.api.addRow(blockId, {
|
|
7280
|
+
await this.api.addRow(ds.blockId, {
|
|
7278
7281
|
Title: title,
|
|
7279
7282
|
Description: input.description?.trim() || "",
|
|
7280
7283
|
Status: input.status || "Open",
|
|
@@ -7293,9 +7296,9 @@ var TicketStore = class {
|
|
|
7293
7296
|
const title = input.title?.trim();
|
|
7294
7297
|
if (!title) return { ok: false, error: "Title is required" };
|
|
7295
7298
|
try {
|
|
7296
|
-
const
|
|
7297
|
-
if (!
|
|
7298
|
-
await this.api.updateRow(blockId, rowId, {
|
|
7299
|
+
const ds = await this.ensureDatastore(cwd, false);
|
|
7300
|
+
if (!ds) return { ok: false, error: "No Tickets datastore for this project" };
|
|
7301
|
+
await this.api.updateRow(ds.blockId, rowId, {
|
|
7299
7302
|
Title: title,
|
|
7300
7303
|
Description: input.description?.trim() || "",
|
|
7301
7304
|
Status: input.status || "Open",
|
|
@@ -7312,9 +7315,9 @@ var TicketStore = class {
|
|
|
7312
7315
|
* datastore — an unconfigured project simply has no tickets yet. */
|
|
7313
7316
|
async listTickets(cwd) {
|
|
7314
7317
|
try {
|
|
7315
|
-
const
|
|
7316
|
-
if (!
|
|
7317
|
-
const res = await this.api.queryRows(blockId, { orderBy: "Created", order: "desc", limit: 200 });
|
|
7318
|
+
const ds = await this.ensureDatastore(cwd, false);
|
|
7319
|
+
if (!ds) return { ok: true, tickets: [] };
|
|
7320
|
+
const res = await this.api.queryRows(ds.blockId, { orderBy: "Created", order: "desc", limit: 200 });
|
|
7318
7321
|
const tickets = (res?.rows || []).map((r) => ({
|
|
7319
7322
|
id: r.id,
|
|
7320
7323
|
title: String(r.data?.Title ?? ""),
|
|
@@ -7323,14 +7326,14 @@ var TicketStore = class {
|
|
|
7323
7326
|
priority: String(r.data?.Priority ?? "Med"),
|
|
7324
7327
|
created: r.data?.Created ?? r.created_at ?? null
|
|
7325
7328
|
}));
|
|
7326
|
-
return { ok: true, tickets };
|
|
7329
|
+
return { ok: true, tickets, blockId: ds.blockId, pageId: ds.pageId };
|
|
7327
7330
|
} catch (err) {
|
|
7328
7331
|
log3(`listTickets failed for ${cwd}: ${err?.message || err}`);
|
|
7329
7332
|
return { ok: false, tickets: [], error: err?.message || String(err) };
|
|
7330
7333
|
}
|
|
7331
7334
|
}
|
|
7332
7335
|
async ensureDatastore(cwd, create) {
|
|
7333
|
-
const cached = this.
|
|
7336
|
+
const cached = this.dsCache.get(cwd);
|
|
7334
7337
|
if (cached) return cached;
|
|
7335
7338
|
let folder = null;
|
|
7336
7339
|
try {
|
|
@@ -7342,11 +7345,13 @@ var TicketStore = class {
|
|
|
7342
7345
|
const folderDetail = await this.api.getFolder(folder.id);
|
|
7343
7346
|
const agentPage = findPageByTitle2(folderDetail?.pages || [], AGENT_DATASTORE_PAGE_TITLE2);
|
|
7344
7347
|
if (!agentPage?.id) return null;
|
|
7345
|
-
const
|
|
7348
|
+
const pageId = agentPage.id;
|
|
7349
|
+
const blockId = await this.findOrAdoptBlock(pageId);
|
|
7346
7350
|
if (blockId) {
|
|
7347
7351
|
await this.ensureColumns(blockId);
|
|
7348
|
-
|
|
7349
|
-
|
|
7352
|
+
const ds = { blockId, pageId };
|
|
7353
|
+
this.dsCache.set(cwd, ds);
|
|
7354
|
+
return ds;
|
|
7350
7355
|
}
|
|
7351
7356
|
if (!create) return null;
|
|
7352
7357
|
const columns = COLUMNS2.map((c, i) => ({
|
|
@@ -7355,15 +7360,16 @@ var TicketStore = class {
|
|
|
7355
7360
|
type: c.type,
|
|
7356
7361
|
...c.options ? { options: c.options } : {}
|
|
7357
7362
|
}));
|
|
7358
|
-
const created = await this.api.createBlock(
|
|
7363
|
+
const created = await this.api.createBlock(pageId, {
|
|
7359
7364
|
type: "datastore",
|
|
7360
7365
|
title: DATASTORE_TITLE2,
|
|
7361
7366
|
props: { columns, system_key: SYSTEM_KEY2 }
|
|
7362
7367
|
});
|
|
7363
7368
|
if (created?.id) {
|
|
7364
7369
|
log3(`Created "${DATASTORE_TITLE2}" datastore on Agent Datastore page for ${cwd}`);
|
|
7365
|
-
|
|
7366
|
-
|
|
7370
|
+
const ds = { blockId: created.id, pageId };
|
|
7371
|
+
this.dsCache.set(cwd, ds);
|
|
7372
|
+
return ds;
|
|
7367
7373
|
}
|
|
7368
7374
|
return null;
|
|
7369
7375
|
}
|