@triplef/agent 0.1.26 → 0.1.27

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.
@@ -207,7 +207,7 @@ declare function buildMemoryProfilePrompt(params: {
207
207
  maxPayloadChars?: number;
208
208
  }): string;
209
209
 
210
- declare const MEMORY_WRITE_INSTRUCTIONS = "MEMORY WRITE JOB \u2014 one purpose: decide whether THIS turn yielded anything worth persisting, and store it in the correct lane via the memory-partition-remember or memory-cognition-remember tool.\n\nTwo lanes, never confused:\n- memory-partition = the OBJECTIVE fact store: external-world facts, factual records, project details, and events the user stated, subjects gathered this turn, or facts the user asked you to remember.\n- memory-cognition = the SUBJECTIVE profile store: every preference, interest, trait, or internal state of the user (stated or inferred) \u2014 YOUR understanding of the user, persona learnings included.\n\nYou receive:\n- USER REQUEST: what the user asked.\n- PRIOR MEMORY: facts already stored for this user (may be empty).\n- PROBED THIS TURN: what memory-partition-recall already surfaced for this turn (may be empty) \u2014 already known, never re-store.\n- GATHERED DATA: summarized tool results from this turn (web searches, lookups).\n\nStore into the PARTITION lane (call memory-partition-remember) only when it is durable, objective, and user-specific:\n- A factual record the user states or asks you to track (contact info, a decision, a project detail, an event, their setup \u2014 however phrased, any language).\n- Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.\n\nROUTING CONSTRAINT (absolute): extract ONLY objective, external facts to the partition. You MUST NOT store user preferences, behavioral traits, or internal states there (\"the user likes\u2026\", \"the user is interested in\u2026\", \"the user prefers\u2026\"). All user profile and persona data is deferred to the cognition tier.\n\nStore into the COGNITION lane (call memory-cognition-remember) whenever the turn yields SUBJECTIVE user data, stated or derived:\n- A preference or interest the user states outright (favorite X, a like or dislike, a style choice) \u2014 stated preferences live HERE, never in the partition.\n- An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.\n- Never an objective fact \u2014 those belong in the partition lane.\n\nSTORAGE MECHANICS \u2014 how your memory works (write for the retriever):\n- Each stored record is embedded as a whole AND matched sentence-by-sentence at recall time (multi-variant retrieval). One self-contained fact per call; a single long, dense sentence is fine, but lead with the subject (\"Sam's phone number is 555-1234\", never \"His number is \u2026\").\n- Restating a record verbatim OVERWRITES it in place \u2014 updates are restatements of the full corrected statement, not diffs.\n- tags are the ONLY topic-filter vocabulary at recall \u2014 reuse stable, lowercase topic labels (partition lane only). Tags are NARROW and specific: entity names, product names, game titles (\"amd\", \"stellar blade\", \"stellar blade blood rain\").\n- The macro-taxonomy routes a fact into its family hierarchy (partition lane only), top-down: CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE (the NODE is the stored record itself \u2014 never named):\n - category (CLUSTER): ONE lowercase PLURAL family noun \u2014 stocks, games, pets, work, health, finance, contacts \u2026\n - community (COMMUNITY): ONE lowercase PLURAL sub-family narrowing the category (\"survival games\" under \"games\"); omit when no sub-family applies.\n - subject (HUB): the lowercase SINGULAR main subject entity the fact is about (\"project zomboid\", \"amd\", \"sam\") \u2014 a specific name, never pluralized; always include when the fact is about a specific entity.\n A category or community is NEVER a specific entity, product, company, or game title: \"amd\" is a subject under the category \"stocks\"; \"stellar blade\" is a subject under the category \"games\". Always include category; reuse the existing labels whenever they fit.\n\nTAXONOMY PROBING (pick first, create if necessary): before naming a community or hub you are not certain exists, call memory-taxonomy-probe top-down \u2014 cluster \u2192 community \u2192 hub \u2014 and ADOPT a returned candidate by naming it VERBATIM in the remember call (its id becomes the next probe's parentId). CREATE a new label only when every candidate misses the meaning \u2014 then follow the phrasing rules (plural family/sub-family, singular hub) and optionally pass an \"icon\" from the curated set for the label you create. The known-vocabulary section below already lists likely fits; probing confirms them or finds better ones.\n\nDo NOT store:\n- Public facts merely fetched this turn that do not relate to the user (e.g. generic web results).\n- Anything already covered by PRIOR MEMORY or PROBED THIS TURN \u2014 extend or update it via the remember call; do not repeat.\n- Tool artifacts: URLs, search scores, image metadata, raw JSON keys.\n- Inferred, assumed, or extrapolated details about the user that neither their words nor GATHERED DATA support \u2014 if the user did not state it (or clearly imply it), it is not memory; when in doubt, answer \"none\".\n\nRules:\n- Each remember call stores ONE self-contained statement (stand-alone, understandable weeks later without this conversation's context).\n- Call each remember tool once per distinct durable item \u2014 no more.\n- If nothing durable surfaced, produce a one-word text answer (\"none\") and make NO tool call. An empty memory write is a correct outcome, never a failure.";
210
+ declare const MEMORY_WRITE_INSTRUCTIONS = "MEMORY WRITE JOB \u2014 one purpose: decide whether THIS turn yielded anything worth persisting, and store it in the correct lane via the memory-partition-remember or memory-cognition-remember tool.\n\nTwo lanes, never confused:\n- memory-partition = the OBJECTIVE fact store: external-world facts, factual records, project details, and events the user stated, subjects gathered this turn, or facts the user asked you to remember.\n- memory-cognition = the SUBJECTIVE profile store: every preference, interest, trait, or internal state of the user (stated or inferred) \u2014 YOUR understanding of the user, persona learnings included.\n\nYou receive:\n- USER REQUEST: what the user asked.\n- PRIOR MEMORY: facts already stored for this user (may be empty).\n- PROBED THIS TURN: what memory-partition-recall already surfaced for this turn (may be empty) \u2014 already known, never re-store.\n- GATHERED DATA: summarized tool results from this turn (web searches, lookups).\n\nStore into the PARTITION lane (call memory-partition-remember) only when it is durable, objective, and user-specific:\n- A factual record the user states or asks you to track (contact info, a decision, a project detail, an event, their setup \u2014 however phrased, any language).\n- Knowledge about a subject the user cares about that was gathered this turn and extends what is already in PRIOR MEMORY.\n\nROUTING CONSTRAINT (absolute): extract ONLY objective, external facts to the partition. You MUST NOT store user preferences, behavioral traits, or internal states there (\"the user likes\u2026\", \"the user is interested in\u2026\", \"the user prefers\u2026\"). All user profile and persona data is deferred to the cognition tier.\n\nStore into the COGNITION lane (call memory-cognition-remember) whenever the turn yields SUBJECTIVE user data, stated or derived:\n- A preference or interest the user states outright (favorite X, a like or dislike, a style choice) \u2014 stated preferences live HERE, never in the partition.\n- An inferred trait, a standing interest, a working nuance, or a connection between facts the turn supports.\n- Never an objective fact \u2014 those belong in the partition lane.\n\nSTORAGE MECHANICS \u2014 how your memory works (write for the retriever):\n- Each stored record is embedded as a whole AND matched sentence-by-sentence at recall time (multi-variant retrieval). One self-contained fact per call; a single long, dense sentence is fine, but lead with the subject (\"Sam's phone number is 555-1234\", never \"His number is \u2026\").\n- Restating a record verbatim OVERWRITES it in place \u2014 updates are restatements of the full corrected statement, not diffs.\n- tags are the ONLY topic-filter vocabulary at recall \u2014 reuse stable, lowercase topic labels (partition lane only). Tags are NARROW and specific: entity names, product names, game titles (\"amd\", \"stellar blade\", \"stellar blade blood rain\").\n- The macro-taxonomy routes a fact into its family hierarchy (partition lane only), top-down: CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE (the NODE is the stored record itself \u2014 never named):\n - category (CLUSTER): ONE lowercase PLURAL family noun \u2014 stocks, games, pets, work, health, finance, contacts \u2026\n - community (COMMUNITY): ONE lowercase PLURAL sub-family narrowing the category (\"survival games\" under \"games\", \"tv shows\" under \"shows\"); omit when no sub-family applies.\n - subject (HUB): the lowercase SINGULAR main subject entity the fact is about (\"project zomboid\", \"amd\", \"sam\") \u2014 a specific name, never pluralized; always include when the fact is about a specific entity.\n A category or community is NEVER a specific entity, product, company, or game title: \"amd\" is a subject under the category \"stocks\"; \"stellar blade\" is a subject under the category \"games\"; a show/work title like \"breaking-bad\" is a tag or hub, never a community. Always include category; reuse the existing labels whenever they fit.\n- PERSONA & FICTION CONTENT (absolute): content about an adopted persona, a roleplay, or a fictional/entertainment work routes by its real-world MEDIUM, never by in-universe domains \u2014 a TV persona's biography, family, or career belongs under the medium family (category \"shows\", community \"tv shows\", hub the show's title or the persona name); never \"family\", \"education\", \"business\", or \"science\" for invented content.\n\nTAXONOMY PROBING (pick first, create if necessary): before naming a community or hub you are not certain exists, call memory-taxonomy-probe top-down \u2014 cluster \u2192 community \u2192 hub \u2014 and ADOPT a returned candidate by naming it VERBATIM in the remember call (its id becomes the next probe's parentId). CREATE a new label only when every candidate misses the meaning \u2014 then follow the phrasing rules (plural family/sub-family, singular hub) and optionally pass an \"icon\" from the curated set for the label you create. The known-vocabulary section below already lists likely fits; probing confirms them or finds better ones.\n\nDo NOT store:\n- Public facts merely fetched this turn that do not relate to the user (e.g. generic web results).\n- Anything already covered by PRIOR MEMORY or PROBED THIS TURN \u2014 extend or update it via the remember call; do not repeat.\n- Tool artifacts: URLs, search scores, image metadata, raw JSON keys.\n- Inferred, assumed, or extrapolated details about the user that neither their words nor GATHERED DATA support \u2014 if the user did not state it (or clearly imply it), it is not memory; when in doubt, answer \"none\".\n\nRules:\n- Each remember call stores ONE self-contained statement (stand-alone, understandable weeks later without this conversation's context).\n- Call each remember tool once per distinct durable item \u2014 no more.\n- If nothing durable surfaced, produce a one-word text answer (\"none\") and make NO tool call. An empty memory write is a correct outcome, never a failure.";
211
211
  declare function buildMemoryWritePrompt(params: {
212
212
  userRequest: string;
213
213
  priorMemory?: string;
@@ -3019,14 +3019,18 @@ var EncyclopediaClassifySchema = z.object({
3019
3019
  /**
3020
3020
  * One broad lowercase PLURAL family label for the document (e.g. `games`,
3021
3021
  * `work`, `health`) — the constellation's CLUSTER tier. Never a specific
3022
- * entity, product, company, or title.
3022
+ * entity, product, company, or title. Fiction/entertainment content takes
3023
+ * the medium family (e.g. `shows`) — never an in-universe domain (`family`,
3024
+ * `education`, `business` describe reality, not an invented life).
3023
3025
  */
3024
3026
  category: z.string(),
3025
3027
  /**
3026
3028
  * One lowercase PLURAL sub-family label narrowing the category (e.g.
3027
- * `survival-games` under `games`) — the constellation's COMMUNITY tier, one
3028
- * level below the cluster. Optional: omit when no sub-family applies. Never
3029
- * a specific entity, product, company, or title.
3029
+ * `survival-games` under `games`, `tv-shows` under `shows`) — the
3030
+ * constellation's COMMUNITY tier, one level below the cluster. Optional:
3031
+ * omit when no sub-family applies. Never a specific entity, product,
3032
+ * company, or title — a show/work title like `breaking-bad` is a topic or
3033
+ * tag, never a community.
3030
3034
  */
3031
3035
  community: z.string().optional(),
3032
3036
  /**
@@ -3086,8 +3090,9 @@ TAXONOMY HIERARCHY (top-down): CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE
3086
3090
  - NODE = the individual chunks of the document itself \u2014 the leaves attached to the hub (you never name these).
3087
3091
 
3088
3092
  - The document may be a fetched web page, an uploaded file, or a search-result snippet. Classify by its CONTENT, never by its source shape \u2014 a file has no domain, and that must not matter.
3093
+ - FICTION & ENTERTAINMENT CONTENT (absolute): a document about an entertainment work or fictional universe classifies by its real-world MEDIUM, never by the work's in-universe domains. A TV episode page about a character's family or career is NOT "family", "education", "business", or "science" \u2014 the category is the medium family (e.g. "shows"), the community a true plural sub-family (e.g. "tv-shows"), and the work's title is the topic (e.g. "breaking bad"), never the community.
3089
3094
  - category (CLUSTER): ONE broad lowercase PLURAL family noun (e.g. "games", "work", "health", "finance") that groups the topic into a family. It labels the TOPIC \u2014 never a side theme or an incidental mention on the page. Never a specific entity, product, company, or title.
3090
- - community (COMMUNITY, optional): ONE lowercase PLURAL sub-family narrowing the category (e.g. "survival-games" under "games"). Omit it when no sub-family applies; never a specific entity, product, company, or title.
3095
+ - community (COMMUNITY, optional): ONE lowercase PLURAL sub-family narrowing the category (e.g. "survival-games" under "games"). Omit it when no sub-family applies; never a specific entity, product, company, or title \u2014 a show/work title like "breaking-bad" is a topic or a tag, never a community.
3091
3096
  - topic (HUB): the document's MAIN subject entity \u2014 what the whole source is about (e.g. "wuthering waves", "q3 budget", "rust borrow checker") \u2014 SINGULAR and specific. A short, reusable label \u2014 not a sentence, not a URL, not a filename, never a domain or a site name. Never a sub-part of the main subject (a chapter, a location, one feature) and never an adjacent proper noun (a publisher, an author, a related event) \u2014 when a title-level entity exists, it is the topic.
3092
3097
  - When the document is about a KNOWN TOPIC, output that label VERBATIM \u2014 prefer "neverness to everness" over minting a variant like "nte".
3093
3098
  - TAXONOMY PROBING (pick first, create if necessary): when the memory-taxonomy-probe tool is available, probe top-down \u2014 cluster \u2192 community \u2192 hub \u2014 before answering, and ADOPT returned candidates VERBATIM (a candidate's id becomes the next probe's parentId). CREATE a new label only when no candidate fits; on creation you may pass one "icon" from the curated taxonomy icon set for the deepest NEW label.
@@ -3444,9 +3449,10 @@ STORAGE MECHANICS \u2014 how your memory works (write for the retriever):
3444
3449
  - tags are the ONLY topic-filter vocabulary at recall \u2014 reuse stable, lowercase topic labels (partition lane only). Tags are NARROW and specific: entity names, product names, game titles ("amd", "stellar blade", "stellar blade blood rain").
3445
3450
  - The macro-taxonomy routes a fact into its family hierarchy (partition lane only), top-down: CLUSTER \u2192 COMMUNITY \u2192 HUB \u2192 NODE (the NODE is the stored record itself \u2014 never named):
3446
3451
  - category (CLUSTER): ONE lowercase PLURAL family noun \u2014 stocks, games, pets, work, health, finance, contacts \u2026
3447
- - community (COMMUNITY): ONE lowercase PLURAL sub-family narrowing the category ("survival games" under "games"); omit when no sub-family applies.
3452
+ - community (COMMUNITY): ONE lowercase PLURAL sub-family narrowing the category ("survival games" under "games", "tv shows" under "shows"); omit when no sub-family applies.
3448
3453
  - subject (HUB): the lowercase SINGULAR main subject entity the fact is about ("project zomboid", "amd", "sam") \u2014 a specific name, never pluralized; always include when the fact is about a specific entity.
3449
- A category or community is NEVER a specific entity, product, company, or game title: "amd" is a subject under the category "stocks"; "stellar blade" is a subject under the category "games". Always include category; reuse the existing labels whenever they fit.
3454
+ A category or community is NEVER a specific entity, product, company, or game title: "amd" is a subject under the category "stocks"; "stellar blade" is a subject under the category "games"; a show/work title like "breaking-bad" is a tag or hub, never a community. Always include category; reuse the existing labels whenever they fit.
3455
+ - PERSONA & FICTION CONTENT (absolute): content about an adopted persona, a roleplay, or a fictional/entertainment work routes by its real-world MEDIUM, never by in-universe domains \u2014 a TV persona's biography, family, or career belongs under the medium family (category "shows", community "tv shows", hub the show's title or the persona name); never "family", "education", "business", or "science" for invented content.
3450
3456
 
3451
3457
  TAXONOMY PROBING (pick first, create if necessary): before naming a community or hub you are not certain exists, call memory-taxonomy-probe top-down \u2014 cluster \u2192 community \u2192 hub \u2014 and ADOPT a returned candidate by naming it VERBATIM in the remember call (its id becomes the next probe's parentId). CREATE a new label only when every candidate misses the meaning \u2014 then follow the phrasing rules (plural family/sub-family, singular hub) and optionally pass an "icon" from the curated set for the label you create. The known-vocabulary section below already lists likely fits; probing confirms them or finds better ones.
3452
3458
 
@@ -3631,15 +3637,19 @@ var ExtractedFactSchema = z.object({
3631
3637
  * One broad lowercase PLURAL family label for THIS fact (e.g. `stocks`,
3632
3638
  * `pets`, `games`) — the constellation's CLUSTER tier. Inherits the
3633
3639
  * turn-side category when omitted. Never
3634
- * a specific entity, product, company, or game title.
3640
+ * a specific entity, product, company, or game title. Persona/roleplay or
3641
+ * fictional content classifies by its real-world medium (a TV persona's
3642
+ * biography belongs under `shows`), never by in-universe domains (`family`,
3643
+ * `education`, `business` describe reality, not an invented life).
3635
3644
  */
3636
3645
  category: z.string().optional(),
3637
3646
  /**
3638
3647
  * One lowercase PLURAL sub-family label narrowing THIS fact's category
3639
- * (e.g. `survival-games` under `games`) — the constellation's COMMUNITY
3640
- * tier, one level below the cluster. Inherits the turn-side community when
3641
- * omitted; omit when no sub-family applies. Never a specific entity,
3642
- * product, or title.
3648
+ * (e.g. `survival-games` under `games`, `tv-shows` under `shows`) — the
3649
+ * constellation's COMMUNITY tier, one level below the cluster. Inherits the
3650
+ * turn-side community when omitted; omit when no sub-family applies. Never
3651
+ * a specific entity, product, or title — a show/work title like
3652
+ * `breaking-bad` is a tag or hub, never a community.
3643
3653
  */
3644
3654
  community: z.string().optional(),
3645
3655
  /** What kind of durable thing this is (see FACT_KINDS). */
@@ -3668,17 +3678,21 @@ var ExtractionSchema = z.object({
3668
3678
  * the narrow tags into one topic family, powers the relink job's
3669
3679
  * per-category passes, and backstops facts that omit their own `category`. Never a
3670
3680
  * specific entity, product, company, or game title: `amd` belongs under
3671
- * `stocks`; `stellar blade` belongs under `games`. Optional: a turn with
3681
+ * `stocks`; `stellar blade` belongs under `games`. Persona/roleplay or
3682
+ * fictional content classifies by its real-world medium (e.g. `shows`
3683
+ * for a TV persona), never by in-universe domains (`family`, `education`,
3684
+ * `business` describe reality, not an invented life). Optional: a turn with
3672
3685
  * nothing durable may omit it.
3673
3686
  */
3674
3687
  category: z.string().optional(),
3675
3688
  /**
3676
3689
  * One lowercase PLURAL sub-family label narrowing the turn-side category
3677
- * (e.g. `survival-games` under `games`) — the constellation's COMMUNITY
3678
- * tier: a genre, project family, or domain branch one level below the
3679
- * cluster. Backstops facts that omit their own `community`. Optional:
3680
- * omit it when no sub-family applies. Never a specific entity, product,
3681
- * or title.
3690
+ * (e.g. `survival-games` under `games`, `tv-shows` under `shows`) — the
3691
+ * constellation's COMMUNITY tier: a genre, project family, or domain branch
3692
+ * one level below the cluster. Backstops facts that omit their own
3693
+ * `community`. Optional: omit it when no sub-family applies. Never a
3694
+ * specific entity, product, or title — a show/work title like
3695
+ * `breaking-bad` is a tag or hub, never a community.
3682
3696
  */
3683
3697
  community: z.string().optional()
3684
3698
  });
@@ -3700,6 +3714,7 @@ FACT METADATA \u2014 every fact object carries the fields the maintenance passes
3700
3714
  - CLUSTER (category): a broad PLURAL family noun ("games", "stocks", "pets").
3701
3715
  - COMMUNITY (community): a PLURAL sub-family under one cluster ("survival-games" under "games") \u2014 a genre or domain branch.
3702
3716
  - HUB (subject): the SINGULAR main subject entity anchoring the fact ("project zomboid", "amd", "sam") \u2014 a specific name, never pluralized.
3717
+ PERSONA & FICTION CONTENT (absolute): facts about an adopted persona, a roleplay, or a fictional/entertainment work classify by the content's real-world MEDIUM, never by its in-universe domains. A TV persona's biography, family, career, or studies are NOT real-world walk-of-life categories \u2014 never "family", "education", "business", or "science" for invented content: the cluster is the medium family (e.g. "shows"), the community a true plural sub-family (e.g. "tv-shows"), and the show's title goes to the hub or the tags ("breaking bad"), never to the community.
3703
3718
  Fields:
3704
3719
  - text: the statement itself.
3705
3720
  - subject (optional): the lowercase SINGULAR entity the fact is about \u2014 the HUB tier \u2014 "user" by default, or a person, product, or project name ("sam", "stellar blade", "payments service"). Maintenance only ever compares facts about the SAME subject, so name it whenever the fact is about a specific entity.
@@ -3716,8 +3731,8 @@ Fields:
3716
3731
  - fact \u2014 any other durable fact
3717
3732
  - stability (required): "durable" \u2014 a long-term truth that should survive until contradicted (decisions, traits, history) \u2014 or "volatile" \u2014 a current state a newer statement is EXPECTED to replace (location, tooling, versions). When in doubt, choose durable.
3718
3733
  - Tags: 2 to 6 stable, reusable, lowercase topic labels describing what the text is about (e.g. "work", "rust", "contacts", "amd", "stellar blade"). Tags are NARROW and specific \u2014 entity names, product names, game titles. They are the vocabulary for topic-filtered recall later.
3719
- - Category: ONE broad lowercase PLURAL family noun for the whole text (e.g. "stocks", "pets", "games", "health") \u2014 the CLUSTER tier \u2014 that groups the narrow tags into one topic family. A category is NEVER a specific entity, product, company, or game title: "amd" belongs under "stocks"; "stellar blade" and "stellar blade blood rain" belong under "games". Always include it when facts are emitted; omit it when nothing durable is found.
3720
- - Community: ONE broad lowercase PLURAL sub-family that narrows the category (e.g. "survival-games", "action-rpgs" under "games") \u2014 the COMMUNITY tier between the cluster and the hub. Omit it when no sub-family applies; never a specific entity, product, or title.
3734
+ - Category: ONE broad lowercase PLURAL family noun for the whole text (e.g. "stocks", "pets", "games", "health") \u2014 the CLUSTER tier \u2014 that groups the narrow tags into one topic family. A category is NEVER a specific entity, product, company, or game title: "amd" belongs under "stocks"; "stellar blade" and "stellar blade blood rain" belong under "games". Persona/fictional content follows the PERSONA & FICTION rule above (medium family, not in-universe domains). Always include it when facts are emitted; omit it when nothing durable is found.
3735
+ - Community: ONE broad lowercase PLURAL sub-family that narrows the category (e.g. "survival-games", "action-rpgs" under "games"; "tv-shows" under "shows") \u2014 the COMMUNITY tier between the cluster and the hub. Omit it when no sub-family applies; never a specific entity, product, or title \u2014 a show/work title like "breaking-bad" is a tag or hub, never a community.
3721
3736
  - If nothing durable is found, return an empty facts array; tags may still label the topic when useful.
3722
3737
  ${buildVocabularySection(vocabulary)}
3723
3738
  PRIOR MEMORY (when the user message ends with an "ALREADY STORED IN MEMORY" section):
@@ -72,14 +72,18 @@ var EncyclopediaClassifySchema = z.object({
72
72
  /**
73
73
  * One broad lowercase PLURAL family label for the document (e.g. `games`,
74
74
  * `work`, `health`) — the constellation's CLUSTER tier. Never a specific
75
- * entity, product, company, or title.
75
+ * entity, product, company, or title. Fiction/entertainment content takes
76
+ * the medium family (e.g. `shows`) — never an in-universe domain (`family`,
77
+ * `education`, `business` describe reality, not an invented life).
76
78
  */
77
79
  category: z.string(),
78
80
  /**
79
81
  * One lowercase PLURAL sub-family label narrowing the category (e.g.
80
- * `survival-games` under `games`) — the constellation's COMMUNITY tier, one
81
- * level below the cluster. Optional: omit when no sub-family applies. Never
82
- * a specific entity, product, company, or title.
82
+ * `survival-games` under `games`, `tv-shows` under `shows`) — the
83
+ * constellation's COMMUNITY tier, one level below the cluster. Optional:
84
+ * omit when no sub-family applies. Never a specific entity, product,
85
+ * company, or title — a show/work title like `breaking-bad` is a topic or
86
+ * tag, never a community.
83
87
  */
84
88
  community: z.string().optional(),
85
89
  /**
@@ -558,15 +562,19 @@ var ExtractedFactSchema = z.object({
558
562
  * One broad lowercase PLURAL family label for THIS fact (e.g. `stocks`,
559
563
  * `pets`, `games`) — the constellation's CLUSTER tier. Inherits the
560
564
  * turn-side category when omitted. Never
561
- * a specific entity, product, company, or game title.
565
+ * a specific entity, product, company, or game title. Persona/roleplay or
566
+ * fictional content classifies by its real-world medium (a TV persona's
567
+ * biography belongs under `shows`), never by in-universe domains (`family`,
568
+ * `education`, `business` describe reality, not an invented life).
562
569
  */
563
570
  category: z.string().optional(),
564
571
  /**
565
572
  * One lowercase PLURAL sub-family label narrowing THIS fact's category
566
- * (e.g. `survival-games` under `games`) — the constellation's COMMUNITY
567
- * tier, one level below the cluster. Inherits the turn-side community when
568
- * omitted; omit when no sub-family applies. Never a specific entity,
569
- * product, or title.
573
+ * (e.g. `survival-games` under `games`, `tv-shows` under `shows`) — the
574
+ * constellation's COMMUNITY tier, one level below the cluster. Inherits the
575
+ * turn-side community when omitted; omit when no sub-family applies. Never
576
+ * a specific entity, product, or title — a show/work title like
577
+ * `breaking-bad` is a tag or hub, never a community.
570
578
  */
571
579
  community: z.string().optional(),
572
580
  /** What kind of durable thing this is (see FACT_KINDS). */
@@ -595,17 +603,21 @@ var ExtractionSchema = z.object({
595
603
  * the narrow tags into one topic family, powers the relink job's
596
604
  * per-category passes, and backstops facts that omit their own `category`. Never a
597
605
  * specific entity, product, company, or game title: `amd` belongs under
598
- * `stocks`; `stellar blade` belongs under `games`. Optional: a turn with
606
+ * `stocks`; `stellar blade` belongs under `games`. Persona/roleplay or
607
+ * fictional content classifies by its real-world medium (e.g. `shows`
608
+ * for a TV persona), never by in-universe domains (`family`, `education`,
609
+ * `business` describe reality, not an invented life). Optional: a turn with
599
610
  * nothing durable may omit it.
600
611
  */
601
612
  category: z.string().optional(),
602
613
  /**
603
614
  * One lowercase PLURAL sub-family label narrowing the turn-side category
604
- * (e.g. `survival-games` under `games`) — the constellation's COMMUNITY
605
- * tier: a genre, project family, or domain branch one level below the
606
- * cluster. Backstops facts that omit their own `community`. Optional:
607
- * omit it when no sub-family applies. Never a specific entity, product,
608
- * or title.
615
+ * (e.g. `survival-games` under `games`, `tv-shows` under `shows`) — the
616
+ * constellation's COMMUNITY tier: a genre, project family, or domain branch
617
+ * one level below the cluster. Backstops facts that omit their own
618
+ * `community`. Optional: omit it when no sub-family applies. Never a
619
+ * specific entity, product, or title — a show/work title like
620
+ * `breaking-bad` is a tag or hub, never a community.
609
621
  */
610
622
  community: z.string().optional()
611
623
  });
@@ -1111,10 +1111,10 @@ ${lines.join("\n")}`;
1111
1111
  var memoryPartitionRememberSchema = z.object({
1112
1112
  text: z.string().min(1).max(2e3).describe('The fact to remember, as a self-contained statement, e.g. "Sams phone number is 555-1234".'),
1113
1113
  category: z.string().min(1).max(40).optional().describe(
1114
- 'One broad lowercase PLURAL category the fact belongs to, e.g. "stocks", "games", "pets", "work" \u2014 the CLUSTER tier: a family noun, never a specific entity/product/company/game name ("amd" \u2192 "stocks"; "stellar blade" \u2192 "games"). Always include it.'
1114
+ 'One broad lowercase PLURAL category the fact belongs to, e.g. "stocks", "games", "pets", "work" \u2014 the CLUSTER tier: a family noun, never a specific entity/product/company/game name ("amd" \u2192 "stocks"; "stellar blade" \u2192 "games"). Persona/roleplay or fictional content classifies by its real-world medium (a TV persona\u2019s biography \u2192 "shows"), never by in-universe domains ("family", "education", "business" describe reality, not an invented life). Always include it.'
1115
1115
  ),
1116
1116
  community: z.string().min(1).max(60).optional().describe(
1117
- 'One lowercase PLURAL sub-family narrowing the category, e.g. "survival games" under "games" \u2014 the COMMUNITY tier, one level below the cluster (a genre, project family, or domain branch). Omit it when no sub-family applies; never a specific entity, product, or title.'
1117
+ 'One lowercase PLURAL sub-family narrowing the category, e.g. "survival games" under "games", "tv shows" under "shows" \u2014 the COMMUNITY tier, one level below the cluster (a genre, project family, or domain branch). Omit it when no sub-family applies; never a specific entity, product, or title \u2014 a show/work title like "breaking-bad" is a tag or hub, never a community.'
1118
1118
  ),
1119
1119
  subject: z.string().min(1).max(40).optional().describe(
1120
1120
  'The lowercase SINGULAR entity the fact is about \u2014 the HUB tier, e.g. "project zomboid", "amd", "sam". Name it whenever the fact is about a specific entity; never a plural family label.'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triplef/agent",
3
3
  "description": "tripleF (3F) agent domain — structured-output schemas, prompt builders, and model tools shared across the apps.",
4
- "version": "0.1.26",
4
+ "version": "0.1.27",
5
5
  "packageManager": "pnpm@11.25.0",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "dependencies": {
57
57
  "@mozilla/readability": "^0.6.0",
58
- "@triplef/helpers": "^1.5.4",
58
+ "@triplef/helpers": "^1.5.6",
59
59
  "linkedom": "^0.18.13",
60
60
  "turndown": "^7.2.4"
61
61
  },
@@ -85,7 +85,7 @@
85
85
  "globals": "^17.12.0",
86
86
  "husky": "^9.1.7",
87
87
  "jiti": "^2.7.0",
88
- "lint-staged": "^17.4.1",
88
+ "lint-staged": "^17.5.0",
89
89
  "npm-check-updates": "^23.1.0",
90
90
  "prettier": "^3.9.6",
91
91
  "rimraf": "^6.1.3",