@cat-factory/node-server 0.21.1 → 0.22.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.
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "8",
3
2
  "dialect": "postgres",
4
- "id": "e8bb4fee-c152-450f-9bb3-887954017005",
3
+ "id": "14f719f0-531f-4b7c-a7aa-322962f6a23e",
5
4
  "prevIds": [
6
- "234cda33-9d0f-4e70-b057-2d9ac2eba196"
5
+ "adda9001-f7d3-449c-a049-2c0b7f966ad3"
7
6
  ],
7
+ "version": "8",
8
8
  "ddl": [
9
9
  {
10
10
  "name": "provisioning",
@@ -14,6 +14,10 @@
14
14
  "name": "sandbox",
15
15
  "entityType": "schemas"
16
16
  },
17
+ {
18
+ "name": "telemetry",
19
+ "entityType": "schemas"
20
+ },
17
21
  {
18
22
  "isRlsEnabled": false,
19
23
  "name": "account_invitations",
@@ -32,6 +36,12 @@
32
36
  "entityType": "tables",
33
37
  "schema": "public"
34
38
  },
39
+ {
40
+ "isRlsEnabled": false,
41
+ "name": "agent_context_snapshots",
42
+ "entityType": "tables",
43
+ "schema": "telemetry"
44
+ },
35
45
  {
36
46
  "isRlsEnabled": false,
37
47
  "name": "agent_runs",
@@ -150,7 +160,7 @@
150
160
  "isRlsEnabled": false,
151
161
  "name": "llm_call_metrics",
152
162
  "entityType": "tables",
153
- "schema": "public"
163
+ "schema": "telemetry"
154
164
  },
155
165
  {
156
166
  "isRlsEnabled": false,
@@ -684,6 +694,175 @@
684
694
  "schema": "public",
685
695
  "table": "accounts"
686
696
  },
697
+ {
698
+ "type": "text",
699
+ "typeSchema": null,
700
+ "notNull": true,
701
+ "dimensions": 0,
702
+ "default": null,
703
+ "generated": null,
704
+ "identity": null,
705
+ "name": "id",
706
+ "entityType": "columns",
707
+ "schema": "telemetry",
708
+ "table": "agent_context_snapshots"
709
+ },
710
+ {
711
+ "type": "text",
712
+ "typeSchema": null,
713
+ "notNull": true,
714
+ "dimensions": 0,
715
+ "default": null,
716
+ "generated": null,
717
+ "identity": null,
718
+ "name": "workspace_id",
719
+ "entityType": "columns",
720
+ "schema": "telemetry",
721
+ "table": "agent_context_snapshots"
722
+ },
723
+ {
724
+ "type": "text",
725
+ "typeSchema": null,
726
+ "notNull": true,
727
+ "dimensions": 0,
728
+ "default": null,
729
+ "generated": null,
730
+ "identity": null,
731
+ "name": "execution_id",
732
+ "entityType": "columns",
733
+ "schema": "telemetry",
734
+ "table": "agent_context_snapshots"
735
+ },
736
+ {
737
+ "type": "text",
738
+ "typeSchema": null,
739
+ "notNull": true,
740
+ "dimensions": 0,
741
+ "default": null,
742
+ "generated": null,
743
+ "identity": null,
744
+ "name": "agent_kind",
745
+ "entityType": "columns",
746
+ "schema": "telemetry",
747
+ "table": "agent_context_snapshots"
748
+ },
749
+ {
750
+ "type": "integer",
751
+ "typeSchema": null,
752
+ "notNull": true,
753
+ "dimensions": 0,
754
+ "default": null,
755
+ "generated": null,
756
+ "identity": null,
757
+ "name": "step_index",
758
+ "entityType": "columns",
759
+ "schema": "telemetry",
760
+ "table": "agent_context_snapshots"
761
+ },
762
+ {
763
+ "type": "bigint",
764
+ "typeSchema": null,
765
+ "notNull": true,
766
+ "dimensions": 0,
767
+ "default": null,
768
+ "generated": null,
769
+ "identity": null,
770
+ "name": "created_at",
771
+ "entityType": "columns",
772
+ "schema": "telemetry",
773
+ "table": "agent_context_snapshots"
774
+ },
775
+ {
776
+ "type": "text",
777
+ "typeSchema": null,
778
+ "notNull": false,
779
+ "dimensions": 0,
780
+ "default": null,
781
+ "generated": null,
782
+ "identity": null,
783
+ "name": "model",
784
+ "entityType": "columns",
785
+ "schema": "telemetry",
786
+ "table": "agent_context_snapshots"
787
+ },
788
+ {
789
+ "type": "text",
790
+ "typeSchema": null,
791
+ "notNull": false,
792
+ "dimensions": 0,
793
+ "default": null,
794
+ "generated": null,
795
+ "identity": null,
796
+ "name": "harness",
797
+ "entityType": "columns",
798
+ "schema": "telemetry",
799
+ "table": "agent_context_snapshots"
800
+ },
801
+ {
802
+ "type": "text",
803
+ "typeSchema": null,
804
+ "notNull": true,
805
+ "dimensions": 0,
806
+ "default": "''",
807
+ "generated": null,
808
+ "identity": null,
809
+ "name": "system_prompt",
810
+ "entityType": "columns",
811
+ "schema": "telemetry",
812
+ "table": "agent_context_snapshots"
813
+ },
814
+ {
815
+ "type": "text",
816
+ "typeSchema": null,
817
+ "notNull": true,
818
+ "dimensions": 0,
819
+ "default": "''",
820
+ "generated": null,
821
+ "identity": null,
822
+ "name": "user_prompt",
823
+ "entityType": "columns",
824
+ "schema": "telemetry",
825
+ "table": "agent_context_snapshots"
826
+ },
827
+ {
828
+ "type": "text",
829
+ "typeSchema": null,
830
+ "notNull": true,
831
+ "dimensions": 0,
832
+ "default": "'[]'",
833
+ "generated": null,
834
+ "identity": null,
835
+ "name": "fragments",
836
+ "entityType": "columns",
837
+ "schema": "telemetry",
838
+ "table": "agent_context_snapshots"
839
+ },
840
+ {
841
+ "type": "text",
842
+ "typeSchema": null,
843
+ "notNull": true,
844
+ "dimensions": 0,
845
+ "default": "'[]'",
846
+ "generated": null,
847
+ "identity": null,
848
+ "name": "context_files",
849
+ "entityType": "columns",
850
+ "schema": "telemetry",
851
+ "table": "agent_context_snapshots"
852
+ },
853
+ {
854
+ "type": "text",
855
+ "typeSchema": null,
856
+ "notNull": true,
857
+ "dimensions": 0,
858
+ "default": "'{}'",
859
+ "generated": null,
860
+ "identity": null,
861
+ "name": "extras",
862
+ "entityType": "columns",
863
+ "schema": "telemetry",
864
+ "table": "agent_context_snapshots"
865
+ },
687
866
  {
688
867
  "type": "text",
689
868
  "typeSchema": null,
@@ -3528,7 +3707,7 @@
3528
3707
  "identity": null,
3529
3708
  "name": "id",
3530
3709
  "entityType": "columns",
3531
- "schema": "public",
3710
+ "schema": "telemetry",
3532
3711
  "table": "llm_call_metrics"
3533
3712
  },
3534
3713
  {
@@ -3541,7 +3720,7 @@
3541
3720
  "identity": null,
3542
3721
  "name": "workspace_id",
3543
3722
  "entityType": "columns",
3544
- "schema": "public",
3723
+ "schema": "telemetry",
3545
3724
  "table": "llm_call_metrics"
3546
3725
  },
3547
3726
  {
@@ -3554,7 +3733,7 @@
3554
3733
  "identity": null,
3555
3734
  "name": "execution_id",
3556
3735
  "entityType": "columns",
3557
- "schema": "public",
3736
+ "schema": "telemetry",
3558
3737
  "table": "llm_call_metrics"
3559
3738
  },
3560
3739
  {
@@ -3567,7 +3746,7 @@
3567
3746
  "identity": null,
3568
3747
  "name": "agent_kind",
3569
3748
  "entityType": "columns",
3570
- "schema": "public",
3749
+ "schema": "telemetry",
3571
3750
  "table": "llm_call_metrics"
3572
3751
  },
3573
3752
  {
@@ -3580,7 +3759,7 @@
3580
3759
  "identity": null,
3581
3760
  "name": "provider",
3582
3761
  "entityType": "columns",
3583
- "schema": "public",
3762
+ "schema": "telemetry",
3584
3763
  "table": "llm_call_metrics"
3585
3764
  },
3586
3765
  {
@@ -3593,7 +3772,7 @@
3593
3772
  "identity": null,
3594
3773
  "name": "model",
3595
3774
  "entityType": "columns",
3596
- "schema": "public",
3775
+ "schema": "telemetry",
3597
3776
  "table": "llm_call_metrics"
3598
3777
  },
3599
3778
  {
@@ -3606,7 +3785,7 @@
3606
3785
  "identity": null,
3607
3786
  "name": "created_at",
3608
3787
  "entityType": "columns",
3609
- "schema": "public",
3788
+ "schema": "telemetry",
3610
3789
  "table": "llm_call_metrics"
3611
3790
  },
3612
3791
  {
@@ -3619,7 +3798,7 @@
3619
3798
  "identity": null,
3620
3799
  "name": "streaming",
3621
3800
  "entityType": "columns",
3622
- "schema": "public",
3801
+ "schema": "telemetry",
3623
3802
  "table": "llm_call_metrics"
3624
3803
  },
3625
3804
  {
@@ -3632,7 +3811,7 @@
3632
3811
  "identity": null,
3633
3812
  "name": "message_count",
3634
3813
  "entityType": "columns",
3635
- "schema": "public",
3814
+ "schema": "telemetry",
3636
3815
  "table": "llm_call_metrics"
3637
3816
  },
3638
3817
  {
@@ -3645,7 +3824,7 @@
3645
3824
  "identity": null,
3646
3825
  "name": "tool_count",
3647
3826
  "entityType": "columns",
3648
- "schema": "public",
3827
+ "schema": "telemetry",
3649
3828
  "table": "llm_call_metrics"
3650
3829
  },
3651
3830
  {
@@ -3658,7 +3837,7 @@
3658
3837
  "identity": null,
3659
3838
  "name": "request_max_tokens",
3660
3839
  "entityType": "columns",
3661
- "schema": "public",
3840
+ "schema": "telemetry",
3662
3841
  "table": "llm_call_metrics"
3663
3842
  },
3664
3843
  {
@@ -3671,7 +3850,7 @@
3671
3850
  "identity": null,
3672
3851
  "name": "prompt_tokens",
3673
3852
  "entityType": "columns",
3674
- "schema": "public",
3853
+ "schema": "telemetry",
3675
3854
  "table": "llm_call_metrics"
3676
3855
  },
3677
3856
  {
@@ -3684,7 +3863,7 @@
3684
3863
  "identity": null,
3685
3864
  "name": "cached_prompt_tokens",
3686
3865
  "entityType": "columns",
3687
- "schema": "public",
3866
+ "schema": "telemetry",
3688
3867
  "table": "llm_call_metrics"
3689
3868
  },
3690
3869
  {
@@ -3697,7 +3876,7 @@
3697
3876
  "identity": null,
3698
3877
  "name": "completion_tokens",
3699
3878
  "entityType": "columns",
3700
- "schema": "public",
3879
+ "schema": "telemetry",
3701
3880
  "table": "llm_call_metrics"
3702
3881
  },
3703
3882
  {
@@ -3710,7 +3889,7 @@
3710
3889
  "identity": null,
3711
3890
  "name": "total_tokens",
3712
3891
  "entityType": "columns",
3713
- "schema": "public",
3892
+ "schema": "telemetry",
3714
3893
  "table": "llm_call_metrics"
3715
3894
  },
3716
3895
  {
@@ -3723,7 +3902,7 @@
3723
3902
  "identity": null,
3724
3903
  "name": "finish_reason",
3725
3904
  "entityType": "columns",
3726
- "schema": "public",
3905
+ "schema": "telemetry",
3727
3906
  "table": "llm_call_metrics"
3728
3907
  },
3729
3908
  {
@@ -3736,7 +3915,7 @@
3736
3915
  "identity": null,
3737
3916
  "name": "upstream_ms",
3738
3917
  "entityType": "columns",
3739
- "schema": "public",
3918
+ "schema": "telemetry",
3740
3919
  "table": "llm_call_metrics"
3741
3920
  },
3742
3921
  {
@@ -3749,7 +3928,7 @@
3749
3928
  "identity": null,
3750
3929
  "name": "overhead_ms",
3751
3930
  "entityType": "columns",
3752
- "schema": "public",
3931
+ "schema": "telemetry",
3753
3932
  "table": "llm_call_metrics"
3754
3933
  },
3755
3934
  {
@@ -3762,7 +3941,7 @@
3762
3941
  "identity": null,
3763
3942
  "name": "total_ms",
3764
3943
  "entityType": "columns",
3765
- "schema": "public",
3944
+ "schema": "telemetry",
3766
3945
  "table": "llm_call_metrics"
3767
3946
  },
3768
3947
  {
@@ -3775,7 +3954,7 @@
3775
3954
  "identity": null,
3776
3955
  "name": "ok",
3777
3956
  "entityType": "columns",
3778
- "schema": "public",
3957
+ "schema": "telemetry",
3779
3958
  "table": "llm_call_metrics"
3780
3959
  },
3781
3960
  {
@@ -3788,7 +3967,7 @@
3788
3967
  "identity": null,
3789
3968
  "name": "http_status",
3790
3969
  "entityType": "columns",
3791
- "schema": "public",
3970
+ "schema": "telemetry",
3792
3971
  "table": "llm_call_metrics"
3793
3972
  },
3794
3973
  {
@@ -3801,7 +3980,7 @@
3801
3980
  "identity": null,
3802
3981
  "name": "error_message",
3803
3982
  "entityType": "columns",
3804
- "schema": "public",
3983
+ "schema": "telemetry",
3805
3984
  "table": "llm_call_metrics"
3806
3985
  },
3807
3986
  {
@@ -3814,7 +3993,7 @@
3814
3993
  "identity": null,
3815
3994
  "name": "prompt_text",
3816
3995
  "entityType": "columns",
3817
- "schema": "public",
3996
+ "schema": "telemetry",
3818
3997
  "table": "llm_call_metrics"
3819
3998
  },
3820
3999
  {
@@ -3827,7 +4006,7 @@
3827
4006
  "identity": null,
3828
4007
  "name": "prompt_prefix_count",
3829
4008
  "entityType": "columns",
3830
- "schema": "public",
4009
+ "schema": "telemetry",
3831
4010
  "table": "llm_call_metrics"
3832
4011
  },
3833
4012
  {
@@ -3840,7 +4019,7 @@
3840
4019
  "identity": null,
3841
4020
  "name": "prompt_hash",
3842
4021
  "entityType": "columns",
3843
- "schema": "public",
4022
+ "schema": "telemetry",
3844
4023
  "table": "llm_call_metrics"
3845
4024
  },
3846
4025
  {
@@ -3853,7 +4032,7 @@
3853
4032
  "identity": null,
3854
4033
  "name": "response_text",
3855
4034
  "entityType": "columns",
3856
- "schema": "public",
4035
+ "schema": "telemetry",
3857
4036
  "table": "llm_call_metrics"
3858
4037
  },
3859
4038
  {
@@ -3866,7 +4045,7 @@
3866
4045
  "identity": null,
3867
4046
  "name": "reasoning_text",
3868
4047
  "entityType": "columns",
3869
- "schema": "public",
4048
+ "schema": "telemetry",
3870
4049
  "table": "llm_call_metrics"
3871
4050
  },
3872
4051
  {
@@ -8575,6 +8754,19 @@
8575
8754
  "schema": "public",
8576
8755
  "table": "workspace_settings"
8577
8756
  },
8757
+ {
8758
+ "type": "integer",
8759
+ "typeSchema": null,
8760
+ "notNull": true,
8761
+ "dimensions": 0,
8762
+ "default": "1",
8763
+ "generated": null,
8764
+ "identity": null,
8765
+ "name": "store_agent_context",
8766
+ "entityType": "columns",
8767
+ "schema": "public",
8768
+ "table": "workspace_settings"
8769
+ },
8578
8770
  {
8579
8771
  "type": "text",
8580
8772
  "typeSchema": null,
@@ -8755,6 +8947,62 @@
8755
8947
  "schema": "public",
8756
8948
  "table": "accounts"
8757
8949
  },
8950
+ {
8951
+ "nameExplicit": true,
8952
+ "columns": [
8953
+ {
8954
+ "value": "workspace_id",
8955
+ "isExpression": false,
8956
+ "asc": true,
8957
+ "nullsFirst": false,
8958
+ "opclass": null
8959
+ },
8960
+ {
8961
+ "value": "execution_id",
8962
+ "isExpression": false,
8963
+ "asc": true,
8964
+ "nullsFirst": false,
8965
+ "opclass": null
8966
+ },
8967
+ {
8968
+ "value": "created_at",
8969
+ "isExpression": false,
8970
+ "asc": true,
8971
+ "nullsFirst": false,
8972
+ "opclass": null
8973
+ }
8974
+ ],
8975
+ "isUnique": false,
8976
+ "where": null,
8977
+ "with": "",
8978
+ "method": "btree",
8979
+ "concurrently": false,
8980
+ "name": "idx_agent_context_snapshots_execution",
8981
+ "entityType": "indexes",
8982
+ "schema": "telemetry",
8983
+ "table": "agent_context_snapshots"
8984
+ },
8985
+ {
8986
+ "nameExplicit": true,
8987
+ "columns": [
8988
+ {
8989
+ "value": "created_at",
8990
+ "isExpression": false,
8991
+ "asc": true,
8992
+ "nullsFirst": false,
8993
+ "opclass": null
8994
+ }
8995
+ ],
8996
+ "isUnique": false,
8997
+ "where": null,
8998
+ "with": "",
8999
+ "method": "btree",
9000
+ "concurrently": false,
9001
+ "name": "idx_agent_context_snapshots_created",
9002
+ "entityType": "indexes",
9003
+ "schema": "telemetry",
9004
+ "table": "agent_context_snapshots"
9005
+ },
8758
9006
  {
8759
9007
  "nameExplicit": true,
8760
9008
  "columns": [
@@ -9396,7 +9644,7 @@
9396
9644
  "concurrently": false,
9397
9645
  "name": "idx_llm_call_metrics_execution",
9398
9646
  "entityType": "indexes",
9399
- "schema": "public",
9647
+ "schema": "telemetry",
9400
9648
  "table": "llm_call_metrics"
9401
9649
  },
9402
9650
  {
@@ -9417,7 +9665,7 @@
9417
9665
  "concurrently": false,
9418
9666
  "name": "idx_llm_call_metrics_created",
9419
9667
  "entityType": "indexes",
9420
- "schema": "public",
9668
+ "schema": "telemetry",
9421
9669
  "table": "llm_call_metrics"
9422
9670
  },
9423
9671
  {
@@ -11032,6 +11280,16 @@
11032
11280
  "table": "accounts",
11033
11281
  "entityType": "pks"
11034
11282
  },
11283
+ {
11284
+ "columns": [
11285
+ "id"
11286
+ ],
11287
+ "nameExplicit": false,
11288
+ "name": "agent_context_snapshots_pkey",
11289
+ "schema": "telemetry",
11290
+ "table": "agent_context_snapshots",
11291
+ "entityType": "pks"
11292
+ },
11035
11293
  {
11036
11294
  "columns": [
11037
11295
  "account_id"
@@ -11088,7 +11346,7 @@
11088
11346
  ],
11089
11347
  "nameExplicit": false,
11090
11348
  "name": "llm_call_metrics_pkey",
11091
- "schema": "public",
11349
+ "schema": "telemetry",
11092
11350
  "table": "llm_call_metrics",
11093
11351
  "entityType": "pks"
11094
11352
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/node-server",
3
- "version": "0.21.1",
3
+ "version": "0.22.0",
4
4
  "description": "Node.js runtime facade for the Agent Architecture Board: serves the shared @cat-factory/server Hono app via @hono/node-server, wiring Node implementations of the runtime ports (persistence, gateways, model provisioning).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,19 +31,19 @@
31
31
  "pg": "^8.22.0",
32
32
  "pg-boss": "^12.21.0",
33
33
  "ws": "^8.21.0",
34
- "@cat-factory/agents": "0.15.0",
35
- "@cat-factory/consensus": "0.7.39",
36
- "@cat-factory/contracts": "0.27.0",
37
- "@cat-factory/gates": "0.1.7",
38
- "@cat-factory/integrations": "0.21.1",
39
- "@cat-factory/kernel": "0.30.0",
40
- "@cat-factory/observability-langfuse": "0.7.37",
41
- "@cat-factory/orchestration": "0.23.0",
42
- "@cat-factory/prompt-fragments": "0.7.25",
43
- "@cat-factory/provider-bedrock": "0.7.39",
44
- "@cat-factory/provider-cloudflare": "0.7.39",
45
- "@cat-factory/server": "0.26.1",
46
- "@cat-factory/spend": "0.9.4"
34
+ "@cat-factory/agents": "0.15.1",
35
+ "@cat-factory/consensus": "0.7.40",
36
+ "@cat-factory/contracts": "0.28.0",
37
+ "@cat-factory/gates": "0.1.8",
38
+ "@cat-factory/integrations": "0.21.2",
39
+ "@cat-factory/kernel": "0.31.0",
40
+ "@cat-factory/observability-langfuse": "0.7.38",
41
+ "@cat-factory/orchestration": "0.24.0",
42
+ "@cat-factory/prompt-fragments": "0.7.26",
43
+ "@cat-factory/provider-bedrock": "0.7.40",
44
+ "@cat-factory/provider-cloudflare": "0.7.40",
45
+ "@cat-factory/server": "0.27.0",
46
+ "@cat-factory/spend": "0.9.5"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^26.0.0",
@@ -52,7 +52,7 @@
52
52
  "drizzle-kit": "1.0.0-rc.3",
53
53
  "typescript": "7.0.1-rc",
54
54
  "vitest": "^4.1.9",
55
- "@cat-factory/conformance": "0.7.39"
55
+ "@cat-factory/conformance": "0.7.40"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsc -b tsconfig.build.json",
@@ -62,6 +62,7 @@
62
62
  "dev": "node --watch dist/main.js",
63
63
  "db:generate": "drizzle-kit generate",
64
64
  "db:check": "drizzle-kit check",
65
+ "db:rebase-snapshot": "node scripts/rebase-migration-snapshot.mjs",
65
66
  "test": "vitest run",
66
67
  "test:run": "vitest run"
67
68
  }