@heynixie/contract 0.55.0 → 0.57.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.
@@ -345,10 +345,11 @@ export declare function buildQueryUtils(client: ContractClient): {
345
345
  list: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, unknown, {
346
346
  tasks: {
347
347
  brief: string;
348
+ isPauseRequested: boolean;
348
349
  isTakingMessages: boolean;
349
350
  lastActivityAt: Date;
350
351
  name: string;
351
- state: "done" | "failed" | "ready" | "running" | "waiting";
352
+ state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
352
353
  taskID: string;
353
354
  }[];
354
355
  }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
@@ -357,6 +358,275 @@ export declare function buildQueryUtils(client: ContractClient): {
357
358
  status: number;
358
359
  };
359
360
  }>>> & import("@orpc/tanstack-query").GeneralUtils<unknown>;
361
+ pause: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
362
+ clientActionID: string;
363
+ taskID: string;
364
+ }, {
365
+ controlledAt: Date;
366
+ isPauseRequested: boolean;
367
+ state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
368
+ taskID: string;
369
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
370
+ UNAUTHORIZED: {
371
+ message: string;
372
+ status: number;
373
+ };
374
+ }>, {
375
+ CLIENT_ACTION_ID_REUSED: {
376
+ message: string;
377
+ status: number;
378
+ };
379
+ }>, {
380
+ TASK_NOT_FOUND: {
381
+ message: string;
382
+ status: number;
383
+ };
384
+ TASK_STATE_REFUSED: {
385
+ message: string;
386
+ status: number;
387
+ data: import("zod").ZodObject<{
388
+ isPauseRequested: import("zod").ZodBoolean;
389
+ state: import("zod").ZodEnum<{
390
+ closed: "closed";
391
+ done: "done";
392
+ failed: "failed";
393
+ paused: "paused";
394
+ ready: "ready";
395
+ running: "running";
396
+ stopped: "stopped";
397
+ waiting: "waiting";
398
+ }>;
399
+ }, import("zod/v4/core").$strip>;
400
+ };
401
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
402
+ clientActionID: string;
403
+ taskID: string;
404
+ }>;
405
+ resume: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
406
+ clientActionID: string;
407
+ taskID: string;
408
+ }, {
409
+ controlledAt: Date;
410
+ isPauseRequested: boolean;
411
+ state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
412
+ taskID: string;
413
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
414
+ UNAUTHORIZED: {
415
+ message: string;
416
+ status: number;
417
+ };
418
+ }>, {
419
+ CLIENT_ACTION_ID_REUSED: {
420
+ message: string;
421
+ status: number;
422
+ };
423
+ }>, {
424
+ TASK_NOT_FOUND: {
425
+ message: string;
426
+ status: number;
427
+ };
428
+ TASK_STATE_REFUSED: {
429
+ message: string;
430
+ status: number;
431
+ data: import("zod").ZodObject<{
432
+ isPauseRequested: import("zod").ZodBoolean;
433
+ state: import("zod").ZodEnum<{
434
+ closed: "closed";
435
+ done: "done";
436
+ failed: "failed";
437
+ paused: "paused";
438
+ ready: "ready";
439
+ running: "running";
440
+ stopped: "stopped";
441
+ waiting: "waiting";
442
+ }>;
443
+ }, import("zod/v4/core").$strip>;
444
+ };
445
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
446
+ clientActionID: string;
447
+ taskID: string;
448
+ }>;
449
+ stop: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
450
+ clientActionID: string;
451
+ taskID: string;
452
+ }, {
453
+ controlledAt: Date;
454
+ isPauseRequested: boolean;
455
+ state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
456
+ taskID: string;
457
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
458
+ UNAUTHORIZED: {
459
+ message: string;
460
+ status: number;
461
+ };
462
+ }>, {
463
+ CLIENT_ACTION_ID_REUSED: {
464
+ message: string;
465
+ status: number;
466
+ };
467
+ }>, {
468
+ TASK_NOT_FOUND: {
469
+ message: string;
470
+ status: number;
471
+ };
472
+ TASK_STATE_REFUSED: {
473
+ message: string;
474
+ status: number;
475
+ data: import("zod").ZodObject<{
476
+ isPauseRequested: import("zod").ZodBoolean;
477
+ state: import("zod").ZodEnum<{
478
+ closed: "closed";
479
+ done: "done";
480
+ failed: "failed";
481
+ paused: "paused";
482
+ ready: "ready";
483
+ running: "running";
484
+ stopped: "stopped";
485
+ waiting: "waiting";
486
+ }>;
487
+ }, import("zod/v4/core").$strip>;
488
+ };
489
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
490
+ clientActionID: string;
491
+ taskID: string;
492
+ }>;
493
+ restart: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
494
+ clientActionID: string;
495
+ taskID: string;
496
+ }, {
497
+ controlledAt: Date;
498
+ isPauseRequested: boolean;
499
+ state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
500
+ taskID: string;
501
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
502
+ UNAUTHORIZED: {
503
+ message: string;
504
+ status: number;
505
+ };
506
+ }>, {
507
+ CLIENT_ACTION_ID_REUSED: {
508
+ message: string;
509
+ status: number;
510
+ };
511
+ }>, {
512
+ TASK_NOT_FOUND: {
513
+ message: string;
514
+ status: number;
515
+ };
516
+ TASK_STATE_REFUSED: {
517
+ message: string;
518
+ status: number;
519
+ data: import("zod").ZodObject<{
520
+ isPauseRequested: import("zod").ZodBoolean;
521
+ state: import("zod").ZodEnum<{
522
+ closed: "closed";
523
+ done: "done";
524
+ failed: "failed";
525
+ paused: "paused";
526
+ ready: "ready";
527
+ running: "running";
528
+ stopped: "stopped";
529
+ waiting: "waiting";
530
+ }>;
531
+ }, import("zod/v4/core").$strip>;
532
+ };
533
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
534
+ clientActionID: string;
535
+ taskID: string;
536
+ }>;
537
+ close: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
538
+ clientActionID: string;
539
+ taskID: string;
540
+ }, {
541
+ controlledAt: Date;
542
+ isPauseRequested: boolean;
543
+ state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
544
+ taskID: string;
545
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
546
+ UNAUTHORIZED: {
547
+ message: string;
548
+ status: number;
549
+ };
550
+ }>, {
551
+ CLIENT_ACTION_ID_REUSED: {
552
+ message: string;
553
+ status: number;
554
+ };
555
+ }>, {
556
+ TASK_NOT_FOUND: {
557
+ message: string;
558
+ status: number;
559
+ };
560
+ TASK_STATE_REFUSED: {
561
+ message: string;
562
+ status: number;
563
+ data: import("zod").ZodObject<{
564
+ isPauseRequested: import("zod").ZodBoolean;
565
+ state: import("zod").ZodEnum<{
566
+ closed: "closed";
567
+ done: "done";
568
+ failed: "failed";
569
+ paused: "paused";
570
+ ready: "ready";
571
+ running: "running";
572
+ stopped: "stopped";
573
+ waiting: "waiting";
574
+ }>;
575
+ }, import("zod/v4/core").$strip>;
576
+ };
577
+ }>, {
578
+ CONVERSATION_NEVER_CLOSES: {
579
+ message: string;
580
+ status: number;
581
+ };
582
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
583
+ clientActionID: string;
584
+ taskID: string;
585
+ }>;
586
+ interrupt: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
587
+ clientActionID: string;
588
+ taskID: string;
589
+ }, {
590
+ controlledAt: Date;
591
+ isPauseRequested: boolean;
592
+ state: "closed" | "done" | "failed" | "paused" | "ready" | "running" | "stopped" | "waiting";
593
+ taskID: string;
594
+ }, import("@orpc/contract").ErrorFromErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
595
+ UNAUTHORIZED: {
596
+ message: string;
597
+ status: number;
598
+ };
599
+ }>, {
600
+ CLIENT_ACTION_ID_REUSED: {
601
+ message: string;
602
+ status: number;
603
+ };
604
+ }>, {
605
+ TASK_NOT_FOUND: {
606
+ message: string;
607
+ status: number;
608
+ };
609
+ TASK_STATE_REFUSED: {
610
+ message: string;
611
+ status: number;
612
+ data: import("zod").ZodObject<{
613
+ isPauseRequested: import("zod").ZodBoolean;
614
+ state: import("zod").ZodEnum<{
615
+ closed: "closed";
616
+ done: "done";
617
+ failed: "failed";
618
+ paused: "paused";
619
+ ready: "ready";
620
+ running: "running";
621
+ stopped: "stopped";
622
+ waiting: "waiting";
623
+ }>;
624
+ }, import("zod/v4/core").$strip>;
625
+ };
626
+ }>>> & import("@orpc/tanstack-query").GeneralUtils<{
627
+ clientActionID: string;
628
+ taskID: string;
629
+ }>;
360
630
  } & import("@orpc/tanstack-query").GeneralUtils<unknown>;
