spaps-sdk 1.7.0 → 1.9.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/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.8.0] - 2026-05-11
10
+
11
+ - Maintenance: align the SDK package version after release automation.
12
+
13
+ ## [1.7.0] - 2026-05-09
14
+
9
15
  - Added `dayrate.getCheckoutStatus(sessionId)` and checkout-status response types for Bookme/dayrate confirmation polling.
10
16
  - Added browser-safe runtime helpers: guarded environment reads, `TokenManager.decodePayload()`, and SPAPS envelope unwrapping/type guards.
11
17
  - Added `headerProvider` SDK config for per-request custom context headers without overriding SDK-managed auth headers.
package/README.md CHANGED
@@ -88,7 +88,7 @@ Relevant environment variables:
88
88
  | `appLinks` | Authenticated create and public resolve helpers for application-scoped short links |
89
89
  | `email` | Template lookup, preview, and send helpers |
90
90
  | `entitlements` | User and resource entitlement queries |
91
- | `skillEvals` | Paid blind skill-eval cases, review rooms, controlled reveal, and governance snapshots |
91
+ | `skillEvals` | Paid blind skill-eval cases, review rooms, reviewer marks, insight inboxes, and controlled reveal |
92
92
  | `dayrate` | Availability, Stripe booking, x402 booking-hold, and checkout-status helpers |
93
93
  | `admin` | Product and pricing admin helpers |
94
94
  | `cfo` | CFO-facing reporting endpoints |
@@ -146,7 +146,7 @@ console.log(`/${link.app_slug}/${link.username}/${link.slug}`);
146
146
 
147
147
  ### Skill Evals
148
148
 
149
- Use `skillEvals` for SPAPS-owned blind comparative review cases. Paid creation uses the same `PAYMENT-SIGNATURE` header shape as the x402 namespace.
149
+ Use `skillEvals` for SPAPS-owned blind review of agent-skill logs. Paid creation uses the same `PAYMENT-SIGNATURE` header shape as the x402 namespace. Reviewers submit `valuable` and `not_valuable` marks, and submitters read those marks through an insight inbox before applying skill changes.
150
150
 
151
151
  ```ts
152
152
  const signedPayment = "base64-x402-payment";
@@ -163,7 +163,13 @@ const created = await spaps.skillEvals.createCase(
163
163
  evidence_summary: "Validation passed",
164
164
  artifact_hash: "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
165
165
  artifact_mime: "text/markdown",
166
+ jsonl_log_ref: "spaps-artifact://logs/a.jsonl",
167
+ jsonl_log_hash: "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
168
+ skill_ref: "skill://docs-review",
169
+ skill_version_ref: "skill://docs-review/v2.0",
166
170
  skill_version_digest: "sha256:1111111111111111111111111111111111111111111111111111111111111111",
171
+ model_id: "openai/gpt-5.4",
172
+ effort_level: "medium",
167
173
  provenance_ref: "skill://private/a",
168
174
  },
169
175
  {
@@ -172,10 +178,21 @@ const created = await spaps.skillEvals.createCase(
172
178
  evidence_summary: "Validation passed",
173
179
  artifact_hash: "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
174
180
  artifact_mime: "text/markdown",
181
+ jsonl_log_ref: "spaps-artifact://logs/b.jsonl",
182
+ jsonl_log_hash: "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
183
+ skill_ref: "skill://docs-review",
184
+ skill_version_ref: "skill://docs-review/v2.1",
175
185
  skill_version_digest: "sha256:2222222222222222222222222222222222222222222222222222222222222222",
186
+ model_id: "openai/gpt-5.4",
187
+ effort_level: "medium",
176
188
  provenance_ref: "skill://private/b",
177
189
  },
178
190
  ],
191
+ case_policy: {
192
+ access_mode: "team_private",
193
+ allowed_model_efforts: [{ model_id: "openai/gpt-5.4", effort_level: "medium" }],
194
+ participant_allowlist: ["reviewer-actor-id"],
195
+ },
179
196
  idempotency_key: "eval-create-001",
180
197
  },
181
198
  { paymentSignature: signedPayment }
@@ -183,6 +200,35 @@ const created = await spaps.skillEvals.createCase(
183
200
 
184
201
  const room = await spaps.skillEvals.getReviewRoom(created.case_id);
185
202
  console.log(room.reviewer_state);
203
+
204
+ const review = await spaps.skillEvals.submitReview(created.case_id, {
205
+ review_marks: [
206
+ {
207
+ candidate_id: "B",
208
+ kind: "valuable",
209
+ note: "B checks the configured docs path before recommending an edit.",
210
+ reason_code: "prevents_wrong_repo_patch",
211
+ confidence: "high",
212
+ criterion: "Finds repo boundaries",
213
+ },
214
+ ],
215
+ });
216
+
217
+ const inbox = await spaps.skillEvals.getInsights(created.case_id);
218
+ console.log(inbox.valuable[0]?.jsonl_log_ref, review.review_mark_counts);
219
+
220
+ await spaps.skillEvals.respondToReview(created.case_id, inbox.valuable[0].source_review_id, {
221
+ response: "applied",
222
+ reason: "Updated the skill from the concrete log-backed insight.",
223
+ applied_insight_ref: inbox.valuable[0].insight_ref,
224
+ skill_change_ref: "skill://docs-review/v2.1",
225
+ skill_version_before: "skill://docs-review/v2.0",
226
+ skill_version_after: "skill://docs-review/v2.1",
227
+ jsonl_log_ref: "spaps-artifact://logs/apply.jsonl",
228
+ jsonl_log_hash: "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
229
+ model_id: "openai/gpt-5.4",
230
+ effort_level: "medium",
231
+ });
186
232
  ```
187
233
 
188
234
  ### Custom Context Headers
@@ -319,7 +365,7 @@ npm run test:readme
319
365
  ## Metadata
320
366
 
321
367
  - `package_name`: `spaps-sdk`
322
- - `latest_version`: `1.6.8`
368
+ - `latest_version`: `1.8.0`
323
369
  - `minimum_runtime`: `Node.js >=14.0.0`
324
370
  - `api_base_url`: `https://api.sweetpotato.dev`
