@otto-code/protocol 0.8.19 → 0.9.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.
@@ -23,6 +23,7 @@ export const KNOWN_MODEL_TIERS = {
23
23
  // Anthropic (Claude) - the full Claude Code manifest. Tiering rule: 1M-context
24
24
  // Opus variants are "deep", non-1M Opus and Sonnet are "standard", Haiku is
25
25
  // "fast". Fable (1M, most powerful) is "deep".
26
+ "claude-fable-5-1": "deep",
26
27
  "claude-fable-5": "deep",
27
28
  // Opus 4.7/4.8/5 are natively 1M, so the plain ids are "deep" and the manifest
28
29
  // ships no `[1m]` row for them. The decorated ids stay mapped here because the
@@ -45,6 +46,7 @@ export const KNOWN_MODEL_TIERS = {
45
46
  "claude-haiku-4-5": "fast",
46
47
  "claude-haiku-4-5-20251001": "fast",
47
48
  // OpenAI (GPT / o-series)
49
+ "gpt-6-astra": "deep",
48
50
  "gpt-5": "deep",
49
51
  "gpt-5-mini": "fast",
50
52
  "gpt-5-nano": "fast",
@@ -185,7 +185,7 @@ const OTTO_TOOL_GROUP_RULES = [
185
185
  { group: "artifacts", contains: ["artifact"] },
186
186
  { group: "widgets", names: ["show_widget", "widget_contract"] },
187
187
  { group: "workspace", contains: ["worktree", "workspace"] },
188
- { group: "orchestration", contains: ["orchestration"] },
188
+ { group: "orchestration", contains: ["orchestration", "workflow"] },
189
189
  { group: "knowledge", contains: ["project_"] },
190
190
  { group: "memory", contains: ["lesson"] },
191
191
  { group: "permissions", contains: ["permission"] },
@@ -32,6 +32,7 @@ export const ACP_PROVIDER_ICON_NAMES = [
32
32
  "junie",
33
33
  "kilo",
34
34
  "kimi",
35
+ "minimax-code",
35
36
  "minion-code",
36
37
  "mistral-vibe",
37
38
  "nova",
@@ -47,6 +47,10 @@ export declare const ScheduleCreateRequestSchema: z.ZodObject<{
47
47
  systemPrompt: z.ZodOptional<z.ZodString>;
48
48
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
49
49
  }, z.core.$strip>;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ type: z.ZodLiteral<"workflow">;
52
+ definitionId: z.ZodString;
53
+ projectRoot: z.ZodString;
50
54
  }, z.core.$strip>], "type">;
51
55
  maxRuns: z.ZodOptional<z.ZodNumber>;
52
56
  expiresAt: z.ZodOptional<z.ZodString>;
@@ -164,6 +168,10 @@ export declare const ScheduleCreateResponseSchema: z.ZodObject<{
164
168
  systemPrompt: z.ZodOptional<z.ZodString>;
165
169
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
166
170
  }, z.core.$strip>;
171
+ }, z.core.$strip>, z.ZodObject<{
172
+ type: z.ZodLiteral<"workflow">;
173
+ definitionId: z.ZodString;
174
+ projectRoot: z.ZodString;
167
175
  }, z.core.$strip>], "type">;
168
176
  cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
169
177
  type: z.ZodLiteral<"every">;
@@ -237,6 +245,10 @@ export declare const ScheduleListResponseSchema: z.ZodObject<{
237
245
  systemPrompt: z.ZodOptional<z.ZodString>;
238
246
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
239
247
  }, z.core.$strip>;
248
+ }, z.core.$strip>, z.ZodObject<{
249
+ type: z.ZodLiteral<"workflow">;
250
+ definitionId: z.ZodString;
251
+ projectRoot: z.ZodString;
240
252
  }, z.core.$strip>], "type">;
241
253
  cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
242
254
  type: z.ZodLiteral<"every">;
@@ -310,6 +322,10 @@ export declare const ScheduleInspectResponseSchema: z.ZodObject<{
310
322
  systemPrompt: z.ZodOptional<z.ZodString>;
311
323
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
312
324
  }, z.core.$strip>;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ type: z.ZodLiteral<"workflow">;
327
+ definitionId: z.ZodString;
328
+ projectRoot: z.ZodString;
313
329
  }, z.core.$strip>], "type">;
