@inferencesh/sdk 0.20.1 → 0.22.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/dist/agent/actions.js +1 -4
  3. package/dist/agent/api.d.ts +37 -6
  4. package/dist/agent/api.js +37 -3
  5. package/dist/agent/reducer.js +23 -7
  6. package/dist/agent/types.d.ts +30 -5
  7. package/dist/api/agents.d.ts +9 -3
  8. package/dist/api/agents.js +87 -65
  9. package/dist/api/api-keys.d.ts +2 -5
  10. package/dist/api/apps.d.ts +9 -2
  11. package/dist/api/apps.js +9 -1
  12. package/dist/api/chats.d.ts +13 -3
  13. package/dist/api/chats.js +13 -2
  14. package/dist/api/engines.d.ts +4 -2
  15. package/dist/api/engines.js +3 -2
  16. package/dist/api/flow-runs.d.ts +7 -2
  17. package/dist/api/flow-runs.js +7 -2
  18. package/dist/api/flows.d.ts +13 -2
  19. package/dist/api/flows.js +15 -1
  20. package/dist/api/knowledge.d.ts +7 -4
  21. package/dist/api/knowledge.js +6 -4
  22. package/dist/api/mcp-servers.d.ts +2 -1
  23. package/dist/api/projects.d.ts +5 -3
  24. package/dist/api/projects.js +3 -2
  25. package/dist/api/secrets.d.ts +2 -2
  26. package/dist/api/tasks.js +39 -60
  27. package/dist/api/teams.d.ts +4 -2
  28. package/dist/api/teams.js +3 -2
  29. package/dist/api/write-bodies.d.ts +110 -0
  30. package/dist/api/write-bodies.js +1 -0
  31. package/dist/http/client.d.ts +68 -7
  32. package/dist/http/client.js +138 -97
  33. package/dist/http/index.d.ts +2 -2
  34. package/dist/http/loopback.d.ts +8 -0
  35. package/dist/http/loopback.js +18 -0
  36. package/dist/http/stream-until-terminal.d.ts +55 -0
  37. package/dist/http/stream-until-terminal.js +88 -0
  38. package/dist/http/stream.d.ts +1 -0
  39. package/dist/http/stream.js +7 -3
  40. package/dist/http/streamable.d.ts +25 -5
  41. package/dist/http/streamable.js +28 -40
  42. package/dist/index.d.ts +4 -2
  43. package/dist/index.js +1 -0
  44. package/dist/proxy/endpoints.json +156 -0
  45. package/dist/proxy/express.d.ts +5 -6
  46. package/dist/proxy/express.js +18 -2
  47. package/dist/proxy/hono.d.ts +5 -3
  48. package/dist/proxy/hono.js +4 -3
  49. package/dist/proxy/index.d.ts +165 -6
  50. package/dist/proxy/index.js +409 -25
  51. package/dist/proxy/nextjs.d.ts +29 -17
  52. package/dist/proxy/nextjs.js +72 -62
  53. package/dist/proxy/remix.d.ts +5 -3
  54. package/dist/proxy/remix.js +4 -3
  55. package/dist/proxy/svelte.d.ts +5 -4
  56. package/dist/proxy/svelte.js +4 -4
  57. package/dist/types.d.ts +591 -271
  58. package/dist/types.js +117 -252
  59. package/dist/version.d.ts +1 -0
  60. package/dist/version.js +7 -0
  61. package/package.json +2 -1
package/dist/types.js CHANGED
@@ -203,6 +203,12 @@ export const ScopeSecretsRead = "secrets:read";
203
203
  * Empty scopes = full access (for backwards compatibility with existing keys).
204
204
  */
205
205
  export const ScopeSecretsWrite = "secrets:write";
