@inferencesh/sdk 0.6.47 → 0.6.49

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/dist/types.js CHANGED
@@ -221,6 +221,22 @@ export const ScopeKnowledgeRead = "knowledge:read";
221
221
  * Empty scopes = full access (for backwards compatibility with existing keys).
222
222
  */
223
223
  export const ScopeKnowledgeWrite = "knowledge:write";
224
+ /**
225
+ * Action-level scopes for Artifacts (published HTML/Markdown pages)
226
+ */
227
+ export const ScopeArtifacts = "artifacts";
228
+ /**
229
+ * API Key Scopes - hierarchical permission system.
230
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
231
+ * Empty scopes = full access (for backwards compatibility with existing keys).
232
+ */
233
+ export const ScopeArtifactsRead = "artifacts:read";
234
+ /**
235
+ * API Key Scopes - hierarchical permission system.
236
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
237
+ * Empty scopes = full access (for backwards compatibility with existing keys).
238
+ */
239
+ export const ScopeArtifactsWrite = "artifacts:write";
224
240
  /**
225
241
  * Action-level scopes for User profile
226
242
  */
@@ -255,6 +271,7 @@ export const ScopeGroupIntegrations = "integrations";
255
271
  export const ScopeGroupEngines = "engines";
256
272
  export const ScopeGroupApiKeys = "apikeys";
257
273
  export const ScopeGroupKnowledge = "knowledge";
274
+ export const ScopeGroupArtifacts = "artifacts";
258
275
  export const ScopeGroupUser = "user";
259
276
  export const ScopeGroupSettings = "settings";
260
277
  /**
@@ -398,62 +415,10 @@ export const A2UISpacer = "Spacer";
398
415
  export const A2UIChart = "Chart";
399
416
  export const A2UIForm = "Form";
400
417
  /**
401
- * Run lifecycle
402
- */
403
- export const AgentEventRunStarted = "run.started";
404
- export const AgentEventRunStateChanged = "run.state_changed";
405
- /**
406
- * Turn lifecycle
407
- */
408
- export const AgentEventTurnStarted = "turn.started";
409
- export const AgentEventTurnCompleted = "turn.completed";
410
- /**
411
- * Content streaming — structural wrapper; high-frequency token deltas
412
- * still flow via the existing DeltaEvent channel for efficiency.
413
- */
414
- export const AgentEventContentDelta = "content.delta";
415
- /**
416
- * Tool lifecycle
418
+ * Artifact embeds a published artifact (sandboxed page) with a link to
419
+ * the viewer. Rendered from the artifact's /render endpoint.
417
420
  */
418
- export const AgentEventToolStarted = "tool.started";
419
- export const AgentEventToolCompleted = "tool.completed";
420
- /**
421
- * Approval flow
422
- */
423
- export const AgentEventApprovalRequired = "approval.required";
424
- export const AgentEventApprovalResolved = "approval.resolved";
425
- /**
426
- * Hook lifecycle
427
- */
428
- export const AgentEventHookExecuted = "hook.executed";
429
- /**
430
- * Usage
431
- */
432
- export const AgentEventUsageUpdated = "usage.updated";
433
- /**
434
- * Context management
435
- */
436
- export const AgentEventContextCompacted = "context.compacted";
437
- /**
438
- * Errors
439
- */
440
- export const AgentEventError = "error";
441
- export const ContentDeltaText = "text";
442
- export const ContentDeltaReasoning = "reasoning";
443
- export const AgentRunStateSubmitted = "submitted";
444
- export const AgentRunStateWorking = "working";
445
- export const AgentRunStateInputRequired = "input_required";
446
- export const AgentRunStateAuthRequired = "auth_required";
447
- export const AgentRunStateCompleted = "completed";
448
- export const AgentRunStateFailed = "failed";
449
- export const AgentRunStateCanceled = "canceled";
450
- export const AgentRunStateRejected = "rejected";
451
- export const InterruptReasonToolApproval = "tool_approval";
452
- export const InterruptReasonClientTool = "client_tool";
453
- export const InterruptReasonWidget = "widget";
454
- export const InterruptReasonAuth = "auth";
455
- export const InterruptReasonConfirmation = "confirmation";
456
- export const InterruptReasonHookGate = "hook_gate";
421
+ export const A2UIArtifact = "Artifact";
457
422
  export const AppCategoryImage = "image";
