@rubytech/create-realagent-code 0.1.583 → 0.1.585

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.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/config/brand.json +1 -0
  3. package/payload/platform/lib/brand-templating/dist/index.d.ts +13 -7
  4. package/payload/platform/lib/brand-templating/dist/index.d.ts.map +1 -1
  5. package/payload/platform/lib/brand-templating/dist/index.js +44 -29
  6. package/payload/platform/lib/brand-templating/dist/index.js.map +1 -1
  7. package/payload/platform/lib/brand-templating/src/__tests__/brand-templating.test.ts +103 -0
  8. package/payload/platform/lib/brand-templating/src/index.ts +45 -29
  9. package/payload/platform/lib/brand-templating/tsconfig.json +2 -1
  10. package/payload/platform/lib/brand-templating/vitest.config.ts +9 -0
  11. package/payload/platform/lib/telegram-reach/dist/index.d.ts +6 -0
  12. package/payload/platform/lib/telegram-reach/dist/index.d.ts.map +1 -1
  13. package/payload/platform/lib/telegram-reach/dist/index.js +38 -3
  14. package/payload/platform/lib/telegram-reach/dist/index.js.map +1 -1
  15. package/payload/platform/lib/telegram-reach/src/__tests__/telegram-reach.test.ts +54 -2
  16. package/payload/platform/lib/telegram-reach/src/index.ts +38 -4
  17. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +7 -1
  18. package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +12 -0
  19. package/payload/platform/plugins/docs/references/platform.md +2 -0
  20. package/payload/platform/plugins/docs/references/telegram-guide.md +4 -0
  21. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  22. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +0 -1
  23. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  24. package/payload/platform/templates/agents/admin/IDENTITY.md +11 -5
  25. package/payload/server/{chunk-CV6AEMKH.js → chunk-34FPJYHN.js} +1 -1
  26. package/payload/server/{chunk-SKYZG6OT.js → chunk-6AQYMT6C.js} +27 -21
  27. package/payload/server/{chunk-BTXRBXMU.js → chunk-GO3EPIXU.js} +1 -1
  28. package/payload/server/{manager-FQSQSSJ3.js → manager-7BXVB76I.js} +2 -2
  29. package/payload/server/maxy-edge.js +2 -2
  30. package/payload/server/server.js +305 -297
@@ -15,12 +15,17 @@
15
15
  * re-exports it, so the store that writes a filename and the walk that reads one
16
16
  * cannot disagree.
17
17
  *
18
- * Path-free by construction: the caller passes `storeDir`. The plugin derives it
19
- * from PLATFORM_ROOT and the server from the brand config dir, and neither
20
- * derivation belongs in a library that must not know what a brand is.
18
+ * `collectTelegramReach` takes `storeDir` from its caller, but the DERIVATION of
19
+ * that directory lives here too, in `telegramStoreRoot`. Task 2625 left it to
20
+ * each caller on the grounds that a library must not know what a brand is, and
21
+ * the two callers promptly disagreed: the webhook wrote the brand config dir
22
+ * while `telegram-reach` read the brand install dir, so the tool reported every
23
+ * chat unreachable and named its own live sender as never having messaged
24
+ * (Task 2644). One derivation, for the same reason the filename rule is here.
21
25
  */
22
26
  import { existsSync, readdirSync, readFileSync } from "node:fs";
23
- import { join } from "node:path";
27
+ import { homedir } from "node:os";
28
+ import { join, resolve } from "node:path";
24
29
 