206
+ /**
207
+ * ScopeSecretsReveal reads a secret's plaintext value. A key holding
208
+ * secrets:read holds it too (keys revealed with secrets:read before it
209
+ * existed); an app's OAuth token or a bound session never does.
210
+ */
211
+ export const ScopeSecretsReveal = "secrets:reveal";
206
212
  /**
207
213
  * Action-level scopes for credentials (connected accounts, vaults,
208
214
  * auth schemes, MCP servers).
@@ -284,6 +290,32 @@ export const ScopeSettingsRead = "settings:read";
284
290
  * Empty scopes = full access (for backwards compatibility with existing keys).
285
291
  */
286
292
  export const ScopeSettingsWrite = "settings:write";
293
+ /**
294
+ * Approvals: answering a human-in-the-loop question (a tool approval, a
295
+ * gate, a widget or MCP input request, always-allow) and widening a
296
+ * chat's approval policy (allow every tool, skip hooks, allow rules).
297
+ * Held only by the account holder's own sign-in.
298
+ */
299
+ export const ScopeApprovalsWrite = "approvals:write";
300
+ /**
301
+ * ScopeAdminRead views platform administration (/admin GET). Held
302
+ * only by an admin's own sign-in; the route's admin gate decides
303
+ * whether it carries power.
304
+ */
305
+ export const ScopeAdminRead = "admin:read";
306
+ /**
307
+ * ScopeAdminWrite changes platform administration (/admin). Held only
308
+ * by an admin's own sign-in.
309
+ */
310
+ export const ScopeAdminWrite = "admin:write";
311
+ /**
312
+ * ScopeAdminPricing reads and changes store pricing: a version's
313
+ * terms, its draft pricing (edit, evaluate, discard, publish, apply to
314
+ * the listing) and the sample tasks drafts are evaluated against. Held
315
+ * by an admin's own sign-in with platform power, and by a key of the
316
+ * platform's automation account (ScopeDefinition.Automation).
317
+ */
318
+ export const ScopeAdminPricing = "admin:pricing";
287
319
  export const ScopeGroupAgents = "agents";
288
320
  export const ScopeGroupApps = "apps";
289
321
  export const ScopeGroupConversations = "conversations";
@@ -302,6 +334,8 @@ export const ScopeGroupKnowledge = "knowledge";
302
334
  export const ScopeGroupArtifacts = "artifacts";
303
335
  export const ScopeGroupUser = "user";
304
336
  export const ScopeGroupSettings = "settings";
337
+ export const ScopeGroupApprovals = "approvals";
338
+ export const ScopeGroupAdmin = "admin";
305
339
  /**
306
340
  * AlwaysAllowScopeExact: this call exactly (each piece of the command,
307
341
  * the file, the domain).
@@ -379,7 +413,59 @@ export const ErrorCodeAccountBanned = "account_banned";
379
413
  */
380
414
  export const ErrorCodePersonRequired = "person_required";
381
415
  export const ErrorCodeOTPRequired = "otp_required";
416
+ /**
417
+ * ErrorCodeRequiresSignIn (403): the action needs a scope only the
418
+ * account holder's own sign-in holds (answering an approval, widening a
419
+ * chat's approval policy, the account, API keys, billing changes,
420
+ * admin), and the request carried an API key, an app's OAuth token or
421
+ * another delegated credential. Sign in on the web app or with `belt
422
+ * login` to do it.
423
+ */
424
+ export const ErrorCodeRequiresSignIn = "requires_sign_in";
425
+ /**
426
+ * ErrorCodeInsufficientScope (403): the credential does not hold the
427
+ * scope the operation takes (an API key, an app's OAuth token or a
428
+ * narrowed login granted less). The detail names the scope.
429
+ */
430
+ export const ErrorCodeInsufficientScope = "insufficient_scope";
431
+ /**
432
+ * ErrorCodeImpersonationReasonRequired (403): a platform admin named a
433
+ * team they are not a member of without a live impersonation grant.
434
+ * Clients stop viewing as the team on it.
435
+ */
436
+ export const ErrorCodeImpersonationReasonRequired = "impersonation_reason_required";
382
437
  export const ErrorCodeMCPAuthExpired = "mcp_auth_expired";
