@able-autonomy/able 0.0.20 → 0.0.21

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": "@able-autonomy/able",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "Able's command line and the config types a host's able.config.ts uses",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -72,8 +72,14 @@ export async function build(slug: string | undefined, message: string | undefine
72
72
 
73
73
  /** One line per thing the builder said (💬) or ran (🔧). */
74
74
  function lines(record: string) {
75
- const entry = JSON.parse(record)
76
- if (entry.type !== 'assistant' || !Array.isArray(entry.message?.content)) return []
75
+ // A record still being written, or an empty line, is not JSON yet: skip it rather than stop following.
76
+ let entry
77
+ try {
78
+ entry = JSON.parse(record)
79
+ } catch {
80
+ return []
81
+ }
82
+ if (entry?.type !== 'assistant' || !Array.isArray(entry.message?.content)) return []
77
83
  return entry.message.content.flatMap((part: { type: string; text?: string; name?: string; input?: Record<string, unknown> }) => {
78
84
  if (part.type === 'text' && part.text?.trim()) return [`💬 ${part.text.trim()}`]
79
85
  if (part.type !== 'tool_use') return []