314
330
  status: z.ZodEnum<{
315
331
  completed: "completed";
@@ -373,7 +389,19 @@ export declare const ScheduleInspectResponseSchema: z.ZodObject<{
373
389
  systemPrompt: z.ZodOptional<z.ZodString>;
374
390
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
375
391
  }, z.core.$strip>;
392
+ }, z.core.$strip>, z.ZodObject<{
393
+ type: z.ZodLiteral<"workflow">;
394
+ definitionId: z.ZodString;
395
+ projectRoot: z.ZodString;
376
396
  }, z.core.$strip>], "type">>;
397
+ workflow: z.ZodOptional<z.ZodObject<{
398
+ definitionId: z.ZodString;
399
+ title: z.ZodString;
400
+ kind: z.ZodString;
401
+ projectRoot: z.ZodString;
402
+ fingerprint: z.ZodString;
403
+ runId: z.ZodString;
404
+ }, z.core.$strip>>;
377
405
  agentId: z.ZodNullable<z.ZodGUID>;
378
406
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
379
407
  personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -432,7 +460,19 @@ export declare const ScheduleLogsResponseSchema: z.ZodObject<{
432
460
  systemPrompt: z.ZodOptional<z.ZodString>;
433
461
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
434
462
  }, z.core.$strip>;
463
+ }, z.core.$strip>, z.ZodObject<{
464
+ type: z.ZodLiteral<"workflow">;
465
+ definitionId: z.ZodString;
466
+ projectRoot: z.ZodString;
435
467
  }, z.core.$strip>], "type">>;
468
+ workflow: z.ZodOptional<z.ZodObject<{
469
+ definitionId: z.ZodString;
470
+ title: z.ZodString;
471
+ kind: z.ZodString;
472
+ projectRoot: z.ZodString;
473
+ fingerprint: z.ZodString;
474
+ runId: z.ZodString;
475
+ }, z.core.$strip>>;
436
476
  agentId: z.ZodNullable<z.ZodGUID>;
437
477
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
438
478
  personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -492,6 +532,10 @@ export declare const SchedulePauseResponseSchema: z.ZodObject<{
492
532
  systemPrompt: z.ZodOptional<z.ZodString>;
493
533
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
494
534
  }, z.core.$strip>;
535
+ }, z.core.$strip>, z.ZodObject<{
536
+ type: z.ZodLiteral<"workflow">;
537
+ definitionId: z.ZodString;
538
+ projectRoot: z.ZodString;
495
539
  }, z.core.$strip>], "type">;
496
540
  cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
497
541
  type: z.ZodLiteral<"every">;
@@ -565,6 +609,10 @@ export declare const ScheduleResumeResponseSchema: z.ZodObject<{
565
609
  systemPrompt: z.ZodOptional<z.ZodString>;
566
610
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
567
611
  }, z.core.$strip>;
612
+ }, z.core.$strip>, z.ZodObject<{
613
+ type: z.ZodLiteral<"workflow">;
614
+ definitionId: z.ZodString;
615
+ projectRoot: z.ZodString;
568
616
  }, z.core.$strip>], "type">;
569
617
  cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
570
618
  type: z.ZodLiteral<"every">;
@@ -646,6 +694,10 @@ export declare const ScheduleRunOnceResponseSchema: z.ZodObject<{
646
694
  systemPrompt: z.ZodOptional<z.ZodString>;
647
695
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
648
696
  }, z.core.$strip>;
697
+ }, z.core.$strip>, z.ZodObject<{
698
+ type: z.ZodLiteral<"workflow">;
699
+ definitionId: z.ZodString;
700
+ projectRoot: z.ZodString;
649
701
  }, z.core.$strip>], "type">;
650
702
  status: z.ZodEnum<{
651
703
  completed: "completed";
@@ -709,7 +761,19 @@ export declare const ScheduleRunOnceResponseSchema: z.ZodObject<{
709
761
  systemPrompt: z.ZodOptional<z.ZodString>;
710
762
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
711
763
  }, z.core.$strip>;
764
+ }, z.core.$strip>, z.ZodObject<{
765
+ type: z.ZodLiteral<"workflow">;
766
+ definitionId: z.ZodString;
767
+ projectRoot: z.ZodString;
712
768
  }, z.core.$strip>], "type">>;
769
+ workflow: z.ZodOptional<z.ZodObject<{
770
+ definitionId: z.ZodString;
771
+ title: z.ZodString;
772
+ kind: z.ZodString;
773
+ projectRoot: z.ZodString;
774
+ fingerprint: z.ZodString;
775
+ runId: z.ZodString;
776
+ }, z.core.$strip>>;
713
777
  agentId: z.ZodNullable<z.ZodGUID>;
