@felspar/sdk 0.4.0 → 0.4.1

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-MIPPJBXB.js";
3
+ } from "./chunk-PYLLH47S.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-ZHMUQJT2.js";
5
+ } from "./chunk-SQ62T4AA.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-ZHMUQJT2.js";
6
- import "./chunks/chunk-MIPPJBXB.js";
5
+ } from "./chunks/chunk-SQ62T4AA.js";
6
+ import "./chunks/chunk-PYLLH47S.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-FVPYJVF5.js";
5
- import "./chunks/chunk-ZHMUQJT2.js";
6
- import "./chunks/chunk-MIPPJBXB.js";
4
+ } from "./chunks/chunk-WAMWMJYP.js";
5
+ import "./chunks/chunk-SQ62T4AA.js";
6
+ import "./chunks/chunk-PYLLH47S.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-ZHMUQJT2.js";
6
- import "./chunks/chunk-MIPPJBXB.js";
5
+ } from "./chunks/chunk-SQ62T4AA.js";
6
+ import "./chunks/chunk-PYLLH47S.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-ZHMUQJT2.js";
20
- import "./chunks/chunk-MIPPJBXB.js";
19
+ } from "./chunks/chunk-SQ62T4AA.js";
20
+ import "./chunks/chunk-PYLLH47S.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-MIPPJBXB.js";
4
+ } from "./chunks/chunk-PYLLH47S.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-FVPYJVF5.js";
5
- import "./chunks/chunk-ZHMUQJT2.js";
6
- import "./chunks/chunk-MIPPJBXB.js";
4
+ } from "./chunks/chunk-WAMWMJYP.js";
5
+ import "./chunks/chunk-SQ62T4AA.js";
6
+ import "./chunks/chunk-PYLLH47S.js";
7
7
 
8
8
  // src/eve.ts
9
9
  var felsparMcpUrl = "https://mcp.felspar.ai/mcp";
