@aglyn/plugins-ai 1.22.3 → 1.23.0

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.
@@ -1237,6 +1237,10 @@ const readChars = (read)=>{
1237
1237
  * done, is in. On 10/29 a canceled import still showed its second wave as
1238
1238
  * running, with nothing running it.
1239
1239
  */ export function aiSiteImportCanceled(state, at) {
1240
+ // No waves yet (the site was never read): there is nothing to stop.
1241
+ if (!Array.isArray(state.waves)) return _extends({}, state, {
1242
+ autoContinue: false
1243
+ });
1240
1244
  return _extends({}, state, {
1241
1245
  autoContinue: false,
1242
1246
  waves: state.waves.map((wave)=>{
@@ -1253,6 +1257,10 @@ const readChars = (read)=>{
1253
1257
  }
1254
1258
  /** The state as the console reads it: every page's read text left off. */ export function aiSiteImportWire(state) {
1255
1259
  if (!state) return null;
1260
+ // A state with no pages is not one yet: a field written onto a job before
1261
+ // its site was read leaves `siteImport` holding that field alone, and one
1262
+ // such job must not take the workspace's whole job list down with it.
1263
+ if (!Array.isArray(state.pages)) return null;
1256
1264
  // What the site's pages say is the redesigns' (AGL-4152): the console reads none of it.
1257
1265
  const { said: _said } = state, rest = _object_without_properties_loose(state, [
1258
1266
  "said"