@biolibs/bionet 1.8.7 → 1.9.1

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/dist/method.js CHANGED
@@ -143,9 +143,15 @@ export function publicMethod(state, lab, options = {}) {
143
143
  step: at + 1,
144
144
  kind: plan.kind,
145
145
  uses: plan.inputs.map((input) => {
146
- const what = input.item === undefined
147
- ? { part: input.part, name: state.parts.find((one) => one.checksum === input.part)?.name ?? "a part", unit: null }
148
- : whatIsIn(input.item);
146
+ // A prospect has no checksum, for the same reason a culture and a specimen have none: there
147
+ // is no sequence to count one over. So it cannot travel either. What is honest to say is that
148
+ // the step rests on something nobody had made, and what kind of thing that was — a taking lab
149
+ // can then see where the method stops being something it can follow.
150
+ const what = input.prospect !== undefined
151
+ ? { part: null, name: `something the publishing lab had not made: a ${state.prospects.find((one) => one.prospect === input.prospect)?.kind ?? "thing"}`, unit: null }
152
+ : input.item === undefined
153
+ ? { part: input.part, name: state.parts.find((one) => one.checksum === input.part)?.name ?? "a part", unit: null }
154
+ : whatIsIn(input.item);
149
155
  const maker = what.part === null ? undefined : madeBy.get(what.part);
150
156
  return {
151
157
  part: what.part, name: what.name, amount: input.amount, unit: what.unit, role: input.role,
@@ -1 +1 @@
1
- {"version":3,"file":"method.js","sourceRoot":"","sources":["../src/method.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAA0D,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,cAAc,EACK,MAAM,YAAY,CAAC;AAI/C,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAAG,iCAAiC,CAAC;AAE/D,0CAA0C;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC;AAE9B,4CAA4C;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AAwBxC,uCAAuC;AACvC,MAAM,OAAO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AAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -47,5 +47,5 @@
47
47
  },
48
48
  "type": "module",
49
49
  "types": "dist/index.d.ts",
50
- "version": "1.8.7"
50
+ "version": "1.9.1"
51
51
  }
package/src/log.ts CHANGED
@@ -460,10 +460,16 @@ export const newRunId = (): string => newItemId();
460
460
 
461
461
  /** One thing a planned run would use: a tube the lab has, or a part it would first have to get. */
462
462
  export interface PlanInput {
463
- /** The item, if the lab holds a tube of it. Exactly one of `item` and `part` is given. */
463
+ /** The item, if the lab holds a tube of it. Exactly one of `item`, `part` and `prospect` is given. */
464
464
  item?: string;
465
465
  /** The part's checksum, if there is no tube of it yet: something to be ordered or made first. */
466
466
  part?: string;
467
+ /**
468
+ * The prospect, for something nobody has made and nobody can checksum — the strain a transformation
469
+ * would give, the culture grown from it. A plan that names one is a plan that cannot be carried out
470
+ * yet, and says so plainly rather than naming nothing at all.
471
+ */
472
+ prospect?: string;
467
473
  /** How much of it the run would use, in the item's own unit. A whole number, which may be 0. */
468
474
  amount: number;
469
475
  /** What it would be there as: a template, a forward primer. */
@@ -498,8 +504,14 @@ export interface PlanRecord {
498
504
  instrument: string | null;
499
505
  /** What it would use. */
500
506
  inputs: PlanInput[];
501
- /** What it is expected to make. */
507
+ /** What it is expected to make, where that is a molecule with a sequence. */
502
508
  expects: PlanExpect[];
509
+ /**
510
+ * The prospects it would bring into existence, by ID, where what it makes has no sequence to
511
+ * expect: a strain, a culture, a curd. Without this a transformation makes nothing the record can
512
+ * name, and the chain of work stops at it.
513
+ */
514
+ makes?: string[];
503
515
  /** How to set it up: whole numbers and short text, by name. */
504
516
  settings: Record<string, string | number>;
505
517
  /** Why, and anything else worth saying. */
@@ -519,9 +531,76 @@ export const planRun = (plan: PlanRecord): Operation => ({ type: "plan.add", ...
519
531
  */
520
532
  export const settlePlan = (plan: string, run: string | null): Operation => ({ type: "plan.settle", plan, run });
521
533
 
534
+ /**
535
+ * @returns The change that says one plan was filed in place of another, and why.
536
+ *
537
+ * A plan is refiled whenever a route changes, a product is corrected, a tag is added. Without this
538
+ * the reason goes in the new plan's note, which then carries the step's purpose and every correction
539
+ * since in one paragraph, growing each time. A note should say what a step is for. This says what
540
+ * became of an earlier one, which is a different sentence and belongs in a different place.
541
+ *
542
+ * It is a change of its own rather than a field on the plan, so that a device too old to know of it
543
+ * still reads both plans: the link is worth having and neither plan depends on it.
544
+ *
545
+ * @param plan - The plan filed now.
546
+ * @param replaced - The plan it was filed in place of.
547
+ * @param why - What changed, in a sentence.
548
+ */
549
+ export const planReplaces = (plan: string, replaced: string, why: string): Operation =>
550
+ ({ type: "plan.replaces", plan, replaced, why });
551
+
522
552
  /** @returns A new ID for a plan, made the way an item's is. */
523
553
  export const newPlanId = (): string => newItemId();
524
554
 
555
+ /**
556
+ * Something the lab understands the makeup of and has not made.
557
+ *
558
+ * A part is known by the checksum of its sequence, so everything the lab holds that *has* a sequence
559
+ * can be named before it exists — the nine designed plasmids are parts with no tube. What has no
560
+ * sequence cannot be: a strain that will carry a construct, the culture grown from it, a mixture of
561
+ * four proteins, curd. The chain of work stops at the first of those, and everything after it has to
562
+ * be proposed afresh once somebody is holding something.
563
+ *
564
+ * A prospect is how that chain carries on. It is the mirror of a specimen: a specimen is a tube the
565
+ * lab holds and cannot name, and this is a thing the lab can name and does not hold. It has no
566
+ * checksum — there is no sequence to count one over — so, exactly like a specimen and a culture, it
567
+ * cannot travel in a method. Saying what to do with a thing somebody else does not have is not a
568
+ * method, it is a wish.
569
+ */
570
+ export interface ProspectRecord {
571
+ /** The prospect's ID. */
572
+ prospect: string;
573
+ /** What it would be called: `GS115 carrying pPIC9K-alphaS1`. */
574
+ name: string;
575
+ /** What kind of thing: `strain`, `culture`, `mixture`, `curd`. Free, like a run's kind. */
576
+ kind: string;
577
+ /** What it would be made of, said for a person. No part of this is machine-readable on purpose. */
578
+ madeOf: string;
579
+ /** Anything else worth saying, or `null`. */
580
+ note: string | null;
581
+ }
582
+
583
+ /**
584
+ * @returns The change that names something the lab means to have and has not made.
585
+ *
586
+ * It makes no tube and no part. It exists so that the steps after it can be written down while it is
587
+ * still hypothetical, and so that a reader can tell at a glance which parts of a plan rest on
588
+ * something nobody is holding.
589
+ */
590
+ export const addProspect = (prospect: ProspectRecord): Operation => ({ type: "prospect.add", ...prospect });
591
+
592
+ /**
593
+ * @returns The change that says a prospect has come into existence, and what it turned out to be.
594
+ *
595
+ * Exactly one of `strain` and `item` is given, and it has to be one the lab already has: the thing
596
+ * is added first, the way a specimen's part is, and then this says the prospect was it.
597
+ */
598
+ export const realiseProspect = (prospect: string, became: { strain?: string; item?: string }): Operation =>
599
+ ({ type: "prospect.realise", prospect, strain: became.strain ?? null, item: became.item ?? null });
600
+
601
+ /** @returns A new ID for a prospect, made the way an item's is. */
602
+ export const newProspectId = (): string => newItemId();
603
+
525
604
  /**
526
605
  * What a lab expects to see if a plan worked, as it would be written before doing it.
527
606
  *
package/src/merge.ts CHANGED
@@ -198,6 +198,39 @@ export interface RunState {
198
198
  added: string;
199
199
  }
200
200
 
201
+ /**
202
+ * Something the lab understands the makeup of and has not made.
203
+ *
204
+ * The mirror of a specimen: a specimen is a tube the lab holds and cannot name, this is a thing the
205
+ * lab can name and does not hold. It has no checksum, because there is no sequence to count one
206
+ * over, so like a culture and like a specimen it cannot travel in a method.
207
+ *
208
+ * It exists so that the steps after it can be written down while it is still hypothetical. The chain
209
+ * of work used to stop at a transformation — what that makes is alive and has nothing to point at —
210
+ * and a plan after it could name nothing at all. Now it can name this, and say plainly that it rests
211
+ * on something nobody is holding.
212
+ */
213
+ export interface ProspectState {
214
+ /** Its ID. */
215
+ prospect: string;
216
+ /** What it would be called. */
217
+ name: string;
218
+ /** What kind of thing: `strain`, `culture`, `mixture`, `curd`. */
219
+ kind: string;
220
+ /** What it would be made of, said for a person. */
221
+ madeOf: string;
222
+ /** Anything else said about it. */
223
+ note: string | null;
224
+ /** What it turned out to be once somebody made it, or `null` while it is still in prospect. */
225
+ became: { strain: string | null; item: string | null; by: string; entry: string } | null;
226
+ /** The key that named it. */
227
+ by: string;
228
+ /** Anything else set on it. */
229
+ fields: Record<string, string | number | null>;
230
+ /** The entry that named it. */
231
+ added: string;
232
+ }
233
+
201
234
  /**
202
235
  * What a lab expects to see if a plan worked, and what was seen.
203
236
  *
@@ -247,6 +280,13 @@ export interface PlanState {
247
280
  inputs: PlanInput[];
248
281
  /** What it is expected to make, each with the checksum that would be its identity. */
249
282
  expects: { name: string; sequence: string; circular: boolean; ends: PartEnds; length: number; checksum: string }[];
283
+ /** The prospects it would bring into existence: what it makes that has no sequence to expect. */
284
+ makes: string[];
285
+ /**
286
+ * The plan this was filed in place of, and what changed. A refiling's reason belongs here rather
287
+ * than appended to the note, which is about what the step is for.
288
+ */
289
+ replaces: { plan: string; why: string; by: string; entry: string } | null;
250
290
  /** How to set it up. */
251
291
  settings: Record<string, string | number>;
252
292
  /** Why, and anything else said about it. */
@@ -332,6 +372,8 @@ export interface LabState {
332
372
  specimens: SpecimenState[];
333
373
  /** What the lab expects to see of its plans, and what was seen. */
334
374
  expectations: ExpectationState[];
375
+ /** Things the lab means to have and has not made. */
376
+ prospects: ProspectState[];
335
377
  /** Every item. */
336
378
  items: ItemState[];
337
379
  /** Every place. */
@@ -382,6 +424,7 @@ const PLACE_RESERVED = new Set(["place", "kind", "parent", "grid", "standing", "
382
424
  /** The same, for a strain: what it is and came from is fixed when it is added. */
383
425
  const STRAIN_RESERVED = new Set(["strain", "host", "carries", "parent", "from"]);
384
426
  const SPECIMEN_RESERVED = new Set(["specimen", "note", "is", "added"]);
427
+ const PROSPECT_RESERVED = new Set(["prospect", "name", "kind", "madeOf", "note", "became", "by", "added"]);
385
428
  const EXPECT_RESERVED = new Set(["expect", "plan", "kind", "says", "numbers", "settings", "note", "by", "met", "withdrawn", "added"]);
386
429
 
387
430
  /**
@@ -392,7 +435,7 @@ const EXPECT_RESERVED = new Set(["expect", "plan", "kind", "says", "numbers", "s
392
435
  * something nobody proposed. A field says what a plan is *about* — which project it is part of,
393
436
  * say — and nothing about what carrying it out would do.
394
437
  */
395
- const PLAN_RESERVED = new Set(["plan", "kind", "instrument", "inputs", "expects", "settings", "note", "by", "settled", "wanting", "orphaned", "added"]);
438
+ const PLAN_RESERVED = new Set(["plan", "kind", "instrument", "inputs", "expects", "makes", "settings", "note", "by", "settled", "wanting", "orphaned", "replaces", "added"]);
396
439
 
397
440
  /** The most positions a box may have along one side, and the farthest a place may stand or reach, in millimetres. */
398
441
  const MOST_SIDE = 100;
@@ -526,6 +569,8 @@ const KNOWN: Readonly<Record<string, Readonly<Record<string, Known>>>> = {
526
569
  "expect.add": { expect: true, plan: true, kind: true, says: true, numbers: true, settings: true, note: true },
527
570
  "expect.meet": { expect: true, met: true, saw: true, run: true, note: true },
528
571
  "expect.withdraw": { expect: true, note: true },
572
+ "prospect.add": { prospect: true, name: true, kind: true, madeOf: true, note: true },
573
+ "prospect.realise": { prospect: true, strain: true, item: true },
529
574
  "item.adjust": { item: true, by: true },
530
575
  "item.recount": { item: true, amount: true },
531
576
  "item.retire": { item: true },
@@ -540,11 +585,12 @@ const KNOWN: Readonly<Record<string, Readonly<Record<string, Known>>>> = {
540
585
  outputs: [{ item: true, sequence: true, circular: true, ends: { left: true, right: true }, name: true, amount: true, unit: true }],
541
586
  },
542
587
  "plan.add": {
543
- plan: true, kind: true, instrument: true, settings: true, note: true,
544
- inputs: [{ item: true, part: true, amount: true, role: true }],
588
+ plan: true, kind: true, instrument: true, settings: true, note: true, makes: true,
589
+ inputs: [{ item: true, part: true, prospect: true, amount: true, role: true }],
545
590
  expects: [{ sequence: true, circular: true, ends: { left: true, right: true }, name: true }],
546
591
  },
547
592
  "plan.settle": { plan: true, run: true },
593
+ "plan.replaces": { plan: true, replaced: true, why: true },
548
594
  "field.set": { on: true, id: true, field: true, value: true },
549
595
  };
550
596
 
@@ -557,7 +603,7 @@ const KNOWN: Readonly<Record<string, Readonly<Record<string, Known>>>> = {
557
603
  */
558
604
  // An adviser may say what to look for, because that is reading and working out. It may not say what
559
605
  // was seen: a reading is made by somebody standing at a bench, and nothing with no hands was there.
560
- const ADVISER_MAY = new Set(["part.add", "part.annotate", "plan.add", "plan.settle", "field.set", "expect.add", "expect.withdraw"]);
606
+ const ADVISER_MAY = new Set(["part.add", "part.annotate", "plan.add", "plan.settle", "plan.replaces", "field.set", "expect.add", "expect.withdraw"]);
561
607
 
562
608
  /**
563
609
  * The first field in a change that this version does not know, if there is one.
@@ -620,7 +666,7 @@ const areSettings = (settings: unknown): settings is Record<string, string | num
620
666
  * tools work it out again, which is why the plan carries its claim and not its working.
621
667
  */
622
668
  function planProblem(op: Operation, items: ReadonlyMap<string, unknown>, parts: ReadonlyMap<string, unknown>, places: ReadonlyMap<string, unknown>,
623
- plans: ReadonlyMap<string, unknown>): string | null {
669
+ plans: ReadonlyMap<string, unknown>, prospects: ReadonlyMap<string, unknown>): string | null {
624
670
  if (!(typeof op["plan"] === "string" && ITEM_ID.test(op["plan"])) || !text(op["kind"], 40)) return "It does not carry a plan ID and what kind of run it would be.";
625
671
  if (plans.has(op["plan"])) return "A plan with that ID already exists.";
626
672
  if (!(op["instrument"] === null || (typeof op["instrument"] === "string" && places.has(op["instrument"])))) return "The place it would be done at is not one the lab has.";
@@ -630,9 +676,12 @@ function planProblem(op: Operation, items: ReadonlyMap<string, unknown>, parts:
630
676
  if (!Array.isArray(inputs) || inputs.length > MOST_IN_A_RUN) return "It does not list what it would use.";
631
677
  for (const input of inputs as Partial<PlanInput>[]) {
632
678
  if (typeof input !== "object" || input === null || !amountOf(input.amount) || input.amount < 0 || !text(input.role, 40)) return "It does not say how many whole units of each thing it would use, and as what.";
633
- if ((input.item === undefined) === (input.part === undefined)) return "Each thing it would use has to be a tube or a part, and not both.";
679
+ if ([input.item, input.part, input.prospect].filter((one) => one !== undefined).length !== 1) {
680
+ return "Each thing it would use has to be a tube, a part or a prospect, and only one of those.";
681
+ }
634
682
  if (input.item !== undefined && !(typeof input.item === "string" && items.has(input.item))) return "A tube it would use is not an item the lab has.";
635
683
  if (input.part !== undefined && !(typeof input.part === "string" && parts.has(input.part))) return "A part it would use is not one the lab has.";
684
+ if (input.prospect !== undefined && !(typeof input.prospect === "string" && prospects.has(input.prospect))) return "A prospect it would use is not one the lab has.";
636
685
  }
637
686
  const expects = op["expects"];
638
687
  if (!Array.isArray(expects) || expects.length > MOST_IN_A_RUN) return "It does not list what it expects to make.";
@@ -641,6 +690,15 @@ function planProblem(op: Operation, items: ReadonlyMap<string, unknown>, parts:
641
690
  return "It does not give each thing it expects a sequence, a name and whether it is a circle.";
642
691
  }
643
692
  }
693
+ // What a run makes that has no sequence — a strain, a culture, a curd — is named as a prospect
694
+ // instead, so that the step after it has something to point at.
695
+ const makes = op["makes"];
696
+ if (makes !== undefined) {
697
+ if (!Array.isArray(makes) || makes.length > MOST_IN_A_RUN) return "It does not list what it would bring into existence.";
698
+ for (const one of makes as unknown[]) {
699
+ if (!(typeof one === "string" && prospects.has(one))) return "Something it would bring into existence is not a prospect the lab has.";
700
+ }
701
+ }
644
702
  return null;
645
703
  }
646
704
 
@@ -709,7 +767,7 @@ const hadSeen = (later: Node, earlier: Node): boolean => (later.vc.get(earlier.a
709
767
  * ```
710
768
  */
711
769
  export async function mergeLog(entries: readonly unknown[], options: { lab?: string } = {}): Promise<LabState> {
712
- const state: LabState = { lab: options.lab ?? null, name: null, roster: [], parts: [], items: [], places: [], crowded: [], runs: [], plans: [], strains: [], specimens: [], expectations: [], entries: [],
770
+ const state: LabState = { lab: options.lab ?? null, name: null, roster: [], parts: [], items: [], places: [], crowded: [], runs: [], plans: [], strains: [], specimens: [], expectations: [], prospects: [], entries: [],
713
771
  waiting: [], discarded: [], overlaps: [], heads: {}, knows: {} };
714
772
 
715
773
  // Read and check every entry on its own, before any of them is believed about the others.
@@ -976,6 +1034,7 @@ function fold(state: LabState, placed: Placed[], chained: Map<string, Node>): vo
976
1034
  const strains = new Map<string, { strain: StrainState; set: Map<string, Register> }>();
977
1035
  const specimens = new Map<string, { specimen: SpecimenState; set: Map<string, Register> }>();
978
1036
  const expectations = new Map<string, { expectation: ExpectationState; seen: Node | null; set: Map<string, Register> }>();
1037
+ const prospects = new Map<string, { prospect: ProspectState; set: Map<string, Register> }>();
979
1038
  /** Each plan, with the entry that settled it, if one has, and anything set on it. */
980
1039
  const plans = new Map<string, { plan: PlanState; settled: Node | null; set: Map<string, Register> }>();
981
1040
  /** Where each item was last put. */
@@ -1201,6 +1260,39 @@ function fold(state: LabState, placed: Placed[], chained: Map<string, Node>): vo
1201
1260
  // like any other, so the same rule settles it and every lab reads the same answer.
1202
1261
  write(held.set, "is", node, op["part"], `what specimen ${op["specimen"]} is`);
1203
1262
  }
1263
+ } else if (op.type === "prospect.add") {
1264
+ if (!(typeof op["prospect"] === "string" && ITEM_ID.test(op["prospect"])) || !text(op["name"], 200)
1265
+ || !text(op["kind"], 40) || !text(op["madeOf"], 2_000)
1266
+ || !(op["note"] === null || text(op["note"], 2_000))) {
1267
+ refuse("It does not carry a prospect ID, what to call it, what kind of thing it is, what it would be made of, and a note or nothing.");
1268
+ } else if (prospects.has(op["prospect"])) {
1269
+ refuse("A prospect with that ID already exists.");
1270
+ } else {
1271
+ prospects.set(op["prospect"], {
1272
+ prospect: { prospect: op["prospect"], name: op["name"], kind: op["kind"], madeOf: op["madeOf"],
1273
+ note: op["note"] as string | null, became: null, by: node.author, fields: {}, added: node.id },
1274
+ set: new Map([["name", { node, value: op["name"] }]]),
1275
+ });
1276
+ }
1277
+ } else if (op.type === "prospect.realise") {
1278
+ const held = typeof op["prospect"] === "string" ? prospects.get(op["prospect"]) : undefined;
1279
+ const strain = op["strain"], item = op["item"];
1280
+ if (held === undefined) {
1281
+ refuse("The prospect it says was made is not one the lab has.");
1282
+ } else if ([strain, item].filter((one) => one !== null && one !== undefined).length !== 1) {
1283
+ refuse("A prospect becomes a strain or an item, and only one of those.");
1284
+ } else if (strain !== null && strain !== undefined && !(typeof strain === "string" && strains.has(strain))) {
1285
+ refuse("The strain it says the prospect became is not one the lab has.");
1286
+ } else if (item !== null && item !== undefined && !(typeof item === "string" && items.has(item))) {
1287
+ refuse("The item it says the prospect became is not one the lab has.");
1288
+ } else {
1289
+ // Two people may make the same thing and say so without knowing of each other. It is a
1290
+ // register like any other, so the same rule settles it and every lab reads the same answer.
1291
+ // What it became and which kind of thing that is are one fact and go in one register: two
1292
+ // registers could be won by different writers, and leave a strain's ID labelled an item.
1293
+ const became = strain !== null && strain !== undefined ? `strain:${strain}` : `item:${item}`;
1294
+ write(held.set, "became", node, became, `what prospect ${op["prospect"]} became`);
1295
+ }
1204
1296
  } else if (op.type === "expect.add") {
1205
1297
  const numbers = op["numbers"], settings = op["settings"];
1206
1298
  if (!(typeof op["expect"] === "string" && ITEM_ID.test(op["expect"])) || !text(op["kind"], 40) || !text(op["says"], 2_000)
@@ -1275,7 +1367,7 @@ function fold(state: LabState, placed: Placed[], chained: Map<string, Node>): vo
1275
1367
  held.expectation.withdrawn = { note: op["note"] as string | null, by: node.author, entry: node.id };
1276
1368
  }
1277
1369
  } else if (op.type === "plan.add") {
1278
- const problem = planProblem(op, items, parts, places, plans);
1370
+ const problem = planProblem(op, items, parts, places, plans, prospects);
1279
1371
  if (problem !== null) { refuse(problem); continue; }
1280
1372
  const expects: PlanState["expects"] = [];
1281
1373
  try {
@@ -1291,11 +1383,30 @@ function fold(state: LabState, placed: Placed[], chained: Map<string, Node>): vo
1291
1383
  settled: null, set: new Map(),
1292
1384
  plan: {
1293
1385
  plan: op["plan"] as string, kind: op["kind"] as string, instrument: op["instrument"] as string | null,
1294
- inputs: (op["inputs"] as PlanInput[]).map((input) => ({ ...(input.item === undefined ? { part: input.part! } : { item: input.item }), amount: input.amount, role: input.role })),
1386
+ inputs: (op["inputs"] as PlanInput[]).map((input) => ({
1387
+ ...(input.item !== undefined ? { item: input.item } : input.part !== undefined ? { part: input.part } : { prospect: input.prospect! }),
1388
+ amount: input.amount, role: input.role })),
1389
+ makes: [...((op["makes"] as string[] | undefined) ?? [])],
1295
1390
  expects, settings: { ...(op["settings"] as Record<string, string | number>) }, note: op["note"] as string | null,
1296
- by: node.author, settled: null, wanting: [], orphaned: [], fields: {}, added: node.id,
1391
+ by: node.author, settled: null, wanting: [], orphaned: [], replaces: null, fields: {}, added: node.id,
1297
1392
  },
1298
1393
  });
1394
+ } else if (op.type === "plan.replaces") {
1395
+ const held = typeof op["plan"] === "string" ? plans.get(op["plan"]) : undefined;
1396
+ const gone = typeof op["replaced"] === "string" ? plans.get(op["replaced"]) : undefined;
1397
+ if (held === undefined || gone === undefined) {
1398
+ refuse("It does not name two plans the lab has.");
1399
+ } else if (op["plan"] === op["replaced"]) {
1400
+ refuse("A plan does not replace itself.");
1401
+ } else if (!text(op["why"], 2_000)) {
1402
+ refuse("It does not say what changed.");
1403
+ } else if (node.adviser === true && held.plan.by !== node.author) {
1404
+ refuse("An adviser may only say that about a plan of its own.");
1405
+ } else if (held.plan.replaces !== null) {
1406
+ refuse("That plan already says what it was filed in place of.");
1407
+ } else {
1408
+ held.plan.replaces = { plan: op["replaced"] as string, why: op["why"] as string, by: node.author, entry: node.id };
1409
+ }
1299
1410
  } else if (op.type === "plan.settle") {
1300
1411
  const held = typeof op["plan"] === "string" ? plans.get(op["plan"]) : undefined;
1301
1412
  const run = op["run"];
@@ -1321,13 +1432,15 @@ function fold(state: LabState, placed: Placed[], chained: Map<string, Node>): vo
1321
1432
  : op["on"] === "strain" && typeof op["id"] === "string" ? strains.get(op["id"])
1322
1433
  : op["on"] === "specimen" && typeof op["id"] === "string" ? specimens.get(op["id"])
1323
1434
  : op["on"] === "plan" && typeof op["id"] === "string" ? plans.get(op["id"])
1324
- : op["on"] === "expectation" && typeof op["id"] === "string" ? expectations.get(op["id"]) : undefined;
1325
- if (target === undefined) { refuse("It does not name a part, an item, a place, a strain, a specimen, a plan or an expectation the lab has."); continue; }
1435
+ : op["on"] === "expectation" && typeof op["id"] === "string" ? expectations.get(op["id"])
1436
+ : op["on"] === "prospect" && typeof op["id"] === "string" ? prospects.get(op["id"]) : undefined;
1437
+ if (target === undefined) { refuse("It does not name a part, an item, a place, a strain, a specimen, a plan, an expectation or a prospect the lab has."); continue; }
1326
1438
  if (op["on"] === "place" && typeof field === "string" && PLACE_RESERVED.has(field)) { refuse("It does not name a field that can be set."); continue; }
1327
1439
  if (op["on"] === "strain" && typeof field === "string" && STRAIN_RESERVED.has(field)) { refuse("It does not name a field that can be set."); continue; }
1328
1440
  if (op["on"] === "specimen" && typeof field === "string" && SPECIMEN_RESERVED.has(field)) { refuse("It does not name a field that can be set."); continue; }
1329
1441
  if (op["on"] === "plan" && typeof field === "string" && PLAN_RESERVED.has(field)) { refuse("It does not name a field that can be set."); continue; }
1330
1442
  if (op["on"] === "expectation" && typeof field === "string" && EXPECT_RESERVED.has(field)) { refuse("It does not name a field that can be set."); continue; }
1443
+ if (op["on"] === "prospect" && typeof field === "string" && PROSPECT_RESERVED.has(field)) { refuse("It does not name a field that can be set."); continue; }
1331
1444
  // An adviser may file its own proposals and nothing else. It proposes the work, so leaving it
1332
1445
  // unable to say which project the work is for would have a person filing every step by hand;
1333
1446
  // letting it set any field at all would let it rename the lab's parts. This is the same line
@@ -1371,6 +1484,21 @@ function fold(state: LabState, placed: Placed[], chained: Map<string, Node>): vo
1371
1484
  }
1372
1485
  state.specimens.push(specimen);
1373
1486
  }
1487
+ for (const { prospect, set } of prospects.values()) {
1488
+ for (const [field, held] of set) {
1489
+ if (field === "name") prospect.name = held.value as string;
1490
+ else if (field === "became") { /* read below, as one value */ }
1491
+ else prospect.fields[field] = held.value as string | number | null;
1492
+ }
1493
+ const became = set.get("became");
1494
+ if (became !== undefined) {
1495
+ const [kind, ...rest] = String(became.value).split(":");
1496
+ const id = rest.join(":");
1497
+ prospect.became = { strain: kind === "strain" ? id : null, item: kind === "item" ? id : null,
1498
+ by: became.node.author, entry: became.node.id };
1499
+ }
1500
+ state.prospects.push(prospect);
1501
+ }
1374
1502
  for (const { expectation, set } of expectations.values()) {
1375
1503
  for (const [field, held] of set) expectation.fields[field] = held.value as string | number | null;
1376
1504
  state.expectations.push(expectation);
package/src/method.ts CHANGED
@@ -161,7 +161,13 @@ export function publicMethod(state: LabState, lab: LabModel, options: MethodOpti
161
161
  step: at + 1,
162
162
  kind: plan.kind,
163
163
  uses: plan.inputs.map((input): MethodInput => {
164
- const what = input.item === undefined
164
+ // A prospect has no checksum, for the same reason a culture and a specimen have none: there
165
+ // is no sequence to count one over. So it cannot travel either. What is honest to say is that
166
+ // the step rests on something nobody had made, and what kind of thing that was — a taking lab
167
+ // can then see where the method stops being something it can follow.
168
+ const what = input.prospect !== undefined
169
+ ? { part: null, name: `something the publishing lab had not made: a ${state.prospects.find((one) => one.prospect === input.prospect)?.kind ?? "thing"}`, unit: null }
170
+ : input.item === undefined
165
171
  ? { part: input.part!, name: state.parts.find((one) => one.checksum === input.part)?.name ?? "a part", unit: null }
166
172
  : whatIsIn(input.item);
167
173
  const maker = what.part === null ? undefined : madeBy.get(what.part);