@firstperson/firstperson 2026.1.38 → 2026.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +4 -1
- package/index.ts +15 -25
- package/package.json +2 -1
package/index.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
2
2
|
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
|
|
3
|
+
import { Type } from "@sinclair/typebox";
|
|
3
4
|
|
|
4
5
|
import { firstPersonPlugin } from "./src/channel.js";
|
|
5
6
|
import { setFirstPersonRuntime } from "./src/runtime.js";
|
|
6
7
|
|
|
8
|
+
// TypeBox schemas for profile tools
|
|
9
|
+
const UpdateProfileSchema = Type.Object({
|
|
10
|
+
name: Type.String({ description: "Your display name (1-50 characters, required)" }),
|
|
11
|
+
bio: Type.Optional(Type.String({ description: "A short bio or description (up to 160 characters)" })),
|
|
12
|
+
avatar_url: Type.Optional(Type.String({ description: "HTTPS URL to your avatar image" })),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const GetProfileSchema = Type.Object({});
|
|
16
|
+
|
|
7
17
|
const plugin = {
|
|
8
18
|
id: "firstperson",
|
|
9
19
|
name: "First Person",
|
|
@@ -26,26 +36,9 @@ const plugin = {
|
|
|
26
36
|
return {
|
|
27
37
|
name: "firstperson_update_profile",
|
|
28
38
|
description: "Update your profile on the First Person app. Use this to set or change your display name, bio, or avatar that users see in the iOS app.",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
name: {
|
|
33
|
-
type: "string",
|
|
34
|
-
description: "Your display name (1-50 characters, required)"
|
|
35
|
-
},
|
|
36
|
-
bio: {
|
|
37
|
-
type: "string",
|
|
38
|
-
description: "A short bio or description (up to 160 characters, optional)"
|
|
39
|
-
},
|
|
40
|
-
avatar_url: {
|
|
41
|
-
type: "string",
|
|
42
|
-
description: "HTTPS URL to your avatar image (optional)"
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
required: ["name"],
|
|
46
|
-
},
|
|
47
|
-
async handler(input: { name: string; bio?: string; avatar_url?: string }) {
|
|
48
|
-
const { name, bio = "", avatar_url = "" } = input;
|
|
39
|
+
parameters: UpdateProfileSchema,
|
|
40
|
+
execute: async (_toolCallId: string, args: { name: string; bio?: string; avatar_url?: string }) => {
|
|
41
|
+
const { name, bio = "", avatar_url = "" } = args;
|
|
49
42
|
|
|
50
43
|
const res = await fetch(`${relayUrl}/api/v1/profile`, {
|
|
51
44
|
method: "PUT",
|
|
@@ -79,11 +72,8 @@ const plugin = {
|
|
|
79
72
|
return {
|
|
80
73
|
name: "firstperson_get_profile",
|
|
81
74
|
description: "Get your current profile from the First Person app. Use this to check what name, bio, and avatar users currently see.",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
properties: {},
|
|
85
|
-
},
|
|
86
|
-
async handler() {
|
|
75
|
+
parameters: GetProfileSchema,
|
|
76
|
+
execute: async () => {
|
|
87
77
|
const res = await fetch(`${relayUrl}/api/v1/profile`, {
|
|
88
78
|
method: "GET",
|
|
89
79
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firstperson/firstperson",
|
|
3
|
-
"version": "2026.1.
|
|
3
|
+
"version": "2026.1.39",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw channel plugin for the First Person iOS app",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@sinclair/typebox": "^0.34.0",
|
|
42
43
|
"ws": "^8.16.0",
|
|
43
44
|
"zod": "^4.0.0"
|
|
44
45
|
},
|