@cultured_computer/sight 0.9.0 → 0.10.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.
package/dist/index.d.ts CHANGED
@@ -292,12 +292,12 @@ declare const SpanInputV1Schema: z.ZodObject<{
292
292
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
293
293
  error?: string | undefined;
294
294
  name?: string | undefined;
295
+ model?: string | undefined;
295
296
  turnIndex?: number | undefined;
296
297
  startedAt?: string | undefined;
297
298
  endedAt?: string | undefined;
298
299
  contractVersion?: 1 | undefined;
299
300
  durationMs?: number | undefined;
300
- model?: string | undefined;
301
301
  provider?: string | undefined;
302
302
  tokensInput?: number | undefined;
303
303
  tokensOutput?: number | undefined;
@@ -311,12 +311,12 @@ declare const SpanInputV1Schema: z.ZodObject<{
311
311
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
312
312
  error?: string | undefined;
313
313
  name?: string | undefined;
314
+ model?: string | undefined;
314
315
  turnIndex?: number | undefined;
315
316
  startedAt?: string | undefined;
316
317
  endedAt?: string | undefined;
317
318
  contractVersion?: 1 | undefined;
318
319
  durationMs?: number | undefined;
319
- model?: string | undefined;
320
320
  provider?: string | undefined;
321
321
  tokensInput?: number | undefined;
322
322
  tokensOutput?: number | undefined;
@@ -385,6 +385,7 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
385
385
  error: string | null;
386
386
  status: "ok" | "error";
387
387
  name: string;
388
+ model: string | null;
388
389
  deploymentSlug: string;
389
390
  sessionExternalId: string;
390
391
  startedAt: string;
@@ -392,7 +393,6 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
392
393
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
393
394
  contractVersion: 2;
394
395
  durationMs: number | null;
395
- model: string | null;
396
396
  provider: string | null;
397
397
  tokensInput: number | null;
398
398
  tokensOutput: number | null;
@@ -412,6 +412,7 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
412
412
  error: string | null;
413
413
  status: "ok" | "error";
414
414
  name: string;
415
+ model: string | null;
415
416
  deploymentSlug: string;
416
417
  sessionExternalId: string;
417
418
  startedAt: string;
@@ -419,7 +420,6 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
419
420
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
420
421
  contractVersion: 2;
421
422
  durationMs: number | null;
422
- model: string | null;
423
423
  provider: string | null;
424
424
  tokensInput: number | null;
425
425
  tokensOutput: number | null;
@@ -439,6 +439,7 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
439
439
  error: string | null;
440
440
  status: "ok" | "error";
441
441
  name: string;
442
+ model: string | null;
442
443
  deploymentSlug: string;
443
444
  sessionExternalId: string;
444
445
  startedAt: string;
@@ -446,7 +447,6 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
446
447
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
447
448
  contractVersion: 2;
448
449
  durationMs: number | null;
449
- model: string | null;
450
450
  provider: string | null;
451
451
  tokensInput: number | null;
452
452
  tokensOutput: number | null;
@@ -466,6 +466,7 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
466
466
  error: string | null;
467
467
  status: "ok" | "error";
468
468
  name: string;
469
+ model: string | null;
469
470
  deploymentSlug: string;
470
471
  sessionExternalId: string;
471
472
  startedAt: string;
@@ -473,7 +474,6 @@ declare const SpanInputV2Schema: z.ZodEffects<z.ZodObject<{
473
474
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
474
475
  contractVersion: 2;
475
476
  durationMs: number | null;
476
- model: string | null;
477
477
  provider: string | null;
478
478
  tokensInput: number | null;
479
479
  tokensOutput: number | null;
@@ -548,6 +548,7 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
548
548
  error: string | null;
549
549
  status: "ok" | "error";
550
550
  name: string;
551
+ model: string | null;
551
552
  deploymentSlug: string;
552
553
  sessionExternalId: string;
553
554
  startedAt: string;
@@ -555,7 +556,6 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
555
556
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
556
557
  contractVersion: 2;
557
558
  durationMs: number | null;
558
- model: string | null;
559
559
  provider: string | null;
560
560
  tokensInput: number | null;
561
561
  tokensOutput: number | null;
@@ -575,6 +575,7 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
575
575
  error: string | null;
576
576
  status: "ok" | "error";
577
577
  name: string;
578
+ model: string | null;
578
579
  deploymentSlug: string;
579
580
  sessionExternalId: string;
580
581
  startedAt: string;
@@ -582,7 +583,6 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
582
583
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
583
584
  contractVersion: 2;
584
585
  durationMs: number | null;
585
- model: string | null;
586
586
  provider: string | null;
587
587
  tokensInput: number | null;
588
588
  tokensOutput: number | null;
@@ -602,6 +602,7 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
602
602
  error: string | null;
603
603
  status: "ok" | "error";
604
604
  name: string;
605
+ model: string | null;
605
606
  deploymentSlug: string;
606
607
  sessionExternalId: string;
607
608
  startedAt: string;
@@ -609,7 +610,6 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
609
610
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
610
611
  contractVersion: 2;
611
612
  durationMs: number | null;
612
- model: string | null;
613
613
  provider: string | null;
614
614
  tokensInput: number | null;
615
615
  tokensOutput: number | null;
@@ -629,6 +629,7 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
629
629
  error: string | null;
630
630
  status: "ok" | "error";
631
631
  name: string;
632
+ model: string | null;
632
633
  deploymentSlug: string;
633
634
  sessionExternalId: string;
634
635
  startedAt: string;
@@ -636,7 +637,6 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
636
637
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
637
638
  contractVersion: 2;
638
639
  durationMs: number | null;
639
- model: string | null;
640
640
  provider: string | null;
641
641
  tokensInput: number | null;
642
642
  tokensOutput: number | null;
@@ -706,12 +706,12 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
706
706
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
707
707
  error?: string | undefined;
708
708
  name?: string | undefined;
709
+ model?: string | undefined;
709
710
  turnIndex?: number | undefined;
710
711
  startedAt?: string | undefined;
711
712
  endedAt?: string | undefined;
712
713
  contractVersion?: 1 | undefined;
713
714
  durationMs?: number | undefined;
714
- model?: string | undefined;
715
715
  provider?: string | undefined;
716
716
  tokensInput?: number | undefined;
717
717
  tokensOutput?: number | undefined;
@@ -725,12 +725,12 @@ declare const SpanInputSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
725
725
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
726
726
  error?: string | undefined;
727
727
  name?: string | undefined;
728
+ model?: string | undefined;
728
729
  turnIndex?: number | undefined;
729
730
  startedAt?: string | undefined;
730
731
  endedAt?: string | undefined;
731
732
  contractVersion?: 1 | undefined;
732
733
  durationMs?: number | undefined;
733
- model?: string | undefined;
734
734
  provider?: string | undefined;
735
735
  tokensInput?: number | undefined;
736
736
  tokensOutput?: number | undefined;
@@ -802,6 +802,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
802
802
  error: string | null;
803
803
  status: "ok" | "error";
804
804
  name: string;
805
+ model: string | null;
805
806
  deploymentSlug: string;
806
807
  sessionExternalId: string;
807
808
  startedAt: string;
@@ -809,7 +810,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
809
810
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
810
811
  contractVersion: 2;
811
812
  durationMs: number | null;
812
- model: string | null;
813
813
  provider: string | null;
814
814
  tokensInput: number | null;
815
815
  tokensOutput: number | null;
@@ -829,6 +829,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
829
829
  error: string | null;
830
830
  status: "ok" | "error";
831
831
  name: string;
832
+ model: string | null;
832
833
  deploymentSlug: string;
833
834
  sessionExternalId: string;
834
835
  startedAt: string;
@@ -836,7 +837,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
836
837
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
837
838
  contractVersion: 2;
838
839
  durationMs: number | null;
839
- model: string | null;
840
840
  provider: string | null;
841
841
  tokensInput: number | null;
842
842
  tokensOutput: number | null;
@@ -856,6 +856,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
856
856
  error: string | null;
857
857
  status: "ok" | "error";
858
858
  name: string;
859
+ model: string | null;
859
860
  deploymentSlug: string;
860
861
  sessionExternalId: string;
861
862
  startedAt: string;
@@ -863,7 +864,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
863
864
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
864
865
  contractVersion: 2;
865
866
  durationMs: number | null;
866
- model: string | null;
867
867
  provider: string | null;
868
868
  tokensInput: number | null;
869
869
  tokensOutput: number | null;
@@ -883,6 +883,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
883
883
  error: string | null;
884
884
  status: "ok" | "error";
885
885
  name: string;
886
+ model: string | null;
886
887
  deploymentSlug: string;
887
888
  sessionExternalId: string;
888
889
  startedAt: string;
@@ -890,7 +891,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
890
891
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
891
892
  contractVersion: 2;
892
893
  durationMs: number | null;
893
- model: string | null;
894
894
  provider: string | null;
895
895
  tokensInput: number | null;
896
896
  tokensOutput: number | null;
@@ -960,12 +960,12 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
960
960
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
961
961
  error?: string | undefined;
962
962
  name?: string | undefined;
963
+ model?: string | undefined;
963
964
  turnIndex?: number | undefined;
964
965
  startedAt?: string | undefined;
965
966
  endedAt?: string | undefined;
966
967
  contractVersion?: 1 | undefined;
967
968
  durationMs?: number | undefined;
968
- model?: string | undefined;
969
969
  provider?: string | undefined;
970
970
  tokensInput?: number | undefined;
971
971
  tokensOutput?: number | undefined;
@@ -979,12 +979,12 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
979
979
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
980
980
  error?: string | undefined;
981
981
  name?: string | undefined;
982
+ model?: string | undefined;
982
983
  turnIndex?: number | undefined;
983
984
  startedAt?: string | undefined;
984
985
  endedAt?: string | undefined;
985
986
  contractVersion?: 1 | undefined;
986
987
  durationMs?: number | undefined;
987
- model?: string | undefined;
988
988
  provider?: string | undefined;
989
989
  tokensInput?: number | undefined;
990
990
  tokensOutput?: number | undefined;
@@ -1018,12 +1018,12 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1018
1018
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1019
1019
  error?: string | undefined;
1020
1020
  name?: string | undefined;
1021
+ model?: string | undefined;
1021
1022
  turnIndex?: number | undefined;
1022
1023
  startedAt?: string | undefined;
1023
1024
  endedAt?: string | undefined;
1024
1025
  contractVersion?: 1 | undefined;
1025
1026
  durationMs?: number | undefined;
1026
- model?: string | undefined;
1027
1027
  provider?: string | undefined;
1028
1028
  tokensInput?: number | undefined;
1029
1029
  tokensOutput?: number | undefined;
@@ -1035,6 +1035,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1035
1035
  error: string | null;
1036
1036
  status: "ok" | "error";
1037
1037
  name: string;
1038
+ model: string | null;
1038
1039
  deploymentSlug: string;
1039
1040
  sessionExternalId: string;
1040
1041
  startedAt: string;
@@ -1042,7 +1043,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1042
1043
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1043
1044
  contractVersion: 2;
1044
1045
  durationMs: number | null;
1045
- model: string | null;
1046
1046
  provider: string | null;
1047
1047
  tokensInput: number | null;
1048
1048
  tokensOutput: number | null;
@@ -1071,12 +1071,12 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1071
1071
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1072
1072
  error?: string | undefined;
1073
1073
  name?: string | undefined;
1074
+ model?: string | undefined;
1074
1075
  turnIndex?: number | undefined;
1075
1076
  startedAt?: string | undefined;
1076
1077
  endedAt?: string | undefined;
1077
1078
  contractVersion?: 1 | undefined;
1078
1079
  durationMs?: number | undefined;
1079
- model?: string | undefined;
1080
1080
  provider?: string | undefined;
1081
1081
  tokensInput?: number | undefined;
1082
1082
  tokensOutput?: number | undefined;
@@ -1088,6 +1088,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1088
1088
  error: string | null;
1089
1089
  status: "ok" | "error";
1090
1090
  name: string;
1091
+ model: string | null;
1091
1092
  deploymentSlug: string;
1092
1093
  sessionExternalId: string;
1093
1094
  startedAt: string;
@@ -1095,7 +1096,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1095
1096
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1096
1097
  contractVersion: 2;
1097
1098
  durationMs: number | null;
1098
- model: string | null;
1099
1099
  provider: string | null;
1100
1100
  tokensInput: number | null;
1101
1101
  tokensOutput: number | null;
@@ -1124,12 +1124,12 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1124
1124
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1125
1125
  error?: string | undefined;
1126
1126
  name?: string | undefined;
1127
+ model?: string | undefined;
1127
1128
  turnIndex?: number | undefined;
1128
1129
  startedAt?: string | undefined;
1129
1130
  endedAt?: string | undefined;
1130
1131
  contractVersion?: 1 | undefined;
1131
1132
  durationMs?: number | undefined;
1132
- model?: string | undefined;
1133
1133
  provider?: string | undefined;
1134
1134
  tokensInput?: number | undefined;
1135
1135
  tokensOutput?: number | undefined;
@@ -1141,6 +1141,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1141
1141
  error: string | null;
1142
1142
  status: "ok" | "error";
1143
1143
  name: string;
1144
+ model: string | null;
1144
1145
  deploymentSlug: string;
1145
1146
  sessionExternalId: string;
1146
1147
  startedAt: string;
@@ -1148,7 +1149,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1148
1149
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1149
1150
  contractVersion: 2;
1150
1151
  durationMs: number | null;
1151
- model: string | null;
1152
1152
  provider: string | null;
1153
1153
  tokensInput: number | null;
1154
1154
  tokensOutput: number | null;
@@ -1177,12 +1177,12 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1177
1177
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1178
1178
  error?: string | undefined;
1179
1179
  name?: string | undefined;
1180
+ model?: string | undefined;
1180
1181
  turnIndex?: number | undefined;
1181
1182
  startedAt?: string | undefined;
1182
1183
  endedAt?: string | undefined;
1183
1184
  contractVersion?: 1 | undefined;
1184
1185
  durationMs?: number | undefined;
1185
- model?: string | undefined;
1186
1186
  provider?: string | undefined;
1187
1187
  tokensInput?: number | undefined;
1188
1188
  tokensOutput?: number | undefined;
@@ -1194,6 +1194,7 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1194
1194
  error: string | null;
1195
1195
  status: "ok" | "error";
1196
1196
  name: string;
1197
+ model: string | null;
1197
1198
  deploymentSlug: string;
1198
1199
  sessionExternalId: string;
1199
1200
  startedAt: string;
@@ -1201,7 +1202,6 @@ declare const SpansBatchSchema: z.ZodEffects<z.ZodObject<{
1201
1202
  spanType: "tool_call" | "custom" | "agent_call" | "llm_call" | "framework_step";
1202
1203
  contractVersion: 2;
1203
1204
  durationMs: number | null;
1204
- model: string | null;
1205
1205
  provider: string | null;
1206
1206
  tokensInput: number | null;
1207
1207
  tokensOutput: number | null;
@@ -2380,7 +2380,7 @@ declare const DEFAULT_FIELD_ENDPOINT = "https://api.cultured.computer";
2380
2380
  * profile read. A refusal with no code (a 401, a 403 for a key that lacks a
2381
2381
  * permission, a 413) carries `code: null`.
2382
2382
  */
2383
- declare const FIELD_REFUSAL_CODES: readonly ["invalid_body", "forbidden", "not_enabled", "no_such_profile", "no_such_endpoint", "no_such_conversation", "conversation_unknown", "archived", "revoked", "link_inactive", "conversation_conflict", "opening_forbidden", "opening_conflict", "runtime_forbidden", "invalid_reasoning_effort", "invalid_max_output_tokens", "conversation_ended", "no_live_version", "no_owner", "model_unavailable", "daily_cap", "link_session_cap", "rate_limited", "turn_cap", "stale_turn_index", "record_gap", "busy", "interrupted", "not_connected", "budget", "provider_error", "provider_timeout", "turn_failed", "request_unknown", "request_conflict", "request_pending", "request_interrupted", "replay_expired", "put_in_progress", "scene_live", "precondition_failed", "invalid_consent", "invalid_safeguards", "invalid_scrub", "invalid_fallback", "invalid_scene", "not_a_soul_md", "not_a_scene"];
2383
+ declare const FIELD_REFUSAL_CODES: readonly ["invalid_body", "forbidden", "not_enabled", "no_such_profile", "no_such_endpoint", "no_such_conversation", "conversation_unknown", "archived", "revoked", "link_inactive", "conversation_conflict", "opening_forbidden", "opening_conflict", "runtime_forbidden", "invalid_reasoning_effort", "invalid_max_output_tokens", "invalid_reply_check", "conversation_ended", "no_live_version", "no_owner", "model_unavailable", "daily_cap", "link_session_cap", "rate_limited", "turn_cap", "stale_turn_index", "record_gap", "busy", "interrupted", "not_connected", "budget", "provider_error", "provider_timeout", "turn_failed", "request_unknown", "request_conflict", "request_pending", "request_interrupted", "replay_expired", "put_in_progress", "scene_live", "precondition_failed", "invalid_consent", "invalid_safeguards", "invalid_scrub", "invalid_fallback", "invalid_scene", "not_a_soul_md", "not_a_scene"];
2384
2384
  type FieldRefusalCode = (typeof FIELD_REFUSAL_CODES)[number];
2385
2385
  /**
2386
2386
  * The reasoning efforts a profile or a conversation can ask for. `none`
package/dist/index.js CHANGED
@@ -2458,6 +2458,7 @@ var UserOutcomeSchema = z.object({
2458
2458
  /** Thumbs-up / thumbs-down widget value. */
2459
2459
  thumbs: z.enum(["up", "down"]).optional()
2460
2460
  });
2461
+ var REPLIES_BY = ["model", "person"];
2461
2462
  var TurnInputSchema = z.object({
2462
2463
  deploymentSlug: z.string().min(1),
2463
2464
  sessionExternalId: z.string().min(1),
@@ -2565,6 +2566,16 @@ var TurnInputSchema = z.object({
2565
2566
  * `metadata` key so it has a durable landing place.
2566
2567
  */
2567
2568
  clientContext: z.record(z.string(), z.unknown()).optional(),
2569
+ /**
2570
+ * Who writes the replies of this session: a model (the default) or a
2571
+ * person, as in a call between two people where one of them is the
2572
+ * agent. Session context like openedVia: it rides the first turn, the
2573
+ * worker writes it on the session at create (sessions.subject_type,
2574
+ * 'agent' or 'human') and ignores it on later turns. A session that
2575
+ * says a person replies carries no served model, and a judge run reads
2576
+ * that as a declaration, never as a model that went unrecorded.
2577
+ */
2578
+ repliesBy: z.enum(REPLIES_BY).optional(),
2568
2579
  payload: z.record(z.string(), z.unknown())
2569
2580
  });
2570
2581
  var SessionEndSchema2 = z.object({
@@ -3770,6 +3781,7 @@ var FIELD_REFUSAL_CODES = [
3770
3781
  "runtime_forbidden",
3771
3782
  "invalid_reasoning_effort",
3772
3783
  "invalid_max_output_tokens",
3784
+ "invalid_reply_check",
3773
3785
  "conversation_ended",
3774
3786
  "no_live_version",
3775
3787
  "no_owner",