325
371
 
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as spaps_types from 'spaps-types';
2
2
  import { ResourceType, Entitlement, CreateProductRequest, Product, UpdateProductRequest, CreatePriceRequest, Price, ProductSyncResult, CryptoReconcileRequest, CreateSecureMessageRequest, SecureMessage, IssueReportScope, IssueReportStatusResult, IssueReportStatus, IssueReportListResult, IssueReport, CreateIssueReportRequest, IssueReportingVoiceTokenResult, UpdateIssueReportRequest, ReplyIssueReportRequest, CreateAppLinkRequest, AppLink, AuthResponse, User as User$1, CreateCryptoInvoiceRequest, CryptoInvoiceStatusSnapshot, CheckoutSession, X402ResourceStatusResponse, X402ActionResponse, X402ReceiptResponse, X402ReceiptListResponse, X402HandoffVerification, DayrateAvailabilityResponse, DayrateBookingRequest, DayrateBookingResponse, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayrateX402BookingRequest, DayrateX402BookingResponse, DayrateCheckoutStatusResponse, Subscription, UsageBalance, VerifyCryptoWebhookSignatureOptions } from 'spaps-types';
3
- export { AdminPermission, AdminRole, AdminUser, ApiResponse, AppLink, AuthResponse, CheckoutSession, CreateAppLinkRequest, CreateCryptoInvoiceRequest, CreateIssueReportRequest, CreatePriceRequest, CreateProductRequest, CreateSecureMessageInput, CreateSecureMessageRequest, CryptoInvoice, CryptoInvoiceResponse, CryptoInvoiceStatusSnapshot, CryptoReconcileRequest, DayrateAvailabilityResponse, DayrateAvailableSlot, DayrateBookingRequest, DayrateBookingResponse, DayrateCheckoutStatus, DayrateCheckoutStatusBooking, DayrateCheckoutStatusResponse, DayrateDayOfWeek, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayratePriceBreakdown, DayrateSlotType, DayrateX402BookingRequest, DayrateX402BookingResponse, Entitlement, IssueReport, IssueReportListResult, IssueReportStatus, IssueReportStatusResult, IssueReportTarget, IssueReportingInputMode, IssueReportingVoiceProvider, IssueReportingVoiceTokenResult, LinkedIssueReportCase, Price, Product, ProductSyncResult, ReplyIssueReportRequest, ResourceType, SecureMessage, SecureMessageOutput, Subscription, TokenPair, UpdateIssueReportRequest, UpdateProductRequest, UsageBalance, User, UserProfile, UserRole, UserWallet, VerifyCryptoWebhookSignatureOptions, X402ActionFreeResponse, X402ActionOutcome, X402ActionPendingResponse, X402ActionReplayedResponse, X402ActionResponse, X402ActionSettledResponse, X402ExecuteActionRequest, X402HandoffAuthorization, X402HandoffVerification, X402HandoffVerifyRequest, X402PaymentAccept, X402PaymentRequirement, X402ProjectionStatus, X402Receipt, X402ReceiptListResponse, X402ReceiptResponse, X402ReceiptStatus, X402Resource, X402ResourceStatus, X402ResourceStatusResponse, createSecureMessageRequestSchema, isX402PaymentRequired, isX402ResourceStatus, secureMessageMetadataSchema, secureMessageSchema } from 'spaps-types';
3
+ export { AdminPermission, AdminRole, AdminUser, ApiResponse, AppLink, AuthResponse, CheckoutSession, CreateAppLinkRequest, CreateCryptoInvoiceRequest, CreateIssueReportRequest, CreatePriceRequest, CreateProductRequest, CreateSecureMessageInput, CreateSecureMessageRequest, CryptoInvoice, CryptoInvoiceResponse, CryptoInvoiceStatusSnapshot, CryptoReconcileRequest, DayrateAvailabilityResponse, DayrateAvailableSlot, DayrateBookingRequest, DayrateBookingResponse, DayrateCheckoutStatus, DayrateCheckoutStatusBooking, DayrateCheckoutStatusResponse, DayrateDayOfWeek, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayratePriceBreakdown, DayrateSlotType, DayrateX402BookingRequest, DayrateX402BookingResponse, Entitlement, IssueReport, IssueReportListResult, IssueReportStatus, IssueReportStatusResult, IssueReportTarget, IssueReportingInputMode, IssueReportingVoiceProvider, IssueReportingVoiceTokenResult, LinkedIssueReportCase, Price, Product, ProductSyncResult, ReplyIssueReportRequest, ResourceType, SecureMessage, SecureMessageOutput, Subscription, TokenPair, UpdateIssueReportRequest, UpdateProductRequest, UsageBalance, User, UserProfile, UserRole, UserWallet, VerifyCryptoWebhookSignatureOptions, X402ActionFreeResponse, X402ActionOutcome, X402ActionPendingResponse, X402ActionReplayedResponse, X402ActionResponse, X402ActionSettledResponse, X402ExecuteActionRequest, X402HandoffAuthorization, X402HandoffVerification, X402HandoffVerifyRequest, X402PaymentAccept, X402PaymentRequirement, X402ProjectionStatus, X402Receipt, X402ReceiptListResponse, X402ReceiptResponse, X402ReceiptStatus, X402Resource, X402ResourceStatus, X402ResourceStatusResponse, atomicToMoneyUnits, createSecureMessageRequestSchema, isX402PaymentRequired, isX402ResourceStatus, moneyUnitsToAtomic, roundHalfToPositiveInfinity, secureMessageMetadataSchema, secureMessageSchema, validatePositiveAmountAtomic } from 'spaps-types';
4
4
 