714
778
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
715
779
  personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -770,6 +834,10 @@ export declare const ScheduleUpdateResponseSchema: z.ZodObject<{
770
834
  systemPrompt: z.ZodOptional<z.ZodString>;
771
835
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
772
836
  }, z.core.$strip>;
837
+ }, z.core.$strip>, z.ZodObject<{
838
+ type: z.ZodLiteral<"workflow">;
839
+ definitionId: z.ZodString;
840
+ projectRoot: z.ZodString;
773
841
  }, z.core.$strip>], "type">;
774
842
  status: z.ZodEnum<{
775
843
  completed: "completed";
@@ -833,7 +901,19 @@ export declare const ScheduleUpdateResponseSchema: z.ZodObject<{
833
901
  systemPrompt: z.ZodOptional<z.ZodString>;
834
902
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
835
903
  }, z.core.$strip>;
904
+ }, z.core.$strip>, z.ZodObject<{
905
+ type: z.ZodLiteral<"workflow">;
906
+ definitionId: z.ZodString;
907
+ projectRoot: z.ZodString;
836
908
  }, z.core.$strip>], "type">>;
909
+ workflow: z.ZodOptional<z.ZodObject<{
910
+ definitionId: z.ZodString;
911
+ title: z.ZodString;
912
+ kind: z.ZodString;
913
+ projectRoot: z.ZodString;
914
+ fingerprint: z.ZodString;
915
+ runId: z.ZodString;
916
+ }, z.core.$strip>>;
837
917
  agentId: z.ZodNullable<z.ZodGUID>;
838
918
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
839
919
  personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { ScheduleCadenceSchema, ScheduleRunSchema, ScheduleSummarySchema, StoredScheduleSchema, ScheduleTargetSchema, } from "./types.js";
3
3
  const ScheduleCreateNewAgentConfigSchema = ScheduleTargetSchema.options[1].shape.config;
4
+ const ScheduleWorkflowTargetSchema = ScheduleTargetSchema.options[2];
4
5
  const ScheduleCreateTargetSchema = z.discriminatedUnion("type", [
5
6
  z.object({
6
7
  type: z.literal("self"),
@@ -14,6 +15,7 @@ const ScheduleCreateTargetSchema = z.discriminatedUnion("type", [
14
15
  type: z.literal("new-agent"),
15
16
  config: ScheduleCreateNewAgentConfigSchema,
16
17
  }),
18
+ ScheduleWorkflowTargetSchema,
17
19
  ]);
18
20
  export const ScheduleCreateRequestSchema = z.object({
19
21
  type: z.literal("schedule/create"),
@@ -46,6 +46,10 @@ export declare const ScheduleTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
46
46
  systemPrompt: z.ZodOptional<z.ZodString>;
47
47
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
48
48
  }, z.core.$strip>;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ type: z.ZodLiteral<"workflow">;
51
+ definitionId: z.ZodString;
52
+ projectRoot: z.ZodString;
49
53
  }, z.core.$strip>], "type">;
50
54
  export type ScheduleTarget = z.infer<typeof ScheduleTargetSchema>;
51
55
  export declare const ScheduleRunSchema: z.ZodObject<{
@@ -90,7 +94,19 @@ export declare const ScheduleRunSchema: z.ZodObject<{
90
94
  systemPrompt: z.ZodOptional<z.ZodString>;
91
95
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
92
96
  }, z.core.$strip>;
97
+ }, z.core.$strip>, z.ZodObject<{
98
+ type: z.ZodLiteral<"workflow">;
99
+ definitionId: z.ZodString;
100
+ projectRoot: z.ZodString;
93
101
  }, z.core.$strip>], "type">>;
102
+ workflow: z.ZodOptional<z.ZodObject<{
103
+ definitionId: z.ZodString;
104
+ title: z.ZodString;
105
+ kind: z.ZodString;
106
+ projectRoot: z.ZodString;
107
+ fingerprint: z.ZodString;
108
+ runId: z.ZodString;
109
+ }, z.core.$strip>>;
94
110
  agentId: z.ZodNullable<z.ZodGUID>;
95
111
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
112
  personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -144,6 +160,10 @@ export declare const StoredScheduleSchema: z.ZodObject<{
144
160
  systemPrompt: z.ZodOptional<z.ZodString>;
145
161
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
146
162
  }, z.core.$strip>;
