-
Notifications
You must be signed in to change notification settings - Fork 6
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
1.2.34 #163
1.2.34 #163
Changes from 15 commits
bd1d79e
8b661e6
e0cdf66
3865bc9
cfdd69d
62b11ea
63c9443
af23c73
548ecfe
7286bac
8a9f53e
8d2949d
342c59b
3231463
9679b88
3f8c913
5277ffe
fa63388
dd9290b
e950227
c06db8a
58a1ba4
d20d35c
9cd3497
b3a7d68
c1ab21e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# @xmtp/secure | ||
|
||
A secure XMTP client implementation with built-in encryption and key management. | ||
|
||
## Features | ||
|
||
- Secure key management | ||
- Support for both v2 and v3 XMTP clients | ||
- Built-in encryption | ||
- Support for multiple content types | ||
- Group messaging capabilities | ||
|
||
## Installation |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "xmtp-agent", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
} | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist/**/*" | ||
], | ||
"scripts": { | ||
"build": "rollup -c", | ||
"build:watch": "yarn build -w", | ||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", | ||
"publish": "npm publish", | ||
"test": "yarn build && vitest", | ||
"test:client": "vitest run tests/client" | ||
}, | ||
"dependencies": { | ||
"@changesets/changelog-git": "^0.2.0", | ||
"@changesets/cli": "^2.27.5", | ||
"@xmtp/content-type-primitives": "^1.0.2", | ||
"@xmtp/content-type-reaction": "^1.1.10-beta.1", | ||
"@xmtp/content-type-read-receipt": "^2.0.0", | ||
"@xmtp/content-type-remote-attachment": "1.1.11", | ||
"@xmtp/content-type-reply": "^1.1.11", | ||
"@xmtp/content-type-text": "^1.0.0", | ||
"@xmtp/grpc-api-client": "^0.2.8", | ||
"@xmtp/node-sdk": "^0.0.31", | ||
"@xmtp/xmtp-js": "^13.0.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Update dependency constraints to use stable versions The version check reveals that stable versions are available for all dependencies:
Recommendations:
🔗 Analysis chainReview dependency version constraints Several @xmtp dependencies have specific version constraints that might need review:
Run this script to check for potential version conflicts: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Check for version compatibility issues in @xmtp dependencies
echo "Checking @xmtp dependencies versions..."
npm info '@xmtp/content-type-reaction@^1.1.10-beta.1' version
npm info '@xmtp/[email protected]' version
npm info '@xmtp/content-type-reply@^1.1.11' version
npm info '@xmtp/xmtp-js@^13.0.3' version
Length of output: 593 |
||
"dotenv": "^16.4.5", | ||
"typescript": "^5.4.5", | ||
"viem": "^2.16.3" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/node": "^20.14.2", | ||
"@vitest/coverage-v8": "^2.1.4", | ||
"prettier": "^3.3.1", | ||
"rollup": "^4.18.0", | ||
"rollup-plugin-dts": "^6.1.1", | ||
"ts-node": "^10.9.2", | ||
"turbo": "^2.2.3", | ||
"vitest": "^2.1.4" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"node": ">=20" | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import typescript from "@rollup/plugin-typescript"; | ||
import { defineConfig } from "rollup"; | ||
import { dts } from "rollup-plugin-dts"; | ||
|
||
const external = [ | ||
"@xmtp/content-type-primitives", | ||
"@xmtp/content-type-text", | ||
"@xmtp/content-type-reaction", | ||
"@xmtp/content-type-reply", | ||
"@xmtp/content-type-remote-attachment", | ||
"@xmtp/node-sdk", | ||
"@xmtp/message-kit", | ||
"@xmtp/xmtp-js", | ||
"@redis/client", | ||
"@xmtp/proto", | ||
"@xmtp/node-bindings", | ||
"@xmtp/grpc-api-client", | ||
"@xmtp/content-type-read-receipt", | ||
"cross-fetch", | ||
"path", | ||
"crypto", | ||
"viem", | ||
"dotenv", | ||
"openai", | ||
"viem/accounts", | ||
"fs/promises", | ||
"fs", | ||
"viem/chains", | ||
"dotenv/config", | ||
]; | ||
|
||
const plugins = [ | ||
typescript({ | ||
declaration: false, | ||
declarationMap: false, | ||
}), | ||
]; | ||
|
||
export default defineConfig([ | ||
{ | ||
input: "src/index.ts", | ||
output: { | ||
file: "dist/index.js", | ||
format: "es", | ||
sourcemap: true, | ||
}, | ||
plugins, | ||
external, | ||
}, | ||
{ | ||
input: "src/index.ts", | ||
output: { | ||
file: "dist/index.cjs", | ||
format: "cjs", | ||
sourcemap: true, | ||
}, | ||
plugins, | ||
external, | ||
}, | ||
{ | ||
input: "src/index.ts", | ||
output: { | ||
file: "dist/index.d.ts", | ||
format: "es", | ||
}, | ||
plugins: [dts()], | ||
}, | ||
]); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./lib/xmtp.js"; | ||
export * from "./lib/types.js"; | ||
export * from "./content-types/agent-message.js"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { privateKeyToAccount } from "viem/accounts"; | ||
import { ContentTypeId } from "@xmtp/content-type-primitives"; | ||
import { createWalletClient } from "viem"; | ||
import { ClientOptions } from "@xmtp/node-sdk"; | ||
import { Client as V3Client } from "@xmtp/node-sdk"; | ||
import { Client as V2Client } from "@xmtp/xmtp-js"; | ||
|
||
export interface XmtpClient { | ||
inboxId: string; | ||
address: string; | ||
client: V3Client; | ||
v2client: V2Client; | ||
} | ||
export { Client as V3Client } from "@xmtp/node-sdk"; | ||
export { Client as V2Client } from "@xmtp/xmtp-js"; | ||
|
||
export interface UserReturnType { | ||
key: string; | ||
account: ReturnType<typeof privateKeyToAccount>; | ||
wallet: ReturnType<typeof createWalletClient>; | ||
} | ||
export type xmtpConfig = { | ||
privateKey?: string; | ||
client?: any; | ||
gptModel?: string; | ||
} & ClientOptions; | ||
humanagent marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export type Message = { | ||
id: string; // Unique identifier for the message | ||
sent: Date; // Date when the message was sent | ||
content: { | ||
text?: string | undefined; // Text content of the message | ||
reply?: string | undefined; // Reply content if the message is a reply | ||
previousMsg?: string | undefined; // Reference to the previous message | ||
react?: string | undefined; // Reaction content if the message is a reaction | ||
content?: any | undefined; // Any other content | ||
params?: any | undefined; // Parameters for the message | ||
reference?: string | undefined; // Reference ID for the message | ||
skill?: string | undefined; // Skill associated with the message | ||
}; | ||
sender: User; // Sender of the message | ||
typeId: string; // Type identifier for the message | ||
}; | ||
export type Group = { | ||
id: string; | ||
sync: () => Promise<void>; | ||
addMembers: (addresses: string[]) => Promise<void>; | ||
addMembersByInboxId: (inboxIds: string[]) => Promise<void>; | ||
send: (content: string, contentType?: ContentTypeId) => Promise<string>; | ||
isAdmin: (inboxId: string) => boolean; | ||
isSuperAdmin: (inboxId: string) => boolean; | ||
admins: string[]; | ||
superAdmins: string[]; | ||
createdAt: Date; | ||
members: User[]; | ||
}; | ||
|
||
export interface User { | ||
inboxId: string; | ||
address: string; | ||
accountAddresses: string[]; | ||
installationIds?: string[]; | ||
username?: string; | ||
ensDomain?: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix markdown syntax in package link.
There's a syntax error in the markdown link for the agentsdk package.
Apply this fix:
📝 Committable suggestion