5
5
  /**
6
6
  * Permission checking utilities for SPAPS SDK
@@ -383,8 +383,10 @@ interface X402VerifyHandoffOptions {
383
383
  type SkillEvalDisclosurePolicy = 'blind_then_controlled_reveal';
384
384
  type SkillEvalEligibilitySource = 'admin_assigned' | 'entitlement' | 'policy_import' | 'manual_override';
385
385
  type SkillEvalConfidence = 'low' | 'medium' | 'high';
386
+ type SkillEvalReviewMarkKind = 'valuable' | 'not_valuable';
386
387
  type SkillEvalPosterResponse = 'accepted' | 'rejected' | 'needs_clarification' | 'applied';
387
388
  type SkillEvalRevealField = 'skill_version_digest' | 'provenance_ref';
389
+ type SkillEvalAccessMode = 'public' | 'team_private';
388
390
  type SkillEvalGovernancePurpose = 'adopt_skill' | 'retire_skill' | 'merge_skill' | 'split_skill' | 'reviewer_policy' | 'fund_bounty';
389
391
  interface SkillEvalCandidateInput {
390
392
  candidate_id: string;
@@ -392,12 +394,33 @@ interface SkillEvalCandidateInput {
392
394
  evidence_summary: string;
393
395
  artifact_hash: string;
394
396
  artifact_mime: string;
397
+ jsonl_log_ref: string;
398
+ jsonl_log_hash: string;
399
+ skill_ref: string;
400
+ skill_version_ref: string;
395
401
  skill_version_digest: string;
402
+ model_id: string;
403
+ effort_level: string;
396
404
  provenance_ref: string;
397
405
  }
406
+ interface SkillEvalModelEffort {
407
+ model_id: string;
408
+ effort_level: string;
409
+ }
410
+ interface SkillEvalCasePolicy {
411
+ access_mode?: SkillEvalAccessMode;
412
+ allowed_model_efforts: SkillEvalModelEffort[];
413
+ min_contribution_score?: number | null;
414
+ contribution_score_source_ref?: string | null;
415
+ viewer_allowlist?: string[];
416
+ skill_user_allowlist?: string[];
417
+ participant_allowlist?: string[];
418
+ }
398
419
  interface SkillEvalReviewerEligibilityInput {
399
420
  reviewer_actor_id: string;
400
421
  eligibility_source?: SkillEvalEligibilitySource;
422
+ contribution_score?: number | null;
423
+ contribution_score_source_ref?: string | null;
401
424
  }
402
425
  interface CreateSkillEvalCaseRequest {
403
426
  title: string;
@@ -405,6 +428,7 @@ interface CreateSkillEvalCaseRequest {
405
428
  success_criteria: string[];
406
429
  candidates: SkillEvalCandidateInput[];
407
430
  disclosure_policy?: SkillEvalDisclosurePolicy;
431
+ case_policy: SkillEvalCasePolicy;
408
432
  idempotency_key: string;
409
433
  reviewer_eligibility?: SkillEvalReviewerEligibilityInput[];
410
434
  }
@@ -423,6 +447,9 @@ interface SkillEvalCaseResponse {
423
447
  x402_receipt_id?: string | null;
424
448
  payload_fingerprint?: string;
425
449
  case_version: number;
450
+ access_mode?: SkillEvalAccessMode;
451
+ case_policy?: SkillEvalCasePolicy;
452
+ actor_access?: SkillEvalActorAccess;
426
453
  created_at?: string | null;
427
454
  updated_at?: string | null;
428
455
  idempotent_replay?: boolean;
@@ -431,6 +458,11 @@ interface SkillEvalCaseResponse {
431
458
  success_criteria?: string[];
432
459
  candidates?: SkillEvalCandidateResponse[];
433
460
  }
461
+ interface SkillEvalActorAccess {
462
+ can_view: boolean;
463
+ can_use_skill: boolean;
464
+ can_participate: boolean;
465
+ }
434
466
  interface SkillEvalCandidateResponse {
435
467
  candidate_id: string;
436
468
  output_ref: string;
@@ -439,6 +471,10 @@ interface SkillEvalCandidateResponse {
439
471
  artifact_mime: string;
440
472
  skill_version_digest?: string;
441
473
  provenance_ref?: string;
474
+ jsonl_log_ref?: string;
475
+ jsonl_log_hash?: string;
476
+ model_id?: string;
477
+ effort_level?: string;
442
478
  }
443
479
  interface SkillEvalReviewRoom {
444
480
  case_id: string;
@@ -447,14 +483,24 @@ interface SkillEvalReviewRoom {
447
483
  success_criteria: string[];
448
484
  candidates: SkillEvalCandidateResponse[];
449
485
  reviewer_state: string;
486
+ actor_access?: SkillEvalActorAccess;
450
487
  case_version: number;
451
488
  }
489
+ interface SkillEvalReviewMarkInput {
490
+ candidate_id: string;
491
+ kind: SkillEvalReviewMarkKind;
492
+ note: string;
493
+ reason_code: string;
494
+ confidence: SkillEvalConfidence;
495
+ criterion?: string | null;
496
+ }
452
497
  interface SubmitSkillEvalReviewRequest {
453
- winner_candidate_id: string;
454
- rationale: string;
455
- missing_from_winner: string;
498
+ winner_candidate_id?: string | null;
499
+ rationale?: string | null;
500
+ missing_from_winner?: string | null;
456
501
  criteria_challenge?: string | null;
457
- confidence: SkillEvalConfidence;
502
+ confidence?: SkillEvalConfidence | null;
503
+ review_marks?: SkillEvalReviewMarkInput[];
458
504
  }
459
505
  interface SkillEvalRewardEvent {
460
506
  reward_event_id?: string;
@@ -463,17 +509,77 @@ interface SkillEvalRewardEvent {
463
509
  interface SkillEvalReviewResponse {
464
510
  review_id: string;
465
511
  status: string;
512
+ review_mark_counts?: {
513
+ valuable: number;
514
+ not_valuable: number;
515
+ };
466
516
  reward_event?: SkillEvalRewardEvent | null;
467
517
  }
518
+ interface SkillEvalInsight {
519
+ insight_ref: string;
520
+ mark_id?: string | null;
521
+ source_review_id: string;
522
+ reviewer_actor_id?: string | null;
523
+ source_review_created_at?: string | null;
524
+ candidate_id: string;
525
+ kind: SkillEvalReviewMarkKind;
526
+ note: string;
527
+ reason_code: string;
528
+ confidence: SkillEvalConfidence;
529
+ criterion?: string | null;
530
+ jsonl_log_ref: string;
531
+ jsonl_log_hash: string;
532
+ source_candidate?: {
533
+ output_ref?: string | null;
534
+ evidence_summary?: string | null;
535
+ artifact_hash?: string | null;
536
+ artifact_mime?: string | null;
537
+ model_id?: string | null;
538
+ effort_level?: string | null;
539
+ };
540
+ }
541
+ interface SkillEvalInsightsResponse {
542
+ case_id: string;
543
+ status?: string;
544
+ task_claim?: string;
545
+ success_criteria?: string[];
546
+ case_version?: number;
547
+ valuable: SkillEvalInsight[];
548
+ not_valuable: SkillEvalInsight[];
549
+ counts?: {
550
+ valuable: number;
551
+ not_valuable: number;
552
+ };
553
+ visibility_policy?: {
554
+ access_mode?: SkillEvalAccessMode;
555
+ actor_access?: SkillEvalActorAccess;
556
+ reviewer_identity_visible?: boolean;
557
+ case_policy?: SkillEvalCasePolicy;
558
+ };
559
+ }
468
560
  interface RespondToSkillEvalReviewRequest {
469
561
  response: SkillEvalPosterResponse;
470
562
  reason: string;
563
+ applied_insight_ref?: string | null;
471
564
  skill_change_ref?: string | null;
565
+ skill_version_before?: string | null;
566
+ skill_version_after?: string | null;
567
+ jsonl_log_ref?: string | null;
568
+ jsonl_log_hash?: string | null;
569
+ model_id?: string | null;
570
+ effort_level?: string | null;
472
571
  }
473
572
  interface SkillEvalPosterResponseResult {
474
573
  response_id: string;
475
574
  response: SkillEvalPosterResponse;
575
+ applied_insight_ref?: string | null;
476
576
  skill_change_ref?: string | null;
577
+ skill_version_before?: string | null;
578
+ skill_version_after?: string | null;
579
+ jsonl_log_ref?: string | null;
580
+ jsonl_log_hash?: string | null;
581
+ model_id?: string | null;
582
+ effort_level?: string | null;
477
583
  reward_event?: SkillEvalRewardEvent | null;
478
584
  }
479
585
  interface RevealSkillEvalEvidenceRequest {
@@ -948,6 +1054,7 @@ declare class SPAPSClient<SecureMessageMetadata extends Record<string, any> = Re
948
1054
  createCase: (payload: CreateSkillEvalCaseRequest, options?: SkillEvalCreateOptions) => Promise<SkillEvalCaseResponse>;
949
1055
  getCase: (caseId: string) => Promise<SkillEvalCaseResponse>;
950
1056
  getReviewRoom: (caseId: string) => Promise<SkillEvalReviewRoom>;
1057
+ getInsights: (caseId: string) => Promise<SkillEvalInsightsResponse>;
951
1058
  submitReview: (caseId: string, payload: SubmitSkillEvalReviewRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalReviewResponse>;
952
1059
  respondToReview: (caseId: string, reviewId: string, payload: RespondToSkillEvalReviewRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalPosterResponseResult>;
953
1060
  lockReviews: (caseId: string, options?: SkillEvalMutationOptions) => Promise<SkillEvalCaseResponse>;
@@ -1176,4 +1283,4 @@ declare function createServerClient(secretKey: string, options?: Omit<SPAPSConfi
1176
1283
  */
