Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shinkai_protocol/shinkai-typescript-lib

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shinkai_protocol/shinkai-typescript-lib - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0-development.23

33

dist/schemas/schema_types.d.ts

@@ -28,3 +28,8 @@ import { ShinkaiMessage } from "../shinkai_message/shinkai_message";

VecFsCopyItem = "VecFsCopyItem",
ConvertFilesAndSaveToFolder = "ConvertFilesAndSaveToFolder"
ConvertFilesAndSaveToFolder = "ConvertFilesAndSaveToFolder",
CreateShareableFolder = "CreateShareableFolder",
AvailableSharedItems = "AvailableSharedItems",
SubscribeToSharedFolder = "SubscribeToSharedFolder",
UnsubscribeToSharedFolder = "UnsubscribeToSharedFolder",
MySubscriptions = "MySubscriptions"
}

@@ -80,2 +85,3 @@ export interface JobScope {

OpenAI?: OpenAI;
ClaudeAI?: ClaudeAI;
GenericAPI?: GenericAPI;

@@ -86,2 +92,5 @@ Ollama?: Ollama;

}
export interface ClaudeAI {
model_type: string;
}
export interface OpenAI {

@@ -174,1 +183,23 @@ model_type: string;

}
export interface APICreateShareableFolder {
path: string;
subscription_req: FolderSubscription;
}
export interface FolderSubscription {
minimum_token_delegation?: number;
minimum_time_delegated_hours?: number;
monthly_payment?: PaymentOption;
is_free: boolean;
}
export type PaymentOption = {
type: 'USD';
amount: number;
} | {
type: 'KAITokens';
amount: number;
};
export declare enum SubscriptionPayment {
Free = "Free",
DirectDelegation = "DirectDelegation",
Payment = "Payment"
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.WSTopic = exports.JobRecipient = exports.MessageSchemaType = exports.TSEncryptionMethod = void 0;
exports.SubscriptionPayment = exports.WSTopic = exports.JobRecipient = exports.MessageSchemaType = exports.TSEncryptionMethod = void 0;
var TSEncryptionMethod;

@@ -33,2 +33,7 @@ (function (TSEncryptionMethod) {

MessageSchemaType["ConvertFilesAndSaveToFolder"] = "ConvertFilesAndSaveToFolder";
MessageSchemaType["CreateShareableFolder"] = "CreateShareableFolder";
MessageSchemaType["AvailableSharedItems"] = "AvailableSharedItems";
MessageSchemaType["SubscribeToSharedFolder"] = "SubscribeToSharedFolder";
MessageSchemaType["UnsubscribeToSharedFolder"] = "UnsubscribeToSharedFolder";
MessageSchemaType["MySubscriptions"] = "MySubscriptions";
})(MessageSchemaType || (exports.MessageSchemaType = MessageSchemaType = {}));

@@ -46,1 +51,7 @@ var JobRecipient;

})(WSTopic || (exports.WSTopic = WSTopic = {}));
var SubscriptionPayment;
(function (SubscriptionPayment) {
SubscriptionPayment["Free"] = "Free";
SubscriptionPayment["DirectDelegation"] = "DirectDelegation";
SubscriptionPayment["Payment"] = "Payment";
})(SubscriptionPayment || (exports.SubscriptionPayment = SubscriptionPayment = {}));

@@ -1,2 +0,2 @@

import { JobScope, MessageSchemaType, SerializedAgent, TSEncryptionMethod } from "../schemas/schema_types";
import { APICreateShareableFolder, JobScope, MessageSchemaType, SerializedAgent, SubscriptionPayment, TSEncryptionMethod } from "../schemas/schema_types";
import { ExternalMetadata } from "../shinkai_message/shinkai_external_metadata";

@@ -71,2 +71,7 @@ import { InternalMetadata } from "../shinkai_message/shinkai_internal_metadata";