438
+ /**
439
+ * Admin elevation ("belt admin elevate"). AdminSessionRequired (403): a
440
+ * platform admin's credential that carries no admin power reached an
441
+ * admin route; a CLI login gets it by elevating. CLISessionRequired
442
+ * (403): only a CLI login may ask to be elevated. AdminRequired (403):
443
+ * only a platform admin may ask for or grant one. SameAdminRequired
444
+ * (403): the elevation was asked for by another account.
445
+ * BrowserSessionRequired (403): only the admin's own browser sign-in
446
+ * grants one, and only the person's own browser sign-in changes how the
447
+ * account is signed into (authenticator enrollment, RequireBrowserSession).
448
+ * InvalidTTL (400): the elevation asked for a window outside
449
+ * models.AdminElevationMinTTL..AdminElevationMaxTTL.
450
+ * AdminScopesNotApproved (403): a platform admin's CLI login was approved
451
+ * with a scope list that does not name the admin scopes, so it can't be
452
+ * elevated: log in again approving them, then elevate.
453
+ */
454
+ export const ErrorCodeAdminSessionRequired = "admin_session_required";
455
+ export const ErrorCodeAdminScopesNotApproved = "admin_scopes_not_approved";
456
+ export const ErrorCodeCLISessionRequired = "cli_session_required";
457
+ export const ErrorCodeAdminRequired = "admin_required";
458
+ export const ErrorCodeSameAdminRequired = "same_admin_required";
459
+ export const ErrorCodeBrowserSessionRequired = "browser_session_required";
460
+ export const ErrorCodeInvalidTTL = "invalid_ttl";
461
+ /**
462
+ * AdminAuthenticatorRequired (403): a platform admin without an
463
+ * authenticator app (TOTP) enrolled. Admin power needs one; until it is
464
+ * enrolled (POST /auth/totp/enroll, then /auth/totp/confirm) the admin
465
+ * works as an ordinary member. An admin who has one but whose session
466
+ * has not proved it gets otp_required instead: re-authenticate with it.
467
+ */
468
+ export const ErrorCodeAdminAuthenticatorRequired = "admin_authenticator_required";
383
469
  /**
384
470
  * Entitlements. LimitExceeded (402) and FeatureNotAvailable (403) carry
385
471
  * EntitlementErrorMeta. EntitlementUnavailable (500) means the plan could
@@ -412,6 +498,32 @@ export const ErrorCodeAlreadyClaimed = "already_claimed";
412
498
  */
413
499
  export const ErrorCodeAlreadyEntitled = "already_entitled";
414
500
  export const ErrorCodeRequestOpen = "request_open";
501
+ /**
502
+ * Authorization codes (device sign-in, admin elevation) (400): the code
503
+ * is unknown, already approved or denied, or past its expiry.
504
+ */
505
+ export const ErrorCodeInvalidCode = "invalid_code";
506
+ export const ErrorCodeAlreadyProcessed = "already_processed";
507
+ export const ErrorCodeExpired = "expired";
508
+ /**
509
+ * Run-time refusals. AppRetired (410): the app no longer runs.
510
+ * AppMaintenance (503, Retry-After): the owner paused it; the message is
511
+ * theirs. InvalidTransition (409): the task already moved on.
512
+ */
513
+ export const ErrorCodeAppRetired = "app_retired";
514
+ export const ErrorCodeAppMaintenance = "app_maintenance";
515
+ export const ErrorCodeInvalidTransition = "invalid_transition";
516
+ /**
517
+ * Session-bound runs. SessionNotFound (404), SessionExpired and
518
+ * SessionEnded (410), WorkerLeased, AppMismatch and VersionMismatch
519
+ * (409). The SDKs match these upper-case strings.
520
+ */
521
+ export const ErrorCodeSessionNotFound = "SESSION_NOT_FOUND";
522
+ export const ErrorCodeSessionExpired = "SESSION_EXPIRED";
523
+ export const ErrorCodeSessionEnded = "SESSION_ENDED";
524
+ export const ErrorCodeWorkerLeased = "WORKER_LEASED";
525
+ export const ErrorCodeAppMismatch = "APP_MISMATCH";
526
+ export const ErrorCodeVersionMismatch = "VERSION_MISMATCH";
415
527
  /**
416
528
  * Remote harness refusals.
417
529
  */
