@felspar/sdk 0.4.1 → 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,6 +1,6 @@
1
1
  import {
2
2
  createHostedFelsparClient
3
- } from "./chunk-PYLLH47S.js";
3
+ } from "./chunk-4E64YLWE.js";
4
4
 
5
5
  // src/draft-action-gate-outputs.ts
6
6
  var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -2,7 +2,7 @@ import {
2
2
  denialText,
3
3
  entityIdOf,
4
4
  jobOf
5
- } from "./chunk-SQ62T4AA.js";
5
+ } from "./chunk-FXW4IBGD.js";
6
6
 
7
7
  // src/draft-action-gate-eve.ts
8
8
  function felsparGate(gate) {
@@ -2,8 +2,8 @@ import {
2
2
  denialText,
3
3
  entityIdOf,
4
4
  jobOf
5
- } from "./chunks/chunk-SQ62T4AA.js";
6
- import "./chunks/chunk-PYLLH47S.js";
5
+ } from "./chunks/chunk-FXW4IBGD.js";
6
+ import "./chunks/chunk-4E64YLWE.js";
7
7
 
8
8
  // src/draft-action-gate-claude.ts
9
9
  function felsparPreToolUse(gate) {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  felsparDecisionEvents,
3
3
  felsparGate
4
- } from "./chunks/chunk-WAMWMJYP.js";
5
- import "./chunks/chunk-SQ62T4AA.js";
6
- import "./chunks/chunk-PYLLH47S.js";
4
+ } from "./chunks/chunk-L2EHENY4.js";
5
+ import "./chunks/chunk-FXW4IBGD.js";
6
+ import "./chunks/chunk-4E64YLWE.js";
7
7
  export {
8
8
  felsparDecisionEvents,
9
9
  felsparGate
@@ -2,8 +2,8 @@ import {
2
2
  denialText,
3
3
  entityIdOf,
4
4
  jobOf
5
- } from "./chunks/chunk-SQ62T4AA.js";
6
- import "./chunks/chunk-PYLLH47S.js";
5
+ } from "./chunks/chunk-FXW4IBGD.js";
6
+ import "./chunks/chunk-4E64YLWE.js";
7
7
 
8
8
  // src/draft-action-gate-openai.ts
9
9
  function argumentsOf(text) {
@@ -16,8 +16,8 @@ import {
16
16
  outputCheckFromResult,
17
17
  outputTextDigest,
18
18
  sharedDomains
19
- } from "./chunks/chunk-SQ62T4AA.js";
20
- import "./chunks/chunk-PYLLH47S.js";
19
+ } from "./chunks/chunk-FXW4IBGD.js";
20
+ import "./chunks/chunk-4E64YLWE.js";
21
21
  export {
22
22
  checkAction,
23
23
  createActionGate,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FelsparRequestError,
3
3
  createHostedFelsparClient
4
- } from "./chunks/chunk-PYLLH47S.js";
4
+ } from "./chunks/chunk-4E64YLWE.js";
5
5
  export {
6
6
  FelsparRequestError,
7
7
  createHostedFelsparClient
package/dist/eve.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  felsparDecisionEvents,
3
3
  felsparGate
4
- } from "./chunks/chunk-WAMWMJYP.js";
5
- import "./chunks/chunk-SQ62T4AA.js";
6
- import "./chunks/chunk-PYLLH47S.js";
4
+ } from "./chunks/chunk-L2EHENY4.js";
5
+ import "./chunks/chunk-FXW4IBGD.js";
6
+ import "./chunks/chunk-4E64YLWE.js";
7
7
 
8
8
  // src/eve.ts
9
9
  var felsparMcpUrl = "https://mcp.felspar.ai/mcp";