163
+ }, z.core.$strip>, z.ZodObject<{
164
+ type: z.ZodLiteral<"workflow">;
165
+ definitionId: z.ZodString;
166
+ projectRoot: z.ZodString;
147
167
  }, z.core.$strip>], "type">;
148
168
  status: z.ZodEnum<{
149
169
  completed: "completed";
@@ -207,7 +227,19 @@ export declare const StoredScheduleSchema: z.ZodObject<{
207
227
  systemPrompt: z.ZodOptional<z.ZodString>;
208
228
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
209
229
  }, z.core.$strip>;
230
+ }, z.core.$strip>, z.ZodObject<{
231
+ type: z.ZodLiteral<"workflow">;
232
+ definitionId: z.ZodString;
233
+ projectRoot: z.ZodString;
210
234
  }, z.core.$strip>], "type">>;
235
+ workflow: z.ZodOptional<z.ZodObject<{
236
+ definitionId: z.ZodString;
237
+ title: z.ZodString;
238
+ kind: z.ZodString;
239
+ projectRoot: z.ZodString;
240
+ fingerprint: z.ZodString;
241
+ runId: z.ZodString;
242
+ }, z.core.$strip>>;
211
243
  agentId: z.ZodNullable<z.ZodGUID>;
212
244
  workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
245
  personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -262,6 +294,10 @@ export declare const ScheduleSummarySchema: z.ZodObject<{
262
294
  systemPrompt: z.ZodOptional<z.ZodString>;
263
295
  mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
264
296
  }, z.core.$strip>;
297
+ }, z.core.$strip>, z.ZodObject<{
298
+ type: z.ZodLiteral<"workflow">;
299
+ definitionId: z.ZodString;
300
+ projectRoot: z.ZodString;
265
301
  }, z.core.$strip>], "type">;
266
302
  cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
267
303
  type: z.ZodLiteral<"every">;
@@ -318,5 +354,13 @@ export interface UpdateScheduleInput {
318
354
  export interface ScheduleExecutionResult {
319
355
  agentId: string | null;
320
356
  output: string | null;
357
+ workflow?: {
358
+ definitionId: string;
359
+ title: string;
360
+ kind: string;
361
+ projectRoot: string;
362
+ fingerprint: string;
363
+ runId: string;
364
+ };
321
365
  }
322
366
  //# sourceMappingURL=types.d.ts.map
@@ -61,6 +61,15 @@ export const ScheduleTargetSchema = z.discriminatedUnion("type", [
61
61
  mcpServers: z.record(z.string(), z.unknown()).optional(),
62
62
  }),
63
63
  }),
64
+ // A schedule names a durable saved Workflow definition, never a Workflow run
65
+ // and never a reconstructed prompt. `projectRoot` is the authority boundary:
66
+ // the daemon resolves the selected project's Workflow store immediately
67
+ // before launch and refuses a definition from any other project or host.
68
+ z.object({
69
+ type: z.literal("workflow"),
70
+ definitionId: z.string().trim().min(1),
71
+ projectRoot: z.string().trim().min(1),
72
+ }),
64
73
  ]);
