Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: dev => main 0.1.9-alpha.1 #2361

Open
wants to merge 485 commits into
base: main
Choose a base branch
from
Open

chore: dev => main 0.1.9-alpha.1 #2361

wants to merge 485 commits into from

Conversation

odilitime
Copy link
Collaborator

@odilitime odilitime commented Jan 16, 2025

changelog

cygaar and others added 30 commits January 12, 2025 14:44
feature: adding tests for whatsapp plugin
fix: DeepSeek API bug:  missing api key setting
fix: don't force root for install
- Updated safeParseInt to use Number.isNaN for better clarity.
- Added nullish coalescing to handle potential undefined FARCASTER_FID.
- Implemented a check to skip interactions if no FID is found.
- Enhanced stopping mechanism for the Farcaster client to ensure it only attempts to stop if the client is initialized.
…cter management features. Added support for verbose mode, character selection, and environment configuration. Updated dependency installation process and streamlined project setup. Removed obsolete code related to previous character management.
…fiable-log-api-from-develop

# Conflicts:
#	agent/src/index.ts
#	packages/core/src/types.ts
#	pnpm-lock.yaml
…ort for environments without gum. Ensure gum installation is prioritized before other operations. Clean up and streamline logging methods for better user experience.
…from the official source and adding necessary environment variables to .bashrc and .profile. Ensure NVM directory is created if it doesn't exist, and improve loading checks for nvm.sh. This update streamlines the setup process for users.
…ctly download and install NVM, source necessary scripts immediately, and improve error handling. Removed redundant checks and logging for installation failures, enhancing user experience during setup.
…treamline the process. The installation script is now downloaded to a temporary file, made executable, and executed with enhanced logging for failures. Clean up of temporary files is also included to ensure a tidy environment.
…rectly executing the installation script without temporary files. This change simplifies the setup procedure and enhances user experience by reducing complexity and improving efficiency.
…treamline the process. The installation now logs output to a temporary file, attempts to load NVM immediately after installation, and provides clearer error messages if the installation fails. This enhances user experience by ensuring better feedback during setup.
…ectly into setup.sh. The new implementation enhances error handling, logging, and user feedback during the Node.js and pnpm installation process. This streamlines the setup experience by ensuring NVM is installed and configured correctly before proceeding with other installations.
omahs and others added 13 commits January 16, 2025 08:28
docs: Update README_FR.md
fix: esure RA Action reply does not hallucinate
fix: align base url in client if api runs on a different port
* venice: add safe_mode & cfg_scale for images

* add missing types

for safeMode & cfgScale

* update lockfile

---------

Co-authored-by: Sayo <hi@sayo.wtf>
these packages are being used in prod build