458
423
  export const AppCategoryVideo = "video";
459
424
  export const AppCategoryAudio = "audio";
@@ -474,10 +439,22 @@ export const GPUTypeAMD = "amd";
474
439
  export const GPUTypeApple = "apple";
475
440
  export const VisibilityPrivate = "private";
476
441
  export const VisibilityTeam = "team";
442
+ /**
443
+ * VisibilityOrg sits between team and public: visible to every member of
444
+ * every team in the owning team's org (INF-795 Phase 2).
445
+ */
446
+ export const VisibilityOrg = "org";
477
447
  export const VisibilityPublic = "public";
478
448
  export const VisibilityUnlisted = "unlisted";
479
449
  export const PermRead = "read";
480
450
  export const PermWrite = "write";
451
+ /**
452
+ * PermUse is execute intent: run an app, load a skill/knowledge into an
453
+ * agent context, invoke an MCP tool. Distinct from read — a public
454
+ * resource is readable by everyone, but whether this caller may USE it is
455
+ * governed by their team/org usage policy (reach, INF-808).
456
+ */
457
+ export const PermUse = "use";
481
458
  export const SubscriptionStatusTrialing = "trialing";
482
459
  export const SubscriptionStatusActive = "active";
483
460
  export const SubscriptionStatusPastDue = "past_due";
@@ -494,6 +471,9 @@ export const EntitlementSourceTrial = "trial";
494
471
  export const EntitlementSourceAddon = "addon";
495
472
  export const EntitlementTypeBoolean = "boolean";
496
473
  export const EntitlementTypeLimit = "limit";
474
+ export const EntitlementScopeOrg = "org";
475
+ export const EntitlementScopeTeam = "team";
476
+ export const EntitlementScopeMember = "member";
497
477
  export const EnforcementBlock = "block";
498
478
  export const EnforcementWarn = "warn";
499
479
  export const ChatStatusBusy = "busy";
@@ -580,31 +560,6 @@ export const GraphEdgeTypeReferences = "references";
580
560
  export const GraphEdgeTypeSupersedes = "supersedes";
581
561
  export const GraphEdgeTypeInput = "input";
582
562
  export const GraphEdgeTypeOutput = "output";
583
- export const InterruptStatusPending = "pending";
584
- export const InterruptStatusResolved = "resolved";
585
- export const InterruptStatusExpired = "expired";
586
- export const InterruptStatusCancelled = "cancelled";
587
- export const InterruptResolutionAllow = "allow";
588
- export const InterruptResolutionDeny = "deny";
589
- export const InterruptResourceToolInvocation = "tool_invocation";
590
- export const InterruptResourceHookEvent = "hook_event";
591
- export const HookEventAgentStart = "agent.start";
592
- export const HookEventTurnStart = "agent.turn_start";
593
- export const HookEventToolCall = "agent.tool_call";
594
- export const HookEventToolResult = "agent.tool_result";
595
- export const HookEventTurnComplete = "agent.turn_complete";
596
- export const HookEventAgentError = "agent.error";
597
- export const HookEventAgentComplete = "agent.complete";
598
- export const HookEventAgentIdle = "agent.idle";
599
- export const HookEventPreCompact = "agent.pre_compact";
600
- export const HookEventPostCompact = "agent.post_compact";
601
- export const HookDecisionAllow = "allow";
602
- export const HookDecisionDeny = "deny";
603
- export const HookDecisionStop = "stop";
604
- export const HookDecisionSuspend = "suspend";
605
- export const HookHandlerWebhook = "webhook";
606
- export const HookHandlerTask = "task";
607
- export const HookHandlerGate = "gate";
608
563
  export const MergeStrategyConcat = "concat";