@@ -258,7 +258,7 @@ export declare function createHostedFelsparClient(configuration: {
258
258
  answer: {
259
259
  send: "text" | "text_or_value";
260
260
  valueFormat: "number" | "calendar-date" | null;
261
- interpretation: "classified" | "exact_read" | "unsupported";
261
+ interpretation: "unsupported" | "classified" | "exact_read";
262
262
  threshold: number | null;
263
263
  applies: "always" | "conditional";
264
264
  dependsOn: string[];
@@ -494,37 +494,65 @@ export declare function createHostedFelsparClient(configuration: {
494
494
  text: string;
495
495
  source: {
496
496
  class: string;
497
- id: string;
498
497
  observedAt: string;
498
+ id?: string | undefined;
499
+ manual?: true | undefined;
500
+ suppliedBy?: string | undefined;
501
+ by?: string | undefined;
502
+ stamped?: true | undefined;
499
503
  revision?: string | undefined;
500
504
  locator?: string | undefined;
501
505
  sensitivity?: string | undefined;
502
506
  };
503
507
  about?: string | undefined;
504
508
  } | {
509
+ value: string | number | boolean;
510
+ source: {
511
+ class: string;
512
+ observedAt: string;
513
+ excerpt?: string | undefined;
514
+ id?: string | undefined;
515
+ manual?: true | undefined;
516
+ suppliedBy?: string | undefined;
517
+ by?: string | undefined;
518
+ stamped?: true | undefined;
519
+ revision?: string | undefined;
520
+ locator?: string | undefined;
521
+ sensitivity?: string | undefined;
522
+ };
523
+ about?: string | undefined;
524
+ } | ({
505
525
  text: string;
506
526
  source: {
507
527
  class: string;
508
- id: string;
509
528
  observedAt: string;
529
+ id?: string | undefined;
530
+ manual?: true | undefined;
531
+ suppliedBy?: string | undefined;
532
+ by?: string | undefined;
533
+ stamped?: true | undefined;
510
534
  revision?: string | undefined;
511
535
  locator?: string | undefined;
512
536
  sensitivity?: string | undefined;
513
537
  };
514
538
  about?: string | undefined;
515
- }[] | {
539
+ } | {
516
540
  value: string | number | boolean;
517
541
  source: {
518
542
  class: string;
519
- id: string;
520
543
  observedAt: string;
544
+ excerpt?: string | undefined;
545
+ id?: string | undefined;
546
+ manual?: true | undefined;
547
+ suppliedBy?: string | undefined;
548
+ by?: string | undefined;
549
+ stamped?: true | undefined;
521
550
  revision?: string | undefined;
522
551
  locator?: string | undefined;
523
552
  sensitivity?: string | undefined;
524
- excerpt?: string | undefined;
525
553
  };
526
554
  about?: string | undefined;
527
- }>;
555
+ })[]>;
528
556
  related?: Record<string, string | string[]> | undefined;
529
557
  identity?: Record<string, string> | undefined;
530
558
  } | null;
@@ -658,6 +686,10 @@ export declare function createHostedFelsparClient(configuration: {
658
686
  }[] | undefined;
659
687
  question?: string | undefined;
660
688
  } | undefined;
689
+ manualFacts?: {
690
+ allowed: false;
691
+ quote: string;
692
+ } | undefined;
661
693
  escalations?: {
662
694
  routes: {
663
695
  id: string;
@@ -1633,6 +1665,7 @@ export declare function createHostedFelsparClient(configuration: {
1633
1665
  scope: {
1634
1666
  entityId: string;
1635
1667
  evaluationTime: string;
1668
+ valueAgreement?: "outcome-regions" | undefined;
1636
1669
  };
1637
1670
  expected: {
1638
1671
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -1655,11 +1688,14 @@ export declare function createHostedFelsparClient(configuration: {
1655
1688
  facts: {
1656
1689
  key: string;
1657
1690
  value: string | number | boolean;
1691
+ held?: "stale" | "review" | undefined;
1692
+ conflictsWith?: string | number | boolean | undefined;
1658
1693
  }[];
1659
1694
  id: string;
1660
1695
  scope: {
1661
1696
  entityId: string;
1662
1697
  evaluationTime: string;
1698
+ valueAgreement?: "outcome-regions" | undefined;
1663
1699
  };
1664
1700
  expected: {
1665
1701
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2007,6 +2043,7 @@ export declare function createHostedFelsparClient(configuration: {
2007
2043
  scope: {
2008
2044
  entityId: string;
2009
2045
  evaluationTime: string;
2046
+ valueAgreement?: "outcome-regions" | undefined;
2010
2047
  };
2011
2048
  trustDomain: string;
2012
2049
  expectedArtifactDigest: string;
@@ -2111,6 +2148,7 @@ export declare function createHostedFelsparClient(configuration: {
2111
2148
  scope: {
2112
2149
  entityId: string;
2113
2150
  evaluationTime: string;
2151
+ valueAgreement?: "outcome-regions" | undefined;
2114
2152
  };
2115
2153
  expected: {
2116
2154
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -2133,11 +2171,14 @@ export declare function createHostedFelsparClient(configuration: {
2133
2171
  facts: {
2134
2172
  key: string;
2135
2173
  value: string | number | boolean;
2174
+ held?: "stale" | "review" | undefined;
2175
+ conflictsWith?: string | number | boolean | undefined;
2136
2176
  }[];
2137
2177
  id: string;
2138
2178
  scope: {
2139
2179
  entityId: string;
2140
2180
  evaluationTime: string;
2181
+ valueAgreement?: "outcome-regions" | undefined;
2141
2182
  };
2142
2183
  expected: {
2143
2184
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -3040,6 +3081,7 @@ export declare function createHostedFelsparClient(configuration: {
3040
3081
  scope: {
3041
3082
  entityId: string;
3042
3083
  evaluationTime: string;
3084
+ valueAgreement?: "outcome-regions" | undefined;
3043
3085
  };
3044
3086
  trustDomain: string;
3045
3087
  expectedArtifactDigest: string;
@@ -3144,6 +3186,7 @@ export declare function createHostedFelsparClient(configuration: {
3144
3186
  scope: {
3145
3187
  entityId: string;
3146
3188
  evaluationTime: string;
3189
+ valueAgreement?: "outcome-regions" | undefined;
3147
3190
  };
3148
3191
  expected: {
3149
3192
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -3166,11 +3209,14 @@ export declare function createHostedFelsparClient(configuration: {
3166
3209
  facts: {
3167
3210
  key: string;
3168
3211
  value: string | number | boolean;
3212
+ held?: "stale" | "review" | undefined;
3213
+ conflictsWith?: string | number | boolean | undefined;
3169
3214
  }[];
3170
3215
  id: string;
3171
3216
  scope: {
3172
3217
  entityId: string;
3173
3218
  evaluationTime: string;
3219
+ valueAgreement?: "outcome-regions" | undefined;
3174
3220
  };
3175
3221
  expected: {
3176
3222
  status: "review_required" | "blocked" | "ready" | "gap" | "conflict" | "stale";
@@ -3749,6 +3795,18 @@ export declare function createHostedFelsparClient(configuration: {
3749
3795
  policyDigest: string;
3750
3796
  fixtureSuiteDigest: string;
3751
3797
  } | undefined;
3798
+ calibration?: {
3799
+ savedResultId: string;
3800
+ calibrationDigest: string;
3801
+ questions: string[];
3802
+ acceptedBy: string;
3803
+ approvedMaterialDigest: string;
3804
+ bars: {
3805
+ question: string;
3806
+ bar: number;
3807
+ calibrationDigest: string;
3808
+ }[];
3809
+ } | undefined;
3752
3810
  }>;
3753
3811
  describeJob: (id: string, job: string) => Promise<{
3754
3812
  schema: "felspar.hosted-job-description.draft/v0";
@@ -3816,7 +3874,7 @@ export declare function createHostedFelsparClient(configuration: {
3816
3874
  answer: {
3817
3875
  send: "text" | "text_or_value";
3818
3876
  valueFormat: "number" | "calendar-date" | null;
3819
- interpretation: "classified" | "exact_read" | "unsupported";
3877
+ interpretation: "unsupported" | "classified" | "exact_read";
3820
3878
  threshold: number | null;
3821
3879
  applies: "always" | "conditional";
3822
3880
  dependsOn: string[];
@@ -4052,37 +4110,65 @@ export declare function createHostedFelsparClient(configuration: {
4052
4110
  text: string;
4053
4111
  source: {
4054
4112
  class: string;
4055
- id: string;
4056
4113
  observedAt: string;
4114
+ id?: string | undefined;
4115
+ manual?: true | undefined;
4116
+ suppliedBy?: string | undefined;
4117
+ by?: string | undefined;
4118
+ stamped?: true | undefined;
4057
4119
  revision?: string | undefined;
4058
4120
  locator?: string | undefined;
4059
4121
  sensitivity?: string | undefined;
4060
4122
  };
4061
4123
  about?: string | undefined;
4062
4124
  } | {
4125
+ value: string | number | boolean;
4126
+ source: {
4127
+ class: string;
4128
+ observedAt: string;
4129
+ excerpt?: string | undefined;
4130
+ id?: string | undefined;
4131
+ manual?: true | undefined;
4132
+ suppliedBy?: string | undefined;
4133
+ by?: string | undefined;
4134
+ stamped?: true | undefined;
4135
+ revision?: string | undefined;
4136
+ locator?: string | undefined;
4137
+ sensitivity?: string | undefined;
4138
+ };
4139
+ about?: string | undefined;
4140
+ } | ({
4063
4141
  text: string;
4064
4142
  source: {
4065
4143
  class: string;
4066
- id: string;
4067
4144
  observedAt: string;
4145
+ id?: string | undefined;
4146
+ manual?: true | undefined;
4147
+ suppliedBy?: string | undefined;
4148
+ by?: string | undefined;
4149
+ stamped?: true | undefined;
4068
4150
  revision?: string | undefined;
4069
4151
  locator?: string | undefined;
4070
4152
  sensitivity?: string | undefined;
4071
4153
  };
4072
4154
  about?: string | undefined;
4073
- }[] | {
4155
+ } | {
4074
4156
  value: string | number | boolean;
4075
4157
  source: {
4076
4158
  class: string;
4077
- id: string;
4078
4159
  observedAt: string;
4160
+ excerpt?: string | undefined;
4161
+ id?: string | undefined;
4162
+ manual?: true | undefined;
4163
+ suppliedBy?: string | undefined;
4164
+ by?: string | undefined;
4165
+ stamped?: true | undefined;
4079
4166
  revision?: string | undefined;
4080
4167
  locator?: string | undefined;
4081
4168
  sensitivity?: string | undefined;
4082
- excerpt?: string | undefined;
4083
4169
  };
4084
4170
  about?: string | undefined;
4085
- }>;
4171
+ })[]>;
4086
4172
  related?: Record<string, string | string[]> | undefined;
4087
4173
  identity?: Record<string, string> | undefined;
4088
4174
  } | null;
@@ -4216,6 +4302,10 @@ export declare function createHostedFelsparClient(configuration: {
4216
4302
  }[] | undefined;
4217
4303
  question?: string | undefined;
4218
4304
  } | undefined;
4305
+ manualFacts?: {
4306
+ allowed: false;
4307
+ quote: string;
4308
+ } | undefined;
4219
4309
  escalations?: {
4220
4310
  routes: {
4221
4311
  id: string;
@@ -4282,6 +4372,32 @@ export declare function createHostedFelsparClient(configuration: {
4282
4372
  id: string;
4283
4373
  trigger: "outcome" | "unresolved" | "attempt_limit";
4284
4374
  } | undefined;
4375
+ manualFacts?: {
4376
+ question: string;
4377
+ excerpt: number;
4378
+ via: {
4379
+ principal: string;
4380
+ agent: {
4381
+ name: string;
4382
+ accountable: string;
4383
+ } | null;
4384
+ };
4385
+ observedAt: string;
4386
+ stampedByFelspar: boolean;
4387
+ suppliedBy?: {
4388
+ text: string;
4389
+ verified: false;
4390
+ } | undefined;
4391
+ }[] | undefined;
4392
+ caseRecord?: {
4393
+ rule: "whole-case";
4394
+ attempt: number;
4395
+ attempts: {
4396
+ executionId: string;
4397
+ added: string[];
4398
+ considered: boolean;
4399
+ }[];
4400
+ } | undefined;
4285
4401
  } | undefined;
4286
4402
  }>;
4287
4403
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felspar/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
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",