@@ -0,0 +1,143 @@
1
+ import type { z } from "zod";
2
+ type Call = <T>(path: string, schema: z.ZodType<T>, value?: unknown) => Promise<T>;
3
+ export declare function decisionGraphCalls(call: Call): {
4
+ getReleaseGraph: (id: string) => Promise<{
5
+ topologyDigest: string;
6
+ graph: {
7
+ nodes: {
8
+ id: string;
9
+ kind: "outcome" | "rule" | "unresolved" | "scoring" | "question" | "subject" | "escalation" | "attempts" | "selection" | "retry" | "score_criterion";
10
+ key: string;
11
+ lines: string[];
12
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
13
+ }[];
14
+ edges: {
15
+ from: string;
16
+ to: string;
17
+ kind: "unresolved" | "overrides" | "retry" | "asks" | "depends_on" | "considers" | "selects" | "escalates" | "scores";
18
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
19
+ }[];
20
+ };
21
+ mermaid: string;
22
+ receiptDigest: string | null;
23
+ evaluationTime: string | null;
24
+ attempt: {
25
+ schema: "felspar.decision-attempt/v1";
26
+ executionId: string;
27
+ releaseId: string;
28
+ receiptDigest: string;
29
+ ordinal: number;
30
+ next: "decided" | "retry" | "escalate";
31
+ remaining: number;
32
+ escalationId: string | null;
33
+ } | null;
34
+ jobId: string;
35
+ releaseId: string;
36
+ releaseDigest: string;
37
+ materialDigest: string;
38
+ schema: "felspar.decision-graph/v1";
39
+ status: "ready";
40
+ view: "proposal" | "release" | "run";
41
+ proposalId?: string | undefined;
42
+ executionObjectId?: string | undefined;
43
+ dashboardUrl?: string | undefined;
44
+ } | {
45
+ schema: "felspar.decision-graph/v1";
46
+ status: "unavailable";
47
+ reason: "history_unavailable" | "graph_limit_exceeded" | "unsupported_material" | "replay_mismatch";
48
+ dashboardUrl?: string | undefined;
49
+ }>;
50
+ getProposalGraph: (id: string) => Promise<{
51
+ topologyDigest: string;
52
+ graph: {
53
+ nodes: {
54
+ id: string;
55
+ kind: "outcome" | "rule" | "unresolved" | "scoring" | "question" | "subject" | "escalation" | "attempts" | "selection" | "retry" | "score_criterion";
56
+ key: string;
57
+ lines: string[];
58
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
59
+ }[];
60
+ edges: {
61
+ from: string;
62
+ to: string;
63
+ kind: "unresolved" | "overrides" | "retry" | "asks" | "depends_on" | "considers" | "selects" | "escalates" | "scores";
64
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
65
+ }[];
66
+ };
67
+ mermaid: string;
68
+ receiptDigest: string | null;
69
+ evaluationTime: string | null;
70
+ attempt: {
71
+ schema: "felspar.decision-attempt/v1";
72
+ executionId: string;
73
+ releaseId: string;
74
+ receiptDigest: string;
75
+ ordinal: number;
76
+ next: "decided" | "retry" | "escalate";
77
+ remaining: number;
78
+ escalationId: string | null;
79
+ } | null;
80
+ jobId: string;
81
+ releaseId: string;
82
+ releaseDigest: string;
83
+ materialDigest: string;
84
+ schema: "felspar.decision-graph/v1";
85
+ status: "ready";
86
+ view: "proposal" | "release" | "run";
87
+ proposalId?: string | undefined;
88
+ executionObjectId?: string | undefined;
89
+ dashboardUrl?: string | undefined;
90
+ } | {
91
+ schema: "felspar.decision-graph/v1";
92
+ status: "unavailable";
93
+ reason: "history_unavailable" | "graph_limit_exceeded" | "unsupported_material" | "replay_mismatch";
94
+ dashboardUrl?: string | undefined;
95
+ }>;
96
+ getDecisionGraph: (executionObjectId: string) => Promise<{
97
+ topologyDigest: string;
98
+ graph: {
99
+ nodes: {
100
+ id: string;
101
+ kind: "outcome" | "rule" | "unresolved" | "scoring" | "question" | "subject" | "escalation" | "attempts" | "selection" | "retry" | "score_criterion";
102
+ key: string;
103
+ lines: string[];
104
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
105
+ }[];
106
+ edges: {
107
+ from: string;
108
+ to: string;
109
+ kind: "unresolved" | "overrides" | "retry" | "asks" | "depends_on" | "considers" | "selects" | "escalates" | "scores";
110
+ state: "blocked" | "inactive" | "active" | "declared" | "suppressed";
111
+ }[];
112
+ };
113
+ mermaid: string;
114
+ receiptDigest: string | null;
115
+ evaluationTime: string | null;
116
+ attempt: {
117
+ schema: "felspar.decision-attempt/v1";
118
+ executionId: string;
119
+ releaseId: string;
120
+ receiptDigest: string;
121
+ ordinal: number;
122
+ next: "decided" | "retry" | "escalate";
123
+ remaining: number;
124
+ escalationId: string | null;
125
+ } | null;
126
+ jobId: string;
127
+ releaseId: string;
128
+ releaseDigest: string;
129
+ materialDigest: string;
130
+ schema: "felspar.decision-graph/v1";
131
+ status: "ready";
132
+ view: "proposal" | "release" | "run";
133
+ proposalId?: string | undefined;
134
+ executionObjectId?: string | undefined;
135
+ dashboardUrl?: string | undefined;
136
+ } | {
137
+ schema: "felspar.decision-graph/v1";
138
+ status: "unavailable";
139
+ reason: "history_unavailable" | "graph_limit_exceeded" | "unsupported_material" | "replay_mismatch";
140
+ dashboardUrl?: string | undefined;
141
+ }>;
142
+ };
143
+ export {};
@@ -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;
@@ -1171,8 +1184,8 @@ export declare function createHostedFelsparClient(configuration: {
1171
1184
  contentDigest: string;
1172
1185
  };
1173
1186
  minimumSelectedProbability: number;
1174
- probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1";
1175
- 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;
1176
1189
  };