609
564
  export const MergeStrategyReplace = "replace";
610
565
  export const MergeStrategyIndexed = "indexed";
@@ -652,21 +607,10 @@ export const PageTypeDoc = "doc";
652
607
  export const PageTypeBlog = "blog";
653
608
  export const PageTypePage = "page";
654
609
  export const PageTypeAnnouncement = "announcement";
655
- export const ToolInvocationStatusPending = "pending";
656
- export const ToolInvocationStatusInProgress = "in_progress";
657
- export const ToolInvocationStatusAwaitingInput = "awaiting_input";
658
- export const ToolInvocationStatusAwaitingApproval = "awaiting_approval";
659
- export const ToolInvocationStatusCompleted = "completed";
660
- export const ToolInvocationStatusFailed = "failed";
661
- export const ToolInvocationStatusCancelled = "cancelled";
662
- export const ToolTypeApp = "app";
663
- export const ToolTypeAgent = "agent";
664
- export const ToolTypeHook = "hook";
665
- export const ToolTypeHTTP = "http";
666
- export const ToolTypeCall = "call";
667
- export const ToolTypeMCP = "mcp";
668
- export const ToolTypeClient = "client";
669
- export const ToolTypeInternal = "internal";
610
+ export const CommentStatusUnknown = 0;
611
+ export const CommentStatusDraft = 1;
612
+ export const CommentStatusPublished = 2;
613
+ export const CommentStatusArchived = 3;
670
614
  export const CloudAWS = "aws";
671
615
  export const CloudAmaya = "amaya";
672
616
  export const CloudAzure = "azure";
@@ -748,6 +692,8 @@ export const KnowledgeLifecyclePermanent = "permanent";
748
692
  export const KnowledgeLifecycleDecay = "decay";
749
693
  export const KnowledgeLifecycleDraft = "draft";
750
694
  export const KnowledgeLifecycleDeprecated = "deprecated";
695
+ export const ArtifactTypeHTML = "html";
696
+ export const ArtifactTypeMarkdown = "markdown";
751
697
  export const OpEqual = "eq";
752
698
  export const OpNotEqual = "neq";
753
699
  export const OpIn = "in";
@@ -853,6 +799,17 @@ export const IntegrationGrantCredentials = "credentials";
853
799
  * IntegrationGrantToken provides ready-to-use access (token, API key, etc.).
854
800
  */
855
801
  export const IntegrationGrantToken = "token";
802
+ export const CredentialScopePlatform = "platform";
803
+ /**
804
+ * CredentialScopeOrg: shared across all teams of an org. In the enum for
805
+ * end-to-end typing (connect-level pickers); connects with it are refused
806
+ * until the org domain lands (INF-795 Phase 2). Resolution order once
807
+ * live: agent > user > team > org > platform.
808
+ */
809
+ export const CredentialScopeOrg = "org";
810
+ export const CredentialScopeTeam = "team";
811
+ export const CredentialScopeUser = "user";
812
+ export const CredentialScopeAgent = "agent";
856
813
  export const NotificationChannelEmail = "email";
857
814
  export const NotificationChannelSMS = "sms";
858
815
  export const NotificationChannelPush = "push";
@@ -938,12 +895,121 @@ export const TaskLogTypeTask = 4;
938
895
  export const TeamTypePersonal = "personal";
939
896
  export const TeamTypeTeam = "team";
940
897
  export const TeamTypeSystem = "system";
898
+ /**
899
+ * TeamTypeOrg is an organization's own workspace. Its id is the org's
900
+ * id, its org_id points at itself, its members are the org's admins, and
901
+ * it owns what the org owns: the payer row, billing settings, org-scope
902
+ * credentials. Minted by org creation only; never archived while member
903
+ * teams exist.
904
+ */
905
+ export const TeamTypeOrg = "org";
941
906
  export const TeamStatusActive = "active";
942
907
  export const TeamStatusSuspended = "suspended";