25
30
  /**
26
31
  * Is this a channel key that can safely become a path segment?
@@ -260,3 +265,32 @@ export function collectTelegramReach(input: {
260
265
  });
261
266
  return { bots, storeRows };
262
267
  }
268
+
269
+ /** The brand's config directory NAME, from its own brand.json.
270
+ *
271
+ * Resolved WITHOUT the platform's `paths.ts`, which throws at module init on a
272
+ * brand.json missing a port field. The inbound Telegram webhook imports this
273
+ * path, so a throw here takes delivery down; a brand.json that cannot be read
274
+ * falls back to `.maxy` instead. */
275
+ function configDirName(platformRoot: string): string {
276
+ const brandPath = join(platformRoot, "config", "brand.json");
277
+ if (existsSync(brandPath)) {
278
+ try {
279
+ const parsed = JSON.parse(readFileSync(brandPath, "utf8")) as { configDir?: unknown };
280
+ if (typeof parsed.configDir === "string") return parsed.configDir;
281
+ } catch {
282
+ // A brand.json that will not parse falls back rather than throwing.
283
+ }
284
+ }
285
+ return ".maxy";
286
+ }
287
+
288
+ /** The brand's Telegram message store root, for a given platform root.
289
+ *
290
+ * The ONE derivation of this path. `ui/app/lib/telegram/message-store.ts`
291
+ * writes under it and `plugins/telegram/mcp` reads under it, both through this
292
+ * function, so the writer and the reader cannot name different directories. */
293
+ export function telegramStoreRoot(platformRoot: string): string {
294
+ const brandDir = process.env.MAXY_DIR_OVERRIDE ?? resolve(homedir(), configDirName(platformRoot));
295
+ return join(brandDir, "data", "telegram-messages");
296
+ }
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: platform-architecture
3
3
  description: Use when grounding any documented-surface claim about what Real Agent ships — plugins, skills, specialists, install/deploy flows, internals. This is the install catalogue, not evidence of what is enabled on the current account. For install state on this account, call `capabilities-here`; for documented surface, cite the `Source:` URL inline.
4
- content-hash: sha256:8994bfc27989b0255dd286327b6a7bb0127110ed1285b7c6daff4ddf264e2609
4
+ content-hash: sha256:066a1d70ab0a529e335c2ab02d19663d3fbe51032e58073c267f05f8c8a0de97
5
5
  brand: realagent-code
6
6
  product-name: Real Agent
7
7
  ---
@@ -146,6 +146,8 @@ Real Agent runs two agents simultaneously:
146
146
 
147
147
  **Admin agent (you)** — full access to all tools and plugins. This is the agent you interact with at your local or remote URL. It can read and write contacts, send Telegram messages, manage your account, and perform any task you have plugins for. Protected by your PIN. Your admin agent runs through your own Claude Code OAuth session — it never bills the Anthropic API. Authentication and SDK details are documented in the developer doc `.docs/platform.md` admin-agent section.
148
148
 
149
+ Your admin agent has a stated purpose, set by your edition of the product. When you ask for something outside it, the agent says so first, names the nearest thing it does handle, and puts the request back to you. Ask again and it does the work; the decision is yours.
150
+
149
151
  **Public agent (visitors)** — read-only access. Handles enquiries from people who reach your public URL. It can answer questions about your business and collect prospect contact details, but it cannot access your private data or take actions.
150
152
 
151
153
  ## Plugins
@@ -2935,6 +2937,10 @@ people who have messaged each one and when they last wrote, and anyone on a bot'
2935
2937
  never messaged. Being on the admin list is not the same as having opened the chat, so those people
2936
2938
  are listed separately as not reachable yet.
2937
2939
 
2940
+ That list is built from the messages already stored on this machine. Every message that arrives is
2941
+ written down, and both the answer to "who can you reach" and the hourly self-check read that same
2942
+ store, so what Real Agent tells you and what actually arrived cannot drift apart.
2943
+
2938
2944
  If Real Agent ever says a Telegram message cannot be sent, ask it to check that list first.
2939
2945
 
2940
2946
  ## Getting a Chat ID
@@ -9,6 +9,18 @@ Invoked by the admin agent directly.
9
9
 
10
10
  This is the platform's release timeline, newest first. Each entry shows the date it shipped and the version it shipped in, so you can tell the operator how current their install is. To compare, read the installed version from `capabilities-here` and match it against the versions below. Keep answers high level and in plain English; this is a summary, not a full commit log.
11
11
 
12
+ ## 2026-08-09 (0.1.585)
13
+
14
+ - Your assistant now knows what it is for, and says so when you ask it to work outside that. Every edition used to boot the same anonymous "Business Assistant" with no stated purpose, so it accepted anything without comment. Ask it for something outside its remit and it names its purpose, offers the nearest thing it does handle, and puts the request back to you; ask again and it does the work.
15
+ - The estate agency and building contractor editions each describe the work they actually do, while Real Agent stays a general personal assistant and second brain, tied to no trade or industry.
16
+ - The assistant no longer assumes you run a business. Five places in its own description took that for granted, including the name it introduced itself by.
17
+
18
+ ## 2026-08-09 (0.1.584)
19
+
20
+ - The assistant can find the Telegram chats it is able to reach. It was looking for them in a different folder from the one they are saved in, so it reported having no way to message people it could in fact message.
21
+ - A long Telegram answer no longer stops partway. When formatting was dropped and the message sent as plain text, it was not being split at the length limit, so anything past that point was lost.
22
+ - The Telegram payment surface has been withdrawn.
23
+
12
24
  ## 2026-08-09 (0.1.583)
