sdk: publish

This commit is contained in:
Koushik Dutta
2025-06-13 11:17:02 -07:00
parent af4269be49
commit c882b9a04e
6 changed files with 78 additions and 7 deletions

4
sdk/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/sdk",
"version": "0.5.12",
"version": "0.5.13",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@scrypted/sdk",
"version": "0.5.12",
"version": "0.5.13",
"license": "ISC",
"dependencies": {
"@babel/preset-typescript": "^7.26.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/sdk",
"version": "0.5.12",
"version": "0.5.13",
"description": "",
"main": "dist/src/index.js",
"exports": {

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/types",
"version": "0.5.12",
"version": "0.5.13",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/types",
"version": "0.5.12",
"version": "0.5.13",
"license": "ISC"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/types",
"version": "0.5.12",
"version": "0.5.13",
"description": "",
"main": "dist/index.js",
"author": "",

View File

@@ -89,6 +89,7 @@ class ScryptedDeviceType(str, Enum):
Internet = "Internet"
Irrigation = "Irrigation"
Light = "Light"
LLM = "LLM"
Lock = "Lock"
Network = "Network"
Notifier = "Notifier"
@@ -147,6 +148,7 @@ class ScryptedInterface(str, Enum):
HumiditySetting = "HumiditySetting"
Intercom = "Intercom"
LauncherApplication = "LauncherApplication"
LLMTools = "LLMTools"
Lock = "Lock"
LuminanceSensor = "LuminanceSensor"
MediaConverter = "MediaConverter"
@@ -644,6 +646,13 @@ class LauncherApplicationInfo(TypedDict):
icon: str # Supports: mdi-icon, fa-icon, urls.
name: str
class LLMToolDefinition(TypedDict):
description: str # A description of what the function does, used by the model to choose when and how to call the function.
name: str # The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
parameters: Mapping[str, unknown] # The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting defines a function with an empty parameter list.
strict: bool # Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the field. Only a subset of JSON Schema is supported when is . Learn more about Structured Outputs in the [function calling guide]( ).
class MediaObjectOptions(TypedDict):
sourceId: str # The device id of the source of the MediaObject.
@@ -995,7 +1004,7 @@ class TamperState(TypedDict):
pass
TYPES_VERSION = "0.5.12"
TYPES_VERSION = "0.5.13"
class AirPurifier:
@@ -1232,6 +1241,15 @@ class LauncherApplication:
applicationInfo: LauncherApplicationInfo
class LLMTools:
async def callLLMTool(self, name: str, parameters: Mapping[str, Any]) -> str:
pass
async def getLLMTools(self) -> list[LLMToolDefinition]:
pass
class Lock:
"""Lock controls devices that can lock or unlock entries. Often works in tandem with PasswordControl."""
@@ -2096,6 +2114,8 @@ class ScryptedInterfaceMethods(str, Enum):
generateVideoFrames = "generateVideoFrames"
connectStream = "connectStream"
getTTYSettings = "getTTYSettings"
callLLMTool = "callLLMTool"
getLLMTools = "getLLMTools"
class DeviceState:
@@ -3384,6 +3404,14 @@ ScryptedInterfaceDescriptors = {
],
"properties": []
},
"LLMTools": {
"name": "LLMTools",
"methods": [
"callLLMTool",
"getLLMTools"
],
"properties": []
},
"ScryptedSystemDevice": {
"name": "ScryptedSystemDevice",
"methods": [],

View File

@@ -151,6 +151,7 @@ export enum ScryptedDeviceType {
Internet = "Internet",
Network = "Network",
Bridge = "Bridge",
LLM = "LLM",
Unknown = "Unknown",
}
/**
@@ -1062,6 +1063,46 @@ export interface PanTiltZoomCommand {
preset?: string;
}
export interface LLMToolDefinition {
/**
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain
* underscores and dashes, with a maximum length of 64.
*/
name: string;
/**
* A description of what the function does, used by the model to choose when and
* how to call the function.
*/
description?: string;
/**
* The parameters the functions accepts, described as a JSON Schema object. See the
* [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
* and the
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
* documentation about the format.
*
* Omitting `parameters` defines a function with an empty parameter list.
*/
parameters?: Record<string, unknown>;
/**
* Whether to enable strict schema adherence when generating the function call. If
* set to true, the model will follow the exact schema defined in the `parameters`
* field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn
* more about Structured Outputs in the
* [function calling guide](https://platform.openai.com/docs/guides/function-calling?api-mode=responses).
*/
strict?: boolean | null;
}
export interface LLMTools {
getLLMTools(): Promise<LLMToolDefinition[]>;
callLLMTool(name: string, parameters: Record<string, any>): Promise<string>;
}
export interface PanTiltZoomCapabilities {
pan?: boolean;
tilt?: boolean;
@@ -2426,6 +2467,8 @@ export enum ScryptedInterface {
TTY = 'TTY',
TTYSettings = 'TTYSettings',
LLMTools = "LLMTools",
ScryptedSystemDevice = "ScryptedSystemDevice",
ScryptedDeviceCreator = "ScryptedDeviceCreator",
ScryptedSettings = "ScryptedSettings",