@@ -602,258 +714,6 @@ export const AppCategoryFlow = "flow";
602
714
  * Decision models: typed questions in, a probability for every answer out, no generation.
603
715
  */
604
716
  export const AppCategoryDecision = "decision";
605
- /**
606
- * The list holds tags that at least three public apps carry, so each one
607
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
608
- */
609
- export const AppTagTextToImage = "text-to-image";
610
- /**
611
- * The list holds tags that at least three public apps carry, so each one
612
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
613
- */
614
- export const AppTagImageToImage = "image-to-image";
615
- /**
616
- * The list holds tags that at least three public apps carry, so each one
617
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
618
- */
619
- export const AppTagImageEditing = "image-editing";
620
- /**
621
- * The list holds tags that at least three public apps carry, so each one
622
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
623
- */
624
- export const AppTagImageUpscaling = "image-upscaling";
625
- /**
626
- * The list holds tags that at least three public apps carry, so each one
627
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
628
- */
629
- export const AppTagBackgroundRemoval = "background-removal";
630
- /**
631
- * The list holds tags that at least three public apps carry, so each one
632
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
633
- */
634
- export const AppTagTraining = "training";
635
- /**
636
- * The list holds tags that at least three public apps carry, so each one
637
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
638
- */
639
- export const AppTagLoRA = "lora";
640
- /**
641
- * The list holds tags that at least three public apps carry, so each one
642
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
643
- */
644
- export const AppTagPBRMaterials = "pbr-materials";
645
- /**
646
- * The list holds tags that at least three public apps carry, so each one
647
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
648
- */
649
- export const AppTagTextToVideo = "text-to-video";
650
- /**
651
- * The list holds tags that at least three public apps carry, so each one
652
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
653
- */
654
- export const AppTagImageToVideo = "image-to-video";
655
- /**
656
- * The list holds tags that at least three public apps carry, so each one
657
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
658
- */
659
- export const AppTagReferenceToVideo = "reference-to-video";
660
- /**
661
- * The list holds tags that at least three public apps carry, so each one
662
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
663
- */
664
- export const AppTagVideoToVideo = "video-to-video";
665
- /**
666
- * The list holds tags that at least three public apps carry, so each one
667
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
668
- */
669
- export const AppTagVideoUpscaling = "video-upscaling";
670
- /**
671
- * The list holds tags that at least three public apps carry, so each one
672
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
673
- */
674
- export const AppTagVideoExtension = "video-extension";
675
- /**
676
- * The list holds tags that at least three public apps carry, so each one
677
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
678
- */
679
- export const AppTagVideoEnhancement = "video-enhancement";
680
- /**
681
- * The list holds tags that at least three public apps carry, so each one
682
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
683
- */
684
- export const AppTagLipSync = "lip-sync";
685
- /**
686
- * The list holds tags that at least three public apps carry, so each one
687
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
688
- */
689
- export const AppTagTalkingAvatar = "talking-avatar";
690
- /**
691
- * The list holds tags that at least three public apps carry, so each one
692
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
693
- */
694
- export const AppTagNativeAudio = "native-audio";
695
- /**
696
- * The list holds tags that at least three public apps carry, so each one
697
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
698
- */
699
- export const AppTagTextToSpeech = "text-to-speech";
700
- /**
701
- * The list holds tags that at least three public apps carry, so each one
702
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
703
- */
704
- export const AppTagSpeechToText = "speech-to-text";
705
- /**
706
- * The list holds tags that at least three public apps carry, so each one
707
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
708
- */
709
- export const AppTagVoiceCloning = "voice-cloning";
710
- /**
711
- * The list holds tags that at least three public apps carry, so each one
712
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
713
- */
714
- export const AppTagVoiceDesign = "voice-design";
715
- /**
716
- * The list holds tags that at least three public apps carry, so each one
717
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
718
- */
719
- export const AppTagMusicGeneration = "music-generation";
720
- /**
721
- * The list holds tags that at least three public apps carry, so each one
722
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
723
- */
724
- export const AppTagSoundEffects = "sound-effects";
725
- /**
726
- * The list holds tags that at least three public apps carry, so each one
727
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
728
- */
729
- export const AppTagRealtime = "realtime";
730
- /**
731
- * The list holds tags that at least three public apps carry, so each one
732
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
733
- */
734
- export const AppTagReasoning = "reasoning";
735
- /**
736
- * The list holds tags that at least three public apps carry, so each one
737
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
738
- */
739
- export const AppTagVision = "vision";
740
- /**
741
- * The list holds tags that at least three public apps carry, so each one
742
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
743
- */
744
- export const AppTagCoding = "coding";
745
- /**
746
- * The list holds tags that at least three public apps carry, so each one
747
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
748
- */
749
- export const AppTagOpenWeights = "open-weights";
750
- /**
751
- * The list holds tags that at least three public apps carry, so each one
752
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
753
- */
754
- export const AppTagClassification = "classification";
755
- /**
756
- * The list holds tags that at least three public apps carry, so each one
757
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
758
- */
759
- export const AppTagModeration = "moderation";
760
- /**
761
- * The list holds tags that at least three public apps carry, so each one
762
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
763
- */
764
- export const AppTagRouting = "routing";
765
- /**
766
- * The list holds tags that at least three public apps carry, so each one
767
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
768
- */
769
- export const AppTagWebSearch = "web-search";
770
- /**
771
- * The list holds tags that at least three public apps carry, so each one
772
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
773
- */
774
- export const AppTagWebScraping = "web-scraping";
775
- /**
776
- * The list holds tags that at least three public apps carry, so each one
777
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
778
- */
779
- export const AppTagDeepResearch = "deep-research";
780
- /**
781
- * The list holds tags that at least three public apps carry, so each one
782
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
783
- */
784
- export const AppTagResearchPapers = "research-papers";
785
- /**
786
- * The list holds tags that at least three public apps carry, so each one
787
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
788
- */
789
- export const AppTagSocialMedia = "social-media";
790
- /**
791
- * The list holds tags that at least three public apps carry, so each one
792
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
793
- */
794
- export const AppTagMessaging = "messaging";
795
- /**
796
- * The list holds tags that at least three public apps carry, so each one
797
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
798
- */
799
- export const AppTagProductivity = "productivity";
800
- /**
801
- * The list holds tags that at least three public apps carry, so each one
802
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
803
- */
804
- export const AppTagMediaUtilities = "media-utilities";
805
- /**
806
- * The list holds tags that at least three public apps carry, so each one
807
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
808
- */
809
- export const AppTagRendering = "rendering";
810
- /**
811
- * The list holds tags that at least three public apps carry, so each one
812
- * leads somewhere. A tag on fewer apps stays a plain tag until it does.
813
- */
814
- export const AppTagEvaluation = "evaluation";
815
- export const AppTagTitleTextToImage = "Text to Image";
816
- export const AppTagTitleImageToImage = "Image to Image";
817
- export const AppTagTitleImageEditing = "Image Editing";
818
- export const AppTagTitleImageUpscaling = "Image Upscaling";
819
- export const AppTagTitleBackgroundRemoval = "Background Removal";
820
- export const AppTagTitleTraining = "Model Training";
821
- export const AppTagTitleLoRA = "LoRA";
822
- export const AppTagTitlePBRMaterials = "PBR Materials";
823
- export const AppTagTitleTextToVideo = "Text to Video";
824
- export const AppTagTitleImageToVideo = "Image to Video";
825
- export const AppTagTitleReferenceToVideo = "Reference to Video";
826
- export const AppTagTitleVideoToVideo = "Video to Video";
827
- export const AppTagTitleVideoUpscaling = "Video Upscaling";
828
- export const AppTagTitleVideoExtension = "Video Extension";
829
- export const AppTagTitleVideoEnhancement = "Video Enhancement";
830
- export const AppTagTitleLipSync = "Lip Sync";
831
- export const AppTagTitleTalkingAvatar = "Talking Avatar";
832
- export const AppTagTitleNativeAudio = "Native Audio";
833
- export const AppTagTitleTextToSpeech = "Text to Speech";
834
- export const AppTagTitleSpeechToText = "Speech to Text";
835
- export const AppTagTitleVoiceCloning = "Voice Cloning";
836
- export const AppTagTitleVoiceDesign = "Voice Design";
837
- export const AppTagTitleMusicGeneration = "Music Generation";
838
- export const AppTagTitleSoundEffects = "Sound Effects";
839
- export const AppTagTitleRealtime = "Realtime";
840
- export const AppTagTitleReasoning = "Reasoning";
841
- export const AppTagTitleVision = "Vision";
842
- export const AppTagTitleCoding = "Coding";
843
- export const AppTagTitleOpenWeights = "Open Weights";
844
- export const AppTagTitleClassification = "Classification";
845
- export const AppTagTitleModeration = "Moderation";
846
- export const AppTagTitleRouting = "Routing";
847
- export const AppTagTitleWebSearch = "Web Search";
848
- export const AppTagTitleWebScraping = "Web Scraping";
849
- export const AppTagTitleDeepResearch = "Deep Research";
850
- export const AppTagTitleResearchPapers = "Research Papers";
851
- export const AppTagTitleSocialMedia = "Social Media";
852
- export const AppTagTitleMessaging = "Messaging";
853
- export const AppTagTitleProductivity = "Productivity";
854
- export const AppTagTitleMediaUtilities = "Media Utilities";
855
- export const AppTagTitleRendering = "Rendering";
856
- export const AppTagTitleEvaluation = "Evaluation";
857
717
  export const AppStatusActive = "active";