943
908
  export const TeamStatusTerminated = "terminated";
944
909
  export const TeamRoleOwner = "owner";
945
910
  export const TeamRoleAdmin = "admin";
946
911
  export const TeamRoleMember = "member";
912
+ export const RoleGuest = "guest";
913
+ export const RoleUser = "user";
914
+ export const RoleAdmin = "admin";
915
+ export const RoleSystem = "system";
916
+ /**
917
+ * Run lifecycle
918
+ */
919
+ export const AgentEventRunStarted = "run.started";
920
+ export const AgentEventRunStateChanged = "run.state_changed";
921
+ /**
922
+ * Turn lifecycle
923
+ */
924
+ export const AgentEventTurnStarted = "turn.started";
925
+ export const AgentEventTurnCompleted = "turn.completed";
926
+ /**
927
+ * Content streaming — structural wrapper; high-frequency token deltas
928
+ * still flow via the existing DeltaEvent channel for efficiency.
929
+ */
930
+ export const AgentEventContentDelta = "content.delta";
931
+ /**
932
+ * Tool lifecycle
933
+ */
934
+ export const AgentEventToolStarted = "tool.started";
935
+ export const AgentEventToolCompleted = "tool.completed";
936
+ /**
937
+ * Approval flow
938
+ */
939
+ export const AgentEventApprovalRequired = "approval.required";
940
+ export const AgentEventApprovalResolved = "approval.resolved";
941
+ /**
942
+ * Hook lifecycle
943
+ */
944
+ export const AgentEventHookExecuted = "hook.executed";
945
+ /**
946
+ * Usage
947
+ */
948
+ export const AgentEventUsageUpdated = "usage.updated";
949
+ /**
950
+ * Context management
951
+ */
952
+ export const AgentEventContextCompacted = "context.compacted";
953
+ /**
954
+ * Errors
955
+ */
956
+ export const AgentEventError = "error";
957
+ export const ContentDeltaText = "text";
958
+ export const ContentDeltaReasoning = "reasoning";
959
+ export const AgentRunStateSubmitted = "submitted";
960
+ export const AgentRunStateWorking = "working";
961
+ export const AgentRunStateInputRequired = "input_required";
962
+ export const AgentRunStateAuthRequired = "auth_required";
963
+ export const AgentRunStateCompleted = "completed";
964
+ export const AgentRunStateFailed = "failed";
965
+ export const AgentRunStateCanceled = "canceled";
966
+ export const AgentRunStateRejected = "rejected";
967
+ export const InterruptReasonToolApproval = "tool_approval";
968
+ export const InterruptReasonClientTool = "client_tool";
969
+ export const InterruptReasonWidget = "widget";
970
+ export const InterruptReasonAuth = "auth";
971
+ export const InterruptReasonConfirmation = "confirmation";
972
+ export const InterruptReasonHookGate = "hook_gate";
973
+ export const InterruptStatusPending = "pending";
974
+ export const InterruptStatusResolved = "resolved";
975
+ export const InterruptStatusExpired = "expired";
976
+ export const InterruptStatusCancelled = "cancelled";
977
+ export const InterruptResolutionAllow = "allow";
978
+ export const InterruptResolutionDeny = "deny";
979
+ export const InterruptResourceToolInvocation = "tool_invocation";
980
+ export const InterruptResourceHookEvent = "hook_event";
981
+ export const HookEventAgentStart = "agent.start";
982
+ export const HookEventTurnStart = "agent.turn_start";
983
+ export const HookEventToolCall = "agent.tool_call";
984
+ export const HookEventToolResult = "agent.tool_result";
985
+ export const HookEventTurnComplete = "agent.turn_complete";
986
+ export const HookEventAgentError = "agent.error";
987
+ export const HookEventAgentComplete = "agent.complete";
988
+ export const HookEventAgentIdle = "agent.idle";
989
+ export const HookEventPreCompact = "agent.pre_compact";
990
+ export const HookEventPostCompact = "agent.post_compact";
991
+ export const HookDecisionAllow = "allow";
992
+ export const HookDecisionDeny = "deny";
993
+ export const HookDecisionStop = "stop";
994
+ export const HookDecisionSuspend = "suspend";
995
+ export const HookHandlerWebhook = "webhook";
996
+ export const HookHandlerTask = "task";
997
+ export const HookHandlerGate = "gate";
998
+ export const ToolInvocationStatusPending = "pending";
999
+ export const ToolInvocationStatusInProgress = "in_progress";
1000
+ export const ToolInvocationStatusAwaitingInput = "awaiting_input";
1001
+ export const ToolInvocationStatusAwaitingApproval = "awaiting_approval";
1002
+ export const ToolInvocationStatusCompleted = "completed";
1003
+ export const ToolInvocationStatusFailed = "failed";
1004
+ export const ToolInvocationStatusCancelled = "cancelled";
1005
+ export const ToolTypeApp = "app";
1006
+ export const ToolTypeAgent = "agent";
1007
+ export const ToolTypeHook = "hook";
1008
+ export const ToolTypeHTTP = "http";
1009
+ export const ToolTypeCall = "call";
1010
+ export const ToolTypeMCP = "mcp";
1011
+ export const ToolTypeClient = "client";
1012
+ export const ToolTypeInternal = "internal";
947
1013
  /**
948
1014
  * Tool call types
949
1015
  */