13
25
 
14
26
  - A connected Telegram Business account can now be answered. Its customer chats were being received and dropped, so the bot could not see or reply to a single one of them.
@@ -19,6 +19,8 @@ The Pi runs the web interface, the AI agent, and all the plugin servers. When yo
19
19
 
20
20
  **Admin agent (you)** — full access to all tools and plugins. This is the agent you interact with at your local or remote URL. It can read and write contacts, send Telegram messages, manage your account, and perform any task you have plugins for. Protected by your PIN. Your admin agent runs through your own Claude Code OAuth session — it never bills the Anthropic API. Authentication and SDK details are documented in the developer doc `.docs/platform.md` admin-agent section.
21
21
 
22
+ Your admin agent has a stated purpose, set by your edition of the product. When you ask for something outside it, the agent says so first, names the nearest thing it does handle, and puts the request back to you. Ask again and it does the work; the decision is yours.
23
+
22
24
  **Public agent (visitors)** — read-only access. Handles enquiries from people who reach your public URL. It can answer questions about your business and collect prospect contact details, but it cannot access your private data or take actions.
23
25
 
24
26
  ## Plugins
@@ -114,6 +114,10 @@ people who have messaged each one and when they last wrote, and anyone on a bot'
114
114
  never messaged. Being on the admin list is not the same as having opened the chat, so those people
115
115
  are listed separately as not reachable yet.
116
116
 
117
+ That list is built from the messages already stored on this machine. Every message that arrives is
118
+ written down, and both the answer to "who can you reach" and the hourly self-check read that same
119
+ store, so what {{productName}} tells you and what actually arrived cannot drift apart.
120
+
117
121
  If {{productName}} ever says a Telegram message cannot be sent, ask it to check that list first.
118
122
 
119
123
  ## Getting a Chat ID
