diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml
index cd11dffa3..1066a6f06 100644
--- a/.github/workflows/release-dev.yml
+++ b/.github/workflows/release-dev.yml
@@ -1,15 +1,18 @@
name: Release dev
on:
- push:
- branches: [ main, agallardol/mobile-build ]
+ workflow_dispatch:
+ schedule:
+ - cron: "0 0 * * *"
+ # push:
+ # branches: [main]
defaults:
run:
working-directory: ./
jobs:
- release:
+ release-shinkai-visor:
runs-on: ubuntu-latest
environment: development
steps:
@@ -27,7 +30,7 @@ jobs:
node-version: 18
check-latest: false
registry-url: https://registry.npmjs.org
- cache: "npm"
+ cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
@@ -35,11 +38,26 @@ jobs:
npm cache verify
npm ci --no-audit --prefer-offline
- # shinkai-visor
- name: Run NX build on shinkai-visor
- run: npx nx build shinkai-visor --skip-nx-cache --verbose
+ run: npx nx build shinkai-visor --skip-nx-cache
env:
VERSION: 0.0.0.${{github.run_number}}
+ NAME_PREFIX: '[Dev] '
+ DESCRIPTION_PREFIX: 'This is for development purpose.\n\n'
+
+ - name: Zip extension
+ run: cd ./dist/apps && zip -r shinkai-visor.zip shinkai-visor
+
+ - name: Upload & Release
+ uses: mnao305/chrome-extension-upload@v4.0.1
+ continue-on-error: true
+ with:
+ file-path: dist/apps/shinkai-visor.zip
+ extension-id: ${{ secrets.CHROME_EXTENSION_ID }}
+ client-id: ${{ secrets.CHROME_CLIENT_ID }}
+ client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
+ refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
+ publish: false
- uses: actions/upload-artifact@v3
with:
@@ -48,32 +66,68 @@ jobs:
if-no-files-found: error
retention-days: 5
- # shinkai-app-android
+ release-shinkai-app-android:
+ runs-on: ubuntu-latest
+ environment: development
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Use nx set shas
+ uses: nrwl/nx-set-shas@v3
+
+ - name: Setup Node version
+ uses: actions/setup-node@v3
+ with:
+ node-version: 18
+ check-latest: false
+ registry-url: https://registry.npmjs.org
+ cache: 'npm'
+ cache-dependency-path: package-lock.json
+
+ - name: Install dependencies
+ run: |
+ npm cache verify
+ npm ci --no-audit --prefer-offline
+
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- - name: Run NX build on shinkai-app-android
+ - name: Set mobile apps version
run: |
npx capacitor-set-version -v $VERSION -b $BUILD $APP_PATH
env:
VERSION: 0.0.0
- BUILD: ${{github.run_number}}
+ BUILD: ${{ github.run_number }}
APP_PATH: ./apps/shinkai-app
+ - name: Mount shinkai android keystore from secret
+ run: |
+ echo $KEYSTORE_BASE_64_STRING > $KEYSTORE_BASE_64_FILE_NAME
+ base64 -d $KEYSTORE_BASE_64_FILE_NAME > $KEYSTORE_FILE_PATH
+ env:
+ KEYSTORE_BASE_64_STRING: ${{ secrets.ANDROID_KEYSTORE_BASE_64 }}
+ KEYSTORE_BASE_64_FILE_NAME: shinkai-keystore-android-upload-base-64
+ KEYSTORE_FILE_PATH: ./apps/shinkai-app/android/shinkai-keystore-android
+
- name: Run NX build on shinkai-app-android
run: |
- npx nx build:android shinkai-app --verbose
+ npx nx build:android shinkai-app
env:
- ANDROID_KEYSTORE_FILE_PATH: ${{ secrets.ANDROID_KEYSTORE_FILE_PATH }}
+ ANDROID_KEYSTORE_FILE_PATH: shinkai-keystore-android
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
ANDROID_KEYSTORE_ALIAS_PASS: ${{ secrets.ANDROID_KEYSTORE_ALIAS_PASS }}
- - uses: actions/upload-artifact@v3
+ - name: Upload signed android .AAB file to Google Play Store
+ uses: r0adkll/upload-google-play@v1
with:
- name: shinkai-app-android
- path: dist/apps/shinkai-app-android
- if-no-files-found: error
- retention-days: 5
+ serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
+ packageName: com.shinkai.app
+ releaseFiles: ./dist/apps/shinkai-app-android/app-release-signed.aab
+ track: internal
+ status: draft
diff --git a/apps/shinkai-app/android/app/build.gradle b/apps/shinkai-app/android/app/build.gradle
index 2571cb459..2528c90ce 100644
--- a/apps/shinkai-app/android/app/build.gradle
+++ b/apps/shinkai-app/android/app/build.gradle
@@ -1,14 +1,14 @@
apply plugin: 'com.android.application'
android {
- namespace "io.dcspark.shinkai"
+ namespace "com.shinkai.app"
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
- applicationId "io.dcspark.shinkai"
+ applicationId "com.shinkai.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
- versionName "1.0"
+ versionName "0.0.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
diff --git a/apps/shinkai-app/android/app/src/main/java/io/dcspark/shinkai/MainActivity.java b/apps/shinkai-app/android/app/src/main/java/io/dcspark/shinkai/MainActivity.java
index 3330ab681..b944d47f2 100644
--- a/apps/shinkai-app/android/app/src/main/java/io/dcspark/shinkai/MainActivity.java
+++ b/apps/shinkai-app/android/app/src/main/java/io/dcspark/shinkai/MainActivity.java
@@ -1,4 +1,4 @@
-package io.dcspark.shinkai;
+package com.shinkai.app;
import com.getcapacitor.BridgeActivity;
diff --git a/apps/shinkai-app/android/app/src/main/res/values/strings.xml b/apps/shinkai-app/android/app/src/main/res/values/strings.xml
index cd39b67c7..30fcb7321 100644
--- a/apps/shinkai-app/android/app/src/main/res/values/strings.xml
+++ b/apps/shinkai-app/android/app/src/main/res/values/strings.xml
@@ -1,7 +1,7 @@
- ShinkaiApp
- ShinkaiApp
- io.dcspark.shinkai
- io.dcspark.shinkai
+ Shinkai
+ Shinkai
+ com.shinkai.app
+ com.shinkai.app
diff --git a/apps/shinkai-app/capacitor.config.ts b/apps/shinkai-app/capacitor.config.ts
index b2665aa0d..99faaa0b0 100644
--- a/apps/shinkai-app/capacitor.config.ts
+++ b/apps/shinkai-app/capacitor.config.ts
@@ -1,11 +1,13 @@
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
- appId: 'io.dcspark.shinkai',
- appName: 'ShinkaiApp',
+ appId: 'com.shinkai.app',
+ appName: 'Shinkai',
webDir: '../../dist/apps/shinkai-app',
server: {
- androidScheme: 'https'
+ androidScheme: 'https',
+ url: process.env.SERVE ? 'http://10.0.2.2:9000' : undefined,
+ cleartext: process.env.SERVE ? true : false,
}
};
diff --git a/apps/shinkai-app/ionic.config.json b/apps/shinkai-app/ionic.config.json
index 72ee5fb82..ef85e4469 100644
--- a/apps/shinkai-app/ionic.config.json
+++ b/apps/shinkai-app/ionic.config.json
@@ -1,5 +1,5 @@
{
- "name": "ShinkaiApp",
+ "name": "Shinkai",
"integrations": {
"capacitor": {}
},
diff --git a/apps/shinkai-app/ios/App/App.xcodeproj/project.pbxproj b/apps/shinkai-app/ios/App/App.xcodeproj/project.pbxproj
index 05bc35ff1..001b9597d 100644
--- a/apps/shinkai-app/ios/App/App.xcodeproj/project.pbxproj
+++ b/apps/shinkai-app/ios/App/App.xcodeproj/project.pbxproj
@@ -350,9 +350,9 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.0;
+ MARKETING_VERSION = 0.0.1;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
- PRODUCT_BUNDLE_IDENTIFIER = io.dcspark.shinkai;
+ PRODUCT_BUNDLE_IDENTIFIER = com.shinkai.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
@@ -370,8 +370,8 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- MARKETING_VERSION = 1.0;
- PRODUCT_BUNDLE_IDENTIFIER = io.dcspark.shinkai;
+ MARKETING_VERSION = 0.0.1;
+ PRODUCT_BUNDLE_IDENTIFIER = com.shinkai.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0;
diff --git a/apps/shinkai-app/ios/App/App/Info.plist b/apps/shinkai-app/ios/App/App/Info.plist
index 3fb69a0af..3dfac5f89 100644
--- a/apps/shinkai-app/ios/App/App/Info.plist
+++ b/apps/shinkai-app/ios/App/App/Info.plist
@@ -5,7 +5,7 @@
CFBundleDevelopmentRegion
en
CFBundleDisplayName
- ShinkaiApp
+ Shinkai
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
diff --git a/apps/shinkai-app/package.json b/apps/shinkai-app/package.json
index 122aa365c..e262f4878 100644
--- a/apps/shinkai-app/package.json
+++ b/apps/shinkai-app/package.json
@@ -3,5 +3,8 @@
"private": true,
"version": "0.0.1",
"type": "module",
- "description": "Shinkai Multiplatform App"
+ "description": "Shinkai Multiplatform App",
+ "scripts": {
+ "serve:android": "SERVE=true npx cap run android"
+ }
}
diff --git a/apps/shinkai-app/project.json b/apps/shinkai-app/project.json
index 53319d1e4..45f9358f8 100644
--- a/apps/shinkai-app/project.json
+++ b/apps/shinkai-app/project.json
@@ -57,7 +57,8 @@
"executor": "@nx/vite:dev-server",
"defaultConfiguration": "development",
"options": {
- "buildTarget": "shinkai-app:build"
+ "buildTarget": "shinkai-app:build",
+ "port": 9000
},
"configurations": {
"development": {
@@ -70,6 +71,18 @@
}
}
},
+ "serve:android": {
+ "executor": "nx:run-script",
+ "defaultConfiguration": "development",
+ "options": {
+ "cwd": "apps/shinkai-app",
+ "script": "serve:android"
+ },
+ "configurations": {
+ "development": {},
+ "production": {}
+ }
+ },
"preview": {
"executor": "@nx/vite:preview-server",
"defaultConfiguration": "development",
diff --git a/apps/shinkai-app/vite.config.ts b/apps/shinkai-app/vite.config.ts
index 0dc09a047..f78725b0b 100644
--- a/apps/shinkai-app/vite.config.ts
+++ b/apps/shinkai-app/vite.config.ts
@@ -10,7 +10,7 @@ export default defineConfig({
server: {
port: 4200,
- host: 'localhost',
+ host: true,
fs: {
// Important to server files two levels ahead of the project folder
allow: ['../../'],
diff --git a/apps/shinkai-visor/dynamic-manifest.ts b/apps/shinkai-visor/dynamic-manifest.ts
index 6f3ad7fb1..eae978c37 100644
--- a/apps/shinkai-visor/dynamic-manifest.ts
+++ b/apps/shinkai-visor/dynamic-manifest.ts
@@ -4,16 +4,26 @@ import baseManifestJson from './public/manifest.json';
const getVersion = () => {
- const version = process.env.VERSION || baseManifestJson.version || '0.0.0.0';
+ const version = process.env.VERSION || baseManifestJson.version || '0.0.0.1';
const [major, minor, patch, label = '0'] = version
.replace(/[^\d.-]+/g, '')
.split(/[.-]/);
return `${major}.${minor}.${patch}.${label}`;
};
+const getName = () => {
+ return `${process.env.NAME_PREFIX || ''}${baseManifestJson.name}`;
+}
+
+const getDescription = () => {
+ return `${process.env.DESCRIPTION_PREFIX || ''}${baseManifestJson.description}`;
+}
+
export const dynamicManifest = defineManifest((env) => {
return {
...baseManifestJson,
version: getVersion(),
+ name: getName(),
+ description: getDescription(),
};
});
diff --git a/apps/shinkai-visor/public/icon128.png b/apps/shinkai-visor/public/icon128.png
index 8b65ff5e3..ff3b0db98 100644
Binary files a/apps/shinkai-visor/public/icon128.png and b/apps/shinkai-visor/public/icon128.png differ
diff --git a/apps/shinkai-visor/public/icon16.png b/apps/shinkai-visor/public/icon16.png
index 8b65ff5e3..fa90ce15a 100644
Binary files a/apps/shinkai-visor/public/icon16.png and b/apps/shinkai-visor/public/icon16.png differ
diff --git a/apps/shinkai-visor/public/icon48.png b/apps/shinkai-visor/public/icon48.png
index 8b65ff5e3..e00733748 100644
Binary files a/apps/shinkai-visor/public/icon48.png and b/apps/shinkai-visor/public/icon48.png differ
diff --git a/apps/shinkai-visor/public/manifest.json b/apps/shinkai-visor/public/manifest.json
index 13f6a95d6..8b827294a 100644
--- a/apps/shinkai-visor/public/manifest.json
+++ b/apps/shinkai-visor/public/manifest.json
@@ -3,8 +3,7 @@
"description": "Transforms your web browser into a first class Shinkai client.",
"manifest_version": 3,
"update_url": "https://clients2.google.com/service/update2/crx",
- "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm5XZIjmISeYdECai228Nz5DKO7nA3MN5FWwsg5kImRjAZcWbNBG4ywJhwo7UjUErljng5wrerJATFhcxlXYfkSGR6gfV3sk4j+twm0PxlQXge8w0e24S55j6lk2vNHA3AwfnI8/wl3kI1CqWK6YqtSL7lDWw5inVvz3JH9w4fvXPlQpBkU52BDEE6dQQ3npscdh05/aBmOiHGev+Q1D5NCbh7TJQaXDE30ApS4u6bwr1rQrSXjc2Hcy/8yiLvAmzLNOG6fAGMUIUdrMweqgmgKxKF1+v4i+fkNy4jZF2rLMZRqKzLrDF7Ov60TYt+hFC+IriOUVzemg7h4QQR+51ZQIDAQAB",
- "version": "0.4.2",
+ "version": "0.0.0.1",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
diff --git a/apps/shinkai-visor/src/components/popup/popup-embeder.ts b/apps/shinkai-visor/src/components/popup/popup-embeder.ts
index d8f97ae27..ab32a4378 100644
--- a/apps/shinkai-visor/src/components/popup/popup-embeder.ts
+++ b/apps/shinkai-visor/src/components/popup/popup-embeder.ts
@@ -19,6 +19,7 @@ iframe.setAttribute('src', chrome.runtime.getURL('src/components/popup/popup.htm
iframe.style.border = 'none';
iframe.style.width = '100%';
iframe.style.height = '100%';
+iframe.style.colorScheme = 'only light';
const shadow = baseContainer.attachShadow({ mode: 'open' });
shadow.appendChild(iframe);
diff --git a/libs/shinkai-message-ts/package.json b/libs/shinkai-message-ts/package.json
index e113fd006..6b0772350 100644
--- a/libs/shinkai-message-ts/package.json
+++ b/libs/shinkai-message-ts/package.json
@@ -1,6 +1,6 @@
{
"name": "@shinkai_network/shinkai-message-ts",
- "version": "0.0.9",
+ "version": "0.0.11",
"description": "Shinkai Message TS wrapper for wasm library",
"type": "module",
"main": "src/index.js",
diff --git a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm.d.ts b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm.d.ts
index 2181c3605..d6addedc8 100644
--- a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm.d.ts
+++ b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm.d.ts
@@ -517,7 +517,27 @@ export class ShinkaiMessageWrapper {
/**
* @returns {string}
*/
- calculate_hash(): string;
+ calculate_blake3_hash(): string;
+/**
+* @returns {ShinkaiMessageWrapper}
+*/
+ new_with_empty_outer_signature(): ShinkaiMessageWrapper;
+/**
+* @returns {ShinkaiMessageWrapper}
+*/
+ new_with_empty_inner_signature(): ShinkaiMessageWrapper;
+/**
+* @returns {string}
+*/
+ inner_content_for_hashing(): string;
+/**
+* @returns {string}
+*/
+ calculate_blake3_hash_with_empty_outer_signature(): string;
+/**
+* @returns {string}
+*/
+ calculate_blake3_hash_with_empty_inner_signature(): string;
/**
* @returns {string}
*/
diff --git a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.js b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.js
index c2377de47..3076b48bc 100644
--- a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.js
+++ b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.js
@@ -2494,27 +2494,19 @@ export class ShinkaiMessageWrapper {
* @returns {string}
*/
to_json_str() {
- let deferred2_0;
- let deferred2_1;
+ let deferred1_0;
+ let deferred1_1;
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.shinkaimessagewrapper_to_json_str(retptr, this.__wbg_ptr);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
- var r2 = getInt32Memory0()[retptr / 4 + 2];
- var r3 = getInt32Memory0()[retptr / 4 + 3];
- var ptr1 = r0;
- var len1 = r1;
- if (r3) {
- ptr1 = 0; len1 = 0;
- throw takeObject(r2);
- }
- deferred2_0 = ptr1;
- deferred2_1 = len1;
- return getStringFromWasm0(ptr1, len1);
+ deferred1_0 = r0;
+ deferred1_1 = r1;
+ return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
}
}
/**
@@ -2541,12 +2533,12 @@ export class ShinkaiMessageWrapper {
/**
* @returns {string}
*/
- calculate_hash() {
+ calculate_blake3_hash() {
let deferred1_0;
let deferred1_1;
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
- wasm.shinkaimessagewrapper_calculate_hash(retptr, this.__wbg_ptr);
+ wasm.shinkaimessagewrapper_calculate_blake3_hash(retptr, this.__wbg_ptr);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
deferred1_0 = r0;
@@ -2558,6 +2550,104 @@ export class ShinkaiMessageWrapper {
}
}
/**
+ * @returns {ShinkaiMessageWrapper}
+ */
+ new_with_empty_outer_signature() {
+ const ret = wasm.shinkaimessagewrapper_new_with_empty_outer_signature(this.__wbg_ptr);
+ return ShinkaiMessageWrapper.__wrap(ret);
+ }
+ /**
+ * @returns {ShinkaiMessageWrapper}
+ */
+ new_with_empty_inner_signature() {
+ try {
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
+ wasm.shinkaimessagewrapper_new_with_empty_inner_signature(retptr, this.__wbg_ptr);
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
+ if (r2) {
+ throw takeObject(r1);
+ }
+ return ShinkaiMessageWrapper.__wrap(r0);
+ } finally {
+ wasm.__wbindgen_add_to_stack_pointer(16);
+ }
+ }
+ /**
+ * @returns {string}
+ */
+ inner_content_for_hashing() {
+ let deferred2_0;
+ let deferred2_1;
+ try {
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
+ wasm.shinkaimessagewrapper_inner_content_for_hashing(retptr, this.__wbg_ptr);
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
+ var ptr1 = r0;
+ var len1 = r1;
+ if (r3) {
+ ptr1 = 0; len1 = 0;
+ throw takeObject(r2);
+ }
+ deferred2_0 = ptr1;
+ deferred2_1 = len1;
+ return getStringFromWasm0(ptr1, len1);
+ } finally {
+ wasm.__wbindgen_add_to_stack_pointer(16);
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
+ }
+ }
+ /**
+ * @returns {string}
+ */
+ calculate_blake3_hash_with_empty_outer_signature() {
+ let deferred1_0;
+ let deferred1_1;
+ try {
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
+ wasm.shinkaimessagewrapper_calculate_blake3_hash_with_empty_outer_signature(retptr, this.__wbg_ptr);
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
+ deferred1_0 = r0;
+ deferred1_1 = r1;
+ return getStringFromWasm0(r0, r1);
+ } finally {
+ wasm.__wbindgen_add_to_stack_pointer(16);
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
+ }
+ }
+ /**
+ * @returns {string}
+ */
+ calculate_blake3_hash_with_empty_inner_signature() {
+ let deferred2_0;
+ let deferred2_1;
+ try {
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
+ wasm.shinkaimessagewrapper_calculate_blake3_hash_with_empty_inner_signature(retptr, this.__wbg_ptr);
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
+ var r3 = getInt32Memory0()[retptr / 4 + 3];
+ var ptr1 = r0;
+ var len1 = r1;
+ if (r3) {
+ ptr1 = 0; len1 = 0;
+ throw takeObject(r2);
+ }
+ deferred2_0 = ptr1;
+ deferred2_1 = len1;
+ return getStringFromWasm0(ptr1, len1);
+ } finally {
+ wasm.__wbindgen_add_to_stack_pointer(16);
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
+ }
+ }
+ /**
* @returns {string}
*/
static generate_time_now() {
@@ -2963,13 +3053,13 @@ export function __wbindgen_string_new(arg0, arg1) {
return addHeapObject(ret);
};
-export function __wbindgen_object_clone_ref(arg0) {
- const ret = getObject(arg0);
+export function __wbindgen_error_new(arg0, arg1) {
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
return addHeapObject(ret);
};
-export function __wbindgen_error_new(arg0, arg1) {
- const ret = new Error(getStringFromWasm0(arg0, arg1));
+export function __wbindgen_object_clone_ref(arg0) {
+ const ret = getObject(arg0);
return addHeapObject(ret);
};
@@ -3172,6 +3262,16 @@ export function __wbg_getTime_5e2054f832d82ec9(arg0) {
return ret;
};
+export function __wbg_getTimezoneOffset_8aee3445f323973e(arg0) {
+ const ret = getObject(arg0).getTimezoneOffset();
+ return ret;
+};
+
+export function __wbg_new_cd59bfc8881f487b(arg0) {
+ const ret = new Date(getObject(arg0));
+ return addHeapObject(ret);
+};
+
export function __wbg_new0_c0be7df4b6bd481f() {
const ret = new Date();
return addHeapObject(ret);
diff --git a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm
index 921c4f6bb..ec2227d6e 100644
Binary files a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm and b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm differ
diff --git a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm.d.ts b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm.d.ts
index c454f6397..f1887f609 100644
--- a/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm.d.ts
+++ b/libs/shinkai-message-ts/src/pkg/shinkai_message_wasm_bg.wasm.d.ts
@@ -36,6 +36,18 @@ export function shinkaimessagebuilderwrapper_job_message(a: number, b: number, c
export function shinkaimessagebuilderwrapper_terminate_message(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number): void;
export function shinkaimessagebuilderwrapper_error_message(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number): void;
export function shinkaimessagebuilderwrapper_get_last_unread_messages_from_inbox(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number): void;
+export function __wbg_inboxnamewrapper_free(a: number): void;
+export function inboxnamewrapper_new(a: number, b: number): void;
+export function inboxnamewrapper_to_string(a: number, b: number): void;
+export function inboxnamewrapper_get_value(a: number): number;
+export function inboxnamewrapper_get_is_e2e(a: number): number;
+export function inboxnamewrapper_get_identities(a: number, b: number): void;
+export function inboxnamewrapper_get_unique_id(a: number): number;
+export function inboxnamewrapper_to_jsvalue(a: number, b: number): void;
+export function inboxnamewrapper_to_json_str(a: number, b: number): void;
+export function inboxnamewrapper_get_regular_inbox_name_from_params(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): void;
+export function inboxnamewrapper_get_job_inbox_name_from_params(a: number, b: number, c: number): void;
+export function inboxnamewrapper_get_inner(a: number): number;
export function __wbg_serializedagentwrapper_free(a: number): void;
export function serializedagentwrapper_fromStrings(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): void;
export function serializedagentwrapper_fromJsValue(a: number, b: number): void;
@@ -44,24 +56,10 @@ export function serializedagentwrapper_from_json_str(a: number, b: number, c: nu
export function serializedagentwrapper_inner(a: number, b: number): void;
export function serializedagentwrapper_new(a: number, b: number): void;
export function serializedagentwrapper_to_jsvalue(a: number, b: number): void;
-export function __wbg_shinkainamewrapper_free(a: number): void;
-export function shinkainamewrapper_new(a: number, b: number): void;
-export function shinkainamewrapper_get_full_name(a: number): number;
-export function shinkainamewrapper_get_node_name(a: number): number;
-export function shinkainamewrapper_get_profile_name(a: number): number;
-export function shinkainamewrapper_get_subidentity_type(a: number): number;
-export function shinkainamewrapper_get_subidentity_name(a: number): number;
-export function shinkainamewrapper_to_jsvalue(a: number, b: number): void;
-export function shinkainamewrapper_to_json_str(a: number, b: number): void;
-export function shinkainamewrapper_extract_profile(a: number, b: number): void;
-export function shinkainamewrapper_extract_node(a: number): number;
-export function __wbg_wasmencryptionmethod_free(a: number): void;
-export function wasmencryptionmethod_new(a: number, b: number): number;
-export function wasmencryptionmethod_as_str(a: number, b: number): void;
-export function wasmencryptionmethod_DiffieHellmanChaChaPoly1305(a: number): void;
-export function wasmencryptionmethod_None(a: number): void;
-export function convert_encryption_sk_string_to_encryption_pk_string(a: number, b: number, c: number): void;
-export function calculate_blake3_hash(a: number, b: number, c: number): void;
+export function shinkaitime_generateTimeNow(a: number): void;
+export function shinkaitime_generateTimeInFutureWithSecs(a: number, b: number): void;
+export function shinkaitime_generateSpecificTime(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void;
+export function __wbg_shinkaitime_free(a: number): void;
export function __wbg_jobscopewrapper_free(a: number): void;
export function jobscopewrapper_new(a: number, b: number, c: number): void;
export function jobscopewrapper_to_jsvalue(a: number, b: number): void;
@@ -81,6 +79,23 @@ export function jobmessagewrapper_to_json_str(a: number, b: number): void;
export function jobmessagewrapper_from_json_str(a: number, b: number, c: number): void;
export function jobmessagewrapper_from_jsvalue(a: number, b: number): void;
export function jobmessagewrapper_fromStrings(a: number, b: number, c: number, d: number, e: number, f: number): number;
+export function __wbg_shinkainamewrapper_free(a: number): void;
+export function shinkainamewrapper_new(a: number, b: number): void;
+export function shinkainamewrapper_get_full_name(a: number): number;
+export function shinkainamewrapper_get_node_name(a: number): number;
+export function shinkainamewrapper_get_profile_name(a: number): number;
+export function shinkainamewrapper_get_subidentity_type(a: number): number;
+export function shinkainamewrapper_get_subidentity_name(a: number): number;
+export function shinkainamewrapper_to_jsvalue(a: number, b: number): void;
+export function shinkainamewrapper_to_json_str(a: number, b: number): void;
+export function shinkainamewrapper_extract_profile(a: number, b: number): void;
+export function shinkainamewrapper_extract_node(a: number): number;
+export function __wbg_wasmencryptionmethod_free(a: number): void;
+export function wasmencryptionmethod_new(a: number, b: number): number;
+export function wasmencryptionmethod_as_str(a: number, b: number): void;
+export function wasmencryptionmethod_DiffieHellmanChaChaPoly1305(a: number): void;
+export function wasmencryptionmethod_None(a: number): void;
+export function convert_encryption_sk_string_to_encryption_pk_string(a: number, b: number, c: number): void;
export function __wbg_shinkaimessagewrapper_free(a: number): void;
export function shinkaimessagewrapper_message_body(a: number, b: number): void;
export function shinkaimessagewrapper_set_message_body(a: number, b: number, c: number): void;
@@ -92,25 +107,15 @@ export function shinkaimessagewrapper_to_jsvalue(a: number, b: number): void;
export function shinkaimessagewrapper_fromJsValue(a: number, b: number): void;
export function shinkaimessagewrapper_to_json_str(a: number, b: number): void;
export function shinkaimessagewrapper_from_json_str(a: number, b: number, c: number): void;
-export function shinkaimessagewrapper_calculate_hash(a: number, b: number): void;
+export function shinkaimessagewrapper_calculate_blake3_hash(a: number, b: number): void;
+export function shinkaimessagewrapper_new_with_empty_outer_signature(a: number): number;
+export function shinkaimessagewrapper_new_with_empty_inner_signature(a: number, b: number): void;
+export function shinkaimessagewrapper_inner_content_for_hashing(a: number, b: number): void;
+export function shinkaimessagewrapper_calculate_blake3_hash_with_empty_outer_signature(a: number, b: number): void;
+export function shinkaimessagewrapper_calculate_blake3_hash_with_empty_inner_signature(a: number, b: number): void;
export function shinkaimessagewrapper_generate_time_now(a: number): void;
export function shinkaimessagewrapper_new(a: number, b: number): void;
-export function __wbg_inboxnamewrapper_free(a: number): void;
-export function inboxnamewrapper_new(a: number, b: number): void;
-export function inboxnamewrapper_to_string(a: number, b: number): void;
-export function inboxnamewrapper_get_value(a: number): number;
-export function inboxnamewrapper_get_is_e2e(a: number): number;
-export function inboxnamewrapper_get_identities(a: number, b: number): void;
-export function inboxnamewrapper_get_unique_id(a: number): number;
-export function inboxnamewrapper_to_jsvalue(a: number, b: number): void;
-export function inboxnamewrapper_to_json_str(a: number, b: number): void;
-export function inboxnamewrapper_get_regular_inbox_name_from_params(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): void;
-export function inboxnamewrapper_get_job_inbox_name_from_params(a: number, b: number, c: number): void;
-export function inboxnamewrapper_get_inner(a: number): number;
-export function shinkaitime_generateTimeNow(a: number): void;
-export function shinkaitime_generateTimeInFutureWithSecs(a: number, b: number): void;
-export function shinkaitime_generateSpecificTime(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void;
-export function __wbg_shinkaitime_free(a: number): void;
+export function calculate_blake3_hash(a: number, b: number, c: number): void;
export function __wbindgen_malloc(a: number, b: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
export function __wbindgen_add_to_stack_pointer(a: number): number;
diff --git a/libs/shinkai-message-ts/src/wasm/ShinkaiMessageWrapper.ts b/libs/shinkai-message-ts/src/wasm/ShinkaiMessageWrapper.ts
index e6cda2239..e848d5438 100644
--- a/libs/shinkai-message-ts/src/wasm/ShinkaiMessageWrapper.ts
+++ b/libs/shinkai-message-ts/src/wasm/ShinkaiMessageWrapper.ts
@@ -22,7 +22,7 @@ export class ShinkaiMessageWrapper {
}
calculate_hash(): string {
- return this.wasmWrapper.calculate_hash();
+ return this.wasmWrapper.calculate_blake3_hash();
}
static time_now(): string {
diff --git a/package-lock.json b/package-lock.json
index 2a0f9eea9..80270ac48 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12290,8 +12290,9 @@
"license": "MIT"
},
"node_modules/crypto-js": {
- "version": "4.1.1",
- "license": "MIT"
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+ "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"node_modules/css-declaration-sorter": {
"version": "6.4.1",