openryoko 2026.8.21 → 2026.8.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.
- package/dist/package.json +2 -2
- package/dist/src/cli/initial-config.d.ts +13 -0
- package/dist/src/cli/initial-config.d.ts.map +1 -0
- package/dist/src/cli/initial-config.js +39 -0
- package/dist/src/cli/initial-config.js.map +1 -0
- package/dist/src/cli/setup.d.ts.map +1 -1
- package/dist/src/cli/setup.js +4 -47
- package/dist/src/cli/setup.js.map +1 -1
- package/dist/src/cli/skills.d.ts +6 -0
- package/dist/src/cli/skills.d.ts.map +1 -1
- package/dist/src/cli/skills.js +96 -30
- package/dist/src/cli/skills.js.map +1 -1
- package/dist/src/gateway/api.d.ts.map +1 -1
- package/dist/src/gateway/api.js +36 -35
- package/dist/src/gateway/api.js.map +1 -1
- package/dist/src/gateway/onboarding-personalize.d.ts +15 -0
- package/dist/src/gateway/onboarding-personalize.d.ts.map +1 -0
- package/dist/src/gateway/onboarding-personalize.js +31 -0
- package/dist/src/gateway/onboarding-personalize.js.map +1 -0
- package/dist/src/gateway/portal-config.d.ts +14 -0
- package/dist/src/gateway/portal-config.d.ts.map +1 -0
- package/dist/src/gateway/portal-config.js +47 -0
- package/dist/src/gateway/portal-config.js.map +1 -0
- package/dist/src/sessions/context.d.ts +1 -0
- package/dist/src/sessions/context.d.ts.map +1 -1
- package/dist/src/sessions/context.js +44 -28
- package/dist/src/sessions/context.js.map +1 -1
- package/dist/src/shared/paths.d.ts +2 -0
- package/dist/src/shared/paths.d.ts.map +1 -1
- package/dist/src/shared/paths.js +9 -1
- package/dist/src/shared/paths.js.map +1 -1
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +1 -1
- package/dist/web/__next._full.txt +1 -1
- package/dist/web/__next._tree.txt +1 -1
- package/dist/web/_next/static/chunks/{0y5p4spyfs35l.js → 302onz3a3kflv.js} +1 -1
- package/dist/web/_not-found/__next._full.txt +1 -1
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/web/_not-found/__next._tree.txt +1 -1
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +1 -1
- package/dist/web/chat/__next._full.txt +2 -2
- package/dist/web/chat/__next._tree.txt +1 -1
- package/dist/web/chat/__next.chat.__PAGE__.txt +2 -2
- package/dist/web/chat.html +1 -1
- package/dist/web/chat.txt +2 -2
- package/dist/web/cron/__next._full.txt +1 -1
- package/dist/web/cron/__next._tree.txt +1 -1
- package/dist/web/cron/__next.cron.__PAGE__.txt +1 -1
- package/dist/web/cron.html +1 -1
- package/dist/web/cron.txt +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +1 -1
- package/dist/web/kanban/__next._full.txt +1 -1
- package/dist/web/kanban/__next._tree.txt +1 -1
- package/dist/web/kanban/__next.kanban.__PAGE__.txt +1 -1
- package/dist/web/kanban.html +1 -1
- package/dist/web/kanban.txt +1 -1
- package/dist/web/logs/__next._full.txt +1 -1
- package/dist/web/logs/__next._tree.txt +1 -1
- package/dist/web/logs/__next.logs.__PAGE__.txt +1 -1
- package/dist/web/logs.html +1 -1
- package/dist/web/logs.txt +1 -1
- package/dist/web/org/__next._full.txt +1 -1
- package/dist/web/org/__next._tree.txt +1 -1
- package/dist/web/org/__next.org.__PAGE__.txt +1 -1
- package/dist/web/org.html +1 -1
- package/dist/web/org.txt +1 -1
- package/dist/web/sessions/__next._full.txt +1 -1
- package/dist/web/sessions/__next._tree.txt +1 -1
- package/dist/web/sessions/__next.sessions.__PAGE__.txt +1 -1
- package/dist/web/sessions.html +1 -1
- package/dist/web/sessions.txt +1 -1
- package/dist/web/settings/__next._full.txt +1 -1
- package/dist/web/settings/__next._tree.txt +1 -1
- package/dist/web/settings/__next.settings.__PAGE__.txt +1 -1
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +1 -1
- package/dist/web/skills/__next._full.txt +1 -1
- package/dist/web/skills/__next._tree.txt +1 -1
- package/dist/web/skills/__next.skills.__PAGE__.txt +1 -1
- package/dist/web/skills.html +1 -1
- package/dist/web/skills.txt +1 -1
- package/package.json +2 -2
- package/template/BOOTSTRAP.md +5 -3
- package/template/config.default.yaml +4 -4
- package/template/docs/architecture.md +2 -2
- package/template/docs/cron.md +5 -3
- package/template/docs/mcp.md +1 -1
- package/template/docs/org.md +17 -11
- package/template/docs/overview.md +4 -3
- package/template/docs/self-modification.md +7 -7
- package/template/docs/skills.md +11 -8
- package/template/skills/cron-manager/SKILL.md +7 -7
- package/template/skills/management/SKILL.md +1 -1
- package/template/skills/self-heal/SKILL.md +7 -7
- package/template/skills/skill-creator/SKILL.md +9 -9
- package/dist/web/__next._head.txt +0 -6
- package/dist/web/__next._index.txt +0 -6
- package/dist/web/_next/static/chunks/012aakl34ff5a.js +0 -5
- package/dist/web/_next/static/chunks/03~yq9q893hmn.js +0 -1
- package/dist/web/_next/static/chunks/0a2uy1kw.~j~c.js +0 -1
- package/dist/web/_next/static/chunks/0agxgztb0b~.7.js +0 -5
- package/dist/web/_next/static/chunks/0dtbl8648b3u9.js +0 -7
- package/dist/web/_next/static/chunks/0e3pdjkorr5zl.js +0 -2
- package/dist/web/_next/static/chunks/0ewpxy-mzj3j3.js +0 -1
- package/dist/web/_next/static/chunks/0g6xt.91k~0bc.js +0 -5
- package/dist/web/_next/static/chunks/0jm3e~uc~qd~p.js +0 -79
- package/dist/web/_next/static/chunks/0jzw1gpuag8bc.js +0 -5
- package/dist/web/_next/static/chunks/0lkp92-ovteta.js +0 -5
- package/dist/web/_next/static/chunks/0lt7kv1k1jla0.js +0 -1
- package/dist/web/_next/static/chunks/0msmlzd_~uk0y.js +0 -5
- package/dist/web/_next/static/chunks/0ru56x83x4rkk.js +0 -1
- package/dist/web/_next/static/chunks/0tcvgwr3rcw29.js +0 -1
- package/dist/web/_next/static/chunks/0tf9kpygstdls.js +0 -1
- package/dist/web/_next/static/chunks/0y3dnnq~kxyz_.js +0 -1
- package/dist/web/_next/static/chunks/0~6m1p5hnsx2f.js +0 -1
- package/dist/web/_next/static/chunks/10-liamt-ipcu.js +0 -1
- package/dist/web/_next/static/chunks/103zsy0q9psfj.css +0 -1
- package/dist/web/_next/static/chunks/10l08hq.acixl.js +0 -5
- package/dist/web/_next/static/chunks/11rbefjn.e-3-.js +0 -1
- package/dist/web/_next/static/chunks/11rodb4s1x4of.js +0 -1
- package/dist/web/_next/static/chunks/12_uxtnrqhoo1.js +0 -1
- package/dist/web/_next/static/chunks/12m97bwrg1tuu.js +0 -5
- package/dist/web/_next/static/chunks/13juizw904g.e.js +0 -1
- package/dist/web/_next/static/chunks/14ge_q22f0n.f.js +0 -1
- package/dist/web/_next/static/chunks/17-u9c_weg12-.js +0 -31
- package/dist/web/_next/static/chunks/17oc2l.ekcs8b.css +0 -1
- package/dist/web/_next/static/chunks/turbopack-0dt987bw_1nyf.js +0 -1
- package/dist/web/_next/static/media/apple-icon.0.wpl4.d-5bkf.jpg +0 -0
- package/dist/web/_next/static/media/icon.0.wpl4.d-5bkf.jpg +0 -0
- package/dist/web/_next/static/qeykWjfc1T7SjJSULdD7s/_buildManifest.js +0 -11
- package/dist/web/_next/static/qeykWjfc1T7SjJSULdD7s/_clientMiddlewareManifest.js +0 -1
- package/dist/web/_next/static/qeykWjfc1T7SjJSULdD7s/_ssgManifest.js +0 -1
- package/dist/web/_not-found/__next._head.txt +0 -6
- package/dist/web/_not-found/__next._index.txt +0 -6
- package/dist/web/_not-found/__next._not-found.txt +0 -5
- package/dist/web/chat/__next._head.txt +0 -6
- package/dist/web/chat/__next._index.txt +0 -6
- package/dist/web/chat/__next.chat.txt +0 -5
- package/dist/web/cron/__next._head.txt +0 -6
- package/dist/web/cron/__next._index.txt +0 -6
- package/dist/web/cron/__next.cron.txt +0 -5
- package/dist/web/kanban/__next._head.txt +0 -6
- package/dist/web/kanban/__next._index.txt +0 -6
- package/dist/web/kanban/__next.kanban.txt +0 -5
- package/dist/web/logs/__next._head.txt +0 -6
- package/dist/web/logs/__next._index.txt +0 -6
- package/dist/web/logs/__next.logs.txt +0 -5
- package/dist/web/org/__next._head.txt +0 -6
- package/dist/web/org/__next._index.txt +0 -6
- package/dist/web/org/__next.org.txt +0 -5
- package/dist/web/sessions/__next._head.txt +0 -6
- package/dist/web/sessions/__next._index.txt +0 -6
- package/dist/web/sessions/__next.sessions.txt +0 -5
- package/dist/web/settings/__next._head.txt +0 -6
- package/dist/web/settings/__next._index.txt +0 -6
- package/dist/web/settings/__next.settings.txt +0 -5
- package/dist/web/skills/__next._head.txt +0 -6
- package/dist/web/skills/__next._index.txt +0 -6
- package/dist/web/skills/__next.skills.txt +0 -5
- /package/dist/web/_next/static/{UDwWEfKiZ-eIOpfOIPKQr → Da2BlMpDPFofGxzd6GngP}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{UDwWEfKiZ-eIOpfOIPKQr → Da2BlMpDPFofGxzd6GngP}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{UDwWEfKiZ-eIOpfOIPKQr → Da2BlMpDPFofGxzd6GngP}/_ssgManifest.js +0 -0
package/dist/src/gateway/api.js
CHANGED
|
@@ -35,6 +35,8 @@ import { getDiskSpaceStatus } from "../shared/storage-health.js";
|
|
|
35
35
|
import { ptySnapshotStore } from "../engines/pty-snapshot.js";
|
|
36
36
|
import { collectClaudeUsage } from "../shared/claude-usage.js";
|
|
37
37
|
import { PairingAttemptLimiter, pairingAttemptKey } from "./pairing-rate-limit.js";
|
|
38
|
+
import { personalizeInstructionMd, personalizeIdentityMd, resolveEffectiveName } from "./onboarding-personalize.js";
|
|
39
|
+
import { patchPortalSection, writeFileAtomic } from "./portal-config.js";
|
|
38
40
|
/** Max bytes accepted on /api/internal/hook (loopback-only relay payloads are tiny). */
|
|
39
41
|
const HOOK_BODY_MAX_BYTES = 64 * 1024;
|
|
40
42
|
const PAIR_BODY_MAX_BYTES = 1024;
|
|
@@ -1886,51 +1888,50 @@ Handle this as a priority request from a colleague.`;
|
|
|
1886
1888
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1887
1889
|
const body = _parsed.body;
|
|
1888
1890
|
const { portalName, operatorName, language } = body;
|
|
1889
|
-
// Read current config and merge portal settings
|
|
1891
|
+
// Read current config and merge portal settings. Empty strings are
|
|
1892
|
+
// treated as "not provided" — deleting the key would silently revert
|
|
1893
|
+
// the portal to its defaults.
|
|
1890
1894
|
const config = context.getConfig();
|
|
1891
|
-
const
|
|
1892
|
-
|
|
1893
|
-
portal
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
...(language !== undefined && { language: language || undefined }),
|
|
1899
|
-
},
|
|
1895
|
+
const provided = (v) => typeof v === "string" && v.trim() !== "";
|
|
1896
|
+
const portalPatch = {
|
|
1897
|
+
...config.portal,
|
|
1898
|
+
onboarded: true,
|
|
1899
|
+
...(provided(portalName) && { portalName }),
|
|
1900
|
+
...(provided(operatorName) && { operatorName }),
|
|
1901
|
+
...(provided(language) && { language }),
|
|
1900
1902
|
};
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1903
|
+
const updated = { ...config, portal: portalPatch };
|
|
1904
|
+
// Patch only the portal block — a whole-file yaml.dump would strip
|
|
1905
|
+
// every comment the shipped config template carries.
|
|
1906
|
+
const rawConfig = fs.existsSync(CONFIG_PATH) ? fs.readFileSync(CONFIG_PATH, "utf-8") : "";
|
|
1907
|
+
writeFileAtomic(CONFIG_PATH, patchPortalSection(rawConfig, portalPatch));
|
|
1904
1908
|
logger.info(`Onboarding: portal name="${portalName}", operator="${operatorName}", language="${language}"`);
|
|
1905
|
-
const effectiveName = portalName
|
|
1909
|
+
const effectiveName = resolveEffectiveName(portalName, config.portal?.portalName);
|
|
1906
1910
|
const languageSection = language && language !== "English"
|
|
1907
1911
|
? `\n\n## Language\nAlways respond in ${language}. All communication with the user must be in ${language}.`
|
|
1908
1912
|
: "";
|
|
1909
|
-
// Update CLAUDE.md
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
if (
|
|
1918
|
-
|
|
1913
|
+
// Update CLAUDE.md / AGENTS.md: language section always; the name only
|
|
1914
|
+
// when this request actually carries one (a language-only update must
|
|
1915
|
+
// not rename a customized assistant back to the default).
|
|
1916
|
+
for (const filename of ["CLAUDE.md", "AGENTS.md"]) {
|
|
1917
|
+
const mdPath = path.join(JINN_HOME, filename);
|
|
1918
|
+
if (!fs.existsSync(mdPath))
|
|
1919
|
+
continue;
|
|
1920
|
+
let md = fs.readFileSync(mdPath, "utf-8");
|
|
1921
|
+
if (provided(portalName)) {
|
|
1922
|
+
md = personalizeInstructionMd(md, effectiveName);
|
|
1919
1923
|
}
|
|
1920
|
-
fs.writeFileSync(claudeMdPath, claudeMd);
|
|
1921
|
-
}
|
|
1922
|
-
// Update AGENTS.md with personalized name and language
|
|
1923
|
-
const agentsMdPath = path.join(JINN_HOME, "AGENTS.md");
|
|
1924
|
-
if (fs.existsSync(agentsMdPath)) {
|
|
1925
|
-
let agentsMd = fs.readFileSync(agentsMdPath, "utf-8");
|
|
1926
|
-
// Replace the bold identity line (e.g. "You are **Jinn**")
|
|
1927
|
-
agentsMd = agentsMd.replace(/You are \*\*\w+\*\*/, `You are **${effectiveName}**`);
|
|
1928
1924
|
// Remove existing language section if present, then add new one if needed
|
|
1929
|
-
|
|
1925
|
+
md = md.replace(/\n\n## Language\nAlways respond in .+\. All communication with the user must be in .+\./m, "");
|
|
1930
1926
|
if (languageSection) {
|
|
1931
|
-
|
|
1927
|
+
md = md.trimEnd() + languageSection + "\n";
|
|
1932
1928
|
}
|
|
1933
|
-
|
|
1929
|
+
writeFileAtomic(mdPath, md);
|
|
1930
|
+
}
|
|
1931
|
+
// Keep the persona file's Name section in sync
|
|
1932
|
+
const identityMdPath = path.join(JINN_HOME, "IDENTITY.md");
|
|
1933
|
+
if (provided(portalName) && fs.existsSync(identityMdPath)) {
|
|
1934
|
+
writeFileAtomic(identityMdPath, personalizeIdentityMd(fs.readFileSync(identityMdPath, "utf-8"), effectiveName));
|
|
1934
1935
|
}
|
|
1935
1936
|
context.emit("config:updated", { portal: updated.portal });
|
|
1936
1937
|
return json(res, { status: "ok", portal: updated.portal });
|