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 +1 -1
- package/template/adapters/http.ts +10 -4
- package/template/package.json +1 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
2013
|
-
|
|
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
|
}
|