static retrieveVectorSearchSimplified(my_encryption_secret_key: EncryptionStaticKey, my_signature_secret_key: SignatureStaticKey, receiver_public_key: EncryptionPublicKey, search: string, path: string | null, max_results: number | null, max_files_to_scan: number | null, sender: ProfileName, sender_subidentity: string, receiver: ProfileName, receiver_subidentity: string): Promise<ShinkaiMessage>;
static subscriptionsCreateShareFolder(payload: APICreateShareableFolder, my_encryption_secret_key: EncryptionStaticKey, my_signature_secret_key: SignatureStaticKey, receiver_public_key: EncryptionPublicKey, sender: ProfileName, sender_subidentity: string, node_receiver: ProfileName, node_receiver_subidentity: string): Promise<ShinkaiMessage>;
static subscriptionAvailableSharedItems(path: string | null, streamer_node_name: string, streamer_profile_name: string, my_encryption_secret_key: EncryptionStaticKey, my_signature_secret_key: SignatureStaticKey, receiver_public_key: EncryptionPublicKey, sender: ProfileName, sender_subidentity: string, node_receiver: ProfileName, node_receiver_subidentity: string): Promise<ShinkaiMessage>;
static vecfsSubscribeToSharedFolder(shared_folder: string, requirements: SubscriptionPayment, streamer_node: string, streamer_profile: string, my_encryption_secret_key: EncryptionStaticKey, my_signature_secret_key: SignatureStaticKey, receiver_public_key: EncryptionPublicKey, sender: ProfileName, sender_subidentity: string, node_receiver: ProfileName, node_receiver_subidentity: string): Promise<ShinkaiMessage>;
static vecfsUnsubscribeToSharedFolder(shared_folder: string, streamer_node: string, streamer_profile: string, my_encryption_secret_key: EncryptionStaticKey, my_signature_secret_key: SignatureStaticKey, receiver_public_key: EncryptionPublicKey, sender: ProfileName, sender_subidentity: string, node_receiver: ProfileName, node_receiver_subidentity: string): Promise<ShinkaiMessage>;
static mySubscriptions(my_encryption_secret_key: EncryptionStaticKey, my_signature_secret_key: SignatureStaticKey, receiver_public_key: EncryptionPublicKey, sender: ProfileName, sender_subidentity: string, node_receiver: ProfileName, node_receiver_subidentity: string): Promise<ShinkaiMessage>;
}

@@ -538,3 +538,35 @@ "use strict";

}
static async subscriptionsCreateShareFolder(payload, my_encryption_secret_key, my_signature_secret_key, receiver_public_key, sender, sender_subidentity, node_receiver, node_receiver_subidentity) {
return this.createCustomShinkaiMessageToNode(my_encryption_secret_key, my_signature_secret_key, receiver_public_key, payload, sender_subidentity, sender, node_receiver, schema_types_1.MessageSchemaType.CreateShareableFolder);
}
static async subscriptionAvailableSharedItems(path, streamer_node_name, streamer_profile_name, my_encryption_secret_key, my_signature_secret_key, receiver_public_key, sender, sender_subidentity, node_receiver, node_receiver_subidentity) {
const payload = {
path: path || "/",
streamer_node_name,
streamer_profile_name,
};
return this.createCustomShinkaiMessageToNode(my_encryption_secret_key, my_signature_secret_key, receiver_public_key, payload, sender_subidentity, sender, node_receiver, schema_types_1.MessageSchemaType.AvailableSharedItems);
}
static async vecfsSubscribeToSharedFolder(shared_folder, requirements, streamer_node, streamer_profile, my_encryption_secret_key, my_signature_secret_key, receiver_public_key, sender, sender_subidentity, node_receiver, node_receiver_subidentity) {
const payload = {
path: shared_folder,
streamer_node_name: streamer_node,
streamer_profile_name: streamer_profile,
payment: requirements,
};
return this.createCustomShinkaiMessageToNode(my_encryption_secret_key, my_signature_secret_key, receiver_public_key, payload, sender_subidentity, sender, node_receiver, schema_types_1.MessageSchemaType.SubscribeToSharedFolder);
}
static async vecfsUnsubscribeToSharedFolder(shared_folder, streamer_node, streamer_profile, my_encryption_secret_key, my_signature_secret_key, receiver_public_key, sender, sender_subidentity, node_receiver, node_receiver_subidentity) {
const payload = {
path: shared_folder,
streamer_node_name: streamer_node,
streamer_profile_name: streamer_profile,
};
return this.createCustomShinkaiMessageToNode(my_encryption_secret_key, my_signature_secret_key, receiver_public_key, payload, sender_subidentity, sender, node_receiver, schema_types_1.MessageSchemaType.UnsubscribeToSharedFolder);
}
static async mySubscriptions(my_encryption_secret_key, my_signature_secret_key, receiver_public_key, sender, sender_subidentity, node_receiver, node_receiver_subidentity) {
return this.createCustomShinkaiMessageToNode(my_encryption_secret_key, my_signature_secret_key, receiver_public_key, "", // Empty payload as per Rust code comment
sender_subidentity, sender, node_receiver, schema_types_1.MessageSchemaType.MySubscriptions);
}
}
exports.ShinkaiMessageBuilder = ShinkaiMessageBuilder;

2

package.json
{
"name": "@shinkai_protocol/shinkai-typescript-lib",
"version": "0.5.1",
"version": "0.6.0-development.23",
"description": "Typescript library to build and handle Shinkai Messages",

@@ -5,0 +5,0 @@ "type": "commonjs",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc