create-loopengine 0.3.2 → 0.3.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-loopengine",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Scaffold a new loopengine agent project — a runnable HTTP server with one example agent, in your own repo.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -649,7 +649,11 @@ async function describeAgent(entry: RegistryEntry): Promise<Record<string, unkno
649
649
  // tab badge; the Apps tab's own GET .../abilities has the detail
650
650
  // (and its slower npm version lookups).
651
651
  abilityCount: listInstalledAbilities(config.name).length,
652
- skills: skillIndex.map((s) => ({ name: s.name, description: s.description })),
652
+ // A skill that's a workflow is edited as one, on the Workflows tab.
653
+ skills: (() => {
654
+ const workflowIds = new Set(readWorkflows(agentDirFor(config)).map((w) => w.id))
655
+ return skillIndex.map((s) => ({ name: s.name, description: s.description, ...(workflowIds.has(s.name) ? { workflow: true } : {}) }))
656
+ })(),
653
657
  systemSkills: systemSkillIndex.map((s) => ({ name: s.name, description: s.description })),
654
658
  tools: tools.map(describeTool),
655
659
  // createAskUserTool() with no onPending, purely to describe its
@@ -2009,12 +2013,14 @@ async function handleSchedulesGet(res: ServerResponse, agentName: string): Promi
2009
2013
  if (!t.workflow_id) return t
2010
2014
  const workflow = workflows.find((w) => w.id === t.workflow_id)
2011
2015
  // Its start message as this task's runs see it, parameters filled in.
2012
- const startMessage = workflow && fillStartMessage(workflow.startMessage, t.params ?? {}, Object.keys(workflow.parameters))
2013
- return workflow ? { ...t, workflow: { id: workflow.id, title: workflow.title, start_message: startMessage } } : { ...t, workflow_missing: true }
2016
+ // An older workflow's start message, else its instructions' first line.
2017
+ const lead = workflow && (workflow.startMessage || workflow.instructions.split('\n').find((line) => line.trim()) || '')
2018
+ const startMessage = workflow && fillStartMessage(lead!, t.params ?? {}, Object.keys(workflow.parameters))
2019
+ return workflow ? { ...t, workflow: { id: workflow.id, title: workflow.title, description: workflow.description, start_message: startMessage } } : { ...t, workflow_missing: true }
2014
2020
  })
2015
2021
  scheduleJson(res, 200, {
2016
2022
  tasks,
2017
- workflows: workflows.map((w) => ({ id: w.id, title: w.title, description: w.description, start_message: w.startMessage, parameters: w.parameters })),
2023
+ workflows: workflows.map((w) => ({ id: w.id, title: w.title, description: w.description, start_message: w.startMessage || w.instructions.split('\n').find((line) => line.trim()) || '', parameters: w.parameters })),
2018
2024
  time_zone: workspaceTimeZone(),
2019
2025
  })
2020
2026
  }
@@ -9,7 +9,7 @@
9
9
  "cli": "tsx adapters/cli.ts"
10
10
  },
11
11
  "dependencies": {
12
- "loopengine": "^0.3.4",
12
+ "loopengine": "^0.3.8",
13
13
  "actauth": "^0.0.12",
14
14
  "tsx": "^4.19.0",
15
15
  "typescript": "^5.7.0"