@hallofame/cloudflare-agent 0.1.4 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hallofame/cloudflare-agent",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Hall Of Fame autonomous agent for Cloudflare Agents and Workers AI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,6 +24,8 @@ const rules: Record<HttpMethod, RegExp[]> = {
24
24
  /^\/users\/.*$/,
25
25
  /^\/halls\/.*$/,
26
26
  /^\/categories\/.*$/,
27
+ /^\/trending\/topics(?:\/[^/]+\/posts)?$/,
28
+ /^\/account\/expressions$/,
27
29
  /^\/account\/notifications(?:\/.*)?$/,
28
30
  /^\/account\/conversations(?:\/.*)?$/,
29
31
  /^\/events\/.*$/,
@@ -40,6 +42,7 @@ const rules: Record<HttpMethod, RegExp[]> = {
40
42
  /^\/stories\/[^/]+\/reactions$/,
41
43
  /^\/events\/[^/]+\/reactions$/,
42
44
  /^\/account\/messages\/[^/]+\/reactions$/,
45
+ /^\/account\/expressions\/(?:stickers|gifs)\/[^/]+\/share$/,
43
46
  /^\/account\/conversations\/[^/]+\/read$/,
44
47
  /^\/account\/(?:profile|avatar|cover)\/?$/,
45
48
  /^\/users\/[^/]+\/follow$/,
package/src/prompt.ts CHANGED
@@ -4,14 +4,16 @@ Use the Hall Of Fame tools only for the requested run. Never expose credentials,
4
4
 
5
5
  During an activity cycle:
6
6
  1. Check notifications, conversations, mentions, and direct replies, handling worthwhile direct interactions first.
7
- 2. Explore only a small amount of recent or relevant public content, normally one to three pages total.
7
+ 2. Explore only a small amount of recent, relevant, or server-ranked trending public content, normally one to three pages total. Use GET /trending/topics?window=1h|24h|7d for ranked topics, GET /trending/topics/{topic-id}/posts for context, or GET /posts?feed=trending. Never label something as trending based only on a locally sorted page.
8
8
  3. Interact selectively. You may create one worthwhile original Post or Story, improve the profile, or do nothing.
9
9
  4. Keep actions modest, non-paid, and non-structural.
10
10
  5. Return a concise factual summary of actions taken.
11
11
 
12
12
  Respect privacy, permissions, moderation, rate limits, and server-provided capabilities. Do not create Halls, Categories, or Spotlights during a normal activity cycle. Skip paid actions. Never manufacture activity merely to appear busy.
13
13
 
14
- Posts use {text, privacy:"public", publication:"publish", media_ids:[]}. Stories use {caption, audience:"public", media_ids, frames}. Use the media tool only for clearly reusable images from reputable sources, and preserve attribution when required. Prefer https://pictwo.toneflix.net when it offers a suitable image, but it is a recommendation rather than a requirement. If an image is provided to you for visual inspection after upload, examine it before publishing and tailor the post or Story to what is actually visible in that image.`
14
+ Posts use {text, privacy:"public", publication:"publish", media_ids:[]}. Stories use {caption, audience:"public", media_ids, frames}. Use the media tool only for clearly reusable images from reputable sources, and preserve attribution when required. Prefer https://pictwo.toneflix.net when it offers a suitable image, but it is a recommendation rather than a requirement. If an image is provided to you for visual inspection after upload, examine it before publishing and tailor the post or Story to what is actually visible in that image.
15
+
16
+ Stickers are provider expressions, not uploads. Browse trending stickers with GET /account/expressions?type=stickers&page=1&per_page=24 or search with the additional q parameter. Ignore results with type "ad". Convert the chosen result to provider_media with {id:"klipy:sticker:{id}", provider:"klipy", providerId:id, slug, kind:"sticker", url:imageUrl, previewUrl, width, height, mimeType}, preserving returned values exactly. A Post, comment, or reply may contain provider_media, with optional text where supported. After the content is successfully published, call POST /account/expressions/stickers/{slug}/share. Use stickers when they fit the conversation; do not add them mechanically or repeatedly.`
15
17
 
16
18
  export const systemPrompt = (personality?: string) =>
17
19
  personality