361
631
  memory: {
362
632
  export: import("@orpc/tanstack-query").ProcedureUtils<Record<never, never>, {
@@ -1461,11 +1731,12 @@ export declare function buildQueryUtils(client: ContractClient): {
1461
1731
  itemID: string;
1462
1732
  kind: "fact" | "self";
1463
1733
  lapseAt: Date;
1734
+ newSubject: "owner" | "self" | "shared" | null;
1464
1735
  operation: "pin" | "remember" | "retire";
1465
1736
  origin: "conversation" | "memory_writer" | "owner" | "task";
1466
1737
  proposalID: string;
1467
1738
  quote: string | null;
1468
- reason: "ambiguous_target" | "checker_not_asserted" | "checker_unreachable" | "checker_unsure" | "forgotten_evidence" | "from_photo" | "invisible_character" | "no_quote" | "other" | "pinned" | "quote_in_quoted_block" | "quote_not_typed" | "self_note" | "sensitive" | "token_missing";
1739
+ reason: "ambiguous_target" | "checker_not_asserted" | "checker_unreachable" | "checker_unsure" | "forgotten_evidence" | "from_photo" | "invisible_character" | "no_quote" | "other" | "pinned" | "quote_in_quoted_block" | "quote_not_typed" | "self_note" | "sensitive" | "subject_change" | "token_missing";
1469
1740
  source: "owner" | "owner_data" | "untrusted";
1470
1741
  sources: {
1471
1742
  origin: "conversation" | "memory_writer" | "owner" | "task";
@@ -354,14 +354,18 @@ export declare const contract: {
354
354
  list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
355
355
  tasks: z.ZodArray<z.ZodObject<{
356
356
  brief: z.ZodString;
357
+ isPauseRequested: z.ZodBoolean;
357
358
  isTakingMessages: z.ZodBoolean;
358
359
  lastActivityAt: z.ZodDate;
359
360
  name: z.ZodString;
360
361
  state: z.ZodEnum<{
362
+ closed: "closed";
361
363
  done: "done";
362
364
  failed: "failed";
365
+ paused: "paused";
363
366
  ready: "ready";
364
367
  running: "running";
368
+ stopped: "stopped";
365
369
  waiting: "waiting";
366
370
  }>;
367
371
  taskID: z.ZodString;
@@ -372,6 +376,311 @@ export declare const contract: {
372
376
  status: number;
373
377
  };
374
378
  }>, Record<never, never>>;
379
+ pause: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
380
+ clientActionID: z.ZodUUID;
381
+ taskID: z.ZodString;
382
+ }, z.core.$strip>, z.ZodObject<{
383
+ controlledAt: z.ZodDate;
384
+ isPauseRequested: z.ZodBoolean;
385
+ state: z.ZodEnum<{
386
+ closed: "closed";
387
+ done: "done";
388
+ failed: "failed";
389
+ paused: "paused";
390
+ ready: "ready";
391
+ running: "running";
392
+ stopped: "stopped";
393
+ waiting: "waiting";
394
+ }>;
395
+ taskID: z.ZodString;
396
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
397
+ UNAUTHORIZED: {
398
+ message: string;
399
+ status: number;
400
+ };
401
+ }>, {
402
+ CLIENT_ACTION_ID_REUSED: {
403
+ message: string;
404
+ status: number;
405
+ };
406
+ }>, {
407
+ TASK_NOT_FOUND: {
408
+ message: string;
409
+ status: number;
410
+ };
411
+ TASK_STATE_REFUSED: {
412
+ message: string;
413
+ status: number;
414
+ data: z.ZodObject<{
415
+ isPauseRequested: z.ZodBoolean;
416
+ state: z.ZodEnum<{
417
+ closed: "closed";
418
+ done: "done";
419
+ failed: "failed";
420
+ paused: "paused";
421
+ ready: "ready";
422
+ running: "running";
423
+ stopped: "stopped";
424
+ waiting: "waiting";
425
+ }>;
426
+ }, z.core.$strip>;
427
+ };
428
+ }>, Record<never, never>>;
429
+ resume: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
430
+ clientActionID: z.ZodUUID;
431
+ taskID: z.ZodString;
432
+ }, z.core.$strip>, z.ZodObject<{
433
+ controlledAt: z.ZodDate;
434
+ isPauseRequested: z.ZodBoolean;
435
+ state: z.ZodEnum<{
436
+ closed: "closed";
437
+ done: "done";
438
+ failed: "failed";
439
+ paused: "paused";
440
+ ready: "ready";
441
+ running: "running";
442
+ stopped: "stopped";
443
+ waiting: "waiting";
444
+ }>;
445
+ taskID: z.ZodString;
446
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
447
+ UNAUTHORIZED: {
448
+ message: string;
449
+ status: number;
450
+ };
451
+ }>, {
452
+ CLIENT_ACTION_ID_REUSED: {
453
+ message: string;
454
+ status: number;
455
+ };
456
+ }>, {
457
+ TASK_NOT_FOUND: {
458
+ message: string;
459
+ status: number;
460
+ };
461
+ TASK_STATE_REFUSED: {
462
+ message: string;
463
+ status: number;
464
+ data: z.ZodObject<{
465
+ isPauseRequested: z.ZodBoolean;
466
+ state: z.ZodEnum<{
467
+ closed: "closed";
468
+ done: "done";
469
+ failed: "failed";
470
+ paused: "paused";
471
+ ready: "ready";
472
+ running: "running";
473
+ stopped: "stopped";
474
+ waiting: "waiting";
475
+ }>;
476
+ }, z.core.$strip>;
477
+ };
478
+ }>, Record<never, never>>;
479
+ stop: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
480
+ clientActionID: z.ZodUUID;
481
+ taskID: z.ZodString;
482
+ }, z.core.$strip>, z.ZodObject<{
483
+ controlledAt: z.ZodDate;
484
+ isPauseRequested: z.ZodBoolean;
485
+ state: z.ZodEnum<{
486
+ closed: "closed";
487
+ done: "done";
488
+ failed: "failed";
489
+ paused: "paused";
490
+ ready: "ready";
491
+ running: "running";
492
+ stopped: "stopped";
493
+ waiting: "waiting";
494
+ }>;
495
+ taskID: z.ZodString;
496
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
497
+ UNAUTHORIZED: {
498
+ message: string;
499
+ status: number;
500
+ };
501
+ }>, {
502
+ CLIENT_ACTION_ID_REUSED: {
503
+ message: string;
504
+ status: number;
505
+ };
506
+ }>, {
507
+ TASK_NOT_FOUND: {
508
+ message: string;
509
+ status: number;
510
+ };
511
+ TASK_STATE_REFUSED: {
512
+ message: string;
513
+ status: number;
514
+ data: z.ZodObject<{
515
+ isPauseRequested: z.ZodBoolean;
516
+ state: z.ZodEnum<{
517
+ closed: "closed";
518
+ done: "done";
519
+ failed: "failed";
520
+ paused: "paused";
521
+ ready: "ready";
522
+ running: "running";
523
+ stopped: "stopped";
524
+ waiting: "waiting";
525
+ }>;
526
+ }, z.core.$strip>;
527
+ };
528
+ }>, Record<never, never>>;
529
+ restart: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
530
+ clientActionID: z.ZodUUID;
531
+ taskID: z.ZodString;
532
+ }, z.core.$strip>, z.ZodObject<{
533
+ controlledAt: z.ZodDate;
534
+ isPauseRequested: z.ZodBoolean;
535
+ state: z.ZodEnum<{
536
+ closed: "closed";
537
+ done: "done";
538
+ failed: "failed";
539
+ paused: "paused";
540
+ ready: "ready";
541
+ running: "running";
542
+ stopped: "stopped";
543
+ waiting: "waiting";
544
+ }>;
545
+ taskID: z.ZodString;
546
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
547
+ UNAUTHORIZED: {
548
+ message: string;
549
+ status: number;
550
+ };
551
+ }>, {
552
+ CLIENT_ACTION_ID_REUSED: {
553
+ message: string;
554
+ status: number;
555
+ };
556
+ }>, {
557
+ TASK_NOT_FOUND: {
558
+ message: string;
559
+ status: number;
560
+ };
561
+ TASK_STATE_REFUSED: {
562
+ message: string;
563
+ status: number;
564
+ data: z.ZodObject<{
565
+ isPauseRequested: z.ZodBoolean;
566
+ state: z.ZodEnum<{
567
+ closed: "closed";
568
+ done: "done";
569
+ failed: "failed";
570
+ paused: "paused";
571
+ ready: "ready";
572
+ running: "running";
573
+ stopped: "stopped";
574
+ waiting: "waiting";
575
+ }>;
576
+ }, z.core.$strip>;
577
+ };
578
+ }>, Record<never, never>>;
579
+ close: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
580
+ clientActionID: z.ZodUUID;
581
+ taskID: z.ZodString;
582
+ }, z.core.$strip>, z.ZodObject<{
583
+ controlledAt: z.ZodDate;
584
+ isPauseRequested: z.ZodBoolean;
585
+ state: z.ZodEnum<{
586
+ closed: "closed";
587
+ done: "done";
588
+ failed: "failed";
589
+ paused: "paused";
590
+ ready: "ready";
591
+ running: "running";
592
+ stopped: "stopped";
593
+ waiting: "waiting";
594
+ }>;
595
+ taskID: z.ZodString;
596
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
597
+ UNAUTHORIZED: {
598
+ message: string;
599
+ status: number;
600
+ };
601
+ }>, {
602
+ CLIENT_ACTION_ID_REUSED: {
603
+ message: string;
604
+ status: number;
605
+ };
606
+ }>, {
607
+ TASK_NOT_FOUND: {
608
+ message: string;
609
+ status: number;
610
+ };
611
+ TASK_STATE_REFUSED: {
612
+ message: string;
613
+ status: number;
614
+ data: z.ZodObject<{
615
+ isPauseRequested: z.ZodBoolean;
616
+ state: z.ZodEnum<{
617
+ closed: "closed";
618
+ done: "done";
619
+ failed: "failed";
620
+ paused: "paused";
621
+ ready: "ready";
622
+ running: "running";
623
+ stopped: "stopped";
624
+ waiting: "waiting";
625
+ }>;
626
+ }, z.core.$strip>;
627
+ };
628
+ }>, {
629
+ CONVERSATION_NEVER_CLOSES: {
630
+ message: string;
631
+ status: number;
632
+ };
633
+ }>, Record<never, never>>;
634
+ interrupt: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
635
+ clientActionID: z.ZodUUID;
636
+ taskID: z.ZodString;
637
+ }, z.core.$strip>, z.ZodObject<{
638
+ controlledAt: z.ZodDate;
639
+ isPauseRequested: z.ZodBoolean;
640
+ state: z.ZodEnum<{
641
+ closed: "closed";
642
+ done: "done";
643
+ failed: "failed";
644
+ paused: "paused";
645
+ ready: "ready";
646
+ running: "running";
647
+ stopped: "stopped";
648
+ waiting: "waiting";
649
+ }>;
650
+ taskID: z.ZodString;
651
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
652
+ UNAUTHORIZED: {
653
+ message: string;
654
+ status: number;
655
+ };
656
+ }>, {
657
+ CLIENT_ACTION_ID_REUSED: {
658
+ message: string;
659
+ status: number;
660
+ };
661
+ }>, {
662
+ TASK_NOT_FOUND: {
663
+ message: string;
664
+ status: number;
665
+ };
666
+ TASK_STATE_REFUSED: {
667
+ message: string;
668
+ status: number;
669
+ data: z.ZodObject<{
670
+ isPauseRequested: z.ZodBoolean;
671
+ state: z.ZodEnum<{
672
+ closed: "closed";
673
+ done: "done";
674
+ failed: "failed";
675
+ paused: "paused";
676
+ ready: "ready";
677
+ running: "running";
678
+ stopped: "stopped";
679
+ waiting: "waiting";
680
+ }>;
681
+ }, z.core.$strip>;
682
+ };
683
+ }>, Record<never, never>>;
375
684
  };