@@ -976,7 +1042,3 @@ export const ToolParamTypeArray = "array";
976
1042
  * Tool parameter types
977
1043
  */
978
1044
  export const ToolParamTypeNull = "null";
979
- export const RoleGuest = "guest";
980
- export const RoleUser = "user";
981
- export const RoleAdmin = "admin";
982
- export const RoleSystem = "system";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.6.47",
3
+ "version": "0.6.49",
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",
@@ -47,21 +47,6 @@
47
47
  "default": "./dist/api/files.js"
48
48
  }
49
49
  },
50
- "scripts": {
51
- "build": "tsc",
52
- "test": "jest --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
53
- "test:integration": "jest --testPathPattern=integration --testTimeout=120000 --runInBand",
54
- "test:all": "jest --testTimeout=120000 --runInBand",
55
- "test:watch": "jest --watch --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
56
- "test:coverage": "jest --coverage --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
57
- "lint": "eslint src",
58
- "lint:fix": "eslint src --fix",
59
- "format": "prettier --write \"src/**/*.ts\"",
60
- "format:check": "prettier --check \"src/**/*.ts\"",
61
- "clean": "rimraf dist coverage",
62
- "prepublishOnly": "npm run clean && npm run build && npm test",
63
- "example": "node examples/basic.js"
64
- },
65
50
  "keywords": [
66
51
  "inference",
67
52
  "ai",
@@ -146,10 +131,18 @@
146
131
  "LICENSE",
147
132
  "CHANGELOG.md"
148
133
  ],
149
- "overrides": {
150
- "postcss": "^8.5.10",
151
- "cookie": "^0.7.0",
152
- "svelte": "^5.55.7",
153
- "devalue": "^5.8.1"
134
+ "scripts": {
135
+ "build": "tsc",
136
+ "test": "jest --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
137
+ "test:integration": "jest --testPathPattern=integration --testTimeout=120000 --runInBand",
138
+ "test:all": "jest --testTimeout=120000 --runInBand",
139
+ "test:watch": "jest --watch --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
140
+ "test:coverage": "jest --coverage --testPathIgnorePatterns=/integration\\.test\\.ts$ --testPathIgnorePatterns=\\.integration\\.test\\.ts$",
141
+ "lint": "eslint src",
142
+ "lint:fix": "eslint src --fix",
143
+ "format": "prettier --write \"src/**/*.ts\"",
144
+ "format:check": "prettier --check \"src/**/*.ts\"",
145
+ "clean": "rimraf dist coverage",
146
+ "example": "node examples/basic.js"
154
147
  }
155
- }
148
+ }