65
74
  export const ScheduleRunSchema = z.object({
66
75
  id: z.string(),
@@ -73,6 +82,19 @@ export const ScheduleRunSchema = z.object({
73
82
  // future Workflow/artifact target adapters one compatibility-safe audit slot.
74
83
  // Optional because persisted runs before v0.9 do not carry it.
75
84
  target: ScheduleTargetSchema.optional(),
85
+ // Immutable result of resolving a saved Workflow target at fire time. The
86
+ // definition can change later; this record is the audit of what actually
87
+ // launched. Optional keeps historical agent schedule runs readable.
88
+ workflow: z
89
+ .object({
90
+ definitionId: z.string().min(1),
91
+ title: z.string().min(1),
92
+ kind: z.string().min(1),
93
+ projectRoot: z.string().min(1),
94
+ fingerprint: z.string().min(1),
95
+ runId: z.string().min(1),
96
+ })
97
+ .optional(),
76
98
  agentId: z.guid().nullable(),
77
99
  workspaceId: z.string().nullable().optional(),
78
100
  // Who actually executed this run - the resolved personality (if any),
@@ -15,6 +15,14 @@ export interface MatchScore {
15
15
  export interface MatchOptions {
16
16
  /** Omit or pass null to match exactly. `fuzzyPolicyForToken` picks a policy. */
17
17
  fuzzy?: FuzzyPolicy | null;
18
+ /**
19
+ * Match characters that appear in order but not adjacently, so `pasbab` finds
20
+ * `otto-babysit`. Defaults to on. Turn it off where a near miss has to read as
21
+ * no match at all: it widens far enough that most typos hit something, and a
22
+ * list that preselects its first row would then act on that row when the user
23
+ * presses Enter expecting nothing to happen.
24
+ */
25
+ subsequence?: boolean;
18
26
  }
19
27
  /**
20
28
  * How much a typo in one query token is forgiven. Short tokens get
@@ -28,6 +36,8 @@ export interface FuzzyPolicy {
28
36
  }
29
37
  export declare function fuzzyPolicyForToken(token: string): FuzzyPolicy | null;
30
38
  export declare function scoreMatch(query: string, text: string, options?: MatchOptions): MatchScore | null;
39
+ /** Match a query against a complete displayed path, including its separators. */
40
+ export declare function scorePathMatch(query: string, path: string): MatchScore | null;
31
41
  export interface MatchRange {
32
42
  start: number;
33
43
  length: number;
@@ -50,6 +60,12 @@ export interface TextFieldsOptions {
50
60
  * query mixes long words that can absorb an edit with short ones that cannot.
51
61
  */
52
62
  typoTolerant?: boolean;
63
+ /**
64
+ * See `MatchOptions.subsequence`. Applied per token, so turning it off means
65
+ * every token has to appear as a run of adjacent characters in some field —
66
+ * `lab des` still matches "Label as Design", `labdes` no longer does.
67
+ */
68
+ subsequence?: boolean;
53
69
  }
54
70
  export declare function scoreTextFields(query: string, fields: string[], options?: TextFieldsOptions): MatchScore | null;
55
71
  //# sourceMappingURL=text-match.d.ts.map
@@ -168,12 +168,41 @@ export function scoreMatch(query, text, options = {}) {
168
168
  const t = text.toLowerCase();
169
169
  if (t === q)
170
170
  return { tier: TIER_EXACT, offset: 0 };
171
- const exact = scoreSubstringMatch(q, t) ?? scoreSubsequenceMatch(q, t);
171
+ const substring = scoreSubstringMatch(q, t);
172
+ const exact = substring ?? (options.subsequence === false ? null : scoreSubsequenceMatch(q, t));
172
173
  if (exact)
173
174
  return exact;
174
175
  const fuzzy = options.fuzzy;
175
176
  return fuzzy ? scoreFuzzyMatch(q, t, fuzzy) : null;
176
177
  }
178
+ function compactText(value) {
179
+ let compact = "";
180
+ const offsets = [];
181
+ for (let index = 0; index < value.length; index += 1) {
182
+ if (!/[a-z0-9]/i.test(value[index]))
183
+ continue;
184
+ compact += value[index].toLowerCase();
185
+ offsets.push(index);
186
+ }
187
+ return { value: compact, offsets };
188
+ }
189
+ /** Match a query against a complete displayed path, including its separators. */
190
+ export function scorePathMatch(query, path) {
191
+ const direct = scoreMatch(query, path);
192
+ if (direct)
193
+ return direct;
194
+ const compactQuery = compactText(query);
195
+ const compactPath = compactText(path);
196
+ if (!compactQuery.value || !compactPath.value)
197
+ return null;
198
+ const compactScore = scoreMatch(compactQuery.value, compactPath.value);
199
+ if (!compactScore)
200
+ return null;
201
+ return {
202
+ ...compactScore,
203
+ offset: compactPath.offsets[compactScore.offset] ?? compactScore.offset,
204
+ };
205
+ }
177
206
  function mergeAdjacentRanges(indices) {
178
207
  const ranges = [];
179
208
  for (const index of indices) {
@@ -246,7 +275,7 @@ export function scoreTextFields(query, fields, options = {}) {
246
275
  const fuzzy = options.typoTolerant ? fuzzyPolicyForToken(token) : null;
247
276
  let best = null;
248
277
  for (const field of fields) {
249
- const score = scoreMatch(token, field, { fuzzy });
278
+ const score = scoreMatch(token, field, { fuzzy, subsequence: options.subsequence });
250
279
  if (score && (!best || compareMatchScores(score, best) < 0)) {
251
280
  best = score;
252
281
  }