858
718
  export const AppStatusMaintenance = "maintenance";
859
719
  export const AppStatusDeprecated = "deprecated";
@@ -1444,6 +1304,11 @@ export const PolicyKindFlow = "Flow";
1444
1304
  * PolicyKindWebFetch: fetched domains.
1445
1305
  */
1446
1306
  export const PolicyKindWebFetch = "WebFetch";
1307
+ /**
1308
+ * PolicyKindSecretSend: an agent of another team sending the runner's
1309
+ * secrets to a host.
1310
+ */
1311
+ export const PolicyKindSecretSend = "SecretSend";
1447
1312
  /**
1448
1313
  * FunctionKindRun takes an input and returns an output (optionally
1449
1314
  * yielding progress on the way). The zero value means this.
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION: string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * SDK version string, sent in the X-Client-Source header. Read from
3
+ * package.json so the version has one source; `../package.json` resolves from
4
+ * both src/ and dist/, and npm always ships package.json.
5
+ */
6
+ import pkg from '../package.json' with { type: 'json' };
7
+ export const SDK_VERSION = pkg.version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.20.1",
3
+ "version": "0.22.0",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,6 +12,7 @@
12
12
  "default": "./dist/index.js"
13
13
  },
14
14
  "./proxy": {
15
+ "inference-src": "./src/proxy/index.ts",
15
16
  "types": "./dist/proxy/index.d.ts",
16
17
  "default": "./dist/proxy/index.js"
17
18
  },