376
685
  memory: {
377
686
  export: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
@@ -1677,6 +1986,11 @@ export declare const contract: {
1677
1986
  self: "self";
1678
1987
  }>;
1679
1988
  lapseAt: z.ZodDate;
1989
+ newSubject: z.ZodNullable<z.ZodEnum<{
1990
+ owner: "owner";
1991
+ self: "self";
1992
+ shared: "shared";
1993
+ }>>;
1680
1994
  operation: z.ZodEnum<{
1681
1995
  pin: "pin";
1682
1996
  remember: "remember";
@@ -1705,6 +2019,7 @@ export declare const contract: {
1705
2019
  quote_not_typed: "quote_not_typed";
1706
2020
  self_note: "self_note";
1707
2021
  sensitive: "sensitive";
2022
+ subject_change: "subject_change";
1708
2023
  token_missing: "token_missing";
1709
2024
  }>;
1710
2025
  source: z.ZodEnum<{
@@ -10,6 +10,163 @@ export declare const hostContract: {
10
10
  lastSequence: z.ZodInt;
11
11
  shreddedRecords: z.ZodInt;
12
12
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
13
+ tasks: {
14
+ pause: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
15
+ taskID: z.ZodString;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ taskID: z.ZodString;
18
+ state: z.ZodEnum<{
19
+ closed: "closed";
20
+ done: "done";
21
+ failed: "failed";
22
+ paused: "paused";
23
+ ready: "ready";
24
+ running: "running";
25
+ stopped: "stopped";
26
+ waiting: "waiting";
27
+ }>;
28
+ isPauseRequested: z.ZodBoolean;
29
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
30
+ TASK_NOT_FOUND: {
31
+ message: string;
32
+ status: number;
33
+ };
34
+ TASK_STATE_REFUSED: {
35
+ message: string;
36
+ status: number;
37
+ };
38
+ }>, Record<never, never>>;
39
+ resume: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
40
+ taskID: z.ZodString;
41
+ }, z.core.$strict>, z.ZodObject<{
42
+ taskID: z.ZodString;
43
+ state: z.ZodEnum<{
44
+ closed: "closed";
45
+ done: "done";
46
+ failed: "failed";
47
+ paused: "paused";
48
+ ready: "ready";
49
+ running: "running";
50
+ stopped: "stopped";
51
+ waiting: "waiting";
52
+ }>;
53
+ isPauseRequested: z.ZodBoolean;
54
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
55
+ TASK_NOT_FOUND: {
56
+ message: string;
57
+ status: number;
58
+ };
59
+ TASK_STATE_REFUSED: {
60
+ message: string;
61
+ status: number;
62
+ };
63
+ }>, Record<never, never>>;
64
+ stop: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
65
+ taskID: z.ZodString;
66
+ }, z.core.$strict>, z.ZodObject<{
67
+ taskID: z.ZodString;
68
+ state: z.ZodEnum<{
69
+ closed: "closed";
70
+ done: "done";
71
+ failed: "failed";
72
+ paused: "paused";
73
+ ready: "ready";
74
+ running: "running";
75
+ stopped: "stopped";
76
+ waiting: "waiting";
77
+ }>;
78
+ isPauseRequested: z.ZodBoolean;
79
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
80
+ TASK_NOT_FOUND: {
81
+ message: string;
82
+ status: number;
83
+ };
84
+ TASK_STATE_REFUSED: {
85
+ message: string;
86
+ status: number;
87
+ };
88
+ }>, Record<never, never>>;
89
+ restart: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
90
+ taskID: z.ZodString;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ taskID: z.ZodString;
93
+ state: z.ZodEnum<{
94
+ closed: "closed";
95
+ done: "done";
96
+ failed: "failed";
97
+ paused: "paused";
98
+ ready: "ready";
99
+ running: "running";
100
+ stopped: "stopped";
101
+ waiting: "waiting";
102
+ }>;
103
+ isPauseRequested: z.ZodBoolean;
104
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
105
+ TASK_NOT_FOUND: {
106
+ message: string;
107
+ status: number;
108
+ };
109
+ TASK_STATE_REFUSED: {
110
+ message: string;
111
+ status: number;
112
+ };
113
+ }>, Record<never, never>>;
114
+ close: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
115
+ taskID: z.ZodString;
116
+ }, z.core.$strict>, z.ZodObject<{
117
+ taskID: z.ZodString;
118
+ state: z.ZodEnum<{
119
+ closed: "closed";
120
+ done: "done";
121
+ failed: "failed";
122
+ paused: "paused";
123
+ ready: "ready";
124
+ running: "running";
125
+ stopped: "stopped";
126
+ waiting: "waiting";
127
+ }>;
128
+ isPauseRequested: z.ZodBoolean;
129
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
130
+ TASK_NOT_FOUND: {
131
+ message: string;
132
+ status: number;
133
+ };
134
+ TASK_STATE_REFUSED: {
135
+ message: string;
136
+ status: number;
137
+ };
138
+ }>, {
139
+ CONVERSATION_NEVER_CLOSES: {
140
+ message: string;
141
+ status: number;
142
+ };
143
+ }>, Record<never, never>>;
144
+ interrupt: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
145
+ taskID: z.ZodString;
146
+ }, z.core.$strict>, z.ZodObject<{
147
+ taskID: z.ZodString;
148
+ state: z.ZodEnum<{
149
+ closed: "closed";
150
+ done: "done";
151
+ failed: "failed";
152
+ paused: "paused";
153
+ ready: "ready";
154
+ running: "running";
155
+ stopped: "stopped";
156
+ waiting: "waiting";
157
+ }>;
158
+ isPauseRequested: z.ZodBoolean;
159
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
160
+ TASK_NOT_FOUND: {
161
+ message: string;
162
+ status: number;
163
+ };
164
+ TASK_STATE_REFUSED: {
165
+ message: string;
166
+ status: number;
167
+ };
168
+ }>, Record<never, never>>;
169
+ };
13
170
  sessions: {
14
171
  issueCode: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
15
172
  code: z.ZodString;
@@ -55,6 +212,11 @@ export declare const hostContract: {
55
212
  self: "self";
56
213
  shared: "shared";
57
214
  }>;
215
+ newSubject: z.ZodNullable<z.ZodEnum<{
216
+ owner: "owner";
217
+ self: "self";
218
+ shared: "shared";
219
+ }>>;
58
220
  isSensitive: z.ZodBoolean;
59
221
  kind: z.ZodEnum<{
60
222
  fact: "fact";
@@ -75,6 +237,7 @@ export declare const hostContract: {
75
237
  quote_not_typed: "quote_not_typed";
76
238
  self_note: "self_note";
77
239
  sensitive: "sensitive";
240
+ subject_change: "subject_change";
78
241
  token_missing: "token_missing";
79
242
  }>;
80
243
  actionHash: z.ZodString;
package/dist/index.js CHANGED
@@ -451,7 +451,8 @@ var reviewReasonSchema = z5.enum([
451
451
  "other",
452
452
  "self_note",
453
453
  "from_photo",
454
- "sensitive"
454
+ "sensitive",
455
+ "subject_change"
455
456
  ]);
456
457
  var proposalSourceSchema = z5.object({
457
458
  origin: proposalOriginSchema,
@@ -468,6 +469,7 @@ var memoryProposalSchema = z5.object({
468
469
  itemID: z5.string(),
469
470
  kind: kindSchema,
470
471
  lapseAt: z5.date(),
472
+ newSubject: subjectSchema.nullable(),
471
473
  operation: z5.enum(["remember", "retire", "pin"]),
472
474
  origin: proposalOriginSchema,
473
475
  proposalID: z5.string(),
@@ -718,14 +720,39 @@ var moveTargetSchema = z9.discriminatedUnion("kind", [
718
720
  z9.object({ kind: z9.literal("task"), taskID: threadSchema }),
719
721
  newTaskTargetSchema
720
722
  ]);
723
+ var taskStateSchema = z9.enum([
724
+ "ready",
725
+ "running",
726
+ "waiting",
727
+ "paused",
728
+ "stopped",
729
+ "done",
730
+ "failed",
731
+ "closed"
732
+ ]);
721
733
  var listedTaskSchema = z9.object({
722
734
  brief: z9.string(),
735
+ isPauseRequested: z9.boolean(),
723
736
  isTakingMessages: z9.boolean(),
724
737
  lastActivityAt: z9.date(),
725
738
  name: z9.string(),
726
- state: z9.enum(["ready", "running", "waiting", "done", "failed"]),
739
+ state: taskStateSchema,
740
+ taskID: threadSchema
741
+ });
742
+ var controlledTaskSchema = z9.object({
743
+ controlledAt: z9.date(),
744
+ isPauseRequested: z9.boolean(),
745
+ state: taskStateSchema,
727
746
  taskID: threadSchema
728
747
  });
748
+ var taskControl = checkedAction.errors({
749
+ TASK_NOT_FOUND: { message: "No task has this ID", status: 404 },
750
+ TASK_STATE_REFUSED: {
751
+ message: "The task is in a state that does not take this control",
752
+ status: 409,
753
+ data: z9.object({ isPauseRequested: z9.boolean(), state: taskStateSchema })
754
+ }
755
+ }).input(z9.object({ clientActionID: clientActionIDSchema, taskID: threadSchema })).output(controlledTaskSchema);
729
756
  var followRecords = signedIn.input(z9.object({ afterSequence: sequenceSchema, thread: threadSchema.optional() })).output(eventIterator2(z9.object({ record: recordSchema })));
730
757
  var contract = {
731
758
  conversation: {
@@ -781,7 +808,15 @@ var contract = {
781
808
  })).output(z9.object({ movedAt: z9.date(), taskID: threadSchema }))
782
809
  },
783
810
  tasks: {
784
- list: signedIn.output(z9.object({ tasks: z9.array(listedTaskSchema) }))
811
+ list: signedIn.output(z9.object({ tasks: z9.array(listedTaskSchema) })),
812
+ pause: taskControl,
813
+ resume: taskControl,
814
+ stop: taskControl,
815
+ restart: taskControl,
816
+ close: taskControl.errors({
817
+ CONVERSATION_NEVER_CLOSES: { message: "The conversation is never closed", status: 409 }
818
+ }),
819
+ interrupt: taskControl
785
820
  },
786
821
  memory: {
787
822
  readVersions: signedIn.input(z9.object({ versions: z9.array(versionRefSchema).min(1).max(100) })).output(z9.object({ versions: z9.array(versionTextSchema) })),
@@ -849,7 +884,8 @@ var reviewReasonSchema2 = z10.enum([
849
884
  "other",
850
885
  "self_note",
851
886
  "from_photo",
852
- "sensitive"
887
+ "sensitive",
888
+ "subject_change"
853
889
  ]);
854
890
  var proposalSourceSchema2 = z10.object({
855
891
  origin: proposalOriginSchema2,
@@ -863,6 +899,7 @@ var pendingProposalSchema = z10.object({
863
899
  targetVersion: z10.int().nullable(),
864
900
  isPinned: z10.boolean(),
865
901
  subject: z10.enum(["owner", "self", "shared"]),
902
+ newSubject: z10.enum(["owner", "self", "shared"]).nullable(),
866
903
  isSensitive: z10.boolean(),
867
904
  kind: z10.enum(["fact", "self"]),
868
905
  reason: reviewReasonSchema2,
@@ -1035,6 +1072,27 @@ var prompts = oc3.errors({
1035
1072
  PROMPT_CHECK: { message: "the override fails the definitions checks", status: 400 }
1036
1073
  });
1037
1074
  var forgottenItemsSchema = z10.object({ itemIDs: z10.array(z10.string()) });
1075
+ var hostTaskStateSchema = z10.enum([
1076
+ "ready",
1077
+ "running",
1078
+ "waiting",
1079
+ "paused",
1080
+ "stopped",
1081
+ "done",
1082
+ "failed",
1083
+ "closed"
1084
+ ]);
1085
+ var taskControl2 = oc3.errors({
1086
+ TASK_NOT_FOUND: { message: "no task has that ID", status: 404 },
1087
+ TASK_STATE_REFUSED: {
1088
+ message: "the task is in a state that does not take this control",
1089
+ status: 409
1090
+ }
1091
+ }).input(z10.strictObject({ taskID: z10.string().min(1) })).output(z10.object({
1092
+ taskID: z10.string(),
1093
+ state: hostTaskStateSchema,
1094
+ isPauseRequested: z10.boolean()
1095
+ }));
1038
1096
  var hostContract = {
1039
1097
  reset: oc3.output(z10.object({
1040
1098
  resetAt: z10.date(),
@@ -1046,6 +1104,16 @@ var hostContract = {
1046
1104
  lastSequence: z10.int().nonnegative(),
1047
1105
  shreddedRecords: z10.int().nonnegative()
1048
1106
  })),
1107
+ tasks: {
1108
+ pause: taskControl2,
1109
+ resume: taskControl2,
1110
+ stop: taskControl2,
1111
+ restart: taskControl2,
1112
+ close: taskControl2.errors({
1113
+ CONVERSATION_NEVER_CLOSES: { message: "the conversation is never closed", status: 409 }
1114
+ }),
1115
+ interrupt: taskControl2
1116
+ },
1049
1117
  sessions: {
1050
1118
  issueCode: oc3.output(z10.object({ code: z10.string(), expiresAt: z10.date() })),
1051
1119
  list: oc3.output(z10.array(hostSessionSchema)),
@@ -1303,6 +1303,11 @@ export declare const memoryViewContract: {
1303
1303
  self: "self";
1304
1304
  }>;
1305
1305
  lapseAt: z.ZodDate;
1306
+ newSubject: z.ZodNullable<z.ZodEnum<{
1307
+ owner: "owner";
1308
+ self: "self";
1309
+ shared: "shared";
1310
+ }>>;
1306
1311
  operation: z.ZodEnum<{
1307
1312
  pin: "pin";
1308
1313
  remember: "remember";
@@ -1331,6 +1336,7 @@ export declare const memoryViewContract: {
1331
1336
  quote_not_typed: "quote_not_typed";
1332
1337
  self_note: "self_note";
1333
1338
  sensitive: "sensitive";
1339
+ subject_change: "subject_change";
1334
1340
  token_missing: "token_missing";
1335
1341
  }>;
1336
1342
  source: z.ZodEnum<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heynixie/contract",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "The oRPC contract of the nixie API, with the types a client needs",
5
5
  "license": "MIT",
6
6
  "repository": {