@@ -1 +1 @@
1
- {"version":3,"file":"canonical-tool-names.generated.d.ts","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAQA,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EA2B7C,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAqXtD,CAAA"}
1
+ {"version":3,"file":"canonical-tool-names.generated.d.ts","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAQA,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EA2B7C,CAAA;AAED,gEAAgE;AAChE,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAoXtD,CAAA"}
@@ -359,7 +359,6 @@ export const CANONICAL_MAXY_TOOL_NAMES = [
359
359
  "mcp__plugin_telegram_telegram__telegram-ask",
360
360
  "mcp__plugin_telegram_telegram__telegram-bot-provision",
361
361
  "mcp__plugin_telegram_telegram__telegram-card",
362
- "mcp__plugin_telegram_telegram__telegram-invoice",
363
362
  "mcp__plugin_telegram_telegram__telegram-live-location",
364
363
  "mcp__plugin_telegram_telegram__telegram-media-fetch",
365
364
  "mcp__plugin_telegram_telegram__telegram-media-send",
@@ -1 +1 @@
1
- {"version":3,"file":"canonical-tool-names.generated.js","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,kEAAkE;AAClE,yDAAyD;AACzD,kFAAkF;AAClF,EAAE;AACF,yEAAyE;AACzE,6DAA6D;AAE7D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,OAAO;IACP,KAAK;IACL,SAAS;IACT,WAAW;IACX,UAAU;IACV,UAAU;IACV,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,cAAc;IACd,WAAW;IACX,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,SAAS;IACT,cAAc;IACd,UAAU;IACV,MAAM;IACN,WAAW;CACZ,CAAA;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,yCAAyC;IACzC,yCAAyC;IACzC,kDAAkD;IAClD,sDAAsD;IACtD,yCAAyC;IACzC,yCAAyC;IACzC,uCAAuC;IACvC,wCAAwC;IACxC,iDAAiD;IACjD,yCAAyC;IACzC,iDAAiD;IACjD,yCAAyC;IACzC,sCAAsC;IACtC,yCAAyC;IACzC,wCAAwC;IACxC,oCAAoC;IACpC,qCAAqC;IACrC,yCAAyC;IACzC,qCAAqC;IACrC,uCAAuC;IACvC,2CAA2C;IAC3C,4CAA4C;IAC5C,uCAAuC;IACvC,uCAAuC;IACvC,sCAAsC;IACtC,qCAAqC;IACrC,uCAAuC;IACvC,yCAAyC;IAC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CAAkC;IAClC,mCAAmC;IACnC,oCAAoC;IACpC,oCAAoC;IACpC,kDAAkD;IAClD,kDAAkD;IAClD,mDAAmD;IACnD,+CAA+C;IAC/C,gDAAgD;IAChD,gDAAgD;IAChD,kDAAkD;IAClD,oDAAoD;CACrD,CAAA"}
1
+ {"version":3,"file":"canonical-tool-names.generated.js","sourceRoot":"","sources":["../src/canonical-tool-names.generated.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,kEAAkE;AAClE,yDAAyD;AACzD,kFAAkF;AAClF,EAAE;AACF,yEAAyE;AACzE,6DAA6D;AAE7D,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,OAAO;IACP,KAAK;IACL,SAAS;IACT,WAAW;IACX,UAAU;IACV,UAAU;IACV,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,OAAO;IACP,cAAc;IACd,WAAW;IACX,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,UAAU;IACV,SAAS;IACT,cAAc;IACd,UAAU;IACV,MAAM;IACN,WAAW;CACZ,CAAA;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,yCAAyC;IACzC,yCAAyC;IACzC,kDAAkD;IAClD,sDAAsD;IACtD,yCAAyC;IACzC,yCAAyC;IACzC,uCAAuC;IACvC,wCAAwC;IACxC,iDAAiD;IACjD,yCAAyC;IACzC,iDAAiD;IACjD,yCAAyC;IACzC,sCAAsC;IACtC,yCAAyC;IACzC,wCAAwC;IACxC,oCAAoC;IACpC,qCAAqC;IACrC,yCAAyC;IACzC,qCAAqC;IACrC,uCAAuC;IACvC,2CAA2C;IAC3C,4CAA4C;IAC5C,uCAAuC;IACvC,uCAAuC;IACvC,sCAAsC;IACtC,qCAAqC;IACrC,uCAAuC;IACvC,yCAAyC;IACzC,4CAA4C;IAC5C,0CAA0C;IAC1C,2CAA2C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kDAAkD;IAClD,kDAAkD;IAClD,mDAAmD;IACnD,+CAA+C;IAC/C,gDAAgD;IAChD,gDAAgD;IAChD,kDAAkD;IAClD,oDAAoD;CACrD,CAAA"}
@@ -1,6 +1,6 @@
1
- # Business Assistant
1
+ # {{productName}}
2
2
 
3
- Your job is to do useful work for the operator. How useful you can be depends on what you know about them and their business; both grow together, and every interaction is a chance to learn more.
3
+ Your job is to do useful work for the operator. How useful you can be depends on what you know about them and their work; both grow together, and every interaction is a chance to learn more.
4
4
 
5
5
  ## Prime directives
6
6
 
@@ -8,9 +8,15 @@ Your job is to do useful work for the operator. How useful you can be depends on
8
8
  2. Be concise. Three sentences or fewer. If you cannot answer in three, ask in five words.
9
9
  3. Show your evidence. Gather it before forming a hypothesis. Never speculate.
10
10
 
11
+ ## Your purpose
12
+
13
+ {{productMandate}}
14
+
15
+ When a request falls outside that purpose, say so before you start it. Name what you are for, name the closest thing you do own, and put the request back to the operator. If they ask again, the decision is theirs and you do it. That is one exchange, not a refusal and not a negotiation.
16
+
11
17
  ## Before you speak
12
18
 
13
- If more than one admin works on this account, identify which one you are speaking with this session, purely as a convenience so you load the right person's profile and history. This is never a gate and never blocks any tool; with a single admin, skip it. Then, before your first message, do reconnaissance: read what is known about the operator and their business, today's calendar, active projects, open work, recent conversations. Infer the domain from the plugins and skills available. Then lead with what you found, and follow with a proposal suited to where the operator is in their day. Ask only the questions you could not answer through investigation. You are expected to drive the day, not solicit instructions for it.
19
+ If more than one admin works on this account, identify which one you are speaking with this session, purely as a convenience so you load the right person's profile and history. This is never a gate and never blocks any tool; with a single admin, skip it. Then, before your first message, do reconnaissance: read what is known about the operator and their work, today's calendar, active projects, open work, recent conversations. Infer the domain from the plugins and skills available. Then lead with what you found, and follow with a proposal suited to where the operator is in their day. Ask only the questions you could not answer through investigation. You are expected to drive the day, not solicit instructions for it.
14
20
 
15
21
  When a turn needs you to ground a claim about what the product is, how the platform is built, how plugins or skills or specialists work, how install or deploy runs, or any other product-architecture fact, load the platform-architecture skill and answer from its body. Cite the source URL printed above the block you drew from. The platform-architecture skill is the install catalogue, not evidence of what is installed on this account. For questions about what is enabled here — which plugins are on, which specialists you can dispatch, which models are in use — call capabilities-here and answer from its JSON; never infer install state from the catalogue body.
16
22
 
@@ -20,13 +26,13 @@ When a request needs a skill and you do not already know its exact slug, resolve
20
26
 
21
27
  You may not act on a request until you know what is being asked, what is in scope and what is out, and what rules apply. When the operator's words are precise, all three are obvious and you act. When any is imprecise, stop and ask. Insist on the operator being precise and concise.
22
28
 
23
- How you route the work is decided per turn by the routing ladder injected with each prompt: delegate to the specialist that owns the deliverable, else load an admin-usable skill, else, when the deliverable is one the business issues repeatedly and no specialist or skill owns it, author its owning skill once via skill-builder (or a worker agent via agent-builder) and produce it through that, else author it directly. Authoring directly is the last resort for a genuine one-off, never for a repeatable document or process. That ladder, not this file, carries the live roster, the admin-usable list, and the outcome-only brief contract.
29
+ How you route the work is decided per turn by the routing ladder injected with each prompt: delegate to the specialist that owns the deliverable, else load an admin-usable skill, else, when the deliverable is one that recurs and no specialist or skill owns it, author its owning skill once via skill-builder (or a worker agent via agent-builder) and produce it through that, else author it directly. Authoring directly is the last resort for a genuine one-off, never for a repeatable document or process. That ladder, not this file, carries the live roster, the admin-usable list, and the outcome-only brief contract.
24
30
 
25
31
  ## Working from the graph
26
32
 
27
33
  The graph is your brain. The first read of any turn that needs to know something is against the graph; outside lookups happen only after the graph has confirmed it does not hold the answer, and anything new an outside lookup produces is written back the same turn. Greetings and pure interaction turns do not need this loop. When something worth remembering comes out of a conversation, hand the write off to the specialist who owns graph writes; direct writes from this seat are reserved for one-line updates against a node already in context whose classification is unambiguous.
28
34
 
29
- Every factual claim you make in any turn, about the operator, their business, the product, the platform, the day, or the world, has a source you can name. The permissible sources are four: a graph read this session, a tool output returned this session, content the operator pasted into this conversation, and the body of the platform-architecture skill when it is loaded. Pretraining recall is not a source. If a claim does not trace to one of the four, you do not have it yet; read the graph, run the tool, load the skill, or ask the operator. This rule binds every factual sentence you emit, not only the ones about the graph.
35
+ Every factual claim you make in any turn, about the operator, their work, the product, the platform, the day, or the world, has a source you can name. The permissible sources are four: a graph read this session, a tool output returned this session, content the operator pasted into this conversation, and the body of the platform-architecture skill when it is loaded. Pretraining recall is not a source. If a claim does not trace to one of the four, you do not have it yet; read the graph, run the tool, load the skill, or ask the operator. This rule binds every factual sentence you emit, not only the ones about the graph.
30
36
 
31
37
  When the operator asks for a previous workflow output by name, fetch the latest matching report directly rather than searching. Searching is for questions about the contents of reports, not for the reports themselves. When the operator asks how your understanding of a person, organisation, or concept has changed over time, walk the revision history of that entity and surface the deltas yourself.
32
38
 
@@ -8,7 +8,7 @@ import {
8
8
  getUserTimezone,
9
9
  isValidAccountId,
10
10
  registerLoop
11
- } from "./chunk-SKYZG6OT.js";
11
+ } from "./chunk-6AQYMT6C.js";
12
12
  import {
13
13
  __commonJS,
14
14
  __require,
@@ -115,8 +115,8 @@ import { readFileSync as readFileSync3, readdirSync, existsSync as existsSync3,
115
115
  // ../lib/brand-templating/src/index.ts
116
116
  import { join as join2 } from "path";
117
117
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
118
- var PLACEHOLDER = "{{productName}}";
119
- var cachedProductName = null;
118
+ var BRAND_FIELDS = ["productName", "productMandate"];
119
+ var cache = /* @__PURE__ */ new Map();
120
120
  function brandJsonPath() {
121
121
  const platformRoot2 = process.env.MAXY_PLATFORM_ROOT;
122
122
  if (!platformRoot2) {
@@ -126,9 +126,11 @@ function brandJsonPath() {
126
126
  }
127
127
  return join2(platformRoot2, "config", "brand.json");
128
128
  }
129
- function getBrandProductName() {
130
- if (cachedProductName !== null) return cachedProductName;
129
+ function getBrandValue(field) {
131
130
  const path = brandJsonPath();
131
+ const key = `${path}::${field}`;
132
+ const cached = cache.get(key);
133
+ if (cached !== void 0) return cached;
132
134
  if (!existsSync2(path)) {
133
135
  throw new Error(`[skill-loader] brand.json missing at ${path}`);
134
136
  }
@@ -140,32 +142,36 @@ function getBrandProductName() {
140
142
  `[skill-loader] brand.json unreadable at ${path}: ${err instanceof Error ? err.message : String(err)}`
141
143
  );
142
144
  }
143
- const value = parsed.productName;
145
+ const value = parsed[field];
144
146
  if (typeof value !== "string" || value.trim() === "") {
145
147
  throw new Error(
146
- `[skill-loader] brand.json at ${path} has missing or empty productName`
148
+ `[skill-loader] brand.json at ${path} has missing or empty ${field}`
147
149
  );
148
150
  }
149
- cachedProductName = value;
151
+ cache.set(key, value);
150
152
  return value;
151
153
  }
152
154
  function substituteBrandPlaceholders(content, sourcePath) {
153
- if (!content.includes(PLACEHOLDER)) return content;
154
- let productName;
155
- try {
156
- productName = getBrandProductName();
157
- } catch (err) {
158
- console.error(
159
- `[skill-loader] ERROR: brand.json missing \u2014 cannot resolve productName for skill ${sourcePath}`
155
+ let out = content;
156
+ for (const field of BRAND_FIELDS) {
157
+ const placeholder = `{{${field}}}`;
158
+ if (!out.includes(placeholder)) continue;
159
+ let value;
160
+ try {
161
+ value = getBrandValue(field);
162
+ } catch (err) {
163
+ console.error(
164
+ `[skill-loader] ERROR: brand.json missing \u2014 cannot resolve ${field} for skill ${sourcePath}`
165
+ );
166
+ throw err;
167
+ }
168
+ const occurrences = out.split(placeholder).length - 1;
169
+ out = out.split(placeholder).join(value);
170
+ console.log(
171
+ `[skill-loader] brand-substituted ${field}=${value} skill=${sourcePath} occurrences=${occurrences}`
160
172
  );
161
- throw err;
162
173
  }
163
- const occurrences = content.split(PLACEHOLDER).length - 1;
164
- const substituted = content.split(PLACEHOLDER).join(productName);
165
- console.log(
166
- `[skill-loader] brand-substituted productName=${productName} skill=${sourcePath} occurrences=${occurrences}`
167
- );
168
- return substituted;
174
+ return out;
169
175
  }
170
176
 
171
177
  // app/lib/claude-agent/account.ts
@@ -12,7 +12,7 @@ import {
12
12
  getConversationOwner,
13
13
  isValidAccountId,
14
14
  registerLoop
15
- } from "./chunk-SKYZG6OT.js";
15
+ } from "./chunk-6AQYMT6C.js";
16
16
 
17
17
  // node_modules/hono/dist/compose.js
18
18
  var compose = (middleware, onError, onNotFound) => {
@@ -30,8 +30,8 @@ import {
30
30
  startConnection,
31
31
  stopConnection,
32
32
  storeMessage
33
- } from "./chunk-CV6AEMKH.js";
34
- import "./chunk-SKYZG6OT.js";
33
+ } from "./chunk-34FPJYHN.js";
34
+ import "./chunk-6AQYMT6C.js";
35
35
  import "./chunk-HYQNUVGO.js";
36
36
  export {
37
37
  buildNotifyPending,
@@ -19,12 +19,12 @@ import {
19
19
  screencastLog,
20
20
  vncLog,
21
21
  websockifyLog
22
- } from "./chunk-BTXRBXMU.js";
22
+ } from "./chunk-GO3EPIXU.js";
23
23
  import {
24
24
  CDP_PORT,
25
25
  LOG_DIR,
26
26
  WEBSOCKIFY_PORT
27
- } from "./chunk-SKYZG6OT.js";
27
+ } from "./chunk-6AQYMT6C.js";
28
28
  import "./chunk-HYQNUVGO.js";
29
29
 
30
30
  // server/edge.ts