@plainconceptsplatform/loop-task 2.8.1 → 2.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.
@@ -11,6 +11,7 @@ function globalCommands() {
11
11
  { label: t('cmd.toggleTelemetry'), value: 'toggle-telemetry', hint: '', tier: COMMAND_TIER_GLOBAL, category: COMMAND_CATEGORY_GLOBAL },
12
12
  { label: t('cmd.telemetryDiagnostics'), value: 'telemetry-diagnostics', hint: '', tier: COMMAND_TIER_GLOBAL, category: COMMAND_CATEGORY_GLOBAL },
13
13
  { label: t('cmd.telemetry'), value: 'telemetry', hint: '', tier: COMMAND_TIER_GLOBAL, category: COMMAND_CATEGORY_GLOBAL },
14
+ { label: 'OpenCode Server', value: 'opencode-server', hint: 'http://localhost:4096', tier: COMMAND_TIER_GLOBAL, category: COMMAND_CATEGORY_GLOBAL },
14
15
  { label: t('cmd.export'), value: 'export', hint: '', tier: COMMAND_TIER_GLOBAL, category: COMMAND_CATEGORY_GLOBAL, shortcut: 'ctrl+x' },
15
16
  { label: t('cmd.import'), value: 'import', hint: '', tier: COMMAND_TIER_GLOBAL, category: COMMAND_CATEGORY_GLOBAL, shortcut: 'ctrl+i' },
16
17
  ];
@@ -71,7 +72,7 @@ export function buildCommands(context) {
71
72
  const loop = context.selectedLoop;
72
73
  const desc = loop.description || loop.id;
73
74
  commands.push({ label: t('cmd.edit'), value: 'edit', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+e' }, { label: t('cmd.pause'), value: 'pause', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+p' }, { label: t('cmd.play'), value: 'play', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+r' }, { label: t('cmd.stop'), value: 'stop', hint: t('confirm.stopLoop', { name: desc }), tier: COMMAND_TIER_CONFIRM, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+s' }, { label: t('cmd.trigger'), value: 'trigger', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+t' }, { label: t('cmd.clone'), value: 'clone', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+c' }, { label: t('cmd.delete'), value: 'delete', hint: t('confirm.deleteLoop', { name: desc }), tier: COMMAND_TIER_CONFIRM, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+d' }, { label: t('cmd.logs'), value: 'logs', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+o' });
74
- if (loop.taskId && loop.isRecipe) {
75
+ if (loop.taskId) {
75
76
  commands.push({
76
77
  label: t('cmd.diagram'), value: 'diagram', hint: '',
77
78
  tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP,
@@ -113,7 +114,7 @@ export function buildTabCommands(context) {
113
114
  if (context.activeTab === 'loops') {
114
115
  commands.push(...loopFilterCommands());
115
116
  commands.push({ label: t('cmd.newLoop'), value: 'new-loop', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+n' }, { label: t('cmd.edit'), value: 'edit', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+e' }, { label: t('cmd.pause'), value: 'pause', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+p' }, { label: t('cmd.play'), value: 'play', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+r' }, { label: t('cmd.stop'), value: 'stop', hint: '', tier: COMMAND_TIER_CONFIRM, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+s' }, { label: t('cmd.trigger'), value: 'trigger', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+t' }, { label: t('cmd.clone'), value: 'clone', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+c' }, { label: t('cmd.delete'), value: 'delete', hint: '', tier: COMMAND_TIER_CONFIRM, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+d' }, { label: t('cmd.logs'), value: 'logs', hint: '', tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP, shortcut: 'ctrl+a+o' });
116
- if (context.selectedLoop?.taskId && context.selectedLoop?.isRecipe) {
117
+ if (context.selectedLoop?.taskId) {
117
118
  commands.push({
118
119
  label: t('cmd.diagram'), value: 'diagram', hint: '',
119
120
  tier: COMMAND_TIER_ACTION, category: COMMAND_CATEGORY_LOOP,
@@ -4,6 +4,7 @@ import { cycleProjectSortMode, cycleProjectHasLoopsFilter, cycleProjectIsSystemF
4
4
  import { groupRunsByCycle } from "../../widgets/right-panel/RunHistory.js";
5
5
  import { container } from "../../shared/container/index.js";
6
6
  import { TYPES } from "../../shared/services/types.js";
7
+ import { renderChainDiagram } from "../chain-editor/renderChainDiagram.js";
7
8
  import { readRecipeDiagram } from "../../daemon/recipe/diagram-reader.js";
8
9
  import { renderMermaidAsAscii } from "../chain-editor/mermaidToAscii.js";
9
10
  export function useCommandHandlers(context) {
@@ -243,12 +244,12 @@ export function useCommandHandlers(context) {
243
244
  try {
244
245
  const diagram = readRecipeDiagram(selected.recipeFilePath);
245
246
  if (diagram) {
246
- // Render Mermaid as ASCII for the TUI modal
247
247
  const ascii = renderMermaidAsAscii(diagram);
248
248
  setDiagramModal(ascii);
249
249
  }
250
250
  else {
251
- pushToast("error", t("diagram.noDiagramInRecipe"));
251
+ const ascii = renderChainDiagram(selected.taskId, tasks);
252
+ setDiagramModal(ascii);
252
253
  }
253
254
  }
254
255
  catch (e) {
@@ -256,10 +257,23 @@ export function useCommandHandlers(context) {
256
257
  }
257
258
  }
258
259
  else {
259
- pushToast("error", t("diagram.notARecipe"));
260
+ const ascii = renderChainDiagram(selected.taskId, tasks);
261
+ setDiagramModal(ascii);
260
262
  }
261
263
  }
262
264
  },
265
+ "opencode-server": () => {
266
+ setDiagramModal("OpenCode Server\n" +
267
+ "================\n\n" +
268
+ "URL: http://localhost:4096\n" +
269
+ "Health: GET http://localhost:4096/global/health\n\n" +
270
+ "Attach from another terminal:\n" +
271
+ " opencode attach http://localhost:4096\n\n" +
272
+ "List sessions:\n" +
273
+ " opencode session list\n\n" +
274
+ "Attach to a specific session:\n" +
275
+ " opencode -s <session-id> --attach http://localhost:4096");
276
+ },
263
277
  export: () => {
264
278
  exportService.exportConfig()
265
279
  .then(({ json, filePath }) => setExportModal({ json, filePath, error: null }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plainconceptsplatform/loop-task",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Loop engineering toolkit. Run any command on a cadence, in the background, managed from a terminal board. Schedule tests, builds, syncs, or agent prompts.",
5
5
  "type": "module",
6
6
  "bin": {