@songsid/agend 2.1.7-beta.2 → 2.1.7-beta.4

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 (52) hide show
  1. package/dist/agent-endpoint.d.ts +2 -0
  2. package/dist/agent-endpoint.js +47 -5
  3. package/dist/agent-endpoint.js.map +1 -1
  4. package/dist/backend/codex.d.ts +18 -0
  5. package/dist/backend/codex.js +68 -3
  6. package/dist/backend/codex.js.map +1 -1
  7. package/dist/backend/muse.d.ts +10 -1
  8. package/dist/backend/muse.js +62 -18
  9. package/dist/backend/muse.js.map +1 -1
  10. package/dist/backend/types.d.ts +9 -0
  11. package/dist/backend/types.js.map +1 -1
  12. package/dist/channel/mcp-operation-response.d.ts +3 -0
  13. package/dist/channel/mcp-operation-response.js +21 -0
  14. package/dist/channel/mcp-operation-response.js.map +1 -0
  15. package/dist/channel/mcp-operation-response.test.d.ts +1 -0
  16. package/dist/channel/mcp-operation-response.test.js +23 -0
  17. package/dist/channel/mcp-operation-response.test.js.map +1 -0
  18. package/dist/channel/mcp-server.js +20 -5
  19. package/dist/channel/mcp-server.js.map +1 -1
  20. package/dist/daemon.d.ts +23 -0
  21. package/dist/daemon.js +248 -24
  22. package/dist/daemon.js.map +1 -1
  23. package/dist/delivery-outbox.d.ts +90 -0
  24. package/dist/delivery-outbox.js +562 -0
  25. package/dist/delivery-outbox.js.map +1 -0
  26. package/dist/delivery-outbox.test.d.ts +1 -0
  27. package/dist/delivery-outbox.test.js +343 -0
  28. package/dist/delivery-outbox.test.js.map +1 -0
  29. package/dist/fleet-manager.d.ts +38 -1
  30. package/dist/fleet-manager.js +302 -36
  31. package/dist/fleet-manager.js.map +1 -1
  32. package/dist/instance-lifecycle.d.ts +5 -0
  33. package/dist/instance-lifecycle.js +38 -0
  34. package/dist/instance-lifecycle.js.map +1 -1
  35. package/dist/instructions.js +2 -0
  36. package/dist/instructions.js.map +1 -1
  37. package/dist/outbound-handlers.d.ts +22 -1
  38. package/dist/outbound-handlers.js +81 -7
  39. package/dist/outbound-handlers.js.map +1 -1
  40. package/dist/remote-credential-check.d.ts +39 -0
  41. package/dist/remote-credential-check.js +81 -0
  42. package/dist/remote-credential-check.js.map +1 -0
  43. package/dist/restart-progress.d.ts +16 -0
  44. package/dist/restart-progress.js +101 -11
  45. package/dist/restart-progress.js.map +1 -1
  46. package/dist/usage/providers.d.ts +11 -6
  47. package/dist/usage/providers.js +17 -10
  48. package/dist/usage/providers.js.map +1 -1
  49. package/dist/website-tips-renderer.d.ts +51 -0
  50. package/dist/website-tips-renderer.js +138 -0
  51. package/dist/website-tips-renderer.js.map +1 -0
  52. package/package.json +1 -1
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Pure rendering helpers shared by scripts/generate-tips-html.mjs (the build
3
+ * artefact generator) and tests/website-tips-generator.test.ts (the
4
+ * consistency check that compares generated output against committed files).
5
+ *
6
+ * Having the render logic here — rather than copied inside the test — means
7
+ * the test always exercises the real production code path and cannot silently
8
+ * diverge from the generator.
9
+ */
10
+ export declare const LEVELS: readonly ["beginner", "intermediate", "advanced"];
11
+ export type Locale = "en" | "zh";
12
+ export declare const COPY: {
13
+ readonly en: {
14
+ readonly lang: "en";
15
+ readonly description: "Practical AgEnD guidance, from first chat to fleet operations.";
16
+ readonly intro: "300 practical notes, grouped from everyday use to advanced fleet operations.";
17
+ readonly switchLabel: "繁體中文";
18
+ readonly switchHref: "./tips-zh.html";
19
+ readonly home: "Home";
20
+ readonly count: "tips";
21
+ readonly levels: {
22
+ readonly beginner: readonly ["Beginner", "Everyday chat and core concepts"];
23
+ readonly intermediate: readonly ["Intermediate", "Commands, Backends, and coordination"];
24
+ readonly advanced: readonly ["Advanced", "Configuration, reliability, and troubleshooting"];
25
+ };
26
+ };
27
+ readonly zh: {
28
+ readonly lang: "zh-TW";
29
+ readonly description: "從第一次對話到 Fleet 維運的 AgEnD 實用提示。";
30
+ readonly intro: "300 條實用提示,從日常操作一路整理到進階 Fleet 維運。";
31
+ readonly switchLabel: "English";
32
+ readonly switchHref: "./tips-en.html";
33
+ readonly home: "首頁";
34
+ readonly count: "條提示";
35
+ readonly levels: {
36
+ readonly beginner: readonly ["入門", "日常對話與核心概念"];
37
+ readonly intermediate: readonly ["中階", "指令、Backend 與協作"];
38
+ readonly advanced: readonly ["進階", "設定、可靠性與疑難排解"];
39
+ };
40
+ };
41
+ };
42
+ export declare function escapeHtml(value: string): string;
43
+ export interface Tip {
44
+ id: string;
45
+ level: "beginner" | "intermediate" | "advanced";
46
+ text_en: string;
47
+ text_zh: string;
48
+ tags?: string[];
49
+ }
50
+ export declare function renderTip(tip: Tip, locale: Locale): string;
51
+ export declare function renderPage(tips: Tip[], locale: Locale): string;
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Pure rendering helpers shared by scripts/generate-tips-html.mjs (the build
3
+ * artefact generator) and tests/website-tips-generator.test.ts (the
4
+ * consistency check that compares generated output against committed files).
5
+ *
6
+ * Having the render logic here — rather than copied inside the test — means
7
+ * the test always exercises the real production code path and cannot silently
8
+ * diverge from the generator.
9
+ */
10
+ export const LEVELS = ["beginner", "intermediate", "advanced"];
11
+ export const COPY = {
12
+ en: {
13
+ lang: "en",
14
+ description: "Practical AgEnD guidance, from first chat to fleet operations.",
15
+ intro: "300 practical notes, grouped from everyday use to advanced fleet operations.",
16
+ switchLabel: "繁體中文",
17
+ switchHref: "./tips-zh.html",
18
+ home: "Home",
19
+ count: "tips",
20
+ levels: {
21
+ beginner: ["Beginner", "Everyday chat and core concepts"],
22
+ intermediate: ["Intermediate", "Commands, Backends, and coordination"],
23
+ advanced: ["Advanced", "Configuration, reliability, and troubleshooting"],
24
+ },
25
+ },
26
+ zh: {
27
+ lang: "zh-TW",
28
+ description: "從第一次對話到 Fleet 維運的 AgEnD 實用提示。",
29
+ intro: "300 條實用提示,從日常操作一路整理到進階 Fleet 維運。",
30
+ switchLabel: "English",
31
+ switchHref: "./tips-en.html",
32
+ home: "首頁",
33
+ count: "條提示",
34
+ levels: {
35
+ beginner: ["入門", "日常對話與核心概念"],
36
+ intermediate: ["中階", "指令、Backend 與協作"],
37
+ advanced: ["進階", "設定、可靠性與疑難排解"],
38
+ },
39
+ },
40
+ };
41
+ export function escapeHtml(value) {
42
+ return String(value)
43
+ .replaceAll("&", "&")
44
+ .replaceAll("<", "&lt;")
45
+ .replaceAll(">", "&gt;")
46
+ .replaceAll('"', "&quot;")
47
+ .replaceAll("'", "&#39;");
48
+ }
49
+ export function renderTip(tip, locale) {
50
+ const text = locale === "zh" ? tip.text_zh : tip.text_en;
51
+ const tags = (tip.tags ?? []).map(tag => `<span class="tag">${escapeHtml(tag)}</span>`).join("");
52
+ const tagRow = tags ? `\n <div class="tags" aria-label="Backend tags">${tags}</div>` : "";
53
+ return `<article class="tip-card" id="${escapeHtml(tip.id)}" data-tip-id="${escapeHtml(tip.id)}" data-level="${tip.level}">
54
+ <a class="tip-id" href="#${escapeHtml(tip.id)}">${escapeHtml(tip.id)}</a>
55
+ <p>${escapeHtml(text)}</p>${tagRow}
56
+ </article>`;
57
+ }
58
+ export function renderPage(tips, locale) {
59
+ const copy = COPY[locale];
60
+ const sections = LEVELS.map(level => {
61
+ const levelTips = tips.filter(tip => tip.level === level);
62
+ const [heading, subtitle] = copy.levels[level];
63
+ return `<section class="tips-section" id="${level}">
64
+ <div class="section-heading">
65
+ <div>
66
+ <span class="eyebrow">${escapeHtml(level)}</span>
67
+ <h2>${escapeHtml(heading)}</h2>
68
+ <p>${escapeHtml(subtitle)}</p>
69
+ </div>
70
+ <span class="level-count">${levelTips.length} ${escapeHtml(copy.count)}</span>
71
+ </div>
72
+ <div class="tips-grid">
73
+ ${levelTips.map(tip => renderTip(tip, locale)).join("\n ")}
74
+ </div>
75
+ </section>`;
76
+ }).join("\n");
77
+ return `<!doctype html>
78
+ <html lang="${copy.lang}">
79
+ <head>
80
+ <meta charset="utf-8">
81
+ <meta name="viewport" content="width=device-width, initial-scale=1">
82
+ <title>AgEnD Tips</title>
83
+ <meta name="description" content="${escapeHtml(copy.description)}">
84
+ <link rel="icon" type="image/svg+xml" href="./favicon.svg">
85
+ <link rel="preconnect" href="https://fonts.googleapis.com">
86
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
87
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&family=Noto+Sans+TC:wght@400;500;700&display=swap" rel="stylesheet">
88
+ <style>
89
+ :root { color-scheme: dark; --bg:#0d1117; --surface:#161b22; --raised:#1c2129; --border:#30363d; --text:#f0f6fc; --secondary:#8b949e; --muted:#6e7681; --accent:#2aabee; --accent-dim:rgba(42,171,238,.1); }
90
+ * { box-sizing: border-box; }
91
+ html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
92
+ body { margin:0; background:var(--bg); color:var(--text); font-family:Inter,"Noto Sans TC",system-ui,sans-serif; line-height:1.65; }
93
+ body::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.22; background-image:radial-gradient(circle,var(--border) 1px,transparent 1px); background-size:24px 24px; mask-image:linear-gradient(to bottom,black,transparent 42rem); }
94
+ a { color:inherit; }
95
+ nav { position:sticky; top:0; z-index:10; height:64px; border-bottom:1px solid rgba(48,54,61,.7); background:rgba(13,17,23,.86); backdrop-filter:blur(14px); }
96
+ .nav-inner { max-width:1152px; height:100%; margin:auto; padding:0 24px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
97
+ .brand { color:var(--accent); font:700 18px/1 "JetBrains Mono",monospace; text-decoration:none; }
98
+ .nav-actions { display:flex; align-items:center; gap:12px; font-size:14px; color:var(--secondary); }
99
+ .nav-actions a { text-decoration:none; border:1px solid var(--border); border-radius:10px; padding:6px 11px; transition:.2s ease; }
100
+ .nav-actions a:hover { color:var(--text); border-color:var(--secondary); }
101
+ main { position:relative; max-width:1152px; margin:auto; padding:72px 24px 96px; }
102
+ .hero { max-width:780px; margin-bottom:64px; }
103
+ .hero .kicker,.eyebrow { color:var(--accent); font:600 12px/1.4 "JetBrains Mono",monospace; letter-spacing:.12em; text-transform:uppercase; }
104
+ h1 { margin:13px 0 16px; font-size:clamp(42px,7vw,72px); line-height:1.02; letter-spacing:-.045em; }
105
+ .hero p { color:var(--secondary); font-size:18px; margin:0; }
106
+ .jump-links { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
107
+ .jump-links a { text-decoration:none; color:var(--secondary); background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:7px 13px; font-size:13px; }
108
+ .jump-links a:hover { color:var(--accent); border-color:var(--accent); }
109
+ .tips-section { margin-top:72px; }
110
+ .section-heading { display:flex; justify-content:space-between; align-items:end; gap:24px; padding-bottom:20px; border-bottom:1px solid var(--border); margin-bottom:20px; }
111
+ .section-heading h2 { margin:5px 0 2px; font-size:30px; letter-spacing:-.025em; }
112
+ .section-heading p { margin:0; color:var(--secondary); }
113
+ .level-count { white-space:nowrap; color:var(--muted); font:500 13px/1.4 "JetBrains Mono",monospace; }
114
+ .tips-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
115
+ .tip-card { position:relative; display:grid; grid-template-columns:64px 1fr; gap:14px; align-items:start; padding:18px; background:rgba(22,27,34,.94); border:1px solid var(--border); border-radius:14px; transition:transform .2s ease,border-color .2s ease; }
116
+ .tip-card:hover { transform:translateY(-2px); border-color:var(--accent); }
117
+ .tip-card:target { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
118
+ .tip-id { padding-top:2px; color:var(--accent); font:600 11px/1.5 "JetBrains Mono",monospace; text-decoration:none; }
119
+ .tip-card p { margin:0; color:#d8dee4; font-size:14px; }
120
+ .tags { grid-column:2; display:flex; flex-wrap:wrap; gap:6px; margin-top:2px; }
121
+ .tag { color:var(--secondary); background:var(--raised); border:1px solid var(--border); border-radius:999px; padding:2px 8px; font:500 10px/1.5 "JetBrains Mono",monospace; }
122
+ footer { border-top:1px solid var(--border); color:var(--muted); font-size:13px; }
123
+ .footer-inner { max-width:1152px; margin:auto; padding:30px 24px; display:flex; justify-content:space-between; gap:16px; }
124
+ @media (max-width:760px) { main { padding-top:48px; } .tips-grid { grid-template-columns:1fr; } .section-heading { align-items:start; flex-direction:column; gap:8px; } .tip-card { grid-template-columns:56px 1fr; } .footer-inner { flex-direction:column; } }
125
+ </style>
126
+ </head>
127
+ <body>
128
+ <nav><div class="nav-inner"><a class="brand" href="./">AgEnD</a><div class="nav-actions"><a href="./">${escapeHtml(copy.home)}</a><a href="${copy.switchHref}" hreflang="${locale === "zh" ? "en" : "zh-TW"}">${escapeHtml(copy.switchLabel)}</a></div></div></nav>
129
+ <main>
130
+ <header class="hero"><span class="kicker">Knowledge library</span><h1>AgEnD Tips</h1><p>${escapeHtml(copy.intro)}</p><div class="jump-links">${LEVELS.map(level => `<a href="#${level}">${escapeHtml(copy.levels[level][0])}</a>`).join("")}</div></header>
131
+ ${sections}
132
+ </main>
133
+ <footer><div class="footer-inner"><span><strong>AgEnD</strong> · Multi-Agent, One Conversation</span><span>Generated from <code>src/tips.ts</code></span></div></footer>
134
+ </body>
135
+ </html>
136
+ `;
137
+ }
138
+ //# sourceMappingURL=website-tips-renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"website-tips-renderer.js","sourceRoot":"","sources":["../src/website-tips-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,EAAE,cAAc,EAAE,UAAU,CAAU,CAAC;AAGxE,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,EAAE,EAAE;QACF,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,gEAAgE;QAC7E,KAAK,EAAE,8EAA8E;QACrF,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,gBAAgB;QAC5B,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC,UAAU,EAAE,iCAAiC,CAAC;YACzD,YAAY,EAAE,CAAC,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gBAAgB,IAAI,CAAC,UAAU,eAAe,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC;;8FAEhJ,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,+BAA+B,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,aAAa,KAAK,KAAK,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;MACzO,QAAQ;;;;;CAKb,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songsid/agend",
3
- "version": "2.1.7-beta.2",
3
+ "version": "2.1.7-beta.4",
4
4
  "description": "Multi-agent fleet daemon — run any coding CLI (Claude, Gemini, Codex, OpenCode) from Telegram",
5
5
  "type": "module",
6
6
  "bin": {