1177
1284
  declare function detectKeyType(key: string): ApiKeyType | null;
1178
1285
 
1179
- export { type AdminConfig, type ApiKeyType, type CheckoutLineItem, type CheckoutLineItemPriceData, type CreateCheckoutSessionPayload, type CreateSkillEvalCaseRequest, type CreateSkillEvalGovernanceSnapshotRequest, DEFAULT_ADMIN_ACCOUNTS, type EmailSendOptions, type EmailSendResult, type EmailTemplate, type EmailTemplatePreview, type EntitlementCheckResult, type EntitlementListParams, type FeatureContext, type FeatureDefinition, FeatureEvaluator, type HeaderProvider, type ImportSkillEvalGovernanceOutcomeRequest, type IssueReportListParams, type IssueReportStatusParams, type PermissionCheckResult, PermissionChecker, type RespondToSkillEvalReviewRequest, type RevealSkillEvalEvidenceRequest, RoleHierarchy, SPAPSClient as SPAPS, SPAPSClient, type SPAPSConfig, type SPAPSEnvelope, type SkillEvalCandidateInput, type SkillEvalCandidateResponse, type SkillEvalCaseResponse, type SkillEvalConfidence, type SkillEvalCreateOptions, type SkillEvalDisclosurePolicy, type SkillEvalEligibilitySource, type SkillEvalGovernanceOutcomeResult, type SkillEvalGovernancePurpose, type SkillEvalGovernanceSnapshotResult, type SkillEvalMutationOptions, type SkillEvalPosterResponse, type SkillEvalPosterResponseResult, type SkillEvalRevealField, type SkillEvalRevealResult, type SkillEvalReviewResponse, type SkillEvalReviewRoom, type SkillEvalReviewerEligibilityInput, type SkillEvalRewardEvent, type SubmitSkillEvalReviewRequest, type TemplateVariable, TokenManager, WalletUtils, WebSocketAuthHelper, type WebSocketAuthHelperConfig, type X402ExecuteActionOptions, X402PaymentRequiredSDKError, type X402ReceiptListParams, type X402VerifyHandoffOptions, canAccessAdmin, createBrowserClient, createPermissionChecker, createServerClient, SPAPSClient as default, defaultPermissionChecker, detectKeyType, getRoleAwareErrorMessage, getUserDisplay, getUserRole, hasPermission, isAdminAccount, isEnvelope, isErrorEnvelope, isSuccessEnvelope, unwrapEnvelope, unwrapNestedData, verifyCryptoWebhookSignature };
1286
+ export { type AdminConfig, type ApiKeyType, type CheckoutLineItem, type CheckoutLineItemPriceData, type CreateCheckoutSessionPayload, type CreateSkillEvalCaseRequest, type CreateSkillEvalGovernanceSnapshotRequest, DEFAULT_ADMIN_ACCOUNTS, type EmailSendOptions, type EmailSendResult, type EmailTemplate, type EmailTemplatePreview, type EntitlementCheckResult, type EntitlementListParams, type FeatureContext, type FeatureDefinition, FeatureEvaluator, type HeaderProvider, type ImportSkillEvalGovernanceOutcomeRequest, type IssueReportListParams, type IssueReportStatusParams, type PermissionCheckResult, PermissionChecker, type RespondToSkillEvalReviewRequest, type RevealSkillEvalEvidenceRequest, RoleHierarchy, SPAPSClient as SPAPS, SPAPSClient, type SPAPSConfig, type SPAPSEnvelope, type SkillEvalAccessMode, type SkillEvalActorAccess, type SkillEvalCandidateInput, type SkillEvalCandidateResponse, type SkillEvalCasePolicy, type SkillEvalCaseResponse, type SkillEvalConfidence, type SkillEvalCreateOptions, type SkillEvalDisclosurePolicy, type SkillEvalEligibilitySource, type SkillEvalGovernanceOutcomeResult, type SkillEvalGovernancePurpose, type SkillEvalGovernanceSnapshotResult, type SkillEvalInsight, type SkillEvalInsightsResponse, type SkillEvalModelEffort, type SkillEvalMutationOptions, type SkillEvalPosterResponse, type SkillEvalPosterResponseResult, type SkillEvalRevealField, type SkillEvalRevealResult, type SkillEvalReviewMarkInput, type SkillEvalReviewMarkKind, type SkillEvalReviewResponse, type SkillEvalReviewRoom, type SkillEvalReviewerEligibilityInput, type SkillEvalRewardEvent, type SubmitSkillEvalReviewRequest, type TemplateVariable, TokenManager, WalletUtils, WebSocketAuthHelper, type WebSocketAuthHelperConfig, type X402ExecuteActionOptions, X402PaymentRequiredSDKError, type X402ReceiptListParams, type X402VerifyHandoffOptions, canAccessAdmin, createBrowserClient, createPermissionChecker, createServerClient, SPAPSClient as default, defaultPermissionChecker, detectKeyType, getRoleAwareErrorMessage, getUserDisplay, getUserRole, hasPermission, isAdminAccount, isEnvelope, isErrorEnvelope, isSuccessEnvelope, unwrapEnvelope, unwrapNestedData, verifyCryptoWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as spaps_types from 'spaps-types';
2
2
  import { ResourceType, Entitlement, CreateProductRequest, Product, UpdateProductRequest, CreatePriceRequest, Price, ProductSyncResult, CryptoReconcileRequest, CreateSecureMessageRequest, SecureMessage, IssueReportScope, IssueReportStatusResult, IssueReportStatus, IssueReportListResult, IssueReport, CreateIssueReportRequest, IssueReportingVoiceTokenResult, UpdateIssueReportRequest, ReplyIssueReportRequest, CreateAppLinkRequest, AppLink, AuthResponse, User as User$1, CreateCryptoInvoiceRequest, CryptoInvoiceStatusSnapshot, CheckoutSession, X402ResourceStatusResponse, X402ActionResponse, X402ReceiptResponse, X402ReceiptListResponse, X402HandoffVerification, DayrateAvailabilityResponse, DayrateBookingRequest, DayrateBookingResponse, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayrateX402BookingRequest, DayrateX402BookingResponse, DayrateCheckoutStatusResponse, Subscription, UsageBalance, VerifyCryptoWebhookSignatureOptions } from 'spaps-types';
3
- export { AdminPermission, AdminRole, AdminUser, ApiResponse, AppLink, AuthResponse, CheckoutSession, CreateAppLinkRequest, CreateCryptoInvoiceRequest, CreateIssueReportRequest, CreatePriceRequest, CreateProductRequest, CreateSecureMessageInput, CreateSecureMessageRequest, CryptoInvoice, CryptoInvoiceResponse, CryptoInvoiceStatusSnapshot, CryptoReconcileRequest, DayrateAvailabilityResponse, DayrateAvailableSlot, DayrateBookingRequest, DayrateBookingResponse, DayrateCheckoutStatus, DayrateCheckoutStatusBooking, DayrateCheckoutStatusResponse, DayrateDayOfWeek, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayratePriceBreakdown, DayrateSlotType, DayrateX402BookingRequest, DayrateX402BookingResponse, Entitlement, IssueReport, IssueReportListResult, IssueReportStatus, IssueReportStatusResult, IssueReportTarget, IssueReportingInputMode, IssueReportingVoiceProvider, IssueReportingVoiceTokenResult, LinkedIssueReportCase, Price, Product, ProductSyncResult, ReplyIssueReportRequest, ResourceType, SecureMessage, SecureMessageOutput, Subscription, TokenPair, UpdateIssueReportRequest, UpdateProductRequest, UsageBalance, User, UserProfile, UserRole, UserWallet, VerifyCryptoWebhookSignatureOptions, X402ActionFreeResponse, X402ActionOutcome, X402ActionPendingResponse, X402ActionReplayedResponse, X402ActionResponse, X402ActionSettledResponse, X402ExecuteActionRequest, X402HandoffAuthorization, X402HandoffVerification, X402HandoffVerifyRequest, X402PaymentAccept, X402PaymentRequirement, X402ProjectionStatus, X402Receipt, X402ReceiptListResponse, X402ReceiptResponse, X402ReceiptStatus, X402Resource, X402ResourceStatus, X402ResourceStatusResponse, createSecureMessageRequestSchema, isX402PaymentRequired, isX402ResourceStatus, secureMessageMetadataSchema, secureMessageSchema } from 'spaps-types';
3
+ export { AdminPermission, AdminRole, AdminUser, ApiResponse, AppLink, AuthResponse, CheckoutSession, CreateAppLinkRequest, CreateCryptoInvoiceRequest, CreateIssueReportRequest, CreatePriceRequest, CreateProductRequest, CreateSecureMessageInput, CreateSecureMessageRequest, CryptoInvoice, CryptoInvoiceResponse, CryptoInvoiceStatusSnapshot, CryptoReconcileRequest, DayrateAvailabilityResponse, DayrateAvailableSlot, DayrateBookingRequest, DayrateBookingResponse, DayrateCheckoutStatus, DayrateCheckoutStatusBooking, DayrateCheckoutStatusResponse, DayrateDayOfWeek, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayratePriceBreakdown, DayrateSlotType, DayrateX402BookingRequest, DayrateX402BookingResponse, Entitlement, IssueReport, IssueReportListResult, IssueReportStatus, IssueReportStatusResult, IssueReportTarget, IssueReportingInputMode, IssueReportingVoiceProvider, IssueReportingVoiceTokenResult, LinkedIssueReportCase, Price, Product, ProductSyncResult, ReplyIssueReportRequest, ResourceType, SecureMessage, SecureMessageOutput, Subscription, TokenPair, UpdateIssueReportRequest, UpdateProductRequest, UsageBalance, User, UserProfile, UserRole, UserWallet, VerifyCryptoWebhookSignatureOptions, X402ActionFreeResponse, X402ActionOutcome, X402ActionPendingResponse, X402ActionReplayedResponse, X402ActionResponse, X402ActionSettledResponse, X402ExecuteActionRequest, X402HandoffAuthorization, X402HandoffVerification, X402HandoffVerifyRequest, X402PaymentAccept, X402PaymentRequirement, X402ProjectionStatus, X402Receipt, X402ReceiptListResponse, X402ReceiptResponse, X402ReceiptStatus, X402Resource, X402ResourceStatus, X402ResourceStatusResponse, atomicToMoneyUnits, createSecureMessageRequestSchema, isX402PaymentRequired, isX402ResourceStatus, moneyUnitsToAtomic, roundHalfToPositiveInfinity, secureMessageMetadataSchema, secureMessageSchema, validatePositiveAmountAtomic } from 'spaps-types';
4
4
 
5
5
  /**
6
6
  * Permission checking utilities for SPAPS SDK
@@ -383,8 +383,10 @@ interface X402VerifyHandoffOptions {
383
383
  type SkillEvalDisclosurePolicy = 'blind_then_controlled_reveal';
384
384
  type SkillEvalEligibilitySource = 'admin_assigned' | 'entitlement' | 'policy_import' | 'manual_override';
385
385
  type SkillEvalConfidence = 'low' | 'medium' | 'high';
386
+ type SkillEvalReviewMarkKind = 'valuable' | 'not_valuable';
386
387
  type SkillEvalPosterResponse = 'accepted' | 'rejected' | 'needs_clarification' | 'applied';
387
388
  type SkillEvalRevealField = 'skill_version_digest' | 'provenance_ref';
389
+ type SkillEvalAccessMode = 'public' | 'team_private';
388
390
  type SkillEvalGovernancePurpose = 'adopt_skill' | 'retire_skill' | 'merge_skill' | 'split_skill' | 'reviewer_policy' | 'fund_bounty';
389
391
  interface SkillEvalCandidateInput {
390
392
  candidate_id: string;
@@ -392,12 +394,33 @@ interface SkillEvalCandidateInput {
392
394
  evidence_summary: string;
393
395
  artifact_hash: string;
394
396
  artifact_mime: string;
397
+ jsonl_log_ref: string;
398
+ jsonl_log_hash: string;
399
+ skill_ref: string;
400
+ skill_version_ref: string;
395
401
  skill_version_digest: string;
402
+ model_id: string;
403
+ effort_level: string;
396
404
  provenance_ref: string;
397
405
  }
406
+ interface SkillEvalModelEffort {
407
+ model_id: string;
408
+ effort_level: string;
409
+ }
410
+ interface SkillEvalCasePolicy {
411
+ access_mode?: SkillEvalAccessMode;
412
+ allowed_model_efforts: SkillEvalModelEffort[];
413
+ min_contribution_score?: number | null;
414
+ contribution_score_source_ref?: string | null;
415
+ viewer_allowlist?: string[];
416
+ skill_user_allowlist?: string[];
417
+ participant_allowlist?: string[];
418
+ }
398
419
  interface SkillEvalReviewerEligibilityInput {
399
420
  reviewer_actor_id: string;
400
421
  eligibility_source?: SkillEvalEligibilitySource;
422
+ contribution_score?: number | null;
423
+ contribution_score_source_ref?: string | null;
401
424
  }
402
425
  interface CreateSkillEvalCaseRequest {
403
426
  title: string;
@@ -405,6 +428,7 @@ interface CreateSkillEvalCaseRequest {
405
428
  success_criteria: string[];
406
429
  candidates: SkillEvalCandidateInput[];
407
430
  disclosure_policy?: SkillEvalDisclosurePolicy;
431
+ case_policy: SkillEvalCasePolicy;
408
432
  idempotency_key: string;
409
433
  reviewer_eligibility?: SkillEvalReviewerEligibilityInput[];
410
434
  }
@@ -423,6 +447,9 @@ interface SkillEvalCaseResponse {
423
447
  x402_receipt_id?: string | null;
424
448
  payload_fingerprint?: string;
425
449
  case_version: number;
450
+ access_mode?: SkillEvalAccessMode;
451
+ case_policy?: SkillEvalCasePolicy;
452
+ actor_access?: SkillEvalActorAccess;
426
453
  created_at?: string | null;
427
454
  updated_at?: string | null;
428
455
  idempotent_replay?: boolean;
@@ -431,6 +458,11 @@ interface SkillEvalCaseResponse {
431
458
  success_criteria?: string[];
432
459
  candidates?: SkillEvalCandidateResponse[];
433
460
  }
461
+ interface SkillEvalActorAccess {
462
+ can_view: boolean;
463
+ can_use_skill: boolean;
464
+ can_participate: boolean;
465
+ }
434
466
  interface SkillEvalCandidateResponse {
435
467
  candidate_id: string;
436
468
  output_ref: string;
@@ -439,6 +471,10 @@ interface SkillEvalCandidateResponse {
439
471
  artifact_mime: string;
440
472
  skill_version_digest?: string;
441
473
  provenance_ref?: string;
474
+ jsonl_log_ref?: string;
475
+ jsonl_log_hash?: string;
476
+ model_id?: string;
477
+ effort_level?: string;
442
478
  }
443
479
  interface SkillEvalReviewRoom {
444
480
  case_id: string;
@@ -447,14 +483,24 @@ interface SkillEvalReviewRoom {
447
483
  success_criteria: string[];
448
484
  candidates: SkillEvalCandidateResponse[];
449
485
  reviewer_state: string;
486
+ actor_access?: SkillEvalActorAccess;
450
487
  case_version: number;
451
488
  }
489
+ interface SkillEvalReviewMarkInput {
490
+ candidate_id: string;
491
+ kind: SkillEvalReviewMarkKind;
492
+ note: string;
493
+ reason_code: string;
494
+ confidence: SkillEvalConfidence;
495
+ criterion?: string | null;
496
+ }
452
497
  interface SubmitSkillEvalReviewRequest {
453
- winner_candidate_id: string;
454
- rationale: string;
455
- missing_from_winner: string;
498
+ winner_candidate_id?: string | null;
499
+ rationale?: string | null;
500
+ missing_from_winner?: string | null;
456
501
  criteria_challenge?: string | null;
457
- confidence: SkillEvalConfidence;
502
+ confidence?: SkillEvalConfidence | null;
503
+ review_marks?: SkillEvalReviewMarkInput[];
458
504
  }
459
505
  interface SkillEvalRewardEvent {
460
506
  reward_event_id?: string;
@@ -463,17 +509,77 @@ interface SkillEvalRewardEvent {
463
509
  interface SkillEvalReviewResponse {
464
510
  review_id: string;
465
511
  status: string;
512
+ review_mark_counts?: {
513
+ valuable: number;
514
+ not_valuable: number;
515
+ };
466
516
  reward_event?: SkillEvalRewardEvent | null;
467
517
  }
518
+ interface SkillEvalInsight {
519
+ insight_ref: string;
520
+ mark_id?: string | null;
521
+ source_review_id: string;
522
+ reviewer_actor_id?: string | null;
523
+ source_review_created_at?: string | null;
524
+ candidate_id: string;
525
+ kind: SkillEvalReviewMarkKind;
526
+ note: string;
527
+ reason_code: string;
528
+ confidence: SkillEvalConfidence;
529
+ criterion?: string | null;
530
+ jsonl_log_ref: string;
531
+ jsonl_log_hash: string;
532
+ source_candidate?: {
533
+ output_ref?: string | null;
534
+ evidence_summary?: string | null;
535
+ artifact_hash?: string | null;
536
+ artifact_mime?: string | null;
537
+ model_id?: string | null;
538
+ effort_level?: string | null;
539
+ };
540
+ }
541
+ interface SkillEvalInsightsResponse {
542
+ case_id: string;
543
+ status?: string;
544
+ task_claim?: string;
545
+ success_criteria?: string[];
546
+ case_version?: number;
547
+ valuable: SkillEvalInsight[];
548
+ not_valuable: SkillEvalInsight[];
549
+ counts?: {
550
+ valuable: number;
551
+ not_valuable: number;
552
+ };
553
+ visibility_policy?: {
554
+ access_mode?: SkillEvalAccessMode;
555
+ actor_access?: SkillEvalActorAccess;
556
+ reviewer_identity_visible?: boolean;
557
+ case_policy?: SkillEvalCasePolicy;
558
+ };
559
+ }
468
560
  interface RespondToSkillEvalReviewRequest {
469
561
  response: SkillEvalPosterResponse;
470
562
  reason: string;
563
+ applied_insight_ref?: string | null;
471
564
  skill_change_ref?: string | null;
565
+ skill_version_before?: string | null;
566
+ skill_version_after?: string | null;
567
+ jsonl_log_ref?: string | null;
568
+ jsonl_log_hash?: string | null;
569
+ model_id?: string | null;
570
+ effort_level?: string | null;
472
571
  }
473
572
  interface SkillEvalPosterResponseResult {
474
573
  response_id: string;
475
574
  response: SkillEvalPosterResponse;
575
+ applied_insight_ref?: string | null;
476
576
  skill_change_ref?: string | null;
577
+ skill_version_before?: string | null;
578
+ skill_version_after?: string | null;
579
+ jsonl_log_ref?: string | null;
580
+ jsonl_log_hash?: string | null;
581
+ model_id?: string | null;
582
+ effort_level?: string | null;
477
583
  reward_event?: SkillEvalRewardEvent | null;
478
584
  }
479
585
  interface RevealSkillEvalEvidenceRequest {
@@ -948,6 +1054,7 @@ declare class SPAPSClient<SecureMessageMetadata extends Record<string, any> = Re
948
1054
  createCase: (payload: CreateSkillEvalCaseRequest, options?: SkillEvalCreateOptions) => Promise<SkillEvalCaseResponse>;
949
1055
  getCase: (caseId: string) => Promise<SkillEvalCaseResponse>;
950
1056
  getReviewRoom: (caseId: string) => Promise<SkillEvalReviewRoom>;
1057
+ getInsights: (caseId: string) => Promise<SkillEvalInsightsResponse>;
951
1058
  submitReview: (caseId: string, payload: SubmitSkillEvalReviewRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalReviewResponse>;
952
1059
  respondToReview: (caseId: string, reviewId: string, payload: RespondToSkillEvalReviewRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalPosterResponseResult>;
953
1060
  lockReviews: (caseId: string, options?: SkillEvalMutationOptions) => Promise<SkillEvalCaseResponse>;
@@ -1176,4 +1283,4 @@ declare function createServerClient(secretKey: string, options?: Omit<SPAPSConfi
1176
1283
  */
1177
1284
  declare function detectKeyType(key: string): ApiKeyType | null;
1178
1285
 
1179
- export { type AdminConfig, type ApiKeyType, type CheckoutLineItem, type CheckoutLineItemPriceData, type CreateCheckoutSessionPayload, type CreateSkillEvalCaseRequest, type CreateSkillEvalGovernanceSnapshotRequest, DEFAULT_ADMIN_ACCOUNTS, type EmailSendOptions, type EmailSendResult, type EmailTemplate, type EmailTemplatePreview, type EntitlementCheckResult, type EntitlementListParams, type FeatureContext, type FeatureDefinition, FeatureEvaluator, type HeaderProvider, type ImportSkillEvalGovernanceOutcomeRequest, type IssueReportListParams, type IssueReportStatusParams, type PermissionCheckResult, PermissionChecker, type RespondToSkillEvalReviewRequest, type RevealSkillEvalEvidenceRequest, RoleHierarchy, SPAPSClient as SPAPS, SPAPSClient, type SPAPSConfig, type SPAPSEnvelope, type SkillEvalCandidateInput, type SkillEvalCandidateResponse, type SkillEvalCaseResponse, type SkillEvalConfidence, type SkillEvalCreateOptions, type SkillEvalDisclosurePolicy, type SkillEvalEligibilitySource, type SkillEvalGovernanceOutcomeResult, type SkillEvalGovernancePurpose, type SkillEvalGovernanceSnapshotResult, type SkillEvalMutationOptions, type SkillEvalPosterResponse, type SkillEvalPosterResponseResult, type SkillEvalRevealField, type SkillEvalRevealResult, type SkillEvalReviewResponse, type SkillEvalReviewRoom, type SkillEvalReviewerEligibilityInput, type SkillEvalRewardEvent, type SubmitSkillEvalReviewRequest, type TemplateVariable, TokenManager, WalletUtils, WebSocketAuthHelper, type WebSocketAuthHelperConfig, type X402ExecuteActionOptions, X402PaymentRequiredSDKError, type X402ReceiptListParams, type X402VerifyHandoffOptions, canAccessAdmin, createBrowserClient, createPermissionChecker, createServerClient, SPAPSClient as default, defaultPermissionChecker, detectKeyType, getRoleAwareErrorMessage, getUserDisplay, getUserRole, hasPermission, isAdminAccount, isEnvelope, isErrorEnvelope, isSuccessEnvelope, unwrapEnvelope, unwrapNestedData, verifyCryptoWebhookSignature };
1286
+ export { type AdminConfig, type ApiKeyType, type CheckoutLineItem, type CheckoutLineItemPriceData, type CreateCheckoutSessionPayload, type CreateSkillEvalCaseRequest, type CreateSkillEvalGovernanceSnapshotRequest, DEFAULT_ADMIN_ACCOUNTS, type EmailSendOptions, type EmailSendResult, type EmailTemplate, type EmailTemplatePreview, type EntitlementCheckResult, type EntitlementListParams, type FeatureContext, type FeatureDefinition, FeatureEvaluator, type HeaderProvider, type ImportSkillEvalGovernanceOutcomeRequest, type IssueReportListParams, type IssueReportStatusParams, type PermissionCheckResult, PermissionChecker, type RespondToSkillEvalReviewRequest, type RevealSkillEvalEvidenceRequest, RoleHierarchy, SPAPSClient as SPAPS, SPAPSClient, type SPAPSConfig, type SPAPSEnvelope, type SkillEvalAccessMode, type SkillEvalActorAccess, type SkillEvalCandidateInput, type SkillEvalCandidateResponse, type SkillEvalCasePolicy, type SkillEvalCaseResponse, type SkillEvalConfidence, type SkillEvalCreateOptions, type SkillEvalDisclosurePolicy, type SkillEvalEligibilitySource, type SkillEvalGovernanceOutcomeResult, type SkillEvalGovernancePurpose, type SkillEvalGovernanceSnapshotResult, type SkillEvalInsight, type SkillEvalInsightsResponse, type SkillEvalModelEffort, type SkillEvalMutationOptions, type SkillEvalPosterResponse, type SkillEvalPosterResponseResult, type SkillEvalRevealField, type SkillEvalRevealResult, type SkillEvalReviewMarkInput, type SkillEvalReviewMarkKind, type SkillEvalReviewResponse, type SkillEvalReviewRoom, type SkillEvalReviewerEligibilityInput, type SkillEvalRewardEvent, type SubmitSkillEvalReviewRequest, type TemplateVariable, TokenManager, WalletUtils, WebSocketAuthHelper, type WebSocketAuthHelperConfig, type X402ExecuteActionOptions, X402PaymentRequiredSDKError, type X402ReceiptListParams, type X402VerifyHandoffOptions, canAccessAdmin, createBrowserClient, createPermissionChecker, createServerClient, SPAPSClient as default, defaultPermissionChecker, detectKeyType, getRoleAwareErrorMessage, getUserDisplay, getUserRole, hasPermission, isAdminAccount, isEnvelope, isErrorEnvelope, isSuccessEnvelope, unwrapEnvelope, unwrapNestedData, verifyCryptoWebhookSignature };
package/dist/index.js CHANGED
@@ -204,6 +204,7 @@ __export(index_exports, {
204
204
  WalletUtils: () => WalletUtils,
205
205
  WebSocketAuthHelper: () => WebSocketAuthHelper,
206
206
  X402PaymentRequiredSDKError: () => X402PaymentRequiredSDKError,
207
+ atomicToMoneyUnits: () => import_spaps_types.atomicToMoneyUnits,
207
208
  canAccessAdmin: () => canAccessAdmin,
208
209
  createBrowserClient: () => createBrowserClient,
209
210
  createPermissionChecker: () => createPermissionChecker,
@@ -222,10 +223,13 @@ __export(index_exports, {
222
223
  isSuccessEnvelope: () => isSuccessEnvelope,
223
224
  isX402PaymentRequired: () => import_spaps_types.isX402PaymentRequired,
224
225
  isX402ResourceStatus: () => import_spaps_types.isX402ResourceStatus,
226
+ moneyUnitsToAtomic: () => import_spaps_types.moneyUnitsToAtomic,
227
+ roundHalfToPositiveInfinity: () => import_spaps_types.roundHalfToPositiveInfinity,
225
228
  secureMessageMetadataSchema: () => import_spaps_types2.secureMessageMetadataSchema,
226
229
  secureMessageSchema: () => import_spaps_types2.secureMessageSchema,
227
230
  unwrapEnvelope: () => unwrapEnvelope,
228
231
  unwrapNestedData: () => unwrapNestedData,
232
+ validatePositiveAmountAtomic: () => import_spaps_types.validatePositiveAmountAtomic,
229
233
  verifyCryptoWebhookSignature: () => verifyCryptoWebhookSignature
230
234
  });
231
235
  module.exports = __toCommonJS(index_exports);
@@ -1488,6 +1492,15 @@ var SPAPSClient = class _SPAPSClient {
1488
1492
  );
1489
1493
  return this.unwrapApiResponse(res, "Failed to get skill eval room");
1490
1494
  },
1495
+ getInsights: async (caseId) => {
1496
+ const res = await this.client.get(
1497
+ `/api/skill-evals/cases/${encodeURIComponent(caseId)}/insights`
1498
+ );
1499
+ return this.unwrapApiResponse(
1500
+ res,
1501
+ "Failed to get skill eval insights"
1502
+ );
1503
+ },
1491
1504
  submitReview: async (caseId, payload, options) => {
1492
1505
  const config = this.skillEvalMutationConfig(options);
1493
1506
  const res = await this.client.post(
@@ -2090,6 +2103,7 @@ function detectKeyType(key) {
2090
2103
  WalletUtils,
2091
2104
  WebSocketAuthHelper,
2092
2105
  X402PaymentRequiredSDKError,
2106
+ atomicToMoneyUnits,
2093
2107
  canAccessAdmin,
2094
2108
  createBrowserClient,
2095
2109
  createPermissionChecker,
@@ -2107,9 +2121,12 @@ function detectKeyType(key) {
2107
2121
  isSuccessEnvelope,
2108
2122
  isX402PaymentRequired,
2109
2123
  isX402ResourceStatus,
2124
+ moneyUnitsToAtomic,
2125
+ roundHalfToPositiveInfinity,
2110
2126
  secureMessageMetadataSchema,
2111
2127
  secureMessageSchema,
2112
2128
  unwrapEnvelope,
2113
2129
  unwrapNestedData,
2130
+ validatePositiveAmountAtomic,
2114
2131
  verifyCryptoWebhookSignature
2115
2132
  });
package/dist/index.mjs CHANGED
@@ -192,7 +192,11 @@ import crypto from "crypto";
192
192
  import axios from "axios";
193
193
  import {
194
194
  isX402PaymentRequired,
195
- isX402ResourceStatus
195
+ isX402ResourceStatus,
196
+ atomicToMoneyUnits,
197
+ moneyUnitsToAtomic,
198
+ roundHalfToPositiveInfinity,
199
+ validatePositiveAmountAtomic
196
200
  } from "spaps-types";
197
201
  import {
198
202
  createSecureMessageRequestSchema,
@@ -1453,6 +1457,15 @@ var SPAPSClient = class _SPAPSClient {
1453
1457
  );
1454
1458
  return this.unwrapApiResponse(res, "Failed to get skill eval room");
1455
1459
  },
1460
+ getInsights: async (caseId) => {
1461
+ const res = await this.client.get(
1462
+ `/api/skill-evals/cases/${encodeURIComponent(caseId)}/insights`
1463
+ );
1464
+ return this.unwrapApiResponse(
1465
+ res,
1466
+ "Failed to get skill eval insights"
1467
+ );
1468
+ },
1456
1469
  submitReview: async (caseId, payload, options) => {
1457
1470
  const config = this.skillEvalMutationConfig(options);
1458
1471
  const res = await this.client.post(
@@ -2054,6 +2067,7 @@ export {
2054
2067
  WalletUtils,
2055
2068
  WebSocketAuthHelper,
2056
2069
  X402PaymentRequiredSDKError,
2070
+ atomicToMoneyUnits,
2057
2071
  canAccessAdmin,
2058
2072
  createBrowserClient,
2059
2073
  createPermissionChecker,
@@ -2072,9 +2086,12 @@ export {
2072
2086
  isSuccessEnvelope,
2073
2087
  isX402PaymentRequired,
2074
2088
  isX402ResourceStatus,
2089
+ moneyUnitsToAtomic,
2090
+ roundHalfToPositiveInfinity,
2075
2091
  secureMessageMetadataSchema,
2076
2092
  secureMessageSchema,
2077
2093
  unwrapEnvelope,
2078
2094
  unwrapNestedData,
2095
+ validatePositiveAmountAtomic,
2079
2096
  verifyCryptoWebhookSignature
2080
2097
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spaps-sdk",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Sweet Potato Authentication & Payment Service SDK - Zero-config client with built-in permission checking, role-based access control, and dayrate scheduling",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "dependencies": {
52
52
  "axios": "^1.15.1",
53
53
  "cross-fetch": "^4.0.0",
54
- "spaps-types": "^1.1.4"
54
+ "spaps-types": "^1.2.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/node": "^20.10.0",