1177
1190
  }[];
1178
1191
  normalizationContract?: "felspar.conditional-enum-normalization/v1" | undefined;
@@ -1666,6 +1679,7 @@ export declare function createHostedFelsparClient(configuration: {
1666
1679
  entityId: string;
1667
1680
  evaluationTime: string;
1668
1681
  valueAgreement?: "outcome-regions" | undefined;
1682
+ freshness?: "stale-before-review" | undefined;
1669
1683
  };
1670
1684
  expected: {
1671
1685
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -1696,6 +1710,7 @@ export declare function createHostedFelsparClient(configuration: {
1696
1710
  entityId: string;
1697
1711
  evaluationTime: string;
1698
1712
  valueAgreement?: "outcome-regions" | undefined;
1713
+ freshness?: "stale-before-review" | undefined;
1699
1714
  };
1700
1715
  expected: {
1701
1716
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2044,6 +2059,7 @@ export declare function createHostedFelsparClient(configuration: {
2044
2059
  entityId: string;
2045
2060
  evaluationTime: string;
2046
2061
  valueAgreement?: "outcome-regions" | undefined;
2062
+ freshness?: "stale-before-review" | undefined;
2047
2063
  };
2048
2064
  trustDomain: string;
2049
2065
  expectedArtifactDigest: string;
@@ -2149,6 +2165,7 @@ export declare function createHostedFelsparClient(configuration: {
2149
2165
  entityId: string;
2150
2166
  evaluationTime: string;
2151
2167
  valueAgreement?: "outcome-regions" | undefined;
2168
+ freshness?: "stale-before-review" | undefined;
2152
2169
  };
2153
2170
  expected: {
2154
2171
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2179,6 +2196,7 @@ export declare function createHostedFelsparClient(configuration: {
2179
2196
  entityId: string;
2180
2197
  evaluationTime: string;
2181
2198
  valueAgreement?: "outcome-regions" | undefined;
2199
+ freshness?: "stale-before-review" | undefined;
2182
2200
  };
2183
2201
  expected: {
2184
2202
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2719,8 +2737,8 @@ export declare function createHostedFelsparClient(configuration: {
2719
2737
  contentDigest: string;
2720
2738
  };
2721
2739
  minimumSelectedProbability: number;
2722
- probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1";
2723
- 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;
2724
2742
  };
2725
2743
  expectedEvaluatorContractDigest: string;
2726
2744
  answerType?: "boolean" | undefined;
@@ -3082,6 +3100,7 @@ export declare function createHostedFelsparClient(configuration: {
3082
3100
  entityId: string;
3083
3101
  evaluationTime: string;
3084
3102
  valueAgreement?: "outcome-regions" | undefined;
3103
+ freshness?: "stale-before-review" | undefined;
3085
3104
  };
3086
3105
  trustDomain: string;
3087
3106
  expectedArtifactDigest: string;
@@ -3187,6 +3206,7 @@ export declare function createHostedFelsparClient(configuration: {
3187
3206
  entityId: string;
3188
3207
  evaluationTime: string;
3189
3208
  valueAgreement?: "outcome-regions" | undefined;
3209
+ freshness?: "stale-before-review" | undefined;
3190
3210
  };
3191
3211
  expected: {
3192
3212
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -3217,6 +3237,7 @@ export declare function createHostedFelsparClient(configuration: {
3217
3237
  entityId: string;
3218
3238
  evaluationTime: string;
3219
3239
  valueAgreement?: "outcome-regions" | undefined;
3240
+ freshness?: "stale-before-review" | undefined;
3220
3241
  };
3221
3242
  expected: {
3222
3243
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -3757,8 +3778,8 @@ export declare function createHostedFelsparClient(configuration: {
3757
3778
  contentDigest: string;
3758
3779
  };
3759
3780
  minimumSelectedProbability: number;
3760
- probabilityContract: "closed-distribution-unique-maximum/v1" | "closed-distribution-with-abstention/v1";
3761
- 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;
3762
3783
  };
3763
3784
  expectedEvaluatorContractDigest: string;
3764
3785
  answerType?: "boolean" | undefined;
@@ -4355,6 +4376,7 @@ export declare function createHostedFelsparClient(configuration: {
4355
4376
  entityId: string;
4356
4377
  releaseId: string;
4357
4378
  outcome: string | null;
4379
+ environment?: "staging" | "production" | undefined;
4358
4380
  case?: {
4359
4381
  id: string;
4360
4382
  mode: "provided" | "fields" | "content" | "issued";
@@ -4400,5 +4422,143 @@ export declare function createHostedFelsparClient(configuration: {
4400
4422
  } | undefined;
4401
4423
  } | undefined;
4402
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
+ }>;
4403
4563
  };
4404
4564
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felspar/sdk",
3
- "version": "0.4.1",
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",