Co-authored-by: Sayo <hi@sayo.wtf>
chore: Reorganizing README translations into a dedicated i18n directory structure
chore: Prep 0.1.9-alpha.1
// Execute the transaction and ensure it's called with ()
await this.db.transaction(() => {
if (id.includes("*")) {
const pattern = id.replace("*", "%");

Check failure

Code scanning / CodeQL

Incomplete string escaping or encoding High

This replaces only the first occurrence of "*".

Copilot Autofix AI about 10 hours ago

To fix the problem, we need to ensure that all occurrences of the asterisk (*) in the id string are replaced with a percent sign (%). This can be achieved by using a regular expression with the global flag (g). This change will ensure that the id string is correctly transformed into a pattern suitable for the SQL LIKE clause.

Suggested changeset 1
packages/adapter-sqlite/src/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/packages/adapter-sqlite/src/index.ts b/packages/adapter-sqlite/src/index.ts
--- a/packages/adapter-sqlite/src/index.ts
+++ b/packages/adapter-sqlite/src/index.ts
@@ -977,3 +977,3 @@
                 if (id.includes("*")) {
-                    const pattern = id.replace("*", "%");
+                    const pattern = id.replace(/\*/g, "%");
                     const sql = "DELETE FROM knowledge WHERE id LIKE ?";
EOF
@@ -977,3 +977,3 @@
if (id.includes("*")) {
const pattern = id.replace("*", "%");
const pattern = id.replace(/\*/g, "%");
const sql = "DELETE FROM knowledge WHERE id LIKE ?";
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Comment on lines +128 to +136
content
.replace(/```[\s\S]*?```/g, "")
.replace(/`.*?`/g, "")
.replace(/#{1,6}\s*(.*)/g, "$1")
.replace(/!\[(.*?)\]\(.*?\)/g, "$1")
.replace(/\[(.*?)\]\(.*?\)/g, "$1")
.replace(/(https?:\/\/)?(www\.)?([^\s]+\.[^\s]+)/g, "$3")
.replace(/<@[!&]?\d+>/g, "")
.replace(/<[^>]*>/g, "")

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<script
, which may cause an HTML element injection vulnerability.

Copilot Autofix AI about 10 hours ago

To fix the problem, we should ensure that the sanitization process is thorough and handles all potential edge cases. One effective way to achieve this is by using a well-tested sanitization library, such as sanitize-html, which is designed to handle various types of HTML content and remove unsafe elements.

The best way to fix the problem without changing existing functionality is to replace the current sanitization logic in the preprocess function with a call to sanitize-html. This will ensure that all potentially unsafe HTML content is removed, and the function remains robust against injection attacks.

Suggested changeset 2
packages/core/src/ragknowledge.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/packages/core/src/ragknowledge.ts b/packages/core/src/ragknowledge.ts
--- a/packages/core/src/ragknowledge.ts
+++ b/packages/core/src/ragknowledge.ts
@@ -1,2 +1,3 @@
 import { embed } from "./embedding.ts";
+import sanitizeHtml from "sanitize-html";
 import { splitChunks } from "./generation.ts";
@@ -127,19 +128,10 @@
         return (
-            content
-                .replace(/```[\s\S]*?```/g, "")
-                .replace(/`.*?`/g, "")
-                .replace(/#{1,6}\s*(.*)/g, "$1")
-                .replace(/!\[(.*?)\]\(.*?\)/g, "$1")
-                .replace(/\[(.*?)\]\(.*?\)/g, "$1")
-                .replace(/(https?:\/\/)?(www\.)?([^\s]+\.[^\s]+)/g, "$3")
-                .replace(/<@[!&]?\d+>/g, "")
-                .replace(/<[^>]*>/g, "")
-                .replace(/^\s*[-*_]{3,}\s*$/gm, "")
-                .replace(/\/\*[\s\S]*?\*\//g, "")
-                .replace(/\/\/.*/g, "")
-                .replace(/\s+/g, " ")
-                .replace(/\n{3,}/g, "\n\n")
-                // .replace(/[^a-zA-Z0-9\s\-_./:?=&]/g, "") --this strips out CJK characters
-                .trim()
-                .toLowerCase()
+            sanitizeHtml(content, {
+                allowedTags: [],
+                allowedAttributes: {}
+            })
+            .replace(/\s+/g, " ")
+            .replace(/\n{3,}/g, "\n\n")
+            .trim()
+            .toLowerCase()
         );
EOF
@@ -1,2 +1,3 @@
import { embed } from "./embedding.ts";
import sanitizeHtml from "sanitize-html";
import { splitChunks } from "./generation.ts";
@@ -127,19 +128,10 @@
return (
content
.replace(/```[\s\S]*?```/g, "")
.replace(/`.*?`/g, "")
.replace(/#{1,6}\s*(.*)/g, "$1")
.replace(/!\[(.*?)\]\(.*?\)/g, "$1")
.replace(/\[(.*?)\]\(.*?\)/g, "$1")
.replace(/(https?:\/\/)?(www\.)?([^\s]+\.[^\s]+)/g, "$3")
.replace(/<@[!&]?\d+>/g, "")
.replace(/<[^>]*>/g, "")
.replace(/^\s*[-*_]{3,}\s*$/gm, "")
.replace(/\/\*[\s\S]*?\*\//g, "")
.replace(/\/\/.*/g, "")
.replace(/\s+/g, " ")
.replace(/\n{3,}/g, "\n\n")
// .replace(/[^a-zA-Z0-9\s\-_./:?=&]/g, "") --this strips out CJK characters
.trim()
.toLowerCase()
sanitizeHtml(content, {
allowedTags: [],
allowedAttributes: {}
})
.replace(/\s+/g, " ")
.replace(/\n{3,}/g, "\n\n")
.trim()
.toLowerCase()
);
packages/core/package.json
Outside changed files

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/packages/core/package.json b/packages/core/package.json
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -92,3 +92,4 @@
         "uuid": "11.0.3",
-        "zod": "3.23.8"
+        "zod": "3.23.8",
+        "sanitize-html": "^2.14.0"
     }
EOF
@@ -92,3 +92,4 @@
"uuid": "11.0.3",
"zod": "3.23.8"
"zod": "3.23.8",
"sanitize-html": "^2.14.0"
}
This fix introduces these dependencies
Package Version Security advisories
sanitize-html (npm) 2.14.0 None
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@odilitime odilitime marked this pull request as draft January 16, 2025 09:39
@odilitime odilitime marked this pull request as ready for review January 16, 2025 10:05
defitricks and others added 10 commits January 16, 2025 15:58
#2370)

* fix: Fix typo in import statement for Solana AgentKit plugin Update index.ts

* Update index.ts

---------

Co-authored-by: Sayo <82053242+wtfsayo@users.noreply.github.com>
* add to main index

* cleanup

---------

Co-authored-by: Sayo <hi@sayo.wtf>
* fix

* Update info.json

---------

Co-authored-by: Sero <69639595+Seroxdesign@users.noreply.github.com>
Co-authored-by: Sayo <hi@sayo.wtf>
* fix: typo

Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>

* fix: typo

Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>

---------

Signed-off-by: ericlehong <193237094+ericlehong@users.noreply.github.com>
Co-authored-by: Sayo <hi@sayo.wtf>
* Update index.md

* Update quickstart.md

* Update agents.md

* Update actions.md

* chore: with -> through
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.