@felspar/sdk 0.4.0 → 0.4.2

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,41 +1,5 @@
1
1
  import { z } from "zod";
2
- declare const FelsparCaseSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- mode: z.ZodEnum<{
5
- provided: "provided";
6
- fields: "fields";
7
- content: "content";
8
- issued: "issued";
9
- }>;
10
- }, z.core.$strip>;
11
- declare const FelsparRelatedSchema: z.ZodObject<{
12
- relationship: z.ZodString;
13
- subject: z.ZodString;
14
- id: z.ZodString;
15
- questions: z.ZodArray<z.ZodString>;
16
- }, z.core.$strip>;
17
- declare const FelsparResultSubjectSchema: z.ZodObject<{
18
- type: z.ZodString;
19
- id: z.ZodString;
20
- related: z.ZodArray<z.ZodObject<{
21
- relationship: z.ZodString;
22
- subject: z.ZodString;
23
- id: z.ZodString;
24
- questions: z.ZodArray<z.ZodString>;
25
- }, z.core.$strip>>;
26
- }, z.core.$strip>;
27
- declare const FelsparEscalationSchema: z.ZodObject<{
28
- id: z.ZodString;
29
- trigger: z.ZodEnum<{
30
- outcome: "outcome";
31
- unresolved: "unresolved";
32
- attempt_limit: "attempt_limit";
33
- }>;
34
- why: z.ZodObject<{
35
- text: z.ZodString;
36
- }, z.core.$loose>;
37
- }, z.core.$strip>;
38
- declare const FelsparJobResultSchema: z.ZodObject<{
2
+ declare const FelsparJobResultSchema: z.ZodUnion<readonly [z.ZodObject<{
39
3
  status: z.ZodString;
40
4
  reason: z.ZodNullable<z.ZodString>;
41
5
  result: z.ZodNullable<z.ZodObject<{
@@ -78,12 +42,66 @@ declare const FelsparJobResultSchema: z.ZodObject<{
78
42
  }, z.core.$strip>>;
79
43
  missing: z.ZodOptional<z.ZodArray<z.ZodString>>;
80
44
  }, z.core.$loose>>;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ status: z.ZodLiteral<"gap">;
47
+ reason: z.ZodLiteral<"related_subject_missing">;
48
+ result: z.ZodObject<{
49
+ subject: z.ZodOptional<z.ZodObject<{
50
+ type: z.ZodString;
51
+ id: z.ZodString;
52
+ related: z.ZodArray<z.ZodObject<{
53
+ relationship: z.ZodString;
54
+ subject: z.ZodString;
55
+ id: z.ZodString;
56
+ questions: z.ZodArray<z.ZodString>;
57
+ }, z.core.$strip>>;
58
+ }, z.core.$strip>>;
59
+ escalation: z.ZodOptional<z.ZodObject<{
60
+ id: z.ZodString;
61
+ trigger: z.ZodEnum<{
62
+ outcome: "outcome";
63
+ unresolved: "unresolved";
64
+ attempt_limit: "attempt_limit";
65
+ }>;
66
+ why: z.ZodObject<{
67
+ text: z.ZodString;
68
+ }, z.core.$loose>;
69
+ }, z.core.$strip>>;
70
+ releaseId: z.ZodString;
71
+ executionId: z.ZodString;
72
+ releaseDigest: z.ZodString;
73
+ case: z.ZodOptional<z.ZodObject<{
74
+ id: z.ZodString;
75
+ mode: z.ZodEnum<{
76
+ provided: "provided";
77
+ fields: "fields";
78
+ content: "content";
79
+ issued: "issued";
80
+ }>;
81
+ }, z.core.$strip>>;
82
+ outcome: z.ZodNull;
83
+ receipt: z.ZodNull;
84
+ missing: z.ZodArray<z.ZodString>;
85
+ explanation: z.ZodObject<{
86
+ needs: z.ZodArray<z.ZodObject<{
87
+ key: z.ZodString;
88
+ status: z.ZodLiteral<"missing">;
89
+ reasons: z.ZodArray<z.ZodString>;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>;
92
+ }, z.core.$loose>;
93
+ }, z.core.$strip>]>;
94
+ declare const FelsparJobListSchema: z.ZodObject<{
95
+ jobs: z.ZodArray<z.ZodObject<{
96
+ id: z.ZodString;
97
+ }, z.core.$strip>>;
81
98
  }, z.core.$strip>;
82
99
  export type FelsparJobResult = z.infer<typeof FelsparJobResultSchema>;
83
- export type FelsparJobCase = z.infer<typeof FelsparCaseSchema>;
84
- export type FelsparRelatedRecord = z.infer<typeof FelsparRelatedSchema>;
85
- export type FelsparResultSubject = z.infer<typeof FelsparResultSubjectSchema>;
86
- export type FelsparJobEscalation = z.infer<typeof FelsparEscalationSchema>;
100
+ type JobResultFields = NonNullable<FelsparJobResult["result"]>;
101
+ export type FelsparJobCase = NonNullable<JobResultFields["case"]>;
102
+ export type FelsparRelatedRecord = FelsparResultSubject["related"][number];
103
+ export type FelsparResultSubject = NonNullable<JobResultFields["subject"]>;
104
+ export type FelsparJobEscalation = NonNullable<JobResultFields["escalation"]>;
87
105
  interface QuotedWords {
88
106
  text: string;
89
107
  }
@@ -126,11 +144,6 @@ export interface FelsparFactsRequest {
126
144
  related?: Record<string, string | string[]>;
127
145
  facts: Record<string, unknown>;
128
146
  }
129
- declare const FelsparJobListSchema: z.ZodObject<{
130
- jobs: z.ZodArray<z.ZodObject<{
131
- id: z.ZodString;
132
- }, z.core.$strip>>;
133
- }, z.core.$strip>;
134
147
  export type FelsparJobList = z.infer<typeof FelsparJobListSchema>;
135
148
  declare const refusalSchema: z.ZodPipe<z.ZodObject<{
136
149
  error: z.ZodString;
@@ -147,7 +160,7 @@ declare const refusalSchema: z.ZodPipe<z.ZodObject<{
147
160
  code: string;
148
161
  path: string[];
149
162
  }[] | undefined;
150
- recovery?: "escalate" | "fix_input" | "retry";
163
+ recovery?: "retry" | "escalate" | "fix_input";
151
164
  fix?: string;
152
165
  escalation?: {
153
166
  id: string;
@@ -258,7 +271,7 @@ export declare function createHostedFelsparClient(configuration: {
258
271
  answer: {
259
272
  send: "text" | "text_or_value";
260
273
  valueFormat: "number" | "calendar-date" | null;
261
- interpretation: "classified" | "exact_read" | "unsupported";
274
+ interpretation: "unsupported" | "classified" | "exact_read";
262
275
  threshold: number | null;
263
276
  applies: "always" | "conditional";
264
277
  dependsOn: string[];
@@ -494,37 +507,65 @@ export declare function createHostedFelsparClient(configuration: {
494
507
  text: string;
495
508
  source: {
496
509
  class: string;
497
- id: string;
498
510
  observedAt: string;
511
+ id?: string | undefined;
512
+ manual?: true | undefined;
513
+ suppliedBy?: string | undefined;
514
+ by?: string | undefined;
515
+ stamped?: true | undefined;
499
516
  revision?: string | undefined;
500
517
  locator?: string | undefined;
501
518
  sensitivity?: string | undefined;
502
519
  };
503
520
  about?: string | undefined;
504
521
  } | {
522
+ value: string | number | boolean;
523
+ source: {
524
+ class: string;
525
+ observedAt: string;
526
+ excerpt?: string | undefined;
527
+ id?: string | undefined;
528
+ manual?: true | undefined;
529
+ suppliedBy?: string | undefined;
530
+ by?: string | undefined;
531
+ stamped?: true | undefined;
532
+ revision?: string | undefined;
533
+ locator?: string | undefined;
534
+ sensitivity?: string | undefined;
535
+ };
536
+ about?: string | undefined;
537
+ } | ({
505
538
  text: string;
506
539
  source: {
507
540
  class: string;
508
- id: string;
509
541
  observedAt: string;
542
+ id?: string | undefined;
543
+ manual?: true | undefined;
544
+ suppliedBy?: string | undefined;
545
+ by?: string | undefined;
546
+ stamped?: true | undefined;
510
547
  revision?: string | undefined;
511
548
  locator?: string | undefined;
512
549
  sensitivity?: string | undefined;
513
550
  };
514
551
  about?: string | undefined;
515
- }[] | {
552
+ } | {
516
553
  value: string | number | boolean;
517
554
  source: {
518
555
  class: string;
519
- id: string;
520
556
  observedAt: string;
557
+ excerpt?: string | undefined;
558
+ id?: string | undefined;
559
+ manual?: true | undefined;
560
+ suppliedBy?: string | undefined;
561
+ by?: string | undefined;
562
+ stamped?: true | undefined;
521
563
  revision?: string | undefined;
522
564
  locator?: string | undefined;
523
565
  sensitivity?: string | undefined;
524
- excerpt?: string | undefined;
525
566
  };
526
567
  about?: string | undefined;
527
- }>;
568
+ })[]>;
528
569
  related?: Record<string, string | string[]> | undefined;
529
570
  identity?: Record<string, string> | undefined;
530
571
  } | null;
@@ -658,6 +699,10 @@ export declare function createHostedFelsparClient(configuration: {
658
699
  }[] | undefined;
659
700
  question?: string | undefined;
660
701
  } | undefined;
702
+ manualFacts?: {
703
+ allowed: false;
704
+ quote: string;
705
+ } | undefined;
661
706
  escalations?: {
662
707
  routes: {
663
708
  id: string;
@@ -1139,8 +1184,8 @@ export declare function createHostedFelsparClient(configuration: {
1139
1184
  contentDigest: string;
1140
1185
  };
1141
1186
  minimumSelectedProbability: number;
1142
- probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1";
1143
- inputContextContract?: "job-entity-time/v1" | "job-only/v2" | undefined;
1187
+ probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1" | "independent-option-support/v1";
1188
+ inputContextContract?: "job-entity-time/v1" | "job-only/v2" | "job-only/v3" | "job-only/v4" | undefined;
1144
1189
  };
1145
1190
  }[];
1146
1191
  normalizationContract?: "felspar.conditional-enum-normalization/v1" | undefined;
@@ -1633,6 +1678,8 @@ export declare function createHostedFelsparClient(configuration: {
1633
1678
  scope: {
1634
1679
  entityId: string;
1635
1680
  evaluationTime: string;
1681
+ valueAgreement?: "outcome-regions" | undefined;
1682
+ freshness?: "stale-before-review" | undefined;
1636
1683
  };
1637
1684
  expected: {
1638
1685
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -1655,11 +1702,15 @@ export declare function createHostedFelsparClient(configuration: {
1655
1702
  facts: {
1656
1703
  key: string;
1657
1704
  value: string | number | boolean;
1705
+ held?: "stale" | "review" | undefined;
1706
+ conflictsWith?: string | number | boolean | undefined;
1658
1707
  }[];
1659
1708
  id: string;
1660
1709
  scope: {
1661
1710
  entityId: string;
1662
1711
  evaluationTime: string;
1712
+ valueAgreement?: "outcome-regions" | undefined;
1713
+ freshness?: "stale-before-review" | undefined;
1663
1714
  };
1664
1715
  expected: {
1665
1716
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2007,6 +2058,8 @@ export declare function createHostedFelsparClient(configuration: {
2007
2058
  scope: {
2008
2059
  entityId: string;
2009
2060
  evaluationTime: string;
2061
+ valueAgreement?: "outcome-regions" | undefined;
2062
+ freshness?: "stale-before-review" | undefined;
2010
2063
  };
2011
2064
  trustDomain: string;
2012
2065
  expectedArtifactDigest: string;
@@ -2111,6 +2164,8 @@ export declare function createHostedFelsparClient(configuration: {
2111
2164
  scope: {
2112
2165
  entityId: string;
2113
2166
  evaluationTime: string;
2167
+ valueAgreement?: "outcome-regions" | undefined;
2168
+ freshness?: "stale-before-review" | undefined;
2114
2169
  };
2115
2170
  expected: {
2116
2171
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2133,11 +2188,15 @@ export declare function createHostedFelsparClient(configuration: {
2133
2188
  facts: {
2134
2189
  key: string;
2135
2190
  value: string | number | boolean;
2191
+ held?: "stale" | "review" | undefined;
2192
+ conflictsWith?: string | number | boolean | undefined;
2136
2193
  }[];
2137
2194
  id: string;
2138
2195
  scope: {
2139
2196
  entityId: string;
2140
2197
  evaluationTime: string;
2198
+ valueAgreement?: "outcome-regions" | undefined;
2199
+ freshness?: "stale-before-review" | undefined;
2141
2200
  };
2142
2201
  expected: {
2143
2202
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2678,8 +2737,8 @@ export declare function createHostedFelsparClient(configuration: {
2678
2737
  contentDigest: string;
2679
2738
  };
2680
2739
  minimumSelectedProbability: number;
2681
- probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1";
2682
- inputContextContract?: "job-entity-time/v1" | "job-only/v2" | undefined;
2740
+ probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1" | "independent-option-support/v1";
2741
+ inputContextContract?: "job-entity-time/v1" | "job-only/v2" | "job-only/v3" | "job-only/v4" | undefined;
2683
2742
  };
2684
2743
  expectedEvaluatorContractDigest: string;
2685
2744
  answerType?: "boolean" | undefined;
@@ -3040,6 +3099,8 @@ export declare function createHostedFelsparClient(configuration: {
3040
3099
  scope: {
3041
3100
  entityId: string;
3042
3101
  evaluationTime: string;
3102
+ valueAgreement?: "outcome-regions" | undefined;
3103
+ freshness?: "stale-before-review" | undefined;
3043
3104
  };
3044
3105
  trustDomain: string;
3045
3106
  expectedArtifactDigest: string;
@@ -3144,6 +3205,8 @@ export declare function createHostedFelsparClient(configuration: {
3144
3205
  scope: {
3145
3206
  entityId: string;
3146
3207
  evaluationTime: string;
3208
+ valueAgreement?: "outcome-regions" | undefined;
3209
+ freshness?: "stale-before-review" | undefined;
3147
3210
  };
3148
3211
  expected: {
3149
3212
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -3166,11 +3229,15 @@ export declare function createHostedFelsparClient(configuration: {
3166
3229
  facts: {
3167
3230
  key: string;
3168
3231
  value: string | number | boolean;
3232
+ held?: "stale" | "review" | undefined;
3233
+ conflictsWith?: string | number | boolean | undefined;
3169
3234
  }[];
3170
3235
  id: string;
3171
3236
  scope: {
3172
3237
  entityId: string;
3173
3238
  evaluationTime: string;
3239
+ valueAgreement?: "outcome-regions" | undefined;
3240
+ freshness?: "stale-before-review" | undefined;
3174
3241
  };
3175
3242
  expected: {
3176
3243
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -3711,8 +3778,8 @@ export declare function createHostedFelsparClient(configuration: {
3711
3778
  contentDigest: string;
3712
3779
  };
3713
3780
  minimumSelectedProbability: number;
3714
- probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1";
3715
- inputContextContract?: "job-entity-time/v1" | "job-only/v2" | undefined;
3781
+ probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1" | "independent-option-support/v1";
3782
+ inputContextContract?: "job-entity-time/v1" | "job-only/v2" | "job-only/v3" | "job-only/v4" | undefined;
3716
3783
  };
3717
3784
  expectedEvaluatorContractDigest: string;
3718
3785
  answerType?: "boolean" | undefined;
@@ -3749,6 +3816,18 @@ export declare function createHostedFelsparClient(configuration: {
3749
3816
  policyDigest: string;
3750
3817
  fixtureSuiteDigest: string;
3751
3818
  } | undefined;
3819
+ calibration?: {
3820
+ savedResultId: string;
3821
+ calibrationDigest: string;
3822
+ questions: string[];
3823
+ acceptedBy: string;
3824
+ approvedMaterialDigest: string;
3825
+ bars: {
3826
+ question: string;
3827
+ bar: number;
3828
+ calibrationDigest: string;
3829
+ }[];
3830
+ } | undefined;
3752
3831
  }>;
3753
3832
  describeJob: (id: string, job: string) => Promise<{
3754
3833
  schema: "felspar.hosted-job-description.draft/v0";
@@ -3816,7 +3895,7 @@ export declare function createHostedFelsparClient(configuration: {
3816
3895
  answer: {
3817
3896
  send: "text" | "text_or_value";
3818
3897
  valueFormat: "number" | "calendar-date" | null;
3819
- interpretation: "classified" | "exact_read" | "unsupported";
3898
+ interpretation: "unsupported" | "classified" | "exact_read";
3820
3899
  threshold: number | null;
3821
3900
  applies: "always" | "conditional";
3822
3901
  dependsOn: string[];
@@ -4052,37 +4131,65 @@ export declare function createHostedFelsparClient(configuration: {
4052
4131
  text: string;
4053
4132
  source: {
4054
4133
  class: string;
4055
- id: string;
4056
4134
  observedAt: string;
4135
+ id?: string | undefined;
4136
+ manual?: true | undefined;
4137
+ suppliedBy?: string | undefined;
4138
+ by?: string | undefined;
4139
+ stamped?: true | undefined;
4057
4140
  revision?: string | undefined;
4058
4141
  locator?: string | undefined;
4059
4142
  sensitivity?: string | undefined;
4060
4143
  };
4061
4144
  about?: string | undefined;
4062
4145
  } | {
4146
+ value: string | number | boolean;
4147
+ source: {
4148
+ class: string;
4149
+ observedAt: string;
4150
+ excerpt?: string | undefined;
4151
+ id?: string | undefined;
4152
+ manual?: true | undefined;
4153
+ suppliedBy?: string | undefined;
4154
+ by?: string | undefined;
4155
+ stamped?: true | undefined;
4156
+ revision?: string | undefined;
4157
+ locator?: string | undefined;
4158
+ sensitivity?: string | undefined;
4159
+ };
4160
+ about?: string | undefined;
4161
+ } | ({
4063
4162
  text: string;
4064
4163
  source: {
4065
4164
  class: string;
4066
- id: string;
4067
4165
  observedAt: string;
4166
+ id?: string | undefined;
4167
+ manual?: true | undefined;
4168
+ suppliedBy?: string | undefined;
4169
+ by?: string | undefined;
4170
+ stamped?: true | undefined;
4068
4171
  revision?: string | undefined;
4069
4172
  locator?: string | undefined;
4070
4173
  sensitivity?: string | undefined;
4071
4174
  };
4072
4175
  about?: string | undefined;
4073
- }[] | {
4176
+ } | {
4074
4177
  value: string | number | boolean;
4075
4178
  source: {
4076
4179
  class: string;
4077
- id: string;
4078
4180
  observedAt: string;
4181
+ excerpt?: string | undefined;
4182
+ id?: string | undefined;
4183
+ manual?: true | undefined;
4184
+ suppliedBy?: string | undefined;
4185
+ by?: string | undefined;
4186
+ stamped?: true | undefined;
4079
4187
  revision?: string | undefined;
4080
4188
  locator?: string | undefined;
4081
4189
  sensitivity?: string | undefined;
4082
- excerpt?: string | undefined;
4083
4190
  };
4084
4191
  about?: string | undefined;
4085
- }>;
4192
+ })[]>;
4086
4193
  related?: Record<string, string | string[]> | undefined;
4087
4194
  identity?: Record<string, string> | undefined;
4088
4195
  } | null;
@@ -4216,6 +4323,10 @@ export declare function createHostedFelsparClient(configuration: {
4216
4323
  }[] | undefined;
4217
4324
  question?: string | undefined;
4218
4325
  } | undefined;
4326
+ manualFacts?: {
4327
+ allowed: false;
4328
+ quote: string;
4329
+ } | undefined;
4219
4330
  escalations?: {
4220
4331
  routes: {
4221
4332
  id: string;
@@ -4265,6 +4376,7 @@ export declare function createHostedFelsparClient(configuration: {
4265
4376
  entityId: string;
4266
4377
  releaseId: string;
4267
4378
  outcome: string | null;
4379
+ environment?: "staging" | "production" | undefined;
4268
4380
  case?: {
4269
4381
  id: string;
4270
4382
  mode: "provided" | "fields" | "content" | "issued";
@@ -4282,7 +4394,171 @@ export declare function createHostedFelsparClient(configuration: {
4282
4394
  id: string;
4283
4395
  trigger: "outcome" | "unresolved" | "attempt_limit";
4284
4396
  } | undefined;
4397
+ manualFacts?: {
4398
+ question: string;
4399
+ excerpt: number;
4400
+ via: {
4401
+ principal: string;
4402
+ agent: {
4403
+ name: string;
4404
+ accountable: string;
4405
+ } | null;
4406
+ };
4407
+ observedAt: string;
4408
+ stampedByFelspar: boolean;
4409
+ suppliedBy?: {
4410
+ text: string;
4411
+ verified: false;
4412
+ } | undefined;
4413
+ }[] | undefined;
4414
+ caseRecord?: {
4415
+ rule: "whole-case";
4416
+ attempt: number;
4417
+ attempts: {
4418
+ executionId: string;
4419
+ added: string[];
4420
+ considered: boolean;
4421
+ }[];
4422
+ } | undefined;
4285
4423
  } | undefined;
4286
4424
  }>;
4425
+ getReleaseGraph: (id: string) => Promise<{
4426
+ topologyDigest: string;
4427
+ graph: {
4428
+ nodes: {
4429
+ id: string;
4430
+ kind: "outcome" | "rule" | "unresolved" | "scoring" | "question" | "subject" | "escalation" | "attempts" | "selection" | "retry" | "score_criterion";
4431
+ key: string;
4432
+ lines: string[];
4433
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
4434
+ }[];
4435
+ edges: {
4436
+ from: string;
4437
+ to: string;
4438
+ kind: "unresolved" | "overrides" | "retry" | "asks" | "depends_on" | "considers" | "selects" | "escalates" | "scores";
4439
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
4440
+ }[];
4441
+ };
4442
+ mermaid: string;
4443
+ receiptDigest: string | null;
4444
+ evaluationTime: string | null;
4445
+ attempt: {
4446
+ schema: "felspar.decision-attempt/v1";
4447
+ executionId: string;
4448
+ releaseId: string;
4449
+ receiptDigest: string;
4450
+ ordinal: number;
4451
+ next: "decided" | "retry" | "escalate";
4452
+ remaining: number;
4453
+ escalationId: string | null;
4454
+ } | null;
4455
+ jobId: string;
4456
+ releaseId: string;
4457
+ releaseDigest: string;
4458
+ materialDigest: string;
4459
+ schema: "felspar.decision-graph/v1";
4460
+ status: "ready";
4461
+ view: "proposal" | "release" | "run";
4462
+ proposalId?: string | undefined;
4463
+ executionObjectId?: string | undefined;
4464
+ dashboardUrl?: string | undefined;
4465
+ } | {
4466
+ schema: "felspar.decision-graph/v1";
4467
+ status: "unavailable";
4468
+ reason: "history_unavailable" | "graph_limit_exceeded" | "unsupported_material" | "replay_mismatch";
4469
+ dashboardUrl?: string | undefined;
4470
+ }>;
4471
+ getProposalGraph: (id: string) => Promise<{
4472
+ topologyDigest: string;
4473
+ graph: {
4474
+ nodes: {
4475
+ id: string;
4476
+ kind: "outcome" | "rule" | "unresolved" | "scoring" | "question" | "subject" | "escalation" | "attempts" | "selection" | "retry" | "score_criterion";
4477
+ key: string;
4478
+ lines: string[];
4479
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
4480
+ }[];
4481
+ edges: {
4482
+ from: string;
4483
+ to: string;
4484
+ kind: "unresolved" | "overrides" | "retry" | "asks" | "depends_on" | "considers" | "selects" | "escalates" | "scores";
4485
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
4486
+ }[];
4487
+ };
4488
+ mermaid: string;
4489
+ receiptDigest: string | null;
4490
+ evaluationTime: string | null;
4491
+ attempt: {
4492
+ schema: "felspar.decision-attempt/v1";
4493
+ executionId: string;
4494
+ releaseId: string;
4495
+ receiptDigest: string;
4496
+ ordinal: number;
4497
+ next: "decided" | "retry" | "escalate";
4498
+ remaining: number;
4499
+ escalationId: string | null;
4500
+ } | null;
4501
+ jobId: string;
4502
+ releaseId: string;
4503
+ releaseDigest: string;
4504
+ materialDigest: string;
4505
+ schema: "felspar.decision-graph/v1";
4506
+ status: "ready";
4507
+ view: "proposal" | "release" | "run";
4508
+ proposalId?: string | undefined;
4509
+ executionObjectId?: string | undefined;
4510
+ dashboardUrl?: string | undefined;
4511
+ } | {
4512
+ schema: "felspar.decision-graph/v1";
4513
+ status: "unavailable";
4514
+ reason: "history_unavailable" | "graph_limit_exceeded" | "unsupported_material" | "replay_mismatch";
4515
+ dashboardUrl?: string | undefined;
4516
+ }>;
4517
+ getDecisionGraph: (executionObjectId: string) => Promise<{
4518
+ topologyDigest: string;
4519
+ graph: {
4520
+ nodes: {
4521
+ id: string;
4522
+ kind: "outcome" | "rule" | "unresolved" | "scoring" | "question" | "subject" | "escalation" | "attempts" | "selection" | "retry" | "score_criterion";
4523
+ key: string;
4524
+ lines: string[];
4525
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
4526
+ }[];
4527
+ edges: {
4528
+ from: string;
4529
+ to: string;
4530
+ kind: "unresolved" | "overrides" | "retry" | "asks" | "depends_on" | "considers" | "selects" | "escalates" | "scores";
4531
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
4532
+ }[];
4533
+ };
4534
+ mermaid: string;
4535
+ receiptDigest: string | null;
4536
+ evaluationTime: string | null;
4537
+ attempt: {
4538
+ schema: "felspar.decision-attempt/v1";
4539
+ executionId: string;
4540
+ releaseId: string;
4541
+ receiptDigest: string;
4542
+ ordinal: number;
4543
+ next: "decided" | "retry" | "escalate";
4544
+ remaining: number;
4545
+ escalationId: string | null;
4546
+ } | null;
4547
+ jobId: string;
4548
+ releaseId: string;
4549
+ releaseDigest: string;
4550
+ materialDigest: string;
4551
+ schema: "felspar.decision-graph/v1";
4552
+ status: "ready";
4553
+ view: "proposal" | "release" | "run";
4554
+ proposalId?: string | undefined;
4555
+ executionObjectId?: string | undefined;
4556
+ dashboardUrl?: string | undefined;
4557
+ } | {
4558
+ schema: "felspar.decision-graph/v1";
4559
+ status: "unavailable";
4560
+ reason: "history_unavailable" | "graph_limit_exceeded" | "unsupported_material" | "replay_mismatch";
4561
+ dashboardUrl?: string | undefined;
4562
+ }>;
4287
4563
  };
4288
4564
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felspar/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Client and action gate for Felspar, the shared decision system for enterprise agents.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.felspar.ai",